diff --git a/resource-manager/aad/2021-05-01/domainservices/README.md b/resource-manager/aad/2021-05-01/domainservices/README.md index 8e4ba0df602..8d309692846 100644 --- a/resource-manager/aad/2021-05-01/domainservices/README.md +++ b/resource-manager/aad/2021-05-01/domainservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices` Documentation -The `domainservices` SDK allows for interaction with the Azure Resource Manager Service `aad` (API Version `2021-05-01`). +The `domainservices` SDK allows for interaction with Azure Resource Manager `aad` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/aad/2021-05-01/domainservices/client.go b/resource-manager/aad/2021-05-01/domainservices/client.go index 910fc751900..1e0bec0f2c1 100644 --- a/resource-manager/aad/2021-05-01/domainservices/client.go +++ b/resource-manager/aad/2021-05-01/domainservices/client.go @@ -15,7 +15,7 @@ type DomainServicesClient struct { } func NewDomainServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domainservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domainservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainServicesClient: %+v", err) } diff --git a/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go b/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go index 7138c5eadd9..a7a742e2114 100644 --- a/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go +++ b/resource-manager/aad/2021-05-01/domainservices/id_domainservice.go @@ -42,7 +42,7 @@ func ParseDomainServiceID(input string) (*DomainServiceId, error) { } id := DomainServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainServiceIDInsensitively(input string) (*DomainServiceId, error) { } id := DomainServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/aad/2021-05-01/domainservices/method_get.go b/resource-manager/aad/2021-05-01/domainservices/method_get.go index e538df7d451..10a3dc9af3e 100644 --- a/resource-manager/aad/2021-05-01/domainservices/method_get.go +++ b/resource-manager/aad/2021-05-01/domainservices/method_get.go @@ -45,7 +45,6 @@ func (c DomainServicesClient) Get(ctx context.Context, id DomainServiceId) (resu var model DomainService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/aad/2021-05-01/domainservices/version.go b/resource-manager/aad/2021-05-01/domainservices/version.go index 5bd9e4b8ecd..367514f7822 100644 --- a/resource-manager/aad/2021-05-01/domainservices/version.go +++ b/resource-manager/aad/2021-05-01/domainservices/version.go @@ -1,12 +1,10 @@ package domainservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domainservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domainservices/2021-05-01" } diff --git a/resource-manager/aad/2021-05-01/oucontainer/README.md b/resource-manager/aad/2021-05-01/oucontainer/README.md index 302b407e1ee..7413faa63db 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/README.md +++ b/resource-manager/aad/2021-05-01/oucontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/oucontainer` Documentation -The `oucontainer` SDK allows for interaction with the Azure Resource Manager Service `aad` (API Version `2021-05-01`). +The `oucontainer` SDK allows for interaction with Azure Resource Manager `aad` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/aad/2021-05-01/oucontainer/client.go b/resource-manager/aad/2021-05-01/oucontainer/client.go index 7fe617de055..76a7b42e5bb 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/client.go +++ b/resource-manager/aad/2021-05-01/oucontainer/client.go @@ -15,7 +15,7 @@ type OuContainerClient struct { } func NewOuContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*OuContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "oucontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "oucontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OuContainerClient: %+v", err) } diff --git a/resource-manager/aad/2021-05-01/oucontainer/id_domainservice.go b/resource-manager/aad/2021-05-01/oucontainer/id_domainservice.go index 799fdc5e34d..573db4b450b 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/id_domainservice.go +++ b/resource-manager/aad/2021-05-01/oucontainer/id_domainservice.go @@ -42,7 +42,7 @@ func ParseDomainServiceID(input string) (*DomainServiceId, error) { } id := DomainServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainServiceIDInsensitively(input string) (*DomainServiceId, error) { } id := DomainServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/aad/2021-05-01/oucontainer/id_oucontainer.go b/resource-manager/aad/2021-05-01/oucontainer/id_oucontainer.go index 099b895eb73..f649a5aadee 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/id_oucontainer.go +++ b/resource-manager/aad/2021-05-01/oucontainer/id_oucontainer.go @@ -44,7 +44,7 @@ func ParseOuContainerID(input string) (*OuContainerId, error) { } id := OuContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOuContainerIDInsensitively(input string) (*OuContainerId, error) { } id := OuContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/aad/2021-05-01/oucontainer/method_get.go b/resource-manager/aad/2021-05-01/oucontainer/method_get.go index edbf30c0192..7e0ec654502 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/method_get.go +++ b/resource-manager/aad/2021-05-01/oucontainer/method_get.go @@ -45,7 +45,6 @@ func (c OuContainerClient) Get(ctx context.Context, id OuContainerId) (result Ge var model OuContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/aad/2021-05-01/oucontainer/version.go b/resource-manager/aad/2021-05-01/oucontainer/version.go index 2f3eff0e4a5..63bcc67d007 100644 --- a/resource-manager/aad/2021-05-01/oucontainer/version.go +++ b/resource-manager/aad/2021-05-01/oucontainer/version.go @@ -1,12 +1,10 @@ package oucontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/oucontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/oucontainer/2021-05-01" } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md b/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md index af7dbee4db7..3c7881ce339 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants` Documentation -The `tenants` SDK allows for interaction with the Azure Resource Manager Service `aadb2c` (API Version `2021-04-01-preview`). +The `tenants` SDK allows for interaction with Azure Resource Manager `aadb2c` (API Version `2021-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/client.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/client.go index 1c020134091..7f993d0ff54 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/client.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/client.go @@ -15,7 +15,7 @@ type TenantsClient struct { } func NewTenantsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenants", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenants", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantsClient: %+v", err) } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go index aced71b6cfc..f8f34518619 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/id_b2cdirectory.go @@ -42,7 +42,7 @@ func ParseB2CDirectoryID(input string) (*B2CDirectoryId, error) { } id := B2CDirectoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseB2CDirectoryIDInsensitively(input string) (*B2CDirectoryId, error) { } id := B2CDirectoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability.go index 05f93b40117..02c09421833 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c TenantsClient) CheckNameAvailability(ctx context.Context, id commonids.S var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get.go index bfe2855be0e..5d816acf304 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_get.go @@ -45,7 +45,6 @@ func (c TenantsClient) Get(ctx context.Context, id B2CDirectoryId) (result GetOp var model Tenant result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update.go index 2a92fa543b1..8960711534a 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/method_update.go @@ -50,7 +50,6 @@ func (c TenantsClient) Update(ctx context.Context, id B2CDirectoryId, input Upda var model Tenant result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/aadb2c/2021-04-01-preview/tenants/version.go b/resource-manager/aadb2c/2021-04-01-preview/tenants/version.go index b20b9e33589..0fbcaf881f8 100644 --- a/resource-manager/aadb2c/2021-04-01-preview/tenants/version.go +++ b/resource-manager/aadb2c/2021-04-01-preview/tenants/version.go @@ -1,12 +1,10 @@ package tenants -import "fmt" - // Copyright (c) HashiCorp Inc. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenants/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenants/2021-04-01-preview" } diff --git a/resource-manager/advisor/2020-01-01/configurations/README.md b/resource-manager/advisor/2020-01-01/configurations/README.md index 2f3486000be..7c939d0f4cd 100644 --- a/resource-manager/advisor/2020-01-01/configurations/README.md +++ b/resource-manager/advisor/2020-01-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2020-01-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2020-01-01/configurations/client.go b/resource-manager/advisor/2020-01-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/advisor/2020-01-01/configurations/client.go +++ b/resource-manager/advisor/2020-01-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/advisor/2020-01-01/configurations/method_createinresourcegroup.go b/resource-manager/advisor/2020-01-01/configurations/method_createinresourcegroup.go index 487bf28a2c0..a46ebc075c7 100644 --- a/resource-manager/advisor/2020-01-01/configurations/method_createinresourcegroup.go +++ b/resource-manager/advisor/2020-01-01/configurations/method_createinresourcegroup.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInResourceGroup(ctx context.Context, id comm var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/configurations/method_createinsubscription.go b/resource-manager/advisor/2020-01-01/configurations/method_createinsubscription.go index d2f3bb887bb..64ab1cb6e84 100644 --- a/resource-manager/advisor/2020-01-01/configurations/method_createinsubscription.go +++ b/resource-manager/advisor/2020-01-01/configurations/method_createinsubscription.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInSubscription(ctx context.Context, id commo var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/configurations/version.go b/resource-manager/advisor/2020-01-01/configurations/version.go index f453c9d58d5..6ea7144beee 100644 --- a/resource-manager/advisor/2020-01-01/configurations/version.go +++ b/resource-manager/advisor/2020-01-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2020-01-01" } diff --git a/resource-manager/advisor/2020-01-01/generaterecommendations/client.go b/resource-manager/advisor/2020-01-01/generaterecommendations/client.go index b863aae052a..8ba18d18bb1 100644 --- a/resource-manager/advisor/2020-01-01/generaterecommendations/client.go +++ b/resource-manager/advisor/2020-01-01/generaterecommendations/client.go @@ -15,7 +15,7 @@ type GenerateRecommendationsClient struct { } func NewGenerateRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GenerateRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "generaterecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "generaterecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GenerateRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2020-01-01/generaterecommendations/id_generaterecommendation.go b/resource-manager/advisor/2020-01-01/generaterecommendations/id_generaterecommendation.go index 18273e2f905..e3c73c4d00f 100644 --- a/resource-manager/advisor/2020-01-01/generaterecommendations/id_generaterecommendation.go +++ b/resource-manager/advisor/2020-01-01/generaterecommendations/id_generaterecommendation.go @@ -40,7 +40,7 @@ func ParseGenerateRecommendationID(input string) (*GenerateRecommendationId, err } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseGenerateRecommendationIDInsensitively(input string) (*GenerateRecommen } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2020-01-01/generaterecommendations/version.go b/resource-manager/advisor/2020-01-01/generaterecommendations/version.go index 7c54ba19b73..71309a493f2 100644 --- a/resource-manager/advisor/2020-01-01/generaterecommendations/version.go +++ b/resource-manager/advisor/2020-01-01/generaterecommendations/version.go @@ -1,12 +1,10 @@ package generaterecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/generaterecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/generaterecommendations/2020-01-01" } diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/README.md b/resource-manager/advisor/2020-01-01/getrecommendations/README.md index f2d6052912c..6a414ff1249 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/README.md +++ b/resource-manager/advisor/2020-01-01/getrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/getrecommendations` Documentation -The `getrecommendations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2020-01-01`). +The `getrecommendations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/client.go b/resource-manager/advisor/2020-01-01/getrecommendations/client.go index 46b26724097..47fd270e5d3 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/client.go +++ b/resource-manager/advisor/2020-01-01/getrecommendations/client.go @@ -15,7 +15,7 @@ type GetRecommendationsClient struct { } func NewGetRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GetRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go b/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go index bafee7826f4..130a11a1b4a 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go +++ b/resource-manager/advisor/2020-01-01/getrecommendations/id_scopedrecommendation.go @@ -40,7 +40,7 @@ func ParseScopedRecommendationID(input string) (*ScopedRecommendationId, error) } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRecommendationIDInsensitively(input string) (*ScopedRecommendati } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationsget.go b/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationsget.go index 8f66f58abd0..d10071892c4 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationsget.go +++ b/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationsget.go @@ -45,7 +45,6 @@ func (c GetRecommendationsClient) RecommendationsGet(ctx context.Context, id Sco var model ResourceRecommendationBase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationslist.go b/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationslist.go index ef2ef976227..4ab343130b8 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationslist.go +++ b/resource-manager/advisor/2020-01-01/getrecommendations/method_recommendationslist.go @@ -41,6 +41,7 @@ func (o RecommendationsListOperationOptions) ToHeaders() *client.Headers { func (o RecommendationsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2020-01-01/getrecommendations/version.go b/resource-manager/advisor/2020-01-01/getrecommendations/version.go index 4af876e61cc..af6c4dbc3de 100644 --- a/resource-manager/advisor/2020-01-01/getrecommendations/version.go +++ b/resource-manager/advisor/2020-01-01/getrecommendations/version.go @@ -1,12 +1,10 @@ package getrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getrecommendations/2020-01-01" } diff --git a/resource-manager/advisor/2020-01-01/metadata/README.md b/resource-manager/advisor/2020-01-01/metadata/README.md index 1734e0d8dd8..90878dc9c98 100644 --- a/resource-manager/advisor/2020-01-01/metadata/README.md +++ b/resource-manager/advisor/2020-01-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2020-01-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2020-01-01/metadata/client.go b/resource-manager/advisor/2020-01-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/advisor/2020-01-01/metadata/client.go +++ b/resource-manager/advisor/2020-01-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/advisor/2020-01-01/metadata/id_metadata.go b/resource-manager/advisor/2020-01-01/metadata/id_metadata.go index 47d6f8bb606..e09903d2a4e 100644 --- a/resource-manager/advisor/2020-01-01/metadata/id_metadata.go +++ b/resource-manager/advisor/2020-01-01/metadata/id_metadata.go @@ -38,7 +38,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2020-01-01/metadata/method_recommendationmetadataget.go b/resource-manager/advisor/2020-01-01/metadata/method_recommendationmetadataget.go index 666a9aaedb0..8c71567d2be 100644 --- a/resource-manager/advisor/2020-01-01/metadata/method_recommendationmetadataget.go +++ b/resource-manager/advisor/2020-01-01/metadata/method_recommendationmetadataget.go @@ -45,7 +45,6 @@ func (c MetadataClient) RecommendationMetadataGet(ctx context.Context, id Metada var model MetadataEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/metadata/version.go b/resource-manager/advisor/2020-01-01/metadata/version.go index 53376de149b..2b563ab953b 100644 --- a/resource-manager/advisor/2020-01-01/metadata/version.go +++ b/resource-manager/advisor/2020-01-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2020-01-01" } diff --git a/resource-manager/advisor/2020-01-01/suppressions/README.md b/resource-manager/advisor/2020-01-01/suppressions/README.md index 3c015afb5d3..5379dfe5057 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/README.md +++ b/resource-manager/advisor/2020-01-01/suppressions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2020-01-01/suppressions` Documentation -The `suppressions` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2020-01-01`). +The `suppressions` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2020-01-01/suppressions/client.go b/resource-manager/advisor/2020-01-01/suppressions/client.go index 61c5460e23c..720ea7878d6 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/client.go +++ b/resource-manager/advisor/2020-01-01/suppressions/client.go @@ -15,7 +15,7 @@ type SuppressionsClient struct { } func NewSuppressionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SuppressionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "suppressions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "suppressions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SuppressionsClient: %+v", err) } diff --git a/resource-manager/advisor/2020-01-01/suppressions/id_scopedsuppression.go b/resource-manager/advisor/2020-01-01/suppressions/id_scopedsuppression.go index 5c91856b85f..cf3e0c46479 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/id_scopedsuppression.go +++ b/resource-manager/advisor/2020-01-01/suppressions/id_scopedsuppression.go @@ -42,7 +42,7 @@ func ParseScopedSuppressionID(input string) (*ScopedSuppressionId, error) { } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedSuppressionIDInsensitively(input string) (*ScopedSuppressionId, } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2020-01-01/suppressions/method_create.go b/resource-manager/advisor/2020-01-01/suppressions/method_create.go index 29c5ccab0a3..ce2fa152458 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/method_create.go +++ b/resource-manager/advisor/2020-01-01/suppressions/method_create.go @@ -49,7 +49,6 @@ func (c SuppressionsClient) Create(ctx context.Context, id ScopedSuppressionId, var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/suppressions/method_get.go b/resource-manager/advisor/2020-01-01/suppressions/method_get.go index 183b07ea15a..0b1fccc5e52 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/method_get.go +++ b/resource-manager/advisor/2020-01-01/suppressions/method_get.go @@ -45,7 +45,6 @@ func (c SuppressionsClient) Get(ctx context.Context, id ScopedSuppressionId) (re var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2020-01-01/suppressions/method_list.go b/resource-manager/advisor/2020-01-01/suppressions/method_list.go index 91e057e4ba8..94de20a6809 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/method_list.go +++ b/resource-manager/advisor/2020-01-01/suppressions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2020-01-01/suppressions/version.go b/resource-manager/advisor/2020-01-01/suppressions/version.go index d3d6e9a4429..34f1b4f2177 100644 --- a/resource-manager/advisor/2020-01-01/suppressions/version.go +++ b/resource-manager/advisor/2020-01-01/suppressions/version.go @@ -1,12 +1,10 @@ package suppressions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/suppressions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/suppressions/2020-01-01" } diff --git a/resource-manager/advisor/2022-10-01/advisorscore/README.md b/resource-manager/advisor/2022-10-01/advisorscore/README.md index 647ab1cb58d..a2c46823fb2 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/README.md +++ b/resource-manager/advisor/2022-10-01/advisorscore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/advisorscore` Documentation -The `advisorscore` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `advisorscore` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/advisorscore/client.go b/resource-manager/advisor/2022-10-01/advisorscore/client.go index 6207f097b28..02760e8a079 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/client.go +++ b/resource-manager/advisor/2022-10-01/advisorscore/client.go @@ -15,7 +15,7 @@ type AdvisorScoreClient struct { } func NewAdvisorScoreClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvisorScoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "advisorscore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "advisorscore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdvisorScoreClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/advisorscore/id_advisorscore.go b/resource-manager/advisor/2022-10-01/advisorscore/id_advisorscore.go index 980526e02ea..250b3057a16 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/id_advisorscore.go +++ b/resource-manager/advisor/2022-10-01/advisorscore/id_advisorscore.go @@ -40,7 +40,7 @@ func ParseAdvisorScoreID(input string) (*AdvisorScoreId, error) { } id := AdvisorScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAdvisorScoreIDInsensitively(input string) (*AdvisorScoreId, error) { } id := AdvisorScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2022-10-01/advisorscore/method_get.go b/resource-manager/advisor/2022-10-01/advisorscore/method_get.go index 6ba9b691ff5..74d3f7df524 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/method_get.go +++ b/resource-manager/advisor/2022-10-01/advisorscore/method_get.go @@ -45,7 +45,6 @@ func (c AdvisorScoreClient) Get(ctx context.Context, id AdvisorScoreId) (result var model AdvisorScoreEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/advisorscore/method_list.go b/resource-manager/advisor/2022-10-01/advisorscore/method_list.go index f6f30723963..a6c1398add8 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/method_list.go +++ b/resource-manager/advisor/2022-10-01/advisorscore/method_list.go @@ -47,7 +47,6 @@ func (c AdvisorScoreClient) List(ctx context.Context, id commonids.SubscriptionI var model AdvisorScoreResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/advisorscore/version.go b/resource-manager/advisor/2022-10-01/advisorscore/version.go index 47acc0b25bd..efa98f3b04b 100644 --- a/resource-manager/advisor/2022-10-01/advisorscore/version.go +++ b/resource-manager/advisor/2022-10-01/advisorscore/version.go @@ -1,12 +1,10 @@ package advisorscore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/advisorscore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/advisorscore/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/configurations/README.md b/resource-manager/advisor/2022-10-01/configurations/README.md index dd0d195ca8f..477995ccd7e 100644 --- a/resource-manager/advisor/2022-10-01/configurations/README.md +++ b/resource-manager/advisor/2022-10-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/configurations/client.go b/resource-manager/advisor/2022-10-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/advisor/2022-10-01/configurations/client.go +++ b/resource-manager/advisor/2022-10-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/configurations/method_createinresourcegroup.go b/resource-manager/advisor/2022-10-01/configurations/method_createinresourcegroup.go index 487bf28a2c0..a46ebc075c7 100644 --- a/resource-manager/advisor/2022-10-01/configurations/method_createinresourcegroup.go +++ b/resource-manager/advisor/2022-10-01/configurations/method_createinresourcegroup.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInResourceGroup(ctx context.Context, id comm var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/configurations/method_createinsubscription.go b/resource-manager/advisor/2022-10-01/configurations/method_createinsubscription.go index d2f3bb887bb..64ab1cb6e84 100644 --- a/resource-manager/advisor/2022-10-01/configurations/method_createinsubscription.go +++ b/resource-manager/advisor/2022-10-01/configurations/method_createinsubscription.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInSubscription(ctx context.Context, id commo var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/configurations/version.go b/resource-manager/advisor/2022-10-01/configurations/version.go index d51c0616dbb..928485c96e5 100644 --- a/resource-manager/advisor/2022-10-01/configurations/version.go +++ b/resource-manager/advisor/2022-10-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/generaterecommendations/client.go b/resource-manager/advisor/2022-10-01/generaterecommendations/client.go index b863aae052a..8ba18d18bb1 100644 --- a/resource-manager/advisor/2022-10-01/generaterecommendations/client.go +++ b/resource-manager/advisor/2022-10-01/generaterecommendations/client.go @@ -15,7 +15,7 @@ type GenerateRecommendationsClient struct { } func NewGenerateRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GenerateRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "generaterecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "generaterecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GenerateRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/generaterecommendations/id_generaterecommendation.go b/resource-manager/advisor/2022-10-01/generaterecommendations/id_generaterecommendation.go index 18273e2f905..e3c73c4d00f 100644 --- a/resource-manager/advisor/2022-10-01/generaterecommendations/id_generaterecommendation.go +++ b/resource-manager/advisor/2022-10-01/generaterecommendations/id_generaterecommendation.go @@ -40,7 +40,7 @@ func ParseGenerateRecommendationID(input string) (*GenerateRecommendationId, err } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseGenerateRecommendationIDInsensitively(input string) (*GenerateRecommen } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2022-10-01/generaterecommendations/version.go b/resource-manager/advisor/2022-10-01/generaterecommendations/version.go index 2936adb4789..38a02a9cb9a 100644 --- a/resource-manager/advisor/2022-10-01/generaterecommendations/version.go +++ b/resource-manager/advisor/2022-10-01/generaterecommendations/version.go @@ -1,12 +1,10 @@ package generaterecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/generaterecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/generaterecommendations/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/README.md b/resource-manager/advisor/2022-10-01/getrecommendations/README.md index 1e4e6d73ca2..13ad73b2a53 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/README.md +++ b/resource-manager/advisor/2022-10-01/getrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/getrecommendations` Documentation -The `getrecommendations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `getrecommendations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/client.go b/resource-manager/advisor/2022-10-01/getrecommendations/client.go index 46b26724097..47fd270e5d3 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/client.go +++ b/resource-manager/advisor/2022-10-01/getrecommendations/client.go @@ -15,7 +15,7 @@ type GetRecommendationsClient struct { } func NewGetRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GetRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/id_scopedrecommendation.go b/resource-manager/advisor/2022-10-01/getrecommendations/id_scopedrecommendation.go index bafee7826f4..130a11a1b4a 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/id_scopedrecommendation.go +++ b/resource-manager/advisor/2022-10-01/getrecommendations/id_scopedrecommendation.go @@ -40,7 +40,7 @@ func ParseScopedRecommendationID(input string) (*ScopedRecommendationId, error) } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRecommendationIDInsensitively(input string) (*ScopedRecommendati } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationsget.go b/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationsget.go index 8f66f58abd0..d10071892c4 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationsget.go +++ b/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationsget.go @@ -45,7 +45,6 @@ func (c GetRecommendationsClient) RecommendationsGet(ctx context.Context, id Sco var model ResourceRecommendationBase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationslist.go b/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationslist.go index ef2ef976227..4ab343130b8 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationslist.go +++ b/resource-manager/advisor/2022-10-01/getrecommendations/method_recommendationslist.go @@ -41,6 +41,7 @@ func (o RecommendationsListOperationOptions) ToHeaders() *client.Headers { func (o RecommendationsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2022-10-01/getrecommendations/version.go b/resource-manager/advisor/2022-10-01/getrecommendations/version.go index 8fe534518ca..f1b6ba40706 100644 --- a/resource-manager/advisor/2022-10-01/getrecommendations/version.go +++ b/resource-manager/advisor/2022-10-01/getrecommendations/version.go @@ -1,12 +1,10 @@ package getrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getrecommendations/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/metadata/README.md b/resource-manager/advisor/2022-10-01/metadata/README.md index 8c1c4f999c5..70fe1ed7da0 100644 --- a/resource-manager/advisor/2022-10-01/metadata/README.md +++ b/resource-manager/advisor/2022-10-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/metadata/client.go b/resource-manager/advisor/2022-10-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/advisor/2022-10-01/metadata/client.go +++ b/resource-manager/advisor/2022-10-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/metadata/id_metadata.go b/resource-manager/advisor/2022-10-01/metadata/id_metadata.go index 47d6f8bb606..e09903d2a4e 100644 --- a/resource-manager/advisor/2022-10-01/metadata/id_metadata.go +++ b/resource-manager/advisor/2022-10-01/metadata/id_metadata.go @@ -38,7 +38,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2022-10-01/metadata/method_recommendationmetadataget.go b/resource-manager/advisor/2022-10-01/metadata/method_recommendationmetadataget.go index 666a9aaedb0..8c71567d2be 100644 --- a/resource-manager/advisor/2022-10-01/metadata/method_recommendationmetadataget.go +++ b/resource-manager/advisor/2022-10-01/metadata/method_recommendationmetadataget.go @@ -45,7 +45,6 @@ func (c MetadataClient) RecommendationMetadataGet(ctx context.Context, id Metada var model MetadataEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/metadata/version.go b/resource-manager/advisor/2022-10-01/metadata/version.go index caee8236708..2ad27529dc9 100644 --- a/resource-manager/advisor/2022-10-01/metadata/version.go +++ b/resource-manager/advisor/2022-10-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/prediction/README.md b/resource-manager/advisor/2022-10-01/prediction/README.md index e606627fb18..712bd88216e 100644 --- a/resource-manager/advisor/2022-10-01/prediction/README.md +++ b/resource-manager/advisor/2022-10-01/prediction/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/prediction` Documentation -The `prediction` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `prediction` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/prediction/client.go b/resource-manager/advisor/2022-10-01/prediction/client.go index 3cf068d4a6f..8287c65b0ea 100644 --- a/resource-manager/advisor/2022-10-01/prediction/client.go +++ b/resource-manager/advisor/2022-10-01/prediction/client.go @@ -15,7 +15,7 @@ type PredictionClient struct { } func NewPredictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PredictionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prediction", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prediction", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PredictionClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/prediction/method_predict.go b/resource-manager/advisor/2022-10-01/prediction/method_predict.go index 8d004baaf29..5b146f363e4 100644 --- a/resource-manager/advisor/2022-10-01/prediction/method_predict.go +++ b/resource-manager/advisor/2022-10-01/prediction/method_predict.go @@ -51,7 +51,6 @@ func (c PredictionClient) Predict(ctx context.Context, id commonids.Subscription var model PredictionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/prediction/version.go b/resource-manager/advisor/2022-10-01/prediction/version.go index 092bc553951..ad328c210fa 100644 --- a/resource-manager/advisor/2022-10-01/prediction/version.go +++ b/resource-manager/advisor/2022-10-01/prediction/version.go @@ -1,12 +1,10 @@ package prediction -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prediction/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prediction/2022-10-01" } diff --git a/resource-manager/advisor/2022-10-01/suppressions/README.md b/resource-manager/advisor/2022-10-01/suppressions/README.md index ccc86ccc813..4f854ee6f9e 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/README.md +++ b/resource-manager/advisor/2022-10-01/suppressions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2022-10-01/suppressions` Documentation -The `suppressions` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2022-10-01`). +The `suppressions` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2022-10-01/suppressions/client.go b/resource-manager/advisor/2022-10-01/suppressions/client.go index 61c5460e23c..720ea7878d6 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/client.go +++ b/resource-manager/advisor/2022-10-01/suppressions/client.go @@ -15,7 +15,7 @@ type SuppressionsClient struct { } func NewSuppressionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SuppressionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "suppressions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "suppressions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SuppressionsClient: %+v", err) } diff --git a/resource-manager/advisor/2022-10-01/suppressions/id_scopedsuppression.go b/resource-manager/advisor/2022-10-01/suppressions/id_scopedsuppression.go index 5c91856b85f..cf3e0c46479 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/id_scopedsuppression.go +++ b/resource-manager/advisor/2022-10-01/suppressions/id_scopedsuppression.go @@ -42,7 +42,7 @@ func ParseScopedSuppressionID(input string) (*ScopedSuppressionId, error) { } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedSuppressionIDInsensitively(input string) (*ScopedSuppressionId, } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2022-10-01/suppressions/method_create.go b/resource-manager/advisor/2022-10-01/suppressions/method_create.go index 29c5ccab0a3..ce2fa152458 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/method_create.go +++ b/resource-manager/advisor/2022-10-01/suppressions/method_create.go @@ -49,7 +49,6 @@ func (c SuppressionsClient) Create(ctx context.Context, id ScopedSuppressionId, var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/suppressions/method_get.go b/resource-manager/advisor/2022-10-01/suppressions/method_get.go index 183b07ea15a..0b1fccc5e52 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/method_get.go +++ b/resource-manager/advisor/2022-10-01/suppressions/method_get.go @@ -45,7 +45,6 @@ func (c SuppressionsClient) Get(ctx context.Context, id ScopedSuppressionId) (re var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2022-10-01/suppressions/method_list.go b/resource-manager/advisor/2022-10-01/suppressions/method_list.go index 91e057e4ba8..94de20a6809 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/method_list.go +++ b/resource-manager/advisor/2022-10-01/suppressions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2022-10-01/suppressions/version.go b/resource-manager/advisor/2022-10-01/suppressions/version.go index e9efb8b5730..f5e94cd6fc6 100644 --- a/resource-manager/advisor/2022-10-01/suppressions/version.go +++ b/resource-manager/advisor/2022-10-01/suppressions/version.go @@ -1,12 +1,10 @@ package suppressions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/suppressions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/suppressions/2022-10-01" } diff --git a/resource-manager/advisor/2023-01-01/advisorscore/README.md b/resource-manager/advisor/2023-01-01/advisorscore/README.md index 35c0ef614c6..e0d1ad943b6 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/README.md +++ b/resource-manager/advisor/2023-01-01/advisorscore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/advisorscore` Documentation -The `advisorscore` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `advisorscore` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/advisorscore/client.go b/resource-manager/advisor/2023-01-01/advisorscore/client.go index 6207f097b28..02760e8a079 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/client.go +++ b/resource-manager/advisor/2023-01-01/advisorscore/client.go @@ -15,7 +15,7 @@ type AdvisorScoreClient struct { } func NewAdvisorScoreClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvisorScoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "advisorscore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "advisorscore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdvisorScoreClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/advisorscore/id_advisorscore.go b/resource-manager/advisor/2023-01-01/advisorscore/id_advisorscore.go index 980526e02ea..250b3057a16 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/id_advisorscore.go +++ b/resource-manager/advisor/2023-01-01/advisorscore/id_advisorscore.go @@ -40,7 +40,7 @@ func ParseAdvisorScoreID(input string) (*AdvisorScoreId, error) { } id := AdvisorScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAdvisorScoreIDInsensitively(input string) (*AdvisorScoreId, error) { } id := AdvisorScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2023-01-01/advisorscore/method_get.go b/resource-manager/advisor/2023-01-01/advisorscore/method_get.go index 6ba9b691ff5..74d3f7df524 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/method_get.go +++ b/resource-manager/advisor/2023-01-01/advisorscore/method_get.go @@ -45,7 +45,6 @@ func (c AdvisorScoreClient) Get(ctx context.Context, id AdvisorScoreId) (result var model AdvisorScoreEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/advisorscore/method_list.go b/resource-manager/advisor/2023-01-01/advisorscore/method_list.go index f6f30723963..a6c1398add8 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/method_list.go +++ b/resource-manager/advisor/2023-01-01/advisorscore/method_list.go @@ -47,7 +47,6 @@ func (c AdvisorScoreClient) List(ctx context.Context, id commonids.SubscriptionI var model AdvisorScoreResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/advisorscore/version.go b/resource-manager/advisor/2023-01-01/advisorscore/version.go index ffb6a2c8d12..9700fda7db2 100644 --- a/resource-manager/advisor/2023-01-01/advisorscore/version.go +++ b/resource-manager/advisor/2023-01-01/advisorscore/version.go @@ -1,12 +1,10 @@ package advisorscore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/advisorscore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/advisorscore/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/configurations/README.md b/resource-manager/advisor/2023-01-01/configurations/README.md index c5e06a3bc9e..31e62f01f9c 100644 --- a/resource-manager/advisor/2023-01-01/configurations/README.md +++ b/resource-manager/advisor/2023-01-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/configurations/client.go b/resource-manager/advisor/2023-01-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/advisor/2023-01-01/configurations/client.go +++ b/resource-manager/advisor/2023-01-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/configurations/method_createinresourcegroup.go b/resource-manager/advisor/2023-01-01/configurations/method_createinresourcegroup.go index 487bf28a2c0..a46ebc075c7 100644 --- a/resource-manager/advisor/2023-01-01/configurations/method_createinresourcegroup.go +++ b/resource-manager/advisor/2023-01-01/configurations/method_createinresourcegroup.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInResourceGroup(ctx context.Context, id comm var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/configurations/method_createinsubscription.go b/resource-manager/advisor/2023-01-01/configurations/method_createinsubscription.go index d2f3bb887bb..64ab1cb6e84 100644 --- a/resource-manager/advisor/2023-01-01/configurations/method_createinsubscription.go +++ b/resource-manager/advisor/2023-01-01/configurations/method_createinsubscription.go @@ -51,7 +51,6 @@ func (c ConfigurationsClient) CreateInSubscription(ctx context.Context, id commo var model ConfigData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/configurations/version.go b/resource-manager/advisor/2023-01-01/configurations/version.go index 6e655ce2dc9..5628cb511ef 100644 --- a/resource-manager/advisor/2023-01-01/configurations/version.go +++ b/resource-manager/advisor/2023-01-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/generaterecommendations/client.go b/resource-manager/advisor/2023-01-01/generaterecommendations/client.go index b863aae052a..8ba18d18bb1 100644 --- a/resource-manager/advisor/2023-01-01/generaterecommendations/client.go +++ b/resource-manager/advisor/2023-01-01/generaterecommendations/client.go @@ -15,7 +15,7 @@ type GenerateRecommendationsClient struct { } func NewGenerateRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GenerateRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "generaterecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "generaterecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GenerateRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/generaterecommendations/id_generaterecommendation.go b/resource-manager/advisor/2023-01-01/generaterecommendations/id_generaterecommendation.go index 18273e2f905..e3c73c4d00f 100644 --- a/resource-manager/advisor/2023-01-01/generaterecommendations/id_generaterecommendation.go +++ b/resource-manager/advisor/2023-01-01/generaterecommendations/id_generaterecommendation.go @@ -40,7 +40,7 @@ func ParseGenerateRecommendationID(input string) (*GenerateRecommendationId, err } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseGenerateRecommendationIDInsensitively(input string) (*GenerateRecommen } id := GenerateRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2023-01-01/generaterecommendations/version.go b/resource-manager/advisor/2023-01-01/generaterecommendations/version.go index 4738302421b..740f4beeaf4 100644 --- a/resource-manager/advisor/2023-01-01/generaterecommendations/version.go +++ b/resource-manager/advisor/2023-01-01/generaterecommendations/version.go @@ -1,12 +1,10 @@ package generaterecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/generaterecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/generaterecommendations/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/README.md b/resource-manager/advisor/2023-01-01/getrecommendations/README.md index ebd6376edd8..d850170c662 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/README.md +++ b/resource-manager/advisor/2023-01-01/getrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/getrecommendations` Documentation -The `getrecommendations` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `getrecommendations` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/client.go b/resource-manager/advisor/2023-01-01/getrecommendations/client.go index 46b26724097..47fd270e5d3 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/client.go +++ b/resource-manager/advisor/2023-01-01/getrecommendations/client.go @@ -15,7 +15,7 @@ type GetRecommendationsClient struct { } func NewGetRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GetRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetRecommendationsClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/id_scopedrecommendation.go b/resource-manager/advisor/2023-01-01/getrecommendations/id_scopedrecommendation.go index bafee7826f4..130a11a1b4a 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/id_scopedrecommendation.go +++ b/resource-manager/advisor/2023-01-01/getrecommendations/id_scopedrecommendation.go @@ -40,7 +40,7 @@ func ParseScopedRecommendationID(input string) (*ScopedRecommendationId, error) } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRecommendationIDInsensitively(input string) (*ScopedRecommendati } id := ScopedRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationsget.go b/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationsget.go index 8f66f58abd0..d10071892c4 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationsget.go +++ b/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationsget.go @@ -45,7 +45,6 @@ func (c GetRecommendationsClient) RecommendationsGet(ctx context.Context, id Sco var model ResourceRecommendationBase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationslist.go b/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationslist.go index ef2ef976227..4ab343130b8 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationslist.go +++ b/resource-manager/advisor/2023-01-01/getrecommendations/method_recommendationslist.go @@ -41,6 +41,7 @@ func (o RecommendationsListOperationOptions) ToHeaders() *client.Headers { func (o RecommendationsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2023-01-01/getrecommendations/version.go b/resource-manager/advisor/2023-01-01/getrecommendations/version.go index 09dac31e9c8..8d1a5b07a7f 100644 --- a/resource-manager/advisor/2023-01-01/getrecommendations/version.go +++ b/resource-manager/advisor/2023-01-01/getrecommendations/version.go @@ -1,12 +1,10 @@ package getrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getrecommendations/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/metadata/README.md b/resource-manager/advisor/2023-01-01/metadata/README.md index 2e842e74aa7..f231cc252bf 100644 --- a/resource-manager/advisor/2023-01-01/metadata/README.md +++ b/resource-manager/advisor/2023-01-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/metadata/client.go b/resource-manager/advisor/2023-01-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/advisor/2023-01-01/metadata/client.go +++ b/resource-manager/advisor/2023-01-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/metadata/id_metadata.go b/resource-manager/advisor/2023-01-01/metadata/id_metadata.go index 47d6f8bb606..e09903d2a4e 100644 --- a/resource-manager/advisor/2023-01-01/metadata/id_metadata.go +++ b/resource-manager/advisor/2023-01-01/metadata/id_metadata.go @@ -38,7 +38,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2023-01-01/metadata/method_recommendationmetadataget.go b/resource-manager/advisor/2023-01-01/metadata/method_recommendationmetadataget.go index 666a9aaedb0..8c71567d2be 100644 --- a/resource-manager/advisor/2023-01-01/metadata/method_recommendationmetadataget.go +++ b/resource-manager/advisor/2023-01-01/metadata/method_recommendationmetadataget.go @@ -45,7 +45,6 @@ func (c MetadataClient) RecommendationMetadataGet(ctx context.Context, id Metada var model MetadataEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/metadata/version.go b/resource-manager/advisor/2023-01-01/metadata/version.go index 59838205d98..04b5009e432 100644 --- a/resource-manager/advisor/2023-01-01/metadata/version.go +++ b/resource-manager/advisor/2023-01-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/prediction/README.md b/resource-manager/advisor/2023-01-01/prediction/README.md index 6dd2e7c1272..5be86c49e94 100644 --- a/resource-manager/advisor/2023-01-01/prediction/README.md +++ b/resource-manager/advisor/2023-01-01/prediction/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/prediction` Documentation -The `prediction` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `prediction` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/prediction/client.go b/resource-manager/advisor/2023-01-01/prediction/client.go index 3cf068d4a6f..8287c65b0ea 100644 --- a/resource-manager/advisor/2023-01-01/prediction/client.go +++ b/resource-manager/advisor/2023-01-01/prediction/client.go @@ -15,7 +15,7 @@ type PredictionClient struct { } func NewPredictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PredictionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prediction", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prediction", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PredictionClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/prediction/method_predict.go b/resource-manager/advisor/2023-01-01/prediction/method_predict.go index 8d004baaf29..5b146f363e4 100644 --- a/resource-manager/advisor/2023-01-01/prediction/method_predict.go +++ b/resource-manager/advisor/2023-01-01/prediction/method_predict.go @@ -51,7 +51,6 @@ func (c PredictionClient) Predict(ctx context.Context, id commonids.Subscription var model PredictionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/prediction/version.go b/resource-manager/advisor/2023-01-01/prediction/version.go index be582d83434..b7f1e45cab1 100644 --- a/resource-manager/advisor/2023-01-01/prediction/version.go +++ b/resource-manager/advisor/2023-01-01/prediction/version.go @@ -1,12 +1,10 @@ package prediction -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prediction/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prediction/2023-01-01" } diff --git a/resource-manager/advisor/2023-01-01/suppressions/README.md b/resource-manager/advisor/2023-01-01/suppressions/README.md index e2fad2494c1..60f00636f00 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/README.md +++ b/resource-manager/advisor/2023-01-01/suppressions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/advisor/2023-01-01/suppressions` Documentation -The `suppressions` SDK allows for interaction with the Azure Resource Manager Service `advisor` (API Version `2023-01-01`). +The `suppressions` SDK allows for interaction with Azure Resource Manager `advisor` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/advisor/2023-01-01/suppressions/client.go b/resource-manager/advisor/2023-01-01/suppressions/client.go index 61c5460e23c..720ea7878d6 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/client.go +++ b/resource-manager/advisor/2023-01-01/suppressions/client.go @@ -15,7 +15,7 @@ type SuppressionsClient struct { } func NewSuppressionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SuppressionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "suppressions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "suppressions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SuppressionsClient: %+v", err) } diff --git a/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go b/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go index 5c91856b85f..cf3e0c46479 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go +++ b/resource-manager/advisor/2023-01-01/suppressions/id_scopedsuppression.go @@ -42,7 +42,7 @@ func ParseScopedSuppressionID(input string) (*ScopedSuppressionId, error) { } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedSuppressionIDInsensitively(input string) (*ScopedSuppressionId, } id := ScopedSuppressionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/advisor/2023-01-01/suppressions/method_create.go b/resource-manager/advisor/2023-01-01/suppressions/method_create.go index 29c5ccab0a3..ce2fa152458 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/method_create.go +++ b/resource-manager/advisor/2023-01-01/suppressions/method_create.go @@ -49,7 +49,6 @@ func (c SuppressionsClient) Create(ctx context.Context, id ScopedSuppressionId, var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/suppressions/method_get.go b/resource-manager/advisor/2023-01-01/suppressions/method_get.go index 183b07ea15a..0b1fccc5e52 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/method_get.go +++ b/resource-manager/advisor/2023-01-01/suppressions/method_get.go @@ -45,7 +45,6 @@ func (c SuppressionsClient) Get(ctx context.Context, id ScopedSuppressionId) (re var model SuppressionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/advisor/2023-01-01/suppressions/method_list.go b/resource-manager/advisor/2023-01-01/suppressions/method_list.go index 91e057e4ba8..94de20a6809 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/method_list.go +++ b/resource-manager/advisor/2023-01-01/suppressions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/advisor/2023-01-01/suppressions/version.go b/resource-manager/advisor/2023-01-01/suppressions/version.go index 9a185f5807a..b17378ff7da 100644 --- a/resource-manager/advisor/2023-01-01/suppressions/version.go +++ b/resource-manager/advisor/2023-01-01/suppressions/version.go @@ -1,12 +1,10 @@ package suppressions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/suppressions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/suppressions/2023-01-01" } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md index 4bee17bec46..e0ed9c08082 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/actionrules` Documentation -The `actionrules` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-05-05-preview`). +The `actionrules` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2019-05-05-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go index 38b4086951c..4bd29661627 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/client.go @@ -15,7 +15,7 @@ type ActionRulesClient struct { } func NewActionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actionrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actionrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionRulesClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go index f44516772e7..43375ee0dd8 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/id_actionrule.go @@ -42,7 +42,7 @@ func ParseActionRuleID(input string) (*ActionRuleId, error) { } id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionRuleIDInsensitively(input string) (*ActionRuleId, error) { } id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go index 3acee227281..2e5e5bb4092 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_createupdate.go @@ -49,7 +49,6 @@ func (c ActionRulesClient) CreateUpdate(ctx context.Context, id ActionRuleId, in var model ActionRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go index 0eeb37bc395..8b8e6e8a1e3 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_delete.go @@ -45,7 +45,6 @@ func (c ActionRulesClient) Delete(ctx context.Context, id ActionRuleId) (result var model bool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go index 815cafe084a..77b4b7222ba 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_getbyname.go @@ -45,7 +45,6 @@ func (c ActionRulesClient) GetByName(ctx context.Context, id ActionRuleId) (resu var model ActionRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go index b37cd3247f1..17d2c04cdac 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbyresourcegroup.go @@ -49,6 +49,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go index b8a90fa4807..9910548a7b6 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_listbysubscription.go @@ -49,6 +49,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go index cc6ff4e0913..36d248388ee 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/method_update.go @@ -49,7 +49,6 @@ func (c ActionRulesClient) Update(ctx context.Context, id ActionRuleId, input Pa var model ActionRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go index 319cb3fd7dd..e87179c26fe 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actiongroup.go @@ -17,6 +17,7 @@ type ActionGroup struct { ActionGroupId *string `json:"actionGroupId,omitempty"` // Fields inherited from ActionRuleProperties + Conditions *Conditions `json:"conditions,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` CreatedBy *string `json:"createdBy,omitempty"` @@ -25,6 +26,21 @@ type ActionGroup struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` Scope *Scope `json:"scope,omitempty"` Status *ActionRuleStatus `json:"status,omitempty"` + Type ActionRuleType `json:"type"` +} + +func (s ActionGroup) ActionRuleProperties() BaseActionRulePropertiesImpl { + return BaseActionRulePropertiesImpl{ + Conditions: s.Conditions, + CreatedAt: s.CreatedAt, + CreatedBy: s.CreatedBy, + Description: s.Description, + LastModifiedAt: s.LastModifiedAt, + LastModifiedBy: s.LastModifiedBy, + Scope: s.Scope, + Status: s.Status, + Type: s.Type, + } } func (o *ActionGroup) GetCreatedAtAsTime() (*time.Time, error) { @@ -62,9 +78,10 @@ func (s ActionGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActionGroup: %+v", err) } + decoded["type"] = "ActionGroup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go index 387fa735089..180f96ed572 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionrule.go @@ -38,7 +38,7 @@ func (s *ActionRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalActionRulePropertiesImplementation(v) + impl, err := UnmarshalActionRulePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ActionRule': %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go index 63753b506ac..c3622aa2e58 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_actionruleproperties.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ActionRuleProperties interface { + ActionRuleProperties() BaseActionRulePropertiesImpl } -// RawActionRulePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ActionRuleProperties = BaseActionRulePropertiesImpl{} + +type BaseActionRulePropertiesImpl struct { + Conditions *Conditions `json:"conditions,omitempty"` + CreatedAt *string `json:"createdAt,omitempty"` + CreatedBy *string `json:"createdBy,omitempty"` + Description *string `json:"description,omitempty"` + LastModifiedAt *string `json:"lastModifiedAt,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + Scope *Scope `json:"scope,omitempty"` + Status *ActionRuleStatus `json:"status,omitempty"` + Type ActionRuleType `json:"type"` +} + +func (s BaseActionRulePropertiesImpl) ActionRuleProperties() BaseActionRulePropertiesImpl { + return s +} + +var _ ActionRuleProperties = RawActionRulePropertiesImpl{} + +// RawActionRulePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActionRulePropertiesImpl struct { - Type string - Values map[string]interface{} + actionRuleProperties BaseActionRulePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawActionRulePropertiesImpl) ActionRuleProperties() BaseActionRulePropertiesImpl { + return s.actionRuleProperties } -func unmarshalActionRulePropertiesImplementation(input []byte) (ActionRuleProperties, error) { +func UnmarshalActionRulePropertiesImplementation(input []byte) (ActionRuleProperties, error) { if input == nil { return nil, nil } @@ -60,10 +85,15 @@ func unmarshalActionRulePropertiesImplementation(input []byte) (ActionRuleProper return out, nil } - out := RawActionRulePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseActionRulePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActionRulePropertiesImpl: %+v", err) } - return out, nil + + return RawActionRulePropertiesImpl{ + actionRuleProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go index 79ea18204b7..6698165c380 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_diagnostics.go @@ -16,6 +16,7 @@ var _ ActionRuleProperties = Diagnostics{} type Diagnostics struct { // Fields inherited from ActionRuleProperties + Conditions *Conditions `json:"conditions,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` CreatedBy *string `json:"createdBy,omitempty"` @@ -24,6 +25,21 @@ type Diagnostics struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` Scope *Scope `json:"scope,omitempty"` Status *ActionRuleStatus `json:"status,omitempty"` + Type ActionRuleType `json:"type"` +} + +func (s Diagnostics) ActionRuleProperties() BaseActionRulePropertiesImpl { + return BaseActionRulePropertiesImpl{ + Conditions: s.Conditions, + CreatedAt: s.CreatedAt, + CreatedBy: s.CreatedBy, + Description: s.Description, + LastModifiedAt: s.LastModifiedAt, + LastModifiedBy: s.LastModifiedBy, + Scope: s.Scope, + Status: s.Status, + Type: s.Type, + } } func (o *Diagnostics) GetCreatedAtAsTime() (*time.Time, error) { @@ -61,9 +77,10 @@ func (s Diagnostics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Diagnostics: %+v", err) } + decoded["type"] = "Diagnostics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go index 927b6e42c54..47dfabf54df 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/model_suppression.go @@ -17,6 +17,7 @@ type Suppression struct { SuppressionConfig *SuppressionConfig `json:"suppressionConfig,omitempty"` // Fields inherited from ActionRuleProperties + Conditions *Conditions `json:"conditions,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` CreatedBy *string `json:"createdBy,omitempty"` @@ -25,6 +26,21 @@ type Suppression struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` Scope *Scope `json:"scope,omitempty"` Status *ActionRuleStatus `json:"status,omitempty"` + Type ActionRuleType `json:"type"` +} + +func (s Suppression) ActionRuleProperties() BaseActionRulePropertiesImpl { + return BaseActionRulePropertiesImpl{ + Conditions: s.Conditions, + CreatedAt: s.CreatedAt, + CreatedBy: s.CreatedBy, + Description: s.Description, + LastModifiedAt: s.LastModifiedAt, + LastModifiedBy: s.LastModifiedBy, + Scope: s.Scope, + Status: s.Status, + Type: s.Type, + } } func (o *Suppression) GetCreatedAtAsTime() (*time.Time, error) { @@ -62,9 +78,10 @@ func (s Suppression) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Suppression: %+v", err) } + decoded["type"] = "Suppression" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go index c2fa5779a25..73d05a9683d 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/actionrules/version.go @@ -1,12 +1,10 @@ package actionrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-05-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actionrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actionrules/2019-05-05-preview" } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md index 2ae83551ccd..181b70c51f6 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements` Documentation -The `alertsmanagements` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-05-05-preview`). +The `alertsmanagements` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2019-05-05-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go index cfbb889e434..8482ef066a2 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/client.go @@ -15,7 +15,7 @@ type AlertsManagementsClient struct { } func NewAlertsManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertsmanagements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertsmanagements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsManagementsClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go index c83bb9e83b3..3436798b1ad 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/id_alert.go @@ -40,7 +40,7 @@ func ParseAlertID(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAlertIDInsensitively(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go index 408fb21eba0..9d3f16d3e87 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertschangestate.go @@ -34,6 +34,7 @@ func (o AlertsChangeStateOperationOptions) ToHeaders() *client.Headers { func (o AlertsChangeStateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AlertsManagementsClient) AlertsChangeState(ctx context.Context, id Alert var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go index 69af7a04b40..dfcf027ed7b 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetall.go @@ -56,6 +56,7 @@ func (o AlertsGetAllOperationOptions) ToHeaders() *client.Headers { func (o AlertsGetAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go index f3454dc11e8..2ffe6707e65 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetbyid.go @@ -45,7 +45,6 @@ func (c AlertsManagementsClient) AlertsGetById(ctx context.Context, id AlertId) var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go index 420acdcb6ba..54d96653e4f 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgethistory.go @@ -46,7 +46,6 @@ func (c AlertsManagementsClient) AlertsGetHistory(ctx context.Context, id AlertI var model AlertModification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go index e142ea30b13..78f44b44c08 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsgetsummary.go @@ -46,6 +46,7 @@ func (o AlertsGetSummaryOperationOptions) ToHeaders() *client.Headers { func (o AlertsGetSummaryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -119,7 +120,6 @@ func (c AlertsManagementsClient) AlertsGetSummary(ctx context.Context, id common var model AlertsSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go index 9d84a06232b..89e7b5788f3 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/method_alertsmetadata.go @@ -34,6 +34,7 @@ func (o AlertsMetaDataOperationOptions) ToHeaders() *client.Headers { func (o AlertsMetaDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AlertsManagementsClient) AlertsMetaData(ctx context.Context, options Ale var model AlertsMetaData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go index 75a25b3435a..d827f425a11 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadata.go @@ -22,7 +22,7 @@ func (s *AlertsMetaData) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAlertsMetaDataPropertiesImplementation(v) + impl, err := UnmarshalAlertsMetaDataPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AlertsMetaData': %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go index 3c6dea34fe2..db93b946a60 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/model_alertsmetadataproperties.go @@ -9,18 +9,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertsMetaDataProperties interface { + AlertsMetaDataProperties() BaseAlertsMetaDataPropertiesImpl } -// RawAlertsMetaDataPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertsMetaDataProperties = BaseAlertsMetaDataPropertiesImpl{} + +type BaseAlertsMetaDataPropertiesImpl struct { + MetadataIdentifier MetadataIdentifier `json:"metadataIdentifier"` +} + +func (s BaseAlertsMetaDataPropertiesImpl) AlertsMetaDataProperties() BaseAlertsMetaDataPropertiesImpl { + return s +} + +var _ AlertsMetaDataProperties = RawAlertsMetaDataPropertiesImpl{} + +// RawAlertsMetaDataPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertsMetaDataPropertiesImpl struct { - Type string - Values map[string]interface{} + alertsMetaDataProperties BaseAlertsMetaDataPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawAlertsMetaDataPropertiesImpl) AlertsMetaDataProperties() BaseAlertsMetaDataPropertiesImpl { + return s.alertsMetaDataProperties } -func unmarshalAlertsMetaDataPropertiesImplementation(input []byte) (AlertsMetaDataProperties, error) { +func UnmarshalAlertsMetaDataPropertiesImplementation(input []byte) (AlertsMetaDataProperties, error) { if input == nil { return nil, nil } @@ -35,10 +52,15 @@ func unmarshalAlertsMetaDataPropertiesImplementation(input []byte) (AlertsMetaDa return nil, nil } - out := RawAlertsMetaDataPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseAlertsMetaDataPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertsMetaDataPropertiesImpl: %+v", err) } - return out, nil + + return RawAlertsMetaDataPropertiesImpl{ + alertsMetaDataProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go index 7d5fcd2277a..c52e0b091d3 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/alertsmanagements/version.go @@ -1,12 +1,10 @@ package alertsmanagements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-05-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertsmanagements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertsmanagements/2019-05-05-preview" } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/README.md b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/README.md index da2d1f00f07..b20b6bbb8e2 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/README.md +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups` Documentation -The `smartgroups` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-05-05-preview`). +The `smartgroups` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2019-05-05-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/client.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/client.go index 2a5902ef442..760f2b392c5 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/client.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/client.go @@ -15,7 +15,7 @@ type SmartGroupsClient struct { } func NewSmartGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SmartGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "smartgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "smartgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SmartGroupsClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/id_smartgroup.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/id_smartgroup.go index b5886bd2dc7..4071d0cad93 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/id_smartgroup.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/id_smartgroup.go @@ -40,7 +40,7 @@ func ParseSmartGroupID(input string) (*SmartGroupId, error) { } id := SmartGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSmartGroupIDInsensitively(input string) (*SmartGroupId, error) { } id := SmartGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_changestate.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_changestate.go index 562a5159a5f..04bb6ac39b0 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_changestate.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_changestate.go @@ -34,6 +34,7 @@ func (o ChangeStateOperationOptions) ToHeaders() *client.Headers { func (o ChangeStateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SmartGroupsClient) ChangeState(ctx context.Context, id SmartGroupId, opt var model SmartGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getall.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getall.go index c1a769874de..0eace39a5e0 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getall.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getall.go @@ -50,6 +50,7 @@ func (o GetAllOperationOptions) ToHeaders() *client.Headers { func (o GetAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getbyid.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getbyid.go index 2386ed0a771..a196035f7b6 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getbyid.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_getbyid.go @@ -45,7 +45,6 @@ func (c SmartGroupsClient) GetById(ctx context.Context, id SmartGroupId) (result var model SmartGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_gethistory.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_gethistory.go index 5011b09c726..f0f5dec876d 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_gethistory.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/method_gethistory.go @@ -46,7 +46,6 @@ func (c SmartGroupsClient) GetHistory(ctx context.Context, id SmartGroupId) (res var model SmartGroupModification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/version.go b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/version.go index 3638c36fd96..11433e1c210 100644 --- a/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/version.go +++ b/resource-manager/alertsmanagement/2019-05-05-preview/smartgroups/version.go @@ -1,12 +1,10 @@ package smartgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-05-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/smartgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/smartgroups/2019-05-05-preview" } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/README.md b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/README.md index 7ccebe6d51e..7a29655e54c 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/README.md +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules` Documentation -The `smartdetectoralertrules` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2019-06-01`). +The `smartdetectoralertrules` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/client.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/client.go index 3f5defb5e53..ae0bd0405a0 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/client.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/client.go @@ -15,7 +15,7 @@ type SmartDetectorAlertRulesClient struct { } func NewSmartDetectorAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SmartDetectorAlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "smartdetectoralertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "smartdetectoralertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SmartDetectorAlertRulesClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/id_smartdetectoralertrule.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/id_smartdetectoralertrule.go index d39c9df3adb..b6671c93c13 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/id_smartdetectoralertrule.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/id_smartdetectoralertrule.go @@ -42,7 +42,7 @@ func ParseSmartDetectorAlertRuleID(input string) (*SmartDetectorAlertRuleId, err } id := SmartDetectorAlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSmartDetectorAlertRuleIDInsensitively(input string) (*SmartDetectorAle } id := SmartDetectorAlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_createorupdate.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_createorupdate.go index 49a2cc868d4..2cf5f2d9bdf 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_createorupdate.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SmartDetectorAlertRulesClient) CreateOrUpdate(ctx context.Context, id Sm var model AlertRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_get.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_get.go index ff395fa0f1b..ec236868c72 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_get.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SmartDetectorAlertRulesClient) Get(ctx context.Context, id SmartDetector var model AlertRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_list.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_list.go index 027aa56cbc2..186bdb98bb0 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_list.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_listbyresourcegroup.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_listbyresourcegroup.go index 5d228dbdd70..29134a5f709 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_listbyresourcegroup.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_patch.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_patch.go index b0b4a6e3658..a013b13b24f 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_patch.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/method_patch.go @@ -49,7 +49,6 @@ func (c SmartDetectorAlertRulesClient) Patch(ctx context.Context, id SmartDetect var model AlertRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/version.go b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/version.go index e31ad90a320..a4eb78c7532 100644 --- a/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/version.go +++ b/resource-manager/alertsmanagement/2019-06-01/smartdetectoralertrules/version.go @@ -1,12 +1,10 @@ package smartdetectoralertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/smartdetectoralertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/smartdetectoralertrules/2019-06-01" } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/README.md b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/README.md index d63c01d5de9..e22f4ab3a93 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/README.md +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules` Documentation -The `alertprocessingrules` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2021-08-08`). +The `alertprocessingrules` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2021-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/client.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/client.go index ba92215a899..ff317e502c3 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/client.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/client.go @@ -15,7 +15,7 @@ type AlertProcessingRulesClient struct { } func NewAlertProcessingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertProcessingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertprocessingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertprocessingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertProcessingRulesClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go index abfb8822d5b..64ef437b15e 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/id_actionrule.go @@ -42,7 +42,7 @@ func ParseActionRuleID(input string) (*ActionRuleId, error) { } id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionRuleIDInsensitively(input string) (*ActionRuleId, error) { } id := ActionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_createorupdate.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_createorupdate.go index da3c8be6c5c..67a1cfbb592 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_createorupdate.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AlertProcessingRulesClient) CreateOrUpdate(ctx context.Context, id Actio var model AlertProcessingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_getbyname.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_getbyname.go index b2387c6d32e..6399bedcf89 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_getbyname.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_getbyname.go @@ -45,7 +45,6 @@ func (c AlertProcessingRulesClient) GetByName(ctx context.Context, id ActionRule var model AlertProcessingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_update.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_update.go index 316b9b903c5..c5526bfbfef 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_update.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/method_update.go @@ -49,7 +49,6 @@ func (c AlertProcessingRulesClient) Update(ctx context.Context, id ActionRuleId, var model AlertProcessingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_action.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_action.go index 34348e362ac..064c1d57620 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_action.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_action.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Action interface { + Action() BaseActionImpl } -// RawActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Action = BaseActionImpl{} + +type BaseActionImpl struct { + ActionType ActionType `json:"actionType"` +} + +func (s BaseActionImpl) Action() BaseActionImpl { + return s +} + +var _ Action = RawActionImpl{} + +// RawActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActionImpl struct { + action BaseActionImpl Type string Values map[string]interface{} } -func unmarshalActionImplementation(input []byte) (Action, error) { +func (s RawActionImpl) Action() BaseActionImpl { + return s.action +} + +func UnmarshalActionImplementation(input []byte) (Action, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalActionImplementation(input []byte) (Action, error) { return out, nil } - out := RawActionImpl{ + var parent BaseActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActionImpl: %+v", err) + } + + return RawActionImpl{ + action: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_addactiongroups.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_addactiongroups.go index d9008275251..47647e74b3a 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_addactiongroups.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_addactiongroups.go @@ -14,6 +14,14 @@ type AddActionGroups struct { ActionGroupIds []string `json:"actionGroupIds"` // Fields inherited from Action + + ActionType ActionType `json:"actionType"` +} + +func (s AddActionGroups) Action() BaseActionImpl { + return BaseActionImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = AddActionGroups{} @@ -27,9 +35,10 @@ func (s AddActionGroups) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddActionGroups: %+v", err) } + decoded["actionType"] = "AddActionGroups" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_alertprocessingruleproperties.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_alertprocessingruleproperties.go index 0d12d31e473..d2a3728dacf 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_alertprocessingruleproperties.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_alertprocessingruleproperties.go @@ -45,7 +45,7 @@ func (s *AlertProcessingRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]Action, 0) for i, val := range listTemp { - impl, err := unmarshalActionImplementation(val) + impl, err := UnmarshalActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AlertProcessingRuleProperties': %+v", i, err) } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_dailyrecurrence.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_dailyrecurrence.go index 78948059a12..4e5a5322d6e 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_dailyrecurrence.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_dailyrecurrence.go @@ -13,8 +13,18 @@ var _ Recurrence = DailyRecurrence{} type DailyRecurrence struct { // Fields inherited from Recurrence - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + RecurrenceType RecurrenceType `json:"recurrenceType"` + StartTime *string `json:"startTime,omitempty"` +} + +func (s DailyRecurrence) Recurrence() BaseRecurrenceImpl { + return BaseRecurrenceImpl{ + EndTime: s.EndTime, + RecurrenceType: s.RecurrenceType, + StartTime: s.StartTime, + } } var _ json.Marshaler = DailyRecurrence{} @@ -28,9 +38,10 @@ func (s DailyRecurrence) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DailyRecurrence: %+v", err) } + decoded["recurrenceType"] = "Daily" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_monthlyrecurrence.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_monthlyrecurrence.go index 6e2384fd767..f26a84438bd 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_monthlyrecurrence.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_monthlyrecurrence.go @@ -14,8 +14,18 @@ type MonthlyRecurrence struct { DaysOfMonth []int64 `json:"daysOfMonth"` // Fields inherited from Recurrence - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + RecurrenceType RecurrenceType `json:"recurrenceType"` + StartTime *string `json:"startTime,omitempty"` +} + +func (s MonthlyRecurrence) Recurrence() BaseRecurrenceImpl { + return BaseRecurrenceImpl{ + EndTime: s.EndTime, + RecurrenceType: s.RecurrenceType, + StartTime: s.StartTime, + } } var _ json.Marshaler = MonthlyRecurrence{} @@ -29,9 +39,10 @@ func (s MonthlyRecurrence) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MonthlyRecurrence: %+v", err) } + decoded["recurrenceType"] = "Monthly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_recurrence.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_recurrence.go index 7dee3512f75..fd4ce218b64 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_recurrence.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_recurrence.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Recurrence interface { + Recurrence() BaseRecurrenceImpl } -// RawRecurrenceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Recurrence = BaseRecurrenceImpl{} + +type BaseRecurrenceImpl struct { + EndTime *string `json:"endTime,omitempty"` + RecurrenceType RecurrenceType `json:"recurrenceType"` + StartTime *string `json:"startTime,omitempty"` +} + +func (s BaseRecurrenceImpl) Recurrence() BaseRecurrenceImpl { + return s +} + +var _ Recurrence = RawRecurrenceImpl{} + +// RawRecurrenceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecurrenceImpl struct { - Type string - Values map[string]interface{} + recurrence BaseRecurrenceImpl + Type string + Values map[string]interface{} +} + +func (s RawRecurrenceImpl) Recurrence() BaseRecurrenceImpl { + return s.recurrence } -func unmarshalRecurrenceImplementation(input []byte) (Recurrence, error) { +func UnmarshalRecurrenceImplementation(input []byte) (Recurrence, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRecurrenceImplementation(input []byte) (Recurrence, error) { return out, nil } - out := RawRecurrenceImpl{ - Type: value, - Values: temp, + var parent BaseRecurrenceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecurrenceImpl: %+v", err) } - return out, nil + + return RawRecurrenceImpl{ + recurrence: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_removeallactiongroups.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_removeallactiongroups.go index f2a0f887dcd..dad3119fca6 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_removeallactiongroups.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_removeallactiongroups.go @@ -13,6 +13,14 @@ var _ Action = RemoveAllActionGroups{} type RemoveAllActionGroups struct { // Fields inherited from Action + + ActionType ActionType `json:"actionType"` +} + +func (s RemoveAllActionGroups) Action() BaseActionImpl { + return BaseActionImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = RemoveAllActionGroups{} @@ -26,9 +34,10 @@ func (s RemoveAllActionGroups) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RemoveAllActionGroups: %+v", err) } + decoded["actionType"] = "RemoveAllActionGroups" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_schedule.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_schedule.go index 8211a970693..faa224c7553 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_schedule.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_schedule.go @@ -41,7 +41,7 @@ func (s *Schedule) UnmarshalJSON(bytes []byte) error { output := make([]Recurrence, 0) for i, val := range listTemp { - impl, err := unmarshalRecurrenceImplementation(val) + impl, err := UnmarshalRecurrenceImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Recurrences' for 'Schedule': %+v", i, err) } diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_weeklyrecurrence.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_weeklyrecurrence.go index 29b12738cba..410e166f3a4 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_weeklyrecurrence.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/model_weeklyrecurrence.go @@ -14,8 +14,18 @@ type WeeklyRecurrence struct { DaysOfWeek []DaysOfWeek `json:"daysOfWeek"` // Fields inherited from Recurrence - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + RecurrenceType RecurrenceType `json:"recurrenceType"` + StartTime *string `json:"startTime,omitempty"` +} + +func (s WeeklyRecurrence) Recurrence() BaseRecurrenceImpl { + return BaseRecurrenceImpl{ + EndTime: s.EndTime, + RecurrenceType: s.RecurrenceType, + StartTime: s.StartTime, + } } var _ json.Marshaler = WeeklyRecurrence{} @@ -29,9 +39,10 @@ func (s WeeklyRecurrence) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WeeklyRecurrence: %+v", err) } + decoded["recurrenceType"] = "Weekly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/version.go b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/version.go index 8aff94df2a0..761812e1081 100644 --- a/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/version.go +++ b/resource-manager/alertsmanagement/2021-08-08/alertprocessingrules/version.go @@ -1,12 +1,10 @@ package alertprocessingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertprocessingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertprocessingrules/2021-08-08" } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/README.md b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/README.md index a39447e95d3..3f34ffaa239 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/README.md +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups` Documentation -The `prometheusrulegroups` SDK allows for interaction with the Azure Resource Manager Service `alertsmanagement` (API Version `2023-03-01`). +The `prometheusrulegroups` SDK allows for interaction with Azure Resource Manager `alertsmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/client.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/client.go index 32bd22115f7..e2bf6cd5d15 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/client.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/client.go @@ -15,7 +15,7 @@ type PrometheusRuleGroupsClient struct { } func NewPrometheusRuleGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrometheusRuleGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prometheusrulegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prometheusrulegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrometheusRuleGroupsClient: %+v", err) } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go index 7130dbb6179..5027bf80354 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/id_prometheusrulegroup.go @@ -42,7 +42,7 @@ func ParsePrometheusRuleGroupID(input string) (*PrometheusRuleGroupId, error) { } id := PrometheusRuleGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrometheusRuleGroupIDInsensitively(input string) (*PrometheusRuleGroup } id := PrometheusRuleGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_createorupdate.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_createorupdate.go index b9041f5e033..3f75430a90a 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_createorupdate.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrometheusRuleGroupsClient) CreateOrUpdate(ctx context.Context, id Prome var model PrometheusRuleGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_get.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_get.go index 9a427b3b14b..80307abd1d0 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_get.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_get.go @@ -45,7 +45,6 @@ func (c PrometheusRuleGroupsClient) Get(ctx context.Context, id PrometheusRuleGr var model PrometheusRuleGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbyresourcegroup.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbyresourcegroup.go index 24be46d23d3..2e610588536 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbyresourcegroup.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c PrometheusRuleGroupsClient) ListByResourceGroup(ctx context.Context, id var model PrometheusRuleGroupResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbysubscription.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbysubscription.go index 4fb170cc902..66ecd91d992 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbysubscription.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c PrometheusRuleGroupsClient) ListBySubscription(ctx context.Context, id c var model PrometheusRuleGroupResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_update.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_update.go index 4c98a5d6e6f..4fff98f505c 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_update.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/method_update.go @@ -49,7 +49,6 @@ func (c PrometheusRuleGroupsClient) Update(ctx context.Context, id PrometheusRul var model PrometheusRuleGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/version.go b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/version.go index 4ab30b94fb4..024cb95e5f2 100644 --- a/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/version.go +++ b/resource-manager/alertsmanagement/2023-03-01/prometheusrulegroups/version.go @@ -1,12 +1,10 @@ package prometheusrulegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prometheusrulegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prometheusrulegroups/2023-03-01" } diff --git a/resource-manager/analysisservices/2017-08-01/analysisservices/README.md b/resource-manager/analysisservices/2017-08-01/analysisservices/README.md index 89088722e29..6dad4510bc8 100644 --- a/resource-manager/analysisservices/2017-08-01/analysisservices/README.md +++ b/resource-manager/analysisservices/2017-08-01/analysisservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/analysisservices` Documentation -The `analysisservices` SDK allows for interaction with the Azure Resource Manager Service `analysisservices` (API Version `2017-08-01`). +The `analysisservices` SDK allows for interaction with Azure Resource Manager `analysisservices` (API Version `2017-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/analysisservices/2017-08-01/analysisservices/client.go b/resource-manager/analysisservices/2017-08-01/analysisservices/client.go index fd87d664a2b..5cd8b65b6d8 100644 --- a/resource-manager/analysisservices/2017-08-01/analysisservices/client.go +++ b/resource-manager/analysisservices/2017-08-01/analysisservices/client.go @@ -15,7 +15,7 @@ type AnalysisServicesClient struct { } func NewAnalysisServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*AnalysisServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "analysisservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "analysisservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AnalysisServicesClient: %+v", err) } diff --git a/resource-manager/analysisservices/2017-08-01/analysisservices/method_serverslistskusfornew.go b/resource-manager/analysisservices/2017-08-01/analysisservices/method_serverslistskusfornew.go index 06c8e58c94d..ffed315978f 100644 --- a/resource-manager/analysisservices/2017-08-01/analysisservices/method_serverslistskusfornew.go +++ b/resource-manager/analysisservices/2017-08-01/analysisservices/method_serverslistskusfornew.go @@ -47,7 +47,6 @@ func (c AnalysisServicesClient) ServersListSkusForNew(ctx context.Context, id co var model SkuEnumerationForNewResourceResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/analysisservices/version.go b/resource-manager/analysisservices/2017-08-01/analysisservices/version.go index 36f54e105bf..73b67004d91 100644 --- a/resource-manager/analysisservices/2017-08-01/analysisservices/version.go +++ b/resource-manager/analysisservices/2017-08-01/analysisservices/version.go @@ -1,12 +1,10 @@ package analysisservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/analysisservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/analysisservices/2017-08-01" } diff --git a/resource-manager/analysisservices/2017-08-01/servers/README.md b/resource-manager/analysisservices/2017-08-01/servers/README.md index 20cff878739..8d1b4fda62f 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/README.md +++ b/resource-manager/analysisservices/2017-08-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/analysisservices/2017-08-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `analysisservices` (API Version `2017-08-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `analysisservices` (API Version `2017-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/analysisservices/2017-08-01/servers/client.go b/resource-manager/analysisservices/2017-08-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/client.go +++ b/resource-manager/analysisservices/2017-08-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/analysisservices/2017-08-01/servers/id_location.go b/resource-manager/analysisservices/2017-08-01/servers/id_location.go index b61b68dcc22..771f22b2552 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/id_location.go +++ b/resource-manager/analysisservices/2017-08-01/servers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/analysisservices/2017-08-01/servers/id_server.go b/resource-manager/analysisservices/2017-08-01/servers/id_server.go index 034466f21d2..b0c39b37709 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/id_server.go +++ b/resource-manager/analysisservices/2017-08-01/servers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability.go b/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability.go index 8d952b2e0b1..aedf5364e28 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c ServersClient) CheckNameAvailability(ctx context.Context, id LocationId, var model CheckServerNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_getdetails.go b/resource-manager/analysisservices/2017-08-01/servers/method_getdetails.go index 856d9234053..bb7dd821142 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_getdetails.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_getdetails.go @@ -45,7 +45,6 @@ func (c ServersClient) GetDetails(ctx context.Context, id ServerId) (result GetD var model AnalysisServicesServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_list.go b/resource-manager/analysisservices/2017-08-01/servers/method_list.go index 4e7f67ec23d..1860d210da1 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_list.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_list.go @@ -47,7 +47,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r var model AnalysisServicesServers result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup.go b/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup.go index 04885cde544..da8f9bf9ef4 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res var model AnalysisServicesServers result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus.go b/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus.go index 646d23202ec..130bce90663 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_listgatewaystatus.go @@ -46,7 +46,6 @@ func (c ServersClient) ListGatewayStatus(ctx context.Context, id ServerId) (resu var model GatewayListStatusLive result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting.go b/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting.go index d6f6e761368..42bf74d40b1 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting.go +++ b/resource-manager/analysisservices/2017-08-01/servers/method_listskusforexisting.go @@ -46,7 +46,6 @@ func (c ServersClient) ListSkusForExisting(ctx context.Context, id ServerId) (re var model SkuEnumerationForExistingResourceResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/analysisservices/2017-08-01/servers/version.go b/resource-manager/analysisservices/2017-08-01/servers/version.go index 3219554646f..6929b9cad87 100644 --- a/resource-manager/analysisservices/2017-08-01/servers/version.go +++ b/resource-manager/analysisservices/2017-08-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2017-08-01" } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/README.md b/resource-manager/apicenter/2024-03-01/apidefinitions/README.md index 57bce3feb41..bacd9ee8082 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/README.md +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/apidefinitions` Documentation -The `apidefinitions` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `apidefinitions` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/client.go b/resource-manager/apicenter/2024-03-01/apidefinitions/client.go index d8a240b8ad4..91076e5faf3 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/client.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/client.go @@ -15,7 +15,7 @@ type ApiDefinitionsClient struct { } func NewApiDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDefinitionsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/id_definition.go b/resource-manager/apicenter/2024-03-01/apidefinitions/id_definition.go index 22ee299cfd1..194e244aa34 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/id_definition.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/id_definition.go @@ -50,7 +50,7 @@ func ParseDefinitionID(input string) (*DefinitionId, error) { } id := DefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseDefinitionIDInsensitively(input string) (*DefinitionId, error) { } id := DefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/id_version.go b/resource-manager/apicenter/2024-03-01/apidefinitions/id_version.go index 314eb13a620..c4699aa9bb0 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/id_version.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/apidefinitions/method_createorupdate.go index 586a55889b6..1e4bacec03d 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApiDefinitionsClient) CreateOrUpdate(ctx context.Context, id DefinitionI var model ApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/method_get.go b/resource-manager/apicenter/2024-03-01/apidefinitions/method_get.go index b300f531ad3..cbfa93fbd8f 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/method_get.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ApiDefinitionsClient) Get(ctx context.Context, id DefinitionId) (result var model ApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/method_list.go b/resource-manager/apicenter/2024-03-01/apidefinitions/method_list.go index bcea1d75f90..c114f7417fe 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/method_list.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/apidefinitions/version.go b/resource-manager/apicenter/2024-03-01/apidefinitions/version.go index 6ad0c6c8efd..0f104300242 100644 --- a/resource-manager/apicenter/2024-03-01/apidefinitions/version.go +++ b/resource-manager/apicenter/2024-03-01/apidefinitions/version.go @@ -1,12 +1,10 @@ package apidefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidefinitions/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/apis/README.md b/resource-manager/apicenter/2024-03-01/apis/README.md index 6b42786861b..38b55217ad1 100644 --- a/resource-manager/apicenter/2024-03-01/apis/README.md +++ b/resource-manager/apicenter/2024-03-01/apis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/apis` Documentation -The `apis` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `apis` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/apis/client.go b/resource-manager/apicenter/2024-03-01/apis/client.go index 9bdd8294aa8..6dc1fb14e5d 100644 --- a/resource-manager/apicenter/2024-03-01/apis/client.go +++ b/resource-manager/apicenter/2024-03-01/apis/client.go @@ -15,7 +15,7 @@ type ApisClient struct { } func NewApisClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/apis/id_api.go b/resource-manager/apicenter/2024-03-01/apis/id_api.go index 2f76d37e64e..2cee461976f 100644 --- a/resource-manager/apicenter/2024-03-01/apis/id_api.go +++ b/resource-manager/apicenter/2024-03-01/apis/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apis/id_workspace.go b/resource-manager/apicenter/2024-03-01/apis/id_workspace.go index 29140019226..bff23ba6937 100644 --- a/resource-manager/apicenter/2024-03-01/apis/id_workspace.go +++ b/resource-manager/apicenter/2024-03-01/apis/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apis/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/apis/method_createorupdate.go index 1c74b4cf0c1..783a81c25ad 100644 --- a/resource-manager/apicenter/2024-03-01/apis/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/apis/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApisClient) CreateOrUpdate(ctx context.Context, id ApiId, input Api) (re var model Api result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apis/method_get.go b/resource-manager/apicenter/2024-03-01/apis/method_get.go index c90a9c83e3b..18a787218d7 100644 --- a/resource-manager/apicenter/2024-03-01/apis/method_get.go +++ b/resource-manager/apicenter/2024-03-01/apis/method_get.go @@ -45,7 +45,6 @@ func (c ApisClient) Get(ctx context.Context, id ApiId) (result GetOperationRespo var model Api result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apis/method_list.go b/resource-manager/apicenter/2024-03-01/apis/method_list.go index bade561b38a..f1c8f982807 100644 --- a/resource-manager/apicenter/2024-03-01/apis/method_list.go +++ b/resource-manager/apicenter/2024-03-01/apis/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/apis/version.go b/resource-manager/apicenter/2024-03-01/apis/version.go index 949631e1f9c..6fdf87274e7 100644 --- a/resource-manager/apicenter/2024-03-01/apis/version.go +++ b/resource-manager/apicenter/2024-03-01/apis/version.go @@ -1,12 +1,10 @@ package apis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apis/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/README.md b/resource-manager/apicenter/2024-03-01/apiversions/README.md index 85cd502f434..0d069ef913d 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/README.md +++ b/resource-manager/apicenter/2024-03-01/apiversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/apiversions` Documentation -The `apiversions` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `apiversions` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/apiversions/client.go b/resource-manager/apicenter/2024-03-01/apiversions/client.go index c9886fea72a..a66f5b9a67a 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/client.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/client.go @@ -15,7 +15,7 @@ type ApiVersionsClient struct { } func NewApiVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/id_api.go b/resource-manager/apicenter/2024-03-01/apiversions/id_api.go index d8f0e7af665..aee6e1fb5f3 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/id_api.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/id_version.go b/resource-manager/apicenter/2024-03-01/apiversions/id_version.go index 07ead6b97c8..428204936f7 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/id_version.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/apiversions/method_createorupdate.go index 2afeeb5f673..d8cbbc18eed 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApiVersionsClient) CreateOrUpdate(ctx context.Context, id VersionId, inp var model ApiVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/method_get.go b/resource-manager/apicenter/2024-03-01/apiversions/method_get.go index 3820bd08e50..2e1ab382628 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/method_get.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionsClient) Get(ctx context.Context, id VersionId) (result GetOpe var model ApiVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/method_list.go b/resource-manager/apicenter/2024-03-01/apiversions/method_list.go index 84ba661d4f0..1c10a170a51 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/method_list.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/apiversions/version.go b/resource-manager/apicenter/2024-03-01/apiversions/version.go index 5445c8a1f7c..de5c8ac9241 100644 --- a/resource-manager/apicenter/2024-03-01/apiversions/version.go +++ b/resource-manager/apicenter/2024-03-01/apiversions/version.go @@ -1,12 +1,10 @@ package apiversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversions/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/deployments/README.md b/resource-manager/apicenter/2024-03-01/deployments/README.md index 5139317cef6..e275cb16058 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/README.md +++ b/resource-manager/apicenter/2024-03-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/deployments/client.go b/resource-manager/apicenter/2024-03-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/client.go +++ b/resource-manager/apicenter/2024-03-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/deployments/id_api.go b/resource-manager/apicenter/2024-03-01/deployments/id_api.go index 40c4872f45b..dfffacd2581 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/id_api.go +++ b/resource-manager/apicenter/2024-03-01/deployments/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/deployments/id_deployment.go b/resource-manager/apicenter/2024-03-01/deployments/id_deployment.go index f8c6811759d..59ae0fe486d 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/id_deployment.go +++ b/resource-manager/apicenter/2024-03-01/deployments/id_deployment.go @@ -48,7 +48,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/deployments/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/deployments/method_createorupdate.go index 3378365eba0..e8b3130c02a 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/deployments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DeploymentsClient) CreateOrUpdate(ctx context.Context, id DeploymentId, var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/deployments/method_get.go b/resource-manager/apicenter/2024-03-01/deployments/method_get.go index 957621b4fb1..4e7a125be9e 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/method_get.go +++ b/resource-manager/apicenter/2024-03-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id DeploymentId) (result Get var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/deployments/method_list.go b/resource-manager/apicenter/2024-03-01/deployments/method_list.go index 0132a88edaf..f8ae74bdd17 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/method_list.go +++ b/resource-manager/apicenter/2024-03-01/deployments/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/deployments/version.go b/resource-manager/apicenter/2024-03-01/deployments/version.go index c12e31dd21b..2107c0ccb08 100644 --- a/resource-manager/apicenter/2024-03-01/deployments/version.go +++ b/resource-manager/apicenter/2024-03-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/environments/README.md b/resource-manager/apicenter/2024-03-01/environments/README.md index 64cfcb794fe..37bf3569b10 100644 --- a/resource-manager/apicenter/2024-03-01/environments/README.md +++ b/resource-manager/apicenter/2024-03-01/environments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/environments` Documentation -The `environments` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `environments` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/environments/client.go b/resource-manager/apicenter/2024-03-01/environments/client.go index 89a5b84aa90..eafef1a1e95 100644 --- a/resource-manager/apicenter/2024-03-01/environments/client.go +++ b/resource-manager/apicenter/2024-03-01/environments/client.go @@ -15,7 +15,7 @@ type EnvironmentsClient struct { } func NewEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/environments/id_environment.go b/resource-manager/apicenter/2024-03-01/environments/id_environment.go index 2ac3a251a66..89c0f8187ed 100644 --- a/resource-manager/apicenter/2024-03-01/environments/id_environment.go +++ b/resource-manager/apicenter/2024-03-01/environments/id_environment.go @@ -46,7 +46,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/environments/id_workspace.go b/resource-manager/apicenter/2024-03-01/environments/id_workspace.go index 19054764ca6..88feca99132 100644 --- a/resource-manager/apicenter/2024-03-01/environments/id_workspace.go +++ b/resource-manager/apicenter/2024-03-01/environments/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/environments/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/environments/method_createorupdate.go index 18e7411f45a..ddd56aa2b29 100644 --- a/resource-manager/apicenter/2024-03-01/environments/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/environments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentsClient) CreateOrUpdate(ctx context.Context, id EnvironmentId var model Environment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/environments/method_get.go b/resource-manager/apicenter/2024-03-01/environments/method_get.go index f7cd39cf61a..bb1f91b8eac 100644 --- a/resource-manager/apicenter/2024-03-01/environments/method_get.go +++ b/resource-manager/apicenter/2024-03-01/environments/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId) (result G var model Environment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/environments/method_list.go b/resource-manager/apicenter/2024-03-01/environments/method_list.go index 3e4f0d42d16..202588e30a5 100644 --- a/resource-manager/apicenter/2024-03-01/environments/method_list.go +++ b/resource-manager/apicenter/2024-03-01/environments/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/environments/version.go b/resource-manager/apicenter/2024-03-01/environments/version.go index 07c52041f87..e2b873e7f59 100644 --- a/resource-manager/apicenter/2024-03-01/environments/version.go +++ b/resource-manager/apicenter/2024-03-01/environments/version.go @@ -1,12 +1,10 @@ package environments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environments/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/README.md b/resource-manager/apicenter/2024-03-01/metadataschemas/README.md index 8050672b14e..98119164869 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/README.md +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/metadataschemas` Documentation -The `metadataschemas` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `metadataschemas` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/client.go b/resource-manager/apicenter/2024-03-01/metadataschemas/client.go index 88f71fb69af..a0b2961a4f2 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/client.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/client.go @@ -15,7 +15,7 @@ type MetadataSchemasClient struct { } func NewMetadataSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadataschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadataschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataSchemasClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/id_metadataschema.go b/resource-manager/apicenter/2024-03-01/metadataschemas/id_metadataschema.go index 3c36f4ca0c0..2f62d3f3b5f 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/id_metadataschema.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/id_metadataschema.go @@ -44,7 +44,7 @@ func ParseMetadataSchemaID(input string) (*MetadataSchemaId, error) { } id := MetadataSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataSchemaIDInsensitively(input string) (*MetadataSchemaId, error) } id := MetadataSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/id_service.go b/resource-manager/apicenter/2024-03-01/metadataschemas/id_service.go index bc7bcae0fbe..e1595eb5a3f 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/id_service.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/metadataschemas/method_createorupdate.go index cad5dfd358a..f2e09bab879 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MetadataSchemasClient) CreateOrUpdate(ctx context.Context, id MetadataSc var model MetadataSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/method_get.go b/resource-manager/apicenter/2024-03-01/metadataschemas/method_get.go index 6a928336fbf..c519950d5ee 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/method_get.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/method_get.go @@ -45,7 +45,6 @@ func (c MetadataSchemasClient) Get(ctx context.Context, id MetadataSchemaId) (re var model MetadataSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/method_list.go b/resource-manager/apicenter/2024-03-01/metadataschemas/method_list.go index 1b1d8123589..09eaaa28e33 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/method_list.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/metadataschemas/version.go b/resource-manager/apicenter/2024-03-01/metadataschemas/version.go index a4de916a77d..24de6966948 100644 --- a/resource-manager/apicenter/2024-03-01/metadataschemas/version.go +++ b/resource-manager/apicenter/2024-03-01/metadataschemas/version.go @@ -1,12 +1,10 @@ package metadataschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadataschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadataschemas/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/services/README.md b/resource-manager/apicenter/2024-03-01/services/README.md index 33536920892..5f2b1019095 100644 --- a/resource-manager/apicenter/2024-03-01/services/README.md +++ b/resource-manager/apicenter/2024-03-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `services` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/services/client.go b/resource-manager/apicenter/2024-03-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/apicenter/2024-03-01/services/client.go +++ b/resource-manager/apicenter/2024-03-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/services/id_service.go b/resource-manager/apicenter/2024-03-01/services/id_service.go index d6f9008ff0a..940e683f6b2 100644 --- a/resource-manager/apicenter/2024-03-01/services/id_service.go +++ b/resource-manager/apicenter/2024-03-01/services/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/services/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/services/method_createorupdate.go index c336e79c9f2..b1fb201ae92 100644 --- a/resource-manager/apicenter/2024-03-01/services/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/services/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ServicesClient) CreateOrUpdate(ctx context.Context, id ServiceId, input var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/services/method_get.go b/resource-manager/apicenter/2024-03-01/services/method_get.go index 39d5b82a46f..31bbb903313 100644 --- a/resource-manager/apicenter/2024-03-01/services/method_get.go +++ b/resource-manager/apicenter/2024-03-01/services/method_get.go @@ -45,7 +45,6 @@ func (c ServicesClient) Get(ctx context.Context, id ServiceId) (result GetOperat var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/services/method_update.go b/resource-manager/apicenter/2024-03-01/services/method_update.go index 20d4b75a007..d88cb70f452 100644 --- a/resource-manager/apicenter/2024-03-01/services/method_update.go +++ b/resource-manager/apicenter/2024-03-01/services/method_update.go @@ -49,7 +49,6 @@ func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceU var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/services/version.go b/resource-manager/apicenter/2024-03-01/services/version.go index db346ef53fb..7af18b19765 100644 --- a/resource-manager/apicenter/2024-03-01/services/version.go +++ b/resource-manager/apicenter/2024-03-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/README.md b/resource-manager/apicenter/2024-03-01/workspaces/README.md index 24abd80fba1..e157fa404d1 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/README.md +++ b/resource-manager/apicenter/2024-03-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-01/workspaces/client.go b/resource-manager/apicenter/2024-03-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/client.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/id_service.go b/resource-manager/apicenter/2024-03-01/workspaces/id_service.go index 23551542664..5cbc96c546d 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/id_service.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/id_workspace.go b/resource-manager/apicenter/2024-03-01/workspaces/id_workspace.go index 016cbea8b6b..1ce5ffb83f1 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/id_workspace.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/method_createorupdate.go b/resource-manager/apicenter/2024-03-01/workspaces/method_createorupdate.go index 2ad9d204535..35d2c420917 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkspacesClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, in var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/method_get.go b/resource-manager/apicenter/2024-03-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/method_get.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/method_list.go b/resource-manager/apicenter/2024-03-01/workspaces/method_list.go index a4ecc417bb3..cc1af7c9e82 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/method_list.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-01/workspaces/version.go b/resource-manager/apicenter/2024-03-01/workspaces/version.go index 160749d2032..fa33a3959ff 100644 --- a/resource-manager/apicenter/2024-03-01/workspaces/version.go +++ b/resource-manager/apicenter/2024-03-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-03-01" } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/README.md b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/README.md index d91e0973929..6e3ea3539fd 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/apidefinitions` Documentation -The `apidefinitions` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `apidefinitions` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/client.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/client.go index d8a240b8ad4..91076e5faf3 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/client.go @@ -15,7 +15,7 @@ type ApiDefinitionsClient struct { } func NewApiDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDefinitionsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_definition.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_definition.go index 22ee299cfd1..194e244aa34 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_definition.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_definition.go @@ -50,7 +50,7 @@ func ParseDefinitionID(input string) (*DefinitionId, error) { } id := DefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseDefinitionIDInsensitively(input string) (*DefinitionId, error) { } id := DefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_version.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_version.go index 314eb13a620..c4699aa9bb0 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_version.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_createorupdate.go index 586a55889b6..1e4bacec03d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApiDefinitionsClient) CreateOrUpdate(ctx context.Context, id DefinitionI var model ApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_get.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_get.go index b300f531ad3..cbfa93fbd8f 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ApiDefinitionsClient) Get(ctx context.Context, id DefinitionId) (result var model ApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_list.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_list.go index bcea1d75f90..c114f7417fe 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/version.go b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/version.go index ea877e4f248..9f5bc00cea2 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apidefinitions/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/apidefinitions/version.go @@ -1,12 +1,10 @@ package apidefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidefinitions/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/README.md b/resource-manager/apicenter/2024-03-15-preview/apis/README.md index b8dcb594040..ab25773f186 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/apis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/apis` Documentation -The `apis` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `apis` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/client.go b/resource-manager/apicenter/2024-03-15-preview/apis/client.go index 9bdd8294aa8..6dc1fb14e5d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/client.go @@ -15,7 +15,7 @@ type ApisClient struct { } func NewApisClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/id_api.go b/resource-manager/apicenter/2024-03-15-preview/apis/id_api.go index 2f76d37e64e..2cee461976f 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/id_api.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/id_workspace.go b/resource-manager/apicenter/2024-03-15-preview/apis/id_workspace.go index 29140019226..bff23ba6937 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/id_workspace.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/apis/method_createorupdate.go index 1c74b4cf0c1..783a81c25ad 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApisClient) CreateOrUpdate(ctx context.Context, id ApiId, input Api) (re var model Api result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/method_get.go b/resource-manager/apicenter/2024-03-15-preview/apis/method_get.go index c90a9c83e3b..18a787218d7 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/method_get.go @@ -45,7 +45,6 @@ func (c ApisClient) Get(ctx context.Context, id ApiId) (result GetOperationRespo var model Api result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/method_list.go b/resource-manager/apicenter/2024-03-15-preview/apis/method_list.go index bade561b38a..f1c8f982807 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/apis/version.go b/resource-manager/apicenter/2024-03-15-preview/apis/version.go index cd1bda04ed8..269624a64ac 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apis/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/apis/version.go @@ -1,12 +1,10 @@ package apis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apis/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/README.md b/resource-manager/apicenter/2024-03-15-preview/apiversions/README.md index b7031b5ccc2..2f5c1c41500 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/apiversions` Documentation -The `apiversions` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `apiversions` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/client.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/client.go index c9886fea72a..a66f5b9a67a 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/client.go @@ -15,7 +15,7 @@ type ApiVersionsClient struct { } func NewApiVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/id_api.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/id_api.go index d8f0e7af665..aee6e1fb5f3 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/id_api.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/id_version.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/id_version.go index 07ead6b97c8..428204936f7 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/id_version.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_createorupdate.go index 2afeeb5f673..d8cbbc18eed 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApiVersionsClient) CreateOrUpdate(ctx context.Context, id VersionId, inp var model ApiVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_get.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_get.go index 3820bd08e50..2e1ab382628 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionsClient) Get(ctx context.Context, id VersionId) (result GetOpe var model ApiVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_list.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_list.go index 84ba661d4f0..1c10a170a51 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/apiversions/version.go b/resource-manager/apicenter/2024-03-15-preview/apiversions/version.go index e8875a976e4..5612794562c 100644 --- a/resource-manager/apicenter/2024-03-15-preview/apiversions/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/apiversions/version.go @@ -1,12 +1,10 @@ package apiversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversions/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/README.md b/resource-manager/apicenter/2024-03-15-preview/deletedservices/README.md index 54ca196dd4b..ea3fede67b4 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/deletedservices` Documentation -The `deletedservices` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `deletedservices` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/client.go b/resource-manager/apicenter/2024-03-15-preview/deletedservices/client.go index 2618da09c8e..537a07ab9ca 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/client.go @@ -15,7 +15,7 @@ type DeletedServicesClient struct { } func NewDeletedServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServicesClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/id_deletedservice.go b/resource-manager/apicenter/2024-03-15-preview/deletedservices/id_deletedservice.go index f2402f605e0..f938a385add 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/id_deletedservice.go +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/id_deletedservice.go @@ -42,7 +42,7 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_get.go b/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_get.go index 2e6e043bfe2..a95a46e7451 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_get.go @@ -45,7 +45,6 @@ func (c DeletedServicesClient) Get(ctx context.Context, id DeletedServiceId) (re var model DeletedService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_list.go b/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_list.go index 4b5a0e1c37b..11b54295d5d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/deletedservices/version.go b/resource-manager/apicenter/2024-03-15-preview/deletedservices/version.go index 23e6aee14e2..ef5046e4ff3 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deletedservices/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/deletedservices/version.go @@ -1,12 +1,10 @@ package deletedservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservices/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/README.md b/resource-manager/apicenter/2024-03-15-preview/deployments/README.md index c0679b8c68c..e11b98336d9 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `deployments` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/client.go b/resource-manager/apicenter/2024-03-15-preview/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/id_api.go b/resource-manager/apicenter/2024-03-15-preview/deployments/id_api.go index 40c4872f45b..dfffacd2581 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/id_api.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/id_api.go @@ -46,7 +46,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/id_deployment.go b/resource-manager/apicenter/2024-03-15-preview/deployments/id_deployment.go index f8c6811759d..59ae0fe486d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/id_deployment.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/id_deployment.go @@ -48,7 +48,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/deployments/method_createorupdate.go index 3378365eba0..e8b3130c02a 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DeploymentsClient) CreateOrUpdate(ctx context.Context, id DeploymentId, var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/method_get.go b/resource-manager/apicenter/2024-03-15-preview/deployments/method_get.go index 957621b4fb1..4e7a125be9e 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id DeploymentId) (result Get var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/method_list.go b/resource-manager/apicenter/2024-03-15-preview/deployments/method_list.go index 0132a88edaf..f8ae74bdd17 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/deployments/version.go b/resource-manager/apicenter/2024-03-15-preview/deployments/version.go index 9a879e86299..c52de4e77cf 100644 --- a/resource-manager/apicenter/2024-03-15-preview/deployments/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/README.md b/resource-manager/apicenter/2024-03-15-preview/environments/README.md index 6734e5bac9d..2153cd3e4ce 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/environments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/environments` Documentation -The `environments` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `environments` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/client.go b/resource-manager/apicenter/2024-03-15-preview/environments/client.go index 89a5b84aa90..eafef1a1e95 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/client.go @@ -15,7 +15,7 @@ type EnvironmentsClient struct { } func NewEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentsClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/id_environment.go b/resource-manager/apicenter/2024-03-15-preview/environments/id_environment.go index 2ac3a251a66..89c0f8187ed 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/id_environment.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/id_environment.go @@ -46,7 +46,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/id_workspace.go b/resource-manager/apicenter/2024-03-15-preview/environments/id_workspace.go index 19054764ca6..88feca99132 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/id_workspace.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/environments/method_createorupdate.go index 18e7411f45a..ddd56aa2b29 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentsClient) CreateOrUpdate(ctx context.Context, id EnvironmentId var model Environment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/method_get.go b/resource-manager/apicenter/2024-03-15-preview/environments/method_get.go index f7cd39cf61a..bb1f91b8eac 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId) (result G var model Environment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/method_list.go b/resource-manager/apicenter/2024-03-15-preview/environments/method_list.go index 3e4f0d42d16..202588e30a5 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/environments/version.go b/resource-manager/apicenter/2024-03-15-preview/environments/version.go index 1e79ef528e0..d1d85093f35 100644 --- a/resource-manager/apicenter/2024-03-15-preview/environments/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/environments/version.go @@ -1,12 +1,10 @@ package environments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environments/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/README.md b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/README.md index cdb0ab5713b..88ef9b2190f 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/metadataschemas` Documentation -The `metadataschemas` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `metadataschemas` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/client.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/client.go index 88f71fb69af..a0b2961a4f2 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/client.go @@ -15,7 +15,7 @@ type MetadataSchemasClient struct { } func NewMetadataSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadataschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadataschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataSchemasClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_metadataschema.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_metadataschema.go index 3c36f4ca0c0..2f62d3f3b5f 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_metadataschema.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_metadataschema.go @@ -44,7 +44,7 @@ func ParseMetadataSchemaID(input string) (*MetadataSchemaId, error) { } id := MetadataSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataSchemaIDInsensitively(input string) (*MetadataSchemaId, error) } id := MetadataSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_service.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_service.go index bc7bcae0fbe..e1595eb5a3f 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_service.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_createorupdate.go index cad5dfd358a..f2e09bab879 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MetadataSchemasClient) CreateOrUpdate(ctx context.Context, id MetadataSc var model MetadataSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_get.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_get.go index 6a928336fbf..c519950d5ee 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_get.go @@ -45,7 +45,6 @@ func (c MetadataSchemasClient) Get(ctx context.Context, id MetadataSchemaId) (re var model MetadataSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_list.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_list.go index 1b1d8123589..09eaaa28e33 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/version.go b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/version.go index c96644dca46..7d0707414b8 100644 --- a/resource-manager/apicenter/2024-03-15-preview/metadataschemas/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/metadataschemas/version.go @@ -1,12 +1,10 @@ package metadataschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadataschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadataschemas/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/README.md b/resource-manager/apicenter/2024-03-15-preview/services/README.md index c003ca2c809..cac7b743c15 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `services` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/services/client.go b/resource-manager/apicenter/2024-03-15-preview/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/id_service.go b/resource-manager/apicenter/2024-03-15-preview/services/id_service.go index d6f9008ff0a..940e683f6b2 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/id_service.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/services/method_createorupdate.go index c336e79c9f2..b1fb201ae92 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ServicesClient) CreateOrUpdate(ctx context.Context, id ServiceId, input var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/method_get.go b/resource-manager/apicenter/2024-03-15-preview/services/method_get.go index 39d5b82a46f..31bbb903313 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/method_get.go @@ -45,7 +45,6 @@ func (c ServicesClient) Get(ctx context.Context, id ServiceId) (result GetOperat var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/method_update.go b/resource-manager/apicenter/2024-03-15-preview/services/method_update.go index 20d4b75a007..d88cb70f452 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/method_update.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/method_update.go @@ -49,7 +49,6 @@ func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceU var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/services/version.go b/resource-manager/apicenter/2024-03-15-preview/services/version.go index 3c7bc9bd6f5..590c85eb64d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/services/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-03-15-preview" } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/README.md b/resource-manager/apicenter/2024-03-15-preview/workspaces/README.md index e471d1b3f73..781546476e5 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/README.md +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `apicenter` (API Version `2024-03-15-preview`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `apicenter` (API Version `2024-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/client.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/client.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/id_service.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/id_service.go index 23551542664..5cbc96c546d 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/id_service.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/id_workspace.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/id_workspace.go index 016cbea8b6b..1ce5ffb83f1 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/id_workspace.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_createorupdate.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_createorupdate.go index 2ad9d204535..35d2c420917 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_createorupdate.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkspacesClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, in var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_get.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_get.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_list.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_list.go index a4ecc417bb3..cc1af7c9e82 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/method_list.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apicenter/2024-03-15-preview/workspaces/version.go b/resource-manager/apicenter/2024-03-15-preview/workspaces/version.go index e1beaf8e3e8..75d16aaa653 100644 --- a/resource-manager/apicenter/2024-03-15-preview/workspaces/version.go +++ b/resource-manager/apicenter/2024-03-15-preview/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-03-15-preview" } diff --git a/resource-manager/apimanagement/2022-08-01/api/README.md b/resource-manager/apimanagement/2022-08-01/api/README.md index 010a0a81e00..f4e54b74e78 100644 --- a/resource-manager/apimanagement/2022-08-01/api/README.md +++ b/resource-manager/apimanagement/2022-08-01/api/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/api` Documentation -The `api` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `api` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/api/client.go b/resource-manager/apimanagement/2022-08-01/api/client.go index 5ce28196132..2f776384d61 100644 --- a/resource-manager/apimanagement/2022-08-01/api/client.go +++ b/resource-manager/apimanagement/2022-08-01/api/client.go @@ -15,7 +15,7 @@ type ApiClient struct { } func NewApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/api/id_api.go b/resource-manager/apimanagement/2022-08-01/api/id_api.go index a70d7f5620c..ac1a5275add 100644 --- a/resource-manager/apimanagement/2022-08-01/api/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/api/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/api/id_service.go b/resource-manager/apimanagement/2022-08-01/api/id_service.go index c50464ed710..2671c279deb 100644 --- a/resource-manager/apimanagement/2022-08-01/api/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/api/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/api/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/api/method_createorupdate.go index af3e5430ecf..d698167d31e 100644 --- a/resource-manager/apimanagement/2022-08-01/api/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/api/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/api/method_delete.go b/resource-manager/apimanagement/2022-08-01/api/method_delete.go index fbc43278f3b..82b9ac90560 100644 --- a/resource-manager/apimanagement/2022-08-01/api/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/api/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/api/method_get.go b/resource-manager/apimanagement/2022-08-01/api/method_get.go index 07f671ef642..0b768d34293 100644 --- a/resource-manager/apimanagement/2022-08-01/api/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/api/method_get.go @@ -45,7 +45,6 @@ func (c ApiClient) Get(ctx context.Context, id ApiId) (result GetOperationRespon var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/api/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/api/method_listbyservice.go index 6b9bc61fa02..637304ef1e8 100644 --- a/resource-manager/apimanagement/2022-08-01/api/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/api/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/api/method_update.go b/resource-manager/apimanagement/2022-08-01/api/method_update.go index 491fbbeb5c8..6310b4ab9ad 100644 --- a/resource-manager/apimanagement/2022-08-01/api/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/api/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) Update(ctx context.Context, id ApiId, input ApiUpdateContract var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/api/version.go b/resource-manager/apimanagement/2022-08-01/api/version.go index db298983527..7d28b7cc205 100644 --- a/resource-manager/apimanagement/2022-08-01/api/version.go +++ b/resource-manager/apimanagement/2022-08-01/api/version.go @@ -1,12 +1,10 @@ package api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/api/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/README.md b/resource-manager/apimanagement/2022-08-01/apidiagnostic/README.md index 825f010afaa..2b2ce8b5b16 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/README.md +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apidiagnostic` Documentation -The `apidiagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apidiagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/client.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/client.go index 10bdb8741b2..4e0be722654 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/client.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/client.go @@ -15,7 +15,7 @@ type ApiDiagnosticClient struct { } func NewApiDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidiagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidiagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go index 1c99bf5821c..30c3eaab96f 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go index d2f0e00b2bb..604e7513a08 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/id_apidiagnostic.go @@ -46,7 +46,7 @@ func ParseApiDiagnosticID(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiDiagnosticIDInsensitively(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_createorupdate.go index 2551a5d1445..4f82c372b8f 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiDiagnosticClient) CreateOrUpdate(ctx context.Context, id ApiDiagnosti var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_delete.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_delete.go index a781c7b154b..ede64465f75 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_get.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_get.go index bb113001b36..cd148612858 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_get.go @@ -45,7 +45,6 @@ func (c ApiDiagnosticClient) Get(ctx context.Context, id ApiDiagnosticId) (resul var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_listbyservice.go index 96b6f06f674..96e04e5bd42 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_update.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_update.go index 00ef4533a35..1352f0f032b 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiDiagnosticClient) Update(ctx context.Context, id ApiDiagnosticId, inp var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apidiagnostic/version.go b/resource-manager/apimanagement/2022-08-01/apidiagnostic/version.go index bcfa88408c3..966080e9f3e 100644 --- a/resource-manager/apimanagement/2022-08-01/apidiagnostic/version.go +++ b/resource-manager/apimanagement/2022-08-01/apidiagnostic/version.go @@ -1,12 +1,10 @@ package apidiagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidiagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidiagnostic/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/README.md b/resource-manager/apimanagement/2022-08-01/apiissue/README.md index 90f1a1590fa..0ad93403340 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiissue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiissue` Documentation -The `apiissue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiissue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/client.go b/resource-manager/apimanagement/2022-08-01/apiissue/client.go index 33f2a33d684..6350de2a21e 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/client.go @@ -15,7 +15,7 @@ type ApiIssueClient struct { } func NewApiIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/id_api.go b/resource-manager/apimanagement/2022-08-01/apiissue/id_api.go index f42ff72ff21..063c20d8c75 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/id_apiissue.go b/resource-manager/apimanagement/2022-08-01/apiissue/id_apiissue.go index 7b13fff0230..267ea58855b 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/id_apiissue.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apiissue/method_createorupdate.go index 2c843315ed6..0a592af3683 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueClient) CreateOrUpdate(ctx context.Context, id ApiIssueId, input var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/method_delete.go b/resource-manager/apimanagement/2022-08-01/apiissue/method_delete.go index c51a70bf93d..51c49f6e8ea 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/method_get.go b/resource-manager/apimanagement/2022-08-01/apiissue/method_get.go index a4f0ff0be8a..b364bf2fbce 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiIssueClient) Get(ctx context.Context, id ApiIssueId, options GetOpera var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apiissue/method_listbyservice.go index 314d87e9b6e..fc909bd1842 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/method_update.go b/resource-manager/apimanagement/2022-08-01/apiissue/method_update.go index 5db5804bbb2..0e09126c1ed 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiIssueClient) Update(ctx context.Context, id ApiIssueId, input IssueUp var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissue/version.go b/resource-manager/apimanagement/2022-08-01/apiissue/version.go index f968692bd3f..846fb98393a 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissue/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiissue/version.go @@ -1,12 +1,10 @@ package apiissue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissue/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/README.md b/resource-manager/apimanagement/2022-08-01/apiissueattachment/README.md index dbae88c7837..d419f5f089d 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiissueattachment` Documentation -The `apiissueattachment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiissueattachment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/client.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/client.go index 84b276260e3..ee1f89ab366 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/client.go @@ -15,7 +15,7 @@ type ApiIssueAttachmentClient struct { } func NewApiIssueAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueAttachmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissueattachment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissueattachment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueAttachmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_apiissue.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_apiissue.go index b77d45c0fdb..e7dc1375f21 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_apiissue.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_attachment.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_attachment.go index c57aa82518a..542f104ced8 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_attachment.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/id_attachment.go @@ -48,7 +48,7 @@ func ParseAttachmentID(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAttachmentIDInsensitively(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_createorupdate.go index a44575c4ae0..0433d95beeb 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueAttachmentClient) CreateOrUpdate(ctx context.Context, id Attachm var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_delete.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_delete.go index 867e45b1ffc..8eb76db21c6 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_get.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_get.go index f544ca53f2b..9d487af13e5 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueAttachmentClient) Get(ctx context.Context, id AttachmentId) (res var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_listbyservice.go index 7e2162ab2a9..5805727d267 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissueattachment/version.go b/resource-manager/apimanagement/2022-08-01/apiissueattachment/version.go index 6a6d78bc779..a24649a88ef 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissueattachment/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiissueattachment/version.go @@ -1,12 +1,10 @@ package apiissueattachment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissueattachment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissueattachment/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/README.md b/resource-manager/apimanagement/2022-08-01/apiissuecomment/README.md index 12b363822af..0a07440e60b 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiissuecomment` Documentation -The `apiissuecomment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiissuecomment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/client.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/client.go index 22377af4fed..8ce8ce1be89 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/client.go @@ -15,7 +15,7 @@ type ApiIssueCommentClient struct { } func NewApiIssueCommentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueCommentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissuecomment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissuecomment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueCommentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_apiissue.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_apiissue.go index dff007275dc..62a078b3a21 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_apiissue.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_comment.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_comment.go index 46ee496fa82..d0ec704a1bc 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_comment.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/id_comment.go @@ -48,7 +48,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_createorupdate.go index 82f8efd70c7..df5d55dbf21 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueCommentClient) CreateOrUpdate(ctx context.Context, id CommentId, var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_delete.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_delete.go index 725bbb2f2a8..de8f0e9c2cd 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_get.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_get.go index 459dd2af4c6..596b1a6dd11 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueCommentClient) Get(ctx context.Context, id CommentId) (result Ge var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_listbyservice.go index a1f56a2f9d7..4b5e59c9821 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiissuecomment/version.go b/resource-manager/apimanagement/2022-08-01/apiissuecomment/version.go index 2804da0596f..8d09495020c 100644 --- a/resource-manager/apimanagement/2022-08-01/apiissuecomment/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiissuecomment/version.go @@ -1,12 +1,10 @@ package apiissuecomment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissuecomment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissuecomment/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/README.md b/resource-manager/apimanagement/2022-08-01/apimanagementservice/README.md index c519646a9c8..4c1d3187e40 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/README.md +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementservice` Documentation -The `apimanagementservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apimanagementservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/client.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/client.go index 7c5932f7316..4816927cda9 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/client.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceClient struct { } func NewApiManagementServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go index 5183555d0c8..b8c710f4cb3 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_checknameavailability.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_checknameavailability.go index 2a8c875ee1f..0aa5392bae2 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_checknameavailability.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ApiManagementServiceClient) CheckNameAvailability(ctx context.Context, i var model ApiManagementServiceNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_get.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_get.go index 771928691f7..f4d6a791731 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_get.go @@ -45,7 +45,6 @@ func (c ApiManagementServiceClient) Get(ctx context.Context, id ServiceId) (resu var model ApiManagementServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getdomainownershipidentifier.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getdomainownershipidentifier.go index 40d031a5f83..acb89d914e7 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getdomainownershipidentifier.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getdomainownershipidentifier.go @@ -47,7 +47,6 @@ func (c ApiManagementServiceClient) GetDomainOwnershipIdentifier(ctx context.Con var model ApiManagementServiceGetDomainOwnershipIdentifierResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getssotoken.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getssotoken.go index ecf0a465d0f..7d2b5a93c5f 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getssotoken.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/method_getssotoken.go @@ -46,7 +46,6 @@ func (c ApiManagementServiceClient) GetSsoToken(ctx context.Context, id ServiceI var model ApiManagementServiceGetSsoTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementservice/version.go b/resource-manager/apimanagement/2022-08-01/apimanagementservice/version.go index 5c1a11441c1..3c35274dd15 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementservice/version.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementservice/version.go @@ -1,12 +1,10 @@ package apimanagementservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementservice/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/README.md b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/README.md index 136f3ce3ef5..2cbbcd4f416 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/README.md +++ b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus` Documentation -The `apimanagementserviceskus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apimanagementserviceskus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/client.go b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/client.go index 33c4554cc31..d78d3a46960 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/client.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceSkusClient struct { } func NewApiManagementServiceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceSkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/id_service.go b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/id_service.go index 1f1fc07284a..92edf692b6f 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/version.go b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/version.go index 09b7405482a..cda0be506ba 100644 --- a/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/version.go +++ b/resource-manager/apimanagement/2022-08-01/apimanagementserviceskus/version.go @@ -1,12 +1,10 @@ package apimanagementserviceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementserviceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementserviceskus/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/README.md b/resource-manager/apimanagement/2022-08-01/apioperation/README.md index 192e76483d9..095753d19b8 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/README.md +++ b/resource-manager/apimanagement/2022-08-01/apioperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperation` Documentation -The `apioperation` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apioperation` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/client.go b/resource-manager/apimanagement/2022-08-01/apioperation/client.go index 5c9fa6d23e6..b9782eb451f 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/client.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/client.go @@ -15,7 +15,7 @@ type ApiOperationClient struct { } func NewApiOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go b/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go index 253d9153dbc..751a8abfb3b 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go b/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go index ae47adf61a5..279d3f927e2 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apioperation/method_createorupdate.go index ee86a38b0bc..66fb1d5996e 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) CreateOrUpdate(ctx context.Context, id OperationId, var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/method_delete.go b/resource-manager/apimanagement/2022-08-01/apioperation/method_delete.go index ee390d245b3..e4e9e6e90ee 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/method_get.go b/resource-manager/apimanagement/2022-08-01/apioperation/method_get.go index 7fed3585ab9..ff3a98889ea 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/method_get.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) Get(ctx context.Context, id OperationId) (result Get var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/method_listbyapi.go b/resource-manager/apimanagement/2022-08-01/apioperation/method_listbyapi.go index df8d3b45502..798fe0e7552 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/method_listbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/method_update.go b/resource-manager/apimanagement/2022-08-01/apioperation/method_update.go index 005fc98f21a..4f5130245ac 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) Update(ctx context.Context, id OperationId, input Op var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperation/version.go b/resource-manager/apimanagement/2022-08-01/apioperation/version.go index 86c8468c323..1190c954462 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperation/version.go +++ b/resource-manager/apimanagement/2022-08-01/apioperation/version.go @@ -1,12 +1,10 @@ package apioperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperation/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/README.md b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/README.md index ed57c7b8978..fd75c92c9b3 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/README.md +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationpolicy` Documentation -The `apioperationpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apioperationpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/client.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/client.go index 4c1ef477115..c0dc541f2ed 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/client.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/client.go @@ -15,7 +15,7 @@ type ApiOperationPolicyClient struct { } func NewApiOperationPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go index a9f5f2e9bd1..99c5e55bc33 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_createorupdate.go index 3437b481d77..398b6fbd9ed 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) CreateOrUpdate(ctx context.Context, id Operati var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_delete.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_delete.go index 1b77d06ed20..cd8893ce2f0 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_get.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_get.go index 53ce4e80d68..24446658831 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) Get(ctx context.Context, id OperationId, optio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/version.go b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/version.go index 5c02ab0989d..50ce69f4f87 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationpolicy/version.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationpolicy/version.go @@ -1,12 +1,10 @@ package apioperationpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationpolicy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/README.md b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/README.md index d63dce1cd8b..9b02591237e 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/README.md +++ b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationsbytag` Documentation -The `apioperationsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apioperationsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/client.go b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/client.go index 26f8b7f55aa..703172fb96e 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/client.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/client.go @@ -15,7 +15,7 @@ type ApiOperationsByTagClient struct { } func NewApiOperationsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/id_api.go b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/id_api.go index 5897ef0aafc..3ef76da3989 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/method_operationlistbytags.go b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/method_operationlistbytags.go index 2a37906b22f..da55db0920b 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/method_operationlistbytags.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/method_operationlistbytags.go @@ -42,6 +42,7 @@ func (o OperationListByTagsOperationOptions) ToHeaders() *client.Headers { func (o OperationListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/version.go b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/version.go index 69c81a9f3ff..63f99bbdfa5 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationsbytag/version.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationsbytag/version.go @@ -1,12 +1,10 @@ package apioperationsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationsbytag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/README.md b/resource-manager/apimanagement/2022-08-01/apioperationtag/README.md index 6397d8556a6..704aad3fc18 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/README.md +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apioperationtag` Documentation -The `apioperationtag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apioperationtag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/client.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/client.go index 6f14f25474c..977dc13c0f9 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/client.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/client.go @@ -15,7 +15,7 @@ type ApiOperationTagClient struct { } func NewApiOperationTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationtag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationtag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go index efa4b494f53..cd8e54a7d89 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go index 278b58eaf30..daaa768a548 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/id_operationtag.go @@ -48,7 +48,7 @@ func ParseOperationTagID(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOperationTagIDInsensitively(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_tagassigntooperation.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_tagassigntooperation.go index ee4d3b0dbb0..003af5a6855 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_tagassigntooperation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_tagassigntooperation.go @@ -46,7 +46,6 @@ func (c ApiOperationTagClient) TagAssignToOperation(ctx context.Context, id Oper var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taggetbyoperation.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taggetbyoperation.go index 7448f9ee27a..cbdff13a037 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taggetbyoperation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taggetbyoperation.go @@ -45,7 +45,6 @@ func (c ApiOperationTagClient) TagGetByOperation(ctx context.Context, id Operati var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taglistbyoperation.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taglistbyoperation.go index f68870a2587..13096fc0729 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taglistbyoperation.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/method_taglistbyoperation.go @@ -41,6 +41,7 @@ func (o TagListByOperationOperationOptions) ToHeaders() *client.Headers { func (o TagListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apioperationtag/version.go b/resource-manager/apimanagement/2022-08-01/apioperationtag/version.go index 852f6568d19..360cc59d96e 100644 --- a/resource-manager/apimanagement/2022-08-01/apioperationtag/version.go +++ b/resource-manager/apimanagement/2022-08-01/apioperationtag/version.go @@ -1,12 +1,10 @@ package apioperationtag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationtag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationtag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/README.md b/resource-manager/apimanagement/2022-08-01/apipolicy/README.md index 445a6a5a03a..3049fb75a4a 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/README.md +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apipolicy` Documentation -The `apipolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apipolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/client.go b/resource-manager/apimanagement/2022-08-01/apipolicy/client.go index 84c3dfec8c9..48a63aea96b 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/client.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/client.go @@ -15,7 +15,7 @@ type ApiPolicyClient struct { } func NewApiPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apipolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apipolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go b/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go index 8423eae7bd7..3313f2d60fe 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apipolicy/method_createorupdate.go index eeaf614e85b..5a5f41a5a69 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) CreateOrUpdate(ctx context.Context, id ApiId, input Pol var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/method_delete.go b/resource-manager/apimanagement/2022-08-01/apipolicy/method_delete.go index ee63586a23e..2e0bec42e46 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/method_get.go b/resource-manager/apimanagement/2022-08-01/apipolicy/method_get.go index c62f27cb331..215a0d6e983 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) Get(ctx context.Context, id ApiId, options GetOperation var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apipolicy/version.go b/resource-manager/apimanagement/2022-08-01/apipolicy/version.go index 41da5ae3363..aafd2b00d73 100644 --- a/resource-manager/apimanagement/2022-08-01/apipolicy/version.go +++ b/resource-manager/apimanagement/2022-08-01/apipolicy/version.go @@ -1,12 +1,10 @@ package apipolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apipolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apipolicy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiproduct/README.md b/resource-manager/apimanagement/2022-08-01/apiproduct/README.md index 4c956decf72..38f1a71b818 100644 --- a/resource-manager/apimanagement/2022-08-01/apiproduct/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiproduct/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiproduct` Documentation -The `apiproduct` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiproduct` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiproduct/client.go b/resource-manager/apimanagement/2022-08-01/apiproduct/client.go index e7774a6266c..657bc10d33b 100644 --- a/resource-manager/apimanagement/2022-08-01/apiproduct/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiproduct/client.go @@ -15,7 +15,7 @@ type ApiProductClient struct { } func NewApiProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiproduct", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiproduct", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiproduct/id_api.go b/resource-manager/apimanagement/2022-08-01/apiproduct/id_api.go index b14e77a5f55..759adfa6c31 100644 --- a/resource-manager/apimanagement/2022-08-01/apiproduct/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apiproduct/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiproduct/method_listbyapis.go b/resource-manager/apimanagement/2022-08-01/apiproduct/method_listbyapis.go index 9a4501fc786..a76cf16e6d4 100644 --- a/resource-manager/apimanagement/2022-08-01/apiproduct/method_listbyapis.go +++ b/resource-manager/apimanagement/2022-08-01/apiproduct/method_listbyapis.go @@ -41,6 +41,7 @@ func (o ListByApisOperationOptions) ToHeaders() *client.Headers { func (o ListByApisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiproduct/version.go b/resource-manager/apimanagement/2022-08-01/apiproduct/version.go index eeab9c809ff..53124735b1f 100644 --- a/resource-manager/apimanagement/2022-08-01/apiproduct/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiproduct/version.go @@ -1,12 +1,10 @@ package apiproduct -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiproduct/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiproduct/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/README.md b/resource-manager/apimanagement/2022-08-01/apirelease/README.md index e76336017b1..79be7b8a7ec 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/README.md +++ b/resource-manager/apimanagement/2022-08-01/apirelease/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirelease` Documentation -The `apirelease` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apirelease` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/client.go b/resource-manager/apimanagement/2022-08-01/apirelease/client.go index 5ce0c50057f..916d3cf987c 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/client.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/client.go @@ -15,7 +15,7 @@ type ApiReleaseClient struct { } func NewApiReleaseClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiReleaseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirelease", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirelease", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiReleaseClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go b/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go index 8cb60bea6b5..2d5590c7064 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go b/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go index 782521151d8..43c06ed85ab 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/id_release.go @@ -46,7 +46,7 @@ func ParseReleaseID(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReleaseIDInsensitively(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apirelease/method_createorupdate.go index 2b23b8d16a6..78ca213b93f 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) CreateOrUpdate(ctx context.Context, id ReleaseId, inpu var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/method_delete.go b/resource-manager/apimanagement/2022-08-01/apirelease/method_delete.go index d7f28534465..ccae10babdb 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/method_get.go b/resource-manager/apimanagement/2022-08-01/apirelease/method_get.go index 4f45a0505aa..1c9d1797eb8 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/method_get.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) Get(ctx context.Context, id ReleaseId) (result GetOper var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apirelease/method_listbyservice.go index 509f7241d4f..afff495b595 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/method_update.go b/resource-manager/apimanagement/2022-08-01/apirelease/method_update.go index 1e51ca66c45..ec17ee72daa 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) Update(ctx context.Context, id ReleaseId, input ApiRel var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apirelease/version.go b/resource-manager/apimanagement/2022-08-01/apirelease/version.go index c32ad9e2484..6440d622c09 100644 --- a/resource-manager/apimanagement/2022-08-01/apirelease/version.go +++ b/resource-manager/apimanagement/2022-08-01/apirelease/version.go @@ -1,12 +1,10 @@ package apirelease -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirelease/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirelease/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apirevision/README.md b/resource-manager/apimanagement/2022-08-01/apirevision/README.md index 271112e590f..eb9fc8bc827 100644 --- a/resource-manager/apimanagement/2022-08-01/apirevision/README.md +++ b/resource-manager/apimanagement/2022-08-01/apirevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apirevision` Documentation -The `apirevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apirevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apirevision/client.go b/resource-manager/apimanagement/2022-08-01/apirevision/client.go index d44402ed6ae..3751f03b558 100644 --- a/resource-manager/apimanagement/2022-08-01/apirevision/client.go +++ b/resource-manager/apimanagement/2022-08-01/apirevision/client.go @@ -15,7 +15,7 @@ type ApiRevisionClient struct { } func NewApiRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apirevision/id_api.go b/resource-manager/apimanagement/2022-08-01/apirevision/id_api.go index b7fe8776e72..22a2fc79643 100644 --- a/resource-manager/apimanagement/2022-08-01/apirevision/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apirevision/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apirevision/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apirevision/method_listbyservice.go index 1f1a5af6d1d..e65c6ee9c3e 100644 --- a/resource-manager/apimanagement/2022-08-01/apirevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apirevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apirevision/version.go b/resource-manager/apimanagement/2022-08-01/apirevision/version.go index 313e9662b99..bef8a971453 100644 --- a/resource-manager/apimanagement/2022-08-01/apirevision/version.go +++ b/resource-manager/apimanagement/2022-08-01/apirevision/version.go @@ -1,12 +1,10 @@ package apirevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirevision/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apisbytag/README.md b/resource-manager/apimanagement/2022-08-01/apisbytag/README.md index 8bf2aded648..6e1920926de 100644 --- a/resource-manager/apimanagement/2022-08-01/apisbytag/README.md +++ b/resource-manager/apimanagement/2022-08-01/apisbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apisbytag` Documentation -The `apisbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apisbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apisbytag/client.go b/resource-manager/apimanagement/2022-08-01/apisbytag/client.go index 034b78c6308..ed2e61ccb38 100644 --- a/resource-manager/apimanagement/2022-08-01/apisbytag/client.go +++ b/resource-manager/apimanagement/2022-08-01/apisbytag/client.go @@ -15,7 +15,7 @@ type ApisByTagClient struct { } func NewApisByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apisbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apisbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apisbytag/id_service.go b/resource-manager/apimanagement/2022-08-01/apisbytag/id_service.go index a88da291012..e67b3727900 100644 --- a/resource-manager/apimanagement/2022-08-01/apisbytag/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/apisbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apisbytag/method_apilistbytags.go b/resource-manager/apimanagement/2022-08-01/apisbytag/method_apilistbytags.go index 913e89cf621..98b08e4fddf 100644 --- a/resource-manager/apimanagement/2022-08-01/apisbytag/method_apilistbytags.go +++ b/resource-manager/apimanagement/2022-08-01/apisbytag/method_apilistbytags.go @@ -42,6 +42,7 @@ func (o ApiListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ApiListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apisbytag/version.go b/resource-manager/apimanagement/2022-08-01/apisbytag/version.go index 91e1fbb8ae7..35304204775 100644 --- a/resource-manager/apimanagement/2022-08-01/apisbytag/version.go +++ b/resource-manager/apimanagement/2022-08-01/apisbytag/version.go @@ -1,12 +1,10 @@ package apisbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apisbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apisbytag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/README.md b/resource-manager/apimanagement/2022-08-01/apischema/README.md index b2a2be630c4..b9326a489a0 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/README.md +++ b/resource-manager/apimanagement/2022-08-01/apischema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apischema` Documentation -The `apischema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apischema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apischema/client.go b/resource-manager/apimanagement/2022-08-01/apischema/client.go index fb466515328..feae3073bba 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/client.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/client.go @@ -15,7 +15,7 @@ type ApiSchemaClient struct { } func NewApiSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiSchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apischema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apischema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiSchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/id_api.go b/resource-manager/apimanagement/2022-08-01/apischema/id_api.go index 725dc89049b..4b362d874f1 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go b/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go index af8be6866d8..52763f55ab3 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/id_apischema.go @@ -46,7 +46,7 @@ func ParseApiSchemaID(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apischema/method_createorupdate.go index e9339741550..43f5ff04667 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/method_delete.go b/resource-manager/apimanagement/2022-08-01/apischema/method_delete.go index 1e1272fa389..cb2a09c563a 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/method_get.go b/resource-manager/apimanagement/2022-08-01/apischema/method_get.go index c0bd56818fa..474b0728991 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/method_get.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) Get(ctx context.Context, id ApiSchemaId) (result GetOpe var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/method_listbyapi.go b/resource-manager/apimanagement/2022-08-01/apischema/method_listbyapi.go index c3cb801dfce..5cbe66a49a9 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/method_listbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apischema/version.go b/resource-manager/apimanagement/2022-08-01/apischema/version.go index e17a39dae1a..8bc168ed2fc 100644 --- a/resource-manager/apimanagement/2022-08-01/apischema/version.go +++ b/resource-manager/apimanagement/2022-08-01/apischema/version.go @@ -1,12 +1,10 @@ package apischema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apischema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apischema/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/README.md b/resource-manager/apimanagement/2022-08-01/apitag/README.md index 45032ccb896..dc7d06b53fa 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/README.md +++ b/resource-manager/apimanagement/2022-08-01/apitag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitag` Documentation -The `apitag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apitag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apitag/client.go b/resource-manager/apimanagement/2022-08-01/apitag/client.go index 491411cb346..d6fa22e93b2 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/client.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/client.go @@ -15,7 +15,7 @@ type ApiTagClient struct { } func NewApiTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/id_api.go b/resource-manager/apimanagement/2022-08-01/apitag/id_api.go index 584293d60e3..6041b57e3cb 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go b/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go index 13e9a7f8c96..e22fb5fe987 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/id_apitag.go @@ -46,7 +46,7 @@ func ParseApiTagID(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiTagIDInsensitively(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/method_tagassigntoapi.go b/resource-manager/apimanagement/2022-08-01/apitag/method_tagassigntoapi.go index daa3d8e3cbb..e228f15e51c 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/method_tagassigntoapi.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/method_tagassigntoapi.go @@ -46,7 +46,6 @@ func (c ApiTagClient) TagAssignToApi(ctx context.Context, id ApiTagId) (result T var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/method_taggetbyapi.go b/resource-manager/apimanagement/2022-08-01/apitag/method_taggetbyapi.go index 17951c4564a..ce827a4d294 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/method_taggetbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/method_taggetbyapi.go @@ -45,7 +45,6 @@ func (c ApiTagClient) TagGetByApi(ctx context.Context, id ApiTagId) (result TagG var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/method_taglistbyapi.go b/resource-manager/apimanagement/2022-08-01/apitag/method_taglistbyapi.go index 5c2639c91e3..26018d60d4a 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/method_taglistbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/method_taglistbyapi.go @@ -41,6 +41,7 @@ func (o TagListByApiOperationOptions) ToHeaders() *client.Headers { func (o TagListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apitag/version.go b/resource-manager/apimanagement/2022-08-01/apitag/version.go index 9635300489e..12673a8d791 100644 --- a/resource-manager/apimanagement/2022-08-01/apitag/version.go +++ b/resource-manager/apimanagement/2022-08-01/apitag/version.go @@ -1,12 +1,10 @@ package apitag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/README.md b/resource-manager/apimanagement/2022-08-01/apitagdescription/README.md index dfe87540772..81de41c49eb 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/README.md +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apitagdescription` Documentation -The `apitagdescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apitagdescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/client.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/client.go index f3068aee44a..6f6a4d3fac3 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/client.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/client.go @@ -15,7 +15,7 @@ type ApiTagDescriptionClient struct { } func NewApiTagDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitagdescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitagdescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go index 6c8591fef9e..1111c611d79 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go index 0e84945f848..441f9659ee4 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/id_tagdescription.go @@ -46,7 +46,7 @@ func ParseTagDescriptionID(input string) (*TagDescriptionId, error) { } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTagDescriptionIDInsensitively(input string) (*TagDescriptionId, error) } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_createorupdate.go index 11d74115f05..2f2cf0b50a9 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiTagDescriptionClient) CreateOrUpdate(ctx context.Context, id TagDescr var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_delete.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_delete.go index 2ac6057d339..aa5781c0d43 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_get.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_get.go index e350b63f26f..6269b053999 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_get.go @@ -45,7 +45,6 @@ func (c ApiTagDescriptionClient) Get(ctx context.Context, id TagDescriptionId) ( var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_listbyservice.go index 6a36cd97456..ebcba919eef 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apitagdescription/version.go b/resource-manager/apimanagement/2022-08-01/apitagdescription/version.go index c722dd474b1..c71655a45a0 100644 --- a/resource-manager/apimanagement/2022-08-01/apitagdescription/version.go +++ b/resource-manager/apimanagement/2022-08-01/apitagdescription/version.go @@ -1,12 +1,10 @@ package apitagdescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitagdescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitagdescription/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/README.md b/resource-manager/apimanagement/2022-08-01/apiversionset/README.md index 67c5bcf0712..70a25cd0a89 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiversionset` Documentation -The `apiversionset` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiversionset` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/client.go b/resource-manager/apimanagement/2022-08-01/apiversionset/client.go index ff0c4d18fb0..8cb546608a7 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/client.go @@ -15,7 +15,7 @@ type ApiVersionSetClient struct { } func NewApiVersionSetClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go b/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go index 6a1476b429c..86ec55820c7 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go b/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go index fe44a488d70..cf4cbee8fdb 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apiversionset/method_createorupdate.go index 2d070fcbf91..3314930a661 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) CreateOrUpdate(ctx context.Context, id ApiVersionSe var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/method_get.go b/resource-manager/apimanagement/2022-08-01/apiversionset/method_get.go index 7b7c728908e..6e0f1d21d9e 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) Get(ctx context.Context, id ApiVersionSetId) (resul var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/apiversionset/method_listbyservice.go index 0f44e4d938d..e3cf32ef2c1 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/method_update.go b/resource-manager/apimanagement/2022-08-01/apiversionset/method_update.go index 97fce9046f6..b8070706ca3 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) Update(ctx context.Context, id ApiVersionSetId, inp var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionset/version.go b/resource-manager/apimanagement/2022-08-01/apiversionset/version.go index e2bee2fe245..593253bee9d 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionset/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionset/version.go @@ -1,12 +1,10 @@ package apiversionset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionset/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionsets/client.go b/resource-manager/apimanagement/2022-08-01/apiversionsets/client.go index e1665dd8077..2186fe19f82 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionsets/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionsets/client.go @@ -15,7 +15,7 @@ type ApiVersionSetsClient struct { } func NewApiVersionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go b/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go index ef4fd9b314b..20c761485f9 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionsets/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionsets/method_apiversionsetdelete.go b/resource-manager/apimanagement/2022-08-01/apiversionsets/method_apiversionsetdelete.go index 1d2948225c9..71c29c6a6d2 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionsets/method_apiversionsetdelete.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionsets/method_apiversionsetdelete.go @@ -35,6 +35,7 @@ func (o ApiVersionSetDeleteOperationOptions) ToHeaders() *client.Headers { func (o ApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiversionsets/version.go b/resource-manager/apimanagement/2022-08-01/apiversionsets/version.go index 8d80596a236..741fae17bcc 100644 --- a/resource-manager/apimanagement/2022-08-01/apiversionsets/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiversionsets/version.go @@ -1,12 +1,10 @@ package apiversionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionsets/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/README.md b/resource-manager/apimanagement/2022-08-01/apiwiki/README.md index c5c5247e475..900bc33c98f 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/README.md +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/apiwiki` Documentation -The `apiwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `apiwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/client.go b/resource-manager/apimanagement/2022-08-01/apiwiki/client.go index d4a7082fd98..0f9dd6aad89 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/client.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/client.go @@ -15,7 +15,7 @@ type ApiWikiClient struct { } func NewApiWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/id_api.go b/resource-manager/apimanagement/2022-08-01/apiwiki/id_api.go index 04b9460d298..63214f7ed9d 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/apiwiki/method_createorupdate.go index 4004fddb029..4fa4ceb7e0c 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiWikiClient) CreateOrUpdate(ctx context.Context, id ApiId, input WikiC var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/method_delete.go b/resource-manager/apimanagement/2022-08-01/apiwiki/method_delete.go index 62f6f711cde..2a2cd9d29b8 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/method_get.go b/resource-manager/apimanagement/2022-08-01/apiwiki/method_get.go index 35b7a3426ae..9c5fefccb49 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/method_get.go @@ -46,7 +46,6 @@ func (c ApiWikiClient) Get(ctx context.Context, id ApiId) (result GetOperationRe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/method_list.go b/resource-manager/apimanagement/2022-08-01/apiwiki/method_list.go index aee5fc272ef..bbac7402e46 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/method_update.go b/resource-manager/apimanagement/2022-08-01/apiwiki/method_update.go index d3c1ff6bdaf..91e9a4ca6ea 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiWikiClient) Update(ctx context.Context, id ApiId, input WikiUpdateCon var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/apiwiki/version.go b/resource-manager/apimanagement/2022-08-01/apiwiki/version.go index a9420571fa9..85a264d3e94 100644 --- a/resource-manager/apimanagement/2022-08-01/apiwiki/version.go +++ b/resource-manager/apimanagement/2022-08-01/apiwiki/version.go @@ -1,12 +1,10 @@ package apiwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiwiki/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/README.md b/resource-manager/apimanagement/2022-08-01/authorization/README.md index 98e93ba679c..d650609cfc3 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorization/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorization` Documentation -The `authorization` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorization` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorization/client.go b/resource-manager/apimanagement/2022-08-01/authorization/client.go index 5c99f0c5f29..532ad956ebf 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/client.go @@ -15,7 +15,7 @@ type AuthorizationClient struct { } func NewAuthorizationClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorization", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorization", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/id_authorization.go b/resource-manager/apimanagement/2022-08-01/authorization/id_authorization.go index 17a2d80ccbb..bc1fecf80a8 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/id_authorization.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/authorization/method_createorupdate.go index de6586fe052..40d6f21bb19 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationClient) CreateOrUpdate(ctx context.Context, id Authorizatio var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/method_delete.go b/resource-manager/apimanagement/2022-08-01/authorization/method_delete.go index 9595882688b..aad52b6efb5 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/method_get.go b/resource-manager/apimanagement/2022-08-01/authorization/method_get.go index b6941ad9f03..686be430460 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationClient) Get(ctx context.Context, id AuthorizationId) (resul var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorization/version.go b/resource-manager/apimanagement/2022-08-01/authorization/version.go index e12f44cc19c..f9418cb5559 100644 --- a/resource-manager/apimanagement/2022-08-01/authorization/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorization/version.go @@ -1,12 +1,10 @@ package authorization -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorization/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorization/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/README.md b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/README.md index 16f248b7391..ee7e01bfab3 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy` Documentation -The `authorizationaccesspolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizationaccesspolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/client.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/client.go index f50cda54305..b6ea457f27c 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/client.go @@ -15,7 +15,7 @@ type AuthorizationAccessPolicyClient struct { } func NewAuthorizationAccessPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationAccessPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationAccessPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_accesspolicy.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_accesspolicy.go index 958261ca120..b9ab551eb2f 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_accesspolicy.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_accesspolicy.go @@ -48,7 +48,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_authorization.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_authorization.go index bbd21ac9fd0..8790b5211c4 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_authorization.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_createorupdate.go index 346e394cab1..cccefbb5d19 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, id var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_delete.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_delete.go index 3d067c9cc2b..de889c67dcc 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_get.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_get.go index 3c903781063..77357edcc1a 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationAccessPolicyClient) Get(ctx context.Context, id AccessPolic var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_listbyauthorization.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_listbyauthorization.go index 3a1d919d552..0761aece330 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_listbyauthorization.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/method_listbyauthorization.go @@ -41,6 +41,7 @@ func (o ListByAuthorizationOperationOptions) ToHeaders() *client.Headers { func (o ListByAuthorizationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/version.go b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/version.go index 2556bd5bf26..4354f6f2138 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationaccesspolicy/version.go @@ -1,12 +1,10 @@ package authorizationaccesspolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationaccesspolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationaccesspolicy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/README.md b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/README.md index f5ef26eaaf9..6392a063171 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode` Documentation -The `authorizationconfirmconsentcode` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizationconfirmconsentcode` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/client.go b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/client.go index 22e7ba30e1a..f6bc0c81714 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/client.go @@ -15,7 +15,7 @@ type AuthorizationConfirmConsentCodeClient struct { } func NewAuthorizationConfirmConsentCodeClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationConfirmConsentCodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationConfirmConsentCodeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/id_authorization.go b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/id_authorization.go index c49d4be720d..53244e86556 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/id_authorization.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/version.go b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/version.go index 2ac6056b90b..3a46bc45007 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationconfirmconsentcode/version.go @@ -1,12 +1,10 @@ package authorizationconfirmconsentcode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationconfirmconsentcode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationconfirmconsentcode/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/README.md b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/README.md index 06653295f1e..c73e017380f 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationloginlinks` Documentation -The `authorizationloginlinks` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizationloginlinks` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/client.go b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/client.go index 1e8c48f9d33..482627bdc0f 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/client.go @@ -15,7 +15,7 @@ type AuthorizationLoginLinksClient struct { } func NewAuthorizationLoginLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationLoginLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationloginlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationloginlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationLoginLinksClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/id_authorization.go b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/id_authorization.go index c90b836745d..52285fb88c7 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/id_authorization.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/method_post.go b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/method_post.go index ed7594c6f30..9bab7764034 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/method_post.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/method_post.go @@ -50,7 +50,6 @@ func (c AuthorizationLoginLinksClient) Post(ctx context.Context, id Authorizatio var model AuthorizationLoginResponseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/version.go b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/version.go index 2a220490f3c..12f1b1727c5 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationloginlinks/version.go @@ -1,12 +1,10 @@ package authorizationloginlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationloginlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationloginlinks/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/README.md b/resource-manager/apimanagement/2022-08-01/authorizationprovider/README.md index db9a4c553b8..3b83f419229 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationprovider` Documentation -The `authorizationprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizationprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/client.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/client.go index c3670048321..43ff7f92782 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/client.go @@ -15,7 +15,7 @@ type AuthorizationProviderClient struct { } func NewAuthorizationProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_authorizationprovider.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_authorizationprovider.go index 5b377135192..0c60cfd394d 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_service.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_service.go index 98813175218..1a73088603f 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_createorupdate.go index f516f5c677f..f3af9a4cbb1 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, id Auth var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_delete.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_delete.go index 0c0c82a4e01..ff582aa785c 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_get.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_get.go index 27f68eef690..f92b6ccd418 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationProviderClient) Get(ctx context.Context, id AuthorizationPr var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_listbyservice.go index 8e28a4d589e..2c69a441089 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationprovider/version.go b/resource-manager/apimanagement/2022-08-01/authorizationprovider/version.go index bf418a78ffc..4cb50fb70a4 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationprovider/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationprovider/version.go @@ -1,12 +1,10 @@ package authorizationprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationprovider/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizations/README.md b/resource-manager/apimanagement/2022-08-01/authorizations/README.md index 20d2c346c2e..abf5ef67238 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizations/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizations/client.go b/resource-manager/apimanagement/2022-08-01/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizations/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizations/id_authorizationprovider.go b/resource-manager/apimanagement/2022-08-01/authorizations/id_authorizationprovider.go index ec0427a96f6..b5c11dc2d82 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizations/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2022-08-01/authorizations/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizations/method_authorizationlistbyauthorizationprovider.go b/resource-manager/apimanagement/2022-08-01/authorizations/method_authorizationlistbyauthorizationprovider.go index 61659c7182f..b2910e09318 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizations/method_authorizationlistbyauthorizationprovider.go +++ b/resource-manager/apimanagement/2022-08-01/authorizations/method_authorizationlistbyauthorizationprovider.go @@ -41,6 +41,7 @@ func (o AuthorizationListByAuthorizationProviderOperationOptions) ToHeaders() *c func (o AuthorizationListByAuthorizationProviderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizations/version.go b/resource-manager/apimanagement/2022-08-01/authorizations/version.go index b081e194709..c09fff683ab 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizations/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/README.md b/resource-manager/apimanagement/2022-08-01/authorizationserver/README.md index 0f67bb04983..5e56a695712 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/README.md +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/authorizationserver` Documentation -The `authorizationserver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `authorizationserver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/client.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/client.go index a234058adb1..1704ea21dd3 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/client.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/client.go @@ -15,7 +15,7 @@ type AuthorizationServerClient struct { } func NewAuthorizationServerClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationServerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationserver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationserver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationServerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go index d501746a896..e2ff82e6771 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/id_authorizationserver.go @@ -44,7 +44,7 @@ func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error) { } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServer } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go index 16870e5f263..ef09a35c182 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_createorupdate.go index ef58fe9a05f..4e499b27763 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationServerClient) CreateOrUpdate(ctx context.Context, id Author var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_delete.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_delete.go index a307aa17d3f..2bb46f4501a 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_get.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_get.go index 8d4a7463981..54e8b811bca 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationServerClient) Get(ctx context.Context, id AuthorizationServ var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listbyservice.go index ae4ad390656..7c174cf8685 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listsecrets.go index 58b62cc36bf..e4bcb668d70 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_listsecrets.go @@ -46,7 +46,6 @@ func (c AuthorizationServerClient) ListSecrets(ctx context.Context, id Authoriza var model AuthorizationServerSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_update.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_update.go index 686f7550e4d..f16ebce0af3 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AuthorizationServerClient) Update(ctx context.Context, id AuthorizationS var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/authorizationserver/version.go b/resource-manager/apimanagement/2022-08-01/authorizationserver/version.go index 96576d667e8..fc84342d02f 100644 --- a/resource-manager/apimanagement/2022-08-01/authorizationserver/version.go +++ b/resource-manager/apimanagement/2022-08-01/authorizationserver/version.go @@ -1,12 +1,10 @@ package authorizationserver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationserver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationserver/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/backend/README.md b/resource-manager/apimanagement/2022-08-01/backend/README.md index 79ef0ce249c..29198e44137 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/README.md +++ b/resource-manager/apimanagement/2022-08-01/backend/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backend` Documentation -The `backend` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `backend` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/backend/client.go b/resource-manager/apimanagement/2022-08-01/backend/client.go index 8cf9c601f15..0752289445b 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/client.go +++ b/resource-manager/apimanagement/2022-08-01/backend/client.go @@ -15,7 +15,7 @@ type BackendClient struct { } func NewBackendClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/backend/id_backend.go b/resource-manager/apimanagement/2022-08-01/backend/id_backend.go index d59958e9b68..7540b370263 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/id_backend.go +++ b/resource-manager/apimanagement/2022-08-01/backend/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/backend/id_service.go b/resource-manager/apimanagement/2022-08-01/backend/id_service.go index afe0eb62f7f..f827f9d35f4 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/backend/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/backend/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/backend/method_createorupdate.go index 876a39e1fb9..d957d53a6f1 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/backend/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BackendClient) CreateOrUpdate(ctx context.Context, id BackendId, input B var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/backend/method_delete.go b/resource-manager/apimanagement/2022-08-01/backend/method_delete.go index f71fa94d865..46366e437b1 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/backend/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/backend/method_get.go b/resource-manager/apimanagement/2022-08-01/backend/method_get.go index cc3aa998b93..77da1fa7415 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/backend/method_get.go @@ -45,7 +45,6 @@ func (c BackendClient) Get(ctx context.Context, id BackendId) (result GetOperati var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/backend/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/backend/method_listbyservice.go index f8c5b6daf2a..b0a6f007cc2 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/backend/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/backend/method_update.go b/resource-manager/apimanagement/2022-08-01/backend/method_update.go index 3c102cf0e80..80258a36e8d 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/backend/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c BackendClient) Update(ctx context.Context, id BackendId, input BackendUp var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/backend/version.go b/resource-manager/apimanagement/2022-08-01/backend/version.go index a56922c3e2f..cbf188b4412 100644 --- a/resource-manager/apimanagement/2022-08-01/backend/version.go +++ b/resource-manager/apimanagement/2022-08-01/backend/version.go @@ -1,12 +1,10 @@ package backend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backend/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/backendreconnect/README.md b/resource-manager/apimanagement/2022-08-01/backendreconnect/README.md index 637a95fab83..675ff3747b0 100644 --- a/resource-manager/apimanagement/2022-08-01/backendreconnect/README.md +++ b/resource-manager/apimanagement/2022-08-01/backendreconnect/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/backendreconnect` Documentation -The `backendreconnect` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `backendreconnect` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/backendreconnect/client.go b/resource-manager/apimanagement/2022-08-01/backendreconnect/client.go index e7931af1711..229aed9d409 100644 --- a/resource-manager/apimanagement/2022-08-01/backendreconnect/client.go +++ b/resource-manager/apimanagement/2022-08-01/backendreconnect/client.go @@ -15,7 +15,7 @@ type BackendReconnectClient struct { } func NewBackendReconnectClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendReconnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backendreconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backendreconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendReconnectClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/backendreconnect/id_backend.go b/resource-manager/apimanagement/2022-08-01/backendreconnect/id_backend.go index 8099482517f..df64bd9a745 100644 --- a/resource-manager/apimanagement/2022-08-01/backendreconnect/id_backend.go +++ b/resource-manager/apimanagement/2022-08-01/backendreconnect/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/backendreconnect/version.go b/resource-manager/apimanagement/2022-08-01/backendreconnect/version.go index 2e02f81ee05..ce7104899c2 100644 --- a/resource-manager/apimanagement/2022-08-01/backendreconnect/version.go +++ b/resource-manager/apimanagement/2022-08-01/backendreconnect/version.go @@ -1,12 +1,10 @@ package backendreconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backendreconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backendreconnect/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/cache/README.md b/resource-manager/apimanagement/2022-08-01/cache/README.md index 8736734cd54..377c63d13ba 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/README.md +++ b/resource-manager/apimanagement/2022-08-01/cache/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/cache` Documentation -The `cache` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `cache` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/cache/client.go b/resource-manager/apimanagement/2022-08-01/cache/client.go index e0befe22fa3..ab451fc4ea5 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/client.go +++ b/resource-manager/apimanagement/2022-08-01/cache/client.go @@ -15,7 +15,7 @@ type CacheClient struct { } func NewCacheClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cache", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cache", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/cache/id_cache.go b/resource-manager/apimanagement/2022-08-01/cache/id_cache.go index 8260234796a..22061eee597 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/id_cache.go +++ b/resource-manager/apimanagement/2022-08-01/cache/id_cache.go @@ -44,7 +44,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/cache/id_service.go b/resource-manager/apimanagement/2022-08-01/cache/id_service.go index bf4f26d8b36..947e2876f0e 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/cache/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/cache/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/cache/method_createorupdate.go index 26ef5edfcc7..197b76786bc 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/cache/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CacheClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/cache/method_delete.go b/resource-manager/apimanagement/2022-08-01/cache/method_delete.go index 511791374c6..55b4280d97d 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/cache/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/cache/method_get.go b/resource-manager/apimanagement/2022-08-01/cache/method_get.go index 10fd3d603ea..1bb437d248d 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/cache/method_get.go @@ -45,7 +45,6 @@ func (c CacheClient) Get(ctx context.Context, id CacheId) (result GetOperationRe var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/cache/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/cache/method_listbyservice.go index 29189620638..99ac16add79 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/cache/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/cache/method_update.go b/resource-manager/apimanagement/2022-08-01/cache/method_update.go index 9388cab550d..f70e4710f73 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/cache/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CacheClient) Update(ctx context.Context, id CacheId, input CacheUpdatePa var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/cache/version.go b/resource-manager/apimanagement/2022-08-01/cache/version.go index 626c7e56693..42f2f4daa67 100644 --- a/resource-manager/apimanagement/2022-08-01/cache/version.go +++ b/resource-manager/apimanagement/2022-08-01/cache/version.go @@ -1,12 +1,10 @@ package cache -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cache/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cache/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/README.md b/resource-manager/apimanagement/2022-08-01/certificate/README.md index 2aaa8e83a40..0cea3fc8c2f 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/README.md +++ b/resource-manager/apimanagement/2022-08-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/certificate/client.go b/resource-manager/apimanagement/2022-08-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/client.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go b/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go index 8617e21ad2a..42e2e50f70c 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/id_service.go b/resource-manager/apimanagement/2022-08-01/certificate/id_service.go index 75f9ac3b04b..461f53f3c34 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/certificate/method_createorupdate.go index 823d71d3e64..15e1df590a3 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/method_delete.go b/resource-manager/apimanagement/2022-08-01/certificate/method_delete.go index 6c0ded0942d..85948d80764 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/method_get.go b/resource-manager/apimanagement/2022-08-01/certificate/method_get.go index 884851fd83b..e04e8cfae98 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/certificate/method_listbyservice.go index 9f45a52fd7c..63e1c8507b6 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/method_refreshsecret.go b/resource-manager/apimanagement/2022-08-01/certificate/method_refreshsecret.go index d764ec89d26..02667d79db1 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/method_refreshsecret.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/method_refreshsecret.go @@ -46,7 +46,6 @@ func (c CertificateClient) RefreshSecret(ctx context.Context, id CertificateId) var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/certificate/version.go b/resource-manager/apimanagement/2022-08-01/certificate/version.go index 0f6757ad4e4..2261f1caa52 100644 --- a/resource-manager/apimanagement/2022-08-01/certificate/version.go +++ b/resource-manager/apimanagement/2022-08-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/README.md b/resource-manager/apimanagement/2022-08-01/contenttype/README.md index f803c677291..1c359447da7 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/README.md +++ b/resource-manager/apimanagement/2022-08-01/contenttype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/contenttype` Documentation -The `contenttype` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `contenttype` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/client.go b/resource-manager/apimanagement/2022-08-01/contenttype/client.go index 86436fb159e..9dd4b452dda 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/client.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/client.go @@ -15,7 +15,7 @@ type ContentTypeClient struct { } func NewContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/id_contenttype.go b/resource-manager/apimanagement/2022-08-01/contenttype/id_contenttype.go index 35dbd65c28b..580bdfbbbfa 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/id_contenttype.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/id_service.go b/resource-manager/apimanagement/2022-08-01/contenttype/id_service.go index 1241f699f16..cdc854578dd 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/contenttype/method_createorupdate.go index d1a48e0857c..b51b4a363eb 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeClient) CreateOrUpdate(ctx context.Context, id ContentTypeId, var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/method_delete.go b/resource-manager/apimanagement/2022-08-01/contenttype/method_delete.go index d3dc044bf5c..ff7bd7bd5d9 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/method_get.go b/resource-manager/apimanagement/2022-08-01/contenttype/method_get.go index 059c81af9e8..7f4ca66a7df 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/method_get.go @@ -45,7 +45,6 @@ func (c ContentTypeClient) Get(ctx context.Context, id ContentTypeId) (result Ge var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/contenttype/version.go b/resource-manager/apimanagement/2022-08-01/contenttype/version.go index 976a874896e..80ce6b4ad21 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttype/version.go +++ b/resource-manager/apimanagement/2022-08-01/contenttype/version.go @@ -1,12 +1,10 @@ package contenttype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttype/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/README.md b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/README.md index ddf880f3bb0..0a754d799c9 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/README.md +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/contenttypecontentitem` Documentation -The `contenttypecontentitem` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `contenttypecontentitem` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/client.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/client.go index 81fef8be029..25caa5484f1 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/client.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/client.go @@ -15,7 +15,7 @@ type ContentTypeContentItemClient struct { } func NewContentTypeContentItemClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeContentItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttypecontentitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttypecontentitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeContentItemClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contentitem.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contentitem.go index b304e9fdf2b..add13b6f1fb 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contentitem.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contentitem.go @@ -46,7 +46,7 @@ func ParseContentItemID(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContentItemIDInsensitively(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contenttype.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contenttype.go index 576b6390d40..437d185ec27 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contenttype.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemcreateorupdate.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemcreateorupdate.go index c23ccc2fcb2..0509fce5cd7 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemcreateorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemcreateorupdate.go @@ -36,6 +36,7 @@ func (o ContentItemCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o ContentItemCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeContentItemClient) ContentItemCreateOrUpdate(ctx context.Cont var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemdelete.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemdelete.go index ae0888ce9e8..bfb0570356b 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemdelete.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemdelete.go @@ -35,6 +35,7 @@ func (o ContentItemDeleteOperationOptions) ToHeaders() *client.Headers { func (o ContentItemDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemget.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemget.go index 41ca4d59a44..025cff6645e 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemget.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/method_contentitemget.go @@ -45,7 +45,6 @@ func (c ContentTypeContentItemClient) ContentItemGet(ctx context.Context, id Con var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/version.go b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/version.go index 9d08ab8d4a2..864ceab1ef0 100644 --- a/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/version.go +++ b/resource-manager/apimanagement/2022-08-01/contenttypecontentitem/version.go @@ -1,12 +1,10 @@ package contenttypecontentitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttypecontentitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttypecontentitem/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/README.md b/resource-manager/apimanagement/2022-08-01/delegationsettings/README.md index 953671f0491..0784c334811 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/README.md +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/delegationsettings` Documentation -The `delegationsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `delegationsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/client.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/client.go index 975a55a7a10..6d65fe2f5ec 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/client.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/client.go @@ -15,7 +15,7 @@ type DelegationSettingsClient struct { } func NewDelegationSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DelegationSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delegationsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delegationsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DelegationSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go index c3aca641d8f..c0226a556f8 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_createorupdate.go index 194af96a592..d36a1f34df6 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DelegationSettingsClient) CreateOrUpdate(ctx context.Context, id Service var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_get.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_get.go index db02f9407db..3df4abb7ec7 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_get.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) Get(ctx context.Context, id ServiceId) (result var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_listsecrets.go index 50ee5bed1bd..e4b72cd79d6 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) ListSecrets(ctx context.Context, id ServiceId) var model PortalSettingValidationKeyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_update.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_update.go index c010e8ee865..9ef22bac0a1 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/delegationsettings/version.go b/resource-manager/apimanagement/2022-08-01/delegationsettings/version.go index bb1c18fcd2a..9819eaf6dad 100644 --- a/resource-manager/apimanagement/2022-08-01/delegationsettings/version.go +++ b/resource-manager/apimanagement/2022-08-01/delegationsettings/version.go @@ -1,12 +1,10 @@ package delegationsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delegationsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delegationsettings/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/deletedservice/README.md b/resource-manager/apimanagement/2022-08-01/deletedservice/README.md index 40fe49735d4..ef2f0075947 100644 --- a/resource-manager/apimanagement/2022-08-01/deletedservice/README.md +++ b/resource-manager/apimanagement/2022-08-01/deletedservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/deletedservice` Documentation -The `deletedservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `deletedservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/deletedservice/client.go b/resource-manager/apimanagement/2022-08-01/deletedservice/client.go index 7ce116a7259..27367714830 100644 --- a/resource-manager/apimanagement/2022-08-01/deletedservice/client.go +++ b/resource-manager/apimanagement/2022-08-01/deletedservice/client.go @@ -15,7 +15,7 @@ type DeletedServiceClient struct { } func NewDeletedServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go b/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go index d4f9feb3f31..9b447f5fd24 100644 --- a/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go +++ b/resource-manager/apimanagement/2022-08-01/deletedservice/id_deletedservice.go @@ -42,7 +42,7 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/deletedservice/method_getbyname.go b/resource-manager/apimanagement/2022-08-01/deletedservice/method_getbyname.go index f7fef324399..3e180be780a 100644 --- a/resource-manager/apimanagement/2022-08-01/deletedservice/method_getbyname.go +++ b/resource-manager/apimanagement/2022-08-01/deletedservice/method_getbyname.go @@ -45,7 +45,6 @@ func (c DeletedServiceClient) GetByName(ctx context.Context, id DeletedServiceId var model DeletedServiceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/deletedservice/version.go b/resource-manager/apimanagement/2022-08-01/deletedservice/version.go index c6774123f96..4f3b1de0461 100644 --- a/resource-manager/apimanagement/2022-08-01/deletedservice/version.go +++ b/resource-manager/apimanagement/2022-08-01/deletedservice/version.go @@ -1,12 +1,10 @@ package deletedservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservice/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/README.md b/resource-manager/apimanagement/2022-08-01/diagnostic/README.md index c061e9b79bd..c9ae2fbafdb 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/README.md +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic` Documentation -The `diagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `diagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/client.go b/resource-manager/apimanagement/2022-08-01/diagnostic/client.go index d7b4ed69319..6b71958f5b6 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/client.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/client.go @@ -15,7 +15,7 @@ type DiagnosticClient struct { } func NewDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go b/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go index 890a40a3e9c..4e521a300da 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go b/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go index ce1adfde374..5ebeb4ccb23 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/diagnostic/method_createorupdate.go index 63709e2900a..18a4c536cb5 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DiagnosticClient) CreateOrUpdate(ctx context.Context, id DiagnosticId, i var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/method_delete.go b/resource-manager/apimanagement/2022-08-01/diagnostic/method_delete.go index 4f5b2bc7d55..1e9acda8c14 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/method_get.go b/resource-manager/apimanagement/2022-08-01/diagnostic/method_get.go index af2a7f7943a..3ae72b09a0f 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticClient) Get(ctx context.Context, id DiagnosticId) (result GetO var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/diagnostic/method_listbyservice.go index 8f84fb8b874..bf7e8ad966a 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/method_update.go b/resource-manager/apimanagement/2022-08-01/diagnostic/method_update.go index a98dfa6617c..6e25bf0e1d7 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DiagnosticClient) Update(ctx context.Context, id DiagnosticId, input Dia var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/diagnostic/version.go b/resource-manager/apimanagement/2022-08-01/diagnostic/version.go index c7aee44d816..09667ca5cc3 100644 --- a/resource-manager/apimanagement/2022-08-01/diagnostic/version.go +++ b/resource-manager/apimanagement/2022-08-01/diagnostic/version.go @@ -1,12 +1,10 @@ package diagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostic/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/README.md b/resource-manager/apimanagement/2022-08-01/documentationresource/README.md index 36b9f5cd3a1..8aba0563182 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/README.md +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/documentationresource` Documentation -The `documentationresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `documentationresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/client.go b/resource-manager/apimanagement/2022-08-01/documentationresource/client.go index 84d6809b879..7366c4f9e12 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/client.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/client.go @@ -15,7 +15,7 @@ type DocumentationResourceClient struct { } func NewDocumentationResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*DocumentationResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "documentationresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "documentationresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DocumentationResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/id_documentation.go b/resource-manager/apimanagement/2022-08-01/documentationresource/id_documentation.go index 6841fc7c512..0bb03b62932 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/id_documentation.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/id_documentation.go @@ -44,7 +44,7 @@ func ParseDocumentationID(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDocumentationIDInsensitively(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/id_service.go b/resource-manager/apimanagement/2022-08-01/documentationresource/id_service.go index a25669a238f..d37f7661269 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/documentationresource/method_createorupdate.go index dba91b12734..e091e7fa55d 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DocumentationResourceClient) CreateOrUpdate(ctx context.Context, id Docu var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/method_delete.go b/resource-manager/apimanagement/2022-08-01/documentationresource/method_delete.go index dc215c80397..b7e63199308 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/method_get.go b/resource-manager/apimanagement/2022-08-01/documentationresource/method_get.go index db62fe89422..59fe05e032d 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/method_get.go @@ -45,7 +45,6 @@ func (c DocumentationResourceClient) Get(ctx context.Context, id DocumentationId var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/documentationresource/method_listbyservice.go index fd2023ee4d1..2b64e6d607e 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/method_update.go b/resource-manager/apimanagement/2022-08-01/documentationresource/method_update.go index 74fdf96af9a..a7b4e15a22a 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DocumentationResourceClient) Update(ctx context.Context, id Documentatio var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/documentationresource/version.go b/resource-manager/apimanagement/2022-08-01/documentationresource/version.go index 6814ac76a9e..02c7a377f7c 100644 --- a/resource-manager/apimanagement/2022-08-01/documentationresource/version.go +++ b/resource-manager/apimanagement/2022-08-01/documentationresource/version.go @@ -1,12 +1,10 @@ package documentationresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/documentationresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/documentationresource/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplate/README.md b/resource-manager/apimanagement/2022-08-01/emailtemplate/README.md index e7d72115025..008c462ab2d 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplate/README.md +++ b/resource-manager/apimanagement/2022-08-01/emailtemplate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplate` Documentation -The `emailtemplate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `emailtemplate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplate/client.go b/resource-manager/apimanagement/2022-08-01/emailtemplate/client.go index 019165ffa63..578f2718f75 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplate/client.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplate/client.go @@ -15,7 +15,7 @@ type EmailTemplateClient struct { } func NewEmailTemplateClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplate/id_service.go b/resource-manager/apimanagement/2022-08-01/emailtemplate/id_service.go index ad519c3023d..962040358d4 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplate/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplate/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/emailtemplate/method_listbyservice.go index c18ee603b17..7a86e93494c 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplate/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplate/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplate/version.go b/resource-manager/apimanagement/2022-08-01/emailtemplate/version.go index 40b7fcfe2a5..e22459bc1fc 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplate/version.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplate/version.go @@ -1,12 +1,10 @@ package emailtemplate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplate/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/README.md b/resource-manager/apimanagement/2022-08-01/emailtemplates/README.md index feb8fcff8bc..c32cfde3212 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/README.md +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/emailtemplates` Documentation -The `emailtemplates` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `emailtemplates` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/client.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/client.go index 9f3bc8ed59b..d38533bf55a 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/client.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/client.go @@ -15,7 +15,7 @@ type EmailTemplatesClient struct { } func NewEmailTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplatesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go index b10f4a91dd1..cb83e661d9e 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/id_template.go @@ -44,7 +44,7 @@ func ParseTemplateID(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTemplateIDInsensitively(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatecreateorupdate.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatecreateorupdate.go index 8f48b83acfd..7f48ae7cdbc 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatecreateorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatecreateorupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o EmailTemplateCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c EmailTemplatesClient) EmailTemplateCreateOrUpdate(ctx context.Context, i var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatedelete.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatedelete.go index 3bea1260006..82ce5a37244 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatedelete.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplatedelete.go @@ -35,6 +35,7 @@ func (o EmailTemplateDeleteOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateget.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateget.go index b9686668bf3..fcf8c3babdc 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateget.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateget.go @@ -45,7 +45,6 @@ func (c EmailTemplatesClient) EmailTemplateGet(ctx context.Context, id TemplateI var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateupdate.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateupdate.go index 6870b6a5cc8..c1ac2c80e3f 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateupdate.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/method_emailtemplateupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateUpdateOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c EmailTemplatesClient) EmailTemplateUpdate(ctx context.Context, id Templa var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/emailtemplates/version.go b/resource-manager/apimanagement/2022-08-01/emailtemplates/version.go index bb7eb8b1da0..8744c47ca3f 100644 --- a/resource-manager/apimanagement/2022-08-01/emailtemplates/version.go +++ b/resource-manager/apimanagement/2022-08-01/emailtemplates/version.go @@ -1,12 +1,10 @@ package emailtemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplates/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/README.md b/resource-manager/apimanagement/2022-08-01/gateway/README.md index 12b47099205..4119286180a 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/README.md +++ b/resource-manager/apimanagement/2022-08-01/gateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gateway` Documentation -The `gateway` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gateway` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gateway/client.go b/resource-manager/apimanagement/2022-08-01/gateway/client.go index 0d22b6f29bb..4b9a1263246 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/client.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/client.go @@ -15,7 +15,7 @@ type GatewayClient struct { } func NewGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go index 350bafc55eb..efbf44f2ef1 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/id_service.go b/resource-manager/apimanagement/2022-08-01/gateway/id_service.go index dbfd6735feb..fe3c9d96488 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/gateway/method_createorupdate.go index d73cce62328..4116eea8b19 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayClient) CreateOrUpdate(ctx context.Context, id GatewayId, input G var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/method_delete.go b/resource-manager/apimanagement/2022-08-01/gateway/method_delete.go index a3e76d4da96..cfd3d12845f 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/method_get.go b/resource-manager/apimanagement/2022-08-01/gateway/method_get.go index 3ddf01031fd..24f881c912f 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/method_get.go @@ -45,7 +45,6 @@ func (c GatewayClient) Get(ctx context.Context, id GatewayId) (result GetOperati var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/gateway/method_listbyservice.go index 182f1a1be3b..193ebcb3f47 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/method_update.go b/resource-manager/apimanagement/2022-08-01/gateway/method_update.go index 2113086018c..fa00c7b0345 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GatewayClient) Update(ctx context.Context, id GatewayId, input GatewayCo var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gateway/version.go b/resource-manager/apimanagement/2022-08-01/gateway/version.go index 43535cf5fae..b42c779dc7c 100644 --- a/resource-manager/apimanagement/2022-08-01/gateway/version.go +++ b/resource-manager/apimanagement/2022-08-01/gateway/version.go @@ -1,12 +1,10 @@ package gateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gateway/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/README.md b/resource-manager/apimanagement/2022-08-01/gatewayapi/README.md index 79ed4c5cff8..6e2ecb27f2d 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayapi` Documentation -The `gatewayapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewayapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/client.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/client.go index 6f88d7098fd..41d09ed34cd 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/client.go @@ -15,7 +15,7 @@ type GatewayApiClient struct { } func NewGatewayApiClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go index b2a134eea2f..4203aeb8629 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go index 1780b205bde..3f2c6b9bb02 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/id_gatewayapi.go @@ -46,7 +46,7 @@ func ParseGatewayApiID(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/method_createorupdate.go index 5af86c5ab69..a17c2009dc7 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GatewayApiClient) CreateOrUpdate(ctx context.Context, id GatewayApiId, i var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/method_listbyservice.go index 0babf1b2093..38dc86de4e9 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayapi/version.go b/resource-manager/apimanagement/2022-08-01/gatewayapi/version.go index c3d7c8e7aa2..c732bad0962 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayapi/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayapi/version.go @@ -1,12 +1,10 @@ package gatewayapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayapi/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/README.md b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/README.md index 694d3336f35..5e37217cb0a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority` Documentation -The `gatewaycertificateauthority` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewaycertificateauthority` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/client.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/client.go index 82e3bc25dd6..e2177530edd 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/client.go @@ -15,7 +15,7 @@ type GatewayCertificateAuthorityClient struct { } func NewGatewayCertificateAuthorityClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayCertificateAuthorityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayCertificateAuthorityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go index 1d7f6784836..f75937cbd0a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_certificateauthority.go @@ -46,7 +46,7 @@ func ParseCertificateAuthorityID(input string) (*CertificateAuthorityId, error) } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCertificateAuthorityIDInsensitively(input string) (*CertificateAuthori } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go index d3a20376e39..858de5997f3 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_createorupdate.go index 421099fff39..70b2eddae89 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayCertificateAuthorityClient) CreateOrUpdate(ctx context.Context, i var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_delete.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_delete.go index a6b9d901d6b..677ee184d41 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_get.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_get.go index 2a8a3c51cfd..3e558c2cc6a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_get.go @@ -45,7 +45,6 @@ func (c GatewayCertificateAuthorityClient) Get(ctx context.Context, id Certifica var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_listbyservice.go index c1b242e9166..93075c633f1 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/version.go b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/version.go index 097da870211..a11df043689 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaycertificateauthority/version.go @@ -1,12 +1,10 @@ package gatewaycertificateauthority -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaycertificateauthority/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaycertificateauthority/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/README.md b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/README.md index 349395c6fc3..e75f0128fe0 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken` Documentation -The `gatewaygeneratetoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewaygeneratetoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/client.go b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/client.go index ea0ee9040c7..95794c5f810 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/client.go @@ -15,7 +15,7 @@ type GatewayGenerateTokenClient struct { } func NewGatewayGenerateTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayGenerateTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayGenerateTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/id_gateway.go index 787aea2af5b..941bccb3007 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go index 7b0e8529654..99077ba9533 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go @@ -50,7 +50,6 @@ func (c GatewayGenerateTokenClient) GatewayGenerateToken(ctx context.Context, id var model GatewayTokenContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/version.go b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/version.go index 2e101f051f9..5374b9a300a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaygeneratetoken/version.go @@ -1,12 +1,10 @@ package gatewaygeneratetoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaygeneratetoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaygeneratetoken/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/README.md b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/README.md index 4630be18a59..1cb24db5b35 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration` Documentation -The `gatewayhostnameconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewayhostnameconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/client.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/client.go index caf1c71d205..abf6519743b 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/client.go @@ -15,7 +15,7 @@ type GatewayHostnameConfigurationClient struct { } func NewGatewayHostnameConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayHostnameConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayHostnameConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go index 7864dddfacb..0987213e9cf 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go index 510bff297ac..23c006e4969 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go @@ -46,7 +46,7 @@ func ParseHostnameConfigurationID(input string) (*HostnameConfigurationId, error } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHostnameConfigurationIDInsensitively(input string) (*HostnameConfigura } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_createorupdate.go index 81fc99af124..c47366added 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayHostnameConfigurationClient) CreateOrUpdate(ctx context.Context, var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_delete.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_delete.go index 0964c8fdc78..609e8369ace 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_get.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_get.go index d04e4ef66d0..8a74f63cf02 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c GatewayHostnameConfigurationClient) Get(ctx context.Context, id Hostname var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_listbyservice.go index 619bbf3fcd1..fde20e31a6c 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/version.go b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/version.go index c5b6ebffa30..00b4ed260da 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayhostnameconfiguration/version.go @@ -1,12 +1,10 @@ package gatewayhostnameconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayhostnameconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayhostnameconfiguration/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/README.md b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/README.md index b922c1ca9fd..82685398055 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewaylistkeys` Documentation -The `gatewaylistkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewaylistkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/client.go b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/client.go index a9b08e9562a..a54653f751f 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/client.go @@ -15,7 +15,7 @@ type GatewayListKeysClient struct { } func NewGatewayListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/id_gateway.go index 9d53f351731..a6e34ce730a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/method_gatewaylistkeys.go b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/method_gatewaylistkeys.go index 902dad2ac34..d68ec89a5d7 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/method_gatewaylistkeys.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/method_gatewaylistkeys.go @@ -46,7 +46,6 @@ func (c GatewayListKeysClient) GatewayListKeys(ctx context.Context, id GatewayId var model GatewayKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/version.go b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/version.go index 01e9152a422..73f5a48074e 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewaylistkeys/version.go @@ -1,12 +1,10 @@ package gatewaylistkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistkeys/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/README.md b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/README.md index e86136fad16..752479f8de8 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/README.md +++ b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey` Documentation -The `gatewayregeneratekey` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `gatewayregeneratekey` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/client.go b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/client.go index aef06aab007..2770f325934 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/client.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/client.go @@ -15,7 +15,7 @@ type GatewayRegenerateKeyClient struct { } func NewGatewayRegenerateKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayRegenerateKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayRegenerateKeyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/id_gateway.go b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/id_gateway.go index c8c620bc777..73626ffbe42 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/id_gateway.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/version.go b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/version.go index 69f53a2213d..37f3b4eb74a 100644 --- a/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/version.go +++ b/resource-manager/apimanagement/2022-08-01/gatewayregeneratekey/version.go @@ -1,12 +1,10 @@ package gatewayregeneratekey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayregeneratekey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayregeneratekey/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/README.md b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/README.md index 1d724ce9b5d..63bbd166970 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/README.md +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/graphqlapiresolver` Documentation -The `graphqlapiresolver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `graphqlapiresolver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/client.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/client.go index ae9f7510594..b3ebac8625f 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/client.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverClient struct { } func NewGraphQLApiResolverClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_api.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_api.go index 3f2483494f0..23aa990c8b9 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_api.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_resolver.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_resolver.go index 3ff37f45676..adda4626050 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_resolver.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_createorupdate.go index 7860204fd3c..fde71d2c4d5 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverClient) CreateOrUpdate(ctx context.Context, id Resolve var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_delete.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_delete.go index 914915dc4d6..1c1c2965313 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_get.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_get.go index 8090c144df8..7209e49cd71 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_get.go @@ -45,7 +45,6 @@ func (c GraphQLApiResolverClient) Get(ctx context.Context, id ResolverId) (resul var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_listbyapi.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_listbyapi.go index 5ce194fb6df..3631d4d14b3 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_listbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_update.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_update.go index 3fa45e6fa93..91e1176b64b 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GraphQLApiResolverClient) Update(ctx context.Context, id ResolverId, inp var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/version.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/version.go index b1978b75b36..8e9ad4be1fa 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/version.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolver/version.go @@ -1,12 +1,10 @@ package graphqlapiresolver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolver/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/README.md b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/README.md index fa578b292da..adf475e6a2d 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/README.md +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy` Documentation -The `graphqlapiresolverpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `graphqlapiresolverpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/client.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/client.go index 28db0b0bef5..4f9c0d8efbd 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/client.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverPolicyClient struct { } func NewGraphQLApiResolverPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/id_resolver.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/id_resolver.go index 84768e215d7..db5373379f0 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/id_resolver.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_createorupdate.go index c349e81087a..0ba357fe731 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverPolicyClient) CreateOrUpdate(ctx context.Context, id R var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_delete.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_delete.go index 619ea1f6171..0cd91cb1b2e 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_get.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_get.go index 4e49bd17793..5299c3d59cf 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GraphQLApiResolverPolicyClient) Get(ctx context.Context, id ResolverId, var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/version.go b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/version.go index 1f8fdb34ddf..06d6e0a58e0 100644 --- a/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/version.go +++ b/resource-manager/apimanagement/2022-08-01/graphqlapiresolverpolicy/version.go @@ -1,12 +1,10 @@ package graphqlapiresolverpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolverpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolverpolicy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/group/README.md b/resource-manager/apimanagement/2022-08-01/group/README.md index ec143da102b..499f2f08b0a 100644 --- a/resource-manager/apimanagement/2022-08-01/group/README.md +++ b/resource-manager/apimanagement/2022-08-01/group/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/group` Documentation -The `group` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `group` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/group/client.go b/resource-manager/apimanagement/2022-08-01/group/client.go index 0301e35f4e8..d2ad0ba440e 100644 --- a/resource-manager/apimanagement/2022-08-01/group/client.go +++ b/resource-manager/apimanagement/2022-08-01/group/client.go @@ -15,7 +15,7 @@ type GroupClient struct { } func NewGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "group", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "group", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/group/id_group.go b/resource-manager/apimanagement/2022-08-01/group/id_group.go index 033b00db2ff..d509f57a395 100644 --- a/resource-manager/apimanagement/2022-08-01/group/id_group.go +++ b/resource-manager/apimanagement/2022-08-01/group/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/group/id_service.go b/resource-manager/apimanagement/2022-08-01/group/id_service.go index b997cba49d0..8218c363385 100644 --- a/resource-manager/apimanagement/2022-08-01/group/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/group/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/group/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/group/method_createorupdate.go index e8b639dbe8b..563de8537b1 100644 --- a/resource-manager/apimanagement/2022-08-01/group/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/group/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) CreateOrUpdate(ctx context.Context, id GroupId, input Group var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/group/method_delete.go b/resource-manager/apimanagement/2022-08-01/group/method_delete.go index b7358fde533..47829929156 100644 --- a/resource-manager/apimanagement/2022-08-01/group/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/group/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/group/method_get.go b/resource-manager/apimanagement/2022-08-01/group/method_get.go index 71da80e4425..63a857ba29a 100644 --- a/resource-manager/apimanagement/2022-08-01/group/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/group/method_get.go @@ -45,7 +45,6 @@ func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationRe var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/group/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/group/method_listbyservice.go index 4f8da96ef4a..e7c287794fb 100644 --- a/resource-manager/apimanagement/2022-08-01/group/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/group/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/group/method_update.go b/resource-manager/apimanagement/2022-08-01/group/method_update.go index 70066730bb1..cea5374d418 100644 --- a/resource-manager/apimanagement/2022-08-01/group/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/group/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) Update(ctx context.Context, id GroupId, input GroupUpdatePa var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/group/version.go b/resource-manager/apimanagement/2022-08-01/group/version.go index 3bd4c4e8b25..6268754d44b 100644 --- a/resource-manager/apimanagement/2022-08-01/group/version.go +++ b/resource-manager/apimanagement/2022-08-01/group/version.go @@ -1,12 +1,10 @@ package group -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/group/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/group/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/README.md b/resource-manager/apimanagement/2022-08-01/groupuser/README.md index 43308179ff3..9c5ee98807b 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/README.md +++ b/resource-manager/apimanagement/2022-08-01/groupuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/groupuser` Documentation -The `groupuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `groupuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/client.go b/resource-manager/apimanagement/2022-08-01/groupuser/client.go index 7a2d9304c73..0883ae96e68 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/client.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/client.go @@ -15,7 +15,7 @@ type GroupUserClient struct { } func NewGroupUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go b/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go index 1cacd14ecf9..3c0f4c0569f 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go b/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go index 57de3d320e8..e6aa7e8ae21 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/id_groupuser.go @@ -46,7 +46,7 @@ func ParseGroupUserID(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/method_create.go b/resource-manager/apimanagement/2022-08-01/groupuser/method_create.go index 6dc8112254d..fd3d625df67 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/method_create.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/method_create.go @@ -46,7 +46,6 @@ func (c GroupUserClient) Create(ctx context.Context, id GroupUserId) (result Cre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/method_list.go b/resource-manager/apimanagement/2022-08-01/groupuser/method_list.go index b2f4d682063..002cd3d1fbf 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/groupuser/version.go b/resource-manager/apimanagement/2022-08-01/groupuser/version.go index 786ee40b5a1..670b84249cb 100644 --- a/resource-manager/apimanagement/2022-08-01/groupuser/version.go +++ b/resource-manager/apimanagement/2022-08-01/groupuser/version.go @@ -1,12 +1,10 @@ package groupuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupuser/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/README.md b/resource-manager/apimanagement/2022-08-01/identityprovider/README.md index 64c97f489c6..bfaad475144 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/README.md +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/identityprovider` Documentation -The `identityprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `identityprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/client.go b/resource-manager/apimanagement/2022-08-01/identityprovider/client.go index ba2ed8bbee1..f9a62f0de7c 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/client.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/client.go @@ -15,7 +15,7 @@ type IdentityProviderClient struct { } func NewIdentityProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*IdentityProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "identityprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "identityprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IdentityProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go b/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go index 3d474aaec02..2def4ce6e59 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/id_identityprovider.go @@ -44,7 +44,7 @@ func ParseIdentityProviderID(input string) (*IdentityProviderId, error) { } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIdentityProviderIDInsensitively(input string) (*IdentityProviderId, er } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go b/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go index 8276034f3e7..d2022417e8e 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/identityprovider/method_createorupdate.go index 834adf0fae9..b42e0767573 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c IdentityProviderClient) CreateOrUpdate(ctx context.Context, id IdentityP var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/method_delete.go b/resource-manager/apimanagement/2022-08-01/identityprovider/method_delete.go index 825d432de2b..eabfcbc6daa 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/method_get.go b/resource-manager/apimanagement/2022-08-01/identityprovider/method_get.go index a7550d92bb0..2328ee95ee7 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/method_get.go @@ -45,7 +45,6 @@ func (c IdentityProviderClient) Get(ctx context.Context, id IdentityProviderId) var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/identityprovider/method_listsecrets.go index 284d5e3aa2b..0f370b89eaf 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c IdentityProviderClient) ListSecrets(ctx context.Context, id IdentityProv var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/method_update.go b/resource-manager/apimanagement/2022-08-01/identityprovider/method_update.go index ac8db539b33..92a7c2f8818 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c IdentityProviderClient) Update(ctx context.Context, id IdentityProviderI var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/identityprovider/version.go b/resource-manager/apimanagement/2022-08-01/identityprovider/version.go index c27444a14da..8db08fc6b42 100644 --- a/resource-manager/apimanagement/2022-08-01/identityprovider/version.go +++ b/resource-manager/apimanagement/2022-08-01/identityprovider/version.go @@ -1,12 +1,10 @@ package identityprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/identityprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/identityprovider/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/issue/README.md b/resource-manager/apimanagement/2022-08-01/issue/README.md index c8107a43ec9..46625ca78dc 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/README.md +++ b/resource-manager/apimanagement/2022-08-01/issue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/issue` Documentation -The `issue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `issue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/issue/client.go b/resource-manager/apimanagement/2022-08-01/issue/client.go index cb06d0ebaca..e2e870934db 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/client.go +++ b/resource-manager/apimanagement/2022-08-01/issue/client.go @@ -15,7 +15,7 @@ type IssueClient struct { } func NewIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*IssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "issue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "issue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/issue/id_issue.go b/resource-manager/apimanagement/2022-08-01/issue/id_issue.go index 45eb9485335..401c80ae524 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/id_issue.go +++ b/resource-manager/apimanagement/2022-08-01/issue/id_issue.go @@ -44,7 +44,7 @@ func ParseIssueID(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIssueIDInsensitively(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/issue/id_service.go b/resource-manager/apimanagement/2022-08-01/issue/id_service.go index 88e8a90de0c..4b3d26c86cb 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/issue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/issue/method_get.go b/resource-manager/apimanagement/2022-08-01/issue/method_get.go index 69cfbc200fa..791db4dd8c3 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/issue/method_get.go @@ -45,7 +45,6 @@ func (c IssueClient) Get(ctx context.Context, id IssueId) (result GetOperationRe var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/issue/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/issue/method_listbyservice.go index bdf1aa92398..743f676c948 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/issue/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/issue/version.go b/resource-manager/apimanagement/2022-08-01/issue/version.go index 8ca0b9ebaa3..d5947e2d6cc 100644 --- a/resource-manager/apimanagement/2022-08-01/issue/version.go +++ b/resource-manager/apimanagement/2022-08-01/issue/version.go @@ -1,12 +1,10 @@ package issue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/issue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/issue/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/logger/README.md b/resource-manager/apimanagement/2022-08-01/logger/README.md index 12d55208b07..27831691a4d 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/README.md +++ b/resource-manager/apimanagement/2022-08-01/logger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/logger` Documentation -The `logger` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `logger` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/logger/client.go b/resource-manager/apimanagement/2022-08-01/logger/client.go index c7b58012a84..2ecf8e82720 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/client.go +++ b/resource-manager/apimanagement/2022-08-01/logger/client.go @@ -15,7 +15,7 @@ type LoggerClient struct { } func NewLoggerClientWithBaseURI(sdkApi sdkEnv.Api) (*LoggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoggerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/logger/id_logger.go b/resource-manager/apimanagement/2022-08-01/logger/id_logger.go index ebf285cefca..cb5c5cca792 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/id_logger.go +++ b/resource-manager/apimanagement/2022-08-01/logger/id_logger.go @@ -44,7 +44,7 @@ func ParseLoggerID(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoggerIDInsensitively(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/logger/id_service.go b/resource-manager/apimanagement/2022-08-01/logger/id_service.go index e5a5d44be9e..e47928df93b 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/logger/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/logger/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/logger/method_createorupdate.go index b1a476b3cf9..3430cb9dd77 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/logger/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c LoggerClient) CreateOrUpdate(ctx context.Context, id LoggerId, input Log var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/logger/method_delete.go b/resource-manager/apimanagement/2022-08-01/logger/method_delete.go index d1edc7304d6..3465b8ec829 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/logger/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/logger/method_get.go b/resource-manager/apimanagement/2022-08-01/logger/method_get.go index dd5216620ea..7a6f1ba10d6 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/logger/method_get.go @@ -45,7 +45,6 @@ func (c LoggerClient) Get(ctx context.Context, id LoggerId) (result GetOperation var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/logger/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/logger/method_listbyservice.go index 3765ffa1f12..d930656f267 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/logger/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/logger/method_update.go b/resource-manager/apimanagement/2022-08-01/logger/method_update.go index e7491dd03c2..66980330556 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/logger/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LoggerClient) Update(ctx context.Context, id LoggerId, input LoggerUpdat var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/logger/version.go b/resource-manager/apimanagement/2022-08-01/logger/version.go index 408041bafe7..ce5ef56abb3 100644 --- a/resource-manager/apimanagement/2022-08-01/logger/version.go +++ b/resource-manager/apimanagement/2022-08-01/logger/version.go @@ -1,12 +1,10 @@ package logger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logger/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/README.md b/resource-manager/apimanagement/2022-08-01/namedvalue/README.md index 8052dc0d893..75665d4390a 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/README.md +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/namedvalue` Documentation -The `namedvalue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `namedvalue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/client.go b/resource-manager/apimanagement/2022-08-01/namedvalue/client.go index 9bc64e690ca..043c376438d 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/client.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/client.go @@ -15,7 +15,7 @@ type NamedValueClient struct { } func NewNamedValueClientWithBaseURI(sdkApi sdkEnv.Api) (*NamedValueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namedvalue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namedvalue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamedValueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go b/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go index 960d341eb81..2d7156d678b 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/id_namedvalue.go @@ -44,7 +44,7 @@ func ParseNamedValueID(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go b/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go index 3e71ff3a6f0..9c5b179b85f 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_createorupdate.go index 85ad5426efe..2d71d51b1cc 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_delete.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_delete.go index f47f9ad5955..d071bb811bf 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_get.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_get.go index b4f6fc01960..208dc6dcff4 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_get.go @@ -45,7 +45,6 @@ func (c NamedValueClient) Get(ctx context.Context, id NamedValueId) (result GetO var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_listbyservice.go index c484c236266..328935f3ddb 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_listvalue.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_listvalue.go index 80e6212cce7..010f8359421 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_listvalue.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_listvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) ListValue(ctx context.Context, id NamedValueId) (resul var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/method_update.go b/resource-manager/apimanagement/2022-08-01/namedvalue/method_update.go index 0bb9dff4811..a22327f3f7a 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/namedvalue/version.go b/resource-manager/apimanagement/2022-08-01/namedvalue/version.go index 3d6d7a943e7..efe25294c3d 100644 --- a/resource-manager/apimanagement/2022-08-01/namedvalue/version.go +++ b/resource-manager/apimanagement/2022-08-01/namedvalue/version.go @@ -1,12 +1,10 @@ package namedvalue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namedvalue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namedvalue/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/README.md b/resource-manager/apimanagement/2022-08-01/networkstatus/README.md index 841c7b40906..2f7be418a9d 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/README.md +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/networkstatus` Documentation -The `networkstatus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `networkstatus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/client.go b/resource-manager/apimanagement/2022-08-01/networkstatus/client.go index a31324aaa99..0f7b98b9964 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/client.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/client.go @@ -15,7 +15,7 @@ type NetworkStatusClient struct { } func NewNetworkStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkStatusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/id_location.go b/resource-manager/apimanagement/2022-08-01/networkstatus/id_location.go index 33d1e89e60c..4805bc32949 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/id_location.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/id_location.go @@ -44,7 +44,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/id_service.go b/resource-manager/apimanagement/2022-08-01/networkstatus/id_service.go index 16676b5b068..5ef7bf317d5 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbylocation.go b/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbylocation.go index 2ac16a461cc..6d070726da4 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbylocation.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbylocation.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByLocation(ctx context.Context, id LocationId) var model NetworkStatusContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbyservice.go index 82df8dfdf78..3cd4e1561af 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/method_listbyservice.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByService(ctx context.Context, id ServiceId) (r var model []NetworkStatusContractByLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/networkstatus/version.go b/resource-manager/apimanagement/2022-08-01/networkstatus/version.go index bf824f62abb..5854fb78a68 100644 --- a/resource-manager/apimanagement/2022-08-01/networkstatus/version.go +++ b/resource-manager/apimanagement/2022-08-01/networkstatus/version.go @@ -1,12 +1,10 @@ package networkstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkstatus/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/notification/README.md b/resource-manager/apimanagement/2022-08-01/notification/README.md index 5e19ed6eb34..875d9487024 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/README.md +++ b/resource-manager/apimanagement/2022-08-01/notification/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notification` Documentation -The `notification` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `notification` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/notification/client.go b/resource-manager/apimanagement/2022-08-01/notification/client.go index 277470faa23..40e630b60f8 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/client.go +++ b/resource-manager/apimanagement/2022-08-01/notification/client.go @@ -15,7 +15,7 @@ type NotificationClient struct { } func NewNotificationClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notification", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notification", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/notification/id_notification.go b/resource-manager/apimanagement/2022-08-01/notification/id_notification.go index 39c82639f30..cf908edb898 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/id_notification.go +++ b/resource-manager/apimanagement/2022-08-01/notification/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notification/id_service.go b/resource-manager/apimanagement/2022-08-01/notification/id_service.go index a9b6b10ca5c..a5410a065b4 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/notification/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notification/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/notification/method_createorupdate.go index f66ed7aa163..ef2314ee9a9 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/notification/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) CreateOrUpdate(ctx context.Context, id NotificationI var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/notification/method_get.go b/resource-manager/apimanagement/2022-08-01/notification/method_get.go index 21cc5b2b6f4..0a063938dee 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/notification/method_get.go @@ -45,7 +45,6 @@ func (c NotificationClient) Get(ctx context.Context, id NotificationId) (result var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/notification/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/notification/method_listbyservice.go index b8f071f58f8..8dbc79c16d5 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/notification/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/notification/version.go b/resource-manager/apimanagement/2022-08-01/notification/version.go index 93b4c512d55..c4ba63133fd 100644 --- a/resource-manager/apimanagement/2022-08-01/notification/version.go +++ b/resource-manager/apimanagement/2022-08-01/notification/version.go @@ -1,12 +1,10 @@ package notification -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notification/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notification/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/README.md b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/README.md index 8c520fd2446..ace47b60907 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/README.md +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientemail` Documentation -The `notificationrecipientemail` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `notificationrecipientemail` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/client.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/client.go index 9975fccb850..f9007de8d12 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/client.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/client.go @@ -15,7 +15,7 @@ type NotificationRecipientEmailClient struct { } func NewNotificationRecipientEmailClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientEmailClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientemail", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientemail", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientEmailClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go index 85bab8ef752..6d666b57152 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go index ed228835ce6..24a344f3668 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/id_recipientemail.go @@ -46,7 +46,7 @@ func ParseRecipientEmailID(input string) (*RecipientEmailId, error) { } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientEmailIDInsensitively(input string) (*RecipientEmailId, error) } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/method_createorupdate.go index c9ff8f4f049..204db2f61d9 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, id var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/version.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/version.go index db66592fabb..78632e4fae4 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/version.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientemail/version.go @@ -1,12 +1,10 @@ package notificationrecipientemail -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientemail/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientemail/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/README.md b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/README.md index 4a929ac0a40..7c73a9c33ba 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/README.md +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/notificationrecipientuser` Documentation -The `notificationrecipientuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `notificationrecipientuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/client.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/client.go index 3049dccc74b..28fb21100d5 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/client.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/client.go @@ -15,7 +15,7 @@ type NotificationRecipientUserClient struct { } func NewNotificationRecipientUserClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go index 525816f0e3b..e013481d0f6 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go index 1c6e88f7af0..3b5d7039da1 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/id_recipientuser.go @@ -46,7 +46,7 @@ func ParseRecipientUserID(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientUserIDInsensitively(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/method_createorupdate.go index 0736b330824..8cdb56c5521 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, id var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/version.go b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/version.go index 58f6ab4a475..960d2291ef1 100644 --- a/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/version.go +++ b/resource-manager/apimanagement/2022-08-01/notificationrecipientuser/version.go @@ -1,12 +1,10 @@ package notificationrecipientuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientuser/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/README.md b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/README.md index 3e3b0f0de8d..d9d762de1b1 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/README.md +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/openidconnectprovider` Documentation -The `openidconnectprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `openidconnectprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/client.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/client.go index 6b2113dfc3d..01917915c80 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/client.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/client.go @@ -15,7 +15,7 @@ type OpenidConnectProviderClient struct { } func NewOpenidConnectProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenidConnectProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openidconnectprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openidconnectprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenidConnectProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go index b1e20b39388..c51f53b0377 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_openidconnectprovider.go @@ -44,7 +44,7 @@ func ParseOpenidConnectProviderID(input string) (*OpenidConnectProviderId, error } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOpenidConnectProviderIDInsensitively(input string) (*OpenidConnectProv } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go index 992d2595802..7493219e726 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_createorupdate.go index ab5c53bdaa6..61c01cf6b96 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c OpenidConnectProviderClient) CreateOrUpdate(ctx context.Context, id Open var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_delete.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_delete.go index d434f5eff61..f254a016bd7 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_get.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_get.go index 642a146fa5f..216dd2c005c 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_get.go @@ -45,7 +45,6 @@ func (c OpenidConnectProviderClient) Get(ctx context.Context, id OpenidConnectPr var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listbyservice.go index a4b2de8c3dc..5fad44984c9 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listsecrets.go index 39b0cbb3857..99cf943206f 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c OpenidConnectProviderClient) ListSecrets(ctx context.Context, id OpenidC var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_update.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_update.go index fc095d745c7..2f800589ad0 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OpenidConnectProviderClient) Update(ctx context.Context, id OpenidConnec var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/version.go b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/version.go index 186262c4c63..bc4a0c03bca 100644 --- a/resource-manager/apimanagement/2022-08-01/openidconnectprovider/version.go +++ b/resource-manager/apimanagement/2022-08-01/openidconnectprovider/version.go @@ -1,12 +1,10 @@ package openidconnectprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openidconnectprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openidconnectprovider/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/README.md index d5acc441ff7..002cbfe6122 100644 --- a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/id_service.go b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/id_service.go index a2a71284e3f..c0c218b10e7 100644 --- a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/version.go index e97d0beb11b..490b653b1f6 100644 --- a/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/apimanagement/2022-08-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/README.md b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/README.md index a41d4dcd30d..d1b894b9371 100644 --- a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/README.md +++ b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/performconnectivitycheck` Documentation -The `performconnectivitycheck` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `performconnectivitycheck` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/client.go b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/client.go index a491979992c..377311cd668 100644 --- a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/client.go +++ b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/client.go @@ -15,7 +15,7 @@ type PerformConnectivityCheckClient struct { } func NewPerformConnectivityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*PerformConnectivityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "performconnectivitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "performconnectivitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PerformConnectivityCheckClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/id_service.go b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/id_service.go index 6a34f7693f4..ed3403137c8 100644 --- a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/version.go b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/version.go index 6d9eedf62f5..63dae813a05 100644 --- a/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/version.go +++ b/resource-manager/apimanagement/2022-08-01/performconnectivitycheck/version.go @@ -1,12 +1,10 @@ package performconnectivitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/performconnectivitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/performconnectivitycheck/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/policy/README.md b/resource-manager/apimanagement/2022-08-01/policy/README.md index 1920cd0a6d7..08cd266c958 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/README.md +++ b/resource-manager/apimanagement/2022-08-01/policy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policy` Documentation -The `policy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `policy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/policy/client.go b/resource-manager/apimanagement/2022-08-01/policy/client.go index 216d1f1ff33..d95ac216bf6 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/client.go +++ b/resource-manager/apimanagement/2022-08-01/policy/client.go @@ -15,7 +15,7 @@ type PolicyClient struct { } func NewPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/policy/id_service.go b/resource-manager/apimanagement/2022-08-01/policy/id_service.go index 509f96c5a3f..8fac046b789 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/policy/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/policy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/policy/method_createorupdate.go index 3bfe1519731..bc08c50ab8d 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/policy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyClient) CreateOrUpdate(ctx context.Context, id ServiceId, input Po var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/policy/method_delete.go b/resource-manager/apimanagement/2022-08-01/policy/method_delete.go index 4b39d1a4a2d..f3ab4b889c9 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/policy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/policy/method_get.go b/resource-manager/apimanagement/2022-08-01/policy/method_get.go index 5a9a428f5ec..10e71f38f95 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/policy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyClient) Get(ctx context.Context, id ServiceId, options GetOperatio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/policy/version.go b/resource-manager/apimanagement/2022-08-01/policy/version.go index 4455d39bfa9..295a93e1997 100644 --- a/resource-manager/apimanagement/2022-08-01/policy/version.go +++ b/resource-manager/apimanagement/2022-08-01/policy/version.go @@ -1,12 +1,10 @@ package policy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/policydescription/README.md b/resource-manager/apimanagement/2022-08-01/policydescription/README.md index ec1feb28748..89b7aa96e02 100644 --- a/resource-manager/apimanagement/2022-08-01/policydescription/README.md +++ b/resource-manager/apimanagement/2022-08-01/policydescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policydescription` Documentation -The `policydescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `policydescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/policydescription/client.go b/resource-manager/apimanagement/2022-08-01/policydescription/client.go index 70daacb1cfc..511edea86c1 100644 --- a/resource-manager/apimanagement/2022-08-01/policydescription/client.go +++ b/resource-manager/apimanagement/2022-08-01/policydescription/client.go @@ -15,7 +15,7 @@ type PolicyDescriptionClient struct { } func NewPolicyDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policydescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policydescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/policydescription/id_service.go b/resource-manager/apimanagement/2022-08-01/policydescription/id_service.go index 41cef29b463..ff29eb10b4a 100644 --- a/resource-manager/apimanagement/2022-08-01/policydescription/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/policydescription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/policydescription/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/policydescription/method_listbyservice.go index cb12120f377..4535c14aaa4 100644 --- a/resource-manager/apimanagement/2022-08-01/policydescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/policydescription/method_listbyservice.go @@ -34,6 +34,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyDescriptionClient) ListByService(ctx context.Context, id ServiceId var model PolicyDescriptionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/policydescription/version.go b/resource-manager/apimanagement/2022-08-01/policydescription/version.go index cebe80f5354..6aa2fcc8978 100644 --- a/resource-manager/apimanagement/2022-08-01/policydescription/version.go +++ b/resource-manager/apimanagement/2022-08-01/policydescription/version.go @@ -1,12 +1,10 @@ package policydescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policydescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policydescription/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/README.md b/resource-manager/apimanagement/2022-08-01/policyfragment/README.md index 5aaf6a77d0b..37d00baca55 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/README.md +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/policyfragment` Documentation -The `policyfragment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `policyfragment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/client.go b/resource-manager/apimanagement/2022-08-01/policyfragment/client.go index 3dbe1d43bb7..d14dc485991 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/client.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/client.go @@ -15,7 +15,7 @@ type PolicyFragmentClient struct { } func NewPolicyFragmentClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyFragmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyfragment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyfragment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyFragmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/id_policyfragment.go b/resource-manager/apimanagement/2022-08-01/policyfragment/id_policyfragment.go index 3737ed73101..538e36d518f 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/id_policyfragment.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/id_policyfragment.go @@ -44,7 +44,7 @@ func ParsePolicyFragmentID(input string) (*PolicyFragmentId, error) { } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyFragmentIDInsensitively(input string) (*PolicyFragmentId, error) } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/id_service.go b/resource-manager/apimanagement/2022-08-01/policyfragment/id_service.go index e0ab31ef120..b5efade5d1c 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_createorupdate.go index 03cb7db852a..6ebf334fa79 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/method_delete.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_delete.go index 8a0d95204ce..219af78163c 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/method_get.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_get.go index 3aa646fafdd..12ac1b4fbf3 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) Get(ctx context.Context, id PolicyFragmentId, opti var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listbyservice.go index e9fcb07b896..c6ab48e11ac 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go index 37993c71c0d..d513c06b276 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/method_listreferences.go @@ -40,6 +40,7 @@ func (o ListReferencesOperationOptions) ToHeaders() *client.Headers { func (o ListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/policyfragment/version.go b/resource-manager/apimanagement/2022-08-01/policyfragment/version.go index 80d940bd87e..54d49e91a39 100644 --- a/resource-manager/apimanagement/2022-08-01/policyfragment/version.go +++ b/resource-manager/apimanagement/2022-08-01/policyfragment/version.go @@ -1,12 +1,10 @@ package policyfragment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyfragment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyfragment/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/README.md b/resource-manager/apimanagement/2022-08-01/portalconfig/README.md index f54b05ee168..b9e8af09cc0 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/README.md +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/portalconfig` Documentation -The `portalconfig` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `portalconfig` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/client.go b/resource-manager/apimanagement/2022-08-01/portalconfig/client.go index 5c58ba3ea50..b02c0eb1e23 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/client.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/client.go @@ -15,7 +15,7 @@ type PortalConfigClient struct { } func NewPortalConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalConfigClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/id_portalconfig.go b/resource-manager/apimanagement/2022-08-01/portalconfig/id_portalconfig.go index 4217e87e470..1eee4ff6349 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/id_portalconfig.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/id_portalconfig.go @@ -44,7 +44,7 @@ func ParsePortalConfigID(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalConfigIDInsensitively(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/id_service.go b/resource-manager/apimanagement/2022-08-01/portalconfig/id_service.go index fe235ccce02..25a796d7e39 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/portalconfig/method_createorupdate.go index 94bdf726259..13a9427637b 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) CreateOrUpdate(ctx context.Context, id PortalConfigI var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/method_get.go b/resource-manager/apimanagement/2022-08-01/portalconfig/method_get.go index 755476c6e67..e4377dd925f 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/method_get.go @@ -45,7 +45,6 @@ func (c PortalConfigClient) Get(ctx context.Context, id PortalConfigId) (result var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/method_update.go b/resource-manager/apimanagement/2022-08-01/portalconfig/method_update.go index fce54b73ff3..e003b060e70 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) Update(ctx context.Context, id PortalConfigId, input var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/portalconfig/version.go b/resource-manager/apimanagement/2022-08-01/portalconfig/version.go index 4c8652b5e83..c0cb287336d 100644 --- a/resource-manager/apimanagement/2022-08-01/portalconfig/version.go +++ b/resource-manager/apimanagement/2022-08-01/portalconfig/version.go @@ -1,12 +1,10 @@ package portalconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalconfig/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/README.md b/resource-manager/apimanagement/2022-08-01/portalrevision/README.md index 0e1acfcce4b..e88c4acaa2f 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/README.md +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/portalrevision` Documentation -The `portalrevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `portalrevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/client.go b/resource-manager/apimanagement/2022-08-01/portalrevision/client.go index 4f2fa253331..3ac3319b56b 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/client.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/client.go @@ -15,7 +15,7 @@ type PortalRevisionClient struct { } func NewPortalRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalrevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalrevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/id_portalrevision.go b/resource-manager/apimanagement/2022-08-01/portalrevision/id_portalrevision.go index a4ef40e0335..66cce216fe8 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/id_portalrevision.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/id_portalrevision.go @@ -44,7 +44,7 @@ func ParsePortalRevisionID(input string) (*PortalRevisionId, error) { } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalRevisionIDInsensitively(input string) (*PortalRevisionId, error) } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/id_service.go b/resource-manager/apimanagement/2022-08-01/portalrevision/id_service.go index 6d27c56ea22..12e905cecaa 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/method_get.go b/resource-manager/apimanagement/2022-08-01/portalrevision/method_get.go index 02c07947f35..e7e39cc491d 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/method_get.go @@ -45,7 +45,6 @@ func (c PortalRevisionClient) Get(ctx context.Context, id PortalRevisionId) (res var model PortalRevisionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/portalrevision/method_listbyservice.go index 57df46678e2..1dfec707d1e 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/method_update.go b/resource-manager/apimanagement/2022-08-01/portalrevision/method_update.go index e3568960b04..b2c05e16d03 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/portalrevision/version.go b/resource-manager/apimanagement/2022-08-01/portalrevision/version.go index 5d4c348b868..5f2efe55754 100644 --- a/resource-manager/apimanagement/2022-08-01/portalrevision/version.go +++ b/resource-manager/apimanagement/2022-08-01/portalrevision/version.go @@ -1,12 +1,10 @@ package portalrevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalrevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalrevision/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/portalsettings/README.md b/resource-manager/apimanagement/2022-08-01/portalsettings/README.md index 98e32d31080..73b4d102849 100644 --- a/resource-manager/apimanagement/2022-08-01/portalsettings/README.md +++ b/resource-manager/apimanagement/2022-08-01/portalsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/portalsettings` Documentation -The `portalsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `portalsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/portalsettings/client.go b/resource-manager/apimanagement/2022-08-01/portalsettings/client.go index 787e842a856..554097bdccf 100644 --- a/resource-manager/apimanagement/2022-08-01/portalsettings/client.go +++ b/resource-manager/apimanagement/2022-08-01/portalsettings/client.go @@ -15,7 +15,7 @@ type PortalSettingsClient struct { } func NewPortalSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/portalsettings/id_service.go b/resource-manager/apimanagement/2022-08-01/portalsettings/id_service.go index 9c71fe38260..795734b8888 100644 --- a/resource-manager/apimanagement/2022-08-01/portalsettings/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/portalsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/portalsettings/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/portalsettings/method_listbyservice.go index 0dc16a6d309..cc9614449d6 100644 --- a/resource-manager/apimanagement/2022-08-01/portalsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/portalsettings/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PortalSettingsClient) ListByService(ctx context.Context, id ServiceId) ( var model PortalSettingsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/portalsettings/version.go b/resource-manager/apimanagement/2022-08-01/portalsettings/version.go index b203e720105..b80cc9a58fe 100644 --- a/resource-manager/apimanagement/2022-08-01/portalsettings/version.go +++ b/resource-manager/apimanagement/2022-08-01/portalsettings/version.go @@ -1,12 +1,10 @@ package portalsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalsettings/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/README.md b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/README.md index 9067b310fdc..5ca197c4dfc 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/README.md +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/client.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/client.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privateendpointconnection.go index 6c2da784082..cd4250e592b 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privatelinkresource.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privatelinkresource.go index dfbab21cc34..8b943560b87 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privatelinkresource.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_service.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_service.go index 6954e3bf619..1470d0578e9 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go index 79394dec05e..16876584694 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetByName(ctx var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go index 44e1bf04851..ea5fab7b453 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go index 6b9b574ef5f..fc2ec42cfe3 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByService var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go index e33993c077f..d4c86877792 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListPrivateLi var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/version.go b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/version.go index bcbc21bde1c..0b46b84dd7c 100644 --- a/resource-manager/apimanagement/2022-08-01/privateendpointconnections/version.go +++ b/resource-manager/apimanagement/2022-08-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/product/README.md b/resource-manager/apimanagement/2022-08-01/product/README.md index 81ce8c2d03e..5a86cb11eb4 100644 --- a/resource-manager/apimanagement/2022-08-01/product/README.md +++ b/resource-manager/apimanagement/2022-08-01/product/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/product` Documentation -The `product` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `product` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/product/client.go b/resource-manager/apimanagement/2022-08-01/product/client.go index 20069da6c20..787eaa28e4f 100644 --- a/resource-manager/apimanagement/2022-08-01/product/client.go +++ b/resource-manager/apimanagement/2022-08-01/product/client.go @@ -15,7 +15,7 @@ type ProductClient struct { } func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "product", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "product", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/product/id_product.go b/resource-manager/apimanagement/2022-08-01/product/id_product.go index 95f18115dce..034ad81b346 100644 --- a/resource-manager/apimanagement/2022-08-01/product/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/product/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/product/id_service.go b/resource-manager/apimanagement/2022-08-01/product/id_service.go index bb0983ca2df..948d6fd23a8 100644 --- a/resource-manager/apimanagement/2022-08-01/product/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/product/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/product/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/product/method_createorupdate.go index 2baf83fb505..07bc7cd0e1c 100644 --- a/resource-manager/apimanagement/2022-08-01/product/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/product/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) CreateOrUpdate(ctx context.Context, id ProductId, input P var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/product/method_delete.go b/resource-manager/apimanagement/2022-08-01/product/method_delete.go index afc7d184b70..28d5b7bdd7f 100644 --- a/resource-manager/apimanagement/2022-08-01/product/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/product/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/product/method_get.go b/resource-manager/apimanagement/2022-08-01/product/method_get.go index b343c0f286c..65af42031e8 100644 --- a/resource-manager/apimanagement/2022-08-01/product/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/product/method_get.go @@ -45,7 +45,6 @@ func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperati var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/product/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/product/method_listbyservice.go index b1f50c8e42d..9b47fa13709 100644 --- a/resource-manager/apimanagement/2022-08-01/product/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/product/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/product/method_update.go b/resource-manager/apimanagement/2022-08-01/product/method_update.go index fc36ecd5353..a6be0dfec29 100644 --- a/resource-manager/apimanagement/2022-08-01/product/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/product/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) Update(ctx context.Context, id ProductId, input ProductUp var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/product/version.go b/resource-manager/apimanagement/2022-08-01/product/version.go index dd6f288b59c..a8c41b04aba 100644 --- a/resource-manager/apimanagement/2022-08-01/product/version.go +++ b/resource-manager/apimanagement/2022-08-01/product/version.go @@ -1,12 +1,10 @@ package product -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/product/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/product/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/README.md b/resource-manager/apimanagement/2022-08-01/productapi/README.md index 0f3db930a6b..19f10305a0d 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/README.md +++ b/resource-manager/apimanagement/2022-08-01/productapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productapi` Documentation -The `productapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productapi/client.go b/resource-manager/apimanagement/2022-08-01/productapi/client.go index 1e0b184ff57..edeb30a1f70 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/client.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/client.go @@ -15,7 +15,7 @@ type ProductApiClient struct { } func NewProductApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/id_product.go b/resource-manager/apimanagement/2022-08-01/productapi/id_product.go index 76244a5f127..e7f5d3be4d2 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go b/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go index ac92947ceaf..38ffb06be7e 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/id_productapi.go @@ -46,7 +46,7 @@ func ParseProductApiID(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiIDInsensitively(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/productapi/method_createorupdate.go index e27e2ed31a5..afa4d070d9d 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductApiClient) CreateOrUpdate(ctx context.Context, id ProductApiId) ( var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/method_listbyproduct.go b/resource-manager/apimanagement/2022-08-01/productapi/method_listbyproduct.go index c06016675dd..4327b569ea6 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/method_listbyproduct.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productapi/version.go b/resource-manager/apimanagement/2022-08-01/productapi/version.go index 85dff7bdb52..14b7c7c6cdc 100644 --- a/resource-manager/apimanagement/2022-08-01/productapi/version.go +++ b/resource-manager/apimanagement/2022-08-01/productapi/version.go @@ -1,12 +1,10 @@ package productapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapi/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/README.md b/resource-manager/apimanagement/2022-08-01/productgroup/README.md index f86be84f899..80f121429ff 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/README.md +++ b/resource-manager/apimanagement/2022-08-01/productgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productgroup` Documentation -The `productgroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productgroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/client.go b/resource-manager/apimanagement/2022-08-01/productgroup/client.go index beb9159e3e3..2aa816ea14d 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/client.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/client.go @@ -15,7 +15,7 @@ type ProductGroupClient struct { } func NewProductGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go b/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go index df7d9abbfcd..00eaae01fd1 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go b/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go index 7ede94a7c7f..847e2e4900d 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/id_productgroup.go @@ -46,7 +46,7 @@ func ParseProductGroupID(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductGroupIDInsensitively(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/productgroup/method_createorupdate.go index 77cf8dbf10e..a518c2d0404 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductGroupClient) CreateOrUpdate(ctx context.Context, id ProductGroupI var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/method_listbyproduct.go b/resource-manager/apimanagement/2022-08-01/productgroup/method_listbyproduct.go index 902f45c4f73..fbee2e7567d 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/method_listbyproduct.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productgroup/version.go b/resource-manager/apimanagement/2022-08-01/productgroup/version.go index 6851526672a..5b8f7b93aba 100644 --- a/resource-manager/apimanagement/2022-08-01/productgroup/version.go +++ b/resource-manager/apimanagement/2022-08-01/productgroup/version.go @@ -1,12 +1,10 @@ package productgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgroup/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/README.md b/resource-manager/apimanagement/2022-08-01/productpolicy/README.md index cdedda4c3ef..0fa464ce7fb 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/README.md +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productpolicy` Documentation -The `productpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/client.go b/resource-manager/apimanagement/2022-08-01/productpolicy/client.go index e6887574aaa..a4a1d0fa474 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/client.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/client.go @@ -15,7 +15,7 @@ type ProductPolicyClient struct { } func NewProductPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go b/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go index 1b80a823c26..ecac90e889b 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/productpolicy/method_createorupdate.go index 923d04859e1..ae0329209dc 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) CreateOrUpdate(ctx context.Context, id ProductId, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/method_delete.go b/resource-manager/apimanagement/2022-08-01/productpolicy/method_delete.go index 36e74215a96..5cf9ef830f4 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/method_get.go b/resource-manager/apimanagement/2022-08-01/productpolicy/method_get.go index b96d87150c2..579a315dc9a 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) Get(ctx context.Context, id ProductId, options GetO var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productpolicy/version.go b/resource-manager/apimanagement/2022-08-01/productpolicy/version.go index f0f635d40fa..945e48a0315 100644 --- a/resource-manager/apimanagement/2022-08-01/productpolicy/version.go +++ b/resource-manager/apimanagement/2022-08-01/productpolicy/version.go @@ -1,12 +1,10 @@ package productpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productpolicy/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productsbytag/README.md b/resource-manager/apimanagement/2022-08-01/productsbytag/README.md index 3f0bfd47175..390590a6c5d 100644 --- a/resource-manager/apimanagement/2022-08-01/productsbytag/README.md +++ b/resource-manager/apimanagement/2022-08-01/productsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productsbytag` Documentation -The `productsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productsbytag/client.go b/resource-manager/apimanagement/2022-08-01/productsbytag/client.go index c87bb5f7b76..915babf141b 100644 --- a/resource-manager/apimanagement/2022-08-01/productsbytag/client.go +++ b/resource-manager/apimanagement/2022-08-01/productsbytag/client.go @@ -15,7 +15,7 @@ type ProductsByTagClient struct { } func NewProductsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productsbytag/id_service.go b/resource-manager/apimanagement/2022-08-01/productsbytag/id_service.go index 4cf290afcb1..29ba551682f 100644 --- a/resource-manager/apimanagement/2022-08-01/productsbytag/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/productsbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productsbytag/method_productlistbytags.go b/resource-manager/apimanagement/2022-08-01/productsbytag/method_productlistbytags.go index 8cffb9f2edb..6744380cbab 100644 --- a/resource-manager/apimanagement/2022-08-01/productsbytag/method_productlistbytags.go +++ b/resource-manager/apimanagement/2022-08-01/productsbytag/method_productlistbytags.go @@ -42,6 +42,7 @@ func (o ProductListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ProductListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productsbytag/version.go b/resource-manager/apimanagement/2022-08-01/productsbytag/version.go index d74c50a5827..6df905fdbca 100644 --- a/resource-manager/apimanagement/2022-08-01/productsbytag/version.go +++ b/resource-manager/apimanagement/2022-08-01/productsbytag/version.go @@ -1,12 +1,10 @@ package productsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsbytag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productsubscription/README.md b/resource-manager/apimanagement/2022-08-01/productsubscription/README.md index 5ae24bd192d..3e685ee2e4f 100644 --- a/resource-manager/apimanagement/2022-08-01/productsubscription/README.md +++ b/resource-manager/apimanagement/2022-08-01/productsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productsubscription` Documentation -The `productsubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productsubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productsubscription/client.go b/resource-manager/apimanagement/2022-08-01/productsubscription/client.go index a54f7218145..fd87d58da17 100644 --- a/resource-manager/apimanagement/2022-08-01/productsubscription/client.go +++ b/resource-manager/apimanagement/2022-08-01/productsubscription/client.go @@ -15,7 +15,7 @@ type ProductSubscriptionClient struct { } func NewProductSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productsubscription/id_product.go b/resource-manager/apimanagement/2022-08-01/productsubscription/id_product.go index 96929544e81..f43d9647499 100644 --- a/resource-manager/apimanagement/2022-08-01/productsubscription/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/productsubscription/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productsubscription/method_list.go b/resource-manager/apimanagement/2022-08-01/productsubscription/method_list.go index c71c7ba8260..00b340b1821 100644 --- a/resource-manager/apimanagement/2022-08-01/productsubscription/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/productsubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productsubscription/version.go b/resource-manager/apimanagement/2022-08-01/productsubscription/version.go index fdc7499250c..cbcb2bd824a 100644 --- a/resource-manager/apimanagement/2022-08-01/productsubscription/version.go +++ b/resource-manager/apimanagement/2022-08-01/productsubscription/version.go @@ -1,12 +1,10 @@ package productsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsubscription/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/README.md b/resource-manager/apimanagement/2022-08-01/producttag/README.md index 0dda3891e26..674d15bc4f0 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/README.md +++ b/resource-manager/apimanagement/2022-08-01/producttag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/producttag` Documentation -The `producttag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `producttag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/producttag/client.go b/resource-manager/apimanagement/2022-08-01/producttag/client.go index 720b81ec2d8..5602a7a654f 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/client.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/client.go @@ -15,7 +15,7 @@ type ProductTagClient struct { } func NewProductTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "producttag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "producttag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/id_product.go b/resource-manager/apimanagement/2022-08-01/producttag/id_product.go index b7000f83b74..83b2ff6422e 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go b/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go index d1f16bd1686..b06e6d6fa29 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/id_producttag.go @@ -46,7 +46,7 @@ func ParseProductTagID(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductTagIDInsensitively(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/method_tagassigntoproduct.go b/resource-manager/apimanagement/2022-08-01/producttag/method_tagassigntoproduct.go index 87bb16caf5e..5cbd240711d 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/method_tagassigntoproduct.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/method_tagassigntoproduct.go @@ -46,7 +46,6 @@ func (c ProductTagClient) TagAssignToProduct(ctx context.Context, id ProductTagI var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/method_taggetbyproduct.go b/resource-manager/apimanagement/2022-08-01/producttag/method_taggetbyproduct.go index 1e5ed741301..1742c0e9789 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/method_taggetbyproduct.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/method_taggetbyproduct.go @@ -45,7 +45,6 @@ func (c ProductTagClient) TagGetByProduct(ctx context.Context, id ProductTagId) var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/method_taglistbyproduct.go b/resource-manager/apimanagement/2022-08-01/producttag/method_taglistbyproduct.go index 4e0721b94fc..f55c45480ae 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/method_taglistbyproduct.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/method_taglistbyproduct.go @@ -41,6 +41,7 @@ func (o TagListByProductOperationOptions) ToHeaders() *client.Headers { func (o TagListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/producttag/version.go b/resource-manager/apimanagement/2022-08-01/producttag/version.go index b970ed92f24..0c2b48b1f7e 100644 --- a/resource-manager/apimanagement/2022-08-01/producttag/version.go +++ b/resource-manager/apimanagement/2022-08-01/producttag/version.go @@ -1,12 +1,10 @@ package producttag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/producttag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/producttag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/README.md b/resource-manager/apimanagement/2022-08-01/productwiki/README.md index ae0f7fb968a..45b19bf38c7 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/README.md +++ b/resource-manager/apimanagement/2022-08-01/productwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/productwiki` Documentation -The `productwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `productwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/client.go b/resource-manager/apimanagement/2022-08-01/productwiki/client.go index 927c4e2a5e8..f916fc92b3e 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/client.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/client.go @@ -15,7 +15,7 @@ type ProductWikiClient struct { } func NewProductWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/id_product.go b/resource-manager/apimanagement/2022-08-01/productwiki/id_product.go index 55d2312cec7..2c4b473a438 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/id_product.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/productwiki/method_createorupdate.go index f794fc61c8a..07e2174456f 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductWikiClient) CreateOrUpdate(ctx context.Context, id ProductId, inp var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/method_delete.go b/resource-manager/apimanagement/2022-08-01/productwiki/method_delete.go index 0ccc22248a0..85714a863d1 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/method_get.go b/resource-manager/apimanagement/2022-08-01/productwiki/method_get.go index 503a2a49ab6..7ee0379c2bc 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/method_get.go @@ -46,7 +46,6 @@ func (c ProductWikiClient) Get(ctx context.Context, id ProductId) (result GetOpe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/method_list.go b/resource-manager/apimanagement/2022-08-01/productwiki/method_list.go index db26ef5879d..2a6ee83e84b 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/method_update.go b/resource-manager/apimanagement/2022-08-01/productwiki/method_update.go index 551aa6aab7a..4e6a5e37c25 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductWikiClient) Update(ctx context.Context, id ProductId, input WikiU var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/productwiki/version.go b/resource-manager/apimanagement/2022-08-01/productwiki/version.go index 12abb4decdd..8c75b248c58 100644 --- a/resource-manager/apimanagement/2022-08-01/productwiki/version.go +++ b/resource-manager/apimanagement/2022-08-01/productwiki/version.go @@ -1,12 +1,10 @@ package productwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productwiki/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/README.md b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/README.md index 056c46f2b47..028f898fe4b 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/README.md +++ b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/quotabycounterkeys` Documentation -The `quotabycounterkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `quotabycounterkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/client.go b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/client.go index bd6e9581304..eec1a8e1c60 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/client.go +++ b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/client.go @@ -15,7 +15,7 @@ type QuotaByCounterKeysClient struct { } func NewQuotaByCounterKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByCounterKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabycounterkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabycounterkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByCounterKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/id_quota.go b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/id_quota.go index 11bd5535194..1cb117ba2bc 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/id_quota.go +++ b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/id_quota.go @@ -44,7 +44,7 @@ func ParseQuotaID(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/method_update.go b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/method_update.go index 44f72d4b26b..8ed074d74d8 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input var model QuotaCounterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/version.go b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/version.go index 8a9663cfcb0..28e87419001 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/version.go +++ b/resource-manager/apimanagement/2022-08-01/quotabycounterkeys/version.go @@ -1,12 +1,10 @@ package quotabycounterkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabycounterkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabycounterkeys/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/README.md b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/README.md index 8ec34115037..8b1978e4dd3 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/README.md +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys` Documentation -The `quotabyperiodkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `quotabyperiodkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/client.go b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/client.go index 338089b5c40..559771ef5e6 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/client.go +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/client.go @@ -15,7 +15,7 @@ type QuotaByPeriodKeysClient struct { } func NewQuotaByPeriodKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByPeriodKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByPeriodKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/id_period.go b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/id_period.go index 24a1631d595..0aabd1a8ba4 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/id_period.go +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/id_period.go @@ -46,7 +46,7 @@ func ParsePeriodID(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeriodIDInsensitively(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_get.go b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_get.go index ea5a1757972..6bb85fbcffb 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_get.go @@ -45,7 +45,6 @@ func (c QuotaByPeriodKeysClient) Get(ctx context.Context, id PeriodId) (result G var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_update.go b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_update.go index 2fc44c961e6..7e71a98ddf1 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByPeriodKeysClient) Update(ctx context.Context, id PeriodId, input var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/version.go b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/version.go index 8bea282e539..2220629838c 100644 --- a/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/version.go +++ b/resource-manager/apimanagement/2022-08-01/quotabyperiodkeys/version.go @@ -1,12 +1,10 @@ package quotabyperiodkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabyperiodkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabyperiodkeys/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/region/README.md b/resource-manager/apimanagement/2022-08-01/region/README.md index 97882c1a217..06444de9211 100644 --- a/resource-manager/apimanagement/2022-08-01/region/README.md +++ b/resource-manager/apimanagement/2022-08-01/region/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/region` Documentation -The `region` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `region` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/region/client.go b/resource-manager/apimanagement/2022-08-01/region/client.go index 46d4de5270d..41092dd526a 100644 --- a/resource-manager/apimanagement/2022-08-01/region/client.go +++ b/resource-manager/apimanagement/2022-08-01/region/client.go @@ -15,7 +15,7 @@ type RegionClient struct { } func NewRegionClientWithBaseURI(sdkApi sdkEnv.Api) (*RegionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "region", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "region", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/region/id_service.go b/resource-manager/apimanagement/2022-08-01/region/id_service.go index 287e12afddc..51310a9c174 100644 --- a/resource-manager/apimanagement/2022-08-01/region/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/region/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/region/version.go b/resource-manager/apimanagement/2022-08-01/region/version.go index 7b86dcfdf44..cf9a1cb83e6 100644 --- a/resource-manager/apimanagement/2022-08-01/region/version.go +++ b/resource-manager/apimanagement/2022-08-01/region/version.go @@ -1,12 +1,10 @@ package region -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/region/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/region/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/reports/README.md b/resource-manager/apimanagement/2022-08-01/reports/README.md index beaf94a87f7..cff0b82da80 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/README.md +++ b/resource-manager/apimanagement/2022-08-01/reports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/reports` Documentation -The `reports` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `reports` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/reports/client.go b/resource-manager/apimanagement/2022-08-01/reports/client.go index 7d5bde81365..d5f04232726 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/client.go +++ b/resource-manager/apimanagement/2022-08-01/reports/client.go @@ -15,7 +15,7 @@ type ReportsClient struct { } func NewReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReportsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/reports/id_service.go b/resource-manager/apimanagement/2022-08-01/reports/id_service.go index ff6955096df..b5a3e420608 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/reports/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbyapi.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbyapi.go index e99479d8413..938e0fdaf48 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbyapi.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbygeo.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbygeo.go index 1e69c1fb509..13fc541e4a6 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbygeo.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbygeo.go @@ -41,6 +41,7 @@ func (o ListByGeoOperationOptions) ToHeaders() *client.Headers { func (o ListByGeoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbyoperation.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbyoperation.go index bb4465b0ce3..8358f8ba004 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbyoperation.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbyoperation.go @@ -42,6 +42,7 @@ func (o ListByOperationOperationOptions) ToHeaders() *client.Headers { func (o ListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbyproduct.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbyproduct.go index 3a6df43c7b4..73d09491df5 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbyproduct.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbyproduct.go @@ -42,6 +42,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbyrequest.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbyrequest.go index 265c2670114..22f5d5ad5ca 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbyrequest.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbyrequest.go @@ -36,6 +36,7 @@ func (o ListByRequestOperationOptions) ToHeaders() *client.Headers { func (o ListByRequestOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c ReportsClient) ListByRequest(ctx context.Context, id ServiceId, options var model RequestReportCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbysubscription.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbysubscription.go index 1e7ffadeafd..4be6b09415d 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbysubscription.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbytime.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbytime.go index 629527e4e8b..a440a9632c1 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbytime.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbytime.go @@ -43,6 +43,7 @@ func (o ListByTimeOperationOptions) ToHeaders() *client.Headers { func (o ListByTimeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/method_listbyuser.go b/resource-manager/apimanagement/2022-08-01/reports/method_listbyuser.go index 0751d4a40cb..9245fc80cd9 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/method_listbyuser.go +++ b/resource-manager/apimanagement/2022-08-01/reports/method_listbyuser.go @@ -42,6 +42,7 @@ func (o ListByUserOperationOptions) ToHeaders() *client.Headers { func (o ListByUserOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/reports/version.go b/resource-manager/apimanagement/2022-08-01/reports/version.go index ef912960f58..0f7417df9b0 100644 --- a/resource-manager/apimanagement/2022-08-01/reports/version.go +++ b/resource-manager/apimanagement/2022-08-01/reports/version.go @@ -1,12 +1,10 @@ package reports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reports/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/schema/README.md b/resource-manager/apimanagement/2022-08-01/schema/README.md index e3c003e2972..bf94a8bc009 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/README.md +++ b/resource-manager/apimanagement/2022-08-01/schema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/schema` Documentation -The `schema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `schema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/schema/client.go b/resource-manager/apimanagement/2022-08-01/schema/client.go index 3d872ecf7a1..dd9c100ba13 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/client.go +++ b/resource-manager/apimanagement/2022-08-01/schema/client.go @@ -15,7 +15,7 @@ type SchemaClient struct { } func NewSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/schema/id_schema.go b/resource-manager/apimanagement/2022-08-01/schema/id_schema.go index bb6238dd767..192895eff2e 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/id_schema.go +++ b/resource-manager/apimanagement/2022-08-01/schema/id_schema.go @@ -44,7 +44,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/schema/id_service.go b/resource-manager/apimanagement/2022-08-01/schema/id_service.go index 11419aeb835..aeb24c3ff7f 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/schema/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemacreateorupdate.go b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemacreateorupdate.go index 4f0f7c321a1..ef94d3f3273 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o GlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o GlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemadelete.go b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemadelete.go index 234fcfcb78f..f170324bf05 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemadelete.go +++ b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemadelete.go @@ -35,6 +35,7 @@ func (o GlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemaget.go b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemaget.go index d2ec4344b20..6118374682a 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemaget.go +++ b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemalistbyservice.go b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemalistbyservice.go index 7797c6a6b8f..f25edc94805 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/method_globalschemalistbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/schema/method_globalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o GlobalSchemaListByServiceOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/schema/version.go b/resource-manager/apimanagement/2022-08-01/schema/version.go index 57e9da5514d..7bd291c3e35 100644 --- a/resource-manager/apimanagement/2022-08-01/schema/version.go +++ b/resource-manager/apimanagement/2022-08-01/schema/version.go @@ -1,12 +1,10 @@ package schema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schema/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/README.md b/resource-manager/apimanagement/2022-08-01/signinsettings/README.md index 941f4831944..b55c3c8147f 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/README.md +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signinsettings` Documentation -The `signinsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `signinsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/client.go b/resource-manager/apimanagement/2022-08-01/signinsettings/client.go index a21dfcdddd2..0426e9303e8 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/client.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/client.go @@ -15,7 +15,7 @@ type SignInSettingsClient struct { } func NewSignInSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignInSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signinsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signinsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignInSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go b/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go index fd18eb71e2f..ab9047e4895 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/signinsettings/method_createorupdate.go index 7354010fc89..6f35914bbe1 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignInSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/method_get.go b/resource-manager/apimanagement/2022-08-01/signinsettings/method_get.go index 1de8b5e5963..35d80bf82b1 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignInSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/method_update.go b/resource-manager/apimanagement/2022-08-01/signinsettings/method_update.go index 1c0af5a3508..499592b651b 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/signinsettings/version.go b/resource-manager/apimanagement/2022-08-01/signinsettings/version.go index 1fbb5179049..563790df412 100644 --- a/resource-manager/apimanagement/2022-08-01/signinsettings/version.go +++ b/resource-manager/apimanagement/2022-08-01/signinsettings/version.go @@ -1,12 +1,10 @@ package signinsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signinsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signinsettings/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/README.md b/resource-manager/apimanagement/2022-08-01/signupsettings/README.md index 07fbd7362af..1418738bea1 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/README.md +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/signupsettings` Documentation -The `signupsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `signupsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/client.go b/resource-manager/apimanagement/2022-08-01/signupsettings/client.go index 2d9452823e3..3a4f6ae3333 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/client.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/client.go @@ -15,7 +15,7 @@ type SignUpSettingsClient struct { } func NewSignUpSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignUpSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signupsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signupsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignUpSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go b/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go index eeefe5b42b7..972362091d7 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/signupsettings/method_createorupdate.go index 8d57367d2f5..371f0477840 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignUpSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/method_get.go b/resource-manager/apimanagement/2022-08-01/signupsettings/method_get.go index e9062643330..03dc9774b35 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignUpSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/method_update.go b/resource-manager/apimanagement/2022-08-01/signupsettings/method_update.go index 8d8918d3324..c86348ae580 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/signupsettings/version.go b/resource-manager/apimanagement/2022-08-01/signupsettings/version.go index fc08690bf0c..10bc94f03ed 100644 --- a/resource-manager/apimanagement/2022-08-01/signupsettings/version.go +++ b/resource-manager/apimanagement/2022-08-01/signupsettings/version.go @@ -1,12 +1,10 @@ package signupsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signupsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signupsettings/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/skus/README.md b/resource-manager/apimanagement/2022-08-01/skus/README.md index a0b3a42c5c8..5f1d8083053 100644 --- a/resource-manager/apimanagement/2022-08-01/skus/README.md +++ b/resource-manager/apimanagement/2022-08-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/skus/client.go b/resource-manager/apimanagement/2022-08-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/apimanagement/2022-08-01/skus/client.go +++ b/resource-manager/apimanagement/2022-08-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/skus/version.go b/resource-manager/apimanagement/2022-08-01/skus/version.go index 37083f4f0cb..6d0d6721861 100644 --- a/resource-manager/apimanagement/2022-08-01/skus/version.go +++ b/resource-manager/apimanagement/2022-08-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/README.md b/resource-manager/apimanagement/2022-08-01/subscription/README.md index 6c397fba7b5..ca6037c1fcc 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/README.md +++ b/resource-manager/apimanagement/2022-08-01/subscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/subscription` Documentation -The `subscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `subscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/subscription/client.go b/resource-manager/apimanagement/2022-08-01/subscription/client.go index 9885434f9dd..b5f97131f6f 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/client.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/client.go @@ -15,7 +15,7 @@ type SubscriptionClient struct { } func NewSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/id_service.go b/resource-manager/apimanagement/2022-08-01/subscription/id_service.go index eae18b83523..565db9091ea 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go b/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go index 92e8dcc65f1..c6acf1a4ae0 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/id_subscriptions2.go @@ -44,7 +44,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go b/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go index 07412cdb651..f91da2b8480 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/id_usersubscriptions2.go @@ -46,7 +46,7 @@ func ParseUserSubscriptions2ID(input string) (*UserSubscriptions2Id, error) { } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSubscriptions2IDInsensitively(input string) (*UserSubscriptions2Id } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/subscription/method_createorupdate.go index 84f04d880d0..b8e289d53ae 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_createorupdate.go @@ -38,6 +38,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) CreateOrUpdate(ctx context.Context, id Subscriptions var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_delete.go b/resource-manager/apimanagement/2022-08-01/subscription/method_delete.go index e3c31885a75..365f71a2c63 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_get.go b/resource-manager/apimanagement/2022-08-01/subscription/method_get.go index 9a57c676f8b..0156f9f655a 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) Get(ctx context.Context, id Subscriptions2Id) (resul var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_list.go b/resource-manager/apimanagement/2022-08-01/subscription/method_list.go index 2e9d96e0473..8b1e4d1455b 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/subscription/method_listsecrets.go index 579b90282a8..ce51c65282c 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_listsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) ListSecrets(ctx context.Context, id Subscriptions2Id var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_update.go b/resource-manager/apimanagement/2022-08-01/subscription/method_update.go index 635071e41ca..04305d82d79 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_update.go @@ -38,6 +38,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) Update(ctx context.Context, id Subscriptions2Id, inp var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/method_usersubscriptionget.go b/resource-manager/apimanagement/2022-08-01/subscription/method_usersubscriptionget.go index 4323e0a04c6..9c22a5becdd 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/method_usersubscriptionget.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/method_usersubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) UserSubscriptionGet(ctx context.Context, id UserSubs var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/subscription/version.go b/resource-manager/apimanagement/2022-08-01/subscription/version.go index 4767e08d4b9..fb6e92f2ce0 100644 --- a/resource-manager/apimanagement/2022-08-01/subscription/version.go +++ b/resource-manager/apimanagement/2022-08-01/subscription/version.go @@ -1,12 +1,10 @@ package subscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscription/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tag/README.md b/resource-manager/apimanagement/2022-08-01/tag/README.md index 02a7c8063c1..2282b1b3f3d 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/README.md +++ b/resource-manager/apimanagement/2022-08-01/tag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tag` Documentation -The `tag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tag/client.go b/resource-manager/apimanagement/2022-08-01/tag/client.go index e97e5adc95e..9450459e77c 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/client.go +++ b/resource-manager/apimanagement/2022-08-01/tag/client.go @@ -15,7 +15,7 @@ type TagClient struct { } func NewTagClientWithBaseURI(sdkApi sdkEnv.Api) (*TagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tag/id_service.go b/resource-manager/apimanagement/2022-08-01/tag/id_service.go index c2136f64b3e..35b3ad02caf 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tag/id_tag.go b/resource-manager/apimanagement/2022-08-01/tag/id_tag.go index 568503a639c..70a4aa51923 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/id_tag.go +++ b/resource-manager/apimanagement/2022-08-01/tag/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tag/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/tag/method_createorupdate.go index 9494659a794..5839e98d081 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/tag/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) CreateOrUpdate(ctx context.Context, id TagId, input TagCreate var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tag/method_delete.go b/resource-manager/apimanagement/2022-08-01/tag/method_delete.go index 83335d794bd..ae058a00292 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/tag/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/tag/method_get.go b/resource-manager/apimanagement/2022-08-01/tag/method_get.go index 8395e2cb1b1..ebda46b567c 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/tag/method_get.go @@ -45,7 +45,6 @@ func (c TagClient) Get(ctx context.Context, id TagId) (result GetOperationRespon var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tag/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/tag/method_listbyservice.go index efb001aaa9c..e7afb4202b1 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/tag/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/tag/method_update.go b/resource-manager/apimanagement/2022-08-01/tag/method_update.go index 8ee0391b4d4..3aba0116fd3 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/tag/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) Update(ctx context.Context, id TagId, input TagCreateUpdatePa var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tag/version.go b/resource-manager/apimanagement/2022-08-01/tag/version.go index 4963af1efd3..e188f9d3b74 100644 --- a/resource-manager/apimanagement/2022-08-01/tag/version.go +++ b/resource-manager/apimanagement/2022-08-01/tag/version.go @@ -1,12 +1,10 @@ package tag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tag/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tagresource/README.md b/resource-manager/apimanagement/2022-08-01/tagresource/README.md index 8419c245d24..43dc33cfe9b 100644 --- a/resource-manager/apimanagement/2022-08-01/tagresource/README.md +++ b/resource-manager/apimanagement/2022-08-01/tagresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tagresource` Documentation -The `tagresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tagresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tagresource/client.go b/resource-manager/apimanagement/2022-08-01/tagresource/client.go index 9a4e989f378..e368d7173e2 100644 --- a/resource-manager/apimanagement/2022-08-01/tagresource/client.go +++ b/resource-manager/apimanagement/2022-08-01/tagresource/client.go @@ -15,7 +15,7 @@ type TagResourceClient struct { } func NewTagResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TagResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tagresource/id_service.go b/resource-manager/apimanagement/2022-08-01/tagresource/id_service.go index 7a6a2163595..79c6c3d76d3 100644 --- a/resource-manager/apimanagement/2022-08-01/tagresource/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tagresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tagresource/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/tagresource/method_listbyservice.go index 0d880dc6dad..3daedbb3d18 100644 --- a/resource-manager/apimanagement/2022-08-01/tagresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/tagresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/tagresource/version.go b/resource-manager/apimanagement/2022-08-01/tagresource/version.go index d3de1d44279..ed7ec236241 100644 --- a/resource-manager/apimanagement/2022-08-01/tagresource/version.go +++ b/resource-manager/apimanagement/2022-08-01/tagresource/version.go @@ -1,12 +1,10 @@ package tagresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagresource/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/README.md b/resource-manager/apimanagement/2022-08-01/tenantaccess/README.md index f00d75f2900..451d14d612c 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/README.md +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantaccess` Documentation -The `tenantaccess` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tenantaccess` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/client.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/client.go index d36cd27765c..131dd722282 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/client.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/client.go @@ -15,7 +15,7 @@ type TenantAccessClient struct { } func NewTenantAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go index 927925f0366..f2aea0cdd42 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go index 6dbbad41263..6753200ac92 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_create.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_create.go index 73ced417651..0cd71b7a599 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_create.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Create(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_get.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_get.go index 88298263510..832e64d03c0 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_get.go @@ -45,7 +45,6 @@ func (c TenantAccessClient) Get(ctx context.Context, id AccessId) (result GetOpe var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listbyservice.go index 541de46f891..6f51efcc9b2 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listsecrets.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listsecrets.go index 237989384de..12e38530891 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listsecrets.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_listsecrets.go @@ -46,7 +46,6 @@ func (c TenantAccessClient) ListSecrets(ctx context.Context, id AccessId) (resul var model AccessInformationSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_update.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_update.go index 73793de2965..a01c3d4829c 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Update(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccess/version.go b/resource-manager/apimanagement/2022-08-01/tenantaccess/version.go index 2d944dfa3c5..39c2a8b01e2 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccess/version.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccess/version.go @@ -1,12 +1,10 @@ package tenantaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccess/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/client.go b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/client.go index 1540a8d6df5..7c14713409a 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/client.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/client.go @@ -15,7 +15,7 @@ type TenantAccessGitClient struct { } func NewTenantAccessGitClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessGitClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccessgit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccessgit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessGitClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/id_access.go b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/id_access.go index c4c17575eda..f067740b97e 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/id_access.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/version.go b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/version.go index cf099e170e8..afff04196e6 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantaccessgit/version.go +++ b/resource-manager/apimanagement/2022-08-01/tenantaccessgit/version.go @@ -1,12 +1,10 @@ package tenantaccessgit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccessgit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccessgit/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/README.md b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/README.md index 1b4aec80ff4..309b67eecd1 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/README.md +++ b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantconfiguration` Documentation -The `tenantconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tenantconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/client.go b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/client.go index 0251dfc8eb5..bd86c8dd00f 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/client.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/client.go @@ -15,7 +15,7 @@ type TenantConfigurationClient struct { } func NewTenantConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/id_service.go b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/id_service.go index 0a039a17bc1..47fc7a837b0 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/version.go b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/version.go index d2a12666e09..c5deb82af50 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfiguration/version.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfiguration/version.go @@ -1,12 +1,10 @@ package tenantconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfiguration/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/README.md b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/README.md index ba6fc33b927..5632e9eb251 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/README.md +++ b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate` Documentation -The `tenantconfigurationsyncstate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tenantconfigurationsyncstate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/client.go b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/client.go index f79f21d0f2c..d01b2487b59 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/client.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/client.go @@ -15,7 +15,7 @@ type TenantConfigurationSyncStateClient struct { } func NewTenantConfigurationSyncStateClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationSyncStateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationSyncStateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/id_service.go b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/id_service.go index 354cdf503e1..54597cebc65 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go index fee9e2d3374..1992a54ac27 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go @@ -46,7 +46,6 @@ func (c TenantConfigurationSyncStateClient) TenantConfigurationGetSyncState(ctx var model TenantConfigurationSyncStateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/version.go b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/version.go index 744ada3755e..a372ad34add 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/version.go +++ b/resource-manager/apimanagement/2022-08-01/tenantconfigurationsyncstate/version.go @@ -1,12 +1,10 @@ package tenantconfigurationsyncstate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfigurationsyncstate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfigurationsyncstate/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/README.md b/resource-manager/apimanagement/2022-08-01/tenantsettings/README.md index 1a0d686548a..8da91ab5dce 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/README.md +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/tenantsettings` Documentation -The `tenantsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `tenantsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/client.go b/resource-manager/apimanagement/2022-08-01/tenantsettings/client.go index db0f8f815eb..71cea0dd788 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/client.go +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/client.go @@ -15,7 +15,7 @@ type TenantSettingsClient struct { } func NewTenantSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/id_service.go b/resource-manager/apimanagement/2022-08-01/tenantsettings/id_service.go index 68a0c265a26..8e42a6aaa11 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/method_get.go b/resource-manager/apimanagement/2022-08-01/tenantsettings/method_get.go index 40a9e01b321..35b4057e1e2 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/method_get.go @@ -46,7 +46,6 @@ func (c TenantSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model TenantSettingsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/tenantsettings/method_listbyservice.go index 12487f36224..b0ee3853b15 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/tenantsettings/version.go b/resource-manager/apimanagement/2022-08-01/tenantsettings/version.go index 65e0588ec02..aacaa1c367a 100644 --- a/resource-manager/apimanagement/2022-08-01/tenantsettings/version.go +++ b/resource-manager/apimanagement/2022-08-01/tenantsettings/version.go @@ -1,12 +1,10 @@ package tenantsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantsettings/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/user/README.md b/resource-manager/apimanagement/2022-08-01/user/README.md index ad422c016eb..7fdde44e17d 100644 --- a/resource-manager/apimanagement/2022-08-01/user/README.md +++ b/resource-manager/apimanagement/2022-08-01/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `user` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/user/client.go b/resource-manager/apimanagement/2022-08-01/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/apimanagement/2022-08-01/user/client.go +++ b/resource-manager/apimanagement/2022-08-01/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/user/id_service.go b/resource-manager/apimanagement/2022-08-01/user/id_service.go index 4793d7dba1c..e39d35a9443 100644 --- a/resource-manager/apimanagement/2022-08-01/user/id_service.go +++ b/resource-manager/apimanagement/2022-08-01/user/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/user/id_user.go b/resource-manager/apimanagement/2022-08-01/user/id_user.go index 46e79677949..b758a66bd0b 100644 --- a/resource-manager/apimanagement/2022-08-01/user/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/user/method_createorupdate.go b/resource-manager/apimanagement/2022-08-01/user/method_createorupdate.go index b1cf998602d..3d85a55770e 100644 --- a/resource-manager/apimanagement/2022-08-01/user/method_createorupdate.go +++ b/resource-manager/apimanagement/2022-08-01/user/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c UserClient) CreateOrUpdate(ctx context.Context, id UserId, input UserCre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/user/method_delete.go b/resource-manager/apimanagement/2022-08-01/user/method_delete.go index b5b2112ac40..80b5cf93034 100644 --- a/resource-manager/apimanagement/2022-08-01/user/method_delete.go +++ b/resource-manager/apimanagement/2022-08-01/user/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/user/method_get.go b/resource-manager/apimanagement/2022-08-01/user/method_get.go index 1237761289c..e7fc56ebb3e 100644 --- a/resource-manager/apimanagement/2022-08-01/user/method_get.go +++ b/resource-manager/apimanagement/2022-08-01/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/user/method_listbyservice.go b/resource-manager/apimanagement/2022-08-01/user/method_listbyservice.go index e098057b246..2fc7fb34899 100644 --- a/resource-manager/apimanagement/2022-08-01/user/method_listbyservice.go +++ b/resource-manager/apimanagement/2022-08-01/user/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/user/method_update.go b/resource-manager/apimanagement/2022-08-01/user/method_update.go index 11353f91240..d0628f53b8d 100644 --- a/resource-manager/apimanagement/2022-08-01/user/method_update.go +++ b/resource-manager/apimanagement/2022-08-01/user/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c UserClient) Update(ctx context.Context, id UserId, input UserUpdateParam var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/user/version.go b/resource-manager/apimanagement/2022-08-01/user/version.go index 7a67a5894cd..818040a3693 100644 --- a/resource-manager/apimanagement/2022-08-01/user/version.go +++ b/resource-manager/apimanagement/2022-08-01/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/client.go b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/client.go index 2be6b996059..a78825dedcc 100644 --- a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/client.go +++ b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/client.go @@ -15,7 +15,7 @@ type UserConfirmationPasswordSendClient struct { } func NewUserConfirmationPasswordSendClientWithBaseURI(sdkApi sdkEnv.Api) (*UserConfirmationPasswordSendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserConfirmationPasswordSendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/id_user.go b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/id_user.go index 119b0594c8a..100e150391d 100644 --- a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go index b1915a44d82..700323d679d 100644 --- a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go +++ b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go @@ -33,6 +33,7 @@ func (o UserConfirmationPasswordSendOperationOptions) ToHeaders() *client.Header func (o UserConfirmationPasswordSendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/version.go b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/version.go index 5037f88de33..3ed38d5cff6 100644 --- a/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/version.go +++ b/resource-manager/apimanagement/2022-08-01/userconfirmationpasswordsend/version.go @@ -1,12 +1,10 @@ package userconfirmationpasswordsend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/userconfirmationpasswordsend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/userconfirmationpasswordsend/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/usergroup/README.md b/resource-manager/apimanagement/2022-08-01/usergroup/README.md index f55adaef841..f3c89841cc2 100644 --- a/resource-manager/apimanagement/2022-08-01/usergroup/README.md +++ b/resource-manager/apimanagement/2022-08-01/usergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/usergroup` Documentation -The `usergroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `usergroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/usergroup/client.go b/resource-manager/apimanagement/2022-08-01/usergroup/client.go index 74829119980..c03391f5989 100644 --- a/resource-manager/apimanagement/2022-08-01/usergroup/client.go +++ b/resource-manager/apimanagement/2022-08-01/usergroup/client.go @@ -15,7 +15,7 @@ type UserGroupClient struct { } func NewUserGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*UserGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/usergroup/id_user.go b/resource-manager/apimanagement/2022-08-01/usergroup/id_user.go index dbcd62c7aff..d3e2840860c 100644 --- a/resource-manager/apimanagement/2022-08-01/usergroup/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/usergroup/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/usergroup/method_list.go b/resource-manager/apimanagement/2022-08-01/usergroup/method_list.go index cfe2c191701..0585c10cd75 100644 --- a/resource-manager/apimanagement/2022-08-01/usergroup/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/usergroup/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/usergroup/version.go b/resource-manager/apimanagement/2022-08-01/usergroup/version.go index 9b667904530..84319a48ec7 100644 --- a/resource-manager/apimanagement/2022-08-01/usergroup/version.go +++ b/resource-manager/apimanagement/2022-08-01/usergroup/version.go @@ -1,12 +1,10 @@ package usergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usergroup/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/useridentity/README.md b/resource-manager/apimanagement/2022-08-01/useridentity/README.md index ec25f81859c..6e4e5ed7db5 100644 --- a/resource-manager/apimanagement/2022-08-01/useridentity/README.md +++ b/resource-manager/apimanagement/2022-08-01/useridentity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/useridentity` Documentation -The `useridentity` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `useridentity` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/useridentity/client.go b/resource-manager/apimanagement/2022-08-01/useridentity/client.go index ba997999551..252dc69cb22 100644 --- a/resource-manager/apimanagement/2022-08-01/useridentity/client.go +++ b/resource-manager/apimanagement/2022-08-01/useridentity/client.go @@ -15,7 +15,7 @@ type UserIdentityClient struct { } func NewUserIdentityClientWithBaseURI(sdkApi sdkEnv.Api) (*UserIdentityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "useridentity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "useridentity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserIdentityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/useridentity/id_user.go b/resource-manager/apimanagement/2022-08-01/useridentity/id_user.go index 81e0f7f5380..4835b28eb40 100644 --- a/resource-manager/apimanagement/2022-08-01/useridentity/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/useridentity/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/useridentity/version.go b/resource-manager/apimanagement/2022-08-01/useridentity/version.go index 68af187b305..8bddab6d8d2 100644 --- a/resource-manager/apimanagement/2022-08-01/useridentity/version.go +++ b/resource-manager/apimanagement/2022-08-01/useridentity/version.go @@ -1,12 +1,10 @@ package useridentity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/useridentity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/useridentity/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/users/README.md b/resource-manager/apimanagement/2022-08-01/users/README.md index b9b444e7c36..4f1bf4937aa 100644 --- a/resource-manager/apimanagement/2022-08-01/users/README.md +++ b/resource-manager/apimanagement/2022-08-01/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `users` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/users/client.go b/resource-manager/apimanagement/2022-08-01/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/apimanagement/2022-08-01/users/client.go +++ b/resource-manager/apimanagement/2022-08-01/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/users/id_user.go b/resource-manager/apimanagement/2022-08-01/users/id_user.go index f309b6fbd68..73fb129b8ef 100644 --- a/resource-manager/apimanagement/2022-08-01/users/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/users/method_usergeneratessourl.go b/resource-manager/apimanagement/2022-08-01/users/method_usergeneratessourl.go index 500ea8362b0..bab32e3f071 100644 --- a/resource-manager/apimanagement/2022-08-01/users/method_usergeneratessourl.go +++ b/resource-manager/apimanagement/2022-08-01/users/method_usergeneratessourl.go @@ -46,7 +46,6 @@ func (c UsersClient) UserGenerateSsoUrl(ctx context.Context, id UserId) (result var model GenerateSsoUrlResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/users/version.go b/resource-manager/apimanagement/2022-08-01/users/version.go index 99e99467455..e388c44bdd6 100644 --- a/resource-manager/apimanagement/2022-08-01/users/version.go +++ b/resource-manager/apimanagement/2022-08-01/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/usersubscription/README.md b/resource-manager/apimanagement/2022-08-01/usersubscription/README.md index fd29e334d7c..4e38aa1d06f 100644 --- a/resource-manager/apimanagement/2022-08-01/usersubscription/README.md +++ b/resource-manager/apimanagement/2022-08-01/usersubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/usersubscription` Documentation -The `usersubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `usersubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/usersubscription/client.go b/resource-manager/apimanagement/2022-08-01/usersubscription/client.go index f9dd0627128..82b11b9ee90 100644 --- a/resource-manager/apimanagement/2022-08-01/usersubscription/client.go +++ b/resource-manager/apimanagement/2022-08-01/usersubscription/client.go @@ -15,7 +15,7 @@ type UserSubscriptionClient struct { } func NewUserSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/usersubscription/id_user.go b/resource-manager/apimanagement/2022-08-01/usersubscription/id_user.go index b993469b4bf..fc76652d568 100644 --- a/resource-manager/apimanagement/2022-08-01/usersubscription/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/usersubscription/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/usersubscription/method_list.go b/resource-manager/apimanagement/2022-08-01/usersubscription/method_list.go index 9acd966ed75..f2118eff505 100644 --- a/resource-manager/apimanagement/2022-08-01/usersubscription/method_list.go +++ b/resource-manager/apimanagement/2022-08-01/usersubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2022-08-01/usersubscription/version.go b/resource-manager/apimanagement/2022-08-01/usersubscription/version.go index 3b7132b9faf..53dabea0abe 100644 --- a/resource-manager/apimanagement/2022-08-01/usersubscription/version.go +++ b/resource-manager/apimanagement/2022-08-01/usersubscription/version.go @@ -1,12 +1,10 @@ package usersubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersubscription/2022-08-01" } diff --git a/resource-manager/apimanagement/2022-08-01/usertoken/README.md b/resource-manager/apimanagement/2022-08-01/usertoken/README.md index 1d5d64cdc75..1148ba238b2 100644 --- a/resource-manager/apimanagement/2022-08-01/usertoken/README.md +++ b/resource-manager/apimanagement/2022-08-01/usertoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/usertoken` Documentation -The `usertoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2022-08-01`). +The `usertoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2022-08-01/usertoken/client.go b/resource-manager/apimanagement/2022-08-01/usertoken/client.go index adeb6294866..fc8cfaecc12 100644 --- a/resource-manager/apimanagement/2022-08-01/usertoken/client.go +++ b/resource-manager/apimanagement/2022-08-01/usertoken/client.go @@ -15,7 +15,7 @@ type UserTokenClient struct { } func NewUserTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*UserTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usertoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usertoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2022-08-01/usertoken/id_user.go b/resource-manager/apimanagement/2022-08-01/usertoken/id_user.go index e0f7cf9ee4b..bbb27ed3ed3 100644 --- a/resource-manager/apimanagement/2022-08-01/usertoken/id_user.go +++ b/resource-manager/apimanagement/2022-08-01/usertoken/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2022-08-01/usertoken/method_usergetsharedaccesstoken.go b/resource-manager/apimanagement/2022-08-01/usertoken/method_usergetsharedaccesstoken.go index 28e0efb393e..28d84cc2ee6 100644 --- a/resource-manager/apimanagement/2022-08-01/usertoken/method_usergetsharedaccesstoken.go +++ b/resource-manager/apimanagement/2022-08-01/usertoken/method_usergetsharedaccesstoken.go @@ -50,7 +50,6 @@ func (c UserTokenClient) UserGetSharedAccessToken(ctx context.Context, id UserId var model UserTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2022-08-01/usertoken/version.go b/resource-manager/apimanagement/2022-08-01/usertoken/version.go index be67f66ede8..44387f3315a 100644 --- a/resource-manager/apimanagement/2022-08-01/usertoken/version.go +++ b/resource-manager/apimanagement/2022-08-01/usertoken/version.go @@ -1,12 +1,10 @@ package usertoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usertoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usertoken/2022-08-01" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/README.md b/resource-manager/apimanagement/2023-03-01-preview/api/README.md index c11191f849f..a408e21243a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/api/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/api` Documentation -The `api` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `api` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/client.go b/resource-manager/apimanagement/2023-03-01-preview/api/client.go index 5ce28196132..2f776384d61 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/client.go @@ -15,7 +15,7 @@ type ApiClient struct { } func NewApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/api/id_api.go index a70d7f5620c..ac1a5275add 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/api/id_service.go index c50464ed710..2671c279deb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/api/id_workspace.go index 33d92e28640..9a85d3b87ce 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/api/id_workspaceapi.go index 5d2d28b9caf..323f04187f8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_createorupdate.go index af3e5430ecf..d698167d31e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_delete.go index fbc43278f3b..82b9ac90560 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_get.go index 07f671ef642..0b768d34293 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_get.go @@ -45,7 +45,6 @@ func (c ApiClient) Get(ctx context.Context, id ApiId) (result GetOperationRespon var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_listbyservice.go index 6b9bc61fa02..637304ef1e8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_update.go index 491fbbeb5c8..6310b4ab9ad 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) Update(ctx context.Context, id ApiId, input ApiUpdateContract var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapicreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapicreateorupdate.go index 32df598457a..9eee2a6aab7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapicreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapicreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapidelete.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapidelete.go index 44393545209..719631183af 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapidelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapidelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiget.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiget.go index 220b742d573..23fa96a3827 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiget.go @@ -45,7 +45,6 @@ func (c ApiClient) WorkspaceApiGet(ctx context.Context, id WorkspaceApiId) (resu var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapilistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapilistbyservice.go index aeed0e70077..59509cef86c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapilistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapilistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceApiListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiupdate.go b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiupdate.go index 25f72466ee3..7bcd19acc0f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/method_workspaceapiupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) WorkspaceApiUpdate(ctx context.Context, id WorkspaceApiId, in var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/api/version.go b/resource-manager/apimanagement/2023-03-01-preview/api/version.go index 2065f281567..aa1ba8ef975 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/api/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/api/version.go @@ -1,12 +1,10 @@ package api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/api/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/README.md b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/README.md index 2d60f1ee3bb..84c6b0facd9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic` Documentation -The `apidiagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apidiagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/client.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/client.go index 10bdb8741b2..4e0be722654 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/client.go @@ -15,7 +15,7 @@ type ApiDiagnosticClient struct { } func NewApiDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidiagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidiagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_api.go index 1c99bf5821c..30c3eaab96f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_apidiagnostic.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_apidiagnostic.go index d2f0e00b2bb..604e7513a08 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_apidiagnostic.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/id_apidiagnostic.go @@ -46,7 +46,7 @@ func ParseApiDiagnosticID(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiDiagnosticIDInsensitively(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_createorupdate.go index 2551a5d1445..4f82c372b8f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiDiagnosticClient) CreateOrUpdate(ctx context.Context, id ApiDiagnosti var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_delete.go index a781c7b154b..ede64465f75 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_get.go index bb113001b36..cd148612858 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_get.go @@ -45,7 +45,6 @@ func (c ApiDiagnosticClient) Get(ctx context.Context, id ApiDiagnosticId) (resul var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_listbyservice.go index 96b6f06f674..96e04e5bd42 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_update.go index 00ef4533a35..1352f0f032b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiDiagnosticClient) Update(ctx context.Context, id ApiDiagnosticId, inp var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/version.go b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/version.go index db23279469c..d286b32b819 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apidiagnostic/version.go @@ -1,12 +1,10 @@ package apidiagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidiagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidiagnostic/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiissue/README.md index fa7dc550f2e..ba1be006872 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiissue` Documentation -The `apiissue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiissue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/client.go index 33f2a33d684..6350de2a21e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/client.go @@ -15,7 +15,7 @@ type ApiIssueClient struct { } func NewApiIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_api.go index f42ff72ff21..063c20d8c75 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_apiissue.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_apiissue.go index 7b13fff0230..267ea58855b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_apiissue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_createorupdate.go index 2c843315ed6..0a592af3683 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueClient) CreateOrUpdate(ctx context.Context, id ApiIssueId, input var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_delete.go index c51a70bf93d..51c49f6e8ea 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_get.go index a4f0ff0be8a..b364bf2fbce 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiIssueClient) Get(ctx context.Context, id ApiIssueId, options GetOpera var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_listbyservice.go index 314d87e9b6e..fc909bd1842 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_update.go index 5db5804bbb2..0e09126c1ed 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiIssueClient) Update(ctx context.Context, id ApiIssueId, input IssueUp var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissue/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiissue/version.go index 9ac3668aa49..fa215cce179 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissue/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissue/version.go @@ -1,12 +1,10 @@ package apiissue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissue/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/README.md index eb78e42a05f..467cd6a4f30 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment` Documentation -The `apiissueattachment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiissueattachment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/client.go index 84b276260e3..ee1f89ab366 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/client.go @@ -15,7 +15,7 @@ type ApiIssueAttachmentClient struct { } func NewApiIssueAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueAttachmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissueattachment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissueattachment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueAttachmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_apiissue.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_apiissue.go index b77d45c0fdb..e7dc1375f21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_apiissue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_attachment.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_attachment.go index c57aa82518a..542f104ced8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_attachment.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/id_attachment.go @@ -48,7 +48,7 @@ func ParseAttachmentID(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAttachmentIDInsensitively(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_createorupdate.go index a44575c4ae0..0433d95beeb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueAttachmentClient) CreateOrUpdate(ctx context.Context, id Attachm var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_delete.go index 867e45b1ffc..8eb76db21c6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_get.go index f544ca53f2b..9d487af13e5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueAttachmentClient) Get(ctx context.Context, id AttachmentId) (res var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_listbyservice.go index 7e2162ab2a9..5805727d267 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/version.go index 2542ac4b7eb..0af2f10c15f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissueattachment/version.go @@ -1,12 +1,10 @@ package apiissueattachment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissueattachment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissueattachment/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/README.md index 3656c440fd8..775450c8ced 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment` Documentation -The `apiissuecomment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiissuecomment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/client.go index 22377af4fed..8ce8ce1be89 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/client.go @@ -15,7 +15,7 @@ type ApiIssueCommentClient struct { } func NewApiIssueCommentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueCommentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissuecomment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissuecomment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueCommentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_apiissue.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_apiissue.go index dff007275dc..62a078b3a21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_apiissue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_comment.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_comment.go index 46ee496fa82..d0ec704a1bc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_comment.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/id_comment.go @@ -48,7 +48,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_createorupdate.go index 82f8efd70c7..df5d55dbf21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueCommentClient) CreateOrUpdate(ctx context.Context, id CommentId, var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_delete.go index 725bbb2f2a8..de8f0e9c2cd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_get.go index 459dd2af4c6..596b1a6dd11 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueCommentClient) Get(ctx context.Context, id CommentId) (result Ge var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_listbyservice.go index a1f56a2f9d7..4b5e59c9821 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/version.go index 05952cab054..7a22edf0835 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiissuecomment/version.go @@ -1,12 +1,10 @@ package apiissuecomment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissuecomment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissuecomment/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/README.md b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/README.md index 005515ef54b..47abc03aa49 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice` Documentation -The `apimanagementservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apimanagementservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/client.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/client.go index 7c5932f7316..4816927cda9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceClient struct { } func NewApiManagementServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/id_service.go index 5183555d0c8..b8c710f4cb3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_checknameavailability.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_checknameavailability.go index 2a8c875ee1f..0aa5392bae2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_checknameavailability.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ApiManagementServiceClient) CheckNameAvailability(ctx context.Context, i var model ApiManagementServiceNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_get.go index 771928691f7..f4d6a791731 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_get.go @@ -45,7 +45,6 @@ func (c ApiManagementServiceClient) Get(ctx context.Context, id ServiceId) (resu var model ApiManagementServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getdomainownershipidentifier.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getdomainownershipidentifier.go index 40d031a5f83..acb89d914e7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getdomainownershipidentifier.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getdomainownershipidentifier.go @@ -47,7 +47,6 @@ func (c ApiManagementServiceClient) GetDomainOwnershipIdentifier(ctx context.Con var model ApiManagementServiceGetDomainOwnershipIdentifierResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getssotoken.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getssotoken.go index ecf0a465d0f..7d2b5a93c5f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getssotoken.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/method_getssotoken.go @@ -46,7 +46,6 @@ func (c ApiManagementServiceClient) GetSsoToken(ctx context.Context, id ServiceI var model ApiManagementServiceGetSsoTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/version.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/version.go index 7924ecf4d88..bc23d2d63db 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementservice/version.go @@ -1,12 +1,10 @@ package apimanagementservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementservice/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/README.md b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/README.md index df52077e7bf..e46af62b96b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus` Documentation -The `apimanagementserviceskus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apimanagementserviceskus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/client.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/client.go index 33c4554cc31..d78d3a46960 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceSkusClient struct { } func NewApiManagementServiceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceSkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/id_service.go index 1f1fc07284a..92edf692b6f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/version.go b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/version.go index ea14a4281bd..afa55534f74 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apimanagementserviceskus/version.go @@ -1,12 +1,10 @@ package apimanagementserviceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementserviceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementserviceskus/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/README.md b/resource-manager/apimanagement/2023-03-01-preview/apioperation/README.md index c469611b044..282f5ecff1f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apioperation` Documentation -The `apioperation` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apioperation` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/client.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/client.go index 5c9fa6d23e6..b9782eb451f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/client.go @@ -15,7 +15,7 @@ type ApiOperationClient struct { } func NewApiOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_api.go index 253d9153dbc..751a8abfb3b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_apioperation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_apioperation.go index 57cefcbf920..3e3fe6797ca 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_apioperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_operation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_operation.go index ae47adf61a5..279d3f927e2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_operation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_workspaceapi.go index 15a2ebfc5ee..942099871ab 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_createorupdate.go index ee86a38b0bc..66fb1d5996e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) CreateOrUpdate(ctx context.Context, id OperationId, var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_delete.go index ee390d245b3..e4e9e6e90ee 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_get.go index 7fed3585ab9..ff3a98889ea 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_get.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) Get(ctx context.Context, id OperationId) (result Get var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_listbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_listbyapi.go index df8d3b45502..798fe0e7552 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_update.go index 005fc98f21a..4f5130245ac 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) Update(ctx context.Context, id OperationId, input Op var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go index 31e0a6ea5fe..30641e7be40 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) WorkspaceApiOperationCreateOrUpdate(ctx context.Cont var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationdelete.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationdelete.go index 803c543da5b..d4c57385ace 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationget.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationget.go index 2da88a66a2f..e6dc1ea7d24 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationget.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) WorkspaceApiOperationGet(ctx context.Context, id Api var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationlistbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationlistbyapi.go index dfa7091cdf8..980cf5b41d0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationlistbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationlistbyapi.go @@ -42,6 +42,7 @@ func (o WorkspaceApiOperationListByApiOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationupdate.go index b485b35b34a..ab2d9f3e638 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/method_workspaceapioperationupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) WorkspaceApiOperationUpdate(ctx context.Context, id var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperation/version.go b/resource-manager/apimanagement/2023-03-01-preview/apioperation/version.go index f4efc8e5b39..55901230a99 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperation/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperation/version.go @@ -1,12 +1,10 @@ package apioperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperation/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/README.md index eae18071aa3..1b7f399b722 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy` Documentation -The `apioperationpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apioperationpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/client.go index 4c1ef477115..c0dc541f2ed 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/client.go @@ -15,7 +15,7 @@ type ApiOperationPolicyClient struct { } func NewApiOperationPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_apioperation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_apioperation.go index 15b5b760791..e8158bcb582 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_apioperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_operation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_operation.go index a9f5f2e9bd1..99c5e55bc33 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_operation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_createorupdate.go index 3437b481d77..398b6fbd9ed 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) CreateOrUpdate(ctx context.Context, id Operati var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_delete.go index 1b77d06ed20..cd8893ce2f0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_get.go index 53ce4e80d68..24446658831 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) Get(ctx context.Context, id OperationId, optio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go index 749273ac587..c21831c5e1a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToHeaders() * func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyCreateOrUpdate(ctx var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go index 47c3dded764..6aa0d0aa167 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToHeaders() *client.H func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go index 9395af3465a..37760ed9db3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiOperationPolicyGetOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyGet(ctx context.Con var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/version.go index 9a80583beeb..ad09b3629e0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationpolicy/version.go @@ -1,12 +1,10 @@ package apioperationpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationpolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/README.md b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/README.md index 1ce300d8077..fe3d2f9ece8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag` Documentation -The `apioperationsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apioperationsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/client.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/client.go index 26f8b7f55aa..703172fb96e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/client.go @@ -15,7 +15,7 @@ type ApiOperationsByTagClient struct { } func NewApiOperationsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/id_api.go index 5897ef0aafc..3ef76da3989 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/method_operationlistbytags.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/method_operationlistbytags.go index 2a37906b22f..da55db0920b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/method_operationlistbytags.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/method_operationlistbytags.go @@ -42,6 +42,7 @@ func (o OperationListByTagsOperationOptions) ToHeaders() *client.Headers { func (o OperationListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/version.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/version.go index 56cb7e76729..aea179d7c22 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationsbytag/version.go @@ -1,12 +1,10 @@ package apioperationsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationsbytag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/README.md b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/README.md index 7cdb47e1b84..e7b6750a224 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apioperationtag` Documentation -The `apioperationtag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apioperationtag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/client.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/client.go index 6f14f25474c..977dc13c0f9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/client.go @@ -15,7 +15,7 @@ type ApiOperationTagClient struct { } func NewApiOperationTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationtag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationtag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operation.go index efa4b494f53..cd8e54a7d89 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operationtag.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operationtag.go index 278b58eaf30..daaa768a548 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operationtag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/id_operationtag.go @@ -48,7 +48,7 @@ func ParseOperationTagID(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOperationTagIDInsensitively(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_tagassigntooperation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_tagassigntooperation.go index ee4d3b0dbb0..003af5a6855 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_tagassigntooperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_tagassigntooperation.go @@ -46,7 +46,6 @@ func (c ApiOperationTagClient) TagAssignToOperation(ctx context.Context, id Oper var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taggetbyoperation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taggetbyoperation.go index 7448f9ee27a..cbdff13a037 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taggetbyoperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taggetbyoperation.go @@ -45,7 +45,6 @@ func (c ApiOperationTagClient) TagGetByOperation(ctx context.Context, id Operati var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taglistbyoperation.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taglistbyoperation.go index f68870a2587..13096fc0729 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taglistbyoperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/method_taglistbyoperation.go @@ -41,6 +41,7 @@ func (o TagListByOperationOperationOptions) ToHeaders() *client.Headers { func (o TagListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/version.go b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/version.go index 47f2a803aed..25f71450b9a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apioperationtag/version.go @@ -1,12 +1,10 @@ package apioperationtag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationtag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationtag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/README.md index 2b67b4008db..eaa1656453b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apipolicy` Documentation -The `apipolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apipolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/client.go index 84c3dfec8c9..48a63aea96b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/client.go @@ -15,7 +15,7 @@ type ApiPolicyClient struct { } func NewApiPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apipolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apipolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_api.go index 8423eae7bd7..3313f2d60fe 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_workspaceapi.go index a7710bb2ef5..047e8a1d7a6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_createorupdate.go index eeaf614e85b..5a5f41a5a69 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) CreateOrUpdate(ctx context.Context, id ApiId, input Pol var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_delete.go index ee63586a23e..2e0bec42e46 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_get.go index c62f27cb331..215a0d6e983 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) Get(ctx context.Context, id ApiId, options GetOperation var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go index 003cadb79ce..c54d98f57f5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyCreateOrUpdate(ctx context.Context, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicydelete.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicydelete.go index f2ceb3f9e4d..0f9bc74b6ea 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicydelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiPolicyDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicyget.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicyget.go index 364bd7248f2..0d3c1867f7d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicyget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/method_workspaceapipolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyGet(ctx context.Context, id Workspace var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/version.go index 30b96ca1597..5f88d217cf2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apipolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apipolicy/version.go @@ -1,12 +1,10 @@ package apipolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apipolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apipolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/README.md index 2cdbbc6174b..7671c64e436 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiproduct` Documentation -The `apiproduct` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiproduct` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/client.go index e7774a6266c..657bc10d33b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/client.go @@ -15,7 +15,7 @@ type ApiProductClient struct { } func NewApiProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiproduct", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiproduct", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/id_api.go index b14e77a5f55..759adfa6c31 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/method_listbyapis.go b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/method_listbyapis.go index 9a4501fc786..a76cf16e6d4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/method_listbyapis.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/method_listbyapis.go @@ -41,6 +41,7 @@ func (o ListByApisOperationOptions) ToHeaders() *client.Headers { func (o ListByApisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/version.go index 4af55e63607..e3f4648cb6f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiproduct/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiproduct/version.go @@ -1,12 +1,10 @@ package apiproduct -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiproduct/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiproduct/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/README.md b/resource-manager/apimanagement/2023-03-01-preview/apirelease/README.md index 5765ae9c318..597bc18304e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apirelease` Documentation -The `apirelease` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apirelease` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/client.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/client.go index 5ce0c50057f..916d3cf987c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/client.go @@ -15,7 +15,7 @@ type ApiReleaseClient struct { } func NewApiReleaseClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiReleaseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirelease", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirelease", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiReleaseClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_api.go index 8cb60bea6b5..2d5590c7064 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_apirelease.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_apirelease.go index e93d37f020b..562f3b819a0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_apirelease.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_apirelease.go @@ -48,7 +48,7 @@ func ParseApiReleaseID(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiReleaseIDInsensitively(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_release.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_release.go index 782521151d8..43c06ed85ab 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_release.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_release.go @@ -46,7 +46,7 @@ func ParseReleaseID(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReleaseIDInsensitively(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_workspaceapi.go index 708a5e83416..dbd42a21510 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_createorupdate.go index 2b23b8d16a6..78ca213b93f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) CreateOrUpdate(ctx context.Context, id ReleaseId, inpu var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_delete.go index d7f28534465..ccae10babdb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_get.go index 4f45a0505aa..1c9d1797eb8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_get.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) Get(ctx context.Context, id ReleaseId) (result GetOper var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_listbyservice.go index 509f7241d4f..afff495b595 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_update.go index 1e51ca66c45..ec17ee72daa 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) Update(ctx context.Context, id ReleaseId, input ApiRel var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go index 3dcd9fce3ab..80cc66eac13 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseCreateOrUpdate(ctx context.Context, var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasedelete.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasedelete.go index 0fd63c74e77..38f1f981660 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasedelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleasedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiReleaseDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseget.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseget.go index df9e7f1c4c0..f0e400e1964 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseget.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseGet(ctx context.Context, id ApiRele var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaselistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaselistbyservice.go index 578ad231c48..7e85d2a7e53 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaselistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaselistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiReleaseListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceApiReleaseListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseupdate.go index d301c6d2adc..67c933b8f86 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/method_workspaceapireleaseupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseUpdate(ctx context.Context, id ApiR var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirelease/version.go b/resource-manager/apimanagement/2023-03-01-preview/apirelease/version.go index 369da5f6940..33baa72321d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirelease/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirelease/version.go @@ -1,12 +1,10 @@ package apirelease -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirelease/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirelease/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/README.md b/resource-manager/apimanagement/2023-03-01-preview/apirevision/README.md index 2e493ff56b3..f9662604aeb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apirevision` Documentation -The `apirevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apirevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/client.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/client.go index d44402ed6ae..3751f03b558 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/client.go @@ -15,7 +15,7 @@ type ApiRevisionClient struct { } func NewApiRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_api.go index b7fe8776e72..22a2fc79643 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_workspaceapi.go index ca64dd7d7de..9b7f6a9bd41 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_listbyservice.go index 1f1a5af6d1d..e65c6ee9c3e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go index acc1134979b..499ca14fd4d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiRevisionListByServiceOperationOptions) ToHeaders() *client.H func (o WorkspaceApiRevisionListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apirevision/version.go b/resource-manager/apimanagement/2023-03-01-preview/apirevision/version.go index 7218365c91a..f50436ec07a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apirevision/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apirevision/version.go @@ -1,12 +1,10 @@ package apirevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirevision/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/README.md b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/README.md index 958a37a6cd9..834ea8c3a89 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apisbytag` Documentation -The `apisbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apisbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/client.go b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/client.go index 034b78c6308..ed2e61ccb38 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/client.go @@ -15,7 +15,7 @@ type ApisByTagClient struct { } func NewApisByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apisbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apisbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/id_service.go index a88da291012..e67b3727900 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/method_apilistbytags.go b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/method_apilistbytags.go index 913e89cf621..98b08e4fddf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/method_apilistbytags.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/method_apilistbytags.go @@ -42,6 +42,7 @@ func (o ApiListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ApiListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/version.go b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/version.go index a6806eede05..aef923afa58 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apisbytag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apisbytag/version.go @@ -1,12 +1,10 @@ package apisbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apisbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apisbytag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/README.md b/resource-manager/apimanagement/2023-03-01-preview/apischema/README.md index 04a5467a5e2..6efd0fd62d6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apischema` Documentation -The `apischema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apischema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/client.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/client.go index fb466515328..feae3073bba 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/client.go @@ -15,7 +15,7 @@ type ApiSchemaClient struct { } func NewApiSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiSchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apischema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apischema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiSchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_api.go index 725dc89049b..4b362d874f1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_apischema.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_apischema.go index af8be6866d8..52763f55ab3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_apischema.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_apischema.go @@ -46,7 +46,7 @@ func ParseApiSchemaID(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapi.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapi.go index a3b95e32e10..a72ad0a9467 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapischema.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapischema.go index 2b8ca6ceea1..bfca1e57a2f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapischema.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/id_workspaceapischema.go @@ -48,7 +48,7 @@ func ParseWorkspaceApiSchemaID(input string) (*WorkspaceApiSchemaId, error) { } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceApiSchemaIDInsensitively(input string) (*WorkspaceApiSchemaId } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_createorupdate.go index e9339741550..43f5ff04667 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_delete.go index 1e1272fa389..cb2a09c563a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_get.go index c0bd56818fa..474b0728991 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_get.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) Get(ctx context.Context, id ApiSchemaId) (result GetOpe var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_listbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_listbyapi.go index c3cb801dfce..5cbe66a49a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemacreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemacreateorupdate.go index 5074609389e..67efb19c8e1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemadelete.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemadelete.go index f5c12caff48..f8d52c4b601 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemadelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemadelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemaget.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemaget.go index 0e2e9ec7b07..42120431a21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemaget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemaget.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) WorkspaceApiSchemaGet(ctx context.Context, id Workspace var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemalistbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemalistbyapi.go index df9c59dfaf8..a72accff3f1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemalistbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/method_workspaceapischemalistbyapi.go @@ -41,6 +41,7 @@ func (o WorkspaceApiSchemaListByApiOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiSchemaListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apischema/version.go b/resource-manager/apimanagement/2023-03-01-preview/apischema/version.go index b162cba2b0d..33a6b650ae4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apischema/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apischema/version.go @@ -1,12 +1,10 @@ package apischema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apischema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apischema/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/README.md b/resource-manager/apimanagement/2023-03-01-preview/apitag/README.md index d8838c2a954..c947a9d65f0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apitag` Documentation -The `apitag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apitag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/client.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/client.go index 491411cb346..d6fa22e93b2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/client.go @@ -15,7 +15,7 @@ type ApiTagClient struct { } func NewApiTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/id_api.go index 584293d60e3..6041b57e3cb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/id_apitag.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/id_apitag.go index 13e9a7f8c96..e22fb5fe987 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/id_apitag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/id_apitag.go @@ -46,7 +46,7 @@ func ParseApiTagID(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiTagIDInsensitively(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_tagassigntoapi.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_tagassigntoapi.go index daa3d8e3cbb..e228f15e51c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_tagassigntoapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_tagassigntoapi.go @@ -46,7 +46,6 @@ func (c ApiTagClient) TagAssignToApi(ctx context.Context, id ApiTagId) (result T var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taggetbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taggetbyapi.go index 17951c4564a..ce827a4d294 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taggetbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taggetbyapi.go @@ -45,7 +45,6 @@ func (c ApiTagClient) TagGetByApi(ctx context.Context, id ApiTagId) (result TagG var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taglistbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taglistbyapi.go index 5c2639c91e3..26018d60d4a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taglistbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/method_taglistbyapi.go @@ -41,6 +41,7 @@ func (o TagListByApiOperationOptions) ToHeaders() *client.Headers { func (o TagListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitag/version.go b/resource-manager/apimanagement/2023-03-01-preview/apitag/version.go index 1996f4d2546..ffe9212f732 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitag/version.go @@ -1,12 +1,10 @@ package apitag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/README.md b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/README.md index e1bf929ef5f..2bec64f0b33 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apitagdescription` Documentation -The `apitagdescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apitagdescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/client.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/client.go index f3068aee44a..6f6a4d3fac3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/client.go @@ -15,7 +15,7 @@ type ApiTagDescriptionClient struct { } func NewApiTagDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitagdescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitagdescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_api.go index 6c8591fef9e..1111c611d79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_tagdescription.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_tagdescription.go index 0e84945f848..441f9659ee4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_tagdescription.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/id_tagdescription.go @@ -46,7 +46,7 @@ func ParseTagDescriptionID(input string) (*TagDescriptionId, error) { } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTagDescriptionIDInsensitively(input string) (*TagDescriptionId, error) } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_createorupdate.go index 11d74115f05..2f2cf0b50a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiTagDescriptionClient) CreateOrUpdate(ctx context.Context, id TagDescr var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_delete.go index 2ac6057d339..aa5781c0d43 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_get.go index e350b63f26f..6269b053999 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_get.go @@ -45,7 +45,6 @@ func (c ApiTagDescriptionClient) Get(ctx context.Context, id TagDescriptionId) ( var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_listbyservice.go index 6a36cd97456..ebcba919eef 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/version.go b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/version.go index c43583d2146..bd360f4bd01 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apitagdescription/version.go @@ -1,12 +1,10 @@ package apitagdescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitagdescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitagdescription/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/README.md index 847e1966509..194bf39a413 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiversionset` Documentation -The `apiversionset` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiversionset` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/client.go index ff0c4d18fb0..8cb546608a7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/client.go @@ -15,7 +15,7 @@ type ApiVersionSetClient struct { } func NewApiVersionSetClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_apiversionset.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_apiversionset.go index 6a1476b429c..86ec55820c7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_apiversionset.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_service.go index fe44a488d70..cf4cbee8fdb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspace.go index ffae2571e19..9f6cc276906 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspaceapiversionset.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspaceapiversionset.go index 07c056e413c..9d0db70a74e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_createorupdate.go index 2d070fcbf91..3314930a661 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) CreateOrUpdate(ctx context.Context, id ApiVersionSe var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_get.go index 7b7c728908e..6e0f1d21d9e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) Get(ctx context.Context, id ApiVersionSetId) (resul var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_listbyservice.go index 0f44e4d938d..e3cf32ef2c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_update.go index 97fce9046f6..b8070706ca3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) Update(ctx context.Context, id ApiVersionSetId, inp var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go index 0fde6db7b9f..4e8fd2c2aa1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetCreateOrUpdate(ctx context.Co var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetget.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetget.go index 2a61095ca42..30c1f373c91 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetget.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetGet(ctx context.Context, id W var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go index e65dc1b5956..40e50bad248 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToHeaders() *client func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetupdate.go index dda3ecdb80b..2d7ebc58bf4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/method_workspaceapiversionsetupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetUpdate(ctx context.Context, i var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/version.go index 23638c38ca5..60905976788 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionset/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionset/version.go @@ -1,12 +1,10 @@ package apiversionset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionset/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/client.go index e1665dd8077..2186fe19f82 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/client.go @@ -15,7 +15,7 @@ type ApiVersionSetsClient struct { } func NewApiVersionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_apiversionset.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_apiversionset.go index ef4fd9b314b..20c761485f9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_apiversionset.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_workspaceapiversionset.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_workspaceapiversionset.go index c5271af64dc..1aebdebbf6c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_apiversionsetdelete.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_apiversionsetdelete.go index 1d2948225c9..71c29c6a6d2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_apiversionsetdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_apiversionsetdelete.go @@ -35,6 +35,7 @@ func (o ApiVersionSetDeleteOperationOptions) ToHeaders() *client.Headers { func (o ApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go index bef988a2083..11216ac1eb4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiVersionSetDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/version.go index 75dee345828..35fd488fa34 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiversionsets/version.go @@ -1,12 +1,10 @@ package apiversionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionsets/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/README.md b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/README.md index 5b94b63ec0a..c8c935cb5c8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/apiwiki` Documentation -The `apiwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `apiwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/client.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/client.go index d4a7082fd98..0f9dd6aad89 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/client.go @@ -15,7 +15,7 @@ type ApiWikiClient struct { } func NewApiWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/id_api.go index 04b9460d298..63214f7ed9d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_createorupdate.go index 4004fddb029..4fa4ceb7e0c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiWikiClient) CreateOrUpdate(ctx context.Context, id ApiId, input WikiC var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_delete.go index 62f6f711cde..2a2cd9d29b8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_get.go index 35b7a3426ae..9c5fefccb49 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_get.go @@ -46,7 +46,6 @@ func (c ApiWikiClient) Get(ctx context.Context, id ApiId) (result GetOperationRe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_list.go index aee5fc272ef..bbac7402e46 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_update.go index d3c1ff6bdaf..91e9a4ca6ea 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiWikiClient) Update(ctx context.Context, id ApiId, input WikiUpdateCon var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/version.go b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/version.go index d9349fe90d8..df282ee5d4c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/apiwiki/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/apiwiki/version.go @@ -1,12 +1,10 @@ package apiwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiwiki/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorization/README.md index 7a9955215db..2dcdeeaeda7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorization` Documentation -The `authorization` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorization` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/client.go index 5c99f0c5f29..532ad956ebf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/client.go @@ -15,7 +15,7 @@ type AuthorizationClient struct { } func NewAuthorizationClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorization", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorization", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/id_authorization.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/id_authorization.go index 17a2d80ccbb..bc1fecf80a8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/id_authorization.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_createorupdate.go index de6586fe052..40d6f21bb19 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationClient) CreateOrUpdate(ctx context.Context, id Authorizatio var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_delete.go index 9595882688b..aad52b6efb5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_get.go index b6941ad9f03..686be430460 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationClient) Get(ctx context.Context, id AuthorizationId) (resul var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorization/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorization/version.go index bb95897245d..342cfacec1b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorization/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorization/version.go @@ -1,12 +1,10 @@ package authorization -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorization/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorization/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/README.md index c017bc8015d..3effd08133f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy` Documentation -The `authorizationaccesspolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizationaccesspolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/client.go index f50cda54305..b6ea457f27c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/client.go @@ -15,7 +15,7 @@ type AuthorizationAccessPolicyClient struct { } func NewAuthorizationAccessPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationAccessPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationAccessPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_accesspolicy.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_accesspolicy.go index 958261ca120..b9ab551eb2f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_accesspolicy.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_accesspolicy.go @@ -48,7 +48,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_authorization.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_authorization.go index bbd21ac9fd0..8790b5211c4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_authorization.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_createorupdate.go index 346e394cab1..cccefbb5d19 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, id var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_delete.go index 3d067c9cc2b..de889c67dcc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_get.go index 3c903781063..77357edcc1a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationAccessPolicyClient) Get(ctx context.Context, id AccessPolic var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_listbyauthorization.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_listbyauthorization.go index 3a1d919d552..0761aece330 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_listbyauthorization.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/method_listbyauthorization.go @@ -41,6 +41,7 @@ func (o ListByAuthorizationOperationOptions) ToHeaders() *client.Headers { func (o ListByAuthorizationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/version.go index d3cc241ace9..bdb423506b1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationaccesspolicy/version.go @@ -1,12 +1,10 @@ package authorizationaccesspolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationaccesspolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationaccesspolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/README.md index dda7b0dcac9..cec27a2ef11 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode` Documentation -The `authorizationconfirmconsentcode` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizationconfirmconsentcode` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/client.go index 22e7ba30e1a..f6bc0c81714 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/client.go @@ -15,7 +15,7 @@ type AuthorizationConfirmConsentCodeClient struct { } func NewAuthorizationConfirmConsentCodeClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationConfirmConsentCodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationConfirmConsentCodeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/id_authorization.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/id_authorization.go index c49d4be720d..53244e86556 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/id_authorization.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/version.go index 76d318e9c44..32eeb478335 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationconfirmconsentcode/version.go @@ -1,12 +1,10 @@ package authorizationconfirmconsentcode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationconfirmconsentcode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationconfirmconsentcode/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/README.md index 235739247a7..2ea04520e4f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks` Documentation -The `authorizationloginlinks` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizationloginlinks` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/client.go index 1e8c48f9d33..482627bdc0f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/client.go @@ -15,7 +15,7 @@ type AuthorizationLoginLinksClient struct { } func NewAuthorizationLoginLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationLoginLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationloginlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationloginlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationLoginLinksClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/id_authorization.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/id_authorization.go index c90b836745d..52285fb88c7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/id_authorization.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/method_post.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/method_post.go index ed7594c6f30..9bab7764034 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/method_post.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/method_post.go @@ -50,7 +50,6 @@ func (c AuthorizationLoginLinksClient) Post(ctx context.Context, id Authorizatio var model AuthorizationLoginResponseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/version.go index b30febc26a3..44a172cb7a8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationloginlinks/version.go @@ -1,12 +1,10 @@ package authorizationloginlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationloginlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationloginlinks/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/README.md index 9203f036970..8e29e289418 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider` Documentation -The `authorizationprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizationprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/client.go index c3670048321..43ff7f92782 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/client.go @@ -15,7 +15,7 @@ type AuthorizationProviderClient struct { } func NewAuthorizationProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_authorizationprovider.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_authorizationprovider.go index 5b377135192..0c60cfd394d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_service.go index 98813175218..1a73088603f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_createorupdate.go index f516f5c677f..f3af9a4cbb1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, id Auth var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_delete.go index 0c0c82a4e01..ff582aa785c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_get.go index 27f68eef690..f92b6ccd418 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationProviderClient) Get(ctx context.Context, id AuthorizationPr var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_listbyservice.go index 8e28a4d589e..2c69a441089 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/version.go index 27cfb0dfeba..17fca833ab1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationprovider/version.go @@ -1,12 +1,10 @@ package authorizationprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationprovider/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizations/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizations/README.md index 228afcc448e..dd48f7f4ce1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizations/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizations/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizations/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizations/id_authorizationprovider.go b/resource-manager/apimanagement/2023-03-01-preview/authorizations/id_authorizationprovider.go index ec0427a96f6..b5c11dc2d82 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizations/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizations/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go b/resource-manager/apimanagement/2023-03-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go index 61659c7182f..b2910e09318 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go @@ -41,6 +41,7 @@ func (o AuthorizationListByAuthorizationProviderOperationOptions) ToHeaders() *c func (o AuthorizationListByAuthorizationProviderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizations/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizations/version.go index d56fc1a0302..262afa6c45f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizations/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/README.md b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/README.md index 721ccdacd21..4ce1e9eef07 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/authorizationserver` Documentation -The `authorizationserver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `authorizationserver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/client.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/client.go index a234058adb1..1704ea21dd3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/client.go @@ -15,7 +15,7 @@ type AuthorizationServerClient struct { } func NewAuthorizationServerClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationServerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationserver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationserver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationServerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_authorizationserver.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_authorizationserver.go index d501746a896..e2ff82e6771 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_authorizationserver.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_authorizationserver.go @@ -44,7 +44,7 @@ func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error) { } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServer } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_service.go index 16870e5f263..ef09a35c182 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_createorupdate.go index ef58fe9a05f..4e499b27763 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationServerClient) CreateOrUpdate(ctx context.Context, id Author var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_delete.go index a307aa17d3f..2bb46f4501a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_get.go index 8d4a7463981..54e8b811bca 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationServerClient) Get(ctx context.Context, id AuthorizationServ var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listbyservice.go index ae4ad390656..7c174cf8685 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listsecrets.go index 58b62cc36bf..e4bcb668d70 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_listsecrets.go @@ -46,7 +46,6 @@ func (c AuthorizationServerClient) ListSecrets(ctx context.Context, id Authoriza var model AuthorizationServerSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_update.go index 686f7550e4d..f16ebce0af3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AuthorizationServerClient) Update(ctx context.Context, id AuthorizationS var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/version.go b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/version.go index df309c34e79..a868126f6a6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/authorizationserver/version.go @@ -1,12 +1,10 @@ package authorizationserver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationserver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationserver/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/README.md b/resource-manager/apimanagement/2023-03-01-preview/backend/README.md index 9474ccbcc4c..b41b76978cd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/backend` Documentation -The `backend` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `backend` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/client.go b/resource-manager/apimanagement/2023-03-01-preview/backend/client.go index 8cf9c601f15..0752289445b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/client.go @@ -15,7 +15,7 @@ type BackendClient struct { } func NewBackendClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/id_backend.go b/resource-manager/apimanagement/2023-03-01-preview/backend/id_backend.go index d59958e9b68..7540b370263 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/id_backend.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/backend/id_service.go index afe0eb62f7f..f827f9d35f4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/backend/method_createorupdate.go index 876a39e1fb9..d957d53a6f1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BackendClient) CreateOrUpdate(ctx context.Context, id BackendId, input B var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/backend/method_delete.go index f71fa94d865..46366e437b1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/backend/method_get.go index cc3aa998b93..77da1fa7415 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/method_get.go @@ -45,7 +45,6 @@ func (c BackendClient) Get(ctx context.Context, id BackendId) (result GetOperati var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/backend/method_listbyservice.go index f8c5b6daf2a..b0a6f007cc2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/backend/method_update.go index 3c102cf0e80..80258a36e8d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c BackendClient) Update(ctx context.Context, id BackendId, input BackendUp var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backend/version.go b/resource-manager/apimanagement/2023-03-01-preview/backend/version.go index 7ec960c2544..b93fc08d45f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backend/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backend/version.go @@ -1,12 +1,10 @@ package backend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backend/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/README.md b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/README.md index d158887e441..5f4a9022f0d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/backendreconnect` Documentation -The `backendreconnect` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `backendreconnect` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/client.go b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/client.go index e7931af1711..229aed9d409 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/client.go @@ -15,7 +15,7 @@ type BackendReconnectClient struct { } func NewBackendReconnectClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendReconnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backendreconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backendreconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendReconnectClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/id_backend.go b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/id_backend.go index 8099482517f..df64bd9a745 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/id_backend.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/version.go b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/version.go index 2eec71a305b..346e5caa99a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/backendreconnect/version.go @@ -1,12 +1,10 @@ package backendreconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backendreconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backendreconnect/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/README.md b/resource-manager/apimanagement/2023-03-01-preview/cache/README.md index 9e059e2b5d4..0ab7d757fad 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/cache` Documentation -The `cache` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `cache` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/client.go b/resource-manager/apimanagement/2023-03-01-preview/cache/client.go index e0befe22fa3..ab451fc4ea5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/client.go @@ -15,7 +15,7 @@ type CacheClient struct { } func NewCacheClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cache", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cache", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/id_cache.go b/resource-manager/apimanagement/2023-03-01-preview/cache/id_cache.go index 8260234796a..22061eee597 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/id_cache.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/id_cache.go @@ -44,7 +44,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/cache/id_service.go index bf4f26d8b36..947e2876f0e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/cache/method_createorupdate.go index 26ef5edfcc7..197b76786bc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CacheClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/cache/method_delete.go index 511791374c6..55b4280d97d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/cache/method_get.go index 10fd3d603ea..1bb437d248d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/method_get.go @@ -45,7 +45,6 @@ func (c CacheClient) Get(ctx context.Context, id CacheId) (result GetOperationRe var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/cache/method_listbyservice.go index 29189620638..99ac16add79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/cache/method_update.go index 9388cab550d..f70e4710f73 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CacheClient) Update(ctx context.Context, id CacheId, input CacheUpdatePa var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/cache/version.go b/resource-manager/apimanagement/2023-03-01-preview/cache/version.go index 05ac380637c..b4475467e03 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/cache/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/cache/version.go @@ -1,12 +1,10 @@ package cache -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cache/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cache/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/README.md b/resource-manager/apimanagement/2023-03-01-preview/certificate/README.md index 51609b76bd7..567a094cbb4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `certificate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/client.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/id_certificate.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/id_certificate.go index 8617e21ad2a..42e2e50f70c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/id_certificate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/id_service.go index 75f9ac3b04b..461f53f3c34 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_createorupdate.go index 823d71d3e64..15e1df590a3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_delete.go index 6c0ded0942d..85948d80764 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_get.go index 884851fd83b..e04e8cfae98 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_listbyservice.go index 9f45a52fd7c..63e1c8507b6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_refreshsecret.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_refreshsecret.go index d764ec89d26..02667d79db1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/method_refreshsecret.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/method_refreshsecret.go @@ -46,7 +46,6 @@ func (c CertificateClient) RefreshSecret(ctx context.Context, id CertificateId) var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/certificate/version.go b/resource-manager/apimanagement/2023-03-01-preview/certificate/version.go index 31b726bacb3..9fcd56b77e8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/certificate/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/README.md b/resource-manager/apimanagement/2023-03-01-preview/contenttype/README.md index 267d82ca495..382d4b350c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/contenttype` Documentation -The `contenttype` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `contenttype` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/client.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/client.go index 86436fb159e..9dd4b452dda 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/client.go @@ -15,7 +15,7 @@ type ContentTypeClient struct { } func NewContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_contenttype.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_contenttype.go index 35dbd65c28b..580bdfbbbfa 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_contenttype.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_service.go index 1241f699f16..cdc854578dd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_createorupdate.go index d1a48e0857c..b51b4a363eb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeClient) CreateOrUpdate(ctx context.Context, id ContentTypeId, var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_delete.go index d3dc044bf5c..ff7bd7bd5d9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_get.go index 059c81af9e8..7f4ca66a7df 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/method_get.go @@ -45,7 +45,6 @@ func (c ContentTypeClient) Get(ctx context.Context, id ContentTypeId) (result Ge var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttype/version.go b/resource-manager/apimanagement/2023-03-01-preview/contenttype/version.go index 4aa288d517b..afe81176d06 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttype/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttype/version.go @@ -1,12 +1,10 @@ package contenttype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttype/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/README.md b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/README.md index d316ca3601d..eb2a060b3ce 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem` Documentation -The `contenttypecontentitem` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `contenttypecontentitem` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/client.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/client.go index 81fef8be029..25caa5484f1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/client.go @@ -15,7 +15,7 @@ type ContentTypeContentItemClient struct { } func NewContentTypeContentItemClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeContentItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttypecontentitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttypecontentitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeContentItemClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contentitem.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contentitem.go index b304e9fdf2b..add13b6f1fb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contentitem.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contentitem.go @@ -46,7 +46,7 @@ func ParseContentItemID(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContentItemIDInsensitively(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contenttype.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contenttype.go index 576b6390d40..437d185ec27 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contenttype.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go index c23ccc2fcb2..0509fce5cd7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go @@ -36,6 +36,7 @@ func (o ContentItemCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o ContentItemCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeContentItemClient) ContentItemCreateOrUpdate(ctx context.Cont var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemdelete.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemdelete.go index ae0888ce9e8..bfb0570356b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemdelete.go @@ -35,6 +35,7 @@ func (o ContentItemDeleteOperationOptions) ToHeaders() *client.Headers { func (o ContentItemDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemget.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemget.go index 41ca4d59a44..025cff6645e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/method_contentitemget.go @@ -45,7 +45,6 @@ func (c ContentTypeContentItemClient) ContentItemGet(ctx context.Context, id Con var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/version.go b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/version.go index 8db47262360..0e100e37f12 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/contenttypecontentitem/version.go @@ -1,12 +1,10 @@ package contenttypecontentitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttypecontentitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttypecontentitem/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/README.md b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/README.md index b6fdd737cda..79b7e07c262 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/delegationsettings` Documentation -The `delegationsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `delegationsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/client.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/client.go index 975a55a7a10..6d65fe2f5ec 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/client.go @@ -15,7 +15,7 @@ type DelegationSettingsClient struct { } func NewDelegationSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DelegationSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delegationsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delegationsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DelegationSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/id_service.go index c3aca641d8f..c0226a556f8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_createorupdate.go index 194af96a592..d36a1f34df6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DelegationSettingsClient) CreateOrUpdate(ctx context.Context, id Service var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_get.go index db02f9407db..3df4abb7ec7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_get.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) Get(ctx context.Context, id ServiceId) (result var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_listsecrets.go index 50ee5bed1bd..e4b72cd79d6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) ListSecrets(ctx context.Context, id ServiceId) var model PortalSettingValidationKeyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_update.go index c010e8ee865..9ef22bac0a1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/version.go b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/version.go index b5d21ef2538..a66cbe1578c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/delegationsettings/version.go @@ -1,12 +1,10 @@ package delegationsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delegationsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delegationsettings/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/README.md b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/README.md index e43a29da14e..8795af4f787 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/deletedservice` Documentation -The `deletedservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `deletedservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/client.go b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/client.go index 7ce116a7259..27367714830 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/client.go @@ -15,7 +15,7 @@ type DeletedServiceClient struct { } func NewDeletedServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/id_deletedservice.go b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/id_deletedservice.go index d4f9feb3f31..9b447f5fd24 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/id_deletedservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/id_deletedservice.go @@ -42,7 +42,7 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/method_getbyname.go b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/method_getbyname.go index f7fef324399..3e180be780a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/method_getbyname.go +++ b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/method_getbyname.go @@ -45,7 +45,6 @@ func (c DeletedServiceClient) GetByName(ctx context.Context, id DeletedServiceId var model DeletedServiceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/version.go b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/version.go index 2147c63851a..d6f9687bf6b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/deletedservice/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/deletedservice/version.go @@ -1,12 +1,10 @@ package deletedservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservice/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/README.md b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/README.md index 92c7582c883..1f2de162296 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/diagnostic` Documentation -The `diagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `diagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/client.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/client.go index d7b4ed69319..6b71958f5b6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/client.go @@ -15,7 +15,7 @@ type DiagnosticClient struct { } func NewDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_diagnostic.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_diagnostic.go index 890a40a3e9c..4e521a300da 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_diagnostic.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_service.go index ce1adfde374..5ebeb4ccb23 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_createorupdate.go index 63709e2900a..18a4c536cb5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DiagnosticClient) CreateOrUpdate(ctx context.Context, id DiagnosticId, i var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_delete.go index 4f5b2bc7d55..1e9acda8c14 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_get.go index af2a7f7943a..3ae72b09a0f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticClient) Get(ctx context.Context, id DiagnosticId) (result GetO var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_listbyservice.go index 8f84fb8b874..bf7e8ad966a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_update.go index a98dfa6617c..6e25bf0e1d7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DiagnosticClient) Update(ctx context.Context, id DiagnosticId, input Dia var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/version.go b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/version.go index 9cac29d5aa1..1bac71799b4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/diagnostic/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/diagnostic/version.go @@ -1,12 +1,10 @@ package diagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostic/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/README.md b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/README.md index c64be2d1e5e..3c2628d58ee 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/documentationresource` Documentation -The `documentationresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `documentationresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/client.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/client.go index 84d6809b879..7366c4f9e12 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/client.go @@ -15,7 +15,7 @@ type DocumentationResourceClient struct { } func NewDocumentationResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*DocumentationResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "documentationresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "documentationresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DocumentationResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_documentation.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_documentation.go index 6841fc7c512..0bb03b62932 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_documentation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_documentation.go @@ -44,7 +44,7 @@ func ParseDocumentationID(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDocumentationIDInsensitively(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_service.go index a25669a238f..d37f7661269 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_createorupdate.go index dba91b12734..e091e7fa55d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DocumentationResourceClient) CreateOrUpdate(ctx context.Context, id Docu var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_delete.go index dc215c80397..b7e63199308 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_get.go index db62fe89422..59fe05e032d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_get.go @@ -45,7 +45,6 @@ func (c DocumentationResourceClient) Get(ctx context.Context, id DocumentationId var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_listbyservice.go index fd2023ee4d1..2b64e6d607e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_update.go index 74fdf96af9a..a7b4e15a22a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DocumentationResourceClient) Update(ctx context.Context, id Documentatio var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/version.go b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/version.go index 0e98627bf07..63d8d6c9f39 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/documentationresource/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/documentationresource/version.go @@ -1,12 +1,10 @@ package documentationresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/documentationresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/documentationresource/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/README.md b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/README.md index 0e8066e64ea..1b0859ac77e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/emailtemplate` Documentation -The `emailtemplate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `emailtemplate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/client.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/client.go index 019165ffa63..578f2718f75 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/client.go @@ -15,7 +15,7 @@ type EmailTemplateClient struct { } func NewEmailTemplateClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/id_service.go index ad519c3023d..962040358d4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/method_listbyservice.go index c18ee603b17..7a86e93494c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/version.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/version.go index c62d020bbb9..1c4e1f30d68 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplate/version.go @@ -1,12 +1,10 @@ package emailtemplate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplate/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/README.md b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/README.md index 6dc6fe4ed27..7bb3737941c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/emailtemplates` Documentation -The `emailtemplates` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `emailtemplates` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/client.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/client.go index 9f3bc8ed59b..d38533bf55a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/client.go @@ -15,7 +15,7 @@ type EmailTemplatesClient struct { } func NewEmailTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplatesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/id_template.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/id_template.go index b10f4a91dd1..cb83e661d9e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/id_template.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/id_template.go @@ -44,7 +44,7 @@ func ParseTemplateID(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTemplateIDInsensitively(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go index 8f48b83acfd..7f48ae7cdbc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o EmailTemplateCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c EmailTemplatesClient) EmailTemplateCreateOrUpdate(ctx context.Context, i var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatedelete.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatedelete.go index 3bea1260006..82ce5a37244 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatedelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplatedelete.go @@ -35,6 +35,7 @@ func (o EmailTemplateDeleteOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateget.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateget.go index b9686668bf3..fcf8c3babdc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateget.go @@ -45,7 +45,6 @@ func (c EmailTemplatesClient) EmailTemplateGet(ctx context.Context, id TemplateI var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateupdate.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateupdate.go index 6870b6a5cc8..c1ac2c80e3f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/method_emailtemplateupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateUpdateOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c EmailTemplatesClient) EmailTemplateUpdate(ctx context.Context, id Templa var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/version.go b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/version.go index 6f4a81f5893..199055cad57 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/emailtemplates/version.go @@ -1,12 +1,10 @@ package emailtemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplates/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/README.md b/resource-manager/apimanagement/2023-03-01-preview/gateway/README.md index 5797f923ad7..4cb0259794c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gateway` Documentation -The `gateway` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gateway` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/client.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/client.go index 0d22b6f29bb..4b9a1263246 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/client.go @@ -15,7 +15,7 @@ type GatewayClient struct { } func NewGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/id_gateway.go index 350bafc55eb..efbf44f2ef1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/id_service.go index dbfd6735feb..fe3c9d96488 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_createorupdate.go index d73cce62328..4116eea8b19 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayClient) CreateOrUpdate(ctx context.Context, id GatewayId, input G var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_delete.go index a3e76d4da96..cfd3d12845f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_get.go index 3ddf01031fd..24f881c912f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_get.go @@ -45,7 +45,6 @@ func (c GatewayClient) Get(ctx context.Context, id GatewayId) (result GetOperati var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_listbyservice.go index 182f1a1be3b..193ebcb3f47 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_update.go index 2113086018c..fa00c7b0345 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GatewayClient) Update(ctx context.Context, id GatewayId, input GatewayCo var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gateway/version.go b/resource-manager/apimanagement/2023-03-01-preview/gateway/version.go index 972d16fff3f..5d05fae47cb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gateway/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gateway/version.go @@ -1,12 +1,10 @@ package gateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gateway/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/README.md index cf2be0a2cb3..7c14b70b56a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewayapi` Documentation -The `gatewayapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewayapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/client.go index 6f88d7098fd..41d09ed34cd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/client.go @@ -15,7 +15,7 @@ type GatewayApiClient struct { } func NewGatewayApiClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gateway.go index b2a134eea2f..4203aeb8629 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gatewayapi.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gatewayapi.go index 1780b205bde..3f2c6b9bb02 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gatewayapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/id_gatewayapi.go @@ -46,7 +46,7 @@ func ParseGatewayApiID(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_createorupdate.go index 5af86c5ab69..a17c2009dc7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GatewayApiClient) CreateOrUpdate(ctx context.Context, id GatewayApiId, i var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_listbyservice.go index 0babf1b2093..38dc86de4e9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/version.go index 37ea1386e53..fcfea2a4fec 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayapi/version.go @@ -1,12 +1,10 @@ package gatewayapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayapi/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/README.md index bfb2eef2b83..fc7514c6393 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority` Documentation -The `gatewaycertificateauthority` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewaycertificateauthority` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/client.go index 82e3bc25dd6..e2177530edd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/client.go @@ -15,7 +15,7 @@ type GatewayCertificateAuthorityClient struct { } func NewGatewayCertificateAuthorityClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayCertificateAuthorityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayCertificateAuthorityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_certificateauthority.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_certificateauthority.go index 1d7f6784836..f75937cbd0a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_certificateauthority.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_certificateauthority.go @@ -46,7 +46,7 @@ func ParseCertificateAuthorityID(input string) (*CertificateAuthorityId, error) } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCertificateAuthorityIDInsensitively(input string) (*CertificateAuthori } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_gateway.go index d3a20376e39..858de5997f3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_createorupdate.go index 421099fff39..70b2eddae89 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayCertificateAuthorityClient) CreateOrUpdate(ctx context.Context, i var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_delete.go index a6b9d901d6b..677ee184d41 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_get.go index 2a8a3c51cfd..3e558c2cc6a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_get.go @@ -45,7 +45,6 @@ func (c GatewayCertificateAuthorityClient) Get(ctx context.Context, id Certifica var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_listbyservice.go index c1b242e9166..93075c633f1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/version.go index 857f3fba777..f71a6c2b103 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaycertificateauthority/version.go @@ -1,12 +1,10 @@ package gatewaycertificateauthority -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaycertificateauthority/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaycertificateauthority/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/README.md index f1d91100b91..4beef33ebdf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken` Documentation -The `gatewaygeneratetoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewaygeneratetoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/client.go index ea0ee9040c7..95794c5f810 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/client.go @@ -15,7 +15,7 @@ type GatewayGenerateTokenClient struct { } func NewGatewayGenerateTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayGenerateTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayGenerateTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/id_gateway.go index 787aea2af5b..941bccb3007 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go index 7b0e8529654..99077ba9533 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go @@ -50,7 +50,6 @@ func (c GatewayGenerateTokenClient) GatewayGenerateToken(ctx context.Context, id var model GatewayTokenContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/version.go index 6d436614cb2..939bd9c7c49 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaygeneratetoken/version.go @@ -1,12 +1,10 @@ package gatewaygeneratetoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaygeneratetoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaygeneratetoken/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/README.md index 87c9bb40659..180d3dd838c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration` Documentation -The `gatewayhostnameconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewayhostnameconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/client.go index caf1c71d205..abf6519743b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/client.go @@ -15,7 +15,7 @@ type GatewayHostnameConfigurationClient struct { } func NewGatewayHostnameConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayHostnameConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayHostnameConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_gateway.go index 7864dddfacb..0987213e9cf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go index 510bff297ac..23c006e4969 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go @@ -46,7 +46,7 @@ func ParseHostnameConfigurationID(input string) (*HostnameConfigurationId, error } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHostnameConfigurationIDInsensitively(input string) (*HostnameConfigura } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_createorupdate.go index 81fc99af124..c47366added 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayHostnameConfigurationClient) CreateOrUpdate(ctx context.Context, var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_delete.go index 0964c8fdc78..609e8369ace 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_get.go index d04e4ef66d0..8a74f63cf02 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c GatewayHostnameConfigurationClient) Get(ctx context.Context, id Hostname var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_listbyservice.go index 619bbf3fcd1..fde20e31a6c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/version.go index 17a6351ad47..a0ed5fd6f79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayhostnameconfiguration/version.go @@ -1,12 +1,10 @@ package gatewayhostnameconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayhostnameconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayhostnameconfiguration/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/client.go index 4c95799c9a3..1249e0fe43c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayInvalidateDebugCredentialsClient struct { } func NewGatewayInvalidateDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayInvalidateDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayInvalidateDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go index c2d59d6f7af..48e02b5692d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/version.go index a4454c79764..743d463d37e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayinvalidatedebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewayinvalidatedebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/README.md index d4d73117c08..dc09d8a9598 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials` Documentation -The `gatewaylistdebugcredentials` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewaylistdebugcredentials` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/client.go index 6c497072ede..3c619a17e21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayListDebugCredentialsClient struct { } func NewGatewayListDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/id_gateway.go index acbba273523..ab492805d02 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go index 051f23acd41..201455ffc76 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go @@ -50,7 +50,6 @@ func (c GatewayListDebugCredentialsClient) GatewayListDebugCredentials(ctx conte var model GatewayDebugCredentialsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/version.go index 55e5baa1c84..6ff9cd7ce84 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistdebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewaylistdebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistdebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistdebugcredentials/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/README.md index a901acd75af..48309835a0d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys` Documentation -The `gatewaylistkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewaylistkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/client.go index a9b08e9562a..a54653f751f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/client.go @@ -15,7 +15,7 @@ type GatewayListKeysClient struct { } func NewGatewayListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/id_gateway.go index 9d53f351731..a6e34ce730a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/method_gatewaylistkeys.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/method_gatewaylistkeys.go index 902dad2ac34..d68ec89a5d7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/method_gatewaylistkeys.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/method_gatewaylistkeys.go @@ -46,7 +46,6 @@ func (c GatewayListKeysClient) GatewayListKeys(ctx context.Context, id GatewayId var model GatewayKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/version.go index 0e7ae3c8741..fdcaa80ad19 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylistkeys/version.go @@ -1,12 +1,10 @@ package gatewaylistkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistkeys/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/README.md index d9dd53847b0..7d60fd24616 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace` Documentation -The `gatewaylisttrace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewaylisttrace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/client.go index f61a6ad2928..e4944d1b2a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/client.go @@ -15,7 +15,7 @@ type GatewayListTraceClient struct { } func NewGatewayListTraceClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListTraceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylisttrace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylisttrace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListTraceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/id_gateway.go index 99faa7b3e70..bb630bab4fc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/method_gatewaylisttrace.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/method_gatewaylisttrace.go index af40b00889b..fb5df17b3e9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/method_gatewaylisttrace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/method_gatewaylisttrace.go @@ -50,7 +50,6 @@ func (c GatewayListTraceClient) GatewayListTrace(ctx context.Context, id Gateway var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/version.go index e31ff053341..10e99b04d91 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewaylisttrace/version.go @@ -1,12 +1,10 @@ package gatewaylisttrace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylisttrace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylisttrace/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/README.md b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/README.md index 7d4571c67cc..7f5a8214259 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey` Documentation -The `gatewayregeneratekey` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `gatewayregeneratekey` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/client.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/client.go index aef06aab007..2770f325934 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/client.go @@ -15,7 +15,7 @@ type GatewayRegenerateKeyClient struct { } func NewGatewayRegenerateKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayRegenerateKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayRegenerateKeyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/id_gateway.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/id_gateway.go index c8c620bc777..73626ffbe42 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/id_gateway.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/version.go b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/version.go index 750be3ed5c9..c41f1043b4e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/gatewayregeneratekey/version.go @@ -1,12 +1,10 @@ package gatewayregeneratekey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayregeneratekey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayregeneratekey/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/README.md b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/README.md index 18f21c6538f..dab2535708b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver` Documentation -The `graphqlapiresolver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `graphqlapiresolver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/client.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/client.go index ae9f7510594..b3ebac8625f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverClient struct { } func NewGraphQLApiResolverClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_api.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_api.go index 3f2483494f0..23aa990c8b9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_api.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_resolver.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_resolver.go index 3ff37f45676..adda4626050 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_resolver.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_createorupdate.go index 7860204fd3c..fde71d2c4d5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverClient) CreateOrUpdate(ctx context.Context, id Resolve var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_delete.go index 914915dc4d6..1c1c2965313 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_get.go index 8090c144df8..7209e49cd71 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_get.go @@ -45,7 +45,6 @@ func (c GraphQLApiResolverClient) Get(ctx context.Context, id ResolverId) (resul var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_listbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_listbyapi.go index 5ce194fb6df..3631d4d14b3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_update.go index 3fa45e6fa93..91e1176b64b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GraphQLApiResolverClient) Update(ctx context.Context, id ResolverId, inp var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/version.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/version.go index 038dc4a7e89..0301b01a24a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolver/version.go @@ -1,12 +1,10 @@ package graphqlapiresolver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolver/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/README.md index 7cce41c69cb..8efc18bf5e3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy` Documentation -The `graphqlapiresolverpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `graphqlapiresolverpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/client.go index 28db0b0bef5..4f9c0d8efbd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverPolicyClient struct { } func NewGraphQLApiResolverPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/id_resolver.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/id_resolver.go index 84768e215d7..db5373379f0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/id_resolver.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_createorupdate.go index c349e81087a..0ba357fe731 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverPolicyClient) CreateOrUpdate(ctx context.Context, id R var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_delete.go index 619ea1f6171..0cd91cb1b2e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_get.go index 4e49bd17793..5299c3d59cf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GraphQLApiResolverPolicyClient) Get(ctx context.Context, id ResolverId, var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/version.go index e714cfec438..d426664d37f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/graphqlapiresolverpolicy/version.go @@ -1,12 +1,10 @@ package graphqlapiresolverpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolverpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolverpolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/README.md b/resource-manager/apimanagement/2023-03-01-preview/group/README.md index 1b5d300632a..fd7961202ee 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/group/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/group` Documentation -The `group` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `group` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/client.go b/resource-manager/apimanagement/2023-03-01-preview/group/client.go index 0301e35f4e8..d2ad0ba440e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/client.go @@ -15,7 +15,7 @@ type GroupClient struct { } func NewGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "group", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "group", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/id_group.go b/resource-manager/apimanagement/2023-03-01-preview/group/id_group.go index 033b00db2ff..d509f57a395 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/id_group.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/group/id_service.go index b997cba49d0..8218c363385 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/group/id_workspace.go index 2a31e848c5a..b208717db85 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/id_workspacegroup.go b/resource-manager/apimanagement/2023-03-01-preview/group/id_workspacegroup.go index d95eae81434..dda9bd40fc1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/id_workspacegroup.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_createorupdate.go index e8b639dbe8b..563de8537b1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) CreateOrUpdate(ctx context.Context, id GroupId, input Group var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_delete.go index b7358fde533..47829929156 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_get.go index 71da80e4425..63a857ba29a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_get.go @@ -45,7 +45,6 @@ func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationRe var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_listbyservice.go index 4f8da96ef4a..e7c287794fb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_update.go index 70066730bb1..cea5374d418 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) Update(ctx context.Context, id GroupId, input GroupUpdatePa var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupcreateorupdate.go index 5ad40a08c47..b43d3bcaa03 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) WorkspaceGroupCreateOrUpdate(ctx context.Context, id Worksp var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupdelete.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupdelete.go index 949a8cb1846..f471d58942e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGroupDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupget.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupget.go index 88a4fa8e56b..b729c88a662 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupget.go @@ -45,7 +45,6 @@ func (c GroupClient) WorkspaceGroupGet(ctx context.Context, id WorkspaceGroupId) var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegrouplistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegrouplistbyservice.go index 2aa11bf1959..71073410fa5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegrouplistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegrouplistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupListByServiceOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGroupListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupupdate.go b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupupdate.go index 6e246635560..8c7f865f39f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/method_workspacegroupupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) WorkspaceGroupUpdate(ctx context.Context, id WorkspaceGroup var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/group/version.go b/resource-manager/apimanagement/2023-03-01-preview/group/version.go index c4bdfcb9df5..e1fb5e119d4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/group/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/group/version.go @@ -1,12 +1,10 @@ package group -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/group/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/group/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/README.md b/resource-manager/apimanagement/2023-03-01-preview/groupuser/README.md index 72ce0e088e7..a31296246b4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/groupuser` Documentation -The `groupuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `groupuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/client.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/client.go index 7a2d9304c73..0883ae96e68 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/client.go @@ -15,7 +15,7 @@ type GroupUserClient struct { } func NewGroupUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_group.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_group.go index 1cacd14ecf9..3c0f4c0569f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_group.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_groupuser.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_groupuser.go index 57de3d320e8..e6aa7e8ae21 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_groupuser.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_groupuser.go @@ -46,7 +46,7 @@ func ParseGroupUserID(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroup.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroup.go index 6c67d5dd6e0..63caa50ce9f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroup.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroupuser.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroupuser.go index fd00ae51ba3..cf1edbb928f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroupuser.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/id_workspacegroupuser.go @@ -48,7 +48,7 @@ func ParseWorkspaceGroupUserID(input string) (*WorkspaceGroupUserId, error) { } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceGroupUserIDInsensitively(input string) (*WorkspaceGroupUserId } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_create.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_create.go index 6dc8112254d..fd3d625df67 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_create.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_create.go @@ -46,7 +46,6 @@ func (c GroupUserClient) Create(ctx context.Context, id GroupUserId) (result Cre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_list.go index b2f4d682063..002cd3d1fbf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupusercreate.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupusercreate.go index dd73551832d..f7a9de38eab 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupusercreate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupusercreate.go @@ -46,7 +46,6 @@ func (c GroupUserClient) WorkspaceGroupUserCreate(ctx context.Context, id Worksp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupuserlist.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupuserlist.go index c4e2a527039..47776aadfd4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupuserlist.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/method_workspacegroupuserlist.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupUserListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUserListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/groupuser/version.go b/resource-manager/apimanagement/2023-03-01-preview/groupuser/version.go index d58531e1fba..90d56e6dc9b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/groupuser/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/groupuser/version.go @@ -1,12 +1,10 @@ package groupuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupuser/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/README.md b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/README.md index b6c413a16e3..ad3b8cd7576 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/identityprovider` Documentation -The `identityprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `identityprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/client.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/client.go index ba2ed8bbee1..f9a62f0de7c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/client.go @@ -15,7 +15,7 @@ type IdentityProviderClient struct { } func NewIdentityProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*IdentityProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "identityprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "identityprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IdentityProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_identityprovider.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_identityprovider.go index 3d474aaec02..2def4ce6e59 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_identityprovider.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_identityprovider.go @@ -44,7 +44,7 @@ func ParseIdentityProviderID(input string) (*IdentityProviderId, error) { } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIdentityProviderIDInsensitively(input string) (*IdentityProviderId, er } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_service.go index 8276034f3e7..d2022417e8e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_createorupdate.go index 834adf0fae9..b42e0767573 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c IdentityProviderClient) CreateOrUpdate(ctx context.Context, id IdentityP var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_delete.go index 825d432de2b..eabfcbc6daa 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_get.go index a7550d92bb0..2328ee95ee7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_get.go @@ -45,7 +45,6 @@ func (c IdentityProviderClient) Get(ctx context.Context, id IdentityProviderId) var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_listsecrets.go index 284d5e3aa2b..0f370b89eaf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c IdentityProviderClient) ListSecrets(ctx context.Context, id IdentityProv var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_update.go index ac8db539b33..92a7c2f8818 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c IdentityProviderClient) Update(ctx context.Context, id IdentityProviderI var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/version.go b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/version.go index 5c14c651824..583853c262c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/identityprovider/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/identityprovider/version.go @@ -1,12 +1,10 @@ package identityprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/identityprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/identityprovider/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/README.md b/resource-manager/apimanagement/2023-03-01-preview/issue/README.md index 74b01b8a984..f7bb264fa04 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/issue` Documentation -The `issue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `issue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/client.go b/resource-manager/apimanagement/2023-03-01-preview/issue/client.go index cb06d0ebaca..e2e870934db 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/client.go @@ -15,7 +15,7 @@ type IssueClient struct { } func NewIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*IssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "issue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "issue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/id_issue.go b/resource-manager/apimanagement/2023-03-01-preview/issue/id_issue.go index 45eb9485335..401c80ae524 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/id_issue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/id_issue.go @@ -44,7 +44,7 @@ func ParseIssueID(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIssueIDInsensitively(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/issue/id_service.go index 88e8a90de0c..4b3d26c86cb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/issue/method_get.go index 69cfbc200fa..791db4dd8c3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/method_get.go @@ -45,7 +45,6 @@ func (c IssueClient) Get(ctx context.Context, id IssueId) (result GetOperationRe var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/issue/method_listbyservice.go index bdf1aa92398..743f676c948 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/issue/version.go b/resource-manager/apimanagement/2023-03-01-preview/issue/version.go index 7aba896a456..cd25638dc72 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/issue/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/issue/version.go @@ -1,12 +1,10 @@ package issue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/issue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/issue/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/README.md b/resource-manager/apimanagement/2023-03-01-preview/logger/README.md index fb1218e048a..7c25efef25e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/logger` Documentation -The `logger` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `logger` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/client.go b/resource-manager/apimanagement/2023-03-01-preview/logger/client.go index c7b58012a84..2ecf8e82720 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/client.go @@ -15,7 +15,7 @@ type LoggerClient struct { } func NewLoggerClientWithBaseURI(sdkApi sdkEnv.Api) (*LoggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoggerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/id_logger.go b/resource-manager/apimanagement/2023-03-01-preview/logger/id_logger.go index ebf285cefca..cb5c5cca792 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/id_logger.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/id_logger.go @@ -44,7 +44,7 @@ func ParseLoggerID(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoggerIDInsensitively(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/logger/id_service.go index e5a5d44be9e..e47928df93b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/logger/method_createorupdate.go index b1a476b3cf9..3430cb9dd77 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c LoggerClient) CreateOrUpdate(ctx context.Context, id LoggerId, input Log var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/logger/method_delete.go index d1edc7304d6..3465b8ec829 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/logger/method_get.go index dd5216620ea..7a6f1ba10d6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/method_get.go @@ -45,7 +45,6 @@ func (c LoggerClient) Get(ctx context.Context, id LoggerId) (result GetOperation var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/logger/method_listbyservice.go index 3765ffa1f12..d930656f267 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/logger/method_update.go index e7491dd03c2..66980330556 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LoggerClient) Update(ctx context.Context, id LoggerId, input LoggerUpdat var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/logger/version.go b/resource-manager/apimanagement/2023-03-01-preview/logger/version.go index 730d8f461d6..555cac15e7a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/logger/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/logger/version.go @@ -1,12 +1,10 @@ package logger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logger/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/README.md b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/README.md index 0a3b7085ea6..49dc9b8b00a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/namedvalue` Documentation -The `namedvalue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `namedvalue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/client.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/client.go index 9bc64e690ca..043c376438d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/client.go @@ -15,7 +15,7 @@ type NamedValueClient struct { } func NewNamedValueClientWithBaseURI(sdkApi sdkEnv.Api) (*NamedValueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namedvalue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namedvalue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamedValueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_namedvalue.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_namedvalue.go index 960d341eb81..2d7156d678b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_namedvalue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_namedvalue.go @@ -44,7 +44,7 @@ func ParseNamedValueID(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_service.go index 3e71ff3a6f0..9c5b179b85f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspace.go index 7487f000469..05e9b2a6229 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspacenamedvalue.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspacenamedvalue.go index 44f55e1b20a..dd2ec43e950 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspacenamedvalue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/id_workspacenamedvalue.go @@ -46,7 +46,7 @@ func ParseWorkspaceNamedValueID(input string) (*WorkspaceNamedValueId, error) { } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceNamedValueIDInsensitively(input string) (*WorkspaceNamedValue } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_createorupdate.go index 85ad5426efe..2d71d51b1cc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_delete.go index f47f9ad5955..d071bb811bf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_get.go index b4f6fc01960..208dc6dcff4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_get.go @@ -45,7 +45,6 @@ func (c NamedValueClient) Get(ctx context.Context, id NamedValueId) (result GetO var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listbyservice.go index c484c236266..328935f3ddb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listvalue.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listvalue.go index 80e6212cce7..010f8359421 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listvalue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_listvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) ListValue(ctx context.Context, id NamedValueId) (resul var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_update.go index 0bb9dff4811..a22327f3f7a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go index 52eaa05d759..143d3c8845e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluedelete.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluedelete.go index 7d05e234c48..903ae6bbf4a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluedelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceNamedValueDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueget.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueget.go index fd48731656e..499da89fe82 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueget.go @@ -45,7 +45,6 @@ func (c NamedValueClient) WorkspaceNamedValueGet(ctx context.Context, id Workspa var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go index 87a17e3f92f..0cf463c799d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceNamedValueListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceNamedValueListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go index ced0d6c1600..70be7321342 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) WorkspaceNamedValueListValue(ctx context.Context, id W var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueupdate.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueupdate.go index 2767761302a..866a931165b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/method_workspacenamedvalueupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/version.go b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/version.go index 679174ce1d0..ce1b7ab1b5c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/namedvalue/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/namedvalue/version.go @@ -1,12 +1,10 @@ package namedvalue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namedvalue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namedvalue/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/README.md b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/README.md index 5b92ccbe65c..76a58acd145 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/networkstatus` Documentation -The `networkstatus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `networkstatus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/client.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/client.go index a31324aaa99..0f7b98b9964 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/client.go @@ -15,7 +15,7 @@ type NetworkStatusClient struct { } func NewNetworkStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkStatusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_location.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_location.go index 33d1e89e60c..4805bc32949 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_location.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_location.go @@ -44,7 +44,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_service.go index 16676b5b068..5ef7bf317d5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbylocation.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbylocation.go index 2ac16a461cc..6d070726da4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbylocation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbylocation.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByLocation(ctx context.Context, id LocationId) var model NetworkStatusContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbyservice.go index 82df8dfdf78..3cd4e1561af 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/method_listbyservice.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByService(ctx context.Context, id ServiceId) (r var model []NetworkStatusContractByLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/version.go b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/version.go index 708faf1fd00..3faf5915b41 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/networkstatus/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/networkstatus/version.go @@ -1,12 +1,10 @@ package networkstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkstatus/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/README.md b/resource-manager/apimanagement/2023-03-01-preview/notification/README.md index f95a28f1a5d..2281ece2350 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/notification` Documentation -The `notification` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `notification` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/client.go b/resource-manager/apimanagement/2023-03-01-preview/notification/client.go index 277470faa23..40e630b60f8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/client.go @@ -15,7 +15,7 @@ type NotificationClient struct { } func NewNotificationClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notification", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notification", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/id_notification.go b/resource-manager/apimanagement/2023-03-01-preview/notification/id_notification.go index 39c82639f30..cf908edb898 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/id_notification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/id_notificationnotification.go b/resource-manager/apimanagement/2023-03-01-preview/notification/id_notificationnotification.go index 9d5be1827b8..66eae538ce8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/notification/id_service.go index a9b6b10ca5c..a5410a065b4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/notification/id_workspace.go index 2a3893a9c73..1a4deb10010 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_createorupdate.go index f66ed7aa163..ef2314ee9a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) CreateOrUpdate(ctx context.Context, id NotificationI var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_get.go index 21cc5b2b6f4..0a063938dee 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_get.go @@ -45,7 +45,6 @@ func (c NotificationClient) Get(ctx context.Context, id NotificationId) (result var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_listbyservice.go index b8f071f58f8..8dbc79c16d5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationcreateorupdate.go index f9129556c8d..94bd205e822 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) WorkspaceNotificationCreateOrUpdate(ctx context.Cont var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationget.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationget.go index f9301d38cea..0e2a3ee9227 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationget.go @@ -45,7 +45,6 @@ func (c NotificationClient) WorkspaceNotificationGet(ctx context.Context, id Not var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationlistbyservice.go index 9c9bdd761b7..0bc8fe62d30 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/method_workspacenotificationlistbyservice.go @@ -40,6 +40,7 @@ func (o WorkspaceNotificationListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceNotificationListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notification/version.go b/resource-manager/apimanagement/2023-03-01-preview/notification/version.go index 189cde43610..16bb04f09d5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notification/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notification/version.go @@ -1,12 +1,10 @@ package notification -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notification/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notification/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/README.md b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/README.md index a8d8a22b53e..12378adddfe 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail` Documentation -The `notificationrecipientemail` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `notificationrecipientemail` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/client.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/client.go index 9975fccb850..f9007de8d12 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/client.go @@ -15,7 +15,7 @@ type NotificationRecipientEmailClient struct { } func NewNotificationRecipientEmailClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientEmailClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientemail", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientemail", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientEmailClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notification.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notification.go index 85bab8ef752..6d666b57152 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationnotification.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationnotification.go index b5257846bad..1fc5a15df48 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationrecipientemail.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationrecipientemail.go index 417bba3220c..dd7f2dbaa1b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationrecipientemail.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_notificationrecipientemail.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientEmailID(input string) (*NotificationRecipientEmai } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientEmailIDInsensitively(input string) (*Notification } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_recipientemail.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_recipientemail.go index ed228835ce6..24a344f3668 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_recipientemail.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/id_recipientemail.go @@ -46,7 +46,7 @@ func ParseRecipientEmailID(input string) (*RecipientEmailId, error) { } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientEmailIDInsensitively(input string) (*RecipientEmailId, error) } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_createorupdate.go index c9ff8f4f049..204db2f61d9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, id var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go index a58726e1c6c..ff5d1b65a2a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) WorkspaceNotificationRecipientEmailCre var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/version.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/version.go index d73fa1a67a7..474b3b296c5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientemail/version.go @@ -1,12 +1,10 @@ package notificationrecipientemail -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientemail/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientemail/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/README.md b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/README.md index 6ef82fe498e..e940dbd6037 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser` Documentation -The `notificationrecipientuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `notificationrecipientuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/client.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/client.go index 3049dccc74b..28fb21100d5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/client.go @@ -15,7 +15,7 @@ type NotificationRecipientUserClient struct { } func NewNotificationRecipientUserClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notification.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notification.go index 525816f0e3b..e013481d0f6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationnotification.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationnotification.go index 86345fd0047..44e2dd8aaca 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationrecipientuser.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationrecipientuser.go index abd829fc50b..8dad8ffd69f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationrecipientuser.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_notificationrecipientuser.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientUserID(input string) (*NotificationRecipientUserI } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientUserIDInsensitively(input string) (*NotificationR } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_recipientuser.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_recipientuser.go index 1c6e88f7af0..3b5d7039da1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_recipientuser.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/id_recipientuser.go @@ -46,7 +46,7 @@ func ParseRecipientUserID(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientUserIDInsensitively(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_createorupdate.go index 0736b330824..8cdb56c5521 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, id var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go index ee963934976..000d95f83c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) WorkspaceNotificationRecipientUserCreat var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/version.go b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/version.go index fa5a5857e4d..42ad0b9d78e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/notificationrecipientuser/version.go @@ -1,12 +1,10 @@ package notificationrecipientuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientuser/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/README.md b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/README.md index 1fb35397095..12f7e4a16b9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider` Documentation -The `openidconnectprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `openidconnectprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/client.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/client.go index 6b2113dfc3d..01917915c80 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/client.go @@ -15,7 +15,7 @@ type OpenidConnectProviderClient struct { } func NewOpenidConnectProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenidConnectProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openidconnectprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openidconnectprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenidConnectProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_openidconnectprovider.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_openidconnectprovider.go index b1e20b39388..c51f53b0377 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_openidconnectprovider.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_openidconnectprovider.go @@ -44,7 +44,7 @@ func ParseOpenidConnectProviderID(input string) (*OpenidConnectProviderId, error } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOpenidConnectProviderIDInsensitively(input string) (*OpenidConnectProv } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_service.go index 992d2595802..7493219e726 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_createorupdate.go index ab5c53bdaa6..61c01cf6b96 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c OpenidConnectProviderClient) CreateOrUpdate(ctx context.Context, id Open var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_delete.go index d434f5eff61..f254a016bd7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_get.go index 642a146fa5f..216dd2c005c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_get.go @@ -45,7 +45,6 @@ func (c OpenidConnectProviderClient) Get(ctx context.Context, id OpenidConnectPr var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listbyservice.go index a4b2de8c3dc..5fad44984c9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listsecrets.go index 39b0cbb3857..99cf943206f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c OpenidConnectProviderClient) ListSecrets(ctx context.Context, id OpenidC var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_update.go index fc095d745c7..2f800589ad0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OpenidConnectProviderClient) Update(ctx context.Context, id OpenidConnec var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/version.go b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/version.go index f257a738b64..496c3dbc622 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/openidconnectprovider/version.go @@ -1,12 +1,10 @@ package openidconnectprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openidconnectprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openidconnectprovider/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/README.md b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/README.md index 033b9f43e84..906ad5ab5af 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/client.go b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/id_service.go index a2a71284e3f..c0c218b10e7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/version.go b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/version.go index e426762c028..930cfc2e60b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/README.md b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/README.md index 577334361e7..6914d36fbc7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck` Documentation -The `performconnectivitycheck` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `performconnectivitycheck` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/client.go b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/client.go index a491979992c..377311cd668 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/client.go @@ -15,7 +15,7 @@ type PerformConnectivityCheckClient struct { } func NewPerformConnectivityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*PerformConnectivityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "performconnectivitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "performconnectivitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PerformConnectivityCheckClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/id_service.go index 6a34f7693f4..ed3403137c8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/version.go b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/version.go index ef7426288c1..d96e9074ea2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/performconnectivitycheck/version.go @@ -1,12 +1,10 @@ package performconnectivitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/performconnectivitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/performconnectivitycheck/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/README.md b/resource-manager/apimanagement/2023-03-01-preview/policy/README.md index 73941c7392a..12560ea7eda 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/policy` Documentation -The `policy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `policy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/client.go b/resource-manager/apimanagement/2023-03-01-preview/policy/client.go index 216d1f1ff33..d95ac216bf6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/client.go @@ -15,7 +15,7 @@ type PolicyClient struct { } func NewPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/policy/id_service.go index 509f96c5a3f..8fac046b789 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/policy/method_createorupdate.go index 3bfe1519731..bc08c50ab8d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyClient) CreateOrUpdate(ctx context.Context, id ServiceId, input Po var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/policy/method_delete.go index 4b39d1a4a2d..f3ab4b889c9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/policy/method_get.go index 5a9a428f5ec..10e71f38f95 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyClient) Get(ctx context.Context, id ServiceId, options GetOperatio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policy/version.go b/resource-manager/apimanagement/2023-03-01-preview/policy/version.go index cabf241eb67..d1345c60808 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policy/version.go @@ -1,12 +1,10 @@ package policy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policydescription/README.md b/resource-manager/apimanagement/2023-03-01-preview/policydescription/README.md index cecd3aee393..581eca67075 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policydescription/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/policydescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/policydescription` Documentation -The `policydescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `policydescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/policydescription/client.go b/resource-manager/apimanagement/2023-03-01-preview/policydescription/client.go index 70daacb1cfc..511edea86c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policydescription/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policydescription/client.go @@ -15,7 +15,7 @@ type PolicyDescriptionClient struct { } func NewPolicyDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policydescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policydescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policydescription/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/policydescription/id_service.go index 41cef29b463..ff29eb10b4a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policydescription/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policydescription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policydescription/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/policydescription/method_listbyservice.go index cb12120f377..4535c14aaa4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policydescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policydescription/method_listbyservice.go @@ -34,6 +34,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyDescriptionClient) ListByService(ctx context.Context, id ServiceId var model PolicyDescriptionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policydescription/version.go b/resource-manager/apimanagement/2023-03-01-preview/policydescription/version.go index 2cd7c51a86a..f06741d2a33 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policydescription/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policydescription/version.go @@ -1,12 +1,10 @@ package policydescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policydescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policydescription/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md index e09b7965a83..1dc3e20bc6b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/policyfragment` Documentation -The `policyfragment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `policyfragment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/client.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/client.go index 3dbe1d43bb7..d14dc485991 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/client.go @@ -15,7 +15,7 @@ type PolicyFragmentClient struct { } func NewPolicyFragmentClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyFragmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyfragment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyfragment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyFragmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_policyfragment.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_policyfragment.go index 3737ed73101..538e36d518f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_policyfragment.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_policyfragment.go @@ -44,7 +44,7 @@ func ParsePolicyFragmentID(input string) (*PolicyFragmentId, error) { } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyFragmentIDInsensitively(input string) (*PolicyFragmentId, error) } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_service.go index e0ab31ef120..b5efade5d1c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspace.go index 334ecf5425c..8d5166b8bbf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspacepolicyfragment.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspacepolicyfragment.go index eed247a5b17..885868cd32e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspacepolicyfragment.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/id_workspacepolicyfragment.go @@ -46,7 +46,7 @@ func ParseWorkspacePolicyFragmentID(input string) (*WorkspacePolicyFragmentId, e } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspacePolicyFragmentIDInsensitively(input string) (*WorkspacePolicy } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_createorupdate.go index 03cb7db852a..6ebf334fa79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_delete.go index 8a0d95204ce..219af78163c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_get.go index 3aa646fafdd..12ac1b4fbf3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) Get(ctx context.Context, id PolicyFragmentId, opti var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listbyservice.go index e9fcb07b896..c6ab48e11ac 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go index 37993c71c0d..d513c06b276 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_listreferences.go @@ -40,6 +40,7 @@ func (o ListReferencesOperationOptions) ToHeaders() *client.Headers { func (o ListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go index 1e5eb987d77..0ce6d5b8ab5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go index 3c175e499a5..4afe4261906 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go @@ -35,6 +35,7 @@ func (o WorkspacePolicyFragmentDeleteOperationOptions) ToHeaders() *client.Heade func (o WorkspacePolicyFragmentDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentget.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentget.go index 24b3402ea1f..11e23a111e5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentget.go @@ -34,6 +34,7 @@ func (o WorkspacePolicyFragmentGetOperationOptions) ToHeaders() *client.Headers func (o WorkspacePolicyFragmentGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentGet(ctx context.Context, id var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go index 601c1855d17..d5ef3e26541 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToHeaders() *clien func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go index fca10ec83a6..9a7b1e52677 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go @@ -40,6 +40,7 @@ func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/version.go b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/version.go index 34cf3fe8c60..a94c9920663 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/policyfragment/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/policyfragment/version.go @@ -1,12 +1,10 @@ package policyfragment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyfragment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyfragment/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/README.md b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/README.md index 1dcc51db150..ad7eeb924c2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/portalconfig` Documentation -The `portalconfig` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `portalconfig` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/client.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/client.go index 5c58ba3ea50..b02c0eb1e23 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/client.go @@ -15,7 +15,7 @@ type PortalConfigClient struct { } func NewPortalConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalConfigClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_portalconfig.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_portalconfig.go index 4217e87e470..1eee4ff6349 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_portalconfig.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_portalconfig.go @@ -44,7 +44,7 @@ func ParsePortalConfigID(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalConfigIDInsensitively(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_service.go index fe235ccce02..25a796d7e39 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_createorupdate.go index 94bdf726259..13a9427637b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) CreateOrUpdate(ctx context.Context, id PortalConfigI var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_get.go index 755476c6e67..e4377dd925f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_get.go @@ -45,7 +45,6 @@ func (c PortalConfigClient) Get(ctx context.Context, id PortalConfigId) (result var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_update.go index fce54b73ff3..e003b060e70 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) Update(ctx context.Context, id PortalConfigId, input var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/version.go b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/version.go index f53a873b5a2..7cf6b84277a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalconfig/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalconfig/version.go @@ -1,12 +1,10 @@ package portalconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalconfig/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/README.md b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/README.md index 3c2dc9e81dd..7a756b7f7a7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/portalrevision` Documentation -The `portalrevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `portalrevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/client.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/client.go index 4f2fa253331..3ac3319b56b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/client.go @@ -15,7 +15,7 @@ type PortalRevisionClient struct { } func NewPortalRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalrevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalrevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_portalrevision.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_portalrevision.go index a4ef40e0335..66cce216fe8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_portalrevision.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_portalrevision.go @@ -44,7 +44,7 @@ func ParsePortalRevisionID(input string) (*PortalRevisionId, error) { } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalRevisionIDInsensitively(input string) (*PortalRevisionId, error) } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_service.go index 6d27c56ea22..12e905cecaa 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_get.go index 02c07947f35..e7e39cc491d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_get.go @@ -45,7 +45,6 @@ func (c PortalRevisionClient) Get(ctx context.Context, id PortalRevisionId) (res var model PortalRevisionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_listbyservice.go index 57df46678e2..1dfec707d1e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_update.go index e3568960b04..b2c05e16d03 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/version.go b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/version.go index 48972d3ab19..715939d4ae0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalrevision/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalrevision/version.go @@ -1,12 +1,10 @@ package portalrevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalrevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalrevision/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/README.md b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/README.md index 41045d12a73..44865be6ae2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/portalsettings` Documentation -The `portalsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `portalsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/client.go b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/client.go index 787e842a856..554097bdccf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/client.go @@ -15,7 +15,7 @@ type PortalSettingsClient struct { } func NewPortalSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/id_service.go index 9c71fe38260..795734b8888 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/method_listbyservice.go index 0dc16a6d309..cc9614449d6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PortalSettingsClient) ListByService(ctx context.Context, id ServiceId) ( var model PortalSettingsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/version.go b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/version.go index c8c3b971cb3..da2fe4cf2a5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/portalsettings/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/portalsettings/version.go @@ -1,12 +1,10 @@ package portalsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalsettings/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/README.md b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/README.md index 3372b91394d..ae5b26640a0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/client.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privateendpointconnection.go index 6c2da784082..cd4250e592b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privatelinkresource.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privatelinkresource.go index dfbab21cc34..8b943560b87 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privatelinkresource.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_service.go index 6954e3bf619..1470d0578e9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go index 79394dec05e..16876584694 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetByName(ctx var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go index 44e1bf04851..ea5fab7b453 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go index 6b9b574ef5f..fc2ec42cfe3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByService var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go index e33993c077f..d4c86877792 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListPrivateLi var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/version.go b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/version.go index 8af2949ca72..1b753112c33 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/README.md b/resource-manager/apimanagement/2023-03-01-preview/product/README.md index 62cf67b2713..19e4c64a4c5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/product/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/product` Documentation -The `product` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `product` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/client.go b/resource-manager/apimanagement/2023-03-01-preview/product/client.go index 20069da6c20..787eaa28e4f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/client.go @@ -15,7 +15,7 @@ type ProductClient struct { } func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "product", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "product", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/product/id_product.go index 95f18115dce..034ad81b346 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/product/id_service.go index bb0983ca2df..948d6fd23a8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/product/id_workspace.go index 72e09a3fc43..09518d96353 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/id_workspaceproduct.go b/resource-manager/apimanagement/2023-03-01-preview/product/id_workspaceproduct.go index 6b11719ded0..1f89057c1dc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_createorupdate.go index 2baf83fb505..07bc7cd0e1c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) CreateOrUpdate(ctx context.Context, id ProductId, input P var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_delete.go index afc7d184b70..28d5b7bdd7f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_get.go index b343c0f286c..65af42031e8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_get.go @@ -45,7 +45,6 @@ func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperati var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_listbyservice.go index b1f50c8e42d..9b47fa13709 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_update.go index fc36ecd5353..a6be0dfec29 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) Update(ctx context.Context, id ProductId, input ProductUp var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductcreateorupdate.go index af10ed64d9c..1a22f89859b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductCreateOrUpdateOperationOptions) ToHeaders() *client.Head func (o WorkspaceProductCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) WorkspaceProductCreateOrUpdate(ctx context.Context, id Wo var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductdelete.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductdelete.go index 3bf8f536240..849214c5992 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductdelete.go @@ -36,6 +36,7 @@ func (o WorkspaceProductDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductget.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductget.go index d746f01c02e..78e82c51d83 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductget.go @@ -45,7 +45,6 @@ func (c ProductClient) WorkspaceProductGet(ctx context.Context, id WorkspaceProd var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductlistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductlistbyservice.go index 457b9a161c9..ccf2ecef686 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductlistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductlistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceProductListByServiceOperationOptions) ToHeaders() *client.Heade func (o WorkspaceProductListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductupdate.go b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductupdate.go index e1305ecd777..059782c921a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/method_workspaceproductupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) WorkspaceProductUpdate(ctx context.Context, id WorkspaceP var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/product/version.go b/resource-manager/apimanagement/2023-03-01-preview/product/version.go index 7ea6802b6c9..a197905b222 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/product/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/product/version.go @@ -1,12 +1,10 @@ package product -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/product/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/product/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/README.md b/resource-manager/apimanagement/2023-03-01-preview/productapi/README.md index 79616efaaec..cf00572df8f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productapi` Documentation -The `productapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/client.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/client.go index 1e0b184ff57..edeb30a1f70 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/client.go @@ -15,7 +15,7 @@ type ProductApiClient struct { } func NewProductApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/id_product.go index 76244a5f127..e7f5d3be4d2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/id_productapi.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/id_productapi.go index ac92947ceaf..38ffb06be7e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/id_productapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/id_productapi.go @@ -46,7 +46,7 @@ func ParseProductApiID(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiIDInsensitively(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/method_createorupdate.go index e27e2ed31a5..afa4d070d9d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductApiClient) CreateOrUpdate(ctx context.Context, id ProductApiId) ( var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/method_listbyproduct.go index c06016675dd..4327b569ea6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapi/version.go b/resource-manager/apimanagement/2023-03-01-preview/productapi/version.go index 22a134129ce..32de7dfc87d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapi/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapi/version.go @@ -1,12 +1,10 @@ package productapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapi/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/README.md b/resource-manager/apimanagement/2023-03-01-preview/productapilink/README.md index 7eed680ddf3..20685a35e59 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productapilink` Documentation -The `productapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/client.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/client.go index 8349188784a..9dbc162240f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/client.go @@ -15,7 +15,7 @@ type ProductApiLinkClient struct { } func NewProductApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_product.go index 8cc4d71ac4d..95a8c337cc3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_productapilink.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_productapilink.go index fe5d70ec31e..3679e1007f6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_productapilink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_productapilink.go @@ -46,7 +46,7 @@ func ParseProductApiLinkID(input string) (*ProductApiLinkId, error) { } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiLinkIDInsensitively(input string) (*ProductApiLinkId, error) } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproduct.go index ded946cf1fa..11ffc8e9638 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproductapilink.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproductapilink.go index efb87f6e00f..5c982422eda 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproductapilink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/id_workspaceproductapilink.go @@ -48,7 +48,7 @@ func ParseWorkspaceProductApiLinkID(input string) (*WorkspaceProductApiLinkId, e } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceProductApiLinkIDInsensitively(input string) (*WorkspaceProduc } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_createorupdate.go index e711339b44d..edf067cb155 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) CreateOrUpdate(ctx context.Context, id ProductApiL var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_get.go index 6f8bfffa257..f2e08e31655 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_get.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) Get(ctx context.Context, id ProductApiLinkId) (res var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_listbyproduct.go index 5992341c96a..55b25bf468f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go index 5c589d27c2b..47d81364b4e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkCreateOrUpdate(ctx context. var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkget.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkget.go index 187f5e7ac13..50efa7fa27f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinkget.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkGet(ctx context.Context, id var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go index ca1989e31ec..95e5f96810c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductApiLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceProductApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productapilink/version.go b/resource-manager/apimanagement/2023-03-01-preview/productapilink/version.go index d4ebad9ae43..d551d39ec19 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productapilink/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productapilink/version.go @@ -1,12 +1,10 @@ package productapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapilink/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/README.md b/resource-manager/apimanagement/2023-03-01-preview/productgroup/README.md index d4867a93cf9..fef3a993b32 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productgroup` Documentation -The `productgroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productgroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/client.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/client.go index beb9159e3e3..2aa816ea14d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/client.go @@ -15,7 +15,7 @@ type ProductGroupClient struct { } func NewProductGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_product.go index df7d9abbfcd..00eaae01fd1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_productgroup.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_productgroup.go index 7ede94a7c7f..847e2e4900d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_productgroup.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/id_productgroup.go @@ -46,7 +46,7 @@ func ParseProductGroupID(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductGroupIDInsensitively(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_createorupdate.go index 77cf8dbf10e..a518c2d0404 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductGroupClient) CreateOrUpdate(ctx context.Context, id ProductGroupI var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_listbyproduct.go index 902f45c4f73..fbee2e7567d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgroup/version.go b/resource-manager/apimanagement/2023-03-01-preview/productgroup/version.go index e257d320af5..dbece58aba1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgroup/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgroup/version.go @@ -1,12 +1,10 @@ package productgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgroup/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/README.md b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/README.md index 461a2016603..05e98eda1dc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productgrouplink` Documentation -The `productgrouplink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productgrouplink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/client.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/client.go index 3528003e35b..e37d8715ed6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/client.go @@ -15,7 +15,7 @@ type ProductGroupLinkClient struct { } func NewProductGroupLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgrouplink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgrouplink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_grouplink.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_grouplink.go index c16ddba297b..ddb687e68f5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_grouplink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_grouplink.go @@ -46,7 +46,7 @@ func ParseGroupLinkID(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupLinkIDInsensitively(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_product.go index ebda99376a6..3b43ce90247 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_productgrouplink.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_productgrouplink.go index b138aa0fbab..c92c77fd5e4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_productgrouplink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_productgrouplink.go @@ -48,7 +48,7 @@ func ParseProductGroupLinkID(input string) (*ProductGroupLinkId, error) { } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProductGroupLinkIDInsensitively(input string) (*ProductGroupLinkId, er } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_workspaceproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_workspaceproduct.go index aaddcc46393..38f762822bd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_createorupdate.go index c69607c76c0..657238c75a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) CreateOrUpdate(ctx context.Context, id GroupLink var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_get.go index 504db1fe876..8734a2ac627 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_get.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) Get(ctx context.Context, id GroupLinkId) (result var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_listbyproduct.go index 84edbb8b0f2..04616fec43a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go index 1819eda2722..7660c05264a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkCreateOrUpdate(ctx cont var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go index ee43233ffa6..e4a1e775485 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkGet(ctx context.Context var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go index f337fc0d196..08e4ee7216c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/version.go b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/version.go index 74aa9934ead..ff4d4105d2c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productgrouplink/version.go @@ -1,12 +1,10 @@ package productgrouplink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgrouplink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgrouplink/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/README.md index 51fdda07ce1..98aa4357965 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productpolicy` Documentation -The `productpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/client.go index e6887574aaa..a4a1d0fa474 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/client.go @@ -15,7 +15,7 @@ type ProductPolicyClient struct { } func NewProductPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_product.go index 1b80a823c26..ecac90e889b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_workspaceproduct.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_workspaceproduct.go index de50624b5f9..1a5c285cc77 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_createorupdate.go index 923d04859e1..ae0329209dc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) CreateOrUpdate(ctx context.Context, id ProductId, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_delete.go index 36e74215a96..5cf9ef830f4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_get.go index b96d87150c2..579a315dc9a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) Get(ctx context.Context, id ProductId, options GetO var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go index 9a55b9a739a..0c867674486 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyCreateOrUpdate(ctx context.Co var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicydelete.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicydelete.go index a76872c52a7..d58bdb503e7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicydelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceProductPolicyDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceProductPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicyget.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicyget.go index cbd5809fb0e..999f909eccf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicyget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/method_workspaceproductpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceProductPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyGet(ctx context.Context, id W var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/version.go index 413a2c03f94..e11365c2e95 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productpolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productpolicy/version.go @@ -1,12 +1,10 @@ package productpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productpolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/README.md b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/README.md index 46ed46362be..452405e538e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productsbytag` Documentation -The `productsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/client.go b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/client.go index c87bb5f7b76..915babf141b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/client.go @@ -15,7 +15,7 @@ type ProductsByTagClient struct { } func NewProductsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/id_service.go index 4cf290afcb1..29ba551682f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/method_productlistbytags.go b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/method_productlistbytags.go index 8cffb9f2edb..6744380cbab 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/method_productlistbytags.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/method_productlistbytags.go @@ -42,6 +42,7 @@ func (o ProductListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ProductListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/version.go b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/version.go index 6a3b8e1cff5..155dcb66419 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsbytag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsbytag/version.go @@ -1,12 +1,10 @@ package productsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsbytag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/README.md b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/README.md index 13d18e2b89a..2e58ed0490a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productsubscription` Documentation -The `productsubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productsubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/client.go b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/client.go index a54f7218145..fd87d58da17 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/client.go @@ -15,7 +15,7 @@ type ProductSubscriptionClient struct { } func NewProductSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/id_product.go index 96929544e81..f43d9647499 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/method_list.go index c71c7ba8260..00b340b1821 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/version.go b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/version.go index c62ae14a5c4..5e8247fa2c4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productsubscription/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productsubscription/version.go @@ -1,12 +1,10 @@ package productsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsubscription/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/README.md b/resource-manager/apimanagement/2023-03-01-preview/producttag/README.md index 4c050f98fb4..8a81649334b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/producttag` Documentation -The `producttag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `producttag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/client.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/client.go index 720b81ec2d8..5602a7a654f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/client.go @@ -15,7 +15,7 @@ type ProductTagClient struct { } func NewProductTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "producttag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "producttag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/id_product.go index b7000f83b74..83b2ff6422e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/id_producttag.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/id_producttag.go index d1f16bd1686..b06e6d6fa29 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/id_producttag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/id_producttag.go @@ -46,7 +46,7 @@ func ParseProductTagID(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductTagIDInsensitively(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_tagassigntoproduct.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_tagassigntoproduct.go index 87bb16caf5e..5cbd240711d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_tagassigntoproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_tagassigntoproduct.go @@ -46,7 +46,6 @@ func (c ProductTagClient) TagAssignToProduct(ctx context.Context, id ProductTagI var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taggetbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taggetbyproduct.go index 1e5ed741301..1742c0e9789 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taggetbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taggetbyproduct.go @@ -45,7 +45,6 @@ func (c ProductTagClient) TagGetByProduct(ctx context.Context, id ProductTagId) var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taglistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taglistbyproduct.go index 4e0721b94fc..f55c45480ae 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taglistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/method_taglistbyproduct.go @@ -41,6 +41,7 @@ func (o TagListByProductOperationOptions) ToHeaders() *client.Headers { func (o TagListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/producttag/version.go b/resource-manager/apimanagement/2023-03-01-preview/producttag/version.go index 8948ed074b5..fbbfaca6d32 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/producttag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/producttag/version.go @@ -1,12 +1,10 @@ package producttag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/producttag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/producttag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/README.md b/resource-manager/apimanagement/2023-03-01-preview/productwiki/README.md index 497d0df5ed8..75373cfdb9f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/productwiki` Documentation -The `productwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `productwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/client.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/client.go index 927c4e2a5e8..f916fc92b3e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/client.go @@ -15,7 +15,7 @@ type ProductWikiClient struct { } func NewProductWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/id_product.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/id_product.go index 55d2312cec7..2c4b473a438 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/id_product.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_createorupdate.go index f794fc61c8a..07e2174456f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductWikiClient) CreateOrUpdate(ctx context.Context, id ProductId, inp var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_delete.go index 0ccc22248a0..85714a863d1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_get.go index 503a2a49ab6..7ee0379c2bc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_get.go @@ -46,7 +46,6 @@ func (c ProductWikiClient) Get(ctx context.Context, id ProductId) (result GetOpe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_list.go index db26ef5879d..2a6ee83e84b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_update.go index 551aa6aab7a..4e6a5e37c25 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductWikiClient) Update(ctx context.Context, id ProductId, input WikiU var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/productwiki/version.go b/resource-manager/apimanagement/2023-03-01-preview/productwiki/version.go index 3c826649049..0d808cc761f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/productwiki/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/productwiki/version.go @@ -1,12 +1,10 @@ package productwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productwiki/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/README.md b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/README.md index d05174e3dff..cdd20c52193 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys` Documentation -The `quotabycounterkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `quotabycounterkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/client.go b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/client.go index bd6e9581304..eec1a8e1c60 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/client.go @@ -15,7 +15,7 @@ type QuotaByCounterKeysClient struct { } func NewQuotaByCounterKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByCounterKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabycounterkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabycounterkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByCounterKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/id_quota.go b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/id_quota.go index 11bd5535194..1cb117ba2bc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/id_quota.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/id_quota.go @@ -44,7 +44,7 @@ func ParseQuotaID(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/method_update.go index 44f72d4b26b..8ed074d74d8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input var model QuotaCounterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/version.go b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/version.go index 71e00bf329b..7cf31681e7f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabycounterkeys/version.go @@ -1,12 +1,10 @@ package quotabycounterkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabycounterkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabycounterkeys/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/README.md b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/README.md index 78fbf0849df..afaca2f6a9c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys` Documentation -The `quotabyperiodkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `quotabyperiodkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/client.go b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/client.go index 338089b5c40..559771ef5e6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/client.go @@ -15,7 +15,7 @@ type QuotaByPeriodKeysClient struct { } func NewQuotaByPeriodKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByPeriodKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByPeriodKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/id_period.go b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/id_period.go index 24a1631d595..0aabd1a8ba4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/id_period.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/id_period.go @@ -46,7 +46,7 @@ func ParsePeriodID(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeriodIDInsensitively(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_get.go index ea5a1757972..6bb85fbcffb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_get.go @@ -45,7 +45,6 @@ func (c QuotaByPeriodKeysClient) Get(ctx context.Context, id PeriodId) (result G var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_update.go index 2fc44c961e6..7e71a98ddf1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByPeriodKeysClient) Update(ctx context.Context, id PeriodId, input var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/version.go b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/version.go index 5df291f0a94..1e28acd861a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/quotabyperiodkeys/version.go @@ -1,12 +1,10 @@ package quotabyperiodkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabyperiodkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabyperiodkeys/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/region/README.md b/resource-manager/apimanagement/2023-03-01-preview/region/README.md index 20e125077ab..1ddb14eed83 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/region/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/region/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/region` Documentation -The `region` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `region` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/region/client.go b/resource-manager/apimanagement/2023-03-01-preview/region/client.go index 46d4de5270d..41092dd526a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/region/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/region/client.go @@ -15,7 +15,7 @@ type RegionClient struct { } func NewRegionClientWithBaseURI(sdkApi sdkEnv.Api) (*RegionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "region", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "region", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/region/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/region/id_service.go index 287e12afddc..51310a9c174 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/region/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/region/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/region/version.go b/resource-manager/apimanagement/2023-03-01-preview/region/version.go index 85a2dd3dbb6..7237b86aec5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/region/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/region/version.go @@ -1,12 +1,10 @@ package region -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/region/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/region/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/README.md b/resource-manager/apimanagement/2023-03-01-preview/reports/README.md index 42e02ed7b95..1c33a3abd64 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/reports` Documentation -The `reports` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `reports` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/client.go b/resource-manager/apimanagement/2023-03-01-preview/reports/client.go index 7d5bde81365..d5f04232726 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/client.go @@ -15,7 +15,7 @@ type ReportsClient struct { } func NewReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReportsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/reports/id_service.go index ff6955096df..b5a3e420608 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyapi.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyapi.go index e99479d8413..938e0fdaf48 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbygeo.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbygeo.go index 1e69c1fb509..13fc541e4a6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbygeo.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbygeo.go @@ -41,6 +41,7 @@ func (o ListByGeoOperationOptions) ToHeaders() *client.Headers { func (o ListByGeoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyoperation.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyoperation.go index bb4465b0ce3..8358f8ba004 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyoperation.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyoperation.go @@ -42,6 +42,7 @@ func (o ListByOperationOperationOptions) ToHeaders() *client.Headers { func (o ListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyproduct.go index 3a6df43c7b4..73d09491df5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyproduct.go @@ -42,6 +42,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyrequest.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyrequest.go index 265c2670114..22f5d5ad5ca 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyrequest.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyrequest.go @@ -36,6 +36,7 @@ func (o ListByRequestOperationOptions) ToHeaders() *client.Headers { func (o ListByRequestOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c ReportsClient) ListByRequest(ctx context.Context, id ServiceId, options var model RequestReportCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbysubscription.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbysubscription.go index 1e7ffadeafd..4be6b09415d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbysubscription.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbytime.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbytime.go index 629527e4e8b..a440a9632c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbytime.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbytime.go @@ -43,6 +43,7 @@ func (o ListByTimeOperationOptions) ToHeaders() *client.Headers { func (o ListByTimeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyuser.go b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyuser.go index 0751d4a40cb..9245fc80cd9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyuser.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/method_listbyuser.go @@ -42,6 +42,7 @@ func (o ListByUserOperationOptions) ToHeaders() *client.Headers { func (o ListByUserOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/reports/version.go b/resource-manager/apimanagement/2023-03-01-preview/reports/version.go index 5463212eb0e..02823751355 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/reports/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/reports/version.go @@ -1,12 +1,10 @@ package reports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reports/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/README.md b/resource-manager/apimanagement/2023-03-01-preview/schema/README.md index 8091470b4f6..55b442f86a5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/schema` Documentation -The `schema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `schema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/client.go b/resource-manager/apimanagement/2023-03-01-preview/schema/client.go index 3d872ecf7a1..dd9c100ba13 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/client.go @@ -15,7 +15,7 @@ type SchemaClient struct { } func NewSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/id_schema.go b/resource-manager/apimanagement/2023-03-01-preview/schema/id_schema.go index bb6238dd767..192895eff2e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/id_schema.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/id_schema.go @@ -44,7 +44,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/schema/id_service.go index 11419aeb835..aeb24c3ff7f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspace.go index f4096e5456a..d6f8a2faec5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspaceschema.go b/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspaceschema.go index 25f35d2ce89..926c9a9b5b2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspaceschema.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/id_workspaceschema.go @@ -46,7 +46,7 @@ func ParseWorkspaceSchemaID(input string) (*WorkspaceSchemaId, error) { } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSchemaIDInsensitively(input string) (*WorkspaceSchemaId, erro } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemacreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemacreateorupdate.go index 4f0f7c321a1..ef94d3f3273 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o GlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o GlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemadelete.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemadelete.go index 234fcfcb78f..f170324bf05 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemadelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemadelete.go @@ -35,6 +35,7 @@ func (o GlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemaget.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemaget.go index d2ec4344b20..6118374682a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemaget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemalistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemalistbyservice.go index 7797c6a6b8f..f25edc94805 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemalistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_globalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o GlobalSchemaListByServiceOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemacreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemacreateorupdate.go index 10d1aaff005..f3e7a8051ee 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemadelete.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemadelete.go index a8aab3185b1..4015581a86c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemadelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemadelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemaget.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemaget.go index 73828cf65b6..749310cc25b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemaget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) WorkspaceGlobalSchemaGet(ctx context.Context, id Workspace var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemalistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemalistbyservice.go index aeae5549ab2..2c2454c9a80 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemalistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/method_workspaceglobalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/schema/version.go b/resource-manager/apimanagement/2023-03-01-preview/schema/version.go index 9d38c7c2aba..da475a44f43 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/schema/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/schema/version.go @@ -1,12 +1,10 @@ package schema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schema/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/README.md b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/README.md index e44d9168aaa..5e60047f37e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/signinsettings` Documentation -The `signinsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `signinsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/client.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/client.go index a21dfcdddd2..0426e9303e8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/client.go @@ -15,7 +15,7 @@ type SignInSettingsClient struct { } func NewSignInSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignInSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signinsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signinsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignInSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/id_service.go index fd18eb71e2f..ab9047e4895 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_createorupdate.go index 7354010fc89..6f35914bbe1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignInSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_get.go index 1de8b5e5963..35d80bf82b1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignInSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_update.go index 1c0af5a3508..499592b651b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/version.go b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/version.go index e71810f313f..04ad0ad5dc5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signinsettings/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signinsettings/version.go @@ -1,12 +1,10 @@ package signinsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signinsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signinsettings/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/README.md b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/README.md index 8c315057c4e..efb0b0aae5a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/signupsettings` Documentation -The `signupsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `signupsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/client.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/client.go index 2d9452823e3..3a4f6ae3333 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/client.go @@ -15,7 +15,7 @@ type SignUpSettingsClient struct { } func NewSignUpSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignUpSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signupsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signupsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignUpSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/id_service.go index eeefe5b42b7..972362091d7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_createorupdate.go index 8d57367d2f5..371f0477840 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignUpSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_get.go index e9062643330..03dc9774b35 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignUpSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_update.go index 8d8918d3324..c86348ae580 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/version.go b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/version.go index 3a515f35271..4a126d236c2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/signupsettings/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/signupsettings/version.go @@ -1,12 +1,10 @@ package signupsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signupsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signupsettings/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/skus/README.md b/resource-manager/apimanagement/2023-03-01-preview/skus/README.md index 3b0f4ecfc7f..012bbe857a9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/skus/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `skus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/skus/client.go b/resource-manager/apimanagement/2023-03-01-preview/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/skus/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/skus/version.go b/resource-manager/apimanagement/2023-03-01-preview/skus/version.go index 37da6faddbc..0a38fca509d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/skus/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/README.md b/resource-manager/apimanagement/2023-03-01-preview/subscription/README.md index a7651f16e96..0c6c18b5b9a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/subscription` Documentation -The `subscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `subscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/client.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/client.go index 9885434f9dd..b5f97131f6f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/client.go @@ -15,7 +15,7 @@ type SubscriptionClient struct { } func NewSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_service.go index eae18b83523..565db9091ea 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_subscriptions2.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_subscriptions2.go index 92e8dcc65f1..c6acf1a4ae0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_subscriptions2.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_subscriptions2.go @@ -44,7 +44,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_usersubscriptions2.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_usersubscriptions2.go index 07412cdb651..f91da2b8480 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_usersubscriptions2.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_usersubscriptions2.go @@ -46,7 +46,7 @@ func ParseUserSubscriptions2ID(input string) (*UserSubscriptions2Id, error) { } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSubscriptions2IDInsensitively(input string) (*UserSubscriptions2Id } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspace.go index f2e1bd584a2..0c6365ef793 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspacesubscriptions2.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspacesubscriptions2.go index 5ec25c56a27..ac81a3cf234 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspacesubscriptions2.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/id_workspacesubscriptions2.go @@ -46,7 +46,7 @@ func ParseWorkspaceSubscriptions2ID(input string) (*WorkspaceSubscriptions2Id, e } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSubscriptions2IDInsensitively(input string) (*WorkspaceSubscr } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_createorupdate.go index 84f04d880d0..b8e289d53ae 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_createorupdate.go @@ -38,6 +38,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) CreateOrUpdate(ctx context.Context, id Subscriptions var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_delete.go index e3c31885a75..365f71a2c63 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_get.go index 9a57c676f8b..0156f9f655a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) Get(ctx context.Context, id Subscriptions2Id) (resul var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_list.go index 2e9d96e0473..8b1e4d1455b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_listsecrets.go index 579b90282a8..ce51c65282c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_listsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) ListSecrets(ctx context.Context, id Subscriptions2Id var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_update.go index 635071e41ca..04305d82d79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_update.go @@ -38,6 +38,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) Update(ctx context.Context, id Subscriptions2Id, inp var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_usersubscriptionget.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_usersubscriptionget.go index 4323e0a04c6..9c22a5becdd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_usersubscriptionget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_usersubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) UserSubscriptionGet(ctx context.Context, id UserSubs var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go index 9c4c3b06ccb..37af25f8a1e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionCreateOrUpdate(ctx context.Cont var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptiondelete.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptiondelete.go index ae93f99c979..596c10eb7d8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptiondelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptiondelete.go @@ -35,6 +35,7 @@ func (o WorkspaceSubscriptionDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionget.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionget.go index 37ea5ebe516..8dae472a92c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionGet(ctx context.Context, id Wor var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlist.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlist.go index ae68c703393..3204ff8b3a1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlist.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlist.go @@ -41,6 +41,7 @@ func (o WorkspaceSubscriptionListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceSubscriptionListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlistsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlistsecrets.go index 5aaf63656bd..6fe9aca9880 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlistsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionlistsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionListSecrets(ctx context.Context var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionupdate.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionupdate.go index e8866e97051..a71cb2ab2b4 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/method_workspacesubscriptionupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionUpdate(ctx context.Context, id var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/subscription/version.go b/resource-manager/apimanagement/2023-03-01-preview/subscription/version.go index 870a0e081b4..e6edd6a6745 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/subscription/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/subscription/version.go @@ -1,12 +1,10 @@ package subscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscription/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/README.md b/resource-manager/apimanagement/2023-03-01-preview/tag/README.md index 50e8fc1926e..240a07dbfc9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tag` Documentation -The `tag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/client.go b/resource-manager/apimanagement/2023-03-01-preview/tag/client.go index e97e5adc95e..9450459e77c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/client.go @@ -15,7 +15,7 @@ type TagClient struct { } func NewTagClientWithBaseURI(sdkApi sdkEnv.Api) (*TagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tag/id_service.go index c2136f64b3e..35b3ad02caf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/id_tag.go b/resource-manager/apimanagement/2023-03-01-preview/tag/id_tag.go index 568503a639c..70a4aa51923 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/id_tag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspace.go index 3028a0894dc..bfda0ce4d3d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspacetag.go b/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspacetag.go index 22e3dc2edb3..52c9179a8dc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_createorupdate.go index 9494659a794..5839e98d081 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) CreateOrUpdate(ctx context.Context, id TagId, input TagCreate var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_delete.go index 83335d794bd..ae058a00292 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_get.go index 8395e2cb1b1..ebda46b567c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_get.go @@ -45,7 +45,6 @@ func (c TagClient) Get(ctx context.Context, id TagId) (result GetOperationRespon var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_listbyservice.go index efb001aaa9c..e7afb4202b1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_update.go index 8ee0391b4d4..3aba0116fd3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) Update(ctx context.Context, id TagId, input TagCreateUpdatePa var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagcreateorupdate.go index 43dd91a0327..7a942b3509e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceTagCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) WorkspaceTagCreateOrUpdate(ctx context.Context, id WorkspaceT var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagdelete.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagdelete.go index c702a5f54dc..8ec36b5031b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagdelete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceTagDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagget.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagget.go index 70647072c3e..4fbedecfe18 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagget.go @@ -45,7 +45,6 @@ func (c TagClient) WorkspaceTagGet(ctx context.Context, id WorkspaceTagId) (resu var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetaglistbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetaglistbyservice.go index e41c7e2b252..b401db29d28 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetaglistbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetaglistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceTagListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagupdate.go index 0d23c5923a8..2a4a2f560a7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/method_workspacetagupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) WorkspaceTagUpdate(ctx context.Context, id WorkspaceTagId, in var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tag/version.go b/resource-manager/apimanagement/2023-03-01-preview/tag/version.go index d0528a03ea0..67f556bdd99 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tag/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tag/version.go @@ -1,12 +1,10 @@ package tag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tag/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/README.md b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/README.md index cc5c9bb7d4d..fd21378f701 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tagapilink` Documentation -The `tagapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tagapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/client.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/client.go index a3dcf8d66eb..f7f085c97cb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/client.go @@ -15,7 +15,7 @@ type TagApiLinkClient struct { } func NewTagApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_apilink.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_apilink.go index 8f12afdcae2..b8280a415bb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_apilink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_apilink.go @@ -46,7 +46,7 @@ func ParseApiLinkID(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiLinkIDInsensitively(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tag.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tag.go index d8e00e21e9f..a1fe305725a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tagapilink.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tagapilink.go index 59e43c8dd36..2f275a0f92b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tagapilink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_tagapilink.go @@ -48,7 +48,7 @@ func ParseTagApiLinkID(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagApiLinkIDInsensitively(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_workspacetag.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_workspacetag.go index a7ea89f58c3..6db7c41d51a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_createorupdate.go index 0b09901bfc5..608572cd0ec 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) CreateOrUpdate(ctx context.Context, id ApiLinkId, inpu var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_get.go index 8de9c2a323d..4deae08bbd9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_get.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) Get(ctx context.Context, id ApiLinkId) (result GetOper var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_listbyproduct.go index 4c0cda2c870..a96f5e4967e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go index b8a0dc48684..9917c2f8e25 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkCreateOrUpdate(ctx context.Context, var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkget.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkget.go index 3eddb1e9cc1..abec05ea983 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinkget.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkGet(ctx context.Context, id TagApiL var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go index b39a8283dfe..aa0d3d57a51 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagApiLinkListByProductOperationOptions) ToHeaders() *client.He func (o WorkspaceTagApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/version.go b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/version.go index 1292c5307c3..3c204aaf140 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagapilink/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagapilink/version.go @@ -1,12 +1,10 @@ package tagapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagapilink/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/README.md b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/README.md index 4fb061f28d3..e4e671eb3c1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink` Documentation -The `tagoperationlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tagoperationlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/client.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/client.go index e582ef4198c..72e799b13ad 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/client.go @@ -15,7 +15,7 @@ type TagOperationLinkClient struct { } func NewTagOperationLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagOperationLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagoperationlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagoperationlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagOperationLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_operationlink.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_operationlink.go index c714bd0244c..86160e6387b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_operationlink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_operationlink.go @@ -46,7 +46,7 @@ func ParseOperationLinkID(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationLinkIDInsensitively(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tag.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tag.go index c2c5d5834d5..d4c60c78f5b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tagoperationlink.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tagoperationlink.go index 8d1d98640ce..06c1e2b5847 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tagoperationlink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_tagoperationlink.go @@ -48,7 +48,7 @@ func ParseTagOperationLinkID(input string) (*TagOperationLinkId, error) { } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagOperationLinkIDInsensitively(input string) (*TagOperationLinkId, er } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_workspacetag.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_workspacetag.go index 9b722df3460..ef37b3e545b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_createorupdate.go index e306fb5a87c..392fea2c56c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) CreateOrUpdate(ctx context.Context, id Operation var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_get.go index 9f16e16283d..179efd55590 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_get.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) Get(ctx context.Context, id OperationLinkId) (re var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_listbyproduct.go index cee618cdcb6..409ad05fede 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go index fcb4d980ef4..b5282d8c451 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkCreateOrUpdate(ctx cont var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go index 8e90fec49fc..4aed112d5f8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkGet(ctx context.Context var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go index 46445e555b0..ec6c721589d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/version.go b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/version.go index 0acbb52e65c..8eb1aa7183b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagoperationlink/version.go @@ -1,12 +1,10 @@ package tagoperationlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagoperationlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagoperationlink/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/README.md b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/README.md index 746dba26cf4..bffd5c84007 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tagproductlink` Documentation -The `tagproductlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tagproductlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/client.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/client.go index 955dda813c9..4575780b827 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/client.go @@ -15,7 +15,7 @@ type TagProductLinkClient struct { } func NewTagProductLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagProductLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagproductlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagproductlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagProductLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_productlink.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_productlink.go index ebd018211ce..d6e9874cda1 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_productlink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_productlink.go @@ -46,7 +46,7 @@ func ParseProductLinkID(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductLinkIDInsensitively(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tag.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tag.go index 4ef3fd4eea3..4f54968e9b8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tagproductlink.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tagproductlink.go index bf8fe163803..856bb600a64 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tagproductlink.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_tagproductlink.go @@ -48,7 +48,7 @@ func ParseTagProductLinkID(input string) (*TagProductLinkId, error) { } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagProductLinkIDInsensitively(input string) (*TagProductLinkId, error) } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_workspacetag.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_workspacetag.go index aab9b9ab186..862c2492b1b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_createorupdate.go index 3dde143776e..d29aa87e45b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) CreateOrUpdate(ctx context.Context, id ProductLink var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_get.go index 8d3e297151d..8c78f838b6a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_get.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) Get(ctx context.Context, id ProductLinkId) (result var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_listbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_listbyproduct.go index c1d3225b9ab..5a81c12a0c3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go index b8d0d74206a..00efc8105c3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkCreateOrUpdate(ctx context. var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkget.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkget.go index 97e0f8b09c9..bed6edf51c9 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkget.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinkget.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkGet(ctx context.Context, id var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go index 374d9806a47..b225404de53 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagProductLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceTagProductLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/version.go b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/version.go index 2b6b8120edc..24628a911ff 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagproductlink/version.go @@ -1,12 +1,10 @@ package tagproductlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagproductlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagproductlink/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagresource/README.md b/resource-manager/apimanagement/2023-03-01-preview/tagresource/README.md index fa033ad661e..b96a4bd0c2a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagresource/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tagresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tagresource` Documentation -The `tagresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tagresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagresource/client.go b/resource-manager/apimanagement/2023-03-01-preview/tagresource/client.go index 9a4e989f378..e368d7173e2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagresource/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagresource/client.go @@ -15,7 +15,7 @@ type TagResourceClient struct { } func NewTagResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TagResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagresource/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tagresource/id_service.go index 7a6a2163595..79c6c3d76d3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagresource/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagresource/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/tagresource/method_listbyservice.go index 0d880dc6dad..3daedbb3d18 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tagresource/version.go b/resource-manager/apimanagement/2023-03-01-preview/tagresource/version.go index fd15dc214fd..70f30e93e3e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tagresource/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tagresource/version.go @@ -1,12 +1,10 @@ package tagresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagresource/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/README.md b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/README.md index 738127391b5..6a23dbd9059 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tenantaccess` Documentation -The `tenantaccess` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tenantaccess` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/client.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/client.go index d36cd27765c..131dd722282 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/client.go @@ -15,7 +15,7 @@ type TenantAccessClient struct { } func NewTenantAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_access.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_access.go index 927925f0366..f2aea0cdd42 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_access.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_service.go index 6dbbad41263..6753200ac92 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_create.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_create.go index 73ced417651..0cd71b7a599 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_create.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Create(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_get.go index 88298263510..832e64d03c0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_get.go @@ -45,7 +45,6 @@ func (c TenantAccessClient) Get(ctx context.Context, id AccessId) (result GetOpe var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listbyservice.go index 541de46f891..6f51efcc9b2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listsecrets.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listsecrets.go index 237989384de..12e38530891 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_listsecrets.go @@ -46,7 +46,6 @@ func (c TenantAccessClient) ListSecrets(ctx context.Context, id AccessId) (resul var model AccessInformationSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_update.go index 73793de2965..a01c3d4829c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Update(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/version.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/version.go index 95439b39486..997cf471c69 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccess/version.go @@ -1,12 +1,10 @@ package tenantaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccess/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/client.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/client.go index 1540a8d6df5..7c14713409a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/client.go @@ -15,7 +15,7 @@ type TenantAccessGitClient struct { } func NewTenantAccessGitClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessGitClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccessgit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccessgit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessGitClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/id_access.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/id_access.go index c4c17575eda..f067740b97e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/id_access.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/version.go b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/version.go index a93293c70de..2805cb0740d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantaccessgit/version.go @@ -1,12 +1,10 @@ package tenantaccessgit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccessgit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccessgit/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/README.md b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/README.md index 14dc9aed9c2..6d3783e7ab3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration` Documentation -The `tenantconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tenantconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/client.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/client.go index 0251dfc8eb5..bd86c8dd00f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/client.go @@ -15,7 +15,7 @@ type TenantConfigurationClient struct { } func NewTenantConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/id_service.go index 0a039a17bc1..47fc7a837b0 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/version.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/version.go index 976f6228861..4acfa51bd79 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfiguration/version.go @@ -1,12 +1,10 @@ package tenantconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfiguration/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/README.md b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/README.md index 55989c3db2c..a16e4167b08 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate` Documentation -The `tenantconfigurationsyncstate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tenantconfigurationsyncstate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/client.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/client.go index f79f21d0f2c..d01b2487b59 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/client.go @@ -15,7 +15,7 @@ type TenantConfigurationSyncStateClient struct { } func NewTenantConfigurationSyncStateClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationSyncStateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationSyncStateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/id_service.go index 354cdf503e1..54597cebc65 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go index fee9e2d3374..1992a54ac27 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go @@ -46,7 +46,6 @@ func (c TenantConfigurationSyncStateClient) TenantConfigurationGetSyncState(ctx var model TenantConfigurationSyncStateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/version.go b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/version.go index 82eb839fbb3..b1de26351e6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantconfigurationsyncstate/version.go @@ -1,12 +1,10 @@ package tenantconfigurationsyncstate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfigurationsyncstate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfigurationsyncstate/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/README.md b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/README.md index 7c504ea403f..7c6215d2efe 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/tenantsettings` Documentation -The `tenantsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `tenantsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/client.go b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/client.go index db0f8f815eb..71cea0dd788 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/client.go @@ -15,7 +15,7 @@ type TenantSettingsClient struct { } func NewTenantSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/id_service.go index 68a0c265a26..8e42a6aaa11 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_get.go index 40a9e01b321..35b4057e1e2 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_get.go @@ -46,7 +46,6 @@ func (c TenantSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model TenantSettingsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_listbyservice.go index 12487f36224..b0ee3853b15 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/version.go b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/version.go index 5585e365635..0566b8aca8d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/tenantsettings/version.go @@ -1,12 +1,10 @@ package tenantsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantsettings/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/README.md b/resource-manager/apimanagement/2023-03-01-preview/user/README.md index 0a502f0d183..2e7cdb15234 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `user` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/client.go b/resource-manager/apimanagement/2023-03-01-preview/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/user/id_service.go index 4793d7dba1c..e39d35a9443 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/user/id_user.go index 46e79677949..b758a66bd0b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/user/method_createorupdate.go index b1cf998602d..3d85a55770e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c UserClient) CreateOrUpdate(ctx context.Context, id UserId, input UserCre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/user/method_delete.go index b5b2112ac40..80b5cf93034 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/user/method_get.go index 1237761289c..e7fc56ebb3e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/user/method_listbyservice.go index e098057b246..2fc7fb34899 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/user/method_update.go index 11353f91240..d0628f53b8d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c UserClient) Update(ctx context.Context, id UserId, input UserUpdateParam var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/user/version.go b/resource-manager/apimanagement/2023-03-01-preview/user/version.go index 28bc19912f1..02e872bbdd8 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/user/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/client.go b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/client.go index 2be6b996059..a78825dedcc 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/client.go @@ -15,7 +15,7 @@ type UserConfirmationPasswordSendClient struct { } func NewUserConfirmationPasswordSendClientWithBaseURI(sdkApi sdkEnv.Api) (*UserConfirmationPasswordSendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserConfirmationPasswordSendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/id_user.go index 119b0594c8a..100e150391d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go index b1915a44d82..700323d679d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go +++ b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go @@ -33,6 +33,7 @@ func (o UserConfirmationPasswordSendOperationOptions) ToHeaders() *client.Header func (o UserConfirmationPasswordSendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/version.go b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/version.go index 92d9762d062..bddae5b8263 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/userconfirmationpasswordsend/version.go @@ -1,12 +1,10 @@ package userconfirmationpasswordsend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/userconfirmationpasswordsend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/userconfirmationpasswordsend/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usergroup/README.md b/resource-manager/apimanagement/2023-03-01-preview/usergroup/README.md index 7f2deeaae60..fd21d2d401c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usergroup/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/usergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/usergroup` Documentation -The `usergroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `usergroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/usergroup/client.go b/resource-manager/apimanagement/2023-03-01-preview/usergroup/client.go index 74829119980..c03391f5989 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usergroup/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usergroup/client.go @@ -15,7 +15,7 @@ type UserGroupClient struct { } func NewUserGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*UserGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usergroup/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/usergroup/id_user.go index dbcd62c7aff..d3e2840860c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usergroup/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usergroup/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usergroup/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/usergroup/method_list.go index cfe2c191701..0585c10cd75 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usergroup/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usergroup/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usergroup/version.go b/resource-manager/apimanagement/2023-03-01-preview/usergroup/version.go index 425bb0df5f9..6f6c6d4adcb 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usergroup/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usergroup/version.go @@ -1,12 +1,10 @@ package usergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usergroup/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/useridentity/README.md b/resource-manager/apimanagement/2023-03-01-preview/useridentity/README.md index 01b0ee5508b..a370433ea0d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/useridentity/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/useridentity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/useridentity` Documentation -The `useridentity` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `useridentity` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/useridentity/client.go b/resource-manager/apimanagement/2023-03-01-preview/useridentity/client.go index ba997999551..252dc69cb22 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/useridentity/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/useridentity/client.go @@ -15,7 +15,7 @@ type UserIdentityClient struct { } func NewUserIdentityClientWithBaseURI(sdkApi sdkEnv.Api) (*UserIdentityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "useridentity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "useridentity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserIdentityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/useridentity/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/useridentity/id_user.go index 81e0f7f5380..4835b28eb40 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/useridentity/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/useridentity/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/useridentity/version.go b/resource-manager/apimanagement/2023-03-01-preview/useridentity/version.go index f6e9ff1189e..4fbf81193c3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/useridentity/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/useridentity/version.go @@ -1,12 +1,10 @@ package useridentity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/useridentity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/useridentity/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/users/README.md b/resource-manager/apimanagement/2023-03-01-preview/users/README.md index 1ca5d977c52..f8ab6e45d4c 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/users/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `users` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/users/client.go b/resource-manager/apimanagement/2023-03-01-preview/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/users/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/users/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/users/id_user.go index f309b6fbd68..73fb129b8ef 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/users/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/users/method_usergeneratessourl.go b/resource-manager/apimanagement/2023-03-01-preview/users/method_usergeneratessourl.go index 500ea8362b0..bab32e3f071 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/users/method_usergeneratessourl.go +++ b/resource-manager/apimanagement/2023-03-01-preview/users/method_usergeneratessourl.go @@ -46,7 +46,6 @@ func (c UsersClient) UserGenerateSsoUrl(ctx context.Context, id UserId) (result var model GenerateSsoUrlResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/users/version.go b/resource-manager/apimanagement/2023-03-01-preview/users/version.go index 679bbbc6e94..9f0b2c25a7d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/users/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/README.md b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/README.md index cb20d7a4117..ac68dc41922 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/usersubscription` Documentation -The `usersubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `usersubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/client.go b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/client.go index f9dd0627128..82b11b9ee90 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/client.go @@ -15,7 +15,7 @@ type UserSubscriptionClient struct { } func NewUserSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/id_user.go index b993469b4bf..fc76652d568 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/method_list.go b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/method_list.go index 9acd966ed75..f2118eff505 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/method_list.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/version.go b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/version.go index 246990eac27..1fc6c35d069 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usersubscription/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usersubscription/version.go @@ -1,12 +1,10 @@ package usersubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersubscription/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usertoken/README.md b/resource-manager/apimanagement/2023-03-01-preview/usertoken/README.md index ae626fa6f02..c90d9d8f70a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usertoken/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/usertoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/usertoken` Documentation -The `usertoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `usertoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/usertoken/client.go b/resource-manager/apimanagement/2023-03-01-preview/usertoken/client.go index adeb6294866..fc8cfaecc12 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usertoken/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usertoken/client.go @@ -15,7 +15,7 @@ type UserTokenClient struct { } func NewUserTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*UserTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usertoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usertoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usertoken/id_user.go b/resource-manager/apimanagement/2023-03-01-preview/usertoken/id_user.go index e0f7cf9ee4b..bbb27ed3ed3 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usertoken/id_user.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usertoken/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usertoken/method_usergetsharedaccesstoken.go b/resource-manager/apimanagement/2023-03-01-preview/usertoken/method_usergetsharedaccesstoken.go index 28e0efb393e..28d84cc2ee6 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usertoken/method_usergetsharedaccesstoken.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usertoken/method_usergetsharedaccesstoken.go @@ -50,7 +50,6 @@ func (c UserTokenClient) UserGetSharedAccessToken(ctx context.Context, id UserId var model UserTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/usertoken/version.go b/resource-manager/apimanagement/2023-03-01-preview/usertoken/version.go index 49927e821b5..6885dea5ebf 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/usertoken/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/usertoken/version.go @@ -1,12 +1,10 @@ package usertoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usertoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usertoken/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/README.md b/resource-manager/apimanagement/2023-03-01-preview/workspace/README.md index 9891f75de31..0006925594f 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `workspace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/client.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/id_service.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/id_service.go index 8d9a4894f5c..e7da8ebcfda 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/id_service.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/id_workspace.go index d86572af484..25a370d981a 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_createorupdate.go index dfbaee168e5..e0e6326e76d 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_delete.go index 41a2b818416..92db0fb9837 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_get.go index 2bea0d0912a..75af77961fd 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_listbyservice.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_listbyservice.go index d7edc0c9746..de7b59ee645 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_update.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_update.go index 840713f4a4f..88ff8b28c99 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/method_update.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspace/version.go b/resource-manager/apimanagement/2023-03-01-preview/workspace/version.go index a0dbe0aa110..be51ab0e456 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspace/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/README.md b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/README.md index d8b5cadbc5e..512dbe1cdfa 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/README.md +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy` Documentation -The `workspacepolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-03-01-preview`). +The `workspacepolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-03-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/client.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/client.go index d4e3c38bc31..96b70b2680b 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/client.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/client.go @@ -15,7 +15,7 @@ type WorkspacePolicyClient struct { } func NewWorkspacePolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacepolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacepolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/id_workspace.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/id_workspace.go index 12c8b423579..a869e05757e 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/id_workspace.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_createorupdate.go index 9385b41a924..50f1b5227f7 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspacePolicyClient) CreateOrUpdate(ctx context.Context, id WorkspaceI var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_delete.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_delete.go index ac1ad5e7365..6b8d6ba6161 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_get.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_get.go index 90e7b0877f6..03cdbe063ab 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_get.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WorkspacePolicyClient) Get(ctx context.Context, id WorkspaceId, options var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/version.go b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/version.go index 0aee5beef92..e10c6266a71 100644 --- a/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/version.go +++ b/resource-manager/apimanagement/2023-03-01-preview/workspacepolicy/version.go @@ -1,12 +1,10 @@ package workspacepolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacepolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacepolicy/2023-03-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/README.md b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/README.md index 736c9fb23c9..75cafd55b10 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/allpolicies` Documentation -The `allpolicies` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `allpolicies` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/client.go b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/client.go index ddd718e8dde..0bc23a25efd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/client.go @@ -15,7 +15,7 @@ type AllPoliciesClient struct { } func NewAllPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*AllPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "allpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "allpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AllPoliciesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/id_service.go index 28341dd0c33..c4a4b8213ad 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/version.go b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/version.go index 5e8a8378fb3..f472459beb6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/allpolicies/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/allpolicies/version.go @@ -1,12 +1,10 @@ package allpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/allpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/allpolicies/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/README.md b/resource-manager/apimanagement/2023-05-01-preview/api/README.md index dd3d160ceb0..b2ad5be4a4e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/api/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/api` Documentation -The `api` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `api` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/client.go b/resource-manager/apimanagement/2023-05-01-preview/api/client.go index 5ce28196132..2f776384d61 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/client.go @@ -15,7 +15,7 @@ type ApiClient struct { } func NewApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/api/id_api.go index a70d7f5620c..ac1a5275add 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/api/id_service.go index c50464ed710..2671c279deb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/api/id_workspace.go index 33d92e28640..9a85d3b87ce 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/api/id_workspaceapi.go index 5d2d28b9caf..323f04187f8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_createorupdate.go index b95d5839846..82ae2ce07af 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_delete.go index d4625ea7e66..f1da7b68270 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_delete.go @@ -39,6 +39,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_get.go index 07f671ef642..0b768d34293 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_get.go @@ -45,7 +45,6 @@ func (c ApiClient) Get(ctx context.Context, id ApiId) (result GetOperationRespon var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_listbyservice.go index 6b9bc61fa02..637304ef1e8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_update.go index 491fbbeb5c8..6310b4ab9ad 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) Update(ctx context.Context, id ApiId, input ApiUpdateContract var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapicreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapicreateorupdate.go index c7a255c688a..0af4458649e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapicreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapicreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapidelete.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapidelete.go index 44393545209..719631183af 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapidelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapidelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiget.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiget.go index 220b742d573..23fa96a3827 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiget.go @@ -45,7 +45,6 @@ func (c ApiClient) WorkspaceApiGet(ctx context.Context, id WorkspaceApiId) (resu var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapilistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapilistbyservice.go index aeed0e70077..59509cef86c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapilistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapilistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceApiListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiupdate.go b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiupdate.go index 25f72466ee3..7bcd19acc0f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/method_workspaceapiupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) WorkspaceApiUpdate(ctx context.Context, id WorkspaceApiId, in var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/api/version.go b/resource-manager/apimanagement/2023-05-01-preview/api/version.go index 63467de04d0..1f1277cbb63 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/api/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/api/version.go @@ -1,12 +1,10 @@ package api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/api/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/README.md b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/README.md index b6a2b18571a..ab1c80079e7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic` Documentation -The `apidiagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apidiagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/client.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/client.go index 10bdb8741b2..4e0be722654 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/client.go @@ -15,7 +15,7 @@ type ApiDiagnosticClient struct { } func NewApiDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidiagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidiagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_api.go index 1c99bf5821c..30c3eaab96f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_apidiagnostic.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_apidiagnostic.go index d2f0e00b2bb..604e7513a08 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_apidiagnostic.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/id_apidiagnostic.go @@ -46,7 +46,7 @@ func ParseApiDiagnosticID(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiDiagnosticIDInsensitively(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_createorupdate.go index 2551a5d1445..4f82c372b8f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiDiagnosticClient) CreateOrUpdate(ctx context.Context, id ApiDiagnosti var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_delete.go index a781c7b154b..ede64465f75 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_get.go index bb113001b36..cd148612858 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_get.go @@ -45,7 +45,6 @@ func (c ApiDiagnosticClient) Get(ctx context.Context, id ApiDiagnosticId) (resul var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_listbyservice.go index 96b6f06f674..96e04e5bd42 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_update.go index 00ef4533a35..1352f0f032b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiDiagnosticClient) Update(ctx context.Context, id ApiDiagnosticId, inp var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/version.go b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/version.go index c89a1c0a165..d09905e3287 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apidiagnostic/version.go @@ -1,12 +1,10 @@ package apidiagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidiagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidiagnostic/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiissue/README.md index ec99dcd3d17..8e7124deabe 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiissue` Documentation -The `apiissue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiissue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/client.go index 33f2a33d684..6350de2a21e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/client.go @@ -15,7 +15,7 @@ type ApiIssueClient struct { } func NewApiIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_api.go index f42ff72ff21..063c20d8c75 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_apiissue.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_apiissue.go index 7b13fff0230..267ea58855b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_apiissue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_createorupdate.go index 2c843315ed6..0a592af3683 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueClient) CreateOrUpdate(ctx context.Context, id ApiIssueId, input var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_delete.go index c51a70bf93d..51c49f6e8ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_get.go index a4f0ff0be8a..b364bf2fbce 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiIssueClient) Get(ctx context.Context, id ApiIssueId, options GetOpera var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_listbyservice.go index 314d87e9b6e..fc909bd1842 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_update.go index 5db5804bbb2..0e09126c1ed 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiIssueClient) Update(ctx context.Context, id ApiIssueId, input IssueUp var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissue/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiissue/version.go index 1c0085c445b..d22e4ff4bc9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissue/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissue/version.go @@ -1,12 +1,10 @@ package apiissue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissue/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/README.md index 3c7ab07ea97..235ad2ffb42 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment` Documentation -The `apiissueattachment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiissueattachment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/client.go index 84b276260e3..ee1f89ab366 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/client.go @@ -15,7 +15,7 @@ type ApiIssueAttachmentClient struct { } func NewApiIssueAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueAttachmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissueattachment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissueattachment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueAttachmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_apiissue.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_apiissue.go index b77d45c0fdb..e7dc1375f21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_apiissue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_attachment.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_attachment.go index c57aa82518a..542f104ced8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_attachment.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/id_attachment.go @@ -48,7 +48,7 @@ func ParseAttachmentID(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAttachmentIDInsensitively(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_createorupdate.go index a44575c4ae0..0433d95beeb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueAttachmentClient) CreateOrUpdate(ctx context.Context, id Attachm var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_delete.go index 867e45b1ffc..8eb76db21c6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_get.go index f544ca53f2b..9d487af13e5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueAttachmentClient) Get(ctx context.Context, id AttachmentId) (res var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_listbyservice.go index 7e2162ab2a9..5805727d267 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/version.go index fcd3de023bb..fbd00db9a07 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissueattachment/version.go @@ -1,12 +1,10 @@ package apiissueattachment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissueattachment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissueattachment/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/README.md index 67df1e2b430..0dcc737ef34 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment` Documentation -The `apiissuecomment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiissuecomment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/client.go index 22377af4fed..8ce8ce1be89 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/client.go @@ -15,7 +15,7 @@ type ApiIssueCommentClient struct { } func NewApiIssueCommentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueCommentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissuecomment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissuecomment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueCommentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_apiissue.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_apiissue.go index dff007275dc..62a078b3a21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_apiissue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_comment.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_comment.go index 46ee496fa82..d0ec704a1bc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_comment.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/id_comment.go @@ -48,7 +48,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_createorupdate.go index 82f8efd70c7..df5d55dbf21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueCommentClient) CreateOrUpdate(ctx context.Context, id CommentId, var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_delete.go index 725bbb2f2a8..de8f0e9c2cd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_get.go index 459dd2af4c6..596b1a6dd11 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueCommentClient) Get(ctx context.Context, id CommentId) (result Ge var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_listbyservice.go index a1f56a2f9d7..4b5e59c9821 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/version.go index 5617c185bd3..e2e6ecd28cf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiissuecomment/version.go @@ -1,12 +1,10 @@ package apiissuecomment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissuecomment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissuecomment/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/README.md b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/README.md index 3b6306fa8d0..3d89af3186f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice` Documentation -The `apimanagementservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apimanagementservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/client.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/client.go index 7c5932f7316..4816927cda9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceClient struct { } func NewApiManagementServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/id_service.go index 5183555d0c8..b8c710f4cb3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_checknameavailability.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_checknameavailability.go index 2a8c875ee1f..0aa5392bae2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_checknameavailability.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ApiManagementServiceClient) CheckNameAvailability(ctx context.Context, i var model ApiManagementServiceNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_get.go index 771928691f7..f4d6a791731 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_get.go @@ -45,7 +45,6 @@ func (c ApiManagementServiceClient) Get(ctx context.Context, id ServiceId) (resu var model ApiManagementServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getdomainownershipidentifier.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getdomainownershipidentifier.go index 40d031a5f83..acb89d914e7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getdomainownershipidentifier.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getdomainownershipidentifier.go @@ -47,7 +47,6 @@ func (c ApiManagementServiceClient) GetDomainOwnershipIdentifier(ctx context.Con var model ApiManagementServiceGetDomainOwnershipIdentifierResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getssotoken.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getssotoken.go index ecf0a465d0f..7d2b5a93c5f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getssotoken.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/method_getssotoken.go @@ -46,7 +46,6 @@ func (c ApiManagementServiceClient) GetSsoToken(ctx context.Context, id ServiceI var model ApiManagementServiceGetSsoTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/version.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/version.go index 5cf6d96bf23..82ce5be1810 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementservice/version.go @@ -1,12 +1,10 @@ package apimanagementservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementservice/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/README.md b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/README.md index 6e3f365cf50..155c3254b3d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus` Documentation -The `apimanagementserviceskus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apimanagementserviceskus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/client.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/client.go index 33c4554cc31..d78d3a46960 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceSkusClient struct { } func NewApiManagementServiceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceSkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/id_service.go index 1f1fc07284a..92edf692b6f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/version.go b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/version.go index f3d31f74946..ad4bd0cc6d7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apimanagementserviceskus/version.go @@ -1,12 +1,10 @@ package apimanagementserviceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementserviceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementserviceskus/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/README.md b/resource-manager/apimanagement/2023-05-01-preview/apioperation/README.md index 43af217d203..b3a391980e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apioperation` Documentation -The `apioperation` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apioperation` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/client.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/client.go index 5c9fa6d23e6..b9782eb451f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/client.go @@ -15,7 +15,7 @@ type ApiOperationClient struct { } func NewApiOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_api.go index 253d9153dbc..751a8abfb3b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_apioperation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_apioperation.go index 57cefcbf920..3e3fe6797ca 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_apioperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_operation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_operation.go index ae47adf61a5..279d3f927e2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_operation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_workspaceapi.go index 15a2ebfc5ee..942099871ab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_createorupdate.go index ee86a38b0bc..66fb1d5996e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) CreateOrUpdate(ctx context.Context, id OperationId, var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_delete.go index ee390d245b3..e4e9e6e90ee 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_get.go index 7fed3585ab9..ff3a98889ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_get.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) Get(ctx context.Context, id OperationId) (result Get var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_listbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_listbyapi.go index df8d3b45502..798fe0e7552 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_update.go index 005fc98f21a..4f5130245ac 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) Update(ctx context.Context, id OperationId, input Op var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go index 31e0a6ea5fe..30641e7be40 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) WorkspaceApiOperationCreateOrUpdate(ctx context.Cont var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationdelete.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationdelete.go index 803c543da5b..d4c57385ace 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationget.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationget.go index 2da88a66a2f..e6dc1ea7d24 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationget.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) WorkspaceApiOperationGet(ctx context.Context, id Api var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationlistbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationlistbyapi.go index dfa7091cdf8..980cf5b41d0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationlistbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationlistbyapi.go @@ -42,6 +42,7 @@ func (o WorkspaceApiOperationListByApiOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationupdate.go index b485b35b34a..ab2d9f3e638 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/method_workspaceapioperationupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) WorkspaceApiOperationUpdate(ctx context.Context, id var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperation/version.go b/resource-manager/apimanagement/2023-05-01-preview/apioperation/version.go index f2986dd3290..20c488599e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperation/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperation/version.go @@ -1,12 +1,10 @@ package apioperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperation/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/README.md index 0b70c145c3e..f6818c6e5d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy` Documentation -The `apioperationpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apioperationpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/client.go index 4c1ef477115..c0dc541f2ed 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/client.go @@ -15,7 +15,7 @@ type ApiOperationPolicyClient struct { } func NewApiOperationPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_apioperation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_apioperation.go index 15b5b760791..e8158bcb582 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_apioperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_operation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_operation.go index a9f5f2e9bd1..99c5e55bc33 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_operation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_createorupdate.go index 3437b481d77..398b6fbd9ed 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) CreateOrUpdate(ctx context.Context, id Operati var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_delete.go index 1b77d06ed20..cd8893ce2f0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_get.go index 53ce4e80d68..24446658831 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) Get(ctx context.Context, id OperationId, optio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go index 749273ac587..c21831c5e1a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToHeaders() * func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyCreateOrUpdate(ctx var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go index 47c3dded764..6aa0d0aa167 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToHeaders() *client.H func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go index 9395af3465a..37760ed9db3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/method_workspaceapioperationpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiOperationPolicyGetOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyGet(ctx context.Con var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/version.go index d66568b0d70..ba8afa544c5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationpolicy/version.go @@ -1,12 +1,10 @@ package apioperationpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationpolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/README.md b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/README.md index b69813c15d6..c53d0be74ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag` Documentation -The `apioperationsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apioperationsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/client.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/client.go index 26f8b7f55aa..703172fb96e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/client.go @@ -15,7 +15,7 @@ type ApiOperationsByTagClient struct { } func NewApiOperationsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/id_api.go index 5897ef0aafc..3ef76da3989 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/method_operationlistbytags.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/method_operationlistbytags.go index 2a37906b22f..da55db0920b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/method_operationlistbytags.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/method_operationlistbytags.go @@ -42,6 +42,7 @@ func (o OperationListByTagsOperationOptions) ToHeaders() *client.Headers { func (o OperationListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/version.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/version.go index ddfaa102d38..041fea3f5a2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationsbytag/version.go @@ -1,12 +1,10 @@ package apioperationsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationsbytag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/README.md b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/README.md index b12cdb13c65..574d97f96dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apioperationtag` Documentation -The `apioperationtag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apioperationtag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/client.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/client.go index 6f14f25474c..977dc13c0f9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/client.go @@ -15,7 +15,7 @@ type ApiOperationTagClient struct { } func NewApiOperationTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationtag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationtag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operation.go index efa4b494f53..cd8e54a7d89 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operationtag.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operationtag.go index 278b58eaf30..daaa768a548 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operationtag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/id_operationtag.go @@ -48,7 +48,7 @@ func ParseOperationTagID(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOperationTagIDInsensitively(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_tagassigntooperation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_tagassigntooperation.go index ee4d3b0dbb0..003af5a6855 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_tagassigntooperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_tagassigntooperation.go @@ -46,7 +46,6 @@ func (c ApiOperationTagClient) TagAssignToOperation(ctx context.Context, id Oper var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taggetbyoperation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taggetbyoperation.go index 7448f9ee27a..cbdff13a037 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taggetbyoperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taggetbyoperation.go @@ -45,7 +45,6 @@ func (c ApiOperationTagClient) TagGetByOperation(ctx context.Context, id Operati var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taglistbyoperation.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taglistbyoperation.go index f68870a2587..13096fc0729 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taglistbyoperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/method_taglistbyoperation.go @@ -41,6 +41,7 @@ func (o TagListByOperationOperationOptions) ToHeaders() *client.Headers { func (o TagListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/version.go b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/version.go index 25c3f29e1c1..7e9376209dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apioperationtag/version.go @@ -1,12 +1,10 @@ package apioperationtag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationtag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationtag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/README.md index b4146c9d28c..4a8b1c33e7b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apipolicy` Documentation -The `apipolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apipolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/client.go index 84c3dfec8c9..48a63aea96b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/client.go @@ -15,7 +15,7 @@ type ApiPolicyClient struct { } func NewApiPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apipolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apipolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_api.go index 8423eae7bd7..3313f2d60fe 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_workspaceapi.go index a7710bb2ef5..047e8a1d7a6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_createorupdate.go index eeaf614e85b..5a5f41a5a69 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) CreateOrUpdate(ctx context.Context, id ApiId, input Pol var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_delete.go index ee63586a23e..2e0bec42e46 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_get.go index c62f27cb331..215a0d6e983 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) Get(ctx context.Context, id ApiId, options GetOperation var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go index 003cadb79ce..c54d98f57f5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyCreateOrUpdate(ctx context.Context, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicydelete.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicydelete.go index f2ceb3f9e4d..0f9bc74b6ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicydelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiPolicyDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicyget.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicyget.go index 364bd7248f2..0d3c1867f7d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicyget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/method_workspaceapipolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyGet(ctx context.Context, id Workspace var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/version.go index 70f5bf96106..9d5833272ab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apipolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apipolicy/version.go @@ -1,12 +1,10 @@ package apipolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apipolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apipolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/README.md index 3e91472fbcb..8ba9c40e52f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiproduct` Documentation -The `apiproduct` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiproduct` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/client.go index e7774a6266c..657bc10d33b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/client.go @@ -15,7 +15,7 @@ type ApiProductClient struct { } func NewApiProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiproduct", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiproduct", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/id_api.go index b14e77a5f55..759adfa6c31 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/method_listbyapis.go b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/method_listbyapis.go index 9a4501fc786..a76cf16e6d4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/method_listbyapis.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/method_listbyapis.go @@ -41,6 +41,7 @@ func (o ListByApisOperationOptions) ToHeaders() *client.Headers { func (o ListByApisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/version.go index 03d5b2a63ee..ecdcda9076d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiproduct/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiproduct/version.go @@ -1,12 +1,10 @@ package apiproduct -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiproduct/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiproduct/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/README.md b/resource-manager/apimanagement/2023-05-01-preview/apirelease/README.md index 4688d1772d8..119a736471f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apirelease` Documentation -The `apirelease` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apirelease` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/client.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/client.go index 5ce0c50057f..916d3cf987c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/client.go @@ -15,7 +15,7 @@ type ApiReleaseClient struct { } func NewApiReleaseClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiReleaseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirelease", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirelease", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiReleaseClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_api.go index 8cb60bea6b5..2d5590c7064 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_apirelease.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_apirelease.go index e93d37f020b..562f3b819a0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_apirelease.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_apirelease.go @@ -48,7 +48,7 @@ func ParseApiReleaseID(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiReleaseIDInsensitively(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_release.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_release.go index 782521151d8..43c06ed85ab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_release.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_release.go @@ -46,7 +46,7 @@ func ParseReleaseID(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReleaseIDInsensitively(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_workspaceapi.go index 708a5e83416..dbd42a21510 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_createorupdate.go index 2b23b8d16a6..78ca213b93f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) CreateOrUpdate(ctx context.Context, id ReleaseId, inpu var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_delete.go index d7f28534465..ccae10babdb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_get.go index 4f45a0505aa..1c9d1797eb8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_get.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) Get(ctx context.Context, id ReleaseId) (result GetOper var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_listbyservice.go index 509f7241d4f..afff495b595 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_update.go index 1e51ca66c45..ec17ee72daa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) Update(ctx context.Context, id ReleaseId, input ApiRel var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go index 3dcd9fce3ab..80cc66eac13 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasecreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseCreateOrUpdate(ctx context.Context, var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasedelete.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasedelete.go index 0fd63c74e77..38f1f981660 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasedelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleasedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiReleaseDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseget.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseget.go index df9e7f1c4c0..f0e400e1964 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseget.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseGet(ctx context.Context, id ApiRele var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaselistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaselistbyservice.go index 578ad231c48..7e85d2a7e53 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaselistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaselistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiReleaseListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceApiReleaseListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseupdate.go index d301c6d2adc..67c933b8f86 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/method_workspaceapireleaseupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseUpdate(ctx context.Context, id ApiR var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirelease/version.go b/resource-manager/apimanagement/2023-05-01-preview/apirelease/version.go index 7f875cd3529..e85c0d9665d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirelease/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirelease/version.go @@ -1,12 +1,10 @@ package apirelease -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirelease/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirelease/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/README.md b/resource-manager/apimanagement/2023-05-01-preview/apirevision/README.md index 98cc7109af3..512f6c7ac1a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apirevision` Documentation -The `apirevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apirevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/client.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/client.go index d44402ed6ae..3751f03b558 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/client.go @@ -15,7 +15,7 @@ type ApiRevisionClient struct { } func NewApiRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_api.go index b7fe8776e72..22a2fc79643 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_workspaceapi.go index ca64dd7d7de..9b7f6a9bd41 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_listbyservice.go index 1f1a5af6d1d..e65c6ee9c3e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go index acc1134979b..499ca14fd4d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/method_workspaceapirevisionlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiRevisionListByServiceOperationOptions) ToHeaders() *client.H func (o WorkspaceApiRevisionListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apirevision/version.go b/resource-manager/apimanagement/2023-05-01-preview/apirevision/version.go index 9d11db7dd5b..d547b5de08b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apirevision/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apirevision/version.go @@ -1,12 +1,10 @@ package apirevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirevision/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/README.md b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/README.md index c83ebacba8f..d97471946f2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apisbytag` Documentation -The `apisbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apisbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/client.go b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/client.go index 034b78c6308..ed2e61ccb38 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/client.go @@ -15,7 +15,7 @@ type ApisByTagClient struct { } func NewApisByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apisbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apisbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/id_service.go index a88da291012..e67b3727900 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/method_apilistbytags.go b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/method_apilistbytags.go index 913e89cf621..98b08e4fddf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/method_apilistbytags.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/method_apilistbytags.go @@ -42,6 +42,7 @@ func (o ApiListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ApiListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/version.go b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/version.go index 54a1aa38e0b..ccfd7446a70 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apisbytag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apisbytag/version.go @@ -1,12 +1,10 @@ package apisbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apisbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apisbytag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/README.md b/resource-manager/apimanagement/2023-05-01-preview/apischema/README.md index a00df308fe4..f7a47d5a956 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apischema` Documentation -The `apischema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apischema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/client.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/client.go index fb466515328..feae3073bba 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/client.go @@ -15,7 +15,7 @@ type ApiSchemaClient struct { } func NewApiSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiSchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apischema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apischema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiSchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_api.go index 725dc89049b..4b362d874f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_apischema.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_apischema.go index af8be6866d8..52763f55ab3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_apischema.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_apischema.go @@ -46,7 +46,7 @@ func ParseApiSchemaID(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapi.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapi.go index a3b95e32e10..a72ad0a9467 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapischema.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapischema.go index 2b8ca6ceea1..bfca1e57a2f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapischema.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/id_workspaceapischema.go @@ -48,7 +48,7 @@ func ParseWorkspaceApiSchemaID(input string) (*WorkspaceApiSchemaId, error) { } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceApiSchemaIDInsensitively(input string) (*WorkspaceApiSchemaId } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_createorupdate.go index 6d09c53ad77..f602bc6fdba 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_delete.go index 1e1272fa389..cb2a09c563a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_get.go index c0bd56818fa..474b0728991 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_get.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) Get(ctx context.Context, id ApiSchemaId) (result GetOpe var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_listbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_listbyapi.go index c3cb801dfce..5cbe66a49a9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemacreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemacreateorupdate.go index 86ee733c704..1870d025fd6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemadelete.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemadelete.go index f5c12caff48..f8d52c4b601 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemadelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemadelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemaget.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemaget.go index 0e2e9ec7b07..42120431a21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemaget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemaget.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) WorkspaceApiSchemaGet(ctx context.Context, id Workspace var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemalistbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemalistbyapi.go index df9c59dfaf8..a72accff3f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemalistbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/method_workspaceapischemalistbyapi.go @@ -41,6 +41,7 @@ func (o WorkspaceApiSchemaListByApiOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiSchemaListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apischema/version.go b/resource-manager/apimanagement/2023-05-01-preview/apischema/version.go index 23217388431..c5b2a49a9cc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apischema/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apischema/version.go @@ -1,12 +1,10 @@ package apischema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apischema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apischema/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/README.md b/resource-manager/apimanagement/2023-05-01-preview/apitag/README.md index 41d23bdf251..2aa2eabea19 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apitag` Documentation -The `apitag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apitag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/client.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/client.go index 491411cb346..d6fa22e93b2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/client.go @@ -15,7 +15,7 @@ type ApiTagClient struct { } func NewApiTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/id_api.go index 584293d60e3..6041b57e3cb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/id_apitag.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/id_apitag.go index 13e9a7f8c96..e22fb5fe987 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/id_apitag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/id_apitag.go @@ -46,7 +46,7 @@ func ParseApiTagID(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiTagIDInsensitively(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_tagassigntoapi.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_tagassigntoapi.go index daa3d8e3cbb..e228f15e51c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_tagassigntoapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_tagassigntoapi.go @@ -46,7 +46,6 @@ func (c ApiTagClient) TagAssignToApi(ctx context.Context, id ApiTagId) (result T var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taggetbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taggetbyapi.go index 17951c4564a..ce827a4d294 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taggetbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taggetbyapi.go @@ -45,7 +45,6 @@ func (c ApiTagClient) TagGetByApi(ctx context.Context, id ApiTagId) (result TagG var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taglistbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taglistbyapi.go index 5c2639c91e3..26018d60d4a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taglistbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/method_taglistbyapi.go @@ -41,6 +41,7 @@ func (o TagListByApiOperationOptions) ToHeaders() *client.Headers { func (o TagListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitag/version.go b/resource-manager/apimanagement/2023-05-01-preview/apitag/version.go index 6665a354b24..8dc588df76e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitag/version.go @@ -1,12 +1,10 @@ package apitag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/README.md b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/README.md index 4ad65728dd6..6418837029f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apitagdescription` Documentation -The `apitagdescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apitagdescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/client.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/client.go index f3068aee44a..6f6a4d3fac3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/client.go @@ -15,7 +15,7 @@ type ApiTagDescriptionClient struct { } func NewApiTagDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitagdescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitagdescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_api.go index 6c8591fef9e..1111c611d79 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_tagdescription.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_tagdescription.go index 0e84945f848..441f9659ee4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_tagdescription.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/id_tagdescription.go @@ -46,7 +46,7 @@ func ParseTagDescriptionID(input string) (*TagDescriptionId, error) { } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTagDescriptionIDInsensitively(input string) (*TagDescriptionId, error) } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_createorupdate.go index 11d74115f05..2f2cf0b50a9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiTagDescriptionClient) CreateOrUpdate(ctx context.Context, id TagDescr var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_delete.go index 2ac6057d339..aa5781c0d43 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_get.go index e350b63f26f..6269b053999 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_get.go @@ -45,7 +45,6 @@ func (c ApiTagDescriptionClient) Get(ctx context.Context, id TagDescriptionId) ( var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_listbyservice.go index 6a36cd97456..ebcba919eef 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/version.go b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/version.go index 393801c5ceb..c3f3e7bbe29 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apitagdescription/version.go @@ -1,12 +1,10 @@ package apitagdescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitagdescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitagdescription/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/README.md index 8c81918db3f..904c2a75142 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiversionset` Documentation -The `apiversionset` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiversionset` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/client.go index ff0c4d18fb0..8cb546608a7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/client.go @@ -15,7 +15,7 @@ type ApiVersionSetClient struct { } func NewApiVersionSetClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_apiversionset.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_apiversionset.go index 6a1476b429c..86ec55820c7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_apiversionset.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_service.go index fe44a488d70..cf4cbee8fdb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspace.go index ffae2571e19..9f6cc276906 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspaceapiversionset.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspaceapiversionset.go index 07c056e413c..9d0db70a74e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_createorupdate.go index 2d070fcbf91..3314930a661 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) CreateOrUpdate(ctx context.Context, id ApiVersionSe var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_get.go index 7b7c728908e..6e0f1d21d9e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) Get(ctx context.Context, id ApiVersionSetId) (resul var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_listbyservice.go index 0f44e4d938d..e3cf32ef2c1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_update.go index 97fce9046f6..b8070706ca3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) Update(ctx context.Context, id ApiVersionSetId, inp var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go index 0fde6db7b9f..4e8fd2c2aa1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetCreateOrUpdate(ctx context.Co var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetget.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetget.go index 2a61095ca42..30c1f373c91 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetget.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetGet(ctx context.Context, id W var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go index e65dc1b5956..40e50bad248 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToHeaders() *client func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetupdate.go index dda3ecdb80b..2d7ebc58bf4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/method_workspaceapiversionsetupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetUpdate(ctx context.Context, i var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/version.go index 6c5b200226b..914cbd20d60 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionset/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionset/version.go @@ -1,12 +1,10 @@ package apiversionset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionset/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/client.go index e1665dd8077..2186fe19f82 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/client.go @@ -15,7 +15,7 @@ type ApiVersionSetsClient struct { } func NewApiVersionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_apiversionset.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_apiversionset.go index ef4fd9b314b..20c761485f9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_apiversionset.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_workspaceapiversionset.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_workspaceapiversionset.go index c5271af64dc..1aebdebbf6c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_apiversionsetdelete.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_apiversionsetdelete.go index 1d2948225c9..71c29c6a6d2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_apiversionsetdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_apiversionsetdelete.go @@ -35,6 +35,7 @@ func (o ApiVersionSetDeleteOperationOptions) ToHeaders() *client.Headers { func (o ApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go index bef988a2083..11216ac1eb4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/method_workspaceapiversionsetdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiVersionSetDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/version.go index 3a8a22982b6..280999131c1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiversionsets/version.go @@ -1,12 +1,10 @@ package apiversionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionsets/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/README.md b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/README.md index 463388e481e..52284106ddc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/apiwiki` Documentation -The `apiwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `apiwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/client.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/client.go index d4a7082fd98..0f9dd6aad89 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/client.go @@ -15,7 +15,7 @@ type ApiWikiClient struct { } func NewApiWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/id_api.go index 04b9460d298..63214f7ed9d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_createorupdate.go index 4004fddb029..4fa4ceb7e0c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiWikiClient) CreateOrUpdate(ctx context.Context, id ApiId, input WikiC var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_delete.go index 62f6f711cde..2a2cd9d29b8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_get.go index 35b7a3426ae..9c5fefccb49 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_get.go @@ -46,7 +46,6 @@ func (c ApiWikiClient) Get(ctx context.Context, id ApiId) (result GetOperationRe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_list.go index aee5fc272ef..bbac7402e46 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_update.go index d3c1ff6bdaf..91e9a4ca6ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiWikiClient) Update(ctx context.Context, id ApiId, input WikiUpdateCon var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/version.go b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/version.go index 3ae602ccb20..1857ad967b1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/apiwiki/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/apiwiki/version.go @@ -1,12 +1,10 @@ package apiwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiwiki/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorization/README.md index 2dc9d91c90a..eeb0c6c60e8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorization` Documentation -The `authorization` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorization` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/client.go index 5c99f0c5f29..532ad956ebf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/client.go @@ -15,7 +15,7 @@ type AuthorizationClient struct { } func NewAuthorizationClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorization", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorization", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/id_authorization.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/id_authorization.go index 17a2d80ccbb..bc1fecf80a8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/id_authorization.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_createorupdate.go index de6586fe052..40d6f21bb19 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationClient) CreateOrUpdate(ctx context.Context, id Authorizatio var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_delete.go index 9595882688b..aad52b6efb5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_get.go index b6941ad9f03..686be430460 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationClient) Get(ctx context.Context, id AuthorizationId) (resul var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorization/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorization/version.go index 58f969e1da7..e7f0e8de566 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorization/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorization/version.go @@ -1,12 +1,10 @@ package authorization -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorization/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorization/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/README.md index 842cf8b18c9..6d2aa158b21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy` Documentation -The `authorizationaccesspolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizationaccesspolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/client.go index f50cda54305..b6ea457f27c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/client.go @@ -15,7 +15,7 @@ type AuthorizationAccessPolicyClient struct { } func NewAuthorizationAccessPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationAccessPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationAccessPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_accesspolicy.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_accesspolicy.go index 958261ca120..b9ab551eb2f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_accesspolicy.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_accesspolicy.go @@ -48,7 +48,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_authorization.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_authorization.go index bbd21ac9fd0..8790b5211c4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_authorization.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_createorupdate.go index 346e394cab1..cccefbb5d19 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, id var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_delete.go index 3d067c9cc2b..de889c67dcc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_get.go index 3c903781063..77357edcc1a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationAccessPolicyClient) Get(ctx context.Context, id AccessPolic var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_listbyauthorization.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_listbyauthorization.go index 3a1d919d552..0761aece330 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_listbyauthorization.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/method_listbyauthorization.go @@ -41,6 +41,7 @@ func (o ListByAuthorizationOperationOptions) ToHeaders() *client.Headers { func (o ListByAuthorizationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/version.go index 8771d831574..eac65c79f23 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationaccesspolicy/version.go @@ -1,12 +1,10 @@ package authorizationaccesspolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationaccesspolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationaccesspolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/README.md index 59cda0de28c..b4873a0228a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode` Documentation -The `authorizationconfirmconsentcode` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizationconfirmconsentcode` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/client.go index 22e7ba30e1a..f6bc0c81714 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/client.go @@ -15,7 +15,7 @@ type AuthorizationConfirmConsentCodeClient struct { } func NewAuthorizationConfirmConsentCodeClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationConfirmConsentCodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationConfirmConsentCodeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/id_authorization.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/id_authorization.go index c49d4be720d..53244e86556 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/id_authorization.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/version.go index 4651d00532a..29129e3ac67 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationconfirmconsentcode/version.go @@ -1,12 +1,10 @@ package authorizationconfirmconsentcode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationconfirmconsentcode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationconfirmconsentcode/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/README.md index be89d929f61..585fbaf7e5c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks` Documentation -The `authorizationloginlinks` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizationloginlinks` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/client.go index 1e8c48f9d33..482627bdc0f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/client.go @@ -15,7 +15,7 @@ type AuthorizationLoginLinksClient struct { } func NewAuthorizationLoginLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationLoginLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationloginlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationloginlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationLoginLinksClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/id_authorization.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/id_authorization.go index c90b836745d..52285fb88c7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/id_authorization.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/method_post.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/method_post.go index ed7594c6f30..9bab7764034 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/method_post.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/method_post.go @@ -50,7 +50,6 @@ func (c AuthorizationLoginLinksClient) Post(ctx context.Context, id Authorizatio var model AuthorizationLoginResponseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/version.go index ea56cdc8a55..297ba61c1ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationloginlinks/version.go @@ -1,12 +1,10 @@ package authorizationloginlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationloginlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationloginlinks/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/README.md index b73b4a39f49..13ff2bfa995 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider` Documentation -The `authorizationprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizationprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/client.go index c3670048321..43ff7f92782 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/client.go @@ -15,7 +15,7 @@ type AuthorizationProviderClient struct { } func NewAuthorizationProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_authorizationprovider.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_authorizationprovider.go index 5b377135192..0c60cfd394d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_service.go index 98813175218..1a73088603f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_createorupdate.go index f516f5c677f..f3af9a4cbb1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, id Auth var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_delete.go index 0c0c82a4e01..ff582aa785c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_get.go index 27f68eef690..f92b6ccd418 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationProviderClient) Get(ctx context.Context, id AuthorizationPr var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_listbyservice.go index 8e28a4d589e..2c69a441089 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/version.go index 7930eed828d..1986ee65d5d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationprovider/version.go @@ -1,12 +1,10 @@ package authorizationprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationprovider/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizations/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizations/README.md index 220698458a4..a9620f71ae3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizations/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizations/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizations/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizations/id_authorizationprovider.go b/resource-manager/apimanagement/2023-05-01-preview/authorizations/id_authorizationprovider.go index ec0427a96f6..b5c11dc2d82 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizations/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizations/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go b/resource-manager/apimanagement/2023-05-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go index 61659c7182f..b2910e09318 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizations/method_authorizationlistbyauthorizationprovider.go @@ -41,6 +41,7 @@ func (o AuthorizationListByAuthorizationProviderOperationOptions) ToHeaders() *c func (o AuthorizationListByAuthorizationProviderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizations/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizations/version.go index 431fd1290bc..1ed74f208a8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizations/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/README.md b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/README.md index 0a28f40a9d9..50433357af5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/authorizationserver` Documentation -The `authorizationserver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `authorizationserver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/client.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/client.go index a234058adb1..1704ea21dd3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/client.go @@ -15,7 +15,7 @@ type AuthorizationServerClient struct { } func NewAuthorizationServerClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationServerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationserver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationserver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationServerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_authorizationserver.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_authorizationserver.go index d501746a896..e2ff82e6771 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_authorizationserver.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_authorizationserver.go @@ -44,7 +44,7 @@ func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error) { } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServer } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_service.go index 16870e5f263..ef09a35c182 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_createorupdate.go index ef58fe9a05f..4e499b27763 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationServerClient) CreateOrUpdate(ctx context.Context, id Author var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_delete.go index a307aa17d3f..2bb46f4501a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_get.go index 8d4a7463981..54e8b811bca 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationServerClient) Get(ctx context.Context, id AuthorizationServ var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listbyservice.go index ae4ad390656..7c174cf8685 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listsecrets.go index 58b62cc36bf..e4bcb668d70 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_listsecrets.go @@ -46,7 +46,6 @@ func (c AuthorizationServerClient) ListSecrets(ctx context.Context, id Authoriza var model AuthorizationServerSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_update.go index 686f7550e4d..f16ebce0af3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AuthorizationServerClient) Update(ctx context.Context, id AuthorizationS var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/version.go b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/version.go index bbcefb40fbb..c43b597ed70 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/authorizationserver/version.go @@ -1,12 +1,10 @@ package authorizationserver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationserver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationserver/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/README.md b/resource-manager/apimanagement/2023-05-01-preview/backend/README.md index 40568a0d9d5..3677b4b9358 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/backend` Documentation -The `backend` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `backend` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/client.go b/resource-manager/apimanagement/2023-05-01-preview/backend/client.go index 8cf9c601f15..0752289445b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/client.go @@ -15,7 +15,7 @@ type BackendClient struct { } func NewBackendClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/id_backend.go b/resource-manager/apimanagement/2023-05-01-preview/backend/id_backend.go index d59958e9b68..7540b370263 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/id_backend.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/backend/id_service.go index afe0eb62f7f..f827f9d35f4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/backend/method_createorupdate.go index 876a39e1fb9..d957d53a6f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BackendClient) CreateOrUpdate(ctx context.Context, id BackendId, input B var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/backend/method_delete.go index f71fa94d865..46366e437b1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/backend/method_get.go index cc3aa998b93..77da1fa7415 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/method_get.go @@ -45,7 +45,6 @@ func (c BackendClient) Get(ctx context.Context, id BackendId) (result GetOperati var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/backend/method_listbyservice.go index f8c5b6daf2a..b0a6f007cc2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/backend/method_update.go index 3c102cf0e80..80258a36e8d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c BackendClient) Update(ctx context.Context, id BackendId, input BackendUp var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backend/version.go b/resource-manager/apimanagement/2023-05-01-preview/backend/version.go index 0f5ee3585fd..d1d51a26cd9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backend/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backend/version.go @@ -1,12 +1,10 @@ package backend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backend/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/README.md b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/README.md index 38d02f16415..aa224e18519 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/backendreconnect` Documentation -The `backendreconnect` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `backendreconnect` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/client.go b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/client.go index e7931af1711..229aed9d409 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/client.go @@ -15,7 +15,7 @@ type BackendReconnectClient struct { } func NewBackendReconnectClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendReconnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backendreconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backendreconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendReconnectClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/id_backend.go b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/id_backend.go index 8099482517f..df64bd9a745 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/id_backend.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/version.go b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/version.go index a1dfd01049d..8e538bdefd1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/backendreconnect/version.go @@ -1,12 +1,10 @@ package backendreconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backendreconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backendreconnect/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/README.md b/resource-manager/apimanagement/2023-05-01-preview/cache/README.md index e8e0c227b9c..ade562bc266 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/cache` Documentation -The `cache` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `cache` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/client.go b/resource-manager/apimanagement/2023-05-01-preview/cache/client.go index e0befe22fa3..ab451fc4ea5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/client.go @@ -15,7 +15,7 @@ type CacheClient struct { } func NewCacheClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cache", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cache", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/id_cache.go b/resource-manager/apimanagement/2023-05-01-preview/cache/id_cache.go index 8260234796a..22061eee597 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/id_cache.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/id_cache.go @@ -44,7 +44,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/cache/id_service.go index bf4f26d8b36..947e2876f0e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/cache/method_createorupdate.go index 26ef5edfcc7..197b76786bc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CacheClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/cache/method_delete.go index 511791374c6..55b4280d97d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/cache/method_get.go index 10fd3d603ea..1bb437d248d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/method_get.go @@ -45,7 +45,6 @@ func (c CacheClient) Get(ctx context.Context, id CacheId) (result GetOperationRe var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/cache/method_listbyservice.go index 29189620638..99ac16add79 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/cache/method_update.go index 9388cab550d..f70e4710f73 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CacheClient) Update(ctx context.Context, id CacheId, input CacheUpdatePa var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/cache/version.go b/resource-manager/apimanagement/2023-05-01-preview/cache/version.go index 9e51ea0b3f1..084e53962a0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/cache/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/cache/version.go @@ -1,12 +1,10 @@ package cache -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cache/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cache/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/README.md b/resource-manager/apimanagement/2023-05-01-preview/certificate/README.md index 58462386a95..7d5e3a341f2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `certificate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/client.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/id_certificate.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/id_certificate.go index 8617e21ad2a..42e2e50f70c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/id_certificate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/id_service.go index 75f9ac3b04b..461f53f3c34 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_createorupdate.go index 823d71d3e64..15e1df590a3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_delete.go index 6c0ded0942d..85948d80764 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_get.go index 884851fd83b..e04e8cfae98 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_listbyservice.go index 9f45a52fd7c..63e1c8507b6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_refreshsecret.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_refreshsecret.go index d764ec89d26..02667d79db1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/method_refreshsecret.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/method_refreshsecret.go @@ -46,7 +46,6 @@ func (c CertificateClient) RefreshSecret(ctx context.Context, id CertificateId) var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/certificate/version.go b/resource-manager/apimanagement/2023-05-01-preview/certificate/version.go index e5319bcbcda..361f3e93a0c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/certificate/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/README.md b/resource-manager/apimanagement/2023-05-01-preview/contenttype/README.md index 6061cddee40..bfc0e320481 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/contenttype` Documentation -The `contenttype` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `contenttype` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/client.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/client.go index 86436fb159e..9dd4b452dda 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/client.go @@ -15,7 +15,7 @@ type ContentTypeClient struct { } func NewContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_contenttype.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_contenttype.go index 35dbd65c28b..580bdfbbbfa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_contenttype.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_service.go index 1241f699f16..cdc854578dd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_createorupdate.go index d1a48e0857c..b51b4a363eb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeClient) CreateOrUpdate(ctx context.Context, id ContentTypeId, var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_delete.go index d3dc044bf5c..ff7bd7bd5d9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_get.go index 059c81af9e8..7f4ca66a7df 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/method_get.go @@ -45,7 +45,6 @@ func (c ContentTypeClient) Get(ctx context.Context, id ContentTypeId) (result Ge var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttype/version.go b/resource-manager/apimanagement/2023-05-01-preview/contenttype/version.go index 0551b24b510..a5e9bc37573 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttype/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttype/version.go @@ -1,12 +1,10 @@ package contenttype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttype/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/README.md b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/README.md index e774b645e7f..22bd2427bb7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem` Documentation -The `contenttypecontentitem` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `contenttypecontentitem` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/client.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/client.go index 81fef8be029..25caa5484f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/client.go @@ -15,7 +15,7 @@ type ContentTypeContentItemClient struct { } func NewContentTypeContentItemClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeContentItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttypecontentitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttypecontentitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeContentItemClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contentitem.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contentitem.go index b304e9fdf2b..add13b6f1fb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contentitem.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contentitem.go @@ -46,7 +46,7 @@ func ParseContentItemID(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContentItemIDInsensitively(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contenttype.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contenttype.go index 576b6390d40..437d185ec27 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contenttype.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go index c23ccc2fcb2..0509fce5cd7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemcreateorupdate.go @@ -36,6 +36,7 @@ func (o ContentItemCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o ContentItemCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeContentItemClient) ContentItemCreateOrUpdate(ctx context.Cont var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemdelete.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemdelete.go index ae0888ce9e8..bfb0570356b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemdelete.go @@ -35,6 +35,7 @@ func (o ContentItemDeleteOperationOptions) ToHeaders() *client.Headers { func (o ContentItemDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemget.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemget.go index 41ca4d59a44..025cff6645e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/method_contentitemget.go @@ -45,7 +45,6 @@ func (c ContentTypeContentItemClient) ContentItemGet(ctx context.Context, id Con var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/version.go b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/version.go index 9dd7d66ae87..410ff44e090 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/contenttypecontentitem/version.go @@ -1,12 +1,10 @@ package contenttypecontentitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttypecontentitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttypecontentitem/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/README.md b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/README.md index e58f518166e..5cffe213b07 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/delegationsettings` Documentation -The `delegationsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `delegationsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/client.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/client.go index 975a55a7a10..6d65fe2f5ec 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/client.go @@ -15,7 +15,7 @@ type DelegationSettingsClient struct { } func NewDelegationSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DelegationSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delegationsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delegationsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DelegationSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/id_service.go index c3aca641d8f..c0226a556f8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_createorupdate.go index 194af96a592..d36a1f34df6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DelegationSettingsClient) CreateOrUpdate(ctx context.Context, id Service var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_get.go index db02f9407db..3df4abb7ec7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_get.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) Get(ctx context.Context, id ServiceId) (result var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_listsecrets.go index 50ee5bed1bd..e4b72cd79d6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) ListSecrets(ctx context.Context, id ServiceId) var model PortalSettingValidationKeyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_update.go index c010e8ee865..9ef22bac0a1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/version.go b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/version.go index 912d1c6d205..a38dbbbc0ec 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/delegationsettings/version.go @@ -1,12 +1,10 @@ package delegationsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delegationsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delegationsettings/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/README.md b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/README.md index 5d248459a0b..82d1fb248ef 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/deletedservice` Documentation -The `deletedservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `deletedservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/client.go b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/client.go index 7ce116a7259..27367714830 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/client.go @@ -15,7 +15,7 @@ type DeletedServiceClient struct { } func NewDeletedServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/id_deletedservice.go b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/id_deletedservice.go index d4f9feb3f31..9b447f5fd24 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/id_deletedservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/id_deletedservice.go @@ -42,7 +42,7 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/method_getbyname.go b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/method_getbyname.go index f7fef324399..3e180be780a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/method_getbyname.go +++ b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/method_getbyname.go @@ -45,7 +45,6 @@ func (c DeletedServiceClient) GetByName(ctx context.Context, id DeletedServiceId var model DeletedServiceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/version.go b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/version.go index 522e93ae233..057b7f991bb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/deletedservice/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/deletedservice/version.go @@ -1,12 +1,10 @@ package deletedservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservice/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/README.md b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/README.md index 04da544eadd..383dc2f19cb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/diagnostic` Documentation -The `diagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `diagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/client.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/client.go index d7b4ed69319..6b71958f5b6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/client.go @@ -15,7 +15,7 @@ type DiagnosticClient struct { } func NewDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_diagnostic.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_diagnostic.go index 890a40a3e9c..4e521a300da 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_diagnostic.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_service.go index ce1adfde374..5ebeb4ccb23 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_createorupdate.go index 63709e2900a..18a4c536cb5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DiagnosticClient) CreateOrUpdate(ctx context.Context, id DiagnosticId, i var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_delete.go index 4f5b2bc7d55..1e9acda8c14 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_get.go index af2a7f7943a..3ae72b09a0f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticClient) Get(ctx context.Context, id DiagnosticId) (result GetO var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_listbyservice.go index 8f84fb8b874..bf7e8ad966a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_update.go index a98dfa6617c..6e25bf0e1d7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DiagnosticClient) Update(ctx context.Context, id DiagnosticId, input Dia var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/version.go b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/version.go index bd844d9e46f..b574a20a181 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/diagnostic/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/diagnostic/version.go @@ -1,12 +1,10 @@ package diagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostic/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/README.md b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/README.md index f26b222ff08..87ef70e86e6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/documentationresource` Documentation -The `documentationresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `documentationresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/client.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/client.go index 84d6809b879..7366c4f9e12 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/client.go @@ -15,7 +15,7 @@ type DocumentationResourceClient struct { } func NewDocumentationResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*DocumentationResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "documentationresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "documentationresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DocumentationResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_documentation.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_documentation.go index 6841fc7c512..0bb03b62932 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_documentation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_documentation.go @@ -44,7 +44,7 @@ func ParseDocumentationID(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDocumentationIDInsensitively(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_service.go index a25669a238f..d37f7661269 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_createorupdate.go index dba91b12734..e091e7fa55d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DocumentationResourceClient) CreateOrUpdate(ctx context.Context, id Docu var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_delete.go index dc215c80397..b7e63199308 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_get.go index db62fe89422..59fe05e032d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_get.go @@ -45,7 +45,6 @@ func (c DocumentationResourceClient) Get(ctx context.Context, id DocumentationId var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_listbyservice.go index fd2023ee4d1..2b64e6d607e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_update.go index 74fdf96af9a..a7b4e15a22a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DocumentationResourceClient) Update(ctx context.Context, id Documentatio var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/version.go b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/version.go index 92914814e43..b3b857ebd6b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/documentationresource/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/documentationresource/version.go @@ -1,12 +1,10 @@ package documentationresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/documentationresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/documentationresource/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/README.md b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/README.md index 9cd331a73dc..985d936b00e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/emailtemplate` Documentation -The `emailtemplate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `emailtemplate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/client.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/client.go index 019165ffa63..578f2718f75 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/client.go @@ -15,7 +15,7 @@ type EmailTemplateClient struct { } func NewEmailTemplateClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/id_service.go index ad519c3023d..962040358d4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/method_listbyservice.go index c18ee603b17..7a86e93494c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/version.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/version.go index db6d54ba556..90ac3fa5d4a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplate/version.go @@ -1,12 +1,10 @@ package emailtemplate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplate/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/README.md b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/README.md index ed867085c04..c6352422250 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/emailtemplates` Documentation -The `emailtemplates` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `emailtemplates` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/client.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/client.go index 9f3bc8ed59b..d38533bf55a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/client.go @@ -15,7 +15,7 @@ type EmailTemplatesClient struct { } func NewEmailTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplatesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/id_template.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/id_template.go index b10f4a91dd1..cb83e661d9e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/id_template.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/id_template.go @@ -44,7 +44,7 @@ func ParseTemplateID(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTemplateIDInsensitively(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go index 8f48b83acfd..7f48ae7cdbc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatecreateorupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o EmailTemplateCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c EmailTemplatesClient) EmailTemplateCreateOrUpdate(ctx context.Context, i var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatedelete.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatedelete.go index 3bea1260006..82ce5a37244 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatedelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplatedelete.go @@ -35,6 +35,7 @@ func (o EmailTemplateDeleteOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateget.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateget.go index b9686668bf3..fcf8c3babdc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateget.go @@ -45,7 +45,6 @@ func (c EmailTemplatesClient) EmailTemplateGet(ctx context.Context, id TemplateI var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateupdate.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateupdate.go index 6870b6a5cc8..c1ac2c80e3f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/method_emailtemplateupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateUpdateOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c EmailTemplatesClient) EmailTemplateUpdate(ctx context.Context, id Templa var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/version.go b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/version.go index 00c2550845c..32a9a094521 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/emailtemplates/version.go @@ -1,12 +1,10 @@ package emailtemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplates/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/README.md b/resource-manager/apimanagement/2023-05-01-preview/gateway/README.md index aaf470cb911..3dadd72587d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gateway` Documentation -The `gateway` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gateway` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/client.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/client.go index 0d22b6f29bb..4b9a1263246 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/client.go @@ -15,7 +15,7 @@ type GatewayClient struct { } func NewGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/id_gateway.go index 350bafc55eb..efbf44f2ef1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/id_service.go index dbfd6735feb..fe3c9d96488 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_createorupdate.go index d73cce62328..4116eea8b19 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayClient) CreateOrUpdate(ctx context.Context, id GatewayId, input G var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_delete.go index a3e76d4da96..cfd3d12845f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_get.go index 3ddf01031fd..24f881c912f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_get.go @@ -45,7 +45,6 @@ func (c GatewayClient) Get(ctx context.Context, id GatewayId) (result GetOperati var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_listbyservice.go index 182f1a1be3b..193ebcb3f47 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_update.go index 2113086018c..fa00c7b0345 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GatewayClient) Update(ctx context.Context, id GatewayId, input GatewayCo var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gateway/version.go b/resource-manager/apimanagement/2023-05-01-preview/gateway/version.go index 0975caa24fc..5834a16ad69 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gateway/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gateway/version.go @@ -1,12 +1,10 @@ package gateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gateway/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/README.md index 419925665ae..f0d8c52660e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewayapi` Documentation -The `gatewayapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewayapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/client.go index 6f88d7098fd..41d09ed34cd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/client.go @@ -15,7 +15,7 @@ type GatewayApiClient struct { } func NewGatewayApiClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gateway.go index b2a134eea2f..4203aeb8629 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gatewayapi.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gatewayapi.go index 1780b205bde..3f2c6b9bb02 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gatewayapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/id_gatewayapi.go @@ -46,7 +46,7 @@ func ParseGatewayApiID(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_createorupdate.go index 5af86c5ab69..a17c2009dc7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GatewayApiClient) CreateOrUpdate(ctx context.Context, id GatewayApiId, i var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_listbyservice.go index 0babf1b2093..38dc86de4e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/version.go index 40568bf5d2a..4be19ae90e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayapi/version.go @@ -1,12 +1,10 @@ package gatewayapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayapi/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/README.md index ce7f71d54d1..e824cc26279 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority` Documentation -The `gatewaycertificateauthority` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewaycertificateauthority` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/client.go index 82e3bc25dd6..e2177530edd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/client.go @@ -15,7 +15,7 @@ type GatewayCertificateAuthorityClient struct { } func NewGatewayCertificateAuthorityClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayCertificateAuthorityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayCertificateAuthorityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_certificateauthority.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_certificateauthority.go index 1d7f6784836..f75937cbd0a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_certificateauthority.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_certificateauthority.go @@ -46,7 +46,7 @@ func ParseCertificateAuthorityID(input string) (*CertificateAuthorityId, error) } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCertificateAuthorityIDInsensitively(input string) (*CertificateAuthori } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_gateway.go index d3a20376e39..858de5997f3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_createorupdate.go index 421099fff39..70b2eddae89 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayCertificateAuthorityClient) CreateOrUpdate(ctx context.Context, i var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_delete.go index a6b9d901d6b..677ee184d41 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_get.go index 2a8a3c51cfd..3e558c2cc6a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_get.go @@ -45,7 +45,6 @@ func (c GatewayCertificateAuthorityClient) Get(ctx context.Context, id Certifica var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_listbyservice.go index c1b242e9166..93075c633f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/version.go index a93c79291ab..b4cf1c45dd3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaycertificateauthority/version.go @@ -1,12 +1,10 @@ package gatewaycertificateauthority -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaycertificateauthority/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaycertificateauthority/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/README.md index e8aaccbc04c..6a315f7c930 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken` Documentation -The `gatewaygeneratetoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewaygeneratetoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/client.go index ea0ee9040c7..95794c5f810 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/client.go @@ -15,7 +15,7 @@ type GatewayGenerateTokenClient struct { } func NewGatewayGenerateTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayGenerateTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayGenerateTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/id_gateway.go index 787aea2af5b..941bccb3007 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go index 7b0e8529654..99077ba9533 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/method_gatewaygeneratetoken.go @@ -50,7 +50,6 @@ func (c GatewayGenerateTokenClient) GatewayGenerateToken(ctx context.Context, id var model GatewayTokenContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/version.go index 6cb6bed7e3f..c3ad576582f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaygeneratetoken/version.go @@ -1,12 +1,10 @@ package gatewaygeneratetoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaygeneratetoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaygeneratetoken/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/README.md index 83f7018fdff..10f005894fe 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration` Documentation -The `gatewayhostnameconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewayhostnameconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/client.go index caf1c71d205..abf6519743b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/client.go @@ -15,7 +15,7 @@ type GatewayHostnameConfigurationClient struct { } func NewGatewayHostnameConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayHostnameConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayHostnameConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_gateway.go index 7864dddfacb..0987213e9cf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go index 510bff297ac..23c006e4969 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/id_hostnameconfiguration.go @@ -46,7 +46,7 @@ func ParseHostnameConfigurationID(input string) (*HostnameConfigurationId, error } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHostnameConfigurationIDInsensitively(input string) (*HostnameConfigura } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_createorupdate.go index 81fc99af124..c47366added 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayHostnameConfigurationClient) CreateOrUpdate(ctx context.Context, var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_delete.go index 0964c8fdc78..609e8369ace 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_get.go index d04e4ef66d0..8a74f63cf02 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c GatewayHostnameConfigurationClient) Get(ctx context.Context, id Hostname var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_listbyservice.go index 619bbf3fcd1..fde20e31a6c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/version.go index dabea92ee95..289c2f110dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayhostnameconfiguration/version.go @@ -1,12 +1,10 @@ package gatewayhostnameconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayhostnameconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayhostnameconfiguration/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/client.go index 4c95799c9a3..1249e0fe43c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayInvalidateDebugCredentialsClient struct { } func NewGatewayInvalidateDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayInvalidateDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayInvalidateDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go index c2d59d6f7af..48e02b5692d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/version.go index 1b45564715e..7ebd891a5e3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayinvalidatedebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewayinvalidatedebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/README.md index 44cd535ce3b..80ba791a5f2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials` Documentation -The `gatewaylistdebugcredentials` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewaylistdebugcredentials` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/client.go index 6c497072ede..3c619a17e21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayListDebugCredentialsClient struct { } func NewGatewayListDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/id_gateway.go index acbba273523..ab492805d02 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go index 051f23acd41..201455ffc76 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go @@ -50,7 +50,6 @@ func (c GatewayListDebugCredentialsClient) GatewayListDebugCredentials(ctx conte var model GatewayDebugCredentialsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/version.go index 1ffc0560b63..7217b4497e5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistdebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewaylistdebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistdebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistdebugcredentials/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/README.md index 0c56bcee8e0..107c28dcfc9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys` Documentation -The `gatewaylistkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewaylistkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/client.go index a9b08e9562a..a54653f751f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/client.go @@ -15,7 +15,7 @@ type GatewayListKeysClient struct { } func NewGatewayListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/id_gateway.go index 9d53f351731..a6e34ce730a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/method_gatewaylistkeys.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/method_gatewaylistkeys.go index 902dad2ac34..d68ec89a5d7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/method_gatewaylistkeys.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/method_gatewaylistkeys.go @@ -46,7 +46,6 @@ func (c GatewayListKeysClient) GatewayListKeys(ctx context.Context, id GatewayId var model GatewayKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/version.go index 33fc2fd1de0..b7821d84e95 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylistkeys/version.go @@ -1,12 +1,10 @@ package gatewaylistkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistkeys/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/README.md index 9cd2fe4ff64..1372d3122df 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace` Documentation -The `gatewaylisttrace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewaylisttrace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/client.go index f61a6ad2928..e4944d1b2a9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/client.go @@ -15,7 +15,7 @@ type GatewayListTraceClient struct { } func NewGatewayListTraceClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListTraceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylisttrace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylisttrace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListTraceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/id_gateway.go index 99faa7b3e70..bb630bab4fc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/method_gatewaylisttrace.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/method_gatewaylisttrace.go index af40b00889b..fb5df17b3e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/method_gatewaylisttrace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/method_gatewaylisttrace.go @@ -50,7 +50,6 @@ func (c GatewayListTraceClient) GatewayListTrace(ctx context.Context, id Gateway var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/version.go index 0fcc53d60d6..0d22efe0e97 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewaylisttrace/version.go @@ -1,12 +1,10 @@ package gatewaylisttrace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylisttrace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylisttrace/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/README.md b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/README.md index 7adaf7f4892..99a07ae3136 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey` Documentation -The `gatewayregeneratekey` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `gatewayregeneratekey` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/client.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/client.go index aef06aab007..2770f325934 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/client.go @@ -15,7 +15,7 @@ type GatewayRegenerateKeyClient struct { } func NewGatewayRegenerateKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayRegenerateKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayRegenerateKeyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/id_gateway.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/id_gateway.go index c8c620bc777..73626ffbe42 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/id_gateway.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/version.go b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/version.go index 07115d2fe39..7c56b738532 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/gatewayregeneratekey/version.go @@ -1,12 +1,10 @@ package gatewayregeneratekey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayregeneratekey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayregeneratekey/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/README.md b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/README.md index 46d23d66d0a..2600a29c9a7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver` Documentation -The `graphqlapiresolver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `graphqlapiresolver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/client.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/client.go index ae9f7510594..b3ebac8625f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverClient struct { } func NewGraphQLApiResolverClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_api.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_api.go index 3f2483494f0..23aa990c8b9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_api.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_resolver.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_resolver.go index 3ff37f45676..adda4626050 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_resolver.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_createorupdate.go index 7860204fd3c..fde71d2c4d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverClient) CreateOrUpdate(ctx context.Context, id Resolve var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_delete.go index 914915dc4d6..1c1c2965313 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_get.go index 8090c144df8..7209e49cd71 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_get.go @@ -45,7 +45,6 @@ func (c GraphQLApiResolverClient) Get(ctx context.Context, id ResolverId) (resul var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_listbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_listbyapi.go index 5ce194fb6df..3631d4d14b3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_update.go index 3fa45e6fa93..91e1176b64b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GraphQLApiResolverClient) Update(ctx context.Context, id ResolverId, inp var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/version.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/version.go index 327b0d8b6bf..95c77aeabe2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolver/version.go @@ -1,12 +1,10 @@ package graphqlapiresolver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolver/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/README.md index 0c07c27c334..effdc9daee9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy` Documentation -The `graphqlapiresolverpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `graphqlapiresolverpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/client.go index 28db0b0bef5..4f9c0d8efbd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverPolicyClient struct { } func NewGraphQLApiResolverPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/id_resolver.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/id_resolver.go index 84768e215d7..db5373379f0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/id_resolver.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_createorupdate.go index c349e81087a..0ba357fe731 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverPolicyClient) CreateOrUpdate(ctx context.Context, id R var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_delete.go index 619ea1f6171..0cd91cb1b2e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_get.go index 4e49bd17793..5299c3d59cf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GraphQLApiResolverPolicyClient) Get(ctx context.Context, id ResolverId, var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/version.go index d1dd833db95..2ab8e0483cb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/graphqlapiresolverpolicy/version.go @@ -1,12 +1,10 @@ package graphqlapiresolverpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolverpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolverpolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/README.md b/resource-manager/apimanagement/2023-05-01-preview/group/README.md index baf0ed70621..c93e14958a4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/group/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/group` Documentation -The `group` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `group` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/client.go b/resource-manager/apimanagement/2023-05-01-preview/group/client.go index 0301e35f4e8..d2ad0ba440e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/client.go @@ -15,7 +15,7 @@ type GroupClient struct { } func NewGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "group", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "group", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/id_group.go b/resource-manager/apimanagement/2023-05-01-preview/group/id_group.go index 033b00db2ff..d509f57a395 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/id_group.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/group/id_service.go index b997cba49d0..8218c363385 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/group/id_workspace.go index 2a31e848c5a..b208717db85 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/id_workspacegroup.go b/resource-manager/apimanagement/2023-05-01-preview/group/id_workspacegroup.go index d95eae81434..dda9bd40fc1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/id_workspacegroup.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_createorupdate.go index e8b639dbe8b..563de8537b1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) CreateOrUpdate(ctx context.Context, id GroupId, input Group var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_delete.go index b7358fde533..47829929156 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_get.go index 71da80e4425..63a857ba29a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_get.go @@ -45,7 +45,6 @@ func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationRe var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_listbyservice.go index 4f8da96ef4a..e7c287794fb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_update.go index 70066730bb1..cea5374d418 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) Update(ctx context.Context, id GroupId, input GroupUpdatePa var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupcreateorupdate.go index 5ad40a08c47..b43d3bcaa03 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) WorkspaceGroupCreateOrUpdate(ctx context.Context, id Worksp var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupdelete.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupdelete.go index 949a8cb1846..f471d58942e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGroupDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupget.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupget.go index 88a4fa8e56b..b729c88a662 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupget.go @@ -45,7 +45,6 @@ func (c GroupClient) WorkspaceGroupGet(ctx context.Context, id WorkspaceGroupId) var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegrouplistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegrouplistbyservice.go index 2aa11bf1959..71073410fa5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegrouplistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegrouplistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupListByServiceOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGroupListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupupdate.go b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupupdate.go index 6e246635560..8c7f865f39f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/method_workspacegroupupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) WorkspaceGroupUpdate(ctx context.Context, id WorkspaceGroup var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/group/version.go b/resource-manager/apimanagement/2023-05-01-preview/group/version.go index 874e26d0879..569b0ecb98e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/group/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/group/version.go @@ -1,12 +1,10 @@ package group -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/group/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/group/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/README.md b/resource-manager/apimanagement/2023-05-01-preview/groupuser/README.md index 94babaeb79a..e3613a7cc35 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/groupuser` Documentation -The `groupuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `groupuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/client.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/client.go index 7a2d9304c73..0883ae96e68 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/client.go @@ -15,7 +15,7 @@ type GroupUserClient struct { } func NewGroupUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_group.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_group.go index 1cacd14ecf9..3c0f4c0569f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_group.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_groupuser.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_groupuser.go index 57de3d320e8..e6aa7e8ae21 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_groupuser.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_groupuser.go @@ -46,7 +46,7 @@ func ParseGroupUserID(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroup.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroup.go index 6c67d5dd6e0..63caa50ce9f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroup.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroupuser.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroupuser.go index fd00ae51ba3..cf1edbb928f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroupuser.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/id_workspacegroupuser.go @@ -48,7 +48,7 @@ func ParseWorkspaceGroupUserID(input string) (*WorkspaceGroupUserId, error) { } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceGroupUserIDInsensitively(input string) (*WorkspaceGroupUserId } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_create.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_create.go index 6dc8112254d..fd3d625df67 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_create.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_create.go @@ -46,7 +46,6 @@ func (c GroupUserClient) Create(ctx context.Context, id GroupUserId) (result Cre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_list.go index b2f4d682063..002cd3d1fbf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupusercreate.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupusercreate.go index dd73551832d..f7a9de38eab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupusercreate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupusercreate.go @@ -46,7 +46,6 @@ func (c GroupUserClient) WorkspaceGroupUserCreate(ctx context.Context, id Worksp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupuserlist.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupuserlist.go index c4e2a527039..47776aadfd4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupuserlist.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/method_workspacegroupuserlist.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupUserListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUserListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/groupuser/version.go b/resource-manager/apimanagement/2023-05-01-preview/groupuser/version.go index 088f8332319..b3f3b0159de 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/groupuser/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/groupuser/version.go @@ -1,12 +1,10 @@ package groupuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupuser/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/README.md b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/README.md index c87a18acb2a..208ab0b42cd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/identityprovider` Documentation -The `identityprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `identityprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/client.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/client.go index ba2ed8bbee1..f9a62f0de7c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/client.go @@ -15,7 +15,7 @@ type IdentityProviderClient struct { } func NewIdentityProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*IdentityProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "identityprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "identityprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IdentityProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_identityprovider.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_identityprovider.go index 3d474aaec02..2def4ce6e59 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_identityprovider.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_identityprovider.go @@ -44,7 +44,7 @@ func ParseIdentityProviderID(input string) (*IdentityProviderId, error) { } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIdentityProviderIDInsensitively(input string) (*IdentityProviderId, er } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_service.go index 8276034f3e7..d2022417e8e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_createorupdate.go index 834adf0fae9..b42e0767573 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c IdentityProviderClient) CreateOrUpdate(ctx context.Context, id IdentityP var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_delete.go index 825d432de2b..eabfcbc6daa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_get.go index a7550d92bb0..2328ee95ee7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_get.go @@ -45,7 +45,6 @@ func (c IdentityProviderClient) Get(ctx context.Context, id IdentityProviderId) var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_listsecrets.go index 284d5e3aa2b..0f370b89eaf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c IdentityProviderClient) ListSecrets(ctx context.Context, id IdentityProv var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_update.go index ac8db539b33..92a7c2f8818 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c IdentityProviderClient) Update(ctx context.Context, id IdentityProviderI var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/version.go b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/version.go index 05aca5bc010..3e41793bb63 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/identityprovider/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/identityprovider/version.go @@ -1,12 +1,10 @@ package identityprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/identityprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/identityprovider/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/README.md b/resource-manager/apimanagement/2023-05-01-preview/issue/README.md index eda2c1ae0bf..29f341ea0fa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/issue` Documentation -The `issue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `issue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/client.go b/resource-manager/apimanagement/2023-05-01-preview/issue/client.go index cb06d0ebaca..e2e870934db 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/client.go @@ -15,7 +15,7 @@ type IssueClient struct { } func NewIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*IssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "issue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "issue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/id_issue.go b/resource-manager/apimanagement/2023-05-01-preview/issue/id_issue.go index 45eb9485335..401c80ae524 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/id_issue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/id_issue.go @@ -44,7 +44,7 @@ func ParseIssueID(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIssueIDInsensitively(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/issue/id_service.go index 88e8a90de0c..4b3d26c86cb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/issue/method_get.go index 69cfbc200fa..791db4dd8c3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/method_get.go @@ -45,7 +45,6 @@ func (c IssueClient) Get(ctx context.Context, id IssueId) (result GetOperationRe var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/issue/method_listbyservice.go index bdf1aa92398..743f676c948 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/issue/version.go b/resource-manager/apimanagement/2023-05-01-preview/issue/version.go index 9384adcc010..0a482fa1268 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/issue/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/issue/version.go @@ -1,12 +1,10 @@ package issue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/issue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/issue/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/README.md b/resource-manager/apimanagement/2023-05-01-preview/logger/README.md index f41dbfaefa3..5770fb6e8cf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/logger` Documentation -The `logger` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `logger` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/client.go b/resource-manager/apimanagement/2023-05-01-preview/logger/client.go index c7b58012a84..2ecf8e82720 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/client.go @@ -15,7 +15,7 @@ type LoggerClient struct { } func NewLoggerClientWithBaseURI(sdkApi sdkEnv.Api) (*LoggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoggerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/id_logger.go b/resource-manager/apimanagement/2023-05-01-preview/logger/id_logger.go index ebf285cefca..cb5c5cca792 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/id_logger.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/id_logger.go @@ -44,7 +44,7 @@ func ParseLoggerID(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoggerIDInsensitively(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/logger/id_service.go index e5a5d44be9e..e47928df93b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/logger/method_createorupdate.go index b1a476b3cf9..3430cb9dd77 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c LoggerClient) CreateOrUpdate(ctx context.Context, id LoggerId, input Log var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/logger/method_delete.go index d1edc7304d6..3465b8ec829 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/logger/method_get.go index dd5216620ea..7a6f1ba10d6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/method_get.go @@ -45,7 +45,6 @@ func (c LoggerClient) Get(ctx context.Context, id LoggerId) (result GetOperation var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/logger/method_listbyservice.go index 3765ffa1f12..d930656f267 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/logger/method_update.go index e7491dd03c2..66980330556 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LoggerClient) Update(ctx context.Context, id LoggerId, input LoggerUpdat var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/logger/version.go b/resource-manager/apimanagement/2023-05-01-preview/logger/version.go index c6a8c085593..afd801e2596 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/logger/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/logger/version.go @@ -1,12 +1,10 @@ package logger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logger/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/README.md b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/README.md index 3420b299999..a2b3bda8166 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/namedvalue` Documentation -The `namedvalue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `namedvalue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/client.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/client.go index 9bc64e690ca..043c376438d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/client.go @@ -15,7 +15,7 @@ type NamedValueClient struct { } func NewNamedValueClientWithBaseURI(sdkApi sdkEnv.Api) (*NamedValueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namedvalue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namedvalue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamedValueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_namedvalue.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_namedvalue.go index 960d341eb81..2d7156d678b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_namedvalue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_namedvalue.go @@ -44,7 +44,7 @@ func ParseNamedValueID(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_service.go index 3e71ff3a6f0..9c5b179b85f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspace.go index 7487f000469..05e9b2a6229 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspacenamedvalue.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspacenamedvalue.go index 44f55e1b20a..dd2ec43e950 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspacenamedvalue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/id_workspacenamedvalue.go @@ -46,7 +46,7 @@ func ParseWorkspaceNamedValueID(input string) (*WorkspaceNamedValueId, error) { } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceNamedValueIDInsensitively(input string) (*WorkspaceNamedValue } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_createorupdate.go index a12111f998e..b5862135bb5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_delete.go index f47f9ad5955..d071bb811bf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_get.go index b4f6fc01960..208dc6dcff4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_get.go @@ -45,7 +45,6 @@ func (c NamedValueClient) Get(ctx context.Context, id NamedValueId) (result GetO var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listbyservice.go index c484c236266..328935f3ddb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listvalue.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listvalue.go index 80e6212cce7..010f8359421 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listvalue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_listvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) ListValue(ctx context.Context, id NamedValueId) (resul var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_update.go index 0bb9dff4811..a22327f3f7a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go index 84290f98fbb..127d8eef85f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluecreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluedelete.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluedelete.go index 7d05e234c48..903ae6bbf4a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluedelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceNamedValueDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueget.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueget.go index fd48731656e..499da89fe82 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueget.go @@ -45,7 +45,6 @@ func (c NamedValueClient) WorkspaceNamedValueGet(ctx context.Context, id Workspa var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go index 87a17e3f92f..0cf463c799d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceNamedValueListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceNamedValueListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go index ced0d6c1600..70be7321342 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvaluelistvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) WorkspaceNamedValueListValue(ctx context.Context, id W var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueupdate.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueupdate.go index 2767761302a..866a931165b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/method_workspacenamedvalueupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/version.go b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/version.go index 74dcb5912ce..6e6235c3511 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/namedvalue/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/namedvalue/version.go @@ -1,12 +1,10 @@ package namedvalue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namedvalue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namedvalue/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/README.md b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/README.md index ce8690e29b1..1e7812924fa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/networkstatus` Documentation -The `networkstatus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `networkstatus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/client.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/client.go index a31324aaa99..0f7b98b9964 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/client.go @@ -15,7 +15,7 @@ type NetworkStatusClient struct { } func NewNetworkStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkStatusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_location.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_location.go index 33d1e89e60c..4805bc32949 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_location.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_location.go @@ -44,7 +44,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_service.go index 16676b5b068..5ef7bf317d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbylocation.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbylocation.go index 2ac16a461cc..6d070726da4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbylocation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbylocation.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByLocation(ctx context.Context, id LocationId) var model NetworkStatusContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbyservice.go index 82df8dfdf78..3cd4e1561af 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/method_listbyservice.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByService(ctx context.Context, id ServiceId) (r var model []NetworkStatusContractByLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/version.go b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/version.go index a94d1490665..f437411447b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/networkstatus/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/networkstatus/version.go @@ -1,12 +1,10 @@ package networkstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkstatus/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/README.md b/resource-manager/apimanagement/2023-05-01-preview/notification/README.md index 17048fb81d5..d3d7ddbd8dd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/notification` Documentation -The `notification` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `notification` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/client.go b/resource-manager/apimanagement/2023-05-01-preview/notification/client.go index 277470faa23..40e630b60f8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/client.go @@ -15,7 +15,7 @@ type NotificationClient struct { } func NewNotificationClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notification", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notification", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/id_notification.go b/resource-manager/apimanagement/2023-05-01-preview/notification/id_notification.go index 39c82639f30..cf908edb898 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/id_notification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/id_notificationnotification.go b/resource-manager/apimanagement/2023-05-01-preview/notification/id_notificationnotification.go index 9d5be1827b8..66eae538ce8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/notification/id_service.go index a9b6b10ca5c..a5410a065b4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/notification/id_workspace.go index 2a3893a9c73..1a4deb10010 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_createorupdate.go index f66ed7aa163..ef2314ee9a9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) CreateOrUpdate(ctx context.Context, id NotificationI var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_get.go index 21cc5b2b6f4..0a063938dee 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_get.go @@ -45,7 +45,6 @@ func (c NotificationClient) Get(ctx context.Context, id NotificationId) (result var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_listbyservice.go index b8f071f58f8..8dbc79c16d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationcreateorupdate.go index f9129556c8d..94bd205e822 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) WorkspaceNotificationCreateOrUpdate(ctx context.Cont var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationget.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationget.go index f9301d38cea..0e2a3ee9227 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationget.go @@ -45,7 +45,6 @@ func (c NotificationClient) WorkspaceNotificationGet(ctx context.Context, id Not var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationlistbyservice.go index 9c9bdd761b7..0bc8fe62d30 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/method_workspacenotificationlistbyservice.go @@ -40,6 +40,7 @@ func (o WorkspaceNotificationListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceNotificationListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notification/version.go b/resource-manager/apimanagement/2023-05-01-preview/notification/version.go index a98eab22d91..0f82ac848c8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notification/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notification/version.go @@ -1,12 +1,10 @@ package notification -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notification/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notification/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/README.md b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/README.md index 8f36b17f1a5..48d69e5e4e2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail` Documentation -The `notificationrecipientemail` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `notificationrecipientemail` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/client.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/client.go index 9975fccb850..f9007de8d12 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/client.go @@ -15,7 +15,7 @@ type NotificationRecipientEmailClient struct { } func NewNotificationRecipientEmailClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientEmailClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientemail", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientemail", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientEmailClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notification.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notification.go index 85bab8ef752..6d666b57152 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationnotification.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationnotification.go index b5257846bad..1fc5a15df48 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationrecipientemail.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationrecipientemail.go index 417bba3220c..dd7f2dbaa1b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationrecipientemail.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_notificationrecipientemail.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientEmailID(input string) (*NotificationRecipientEmai } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientEmailIDInsensitively(input string) (*Notification } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_recipientemail.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_recipientemail.go index ed228835ce6..24a344f3668 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_recipientemail.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/id_recipientemail.go @@ -46,7 +46,7 @@ func ParseRecipientEmailID(input string) (*RecipientEmailId, error) { } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientEmailIDInsensitively(input string) (*RecipientEmailId, error) } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_createorupdate.go index c9ff8f4f049..204db2f61d9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, id var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go index a58726e1c6c..ff5d1b65a2a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) WorkspaceNotificationRecipientEmailCre var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/version.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/version.go index 957e6030ca8..6b9f2785398 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientemail/version.go @@ -1,12 +1,10 @@ package notificationrecipientemail -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientemail/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientemail/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/README.md b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/README.md index 33a14344617..b8d8bad669c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser` Documentation -The `notificationrecipientuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `notificationrecipientuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/client.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/client.go index 3049dccc74b..28fb21100d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/client.go @@ -15,7 +15,7 @@ type NotificationRecipientUserClient struct { } func NewNotificationRecipientUserClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notification.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notification.go index 525816f0e3b..e013481d0f6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationnotification.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationnotification.go index 86345fd0047..44e2dd8aaca 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationnotification.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationrecipientuser.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationrecipientuser.go index abd829fc50b..8dad8ffd69f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationrecipientuser.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_notificationrecipientuser.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientUserID(input string) (*NotificationRecipientUserI } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientUserIDInsensitively(input string) (*NotificationR } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_recipientuser.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_recipientuser.go index 1c6e88f7af0..3b5d7039da1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_recipientuser.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/id_recipientuser.go @@ -46,7 +46,7 @@ func ParseRecipientUserID(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientUserIDInsensitively(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_createorupdate.go index 0736b330824..8cdb56c5521 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, id var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go index ee963934976..000d95f83c1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) WorkspaceNotificationRecipientUserCreat var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/version.go b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/version.go index c10e63e1622..0a44aada96f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/notificationrecipientuser/version.go @@ -1,12 +1,10 @@ package notificationrecipientuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientuser/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/README.md b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/README.md index d67aa4e9dac..6b0050f1e32 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider` Documentation -The `openidconnectprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `openidconnectprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/client.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/client.go index 6b2113dfc3d..01917915c80 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/client.go @@ -15,7 +15,7 @@ type OpenidConnectProviderClient struct { } func NewOpenidConnectProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenidConnectProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openidconnectprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openidconnectprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenidConnectProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_openidconnectprovider.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_openidconnectprovider.go index b1e20b39388..c51f53b0377 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_openidconnectprovider.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_openidconnectprovider.go @@ -44,7 +44,7 @@ func ParseOpenidConnectProviderID(input string) (*OpenidConnectProviderId, error } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOpenidConnectProviderIDInsensitively(input string) (*OpenidConnectProv } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_service.go index 992d2595802..7493219e726 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_createorupdate.go index ab5c53bdaa6..61c01cf6b96 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c OpenidConnectProviderClient) CreateOrUpdate(ctx context.Context, id Open var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_delete.go index d434f5eff61..f254a016bd7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_get.go index 642a146fa5f..216dd2c005c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_get.go @@ -45,7 +45,6 @@ func (c OpenidConnectProviderClient) Get(ctx context.Context, id OpenidConnectPr var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listbyservice.go index a4b2de8c3dc..5fad44984c9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listsecrets.go index 39b0cbb3857..99cf943206f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c OpenidConnectProviderClient) ListSecrets(ctx context.Context, id OpenidC var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_update.go index fc095d745c7..2f800589ad0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OpenidConnectProviderClient) Update(ctx context.Context, id OpenidConnec var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/version.go b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/version.go index 594c598873a..235b4d57c18 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/openidconnectprovider/version.go @@ -1,12 +1,10 @@ package openidconnectprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openidconnectprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openidconnectprovider/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/README.md b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/README.md index a37be2b38d6..62f041ccae2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/client.go b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/id_service.go index a2a71284e3f..c0c218b10e7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/version.go b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/version.go index d6b8f1d314a..c3830cdfdfc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/README.md b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/README.md index 9e95884626e..1604dae9243 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck` Documentation -The `performconnectivitycheck` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `performconnectivitycheck` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/client.go b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/client.go index a491979992c..377311cd668 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/client.go @@ -15,7 +15,7 @@ type PerformConnectivityCheckClient struct { } func NewPerformConnectivityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*PerformConnectivityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "performconnectivitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "performconnectivitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PerformConnectivityCheckClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/id_service.go index 6a34f7693f4..ed3403137c8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/version.go b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/version.go index 418b9bf1c36..ac52ac12de4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/performconnectivitycheck/version.go @@ -1,12 +1,10 @@ package performconnectivitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/performconnectivitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/performconnectivitycheck/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/README.md b/resource-manager/apimanagement/2023-05-01-preview/policy/README.md index 1da3f6604c3..4075f7fb752 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policy` Documentation -The `policy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/client.go b/resource-manager/apimanagement/2023-05-01-preview/policy/client.go index 216d1f1ff33..d95ac216bf6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/client.go @@ -15,7 +15,7 @@ type PolicyClient struct { } func NewPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/policy/id_service.go index 509f96c5a3f..8fac046b789 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/policy/method_createorupdate.go index 3bfe1519731..bc08c50ab8d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyClient) CreateOrUpdate(ctx context.Context, id ServiceId, input Po var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/policy/method_delete.go index 4b39d1a4a2d..f3ab4b889c9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/policy/method_get.go index 5a9a428f5ec..10e71f38f95 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyClient) Get(ctx context.Context, id ServiceId, options GetOperatio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policy/version.go b/resource-manager/apimanagement/2023-05-01-preview/policy/version.go index 4979a3c9ddd..e8be44943ae 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policy/version.go @@ -1,12 +1,10 @@ package policy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policydescription/README.md b/resource-manager/apimanagement/2023-05-01-preview/policydescription/README.md index 8e48b8b9c29..5043aac5dd6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policydescription/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policydescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policydescription` Documentation -The `policydescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policydescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policydescription/client.go b/resource-manager/apimanagement/2023-05-01-preview/policydescription/client.go index 70daacb1cfc..511edea86c1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policydescription/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policydescription/client.go @@ -15,7 +15,7 @@ type PolicyDescriptionClient struct { } func NewPolicyDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policydescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policydescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policydescription/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/policydescription/id_service.go index 41cef29b463..ff29eb10b4a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policydescription/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policydescription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policydescription/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/policydescription/method_listbyservice.go index cb12120f377..4535c14aaa4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policydescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policydescription/method_listbyservice.go @@ -34,6 +34,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyDescriptionClient) ListByService(ctx context.Context, id ServiceId var model PolicyDescriptionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policydescription/version.go b/resource-manager/apimanagement/2023-05-01-preview/policydescription/version.go index 57833280a4a..703e663fae1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policydescription/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policydescription/version.go @@ -1,12 +1,10 @@ package policydescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policydescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policydescription/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md index fc80f2b3060..2cb99d4a2e4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policyfragment` Documentation -The `policyfragment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policyfragment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/client.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/client.go index 3dbe1d43bb7..d14dc485991 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/client.go @@ -15,7 +15,7 @@ type PolicyFragmentClient struct { } func NewPolicyFragmentClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyFragmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyfragment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyfragment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyFragmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_policyfragment.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_policyfragment.go index 3737ed73101..538e36d518f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_policyfragment.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_policyfragment.go @@ -44,7 +44,7 @@ func ParsePolicyFragmentID(input string) (*PolicyFragmentId, error) { } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyFragmentIDInsensitively(input string) (*PolicyFragmentId, error) } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_service.go index e0ab31ef120..b5efade5d1c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspace.go index 334ecf5425c..8d5166b8bbf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspacepolicyfragment.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspacepolicyfragment.go index eed247a5b17..885868cd32e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspacepolicyfragment.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/id_workspacepolicyfragment.go @@ -46,7 +46,7 @@ func ParseWorkspacePolicyFragmentID(input string) (*WorkspacePolicyFragmentId, e } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspacePolicyFragmentIDInsensitively(input string) (*WorkspacePolicy } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_createorupdate.go index 926a279b604..1b3da31951e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_delete.go index 8a0d95204ce..219af78163c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_get.go index 3aa646fafdd..12ac1b4fbf3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) Get(ctx context.Context, id PolicyFragmentId, opti var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listbyservice.go index e9fcb07b896..c6ab48e11ac 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go index 37993c71c0d..d513c06b276 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_listreferences.go @@ -40,6 +40,7 @@ func (o ListReferencesOperationOptions) ToHeaders() *client.Headers { func (o ListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go index 07c7352e49d..72b4a0c9c6c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentcreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go index 3c175e499a5..4afe4261906 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentdelete.go @@ -35,6 +35,7 @@ func (o WorkspacePolicyFragmentDeleteOperationOptions) ToHeaders() *client.Heade func (o WorkspacePolicyFragmentDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentget.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentget.go index 24b3402ea1f..11e23a111e5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentget.go @@ -34,6 +34,7 @@ func (o WorkspacePolicyFragmentGetOperationOptions) ToHeaders() *client.Headers func (o WorkspacePolicyFragmentGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentGet(ctx context.Context, id var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go index 601c1855d17..d5ef3e26541 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToHeaders() *clien func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go index fca10ec83a6..9a7b1e52677 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/method_workspacepolicyfragmentlistreferences.go @@ -40,6 +40,7 @@ func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/version.go b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/version.go index 4dacdc7a8b2..b9a1aa6946d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyfragment/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyfragment/version.go @@ -1,12 +1,10 @@ package policyfragment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyfragment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyfragment/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/README.md b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/README.md index 31e43d53f89..1192bfa6847 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policyrestriction` Documentation -The `policyrestriction` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policyrestriction` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/client.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/client.go index 8f031b7e45a..65072a27e0b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionClient struct { } func NewPolicyRestrictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestriction", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestriction", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/id_policyrestriction.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/id_policyrestriction.go index 4791253dc53..569140f03ad 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/id_policyrestriction.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/id_policyrestriction.go @@ -44,7 +44,7 @@ func ParsePolicyRestrictionID(input string) (*PolicyRestrictionId, error) { } id := PolicyRestrictionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyRestrictionIDInsensitively(input string) (*PolicyRestrictionId, } id := PolicyRestrictionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_createorupdate.go index 56b8f26697a..a839c506d40 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyRestrictionClient) CreateOrUpdate(ctx context.Context, id PolicyRe var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_delete.go index c4ec85cd65f..1150430a795 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_get.go index f6ed8b41e1c..6cbf098686e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_get.go @@ -45,7 +45,6 @@ func (c PolicyRestrictionClient) Get(ctx context.Context, id PolicyRestrictionId var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_update.go index 87847cf947c..b249bf83c3e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PolicyRestrictionClient) Update(ctx context.Context, id PolicyRestrictio var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/version.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/version.go index 83bf8f88cec..793ad863970 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestriction/version.go @@ -1,12 +1,10 @@ package policyrestriction -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestriction/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestriction/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/README.md b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/README.md index 56a90cf0fc9..5df3d3389e8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions` Documentation -The `policyrestrictions` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policyrestrictions` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/client.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/client.go index af23f982730..03b9c279743 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionsClient struct { } func NewPolicyRestrictionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestrictions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestrictions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/id_service.go index cda4de7ca6c..022d5d624d9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/version.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/version.go index 3213c330dc7..e9c04f6f404 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictions/version.go @@ -1,12 +1,10 @@ package policyrestrictions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestrictions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestrictions/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/README.md b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/README.md index a034f9bb6e1..b48d652be78 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations` Documentation -The `policyrestrictionsvalidations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `policyrestrictionsvalidations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/client.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/client.go index 3d993a73d0c..9b47775d5ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionsValidationsClient struct { } func NewPolicyRestrictionsValidationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionsValidationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestrictionsvalidations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestrictionsvalidations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionsValidationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/id_service.go index 815b858832d..c7ddfe5e4b6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/version.go b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/version.go index 393037862ae..45d49651679 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/policyrestrictionsvalidations/version.go @@ -1,12 +1,10 @@ package policyrestrictionsvalidations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestrictionsvalidations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestrictionsvalidations/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/README.md b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/README.md index 71a73ad973c..2915906c6a1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/portalconfig` Documentation -The `portalconfig` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `portalconfig` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/client.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/client.go index 5c58ba3ea50..b02c0eb1e23 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/client.go @@ -15,7 +15,7 @@ type PortalConfigClient struct { } func NewPortalConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalConfigClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_portalconfig.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_portalconfig.go index 4217e87e470..1eee4ff6349 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_portalconfig.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_portalconfig.go @@ -44,7 +44,7 @@ func ParsePortalConfigID(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalConfigIDInsensitively(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_service.go index fe235ccce02..25a796d7e39 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_createorupdate.go index 94bdf726259..13a9427637b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) CreateOrUpdate(ctx context.Context, id PortalConfigI var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_get.go index 755476c6e67..e4377dd925f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_get.go @@ -45,7 +45,6 @@ func (c PortalConfigClient) Get(ctx context.Context, id PortalConfigId) (result var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_update.go index fce54b73ff3..e003b060e70 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) Update(ctx context.Context, id PortalConfigId, input var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/version.go b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/version.go index 52614beb2b2..a073c009edc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalconfig/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalconfig/version.go @@ -1,12 +1,10 @@ package portalconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalconfig/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/README.md b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/README.md index 4961c0c1b93..a38f9ae3358 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/portalrevision` Documentation -The `portalrevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `portalrevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/client.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/client.go index 4f2fa253331..3ac3319b56b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/client.go @@ -15,7 +15,7 @@ type PortalRevisionClient struct { } func NewPortalRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalrevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalrevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_portalrevision.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_portalrevision.go index a4ef40e0335..66cce216fe8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_portalrevision.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_portalrevision.go @@ -44,7 +44,7 @@ func ParsePortalRevisionID(input string) (*PortalRevisionId, error) { } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalRevisionIDInsensitively(input string) (*PortalRevisionId, error) } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_service.go index 6d27c56ea22..12e905cecaa 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_get.go index 02c07947f35..e7e39cc491d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_get.go @@ -45,7 +45,6 @@ func (c PortalRevisionClient) Get(ctx context.Context, id PortalRevisionId) (res var model PortalRevisionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_listbyservice.go index 57df46678e2..1dfec707d1e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_update.go index e3568960b04..b2c05e16d03 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/version.go b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/version.go index 4e5c9371a39..a9e5dff1c04 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalrevision/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalrevision/version.go @@ -1,12 +1,10 @@ package portalrevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalrevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalrevision/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/README.md b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/README.md index 82c74a1f239..2be0b2705d2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/portalsettings` Documentation -The `portalsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `portalsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/client.go b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/client.go index 787e842a856..554097bdccf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/client.go @@ -15,7 +15,7 @@ type PortalSettingsClient struct { } func NewPortalSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/id_service.go index 9c71fe38260..795734b8888 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/method_listbyservice.go index 0dc16a6d309..cc9614449d6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PortalSettingsClient) ListByService(ctx context.Context, id ServiceId) ( var model PortalSettingsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/version.go b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/version.go index fe1592e7e8b..9c451c17499 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/portalsettings/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/portalsettings/version.go @@ -1,12 +1,10 @@ package portalsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalsettings/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/README.md b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/README.md index 9986314d1c8..639c10dc114 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/client.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go index 6c2da784082..cd4250e592b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privatelinkresource.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privatelinkresource.go index dfbab21cc34..8b943560b87 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privatelinkresource.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_service.go index 6954e3bf619..1470d0578e9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go index 79394dec05e..16876584694 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetbyname.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetByName(ctx var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go index 44e1bf04851..ea5fab7b453 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go index 6b9b574ef5f..fc2ec42cfe3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByService var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go index e33993c077f..d4c86877792 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListPrivateLi var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/version.go b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/version.go index 1d6f53e6787..92f22444c56 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/README.md b/resource-manager/apimanagement/2023-05-01-preview/product/README.md index 669da0aeead..91bed727b16 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/product/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/product` Documentation -The `product` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `product` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/client.go b/resource-manager/apimanagement/2023-05-01-preview/product/client.go index 20069da6c20..787eaa28e4f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/client.go @@ -15,7 +15,7 @@ type ProductClient struct { } func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "product", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "product", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/product/id_product.go index 95f18115dce..034ad81b346 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/product/id_service.go index bb0983ca2df..948d6fd23a8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/product/id_workspace.go index 72e09a3fc43..09518d96353 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/id_workspaceproduct.go b/resource-manager/apimanagement/2023-05-01-preview/product/id_workspaceproduct.go index 6b11719ded0..1f89057c1dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_createorupdate.go index 2baf83fb505..07bc7cd0e1c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) CreateOrUpdate(ctx context.Context, id ProductId, input P var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_delete.go index afc7d184b70..28d5b7bdd7f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_get.go index b343c0f286c..65af42031e8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_get.go @@ -45,7 +45,6 @@ func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperati var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_listbyservice.go index b1f50c8e42d..9b47fa13709 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_update.go index fc36ecd5353..a6be0dfec29 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) Update(ctx context.Context, id ProductId, input ProductUp var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductcreateorupdate.go index af10ed64d9c..1a22f89859b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductCreateOrUpdateOperationOptions) ToHeaders() *client.Head func (o WorkspaceProductCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) WorkspaceProductCreateOrUpdate(ctx context.Context, id Wo var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductdelete.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductdelete.go index 3bf8f536240..849214c5992 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductdelete.go @@ -36,6 +36,7 @@ func (o WorkspaceProductDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductget.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductget.go index d746f01c02e..78e82c51d83 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductget.go @@ -45,7 +45,6 @@ func (c ProductClient) WorkspaceProductGet(ctx context.Context, id WorkspaceProd var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductlistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductlistbyservice.go index 457b9a161c9..ccf2ecef686 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductlistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductlistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceProductListByServiceOperationOptions) ToHeaders() *client.Heade func (o WorkspaceProductListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductupdate.go b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductupdate.go index e1305ecd777..059782c921a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/method_workspaceproductupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) WorkspaceProductUpdate(ctx context.Context, id WorkspaceP var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/product/version.go b/resource-manager/apimanagement/2023-05-01-preview/product/version.go index c58dda31043..aed8d3e2736 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/product/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/product/version.go @@ -1,12 +1,10 @@ package product -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/product/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/product/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/README.md b/resource-manager/apimanagement/2023-05-01-preview/productapi/README.md index 424df2959af..118e860d577 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productapi` Documentation -The `productapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/client.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/client.go index 1e0b184ff57..edeb30a1f70 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/client.go @@ -15,7 +15,7 @@ type ProductApiClient struct { } func NewProductApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/id_product.go index 76244a5f127..e7f5d3be4d2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/id_productapi.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/id_productapi.go index ac92947ceaf..38ffb06be7e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/id_productapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/id_productapi.go @@ -46,7 +46,7 @@ func ParseProductApiID(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiIDInsensitively(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/method_createorupdate.go index e27e2ed31a5..afa4d070d9d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductApiClient) CreateOrUpdate(ctx context.Context, id ProductApiId) ( var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/method_listbyproduct.go index c06016675dd..4327b569ea6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapi/version.go b/resource-manager/apimanagement/2023-05-01-preview/productapi/version.go index 08aacd3d83e..51634bc0143 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapi/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapi/version.go @@ -1,12 +1,10 @@ package productapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapi/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/README.md b/resource-manager/apimanagement/2023-05-01-preview/productapilink/README.md index 3bef3934026..244c02ffe1f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productapilink` Documentation -The `productapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/client.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/client.go index 8349188784a..9dbc162240f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/client.go @@ -15,7 +15,7 @@ type ProductApiLinkClient struct { } func NewProductApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_product.go index 8cc4d71ac4d..95a8c337cc3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_productapilink.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_productapilink.go index fe5d70ec31e..3679e1007f6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_productapilink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_productapilink.go @@ -46,7 +46,7 @@ func ParseProductApiLinkID(input string) (*ProductApiLinkId, error) { } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiLinkIDInsensitively(input string) (*ProductApiLinkId, error) } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproduct.go index ded946cf1fa..11ffc8e9638 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproductapilink.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproductapilink.go index efb87f6e00f..5c982422eda 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproductapilink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/id_workspaceproductapilink.go @@ -48,7 +48,7 @@ func ParseWorkspaceProductApiLinkID(input string) (*WorkspaceProductApiLinkId, e } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceProductApiLinkIDInsensitively(input string) (*WorkspaceProduc } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_createorupdate.go index e711339b44d..edf067cb155 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) CreateOrUpdate(ctx context.Context, id ProductApiL var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_get.go index 6f8bfffa257..f2e08e31655 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_get.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) Get(ctx context.Context, id ProductApiLinkId) (res var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_listbyproduct.go index 5992341c96a..55b25bf468f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go index 5c589d27c2b..47d81364b4e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkCreateOrUpdate(ctx context. var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkget.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkget.go index 187f5e7ac13..50efa7fa27f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinkget.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkGet(ctx context.Context, id var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go index ca1989e31ec..95e5f96810c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/method_workspaceproductapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductApiLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceProductApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productapilink/version.go b/resource-manager/apimanagement/2023-05-01-preview/productapilink/version.go index d06da216d93..8663ce942f8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productapilink/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productapilink/version.go @@ -1,12 +1,10 @@ package productapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapilink/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/README.md b/resource-manager/apimanagement/2023-05-01-preview/productgroup/README.md index 591578ac899..e30eef84742 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productgroup` Documentation -The `productgroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productgroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/client.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/client.go index beb9159e3e3..2aa816ea14d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/client.go @@ -15,7 +15,7 @@ type ProductGroupClient struct { } func NewProductGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_product.go index df7d9abbfcd..00eaae01fd1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_productgroup.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_productgroup.go index 7ede94a7c7f..847e2e4900d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_productgroup.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/id_productgroup.go @@ -46,7 +46,7 @@ func ParseProductGroupID(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductGroupIDInsensitively(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_createorupdate.go index 77cf8dbf10e..a518c2d0404 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductGroupClient) CreateOrUpdate(ctx context.Context, id ProductGroupI var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_listbyproduct.go index 902f45c4f73..fbee2e7567d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgroup/version.go b/resource-manager/apimanagement/2023-05-01-preview/productgroup/version.go index af099d0669b..f6162377e0b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgroup/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgroup/version.go @@ -1,12 +1,10 @@ package productgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgroup/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/README.md b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/README.md index 51b6034da8b..5275e5e51d3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productgrouplink` Documentation -The `productgrouplink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productgrouplink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/client.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/client.go index 3528003e35b..e37d8715ed6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/client.go @@ -15,7 +15,7 @@ type ProductGroupLinkClient struct { } func NewProductGroupLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgrouplink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgrouplink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_grouplink.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_grouplink.go index c16ddba297b..ddb687e68f5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_grouplink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_grouplink.go @@ -46,7 +46,7 @@ func ParseGroupLinkID(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupLinkIDInsensitively(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_product.go index ebda99376a6..3b43ce90247 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_productgrouplink.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_productgrouplink.go index b138aa0fbab..c92c77fd5e4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_productgrouplink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_productgrouplink.go @@ -48,7 +48,7 @@ func ParseProductGroupLinkID(input string) (*ProductGroupLinkId, error) { } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProductGroupLinkIDInsensitively(input string) (*ProductGroupLinkId, er } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_workspaceproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_workspaceproduct.go index aaddcc46393..38f762822bd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_createorupdate.go index c69607c76c0..657238c75a9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) CreateOrUpdate(ctx context.Context, id GroupLink var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_get.go index 504db1fe876..8734a2ac627 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_get.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) Get(ctx context.Context, id GroupLinkId) (result var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_listbyproduct.go index 84edbb8b0f2..04616fec43a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go index 1819eda2722..7660c05264a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkCreateOrUpdate(ctx cont var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go index ee43233ffa6..e4a1e775485 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinkget.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkGet(ctx context.Context var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go index f337fc0d196..08e4ee7216c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/version.go b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/version.go index c8993e36bd3..232c51d87cd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productgrouplink/version.go @@ -1,12 +1,10 @@ package productgrouplink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgrouplink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgrouplink/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/README.md index 0e9eb7296c0..50c8e74de74 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productpolicy` Documentation -The `productpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/client.go index e6887574aaa..a4a1d0fa474 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/client.go @@ -15,7 +15,7 @@ type ProductPolicyClient struct { } func NewProductPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_product.go index 1b80a823c26..ecac90e889b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_workspaceproduct.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_workspaceproduct.go index de50624b5f9..1a5c285cc77 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_createorupdate.go index 923d04859e1..ae0329209dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) CreateOrUpdate(ctx context.Context, id ProductId, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_delete.go index 36e74215a96..5cf9ef830f4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_get.go index b96d87150c2..579a315dc9a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) Get(ctx context.Context, id ProductId, options GetO var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go index 9a55b9a739a..0c867674486 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyCreateOrUpdate(ctx context.Co var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicydelete.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicydelete.go index a76872c52a7..d58bdb503e7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicydelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceProductPolicyDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceProductPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicyget.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicyget.go index cbd5809fb0e..999f909eccf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicyget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/method_workspaceproductpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceProductPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyGet(ctx context.Context, id W var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/version.go index 49bd1e702f8..5c2c5d296d2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productpolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productpolicy/version.go @@ -1,12 +1,10 @@ package productpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productpolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/README.md b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/README.md index 0492973f3f9..9a704c0dc22 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productsbytag` Documentation -The `productsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/client.go b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/client.go index c87bb5f7b76..915babf141b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/client.go @@ -15,7 +15,7 @@ type ProductsByTagClient struct { } func NewProductsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/id_service.go index 4cf290afcb1..29ba551682f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/method_productlistbytags.go b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/method_productlistbytags.go index 8cffb9f2edb..6744380cbab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/method_productlistbytags.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/method_productlistbytags.go @@ -42,6 +42,7 @@ func (o ProductListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ProductListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/version.go b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/version.go index 66acc0c917a..10beb1f5e44 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsbytag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsbytag/version.go @@ -1,12 +1,10 @@ package productsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsbytag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/README.md b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/README.md index aa6fa34b126..9d06cd3e016 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productsubscription` Documentation -The `productsubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productsubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/client.go b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/client.go index a54f7218145..fd87d58da17 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/client.go @@ -15,7 +15,7 @@ type ProductSubscriptionClient struct { } func NewProductSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/id_product.go index 96929544e81..f43d9647499 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/method_list.go index c71c7ba8260..00b340b1821 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/version.go b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/version.go index 43ec94da05e..406c32b6ade 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productsubscription/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productsubscription/version.go @@ -1,12 +1,10 @@ package productsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsubscription/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/README.md b/resource-manager/apimanagement/2023-05-01-preview/producttag/README.md index 3ea9a794ec8..56d83db43f3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/producttag` Documentation -The `producttag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `producttag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/client.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/client.go index 720b81ec2d8..5602a7a654f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/client.go @@ -15,7 +15,7 @@ type ProductTagClient struct { } func NewProductTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "producttag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "producttag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/id_product.go index b7000f83b74..83b2ff6422e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/id_producttag.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/id_producttag.go index d1f16bd1686..b06e6d6fa29 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/id_producttag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/id_producttag.go @@ -46,7 +46,7 @@ func ParseProductTagID(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductTagIDInsensitively(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_tagassigntoproduct.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_tagassigntoproduct.go index 87bb16caf5e..5cbd240711d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_tagassigntoproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_tagassigntoproduct.go @@ -46,7 +46,6 @@ func (c ProductTagClient) TagAssignToProduct(ctx context.Context, id ProductTagI var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taggetbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taggetbyproduct.go index 1e5ed741301..1742c0e9789 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taggetbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taggetbyproduct.go @@ -45,7 +45,6 @@ func (c ProductTagClient) TagGetByProduct(ctx context.Context, id ProductTagId) var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taglistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taglistbyproduct.go index 4e0721b94fc..f55c45480ae 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taglistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/method_taglistbyproduct.go @@ -41,6 +41,7 @@ func (o TagListByProductOperationOptions) ToHeaders() *client.Headers { func (o TagListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/producttag/version.go b/resource-manager/apimanagement/2023-05-01-preview/producttag/version.go index f9ab019f46d..cc5b9b70a38 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/producttag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/producttag/version.go @@ -1,12 +1,10 @@ package producttag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/producttag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/producttag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/README.md b/resource-manager/apimanagement/2023-05-01-preview/productwiki/README.md index 37af7ce7418..337812b0b51 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/productwiki` Documentation -The `productwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `productwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/client.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/client.go index 927c4e2a5e8..f916fc92b3e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/client.go @@ -15,7 +15,7 @@ type ProductWikiClient struct { } func NewProductWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/id_product.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/id_product.go index 55d2312cec7..2c4b473a438 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/id_product.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_createorupdate.go index f794fc61c8a..07e2174456f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductWikiClient) CreateOrUpdate(ctx context.Context, id ProductId, inp var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_delete.go index 0ccc22248a0..85714a863d1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_get.go index 503a2a49ab6..7ee0379c2bc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_get.go @@ -46,7 +46,6 @@ func (c ProductWikiClient) Get(ctx context.Context, id ProductId) (result GetOpe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_list.go index db26ef5879d..2a6ee83e84b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_update.go index 551aa6aab7a..4e6a5e37c25 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductWikiClient) Update(ctx context.Context, id ProductId, input WikiU var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/productwiki/version.go b/resource-manager/apimanagement/2023-05-01-preview/productwiki/version.go index 1ad2eed0752..951a519bbef 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/productwiki/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/productwiki/version.go @@ -1,12 +1,10 @@ package productwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productwiki/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/README.md b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/README.md index 3a14135d421..81b4ab967dd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys` Documentation -The `quotabycounterkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `quotabycounterkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/client.go b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/client.go index bd6e9581304..eec1a8e1c60 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/client.go @@ -15,7 +15,7 @@ type QuotaByCounterKeysClient struct { } func NewQuotaByCounterKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByCounterKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabycounterkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabycounterkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByCounterKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/id_quota.go b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/id_quota.go index 11bd5535194..1cb117ba2bc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/id_quota.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/id_quota.go @@ -44,7 +44,7 @@ func ParseQuotaID(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/method_update.go index 44f72d4b26b..8ed074d74d8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input var model QuotaCounterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/version.go b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/version.go index 91da1549391..d12c1922f09 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys/version.go @@ -1,12 +1,10 @@ package quotabycounterkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabycounterkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabycounterkeys/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/README.md b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/README.md index 3bde70f09d1..6b3f4957f6b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys` Documentation -The `quotabyperiodkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `quotabyperiodkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/client.go b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/client.go index 338089b5c40..559771ef5e6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/client.go @@ -15,7 +15,7 @@ type QuotaByPeriodKeysClient struct { } func NewQuotaByPeriodKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByPeriodKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByPeriodKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/id_period.go b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/id_period.go index 24a1631d595..0aabd1a8ba4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/id_period.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/id_period.go @@ -46,7 +46,7 @@ func ParsePeriodID(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeriodIDInsensitively(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_get.go index ea5a1757972..6bb85fbcffb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_get.go @@ -45,7 +45,6 @@ func (c QuotaByPeriodKeysClient) Get(ctx context.Context, id PeriodId) (result G var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_update.go index 2fc44c961e6..7e71a98ddf1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByPeriodKeysClient) Update(ctx context.Context, id PeriodId, input var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/version.go b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/version.go index b90e1986a44..f5a7c89ad80 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/quotabyperiodkeys/version.go @@ -1,12 +1,10 @@ package quotabyperiodkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabyperiodkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabyperiodkeys/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/region/README.md b/resource-manager/apimanagement/2023-05-01-preview/region/README.md index 98f00895226..5d8797633ca 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/region/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/region/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/region` Documentation -The `region` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `region` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/region/client.go b/resource-manager/apimanagement/2023-05-01-preview/region/client.go index 46d4de5270d..41092dd526a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/region/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/region/client.go @@ -15,7 +15,7 @@ type RegionClient struct { } func NewRegionClientWithBaseURI(sdkApi sdkEnv.Api) (*RegionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "region", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "region", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/region/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/region/id_service.go index 287e12afddc..51310a9c174 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/region/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/region/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/region/version.go b/resource-manager/apimanagement/2023-05-01-preview/region/version.go index 5c468ba8df6..bd985166879 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/region/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/region/version.go @@ -1,12 +1,10 @@ package region -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/region/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/region/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/README.md b/resource-manager/apimanagement/2023-05-01-preview/reports/README.md index 218a06109a0..d20ba22ed01 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/reports` Documentation -The `reports` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `reports` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/client.go b/resource-manager/apimanagement/2023-05-01-preview/reports/client.go index 7d5bde81365..d5f04232726 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/client.go @@ -15,7 +15,7 @@ type ReportsClient struct { } func NewReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReportsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/reports/id_service.go index ff6955096df..b5a3e420608 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyapi.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyapi.go index e99479d8413..938e0fdaf48 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyapi.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbygeo.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbygeo.go index 1e69c1fb509..13fc541e4a6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbygeo.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbygeo.go @@ -41,6 +41,7 @@ func (o ListByGeoOperationOptions) ToHeaders() *client.Headers { func (o ListByGeoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyoperation.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyoperation.go index bb4465b0ce3..8358f8ba004 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyoperation.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyoperation.go @@ -42,6 +42,7 @@ func (o ListByOperationOperationOptions) ToHeaders() *client.Headers { func (o ListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyproduct.go index 3a6df43c7b4..73d09491df5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyproduct.go @@ -42,6 +42,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyrequest.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyrequest.go index 265c2670114..22f5d5ad5ca 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyrequest.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyrequest.go @@ -36,6 +36,7 @@ func (o ListByRequestOperationOptions) ToHeaders() *client.Headers { func (o ListByRequestOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c ReportsClient) ListByRequest(ctx context.Context, id ServiceId, options var model RequestReportCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbysubscription.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbysubscription.go index 1e7ffadeafd..4be6b09415d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbysubscription.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbytime.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbytime.go index 629527e4e8b..a440a9632c1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbytime.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbytime.go @@ -43,6 +43,7 @@ func (o ListByTimeOperationOptions) ToHeaders() *client.Headers { func (o ListByTimeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyuser.go b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyuser.go index 0751d4a40cb..9245fc80cd9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyuser.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/method_listbyuser.go @@ -42,6 +42,7 @@ func (o ListByUserOperationOptions) ToHeaders() *client.Headers { func (o ListByUserOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/reports/version.go b/resource-manager/apimanagement/2023-05-01-preview/reports/version.go index d85b5bcb46b..e4e115742da 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/reports/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/reports/version.go @@ -1,12 +1,10 @@ package reports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reports/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/README.md b/resource-manager/apimanagement/2023-05-01-preview/schema/README.md index 4b49de047db..28c28332bda 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/schema` Documentation -The `schema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `schema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/client.go b/resource-manager/apimanagement/2023-05-01-preview/schema/client.go index 3d872ecf7a1..dd9c100ba13 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/client.go @@ -15,7 +15,7 @@ type SchemaClient struct { } func NewSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/id_schema.go b/resource-manager/apimanagement/2023-05-01-preview/schema/id_schema.go index bb6238dd767..192895eff2e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/id_schema.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/id_schema.go @@ -44,7 +44,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/schema/id_service.go index 11419aeb835..aeb24c3ff7f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspace.go index f4096e5456a..d6f8a2faec5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspaceschema.go b/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspaceschema.go index 25f35d2ce89..926c9a9b5b2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspaceschema.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/id_workspaceschema.go @@ -46,7 +46,7 @@ func ParseWorkspaceSchemaID(input string) (*WorkspaceSchemaId, error) { } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSchemaIDInsensitively(input string) (*WorkspaceSchemaId, erro } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemacreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemacreateorupdate.go index 6f6a15cfe78..29a4f875076 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o GlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o GlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemadelete.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemadelete.go index 234fcfcb78f..f170324bf05 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemadelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemadelete.go @@ -35,6 +35,7 @@ func (o GlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemaget.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemaget.go index d2ec4344b20..6118374682a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemaget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemalistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemalistbyservice.go index 7797c6a6b8f..f25edc94805 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemalistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_globalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o GlobalSchemaListByServiceOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemacreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemacreateorupdate.go index 99be8ac48c4..3b378cb67e0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemadelete.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemadelete.go index a8aab3185b1..4015581a86c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemadelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemadelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemaget.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemaget.go index 73828cf65b6..749310cc25b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemaget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) WorkspaceGlobalSchemaGet(ctx context.Context, id Workspace var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemalistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemalistbyservice.go index aeae5549ab2..2c2454c9a80 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemalistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/method_workspaceglobalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/schema/version.go b/resource-manager/apimanagement/2023-05-01-preview/schema/version.go index 84d812dcc10..a58b6b5ec5c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/schema/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/schema/version.go @@ -1,12 +1,10 @@ package schema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schema/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/README.md b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/README.md index f7f64c513c1..2f5bbfe4bde 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/signinsettings` Documentation -The `signinsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `signinsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/client.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/client.go index a21dfcdddd2..0426e9303e8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/client.go @@ -15,7 +15,7 @@ type SignInSettingsClient struct { } func NewSignInSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignInSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signinsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signinsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignInSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/id_service.go index fd18eb71e2f..ab9047e4895 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_createorupdate.go index 7354010fc89..6f35914bbe1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignInSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_get.go index 1de8b5e5963..35d80bf82b1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignInSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_update.go index 1c0af5a3508..499592b651b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/version.go b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/version.go index 599b7b7abf6..fb2d7290bd7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signinsettings/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signinsettings/version.go @@ -1,12 +1,10 @@ package signinsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signinsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signinsettings/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/README.md b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/README.md index e4c8eb9ed7e..faef4a47f8a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/signupsettings` Documentation -The `signupsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `signupsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/client.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/client.go index 2d9452823e3..3a4f6ae3333 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/client.go @@ -15,7 +15,7 @@ type SignUpSettingsClient struct { } func NewSignUpSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignUpSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signupsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signupsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignUpSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/id_service.go index eeefe5b42b7..972362091d7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_createorupdate.go index 8d57367d2f5..371f0477840 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignUpSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_get.go index e9062643330..03dc9774b35 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignUpSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_update.go index 8d8918d3324..c86348ae580 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/version.go b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/version.go index 48d07096286..332958dacad 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/signupsettings/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/signupsettings/version.go @@ -1,12 +1,10 @@ package signupsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signupsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signupsettings/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/skus/README.md b/resource-manager/apimanagement/2023-05-01-preview/skus/README.md index 1400b63d52c..8fc67c986f1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/skus/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `skus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/skus/client.go b/resource-manager/apimanagement/2023-05-01-preview/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/skus/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/skus/version.go b/resource-manager/apimanagement/2023-05-01-preview/skus/version.go index 9c9db342ae7..624e79418d5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/skus/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/README.md b/resource-manager/apimanagement/2023-05-01-preview/subscription/README.md index bfa4223ac16..9807f6f1447 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/subscription` Documentation -The `subscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `subscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/client.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/client.go index 9885434f9dd..b5f97131f6f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/client.go @@ -15,7 +15,7 @@ type SubscriptionClient struct { } func NewSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_service.go index eae18b83523..565db9091ea 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_subscriptions2.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_subscriptions2.go index 92e8dcc65f1..c6acf1a4ae0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_subscriptions2.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_subscriptions2.go @@ -44,7 +44,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_usersubscriptions2.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_usersubscriptions2.go index 07412cdb651..f91da2b8480 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_usersubscriptions2.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_usersubscriptions2.go @@ -46,7 +46,7 @@ func ParseUserSubscriptions2ID(input string) (*UserSubscriptions2Id, error) { } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSubscriptions2IDInsensitively(input string) (*UserSubscriptions2Id } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspace.go index f2e1bd584a2..0c6365ef793 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspacesubscriptions2.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspacesubscriptions2.go index 5ec25c56a27..ac81a3cf234 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspacesubscriptions2.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/id_workspacesubscriptions2.go @@ -46,7 +46,7 @@ func ParseWorkspaceSubscriptions2ID(input string) (*WorkspaceSubscriptions2Id, e } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSubscriptions2IDInsensitively(input string) (*WorkspaceSubscr } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_createorupdate.go index 84f04d880d0..b8e289d53ae 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_createorupdate.go @@ -38,6 +38,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) CreateOrUpdate(ctx context.Context, id Subscriptions var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_delete.go index e3c31885a75..365f71a2c63 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_get.go index 9a57c676f8b..0156f9f655a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) Get(ctx context.Context, id Subscriptions2Id) (resul var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_list.go index 2e9d96e0473..8b1e4d1455b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_listsecrets.go index 579b90282a8..ce51c65282c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_listsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) ListSecrets(ctx context.Context, id Subscriptions2Id var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_update.go index 635071e41ca..04305d82d79 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_update.go @@ -38,6 +38,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) Update(ctx context.Context, id Subscriptions2Id, inp var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_usersubscriptionget.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_usersubscriptionget.go index 4323e0a04c6..9c22a5becdd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_usersubscriptionget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_usersubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) UserSubscriptionGet(ctx context.Context, id UserSubs var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go index 9c4c3b06ccb..37af25f8a1e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptioncreateorupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionCreateOrUpdate(ctx context.Cont var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptiondelete.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptiondelete.go index ae93f99c979..596c10eb7d8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptiondelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptiondelete.go @@ -35,6 +35,7 @@ func (o WorkspaceSubscriptionDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionget.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionget.go index 37ea5ebe516..8dae472a92c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionGet(ctx context.Context, id Wor var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlist.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlist.go index ae68c703393..3204ff8b3a1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlist.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlist.go @@ -41,6 +41,7 @@ func (o WorkspaceSubscriptionListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceSubscriptionListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlistsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlistsecrets.go index 5aaf63656bd..6fe9aca9880 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlistsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionlistsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionListSecrets(ctx context.Context var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionupdate.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionupdate.go index e8866e97051..a71cb2ab2b4 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/method_workspacesubscriptionupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionUpdate(ctx context.Context, id var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/subscription/version.go b/resource-manager/apimanagement/2023-05-01-preview/subscription/version.go index 5e33254e225..cc3f6ab8a5d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/subscription/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/subscription/version.go @@ -1,12 +1,10 @@ package subscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscription/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/README.md b/resource-manager/apimanagement/2023-05-01-preview/tag/README.md index 66863f21c2a..73fc933221d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tag` Documentation -The `tag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/client.go b/resource-manager/apimanagement/2023-05-01-preview/tag/client.go index e97e5adc95e..9450459e77c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/client.go @@ -15,7 +15,7 @@ type TagClient struct { } func NewTagClientWithBaseURI(sdkApi sdkEnv.Api) (*TagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tag/id_service.go index c2136f64b3e..35b3ad02caf 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/id_tag.go b/resource-manager/apimanagement/2023-05-01-preview/tag/id_tag.go index 568503a639c..70a4aa51923 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/id_tag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspace.go index 3028a0894dc..bfda0ce4d3d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspacetag.go b/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspacetag.go index 22e3dc2edb3..52c9179a8dc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_createorupdate.go index 9494659a794..5839e98d081 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) CreateOrUpdate(ctx context.Context, id TagId, input TagCreate var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_delete.go index 83335d794bd..ae058a00292 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_get.go index 8395e2cb1b1..ebda46b567c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_get.go @@ -45,7 +45,6 @@ func (c TagClient) Get(ctx context.Context, id TagId) (result GetOperationRespon var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_listbyservice.go index efb001aaa9c..e7afb4202b1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_update.go index 8ee0391b4d4..3aba0116fd3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) Update(ctx context.Context, id TagId, input TagCreateUpdatePa var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagcreateorupdate.go index 43dd91a0327..7a942b3509e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceTagCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) WorkspaceTagCreateOrUpdate(ctx context.Context, id WorkspaceT var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagdelete.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagdelete.go index c702a5f54dc..8ec36b5031b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagdelete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceTagDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagget.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagget.go index 70647072c3e..4fbedecfe18 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagget.go @@ -45,7 +45,6 @@ func (c TagClient) WorkspaceTagGet(ctx context.Context, id WorkspaceTagId) (resu var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetaglistbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetaglistbyservice.go index e41c7e2b252..b401db29d28 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetaglistbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetaglistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceTagListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagupdate.go index 0d23c5923a8..2a4a2f560a7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/method_workspacetagupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) WorkspaceTagUpdate(ctx context.Context, id WorkspaceTagId, in var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tag/version.go b/resource-manager/apimanagement/2023-05-01-preview/tag/version.go index ff49832af46..20daa0d5ff1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tag/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tag/version.go @@ -1,12 +1,10 @@ package tag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tag/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/README.md b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/README.md index 9954591f4cd..b9ff0708d37 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tagapilink` Documentation -The `tagapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tagapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/client.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/client.go index a3dcf8d66eb..f7f085c97cb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/client.go @@ -15,7 +15,7 @@ type TagApiLinkClient struct { } func NewTagApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_apilink.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_apilink.go index 8f12afdcae2..b8280a415bb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_apilink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_apilink.go @@ -46,7 +46,7 @@ func ParseApiLinkID(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiLinkIDInsensitively(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tag.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tag.go index d8e00e21e9f..a1fe305725a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tagapilink.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tagapilink.go index 59e43c8dd36..2f275a0f92b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tagapilink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_tagapilink.go @@ -48,7 +48,7 @@ func ParseTagApiLinkID(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagApiLinkIDInsensitively(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_workspacetag.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_workspacetag.go index a7ea89f58c3..6db7c41d51a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_createorupdate.go index 0b09901bfc5..608572cd0ec 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) CreateOrUpdate(ctx context.Context, id ApiLinkId, inpu var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_get.go index 8de9c2a323d..4deae08bbd9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_get.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) Get(ctx context.Context, id ApiLinkId) (result GetOper var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_listbyproduct.go index 4c0cda2c870..a96f5e4967e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go index b8a0dc48684..9917c2f8e25 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkCreateOrUpdate(ctx context.Context, var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkget.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkget.go index 3eddb1e9cc1..abec05ea983 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinkget.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkGet(ctx context.Context, id TagApiL var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go index b39a8283dfe..aa0d3d57a51 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/method_workspacetagapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagApiLinkListByProductOperationOptions) ToHeaders() *client.He func (o WorkspaceTagApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/version.go b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/version.go index e3573d62c79..3b3ccc1ac67 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagapilink/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagapilink/version.go @@ -1,12 +1,10 @@ package tagapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagapilink/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/README.md b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/README.md index 2998a17c6fb..15219f85f5d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink` Documentation -The `tagoperationlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tagoperationlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/client.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/client.go index e582ef4198c..72e799b13ad 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/client.go @@ -15,7 +15,7 @@ type TagOperationLinkClient struct { } func NewTagOperationLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagOperationLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagoperationlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagoperationlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagOperationLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_operationlink.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_operationlink.go index c714bd0244c..86160e6387b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_operationlink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_operationlink.go @@ -46,7 +46,7 @@ func ParseOperationLinkID(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationLinkIDInsensitively(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tag.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tag.go index c2c5d5834d5..d4c60c78f5b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tagoperationlink.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tagoperationlink.go index 8d1d98640ce..06c1e2b5847 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tagoperationlink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_tagoperationlink.go @@ -48,7 +48,7 @@ func ParseTagOperationLinkID(input string) (*TagOperationLinkId, error) { } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagOperationLinkIDInsensitively(input string) (*TagOperationLinkId, er } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_workspacetag.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_workspacetag.go index 9b722df3460..ef37b3e545b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_createorupdate.go index e306fb5a87c..392fea2c56c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) CreateOrUpdate(ctx context.Context, id Operation var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_get.go index 9f16e16283d..179efd55590 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_get.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) Get(ctx context.Context, id OperationLinkId) (re var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_listbyproduct.go index cee618cdcb6..409ad05fede 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go index fcb4d980ef4..b5282d8c451 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkCreateOrUpdate(ctx cont var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go index 8e90fec49fc..4aed112d5f8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinkget.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkGet(ctx context.Context var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go index 46445e555b0..ec6c721589d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/version.go b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/version.go index 646417c292c..7692cd9a227 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagoperationlink/version.go @@ -1,12 +1,10 @@ package tagoperationlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagoperationlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagoperationlink/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/README.md b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/README.md index 49f9145303c..b685b087511 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tagproductlink` Documentation -The `tagproductlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tagproductlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/client.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/client.go index 955dda813c9..4575780b827 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/client.go @@ -15,7 +15,7 @@ type TagProductLinkClient struct { } func NewTagProductLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagProductLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagproductlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagproductlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagProductLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_productlink.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_productlink.go index ebd018211ce..d6e9874cda1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_productlink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_productlink.go @@ -46,7 +46,7 @@ func ParseProductLinkID(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductLinkIDInsensitively(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tag.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tag.go index 4ef3fd4eea3..4f54968e9b8 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tagproductlink.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tagproductlink.go index bf8fe163803..856bb600a64 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tagproductlink.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_tagproductlink.go @@ -48,7 +48,7 @@ func ParseTagProductLinkID(input string) (*TagProductLinkId, error) { } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagProductLinkIDInsensitively(input string) (*TagProductLinkId, error) } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_workspacetag.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_workspacetag.go index aab9b9ab186..862c2492b1b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_createorupdate.go index 3dde143776e..d29aa87e45b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) CreateOrUpdate(ctx context.Context, id ProductLink var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_get.go index 8d3e297151d..8c78f838b6a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_get.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) Get(ctx context.Context, id ProductLinkId) (result var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_listbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_listbyproduct.go index c1d3225b9ab..5a81c12a0c3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go index b8d0d74206a..00efc8105c3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkCreateOrUpdate(ctx context. var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkget.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkget.go index 97e0f8b09c9..bed6edf51c9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkget.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinkget.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkGet(ctx context.Context, id var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go index 374d9806a47..b225404de53 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/method_workspacetagproductlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagProductLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceTagProductLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/version.go b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/version.go index 8eac870fe8e..744925f6f54 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagproductlink/version.go @@ -1,12 +1,10 @@ package tagproductlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagproductlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagproductlink/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagresource/README.md b/resource-manager/apimanagement/2023-05-01-preview/tagresource/README.md index 62f91b99fdb..b68ea23cb67 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagresource/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tagresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tagresource` Documentation -The `tagresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tagresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagresource/client.go b/resource-manager/apimanagement/2023-05-01-preview/tagresource/client.go index 9a4e989f378..e368d7173e2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagresource/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagresource/client.go @@ -15,7 +15,7 @@ type TagResourceClient struct { } func NewTagResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TagResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagresource/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tagresource/id_service.go index 7a6a2163595..79c6c3d76d3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagresource/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagresource/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/tagresource/method_listbyservice.go index 0d880dc6dad..3daedbb3d18 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tagresource/version.go b/resource-manager/apimanagement/2023-05-01-preview/tagresource/version.go index b8fbb930533..447df62592d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tagresource/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tagresource/version.go @@ -1,12 +1,10 @@ package tagresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagresource/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/README.md b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/README.md index 5c4e5a9ac9c..1903200b82c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tenantaccess` Documentation -The `tenantaccess` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tenantaccess` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/client.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/client.go index d36cd27765c..131dd722282 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/client.go @@ -15,7 +15,7 @@ type TenantAccessClient struct { } func NewTenantAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_access.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_access.go index 927925f0366..f2aea0cdd42 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_access.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_service.go index 6dbbad41263..6753200ac92 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_create.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_create.go index 73ced417651..0cd71b7a599 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_create.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Create(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_get.go index 88298263510..832e64d03c0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_get.go @@ -45,7 +45,6 @@ func (c TenantAccessClient) Get(ctx context.Context, id AccessId) (result GetOpe var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listbyservice.go index 541de46f891..6f51efcc9b2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listsecrets.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listsecrets.go index 237989384de..12e38530891 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listsecrets.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_listsecrets.go @@ -46,7 +46,6 @@ func (c TenantAccessClient) ListSecrets(ctx context.Context, id AccessId) (resul var model AccessInformationSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_update.go index 73793de2965..a01c3d4829c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Update(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/version.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/version.go index e9f9897030c..37b9ebd3d5e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccess/version.go @@ -1,12 +1,10 @@ package tenantaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccess/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/client.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/client.go index 1540a8d6df5..7c14713409a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/client.go @@ -15,7 +15,7 @@ type TenantAccessGitClient struct { } func NewTenantAccessGitClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessGitClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccessgit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccessgit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessGitClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/id_access.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/id_access.go index c4c17575eda..f067740b97e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/id_access.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/version.go b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/version.go index eb9fa749880..1d8476f9c56 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantaccessgit/version.go @@ -1,12 +1,10 @@ package tenantaccessgit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccessgit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccessgit/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/README.md b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/README.md index acec02706d9..360c98d8f03 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration` Documentation -The `tenantconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tenantconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/client.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/client.go index 0251dfc8eb5..bd86c8dd00f 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/client.go @@ -15,7 +15,7 @@ type TenantConfigurationClient struct { } func NewTenantConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/id_service.go index 0a039a17bc1..47fc7a837b0 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/version.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/version.go index 79029bcb4ad..4cc8ac36fb9 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfiguration/version.go @@ -1,12 +1,10 @@ package tenantconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfiguration/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/README.md b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/README.md index aa45eb49cb8..0272110f988 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate` Documentation -The `tenantconfigurationsyncstate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tenantconfigurationsyncstate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/client.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/client.go index f79f21d0f2c..d01b2487b59 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/client.go @@ -15,7 +15,7 @@ type TenantConfigurationSyncStateClient struct { } func NewTenantConfigurationSyncStateClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationSyncStateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationSyncStateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/id_service.go index 354cdf503e1..54597cebc65 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go index fee9e2d3374..1992a54ac27 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go @@ -46,7 +46,6 @@ func (c TenantConfigurationSyncStateClient) TenantConfigurationGetSyncState(ctx var model TenantConfigurationSyncStateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/version.go b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/version.go index 9ae468c57b4..f5a1227cbce 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantconfigurationsyncstate/version.go @@ -1,12 +1,10 @@ package tenantconfigurationsyncstate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfigurationsyncstate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfigurationsyncstate/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/README.md b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/README.md index d575a4515e8..8b7ae25685a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/tenantsettings` Documentation -The `tenantsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `tenantsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/client.go b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/client.go index db0f8f815eb..71cea0dd788 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/client.go @@ -15,7 +15,7 @@ type TenantSettingsClient struct { } func NewTenantSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/id_service.go index 68a0c265a26..8e42a6aaa11 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_get.go index 40a9e01b321..35b4057e1e2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_get.go @@ -46,7 +46,6 @@ func (c TenantSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model TenantSettingsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_listbyservice.go index 12487f36224..b0ee3853b15 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/version.go b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/version.go index e5a1f5dbb06..5ef8dff5a2a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/tenantsettings/version.go @@ -1,12 +1,10 @@ package tenantsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantsettings/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/README.md b/resource-manager/apimanagement/2023-05-01-preview/user/README.md index d476f838793..6b3d891c4bb 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `user` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/client.go b/resource-manager/apimanagement/2023-05-01-preview/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/user/id_service.go index 4793d7dba1c..e39d35a9443 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/user/id_user.go index 46e79677949..b758a66bd0b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/user/method_createorupdate.go index b1cf998602d..3d85a55770e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c UserClient) CreateOrUpdate(ctx context.Context, id UserId, input UserCre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/user/method_delete.go index e5d13dba442..80b3c08013c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/method_delete.go @@ -41,6 +41,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/user/method_get.go index 1237761289c..e7fc56ebb3e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/user/method_listbyservice.go index e098057b246..2fc7fb34899 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/user/method_update.go index 11353f91240..d0628f53b8d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c UserClient) Update(ctx context.Context, id UserId, input UserUpdateParam var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/user/version.go b/resource-manager/apimanagement/2023-05-01-preview/user/version.go index d6d166b4c7f..d2067c1d7d7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/user/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/client.go b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/client.go index 2be6b996059..a78825dedcc 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/client.go @@ -15,7 +15,7 @@ type UserConfirmationPasswordSendClient struct { } func NewUserConfirmationPasswordSendClientWithBaseURI(sdkApi sdkEnv.Api) (*UserConfirmationPasswordSendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserConfirmationPasswordSendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/id_user.go index 119b0594c8a..100e150391d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go index b1915a44d82..700323d679d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go +++ b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go @@ -33,6 +33,7 @@ func (o UserConfirmationPasswordSendOperationOptions) ToHeaders() *client.Header func (o UserConfirmationPasswordSendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/version.go b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/version.go index 3b33dc8be7f..7a469a1538b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/userconfirmationpasswordsend/version.go @@ -1,12 +1,10 @@ package userconfirmationpasswordsend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/userconfirmationpasswordsend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/userconfirmationpasswordsend/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usergroup/README.md b/resource-manager/apimanagement/2023-05-01-preview/usergroup/README.md index 8a7559030ec..1753fafd861 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usergroup/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/usergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/usergroup` Documentation -The `usergroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `usergroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/usergroup/client.go b/resource-manager/apimanagement/2023-05-01-preview/usergroup/client.go index 74829119980..c03391f5989 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usergroup/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usergroup/client.go @@ -15,7 +15,7 @@ type UserGroupClient struct { } func NewUserGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*UserGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usergroup/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/usergroup/id_user.go index dbcd62c7aff..d3e2840860c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usergroup/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usergroup/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usergroup/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/usergroup/method_list.go index cfe2c191701..0585c10cd75 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usergroup/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usergroup/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usergroup/version.go b/resource-manager/apimanagement/2023-05-01-preview/usergroup/version.go index a762d435f4e..fb207c0f048 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usergroup/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usergroup/version.go @@ -1,12 +1,10 @@ package usergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usergroup/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/useridentity/README.md b/resource-manager/apimanagement/2023-05-01-preview/useridentity/README.md index 22a6b012921..8cff92d0a5e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/useridentity/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/useridentity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/useridentity` Documentation -The `useridentity` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `useridentity` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/useridentity/client.go b/resource-manager/apimanagement/2023-05-01-preview/useridentity/client.go index ba997999551..252dc69cb22 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/useridentity/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/useridentity/client.go @@ -15,7 +15,7 @@ type UserIdentityClient struct { } func NewUserIdentityClientWithBaseURI(sdkApi sdkEnv.Api) (*UserIdentityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "useridentity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "useridentity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserIdentityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/useridentity/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/useridentity/id_user.go index 81e0f7f5380..4835b28eb40 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/useridentity/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/useridentity/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/useridentity/version.go b/resource-manager/apimanagement/2023-05-01-preview/useridentity/version.go index 5f38512d907..24260718fa1 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/useridentity/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/useridentity/version.go @@ -1,12 +1,10 @@ package useridentity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/useridentity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/useridentity/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/users/README.md b/resource-manager/apimanagement/2023-05-01-preview/users/README.md index 7ac4c37c6ae..6005e6459d6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/users/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `users` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/users/client.go b/resource-manager/apimanagement/2023-05-01-preview/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/users/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/users/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/users/id_user.go index f309b6fbd68..73fb129b8ef 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/users/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/users/method_usergeneratessourl.go b/resource-manager/apimanagement/2023-05-01-preview/users/method_usergeneratessourl.go index 500ea8362b0..bab32e3f071 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/users/method_usergeneratessourl.go +++ b/resource-manager/apimanagement/2023-05-01-preview/users/method_usergeneratessourl.go @@ -46,7 +46,6 @@ func (c UsersClient) UserGenerateSsoUrl(ctx context.Context, id UserId) (result var model GenerateSsoUrlResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/users/version.go b/resource-manager/apimanagement/2023-05-01-preview/users/version.go index 61f7cec788a..3abcc506817 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/users/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/README.md b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/README.md index f27338c8281..70018b6349b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/usersubscription` Documentation -The `usersubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `usersubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/client.go b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/client.go index f9dd0627128..82b11b9ee90 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/client.go @@ -15,7 +15,7 @@ type UserSubscriptionClient struct { } func NewUserSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/id_user.go index b993469b4bf..fc76652d568 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/method_list.go b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/method_list.go index 9acd966ed75..f2118eff505 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/method_list.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/version.go b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/version.go index e00ed5d0c24..143434bed34 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usersubscription/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usersubscription/version.go @@ -1,12 +1,10 @@ package usersubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersubscription/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usertoken/README.md b/resource-manager/apimanagement/2023-05-01-preview/usertoken/README.md index 18f5d5ef00e..be93bd3277d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usertoken/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/usertoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/usertoken` Documentation -The `usertoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `usertoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/usertoken/client.go b/resource-manager/apimanagement/2023-05-01-preview/usertoken/client.go index adeb6294866..fc8cfaecc12 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usertoken/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usertoken/client.go @@ -15,7 +15,7 @@ type UserTokenClient struct { } func NewUserTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*UserTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usertoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usertoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usertoken/id_user.go b/resource-manager/apimanagement/2023-05-01-preview/usertoken/id_user.go index e0f7cf9ee4b..bbb27ed3ed3 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usertoken/id_user.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usertoken/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usertoken/method_usergetsharedaccesstoken.go b/resource-manager/apimanagement/2023-05-01-preview/usertoken/method_usergetsharedaccesstoken.go index 28e0efb393e..28d84cc2ee6 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usertoken/method_usergetsharedaccesstoken.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usertoken/method_usergetsharedaccesstoken.go @@ -50,7 +50,6 @@ func (c UserTokenClient) UserGetSharedAccessToken(ctx context.Context, id UserId var model UserTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/usertoken/version.go b/resource-manager/apimanagement/2023-05-01-preview/usertoken/version.go index 7e6909410d1..4a5af8b7ab2 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/usertoken/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/usertoken/version.go @@ -1,12 +1,10 @@ package usertoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usertoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usertoken/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/README.md b/resource-manager/apimanagement/2023-05-01-preview/workspace/README.md index 22477fadd29..26b5976837c 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `workspace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/client.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/id_service.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/id_service.go index 8d9a4894f5c..e7da8ebcfda 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/id_service.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/id_workspace.go index d86572af484..25a370d981a 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_createorupdate.go index dfbaee168e5..e0e6326e76d 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_delete.go index 41a2b818416..92db0fb9837 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_get.go index 2bea0d0912a..75af77961fd 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_listbyservice.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_listbyservice.go index d7edc0c9746..de7b59ee645 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_listbyservice.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_update.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_update.go index 840713f4a4f..88ff8b28c99 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/method_update.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspace/version.go b/resource-manager/apimanagement/2023-05-01-preview/workspace/version.go index eaa52538e80..583ece687af 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspace/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/README.md b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/README.md index c670b0da662..5fa56d58633 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/README.md +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy` Documentation -The `workspacepolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2023-05-01-preview`). +The `workspacepolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/client.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/client.go index d4e3c38bc31..96b70b2680b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/client.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/client.go @@ -15,7 +15,7 @@ type WorkspacePolicyClient struct { } func NewWorkspacePolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacepolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacepolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/id_workspace.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/id_workspace.go index 12c8b423579..a869e05757e 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/id_workspace.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_createorupdate.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_createorupdate.go index 9385b41a924..50f1b5227f7 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspacePolicyClient) CreateOrUpdate(ctx context.Context, id WorkspaceI var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_delete.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_delete.go index ac1ad5e7365..6b8d6ba6161 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_delete.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_get.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_get.go index 90e7b0877f6..03cdbe063ab 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_get.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WorkspacePolicyClient) Get(ctx context.Context, id WorkspaceId, options var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/version.go b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/version.go index 0003c7cbeb9..00960ac189b 100644 --- a/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/version.go +++ b/resource-manager/apimanagement/2023-05-01-preview/workspacepolicy/version.go @@ -1,12 +1,10 @@ package workspacepolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacepolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacepolicy/2023-05-01-preview" } diff --git a/resource-manager/apimanagement/2024-05-01/allpolicies/README.md b/resource-manager/apimanagement/2024-05-01/allpolicies/README.md index 9b9fe691039..262d8857c1c 100644 --- a/resource-manager/apimanagement/2024-05-01/allpolicies/README.md +++ b/resource-manager/apimanagement/2024-05-01/allpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/allpolicies` Documentation -The `allpolicies` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `allpolicies` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/allpolicies/client.go b/resource-manager/apimanagement/2024-05-01/allpolicies/client.go index ddd718e8dde..0bc23a25efd 100644 --- a/resource-manager/apimanagement/2024-05-01/allpolicies/client.go +++ b/resource-manager/apimanagement/2024-05-01/allpolicies/client.go @@ -15,7 +15,7 @@ type AllPoliciesClient struct { } func NewAllPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*AllPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "allpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "allpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AllPoliciesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/allpolicies/id_service.go b/resource-manager/apimanagement/2024-05-01/allpolicies/id_service.go index 28341dd0c33..c4a4b8213ad 100644 --- a/resource-manager/apimanagement/2024-05-01/allpolicies/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/allpolicies/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/allpolicies/version.go b/resource-manager/apimanagement/2024-05-01/allpolicies/version.go index cc456cdda84..aa9c15d17bc 100644 --- a/resource-manager/apimanagement/2024-05-01/allpolicies/version.go +++ b/resource-manager/apimanagement/2024-05-01/allpolicies/version.go @@ -1,12 +1,10 @@ package allpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/allpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/allpolicies/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/api/README.md b/resource-manager/apimanagement/2024-05-01/api/README.md index 9982403d633..44f19f9b549 100644 --- a/resource-manager/apimanagement/2024-05-01/api/README.md +++ b/resource-manager/apimanagement/2024-05-01/api/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/api` Documentation -The `api` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `api` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/api/client.go b/resource-manager/apimanagement/2024-05-01/api/client.go index 5ce28196132..2f776384d61 100644 --- a/resource-manager/apimanagement/2024-05-01/api/client.go +++ b/resource-manager/apimanagement/2024-05-01/api/client.go @@ -15,7 +15,7 @@ type ApiClient struct { } func NewApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/api/id_api.go b/resource-manager/apimanagement/2024-05-01/api/id_api.go index a70d7f5620c..ac1a5275add 100644 --- a/resource-manager/apimanagement/2024-05-01/api/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/api/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/api/id_service.go b/resource-manager/apimanagement/2024-05-01/api/id_service.go index c50464ed710..2671c279deb 100644 --- a/resource-manager/apimanagement/2024-05-01/api/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/api/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/api/id_workspace.go b/resource-manager/apimanagement/2024-05-01/api/id_workspace.go index 33d92e28640..9a85d3b87ce 100644 --- a/resource-manager/apimanagement/2024-05-01/api/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/api/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/api/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/api/id_workspaceapi.go index 5d2d28b9caf..323f04187f8 100644 --- a/resource-manager/apimanagement/2024-05-01/api/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/api/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/api/method_createorupdate.go index b95d5839846..82ae2ce07af 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_delete.go b/resource-manager/apimanagement/2024-05-01/api/method_delete.go index d4625ea7e66..f1da7b68270 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_delete.go @@ -39,6 +39,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_get.go b/resource-manager/apimanagement/2024-05-01/api/method_get.go index 07f671ef642..0b768d34293 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_get.go @@ -45,7 +45,6 @@ func (c ApiClient) Get(ctx context.Context, id ApiId) (result GetOperationRespon var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/api/method_listbyservice.go index 6b9bc61fa02..637304ef1e8 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_update.go b/resource-manager/apimanagement/2024-05-01/api/method_update.go index 491fbbeb5c8..6310b4ab9ad 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) Update(ctx context.Context, id ApiId, input ApiUpdateContract var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapicreateorupdate.go b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapicreateorupdate.go index c7a255c688a..0af4458649e 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapicreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapicreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapidelete.go b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapidelete.go index 44393545209..719631183af 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapidelete.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapidelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiget.go b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiget.go index 220b742d573..23fa96a3827 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiget.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiget.go @@ -45,7 +45,6 @@ func (c ApiClient) WorkspaceApiGet(ctx context.Context, id WorkspaceApiId) (resu var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapilistbyservice.go b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapilistbyservice.go index aeed0e70077..59509cef86c 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapilistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapilistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceApiListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiupdate.go b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiupdate.go index 25f72466ee3..7bcd19acc0f 100644 --- a/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiupdate.go +++ b/resource-manager/apimanagement/2024-05-01/api/method_workspaceapiupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiClient) WorkspaceApiUpdate(ctx context.Context, id WorkspaceApiId, in var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/api/version.go b/resource-manager/apimanagement/2024-05-01/api/version.go index 399fdfa6a15..0bef534e036 100644 --- a/resource-manager/apimanagement/2024-05-01/api/version.go +++ b/resource-manager/apimanagement/2024-05-01/api/version.go @@ -1,12 +1,10 @@ package api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/api/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/README.md b/resource-manager/apimanagement/2024-05-01/apidiagnostic/README.md index 48644332d5c..f7089ddb16b 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/README.md +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apidiagnostic` Documentation -The `apidiagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apidiagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/client.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/client.go index 10bdb8741b2..4e0be722654 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/client.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/client.go @@ -15,7 +15,7 @@ type ApiDiagnosticClient struct { } func NewApiDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiDiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apidiagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apidiagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiDiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_api.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_api.go index 1c99bf5821c..30c3eaab96f 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_apidiagnostic.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_apidiagnostic.go index d2f0e00b2bb..604e7513a08 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_apidiagnostic.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_apidiagnostic.go @@ -46,7 +46,7 @@ func ParseApiDiagnosticID(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiDiagnosticIDInsensitively(input string) (*ApiDiagnosticId, error) { } id := ApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapi.go index da3235190c0..e60db8bc41a 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapidiagnostic.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapidiagnostic.go index 19f41ce69ef..23049db6c12 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapidiagnostic.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/id_workspaceapidiagnostic.go @@ -48,7 +48,7 @@ func ParseWorkspaceApiDiagnosticID(input string) (*WorkspaceApiDiagnosticId, err } id := WorkspaceApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceApiDiagnosticIDInsensitively(input string) (*WorkspaceApiDiag } id := WorkspaceApiDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_createorupdate.go index 2551a5d1445..4f82c372b8f 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiDiagnosticClient) CreateOrUpdate(ctx context.Context, id ApiDiagnosti var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_delete.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_delete.go index a781c7b154b..ede64465f75 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_get.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_get.go index bb113001b36..cd148612858 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_get.go @@ -45,7 +45,6 @@ func (c ApiDiagnosticClient) Get(ctx context.Context, id ApiDiagnosticId) (resul var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_listbyservice.go index 96b6f06f674..96e04e5bd42 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_update.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_update.go index 00ef4533a35..1352f0f032b 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiDiagnosticClient) Update(ctx context.Context, id ApiDiagnosticId, inp var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticcreateorupdate.go index 538d4891707..a7ce26b837a 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiDiagnosticCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceApiDiagnosticCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiDiagnosticClient) WorkspaceApiDiagnosticCreateOrUpdate(ctx context.Co var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticdelete.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticdelete.go index 6b4dab14250..2dd0b82662b 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticdelete.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiDiagnosticDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiDiagnosticDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticget.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticget.go index 18c3378fec4..7d51f2ff87b 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticget.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticget.go @@ -45,7 +45,6 @@ func (c ApiDiagnosticClient) WorkspaceApiDiagnosticGet(ctx context.Context, id W var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticlistbyworkspace.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticlistbyworkspace.go index 1b1cd745d3f..4f2fac95e89 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticlistbyworkspace.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticlistbyworkspace.go @@ -41,6 +41,7 @@ func (o WorkspaceApiDiagnosticListByWorkspaceOperationOptions) ToHeaders() *clie func (o WorkspaceApiDiagnosticListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticupdate.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticupdate.go index c326f3478f7..a219cfaf37e 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/method_workspaceapidiagnosticupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiDiagnosticUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiDiagnosticUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiDiagnosticClient) WorkspaceApiDiagnosticUpdate(ctx context.Context, i var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apidiagnostic/version.go b/resource-manager/apimanagement/2024-05-01/apidiagnostic/version.go index b56bb21ecac..24c17fe559d 100644 --- a/resource-manager/apimanagement/2024-05-01/apidiagnostic/version.go +++ b/resource-manager/apimanagement/2024-05-01/apidiagnostic/version.go @@ -1,12 +1,10 @@ package apidiagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apidiagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apidiagnostic/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apigateway/README.md b/resource-manager/apimanagement/2024-05-01/apigateway/README.md index 9667631849a..50b0d833d89 100644 --- a/resource-manager/apimanagement/2024-05-01/apigateway/README.md +++ b/resource-manager/apimanagement/2024-05-01/apigateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apigateway` Documentation -The `apigateway` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apigateway` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apigateway/client.go b/resource-manager/apimanagement/2024-05-01/apigateway/client.go index 2ac4cbaf18e..b1b942c444d 100644 --- a/resource-manager/apimanagement/2024-05-01/apigateway/client.go +++ b/resource-manager/apimanagement/2024-05-01/apigateway/client.go @@ -15,7 +15,7 @@ type ApiGatewayClient struct { } func NewApiGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apigateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apigateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiGatewayClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apigateway/id_gateway.go b/resource-manager/apimanagement/2024-05-01/apigateway/id_gateway.go index ff4cb6b9891..f7a8f1018b9 100644 --- a/resource-manager/apimanagement/2024-05-01/apigateway/id_gateway.go +++ b/resource-manager/apimanagement/2024-05-01/apigateway/id_gateway.go @@ -42,7 +42,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apigateway/method_get.go b/resource-manager/apimanagement/2024-05-01/apigateway/method_get.go index 32444f86cfd..781b15ca42b 100644 --- a/resource-manager/apimanagement/2024-05-01/apigateway/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apigateway/method_get.go @@ -45,7 +45,6 @@ func (c ApiGatewayClient) Get(ctx context.Context, id GatewayId) (result GetOper var model ApiManagementGatewayResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apigateway/version.go b/resource-manager/apimanagement/2024-05-01/apigateway/version.go index ceac1352934..b892bb5fb53 100644 --- a/resource-manager/apimanagement/2024-05-01/apigateway/version.go +++ b/resource-manager/apimanagement/2024-05-01/apigateway/version.go @@ -1,12 +1,10 @@ package apigateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apigateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apigateway/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/README.md b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/README.md index 2744cb7ac29..81069f9fa2b 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/README.md +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection` Documentation -The `apigatewayconfigconnection` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apigatewayconfigconnection` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/client.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/client.go index 408e8af0cdf..d741b0c62a4 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/client.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/client.go @@ -15,7 +15,7 @@ type ApiGatewayConfigConnectionClient struct { } func NewApiGatewayConfigConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiGatewayConfigConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apigatewayconfigconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apigatewayconfigconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiGatewayConfigConnectionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_configconnection.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_configconnection.go index 3313957c1f5..6ffd9d78fa9 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_configconnection.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_configconnection.go @@ -44,7 +44,7 @@ func ParseConfigConnectionID(input string) (*ConfigConnectionId, error) { } id := ConfigConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigConnectionIDInsensitively(input string) (*ConfigConnectionId, er } id := ConfigConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_gateway.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_gateway.go index f9e73c43740..0defcfb27c4 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_gateway.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/id_gateway.go @@ -42,7 +42,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_delete.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_delete.go index 1fd0e2e9dad..5c3d104c673 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_get.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_get.go index 66a57cc0234..c58cab7e777 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/method_get.go @@ -45,7 +45,6 @@ func (c ApiGatewayConfigConnectionClient) Get(ctx context.Context, id ConfigConn var model ApiManagementGatewayConfigConnectionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/version.go b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/version.go index 0f073d11f2c..29dbbb7c428 100644 --- a/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/version.go +++ b/resource-manager/apimanagement/2024-05-01/apigatewayconfigconnection/version.go @@ -1,12 +1,10 @@ package apigatewayconfigconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apigatewayconfigconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apigatewayconfigconnection/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/README.md b/resource-manager/apimanagement/2024-05-01/apiissue/README.md index 2c34c64f24d..88872fda152 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiissue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiissue` Documentation -The `apiissue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiissue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/client.go b/resource-manager/apimanagement/2024-05-01/apiissue/client.go index 33f2a33d684..6350de2a21e 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/client.go @@ -15,7 +15,7 @@ type ApiIssueClient struct { } func NewApiIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/id_api.go b/resource-manager/apimanagement/2024-05-01/apiissue/id_api.go index f42ff72ff21..063c20d8c75 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/id_apiissue.go b/resource-manager/apimanagement/2024-05-01/apiissue/id_apiissue.go index 7b13fff0230..267ea58855b 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/id_apiissue.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apiissue/method_createorupdate.go index 2c843315ed6..0a592af3683 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueClient) CreateOrUpdate(ctx context.Context, id ApiIssueId, input var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/method_delete.go b/resource-manager/apimanagement/2024-05-01/apiissue/method_delete.go index c51a70bf93d..51c49f6e8ea 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/method_get.go b/resource-manager/apimanagement/2024-05-01/apiissue/method_get.go index a4f0ff0be8a..b364bf2fbce 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiIssueClient) Get(ctx context.Context, id ApiIssueId, options GetOpera var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apiissue/method_listbyservice.go index 314d87e9b6e..fc909bd1842 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/method_update.go b/resource-manager/apimanagement/2024-05-01/apiissue/method_update.go index 5db5804bbb2..0e09126c1ed 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiIssueClient) Update(ctx context.Context, id ApiIssueId, input IssueUp var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissue/version.go b/resource-manager/apimanagement/2024-05-01/apiissue/version.go index d1c701cf8c2..ab4847463f1 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissue/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiissue/version.go @@ -1,12 +1,10 @@ package apiissue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissue/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/README.md b/resource-manager/apimanagement/2024-05-01/apiissueattachment/README.md index d2218a5e07a..c4b3a77443c 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiissueattachment` Documentation -The `apiissueattachment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiissueattachment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/client.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/client.go index 84b276260e3..ee1f89ab366 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/client.go @@ -15,7 +15,7 @@ type ApiIssueAttachmentClient struct { } func NewApiIssueAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueAttachmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissueattachment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissueattachment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueAttachmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_apiissue.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_apiissue.go index b77d45c0fdb..e7dc1375f21 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_apiissue.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_attachment.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_attachment.go index c57aa82518a..542f104ced8 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_attachment.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/id_attachment.go @@ -48,7 +48,7 @@ func ParseAttachmentID(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAttachmentIDInsensitively(input string) (*AttachmentId, error) { } id := AttachmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_createorupdate.go index a44575c4ae0..0433d95beeb 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueAttachmentClient) CreateOrUpdate(ctx context.Context, id Attachm var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_delete.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_delete.go index 867e45b1ffc..8eb76db21c6 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_get.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_get.go index f544ca53f2b..9d487af13e5 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueAttachmentClient) Get(ctx context.Context, id AttachmentId) (res var model IssueAttachmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_listbyservice.go index 7e2162ab2a9..5805727d267 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissueattachment/version.go b/resource-manager/apimanagement/2024-05-01/apiissueattachment/version.go index b09afb7a70c..37de6ff5edf 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissueattachment/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiissueattachment/version.go @@ -1,12 +1,10 @@ package apiissueattachment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissueattachment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissueattachment/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/README.md b/resource-manager/apimanagement/2024-05-01/apiissuecomment/README.md index ff780de7968..e5f75ee9496 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiissuecomment` Documentation -The `apiissuecomment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiissuecomment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/client.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/client.go index 22377af4fed..8ce8ce1be89 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/client.go @@ -15,7 +15,7 @@ type ApiIssueCommentClient struct { } func NewApiIssueCommentClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiIssueCommentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiissuecomment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiissuecomment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiIssueCommentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_apiissue.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_apiissue.go index dff007275dc..62a078b3a21 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_apiissue.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_apiissue.go @@ -46,7 +46,7 @@ func ParseApiIssueID(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiIssueIDInsensitively(input string) (*ApiIssueId, error) { } id := ApiIssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_comment.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_comment.go index 46ee496fa82..d0ec704a1bc 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_comment.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/id_comment.go @@ -48,7 +48,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_createorupdate.go index 82f8efd70c7..df5d55dbf21 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiIssueCommentClient) CreateOrUpdate(ctx context.Context, id CommentId, var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_delete.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_delete.go index 725bbb2f2a8..de8f0e9c2cd 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_get.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_get.go index 459dd2af4c6..596b1a6dd11 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_get.go @@ -45,7 +45,6 @@ func (c ApiIssueCommentClient) Get(ctx context.Context, id CommentId) (result Ge var model IssueCommentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_listbyservice.go index a1f56a2f9d7..4b5e59c9821 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiissuecomment/version.go b/resource-manager/apimanagement/2024-05-01/apiissuecomment/version.go index 198c528a868..24f9fe0f7f2 100644 --- a/resource-manager/apimanagement/2024-05-01/apiissuecomment/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiissuecomment/version.go @@ -1,12 +1,10 @@ package apiissuecomment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiissuecomment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiissuecomment/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/README.md b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/README.md index 4497d188259..49c96adb809 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/README.md +++ b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus` Documentation -The `apimanagementgatewayskus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apimanagementgatewayskus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/client.go b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/client.go index cdf7fca5094..d5a1eb87d56 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/client.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/client.go @@ -15,7 +15,7 @@ type ApiManagementGatewaySkusClient struct { } func NewApiManagementGatewaySkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementGatewaySkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementgatewayskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementgatewayskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementGatewaySkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/id_gateway.go b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/id_gateway.go index 8b0ae20d1ab..43aa6441353 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/id_gateway.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/id_gateway.go @@ -42,7 +42,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/version.go b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/version.go index fe9d40d7b24..05a55972516 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/version.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementgatewayskus/version.go @@ -1,12 +1,10 @@ package apimanagementgatewayskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementgatewayskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementgatewayskus/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/README.md b/resource-manager/apimanagement/2024-05-01/apimanagementservice/README.md index 12aac2b9d10..206716bea3e 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/README.md +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apimanagementservice` Documentation -The `apimanagementservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apimanagementservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/client.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/client.go index 7c5932f7316..4816927cda9 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/client.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceClient struct { } func NewApiManagementServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/id_service.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/id_service.go index 5183555d0c8..b8c710f4cb3 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_checknameavailability.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_checknameavailability.go index 2a8c875ee1f..0aa5392bae2 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_checknameavailability.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ApiManagementServiceClient) CheckNameAvailability(ctx context.Context, i var model ApiManagementServiceNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_get.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_get.go index 771928691f7..f4d6a791731 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_get.go @@ -45,7 +45,6 @@ func (c ApiManagementServiceClient) Get(ctx context.Context, id ServiceId) (resu var model ApiManagementServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getdomainownershipidentifier.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getdomainownershipidentifier.go index 40d031a5f83..acb89d914e7 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getdomainownershipidentifier.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getdomainownershipidentifier.go @@ -47,7 +47,6 @@ func (c ApiManagementServiceClient) GetDomainOwnershipIdentifier(ctx context.Con var model ApiManagementServiceGetDomainOwnershipIdentifierResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getssotoken.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getssotoken.go index ecf0a465d0f..7d2b5a93c5f 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getssotoken.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/method_getssotoken.go @@ -46,7 +46,6 @@ func (c ApiManagementServiceClient) GetSsoToken(ctx context.Context, id ServiceI var model ApiManagementServiceGetSsoTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementservice/version.go b/resource-manager/apimanagement/2024-05-01/apimanagementservice/version.go index bfaf0eacc2b..2a8a76859fd 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementservice/version.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementservice/version.go @@ -1,12 +1,10 @@ package apimanagementservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementservice/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/README.md b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/README.md index de89d1e2136..16ad052283c 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/README.md +++ b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus` Documentation -The `apimanagementserviceskus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apimanagementserviceskus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/client.go b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/client.go index 33c4554cc31..d78d3a46960 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/client.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/client.go @@ -15,7 +15,7 @@ type ApiManagementServiceSkusClient struct { } func NewApiManagementServiceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementServiceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementserviceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementServiceSkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/id_service.go b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/id_service.go index 1f1fc07284a..92edf692b6f 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/version.go b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/version.go index 91f1b308955..6c69acd5b7c 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/version.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementserviceskus/version.go @@ -1,12 +1,10 @@ package apimanagementserviceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementserviceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementserviceskus/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/README.md b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/README.md index 7f0a0de302a..130a6d074c9 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/README.md +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks` Documentation -The `apimanagementworkspacelinks` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apimanagementworkspacelinks` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/client.go b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/client.go index a29800e3b48..57c48d6d7de 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/client.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/client.go @@ -15,7 +15,7 @@ type ApiManagementWorkspaceLinksClient struct { } func NewApiManagementWorkspaceLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiManagementWorkspaceLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimanagementworkspacelinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimanagementworkspacelinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiManagementWorkspaceLinksClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_service.go b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_service.go index df8c971eb74..231b41e359e 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_workspacelink.go b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_workspacelink.go index c69afaa4a01..f261b1df7fb 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_workspacelink.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/id_workspacelink.go @@ -44,7 +44,7 @@ func ParseWorkspaceLinkID(input string) (*WorkspaceLinkId, error) { } id := WorkspaceLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceLinkIDInsensitively(input string) (*WorkspaceLinkId, error) { } id := WorkspaceLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/method_apimanagementworkspacelinkget.go b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/method_apimanagementworkspacelinkget.go index 579aa82e0a9..5f5382b583b 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/method_apimanagementworkspacelinkget.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/method_apimanagementworkspacelinkget.go @@ -45,7 +45,6 @@ func (c ApiManagementWorkspaceLinksClient) ApiManagementWorkspaceLinkGet(ctx con var model ApiManagementWorkspaceLinksResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/version.go b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/version.go index 477dbd17599..aec4869cc63 100644 --- a/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/version.go +++ b/resource-manager/apimanagement/2024-05-01/apimanagementworkspacelinks/version.go @@ -1,12 +1,10 @@ package apimanagementworkspacelinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimanagementworkspacelinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimanagementworkspacelinks/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/README.md b/resource-manager/apimanagement/2024-05-01/apioperation/README.md index db356acff23..4c57c1908a1 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/README.md +++ b/resource-manager/apimanagement/2024-05-01/apioperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apioperation` Documentation -The `apioperation` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apioperation` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/client.go b/resource-manager/apimanagement/2024-05-01/apioperation/client.go index 5c9fa6d23e6..b9782eb451f 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/client.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/client.go @@ -15,7 +15,7 @@ type ApiOperationClient struct { } func NewApiOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/id_api.go b/resource-manager/apimanagement/2024-05-01/apioperation/id_api.go index 253d9153dbc..751a8abfb3b 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/id_apioperation.go b/resource-manager/apimanagement/2024-05-01/apioperation/id_apioperation.go index 57cefcbf920..3e3fe6797ca 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/id_apioperation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/id_operation.go b/resource-manager/apimanagement/2024-05-01/apioperation/id_operation.go index ae47adf61a5..279d3f927e2 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/id_operation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apioperation/id_workspaceapi.go index 15a2ebfc5ee..942099871ab 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_createorupdate.go index ee86a38b0bc..66fb1d5996e 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) CreateOrUpdate(ctx context.Context, id OperationId, var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_delete.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_delete.go index ee390d245b3..e4e9e6e90ee 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_get.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_get.go index 7fed3585ab9..ff3a98889ea 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_get.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) Get(ctx context.Context, id OperationId) (result Get var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_listbyapi.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_listbyapi.go index df8d3b45502..798fe0e7552 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_listbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_update.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_update.go index 005fc98f21a..4f5130245ac 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) Update(ctx context.Context, id OperationId, input Op var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationcreateorupdate.go index 31e0a6ea5fe..30641e7be40 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceApiOperationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationClient) WorkspaceApiOperationCreateOrUpdate(ctx context.Cont var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationdelete.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationdelete.go index 803c543da5b..d4c57385ace 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationdelete.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationget.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationget.go index 2da88a66a2f..e6dc1ea7d24 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationget.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationget.go @@ -45,7 +45,6 @@ func (c ApiOperationClient) WorkspaceApiOperationGet(ctx context.Context, id Api var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationlistbyapi.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationlistbyapi.go index dfa7091cdf8..980cf5b41d0 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationlistbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationlistbyapi.go @@ -42,6 +42,7 @@ func (o WorkspaceApiOperationListByApiOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationupdate.go b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationupdate.go index b485b35b34a..ab2d9f3e638 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/method_workspaceapioperationupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiOperationUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiOperationClient) WorkspaceApiOperationUpdate(ctx context.Context, id var model OperationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperation/version.go b/resource-manager/apimanagement/2024-05-01/apioperation/version.go index 990a5c1717d..0b387e1f3c7 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperation/version.go +++ b/resource-manager/apimanagement/2024-05-01/apioperation/version.go @@ -1,12 +1,10 @@ package apioperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperation/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/README.md b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/README.md index 2dee1c23a83..a266316f170 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apioperationpolicy` Documentation -The `apioperationpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apioperationpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/client.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/client.go index 4c1ef477115..c0dc541f2ed 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/client.go @@ -15,7 +15,7 @@ type ApiOperationPolicyClient struct { } func NewApiOperationPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_apioperation.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_apioperation.go index 15b5b760791..e8158bcb582 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_apioperation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_apioperation.go @@ -48,7 +48,7 @@ func ParseApiOperationID(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiOperationIDInsensitively(input string) (*ApiOperationId, error) { } id := ApiOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_operation.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_operation.go index a9f5f2e9bd1..99c5e55bc33 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_operation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_createorupdate.go index 3437b481d77..398b6fbd9ed 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) CreateOrUpdate(ctx context.Context, id Operati var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_delete.go index 1b77d06ed20..cd8893ce2f0 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_get.go index 53ce4e80d68..24446658831 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) Get(ctx context.Context, id OperationId, optio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go index 749273ac587..c21831c5e1a 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToHeaders() * func (o WorkspaceApiOperationPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyCreateOrUpdate(ctx var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicydelete.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicydelete.go index 47c3dded764..6aa0d0aa167 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicydelete.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToHeaders() *client.H func (o WorkspaceApiOperationPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicyget.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicyget.go index 9395af3465a..37760ed9db3 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicyget.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/method_workspaceapioperationpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiOperationPolicyGetOperationOptions) ToHeaders() *client.Head func (o WorkspaceApiOperationPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiOperationPolicyClient) WorkspaceApiOperationPolicyGet(ctx context.Con var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/version.go b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/version.go index 2ff7ac8dffa..4414670c5c7 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationpolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationpolicy/version.go @@ -1,12 +1,10 @@ package apioperationpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationpolicy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/README.md b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/README.md index 870156b53a1..523a67d46d6 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/README.md +++ b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apioperationsbytag` Documentation -The `apioperationsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apioperationsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/client.go b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/client.go index 26f8b7f55aa..703172fb96e 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/client.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/client.go @@ -15,7 +15,7 @@ type ApiOperationsByTagClient struct { } func NewApiOperationsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/id_api.go b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/id_api.go index 5897ef0aafc..3ef76da3989 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/method_operationlistbytags.go b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/method_operationlistbytags.go index 2a37906b22f..da55db0920b 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/method_operationlistbytags.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/method_operationlistbytags.go @@ -42,6 +42,7 @@ func (o OperationListByTagsOperationOptions) ToHeaders() *client.Headers { func (o OperationListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/version.go b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/version.go index 47b1f102919..4621e0d037e 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationsbytag/version.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationsbytag/version.go @@ -1,12 +1,10 @@ package apioperationsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationsbytag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/README.md b/resource-manager/apimanagement/2024-05-01/apioperationtag/README.md index 601c011ada0..6046029583b 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/README.md +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apioperationtag` Documentation -The `apioperationtag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apioperationtag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/client.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/client.go index 6f14f25474c..977dc13c0f9 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/client.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/client.go @@ -15,7 +15,7 @@ type ApiOperationTagClient struct { } func NewApiOperationTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiOperationTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apioperationtag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apioperationtag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiOperationTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operation.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operation.go index efa4b494f53..cd8e54a7d89 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operationtag.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operationtag.go index 278b58eaf30..daaa768a548 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operationtag.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/id_operationtag.go @@ -48,7 +48,7 @@ func ParseOperationTagID(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOperationTagIDInsensitively(input string) (*OperationTagId, error) { } id := OperationTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_tagassigntooperation.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_tagassigntooperation.go index ee4d3b0dbb0..003af5a6855 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_tagassigntooperation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_tagassigntooperation.go @@ -46,7 +46,6 @@ func (c ApiOperationTagClient) TagAssignToOperation(ctx context.Context, id Oper var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taggetbyoperation.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taggetbyoperation.go index 7448f9ee27a..cbdff13a037 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taggetbyoperation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taggetbyoperation.go @@ -45,7 +45,6 @@ func (c ApiOperationTagClient) TagGetByOperation(ctx context.Context, id Operati var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taglistbyoperation.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taglistbyoperation.go index f68870a2587..13096fc0729 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taglistbyoperation.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/method_taglistbyoperation.go @@ -41,6 +41,7 @@ func (o TagListByOperationOperationOptions) ToHeaders() *client.Headers { func (o TagListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apioperationtag/version.go b/resource-manager/apimanagement/2024-05-01/apioperationtag/version.go index 839f7acd78d..0d8946b1c3c 100644 --- a/resource-manager/apimanagement/2024-05-01/apioperationtag/version.go +++ b/resource-manager/apimanagement/2024-05-01/apioperationtag/version.go @@ -1,12 +1,10 @@ package apioperationtag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apioperationtag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apioperationtag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/README.md b/resource-manager/apimanagement/2024-05-01/apipolicy/README.md index 354101348c7..285794048ae 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apipolicy` Documentation -The `apipolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apipolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/client.go b/resource-manager/apimanagement/2024-05-01/apipolicy/client.go index 84c3dfec8c9..48a63aea96b 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/client.go @@ -15,7 +15,7 @@ type ApiPolicyClient struct { } func NewApiPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apipolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apipolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/id_api.go b/resource-manager/apimanagement/2024-05-01/apipolicy/id_api.go index 8423eae7bd7..3313f2d60fe 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apipolicy/id_workspaceapi.go index a7710bb2ef5..047e8a1d7a6 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_createorupdate.go index eeaf614e85b..5a5f41a5a69 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) CreateOrUpdate(ctx context.Context, id ApiId, input Pol var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_delete.go index ee63586a23e..2e0bec42e46 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_get.go index c62f27cb331..215a0d6e983 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) Get(ctx context.Context, id ApiId, options GetOperation var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicycreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicycreateorupdate.go index 003cadb79ce..c54d98f57f5 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicycreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyCreateOrUpdate(ctx context.Context, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicydelete.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicydelete.go index f2ceb3f9e4d..0f9bc74b6ea 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicydelete.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiPolicyDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicyget.go b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicyget.go index 364bd7248f2..0d3c1867f7d 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicyget.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/method_workspaceapipolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceApiPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ApiPolicyClient) WorkspaceApiPolicyGet(ctx context.Context, id Workspace var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apipolicy/version.go b/resource-manager/apimanagement/2024-05-01/apipolicy/version.go index a1fd3c3c145..d50353ade1a 100644 --- a/resource-manager/apimanagement/2024-05-01/apipolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/apipolicy/version.go @@ -1,12 +1,10 @@ package apipolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apipolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apipolicy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiproduct/README.md b/resource-manager/apimanagement/2024-05-01/apiproduct/README.md index de0f38fc6a2..e0bc53b9509 100644 --- a/resource-manager/apimanagement/2024-05-01/apiproduct/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiproduct/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiproduct` Documentation -The `apiproduct` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiproduct` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiproduct/client.go b/resource-manager/apimanagement/2024-05-01/apiproduct/client.go index e7774a6266c..657bc10d33b 100644 --- a/resource-manager/apimanagement/2024-05-01/apiproduct/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiproduct/client.go @@ -15,7 +15,7 @@ type ApiProductClient struct { } func NewApiProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiproduct", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiproduct", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiproduct/id_api.go b/resource-manager/apimanagement/2024-05-01/apiproduct/id_api.go index b14e77a5f55..759adfa6c31 100644 --- a/resource-manager/apimanagement/2024-05-01/apiproduct/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apiproduct/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiproduct/method_listbyapis.go b/resource-manager/apimanagement/2024-05-01/apiproduct/method_listbyapis.go index 9a4501fc786..a76cf16e6d4 100644 --- a/resource-manager/apimanagement/2024-05-01/apiproduct/method_listbyapis.go +++ b/resource-manager/apimanagement/2024-05-01/apiproduct/method_listbyapis.go @@ -41,6 +41,7 @@ func (o ListByApisOperationOptions) ToHeaders() *client.Headers { func (o ListByApisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiproduct/version.go b/resource-manager/apimanagement/2024-05-01/apiproduct/version.go index daaf7de5d3e..754d773f62c 100644 --- a/resource-manager/apimanagement/2024-05-01/apiproduct/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiproduct/version.go @@ -1,12 +1,10 @@ package apiproduct -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiproduct/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiproduct/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/README.md b/resource-manager/apimanagement/2024-05-01/apirelease/README.md index 2f015541dea..01290afaf0e 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/README.md +++ b/resource-manager/apimanagement/2024-05-01/apirelease/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apirelease` Documentation -The `apirelease` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apirelease` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/client.go b/resource-manager/apimanagement/2024-05-01/apirelease/client.go index 5ce0c50057f..916d3cf987c 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/client.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/client.go @@ -15,7 +15,7 @@ type ApiReleaseClient struct { } func NewApiReleaseClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiReleaseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirelease", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirelease", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiReleaseClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/id_api.go b/resource-manager/apimanagement/2024-05-01/apirelease/id_api.go index 8cb60bea6b5..2d5590c7064 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/id_apirelease.go b/resource-manager/apimanagement/2024-05-01/apirelease/id_apirelease.go index e93d37f020b..562f3b819a0 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/id_apirelease.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/id_apirelease.go @@ -48,7 +48,7 @@ func ParseApiReleaseID(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseApiReleaseIDInsensitively(input string) (*ApiReleaseId, error) { } id := ApiReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/id_release.go b/resource-manager/apimanagement/2024-05-01/apirelease/id_release.go index 782521151d8..43c06ed85ab 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/id_release.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/id_release.go @@ -46,7 +46,7 @@ func ParseReleaseID(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReleaseIDInsensitively(input string) (*ReleaseId, error) { } id := ReleaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apirelease/id_workspaceapi.go index 708a5e83416..dbd42a21510 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_createorupdate.go index 2b23b8d16a6..78ca213b93f 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) CreateOrUpdate(ctx context.Context, id ReleaseId, inpu var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_delete.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_delete.go index d7f28534465..ccae10babdb 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_get.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_get.go index 4f45a0505aa..1c9d1797eb8 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_get.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) Get(ctx context.Context, id ReleaseId) (result GetOper var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_listbyservice.go index 509f7241d4f..afff495b595 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_update.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_update.go index 1e51ca66c45..ec17ee72daa 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) Update(ctx context.Context, id ReleaseId, input ApiRel var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasecreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasecreateorupdate.go index 3dcd9fce3ab..80cc66eac13 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasecreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasecreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceApiReleaseCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseCreateOrUpdate(ctx context.Context, var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasedelete.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasedelete.go index 0fd63c74e77..38f1f981660 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasedelete.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleasedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiReleaseDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseget.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseget.go index df9e7f1c4c0..f0e400e1964 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseget.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseget.go @@ -45,7 +45,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseGet(ctx context.Context, id ApiRele var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaselistbyservice.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaselistbyservice.go index 578ad231c48..7e85d2a7e53 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaselistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaselistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiReleaseListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceApiReleaseListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseupdate.go b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseupdate.go index d301c6d2adc..67c933b8f86 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/method_workspaceapireleaseupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiReleaseUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiReleaseUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiReleaseClient) WorkspaceApiReleaseUpdate(ctx context.Context, id ApiR var model ApiReleaseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apirelease/version.go b/resource-manager/apimanagement/2024-05-01/apirelease/version.go index 2e0e2d68707..ae07a781782 100644 --- a/resource-manager/apimanagement/2024-05-01/apirelease/version.go +++ b/resource-manager/apimanagement/2024-05-01/apirelease/version.go @@ -1,12 +1,10 @@ package apirelease -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirelease/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirelease/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/README.md b/resource-manager/apimanagement/2024-05-01/apirevision/README.md index 35af698cb3b..6b2d6407036 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/README.md +++ b/resource-manager/apimanagement/2024-05-01/apirevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apirevision` Documentation -The `apirevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apirevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/client.go b/resource-manager/apimanagement/2024-05-01/apirevision/client.go index d44402ed6ae..3751f03b558 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/client.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/client.go @@ -15,7 +15,7 @@ type ApiRevisionClient struct { } func NewApiRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apirevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apirevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/id_api.go b/resource-manager/apimanagement/2024-05-01/apirevision/id_api.go index b7fe8776e72..22a2fc79643 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apirevision/id_workspaceapi.go index ca64dd7d7de..9b7f6a9bd41 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apirevision/method_listbyservice.go index 1f1a5af6d1d..e65c6ee9c3e 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/method_workspaceapirevisionlistbyservice.go b/resource-manager/apimanagement/2024-05-01/apirevision/method_workspaceapirevisionlistbyservice.go index acc1134979b..499ca14fd4d 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/method_workspaceapirevisionlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/method_workspaceapirevisionlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiRevisionListByServiceOperationOptions) ToHeaders() *client.H func (o WorkspaceApiRevisionListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apirevision/version.go b/resource-manager/apimanagement/2024-05-01/apirevision/version.go index f3936508f5d..43adb9ad14a 100644 --- a/resource-manager/apimanagement/2024-05-01/apirevision/version.go +++ b/resource-manager/apimanagement/2024-05-01/apirevision/version.go @@ -1,12 +1,10 @@ package apirevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apirevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apirevision/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apisbytag/README.md b/resource-manager/apimanagement/2024-05-01/apisbytag/README.md index 6657db0caef..b60029dfae0 100644 --- a/resource-manager/apimanagement/2024-05-01/apisbytag/README.md +++ b/resource-manager/apimanagement/2024-05-01/apisbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apisbytag` Documentation -The `apisbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apisbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apisbytag/client.go b/resource-manager/apimanagement/2024-05-01/apisbytag/client.go index 034b78c6308..ed2e61ccb38 100644 --- a/resource-manager/apimanagement/2024-05-01/apisbytag/client.go +++ b/resource-manager/apimanagement/2024-05-01/apisbytag/client.go @@ -15,7 +15,7 @@ type ApisByTagClient struct { } func NewApisByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApisByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apisbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apisbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApisByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apisbytag/id_service.go b/resource-manager/apimanagement/2024-05-01/apisbytag/id_service.go index a88da291012..e67b3727900 100644 --- a/resource-manager/apimanagement/2024-05-01/apisbytag/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/apisbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apisbytag/method_apilistbytags.go b/resource-manager/apimanagement/2024-05-01/apisbytag/method_apilistbytags.go index 913e89cf621..98b08e4fddf 100644 --- a/resource-manager/apimanagement/2024-05-01/apisbytag/method_apilistbytags.go +++ b/resource-manager/apimanagement/2024-05-01/apisbytag/method_apilistbytags.go @@ -42,6 +42,7 @@ func (o ApiListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ApiListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apisbytag/version.go b/resource-manager/apimanagement/2024-05-01/apisbytag/version.go index 3271979c907..802b27e8b34 100644 --- a/resource-manager/apimanagement/2024-05-01/apisbytag/version.go +++ b/resource-manager/apimanagement/2024-05-01/apisbytag/version.go @@ -1,12 +1,10 @@ package apisbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apisbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apisbytag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/README.md b/resource-manager/apimanagement/2024-05-01/apischema/README.md index 7d349279fd9..f018549c09d 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/README.md +++ b/resource-manager/apimanagement/2024-05-01/apischema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apischema` Documentation -The `apischema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apischema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apischema/client.go b/resource-manager/apimanagement/2024-05-01/apischema/client.go index fb466515328..feae3073bba 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/client.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/client.go @@ -15,7 +15,7 @@ type ApiSchemaClient struct { } func NewApiSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiSchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apischema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apischema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiSchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/id_api.go b/resource-manager/apimanagement/2024-05-01/apischema/id_api.go index 725dc89049b..4b362d874f1 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/id_apischema.go b/resource-manager/apimanagement/2024-05-01/apischema/id_apischema.go index af8be6866d8..52763f55ab3 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/id_apischema.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/id_apischema.go @@ -46,7 +46,7 @@ func ParseApiSchemaID(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiSchemaIDInsensitively(input string) (*ApiSchemaId, error) { } id := ApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapi.go b/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapi.go index a3b95e32e10..a72ad0a9467 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapi.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapi.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiID(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiIDInsensitively(input string) (*WorkspaceApiId, error) { } id := WorkspaceApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapischema.go b/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapischema.go index 2b8ca6ceea1..bfca1e57a2f 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapischema.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/id_workspaceapischema.go @@ -48,7 +48,7 @@ func ParseWorkspaceApiSchemaID(input string) (*WorkspaceApiSchemaId, error) { } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceApiSchemaIDInsensitively(input string) (*WorkspaceApiSchemaId } id := WorkspaceApiSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apischema/method_createorupdate.go index 6d09c53ad77..f602bc6fdba 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_delete.go b/resource-manager/apimanagement/2024-05-01/apischema/method_delete.go index 1e1272fa389..cb2a09c563a 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_get.go b/resource-manager/apimanagement/2024-05-01/apischema/method_get.go index c0bd56818fa..474b0728991 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_get.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) Get(ctx context.Context, id ApiSchemaId) (result GetOpe var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_listbyapi.go b/resource-manager/apimanagement/2024-05-01/apischema/method_listbyapi.go index c3cb801dfce..5cbe66a49a9 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_listbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemacreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemacreateorupdate.go index 86ee733c704..1870d025fd6 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemacreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.He func (o WorkspaceApiSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemadelete.go b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemadelete.go index f5c12caff48..f8d52c4b601 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemadelete.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemadelete.go @@ -36,6 +36,7 @@ func (o WorkspaceApiSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceApiSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemaget.go b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemaget.go index 0e2e9ec7b07..42120431a21 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemaget.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemaget.go @@ -45,7 +45,6 @@ func (c ApiSchemaClient) WorkspaceApiSchemaGet(ctx context.Context, id Workspace var model SchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemalistbyapi.go b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemalistbyapi.go index df9c59dfaf8..a72accff3f1 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemalistbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/method_workspaceapischemalistbyapi.go @@ -41,6 +41,7 @@ func (o WorkspaceApiSchemaListByApiOperationOptions) ToHeaders() *client.Headers func (o WorkspaceApiSchemaListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apischema/version.go b/resource-manager/apimanagement/2024-05-01/apischema/version.go index 77d8ed01019..9f009bee2d9 100644 --- a/resource-manager/apimanagement/2024-05-01/apischema/version.go +++ b/resource-manager/apimanagement/2024-05-01/apischema/version.go @@ -1,12 +1,10 @@ package apischema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apischema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apischema/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/README.md b/resource-manager/apimanagement/2024-05-01/apitag/README.md index 08383af522f..48724d8875b 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/README.md +++ b/resource-manager/apimanagement/2024-05-01/apitag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apitag` Documentation -The `apitag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apitag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apitag/client.go b/resource-manager/apimanagement/2024-05-01/apitag/client.go index 491411cb346..d6fa22e93b2 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/client.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/client.go @@ -15,7 +15,7 @@ type ApiTagClient struct { } func NewApiTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/id_api.go b/resource-manager/apimanagement/2024-05-01/apitag/id_api.go index 584293d60e3..6041b57e3cb 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/id_apitag.go b/resource-manager/apimanagement/2024-05-01/apitag/id_apitag.go index 13e9a7f8c96..e22fb5fe987 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/id_apitag.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/id_apitag.go @@ -46,7 +46,7 @@ func ParseApiTagID(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiTagIDInsensitively(input string) (*ApiTagId, error) { } id := ApiTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/method_tagassigntoapi.go b/resource-manager/apimanagement/2024-05-01/apitag/method_tagassigntoapi.go index daa3d8e3cbb..e228f15e51c 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/method_tagassigntoapi.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/method_tagassigntoapi.go @@ -46,7 +46,6 @@ func (c ApiTagClient) TagAssignToApi(ctx context.Context, id ApiTagId) (result T var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/method_taggetbyapi.go b/resource-manager/apimanagement/2024-05-01/apitag/method_taggetbyapi.go index 17951c4564a..ce827a4d294 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/method_taggetbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/method_taggetbyapi.go @@ -45,7 +45,6 @@ func (c ApiTagClient) TagGetByApi(ctx context.Context, id ApiTagId) (result TagG var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/method_taglistbyapi.go b/resource-manager/apimanagement/2024-05-01/apitag/method_taglistbyapi.go index 5c2639c91e3..26018d60d4a 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/method_taglistbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/method_taglistbyapi.go @@ -41,6 +41,7 @@ func (o TagListByApiOperationOptions) ToHeaders() *client.Headers { func (o TagListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apitag/version.go b/resource-manager/apimanagement/2024-05-01/apitag/version.go index e9ff649828e..9c624611f4c 100644 --- a/resource-manager/apimanagement/2024-05-01/apitag/version.go +++ b/resource-manager/apimanagement/2024-05-01/apitag/version.go @@ -1,12 +1,10 @@ package apitag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/README.md b/resource-manager/apimanagement/2024-05-01/apitagdescription/README.md index 4a87a3e8ec3..a973bf6fc83 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/README.md +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apitagdescription` Documentation -The `apitagdescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apitagdescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/client.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/client.go index f3068aee44a..6f6a4d3fac3 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/client.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/client.go @@ -15,7 +15,7 @@ type ApiTagDescriptionClient struct { } func NewApiTagDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiTagDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apitagdescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apitagdescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiTagDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/id_api.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/id_api.go index 6c8591fef9e..1111c611d79 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/id_tagdescription.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/id_tagdescription.go index 0e84945f848..441f9659ee4 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/id_tagdescription.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/id_tagdescription.go @@ -46,7 +46,7 @@ func ParseTagDescriptionID(input string) (*TagDescriptionId, error) { } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTagDescriptionIDInsensitively(input string) (*TagDescriptionId, error) } id := TagDescriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_createorupdate.go index 11d74115f05..2f2cf0b50a9 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiTagDescriptionClient) CreateOrUpdate(ctx context.Context, id TagDescr var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_delete.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_delete.go index 2ac6057d339..aa5781c0d43 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_get.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_get.go index e350b63f26f..6269b053999 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_get.go @@ -45,7 +45,6 @@ func (c ApiTagDescriptionClient) Get(ctx context.Context, id TagDescriptionId) ( var model TagDescriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_listbyservice.go index 6a36cd97456..ebcba919eef 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apitagdescription/version.go b/resource-manager/apimanagement/2024-05-01/apitagdescription/version.go index 42468751cf4..252206da7b4 100644 --- a/resource-manager/apimanagement/2024-05-01/apitagdescription/version.go +++ b/resource-manager/apimanagement/2024-05-01/apitagdescription/version.go @@ -1,12 +1,10 @@ package apitagdescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apitagdescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apitagdescription/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/README.md b/resource-manager/apimanagement/2024-05-01/apiversionset/README.md index 2bc413796be..693bd7127e0 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiversionset` Documentation -The `apiversionset` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiversionset` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/client.go b/resource-manager/apimanagement/2024-05-01/apiversionset/client.go index ff0c4d18fb0..8cb546608a7 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/client.go @@ -15,7 +15,7 @@ type ApiVersionSetClient struct { } func NewApiVersionSetClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/id_apiversionset.go b/resource-manager/apimanagement/2024-05-01/apiversionset/id_apiversionset.go index 6a1476b429c..86ec55820c7 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/id_apiversionset.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/id_service.go b/resource-manager/apimanagement/2024-05-01/apiversionset/id_service.go index fe44a488d70..cf4cbee8fdb 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspace.go b/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspace.go index ffae2571e19..9f6cc276906 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspaceapiversionset.go b/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspaceapiversionset.go index 07c056e413c..9d0db70a74e 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_createorupdate.go index 2d070fcbf91..3314930a661 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) CreateOrUpdate(ctx context.Context, id ApiVersionSe var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_get.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_get.go index 7b7c728908e..6e0f1d21d9e 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_get.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) Get(ctx context.Context, id ApiVersionSetId) (resul var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_listbyservice.go index 0f44e4d938d..e3cf32ef2c1 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_update.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_update.go index 97fce9046f6..b8070706ca3 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) Update(ctx context.Context, id ApiVersionSetId, inp var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetcreateorupdate.go index 0fde6db7b9f..4e8fd2c2aa1 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceApiVersionSetCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetCreateOrUpdate(ctx context.Co var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetget.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetget.go index 2a61095ca42..30c1f373c91 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetget.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetget.go @@ -45,7 +45,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetGet(ctx context.Context, id W var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetlistbyservice.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetlistbyservice.go index e65dc1b5956..40e50bad248 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetlistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToHeaders() *client func (o WorkspaceApiVersionSetListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetupdate.go b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetupdate.go index dda3ecdb80b..2d7ebc58bf4 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/method_workspaceapiversionsetupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceApiVersionSetUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiVersionSetClient) WorkspaceApiVersionSetUpdate(ctx context.Context, i var model ApiVersionSetContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionset/version.go b/resource-manager/apimanagement/2024-05-01/apiversionset/version.go index 1a1f53494ed..29dbf98c2e4 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionset/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionset/version.go @@ -1,12 +1,10 @@ package apiversionset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionset/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/client.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/client.go index e1665dd8077..2186fe19f82 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/client.go @@ -15,7 +15,7 @@ type ApiVersionSetsClient struct { } func NewApiVersionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiVersionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiversionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiversionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiVersionSetsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/id_apiversionset.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/id_apiversionset.go index ef4fd9b314b..20c761485f9 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/id_apiversionset.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/id_apiversionset.go @@ -44,7 +44,7 @@ func ParseApiVersionSetID(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiVersionSetIDInsensitively(input string) (*ApiVersionSetId, error) { } id := ApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/id_workspaceapiversionset.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/id_workspaceapiversionset.go index c5271af64dc..1aebdebbf6c 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/id_workspaceapiversionset.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/id_workspaceapiversionset.go @@ -46,7 +46,7 @@ func ParseWorkspaceApiVersionSetID(input string) (*WorkspaceApiVersionSetId, err } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceApiVersionSetIDInsensitively(input string) (*WorkspaceApiVers } id := WorkspaceApiVersionSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/method_apiversionsetdelete.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/method_apiversionsetdelete.go index 1d2948225c9..71c29c6a6d2 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/method_apiversionsetdelete.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/method_apiversionsetdelete.go @@ -35,6 +35,7 @@ func (o ApiVersionSetDeleteOperationOptions) ToHeaders() *client.Headers { func (o ApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/method_workspaceapiversionsetdelete.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/method_workspaceapiversionsetdelete.go index bef988a2083..11216ac1eb4 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/method_workspaceapiversionsetdelete.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/method_workspaceapiversionsetdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceApiVersionSetDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceApiVersionSetDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiversionsets/version.go b/resource-manager/apimanagement/2024-05-01/apiversionsets/version.go index 68a5e888bdb..1f423e5cbd6 100644 --- a/resource-manager/apimanagement/2024-05-01/apiversionsets/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiversionsets/version.go @@ -1,12 +1,10 @@ package apiversionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiversionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiversionsets/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/README.md b/resource-manager/apimanagement/2024-05-01/apiwiki/README.md index 36f987196a6..96300a2d3ae 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/README.md +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/apiwiki` Documentation -The `apiwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `apiwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/client.go b/resource-manager/apimanagement/2024-05-01/apiwiki/client.go index d4a7082fd98..0f9dd6aad89 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/client.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/client.go @@ -15,7 +15,7 @@ type ApiWikiClient struct { } func NewApiWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apiwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apiwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/id_api.go b/resource-manager/apimanagement/2024-05-01/apiwiki/id_api.go index 04b9460d298..63214f7ed9d 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/apiwiki/method_createorupdate.go index 4004fddb029..4fa4ceb7e0c 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ApiWikiClient) CreateOrUpdate(ctx context.Context, id ApiId, input WikiC var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/method_delete.go b/resource-manager/apimanagement/2024-05-01/apiwiki/method_delete.go index 62f6f711cde..2a2cd9d29b8 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/method_get.go b/resource-manager/apimanagement/2024-05-01/apiwiki/method_get.go index 35b7a3426ae..9c5fefccb49 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/method_get.go @@ -46,7 +46,6 @@ func (c ApiWikiClient) Get(ctx context.Context, id ApiId) (result GetOperationRe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/method_list.go b/resource-manager/apimanagement/2024-05-01/apiwiki/method_list.go index aee5fc272ef..bbac7402e46 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/method_update.go b/resource-manager/apimanagement/2024-05-01/apiwiki/method_update.go index d3c1ff6bdaf..91e9a4ca6ea 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ApiWikiClient) Update(ctx context.Context, id ApiId, input WikiUpdateCon var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/apiwiki/version.go b/resource-manager/apimanagement/2024-05-01/apiwiki/version.go index 3914db1bf57..852d400e271 100644 --- a/resource-manager/apimanagement/2024-05-01/apiwiki/version.go +++ b/resource-manager/apimanagement/2024-05-01/apiwiki/version.go @@ -1,12 +1,10 @@ package apiwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apiwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apiwiki/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/README.md b/resource-manager/apimanagement/2024-05-01/authorization/README.md index 059753613b7..36c7874e275 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorization/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorization` Documentation -The `authorization` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorization` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorization/client.go b/resource-manager/apimanagement/2024-05-01/authorization/client.go index 5c99f0c5f29..532ad956ebf 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/client.go @@ -15,7 +15,7 @@ type AuthorizationClient struct { } func NewAuthorizationClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorization", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorization", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/id_authorization.go b/resource-manager/apimanagement/2024-05-01/authorization/id_authorization.go index 17a2d80ccbb..bc1fecf80a8 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/id_authorization.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/authorization/method_createorupdate.go index de6586fe052..40d6f21bb19 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationClient) CreateOrUpdate(ctx context.Context, id Authorizatio var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/method_delete.go b/resource-manager/apimanagement/2024-05-01/authorization/method_delete.go index 9595882688b..aad52b6efb5 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/method_get.go b/resource-manager/apimanagement/2024-05-01/authorization/method_get.go index b6941ad9f03..686be430460 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationClient) Get(ctx context.Context, id AuthorizationId) (resul var model AuthorizationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorization/version.go b/resource-manager/apimanagement/2024-05-01/authorization/version.go index 21db2020256..1b6d35b8d7b 100644 --- a/resource-manager/apimanagement/2024-05-01/authorization/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorization/version.go @@ -1,12 +1,10 @@ package authorization -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorization/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorization/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/README.md b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/README.md index 816b75b8f0a..4dc55b9b311 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy` Documentation -The `authorizationaccesspolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizationaccesspolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/client.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/client.go index f50cda54305..b6ea457f27c 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/client.go @@ -15,7 +15,7 @@ type AuthorizationAccessPolicyClient struct { } func NewAuthorizationAccessPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationAccessPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationaccesspolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationAccessPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_accesspolicy.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_accesspolicy.go index 958261ca120..b9ab551eb2f 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_accesspolicy.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_accesspolicy.go @@ -48,7 +48,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_authorization.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_authorization.go index bbd21ac9fd0..8790b5211c4 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_authorization.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_createorupdate.go index 346e394cab1..cccefbb5d19 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, id var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_delete.go index 3d067c9cc2b..de889c67dcc 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_get.go index 3c903781063..77357edcc1a 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationAccessPolicyClient) Get(ctx context.Context, id AccessPolic var model AuthorizationAccessPolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_listbyauthorization.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_listbyauthorization.go index 3a1d919d552..0761aece330 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_listbyauthorization.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/method_listbyauthorization.go @@ -41,6 +41,7 @@ func (o ListByAuthorizationOperationOptions) ToHeaders() *client.Headers { func (o ListByAuthorizationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/version.go b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/version.go index c40c6ab0bd7..5e2942293a1 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationaccesspolicy/version.go @@ -1,12 +1,10 @@ package authorizationaccesspolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationaccesspolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationaccesspolicy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/README.md b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/README.md index b11ce918bad..3e5e36bc63e 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode` Documentation -The `authorizationconfirmconsentcode` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizationconfirmconsentcode` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/client.go b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/client.go index 22e7ba30e1a..f6bc0c81714 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/client.go @@ -15,7 +15,7 @@ type AuthorizationConfirmConsentCodeClient struct { } func NewAuthorizationConfirmConsentCodeClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationConfirmConsentCodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationconfirmconsentcode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationConfirmConsentCodeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/id_authorization.go b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/id_authorization.go index c49d4be720d..53244e86556 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/id_authorization.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/version.go b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/version.go index 13300ff5773..ccee8b9a133 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationconfirmconsentcode/version.go @@ -1,12 +1,10 @@ package authorizationconfirmconsentcode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationconfirmconsentcode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationconfirmconsentcode/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/README.md b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/README.md index 1366f5bbf7f..00510c557fa 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizationloginlinks` Documentation -The `authorizationloginlinks` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizationloginlinks` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/client.go b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/client.go index 1e8c48f9d33..482627bdc0f 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/client.go @@ -15,7 +15,7 @@ type AuthorizationLoginLinksClient struct { } func NewAuthorizationLoginLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationLoginLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationloginlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationloginlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationLoginLinksClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/id_authorization.go b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/id_authorization.go index c90b836745d..52285fb88c7 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/id_authorization.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/id_authorization.go @@ -46,7 +46,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/method_post.go b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/method_post.go index ed7594c6f30..9bab7764034 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/method_post.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/method_post.go @@ -50,7 +50,6 @@ func (c AuthorizationLoginLinksClient) Post(ctx context.Context, id Authorizatio var model AuthorizationLoginResponseContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/version.go b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/version.go index 2fa4dbb1171..af4416f1ec6 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationloginlinks/version.go @@ -1,12 +1,10 @@ package authorizationloginlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationloginlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationloginlinks/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/README.md b/resource-manager/apimanagement/2024-05-01/authorizationprovider/README.md index dbbe8ea0bb2..44344b70af7 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizationprovider` Documentation -The `authorizationprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizationprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/client.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/client.go index c3670048321..43ff7f92782 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/client.go @@ -15,7 +15,7 @@ type AuthorizationProviderClient struct { } func NewAuthorizationProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_authorizationprovider.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_authorizationprovider.go index 5b377135192..0c60cfd394d 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_service.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_service.go index 98813175218..1a73088603f 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_createorupdate.go index f516f5c677f..f3af9a4cbb1 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, id Auth var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_delete.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_delete.go index 0c0c82a4e01..ff582aa785c 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_get.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_get.go index 27f68eef690..f92b6ccd418 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationProviderClient) Get(ctx context.Context, id AuthorizationPr var model AuthorizationProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_listbyservice.go index 8e28a4d589e..2c69a441089 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationprovider/version.go b/resource-manager/apimanagement/2024-05-01/authorizationprovider/version.go index 0d6fe190983..a101b7b2860 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationprovider/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationprovider/version.go @@ -1,12 +1,10 @@ package authorizationprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationprovider/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizations/README.md b/resource-manager/apimanagement/2024-05-01/authorizations/README.md index 74e3aed07eb..433b6593d9f 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizations/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizations/client.go b/resource-manager/apimanagement/2024-05-01/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizations/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizations/id_authorizationprovider.go b/resource-manager/apimanagement/2024-05-01/authorizations/id_authorizationprovider.go index ec0427a96f6..b5c11dc2d82 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizations/id_authorizationprovider.go +++ b/resource-manager/apimanagement/2024-05-01/authorizations/id_authorizationprovider.go @@ -44,7 +44,7 @@ func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProv } id := AuthorizationProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizations/method_authorizationlistbyauthorizationprovider.go b/resource-manager/apimanagement/2024-05-01/authorizations/method_authorizationlistbyauthorizationprovider.go index 61659c7182f..b2910e09318 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizations/method_authorizationlistbyauthorizationprovider.go +++ b/resource-manager/apimanagement/2024-05-01/authorizations/method_authorizationlistbyauthorizationprovider.go @@ -41,6 +41,7 @@ func (o AuthorizationListByAuthorizationProviderOperationOptions) ToHeaders() *c func (o AuthorizationListByAuthorizationProviderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizations/version.go b/resource-manager/apimanagement/2024-05-01/authorizations/version.go index 80e4fcac345..3b288cb4216 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizations/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/README.md b/resource-manager/apimanagement/2024-05-01/authorizationserver/README.md index 3b4431d5a62..e57871b9440 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/README.md +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/authorizationserver` Documentation -The `authorizationserver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `authorizationserver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/client.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/client.go index a234058adb1..1704ea21dd3 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/client.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/client.go @@ -15,7 +15,7 @@ type AuthorizationServerClient struct { } func NewAuthorizationServerClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationServerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationserver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationserver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationServerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/id_authorizationserver.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/id_authorizationserver.go index d501746a896..e2ff82e6771 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/id_authorizationserver.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/id_authorizationserver.go @@ -44,7 +44,7 @@ func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error) { } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServer } id := AuthorizationServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/id_service.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/id_service.go index 16870e5f263..ef09a35c182 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_createorupdate.go index ef58fe9a05f..4e499b27763 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c AuthorizationServerClient) CreateOrUpdate(ctx context.Context, id Author var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_delete.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_delete.go index a307aa17d3f..2bb46f4501a 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_get.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_get.go index 8d4a7463981..54e8b811bca 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationServerClient) Get(ctx context.Context, id AuthorizationServ var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listbyservice.go index ae4ad390656..7c174cf8685 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listsecrets.go index 58b62cc36bf..e4bcb668d70 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_listsecrets.go @@ -46,7 +46,6 @@ func (c AuthorizationServerClient) ListSecrets(ctx context.Context, id Authoriza var model AuthorizationServerSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_update.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_update.go index 686f7550e4d..f16ebce0af3 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AuthorizationServerClient) Update(ctx context.Context, id AuthorizationS var model AuthorizationServerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/authorizationserver/version.go b/resource-manager/apimanagement/2024-05-01/authorizationserver/version.go index 646e10bf52f..5125704330f 100644 --- a/resource-manager/apimanagement/2024-05-01/authorizationserver/version.go +++ b/resource-manager/apimanagement/2024-05-01/authorizationserver/version.go @@ -1,12 +1,10 @@ package authorizationserver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationserver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationserver/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/backend/README.md b/resource-manager/apimanagement/2024-05-01/backend/README.md index 45ef74abf4c..acb8f99990f 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/README.md +++ b/resource-manager/apimanagement/2024-05-01/backend/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/backend` Documentation -The `backend` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `backend` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/backend/client.go b/resource-manager/apimanagement/2024-05-01/backend/client.go index 8cf9c601f15..0752289445b 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/client.go +++ b/resource-manager/apimanagement/2024-05-01/backend/client.go @@ -15,7 +15,7 @@ type BackendClient struct { } func NewBackendClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/backend/id_backend.go b/resource-manager/apimanagement/2024-05-01/backend/id_backend.go index d59958e9b68..7540b370263 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/id_backend.go +++ b/resource-manager/apimanagement/2024-05-01/backend/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/backend/id_service.go b/resource-manager/apimanagement/2024-05-01/backend/id_service.go index afe0eb62f7f..f827f9d35f4 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/backend/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/backend/id_workspace.go b/resource-manager/apimanagement/2024-05-01/backend/id_workspace.go index 7a2c6148315..3a2f5b76254 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/backend/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/backend/id_workspacebackend.go b/resource-manager/apimanagement/2024-05-01/backend/id_workspacebackend.go index f65f285c46f..266cf1aea0e 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/id_workspacebackend.go +++ b/resource-manager/apimanagement/2024-05-01/backend/id_workspacebackend.go @@ -46,7 +46,7 @@ func ParseWorkspaceBackendID(input string) (*WorkspaceBackendId, error) { } id := WorkspaceBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceBackendIDInsensitively(input string) (*WorkspaceBackendId, er } id := WorkspaceBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/backend/method_createorupdate.go index 876a39e1fb9..d957d53a6f1 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BackendClient) CreateOrUpdate(ctx context.Context, id BackendId, input B var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_delete.go b/resource-manager/apimanagement/2024-05-01/backend/method_delete.go index f71fa94d865..46366e437b1 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_get.go b/resource-manager/apimanagement/2024-05-01/backend/method_get.go index cc3aa998b93..77da1fa7415 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_get.go @@ -45,7 +45,6 @@ func (c BackendClient) Get(ctx context.Context, id BackendId) (result GetOperati var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/backend/method_listbyservice.go index f8c5b6daf2a..b0a6f007cc2 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_update.go b/resource-manager/apimanagement/2024-05-01/backend/method_update.go index 3c102cf0e80..80258a36e8d 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c BackendClient) Update(ctx context.Context, id BackendId, input BackendUp var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendcreateorupdate.go index c5eb5e220bf..44eef97c07c 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceBackendCreateOrUpdateOperationOptions) ToHeaders() *client.Head func (o WorkspaceBackendCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BackendClient) WorkspaceBackendCreateOrUpdate(ctx context.Context, id Wo var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackenddelete.go b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackenddelete.go index 8c7afcf5726..aa0fa5ac65d 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackenddelete.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackenddelete.go @@ -35,6 +35,7 @@ func (o WorkspaceBackendDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceBackendDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendget.go b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendget.go index 97fcb0925d5..1495b5b5e86 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendget.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendget.go @@ -45,7 +45,6 @@ func (c BackendClient) WorkspaceBackendGet(ctx context.Context, id WorkspaceBack var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendlistbyworkspace.go b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendlistbyworkspace.go index a762dc1a374..7ac85789e42 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendlistbyworkspace.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendlistbyworkspace.go @@ -41,6 +41,7 @@ func (o WorkspaceBackendListByWorkspaceOperationOptions) ToHeaders() *client.Hea func (o WorkspaceBackendListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendupdate.go b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendupdate.go index 5c4c93509de..66bfb9b3b58 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendupdate.go +++ b/resource-manager/apimanagement/2024-05-01/backend/method_workspacebackendupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceBackendUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceBackendUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c BackendClient) WorkspaceBackendUpdate(ctx context.Context, id WorkspaceB var model BackendContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/backend/version.go b/resource-manager/apimanagement/2024-05-01/backend/version.go index 483eb99ac9e..ef913b127f5 100644 --- a/resource-manager/apimanagement/2024-05-01/backend/version.go +++ b/resource-manager/apimanagement/2024-05-01/backend/version.go @@ -1,12 +1,10 @@ package backend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backend/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/backendreconnect/README.md b/resource-manager/apimanagement/2024-05-01/backendreconnect/README.md index fecad7c8a22..700bc3e1e43 100644 --- a/resource-manager/apimanagement/2024-05-01/backendreconnect/README.md +++ b/resource-manager/apimanagement/2024-05-01/backendreconnect/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/backendreconnect` Documentation -The `backendreconnect` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `backendreconnect` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/backendreconnect/client.go b/resource-manager/apimanagement/2024-05-01/backendreconnect/client.go index e7931af1711..229aed9d409 100644 --- a/resource-manager/apimanagement/2024-05-01/backendreconnect/client.go +++ b/resource-manager/apimanagement/2024-05-01/backendreconnect/client.go @@ -15,7 +15,7 @@ type BackendReconnectClient struct { } func NewBackendReconnectClientWithBaseURI(sdkApi sdkEnv.Api) (*BackendReconnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backendreconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backendreconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackendReconnectClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/backendreconnect/id_backend.go b/resource-manager/apimanagement/2024-05-01/backendreconnect/id_backend.go index 8099482517f..df64bd9a745 100644 --- a/resource-manager/apimanagement/2024-05-01/backendreconnect/id_backend.go +++ b/resource-manager/apimanagement/2024-05-01/backendreconnect/id_backend.go @@ -44,7 +44,7 @@ func ParseBackendID(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendIDInsensitively(input string) (*BackendId, error) { } id := BackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/backendreconnect/version.go b/resource-manager/apimanagement/2024-05-01/backendreconnect/version.go index e3ca3e180c6..dfc047ccfdb 100644 --- a/resource-manager/apimanagement/2024-05-01/backendreconnect/version.go +++ b/resource-manager/apimanagement/2024-05-01/backendreconnect/version.go @@ -1,12 +1,10 @@ package backendreconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backendreconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backendreconnect/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/cache/README.md b/resource-manager/apimanagement/2024-05-01/cache/README.md index 892f314f8de..a0d4102bafe 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/README.md +++ b/resource-manager/apimanagement/2024-05-01/cache/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/cache` Documentation -The `cache` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `cache` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/cache/client.go b/resource-manager/apimanagement/2024-05-01/cache/client.go index e0befe22fa3..ab451fc4ea5 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/client.go +++ b/resource-manager/apimanagement/2024-05-01/cache/client.go @@ -15,7 +15,7 @@ type CacheClient struct { } func NewCacheClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cache", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cache", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/cache/id_cache.go b/resource-manager/apimanagement/2024-05-01/cache/id_cache.go index 8260234796a..22061eee597 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/id_cache.go +++ b/resource-manager/apimanagement/2024-05-01/cache/id_cache.go @@ -44,7 +44,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/cache/id_service.go b/resource-manager/apimanagement/2024-05-01/cache/id_service.go index bf4f26d8b36..947e2876f0e 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/cache/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/cache/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/cache/method_createorupdate.go index 26ef5edfcc7..197b76786bc 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/cache/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CacheClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/cache/method_delete.go b/resource-manager/apimanagement/2024-05-01/cache/method_delete.go index 511791374c6..55b4280d97d 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/cache/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/cache/method_get.go b/resource-manager/apimanagement/2024-05-01/cache/method_get.go index 10fd3d603ea..1bb437d248d 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/cache/method_get.go @@ -45,7 +45,6 @@ func (c CacheClient) Get(ctx context.Context, id CacheId) (result GetOperationRe var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/cache/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/cache/method_listbyservice.go index 29189620638..99ac16add79 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/cache/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/cache/method_update.go b/resource-manager/apimanagement/2024-05-01/cache/method_update.go index 9388cab550d..f70e4710f73 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/cache/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CacheClient) Update(ctx context.Context, id CacheId, input CacheUpdatePa var model CacheContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/cache/version.go b/resource-manager/apimanagement/2024-05-01/cache/version.go index abeb3a30a95..12ae9c149d1 100644 --- a/resource-manager/apimanagement/2024-05-01/cache/version.go +++ b/resource-manager/apimanagement/2024-05-01/cache/version.go @@ -1,12 +1,10 @@ package cache -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cache/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cache/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/README.md b/resource-manager/apimanagement/2024-05-01/certificate/README.md index b3dbed27310..a34b4e833e3 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/README.md +++ b/resource-manager/apimanagement/2024-05-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/certificate/client.go b/resource-manager/apimanagement/2024-05-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/client.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/id_certificate.go b/resource-manager/apimanagement/2024-05-01/certificate/id_certificate.go index 8617e21ad2a..42e2e50f70c 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/id_certificate.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/id_service.go b/resource-manager/apimanagement/2024-05-01/certificate/id_service.go index 75f9ac3b04b..461f53f3c34 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/id_workspace.go b/resource-manager/apimanagement/2024-05-01/certificate/id_workspace.go index f0e6c933422..ae69ceed68e 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/id_workspacecertificate.go b/resource-manager/apimanagement/2024-05-01/certificate/id_workspacecertificate.go index 08e1c29327d..328cf9365a7 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/id_workspacecertificate.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/id_workspacecertificate.go @@ -46,7 +46,7 @@ func ParseWorkspaceCertificateID(input string) (*WorkspaceCertificateId, error) } id := WorkspaceCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceCertificateIDInsensitively(input string) (*WorkspaceCertifica } id := WorkspaceCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/certificate/method_createorupdate.go index 823d71d3e64..15e1df590a3 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_delete.go b/resource-manager/apimanagement/2024-05-01/certificate/method_delete.go index 6c0ded0942d..85948d80764 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_get.go b/resource-manager/apimanagement/2024-05-01/certificate/method_get.go index 884851fd83b..e04e8cfae98 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/certificate/method_listbyservice.go index 9f45a52fd7c..63e1c8507b6 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_refreshsecret.go b/resource-manager/apimanagement/2024-05-01/certificate/method_refreshsecret.go index d764ec89d26..02667d79db1 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_refreshsecret.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_refreshsecret.go @@ -46,7 +46,6 @@ func (c CertificateClient) RefreshSecret(ctx context.Context, id CertificateId) var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatecreateorupdate.go b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatecreateorupdate.go index edf3cac36ce..74177a03494 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatecreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatecreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceCertificateCreateOrUpdateOperationOptions) ToHeaders() *client. func (o WorkspaceCertificateCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CertificateClient) WorkspaceCertificateCreateOrUpdate(ctx context.Contex var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatedelete.go b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatedelete.go index f100d30f114..086951d02a2 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatedelete.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceCertificateDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceCertificateDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificateget.go b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificateget.go index db76a610302..bff47b037bc 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificateget.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificateget.go @@ -45,7 +45,6 @@ func (c CertificateClient) WorkspaceCertificateGet(ctx context.Context, id Works var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatelistbyworkspace.go b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatelistbyworkspace.go index c2931b1c245..06a18734f30 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatelistbyworkspace.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificatelistbyworkspace.go @@ -42,6 +42,7 @@ func (o WorkspaceCertificateListByWorkspaceOperationOptions) ToHeaders() *client func (o WorkspaceCertificateListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificaterefreshsecret.go b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificaterefreshsecret.go index 8354a402571..03658e66f7e 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificaterefreshsecret.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/method_workspacecertificaterefreshsecret.go @@ -46,7 +46,6 @@ func (c CertificateClient) WorkspaceCertificateRefreshSecret(ctx context.Context var model CertificateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/certificate/version.go b/resource-manager/apimanagement/2024-05-01/certificate/version.go index c5ac04b2418..b09934c56ab 100644 --- a/resource-manager/apimanagement/2024-05-01/certificate/version.go +++ b/resource-manager/apimanagement/2024-05-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/README.md b/resource-manager/apimanagement/2024-05-01/contenttype/README.md index 57ff8d51e2c..5f53d047713 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/README.md +++ b/resource-manager/apimanagement/2024-05-01/contenttype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/contenttype` Documentation -The `contenttype` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `contenttype` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/client.go b/resource-manager/apimanagement/2024-05-01/contenttype/client.go index 86436fb159e..9dd4b452dda 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/client.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/client.go @@ -15,7 +15,7 @@ type ContentTypeClient struct { } func NewContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/id_contenttype.go b/resource-manager/apimanagement/2024-05-01/contenttype/id_contenttype.go index 35dbd65c28b..580bdfbbbfa 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/id_contenttype.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/id_service.go b/resource-manager/apimanagement/2024-05-01/contenttype/id_service.go index 1241f699f16..cdc854578dd 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/contenttype/method_createorupdate.go index d1a48e0857c..b51b4a363eb 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeClient) CreateOrUpdate(ctx context.Context, id ContentTypeId, var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/method_delete.go b/resource-manager/apimanagement/2024-05-01/contenttype/method_delete.go index d3dc044bf5c..ff7bd7bd5d9 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/method_get.go b/resource-manager/apimanagement/2024-05-01/contenttype/method_get.go index 059c81af9e8..7f4ca66a7df 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/method_get.go @@ -45,7 +45,6 @@ func (c ContentTypeClient) Get(ctx context.Context, id ContentTypeId) (result Ge var model ContentTypeContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/contenttype/version.go b/resource-manager/apimanagement/2024-05-01/contenttype/version.go index b5f5b3ee88e..b31032fe906 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttype/version.go +++ b/resource-manager/apimanagement/2024-05-01/contenttype/version.go @@ -1,12 +1,10 @@ package contenttype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttype/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/README.md b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/README.md index d96f1e48212..81a809367af 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/README.md +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/contenttypecontentitem` Documentation -The `contenttypecontentitem` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `contenttypecontentitem` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/client.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/client.go index 81fef8be029..25caa5484f1 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/client.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/client.go @@ -15,7 +15,7 @@ type ContentTypeContentItemClient struct { } func NewContentTypeContentItemClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTypeContentItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttypecontentitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttypecontentitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTypeContentItemClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contentitem.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contentitem.go index b304e9fdf2b..add13b6f1fb 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contentitem.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contentitem.go @@ -46,7 +46,7 @@ func ParseContentItemID(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContentItemIDInsensitively(input string) (*ContentItemId, error) { } id := ContentItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contenttype.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contenttype.go index 576b6390d40..437d185ec27 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contenttype.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/id_contenttype.go @@ -44,7 +44,7 @@ func ParseContentTypeID(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTypeIDInsensitively(input string) (*ContentTypeId, error) { } id := ContentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemcreateorupdate.go index c23ccc2fcb2..0509fce5cd7 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemcreateorupdate.go @@ -36,6 +36,7 @@ func (o ContentItemCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o ContentItemCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ContentTypeContentItemClient) ContentItemCreateOrUpdate(ctx context.Cont var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemdelete.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemdelete.go index ae0888ce9e8..bfb0570356b 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemdelete.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemdelete.go @@ -35,6 +35,7 @@ func (o ContentItemDeleteOperationOptions) ToHeaders() *client.Headers { func (o ContentItemDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemget.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemget.go index 41ca4d59a44..025cff6645e 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemget.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/method_contentitemget.go @@ -45,7 +45,6 @@ func (c ContentTypeContentItemClient) ContentItemGet(ctx context.Context, id Con var model ContentItemContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/version.go b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/version.go index f4c700c2ae4..744cacf7c77 100644 --- a/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/version.go +++ b/resource-manager/apimanagement/2024-05-01/contenttypecontentitem/version.go @@ -1,12 +1,10 @@ package contenttypecontentitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttypecontentitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttypecontentitem/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/README.md b/resource-manager/apimanagement/2024-05-01/delegationsettings/README.md index db1aff49f69..6bb904e691f 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/README.md +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/delegationsettings` Documentation -The `delegationsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `delegationsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/client.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/client.go index 975a55a7a10..6d65fe2f5ec 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/client.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/client.go @@ -15,7 +15,7 @@ type DelegationSettingsClient struct { } func NewDelegationSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DelegationSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delegationsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delegationsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DelegationSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/id_service.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/id_service.go index c3aca641d8f..c0226a556f8 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_createorupdate.go index 194af96a592..d36a1f34df6 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DelegationSettingsClient) CreateOrUpdate(ctx context.Context, id Service var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_get.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_get.go index db02f9407db..3df4abb7ec7 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_get.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) Get(ctx context.Context, id ServiceId) (result var model PortalDelegationSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_listsecrets.go index 50ee5bed1bd..e4b72cd79d6 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DelegationSettingsClient) ListSecrets(ctx context.Context, id ServiceId) var model PortalSettingValidationKeyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_update.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_update.go index c010e8ee865..9ef22bac0a1 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/delegationsettings/version.go b/resource-manager/apimanagement/2024-05-01/delegationsettings/version.go index dc75d0cacde..e021ff8d790 100644 --- a/resource-manager/apimanagement/2024-05-01/delegationsettings/version.go +++ b/resource-manager/apimanagement/2024-05-01/delegationsettings/version.go @@ -1,12 +1,10 @@ package delegationsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delegationsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delegationsettings/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/deletedservice/README.md b/resource-manager/apimanagement/2024-05-01/deletedservice/README.md index 3df5c2ac618..f8e6c27133d 100644 --- a/resource-manager/apimanagement/2024-05-01/deletedservice/README.md +++ b/resource-manager/apimanagement/2024-05-01/deletedservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/deletedservice` Documentation -The `deletedservice` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `deletedservice` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/deletedservice/client.go b/resource-manager/apimanagement/2024-05-01/deletedservice/client.go index 7ce116a7259..27367714830 100644 --- a/resource-manager/apimanagement/2024-05-01/deletedservice/client.go +++ b/resource-manager/apimanagement/2024-05-01/deletedservice/client.go @@ -15,7 +15,7 @@ type DeletedServiceClient struct { } func NewDeletedServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServiceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/deletedservice/id_deletedservice.go b/resource-manager/apimanagement/2024-05-01/deletedservice/id_deletedservice.go index d4f9feb3f31..9b447f5fd24 100644 --- a/resource-manager/apimanagement/2024-05-01/deletedservice/id_deletedservice.go +++ b/resource-manager/apimanagement/2024-05-01/deletedservice/id_deletedservice.go @@ -42,7 +42,7 @@ func ParseDeletedServiceID(input string) (*DeletedServiceId, error) { } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServiceIDInsensitively(input string) (*DeletedServiceId, error) } id := DeletedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/deletedservice/method_getbyname.go b/resource-manager/apimanagement/2024-05-01/deletedservice/method_getbyname.go index f7fef324399..3e180be780a 100644 --- a/resource-manager/apimanagement/2024-05-01/deletedservice/method_getbyname.go +++ b/resource-manager/apimanagement/2024-05-01/deletedservice/method_getbyname.go @@ -45,7 +45,6 @@ func (c DeletedServiceClient) GetByName(ctx context.Context, id DeletedServiceId var model DeletedServiceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/deletedservice/version.go b/resource-manager/apimanagement/2024-05-01/deletedservice/version.go index efca48d0ebd..3b5b73d116f 100644 --- a/resource-manager/apimanagement/2024-05-01/deletedservice/version.go +++ b/resource-manager/apimanagement/2024-05-01/deletedservice/version.go @@ -1,12 +1,10 @@ package deletedservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservice/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/README.md b/resource-manager/apimanagement/2024-05-01/diagnostic/README.md index 2b984900d7f..c3ab9f399ca 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/README.md +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/diagnostic` Documentation -The `diagnostic` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `diagnostic` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/client.go b/resource-manager/apimanagement/2024-05-01/diagnostic/client.go index d7b4ed69319..6b71958f5b6 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/client.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/client.go @@ -15,7 +15,7 @@ type DiagnosticClient struct { } func NewDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostic", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostic", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/id_diagnostic.go b/resource-manager/apimanagement/2024-05-01/diagnostic/id_diagnostic.go index 890a40a3e9c..4e521a300da 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/id_diagnostic.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/id_service.go b/resource-manager/apimanagement/2024-05-01/diagnostic/id_service.go index ce1adfde374..5ebeb4ccb23 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspace.go b/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspace.go index a8f6a5b0444..59d8e40b513 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspacediagnostic.go b/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspacediagnostic.go index 93f1dbd01ec..d4725908778 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspacediagnostic.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/id_workspacediagnostic.go @@ -46,7 +46,7 @@ func ParseWorkspaceDiagnosticID(input string) (*WorkspaceDiagnosticId, error) { } id := WorkspaceDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceDiagnosticIDInsensitively(input string) (*WorkspaceDiagnostic } id := WorkspaceDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_createorupdate.go index 63709e2900a..18a4c536cb5 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DiagnosticClient) CreateOrUpdate(ctx context.Context, id DiagnosticId, i var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_delete.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_delete.go index 4f5b2bc7d55..1e9acda8c14 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_get.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_get.go index af2a7f7943a..3ae72b09a0f 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticClient) Get(ctx context.Context, id DiagnosticId) (result GetO var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_listbyservice.go index 8f84fb8b874..bf7e8ad966a 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_update.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_update.go index a98dfa6617c..6e25bf0e1d7 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DiagnosticClient) Update(ctx context.Context, id DiagnosticId, input Dia var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticcreateorupdate.go index 4660270804a..5ca3fc7fe9e 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceDiagnosticCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceDiagnosticCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DiagnosticClient) WorkspaceDiagnosticCreateOrUpdate(ctx context.Context, var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticdelete.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticdelete.go index f980ab6458e..21887fc5450 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticdelete.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceDiagnosticDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceDiagnosticDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticget.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticget.go index 5145c6c8a81..dd6f8c67869 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticget.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticget.go @@ -45,7 +45,6 @@ func (c DiagnosticClient) WorkspaceDiagnosticGet(ctx context.Context, id Workspa var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticlistbyworkspace.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticlistbyworkspace.go index 6293c663996..46519b46644 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticlistbyworkspace.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticlistbyworkspace.go @@ -41,6 +41,7 @@ func (o WorkspaceDiagnosticListByWorkspaceOperationOptions) ToHeaders() *client. func (o WorkspaceDiagnosticListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticupdate.go b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticupdate.go index ff1f4a0a25b..973ef75f2eb 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticupdate.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/method_workspacediagnosticupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceDiagnosticUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceDiagnosticUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DiagnosticClient) WorkspaceDiagnosticUpdate(ctx context.Context, id Work var model DiagnosticContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/diagnostic/version.go b/resource-manager/apimanagement/2024-05-01/diagnostic/version.go index c1ab5e6ace2..c56a5178ea2 100644 --- a/resource-manager/apimanagement/2024-05-01/diagnostic/version.go +++ b/resource-manager/apimanagement/2024-05-01/diagnostic/version.go @@ -1,12 +1,10 @@ package diagnostic -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostic/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostic/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/README.md b/resource-manager/apimanagement/2024-05-01/documentationresource/README.md index 4990c189960..64d57971dad 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/README.md +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/documentationresource` Documentation -The `documentationresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `documentationresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/client.go b/resource-manager/apimanagement/2024-05-01/documentationresource/client.go index 84d6809b879..7366c4f9e12 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/client.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/client.go @@ -15,7 +15,7 @@ type DocumentationResourceClient struct { } func NewDocumentationResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*DocumentationResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "documentationresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "documentationresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DocumentationResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/id_documentation.go b/resource-manager/apimanagement/2024-05-01/documentationresource/id_documentation.go index 6841fc7c512..0bb03b62932 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/id_documentation.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/id_documentation.go @@ -44,7 +44,7 @@ func ParseDocumentationID(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDocumentationIDInsensitively(input string) (*DocumentationId, error) { } id := DocumentationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/id_service.go b/resource-manager/apimanagement/2024-05-01/documentationresource/id_service.go index a25669a238f..d37f7661269 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/documentationresource/method_createorupdate.go index dba91b12734..e091e7fa55d 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DocumentationResourceClient) CreateOrUpdate(ctx context.Context, id Docu var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/method_delete.go b/resource-manager/apimanagement/2024-05-01/documentationresource/method_delete.go index dc215c80397..b7e63199308 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/method_get.go b/resource-manager/apimanagement/2024-05-01/documentationresource/method_get.go index db62fe89422..59fe05e032d 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/method_get.go @@ -45,7 +45,6 @@ func (c DocumentationResourceClient) Get(ctx context.Context, id DocumentationId var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/documentationresource/method_listbyservice.go index fd2023ee4d1..2b64e6d607e 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/method_update.go b/resource-manager/apimanagement/2024-05-01/documentationresource/method_update.go index 74fdf96af9a..a7b4e15a22a 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DocumentationResourceClient) Update(ctx context.Context, id Documentatio var model DocumentationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/documentationresource/version.go b/resource-manager/apimanagement/2024-05-01/documentationresource/version.go index afee214c676..b75140457c9 100644 --- a/resource-manager/apimanagement/2024-05-01/documentationresource/version.go +++ b/resource-manager/apimanagement/2024-05-01/documentationresource/version.go @@ -1,12 +1,10 @@ package documentationresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/documentationresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/documentationresource/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplate/README.md b/resource-manager/apimanagement/2024-05-01/emailtemplate/README.md index 627b9152d33..9d01345e601 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplate/README.md +++ b/resource-manager/apimanagement/2024-05-01/emailtemplate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/emailtemplate` Documentation -The `emailtemplate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `emailtemplate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplate/client.go b/resource-manager/apimanagement/2024-05-01/emailtemplate/client.go index 019165ffa63..578f2718f75 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplate/client.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplate/client.go @@ -15,7 +15,7 @@ type EmailTemplateClient struct { } func NewEmailTemplateClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplate/id_service.go b/resource-manager/apimanagement/2024-05-01/emailtemplate/id_service.go index ad519c3023d..962040358d4 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplate/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplate/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/emailtemplate/method_listbyservice.go index c18ee603b17..7a86e93494c 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplate/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplate/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplate/version.go b/resource-manager/apimanagement/2024-05-01/emailtemplate/version.go index 5059d2857cb..13e58341f49 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplate/version.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplate/version.go @@ -1,12 +1,10 @@ package emailtemplate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplate/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/README.md b/resource-manager/apimanagement/2024-05-01/emailtemplates/README.md index edada916ce9..2d7c3151805 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/README.md +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/emailtemplates` Documentation -The `emailtemplates` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `emailtemplates` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/client.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/client.go index 9f3bc8ed59b..d38533bf55a 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/client.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/client.go @@ -15,7 +15,7 @@ type EmailTemplatesClient struct { } func NewEmailTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailtemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailtemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailTemplatesClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/id_template.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/id_template.go index b10f4a91dd1..cb83e661d9e 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/id_template.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/id_template.go @@ -44,7 +44,7 @@ func ParseTemplateID(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTemplateIDInsensitively(input string) (*TemplateId, error) { } id := TemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatecreateorupdate.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatecreateorupdate.go index 8f48b83acfd..7f48ae7cdbc 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatecreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatecreateorupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o EmailTemplateCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c EmailTemplatesClient) EmailTemplateCreateOrUpdate(ctx context.Context, i var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatedelete.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatedelete.go index 3bea1260006..82ce5a37244 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatedelete.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplatedelete.go @@ -35,6 +35,7 @@ func (o EmailTemplateDeleteOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateget.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateget.go index b9686668bf3..fcf8c3babdc 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateget.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateget.go @@ -45,7 +45,6 @@ func (c EmailTemplatesClient) EmailTemplateGet(ctx context.Context, id TemplateI var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateupdate.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateupdate.go index 6870b6a5cc8..c1ac2c80e3f 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateupdate.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/method_emailtemplateupdate.go @@ -36,6 +36,7 @@ func (o EmailTemplateUpdateOperationOptions) ToHeaders() *client.Headers { func (o EmailTemplateUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c EmailTemplatesClient) EmailTemplateUpdate(ctx context.Context, id Templa var model EmailTemplateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/emailtemplates/version.go b/resource-manager/apimanagement/2024-05-01/emailtemplates/version.go index 93aa1c7f50c..bb21c0e35ea 100644 --- a/resource-manager/apimanagement/2024-05-01/emailtemplates/version.go +++ b/resource-manager/apimanagement/2024-05-01/emailtemplates/version.go @@ -1,12 +1,10 @@ package emailtemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailtemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailtemplates/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/README.md b/resource-manager/apimanagement/2024-05-01/gateway/README.md index 4fb464a4641..7dca7eb3dfa 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/README.md +++ b/resource-manager/apimanagement/2024-05-01/gateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gateway` Documentation -The `gateway` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gateway` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gateway/client.go b/resource-manager/apimanagement/2024-05-01/gateway/client.go index 0d22b6f29bb..4b9a1263246 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/client.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/client.go @@ -15,7 +15,7 @@ type GatewayClient struct { } func NewGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/id_service.go b/resource-manager/apimanagement/2024-05-01/gateway/id_service.go index dbfd6735feb..fe3c9d96488 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gateway/id_servicegateway.go index f17eb16b13f..01ae6f67770 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/gateway/method_createorupdate.go index 729223eb676..8e9703e2f34 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayClient) CreateOrUpdate(ctx context.Context, id ServiceGatewayId, var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/method_delete.go b/resource-manager/apimanagement/2024-05-01/gateway/method_delete.go index 2392197e1cf..5885ae3e66f 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/method_get.go b/resource-manager/apimanagement/2024-05-01/gateway/method_get.go index f774d19cc28..deed235a6f3 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/method_get.go @@ -45,7 +45,6 @@ func (c GatewayClient) Get(ctx context.Context, id ServiceGatewayId) (result Get var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/gateway/method_listbyservice.go index 182f1a1be3b..193ebcb3f47 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/method_update.go b/resource-manager/apimanagement/2024-05-01/gateway/method_update.go index f2bb1be8ff7..dc418ab6903 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GatewayClient) Update(ctx context.Context, id ServiceGatewayId, input Ga var model GatewayContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gateway/version.go b/resource-manager/apimanagement/2024-05-01/gateway/version.go index 0aa557ffdfe..27ff987b5ab 100644 --- a/resource-manager/apimanagement/2024-05-01/gateway/version.go +++ b/resource-manager/apimanagement/2024-05-01/gateway/version.go @@ -1,12 +1,10 @@ package gateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gateway/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/README.md b/resource-manager/apimanagement/2024-05-01/gatewayapi/README.md index ccdab2acd02..8b130c9259e 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewayapi` Documentation -The `gatewayapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewayapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/client.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/client.go index 6f88d7098fd..41d09ed34cd 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/client.go @@ -15,7 +15,7 @@ type GatewayApiClient struct { } func NewGatewayApiClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/id_gatewayapi.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/id_gatewayapi.go index 1780b205bde..3f2c6b9bb02 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/id_gatewayapi.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/id_gatewayapi.go @@ -46,7 +46,7 @@ func ParseGatewayApiID(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayApiIDInsensitively(input string) (*GatewayApiId, error) { } id := GatewayApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/id_servicegateway.go index 381375795e2..5bba5da7150 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/method_createorupdate.go index 5af86c5ab69..a17c2009dc7 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GatewayApiClient) CreateOrUpdate(ctx context.Context, id GatewayApiId, i var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/method_listbyservice.go index 1b690a95d5e..22b450a3d24 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayapi/version.go b/resource-manager/apimanagement/2024-05-01/gatewayapi/version.go index 0be52c4c37c..763b7645491 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayapi/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayapi/version.go @@ -1,12 +1,10 @@ package gatewayapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayapi/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/README.md b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/README.md index e1d9abba06c..40306a391a0 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority` Documentation -The `gatewaycertificateauthority` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewaycertificateauthority` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/client.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/client.go index 82e3bc25dd6..e2177530edd 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/client.go @@ -15,7 +15,7 @@ type GatewayCertificateAuthorityClient struct { } func NewGatewayCertificateAuthorityClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayCertificateAuthorityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaycertificateauthority", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayCertificateAuthorityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_certificateauthority.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_certificateauthority.go index 1d7f6784836..f75937cbd0a 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_certificateauthority.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_certificateauthority.go @@ -46,7 +46,7 @@ func ParseCertificateAuthorityID(input string) (*CertificateAuthorityId, error) } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCertificateAuthorityIDInsensitively(input string) (*CertificateAuthori } id := CertificateAuthorityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_servicegateway.go index 26b78ec931a..303a0d38106 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_createorupdate.go index 421099fff39..70b2eddae89 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayCertificateAuthorityClient) CreateOrUpdate(ctx context.Context, i var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_delete.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_delete.go index a6b9d901d6b..677ee184d41 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_get.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_get.go index 2a8a3c51cfd..3e558c2cc6a 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_get.go @@ -45,7 +45,6 @@ func (c GatewayCertificateAuthorityClient) Get(ctx context.Context, id Certifica var model GatewayCertificateAuthorityContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_listbyservice.go index b682c353d60..fd4cff606a3 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/version.go b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/version.go index 3f9b6fc30e7..7215bfe8c06 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaycertificateauthority/version.go @@ -1,12 +1,10 @@ package gatewaycertificateauthority -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaycertificateauthority/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaycertificateauthority/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/README.md b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/README.md index c271076d50f..890dcde0e5c 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken` Documentation -The `gatewaygeneratetoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewaygeneratetoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/client.go b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/client.go index ea0ee9040c7..95794c5f810 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/client.go @@ -15,7 +15,7 @@ type GatewayGenerateTokenClient struct { } func NewGatewayGenerateTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayGenerateTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaygeneratetoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayGenerateTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/id_servicegateway.go index 53bee8e1890..11ee909ed3a 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go index c9b2d8153e0..4db9921a3b7 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/method_gatewaygeneratetoken.go @@ -50,7 +50,6 @@ func (c GatewayGenerateTokenClient) GatewayGenerateToken(ctx context.Context, id var model GatewayTokenContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/version.go b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/version.go index 05c90e83cf0..22f7e3b4215 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaygeneratetoken/version.go @@ -1,12 +1,10 @@ package gatewaygeneratetoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaygeneratetoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaygeneratetoken/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/README.md b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/README.md index 097c722c310..f0e75db783f 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration` Documentation -The `gatewayhostnameconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewayhostnameconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/client.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/client.go index caf1c71d205..abf6519743b 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/client.go @@ -15,7 +15,7 @@ type GatewayHostnameConfigurationClient struct { } func NewGatewayHostnameConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayHostnameConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayhostnameconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayHostnameConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go index 510bff297ac..23c006e4969 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_hostnameconfiguration.go @@ -46,7 +46,7 @@ func ParseHostnameConfigurationID(input string) (*HostnameConfigurationId, error } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHostnameConfigurationIDInsensitively(input string) (*HostnameConfigura } id := HostnameConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_servicegateway.go index 70674a273b9..3fef38a202c 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_createorupdate.go index 81fc99af124..c47366added 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GatewayHostnameConfigurationClient) CreateOrUpdate(ctx context.Context, var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_delete.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_delete.go index 0964c8fdc78..609e8369ace 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_get.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_get.go index d04e4ef66d0..8a74f63cf02 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c GatewayHostnameConfigurationClient) Get(ctx context.Context, id Hostname var model GatewayHostnameConfigurationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_listbyservice.go index f34fd4bdb80..f9f2f988951 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/version.go b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/version.go index 3d98f418796..f573c666580 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayhostnameconfiguration/version.go @@ -1,12 +1,10 @@ package gatewayhostnameconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayhostnameconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayhostnameconfiguration/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/client.go b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/client.go index 4c95799c9a3..1249e0fe43c 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayInvalidateDebugCredentialsClient struct { } func NewGatewayInvalidateDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayInvalidateDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayinvalidatedebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayInvalidateDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/id_servicegateway.go index 9f849ffe103..e953c15e6ac 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/version.go b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/version.go index 8adec08dbee..20f2055b290 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayinvalidatedebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewayinvalidatedebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayinvalidatedebugcredentials/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/README.md b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/README.md index 5c7e1cc5a66..30850a7f7df 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials` Documentation -The `gatewaylistdebugcredentials` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewaylistdebugcredentials` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/client.go b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/client.go index 6c497072ede..3c619a17e21 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/client.go @@ -15,7 +15,7 @@ type GatewayListDebugCredentialsClient struct { } func NewGatewayListDebugCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListDebugCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistdebugcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListDebugCredentialsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/id_servicegateway.go index c219af55c3b..daeca2eb2d2 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go index 322d77c35a2..993646ca773 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/method_gatewaylistdebugcredentials.go @@ -50,7 +50,6 @@ func (c GatewayListDebugCredentialsClient) GatewayListDebugCredentials(ctx conte var model GatewayDebugCredentialsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/version.go b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/version.go index 15a76021429..d050ac66913 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistdebugcredentials/version.go @@ -1,12 +1,10 @@ package gatewaylistdebugcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistdebugcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistdebugcredentials/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/README.md b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/README.md index 5200403a454..9a99a53267a 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewaylistkeys` Documentation -The `gatewaylistkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewaylistkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/client.go b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/client.go index a9b08e9562a..a54653f751f 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/client.go @@ -15,7 +15,7 @@ type GatewayListKeysClient struct { } func NewGatewayListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylistkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylistkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/id_servicegateway.go index eacc5d94b71..aa998e27e46 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/method_gatewaylistkeys.go b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/method_gatewaylistkeys.go index 674953f6ad2..835facb4056 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/method_gatewaylistkeys.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/method_gatewaylistkeys.go @@ -46,7 +46,6 @@ func (c GatewayListKeysClient) GatewayListKeys(ctx context.Context, id ServiceGa var model GatewayKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/version.go b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/version.go index 4b454725d93..4550c034b71 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylistkeys/version.go @@ -1,12 +1,10 @@ package gatewaylistkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylistkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylistkeys/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/README.md b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/README.md index f5a155ed279..b5e3267c270 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewaylisttrace` Documentation -The `gatewaylisttrace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewaylisttrace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/client.go b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/client.go index f61a6ad2928..e4944d1b2a9 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/client.go @@ -15,7 +15,7 @@ type GatewayListTraceClient struct { } func NewGatewayListTraceClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayListTraceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewaylisttrace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewaylisttrace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayListTraceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/id_servicegateway.go index 76d21bcd053..51ae904c91b 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/method_gatewaylisttrace.go b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/method_gatewaylisttrace.go index 833a22a719e..d26278bb9b6 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/method_gatewaylisttrace.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/method_gatewaylisttrace.go @@ -50,7 +50,6 @@ func (c GatewayListTraceClient) GatewayListTrace(ctx context.Context, id Service var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/version.go b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/version.go index 5ffc17860dc..0b658726e8f 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewaylisttrace/version.go @@ -1,12 +1,10 @@ package gatewaylisttrace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewaylisttrace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewaylisttrace/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/README.md b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/README.md index 1db40ba9252..36e30019aeb 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/README.md +++ b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey` Documentation -The `gatewayregeneratekey` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `gatewayregeneratekey` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/client.go b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/client.go index aef06aab007..2770f325934 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/client.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/client.go @@ -15,7 +15,7 @@ type GatewayRegenerateKeyClient struct { } func NewGatewayRegenerateKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewayRegenerateKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gatewayregeneratekey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewayRegenerateKeyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/id_servicegateway.go b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/id_servicegateway.go index 2df4b0f485a..b33c1ba43d0 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/id_servicegateway.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/id_servicegateway.go @@ -44,7 +44,7 @@ func ParseServiceGatewayID(input string) (*ServiceGatewayId, error) { } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceGatewayIDInsensitively(input string) (*ServiceGatewayId, error) } id := ServiceGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/version.go b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/version.go index 4d4acb4a8b7..a3330373fce 100644 --- a/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/version.go +++ b/resource-manager/apimanagement/2024-05-01/gatewayregeneratekey/version.go @@ -1,12 +1,10 @@ package gatewayregeneratekey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gatewayregeneratekey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gatewayregeneratekey/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/README.md b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/README.md index 74e968d3c9b..9149114071c 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/README.md +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/graphqlapiresolver` Documentation -The `graphqlapiresolver` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `graphqlapiresolver` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/client.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/client.go index ae9f7510594..b3ebac8625f 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/client.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverClient struct { } func NewGraphQLApiResolverClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_api.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_api.go index 3f2483494f0..23aa990c8b9 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_api.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_api.go @@ -44,7 +44,7 @@ func ParseApiID(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiIDInsensitively(input string) (*ApiId, error) { } id := ApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_resolver.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_resolver.go index 3ff37f45676..adda4626050 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_resolver.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_createorupdate.go index 7860204fd3c..fde71d2c4d5 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverClient) CreateOrUpdate(ctx context.Context, id Resolve var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_delete.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_delete.go index 914915dc4d6..1c1c2965313 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_get.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_get.go index 8090c144df8..7209e49cd71 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_get.go @@ -45,7 +45,6 @@ func (c GraphQLApiResolverClient) Get(ctx context.Context, id ResolverId) (resul var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_listbyapi.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_listbyapi.go index 5ce194fb6df..3631d4d14b3 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_listbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_listbyapi.go @@ -41,6 +41,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_update.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_update.go index 3fa45e6fa93..91e1176b64b 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GraphQLApiResolverClient) Update(ctx context.Context, id ResolverId, inp var model ResolverContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/version.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/version.go index b2e30a5b87c..ee6add7ea4a 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/version.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolver/version.go @@ -1,12 +1,10 @@ package graphqlapiresolver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolver/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/README.md b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/README.md index b24dda27ffb..a314a94ce0d 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy` Documentation -The `graphqlapiresolverpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `graphqlapiresolverpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/client.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/client.go index 28db0b0bef5..4f9c0d8efbd 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/client.go @@ -15,7 +15,7 @@ type GraphQLApiResolverPolicyClient struct { } func NewGraphQLApiResolverPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQLApiResolverPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqlapiresolverpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQLApiResolverPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/id_resolver.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/id_resolver.go index 84768e215d7..db5373379f0 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/id_resolver.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/id_resolver.go @@ -46,7 +46,7 @@ func ParseResolverID(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseResolverIDInsensitively(input string) (*ResolverId, error) { } id := ResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_createorupdate.go index c349e81087a..0ba357fe731 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GraphQLApiResolverPolicyClient) CreateOrUpdate(ctx context.Context, id R var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_delete.go index 619ea1f6171..0cd91cb1b2e 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_get.go index 4e49bd17793..5299c3d59cf 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GraphQLApiResolverPolicyClient) Get(ctx context.Context, id ResolverId, var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/version.go b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/version.go index 7ec593546a1..87cf759d142 100644 --- a/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/graphqlapiresolverpolicy/version.go @@ -1,12 +1,10 @@ package graphqlapiresolverpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqlapiresolverpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqlapiresolverpolicy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/group/README.md b/resource-manager/apimanagement/2024-05-01/group/README.md index f07c29b7cef..ed03406f23e 100644 --- a/resource-manager/apimanagement/2024-05-01/group/README.md +++ b/resource-manager/apimanagement/2024-05-01/group/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/group` Documentation -The `group` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `group` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/group/client.go b/resource-manager/apimanagement/2024-05-01/group/client.go index 0301e35f4e8..d2ad0ba440e 100644 --- a/resource-manager/apimanagement/2024-05-01/group/client.go +++ b/resource-manager/apimanagement/2024-05-01/group/client.go @@ -15,7 +15,7 @@ type GroupClient struct { } func NewGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "group", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "group", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/group/id_group.go b/resource-manager/apimanagement/2024-05-01/group/id_group.go index 033b00db2ff..d509f57a395 100644 --- a/resource-manager/apimanagement/2024-05-01/group/id_group.go +++ b/resource-manager/apimanagement/2024-05-01/group/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/group/id_service.go b/resource-manager/apimanagement/2024-05-01/group/id_service.go index b997cba49d0..8218c363385 100644 --- a/resource-manager/apimanagement/2024-05-01/group/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/group/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/group/id_workspace.go b/resource-manager/apimanagement/2024-05-01/group/id_workspace.go index 2a31e848c5a..b208717db85 100644 --- a/resource-manager/apimanagement/2024-05-01/group/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/group/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/group/id_workspacegroup.go b/resource-manager/apimanagement/2024-05-01/group/id_workspacegroup.go index d95eae81434..dda9bd40fc1 100644 --- a/resource-manager/apimanagement/2024-05-01/group/id_workspacegroup.go +++ b/resource-manager/apimanagement/2024-05-01/group/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/group/method_createorupdate.go index e8b639dbe8b..563de8537b1 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) CreateOrUpdate(ctx context.Context, id GroupId, input Group var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_delete.go b/resource-manager/apimanagement/2024-05-01/group/method_delete.go index b7358fde533..47829929156 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_get.go b/resource-manager/apimanagement/2024-05-01/group/method_get.go index 71da80e4425..63a857ba29a 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_get.go @@ -45,7 +45,6 @@ func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationRe var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/group/method_listbyservice.go index 4f8da96ef4a..e7c287794fb 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_update.go b/resource-manager/apimanagement/2024-05-01/group/method_update.go index 70066730bb1..cea5374d418 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) Update(ctx context.Context, id GroupId, input GroupUpdatePa var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupcreateorupdate.go index 5ad40a08c47..b43d3bcaa03 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToHeaders() *client.Header func (o WorkspaceGroupCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GroupClient) WorkspaceGroupCreateOrUpdate(ctx context.Context, id Worksp var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupdelete.go b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupdelete.go index 949a8cb1846..f471d58942e 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupdelete.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGroupDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupget.go b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupget.go index 88a4fa8e56b..b729c88a662 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupget.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupget.go @@ -45,7 +45,6 @@ func (c GroupClient) WorkspaceGroupGet(ctx context.Context, id WorkspaceGroupId) var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_workspacegrouplistbyservice.go b/resource-manager/apimanagement/2024-05-01/group/method_workspacegrouplistbyservice.go index 2aa11bf1959..71073410fa5 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_workspacegrouplistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_workspacegrouplistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupListByServiceOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGroupListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupupdate.go b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupupdate.go index 6e246635560..8c7f865f39f 100644 --- a/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupupdate.go +++ b/resource-manager/apimanagement/2024-05-01/group/method_workspacegroupupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceGroupUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c GroupClient) WorkspaceGroupUpdate(ctx context.Context, id WorkspaceGroup var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/group/version.go b/resource-manager/apimanagement/2024-05-01/group/version.go index 3c0d54b6b3f..1507413ac52 100644 --- a/resource-manager/apimanagement/2024-05-01/group/version.go +++ b/resource-manager/apimanagement/2024-05-01/group/version.go @@ -1,12 +1,10 @@ package group -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/group/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/group/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/README.md b/resource-manager/apimanagement/2024-05-01/groupuser/README.md index 8a9e838ab2d..507287b54c0 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/README.md +++ b/resource-manager/apimanagement/2024-05-01/groupuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/groupuser` Documentation -The `groupuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `groupuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/client.go b/resource-manager/apimanagement/2024-05-01/groupuser/client.go index 7a2d9304c73..0883ae96e68 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/client.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/client.go @@ -15,7 +15,7 @@ type GroupUserClient struct { } func NewGroupUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/id_group.go b/resource-manager/apimanagement/2024-05-01/groupuser/id_group.go index 1cacd14ecf9..3c0f4c0569f 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/id_group.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/id_group.go @@ -44,7 +44,7 @@ func ParseGroupID(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGroupIDInsensitively(input string) (*GroupId, error) { } id := GroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/id_groupuser.go b/resource-manager/apimanagement/2024-05-01/groupuser/id_groupuser.go index 57de3d320e8..e6aa7e8ae21 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/id_groupuser.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/id_groupuser.go @@ -46,7 +46,7 @@ func ParseGroupUserID(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupUserIDInsensitively(input string) (*GroupUserId, error) { } id := GroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroup.go b/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroup.go index 6c67d5dd6e0..63caa50ce9f 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroup.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroup.go @@ -46,7 +46,7 @@ func ParseWorkspaceGroupID(input string) (*WorkspaceGroupId, error) { } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceGroupIDInsensitively(input string) (*WorkspaceGroupId, error) } id := WorkspaceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroupuser.go b/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroupuser.go index fd00ae51ba3..cf1edbb928f 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroupuser.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/id_workspacegroupuser.go @@ -48,7 +48,7 @@ func ParseWorkspaceGroupUserID(input string) (*WorkspaceGroupUserId, error) { } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceGroupUserIDInsensitively(input string) (*WorkspaceGroupUserId } id := WorkspaceGroupUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/method_create.go b/resource-manager/apimanagement/2024-05-01/groupuser/method_create.go index 6dc8112254d..fd3d625df67 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/method_create.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/method_create.go @@ -46,7 +46,6 @@ func (c GroupUserClient) Create(ctx context.Context, id GroupUserId) (result Cre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/method_list.go b/resource-manager/apimanagement/2024-05-01/groupuser/method_list.go index b2f4d682063..002cd3d1fbf 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupusercreate.go b/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupusercreate.go index dd73551832d..f7a9de38eab 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupusercreate.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupusercreate.go @@ -46,7 +46,6 @@ func (c GroupUserClient) WorkspaceGroupUserCreate(ctx context.Context, id Worksp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupuserlist.go b/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupuserlist.go index c4e2a527039..47776aadfd4 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupuserlist.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/method_workspacegroupuserlist.go @@ -41,6 +41,7 @@ func (o WorkspaceGroupUserListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceGroupUserListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/groupuser/version.go b/resource-manager/apimanagement/2024-05-01/groupuser/version.go index 497e67b752d..037a8cf6f31 100644 --- a/resource-manager/apimanagement/2024-05-01/groupuser/version.go +++ b/resource-manager/apimanagement/2024-05-01/groupuser/version.go @@ -1,12 +1,10 @@ package groupuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupuser/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/README.md b/resource-manager/apimanagement/2024-05-01/identityprovider/README.md index e00153a79c4..2917aa36010 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/README.md +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/identityprovider` Documentation -The `identityprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `identityprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/client.go b/resource-manager/apimanagement/2024-05-01/identityprovider/client.go index ba2ed8bbee1..f9a62f0de7c 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/client.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/client.go @@ -15,7 +15,7 @@ type IdentityProviderClient struct { } func NewIdentityProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*IdentityProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "identityprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "identityprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IdentityProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/id_identityprovider.go b/resource-manager/apimanagement/2024-05-01/identityprovider/id_identityprovider.go index 3d474aaec02..2def4ce6e59 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/id_identityprovider.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/id_identityprovider.go @@ -44,7 +44,7 @@ func ParseIdentityProviderID(input string) (*IdentityProviderId, error) { } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIdentityProviderIDInsensitively(input string) (*IdentityProviderId, er } id := IdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/id_service.go b/resource-manager/apimanagement/2024-05-01/identityprovider/id_service.go index 8276034f3e7..d2022417e8e 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/identityprovider/method_createorupdate.go index 834adf0fae9..b42e0767573 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c IdentityProviderClient) CreateOrUpdate(ctx context.Context, id IdentityP var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/method_delete.go b/resource-manager/apimanagement/2024-05-01/identityprovider/method_delete.go index 825d432de2b..eabfcbc6daa 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/method_get.go b/resource-manager/apimanagement/2024-05-01/identityprovider/method_get.go index a7550d92bb0..2328ee95ee7 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/method_get.go @@ -45,7 +45,6 @@ func (c IdentityProviderClient) Get(ctx context.Context, id IdentityProviderId) var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/identityprovider/method_listsecrets.go index 284d5e3aa2b..0f370b89eaf 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c IdentityProviderClient) ListSecrets(ctx context.Context, id IdentityProv var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/method_update.go b/resource-manager/apimanagement/2024-05-01/identityprovider/method_update.go index ac8db539b33..92a7c2f8818 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c IdentityProviderClient) Update(ctx context.Context, id IdentityProviderI var model IdentityProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/identityprovider/version.go b/resource-manager/apimanagement/2024-05-01/identityprovider/version.go index bd9affc1c41..251f913c0dc 100644 --- a/resource-manager/apimanagement/2024-05-01/identityprovider/version.go +++ b/resource-manager/apimanagement/2024-05-01/identityprovider/version.go @@ -1,12 +1,10 @@ package identityprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/identityprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/identityprovider/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/issue/README.md b/resource-manager/apimanagement/2024-05-01/issue/README.md index 63eba0197cc..bbb9f3b2c3a 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/README.md +++ b/resource-manager/apimanagement/2024-05-01/issue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/issue` Documentation -The `issue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `issue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/issue/client.go b/resource-manager/apimanagement/2024-05-01/issue/client.go index cb06d0ebaca..e2e870934db 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/client.go +++ b/resource-manager/apimanagement/2024-05-01/issue/client.go @@ -15,7 +15,7 @@ type IssueClient struct { } func NewIssueClientWithBaseURI(sdkApi sdkEnv.Api) (*IssueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "issue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "issue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IssueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/issue/id_issue.go b/resource-manager/apimanagement/2024-05-01/issue/id_issue.go index 45eb9485335..401c80ae524 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/id_issue.go +++ b/resource-manager/apimanagement/2024-05-01/issue/id_issue.go @@ -44,7 +44,7 @@ func ParseIssueID(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIssueIDInsensitively(input string) (*IssueId, error) { } id := IssueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/issue/id_service.go b/resource-manager/apimanagement/2024-05-01/issue/id_service.go index 88e8a90de0c..4b3d26c86cb 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/issue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/issue/method_get.go b/resource-manager/apimanagement/2024-05-01/issue/method_get.go index 69cfbc200fa..791db4dd8c3 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/issue/method_get.go @@ -45,7 +45,6 @@ func (c IssueClient) Get(ctx context.Context, id IssueId) (result GetOperationRe var model IssueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/issue/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/issue/method_listbyservice.go index bdf1aa92398..743f676c948 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/issue/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/issue/version.go b/resource-manager/apimanagement/2024-05-01/issue/version.go index cbf44284e94..f9d2ba2bc9c 100644 --- a/resource-manager/apimanagement/2024-05-01/issue/version.go +++ b/resource-manager/apimanagement/2024-05-01/issue/version.go @@ -1,12 +1,10 @@ package issue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/issue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/issue/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/logger/README.md b/resource-manager/apimanagement/2024-05-01/logger/README.md index 655743d0083..5bc2e8c0f17 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/README.md +++ b/resource-manager/apimanagement/2024-05-01/logger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/logger` Documentation -The `logger` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `logger` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/logger/client.go b/resource-manager/apimanagement/2024-05-01/logger/client.go index c7b58012a84..2ecf8e82720 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/client.go +++ b/resource-manager/apimanagement/2024-05-01/logger/client.go @@ -15,7 +15,7 @@ type LoggerClient struct { } func NewLoggerClientWithBaseURI(sdkApi sdkEnv.Api) (*LoggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoggerClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/logger/id_logger.go b/resource-manager/apimanagement/2024-05-01/logger/id_logger.go index ebf285cefca..cb5c5cca792 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/id_logger.go +++ b/resource-manager/apimanagement/2024-05-01/logger/id_logger.go @@ -44,7 +44,7 @@ func ParseLoggerID(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoggerIDInsensitively(input string) (*LoggerId, error) { } id := LoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/logger/id_service.go b/resource-manager/apimanagement/2024-05-01/logger/id_service.go index e5a5d44be9e..e47928df93b 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/logger/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/logger/id_workspace.go b/resource-manager/apimanagement/2024-05-01/logger/id_workspace.go index 5f3097a02c9..47c67aa5fb8 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/logger/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/logger/id_workspacelogger.go b/resource-manager/apimanagement/2024-05-01/logger/id_workspacelogger.go index d4977a212e1..589355273aa 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/id_workspacelogger.go +++ b/resource-manager/apimanagement/2024-05-01/logger/id_workspacelogger.go @@ -46,7 +46,7 @@ func ParseWorkspaceLoggerID(input string) (*WorkspaceLoggerId, error) { } id := WorkspaceLoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceLoggerIDInsensitively(input string) (*WorkspaceLoggerId, erro } id := WorkspaceLoggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/logger/method_createorupdate.go index b1a476b3cf9..3430cb9dd77 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c LoggerClient) CreateOrUpdate(ctx context.Context, id LoggerId, input Log var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_delete.go b/resource-manager/apimanagement/2024-05-01/logger/method_delete.go index d1edc7304d6..3465b8ec829 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_get.go b/resource-manager/apimanagement/2024-05-01/logger/method_get.go index dd5216620ea..7a6f1ba10d6 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_get.go @@ -45,7 +45,6 @@ func (c LoggerClient) Get(ctx context.Context, id LoggerId) (result GetOperation var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/logger/method_listbyservice.go index 3765ffa1f12..d930656f267 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_update.go b/resource-manager/apimanagement/2024-05-01/logger/method_update.go index e7491dd03c2..66980330556 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LoggerClient) Update(ctx context.Context, id LoggerId, input LoggerUpdat var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggercreateorupdate.go b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggercreateorupdate.go index d5e33e7c636..dea691c2e18 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggercreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggercreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceLoggerCreateOrUpdateOperationOptions) ToHeaders() *client.Heade func (o WorkspaceLoggerCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c LoggerClient) WorkspaceLoggerCreateOrUpdate(ctx context.Context, id Work var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerdelete.go b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerdelete.go index f3172071460..da999d0b4eb 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerdelete.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceLoggerDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceLoggerDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerget.go b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerget.go index 87d1ff961bf..72a7d01a50f 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerget.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerget.go @@ -45,7 +45,6 @@ func (c LoggerClient) WorkspaceLoggerGet(ctx context.Context, id WorkspaceLogger var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerlistbyworkspace.go b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerlistbyworkspace.go index e998bb677be..2915ee0a4be 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerlistbyworkspace.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerlistbyworkspace.go @@ -41,6 +41,7 @@ func (o WorkspaceLoggerListByWorkspaceOperationOptions) ToHeaders() *client.Head func (o WorkspaceLoggerListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerupdate.go b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerupdate.go index 06106d14878..b5b6237b7cf 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerupdate.go +++ b/resource-manager/apimanagement/2024-05-01/logger/method_workspaceloggerupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceLoggerUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceLoggerUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LoggerClient) WorkspaceLoggerUpdate(ctx context.Context, id WorkspaceLog var model LoggerContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/logger/version.go b/resource-manager/apimanagement/2024-05-01/logger/version.go index 02cfcf76bb6..9f9d15330a5 100644 --- a/resource-manager/apimanagement/2024-05-01/logger/version.go +++ b/resource-manager/apimanagement/2024-05-01/logger/version.go @@ -1,12 +1,10 @@ package logger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logger/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/README.md b/resource-manager/apimanagement/2024-05-01/namedvalue/README.md index 784d53e5afb..d8318d707a3 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/README.md +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/namedvalue` Documentation -The `namedvalue` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `namedvalue` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/client.go b/resource-manager/apimanagement/2024-05-01/namedvalue/client.go index 9bc64e690ca..043c376438d 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/client.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/client.go @@ -15,7 +15,7 @@ type NamedValueClient struct { } func NewNamedValueClientWithBaseURI(sdkApi sdkEnv.Api) (*NamedValueClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namedvalue", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namedvalue", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamedValueClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/id_namedvalue.go b/resource-manager/apimanagement/2024-05-01/namedvalue/id_namedvalue.go index 960d341eb81..2d7156d678b 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/id_namedvalue.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/id_namedvalue.go @@ -44,7 +44,7 @@ func ParseNamedValueID(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamedValueIDInsensitively(input string) (*NamedValueId, error) { } id := NamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/id_service.go b/resource-manager/apimanagement/2024-05-01/namedvalue/id_service.go index 3e71ff3a6f0..9c5b179b85f 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspace.go b/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspace.go index 7487f000469..05e9b2a6229 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspacenamedvalue.go b/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspacenamedvalue.go index 44f55e1b20a..dd2ec43e950 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspacenamedvalue.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/id_workspacenamedvalue.go @@ -46,7 +46,7 @@ func ParseWorkspaceNamedValueID(input string) (*WorkspaceNamedValueId, error) { } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceNamedValueIDInsensitively(input string) (*WorkspaceNamedValue } id := WorkspaceNamedValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_createorupdate.go index a12111f998e..b5862135bb5 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_delete.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_delete.go index f47f9ad5955..d071bb811bf 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_get.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_get.go index b4f6fc01960..208dc6dcff4 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_get.go @@ -45,7 +45,6 @@ func (c NamedValueClient) Get(ctx context.Context, id NamedValueId) (result GetO var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_listbyservice.go index c484c236266..328935f3ddb 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_listvalue.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_listvalue.go index 80e6212cce7..010f8359421 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_listvalue.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_listvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) ListValue(ctx context.Context, id NamedValueId) (resul var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_update.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_update.go index 0bb9dff4811..a22327f3f7a 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluecreateorupdate.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluecreateorupdate.go index 84290f98fbb..127d8eef85f 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluecreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluecreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToHeaders() *client.H func (o WorkspaceNamedValueCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluedelete.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluedelete.go index 7d05e234c48..903ae6bbf4a 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluedelete.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluedelete.go @@ -35,6 +35,7 @@ func (o WorkspaceNamedValueDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueget.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueget.go index fd48731656e..499da89fe82 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueget.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueget.go @@ -45,7 +45,6 @@ func (c NamedValueClient) WorkspaceNamedValueGet(ctx context.Context, id Workspa var model NamedValueContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistbyservice.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistbyservice.go index 87a17e3f92f..0cf463c799d 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceNamedValueListByServiceOperationOptions) ToHeaders() *client.He func (o WorkspaceNamedValueListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistvalue.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistvalue.go index ced0d6c1600..70be7321342 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistvalue.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvaluelistvalue.go @@ -46,7 +46,6 @@ func (c NamedValueClient) WorkspaceNamedValueListValue(ctx context.Context, id W var model NamedValueSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueupdate.go b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueupdate.go index 2767761302a..866a931165b 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueupdate.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/method_workspacenamedvalueupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceNamedValueUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceNamedValueUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/namedvalue/version.go b/resource-manager/apimanagement/2024-05-01/namedvalue/version.go index 225a44fecca..07876df6b3d 100644 --- a/resource-manager/apimanagement/2024-05-01/namedvalue/version.go +++ b/resource-manager/apimanagement/2024-05-01/namedvalue/version.go @@ -1,12 +1,10 @@ package namedvalue -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namedvalue/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namedvalue/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/README.md b/resource-manager/apimanagement/2024-05-01/networkstatus/README.md index 0f4721b9786..9571ccf0ad6 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/README.md +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/networkstatus` Documentation -The `networkstatus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `networkstatus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/client.go b/resource-manager/apimanagement/2024-05-01/networkstatus/client.go index a31324aaa99..0f7b98b9964 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/client.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/client.go @@ -15,7 +15,7 @@ type NetworkStatusClient struct { } func NewNetworkStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkStatusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/id_location.go b/resource-manager/apimanagement/2024-05-01/networkstatus/id_location.go index 33d1e89e60c..4805bc32949 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/id_location.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/id_location.go @@ -44,7 +44,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/id_service.go b/resource-manager/apimanagement/2024-05-01/networkstatus/id_service.go index 16676b5b068..5ef7bf317d5 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbylocation.go b/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbylocation.go index 2ac16a461cc..6d070726da4 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbylocation.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbylocation.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByLocation(ctx context.Context, id LocationId) var model NetworkStatusContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbyservice.go index 82df8dfdf78..3cd4e1561af 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/method_listbyservice.go @@ -46,7 +46,6 @@ func (c NetworkStatusClient) ListByService(ctx context.Context, id ServiceId) (r var model []NetworkStatusContractByLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/networkstatus/version.go b/resource-manager/apimanagement/2024-05-01/networkstatus/version.go index 1f21b108b50..60db14e604f 100644 --- a/resource-manager/apimanagement/2024-05-01/networkstatus/version.go +++ b/resource-manager/apimanagement/2024-05-01/networkstatus/version.go @@ -1,12 +1,10 @@ package networkstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkstatus/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/notification/README.md b/resource-manager/apimanagement/2024-05-01/notification/README.md index e2946aa5896..879b397c8f6 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/README.md +++ b/resource-manager/apimanagement/2024-05-01/notification/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/notification` Documentation -The `notification` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `notification` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/notification/client.go b/resource-manager/apimanagement/2024-05-01/notification/client.go index 277470faa23..40e630b60f8 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/client.go +++ b/resource-manager/apimanagement/2024-05-01/notification/client.go @@ -15,7 +15,7 @@ type NotificationClient struct { } func NewNotificationClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notification", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notification", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/notification/id_notification.go b/resource-manager/apimanagement/2024-05-01/notification/id_notification.go index 39c82639f30..cf908edb898 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/id_notification.go +++ b/resource-manager/apimanagement/2024-05-01/notification/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notification/id_notificationnotification.go b/resource-manager/apimanagement/2024-05-01/notification/id_notificationnotification.go index 9d5be1827b8..66eae538ce8 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/id_notificationnotification.go +++ b/resource-manager/apimanagement/2024-05-01/notification/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notification/id_service.go b/resource-manager/apimanagement/2024-05-01/notification/id_service.go index a9b6b10ca5c..a5410a065b4 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/notification/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notification/id_workspace.go b/resource-manager/apimanagement/2024-05-01/notification/id_workspace.go index 2a3893a9c73..1a4deb10010 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/notification/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/notification/method_createorupdate.go index f66ed7aa163..ef2314ee9a9 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) CreateOrUpdate(ctx context.Context, id NotificationI var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_get.go b/resource-manager/apimanagement/2024-05-01/notification/method_get.go index 21cc5b2b6f4..0a063938dee 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_get.go @@ -45,7 +45,6 @@ func (c NotificationClient) Get(ctx context.Context, id NotificationId) (result var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/notification/method_listbyservice.go index b8f071f58f8..8dbc79c16d5 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_listbyservice.go @@ -40,6 +40,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationcreateorupdate.go index f9129556c8d..94bd205e822 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceNotificationCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationClient) WorkspaceNotificationCreateOrUpdate(ctx context.Cont var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationget.go b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationget.go index f9301d38cea..0e2a3ee9227 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationget.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationget.go @@ -45,7 +45,6 @@ func (c NotificationClient) WorkspaceNotificationGet(ctx context.Context, id Not var model NotificationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationlistbyservice.go b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationlistbyservice.go index 9c9bdd761b7..0bc8fe62d30 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/notification/method_workspacenotificationlistbyservice.go @@ -40,6 +40,7 @@ func (o WorkspaceNotificationListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceNotificationListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/notification/version.go b/resource-manager/apimanagement/2024-05-01/notification/version.go index 51ed0ce7ff2..a094013b0e0 100644 --- a/resource-manager/apimanagement/2024-05-01/notification/version.go +++ b/resource-manager/apimanagement/2024-05-01/notification/version.go @@ -1,12 +1,10 @@ package notification -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notification/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notification/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/README.md b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/README.md index d5ea9368891..b6876175f1e 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/README.md +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/notificationrecipientemail` Documentation -The `notificationrecipientemail` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `notificationrecipientemail` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/client.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/client.go index 9975fccb850..f9007de8d12 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/client.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/client.go @@ -15,7 +15,7 @@ type NotificationRecipientEmailClient struct { } func NewNotificationRecipientEmailClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientEmailClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientemail", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientemail", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientEmailClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notification.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notification.go index 85bab8ef752..6d666b57152 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notification.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationnotification.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationnotification.go index b5257846bad..1fc5a15df48 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationnotification.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationrecipientemail.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationrecipientemail.go index 417bba3220c..dd7f2dbaa1b 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationrecipientemail.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_notificationrecipientemail.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientEmailID(input string) (*NotificationRecipientEmai } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientEmailIDInsensitively(input string) (*Notification } id := NotificationRecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_recipientemail.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_recipientemail.go index ed228835ce6..24a344f3668 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_recipientemail.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/id_recipientemail.go @@ -46,7 +46,7 @@ func ParseRecipientEmailID(input string) (*RecipientEmailId, error) { } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientEmailIDInsensitively(input string) (*RecipientEmailId, error) } id := RecipientEmailId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_createorupdate.go index c9ff8f4f049..204db2f61d9 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, id var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go index a58726e1c6c..ff5d1b65a2a 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/method_workspacenotificationrecipientemailcreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientEmailClient) WorkspaceNotificationRecipientEmailCre var model RecipientEmailContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/version.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/version.go index 5eab803396a..7e431a9bae1 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/version.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientemail/version.go @@ -1,12 +1,10 @@ package notificationrecipientemail -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientemail/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientemail/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/README.md b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/README.md index fc68ca24166..3b832db6c05 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/README.md +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/notificationrecipientuser` Documentation -The `notificationrecipientuser` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `notificationrecipientuser` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/client.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/client.go index 3049dccc74b..28fb21100d5 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/client.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/client.go @@ -15,7 +15,7 @@ type NotificationRecipientUserClient struct { } func NewNotificationRecipientUserClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationRecipientUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationrecipientuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationrecipientuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationRecipientUserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notification.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notification.go index 525816f0e3b..e013481d0f6 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notification.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notification.go @@ -44,7 +44,7 @@ func ParseNotificationID(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationIDInsensitively(input string) (*NotificationId, error) { } id := NotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationnotification.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationnotification.go index 86345fd0047..44e2dd8aaca 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationnotification.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationnotification.go @@ -46,7 +46,7 @@ func ParseNotificationNotificationID(input string) (*NotificationNotificationId, } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationNotificationIDInsensitively(input string) (*NotificationNo } id := NotificationNotificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationrecipientuser.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationrecipientuser.go index abd829fc50b..8dad8ffd69f 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationrecipientuser.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_notificationrecipientuser.go @@ -48,7 +48,7 @@ func ParseNotificationRecipientUserID(input string) (*NotificationRecipientUserI } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseNotificationRecipientUserIDInsensitively(input string) (*NotificationR } id := NotificationRecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_recipientuser.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_recipientuser.go index 1c6e88f7af0..3b5d7039da1 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_recipientuser.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/id_recipientuser.go @@ -46,7 +46,7 @@ func ParseRecipientUserID(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecipientUserIDInsensitively(input string) (*RecipientUserId, error) { } id := RecipientUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_createorupdate.go index 0736b330824..8cdb56c5521 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_createorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, id var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go index ee963934976..000d95f83c1 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/method_workspacenotificationrecipientusercreateorupdate.go @@ -46,7 +46,6 @@ func (c NotificationRecipientUserClient) WorkspaceNotificationRecipientUserCreat var model RecipientUserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/version.go b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/version.go index 015893083fc..99ad6526260 100644 --- a/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/version.go +++ b/resource-manager/apimanagement/2024-05-01/notificationrecipientuser/version.go @@ -1,12 +1,10 @@ package notificationrecipientuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationrecipientuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationrecipientuser/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/README.md b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/README.md index 0b69fbd4670..c34be543f4c 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/README.md +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/openidconnectprovider` Documentation -The `openidconnectprovider` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `openidconnectprovider` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/client.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/client.go index 6b2113dfc3d..01917915c80 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/client.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/client.go @@ -15,7 +15,7 @@ type OpenidConnectProviderClient struct { } func NewOpenidConnectProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenidConnectProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openidconnectprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openidconnectprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenidConnectProviderClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_openidconnectprovider.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_openidconnectprovider.go index b1e20b39388..c51f53b0377 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_openidconnectprovider.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_openidconnectprovider.go @@ -44,7 +44,7 @@ func ParseOpenidConnectProviderID(input string) (*OpenidConnectProviderId, error } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOpenidConnectProviderIDInsensitively(input string) (*OpenidConnectProv } id := OpenidConnectProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_service.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_service.go index 992d2595802..7493219e726 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_createorupdate.go index ab5c53bdaa6..61c01cf6b96 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c OpenidConnectProviderClient) CreateOrUpdate(ctx context.Context, id Open var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_delete.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_delete.go index d434f5eff61..f254a016bd7 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_get.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_get.go index 642a146fa5f..216dd2c005c 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_get.go @@ -45,7 +45,6 @@ func (c OpenidConnectProviderClient) Get(ctx context.Context, id OpenidConnectPr var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listbyservice.go index a4b2de8c3dc..5fad44984c9 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listsecrets.go index 39b0cbb3857..99cf943206f 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_listsecrets.go @@ -46,7 +46,6 @@ func (c OpenidConnectProviderClient) ListSecrets(ctx context.Context, id OpenidC var model ClientSecretContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_update.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_update.go index fc095d745c7..2f800589ad0 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OpenidConnectProviderClient) Update(ctx context.Context, id OpenidConnec var model OpenidConnectProviderContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/version.go b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/version.go index 5056cdad935..c1f5fb27abc 100644 --- a/resource-manager/apimanagement/2024-05-01/openidconnectprovider/version.go +++ b/resource-manager/apimanagement/2024-05-01/openidconnectprovider/version.go @@ -1,12 +1,10 @@ package openidconnectprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openidconnectprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openidconnectprovider/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/README.md index 1a0fccec578..2ebc6a940c2 100644 --- a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/id_service.go b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/id_service.go index a2a71284e3f..c0c218b10e7 100644 --- a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/version.go index 642b15db3ac..665d8d38389 100644 --- a/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/apimanagement/2024-05-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/README.md b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/README.md index cedac9d697e..65ea04af660 100644 --- a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/README.md +++ b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/performconnectivitycheck` Documentation -The `performconnectivitycheck` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `performconnectivitycheck` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/client.go b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/client.go index a491979992c..377311cd668 100644 --- a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/client.go +++ b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/client.go @@ -15,7 +15,7 @@ type PerformConnectivityCheckClient struct { } func NewPerformConnectivityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*PerformConnectivityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "performconnectivitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "performconnectivitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PerformConnectivityCheckClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/id_service.go b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/id_service.go index 6a34f7693f4..ed3403137c8 100644 --- a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/version.go b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/version.go index 8479466ba9c..13061f7e7c0 100644 --- a/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/version.go +++ b/resource-manager/apimanagement/2024-05-01/performconnectivitycheck/version.go @@ -1,12 +1,10 @@ package performconnectivitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/performconnectivitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/performconnectivitycheck/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policy/README.md b/resource-manager/apimanagement/2024-05-01/policy/README.md index b40ac23c024..b8397573ccf 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/README.md +++ b/resource-manager/apimanagement/2024-05-01/policy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policy` Documentation -The `policy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policy/client.go b/resource-manager/apimanagement/2024-05-01/policy/client.go index 216d1f1ff33..d95ac216bf6 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/client.go +++ b/resource-manager/apimanagement/2024-05-01/policy/client.go @@ -15,7 +15,7 @@ type PolicyClient struct { } func NewPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policy/id_service.go b/resource-manager/apimanagement/2024-05-01/policy/id_service.go index 509f96c5a3f..8fac046b789 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/policy/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/policy/method_createorupdate.go index 3bfe1519731..bc08c50ab8d 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/policy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyClient) CreateOrUpdate(ctx context.Context, id ServiceId, input Po var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policy/method_delete.go b/resource-manager/apimanagement/2024-05-01/policy/method_delete.go index 4b39d1a4a2d..f3ab4b889c9 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/policy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policy/method_get.go b/resource-manager/apimanagement/2024-05-01/policy/method_get.go index 5a9a428f5ec..10e71f38f95 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/policy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyClient) Get(ctx context.Context, id ServiceId, options GetOperatio var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policy/version.go b/resource-manager/apimanagement/2024-05-01/policy/version.go index 1f2610f5094..bd411bfe51f 100644 --- a/resource-manager/apimanagement/2024-05-01/policy/version.go +++ b/resource-manager/apimanagement/2024-05-01/policy/version.go @@ -1,12 +1,10 @@ package policy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policydescription/README.md b/resource-manager/apimanagement/2024-05-01/policydescription/README.md index b5d36d886ad..b7d7dd762fb 100644 --- a/resource-manager/apimanagement/2024-05-01/policydescription/README.md +++ b/resource-manager/apimanagement/2024-05-01/policydescription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policydescription` Documentation -The `policydescription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policydescription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policydescription/client.go b/resource-manager/apimanagement/2024-05-01/policydescription/client.go index 70daacb1cfc..511edea86c1 100644 --- a/resource-manager/apimanagement/2024-05-01/policydescription/client.go +++ b/resource-manager/apimanagement/2024-05-01/policydescription/client.go @@ -15,7 +15,7 @@ type PolicyDescriptionClient struct { } func NewPolicyDescriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDescriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policydescription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policydescription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyDescriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policydescription/id_service.go b/resource-manager/apimanagement/2024-05-01/policydescription/id_service.go index 41cef29b463..ff29eb10b4a 100644 --- a/resource-manager/apimanagement/2024-05-01/policydescription/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/policydescription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policydescription/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/policydescription/method_listbyservice.go index cb12120f377..4535c14aaa4 100644 --- a/resource-manager/apimanagement/2024-05-01/policydescription/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/policydescription/method_listbyservice.go @@ -34,6 +34,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyDescriptionClient) ListByService(ctx context.Context, id ServiceId var model PolicyDescriptionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policydescription/version.go b/resource-manager/apimanagement/2024-05-01/policydescription/version.go index fce2d40c011..0d969723440 100644 --- a/resource-manager/apimanagement/2024-05-01/policydescription/version.go +++ b/resource-manager/apimanagement/2024-05-01/policydescription/version.go @@ -1,12 +1,10 @@ package policydescription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policydescription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policydescription/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/README.md b/resource-manager/apimanagement/2024-05-01/policyfragment/README.md index 921818c3d2a..50679483946 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/README.md +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policyfragment` Documentation -The `policyfragment` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policyfragment` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/client.go b/resource-manager/apimanagement/2024-05-01/policyfragment/client.go index 3dbe1d43bb7..d14dc485991 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/client.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/client.go @@ -15,7 +15,7 @@ type PolicyFragmentClient struct { } func NewPolicyFragmentClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyFragmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyfragment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyfragment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyFragmentClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/id_policyfragment.go b/resource-manager/apimanagement/2024-05-01/policyfragment/id_policyfragment.go index 3737ed73101..538e36d518f 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/id_policyfragment.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/id_policyfragment.go @@ -44,7 +44,7 @@ func ParsePolicyFragmentID(input string) (*PolicyFragmentId, error) { } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyFragmentIDInsensitively(input string) (*PolicyFragmentId, error) } id := PolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/id_service.go b/resource-manager/apimanagement/2024-05-01/policyfragment/id_service.go index e0ab31ef120..b5efade5d1c 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspace.go b/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspace.go index 334ecf5425c..8d5166b8bbf 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspacepolicyfragment.go b/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspacepolicyfragment.go index eed247a5b17..885868cd32e 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspacepolicyfragment.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/id_workspacepolicyfragment.go @@ -46,7 +46,7 @@ func ParseWorkspacePolicyFragmentID(input string) (*WorkspacePolicyFragmentId, e } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspacePolicyFragmentIDInsensitively(input string) (*WorkspacePolicy } id := WorkspacePolicyFragmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_createorupdate.go index 926a279b604..1b3da31951e 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_delete.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_delete.go index 8a0d95204ce..219af78163c 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_get.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_get.go index 3aa646fafdd..12ac1b4fbf3 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) Get(ctx context.Context, id PolicyFragmentId, opti var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_listbyservice.go index e9fcb07b896..c6ab48e11ac 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_listreferences.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_listreferences.go index 37993c71c0d..d513c06b276 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_listreferences.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_listreferences.go @@ -40,6 +40,7 @@ func (o ListReferencesOperationOptions) ToHeaders() *client.Headers { func (o ListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentcreateorupdate.go index 07c7352e49d..72b4a0c9c6c 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentcreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentdelete.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentdelete.go index 3c175e499a5..4afe4261906 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentdelete.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentdelete.go @@ -35,6 +35,7 @@ func (o WorkspacePolicyFragmentDeleteOperationOptions) ToHeaders() *client.Heade func (o WorkspacePolicyFragmentDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentget.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentget.go index 24b3402ea1f..11e23a111e5 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentget.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentget.go @@ -34,6 +34,7 @@ func (o WorkspacePolicyFragmentGetOperationOptions) ToHeaders() *client.Headers func (o WorkspacePolicyFragmentGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PolicyFragmentClient) WorkspacePolicyFragmentGet(ctx context.Context, id var model PolicyFragmentContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistbyservice.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistbyservice.go index 601c1855d17..d5ef3e26541 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToHeaders() *clien func (o WorkspacePolicyFragmentListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistreferences.go b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistreferences.go index fca10ec83a6..9a7b1e52677 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistreferences.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/method_workspacepolicyfragmentlistreferences.go @@ -40,6 +40,7 @@ func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToHeaders() *clie func (o WorkspacePolicyFragmentListReferencesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyfragment/version.go b/resource-manager/apimanagement/2024-05-01/policyfragment/version.go index bfe42b7595b..3e145bb0b6d 100644 --- a/resource-manager/apimanagement/2024-05-01/policyfragment/version.go +++ b/resource-manager/apimanagement/2024-05-01/policyfragment/version.go @@ -1,12 +1,10 @@ package policyfragment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyfragment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyfragment/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/README.md b/resource-manager/apimanagement/2024-05-01/policyrestriction/README.md index 74cb962fd75..27b06c21782 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/README.md +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policyrestriction` Documentation -The `policyrestriction` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policyrestriction` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/client.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/client.go index 8f031b7e45a..65072a27e0b 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/client.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionClient struct { } func NewPolicyRestrictionClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestriction", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestriction", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/id_policyrestriction.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/id_policyrestriction.go index 4791253dc53..569140f03ad 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/id_policyrestriction.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/id_policyrestriction.go @@ -44,7 +44,7 @@ func ParsePolicyRestrictionID(input string) (*PolicyRestrictionId, error) { } id := PolicyRestrictionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicyRestrictionIDInsensitively(input string) (*PolicyRestrictionId, } id := PolicyRestrictionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_createorupdate.go index 56b8f26697a..a839c506d40 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PolicyRestrictionClient) CreateOrUpdate(ctx context.Context, id PolicyRe var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_delete.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_delete.go index c4ec85cd65f..1150430a795 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_get.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_get.go index f6ed8b41e1c..6cbf098686e 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_get.go @@ -45,7 +45,6 @@ func (c PolicyRestrictionClient) Get(ctx context.Context, id PolicyRestrictionId var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_update.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_update.go index 87847cf947c..b249bf83c3e 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PolicyRestrictionClient) Update(ctx context.Context, id PolicyRestrictio var model PolicyRestrictionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestriction/version.go b/resource-manager/apimanagement/2024-05-01/policyrestriction/version.go index f716a879d34..8fbdcf28377 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestriction/version.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestriction/version.go @@ -1,12 +1,10 @@ package policyrestriction -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestriction/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestriction/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictions/README.md b/resource-manager/apimanagement/2024-05-01/policyrestrictions/README.md index e5d92e796b9..1d8f17e0324 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictions/README.md +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policyrestrictions` Documentation -The `policyrestrictions` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policyrestrictions` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictions/client.go b/resource-manager/apimanagement/2024-05-01/policyrestrictions/client.go index af23f982730..03b9c279743 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictions/client.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictions/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionsClient struct { } func NewPolicyRestrictionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestrictions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestrictions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictions/id_service.go b/resource-manager/apimanagement/2024-05-01/policyrestrictions/id_service.go index cda4de7ca6c..022d5d624d9 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictions/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictions/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictions/version.go b/resource-manager/apimanagement/2024-05-01/policyrestrictions/version.go index 0d1a67a76b5..e7d466a4b4f 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictions/version.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictions/version.go @@ -1,12 +1,10 @@ package policyrestrictions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestrictions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestrictions/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/README.md b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/README.md index 993a034b6f5..c5ed797c3ce 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/README.md +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations` Documentation -The `policyrestrictionsvalidations` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `policyrestrictionsvalidations` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/client.go b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/client.go index 3d993a73d0c..9b47775d5ea 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/client.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/client.go @@ -15,7 +15,7 @@ type PolicyRestrictionsValidationsClient struct { } func NewPolicyRestrictionsValidationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyRestrictionsValidationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyrestrictionsvalidations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyrestrictionsvalidations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyRestrictionsValidationsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/id_service.go b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/id_service.go index 815b858832d..c7ddfe5e4b6 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/version.go b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/version.go index 5844aba2ed8..0151dfa2285 100644 --- a/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/version.go +++ b/resource-manager/apimanagement/2024-05-01/policyrestrictionsvalidations/version.go @@ -1,12 +1,10 @@ package policyrestrictionsvalidations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyrestrictionsvalidations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyrestrictionsvalidations/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/README.md b/resource-manager/apimanagement/2024-05-01/portalconfig/README.md index cf0dfea7544..0e577280025 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/README.md +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/portalconfig` Documentation -The `portalconfig` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `portalconfig` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/client.go b/resource-manager/apimanagement/2024-05-01/portalconfig/client.go index 5c58ba3ea50..b02c0eb1e23 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/client.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/client.go @@ -15,7 +15,7 @@ type PortalConfigClient struct { } func NewPortalConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalConfigClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/id_portalconfig.go b/resource-manager/apimanagement/2024-05-01/portalconfig/id_portalconfig.go index 4217e87e470..1eee4ff6349 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/id_portalconfig.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/id_portalconfig.go @@ -44,7 +44,7 @@ func ParsePortalConfigID(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalConfigIDInsensitively(input string) (*PortalConfigId, error) { } id := PortalConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/id_service.go b/resource-manager/apimanagement/2024-05-01/portalconfig/id_service.go index fe235ccce02..25a796d7e39 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/portalconfig/method_createorupdate.go index 94bdf726259..13a9427637b 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) CreateOrUpdate(ctx context.Context, id PortalConfigI var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/method_get.go b/resource-manager/apimanagement/2024-05-01/portalconfig/method_get.go index 755476c6e67..e4377dd925f 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/method_get.go @@ -45,7 +45,6 @@ func (c PortalConfigClient) Get(ctx context.Context, id PortalConfigId) (result var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/method_update.go b/resource-manager/apimanagement/2024-05-01/portalconfig/method_update.go index fce54b73ff3..e003b060e70 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PortalConfigClient) Update(ctx context.Context, id PortalConfigId, input var model PortalConfigContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/portalconfig/version.go b/resource-manager/apimanagement/2024-05-01/portalconfig/version.go index dc274f9d1ac..897ca188724 100644 --- a/resource-manager/apimanagement/2024-05-01/portalconfig/version.go +++ b/resource-manager/apimanagement/2024-05-01/portalconfig/version.go @@ -1,12 +1,10 @@ package portalconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalconfig/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/README.md b/resource-manager/apimanagement/2024-05-01/portalrevision/README.md index 7bb022eda3c..dbdf06bbc23 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/README.md +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/portalrevision` Documentation -The `portalrevision` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `portalrevision` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/client.go b/resource-manager/apimanagement/2024-05-01/portalrevision/client.go index 4f2fa253331..3ac3319b56b 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/client.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/client.go @@ -15,7 +15,7 @@ type PortalRevisionClient struct { } func NewPortalRevisionClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalRevisionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalrevision", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalrevision", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalRevisionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/id_portalrevision.go b/resource-manager/apimanagement/2024-05-01/portalrevision/id_portalrevision.go index a4ef40e0335..66cce216fe8 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/id_portalrevision.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/id_portalrevision.go @@ -44,7 +44,7 @@ func ParsePortalRevisionID(input string) (*PortalRevisionId, error) { } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortalRevisionIDInsensitively(input string) (*PortalRevisionId, error) } id := PortalRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/id_service.go b/resource-manager/apimanagement/2024-05-01/portalrevision/id_service.go index 6d27c56ea22..12e905cecaa 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/method_get.go b/resource-manager/apimanagement/2024-05-01/portalrevision/method_get.go index 02c07947f35..e7e39cc491d 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/method_get.go @@ -45,7 +45,6 @@ func (c PortalRevisionClient) Get(ctx context.Context, id PortalRevisionId) (res var model PortalRevisionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/portalrevision/method_listbyservice.go index 57df46678e2..1dfec707d1e 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/method_update.go b/resource-manager/apimanagement/2024-05-01/portalrevision/method_update.go index e3568960b04..b2c05e16d03 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/portalrevision/version.go b/resource-manager/apimanagement/2024-05-01/portalrevision/version.go index ed44e2c55d0..433155feaef 100644 --- a/resource-manager/apimanagement/2024-05-01/portalrevision/version.go +++ b/resource-manager/apimanagement/2024-05-01/portalrevision/version.go @@ -1,12 +1,10 @@ package portalrevision -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalrevision/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalrevision/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/portalsettings/README.md b/resource-manager/apimanagement/2024-05-01/portalsettings/README.md index c68702db649..de7bc6077b0 100644 --- a/resource-manager/apimanagement/2024-05-01/portalsettings/README.md +++ b/resource-manager/apimanagement/2024-05-01/portalsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/portalsettings` Documentation -The `portalsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `portalsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/portalsettings/client.go b/resource-manager/apimanagement/2024-05-01/portalsettings/client.go index 787e842a856..554097bdccf 100644 --- a/resource-manager/apimanagement/2024-05-01/portalsettings/client.go +++ b/resource-manager/apimanagement/2024-05-01/portalsettings/client.go @@ -15,7 +15,7 @@ type PortalSettingsClient struct { } func NewPortalSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "portalsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "portalsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PortalSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/portalsettings/id_service.go b/resource-manager/apimanagement/2024-05-01/portalsettings/id_service.go index 9c71fe38260..795734b8888 100644 --- a/resource-manager/apimanagement/2024-05-01/portalsettings/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/portalsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/portalsettings/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/portalsettings/method_listbyservice.go index 0dc16a6d309..cc9614449d6 100644 --- a/resource-manager/apimanagement/2024-05-01/portalsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/portalsettings/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PortalSettingsClient) ListByService(ctx context.Context, id ServiceId) ( var model PortalSettingsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/portalsettings/version.go b/resource-manager/apimanagement/2024-05-01/portalsettings/version.go index 19884676e9c..065f0ab1e6a 100644 --- a/resource-manager/apimanagement/2024-05-01/portalsettings/version.go +++ b/resource-manager/apimanagement/2024-05-01/portalsettings/version.go @@ -1,12 +1,10 @@ package portalsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/portalsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/portalsettings/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/README.md b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/README.md index 886bf5d378d..5e24a1078b7 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/README.md +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/client.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/client.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privateendpointconnection.go index 6c2da784082..cd4250e592b 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privatelinkresource.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privatelinkresource.go index dfbab21cc34..8b943560b87 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privatelinkresource.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_service.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_service.go index 6954e3bf619..1470d0578e9 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go index 79394dec05e..16876584694 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetbyname.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetByName(ctx var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go index 44e1bf04851..ea5fab7b453 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectiongetprivatelinkresource.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGetPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go index 6b9b574ef5f..fc2ec42cfe3 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByService var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go index e33993c077f..d4c86877792 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/method_privateendpointconnectionlistprivatelinkresources.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListPrivateLi var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/version.go b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/version.go index b541d16e87d..584766e8f3b 100644 --- a/resource-manager/apimanagement/2024-05-01/privateendpointconnections/version.go +++ b/resource-manager/apimanagement/2024-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/product/README.md b/resource-manager/apimanagement/2024-05-01/product/README.md index 83e74300dca..da6ca6f9102 100644 --- a/resource-manager/apimanagement/2024-05-01/product/README.md +++ b/resource-manager/apimanagement/2024-05-01/product/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/product` Documentation -The `product` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `product` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/product/client.go b/resource-manager/apimanagement/2024-05-01/product/client.go index 20069da6c20..787eaa28e4f 100644 --- a/resource-manager/apimanagement/2024-05-01/product/client.go +++ b/resource-manager/apimanagement/2024-05-01/product/client.go @@ -15,7 +15,7 @@ type ProductClient struct { } func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "product", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "product", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/product/id_product.go b/resource-manager/apimanagement/2024-05-01/product/id_product.go index 95f18115dce..034ad81b346 100644 --- a/resource-manager/apimanagement/2024-05-01/product/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/product/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/product/id_service.go b/resource-manager/apimanagement/2024-05-01/product/id_service.go index bb0983ca2df..948d6fd23a8 100644 --- a/resource-manager/apimanagement/2024-05-01/product/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/product/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/product/id_workspace.go b/resource-manager/apimanagement/2024-05-01/product/id_workspace.go index 72e09a3fc43..09518d96353 100644 --- a/resource-manager/apimanagement/2024-05-01/product/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/product/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/product/id_workspaceproduct.go b/resource-manager/apimanagement/2024-05-01/product/id_workspaceproduct.go index 6b11719ded0..1f89057c1dc 100644 --- a/resource-manager/apimanagement/2024-05-01/product/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2024-05-01/product/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/product/method_createorupdate.go index 2baf83fb505..07bc7cd0e1c 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) CreateOrUpdate(ctx context.Context, id ProductId, input P var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_delete.go b/resource-manager/apimanagement/2024-05-01/product/method_delete.go index afc7d184b70..28d5b7bdd7f 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_get.go b/resource-manager/apimanagement/2024-05-01/product/method_get.go index b343c0f286c..65af42031e8 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_get.go @@ -45,7 +45,6 @@ func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperati var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/product/method_listbyservice.go index b1f50c8e42d..9b47fa13709 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_listbyservice.go @@ -43,6 +43,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_update.go b/resource-manager/apimanagement/2024-05-01/product/method_update.go index fc36ecd5353..a6be0dfec29 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) Update(ctx context.Context, id ProductId, input ProductUp var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductcreateorupdate.go index af10ed64d9c..1a22f89859b 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductCreateOrUpdateOperationOptions) ToHeaders() *client.Head func (o WorkspaceProductCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductClient) WorkspaceProductCreateOrUpdate(ctx context.Context, id Wo var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductdelete.go b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductdelete.go index 3bf8f536240..849214c5992 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductdelete.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductdelete.go @@ -36,6 +36,7 @@ func (o WorkspaceProductDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductget.go b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductget.go index d746f01c02e..78e82c51d83 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductget.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductget.go @@ -45,7 +45,6 @@ func (c ProductClient) WorkspaceProductGet(ctx context.Context, id WorkspaceProd var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductlistbyservice.go b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductlistbyservice.go index 457b9a161c9..ccf2ecef686 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductlistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductlistbyservice.go @@ -43,6 +43,7 @@ func (o WorkspaceProductListByServiceOperationOptions) ToHeaders() *client.Heade func (o WorkspaceProductListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductupdate.go b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductupdate.go index e1305ecd777..059782c921a 100644 --- a/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductupdate.go +++ b/resource-manager/apimanagement/2024-05-01/product/method_workspaceproductupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductClient) WorkspaceProductUpdate(ctx context.Context, id WorkspaceP var model ProductContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/product/version.go b/resource-manager/apimanagement/2024-05-01/product/version.go index b1534b4184b..c7e2fe2cab4 100644 --- a/resource-manager/apimanagement/2024-05-01/product/version.go +++ b/resource-manager/apimanagement/2024-05-01/product/version.go @@ -1,12 +1,10 @@ package product -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/product/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/product/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/README.md b/resource-manager/apimanagement/2024-05-01/productapi/README.md index f89de279c09..79a0b5e986c 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/README.md +++ b/resource-manager/apimanagement/2024-05-01/productapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productapi` Documentation -The `productapi` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productapi` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productapi/client.go b/resource-manager/apimanagement/2024-05-01/productapi/client.go index 1e0b184ff57..edeb30a1f70 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/client.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/client.go @@ -15,7 +15,7 @@ type ProductApiClient struct { } func NewProductApiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/id_product.go b/resource-manager/apimanagement/2024-05-01/productapi/id_product.go index 76244a5f127..e7f5d3be4d2 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/id_productapi.go b/resource-manager/apimanagement/2024-05-01/productapi/id_productapi.go index ac92947ceaf..38ffb06be7e 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/id_productapi.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/id_productapi.go @@ -46,7 +46,7 @@ func ParseProductApiID(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiIDInsensitively(input string) (*ProductApiId, error) { } id := ProductApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productapi/method_createorupdate.go index e27e2ed31a5..afa4d070d9d 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductApiClient) CreateOrUpdate(ctx context.Context, id ProductApiId) ( var model ApiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/productapi/method_listbyproduct.go index c06016675dd..4327b569ea6 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productapi/version.go b/resource-manager/apimanagement/2024-05-01/productapi/version.go index 6cc6e1c47f6..9465e31ae95 100644 --- a/resource-manager/apimanagement/2024-05-01/productapi/version.go +++ b/resource-manager/apimanagement/2024-05-01/productapi/version.go @@ -1,12 +1,10 @@ package productapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapi/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/README.md b/resource-manager/apimanagement/2024-05-01/productapilink/README.md index c2cbedb4f17..ed7da3b0356 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/README.md +++ b/resource-manager/apimanagement/2024-05-01/productapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productapilink` Documentation -The `productapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/client.go b/resource-manager/apimanagement/2024-05-01/productapilink/client.go index 8349188784a..9dbc162240f 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/client.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/client.go @@ -15,7 +15,7 @@ type ProductApiLinkClient struct { } func NewProductApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/id_product.go b/resource-manager/apimanagement/2024-05-01/productapilink/id_product.go index 8cc4d71ac4d..95a8c337cc3 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/id_productapilink.go b/resource-manager/apimanagement/2024-05-01/productapilink/id_productapilink.go index fe5d70ec31e..3679e1007f6 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/id_productapilink.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/id_productapilink.go @@ -46,7 +46,7 @@ func ParseProductApiLinkID(input string) (*ProductApiLinkId, error) { } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductApiLinkIDInsensitively(input string) (*ProductApiLinkId, error) } id := ProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproduct.go b/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproduct.go index ded946cf1fa..11ffc8e9638 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproductapilink.go b/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproductapilink.go index efb87f6e00f..5c982422eda 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproductapilink.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/id_workspaceproductapilink.go @@ -48,7 +48,7 @@ func ParseWorkspaceProductApiLinkID(input string) (*WorkspaceProductApiLinkId, e } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkspaceProductApiLinkIDInsensitively(input string) (*WorkspaceProduc } id := WorkspaceProductApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_createorupdate.go index e711339b44d..edf067cb155 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) CreateOrUpdate(ctx context.Context, id ProductApiL var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_get.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_get.go index 6f8bfffa257..f2e08e31655 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_get.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) Get(ctx context.Context, id ProductApiLinkId) (res var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_listbyproduct.go index 5992341c96a..55b25bf468f 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkcreateorupdate.go index 5c589d27c2b..47d81364b4e 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkCreateOrUpdate(ctx context. var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkget.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkget.go index 187f5e7ac13..50efa7fa27f 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkget.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinkget.go @@ -45,7 +45,6 @@ func (c ProductApiLinkClient) WorkspaceProductApiLinkGet(ctx context.Context, id var model ProductApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinklistbyproduct.go b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinklistbyproduct.go index ca1989e31ec..95e5f96810c 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/method_workspaceproductapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductApiLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceProductApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productapilink/version.go b/resource-manager/apimanagement/2024-05-01/productapilink/version.go index 3756c1aa6e7..adf9eaa54c5 100644 --- a/resource-manager/apimanagement/2024-05-01/productapilink/version.go +++ b/resource-manager/apimanagement/2024-05-01/productapilink/version.go @@ -1,12 +1,10 @@ package productapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productapilink/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/README.md b/resource-manager/apimanagement/2024-05-01/productgroup/README.md index 929e56ef228..6b68d16c4f7 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/README.md +++ b/resource-manager/apimanagement/2024-05-01/productgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productgroup` Documentation -The `productgroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productgroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/client.go b/resource-manager/apimanagement/2024-05-01/productgroup/client.go index beb9159e3e3..2aa816ea14d 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/client.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/client.go @@ -15,7 +15,7 @@ type ProductGroupClient struct { } func NewProductGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/id_product.go b/resource-manager/apimanagement/2024-05-01/productgroup/id_product.go index df7d9abbfcd..00eaae01fd1 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/id_productgroup.go b/resource-manager/apimanagement/2024-05-01/productgroup/id_productgroup.go index 7ede94a7c7f..847e2e4900d 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/id_productgroup.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/id_productgroup.go @@ -46,7 +46,7 @@ func ParseProductGroupID(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductGroupIDInsensitively(input string) (*ProductGroupId, error) { } id := ProductGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productgroup/method_createorupdate.go index 77cf8dbf10e..a518c2d0404 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/method_createorupdate.go @@ -46,7 +46,6 @@ func (c ProductGroupClient) CreateOrUpdate(ctx context.Context, id ProductGroupI var model GroupContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/productgroup/method_listbyproduct.go index 902f45c4f73..fbee2e7567d 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productgroup/version.go b/resource-manager/apimanagement/2024-05-01/productgroup/version.go index edf0a207c88..94e9bccf4c2 100644 --- a/resource-manager/apimanagement/2024-05-01/productgroup/version.go +++ b/resource-manager/apimanagement/2024-05-01/productgroup/version.go @@ -1,12 +1,10 @@ package productgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgroup/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/README.md b/resource-manager/apimanagement/2024-05-01/productgrouplink/README.md index 39771f8c3fb..85a37d259ab 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/README.md +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productgrouplink` Documentation -The `productgrouplink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productgrouplink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/client.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/client.go index 3528003e35b..e37d8715ed6 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/client.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/client.go @@ -15,7 +15,7 @@ type ProductGroupLinkClient struct { } func NewProductGroupLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductGroupLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productgrouplink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productgrouplink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductGroupLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_grouplink.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_grouplink.go index c16ddba297b..ddb687e68f5 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_grouplink.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_grouplink.go @@ -46,7 +46,7 @@ func ParseGroupLinkID(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGroupLinkIDInsensitively(input string) (*GroupLinkId, error) { } id := GroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_product.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_product.go index ebda99376a6..3b43ce90247 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_productgrouplink.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_productgrouplink.go index b138aa0fbab..c92c77fd5e4 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_productgrouplink.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_productgrouplink.go @@ -48,7 +48,7 @@ func ParseProductGroupLinkID(input string) (*ProductGroupLinkId, error) { } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProductGroupLinkIDInsensitively(input string) (*ProductGroupLinkId, er } id := ProductGroupLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_workspaceproduct.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_workspaceproduct.go index aaddcc46393..38f762822bd 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_createorupdate.go index c69607c76c0..657238c75a9 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) CreateOrUpdate(ctx context.Context, id GroupLink var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_get.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_get.go index 504db1fe876..8734a2ac627 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_get.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) Get(ctx context.Context, id GroupLinkId) (result var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_listbyproduct.go index 84edbb8b0f2..04616fec43a 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go index 1819eda2722..7660c05264a 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkCreateOrUpdate(ctx cont var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkget.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkget.go index ee43233ffa6..e4a1e775485 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkget.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinkget.go @@ -45,7 +45,6 @@ func (c ProductGroupLinkClient) WorkspaceProductGroupLinkGet(ctx context.Context var model ProductGroupLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go index f337fc0d196..08e4ee7216c 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/method_workspaceproductgrouplinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceProductGroupLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productgrouplink/version.go b/resource-manager/apimanagement/2024-05-01/productgrouplink/version.go index 59ca32eefe0..2bf56395aee 100644 --- a/resource-manager/apimanagement/2024-05-01/productgrouplink/version.go +++ b/resource-manager/apimanagement/2024-05-01/productgrouplink/version.go @@ -1,12 +1,10 @@ package productgrouplink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productgrouplink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productgrouplink/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/README.md b/resource-manager/apimanagement/2024-05-01/productpolicy/README.md index 49123c1a0f0..5a57de3c9dd 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productpolicy` Documentation -The `productpolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productpolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/client.go b/resource-manager/apimanagement/2024-05-01/productpolicy/client.go index e6887574aaa..a4a1d0fa474 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/client.go @@ -15,7 +15,7 @@ type ProductPolicyClient struct { } func NewProductPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductPolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/id_product.go b/resource-manager/apimanagement/2024-05-01/productpolicy/id_product.go index 1b80a823c26..ecac90e889b 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/id_workspaceproduct.go b/resource-manager/apimanagement/2024-05-01/productpolicy/id_workspaceproduct.go index de50624b5f9..1a5c285cc77 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/id_workspaceproduct.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/id_workspaceproduct.go @@ -46,7 +46,7 @@ func ParseWorkspaceProductID(input string) (*WorkspaceProductId, error) { } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceProductIDInsensitively(input string) (*WorkspaceProductId, er } id := WorkspaceProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_createorupdate.go index 923d04859e1..ae0329209dc 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) CreateOrUpdate(ctx context.Context, id ProductId, i var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_delete.go index 36e74215a96..5cf9ef830f4 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_get.go index b96d87150c2..579a315dc9a 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) Get(ctx context.Context, id ProductId, options GetO var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicycreateorupdate.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicycreateorupdate.go index 9a55b9a739a..0c867674486 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicycreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicycreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToHeaders() *clien func (o WorkspaceProductPolicyCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyCreateOrUpdate(ctx context.Co var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicydelete.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicydelete.go index a76872c52a7..d58bdb503e7 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicydelete.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicydelete.go @@ -35,6 +35,7 @@ func (o WorkspaceProductPolicyDeleteOperationOptions) ToHeaders() *client.Header func (o WorkspaceProductPolicyDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicyget.go b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicyget.go index cbd5809fb0e..999f909eccf 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicyget.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/method_workspaceproductpolicyget.go @@ -34,6 +34,7 @@ func (o WorkspaceProductPolicyGetOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceProductPolicyGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProductPolicyClient) WorkspaceProductPolicyGet(ctx context.Context, id W var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productpolicy/version.go b/resource-manager/apimanagement/2024-05-01/productpolicy/version.go index 70fbb2c0a93..3a1d551ca4c 100644 --- a/resource-manager/apimanagement/2024-05-01/productpolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/productpolicy/version.go @@ -1,12 +1,10 @@ package productpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productpolicy/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productsbytag/README.md b/resource-manager/apimanagement/2024-05-01/productsbytag/README.md index 8f9128b5163..cea30970498 100644 --- a/resource-manager/apimanagement/2024-05-01/productsbytag/README.md +++ b/resource-manager/apimanagement/2024-05-01/productsbytag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productsbytag` Documentation -The `productsbytag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productsbytag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productsbytag/client.go b/resource-manager/apimanagement/2024-05-01/productsbytag/client.go index c87bb5f7b76..915babf141b 100644 --- a/resource-manager/apimanagement/2024-05-01/productsbytag/client.go +++ b/resource-manager/apimanagement/2024-05-01/productsbytag/client.go @@ -15,7 +15,7 @@ type ProductsByTagClient struct { } func NewProductsByTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsByTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsbytag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsbytag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsByTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productsbytag/id_service.go b/resource-manager/apimanagement/2024-05-01/productsbytag/id_service.go index 4cf290afcb1..29ba551682f 100644 --- a/resource-manager/apimanagement/2024-05-01/productsbytag/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/productsbytag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productsbytag/method_productlistbytags.go b/resource-manager/apimanagement/2024-05-01/productsbytag/method_productlistbytags.go index 8cffb9f2edb..6744380cbab 100644 --- a/resource-manager/apimanagement/2024-05-01/productsbytag/method_productlistbytags.go +++ b/resource-manager/apimanagement/2024-05-01/productsbytag/method_productlistbytags.go @@ -42,6 +42,7 @@ func (o ProductListByTagsOperationOptions) ToHeaders() *client.Headers { func (o ProductListByTagsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productsbytag/version.go b/resource-manager/apimanagement/2024-05-01/productsbytag/version.go index 16c04a67720..d890f0bf09e 100644 --- a/resource-manager/apimanagement/2024-05-01/productsbytag/version.go +++ b/resource-manager/apimanagement/2024-05-01/productsbytag/version.go @@ -1,12 +1,10 @@ package productsbytag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsbytag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsbytag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productsubscription/README.md b/resource-manager/apimanagement/2024-05-01/productsubscription/README.md index 51f26570381..5ce0586f6ba 100644 --- a/resource-manager/apimanagement/2024-05-01/productsubscription/README.md +++ b/resource-manager/apimanagement/2024-05-01/productsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productsubscription` Documentation -The `productsubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productsubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productsubscription/client.go b/resource-manager/apimanagement/2024-05-01/productsubscription/client.go index a54f7218145..fd87d58da17 100644 --- a/resource-manager/apimanagement/2024-05-01/productsubscription/client.go +++ b/resource-manager/apimanagement/2024-05-01/productsubscription/client.go @@ -15,7 +15,7 @@ type ProductSubscriptionClient struct { } func NewProductSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productsubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productsubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productsubscription/id_product.go b/resource-manager/apimanagement/2024-05-01/productsubscription/id_product.go index 96929544e81..f43d9647499 100644 --- a/resource-manager/apimanagement/2024-05-01/productsubscription/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productsubscription/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productsubscription/method_list.go b/resource-manager/apimanagement/2024-05-01/productsubscription/method_list.go index c71c7ba8260..00b340b1821 100644 --- a/resource-manager/apimanagement/2024-05-01/productsubscription/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/productsubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productsubscription/version.go b/resource-manager/apimanagement/2024-05-01/productsubscription/version.go index 8186cd85f7b..3efc90b34f8 100644 --- a/resource-manager/apimanagement/2024-05-01/productsubscription/version.go +++ b/resource-manager/apimanagement/2024-05-01/productsubscription/version.go @@ -1,12 +1,10 @@ package productsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productsubscription/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/README.md b/resource-manager/apimanagement/2024-05-01/producttag/README.md index a56e6bbcbf7..4a4979d3d29 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/README.md +++ b/resource-manager/apimanagement/2024-05-01/producttag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/producttag` Documentation -The `producttag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `producttag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/producttag/client.go b/resource-manager/apimanagement/2024-05-01/producttag/client.go index 720b81ec2d8..5602a7a654f 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/client.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/client.go @@ -15,7 +15,7 @@ type ProductTagClient struct { } func NewProductTagClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductTagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "producttag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "producttag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductTagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/id_product.go b/resource-manager/apimanagement/2024-05-01/producttag/id_product.go index b7000f83b74..83b2ff6422e 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/id_producttag.go b/resource-manager/apimanagement/2024-05-01/producttag/id_producttag.go index d1f16bd1686..b06e6d6fa29 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/id_producttag.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/id_producttag.go @@ -46,7 +46,7 @@ func ParseProductTagID(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductTagIDInsensitively(input string) (*ProductTagId, error) { } id := ProductTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/method_tagassigntoproduct.go b/resource-manager/apimanagement/2024-05-01/producttag/method_tagassigntoproduct.go index 87bb16caf5e..5cbd240711d 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/method_tagassigntoproduct.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/method_tagassigntoproduct.go @@ -46,7 +46,6 @@ func (c ProductTagClient) TagAssignToProduct(ctx context.Context, id ProductTagI var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/method_taggetbyproduct.go b/resource-manager/apimanagement/2024-05-01/producttag/method_taggetbyproduct.go index 1e5ed741301..1742c0e9789 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/method_taggetbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/method_taggetbyproduct.go @@ -45,7 +45,6 @@ func (c ProductTagClient) TagGetByProduct(ctx context.Context, id ProductTagId) var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/method_taglistbyproduct.go b/resource-manager/apimanagement/2024-05-01/producttag/method_taglistbyproduct.go index 4e0721b94fc..f55c45480ae 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/method_taglistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/method_taglistbyproduct.go @@ -41,6 +41,7 @@ func (o TagListByProductOperationOptions) ToHeaders() *client.Headers { func (o TagListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/producttag/version.go b/resource-manager/apimanagement/2024-05-01/producttag/version.go index ff42dfc36fb..8ce734092dd 100644 --- a/resource-manager/apimanagement/2024-05-01/producttag/version.go +++ b/resource-manager/apimanagement/2024-05-01/producttag/version.go @@ -1,12 +1,10 @@ package producttag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/producttag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/producttag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/README.md b/resource-manager/apimanagement/2024-05-01/productwiki/README.md index 0fc5e45aff7..0d18a1b38a4 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/README.md +++ b/resource-manager/apimanagement/2024-05-01/productwiki/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/productwiki` Documentation -The `productwiki` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `productwiki` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/client.go b/resource-manager/apimanagement/2024-05-01/productwiki/client.go index 927c4e2a5e8..f916fc92b3e 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/client.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/client.go @@ -15,7 +15,7 @@ type ProductWikiClient struct { } func NewProductWikiClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductWikiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "productwiki", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "productwiki", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductWikiClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/id_product.go b/resource-manager/apimanagement/2024-05-01/productwiki/id_product.go index 55d2312cec7..2c4b473a438 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/id_product.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/id_product.go @@ -44,7 +44,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/productwiki/method_createorupdate.go index f794fc61c8a..07e2174456f 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ProductWikiClient) CreateOrUpdate(ctx context.Context, id ProductId, inp var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/method_delete.go b/resource-manager/apimanagement/2024-05-01/productwiki/method_delete.go index 0ccc22248a0..85714a863d1 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/method_get.go b/resource-manager/apimanagement/2024-05-01/productwiki/method_get.go index 503a2a49ab6..7ee0379c2bc 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/method_get.go @@ -46,7 +46,6 @@ func (c ProductWikiClient) Get(ctx context.Context, id ProductId) (result GetOpe var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/method_list.go b/resource-manager/apimanagement/2024-05-01/productwiki/method_list.go index db26ef5879d..2a6ee83e84b 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/method_update.go b/resource-manager/apimanagement/2024-05-01/productwiki/method_update.go index 551aa6aab7a..4e6a5e37c25 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ProductWikiClient) Update(ctx context.Context, id ProductId, input WikiU var model WikiContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/productwiki/version.go b/resource-manager/apimanagement/2024-05-01/productwiki/version.go index 34f02bc39a3..aa96d7dbde3 100644 --- a/resource-manager/apimanagement/2024-05-01/productwiki/version.go +++ b/resource-manager/apimanagement/2024-05-01/productwiki/version.go @@ -1,12 +1,10 @@ package productwiki -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/productwiki/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/productwiki/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/README.md b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/README.md index 285494e223a..9bf4ef33a13 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/README.md +++ b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/quotabycounterkeys` Documentation -The `quotabycounterkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `quotabycounterkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/client.go b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/client.go index bd6e9581304..eec1a8e1c60 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/client.go +++ b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/client.go @@ -15,7 +15,7 @@ type QuotaByCounterKeysClient struct { } func NewQuotaByCounterKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByCounterKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabycounterkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabycounterkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByCounterKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/id_quota.go b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/id_quota.go index 11bd5535194..1cb117ba2bc 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/id_quota.go +++ b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/id_quota.go @@ -44,7 +44,7 @@ func ParseQuotaID(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/method_update.go b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/method_update.go index 44f72d4b26b..8ed074d74d8 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input var model QuotaCounterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/version.go b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/version.go index 073fd694264..686ad4230dd 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/version.go +++ b/resource-manager/apimanagement/2024-05-01/quotabycounterkeys/version.go @@ -1,12 +1,10 @@ package quotabycounterkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabycounterkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabycounterkeys/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/README.md b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/README.md index c907c8d3622..82ce8914844 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/README.md +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys` Documentation -The `quotabyperiodkeys` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `quotabyperiodkeys` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/client.go b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/client.go index 338089b5c40..559771ef5e6 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/client.go +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/client.go @@ -15,7 +15,7 @@ type QuotaByPeriodKeysClient struct { } func NewQuotaByPeriodKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByPeriodKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotabyperiodkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaByPeriodKeysClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/id_period.go b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/id_period.go index 24a1631d595..0aabd1a8ba4 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/id_period.go +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/id_period.go @@ -46,7 +46,7 @@ func ParsePeriodID(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeriodIDInsensitively(input string) (*PeriodId, error) { } id := PeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_get.go b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_get.go index ea5a1757972..6bb85fbcffb 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_get.go @@ -45,7 +45,6 @@ func (c QuotaByPeriodKeysClient) Get(ctx context.Context, id PeriodId) (result G var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_update.go b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_update.go index 2fc44c961e6..7e71a98ddf1 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/method_update.go @@ -49,7 +49,6 @@ func (c QuotaByPeriodKeysClient) Update(ctx context.Context, id PeriodId, input var model QuotaCounterContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/version.go b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/version.go index c15fc7afd69..e0666ad30c1 100644 --- a/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/version.go +++ b/resource-manager/apimanagement/2024-05-01/quotabyperiodkeys/version.go @@ -1,12 +1,10 @@ package quotabyperiodkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotabyperiodkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotabyperiodkeys/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/region/README.md b/resource-manager/apimanagement/2024-05-01/region/README.md index d6ec1ba08b2..5d51fd84829 100644 --- a/resource-manager/apimanagement/2024-05-01/region/README.md +++ b/resource-manager/apimanagement/2024-05-01/region/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/region` Documentation -The `region` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `region` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/region/client.go b/resource-manager/apimanagement/2024-05-01/region/client.go index 46d4de5270d..41092dd526a 100644 --- a/resource-manager/apimanagement/2024-05-01/region/client.go +++ b/resource-manager/apimanagement/2024-05-01/region/client.go @@ -15,7 +15,7 @@ type RegionClient struct { } func NewRegionClientWithBaseURI(sdkApi sdkEnv.Api) (*RegionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "region", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "region", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/region/id_service.go b/resource-manager/apimanagement/2024-05-01/region/id_service.go index 287e12afddc..51310a9c174 100644 --- a/resource-manager/apimanagement/2024-05-01/region/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/region/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/region/version.go b/resource-manager/apimanagement/2024-05-01/region/version.go index 4004861794f..7c1c894b65f 100644 --- a/resource-manager/apimanagement/2024-05-01/region/version.go +++ b/resource-manager/apimanagement/2024-05-01/region/version.go @@ -1,12 +1,10 @@ package region -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/region/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/region/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/reports/README.md b/resource-manager/apimanagement/2024-05-01/reports/README.md index 191d91f7540..44479525b11 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/README.md +++ b/resource-manager/apimanagement/2024-05-01/reports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/reports` Documentation -The `reports` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `reports` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/reports/client.go b/resource-manager/apimanagement/2024-05-01/reports/client.go index 7d5bde81365..d5f04232726 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/client.go +++ b/resource-manager/apimanagement/2024-05-01/reports/client.go @@ -15,7 +15,7 @@ type ReportsClient struct { } func NewReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReportsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/reports/id_service.go b/resource-manager/apimanagement/2024-05-01/reports/id_service.go index ff6955096df..b5a3e420608 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/reports/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbyapi.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbyapi.go index e99479d8413..938e0fdaf48 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbyapi.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbyapi.go @@ -42,6 +42,7 @@ func (o ListByApiOperationOptions) ToHeaders() *client.Headers { func (o ListByApiOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbygeo.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbygeo.go index 1e69c1fb509..13fc541e4a6 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbygeo.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbygeo.go @@ -41,6 +41,7 @@ func (o ListByGeoOperationOptions) ToHeaders() *client.Headers { func (o ListByGeoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbyoperation.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbyoperation.go index bb4465b0ce3..8358f8ba004 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbyoperation.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbyoperation.go @@ -42,6 +42,7 @@ func (o ListByOperationOperationOptions) ToHeaders() *client.Headers { func (o ListByOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbyproduct.go index 3a6df43c7b4..73d09491df5 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbyproduct.go @@ -42,6 +42,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbyrequest.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbyrequest.go index 265c2670114..22f5d5ad5ca 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbyrequest.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbyrequest.go @@ -36,6 +36,7 @@ func (o ListByRequestOperationOptions) ToHeaders() *client.Headers { func (o ListByRequestOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c ReportsClient) ListByRequest(ctx context.Context, id ServiceId, options var model RequestReportCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbysubscription.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbysubscription.go index 1e7ffadeafd..4be6b09415d 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbysubscription.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbytime.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbytime.go index 629527e4e8b..a440a9632c1 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbytime.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbytime.go @@ -43,6 +43,7 @@ func (o ListByTimeOperationOptions) ToHeaders() *client.Headers { func (o ListByTimeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/method_listbyuser.go b/resource-manager/apimanagement/2024-05-01/reports/method_listbyuser.go index 0751d4a40cb..9245fc80cd9 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/method_listbyuser.go +++ b/resource-manager/apimanagement/2024-05-01/reports/method_listbyuser.go @@ -42,6 +42,7 @@ func (o ListByUserOperationOptions) ToHeaders() *client.Headers { func (o ListByUserOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/reports/version.go b/resource-manager/apimanagement/2024-05-01/reports/version.go index 4b39f7b2a00..d72c69bd54d 100644 --- a/resource-manager/apimanagement/2024-05-01/reports/version.go +++ b/resource-manager/apimanagement/2024-05-01/reports/version.go @@ -1,12 +1,10 @@ package reports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reports/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/schema/README.md b/resource-manager/apimanagement/2024-05-01/schema/README.md index 2ae965a4f9a..9db326019d4 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/README.md +++ b/resource-manager/apimanagement/2024-05-01/schema/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/schema` Documentation -The `schema` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `schema` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/schema/client.go b/resource-manager/apimanagement/2024-05-01/schema/client.go index 3d872ecf7a1..dd9c100ba13 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/client.go +++ b/resource-manager/apimanagement/2024-05-01/schema/client.go @@ -15,7 +15,7 @@ type SchemaClient struct { } func NewSchemaClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schema", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schema", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/schema/id_schema.go b/resource-manager/apimanagement/2024-05-01/schema/id_schema.go index bb6238dd767..192895eff2e 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/id_schema.go +++ b/resource-manager/apimanagement/2024-05-01/schema/id_schema.go @@ -44,7 +44,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/schema/id_service.go b/resource-manager/apimanagement/2024-05-01/schema/id_service.go index 11419aeb835..aeb24c3ff7f 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/schema/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/schema/id_workspace.go b/resource-manager/apimanagement/2024-05-01/schema/id_workspace.go index f4096e5456a..d6f8a2faec5 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/schema/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/schema/id_workspaceschema.go b/resource-manager/apimanagement/2024-05-01/schema/id_workspaceschema.go index 25f35d2ce89..926c9a9b5b2 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/id_workspaceschema.go +++ b/resource-manager/apimanagement/2024-05-01/schema/id_workspaceschema.go @@ -46,7 +46,7 @@ func ParseWorkspaceSchemaID(input string) (*WorkspaceSchemaId, error) { } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSchemaIDInsensitively(input string) (*WorkspaceSchemaId, erro } id := WorkspaceSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemacreateorupdate.go b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemacreateorupdate.go index 6f6a15cfe78..29a4f875076 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o GlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o GlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemadelete.go b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemadelete.go index 234fcfcb78f..f170324bf05 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemadelete.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemadelete.go @@ -35,6 +35,7 @@ func (o GlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemaget.go b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemaget.go index d2ec4344b20..6118374682a 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemaget.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) GlobalSchemaGet(ctx context.Context, id SchemaId) (result var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemalistbyservice.go b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemalistbyservice.go index 7797c6a6b8f..f25edc94805 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_globalschemalistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_globalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o GlobalSchemaListByServiceOperationOptions) ToHeaders() *client.Headers { func (o GlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemacreateorupdate.go b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemacreateorupdate.go index 99be8ac48c4..3b378cb67e0 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemacreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemacreateorupdate.go @@ -39,6 +39,7 @@ func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceGlobalSchemaCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemadelete.go b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemadelete.go index a8aab3185b1..4015581a86c 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemadelete.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemadelete.go @@ -35,6 +35,7 @@ func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceGlobalSchemaDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemaget.go b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemaget.go index 73828cf65b6..749310cc25b 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemaget.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemaget.go @@ -45,7 +45,6 @@ func (c SchemaClient) WorkspaceGlobalSchemaGet(ctx context.Context, id Workspace var model GlobalSchemaContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemalistbyservice.go b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemalistbyservice.go index aeae5549ab2..2c2454c9a80 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemalistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/schema/method_workspaceglobalschemalistbyservice.go @@ -41,6 +41,7 @@ func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToHeaders() *client. func (o WorkspaceGlobalSchemaListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/schema/version.go b/resource-manager/apimanagement/2024-05-01/schema/version.go index 466e794d288..4d185a183a9 100644 --- a/resource-manager/apimanagement/2024-05-01/schema/version.go +++ b/resource-manager/apimanagement/2024-05-01/schema/version.go @@ -1,12 +1,10 @@ package schema -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schema/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schema/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/README.md b/resource-manager/apimanagement/2024-05-01/signinsettings/README.md index 235f4193c05..9baa097e516 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/README.md +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/signinsettings` Documentation -The `signinsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `signinsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/client.go b/resource-manager/apimanagement/2024-05-01/signinsettings/client.go index a21dfcdddd2..0426e9303e8 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/client.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/client.go @@ -15,7 +15,7 @@ type SignInSettingsClient struct { } func NewSignInSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignInSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signinsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signinsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignInSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/id_service.go b/resource-manager/apimanagement/2024-05-01/signinsettings/id_service.go index fd18eb71e2f..ab9047e4895 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/signinsettings/method_createorupdate.go index 7354010fc89..6f35914bbe1 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignInSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/method_get.go b/resource-manager/apimanagement/2024-05-01/signinsettings/method_get.go index 1de8b5e5963..35d80bf82b1 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignInSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSigninSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/method_update.go b/resource-manager/apimanagement/2024-05-01/signinsettings/method_update.go index 1c0af5a3508..499592b651b 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/signinsettings/version.go b/resource-manager/apimanagement/2024-05-01/signinsettings/version.go index d51779befcb..cc1cb323c8c 100644 --- a/resource-manager/apimanagement/2024-05-01/signinsettings/version.go +++ b/resource-manager/apimanagement/2024-05-01/signinsettings/version.go @@ -1,12 +1,10 @@ package signinsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signinsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signinsettings/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/README.md b/resource-manager/apimanagement/2024-05-01/signupsettings/README.md index a75a4f1d4b4..c9f6c2807d9 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/README.md +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/signupsettings` Documentation -The `signupsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `signupsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/client.go b/resource-manager/apimanagement/2024-05-01/signupsettings/client.go index 2d9452823e3..3a4f6ae3333 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/client.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/client.go @@ -15,7 +15,7 @@ type SignUpSettingsClient struct { } func NewSignUpSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SignUpSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signupsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signupsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignUpSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/id_service.go b/resource-manager/apimanagement/2024-05-01/signupsettings/id_service.go index eeefe5b42b7..972362091d7 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/signupsettings/method_createorupdate.go index 8d57367d2f5..371f0477840 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SignUpSettingsClient) CreateOrUpdate(ctx context.Context, id ServiceId, var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/method_get.go b/resource-manager/apimanagement/2024-05-01/signupsettings/method_get.go index e9062643330..03dc9774b35 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/method_get.go @@ -46,7 +46,6 @@ func (c SignUpSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model PortalSignupSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/method_update.go b/resource-manager/apimanagement/2024-05-01/signupsettings/method_update.go index 8d8918d3324..c86348ae580 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/method_update.go @@ -35,6 +35,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/signupsettings/version.go b/resource-manager/apimanagement/2024-05-01/signupsettings/version.go index 18496c4242f..49dc5753d4b 100644 --- a/resource-manager/apimanagement/2024-05-01/signupsettings/version.go +++ b/resource-manager/apimanagement/2024-05-01/signupsettings/version.go @@ -1,12 +1,10 @@ package signupsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signupsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signupsettings/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/skus/README.md b/resource-manager/apimanagement/2024-05-01/skus/README.md index 55aef9cf3ba..18e6971b069 100644 --- a/resource-manager/apimanagement/2024-05-01/skus/README.md +++ b/resource-manager/apimanagement/2024-05-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/skus/client.go b/resource-manager/apimanagement/2024-05-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/apimanagement/2024-05-01/skus/client.go +++ b/resource-manager/apimanagement/2024-05-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/skus/version.go b/resource-manager/apimanagement/2024-05-01/skus/version.go index 2340bd89ab8..d2c1491d0ab 100644 --- a/resource-manager/apimanagement/2024-05-01/skus/version.go +++ b/resource-manager/apimanagement/2024-05-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/README.md b/resource-manager/apimanagement/2024-05-01/subscription/README.md index f75b2537236..7e798e022f8 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/README.md +++ b/resource-manager/apimanagement/2024-05-01/subscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/subscription` Documentation -The `subscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `subscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/subscription/client.go b/resource-manager/apimanagement/2024-05-01/subscription/client.go index 9885434f9dd..b5f97131f6f 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/client.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/client.go @@ -15,7 +15,7 @@ type SubscriptionClient struct { } func NewSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/id_service.go b/resource-manager/apimanagement/2024-05-01/subscription/id_service.go index eae18b83523..565db9091ea 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/id_subscriptions2.go b/resource-manager/apimanagement/2024-05-01/subscription/id_subscriptions2.go index 92e8dcc65f1..c6acf1a4ae0 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/id_subscriptions2.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/id_subscriptions2.go @@ -44,7 +44,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/id_usersubscriptions2.go b/resource-manager/apimanagement/2024-05-01/subscription/id_usersubscriptions2.go index 07412cdb651..f91da2b8480 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/id_usersubscriptions2.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/id_usersubscriptions2.go @@ -46,7 +46,7 @@ func ParseUserSubscriptions2ID(input string) (*UserSubscriptions2Id, error) { } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSubscriptions2IDInsensitively(input string) (*UserSubscriptions2Id } id := UserSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/id_workspace.go b/resource-manager/apimanagement/2024-05-01/subscription/id_workspace.go index f2e1bd584a2..0c6365ef793 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/id_workspacesubscriptions2.go b/resource-manager/apimanagement/2024-05-01/subscription/id_workspacesubscriptions2.go index 5ec25c56a27..ac81a3cf234 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/id_workspacesubscriptions2.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/id_workspacesubscriptions2.go @@ -46,7 +46,7 @@ func ParseWorkspaceSubscriptions2ID(input string) (*WorkspaceSubscriptions2Id, e } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceSubscriptions2IDInsensitively(input string) (*WorkspaceSubscr } id := WorkspaceSubscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/subscription/method_createorupdate.go index 84f04d880d0..b8e289d53ae 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_createorupdate.go @@ -38,6 +38,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) CreateOrUpdate(ctx context.Context, id Subscriptions var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_delete.go b/resource-manager/apimanagement/2024-05-01/subscription/method_delete.go index e3c31885a75..365f71a2c63 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_get.go b/resource-manager/apimanagement/2024-05-01/subscription/method_get.go index 9a57c676f8b..0156f9f655a 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) Get(ctx context.Context, id Subscriptions2Id) (resul var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_list.go b/resource-manager/apimanagement/2024-05-01/subscription/method_list.go index 2e9d96e0473..8b1e4d1455b 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/subscription/method_listsecrets.go index 579b90282a8..ce51c65282c 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_listsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) ListSecrets(ctx context.Context, id Subscriptions2Id var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_update.go b/resource-manager/apimanagement/2024-05-01/subscription/method_update.go index 635071e41ca..04305d82d79 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_update.go @@ -38,6 +38,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) Update(ctx context.Context, id Subscriptions2Id, inp var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_usersubscriptionget.go b/resource-manager/apimanagement/2024-05-01/subscription/method_usersubscriptionget.go index 4323e0a04c6..9c22a5becdd 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_usersubscriptionget.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_usersubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) UserSubscriptionGet(ctx context.Context, id UserSubs var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptioncreateorupdate.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptioncreateorupdate.go index 9c4c3b06ccb..37af25f8a1e 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptioncreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptioncreateorupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToHeaders() *client func (o WorkspaceSubscriptionCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionCreateOrUpdate(ctx context.Cont var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptiondelete.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptiondelete.go index ae93f99c979..596c10eb7d8 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptiondelete.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptiondelete.go @@ -35,6 +35,7 @@ func (o WorkspaceSubscriptionDeleteOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionget.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionget.go index 37ea5ebe516..8dae472a92c 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionget.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionget.go @@ -45,7 +45,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionGet(ctx context.Context, id Wor var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlist.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlist.go index ae68c703393..3204ff8b3a1 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlist.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlist.go @@ -41,6 +41,7 @@ func (o WorkspaceSubscriptionListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceSubscriptionListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlistsecrets.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlistsecrets.go index 5aaf63656bd..6fe9aca9880 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlistsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionlistsecrets.go @@ -46,7 +46,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionListSecrets(ctx context.Context var model SubscriptionKeysContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionupdate.go b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionupdate.go index e8866e97051..a71cb2ab2b4 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionupdate.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/method_workspacesubscriptionupdate.go @@ -38,6 +38,7 @@ func (o WorkspaceSubscriptionUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceSubscriptionUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -85,7 +86,6 @@ func (c SubscriptionClient) WorkspaceSubscriptionUpdate(ctx context.Context, id var model SubscriptionContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/subscription/version.go b/resource-manager/apimanagement/2024-05-01/subscription/version.go index 433289b9fa1..7bd5ad5d316 100644 --- a/resource-manager/apimanagement/2024-05-01/subscription/version.go +++ b/resource-manager/apimanagement/2024-05-01/subscription/version.go @@ -1,12 +1,10 @@ package subscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscription/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tag/README.md b/resource-manager/apimanagement/2024-05-01/tag/README.md index 519b9c18577..583e9d82fbd 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/README.md +++ b/resource-manager/apimanagement/2024-05-01/tag/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tag` Documentation -The `tag` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tag` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tag/client.go b/resource-manager/apimanagement/2024-05-01/tag/client.go index e97e5adc95e..9450459e77c 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/client.go +++ b/resource-manager/apimanagement/2024-05-01/tag/client.go @@ -15,7 +15,7 @@ type TagClient struct { } func NewTagClientWithBaseURI(sdkApi sdkEnv.Api) (*TagClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tag", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tag", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tag/id_service.go b/resource-manager/apimanagement/2024-05-01/tag/id_service.go index c2136f64b3e..35b3ad02caf 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tag/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tag/id_tag.go b/resource-manager/apimanagement/2024-05-01/tag/id_tag.go index 568503a639c..70a4aa51923 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/id_tag.go +++ b/resource-manager/apimanagement/2024-05-01/tag/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tag/id_workspace.go b/resource-manager/apimanagement/2024-05-01/tag/id_workspace.go index 3028a0894dc..bfda0ce4d3d 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/tag/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tag/id_workspacetag.go b/resource-manager/apimanagement/2024-05-01/tag/id_workspacetag.go index 22e3dc2edb3..52c9179a8dc 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/id_workspacetag.go +++ b/resource-manager/apimanagement/2024-05-01/tag/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/tag/method_createorupdate.go index 9494659a794..5839e98d081 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) CreateOrUpdate(ctx context.Context, id TagId, input TagCreate var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_delete.go b/resource-manager/apimanagement/2024-05-01/tag/method_delete.go index 83335d794bd..ae058a00292 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_get.go b/resource-manager/apimanagement/2024-05-01/tag/method_get.go index 8395e2cb1b1..ebda46b567c 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_get.go @@ -45,7 +45,6 @@ func (c TagClient) Get(ctx context.Context, id TagId) (result GetOperationRespon var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/tag/method_listbyservice.go index efb001aaa9c..e7afb4202b1 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_update.go b/resource-manager/apimanagement/2024-05-01/tag/method_update.go index 8ee0391b4d4..3aba0116fd3 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) Update(ctx context.Context, id TagId, input TagCreateUpdatePa var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagcreateorupdate.go index 43dd91a0327..7a942b3509e 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagcreateorupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagCreateOrUpdateOperationOptions) ToHeaders() *client.Headers func (o WorkspaceTagCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c TagClient) WorkspaceTagCreateOrUpdate(ctx context.Context, id WorkspaceT var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagdelete.go b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagdelete.go index c702a5f54dc..8ec36b5031b 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagdelete.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagdelete.go @@ -35,6 +35,7 @@ func (o WorkspaceTagDeleteOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagget.go b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagget.go index 70647072c3e..4fbedecfe18 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagget.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagget.go @@ -45,7 +45,6 @@ func (c TagClient) WorkspaceTagGet(ctx context.Context, id WorkspaceTagId) (resu var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetaglistbyservice.go b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetaglistbyservice.go index e41c7e2b252..b401db29d28 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetaglistbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetaglistbyservice.go @@ -42,6 +42,7 @@ func (o WorkspaceTagListByServiceOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagupdate.go b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagupdate.go index 0d23c5923a8..2a4a2f560a7 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tag/method_workspacetagupdate.go @@ -36,6 +36,7 @@ func (o WorkspaceTagUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceTagUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TagClient) WorkspaceTagUpdate(ctx context.Context, id WorkspaceTagId, in var model TagContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tag/version.go b/resource-manager/apimanagement/2024-05-01/tag/version.go index bdf6683cd32..7fe7a7486f3 100644 --- a/resource-manager/apimanagement/2024-05-01/tag/version.go +++ b/resource-manager/apimanagement/2024-05-01/tag/version.go @@ -1,12 +1,10 @@ package tag -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tag/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tag/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/README.md b/resource-manager/apimanagement/2024-05-01/tagapilink/README.md index 8bff2a7cd67..ba23d9164f0 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/README.md +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tagapilink` Documentation -The `tagapilink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tagapilink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/client.go b/resource-manager/apimanagement/2024-05-01/tagapilink/client.go index a3dcf8d66eb..f7f085c97cb 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/client.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/client.go @@ -15,7 +15,7 @@ type TagApiLinkClient struct { } func NewTagApiLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagApiLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagapilink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagapilink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagApiLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/id_apilink.go b/resource-manager/apimanagement/2024-05-01/tagapilink/id_apilink.go index 8f12afdcae2..b8280a415bb 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/id_apilink.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/id_apilink.go @@ -46,7 +46,7 @@ func ParseApiLinkID(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiLinkIDInsensitively(input string) (*ApiLinkId, error) { } id := ApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/id_tag.go b/resource-manager/apimanagement/2024-05-01/tagapilink/id_tag.go index d8e00e21e9f..a1fe305725a 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/id_tag.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/id_tagapilink.go b/resource-manager/apimanagement/2024-05-01/tagapilink/id_tagapilink.go index 59e43c8dd36..2f275a0f92b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/id_tagapilink.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/id_tagapilink.go @@ -48,7 +48,7 @@ func ParseTagApiLinkID(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagApiLinkIDInsensitively(input string) (*TagApiLinkId, error) { } id := TagApiLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/id_workspacetag.go b/resource-manager/apimanagement/2024-05-01/tagapilink/id_workspacetag.go index a7ea89f58c3..6db7c41d51a 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/id_workspacetag.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_createorupdate.go index 0b09901bfc5..608572cd0ec 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) CreateOrUpdate(ctx context.Context, id ApiLinkId, inpu var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_get.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_get.go index 8de9c2a323d..4deae08bbd9 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_get.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) Get(ctx context.Context, id ApiLinkId) (result GetOper var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_listbyproduct.go index 4c0cda2c870..a96f5e4967e 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkcreateorupdate.go index b8a0dc48684..9917c2f8e25 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkCreateOrUpdate(ctx context.Context, var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkget.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkget.go index 3eddb1e9cc1..abec05ea983 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkget.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinkget.go @@ -45,7 +45,6 @@ func (c TagApiLinkClient) WorkspaceTagApiLinkGet(ctx context.Context, id TagApiL var model TagApiLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinklistbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinklistbyproduct.go index b39a8283dfe..aa0d3d57a51 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinklistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/method_workspacetagapilinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagApiLinkListByProductOperationOptions) ToHeaders() *client.He func (o WorkspaceTagApiLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagapilink/version.go b/resource-manager/apimanagement/2024-05-01/tagapilink/version.go index 0420fe9781f..005f6637c62 100644 --- a/resource-manager/apimanagement/2024-05-01/tagapilink/version.go +++ b/resource-manager/apimanagement/2024-05-01/tagapilink/version.go @@ -1,12 +1,10 @@ package tagapilink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagapilink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagapilink/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/README.md b/resource-manager/apimanagement/2024-05-01/tagoperationlink/README.md index bda73511b90..d67c6bdca7f 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/README.md +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tagoperationlink` Documentation -The `tagoperationlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tagoperationlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/client.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/client.go index e582ef4198c..72e799b13ad 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/client.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/client.go @@ -15,7 +15,7 @@ type TagOperationLinkClient struct { } func NewTagOperationLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagOperationLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagoperationlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagoperationlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagOperationLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_operationlink.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_operationlink.go index c714bd0244c..86160e6387b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_operationlink.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_operationlink.go @@ -46,7 +46,7 @@ func ParseOperationLinkID(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationLinkIDInsensitively(input string) (*OperationLinkId, error) { } id := OperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tag.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tag.go index c2c5d5834d5..d4c60c78f5b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tag.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tagoperationlink.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tagoperationlink.go index 8d1d98640ce..06c1e2b5847 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tagoperationlink.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_tagoperationlink.go @@ -48,7 +48,7 @@ func ParseTagOperationLinkID(input string) (*TagOperationLinkId, error) { } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagOperationLinkIDInsensitively(input string) (*TagOperationLinkId, er } id := TagOperationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_workspacetag.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_workspacetag.go index 9b722df3460..ef37b3e545b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_createorupdate.go index e306fb5a87c..392fea2c56c 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) CreateOrUpdate(ctx context.Context, id Operation var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_get.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_get.go index 9f16e16283d..179efd55590 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_get.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) Get(ctx context.Context, id OperationLinkId) (re var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_listbyproduct.go index cee618cdcb6..409ad05fede 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go index fcb4d980ef4..b5282d8c451 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkCreateOrUpdate(ctx cont var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkget.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkget.go index 8e90fec49fc..4aed112d5f8 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkget.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinkget.go @@ -45,7 +45,6 @@ func (c TagOperationLinkClient) WorkspaceTagOperationLinkGet(ctx context.Context var model TagOperationLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go index 46445e555b0..ec6c721589d 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/method_workspacetagoperationlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToHeaders() *cli func (o WorkspaceTagOperationLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagoperationlink/version.go b/resource-manager/apimanagement/2024-05-01/tagoperationlink/version.go index 3c8811a6a8a..27c03aa8914 100644 --- a/resource-manager/apimanagement/2024-05-01/tagoperationlink/version.go +++ b/resource-manager/apimanagement/2024-05-01/tagoperationlink/version.go @@ -1,12 +1,10 @@ package tagoperationlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagoperationlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagoperationlink/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/README.md b/resource-manager/apimanagement/2024-05-01/tagproductlink/README.md index 5c4267f2ae3..e4ccfdd2bfa 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/README.md +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tagproductlink` Documentation -The `tagproductlink` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tagproductlink` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/client.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/client.go index 955dda813c9..4575780b827 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/client.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/client.go @@ -15,7 +15,7 @@ type TagProductLinkClient struct { } func NewTagProductLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*TagProductLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagproductlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagproductlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagProductLinkClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_productlink.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_productlink.go index ebd018211ce..d6e9874cda1 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_productlink.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_productlink.go @@ -46,7 +46,7 @@ func ParseProductLinkID(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProductLinkIDInsensitively(input string) (*ProductLinkId, error) { } id := ProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tag.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tag.go index 4ef3fd4eea3..4f54968e9b8 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tag.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tag.go @@ -44,7 +44,7 @@ func ParseTagID(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagIDInsensitively(input string) (*TagId, error) { } id := TagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tagproductlink.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tagproductlink.go index bf8fe163803..856bb600a64 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tagproductlink.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_tagproductlink.go @@ -48,7 +48,7 @@ func ParseTagProductLinkID(input string) (*TagProductLinkId, error) { } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTagProductLinkIDInsensitively(input string) (*TagProductLinkId, error) } id := TagProductLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_workspacetag.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_workspacetag.go index aab9b9ab186..862c2492b1b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/id_workspacetag.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/id_workspacetag.go @@ -46,7 +46,7 @@ func ParseWorkspaceTagID(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkspaceTagIDInsensitively(input string) (*WorkspaceTagId, error) { } id := WorkspaceTagId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_createorupdate.go index 3dde143776e..d29aa87e45b 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) CreateOrUpdate(ctx context.Context, id ProductLink var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_get.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_get.go index 8d3e297151d..8c78f838b6a 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_get.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) Get(ctx context.Context, id ProductLinkId) (result var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_listbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_listbyproduct.go index c1d3225b9ab..5a81c12a0c3 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_listbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_listbyproduct.go @@ -41,6 +41,7 @@ func (o ListByProductOperationOptions) ToHeaders() *client.Headers { func (o ListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkcreateorupdate.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkcreateorupdate.go index b8d0d74206a..00efc8105c3 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkcreateorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkcreateorupdate.go @@ -50,7 +50,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkCreateOrUpdate(ctx context. var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkget.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkget.go index 97e0f8b09c9..bed6edf51c9 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkget.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinkget.go @@ -45,7 +45,6 @@ func (c TagProductLinkClient) WorkspaceTagProductLinkGet(ctx context.Context, id var model TagProductLinkContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinklistbyproduct.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinklistbyproduct.go index 374d9806a47..b225404de53 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinklistbyproduct.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/method_workspacetagproductlinklistbyproduct.go @@ -41,6 +41,7 @@ func (o WorkspaceTagProductLinkListByProductOperationOptions) ToHeaders() *clien func (o WorkspaceTagProductLinkListByProductOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagproductlink/version.go b/resource-manager/apimanagement/2024-05-01/tagproductlink/version.go index 743dfe6c487..e807c4c3afb 100644 --- a/resource-manager/apimanagement/2024-05-01/tagproductlink/version.go +++ b/resource-manager/apimanagement/2024-05-01/tagproductlink/version.go @@ -1,12 +1,10 @@ package tagproductlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagproductlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagproductlink/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tagresource/README.md b/resource-manager/apimanagement/2024-05-01/tagresource/README.md index 2e8767d322d..ce7ec0e6d58 100644 --- a/resource-manager/apimanagement/2024-05-01/tagresource/README.md +++ b/resource-manager/apimanagement/2024-05-01/tagresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tagresource` Documentation -The `tagresource` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tagresource` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tagresource/client.go b/resource-manager/apimanagement/2024-05-01/tagresource/client.go index 9a4e989f378..e368d7173e2 100644 --- a/resource-manager/apimanagement/2024-05-01/tagresource/client.go +++ b/resource-manager/apimanagement/2024-05-01/tagresource/client.go @@ -15,7 +15,7 @@ type TagResourceClient struct { } func NewTagResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TagResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagResourceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tagresource/id_service.go b/resource-manager/apimanagement/2024-05-01/tagresource/id_service.go index 7a6a2163595..79c6c3d76d3 100644 --- a/resource-manager/apimanagement/2024-05-01/tagresource/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tagresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tagresource/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/tagresource/method_listbyservice.go index 0d880dc6dad..3daedbb3d18 100644 --- a/resource-manager/apimanagement/2024-05-01/tagresource/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/tagresource/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tagresource/version.go b/resource-manager/apimanagement/2024-05-01/tagresource/version.go index 877efc3c195..b7bfa287c31 100644 --- a/resource-manager/apimanagement/2024-05-01/tagresource/version.go +++ b/resource-manager/apimanagement/2024-05-01/tagresource/version.go @@ -1,12 +1,10 @@ package tagresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagresource/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/README.md b/resource-manager/apimanagement/2024-05-01/tenantaccess/README.md index e34ff239c82..3b9bac98fd5 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/README.md +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tenantaccess` Documentation -The `tenantaccess` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tenantaccess` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/client.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/client.go index d36cd27765c..131dd722282 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/client.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/client.go @@ -15,7 +15,7 @@ type TenantAccessClient struct { } func NewTenantAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/id_access.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/id_access.go index 927925f0366..f2aea0cdd42 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/id_access.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/id_service.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/id_service.go index 6dbbad41263..6753200ac92 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_create.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_create.go index 73ced417651..0cd71b7a599 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_create.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Create(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_get.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_get.go index 88298263510..832e64d03c0 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_get.go @@ -45,7 +45,6 @@ func (c TenantAccessClient) Get(ctx context.Context, id AccessId) (result GetOpe var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listbyservice.go index 541de46f891..6f51efcc9b2 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listsecrets.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listsecrets.go index 237989384de..12e38530891 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listsecrets.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_listsecrets.go @@ -46,7 +46,6 @@ func (c TenantAccessClient) ListSecrets(ctx context.Context, id AccessId) (resul var model AccessInformationSecretsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_update.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_update.go index 73793de2965..a01c3d4829c 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TenantAccessClient) Update(ctx context.Context, id AccessId, input Acces var model AccessInformationContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccess/version.go b/resource-manager/apimanagement/2024-05-01/tenantaccess/version.go index fbd631c5442..08b161d0ade 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccess/version.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccess/version.go @@ -1,12 +1,10 @@ package tenantaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccess/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/client.go b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/client.go index 1540a8d6df5..7c14713409a 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/client.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/client.go @@ -15,7 +15,7 @@ type TenantAccessGitClient struct { } func NewTenantAccessGitClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessGitClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantaccessgit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantaccessgit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantAccessGitClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/id_access.go b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/id_access.go index c4c17575eda..f067740b97e 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/id_access.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/id_access.go @@ -44,7 +44,7 @@ func ParseAccessID(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessIDInsensitively(input string) (*AccessId, error) { } id := AccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/version.go b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/version.go index 4f69982fc74..d32a0985ec6 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantaccessgit/version.go +++ b/resource-manager/apimanagement/2024-05-01/tenantaccessgit/version.go @@ -1,12 +1,10 @@ package tenantaccessgit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantaccessgit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantaccessgit/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/README.md b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/README.md index 5d27c06acc9..cb0e5259205 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/README.md +++ b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tenantconfiguration` Documentation -The `tenantconfiguration` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tenantconfiguration` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/client.go b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/client.go index 0251dfc8eb5..bd86c8dd00f 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/client.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/client.go @@ -15,7 +15,7 @@ type TenantConfigurationClient struct { } func NewTenantConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/id_service.go b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/id_service.go index 0a039a17bc1..47fc7a837b0 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/version.go b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/version.go index 640f7d0757e..fdd57de549e 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfiguration/version.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfiguration/version.go @@ -1,12 +1,10 @@ package tenantconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfiguration/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/README.md b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/README.md index 8e39cf3f062..b75893722a6 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/README.md +++ b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate` Documentation -The `tenantconfigurationsyncstate` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tenantconfigurationsyncstate` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/client.go b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/client.go index f79f21d0f2c..d01b2487b59 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/client.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/client.go @@ -15,7 +15,7 @@ type TenantConfigurationSyncStateClient struct { } func NewTenantConfigurationSyncStateClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationSyncStateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfigurationsyncstate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationSyncStateClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/id_service.go b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/id_service.go index 354cdf503e1..54597cebc65 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go index fee9e2d3374..1992a54ac27 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/method_tenantconfigurationgetsyncstate.go @@ -46,7 +46,6 @@ func (c TenantConfigurationSyncStateClient) TenantConfigurationGetSyncState(ctx var model TenantConfigurationSyncStateContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/version.go b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/version.go index 38ebef3f3e3..f192e02074e 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/version.go +++ b/resource-manager/apimanagement/2024-05-01/tenantconfigurationsyncstate/version.go @@ -1,12 +1,10 @@ package tenantconfigurationsyncstate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfigurationsyncstate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfigurationsyncstate/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/README.md b/resource-manager/apimanagement/2024-05-01/tenantsettings/README.md index 311ab5ae09d..2b3f9fa4556 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/README.md +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/tenantsettings` Documentation -The `tenantsettings` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `tenantsettings` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/client.go b/resource-manager/apimanagement/2024-05-01/tenantsettings/client.go index db0f8f815eb..71cea0dd788 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/client.go +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/client.go @@ -15,7 +15,7 @@ type TenantSettingsClient struct { } func NewTenantSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantSettingsClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/id_service.go b/resource-manager/apimanagement/2024-05-01/tenantsettings/id_service.go index 68a0c265a26..8e42a6aaa11 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/method_get.go b/resource-manager/apimanagement/2024-05-01/tenantsettings/method_get.go index 40a9e01b321..35b4057e1e2 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/method_get.go @@ -46,7 +46,6 @@ func (c TenantSettingsClient) Get(ctx context.Context, id ServiceId) (result Get var model TenantSettingsContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/tenantsettings/method_listbyservice.go index 12487f36224..b0ee3853b15 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/method_listbyservice.go @@ -39,6 +39,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/tenantsettings/version.go b/resource-manager/apimanagement/2024-05-01/tenantsettings/version.go index bc85128acd5..75b768ad03a 100644 --- a/resource-manager/apimanagement/2024-05-01/tenantsettings/version.go +++ b/resource-manager/apimanagement/2024-05-01/tenantsettings/version.go @@ -1,12 +1,10 @@ package tenantsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantsettings/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/user/README.md b/resource-manager/apimanagement/2024-05-01/user/README.md index d3832250562..9a1dbd42f73 100644 --- a/resource-manager/apimanagement/2024-05-01/user/README.md +++ b/resource-manager/apimanagement/2024-05-01/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `user` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/user/client.go b/resource-manager/apimanagement/2024-05-01/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/apimanagement/2024-05-01/user/client.go +++ b/resource-manager/apimanagement/2024-05-01/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/user/id_service.go b/resource-manager/apimanagement/2024-05-01/user/id_service.go index 4793d7dba1c..e39d35a9443 100644 --- a/resource-manager/apimanagement/2024-05-01/user/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/user/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/user/id_user.go b/resource-manager/apimanagement/2024-05-01/user/id_user.go index 46e79677949..b758a66bd0b 100644 --- a/resource-manager/apimanagement/2024-05-01/user/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/user/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/user/method_createorupdate.go index b1cf998602d..3d85a55770e 100644 --- a/resource-manager/apimanagement/2024-05-01/user/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/user/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c UserClient) CreateOrUpdate(ctx context.Context, id UserId, input UserCre var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/user/method_delete.go b/resource-manager/apimanagement/2024-05-01/user/method_delete.go index e5d13dba442..80b3c08013c 100644 --- a/resource-manager/apimanagement/2024-05-01/user/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/user/method_delete.go @@ -41,6 +41,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/user/method_get.go b/resource-manager/apimanagement/2024-05-01/user/method_get.go index 1237761289c..e7fc56ebb3e 100644 --- a/resource-manager/apimanagement/2024-05-01/user/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/user/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/user/method_listbyservice.go index e098057b246..2fc7fb34899 100644 --- a/resource-manager/apimanagement/2024-05-01/user/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/user/method_listbyservice.go @@ -42,6 +42,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/user/method_update.go b/resource-manager/apimanagement/2024-05-01/user/method_update.go index 11353f91240..d0628f53b8d 100644 --- a/resource-manager/apimanagement/2024-05-01/user/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/user/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c UserClient) Update(ctx context.Context, id UserId, input UserUpdateParam var model UserContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/user/version.go b/resource-manager/apimanagement/2024-05-01/user/version.go index 15e97eb1be0..7e1bb522e9e 100644 --- a/resource-manager/apimanagement/2024-05-01/user/version.go +++ b/resource-manager/apimanagement/2024-05-01/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/client.go b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/client.go index 2be6b996059..a78825dedcc 100644 --- a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/client.go +++ b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/client.go @@ -15,7 +15,7 @@ type UserConfirmationPasswordSendClient struct { } func NewUserConfirmationPasswordSendClientWithBaseURI(sdkApi sdkEnv.Api) (*UserConfirmationPasswordSendClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "userconfirmationpasswordsend", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserConfirmationPasswordSendClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/id_user.go b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/id_user.go index 119b0594c8a..100e150391d 100644 --- a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go index b1915a44d82..700323d679d 100644 --- a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go +++ b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/method_userconfirmationpasswordsend.go @@ -33,6 +33,7 @@ func (o UserConfirmationPasswordSendOperationOptions) ToHeaders() *client.Header func (o UserConfirmationPasswordSendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/version.go b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/version.go index 2314ee0c304..4661b1a193d 100644 --- a/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/version.go +++ b/resource-manager/apimanagement/2024-05-01/userconfirmationpasswordsend/version.go @@ -1,12 +1,10 @@ package userconfirmationpasswordsend -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/userconfirmationpasswordsend/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/userconfirmationpasswordsend/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/usergroup/README.md b/resource-manager/apimanagement/2024-05-01/usergroup/README.md index 41ed655939a..6ac9ed682ea 100644 --- a/resource-manager/apimanagement/2024-05-01/usergroup/README.md +++ b/resource-manager/apimanagement/2024-05-01/usergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/usergroup` Documentation -The `usergroup` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `usergroup` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/usergroup/client.go b/resource-manager/apimanagement/2024-05-01/usergroup/client.go index 74829119980..c03391f5989 100644 --- a/resource-manager/apimanagement/2024-05-01/usergroup/client.go +++ b/resource-manager/apimanagement/2024-05-01/usergroup/client.go @@ -15,7 +15,7 @@ type UserGroupClient struct { } func NewUserGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*UserGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserGroupClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/usergroup/id_user.go b/resource-manager/apimanagement/2024-05-01/usergroup/id_user.go index dbcd62c7aff..d3e2840860c 100644 --- a/resource-manager/apimanagement/2024-05-01/usergroup/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/usergroup/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/usergroup/method_list.go b/resource-manager/apimanagement/2024-05-01/usergroup/method_list.go index cfe2c191701..0585c10cd75 100644 --- a/resource-manager/apimanagement/2024-05-01/usergroup/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/usergroup/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/usergroup/version.go b/resource-manager/apimanagement/2024-05-01/usergroup/version.go index 599537e4ef9..7e110090d94 100644 --- a/resource-manager/apimanagement/2024-05-01/usergroup/version.go +++ b/resource-manager/apimanagement/2024-05-01/usergroup/version.go @@ -1,12 +1,10 @@ package usergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usergroup/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/useridentity/README.md b/resource-manager/apimanagement/2024-05-01/useridentity/README.md index c81f8caeff6..0281a56d0db 100644 --- a/resource-manager/apimanagement/2024-05-01/useridentity/README.md +++ b/resource-manager/apimanagement/2024-05-01/useridentity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/useridentity` Documentation -The `useridentity` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `useridentity` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/useridentity/client.go b/resource-manager/apimanagement/2024-05-01/useridentity/client.go index ba997999551..252dc69cb22 100644 --- a/resource-manager/apimanagement/2024-05-01/useridentity/client.go +++ b/resource-manager/apimanagement/2024-05-01/useridentity/client.go @@ -15,7 +15,7 @@ type UserIdentityClient struct { } func NewUserIdentityClientWithBaseURI(sdkApi sdkEnv.Api) (*UserIdentityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "useridentity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "useridentity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserIdentityClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/useridentity/id_user.go b/resource-manager/apimanagement/2024-05-01/useridentity/id_user.go index 81e0f7f5380..4835b28eb40 100644 --- a/resource-manager/apimanagement/2024-05-01/useridentity/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/useridentity/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/useridentity/version.go b/resource-manager/apimanagement/2024-05-01/useridentity/version.go index 5ef00f1e24f..041fd8b778d 100644 --- a/resource-manager/apimanagement/2024-05-01/useridentity/version.go +++ b/resource-manager/apimanagement/2024-05-01/useridentity/version.go @@ -1,12 +1,10 @@ package useridentity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/useridentity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/useridentity/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/users/README.md b/resource-manager/apimanagement/2024-05-01/users/README.md index 23b4be2f0c7..84b8b7f4003 100644 --- a/resource-manager/apimanagement/2024-05-01/users/README.md +++ b/resource-manager/apimanagement/2024-05-01/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `users` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/users/client.go b/resource-manager/apimanagement/2024-05-01/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/apimanagement/2024-05-01/users/client.go +++ b/resource-manager/apimanagement/2024-05-01/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/users/id_user.go b/resource-manager/apimanagement/2024-05-01/users/id_user.go index f309b6fbd68..73fb129b8ef 100644 --- a/resource-manager/apimanagement/2024-05-01/users/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/users/method_usergeneratessourl.go b/resource-manager/apimanagement/2024-05-01/users/method_usergeneratessourl.go index 500ea8362b0..bab32e3f071 100644 --- a/resource-manager/apimanagement/2024-05-01/users/method_usergeneratessourl.go +++ b/resource-manager/apimanagement/2024-05-01/users/method_usergeneratessourl.go @@ -46,7 +46,6 @@ func (c UsersClient) UserGenerateSsoUrl(ctx context.Context, id UserId) (result var model GenerateSsoUrlResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/users/version.go b/resource-manager/apimanagement/2024-05-01/users/version.go index 8e676626418..b07684f8712 100644 --- a/resource-manager/apimanagement/2024-05-01/users/version.go +++ b/resource-manager/apimanagement/2024-05-01/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/usersubscription/README.md b/resource-manager/apimanagement/2024-05-01/usersubscription/README.md index 9419f776291..696a0d919f9 100644 --- a/resource-manager/apimanagement/2024-05-01/usersubscription/README.md +++ b/resource-manager/apimanagement/2024-05-01/usersubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/usersubscription` Documentation -The `usersubscription` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `usersubscription` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/usersubscription/client.go b/resource-manager/apimanagement/2024-05-01/usersubscription/client.go index f9dd0627128..82b11b9ee90 100644 --- a/resource-manager/apimanagement/2024-05-01/usersubscription/client.go +++ b/resource-manager/apimanagement/2024-05-01/usersubscription/client.go @@ -15,7 +15,7 @@ type UserSubscriptionClient struct { } func NewUserSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSubscriptionClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/usersubscription/id_user.go b/resource-manager/apimanagement/2024-05-01/usersubscription/id_user.go index b993469b4bf..fc76652d568 100644 --- a/resource-manager/apimanagement/2024-05-01/usersubscription/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/usersubscription/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/usersubscription/method_list.go b/resource-manager/apimanagement/2024-05-01/usersubscription/method_list.go index 9acd966ed75..f2118eff505 100644 --- a/resource-manager/apimanagement/2024-05-01/usersubscription/method_list.go +++ b/resource-manager/apimanagement/2024-05-01/usersubscription/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/usersubscription/version.go b/resource-manager/apimanagement/2024-05-01/usersubscription/version.go index 23a9c050f24..1abf33b784e 100644 --- a/resource-manager/apimanagement/2024-05-01/usersubscription/version.go +++ b/resource-manager/apimanagement/2024-05-01/usersubscription/version.go @@ -1,12 +1,10 @@ package usersubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersubscription/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/usertoken/README.md b/resource-manager/apimanagement/2024-05-01/usertoken/README.md index ff2551cb083..87d9bc5db65 100644 --- a/resource-manager/apimanagement/2024-05-01/usertoken/README.md +++ b/resource-manager/apimanagement/2024-05-01/usertoken/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/usertoken` Documentation -The `usertoken` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `usertoken` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/usertoken/client.go b/resource-manager/apimanagement/2024-05-01/usertoken/client.go index adeb6294866..fc8cfaecc12 100644 --- a/resource-manager/apimanagement/2024-05-01/usertoken/client.go +++ b/resource-manager/apimanagement/2024-05-01/usertoken/client.go @@ -15,7 +15,7 @@ type UserTokenClient struct { } func NewUserTokenClientWithBaseURI(sdkApi sdkEnv.Api) (*UserTokenClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usertoken", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usertoken", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserTokenClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/usertoken/id_user.go b/resource-manager/apimanagement/2024-05-01/usertoken/id_user.go index e0f7cf9ee4b..bbb27ed3ed3 100644 --- a/resource-manager/apimanagement/2024-05-01/usertoken/id_user.go +++ b/resource-manager/apimanagement/2024-05-01/usertoken/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/usertoken/method_usergetsharedaccesstoken.go b/resource-manager/apimanagement/2024-05-01/usertoken/method_usergetsharedaccesstoken.go index 28e0efb393e..28d84cc2ee6 100644 --- a/resource-manager/apimanagement/2024-05-01/usertoken/method_usergetsharedaccesstoken.go +++ b/resource-manager/apimanagement/2024-05-01/usertoken/method_usergetsharedaccesstoken.go @@ -50,7 +50,6 @@ func (c UserTokenClient) UserGetSharedAccessToken(ctx context.Context, id UserId var model UserTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/usertoken/version.go b/resource-manager/apimanagement/2024-05-01/usertoken/version.go index b282b50cb9a..a41d0fe8f45 100644 --- a/resource-manager/apimanagement/2024-05-01/usertoken/version.go +++ b/resource-manager/apimanagement/2024-05-01/usertoken/version.go @@ -1,12 +1,10 @@ package usertoken -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usertoken/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usertoken/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/README.md b/resource-manager/apimanagement/2024-05-01/workspace/README.md index dc45515bc62..9f94ee89aa1 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/README.md +++ b/resource-manager/apimanagement/2024-05-01/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `workspace` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/workspace/client.go b/resource-manager/apimanagement/2024-05-01/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/client.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/id_service.go b/resource-manager/apimanagement/2024-05-01/workspace/id_service.go index 8d9a4894f5c..e7da8ebcfda 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/id_service.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/id_workspace.go b/resource-manager/apimanagement/2024-05-01/workspace/id_workspace.go index d86572af484..25a370d981a 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/workspace/method_createorupdate.go index dfbaee168e5..e0e6326e76d 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/method_delete.go b/resource-manager/apimanagement/2024-05-01/workspace/method_delete.go index 41a2b818416..92db0fb9837 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/method_get.go b/resource-manager/apimanagement/2024-05-01/workspace/method_get.go index 2bea0d0912a..75af77961fd 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/method_listbyservice.go b/resource-manager/apimanagement/2024-05-01/workspace/method_listbyservice.go index d7edc0c9746..de7b59ee645 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/method_listbyservice.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/method_update.go b/resource-manager/apimanagement/2024-05-01/workspace/method_update.go index 840713f4a4f..88ff8b28c99 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/method_update.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model WorkspaceContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/workspace/version.go b/resource-manager/apimanagement/2024-05-01/workspace/version.go index 137a79edbd4..3cfbc769148 100644 --- a/resource-manager/apimanagement/2024-05-01/workspace/version.go +++ b/resource-manager/apimanagement/2024-05-01/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2024-05-01" } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/README.md b/resource-manager/apimanagement/2024-05-01/workspacepolicy/README.md index 17c3c2a2af6..58cd919cd18 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/README.md +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/workspacepolicy` Documentation -The `workspacepolicy` SDK allows for interaction with the Azure Resource Manager Service `apimanagement` (API Version `2024-05-01`). +The `workspacepolicy` SDK allows for interaction with Azure Resource Manager `apimanagement` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/client.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/client.go index d4e3c38bc31..96b70b2680b 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/client.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/client.go @@ -15,7 +15,7 @@ type WorkspacePolicyClient struct { } func NewWorkspacePolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacepolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacepolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePolicyClient: %+v", err) } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/id_workspace.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/id_workspace.go index 12c8b423579..a869e05757e 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/id_workspace.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/id_workspace.go @@ -44,7 +44,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_createorupdate.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_createorupdate.go index 9385b41a924..50f1b5227f7 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_createorupdate.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkspacePolicyClient) CreateOrUpdate(ctx context.Context, id WorkspaceI var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_delete.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_delete.go index ac1ad5e7365..6b8d6ba6161 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_delete.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_get.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_get.go index 90e7b0877f6..03cdbe063ab 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_get.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WorkspacePolicyClient) Get(ctx context.Context, id WorkspaceId, options var model PolicyContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/apimanagement/2024-05-01/workspacepolicy/version.go b/resource-manager/apimanagement/2024-05-01/workspacepolicy/version.go index 833ad688252..8ef6c203dc9 100644 --- a/resource-manager/apimanagement/2024-05-01/workspacepolicy/version.go +++ b/resource-manager/apimanagement/2024-05-01/workspacepolicy/version.go @@ -1,12 +1,10 @@ package workspacepolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacepolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacepolicy/2024-05-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/README.md b/resource-manager/appconfiguration/2023-03-01/configurationstores/README.md index 01c74d9151c..bd9b39fe6fc 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/README.md +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/configurationstores` Documentation -The `configurationstores` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `configurationstores` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/client.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/client.go index 9451e19fc2b..ff9e1adac89 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/client.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/client.go @@ -15,7 +15,7 @@ type ConfigurationStoresClient struct { } func NewConfigurationStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationstores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationstores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationStoresClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go index cce91cb3199..1607106f5e0 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/id_configurationstore.go @@ -42,7 +42,7 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/method_get.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_get.go index 58ef2346c30..cb263277e41 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/method_get.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationStoresClient) Get(ctx context.Context, id ConfigurationStor var model ConfigurationStore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/method_regeneratekey.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_regeneratekey.go index f5d731b6036..a8016707cde 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/method_regeneratekey.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c ConfigurationStoresClient) RegenerateKey(ctx context.Context, id Configu var model ApiKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/configurationstores/version.go b/resource-manager/appconfiguration/2023-03-01/configurationstores/version.go index 8e29fd322fe..8a4590baa9e 100644 --- a/resource-manager/appconfiguration/2023-03-01/configurationstores/version.go +++ b/resource-manager/appconfiguration/2023-03-01/configurationstores/version.go @@ -1,12 +1,10 @@ package configurationstores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationstores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationstores/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/README.md b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/README.md index c15622387f1..e2cf5143d38 100644 --- a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/README.md +++ b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores` Documentation -The `deletedconfigurationstores` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `deletedconfigurationstores` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/client.go b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/client.go index b7d48c73d7a..8459076ea82 100644 --- a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/client.go +++ b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/client.go @@ -15,7 +15,7 @@ type DeletedConfigurationStoresClient struct { } func NewDeletedConfigurationStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedConfigurationStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedconfigurationstores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedconfigurationstores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedConfigurationStoresClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go index b28a5cb40ac..58ba4980cb2 100644 --- a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go +++ b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/id_deletedconfigurationstore.go @@ -42,7 +42,7 @@ func ParseDeletedConfigurationStoreID(input string) (*DeletedConfigurationStoreI } id := DeletedConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedConfigurationStoreIDInsensitively(input string) (*DeletedConfig } id := DeletedConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/method_configurationstoresgetdeleted.go b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/method_configurationstoresgetdeleted.go index fe6410865a7..d652067cfd9 100644 --- a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/method_configurationstoresgetdeleted.go +++ b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/method_configurationstoresgetdeleted.go @@ -45,7 +45,6 @@ func (c DeletedConfigurationStoresClient) ConfigurationStoresGetDeleted(ctx cont var model DeletedConfigurationStore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/version.go b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/version.go index bfaa6b42898..7361ac4f3a5 100644 --- a/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/version.go +++ b/resource-manager/appconfiguration/2023-03-01/deletedconfigurationstores/version.go @@ -1,12 +1,10 @@ package deletedconfigurationstores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedconfigurationstores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedconfigurationstores/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/README.md b/resource-manager/appconfiguration/2023-03-01/keyvalues/README.md index 744c1d15be4..d3463e619ca 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/README.md +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/keyvalues` Documentation -The `keyvalues` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `keyvalues` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/client.go b/resource-manager/appconfiguration/2023-03-01/keyvalues/client.go index b319d8d759e..ab99d754354 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/client.go +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/client.go @@ -15,7 +15,7 @@ type KeyValuesClient struct { } func NewKeyValuesClientWithBaseURI(sdkApi sdkEnv.Api) (*KeyValuesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "keyvalues", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "keyvalues", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KeyValuesClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/id_keyvalue.go b/resource-manager/appconfiguration/2023-03-01/keyvalues/id_keyvalue.go index 2384e6689e3..1c1b4fb3853 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/id_keyvalue.go +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/id_keyvalue.go @@ -44,7 +44,7 @@ func ParseKeyValueID(input string) (*KeyValueId, error) { } id := KeyValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyValueIDInsensitively(input string) (*KeyValueId, error) { } id := KeyValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/method_createorupdate.go b/resource-manager/appconfiguration/2023-03-01/keyvalues/method_createorupdate.go index 41552343cd8..a1fd791706c 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/method_createorupdate.go +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/method_createorupdate.go @@ -49,7 +49,6 @@ func (c KeyValuesClient) CreateOrUpdate(ctx context.Context, id KeyValueId, inpu var model KeyValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/method_get.go b/resource-manager/appconfiguration/2023-03-01/keyvalues/method_get.go index 3714d9cdfed..d41f35c4a28 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/method_get.go +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/method_get.go @@ -45,7 +45,6 @@ func (c KeyValuesClient) Get(ctx context.Context, id KeyValueId) (result GetOper var model KeyValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/keyvalues/version.go b/resource-manager/appconfiguration/2023-03-01/keyvalues/version.go index c59d2b6e0a0..19ff5c8cb65 100644 --- a/resource-manager/appconfiguration/2023-03-01/keyvalues/version.go +++ b/resource-manager/appconfiguration/2023-03-01/keyvalues/version.go @@ -1,12 +1,10 @@ package keyvalues -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/keyvalues/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/keyvalues/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/operations/README.md b/resource-manager/appconfiguration/2023-03-01/operations/README.md index b921a61290e..45ff1baa001 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/README.md +++ b/resource-manager/appconfiguration/2023-03-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/operations/client.go b/resource-manager/appconfiguration/2023-03-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/client.go +++ b/resource-manager/appconfiguration/2023-03-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/operations/id_location.go b/resource-manager/appconfiguration/2023-03-01/operations/id_location.go index c8404ebec58..f0ffc4a4a1a 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/id_location.go +++ b/resource-manager/appconfiguration/2023-03-01/operations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/operations/method_checknameavailability.go b/resource-manager/appconfiguration/2023-03-01/operations/method_checknameavailability.go index 50fc932303c..c268f6759de 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/method_checknameavailability.go +++ b/resource-manager/appconfiguration/2023-03-01/operations/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c OperationsClient) CheckNameAvailability(ctx context.Context, id commonid var model NameAvailabilityStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/operations/method_regionalchecknameavailability.go b/resource-manager/appconfiguration/2023-03-01/operations/method_regionalchecknameavailability.go index 67f2323d26a..899ce52808e 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/method_regionalchecknameavailability.go +++ b/resource-manager/appconfiguration/2023-03-01/operations/method_regionalchecknameavailability.go @@ -50,7 +50,6 @@ func (c OperationsClient) RegionalCheckNameAvailability(ctx context.Context, id var model NameAvailabilityStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/operations/version.go b/resource-manager/appconfiguration/2023-03-01/operations/version.go index 7f02904b82e..b265a49a6da 100644 --- a/resource-manager/appconfiguration/2023-03-01/operations/version.go +++ b/resource-manager/appconfiguration/2023-03-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/README.md b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/README.md index b3241e1b30c..8e38fb97646 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/README.md +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/client.go b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/client.go +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_configurationstore.go b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_configurationstore.go index cbf51d5d5d8..924f79fbd78 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_configurationstore.go +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_configurationstore.go @@ -42,7 +42,7 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_privateendpointconnection.go index c9c46097292..a44d4ecb2ce 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/method_get.go b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/method_get.go +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/version.go b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/version.go index d5d62f76c86..39b485c6c09 100644 --- a/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/version.go +++ b/resource-manager/appconfiguration/2023-03-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/README.md b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/README.md index d45ddbbb1ca..60702c21c43 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/README.md +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/client.go b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/client.go +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_configurationstore.go b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_configurationstore.go index 22f3fc112af..4564c0a2617 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_configurationstore.go +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_configurationstore.go @@ -42,7 +42,7 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_privatelinkresource.go index 34d19d3c1a6..30b98300e2e 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/method_get.go b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/method_get.go +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/version.go b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/version.go index 94d28804d2c..b993041583e 100644 --- a/resource-manager/appconfiguration/2023-03-01/privatelinkresources/version.go +++ b/resource-manager/appconfiguration/2023-03-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-03-01" } diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/README.md b/resource-manager/appconfiguration/2023-03-01/replicas/README.md index 2e4d4d60eb2..1ba67433f1b 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/README.md +++ b/resource-manager/appconfiguration/2023-03-01/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appconfiguration/2023-03-01/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `appconfiguration` (API Version `2023-03-01`). +The `replicas` SDK allows for interaction with Azure Resource Manager `appconfiguration` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/client.go b/resource-manager/appconfiguration/2023-03-01/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/client.go +++ b/resource-manager/appconfiguration/2023-03-01/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go b/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go index f5957bcfb75..85266e41d1a 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go +++ b/resource-manager/appconfiguration/2023-03-01/replicas/id_configurationstore.go @@ -42,7 +42,7 @@ func ParseConfigurationStoreID(input string) (*ConfigurationStoreId, error) { } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationStoreIDInsensitively(input string) (*ConfigurationStoreId } id := ConfigurationStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go b/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go index 6bab03ca262..55f20188d5c 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go +++ b/resource-manager/appconfiguration/2023-03-01/replicas/id_replica.go @@ -44,7 +44,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/method_get.go b/resource-manager/appconfiguration/2023-03-01/replicas/method_get.go index 8ff4aa993a5..5f3813c27fc 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/method_get.go +++ b/resource-manager/appconfiguration/2023-03-01/replicas/method_get.go @@ -45,7 +45,6 @@ func (c ReplicasClient) Get(ctx context.Context, id ReplicaId) (result GetOperat var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appconfiguration/2023-03-01/replicas/version.go b/resource-manager/appconfiguration/2023-03-01/replicas/version.go index 198b0d4d213..e4abf61cac7 100644 --- a/resource-manager/appconfiguration/2023-03-01/replicas/version.go +++ b/resource-manager/appconfiguration/2023-03-01/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2023-03-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/README.md b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/README.md index 01549daf64a..115051ae88b 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis` Documentation -The `analyticsitemsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `analyticsitemsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/client.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/client.go index ec47b02ec43..b38c4b12064 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/client.go @@ -15,7 +15,7 @@ type AnalyticsItemsAPIsClient struct { } func NewAnalyticsItemsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AnalyticsItemsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "analyticsitemsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "analyticsitemsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AnalyticsItemsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/id_providercomponent.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/id_providercomponent.go index 53f665dee54..227762c1abf 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/id_providercomponent.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/id_providercomponent.go @@ -44,7 +44,7 @@ func ParseProviderComponentID(input string) (*ProviderComponentId, error) { } id := ProviderComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderComponentIDInsensitively(input string) (*ProviderComponentId, } id := ProviderComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsdelete.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsdelete.go index 33481f530cd..bd01d1256e1 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsdelete.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsdelete.go @@ -34,6 +34,7 @@ func (o AnalyticsItemsDeleteOperationOptions) ToHeaders() *client.Headers { func (o AnalyticsItemsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsget.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsget.go index 85ea3ef457c..7d65c2f17cf 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsget.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsget.go @@ -35,6 +35,7 @@ func (o AnalyticsItemsGetOperationOptions) ToHeaders() *client.Headers { func (o AnalyticsItemsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AnalyticsItemsAPIsClient) AnalyticsItemsGet(ctx context.Context, id Prov var model ApplicationInsightsComponentAnalyticsItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemslist.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemslist.go index b7714cc6de7..989ab300f72 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemslist.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemslist.go @@ -36,6 +36,7 @@ func (o AnalyticsItemsListOperationOptions) ToHeaders() *client.Headers { func (o AnalyticsItemsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c AnalyticsItemsAPIsClient) AnalyticsItemsList(ctx context.Context, id Pro var model []ApplicationInsightsComponentAnalyticsItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsput.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsput.go index 27716237ac2..f718758bbee 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsput.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/method_analyticsitemsput.go @@ -34,6 +34,7 @@ func (o AnalyticsItemsPutOperationOptions) ToHeaders() *client.Headers { func (o AnalyticsItemsPutOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c AnalyticsItemsAPIsClient) AnalyticsItemsPut(ctx context.Context, id Prov var model ApplicationInsightsComponentAnalyticsItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/version.go b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/version.go index 0f318bbc6fd..4c20c0e3290 100644 --- a/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/analyticsitemsapis/version.go @@ -1,12 +1,10 @@ package analyticsitemsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/analyticsitemsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/analyticsitemsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/README.md index 264e5770760..869f6d2e948 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentannotationsapis` Documentation -The `componentannotationsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentannotationsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/client.go index f34201984ab..234b8a1f635 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/client.go @@ -15,7 +15,7 @@ type ComponentAnnotationsAPIsClient struct { } func NewComponentAnnotationsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentAnnotationsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentannotationsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentannotationsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentAnnotationsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_annotation.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_annotation.go index e5bbf32dceb..49d17a6ea75 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_annotation.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_annotation.go @@ -44,7 +44,7 @@ func ParseAnnotationID(input string) (*AnnotationId, error) { } id := AnnotationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAnnotationIDInsensitively(input string) (*AnnotationId, error) { } id := AnnotationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_component.go index 350d4265c7e..7a0d73d3c2a 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationscreate.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationscreate.go index 8d0118e1f0b..c4688ef8b02 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationscreate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationscreate.go @@ -50,7 +50,6 @@ func (c ComponentAnnotationsAPIsClient) AnnotationsCreate(ctx context.Context, i var model []Annotation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationsget.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationsget.go index 1e776b4a193..f6307c8265c 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationsget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationsget.go @@ -45,7 +45,6 @@ func (c ComponentAnnotationsAPIsClient) AnnotationsGet(ctx context.Context, id A var model []Annotation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationslist.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationslist.go index 8d51595c4c5..955f68ece8a 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationslist.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/method_annotationslist.go @@ -35,6 +35,7 @@ func (o AnnotationsListOperationOptions) ToHeaders() *client.Headers { func (o AnnotationsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ComponentAnnotationsAPIsClient) AnnotationsList(ctx context.Context, id var model AnnotationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/version.go index 5f8c3beac75..8b87aa14b2e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentannotationsapis/version.go @@ -1,12 +1,10 @@ package componentannotationsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentannotationsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentannotationsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/README.md index 94b5fc6568d..f43cf67afbe 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentapikeysapis` Documentation -The `componentapikeysapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentapikeysapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/client.go index d9a7ffe194f..4f792acc73d 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/client.go @@ -15,7 +15,7 @@ type ComponentApiKeysAPIsClient struct { } func NewComponentApiKeysAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentApiKeysAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentapikeysapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentapikeysapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentApiKeysAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_apikey.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_apikey.go index 080d5b4eb07..bbed1614829 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_apikey.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_apikey.go @@ -44,7 +44,7 @@ func ParseApiKeyID(input string) (*ApiKeyId, error) { } id := ApiKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiKeyIDInsensitively(input string) (*ApiKeyId, error) { } id := ApiKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_component.go index 65fbcc69c4a..fdca9df1aa5 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyscreate.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyscreate.go index 62719a7c6d2..897bbfc520c 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyscreate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyscreate.go @@ -50,7 +50,6 @@ func (c ComponentApiKeysAPIsClient) APIKeysCreate(ctx context.Context, id Compon var model ApplicationInsightsComponentAPIKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysdelete.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysdelete.go index d54a5ccf80e..526b90a2002 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysdelete.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysdelete.go @@ -45,7 +45,6 @@ func (c ComponentApiKeysAPIsClient) APIKeysDelete(ctx context.Context, id ApiKey var model ApplicationInsightsComponentAPIKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysget.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysget.go index 6a5b763060d..c64ffae85e0 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeysget.go @@ -45,7 +45,6 @@ func (c ComponentApiKeysAPIsClient) APIKeysGet(ctx context.Context, id ApiKeyId) var model ApplicationInsightsComponentAPIKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyslist.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyslist.go index c71e39f7058..7217a1531cd 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyslist.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/method_apikeyslist.go @@ -46,7 +46,6 @@ func (c ComponentApiKeysAPIsClient) APIKeysList(ctx context.Context, id Componen var model ApplicationInsightsComponentAPIKeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/version.go index fe56ab969ac..f9aad5c3b1c 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentapikeysapis/version.go @@ -1,12 +1,10 @@ package componentapikeysapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentapikeysapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentapikeysapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/README.md index 11a682453ec..213e38e6d80 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis` Documentation -The `componentcontinuousexportapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentcontinuousexportapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/client.go index 65c825a6fec..07f4635a277 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/client.go @@ -15,7 +15,7 @@ type ComponentContinuousExportAPIsClient struct { } func NewComponentContinuousExportAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentContinuousExportAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentcontinuousexportapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentcontinuousexportapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentContinuousExportAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_component.go index e155f1eb060..a4fc0174a82 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_exportconfiguration.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_exportconfiguration.go index 3608a9544e0..1ef9c9e03ce 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_exportconfiguration.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/id_exportconfiguration.go @@ -44,7 +44,7 @@ func ParseExportConfigurationID(input string) (*ExportConfigurationId, error) { } id := ExportConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExportConfigurationIDInsensitively(input string) (*ExportConfiguration } id := ExportConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationscreate.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationscreate.go index 1832e16403b..f41f4f0a549 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationscreate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationscreate.go @@ -50,7 +50,6 @@ func (c ComponentContinuousExportAPIsClient) ExportConfigurationsCreate(ctx cont var model []ApplicationInsightsComponentExportConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsdelete.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsdelete.go index e5be906d05f..0eaccb6ca08 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsdelete.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsdelete.go @@ -45,7 +45,6 @@ func (c ComponentContinuousExportAPIsClient) ExportConfigurationsDelete(ctx cont var model ApplicationInsightsComponentExportConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsget.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsget.go index 754057efa3f..ad384b4759e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsget.go @@ -45,7 +45,6 @@ func (c ComponentContinuousExportAPIsClient) ExportConfigurationsGet(ctx context var model ApplicationInsightsComponentExportConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationslist.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationslist.go index 36ffa6119bf..28ea6c7d4ab 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationslist.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationslist.go @@ -46,7 +46,6 @@ func (c ComponentContinuousExportAPIsClient) ExportConfigurationsList(ctx contex var model []ApplicationInsightsComponentExportConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsupdate.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsupdate.go index 7e97079fe1e..a22b5c4362a 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/method_exportconfigurationsupdate.go @@ -49,7 +49,6 @@ func (c ComponentContinuousExportAPIsClient) ExportConfigurationsUpdate(ctx cont var model ApplicationInsightsComponentExportConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/version.go index 0127f1bc0b0..d31d7e9d366 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentcontinuousexportapis/version.go @@ -1,12 +1,10 @@ package componentcontinuousexportapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentcontinuousexportapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentcontinuousexportapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/README.md index 104de71da4a..b4416147342 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis` Documentation -The `componentfeaturesandpricingapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentfeaturesandpricingapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/client.go index 6f0db30a637..68d4e276b78 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/client.go @@ -15,7 +15,7 @@ type ComponentFeaturesAndPricingAPIsClient struct { } func NewComponentFeaturesAndPricingAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentFeaturesAndPricingAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentfeaturesandpricingapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentfeaturesandpricingapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentFeaturesAndPricingAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/id_component.go index 87b57695534..35103fd9f37 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentavailablefeaturesget.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentavailablefeaturesget.go index bd3b23e5848..0cafb4f56e5 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentavailablefeaturesget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentavailablefeaturesget.go @@ -46,7 +46,6 @@ func (c ComponentFeaturesAndPricingAPIsClient) ComponentAvailableFeaturesGet(ctx var model ApplicationInsightsComponentAvailableFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesget.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesget.go index 853da03268c..e73c29f4036 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesget.go @@ -46,7 +46,6 @@ func (c ComponentFeaturesAndPricingAPIsClient) ComponentCurrentBillingFeaturesGe var model ApplicationInsightsComponentBillingFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesupdate.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesupdate.go index c95c2c1bfc8..dad7b412a2b 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentcurrentbillingfeaturesupdate.go @@ -50,7 +50,6 @@ func (c ComponentFeaturesAndPricingAPIsClient) ComponentCurrentBillingFeaturesUp var model ApplicationInsightsComponentBillingFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentfeaturecapabilitiesget.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentfeaturecapabilitiesget.go index ce2fbdfb386..dd799712b10 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentfeaturecapabilitiesget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentfeaturecapabilitiesget.go @@ -46,7 +46,6 @@ func (c ComponentFeaturesAndPricingAPIsClient) ComponentFeatureCapabilitiesGet(c var model ApplicationInsightsComponentFeatureCapabilities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentquotastatusget.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentquotastatusget.go index cb0b92f50a0..546cb4186e1 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentquotastatusget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/method_componentquotastatusget.go @@ -46,7 +46,6 @@ func (c ComponentFeaturesAndPricingAPIsClient) ComponentQuotaStatusGet(ctx conte var model ApplicationInsightsComponentQuotaStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/version.go index 75a93f50b45..c006bc9a568 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentfeaturesandpricingapis/version.go @@ -1,12 +1,10 @@ package componentfeaturesandpricingapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentfeaturesandpricingapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentfeaturesandpricingapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/README.md index cb31060c18d..877a2fd055e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis` Documentation -The `componentproactivedetectionapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentproactivedetectionapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/client.go index 231679061b0..b86fec30856 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/client.go @@ -15,7 +15,7 @@ type ComponentProactiveDetectionAPIsClient struct { } func NewComponentProactiveDetectionAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentProactiveDetectionAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentproactivedetectionapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentproactivedetectionapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentProactiveDetectionAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_component.go index e50388334eb..9d286df6331 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_proactivedetectionconfig.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_proactivedetectionconfig.go index 9a43379da8b..b95bba2d633 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_proactivedetectionconfig.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/id_proactivedetectionconfig.go @@ -44,7 +44,7 @@ func ParseProactiveDetectionConfigID(input string) (*ProactiveDetectionConfigId, } id := ProactiveDetectionConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProactiveDetectionConfigIDInsensitively(input string) (*ProactiveDetec } id := ProactiveDetectionConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsget.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsget.go index 68954d27451..6b25946de3b 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsget.go @@ -45,7 +45,6 @@ func (c ComponentProactiveDetectionAPIsClient) ProactiveDetectionConfigurationsG var model ApplicationInsightsComponentProactiveDetectionConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationslist.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationslist.go index fc754087240..83f0ff9e24e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationslist.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationslist.go @@ -46,7 +46,6 @@ func (c ComponentProactiveDetectionAPIsClient) ProactiveDetectionConfigurationsL var model []ApplicationInsightsComponentProactiveDetectionConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsupdate.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsupdate.go index 245415d073d..299b2526646 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/method_proactivedetectionconfigurationsupdate.go @@ -49,7 +49,6 @@ func (c ComponentProactiveDetectionAPIsClient) ProactiveDetectionConfigurationsU var model ApplicationInsightsComponentProactiveDetectionConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/version.go index 01ef8a89c61..3d8211b3fb3 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentproactivedetectionapis/version.go @@ -1,12 +1,10 @@ package componentproactivedetectionapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentproactivedetectionapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentproactivedetectionapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentsapis/README.md index 46e474dbffa..e8d05e1b809 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentsapis` Documentation -The `componentsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/client.go index 147a71cc0e1..2df65f4c67c 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/client.go @@ -15,7 +15,7 @@ type ComponentsAPIsClient struct { } func NewComponentsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/id_component.go index 2c6949e9152..85a41c7cf3e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/id_operation.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/id_operation.go index 715c3a61767..f6ad15eb5f8 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/id_operation.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/id_operation.go @@ -44,7 +44,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentscreateorupdate.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentscreateorupdate.go index c440ffa3afa..17059088e57 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentscreateorupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentscreateorupdate.go @@ -49,7 +49,6 @@ func (c ComponentsAPIsClient) ComponentsCreateOrUpdate(ctx context.Context, id C var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsget.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsget.go index d69f612ab9f..0ef6487a9f1 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsget.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsget.go @@ -45,7 +45,6 @@ func (c ComponentsAPIsClient) ComponentsGet(ctx context.Context, id ComponentId) var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsgetpurgestatus.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsgetpurgestatus.go index cf00bc8ad40..10e10aa93df 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsgetpurgestatus.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsgetpurgestatus.go @@ -45,7 +45,6 @@ func (c ComponentsAPIsClient) ComponentsGetPurgeStatus(ctx context.Context, id O var model ComponentPurgeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentspurge.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentspurge.go index 084ef9a550b..e25f69431ef 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentspurge.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentspurge.go @@ -50,7 +50,6 @@ func (c ComponentsAPIsClient) ComponentsPurge(ctx context.Context, id ComponentI var model ComponentPurgeResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsupdatetags.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsupdatetags.go index b428a674d9b..57ed36fced5 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsupdatetags.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/method_componentsupdatetags.go @@ -49,7 +49,6 @@ func (c ComponentsAPIsClient) ComponentsUpdateTags(ctx context.Context, id Compo var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentsapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentsapis/version.go index 7b1391a9f80..9e0acd81e39 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentsapis/version.go @@ -1,12 +1,10 @@ package componentsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/README.md b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/README.md index 7a7d7db05c1..afa86b48935 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis` Documentation -The `componentworkitemconfigsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `componentworkitemconfigsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/client.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/client.go index a1fbd6535e0..cd124589a9e 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/client.go @@ -15,7 +15,7 @@ type ComponentWorkItemConfigsAPIsClient struct { } func NewComponentWorkItemConfigsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentWorkItemConfigsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentworkitemconfigsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentworkitemconfigsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentWorkItemConfigsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_component.go index f0ccf87bdfc..446159f5711 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_workitemconfig.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_workitemconfig.go index fbb9296d33a..7d01035bc93 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_workitemconfig.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/id_workitemconfig.go @@ -44,7 +44,7 @@ func ParseWorkItemConfigID(input string) (*WorkItemConfigId, error) { } id := WorkItemConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkItemConfigIDInsensitively(input string) (*WorkItemConfigId, error) } id := WorkItemConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationscreate.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationscreate.go index d8e332a42d0..558b3f8207f 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationscreate.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationscreate.go @@ -50,7 +50,6 @@ func (c ComponentWorkItemConfigsAPIsClient) WorkItemConfigurationsCreate(ctx con var model WorkItemConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetdefault.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetdefault.go index 41182d7ccac..fbd7e80f5f1 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetdefault.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetdefault.go @@ -46,7 +46,6 @@ func (c ComponentWorkItemConfigsAPIsClient) WorkItemConfigurationsGetDefault(ctx var model WorkItemConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetitem.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetitem.go index 8c588ee1d13..0b7c7c9971d 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetitem.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsgetitem.go @@ -45,7 +45,6 @@ func (c ComponentWorkItemConfigsAPIsClient) WorkItemConfigurationsGetItem(ctx co var model WorkItemConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationslist.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationslist.go index 78e1fd70e4b..4b676110352 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationslist.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationslist.go @@ -46,7 +46,6 @@ func (c ComponentWorkItemConfigsAPIsClient) WorkItemConfigurationsList(ctx conte var model WorkItemConfigurationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsupdateitem.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsupdateitem.go index febd24df712..75a77d5c9fa 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsupdateitem.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/method_workitemconfigurationsupdateitem.go @@ -49,7 +49,6 @@ func (c ComponentWorkItemConfigsAPIsClient) WorkItemConfigurationsUpdateItem(ctx var model WorkItemConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/version.go b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/version.go index c199b88de89..5e63cc2aa09 100644 --- a/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/componentworkitemconfigsapis/version.go @@ -1,12 +1,10 @@ package componentworkitemconfigsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentworkitemconfigsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentworkitemconfigsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/README.md b/resource-manager/applicationinsights/2015-05-01/favoritesapis/README.md index ec669722703..9af01e036e1 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/favoritesapis` Documentation -The `favoritesapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `favoritesapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/client.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/client.go index f7114eb5282..831ea36fa98 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/client.go @@ -15,7 +15,7 @@ type FavoritesAPIsClient struct { } func NewFavoritesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*FavoritesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "favoritesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "favoritesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FavoritesAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_component.go index 5822c535300..eb54150ef0b 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_favorite.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_favorite.go index 3f5ec755089..0e7d2e64a99 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_favorite.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/id_favorite.go @@ -44,7 +44,7 @@ func ParseFavoriteID(input string) (*FavoriteId, error) { } id := FavoriteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFavoriteIDInsensitively(input string) (*FavoriteId, error) { } id := FavoriteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesadd.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesadd.go index 217c53592a2..21a3fae7279 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesadd.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesadd.go @@ -49,7 +49,6 @@ func (c FavoritesAPIsClient) FavoritesAdd(ctx context.Context, id FavoriteId, in var model ApplicationInsightsComponentFavorite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesget.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesget.go index 59d2383933e..cf9190e3084 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesget.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesget.go @@ -45,7 +45,6 @@ func (c FavoritesAPIsClient) FavoritesGet(ctx context.Context, id FavoriteId) (r var model ApplicationInsightsComponentFavorite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoriteslist.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoriteslist.go index 4e89b5e04f9..26b13eb1e68 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoriteslist.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoriteslist.go @@ -37,6 +37,7 @@ func (o FavoritesListOperationOptions) ToHeaders() *client.Headers { func (o FavoritesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c FavoritesAPIsClient) FavoritesList(ctx context.Context, id ComponentId, var model []ApplicationInsightsComponentFavorite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesupdate.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesupdate.go index c25dc59801e..3477e5781db 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/method_favoritesupdate.go @@ -49,7 +49,6 @@ func (c FavoritesAPIsClient) FavoritesUpdate(ctx context.Context, id FavoriteId, var model ApplicationInsightsComponentFavorite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/favoritesapis/version.go b/resource-manager/applicationinsights/2015-05-01/favoritesapis/version.go index 6e90d668398..ff2a3f062b6 100644 --- a/resource-manager/applicationinsights/2015-05-01/favoritesapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/favoritesapis/version.go @@ -1,12 +1,10 @@ package favoritesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/favoritesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/favoritesapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/README.md b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/README.md index 0e8e9c97488..524ecd7a3a3 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/myworkbooksapis` Documentation -The `myworkbooksapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `myworkbooksapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/client.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/client.go index 8af1b3c3096..57d144f2c75 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/client.go @@ -15,7 +15,7 @@ type MyworkbooksAPIsClient struct { } func NewMyworkbooksAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*MyworkbooksAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "myworkbooksapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "myworkbooksapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MyworkbooksAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/id_myworkbook.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/id_myworkbook.go index d3292348191..55c6b0f352b 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/id_myworkbook.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/id_myworkbook.go @@ -42,7 +42,7 @@ func ParseMyWorkbookID(input string) (*MyWorkbookId, error) { } id := MyWorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMyWorkbookIDInsensitively(input string) (*MyWorkbookId, error) { } id := MyWorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookscreateorupdate.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookscreateorupdate.go index f504e99a418..c357eb41144 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookscreateorupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookscreateorupdate.go @@ -50,7 +50,6 @@ func (c MyworkbooksAPIsClient) MyWorkbooksCreateOrUpdate(ctx context.Context, id var model MyWorkbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksget.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksget.go index 0654489d562..20be9f952fd 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksget.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksget.go @@ -45,7 +45,6 @@ func (c MyworkbooksAPIsClient) MyWorkbooksGet(ctx context.Context, id MyWorkbook var model MyWorkbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbyresourcegroup.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbyresourcegroup.go index aeec2429c45..61d950780b8 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbyresourcegroup.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbyresourcegroup.go @@ -37,6 +37,7 @@ func (o MyWorkbooksListByResourceGroupOperationOptions) ToHeaders() *client.Head func (o MyWorkbooksListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c MyworkbooksAPIsClient) MyWorkbooksListByResourceGroup(ctx context.Contex var model MyWorkbooksListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbysubscription.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbysubscription.go index b076d759196..9d2c5965906 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbysubscription.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbookslistbysubscription.go @@ -37,6 +37,7 @@ func (o MyWorkbooksListBySubscriptionOperationOptions) ToHeaders() *client.Heade func (o MyWorkbooksListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c MyworkbooksAPIsClient) MyWorkbooksListBySubscription(ctx context.Context var model MyWorkbooksListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksupdate.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksupdate.go index f7d144e9851..dbdea2abc35 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/method_myworkbooksupdate.go @@ -49,7 +49,6 @@ func (c MyworkbooksAPIsClient) MyWorkbooksUpdate(ctx context.Context, id MyWorkb var model MyWorkbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/version.go b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/version.go index d34f26fc3fc..ea9a7d1114a 100644 --- a/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/myworkbooksapis/version.go @@ -1,12 +1,10 @@ package myworkbooksapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/myworkbooksapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/myworkbooksapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/README.md b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/README.md index 198980d8308..0421cecbdc1 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis` Documentation -The `webtestlocationsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `webtestlocationsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/client.go b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/client.go index de18efcda60..4992d98c000 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/client.go @@ -15,7 +15,7 @@ type WebTestLocationsAPIsClient struct { } func NewWebTestLocationsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebTestLocationsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webtestlocationsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webtestlocationsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebTestLocationsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/id_component.go index 51df6b32c00..aa568cf0365 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/method_webtestlocationslist.go b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/method_webtestlocationslist.go index 388f4cdfb39..45ebc6483fd 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/method_webtestlocationslist.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/method_webtestlocationslist.go @@ -46,7 +46,6 @@ func (c WebTestLocationsAPIsClient) WebTestLocationsList(ctx context.Context, id var model ApplicationInsightsWebTestLocationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/version.go b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/version.go index 5b359d3815d..dc4ec86806b 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestlocationsapis/version.go @@ -1,12 +1,10 @@ package webtestlocationsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webtestlocationsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webtestlocationsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/README.md b/resource-manager/applicationinsights/2015-05-01/webtestsapis/README.md index 62768608c01..7786e2c303b 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/webtestsapis` Documentation -The `webtestsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `webtestsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/client.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/client.go index d02b81c051b..f0e74ab14c6 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/client.go @@ -15,7 +15,7 @@ type WebTestsAPIsClient struct { } func NewWebTestsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebTestsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webtestsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webtestsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebTestsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_component.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_component.go index 87377a21aef..30cad563670 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_component.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_webtest.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_webtest.go index a627914676f..810c2741492 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_webtest.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/id_webtest.go @@ -42,7 +42,7 @@ func ParseWebTestID(input string) (*WebTestId, error) { } id := WebTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWebTestIDInsensitively(input string) (*WebTestId, error) { } id := WebTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestscreateorupdate.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestscreateorupdate.go index 89b977e878c..928e69fc7f4 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestscreateorupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestscreateorupdate.go @@ -49,7 +49,6 @@ func (c WebTestsAPIsClient) WebTestsCreateOrUpdate(ctx context.Context, id WebTe var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsget.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsget.go index efcd6914f77..2dc18cada7f 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsget.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsget.go @@ -45,7 +45,6 @@ func (c WebTestsAPIsClient) WebTestsGet(ctx context.Context, id WebTestId) (resu var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsupdatetags.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsupdatetags.go index 5460e028150..d18413eddf6 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsupdatetags.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/method_webtestsupdatetags.go @@ -49,7 +49,6 @@ func (c WebTestsAPIsClient) WebTestsUpdateTags(ctx context.Context, id WebTestId var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/webtestsapis/version.go b/resource-manager/applicationinsights/2015-05-01/webtestsapis/version.go index f61c9a531af..557eac45d21 100644 --- a/resource-manager/applicationinsights/2015-05-01/webtestsapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/webtestsapis/version.go @@ -1,12 +1,10 @@ package webtestsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webtestsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webtestsapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/README.md b/resource-manager/applicationinsights/2015-05-01/workbooksapis/README.md index 7d007e63656..4c8b9010d26 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/README.md +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2015-05-01/workbooksapis` Documentation -The `workbooksapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2015-05-01`). +The `workbooksapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2015-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/client.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/client.go index 312471e7f5c..e76d33ba61d 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/client.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/client.go @@ -15,7 +15,7 @@ type WorkbooksAPIsClient struct { } func NewWorkbooksAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkbooksAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workbooksapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workbooksapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkbooksAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/id_workbook.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/id_workbook.go index 3418ec70669..9ae1e2b7200 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/id_workbook.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/id_workbook.go @@ -42,7 +42,7 @@ func ParseWorkbookID(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkbookIDInsensitively(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookscreateorupdate.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookscreateorupdate.go index 46ff16de3dd..8c25c89165b 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookscreateorupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookscreateorupdate.go @@ -50,7 +50,6 @@ func (c WorkbooksAPIsClient) WorkbooksCreateOrUpdate(ctx context.Context, id Wor var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksget.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksget.go index a5bd6035d80..508b6bededc 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksget.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksget.go @@ -45,7 +45,6 @@ func (c WorkbooksAPIsClient) WorkbooksGet(ctx context.Context, id WorkbookId) (r var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookslistbyresourcegroup.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookslistbyresourcegroup.go index 602c55befe7..5d9e1452d53 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookslistbyresourcegroup.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbookslistbyresourcegroup.go @@ -37,6 +37,7 @@ func (o WorkbooksListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o WorkbooksListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c WorkbooksAPIsClient) WorkbooksListByResourceGroup(ctx context.Context, i var model WorkbooksListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksupdate.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksupdate.go index 87daf81c706..f2dc735385e 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksupdate.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/method_workbooksupdate.go @@ -49,7 +49,6 @@ func (c WorkbooksAPIsClient) WorkbooksUpdate(ctx context.Context, id WorkbookId, var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2015-05-01/workbooksapis/version.go b/resource-manager/applicationinsights/2015-05-01/workbooksapis/version.go index 274fa4e4deb..c09f55b8b81 100644 --- a/resource-manager/applicationinsights/2015-05-01/workbooksapis/version.go +++ b/resource-manager/applicationinsights/2015-05-01/workbooksapis/version.go @@ -1,12 +1,10 @@ package workbooksapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workbooksapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workbooksapis/2015-05-01" } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/README.md b/resource-manager/applicationinsights/2020-02-02/componentsapis/README.md index 39f9fa5483c..d60bc7a7e95 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/README.md +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-02-02/componentsapis` Documentation -The `componentsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2020-02-02`). +The `componentsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2020-02-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/client.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/client.go index 147a71cc0e1..2df65f4c67c 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/client.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/client.go @@ -15,7 +15,7 @@ type ComponentsAPIsClient struct { } func NewComponentsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/id_component.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/id_component.go index 2c6949e9152..85a41c7cf3e 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/id_component.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/id_operation.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/id_operation.go index 715c3a61767..f6ad15eb5f8 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/id_operation.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/id_operation.go @@ -44,7 +44,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentscreateorupdate.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentscreateorupdate.go index c440ffa3afa..17059088e57 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentscreateorupdate.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentscreateorupdate.go @@ -49,7 +49,6 @@ func (c ComponentsAPIsClient) ComponentsCreateOrUpdate(ctx context.Context, id C var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsget.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsget.go index d69f612ab9f..0ef6487a9f1 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsget.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsget.go @@ -45,7 +45,6 @@ func (c ComponentsAPIsClient) ComponentsGet(ctx context.Context, id ComponentId) var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsgetpurgestatus.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsgetpurgestatus.go index cf00bc8ad40..10e10aa93df 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsgetpurgestatus.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsgetpurgestatus.go @@ -45,7 +45,6 @@ func (c ComponentsAPIsClient) ComponentsGetPurgeStatus(ctx context.Context, id O var model ComponentPurgeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentspurge.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentspurge.go index 084ef9a550b..e25f69431ef 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentspurge.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentspurge.go @@ -50,7 +50,6 @@ func (c ComponentsAPIsClient) ComponentsPurge(ctx context.Context, id ComponentI var model ComponentPurgeResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsupdatetags.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsupdatetags.go index b428a674d9b..57ed36fced5 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsupdatetags.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/method_componentsupdatetags.go @@ -49,7 +49,6 @@ func (c ComponentsAPIsClient) ComponentsUpdateTags(ctx context.Context, id Compo var model ApplicationInsightsComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-02-02/componentsapis/version.go b/resource-manager/applicationinsights/2020-02-02/componentsapis/version.go index fa4e38cbec4..30bd4303614 100644 --- a/resource-manager/applicationinsights/2020-02-02/componentsapis/version.go +++ b/resource-manager/applicationinsights/2020-02-02/componentsapis/version.go @@ -1,12 +1,10 @@ package componentsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-02-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentsapis/2020-02-02" } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/README.md b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/README.md index 77ba6f075fb..d1235e11dc3 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/README.md +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis` Documentation -The `workbooktemplatesapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2020-11-20`). +The `workbooktemplatesapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2020-11-20`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/client.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/client.go index 9589a767cab..3790f664047 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/client.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/client.go @@ -15,7 +15,7 @@ type WorkbookTemplatesAPIsClient struct { } func NewWorkbookTemplatesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkbookTemplatesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workbooktemplatesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workbooktemplatesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkbookTemplatesAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go index f2b42f2ce31..f377c078199 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/id_workbooktemplate.go @@ -42,7 +42,7 @@ func ParseWorkbookTemplateID(input string) (*WorkbookTemplateId, error) { } id := WorkbookTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkbookTemplateIDInsensitively(input string) (*WorkbookTemplateId, er } id := WorkbookTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatescreateorupdate.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatescreateorupdate.go index 5ab81c63dfb..590471935df 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatescreateorupdate.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatescreateorupdate.go @@ -50,7 +50,6 @@ func (c WorkbookTemplatesAPIsClient) WorkbookTemplatesCreateOrUpdate(ctx context var model WorkbookTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesget.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesget.go index 6ebb3801aba..181faa28660 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesget.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesget.go @@ -45,7 +45,6 @@ func (c WorkbookTemplatesAPIsClient) WorkbookTemplatesGet(ctx context.Context, i var model WorkbookTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplateslistbyresourcegroup.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplateslistbyresourcegroup.go index cd4e19b60ce..7cf6124cc8e 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplateslistbyresourcegroup.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplateslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c WorkbookTemplatesAPIsClient) WorkbookTemplatesListByResourceGroup(ctx co var model WorkbookTemplatesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesupdate.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesupdate.go index 58502aeb137..03fdebd0c77 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesupdate.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/method_workbooktemplatesupdate.go @@ -49,7 +49,6 @@ func (c WorkbookTemplatesAPIsClient) WorkbookTemplatesUpdate(ctx context.Context var model WorkbookTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/version.go b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/version.go index abd25f3cdc9..cdb2c908449 100644 --- a/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/version.go +++ b/resource-manager/applicationinsights/2020-11-20/workbooktemplatesapis/version.go @@ -1,12 +1,10 @@ package workbooktemplatesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-11-20" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workbooktemplatesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workbooktemplatesapis/2020-11-20" } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/README.md b/resource-manager/applicationinsights/2022-04-01/workbooksapis/README.md index 1a12dea582c..36bb243025e 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/README.md +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-04-01/workbooksapis` Documentation -The `workbooksapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2022-04-01`). +The `workbooksapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/client.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/client.go index 312471e7f5c..e76d33ba61d 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/client.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/client.go @@ -15,7 +15,7 @@ type WorkbooksAPIsClient struct { } func NewWorkbooksAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkbooksAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workbooksapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workbooksapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkbooksAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go index 05e8b8de480..0b329f5aee5 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go index 3418ec70669..9ae1e2b7200 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/id_workbook.go @@ -42,7 +42,7 @@ func ParseWorkbookID(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkbookIDInsensitively(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookscreateorupdate.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookscreateorupdate.go index a21aa98caaf..8e133c9cd7a 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookscreateorupdate.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookscreateorupdate.go @@ -34,6 +34,7 @@ func (o WorkbooksCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkbooksAPIsClient) WorkbooksCreateOrUpdate(ctx context.Context, id Wor var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksget.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksget.go index 3ae99a9ceb0..7f769b06065 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksget.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksget.go @@ -34,6 +34,7 @@ func (o WorkbooksGetOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WorkbooksAPIsClient) WorkbooksGet(ctx context.Context, id WorkbookId, op var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbyresourcegroup.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbyresourcegroup.go index e379fafe14a..ba3a102fdde 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbyresourcegroup.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbyresourcegroup.go @@ -43,6 +43,7 @@ func (o WorkbooksListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o WorkbooksListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbysubscription.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbysubscription.go index 6dcbaff5444..6b2604b5e0e 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbysubscription.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbookslistbysubscription.go @@ -42,6 +42,7 @@ func (o WorkbooksListBySubscriptionOperationOptions) ToHeaders() *client.Headers func (o WorkbooksListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksrevisionget.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksrevisionget.go index 726d7508074..b2dd2d6d727 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksrevisionget.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksrevisionget.go @@ -45,7 +45,6 @@ func (c WorkbooksAPIsClient) WorkbooksRevisionGet(ctx context.Context, id Revisi var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksupdate.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksupdate.go index 0fc742e12f7..e3f0294a6de 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksupdate.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/method_workbooksupdate.go @@ -34,6 +34,7 @@ func (o WorkbooksUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkbooksAPIsClient) WorkbooksUpdate(ctx context.Context, id WorkbookId, var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-04-01/workbooksapis/version.go b/resource-manager/applicationinsights/2022-04-01/workbooksapis/version.go index 0a9c841b785..12c4b3665a7 100644 --- a/resource-manager/applicationinsights/2022-04-01/workbooksapis/version.go +++ b/resource-manager/applicationinsights/2022-04-01/workbooksapis/version.go @@ -1,12 +1,10 @@ package workbooksapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workbooksapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workbooksapis/2022-04-01" } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/README.md b/resource-manager/applicationinsights/2022-06-15/webtestsapis/README.md index cec749062ad..0a375c583bd 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/README.md +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2022-06-15/webtestsapis` Documentation -The `webtestsapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2022-06-15`). +The `webtestsapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/client.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/client.go index d02b81c051b..f0e74ab14c6 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/client.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/client.go @@ -15,7 +15,7 @@ type WebTestsAPIsClient struct { } func NewWebTestsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebTestsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webtestsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webtestsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebTestsAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go index 87377a21aef..30cad563670 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_component.go @@ -42,7 +42,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go index a627914676f..810c2741492 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/id_webtest.go @@ -42,7 +42,7 @@ func ParseWebTestID(input string) (*WebTestId, error) { } id := WebTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWebTestIDInsensitively(input string) (*WebTestId, error) { } id := WebTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestscreateorupdate.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestscreateorupdate.go index 89b977e878c..928e69fc7f4 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestscreateorupdate.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestscreateorupdate.go @@ -49,7 +49,6 @@ func (c WebTestsAPIsClient) WebTestsCreateOrUpdate(ctx context.Context, id WebTe var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsget.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsget.go index efcd6914f77..2dc18cada7f 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsget.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsget.go @@ -45,7 +45,6 @@ func (c WebTestsAPIsClient) WebTestsGet(ctx context.Context, id WebTestId) (resu var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsupdatetags.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsupdatetags.go index 5460e028150..d18413eddf6 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsupdatetags.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/method_webtestsupdatetags.go @@ -49,7 +49,6 @@ func (c WebTestsAPIsClient) WebTestsUpdateTags(ctx context.Context, id WebTestId var model WebTest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2022-06-15/webtestsapis/version.go b/resource-manager/applicationinsights/2022-06-15/webtestsapis/version.go index 77e25889328..84eecba6528 100644 --- a/resource-manager/applicationinsights/2022-06-15/webtestsapis/version.go +++ b/resource-manager/applicationinsights/2022-06-15/webtestsapis/version.go @@ -1,12 +1,10 @@ package webtestsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webtestsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webtestsapis/2022-06-15" } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/README.md b/resource-manager/applicationinsights/2023-06-01/workbooksapis/README.md index fc7d9e69216..48d0509c1d9 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/README.md +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/applicationinsights/2023-06-01/workbooksapis` Documentation -The `workbooksapis` SDK allows for interaction with the Azure Resource Manager Service `applicationinsights` (API Version `2023-06-01`). +The `workbooksapis` SDK allows for interaction with Azure Resource Manager `applicationinsights` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/client.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/client.go index 312471e7f5c..e76d33ba61d 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/client.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/client.go @@ -15,7 +15,7 @@ type WorkbooksAPIsClient struct { } func NewWorkbooksAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkbooksAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workbooksapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workbooksapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkbooksAPIsClient: %+v", err) } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_revision.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_revision.go index 05e8b8de480..0b329f5aee5 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_revision.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_workbook.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_workbook.go index 3418ec70669..9ae1e2b7200 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_workbook.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/id_workbook.go @@ -42,7 +42,7 @@ func ParseWorkbookID(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkbookIDInsensitively(input string) (*WorkbookId, error) { } id := WorkbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookscreateorupdate.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookscreateorupdate.go index a21aa98caaf..8e133c9cd7a 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookscreateorupdate.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookscreateorupdate.go @@ -34,6 +34,7 @@ func (o WorkbooksCreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkbooksAPIsClient) WorkbooksCreateOrUpdate(ctx context.Context, id Wor var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksget.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksget.go index 3ae99a9ceb0..7f769b06065 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksget.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksget.go @@ -34,6 +34,7 @@ func (o WorkbooksGetOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WorkbooksAPIsClient) WorkbooksGet(ctx context.Context, id WorkbookId, op var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbyresourcegroup.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbyresourcegroup.go index e379fafe14a..ba3a102fdde 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbyresourcegroup.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbyresourcegroup.go @@ -43,6 +43,7 @@ func (o WorkbooksListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o WorkbooksListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbysubscription.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbysubscription.go index 6dcbaff5444..6b2604b5e0e 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbysubscription.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbookslistbysubscription.go @@ -42,6 +42,7 @@ func (o WorkbooksListBySubscriptionOperationOptions) ToHeaders() *client.Headers func (o WorkbooksListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksrevisionget.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksrevisionget.go index 726d7508074..b2dd2d6d727 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksrevisionget.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksrevisionget.go @@ -45,7 +45,6 @@ func (c WorkbooksAPIsClient) WorkbooksRevisionGet(ctx context.Context, id Revisi var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksupdate.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksupdate.go index 0fc742e12f7..e3f0294a6de 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksupdate.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/method_workbooksupdate.go @@ -34,6 +34,7 @@ func (o WorkbooksUpdateOperationOptions) ToHeaders() *client.Headers { func (o WorkbooksUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c WorkbooksAPIsClient) WorkbooksUpdate(ctx context.Context, id WorkbookId, var model Workbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/applicationinsights/2023-06-01/workbooksapis/version.go b/resource-manager/applicationinsights/2023-06-01/workbooksapis/version.go index 721c9019bca..ab75662c619 100644 --- a/resource-manager/applicationinsights/2023-06-01/workbooksapis/version.go +++ b/resource-manager/applicationinsights/2023-06-01/workbooksapis/version.go @@ -1,12 +1,10 @@ package workbooksapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workbooksapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workbooksapis/2023-06-01" } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/README.md b/resource-manager/appplatform/2023-09-01-preview/appplatform/README.md index 537bdf656a3..70f3d1f5097 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/README.md +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-09-01-preview/appplatform` Documentation -The `appplatform` SDK allows for interaction with the Azure Resource Manager Service `appplatform` (API Version `2023-09-01-preview`). +The `appplatform` SDK allows for interaction with Azure Resource Manager `appplatform` (API Version `2023-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/client.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/client.go index c09305ed371..8165dad21d6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/client.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/client.go @@ -15,7 +15,7 @@ type AppPlatformClient struct { } func NewAppPlatformClientWithBaseURI(sdkApi sdkEnv.Api) (*AppPlatformClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appplatform", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appplatform", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppPlatformClient: %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go index 8657bb20f0b..ea4ae1cb3e3 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_agentpool.go @@ -46,7 +46,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go index 077d4c0ff91..3246ae7bb6c 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportal.go @@ -44,7 +44,7 @@ func ParseApiPortalID(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiPortalIDInsensitively(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go index c527abe1118..b27652c23b3 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apiportaldomain.go @@ -46,7 +46,7 @@ func ParseApiPortalDomainID(input string) (*ApiPortalDomainId, error) { } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiPortalDomainIDInsensitively(input string) (*ApiPortalDomainId, erro } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go index 208aa38a0dd..ca5bfe1afac 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_apm.go @@ -44,7 +44,7 @@ func ParseApmID(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApmIDInsensitively(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go index 13d7ea03e3e..b9bb63a2c7f 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_app.go @@ -44,7 +44,7 @@ func ParseAppID(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppIDInsensitively(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go index 941f5675086..e13cd61ff90 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationaccelerator.go @@ -44,7 +44,7 @@ func ParseApplicationAcceleratorID(input string) (*ApplicationAcceleratorId, err } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationAcceleratorIDInsensitively(input string) (*ApplicationAccel } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go index 66c37ac2975..22cc26b6845 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_applicationliveview.go @@ -44,7 +44,7 @@ func ParseApplicationLiveViewID(input string) (*ApplicationLiveViewId, error) { } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationLiveViewIDInsensitively(input string) (*ApplicationLiveView } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go index cf5fa9d9c71..69548c11615 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_binding.go @@ -46,7 +46,7 @@ func ParseBindingID(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBindingIDInsensitively(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go index cacb0f627c0..a436d8c291c 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_build.go @@ -46,7 +46,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go index c12dfe30877..81203fd2b64 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_builder.go @@ -46,7 +46,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go index 35d763e15e1..9c15e964d26 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildpackbinding.go @@ -48,7 +48,7 @@ func ParseBuildPackBindingID(input string) (*BuildPackBindingId, error) { } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBuildPackBindingIDInsensitively(input string) (*BuildPackBindingId, er } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go index ca1f998143e..3189799970b 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_buildservice.go @@ -44,7 +44,7 @@ func ParseBuildServiceID(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildServiceIDInsensitively(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go index 30f1315f6b3..f53248bd3da 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go index c9c6626d10c..e236ff68d6d 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_configurationservice.go @@ -44,7 +44,7 @@ func ParseConfigurationServiceID(input string) (*ConfigurationServiceId, error) } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationServiceIDInsensitively(input string) (*ConfigurationServi } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go index 538c5498546..8414f03d1c2 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_containerregistry.go @@ -44,7 +44,7 @@ func ParseContainerRegistryID(input string) (*ContainerRegistryId, error) { } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerRegistryIDInsensitively(input string) (*ContainerRegistryId, } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go index 5e78cd284e3..0617f545463 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_customizedaccelerator.go @@ -46,7 +46,7 @@ func ParseCustomizedAcceleratorID(input string) (*CustomizedAcceleratorId, error } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCustomizedAcceleratorIDInsensitively(input string) (*CustomizedAcceler } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go index 90d1ecacedf..7e7897fa577 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go index b6214d25617..427096fb70f 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_devtoolportal.go @@ -44,7 +44,7 @@ func ParseDevToolPortalID(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevToolPortalIDInsensitively(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go index 51040d0f1a9..55595bf9d3a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_domain.go @@ -46,7 +46,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go index b16062215f6..579edf57b79 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go index c837a61f60d..a83fc1633be 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_gatewaydomain.go @@ -46,7 +46,7 @@ func ParseGatewayDomainID(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayDomainIDInsensitively(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go index 95cf5e0a899..1bbddd98255 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go index 735e484e767..3b25e9ca790 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_predefinedaccelerator.go @@ -46,7 +46,7 @@ func ParsePredefinedAcceleratorID(input string) (*PredefinedAcceleratorId, error } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePredefinedAcceleratorIDInsensitively(input string) (*PredefinedAcceler } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go index f39e5846020..368a6564fca 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_result.go @@ -48,7 +48,7 @@ func ParseResultID(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseResultIDInsensitively(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go index 8918428a2ee..e5ab240721b 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_routeconfig.go @@ -46,7 +46,7 @@ func ParseRouteConfigID(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteConfigIDInsensitively(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go index 6d5aee9654a..a6c4783abfb 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_serviceregistry.go @@ -44,7 +44,7 @@ func ParseServiceRegistryID(input string) (*ServiceRegistryId, error) { } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceRegistryIDInsensitively(input string) (*ServiceRegistryId, erro } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go index ccbfc4c15c8..06897b787df 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go index 4b908c8abb5..989d8e2fee7 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedbuildpack.go @@ -46,7 +46,7 @@ func ParseSupportedBuildPackID(input string) (*SupportedBuildPackId, error) { } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedBuildPackIDInsensitively(input string) (*SupportedBuildPackId } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go index 1329f39d804..395a06752cb 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/id_supportedstack.go @@ -46,7 +46,7 @@ func ParseSupportedStackID(input string) (*SupportedStackId, error) { } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedStackIDInsensitively(input string) (*SupportedStackId, error) } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalcustomdomainsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalcustomdomainsget.go index 31162b86c76..ee2bbd322c2 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalcustomdomainsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalcustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalCustomDomainsGet(ctx context.Context, id Api var model ApiPortalCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsget.go index 674cb161de0..9dcaaa30ad8 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalsGet(ctx context.Context, id ApiPortalId) (r var model ApiPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsvalidatedomain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsvalidatedomain.go index 9baf66398c9..18b39e239aa 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsvalidatedomain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apiportalsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ApiPortalsValidateDomain(ctx context.Context, id ApiP var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmsget.go index 0f0d937defc..f467f8eaaf3 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApmsGet(ctx context.Context, id ApmId) (result ApmsGe var model ApmResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmslistsecretkeys.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmslistsecretkeys.go index 74cf12911d4..5bd8219bd7a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmslistsecretkeys.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_apmslistsecretkeys.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ApmsListSecretKeys(ctx context.Context, id ApmId) (re var model ApmSecretKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationacceleratorsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationacceleratorsget.go index 809af6b1b2e..4b328230326 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationacceleratorsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationAcceleratorsGet(ctx context.Context, id Ap var model ApplicationAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationliveviewsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationliveviewsget.go index 833ed7c87a8..2830fd1fdba 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationliveviewsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_applicationliveviewsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationLiveViewsGet(ctx context.Context, id Appli var model ApplicationLiveViewResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsget.go index 4a53dd22ea4..3724e37ca47 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsget.go @@ -34,6 +34,7 @@ func (o AppsGetOperationOptions) ToHeaders() *client.Headers { func (o AppsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AppPlatformClient) AppsGet(ctx context.Context, id AppId, options AppsGe var model AppResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsgetresourceuploadurl.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsgetresourceuploadurl.go index 3893d74b4d0..6e1b2cd1650 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsgetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsgetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) AppsGetResourceUploadUrl(ctx context.Context, id AppI var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsvalidatedomain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsvalidatedomain.go index 012f55c15f3..2e32bcfc251 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsvalidatedomain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_appsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) AppsValidateDomain(ctx context.Context, id AppId, inp var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_bindingsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_bindingsget.go index d2f0b1c572d..fd7934dd484 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_bindingsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_bindingsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BindingsGet(ctx context.Context, id BindingId) (resul var model BindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildpackbindingget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildpackbindingget.go index 46c526b6d26..9cb2a5754d5 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildpackbindingget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildpackbindingget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildpackBindingGet(ctx context.Context, id BuildPack var model BuildpackBindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildserviceagentpoolget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildserviceagentpoolget.go index 022f16023e8..5c09fcc1136 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildserviceagentpoolget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildserviceagentpoolget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceAgentPoolGet(ctx context.Context, id Agen var model BuildServiceAgentPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderget.go index 6970226423e..fc88a1423e7 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceBuilderGet(ctx context.Context, id Builde var model BuilderResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderlistdeployments.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderlistdeployments.go index 3bb23d15783..28662e9243e 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderlistdeployments.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicebuilderlistdeployments.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceBuilderListDeployments(ctx context.Contex var model DeploymentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicecreateorupdatebuild.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicecreateorupdatebuild.go index 81c5ebabc62..c8b22694446 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicecreateorupdatebuild.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicecreateorupdatebuild.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) BuildServiceCreateOrUpdateBuild(ctx context.Context, var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuild.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuild.go index 70c3079f914..3c1248a1c36 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuild.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuild.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuild(ctx context.Context, id BuildId) var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresult.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresult.go index 2a378c0c67c..d9cbe5b06af 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresult.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresult.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResult(ctx context.Context, id Re var model BuildResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresultlog.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresultlog.go index 465da5d9a2a..f025aeac949 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresultlog.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildresultlog.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResultLog(ctx context.Context, id var model BuildResultLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildservice.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildservice.go index 97fd62680cb..03017c3fdd8 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildservice.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetbuildservice.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildService(ctx context.Context, id B var model BuildService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetresourceuploadurl.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetresourceuploadurl.go index c6ebe1d77af..9708b701e43 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetResourceUploadUrl(ctx context.Context, var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go index 724fbad337a..e1f390735d4 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedBuildpack(ctx context.Context var model SupportedBuildpackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedstack.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedstack.go index 63d59a7779e..6c8f254c7d1 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedstack.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_buildservicegetsupportedstack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedStack(ctx context.Context, id var model SupportedStackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_certificatesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_certificatesget.go index f7bef5eb376..402d3daf21f 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_certificatesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_certificatesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CertificatesGet(ctx context.Context, id CertificateId var model CertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configserversget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configserversget.go index 370c6ca9d47..9d926525ebb 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configserversget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ConfigServersGet(ctx context.Context, id commonids.Sp var model ConfigServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configurationservicesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configurationservicesget.go index 73009c6355e..6182cda68a0 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configurationservicesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_configurationservicesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ConfigurationServicesGet(ctx context.Context, id Conf var model ConfigurationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_containerregistriesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_containerregistriesget.go index 0854da5f8aa..721f5cf55c9 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_containerregistriesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_containerregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ContainerRegistriesGet(ctx context.Context, id Contai var model ContainerRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customdomainsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customdomainsget.go index 4ac146fcd80..5029cb05619 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customdomainsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomDomainsGet(ctx context.Context, id DomainId) (r var model CustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsget.go index 93096eee0fa..7197ce868af 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsGet(ctx context.Context, id Cus var model CustomizedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsvalidate.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsvalidate.go index 9a390a687ea..c45b6778fbd 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsvalidate.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_customizedacceleratorsvalidate.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsValidate(ctx context.Context, i var model CustomizedAcceleratorValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsget.go index 41f7475d8cc..cfbf6da94b6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DeploymentsGet(ctx context.Context, id DeploymentId) var model DeploymentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetlogfileurl.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetlogfileurl.go index a4771e38445..674afbef641 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetlogfileurl.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetlogfileurl.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) DeploymentsGetLogFileUrl(ctx context.Context, id Depl var model LogFileUrlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go index b319dd43fe6..6a8077b27f1 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) DeploymentsGetRemoteDebuggingConfig(ctx context.Conte var model RemoteDebugging result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslist.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslist.go index 9f59eb8df5c..c0f57dc7744 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslist.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslist.go @@ -40,6 +40,7 @@ func (o DeploymentsListOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslistforcluster.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslistforcluster.go index 2496ba5da3f..9e8454491d5 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslistforcluster.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_deploymentslistforcluster.go @@ -41,6 +41,7 @@ func (o DeploymentsListForClusterOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListForClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_devtoolportalsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_devtoolportalsget.go index c3d25c11e37..6684c6d0332 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_devtoolportalsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_devtoolportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DevToolPortalsGet(ctx context.Context, id DevToolPort var model DevToolPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_eurekaserversget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_eurekaserversget.go index f18f93980c6..18a319e61bb 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_eurekaserversget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_eurekaserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) EurekaServersGet(ctx context.Context, id commonids.Sp var model EurekaServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaycustomdomainsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaycustomdomainsget.go index e5ffc650511..64454f48288 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaycustomdomainsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaycustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayCustomDomainsGet(ctx context.Context, id Gatew var model GatewayCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayrouteconfigsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayrouteconfigsget.go index 961b30529c3..80376391849 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayrouteconfigsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayrouteconfigsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayRouteConfigsGet(ctx context.Context, id RouteC var model GatewayRouteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysget.go index 30d694c4e51..51ceea59d54 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewaysGet(ctx context.Context, id GatewayId) (resul var model GatewayResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayslistenvsecrets.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayslistenvsecrets.go index d7b9e50cd83..78b159baeab 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayslistenvsecrets.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewayslistenvsecrets.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) GatewaysListEnvSecrets(ctx context.Context, id Gatewa var model map[string]string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysvalidatedomain.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysvalidatedomain.go index c1b00963a14..dbac66d1ce6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysvalidatedomain.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_gatewaysvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) GatewaysValidateDomain(ctx context.Context, id Gatewa var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_monitoringsettingsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_monitoringsettingsget.go index 71aa5c6c5a1..0dcb42750cc 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_monitoringsettingsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_monitoringsettingsget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) MonitoringSettingsGet(ctx context.Context, id commoni var model MonitoringSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_predefinedacceleratorsget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_predefinedacceleratorsget.go index 2ed06cace03..91ada78ddf1 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_predefinedacceleratorsget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_predefinedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) PredefinedAcceleratorsGet(ctx context.Context, id Pre var model PredefinedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_runtimeversionslistruntimeversions.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_runtimeversionslistruntimeversions.go index fe9f0c3f689..81408df96f0 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_runtimeversionslistruntimeversions.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_runtimeversionslistruntimeversions.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) RuntimeVersionsListRuntimeVersions(ctx context.Contex var model AvailableRuntimeVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceregistriesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceregistriesget.go index 60b90a94cea..0259bd789c9 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceregistriesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ServiceRegistriesGet(ctx context.Context, id ServiceR var model ServiceRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceschecknameavailability.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceschecknameavailability.go index aca0efe340d..c43d41eefa6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceschecknameavailability.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ServicesCheckNameAvailability(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesenabletestendpoint.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesenabletestendpoint.go index 23adca57b75..1df588bc859 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesenabletestendpoint.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesenabletestendpoint.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesEnableTestEndpoint(ctx context.Context, id co var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesget.go index 31ccba1ca6e..cc3d2a0cae2 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesget.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ServicesGet(ctx context.Context, id commonids.SpringC var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslistgloballyenabledapms.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslistgloballyenabledapms.go index 6dd339d44c9..262011227cf 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslistgloballyenabledapms.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslistgloballyenabledapms.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListGloballyEnabledApms(ctx context.Context, var model GloballyEnabledApms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslisttestkeys.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslisttestkeys.go index 197dd28a1c8..7ccfa6d9aa4 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslisttestkeys.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_serviceslisttestkeys.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListTestKeys(ctx context.Context, id commonid var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesregeneratetestkey.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesregeneratetestkey.go index 664a0e6a4cc..f83c2cf2c59 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesregeneratetestkey.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_servicesregeneratetestkey.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) ServicesRegenerateTestKey(ctx context.Context, id com var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_storagesget.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_storagesget.go index 6623c2f57ef..8e3bc1508f9 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/method_storagesget.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/method_storagesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) StoragesGet(ctx context.Context, id StorageId) (resul var model StorageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorauthsetting.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorauthsetting.go index 9f035ed61a3..27997c20e3f 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorauthsetting.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorauthsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AcceleratorAuthSetting interface { + AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl } -// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AcceleratorAuthSetting = BaseAcceleratorAuthSettingImpl{} + +type BaseAcceleratorAuthSettingImpl struct { + AuthType string `json:"authType"` +} + +func (s BaseAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s +} + +var _ AcceleratorAuthSetting = RawAcceleratorAuthSettingImpl{} + +// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAcceleratorAuthSettingImpl struct { - Type string - Values map[string]interface{} + acceleratorAuthSetting BaseAcceleratorAuthSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s.acceleratorAuthSetting } -func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { +func UnmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAut return out, nil } - out := RawAcceleratorAuthSettingImpl{ - Type: value, - Values: temp, + var parent BaseAcceleratorAuthSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAcceleratorAuthSettingImpl: %+v", err) } - return out, nil + + return RawAcceleratorAuthSettingImpl{ + acceleratorAuthSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorbasicauthsetting.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorbasicauthsetting.go index c26e9b76009..c8a4ac5dfdf 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorbasicauthsetting.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorbasicauthsetting.go @@ -16,6 +16,14 @@ type AcceleratorBasicAuthSetting struct { Username string `json:"username"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorBasicAuthSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorBasicAuthSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorBasicAuthSetting: %+v", err) } + decoded["authType"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorgitrepository.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorgitrepository.go index c5384079853..b0f8950cc0e 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorgitrepository.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorgitrepository.go @@ -40,7 +40,7 @@ func (s *AcceleratorGitRepository) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authSetting"]; ok { - impl, err := unmarshalAcceleratorAuthSettingImplementation(v) + impl, err := UnmarshalAcceleratorAuthSettingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthSetting' for 'AcceleratorGitRepository': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorpublicsetting.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorpublicsetting.go index 8f2526b39b9..ceddf807fd1 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorpublicsetting.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorpublicsetting.go @@ -14,6 +14,14 @@ type AcceleratorPublicSetting struct { CaCertResourceId *string `json:"caCertResourceId,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorPublicSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorPublicSetting{} @@ -27,9 +35,10 @@ func (s AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorPublicSetting: %+v", err) } + decoded["authType"] = "Public" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorsshsetting.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorsshsetting.go index 257c4615505..9206fb45e17 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorsshsetting.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_acceleratorsshsetting.go @@ -16,6 +16,14 @@ type AcceleratorSshSetting struct { PrivateKey *string `json:"privateKey,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorSshSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorSshSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorSshSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorSshSetting: %+v", err) } + decoded["authType"] = "SSH" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_azurefilevolume.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_azurefilevolume.go index 6111b3c0321..a8d1838313a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_azurefilevolume.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_azurefilevolume.go @@ -14,10 +14,22 @@ type AzureFileVolume struct { ShareName *string `json:"shareName,omitempty"` // Fields inherited from CustomPersistentDiskProperties + EnableSubPath *bool `json:"enableSubPath,omitempty"` MountOptions *[]string `json:"mountOptions,omitempty"` MountPath string `json:"mountPath"` ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s AzureFileVolume) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return BaseCustomPersistentDiskPropertiesImpl{ + EnableSubPath: s.EnableSubPath, + MountOptions: s.MountOptions, + MountPath: s.MountPath, + ReadOnly: s.ReadOnly, + Type: s.Type, + } } var _ json.Marshaler = AzureFileVolume{} @@ -31,9 +43,10 @@ func (s AzureFileVolume) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileVolume: %+v", err) } + decoded["type"] = "AzureFileVolume" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_buildresultusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_buildresultusersourceinfo.go index 8591e159186..c0221f1525b 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_buildresultusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_buildresultusersourceinfo.go @@ -14,9 +14,18 @@ type BuildResultUserSourceInfo struct { BuildResultId *string `json:"buildResultId,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s BuildResultUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = BuildResultUserSourceInfo{} func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuildResultUserSourceInfo: %+v", err) } + decoded["type"] = "BuildResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateproperties.go index 804bcf82962..911f092fcd1 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateproperties.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CertificateProperties interface { + CertificateProperties() BaseCertificatePropertiesImpl } -// RawCertificatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CertificateProperties = BaseCertificatePropertiesImpl{} + +type BaseCertificatePropertiesImpl struct { + ActivateDate *string `json:"activateDate,omitempty"` + DnsNames *[]string `json:"dnsNames,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + IssuedDate *string `json:"issuedDate,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` + SubjectName *string `json:"subjectName,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s BaseCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s +} + +var _ CertificateProperties = RawCertificatePropertiesImpl{} + +// RawCertificatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCertificatePropertiesImpl struct { - Type string - Values map[string]interface{} + certificateProperties BaseCertificatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s.certificateProperties } -func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { +func UnmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProp return out, nil } - out := RawCertificatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCertificatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCertificatePropertiesImpl: %+v", err) } - return out, nil + + return RawCertificatePropertiesImpl{ + certificateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateresource.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateresource.go index 440cbc2881f..b5c61f2045a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateresource.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_certificateresource.go @@ -38,7 +38,7 @@ func (s *CertificateResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalCertificatePropertiesImplementation(v) + impl, err := UnmarshalCertificatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'CertificateResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_clusterresourceproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_clusterresourceproperties.go index 2f5fcf95be5..0e45562fe68 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_clusterresourceproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_clusterresourceproperties.go @@ -50,7 +50,7 @@ func (s *ClusterResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["maintenanceScheduleConfiguration"]; ok { - impl, err := unmarshalMaintenanceScheduleConfigurationImplementation(v) + impl, err := UnmarshalMaintenanceScheduleConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'MaintenanceScheduleConfiguration' for 'ClusterResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrybasiccredentials.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrybasiccredentials.go index af8eb053409..a5f9bcfb6a0 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrybasiccredentials.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrybasiccredentials.go @@ -16,6 +16,14 @@ type ContainerRegistryBasicCredentials struct { Username string `json:"username"` // Fields inherited from ContainerRegistryCredentials + + Type string `json:"type"` +} + +func (s ContainerRegistryBasicCredentials) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return BaseContainerRegistryCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ContainerRegistryBasicCredentials{} @@ -29,9 +37,10 @@ func (s ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContainerRegistryBasicCredentials: %+v", err) } + decoded["type"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrycredentials.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrycredentials.go index 84918f1d125..d682a4e385a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrycredentials.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistrycredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContainerRegistryCredentials interface { + ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl } -// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContainerRegistryCredentials = BaseContainerRegistryCredentialsImpl{} + +type BaseContainerRegistryCredentialsImpl struct { + Type string `json:"type"` +} + +func (s BaseContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s +} + +var _ ContainerRegistryCredentials = RawContainerRegistryCredentialsImpl{} + +// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContainerRegistryCredentialsImpl struct { - Type string - Values map[string]interface{} + containerRegistryCredentials BaseContainerRegistryCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s.containerRegistryCredentials } -func unmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { +func UnmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalContainerRegistryCredentialsImplementation(input []byte) (Containe return out, nil } - out := RawContainerRegistryCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseContainerRegistryCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContainerRegistryCredentialsImpl: %+v", err) } - return out, nil + + return RawContainerRegistryCredentialsImpl{ + containerRegistryCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistryproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistryproperties.go index 4a1e18b8583..519d019857b 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistryproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_containerregistryproperties.go @@ -30,7 +30,7 @@ func (s *ContainerRegistryProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalContainerRegistryCredentialsImplementation(v) + impl, err := UnmarshalContainerRegistryCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'ContainerRegistryProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_contentcertificateproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_contentcertificateproperties.go index d6f7a6110fd..f6fb41bdbcd 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_contentcertificateproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_contentcertificateproperties.go @@ -14,6 +14,7 @@ type ContentCertificateProperties struct { Content *string `json:"content,omitempty"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -22,6 +23,21 @@ type ContentCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s ContentCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = ContentCertificateProperties{} @@ -35,9 +51,10 @@ func (s ContentCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentCertificateProperties: %+v", err) } + decoded["type"] = "ContentCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_customcontainerusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_customcontainerusersourceinfo.go index 8411b51a62c..4140c24d62c 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_customcontainerusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_customcontainerusersourceinfo.go @@ -14,9 +14,18 @@ type CustomContainerUserSourceInfo struct { CustomContainer *CustomContainer `json:"customContainer,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CustomContainerUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CustomContainerUserSourceInfo{} func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomContainerUserSourceInfo: %+v", err) } + decoded["type"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskproperties.go index be9da2ff053..d5ba1eaf9b7 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomPersistentDiskProperties interface { + CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl } -// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomPersistentDiskProperties = BaseCustomPersistentDiskPropertiesImpl{} + +type BaseCustomPersistentDiskPropertiesImpl struct { + EnableSubPath *bool `json:"enableSubPath,omitempty"` + MountOptions *[]string `json:"mountOptions,omitempty"` + MountPath string `json:"mountPath"` + ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s BaseCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s +} + +var _ CustomPersistentDiskProperties = RawCustomPersistentDiskPropertiesImpl{} + +// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomPersistentDiskPropertiesImpl struct { - Type string - Values map[string]interface{} + customPersistentDiskProperties BaseCustomPersistentDiskPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s.customPersistentDiskProperties } -func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { +func UnmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { if input == nil { return nil, nil } @@ -44,10 +65,15 @@ func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (Custom return out, nil } - out := RawCustomPersistentDiskPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCustomPersistentDiskPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomPersistentDiskPropertiesImpl: %+v", err) } - return out, nil + + return RawCustomPersistentDiskPropertiesImpl{ + customPersistentDiskProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskresource.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskresource.go index 7a111d5c250..29be71bc7c6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskresource.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_custompersistentdiskresource.go @@ -30,7 +30,7 @@ func (s *CustomPersistentDiskResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customPersistentDiskProperties"]; ok { - impl, err := unmarshalCustomPersistentDiskPropertiesImplementation(v) + impl, err := UnmarshalCustomPersistentDiskPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomPersistentDiskProperties' for 'CustomPersistentDiskResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_deploymentresourceproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_deploymentresourceproperties.go index 145d0197843..5fd11657897 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_deploymentresourceproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_deploymentresourceproperties.go @@ -38,7 +38,7 @@ func (s *DeploymentResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalUserSourceInfoImplementation(v) + impl, err := UnmarshalUserSourceInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'DeploymentResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_execaction.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_execaction.go index 6a220bef9b9..45312ffa5da 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_execaction.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_execaction.go @@ -14,6 +14,14 @@ type ExecAction struct { Command *[]string `json:"command,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s ExecAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = ExecAction{} @@ -27,9 +35,10 @@ func (s ExecAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecAction: %+v", err) } + decoded["type"] = "ExecAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_httpgetaction.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_httpgetaction.go index 702c4d0f29d..becd9aadb38 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_httpgetaction.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_httpgetaction.go @@ -15,6 +15,14 @@ type HTTPGetAction struct { Scheme *HTTPSchemeType `json:"scheme,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s HTTPGetAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = HTTPGetAction{} @@ -28,9 +36,10 @@ func (s HTTPGetAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPGetAction: %+v", err) } + decoded["type"] = "HTTPGetAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_jaruploadedusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_jaruploadedusersourceinfo.go index 2047480ff51..8b8eb662790 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_jaruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_jaruploadedusersourceinfo.go @@ -16,9 +16,18 @@ type JarUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s JarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = JarUploadedUserSourceInfo{} func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Jar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_keyvaultcertificateproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_keyvaultcertificateproperties.go index eb7b72af629..22d986dece6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_keyvaultcertificateproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_keyvaultcertificateproperties.go @@ -18,6 +18,7 @@ type KeyVaultCertificateProperties struct { VaultUri string `json:"vaultUri"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -26,6 +27,21 @@ type KeyVaultCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s KeyVaultCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = KeyVaultCertificateProperties{} @@ -39,9 +55,10 @@ func (s KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultCertificateProperties: %+v", err) } + decoded["type"] = "KeyVaultCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_maintenancescheduleconfiguration.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_maintenancescheduleconfiguration.go index 20d0e309f57..354ea816745 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_maintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_maintenancescheduleconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MaintenanceScheduleConfiguration interface { + MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl } -// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MaintenanceScheduleConfiguration = BaseMaintenanceScheduleConfigurationImpl{} + +type BaseMaintenanceScheduleConfigurationImpl struct { + Frequency Frequency `json:"frequency"` +} + +func (s BaseMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s +} + +var _ MaintenanceScheduleConfiguration = RawMaintenanceScheduleConfigurationImpl{} + +// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMaintenanceScheduleConfigurationImpl struct { - Type string - Values map[string]interface{} + maintenanceScheduleConfiguration BaseMaintenanceScheduleConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s.maintenanceScheduleConfiguration } -func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { +func UnmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (Main return out, nil } - out := RawMaintenanceScheduleConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseMaintenanceScheduleConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMaintenanceScheduleConfigurationImpl: %+v", err) } - return out, nil + + return RawMaintenanceScheduleConfigurationImpl{ + maintenanceScheduleConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go index b0951319715..7c52088222a 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type NetCoreZipUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s NetCoreZipUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = NetCoreZipUploadedUserSourceInfo{} func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetCoreZipUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "NetCoreZip" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probe.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probe.go index c59cb8825f1..856bba336ed 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probe.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probe.go @@ -40,7 +40,7 @@ func (s *Probe) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["probeAction"]; ok { - impl, err := unmarshalProbeActionImplementation(v) + impl, err := UnmarshalProbeActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProbeAction' for 'Probe': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probeaction.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probeaction.go index c6bb9d81bc2..ada397a242e 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probeaction.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_probeaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProbeAction interface { + ProbeAction() BaseProbeActionImpl } -// RawProbeActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProbeAction = BaseProbeActionImpl{} + +type BaseProbeActionImpl struct { + Type ProbeActionType `json:"type"` +} + +func (s BaseProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s +} + +var _ ProbeAction = RawProbeActionImpl{} + +// RawProbeActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProbeActionImpl struct { - Type string - Values map[string]interface{} + probeAction BaseProbeActionImpl + Type string + Values map[string]interface{} +} + +func (s RawProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s.probeAction } -func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { +func UnmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { return out, nil } - out := RawProbeActionImpl{ - Type: value, - Values: temp, + var parent BaseProbeActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProbeActionImpl: %+v", err) } - return out, nil + + return RawProbeActionImpl{ + probeAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_sourceuploadedusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_sourceuploadedusersourceinfo.go index 62fe9835ba0..d2c37f2a640 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_sourceuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_sourceuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type SourceUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SourceUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SourceUploadedUserSourceInfo{} func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SourceUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageaccount.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageaccount.go index 3dc49e5a074..6b25e6ecb18 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageaccount.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageaccount.go @@ -15,6 +15,14 @@ type StorageAccount struct { AccountName string `json:"accountName"` // Fields inherited from StorageProperties + + StorageType StorageType `json:"storageType"` +} + +func (s StorageAccount) StorageProperties() BaseStoragePropertiesImpl { + return BaseStoragePropertiesImpl{ + StorageType: s.StorageType, + } } var _ json.Marshaler = StorageAccount{} @@ -28,9 +36,10 @@ func (s StorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageAccount: %+v", err) } + decoded["storageType"] = "StorageAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageproperties.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageproperties.go index b73ed4d4d42..af7ab65c017 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageproperties.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageProperties interface { + StorageProperties() BaseStoragePropertiesImpl } -// RawStoragePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageProperties = BaseStoragePropertiesImpl{} + +type BaseStoragePropertiesImpl struct { + StorageType StorageType `json:"storageType"` +} + +func (s BaseStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s +} + +var _ StorageProperties = RawStoragePropertiesImpl{} + +// RawStoragePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoragePropertiesImpl struct { - Type string - Values map[string]interface{} + storageProperties BaseStoragePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s.storageProperties } -func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { +func UnmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, return out, nil } - out := RawStoragePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseStoragePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoragePropertiesImpl: %+v", err) } - return out, nil + + return RawStoragePropertiesImpl{ + storageProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageresource.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageresource.go index f09c491658e..1d325413d9c 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageresource.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_storageresource.go @@ -38,7 +38,7 @@ func (s *StorageResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalStoragePropertiesImplementation(v) + impl, err := UnmarshalStoragePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'StorageResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_tcpsocketaction.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_tcpsocketaction.go index a1edd6797d1..286aa3a4774 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_tcpsocketaction.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_tcpsocketaction.go @@ -13,6 +13,14 @@ var _ ProbeAction = TCPSocketAction{} type TCPSocketAction struct { // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s TCPSocketAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = TCPSocketAction{} @@ -26,9 +34,10 @@ func (s TCPSocketAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TCPSocketAction: %+v", err) } + decoded["type"] = "TCPSocketAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_usersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_usersourceinfo.go index d1ac05963f5..8dee9d4eda6 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_usersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_usersourceinfo.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UserSourceInfo interface { + UserSourceInfo() BaseUserSourceInfoImpl } -// RawUserSourceInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UserSourceInfo = BaseUserSourceInfoImpl{} + +type BaseUserSourceInfoImpl struct { + Type string `json:"type"` + Version *string `json:"version,omitempty"` +} + +func (s BaseUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s +} + +var _ UserSourceInfo = RawUserSourceInfoImpl{} + +// RawUserSourceInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUserSourceInfoImpl struct { - Type string - Values map[string]interface{} + userSourceInfo BaseUserSourceInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s.userSourceInfo } -func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { +func UnmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) return out, nil } - out := RawUserSourceInfoImpl{ - Type: value, - Values: temp, + var parent BaseUserSourceInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUserSourceInfoImpl: %+v", err) } - return out, nil + + return RawUserSourceInfoImpl{ + userSourceInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_waruploadedusersourceinfo.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_waruploadedusersourceinfo.go index cb19ff5cef5..34b188ecaa2 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_waruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_waruploadedusersourceinfo.go @@ -17,9 +17,18 @@ type WarUploadedUserSourceInfo struct { ServerVersion *string `json:"serverVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WarUploadedUserSourceInfo{} func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +40,10 @@ func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "War" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go index db1a4c4c91e..c97bbab6f60 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go @@ -16,6 +16,14 @@ type WeeklyMaintenanceScheduleConfiguration struct { Hour int64 `json:"hour"` // Fields inherited from MaintenanceScheduleConfiguration + + Frequency Frequency `json:"frequency"` +} + +func (s WeeklyMaintenanceScheduleConfiguration) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return BaseMaintenanceScheduleConfigurationImpl{ + Frequency: s.Frequency, + } } var _ json.Marshaler = WeeklyMaintenanceScheduleConfiguration{} @@ -29,9 +37,10 @@ func (s WeeklyMaintenanceScheduleConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WeeklyMaintenanceScheduleConfiguration: %+v", err) } + decoded["frequency"] = "Weekly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-09-01-preview/appplatform/version.go b/resource-manager/appplatform/2023-09-01-preview/appplatform/version.go index 67d5864b20e..1c61c0403fc 100644 --- a/resource-manager/appplatform/2023-09-01-preview/appplatform/version.go +++ b/resource-manager/appplatform/2023-09-01-preview/appplatform/version.go @@ -1,12 +1,10 @@ package appplatform -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appplatform/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appplatform/2023-09-01-preview" } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/README.md b/resource-manager/appplatform/2023-11-01-preview/appplatform/README.md index 6677c004cd3..b03ad04f4a1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/README.md +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-11-01-preview/appplatform` Documentation -The `appplatform` SDK allows for interaction with the Azure Resource Manager Service `appplatform` (API Version `2023-11-01-preview`). +The `appplatform` SDK allows for interaction with Azure Resource Manager `appplatform` (API Version `2023-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/client.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/client.go index c09305ed371..8165dad21d6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/client.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/client.go @@ -15,7 +15,7 @@ type AppPlatformClient struct { } func NewAppPlatformClientWithBaseURI(sdkApi sdkEnv.Api) (*AppPlatformClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appplatform", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appplatform", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppPlatformClient: %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_agentpool.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_agentpool.go index 8657bb20f0b..ea4ae1cb3e3 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_agentpool.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_agentpool.go @@ -46,7 +46,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportal.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportal.go index 077d4c0ff91..3246ae7bb6c 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportal.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportal.go @@ -44,7 +44,7 @@ func ParseApiPortalID(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiPortalIDInsensitively(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportaldomain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportaldomain.go index c527abe1118..b27652c23b3 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportaldomain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apiportaldomain.go @@ -46,7 +46,7 @@ func ParseApiPortalDomainID(input string) (*ApiPortalDomainId, error) { } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiPortalDomainIDInsensitively(input string) (*ApiPortalDomainId, erro } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apm.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apm.go index 208aa38a0dd..ca5bfe1afac 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apm.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_apm.go @@ -44,7 +44,7 @@ func ParseApmID(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApmIDInsensitively(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_app.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_app.go index 13d7ea03e3e..b9bb63a2c7f 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_app.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_app.go @@ -44,7 +44,7 @@ func ParseAppID(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppIDInsensitively(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationaccelerator.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationaccelerator.go index 941f5675086..e13cd61ff90 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationaccelerator.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationaccelerator.go @@ -44,7 +44,7 @@ func ParseApplicationAcceleratorID(input string) (*ApplicationAcceleratorId, err } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationAcceleratorIDInsensitively(input string) (*ApplicationAccel } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationliveview.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationliveview.go index 66c37ac2975..22cc26b6845 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationliveview.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_applicationliveview.go @@ -44,7 +44,7 @@ func ParseApplicationLiveViewID(input string) (*ApplicationLiveViewId, error) { } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationLiveViewIDInsensitively(input string) (*ApplicationLiveView } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_binding.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_binding.go index cf5fa9d9c71..69548c11615 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_binding.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_binding.go @@ -46,7 +46,7 @@ func ParseBindingID(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBindingIDInsensitively(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_build.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_build.go index cacb0f627c0..a436d8c291c 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_build.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_build.go @@ -46,7 +46,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_builder.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_builder.go index c12dfe30877..81203fd2b64 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_builder.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_builder.go @@ -46,7 +46,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildpackbinding.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildpackbinding.go index 35d763e15e1..9c15e964d26 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildpackbinding.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildpackbinding.go @@ -48,7 +48,7 @@ func ParseBuildPackBindingID(input string) (*BuildPackBindingId, error) { } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBuildPackBindingIDInsensitively(input string) (*BuildPackBindingId, er } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildservice.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildservice.go index ca1f998143e..3189799970b 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildservice.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_buildservice.go @@ -44,7 +44,7 @@ func ParseBuildServiceID(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildServiceIDInsensitively(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_certificate.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_certificate.go index 30f1315f6b3..f53248bd3da 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_certificate.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_configurationservice.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_configurationservice.go index c9c6626d10c..e236ff68d6d 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_configurationservice.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_configurationservice.go @@ -44,7 +44,7 @@ func ParseConfigurationServiceID(input string) (*ConfigurationServiceId, error) } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationServiceIDInsensitively(input string) (*ConfigurationServi } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_containerregistry.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_containerregistry.go index 538c5498546..8414f03d1c2 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_containerregistry.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_containerregistry.go @@ -44,7 +44,7 @@ func ParseContainerRegistryID(input string) (*ContainerRegistryId, error) { } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerRegistryIDInsensitively(input string) (*ContainerRegistryId, } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_customizedaccelerator.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_customizedaccelerator.go index 5e78cd284e3..0617f545463 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_customizedaccelerator.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_customizedaccelerator.go @@ -46,7 +46,7 @@ func ParseCustomizedAcceleratorID(input string) (*CustomizedAcceleratorId, error } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCustomizedAcceleratorIDInsensitively(input string) (*CustomizedAcceler } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_deployment.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_deployment.go index 90d1ecacedf..7e7897fa577 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_deployment.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_devtoolportal.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_devtoolportal.go index b6214d25617..427096fb70f 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_devtoolportal.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_devtoolportal.go @@ -44,7 +44,7 @@ func ParseDevToolPortalID(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevToolPortalIDInsensitively(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_domain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_domain.go index 51040d0f1a9..55595bf9d3a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_domain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_domain.go @@ -46,7 +46,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gateway.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gateway.go index b16062215f6..579edf57b79 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gateway.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gatewaydomain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gatewaydomain.go index c837a61f60d..a83fc1633be 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gatewaydomain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_gatewaydomain.go @@ -46,7 +46,7 @@ func ParseGatewayDomainID(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayDomainIDInsensitively(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_location.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_location.go index 95cf5e0a899..1bbddd98255 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_location.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_predefinedaccelerator.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_predefinedaccelerator.go index 735e484e767..3b25e9ca790 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_predefinedaccelerator.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_predefinedaccelerator.go @@ -46,7 +46,7 @@ func ParsePredefinedAcceleratorID(input string) (*PredefinedAcceleratorId, error } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePredefinedAcceleratorIDInsensitively(input string) (*PredefinedAcceler } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_result.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_result.go index f39e5846020..368a6564fca 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_result.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_result.go @@ -48,7 +48,7 @@ func ParseResultID(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseResultIDInsensitively(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_routeconfig.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_routeconfig.go index 8918428a2ee..e5ab240721b 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_routeconfig.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_routeconfig.go @@ -46,7 +46,7 @@ func ParseRouteConfigID(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteConfigIDInsensitively(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_serviceregistry.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_serviceregistry.go index 6d5aee9654a..a6c4783abfb 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_serviceregistry.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_serviceregistry.go @@ -44,7 +44,7 @@ func ParseServiceRegistryID(input string) (*ServiceRegistryId, error) { } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceRegistryIDInsensitively(input string) (*ServiceRegistryId, erro } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_storage.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_storage.go index ccbfc4c15c8..06897b787df 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_storage.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedbuildpack.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedbuildpack.go index 4b908c8abb5..989d8e2fee7 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedbuildpack.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedbuildpack.go @@ -46,7 +46,7 @@ func ParseSupportedBuildPackID(input string) (*SupportedBuildPackId, error) { } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedBuildPackIDInsensitively(input string) (*SupportedBuildPackId } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedstack.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedstack.go index 1329f39d804..395a06752cb 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedstack.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/id_supportedstack.go @@ -46,7 +46,7 @@ func ParseSupportedStackID(input string) (*SupportedStackId, error) { } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedStackIDInsensitively(input string) (*SupportedStackId, error) } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalcustomdomainsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalcustomdomainsget.go index 31162b86c76..ee2bbd322c2 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalcustomdomainsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalcustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalCustomDomainsGet(ctx context.Context, id Api var model ApiPortalCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsget.go index 674cb161de0..9dcaaa30ad8 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalsGet(ctx context.Context, id ApiPortalId) (r var model ApiPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsvalidatedomain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsvalidatedomain.go index 9baf66398c9..18b39e239aa 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsvalidatedomain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apiportalsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ApiPortalsValidateDomain(ctx context.Context, id ApiP var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmsget.go index 0f0d937defc..f467f8eaaf3 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApmsGet(ctx context.Context, id ApmId) (result ApmsGe var model ApmResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmslistsecretkeys.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmslistsecretkeys.go index 74cf12911d4..5bd8219bd7a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmslistsecretkeys.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_apmslistsecretkeys.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ApmsListSecretKeys(ctx context.Context, id ApmId) (re var model ApmSecretKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationacceleratorsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationacceleratorsget.go index 809af6b1b2e..4b328230326 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationacceleratorsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationAcceleratorsGet(ctx context.Context, id Ap var model ApplicationAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationliveviewsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationliveviewsget.go index 833ed7c87a8..2830fd1fdba 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationliveviewsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_applicationliveviewsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationLiveViewsGet(ctx context.Context, id Appli var model ApplicationLiveViewResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsget.go index 4a53dd22ea4..3724e37ca47 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsget.go @@ -34,6 +34,7 @@ func (o AppsGetOperationOptions) ToHeaders() *client.Headers { func (o AppsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AppPlatformClient) AppsGet(ctx context.Context, id AppId, options AppsGe var model AppResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsgetresourceuploadurl.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsgetresourceuploadurl.go index 3893d74b4d0..6e1b2cd1650 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsgetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsgetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) AppsGetResourceUploadUrl(ctx context.Context, id AppI var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsvalidatedomain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsvalidatedomain.go index 012f55c15f3..2e32bcfc251 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsvalidatedomain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_appsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) AppsValidateDomain(ctx context.Context, id AppId, inp var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_bindingsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_bindingsget.go index d2f0b1c572d..fd7934dd484 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_bindingsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_bindingsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BindingsGet(ctx context.Context, id BindingId) (resul var model BindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildpackbindingget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildpackbindingget.go index 46c526b6d26..9cb2a5754d5 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildpackbindingget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildpackbindingget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildpackBindingGet(ctx context.Context, id BuildPack var model BuildpackBindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildserviceagentpoolget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildserviceagentpoolget.go index 022f16023e8..5c09fcc1136 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildserviceagentpoolget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildserviceagentpoolget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceAgentPoolGet(ctx context.Context, id Agen var model BuildServiceAgentPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderget.go index 6970226423e..fc88a1423e7 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceBuilderGet(ctx context.Context, id Builde var model BuilderResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderlistdeployments.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderlistdeployments.go index 3bb23d15783..28662e9243e 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderlistdeployments.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicebuilderlistdeployments.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceBuilderListDeployments(ctx context.Contex var model DeploymentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicecreateorupdatebuild.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicecreateorupdatebuild.go index 81c5ebabc62..c8b22694446 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicecreateorupdatebuild.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicecreateorupdatebuild.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) BuildServiceCreateOrUpdateBuild(ctx context.Context, var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuild.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuild.go index 70c3079f914..3c1248a1c36 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuild.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuild.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuild(ctx context.Context, id BuildId) var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresult.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresult.go index 2a378c0c67c..d9cbe5b06af 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresult.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresult.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResult(ctx context.Context, id Re var model BuildResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresultlog.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresultlog.go index 465da5d9a2a..f025aeac949 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresultlog.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildresultlog.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResultLog(ctx context.Context, id var model BuildResultLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildservice.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildservice.go index 97fd62680cb..03017c3fdd8 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildservice.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetbuildservice.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildService(ctx context.Context, id B var model BuildService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetresourceuploadurl.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetresourceuploadurl.go index c6ebe1d77af..9708b701e43 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetResourceUploadUrl(ctx context.Context, var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go index 724fbad337a..e1f390735d4 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedBuildpack(ctx context.Context var model SupportedBuildpackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedstack.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedstack.go index 63d59a7779e..6c8f254c7d1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedstack.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_buildservicegetsupportedstack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedStack(ctx context.Context, id var model SupportedStackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_certificatesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_certificatesget.go index f7bef5eb376..402d3daf21f 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_certificatesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_certificatesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CertificatesGet(ctx context.Context, id CertificateId var model CertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configserversget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configserversget.go index 370c6ca9d47..9d926525ebb 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configserversget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ConfigServersGet(ctx context.Context, id commonids.Sp var model ConfigServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configurationservicesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configurationservicesget.go index 73009c6355e..6182cda68a0 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configurationservicesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_configurationservicesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ConfigurationServicesGet(ctx context.Context, id Conf var model ConfigurationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_containerregistriesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_containerregistriesget.go index 0854da5f8aa..721f5cf55c9 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_containerregistriesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_containerregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ContainerRegistriesGet(ctx context.Context, id Contai var model ContainerRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customdomainsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customdomainsget.go index 4ac146fcd80..5029cb05619 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customdomainsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomDomainsGet(ctx context.Context, id DomainId) (r var model CustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsget.go index 93096eee0fa..7197ce868af 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsGet(ctx context.Context, id Cus var model CustomizedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsvalidate.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsvalidate.go index 9a390a687ea..c45b6778fbd 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsvalidate.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_customizedacceleratorsvalidate.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsValidate(ctx context.Context, i var model CustomizedAcceleratorValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsget.go index 41f7475d8cc..cfbf6da94b6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DeploymentsGet(ctx context.Context, id DeploymentId) var model DeploymentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetlogfileurl.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetlogfileurl.go index a4771e38445..674afbef641 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetlogfileurl.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetlogfileurl.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) DeploymentsGetLogFileUrl(ctx context.Context, id Depl var model LogFileUrlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go index b319dd43fe6..6a8077b27f1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) DeploymentsGetRemoteDebuggingConfig(ctx context.Conte var model RemoteDebugging result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslist.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslist.go index 9f59eb8df5c..c0f57dc7744 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslist.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslist.go @@ -40,6 +40,7 @@ func (o DeploymentsListOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslistforcluster.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslistforcluster.go index 2496ba5da3f..9e8454491d5 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslistforcluster.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_deploymentslistforcluster.go @@ -41,6 +41,7 @@ func (o DeploymentsListForClusterOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListForClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_devtoolportalsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_devtoolportalsget.go index c3d25c11e37..6684c6d0332 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_devtoolportalsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_devtoolportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DevToolPortalsGet(ctx context.Context, id DevToolPort var model DevToolPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_eurekaserversget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_eurekaserversget.go index f18f93980c6..18a319e61bb 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_eurekaserversget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_eurekaserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) EurekaServersGet(ctx context.Context, id commonids.Sp var model EurekaServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaycustomdomainsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaycustomdomainsget.go index e5ffc650511..64454f48288 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaycustomdomainsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaycustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayCustomDomainsGet(ctx context.Context, id Gatew var model GatewayCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayrouteconfigsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayrouteconfigsget.go index 961b30529c3..80376391849 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayrouteconfigsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayrouteconfigsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayRouteConfigsGet(ctx context.Context, id RouteC var model GatewayRouteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysget.go index 30d694c4e51..51ceea59d54 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewaysGet(ctx context.Context, id GatewayId) (resul var model GatewayResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayslistenvsecrets.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayslistenvsecrets.go index d7b9e50cd83..78b159baeab 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayslistenvsecrets.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewayslistenvsecrets.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) GatewaysListEnvSecrets(ctx context.Context, id Gatewa var model map[string]string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysvalidatedomain.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysvalidatedomain.go index c1b00963a14..dbac66d1ce6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysvalidatedomain.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_gatewaysvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) GatewaysValidateDomain(ctx context.Context, id Gatewa var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_monitoringsettingsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_monitoringsettingsget.go index 71aa5c6c5a1..0dcb42750cc 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_monitoringsettingsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_monitoringsettingsget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) MonitoringSettingsGet(ctx context.Context, id commoni var model MonitoringSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_predefinedacceleratorsget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_predefinedacceleratorsget.go index 2ed06cace03..91ada78ddf1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_predefinedacceleratorsget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_predefinedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) PredefinedAcceleratorsGet(ctx context.Context, id Pre var model PredefinedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_runtimeversionslistruntimeversions.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_runtimeversionslistruntimeversions.go index fe9f0c3f689..81408df96f0 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_runtimeversionslistruntimeversions.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_runtimeversionslistruntimeversions.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) RuntimeVersionsListRuntimeVersions(ctx context.Contex var model AvailableRuntimeVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceregistriesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceregistriesget.go index 60b90a94cea..0259bd789c9 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceregistriesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ServiceRegistriesGet(ctx context.Context, id ServiceR var model ServiceRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceschecknameavailability.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceschecknameavailability.go index aca0efe340d..c43d41eefa6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceschecknameavailability.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ServicesCheckNameAvailability(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesenabletestendpoint.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesenabletestendpoint.go index 23adca57b75..1df588bc859 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesenabletestendpoint.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesenabletestendpoint.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesEnableTestEndpoint(ctx context.Context, id co var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesget.go index 31ccba1ca6e..cc3d2a0cae2 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesget.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ServicesGet(ctx context.Context, id commonids.SpringC var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslistgloballyenabledapms.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslistgloballyenabledapms.go index 6dd339d44c9..262011227cf 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslistgloballyenabledapms.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslistgloballyenabledapms.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListGloballyEnabledApms(ctx context.Context, var model GloballyEnabledApms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslisttestkeys.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslisttestkeys.go index 197dd28a1c8..7ccfa6d9aa4 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslisttestkeys.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_serviceslisttestkeys.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListTestKeys(ctx context.Context, id commonid var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesregeneratetestkey.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesregeneratetestkey.go index 664a0e6a4cc..f83c2cf2c59 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesregeneratetestkey.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_servicesregeneratetestkey.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) ServicesRegenerateTestKey(ctx context.Context, id com var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_storagesget.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_storagesget.go index 6623c2f57ef..8e3bc1508f9 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/method_storagesget.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/method_storagesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) StoragesGet(ctx context.Context, id StorageId) (resul var model StorageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorauthsetting.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorauthsetting.go index 9f035ed61a3..27997c20e3f 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorauthsetting.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorauthsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AcceleratorAuthSetting interface { + AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl } -// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AcceleratorAuthSetting = BaseAcceleratorAuthSettingImpl{} + +type BaseAcceleratorAuthSettingImpl struct { + AuthType string `json:"authType"` +} + +func (s BaseAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s +} + +var _ AcceleratorAuthSetting = RawAcceleratorAuthSettingImpl{} + +// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAcceleratorAuthSettingImpl struct { - Type string - Values map[string]interface{} + acceleratorAuthSetting BaseAcceleratorAuthSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s.acceleratorAuthSetting } -func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { +func UnmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAut return out, nil } - out := RawAcceleratorAuthSettingImpl{ - Type: value, - Values: temp, + var parent BaseAcceleratorAuthSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAcceleratorAuthSettingImpl: %+v", err) } - return out, nil + + return RawAcceleratorAuthSettingImpl{ + acceleratorAuthSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorbasicauthsetting.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorbasicauthsetting.go index c26e9b76009..c8a4ac5dfdf 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorbasicauthsetting.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorbasicauthsetting.go @@ -16,6 +16,14 @@ type AcceleratorBasicAuthSetting struct { Username string `json:"username"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorBasicAuthSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorBasicAuthSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorBasicAuthSetting: %+v", err) } + decoded["authType"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorgitrepository.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorgitrepository.go index c5384079853..b0f8950cc0e 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorgitrepository.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorgitrepository.go @@ -40,7 +40,7 @@ func (s *AcceleratorGitRepository) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authSetting"]; ok { - impl, err := unmarshalAcceleratorAuthSettingImplementation(v) + impl, err := UnmarshalAcceleratorAuthSettingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthSetting' for 'AcceleratorGitRepository': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorpublicsetting.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorpublicsetting.go index 8f2526b39b9..ceddf807fd1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorpublicsetting.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorpublicsetting.go @@ -14,6 +14,14 @@ type AcceleratorPublicSetting struct { CaCertResourceId *string `json:"caCertResourceId,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorPublicSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorPublicSetting{} @@ -27,9 +35,10 @@ func (s AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorPublicSetting: %+v", err) } + decoded["authType"] = "Public" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorsshsetting.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorsshsetting.go index 257c4615505..9206fb45e17 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorsshsetting.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_acceleratorsshsetting.go @@ -16,6 +16,14 @@ type AcceleratorSshSetting struct { PrivateKey *string `json:"privateKey,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorSshSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorSshSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorSshSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorSshSetting: %+v", err) } + decoded["authType"] = "SSH" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_azurefilevolume.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_azurefilevolume.go index 6111b3c0321..a8d1838313a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_azurefilevolume.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_azurefilevolume.go @@ -14,10 +14,22 @@ type AzureFileVolume struct { ShareName *string `json:"shareName,omitempty"` // Fields inherited from CustomPersistentDiskProperties + EnableSubPath *bool `json:"enableSubPath,omitempty"` MountOptions *[]string `json:"mountOptions,omitempty"` MountPath string `json:"mountPath"` ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s AzureFileVolume) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return BaseCustomPersistentDiskPropertiesImpl{ + EnableSubPath: s.EnableSubPath, + MountOptions: s.MountOptions, + MountPath: s.MountPath, + ReadOnly: s.ReadOnly, + Type: s.Type, + } } var _ json.Marshaler = AzureFileVolume{} @@ -31,9 +43,10 @@ func (s AzureFileVolume) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileVolume: %+v", err) } + decoded["type"] = "AzureFileVolume" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_buildresultusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_buildresultusersourceinfo.go index 8591e159186..c0221f1525b 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_buildresultusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_buildresultusersourceinfo.go @@ -14,9 +14,18 @@ type BuildResultUserSourceInfo struct { BuildResultId *string `json:"buildResultId,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s BuildResultUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = BuildResultUserSourceInfo{} func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuildResultUserSourceInfo: %+v", err) } + decoded["type"] = "BuildResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateproperties.go index 804bcf82962..911f092fcd1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateproperties.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CertificateProperties interface { + CertificateProperties() BaseCertificatePropertiesImpl } -// RawCertificatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CertificateProperties = BaseCertificatePropertiesImpl{} + +type BaseCertificatePropertiesImpl struct { + ActivateDate *string `json:"activateDate,omitempty"` + DnsNames *[]string `json:"dnsNames,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + IssuedDate *string `json:"issuedDate,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` + SubjectName *string `json:"subjectName,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s BaseCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s +} + +var _ CertificateProperties = RawCertificatePropertiesImpl{} + +// RawCertificatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCertificatePropertiesImpl struct { - Type string - Values map[string]interface{} + certificateProperties BaseCertificatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s.certificateProperties } -func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { +func UnmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProp return out, nil } - out := RawCertificatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCertificatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCertificatePropertiesImpl: %+v", err) } - return out, nil + + return RawCertificatePropertiesImpl{ + certificateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateresource.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateresource.go index 440cbc2881f..b5c61f2045a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateresource.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_certificateresource.go @@ -38,7 +38,7 @@ func (s *CertificateResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalCertificatePropertiesImplementation(v) + impl, err := UnmarshalCertificatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'CertificateResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_clusterresourceproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_clusterresourceproperties.go index 2f5fcf95be5..0e45562fe68 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_clusterresourceproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_clusterresourceproperties.go @@ -50,7 +50,7 @@ func (s *ClusterResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["maintenanceScheduleConfiguration"]; ok { - impl, err := unmarshalMaintenanceScheduleConfigurationImplementation(v) + impl, err := UnmarshalMaintenanceScheduleConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'MaintenanceScheduleConfiguration' for 'ClusterResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrybasiccredentials.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrybasiccredentials.go index af8eb053409..a5f9bcfb6a0 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrybasiccredentials.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrybasiccredentials.go @@ -16,6 +16,14 @@ type ContainerRegistryBasicCredentials struct { Username string `json:"username"` // Fields inherited from ContainerRegistryCredentials + + Type string `json:"type"` +} + +func (s ContainerRegistryBasicCredentials) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return BaseContainerRegistryCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ContainerRegistryBasicCredentials{} @@ -29,9 +37,10 @@ func (s ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContainerRegistryBasicCredentials: %+v", err) } + decoded["type"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrycredentials.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrycredentials.go index 84918f1d125..d682a4e385a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrycredentials.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistrycredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContainerRegistryCredentials interface { + ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl } -// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContainerRegistryCredentials = BaseContainerRegistryCredentialsImpl{} + +type BaseContainerRegistryCredentialsImpl struct { + Type string `json:"type"` +} + +func (s BaseContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s +} + +var _ ContainerRegistryCredentials = RawContainerRegistryCredentialsImpl{} + +// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContainerRegistryCredentialsImpl struct { - Type string - Values map[string]interface{} + containerRegistryCredentials BaseContainerRegistryCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s.containerRegistryCredentials } -func unmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { +func UnmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalContainerRegistryCredentialsImplementation(input []byte) (Containe return out, nil } - out := RawContainerRegistryCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseContainerRegistryCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContainerRegistryCredentialsImpl: %+v", err) } - return out, nil + + return RawContainerRegistryCredentialsImpl{ + containerRegistryCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistryproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistryproperties.go index 4a1e18b8583..519d019857b 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistryproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_containerregistryproperties.go @@ -30,7 +30,7 @@ func (s *ContainerRegistryProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalContainerRegistryCredentialsImplementation(v) + impl, err := UnmarshalContainerRegistryCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'ContainerRegistryProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_contentcertificateproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_contentcertificateproperties.go index d6f7a6110fd..f6fb41bdbcd 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_contentcertificateproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_contentcertificateproperties.go @@ -14,6 +14,7 @@ type ContentCertificateProperties struct { Content *string `json:"content,omitempty"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -22,6 +23,21 @@ type ContentCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s ContentCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = ContentCertificateProperties{} @@ -35,9 +51,10 @@ func (s ContentCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentCertificateProperties: %+v", err) } + decoded["type"] = "ContentCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_customcontainerusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_customcontainerusersourceinfo.go index 8411b51a62c..4140c24d62c 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_customcontainerusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_customcontainerusersourceinfo.go @@ -14,9 +14,18 @@ type CustomContainerUserSourceInfo struct { CustomContainer *CustomContainer `json:"customContainer,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CustomContainerUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CustomContainerUserSourceInfo{} func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomContainerUserSourceInfo: %+v", err) } + decoded["type"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskproperties.go index be9da2ff053..d5ba1eaf9b7 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomPersistentDiskProperties interface { + CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl } -// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomPersistentDiskProperties = BaseCustomPersistentDiskPropertiesImpl{} + +type BaseCustomPersistentDiskPropertiesImpl struct { + EnableSubPath *bool `json:"enableSubPath,omitempty"` + MountOptions *[]string `json:"mountOptions,omitempty"` + MountPath string `json:"mountPath"` + ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s BaseCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s +} + +var _ CustomPersistentDiskProperties = RawCustomPersistentDiskPropertiesImpl{} + +// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomPersistentDiskPropertiesImpl struct { - Type string - Values map[string]interface{} + customPersistentDiskProperties BaseCustomPersistentDiskPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s.customPersistentDiskProperties } -func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { +func UnmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { if input == nil { return nil, nil } @@ -44,10 +65,15 @@ func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (Custom return out, nil } - out := RawCustomPersistentDiskPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCustomPersistentDiskPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomPersistentDiskPropertiesImpl: %+v", err) } - return out, nil + + return RawCustomPersistentDiskPropertiesImpl{ + customPersistentDiskProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskresource.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskresource.go index 7a111d5c250..29be71bc7c6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskresource.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_custompersistentdiskresource.go @@ -30,7 +30,7 @@ func (s *CustomPersistentDiskResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customPersistentDiskProperties"]; ok { - impl, err := unmarshalCustomPersistentDiskPropertiesImplementation(v) + impl, err := UnmarshalCustomPersistentDiskPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomPersistentDiskProperties' for 'CustomPersistentDiskResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_deploymentresourceproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_deploymentresourceproperties.go index 145d0197843..5fd11657897 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_deploymentresourceproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_deploymentresourceproperties.go @@ -38,7 +38,7 @@ func (s *DeploymentResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalUserSourceInfoImplementation(v) + impl, err := UnmarshalUserSourceInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'DeploymentResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_execaction.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_execaction.go index 6a220bef9b9..45312ffa5da 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_execaction.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_execaction.go @@ -14,6 +14,14 @@ type ExecAction struct { Command *[]string `json:"command,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s ExecAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = ExecAction{} @@ -27,9 +35,10 @@ func (s ExecAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecAction: %+v", err) } + decoded["type"] = "ExecAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go index 49433c0a256..9b03b60fb1b 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go @@ -15,6 +15,14 @@ type GatewayLocalResponseCachePerInstanceProperties struct { TimeToLive *string `json:"timeToLive,omitempty"` // Fields inherited from GatewayResponseCacheProperties + + ResponseCacheType string `json:"responseCacheType"` +} + +func (s GatewayLocalResponseCachePerInstanceProperties) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return BaseGatewayResponseCachePropertiesImpl{ + ResponseCacheType: s.ResponseCacheType, + } } var _ json.Marshaler = GatewayLocalResponseCachePerInstanceProperties{} @@ -28,9 +36,10 @@ func (s GatewayLocalResponseCachePerInstanceProperties) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayLocalResponseCachePerInstanceProperties: %+v", err) } + decoded["responseCacheType"] = "LocalCachePerInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go index 4b82764dd33..02a1e952dc1 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go @@ -15,6 +15,14 @@ type GatewayLocalResponseCachePerRouteProperties struct { TimeToLive *string `json:"timeToLive,omitempty"` // Fields inherited from GatewayResponseCacheProperties + + ResponseCacheType string `json:"responseCacheType"` +} + +func (s GatewayLocalResponseCachePerRouteProperties) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return BaseGatewayResponseCachePropertiesImpl{ + ResponseCacheType: s.ResponseCacheType, + } } var _ json.Marshaler = GatewayLocalResponseCachePerRouteProperties{} @@ -28,9 +36,10 @@ func (s GatewayLocalResponseCachePerRouteProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayLocalResponseCachePerRouteProperties: %+v", err) } + decoded["responseCacheType"] = "LocalCachePerRoute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayproperties.go index 1632c452e6d..04d7b881c32 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayproperties.go @@ -58,7 +58,7 @@ func (s *GatewayProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["responseCacheProperties"]; ok { - impl, err := unmarshalGatewayResponseCachePropertiesImplementation(v) + impl, err := UnmarshalGatewayResponseCachePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResponseCacheProperties' for 'GatewayProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayresponsecacheproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayresponsecacheproperties.go index 491cff612eb..9a05c6bf70f 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayresponsecacheproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_gatewayresponsecacheproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GatewayResponseCacheProperties interface { + GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl } -// RawGatewayResponseCachePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GatewayResponseCacheProperties = BaseGatewayResponseCachePropertiesImpl{} + +type BaseGatewayResponseCachePropertiesImpl struct { + ResponseCacheType string `json:"responseCacheType"` +} + +func (s BaseGatewayResponseCachePropertiesImpl) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return s +} + +var _ GatewayResponseCacheProperties = RawGatewayResponseCachePropertiesImpl{} + +// RawGatewayResponseCachePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGatewayResponseCachePropertiesImpl struct { - Type string - Values map[string]interface{} + gatewayResponseCacheProperties BaseGatewayResponseCachePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawGatewayResponseCachePropertiesImpl) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return s.gatewayResponseCacheProperties } -func unmarshalGatewayResponseCachePropertiesImplementation(input []byte) (GatewayResponseCacheProperties, error) { +func UnmarshalGatewayResponseCachePropertiesImplementation(input []byte) (GatewayResponseCacheProperties, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalGatewayResponseCachePropertiesImplementation(input []byte) (Gatewa return out, nil } - out := RawGatewayResponseCachePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseGatewayResponseCachePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGatewayResponseCachePropertiesImpl: %+v", err) } - return out, nil + + return RawGatewayResponseCachePropertiesImpl{ + gatewayResponseCacheProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_httpgetaction.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_httpgetaction.go index 702c4d0f29d..becd9aadb38 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_httpgetaction.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_httpgetaction.go @@ -15,6 +15,14 @@ type HTTPGetAction struct { Scheme *HTTPSchemeType `json:"scheme,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s HTTPGetAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = HTTPGetAction{} @@ -28,9 +36,10 @@ func (s HTTPGetAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPGetAction: %+v", err) } + decoded["type"] = "HTTPGetAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_jaruploadedusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_jaruploadedusersourceinfo.go index 2047480ff51..8b8eb662790 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_jaruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_jaruploadedusersourceinfo.go @@ -16,9 +16,18 @@ type JarUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s JarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = JarUploadedUserSourceInfo{} func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Jar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_keyvaultcertificateproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_keyvaultcertificateproperties.go index eb7b72af629..22d986dece6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_keyvaultcertificateproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_keyvaultcertificateproperties.go @@ -18,6 +18,7 @@ type KeyVaultCertificateProperties struct { VaultUri string `json:"vaultUri"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -26,6 +27,21 @@ type KeyVaultCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s KeyVaultCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = KeyVaultCertificateProperties{} @@ -39,9 +55,10 @@ func (s KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultCertificateProperties: %+v", err) } + decoded["type"] = "KeyVaultCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_maintenancescheduleconfiguration.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_maintenancescheduleconfiguration.go index 20d0e309f57..354ea816745 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_maintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_maintenancescheduleconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MaintenanceScheduleConfiguration interface { + MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl } -// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MaintenanceScheduleConfiguration = BaseMaintenanceScheduleConfigurationImpl{} + +type BaseMaintenanceScheduleConfigurationImpl struct { + Frequency Frequency `json:"frequency"` +} + +func (s BaseMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s +} + +var _ MaintenanceScheduleConfiguration = RawMaintenanceScheduleConfigurationImpl{} + +// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMaintenanceScheduleConfigurationImpl struct { - Type string - Values map[string]interface{} + maintenanceScheduleConfiguration BaseMaintenanceScheduleConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s.maintenanceScheduleConfiguration } -func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { +func UnmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (Main return out, nil } - out := RawMaintenanceScheduleConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseMaintenanceScheduleConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMaintenanceScheduleConfigurationImpl: %+v", err) } - return out, nil + + return RawMaintenanceScheduleConfigurationImpl{ + maintenanceScheduleConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go index b0951319715..7c52088222a 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type NetCoreZipUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s NetCoreZipUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = NetCoreZipUploadedUserSourceInfo{} func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetCoreZipUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "NetCoreZip" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probe.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probe.go index c59cb8825f1..856bba336ed 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probe.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probe.go @@ -40,7 +40,7 @@ func (s *Probe) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["probeAction"]; ok { - impl, err := unmarshalProbeActionImplementation(v) + impl, err := UnmarshalProbeActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProbeAction' for 'Probe': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probeaction.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probeaction.go index c6bb9d81bc2..ada397a242e 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probeaction.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_probeaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProbeAction interface { + ProbeAction() BaseProbeActionImpl } -// RawProbeActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProbeAction = BaseProbeActionImpl{} + +type BaseProbeActionImpl struct { + Type ProbeActionType `json:"type"` +} + +func (s BaseProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s +} + +var _ ProbeAction = RawProbeActionImpl{} + +// RawProbeActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProbeActionImpl struct { - Type string - Values map[string]interface{} + probeAction BaseProbeActionImpl + Type string + Values map[string]interface{} +} + +func (s RawProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s.probeAction } -func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { +func UnmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { return out, nil } - out := RawProbeActionImpl{ - Type: value, - Values: temp, + var parent BaseProbeActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProbeActionImpl: %+v", err) } - return out, nil + + return RawProbeActionImpl{ + probeAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_sourceuploadedusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_sourceuploadedusersourceinfo.go index 62fe9835ba0..d2c37f2a640 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_sourceuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_sourceuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type SourceUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SourceUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SourceUploadedUserSourceInfo{} func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SourceUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageaccount.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageaccount.go index 3dc49e5a074..6b25e6ecb18 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageaccount.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageaccount.go @@ -15,6 +15,14 @@ type StorageAccount struct { AccountName string `json:"accountName"` // Fields inherited from StorageProperties + + StorageType StorageType `json:"storageType"` +} + +func (s StorageAccount) StorageProperties() BaseStoragePropertiesImpl { + return BaseStoragePropertiesImpl{ + StorageType: s.StorageType, + } } var _ json.Marshaler = StorageAccount{} @@ -28,9 +36,10 @@ func (s StorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageAccount: %+v", err) } + decoded["storageType"] = "StorageAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageproperties.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageproperties.go index b73ed4d4d42..af7ab65c017 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageproperties.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageProperties interface { + StorageProperties() BaseStoragePropertiesImpl } -// RawStoragePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageProperties = BaseStoragePropertiesImpl{} + +type BaseStoragePropertiesImpl struct { + StorageType StorageType `json:"storageType"` +} + +func (s BaseStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s +} + +var _ StorageProperties = RawStoragePropertiesImpl{} + +// RawStoragePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoragePropertiesImpl struct { - Type string - Values map[string]interface{} + storageProperties BaseStoragePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s.storageProperties } -func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { +func UnmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, return out, nil } - out := RawStoragePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseStoragePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoragePropertiesImpl: %+v", err) } - return out, nil + + return RawStoragePropertiesImpl{ + storageProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageresource.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageresource.go index f09c491658e..1d325413d9c 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageresource.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_storageresource.go @@ -38,7 +38,7 @@ func (s *StorageResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalStoragePropertiesImplementation(v) + impl, err := UnmarshalStoragePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'StorageResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_tcpsocketaction.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_tcpsocketaction.go index a1edd6797d1..286aa3a4774 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_tcpsocketaction.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_tcpsocketaction.go @@ -13,6 +13,14 @@ var _ ProbeAction = TCPSocketAction{} type TCPSocketAction struct { // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s TCPSocketAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = TCPSocketAction{} @@ -26,9 +34,10 @@ func (s TCPSocketAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TCPSocketAction: %+v", err) } + decoded["type"] = "TCPSocketAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_usersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_usersourceinfo.go index d1ac05963f5..8dee9d4eda6 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_usersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_usersourceinfo.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UserSourceInfo interface { + UserSourceInfo() BaseUserSourceInfoImpl } -// RawUserSourceInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UserSourceInfo = BaseUserSourceInfoImpl{} + +type BaseUserSourceInfoImpl struct { + Type string `json:"type"` + Version *string `json:"version,omitempty"` +} + +func (s BaseUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s +} + +var _ UserSourceInfo = RawUserSourceInfoImpl{} + +// RawUserSourceInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUserSourceInfoImpl struct { - Type string - Values map[string]interface{} + userSourceInfo BaseUserSourceInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s.userSourceInfo } -func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { +func UnmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) return out, nil } - out := RawUserSourceInfoImpl{ - Type: value, - Values: temp, + var parent BaseUserSourceInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUserSourceInfoImpl: %+v", err) } - return out, nil + + return RawUserSourceInfoImpl{ + userSourceInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_waruploadedusersourceinfo.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_waruploadedusersourceinfo.go index cb19ff5cef5..34b188ecaa2 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_waruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_waruploadedusersourceinfo.go @@ -17,9 +17,18 @@ type WarUploadedUserSourceInfo struct { ServerVersion *string `json:"serverVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WarUploadedUserSourceInfo{} func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +40,10 @@ func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "War" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go index db1a4c4c91e..c97bbab6f60 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go @@ -16,6 +16,14 @@ type WeeklyMaintenanceScheduleConfiguration struct { Hour int64 `json:"hour"` // Fields inherited from MaintenanceScheduleConfiguration + + Frequency Frequency `json:"frequency"` +} + +func (s WeeklyMaintenanceScheduleConfiguration) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return BaseMaintenanceScheduleConfigurationImpl{ + Frequency: s.Frequency, + } } var _ json.Marshaler = WeeklyMaintenanceScheduleConfiguration{} @@ -29,9 +37,10 @@ func (s WeeklyMaintenanceScheduleConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WeeklyMaintenanceScheduleConfiguration: %+v", err) } + decoded["frequency"] = "Weekly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-11-01-preview/appplatform/version.go b/resource-manager/appplatform/2023-11-01-preview/appplatform/version.go index d12192051af..8e8a145a104 100644 --- a/resource-manager/appplatform/2023-11-01-preview/appplatform/version.go +++ b/resource-manager/appplatform/2023-11-01-preview/appplatform/version.go @@ -1,12 +1,10 @@ package appplatform -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appplatform/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appplatform/2023-11-01-preview" } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/README.md b/resource-manager/appplatform/2023-12-01/appplatform/README.md index cca460cc29d..28ab4cafeaf 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/README.md +++ b/resource-manager/appplatform/2023-12-01/appplatform/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2023-12-01/appplatform` Documentation -The `appplatform` SDK allows for interaction with the Azure Resource Manager Service `appplatform` (API Version `2023-12-01`). +The `appplatform` SDK allows for interaction with Azure Resource Manager `appplatform` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appplatform/2023-12-01/appplatform/client.go b/resource-manager/appplatform/2023-12-01/appplatform/client.go index c09305ed371..8165dad21d6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/client.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/client.go @@ -15,7 +15,7 @@ type AppPlatformClient struct { } func NewAppPlatformClientWithBaseURI(sdkApi sdkEnv.Api) (*AppPlatformClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appplatform", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appplatform", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppPlatformClient: %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_agentpool.go b/resource-manager/appplatform/2023-12-01/appplatform/id_agentpool.go index 8657bb20f0b..ea4ae1cb3e3 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_agentpool.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_agentpool.go @@ -46,7 +46,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_apiportal.go b/resource-manager/appplatform/2023-12-01/appplatform/id_apiportal.go index 077d4c0ff91..3246ae7bb6c 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_apiportal.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_apiportal.go @@ -44,7 +44,7 @@ func ParseApiPortalID(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiPortalIDInsensitively(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_apiportaldomain.go b/resource-manager/appplatform/2023-12-01/appplatform/id_apiportaldomain.go index c527abe1118..b27652c23b3 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_apiportaldomain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_apiportaldomain.go @@ -46,7 +46,7 @@ func ParseApiPortalDomainID(input string) (*ApiPortalDomainId, error) { } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiPortalDomainIDInsensitively(input string) (*ApiPortalDomainId, erro } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_apm.go b/resource-manager/appplatform/2023-12-01/appplatform/id_apm.go index 208aa38a0dd..ca5bfe1afac 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_apm.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_apm.go @@ -44,7 +44,7 @@ func ParseApmID(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApmIDInsensitively(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_app.go b/resource-manager/appplatform/2023-12-01/appplatform/id_app.go index 13d7ea03e3e..b9bb63a2c7f 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_app.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_app.go @@ -44,7 +44,7 @@ func ParseAppID(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppIDInsensitively(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_applicationaccelerator.go b/resource-manager/appplatform/2023-12-01/appplatform/id_applicationaccelerator.go index 941f5675086..e13cd61ff90 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_applicationaccelerator.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_applicationaccelerator.go @@ -44,7 +44,7 @@ func ParseApplicationAcceleratorID(input string) (*ApplicationAcceleratorId, err } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationAcceleratorIDInsensitively(input string) (*ApplicationAccel } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_applicationliveview.go b/resource-manager/appplatform/2023-12-01/appplatform/id_applicationliveview.go index 66c37ac2975..22cc26b6845 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_applicationliveview.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_applicationliveview.go @@ -44,7 +44,7 @@ func ParseApplicationLiveViewID(input string) (*ApplicationLiveViewId, error) { } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationLiveViewIDInsensitively(input string) (*ApplicationLiveView } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_binding.go b/resource-manager/appplatform/2023-12-01/appplatform/id_binding.go index cf5fa9d9c71..69548c11615 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_binding.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_binding.go @@ -46,7 +46,7 @@ func ParseBindingID(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBindingIDInsensitively(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_build.go b/resource-manager/appplatform/2023-12-01/appplatform/id_build.go index cacb0f627c0..a436d8c291c 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_build.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_build.go @@ -46,7 +46,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_builder.go b/resource-manager/appplatform/2023-12-01/appplatform/id_builder.go index c12dfe30877..81203fd2b64 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_builder.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_builder.go @@ -46,7 +46,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_buildpackbinding.go b/resource-manager/appplatform/2023-12-01/appplatform/id_buildpackbinding.go index 35d763e15e1..9c15e964d26 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_buildpackbinding.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_buildpackbinding.go @@ -48,7 +48,7 @@ func ParseBuildPackBindingID(input string) (*BuildPackBindingId, error) { } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBuildPackBindingIDInsensitively(input string) (*BuildPackBindingId, er } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_buildservice.go b/resource-manager/appplatform/2023-12-01/appplatform/id_buildservice.go index ca1f998143e..3189799970b 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_buildservice.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_buildservice.go @@ -44,7 +44,7 @@ func ParseBuildServiceID(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildServiceIDInsensitively(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_certificate.go b/resource-manager/appplatform/2023-12-01/appplatform/id_certificate.go index 30f1315f6b3..f53248bd3da 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_certificate.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_configurationservice.go b/resource-manager/appplatform/2023-12-01/appplatform/id_configurationservice.go index c9c6626d10c..e236ff68d6d 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_configurationservice.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_configurationservice.go @@ -44,7 +44,7 @@ func ParseConfigurationServiceID(input string) (*ConfigurationServiceId, error) } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationServiceIDInsensitively(input string) (*ConfigurationServi } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_containerregistry.go b/resource-manager/appplatform/2023-12-01/appplatform/id_containerregistry.go index 538c5498546..8414f03d1c2 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_containerregistry.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_containerregistry.go @@ -44,7 +44,7 @@ func ParseContainerRegistryID(input string) (*ContainerRegistryId, error) { } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerRegistryIDInsensitively(input string) (*ContainerRegistryId, } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_customizedaccelerator.go b/resource-manager/appplatform/2023-12-01/appplatform/id_customizedaccelerator.go index 5e78cd284e3..0617f545463 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_customizedaccelerator.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_customizedaccelerator.go @@ -46,7 +46,7 @@ func ParseCustomizedAcceleratorID(input string) (*CustomizedAcceleratorId, error } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCustomizedAcceleratorIDInsensitively(input string) (*CustomizedAcceler } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_deployment.go b/resource-manager/appplatform/2023-12-01/appplatform/id_deployment.go index 90d1ecacedf..7e7897fa577 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_deployment.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_devtoolportal.go b/resource-manager/appplatform/2023-12-01/appplatform/id_devtoolportal.go index b6214d25617..427096fb70f 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_devtoolportal.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_devtoolportal.go @@ -44,7 +44,7 @@ func ParseDevToolPortalID(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevToolPortalIDInsensitively(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_domain.go b/resource-manager/appplatform/2023-12-01/appplatform/id_domain.go index 51040d0f1a9..55595bf9d3a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_domain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_domain.go @@ -46,7 +46,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_gateway.go b/resource-manager/appplatform/2023-12-01/appplatform/id_gateway.go index b16062215f6..579edf57b79 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_gateway.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_gatewaydomain.go b/resource-manager/appplatform/2023-12-01/appplatform/id_gatewaydomain.go index c837a61f60d..a83fc1633be 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_gatewaydomain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_gatewaydomain.go @@ -46,7 +46,7 @@ func ParseGatewayDomainID(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayDomainIDInsensitively(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_location.go b/resource-manager/appplatform/2023-12-01/appplatform/id_location.go index 95cf5e0a899..1bbddd98255 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_location.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_predefinedaccelerator.go b/resource-manager/appplatform/2023-12-01/appplatform/id_predefinedaccelerator.go index 735e484e767..3b25e9ca790 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_predefinedaccelerator.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_predefinedaccelerator.go @@ -46,7 +46,7 @@ func ParsePredefinedAcceleratorID(input string) (*PredefinedAcceleratorId, error } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePredefinedAcceleratorIDInsensitively(input string) (*PredefinedAcceler } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_result.go b/resource-manager/appplatform/2023-12-01/appplatform/id_result.go index f39e5846020..368a6564fca 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_result.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_result.go @@ -48,7 +48,7 @@ func ParseResultID(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseResultIDInsensitively(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_routeconfig.go b/resource-manager/appplatform/2023-12-01/appplatform/id_routeconfig.go index 8918428a2ee..e5ab240721b 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_routeconfig.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_routeconfig.go @@ -46,7 +46,7 @@ func ParseRouteConfigID(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteConfigIDInsensitively(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_serviceregistry.go b/resource-manager/appplatform/2023-12-01/appplatform/id_serviceregistry.go index 6d5aee9654a..a6c4783abfb 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_serviceregistry.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_serviceregistry.go @@ -44,7 +44,7 @@ func ParseServiceRegistryID(input string) (*ServiceRegistryId, error) { } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceRegistryIDInsensitively(input string) (*ServiceRegistryId, erro } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_storage.go b/resource-manager/appplatform/2023-12-01/appplatform/id_storage.go index ccbfc4c15c8..06897b787df 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_storage.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_supportedbuildpack.go b/resource-manager/appplatform/2023-12-01/appplatform/id_supportedbuildpack.go index 4b908c8abb5..989d8e2fee7 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_supportedbuildpack.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_supportedbuildpack.go @@ -46,7 +46,7 @@ func ParseSupportedBuildPackID(input string) (*SupportedBuildPackId, error) { } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedBuildPackIDInsensitively(input string) (*SupportedBuildPackId } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/id_supportedstack.go b/resource-manager/appplatform/2023-12-01/appplatform/id_supportedstack.go index 1329f39d804..395a06752cb 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/id_supportedstack.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/id_supportedstack.go @@ -46,7 +46,7 @@ func ParseSupportedStackID(input string) (*SupportedStackId, error) { } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedStackIDInsensitively(input string) (*SupportedStackId, error) } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalcustomdomainsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalcustomdomainsget.go index 31162b86c76..ee2bbd322c2 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalcustomdomainsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalcustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalCustomDomainsGet(ctx context.Context, id Api var model ApiPortalCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsget.go index 674cb161de0..9dcaaa30ad8 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalsGet(ctx context.Context, id ApiPortalId) (r var model ApiPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsvalidatedomain.go b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsvalidatedomain.go index 9baf66398c9..18b39e239aa 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsvalidatedomain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_apiportalsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ApiPortalsValidateDomain(ctx context.Context, id ApiP var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_apmsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_apmsget.go index 0f0d937defc..f467f8eaaf3 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_apmsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_apmsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApmsGet(ctx context.Context, id ApmId) (result ApmsGe var model ApmResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_apmslistsecretkeys.go b/resource-manager/appplatform/2023-12-01/appplatform/method_apmslistsecretkeys.go index 74cf12911d4..5bd8219bd7a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_apmslistsecretkeys.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_apmslistsecretkeys.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ApmsListSecretKeys(ctx context.Context, id ApmId) (re var model ApmSecretKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_applicationacceleratorsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_applicationacceleratorsget.go index 809af6b1b2e..4b328230326 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_applicationacceleratorsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_applicationacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationAcceleratorsGet(ctx context.Context, id Ap var model ApplicationAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_applicationliveviewsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_applicationliveviewsget.go index 833ed7c87a8..2830fd1fdba 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_applicationliveviewsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_applicationliveviewsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationLiveViewsGet(ctx context.Context, id Appli var model ApplicationLiveViewResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_appsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_appsget.go index 4a53dd22ea4..3724e37ca47 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_appsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_appsget.go @@ -34,6 +34,7 @@ func (o AppsGetOperationOptions) ToHeaders() *client.Headers { func (o AppsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AppPlatformClient) AppsGet(ctx context.Context, id AppId, options AppsGe var model AppResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_appsgetresourceuploadurl.go b/resource-manager/appplatform/2023-12-01/appplatform/method_appsgetresourceuploadurl.go index 3893d74b4d0..6e1b2cd1650 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_appsgetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_appsgetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) AppsGetResourceUploadUrl(ctx context.Context, id AppI var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_appsvalidatedomain.go b/resource-manager/appplatform/2023-12-01/appplatform/method_appsvalidatedomain.go index 012f55c15f3..2e32bcfc251 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_appsvalidatedomain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_appsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) AppsValidateDomain(ctx context.Context, id AppId, inp var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_bindingsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_bindingsget.go index d2f0b1c572d..fd7934dd484 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_bindingsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_bindingsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BindingsGet(ctx context.Context, id BindingId) (resul var model BindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildpackbindingget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildpackbindingget.go index 46c526b6d26..9cb2a5754d5 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildpackbindingget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildpackbindingget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildpackBindingGet(ctx context.Context, id BuildPack var model BuildpackBindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildserviceagentpoolget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildserviceagentpoolget.go index 022f16023e8..5c09fcc1136 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildserviceagentpoolget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildserviceagentpoolget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceAgentPoolGet(ctx context.Context, id Agen var model BuildServiceAgentPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderget.go index 6970226423e..fc88a1423e7 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceBuilderGet(ctx context.Context, id Builde var model BuilderResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderlistdeployments.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderlistdeployments.go index 3bb23d15783..28662e9243e 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderlistdeployments.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicebuilderlistdeployments.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceBuilderListDeployments(ctx context.Contex var model DeploymentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicecreateorupdatebuild.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicecreateorupdatebuild.go index 81c5ebabc62..c8b22694446 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicecreateorupdatebuild.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicecreateorupdatebuild.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) BuildServiceCreateOrUpdateBuild(ctx context.Context, var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuild.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuild.go index 70c3079f914..3c1248a1c36 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuild.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuild.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuild(ctx context.Context, id BuildId) var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresult.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresult.go index 2a378c0c67c..d9cbe5b06af 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresult.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresult.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResult(ctx context.Context, id Re var model BuildResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresultlog.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresultlog.go index 465da5d9a2a..f025aeac949 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresultlog.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildresultlog.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResultLog(ctx context.Context, id var model BuildResultLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildservice.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildservice.go index 97fd62680cb..03017c3fdd8 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildservice.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetbuildservice.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildService(ctx context.Context, id B var model BuildService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetresourceuploadurl.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetresourceuploadurl.go index c6ebe1d77af..9708b701e43 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetresourceuploadurl.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetResourceUploadUrl(ctx context.Context, var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedbuildpack.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedbuildpack.go index 724fbad337a..e1f390735d4 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedbuildpack.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedbuildpack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedBuildpack(ctx context.Context var model SupportedBuildpackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedstack.go b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedstack.go index 63d59a7779e..6c8f254c7d1 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedstack.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_buildservicegetsupportedstack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedStack(ctx context.Context, id var model SupportedStackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_certificatesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_certificatesget.go index f7bef5eb376..402d3daf21f 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_certificatesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_certificatesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CertificatesGet(ctx context.Context, id CertificateId var model CertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_configserversget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_configserversget.go index 370c6ca9d47..9d926525ebb 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_configserversget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_configserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ConfigServersGet(ctx context.Context, id commonids.Sp var model ConfigServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_configurationservicesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_configurationservicesget.go index 73009c6355e..6182cda68a0 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_configurationservicesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_configurationservicesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ConfigurationServicesGet(ctx context.Context, id Conf var model ConfigurationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_containerregistriesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_containerregistriesget.go index 0854da5f8aa..721f5cf55c9 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_containerregistriesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_containerregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ContainerRegistriesGet(ctx context.Context, id Contai var model ContainerRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_customdomainsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_customdomainsget.go index 4ac146fcd80..5029cb05619 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_customdomainsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomDomainsGet(ctx context.Context, id DomainId) (r var model CustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_customizedacceleratorsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_customizedacceleratorsget.go index 93096eee0fa..7197ce868af 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_customizedacceleratorsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_customizedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsGet(ctx context.Context, id Cus var model CustomizedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsget.go index 41f7475d8cc..cfbf6da94b6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DeploymentsGet(ctx context.Context, id DeploymentId) var model DeploymentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetlogfileurl.go b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetlogfileurl.go index a4771e38445..674afbef641 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetlogfileurl.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetlogfileurl.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) DeploymentsGetLogFileUrl(ctx context.Context, id Depl var model LogFileUrlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetremotedebuggingconfig.go b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetremotedebuggingconfig.go index b319dd43fe6..6a8077b27f1 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetremotedebuggingconfig.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentsgetremotedebuggingconfig.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) DeploymentsGetRemoteDebuggingConfig(ctx context.Conte var model RemoteDebugging result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslist.go b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslist.go index 88cad05fed5..28e8b5c265b 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslist.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslist.go @@ -39,6 +39,7 @@ func (o DeploymentsListOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslistforcluster.go b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslistforcluster.go index 2496ba5da3f..9e8454491d5 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslistforcluster.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_deploymentslistforcluster.go @@ -41,6 +41,7 @@ func (o DeploymentsListForClusterOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListForClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_devtoolportalsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_devtoolportalsget.go index c3d25c11e37..6684c6d0332 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_devtoolportalsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_devtoolportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DevToolPortalsGet(ctx context.Context, id DevToolPort var model DevToolPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaycustomdomainsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaycustomdomainsget.go index e5ffc650511..64454f48288 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaycustomdomainsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaycustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayCustomDomainsGet(ctx context.Context, id Gatew var model GatewayCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayrouteconfigsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayrouteconfigsget.go index 961b30529c3..80376391849 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayrouteconfigsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayrouteconfigsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayRouteConfigsGet(ctx context.Context, id RouteC var model GatewayRouteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysget.go index 30d694c4e51..51ceea59d54 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewaysGet(ctx context.Context, id GatewayId) (resul var model GatewayResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayslistenvsecrets.go b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayslistenvsecrets.go index d7b9e50cd83..78b159baeab 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayslistenvsecrets.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewayslistenvsecrets.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) GatewaysListEnvSecrets(ctx context.Context, id Gatewa var model map[string]string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysvalidatedomain.go b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysvalidatedomain.go index c1b00963a14..dbac66d1ce6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysvalidatedomain.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_gatewaysvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) GatewaysValidateDomain(ctx context.Context, id Gatewa var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_monitoringsettingsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_monitoringsettingsget.go index 71aa5c6c5a1..0dcb42750cc 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_monitoringsettingsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_monitoringsettingsget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) MonitoringSettingsGet(ctx context.Context, id commoni var model MonitoringSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_predefinedacceleratorsget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_predefinedacceleratorsget.go index 2ed06cace03..91ada78ddf1 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_predefinedacceleratorsget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_predefinedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) PredefinedAcceleratorsGet(ctx context.Context, id Pre var model PredefinedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_runtimeversionslistruntimeversions.go b/resource-manager/appplatform/2023-12-01/appplatform/method_runtimeversionslistruntimeversions.go index fe9f0c3f689..81408df96f0 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_runtimeversionslistruntimeversions.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_runtimeversionslistruntimeversions.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) RuntimeVersionsListRuntimeVersions(ctx context.Contex var model AvailableRuntimeVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceregistriesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceregistriesget.go index 60b90a94cea..0259bd789c9 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceregistriesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ServiceRegistriesGet(ctx context.Context, id ServiceR var model ServiceRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceschecknameavailability.go b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceschecknameavailability.go index aca0efe340d..c43d41eefa6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceschecknameavailability.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ServicesCheckNameAvailability(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesenabletestendpoint.go b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesenabletestendpoint.go index 23adca57b75..1df588bc859 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesenabletestendpoint.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesenabletestendpoint.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesEnableTestEndpoint(ctx context.Context, id co var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesget.go index 31ccba1ca6e..cc3d2a0cae2 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesget.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ServicesGet(ctx context.Context, id commonids.SpringC var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslistgloballyenabledapms.go b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslistgloballyenabledapms.go index 6dd339d44c9..262011227cf 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslistgloballyenabledapms.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslistgloballyenabledapms.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListGloballyEnabledApms(ctx context.Context, var model GloballyEnabledApms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslisttestkeys.go b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslisttestkeys.go index 197dd28a1c8..7ccfa6d9aa4 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslisttestkeys.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_serviceslisttestkeys.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListTestKeys(ctx context.Context, id commonid var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesregeneratetestkey.go b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesregeneratetestkey.go index 664a0e6a4cc..f83c2cf2c59 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_servicesregeneratetestkey.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_servicesregeneratetestkey.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) ServicesRegenerateTestKey(ctx context.Context, id com var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/method_storagesget.go b/resource-manager/appplatform/2023-12-01/appplatform/method_storagesget.go index 6623c2f57ef..8e3bc1508f9 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/method_storagesget.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/method_storagesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) StoragesGet(ctx context.Context, id StorageId) (resul var model StorageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorauthsetting.go b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorauthsetting.go index 9f035ed61a3..27997c20e3f 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorauthsetting.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorauthsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AcceleratorAuthSetting interface { + AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl } -// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AcceleratorAuthSetting = BaseAcceleratorAuthSettingImpl{} + +type BaseAcceleratorAuthSettingImpl struct { + AuthType string `json:"authType"` +} + +func (s BaseAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s +} + +var _ AcceleratorAuthSetting = RawAcceleratorAuthSettingImpl{} + +// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAcceleratorAuthSettingImpl struct { - Type string - Values map[string]interface{} + acceleratorAuthSetting BaseAcceleratorAuthSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s.acceleratorAuthSetting } -func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { +func UnmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAut return out, nil } - out := RawAcceleratorAuthSettingImpl{ - Type: value, - Values: temp, + var parent BaseAcceleratorAuthSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAcceleratorAuthSettingImpl: %+v", err) } - return out, nil + + return RawAcceleratorAuthSettingImpl{ + acceleratorAuthSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorbasicauthsetting.go b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorbasicauthsetting.go index c26e9b76009..c8a4ac5dfdf 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorbasicauthsetting.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorbasicauthsetting.go @@ -16,6 +16,14 @@ type AcceleratorBasicAuthSetting struct { Username string `json:"username"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorBasicAuthSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorBasicAuthSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorBasicAuthSetting: %+v", err) } + decoded["authType"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorgitrepository.go b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorgitrepository.go index c5384079853..b0f8950cc0e 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorgitrepository.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorgitrepository.go @@ -40,7 +40,7 @@ func (s *AcceleratorGitRepository) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authSetting"]; ok { - impl, err := unmarshalAcceleratorAuthSettingImplementation(v) + impl, err := UnmarshalAcceleratorAuthSettingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthSetting' for 'AcceleratorGitRepository': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorpublicsetting.go b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorpublicsetting.go index 8f2526b39b9..ceddf807fd1 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorpublicsetting.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorpublicsetting.go @@ -14,6 +14,14 @@ type AcceleratorPublicSetting struct { CaCertResourceId *string `json:"caCertResourceId,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorPublicSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorPublicSetting{} @@ -27,9 +35,10 @@ func (s AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorPublicSetting: %+v", err) } + decoded["authType"] = "Public" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorsshsetting.go b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorsshsetting.go index 257c4615505..9206fb45e17 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorsshsetting.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_acceleratorsshsetting.go @@ -16,6 +16,14 @@ type AcceleratorSshSetting struct { PrivateKey *string `json:"privateKey,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorSshSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorSshSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorSshSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorSshSetting: %+v", err) } + decoded["authType"] = "SSH" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_azurefilevolume.go b/resource-manager/appplatform/2023-12-01/appplatform/model_azurefilevolume.go index 6111b3c0321..a8d1838313a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_azurefilevolume.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_azurefilevolume.go @@ -14,10 +14,22 @@ type AzureFileVolume struct { ShareName *string `json:"shareName,omitempty"` // Fields inherited from CustomPersistentDiskProperties + EnableSubPath *bool `json:"enableSubPath,omitempty"` MountOptions *[]string `json:"mountOptions,omitempty"` MountPath string `json:"mountPath"` ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s AzureFileVolume) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return BaseCustomPersistentDiskPropertiesImpl{ + EnableSubPath: s.EnableSubPath, + MountOptions: s.MountOptions, + MountPath: s.MountPath, + ReadOnly: s.ReadOnly, + Type: s.Type, + } } var _ json.Marshaler = AzureFileVolume{} @@ -31,9 +43,10 @@ func (s AzureFileVolume) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileVolume: %+v", err) } + decoded["type"] = "AzureFileVolume" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_buildresultusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_buildresultusersourceinfo.go index 8591e159186..c0221f1525b 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_buildresultusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_buildresultusersourceinfo.go @@ -14,9 +14,18 @@ type BuildResultUserSourceInfo struct { BuildResultId *string `json:"buildResultId,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s BuildResultUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = BuildResultUserSourceInfo{} func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuildResultUserSourceInfo: %+v", err) } + decoded["type"] = "BuildResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_certificateproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_certificateproperties.go index 804bcf82962..911f092fcd1 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_certificateproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_certificateproperties.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CertificateProperties interface { + CertificateProperties() BaseCertificatePropertiesImpl } -// RawCertificatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CertificateProperties = BaseCertificatePropertiesImpl{} + +type BaseCertificatePropertiesImpl struct { + ActivateDate *string `json:"activateDate,omitempty"` + DnsNames *[]string `json:"dnsNames,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + IssuedDate *string `json:"issuedDate,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` + SubjectName *string `json:"subjectName,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s BaseCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s +} + +var _ CertificateProperties = RawCertificatePropertiesImpl{} + +// RawCertificatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCertificatePropertiesImpl struct { - Type string - Values map[string]interface{} + certificateProperties BaseCertificatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s.certificateProperties } -func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { +func UnmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProp return out, nil } - out := RawCertificatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCertificatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCertificatePropertiesImpl: %+v", err) } - return out, nil + + return RawCertificatePropertiesImpl{ + certificateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_certificateresource.go b/resource-manager/appplatform/2023-12-01/appplatform/model_certificateresource.go index 440cbc2881f..b5c61f2045a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_certificateresource.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_certificateresource.go @@ -38,7 +38,7 @@ func (s *CertificateResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalCertificatePropertiesImplementation(v) + impl, err := UnmarshalCertificatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'CertificateResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrybasiccredentials.go b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrybasiccredentials.go index af8eb053409..a5f9bcfb6a0 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrybasiccredentials.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrybasiccredentials.go @@ -16,6 +16,14 @@ type ContainerRegistryBasicCredentials struct { Username string `json:"username"` // Fields inherited from ContainerRegistryCredentials + + Type string `json:"type"` +} + +func (s ContainerRegistryBasicCredentials) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return BaseContainerRegistryCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ContainerRegistryBasicCredentials{} @@ -29,9 +37,10 @@ func (s ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContainerRegistryBasicCredentials: %+v", err) } + decoded["type"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrycredentials.go b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrycredentials.go index 84918f1d125..d682a4e385a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrycredentials.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistrycredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContainerRegistryCredentials interface { + ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl } -// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContainerRegistryCredentials = BaseContainerRegistryCredentialsImpl{} + +type BaseContainerRegistryCredentialsImpl struct { + Type string `json:"type"` +} + +func (s BaseContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s +} + +var _ ContainerRegistryCredentials = RawContainerRegistryCredentialsImpl{} + +// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContainerRegistryCredentialsImpl struct { - Type string - Values map[string]interface{} + containerRegistryCredentials BaseContainerRegistryCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s.containerRegistryCredentials } -func unmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { +func UnmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalContainerRegistryCredentialsImplementation(input []byte) (Containe return out, nil } - out := RawContainerRegistryCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseContainerRegistryCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContainerRegistryCredentialsImpl: %+v", err) } - return out, nil + + return RawContainerRegistryCredentialsImpl{ + containerRegistryCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistryproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistryproperties.go index 4a1e18b8583..519d019857b 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistryproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_containerregistryproperties.go @@ -30,7 +30,7 @@ func (s *ContainerRegistryProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalContainerRegistryCredentialsImplementation(v) + impl, err := UnmarshalContainerRegistryCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'ContainerRegistryProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_contentcertificateproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_contentcertificateproperties.go index d6f7a6110fd..f6fb41bdbcd 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_contentcertificateproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_contentcertificateproperties.go @@ -14,6 +14,7 @@ type ContentCertificateProperties struct { Content *string `json:"content,omitempty"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -22,6 +23,21 @@ type ContentCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s ContentCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = ContentCertificateProperties{} @@ -35,9 +51,10 @@ func (s ContentCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentCertificateProperties: %+v", err) } + decoded["type"] = "ContentCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_customcontainerusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_customcontainerusersourceinfo.go index 8411b51a62c..4140c24d62c 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_customcontainerusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_customcontainerusersourceinfo.go @@ -14,9 +14,18 @@ type CustomContainerUserSourceInfo struct { CustomContainer *CustomContainer `json:"customContainer,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CustomContainerUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CustomContainerUserSourceInfo{} func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomContainerUserSourceInfo: %+v", err) } + decoded["type"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskproperties.go index be9da2ff053..d5ba1eaf9b7 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomPersistentDiskProperties interface { + CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl } -// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomPersistentDiskProperties = BaseCustomPersistentDiskPropertiesImpl{} + +type BaseCustomPersistentDiskPropertiesImpl struct { + EnableSubPath *bool `json:"enableSubPath,omitempty"` + MountOptions *[]string `json:"mountOptions,omitempty"` + MountPath string `json:"mountPath"` + ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s BaseCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s +} + +var _ CustomPersistentDiskProperties = RawCustomPersistentDiskPropertiesImpl{} + +// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomPersistentDiskPropertiesImpl struct { - Type string - Values map[string]interface{} + customPersistentDiskProperties BaseCustomPersistentDiskPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s.customPersistentDiskProperties } -func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { +func UnmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { if input == nil { return nil, nil } @@ -44,10 +65,15 @@ func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (Custom return out, nil } - out := RawCustomPersistentDiskPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCustomPersistentDiskPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomPersistentDiskPropertiesImpl: %+v", err) } - return out, nil + + return RawCustomPersistentDiskPropertiesImpl{ + customPersistentDiskProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskresource.go b/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskresource.go index 7a111d5c250..29be71bc7c6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskresource.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_custompersistentdiskresource.go @@ -30,7 +30,7 @@ func (s *CustomPersistentDiskResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customPersistentDiskProperties"]; ok { - impl, err := unmarshalCustomPersistentDiskPropertiesImplementation(v) + impl, err := UnmarshalCustomPersistentDiskPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomPersistentDiskProperties' for 'CustomPersistentDiskResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_deploymentresourceproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_deploymentresourceproperties.go index 145d0197843..5fd11657897 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_deploymentresourceproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_deploymentresourceproperties.go @@ -38,7 +38,7 @@ func (s *DeploymentResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalUserSourceInfoImplementation(v) + impl, err := UnmarshalUserSourceInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'DeploymentResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_execaction.go b/resource-manager/appplatform/2023-12-01/appplatform/model_execaction.go index 6a220bef9b9..45312ffa5da 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_execaction.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_execaction.go @@ -14,6 +14,14 @@ type ExecAction struct { Command *[]string `json:"command,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s ExecAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = ExecAction{} @@ -27,9 +35,10 @@ func (s ExecAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecAction: %+v", err) } + decoded["type"] = "ExecAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_httpgetaction.go b/resource-manager/appplatform/2023-12-01/appplatform/model_httpgetaction.go index 702c4d0f29d..becd9aadb38 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_httpgetaction.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_httpgetaction.go @@ -15,6 +15,14 @@ type HTTPGetAction struct { Scheme *HTTPSchemeType `json:"scheme,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s HTTPGetAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = HTTPGetAction{} @@ -28,9 +36,10 @@ func (s HTTPGetAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPGetAction: %+v", err) } + decoded["type"] = "HTTPGetAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_jaruploadedusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_jaruploadedusersourceinfo.go index 2047480ff51..8b8eb662790 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_jaruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_jaruploadedusersourceinfo.go @@ -16,9 +16,18 @@ type JarUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s JarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = JarUploadedUserSourceInfo{} func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Jar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_keyvaultcertificateproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_keyvaultcertificateproperties.go index eb7b72af629..22d986dece6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_keyvaultcertificateproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_keyvaultcertificateproperties.go @@ -18,6 +18,7 @@ type KeyVaultCertificateProperties struct { VaultUri string `json:"vaultUri"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -26,6 +27,21 @@ type KeyVaultCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s KeyVaultCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = KeyVaultCertificateProperties{} @@ -39,9 +55,10 @@ func (s KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultCertificateProperties: %+v", err) } + decoded["type"] = "KeyVaultCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_netcorezipuploadedusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_netcorezipuploadedusersourceinfo.go index b0951319715..7c52088222a 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_netcorezipuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_netcorezipuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type NetCoreZipUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s NetCoreZipUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = NetCoreZipUploadedUserSourceInfo{} func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetCoreZipUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "NetCoreZip" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_probe.go b/resource-manager/appplatform/2023-12-01/appplatform/model_probe.go index c59cb8825f1..856bba336ed 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_probe.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_probe.go @@ -40,7 +40,7 @@ func (s *Probe) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["probeAction"]; ok { - impl, err := unmarshalProbeActionImplementation(v) + impl, err := UnmarshalProbeActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProbeAction' for 'Probe': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_probeaction.go b/resource-manager/appplatform/2023-12-01/appplatform/model_probeaction.go index c6bb9d81bc2..ada397a242e 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_probeaction.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_probeaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProbeAction interface { + ProbeAction() BaseProbeActionImpl } -// RawProbeActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProbeAction = BaseProbeActionImpl{} + +type BaseProbeActionImpl struct { + Type ProbeActionType `json:"type"` +} + +func (s BaseProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s +} + +var _ ProbeAction = RawProbeActionImpl{} + +// RawProbeActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProbeActionImpl struct { - Type string - Values map[string]interface{} + probeAction BaseProbeActionImpl + Type string + Values map[string]interface{} +} + +func (s RawProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s.probeAction } -func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { +func UnmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { return out, nil } - out := RawProbeActionImpl{ - Type: value, - Values: temp, + var parent BaseProbeActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProbeActionImpl: %+v", err) } - return out, nil + + return RawProbeActionImpl{ + probeAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_sourceuploadedusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_sourceuploadedusersourceinfo.go index 62fe9835ba0..d2c37f2a640 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_sourceuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_sourceuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type SourceUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SourceUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SourceUploadedUserSourceInfo{} func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SourceUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_storageaccount.go b/resource-manager/appplatform/2023-12-01/appplatform/model_storageaccount.go index 3dc49e5a074..6b25e6ecb18 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_storageaccount.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_storageaccount.go @@ -15,6 +15,14 @@ type StorageAccount struct { AccountName string `json:"accountName"` // Fields inherited from StorageProperties + + StorageType StorageType `json:"storageType"` +} + +func (s StorageAccount) StorageProperties() BaseStoragePropertiesImpl { + return BaseStoragePropertiesImpl{ + StorageType: s.StorageType, + } } var _ json.Marshaler = StorageAccount{} @@ -28,9 +36,10 @@ func (s StorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageAccount: %+v", err) } + decoded["storageType"] = "StorageAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_storageproperties.go b/resource-manager/appplatform/2023-12-01/appplatform/model_storageproperties.go index b73ed4d4d42..af7ab65c017 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_storageproperties.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_storageproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageProperties interface { + StorageProperties() BaseStoragePropertiesImpl } -// RawStoragePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageProperties = BaseStoragePropertiesImpl{} + +type BaseStoragePropertiesImpl struct { + StorageType StorageType `json:"storageType"` +} + +func (s BaseStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s +} + +var _ StorageProperties = RawStoragePropertiesImpl{} + +// RawStoragePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoragePropertiesImpl struct { - Type string - Values map[string]interface{} + storageProperties BaseStoragePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s.storageProperties } -func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { +func UnmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, return out, nil } - out := RawStoragePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseStoragePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoragePropertiesImpl: %+v", err) } - return out, nil + + return RawStoragePropertiesImpl{ + storageProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_storageresource.go b/resource-manager/appplatform/2023-12-01/appplatform/model_storageresource.go index f09c491658e..1d325413d9c 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_storageresource.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_storageresource.go @@ -38,7 +38,7 @@ func (s *StorageResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalStoragePropertiesImplementation(v) + impl, err := UnmarshalStoragePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'StorageResource': %+v", err) } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_tcpsocketaction.go b/resource-manager/appplatform/2023-12-01/appplatform/model_tcpsocketaction.go index a1edd6797d1..286aa3a4774 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_tcpsocketaction.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_tcpsocketaction.go @@ -13,6 +13,14 @@ var _ ProbeAction = TCPSocketAction{} type TCPSocketAction struct { // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s TCPSocketAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = TCPSocketAction{} @@ -26,9 +34,10 @@ func (s TCPSocketAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TCPSocketAction: %+v", err) } + decoded["type"] = "TCPSocketAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_usersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_usersourceinfo.go index d1ac05963f5..8dee9d4eda6 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_usersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_usersourceinfo.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UserSourceInfo interface { + UserSourceInfo() BaseUserSourceInfoImpl } -// RawUserSourceInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UserSourceInfo = BaseUserSourceInfoImpl{} + +type BaseUserSourceInfoImpl struct { + Type string `json:"type"` + Version *string `json:"version,omitempty"` +} + +func (s BaseUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s +} + +var _ UserSourceInfo = RawUserSourceInfoImpl{} + +// RawUserSourceInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUserSourceInfoImpl struct { - Type string - Values map[string]interface{} + userSourceInfo BaseUserSourceInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s.userSourceInfo } -func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { +func UnmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) return out, nil } - out := RawUserSourceInfoImpl{ - Type: value, - Values: temp, + var parent BaseUserSourceInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUserSourceInfoImpl: %+v", err) } - return out, nil + + return RawUserSourceInfoImpl{ + userSourceInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2023-12-01/appplatform/model_waruploadedusersourceinfo.go b/resource-manager/appplatform/2023-12-01/appplatform/model_waruploadedusersourceinfo.go index cb19ff5cef5..34b188ecaa2 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/model_waruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/model_waruploadedusersourceinfo.go @@ -17,9 +17,18 @@ type WarUploadedUserSourceInfo struct { ServerVersion *string `json:"serverVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WarUploadedUserSourceInfo{} func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +40,10 @@ func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "War" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2023-12-01/appplatform/version.go b/resource-manager/appplatform/2023-12-01/appplatform/version.go index d8df01738f7..e70c88ab959 100644 --- a/resource-manager/appplatform/2023-12-01/appplatform/version.go +++ b/resource-manager/appplatform/2023-12-01/appplatform/version.go @@ -1,12 +1,10 @@ package appplatform -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appplatform/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appplatform/2023-12-01" } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/README.md b/resource-manager/appplatform/2024-01-01-preview/appplatform/README.md index 715d9554a72..051cf414f48 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/README.md +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/appplatform/2024-01-01-preview/appplatform` Documentation -The `appplatform` SDK allows for interaction with the Azure Resource Manager Service `appplatform` (API Version `2024-01-01-preview`). +The `appplatform` SDK allows for interaction with Azure Resource Manager `appplatform` (API Version `2024-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/client.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/client.go index c09305ed371..8165dad21d6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/client.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/client.go @@ -15,7 +15,7 @@ type AppPlatformClient struct { } func NewAppPlatformClientWithBaseURI(sdkApi sdkEnv.Api) (*AppPlatformClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appplatform", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appplatform", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppPlatformClient: %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_agentpool.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_agentpool.go index 8657bb20f0b..ea4ae1cb3e3 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_agentpool.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_agentpool.go @@ -46,7 +46,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportal.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportal.go index 077d4c0ff91..3246ae7bb6c 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportal.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportal.go @@ -44,7 +44,7 @@ func ParseApiPortalID(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiPortalIDInsensitively(input string) (*ApiPortalId, error) { } id := ApiPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportaldomain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportaldomain.go index c527abe1118..b27652c23b3 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportaldomain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apiportaldomain.go @@ -46,7 +46,7 @@ func ParseApiPortalDomainID(input string) (*ApiPortalDomainId, error) { } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApiPortalDomainIDInsensitively(input string) (*ApiPortalDomainId, erro } id := ApiPortalDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apm.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apm.go index 208aa38a0dd..ca5bfe1afac 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apm.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_apm.go @@ -44,7 +44,7 @@ func ParseApmID(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApmIDInsensitively(input string) (*ApmId, error) { } id := ApmId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_app.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_app.go index 13d7ea03e3e..b9bb63a2c7f 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_app.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_app.go @@ -44,7 +44,7 @@ func ParseAppID(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppIDInsensitively(input string) (*AppId, error) { } id := AppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationaccelerator.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationaccelerator.go index 941f5675086..e13cd61ff90 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationaccelerator.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationaccelerator.go @@ -44,7 +44,7 @@ func ParseApplicationAcceleratorID(input string) (*ApplicationAcceleratorId, err } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationAcceleratorIDInsensitively(input string) (*ApplicationAccel } id := ApplicationAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationliveview.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationliveview.go index 66c37ac2975..22cc26b6845 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationliveview.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_applicationliveview.go @@ -44,7 +44,7 @@ func ParseApplicationLiveViewID(input string) (*ApplicationLiveViewId, error) { } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationLiveViewIDInsensitively(input string) (*ApplicationLiveView } id := ApplicationLiveViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_binding.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_binding.go index cf5fa9d9c71..69548c11615 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_binding.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_binding.go @@ -46,7 +46,7 @@ func ParseBindingID(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBindingIDInsensitively(input string) (*BindingId, error) { } id := BindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_build.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_build.go index cacb0f627c0..a436d8c291c 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_build.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_build.go @@ -46,7 +46,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_builder.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_builder.go index c12dfe30877..81203fd2b64 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_builder.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_builder.go @@ -46,7 +46,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildpackbinding.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildpackbinding.go index 35d763e15e1..9c15e964d26 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildpackbinding.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildpackbinding.go @@ -48,7 +48,7 @@ func ParseBuildPackBindingID(input string) (*BuildPackBindingId, error) { } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBuildPackBindingIDInsensitively(input string) (*BuildPackBindingId, er } id := BuildPackBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildservice.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildservice.go index ca1f998143e..3189799970b 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildservice.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_buildservice.go @@ -44,7 +44,7 @@ func ParseBuildServiceID(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildServiceIDInsensitively(input string) (*BuildServiceId, error) { } id := BuildServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_certificate.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_certificate.go index 30f1315f6b3..f53248bd3da 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_certificate.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_configurationservice.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_configurationservice.go index c9c6626d10c..e236ff68d6d 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_configurationservice.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_configurationservice.go @@ -44,7 +44,7 @@ func ParseConfigurationServiceID(input string) (*ConfigurationServiceId, error) } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationServiceIDInsensitively(input string) (*ConfigurationServi } id := ConfigurationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_containerregistry.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_containerregistry.go index 538c5498546..8414f03d1c2 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_containerregistry.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_containerregistry.go @@ -44,7 +44,7 @@ func ParseContainerRegistryID(input string) (*ContainerRegistryId, error) { } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerRegistryIDInsensitively(input string) (*ContainerRegistryId, } id := ContainerRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_customizedaccelerator.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_customizedaccelerator.go index 5e78cd284e3..0617f545463 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_customizedaccelerator.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_customizedaccelerator.go @@ -46,7 +46,7 @@ func ParseCustomizedAcceleratorID(input string) (*CustomizedAcceleratorId, error } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCustomizedAcceleratorIDInsensitively(input string) (*CustomizedAcceler } id := CustomizedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_deployment.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_deployment.go index 90d1ecacedf..7e7897fa577 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_deployment.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_devtoolportal.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_devtoolportal.go index b6214d25617..427096fb70f 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_devtoolportal.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_devtoolportal.go @@ -44,7 +44,7 @@ func ParseDevToolPortalID(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevToolPortalIDInsensitively(input string) (*DevToolPortalId, error) { } id := DevToolPortalId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_domain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_domain.go index 51040d0f1a9..55595bf9d3a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_domain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_domain.go @@ -46,7 +46,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gateway.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gateway.go index b16062215f6..579edf57b79 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gateway.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gatewaydomain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gatewaydomain.go index c837a61f60d..a83fc1633be 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gatewaydomain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_gatewaydomain.go @@ -46,7 +46,7 @@ func ParseGatewayDomainID(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayDomainIDInsensitively(input string) (*GatewayDomainId, error) { } id := GatewayDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_location.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_location.go index 95cf5e0a899..1bbddd98255 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_location.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_predefinedaccelerator.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_predefinedaccelerator.go index 735e484e767..3b25e9ca790 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_predefinedaccelerator.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_predefinedaccelerator.go @@ -46,7 +46,7 @@ func ParsePredefinedAcceleratorID(input string) (*PredefinedAcceleratorId, error } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePredefinedAcceleratorIDInsensitively(input string) (*PredefinedAcceler } id := PredefinedAcceleratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_result.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_result.go index f39e5846020..368a6564fca 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_result.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_result.go @@ -48,7 +48,7 @@ func ParseResultID(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseResultIDInsensitively(input string) (*ResultId, error) { } id := ResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_routeconfig.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_routeconfig.go index 8918428a2ee..e5ab240721b 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_routeconfig.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_routeconfig.go @@ -46,7 +46,7 @@ func ParseRouteConfigID(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteConfigIDInsensitively(input string) (*RouteConfigId, error) { } id := RouteConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_serviceregistry.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_serviceregistry.go index 6d5aee9654a..a6c4783abfb 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_serviceregistry.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_serviceregistry.go @@ -44,7 +44,7 @@ func ParseServiceRegistryID(input string) (*ServiceRegistryId, error) { } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceRegistryIDInsensitively(input string) (*ServiceRegistryId, erro } id := ServiceRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_storage.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_storage.go index ccbfc4c15c8..06897b787df 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_storage.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedbuildpack.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedbuildpack.go index 4b908c8abb5..989d8e2fee7 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedbuildpack.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedbuildpack.go @@ -46,7 +46,7 @@ func ParseSupportedBuildPackID(input string) (*SupportedBuildPackId, error) { } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedBuildPackIDInsensitively(input string) (*SupportedBuildPackId } id := SupportedBuildPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedstack.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedstack.go index 1329f39d804..395a06752cb 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedstack.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/id_supportedstack.go @@ -46,7 +46,7 @@ func ParseSupportedStackID(input string) (*SupportedStackId, error) { } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSupportedStackIDInsensitively(input string) (*SupportedStackId, error) } id := SupportedStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalcustomdomainsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalcustomdomainsget.go index 31162b86c76..ee2bbd322c2 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalcustomdomainsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalcustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalCustomDomainsGet(ctx context.Context, id Api var model ApiPortalCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsget.go index 674cb161de0..9dcaaa30ad8 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApiPortalsGet(ctx context.Context, id ApiPortalId) (r var model ApiPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsvalidatedomain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsvalidatedomain.go index 9baf66398c9..18b39e239aa 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsvalidatedomain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apiportalsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ApiPortalsValidateDomain(ctx context.Context, id ApiP var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmsget.go index 0f0d937defc..f467f8eaaf3 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApmsGet(ctx context.Context, id ApmId) (result ApmsGe var model ApmResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmslistsecretkeys.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmslistsecretkeys.go index 74cf12911d4..5bd8219bd7a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmslistsecretkeys.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_apmslistsecretkeys.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ApmsListSecretKeys(ctx context.Context, id ApmId) (re var model ApmSecretKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationacceleratorsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationacceleratorsget.go index 809af6b1b2e..4b328230326 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationacceleratorsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationAcceleratorsGet(ctx context.Context, id Ap var model ApplicationAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationliveviewsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationliveviewsget.go index 833ed7c87a8..2830fd1fdba 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationliveviewsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_applicationliveviewsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ApplicationLiveViewsGet(ctx context.Context, id Appli var model ApplicationLiveViewResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsget.go index 4a53dd22ea4..3724e37ca47 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsget.go @@ -34,6 +34,7 @@ func (o AppsGetOperationOptions) ToHeaders() *client.Headers { func (o AppsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AppPlatformClient) AppsGet(ctx context.Context, id AppId, options AppsGe var model AppResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsgetresourceuploadurl.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsgetresourceuploadurl.go index 3893d74b4d0..6e1b2cd1650 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsgetresourceuploadurl.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsgetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) AppsGetResourceUploadUrl(ctx context.Context, id AppI var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsvalidatedomain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsvalidatedomain.go index 012f55c15f3..2e32bcfc251 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsvalidatedomain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_appsvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) AppsValidateDomain(ctx context.Context, id AppId, inp var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_bindingsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_bindingsget.go index d2f0b1c572d..fd7934dd484 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_bindingsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_bindingsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BindingsGet(ctx context.Context, id BindingId) (resul var model BindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildpackbindingget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildpackbindingget.go index 46c526b6d26..9cb2a5754d5 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildpackbindingget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildpackbindingget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildpackBindingGet(ctx context.Context, id BuildPack var model BuildpackBindingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildserviceagentpoolget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildserviceagentpoolget.go index 022f16023e8..5c09fcc1136 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildserviceagentpoolget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildserviceagentpoolget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceAgentPoolGet(ctx context.Context, id Agen var model BuildServiceAgentPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderget.go index 6970226423e..fc88a1423e7 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceBuilderGet(ctx context.Context, id Builde var model BuilderResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderlistdeployments.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderlistdeployments.go index 3bb23d15783..28662e9243e 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderlistdeployments.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicebuilderlistdeployments.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceBuilderListDeployments(ctx context.Contex var model DeploymentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicecreateorupdatebuild.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicecreateorupdatebuild.go index 81c5ebabc62..c8b22694446 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicecreateorupdatebuild.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicecreateorupdatebuild.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) BuildServiceCreateOrUpdateBuild(ctx context.Context, var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuild.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuild.go index 70c3079f914..3c1248a1c36 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuild.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuild.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuild(ctx context.Context, id BuildId) var model Build result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresult.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresult.go index 2a378c0c67c..d9cbe5b06af 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresult.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresult.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResult(ctx context.Context, id Re var model BuildResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresultlog.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresultlog.go index 465da5d9a2a..f025aeac949 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresultlog.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildresultlog.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetBuildResultLog(ctx context.Context, id var model BuildResultLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildservice.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildservice.go index 97fd62680cb..03017c3fdd8 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildservice.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetbuildservice.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetBuildService(ctx context.Context, id B var model BuildService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetresourceuploadurl.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetresourceuploadurl.go index c6ebe1d77af..9708b701e43 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetresourceuploadurl.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetresourceuploadurl.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) BuildServiceGetResourceUploadUrl(ctx context.Context, var model ResourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go index 724fbad337a..e1f390735d4 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedbuildpack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedBuildpack(ctx context.Context var model SupportedBuildpackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedstack.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedstack.go index 63d59a7779e..6c8f254c7d1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedstack.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_buildservicegetsupportedstack.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) BuildServiceGetSupportedStack(ctx context.Context, id var model SupportedStackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_certificatesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_certificatesget.go index f7bef5eb376..402d3daf21f 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_certificatesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_certificatesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CertificatesGet(ctx context.Context, id CertificateId var model CertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configserversget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configserversget.go index 370c6ca9d47..9d926525ebb 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configserversget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ConfigServersGet(ctx context.Context, id commonids.Sp var model ConfigServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configurationservicesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configurationservicesget.go index 73009c6355e..6182cda68a0 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configurationservicesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_configurationservicesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ConfigurationServicesGet(ctx context.Context, id Conf var model ConfigurationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_containerregistriesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_containerregistriesget.go index 0854da5f8aa..721f5cf55c9 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_containerregistriesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_containerregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ContainerRegistriesGet(ctx context.Context, id Contai var model ContainerRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customdomainsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customdomainsget.go index 4ac146fcd80..5029cb05619 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customdomainsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomDomainsGet(ctx context.Context, id DomainId) (r var model CustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customizedacceleratorsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customizedacceleratorsget.go index 93096eee0fa..7197ce868af 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customizedacceleratorsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_customizedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) CustomizedAcceleratorsGet(ctx context.Context, id Cus var model CustomizedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsget.go index 41f7475d8cc..cfbf6da94b6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DeploymentsGet(ctx context.Context, id DeploymentId) var model DeploymentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetlogfileurl.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetlogfileurl.go index a4771e38445..674afbef641 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetlogfileurl.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetlogfileurl.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) DeploymentsGetLogFileUrl(ctx context.Context, id Depl var model LogFileUrlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go index b319dd43fe6..6a8077b27f1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentsgetremotedebuggingconfig.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) DeploymentsGetRemoteDebuggingConfig(ctx context.Conte var model RemoteDebugging result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslist.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslist.go index 9f59eb8df5c..c0f57dc7744 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslist.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslist.go @@ -40,6 +40,7 @@ func (o DeploymentsListOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslistforcluster.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslistforcluster.go index 2496ba5da3f..9e8454491d5 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslistforcluster.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_deploymentslistforcluster.go @@ -41,6 +41,7 @@ func (o DeploymentsListForClusterOperationOptions) ToHeaders() *client.Headers { func (o DeploymentsListForClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_devtoolportalsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_devtoolportalsget.go index c3d25c11e37..6684c6d0332 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_devtoolportalsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_devtoolportalsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) DevToolPortalsGet(ctx context.Context, id DevToolPort var model DevToolPortalResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_eurekaserversget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_eurekaserversget.go index f18f93980c6..18a319e61bb 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_eurekaserversget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_eurekaserversget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) EurekaServersGet(ctx context.Context, id commonids.Sp var model EurekaServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaycustomdomainsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaycustomdomainsget.go index e5ffc650511..64454f48288 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaycustomdomainsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaycustomdomainsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayCustomDomainsGet(ctx context.Context, id Gatew var model GatewayCustomDomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayrouteconfigsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayrouteconfigsget.go index 961b30529c3..80376391849 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayrouteconfigsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayrouteconfigsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewayRouteConfigsGet(ctx context.Context, id RouteC var model GatewayRouteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysget.go index 30d694c4e51..51ceea59d54 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) GatewaysGet(ctx context.Context, id GatewayId) (resul var model GatewayResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayslistenvsecrets.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayslistenvsecrets.go index d7b9e50cd83..78b159baeab 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayslistenvsecrets.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewayslistenvsecrets.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) GatewaysListEnvSecrets(ctx context.Context, id Gatewa var model map[string]string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysvalidatedomain.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysvalidatedomain.go index c1b00963a14..dbac66d1ce6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysvalidatedomain.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_gatewaysvalidatedomain.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) GatewaysValidateDomain(ctx context.Context, id Gatewa var model CustomDomainValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_monitoringsettingsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_monitoringsettingsget.go index 71aa5c6c5a1..0dcb42750cc 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_monitoringsettingsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_monitoringsettingsget.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) MonitoringSettingsGet(ctx context.Context, id commoni var model MonitoringSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_predefinedacceleratorsget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_predefinedacceleratorsget.go index 2ed06cace03..91ada78ddf1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_predefinedacceleratorsget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_predefinedacceleratorsget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) PredefinedAcceleratorsGet(ctx context.Context, id Pre var model PredefinedAcceleratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_runtimeversionslistruntimeversions.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_runtimeversionslistruntimeversions.go index fe9f0c3f689..81408df96f0 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_runtimeversionslistruntimeversions.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_runtimeversionslistruntimeversions.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) RuntimeVersionsListRuntimeVersions(ctx context.Contex var model AvailableRuntimeVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceregistriesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceregistriesget.go index 60b90a94cea..0259bd789c9 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceregistriesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceregistriesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) ServiceRegistriesGet(ctx context.Context, id ServiceR var model ServiceRegistryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceschecknameavailability.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceschecknameavailability.go index aca0efe340d..c43d41eefa6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceschecknameavailability.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c AppPlatformClient) ServicesCheckNameAvailability(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesenabletestendpoint.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesenabletestendpoint.go index 23adca57b75..1df588bc859 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesenabletestendpoint.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesenabletestendpoint.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesEnableTestEndpoint(ctx context.Context, id co var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesget.go index 31ccba1ca6e..cc3d2a0cae2 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesget.go @@ -46,7 +46,6 @@ func (c AppPlatformClient) ServicesGet(ctx context.Context, id commonids.SpringC var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslistgloballyenabledapms.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslistgloballyenabledapms.go index 6dd339d44c9..262011227cf 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslistgloballyenabledapms.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslistgloballyenabledapms.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListGloballyEnabledApms(ctx context.Context, var model GloballyEnabledApms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslisttestkeys.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslisttestkeys.go index 197dd28a1c8..7ccfa6d9aa4 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslisttestkeys.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_serviceslisttestkeys.go @@ -47,7 +47,6 @@ func (c AppPlatformClient) ServicesListTestKeys(ctx context.Context, id commonid var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesregeneratetestkey.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesregeneratetestkey.go index 664a0e6a4cc..f83c2cf2c59 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesregeneratetestkey.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_servicesregeneratetestkey.go @@ -51,7 +51,6 @@ func (c AppPlatformClient) ServicesRegenerateTestKey(ctx context.Context, id com var model TestKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_storagesget.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_storagesget.go index 6623c2f57ef..8e3bc1508f9 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/method_storagesget.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/method_storagesget.go @@ -45,7 +45,6 @@ func (c AppPlatformClient) StoragesGet(ctx context.Context, id StorageId) (resul var model StorageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorauthsetting.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorauthsetting.go index 9f035ed61a3..27997c20e3f 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorauthsetting.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorauthsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AcceleratorAuthSetting interface { + AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl } -// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AcceleratorAuthSetting = BaseAcceleratorAuthSettingImpl{} + +type BaseAcceleratorAuthSettingImpl struct { + AuthType string `json:"authType"` +} + +func (s BaseAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s +} + +var _ AcceleratorAuthSetting = RawAcceleratorAuthSettingImpl{} + +// RawAcceleratorAuthSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAcceleratorAuthSettingImpl struct { - Type string - Values map[string]interface{} + acceleratorAuthSetting BaseAcceleratorAuthSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawAcceleratorAuthSettingImpl) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return s.acceleratorAuthSetting } -func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { +func UnmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAuthSetting, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAcceleratorAuthSettingImplementation(input []byte) (AcceleratorAut return out, nil } - out := RawAcceleratorAuthSettingImpl{ - Type: value, - Values: temp, + var parent BaseAcceleratorAuthSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAcceleratorAuthSettingImpl: %+v", err) } - return out, nil + + return RawAcceleratorAuthSettingImpl{ + acceleratorAuthSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorbasicauthsetting.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorbasicauthsetting.go index c26e9b76009..c8a4ac5dfdf 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorbasicauthsetting.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorbasicauthsetting.go @@ -16,6 +16,14 @@ type AcceleratorBasicAuthSetting struct { Username string `json:"username"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorBasicAuthSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorBasicAuthSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorBasicAuthSetting: %+v", err) } + decoded["authType"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorgitrepository.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorgitrepository.go index c5384079853..b0f8950cc0e 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorgitrepository.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorgitrepository.go @@ -40,7 +40,7 @@ func (s *AcceleratorGitRepository) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authSetting"]; ok { - impl, err := unmarshalAcceleratorAuthSettingImplementation(v) + impl, err := UnmarshalAcceleratorAuthSettingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthSetting' for 'AcceleratorGitRepository': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorpublicsetting.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorpublicsetting.go index 8f2526b39b9..ceddf807fd1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorpublicsetting.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorpublicsetting.go @@ -14,6 +14,14 @@ type AcceleratorPublicSetting struct { CaCertResourceId *string `json:"caCertResourceId,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorPublicSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorPublicSetting{} @@ -27,9 +35,10 @@ func (s AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorPublicSetting: %+v", err) } + decoded["authType"] = "Public" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorsshsetting.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorsshsetting.go index 257c4615505..9206fb45e17 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorsshsetting.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_acceleratorsshsetting.go @@ -16,6 +16,14 @@ type AcceleratorSshSetting struct { PrivateKey *string `json:"privateKey,omitempty"` // Fields inherited from AcceleratorAuthSetting + + AuthType string `json:"authType"` +} + +func (s AcceleratorSshSetting) AcceleratorAuthSetting() BaseAcceleratorAuthSettingImpl { + return BaseAcceleratorAuthSettingImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = AcceleratorSshSetting{} @@ -29,9 +37,10 @@ func (s AcceleratorSshSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcceleratorSshSetting: %+v", err) } + decoded["authType"] = "SSH" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_azurefilevolume.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_azurefilevolume.go index 6111b3c0321..a8d1838313a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_azurefilevolume.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_azurefilevolume.go @@ -14,10 +14,22 @@ type AzureFileVolume struct { ShareName *string `json:"shareName,omitempty"` // Fields inherited from CustomPersistentDiskProperties + EnableSubPath *bool `json:"enableSubPath,omitempty"` MountOptions *[]string `json:"mountOptions,omitempty"` MountPath string `json:"mountPath"` ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s AzureFileVolume) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return BaseCustomPersistentDiskPropertiesImpl{ + EnableSubPath: s.EnableSubPath, + MountOptions: s.MountOptions, + MountPath: s.MountPath, + ReadOnly: s.ReadOnly, + Type: s.Type, + } } var _ json.Marshaler = AzureFileVolume{} @@ -31,9 +43,10 @@ func (s AzureFileVolume) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileVolume: %+v", err) } + decoded["type"] = "AzureFileVolume" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_buildresultusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_buildresultusersourceinfo.go index 8591e159186..c0221f1525b 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_buildresultusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_buildresultusersourceinfo.go @@ -14,9 +14,18 @@ type BuildResultUserSourceInfo struct { BuildResultId *string `json:"buildResultId,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s BuildResultUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = BuildResultUserSourceInfo{} func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuildResultUserSourceInfo: %+v", err) } + decoded["type"] = "BuildResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateproperties.go index 804bcf82962..911f092fcd1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateproperties.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CertificateProperties interface { + CertificateProperties() BaseCertificatePropertiesImpl } -// RawCertificatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CertificateProperties = BaseCertificatePropertiesImpl{} + +type BaseCertificatePropertiesImpl struct { + ActivateDate *string `json:"activateDate,omitempty"` + DnsNames *[]string `json:"dnsNames,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + IssuedDate *string `json:"issuedDate,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` + SubjectName *string `json:"subjectName,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s BaseCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s +} + +var _ CertificateProperties = RawCertificatePropertiesImpl{} + +// RawCertificatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCertificatePropertiesImpl struct { - Type string - Values map[string]interface{} + certificateProperties BaseCertificatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCertificatePropertiesImpl) CertificateProperties() BaseCertificatePropertiesImpl { + return s.certificateProperties } -func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { +func UnmarshalCertificatePropertiesImplementation(input []byte) (CertificateProperties, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalCertificatePropertiesImplementation(input []byte) (CertificateProp return out, nil } - out := RawCertificatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCertificatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCertificatePropertiesImpl: %+v", err) } - return out, nil + + return RawCertificatePropertiesImpl{ + certificateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateresource.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateresource.go index 440cbc2881f..b5c61f2045a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateresource.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_certificateresource.go @@ -38,7 +38,7 @@ func (s *CertificateResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalCertificatePropertiesImplementation(v) + impl, err := UnmarshalCertificatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'CertificateResource': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_clusterresourceproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_clusterresourceproperties.go index 2f5fcf95be5..0e45562fe68 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_clusterresourceproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_clusterresourceproperties.go @@ -50,7 +50,7 @@ func (s *ClusterResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["maintenanceScheduleConfiguration"]; ok { - impl, err := unmarshalMaintenanceScheduleConfigurationImplementation(v) + impl, err := UnmarshalMaintenanceScheduleConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'MaintenanceScheduleConfiguration' for 'ClusterResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrybasiccredentials.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrybasiccredentials.go index af8eb053409..a5f9bcfb6a0 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrybasiccredentials.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrybasiccredentials.go @@ -16,6 +16,14 @@ type ContainerRegistryBasicCredentials struct { Username string `json:"username"` // Fields inherited from ContainerRegistryCredentials + + Type string `json:"type"` +} + +func (s ContainerRegistryBasicCredentials) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return BaseContainerRegistryCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ContainerRegistryBasicCredentials{} @@ -29,9 +37,10 @@ func (s ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContainerRegistryBasicCredentials: %+v", err) } + decoded["type"] = "BasicAuth" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrycredentials.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrycredentials.go index 84918f1d125..d682a4e385a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrycredentials.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistrycredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContainerRegistryCredentials interface { + ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl } -// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContainerRegistryCredentials = BaseContainerRegistryCredentialsImpl{} + +type BaseContainerRegistryCredentialsImpl struct { + Type string `json:"type"` +} + +func (s BaseContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s +} + +var _ ContainerRegistryCredentials = RawContainerRegistryCredentialsImpl{} + +// RawContainerRegistryCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContainerRegistryCredentialsImpl struct { - Type string - Values map[string]interface{} + containerRegistryCredentials BaseContainerRegistryCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawContainerRegistryCredentialsImpl) ContainerRegistryCredentials() BaseContainerRegistryCredentialsImpl { + return s.containerRegistryCredentials } -func unmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { +func UnmarshalContainerRegistryCredentialsImplementation(input []byte) (ContainerRegistryCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalContainerRegistryCredentialsImplementation(input []byte) (Containe return out, nil } - out := RawContainerRegistryCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseContainerRegistryCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContainerRegistryCredentialsImpl: %+v", err) } - return out, nil + + return RawContainerRegistryCredentialsImpl{ + containerRegistryCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistryproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistryproperties.go index 4a1e18b8583..519d019857b 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistryproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_containerregistryproperties.go @@ -30,7 +30,7 @@ func (s *ContainerRegistryProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalContainerRegistryCredentialsImplementation(v) + impl, err := UnmarshalContainerRegistryCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'ContainerRegistryProperties': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_contentcertificateproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_contentcertificateproperties.go index d6f7a6110fd..f6fb41bdbcd 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_contentcertificateproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_contentcertificateproperties.go @@ -14,6 +14,7 @@ type ContentCertificateProperties struct { Content *string `json:"content,omitempty"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -22,6 +23,21 @@ type ContentCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s ContentCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = ContentCertificateProperties{} @@ -35,9 +51,10 @@ func (s ContentCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentCertificateProperties: %+v", err) } + decoded["type"] = "ContentCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_customcontainerusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_customcontainerusersourceinfo.go index 8411b51a62c..4140c24d62c 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_customcontainerusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_customcontainerusersourceinfo.go @@ -14,9 +14,18 @@ type CustomContainerUserSourceInfo struct { CustomContainer *CustomContainer `json:"customContainer,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CustomContainerUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CustomContainerUserSourceInfo{} func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomContainerUserSourceInfo: %+v", err) } + decoded["type"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskproperties.go index be9da2ff053..d5ba1eaf9b7 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomPersistentDiskProperties interface { + CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl } -// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomPersistentDiskProperties = BaseCustomPersistentDiskPropertiesImpl{} + +type BaseCustomPersistentDiskPropertiesImpl struct { + EnableSubPath *bool `json:"enableSubPath,omitempty"` + MountOptions *[]string `json:"mountOptions,omitempty"` + MountPath string `json:"mountPath"` + ReadOnly *bool `json:"readOnly,omitempty"` + Type Type `json:"type"` +} + +func (s BaseCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s +} + +var _ CustomPersistentDiskProperties = RawCustomPersistentDiskPropertiesImpl{} + +// RawCustomPersistentDiskPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomPersistentDiskPropertiesImpl struct { - Type string - Values map[string]interface{} + customPersistentDiskProperties BaseCustomPersistentDiskPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomPersistentDiskPropertiesImpl) CustomPersistentDiskProperties() BaseCustomPersistentDiskPropertiesImpl { + return s.customPersistentDiskProperties } -func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { +func UnmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (CustomPersistentDiskProperties, error) { if input == nil { return nil, nil } @@ -44,10 +65,15 @@ func unmarshalCustomPersistentDiskPropertiesImplementation(input []byte) (Custom return out, nil } - out := RawCustomPersistentDiskPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseCustomPersistentDiskPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomPersistentDiskPropertiesImpl: %+v", err) } - return out, nil + + return RawCustomPersistentDiskPropertiesImpl{ + customPersistentDiskProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskresource.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskresource.go index 7a111d5c250..29be71bc7c6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskresource.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_custompersistentdiskresource.go @@ -30,7 +30,7 @@ func (s *CustomPersistentDiskResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customPersistentDiskProperties"]; ok { - impl, err := unmarshalCustomPersistentDiskPropertiesImplementation(v) + impl, err := UnmarshalCustomPersistentDiskPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomPersistentDiskProperties' for 'CustomPersistentDiskResource': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_deploymentresourceproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_deploymentresourceproperties.go index 145d0197843..5fd11657897 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_deploymentresourceproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_deploymentresourceproperties.go @@ -38,7 +38,7 @@ func (s *DeploymentResourceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalUserSourceInfoImplementation(v) + impl, err := UnmarshalUserSourceInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'DeploymentResourceProperties': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_execaction.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_execaction.go index 6a220bef9b9..45312ffa5da 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_execaction.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_execaction.go @@ -14,6 +14,14 @@ type ExecAction struct { Command *[]string `json:"command,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s ExecAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = ExecAction{} @@ -27,9 +35,10 @@ func (s ExecAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecAction: %+v", err) } + decoded["type"] = "ExecAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go index 49433c0a256..9b03b60fb1b 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperinstanceproperties.go @@ -15,6 +15,14 @@ type GatewayLocalResponseCachePerInstanceProperties struct { TimeToLive *string `json:"timeToLive,omitempty"` // Fields inherited from GatewayResponseCacheProperties + + ResponseCacheType string `json:"responseCacheType"` +} + +func (s GatewayLocalResponseCachePerInstanceProperties) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return BaseGatewayResponseCachePropertiesImpl{ + ResponseCacheType: s.ResponseCacheType, + } } var _ json.Marshaler = GatewayLocalResponseCachePerInstanceProperties{} @@ -28,9 +36,10 @@ func (s GatewayLocalResponseCachePerInstanceProperties) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayLocalResponseCachePerInstanceProperties: %+v", err) } + decoded["responseCacheType"] = "LocalCachePerInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go index 4b82764dd33..02a1e952dc1 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewaylocalresponsecacheperrouteproperties.go @@ -15,6 +15,14 @@ type GatewayLocalResponseCachePerRouteProperties struct { TimeToLive *string `json:"timeToLive,omitempty"` // Fields inherited from GatewayResponseCacheProperties + + ResponseCacheType string `json:"responseCacheType"` +} + +func (s GatewayLocalResponseCachePerRouteProperties) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return BaseGatewayResponseCachePropertiesImpl{ + ResponseCacheType: s.ResponseCacheType, + } } var _ json.Marshaler = GatewayLocalResponseCachePerRouteProperties{} @@ -28,9 +36,10 @@ func (s GatewayLocalResponseCachePerRouteProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayLocalResponseCachePerRouteProperties: %+v", err) } + decoded["responseCacheType"] = "LocalCachePerRoute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayproperties.go index 1632c452e6d..04d7b881c32 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayproperties.go @@ -58,7 +58,7 @@ func (s *GatewayProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["responseCacheProperties"]; ok { - impl, err := unmarshalGatewayResponseCachePropertiesImplementation(v) + impl, err := UnmarshalGatewayResponseCachePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResponseCacheProperties' for 'GatewayProperties': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayresponsecacheproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayresponsecacheproperties.go index 491cff612eb..9a05c6bf70f 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayresponsecacheproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_gatewayresponsecacheproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GatewayResponseCacheProperties interface { + GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl } -// RawGatewayResponseCachePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GatewayResponseCacheProperties = BaseGatewayResponseCachePropertiesImpl{} + +type BaseGatewayResponseCachePropertiesImpl struct { + ResponseCacheType string `json:"responseCacheType"` +} + +func (s BaseGatewayResponseCachePropertiesImpl) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return s +} + +var _ GatewayResponseCacheProperties = RawGatewayResponseCachePropertiesImpl{} + +// RawGatewayResponseCachePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGatewayResponseCachePropertiesImpl struct { - Type string - Values map[string]interface{} + gatewayResponseCacheProperties BaseGatewayResponseCachePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawGatewayResponseCachePropertiesImpl) GatewayResponseCacheProperties() BaseGatewayResponseCachePropertiesImpl { + return s.gatewayResponseCacheProperties } -func unmarshalGatewayResponseCachePropertiesImplementation(input []byte) (GatewayResponseCacheProperties, error) { +func UnmarshalGatewayResponseCachePropertiesImplementation(input []byte) (GatewayResponseCacheProperties, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalGatewayResponseCachePropertiesImplementation(input []byte) (Gatewa return out, nil } - out := RawGatewayResponseCachePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseGatewayResponseCachePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGatewayResponseCachePropertiesImpl: %+v", err) } - return out, nil + + return RawGatewayResponseCachePropertiesImpl{ + gatewayResponseCacheProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_httpgetaction.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_httpgetaction.go index 702c4d0f29d..becd9aadb38 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_httpgetaction.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_httpgetaction.go @@ -15,6 +15,14 @@ type HTTPGetAction struct { Scheme *HTTPSchemeType `json:"scheme,omitempty"` // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s HTTPGetAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = HTTPGetAction{} @@ -28,9 +36,10 @@ func (s HTTPGetAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPGetAction: %+v", err) } + decoded["type"] = "HTTPGetAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_jaruploadedusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_jaruploadedusersourceinfo.go index 2047480ff51..8b8eb662790 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_jaruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_jaruploadedusersourceinfo.go @@ -16,9 +16,18 @@ type JarUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s JarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = JarUploadedUserSourceInfo{} func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Jar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_keyvaultcertificateproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_keyvaultcertificateproperties.go index eb7b72af629..22d986dece6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_keyvaultcertificateproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_keyvaultcertificateproperties.go @@ -18,6 +18,7 @@ type KeyVaultCertificateProperties struct { VaultUri string `json:"vaultUri"` // Fields inherited from CertificateProperties + ActivateDate *string `json:"activateDate,omitempty"` DnsNames *[]string `json:"dnsNames,omitempty"` ExpirationDate *string `json:"expirationDate,omitempty"` @@ -26,6 +27,21 @@ type KeyVaultCertificateProperties struct { ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty"` SubjectName *string `json:"subjectName,omitempty"` Thumbprint *string `json:"thumbprint,omitempty"` + Type string `json:"type"` +} + +func (s KeyVaultCertificateProperties) CertificateProperties() BaseCertificatePropertiesImpl { + return BaseCertificatePropertiesImpl{ + ActivateDate: s.ActivateDate, + DnsNames: s.DnsNames, + ExpirationDate: s.ExpirationDate, + IssuedDate: s.IssuedDate, + Issuer: s.Issuer, + ProvisioningState: s.ProvisioningState, + SubjectName: s.SubjectName, + Thumbprint: s.Thumbprint, + Type: s.Type, + } } var _ json.Marshaler = KeyVaultCertificateProperties{} @@ -39,9 +55,10 @@ func (s KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultCertificateProperties: %+v", err) } + decoded["type"] = "KeyVaultCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_maintenancescheduleconfiguration.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_maintenancescheduleconfiguration.go index 20d0e309f57..354ea816745 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_maintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_maintenancescheduleconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MaintenanceScheduleConfiguration interface { + MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl } -// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MaintenanceScheduleConfiguration = BaseMaintenanceScheduleConfigurationImpl{} + +type BaseMaintenanceScheduleConfigurationImpl struct { + Frequency Frequency `json:"frequency"` +} + +func (s BaseMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s +} + +var _ MaintenanceScheduleConfiguration = RawMaintenanceScheduleConfigurationImpl{} + +// RawMaintenanceScheduleConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMaintenanceScheduleConfigurationImpl struct { - Type string - Values map[string]interface{} + maintenanceScheduleConfiguration BaseMaintenanceScheduleConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawMaintenanceScheduleConfigurationImpl) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return s.maintenanceScheduleConfiguration } -func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { +func UnmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (MaintenanceScheduleConfiguration, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMaintenanceScheduleConfigurationImplementation(input []byte) (Main return out, nil } - out := RawMaintenanceScheduleConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseMaintenanceScheduleConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMaintenanceScheduleConfigurationImpl: %+v", err) } - return out, nil + + return RawMaintenanceScheduleConfigurationImpl{ + maintenanceScheduleConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go index b0951319715..7c52088222a 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_netcorezipuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type NetCoreZipUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s NetCoreZipUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = NetCoreZipUploadedUserSourceInfo{} func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetCoreZipUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "NetCoreZip" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probe.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probe.go index c59cb8825f1..856bba336ed 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probe.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probe.go @@ -40,7 +40,7 @@ func (s *Probe) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["probeAction"]; ok { - impl, err := unmarshalProbeActionImplementation(v) + impl, err := UnmarshalProbeActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProbeAction' for 'Probe': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probeaction.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probeaction.go index c6bb9d81bc2..ada397a242e 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probeaction.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_probeaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProbeAction interface { + ProbeAction() BaseProbeActionImpl } -// RawProbeActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProbeAction = BaseProbeActionImpl{} + +type BaseProbeActionImpl struct { + Type ProbeActionType `json:"type"` +} + +func (s BaseProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s +} + +var _ ProbeAction = RawProbeActionImpl{} + +// RawProbeActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProbeActionImpl struct { - Type string - Values map[string]interface{} + probeAction BaseProbeActionImpl + Type string + Values map[string]interface{} +} + +func (s RawProbeActionImpl) ProbeAction() BaseProbeActionImpl { + return s.probeAction } -func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { +func UnmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProbeActionImplementation(input []byte) (ProbeAction, error) { return out, nil } - out := RawProbeActionImpl{ - Type: value, - Values: temp, + var parent BaseProbeActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProbeActionImpl: %+v", err) } - return out, nil + + return RawProbeActionImpl{ + probeAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_sourceuploadedusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_sourceuploadedusersourceinfo.go index 62fe9835ba0..d2c37f2a640 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_sourceuploadedusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_sourceuploadedusersourceinfo.go @@ -16,9 +16,18 @@ type SourceUploadedUserSourceInfo struct { RuntimeVersion *string `json:"runtimeVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SourceUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SourceUploadedUserSourceInfo{} func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -30,9 +39,10 @@ func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SourceUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageaccount.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageaccount.go index 3dc49e5a074..6b25e6ecb18 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageaccount.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageaccount.go @@ -15,6 +15,14 @@ type StorageAccount struct { AccountName string `json:"accountName"` // Fields inherited from StorageProperties + + StorageType StorageType `json:"storageType"` +} + +func (s StorageAccount) StorageProperties() BaseStoragePropertiesImpl { + return BaseStoragePropertiesImpl{ + StorageType: s.StorageType, + } } var _ json.Marshaler = StorageAccount{} @@ -28,9 +36,10 @@ func (s StorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageAccount: %+v", err) } + decoded["storageType"] = "StorageAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageproperties.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageproperties.go index b73ed4d4d42..af7ab65c017 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageproperties.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageProperties interface { + StorageProperties() BaseStoragePropertiesImpl } -// RawStoragePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageProperties = BaseStoragePropertiesImpl{} + +type BaseStoragePropertiesImpl struct { + StorageType StorageType `json:"storageType"` +} + +func (s BaseStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s +} + +var _ StorageProperties = RawStoragePropertiesImpl{} + +// RawStoragePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoragePropertiesImpl struct { - Type string - Values map[string]interface{} + storageProperties BaseStoragePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawStoragePropertiesImpl) StorageProperties() BaseStoragePropertiesImpl { + return s.storageProperties } -func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { +func UnmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStoragePropertiesImplementation(input []byte) (StorageProperties, return out, nil } - out := RawStoragePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseStoragePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoragePropertiesImpl: %+v", err) } - return out, nil + + return RawStoragePropertiesImpl{ + storageProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageresource.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageresource.go index f09c491658e..1d325413d9c 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageresource.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_storageresource.go @@ -38,7 +38,7 @@ func (s *StorageResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalStoragePropertiesImplementation(v) + impl, err := UnmarshalStoragePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'StorageResource': %+v", err) } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_tcpsocketaction.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_tcpsocketaction.go index a1edd6797d1..286aa3a4774 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_tcpsocketaction.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_tcpsocketaction.go @@ -13,6 +13,14 @@ var _ ProbeAction = TCPSocketAction{} type TCPSocketAction struct { // Fields inherited from ProbeAction + + Type ProbeActionType `json:"type"` +} + +func (s TCPSocketAction) ProbeAction() BaseProbeActionImpl { + return BaseProbeActionImpl{ + Type: s.Type, + } } var _ json.Marshaler = TCPSocketAction{} @@ -26,9 +34,10 @@ func (s TCPSocketAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TCPSocketAction: %+v", err) } + decoded["type"] = "TCPSocketAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_usersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_usersourceinfo.go index d1ac05963f5..8dee9d4eda6 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_usersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_usersourceinfo.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UserSourceInfo interface { + UserSourceInfo() BaseUserSourceInfoImpl } -// RawUserSourceInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UserSourceInfo = BaseUserSourceInfoImpl{} + +type BaseUserSourceInfoImpl struct { + Type string `json:"type"` + Version *string `json:"version,omitempty"` +} + +func (s BaseUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s +} + +var _ UserSourceInfo = RawUserSourceInfoImpl{} + +// RawUserSourceInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUserSourceInfoImpl struct { - Type string - Values map[string]interface{} + userSourceInfo BaseUserSourceInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawUserSourceInfoImpl) UserSourceInfo() BaseUserSourceInfoImpl { + return s.userSourceInfo } -func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { +func UnmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalUserSourceInfoImplementation(input []byte) (UserSourceInfo, error) return out, nil } - out := RawUserSourceInfoImpl{ - Type: value, - Values: temp, + var parent BaseUserSourceInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUserSourceInfoImpl: %+v", err) } - return out, nil + + return RawUserSourceInfoImpl{ + userSourceInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_waruploadedusersourceinfo.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_waruploadedusersourceinfo.go index cb19ff5cef5..34b188ecaa2 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_waruploadedusersourceinfo.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_waruploadedusersourceinfo.go @@ -17,9 +17,18 @@ type WarUploadedUserSourceInfo struct { ServerVersion *string `json:"serverVersion,omitempty"` // Fields inherited from UserSourceInfo + + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WarUploadedUserSourceInfo) UserSourceInfo() BaseUserSourceInfoImpl { + return BaseUserSourceInfoImpl{ + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WarUploadedUserSourceInfo{} func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +40,10 @@ func (s WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarUploadedUserSourceInfo: %+v", err) } + decoded["type"] = "War" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go index db1a4c4c91e..c97bbab6f60 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/model_weeklymaintenancescheduleconfiguration.go @@ -16,6 +16,14 @@ type WeeklyMaintenanceScheduleConfiguration struct { Hour int64 `json:"hour"` // Fields inherited from MaintenanceScheduleConfiguration + + Frequency Frequency `json:"frequency"` +} + +func (s WeeklyMaintenanceScheduleConfiguration) MaintenanceScheduleConfiguration() BaseMaintenanceScheduleConfigurationImpl { + return BaseMaintenanceScheduleConfigurationImpl{ + Frequency: s.Frequency, + } } var _ json.Marshaler = WeeklyMaintenanceScheduleConfiguration{} @@ -29,9 +37,10 @@ func (s WeeklyMaintenanceScheduleConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WeeklyMaintenanceScheduleConfiguration: %+v", err) } + decoded["frequency"] = "Weekly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/appplatform/2024-01-01-preview/appplatform/version.go b/resource-manager/appplatform/2024-01-01-preview/appplatform/version.go index 4a2e7d5c56a..dfcdaf5565c 100644 --- a/resource-manager/appplatform/2024-01-01-preview/appplatform/version.go +++ b/resource-manager/appplatform/2024-01-01-preview/appplatform/version.go @@ -1,12 +1,10 @@ package appplatform -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appplatform/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appplatform/2024-01-01-preview" } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/README.md b/resource-manager/attestation/2020-10-01/attestationproviders/README.md index 91c89c45856..e56c350f849 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/README.md +++ b/resource-manager/attestation/2020-10-01/attestationproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/attestationproviders` Documentation -The `attestationproviders` SDK allows for interaction with the Azure Resource Manager Service `attestation` (API Version `2020-10-01`). +The `attestationproviders` SDK allows for interaction with Azure Resource Manager `attestation` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/client.go b/resource-manager/attestation/2020-10-01/attestationproviders/client.go index 7ad200a9901..39e132c625d 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/client.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/client.go @@ -15,7 +15,7 @@ type AttestationProvidersClient struct { } func NewAttestationProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*AttestationProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attestationproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attestationproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttestationProvidersClient: %+v", err) } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go b/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go index d5fef484a5c..4d873529762 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/id_attestationproviders.go @@ -42,7 +42,7 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go b/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go index 4bf31d9a2a5..a7fe30b7ad2 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_create.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_create.go index 565396aa8af..d7468dd4d0c 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_create.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_create.go @@ -50,7 +50,6 @@ func (c AttestationProvidersClient) Create(ctx context.Context, id AttestationPr var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_get.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_get.go index 8a57bf6306d..c485713adf8 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_get.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_get.go @@ -45,7 +45,6 @@ func (c AttestationProvidersClient) Get(ctx context.Context, id AttestationProvi var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation.go index 180e1ad88ee..162c21cc002 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_getdefaultbylocation.go @@ -46,7 +46,6 @@ func (c AttestationProvidersClient) GetDefaultByLocation(ctx context.Context, id var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_list.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_list.go index a734a94e79b..b81d21855bb 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_list.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_list.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) List(ctx context.Context, id commonids.Subsc var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup.go index 59e76223e5f..6e52c18f1f0 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) ListByResourceGroup(ctx context.Context, id var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault.go index c51c64207c2..e023752efa2 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_listdefault.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) ListDefault(ctx context.Context, id commonid var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/method_update.go b/resource-manager/attestation/2020-10-01/attestationproviders/method_update.go index 6d973afe7a1..131faedb6bc 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/method_update.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/method_update.go @@ -49,7 +49,6 @@ func (c AttestationProvidersClient) Update(ctx context.Context, id AttestationPr var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/attestationproviders/version.go b/resource-manager/attestation/2020-10-01/attestationproviders/version.go index f317f810f5e..c32ad4723e6 100644 --- a/resource-manager/attestation/2020-10-01/attestationproviders/version.go +++ b/resource-manager/attestation/2020-10-01/attestationproviders/version.go @@ -1,12 +1,10 @@ package attestationproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attestationproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attestationproviders/2020-10-01" } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/README.md b/resource-manager/attestation/2020-10-01/privateendpointconnections/README.md index f9bb78b4e03..7a817f7fa41 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/README.md +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2020-10-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `attestation` (API Version `2020-10-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `attestation` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/client.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/client.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/id_attestationproviders.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/id_attestationproviders.go index 628fd3e10e8..5129a8fdcf7 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/id_attestationproviders.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/id_attestationproviders.go @@ -42,7 +42,7 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/id_privateendpointconnection.go index 6b1e19b124c..25bcd848b40 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_create.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_create.go index dfab2173bdf..085d6b0312e 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_create.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_create.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Create(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_get.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_get.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_list.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_list.go index ef60a4a9542..0029b26ac2a 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/method_list.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id Attestati var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2020-10-01/privateendpointconnections/version.go b/resource-manager/attestation/2020-10-01/privateendpointconnections/version.go index 54d6b7d348e..e826b383189 100644 --- a/resource-manager/attestation/2020-10-01/privateendpointconnections/version.go +++ b/resource-manager/attestation/2020-10-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2020-10-01" } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/README.md b/resource-manager/attestation/2021-06-01/attestationproviders/README.md index 6d360fe8c6a..fef48d55a5e 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/README.md +++ b/resource-manager/attestation/2021-06-01/attestationproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2021-06-01/attestationproviders` Documentation -The `attestationproviders` SDK allows for interaction with the Azure Resource Manager Service `attestation` (API Version `2021-06-01`). +The `attestationproviders` SDK allows for interaction with Azure Resource Manager `attestation` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/client.go b/resource-manager/attestation/2021-06-01/attestationproviders/client.go index 7ad200a9901..39e132c625d 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/client.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/client.go @@ -15,7 +15,7 @@ type AttestationProvidersClient struct { } func NewAttestationProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*AttestationProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attestationproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attestationproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttestationProvidersClient: %+v", err) } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/id_attestationproviders.go b/resource-manager/attestation/2021-06-01/attestationproviders/id_attestationproviders.go index d5fef484a5c..4d873529762 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/id_attestationproviders.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/id_attestationproviders.go @@ -42,7 +42,7 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/id_location.go b/resource-manager/attestation/2021-06-01/attestationproviders/id_location.go index 4bf31d9a2a5..a7fe30b7ad2 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/id_location.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_create.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_create.go index 565396aa8af..d7468dd4d0c 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_create.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_create.go @@ -50,7 +50,6 @@ func (c AttestationProvidersClient) Create(ctx context.Context, id AttestationPr var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_get.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_get.go index 8a57bf6306d..c485713adf8 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_get.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_get.go @@ -45,7 +45,6 @@ func (c AttestationProvidersClient) Get(ctx context.Context, id AttestationProvi var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_getdefaultbylocation.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_getdefaultbylocation.go index 180e1ad88ee..162c21cc002 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_getdefaultbylocation.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_getdefaultbylocation.go @@ -46,7 +46,6 @@ func (c AttestationProvidersClient) GetDefaultByLocation(ctx context.Context, id var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_list.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_list.go index a734a94e79b..b81d21855bb 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_list.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_list.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) List(ctx context.Context, id commonids.Subsc var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_listbyresourcegroup.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_listbyresourcegroup.go index 59e76223e5f..6e52c18f1f0 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_listbyresourcegroup.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) ListByResourceGroup(ctx context.Context, id var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_listdefault.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_listdefault.go index c51c64207c2..e023752efa2 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_listdefault.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_listdefault.go @@ -47,7 +47,6 @@ func (c AttestationProvidersClient) ListDefault(ctx context.Context, id commonid var model AttestationProviderListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/method_update.go b/resource-manager/attestation/2021-06-01/attestationproviders/method_update.go index 6d973afe7a1..131faedb6bc 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/method_update.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/method_update.go @@ -49,7 +49,6 @@ func (c AttestationProvidersClient) Update(ctx context.Context, id AttestationPr var model AttestationProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/attestationproviders/version.go b/resource-manager/attestation/2021-06-01/attestationproviders/version.go index 239df2027db..7e514361898 100644 --- a/resource-manager/attestation/2021-06-01/attestationproviders/version.go +++ b/resource-manager/attestation/2021-06-01/attestationproviders/version.go @@ -1,12 +1,10 @@ package attestationproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attestationproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attestationproviders/2021-06-01" } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/README.md b/resource-manager/attestation/2021-06-01/privateendpointconnections/README.md index 0730705a753..268ef50f29a 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/README.md +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2021-06-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `attestation` (API Version `2021-06-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `attestation` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/client.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/client.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/id_attestationproviders.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/id_attestationproviders.go index 628fd3e10e8..5129a8fdcf7 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/id_attestationproviders.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/id_attestationproviders.go @@ -42,7 +42,7 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/id_privateendpointconnection.go index 6b1e19b124c..25bcd848b40 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_create.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_create.go index dfab2173bdf..085d6b0312e 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_create.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_create.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Create(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_get.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_get.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_list.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_list.go index ef60a4a9542..0029b26ac2a 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/method_list.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id Attestati var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/privateendpointconnections/version.go b/resource-manager/attestation/2021-06-01/privateendpointconnections/version.go index 0d17055f179..84f32b5d3b0 100644 --- a/resource-manager/attestation/2021-06-01/privateendpointconnections/version.go +++ b/resource-manager/attestation/2021-06-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2021-06-01" } diff --git a/resource-manager/attestation/2021-06-01/privatelinkresources/README.md b/resource-manager/attestation/2021-06-01/privatelinkresources/README.md index 5ddfa497304..7277c173385 100644 --- a/resource-manager/attestation/2021-06-01/privatelinkresources/README.md +++ b/resource-manager/attestation/2021-06-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/attestation/2021-06-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `attestation` (API Version `2021-06-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `attestation` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/attestation/2021-06-01/privatelinkresources/client.go b/resource-manager/attestation/2021-06-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/attestation/2021-06-01/privatelinkresources/client.go +++ b/resource-manager/attestation/2021-06-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/attestation/2021-06-01/privatelinkresources/id_attestationproviders.go b/resource-manager/attestation/2021-06-01/privatelinkresources/id_attestationproviders.go index a430a7a3bae..b0e4f0f4090 100644 --- a/resource-manager/attestation/2021-06-01/privatelinkresources/id_attestationproviders.go +++ b/resource-manager/attestation/2021-06-01/privatelinkresources/id_attestationproviders.go @@ -42,7 +42,7 @@ func ParseAttestationProvidersID(input string) (*AttestationProvidersId, error) } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAttestationProvidersIDInsensitively(input string) (*AttestationProvide } id := AttestationProvidersId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/attestation/2021-06-01/privatelinkresources/method_listbyprovider.go b/resource-manager/attestation/2021-06-01/privatelinkresources/method_listbyprovider.go index 433071c2542..3b3e9e34e1a 100644 --- a/resource-manager/attestation/2021-06-01/privatelinkresources/method_listbyprovider.go +++ b/resource-manager/attestation/2021-06-01/privatelinkresources/method_listbyprovider.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByProvider(ctx context.Context, id Attes var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/attestation/2021-06-01/privatelinkresources/version.go b/resource-manager/attestation/2021-06-01/privatelinkresources/version.go index 4ee29f52669..cb4b4960d6e 100644 --- a/resource-manager/attestation/2021-06-01/privatelinkresources/version.go +++ b/resource-manager/attestation/2021-06-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2021-06-01" } diff --git a/resource-manager/authorization/2018-01-01-preview/permissions/README.md b/resource-manager/authorization/2018-01-01-preview/permissions/README.md index d3655e9a774..c6080c13f7c 100644 --- a/resource-manager/authorization/2018-01-01-preview/permissions/README.md +++ b/resource-manager/authorization/2018-01-01-preview/permissions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2018-01-01-preview/permissions` Documentation -The `permissions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2018-01-01-preview`). +The `permissions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2018-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2018-01-01-preview/permissions/client.go b/resource-manager/authorization/2018-01-01-preview/permissions/client.go index f8051b34043..15d247bee31 100644 --- a/resource-manager/authorization/2018-01-01-preview/permissions/client.go +++ b/resource-manager/authorization/2018-01-01-preview/permissions/client.go @@ -15,7 +15,7 @@ type PermissionsClient struct { } func NewPermissionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PermissionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "permissions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "permissions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PermissionsClient: %+v", err) } diff --git a/resource-manager/authorization/2018-01-01-preview/permissions/version.go b/resource-manager/authorization/2018-01-01-preview/permissions/version.go index ade691cbeab..de18ca8d7d5 100644 --- a/resource-manager/authorization/2018-01-01-preview/permissions/version.go +++ b/resource-manager/authorization/2018-01-01-preview/permissions/version.go @@ -1,12 +1,10 @@ package permissions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/permissions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/permissions/2018-01-01-preview" } diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/README.md b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/README.md index ab9c0323821..01779fcbae7 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/README.md +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata` Documentation -The `provideroperationsmetadata` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2018-01-01-preview`). +The `provideroperationsmetadata` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2018-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/client.go b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/client.go index 630417003d8..44a7773d1cc 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/client.go +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/client.go @@ -15,7 +15,7 @@ type ProviderOperationsMetadataClient struct { } func NewProviderOperationsMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderOperationsMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provideroperationsmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provideroperationsmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderOperationsMetadataClient: %+v", err) } diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/id_provideroperation.go b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/id_provideroperation.go index c6a9a315716..b544d937e12 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/id_provideroperation.go +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/id_provideroperation.go @@ -38,7 +38,7 @@ func ParseProviderOperationID(input string) (*ProviderOperationId, error) { } id := ProviderOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderOperationIDInsensitively(input string) (*ProviderOperationId, } id := ProviderOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_get.go b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_get.go index 9e95668a431..10dd19d0e02 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_get.go +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProviderOperationsMetadataClient) Get(ctx context.Context, id ProviderOp var model ProviderOperationsMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_list.go b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_list.go index d7416894090..c4ec7014dd1 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_list.go +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/version.go b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/version.go index 6269d22aaf2..3cb9ac7ed96 100644 --- a/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/version.go +++ b/resource-manager/authorization/2018-01-01-preview/provideroperationsmetadata/version.go @@ -1,12 +1,10 @@ package provideroperationsmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provideroperationsmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provideroperationsmetadata/2018-01-01-preview" } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/README.md b/resource-manager/authorization/2018-01-01-preview/roleassignments/README.md index 6b0d1486288..f7b64681c0d 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/README.md +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2018-01-01-preview/roleassignments` Documentation -The `roleassignments` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2018-01-01-preview`). +The `roleassignments` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2018-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/client.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/client.go index 8e072e686a4..c16e05d193e 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/client.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/client.go @@ -15,7 +15,7 @@ type RoleAssignmentsClient struct { } func NewRoleAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentsClient: %+v", err) } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/id_roleid.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/id_roleid.go index 0b2fcbf2008..7aa0a8cc643 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/id_roleid.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/id_roleid.go @@ -38,7 +38,7 @@ func ParseRoleIdID(input string) (*RoleIdId, error) { } id := RoleIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseRoleIdIDInsensitively(input string) (*RoleIdId, error) { } id := RoleIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/id_scopedroleassignment.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/id_scopedroleassignment.go index 465ef7d9e92..263947cb9c6 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/id_scopedroleassignment.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/id_scopedroleassignment.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentID(input string) (*ScopedRoleAssignmentId, error) } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentIDInsensitively(input string) (*ScopedRoleAssignme } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_create.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_create.go index 6406eeb86f1..e80a896aeb5 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_create.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_create.go @@ -49,7 +49,6 @@ func (c RoleAssignmentsClient) Create(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_createbyid.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_createbyid.go index 9aeab1c8385..7d2d8a4a783 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_createbyid.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_createbyid.go @@ -49,7 +49,6 @@ func (c RoleAssignmentsClient) CreateById(ctx context.Context, id RoleIdId, inpu var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_delete.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_delete.go index 547ffac1ca9..107afc769bb 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_delete.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_delete.go @@ -46,7 +46,6 @@ func (c RoleAssignmentsClient) Delete(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_deletebyid.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_deletebyid.go index c83432a9aac..030d72b35d0 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_deletebyid.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_deletebyid.go @@ -46,7 +46,6 @@ func (c RoleAssignmentsClient) DeleteById(ctx context.Context, id RoleIdId) (res var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_get.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_get.go index b5068f09c23..f7f94c833f5 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_get.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_get.go @@ -45,7 +45,6 @@ func (c RoleAssignmentsClient) Get(ctx context.Context, id ScopedRoleAssignmentI var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_getbyid.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_getbyid.go index 994011cc33b..3f94dfc9960 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_getbyid.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_getbyid.go @@ -45,7 +45,6 @@ func (c RoleAssignmentsClient) GetById(ctx context.Context, id RoleIdId) (result var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_list.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_list.go index e9cf79e037e..1653f467694 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_list.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresource.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresource.go index b7480c12e53..1251ca1d2dd 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresource.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresource.go @@ -40,6 +40,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresourcegroup.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresourcegroup.go index 5a8a9d3225d..a897cc15b90 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresourcegroup.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforresourcegroup.go @@ -40,6 +40,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforscope.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforscope.go index 00197971eeb..ae1c7cfea63 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforscope.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/roleassignments/version.go b/resource-manager/authorization/2018-01-01-preview/roleassignments/version.go index bf0dc981ce5..7384a72e221 100644 --- a/resource-manager/authorization/2018-01-01-preview/roleassignments/version.go +++ b/resource-manager/authorization/2018-01-01-preview/roleassignments/version.go @@ -1,12 +1,10 @@ package roleassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignments/2018-01-01-preview" } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/README.md b/resource-manager/authorization/2018-01-01-preview/roledefinitions/README.md index 8e80229f3d7..2e3140104d0 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/README.md +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2018-01-01-preview/roledefinitions` Documentation -The `roledefinitions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2018-01-01-preview`). +The `roledefinitions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2018-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/client.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/client.go index b4b1a6f3699..6d2ae83dcd2 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/client.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/client.go @@ -15,7 +15,7 @@ type RoleDefinitionsClient struct { } func NewRoleDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roledefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roledefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleDefinitionsClient: %+v", err) } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/id_scopedroledefinition.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/id_scopedroledefinition.go index 76b9d2239c8..195e065748b 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/id_scopedroledefinition.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/id_scopedroledefinition.go @@ -40,7 +40,7 @@ func ParseScopedRoleDefinitionID(input string) (*ScopedRoleDefinitionId, error) } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleDefinitionIDInsensitively(input string) (*ScopedRoleDefiniti } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_createorupdate.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_createorupdate.go index 9359124cd5b..094b32007d6 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_createorupdate.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, id ScopedRole var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_delete.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_delete.go index e8ad33d6d34..f13e639a9e7 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_delete.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_delete.go @@ -46,7 +46,6 @@ func (c RoleDefinitionsClient) Delete(ctx context.Context, id ScopedRoleDefiniti var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_get.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_get.go index 09cfc518d14..38e1a0d4073 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_get.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_get.go @@ -45,7 +45,6 @@ func (c RoleDefinitionsClient) Get(ctx context.Context, id ScopedRoleDefinitionI var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_list.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_list.go index 65fcfd2cd2a..5aaba1e87a8 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_list.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2018-01-01-preview/roledefinitions/version.go b/resource-manager/authorization/2018-01-01-preview/roledefinitions/version.go index dea43e714b2..8890be6bdf8 100644 --- a/resource-manager/authorization/2018-01-01-preview/roledefinitions/version.go +++ b/resource-manager/authorization/2018-01-01-preview/roledefinitions/version.go @@ -1,12 +1,10 @@ package roledefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roledefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roledefinitions/2018-01-01-preview" } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/README.md b/resource-manager/authorization/2020-04-01-preview/roleassignments/README.md index 93a87a9349a..79801960fc9 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/README.md +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-04-01-preview/roleassignments` Documentation -The `roleassignments` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-04-01-preview`). +The `roleassignments` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/client.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/client.go index 8e072e686a4..c16e05d193e 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/client.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/client.go @@ -15,7 +15,7 @@ type RoleAssignmentsClient struct { } func NewRoleAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentsClient: %+v", err) } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/id_roleid.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/id_roleid.go index 0b2fcbf2008..7aa0a8cc643 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/id_roleid.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/id_roleid.go @@ -38,7 +38,7 @@ func ParseRoleIdID(input string) (*RoleIdId, error) { } id := RoleIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseRoleIdIDInsensitively(input string) (*RoleIdId, error) { } id := RoleIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/id_scopedroleassignment.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/id_scopedroleassignment.go index 465ef7d9e92..263947cb9c6 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/id_scopedroleassignment.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/id_scopedroleassignment.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentID(input string) (*ScopedRoleAssignmentId, error) } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentIDInsensitively(input string) (*ScopedRoleAssignme } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_create.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_create.go index 6406eeb86f1..e80a896aeb5 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_create.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_create.go @@ -49,7 +49,6 @@ func (c RoleAssignmentsClient) Create(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_createbyid.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_createbyid.go index 9aeab1c8385..7d2d8a4a783 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_createbyid.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_createbyid.go @@ -49,7 +49,6 @@ func (c RoleAssignmentsClient) CreateById(ctx context.Context, id RoleIdId, inpu var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_delete.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_delete.go index 4ccb4526b17..8ab07a32872 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_delete.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_delete.go @@ -34,6 +34,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c RoleAssignmentsClient) Delete(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_deletebyid.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_deletebyid.go index 4d6b194caa2..3e91e6b4e34 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_deletebyid.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_deletebyid.go @@ -34,6 +34,7 @@ func (o DeleteByIdOperationOptions) ToHeaders() *client.Headers { func (o DeleteByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c RoleAssignmentsClient) DeleteById(ctx context.Context, id RoleIdId, opti var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_get.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_get.go index b1466232002..db9d0f6d987 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_get.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RoleAssignmentsClient) Get(ctx context.Context, id ScopedRoleAssignmentI var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_getbyid.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_getbyid.go index 2a1e20a6ecf..37666ef4063 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_getbyid.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_getbyid.go @@ -34,6 +34,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RoleAssignmentsClient) GetById(ctx context.Context, id RoleIdId, options var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_list.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_list.go index a64ed4c5595..32859f8e11c 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_list.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresource.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresource.go index 434ec7e9375..bfc1a107e59 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresource.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresourcegroup.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresourcegroup.go index bb681d05938..8670cc41b49 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresourcegroup.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforscope.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforscope.go index 35a751a0201..0eee5eaead4 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforscope.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/method_listforscope.go @@ -41,6 +41,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-04-01-preview/roleassignments/version.go b/resource-manager/authorization/2020-04-01-preview/roleassignments/version.go index 66ed719532b..ba70774b30a 100644 --- a/resource-manager/authorization/2020-04-01-preview/roleassignments/version.go +++ b/resource-manager/authorization/2020-04-01-preview/roleassignments/version.go @@ -1,12 +1,10 @@ package roleassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignments/2020-04-01-preview" } diff --git a/resource-manager/authorization/2020-10-01/eligiblechildresources/README.md b/resource-manager/authorization/2020-10-01/eligiblechildresources/README.md index 2b2cdc2737e..d72bef0b88d 100644 --- a/resource-manager/authorization/2020-10-01/eligiblechildresources/README.md +++ b/resource-manager/authorization/2020-10-01/eligiblechildresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/eligiblechildresources` Documentation -The `eligiblechildresources` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `eligiblechildresources` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/eligiblechildresources/client.go b/resource-manager/authorization/2020-10-01/eligiblechildresources/client.go index 7d5c1a25b22..59050cc5426 100644 --- a/resource-manager/authorization/2020-10-01/eligiblechildresources/client.go +++ b/resource-manager/authorization/2020-10-01/eligiblechildresources/client.go @@ -15,7 +15,7 @@ type EligibleChildResourcesClient struct { } func NewEligibleChildResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*EligibleChildResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eligiblechildresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eligiblechildresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EligibleChildResourcesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/eligiblechildresources/method_get.go b/resource-manager/authorization/2020-10-01/eligiblechildresources/method_get.go index 7015bd6c354..5eb88e76c6d 100644 --- a/resource-manager/authorization/2020-10-01/eligiblechildresources/method_get.go +++ b/resource-manager/authorization/2020-10-01/eligiblechildresources/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/eligiblechildresources/version.go b/resource-manager/authorization/2020-10-01/eligiblechildresources/version.go index 7f1f02ee5d0..ac9b68e618f 100644 --- a/resource-manager/authorization/2020-10-01/eligiblechildresources/version.go +++ b/resource-manager/authorization/2020-10-01/eligiblechildresources/version.go @@ -1,12 +1,10 @@ package eligiblechildresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eligiblechildresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eligiblechildresources/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/README.md b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/README.md index 11c51425629..37da89514cb 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/README.md +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances` Documentation -The `roleassignmentscheduleinstances` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleassignmentscheduleinstances` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/client.go b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/client.go index f0cc3a4f206..b29d22124e6 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/client.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/client.go @@ -15,7 +15,7 @@ type RoleAssignmentScheduleInstancesClient struct { } func NewRoleAssignmentScheduleInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentScheduleInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignmentscheduleinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignmentscheduleinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentScheduleInstancesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go index 6721f364e9f..04f83a1b04e 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/id_scopedroleassignmentscheduleinstance.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentScheduleInstanceID(input string) (*ScopedRoleAssig } id := ScopedRoleAssignmentScheduleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentScheduleInstanceIDInsensitively(input string) (*Sc } id := ScopedRoleAssignmentScheduleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_get.go b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_get.go index 568d2f6f8c4..ebb76fc53ff 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_get.go @@ -45,7 +45,6 @@ func (c RoleAssignmentScheduleInstancesClient) Get(ctx context.Context, id Scope var model RoleAssignmentScheduleInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_listforscope.go index 9ff5c3b4064..16a8a0d8db5 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/version.go b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/version.go index a1d8e02a60a..d12c7e6c177 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/version.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentscheduleinstances/version.go @@ -1,12 +1,10 @@ package roleassignmentscheduleinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignmentscheduleinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignmentscheduleinstances/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/README.md b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/README.md index 238258782cf..895d8b67f4c 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/README.md +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests` Documentation -The `roleassignmentschedulerequests` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleassignmentschedulerequests` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/client.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/client.go index d140fd1ee58..22431f67472 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/client.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/client.go @@ -15,7 +15,7 @@ type RoleAssignmentScheduleRequestsClient struct { } func NewRoleAssignmentScheduleRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentScheduleRequestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignmentschedulerequests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignmentschedulerequests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentScheduleRequestsClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go index a174a7c1be6..47d1d408b59 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/id_scopedroleassignmentschedulerequest.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentScheduleRequestID(input string) (*ScopedRoleAssign } id := ScopedRoleAssignmentScheduleRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentScheduleRequestIDInsensitively(input string) (*Sco } id := ScopedRoleAssignmentScheduleRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_create.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_create.go index eb8d0fc489a..36a80025020 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_create.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_create.go @@ -49,7 +49,6 @@ func (c RoleAssignmentScheduleRequestsClient) Create(ctx context.Context, id Sco var model RoleAssignmentScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_get.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_get.go index 0c967a06ea5..5f12fc127cc 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_get.go @@ -45,7 +45,6 @@ func (c RoleAssignmentScheduleRequestsClient) Get(ctx context.Context, id Scoped var model RoleAssignmentScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_listforscope.go index ba8dd657ddc..e16143e8296 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_validate.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_validate.go index 0a929f2ac43..bae64418a17 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_validate.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/method_validate.go @@ -50,7 +50,6 @@ func (c RoleAssignmentScheduleRequestsClient) Validate(ctx context.Context, id S var model RoleAssignmentScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/version.go b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/version.go index 8e35f84dff3..b25f32d1e45 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/version.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedulerequests/version.go @@ -1,12 +1,10 @@ package roleassignmentschedulerequests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignmentschedulerequests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignmentschedulerequests/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/README.md b/resource-manager/authorization/2020-10-01/roleassignmentschedules/README.md index 5b1cf904028..093c62769a0 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/README.md +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleassignmentschedules` Documentation -The `roleassignmentschedules` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleassignmentschedules` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/client.go b/resource-manager/authorization/2020-10-01/roleassignmentschedules/client.go index d341ea01477..3d6812b4837 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/client.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/client.go @@ -15,7 +15,7 @@ type RoleAssignmentSchedulesClient struct { } func NewRoleAssignmentSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignmentschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignmentschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentSchedulesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/id_scopedroleassignmentschedule.go b/resource-manager/authorization/2020-10-01/roleassignmentschedules/id_scopedroleassignmentschedule.go index 7ff4a361493..170ee7e0961 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/id_scopedroleassignmentschedule.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/id_scopedroleassignmentschedule.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentScheduleID(input string) (*ScopedRoleAssignmentSch } id := ScopedRoleAssignmentScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentScheduleIDInsensitively(input string) (*ScopedRole } id := ScopedRoleAssignmentScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_get.go b/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_get.go index db27d7b3048..60b0002dc11 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_get.go @@ -45,7 +45,6 @@ func (c RoleAssignmentSchedulesClient) Get(ctx context.Context, id ScopedRoleAss var model RoleAssignmentSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_listforscope.go index 5b7304bcd56..39e3b346f7c 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleassignmentschedules/version.go b/resource-manager/authorization/2020-10-01/roleassignmentschedules/version.go index 701d5043b86..f083c47063a 100644 --- a/resource-manager/authorization/2020-10-01/roleassignmentschedules/version.go +++ b/resource-manager/authorization/2020-10-01/roleassignmentschedules/version.go @@ -1,12 +1,10 @@ package roleassignmentschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignmentschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignmentschedules/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/README.md b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/README.md index 9709ec1d8ec..a6d3c7e84b0 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/README.md +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances` Documentation -The `roleeligibilityscheduleinstances` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleeligibilityscheduleinstances` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/client.go b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/client.go index 04232dfdb6e..03eacd383e5 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/client.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/client.go @@ -15,7 +15,7 @@ type RoleEligibilityScheduleInstancesClient struct { } func NewRoleEligibilityScheduleInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleEligibilityScheduleInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleeligibilityscheduleinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleeligibilityscheduleinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleEligibilityScheduleInstancesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go index f937e80d17a..d43c8e6d2f8 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/id_scopedroleeligibilityscheduleinstance.go @@ -40,7 +40,7 @@ func ParseScopedRoleEligibilityScheduleInstanceID(input string) (*ScopedRoleElig } id := ScopedRoleEligibilityScheduleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleEligibilityScheduleInstanceIDInsensitively(input string) (*S } id := ScopedRoleEligibilityScheduleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_get.go b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_get.go index 72daf9af9a5..71530895021 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_get.go @@ -45,7 +45,6 @@ func (c RoleEligibilityScheduleInstancesClient) Get(ctx context.Context, id Scop var model RoleEligibilityScheduleInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_listforscope.go index 691e3f3d16b..a96d65e64b7 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/version.go b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/version.go index 82395988285..fbce60cf022 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/version.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityscheduleinstances/version.go @@ -1,12 +1,10 @@ package roleeligibilityscheduleinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleeligibilityscheduleinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleeligibilityscheduleinstances/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/README.md b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/README.md index cc79d4ca7ce..342a1621493 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/README.md +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests` Documentation -The `roleeligibilityschedulerequests` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleeligibilityschedulerequests` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/client.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/client.go index 8be9435f26e..6a7ca7f0ee1 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/client.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/client.go @@ -15,7 +15,7 @@ type RoleEligibilityScheduleRequestsClient struct { } func NewRoleEligibilityScheduleRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleEligibilityScheduleRequestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleeligibilityschedulerequests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleeligibilityschedulerequests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleEligibilityScheduleRequestsClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go index 12527780487..5193e93694d 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/id_scopedroleeligibilityschedulerequest.go @@ -40,7 +40,7 @@ func ParseScopedRoleEligibilityScheduleRequestID(input string) (*ScopedRoleEligi } id := ScopedRoleEligibilityScheduleRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleEligibilityScheduleRequestIDInsensitively(input string) (*Sc } id := ScopedRoleEligibilityScheduleRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_create.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_create.go index 135ba610635..3758ab29355 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_create.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_create.go @@ -49,7 +49,6 @@ func (c RoleEligibilityScheduleRequestsClient) Create(ctx context.Context, id Sc var model RoleEligibilityScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_get.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_get.go index e68fcac2e6c..6df388a0914 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_get.go @@ -45,7 +45,6 @@ func (c RoleEligibilityScheduleRequestsClient) Get(ctx context.Context, id Scope var model RoleEligibilityScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_listforscope.go index 10fab072a35..bd3dd00a7da 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_validate.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_validate.go index e54ba4e2dda..eb464fbbcbd 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_validate.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/method_validate.go @@ -50,7 +50,6 @@ func (c RoleEligibilityScheduleRequestsClient) Validate(ctx context.Context, id var model RoleEligibilityScheduleRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/version.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/version.go index a2d6500368c..e5c9cf6d29c 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/version.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedulerequests/version.go @@ -1,12 +1,10 @@ package roleeligibilityschedulerequests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleeligibilityschedulerequests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleeligibilityschedulerequests/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/README.md b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/README.md index cfa586977d8..d11fad6a6b9 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/README.md +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/roleeligibilityschedules` Documentation -The `roleeligibilityschedules` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `roleeligibilityschedules` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/client.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/client.go index 435d81c050d..4adcfe42731 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/client.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/client.go @@ -15,7 +15,7 @@ type RoleEligibilitySchedulesClient struct { } func NewRoleEligibilitySchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleEligibilitySchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleeligibilityschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleeligibilityschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleEligibilitySchedulesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/id_scopedroleeligibilityschedule.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/id_scopedroleeligibilityschedule.go index a25602f7775..29afecd1643 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/id_scopedroleeligibilityschedule.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/id_scopedroleeligibilityschedule.go @@ -40,7 +40,7 @@ func ParseScopedRoleEligibilityScheduleID(input string) (*ScopedRoleEligibilityS } id := ScopedRoleEligibilityScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleEligibilityScheduleIDInsensitively(input string) (*ScopedRol } id := ScopedRoleEligibilityScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_get.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_get.go index 2a5632f6691..febfc33aebe 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_get.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_get.go @@ -45,7 +45,6 @@ func (c RoleEligibilitySchedulesClient) Get(ctx context.Context, id ScopedRoleEl var model RoleEligibilitySchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_listforscope.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_listforscope.go index 75d9d08ed73..12379f9bcba 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/version.go b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/version.go index 6c2bb9ce361..f95189b24a6 100644 --- a/resource-manager/authorization/2020-10-01/roleeligibilityschedules/version.go +++ b/resource-manager/authorization/2020-10-01/roleeligibilityschedules/version.go @@ -1,12 +1,10 @@ package roleeligibilityschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleeligibilityschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleeligibilityschedules/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/README.md b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/README.md index 1727ff6c07a..802039caf80 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/README.md +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/rolemanagementpolicies` Documentation -The `rolemanagementpolicies` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `rolemanagementpolicies` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/client.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/client.go index 89e8d75169c..24cbefa3b08 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/client.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/client.go @@ -15,7 +15,7 @@ type RoleManagementPoliciesClient struct { } func NewRoleManagementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleManagementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rolemanagementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rolemanagementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleManagementPoliciesClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/id_scopedrolemanagementpolicy.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/id_scopedrolemanagementpolicy.go index dc31cd1db97..b9bccf6b6f4 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/id_scopedrolemanagementpolicy.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/id_scopedrolemanagementpolicy.go @@ -40,7 +40,7 @@ func ParseScopedRoleManagementPolicyID(input string) (*ScopedRoleManagementPolic } id := ScopedRoleManagementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleManagementPolicyIDInsensitively(input string) (*ScopedRoleMa } id := ScopedRoleManagementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_get.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_get.go index ea14ce67cea..f420f796bb1 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_get.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_get.go @@ -45,7 +45,6 @@ func (c RoleManagementPoliciesClient) Get(ctx context.Context, id ScopedRoleMana var model RoleManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_listforscope.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_listforscope.go index 57c4f0a394a..423352aacd8 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_listforscope.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_update.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_update.go index fbc5442aac4..bdccbae38ee 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_update.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/method_update.go @@ -49,7 +49,6 @@ func (c RoleManagementPoliciesClient) Update(ctx context.Context, id ScopedRoleM var model RoleManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go index 310d9b0cf68..ce22b5a85a0 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyproperties.go @@ -65,7 +65,7 @@ func (s *RoleManagementPolicyProperties) UnmarshalJSON(bytes []byte) error { output := make([]RoleManagementPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalRoleManagementPolicyRuleImplementation(val) + impl, err := UnmarshalRoleManagementPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'EffectiveRules' for 'RoleManagementPolicyProperties': %+v", i, err) } @@ -82,7 +82,7 @@ func (s *RoleManagementPolicyProperties) UnmarshalJSON(bytes []byte) error { output := make([]RoleManagementPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalRoleManagementPolicyRuleImplementation(val) + impl, err := UnmarshalRoleManagementPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'RoleManagementPolicyProperties': %+v", i, err) } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyrule.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyrule.go index d89224dc5fa..cfd6cee0f1e 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyrule.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/model_rolemanagementpolicyrule.go @@ -9,18 +9,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RoleManagementPolicyRule interface { + RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl } -// RawRoleManagementPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RoleManagementPolicyRule = BaseRoleManagementPolicyRuleImpl{} + +type BaseRoleManagementPolicyRuleImpl struct { + Id *string `json:"id,omitempty"` + RuleType RoleManagementPolicyRuleType `json:"ruleType"` + Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"` +} + +func (s BaseRoleManagementPolicyRuleImpl) RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl { + return s +} + +var _ RoleManagementPolicyRule = RawRoleManagementPolicyRuleImpl{} + +// RawRoleManagementPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRoleManagementPolicyRuleImpl struct { - Type string - Values map[string]interface{} + roleManagementPolicyRule BaseRoleManagementPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawRoleManagementPolicyRuleImpl) RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl { + return s.roleManagementPolicyRule } -func unmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManagementPolicyRule, error) { +func UnmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManagementPolicyRule, error) { if input == nil { return nil, nil } @@ -35,10 +54,15 @@ func unmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManageme return nil, nil } - out := RawRoleManagementPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseRoleManagementPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRoleManagementPolicyRuleImpl: %+v", err) } - return out, nil + + return RawRoleManagementPolicyRuleImpl{ + roleManagementPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/version.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/version.go index cbd840f2fce..c12dfda121c 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicies/version.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicies/version.go @@ -1,12 +1,10 @@ package rolemanagementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rolemanagementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rolemanagementpolicies/2020-10-01" } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/README.md b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/README.md index 07508baf38e..b8ef06cbbc0 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/README.md +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments` Documentation -The `rolemanagementpolicyassignments` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2020-10-01`). +The `rolemanagementpolicyassignments` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/client.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/client.go index c2d42940c83..0474bcd924a 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/client.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/client.go @@ -15,7 +15,7 @@ type RoleManagementPolicyAssignmentsClient struct { } func NewRoleManagementPolicyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleManagementPolicyAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rolemanagementpolicyassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rolemanagementpolicyassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleManagementPolicyAssignmentsClient: %+v", err) } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/id_scopedrolemanagementpolicyassignment.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/id_scopedrolemanagementpolicyassignment.go index aab2b229ecc..4570d88d1d8 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/id_scopedrolemanagementpolicyassignment.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/id_scopedrolemanagementpolicyassignment.go @@ -40,7 +40,7 @@ func ParseScopedRoleManagementPolicyAssignmentID(input string) (*ScopedRoleManag } id := ScopedRoleManagementPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleManagementPolicyAssignmentIDInsensitively(input string) (*Sc } id := ScopedRoleManagementPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_create.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_create.go index fdb037e7b97..130d192d2c4 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_create.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_create.go @@ -49,7 +49,6 @@ func (c RoleManagementPolicyAssignmentsClient) Create(ctx context.Context, id Sc var model RoleManagementPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_get.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_get.go index bba35f1b903..930cb5dac03 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_get.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/method_get.go @@ -45,7 +45,6 @@ func (c RoleManagementPolicyAssignmentsClient) Get(ctx context.Context, id Scope var model RoleManagementPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go index a4a156831b0..1efa2208fa3 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyassignmentproperties.go @@ -43,7 +43,7 @@ func (s *RoleManagementPolicyAssignmentProperties) UnmarshalJSON(bytes []byte) e output := make([]RoleManagementPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalRoleManagementPolicyRuleImplementation(val) + impl, err := UnmarshalRoleManagementPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'EffectiveRules' for 'RoleManagementPolicyAssignmentProperties': %+v", i, err) } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyrule.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyrule.go index ab772e8c79a..ca26180f4d0 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyrule.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/model_rolemanagementpolicyrule.go @@ -9,18 +9,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RoleManagementPolicyRule interface { + RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl } -// RawRoleManagementPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RoleManagementPolicyRule = BaseRoleManagementPolicyRuleImpl{} + +type BaseRoleManagementPolicyRuleImpl struct { + Id *string `json:"id,omitempty"` + RuleType RoleManagementPolicyRuleType `json:"ruleType"` + Target *RoleManagementPolicyRuleTarget `json:"target,omitempty"` +} + +func (s BaseRoleManagementPolicyRuleImpl) RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl { + return s +} + +var _ RoleManagementPolicyRule = RawRoleManagementPolicyRuleImpl{} + +// RawRoleManagementPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRoleManagementPolicyRuleImpl struct { - Type string - Values map[string]interface{} + roleManagementPolicyRule BaseRoleManagementPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawRoleManagementPolicyRuleImpl) RoleManagementPolicyRule() BaseRoleManagementPolicyRuleImpl { + return s.roleManagementPolicyRule } -func unmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManagementPolicyRule, error) { +func UnmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManagementPolicyRule, error) { if input == nil { return nil, nil } @@ -35,10 +54,15 @@ func unmarshalRoleManagementPolicyRuleImplementation(input []byte) (RoleManageme return nil, nil } - out := RawRoleManagementPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseRoleManagementPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRoleManagementPolicyRuleImpl: %+v", err) } - return out, nil + + return RawRoleManagementPolicyRuleImpl{ + roleManagementPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/version.go b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/version.go index cb84f796c24..ef2870a17ba 100644 --- a/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/version.go +++ b/resource-manager/authorization/2020-10-01/rolemanagementpolicyassignments/version.go @@ -1,12 +1,10 @@ package rolemanagementpolicyassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rolemanagementpolicyassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rolemanagementpolicyassignments/2020-10-01" } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/README.md b/resource-manager/authorization/2022-04-01/denyassignments/README.md index 450d403a148..36401354845 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/README.md +++ b/resource-manager/authorization/2022-04-01/denyassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/denyassignments` Documentation -The `denyassignments` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-04-01`). +The `denyassignments` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-04-01/denyassignments/client.go b/resource-manager/authorization/2022-04-01/denyassignments/client.go index 7cc2334e30d..65dfc3cf08b 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/client.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/client.go @@ -15,7 +15,7 @@ type DenyAssignmentsClient struct { } func NewDenyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DenyAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "denyassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "denyassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DenyAssignmentsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/id_scopeddenyassignmentid.go b/resource-manager/authorization/2022-04-01/denyassignments/id_scopeddenyassignmentid.go index 1fc1253d4a4..403f4690ef9 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/id_scopeddenyassignmentid.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/id_scopeddenyassignmentid.go @@ -40,7 +40,7 @@ func ParseScopedDenyAssignmentIdID(input string) (*ScopedDenyAssignmentIdId, err } id := ScopedDenyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDenyAssignmentIdIDInsensitively(input string) (*ScopedDenyAssign } id := ScopedDenyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_get.go b/resource-manager/authorization/2022-04-01/denyassignments/method_get.go index a56551d6678..7f6b33d6793 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_get.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_get.go @@ -45,7 +45,6 @@ func (c DenyAssignmentsClient) Get(ctx context.Context, id ScopedDenyAssignmentI var model DenyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_getbyid.go b/resource-manager/authorization/2022-04-01/denyassignments/method_getbyid.go index c698ad60007..a127772f84f 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_getbyid.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_getbyid.go @@ -46,7 +46,6 @@ func (c DenyAssignmentsClient) GetById(ctx context.Context, id commonids.ScopeId var model DenyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_list.go b/resource-manager/authorization/2022-04-01/denyassignments/method_list.go index 8db69d7909d..f55cc793f9c 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_list.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_listforresource.go b/resource-manager/authorization/2022-04-01/denyassignments/method_listforresource.go index 6dd3e6a597b..2569c87bfb8 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_listforresource.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_listforresource.go @@ -40,6 +40,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_listforresourcegroup.go b/resource-manager/authorization/2022-04-01/denyassignments/method_listforresourcegroup.go index 9837317c67b..01cdc2f682f 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_listforresourcegroup.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_listforresourcegroup.go @@ -40,6 +40,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/method_listforscope.go b/resource-manager/authorization/2022-04-01/denyassignments/method_listforscope.go index 3adf0a86d82..3c80602caf2 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/method_listforscope.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/denyassignments/version.go b/resource-manager/authorization/2022-04-01/denyassignments/version.go index f8cfda9d532..00a5757c577 100644 --- a/resource-manager/authorization/2022-04-01/denyassignments/version.go +++ b/resource-manager/authorization/2022-04-01/denyassignments/version.go @@ -1,12 +1,10 @@ package denyassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/denyassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/denyassignments/2022-04-01" } diff --git a/resource-manager/authorization/2022-04-01/permissions/README.md b/resource-manager/authorization/2022-04-01/permissions/README.md index fd1ea53e4b2..5d1b329a152 100644 --- a/resource-manager/authorization/2022-04-01/permissions/README.md +++ b/resource-manager/authorization/2022-04-01/permissions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/permissions` Documentation -The `permissions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-04-01`). +The `permissions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-04-01/permissions/client.go b/resource-manager/authorization/2022-04-01/permissions/client.go index f8051b34043..15d247bee31 100644 --- a/resource-manager/authorization/2022-04-01/permissions/client.go +++ b/resource-manager/authorization/2022-04-01/permissions/client.go @@ -15,7 +15,7 @@ type PermissionsClient struct { } func NewPermissionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PermissionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "permissions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "permissions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PermissionsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-04-01/permissions/version.go b/resource-manager/authorization/2022-04-01/permissions/version.go index 313a3ce4271..479600654ec 100644 --- a/resource-manager/authorization/2022-04-01/permissions/version.go +++ b/resource-manager/authorization/2022-04-01/permissions/version.go @@ -1,12 +1,10 @@ package permissions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/permissions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/permissions/2022-04-01" } diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/README.md b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/README.md index 53da915e53c..ed9403f41c8 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/README.md +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/provideroperationsmetadata` Documentation -The `provideroperationsmetadata` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-04-01`). +The `provideroperationsmetadata` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/client.go b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/client.go index 630417003d8..44a7773d1cc 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/client.go +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/client.go @@ -15,7 +15,7 @@ type ProviderOperationsMetadataClient struct { } func NewProviderOperationsMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderOperationsMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provideroperationsmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provideroperationsmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderOperationsMetadataClient: %+v", err) } diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/id_provideroperation.go b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/id_provideroperation.go index c6a9a315716..b544d937e12 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/id_provideroperation.go +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/id_provideroperation.go @@ -38,7 +38,7 @@ func ParseProviderOperationID(input string) (*ProviderOperationId, error) { } id := ProviderOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderOperationIDInsensitively(input string) (*ProviderOperationId, } id := ProviderOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_get.go b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_get.go index 9e95668a431..10dd19d0e02 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_get.go +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProviderOperationsMetadataClient) Get(ctx context.Context, id ProviderOp var model ProviderOperationsMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_list.go b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_list.go index d7416894090..c4ec7014dd1 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_list.go +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/version.go b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/version.go index 73218074675..a2739ec3156 100644 --- a/resource-manager/authorization/2022-04-01/provideroperationsmetadata/version.go +++ b/resource-manager/authorization/2022-04-01/provideroperationsmetadata/version.go @@ -1,12 +1,10 @@ package provideroperationsmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provideroperationsmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provideroperationsmetadata/2022-04-01" } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/README.md b/resource-manager/authorization/2022-04-01/roleassignments/README.md index a1f9f4cc564..2ce738351ed 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/README.md +++ b/resource-manager/authorization/2022-04-01/roleassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roleassignments` Documentation -The `roleassignments` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-04-01`). +The `roleassignments` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-04-01/roleassignments/client.go b/resource-manager/authorization/2022-04-01/roleassignments/client.go index 8e072e686a4..c16e05d193e 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/client.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/client.go @@ -15,7 +15,7 @@ type RoleAssignmentsClient struct { } func NewRoleAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roleassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roleassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleAssignmentsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go b/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go index 465ef7d9e92..263947cb9c6 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/id_scopedroleassignment.go @@ -40,7 +40,7 @@ func ParseScopedRoleAssignmentID(input string) (*ScopedRoleAssignmentId, error) } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleAssignmentIDInsensitively(input string) (*ScopedRoleAssignme } id := ScopedRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_create.go b/resource-manager/authorization/2022-04-01/roleassignments/method_create.go index c0933b30f89..e5e7ce1d25b 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_create.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_create.go @@ -50,7 +50,6 @@ func (c RoleAssignmentsClient) Create(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_createbyid.go b/resource-manager/authorization/2022-04-01/roleassignments/method_createbyid.go index 693f29bb25a..28c1de6aa81 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_createbyid.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_createbyid.go @@ -51,7 +51,6 @@ func (c RoleAssignmentsClient) CreateById(ctx context.Context, id commonids.Scop var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_delete.go b/resource-manager/authorization/2022-04-01/roleassignments/method_delete.go index 4ccb4526b17..8ab07a32872 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_delete.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_delete.go @@ -34,6 +34,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c RoleAssignmentsClient) Delete(ctx context.Context, id ScopedRoleAssignme var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_deletebyid.go b/resource-manager/authorization/2022-04-01/roleassignments/method_deletebyid.go index 35efbe1b2aa..d678ee645bd 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_deletebyid.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_deletebyid.go @@ -35,6 +35,7 @@ func (o DeleteByIdOperationOptions) ToHeaders() *client.Headers { func (o DeleteByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -76,7 +77,6 @@ func (c RoleAssignmentsClient) DeleteById(ctx context.Context, id commonids.Scop var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_get.go b/resource-manager/authorization/2022-04-01/roleassignments/method_get.go index b1466232002..db9d0f6d987 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_get.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RoleAssignmentsClient) Get(ctx context.Context, id ScopedRoleAssignmentI var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_getbyid.go b/resource-manager/authorization/2022-04-01/roleassignments/method_getbyid.go index d272928f5e5..a90cb4f6b05 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_getbyid.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_getbyid.go @@ -35,6 +35,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c RoleAssignmentsClient) GetById(ctx context.Context, id commonids.ScopeId var model RoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_listforresource.go b/resource-manager/authorization/2022-04-01/roleassignments/method_listforresource.go index 434ec7e9375..bfc1a107e59 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_listforresource.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_listforresourcegroup.go b/resource-manager/authorization/2022-04-01/roleassignments/method_listforresourcegroup.go index bb681d05938..8670cc41b49 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_listforresourcegroup.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_listforscope.go b/resource-manager/authorization/2022-04-01/roleassignments/method_listforscope.go index 35a751a0201..0eee5eaead4 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_listforscope.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_listforscope.go @@ -41,6 +41,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/method_listforsubscription.go b/resource-manager/authorization/2022-04-01/roleassignments/method_listforsubscription.go index 4c4e6d2aa95..03c4ba0e2a9 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/method_listforsubscription.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/method_listforsubscription.go @@ -41,6 +41,7 @@ func (o ListForSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListForSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/roleassignments/version.go b/resource-manager/authorization/2022-04-01/roleassignments/version.go index 685241b33c0..0567df82d48 100644 --- a/resource-manager/authorization/2022-04-01/roleassignments/version.go +++ b/resource-manager/authorization/2022-04-01/roleassignments/version.go @@ -1,12 +1,10 @@ package roleassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roleassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roleassignments/2022-04-01" } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/README.md b/resource-manager/authorization/2022-04-01/roledefinitions/README.md index de878df96ec..827e7976fbe 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/README.md +++ b/resource-manager/authorization/2022-04-01/roledefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-04-01/roledefinitions` Documentation -The `roledefinitions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-04-01`). +The `roledefinitions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/client.go b/resource-manager/authorization/2022-04-01/roledefinitions/client.go index b4b1a6f3699..6d2ae83dcd2 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/client.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/client.go @@ -15,7 +15,7 @@ type RoleDefinitionsClient struct { } func NewRoleDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roledefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roledefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleDefinitionsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go b/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go index 76b9d2239c8..195e065748b 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/id_scopedroledefinition.go @@ -40,7 +40,7 @@ func ParseScopedRoleDefinitionID(input string) (*ScopedRoleDefinitionId, error) } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleDefinitionIDInsensitively(input string) (*ScopedRoleDefiniti } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/method_createorupdate.go b/resource-manager/authorization/2022-04-01/roledefinitions/method_createorupdate.go index 9359124cd5b..094b32007d6 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/method_createorupdate.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, id ScopedRole var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/method_delete.go b/resource-manager/authorization/2022-04-01/roledefinitions/method_delete.go index e8ad33d6d34..f13e639a9e7 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/method_delete.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/method_delete.go @@ -46,7 +46,6 @@ func (c RoleDefinitionsClient) Delete(ctx context.Context, id ScopedRoleDefiniti var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/method_get.go b/resource-manager/authorization/2022-04-01/roledefinitions/method_get.go index 09cfc518d14..38e1a0d4073 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/method_get.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/method_get.go @@ -45,7 +45,6 @@ func (c RoleDefinitionsClient) Get(ctx context.Context, id ScopedRoleDefinitionI var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/method_list.go b/resource-manager/authorization/2022-04-01/roledefinitions/method_list.go index 65fcfd2cd2a..5aaba1e87a8 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/method_list.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-04-01/roledefinitions/version.go b/resource-manager/authorization/2022-04-01/roledefinitions/version.go index 46a58c1faa6..69db46565c9 100644 --- a/resource-manager/authorization/2022-04-01/roledefinitions/version.go +++ b/resource-manager/authorization/2022-04-01/roledefinitions/version.go @@ -1,12 +1,10 @@ package roledefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roledefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roledefinitions/2022-04-01" } diff --git a/resource-manager/authorization/2022-05-01-preview/permissions/README.md b/resource-manager/authorization/2022-05-01-preview/permissions/README.md index dd431ff5d2b..43f1499cae9 100644 --- a/resource-manager/authorization/2022-05-01-preview/permissions/README.md +++ b/resource-manager/authorization/2022-05-01-preview/permissions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-05-01-preview/permissions` Documentation -The `permissions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-05-01-preview`). +The `permissions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-05-01-preview/permissions/client.go b/resource-manager/authorization/2022-05-01-preview/permissions/client.go index f8051b34043..15d247bee31 100644 --- a/resource-manager/authorization/2022-05-01-preview/permissions/client.go +++ b/resource-manager/authorization/2022-05-01-preview/permissions/client.go @@ -15,7 +15,7 @@ type PermissionsClient struct { } func NewPermissionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PermissionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "permissions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "permissions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PermissionsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-05-01-preview/permissions/version.go b/resource-manager/authorization/2022-05-01-preview/permissions/version.go index 77d1519d3ed..3b8d9155c9f 100644 --- a/resource-manager/authorization/2022-05-01-preview/permissions/version.go +++ b/resource-manager/authorization/2022-05-01-preview/permissions/version.go @@ -1,12 +1,10 @@ package permissions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/permissions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/permissions/2022-05-01-preview" } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/README.md b/resource-manager/authorization/2022-05-01-preview/roledefinitions/README.md index 78baf074c64..073d1c90880 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/README.md +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/authorization/2022-05-01-preview/roledefinitions` Documentation -The `roledefinitions` SDK allows for interaction with the Azure Resource Manager Service `authorization` (API Version `2022-05-01-preview`). +The `roledefinitions` SDK allows for interaction with Azure Resource Manager `authorization` (API Version `2022-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/client.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/client.go index b4b1a6f3699..6d2ae83dcd2 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/client.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/client.go @@ -15,7 +15,7 @@ type RoleDefinitionsClient struct { } func NewRoleDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RoleDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roledefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roledefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoleDefinitionsClient: %+v", err) } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/id_scopedroledefinition.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/id_scopedroledefinition.go index 76b9d2239c8..195e065748b 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/id_scopedroledefinition.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/id_scopedroledefinition.go @@ -40,7 +40,7 @@ func ParseScopedRoleDefinitionID(input string) (*ScopedRoleDefinitionId, error) } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRoleDefinitionIDInsensitively(input string) (*ScopedRoleDefiniti } id := ScopedRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_createorupdate.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_createorupdate.go index 9359124cd5b..094b32007d6 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_createorupdate.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, id ScopedRole var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_delete.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_delete.go index e8ad33d6d34..f13e639a9e7 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_delete.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_delete.go @@ -46,7 +46,6 @@ func (c RoleDefinitionsClient) Delete(ctx context.Context, id ScopedRoleDefiniti var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_get.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_get.go index 09cfc518d14..38e1a0d4073 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_get.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_get.go @@ -45,7 +45,6 @@ func (c RoleDefinitionsClient) Get(ctx context.Context, id ScopedRoleDefinitionI var model RoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_list.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_list.go index 65fcfd2cd2a..5aaba1e87a8 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_list.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/authorization/2022-05-01-preview/roledefinitions/version.go b/resource-manager/authorization/2022-05-01-preview/roledefinitions/version.go index e5d77c5278e..aae680f19d7 100644 --- a/resource-manager/authorization/2022-05-01-preview/roledefinitions/version.go +++ b/resource-manager/authorization/2022-05-01-preview/roledefinitions/version.go @@ -1,12 +1,10 @@ package roledefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roledefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roledefinitions/2022-05-01-preview" } diff --git a/resource-manager/automanage/2022-05-04/bestpractices/README.md b/resource-manager/automanage/2022-05-04/bestpractices/README.md index a3ee5483b7f..e11cb90127b 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/README.md +++ b/resource-manager/automanage/2022-05-04/bestpractices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/bestpractices` Documentation -The `bestpractices` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `bestpractices` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/bestpractices/client.go b/resource-manager/automanage/2022-05-04/bestpractices/client.go index e3a04ff4e04..afdda56044a 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/client.go +++ b/resource-manager/automanage/2022-05-04/bestpractices/client.go @@ -15,7 +15,7 @@ type BestPracticesClient struct { } func NewBestPracticesClientWithBaseURI(sdkApi sdkEnv.Api) (*BestPracticesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bestpractices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bestpractices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BestPracticesClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/bestpractices/id_bestpractice.go b/resource-manager/automanage/2022-05-04/bestpractices/id_bestpractice.go index fbc6d1e040d..19db972a36f 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/id_bestpractice.go +++ b/resource-manager/automanage/2022-05-04/bestpractices/id_bestpractice.go @@ -38,7 +38,7 @@ func ParseBestPracticeID(input string) (*BestPracticeId, error) { } id := BestPracticeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBestPracticeIDInsensitively(input string) (*BestPracticeId, error) { } id := BestPracticeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/bestpractices/method_get.go b/resource-manager/automanage/2022-05-04/bestpractices/method_get.go index 1f1fccda2b7..8b84a7791a1 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/method_get.go +++ b/resource-manager/automanage/2022-05-04/bestpractices/method_get.go @@ -45,7 +45,6 @@ func (c BestPracticesClient) Get(ctx context.Context, id BestPracticeId) (result var model BestPractice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/bestpractices/method_listbytenant.go b/resource-manager/automanage/2022-05-04/bestpractices/method_listbytenant.go index 748a2578c17..8fbc2cba8df 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/method_listbytenant.go +++ b/resource-manager/automanage/2022-05-04/bestpractices/method_listbytenant.go @@ -45,7 +45,6 @@ func (c BestPracticesClient) ListByTenant(ctx context.Context) (result ListByTen var model BestPracticeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/bestpractices/version.go b/resource-manager/automanage/2022-05-04/bestpractices/version.go index f62f9b8ed7b..b9b15691799 100644 --- a/resource-manager/automanage/2022-05-04/bestpractices/version.go +++ b/resource-manager/automanage/2022-05-04/bestpractices/version.go @@ -1,12 +1,10 @@ package bestpractices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bestpractices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bestpractices/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/README.md b/resource-manager/automanage/2022-05-04/bestpracticesversions/README.md index 771d9fbcc36..9798eb5619a 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/README.md +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/bestpracticesversions` Documentation -The `bestpracticesversions` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `bestpracticesversions` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/client.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/client.go index 177ac2f318e..0dd73569a7e 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/client.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/client.go @@ -15,7 +15,7 @@ type BestPracticesVersionsClient struct { } func NewBestPracticesVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BestPracticesVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bestpracticesversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bestpracticesversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BestPracticesVersionsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/id_bestpractice.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/id_bestpractice.go index e8d6a79ac5f..1a69e57066b 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/id_bestpractice.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/id_bestpractice.go @@ -38,7 +38,7 @@ func ParseBestPracticeID(input string) (*BestPracticeId, error) { } id := BestPracticeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBestPracticeIDInsensitively(input string) (*BestPracticeId, error) { } id := BestPracticeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/id_version.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/id_version.go index bae958cac89..f3d2585440a 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/id_version.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/id_version.go @@ -40,7 +40,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/method_get.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/method_get.go index 741505da900..4c3c0c8932d 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/method_get.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/method_get.go @@ -45,7 +45,6 @@ func (c BestPracticesVersionsClient) Get(ctx context.Context, id VersionId) (res var model BestPractice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/method_listbytenant.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/method_listbytenant.go index 47349ee0884..f5b9dead276 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/method_listbytenant.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/method_listbytenant.go @@ -46,7 +46,6 @@ func (c BestPracticesVersionsClient) ListByTenant(ctx context.Context, id BestPr var model BestPracticeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/bestpracticesversions/version.go b/resource-manager/automanage/2022-05-04/bestpracticesversions/version.go index a9f62d109e0..a75adcf2bbb 100644 --- a/resource-manager/automanage/2022-05-04/bestpracticesversions/version.go +++ b/resource-manager/automanage/2022-05-04/bestpracticesversions/version.go @@ -1,12 +1,10 @@ package bestpracticesversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bestpracticesversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bestpracticesversions/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/README.md b/resource-manager/automanage/2022-05-04/configurationprofileassignments/README.md index 57a737436b6..fcf6114cd43 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/README.md +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofileassignments` Documentation -The `configurationprofileassignments` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `configurationprofileassignments` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/client.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/client.go index 0e6e853b499..38317de278b 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/client.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/client.go @@ -15,7 +15,7 @@ type ConfigurationProfileAssignmentsClient struct { } func NewConfigurationProfileAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfileAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofileassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationprofileassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationProfileAssignmentsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_cluster.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_cluster.go index 584373ee988..e9851ccda1a 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_cluster.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_machine.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_machine.go index 591bac3b621..6e1039cddce 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_machine.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachine.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachine.go index deff0021d95..c79a71a8040 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachine.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachineproviders2configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachineproviders2configurationprofileassignment.go index 2d6f1f7a026..c6d98cdf7bb 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachineproviders2configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/id_virtualmachineproviders2configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2ConfigurationProfileAssignmentID(input string) } id := VirtualMachineProviders2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2ConfigurationProfileAssignmentIDInsensitively( } id := VirtualMachineProviders2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_createorupdate.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_createorupdate.go index fda44e6b25d..11b171aa8cf 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_createorupdate.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationProfileAssignmentsClient) CreateOrUpdate(ctx context.Contex var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_get.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_get.go index b7538ad1abd..ff5b77cb3d2 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_get.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationProfileAssignmentsClient) Get(ctx context.Context, id Virtu var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_list.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_list.go index 1c6db9894d3..d336963336b 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_list.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_list.go @@ -47,7 +47,6 @@ func (c ConfigurationProfileAssignmentsClient) List(ctx context.Context, id comm var model ConfigurationProfileAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyclustername.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyclustername.go index 70a7fc03acb..6dc4e0f7af9 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyclustername.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyclustername.go @@ -46,7 +46,6 @@ func (c ConfigurationProfileAssignmentsClient) ListByClusterName(ctx context.Con var model ConfigurationProfileAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbymachinename.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbymachinename.go index 226705aedd3..f4c4522301d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbymachinename.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbymachinename.go @@ -46,7 +46,6 @@ func (c ConfigurationProfileAssignmentsClient) ListByMachineName(ctx context.Con var model ConfigurationProfileAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbysubscription.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbysubscription.go index a168d78cfa6..4d6171f4b7d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbysubscription.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ConfigurationProfileAssignmentsClient) ListBySubscription(ctx context.Co var model ConfigurationProfileAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyvirtualmachines.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyvirtualmachines.go index 0a74a46d786..ce23beece1d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyvirtualmachines.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/method_listbyvirtualmachines.go @@ -46,7 +46,6 @@ func (c ConfigurationProfileAssignmentsClient) ListByVirtualMachines(ctx context var model ConfigurationProfileAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofileassignments/version.go b/resource-manager/automanage/2022-05-04/configurationprofileassignments/version.go index 14baa07ec1b..1be55190585 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofileassignments/version.go +++ b/resource-manager/automanage/2022-05-04/configurationprofileassignments/version.go @@ -1,12 +1,10 @@ package configurationprofileassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofileassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationprofileassignments/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/README.md b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/README.md index 1d4a67c77de..c46dd9d20a1 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/README.md +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehciassignments` Documentation -The `configurationprofilehciassignments` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `configurationprofilehciassignments` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/client.go b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/client.go index 62568e2a8ec..efcf5ce98a1 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/client.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/client.go @@ -15,7 +15,7 @@ type ConfigurationProfileHCIAssignmentsClient struct { } func NewConfigurationProfileHCIAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfileHCIAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofilehciassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationprofilehciassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationProfileHCIAssignmentsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/id_configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/id_configurationprofileassignment.go index ef9cc1b9c7f..8ced2384e44 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/id_configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/id_configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseConfigurationProfileAssignmentID(input string) (*ConfigurationProfileA } id := ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationProfileAssignmentIDInsensitively(input string) (*Configur } id := ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_createorupdate.go b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_createorupdate.go index 7a9b29e3edf..fe529dff7c2 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_createorupdate.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationProfileHCIAssignmentsClient) CreateOrUpdate(ctx context.Con var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_get.go b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_get.go index f131bc74e9d..7eeba1e5e1d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_get.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationProfileHCIAssignmentsClient) Get(ctx context.Context, id Co var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/version.go b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/version.go index 8a1a7159b2f..5408660bdcc 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/version.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehciassignments/version.go @@ -1,12 +1,10 @@ package configurationprofilehciassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofilehciassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationprofilehciassignments/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md index a49e03121a3..81b4676a12b 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments` Documentation -The `configurationprofilehcrpassignments` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `configurationprofilehcrpassignments` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go index 0a5d40e481f..9a3b49064a3 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/client.go @@ -15,7 +15,7 @@ type ConfigurationProfileHCRPAssignmentsClient struct { } func NewConfigurationProfileHCRPAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfileHCRPAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofilehcrpassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationprofilehcrpassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationProfileHCRPAssignmentsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go index 967f2fd7f0c..9ca1b3e143a 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/id_providers2configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseProviders2ConfigurationProfileAssignmentID(input string) (*Providers2C } id := Providers2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2ConfigurationProfileAssignmentIDInsensitively(input string) } id := Providers2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go index 0fe8c07735c..e492ad6b272 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate(ctx context.Co var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go index 3a1ed774631..b85e6701186 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationProfileHCRPAssignmentsClient) Get(ctx context.Context, id P var model ConfigurationProfileAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go index 3a70074ba4c..116ade4755d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilehcrpassignments/version.go @@ -1,12 +1,10 @@ package configurationprofilehcrpassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofilehcrpassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationprofilehcrpassignments/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/README.md b/resource-manager/automanage/2022-05-04/configurationprofiles/README.md index 3e16422c48b..84e9508e9f2 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/README.md +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofiles` Documentation -The `configurationprofiles` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `configurationprofiles` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/client.go b/resource-manager/automanage/2022-05-04/configurationprofiles/client.go index 302ca0fe665..54304c90b26 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/client.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/client.go @@ -15,7 +15,7 @@ type ConfigurationProfilesClient struct { } func NewConfigurationProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationProfilesClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/id_configurationprofile.go b/resource-manager/automanage/2022-05-04/configurationprofiles/id_configurationprofile.go index 35a827ad990..790659b740a 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/id_configurationprofile.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/id_configurationprofile.go @@ -42,7 +42,7 @@ func ParseConfigurationProfileID(input string) (*ConfigurationProfileId, error) } id := ConfigurationProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationProfileIDInsensitively(input string) (*ConfigurationProfi } id := ConfigurationProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/method_createorupdate.go b/resource-manager/automanage/2022-05-04/configurationprofiles/method_createorupdate.go index 6d3efd72bdb..0e7fa248c51 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/method_createorupdate.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationProfilesClient) CreateOrUpdate(ctx context.Context, id Conf var model ConfigurationProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/method_get.go b/resource-manager/automanage/2022-05-04/configurationprofiles/method_get.go index 922411dd287..f0a5ec5988b 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/method_get.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationProfilesClient) Get(ctx context.Context, id ConfigurationPr var model ConfigurationProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbyresourcegroup.go b/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbyresourcegroup.go index 3b3cae7d2e8..de9bdb97b03 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbyresourcegroup.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ConfigurationProfilesClient) ListByResourceGroup(ctx context.Context, id var model ConfigurationProfileList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbysubscription.go b/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbysubscription.go index 7d2b10d767c..bd65f66f743 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbysubscription.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ConfigurationProfilesClient) ListBySubscription(ctx context.Context, id var model ConfigurationProfileList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/method_update.go b/resource-manager/automanage/2022-05-04/configurationprofiles/method_update.go index 3370c247a24..0b341cd6f64 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/method_update.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/method_update.go @@ -49,7 +49,6 @@ func (c ConfigurationProfilesClient) Update(ctx context.Context, id Configuratio var model ConfigurationProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofiles/version.go b/resource-manager/automanage/2022-05-04/configurationprofiles/version.go index f930c4dbd52..fabb740d79e 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofiles/version.go +++ b/resource-manager/automanage/2022-05-04/configurationprofiles/version.go @@ -1,12 +1,10 @@ package configurationprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationprofiles/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/README.md b/resource-manager/automanage/2022-05-04/configurationprofilesversions/README.md index 098e4656ebe..b8f789f277d 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/README.md +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/configurationprofilesversions` Documentation -The `configurationprofilesversions` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `configurationprofilesversions` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/client.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/client.go index 58c56a6ccb9..c69aea19df2 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/client.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/client.go @@ -15,7 +15,7 @@ type ConfigurationProfilesVersionsClient struct { } func NewConfigurationProfilesVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationProfilesVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationprofilesversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationprofilesversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationProfilesVersionsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofile.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofile.go index 4cb6718bf21..6ab86091f70 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofile.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofile.go @@ -42,7 +42,7 @@ func ParseConfigurationProfileID(input string) (*ConfigurationProfileId, error) } id := ConfigurationProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConfigurationProfileIDInsensitively(input string) (*ConfigurationProfi } id := ConfigurationProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofileversion.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofileversion.go index 5bb47376537..c963c23f69a 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofileversion.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/id_configurationprofileversion.go @@ -44,7 +44,7 @@ func ParseConfigurationProfileVersionID(input string) (*ConfigurationProfileVers } id := ConfigurationProfileVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationProfileVersionIDInsensitively(input string) (*Configurati } id := ConfigurationProfileVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_createorupdate.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_createorupdate.go index d2282345ea5..a0c50e28e58 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_createorupdate.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationProfilesVersionsClient) CreateOrUpdate(ctx context.Context, var model ConfigurationProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_get.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_get.go index 1d673a0025e..100af23d028 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_get.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationProfilesVersionsClient) Get(ctx context.Context, id Configu var model ConfigurationProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_listchildresources.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_listchildresources.go index 9fa5e6b0aaf..5019d008746 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_listchildresources.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/method_listchildresources.go @@ -46,7 +46,6 @@ func (c ConfigurationProfilesVersionsClient) ListChildResources(ctx context.Cont var model ConfigurationProfileList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/configurationprofilesversions/version.go b/resource-manager/automanage/2022-05-04/configurationprofilesversions/version.go index 2d457464deb..85c98181300 100644 --- a/resource-manager/automanage/2022-05-04/configurationprofilesversions/version.go +++ b/resource-manager/automanage/2022-05-04/configurationprofilesversions/version.go @@ -1,12 +1,10 @@ package configurationprofilesversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationprofilesversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationprofilesversions/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/hcireports/README.md b/resource-manager/automanage/2022-05-04/hcireports/README.md index efe26319262..46e2166859e 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/README.md +++ b/resource-manager/automanage/2022-05-04/hcireports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/hcireports` Documentation -The `hcireports` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `hcireports` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/hcireports/client.go b/resource-manager/automanage/2022-05-04/hcireports/client.go index 9211f154ab2..db81e2bcf6a 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/client.go +++ b/resource-manager/automanage/2022-05-04/hcireports/client.go @@ -15,7 +15,7 @@ type HCIReportsClient struct { } func NewHCIReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*HCIReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hcireports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hcireports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HCIReportsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/hcireports/id_configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/hcireports/id_configurationprofileassignment.go index 45ffc9d46a3..057561cf309 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/id_configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/hcireports/id_configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseConfigurationProfileAssignmentID(input string) (*ConfigurationProfileA } id := ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationProfileAssignmentIDInsensitively(input string) (*Configur } id := ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/hcireports/id_report.go b/resource-manager/automanage/2022-05-04/hcireports/id_report.go index ee0955c2dee..81d6c5c0908 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/id_report.go +++ b/resource-manager/automanage/2022-05-04/hcireports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/hcireports/method_get.go b/resource-manager/automanage/2022-05-04/hcireports/method_get.go index 7ae20dd725e..bb26c9d2a21 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/method_get.go +++ b/resource-manager/automanage/2022-05-04/hcireports/method_get.go @@ -45,7 +45,6 @@ func (c HCIReportsClient) Get(ctx context.Context, id ReportId) (result GetOpera var model Report result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/hcireports/method_listbyconfigurationprofileassignments.go b/resource-manager/automanage/2022-05-04/hcireports/method_listbyconfigurationprofileassignments.go index 223c8facee8..a277ccb4f1c 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/method_listbyconfigurationprofileassignments.go +++ b/resource-manager/automanage/2022-05-04/hcireports/method_listbyconfigurationprofileassignments.go @@ -46,7 +46,6 @@ func (c HCIReportsClient) ListByConfigurationProfileAssignments(ctx context.Cont var model ReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/hcireports/version.go b/resource-manager/automanage/2022-05-04/hcireports/version.go index b09f6cad955..4c5ea9ef614 100644 --- a/resource-manager/automanage/2022-05-04/hcireports/version.go +++ b/resource-manager/automanage/2022-05-04/hcireports/version.go @@ -1,12 +1,10 @@ package hcireports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hcireports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hcireports/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/README.md b/resource-manager/automanage/2022-05-04/hcrpreports/README.md index 2a2f15d3fdc..3b11eac6413 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/README.md +++ b/resource-manager/automanage/2022-05-04/hcrpreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/hcrpreports` Documentation -The `hcrpreports` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `hcrpreports` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/client.go b/resource-manager/automanage/2022-05-04/hcrpreports/client.go index d9c0540243e..c0e54fa9ce2 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/client.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/client.go @@ -15,7 +15,7 @@ type HCRPReportsClient struct { } func NewHCRPReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*HCRPReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hcrpreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hcrpreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HCRPReportsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/id_configurationprofileassignmentreport.go b/resource-manager/automanage/2022-05-04/hcrpreports/id_configurationprofileassignmentreport.go index 4833aadc0ae..768ccd2e9de 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/id_configurationprofileassignmentreport.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/id_configurationprofileassignmentreport.go @@ -46,7 +46,7 @@ func ParseConfigurationProfileAssignmentReportID(input string) (*ConfigurationPr } id := ConfigurationProfileAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigurationProfileAssignmentReportIDInsensitively(input string) (*Co } id := ConfigurationProfileAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/id_providers2configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/hcrpreports/id_providers2configurationprofileassignment.go index 03dd44ca1ac..c3e12c52dc7 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/id_providers2configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/id_providers2configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseProviders2ConfigurationProfileAssignmentID(input string) (*Providers2C } id := Providers2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2ConfigurationProfileAssignmentIDInsensitively(input string) } id := Providers2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/method_get.go b/resource-manager/automanage/2022-05-04/hcrpreports/method_get.go index c3d89e522b8..197f19ee5ee 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/method_get.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/method_get.go @@ -45,7 +45,6 @@ func (c HCRPReportsClient) Get(ctx context.Context, id ConfigurationProfileAssig var model Report result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/method_listbyconfigurationprofileassignments.go b/resource-manager/automanage/2022-05-04/hcrpreports/method_listbyconfigurationprofileassignments.go index 154f2e535fe..cf6d6476da2 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/method_listbyconfigurationprofileassignments.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/method_listbyconfigurationprofileassignments.go @@ -46,7 +46,6 @@ func (c HCRPReportsClient) ListByConfigurationProfileAssignments(ctx context.Con var model ReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/hcrpreports/version.go b/resource-manager/automanage/2022-05-04/hcrpreports/version.go index baeb5c15ce3..fc6b1ce669d 100644 --- a/resource-manager/automanage/2022-05-04/hcrpreports/version.go +++ b/resource-manager/automanage/2022-05-04/hcrpreports/version.go @@ -1,12 +1,10 @@ package hcrpreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hcrpreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hcrpreports/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/reports/README.md b/resource-manager/automanage/2022-05-04/reports/README.md index 6c875c63865..dccbea24263 100644 --- a/resource-manager/automanage/2022-05-04/reports/README.md +++ b/resource-manager/automanage/2022-05-04/reports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/reports` Documentation -The `reports` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `reports` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/reports/client.go b/resource-manager/automanage/2022-05-04/reports/client.go index 7d5bde81365..d5f04232726 100644 --- a/resource-manager/automanage/2022-05-04/reports/client.go +++ b/resource-manager/automanage/2022-05-04/reports/client.go @@ -15,7 +15,7 @@ type ReportsClient struct { } func NewReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReportsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/reports/id_providers2configurationprofileassignmentreport.go b/resource-manager/automanage/2022-05-04/reports/id_providers2configurationprofileassignmentreport.go index 6010a91f67d..61911139159 100644 --- a/resource-manager/automanage/2022-05-04/reports/id_providers2configurationprofileassignmentreport.go +++ b/resource-manager/automanage/2022-05-04/reports/id_providers2configurationprofileassignmentreport.go @@ -46,7 +46,7 @@ func ParseProviders2ConfigurationProfileAssignmentReportID(input string) (*Provi } id := Providers2ConfigurationProfileAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviders2ConfigurationProfileAssignmentReportIDInsensitively(input st } id := Providers2ConfigurationProfileAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/reports/id_virtualmachineproviders2configurationprofileassignment.go b/resource-manager/automanage/2022-05-04/reports/id_virtualmachineproviders2configurationprofileassignment.go index 34f3f8f6e7b..845c1139bd4 100644 --- a/resource-manager/automanage/2022-05-04/reports/id_virtualmachineproviders2configurationprofileassignment.go +++ b/resource-manager/automanage/2022-05-04/reports/id_virtualmachineproviders2configurationprofileassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2ConfigurationProfileAssignmentID(input string) } id := VirtualMachineProviders2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2ConfigurationProfileAssignmentIDInsensitively( } id := VirtualMachineProviders2ConfigurationProfileAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automanage/2022-05-04/reports/method_get.go b/resource-manager/automanage/2022-05-04/reports/method_get.go index c8c9c6974e3..b938a60af9f 100644 --- a/resource-manager/automanage/2022-05-04/reports/method_get.go +++ b/resource-manager/automanage/2022-05-04/reports/method_get.go @@ -45,7 +45,6 @@ func (c ReportsClient) Get(ctx context.Context, id Providers2ConfigurationProfil var model Report result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/reports/method_listbyconfigurationprofileassignments.go b/resource-manager/automanage/2022-05-04/reports/method_listbyconfigurationprofileassignments.go index ef7758b24a8..e9125fc7d7f 100644 --- a/resource-manager/automanage/2022-05-04/reports/method_listbyconfigurationprofileassignments.go +++ b/resource-manager/automanage/2022-05-04/reports/method_listbyconfigurationprofileassignments.go @@ -46,7 +46,6 @@ func (c ReportsClient) ListByConfigurationProfileAssignments(ctx context.Context var model ReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/reports/version.go b/resource-manager/automanage/2022-05-04/reports/version.go index 2840310a3ff..ec531b50797 100644 --- a/resource-manager/automanage/2022-05-04/reports/version.go +++ b/resource-manager/automanage/2022-05-04/reports/version.go @@ -1,12 +1,10 @@ package reports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reports/2022-05-04" } diff --git a/resource-manager/automanage/2022-05-04/serviceprincipals/README.md b/resource-manager/automanage/2022-05-04/serviceprincipals/README.md index 723f7984482..8ee2f8a55a6 100644 --- a/resource-manager/automanage/2022-05-04/serviceprincipals/README.md +++ b/resource-manager/automanage/2022-05-04/serviceprincipals/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automanage/2022-05-04/serviceprincipals` Documentation -The `serviceprincipals` SDK allows for interaction with the Azure Resource Manager Service `automanage` (API Version `2022-05-04`). +The `serviceprincipals` SDK allows for interaction with Azure Resource Manager `automanage` (API Version `2022-05-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automanage/2022-05-04/serviceprincipals/client.go b/resource-manager/automanage/2022-05-04/serviceprincipals/client.go index af89a45cf19..4a49335d3bf 100644 --- a/resource-manager/automanage/2022-05-04/serviceprincipals/client.go +++ b/resource-manager/automanage/2022-05-04/serviceprincipals/client.go @@ -15,7 +15,7 @@ type ServicePrincipalsClient struct { } func NewServicePrincipalsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicePrincipalsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceprincipals", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceprincipals", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicePrincipalsClient: %+v", err) } diff --git a/resource-manager/automanage/2022-05-04/serviceprincipals/method_get.go b/resource-manager/automanage/2022-05-04/serviceprincipals/method_get.go index 0a330efade5..0f65ccbd7fb 100644 --- a/resource-manager/automanage/2022-05-04/serviceprincipals/method_get.go +++ b/resource-manager/automanage/2022-05-04/serviceprincipals/method_get.go @@ -47,7 +47,6 @@ func (c ServicePrincipalsClient) Get(ctx context.Context, id commonids.Subscript var model ServicePrincipal result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/serviceprincipals/method_listbysubscription.go b/resource-manager/automanage/2022-05-04/serviceprincipals/method_listbysubscription.go index d5ea353c451..e2e92b89f6e 100644 --- a/resource-manager/automanage/2022-05-04/serviceprincipals/method_listbysubscription.go +++ b/resource-manager/automanage/2022-05-04/serviceprincipals/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ServicePrincipalsClient) ListBySubscription(ctx context.Context, id comm var model ServicePrincipalListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automanage/2022-05-04/serviceprincipals/version.go b/resource-manager/automanage/2022-05-04/serviceprincipals/version.go index a31192e0318..71800279b44 100644 --- a/resource-manager/automanage/2022-05-04/serviceprincipals/version.go +++ b/resource-manager/automanage/2022-05-04/serviceprincipals/version.go @@ -1,12 +1,10 @@ package serviceprincipals -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceprincipals/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceprincipals/2022-05-04" } diff --git a/resource-manager/automation/2015-10-31/activity/README.md b/resource-manager/automation/2015-10-31/activity/README.md index 2da6434bdad..fd4e80254d4 100644 --- a/resource-manager/automation/2015-10-31/activity/README.md +++ b/resource-manager/automation/2015-10-31/activity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/activity` Documentation -The `activity` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `activity` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/activity/client.go b/resource-manager/automation/2015-10-31/activity/client.go index 0142d55ea1f..7e366361ec1 100644 --- a/resource-manager/automation/2015-10-31/activity/client.go +++ b/resource-manager/automation/2015-10-31/activity/client.go @@ -15,7 +15,7 @@ type ActivityClient struct { } func NewActivityClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/activity/id_activity.go b/resource-manager/automation/2015-10-31/activity/id_activity.go index 87b1df1f763..545b302d28e 100644 --- a/resource-manager/automation/2015-10-31/activity/id_activity.go +++ b/resource-manager/automation/2015-10-31/activity/id_activity.go @@ -46,7 +46,7 @@ func ParseActivityID(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/activity/id_module.go b/resource-manager/automation/2015-10-31/activity/id_module.go index 2c22f0316ae..48065b72334 100644 --- a/resource-manager/automation/2015-10-31/activity/id_module.go +++ b/resource-manager/automation/2015-10-31/activity/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/activity/method_get.go b/resource-manager/automation/2015-10-31/activity/method_get.go index d91dc4e2e43..c212d18aab0 100644 --- a/resource-manager/automation/2015-10-31/activity/method_get.go +++ b/resource-manager/automation/2015-10-31/activity/method_get.go @@ -45,7 +45,6 @@ func (c ActivityClient) Get(ctx context.Context, id ActivityId) (result GetOpera var model Activity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/activity/version.go b/resource-manager/automation/2015-10-31/activity/version.go index 047537fd315..7434c3b91b1 100644 --- a/resource-manager/automation/2015-10-31/activity/version.go +++ b/resource-manager/automation/2015-10-31/activity/version.go @@ -1,12 +1,10 @@ package activity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activity/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/README.md b/resource-manager/automation/2015-10-31/agentregistrationinformation/README.md index fbe24ea7a22..e60bb066e2a 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/README.md +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/agentregistrationinformation` Documentation -The `agentregistrationinformation` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `agentregistrationinformation` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/client.go b/resource-manager/automation/2015-10-31/agentregistrationinformation/client.go index c13906095ef..a90dc569c80 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/client.go +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/client.go @@ -15,7 +15,7 @@ type AgentRegistrationInformationClient struct { } func NewAgentRegistrationInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentRegistrationInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentregistrationinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentregistrationinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentRegistrationInformationClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/id_automationaccount.go b/resource-manager/automation/2015-10-31/agentregistrationinformation/id_automationaccount.go index 5ec36ff3845..3532f9712de 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/method_get.go b/resource-manager/automation/2015-10-31/agentregistrationinformation/method_get.go index 95539ac551e..d385b7e7d61 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/method_get.go +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/method_get.go @@ -46,7 +46,6 @@ func (c AgentRegistrationInformationClient) Get(ctx context.Context, id Automati var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/method_regeneratekey.go b/resource-manager/automation/2015-10-31/agentregistrationinformation/method_regeneratekey.go index 261eb28919f..4f4e5f62875 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/method_regeneratekey.go +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, i var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/agentregistrationinformation/version.go b/resource-manager/automation/2015-10-31/agentregistrationinformation/version.go index eef000fe0a6..c1fbd7404dc 100644 --- a/resource-manager/automation/2015-10-31/agentregistrationinformation/version.go +++ b/resource-manager/automation/2015-10-31/agentregistrationinformation/version.go @@ -1,12 +1,10 @@ package agentregistrationinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentregistrationinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentregistrationinformation/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/automationaccount/README.md b/resource-manager/automation/2015-10-31/automationaccount/README.md index 2548e707935..22d19f098c8 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/README.md +++ b/resource-manager/automation/2015-10-31/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/automationaccount/client.go b/resource-manager/automation/2015-10-31/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/client.go +++ b/resource-manager/automation/2015-10-31/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/automationaccount/id_automationaccount.go b/resource-manager/automation/2015-10-31/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/automationaccount/method_createorupdate.go b/resource-manager/automation/2015-10-31/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/automationaccount/method_get.go b/resource-manager/automation/2015-10-31/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/method_get.go +++ b/resource-manager/automation/2015-10-31/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/automationaccount/method_update.go b/resource-manager/automation/2015-10-31/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/method_update.go +++ b/resource-manager/automation/2015-10-31/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/automationaccount/version.go b/resource-manager/automation/2015-10-31/automationaccount/version.go index b2ec22551a8..a5b24468086 100644 --- a/resource-manager/automation/2015-10-31/automationaccount/version.go +++ b/resource-manager/automation/2015-10-31/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/certificate/README.md b/resource-manager/automation/2015-10-31/certificate/README.md index e2f8749d7c7..597f3261950 100644 --- a/resource-manager/automation/2015-10-31/certificate/README.md +++ b/resource-manager/automation/2015-10-31/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `certificate` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/certificate/client.go b/resource-manager/automation/2015-10-31/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/automation/2015-10-31/certificate/client.go +++ b/resource-manager/automation/2015-10-31/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/certificate/id_automationaccount.go b/resource-manager/automation/2015-10-31/certificate/id_automationaccount.go index 29c8860dc29..e5efa36aa52 100644 --- a/resource-manager/automation/2015-10-31/certificate/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/certificate/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/certificate/id_certificate.go b/resource-manager/automation/2015-10-31/certificate/id_certificate.go index 6ab72756d10..7d31e9ea831 100644 --- a/resource-manager/automation/2015-10-31/certificate/id_certificate.go +++ b/resource-manager/automation/2015-10-31/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/certificate/method_createorupdate.go b/resource-manager/automation/2015-10-31/certificate/method_createorupdate.go index 0b944c57e50..1e5de85afb2 100644 --- a/resource-manager/automation/2015-10-31/certificate/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/certificate/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/certificate/method_get.go b/resource-manager/automation/2015-10-31/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/automation/2015-10-31/certificate/method_get.go +++ b/resource-manager/automation/2015-10-31/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/certificate/method_update.go b/resource-manager/automation/2015-10-31/certificate/method_update.go index 6fbe2d4a340..b4c51d673ad 100644 --- a/resource-manager/automation/2015-10-31/certificate/method_update.go +++ b/resource-manager/automation/2015-10-31/certificate/method_update.go @@ -49,7 +49,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/certificate/version.go b/resource-manager/automation/2015-10-31/certificate/version.go index 5c00097253c..48d6c25e938 100644 --- a/resource-manager/automation/2015-10-31/certificate/version.go +++ b/resource-manager/automation/2015-10-31/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/connection/README.md b/resource-manager/automation/2015-10-31/connection/README.md index 885a3bba1d3..a1e46748273 100644 --- a/resource-manager/automation/2015-10-31/connection/README.md +++ b/resource-manager/automation/2015-10-31/connection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/connection` Documentation -The `connection` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `connection` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/connection/client.go b/resource-manager/automation/2015-10-31/connection/client.go index 3f066e2e653..0c3f5a2848b 100644 --- a/resource-manager/automation/2015-10-31/connection/client.go +++ b/resource-manager/automation/2015-10-31/connection/client.go @@ -15,7 +15,7 @@ type ConnectionClient struct { } func NewConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/connection/id_automationaccount.go b/resource-manager/automation/2015-10-31/connection/id_automationaccount.go index ec1aaa6092f..304d6566f3f 100644 --- a/resource-manager/automation/2015-10-31/connection/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/connection/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/connection/id_connection.go b/resource-manager/automation/2015-10-31/connection/id_connection.go index 6ec1093cd2b..0e6c2604874 100644 --- a/resource-manager/automation/2015-10-31/connection/id_connection.go +++ b/resource-manager/automation/2015-10-31/connection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/connection/method_createorupdate.go b/resource-manager/automation/2015-10-31/connection/method_createorupdate.go index b1f0dd9e309..b6f6f47e462 100644 --- a/resource-manager/automation/2015-10-31/connection/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/connection/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionClient) CreateOrUpdate(ctx context.Context, id ConnectionId, i var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connection/method_delete.go b/resource-manager/automation/2015-10-31/connection/method_delete.go index 87109751c6f..828dc488b19 100644 --- a/resource-manager/automation/2015-10-31/connection/method_delete.go +++ b/resource-manager/automation/2015-10-31/connection/method_delete.go @@ -46,7 +46,6 @@ func (c ConnectionClient) Delete(ctx context.Context, id ConnectionId) (result D var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connection/method_get.go b/resource-manager/automation/2015-10-31/connection/method_get.go index 16d9f30e8c8..602490999ff 100644 --- a/resource-manager/automation/2015-10-31/connection/method_get.go +++ b/resource-manager/automation/2015-10-31/connection/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionClient) Get(ctx context.Context, id ConnectionId) (result GetO var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connection/method_update.go b/resource-manager/automation/2015-10-31/connection/method_update.go index 1c57761fbc1..11dff660df6 100644 --- a/resource-manager/automation/2015-10-31/connection/method_update.go +++ b/resource-manager/automation/2015-10-31/connection/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionClient) Update(ctx context.Context, id ConnectionId, input Con var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connection/version.go b/resource-manager/automation/2015-10-31/connection/version.go index 8b353db4574..414052c9ada 100644 --- a/resource-manager/automation/2015-10-31/connection/version.go +++ b/resource-manager/automation/2015-10-31/connection/version.go @@ -1,12 +1,10 @@ package connection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connection/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/connectiontype/README.md b/resource-manager/automation/2015-10-31/connectiontype/README.md index c919ab09057..c64b79f0e2f 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/README.md +++ b/resource-manager/automation/2015-10-31/connectiontype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/connectiontype` Documentation -The `connectiontype` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `connectiontype` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/connectiontype/client.go b/resource-manager/automation/2015-10-31/connectiontype/client.go index c5cc541fae3..bd83ae0611a 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/client.go +++ b/resource-manager/automation/2015-10-31/connectiontype/client.go @@ -15,7 +15,7 @@ type ConnectionTypeClient struct { } func NewConnectionTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiontype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiontype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionTypeClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/connectiontype/id_automationaccount.go b/resource-manager/automation/2015-10-31/connectiontype/id_automationaccount.go index 3f9b9b3fc08..90cd0ad2006 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/connectiontype/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/connectiontype/id_connectiontype.go b/resource-manager/automation/2015-10-31/connectiontype/id_connectiontype.go index 6fb2d1c07b2..3945becf946 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/id_connectiontype.go +++ b/resource-manager/automation/2015-10-31/connectiontype/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/connectiontype/method_createorupdate.go b/resource-manager/automation/2015-10-31/connectiontype/method_createorupdate.go index 9733a9a7c13..b5482180669 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/connectiontype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectionTypeClient) CreateOrUpdate(ctx context.Context, id ConnectionT var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connectiontype/method_get.go b/resource-manager/automation/2015-10-31/connectiontype/method_get.go index 54be67f6226..f4bc697608c 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/method_get.go +++ b/resource-manager/automation/2015-10-31/connectiontype/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionTypeClient) Get(ctx context.Context, id ConnectionTypeId) (res var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/connectiontype/version.go b/resource-manager/automation/2015-10-31/connectiontype/version.go index dc3aebdf965..b1567068cf9 100644 --- a/resource-manager/automation/2015-10-31/connectiontype/version.go +++ b/resource-manager/automation/2015-10-31/connectiontype/version.go @@ -1,12 +1,10 @@ package connectiontype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiontype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiontype/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/credential/README.md b/resource-manager/automation/2015-10-31/credential/README.md index 622a2302019..ba7a62e52ae 100644 --- a/resource-manager/automation/2015-10-31/credential/README.md +++ b/resource-manager/automation/2015-10-31/credential/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/credential` Documentation -The `credential` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `credential` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/credential/client.go b/resource-manager/automation/2015-10-31/credential/client.go index 2e36e15446b..52f1e66c317 100644 --- a/resource-manager/automation/2015-10-31/credential/client.go +++ b/resource-manager/automation/2015-10-31/credential/client.go @@ -15,7 +15,7 @@ type CredentialClient struct { } func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credential", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credential", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/credential/id_automationaccount.go b/resource-manager/automation/2015-10-31/credential/id_automationaccount.go index 173accecf18..d363cf9c0b2 100644 --- a/resource-manager/automation/2015-10-31/credential/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/credential/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/credential/id_credential.go b/resource-manager/automation/2015-10-31/credential/id_credential.go index 7e4319efe94..6b4b028d5fd 100644 --- a/resource-manager/automation/2015-10-31/credential/id_credential.go +++ b/resource-manager/automation/2015-10-31/credential/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/credential/method_createorupdate.go b/resource-manager/automation/2015-10-31/credential/method_createorupdate.go index 046ed79f991..2c5f73f9dfe 100644 --- a/resource-manager/automation/2015-10-31/credential/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/credential/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CredentialClient) CreateOrUpdate(ctx context.Context, id CredentialId, i var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/credential/method_get.go b/resource-manager/automation/2015-10-31/credential/method_get.go index f9008350a37..225e47cfe42 100644 --- a/resource-manager/automation/2015-10-31/credential/method_get.go +++ b/resource-manager/automation/2015-10-31/credential/method_get.go @@ -45,7 +45,6 @@ func (c CredentialClient) Get(ctx context.Context, id CredentialId) (result GetO var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/credential/method_update.go b/resource-manager/automation/2015-10-31/credential/method_update.go index bb2022825d5..da04941cd11 100644 --- a/resource-manager/automation/2015-10-31/credential/method_update.go +++ b/resource-manager/automation/2015-10-31/credential/method_update.go @@ -49,7 +49,6 @@ func (c CredentialClient) Update(ctx context.Context, id CredentialId, input Cre var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/credential/version.go b/resource-manager/automation/2015-10-31/credential/version.go index 25cad349d1d..9aaa8dd3b52 100644 --- a/resource-manager/automation/2015-10-31/credential/version.go +++ b/resource-manager/automation/2015-10-31/credential/version.go @@ -1,12 +1,10 @@ package credential -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credential/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credential/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/README.md b/resource-manager/automation/2015-10-31/dsccompilationjob/README.md index 7bc35047074..c2adf362397 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/README.md +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/dsccompilationjob` Documentation -The `dsccompilationjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `dsccompilationjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/client.go b/resource-manager/automation/2015-10-31/dsccompilationjob/client.go index aa29e7e1f2c..b1d76b50f8d 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/client.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/client.go @@ -15,7 +15,7 @@ type DscCompilationJobClient struct { } func NewDscCompilationJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DscCompilationJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dsccompilationjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dsccompilationjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscCompilationJobClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/id_automationaccount.go b/resource-manager/automation/2015-10-31/dsccompilationjob/id_automationaccount.go index b80e8f1f79d..178c3a7eb93 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/id_compilationjobstream.go b/resource-manager/automation/2015-10-31/dsccompilationjob/id_compilationjobstream.go index c86af568b39..805fd3b0036 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/id_compilationjobstream.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/id_compilationjobstream.go @@ -46,7 +46,7 @@ func ParseCompilationJobStreamID(input string) (*CompilationJobStreamId, error) } id := CompilationJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCompilationJobStreamIDInsensitively(input string) (*CompilationJobStre } id := CompilationJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/method_create.go b/resource-manager/automation/2015-10-31/dsccompilationjob/method_create.go index e754eeea652..aad943dd5ec 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/method_create.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/method_create.go @@ -50,7 +50,6 @@ func (c DscCompilationJobClient) Create(ctx context.Context, id commonids.Automa var model DscCompilationJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/method_get.go b/resource-manager/automation/2015-10-31/dsccompilationjob/method_get.go index 4562f128bf8..dc7a415772e 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/method_get.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/method_get.go @@ -46,7 +46,6 @@ func (c DscCompilationJobClient) Get(ctx context.Context, id commonids.Automatio var model DscCompilationJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/method_getstream.go b/resource-manager/automation/2015-10-31/dsccompilationjob/method_getstream.go index fd6661871d3..744144f533c 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/method_getstream.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/method_getstream.go @@ -45,7 +45,6 @@ func (c DscCompilationJobClient) GetStream(ctx context.Context, id CompilationJo var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/dsccompilationjob/method_listbyautomationaccount.go index 5ea430161ee..5fdbfb376ea 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/dsccompilationjob/version.go b/resource-manager/automation/2015-10-31/dsccompilationjob/version.go index 157ebe6d581..1cf77717cd2 100644 --- a/resource-manager/automation/2015-10-31/dsccompilationjob/version.go +++ b/resource-manager/automation/2015-10-31/dsccompilationjob/version.go @@ -1,12 +1,10 @@ package dsccompilationjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dsccompilationjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dsccompilationjob/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/README.md b/resource-manager/automation/2015-10-31/dscconfiguration/README.md index 836e34095ba..cfaba20d34f 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/README.md +++ b/resource-manager/automation/2015-10-31/dscconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/dscconfiguration` Documentation -The `dscconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `dscconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/client.go b/resource-manager/automation/2015-10-31/dscconfiguration/client.go index 33d7d66ff2e..b0bf9421d65 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/client.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/client.go @@ -15,7 +15,7 @@ type DscConfigurationClient struct { } func NewDscConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/id_automationaccount.go b/resource-manager/automation/2015-10-31/dscconfiguration/id_automationaccount.go index a9b7ac7041d..8a7a211ee52 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/id_configuration.go b/resource-manager/automation/2015-10-31/dscconfiguration/id_configuration.go index 0cb80dea3e2..b77ddf9f20a 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/id_configuration.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/method_createorupdate.go b/resource-manager/automation/2015-10-31/dscconfiguration/method_createorupdate.go index 5096a6df27c..9fcc3d6a75b 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DscConfigurationClient) CreateOrUpdate(ctx context.Context, id Configura var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/method_get.go b/resource-manager/automation/2015-10-31/dscconfiguration/method_get.go index 0ec24024e26..e53beeed617 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/method_get.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscConfigurationClient) Get(ctx context.Context, id ConfigurationId) (re var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/method_getcontent.go b/resource-manager/automation/2015-10-31/dscconfiguration/method_getcontent.go index 34c430ed62f..74269aa1a64 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/method_getcontent.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/method_getcontent.go @@ -46,7 +46,6 @@ func (c DscConfigurationClient) GetContent(ctx context.Context, id Configuration var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/dscconfiguration/method_listbyautomationaccount.go index 8a4b09db266..19cb7180e57 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/method_update.go b/resource-manager/automation/2015-10-31/dscconfiguration/method_update.go index 89ed13be39f..c842ef5f4b3 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/method_update.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/method_update.go @@ -49,7 +49,6 @@ func (c DscConfigurationClient) Update(ctx context.Context, id ConfigurationId, var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscconfiguration/version.go b/resource-manager/automation/2015-10-31/dscconfiguration/version.go index bd1f22170a6..8ca4f8be0c6 100644 --- a/resource-manager/automation/2015-10-31/dscconfiguration/version.go +++ b/resource-manager/automation/2015-10-31/dscconfiguration/version.go @@ -1,12 +1,10 @@ package dscconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscconfiguration/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/dscnode/README.md b/resource-manager/automation/2015-10-31/dscnode/README.md index 8a76087deee..b721dae9288 100644 --- a/resource-manager/automation/2015-10-31/dscnode/README.md +++ b/resource-manager/automation/2015-10-31/dscnode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/dscnode` Documentation -The `dscnode` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `dscnode` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/dscnode/client.go b/resource-manager/automation/2015-10-31/dscnode/client.go index e7b2638a025..a680965c12d 100644 --- a/resource-manager/automation/2015-10-31/dscnode/client.go +++ b/resource-manager/automation/2015-10-31/dscnode/client.go @@ -15,7 +15,7 @@ type DscNodeClient struct { } func NewDscNodeClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/dscnode/id_automationaccount.go b/resource-manager/automation/2015-10-31/dscnode/id_automationaccount.go index 7d470e8c389..2688083e51f 100644 --- a/resource-manager/automation/2015-10-31/dscnode/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/dscnode/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscnode/id_node.go b/resource-manager/automation/2015-10-31/dscnode/id_node.go index d999c8c6067..b9b36665141 100644 --- a/resource-manager/automation/2015-10-31/dscnode/id_node.go +++ b/resource-manager/automation/2015-10-31/dscnode/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscnode/method_delete.go b/resource-manager/automation/2015-10-31/dscnode/method_delete.go index 1d60f5134cb..53eee6826f7 100644 --- a/resource-manager/automation/2015-10-31/dscnode/method_delete.go +++ b/resource-manager/automation/2015-10-31/dscnode/method_delete.go @@ -45,7 +45,6 @@ func (c DscNodeClient) Delete(ctx context.Context, id NodeId) (result DeleteOper var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscnode/method_get.go b/resource-manager/automation/2015-10-31/dscnode/method_get.go index 6173eb3ebb3..9ba3ab23a79 100644 --- a/resource-manager/automation/2015-10-31/dscnode/method_get.go +++ b/resource-manager/automation/2015-10-31/dscnode/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeClient) Get(ctx context.Context, id NodeId) (result GetOperationR var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscnode/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/dscnode/method_listbyautomationaccount.go index 191a6ba2fd0..97fe83c7e61 100644 --- a/resource-manager/automation/2015-10-31/dscnode/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/dscnode/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/dscnode/method_update.go b/resource-manager/automation/2015-10-31/dscnode/method_update.go index 62c2c0e286c..44011e51c99 100644 --- a/resource-manager/automation/2015-10-31/dscnode/method_update.go +++ b/resource-manager/automation/2015-10-31/dscnode/method_update.go @@ -49,7 +49,6 @@ func (c DscNodeClient) Update(ctx context.Context, id NodeId, input DscNodeUpdat var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscnode/version.go b/resource-manager/automation/2015-10-31/dscnode/version.go index 31d285d67e0..7bccf50eebf 100644 --- a/resource-manager/automation/2015-10-31/dscnode/version.go +++ b/resource-manager/automation/2015-10-31/dscnode/version.go @@ -1,12 +1,10 @@ package dscnode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnode/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/README.md b/resource-manager/automation/2015-10-31/dscnodeconfiguration/README.md index 2b0509d903b..6575dfb4c97 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/README.md +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/dscnodeconfiguration` Documentation -The `dscnodeconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `dscnodeconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/client.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/client.go index 60e2159464d..d9d09f3a59d 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/client.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/client.go @@ -15,7 +15,7 @@ type DscNodeConfigurationClient struct { } func NewDscNodeConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_automationaccount.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_automationaccount.go index 2857bb759ef..5320db63946 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_nodeconfiguration.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_nodeconfiguration.go index 55f9ef787e5..a79bf5fcc78 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_nodeconfiguration.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_createorupdate.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_createorupdate.go index 21ff3cdedb6..608c0d26b07 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, id NodeC var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_get.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_get.go index 3971e32ad95..09e5cef4f75 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_get.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeConfigurationClient) Get(ctx context.Context, id NodeConfiguratio var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_listbyautomationaccount.go index 268f5899d65..67afb773101 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/dscnodeconfiguration/version.go b/resource-manager/automation/2015-10-31/dscnodeconfiguration/version.go index 3ff1f499d97..e667269b7a5 100644 --- a/resource-manager/automation/2015-10-31/dscnodeconfiguration/version.go +++ b/resource-manager/automation/2015-10-31/dscnodeconfiguration/version.go @@ -1,12 +1,10 @@ package dscnodeconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnodeconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnodeconfiguration/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/README.md b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/README.md index eae6a2e8eb3..1f3ea7e297d 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/client.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_update.go index d0b185d9792..d2ae1c1cd4e 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/version.go b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/version.go index a3273ea1dd9..7ffa2a223a8 100644 --- a/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2015-10-31/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/job/README.md b/resource-manager/automation/2015-10-31/job/README.md index 10fe24bddac..0b4c14b3d2c 100644 --- a/resource-manager/automation/2015-10-31/job/README.md +++ b/resource-manager/automation/2015-10-31/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `job` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/job/client.go b/resource-manager/automation/2015-10-31/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/automation/2015-10-31/job/client.go +++ b/resource-manager/automation/2015-10-31/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/job/id_automationaccount.go b/resource-manager/automation/2015-10-31/job/id_automationaccount.go index a03de714fcf..03473fb15a7 100644 --- a/resource-manager/automation/2015-10-31/job/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/job/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/job/id_job.go b/resource-manager/automation/2015-10-31/job/id_job.go index 7fd6059e6e7..672fdd7e1d6 100644 --- a/resource-manager/automation/2015-10-31/job/id_job.go +++ b/resource-manager/automation/2015-10-31/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/job/method_create.go b/resource-manager/automation/2015-10-31/job/method_create.go index e6fd19a7558..6573886c7a5 100644 --- a/resource-manager/automation/2015-10-31/job/method_create.go +++ b/resource-manager/automation/2015-10-31/job/method_create.go @@ -49,7 +49,6 @@ func (c JobClient) Create(ctx context.Context, id JobId, input JobCreateParamete var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/job/method_get.go b/resource-manager/automation/2015-10-31/job/method_get.go index 17528fab123..812b4ec0b60 100644 --- a/resource-manager/automation/2015-10-31/job/method_get.go +++ b/resource-manager/automation/2015-10-31/job/method_get.go @@ -45,7 +45,6 @@ func (c JobClient) Get(ctx context.Context, id JobId) (result GetOperationRespon var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/job/method_getoutput.go b/resource-manager/automation/2015-10-31/job/method_getoutput.go index 096bdd1ffac..84f1ebf6509 100644 --- a/resource-manager/automation/2015-10-31/job/method_getoutput.go +++ b/resource-manager/automation/2015-10-31/job/method_getoutput.go @@ -46,7 +46,6 @@ func (c JobClient) GetOutput(ctx context.Context, id JobId) (result GetOutputOpe var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/job/method_getrunbookcontent.go b/resource-manager/automation/2015-10-31/job/method_getrunbookcontent.go index 051a09b9a46..0e3d3b33809 100644 --- a/resource-manager/automation/2015-10-31/job/method_getrunbookcontent.go +++ b/resource-manager/automation/2015-10-31/job/method_getrunbookcontent.go @@ -46,7 +46,6 @@ func (c JobClient) GetRunbookContent(ctx context.Context, id JobId) (result GetR var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/job/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/job/method_listbyautomationaccount.go index 5612b0e2c85..04e97330a4d 100644 --- a/resource-manager/automation/2015-10-31/job/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/job/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/job/version.go b/resource-manager/automation/2015-10-31/job/version.go index cc14ee8548a..2482dfd496a 100644 --- a/resource-manager/automation/2015-10-31/job/version.go +++ b/resource-manager/automation/2015-10-31/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/jobschedule/README.md b/resource-manager/automation/2015-10-31/jobschedule/README.md index 37637e3111e..9b597fc6b96 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/README.md +++ b/resource-manager/automation/2015-10-31/jobschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/jobschedule` Documentation -The `jobschedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `jobschedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/jobschedule/client.go b/resource-manager/automation/2015-10-31/jobschedule/client.go index 4c9fb976839..18a0e89bd37 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/client.go +++ b/resource-manager/automation/2015-10-31/jobschedule/client.go @@ -15,7 +15,7 @@ type JobScheduleClient struct { } func NewJobScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*JobScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/jobschedule/id_automationaccount.go b/resource-manager/automation/2015-10-31/jobschedule/id_automationaccount.go index 330e6504743..e21e84913de 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/jobschedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/jobschedule/id_jobschedule.go b/resource-manager/automation/2015-10-31/jobschedule/id_jobschedule.go index 9276d099eb3..896164a6098 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/id_jobschedule.go +++ b/resource-manager/automation/2015-10-31/jobschedule/id_jobschedule.go @@ -44,7 +44,7 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/jobschedule/method_create.go b/resource-manager/automation/2015-10-31/jobschedule/method_create.go index 03831935824..676325e8c02 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/method_create.go +++ b/resource-manager/automation/2015-10-31/jobschedule/method_create.go @@ -49,7 +49,6 @@ func (c JobScheduleClient) Create(ctx context.Context, id JobScheduleId, input J var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/jobschedule/method_get.go b/resource-manager/automation/2015-10-31/jobschedule/method_get.go index 0721b83e4be..913490c8175 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/method_get.go +++ b/resource-manager/automation/2015-10-31/jobschedule/method_get.go @@ -45,7 +45,6 @@ func (c JobScheduleClient) Get(ctx context.Context, id JobScheduleId) (result Ge var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/jobschedule/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/jobschedule/method_listbyautomationaccount.go index 6b5c6412a83..74ee8cd52b4 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/jobschedule/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/jobschedule/version.go b/resource-manager/automation/2015-10-31/jobschedule/version.go index 8d31266ee8e..6b690de5dbe 100644 --- a/resource-manager/automation/2015-10-31/jobschedule/version.go +++ b/resource-manager/automation/2015-10-31/jobschedule/version.go @@ -1,12 +1,10 @@ package jobschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobschedule/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/jobstream/README.md b/resource-manager/automation/2015-10-31/jobstream/README.md index d61bae6c01d..b7340210ffc 100644 --- a/resource-manager/automation/2015-10-31/jobstream/README.md +++ b/resource-manager/automation/2015-10-31/jobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/jobstream` Documentation -The `jobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `jobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/jobstream/client.go b/resource-manager/automation/2015-10-31/jobstream/client.go index 880cfb48113..8711950a051 100644 --- a/resource-manager/automation/2015-10-31/jobstream/client.go +++ b/resource-manager/automation/2015-10-31/jobstream/client.go @@ -15,7 +15,7 @@ type JobStreamClient struct { } func NewJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/jobstream/id_job.go b/resource-manager/automation/2015-10-31/jobstream/id_job.go index 38f48f8fd48..f35140410f1 100644 --- a/resource-manager/automation/2015-10-31/jobstream/id_job.go +++ b/resource-manager/automation/2015-10-31/jobstream/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/jobstream/id_stream.go b/resource-manager/automation/2015-10-31/jobstream/id_stream.go index c5f3ceb022c..4288f4082a2 100644 --- a/resource-manager/automation/2015-10-31/jobstream/id_stream.go +++ b/resource-manager/automation/2015-10-31/jobstream/id_stream.go @@ -46,7 +46,7 @@ func ParseStreamID(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/jobstream/method_get.go b/resource-manager/automation/2015-10-31/jobstream/method_get.go index 39f36696346..c70ca45e975 100644 --- a/resource-manager/automation/2015-10-31/jobstream/method_get.go +++ b/resource-manager/automation/2015-10-31/jobstream/method_get.go @@ -45,7 +45,6 @@ func (c JobStreamClient) Get(ctx context.Context, id StreamId) (result GetOperat var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/jobstream/method_listbyjob.go b/resource-manager/automation/2015-10-31/jobstream/method_listbyjob.go index 12cea4f7ea8..6ba8ca1612d 100644 --- a/resource-manager/automation/2015-10-31/jobstream/method_listbyjob.go +++ b/resource-manager/automation/2015-10-31/jobstream/method_listbyjob.go @@ -39,6 +39,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/jobstream/version.go b/resource-manager/automation/2015-10-31/jobstream/version.go index 7833ad04062..0831e7b1ae9 100644 --- a/resource-manager/automation/2015-10-31/jobstream/version.go +++ b/resource-manager/automation/2015-10-31/jobstream/version.go @@ -1,12 +1,10 @@ package jobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstream/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/linkedworkspace/README.md b/resource-manager/automation/2015-10-31/linkedworkspace/README.md index 2c1a6e34904..1c8212608e6 100644 --- a/resource-manager/automation/2015-10-31/linkedworkspace/README.md +++ b/resource-manager/automation/2015-10-31/linkedworkspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/linkedworkspace` Documentation -The `linkedworkspace` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `linkedworkspace` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/linkedworkspace/client.go b/resource-manager/automation/2015-10-31/linkedworkspace/client.go index 265eab06051..ce26bf57e1c 100644 --- a/resource-manager/automation/2015-10-31/linkedworkspace/client.go +++ b/resource-manager/automation/2015-10-31/linkedworkspace/client.go @@ -15,7 +15,7 @@ type LinkedWorkspaceClient struct { } func NewLinkedWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedWorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedworkspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedworkspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedWorkspaceClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/linkedworkspace/id_automationaccount.go b/resource-manager/automation/2015-10-31/linkedworkspace/id_automationaccount.go index 33e45a35f32..897343bb6cd 100644 --- a/resource-manager/automation/2015-10-31/linkedworkspace/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/linkedworkspace/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/linkedworkspace/method_get.go b/resource-manager/automation/2015-10-31/linkedworkspace/method_get.go index 7ea3ca17eaf..7019324f5a3 100644 --- a/resource-manager/automation/2015-10-31/linkedworkspace/method_get.go +++ b/resource-manager/automation/2015-10-31/linkedworkspace/method_get.go @@ -46,7 +46,6 @@ func (c LinkedWorkspaceClient) Get(ctx context.Context, id AutomationAccountId) var model LinkedWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/linkedworkspace/version.go b/resource-manager/automation/2015-10-31/linkedworkspace/version.go index dda35d97ead..a4835c1475d 100644 --- a/resource-manager/automation/2015-10-31/linkedworkspace/version.go +++ b/resource-manager/automation/2015-10-31/linkedworkspace/version.go @@ -1,12 +1,10 @@ package linkedworkspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedworkspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedworkspace/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/listkeys/README.md b/resource-manager/automation/2015-10-31/listkeys/README.md index e900390aa3e..8657c274db2 100644 --- a/resource-manager/automation/2015-10-31/listkeys/README.md +++ b/resource-manager/automation/2015-10-31/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/listkeys/client.go b/resource-manager/automation/2015-10-31/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2015-10-31/listkeys/client.go +++ b/resource-manager/automation/2015-10-31/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/listkeys/id_automationaccount.go b/resource-manager/automation/2015-10-31/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2015-10-31/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2015-10-31/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2015-10-31/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/listkeys/version.go b/resource-manager/automation/2015-10-31/listkeys/version.go index d6e4a7546e6..cdf6134c37e 100644 --- a/resource-manager/automation/2015-10-31/listkeys/version.go +++ b/resource-manager/automation/2015-10-31/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/module/README.md b/resource-manager/automation/2015-10-31/module/README.md index c5d368c5617..3461e895843 100644 --- a/resource-manager/automation/2015-10-31/module/README.md +++ b/resource-manager/automation/2015-10-31/module/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/module` Documentation -The `module` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `module` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/module/client.go b/resource-manager/automation/2015-10-31/module/client.go index b187a9525a7..88bab05b01d 100644 --- a/resource-manager/automation/2015-10-31/module/client.go +++ b/resource-manager/automation/2015-10-31/module/client.go @@ -15,7 +15,7 @@ type ModuleClient struct { } func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "module", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "module", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModuleClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/module/id_automationaccount.go b/resource-manager/automation/2015-10-31/module/id_automationaccount.go index d884ddf6d14..076be0860db 100644 --- a/resource-manager/automation/2015-10-31/module/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/module/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/module/id_module.go b/resource-manager/automation/2015-10-31/module/id_module.go index d43369de67b..6712f38e7db 100644 --- a/resource-manager/automation/2015-10-31/module/id_module.go +++ b/resource-manager/automation/2015-10-31/module/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/module/method_createorupdate.go b/resource-manager/automation/2015-10-31/module/method_createorupdate.go index 8f2b497f448..009eca3b71e 100644 --- a/resource-manager/automation/2015-10-31/module/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/module/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) CreateOrUpdate(ctx context.Context, id ModuleId, input Mod var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/module/method_get.go b/resource-manager/automation/2015-10-31/module/method_get.go index dda1e7d6fe3..f1bb9268515 100644 --- a/resource-manager/automation/2015-10-31/module/method_get.go +++ b/resource-manager/automation/2015-10-31/module/method_get.go @@ -45,7 +45,6 @@ func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperation var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/module/method_update.go b/resource-manager/automation/2015-10-31/module/method_update.go index 7ea24e33455..b8d0e37337e 100644 --- a/resource-manager/automation/2015-10-31/module/method_update.go +++ b/resource-manager/automation/2015-10-31/module/method_update.go @@ -49,7 +49,6 @@ func (c ModuleClient) Update(ctx context.Context, id ModuleId, input ModuleUpdat var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/module/version.go b/resource-manager/automation/2015-10-31/module/version.go index 4be8b0cd473..158e9764fa3 100644 --- a/resource-manager/automation/2015-10-31/module/version.go +++ b/resource-manager/automation/2015-10-31/module/version.go @@ -1,12 +1,10 @@ package module -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/module/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/module/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/nodereports/README.md b/resource-manager/automation/2015-10-31/nodereports/README.md index 90cdb8b8120..d28501c3734 100644 --- a/resource-manager/automation/2015-10-31/nodereports/README.md +++ b/resource-manager/automation/2015-10-31/nodereports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/nodereports` Documentation -The `nodereports` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `nodereports` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/nodereports/client.go b/resource-manager/automation/2015-10-31/nodereports/client.go index ad5e962fdc5..e9727b9a4e6 100644 --- a/resource-manager/automation/2015-10-31/nodereports/client.go +++ b/resource-manager/automation/2015-10-31/nodereports/client.go @@ -15,7 +15,7 @@ type NodeReportsClient struct { } func NewNodeReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodereports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodereports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeReportsClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/nodereports/id_node.go b/resource-manager/automation/2015-10-31/nodereports/id_node.go index 9060e060e62..900d3c89f46 100644 --- a/resource-manager/automation/2015-10-31/nodereports/id_node.go +++ b/resource-manager/automation/2015-10-31/nodereports/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/nodereports/id_report.go b/resource-manager/automation/2015-10-31/nodereports/id_report.go index 6d6949c5cdb..7af3c76d3bf 100644 --- a/resource-manager/automation/2015-10-31/nodereports/id_report.go +++ b/resource-manager/automation/2015-10-31/nodereports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/nodereports/method_get.go b/resource-manager/automation/2015-10-31/nodereports/method_get.go index bd281fc95ac..aa4b5f00aa5 100644 --- a/resource-manager/automation/2015-10-31/nodereports/method_get.go +++ b/resource-manager/automation/2015-10-31/nodereports/method_get.go @@ -45,7 +45,6 @@ func (c NodeReportsClient) Get(ctx context.Context, id ReportId) (result GetOper var model DscNodeReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/nodereports/method_getcontent.go b/resource-manager/automation/2015-10-31/nodereports/method_getcontent.go index 11a0fe2a90f..c52c1259d38 100644 --- a/resource-manager/automation/2015-10-31/nodereports/method_getcontent.go +++ b/resource-manager/automation/2015-10-31/nodereports/method_getcontent.go @@ -46,7 +46,6 @@ func (c NodeReportsClient) GetContent(ctx context.Context, id ReportId) (result var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/nodereports/method_listbynode.go b/resource-manager/automation/2015-10-31/nodereports/method_listbynode.go index ebdc3271480..aae31249656 100644 --- a/resource-manager/automation/2015-10-31/nodereports/method_listbynode.go +++ b/resource-manager/automation/2015-10-31/nodereports/method_listbynode.go @@ -39,6 +39,7 @@ func (o ListByNodeOperationOptions) ToHeaders() *client.Headers { func (o ListByNodeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/nodereports/version.go b/resource-manager/automation/2015-10-31/nodereports/version.go index c0afabff92d..16ffaaea860 100644 --- a/resource-manager/automation/2015-10-31/nodereports/version.go +++ b/resource-manager/automation/2015-10-31/nodereports/version.go @@ -1,12 +1,10 @@ package nodereports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodereports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodereports/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/README.md b/resource-manager/automation/2015-10-31/objectdatatypes/README.md index eb2b4efae41..c0b0422d585 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/README.md +++ b/resource-manager/automation/2015-10-31/objectdatatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/objectdatatypes` Documentation -The `objectdatatypes` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `objectdatatypes` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/client.go b/resource-manager/automation/2015-10-31/objectdatatypes/client.go index 7d8a79e5408..790cc0cc5b4 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/client.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/client.go @@ -15,7 +15,7 @@ type ObjectDataTypesClient struct { } func NewObjectDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectDataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectdatatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectdatatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectDataTypesClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/id_moduleobjectdatatype.go b/resource-manager/automation/2015-10-31/objectdatatypes/id_moduleobjectdatatype.go index b47304ed896..e1a9a092d1b 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/id_moduleobjectdatatype.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/id_moduleobjectdatatype.go @@ -46,7 +46,7 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/id_objectdatatype.go b/resource-manager/automation/2015-10-31/objectdatatypes/id_objectdatatype.go index e4bc22891bf..cabdf681636 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/id_objectdatatype.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/id_objectdatatype.go @@ -44,7 +44,7 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbymoduleandtype.go b/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbymoduleandtype.go index 101a08ad9d6..be62b523193 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbymoduleandtype.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbymoduleandtype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, id var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbytype.go b/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbytype.go index f42dd1234dd..7d47bc2e64f 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbytype.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/method_listfieldsbytype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByType(ctx context.Context, id ObjectDa var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/objectdatatypes/version.go b/resource-manager/automation/2015-10-31/objectdatatypes/version.go index 5042728c9b8..39f44255fe0 100644 --- a/resource-manager/automation/2015-10-31/objectdatatypes/version.go +++ b/resource-manager/automation/2015-10-31/objectdatatypes/version.go @@ -1,12 +1,10 @@ package objectdatatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectdatatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectdatatypes/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/runbook/README.md b/resource-manager/automation/2015-10-31/runbook/README.md index a440db5d641..72c7a2953ec 100644 --- a/resource-manager/automation/2015-10-31/runbook/README.md +++ b/resource-manager/automation/2015-10-31/runbook/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/runbook` Documentation -The `runbook` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `runbook` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/runbook/client.go b/resource-manager/automation/2015-10-31/runbook/client.go index 2b6168ac712..e0597053d0d 100644 --- a/resource-manager/automation/2015-10-31/runbook/client.go +++ b/resource-manager/automation/2015-10-31/runbook/client.go @@ -15,7 +15,7 @@ type RunbookClient struct { } func NewRunbookClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbook", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbook", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/runbook/id_automationaccount.go b/resource-manager/automation/2015-10-31/runbook/id_automationaccount.go index a72f7d3463e..971c1ba4df5 100644 --- a/resource-manager/automation/2015-10-31/runbook/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/runbook/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/runbook/id_runbook.go b/resource-manager/automation/2015-10-31/runbook/id_runbook.go index 85e8f4a15a9..a42eeae6012 100644 --- a/resource-manager/automation/2015-10-31/runbook/id_runbook.go +++ b/resource-manager/automation/2015-10-31/runbook/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/runbook/method_createorupdate.go b/resource-manager/automation/2015-10-31/runbook/method_createorupdate.go index 2169e0eabfc..8ce38f6e982 100644 --- a/resource-manager/automation/2015-10-31/runbook/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/runbook/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RunbookClient) CreateOrUpdate(ctx context.Context, id RunbookId, input R var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbook/method_get.go b/resource-manager/automation/2015-10-31/runbook/method_get.go index 309ca3bfd4f..a0b0086a5d0 100644 --- a/resource-manager/automation/2015-10-31/runbook/method_get.go +++ b/resource-manager/automation/2015-10-31/runbook/method_get.go @@ -45,7 +45,6 @@ func (c RunbookClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbook/method_getcontent.go b/resource-manager/automation/2015-10-31/runbook/method_getcontent.go index 78b9ba4841c..e1dcb513c9e 100644 --- a/resource-manager/automation/2015-10-31/runbook/method_getcontent.go +++ b/resource-manager/automation/2015-10-31/runbook/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookClient) GetContent(ctx context.Context, id RunbookId) (result Get var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbook/method_update.go b/resource-manager/automation/2015-10-31/runbook/method_update.go index b2c590b4d70..44756d6f29f 100644 --- a/resource-manager/automation/2015-10-31/runbook/method_update.go +++ b/resource-manager/automation/2015-10-31/runbook/method_update.go @@ -49,7 +49,6 @@ func (c RunbookClient) Update(ctx context.Context, id RunbookId, input RunbookUp var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbook/version.go b/resource-manager/automation/2015-10-31/runbook/version.go index 0b7484c1f96..8188b8a5e73 100644 --- a/resource-manager/automation/2015-10-31/runbook/version.go +++ b/resource-manager/automation/2015-10-31/runbook/version.go @@ -1,12 +1,10 @@ package runbook -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbook/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbook/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/README.md b/resource-manager/automation/2015-10-31/runbookdraft/README.md index ebec6fdb7c8..5890062ae12 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/README.md +++ b/resource-manager/automation/2015-10-31/runbookdraft/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/runbookdraft` Documentation -The `runbookdraft` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `runbookdraft` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/runbookdraft/client.go b/resource-manager/automation/2015-10-31/runbookdraft/client.go index 1a93df24d0c..2332c2f5a23 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/client.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/client.go @@ -15,7 +15,7 @@ type RunbookDraftClient struct { } func NewRunbookDraftClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookDraftClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbookdraft", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbookdraft", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookDraftClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/id_runbook.go b/resource-manager/automation/2015-10-31/runbookdraft/id_runbook.go index 82900236b6d..38a64b39cb6 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/id_runbook.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/method_get.go b/resource-manager/automation/2015-10-31/runbookdraft/method_get.go index 82d15501607..2dd02389381 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/method_get.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/method_get.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOp var model RunbookDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/method_getcontent.go b/resource-manager/automation/2015-10-31/runbookdraft/method_getcontent.go index 32bf43a0c32..7c95b5cace9 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/method_getcontent.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (resul var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/method_undoedit.go b/resource-manager/automation/2015-10-31/runbookdraft/method_undoedit.go index f0c743b1e79..be90ea44072 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/method_undoedit.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/method_undoedit.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) UndoEdit(ctx context.Context, id RunbookId) (result var model RunbookDraftUndoEditResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/runbookdraft/version.go b/resource-manager/automation/2015-10-31/runbookdraft/version.go index 1b1a7737ab2..b7547d272b4 100644 --- a/resource-manager/automation/2015-10-31/runbookdraft/version.go +++ b/resource-manager/automation/2015-10-31/runbookdraft/version.go @@ -1,12 +1,10 @@ package runbookdraft -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbookdraft/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbookdraft/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/schedule/README.md b/resource-manager/automation/2015-10-31/schedule/README.md index 169bc3f143e..24f23f2dd34 100644 --- a/resource-manager/automation/2015-10-31/schedule/README.md +++ b/resource-manager/automation/2015-10-31/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `schedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/schedule/client.go b/resource-manager/automation/2015-10-31/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/automation/2015-10-31/schedule/client.go +++ b/resource-manager/automation/2015-10-31/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/schedule/id_automationaccount.go b/resource-manager/automation/2015-10-31/schedule/id_automationaccount.go index 1758b466257..aa9a3610114 100644 --- a/resource-manager/automation/2015-10-31/schedule/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/schedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/schedule/id_schedule.go b/resource-manager/automation/2015-10-31/schedule/id_schedule.go index 944ad0227b2..9f76e20993e 100644 --- a/resource-manager/automation/2015-10-31/schedule/id_schedule.go +++ b/resource-manager/automation/2015-10-31/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/schedule/method_createorupdate.go b/resource-manager/automation/2015-10-31/schedule/method_createorupdate.go index 4263ac8b9f4..901aa1f4c94 100644 --- a/resource-manager/automation/2015-10-31/schedule/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/schedule/method_get.go b/resource-manager/automation/2015-10-31/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/automation/2015-10-31/schedule/method_get.go +++ b/resource-manager/automation/2015-10-31/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/schedule/method_update.go b/resource-manager/automation/2015-10-31/schedule/method_update.go index c84276093ae..fbfab6d1144 100644 --- a/resource-manager/automation/2015-10-31/schedule/method_update.go +++ b/resource-manager/automation/2015-10-31/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/schedule/version.go b/resource-manager/automation/2015-10-31/schedule/version.go index 68f33cffc91..dbed312f935 100644 --- a/resource-manager/automation/2015-10-31/schedule/version.go +++ b/resource-manager/automation/2015-10-31/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/statistics/README.md b/resource-manager/automation/2015-10-31/statistics/README.md index bbb46c72fc5..33424065b5c 100644 --- a/resource-manager/automation/2015-10-31/statistics/README.md +++ b/resource-manager/automation/2015-10-31/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/statistics/client.go b/resource-manager/automation/2015-10-31/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2015-10-31/statistics/client.go +++ b/resource-manager/automation/2015-10-31/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/statistics/id_automationaccount.go b/resource-manager/automation/2015-10-31/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2015-10-31/statistics/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2015-10-31/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/statistics/version.go b/resource-manager/automation/2015-10-31/statistics/version.go index 3af8d9b2b87..4cfb2badb91 100644 --- a/resource-manager/automation/2015-10-31/statistics/version.go +++ b/resource-manager/automation/2015-10-31/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/testjob/README.md b/resource-manager/automation/2015-10-31/testjob/README.md index 5cee735890a..ca4217383d6 100644 --- a/resource-manager/automation/2015-10-31/testjob/README.md +++ b/resource-manager/automation/2015-10-31/testjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/testjob` Documentation -The `testjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `testjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/testjob/client.go b/resource-manager/automation/2015-10-31/testjob/client.go index 948c5b62e0b..42bf971c6be 100644 --- a/resource-manager/automation/2015-10-31/testjob/client.go +++ b/resource-manager/automation/2015-10-31/testjob/client.go @@ -15,7 +15,7 @@ type TestJobClient struct { } func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/testjob/id_runbook.go b/resource-manager/automation/2015-10-31/testjob/id_runbook.go index f8a57f87058..8989fb2b0e0 100644 --- a/resource-manager/automation/2015-10-31/testjob/id_runbook.go +++ b/resource-manager/automation/2015-10-31/testjob/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/testjob/method_create.go b/resource-manager/automation/2015-10-31/testjob/method_create.go index 7beb9fc0ab0..7e6ae18000f 100644 --- a/resource-manager/automation/2015-10-31/testjob/method_create.go +++ b/resource-manager/automation/2015-10-31/testjob/method_create.go @@ -50,7 +50,6 @@ func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCr var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/testjob/method_get.go b/resource-manager/automation/2015-10-31/testjob/method_get.go index be79f45aad2..911a70d9f03 100644 --- a/resource-manager/automation/2015-10-31/testjob/method_get.go +++ b/resource-manager/automation/2015-10-31/testjob/method_get.go @@ -46,7 +46,6 @@ func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/testjob/version.go b/resource-manager/automation/2015-10-31/testjob/version.go index baead83ce6e..393af2bfdd6 100644 --- a/resource-manager/automation/2015-10-31/testjob/version.go +++ b/resource-manager/automation/2015-10-31/testjob/version.go @@ -1,12 +1,10 @@ package testjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjob/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/testjobstream/README.md b/resource-manager/automation/2015-10-31/testjobstream/README.md index c933e13bfc6..fe7ca972eb1 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/README.md +++ b/resource-manager/automation/2015-10-31/testjobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/testjobstream` Documentation -The `testjobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `testjobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/testjobstream/client.go b/resource-manager/automation/2015-10-31/testjobstream/client.go index b14681e53c2..7e656f450c0 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/client.go +++ b/resource-manager/automation/2015-10-31/testjobstream/client.go @@ -15,7 +15,7 @@ type TestJobStreamClient struct { } func NewTestJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/testjobstream/id_runbook.go b/resource-manager/automation/2015-10-31/testjobstream/id_runbook.go index 319f52ebaad..cb971105f88 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/id_runbook.go +++ b/resource-manager/automation/2015-10-31/testjobstream/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/testjobstream/id_testjobstream.go b/resource-manager/automation/2015-10-31/testjobstream/id_testjobstream.go index 0ebc73ded87..09b3674344b 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/id_testjobstream.go +++ b/resource-manager/automation/2015-10-31/testjobstream/id_testjobstream.go @@ -46,7 +46,7 @@ func ParseTestJobStreamID(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTestJobStreamIDInsensitively(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/testjobstream/method_get.go b/resource-manager/automation/2015-10-31/testjobstream/method_get.go index b94e2e9b62a..78292836ec2 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/method_get.go +++ b/resource-manager/automation/2015-10-31/testjobstream/method_get.go @@ -45,7 +45,6 @@ func (c TestJobStreamClient) Get(ctx context.Context, id TestJobStreamId) (resul var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/testjobstream/method_listbytestjob.go b/resource-manager/automation/2015-10-31/testjobstream/method_listbytestjob.go index 0c69bca0921..4898fc0bab9 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/method_listbytestjob.go +++ b/resource-manager/automation/2015-10-31/testjobstream/method_listbytestjob.go @@ -39,6 +39,7 @@ func (o ListByTestJobOperationOptions) ToHeaders() *client.Headers { func (o ListByTestJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/testjobstream/version.go b/resource-manager/automation/2015-10-31/testjobstream/version.go index 2d7b2d8ccec..c10dcaf8c1a 100644 --- a/resource-manager/automation/2015-10-31/testjobstream/version.go +++ b/resource-manager/automation/2015-10-31/testjobstream/version.go @@ -1,12 +1,10 @@ package testjobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjobstream/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/typefields/README.md b/resource-manager/automation/2015-10-31/typefields/README.md index aefa3e1a61f..ec38542fc5b 100644 --- a/resource-manager/automation/2015-10-31/typefields/README.md +++ b/resource-manager/automation/2015-10-31/typefields/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/typefields` Documentation -The `typefields` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `typefields` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/typefields/client.go b/resource-manager/automation/2015-10-31/typefields/client.go index e235fbc854f..d2929448756 100644 --- a/resource-manager/automation/2015-10-31/typefields/client.go +++ b/resource-manager/automation/2015-10-31/typefields/client.go @@ -15,7 +15,7 @@ type TypeFieldsClient struct { } func NewTypeFieldsClientWithBaseURI(sdkApi sdkEnv.Api) (*TypeFieldsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "typefields", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "typefields", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TypeFieldsClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/typefields/id_type.go b/resource-manager/automation/2015-10-31/typefields/id_type.go index 834ea978a07..e7ebc51ea54 100644 --- a/resource-manager/automation/2015-10-31/typefields/id_type.go +++ b/resource-manager/automation/2015-10-31/typefields/id_type.go @@ -46,7 +46,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/typefields/method_fieldslistbytype.go b/resource-manager/automation/2015-10-31/typefields/method_fieldslistbytype.go index 03945e9f500..18ca75f1933 100644 --- a/resource-manager/automation/2015-10-31/typefields/method_fieldslistbytype.go +++ b/resource-manager/automation/2015-10-31/typefields/method_fieldslistbytype.go @@ -46,7 +46,6 @@ func (c TypeFieldsClient) FieldsListByType(ctx context.Context, id TypeId) (resu var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/typefields/version.go b/resource-manager/automation/2015-10-31/typefields/version.go index b06b1fa3e33..d1e56d62636 100644 --- a/resource-manager/automation/2015-10-31/typefields/version.go +++ b/resource-manager/automation/2015-10-31/typefields/version.go @@ -1,12 +1,10 @@ package typefields -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/typefields/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/typefields/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/usages/README.md b/resource-manager/automation/2015-10-31/usages/README.md index 267a7ae2e11..f616d80ea65 100644 --- a/resource-manager/automation/2015-10-31/usages/README.md +++ b/resource-manager/automation/2015-10-31/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/usages/client.go b/resource-manager/automation/2015-10-31/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2015-10-31/usages/client.go +++ b/resource-manager/automation/2015-10-31/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/usages/id_automationaccount.go b/resource-manager/automation/2015-10-31/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2015-10-31/usages/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/usages/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2015-10-31/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/usages/version.go b/resource-manager/automation/2015-10-31/usages/version.go index cf5a68815b7..a9e0ccfae92 100644 --- a/resource-manager/automation/2015-10-31/usages/version.go +++ b/resource-manager/automation/2015-10-31/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/variable/README.md b/resource-manager/automation/2015-10-31/variable/README.md index 0a32fcd56cf..f61e3b1776f 100644 --- a/resource-manager/automation/2015-10-31/variable/README.md +++ b/resource-manager/automation/2015-10-31/variable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/variable` Documentation -The `variable` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `variable` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/variable/client.go b/resource-manager/automation/2015-10-31/variable/client.go index b52efe661a6..8e293b273f0 100644 --- a/resource-manager/automation/2015-10-31/variable/client.go +++ b/resource-manager/automation/2015-10-31/variable/client.go @@ -15,7 +15,7 @@ type VariableClient struct { } func NewVariableClientWithBaseURI(sdkApi sdkEnv.Api) (*VariableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "variable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "variable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VariableClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/variable/id_automationaccount.go b/resource-manager/automation/2015-10-31/variable/id_automationaccount.go index 635e56dfae8..09be4df2a66 100644 --- a/resource-manager/automation/2015-10-31/variable/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/variable/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/variable/id_variable.go b/resource-manager/automation/2015-10-31/variable/id_variable.go index aab429f68a4..63f8c9328fc 100644 --- a/resource-manager/automation/2015-10-31/variable/id_variable.go +++ b/resource-manager/automation/2015-10-31/variable/id_variable.go @@ -44,7 +44,7 @@ func ParseVariableID(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/variable/method_createorupdate.go b/resource-manager/automation/2015-10-31/variable/method_createorupdate.go index 7f1d31eeacc..35a90d4c131 100644 --- a/resource-manager/automation/2015-10-31/variable/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/variable/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VariableClient) CreateOrUpdate(ctx context.Context, id VariableId, input var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/variable/method_get.go b/resource-manager/automation/2015-10-31/variable/method_get.go index a84e304f5a0..6d865e8141f 100644 --- a/resource-manager/automation/2015-10-31/variable/method_get.go +++ b/resource-manager/automation/2015-10-31/variable/method_get.go @@ -45,7 +45,6 @@ func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOpera var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/variable/method_update.go b/resource-manager/automation/2015-10-31/variable/method_update.go index cba7dfa356a..d63d977348b 100644 --- a/resource-manager/automation/2015-10-31/variable/method_update.go +++ b/resource-manager/automation/2015-10-31/variable/method_update.go @@ -49,7 +49,6 @@ func (c VariableClient) Update(ctx context.Context, id VariableId, input Variabl var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/variable/version.go b/resource-manager/automation/2015-10-31/variable/version.go index 05f3d740552..1b5759c1e89 100644 --- a/resource-manager/automation/2015-10-31/variable/version.go +++ b/resource-manager/automation/2015-10-31/variable/version.go @@ -1,12 +1,10 @@ package variable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/variable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/variable/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/watcher/README.md b/resource-manager/automation/2015-10-31/watcher/README.md index d49fd9491a4..e92ff842c37 100644 --- a/resource-manager/automation/2015-10-31/watcher/README.md +++ b/resource-manager/automation/2015-10-31/watcher/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/watcher` Documentation -The `watcher` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `watcher` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/watcher/client.go b/resource-manager/automation/2015-10-31/watcher/client.go index 410df5cc6de..97956dd3b49 100644 --- a/resource-manager/automation/2015-10-31/watcher/client.go +++ b/resource-manager/automation/2015-10-31/watcher/client.go @@ -15,7 +15,7 @@ type WatcherClient struct { } func NewWatcherClientWithBaseURI(sdkApi sdkEnv.Api) (*WatcherClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watcher", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watcher", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatcherClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/watcher/id_automationaccount.go b/resource-manager/automation/2015-10-31/watcher/id_automationaccount.go index 5bb6a32656c..55c832e03ac 100644 --- a/resource-manager/automation/2015-10-31/watcher/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/watcher/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/watcher/id_watcher.go b/resource-manager/automation/2015-10-31/watcher/id_watcher.go index 5ee526661d5..67219fd6633 100644 --- a/resource-manager/automation/2015-10-31/watcher/id_watcher.go +++ b/resource-manager/automation/2015-10-31/watcher/id_watcher.go @@ -44,7 +44,7 @@ func ParseWatcherID(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatcherIDInsensitively(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/watcher/method_createorupdate.go b/resource-manager/automation/2015-10-31/watcher/method_createorupdate.go index de1bd15ae0f..80fb2527d8f 100644 --- a/resource-manager/automation/2015-10-31/watcher/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/watcher/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatcherClient) CreateOrUpdate(ctx context.Context, id WatcherId, input W var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/watcher/method_get.go b/resource-manager/automation/2015-10-31/watcher/method_get.go index 399e6b731f9..5578b8b1938 100644 --- a/resource-manager/automation/2015-10-31/watcher/method_get.go +++ b/resource-manager/automation/2015-10-31/watcher/method_get.go @@ -45,7 +45,6 @@ func (c WatcherClient) Get(ctx context.Context, id WatcherId) (result GetOperati var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/watcher/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/watcher/method_listbyautomationaccount.go index b0f573fbe51..dad46ab1f35 100644 --- a/resource-manager/automation/2015-10-31/watcher/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/watcher/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/watcher/method_update.go b/resource-manager/automation/2015-10-31/watcher/method_update.go index baa7b92a1f4..02103fa5b5b 100644 --- a/resource-manager/automation/2015-10-31/watcher/method_update.go +++ b/resource-manager/automation/2015-10-31/watcher/method_update.go @@ -49,7 +49,6 @@ func (c WatcherClient) Update(ctx context.Context, id WatcherId, input WatcherUp var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/watcher/version.go b/resource-manager/automation/2015-10-31/watcher/version.go index 4ae2820868d..3eb464e3fdb 100644 --- a/resource-manager/automation/2015-10-31/watcher/version.go +++ b/resource-manager/automation/2015-10-31/watcher/version.go @@ -1,12 +1,10 @@ package watcher -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watcher/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watcher/2015-10-31" } diff --git a/resource-manager/automation/2015-10-31/webhook/README.md b/resource-manager/automation/2015-10-31/webhook/README.md index d23f175636d..3159d13d233 100644 --- a/resource-manager/automation/2015-10-31/webhook/README.md +++ b/resource-manager/automation/2015-10-31/webhook/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook` Documentation -The `webhook` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2015-10-31`). +The `webhook` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2015-10-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2015-10-31/webhook/client.go b/resource-manager/automation/2015-10-31/webhook/client.go index 493635b9430..1ab051ecf3c 100644 --- a/resource-manager/automation/2015-10-31/webhook/client.go +++ b/resource-manager/automation/2015-10-31/webhook/client.go @@ -15,7 +15,7 @@ type WebhookClient struct { } func NewWebhookClientWithBaseURI(sdkApi sdkEnv.Api) (*WebhookClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webhook", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webhook", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebhookClient: %+v", err) } diff --git a/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go b/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go index 2b008a1f699..138b786dbdc 100644 --- a/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go +++ b/resource-manager/automation/2015-10-31/webhook/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/webhook/id_webhook.go b/resource-manager/automation/2015-10-31/webhook/id_webhook.go index 47c49582c49..00d8a7433ca 100644 --- a/resource-manager/automation/2015-10-31/webhook/id_webhook.go +++ b/resource-manager/automation/2015-10-31/webhook/id_webhook.go @@ -44,7 +44,7 @@ func ParseWebHookID(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2015-10-31/webhook/method_createorupdate.go b/resource-manager/automation/2015-10-31/webhook/method_createorupdate.go index b2103a36e30..db0ff5c3743 100644 --- a/resource-manager/automation/2015-10-31/webhook/method_createorupdate.go +++ b/resource-manager/automation/2015-10-31/webhook/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WebhookClient) CreateOrUpdate(ctx context.Context, id WebHookId, input W var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/webhook/method_generateuri.go b/resource-manager/automation/2015-10-31/webhook/method_generateuri.go index 03023556ad1..7985b5e4484 100644 --- a/resource-manager/automation/2015-10-31/webhook/method_generateuri.go +++ b/resource-manager/automation/2015-10-31/webhook/method_generateuri.go @@ -46,7 +46,6 @@ func (c WebhookClient) GenerateUri(ctx context.Context, id AutomationAccountId) var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/webhook/method_get.go b/resource-manager/automation/2015-10-31/webhook/method_get.go index bf8d8647097..741732ff21c 100644 --- a/resource-manager/automation/2015-10-31/webhook/method_get.go +++ b/resource-manager/automation/2015-10-31/webhook/method_get.go @@ -45,7 +45,6 @@ func (c WebhookClient) Get(ctx context.Context, id WebHookId) (result GetOperati var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/webhook/method_listbyautomationaccount.go b/resource-manager/automation/2015-10-31/webhook/method_listbyautomationaccount.go index 9dee8752f42..c247dd4c565 100644 --- a/resource-manager/automation/2015-10-31/webhook/method_listbyautomationaccount.go +++ b/resource-manager/automation/2015-10-31/webhook/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2015-10-31/webhook/method_update.go b/resource-manager/automation/2015-10-31/webhook/method_update.go index 6b0fbacf565..8a166a8e7cc 100644 --- a/resource-manager/automation/2015-10-31/webhook/method_update.go +++ b/resource-manager/automation/2015-10-31/webhook/method_update.go @@ -49,7 +49,6 @@ func (c WebhookClient) Update(ctx context.Context, id WebHookId, input WebhookUp var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2015-10-31/webhook/version.go b/resource-manager/automation/2015-10-31/webhook/version.go index 99754ef4857..b05ac572be2 100644 --- a/resource-manager/automation/2015-10-31/webhook/version.go +++ b/resource-manager/automation/2015-10-31/webhook/version.go @@ -1,12 +1,10 @@ package webhook -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-10-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhook/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webhook/2015-10-31" } diff --git a/resource-manager/automation/2019-06-01/activity/README.md b/resource-manager/automation/2019-06-01/activity/README.md index 3487ab55f06..34b489ce854 100644 --- a/resource-manager/automation/2019-06-01/activity/README.md +++ b/resource-manager/automation/2019-06-01/activity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/activity` Documentation -The `activity` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `activity` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/activity/client.go b/resource-manager/automation/2019-06-01/activity/client.go index 0142d55ea1f..7e366361ec1 100644 --- a/resource-manager/automation/2019-06-01/activity/client.go +++ b/resource-manager/automation/2019-06-01/activity/client.go @@ -15,7 +15,7 @@ type ActivityClient struct { } func NewActivityClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/activity/id_activity.go b/resource-manager/automation/2019-06-01/activity/id_activity.go index 87b1df1f763..545b302d28e 100644 --- a/resource-manager/automation/2019-06-01/activity/id_activity.go +++ b/resource-manager/automation/2019-06-01/activity/id_activity.go @@ -46,7 +46,7 @@ func ParseActivityID(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/activity/id_module.go b/resource-manager/automation/2019-06-01/activity/id_module.go index 2c22f0316ae..48065b72334 100644 --- a/resource-manager/automation/2019-06-01/activity/id_module.go +++ b/resource-manager/automation/2019-06-01/activity/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/activity/method_get.go b/resource-manager/automation/2019-06-01/activity/method_get.go index d91dc4e2e43..c212d18aab0 100644 --- a/resource-manager/automation/2019-06-01/activity/method_get.go +++ b/resource-manager/automation/2019-06-01/activity/method_get.go @@ -45,7 +45,6 @@ func (c ActivityClient) Get(ctx context.Context, id ActivityId) (result GetOpera var model Activity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/activity/version.go b/resource-manager/automation/2019-06-01/activity/version.go index 0ac4b22b814..d7ee8e8ed6e 100644 --- a/resource-manager/automation/2019-06-01/activity/version.go +++ b/resource-manager/automation/2019-06-01/activity/version.go @@ -1,12 +1,10 @@ package activity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activity/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/README.md b/resource-manager/automation/2019-06-01/agentregistrationinformation/README.md index a0d7a2fe6a7..b6c22c9e768 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/README.md +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/agentregistrationinformation` Documentation -The `agentregistrationinformation` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `agentregistrationinformation` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/client.go b/resource-manager/automation/2019-06-01/agentregistrationinformation/client.go index c13906095ef..a90dc569c80 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/client.go +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/client.go @@ -15,7 +15,7 @@ type AgentRegistrationInformationClient struct { } func NewAgentRegistrationInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentRegistrationInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentregistrationinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentregistrationinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentRegistrationInformationClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go b/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go index 5ec36ff3845..3532f9712de 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/method_get.go b/resource-manager/automation/2019-06-01/agentregistrationinformation/method_get.go index 95539ac551e..d385b7e7d61 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/method_get.go +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/method_get.go @@ -46,7 +46,6 @@ func (c AgentRegistrationInformationClient) Get(ctx context.Context, id Automati var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/method_regeneratekey.go b/resource-manager/automation/2019-06-01/agentregistrationinformation/method_regeneratekey.go index 261eb28919f..4f4e5f62875 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/method_regeneratekey.go +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, i var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/agentregistrationinformation/version.go b/resource-manager/automation/2019-06-01/agentregistrationinformation/version.go index 5e92d277d13..1ff92a063e7 100644 --- a/resource-manager/automation/2019-06-01/agentregistrationinformation/version.go +++ b/resource-manager/automation/2019-06-01/agentregistrationinformation/version.go @@ -1,12 +1,10 @@ package agentregistrationinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentregistrationinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentregistrationinformation/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/automationaccount/README.md b/resource-manager/automation/2019-06-01/automationaccount/README.md index d80303ed324..2faf0d2c013 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/README.md +++ b/resource-manager/automation/2019-06-01/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/automationaccount/client.go b/resource-manager/automation/2019-06-01/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/client.go +++ b/resource-manager/automation/2019-06-01/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/automationaccount/id_automationaccount.go b/resource-manager/automation/2019-06-01/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/automationaccount/method_createorupdate.go b/resource-manager/automation/2019-06-01/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/automationaccount/method_get.go b/resource-manager/automation/2019-06-01/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/method_get.go +++ b/resource-manager/automation/2019-06-01/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/automationaccount/method_update.go b/resource-manager/automation/2019-06-01/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/method_update.go +++ b/resource-manager/automation/2019-06-01/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/automationaccount/version.go b/resource-manager/automation/2019-06-01/automationaccount/version.go index c93f505e757..10549fcc7e2 100644 --- a/resource-manager/automation/2019-06-01/automationaccount/version.go +++ b/resource-manager/automation/2019-06-01/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/certificate/README.md b/resource-manager/automation/2019-06-01/certificate/README.md index e2286a8c1a3..4aa796e7a33 100644 --- a/resource-manager/automation/2019-06-01/certificate/README.md +++ b/resource-manager/automation/2019-06-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/certificate/client.go b/resource-manager/automation/2019-06-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/automation/2019-06-01/certificate/client.go +++ b/resource-manager/automation/2019-06-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/certificate/id_automationaccount.go b/resource-manager/automation/2019-06-01/certificate/id_automationaccount.go index 29c8860dc29..e5efa36aa52 100644 --- a/resource-manager/automation/2019-06-01/certificate/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/certificate/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/certificate/id_certificate.go b/resource-manager/automation/2019-06-01/certificate/id_certificate.go index 6ab72756d10..7d31e9ea831 100644 --- a/resource-manager/automation/2019-06-01/certificate/id_certificate.go +++ b/resource-manager/automation/2019-06-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/certificate/method_createorupdate.go b/resource-manager/automation/2019-06-01/certificate/method_createorupdate.go index 0b944c57e50..1e5de85afb2 100644 --- a/resource-manager/automation/2019-06-01/certificate/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/certificate/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/certificate/method_get.go b/resource-manager/automation/2019-06-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/automation/2019-06-01/certificate/method_get.go +++ b/resource-manager/automation/2019-06-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/certificate/method_update.go b/resource-manager/automation/2019-06-01/certificate/method_update.go index 6fbe2d4a340..b4c51d673ad 100644 --- a/resource-manager/automation/2019-06-01/certificate/method_update.go +++ b/resource-manager/automation/2019-06-01/certificate/method_update.go @@ -49,7 +49,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/certificate/version.go b/resource-manager/automation/2019-06-01/certificate/version.go index c1e503e4871..a102190e1ac 100644 --- a/resource-manager/automation/2019-06-01/certificate/version.go +++ b/resource-manager/automation/2019-06-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/connection/README.md b/resource-manager/automation/2019-06-01/connection/README.md index 0596528cb8a..9fa6e52f179 100644 --- a/resource-manager/automation/2019-06-01/connection/README.md +++ b/resource-manager/automation/2019-06-01/connection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/connection` Documentation -The `connection` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `connection` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/connection/client.go b/resource-manager/automation/2019-06-01/connection/client.go index 3f066e2e653..0c3f5a2848b 100644 --- a/resource-manager/automation/2019-06-01/connection/client.go +++ b/resource-manager/automation/2019-06-01/connection/client.go @@ -15,7 +15,7 @@ type ConnectionClient struct { } func NewConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/connection/id_automationaccount.go b/resource-manager/automation/2019-06-01/connection/id_automationaccount.go index ec1aaa6092f..304d6566f3f 100644 --- a/resource-manager/automation/2019-06-01/connection/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/connection/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/connection/id_connection.go b/resource-manager/automation/2019-06-01/connection/id_connection.go index 6ec1093cd2b..0e6c2604874 100644 --- a/resource-manager/automation/2019-06-01/connection/id_connection.go +++ b/resource-manager/automation/2019-06-01/connection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/connection/method_createorupdate.go b/resource-manager/automation/2019-06-01/connection/method_createorupdate.go index b1f0dd9e309..b6f6f47e462 100644 --- a/resource-manager/automation/2019-06-01/connection/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/connection/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionClient) CreateOrUpdate(ctx context.Context, id ConnectionId, i var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/connection/method_get.go b/resource-manager/automation/2019-06-01/connection/method_get.go index 16d9f30e8c8..602490999ff 100644 --- a/resource-manager/automation/2019-06-01/connection/method_get.go +++ b/resource-manager/automation/2019-06-01/connection/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionClient) Get(ctx context.Context, id ConnectionId) (result GetO var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/connection/method_update.go b/resource-manager/automation/2019-06-01/connection/method_update.go index 1c57761fbc1..11dff660df6 100644 --- a/resource-manager/automation/2019-06-01/connection/method_update.go +++ b/resource-manager/automation/2019-06-01/connection/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionClient) Update(ctx context.Context, id ConnectionId, input Con var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/connection/version.go b/resource-manager/automation/2019-06-01/connection/version.go index c19d2aa5cfd..e9b3bf7ba68 100644 --- a/resource-manager/automation/2019-06-01/connection/version.go +++ b/resource-manager/automation/2019-06-01/connection/version.go @@ -1,12 +1,10 @@ package connection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connection/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/connectiontype/README.md b/resource-manager/automation/2019-06-01/connectiontype/README.md index 58f80fbdc15..5036aff0ba3 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/README.md +++ b/resource-manager/automation/2019-06-01/connectiontype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/connectiontype` Documentation -The `connectiontype` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `connectiontype` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/connectiontype/client.go b/resource-manager/automation/2019-06-01/connectiontype/client.go index c5cc541fae3..bd83ae0611a 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/client.go +++ b/resource-manager/automation/2019-06-01/connectiontype/client.go @@ -15,7 +15,7 @@ type ConnectionTypeClient struct { } func NewConnectionTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiontype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiontype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionTypeClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/connectiontype/id_automationaccount.go b/resource-manager/automation/2019-06-01/connectiontype/id_automationaccount.go index 3f9b9b3fc08..90cd0ad2006 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/connectiontype/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/connectiontype/id_connectiontype.go b/resource-manager/automation/2019-06-01/connectiontype/id_connectiontype.go index 6fb2d1c07b2..3945becf946 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/id_connectiontype.go +++ b/resource-manager/automation/2019-06-01/connectiontype/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/connectiontype/method_createorupdate.go b/resource-manager/automation/2019-06-01/connectiontype/method_createorupdate.go index 9733a9a7c13..b5482180669 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/connectiontype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectionTypeClient) CreateOrUpdate(ctx context.Context, id ConnectionT var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/connectiontype/method_get.go b/resource-manager/automation/2019-06-01/connectiontype/method_get.go index 54be67f6226..f4bc697608c 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/method_get.go +++ b/resource-manager/automation/2019-06-01/connectiontype/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionTypeClient) Get(ctx context.Context, id ConnectionTypeId) (res var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/connectiontype/version.go b/resource-manager/automation/2019-06-01/connectiontype/version.go index 52f97781871..471678f0cf2 100644 --- a/resource-manager/automation/2019-06-01/connectiontype/version.go +++ b/resource-manager/automation/2019-06-01/connectiontype/version.go @@ -1,12 +1,10 @@ package connectiontype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiontype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiontype/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/credential/README.md b/resource-manager/automation/2019-06-01/credential/README.md index 9682be3a0d0..9c819354d87 100644 --- a/resource-manager/automation/2019-06-01/credential/README.md +++ b/resource-manager/automation/2019-06-01/credential/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/credential` Documentation -The `credential` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `credential` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/credential/client.go b/resource-manager/automation/2019-06-01/credential/client.go index 2e36e15446b..52f1e66c317 100644 --- a/resource-manager/automation/2019-06-01/credential/client.go +++ b/resource-manager/automation/2019-06-01/credential/client.go @@ -15,7 +15,7 @@ type CredentialClient struct { } func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credential", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credential", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/credential/id_automationaccount.go b/resource-manager/automation/2019-06-01/credential/id_automationaccount.go index 173accecf18..d363cf9c0b2 100644 --- a/resource-manager/automation/2019-06-01/credential/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/credential/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/credential/id_credential.go b/resource-manager/automation/2019-06-01/credential/id_credential.go index 7e4319efe94..6b4b028d5fd 100644 --- a/resource-manager/automation/2019-06-01/credential/id_credential.go +++ b/resource-manager/automation/2019-06-01/credential/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/credential/method_createorupdate.go b/resource-manager/automation/2019-06-01/credential/method_createorupdate.go index 046ed79f991..2c5f73f9dfe 100644 --- a/resource-manager/automation/2019-06-01/credential/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/credential/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CredentialClient) CreateOrUpdate(ctx context.Context, id CredentialId, i var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/credential/method_get.go b/resource-manager/automation/2019-06-01/credential/method_get.go index f9008350a37..225e47cfe42 100644 --- a/resource-manager/automation/2019-06-01/credential/method_get.go +++ b/resource-manager/automation/2019-06-01/credential/method_get.go @@ -45,7 +45,6 @@ func (c CredentialClient) Get(ctx context.Context, id CredentialId) (result GetO var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/credential/method_update.go b/resource-manager/automation/2019-06-01/credential/method_update.go index bb2022825d5..da04941cd11 100644 --- a/resource-manager/automation/2019-06-01/credential/method_update.go +++ b/resource-manager/automation/2019-06-01/credential/method_update.go @@ -49,7 +49,6 @@ func (c CredentialClient) Update(ctx context.Context, id CredentialId, input Cre var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/credential/version.go b/resource-manager/automation/2019-06-01/credential/version.go index baa0cdc7abc..003dc952455 100644 --- a/resource-manager/automation/2019-06-01/credential/version.go +++ b/resource-manager/automation/2019-06-01/credential/version.go @@ -1,12 +1,10 @@ package credential -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credential/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credential/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/README.md b/resource-manager/automation/2019-06-01/dsccompilationjob/README.md index 8d4e42fc5ff..3bf02d33706 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/README.md +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/dsccompilationjob` Documentation -The `dsccompilationjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `dsccompilationjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/client.go b/resource-manager/automation/2019-06-01/dsccompilationjob/client.go index aa29e7e1f2c..b1d76b50f8d 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/client.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/client.go @@ -15,7 +15,7 @@ type DscCompilationJobClient struct { } func NewDscCompilationJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DscCompilationJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dsccompilationjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dsccompilationjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscCompilationJobClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/id_automationaccount.go b/resource-manager/automation/2019-06-01/dsccompilationjob/id_automationaccount.go index b80e8f1f79d..178c3a7eb93 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/id_compilationjobstream.go b/resource-manager/automation/2019-06-01/dsccompilationjob/id_compilationjobstream.go index 33e602a44ff..37fdaa64cf1 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/id_compilationjobstream.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/id_compilationjobstream.go @@ -46,7 +46,7 @@ func ParseCompilationJobStreamID(input string) (*CompilationJobStreamId, error) } id := CompilationJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCompilationJobStreamIDInsensitively(input string) (*CompilationJobStre } id := CompilationJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/method_get.go b/resource-manager/automation/2019-06-01/dsccompilationjob/method_get.go index 4562f128bf8..dc7a415772e 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/method_get.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/method_get.go @@ -46,7 +46,6 @@ func (c DscCompilationJobClient) Get(ctx context.Context, id commonids.Automatio var model DscCompilationJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/method_getstream.go b/resource-manager/automation/2019-06-01/dsccompilationjob/method_getstream.go index fd6661871d3..744144f533c 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/method_getstream.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/method_getstream.go @@ -45,7 +45,6 @@ func (c DscCompilationJobClient) GetStream(ctx context.Context, id CompilationJo var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/dsccompilationjob/method_listbyautomationaccount.go index 5ea430161ee..5fdbfb376ea 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/dsccompilationjob/version.go b/resource-manager/automation/2019-06-01/dsccompilationjob/version.go index 9aec34ccaec..dad1db21610 100644 --- a/resource-manager/automation/2019-06-01/dsccompilationjob/version.go +++ b/resource-manager/automation/2019-06-01/dsccompilationjob/version.go @@ -1,12 +1,10 @@ package dsccompilationjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dsccompilationjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dsccompilationjob/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/README.md b/resource-manager/automation/2019-06-01/dscconfiguration/README.md index 34ae0837c40..95817b12595 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/README.md +++ b/resource-manager/automation/2019-06-01/dscconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/dscconfiguration` Documentation -The `dscconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `dscconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/client.go b/resource-manager/automation/2019-06-01/dscconfiguration/client.go index 33d7d66ff2e..b0bf9421d65 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/client.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/client.go @@ -15,7 +15,7 @@ type DscConfigurationClient struct { } func NewDscConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/id_automationaccount.go b/resource-manager/automation/2019-06-01/dscconfiguration/id_automationaccount.go index a9b7ac7041d..8a7a211ee52 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/id_configuration.go b/resource-manager/automation/2019-06-01/dscconfiguration/id_configuration.go index 0cb80dea3e2..b77ddf9f20a 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/id_configuration.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/method_createorupdate.go b/resource-manager/automation/2019-06-01/dscconfiguration/method_createorupdate.go index 5096a6df27c..9fcc3d6a75b 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DscConfigurationClient) CreateOrUpdate(ctx context.Context, id Configura var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/method_get.go b/resource-manager/automation/2019-06-01/dscconfiguration/method_get.go index 0ec24024e26..e53beeed617 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/method_get.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscConfigurationClient) Get(ctx context.Context, id ConfigurationId) (re var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/method_getcontent.go b/resource-manager/automation/2019-06-01/dscconfiguration/method_getcontent.go index 0b8558a41d6..815d53ea91f 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/method_getcontent.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/method_getcontent.go @@ -46,7 +46,6 @@ func (c DscConfigurationClient) GetContent(ctx context.Context, id Configuration var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/dscconfiguration/method_listbyautomationaccount.go index 8a4b09db266..19cb7180e57 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/method_update.go b/resource-manager/automation/2019-06-01/dscconfiguration/method_update.go index 89ed13be39f..c842ef5f4b3 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/method_update.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/method_update.go @@ -49,7 +49,6 @@ func (c DscConfigurationClient) Update(ctx context.Context, id ConfigurationId, var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscconfiguration/version.go b/resource-manager/automation/2019-06-01/dscconfiguration/version.go index ad3e1ae5bcb..a55989ae902 100644 --- a/resource-manager/automation/2019-06-01/dscconfiguration/version.go +++ b/resource-manager/automation/2019-06-01/dscconfiguration/version.go @@ -1,12 +1,10 @@ package dscconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscconfiguration/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/dscnode/README.md b/resource-manager/automation/2019-06-01/dscnode/README.md index 9a3256d3a63..15b981e573b 100644 --- a/resource-manager/automation/2019-06-01/dscnode/README.md +++ b/resource-manager/automation/2019-06-01/dscnode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/dscnode` Documentation -The `dscnode` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `dscnode` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/dscnode/client.go b/resource-manager/automation/2019-06-01/dscnode/client.go index e7b2638a025..a680965c12d 100644 --- a/resource-manager/automation/2019-06-01/dscnode/client.go +++ b/resource-manager/automation/2019-06-01/dscnode/client.go @@ -15,7 +15,7 @@ type DscNodeClient struct { } func NewDscNodeClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/dscnode/id_automationaccount.go b/resource-manager/automation/2019-06-01/dscnode/id_automationaccount.go index 7d470e8c389..2688083e51f 100644 --- a/resource-manager/automation/2019-06-01/dscnode/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/dscnode/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscnode/id_node.go b/resource-manager/automation/2019-06-01/dscnode/id_node.go index d999c8c6067..b9b36665141 100644 --- a/resource-manager/automation/2019-06-01/dscnode/id_node.go +++ b/resource-manager/automation/2019-06-01/dscnode/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscnode/method_get.go b/resource-manager/automation/2019-06-01/dscnode/method_get.go index 6173eb3ebb3..9ba3ab23a79 100644 --- a/resource-manager/automation/2019-06-01/dscnode/method_get.go +++ b/resource-manager/automation/2019-06-01/dscnode/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeClient) Get(ctx context.Context, id NodeId) (result GetOperationR var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscnode/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/dscnode/method_listbyautomationaccount.go index 7c722bfd18a..afce4f82b2a 100644 --- a/resource-manager/automation/2019-06-01/dscnode/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/dscnode/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/dscnode/method_update.go b/resource-manager/automation/2019-06-01/dscnode/method_update.go index 62c2c0e286c..44011e51c99 100644 --- a/resource-manager/automation/2019-06-01/dscnode/method_update.go +++ b/resource-manager/automation/2019-06-01/dscnode/method_update.go @@ -49,7 +49,6 @@ func (c DscNodeClient) Update(ctx context.Context, id NodeId, input DscNodeUpdat var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscnode/version.go b/resource-manager/automation/2019-06-01/dscnode/version.go index 2594640276e..6350ad96b5b 100644 --- a/resource-manager/automation/2019-06-01/dscnode/version.go +++ b/resource-manager/automation/2019-06-01/dscnode/version.go @@ -1,12 +1,10 @@ package dscnode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnode/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/README.md b/resource-manager/automation/2019-06-01/dscnodeconfiguration/README.md index 195499816d2..2a719e3c7d1 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/README.md +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/dscnodeconfiguration` Documentation -The `dscnodeconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `dscnodeconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/client.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/client.go index 60e2159464d..d9d09f3a59d 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/client.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/client.go @@ -15,7 +15,7 @@ type DscNodeConfigurationClient struct { } func NewDscNodeConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_automationaccount.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_automationaccount.go index 2857bb759ef..5320db63946 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_nodeconfiguration.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_nodeconfiguration.go index 55f9ef787e5..a79bf5fcc78 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_nodeconfiguration.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_get.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_get.go index 3971e32ad95..09e5cef4f75 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_get.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeConfigurationClient) Get(ctx context.Context, id NodeConfiguratio var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_listbyautomationaccount.go index 707c87a2ebc..cd9762499e3 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/dscnodeconfiguration/version.go b/resource-manager/automation/2019-06-01/dscnodeconfiguration/version.go index 8d872dfd609..9ec659ba92f 100644 --- a/resource-manager/automation/2019-06-01/dscnodeconfiguration/version.go +++ b/resource-manager/automation/2019-06-01/dscnodeconfiguration/version.go @@ -1,12 +1,10 @@ package dscnodeconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnodeconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnodeconfiguration/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/README.md b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/README.md index a2b70d3b711..45a626a172d 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/client.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_update.go index d0b185d9792..d2ae1c1cd4e 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/version.go b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/version.go index eb7a338d96b..98b92d12756 100644 --- a/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2019-06-01/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/job/README.md b/resource-manager/automation/2019-06-01/job/README.md index 2c944851acc..18e625ee66d 100644 --- a/resource-manager/automation/2019-06-01/job/README.md +++ b/resource-manager/automation/2019-06-01/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `job` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/job/client.go b/resource-manager/automation/2019-06-01/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/automation/2019-06-01/job/client.go +++ b/resource-manager/automation/2019-06-01/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/job/id_automationaccount.go b/resource-manager/automation/2019-06-01/job/id_automationaccount.go index a03de714fcf..03473fb15a7 100644 --- a/resource-manager/automation/2019-06-01/job/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/job/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/job/id_job.go b/resource-manager/automation/2019-06-01/job/id_job.go index d9ee96305cf..c8265a630cf 100644 --- a/resource-manager/automation/2019-06-01/job/id_job.go +++ b/resource-manager/automation/2019-06-01/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/job/method_create.go b/resource-manager/automation/2019-06-01/job/method_create.go index 20181d88e2e..157bfbc1811 100644 --- a/resource-manager/automation/2019-06-01/job/method_create.go +++ b/resource-manager/automation/2019-06-01/job/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c JobClient) Create(ctx context.Context, id JobId, input JobCreateParamete var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/job/method_get.go b/resource-manager/automation/2019-06-01/job/method_get.go index 70b2a88ce70..f8444387c47 100644 --- a/resource-manager/automation/2019-06-01/job/method_get.go +++ b/resource-manager/automation/2019-06-01/job/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) Get(ctx context.Context, id JobId, options GetOperationOption var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/job/method_getoutput.go b/resource-manager/automation/2019-06-01/job/method_getoutput.go index c5e0edacdb0..1255914f3ea 100644 --- a/resource-manager/automation/2019-06-01/job/method_getoutput.go +++ b/resource-manager/automation/2019-06-01/job/method_getoutput.go @@ -36,6 +36,7 @@ func (o GetOutputOperationOptions) ToHeaders() *client.Headers { func (o GetOutputOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetOutput(ctx context.Context, id JobId, options GetOutputOpe var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/job/method_getrunbookcontent.go b/resource-manager/automation/2019-06-01/job/method_getrunbookcontent.go index a7a244d9859..bf20b3af24a 100644 --- a/resource-manager/automation/2019-06-01/job/method_getrunbookcontent.go +++ b/resource-manager/automation/2019-06-01/job/method_getrunbookcontent.go @@ -36,6 +36,7 @@ func (o GetRunbookContentOperationOptions) ToHeaders() *client.Headers { func (o GetRunbookContentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetRunbookContent(ctx context.Context, id JobId, options GetR var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/job/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/job/method_listbyautomationaccount.go index 504bd861221..df1c74e6a31 100644 --- a/resource-manager/automation/2019-06-01/job/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/job/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/job/method_resume.go b/resource-manager/automation/2019-06-01/job/method_resume.go index c707c2a9c74..d5080a44a1b 100644 --- a/resource-manager/automation/2019-06-01/job/method_resume.go +++ b/resource-manager/automation/2019-06-01/job/method_resume.go @@ -35,6 +35,7 @@ func (o ResumeOperationOptions) ToHeaders() *client.Headers { func (o ResumeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/job/method_stop.go b/resource-manager/automation/2019-06-01/job/method_stop.go index d2864853dff..91d406b28f9 100644 --- a/resource-manager/automation/2019-06-01/job/method_stop.go +++ b/resource-manager/automation/2019-06-01/job/method_stop.go @@ -35,6 +35,7 @@ func (o StopOperationOptions) ToHeaders() *client.Headers { func (o StopOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/job/method_suspend.go b/resource-manager/automation/2019-06-01/job/method_suspend.go index bc8f428afbb..533d6922f83 100644 --- a/resource-manager/automation/2019-06-01/job/method_suspend.go +++ b/resource-manager/automation/2019-06-01/job/method_suspend.go @@ -35,6 +35,7 @@ func (o SuspendOperationOptions) ToHeaders() *client.Headers { func (o SuspendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/job/version.go b/resource-manager/automation/2019-06-01/job/version.go index 36d9d4a78ef..b998a48e559 100644 --- a/resource-manager/automation/2019-06-01/job/version.go +++ b/resource-manager/automation/2019-06-01/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/jobschedule/README.md b/resource-manager/automation/2019-06-01/jobschedule/README.md index 172ee135c04..8efbaf2cc9e 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/README.md +++ b/resource-manager/automation/2019-06-01/jobschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/jobschedule` Documentation -The `jobschedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `jobschedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/jobschedule/client.go b/resource-manager/automation/2019-06-01/jobschedule/client.go index 4c9fb976839..18a0e89bd37 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/client.go +++ b/resource-manager/automation/2019-06-01/jobschedule/client.go @@ -15,7 +15,7 @@ type JobScheduleClient struct { } func NewJobScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*JobScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/jobschedule/id_automationaccount.go b/resource-manager/automation/2019-06-01/jobschedule/id_automationaccount.go index 330e6504743..e21e84913de 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/jobschedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/jobschedule/id_jobschedule.go b/resource-manager/automation/2019-06-01/jobschedule/id_jobschedule.go index 9276d099eb3..896164a6098 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/id_jobschedule.go +++ b/resource-manager/automation/2019-06-01/jobschedule/id_jobschedule.go @@ -44,7 +44,7 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/jobschedule/method_create.go b/resource-manager/automation/2019-06-01/jobschedule/method_create.go index 03831935824..676325e8c02 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/method_create.go +++ b/resource-manager/automation/2019-06-01/jobschedule/method_create.go @@ -49,7 +49,6 @@ func (c JobScheduleClient) Create(ctx context.Context, id JobScheduleId, input J var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/jobschedule/method_get.go b/resource-manager/automation/2019-06-01/jobschedule/method_get.go index 0721b83e4be..913490c8175 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/method_get.go +++ b/resource-manager/automation/2019-06-01/jobschedule/method_get.go @@ -45,7 +45,6 @@ func (c JobScheduleClient) Get(ctx context.Context, id JobScheduleId) (result Ge var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/jobschedule/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/jobschedule/method_listbyautomationaccount.go index 6b5c6412a83..74ee8cd52b4 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/jobschedule/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/jobschedule/version.go b/resource-manager/automation/2019-06-01/jobschedule/version.go index 99a28097b82..711fb2d26d1 100644 --- a/resource-manager/automation/2019-06-01/jobschedule/version.go +++ b/resource-manager/automation/2019-06-01/jobschedule/version.go @@ -1,12 +1,10 @@ package jobschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobschedule/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/jobstream/README.md b/resource-manager/automation/2019-06-01/jobstream/README.md index 159305087e9..564fa28ac44 100644 --- a/resource-manager/automation/2019-06-01/jobstream/README.md +++ b/resource-manager/automation/2019-06-01/jobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/jobstream` Documentation -The `jobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `jobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/jobstream/client.go b/resource-manager/automation/2019-06-01/jobstream/client.go index 880cfb48113..8711950a051 100644 --- a/resource-manager/automation/2019-06-01/jobstream/client.go +++ b/resource-manager/automation/2019-06-01/jobstream/client.go @@ -15,7 +15,7 @@ type JobStreamClient struct { } func NewJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/jobstream/id_job.go b/resource-manager/automation/2019-06-01/jobstream/id_job.go index d37d4f381dd..f4ff7b46fb8 100644 --- a/resource-manager/automation/2019-06-01/jobstream/id_job.go +++ b/resource-manager/automation/2019-06-01/jobstream/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/jobstream/id_stream.go b/resource-manager/automation/2019-06-01/jobstream/id_stream.go index cc03ad44f41..8019e348b44 100644 --- a/resource-manager/automation/2019-06-01/jobstream/id_stream.go +++ b/resource-manager/automation/2019-06-01/jobstream/id_stream.go @@ -46,7 +46,7 @@ func ParseStreamID(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/jobstream/method_get.go b/resource-manager/automation/2019-06-01/jobstream/method_get.go index 500505c3b4f..3682e1236de 100644 --- a/resource-manager/automation/2019-06-01/jobstream/method_get.go +++ b/resource-manager/automation/2019-06-01/jobstream/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobStreamClient) Get(ctx context.Context, id StreamId, options GetOperat var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/jobstream/method_listbyjob.go b/resource-manager/automation/2019-06-01/jobstream/method_listbyjob.go index 4d6eee1cc84..80cd095c7ca 100644 --- a/resource-manager/automation/2019-06-01/jobstream/method_listbyjob.go +++ b/resource-manager/automation/2019-06-01/jobstream/method_listbyjob.go @@ -42,6 +42,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/jobstream/version.go b/resource-manager/automation/2019-06-01/jobstream/version.go index f253bdaf870..da3e77dc093 100644 --- a/resource-manager/automation/2019-06-01/jobstream/version.go +++ b/resource-manager/automation/2019-06-01/jobstream/version.go @@ -1,12 +1,10 @@ package jobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstream/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/linkedworkspace/README.md b/resource-manager/automation/2019-06-01/linkedworkspace/README.md index aca3b07cddd..67604396267 100644 --- a/resource-manager/automation/2019-06-01/linkedworkspace/README.md +++ b/resource-manager/automation/2019-06-01/linkedworkspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/linkedworkspace` Documentation -The `linkedworkspace` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `linkedworkspace` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/linkedworkspace/client.go b/resource-manager/automation/2019-06-01/linkedworkspace/client.go index 265eab06051..ce26bf57e1c 100644 --- a/resource-manager/automation/2019-06-01/linkedworkspace/client.go +++ b/resource-manager/automation/2019-06-01/linkedworkspace/client.go @@ -15,7 +15,7 @@ type LinkedWorkspaceClient struct { } func NewLinkedWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedWorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedworkspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedworkspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedWorkspaceClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/linkedworkspace/id_automationaccount.go b/resource-manager/automation/2019-06-01/linkedworkspace/id_automationaccount.go index 33e45a35f32..897343bb6cd 100644 --- a/resource-manager/automation/2019-06-01/linkedworkspace/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/linkedworkspace/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/linkedworkspace/method_get.go b/resource-manager/automation/2019-06-01/linkedworkspace/method_get.go index 7ea3ca17eaf..7019324f5a3 100644 --- a/resource-manager/automation/2019-06-01/linkedworkspace/method_get.go +++ b/resource-manager/automation/2019-06-01/linkedworkspace/method_get.go @@ -46,7 +46,6 @@ func (c LinkedWorkspaceClient) Get(ctx context.Context, id AutomationAccountId) var model LinkedWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/linkedworkspace/version.go b/resource-manager/automation/2019-06-01/linkedworkspace/version.go index bea68d10aa0..e92dbc35ea1 100644 --- a/resource-manager/automation/2019-06-01/linkedworkspace/version.go +++ b/resource-manager/automation/2019-06-01/linkedworkspace/version.go @@ -1,12 +1,10 @@ package linkedworkspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedworkspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedworkspace/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/listkeys/README.md b/resource-manager/automation/2019-06-01/listkeys/README.md index 49aab4af1a4..a0467bdd4de 100644 --- a/resource-manager/automation/2019-06-01/listkeys/README.md +++ b/resource-manager/automation/2019-06-01/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/listkeys/client.go b/resource-manager/automation/2019-06-01/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2019-06-01/listkeys/client.go +++ b/resource-manager/automation/2019-06-01/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/listkeys/id_automationaccount.go b/resource-manager/automation/2019-06-01/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2019-06-01/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2019-06-01/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2019-06-01/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/listkeys/version.go b/resource-manager/automation/2019-06-01/listkeys/version.go index acfe3f0fb82..e7f8a5b30de 100644 --- a/resource-manager/automation/2019-06-01/listkeys/version.go +++ b/resource-manager/automation/2019-06-01/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/module/README.md b/resource-manager/automation/2019-06-01/module/README.md index 67da8781ef6..931a44c7877 100644 --- a/resource-manager/automation/2019-06-01/module/README.md +++ b/resource-manager/automation/2019-06-01/module/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/module` Documentation -The `module` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `module` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/module/client.go b/resource-manager/automation/2019-06-01/module/client.go index b187a9525a7..88bab05b01d 100644 --- a/resource-manager/automation/2019-06-01/module/client.go +++ b/resource-manager/automation/2019-06-01/module/client.go @@ -15,7 +15,7 @@ type ModuleClient struct { } func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "module", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "module", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModuleClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/module/id_automationaccount.go b/resource-manager/automation/2019-06-01/module/id_automationaccount.go index d884ddf6d14..076be0860db 100644 --- a/resource-manager/automation/2019-06-01/module/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/module/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/module/id_module.go b/resource-manager/automation/2019-06-01/module/id_module.go index d43369de67b..6712f38e7db 100644 --- a/resource-manager/automation/2019-06-01/module/id_module.go +++ b/resource-manager/automation/2019-06-01/module/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/module/method_createorupdate.go b/resource-manager/automation/2019-06-01/module/method_createorupdate.go index 8f2b497f448..009eca3b71e 100644 --- a/resource-manager/automation/2019-06-01/module/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/module/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) CreateOrUpdate(ctx context.Context, id ModuleId, input Mod var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/module/method_get.go b/resource-manager/automation/2019-06-01/module/method_get.go index dda1e7d6fe3..f1bb9268515 100644 --- a/resource-manager/automation/2019-06-01/module/method_get.go +++ b/resource-manager/automation/2019-06-01/module/method_get.go @@ -45,7 +45,6 @@ func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperation var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/module/method_update.go b/resource-manager/automation/2019-06-01/module/method_update.go index 7ea24e33455..b8d0e37337e 100644 --- a/resource-manager/automation/2019-06-01/module/method_update.go +++ b/resource-manager/automation/2019-06-01/module/method_update.go @@ -49,7 +49,6 @@ func (c ModuleClient) Update(ctx context.Context, id ModuleId, input ModuleUpdat var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/module/version.go b/resource-manager/automation/2019-06-01/module/version.go index f91f888d7c7..7fec5edeada 100644 --- a/resource-manager/automation/2019-06-01/module/version.go +++ b/resource-manager/automation/2019-06-01/module/version.go @@ -1,12 +1,10 @@ package module -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/module/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/module/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/nodecountinformation/README.md b/resource-manager/automation/2019-06-01/nodecountinformation/README.md index 6a34426750c..ec557e29d6e 100644 --- a/resource-manager/automation/2019-06-01/nodecountinformation/README.md +++ b/resource-manager/automation/2019-06-01/nodecountinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/nodecountinformation` Documentation -The `nodecountinformation` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `nodecountinformation` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/nodecountinformation/client.go b/resource-manager/automation/2019-06-01/nodecountinformation/client.go index 086fcf345ff..adc7e085e29 100644 --- a/resource-manager/automation/2019-06-01/nodecountinformation/client.go +++ b/resource-manager/automation/2019-06-01/nodecountinformation/client.go @@ -15,7 +15,7 @@ type NodeCountInformationClient struct { } func NewNodeCountInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeCountInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodecountinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodecountinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeCountInformationClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/nodecountinformation/id_counttype.go b/resource-manager/automation/2019-06-01/nodecountinformation/id_counttype.go index 55845ed4756..a69be60fa22 100644 --- a/resource-manager/automation/2019-06-01/nodecountinformation/id_counttype.go +++ b/resource-manager/automation/2019-06-01/nodecountinformation/id_counttype.go @@ -44,7 +44,7 @@ func ParseCountTypeID(input string) (*CountTypeId, error) { } id := CountTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCountTypeIDInsensitively(input string) (*CountTypeId, error) { } id := CountTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/nodecountinformation/method_get.go b/resource-manager/automation/2019-06-01/nodecountinformation/method_get.go index bcf977cdeed..2829bb8f183 100644 --- a/resource-manager/automation/2019-06-01/nodecountinformation/method_get.go +++ b/resource-manager/automation/2019-06-01/nodecountinformation/method_get.go @@ -45,7 +45,6 @@ func (c NodeCountInformationClient) Get(ctx context.Context, id CountTypeId) (re var model NodeCounts result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/nodecountinformation/version.go b/resource-manager/automation/2019-06-01/nodecountinformation/version.go index 4b1a3639d66..a5b29b34292 100644 --- a/resource-manager/automation/2019-06-01/nodecountinformation/version.go +++ b/resource-manager/automation/2019-06-01/nodecountinformation/version.go @@ -1,12 +1,10 @@ package nodecountinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodecountinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodecountinformation/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/nodereports/README.md b/resource-manager/automation/2019-06-01/nodereports/README.md index 60454050196..943fba8b597 100644 --- a/resource-manager/automation/2019-06-01/nodereports/README.md +++ b/resource-manager/automation/2019-06-01/nodereports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/nodereports` Documentation -The `nodereports` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `nodereports` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/nodereports/client.go b/resource-manager/automation/2019-06-01/nodereports/client.go index ad5e962fdc5..e9727b9a4e6 100644 --- a/resource-manager/automation/2019-06-01/nodereports/client.go +++ b/resource-manager/automation/2019-06-01/nodereports/client.go @@ -15,7 +15,7 @@ type NodeReportsClient struct { } func NewNodeReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodereports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodereports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeReportsClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/nodereports/id_node.go b/resource-manager/automation/2019-06-01/nodereports/id_node.go index 9060e060e62..900d3c89f46 100644 --- a/resource-manager/automation/2019-06-01/nodereports/id_node.go +++ b/resource-manager/automation/2019-06-01/nodereports/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/nodereports/id_report.go b/resource-manager/automation/2019-06-01/nodereports/id_report.go index 6d6949c5cdb..7af3c76d3bf 100644 --- a/resource-manager/automation/2019-06-01/nodereports/id_report.go +++ b/resource-manager/automation/2019-06-01/nodereports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/nodereports/method_get.go b/resource-manager/automation/2019-06-01/nodereports/method_get.go index bd281fc95ac..aa4b5f00aa5 100644 --- a/resource-manager/automation/2019-06-01/nodereports/method_get.go +++ b/resource-manager/automation/2019-06-01/nodereports/method_get.go @@ -45,7 +45,6 @@ func (c NodeReportsClient) Get(ctx context.Context, id ReportId) (result GetOper var model DscNodeReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/nodereports/method_getcontent.go b/resource-manager/automation/2019-06-01/nodereports/method_getcontent.go index 11a0fe2a90f..c52c1259d38 100644 --- a/resource-manager/automation/2019-06-01/nodereports/method_getcontent.go +++ b/resource-manager/automation/2019-06-01/nodereports/method_getcontent.go @@ -46,7 +46,6 @@ func (c NodeReportsClient) GetContent(ctx context.Context, id ReportId) (result var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/nodereports/method_listbynode.go b/resource-manager/automation/2019-06-01/nodereports/method_listbynode.go index ebdc3271480..aae31249656 100644 --- a/resource-manager/automation/2019-06-01/nodereports/method_listbynode.go +++ b/resource-manager/automation/2019-06-01/nodereports/method_listbynode.go @@ -39,6 +39,7 @@ func (o ListByNodeOperationOptions) ToHeaders() *client.Headers { func (o ListByNodeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/nodereports/version.go b/resource-manager/automation/2019-06-01/nodereports/version.go index be9b720be54..78c199f9d33 100644 --- a/resource-manager/automation/2019-06-01/nodereports/version.go +++ b/resource-manager/automation/2019-06-01/nodereports/version.go @@ -1,12 +1,10 @@ package nodereports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodereports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodereports/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/README.md b/resource-manager/automation/2019-06-01/objectdatatypes/README.md index 311d32f80e6..6c5e691e8a7 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/README.md +++ b/resource-manager/automation/2019-06-01/objectdatatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/objectdatatypes` Documentation -The `objectdatatypes` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `objectdatatypes` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/client.go b/resource-manager/automation/2019-06-01/objectdatatypes/client.go index 7d8a79e5408..790cc0cc5b4 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/client.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/client.go @@ -15,7 +15,7 @@ type ObjectDataTypesClient struct { } func NewObjectDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectDataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectdatatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectdatatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectDataTypesClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/id_moduleobjectdatatype.go b/resource-manager/automation/2019-06-01/objectdatatypes/id_moduleobjectdatatype.go index b47304ed896..e1a9a092d1b 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/id_moduleobjectdatatype.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/id_moduleobjectdatatype.go @@ -46,7 +46,7 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/id_objectdatatype.go b/resource-manager/automation/2019-06-01/objectdatatypes/id_objectdatatype.go index e4bc22891bf..cabdf681636 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/id_objectdatatype.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/id_objectdatatype.go @@ -44,7 +44,7 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbymoduleandtype.go b/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbymoduleandtype.go index 101a08ad9d6..be62b523193 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbymoduleandtype.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbymoduleandtype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, id var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbytype.go b/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbytype.go index f42dd1234dd..7d47bc2e64f 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbytype.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/method_listfieldsbytype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByType(ctx context.Context, id ObjectDa var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/objectdatatypes/version.go b/resource-manager/automation/2019-06-01/objectdatatypes/version.go index 5337e48dc09..76d11f61dff 100644 --- a/resource-manager/automation/2019-06-01/objectdatatypes/version.go +++ b/resource-manager/automation/2019-06-01/objectdatatypes/version.go @@ -1,12 +1,10 @@ package objectdatatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectdatatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectdatatypes/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/python2package/README.md b/resource-manager/automation/2019-06-01/python2package/README.md index d9b5a1cb5a9..d54c8e18247 100644 --- a/resource-manager/automation/2019-06-01/python2package/README.md +++ b/resource-manager/automation/2019-06-01/python2package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/python2package` Documentation -The `python2package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `python2package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/python2package/client.go b/resource-manager/automation/2019-06-01/python2package/client.go index d152b292bb4..a605d8db5fa 100644 --- a/resource-manager/automation/2019-06-01/python2package/client.go +++ b/resource-manager/automation/2019-06-01/python2package/client.go @@ -15,7 +15,7 @@ type Python2PackageClient struct { } func NewPython2PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python2PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python2package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python2package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python2PackageClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/python2package/id_automationaccount.go b/resource-manager/automation/2019-06-01/python2package/id_automationaccount.go index b295de3890d..848a41f14ce 100644 --- a/resource-manager/automation/2019-06-01/python2package/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/python2package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/python2package/id_python2package.go b/resource-manager/automation/2019-06-01/python2package/id_python2package.go index 0e739894a07..31cf288eff4 100644 --- a/resource-manager/automation/2019-06-01/python2package/id_python2package.go +++ b/resource-manager/automation/2019-06-01/python2package/id_python2package.go @@ -44,7 +44,7 @@ func ParsePython2PackageID(input string) (*Python2PackageId, error) { } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython2PackageIDInsensitively(input string) (*Python2PackageId, error) } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/python2package/method_createorupdate.go b/resource-manager/automation/2019-06-01/python2package/method_createorupdate.go index ab495e73043..be4b6be8e06 100644 --- a/resource-manager/automation/2019-06-01/python2package/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/python2package/method_createorupdate.go @@ -50,7 +50,6 @@ func (c Python2PackageClient) CreateOrUpdate(ctx context.Context, id Python2Pack var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/python2package/method_get.go b/resource-manager/automation/2019-06-01/python2package/method_get.go index 988270c3e38..8baec2126f4 100644 --- a/resource-manager/automation/2019-06-01/python2package/method_get.go +++ b/resource-manager/automation/2019-06-01/python2package/method_get.go @@ -45,7 +45,6 @@ func (c Python2PackageClient) Get(ctx context.Context, id Python2PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/python2package/method_update.go b/resource-manager/automation/2019-06-01/python2package/method_update.go index 7bb58cb1936..9b6e028b314 100644 --- a/resource-manager/automation/2019-06-01/python2package/method_update.go +++ b/resource-manager/automation/2019-06-01/python2package/method_update.go @@ -49,7 +49,6 @@ func (c Python2PackageClient) Update(ctx context.Context, id Python2PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/python2package/version.go b/resource-manager/automation/2019-06-01/python2package/version.go index c42016c4c38..e3d1c6a93e2 100644 --- a/resource-manager/automation/2019-06-01/python2package/version.go +++ b/resource-manager/automation/2019-06-01/python2package/version.go @@ -1,12 +1,10 @@ package python2package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python2package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python2package/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/runbook/README.md b/resource-manager/automation/2019-06-01/runbook/README.md index dc7bc0c34a1..16e501a193e 100644 --- a/resource-manager/automation/2019-06-01/runbook/README.md +++ b/resource-manager/automation/2019-06-01/runbook/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/runbook` Documentation -The `runbook` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `runbook` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/runbook/client.go b/resource-manager/automation/2019-06-01/runbook/client.go index 2b6168ac712..e0597053d0d 100644 --- a/resource-manager/automation/2019-06-01/runbook/client.go +++ b/resource-manager/automation/2019-06-01/runbook/client.go @@ -15,7 +15,7 @@ type RunbookClient struct { } func NewRunbookClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbook", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbook", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/runbook/id_automationaccount.go b/resource-manager/automation/2019-06-01/runbook/id_automationaccount.go index a72f7d3463e..971c1ba4df5 100644 --- a/resource-manager/automation/2019-06-01/runbook/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/runbook/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/runbook/id_runbook.go b/resource-manager/automation/2019-06-01/runbook/id_runbook.go index 85e8f4a15a9..a42eeae6012 100644 --- a/resource-manager/automation/2019-06-01/runbook/id_runbook.go +++ b/resource-manager/automation/2019-06-01/runbook/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/runbook/method_createorupdate.go b/resource-manager/automation/2019-06-01/runbook/method_createorupdate.go index 2169e0eabfc..8ce38f6e982 100644 --- a/resource-manager/automation/2019-06-01/runbook/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/runbook/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RunbookClient) CreateOrUpdate(ctx context.Context, id RunbookId, input R var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbook/method_get.go b/resource-manager/automation/2019-06-01/runbook/method_get.go index 309ca3bfd4f..a0b0086a5d0 100644 --- a/resource-manager/automation/2019-06-01/runbook/method_get.go +++ b/resource-manager/automation/2019-06-01/runbook/method_get.go @@ -45,7 +45,6 @@ func (c RunbookClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbook/method_getcontent.go b/resource-manager/automation/2019-06-01/runbook/method_getcontent.go index 6950c73cd79..e343a9d4336 100644 --- a/resource-manager/automation/2019-06-01/runbook/method_getcontent.go +++ b/resource-manager/automation/2019-06-01/runbook/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookClient) GetContent(ctx context.Context, id RunbookId) (result Get var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbook/method_update.go b/resource-manager/automation/2019-06-01/runbook/method_update.go index b2c590b4d70..44756d6f29f 100644 --- a/resource-manager/automation/2019-06-01/runbook/method_update.go +++ b/resource-manager/automation/2019-06-01/runbook/method_update.go @@ -49,7 +49,6 @@ func (c RunbookClient) Update(ctx context.Context, id RunbookId, input RunbookUp var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbook/version.go b/resource-manager/automation/2019-06-01/runbook/version.go index 21e80754253..da87f059efc 100644 --- a/resource-manager/automation/2019-06-01/runbook/version.go +++ b/resource-manager/automation/2019-06-01/runbook/version.go @@ -1,12 +1,10 @@ package runbook -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbook/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbook/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/runbookdraft/README.md b/resource-manager/automation/2019-06-01/runbookdraft/README.md index 7f27de70f3b..265797f1348 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/README.md +++ b/resource-manager/automation/2019-06-01/runbookdraft/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/runbookdraft` Documentation -The `runbookdraft` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `runbookdraft` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/runbookdraft/client.go b/resource-manager/automation/2019-06-01/runbookdraft/client.go index 1a93df24d0c..2332c2f5a23 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/client.go +++ b/resource-manager/automation/2019-06-01/runbookdraft/client.go @@ -15,7 +15,7 @@ type RunbookDraftClient struct { } func NewRunbookDraftClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookDraftClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbookdraft", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbookdraft", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookDraftClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/runbookdraft/id_runbook.go b/resource-manager/automation/2019-06-01/runbookdraft/id_runbook.go index 82900236b6d..38a64b39cb6 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/id_runbook.go +++ b/resource-manager/automation/2019-06-01/runbookdraft/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/runbookdraft/method_get.go b/resource-manager/automation/2019-06-01/runbookdraft/method_get.go index 82d15501607..2dd02389381 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/method_get.go +++ b/resource-manager/automation/2019-06-01/runbookdraft/method_get.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOp var model RunbookDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbookdraft/method_getcontent.go b/resource-manager/automation/2019-06-01/runbookdraft/method_getcontent.go index ffde16c7c17..ab516e7bdc8 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/method_getcontent.go +++ b/resource-manager/automation/2019-06-01/runbookdraft/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (resul var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/runbookdraft/version.go b/resource-manager/automation/2019-06-01/runbookdraft/version.go index 2377569c775..aa3feff87c8 100644 --- a/resource-manager/automation/2019-06-01/runbookdraft/version.go +++ b/resource-manager/automation/2019-06-01/runbookdraft/version.go @@ -1,12 +1,10 @@ package runbookdraft -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbookdraft/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbookdraft/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/schedule/README.md b/resource-manager/automation/2019-06-01/schedule/README.md index 6dfa0f13586..1cc88f1d3b1 100644 --- a/resource-manager/automation/2019-06-01/schedule/README.md +++ b/resource-manager/automation/2019-06-01/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `schedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/schedule/client.go b/resource-manager/automation/2019-06-01/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/automation/2019-06-01/schedule/client.go +++ b/resource-manager/automation/2019-06-01/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/schedule/id_automationaccount.go b/resource-manager/automation/2019-06-01/schedule/id_automationaccount.go index 1758b466257..aa9a3610114 100644 --- a/resource-manager/automation/2019-06-01/schedule/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/schedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/schedule/id_schedule.go b/resource-manager/automation/2019-06-01/schedule/id_schedule.go index 944ad0227b2..9f76e20993e 100644 --- a/resource-manager/automation/2019-06-01/schedule/id_schedule.go +++ b/resource-manager/automation/2019-06-01/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/schedule/method_createorupdate.go b/resource-manager/automation/2019-06-01/schedule/method_createorupdate.go index 4263ac8b9f4..901aa1f4c94 100644 --- a/resource-manager/automation/2019-06-01/schedule/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/schedule/method_get.go b/resource-manager/automation/2019-06-01/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/automation/2019-06-01/schedule/method_get.go +++ b/resource-manager/automation/2019-06-01/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/schedule/method_update.go b/resource-manager/automation/2019-06-01/schedule/method_update.go index c84276093ae..fbfab6d1144 100644 --- a/resource-manager/automation/2019-06-01/schedule/method_update.go +++ b/resource-manager/automation/2019-06-01/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/schedule/version.go b/resource-manager/automation/2019-06-01/schedule/version.go index 041a3e547fe..c07f9264742 100644 --- a/resource-manager/automation/2019-06-01/schedule/version.go +++ b/resource-manager/automation/2019-06-01/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/README.md b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/README.md index 094acce7651..c0c05325175 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/README.md +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfiguration` Documentation -The `softwareupdateconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `softwareupdateconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/client.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/client.go index f0d7fb8ab0f..91c73535f1f 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/client.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationClient struct { } func NewSoftwareUpdateConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go index 4ae9c5972bb..aa6f8d534de 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go index 1155705d208..5fa81aa28ec 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/id_softwareupdateconfiguration.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationID(input string) (*SoftwareUpdateConfigurat } id := SoftwareUpdateConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationIDInsensitively(input string) (*SoftwareUpd } id := SoftwareUpdateConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_create.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_create.go index 2f9856ab171..78411ece151 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_create.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c SoftwareUpdateConfigurationClient) Create(ctx context.Context, id Softwa var model SoftwareUpdateConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_delete.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_delete.go index e7ff65532b7..cef2425a060 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_delete.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_getbyname.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_getbyname.go index a99bd7c5087..19324adfbf0 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_getbyname.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_getbyname.go @@ -36,6 +36,7 @@ func (o GetByNameOperationOptions) ToHeaders() *client.Headers { func (o GetByNameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationClient) GetByName(ctx context.Context, id Sof var model SoftwareUpdateConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_list.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_list.go index 1313ffaad9f..97755fdebed 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_list.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -77,7 +78,6 @@ func (c SoftwareUpdateConfigurationClient) List(ctx context.Context, id Automati var model SoftwareUpdateConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/version.go b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/version.go index da57c1a9f2e..a2ac51bb58f 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfiguration/version.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfiguration/version.go @@ -1,12 +1,10 @@ package softwareupdateconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfiguration/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/README.md b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/README.md index 647bcc958c7..aa498f0c612 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/README.md +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun` Documentation -The `softwareupdateconfigurationmachinerun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `softwareupdateconfigurationmachinerun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/client.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/client.go index fd31306b48d..dc26e75ebf5 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/client.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationMachineRunClient struct { } func NewSoftwareUpdateConfigurationMachineRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationMachineRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationMachineRunClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_automationaccount.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_automationaccount.go index 9ffcdb66cc0..0244bd3c2e7 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go index 89171d686d7..019f836780e 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationMachineRunID(input string) (*SoftwareUpdate } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationMachineRunIDInsensitively(input string) (*S } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_getbyid.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_getbyid.go index 23b807e3e05..449eb4379bc 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_getbyid.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationMachineRunClient) GetById(ctx context.Context var model SoftwareUpdateConfigurationMachineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_list.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_list.go index 6f047c54ccc..bbd0f4ec908 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_list.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/version.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/version.go index bb409bc8b10..f23dac9b079 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/version.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationmachinerun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationmachinerun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/README.md b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/README.md index 64001d01e23..18eac118c71 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/README.md +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun` Documentation -The `softwareupdateconfigurationrun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `softwareupdateconfigurationrun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/client.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/client.go index aa86f6dacdf..360338f920d 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/client.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationRunClient struct { } func NewSoftwareUpdateConfigurationRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationRunClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_automationaccount.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_automationaccount.go index 2c81cf2164d..e09df230b6b 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go index e903396f63d..8c0225c0dc0 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationRunID(input string) (*SoftwareUpdateConfigu } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationRunIDInsensitively(input string) (*Software } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_getbyid.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_getbyid.go index c4c6b07ca88..1985085c30e 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_getbyid.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationRunClient) GetById(ctx context.Context, id So var model SoftwareUpdateConfigurationRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_list.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_list.go index f6503cdb378..b8dcc77ca85 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_list.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/version.go b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/version.go index baed553b3aa..c254315420d 100644 --- a/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/version.go +++ b/resource-manager/automation/2019-06-01/softwareupdateconfigurationrun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationrun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationrun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationrun/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/README.md b/resource-manager/automation/2019-06-01/sourcecontrol/README.md index 3ccbc2a3866..9a31be156a8 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/README.md +++ b/resource-manager/automation/2019-06-01/sourcecontrol/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/sourcecontrol` Documentation -The `sourcecontrol` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `sourcecontrol` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/client.go b/resource-manager/automation/2019-06-01/sourcecontrol/client.go index 5cc59fbc8dc..cf7d6d4d95c 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/client.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/client.go @@ -15,7 +15,7 @@ type SourceControlClient struct { } func NewSourceControlClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrol", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrol", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/id_automationaccount.go b/resource-manager/automation/2019-06-01/sourcecontrol/id_automationaccount.go index 80fde88426a..f866cc6fd24 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/id_sourcecontrol.go b/resource-manager/automation/2019-06-01/sourcecontrol/id_sourcecontrol.go index 1a333c90b2e..2e293367fa8 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/id_sourcecontrol.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/method_createorupdate.go b/resource-manager/automation/2019-06-01/sourcecontrol/method_createorupdate.go index cd75063d722..470c526d512 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlClient) CreateOrUpdate(ctx context.Context, id SourceContro var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/method_get.go b/resource-manager/automation/2019-06-01/sourcecontrol/method_get.go index db32fdf5036..435c74f2193 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/method_get.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlClient) Get(ctx context.Context, id SourceControlId) (resul var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/sourcecontrol/method_listbyautomationaccount.go index 9457e6a81fe..5872a01f8b8 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/method_update.go b/resource-manager/automation/2019-06-01/sourcecontrol/method_update.go index f00032bbff7..e4265560f5c 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/method_update.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/method_update.go @@ -49,7 +49,6 @@ func (c SourceControlClient) Update(ctx context.Context, id SourceControlId, inp var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrol/version.go b/resource-manager/automation/2019-06-01/sourcecontrol/version.go index 8475c0e749b..f3ff78bd09f 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrol/version.go +++ b/resource-manager/automation/2019-06-01/sourcecontrol/version.go @@ -1,12 +1,10 @@ package sourcecontrol -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrol/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrol/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/README.md b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/README.md index 2af7b2ac961..884c24edbc8 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/README.md +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/sourcecontrolsyncjob` Documentation -The `sourcecontrolsyncjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `sourcecontrolsyncjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/client.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/client.go index 380f8581c8f..f17a5fe03f6 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/client.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobClient struct { } func NewSourceControlSyncJobClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrol.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrol.go index 45a497aaac6..18ee5a36a2a 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrol.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go index c15f95859d0..356a9c95896 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_create.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_create.go index 07efd101947..afaa631c092 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_create.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_create.go @@ -49,7 +49,6 @@ func (c SourceControlSyncJobClient) Create(ctx context.Context, id SourceControl var model SourceControlSyncJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_get.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_get.go index 5cb3e1e56f9..f0a7ca3d15e 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_get.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobClient) Get(ctx context.Context, id SourceControlSyn var model SourceControlSyncJobById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_listbyautomationaccount.go index 84bcd7a480d..1a4ea326345 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/version.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/version.go index fdd3e12989a..b34ea54fd06 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/version.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjob/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjob/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/README.md b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/README.md index 31cb258c782..e05ae9f499b 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/README.md +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams` Documentation -The `sourcecontrolsyncjobstreams` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `sourcecontrolsyncjobstreams` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/client.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/client.go index 4e689c48c4f..0be682fcf30 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/client.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobStreamsClient struct { } func NewSourceControlSyncJobStreamsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobStreamsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobStreamsClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go index 210de5d23e8..520dc5f44c7 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go index a1d8a1ca967..fca0b86a471 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go @@ -48,7 +48,7 @@ func ParseSourceControlSyncJobStreamID(input string) (*SourceControlSyncJobStrea } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSourceControlSyncJobStreamIDInsensitively(input string) (*SourceContro } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_get.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_get.go index 867cf4899fc..02a68185a64 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_get.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobStreamsClient) Get(ctx context.Context, id SourceCon var model SourceControlSyncJobStreamById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go index fe82bd504e4..11bad046f50 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go @@ -39,6 +39,7 @@ func (o ListBySyncJobOperationOptions) ToHeaders() *client.Headers { func (o ListBySyncJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/version.go b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/version.go index 59c5d731491..be34bd315b0 100644 --- a/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/version.go +++ b/resource-manager/automation/2019-06-01/sourcecontrolsyncjobstreams/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjobstreams -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/statistics/README.md b/resource-manager/automation/2019-06-01/statistics/README.md index e6f27b09845..8519cbbfe7d 100644 --- a/resource-manager/automation/2019-06-01/statistics/README.md +++ b/resource-manager/automation/2019-06-01/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/statistics/client.go b/resource-manager/automation/2019-06-01/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2019-06-01/statistics/client.go +++ b/resource-manager/automation/2019-06-01/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/statistics/id_automationaccount.go b/resource-manager/automation/2019-06-01/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2019-06-01/statistics/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2019-06-01/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/statistics/version.go b/resource-manager/automation/2019-06-01/statistics/version.go index 316a997793a..f631c515524 100644 --- a/resource-manager/automation/2019-06-01/statistics/version.go +++ b/resource-manager/automation/2019-06-01/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/testjob/README.md b/resource-manager/automation/2019-06-01/testjob/README.md index 752b634f2b6..bd6482b4198 100644 --- a/resource-manager/automation/2019-06-01/testjob/README.md +++ b/resource-manager/automation/2019-06-01/testjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/testjob` Documentation -The `testjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `testjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/testjob/client.go b/resource-manager/automation/2019-06-01/testjob/client.go index 948c5b62e0b..42bf971c6be 100644 --- a/resource-manager/automation/2019-06-01/testjob/client.go +++ b/resource-manager/automation/2019-06-01/testjob/client.go @@ -15,7 +15,7 @@ type TestJobClient struct { } func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/testjob/id_runbook.go b/resource-manager/automation/2019-06-01/testjob/id_runbook.go index f8a57f87058..8989fb2b0e0 100644 --- a/resource-manager/automation/2019-06-01/testjob/id_runbook.go +++ b/resource-manager/automation/2019-06-01/testjob/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/testjob/method_create.go b/resource-manager/automation/2019-06-01/testjob/method_create.go index 7beb9fc0ab0..7e6ae18000f 100644 --- a/resource-manager/automation/2019-06-01/testjob/method_create.go +++ b/resource-manager/automation/2019-06-01/testjob/method_create.go @@ -50,7 +50,6 @@ func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCr var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/testjob/method_get.go b/resource-manager/automation/2019-06-01/testjob/method_get.go index be79f45aad2..911a70d9f03 100644 --- a/resource-manager/automation/2019-06-01/testjob/method_get.go +++ b/resource-manager/automation/2019-06-01/testjob/method_get.go @@ -46,7 +46,6 @@ func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/testjob/version.go b/resource-manager/automation/2019-06-01/testjob/version.go index 4c48054ca57..5be231691b9 100644 --- a/resource-manager/automation/2019-06-01/testjob/version.go +++ b/resource-manager/automation/2019-06-01/testjob/version.go @@ -1,12 +1,10 @@ package testjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjob/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/testjobstream/README.md b/resource-manager/automation/2019-06-01/testjobstream/README.md index 1466efd5107..e33b926f1ef 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/README.md +++ b/resource-manager/automation/2019-06-01/testjobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/testjobstream` Documentation -The `testjobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `testjobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/testjobstream/client.go b/resource-manager/automation/2019-06-01/testjobstream/client.go index b14681e53c2..7e656f450c0 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/client.go +++ b/resource-manager/automation/2019-06-01/testjobstream/client.go @@ -15,7 +15,7 @@ type TestJobStreamClient struct { } func NewTestJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/testjobstream/id_runbook.go b/resource-manager/automation/2019-06-01/testjobstream/id_runbook.go index 319f52ebaad..cb971105f88 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/id_runbook.go +++ b/resource-manager/automation/2019-06-01/testjobstream/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/testjobstream/id_testjobstream.go b/resource-manager/automation/2019-06-01/testjobstream/id_testjobstream.go index 0ebc73ded87..09b3674344b 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/id_testjobstream.go +++ b/resource-manager/automation/2019-06-01/testjobstream/id_testjobstream.go @@ -46,7 +46,7 @@ func ParseTestJobStreamID(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTestJobStreamIDInsensitively(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/testjobstream/method_get.go b/resource-manager/automation/2019-06-01/testjobstream/method_get.go index b94e2e9b62a..78292836ec2 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/method_get.go +++ b/resource-manager/automation/2019-06-01/testjobstream/method_get.go @@ -45,7 +45,6 @@ func (c TestJobStreamClient) Get(ctx context.Context, id TestJobStreamId) (resul var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/testjobstream/method_listbytestjob.go b/resource-manager/automation/2019-06-01/testjobstream/method_listbytestjob.go index 0c69bca0921..4898fc0bab9 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/method_listbytestjob.go +++ b/resource-manager/automation/2019-06-01/testjobstream/method_listbytestjob.go @@ -39,6 +39,7 @@ func (o ListByTestJobOperationOptions) ToHeaders() *client.Headers { func (o ListByTestJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/testjobstream/version.go b/resource-manager/automation/2019-06-01/testjobstream/version.go index c89793f9950..4568b18b5d7 100644 --- a/resource-manager/automation/2019-06-01/testjobstream/version.go +++ b/resource-manager/automation/2019-06-01/testjobstream/version.go @@ -1,12 +1,10 @@ package testjobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjobstream/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/typefields/README.md b/resource-manager/automation/2019-06-01/typefields/README.md index a5b372582c5..b55f45b0614 100644 --- a/resource-manager/automation/2019-06-01/typefields/README.md +++ b/resource-manager/automation/2019-06-01/typefields/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/typefields` Documentation -The `typefields` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `typefields` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/typefields/client.go b/resource-manager/automation/2019-06-01/typefields/client.go index e235fbc854f..d2929448756 100644 --- a/resource-manager/automation/2019-06-01/typefields/client.go +++ b/resource-manager/automation/2019-06-01/typefields/client.go @@ -15,7 +15,7 @@ type TypeFieldsClient struct { } func NewTypeFieldsClientWithBaseURI(sdkApi sdkEnv.Api) (*TypeFieldsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "typefields", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "typefields", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TypeFieldsClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/typefields/id_type.go b/resource-manager/automation/2019-06-01/typefields/id_type.go index 834ea978a07..e7ebc51ea54 100644 --- a/resource-manager/automation/2019-06-01/typefields/id_type.go +++ b/resource-manager/automation/2019-06-01/typefields/id_type.go @@ -46,7 +46,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/typefields/method_fieldslistbytype.go b/resource-manager/automation/2019-06-01/typefields/method_fieldslistbytype.go index 03945e9f500..18ca75f1933 100644 --- a/resource-manager/automation/2019-06-01/typefields/method_fieldslistbytype.go +++ b/resource-manager/automation/2019-06-01/typefields/method_fieldslistbytype.go @@ -46,7 +46,6 @@ func (c TypeFieldsClient) FieldsListByType(ctx context.Context, id TypeId) (resu var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/typefields/version.go b/resource-manager/automation/2019-06-01/typefields/version.go index 65dd4547722..84646b18954 100644 --- a/resource-manager/automation/2019-06-01/typefields/version.go +++ b/resource-manager/automation/2019-06-01/typefields/version.go @@ -1,12 +1,10 @@ package typefields -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/typefields/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/typefields/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/usages/README.md b/resource-manager/automation/2019-06-01/usages/README.md index 03d4cb1e267..ce6e1f336a9 100644 --- a/resource-manager/automation/2019-06-01/usages/README.md +++ b/resource-manager/automation/2019-06-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/usages/client.go b/resource-manager/automation/2019-06-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2019-06-01/usages/client.go +++ b/resource-manager/automation/2019-06-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/usages/id_automationaccount.go b/resource-manager/automation/2019-06-01/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2019-06-01/usages/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/usages/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2019-06-01/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/usages/version.go b/resource-manager/automation/2019-06-01/usages/version.go index ab8e565a246..ab8734cd299 100644 --- a/resource-manager/automation/2019-06-01/usages/version.go +++ b/resource-manager/automation/2019-06-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/variable/README.md b/resource-manager/automation/2019-06-01/variable/README.md index 5c2df025b51..0624a82a0ab 100644 --- a/resource-manager/automation/2019-06-01/variable/README.md +++ b/resource-manager/automation/2019-06-01/variable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/variable` Documentation -The `variable` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `variable` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/variable/client.go b/resource-manager/automation/2019-06-01/variable/client.go index b52efe661a6..8e293b273f0 100644 --- a/resource-manager/automation/2019-06-01/variable/client.go +++ b/resource-manager/automation/2019-06-01/variable/client.go @@ -15,7 +15,7 @@ type VariableClient struct { } func NewVariableClientWithBaseURI(sdkApi sdkEnv.Api) (*VariableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "variable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "variable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VariableClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/variable/id_automationaccount.go b/resource-manager/automation/2019-06-01/variable/id_automationaccount.go index 635e56dfae8..09be4df2a66 100644 --- a/resource-manager/automation/2019-06-01/variable/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/variable/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/variable/id_variable.go b/resource-manager/automation/2019-06-01/variable/id_variable.go index aab429f68a4..63f8c9328fc 100644 --- a/resource-manager/automation/2019-06-01/variable/id_variable.go +++ b/resource-manager/automation/2019-06-01/variable/id_variable.go @@ -44,7 +44,7 @@ func ParseVariableID(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/variable/method_createorupdate.go b/resource-manager/automation/2019-06-01/variable/method_createorupdate.go index 7f1d31eeacc..35a90d4c131 100644 --- a/resource-manager/automation/2019-06-01/variable/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/variable/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VariableClient) CreateOrUpdate(ctx context.Context, id VariableId, input var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/variable/method_get.go b/resource-manager/automation/2019-06-01/variable/method_get.go index a84e304f5a0..6d865e8141f 100644 --- a/resource-manager/automation/2019-06-01/variable/method_get.go +++ b/resource-manager/automation/2019-06-01/variable/method_get.go @@ -45,7 +45,6 @@ func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOpera var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/variable/method_update.go b/resource-manager/automation/2019-06-01/variable/method_update.go index cba7dfa356a..d63d977348b 100644 --- a/resource-manager/automation/2019-06-01/variable/method_update.go +++ b/resource-manager/automation/2019-06-01/variable/method_update.go @@ -49,7 +49,6 @@ func (c VariableClient) Update(ctx context.Context, id VariableId, input Variabl var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/variable/version.go b/resource-manager/automation/2019-06-01/variable/version.go index 192d2b61e81..82ec0054a6a 100644 --- a/resource-manager/automation/2019-06-01/variable/version.go +++ b/resource-manager/automation/2019-06-01/variable/version.go @@ -1,12 +1,10 @@ package variable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/variable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/variable/2019-06-01" } diff --git a/resource-manager/automation/2019-06-01/watcher/README.md b/resource-manager/automation/2019-06-01/watcher/README.md index f576d3fe962..dabfdcf096f 100644 --- a/resource-manager/automation/2019-06-01/watcher/README.md +++ b/resource-manager/automation/2019-06-01/watcher/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2019-06-01/watcher` Documentation -The `watcher` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2019-06-01`). +The `watcher` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2019-06-01/watcher/client.go b/resource-manager/automation/2019-06-01/watcher/client.go index 410df5cc6de..97956dd3b49 100644 --- a/resource-manager/automation/2019-06-01/watcher/client.go +++ b/resource-manager/automation/2019-06-01/watcher/client.go @@ -15,7 +15,7 @@ type WatcherClient struct { } func NewWatcherClientWithBaseURI(sdkApi sdkEnv.Api) (*WatcherClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watcher", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watcher", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatcherClient: %+v", err) } diff --git a/resource-manager/automation/2019-06-01/watcher/id_automationaccount.go b/resource-manager/automation/2019-06-01/watcher/id_automationaccount.go index 5bb6a32656c..55c832e03ac 100644 --- a/resource-manager/automation/2019-06-01/watcher/id_automationaccount.go +++ b/resource-manager/automation/2019-06-01/watcher/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/watcher/id_watcher.go b/resource-manager/automation/2019-06-01/watcher/id_watcher.go index 5ee526661d5..67219fd6633 100644 --- a/resource-manager/automation/2019-06-01/watcher/id_watcher.go +++ b/resource-manager/automation/2019-06-01/watcher/id_watcher.go @@ -44,7 +44,7 @@ func ParseWatcherID(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatcherIDInsensitively(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2019-06-01/watcher/method_createorupdate.go b/resource-manager/automation/2019-06-01/watcher/method_createorupdate.go index de1bd15ae0f..80fb2527d8f 100644 --- a/resource-manager/automation/2019-06-01/watcher/method_createorupdate.go +++ b/resource-manager/automation/2019-06-01/watcher/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatcherClient) CreateOrUpdate(ctx context.Context, id WatcherId, input W var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/watcher/method_get.go b/resource-manager/automation/2019-06-01/watcher/method_get.go index 399e6b731f9..5578b8b1938 100644 --- a/resource-manager/automation/2019-06-01/watcher/method_get.go +++ b/resource-manager/automation/2019-06-01/watcher/method_get.go @@ -45,7 +45,6 @@ func (c WatcherClient) Get(ctx context.Context, id WatcherId) (result GetOperati var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/watcher/method_listbyautomationaccount.go b/resource-manager/automation/2019-06-01/watcher/method_listbyautomationaccount.go index b0f573fbe51..dad46ab1f35 100644 --- a/resource-manager/automation/2019-06-01/watcher/method_listbyautomationaccount.go +++ b/resource-manager/automation/2019-06-01/watcher/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2019-06-01/watcher/method_update.go b/resource-manager/automation/2019-06-01/watcher/method_update.go index baa7b92a1f4..02103fa5b5b 100644 --- a/resource-manager/automation/2019-06-01/watcher/method_update.go +++ b/resource-manager/automation/2019-06-01/watcher/method_update.go @@ -49,7 +49,6 @@ func (c WatcherClient) Update(ctx context.Context, id WatcherId, input WatcherUp var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2019-06-01/watcher/version.go b/resource-manager/automation/2019-06-01/watcher/version.go index df69630bac2..8d4ae1f085d 100644 --- a/resource-manager/automation/2019-06-01/watcher/version.go +++ b/resource-manager/automation/2019-06-01/watcher/version.go @@ -1,12 +1,10 @@ package watcher -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watcher/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watcher/2019-06-01" } diff --git a/resource-manager/automation/2020-01-13-preview/activity/README.md b/resource-manager/automation/2020-01-13-preview/activity/README.md index 84370c12e38..25a4e4e3f76 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/README.md +++ b/resource-manager/automation/2020-01-13-preview/activity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/activity` Documentation -The `activity` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `activity` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/activity/client.go b/resource-manager/automation/2020-01-13-preview/activity/client.go index 0142d55ea1f..7e366361ec1 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/client.go +++ b/resource-manager/automation/2020-01-13-preview/activity/client.go @@ -15,7 +15,7 @@ type ActivityClient struct { } func NewActivityClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/activity/id_activity.go b/resource-manager/automation/2020-01-13-preview/activity/id_activity.go index 87b1df1f763..545b302d28e 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/id_activity.go +++ b/resource-manager/automation/2020-01-13-preview/activity/id_activity.go @@ -46,7 +46,7 @@ func ParseActivityID(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/activity/id_module.go b/resource-manager/automation/2020-01-13-preview/activity/id_module.go index 2c22f0316ae..48065b72334 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/id_module.go +++ b/resource-manager/automation/2020-01-13-preview/activity/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/activity/method_get.go b/resource-manager/automation/2020-01-13-preview/activity/method_get.go index d91dc4e2e43..c212d18aab0 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/activity/method_get.go @@ -45,7 +45,6 @@ func (c ActivityClient) Get(ctx context.Context, id ActivityId) (result GetOpera var model Activity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/activity/version.go b/resource-manager/automation/2020-01-13-preview/activity/version.go index eae1b0d9faa..fa6de6787b9 100644 --- a/resource-manager/automation/2020-01-13-preview/activity/version.go +++ b/resource-manager/automation/2020-01-13-preview/activity/version.go @@ -1,12 +1,10 @@ package activity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activity/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/README.md b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/README.md index 8b3dd057485..fe66161263f 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/README.md +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/agentregistrationinformation` Documentation -The `agentregistrationinformation` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `agentregistrationinformation` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/client.go b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/client.go index c13906095ef..a90dc569c80 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/client.go +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/client.go @@ -15,7 +15,7 @@ type AgentRegistrationInformationClient struct { } func NewAgentRegistrationInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentRegistrationInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentregistrationinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentregistrationinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentRegistrationInformationClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/id_automationaccount.go index 5ec36ff3845..3532f9712de 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_get.go b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_get.go index 95539ac551e..d385b7e7d61 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_get.go @@ -46,7 +46,6 @@ func (c AgentRegistrationInformationClient) Get(ctx context.Context, id Automati var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_regeneratekey.go b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_regeneratekey.go index 261eb28919f..4f4e5f62875 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_regeneratekey.go +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, i var model AgentRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/version.go b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/version.go index 0c0d49c4e4b..f56792244f8 100644 --- a/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/version.go +++ b/resource-manager/automation/2020-01-13-preview/agentregistrationinformation/version.go @@ -1,12 +1,10 @@ package agentregistrationinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentregistrationinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentregistrationinformation/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/README.md b/resource-manager/automation/2020-01-13-preview/automationaccount/README.md index eaa9d0c05b6..c6bb1bcec4f 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/README.md +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/client.go b/resource-manager/automation/2020-01-13-preview/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/client.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/method_get.go b/resource-manager/automation/2020-01-13-preview/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/method_update.go b/resource-manager/automation/2020-01-13-preview/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/automationaccount/version.go b/resource-manager/automation/2020-01-13-preview/automationaccount/version.go index ea8e9266690..fc128514422 100644 --- a/resource-manager/automation/2020-01-13-preview/automationaccount/version.go +++ b/resource-manager/automation/2020-01-13-preview/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/README.md b/resource-manager/automation/2020-01-13-preview/certificate/README.md index 0a63af5cf72..45827de7084 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/README.md +++ b/resource-manager/automation/2020-01-13-preview/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `certificate` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/certificate/client.go b/resource-manager/automation/2020-01-13-preview/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/client.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/certificate/id_automationaccount.go index 29c8860dc29..e5efa36aa52 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/id_certificate.go b/resource-manager/automation/2020-01-13-preview/certificate/id_certificate.go index 6ab72756d10..7d31e9ea831 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/id_certificate.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/certificate/method_createorupdate.go index 0b944c57e50..1e5de85afb2 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/method_get.go b/resource-manager/automation/2020-01-13-preview/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/method_update.go b/resource-manager/automation/2020-01-13-preview/certificate/method_update.go index 6fbe2d4a340..b4c51d673ad 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/method_update.go @@ -49,7 +49,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/certificate/version.go b/resource-manager/automation/2020-01-13-preview/certificate/version.go index 30c9b27f5fb..a950572c823 100644 --- a/resource-manager/automation/2020-01-13-preview/certificate/version.go +++ b/resource-manager/automation/2020-01-13-preview/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/connection/README.md b/resource-manager/automation/2020-01-13-preview/connection/README.md index 54e8b357c4c..48d16311af7 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/README.md +++ b/resource-manager/automation/2020-01-13-preview/connection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/connection` Documentation -The `connection` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `connection` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/connection/client.go b/resource-manager/automation/2020-01-13-preview/connection/client.go index 3f066e2e653..0c3f5a2848b 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/client.go +++ b/resource-manager/automation/2020-01-13-preview/connection/client.go @@ -15,7 +15,7 @@ type ConnectionClient struct { } func NewConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/connection/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/connection/id_automationaccount.go index ec1aaa6092f..304d6566f3f 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/connection/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/connection/id_connection.go b/resource-manager/automation/2020-01-13-preview/connection/id_connection.go index 6ec1093cd2b..0e6c2604874 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/id_connection.go +++ b/resource-manager/automation/2020-01-13-preview/connection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/connection/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/connection/method_createorupdate.go index b1f0dd9e309..b6f6f47e462 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/connection/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionClient) CreateOrUpdate(ctx context.Context, id ConnectionId, i var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/connection/method_get.go b/resource-manager/automation/2020-01-13-preview/connection/method_get.go index 16d9f30e8c8..602490999ff 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/connection/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionClient) Get(ctx context.Context, id ConnectionId) (result GetO var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/connection/method_update.go b/resource-manager/automation/2020-01-13-preview/connection/method_update.go index 1c57761fbc1..11dff660df6 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/connection/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionClient) Update(ctx context.Context, id ConnectionId, input Con var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/connection/version.go b/resource-manager/automation/2020-01-13-preview/connection/version.go index 564c30f5c6b..defad797b68 100644 --- a/resource-manager/automation/2020-01-13-preview/connection/version.go +++ b/resource-manager/automation/2020-01-13-preview/connection/version.go @@ -1,12 +1,10 @@ package connection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connection/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/README.md b/resource-manager/automation/2020-01-13-preview/connectiontype/README.md index 76605eb1224..7d18351485c 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/README.md +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/connectiontype` Documentation -The `connectiontype` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `connectiontype` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/client.go b/resource-manager/automation/2020-01-13-preview/connectiontype/client.go index c5cc541fae3..bd83ae0611a 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/client.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/client.go @@ -15,7 +15,7 @@ type ConnectionTypeClient struct { } func NewConnectionTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiontype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiontype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionTypeClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/connectiontype/id_automationaccount.go index 3f9b9b3fc08..90cd0ad2006 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/id_connectiontype.go b/resource-manager/automation/2020-01-13-preview/connectiontype/id_connectiontype.go index 6fb2d1c07b2..3945becf946 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/id_connectiontype.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/connectiontype/method_createorupdate.go index 9733a9a7c13..b5482180669 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectionTypeClient) CreateOrUpdate(ctx context.Context, id ConnectionT var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/method_get.go b/resource-manager/automation/2020-01-13-preview/connectiontype/method_get.go index 54be67f6226..f4bc697608c 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionTypeClient) Get(ctx context.Context, id ConnectionTypeId) (res var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/connectiontype/version.go b/resource-manager/automation/2020-01-13-preview/connectiontype/version.go index d40c2a1b282..a7e60dd9bb9 100644 --- a/resource-manager/automation/2020-01-13-preview/connectiontype/version.go +++ b/resource-manager/automation/2020-01-13-preview/connectiontype/version.go @@ -1,12 +1,10 @@ package connectiontype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiontype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiontype/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/credential/README.md b/resource-manager/automation/2020-01-13-preview/credential/README.md index 52e5ee858f7..12969e4c6c6 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/README.md +++ b/resource-manager/automation/2020-01-13-preview/credential/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/credential` Documentation -The `credential` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `credential` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/credential/client.go b/resource-manager/automation/2020-01-13-preview/credential/client.go index 2e36e15446b..52f1e66c317 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/client.go +++ b/resource-manager/automation/2020-01-13-preview/credential/client.go @@ -15,7 +15,7 @@ type CredentialClient struct { } func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credential", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credential", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/credential/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/credential/id_automationaccount.go index 173accecf18..d363cf9c0b2 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/credential/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/credential/id_credential.go b/resource-manager/automation/2020-01-13-preview/credential/id_credential.go index 7e4319efe94..6b4b028d5fd 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/id_credential.go +++ b/resource-manager/automation/2020-01-13-preview/credential/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/credential/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/credential/method_createorupdate.go index 046ed79f991..2c5f73f9dfe 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/credential/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CredentialClient) CreateOrUpdate(ctx context.Context, id CredentialId, i var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/credential/method_get.go b/resource-manager/automation/2020-01-13-preview/credential/method_get.go index f9008350a37..225e47cfe42 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/credential/method_get.go @@ -45,7 +45,6 @@ func (c CredentialClient) Get(ctx context.Context, id CredentialId) (result GetO var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/credential/method_update.go b/resource-manager/automation/2020-01-13-preview/credential/method_update.go index bb2022825d5..da04941cd11 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/credential/method_update.go @@ -49,7 +49,6 @@ func (c CredentialClient) Update(ctx context.Context, id CredentialId, input Cre var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/credential/version.go b/resource-manager/automation/2020-01-13-preview/credential/version.go index 21b9f194a09..336388f0430 100644 --- a/resource-manager/automation/2020-01-13-preview/credential/version.go +++ b/resource-manager/automation/2020-01-13-preview/credential/version.go @@ -1,12 +1,10 @@ package credential -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credential/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credential/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/README.md b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/README.md index 94c074727e1..361423939cd 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/README.md +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/dsccompilationjob` Documentation -The `dsccompilationjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `dsccompilationjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/client.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/client.go index aa29e7e1f2c..b1d76b50f8d 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/client.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/client.go @@ -15,7 +15,7 @@ type DscCompilationJobClient struct { } func NewDscCompilationJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DscCompilationJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dsccompilationjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dsccompilationjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscCompilationJobClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_automationaccount.go index b80e8f1f79d..178c3a7eb93 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_stream.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_stream.go index 873c243a602..3f735c4b669 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_stream.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/id_stream.go @@ -46,7 +46,7 @@ func ParseStreamID(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_get.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_get.go index 4562f128bf8..dc7a415772e 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_get.go @@ -46,7 +46,6 @@ func (c DscCompilationJobClient) Get(ctx context.Context, id commonids.Automatio var model DscCompilationJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_getstream.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_getstream.go index eec4add1bc4..25abc360bbc 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_getstream.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_getstream.go @@ -45,7 +45,6 @@ func (c DscCompilationJobClient) GetStream(ctx context.Context, id StreamId) (re var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_listbyautomationaccount.go index 5ea430161ee..5fdbfb376ea 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/version.go b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/version.go index 61b9e2ab612..9e0b8dfb83e 100644 --- a/resource-manager/automation/2020-01-13-preview/dsccompilationjob/version.go +++ b/resource-manager/automation/2020-01-13-preview/dsccompilationjob/version.go @@ -1,12 +1,10 @@ package dsccompilationjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dsccompilationjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dsccompilationjob/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/README.md b/resource-manager/automation/2020-01-13-preview/dscnode/README.md index c1c45af52d6..015b86b78e5 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/README.md +++ b/resource-manager/automation/2020-01-13-preview/dscnode/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/dscnode` Documentation -The `dscnode` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `dscnode` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/client.go b/resource-manager/automation/2020-01-13-preview/dscnode/client.go index e7b2638a025..a680965c12d 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/client.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/client.go @@ -15,7 +15,7 @@ type DscNodeClient struct { } func NewDscNodeClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnode", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnode", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/dscnode/id_automationaccount.go index 7d470e8c389..2688083e51f 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/id_node.go b/resource-manager/automation/2020-01-13-preview/dscnode/id_node.go index d999c8c6067..b9b36665141 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/id_node.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/method_get.go b/resource-manager/automation/2020-01-13-preview/dscnode/method_get.go index 6173eb3ebb3..9ba3ab23a79 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeClient) Get(ctx context.Context, id NodeId) (result GetOperationR var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/dscnode/method_listbyautomationaccount.go index 7c722bfd18a..afce4f82b2a 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/method_update.go b/resource-manager/automation/2020-01-13-preview/dscnode/method_update.go index 62c2c0e286c..44011e51c99 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/method_update.go @@ -49,7 +49,6 @@ func (c DscNodeClient) Update(ctx context.Context, id NodeId, input DscNodeUpdat var model DscNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/dscnode/version.go b/resource-manager/automation/2020-01-13-preview/dscnode/version.go index 2c426433fb3..f1536a1eefd 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnode/version.go +++ b/resource-manager/automation/2020-01-13-preview/dscnode/version.go @@ -1,12 +1,10 @@ package dscnode -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnode/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnode/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/README.md b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/README.md index 5736d9a6110..47b1c913706 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/README.md +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration` Documentation -The `dscnodeconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `dscnodeconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/client.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/client.go index 60e2159464d..d9d09f3a59d 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/client.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/client.go @@ -15,7 +15,7 @@ type DscNodeConfigurationClient struct { } func NewDscNodeConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_automationaccount.go index 2857bb759ef..5320db63946 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_nodeconfiguration.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_nodeconfiguration.go index 55f9ef787e5..a79bf5fcc78 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_nodeconfiguration.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_get.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_get.go index 3971e32ad95..09e5cef4f75 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeConfigurationClient) Get(ctx context.Context, id NodeConfiguratio var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_listbyautomationaccount.go index 707c87a2ebc..cd9762499e3 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/version.go b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/version.go index 2b5abc2a90b..19db1f1d22a 100644 --- a/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/version.go +++ b/resource-manager/automation/2020-01-13-preview/dscnodeconfiguration/version.go @@ -1,12 +1,10 @@ package dscnodeconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnodeconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnodeconfiguration/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/README.md b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/README.md index c50581d4802..ab8f6582bac 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/client.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_update.go index d0b185d9792..d2ae1c1cd4e 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/version.go b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/version.go index b8eebf8ea45..132e6dd6439 100644 --- a/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2020-01-13-preview/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/README.md b/resource-manager/automation/2020-01-13-preview/jobschedule/README.md index 8ff05322430..10555b084cb 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/README.md +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/jobschedule` Documentation -The `jobschedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `jobschedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/client.go b/resource-manager/automation/2020-01-13-preview/jobschedule/client.go index 4c9fb976839..18a0e89bd37 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/client.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/client.go @@ -15,7 +15,7 @@ type JobScheduleClient struct { } func NewJobScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*JobScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/jobschedule/id_automationaccount.go index 330e6504743..e21e84913de 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/id_jobschedule.go b/resource-manager/automation/2020-01-13-preview/jobschedule/id_jobschedule.go index 9276d099eb3..896164a6098 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/id_jobschedule.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/id_jobschedule.go @@ -44,7 +44,7 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/method_create.go b/resource-manager/automation/2020-01-13-preview/jobschedule/method_create.go index 03831935824..676325e8c02 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/method_create.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/method_create.go @@ -49,7 +49,6 @@ func (c JobScheduleClient) Create(ctx context.Context, id JobScheduleId, input J var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/method_get.go b/resource-manager/automation/2020-01-13-preview/jobschedule/method_get.go index 0721b83e4be..913490c8175 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/method_get.go @@ -45,7 +45,6 @@ func (c JobScheduleClient) Get(ctx context.Context, id JobScheduleId) (result Ge var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/jobschedule/method_listbyautomationaccount.go index 6b5c6412a83..74ee8cd52b4 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/jobschedule/version.go b/resource-manager/automation/2020-01-13-preview/jobschedule/version.go index dbf78bded69..f67f0fd5ba9 100644 --- a/resource-manager/automation/2020-01-13-preview/jobschedule/version.go +++ b/resource-manager/automation/2020-01-13-preview/jobschedule/version.go @@ -1,12 +1,10 @@ package jobschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobschedule/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/linkedworkspace/README.md b/resource-manager/automation/2020-01-13-preview/linkedworkspace/README.md index 93f4e97898d..b6427a2da12 100644 --- a/resource-manager/automation/2020-01-13-preview/linkedworkspace/README.md +++ b/resource-manager/automation/2020-01-13-preview/linkedworkspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/linkedworkspace` Documentation -The `linkedworkspace` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `linkedworkspace` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/linkedworkspace/client.go b/resource-manager/automation/2020-01-13-preview/linkedworkspace/client.go index 265eab06051..ce26bf57e1c 100644 --- a/resource-manager/automation/2020-01-13-preview/linkedworkspace/client.go +++ b/resource-manager/automation/2020-01-13-preview/linkedworkspace/client.go @@ -15,7 +15,7 @@ type LinkedWorkspaceClient struct { } func NewLinkedWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedWorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedworkspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedworkspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedWorkspaceClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/linkedworkspace/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/linkedworkspace/id_automationaccount.go index 33e45a35f32..897343bb6cd 100644 --- a/resource-manager/automation/2020-01-13-preview/linkedworkspace/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/linkedworkspace/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/linkedworkspace/method_get.go b/resource-manager/automation/2020-01-13-preview/linkedworkspace/method_get.go index 7ea3ca17eaf..7019324f5a3 100644 --- a/resource-manager/automation/2020-01-13-preview/linkedworkspace/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/linkedworkspace/method_get.go @@ -46,7 +46,6 @@ func (c LinkedWorkspaceClient) Get(ctx context.Context, id AutomationAccountId) var model LinkedWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/linkedworkspace/version.go b/resource-manager/automation/2020-01-13-preview/linkedworkspace/version.go index 1912ca3d0f5..6506be0c5fd 100644 --- a/resource-manager/automation/2020-01-13-preview/linkedworkspace/version.go +++ b/resource-manager/automation/2020-01-13-preview/linkedworkspace/version.go @@ -1,12 +1,10 @@ package linkedworkspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedworkspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedworkspace/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/listkeys/README.md b/resource-manager/automation/2020-01-13-preview/listkeys/README.md index 3255941db2c..2842ef5996c 100644 --- a/resource-manager/automation/2020-01-13-preview/listkeys/README.md +++ b/resource-manager/automation/2020-01-13-preview/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/listkeys/client.go b/resource-manager/automation/2020-01-13-preview/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2020-01-13-preview/listkeys/client.go +++ b/resource-manager/automation/2020-01-13-preview/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/listkeys/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2020-01-13-preview/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2020-01-13-preview/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/listkeys/version.go b/resource-manager/automation/2020-01-13-preview/listkeys/version.go index efa6e4a2c40..2f2a71f81aa 100644 --- a/resource-manager/automation/2020-01-13-preview/listkeys/version.go +++ b/resource-manager/automation/2020-01-13-preview/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/module/README.md b/resource-manager/automation/2020-01-13-preview/module/README.md index eca075d3fe5..3a549d8bf2c 100644 --- a/resource-manager/automation/2020-01-13-preview/module/README.md +++ b/resource-manager/automation/2020-01-13-preview/module/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/module` Documentation -The `module` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `module` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/module/client.go b/resource-manager/automation/2020-01-13-preview/module/client.go index b187a9525a7..88bab05b01d 100644 --- a/resource-manager/automation/2020-01-13-preview/module/client.go +++ b/resource-manager/automation/2020-01-13-preview/module/client.go @@ -15,7 +15,7 @@ type ModuleClient struct { } func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "module", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "module", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModuleClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/module/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/module/id_automationaccount.go index d884ddf6d14..076be0860db 100644 --- a/resource-manager/automation/2020-01-13-preview/module/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/module/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/module/id_module.go b/resource-manager/automation/2020-01-13-preview/module/id_module.go index d43369de67b..6712f38e7db 100644 --- a/resource-manager/automation/2020-01-13-preview/module/id_module.go +++ b/resource-manager/automation/2020-01-13-preview/module/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/module/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/module/method_createorupdate.go index 8f2b497f448..009eca3b71e 100644 --- a/resource-manager/automation/2020-01-13-preview/module/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/module/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) CreateOrUpdate(ctx context.Context, id ModuleId, input Mod var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/module/method_get.go b/resource-manager/automation/2020-01-13-preview/module/method_get.go index dda1e7d6fe3..f1bb9268515 100644 --- a/resource-manager/automation/2020-01-13-preview/module/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/module/method_get.go @@ -45,7 +45,6 @@ func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperation var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/module/method_update.go b/resource-manager/automation/2020-01-13-preview/module/method_update.go index 7ea24e33455..b8d0e37337e 100644 --- a/resource-manager/automation/2020-01-13-preview/module/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/module/method_update.go @@ -49,7 +49,6 @@ func (c ModuleClient) Update(ctx context.Context, id ModuleId, input ModuleUpdat var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/module/version.go b/resource-manager/automation/2020-01-13-preview/module/version.go index d2002ebfd0d..2a33207e261 100644 --- a/resource-manager/automation/2020-01-13-preview/module/version.go +++ b/resource-manager/automation/2020-01-13-preview/module/version.go @@ -1,12 +1,10 @@ package module -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/module/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/module/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/nodecountinformation/README.md b/resource-manager/automation/2020-01-13-preview/nodecountinformation/README.md index 39c6b2bfb33..926d3733d1a 100644 --- a/resource-manager/automation/2020-01-13-preview/nodecountinformation/README.md +++ b/resource-manager/automation/2020-01-13-preview/nodecountinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/nodecountinformation` Documentation -The `nodecountinformation` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `nodecountinformation` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/nodecountinformation/client.go b/resource-manager/automation/2020-01-13-preview/nodecountinformation/client.go index 086fcf345ff..adc7e085e29 100644 --- a/resource-manager/automation/2020-01-13-preview/nodecountinformation/client.go +++ b/resource-manager/automation/2020-01-13-preview/nodecountinformation/client.go @@ -15,7 +15,7 @@ type NodeCountInformationClient struct { } func NewNodeCountInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeCountInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodecountinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodecountinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeCountInformationClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/nodecountinformation/id_counttype.go b/resource-manager/automation/2020-01-13-preview/nodecountinformation/id_counttype.go index 55845ed4756..a69be60fa22 100644 --- a/resource-manager/automation/2020-01-13-preview/nodecountinformation/id_counttype.go +++ b/resource-manager/automation/2020-01-13-preview/nodecountinformation/id_counttype.go @@ -44,7 +44,7 @@ func ParseCountTypeID(input string) (*CountTypeId, error) { } id := CountTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCountTypeIDInsensitively(input string) (*CountTypeId, error) { } id := CountTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/nodecountinformation/method_get.go b/resource-manager/automation/2020-01-13-preview/nodecountinformation/method_get.go index bcf977cdeed..2829bb8f183 100644 --- a/resource-manager/automation/2020-01-13-preview/nodecountinformation/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/nodecountinformation/method_get.go @@ -45,7 +45,6 @@ func (c NodeCountInformationClient) Get(ctx context.Context, id CountTypeId) (re var model NodeCounts result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/nodecountinformation/version.go b/resource-manager/automation/2020-01-13-preview/nodecountinformation/version.go index 40fa01c99cd..ca29a4af74f 100644 --- a/resource-manager/automation/2020-01-13-preview/nodecountinformation/version.go +++ b/resource-manager/automation/2020-01-13-preview/nodecountinformation/version.go @@ -1,12 +1,10 @@ package nodecountinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodecountinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodecountinformation/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/README.md b/resource-manager/automation/2020-01-13-preview/nodereports/README.md index deb89557928..7f6802ef400 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/README.md +++ b/resource-manager/automation/2020-01-13-preview/nodereports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/nodereports` Documentation -The `nodereports` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `nodereports` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/client.go b/resource-manager/automation/2020-01-13-preview/nodereports/client.go index ad5e962fdc5..e9727b9a4e6 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/client.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/client.go @@ -15,7 +15,7 @@ type NodeReportsClient struct { } func NewNodeReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodereports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodereports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeReportsClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/id_node.go b/resource-manager/automation/2020-01-13-preview/nodereports/id_node.go index 9060e060e62..900d3c89f46 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/id_node.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/id_node.go @@ -44,7 +44,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/id_report.go b/resource-manager/automation/2020-01-13-preview/nodereports/id_report.go index 6d6949c5cdb..7af3c76d3bf 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/id_report.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/method_get.go b/resource-manager/automation/2020-01-13-preview/nodereports/method_get.go index bd281fc95ac..aa4b5f00aa5 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/method_get.go @@ -45,7 +45,6 @@ func (c NodeReportsClient) Get(ctx context.Context, id ReportId) (result GetOper var model DscNodeReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/method_getcontent.go b/resource-manager/automation/2020-01-13-preview/nodereports/method_getcontent.go index 11a0fe2a90f..c52c1259d38 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/method_getcontent.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/method_getcontent.go @@ -46,7 +46,6 @@ func (c NodeReportsClient) GetContent(ctx context.Context, id ReportId) (result var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/method_listbynode.go b/resource-manager/automation/2020-01-13-preview/nodereports/method_listbynode.go index ebdc3271480..aae31249656 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/method_listbynode.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/method_listbynode.go @@ -39,6 +39,7 @@ func (o ListByNodeOperationOptions) ToHeaders() *client.Headers { func (o ListByNodeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/nodereports/version.go b/resource-manager/automation/2020-01-13-preview/nodereports/version.go index a8584a012c4..7f0d68b218d 100644 --- a/resource-manager/automation/2020-01-13-preview/nodereports/version.go +++ b/resource-manager/automation/2020-01-13-preview/nodereports/version.go @@ -1,12 +1,10 @@ package nodereports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodereports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodereports/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/README.md b/resource-manager/automation/2020-01-13-preview/objectdatatypes/README.md index 0598006016b..9096f0b2dea 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/README.md +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/objectdatatypes` Documentation -The `objectdatatypes` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `objectdatatypes` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/client.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/client.go index 7d8a79e5408..790cc0cc5b4 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/client.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/client.go @@ -15,7 +15,7 @@ type ObjectDataTypesClient struct { } func NewObjectDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectDataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectdatatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectdatatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectDataTypesClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_moduleobjectdatatype.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_moduleobjectdatatype.go index b47304ed896..e1a9a092d1b 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_moduleobjectdatatype.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_moduleobjectdatatype.go @@ -46,7 +46,7 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_objectdatatype.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_objectdatatype.go index e4bc22891bf..cabdf681636 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_objectdatatype.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/id_objectdatatype.go @@ -44,7 +44,7 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbymoduleandtype.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbymoduleandtype.go index 101a08ad9d6..be62b523193 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbymoduleandtype.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbymoduleandtype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, id var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbytype.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbytype.go index f42dd1234dd..7d47bc2e64f 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbytype.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/method_listfieldsbytype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByType(ctx context.Context, id ObjectDa var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/objectdatatypes/version.go b/resource-manager/automation/2020-01-13-preview/objectdatatypes/version.go index 390afef901b..493000218ca 100644 --- a/resource-manager/automation/2020-01-13-preview/objectdatatypes/version.go +++ b/resource-manager/automation/2020-01-13-preview/objectdatatypes/version.go @@ -1,12 +1,10 @@ package objectdatatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectdatatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectdatatypes/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/README.md b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/README.md index dc3135fb668..daf4ba7d537 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/README.md +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/client.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/client.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_automationaccount.go index 123438c90bc..b3046dfb1ff 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_privateendpointconnection.go index c3c3e39ab56..8069acb49a4 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_get.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_listbyautomationaccount.go index 6c4c6cf64bb..ec47c8d00f8 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByAutomationAccount(ctx context.Co var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/version.go b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/version.go index fb9a4e9a14f..98f79b07286 100644 --- a/resource-manager/automation/2020-01-13-preview/privateendpointconnections/version.go +++ b/resource-manager/automation/2020-01-13-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/privatelinkresources/README.md b/resource-manager/automation/2020-01-13-preview/privatelinkresources/README.md index 275a084c4ac..02b2a1806ea 100644 --- a/resource-manager/automation/2020-01-13-preview/privatelinkresources/README.md +++ b/resource-manager/automation/2020-01-13-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/privatelinkresources/client.go b/resource-manager/automation/2020-01-13-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/automation/2020-01-13-preview/privatelinkresources/client.go +++ b/resource-manager/automation/2020-01-13-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/privatelinkresources/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/privatelinkresources/id_automationaccount.go index de34200ca6e..2296b471cde 100644 --- a/resource-manager/automation/2020-01-13-preview/privatelinkresources/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/privatelinkresources/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/privatelinkresources/method_automation.go b/resource-manager/automation/2020-01-13-preview/privatelinkresources/method_automation.go index bd3fea76917..682743578e1 100644 --- a/resource-manager/automation/2020-01-13-preview/privatelinkresources/method_automation.go +++ b/resource-manager/automation/2020-01-13-preview/privatelinkresources/method_automation.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) Automation(ctx context.Context, id Automatio var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/privatelinkresources/version.go b/resource-manager/automation/2020-01-13-preview/privatelinkresources/version.go index 1ab04a59639..964350ad72f 100644 --- a/resource-manager/automation/2020-01-13-preview/privatelinkresources/version.go +++ b/resource-manager/automation/2020-01-13-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/README.md b/resource-manager/automation/2020-01-13-preview/python2package/README.md index 7f7a8b1c563..0a736eda3fe 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/README.md +++ b/resource-manager/automation/2020-01-13-preview/python2package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/python2package` Documentation -The `python2package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `python2package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/python2package/client.go b/resource-manager/automation/2020-01-13-preview/python2package/client.go index d152b292bb4..a605d8db5fa 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/client.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/client.go @@ -15,7 +15,7 @@ type Python2PackageClient struct { } func NewPython2PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python2PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python2package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python2package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python2PackageClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/python2package/id_automationaccount.go index b295de3890d..848a41f14ce 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/id_python2package.go b/resource-manager/automation/2020-01-13-preview/python2package/id_python2package.go index 0e739894a07..31cf288eff4 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/id_python2package.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/id_python2package.go @@ -44,7 +44,7 @@ func ParsePython2PackageID(input string) (*Python2PackageId, error) { } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython2PackageIDInsensitively(input string) (*Python2PackageId, error) } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/python2package/method_createorupdate.go index ab495e73043..be4b6be8e06 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/method_createorupdate.go @@ -50,7 +50,6 @@ func (c Python2PackageClient) CreateOrUpdate(ctx context.Context, id Python2Pack var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/method_get.go b/resource-manager/automation/2020-01-13-preview/python2package/method_get.go index 988270c3e38..8baec2126f4 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/method_get.go @@ -45,7 +45,6 @@ func (c Python2PackageClient) Get(ctx context.Context, id Python2PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/method_update.go b/resource-manager/automation/2020-01-13-preview/python2package/method_update.go index 7bb58cb1936..9b6e028b314 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/method_update.go @@ -49,7 +49,6 @@ func (c Python2PackageClient) Update(ctx context.Context, id Python2PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/python2package/version.go b/resource-manager/automation/2020-01-13-preview/python2package/version.go index 52002d8094a..a0eae8e4349 100644 --- a/resource-manager/automation/2020-01-13-preview/python2package/version.go +++ b/resource-manager/automation/2020-01-13-preview/python2package/version.go @@ -1,12 +1,10 @@ package python2package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python2package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python2package/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/README.md b/resource-manager/automation/2020-01-13-preview/schedule/README.md index 4a6f123cdce..8b203044c78 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/README.md +++ b/resource-manager/automation/2020-01-13-preview/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `schedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/schedule/client.go b/resource-manager/automation/2020-01-13-preview/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/client.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/schedule/id_automationaccount.go index 1758b466257..aa9a3610114 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/id_schedule.go b/resource-manager/automation/2020-01-13-preview/schedule/id_schedule.go index 944ad0227b2..9f76e20993e 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/id_schedule.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/schedule/method_createorupdate.go index 4263ac8b9f4..901aa1f4c94 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/method_get.go b/resource-manager/automation/2020-01-13-preview/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/method_update.go b/resource-manager/automation/2020-01-13-preview/schedule/method_update.go index c84276093ae..fbfab6d1144 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/schedule/version.go b/resource-manager/automation/2020-01-13-preview/schedule/version.go index d5b84233c66..146f66e1174 100644 --- a/resource-manager/automation/2020-01-13-preview/schedule/version.go +++ b/resource-manager/automation/2020-01-13-preview/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/README.md b/resource-manager/automation/2020-01-13-preview/sourcecontrol/README.md index 8b7f8d185b6..ed6c3c97eeb 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/README.md +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/sourcecontrol` Documentation -The `sourcecontrol` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `sourcecontrol` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/client.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/client.go index 5cc59fbc8dc..cf7d6d4d95c 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/client.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/client.go @@ -15,7 +15,7 @@ type SourceControlClient struct { } func NewSourceControlClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrol", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrol", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_automationaccount.go index 80fde88426a..f866cc6fd24 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_sourcecontrol.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_sourcecontrol.go index 1a333c90b2e..2e293367fa8 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_sourcecontrol.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_createorupdate.go index cd75063d722..470c526d512 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlClient) CreateOrUpdate(ctx context.Context, id SourceContro var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_get.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_get.go index db32fdf5036..435c74f2193 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlClient) Get(ctx context.Context, id SourceControlId) (resul var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_listbyautomationaccount.go index 9457e6a81fe..5872a01f8b8 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_update.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_update.go index f00032bbff7..e4265560f5c 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/method_update.go @@ -49,7 +49,6 @@ func (c SourceControlClient) Update(ctx context.Context, id SourceControlId, inp var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrol/version.go b/resource-manager/automation/2020-01-13-preview/sourcecontrol/version.go index 4c337e41dd8..8ebdc6bec0d 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrol/version.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrol/version.go @@ -1,12 +1,10 @@ package sourcecontrol -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrol/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrol/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/README.md b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/README.md index 1f5e164ced5..5517c76a45f 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/README.md +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob` Documentation -The `sourcecontrolsyncjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `sourcecontrolsyncjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/client.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/client.go index 380f8581c8f..f17a5fe03f6 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/client.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobClient struct { } func NewSourceControlSyncJobClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrol.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrol.go index 45a497aaac6..18ee5a36a2a 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrol.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go index c15f95859d0..356a9c95896 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_create.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_create.go index 07efd101947..afaa631c092 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_create.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_create.go @@ -49,7 +49,6 @@ func (c SourceControlSyncJobClient) Create(ctx context.Context, id SourceControl var model SourceControlSyncJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_get.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_get.go index 5cb3e1e56f9..f0a7ca3d15e 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobClient) Get(ctx context.Context, id SourceControlSyn var model SourceControlSyncJobById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_listbyautomationaccount.go index 84bcd7a480d..1a4ea326345 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/version.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/version.go index 8af8ebded79..1536b57c4df 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/version.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjob/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjob/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/README.md b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/README.md index 1a1325e3d86..09fcab3d196 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/README.md +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams` Documentation -The `sourcecontrolsyncjobstreams` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `sourcecontrolsyncjobstreams` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/client.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/client.go index 4e689c48c4f..0be682fcf30 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/client.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobStreamsClient struct { } func NewSourceControlSyncJobStreamsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobStreamsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobStreamsClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go index 210de5d23e8..520dc5f44c7 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go index a1d8a1ca967..fca0b86a471 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go @@ -48,7 +48,7 @@ func ParseSourceControlSyncJobStreamID(input string) (*SourceControlSyncJobStrea } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSourceControlSyncJobStreamIDInsensitively(input string) (*SourceContro } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_get.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_get.go index 867cf4899fc..02a68185a64 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobStreamsClient) Get(ctx context.Context, id SourceCon var model SourceControlSyncJobStreamById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_listbysyncjob.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_listbysyncjob.go index fe82bd504e4..11bad046f50 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_listbysyncjob.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/method_listbysyncjob.go @@ -39,6 +39,7 @@ func (o ListBySyncJobOperationOptions) ToHeaders() *client.Headers { func (o ListBySyncJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/version.go b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/version.go index f3c08554785..41a9a9a6546 100644 --- a/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/version.go +++ b/resource-manager/automation/2020-01-13-preview/sourcecontrolsyncjobstreams/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjobstreams -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/statistics/README.md b/resource-manager/automation/2020-01-13-preview/statistics/README.md index c65e8094c2a..c1a7f50605a 100644 --- a/resource-manager/automation/2020-01-13-preview/statistics/README.md +++ b/resource-manager/automation/2020-01-13-preview/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/statistics/client.go b/resource-manager/automation/2020-01-13-preview/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2020-01-13-preview/statistics/client.go +++ b/resource-manager/automation/2020-01-13-preview/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/statistics/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2020-01-13-preview/statistics/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2020-01-13-preview/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/statistics/version.go b/resource-manager/automation/2020-01-13-preview/statistics/version.go index 3bbd88c9589..aabd828076b 100644 --- a/resource-manager/automation/2020-01-13-preview/statistics/version.go +++ b/resource-manager/automation/2020-01-13-preview/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/typefields/README.md b/resource-manager/automation/2020-01-13-preview/typefields/README.md index 9661fa8c41a..856a2be9649 100644 --- a/resource-manager/automation/2020-01-13-preview/typefields/README.md +++ b/resource-manager/automation/2020-01-13-preview/typefields/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/typefields` Documentation -The `typefields` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `typefields` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/typefields/client.go b/resource-manager/automation/2020-01-13-preview/typefields/client.go index e235fbc854f..d2929448756 100644 --- a/resource-manager/automation/2020-01-13-preview/typefields/client.go +++ b/resource-manager/automation/2020-01-13-preview/typefields/client.go @@ -15,7 +15,7 @@ type TypeFieldsClient struct { } func NewTypeFieldsClientWithBaseURI(sdkApi sdkEnv.Api) (*TypeFieldsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "typefields", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "typefields", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TypeFieldsClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/typefields/id_type.go b/resource-manager/automation/2020-01-13-preview/typefields/id_type.go index 834ea978a07..e7ebc51ea54 100644 --- a/resource-manager/automation/2020-01-13-preview/typefields/id_type.go +++ b/resource-manager/automation/2020-01-13-preview/typefields/id_type.go @@ -46,7 +46,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/typefields/method_fieldslistbytype.go b/resource-manager/automation/2020-01-13-preview/typefields/method_fieldslistbytype.go index 03945e9f500..18ca75f1933 100644 --- a/resource-manager/automation/2020-01-13-preview/typefields/method_fieldslistbytype.go +++ b/resource-manager/automation/2020-01-13-preview/typefields/method_fieldslistbytype.go @@ -46,7 +46,6 @@ func (c TypeFieldsClient) FieldsListByType(ctx context.Context, id TypeId) (resu var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/typefields/version.go b/resource-manager/automation/2020-01-13-preview/typefields/version.go index 718500a5498..e99dcb98f85 100644 --- a/resource-manager/automation/2020-01-13-preview/typefields/version.go +++ b/resource-manager/automation/2020-01-13-preview/typefields/version.go @@ -1,12 +1,10 @@ package typefields -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/typefields/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/typefields/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/usages/README.md b/resource-manager/automation/2020-01-13-preview/usages/README.md index 197b7066659..28bffd45eca 100644 --- a/resource-manager/automation/2020-01-13-preview/usages/README.md +++ b/resource-manager/automation/2020-01-13-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/usages/client.go b/resource-manager/automation/2020-01-13-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2020-01-13-preview/usages/client.go +++ b/resource-manager/automation/2020-01-13-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/usages/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2020-01-13-preview/usages/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/usages/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2020-01-13-preview/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/usages/version.go b/resource-manager/automation/2020-01-13-preview/usages/version.go index 02506a3cac5..fdbec1a17e6 100644 --- a/resource-manager/automation/2020-01-13-preview/usages/version.go +++ b/resource-manager/automation/2020-01-13-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/variable/README.md b/resource-manager/automation/2020-01-13-preview/variable/README.md index e7814fee9c0..46ab234394b 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/README.md +++ b/resource-manager/automation/2020-01-13-preview/variable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/variable` Documentation -The `variable` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `variable` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/variable/client.go b/resource-manager/automation/2020-01-13-preview/variable/client.go index b52efe661a6..8e293b273f0 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/client.go +++ b/resource-manager/automation/2020-01-13-preview/variable/client.go @@ -15,7 +15,7 @@ type VariableClient struct { } func NewVariableClientWithBaseURI(sdkApi sdkEnv.Api) (*VariableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "variable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "variable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VariableClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/variable/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/variable/id_automationaccount.go index 635e56dfae8..09be4df2a66 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/variable/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/variable/id_variable.go b/resource-manager/automation/2020-01-13-preview/variable/id_variable.go index aab429f68a4..63f8c9328fc 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/id_variable.go +++ b/resource-manager/automation/2020-01-13-preview/variable/id_variable.go @@ -44,7 +44,7 @@ func ParseVariableID(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/variable/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/variable/method_createorupdate.go index 7f1d31eeacc..35a90d4c131 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/variable/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VariableClient) CreateOrUpdate(ctx context.Context, id VariableId, input var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/variable/method_get.go b/resource-manager/automation/2020-01-13-preview/variable/method_get.go index a84e304f5a0..6d865e8141f 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/variable/method_get.go @@ -45,7 +45,6 @@ func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOpera var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/variable/method_update.go b/resource-manager/automation/2020-01-13-preview/variable/method_update.go index cba7dfa356a..d63d977348b 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/variable/method_update.go @@ -49,7 +49,6 @@ func (c VariableClient) Update(ctx context.Context, id VariableId, input Variabl var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/variable/version.go b/resource-manager/automation/2020-01-13-preview/variable/version.go index 0fa2c58793a..603b92814a8 100644 --- a/resource-manager/automation/2020-01-13-preview/variable/version.go +++ b/resource-manager/automation/2020-01-13-preview/variable/version.go @@ -1,12 +1,10 @@ package variable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/variable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/variable/2020-01-13-preview" } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/README.md b/resource-manager/automation/2020-01-13-preview/watcher/README.md index b9fb0ee129c..293564687fc 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/README.md +++ b/resource-manager/automation/2020-01-13-preview/watcher/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2020-01-13-preview/watcher` Documentation -The `watcher` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2020-01-13-preview`). +The `watcher` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2020-01-13-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2020-01-13-preview/watcher/client.go b/resource-manager/automation/2020-01-13-preview/watcher/client.go index 410df5cc6de..97956dd3b49 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/client.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/client.go @@ -15,7 +15,7 @@ type WatcherClient struct { } func NewWatcherClientWithBaseURI(sdkApi sdkEnv.Api) (*WatcherClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watcher", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watcher", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatcherClient: %+v", err) } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go b/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go index 5bb6a32656c..55c832e03ac 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go b/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go index 5ee526661d5..67219fd6633 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/id_watcher.go @@ -44,7 +44,7 @@ func ParseWatcherID(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatcherIDInsensitively(input string) (*WatcherId, error) { } id := WatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/method_createorupdate.go b/resource-manager/automation/2020-01-13-preview/watcher/method_createorupdate.go index de1bd15ae0f..80fb2527d8f 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/method_createorupdate.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatcherClient) CreateOrUpdate(ctx context.Context, id WatcherId, input W var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/method_get.go b/resource-manager/automation/2020-01-13-preview/watcher/method_get.go index 399e6b731f9..5578b8b1938 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/method_get.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/method_get.go @@ -45,7 +45,6 @@ func (c WatcherClient) Get(ctx context.Context, id WatcherId) (result GetOperati var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/method_listbyautomationaccount.go b/resource-manager/automation/2020-01-13-preview/watcher/method_listbyautomationaccount.go index b0f573fbe51..dad46ab1f35 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/method_listbyautomationaccount.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/method_update.go b/resource-manager/automation/2020-01-13-preview/watcher/method_update.go index baa7b92a1f4..02103fa5b5b 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/method_update.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/method_update.go @@ -49,7 +49,6 @@ func (c WatcherClient) Update(ctx context.Context, id WatcherId, input WatcherUp var model Watcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2020-01-13-preview/watcher/version.go b/resource-manager/automation/2020-01-13-preview/watcher/version.go index d6946cea762..57b74633918 100644 --- a/resource-manager/automation/2020-01-13-preview/watcher/version.go +++ b/resource-manager/automation/2020-01-13-preview/watcher/version.go @@ -1,12 +1,10 @@ package watcher -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-13-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watcher/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watcher/2020-01-13-preview" } diff --git a/resource-manager/automation/2021-06-22/automationaccount/README.md b/resource-manager/automation/2021-06-22/automationaccount/README.md index a004edd024f..ee86037e597 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/README.md +++ b/resource-manager/automation/2021-06-22/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/automationaccount/client.go b/resource-manager/automation/2021-06-22/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/client.go +++ b/resource-manager/automation/2021-06-22/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/automationaccount/id_automationaccount.go b/resource-manager/automation/2021-06-22/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate.go b/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2021-06-22/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/automationaccount/method_get.go b/resource-manager/automation/2021-06-22/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/method_get.go +++ b/resource-manager/automation/2021-06-22/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/automationaccount/method_update.go b/resource-manager/automation/2021-06-22/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/method_update.go +++ b/resource-manager/automation/2021-06-22/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/automationaccount/version.go b/resource-manager/automation/2021-06-22/automationaccount/version.go index dc533843b89..ae3660471fa 100644 --- a/resource-manager/automation/2021-06-22/automationaccount/version.go +++ b/resource-manager/automation/2021-06-22/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/README.md b/resource-manager/automation/2021-06-22/hybridrunbookworker/README.md index 838221d672a..a381ba8ff35 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/README.md +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/hybridrunbookworker` Documentation -The `hybridrunbookworker` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `hybridrunbookworker` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/client.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/client.go index ff1996db3d7..db47418435b 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/client.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerClient struct { } func NewHybridRunbookWorkerClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworker", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworker", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworker.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworker.go index aed59dbb642..1ac98309191 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworker.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworker.go @@ -46,7 +46,7 @@ func ParseHybridRunbookWorkerID(input string) (*HybridRunbookWorkerId, error) { } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridRunbookWorkerIDInsensitively(input string) (*HybridRunbookWorker } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworkergroup.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworkergroup.go index a5175098bc7..75642f8757e 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_create.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_create.go index a9fda870641..b4b7222aa8b 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_create.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_create.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerClient) Create(ctx context.Context, id HybridRunbookW var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_get.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_get.go index fa75f9769d4..68d91089f3b 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_get.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerClient) Get(ctx context.Context, id HybridRunbookWork var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go index 3b13c74775b..a7430c3925e 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go @@ -39,6 +39,7 @@ func (o ListByHybridRunbookWorkerGroupOperationOptions) ToHeaders() *client.Head func (o ListByHybridRunbookWorkerGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworker/version.go b/resource-manager/automation/2021-06-22/hybridrunbookworker/version.go index bb33a40f317..930e596ca85 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworker/version.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworker/version.go @@ -1,12 +1,10 @@ package hybridrunbookworker -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworker/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworker/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/README.md b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/README.md index 42d0d2e0a32..1d1e2b30ab5 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/client.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_create.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_create.go index a2a58ee9d54..356a3adf986 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_create.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_create.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Create(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_update.go index 237b923dae3..cb58eab5762 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/version.go b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/version.go index f77fc5794a8..1df96b969ab 100644 --- a/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2021-06-22/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/listkeys/README.md b/resource-manager/automation/2021-06-22/listkeys/README.md index c6483097e8f..80c6ae0e420 100644 --- a/resource-manager/automation/2021-06-22/listkeys/README.md +++ b/resource-manager/automation/2021-06-22/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/listkeys/client.go b/resource-manager/automation/2021-06-22/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2021-06-22/listkeys/client.go +++ b/resource-manager/automation/2021-06-22/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/listkeys/id_automationaccount.go b/resource-manager/automation/2021-06-22/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2021-06-22/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2021-06-22/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2021-06-22/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2021-06-22/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/listkeys/version.go b/resource-manager/automation/2021-06-22/listkeys/version.go index c0fb21507f1..7d153b3c157 100644 --- a/resource-manager/automation/2021-06-22/listkeys/version.go +++ b/resource-manager/automation/2021-06-22/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/operations/README.md b/resource-manager/automation/2021-06-22/operations/README.md index 504e51f4749..790e81e9eb5 100644 --- a/resource-manager/automation/2021-06-22/operations/README.md +++ b/resource-manager/automation/2021-06-22/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `operations` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/operations/client.go b/resource-manager/automation/2021-06-22/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/automation/2021-06-22/operations/client.go +++ b/resource-manager/automation/2021-06-22/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/operations/id_automationaccount.go b/resource-manager/automation/2021-06-22/operations/id_automationaccount.go index 8e99f7e0ab1..636ccaf515b 100644 --- a/resource-manager/automation/2021-06-22/operations/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/operations/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/operations/method_convertgraphrunbookcontent.go b/resource-manager/automation/2021-06-22/operations/method_convertgraphrunbookcontent.go index 760cd5ee7a6..e2d7faf8597 100644 --- a/resource-manager/automation/2021-06-22/operations/method_convertgraphrunbookcontent.go +++ b/resource-manager/automation/2021-06-22/operations/method_convertgraphrunbookcontent.go @@ -50,7 +50,6 @@ func (c OperationsClient) ConvertGraphRunbookContent(ctx context.Context, id Aut var model GraphicalRunbookContent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/operations/version.go b/resource-manager/automation/2021-06-22/operations/version.go index fa6406251e8..489d398fa41 100644 --- a/resource-manager/automation/2021-06-22/operations/version.go +++ b/resource-manager/automation/2021-06-22/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/statistics/README.md b/resource-manager/automation/2021-06-22/statistics/README.md index 1f8f8c1138c..6343f3e6933 100644 --- a/resource-manager/automation/2021-06-22/statistics/README.md +++ b/resource-manager/automation/2021-06-22/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/statistics/client.go b/resource-manager/automation/2021-06-22/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2021-06-22/statistics/client.go +++ b/resource-manager/automation/2021-06-22/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/statistics/id_automationaccount.go b/resource-manager/automation/2021-06-22/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2021-06-22/statistics/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2021-06-22/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2021-06-22/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2021-06-22/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/statistics/version.go b/resource-manager/automation/2021-06-22/statistics/version.go index 27ada2b671d..e6fadff896c 100644 --- a/resource-manager/automation/2021-06-22/statistics/version.go +++ b/resource-manager/automation/2021-06-22/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2021-06-22" } diff --git a/resource-manager/automation/2021-06-22/usages/README.md b/resource-manager/automation/2021-06-22/usages/README.md index f6774bf5614..ea9a4bb57ab 100644 --- a/resource-manager/automation/2021-06-22/usages/README.md +++ b/resource-manager/automation/2021-06-22/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2021-06-22/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2021-06-22`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2021-06-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2021-06-22/usages/client.go b/resource-manager/automation/2021-06-22/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2021-06-22/usages/client.go +++ b/resource-manager/automation/2021-06-22/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2021-06-22/usages/id_automationaccount.go b/resource-manager/automation/2021-06-22/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2021-06-22/usages/id_automationaccount.go +++ b/resource-manager/automation/2021-06-22/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2021-06-22/usages/method_listbyautomationaccount.go b/resource-manager/automation/2021-06-22/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2021-06-22/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2021-06-22/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2021-06-22/usages/version.go b/resource-manager/automation/2021-06-22/usages/version.go index a12c9ed0283..3bb23548d6b 100644 --- a/resource-manager/automation/2021-06-22/usages/version.go +++ b/resource-manager/automation/2021-06-22/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2021-06-22" } diff --git a/resource-manager/automation/2022-08-08/activity/README.md b/resource-manager/automation/2022-08-08/activity/README.md index 06c08fdf88f..80cf04309b7 100644 --- a/resource-manager/automation/2022-08-08/activity/README.md +++ b/resource-manager/automation/2022-08-08/activity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/activity` Documentation -The `activity` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `activity` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/activity/client.go b/resource-manager/automation/2022-08-08/activity/client.go index 0142d55ea1f..7e366361ec1 100644 --- a/resource-manager/automation/2022-08-08/activity/client.go +++ b/resource-manager/automation/2022-08-08/activity/client.go @@ -15,7 +15,7 @@ type ActivityClient struct { } func NewActivityClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/activity/id_activity.go b/resource-manager/automation/2022-08-08/activity/id_activity.go index 87b1df1f763..545b302d28e 100644 --- a/resource-manager/automation/2022-08-08/activity/id_activity.go +++ b/resource-manager/automation/2022-08-08/activity/id_activity.go @@ -46,7 +46,7 @@ func ParseActivityID(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/activity/id_module.go b/resource-manager/automation/2022-08-08/activity/id_module.go index 2c22f0316ae..48065b72334 100644 --- a/resource-manager/automation/2022-08-08/activity/id_module.go +++ b/resource-manager/automation/2022-08-08/activity/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/activity/method_get.go b/resource-manager/automation/2022-08-08/activity/method_get.go index d91dc4e2e43..c212d18aab0 100644 --- a/resource-manager/automation/2022-08-08/activity/method_get.go +++ b/resource-manager/automation/2022-08-08/activity/method_get.go @@ -45,7 +45,6 @@ func (c ActivityClient) Get(ctx context.Context, id ActivityId) (result GetOpera var model Activity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/activity/version.go b/resource-manager/automation/2022-08-08/activity/version.go index f4df6fbd25f..042151678c2 100644 --- a/resource-manager/automation/2022-08-08/activity/version.go +++ b/resource-manager/automation/2022-08-08/activity/version.go @@ -1,12 +1,10 @@ package activity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activity/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/automationaccount/README.md b/resource-manager/automation/2022-08-08/automationaccount/README.md index 2636966ab09..20342a62398 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/README.md +++ b/resource-manager/automation/2022-08-08/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/automationaccount/client.go b/resource-manager/automation/2022-08-08/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/client.go +++ b/resource-manager/automation/2022-08-08/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go b/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/automationaccount/method_createorupdate.go b/resource-manager/automation/2022-08-08/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/automationaccount/method_get.go b/resource-manager/automation/2022-08-08/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/method_get.go +++ b/resource-manager/automation/2022-08-08/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/automationaccount/method_update.go b/resource-manager/automation/2022-08-08/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/method_update.go +++ b/resource-manager/automation/2022-08-08/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/automationaccount/version.go b/resource-manager/automation/2022-08-08/automationaccount/version.go index d78444fc904..2597ecd888e 100644 --- a/resource-manager/automation/2022-08-08/automationaccount/version.go +++ b/resource-manager/automation/2022-08-08/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/certificate/README.md b/resource-manager/automation/2022-08-08/certificate/README.md index 5b65775eb15..6e37af2aa8b 100644 --- a/resource-manager/automation/2022-08-08/certificate/README.md +++ b/resource-manager/automation/2022-08-08/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `certificate` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/certificate/client.go b/resource-manager/automation/2022-08-08/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/automation/2022-08-08/certificate/client.go +++ b/resource-manager/automation/2022-08-08/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/certificate/id_automationaccount.go b/resource-manager/automation/2022-08-08/certificate/id_automationaccount.go index 29c8860dc29..e5efa36aa52 100644 --- a/resource-manager/automation/2022-08-08/certificate/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/certificate/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/certificate/id_certificate.go b/resource-manager/automation/2022-08-08/certificate/id_certificate.go index 6ab72756d10..7d31e9ea831 100644 --- a/resource-manager/automation/2022-08-08/certificate/id_certificate.go +++ b/resource-manager/automation/2022-08-08/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/certificate/method_createorupdate.go b/resource-manager/automation/2022-08-08/certificate/method_createorupdate.go index 0b944c57e50..1e5de85afb2 100644 --- a/resource-manager/automation/2022-08-08/certificate/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/certificate/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/certificate/method_get.go b/resource-manager/automation/2022-08-08/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/automation/2022-08-08/certificate/method_get.go +++ b/resource-manager/automation/2022-08-08/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/certificate/method_update.go b/resource-manager/automation/2022-08-08/certificate/method_update.go index 6fbe2d4a340..b4c51d673ad 100644 --- a/resource-manager/automation/2022-08-08/certificate/method_update.go +++ b/resource-manager/automation/2022-08-08/certificate/method_update.go @@ -49,7 +49,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/certificate/version.go b/resource-manager/automation/2022-08-08/certificate/version.go index 6cf8e1b6a03..26bfc6e95f7 100644 --- a/resource-manager/automation/2022-08-08/certificate/version.go +++ b/resource-manager/automation/2022-08-08/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/connection/README.md b/resource-manager/automation/2022-08-08/connection/README.md index 14932583c75..9e67692bb66 100644 --- a/resource-manager/automation/2022-08-08/connection/README.md +++ b/resource-manager/automation/2022-08-08/connection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/connection` Documentation -The `connection` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `connection` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/connection/client.go b/resource-manager/automation/2022-08-08/connection/client.go index 3f066e2e653..0c3f5a2848b 100644 --- a/resource-manager/automation/2022-08-08/connection/client.go +++ b/resource-manager/automation/2022-08-08/connection/client.go @@ -15,7 +15,7 @@ type ConnectionClient struct { } func NewConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/connection/id_automationaccount.go b/resource-manager/automation/2022-08-08/connection/id_automationaccount.go index ec1aaa6092f..304d6566f3f 100644 --- a/resource-manager/automation/2022-08-08/connection/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/connection/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/connection/id_connection.go b/resource-manager/automation/2022-08-08/connection/id_connection.go index 6ec1093cd2b..0e6c2604874 100644 --- a/resource-manager/automation/2022-08-08/connection/id_connection.go +++ b/resource-manager/automation/2022-08-08/connection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/connection/method_createorupdate.go b/resource-manager/automation/2022-08-08/connection/method_createorupdate.go index b1f0dd9e309..b6f6f47e462 100644 --- a/resource-manager/automation/2022-08-08/connection/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/connection/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionClient) CreateOrUpdate(ctx context.Context, id ConnectionId, i var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/connection/method_get.go b/resource-manager/automation/2022-08-08/connection/method_get.go index 16d9f30e8c8..602490999ff 100644 --- a/resource-manager/automation/2022-08-08/connection/method_get.go +++ b/resource-manager/automation/2022-08-08/connection/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionClient) Get(ctx context.Context, id ConnectionId) (result GetO var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/connection/method_update.go b/resource-manager/automation/2022-08-08/connection/method_update.go index 1c57761fbc1..11dff660df6 100644 --- a/resource-manager/automation/2022-08-08/connection/method_update.go +++ b/resource-manager/automation/2022-08-08/connection/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionClient) Update(ctx context.Context, id ConnectionId, input Con var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/connection/version.go b/resource-manager/automation/2022-08-08/connection/version.go index a53a5c10cd3..773ef42ec0c 100644 --- a/resource-manager/automation/2022-08-08/connection/version.go +++ b/resource-manager/automation/2022-08-08/connection/version.go @@ -1,12 +1,10 @@ package connection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connection/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/connectiontype/README.md b/resource-manager/automation/2022-08-08/connectiontype/README.md index 21f7657cb40..3e9334cb45d 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/README.md +++ b/resource-manager/automation/2022-08-08/connectiontype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/connectiontype` Documentation -The `connectiontype` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `connectiontype` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/connectiontype/client.go b/resource-manager/automation/2022-08-08/connectiontype/client.go index c5cc541fae3..bd83ae0611a 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/client.go +++ b/resource-manager/automation/2022-08-08/connectiontype/client.go @@ -15,7 +15,7 @@ type ConnectionTypeClient struct { } func NewConnectionTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiontype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiontype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionTypeClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/connectiontype/id_automationaccount.go b/resource-manager/automation/2022-08-08/connectiontype/id_automationaccount.go index 3f9b9b3fc08..90cd0ad2006 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/connectiontype/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/connectiontype/id_connectiontype.go b/resource-manager/automation/2022-08-08/connectiontype/id_connectiontype.go index 6fb2d1c07b2..3945becf946 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/id_connectiontype.go +++ b/resource-manager/automation/2022-08-08/connectiontype/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/connectiontype/method_createorupdate.go b/resource-manager/automation/2022-08-08/connectiontype/method_createorupdate.go index 9733a9a7c13..b5482180669 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/connectiontype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectionTypeClient) CreateOrUpdate(ctx context.Context, id ConnectionT var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/connectiontype/method_get.go b/resource-manager/automation/2022-08-08/connectiontype/method_get.go index 54be67f6226..f4bc697608c 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/method_get.go +++ b/resource-manager/automation/2022-08-08/connectiontype/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionTypeClient) Get(ctx context.Context, id ConnectionTypeId) (res var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/connectiontype/version.go b/resource-manager/automation/2022-08-08/connectiontype/version.go index 75e99960d5b..58e8e10366a 100644 --- a/resource-manager/automation/2022-08-08/connectiontype/version.go +++ b/resource-manager/automation/2022-08-08/connectiontype/version.go @@ -1,12 +1,10 @@ package connectiontype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiontype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiontype/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/credential/README.md b/resource-manager/automation/2022-08-08/credential/README.md index e680f613a00..175b60d359f 100644 --- a/resource-manager/automation/2022-08-08/credential/README.md +++ b/resource-manager/automation/2022-08-08/credential/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/credential` Documentation -The `credential` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `credential` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/credential/client.go b/resource-manager/automation/2022-08-08/credential/client.go index 2e36e15446b..52f1e66c317 100644 --- a/resource-manager/automation/2022-08-08/credential/client.go +++ b/resource-manager/automation/2022-08-08/credential/client.go @@ -15,7 +15,7 @@ type CredentialClient struct { } func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credential", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credential", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/credential/id_automationaccount.go b/resource-manager/automation/2022-08-08/credential/id_automationaccount.go index 173accecf18..d363cf9c0b2 100644 --- a/resource-manager/automation/2022-08-08/credential/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/credential/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/credential/id_credential.go b/resource-manager/automation/2022-08-08/credential/id_credential.go index 7e4319efe94..6b4b028d5fd 100644 --- a/resource-manager/automation/2022-08-08/credential/id_credential.go +++ b/resource-manager/automation/2022-08-08/credential/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/credential/method_createorupdate.go b/resource-manager/automation/2022-08-08/credential/method_createorupdate.go index 046ed79f991..2c5f73f9dfe 100644 --- a/resource-manager/automation/2022-08-08/credential/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/credential/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CredentialClient) CreateOrUpdate(ctx context.Context, id CredentialId, i var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/credential/method_get.go b/resource-manager/automation/2022-08-08/credential/method_get.go index f9008350a37..225e47cfe42 100644 --- a/resource-manager/automation/2022-08-08/credential/method_get.go +++ b/resource-manager/automation/2022-08-08/credential/method_get.go @@ -45,7 +45,6 @@ func (c CredentialClient) Get(ctx context.Context, id CredentialId) (result GetO var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/credential/method_update.go b/resource-manager/automation/2022-08-08/credential/method_update.go index bb2022825d5..da04941cd11 100644 --- a/resource-manager/automation/2022-08-08/credential/method_update.go +++ b/resource-manager/automation/2022-08-08/credential/method_update.go @@ -49,7 +49,6 @@ func (c CredentialClient) Update(ctx context.Context, id CredentialId, input Cre var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/credential/version.go b/resource-manager/automation/2022-08-08/credential/version.go index cb50b1d6b4b..91666cba2b0 100644 --- a/resource-manager/automation/2022-08-08/credential/version.go +++ b/resource-manager/automation/2022-08-08/credential/version.go @@ -1,12 +1,10 @@ package credential -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credential/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credential/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/README.md b/resource-manager/automation/2022-08-08/dscconfiguration/README.md index 2796bb88fef..302e2db2a65 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/README.md +++ b/resource-manager/automation/2022-08-08/dscconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/dscconfiguration` Documentation -The `dscconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `dscconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/client.go b/resource-manager/automation/2022-08-08/dscconfiguration/client.go index 33d7d66ff2e..b0bf9421d65 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/client.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/client.go @@ -15,7 +15,7 @@ type DscConfigurationClient struct { } func NewDscConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/id_automationaccount.go b/resource-manager/automation/2022-08-08/dscconfiguration/id_automationaccount.go index a9b7ac7041d..8a7a211ee52 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/id_configuration.go b/resource-manager/automation/2022-08-08/dscconfiguration/id_configuration.go index 0cb80dea3e2..b77ddf9f20a 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/id_configuration.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/method_createorupdate.go b/resource-manager/automation/2022-08-08/dscconfiguration/method_createorupdate.go index 5096a6df27c..9fcc3d6a75b 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DscConfigurationClient) CreateOrUpdate(ctx context.Context, id Configura var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/method_get.go b/resource-manager/automation/2022-08-08/dscconfiguration/method_get.go index 0ec24024e26..e53beeed617 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/method_get.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscConfigurationClient) Get(ctx context.Context, id ConfigurationId) (re var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/method_getcontent.go b/resource-manager/automation/2022-08-08/dscconfiguration/method_getcontent.go index 34c430ed62f..74269aa1a64 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/method_getcontent.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/method_getcontent.go @@ -46,7 +46,6 @@ func (c DscConfigurationClient) GetContent(ctx context.Context, id Configuration var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/dscconfiguration/method_listbyautomationaccount.go index 8a4b09db266..19cb7180e57 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/method_update.go b/resource-manager/automation/2022-08-08/dscconfiguration/method_update.go index 89ed13be39f..c842ef5f4b3 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/method_update.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/method_update.go @@ -49,7 +49,6 @@ func (c DscConfigurationClient) Update(ctx context.Context, id ConfigurationId, var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/dscconfiguration/version.go b/resource-manager/automation/2022-08-08/dscconfiguration/version.go index e2865cece22..ca83ef4ce31 100644 --- a/resource-manager/automation/2022-08-08/dscconfiguration/version.go +++ b/resource-manager/automation/2022-08-08/dscconfiguration/version.go @@ -1,12 +1,10 @@ package dscconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscconfiguration/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/README.md b/resource-manager/automation/2022-08-08/dscnodeconfiguration/README.md index 66d2e2e115a..8aedbdcf583 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/README.md +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/dscnodeconfiguration` Documentation -The `dscnodeconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `dscnodeconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/client.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/client.go index 60e2159464d..d9d09f3a59d 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/client.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/client.go @@ -15,7 +15,7 @@ type DscNodeConfigurationClient struct { } func NewDscNodeConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_automationaccount.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_automationaccount.go index 2857bb759ef..5320db63946 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_nodeconfiguration.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_nodeconfiguration.go index 55f9ef787e5..a79bf5fcc78 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_nodeconfiguration.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_get.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_get.go index 3971e32ad95..09e5cef4f75 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_get.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeConfigurationClient) Get(ctx context.Context, id NodeConfiguratio var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_listbyautomationaccount.go index 707c87a2ebc..cd9762499e3 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/dscnodeconfiguration/version.go b/resource-manager/automation/2022-08-08/dscnodeconfiguration/version.go index 87eacf0deaa..28fe2c9c29c 100644 --- a/resource-manager/automation/2022-08-08/dscnodeconfiguration/version.go +++ b/resource-manager/automation/2022-08-08/dscnodeconfiguration/version.go @@ -1,12 +1,10 @@ package dscnodeconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnodeconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnodeconfiguration/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/README.md b/resource-manager/automation/2022-08-08/hybridrunbookworker/README.md index bf5a62efecb..fec281d713b 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/README.md +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/hybridrunbookworker` Documentation -The `hybridrunbookworker` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `hybridrunbookworker` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/client.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/client.go index ff1996db3d7..db47418435b 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/client.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerClient struct { } func NewHybridRunbookWorkerClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworker", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworker", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworker.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworker.go index aed59dbb642..1ac98309191 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworker.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworker.go @@ -46,7 +46,7 @@ func ParseHybridRunbookWorkerID(input string) (*HybridRunbookWorkerId, error) { } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridRunbookWorkerIDInsensitively(input string) (*HybridRunbookWorker } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworkergroup.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworkergroup.go index a5175098bc7..75642f8757e 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_create.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_create.go index 822b711b23a..b115ec66d5d 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_create.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_create.go @@ -50,7 +50,6 @@ func (c HybridRunbookWorkerClient) Create(ctx context.Context, id HybridRunbookW var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_get.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_get.go index fa75f9769d4..68d91089f3b 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_get.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerClient) Get(ctx context.Context, id HybridRunbookWork var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go index 3b13c74775b..a7430c3925e 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go @@ -39,6 +39,7 @@ func (o ListByHybridRunbookWorkerGroupOperationOptions) ToHeaders() *client.Head func (o ListByHybridRunbookWorkerGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworker/version.go b/resource-manager/automation/2022-08-08/hybridrunbookworker/version.go index 0593e481c7f..e174d8a372d 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworker/version.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworker/version.go @@ -1,12 +1,10 @@ package hybridrunbookworker -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworker/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworker/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/README.md b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/README.md index 3303a53039b..cc359efdd5b 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/client.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_create.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_create.go index c07fc22ea1f..3412d58df6c 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_create.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_create.go @@ -50,7 +50,6 @@ func (c HybridRunbookWorkerGroupClient) Create(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_update.go index 237b923dae3..cb58eab5762 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/version.go b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/version.go index 2c336d81831..a2b518f136f 100644 --- a/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2022-08-08/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/job/README.md b/resource-manager/automation/2022-08-08/job/README.md index 0e99bf90114..0d8d0ddae4a 100644 --- a/resource-manager/automation/2022-08-08/job/README.md +++ b/resource-manager/automation/2022-08-08/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `job` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/job/client.go b/resource-manager/automation/2022-08-08/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/automation/2022-08-08/job/client.go +++ b/resource-manager/automation/2022-08-08/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/job/id_automationaccount.go b/resource-manager/automation/2022-08-08/job/id_automationaccount.go index a03de714fcf..03473fb15a7 100644 --- a/resource-manager/automation/2022-08-08/job/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/job/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/job/id_job.go b/resource-manager/automation/2022-08-08/job/id_job.go index d9ee96305cf..c8265a630cf 100644 --- a/resource-manager/automation/2022-08-08/job/id_job.go +++ b/resource-manager/automation/2022-08-08/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/job/method_create.go b/resource-manager/automation/2022-08-08/job/method_create.go index 20181d88e2e..157bfbc1811 100644 --- a/resource-manager/automation/2022-08-08/job/method_create.go +++ b/resource-manager/automation/2022-08-08/job/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c JobClient) Create(ctx context.Context, id JobId, input JobCreateParamete var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/job/method_get.go b/resource-manager/automation/2022-08-08/job/method_get.go index 70b2a88ce70..f8444387c47 100644 --- a/resource-manager/automation/2022-08-08/job/method_get.go +++ b/resource-manager/automation/2022-08-08/job/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) Get(ctx context.Context, id JobId, options GetOperationOption var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/job/method_getoutput.go b/resource-manager/automation/2022-08-08/job/method_getoutput.go index c5e0edacdb0..1255914f3ea 100644 --- a/resource-manager/automation/2022-08-08/job/method_getoutput.go +++ b/resource-manager/automation/2022-08-08/job/method_getoutput.go @@ -36,6 +36,7 @@ func (o GetOutputOperationOptions) ToHeaders() *client.Headers { func (o GetOutputOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetOutput(ctx context.Context, id JobId, options GetOutputOpe var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/job/method_getrunbookcontent.go b/resource-manager/automation/2022-08-08/job/method_getrunbookcontent.go index a7a244d9859..bf20b3af24a 100644 --- a/resource-manager/automation/2022-08-08/job/method_getrunbookcontent.go +++ b/resource-manager/automation/2022-08-08/job/method_getrunbookcontent.go @@ -36,6 +36,7 @@ func (o GetRunbookContentOperationOptions) ToHeaders() *client.Headers { func (o GetRunbookContentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetRunbookContent(ctx context.Context, id JobId, options GetR var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/job/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/job/method_listbyautomationaccount.go index 504bd861221..df1c74e6a31 100644 --- a/resource-manager/automation/2022-08-08/job/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/job/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/job/method_resume.go b/resource-manager/automation/2022-08-08/job/method_resume.go index c707c2a9c74..d5080a44a1b 100644 --- a/resource-manager/automation/2022-08-08/job/method_resume.go +++ b/resource-manager/automation/2022-08-08/job/method_resume.go @@ -35,6 +35,7 @@ func (o ResumeOperationOptions) ToHeaders() *client.Headers { func (o ResumeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/job/method_stop.go b/resource-manager/automation/2022-08-08/job/method_stop.go index d2864853dff..91d406b28f9 100644 --- a/resource-manager/automation/2022-08-08/job/method_stop.go +++ b/resource-manager/automation/2022-08-08/job/method_stop.go @@ -35,6 +35,7 @@ func (o StopOperationOptions) ToHeaders() *client.Headers { func (o StopOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/job/method_suspend.go b/resource-manager/automation/2022-08-08/job/method_suspend.go index bc8f428afbb..533d6922f83 100644 --- a/resource-manager/automation/2022-08-08/job/method_suspend.go +++ b/resource-manager/automation/2022-08-08/job/method_suspend.go @@ -35,6 +35,7 @@ func (o SuspendOperationOptions) ToHeaders() *client.Headers { func (o SuspendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/job/version.go b/resource-manager/automation/2022-08-08/job/version.go index f5196d884fb..37c070fc79c 100644 --- a/resource-manager/automation/2022-08-08/job/version.go +++ b/resource-manager/automation/2022-08-08/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/jobschedule/README.md b/resource-manager/automation/2022-08-08/jobschedule/README.md index 4baa67aa3b1..f7e3ba11af7 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/README.md +++ b/resource-manager/automation/2022-08-08/jobschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/jobschedule` Documentation -The `jobschedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `jobschedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/jobschedule/client.go b/resource-manager/automation/2022-08-08/jobschedule/client.go index 4c9fb976839..18a0e89bd37 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/client.go +++ b/resource-manager/automation/2022-08-08/jobschedule/client.go @@ -15,7 +15,7 @@ type JobScheduleClient struct { } func NewJobScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*JobScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/jobschedule/id_automationaccount.go b/resource-manager/automation/2022-08-08/jobschedule/id_automationaccount.go index 330e6504743..e21e84913de 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/jobschedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/jobschedule/id_jobschedule.go b/resource-manager/automation/2022-08-08/jobschedule/id_jobschedule.go index 9276d099eb3..896164a6098 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/id_jobschedule.go +++ b/resource-manager/automation/2022-08-08/jobschedule/id_jobschedule.go @@ -44,7 +44,7 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/jobschedule/method_create.go b/resource-manager/automation/2022-08-08/jobschedule/method_create.go index 03831935824..676325e8c02 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/method_create.go +++ b/resource-manager/automation/2022-08-08/jobschedule/method_create.go @@ -49,7 +49,6 @@ func (c JobScheduleClient) Create(ctx context.Context, id JobScheduleId, input J var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/jobschedule/method_get.go b/resource-manager/automation/2022-08-08/jobschedule/method_get.go index 0721b83e4be..913490c8175 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/method_get.go +++ b/resource-manager/automation/2022-08-08/jobschedule/method_get.go @@ -45,7 +45,6 @@ func (c JobScheduleClient) Get(ctx context.Context, id JobScheduleId) (result Ge var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/jobschedule/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/jobschedule/method_listbyautomationaccount.go index 6b5c6412a83..74ee8cd52b4 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/jobschedule/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/jobschedule/version.go b/resource-manager/automation/2022-08-08/jobschedule/version.go index e93606ea816..2736da5881a 100644 --- a/resource-manager/automation/2022-08-08/jobschedule/version.go +++ b/resource-manager/automation/2022-08-08/jobschedule/version.go @@ -1,12 +1,10 @@ package jobschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobschedule/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/jobstream/README.md b/resource-manager/automation/2022-08-08/jobstream/README.md index 4076a3ebaf4..bbf6d17ddc5 100644 --- a/resource-manager/automation/2022-08-08/jobstream/README.md +++ b/resource-manager/automation/2022-08-08/jobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/jobstream` Documentation -The `jobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `jobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/jobstream/client.go b/resource-manager/automation/2022-08-08/jobstream/client.go index 880cfb48113..8711950a051 100644 --- a/resource-manager/automation/2022-08-08/jobstream/client.go +++ b/resource-manager/automation/2022-08-08/jobstream/client.go @@ -15,7 +15,7 @@ type JobStreamClient struct { } func NewJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/jobstream/id_job.go b/resource-manager/automation/2022-08-08/jobstream/id_job.go index d37d4f381dd..f4ff7b46fb8 100644 --- a/resource-manager/automation/2022-08-08/jobstream/id_job.go +++ b/resource-manager/automation/2022-08-08/jobstream/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/jobstream/id_stream.go b/resource-manager/automation/2022-08-08/jobstream/id_stream.go index cc03ad44f41..8019e348b44 100644 --- a/resource-manager/automation/2022-08-08/jobstream/id_stream.go +++ b/resource-manager/automation/2022-08-08/jobstream/id_stream.go @@ -46,7 +46,7 @@ func ParseStreamID(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/jobstream/method_get.go b/resource-manager/automation/2022-08-08/jobstream/method_get.go index 500505c3b4f..3682e1236de 100644 --- a/resource-manager/automation/2022-08-08/jobstream/method_get.go +++ b/resource-manager/automation/2022-08-08/jobstream/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobStreamClient) Get(ctx context.Context, id StreamId, options GetOperat var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/jobstream/method_listbyjob.go b/resource-manager/automation/2022-08-08/jobstream/method_listbyjob.go index 4d6eee1cc84..80cd095c7ca 100644 --- a/resource-manager/automation/2022-08-08/jobstream/method_listbyjob.go +++ b/resource-manager/automation/2022-08-08/jobstream/method_listbyjob.go @@ -42,6 +42,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/jobstream/version.go b/resource-manager/automation/2022-08-08/jobstream/version.go index ea312904d46..e468e7a6ed7 100644 --- a/resource-manager/automation/2022-08-08/jobstream/version.go +++ b/resource-manager/automation/2022-08-08/jobstream/version.go @@ -1,12 +1,10 @@ package jobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstream/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/linkedworkspace/README.md b/resource-manager/automation/2022-08-08/linkedworkspace/README.md index 337dd6c009d..88622de18bc 100644 --- a/resource-manager/automation/2022-08-08/linkedworkspace/README.md +++ b/resource-manager/automation/2022-08-08/linkedworkspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/linkedworkspace` Documentation -The `linkedworkspace` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `linkedworkspace` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/linkedworkspace/client.go b/resource-manager/automation/2022-08-08/linkedworkspace/client.go index 265eab06051..ce26bf57e1c 100644 --- a/resource-manager/automation/2022-08-08/linkedworkspace/client.go +++ b/resource-manager/automation/2022-08-08/linkedworkspace/client.go @@ -15,7 +15,7 @@ type LinkedWorkspaceClient struct { } func NewLinkedWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedWorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedworkspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedworkspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedWorkspaceClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/linkedworkspace/id_automationaccount.go b/resource-manager/automation/2022-08-08/linkedworkspace/id_automationaccount.go index 33e45a35f32..897343bb6cd 100644 --- a/resource-manager/automation/2022-08-08/linkedworkspace/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/linkedworkspace/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/linkedworkspace/method_get.go b/resource-manager/automation/2022-08-08/linkedworkspace/method_get.go index 7ea3ca17eaf..7019324f5a3 100644 --- a/resource-manager/automation/2022-08-08/linkedworkspace/method_get.go +++ b/resource-manager/automation/2022-08-08/linkedworkspace/method_get.go @@ -46,7 +46,6 @@ func (c LinkedWorkspaceClient) Get(ctx context.Context, id AutomationAccountId) var model LinkedWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/linkedworkspace/version.go b/resource-manager/automation/2022-08-08/linkedworkspace/version.go index b0d3c5e0e5c..1451474f658 100644 --- a/resource-manager/automation/2022-08-08/linkedworkspace/version.go +++ b/resource-manager/automation/2022-08-08/linkedworkspace/version.go @@ -1,12 +1,10 @@ package linkedworkspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedworkspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedworkspace/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/listkeys/README.md b/resource-manager/automation/2022-08-08/listkeys/README.md index 09f93d0ac71..c273c7e196d 100644 --- a/resource-manager/automation/2022-08-08/listkeys/README.md +++ b/resource-manager/automation/2022-08-08/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/listkeys/client.go b/resource-manager/automation/2022-08-08/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2022-08-08/listkeys/client.go +++ b/resource-manager/automation/2022-08-08/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/listkeys/id_automationaccount.go b/resource-manager/automation/2022-08-08/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2022-08-08/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2022-08-08/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2022-08-08/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/listkeys/version.go b/resource-manager/automation/2022-08-08/listkeys/version.go index 25664a34381..eaa2ccbbcad 100644 --- a/resource-manager/automation/2022-08-08/listkeys/version.go +++ b/resource-manager/automation/2022-08-08/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/module/README.md b/resource-manager/automation/2022-08-08/module/README.md index 52700b70f8f..69de7d365e5 100644 --- a/resource-manager/automation/2022-08-08/module/README.md +++ b/resource-manager/automation/2022-08-08/module/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/module` Documentation -The `module` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `module` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/module/client.go b/resource-manager/automation/2022-08-08/module/client.go index b187a9525a7..88bab05b01d 100644 --- a/resource-manager/automation/2022-08-08/module/client.go +++ b/resource-manager/automation/2022-08-08/module/client.go @@ -15,7 +15,7 @@ type ModuleClient struct { } func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "module", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "module", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModuleClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/module/id_automationaccount.go b/resource-manager/automation/2022-08-08/module/id_automationaccount.go index d884ddf6d14..076be0860db 100644 --- a/resource-manager/automation/2022-08-08/module/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/module/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/module/id_module.go b/resource-manager/automation/2022-08-08/module/id_module.go index d43369de67b..6712f38e7db 100644 --- a/resource-manager/automation/2022-08-08/module/id_module.go +++ b/resource-manager/automation/2022-08-08/module/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/module/method_createorupdate.go b/resource-manager/automation/2022-08-08/module/method_createorupdate.go index 8f2b497f448..009eca3b71e 100644 --- a/resource-manager/automation/2022-08-08/module/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/module/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) CreateOrUpdate(ctx context.Context, id ModuleId, input Mod var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/module/method_get.go b/resource-manager/automation/2022-08-08/module/method_get.go index dda1e7d6fe3..f1bb9268515 100644 --- a/resource-manager/automation/2022-08-08/module/method_get.go +++ b/resource-manager/automation/2022-08-08/module/method_get.go @@ -45,7 +45,6 @@ func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperation var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/module/method_update.go b/resource-manager/automation/2022-08-08/module/method_update.go index 7ea24e33455..b8d0e37337e 100644 --- a/resource-manager/automation/2022-08-08/module/method_update.go +++ b/resource-manager/automation/2022-08-08/module/method_update.go @@ -49,7 +49,6 @@ func (c ModuleClient) Update(ctx context.Context, id ModuleId, input ModuleUpdat var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/module/version.go b/resource-manager/automation/2022-08-08/module/version.go index 24826abc7f0..510a140f8d7 100644 --- a/resource-manager/automation/2022-08-08/module/version.go +++ b/resource-manager/automation/2022-08-08/module/version.go @@ -1,12 +1,10 @@ package module -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/module/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/module/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/README.md b/resource-manager/automation/2022-08-08/objectdatatypes/README.md index 4804ae82928..ebd0aa90fcf 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/README.md +++ b/resource-manager/automation/2022-08-08/objectdatatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/objectdatatypes` Documentation -The `objectdatatypes` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `objectdatatypes` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/client.go b/resource-manager/automation/2022-08-08/objectdatatypes/client.go index 7d8a79e5408..790cc0cc5b4 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/client.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/client.go @@ -15,7 +15,7 @@ type ObjectDataTypesClient struct { } func NewObjectDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectDataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectdatatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectdatatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectDataTypesClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/id_moduleobjectdatatype.go b/resource-manager/automation/2022-08-08/objectdatatypes/id_moduleobjectdatatype.go index b47304ed896..e1a9a092d1b 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/id_moduleobjectdatatype.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/id_moduleobjectdatatype.go @@ -46,7 +46,7 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/id_objectdatatype.go b/resource-manager/automation/2022-08-08/objectdatatypes/id_objectdatatype.go index e4bc22891bf..cabdf681636 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/id_objectdatatype.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/id_objectdatatype.go @@ -44,7 +44,7 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbymoduleandtype.go b/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbymoduleandtype.go index 101a08ad9d6..be62b523193 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbymoduleandtype.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbymoduleandtype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, id var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbytype.go b/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbytype.go index f42dd1234dd..7d47bc2e64f 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbytype.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/method_listfieldsbytype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByType(ctx context.Context, id ObjectDa var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/objectdatatypes/version.go b/resource-manager/automation/2022-08-08/objectdatatypes/version.go index b1329b14c9b..5f33e95acc2 100644 --- a/resource-manager/automation/2022-08-08/objectdatatypes/version.go +++ b/resource-manager/automation/2022-08-08/objectdatatypes/version.go @@ -1,12 +1,10 @@ package objectdatatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectdatatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectdatatypes/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/operations/README.md b/resource-manager/automation/2022-08-08/operations/README.md index 63751f91b9c..a129bb23182 100644 --- a/resource-manager/automation/2022-08-08/operations/README.md +++ b/resource-manager/automation/2022-08-08/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `operations` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/operations/client.go b/resource-manager/automation/2022-08-08/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/automation/2022-08-08/operations/client.go +++ b/resource-manager/automation/2022-08-08/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/operations/id_automationaccount.go b/resource-manager/automation/2022-08-08/operations/id_automationaccount.go index 8e99f7e0ab1..636ccaf515b 100644 --- a/resource-manager/automation/2022-08-08/operations/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/operations/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/operations/method_convertgraphrunbookcontent.go b/resource-manager/automation/2022-08-08/operations/method_convertgraphrunbookcontent.go index 760cd5ee7a6..e2d7faf8597 100644 --- a/resource-manager/automation/2022-08-08/operations/method_convertgraphrunbookcontent.go +++ b/resource-manager/automation/2022-08-08/operations/method_convertgraphrunbookcontent.go @@ -50,7 +50,6 @@ func (c OperationsClient) ConvertGraphRunbookContent(ctx context.Context, id Aut var model GraphicalRunbookContent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/operations/version.go b/resource-manager/automation/2022-08-08/operations/version.go index 1ea8c9953c0..8d52eca107a 100644 --- a/resource-manager/automation/2022-08-08/operations/version.go +++ b/resource-manager/automation/2022-08-08/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/python2package/README.md b/resource-manager/automation/2022-08-08/python2package/README.md index e2510867327..2a5e871d868 100644 --- a/resource-manager/automation/2022-08-08/python2package/README.md +++ b/resource-manager/automation/2022-08-08/python2package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/python2package` Documentation -The `python2package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `python2package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/python2package/client.go b/resource-manager/automation/2022-08-08/python2package/client.go index d152b292bb4..a605d8db5fa 100644 --- a/resource-manager/automation/2022-08-08/python2package/client.go +++ b/resource-manager/automation/2022-08-08/python2package/client.go @@ -15,7 +15,7 @@ type Python2PackageClient struct { } func NewPython2PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python2PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python2package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python2package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python2PackageClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/python2package/id_automationaccount.go b/resource-manager/automation/2022-08-08/python2package/id_automationaccount.go index b295de3890d..848a41f14ce 100644 --- a/resource-manager/automation/2022-08-08/python2package/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/python2package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/python2package/id_python2package.go b/resource-manager/automation/2022-08-08/python2package/id_python2package.go index 0e739894a07..31cf288eff4 100644 --- a/resource-manager/automation/2022-08-08/python2package/id_python2package.go +++ b/resource-manager/automation/2022-08-08/python2package/id_python2package.go @@ -44,7 +44,7 @@ func ParsePython2PackageID(input string) (*Python2PackageId, error) { } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython2PackageIDInsensitively(input string) (*Python2PackageId, error) } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/python2package/method_createorupdate.go b/resource-manager/automation/2022-08-08/python2package/method_createorupdate.go index ab495e73043..be4b6be8e06 100644 --- a/resource-manager/automation/2022-08-08/python2package/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/python2package/method_createorupdate.go @@ -50,7 +50,6 @@ func (c Python2PackageClient) CreateOrUpdate(ctx context.Context, id Python2Pack var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/python2package/method_get.go b/resource-manager/automation/2022-08-08/python2package/method_get.go index 988270c3e38..8baec2126f4 100644 --- a/resource-manager/automation/2022-08-08/python2package/method_get.go +++ b/resource-manager/automation/2022-08-08/python2package/method_get.go @@ -45,7 +45,6 @@ func (c Python2PackageClient) Get(ctx context.Context, id Python2PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/python2package/method_update.go b/resource-manager/automation/2022-08-08/python2package/method_update.go index 7bb58cb1936..9b6e028b314 100644 --- a/resource-manager/automation/2022-08-08/python2package/method_update.go +++ b/resource-manager/automation/2022-08-08/python2package/method_update.go @@ -49,7 +49,6 @@ func (c Python2PackageClient) Update(ctx context.Context, id Python2PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/python2package/version.go b/resource-manager/automation/2022-08-08/python2package/version.go index b152ed6c4ab..3af7f4e6e27 100644 --- a/resource-manager/automation/2022-08-08/python2package/version.go +++ b/resource-manager/automation/2022-08-08/python2package/version.go @@ -1,12 +1,10 @@ package python2package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python2package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python2package/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/python3package/README.md b/resource-manager/automation/2022-08-08/python3package/README.md index e3259633541..0b42671dd80 100644 --- a/resource-manager/automation/2022-08-08/python3package/README.md +++ b/resource-manager/automation/2022-08-08/python3package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/python3package` Documentation -The `python3package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `python3package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/python3package/client.go b/resource-manager/automation/2022-08-08/python3package/client.go index e65813a98ad..100617519b9 100644 --- a/resource-manager/automation/2022-08-08/python3package/client.go +++ b/resource-manager/automation/2022-08-08/python3package/client.go @@ -15,7 +15,7 @@ type Python3PackageClient struct { } func NewPython3PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python3PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python3package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python3package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python3PackageClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/python3package/id_automationaccount.go b/resource-manager/automation/2022-08-08/python3package/id_automationaccount.go index 42e9f9dc968..0dd869505b0 100644 --- a/resource-manager/automation/2022-08-08/python3package/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/python3package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/python3package/id_python3package.go b/resource-manager/automation/2022-08-08/python3package/id_python3package.go index 39b2adf9d8c..21c34a082f8 100644 --- a/resource-manager/automation/2022-08-08/python3package/id_python3package.go +++ b/resource-manager/automation/2022-08-08/python3package/id_python3package.go @@ -44,7 +44,7 @@ func ParsePython3PackageID(input string) (*Python3PackageId, error) { } id := Python3PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython3PackageIDInsensitively(input string) (*Python3PackageId, error) } id := Python3PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/python3package/method_get.go b/resource-manager/automation/2022-08-08/python3package/method_get.go index 6c561deb5b8..c73858165e8 100644 --- a/resource-manager/automation/2022-08-08/python3package/method_get.go +++ b/resource-manager/automation/2022-08-08/python3package/method_get.go @@ -45,7 +45,6 @@ func (c Python3PackageClient) Get(ctx context.Context, id Python3PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/python3package/method_update.go b/resource-manager/automation/2022-08-08/python3package/method_update.go index 2fadccb33d0..5fff180bd90 100644 --- a/resource-manager/automation/2022-08-08/python3package/method_update.go +++ b/resource-manager/automation/2022-08-08/python3package/method_update.go @@ -49,7 +49,6 @@ func (c Python3PackageClient) Update(ctx context.Context, id Python3PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/python3package/version.go b/resource-manager/automation/2022-08-08/python3package/version.go index 36af2fad991..6f542d421f7 100644 --- a/resource-manager/automation/2022-08-08/python3package/version.go +++ b/resource-manager/automation/2022-08-08/python3package/version.go @@ -1,12 +1,10 @@ package python3package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python3package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python3package/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/runbook/README.md b/resource-manager/automation/2022-08-08/runbook/README.md index f95d365f891..a0df8b84ff9 100644 --- a/resource-manager/automation/2022-08-08/runbook/README.md +++ b/resource-manager/automation/2022-08-08/runbook/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/runbook` Documentation -The `runbook` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `runbook` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/runbook/client.go b/resource-manager/automation/2022-08-08/runbook/client.go index 2b6168ac712..e0597053d0d 100644 --- a/resource-manager/automation/2022-08-08/runbook/client.go +++ b/resource-manager/automation/2022-08-08/runbook/client.go @@ -15,7 +15,7 @@ type RunbookClient struct { } func NewRunbookClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbook", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbook", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/runbook/id_automationaccount.go b/resource-manager/automation/2022-08-08/runbook/id_automationaccount.go index a72f7d3463e..971c1ba4df5 100644 --- a/resource-manager/automation/2022-08-08/runbook/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/runbook/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/runbook/id_runbook.go b/resource-manager/automation/2022-08-08/runbook/id_runbook.go index 85e8f4a15a9..a42eeae6012 100644 --- a/resource-manager/automation/2022-08-08/runbook/id_runbook.go +++ b/resource-manager/automation/2022-08-08/runbook/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/runbook/method_createorupdate.go b/resource-manager/automation/2022-08-08/runbook/method_createorupdate.go index 2169e0eabfc..8ce38f6e982 100644 --- a/resource-manager/automation/2022-08-08/runbook/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/runbook/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RunbookClient) CreateOrUpdate(ctx context.Context, id RunbookId, input R var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbook/method_get.go b/resource-manager/automation/2022-08-08/runbook/method_get.go index 309ca3bfd4f..a0b0086a5d0 100644 --- a/resource-manager/automation/2022-08-08/runbook/method_get.go +++ b/resource-manager/automation/2022-08-08/runbook/method_get.go @@ -45,7 +45,6 @@ func (c RunbookClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbook/method_getcontent.go b/resource-manager/automation/2022-08-08/runbook/method_getcontent.go index 78b9ba4841c..e1dcb513c9e 100644 --- a/resource-manager/automation/2022-08-08/runbook/method_getcontent.go +++ b/resource-manager/automation/2022-08-08/runbook/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookClient) GetContent(ctx context.Context, id RunbookId) (result Get var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbook/method_update.go b/resource-manager/automation/2022-08-08/runbook/method_update.go index b2c590b4d70..44756d6f29f 100644 --- a/resource-manager/automation/2022-08-08/runbook/method_update.go +++ b/resource-manager/automation/2022-08-08/runbook/method_update.go @@ -49,7 +49,6 @@ func (c RunbookClient) Update(ctx context.Context, id RunbookId, input RunbookUp var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbook/version.go b/resource-manager/automation/2022-08-08/runbook/version.go index fa2b32de30e..0e4163f71e3 100644 --- a/resource-manager/automation/2022-08-08/runbook/version.go +++ b/resource-manager/automation/2022-08-08/runbook/version.go @@ -1,12 +1,10 @@ package runbook -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbook/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbook/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/README.md b/resource-manager/automation/2022-08-08/runbookdraft/README.md index cda587f38df..dd79042c704 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/README.md +++ b/resource-manager/automation/2022-08-08/runbookdraft/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/runbookdraft` Documentation -The `runbookdraft` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `runbookdraft` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/runbookdraft/client.go b/resource-manager/automation/2022-08-08/runbookdraft/client.go index 1a93df24d0c..2332c2f5a23 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/client.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/client.go @@ -15,7 +15,7 @@ type RunbookDraftClient struct { } func NewRunbookDraftClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookDraftClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbookdraft", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbookdraft", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookDraftClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/id_runbook.go b/resource-manager/automation/2022-08-08/runbookdraft/id_runbook.go index 82900236b6d..38a64b39cb6 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/id_runbook.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/method_get.go b/resource-manager/automation/2022-08-08/runbookdraft/method_get.go index 82d15501607..2dd02389381 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/method_get.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/method_get.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOp var model RunbookDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/method_getcontent.go b/resource-manager/automation/2022-08-08/runbookdraft/method_getcontent.go index 32bf43a0c32..7c95b5cace9 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/method_getcontent.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (resul var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/method_undoedit.go b/resource-manager/automation/2022-08-08/runbookdraft/method_undoedit.go index f0c743b1e79..be90ea44072 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/method_undoedit.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/method_undoedit.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) UndoEdit(ctx context.Context, id RunbookId) (result var model RunbookDraftUndoEditResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/runbookdraft/version.go b/resource-manager/automation/2022-08-08/runbookdraft/version.go index c71acda3640..b1c49c6f393 100644 --- a/resource-manager/automation/2022-08-08/runbookdraft/version.go +++ b/resource-manager/automation/2022-08-08/runbookdraft/version.go @@ -1,12 +1,10 @@ package runbookdraft -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbookdraft/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbookdraft/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/schedule/README.md b/resource-manager/automation/2022-08-08/schedule/README.md index 64455421054..bbe214ba5cf 100644 --- a/resource-manager/automation/2022-08-08/schedule/README.md +++ b/resource-manager/automation/2022-08-08/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `schedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/schedule/client.go b/resource-manager/automation/2022-08-08/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/automation/2022-08-08/schedule/client.go +++ b/resource-manager/automation/2022-08-08/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/schedule/id_automationaccount.go b/resource-manager/automation/2022-08-08/schedule/id_automationaccount.go index 1758b466257..aa9a3610114 100644 --- a/resource-manager/automation/2022-08-08/schedule/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/schedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/schedule/id_schedule.go b/resource-manager/automation/2022-08-08/schedule/id_schedule.go index 944ad0227b2..9f76e20993e 100644 --- a/resource-manager/automation/2022-08-08/schedule/id_schedule.go +++ b/resource-manager/automation/2022-08-08/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/schedule/method_createorupdate.go b/resource-manager/automation/2022-08-08/schedule/method_createorupdate.go index 4263ac8b9f4..901aa1f4c94 100644 --- a/resource-manager/automation/2022-08-08/schedule/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/schedule/method_get.go b/resource-manager/automation/2022-08-08/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/automation/2022-08-08/schedule/method_get.go +++ b/resource-manager/automation/2022-08-08/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/schedule/method_update.go b/resource-manager/automation/2022-08-08/schedule/method_update.go index c84276093ae..fbfab6d1144 100644 --- a/resource-manager/automation/2022-08-08/schedule/method_update.go +++ b/resource-manager/automation/2022-08-08/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/schedule/version.go b/resource-manager/automation/2022-08-08/schedule/version.go index 9fcc2a758b7..a0577b2f833 100644 --- a/resource-manager/automation/2022-08-08/schedule/version.go +++ b/resource-manager/automation/2022-08-08/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/README.md b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/README.md index 19d1ed4aac3..aa8962a314d 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/README.md +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun` Documentation -The `softwareupdateconfigurationmachinerun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `softwareupdateconfigurationmachinerun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/client.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/client.go index fd31306b48d..dc26e75ebf5 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/client.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationMachineRunClient struct { } func NewSoftwareUpdateConfigurationMachineRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationMachineRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationMachineRunClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_automationaccount.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_automationaccount.go index 9ffcdb66cc0..0244bd3c2e7 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go index 89171d686d7..019f836780e 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationMachineRunID(input string) (*SoftwareUpdate } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationMachineRunIDInsensitively(input string) (*S } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_getbyid.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_getbyid.go index 23b807e3e05..449eb4379bc 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_getbyid.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationMachineRunClient) GetById(ctx context.Context var model SoftwareUpdateConfigurationMachineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_list.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_list.go index 6f047c54ccc..bbd0f4ec908 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_list.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/version.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/version.go index 6166f44fbb5..5505ac92f6a 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/version.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationmachinerun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationmachinerun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/README.md b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/README.md index 6bd1ad38932..07bcf4c81cf 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/README.md +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun` Documentation -The `softwareupdateconfigurationrun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `softwareupdateconfigurationrun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/client.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/client.go index aa86f6dacdf..360338f920d 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/client.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationRunClient struct { } func NewSoftwareUpdateConfigurationRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationRunClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_automationaccount.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_automationaccount.go index 2c81cf2164d..e09df230b6b 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go index e903396f63d..8c0225c0dc0 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationRunID(input string) (*SoftwareUpdateConfigu } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationRunIDInsensitively(input string) (*Software } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_getbyid.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_getbyid.go index c4c6b07ca88..1985085c30e 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_getbyid.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationRunClient) GetById(ctx context.Context, id So var model SoftwareUpdateConfigurationRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_list.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_list.go index f6503cdb378..b8dcc77ca85 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_list.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/version.go b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/version.go index 612011cc5dd..486f0915414 100644 --- a/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/version.go +++ b/resource-manager/automation/2022-08-08/softwareupdateconfigurationrun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationrun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationrun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationrun/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/README.md b/resource-manager/automation/2022-08-08/sourcecontrol/README.md index 2a6a935d256..6499787169f 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/README.md +++ b/resource-manager/automation/2022-08-08/sourcecontrol/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/sourcecontrol` Documentation -The `sourcecontrol` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `sourcecontrol` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/client.go b/resource-manager/automation/2022-08-08/sourcecontrol/client.go index 5cc59fbc8dc..cf7d6d4d95c 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/client.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/client.go @@ -15,7 +15,7 @@ type SourceControlClient struct { } func NewSourceControlClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrol", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrol", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/id_automationaccount.go b/resource-manager/automation/2022-08-08/sourcecontrol/id_automationaccount.go index 80fde88426a..f866cc6fd24 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/id_sourcecontrol.go b/resource-manager/automation/2022-08-08/sourcecontrol/id_sourcecontrol.go index 1a333c90b2e..2e293367fa8 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/id_sourcecontrol.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/method_createorupdate.go b/resource-manager/automation/2022-08-08/sourcecontrol/method_createorupdate.go index cd75063d722..470c526d512 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlClient) CreateOrUpdate(ctx context.Context, id SourceContro var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/method_get.go b/resource-manager/automation/2022-08-08/sourcecontrol/method_get.go index db32fdf5036..435c74f2193 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/method_get.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlClient) Get(ctx context.Context, id SourceControlId) (resul var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/sourcecontrol/method_listbyautomationaccount.go index 9457e6a81fe..5872a01f8b8 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/method_update.go b/resource-manager/automation/2022-08-08/sourcecontrol/method_update.go index f00032bbff7..e4265560f5c 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/method_update.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/method_update.go @@ -49,7 +49,6 @@ func (c SourceControlClient) Update(ctx context.Context, id SourceControlId, inp var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrol/version.go b/resource-manager/automation/2022-08-08/sourcecontrol/version.go index 8539909b7c5..5c4343745dc 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrol/version.go +++ b/resource-manager/automation/2022-08-08/sourcecontrol/version.go @@ -1,12 +1,10 @@ package sourcecontrol -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrol/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrol/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/README.md b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/README.md index 2d42826d5c8..2d75968a2c2 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/README.md +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/sourcecontrolsyncjob` Documentation -The `sourcecontrolsyncjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `sourcecontrolsyncjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/client.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/client.go index 380f8581c8f..f17a5fe03f6 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/client.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobClient struct { } func NewSourceControlSyncJobClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrol.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrol.go index 45a497aaac6..18ee5a36a2a 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrol.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go index c15f95859d0..356a9c95896 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_create.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_create.go index 07efd101947..afaa631c092 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_create.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_create.go @@ -49,7 +49,6 @@ func (c SourceControlSyncJobClient) Create(ctx context.Context, id SourceControl var model SourceControlSyncJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_get.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_get.go index 5cb3e1e56f9..f0a7ca3d15e 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_get.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobClient) Get(ctx context.Context, id SourceControlSyn var model SourceControlSyncJobById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_listbyautomationaccount.go index 84bcd7a480d..1a4ea326345 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/version.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/version.go index 993a1378399..d08f0a0a46b 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/version.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjob/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjob/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/README.md b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/README.md index 625aa7c230f..3baaba81c62 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/README.md +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams` Documentation -The `sourcecontrolsyncjobstreams` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `sourcecontrolsyncjobstreams` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/client.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/client.go index 4e689c48c4f..0be682fcf30 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/client.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobStreamsClient struct { } func NewSourceControlSyncJobStreamsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobStreamsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobStreamsClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go index 210de5d23e8..520dc5f44c7 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go index a1d8a1ca967..fca0b86a471 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go @@ -48,7 +48,7 @@ func ParseSourceControlSyncJobStreamID(input string) (*SourceControlSyncJobStrea } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSourceControlSyncJobStreamIDInsensitively(input string) (*SourceContro } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_get.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_get.go index 867cf4899fc..02a68185a64 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_get.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobStreamsClient) Get(ctx context.Context, id SourceCon var model SourceControlSyncJobStreamById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_listbysyncjob.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_listbysyncjob.go index fe82bd504e4..11bad046f50 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_listbysyncjob.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/method_listbysyncjob.go @@ -39,6 +39,7 @@ func (o ListBySyncJobOperationOptions) ToHeaders() *client.Headers { func (o ListBySyncJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/version.go b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/version.go index 03e1a1d24cf..324eba70044 100644 --- a/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/version.go +++ b/resource-manager/automation/2022-08-08/sourcecontrolsyncjobstreams/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjobstreams -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/statistics/README.md b/resource-manager/automation/2022-08-08/statistics/README.md index f0e41fc19dc..320a8c1326b 100644 --- a/resource-manager/automation/2022-08-08/statistics/README.md +++ b/resource-manager/automation/2022-08-08/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/statistics/client.go b/resource-manager/automation/2022-08-08/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2022-08-08/statistics/client.go +++ b/resource-manager/automation/2022-08-08/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/statistics/id_automationaccount.go b/resource-manager/automation/2022-08-08/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2022-08-08/statistics/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2022-08-08/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/statistics/version.go b/resource-manager/automation/2022-08-08/statistics/version.go index 2508bf76e43..b3a47dbd6f9 100644 --- a/resource-manager/automation/2022-08-08/statistics/version.go +++ b/resource-manager/automation/2022-08-08/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/testjob/README.md b/resource-manager/automation/2022-08-08/testjob/README.md index e6239f204b3..78a164b569a 100644 --- a/resource-manager/automation/2022-08-08/testjob/README.md +++ b/resource-manager/automation/2022-08-08/testjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/testjob` Documentation -The `testjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `testjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/testjob/client.go b/resource-manager/automation/2022-08-08/testjob/client.go index 948c5b62e0b..42bf971c6be 100644 --- a/resource-manager/automation/2022-08-08/testjob/client.go +++ b/resource-manager/automation/2022-08-08/testjob/client.go @@ -15,7 +15,7 @@ type TestJobClient struct { } func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/testjob/id_runbook.go b/resource-manager/automation/2022-08-08/testjob/id_runbook.go index f8a57f87058..8989fb2b0e0 100644 --- a/resource-manager/automation/2022-08-08/testjob/id_runbook.go +++ b/resource-manager/automation/2022-08-08/testjob/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/testjob/method_create.go b/resource-manager/automation/2022-08-08/testjob/method_create.go index 7beb9fc0ab0..7e6ae18000f 100644 --- a/resource-manager/automation/2022-08-08/testjob/method_create.go +++ b/resource-manager/automation/2022-08-08/testjob/method_create.go @@ -50,7 +50,6 @@ func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCr var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/testjob/method_get.go b/resource-manager/automation/2022-08-08/testjob/method_get.go index be79f45aad2..911a70d9f03 100644 --- a/resource-manager/automation/2022-08-08/testjob/method_get.go +++ b/resource-manager/automation/2022-08-08/testjob/method_get.go @@ -46,7 +46,6 @@ func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/testjob/version.go b/resource-manager/automation/2022-08-08/testjob/version.go index 572efa7a81d..57f5d29efa9 100644 --- a/resource-manager/automation/2022-08-08/testjob/version.go +++ b/resource-manager/automation/2022-08-08/testjob/version.go @@ -1,12 +1,10 @@ package testjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjob/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/testjobstream/README.md b/resource-manager/automation/2022-08-08/testjobstream/README.md index 2f2b678577b..b2e3c887160 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/README.md +++ b/resource-manager/automation/2022-08-08/testjobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/testjobstream` Documentation -The `testjobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `testjobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/testjobstream/client.go b/resource-manager/automation/2022-08-08/testjobstream/client.go index b14681e53c2..7e656f450c0 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/client.go +++ b/resource-manager/automation/2022-08-08/testjobstream/client.go @@ -15,7 +15,7 @@ type TestJobStreamClient struct { } func NewTestJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/testjobstream/id_runbook.go b/resource-manager/automation/2022-08-08/testjobstream/id_runbook.go index 319f52ebaad..cb971105f88 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/id_runbook.go +++ b/resource-manager/automation/2022-08-08/testjobstream/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/testjobstream/id_testjobstream.go b/resource-manager/automation/2022-08-08/testjobstream/id_testjobstream.go index 0ebc73ded87..09b3674344b 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/id_testjobstream.go +++ b/resource-manager/automation/2022-08-08/testjobstream/id_testjobstream.go @@ -46,7 +46,7 @@ func ParseTestJobStreamID(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTestJobStreamIDInsensitively(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/testjobstream/method_get.go b/resource-manager/automation/2022-08-08/testjobstream/method_get.go index b94e2e9b62a..78292836ec2 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/method_get.go +++ b/resource-manager/automation/2022-08-08/testjobstream/method_get.go @@ -45,7 +45,6 @@ func (c TestJobStreamClient) Get(ctx context.Context, id TestJobStreamId) (resul var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/testjobstream/method_listbytestjob.go b/resource-manager/automation/2022-08-08/testjobstream/method_listbytestjob.go index 0c69bca0921..4898fc0bab9 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/method_listbytestjob.go +++ b/resource-manager/automation/2022-08-08/testjobstream/method_listbytestjob.go @@ -39,6 +39,7 @@ func (o ListByTestJobOperationOptions) ToHeaders() *client.Headers { func (o ListByTestJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2022-08-08/testjobstream/version.go b/resource-manager/automation/2022-08-08/testjobstream/version.go index 700d65cbcc5..cdb0d5dd1fe 100644 --- a/resource-manager/automation/2022-08-08/testjobstream/version.go +++ b/resource-manager/automation/2022-08-08/testjobstream/version.go @@ -1,12 +1,10 @@ package testjobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjobstream/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/typefields/README.md b/resource-manager/automation/2022-08-08/typefields/README.md index 0c9bb15c971..755f7139484 100644 --- a/resource-manager/automation/2022-08-08/typefields/README.md +++ b/resource-manager/automation/2022-08-08/typefields/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/typefields` Documentation -The `typefields` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `typefields` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/typefields/client.go b/resource-manager/automation/2022-08-08/typefields/client.go index e235fbc854f..d2929448756 100644 --- a/resource-manager/automation/2022-08-08/typefields/client.go +++ b/resource-manager/automation/2022-08-08/typefields/client.go @@ -15,7 +15,7 @@ type TypeFieldsClient struct { } func NewTypeFieldsClientWithBaseURI(sdkApi sdkEnv.Api) (*TypeFieldsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "typefields", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "typefields", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TypeFieldsClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/typefields/id_type.go b/resource-manager/automation/2022-08-08/typefields/id_type.go index 834ea978a07..e7ebc51ea54 100644 --- a/resource-manager/automation/2022-08-08/typefields/id_type.go +++ b/resource-manager/automation/2022-08-08/typefields/id_type.go @@ -46,7 +46,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/typefields/method_fieldslistbytype.go b/resource-manager/automation/2022-08-08/typefields/method_fieldslistbytype.go index 03945e9f500..18ca75f1933 100644 --- a/resource-manager/automation/2022-08-08/typefields/method_fieldslistbytype.go +++ b/resource-manager/automation/2022-08-08/typefields/method_fieldslistbytype.go @@ -46,7 +46,6 @@ func (c TypeFieldsClient) FieldsListByType(ctx context.Context, id TypeId) (resu var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/typefields/version.go b/resource-manager/automation/2022-08-08/typefields/version.go index 58022405687..686d2f90b6a 100644 --- a/resource-manager/automation/2022-08-08/typefields/version.go +++ b/resource-manager/automation/2022-08-08/typefields/version.go @@ -1,12 +1,10 @@ package typefields -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/typefields/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/typefields/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/usages/README.md b/resource-manager/automation/2022-08-08/usages/README.md index 6ea121bd3d9..50b11e53f62 100644 --- a/resource-manager/automation/2022-08-08/usages/README.md +++ b/resource-manager/automation/2022-08-08/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/usages/client.go b/resource-manager/automation/2022-08-08/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2022-08-08/usages/client.go +++ b/resource-manager/automation/2022-08-08/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/usages/id_automationaccount.go b/resource-manager/automation/2022-08-08/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2022-08-08/usages/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/usages/method_listbyautomationaccount.go b/resource-manager/automation/2022-08-08/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2022-08-08/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2022-08-08/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/usages/version.go b/resource-manager/automation/2022-08-08/usages/version.go index 5aa2c60ce1c..6dcea154513 100644 --- a/resource-manager/automation/2022-08-08/usages/version.go +++ b/resource-manager/automation/2022-08-08/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2022-08-08" } diff --git a/resource-manager/automation/2022-08-08/variable/README.md b/resource-manager/automation/2022-08-08/variable/README.md index c0fc7f6dad4..c1dcf62f88a 100644 --- a/resource-manager/automation/2022-08-08/variable/README.md +++ b/resource-manager/automation/2022-08-08/variable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2022-08-08/variable` Documentation -The `variable` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2022-08-08`). +The `variable` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2022-08-08/variable/client.go b/resource-manager/automation/2022-08-08/variable/client.go index b52efe661a6..8e293b273f0 100644 --- a/resource-manager/automation/2022-08-08/variable/client.go +++ b/resource-manager/automation/2022-08-08/variable/client.go @@ -15,7 +15,7 @@ type VariableClient struct { } func NewVariableClientWithBaseURI(sdkApi sdkEnv.Api) (*VariableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "variable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "variable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VariableClient: %+v", err) } diff --git a/resource-manager/automation/2022-08-08/variable/id_automationaccount.go b/resource-manager/automation/2022-08-08/variable/id_automationaccount.go index 635e56dfae8..09be4df2a66 100644 --- a/resource-manager/automation/2022-08-08/variable/id_automationaccount.go +++ b/resource-manager/automation/2022-08-08/variable/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/variable/id_variable.go b/resource-manager/automation/2022-08-08/variable/id_variable.go index aab429f68a4..63f8c9328fc 100644 --- a/resource-manager/automation/2022-08-08/variable/id_variable.go +++ b/resource-manager/automation/2022-08-08/variable/id_variable.go @@ -44,7 +44,7 @@ func ParseVariableID(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2022-08-08/variable/method_createorupdate.go b/resource-manager/automation/2022-08-08/variable/method_createorupdate.go index 7f1d31eeacc..35a90d4c131 100644 --- a/resource-manager/automation/2022-08-08/variable/method_createorupdate.go +++ b/resource-manager/automation/2022-08-08/variable/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VariableClient) CreateOrUpdate(ctx context.Context, id VariableId, input var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/variable/method_get.go b/resource-manager/automation/2022-08-08/variable/method_get.go index a84e304f5a0..6d865e8141f 100644 --- a/resource-manager/automation/2022-08-08/variable/method_get.go +++ b/resource-manager/automation/2022-08-08/variable/method_get.go @@ -45,7 +45,6 @@ func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOpera var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/variable/method_update.go b/resource-manager/automation/2022-08-08/variable/method_update.go index cba7dfa356a..d63d977348b 100644 --- a/resource-manager/automation/2022-08-08/variable/method_update.go +++ b/resource-manager/automation/2022-08-08/variable/method_update.go @@ -49,7 +49,6 @@ func (c VariableClient) Update(ctx context.Context, id VariableId, input Variabl var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2022-08-08/variable/version.go b/resource-manager/automation/2022-08-08/variable/version.go index 837cc6b5d77..f835637e3c7 100644 --- a/resource-manager/automation/2022-08-08/variable/version.go +++ b/resource-manager/automation/2022-08-08/variable/version.go @@ -1,12 +1,10 @@ package variable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/variable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/variable/2022-08-08" } diff --git a/resource-manager/automation/2023-11-01/activity/README.md b/resource-manager/automation/2023-11-01/activity/README.md index 2d80db88706..7295fdf7e9e 100644 --- a/resource-manager/automation/2023-11-01/activity/README.md +++ b/resource-manager/automation/2023-11-01/activity/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/activity` Documentation -The `activity` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `activity` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/activity/client.go b/resource-manager/automation/2023-11-01/activity/client.go index 0142d55ea1f..7e366361ec1 100644 --- a/resource-manager/automation/2023-11-01/activity/client.go +++ b/resource-manager/automation/2023-11-01/activity/client.go @@ -15,7 +15,7 @@ type ActivityClient struct { } func NewActivityClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activity", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activity", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/activity/id_activity.go b/resource-manager/automation/2023-11-01/activity/id_activity.go index 87b1df1f763..545b302d28e 100644 --- a/resource-manager/automation/2023-11-01/activity/id_activity.go +++ b/resource-manager/automation/2023-11-01/activity/id_activity.go @@ -46,7 +46,7 @@ func ParseActivityID(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActivityIDInsensitively(input string) (*ActivityId, error) { } id := ActivityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/activity/id_module.go b/resource-manager/automation/2023-11-01/activity/id_module.go index 2c22f0316ae..48065b72334 100644 --- a/resource-manager/automation/2023-11-01/activity/id_module.go +++ b/resource-manager/automation/2023-11-01/activity/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/activity/method_get.go b/resource-manager/automation/2023-11-01/activity/method_get.go index d91dc4e2e43..c212d18aab0 100644 --- a/resource-manager/automation/2023-11-01/activity/method_get.go +++ b/resource-manager/automation/2023-11-01/activity/method_get.go @@ -45,7 +45,6 @@ func (c ActivityClient) Get(ctx context.Context, id ActivityId) (result GetOpera var model Activity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/activity/version.go b/resource-manager/automation/2023-11-01/activity/version.go index 4ca248b2d2c..8e597a00ab7 100644 --- a/resource-manager/automation/2023-11-01/activity/version.go +++ b/resource-manager/automation/2023-11-01/activity/version.go @@ -1,12 +1,10 @@ package activity -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activity/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activity/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/automationaccount/README.md b/resource-manager/automation/2023-11-01/automationaccount/README.md index 484b7024bd1..e481bd07b14 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/README.md +++ b/resource-manager/automation/2023-11-01/automationaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/automationaccount` Documentation -The `automationaccount` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `automationaccount` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/automationaccount/client.go b/resource-manager/automation/2023-11-01/automationaccount/client.go index 6343afe1975..b59c3783797 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/client.go +++ b/resource-manager/automation/2023-11-01/automationaccount/client.go @@ -15,7 +15,7 @@ type AutomationAccountClient struct { } func NewAutomationAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationAccountClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go b/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go index 4c9ae7a643e..1acff6c4a22 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/automationaccount/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/automationaccount/method_createorupdate.go b/resource-manager/automation/2023-11-01/automationaccount/method_createorupdate.go index ac9cf1649c0..4f8234791c6 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/automationaccount/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationAccountClient) CreateOrUpdate(ctx context.Context, id Automati var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/automationaccount/method_get.go b/resource-manager/automation/2023-11-01/automationaccount/method_get.go index 1f43de0d06f..c0b72f52db2 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/method_get.go +++ b/resource-manager/automation/2023-11-01/automationaccount/method_get.go @@ -45,7 +45,6 @@ func (c AutomationAccountClient) Get(ctx context.Context, id AutomationAccountId var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/automationaccount/method_update.go b/resource-manager/automation/2023-11-01/automationaccount/method_update.go index dd915f53bc4..b3a0baa7d28 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/method_update.go +++ b/resource-manager/automation/2023-11-01/automationaccount/method_update.go @@ -49,7 +49,6 @@ func (c AutomationAccountClient) Update(ctx context.Context, id AutomationAccoun var model AutomationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/automationaccount/version.go b/resource-manager/automation/2023-11-01/automationaccount/version.go index 38823f62978..a141c54024f 100644 --- a/resource-manager/automation/2023-11-01/automationaccount/version.go +++ b/resource-manager/automation/2023-11-01/automationaccount/version.go @@ -1,12 +1,10 @@ package automationaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationaccount/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/certificate/README.md b/resource-manager/automation/2023-11-01/certificate/README.md index 464d6699b01..2b22fb9cda4 100644 --- a/resource-manager/automation/2023-11-01/certificate/README.md +++ b/resource-manager/automation/2023-11-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/certificate/client.go b/resource-manager/automation/2023-11-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/automation/2023-11-01/certificate/client.go +++ b/resource-manager/automation/2023-11-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go b/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go index 29c8860dc29..e5efa36aa52 100644 --- a/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/certificate/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/certificate/id_certificate.go b/resource-manager/automation/2023-11-01/certificate/id_certificate.go index 6ab72756d10..7d31e9ea831 100644 --- a/resource-manager/automation/2023-11-01/certificate/id_certificate.go +++ b/resource-manager/automation/2023-11-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/certificate/method_createorupdate.go b/resource-manager/automation/2023-11-01/certificate/method_createorupdate.go index 0b944c57e50..1e5de85afb2 100644 --- a/resource-manager/automation/2023-11-01/certificate/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/certificate/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/certificate/method_get.go b/resource-manager/automation/2023-11-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/automation/2023-11-01/certificate/method_get.go +++ b/resource-manager/automation/2023-11-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/certificate/method_update.go b/resource-manager/automation/2023-11-01/certificate/method_update.go index 6fbe2d4a340..b4c51d673ad 100644 --- a/resource-manager/automation/2023-11-01/certificate/method_update.go +++ b/resource-manager/automation/2023-11-01/certificate/method_update.go @@ -49,7 +49,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/certificate/version.go b/resource-manager/automation/2023-11-01/certificate/version.go index 480fdf6c0ac..1419590e8d6 100644 --- a/resource-manager/automation/2023-11-01/certificate/version.go +++ b/resource-manager/automation/2023-11-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/connection/README.md b/resource-manager/automation/2023-11-01/connection/README.md index 81c09ad8e31..a3f7720f168 100644 --- a/resource-manager/automation/2023-11-01/connection/README.md +++ b/resource-manager/automation/2023-11-01/connection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connection` Documentation -The `connection` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `connection` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/connection/client.go b/resource-manager/automation/2023-11-01/connection/client.go index 3f066e2e653..0c3f5a2848b 100644 --- a/resource-manager/automation/2023-11-01/connection/client.go +++ b/resource-manager/automation/2023-11-01/connection/client.go @@ -15,7 +15,7 @@ type ConnectionClient struct { } func NewConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/connection/id_automationaccount.go b/resource-manager/automation/2023-11-01/connection/id_automationaccount.go index ec1aaa6092f..304d6566f3f 100644 --- a/resource-manager/automation/2023-11-01/connection/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/connection/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/connection/id_connection.go b/resource-manager/automation/2023-11-01/connection/id_connection.go index 6ec1093cd2b..0e6c2604874 100644 --- a/resource-manager/automation/2023-11-01/connection/id_connection.go +++ b/resource-manager/automation/2023-11-01/connection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/connection/method_createorupdate.go b/resource-manager/automation/2023-11-01/connection/method_createorupdate.go index b1f0dd9e309..b6f6f47e462 100644 --- a/resource-manager/automation/2023-11-01/connection/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/connection/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionClient) CreateOrUpdate(ctx context.Context, id ConnectionId, i var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/connection/method_get.go b/resource-manager/automation/2023-11-01/connection/method_get.go index 16d9f30e8c8..602490999ff 100644 --- a/resource-manager/automation/2023-11-01/connection/method_get.go +++ b/resource-manager/automation/2023-11-01/connection/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionClient) Get(ctx context.Context, id ConnectionId) (result GetO var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/connection/method_update.go b/resource-manager/automation/2023-11-01/connection/method_update.go index 1c57761fbc1..11dff660df6 100644 --- a/resource-manager/automation/2023-11-01/connection/method_update.go +++ b/resource-manager/automation/2023-11-01/connection/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionClient) Update(ctx context.Context, id ConnectionId, input Con var model Connection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/connection/version.go b/resource-manager/automation/2023-11-01/connection/version.go index ef201c5acf7..5c9b173f54b 100644 --- a/resource-manager/automation/2023-11-01/connection/version.go +++ b/resource-manager/automation/2023-11-01/connection/version.go @@ -1,12 +1,10 @@ package connection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connection/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/connectiontype/README.md b/resource-manager/automation/2023-11-01/connectiontype/README.md index 3d92fbf2596..e7e899523fb 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/README.md +++ b/resource-manager/automation/2023-11-01/connectiontype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/connectiontype` Documentation -The `connectiontype` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `connectiontype` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/connectiontype/client.go b/resource-manager/automation/2023-11-01/connectiontype/client.go index c5cc541fae3..bd83ae0611a 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/client.go +++ b/resource-manager/automation/2023-11-01/connectiontype/client.go @@ -15,7 +15,7 @@ type ConnectionTypeClient struct { } func NewConnectionTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiontype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiontype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionTypeClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go b/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go index 3f9b9b3fc08..90cd0ad2006 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/connectiontype/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go b/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go index 6fb2d1c07b2..3945becf946 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go +++ b/resource-manager/automation/2023-11-01/connectiontype/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/connectiontype/method_createorupdate.go b/resource-manager/automation/2023-11-01/connectiontype/method_createorupdate.go index 9733a9a7c13..b5482180669 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/connectiontype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectionTypeClient) CreateOrUpdate(ctx context.Context, id ConnectionT var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/connectiontype/method_get.go b/resource-manager/automation/2023-11-01/connectiontype/method_get.go index 54be67f6226..f4bc697608c 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/method_get.go +++ b/resource-manager/automation/2023-11-01/connectiontype/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionTypeClient) Get(ctx context.Context, id ConnectionTypeId) (res var model ConnectionType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/connectiontype/version.go b/resource-manager/automation/2023-11-01/connectiontype/version.go index f9c50bf569c..f2354485914 100644 --- a/resource-manager/automation/2023-11-01/connectiontype/version.go +++ b/resource-manager/automation/2023-11-01/connectiontype/version.go @@ -1,12 +1,10 @@ package connectiontype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiontype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiontype/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/credential/README.md b/resource-manager/automation/2023-11-01/credential/README.md index 261f50f56ae..164b6c17d5d 100644 --- a/resource-manager/automation/2023-11-01/credential/README.md +++ b/resource-manager/automation/2023-11-01/credential/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/credential` Documentation -The `credential` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `credential` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/credential/client.go b/resource-manager/automation/2023-11-01/credential/client.go index 2e36e15446b..52f1e66c317 100644 --- a/resource-manager/automation/2023-11-01/credential/client.go +++ b/resource-manager/automation/2023-11-01/credential/client.go @@ -15,7 +15,7 @@ type CredentialClient struct { } func NewCredentialClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credential", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credential", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/credential/id_automationaccount.go b/resource-manager/automation/2023-11-01/credential/id_automationaccount.go index 173accecf18..d363cf9c0b2 100644 --- a/resource-manager/automation/2023-11-01/credential/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/credential/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/credential/id_credential.go b/resource-manager/automation/2023-11-01/credential/id_credential.go index 7e4319efe94..6b4b028d5fd 100644 --- a/resource-manager/automation/2023-11-01/credential/id_credential.go +++ b/resource-manager/automation/2023-11-01/credential/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/credential/method_createorupdate.go b/resource-manager/automation/2023-11-01/credential/method_createorupdate.go index 046ed79f991..2c5f73f9dfe 100644 --- a/resource-manager/automation/2023-11-01/credential/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/credential/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CredentialClient) CreateOrUpdate(ctx context.Context, id CredentialId, i var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/credential/method_get.go b/resource-manager/automation/2023-11-01/credential/method_get.go index f9008350a37..225e47cfe42 100644 --- a/resource-manager/automation/2023-11-01/credential/method_get.go +++ b/resource-manager/automation/2023-11-01/credential/method_get.go @@ -45,7 +45,6 @@ func (c CredentialClient) Get(ctx context.Context, id CredentialId) (result GetO var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/credential/method_update.go b/resource-manager/automation/2023-11-01/credential/method_update.go index bb2022825d5..da04941cd11 100644 --- a/resource-manager/automation/2023-11-01/credential/method_update.go +++ b/resource-manager/automation/2023-11-01/credential/method_update.go @@ -49,7 +49,6 @@ func (c CredentialClient) Update(ctx context.Context, id CredentialId, input Cre var model Credential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/credential/version.go b/resource-manager/automation/2023-11-01/credential/version.go index 871a8966fa7..75f7ef3903a 100644 --- a/resource-manager/automation/2023-11-01/credential/version.go +++ b/resource-manager/automation/2023-11-01/credential/version.go @@ -1,12 +1,10 @@ package credential -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credential/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credential/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/README.md b/resource-manager/automation/2023-11-01/dscconfiguration/README.md index 4589e9c03ff..617819fdf6c 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/README.md +++ b/resource-manager/automation/2023-11-01/dscconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscconfiguration` Documentation -The `dscconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `dscconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/client.go b/resource-manager/automation/2023-11-01/dscconfiguration/client.go index 33d7d66ff2e..b0bf9421d65 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/client.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/client.go @@ -15,7 +15,7 @@ type DscConfigurationClient struct { } func NewDscConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go b/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go index a9b7ac7041d..8a7a211ee52 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go b/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go index 0cb80dea3e2..b77ddf9f20a 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/method_createorupdate.go b/resource-manager/automation/2023-11-01/dscconfiguration/method_createorupdate.go index 5096a6df27c..9fcc3d6a75b 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DscConfigurationClient) CreateOrUpdate(ctx context.Context, id Configura var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/method_get.go b/resource-manager/automation/2023-11-01/dscconfiguration/method_get.go index 0ec24024e26..e53beeed617 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/method_get.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscConfigurationClient) Get(ctx context.Context, id ConfigurationId) (re var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/method_getcontent.go b/resource-manager/automation/2023-11-01/dscconfiguration/method_getcontent.go index 34c430ed62f..74269aa1a64 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/method_getcontent.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/method_getcontent.go @@ -46,7 +46,6 @@ func (c DscConfigurationClient) GetContent(ctx context.Context, id Configuration var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/dscconfiguration/method_listbyautomationaccount.go index 8a4b09db266..19cb7180e57 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/method_update.go b/resource-manager/automation/2023-11-01/dscconfiguration/method_update.go index 89ed13be39f..c842ef5f4b3 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/method_update.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/method_update.go @@ -49,7 +49,6 @@ func (c DscConfigurationClient) Update(ctx context.Context, id ConfigurationId, var model DscConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/dscconfiguration/version.go b/resource-manager/automation/2023-11-01/dscconfiguration/version.go index 446a41ac781..4413eefcbe9 100644 --- a/resource-manager/automation/2023-11-01/dscconfiguration/version.go +++ b/resource-manager/automation/2023-11-01/dscconfiguration/version.go @@ -1,12 +1,10 @@ package dscconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscconfiguration/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/README.md b/resource-manager/automation/2023-11-01/dscnodeconfiguration/README.md index d08656a7857..4a5eb6d6199 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/README.md +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/dscnodeconfiguration` Documentation -The `dscnodeconfiguration` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `dscnodeconfiguration` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/client.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/client.go index 60e2159464d..d9d09f3a59d 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/client.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/client.go @@ -15,7 +15,7 @@ type DscNodeConfigurationClient struct { } func NewDscNodeConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscNodeConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscnodeconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscNodeConfigurationClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go index 2857bb759ef..5320db63946 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go index 55f9ef787e5..a79bf5fcc78 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_get.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_get.go index 3971e32ad95..09e5cef4f75 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_get.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscNodeConfigurationClient) Get(ctx context.Context, id NodeConfiguratio var model DscNodeConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_listbyautomationaccount.go index 707c87a2ebc..cd9762499e3 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/dscnodeconfiguration/version.go b/resource-manager/automation/2023-11-01/dscnodeconfiguration/version.go index 92d51046fc5..be796b1a6d0 100644 --- a/resource-manager/automation/2023-11-01/dscnodeconfiguration/version.go +++ b/resource-manager/automation/2023-11-01/dscnodeconfiguration/version.go @@ -1,12 +1,10 @@ package dscnodeconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscnodeconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscnodeconfiguration/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/README.md b/resource-manager/automation/2023-11-01/hybridrunbookworker/README.md index eec27bf2dd1..b4bfb13e07d 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/README.md +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworker` Documentation -The `hybridrunbookworker` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `hybridrunbookworker` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/client.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/client.go index ff1996db3d7..db47418435b 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/client.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerClient struct { } func NewHybridRunbookWorkerClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworker", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworker", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go index aed59dbb642..1ac98309191 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworker.go @@ -46,7 +46,7 @@ func ParseHybridRunbookWorkerID(input string) (*HybridRunbookWorkerId, error) { } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridRunbookWorkerIDInsensitively(input string) (*HybridRunbookWorker } id := HybridRunbookWorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go index a5175098bc7..75642f8757e 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_create.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_create.go index 822b711b23a..b115ec66d5d 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_create.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_create.go @@ -50,7 +50,6 @@ func (c HybridRunbookWorkerClient) Create(ctx context.Context, id HybridRunbookW var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_get.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_get.go index fa75f9769d4..68d91089f3b 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_get.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerClient) Get(ctx context.Context, id HybridRunbookWork var model HybridRunbookWorker result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go index 3b13c74775b..a7430c3925e 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/method_listbyhybridrunbookworkergroup.go @@ -39,6 +39,7 @@ func (o ListByHybridRunbookWorkerGroupOperationOptions) ToHeaders() *client.Head func (o ListByHybridRunbookWorkerGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworker/version.go b/resource-manager/automation/2023-11-01/hybridrunbookworker/version.go index 023858e621c..7f8e933c9a3 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworker/version.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworker/version.go @@ -1,12 +1,10 @@ package hybridrunbookworker -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworker/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworker/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/README.md b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/README.md index 4269b9147c2..ed03ddaa736 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/README.md +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/hybridrunbookworkergroup` Documentation -The `hybridrunbookworkergroup` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `hybridrunbookworkergroup` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/client.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/client.go index f5ebfd7b744..f84337b229d 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/client.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/client.go @@ -15,7 +15,7 @@ type HybridRunbookWorkerGroupClient struct { } func NewHybridRunbookWorkerGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridRunbookWorkerGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridrunbookworkergroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridRunbookWorkerGroupClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go index 4691bac9341..77a39d61266 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go index d73dae7dadc..d3fcbbec729 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/id_hybridrunbookworkergroup.go @@ -44,7 +44,7 @@ func ParseHybridRunbookWorkerGroupID(input string) (*HybridRunbookWorkerGroupId, } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridRunbookWorkerGroupIDInsensitively(input string) (*HybridRunbookW } id := HybridRunbookWorkerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_create.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_create.go index c07fc22ea1f..3412d58df6c 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_create.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_create.go @@ -50,7 +50,6 @@ func (c HybridRunbookWorkerGroupClient) Create(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_get.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_get.go index 4b828073e8e..f65f19d4bb8 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_get.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_get.go @@ -45,7 +45,6 @@ func (c HybridRunbookWorkerGroupClient) Get(ctx context.Context, id HybridRunboo var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_listbyautomationaccount.go index 347df8f2b27..bd8a57d333c 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_update.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_update.go index 237b923dae3..cb58eab5762 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_update.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/method_update.go @@ -49,7 +49,6 @@ func (c HybridRunbookWorkerGroupClient) Update(ctx context.Context, id HybridRun var model HybridRunbookWorkerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/version.go b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/version.go index 91db42a74eb..832c0e734e3 100644 --- a/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/version.go +++ b/resource-manager/automation/2023-11-01/hybridrunbookworkergroup/version.go @@ -1,12 +1,10 @@ package hybridrunbookworkergroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridrunbookworkergroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridrunbookworkergroup/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/job/README.md b/resource-manager/automation/2023-11-01/job/README.md index 82cf3429f2d..278aa1783ea 100644 --- a/resource-manager/automation/2023-11-01/job/README.md +++ b/resource-manager/automation/2023-11-01/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `job` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/job/client.go b/resource-manager/automation/2023-11-01/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/automation/2023-11-01/job/client.go +++ b/resource-manager/automation/2023-11-01/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/job/id_automationaccount.go b/resource-manager/automation/2023-11-01/job/id_automationaccount.go index a03de714fcf..03473fb15a7 100644 --- a/resource-manager/automation/2023-11-01/job/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/job/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/job/id_job.go b/resource-manager/automation/2023-11-01/job/id_job.go index d9ee96305cf..c8265a630cf 100644 --- a/resource-manager/automation/2023-11-01/job/id_job.go +++ b/resource-manager/automation/2023-11-01/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/job/method_create.go b/resource-manager/automation/2023-11-01/job/method_create.go index 20181d88e2e..157bfbc1811 100644 --- a/resource-manager/automation/2023-11-01/job/method_create.go +++ b/resource-manager/automation/2023-11-01/job/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c JobClient) Create(ctx context.Context, id JobId, input JobCreateParamete var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/job/method_get.go b/resource-manager/automation/2023-11-01/job/method_get.go index 70b2a88ce70..f8444387c47 100644 --- a/resource-manager/automation/2023-11-01/job/method_get.go +++ b/resource-manager/automation/2023-11-01/job/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) Get(ctx context.Context, id JobId, options GetOperationOption var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/job/method_getoutput.go b/resource-manager/automation/2023-11-01/job/method_getoutput.go index c5e0edacdb0..1255914f3ea 100644 --- a/resource-manager/automation/2023-11-01/job/method_getoutput.go +++ b/resource-manager/automation/2023-11-01/job/method_getoutput.go @@ -36,6 +36,7 @@ func (o GetOutputOperationOptions) ToHeaders() *client.Headers { func (o GetOutputOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetOutput(ctx context.Context, id JobId, options GetOutputOpe var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/job/method_getrunbookcontent.go b/resource-manager/automation/2023-11-01/job/method_getrunbookcontent.go index a7a244d9859..bf20b3af24a 100644 --- a/resource-manager/automation/2023-11-01/job/method_getrunbookcontent.go +++ b/resource-manager/automation/2023-11-01/job/method_getrunbookcontent.go @@ -36,6 +36,7 @@ func (o GetRunbookContentOperationOptions) ToHeaders() *client.Headers { func (o GetRunbookContentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobClient) GetRunbookContent(ctx context.Context, id JobId, options GetR var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/job/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/job/method_listbyautomationaccount.go index 504bd861221..df1c74e6a31 100644 --- a/resource-manager/automation/2023-11-01/job/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/job/method_listbyautomationaccount.go @@ -42,6 +42,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/job/method_resume.go b/resource-manager/automation/2023-11-01/job/method_resume.go index c707c2a9c74..d5080a44a1b 100644 --- a/resource-manager/automation/2023-11-01/job/method_resume.go +++ b/resource-manager/automation/2023-11-01/job/method_resume.go @@ -35,6 +35,7 @@ func (o ResumeOperationOptions) ToHeaders() *client.Headers { func (o ResumeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/job/method_stop.go b/resource-manager/automation/2023-11-01/job/method_stop.go index d2864853dff..91d406b28f9 100644 --- a/resource-manager/automation/2023-11-01/job/method_stop.go +++ b/resource-manager/automation/2023-11-01/job/method_stop.go @@ -35,6 +35,7 @@ func (o StopOperationOptions) ToHeaders() *client.Headers { func (o StopOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/job/method_suspend.go b/resource-manager/automation/2023-11-01/job/method_suspend.go index bc8f428afbb..533d6922f83 100644 --- a/resource-manager/automation/2023-11-01/job/method_suspend.go +++ b/resource-manager/automation/2023-11-01/job/method_suspend.go @@ -35,6 +35,7 @@ func (o SuspendOperationOptions) ToHeaders() *client.Headers { func (o SuspendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/job/version.go b/resource-manager/automation/2023-11-01/job/version.go index 5aa0f3df95d..7b87150b15e 100644 --- a/resource-manager/automation/2023-11-01/job/version.go +++ b/resource-manager/automation/2023-11-01/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/jobschedule/README.md b/resource-manager/automation/2023-11-01/jobschedule/README.md index 8a9a9344a3f..c58355f2b04 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/README.md +++ b/resource-manager/automation/2023-11-01/jobschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobschedule` Documentation -The `jobschedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `jobschedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/jobschedule/client.go b/resource-manager/automation/2023-11-01/jobschedule/client.go index 4c9fb976839..18a0e89bd37 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/client.go +++ b/resource-manager/automation/2023-11-01/jobschedule/client.go @@ -15,7 +15,7 @@ type JobScheduleClient struct { } func NewJobScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*JobScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go b/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go index 330e6504743..e21e84913de 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/jobschedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go b/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go index 9276d099eb3..896164a6098 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go +++ b/resource-manager/automation/2023-11-01/jobschedule/id_jobschedule.go @@ -44,7 +44,7 @@ func ParseJobScheduleID(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobScheduleIDInsensitively(input string) (*JobScheduleId, error) { } id := JobScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/jobschedule/method_create.go b/resource-manager/automation/2023-11-01/jobschedule/method_create.go index 03831935824..676325e8c02 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/method_create.go +++ b/resource-manager/automation/2023-11-01/jobschedule/method_create.go @@ -49,7 +49,6 @@ func (c JobScheduleClient) Create(ctx context.Context, id JobScheduleId, input J var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/jobschedule/method_get.go b/resource-manager/automation/2023-11-01/jobschedule/method_get.go index 0721b83e4be..913490c8175 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/method_get.go +++ b/resource-manager/automation/2023-11-01/jobschedule/method_get.go @@ -45,7 +45,6 @@ func (c JobScheduleClient) Get(ctx context.Context, id JobScheduleId) (result Ge var model JobSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/jobschedule/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/jobschedule/method_listbyautomationaccount.go index 6b5c6412a83..74ee8cd52b4 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/jobschedule/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/jobschedule/version.go b/resource-manager/automation/2023-11-01/jobschedule/version.go index 00235dc94c8..c84726cf531 100644 --- a/resource-manager/automation/2023-11-01/jobschedule/version.go +++ b/resource-manager/automation/2023-11-01/jobschedule/version.go @@ -1,12 +1,10 @@ package jobschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobschedule/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/jobstream/README.md b/resource-manager/automation/2023-11-01/jobstream/README.md index b244ef71b04..55951c904f4 100644 --- a/resource-manager/automation/2023-11-01/jobstream/README.md +++ b/resource-manager/automation/2023-11-01/jobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/jobstream` Documentation -The `jobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `jobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/jobstream/client.go b/resource-manager/automation/2023-11-01/jobstream/client.go index 880cfb48113..8711950a051 100644 --- a/resource-manager/automation/2023-11-01/jobstream/client.go +++ b/resource-manager/automation/2023-11-01/jobstream/client.go @@ -15,7 +15,7 @@ type JobStreamClient struct { } func NewJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/jobstream/id_job.go b/resource-manager/automation/2023-11-01/jobstream/id_job.go index d37d4f381dd..f4ff7b46fb8 100644 --- a/resource-manager/automation/2023-11-01/jobstream/id_job.go +++ b/resource-manager/automation/2023-11-01/jobstream/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/jobstream/id_stream.go b/resource-manager/automation/2023-11-01/jobstream/id_stream.go index cc03ad44f41..8019e348b44 100644 --- a/resource-manager/automation/2023-11-01/jobstream/id_stream.go +++ b/resource-manager/automation/2023-11-01/jobstream/id_stream.go @@ -46,7 +46,7 @@ func ParseStreamID(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStreamIDInsensitively(input string) (*StreamId, error) { } id := StreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/jobstream/method_get.go b/resource-manager/automation/2023-11-01/jobstream/method_get.go index 500505c3b4f..3682e1236de 100644 --- a/resource-manager/automation/2023-11-01/jobstream/method_get.go +++ b/resource-manager/automation/2023-11-01/jobstream/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c JobStreamClient) Get(ctx context.Context, id StreamId, options GetOperat var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/jobstream/method_listbyjob.go b/resource-manager/automation/2023-11-01/jobstream/method_listbyjob.go index 4d6eee1cc84..80cd095c7ca 100644 --- a/resource-manager/automation/2023-11-01/jobstream/method_listbyjob.go +++ b/resource-manager/automation/2023-11-01/jobstream/method_listbyjob.go @@ -42,6 +42,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/jobstream/version.go b/resource-manager/automation/2023-11-01/jobstream/version.go index 119636d85ce..969a2b86995 100644 --- a/resource-manager/automation/2023-11-01/jobstream/version.go +++ b/resource-manager/automation/2023-11-01/jobstream/version.go @@ -1,12 +1,10 @@ package jobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstream/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/linkedworkspace/README.md b/resource-manager/automation/2023-11-01/linkedworkspace/README.md index a489500c58d..e9775a42f96 100644 --- a/resource-manager/automation/2023-11-01/linkedworkspace/README.md +++ b/resource-manager/automation/2023-11-01/linkedworkspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/linkedworkspace` Documentation -The `linkedworkspace` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `linkedworkspace` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/linkedworkspace/client.go b/resource-manager/automation/2023-11-01/linkedworkspace/client.go index 265eab06051..ce26bf57e1c 100644 --- a/resource-manager/automation/2023-11-01/linkedworkspace/client.go +++ b/resource-manager/automation/2023-11-01/linkedworkspace/client.go @@ -15,7 +15,7 @@ type LinkedWorkspaceClient struct { } func NewLinkedWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedWorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedworkspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedworkspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedWorkspaceClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go b/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go index 33e45a35f32..897343bb6cd 100644 --- a/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/linkedworkspace/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/linkedworkspace/method_get.go b/resource-manager/automation/2023-11-01/linkedworkspace/method_get.go index 7ea3ca17eaf..7019324f5a3 100644 --- a/resource-manager/automation/2023-11-01/linkedworkspace/method_get.go +++ b/resource-manager/automation/2023-11-01/linkedworkspace/method_get.go @@ -46,7 +46,6 @@ func (c LinkedWorkspaceClient) Get(ctx context.Context, id AutomationAccountId) var model LinkedWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/linkedworkspace/version.go b/resource-manager/automation/2023-11-01/linkedworkspace/version.go index 219c69970d6..38c1e0e1496 100644 --- a/resource-manager/automation/2023-11-01/linkedworkspace/version.go +++ b/resource-manager/automation/2023-11-01/linkedworkspace/version.go @@ -1,12 +1,10 @@ package linkedworkspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedworkspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedworkspace/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/listkeys/README.md b/resource-manager/automation/2023-11-01/listkeys/README.md index 353c9c962de..f05cb8aec32 100644 --- a/resource-manager/automation/2023-11-01/listkeys/README.md +++ b/resource-manager/automation/2023-11-01/listkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/listkeys` Documentation -The `listkeys` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `listkeys` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/listkeys/client.go b/resource-manager/automation/2023-11-01/listkeys/client.go index ae0d6b6f1b9..2c8aa63a7db 100644 --- a/resource-manager/automation/2023-11-01/listkeys/client.go +++ b/resource-manager/automation/2023-11-01/listkeys/client.go @@ -15,7 +15,7 @@ type ListKeysClient struct { } func NewListKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListKeysClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go b/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go index daa81dd7bf6..8d6f10e2750 100644 --- a/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/listkeys/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/listkeys/method_keyslistbyautomationaccount.go b/resource-manager/automation/2023-11-01/listkeys/method_keyslistbyautomationaccount.go index fd503558845..acd80c5773f 100644 --- a/resource-manager/automation/2023-11-01/listkeys/method_keyslistbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/listkeys/method_keyslistbyautomationaccount.go @@ -46,7 +46,6 @@ func (c ListKeysClient) KeysListByAutomationAccount(ctx context.Context, id Auto var model KeyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/listkeys/version.go b/resource-manager/automation/2023-11-01/listkeys/version.go index 0e4fe52302d..7e5198f2e19 100644 --- a/resource-manager/automation/2023-11-01/listkeys/version.go +++ b/resource-manager/automation/2023-11-01/listkeys/version.go @@ -1,12 +1,10 @@ package listkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listkeys/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/module/README.md b/resource-manager/automation/2023-11-01/module/README.md index 2e808be9744..56d891d0d0e 100644 --- a/resource-manager/automation/2023-11-01/module/README.md +++ b/resource-manager/automation/2023-11-01/module/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/module` Documentation -The `module` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `module` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/module/client.go b/resource-manager/automation/2023-11-01/module/client.go index b187a9525a7..88bab05b01d 100644 --- a/resource-manager/automation/2023-11-01/module/client.go +++ b/resource-manager/automation/2023-11-01/module/client.go @@ -15,7 +15,7 @@ type ModuleClient struct { } func NewModuleClientWithBaseURI(sdkApi sdkEnv.Api) (*ModuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "module", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "module", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModuleClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/module/id_automationaccount.go b/resource-manager/automation/2023-11-01/module/id_automationaccount.go index d884ddf6d14..076be0860db 100644 --- a/resource-manager/automation/2023-11-01/module/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/module/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/module/id_module.go b/resource-manager/automation/2023-11-01/module/id_module.go index d43369de67b..6712f38e7db 100644 --- a/resource-manager/automation/2023-11-01/module/id_module.go +++ b/resource-manager/automation/2023-11-01/module/id_module.go @@ -44,7 +44,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/module/id_powershell72module.go b/resource-manager/automation/2023-11-01/module/id_powershell72module.go index accac259a0c..2d1cc177c8e 100644 --- a/resource-manager/automation/2023-11-01/module/id_powershell72module.go +++ b/resource-manager/automation/2023-11-01/module/id_powershell72module.go @@ -44,7 +44,7 @@ func ParsePowerShell72ModuleID(input string) (*PowerShell72ModuleId, error) { } id := PowerShell72ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePowerShell72ModuleIDInsensitively(input string) (*PowerShell72ModuleId } id := PowerShell72ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/module/method_createorupdate.go b/resource-manager/automation/2023-11-01/module/method_createorupdate.go index 8f2b497f448..009eca3b71e 100644 --- a/resource-manager/automation/2023-11-01/module/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/module/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) CreateOrUpdate(ctx context.Context, id ModuleId, input Mod var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/method_get.go b/resource-manager/automation/2023-11-01/module/method_get.go index dda1e7d6fe3..f1bb9268515 100644 --- a/resource-manager/automation/2023-11-01/module/method_get.go +++ b/resource-manager/automation/2023-11-01/module/method_get.go @@ -45,7 +45,6 @@ func (c ModuleClient) Get(ctx context.Context, id ModuleId) (result GetOperation var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/method_powershell72modulecreateorupdate.go b/resource-manager/automation/2023-11-01/module/method_powershell72modulecreateorupdate.go index 9f980bd45ee..9919ed54a4d 100644 --- a/resource-manager/automation/2023-11-01/module/method_powershell72modulecreateorupdate.go +++ b/resource-manager/automation/2023-11-01/module/method_powershell72modulecreateorupdate.go @@ -50,7 +50,6 @@ func (c ModuleClient) PowerShell72ModuleCreateOrUpdate(ctx context.Context, id P var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/method_powershell72moduleget.go b/resource-manager/automation/2023-11-01/module/method_powershell72moduleget.go index f11cc754023..2b80c8fc0d6 100644 --- a/resource-manager/automation/2023-11-01/module/method_powershell72moduleget.go +++ b/resource-manager/automation/2023-11-01/module/method_powershell72moduleget.go @@ -45,7 +45,6 @@ func (c ModuleClient) PowerShell72ModuleGet(ctx context.Context, id PowerShell72 var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/method_powershell72moduleupdate.go b/resource-manager/automation/2023-11-01/module/method_powershell72moduleupdate.go index d4d568010eb..eae6eb0ed66 100644 --- a/resource-manager/automation/2023-11-01/module/method_powershell72moduleupdate.go +++ b/resource-manager/automation/2023-11-01/module/method_powershell72moduleupdate.go @@ -49,7 +49,6 @@ func (c ModuleClient) PowerShell72ModuleUpdate(ctx context.Context, id PowerShel var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/method_update.go b/resource-manager/automation/2023-11-01/module/method_update.go index 7ea24e33455..b8d0e37337e 100644 --- a/resource-manager/automation/2023-11-01/module/method_update.go +++ b/resource-manager/automation/2023-11-01/module/method_update.go @@ -49,7 +49,6 @@ func (c ModuleClient) Update(ctx context.Context, id ModuleId, input ModuleUpdat var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/module/version.go b/resource-manager/automation/2023-11-01/module/version.go index 63ab15dc6eb..40df4dfab4d 100644 --- a/resource-manager/automation/2023-11-01/module/version.go +++ b/resource-manager/automation/2023-11-01/module/version.go @@ -1,12 +1,10 @@ package module -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/module/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/module/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/README.md b/resource-manager/automation/2023-11-01/objectdatatypes/README.md index 7b3ba4c19fe..7ae639ee399 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/README.md +++ b/resource-manager/automation/2023-11-01/objectdatatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/objectdatatypes` Documentation -The `objectdatatypes` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `objectdatatypes` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/client.go b/resource-manager/automation/2023-11-01/objectdatatypes/client.go index 7d8a79e5408..790cc0cc5b4 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/client.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/client.go @@ -15,7 +15,7 @@ type ObjectDataTypesClient struct { } func NewObjectDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectDataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectdatatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectdatatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectDataTypesClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go b/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go index b47304ed896..e1a9a092d1b 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/id_moduleobjectdatatype.go @@ -46,7 +46,7 @@ func ParseModuleObjectDataTypeID(input string) (*ModuleObjectDataTypeId, error) } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleObjectDataTypeIDInsensitively(input string) (*ModuleObjectDataTy } id := ModuleObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go b/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go index e4bc22891bf..cabdf681636 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/id_objectdatatype.go @@ -44,7 +44,7 @@ func ParseObjectDataTypeID(input string) (*ObjectDataTypeId, error) { } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectDataTypeIDInsensitively(input string) (*ObjectDataTypeId, error) } id := ObjectDataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbymoduleandtype.go b/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbymoduleandtype.go index 101a08ad9d6..be62b523193 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbymoduleandtype.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbymoduleandtype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, id var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbytype.go b/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbytype.go index f42dd1234dd..7d47bc2e64f 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbytype.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/method_listfieldsbytype.go @@ -46,7 +46,6 @@ func (c ObjectDataTypesClient) ListFieldsByType(ctx context.Context, id ObjectDa var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/objectdatatypes/version.go b/resource-manager/automation/2023-11-01/objectdatatypes/version.go index ae3d8254614..ad7c1f7b8d4 100644 --- a/resource-manager/automation/2023-11-01/objectdatatypes/version.go +++ b/resource-manager/automation/2023-11-01/objectdatatypes/version.go @@ -1,12 +1,10 @@ package objectdatatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectdatatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectdatatypes/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/operations/README.md b/resource-manager/automation/2023-11-01/operations/README.md index b464aff63f5..5c790baa4cb 100644 --- a/resource-manager/automation/2023-11-01/operations/README.md +++ b/resource-manager/automation/2023-11-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/operations/client.go b/resource-manager/automation/2023-11-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/automation/2023-11-01/operations/client.go +++ b/resource-manager/automation/2023-11-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/operations/id_automationaccount.go b/resource-manager/automation/2023-11-01/operations/id_automationaccount.go index 8e99f7e0ab1..636ccaf515b 100644 --- a/resource-manager/automation/2023-11-01/operations/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/operations/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/operations/method_convertgraphrunbookcontent.go b/resource-manager/automation/2023-11-01/operations/method_convertgraphrunbookcontent.go index 760cd5ee7a6..e2d7faf8597 100644 --- a/resource-manager/automation/2023-11-01/operations/method_convertgraphrunbookcontent.go +++ b/resource-manager/automation/2023-11-01/operations/method_convertgraphrunbookcontent.go @@ -50,7 +50,6 @@ func (c OperationsClient) ConvertGraphRunbookContent(ctx context.Context, id Aut var model GraphicalRunbookContent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/operations/version.go b/resource-manager/automation/2023-11-01/operations/version.go index 05014bb09eb..9da559493a6 100644 --- a/resource-manager/automation/2023-11-01/operations/version.go +++ b/resource-manager/automation/2023-11-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/python2package/README.md b/resource-manager/automation/2023-11-01/python2package/README.md index 32d9d53f55f..2b70c1d215b 100644 --- a/resource-manager/automation/2023-11-01/python2package/README.md +++ b/resource-manager/automation/2023-11-01/python2package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python2package` Documentation -The `python2package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `python2package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/python2package/client.go b/resource-manager/automation/2023-11-01/python2package/client.go index d152b292bb4..a605d8db5fa 100644 --- a/resource-manager/automation/2023-11-01/python2package/client.go +++ b/resource-manager/automation/2023-11-01/python2package/client.go @@ -15,7 +15,7 @@ type Python2PackageClient struct { } func NewPython2PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python2PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python2package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python2package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python2PackageClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go b/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go index b295de3890d..848a41f14ce 100644 --- a/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/python2package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/python2package/id_python2package.go b/resource-manager/automation/2023-11-01/python2package/id_python2package.go index 0e739894a07..31cf288eff4 100644 --- a/resource-manager/automation/2023-11-01/python2package/id_python2package.go +++ b/resource-manager/automation/2023-11-01/python2package/id_python2package.go @@ -44,7 +44,7 @@ func ParsePython2PackageID(input string) (*Python2PackageId, error) { } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython2PackageIDInsensitively(input string) (*Python2PackageId, error) } id := Python2PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/python2package/method_createorupdate.go b/resource-manager/automation/2023-11-01/python2package/method_createorupdate.go index ab495e73043..be4b6be8e06 100644 --- a/resource-manager/automation/2023-11-01/python2package/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/python2package/method_createorupdate.go @@ -50,7 +50,6 @@ func (c Python2PackageClient) CreateOrUpdate(ctx context.Context, id Python2Pack var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/python2package/method_get.go b/resource-manager/automation/2023-11-01/python2package/method_get.go index 988270c3e38..8baec2126f4 100644 --- a/resource-manager/automation/2023-11-01/python2package/method_get.go +++ b/resource-manager/automation/2023-11-01/python2package/method_get.go @@ -45,7 +45,6 @@ func (c Python2PackageClient) Get(ctx context.Context, id Python2PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/python2package/method_update.go b/resource-manager/automation/2023-11-01/python2package/method_update.go index 7bb58cb1936..9b6e028b314 100644 --- a/resource-manager/automation/2023-11-01/python2package/method_update.go +++ b/resource-manager/automation/2023-11-01/python2package/method_update.go @@ -49,7 +49,6 @@ func (c Python2PackageClient) Update(ctx context.Context, id Python2PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/python2package/version.go b/resource-manager/automation/2023-11-01/python2package/version.go index a7b7bb221ba..b385f6e8006 100644 --- a/resource-manager/automation/2023-11-01/python2package/version.go +++ b/resource-manager/automation/2023-11-01/python2package/version.go @@ -1,12 +1,10 @@ package python2package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python2package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python2package/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/python3package/README.md b/resource-manager/automation/2023-11-01/python3package/README.md index df645e1ae31..24b902017ba 100644 --- a/resource-manager/automation/2023-11-01/python3package/README.md +++ b/resource-manager/automation/2023-11-01/python3package/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/python3package` Documentation -The `python3package` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `python3package` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/python3package/client.go b/resource-manager/automation/2023-11-01/python3package/client.go index e65813a98ad..100617519b9 100644 --- a/resource-manager/automation/2023-11-01/python3package/client.go +++ b/resource-manager/automation/2023-11-01/python3package/client.go @@ -15,7 +15,7 @@ type Python3PackageClient struct { } func NewPython3PackageClientWithBaseURI(sdkApi sdkEnv.Api) (*Python3PackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "python3package", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "python3package", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating Python3PackageClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go b/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go index 42e9f9dc968..0dd869505b0 100644 --- a/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/python3package/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/python3package/id_python3package.go b/resource-manager/automation/2023-11-01/python3package/id_python3package.go index 39b2adf9d8c..21c34a082f8 100644 --- a/resource-manager/automation/2023-11-01/python3package/id_python3package.go +++ b/resource-manager/automation/2023-11-01/python3package/id_python3package.go @@ -44,7 +44,7 @@ func ParsePython3PackageID(input string) (*Python3PackageId, error) { } id := Python3PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePython3PackageIDInsensitively(input string) (*Python3PackageId, error) } id := Python3PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/python3package/method_get.go b/resource-manager/automation/2023-11-01/python3package/method_get.go index 6c561deb5b8..c73858165e8 100644 --- a/resource-manager/automation/2023-11-01/python3package/method_get.go +++ b/resource-manager/automation/2023-11-01/python3package/method_get.go @@ -45,7 +45,6 @@ func (c Python3PackageClient) Get(ctx context.Context, id Python3PackageId) (res var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/python3package/method_update.go b/resource-manager/automation/2023-11-01/python3package/method_update.go index 2fadccb33d0..5fff180bd90 100644 --- a/resource-manager/automation/2023-11-01/python3package/method_update.go +++ b/resource-manager/automation/2023-11-01/python3package/method_update.go @@ -49,7 +49,6 @@ func (c Python3PackageClient) Update(ctx context.Context, id Python3PackageId, i var model Module result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/python3package/version.go b/resource-manager/automation/2023-11-01/python3package/version.go index 6011fca3cf2..12230547262 100644 --- a/resource-manager/automation/2023-11-01/python3package/version.go +++ b/resource-manager/automation/2023-11-01/python3package/version.go @@ -1,12 +1,10 @@ package python3package -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/python3package/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/python3package/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/runbook/README.md b/resource-manager/automation/2023-11-01/runbook/README.md index ebb115fb1ff..21d617d8806 100644 --- a/resource-manager/automation/2023-11-01/runbook/README.md +++ b/resource-manager/automation/2023-11-01/runbook/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbook` Documentation -The `runbook` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `runbook` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/runbook/client.go b/resource-manager/automation/2023-11-01/runbook/client.go index 2b6168ac712..e0597053d0d 100644 --- a/resource-manager/automation/2023-11-01/runbook/client.go +++ b/resource-manager/automation/2023-11-01/runbook/client.go @@ -15,7 +15,7 @@ type RunbookClient struct { } func NewRunbookClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbook", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbook", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go b/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go index a72f7d3463e..971c1ba4df5 100644 --- a/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/runbook/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/runbook/id_runbook.go b/resource-manager/automation/2023-11-01/runbook/id_runbook.go index 85e8f4a15a9..a42eeae6012 100644 --- a/resource-manager/automation/2023-11-01/runbook/id_runbook.go +++ b/resource-manager/automation/2023-11-01/runbook/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/runbook/method_createorupdate.go b/resource-manager/automation/2023-11-01/runbook/method_createorupdate.go index 2169e0eabfc..8ce38f6e982 100644 --- a/resource-manager/automation/2023-11-01/runbook/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/runbook/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RunbookClient) CreateOrUpdate(ctx context.Context, id RunbookId, input R var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbook/method_get.go b/resource-manager/automation/2023-11-01/runbook/method_get.go index 309ca3bfd4f..a0b0086a5d0 100644 --- a/resource-manager/automation/2023-11-01/runbook/method_get.go +++ b/resource-manager/automation/2023-11-01/runbook/method_get.go @@ -45,7 +45,6 @@ func (c RunbookClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbook/method_getcontent.go b/resource-manager/automation/2023-11-01/runbook/method_getcontent.go index 78b9ba4841c..e1dcb513c9e 100644 --- a/resource-manager/automation/2023-11-01/runbook/method_getcontent.go +++ b/resource-manager/automation/2023-11-01/runbook/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookClient) GetContent(ctx context.Context, id RunbookId) (result Get var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbook/method_update.go b/resource-manager/automation/2023-11-01/runbook/method_update.go index b2c590b4d70..44756d6f29f 100644 --- a/resource-manager/automation/2023-11-01/runbook/method_update.go +++ b/resource-manager/automation/2023-11-01/runbook/method_update.go @@ -49,7 +49,6 @@ func (c RunbookClient) Update(ctx context.Context, id RunbookId, input RunbookUp var model Runbook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbook/version.go b/resource-manager/automation/2023-11-01/runbook/version.go index 9cf009a07e6..6f2cd977823 100644 --- a/resource-manager/automation/2023-11-01/runbook/version.go +++ b/resource-manager/automation/2023-11-01/runbook/version.go @@ -1,12 +1,10 @@ package runbook -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbook/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbook/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/README.md b/resource-manager/automation/2023-11-01/runbookdraft/README.md index be8baf44c44..ba9a241962e 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/README.md +++ b/resource-manager/automation/2023-11-01/runbookdraft/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/runbookdraft` Documentation -The `runbookdraft` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `runbookdraft` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/runbookdraft/client.go b/resource-manager/automation/2023-11-01/runbookdraft/client.go index 1a93df24d0c..2332c2f5a23 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/client.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/client.go @@ -15,7 +15,7 @@ type RunbookDraftClient struct { } func NewRunbookDraftClientWithBaseURI(sdkApi sdkEnv.Api) (*RunbookDraftClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runbookdraft", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runbookdraft", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunbookDraftClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go b/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go index 82900236b6d..38a64b39cb6 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/method_get.go b/resource-manager/automation/2023-11-01/runbookdraft/method_get.go index 82d15501607..2dd02389381 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/method_get.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/method_get.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) Get(ctx context.Context, id RunbookId) (result GetOp var model RunbookDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/method_getcontent.go b/resource-manager/automation/2023-11-01/runbookdraft/method_getcontent.go index 32bf43a0c32..7c95b5cace9 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/method_getcontent.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/method_getcontent.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) GetContent(ctx context.Context, id RunbookId) (resul var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/method_undoedit.go b/resource-manager/automation/2023-11-01/runbookdraft/method_undoedit.go index f0c743b1e79..be90ea44072 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/method_undoedit.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/method_undoedit.go @@ -46,7 +46,6 @@ func (c RunbookDraftClient) UndoEdit(ctx context.Context, id RunbookId) (result var model RunbookDraftUndoEditResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/runbookdraft/version.go b/resource-manager/automation/2023-11-01/runbookdraft/version.go index 51c77349db0..dd4e682332a 100644 --- a/resource-manager/automation/2023-11-01/runbookdraft/version.go +++ b/resource-manager/automation/2023-11-01/runbookdraft/version.go @@ -1,12 +1,10 @@ package runbookdraft -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runbookdraft/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runbookdraft/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/schedule/README.md b/resource-manager/automation/2023-11-01/schedule/README.md index 125dbe4b6a3..bd441c1e190 100644 --- a/resource-manager/automation/2023-11-01/schedule/README.md +++ b/resource-manager/automation/2023-11-01/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `schedule` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/schedule/client.go b/resource-manager/automation/2023-11-01/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/automation/2023-11-01/schedule/client.go +++ b/resource-manager/automation/2023-11-01/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go b/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go index 1758b466257..aa9a3610114 100644 --- a/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/schedule/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/schedule/id_schedule.go b/resource-manager/automation/2023-11-01/schedule/id_schedule.go index 944ad0227b2..9f76e20993e 100644 --- a/resource-manager/automation/2023-11-01/schedule/id_schedule.go +++ b/resource-manager/automation/2023-11-01/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/schedule/method_createorupdate.go b/resource-manager/automation/2023-11-01/schedule/method_createorupdate.go index 4263ac8b9f4..901aa1f4c94 100644 --- a/resource-manager/automation/2023-11-01/schedule/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/schedule/method_get.go b/resource-manager/automation/2023-11-01/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/automation/2023-11-01/schedule/method_get.go +++ b/resource-manager/automation/2023-11-01/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/schedule/method_update.go b/resource-manager/automation/2023-11-01/schedule/method_update.go index c84276093ae..fbfab6d1144 100644 --- a/resource-manager/automation/2023-11-01/schedule/method_update.go +++ b/resource-manager/automation/2023-11-01/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/schedule/version.go b/resource-manager/automation/2023-11-01/schedule/version.go index 1f03ef4652e..ffa5cb3e859 100644 --- a/resource-manager/automation/2023-11-01/schedule/version.go +++ b/resource-manager/automation/2023-11-01/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/README.md b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/README.md index 651a98ab5f5..4fde35c2c0d 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/README.md +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun` Documentation -The `softwareupdateconfigurationmachinerun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `softwareupdateconfigurationmachinerun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/client.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/client.go index fd31306b48d..dc26e75ebf5 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/client.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationMachineRunClient struct { } func NewSoftwareUpdateConfigurationMachineRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationMachineRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationmachinerun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationMachineRunClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go index 9ffcdb66cc0..0244bd3c2e7 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go index 89171d686d7..019f836780e 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/id_softwareupdateconfigurationmachinerun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationMachineRunID(input string) (*SoftwareUpdate } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationMachineRunIDInsensitively(input string) (*S } id := SoftwareUpdateConfigurationMachineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_getbyid.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_getbyid.go index 23b807e3e05..449eb4379bc 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_getbyid.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationMachineRunClient) GetById(ctx context.Context var model SoftwareUpdateConfigurationMachineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_list.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_list.go index 6f047c54ccc..bbd0f4ec908 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_list.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/version.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/version.go index f051fda4e64..9b346375dc9 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/version.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationmachinerun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationmachinerun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationmachinerun/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/README.md b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/README.md index fdfbce7a2e5..8c376f34420 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/README.md +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun` Documentation -The `softwareupdateconfigurationrun` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `softwareupdateconfigurationrun` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/client.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/client.go index aa86f6dacdf..360338f920d 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/client.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/client.go @@ -15,7 +15,7 @@ type SoftwareUpdateConfigurationRunClient struct { } func NewSoftwareUpdateConfigurationRunClientWithBaseURI(sdkApi sdkEnv.Api) (*SoftwareUpdateConfigurationRunClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "softwareupdateconfigurationrun", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SoftwareUpdateConfigurationRunClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go index 2c81cf2164d..e09df230b6b 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go index e903396f63d..8c0225c0dc0 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/id_softwareupdateconfigurationrun.go @@ -44,7 +44,7 @@ func ParseSoftwareUpdateConfigurationRunID(input string) (*SoftwareUpdateConfigu } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSoftwareUpdateConfigurationRunIDInsensitively(input string) (*Software } id := SoftwareUpdateConfigurationRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_getbyid.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_getbyid.go index c4c6b07ca88..1985085c30e 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_getbyid.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_getbyid.go @@ -36,6 +36,7 @@ func (o GetByIdOperationOptions) ToHeaders() *client.Headers { func (o GetByIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SoftwareUpdateConfigurationRunClient) GetById(ctx context.Context, id So var model SoftwareUpdateConfigurationRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_list.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_list.go index f6503cdb378..b8dcc77ca85 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_list.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/version.go b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/version.go index fc9e6f76927..28d6dba5167 100644 --- a/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/version.go +++ b/resource-manager/automation/2023-11-01/softwareupdateconfigurationrun/version.go @@ -1,12 +1,10 @@ package softwareupdateconfigurationrun -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softwareupdateconfigurationrun/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softwareupdateconfigurationrun/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/README.md b/resource-manager/automation/2023-11-01/sourcecontrol/README.md index 8c666dfc4f1..98efe1c46b2 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/README.md +++ b/resource-manager/automation/2023-11-01/sourcecontrol/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrol` Documentation -The `sourcecontrol` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `sourcecontrol` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/client.go b/resource-manager/automation/2023-11-01/sourcecontrol/client.go index 5cc59fbc8dc..cf7d6d4d95c 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/client.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/client.go @@ -15,7 +15,7 @@ type SourceControlClient struct { } func NewSourceControlClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrol", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrol", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go b/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go index 80fde88426a..f866cc6fd24 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go b/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go index 1a333c90b2e..2e293367fa8 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/method_createorupdate.go b/resource-manager/automation/2023-11-01/sourcecontrol/method_createorupdate.go index cd75063d722..470c526d512 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlClient) CreateOrUpdate(ctx context.Context, id SourceContro var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/method_get.go b/resource-manager/automation/2023-11-01/sourcecontrol/method_get.go index db32fdf5036..435c74f2193 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/method_get.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlClient) Get(ctx context.Context, id SourceControlId) (resul var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/sourcecontrol/method_listbyautomationaccount.go index 9457e6a81fe..5872a01f8b8 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/method_update.go b/resource-manager/automation/2023-11-01/sourcecontrol/method_update.go index f00032bbff7..e4265560f5c 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/method_update.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/method_update.go @@ -49,7 +49,6 @@ func (c SourceControlClient) Update(ctx context.Context, id SourceControlId, inp var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrol/version.go b/resource-manager/automation/2023-11-01/sourcecontrol/version.go index f56817ffedf..3bf49ac2df2 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrol/version.go +++ b/resource-manager/automation/2023-11-01/sourcecontrol/version.go @@ -1,12 +1,10 @@ package sourcecontrol -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrol/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrol/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/README.md b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/README.md index 082d9fdea67..9ef89c9f8c9 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/README.md +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjob` Documentation -The `sourcecontrolsyncjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `sourcecontrolsyncjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/client.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/client.go index 380f8581c8f..f17a5fe03f6 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/client.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobClient struct { } func NewSourceControlSyncJobClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go index 45a497aaac6..18ee5a36a2a 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go index c15f95859d0..356a9c95896 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_create.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_create.go index 07efd101947..afaa631c092 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_create.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_create.go @@ -49,7 +49,6 @@ func (c SourceControlSyncJobClient) Create(ctx context.Context, id SourceControl var model SourceControlSyncJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_get.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_get.go index 5cb3e1e56f9..f0a7ca3d15e 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_get.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobClient) Get(ctx context.Context, id SourceControlSyn var model SourceControlSyncJobById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_listbyautomationaccount.go index 84bcd7a480d..1a4ea326345 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/method_listbyautomationaccount.go @@ -39,6 +39,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/version.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/version.go index c9d339529dd..754d09c8cfe 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/version.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjob/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjob/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/README.md b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/README.md index b4e9f54e461..94e95cbe7f0 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/README.md +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams` Documentation -The `sourcecontrolsyncjobstreams` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `sourcecontrolsyncjobstreams` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/client.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/client.go index 4e689c48c4f..0be682fcf30 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/client.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/client.go @@ -15,7 +15,7 @@ type SourceControlSyncJobStreamsClient struct { } func NewSourceControlSyncJobStreamsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlSyncJobStreamsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolsyncjobstreams", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlSyncJobStreamsClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go index 210de5d23e8..520dc5f44c7 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjob.go @@ -46,7 +46,7 @@ func ParseSourceControlSyncJobID(input string) (*SourceControlSyncJobId, error) } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceControlSyncJobIDInsensitively(input string) (*SourceControlSyncJ } id := SourceControlSyncJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go index a1d8a1ca967..fca0b86a471 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/id_sourcecontrolsyncjobstream.go @@ -48,7 +48,7 @@ func ParseSourceControlSyncJobStreamID(input string) (*SourceControlSyncJobStrea } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSourceControlSyncJobStreamIDInsensitively(input string) (*SourceContro } id := SourceControlSyncJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_get.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_get.go index 867cf4899fc..02a68185a64 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_get.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlSyncJobStreamsClient) Get(ctx context.Context, id SourceCon var model SourceControlSyncJobStreamById result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go index fe82bd504e4..11bad046f50 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/method_listbysyncjob.go @@ -39,6 +39,7 @@ func (o ListBySyncJobOperationOptions) ToHeaders() *client.Headers { func (o ListBySyncJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/version.go b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/version.go index bd317121c1f..fccca83ea9d 100644 --- a/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/version.go +++ b/resource-manager/automation/2023-11-01/sourcecontrolsyncjobstreams/version.go @@ -1,12 +1,10 @@ package sourcecontrolsyncjobstreams -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolsyncjobstreams/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/statistics/README.md b/resource-manager/automation/2023-11-01/statistics/README.md index 2d6d7ade492..bcae5cc6bfe 100644 --- a/resource-manager/automation/2023-11-01/statistics/README.md +++ b/resource-manager/automation/2023-11-01/statistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/statistics` Documentation -The `statistics` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `statistics` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/statistics/client.go b/resource-manager/automation/2023-11-01/statistics/client.go index a7a2c1754ac..cd61fc0df63 100644 --- a/resource-manager/automation/2023-11-01/statistics/client.go +++ b/resource-manager/automation/2023-11-01/statistics/client.go @@ -15,7 +15,7 @@ type StatisticsClient struct { } func NewStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*StatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "statistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "statistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StatisticsClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go b/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go index 3d92424afe1..e7cefc4233e 100644 --- a/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/statistics/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/statistics/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/statistics/method_listbyautomationaccount.go index bcf9f2ef066..5c9df0d5e05 100644 --- a/resource-manager/automation/2023-11-01/statistics/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/statistics/method_listbyautomationaccount.go @@ -34,6 +34,7 @@ func (o ListByAutomationAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAutomationAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StatisticsClient) ListByAutomationAccount(ctx context.Context, id Automa var model StatisticsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/statistics/version.go b/resource-manager/automation/2023-11-01/statistics/version.go index 6ea733ff732..aed04be58c9 100644 --- a/resource-manager/automation/2023-11-01/statistics/version.go +++ b/resource-manager/automation/2023-11-01/statistics/version.go @@ -1,12 +1,10 @@ package statistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/statistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/statistics/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/testjob/README.md b/resource-manager/automation/2023-11-01/testjob/README.md index d531e95f210..9fcaa86b1d4 100644 --- a/resource-manager/automation/2023-11-01/testjob/README.md +++ b/resource-manager/automation/2023-11-01/testjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjob` Documentation -The `testjob` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `testjob` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/testjob/client.go b/resource-manager/automation/2023-11-01/testjob/client.go index 948c5b62e0b..42bf971c6be 100644 --- a/resource-manager/automation/2023-11-01/testjob/client.go +++ b/resource-manager/automation/2023-11-01/testjob/client.go @@ -15,7 +15,7 @@ type TestJobClient struct { } func NewTestJobClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/testjob/id_runbook.go b/resource-manager/automation/2023-11-01/testjob/id_runbook.go index f8a57f87058..8989fb2b0e0 100644 --- a/resource-manager/automation/2023-11-01/testjob/id_runbook.go +++ b/resource-manager/automation/2023-11-01/testjob/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/testjob/method_create.go b/resource-manager/automation/2023-11-01/testjob/method_create.go index 7beb9fc0ab0..7e6ae18000f 100644 --- a/resource-manager/automation/2023-11-01/testjob/method_create.go +++ b/resource-manager/automation/2023-11-01/testjob/method_create.go @@ -50,7 +50,6 @@ func (c TestJobClient) Create(ctx context.Context, id RunbookId, input TestJobCr var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/testjob/method_get.go b/resource-manager/automation/2023-11-01/testjob/method_get.go index be79f45aad2..911a70d9f03 100644 --- a/resource-manager/automation/2023-11-01/testjob/method_get.go +++ b/resource-manager/automation/2023-11-01/testjob/method_get.go @@ -46,7 +46,6 @@ func (c TestJobClient) Get(ctx context.Context, id RunbookId) (result GetOperati var model TestJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/testjob/version.go b/resource-manager/automation/2023-11-01/testjob/version.go index 2352095e7de..8495f4c8701 100644 --- a/resource-manager/automation/2023-11-01/testjob/version.go +++ b/resource-manager/automation/2023-11-01/testjob/version.go @@ -1,12 +1,10 @@ package testjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjob/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/testjobstream/README.md b/resource-manager/automation/2023-11-01/testjobstream/README.md index 9b93730bbca..68bf23417f0 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/README.md +++ b/resource-manager/automation/2023-11-01/testjobstream/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/testjobstream` Documentation -The `testjobstream` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `testjobstream` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/testjobstream/client.go b/resource-manager/automation/2023-11-01/testjobstream/client.go index b14681e53c2..7e656f450c0 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/client.go +++ b/resource-manager/automation/2023-11-01/testjobstream/client.go @@ -15,7 +15,7 @@ type TestJobStreamClient struct { } func NewTestJobStreamClientWithBaseURI(sdkApi sdkEnv.Api) (*TestJobStreamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testjobstream", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testjobstream", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestJobStreamClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go b/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go index 319f52ebaad..cb971105f88 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go +++ b/resource-manager/automation/2023-11-01/testjobstream/id_runbook.go @@ -44,7 +44,7 @@ func ParseRunbookID(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunbookIDInsensitively(input string) (*RunbookId, error) { } id := RunbookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go b/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go index 0ebc73ded87..09b3674344b 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go +++ b/resource-manager/automation/2023-11-01/testjobstream/id_testjobstream.go @@ -46,7 +46,7 @@ func ParseTestJobStreamID(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTestJobStreamIDInsensitively(input string) (*TestJobStreamId, error) { } id := TestJobStreamId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/testjobstream/method_get.go b/resource-manager/automation/2023-11-01/testjobstream/method_get.go index b94e2e9b62a..78292836ec2 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/method_get.go +++ b/resource-manager/automation/2023-11-01/testjobstream/method_get.go @@ -45,7 +45,6 @@ func (c TestJobStreamClient) Get(ctx context.Context, id TestJobStreamId) (resul var model JobStream result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/testjobstream/method_listbytestjob.go b/resource-manager/automation/2023-11-01/testjobstream/method_listbytestjob.go index 0c69bca0921..4898fc0bab9 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/method_listbytestjob.go +++ b/resource-manager/automation/2023-11-01/testjobstream/method_listbytestjob.go @@ -39,6 +39,7 @@ func (o ListByTestJobOperationOptions) ToHeaders() *client.Headers { func (o ListByTestJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/automation/2023-11-01/testjobstream/version.go b/resource-manager/automation/2023-11-01/testjobstream/version.go index 3638681e8c7..28c9004c0f9 100644 --- a/resource-manager/automation/2023-11-01/testjobstream/version.go +++ b/resource-manager/automation/2023-11-01/testjobstream/version.go @@ -1,12 +1,10 @@ package testjobstream -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testjobstream/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testjobstream/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/typefields/README.md b/resource-manager/automation/2023-11-01/typefields/README.md index 291bb29dc70..b4b1d21e6eb 100644 --- a/resource-manager/automation/2023-11-01/typefields/README.md +++ b/resource-manager/automation/2023-11-01/typefields/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/typefields` Documentation -The `typefields` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `typefields` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/typefields/client.go b/resource-manager/automation/2023-11-01/typefields/client.go index e235fbc854f..d2929448756 100644 --- a/resource-manager/automation/2023-11-01/typefields/client.go +++ b/resource-manager/automation/2023-11-01/typefields/client.go @@ -15,7 +15,7 @@ type TypeFieldsClient struct { } func NewTypeFieldsClientWithBaseURI(sdkApi sdkEnv.Api) (*TypeFieldsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "typefields", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "typefields", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TypeFieldsClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/typefields/id_type.go b/resource-manager/automation/2023-11-01/typefields/id_type.go index 834ea978a07..e7ebc51ea54 100644 --- a/resource-manager/automation/2023-11-01/typefields/id_type.go +++ b/resource-manager/automation/2023-11-01/typefields/id_type.go @@ -46,7 +46,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/typefields/method_fieldslistbytype.go b/resource-manager/automation/2023-11-01/typefields/method_fieldslistbytype.go index 03945e9f500..18ca75f1933 100644 --- a/resource-manager/automation/2023-11-01/typefields/method_fieldslistbytype.go +++ b/resource-manager/automation/2023-11-01/typefields/method_fieldslistbytype.go @@ -46,7 +46,6 @@ func (c TypeFieldsClient) FieldsListByType(ctx context.Context, id TypeId) (resu var model TypeFieldListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/typefields/version.go b/resource-manager/automation/2023-11-01/typefields/version.go index 65db7c57f19..3d5247b0889 100644 --- a/resource-manager/automation/2023-11-01/typefields/version.go +++ b/resource-manager/automation/2023-11-01/typefields/version.go @@ -1,12 +1,10 @@ package typefields -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/typefields/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/typefields/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/usages/README.md b/resource-manager/automation/2023-11-01/usages/README.md index cac7c5ed56a..0bd050e2be2 100644 --- a/resource-manager/automation/2023-11-01/usages/README.md +++ b/resource-manager/automation/2023-11-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/usages/client.go b/resource-manager/automation/2023-11-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/automation/2023-11-01/usages/client.go +++ b/resource-manager/automation/2023-11-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/usages/id_automationaccount.go b/resource-manager/automation/2023-11-01/usages/id_automationaccount.go index 62a05730e85..039d8c59722 100644 --- a/resource-manager/automation/2023-11-01/usages/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/usages/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/usages/method_listbyautomationaccount.go b/resource-manager/automation/2023-11-01/usages/method_listbyautomationaccount.go index 2917c5adf42..73713c19bdc 100644 --- a/resource-manager/automation/2023-11-01/usages/method_listbyautomationaccount.go +++ b/resource-manager/automation/2023-11-01/usages/method_listbyautomationaccount.go @@ -46,7 +46,6 @@ func (c UsagesClient) ListByAutomationAccount(ctx context.Context, id Automation var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/usages/version.go b/resource-manager/automation/2023-11-01/usages/version.go index 6715f1676b0..1f75d534194 100644 --- a/resource-manager/automation/2023-11-01/usages/version.go +++ b/resource-manager/automation/2023-11-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-11-01" } diff --git a/resource-manager/automation/2023-11-01/variable/README.md b/resource-manager/automation/2023-11-01/variable/README.md index 1e63d41c3dd..ca43e2a02b9 100644 --- a/resource-manager/automation/2023-11-01/variable/README.md +++ b/resource-manager/automation/2023-11-01/variable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/automation/2023-11-01/variable` Documentation -The `variable` SDK allows for interaction with the Azure Resource Manager Service `automation` (API Version `2023-11-01`). +The `variable` SDK allows for interaction with Azure Resource Manager `automation` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/automation/2023-11-01/variable/client.go b/resource-manager/automation/2023-11-01/variable/client.go index b52efe661a6..8e293b273f0 100644 --- a/resource-manager/automation/2023-11-01/variable/client.go +++ b/resource-manager/automation/2023-11-01/variable/client.go @@ -15,7 +15,7 @@ type VariableClient struct { } func NewVariableClientWithBaseURI(sdkApi sdkEnv.Api) (*VariableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "variable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "variable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VariableClient: %+v", err) } diff --git a/resource-manager/automation/2023-11-01/variable/id_automationaccount.go b/resource-manager/automation/2023-11-01/variable/id_automationaccount.go index 635e56dfae8..09be4df2a66 100644 --- a/resource-manager/automation/2023-11-01/variable/id_automationaccount.go +++ b/resource-manager/automation/2023-11-01/variable/id_automationaccount.go @@ -42,7 +42,7 @@ func ParseAutomationAccountID(input string) (*AutomationAccountId, error) { } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, } id := AutomationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/variable/id_variable.go b/resource-manager/automation/2023-11-01/variable/id_variable.go index aab429f68a4..63f8c9328fc 100644 --- a/resource-manager/automation/2023-11-01/variable/id_variable.go +++ b/resource-manager/automation/2023-11-01/variable/id_variable.go @@ -44,7 +44,7 @@ func ParseVariableID(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVariableIDInsensitively(input string) (*VariableId, error) { } id := VariableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/automation/2023-11-01/variable/method_createorupdate.go b/resource-manager/automation/2023-11-01/variable/method_createorupdate.go index 7f1d31eeacc..35a90d4c131 100644 --- a/resource-manager/automation/2023-11-01/variable/method_createorupdate.go +++ b/resource-manager/automation/2023-11-01/variable/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VariableClient) CreateOrUpdate(ctx context.Context, id VariableId, input var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/variable/method_get.go b/resource-manager/automation/2023-11-01/variable/method_get.go index a84e304f5a0..6d865e8141f 100644 --- a/resource-manager/automation/2023-11-01/variable/method_get.go +++ b/resource-manager/automation/2023-11-01/variable/method_get.go @@ -45,7 +45,6 @@ func (c VariableClient) Get(ctx context.Context, id VariableId) (result GetOpera var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/variable/method_update.go b/resource-manager/automation/2023-11-01/variable/method_update.go index cba7dfa356a..d63d977348b 100644 --- a/resource-manager/automation/2023-11-01/variable/method_update.go +++ b/resource-manager/automation/2023-11-01/variable/method_update.go @@ -49,7 +49,6 @@ func (c VariableClient) Update(ctx context.Context, id VariableId, input Variabl var model Variable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/automation/2023-11-01/variable/version.go b/resource-manager/automation/2023-11-01/variable/version.go index 4efa745f5f6..9631fa7458d 100644 --- a/resource-manager/automation/2023-11-01/variable/version.go +++ b/resource-manager/automation/2023-11-01/variable/version.go @@ -1,12 +1,10 @@ package variable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/variable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/variable/2023-11-01" } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/README.md b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/README.md index 81c771c68d1..65e51fb5494 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/README.md +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings` Documentation -The `diagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `azureactivedirectory` (API Version `2017-04-01`). +The `diagnosticsettings` SDK allows for interaction with Azure Resource Manager `azureactivedirectory` (API Version `2017-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/client.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/client.go index 336818ef929..6e01407ed2a 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/client.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsClient struct { } func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go index 2e6cfeea6e8..c486f58f763 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/id_diagnosticsetting.go @@ -38,7 +38,7 @@ func ParseDiagnosticSettingID(input string) (*DiagnosticSettingId, error) { } id := DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDiagnosticSettingIDInsensitively(input string) (*DiagnosticSettingId, } id := DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_createorupdate.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_createorupdate.go index c1679729aca..90162fed3b8 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_createorupdate.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DiagnosticSettingsClient) CreateOrUpdate(ctx context.Context, id Diagnos var model DiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_get.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_get.go index 533a2f94cfa..8420a59586d 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_get.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticSettingsClient) Get(ctx context.Context, id DiagnosticSettingI var model DiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_list.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_list.go index 5e6f6bcc8bb..5841a895b6d 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_list.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/method_list.go @@ -45,7 +45,6 @@ func (c DiagnosticSettingsClient) List(ctx context.Context) (result ListOperatio var model DiagnosticSettingsResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/version.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/version.go index 8033859284a..5b21ae90736 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/version.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings/version.go @@ -1,12 +1,10 @@ package diagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettings/2017-04-01" } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/README.md b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/README.md index dc8febb4485..6653f079de8 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/README.md +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories` Documentation -The `diagnosticsettingscategories` SDK allows for interaction with the Azure Resource Manager Service `azureactivedirectory` (API Version `2017-04-01`). +The `diagnosticsettingscategories` SDK allows for interaction with Azure Resource Manager `azureactivedirectory` (API Version `2017-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/client.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/client.go index f2d246ac10d..84b1d64f63d 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/client.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsCategoriesClient struct { } func NewDiagnosticSettingsCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettingscategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettingscategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsCategoriesClient: %+v", err) } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go index ca2715c9282..01fae64a1d0 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go @@ -45,7 +45,6 @@ func (c DiagnosticSettingsCategoriesClient) DiagnosticSettingsCategoryList(ctx c var model DiagnosticSettingsCategoryResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/version.go b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/version.go index fcd91339f5c..f8f24a1ec70 100644 --- a/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/version.go +++ b/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettingscategories/version.go @@ -1,12 +1,10 @@ package diagnosticsettingscategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettingscategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettingscategories/2017-04-01" } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/README.md b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/README.md index 3118a7c205e..ab5b930adb1 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/README.md +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `azureactivedirectory` (API Version `2020-03-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `azureactivedirectory` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/client.go b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/client.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privateendpointconnection.go index 640a7c9d80b..a6aa15224ad 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privatelinkforazuread.go b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privatelinkforazuread.go index 89c6fbe96c0..591069d12e9 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privatelinkforazuread.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/id_privatelinkforazuread.go @@ -42,7 +42,7 @@ func ParsePrivateLinkForAzureAdID(input string) (*PrivateLinkForAzureAdId, error } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkForAzureAdIDInsensitively(input string) (*PrivateLinkForAzu } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/method_get.go b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/method_get.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/version.go b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/version.go index 1d09203662a..4a5d1928532 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/version.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2020-03-01" } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/README.md b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/README.md index 9be3faa22da..68f05d9b9a2 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/README.md +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread` Documentation -The `privatelinkforazuread` SDK allows for interaction with the Azure Resource Manager Service `azureactivedirectory` (API Version `2020-03-01`). +The `privatelinkforazuread` SDK allows for interaction with Azure Resource Manager `azureactivedirectory` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/client.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/client.go index a8e5111d150..4f51d5ccd47 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/client.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/client.go @@ -15,7 +15,7 @@ type PrivateLinkForAzureAdClient struct { } func NewPrivateLinkForAzureAdClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkForAzureAdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkforazuread", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkforazuread", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkForAzureAdClient: %+v", err) } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/id_privatelinkforazuread.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/id_privatelinkforazuread.go index f16faffef72..0402a12dfed 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/id_privatelinkforazuread.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/id_privatelinkforazuread.go @@ -42,7 +42,7 @@ func ParsePrivateLinkForAzureAdID(input string) (*PrivateLinkForAzureAdId, error } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkForAzureAdIDInsensitively(input string) (*PrivateLinkForAzu } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_get.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_get.go index 7262d19663e..77d17355007 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_get.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkForAzureAdClient) Get(ctx context.Context, id PrivateLinkForA var model PrivateLinkPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_update.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_update.go index c6b552d6870..b863f3eac59 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_update.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/method_update.go @@ -49,7 +49,6 @@ func (c PrivateLinkForAzureAdClient) Update(ctx context.Context, id PrivateLinkF var model PrivateLinkPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/version.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/version.go index 2e3fbe722d1..6c1a329892a 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/version.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkforazuread/version.go @@ -1,12 +1,10 @@ package privatelinkforazuread -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkforazuread/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkforazuread/2020-03-01" } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/README.md b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/README.md index 357fee25b36..f54e3b501c1 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/README.md +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `azureactivedirectory` (API Version `2020-03-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `azureactivedirectory` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/client.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/client.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkforazuread.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkforazuread.go index 69356af3d3b..7f0b1ca8be5 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkforazuread.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkforazuread.go @@ -42,7 +42,7 @@ func ParsePrivateLinkForAzureAdID(input string) (*PrivateLinkForAzureAdId, error } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkForAzureAdIDInsensitively(input string) (*PrivateLinkForAzu } id := PrivateLinkForAzureAdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkresource.go index 072968130b6..d60ee61cc4b 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/method_get.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/method_get.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/version.go b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/version.go index cb1a19e038e..237041ddfe8 100644 --- a/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/version.go +++ b/resource-manager/azureactivedirectory/2020-03-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2020-03-01" } diff --git a/resource-manager/azurefleet/2024-05-01-preview/fleets/README.md b/resource-manager/azurefleet/2024-05-01-preview/fleets/README.md index 338fe5de9fe..bb969e34b3e 100644 --- a/resource-manager/azurefleet/2024-05-01-preview/fleets/README.md +++ b/resource-manager/azurefleet/2024-05-01-preview/fleets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurefleet/2024-05-01-preview/fleets` Documentation -The `fleets` SDK allows for interaction with the Azure Resource Manager Service `azurefleet` (API Version `2024-05-01-preview`). +The `fleets` SDK allows for interaction with Azure Resource Manager `azurefleet` (API Version `2024-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurefleet/2024-05-01-preview/fleets/client.go b/resource-manager/azurefleet/2024-05-01-preview/fleets/client.go index 199fd2ac0ed..212151c2570 100644 --- a/resource-manager/azurefleet/2024-05-01-preview/fleets/client.go +++ b/resource-manager/azurefleet/2024-05-01-preview/fleets/client.go @@ -15,7 +15,7 @@ type FleetsClient struct { } func NewFleetsClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetsClient: %+v", err) } diff --git a/resource-manager/azurefleet/2024-05-01-preview/fleets/id_fleet.go b/resource-manager/azurefleet/2024-05-01-preview/fleets/id_fleet.go index 0c7ec035fee..dd5298abd4e 100644 --- a/resource-manager/azurefleet/2024-05-01-preview/fleets/id_fleet.go +++ b/resource-manager/azurefleet/2024-05-01-preview/fleets/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurefleet/2024-05-01-preview/fleets/method_get.go b/resource-manager/azurefleet/2024-05-01-preview/fleets/method_get.go index 146f057c861..c45bbd36e11 100644 --- a/resource-manager/azurefleet/2024-05-01-preview/fleets/method_get.go +++ b/resource-manager/azurefleet/2024-05-01-preview/fleets/method_get.go @@ -45,7 +45,6 @@ func (c FleetsClient) Get(ctx context.Context, id FleetId) (result GetOperationR var model Fleet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurefleet/2024-05-01-preview/fleets/version.go b/resource-manager/azurefleet/2024-05-01-preview/fleets/version.go index 033269dc7e4..7909c8ac49d 100644 --- a/resource-manager/azurefleet/2024-05-01-preview/fleets/version.go +++ b/resource-manager/azurefleet/2024-05-01-preview/fleets/version.go @@ -1,12 +1,10 @@ package fleets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleets/2024-05-01-preview" } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md b/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md index 7617660eed2..3245aba305b 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/arcsettings` Documentation -The `arcsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `arcsettings` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go index bf76b03a6da..6c5c6a2cc4a 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/client.go @@ -15,7 +15,7 @@ type ArcSettingsClient struct { } func NewArcSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArcSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "arcsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "arcsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArcSettingsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/id_arcsetting.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/id_arcsetting.go index 1d17d3a2b54..58d9bbc6552 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/id_arcsetting.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/id_arcsetting.go @@ -44,7 +44,7 @@ func ParseArcSettingID(input string) (*ArcSettingId, error) { } id := ArcSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseArcSettingIDInsensitively(input string) (*ArcSettingId, error) { } id := ArcSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/id_cluster.go index efec5d31747..62330f08b77 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go index e23e135a7a4..b278666eb20 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingscreate.go @@ -49,7 +49,6 @@ func (c ArcSettingsClient) ArcSettingsCreate(ctx context.Context, id ArcSettingI var model ArcSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go index da38efd7c84..73f605738ba 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsget.go @@ -45,7 +45,6 @@ func (c ArcSettingsClient) ArcSettingsGet(ctx context.Context, id ArcSettingId) var model ArcSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go index 6b942fa5f05..962b74d6131 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_arcsettingsupdate.go @@ -49,7 +49,6 @@ func (c ArcSettingsClient) ArcSettingsUpdate(ctx context.Context, id ArcSettingI var model ArcSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go index 59282809851..1c7515c6c70 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_consentandinstalldefaultextensions.go @@ -46,7 +46,6 @@ func (c ArcSettingsClient) ConsentAndInstallDefaultExtensions(ctx context.Contex var model ArcSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go index 4f9aaacb077..a4181f72edc 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/method_generatepassword.go @@ -46,7 +46,6 @@ func (c ArcSettingsClient) GeneratePassword(ctx context.Context, id ArcSettingId var model PasswordCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go b/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go index 9beef03c72d..7271cfda5b7 100644 --- a/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go +++ b/resource-manager/azurestackhci/2024-01-01/arcsettings/version.go @@ -1,12 +1,10 @@ package arcsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/arcsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/arcsettings/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/cluster/README.md b/resource-manager/azurestackhci/2024-01-01/cluster/README.md index 15c55389a75..52090274fa5 100644 --- a/resource-manager/azurestackhci/2024-01-01/cluster/README.md +++ b/resource-manager/azurestackhci/2024-01-01/cluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/cluster` Documentation -The `cluster` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `cluster` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/cluster/client.go b/resource-manager/azurestackhci/2024-01-01/cluster/client.go index 2a0e60ffb2b..dfc40b75394 100644 --- a/resource-manager/azurestackhci/2024-01-01/cluster/client.go +++ b/resource-manager/azurestackhci/2024-01-01/cluster/client.go @@ -15,7 +15,7 @@ type ClusterClient struct { } func NewClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/cluster/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/cluster/id_cluster.go index d9ee18cbcc4..3b46b6b428b 100644 --- a/resource-manager/azurestackhci/2024-01-01/cluster/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/cluster/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/cluster/version.go b/resource-manager/azurestackhci/2024-01-01/cluster/version.go index baf9842b576..a6bfa5b1a5d 100644 --- a/resource-manager/azurestackhci/2024-01-01/cluster/version.go +++ b/resource-manager/azurestackhci/2024-01-01/cluster/version.go @@ -1,12 +1,10 @@ package cluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cluster/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/README.md b/resource-manager/azurestackhci/2024-01-01/clusters/README.md index 555f64c16bd..c2ec7307e26 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/README.md +++ b/resource-manager/azurestackhci/2024-01-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/client.go b/resource-manager/azurestackhci/2024-01-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/client.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/clusters/id_cluster.go index a930aa56ef5..331d88c276b 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go b/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go index 337ea36a215..3df539fb037 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/method_create.go @@ -49,7 +49,6 @@ func (c ClustersClient) Create(ctx context.Context, id ClusterId, input Cluster) var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go b/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go b/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go index 80edce4b64f..dd74e53131c 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/method_update.go @@ -49,7 +49,6 @@ func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterP var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/clusters/version.go b/resource-manager/azurestackhci/2024-01-01/clusters/version.go index 47ca5369a10..a3f777c67c7 100644 --- a/resource-manager/azurestackhci/2024-01-01/clusters/version.go +++ b/resource-manager/azurestackhci/2024-01-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md index cb2ccac393f..54b7aeda495 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/deploymentsettings` Documentation -The `deploymentsettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `deploymentsettings` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go index 2d772172804..71e6453b3d1 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/client.go @@ -15,7 +15,7 @@ type DeploymentSettingsClient struct { } func NewDeploymentSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentSettingsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go index f580320c6be..08a13e68935 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go index bc33385e35a..ef3bef0211e 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/id_deploymentsetting.go @@ -44,7 +44,7 @@ func ParseDeploymentSettingID(input string) (*DeploymentSettingId, error) { } id := DeploymentSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentSettingIDInsensitively(input string) (*DeploymentSettingId, } id := DeploymentSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go index c87af231c1b..a6d892ad7eb 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentSettingsClient) Get(ctx context.Context, id DeploymentSettingI var model DeploymentSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go index 0056879142c..6f9211ba29d 100644 --- a/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go +++ b/resource-manager/azurestackhci/2024-01-01/deploymentsettings/version.go @@ -1,12 +1,10 @@ package deploymentsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentsettings/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md b/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md index c3e90ddfb9d..979e79766e4 100644 --- a/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md +++ b/resource-manager/azurestackhci/2024-01-01/edgedevices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/edgedevices` Documentation -The `edgedevices` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `edgedevices` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go b/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go index 629b201ceec..551ebff0b03 100644 --- a/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go +++ b/resource-manager/azurestackhci/2024-01-01/edgedevices/client.go @@ -15,7 +15,7 @@ type EdgeDevicesClient struct { } func NewEdgeDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgeDevicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "edgedevices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "edgedevices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EdgeDevicesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go b/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go index 9ba7d872398..5fe7b90a845 100644 --- a/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go +++ b/resource-manager/azurestackhci/2024-01-01/edgedevices/id_scopededgedevice.go @@ -40,7 +40,7 @@ func ParseScopedEdgeDeviceID(input string) (*ScopedEdgeDeviceId, error) { } id := ScopedEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedEdgeDeviceIDInsensitively(input string) (*ScopedEdgeDeviceId, er } id := ScopedEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go b/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go index b689f330ce3..7bff5bc0869 100644 --- a/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/edgedevices/method_get.go @@ -45,7 +45,6 @@ func (c EdgeDevicesClient) Get(ctx context.Context, id ScopedEdgeDeviceId) (resu var model EdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go b/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go index df48529894b..383d9372736 100644 --- a/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go +++ b/resource-manager/azurestackhci/2024-01-01/edgedevices/version.go @@ -1,12 +1,10 @@ package edgedevices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/edgedevices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/edgedevices/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/README.md b/resource-manager/azurestackhci/2024-01-01/extensions/README.md index 5734efdd9fe..4edafc8a47a 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/README.md +++ b/resource-manager/azurestackhci/2024-01-01/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `extensions` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/client.go b/resource-manager/azurestackhci/2024-01-01/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/client.go +++ b/resource-manager/azurestackhci/2024-01-01/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/id_arcsetting.go b/resource-manager/azurestackhci/2024-01-01/extensions/id_arcsetting.go index 2a1f9ffc60c..4c0524f6bb5 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/id_arcsetting.go +++ b/resource-manager/azurestackhci/2024-01-01/extensions/id_arcsetting.go @@ -44,7 +44,7 @@ func ParseArcSettingID(input string) (*ArcSettingId, error) { } id := ArcSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseArcSettingIDInsensitively(input string) (*ArcSettingId, error) { } id := ArcSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/id_extension.go b/resource-manager/azurestackhci/2024-01-01/extensions/id_extension.go index b4cafce315f..b82cb26461e 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/id_extension.go +++ b/resource-manager/azurestackhci/2024-01-01/extensions/id_extension.go @@ -46,7 +46,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go b/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go index 2555add1944..de33d799aaf 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/extensions/method_get.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) Get(ctx context.Context, id ExtensionId) (result GetOp var model Extension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/extensions/version.go b/resource-manager/azurestackhci/2024-01-01/extensions/version.go index c4565a5f03e..d4b86e3f091 100644 --- a/resource-manager/azurestackhci/2024-01-01/extensions/version.go +++ b/resource-manager/azurestackhci/2024-01-01/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md b/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md index 75c18c4857e..138c41b50a3 100644 --- a/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md +++ b/resource-manager/azurestackhci/2024-01-01/galleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/galleryimages` Documentation -The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `galleryimages` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go b/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go index 59b9c848dbd..cebddc1c307 100644 --- a/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go +++ b/resource-manager/azurestackhci/2024-01-01/galleryimages/client.go @@ -15,7 +15,7 @@ type GalleryImagesClient struct { } func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go b/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go index 46d8f90b280..f8310a36764 100644 --- a/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go +++ b/resource-manager/azurestackhci/2024-01-01/galleryimages/id_galleryimage.go @@ -42,7 +42,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go b/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go index 213453f768a..8981c9b4deb 100644 --- a/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/galleryimages/method_get.go @@ -45,7 +45,6 @@ func (c GalleryImagesClient) Get(ctx context.Context, id GalleryImageId) (result var model GalleryImages result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go b/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go index 68cdc92a92c..cce6603ab3a 100644 --- a/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go +++ b/resource-manager/azurestackhci/2024-01-01/galleryimages/version.go @@ -1,12 +1,10 @@ package galleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimages/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/guestagents/README.md b/resource-manager/azurestackhci/2024-01-01/guestagents/README.md index 0ac889e9063..9829fa95bcf 100644 --- a/resource-manager/azurestackhci/2024-01-01/guestagents/README.md +++ b/resource-manager/azurestackhci/2024-01-01/guestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/guestagents` Documentation -The `guestagents` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `guestagents` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/guestagents/client.go b/resource-manager/azurestackhci/2024-01-01/guestagents/client.go index 8b3899fa940..8bafe6eb1b9 100644 --- a/resource-manager/azurestackhci/2024-01-01/guestagents/client.go +++ b/resource-manager/azurestackhci/2024-01-01/guestagents/client.go @@ -15,7 +15,7 @@ type GuestAgentsClient struct { } func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestAgentsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go b/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go index 0e039b2086d..a9445244c59 100644 --- a/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go +++ b/resource-manager/azurestackhci/2024-01-01/guestagents/method_guestagentget.go @@ -47,7 +47,6 @@ func (c GuestAgentsClient) GuestAgentGet(ctx context.Context, id commonids.Scope var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/guestagents/version.go b/resource-manager/azurestackhci/2024-01-01/guestagents/version.go index da58ff4d4a2..3934151490b 100644 --- a/resource-manager/azurestackhci/2024-01-01/guestagents/version.go +++ b/resource-manager/azurestackhci/2024-01-01/guestagents/version.go @@ -1,12 +1,10 @@ package guestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestagents/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md index 542581e7866..f5b7ae6c42b 100644 --- a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md +++ b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata` Documentation -The `hybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `hybrididentitymetadata` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go index 597657e5901..94125d9df11 100644 --- a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go +++ b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/client.go @@ -15,7 +15,7 @@ type HybridIdentityMetadataClient struct { } func NewHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridIdentityMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridIdentityMetadataClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go index 759c20ac51b..1235a4bf120 100644 --- a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/method_get.go @@ -47,7 +47,6 @@ func (c HybridIdentityMetadataClient) Get(ctx context.Context, id commonids.Scop var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go index 360a7486869..741f3761d47 100644 --- a/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go +++ b/resource-manager/azurestackhci/2024-01-01/hybrididentitymetadata/version.go @@ -1,12 +1,10 @@ package hybrididentitymetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybrididentitymetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybrididentitymetadata/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md index cca883d4aa9..1bd27a6224c 100644 --- a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md +++ b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/logicalnetworks` Documentation -The `logicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `logicalnetworks` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go index 1ab7fafbcfe..e6c996b155c 100644 --- a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go +++ b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/client.go @@ -15,7 +15,7 @@ type LogicalNetworksClient struct { } func NewLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*LogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogicalNetworksClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go index 8de178f8122..7bebc0366cd 100644 --- a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go +++ b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/id_logicalnetwork.go @@ -42,7 +42,7 @@ func ParseLogicalNetworkID(input string) (*LogicalNetworkId, error) { } id := LogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLogicalNetworkIDInsensitively(input string) (*LogicalNetworkId, error) } id := LogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go index 8e6d89f1c64..9c0fbe42fc3 100644 --- a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c LogicalNetworksClient) Get(ctx context.Context, id LogicalNetworkId) (re var model LogicalNetworks result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go index 1c08c37e8b6..33c6dfa6854 100644 --- a/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go +++ b/resource-manager/azurestackhci/2024-01-01/logicalnetworks/version.go @@ -1,12 +1,10 @@ package logicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logicalnetworks/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md index aae54a9a657..c2c3d48d779 100644 --- a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md +++ b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages` Documentation -The `marketplacegalleryimages` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `marketplacegalleryimages` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go index d999cf677f8..84f918ca46b 100644 --- a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go +++ b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/client.go @@ -15,7 +15,7 @@ type MarketplaceGalleryImagesClient struct { } func NewMarketplaceGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplaceGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplacegalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplacegalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplaceGalleryImagesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go index e8d23f4ad49..4a02b5bbd6a 100644 --- a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go +++ b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/id_marketplacegalleryimage.go @@ -42,7 +42,7 @@ func ParseMarketplaceGalleryImageID(input string) (*MarketplaceGalleryImageId, e } id := MarketplaceGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMarketplaceGalleryImageIDInsensitively(input string) (*MarketplaceGall } id := MarketplaceGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go index 9398502879e..473ec9523a1 100644 --- a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c MarketplaceGalleryImagesClient) Get(ctx context.Context, id MarketplaceG var model MarketplaceGalleryImages result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go index fe2ba695558..94764678146 100644 --- a/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go +++ b/resource-manager/azurestackhci/2024-01-01/marketplacegalleryimages/version.go @@ -1,12 +1,10 @@ package marketplacegalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplacegalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplacegalleryimages/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md index 7990f55f84f..04f7e7b65b3 100644 --- a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md +++ b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/networkinterfaces` Documentation -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `networkinterfaces` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go index cd098aeccdf..1edd1a6838a 100644 --- a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go +++ b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/client.go @@ -15,7 +15,7 @@ type NetworkInterfacesClient struct { } func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkinterfaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go index d29ee8040c9..327620db23f 100644 --- a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go +++ b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/id_networkinterface.go @@ -42,7 +42,7 @@ func ParseNetworkInterfaceID(input string) (*NetworkInterfaceId, error) { } id := NetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkInterfaceIDInsensitively(input string) (*NetworkInterfaceId, er } id := NetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go index 33da90ee600..c9d791fd312 100644 --- a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/method_get.go @@ -45,7 +45,6 @@ func (c NetworkInterfacesClient) Get(ctx context.Context, id NetworkInterfaceId) var model NetworkInterfaces result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go index 82d52844172..632f9b73d85 100644 --- a/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go +++ b/resource-manager/azurestackhci/2024-01-01/networkinterfaces/version.go @@ -1,12 +1,10 @@ package networkinterfaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkinterfaces/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/README.md b/resource-manager/azurestackhci/2024-01-01/offers/README.md index dbdc1822f8b..7460c6fec6f 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/README.md +++ b/resource-manager/azurestackhci/2024-01-01/offers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/offers` Documentation -The `offers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `offers` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/offers/client.go b/resource-manager/azurestackhci/2024-01-01/offers/client.go index 77b5dddcd7b..a9704928d40 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/client.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/client.go @@ -15,7 +15,7 @@ type OffersClient struct { } func NewOffersClientWithBaseURI(sdkApi sdkEnv.Api) (*OffersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "offers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "offers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OffersClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/offers/id_cluster.go index d14118c2987..0ecd6473256 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/id_offer.go b/resource-manager/azurestackhci/2024-01-01/offers/id_offer.go index 1d00693f32b..f93fc04389d 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/id_offer.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/id_offer.go @@ -46,7 +46,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/id_publisher.go b/resource-manager/azurestackhci/2024-01-01/offers/id_publisher.go index e42b6673518..f828ecbbb7b 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/id_publisher.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/id_publisher.go @@ -44,7 +44,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/method_get.go b/resource-manager/azurestackhci/2024-01-01/offers/method_get.go index 47730661e35..d5a4f0ee8fa 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c OffersClient) Get(ctx context.Context, id OfferId, options GetOperationO var model Offer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go b/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go index 00376abec4e..1eedc7537c2 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/method_listbycluster.go @@ -39,6 +39,7 @@ func (o ListByClusterOperationOptions) ToHeaders() *client.Headers { func (o ListByClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go b/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go index 8f4f58cf712..af8228a9eaa 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/method_listbypublisher.go @@ -39,6 +39,7 @@ func (o ListByPublisherOperationOptions) ToHeaders() *client.Headers { func (o ListByPublisherOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/azurestackhci/2024-01-01/offers/version.go b/resource-manager/azurestackhci/2024-01-01/offers/version.go index 15e8641cec4..6c383e6703c 100644 --- a/resource-manager/azurestackhci/2024-01-01/offers/version.go +++ b/resource-manager/azurestackhci/2024-01-01/offers/version.go @@ -1,12 +1,10 @@ package offers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/offers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/offers/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/README.md b/resource-manager/azurestackhci/2024-01-01/publishers/README.md index ef69004503a..bbe2e227dea 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/README.md +++ b/resource-manager/azurestackhci/2024-01-01/publishers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/publishers` Documentation -The `publishers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `publishers` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/client.go b/resource-manager/azurestackhci/2024-01-01/publishers/client.go index ea59faa9c8e..bb2a0107a98 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/client.go +++ b/resource-manager/azurestackhci/2024-01-01/publishers/client.go @@ -15,7 +15,7 @@ type PublishersClient struct { } func NewPublishersClientWithBaseURI(sdkApi sdkEnv.Api) (*PublishersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publishers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publishers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublishersClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/publishers/id_cluster.go index 3a7fff3ea9d..c36bcd02962 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/publishers/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/id_publisher.go b/resource-manager/azurestackhci/2024-01-01/publishers/id_publisher.go index d8b7a773e80..350494e0f6b 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/id_publisher.go +++ b/resource-manager/azurestackhci/2024-01-01/publishers/id_publisher.go @@ -44,7 +44,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go b/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go index 850e3f895f2..e9e46afeb43 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/publishers/method_get.go @@ -45,7 +45,6 @@ func (c PublishersClient) Get(ctx context.Context, id PublisherId) (result GetOp var model Publisher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/publishers/version.go b/resource-manager/azurestackhci/2024-01-01/publishers/version.go index 5283ce6cbca..dc6a8087a9b 100644 --- a/resource-manager/azurestackhci/2024-01-01/publishers/version.go +++ b/resource-manager/azurestackhci/2024-01-01/publishers/version.go @@ -1,12 +1,10 @@ package publishers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publishers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publishers/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md b/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md index 0b4c4e241c2..9b430289c73 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/securitysettings` Documentation -The `securitysettings` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `securitysettings` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go b/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go index eaa888ea0b6..d2ecf812038 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/client.go @@ -15,7 +15,7 @@ type SecuritySettingsClient struct { } func NewSecuritySettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecuritySettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitysettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitysettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecuritySettingsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go index 0dc221054e9..4249b093ff5 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go b/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go index 4dc2e33489d..11093be223a 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/id_securitysetting.go @@ -44,7 +44,7 @@ func ParseSecuritySettingID(input string) (*SecuritySettingId, error) { } id := SecuritySettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecuritySettingIDInsensitively(input string) (*SecuritySettingId, erro } id := SecuritySettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go b/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go index a58fd793054..7d2af22d48c 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/method_get.go @@ -45,7 +45,6 @@ func (c SecuritySettingsClient) Get(ctx context.Context, id SecuritySettingId) ( var model SecuritySetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go b/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go index e98ba0c6def..db1ceed941b 100644 --- a/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go +++ b/resource-manager/azurestackhci/2024-01-01/securitysettings/version.go @@ -1,12 +1,10 @@ package securitysettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitysettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitysettings/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/README.md b/resource-manager/azurestackhci/2024-01-01/skuses/README.md index fb2dd4be316..0efea95d27b 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/README.md +++ b/resource-manager/azurestackhci/2024-01-01/skuses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/skuses` Documentation -The `skuses` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `skuses` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/client.go b/resource-manager/azurestackhci/2024-01-01/skuses/client.go index 85bd1abeccf..b92f0d17d7f 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/client.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/client.go @@ -15,7 +15,7 @@ type SkusesClient struct { } func NewSkusesClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skuses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skuses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/id_offer.go b/resource-manager/azurestackhci/2024-01-01/skuses/id_offer.go index 2c3a4c1b840..7f98f9afe07 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/id_offer.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/id_offer.go @@ -46,7 +46,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/id_sku.go b/resource-manager/azurestackhci/2024-01-01/skuses/id_sku.go index d4e78d7c558..01065820596 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/id_sku.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/id_sku.go @@ -48,7 +48,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go b/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go index f33f165fcc3..0880299a142 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/method_skusget.go @@ -34,6 +34,7 @@ func (o SkusGetOperationOptions) ToHeaders() *client.Headers { func (o SkusGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SkusesClient) SkusGet(ctx context.Context, id SkuId, options SkusGetOper var model Sku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go b/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go index 58d1602bf96..59509430fb1 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/method_skuslistbyoffer.go @@ -39,6 +39,7 @@ func (o SkusListByOfferOperationOptions) ToHeaders() *client.Headers { func (o SkusListByOfferOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/azurestackhci/2024-01-01/skuses/version.go b/resource-manager/azurestackhci/2024-01-01/skuses/version.go index 671aa464d7a..407e914c8a0 100644 --- a/resource-manager/azurestackhci/2024-01-01/skuses/version.go +++ b/resource-manager/azurestackhci/2024-01-01/skuses/version.go @@ -1,12 +1,10 @@ package skuses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skuses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skuses/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md b/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md index f12b3144412..1841df59498 100644 --- a/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md +++ b/resource-manager/azurestackhci/2024-01-01/storagecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/storagecontainers` Documentation -The `storagecontainers` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `storagecontainers` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go b/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go index db251da0046..c84157bbd8e 100644 --- a/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go +++ b/resource-manager/azurestackhci/2024-01-01/storagecontainers/client.go @@ -15,7 +15,7 @@ type StorageContainersClient struct { } func NewStorageContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagecontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagecontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageContainersClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go b/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go index 0600ddd1b9a..c127b997c40 100644 --- a/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go +++ b/resource-manager/azurestackhci/2024-01-01/storagecontainers/id_storagecontainer.go @@ -42,7 +42,7 @@ func ParseStorageContainerID(input string) (*StorageContainerId, error) { } id := StorageContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageContainerIDInsensitively(input string) (*StorageContainerId, er } id := StorageContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go b/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go index 3ead82b221b..764936b047f 100644 --- a/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/storagecontainers/method_get.go @@ -45,7 +45,6 @@ func (c StorageContainersClient) Get(ctx context.Context, id StorageContainerId) var model StorageContainers result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go b/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go index 35add40d471..2ba1cdbe233 100644 --- a/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go +++ b/resource-manager/azurestackhci/2024-01-01/storagecontainers/version.go @@ -1,12 +1,10 @@ package storagecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagecontainers/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/README.md b/resource-manager/azurestackhci/2024-01-01/updateruns/README.md index ab0f4790540..034a05a8422 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/README.md +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updateruns` Documentation -The `updateruns` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `updateruns` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/client.go b/resource-manager/azurestackhci/2024-01-01/updateruns/client.go index a5becca3c6b..e25bd852788 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/client.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/client.go @@ -15,7 +15,7 @@ type UpdateRunsClient struct { } func NewUpdateRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updateruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updateruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdateRunsClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/id_update.go b/resource-manager/azurestackhci/2024-01-01/updateruns/id_update.go index f8744304b63..983b02dfe6e 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/id_update.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/id_update.go @@ -44,7 +44,7 @@ func ParseUpdateID(input string) (*UpdateId, error) { } id := UpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateIDInsensitively(input string) (*UpdateId, error) { } id := UpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/id_updaterun.go b/resource-manager/azurestackhci/2024-01-01/updateruns/id_updaterun.go index 14b2180425f..846f552130f 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/id_updaterun.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/id_updaterun.go @@ -46,7 +46,7 @@ func ParseUpdateRunID(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUpdateRunIDInsensitively(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go b/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go index 674bbb589e9..499bee735f8 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/method_get.go @@ -45,7 +45,6 @@ func (c UpdateRunsClient) Get(ctx context.Context, id UpdateRunId) (result GetOp var model UpdateRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go b/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go index 58f21298c0f..205bfa13171 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/method_put.go @@ -49,7 +49,6 @@ func (c UpdateRunsClient) Put(ctx context.Context, id UpdateRunId, input UpdateR var model UpdateRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updateruns/version.go b/resource-manager/azurestackhci/2024-01-01/updateruns/version.go index a4ea5ab3baf..bc58a5496a0 100644 --- a/resource-manager/azurestackhci/2024-01-01/updateruns/version.go +++ b/resource-manager/azurestackhci/2024-01-01/updateruns/version.go @@ -1,12 +1,10 @@ package updateruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updateruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updateruns/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/README.md b/resource-manager/azurestackhci/2024-01-01/updates/README.md index 87cf76fa1d0..9178885fd08 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/README.md +++ b/resource-manager/azurestackhci/2024-01-01/updates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updates` Documentation -The `updates` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `updates` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/updates/client.go b/resource-manager/azurestackhci/2024-01-01/updates/client.go index f8438b80656..969ceb5be5b 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/client.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/client.go @@ -15,7 +15,7 @@ type UpdatesClient struct { } func NewUpdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdatesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/updates/id_cluster.go index 1b34e01fffc..beaf7e4f856 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/id_update.go b/resource-manager/azurestackhci/2024-01-01/updates/id_update.go index 1588a8a86ff..3e7ccce8ed0 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/id_update.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/id_update.go @@ -44,7 +44,7 @@ func ParseUpdateID(input string) (*UpdateId, error) { } id := UpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateIDInsensitively(input string) (*UpdateId, error) { } id := UpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/method_get.go b/resource-manager/azurestackhci/2024-01-01/updates/method_get.go index 7608d9b1fdd..cb5f8ef7397 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/method_get.go @@ -45,7 +45,6 @@ func (c UpdatesClient) Get(ctx context.Context, id UpdateId) (result GetOperatio var model Update result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/method_put.go b/resource-manager/azurestackhci/2024-01-01/updates/method_put.go index 1da3ed2ae54..135bf382fd8 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/method_put.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/method_put.go @@ -49,7 +49,6 @@ func (c UpdatesClient) Put(ctx context.Context, id UpdateId, input Update) (resu var model Update result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updates/version.go b/resource-manager/azurestackhci/2024-01-01/updates/version.go index c20c9326dd6..d676b96752f 100644 --- a/resource-manager/azurestackhci/2024-01-01/updates/version.go +++ b/resource-manager/azurestackhci/2024-01-01/updates/version.go @@ -1,12 +1,10 @@ package updates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updates/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md b/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md index 55a9be0c7e3..6ef13b426fe 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/updatesummaries` Documentation -The `updatesummaries` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `updatesummaries` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go b/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go index 869223878e1..7922f5b8819 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/client.go @@ -15,7 +15,7 @@ type UpdateSummariesClient struct { } func NewUpdateSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updatesummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updatesummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdateSummariesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/id_cluster.go b/resource-manager/azurestackhci/2024-01-01/updatesummaries/id_cluster.go index 42e4632b7b8..6789523abaf 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/id_cluster.go +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go b/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go index 874fcd2d831..df006007220 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_get.go @@ -46,7 +46,6 @@ func (c UpdateSummariesClient) Get(ctx context.Context, id ClusterId) (result Ge var model UpdateSummaries result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go b/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go index a8b151c8e57..5e31d6b3692 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/method_put.go @@ -50,7 +50,6 @@ func (c UpdateSummariesClient) Put(ctx context.Context, id ClusterId, input Upda var model UpdateSummaries result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go b/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go index c771197bf1d..cf029a80c07 100644 --- a/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go +++ b/resource-manager/azurestackhci/2024-01-01/updatesummaries/version.go @@ -1,12 +1,10 @@ package updatesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updatesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updatesummaries/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md index 103485fd08f..220309b2db1 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md +++ b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualharddisks` Documentation -The `virtualharddisks` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `virtualharddisks` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go index 337d4efa659..0223b952295 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/client.go @@ -15,7 +15,7 @@ type VirtualHardDisksClient struct { } func NewVirtualHardDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualHardDisksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualharddisks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualharddisks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualHardDisksClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go index 7f18540e453..dfc43fb06dc 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/id_virtualharddisk.go @@ -42,7 +42,7 @@ func ParseVirtualHardDiskID(input string) (*VirtualHardDiskId, error) { } id := VirtualHardDiskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualHardDiskIDInsensitively(input string) (*VirtualHardDiskId, erro } id := VirtualHardDiskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go index 7917d287d9b..df2381171e2 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualHardDisksClient) Get(ctx context.Context, id VirtualHardDiskId) ( var model VirtualHardDisks result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go index 833f8432f8b..3f3ffecc168 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualharddisks/version.go @@ -1,12 +1,10 @@ package virtualharddisks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualharddisks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualharddisks/2024-01-01" } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md index 1368193d455..3d1d694644e 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md +++ b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances` Documentation -The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `azurestackhci` (API Version `2024-01-01`). +The `virtualmachineinstances` SDK allows for interaction with Azure Resource Manager `azurestackhci` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go index e40ddc4adf5..18d28a8f009 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/client.go @@ -15,7 +15,7 @@ type VirtualMachineInstancesClient struct { } func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go index 083f0bcc7a1..145d52cc16f 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/method_get.go @@ -47,7 +47,6 @@ func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.Sco var model VirtualMachineInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go index 6fb9ac01a31..803709db371 100644 --- a/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go +++ b/resource-manager/azurestackhci/2024-01-01/virtualmachineinstances/version.go @@ -1,12 +1,10 @@ package virtualmachineinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineinstances/2024-01-01" } diff --git a/resource-manager/batch/2023-05-01/application/README.md b/resource-manager/batch/2023-05-01/application/README.md index cc1e3b9f30f..a4c44632f78 100644 --- a/resource-manager/batch/2023-05-01/application/README.md +++ b/resource-manager/batch/2023-05-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `application` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/application/client.go b/resource-manager/batch/2023-05-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/batch/2023-05-01/application/client.go +++ b/resource-manager/batch/2023-05-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/application/id_application.go b/resource-manager/batch/2023-05-01/application/id_application.go index dd993e4eaf5..fc220b72aab 100644 --- a/resource-manager/batch/2023-05-01/application/id_application.go +++ b/resource-manager/batch/2023-05-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/application/id_batchaccount.go b/resource-manager/batch/2023-05-01/application/id_batchaccount.go index 24f79b20867..060b7077651 100644 --- a/resource-manager/batch/2023-05-01/application/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/application/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/application/method_create.go b/resource-manager/batch/2023-05-01/application/method_create.go index 969b8c3f01e..f82824b74a2 100644 --- a/resource-manager/batch/2023-05-01/application/method_create.go +++ b/resource-manager/batch/2023-05-01/application/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Create(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/application/method_get.go b/resource-manager/batch/2023-05-01/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/batch/2023-05-01/application/method_get.go +++ b/resource-manager/batch/2023-05-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/application/method_list.go b/resource-manager/batch/2023-05-01/application/method_list.go index ea47d96f097..c17155dc171 100644 --- a/resource-manager/batch/2023-05-01/application/method_list.go +++ b/resource-manager/batch/2023-05-01/application/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/application/method_update.go b/resource-manager/batch/2023-05-01/application/method_update.go index f70ac75de33..d3d06a031c2 100644 --- a/resource-manager/batch/2023-05-01/application/method_update.go +++ b/resource-manager/batch/2023-05-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/application/version.go b/resource-manager/batch/2023-05-01/application/version.go index 8304f68f902..ec185dc0e64 100644 --- a/resource-manager/batch/2023-05-01/application/version.go +++ b/resource-manager/batch/2023-05-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/README.md b/resource-manager/batch/2023-05-01/applicationpackage/README.md index 0222c39f7e7..6de5d02874b 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/README.md +++ b/resource-manager/batch/2023-05-01/applicationpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/applicationpackage` Documentation -The `applicationpackage` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `applicationpackage` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/applicationpackage/client.go b/resource-manager/batch/2023-05-01/applicationpackage/client.go index 94884d9d83e..33a4c25eb85 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/client.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/client.go @@ -15,7 +15,7 @@ type ApplicationPackageClient struct { } func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationPackageClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/id_application.go b/resource-manager/batch/2023-05-01/applicationpackage/id_application.go index 011405cdeb3..f1b1ff9626e 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/id_application.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/id_version.go b/resource-manager/batch/2023-05-01/applicationpackage/id_version.go index a9e3b7c08b9..a33d73418d9 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/id_version.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/method_activate.go b/resource-manager/batch/2023-05-01/applicationpackage/method_activate.go index 75fc8bc3cb3..212091afa47 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/method_activate.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/method_activate.go @@ -50,7 +50,6 @@ func (c ApplicationPackageClient) Activate(ctx context.Context, id VersionId, in var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/method_create.go b/resource-manager/batch/2023-05-01/applicationpackage/method_create.go index 9bfa7c8bf2d..e9ce2d4d908 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/method_create.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationPackageClient) Create(ctx context.Context, id VersionId, inpu var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/method_get.go b/resource-manager/batch/2023-05-01/applicationpackage/method_get.go index 580541d6477..a0372e1e739 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/method_get.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationPackageClient) Get(ctx context.Context, id VersionId) (result var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/method_list.go b/resource-manager/batch/2023-05-01/applicationpackage/method_list.go index 4283d8928c6..d99214edc4d 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/method_list.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/applicationpackage/version.go b/resource-manager/batch/2023-05-01/applicationpackage/version.go index 865e1512c8a..fc15b38c988 100644 --- a/resource-manager/batch/2023-05-01/applicationpackage/version.go +++ b/resource-manager/batch/2023-05-01/applicationpackage/version.go @@ -1,12 +1,10 @@ package applicationpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationpackage/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/batchaccount/README.md b/resource-manager/batch/2023-05-01/batchaccount/README.md index 44d1e2c9071..dd2e77a352a 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/README.md +++ b/resource-manager/batch/2023-05-01/batchaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchaccount` Documentation -The `batchaccount` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `batchaccount` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/batchaccount/client.go b/resource-manager/batch/2023-05-01/batchaccount/client.go index 607b46b2603..2779ef55d04 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/client.go +++ b/resource-manager/batch/2023-05-01/batchaccount/client.go @@ -15,7 +15,7 @@ type BatchAccountClient struct { } func NewBatchAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchAccountClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go b/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go index 0b75e0ac701..d1d7845f947 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/batchaccount/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/batchaccount/method_get.go b/resource-manager/batch/2023-05-01/batchaccount/method_get.go index 6dc844ee91a..5a247338315 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/method_get.go +++ b/resource-manager/batch/2023-05-01/batchaccount/method_get.go @@ -45,7 +45,6 @@ func (c BatchAccountClient) Get(ctx context.Context, id BatchAccountId) (result var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchaccount/method_getkeys.go b/resource-manager/batch/2023-05-01/batchaccount/method_getkeys.go index 70dd5c8da37..6ceeb11ddf0 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/method_getkeys.go +++ b/resource-manager/batch/2023-05-01/batchaccount/method_getkeys.go @@ -46,7 +46,6 @@ func (c BatchAccountClient) GetKeys(ctx context.Context, id BatchAccountId) (res var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchaccount/method_regeneratekey.go b/resource-manager/batch/2023-05-01/batchaccount/method_regeneratekey.go index 6c8bd2c4f6c..385f7216999 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/method_regeneratekey.go +++ b/resource-manager/batch/2023-05-01/batchaccount/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c BatchAccountClient) RegenerateKey(ctx context.Context, id BatchAccountId var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchaccount/method_update.go b/resource-manager/batch/2023-05-01/batchaccount/method_update.go index 8776d09247a..8a68a40f903 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/method_update.go +++ b/resource-manager/batch/2023-05-01/batchaccount/method_update.go @@ -49,7 +49,6 @@ func (c BatchAccountClient) Update(ctx context.Context, id BatchAccountId, input var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchaccount/version.go b/resource-manager/batch/2023-05-01/batchaccount/version.go index 46d3d73d5fd..a5d6d1e9391 100644 --- a/resource-manager/batch/2023-05-01/batchaccount/version.go +++ b/resource-manager/batch/2023-05-01/batchaccount/version.go @@ -1,12 +1,10 @@ package batchaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchaccount/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/README.md b/resource-manager/batch/2023-05-01/batchmanagements/README.md index 764838cc10b..5f01641502e 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/README.md +++ b/resource-manager/batch/2023-05-01/batchmanagements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/batchmanagements` Documentation -The `batchmanagements` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `batchmanagements` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/batchmanagements/client.go b/resource-manager/batch/2023-05-01/batchmanagements/client.go index e909e6a24f4..f6073366437 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/client.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/client.go @@ -15,7 +15,7 @@ type BatchManagementsClient struct { } func NewBatchManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchmanagements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchmanagements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchManagementsClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/id_batchaccount.go b/resource-manager/batch/2023-05-01/batchmanagements/id_batchaccount.go index f9a0ca31b1c..194e55e864a 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/id_detector.go b/resource-manager/batch/2023-05-01/batchmanagements/id_detector.go index e45738106dd..efaa4d06e51 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/id_detector.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/id_location.go b/resource-manager/batch/2023-05-01/batchmanagements/id_location.go index 8456437b55a..2a6c2dec505 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/id_location.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/method_batchaccountgetdetector.go b/resource-manager/batch/2023-05-01/batchmanagements/method_batchaccountgetdetector.go index f8cbbd9ff4d..db44b1e56ed 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/method_batchaccountgetdetector.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/method_batchaccountgetdetector.go @@ -45,7 +45,6 @@ func (c BatchManagementsClient) BatchAccountGetDetector(ctx context.Context, id var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/method_locationchecknameavailability.go b/resource-manager/batch/2023-05-01/batchmanagements/method_locationchecknameavailability.go index 12ba043133e..58082f97b01 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/method_locationchecknameavailability.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/method_locationchecknameavailability.go @@ -50,7 +50,6 @@ func (c BatchManagementsClient) LocationCheckNameAvailability(ctx context.Contex var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/batchmanagements/version.go b/resource-manager/batch/2023-05-01/batchmanagements/version.go index 9e98c850efe..9e49a545bab 100644 --- a/resource-manager/batch/2023-05-01/batchmanagements/version.go +++ b/resource-manager/batch/2023-05-01/batchmanagements/version.go @@ -1,12 +1,10 @@ package batchmanagements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchmanagements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchmanagements/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/certificate/README.md b/resource-manager/batch/2023-05-01/certificate/README.md index c4aa5a0fb20..e592cd76318 100644 --- a/resource-manager/batch/2023-05-01/certificate/README.md +++ b/resource-manager/batch/2023-05-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/certificate/client.go b/resource-manager/batch/2023-05-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/batch/2023-05-01/certificate/client.go +++ b/resource-manager/batch/2023-05-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go b/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go index bbce3f7cae7..7104581e0f0 100644 --- a/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/certificate/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/certificate/id_certificate.go b/resource-manager/batch/2023-05-01/certificate/id_certificate.go index 62d54b7e260..4b938e1bf9a 100644 --- a/resource-manager/batch/2023-05-01/certificate/id_certificate.go +++ b/resource-manager/batch/2023-05-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/certificate/method_canceldeletion.go b/resource-manager/batch/2023-05-01/certificate/method_canceldeletion.go index 2e4dcf0a15b..4c70006b21d 100644 --- a/resource-manager/batch/2023-05-01/certificate/method_canceldeletion.go +++ b/resource-manager/batch/2023-05-01/certificate/method_canceldeletion.go @@ -46,7 +46,6 @@ func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/certificate/method_create.go b/resource-manager/batch/2023-05-01/certificate/method_create.go index bbbc2c0757c..b9da5041801 100644 --- a/resource-manager/batch/2023-05-01/certificate/method_create.go +++ b/resource-manager/batch/2023-05-01/certificate/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateClient) Create(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/certificate/method_get.go b/resource-manager/batch/2023-05-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/batch/2023-05-01/certificate/method_get.go +++ b/resource-manager/batch/2023-05-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/certificate/method_listbybatchaccount.go b/resource-manager/batch/2023-05-01/certificate/method_listbybatchaccount.go index 287d5fc9781..9095d225ecc 100644 --- a/resource-manager/batch/2023-05-01/certificate/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-05-01/certificate/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/certificate/method_update.go b/resource-manager/batch/2023-05-01/certificate/method_update.go index 1977e470b49..d46adfe7c60 100644 --- a/resource-manager/batch/2023-05-01/certificate/method_update.go +++ b/resource-manager/batch/2023-05-01/certificate/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/certificate/version.go b/resource-manager/batch/2023-05-01/certificate/version.go index 5acc612f923..cf2ef3e8651 100644 --- a/resource-manager/batch/2023-05-01/certificate/version.go +++ b/resource-manager/batch/2023-05-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/location/README.md b/resource-manager/batch/2023-05-01/location/README.md index 224f5f19e9a..b4e1cbbe2f7 100644 --- a/resource-manager/batch/2023-05-01/location/README.md +++ b/resource-manager/batch/2023-05-01/location/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/location` Documentation -The `location` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `location` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/location/client.go b/resource-manager/batch/2023-05-01/location/client.go index 14480a4f2e8..ccb5443577a 100644 --- a/resource-manager/batch/2023-05-01/location/client.go +++ b/resource-manager/batch/2023-05-01/location/client.go @@ -15,7 +15,7 @@ type LocationClient struct { } func NewLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "location", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "location", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/location/id_location.go b/resource-manager/batch/2023-05-01/location/id_location.go index 0d7e2c55116..cc43a252197 100644 --- a/resource-manager/batch/2023-05-01/location/id_location.go +++ b/resource-manager/batch/2023-05-01/location/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/location/method_getquotas.go b/resource-manager/batch/2023-05-01/location/method_getquotas.go index 5bf4b3b66d4..6f2f5db290b 100644 --- a/resource-manager/batch/2023-05-01/location/method_getquotas.go +++ b/resource-manager/batch/2023-05-01/location/method_getquotas.go @@ -46,7 +46,6 @@ func (c LocationClient) GetQuotas(ctx context.Context, id LocationId) (result Ge var model BatchLocationQuota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/location/method_listsupportedcloudserviceskus.go b/resource-manager/batch/2023-05-01/location/method_listsupportedcloudserviceskus.go index 45deac379b4..4c2ea630a4a 100644 --- a/resource-manager/batch/2023-05-01/location/method_listsupportedcloudserviceskus.go +++ b/resource-manager/batch/2023-05-01/location/method_listsupportedcloudserviceskus.go @@ -40,6 +40,7 @@ func (o ListSupportedCloudServiceSkusOperationOptions) ToHeaders() *client.Heade func (o ListSupportedCloudServiceSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/location/method_listsupportedvirtualmachineskus.go b/resource-manager/batch/2023-05-01/location/method_listsupportedvirtualmachineskus.go index be5b08e29ed..2f2f3d56a2a 100644 --- a/resource-manager/batch/2023-05-01/location/method_listsupportedvirtualmachineskus.go +++ b/resource-manager/batch/2023-05-01/location/method_listsupportedvirtualmachineskus.go @@ -40,6 +40,7 @@ func (o ListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Hea func (o ListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/location/version.go b/resource-manager/batch/2023-05-01/location/version.go index aba56e9b5d2..388fec3885c 100644 --- a/resource-manager/batch/2023-05-01/location/version.go +++ b/resource-manager/batch/2023-05-01/location/version.go @@ -1,12 +1,10 @@ package location -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/location/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/location/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/pool/README.md b/resource-manager/batch/2023-05-01/pool/README.md index 4ec138b302c..90a249fd47e 100644 --- a/resource-manager/batch/2023-05-01/pool/README.md +++ b/resource-manager/batch/2023-05-01/pool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool` Documentation -The `pool` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `pool` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/pool/client.go b/resource-manager/batch/2023-05-01/pool/client.go index dd32c3c502c..54e29c9a688 100644 --- a/resource-manager/batch/2023-05-01/pool/client.go +++ b/resource-manager/batch/2023-05-01/pool/client.go @@ -15,7 +15,7 @@ type PoolClient struct { } func NewPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/pool/id_batchaccount.go b/resource-manager/batch/2023-05-01/pool/id_batchaccount.go index a291c268aa6..a023a255a87 100644 --- a/resource-manager/batch/2023-05-01/pool/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/pool/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/pool/id_pool.go b/resource-manager/batch/2023-05-01/pool/id_pool.go index 9f34d744780..a6dbd809b46 100644 --- a/resource-manager/batch/2023-05-01/pool/id_pool.go +++ b/resource-manager/batch/2023-05-01/pool/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/pool/method_create.go b/resource-manager/batch/2023-05-01/pool/method_create.go index 8c732d52df0..fd4569559b1 100644 --- a/resource-manager/batch/2023-05-01/pool/method_create.go +++ b/resource-manager/batch/2023-05-01/pool/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c PoolClient) Create(ctx context.Context, id PoolId, input Pool, options C var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/pool/method_disableautoscale.go b/resource-manager/batch/2023-05-01/pool/method_disableautoscale.go index 25e7ab31914..326b5484098 100644 --- a/resource-manager/batch/2023-05-01/pool/method_disableautoscale.go +++ b/resource-manager/batch/2023-05-01/pool/method_disableautoscale.go @@ -46,7 +46,6 @@ func (c PoolClient) DisableAutoScale(ctx context.Context, id PoolId) (result Dis var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/pool/method_get.go b/resource-manager/batch/2023-05-01/pool/method_get.go index 65c9fd44f9e..08f23dd5e38 100644 --- a/resource-manager/batch/2023-05-01/pool/method_get.go +++ b/resource-manager/batch/2023-05-01/pool/method_get.go @@ -45,7 +45,6 @@ func (c PoolClient) Get(ctx context.Context, id PoolId) (result GetOperationResp var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/pool/method_listbybatchaccount.go b/resource-manager/batch/2023-05-01/pool/method_listbybatchaccount.go index a3590d663af..230109ca49c 100644 --- a/resource-manager/batch/2023-05-01/pool/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-05-01/pool/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/pool/method_stopresize.go b/resource-manager/batch/2023-05-01/pool/method_stopresize.go index 766ec843a7f..e968c2a58ee 100644 --- a/resource-manager/batch/2023-05-01/pool/method_stopresize.go +++ b/resource-manager/batch/2023-05-01/pool/method_stopresize.go @@ -46,7 +46,6 @@ func (c PoolClient) StopResize(ctx context.Context, id PoolId) (result StopResiz var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/pool/method_update.go b/resource-manager/batch/2023-05-01/pool/method_update.go index fbbb607783e..1bd909d87e9 100644 --- a/resource-manager/batch/2023-05-01/pool/method_update.go +++ b/resource-manager/batch/2023-05-01/pool/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PoolClient) Update(ctx context.Context, id PoolId, input Pool, options U var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/pool/version.go b/resource-manager/batch/2023-05-01/pool/version.go index acbf41d40de..343057716e5 100644 --- a/resource-manager/batch/2023-05-01/pool/version.go +++ b/resource-manager/batch/2023-05-01/pool/version.go @@ -1,12 +1,10 @@ package pool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pool/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/README.md b/resource-manager/batch/2023-05-01/privateendpointconnection/README.md index 90911872d1a..2ae8b4e66f4 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/README.md +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/client.go b/resource-manager/batch/2023-05-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/client.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/id_batchaccount.go b/resource-manager/batch/2023-05-01/privateendpointconnection/id_batchaccount.go index f7e6af7dbc8..a931891d1b7 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/batch/2023-05-01/privateendpointconnection/id_privateendpointconnection.go index 25d06d0b855..6edb2401e64 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/method_get.go b/resource-manager/batch/2023-05-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/method_get.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/method_listbybatchaccount.go b/resource-manager/batch/2023-05-01/privateendpointconnection/method_listbybatchaccount.go index ff65bcec30f..5ed91d577fe 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/method_update.go b/resource-manager/batch/2023-05-01/privateendpointconnection/method_update.go index f92a9e21504..e7dfdb4d83f 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/method_update.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/privateendpointconnection/version.go b/resource-manager/batch/2023-05-01/privateendpointconnection/version.go index 4cb97f84464..eaa27bfb386 100644 --- a/resource-manager/batch/2023-05-01/privateendpointconnection/version.go +++ b/resource-manager/batch/2023-05-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-05-01" } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/README.md b/resource-manager/batch/2023-05-01/privatelinkresource/README.md index 23ef3d9afc6..ebe641f435d 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/README.md +++ b/resource-manager/batch/2023-05-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-05-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/client.go b/resource-manager/batch/2023-05-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/client.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/id_batchaccount.go b/resource-manager/batch/2023-05-01/privatelinkresource/id_batchaccount.go index 9f6d2840fca..59c8f99019c 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/id_batchaccount.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/batch/2023-05-01/privatelinkresource/id_privatelinkresource.go index 4356c5a51bb..0b8bc5a029a 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/method_get.go b/resource-manager/batch/2023-05-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/method_get.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/method_listbybatchaccount.go b/resource-manager/batch/2023-05-01/privatelinkresource/method_listbybatchaccount.go index a5c4f91b508..e74b98a7760 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-05-01/privatelinkresource/version.go b/resource-manager/batch/2023-05-01/privatelinkresource/version.go index a9dda291186..3cfb7d713e1 100644 --- a/resource-manager/batch/2023-05-01/privatelinkresource/version.go +++ b/resource-manager/batch/2023-05-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2023-05-01" } diff --git a/resource-manager/batch/2023-11-01/application/README.md b/resource-manager/batch/2023-11-01/application/README.md index 208e82684f5..b5e579f5b46 100644 --- a/resource-manager/batch/2023-11-01/application/README.md +++ b/resource-manager/batch/2023-11-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `application` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/application/client.go b/resource-manager/batch/2023-11-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/batch/2023-11-01/application/client.go +++ b/resource-manager/batch/2023-11-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/application/id_application.go b/resource-manager/batch/2023-11-01/application/id_application.go index dd993e4eaf5..fc220b72aab 100644 --- a/resource-manager/batch/2023-11-01/application/id_application.go +++ b/resource-manager/batch/2023-11-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/application/id_batchaccount.go b/resource-manager/batch/2023-11-01/application/id_batchaccount.go index 24f79b20867..060b7077651 100644 --- a/resource-manager/batch/2023-11-01/application/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/application/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/application/method_create.go b/resource-manager/batch/2023-11-01/application/method_create.go index 969b8c3f01e..f82824b74a2 100644 --- a/resource-manager/batch/2023-11-01/application/method_create.go +++ b/resource-manager/batch/2023-11-01/application/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Create(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/application/method_get.go b/resource-manager/batch/2023-11-01/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/batch/2023-11-01/application/method_get.go +++ b/resource-manager/batch/2023-11-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/application/method_list.go b/resource-manager/batch/2023-11-01/application/method_list.go index ea47d96f097..c17155dc171 100644 --- a/resource-manager/batch/2023-11-01/application/method_list.go +++ b/resource-manager/batch/2023-11-01/application/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/application/method_update.go b/resource-manager/batch/2023-11-01/application/method_update.go index f70ac75de33..d3d06a031c2 100644 --- a/resource-manager/batch/2023-11-01/application/method_update.go +++ b/resource-manager/batch/2023-11-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/application/version.go b/resource-manager/batch/2023-11-01/application/version.go index a06c1028c65..eef74a62151 100644 --- a/resource-manager/batch/2023-11-01/application/version.go +++ b/resource-manager/batch/2023-11-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/README.md b/resource-manager/batch/2023-11-01/applicationpackage/README.md index b5424ede08d..34354e7764e 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/README.md +++ b/resource-manager/batch/2023-11-01/applicationpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/applicationpackage` Documentation -The `applicationpackage` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `applicationpackage` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/applicationpackage/client.go b/resource-manager/batch/2023-11-01/applicationpackage/client.go index 94884d9d83e..33a4c25eb85 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/client.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/client.go @@ -15,7 +15,7 @@ type ApplicationPackageClient struct { } func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationPackageClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/id_application.go b/resource-manager/batch/2023-11-01/applicationpackage/id_application.go index 011405cdeb3..f1b1ff9626e 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/id_application.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/id_version.go b/resource-manager/batch/2023-11-01/applicationpackage/id_version.go index a9e3b7c08b9..a33d73418d9 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/id_version.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/method_activate.go b/resource-manager/batch/2023-11-01/applicationpackage/method_activate.go index 75fc8bc3cb3..212091afa47 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/method_activate.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/method_activate.go @@ -50,7 +50,6 @@ func (c ApplicationPackageClient) Activate(ctx context.Context, id VersionId, in var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/method_create.go b/resource-manager/batch/2023-11-01/applicationpackage/method_create.go index 9bfa7c8bf2d..e9ce2d4d908 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/method_create.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationPackageClient) Create(ctx context.Context, id VersionId, inpu var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/method_get.go b/resource-manager/batch/2023-11-01/applicationpackage/method_get.go index 580541d6477..a0372e1e739 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/method_get.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationPackageClient) Get(ctx context.Context, id VersionId) (result var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/method_list.go b/resource-manager/batch/2023-11-01/applicationpackage/method_list.go index 4283d8928c6..d99214edc4d 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/method_list.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/applicationpackage/version.go b/resource-manager/batch/2023-11-01/applicationpackage/version.go index af48e9da3c0..e8c8851ff73 100644 --- a/resource-manager/batch/2023-11-01/applicationpackage/version.go +++ b/resource-manager/batch/2023-11-01/applicationpackage/version.go @@ -1,12 +1,10 @@ package applicationpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationpackage/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/batchaccount/README.md b/resource-manager/batch/2023-11-01/batchaccount/README.md index 044d3cc36b6..3ea01c3aac9 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/README.md +++ b/resource-manager/batch/2023-11-01/batchaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/batchaccount` Documentation -The `batchaccount` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `batchaccount` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/batchaccount/client.go b/resource-manager/batch/2023-11-01/batchaccount/client.go index 607b46b2603..2779ef55d04 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/client.go +++ b/resource-manager/batch/2023-11-01/batchaccount/client.go @@ -15,7 +15,7 @@ type BatchAccountClient struct { } func NewBatchAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchAccountClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/batchaccount/id_batchaccount.go b/resource-manager/batch/2023-11-01/batchaccount/id_batchaccount.go index 0b75e0ac701..d1d7845f947 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/batchaccount/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/batchaccount/method_get.go b/resource-manager/batch/2023-11-01/batchaccount/method_get.go index 6dc844ee91a..5a247338315 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/method_get.go +++ b/resource-manager/batch/2023-11-01/batchaccount/method_get.go @@ -45,7 +45,6 @@ func (c BatchAccountClient) Get(ctx context.Context, id BatchAccountId) (result var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchaccount/method_getkeys.go b/resource-manager/batch/2023-11-01/batchaccount/method_getkeys.go index 70dd5c8da37..6ceeb11ddf0 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/method_getkeys.go +++ b/resource-manager/batch/2023-11-01/batchaccount/method_getkeys.go @@ -46,7 +46,6 @@ func (c BatchAccountClient) GetKeys(ctx context.Context, id BatchAccountId) (res var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchaccount/method_regeneratekey.go b/resource-manager/batch/2023-11-01/batchaccount/method_regeneratekey.go index 6c8bd2c4f6c..385f7216999 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/method_regeneratekey.go +++ b/resource-manager/batch/2023-11-01/batchaccount/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c BatchAccountClient) RegenerateKey(ctx context.Context, id BatchAccountId var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchaccount/method_update.go b/resource-manager/batch/2023-11-01/batchaccount/method_update.go index 8776d09247a..8a68a40f903 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/method_update.go +++ b/resource-manager/batch/2023-11-01/batchaccount/method_update.go @@ -49,7 +49,6 @@ func (c BatchAccountClient) Update(ctx context.Context, id BatchAccountId, input var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchaccount/version.go b/resource-manager/batch/2023-11-01/batchaccount/version.go index 71b4fb4a9eb..b7280953a13 100644 --- a/resource-manager/batch/2023-11-01/batchaccount/version.go +++ b/resource-manager/batch/2023-11-01/batchaccount/version.go @@ -1,12 +1,10 @@ package batchaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchaccount/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/README.md b/resource-manager/batch/2023-11-01/batchmanagements/README.md index fd7a70a9fd9..32685682a75 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/README.md +++ b/resource-manager/batch/2023-11-01/batchmanagements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/batchmanagements` Documentation -The `batchmanagements` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `batchmanagements` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/batchmanagements/client.go b/resource-manager/batch/2023-11-01/batchmanagements/client.go index e909e6a24f4..f6073366437 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/client.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/client.go @@ -15,7 +15,7 @@ type BatchManagementsClient struct { } func NewBatchManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchmanagements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchmanagements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchManagementsClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/id_batchaccount.go b/resource-manager/batch/2023-11-01/batchmanagements/id_batchaccount.go index f9a0ca31b1c..194e55e864a 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/id_detector.go b/resource-manager/batch/2023-11-01/batchmanagements/id_detector.go index e45738106dd..efaa4d06e51 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/id_detector.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/id_location.go b/resource-manager/batch/2023-11-01/batchmanagements/id_location.go index 8456437b55a..2a6c2dec505 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/id_location.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/method_batchaccountgetdetector.go b/resource-manager/batch/2023-11-01/batchmanagements/method_batchaccountgetdetector.go index f8cbbd9ff4d..db44b1e56ed 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/method_batchaccountgetdetector.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/method_batchaccountgetdetector.go @@ -45,7 +45,6 @@ func (c BatchManagementsClient) BatchAccountGetDetector(ctx context.Context, id var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/method_locationchecknameavailability.go b/resource-manager/batch/2023-11-01/batchmanagements/method_locationchecknameavailability.go index 12ba043133e..58082f97b01 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/method_locationchecknameavailability.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/method_locationchecknameavailability.go @@ -50,7 +50,6 @@ func (c BatchManagementsClient) LocationCheckNameAvailability(ctx context.Contex var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/batchmanagements/version.go b/resource-manager/batch/2023-11-01/batchmanagements/version.go index e5fec3c1832..2f68c099222 100644 --- a/resource-manager/batch/2023-11-01/batchmanagements/version.go +++ b/resource-manager/batch/2023-11-01/batchmanagements/version.go @@ -1,12 +1,10 @@ package batchmanagements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchmanagements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchmanagements/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/certificate/README.md b/resource-manager/batch/2023-11-01/certificate/README.md index 2a9b14b25e0..e72f53bb1de 100644 --- a/resource-manager/batch/2023-11-01/certificate/README.md +++ b/resource-manager/batch/2023-11-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/certificate/client.go b/resource-manager/batch/2023-11-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/batch/2023-11-01/certificate/client.go +++ b/resource-manager/batch/2023-11-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/certificate/id_batchaccount.go b/resource-manager/batch/2023-11-01/certificate/id_batchaccount.go index bbce3f7cae7..7104581e0f0 100644 --- a/resource-manager/batch/2023-11-01/certificate/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/certificate/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/certificate/id_certificate.go b/resource-manager/batch/2023-11-01/certificate/id_certificate.go index 62d54b7e260..4b938e1bf9a 100644 --- a/resource-manager/batch/2023-11-01/certificate/id_certificate.go +++ b/resource-manager/batch/2023-11-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/certificate/method_canceldeletion.go b/resource-manager/batch/2023-11-01/certificate/method_canceldeletion.go index 2e4dcf0a15b..4c70006b21d 100644 --- a/resource-manager/batch/2023-11-01/certificate/method_canceldeletion.go +++ b/resource-manager/batch/2023-11-01/certificate/method_canceldeletion.go @@ -46,7 +46,6 @@ func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/certificate/method_create.go b/resource-manager/batch/2023-11-01/certificate/method_create.go index bbbc2c0757c..b9da5041801 100644 --- a/resource-manager/batch/2023-11-01/certificate/method_create.go +++ b/resource-manager/batch/2023-11-01/certificate/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateClient) Create(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/certificate/method_get.go b/resource-manager/batch/2023-11-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/batch/2023-11-01/certificate/method_get.go +++ b/resource-manager/batch/2023-11-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/certificate/method_listbybatchaccount.go b/resource-manager/batch/2023-11-01/certificate/method_listbybatchaccount.go index 287d5fc9781..9095d225ecc 100644 --- a/resource-manager/batch/2023-11-01/certificate/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-11-01/certificate/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/certificate/method_update.go b/resource-manager/batch/2023-11-01/certificate/method_update.go index 1977e470b49..d46adfe7c60 100644 --- a/resource-manager/batch/2023-11-01/certificate/method_update.go +++ b/resource-manager/batch/2023-11-01/certificate/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/certificate/version.go b/resource-manager/batch/2023-11-01/certificate/version.go index 480fdf6c0ac..1419590e8d6 100644 --- a/resource-manager/batch/2023-11-01/certificate/version.go +++ b/resource-manager/batch/2023-11-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/location/README.md b/resource-manager/batch/2023-11-01/location/README.md index e637d145d94..05ca068d0ca 100644 --- a/resource-manager/batch/2023-11-01/location/README.md +++ b/resource-manager/batch/2023-11-01/location/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/location` Documentation -The `location` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `location` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/location/client.go b/resource-manager/batch/2023-11-01/location/client.go index 14480a4f2e8..ccb5443577a 100644 --- a/resource-manager/batch/2023-11-01/location/client.go +++ b/resource-manager/batch/2023-11-01/location/client.go @@ -15,7 +15,7 @@ type LocationClient struct { } func NewLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "location", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "location", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/location/id_location.go b/resource-manager/batch/2023-11-01/location/id_location.go index 0d7e2c55116..cc43a252197 100644 --- a/resource-manager/batch/2023-11-01/location/id_location.go +++ b/resource-manager/batch/2023-11-01/location/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/location/method_getquotas.go b/resource-manager/batch/2023-11-01/location/method_getquotas.go index 5bf4b3b66d4..6f2f5db290b 100644 --- a/resource-manager/batch/2023-11-01/location/method_getquotas.go +++ b/resource-manager/batch/2023-11-01/location/method_getquotas.go @@ -46,7 +46,6 @@ func (c LocationClient) GetQuotas(ctx context.Context, id LocationId) (result Ge var model BatchLocationQuota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/location/method_listsupportedcloudserviceskus.go b/resource-manager/batch/2023-11-01/location/method_listsupportedcloudserviceskus.go index 45deac379b4..4c2ea630a4a 100644 --- a/resource-manager/batch/2023-11-01/location/method_listsupportedcloudserviceskus.go +++ b/resource-manager/batch/2023-11-01/location/method_listsupportedcloudserviceskus.go @@ -40,6 +40,7 @@ func (o ListSupportedCloudServiceSkusOperationOptions) ToHeaders() *client.Heade func (o ListSupportedCloudServiceSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/location/method_listsupportedvirtualmachineskus.go b/resource-manager/batch/2023-11-01/location/method_listsupportedvirtualmachineskus.go index be5b08e29ed..2f2f3d56a2a 100644 --- a/resource-manager/batch/2023-11-01/location/method_listsupportedvirtualmachineskus.go +++ b/resource-manager/batch/2023-11-01/location/method_listsupportedvirtualmachineskus.go @@ -40,6 +40,7 @@ func (o ListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Hea func (o ListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/location/version.go b/resource-manager/batch/2023-11-01/location/version.go index dbebdf655bc..c0589332195 100644 --- a/resource-manager/batch/2023-11-01/location/version.go +++ b/resource-manager/batch/2023-11-01/location/version.go @@ -1,12 +1,10 @@ package location -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/location/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/location/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/pool/README.md b/resource-manager/batch/2023-11-01/pool/README.md index de87329fe5c..03ba3801875 100644 --- a/resource-manager/batch/2023-11-01/pool/README.md +++ b/resource-manager/batch/2023-11-01/pool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/pool` Documentation -The `pool` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `pool` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/pool/client.go b/resource-manager/batch/2023-11-01/pool/client.go index dd32c3c502c..54e29c9a688 100644 --- a/resource-manager/batch/2023-11-01/pool/client.go +++ b/resource-manager/batch/2023-11-01/pool/client.go @@ -15,7 +15,7 @@ type PoolClient struct { } func NewPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/pool/id_batchaccount.go b/resource-manager/batch/2023-11-01/pool/id_batchaccount.go index a291c268aa6..a023a255a87 100644 --- a/resource-manager/batch/2023-11-01/pool/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/pool/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/pool/id_pool.go b/resource-manager/batch/2023-11-01/pool/id_pool.go index 9f34d744780..a6dbd809b46 100644 --- a/resource-manager/batch/2023-11-01/pool/id_pool.go +++ b/resource-manager/batch/2023-11-01/pool/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/pool/method_create.go b/resource-manager/batch/2023-11-01/pool/method_create.go index 8c732d52df0..fd4569559b1 100644 --- a/resource-manager/batch/2023-11-01/pool/method_create.go +++ b/resource-manager/batch/2023-11-01/pool/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c PoolClient) Create(ctx context.Context, id PoolId, input Pool, options C var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/pool/method_disableautoscale.go b/resource-manager/batch/2023-11-01/pool/method_disableautoscale.go index 25e7ab31914..326b5484098 100644 --- a/resource-manager/batch/2023-11-01/pool/method_disableautoscale.go +++ b/resource-manager/batch/2023-11-01/pool/method_disableautoscale.go @@ -46,7 +46,6 @@ func (c PoolClient) DisableAutoScale(ctx context.Context, id PoolId) (result Dis var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/pool/method_get.go b/resource-manager/batch/2023-11-01/pool/method_get.go index 65c9fd44f9e..08f23dd5e38 100644 --- a/resource-manager/batch/2023-11-01/pool/method_get.go +++ b/resource-manager/batch/2023-11-01/pool/method_get.go @@ -45,7 +45,6 @@ func (c PoolClient) Get(ctx context.Context, id PoolId) (result GetOperationResp var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/pool/method_listbybatchaccount.go b/resource-manager/batch/2023-11-01/pool/method_listbybatchaccount.go index a3590d663af..230109ca49c 100644 --- a/resource-manager/batch/2023-11-01/pool/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-11-01/pool/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/pool/method_stopresize.go b/resource-manager/batch/2023-11-01/pool/method_stopresize.go index 766ec843a7f..e968c2a58ee 100644 --- a/resource-manager/batch/2023-11-01/pool/method_stopresize.go +++ b/resource-manager/batch/2023-11-01/pool/method_stopresize.go @@ -46,7 +46,6 @@ func (c PoolClient) StopResize(ctx context.Context, id PoolId) (result StopResiz var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/pool/method_update.go b/resource-manager/batch/2023-11-01/pool/method_update.go index fbbb607783e..1bd909d87e9 100644 --- a/resource-manager/batch/2023-11-01/pool/method_update.go +++ b/resource-manager/batch/2023-11-01/pool/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PoolClient) Update(ctx context.Context, id PoolId, input Pool, options U var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/pool/version.go b/resource-manager/batch/2023-11-01/pool/version.go index e3c50e09099..bcd7b26346d 100644 --- a/resource-manager/batch/2023-11-01/pool/version.go +++ b/resource-manager/batch/2023-11-01/pool/version.go @@ -1,12 +1,10 @@ package pool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pool/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/README.md b/resource-manager/batch/2023-11-01/privateendpointconnection/README.md index 0f68c55beca..a0a3e3a7e33 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/README.md +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/client.go b/resource-manager/batch/2023-11-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/client.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/id_batchaccount.go b/resource-manager/batch/2023-11-01/privateendpointconnection/id_batchaccount.go index f7e6af7dbc8..a931891d1b7 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/batch/2023-11-01/privateendpointconnection/id_privateendpointconnection.go index 25d06d0b855..6edb2401e64 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/method_get.go b/resource-manager/batch/2023-11-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/method_get.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/method_listbybatchaccount.go b/resource-manager/batch/2023-11-01/privateendpointconnection/method_listbybatchaccount.go index ff65bcec30f..5ed91d577fe 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/method_update.go b/resource-manager/batch/2023-11-01/privateendpointconnection/method_update.go index f92a9e21504..e7dfdb4d83f 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/method_update.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/privateendpointconnection/version.go b/resource-manager/batch/2023-11-01/privateendpointconnection/version.go index 5ebfeaa4b3a..ca5503b925b 100644 --- a/resource-manager/batch/2023-11-01/privateendpointconnection/version.go +++ b/resource-manager/batch/2023-11-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-11-01" } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/README.md b/resource-manager/batch/2023-11-01/privatelinkresource/README.md index 7c83d062422..fab22dea1d2 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/README.md +++ b/resource-manager/batch/2023-11-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-11-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2023-11-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/client.go b/resource-manager/batch/2023-11-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/client.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/id_batchaccount.go b/resource-manager/batch/2023-11-01/privatelinkresource/id_batchaccount.go index 9f6d2840fca..59c8f99019c 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/id_batchaccount.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/batch/2023-11-01/privatelinkresource/id_privatelinkresource.go index 4356c5a51bb..0b8bc5a029a 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/method_get.go b/resource-manager/batch/2023-11-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/method_get.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/method_listbybatchaccount.go b/resource-manager/batch/2023-11-01/privatelinkresource/method_listbybatchaccount.go index a5c4f91b508..e74b98a7760 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/method_listbybatchaccount.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2023-11-01/privatelinkresource/version.go b/resource-manager/batch/2023-11-01/privatelinkresource/version.go index 0552126e931..c85e9cc6ed3 100644 --- a/resource-manager/batch/2023-11-01/privatelinkresource/version.go +++ b/resource-manager/batch/2023-11-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2023-11-01" } diff --git a/resource-manager/batch/2024-02-01/application/README.md b/resource-manager/batch/2024-02-01/application/README.md index e0a6988f9d6..3a6622b7fb0 100644 --- a/resource-manager/batch/2024-02-01/application/README.md +++ b/resource-manager/batch/2024-02-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `application` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/application/client.go b/resource-manager/batch/2024-02-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/batch/2024-02-01/application/client.go +++ b/resource-manager/batch/2024-02-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/application/id_application.go b/resource-manager/batch/2024-02-01/application/id_application.go index dd993e4eaf5..fc220b72aab 100644 --- a/resource-manager/batch/2024-02-01/application/id_application.go +++ b/resource-manager/batch/2024-02-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/application/id_batchaccount.go b/resource-manager/batch/2024-02-01/application/id_batchaccount.go index 24f79b20867..060b7077651 100644 --- a/resource-manager/batch/2024-02-01/application/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/application/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/application/method_create.go b/resource-manager/batch/2024-02-01/application/method_create.go index 969b8c3f01e..f82824b74a2 100644 --- a/resource-manager/batch/2024-02-01/application/method_create.go +++ b/resource-manager/batch/2024-02-01/application/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Create(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/application/method_get.go b/resource-manager/batch/2024-02-01/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/batch/2024-02-01/application/method_get.go +++ b/resource-manager/batch/2024-02-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/application/method_list.go b/resource-manager/batch/2024-02-01/application/method_list.go index ea47d96f097..c17155dc171 100644 --- a/resource-manager/batch/2024-02-01/application/method_list.go +++ b/resource-manager/batch/2024-02-01/application/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/application/method_update.go b/resource-manager/batch/2024-02-01/application/method_update.go index f70ac75de33..d3d06a031c2 100644 --- a/resource-manager/batch/2024-02-01/application/method_update.go +++ b/resource-manager/batch/2024-02-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/application/version.go b/resource-manager/batch/2024-02-01/application/version.go index 3e95f1248e9..df2f6e723b6 100644 --- a/resource-manager/batch/2024-02-01/application/version.go +++ b/resource-manager/batch/2024-02-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/README.md b/resource-manager/batch/2024-02-01/applicationpackage/README.md index c4699501362..e417ead9a95 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/README.md +++ b/resource-manager/batch/2024-02-01/applicationpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/applicationpackage` Documentation -The `applicationpackage` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `applicationpackage` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/applicationpackage/client.go b/resource-manager/batch/2024-02-01/applicationpackage/client.go index 94884d9d83e..33a4c25eb85 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/client.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/client.go @@ -15,7 +15,7 @@ type ApplicationPackageClient struct { } func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationPackageClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/id_application.go b/resource-manager/batch/2024-02-01/applicationpackage/id_application.go index 011405cdeb3..f1b1ff9626e 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/id_application.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/id_version.go b/resource-manager/batch/2024-02-01/applicationpackage/id_version.go index a9e3b7c08b9..a33d73418d9 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/id_version.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/method_activate.go b/resource-manager/batch/2024-02-01/applicationpackage/method_activate.go index 75fc8bc3cb3..212091afa47 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/method_activate.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/method_activate.go @@ -50,7 +50,6 @@ func (c ApplicationPackageClient) Activate(ctx context.Context, id VersionId, in var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/method_create.go b/resource-manager/batch/2024-02-01/applicationpackage/method_create.go index 9bfa7c8bf2d..e9ce2d4d908 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/method_create.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationPackageClient) Create(ctx context.Context, id VersionId, inpu var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/method_get.go b/resource-manager/batch/2024-02-01/applicationpackage/method_get.go index 580541d6477..a0372e1e739 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/method_get.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationPackageClient) Get(ctx context.Context, id VersionId) (result var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/method_list.go b/resource-manager/batch/2024-02-01/applicationpackage/method_list.go index 4283d8928c6..d99214edc4d 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/method_list.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/applicationpackage/version.go b/resource-manager/batch/2024-02-01/applicationpackage/version.go index b9d20ad928e..97f228833f3 100644 --- a/resource-manager/batch/2024-02-01/applicationpackage/version.go +++ b/resource-manager/batch/2024-02-01/applicationpackage/version.go @@ -1,12 +1,10 @@ package applicationpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationpackage/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/batchaccount/README.md b/resource-manager/batch/2024-02-01/batchaccount/README.md index 9d5db7c8fc2..811edaa97ed 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/README.md +++ b/resource-manager/batch/2024-02-01/batchaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/batchaccount` Documentation -The `batchaccount` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `batchaccount` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/batchaccount/client.go b/resource-manager/batch/2024-02-01/batchaccount/client.go index 607b46b2603..2779ef55d04 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/client.go +++ b/resource-manager/batch/2024-02-01/batchaccount/client.go @@ -15,7 +15,7 @@ type BatchAccountClient struct { } func NewBatchAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchAccountClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/batchaccount/id_batchaccount.go b/resource-manager/batch/2024-02-01/batchaccount/id_batchaccount.go index 0b75e0ac701..d1d7845f947 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/batchaccount/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/batchaccount/method_get.go b/resource-manager/batch/2024-02-01/batchaccount/method_get.go index 6dc844ee91a..5a247338315 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/method_get.go +++ b/resource-manager/batch/2024-02-01/batchaccount/method_get.go @@ -45,7 +45,6 @@ func (c BatchAccountClient) Get(ctx context.Context, id BatchAccountId) (result var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchaccount/method_getkeys.go b/resource-manager/batch/2024-02-01/batchaccount/method_getkeys.go index 70dd5c8da37..6ceeb11ddf0 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/method_getkeys.go +++ b/resource-manager/batch/2024-02-01/batchaccount/method_getkeys.go @@ -46,7 +46,6 @@ func (c BatchAccountClient) GetKeys(ctx context.Context, id BatchAccountId) (res var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchaccount/method_regeneratekey.go b/resource-manager/batch/2024-02-01/batchaccount/method_regeneratekey.go index 6c8bd2c4f6c..385f7216999 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/method_regeneratekey.go +++ b/resource-manager/batch/2024-02-01/batchaccount/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c BatchAccountClient) RegenerateKey(ctx context.Context, id BatchAccountId var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchaccount/method_update.go b/resource-manager/batch/2024-02-01/batchaccount/method_update.go index 8776d09247a..8a68a40f903 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/method_update.go +++ b/resource-manager/batch/2024-02-01/batchaccount/method_update.go @@ -49,7 +49,6 @@ func (c BatchAccountClient) Update(ctx context.Context, id BatchAccountId, input var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchaccount/version.go b/resource-manager/batch/2024-02-01/batchaccount/version.go index 03dabdbb3ea..9e3a6cfe52a 100644 --- a/resource-manager/batch/2024-02-01/batchaccount/version.go +++ b/resource-manager/batch/2024-02-01/batchaccount/version.go @@ -1,12 +1,10 @@ package batchaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchaccount/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/README.md b/resource-manager/batch/2024-02-01/batchmanagements/README.md index 9ba147da01f..a9c583e09a7 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/README.md +++ b/resource-manager/batch/2024-02-01/batchmanagements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/batchmanagements` Documentation -The `batchmanagements` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `batchmanagements` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/batchmanagements/client.go b/resource-manager/batch/2024-02-01/batchmanagements/client.go index e909e6a24f4..f6073366437 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/client.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/client.go @@ -15,7 +15,7 @@ type BatchManagementsClient struct { } func NewBatchManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchmanagements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchmanagements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchManagementsClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/id_batchaccount.go b/resource-manager/batch/2024-02-01/batchmanagements/id_batchaccount.go index f9a0ca31b1c..194e55e864a 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/id_detector.go b/resource-manager/batch/2024-02-01/batchmanagements/id_detector.go index e45738106dd..efaa4d06e51 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/id_detector.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/id_location.go b/resource-manager/batch/2024-02-01/batchmanagements/id_location.go index 8456437b55a..2a6c2dec505 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/id_location.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/method_batchaccountgetdetector.go b/resource-manager/batch/2024-02-01/batchmanagements/method_batchaccountgetdetector.go index f8cbbd9ff4d..db44b1e56ed 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/method_batchaccountgetdetector.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/method_batchaccountgetdetector.go @@ -45,7 +45,6 @@ func (c BatchManagementsClient) BatchAccountGetDetector(ctx context.Context, id var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/method_locationchecknameavailability.go b/resource-manager/batch/2024-02-01/batchmanagements/method_locationchecknameavailability.go index 12ba043133e..58082f97b01 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/method_locationchecknameavailability.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/method_locationchecknameavailability.go @@ -50,7 +50,6 @@ func (c BatchManagementsClient) LocationCheckNameAvailability(ctx context.Contex var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/batchmanagements/version.go b/resource-manager/batch/2024-02-01/batchmanagements/version.go index 7bcaaf115f1..9526acf399e 100644 --- a/resource-manager/batch/2024-02-01/batchmanagements/version.go +++ b/resource-manager/batch/2024-02-01/batchmanagements/version.go @@ -1,12 +1,10 @@ package batchmanagements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchmanagements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchmanagements/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/certificate/README.md b/resource-manager/batch/2024-02-01/certificate/README.md index 91763c309ed..f279b8421a6 100644 --- a/resource-manager/batch/2024-02-01/certificate/README.md +++ b/resource-manager/batch/2024-02-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/certificate/client.go b/resource-manager/batch/2024-02-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/batch/2024-02-01/certificate/client.go +++ b/resource-manager/batch/2024-02-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/certificate/id_batchaccount.go b/resource-manager/batch/2024-02-01/certificate/id_batchaccount.go index bbce3f7cae7..7104581e0f0 100644 --- a/resource-manager/batch/2024-02-01/certificate/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/certificate/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/certificate/id_certificate.go b/resource-manager/batch/2024-02-01/certificate/id_certificate.go index 62d54b7e260..4b938e1bf9a 100644 --- a/resource-manager/batch/2024-02-01/certificate/id_certificate.go +++ b/resource-manager/batch/2024-02-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/certificate/method_canceldeletion.go b/resource-manager/batch/2024-02-01/certificate/method_canceldeletion.go index 2e4dcf0a15b..4c70006b21d 100644 --- a/resource-manager/batch/2024-02-01/certificate/method_canceldeletion.go +++ b/resource-manager/batch/2024-02-01/certificate/method_canceldeletion.go @@ -46,7 +46,6 @@ func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/certificate/method_create.go b/resource-manager/batch/2024-02-01/certificate/method_create.go index bbbc2c0757c..b9da5041801 100644 --- a/resource-manager/batch/2024-02-01/certificate/method_create.go +++ b/resource-manager/batch/2024-02-01/certificate/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateClient) Create(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/certificate/method_get.go b/resource-manager/batch/2024-02-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/batch/2024-02-01/certificate/method_get.go +++ b/resource-manager/batch/2024-02-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/certificate/method_listbybatchaccount.go b/resource-manager/batch/2024-02-01/certificate/method_listbybatchaccount.go index 287d5fc9781..9095d225ecc 100644 --- a/resource-manager/batch/2024-02-01/certificate/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-02-01/certificate/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/certificate/method_update.go b/resource-manager/batch/2024-02-01/certificate/method_update.go index 1977e470b49..d46adfe7c60 100644 --- a/resource-manager/batch/2024-02-01/certificate/method_update.go +++ b/resource-manager/batch/2024-02-01/certificate/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/certificate/version.go b/resource-manager/batch/2024-02-01/certificate/version.go index 897434b4dbd..a37f54bfa3f 100644 --- a/resource-manager/batch/2024-02-01/certificate/version.go +++ b/resource-manager/batch/2024-02-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/location/README.md b/resource-manager/batch/2024-02-01/location/README.md index 1a550ff9e6c..0e3d4ee4a76 100644 --- a/resource-manager/batch/2024-02-01/location/README.md +++ b/resource-manager/batch/2024-02-01/location/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/location` Documentation -The `location` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `location` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/location/client.go b/resource-manager/batch/2024-02-01/location/client.go index 14480a4f2e8..ccb5443577a 100644 --- a/resource-manager/batch/2024-02-01/location/client.go +++ b/resource-manager/batch/2024-02-01/location/client.go @@ -15,7 +15,7 @@ type LocationClient struct { } func NewLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "location", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "location", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/location/id_location.go b/resource-manager/batch/2024-02-01/location/id_location.go index 0d7e2c55116..cc43a252197 100644 --- a/resource-manager/batch/2024-02-01/location/id_location.go +++ b/resource-manager/batch/2024-02-01/location/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/location/method_getquotas.go b/resource-manager/batch/2024-02-01/location/method_getquotas.go index 5bf4b3b66d4..6f2f5db290b 100644 --- a/resource-manager/batch/2024-02-01/location/method_getquotas.go +++ b/resource-manager/batch/2024-02-01/location/method_getquotas.go @@ -46,7 +46,6 @@ func (c LocationClient) GetQuotas(ctx context.Context, id LocationId) (result Ge var model BatchLocationQuota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/location/method_listsupportedcloudserviceskus.go b/resource-manager/batch/2024-02-01/location/method_listsupportedcloudserviceskus.go index 45deac379b4..4c2ea630a4a 100644 --- a/resource-manager/batch/2024-02-01/location/method_listsupportedcloudserviceskus.go +++ b/resource-manager/batch/2024-02-01/location/method_listsupportedcloudserviceskus.go @@ -40,6 +40,7 @@ func (o ListSupportedCloudServiceSkusOperationOptions) ToHeaders() *client.Heade func (o ListSupportedCloudServiceSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/location/method_listsupportedvirtualmachineskus.go b/resource-manager/batch/2024-02-01/location/method_listsupportedvirtualmachineskus.go index be5b08e29ed..2f2f3d56a2a 100644 --- a/resource-manager/batch/2024-02-01/location/method_listsupportedvirtualmachineskus.go +++ b/resource-manager/batch/2024-02-01/location/method_listsupportedvirtualmachineskus.go @@ -40,6 +40,7 @@ func (o ListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Hea func (o ListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/location/version.go b/resource-manager/batch/2024-02-01/location/version.go index b9f7aa97bdf..4d48640fc8e 100644 --- a/resource-manager/batch/2024-02-01/location/version.go +++ b/resource-manager/batch/2024-02-01/location/version.go @@ -1,12 +1,10 @@ package location -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/location/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/location/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/pool/README.md b/resource-manager/batch/2024-02-01/pool/README.md index a302fd12f2e..34de0f45039 100644 --- a/resource-manager/batch/2024-02-01/pool/README.md +++ b/resource-manager/batch/2024-02-01/pool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/pool` Documentation -The `pool` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `pool` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/pool/client.go b/resource-manager/batch/2024-02-01/pool/client.go index dd32c3c502c..54e29c9a688 100644 --- a/resource-manager/batch/2024-02-01/pool/client.go +++ b/resource-manager/batch/2024-02-01/pool/client.go @@ -15,7 +15,7 @@ type PoolClient struct { } func NewPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/pool/id_batchaccount.go b/resource-manager/batch/2024-02-01/pool/id_batchaccount.go index a291c268aa6..a023a255a87 100644 --- a/resource-manager/batch/2024-02-01/pool/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/pool/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/pool/id_pool.go b/resource-manager/batch/2024-02-01/pool/id_pool.go index 9f34d744780..a6dbd809b46 100644 --- a/resource-manager/batch/2024-02-01/pool/id_pool.go +++ b/resource-manager/batch/2024-02-01/pool/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/pool/method_create.go b/resource-manager/batch/2024-02-01/pool/method_create.go index 8c732d52df0..fd4569559b1 100644 --- a/resource-manager/batch/2024-02-01/pool/method_create.go +++ b/resource-manager/batch/2024-02-01/pool/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c PoolClient) Create(ctx context.Context, id PoolId, input Pool, options C var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/pool/method_disableautoscale.go b/resource-manager/batch/2024-02-01/pool/method_disableautoscale.go index 25e7ab31914..326b5484098 100644 --- a/resource-manager/batch/2024-02-01/pool/method_disableautoscale.go +++ b/resource-manager/batch/2024-02-01/pool/method_disableautoscale.go @@ -46,7 +46,6 @@ func (c PoolClient) DisableAutoScale(ctx context.Context, id PoolId) (result Dis var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/pool/method_get.go b/resource-manager/batch/2024-02-01/pool/method_get.go index 65c9fd44f9e..08f23dd5e38 100644 --- a/resource-manager/batch/2024-02-01/pool/method_get.go +++ b/resource-manager/batch/2024-02-01/pool/method_get.go @@ -45,7 +45,6 @@ func (c PoolClient) Get(ctx context.Context, id PoolId) (result GetOperationResp var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/pool/method_listbybatchaccount.go b/resource-manager/batch/2024-02-01/pool/method_listbybatchaccount.go index a3590d663af..230109ca49c 100644 --- a/resource-manager/batch/2024-02-01/pool/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-02-01/pool/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/pool/method_stopresize.go b/resource-manager/batch/2024-02-01/pool/method_stopresize.go index 766ec843a7f..e968c2a58ee 100644 --- a/resource-manager/batch/2024-02-01/pool/method_stopresize.go +++ b/resource-manager/batch/2024-02-01/pool/method_stopresize.go @@ -46,7 +46,6 @@ func (c PoolClient) StopResize(ctx context.Context, id PoolId) (result StopResiz var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/pool/method_update.go b/resource-manager/batch/2024-02-01/pool/method_update.go index fbbb607783e..1bd909d87e9 100644 --- a/resource-manager/batch/2024-02-01/pool/method_update.go +++ b/resource-manager/batch/2024-02-01/pool/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PoolClient) Update(ctx context.Context, id PoolId, input Pool, options U var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/pool/version.go b/resource-manager/batch/2024-02-01/pool/version.go index 99815970d08..c9765adeb36 100644 --- a/resource-manager/batch/2024-02-01/pool/version.go +++ b/resource-manager/batch/2024-02-01/pool/version.go @@ -1,12 +1,10 @@ package pool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pool/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/README.md b/resource-manager/batch/2024-02-01/privateendpointconnection/README.md index ec822b27024..16e4f948ec7 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/README.md +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/client.go b/resource-manager/batch/2024-02-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/client.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/id_batchaccount.go b/resource-manager/batch/2024-02-01/privateendpointconnection/id_batchaccount.go index f7e6af7dbc8..a931891d1b7 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/batch/2024-02-01/privateendpointconnection/id_privateendpointconnection.go index 25d06d0b855..6edb2401e64 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/method_get.go b/resource-manager/batch/2024-02-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/method_get.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/method_listbybatchaccount.go b/resource-manager/batch/2024-02-01/privateendpointconnection/method_listbybatchaccount.go index ff65bcec30f..5ed91d577fe 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/method_update.go b/resource-manager/batch/2024-02-01/privateendpointconnection/method_update.go index f92a9e21504..e7dfdb4d83f 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/method_update.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/privateendpointconnection/version.go b/resource-manager/batch/2024-02-01/privateendpointconnection/version.go index 018cf8e011a..c7a1f37624f 100644 --- a/resource-manager/batch/2024-02-01/privateendpointconnection/version.go +++ b/resource-manager/batch/2024-02-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2024-02-01" } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/README.md b/resource-manager/batch/2024-02-01/privatelinkresource/README.md index 784e46a9f7e..5cc16032fcb 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/README.md +++ b/resource-manager/batch/2024-02-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-02-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-02-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/client.go b/resource-manager/batch/2024-02-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/client.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/id_batchaccount.go b/resource-manager/batch/2024-02-01/privatelinkresource/id_batchaccount.go index 9f6d2840fca..59c8f99019c 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/id_batchaccount.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/batch/2024-02-01/privatelinkresource/id_privatelinkresource.go index 4356c5a51bb..0b8bc5a029a 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/method_get.go b/resource-manager/batch/2024-02-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/method_get.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/method_listbybatchaccount.go b/resource-manager/batch/2024-02-01/privatelinkresource/method_listbybatchaccount.go index a5c4f91b508..e74b98a7760 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-02-01/privatelinkresource/version.go b/resource-manager/batch/2024-02-01/privatelinkresource/version.go index afd3cdb8e28..9b2417bf21d 100644 --- a/resource-manager/batch/2024-02-01/privatelinkresource/version.go +++ b/resource-manager/batch/2024-02-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2024-02-01" } diff --git a/resource-manager/batch/2024-07-01/application/README.md b/resource-manager/batch/2024-07-01/application/README.md index 0dad71826b6..4819fbea16c 100644 --- a/resource-manager/batch/2024-07-01/application/README.md +++ b/resource-manager/batch/2024-07-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `application` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/application/client.go b/resource-manager/batch/2024-07-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/batch/2024-07-01/application/client.go +++ b/resource-manager/batch/2024-07-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/application/id_application.go b/resource-manager/batch/2024-07-01/application/id_application.go index dd993e4eaf5..fc220b72aab 100644 --- a/resource-manager/batch/2024-07-01/application/id_application.go +++ b/resource-manager/batch/2024-07-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/application/id_batchaccount.go b/resource-manager/batch/2024-07-01/application/id_batchaccount.go index 24f79b20867..060b7077651 100644 --- a/resource-manager/batch/2024-07-01/application/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/application/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/application/method_create.go b/resource-manager/batch/2024-07-01/application/method_create.go index 969b8c3f01e..f82824b74a2 100644 --- a/resource-manager/batch/2024-07-01/application/method_create.go +++ b/resource-manager/batch/2024-07-01/application/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Create(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/application/method_get.go b/resource-manager/batch/2024-07-01/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/batch/2024-07-01/application/method_get.go +++ b/resource-manager/batch/2024-07-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/application/method_list.go b/resource-manager/batch/2024-07-01/application/method_list.go index ea47d96f097..c17155dc171 100644 --- a/resource-manager/batch/2024-07-01/application/method_list.go +++ b/resource-manager/batch/2024-07-01/application/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/application/method_update.go b/resource-manager/batch/2024-07-01/application/method_update.go index f70ac75de33..d3d06a031c2 100644 --- a/resource-manager/batch/2024-07-01/application/method_update.go +++ b/resource-manager/batch/2024-07-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/application/version.go b/resource-manager/batch/2024-07-01/application/version.go index 9389fceb24e..f8ca37f98e2 100644 --- a/resource-manager/batch/2024-07-01/application/version.go +++ b/resource-manager/batch/2024-07-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/README.md b/resource-manager/batch/2024-07-01/applicationpackage/README.md index 6f2fcad765c..c036ba59596 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/README.md +++ b/resource-manager/batch/2024-07-01/applicationpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackage` Documentation -The `applicationpackage` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `applicationpackage` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/applicationpackage/client.go b/resource-manager/batch/2024-07-01/applicationpackage/client.go index 94884d9d83e..33a4c25eb85 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/client.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/client.go @@ -15,7 +15,7 @@ type ApplicationPackageClient struct { } func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationPackageClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_application.go b/resource-manager/batch/2024-07-01/applicationpackage/id_application.go index 011405cdeb3..f1b1ff9626e 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_application.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_version.go b/resource-manager/batch/2024-07-01/applicationpackage/id_version.go index a9e3b7c08b9..a33d73418d9 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_version.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go b/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go index 75fc8bc3cb3..212091afa47 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go @@ -50,7 +50,6 @@ func (c ApplicationPackageClient) Activate(ctx context.Context, id VersionId, in var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_create.go b/resource-manager/batch/2024-07-01/applicationpackage/method_create.go index 9bfa7c8bf2d..e9ce2d4d908 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_create.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/method_create.go @@ -49,7 +49,6 @@ func (c ApplicationPackageClient) Create(ctx context.Context, id VersionId, inpu var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_get.go b/resource-manager/batch/2024-07-01/applicationpackage/method_get.go index 580541d6477..a0372e1e739 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_get.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationPackageClient) Get(ctx context.Context, id VersionId) (result var model ApplicationPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_list.go b/resource-manager/batch/2024-07-01/applicationpackage/method_list.go index 4283d8928c6..d99214edc4d 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_list.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/version.go b/resource-manager/batch/2024-07-01/applicationpackage/version.go index cea75e46944..7b11b7a7d4f 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/version.go +++ b/resource-manager/batch/2024-07-01/applicationpackage/version.go @@ -1,12 +1,10 @@ package applicationpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationpackage/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/batchaccount/README.md b/resource-manager/batch/2024-07-01/batchaccount/README.md index 1c9047d087b..f6a3237900f 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/README.md +++ b/resource-manager/batch/2024-07-01/batchaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccount` Documentation -The `batchaccount` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `batchaccount` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/batchaccount/client.go b/resource-manager/batch/2024-07-01/batchaccount/client.go index 607b46b2603..2779ef55d04 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/client.go +++ b/resource-manager/batch/2024-07-01/batchaccount/client.go @@ -15,7 +15,7 @@ type BatchAccountClient struct { } func NewBatchAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchAccountClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go b/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go index 0b75e0ac701..d1d7845f947 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_get.go b/resource-manager/batch/2024-07-01/batchaccount/method_get.go index 6dc844ee91a..5a247338315 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_get.go +++ b/resource-manager/batch/2024-07-01/batchaccount/method_get.go @@ -45,7 +45,6 @@ func (c BatchAccountClient) Get(ctx context.Context, id BatchAccountId) (result var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go b/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go index 70dd5c8da37..6ceeb11ddf0 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go +++ b/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go @@ -46,7 +46,6 @@ func (c BatchAccountClient) GetKeys(ctx context.Context, id BatchAccountId) (res var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go b/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go index 6c8bd2c4f6c..385f7216999 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go +++ b/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c BatchAccountClient) RegenerateKey(ctx context.Context, id BatchAccountId var model BatchAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_update.go b/resource-manager/batch/2024-07-01/batchaccount/method_update.go index 8776d09247a..8a68a40f903 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_update.go +++ b/resource-manager/batch/2024-07-01/batchaccount/method_update.go @@ -49,7 +49,6 @@ func (c BatchAccountClient) Update(ctx context.Context, id BatchAccountId, input var model BatchAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchaccount/version.go b/resource-manager/batch/2024-07-01/batchaccount/version.go index cebc5681176..a7371e21dd6 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/version.go +++ b/resource-manager/batch/2024-07-01/batchaccount/version.go @@ -1,12 +1,10 @@ package batchaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchaccount/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/README.md b/resource-manager/batch/2024-07-01/batchmanagements/README.md index 5a7936f6450..69ade4d3c35 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/README.md +++ b/resource-manager/batch/2024-07-01/batchmanagements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchmanagements` Documentation -The `batchmanagements` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `batchmanagements` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/batchmanagements/client.go b/resource-manager/batch/2024-07-01/batchmanagements/client.go index e909e6a24f4..f6073366437 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/client.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/client.go @@ -15,7 +15,7 @@ type BatchManagementsClient struct { } func NewBatchManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchManagementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchmanagements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchmanagements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchManagementsClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go b/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go index f9a0ca31b1c..194e55e864a 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go b/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go index e45738106dd..efaa4d06e51 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_location.go b/resource-manager/batch/2024-07-01/batchmanagements/id_location.go index 8456437b55a..2a6c2dec505 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_location.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go b/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go index f8cbbd9ff4d..db44b1e56ed 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go @@ -45,7 +45,6 @@ func (c BatchManagementsClient) BatchAccountGetDetector(ctx context.Context, id var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go b/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go index 12ba043133e..58082f97b01 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go @@ -50,7 +50,6 @@ func (c BatchManagementsClient) LocationCheckNameAvailability(ctx context.Contex var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/version.go b/resource-manager/batch/2024-07-01/batchmanagements/version.go index 5c7e6db312c..c0c60f89368 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/version.go +++ b/resource-manager/batch/2024-07-01/batchmanagements/version.go @@ -1,12 +1,10 @@ package batchmanagements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchmanagements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchmanagements/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/certificate/README.md b/resource-manager/batch/2024-07-01/certificate/README.md index 2767516c9b3..4c3153d500a 100644 --- a/resource-manager/batch/2024-07-01/certificate/README.md +++ b/resource-manager/batch/2024-07-01/certificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/certificate` Documentation -The `certificate` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `certificate` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/certificate/client.go b/resource-manager/batch/2024-07-01/certificate/client.go index 9c7a6885362..723362e2b0f 100644 --- a/resource-manager/batch/2024-07-01/certificate/client.go +++ b/resource-manager/batch/2024-07-01/certificate/client.go @@ -15,7 +15,7 @@ type CertificateClient struct { } func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go b/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go index bbce3f7cae7..7104581e0f0 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/certificate/id_certificate.go b/resource-manager/batch/2024-07-01/certificate/id_certificate.go index 62d54b7e260..4b938e1bf9a 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_certificate.go +++ b/resource-manager/batch/2024-07-01/certificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go b/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go index 2e4dcf0a15b..4c70006b21d 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go +++ b/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go @@ -46,7 +46,6 @@ func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/certificate/method_create.go b/resource-manager/batch/2024-07-01/certificate/method_create.go index bbbc2c0757c..b9da5041801 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_create.go +++ b/resource-manager/batch/2024-07-01/certificate/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateClient) Create(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/certificate/method_get.go b/resource-manager/batch/2024-07-01/certificate/method_get.go index 171381cc239..297ae687e21 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_get.go +++ b/resource-manager/batch/2024-07-01/certificate/method_get.go @@ -45,7 +45,6 @@ func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result Ge var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go index 287d5fc9781..9095d225ecc 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/certificate/method_update.go b/resource-manager/batch/2024-07-01/certificate/method_update.go index 1977e470b49..d46adfe7c60 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_update.go +++ b/resource-manager/batch/2024-07-01/certificate/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CertificateClient) Update(ctx context.Context, id CertificateId, input C var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/certificate/version.go b/resource-manager/batch/2024-07-01/certificate/version.go index 64ddac9a5f8..6344cfd3246 100644 --- a/resource-manager/batch/2024-07-01/certificate/version.go +++ b/resource-manager/batch/2024-07-01/certificate/version.go @@ -1,12 +1,10 @@ package certificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificate/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/location/README.md b/resource-manager/batch/2024-07-01/location/README.md index f7e5d7dcd4c..357c839c29a 100644 --- a/resource-manager/batch/2024-07-01/location/README.md +++ b/resource-manager/batch/2024-07-01/location/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/location` Documentation -The `location` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `location` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/location/client.go b/resource-manager/batch/2024-07-01/location/client.go index 14480a4f2e8..ccb5443577a 100644 --- a/resource-manager/batch/2024-07-01/location/client.go +++ b/resource-manager/batch/2024-07-01/location/client.go @@ -15,7 +15,7 @@ type LocationClient struct { } func NewLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "location", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "location", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/location/id_location.go b/resource-manager/batch/2024-07-01/location/id_location.go index 0d7e2c55116..cc43a252197 100644 --- a/resource-manager/batch/2024-07-01/location/id_location.go +++ b/resource-manager/batch/2024-07-01/location/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/location/method_getquotas.go b/resource-manager/batch/2024-07-01/location/method_getquotas.go index 5bf4b3b66d4..6f2f5db290b 100644 --- a/resource-manager/batch/2024-07-01/location/method_getquotas.go +++ b/resource-manager/batch/2024-07-01/location/method_getquotas.go @@ -46,7 +46,6 @@ func (c LocationClient) GetQuotas(ctx context.Context, id LocationId) (result Ge var model BatchLocationQuota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go b/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go index be5b08e29ed..2f2f3d56a2a 100644 --- a/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go +++ b/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go @@ -40,6 +40,7 @@ func (o ListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Hea func (o ListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/location/version.go b/resource-manager/batch/2024-07-01/location/version.go index 7fc244a1959..65b9b037968 100644 --- a/resource-manager/batch/2024-07-01/location/version.go +++ b/resource-manager/batch/2024-07-01/location/version.go @@ -1,12 +1,10 @@ package location -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/location/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/location/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md b/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md index 537b9c0d034..329a3f36a22 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/networksecurityperimeter` Documentation -The `networksecurityperimeter` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `networksecurityperimeter` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go index 3124704081e..acc34025ed0 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterClient struct { } func NewNetworkSecurityPerimeterClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeter", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeter", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go index c8430125aab..2cb6bdbb995 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go index 4da4288aec1..9c5f1b33fd9 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go index e3e6ef55878..bb7ef134bb8 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterClient) GetConfiguration(ctx context.Context, id var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go index e5e6c6856e4..b6ff1af90dc 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go @@ -1,12 +1,10 @@ package networksecurityperimeter -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeter/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeter/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/pool/README.md b/resource-manager/batch/2024-07-01/pool/README.md index 54a8230956b..5f53a34ccce 100644 --- a/resource-manager/batch/2024-07-01/pool/README.md +++ b/resource-manager/batch/2024-07-01/pool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/pool` Documentation -The `pool` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `pool` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/pool/client.go b/resource-manager/batch/2024-07-01/pool/client.go index dd32c3c502c..54e29c9a688 100644 --- a/resource-manager/batch/2024-07-01/pool/client.go +++ b/resource-manager/batch/2024-07-01/pool/client.go @@ -15,7 +15,7 @@ type PoolClient struct { } func NewPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/pool/id_batchaccount.go b/resource-manager/batch/2024-07-01/pool/id_batchaccount.go index a291c268aa6..a023a255a87 100644 --- a/resource-manager/batch/2024-07-01/pool/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/pool/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/pool/id_pool.go b/resource-manager/batch/2024-07-01/pool/id_pool.go index 9f34d744780..a6dbd809b46 100644 --- a/resource-manager/batch/2024-07-01/pool/id_pool.go +++ b/resource-manager/batch/2024-07-01/pool/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/pool/method_create.go b/resource-manager/batch/2024-07-01/pool/method_create.go index 8c732d52df0..fd4569559b1 100644 --- a/resource-manager/batch/2024-07-01/pool/method_create.go +++ b/resource-manager/batch/2024-07-01/pool/method_create.go @@ -40,6 +40,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c PoolClient) Create(ctx context.Context, id PoolId, input Pool, options C var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go b/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go index 25e7ab31914..326b5484098 100644 --- a/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go +++ b/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go @@ -46,7 +46,6 @@ func (c PoolClient) DisableAutoScale(ctx context.Context, id PoolId) (result Dis var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/pool/method_get.go b/resource-manager/batch/2024-07-01/pool/method_get.go index 65c9fd44f9e..08f23dd5e38 100644 --- a/resource-manager/batch/2024-07-01/pool/method_get.go +++ b/resource-manager/batch/2024-07-01/pool/method_get.go @@ -45,7 +45,6 @@ func (c PoolClient) Get(ctx context.Context, id PoolId) (result GetOperationResp var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go index a3590d663af..230109ca49c 100644 --- a/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go @@ -41,6 +41,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/pool/method_stopresize.go b/resource-manager/batch/2024-07-01/pool/method_stopresize.go index 766ec843a7f..e968c2a58ee 100644 --- a/resource-manager/batch/2024-07-01/pool/method_stopresize.go +++ b/resource-manager/batch/2024-07-01/pool/method_stopresize.go @@ -46,7 +46,6 @@ func (c PoolClient) StopResize(ctx context.Context, id PoolId) (result StopResiz var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/pool/method_update.go b/resource-manager/batch/2024-07-01/pool/method_update.go index fbbb607783e..1bd909d87e9 100644 --- a/resource-manager/batch/2024-07-01/pool/method_update.go +++ b/resource-manager/batch/2024-07-01/pool/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PoolClient) Update(ctx context.Context, id PoolId, input Pool, options U var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/pool/version.go b/resource-manager/batch/2024-07-01/pool/version.go index a3ca628a071..3207a41aa77 100644 --- a/resource-manager/batch/2024-07-01/pool/version.go +++ b/resource-manager/batch/2024-07-01/pool/version.go @@ -1,12 +1,10 @@ package pool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pool/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/README.md b/resource-manager/batch/2024-07-01/privateendpointconnection/README.md index 45481c6cdb8..947dcbd3979 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/README.md +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/client.go b/resource-manager/batch/2024-07-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/client.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go index f7e6af7dbc8..a931891d1b7 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go index 25d06d0b855..6edb2401e64 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go b/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go index ff65bcec30f..5ed91d577fe 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go b/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go index f92a9e21504..e7dfdb4d83f 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/version.go b/resource-manager/batch/2024-07-01/privateendpointconnection/version.go index 51ee9142452..80e7166f569 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/version.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/README.md b/resource-manager/batch/2024-07-01/privatelinkresource/README.md index 0b294506098..9ec0668d34a 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/README.md +++ b/resource-manager/batch/2024-07-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `batch` (API Version `2024-07-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/client.go b/resource-manager/batch/2024-07-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/client.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go index 9f6d2840fca..59c8f99019c 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go @@ -42,7 +42,7 @@ func ParseBatchAccountID(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { } id := BatchAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go index 4356c5a51bb..0b8bc5a029a 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go b/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go index a5c4f91b508..e74b98a7760 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go @@ -39,6 +39,7 @@ func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/version.go b/resource-manager/batch/2024-07-01/privatelinkresource/version.go index 8970c49b93e..af7b4d607f9 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/version.go +++ b/resource-manager/batch/2024-07-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2024-07-01" } diff --git a/resource-manager/billing/2019-10-01-preview/address/README.md b/resource-manager/billing/2019-10-01-preview/address/README.md index 95c7ed2e787..a6ee0374ec6 100644 --- a/resource-manager/billing/2019-10-01-preview/address/README.md +++ b/resource-manager/billing/2019-10-01-preview/address/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/address` Documentation -The `address` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `address` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/address/client.go b/resource-manager/billing/2019-10-01-preview/address/client.go index 26711a7d508..035237b610a 100644 --- a/resource-manager/billing/2019-10-01-preview/address/client.go +++ b/resource-manager/billing/2019-10-01-preview/address/client.go @@ -15,7 +15,7 @@ type AddressClient struct { } func NewAddressClientWithBaseURI(sdkApi sdkEnv.Api) (*AddressClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "address", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "address", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddressClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/address/method_validate.go b/resource-manager/billing/2019-10-01-preview/address/method_validate.go index 512ecca1dad..d3607a4bb35 100644 --- a/resource-manager/billing/2019-10-01-preview/address/method_validate.go +++ b/resource-manager/billing/2019-10-01-preview/address/method_validate.go @@ -49,7 +49,6 @@ func (c AddressClient) Validate(ctx context.Context, input AddressDetails) (resu var model ValidateAddressResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/address/version.go b/resource-manager/billing/2019-10-01-preview/address/version.go index 13abb816fcd..95778050987 100644 --- a/resource-manager/billing/2019-10-01-preview/address/version.go +++ b/resource-manager/billing/2019-10-01-preview/address/version.go @@ -1,12 +1,10 @@ package address -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/address/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/address/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/README.md b/resource-manager/billing/2019-10-01-preview/agreements/README.md index 6311ea6ab39..d4cf848eb5e 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/README.md +++ b/resource-manager/billing/2019-10-01-preview/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `agreements` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/agreements/client.go b/resource-manager/billing/2019-10-01-preview/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/client.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/id_agreement.go b/resource-manager/billing/2019-10-01-preview/agreements/id_agreement.go index d1e199cb8b9..10844e4ceb1 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/id_agreement.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/id_agreement.go @@ -40,7 +40,7 @@ func ParseAgreementID(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/agreements/id_billingaccount.go index bb7c46bd608..7c51b2041b3 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/method_get.go b/resource-manager/billing/2019-10-01-preview/agreements/method_get.go index acb7951a8ab..bea0ca1ce1f 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AgreementsClient) Get(ctx context.Context, id AgreementId, options GetOp var model Agreement result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/agreements/method_listbybillingaccount.go index abd7419ba69..0c360e60ec4 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/agreements/version.go b/resource-manager/billing/2019-10-01-preview/agreements/version.go index d9679ab03d0..e4f2d7643ec 100644 --- a/resource-manager/billing/2019-10-01-preview/agreements/version.go +++ b/resource-manager/billing/2019-10-01-preview/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/availablebalances/README.md b/resource-manager/billing/2019-10-01-preview/availablebalances/README.md index 7246e8842d2..c90ceb8dd11 100644 --- a/resource-manager/billing/2019-10-01-preview/availablebalances/README.md +++ b/resource-manager/billing/2019-10-01-preview/availablebalances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/availablebalances` Documentation -The `availablebalances` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `availablebalances` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/availablebalances/client.go b/resource-manager/billing/2019-10-01-preview/availablebalances/client.go index 5a43d676f91..dfd8e6fb08f 100644 --- a/resource-manager/billing/2019-10-01-preview/availablebalances/client.go +++ b/resource-manager/billing/2019-10-01-preview/availablebalances/client.go @@ -15,7 +15,7 @@ type AvailableBalancesClient struct { } func NewAvailableBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableBalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availablebalances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availablebalances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableBalancesClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/availablebalances/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/availablebalances/id_billingprofile.go index 6a41381f7d4..df3b33ebd57 100644 --- a/resource-manager/billing/2019-10-01-preview/availablebalances/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/availablebalances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/availablebalances/method_getbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/availablebalances/method_getbybillingprofile.go index a0ff8c42002..528bc6d0862 100644 --- a/resource-manager/billing/2019-10-01-preview/availablebalances/method_getbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/availablebalances/method_getbybillingprofile.go @@ -46,7 +46,6 @@ func (c AvailableBalancesClient) GetByBillingProfile(ctx context.Context, id Bil var model AvailableBalance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/availablebalances/version.go b/resource-manager/billing/2019-10-01-preview/availablebalances/version.go index 60b7899e7ae..9e420c970ff 100644 --- a/resource-manager/billing/2019-10-01-preview/availablebalances/version.go +++ b/resource-manager/billing/2019-10-01-preview/availablebalances/version.go @@ -1,12 +1,10 @@ package availablebalances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availablebalances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availablebalances/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/README.md b/resource-manager/billing/2019-10-01-preview/billingaccounts/README.md index 7391c29f291..2a679fa977d 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingaccounts` Documentation -The `billingaccounts` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingaccounts` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/client.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/client.go index caf4b2a8ea9..8c68e0c3ecb 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/client.go @@ -15,7 +15,7 @@ type BillingAccountsClient struct { } func NewBillingAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingAccountsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/id_billingaccount.go index d7c29b8bce7..124480e6015 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_get.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_get.go index 523444c582c..77103ac0bb5 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingAccountsClient) Get(ctx context.Context, id BillingAccountId, opt var model BillingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_list.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_list.go index 0f7c7268ccc..b4bba377589 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/method_list.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/billingaccounts/version.go b/resource-manager/billing/2019-10-01-preview/billingaccounts/version.go index 251bd4195df..83342c90916 100644 --- a/resource-manager/billing/2019-10-01-preview/billingaccounts/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingaccounts/version.go @@ -1,12 +1,10 @@ package billingaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingaccounts/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/README.md b/resource-manager/billing/2019-10-01-preview/billingpermissions/README.md index e61d5276f27..def0d17e298 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingpermissions` Documentation -The `billingpermissions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingpermissions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/client.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/client.go index bb7c02efcf8..a55c973f82b 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/client.go @@ -15,7 +15,7 @@ type BillingPermissionsClient struct { } func NewBillingPermissionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPermissionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingpermissions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingpermissions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPermissionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingaccount.go index f82905ceab2..43b0dd493dd 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingprofile.go index ab1c3bef188..fbdf55098a9 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_customer.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_customer.go index e1fe78e4cf7..0be6ce64219 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_department.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_department.go index 5d34c82fe92..2493bee0f79 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_department.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_enrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_enrollmentaccount.go index 2c439351bf2..a5046349472 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_enrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_invoicesection.go index 74b8a537602..1b94b621a06 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingpermissions/version.go b/resource-manager/billing/2019-10-01-preview/billingpermissions/version.go index 6c2977e75df..9e0c6bf3445 100644 --- a/resource-manager/billing/2019-10-01-preview/billingpermissions/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingpermissions/version.go @@ -1,12 +1,10 @@ package billingpermissions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingpermissions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingpermissions/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/README.md b/resource-manager/billing/2019-10-01-preview/billingprofiles/README.md index 45d52357d73..7b4e82b21e6 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingprofiles` Documentation -The `billingprofiles` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingprofiles` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/client.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/client.go index c929501d25d..792c070f4f8 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/client.go @@ -15,7 +15,7 @@ type BillingProfilesClient struct { } func NewBillingProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingProfilesClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingaccount.go index 20ee38e25b3..a42838fe173 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingprofile.go index fc04b4471c6..0754f0dde9b 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_get.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_get.go index 3896f9ba000..c12653457f1 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingProfilesClient) Get(ctx context.Context, id BillingProfileId, opt var model BillingProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_geteligibilitytodetachpaymentmethod.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_geteligibilitytodetachpaymentmethod.go index 6cf36137da8..b53e5733ff8 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_geteligibilitytodetachpaymentmethod.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_geteligibilitytodetachpaymentmethod.go @@ -46,7 +46,6 @@ func (c BillingProfilesClient) GetEligibilityToDetachPaymentMethod(ctx context.C var model DetachPaymentMethodEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_listbybillingaccount.go index 83b01179d11..177c90c645c 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/billingprofiles/version.go b/resource-manager/billing/2019-10-01-preview/billingprofiles/version.go index 2b44aaa8e5d..cadbe118467 100644 --- a/resource-manager/billing/2019-10-01-preview/billingprofiles/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingprofiles/version.go @@ -1,12 +1,10 @@ package billingprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingprofiles/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingproperties/README.md b/resource-manager/billing/2019-10-01-preview/billingproperties/README.md index 3c44bd54635..79d506a97c8 100644 --- a/resource-manager/billing/2019-10-01-preview/billingproperties/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingproperties` Documentation -The `billingproperties` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingproperties` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingproperties/client.go b/resource-manager/billing/2019-10-01-preview/billingproperties/client.go index 6d966fffbc6..778b6c1d9c9 100644 --- a/resource-manager/billing/2019-10-01-preview/billingproperties/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingproperties/client.go @@ -15,7 +15,7 @@ type BillingPropertiesClient struct { } func NewBillingPropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPropertiesClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingproperties/method_billingpropertyget.go b/resource-manager/billing/2019-10-01-preview/billingproperties/method_billingpropertyget.go index cd106db6627..3d71a257138 100644 --- a/resource-manager/billing/2019-10-01-preview/billingproperties/method_billingpropertyget.go +++ b/resource-manager/billing/2019-10-01-preview/billingproperties/method_billingpropertyget.go @@ -47,7 +47,6 @@ func (c BillingPropertiesClient) BillingPropertyGet(ctx context.Context, id comm var model BillingProperty result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingproperties/version.go b/resource-manager/billing/2019-10-01-preview/billingproperties/version.go index 7761d59cfc5..2ea1363967d 100644 --- a/resource-manager/billing/2019-10-01-preview/billingproperties/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingproperties/version.go @@ -1,12 +1,10 @@ package billingproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingproperties/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md b/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md index fc94f7ac63e..f3190e2406a 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingroleassignments` Documentation -The `billingroleassignments` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingroleassignments` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/client.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/client.go index 483692eff0f..5c3b28dfbf7 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/client.go @@ -15,7 +15,7 @@ type BillingRoleAssignmentsClient struct { } func NewBillingRoleAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroleassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroleassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleAssignmentsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingaccount.go index 173a19ee9a6..cc6964e33aa 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofile.go index 0f470d6bcdf..66d6352318a 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofilebillingroleassignment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofilebillingroleassignment.go index dd6179a5511..ee61e94fe0c 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofilebillingroleassignment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingprofilebillingroleassignment.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleAssignmentID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleAssignmentIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingroleassignment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingroleassignment.go index a80900027ad..686d324122e 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingroleassignment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_billingroleassignment.go @@ -40,7 +40,7 @@ func ParseBillingRoleAssignmentID(input string) (*BillingRoleAssignmentId, error } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleAssignmentIDInsensitively(input string) (*BillingRoleAssign } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_department.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_department.go index 0bb65a9f3fb..6014ce1c411 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_department.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_departmentbillingroleassignment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_departmentbillingroleassignment.go index 9d18c4302b4..d70ec61c216 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_departmentbillingroleassignment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_departmentbillingroleassignment.go @@ -42,7 +42,7 @@ func ParseDepartmentBillingRoleAssignmentID(input string) (*DepartmentBillingRol } id := DepartmentBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDepartmentBillingRoleAssignmentIDInsensitively(input string) (*Departm } id := DepartmentBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccount.go index dec2c3e379e..7c89a76a3f4 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccountbillingroleassignment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccountbillingroleassignment.go index 4f9dbb26ff9..0a62642282a 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccountbillingroleassignment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_enrollmentaccountbillingroleassignment.go @@ -42,7 +42,7 @@ func ParseEnrollmentAccountBillingRoleAssignmentID(input string) (*EnrollmentAcc } id := EnrollmentAccountBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnrollmentAccountBillingRoleAssignmentIDInsensitively(input string) (* } id := EnrollmentAccountBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesection.go index cc5ff920fd7..21b410726ba 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesectionbillingroleassignment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesectionbillingroleassignment.go index 250e4034e47..d390db4fa41 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesectionbillingroleassignment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/id_invoicesectionbillingroleassignment.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleAssignmentID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleAssignmentIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingaccount.go index 53b22227037..e5f94b8e7ab 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByBillingAccount(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingprofile.go index b56ddd6bf76..1751b6f2589 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByBillingProfile(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebydepartment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebydepartment.go index 884ca723db6..53c4a352427 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebydepartment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebydepartment.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByDepartment(ctx context.Context, id var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyenrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyenrollmentaccount.go index c34b2011ddf..6e664d6f09e 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyenrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyenrollmentaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByEnrollmentAccount(ctx context.Cont var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyinvoicesection.go index 891c7862bc9..1f0a10bc683 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_deletebyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByInvoiceSection(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentaccountroleassignmentsput.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentaccountroleassignmentsput.go index 32e8044c8f9..e0eea4bcff0 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentaccountroleassignmentsput.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentaccountroleassignmentsput.go @@ -49,7 +49,6 @@ func (c BillingRoleAssignmentsClient) EnrollmentAccountRoleAssignmentsPut(ctx co var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentdepartmentroleassignmentsput.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentdepartmentroleassignmentsput.go index ed4aff02365..8df2001a857 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentdepartmentroleassignmentsput.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_enrollmentdepartmentroleassignmentsput.go @@ -49,7 +49,6 @@ func (c BillingRoleAssignmentsClient) EnrollmentDepartmentRoleAssignmentsPut(ctx var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingaccount.go index 68445432dd5..c983df6e0d2 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByBillingAccount(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingprofile.go index 41aba4a06a8..c27b585c063 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByBillingProfile(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbydepartment.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbydepartment.go index 0da3a782a82..977dbe42a3f 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbydepartment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbydepartment.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByDepartment(ctx context.Context, id De var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyenrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyenrollmentaccount.go index 43e54faf732..1ac31ee2521 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyenrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyenrollmentaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByEnrollmentAccount(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyinvoicesection.go index 7c58bca83f2..ace88ccb831 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByInvoiceSection(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_roleassignmentsput.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_roleassignmentsput.go index 41a2f04d5e8..0435323b960 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_roleassignmentsput.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/method_roleassignmentsput.go @@ -49,7 +49,6 @@ func (c BillingRoleAssignmentsClient) RoleAssignmentsPut(ctx context.Context, id var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroleassignments/version.go b/resource-manager/billing/2019-10-01-preview/billingroleassignments/version.go index e4a03af52b4..020259bff8f 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroleassignments/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingroleassignments/version.go @@ -1,12 +1,10 @@ package billingroleassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroleassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroleassignments/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/README.md b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/README.md index 513f9d530cb..30a9134f2a3 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingroledefinitions` Documentation -The `billingroledefinitions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingroledefinitions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/client.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/client.go index 926b713b47f..9046b953654 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/client.go @@ -15,7 +15,7 @@ type BillingRoleDefinitionsClient struct { } func NewBillingRoleDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroledefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroledefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleDefinitionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingaccount.go index 686bd2561ca..aa7a409f525 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofile.go index 08668ddc47e..3e45ce358d4 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofilebillingroledefinition.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofilebillingroledefinition.go index cbd3d3213a7..b77cdb01857 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofilebillingroledefinition.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingprofilebillingroledefinition.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleDefinitionID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleDefinitionIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingroledefinition.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingroledefinition.go index 90fd1596fc2..36857206e68 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingroledefinition.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_billingroledefinition.go @@ -40,7 +40,7 @@ func ParseBillingRoleDefinitionID(input string) (*BillingRoleDefinitionId, error } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleDefinitionIDInsensitively(input string) (*BillingRoleDefini } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_department.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_department.go index 807f75e7ef9..b39124178d4 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_department.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_departmentbillingroledefinition.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_departmentbillingroledefinition.go index 37c8cb35ea7..5245edc4b19 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_departmentbillingroledefinition.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_departmentbillingroledefinition.go @@ -42,7 +42,7 @@ func ParseDepartmentBillingRoleDefinitionID(input string) (*DepartmentBillingRol } id := DepartmentBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDepartmentBillingRoleDefinitionIDInsensitively(input string) (*Departm } id := DepartmentBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccount.go index df2bd1efe4a..f476581453c 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccountbillingroledefinition.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccountbillingroledefinition.go index 7a22958b75d..e7a333490bd 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccountbillingroledefinition.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_enrollmentaccountbillingroledefinition.go @@ -42,7 +42,7 @@ func ParseEnrollmentAccountBillingRoleDefinitionID(input string) (*EnrollmentAcc } id := EnrollmentAccountBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnrollmentAccountBillingRoleDefinitionIDInsensitively(input string) (* } id := EnrollmentAccountBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesection.go index bef52ad0732..c307c872c4d 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesectionbillingroledefinition.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesectionbillingroledefinition.go index 2463dbb53cd..8430c3a8e0f 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesectionbillingroledefinition.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/id_invoicesectionbillingroledefinition.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleDefinitionID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleDefinitionIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingaccount.go index a9d69207fee..0f5da08a741 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByBillingAccount(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingprofile.go index fd099bb9a12..97ebe811d8e 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByBillingProfile(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbydepartment.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbydepartment.go index bdcb98b6dc3..a2ba2337274 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbydepartment.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbydepartment.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByDepartment(ctx context.Context, id De var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyenrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyenrollmentaccount.go index 2310415ceac..529649fb1fb 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyenrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyenrollmentaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByEnrollmentAccount(ctx context.Context var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyinvoicesection.go index 64ebdc085e2..c34255e6822 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByInvoiceSection(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/version.go b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/version.go index 8187adcf022..ab11da4026d 100644 --- a/resource-manager/billing/2019-10-01-preview/billingroledefinitions/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingroledefinitions/version.go @@ -1,12 +1,10 @@ package billingroledefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroledefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroledefinitions/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billings/README.md b/resource-manager/billing/2019-10-01-preview/billings/README.md index 647d32207fb..0f65bbde578 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/README.md +++ b/resource-manager/billing/2019-10-01-preview/billings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billings` Documentation -The `billings` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billings` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billings/client.go b/resource-manager/billing/2019-10-01-preview/billings/client.go index eef8fbed61f..fca534c1262 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/client.go +++ b/resource-manager/billing/2019-10-01-preview/billings/client.go @@ -15,7 +15,7 @@ type BillingsClient struct { } func NewBillingsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionbillingsubscription.go b/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionbillingsubscription.go index 38a25b5651a..bdb29c8484b 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionbillingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionbillingsubscription.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingSubscriptionID(input string) (*InvoiceSectionBill } id := InvoiceSectionBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingSubscriptionIDInsensitively(input string) (*Invoi } id := InvoiceSectionBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionproduct.go b/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionproduct.go index 9927619fbae..0b42404f858 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionproduct.go +++ b/resource-manager/billing/2019-10-01-preview/billings/id_invoicesectionproduct.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionProductID(input string) (*InvoiceSectionProductId, error } id := InvoiceSectionProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionProductIDInsensitively(input string) (*InvoiceSectionPro } id := InvoiceSectionProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billings/method_billingsubscriptionsvalidatetransfer.go b/resource-manager/billing/2019-10-01-preview/billings/method_billingsubscriptionsvalidatetransfer.go index fcb44360db3..e3abe40e8fa 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/method_billingsubscriptionsvalidatetransfer.go +++ b/resource-manager/billing/2019-10-01-preview/billings/method_billingsubscriptionsvalidatetransfer.go @@ -50,7 +50,6 @@ func (c BillingsClient) BillingSubscriptionsValidateTransfer(ctx context.Context var model ValidateSubscriptionTransferEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billings/method_productsvalidatetransfer.go b/resource-manager/billing/2019-10-01-preview/billings/method_productsvalidatetransfer.go index 20343b41324..f469ba9dfa2 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/method_productsvalidatetransfer.go +++ b/resource-manager/billing/2019-10-01-preview/billings/method_productsvalidatetransfer.go @@ -50,7 +50,6 @@ func (c BillingsClient) ProductsValidateTransfer(ctx context.Context, id Invoice var model ValidateProductTransferEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billings/version.go b/resource-manager/billing/2019-10-01-preview/billings/version.go index 0d760c16769..d70eb85c9f5 100644 --- a/resource-manager/billing/2019-10-01-preview/billings/version.go +++ b/resource-manager/billing/2019-10-01-preview/billings/version.go @@ -1,12 +1,10 @@ package billings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billings/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/README.md b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/README.md index 58e3bb46821..eb30b07463b 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/README.md +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingsubscriptions` Documentation -The `billingsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `billingsubscriptions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/client.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/client.go index fd6e451bb3f..7c146c67251 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/client.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/client.go @@ -15,7 +15,7 @@ type BillingSubscriptionsClient struct { } func NewBillingSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingSubscriptionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingaccount.go index 00f46e0f6b8..fd5fb3496d8 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingprofile.go index ddc35e1140c..9c7279ba3cd 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customer.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customer.go index 7c8f33ad924..a4432643366 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customerbillingsubscription.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customerbillingsubscription.go index d55d7d08f10..cf98b77c482 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customerbillingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_customerbillingsubscription.go @@ -42,7 +42,7 @@ func ParseCustomerBillingSubscriptionID(input string) (*CustomerBillingSubscript } id := CustomerBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomerBillingSubscriptionIDInsensitively(input string) (*CustomerBil } id := CustomerBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesection.go index d6eaa36030f..02cd38f102b 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesectionbillingsubscription.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesectionbillingsubscription.go index ed1bf3677fd..68aa8e58c75 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesectionbillingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/id_invoicesectionbillingsubscription.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingSubscriptionID(input string) (*InvoiceSectionBill } id := InvoiceSectionBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingSubscriptionIDInsensitively(input string) (*Invoi } id := InvoiceSectionBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_get.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_get.go index 5adff5dd182..e4ee9fadaab 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionsClient) Get(ctx context.Context, id InvoiceSectionBi var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_getbycustomer.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_getbycustomer.go index 1b163cada2a..10ab3bf88f0 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_getbycustomer.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/method_getbycustomer.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionsClient) GetByCustomer(ctx context.Context, id Custom var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/version.go b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/version.go index a525d672b30..1a868347755 100644 --- a/resource-manager/billing/2019-10-01-preview/billingsubscriptions/version.go +++ b/resource-manager/billing/2019-10-01-preview/billingsubscriptions/version.go @@ -1,12 +1,10 @@ package billingsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingsubscriptions/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/customers/README.md b/resource-manager/billing/2019-10-01-preview/customers/README.md index 13e85828ea5..ed04ca68a28 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/README.md +++ b/resource-manager/billing/2019-10-01-preview/customers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/customers` Documentation -The `customers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `customers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/customers/client.go b/resource-manager/billing/2019-10-01-preview/customers/client.go index f250cdc39e6..da3f810e33c 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/client.go +++ b/resource-manager/billing/2019-10-01-preview/customers/client.go @@ -15,7 +15,7 @@ type CustomersClient struct { } func NewCustomersClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomersClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/customers/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/customers/id_billingaccount.go index 7bf4039e367..5b8f0845bef 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/customers/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/customers/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/customers/id_billingprofile.go index 52addeccf7b..2b57f34fed6 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/customers/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/customers/id_customer.go b/resource-manager/billing/2019-10-01-preview/customers/id_customer.go index a446bdae048..9af51320b8e 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/customers/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/customers/method_get.go b/resource-manager/billing/2019-10-01-preview/customers/method_get.go index 52478728af0..4ac62bebbe2 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/customers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomersClient) Get(ctx context.Context, id CustomerId, options GetOper var model Customer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingaccount.go index c3cbb6e2201..c23e47d7be8 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingprofile.go index d64d29b5e3e..b4b23a378e5 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/customers/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/customers/version.go b/resource-manager/billing/2019-10-01-preview/customers/version.go index 915de87ff97..3e80bc37314 100644 --- a/resource-manager/billing/2019-10-01-preview/customers/version.go +++ b/resource-manager/billing/2019-10-01-preview/customers/version.go @@ -1,12 +1,10 @@ package customers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customers/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/departments/README.md b/resource-manager/billing/2019-10-01-preview/departments/README.md index 78e5fe099cf..b09e27e6ff4 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/README.md +++ b/resource-manager/billing/2019-10-01-preview/departments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/departments` Documentation -The `departments` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `departments` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/departments/client.go b/resource-manager/billing/2019-10-01-preview/departments/client.go index 425e4d6b728..410bf696776 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/client.go +++ b/resource-manager/billing/2019-10-01-preview/departments/client.go @@ -15,7 +15,7 @@ type DepartmentsClient struct { } func NewDepartmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DepartmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "departments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "departments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DepartmentsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/departments/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/departments/id_billingaccount.go index 13b5d0ae53a..8e4b5d510e1 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/departments/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/departments/id_department.go b/resource-manager/billing/2019-10-01-preview/departments/id_department.go index a11b9794ca3..bf1ecb9968d 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/id_department.go +++ b/resource-manager/billing/2019-10-01-preview/departments/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/departments/method_get.go b/resource-manager/billing/2019-10-01-preview/departments/method_get.go index 9fcfa0b1432..2fb7d1662c1 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/departments/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DepartmentsClient) Get(ctx context.Context, id DepartmentId, options Get var model Department result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/departments/method_listbybillingaccountname.go b/resource-manager/billing/2019-10-01-preview/departments/method_listbybillingaccountname.go index 601d7e5cd18..2f97ed846ec 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/method_listbybillingaccountname.go +++ b/resource-manager/billing/2019-10-01-preview/departments/method_listbybillingaccountname.go @@ -40,6 +40,7 @@ func (o ListByBillingAccountNameOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountNameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/departments/version.go b/resource-manager/billing/2019-10-01-preview/departments/version.go index 55320187555..8657ab3c934 100644 --- a/resource-manager/billing/2019-10-01-preview/departments/version.go +++ b/resource-manager/billing/2019-10-01-preview/departments/version.go @@ -1,12 +1,10 @@ package departments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/departments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/departments/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/README.md b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/README.md index b35be274bf3..d45858f81f0 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/README.md +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/enrollmentaccounts` Documentation -The `enrollmentaccounts` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `enrollmentaccounts` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/client.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/client.go index 4efb497161d..9ce8ee575ef 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/client.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/client.go @@ -15,7 +15,7 @@ type EnrollmentAccountsClient struct { } func NewEnrollmentAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnrollmentAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "enrollmentaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "enrollmentaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnrollmentAccountsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_billingaccount.go index b21289b1de8..a2b45a41c3a 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_enrollmentaccount.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_enrollmentaccount.go index 088438aa81d..3e6c331cb8b 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_enrollmentaccount.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_getbyenrollmentaccountid.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_getbyenrollmentaccountid.go index 9a3d414b988..352e014b488 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_getbyenrollmentaccountid.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_getbyenrollmentaccountid.go @@ -35,6 +35,7 @@ func (o GetByEnrollmentAccountIdOperationOptions) ToHeaders() *client.Headers { func (o GetByEnrollmentAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c EnrollmentAccountsClient) GetByEnrollmentAccountId(ctx context.Context, var model EnrollmentAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_listbybillingaccountname.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_listbybillingaccountname.go index 3bd6d5f870b..463a17d9267 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_listbybillingaccountname.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/method_listbybillingaccountname.go @@ -40,6 +40,7 @@ func (o ListByBillingAccountNameOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountNameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/version.go b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/version.go index 3eeeaa28a50..d4cc3433f41 100644 --- a/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/version.go +++ b/resource-manager/billing/2019-10-01-preview/enrollmentaccounts/version.go @@ -1,12 +1,10 @@ package enrollmentaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/enrollmentaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/enrollmentaccounts/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/README.md b/resource-manager/billing/2019-10-01-preview/instructions/README.md index c3eddbd278e..1c071d25bf1 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/README.md +++ b/resource-manager/billing/2019-10-01-preview/instructions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/instructions` Documentation -The `instructions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `instructions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/instructions/client.go b/resource-manager/billing/2019-10-01-preview/instructions/client.go index 4844a41c5cf..35410a2b0a0 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/client.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/client.go @@ -15,7 +15,7 @@ type InstructionsClient struct { } func NewInstructionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstructionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instructions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instructions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstructionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/instructions/id_billingprofile.go index f30d1c47869..dbddb25c916 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/id_instruction.go b/resource-manager/billing/2019-10-01-preview/instructions/id_instruction.go index f4aa662efee..af410952a4c 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/id_instruction.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/id_instruction.go @@ -42,7 +42,7 @@ func ParseInstructionID(input string) (*InstructionId, error) { } id := InstructionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstructionIDInsensitively(input string) (*InstructionId, error) { } id := InstructionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/method_get.go b/resource-manager/billing/2019-10-01-preview/instructions/method_get.go index e3eee8e1d07..bb8b9b92a98 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/method_get.go @@ -45,7 +45,6 @@ func (c InstructionsClient) Get(ctx context.Context, id InstructionId) (result G var model Instruction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/method_put.go b/resource-manager/billing/2019-10-01-preview/instructions/method_put.go index 0fb41d09fc0..f8a1251c088 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/method_put.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/method_put.go @@ -49,7 +49,6 @@ func (c InstructionsClient) Put(ctx context.Context, id InstructionId, input Ins var model Instruction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/instructions/version.go b/resource-manager/billing/2019-10-01-preview/instructions/version.go index f5494f67147..5efdd3af4c7 100644 --- a/resource-manager/billing/2019-10-01-preview/instructions/version.go +++ b/resource-manager/billing/2019-10-01-preview/instructions/version.go @@ -1,12 +1,10 @@ package instructions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instructions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instructions/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/README.md b/resource-manager/billing/2019-10-01-preview/invoices/README.md index 734b9d335ab..6495f1ab56c 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/README.md +++ b/resource-manager/billing/2019-10-01-preview/invoices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/invoices` Documentation -The `invoices` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `invoices` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/invoices/client.go b/resource-manager/billing/2019-10-01-preview/invoices/client.go index 5bde61f4aa3..6b0917211c1 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/client.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/client.go @@ -15,7 +15,7 @@ type InvoicesClient struct { } func NewInvoicesClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoicesClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccount.go index 6e8e5392417..5ee20f3ae73 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccountbillingsubscription.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccountbillingsubscription.go index 979dc170446..18fe5d6d2d4 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccountbillingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingaccountbillingsubscription.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBill } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*Billi } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofile.go index 17a0a780f8f..acd3535881d 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofileinvoice.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofileinvoice.go index 3103080737b..17b5ce486af 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofileinvoice.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingprofileinvoice.go @@ -42,7 +42,7 @@ func ParseBillingProfileInvoiceID(input string) (*BillingProfileInvoiceId, error } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileInvoiceIDInsensitively(input string) (*BillingProfileInv } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscription.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscription.go index 67a8c4d33d0..40eb652d4f9 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscription.go @@ -38,7 +38,7 @@ func ParseBillingSubscriptionID(input string) (*BillingSubscriptionId, error) { } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingSubscriptionIDInsensitively(input string) (*BillingSubscription } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscriptioninvoice.go b/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscriptioninvoice.go index 8ea822b2aec..311a4be3d94 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscriptioninvoice.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_billingsubscriptioninvoice.go @@ -42,7 +42,7 @@ func ParseBillingSubscriptionInvoiceID(input string) (*BillingSubscriptionInvoic } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingSubscriptionInvoiceIDInsensitively(input string) (*BillingSubsc } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/id_invoice.go b/resource-manager/billing/2019-10-01-preview/invoices/id_invoice.go index 75e3213b5e8..e416ae575a7 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/id_invoice.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/id_invoice.go @@ -40,7 +40,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_get.go b/resource-manager/billing/2019-10-01-preview/invoices/method_get.go index bce15fba2cd..c62dd5a98ec 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_get.go @@ -45,7 +45,6 @@ func (c InvoicesClient) Get(ctx context.Context, id BillingProfileInvoiceId) (re var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_getbillingaccountinvoice.go b/resource-manager/billing/2019-10-01-preview/invoices/method_getbillingaccountinvoice.go index 5dc3ee3b532..8e17f12f37e 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_getbillingaccountinvoice.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_getbillingaccountinvoice.go @@ -45,7 +45,6 @@ func (c InvoicesClient) GetBillingAccountInvoice(ctx context.Context, id Invoice var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_getbyid.go b/resource-manager/billing/2019-10-01-preview/invoices/method_getbyid.go index 35cc0c417f9..18ba77a04a4 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_getbyid.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_getbyid.go @@ -45,7 +45,6 @@ func (c InvoicesClient) GetById(ctx context.Context, id BillingSubscriptionInvoi var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingaccount.go index 878d939bb88..208218c104d 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingaccount.go @@ -40,6 +40,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingprofile.go index ef2bfcd099f..80219c93eec 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingsubscription.go b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingsubscription.go index 50864d2b895..8d1ac885bb6 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingsubscription.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/method_listbybillingsubscription.go @@ -40,6 +40,7 @@ func (o ListByBillingSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/invoices/version.go b/resource-manager/billing/2019-10-01-preview/invoices/version.go index cdcd04fa7e7..c5f461aafd1 100644 --- a/resource-manager/billing/2019-10-01-preview/invoices/version.go +++ b/resource-manager/billing/2019-10-01-preview/invoices/version.go @@ -1,12 +1,10 @@ package invoices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoices/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/README.md b/resource-manager/billing/2019-10-01-preview/invoicesections/README.md index d438c7bfa9e..7f9e7b82555 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/README.md +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/invoicesections` Documentation -The `invoicesections` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `invoicesections` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/client.go b/resource-manager/billing/2019-10-01-preview/invoicesections/client.go index 7adec7d1339..70c21f6af31 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/client.go +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/client.go @@ -15,7 +15,7 @@ type InvoiceSectionsClient struct { } func NewInvoiceSectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceSectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoicesections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoicesections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoiceSectionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/invoicesections/id_billingprofile.go index e35024c6613..730eb199f48 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/invoicesections/id_invoicesection.go index b37b920165c..9f771127b42 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/method_get.go b/resource-manager/billing/2019-10-01-preview/invoicesections/method_get.go index ab1c23c8ad9..528adbf0f77 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/method_get.go @@ -45,7 +45,6 @@ func (c InvoiceSectionsClient) Get(ctx context.Context, id InvoiceSectionId) (re var model InvoiceSection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/invoicesections/version.go b/resource-manager/billing/2019-10-01-preview/invoicesections/version.go index bb6768465db..0e38264ebf4 100644 --- a/resource-manager/billing/2019-10-01-preview/invoicesections/version.go +++ b/resource-manager/billing/2019-10-01-preview/invoicesections/version.go @@ -1,12 +1,10 @@ package invoicesections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoicesections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoicesections/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/paymentmethods/README.md b/resource-manager/billing/2019-10-01-preview/paymentmethods/README.md index 9d04b3f8c7c..2a285ee8b96 100644 --- a/resource-manager/billing/2019-10-01-preview/paymentmethods/README.md +++ b/resource-manager/billing/2019-10-01-preview/paymentmethods/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/paymentmethods` Documentation -The `paymentmethods` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `paymentmethods` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/paymentmethods/client.go b/resource-manager/billing/2019-10-01-preview/paymentmethods/client.go index 37553b5fe12..7b9f3505a6b 100644 --- a/resource-manager/billing/2019-10-01-preview/paymentmethods/client.go +++ b/resource-manager/billing/2019-10-01-preview/paymentmethods/client.go @@ -15,7 +15,7 @@ type PaymentMethodsClient struct { } func NewPaymentMethodsClientWithBaseURI(sdkApi sdkEnv.Api) (*PaymentMethodsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "paymentmethods", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "paymentmethods", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PaymentMethodsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingaccount.go index a8d58a2d4c0..887816df9a4 100644 --- a/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingprofile.go index 5a4f5944164..ef90831134e 100644 --- a/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/paymentmethods/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/paymentmethods/version.go b/resource-manager/billing/2019-10-01-preview/paymentmethods/version.go index 3cda9958846..7bcde4ddfaa 100644 --- a/resource-manager/billing/2019-10-01-preview/paymentmethods/version.go +++ b/resource-manager/billing/2019-10-01-preview/paymentmethods/version.go @@ -1,12 +1,10 @@ package paymentmethods -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/paymentmethods/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/paymentmethods/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/policies/README.md b/resource-manager/billing/2019-10-01-preview/policies/README.md index 168a1d493e8..7e2f9710ac6 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/README.md +++ b/resource-manager/billing/2019-10-01-preview/policies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/policies` Documentation -The `policies` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `policies` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/policies/client.go b/resource-manager/billing/2019-10-01-preview/policies/client.go index 76d2cca9fb6..aa2cda46eb2 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/client.go +++ b/resource-manager/billing/2019-10-01-preview/policies/client.go @@ -15,7 +15,7 @@ type PoliciesClient struct { } func NewPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoliciesClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/policies/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/policies/id_billingprofile.go index b4089abb34d..085b93c0a4f 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/policies/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/policies/id_customer.go b/resource-manager/billing/2019-10-01-preview/policies/id_customer.go index 594e3fe97ba..f22ed8bf7bb 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/policies/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/policies/method_getbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/policies/method_getbybillingprofile.go index ce9814067e7..e4b132af640 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/method_getbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/policies/method_getbybillingprofile.go @@ -46,7 +46,6 @@ func (c PoliciesClient) GetByBillingProfile(ctx context.Context, id BillingProfi var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/policies/method_getbycustomer.go b/resource-manager/billing/2019-10-01-preview/policies/method_getbycustomer.go index 7ae1cd2e582..6a95e09548c 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/method_getbycustomer.go +++ b/resource-manager/billing/2019-10-01-preview/policies/method_getbycustomer.go @@ -46,7 +46,6 @@ func (c PoliciesClient) GetByCustomer(ctx context.Context, id CustomerId) (resul var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/policies/method_update.go b/resource-manager/billing/2019-10-01-preview/policies/method_update.go index 13419b43450..f711424b3e6 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/method_update.go +++ b/resource-manager/billing/2019-10-01-preview/policies/method_update.go @@ -50,7 +50,6 @@ func (c PoliciesClient) Update(ctx context.Context, id BillingProfileId, input P var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/policies/method_updatecustomer.go b/resource-manager/billing/2019-10-01-preview/policies/method_updatecustomer.go index 0c0fc81d415..9b489a2f351 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/method_updatecustomer.go +++ b/resource-manager/billing/2019-10-01-preview/policies/method_updatecustomer.go @@ -50,7 +50,6 @@ func (c PoliciesClient) UpdateCustomer(ctx context.Context, id CustomerId, input var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/policies/version.go b/resource-manager/billing/2019-10-01-preview/policies/version.go index b61c4d6f950..126167780bb 100644 --- a/resource-manager/billing/2019-10-01-preview/policies/version.go +++ b/resource-manager/billing/2019-10-01-preview/policies/version.go @@ -1,12 +1,10 @@ package policies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policies/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/pricesheet/README.md b/resource-manager/billing/2019-10-01-preview/pricesheet/README.md index 5f8b3dcb30d..c06c68dec43 100644 --- a/resource-manager/billing/2019-10-01-preview/pricesheet/README.md +++ b/resource-manager/billing/2019-10-01-preview/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/pricesheet/client.go b/resource-manager/billing/2019-10-01-preview/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/billing/2019-10-01-preview/pricesheet/client.go +++ b/resource-manager/billing/2019-10-01-preview/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofile.go index f9c944f5feb..025acd2f65c 100644 --- a/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofileinvoice.go b/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofileinvoice.go index 77152c57ebd..4daa872bdbc 100644 --- a/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofileinvoice.go +++ b/resource-manager/billing/2019-10-01-preview/pricesheet/id_billingprofileinvoice.go @@ -42,7 +42,7 @@ func ParseBillingProfileInvoiceID(input string) (*BillingProfileInvoiceId, error } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileInvoiceIDInsensitively(input string) (*BillingProfileInv } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/pricesheet/version.go b/resource-manager/billing/2019-10-01-preview/pricesheet/version.go index 13c8a4face6..7a677e0a207 100644 --- a/resource-manager/billing/2019-10-01-preview/pricesheet/version.go +++ b/resource-manager/billing/2019-10-01-preview/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/products/README.md b/resource-manager/billing/2019-10-01-preview/products/README.md index ac2705d980a..54e5f13153c 100644 --- a/resource-manager/billing/2019-10-01-preview/products/README.md +++ b/resource-manager/billing/2019-10-01-preview/products/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/products` Documentation -The `products` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `products` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/products/client.go b/resource-manager/billing/2019-10-01-preview/products/client.go index 83f27a68760..9a5702afaa5 100644 --- a/resource-manager/billing/2019-10-01-preview/products/client.go +++ b/resource-manager/billing/2019-10-01-preview/products/client.go @@ -15,7 +15,7 @@ type ProductsClient struct { } func NewProductsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "products", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "products", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/products/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/products/id_billingaccount.go index 58737d6f557..5c675de99db 100644 --- a/resource-manager/billing/2019-10-01-preview/products/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/products/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/products/id_customer.go b/resource-manager/billing/2019-10-01-preview/products/id_customer.go index 0e9577d9e2c..b57469d952e 100644 --- a/resource-manager/billing/2019-10-01-preview/products/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/products/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/products/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/products/id_invoicesection.go index 6ba2a8a8979..2324bc5103a 100644 --- a/resource-manager/billing/2019-10-01-preview/products/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/products/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/products/id_invoicesectionproduct.go b/resource-manager/billing/2019-10-01-preview/products/id_invoicesectionproduct.go index 51bb7133dd2..bf746746e64 100644 --- a/resource-manager/billing/2019-10-01-preview/products/id_invoicesectionproduct.go +++ b/resource-manager/billing/2019-10-01-preview/products/id_invoicesectionproduct.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionProductID(input string) (*InvoiceSectionProductId, error } id := InvoiceSectionProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionProductIDInsensitively(input string) (*InvoiceSectionPro } id := InvoiceSectionProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/products/id_product.go b/resource-manager/billing/2019-10-01-preview/products/id_product.go index d83778a2c78..417113fbdcd 100644 --- a/resource-manager/billing/2019-10-01-preview/products/id_product.go +++ b/resource-manager/billing/2019-10-01-preview/products/id_product.go @@ -42,7 +42,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_get.go b/resource-manager/billing/2019-10-01-preview/products/method_get.go index d0aad26a29a..f27d3d8494b 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_get.go @@ -45,7 +45,6 @@ func (c ProductsClient) Get(ctx context.Context, id InvoiceSectionProductId) (re var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_getbycustomer.go b/resource-manager/billing/2019-10-01-preview/products/method_getbycustomer.go index 670bab89574..6fcec152281 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_getbycustomer.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_getbycustomer.go @@ -45,7 +45,6 @@ func (c ProductsClient) GetByCustomer(ctx context.Context, id ProductId) (result var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/products/method_listbybillingaccount.go index 62bce9b91bb..c101b671e83 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_listbycustomer.go b/resource-manager/billing/2019-10-01-preview/products/method_listbycustomer.go index aabe6f58607..f002e34f33d 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_listbycustomer.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_listbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/products/method_listbyinvoicesection.go index 7ef18e20a42..db9e2d17105 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_listbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_listbyinvoicesection.go @@ -39,6 +39,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_transfer.go b/resource-manager/billing/2019-10-01-preview/products/method_transfer.go index 7aa24e3cb92..154a1d4db77 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_transfer.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_transfer.go @@ -51,7 +51,6 @@ func (c ProductsClient) Transfer(ctx context.Context, id InvoiceSectionProductId var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/products/method_updateautorenewbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/products/method_updateautorenewbyinvoicesection.go index 8929da222c3..a80af64e499 100644 --- a/resource-manager/billing/2019-10-01-preview/products/method_updateautorenewbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/products/method_updateautorenewbyinvoicesection.go @@ -50,7 +50,6 @@ func (c ProductsClient) UpdateAutoRenewByInvoiceSection(ctx context.Context, id var model UpdateAutoRenewOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/products/version.go b/resource-manager/billing/2019-10-01-preview/products/version.go index b509a883e67..931eb447148 100644 --- a/resource-manager/billing/2019-10-01-preview/products/version.go +++ b/resource-manager/billing/2019-10-01-preview/products/version.go @@ -1,12 +1,10 @@ package products -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/products/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/products/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/README.md b/resource-manager/billing/2019-10-01-preview/recipienttransfers/README.md index 42a61f9aa63..13d64825baf 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/README.md +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/recipienttransfers` Documentation -The `recipienttransfers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `recipienttransfers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/client.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/client.go index b3c6368700d..fbe938298fe 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/client.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/client.go @@ -15,7 +15,7 @@ type RecipientTransfersClient struct { } func NewRecipientTransfersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecipientTransfersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recipienttransfers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recipienttransfers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecipientTransfersClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/id_transfer.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/id_transfer.go index 28ac8f6ec16..bba4850c6a2 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/id_transfer.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/id_transfer.go @@ -38,7 +38,7 @@ func ParseTransferID(input string) (*TransferId, error) { } id := TransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseTransferIDInsensitively(input string) (*TransferId, error) { } id := TransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_accept.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_accept.go index 00a8d48147d..54ca7715e39 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_accept.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_accept.go @@ -50,7 +50,6 @@ func (c RecipientTransfersClient) Accept(ctx context.Context, id TransferId, inp var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_decline.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_decline.go index 7fc3e429958..5db662a9ca8 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_decline.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_decline.go @@ -46,7 +46,6 @@ func (c RecipientTransfersClient) Decline(ctx context.Context, id TransferId) (r var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_get.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_get.go index adf005d5b07..c4ae648dbd4 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_get.go @@ -45,7 +45,6 @@ func (c RecipientTransfersClient) Get(ctx context.Context, id TransferId) (resul var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_validate.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_validate.go index 031a5e469d1..e58b8128547 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_validate.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/method_validate.go @@ -50,7 +50,6 @@ func (c RecipientTransfersClient) Validate(ctx context.Context, id TransferId, i var model ValidateTransferListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/recipienttransfers/version.go b/resource-manager/billing/2019-10-01-preview/recipienttransfers/version.go index afd0b6b1def..ff9d43a2d96 100644 --- a/resource-manager/billing/2019-10-01-preview/recipienttransfers/version.go +++ b/resource-manager/billing/2019-10-01-preview/recipienttransfers/version.go @@ -1,12 +1,10 @@ package recipienttransfers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recipienttransfers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recipienttransfers/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/README.md b/resource-manager/billing/2019-10-01-preview/transactions/README.md index f854c68be2a..cc372c269ea 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/README.md +++ b/resource-manager/billing/2019-10-01-preview/transactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/transactions` Documentation -The `transactions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `transactions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/transactions/client.go b/resource-manager/billing/2019-10-01-preview/transactions/client.go index beac3892e4e..1ce13f03a3d 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/client.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/client.go @@ -15,7 +15,7 @@ type TransactionsClient struct { } func NewTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransactionsClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_billingaccount.go b/resource-manager/billing/2019-10-01-preview/transactions/id_billingaccount.go index ce8e0107e11..c2cfd97bde0 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_billingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofile.go b/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofile.go index 9212da342b2..67cfe98fee7 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofileinvoice.go b/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofileinvoice.go index 5367c62ae95..fee72e95e73 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofileinvoice.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_billingprofileinvoice.go @@ -42,7 +42,7 @@ func ParseBillingProfileInvoiceID(input string) (*BillingProfileInvoiceId, error } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileInvoiceIDInsensitively(input string) (*BillingProfileInv } id := BillingProfileInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_customer.go b/resource-manager/billing/2019-10-01-preview/transactions/id_customer.go index 04b6c03ae39..5f393e0c76e 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_customer.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/transactions/id_invoicesection.go index 922f31ab62c..74bac538618 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/id_transaction.go b/resource-manager/billing/2019-10-01-preview/transactions/id_transaction.go index ecf374873b2..af4214244bd 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/id_transaction.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/id_transaction.go @@ -42,7 +42,7 @@ func ParseTransactionID(input string) (*TransactionId, error) { } id := TransactionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTransactionIDInsensitively(input string) (*TransactionId, error) { } id := TransactionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/method_get.go b/resource-manager/billing/2019-10-01-preview/transactions/method_get.go index 960e6b31fa8..339de2b825f 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TransactionsClient) Get(ctx context.Context, id TransactionId, options G var model Transaction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingaccount.go b/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingaccount.go index eef5518467c..5eb0190c730 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingaccount.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingaccount.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingprofile.go b/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingprofile.go index f88e9853873..ad1daa1fd34 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingprofile.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/method_listbybillingprofile.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/method_listbycustomer.go b/resource-manager/billing/2019-10-01-preview/transactions/method_listbycustomer.go index ad1b8c87d69..5342a03296f 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/method_listbycustomer.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/method_listbycustomer.go @@ -41,6 +41,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/method_listbyinvoicesection.go b/resource-manager/billing/2019-10-01-preview/transactions/method_listbyinvoicesection.go index b6dd7294f6b..473ea55fcc5 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/method_listbyinvoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/method_listbyinvoicesection.go @@ -41,6 +41,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2019-10-01-preview/transactions/version.go b/resource-manager/billing/2019-10-01-preview/transactions/version.go index a72ba7858df..749dd911fc1 100644 --- a/resource-manager/billing/2019-10-01-preview/transactions/version.go +++ b/resource-manager/billing/2019-10-01-preview/transactions/version.go @@ -1,12 +1,10 @@ package transactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transactions/2019-10-01-preview" } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/README.md b/resource-manager/billing/2019-10-01-preview/transfers/README.md index 6690413e9ec..9a8161931e5 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/README.md +++ b/resource-manager/billing/2019-10-01-preview/transfers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/transfers` Documentation -The `transfers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2019-10-01-preview`). +The `transfers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2019-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2019-10-01-preview/transfers/client.go b/resource-manager/billing/2019-10-01-preview/transfers/client.go index 48bc0377518..f503761d153 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/client.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/client.go @@ -15,7 +15,7 @@ type TransfersClient struct { } func NewTransfersClientWithBaseURI(sdkApi sdkEnv.Api) (*TransfersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transfers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transfers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransfersClient: %+v", err) } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/id_billingprofilecustomer.go b/resource-manager/billing/2019-10-01-preview/transfers/id_billingprofilecustomer.go index 52fae92834b..26c0d4419d1 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/id_billingprofilecustomer.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/id_customertransfer.go b/resource-manager/billing/2019-10-01-preview/transfers/id_customertransfer.go index 6bf0e839e4a..483aac22e6f 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/id_customertransfer.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/id_customertransfer.go @@ -44,7 +44,7 @@ func ParseCustomerTransferID(input string) (*CustomerTransferId, error) { } id := CustomerTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomerTransferIDInsensitively(input string) (*CustomerTransferId, er } id := CustomerTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesection.go b/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesection.go index 18143d8848f..403872bd19c 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesection.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesectiontransfer.go b/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesectiontransfer.go index bffefb07478..79276786f08 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesectiontransfer.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/id_invoicesectiontransfer.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionTransferID(input string) (*InvoiceSectionTransferId, err } id := InvoiceSectionTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionTransferIDInsensitively(input string) (*InvoiceSectionTr } id := InvoiceSectionTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_cancel.go b/resource-manager/billing/2019-10-01-preview/transfers/method_cancel.go index a6e667866d0..413f33d1cfc 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_cancel.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_cancel.go @@ -45,7 +45,6 @@ func (c TransfersClient) Cancel(ctx context.Context, id InvoiceSectionTransferId var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_get.go b/resource-manager/billing/2019-10-01-preview/transfers/method_get.go index 41bbf59d2d2..8407dd64979 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_get.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_get.go @@ -45,7 +45,6 @@ func (c TransfersClient) Get(ctx context.Context, id InvoiceSectionTransferId) ( var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_initiate.go b/resource-manager/billing/2019-10-01-preview/transfers/method_initiate.go index 56db88be798..9f88bb2b6ee 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_initiate.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_initiate.go @@ -50,7 +50,6 @@ func (c TransfersClient) Initiate(ctx context.Context, id InvoiceSectionId, inpu var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransferscancel.go b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransferscancel.go index 042e3fb9380..779d052590f 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransferscancel.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransferscancel.go @@ -45,7 +45,6 @@ func (c TransfersClient) PartnerTransfersCancel(ctx context.Context, id Customer var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersget.go b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersget.go index 7efef0b4348..ab6a45329ce 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersget.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersget.go @@ -45,7 +45,6 @@ func (c TransfersClient) PartnerTransfersGet(ctx context.Context, id CustomerTra var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersinitiate.go b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersinitiate.go index 4769103b41e..3e484765cf4 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersinitiate.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/method_partnertransfersinitiate.go @@ -50,7 +50,6 @@ func (c TransfersClient) PartnerTransfersInitiate(ctx context.Context, id Billin var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2019-10-01-preview/transfers/version.go b/resource-manager/billing/2019-10-01-preview/transfers/version.go index d638dd1375b..7d3171d53f7 100644 --- a/resource-manager/billing/2019-10-01-preview/transfers/version.go +++ b/resource-manager/billing/2019-10-01-preview/transfers/version.go @@ -1,12 +1,10 @@ package transfers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transfers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transfers/2019-10-01-preview" } diff --git a/resource-manager/billing/2020-05-01/address/README.md b/resource-manager/billing/2020-05-01/address/README.md index 3b6d136cfa2..714a0f6e838 100644 --- a/resource-manager/billing/2020-05-01/address/README.md +++ b/resource-manager/billing/2020-05-01/address/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/address` Documentation -The `address` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `address` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/address/client.go b/resource-manager/billing/2020-05-01/address/client.go index 26711a7d508..035237b610a 100644 --- a/resource-manager/billing/2020-05-01/address/client.go +++ b/resource-manager/billing/2020-05-01/address/client.go @@ -15,7 +15,7 @@ type AddressClient struct { } func NewAddressClientWithBaseURI(sdkApi sdkEnv.Api) (*AddressClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "address", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "address", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddressClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/address/method_validate.go b/resource-manager/billing/2020-05-01/address/method_validate.go index 512ecca1dad..d3607a4bb35 100644 --- a/resource-manager/billing/2020-05-01/address/method_validate.go +++ b/resource-manager/billing/2020-05-01/address/method_validate.go @@ -49,7 +49,6 @@ func (c AddressClient) Validate(ctx context.Context, input AddressDetails) (resu var model ValidateAddressResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/address/version.go b/resource-manager/billing/2020-05-01/address/version.go index c19cd9af511..f10242600eb 100644 --- a/resource-manager/billing/2020-05-01/address/version.go +++ b/resource-manager/billing/2020-05-01/address/version.go @@ -1,12 +1,10 @@ package address -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/address/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/address/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/agreements/README.md b/resource-manager/billing/2020-05-01/agreements/README.md index 3ed8a56ffd9..13288d28dbf 100644 --- a/resource-manager/billing/2020-05-01/agreements/README.md +++ b/resource-manager/billing/2020-05-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/agreements/client.go b/resource-manager/billing/2020-05-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/billing/2020-05-01/agreements/client.go +++ b/resource-manager/billing/2020-05-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/agreements/id_agreement.go b/resource-manager/billing/2020-05-01/agreements/id_agreement.go index d1e199cb8b9..10844e4ceb1 100644 --- a/resource-manager/billing/2020-05-01/agreements/id_agreement.go +++ b/resource-manager/billing/2020-05-01/agreements/id_agreement.go @@ -40,7 +40,7 @@ func ParseAgreementID(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/agreements/id_billingaccount.go b/resource-manager/billing/2020-05-01/agreements/id_billingaccount.go index bb7c46bd608..7c51b2041b3 100644 --- a/resource-manager/billing/2020-05-01/agreements/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/agreements/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/agreements/method_get.go b/resource-manager/billing/2020-05-01/agreements/method_get.go index acb7951a8ab..bea0ca1ce1f 100644 --- a/resource-manager/billing/2020-05-01/agreements/method_get.go +++ b/resource-manager/billing/2020-05-01/agreements/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AgreementsClient) Get(ctx context.Context, id AgreementId, options GetOp var model Agreement result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/agreements/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/agreements/method_listbybillingaccount.go index abd7419ba69..0c360e60ec4 100644 --- a/resource-manager/billing/2020-05-01/agreements/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/agreements/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/agreements/version.go b/resource-manager/billing/2020-05-01/agreements/version.go index 8c1d9d7d525..a8fa810e1ca 100644 --- a/resource-manager/billing/2020-05-01/agreements/version.go +++ b/resource-manager/billing/2020-05-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/availablebalances/README.md b/resource-manager/billing/2020-05-01/availablebalances/README.md index f12ae54ab55..6c38c3e615f 100644 --- a/resource-manager/billing/2020-05-01/availablebalances/README.md +++ b/resource-manager/billing/2020-05-01/availablebalances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/availablebalances` Documentation -The `availablebalances` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `availablebalances` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/availablebalances/client.go b/resource-manager/billing/2020-05-01/availablebalances/client.go index 5a43d676f91..dfd8e6fb08f 100644 --- a/resource-manager/billing/2020-05-01/availablebalances/client.go +++ b/resource-manager/billing/2020-05-01/availablebalances/client.go @@ -15,7 +15,7 @@ type AvailableBalancesClient struct { } func NewAvailableBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableBalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availablebalances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availablebalances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableBalancesClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/availablebalances/id_billingprofile.go b/resource-manager/billing/2020-05-01/availablebalances/id_billingprofile.go index 6a41381f7d4..df3b33ebd57 100644 --- a/resource-manager/billing/2020-05-01/availablebalances/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/availablebalances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/availablebalances/method_get.go b/resource-manager/billing/2020-05-01/availablebalances/method_get.go index 6e916cb541e..4aa4dbf3798 100644 --- a/resource-manager/billing/2020-05-01/availablebalances/method_get.go +++ b/resource-manager/billing/2020-05-01/availablebalances/method_get.go @@ -46,7 +46,6 @@ func (c AvailableBalancesClient) Get(ctx context.Context, id BillingProfileId) ( var model AvailableBalance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/availablebalances/version.go b/resource-manager/billing/2020-05-01/availablebalances/version.go index bf6a6e793fd..3c479b726f9 100644 --- a/resource-manager/billing/2020-05-01/availablebalances/version.go +++ b/resource-manager/billing/2020-05-01/availablebalances/version.go @@ -1,12 +1,10 @@ package availablebalances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availablebalances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availablebalances/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingaccounts/README.md b/resource-manager/billing/2020-05-01/billingaccounts/README.md index 4aeb213f45f..ced70d7fc1a 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/README.md +++ b/resource-manager/billing/2020-05-01/billingaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingaccounts` Documentation -The `billingaccounts` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingaccounts` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingaccounts/client.go b/resource-manager/billing/2020-05-01/billingaccounts/client.go index caf4b2a8ea9..8c68e0c3ecb 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/client.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/client.go @@ -15,7 +15,7 @@ type BillingAccountsClient struct { } func NewBillingAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingAccountsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingaccounts/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingaccounts/id_billingaccount.go index d7c29b8bce7..124480e6015 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingaccounts/method_get.go b/resource-manager/billing/2020-05-01/billingaccounts/method_get.go index 523444c582c..77103ac0bb5 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/method_get.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingAccountsClient) Get(ctx context.Context, id BillingAccountId, opt var model BillingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingaccounts/method_list.go b/resource-manager/billing/2020-05-01/billingaccounts/method_list.go index 0f7c7268ccc..b4bba377589 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/method_list.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/billingaccounts/version.go b/resource-manager/billing/2020-05-01/billingaccounts/version.go index c25c81c4177..9d1c0b028d4 100644 --- a/resource-manager/billing/2020-05-01/billingaccounts/version.go +++ b/resource-manager/billing/2020-05-01/billingaccounts/version.go @@ -1,12 +1,10 @@ package billingaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingaccounts/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/README.md b/resource-manager/billing/2020-05-01/billingpermissions/README.md index 9485cad77a4..030d108ff62 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/README.md +++ b/resource-manager/billing/2020-05-01/billingpermissions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingpermissions` Documentation -The `billingpermissions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingpermissions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingpermissions/client.go b/resource-manager/billing/2020-05-01/billingpermissions/client.go index bb7c02efcf8..a55c973f82b 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/client.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/client.go @@ -15,7 +15,7 @@ type BillingPermissionsClient struct { } func NewBillingPermissionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPermissionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingpermissions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingpermissions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPermissionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingpermissions/id_billingaccount.go index f82905ceab2..43b0dd493dd 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/id_billingprofile.go b/resource-manager/billing/2020-05-01/billingpermissions/id_billingprofile.go index ab1c3bef188..fbdf55098a9 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/id_customer.go b/resource-manager/billing/2020-05-01/billingpermissions/id_customer.go index e1fe78e4cf7..0be6ce64219 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/id_customer.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/id_invoicesection.go b/resource-manager/billing/2020-05-01/billingpermissions/id_invoicesection.go index 74b8a537602..1b94b621a06 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingpermissions/version.go b/resource-manager/billing/2020-05-01/billingpermissions/version.go index 16e3038b1c5..f410e88623e 100644 --- a/resource-manager/billing/2020-05-01/billingpermissions/version.go +++ b/resource-manager/billing/2020-05-01/billingpermissions/version.go @@ -1,12 +1,10 @@ package billingpermissions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingpermissions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingpermissions/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/README.md b/resource-manager/billing/2020-05-01/billingprofiles/README.md index 5c695fba266..70f0535253e 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/README.md +++ b/resource-manager/billing/2020-05-01/billingprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingprofiles` Documentation -The `billingprofiles` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingprofiles` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingprofiles/client.go b/resource-manager/billing/2020-05-01/billingprofiles/client.go index c929501d25d..792c070f4f8 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/client.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/client.go @@ -15,7 +15,7 @@ type BillingProfilesClient struct { } func NewBillingProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingProfilesClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingprofiles/id_billingaccount.go index 20ee38e25b3..a42838fe173 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/id_billingprofile.go b/resource-manager/billing/2020-05-01/billingprofiles/id_billingprofile.go index fc04b4471c6..0754f0dde9b 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/method_get.go b/resource-manager/billing/2020-05-01/billingprofiles/method_get.go index 3896f9ba000..c12653457f1 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/method_get.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingProfilesClient) Get(ctx context.Context, id BillingProfileId, opt var model BillingProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/billingprofiles/method_listbybillingaccount.go index 83b01179d11..177c90c645c 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/billingprofiles/version.go b/resource-manager/billing/2020-05-01/billingprofiles/version.go index a7a84dcea85..cd5f4e3f5b1 100644 --- a/resource-manager/billing/2020-05-01/billingprofiles/version.go +++ b/resource-manager/billing/2020-05-01/billingprofiles/version.go @@ -1,12 +1,10 @@ package billingprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingprofiles/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingproperties/README.md b/resource-manager/billing/2020-05-01/billingproperties/README.md index 66ee9fb83b8..1c3c9feba4c 100644 --- a/resource-manager/billing/2020-05-01/billingproperties/README.md +++ b/resource-manager/billing/2020-05-01/billingproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingproperties` Documentation -The `billingproperties` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingproperties` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingproperties/client.go b/resource-manager/billing/2020-05-01/billingproperties/client.go index 6d966fffbc6..778b6c1d9c9 100644 --- a/resource-manager/billing/2020-05-01/billingproperties/client.go +++ b/resource-manager/billing/2020-05-01/billingproperties/client.go @@ -15,7 +15,7 @@ type BillingPropertiesClient struct { } func NewBillingPropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPropertiesClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyget.go b/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyget.go index cd106db6627..3d71a257138 100644 --- a/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyget.go +++ b/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyget.go @@ -47,7 +47,6 @@ func (c BillingPropertiesClient) BillingPropertyGet(ctx context.Context, id comm var model BillingProperty result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyupdate.go b/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyupdate.go index fe36376fa61..66a18a3144f 100644 --- a/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyupdate.go +++ b/resource-manager/billing/2020-05-01/billingproperties/method_billingpropertyupdate.go @@ -51,7 +51,6 @@ func (c BillingPropertiesClient) BillingPropertyUpdate(ctx context.Context, id c var model BillingProperty result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingproperties/version.go b/resource-manager/billing/2020-05-01/billingproperties/version.go index edcd2af34f9..85cf92b4c0a 100644 --- a/resource-manager/billing/2020-05-01/billingproperties/version.go +++ b/resource-manager/billing/2020-05-01/billingproperties/version.go @@ -1,12 +1,10 @@ package billingproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingproperties/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/README.md b/resource-manager/billing/2020-05-01/billingroleassignments/README.md index 47451642ec7..b1c48d15fe3 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/README.md +++ b/resource-manager/billing/2020-05-01/billingroleassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingroleassignments` Documentation -The `billingroleassignments` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingroleassignments` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/client.go b/resource-manager/billing/2020-05-01/billingroleassignments/client.go index 483692eff0f..5c3b28dfbf7 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/client.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/client.go @@ -15,7 +15,7 @@ type BillingRoleAssignmentsClient struct { } func NewBillingRoleAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroleassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroleassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleAssignmentsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingaccount.go index 173a19ee9a6..cc6964e33aa 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofile.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofile.go index 0f470d6bcdf..66d6352318a 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofilebillingroleassignment.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofilebillingroleassignment.go index dd6179a5511..ee61e94fe0c 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofilebillingroleassignment.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingprofilebillingroleassignment.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleAssignmentID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleAssignmentIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingroleassignment.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingroleassignment.go index a80900027ad..686d324122e 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_billingroleassignment.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_billingroleassignment.go @@ -40,7 +40,7 @@ func ParseBillingRoleAssignmentID(input string) (*BillingRoleAssignmentId, error } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleAssignmentIDInsensitively(input string) (*BillingRoleAssign } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesection.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesection.go index cc5ff920fd7..21b410726ba 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesectionbillingroleassignment.go b/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesectionbillingroleassignment.go index 250e4034e47..d390db4fa41 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesectionbillingroleassignment.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/id_invoicesectionbillingroleassignment.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleAssignmentID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleAssignmentIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingaccount.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingaccount.go index 53b22227037..e5f94b8e7ab 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingaccount.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByBillingAccount(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingprofile.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingprofile.go index b56ddd6bf76..1751b6f2589 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingprofile.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByBillingProfile(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebyinvoicesection.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebyinvoicesection.go index 891c7862bc9..1f0a10bc683 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebyinvoicesection.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_deletebyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) DeleteByInvoiceSection(ctx context.Context var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingaccount.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingaccount.go index 68445432dd5..c983df6e0d2 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByBillingAccount(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingprofile.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingprofile.go index 41aba4a06a8..c27b585c063 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByBillingProfile(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbyinvoicesection.go b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbyinvoicesection.go index 7c58bca83f2..ace88ccb831 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/method_getbyinvoicesection.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentsClient) GetByInvoiceSection(ctx context.Context, i var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroleassignments/version.go b/resource-manager/billing/2020-05-01/billingroleassignments/version.go index 6547af579e1..4aac0515773 100644 --- a/resource-manager/billing/2020-05-01/billingroleassignments/version.go +++ b/resource-manager/billing/2020-05-01/billingroleassignments/version.go @@ -1,12 +1,10 @@ package billingroleassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroleassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroleassignments/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/README.md b/resource-manager/billing/2020-05-01/billingroledefinitions/README.md index bc1e2e49de2..b100a9c0fca 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/README.md +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingroledefinitions` Documentation -The `billingroledefinitions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingroledefinitions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/client.go b/resource-manager/billing/2020-05-01/billingroledefinitions/client.go index 926b713b47f..9046b953654 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/client.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/client.go @@ -15,7 +15,7 @@ type BillingRoleDefinitionsClient struct { } func NewBillingRoleDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroledefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroledefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleDefinitionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingaccount.go index 686bd2561ca..aa7a409f525 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofile.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofile.go index 08668ddc47e..3e45ce358d4 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofilebillingroledefinition.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofilebillingroledefinition.go index cbd3d3213a7..b77cdb01857 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofilebillingroledefinition.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingprofilebillingroledefinition.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleDefinitionID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleDefinitionIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingroledefinition.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingroledefinition.go index 90fd1596fc2..36857206e68 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingroledefinition.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_billingroledefinition.go @@ -40,7 +40,7 @@ func ParseBillingRoleDefinitionID(input string) (*BillingRoleDefinitionId, error } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleDefinitionIDInsensitively(input string) (*BillingRoleDefini } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesection.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesection.go index bef52ad0732..c307c872c4d 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesectionbillingroledefinition.go b/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesectionbillingroledefinition.go index 2463dbb53cd..8430c3a8e0f 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesectionbillingroledefinition.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/id_invoicesectionbillingroledefinition.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleDefinitionID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleDefinitionIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingaccount.go b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingaccount.go index a9d69207fee..0f5da08a741 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByBillingAccount(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingprofile.go b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingprofile.go index fd099bb9a12..97ebe811d8e 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByBillingProfile(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbyinvoicesection.go b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbyinvoicesection.go index 64ebdc085e2..c34255e6822 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbyinvoicesection.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionsClient) GetByInvoiceSection(ctx context.Context, i var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingroledefinitions/version.go b/resource-manager/billing/2020-05-01/billingroledefinitions/version.go index ffb9fdb85c1..4f8019bc325 100644 --- a/resource-manager/billing/2020-05-01/billingroledefinitions/version.go +++ b/resource-manager/billing/2020-05-01/billingroledefinitions/version.go @@ -1,12 +1,10 @@ package billingroledefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroledefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroledefinitions/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billings/README.md b/resource-manager/billing/2020-05-01/billings/README.md index 746b694480d..8b20ea612da 100644 --- a/resource-manager/billing/2020-05-01/billings/README.md +++ b/resource-manager/billing/2020-05-01/billings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billings` Documentation -The `billings` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billings` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billings/client.go b/resource-manager/billing/2020-05-01/billings/client.go index eef8fbed61f..fca534c1262 100644 --- a/resource-manager/billing/2020-05-01/billings/client.go +++ b/resource-manager/billing/2020-05-01/billings/client.go @@ -15,7 +15,7 @@ type BillingsClient struct { } func NewBillingsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billings/id_billingaccountbillingsubscription.go b/resource-manager/billing/2020-05-01/billings/id_billingaccountbillingsubscription.go index 9bb038c84ad..138ab55228d 100644 --- a/resource-manager/billing/2020-05-01/billings/id_billingaccountbillingsubscription.go +++ b/resource-manager/billing/2020-05-01/billings/id_billingaccountbillingsubscription.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBill } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*Billi } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billings/id_product.go b/resource-manager/billing/2020-05-01/billings/id_product.go index dd7c3d19af3..b423cdd101e 100644 --- a/resource-manager/billing/2020-05-01/billings/id_product.go +++ b/resource-manager/billing/2020-05-01/billings/id_product.go @@ -40,7 +40,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billings/method_billingsubscriptionsvalidatemove.go b/resource-manager/billing/2020-05-01/billings/method_billingsubscriptionsvalidatemove.go index 33eec935ce3..0027245bc7f 100644 --- a/resource-manager/billing/2020-05-01/billings/method_billingsubscriptionsvalidatemove.go +++ b/resource-manager/billing/2020-05-01/billings/method_billingsubscriptionsvalidatemove.go @@ -50,7 +50,6 @@ func (c BillingsClient) BillingSubscriptionsValidateMove(ctx context.Context, id var model ValidateSubscriptionTransferEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billings/method_productsvalidatemove.go b/resource-manager/billing/2020-05-01/billings/method_productsvalidatemove.go index 54bb3da0360..557714d934b 100644 --- a/resource-manager/billing/2020-05-01/billings/method_productsvalidatemove.go +++ b/resource-manager/billing/2020-05-01/billings/method_productsvalidatemove.go @@ -50,7 +50,6 @@ func (c BillingsClient) ProductsValidateMove(ctx context.Context, id ProductId, var model ValidateProductTransferEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billings/version.go b/resource-manager/billing/2020-05-01/billings/version.go index 866eae20158..d8f169dba3c 100644 --- a/resource-manager/billing/2020-05-01/billings/version.go +++ b/resource-manager/billing/2020-05-01/billings/version.go @@ -1,12 +1,10 @@ package billings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billings/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/README.md b/resource-manager/billing/2020-05-01/billingsubscriptions/README.md index c607044f224..4bdd1d8285f 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/README.md +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingsubscriptions` Documentation -The `billingsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `billingsubscriptions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/client.go b/resource-manager/billing/2020-05-01/billingsubscriptions/client.go index fd6e451bb3f..7c146c67251 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/client.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/client.go @@ -15,7 +15,7 @@ type BillingSubscriptionsClient struct { } func NewBillingSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingSubscriptionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccount.go b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccount.go index 00f46e0f6b8..fd5fb3496d8 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccountbillingsubscription.go b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccountbillingsubscription.go index 16d61322f3f..1c158f710ae 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccountbillingsubscription.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingaccountbillingsubscription.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBill } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*Billi } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingprofile.go b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingprofile.go index ddc35e1140c..9c7279ba3cd 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/id_customer.go b/resource-manager/billing/2020-05-01/billingsubscriptions/id_customer.go index 7c8f33ad924..a4432643366 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/id_customer.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/id_invoicesection.go b/resource-manager/billing/2020-05-01/billingsubscriptions/id_invoicesection.go index d6eaa36030f..02cd38f102b 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/method_get.go b/resource-manager/billing/2020-05-01/billingsubscriptions/method_get.go index 751caed8b50..f5b3f8430ff 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/method_get.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionsClient) Get(ctx context.Context, id BillingAccountBi var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/method_update.go b/resource-manager/billing/2020-05-01/billingsubscriptions/method_update.go index 37b86cf72b7..4a6eb6673d2 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/method_update.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/method_update.go @@ -49,7 +49,6 @@ func (c BillingSubscriptionsClient) Update(ctx context.Context, id BillingAccoun var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/billingsubscriptions/version.go b/resource-manager/billing/2020-05-01/billingsubscriptions/version.go index 46a6b795f5c..1af51c90e7a 100644 --- a/resource-manager/billing/2020-05-01/billingsubscriptions/version.go +++ b/resource-manager/billing/2020-05-01/billingsubscriptions/version.go @@ -1,12 +1,10 @@ package billingsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingsubscriptions/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/customers/README.md b/resource-manager/billing/2020-05-01/customers/README.md index 2d39d98ac60..45f40f59e45 100644 --- a/resource-manager/billing/2020-05-01/customers/README.md +++ b/resource-manager/billing/2020-05-01/customers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/customers` Documentation -The `customers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `customers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/customers/client.go b/resource-manager/billing/2020-05-01/customers/client.go index f250cdc39e6..da3f810e33c 100644 --- a/resource-manager/billing/2020-05-01/customers/client.go +++ b/resource-manager/billing/2020-05-01/customers/client.go @@ -15,7 +15,7 @@ type CustomersClient struct { } func NewCustomersClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomersClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/customers/id_billingaccount.go b/resource-manager/billing/2020-05-01/customers/id_billingaccount.go index 7bf4039e367..5b8f0845bef 100644 --- a/resource-manager/billing/2020-05-01/customers/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/customers/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/customers/id_billingprofile.go b/resource-manager/billing/2020-05-01/customers/id_billingprofile.go index 52addeccf7b..2b57f34fed6 100644 --- a/resource-manager/billing/2020-05-01/customers/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/customers/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/customers/id_customer.go b/resource-manager/billing/2020-05-01/customers/id_customer.go index a446bdae048..9af51320b8e 100644 --- a/resource-manager/billing/2020-05-01/customers/id_customer.go +++ b/resource-manager/billing/2020-05-01/customers/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/customers/method_get.go b/resource-manager/billing/2020-05-01/customers/method_get.go index 52478728af0..4ac62bebbe2 100644 --- a/resource-manager/billing/2020-05-01/customers/method_get.go +++ b/resource-manager/billing/2020-05-01/customers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomersClient) Get(ctx context.Context, id CustomerId, options GetOper var model Customer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/customers/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/customers/method_listbybillingaccount.go index c05fcb61a2e..96777b1de3f 100644 --- a/resource-manager/billing/2020-05-01/customers/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/customers/method_listbybillingaccount.go @@ -40,6 +40,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/customers/method_listbybillingprofile.go b/resource-manager/billing/2020-05-01/customers/method_listbybillingprofile.go index b46d3ffaca1..e42fb9aa55c 100644 --- a/resource-manager/billing/2020-05-01/customers/method_listbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/customers/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/customers/version.go b/resource-manager/billing/2020-05-01/customers/version.go index 14341a8d7bb..544aac6347c 100644 --- a/resource-manager/billing/2020-05-01/customers/version.go +++ b/resource-manager/billing/2020-05-01/customers/version.go @@ -1,12 +1,10 @@ package customers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customers/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/instructions/README.md b/resource-manager/billing/2020-05-01/instructions/README.md index 61a18c6f6ef..8782526a417 100644 --- a/resource-manager/billing/2020-05-01/instructions/README.md +++ b/resource-manager/billing/2020-05-01/instructions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/instructions` Documentation -The `instructions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `instructions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/instructions/client.go b/resource-manager/billing/2020-05-01/instructions/client.go index 4844a41c5cf..35410a2b0a0 100644 --- a/resource-manager/billing/2020-05-01/instructions/client.go +++ b/resource-manager/billing/2020-05-01/instructions/client.go @@ -15,7 +15,7 @@ type InstructionsClient struct { } func NewInstructionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstructionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instructions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instructions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstructionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/instructions/id_billingprofile.go b/resource-manager/billing/2020-05-01/instructions/id_billingprofile.go index f30d1c47869..dbddb25c916 100644 --- a/resource-manager/billing/2020-05-01/instructions/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/instructions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/instructions/id_instruction.go b/resource-manager/billing/2020-05-01/instructions/id_instruction.go index f4aa662efee..af410952a4c 100644 --- a/resource-manager/billing/2020-05-01/instructions/id_instruction.go +++ b/resource-manager/billing/2020-05-01/instructions/id_instruction.go @@ -42,7 +42,7 @@ func ParseInstructionID(input string) (*InstructionId, error) { } id := InstructionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstructionIDInsensitively(input string) (*InstructionId, error) { } id := InstructionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/instructions/method_get.go b/resource-manager/billing/2020-05-01/instructions/method_get.go index e3eee8e1d07..bb8b9b92a98 100644 --- a/resource-manager/billing/2020-05-01/instructions/method_get.go +++ b/resource-manager/billing/2020-05-01/instructions/method_get.go @@ -45,7 +45,6 @@ func (c InstructionsClient) Get(ctx context.Context, id InstructionId) (result G var model Instruction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/instructions/method_put.go b/resource-manager/billing/2020-05-01/instructions/method_put.go index 0fb41d09fc0..f8a1251c088 100644 --- a/resource-manager/billing/2020-05-01/instructions/method_put.go +++ b/resource-manager/billing/2020-05-01/instructions/method_put.go @@ -49,7 +49,6 @@ func (c InstructionsClient) Put(ctx context.Context, id InstructionId, input Ins var model Instruction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/instructions/version.go b/resource-manager/billing/2020-05-01/instructions/version.go index 011cd897238..f366c9f03d3 100644 --- a/resource-manager/billing/2020-05-01/instructions/version.go +++ b/resource-manager/billing/2020-05-01/instructions/version.go @@ -1,12 +1,10 @@ package instructions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instructions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instructions/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/invoices/README.md b/resource-manager/billing/2020-05-01/invoices/README.md index aa83053081b..a8f9e7fc8f9 100644 --- a/resource-manager/billing/2020-05-01/invoices/README.md +++ b/resource-manager/billing/2020-05-01/invoices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/invoices` Documentation -The `invoices` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `invoices` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/invoices/client.go b/resource-manager/billing/2020-05-01/invoices/client.go index 5bde61f4aa3..6b0917211c1 100644 --- a/resource-manager/billing/2020-05-01/invoices/client.go +++ b/resource-manager/billing/2020-05-01/invoices/client.go @@ -15,7 +15,7 @@ type InvoicesClient struct { } func NewInvoicesClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoicesClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/invoices/id_billingaccount.go b/resource-manager/billing/2020-05-01/invoices/id_billingaccount.go index 6e8e5392417..5ee20f3ae73 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/invoices/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/id_billingaccountinvoice.go b/resource-manager/billing/2020-05-01/invoices/id_billingaccountinvoice.go index 55f68428258..287e9e00f95 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_billingaccountinvoice.go +++ b/resource-manager/billing/2020-05-01/invoices/id_billingaccountinvoice.go @@ -40,7 +40,7 @@ func ParseBillingAccountInvoiceID(input string) (*BillingAccountInvoiceId, error } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountInvoiceIDInsensitively(input string) (*BillingAccountInv } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/id_billingprofile.go b/resource-manager/billing/2020-05-01/invoices/id_billingprofile.go index 17a0a780f8f..acd3535881d 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/invoices/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/id_billingsubscription.go b/resource-manager/billing/2020-05-01/invoices/id_billingsubscription.go index 67a8c4d33d0..40eb652d4f9 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_billingsubscription.go +++ b/resource-manager/billing/2020-05-01/invoices/id_billingsubscription.go @@ -38,7 +38,7 @@ func ParseBillingSubscriptionID(input string) (*BillingSubscriptionId, error) { } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingSubscriptionIDInsensitively(input string) (*BillingSubscription } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/id_billingsubscriptioninvoice.go b/resource-manager/billing/2020-05-01/invoices/id_billingsubscriptioninvoice.go index 7febe81ce1c..4a7e679b50c 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_billingsubscriptioninvoice.go +++ b/resource-manager/billing/2020-05-01/invoices/id_billingsubscriptioninvoice.go @@ -40,7 +40,7 @@ func ParseBillingSubscriptionInvoiceID(input string) (*BillingSubscriptionInvoic } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingSubscriptionInvoiceIDInsensitively(input string) (*BillingSubsc } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/id_invoice.go b/resource-manager/billing/2020-05-01/invoices/id_invoice.go index 04092beb609..92d35e19570 100644 --- a/resource-manager/billing/2020-05-01/invoices/id_invoice.go +++ b/resource-manager/billing/2020-05-01/invoices/id_invoice.go @@ -38,7 +38,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoices/method_downloadbillingsubscriptioninvoice.go b/resource-manager/billing/2020-05-01/invoices/method_downloadbillingsubscriptioninvoice.go index 406fc2acb94..f39e22b479a 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_downloadbillingsubscriptioninvoice.go +++ b/resource-manager/billing/2020-05-01/invoices/method_downloadbillingsubscriptioninvoice.go @@ -37,6 +37,7 @@ func (o DownloadBillingSubscriptionInvoiceOperationOptions) ToHeaders() *client. func (o DownloadBillingSubscriptionInvoiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/invoices/method_downloadinvoice.go b/resource-manager/billing/2020-05-01/invoices/method_downloadinvoice.go index fa68961fbe1..6565154c613 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_downloadinvoice.go +++ b/resource-manager/billing/2020-05-01/invoices/method_downloadinvoice.go @@ -37,6 +37,7 @@ func (o DownloadInvoiceOperationOptions) ToHeaders() *client.Headers { func (o DownloadInvoiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/invoices/method_get.go b/resource-manager/billing/2020-05-01/invoices/method_get.go index bb323cfa9a2..6176b75a3fa 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_get.go +++ b/resource-manager/billing/2020-05-01/invoices/method_get.go @@ -45,7 +45,6 @@ func (c InvoicesClient) Get(ctx context.Context, id BillingAccountInvoiceId) (re var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/invoices/method_getbyid.go b/resource-manager/billing/2020-05-01/invoices/method_getbyid.go index 3ef567023f0..116d3764ce5 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_getbyid.go +++ b/resource-manager/billing/2020-05-01/invoices/method_getbyid.go @@ -45,7 +45,6 @@ func (c InvoicesClient) GetById(ctx context.Context, id InvoiceId) (result GetBy var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/invoices/method_getbysubscriptionandinvoiceid.go b/resource-manager/billing/2020-05-01/invoices/method_getbysubscriptionandinvoiceid.go index 00f2ae52e21..b7ba86ad088 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_getbysubscriptionandinvoiceid.go +++ b/resource-manager/billing/2020-05-01/invoices/method_getbysubscriptionandinvoiceid.go @@ -45,7 +45,6 @@ func (c InvoicesClient) GetBySubscriptionAndInvoiceId(ctx context.Context, id Bi var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/invoices/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/invoices/method_listbybillingaccount.go index 878d939bb88..208218c104d 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/invoices/method_listbybillingaccount.go @@ -40,6 +40,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/invoices/method_listbybillingprofile.go b/resource-manager/billing/2020-05-01/invoices/method_listbybillingprofile.go index ef2bfcd099f..80219c93eec 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_listbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/invoices/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/invoices/method_listbybillingsubscription.go b/resource-manager/billing/2020-05-01/invoices/method_listbybillingsubscription.go index d0c9eeddbbe..1008f574829 100644 --- a/resource-manager/billing/2020-05-01/invoices/method_listbybillingsubscription.go +++ b/resource-manager/billing/2020-05-01/invoices/method_listbybillingsubscription.go @@ -40,6 +40,7 @@ func (o ListByBillingSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/invoices/version.go b/resource-manager/billing/2020-05-01/invoices/version.go index b03bc63d911..4880c4cdb25 100644 --- a/resource-manager/billing/2020-05-01/invoices/version.go +++ b/resource-manager/billing/2020-05-01/invoices/version.go @@ -1,12 +1,10 @@ package invoices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoices/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/invoicesections/README.md b/resource-manager/billing/2020-05-01/invoicesections/README.md index 0633cd530a5..d2969605cb1 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/README.md +++ b/resource-manager/billing/2020-05-01/invoicesections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/invoicesections` Documentation -The `invoicesections` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `invoicesections` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/invoicesections/client.go b/resource-manager/billing/2020-05-01/invoicesections/client.go index 7adec7d1339..70c21f6af31 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/client.go +++ b/resource-manager/billing/2020-05-01/invoicesections/client.go @@ -15,7 +15,7 @@ type InvoiceSectionsClient struct { } func NewInvoiceSectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceSectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoicesections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoicesections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoiceSectionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/invoicesections/id_billingprofile.go b/resource-manager/billing/2020-05-01/invoicesections/id_billingprofile.go index e35024c6613..730eb199f48 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/invoicesections/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoicesections/id_invoicesection.go b/resource-manager/billing/2020-05-01/invoicesections/id_invoicesection.go index b37b920165c..9f771127b42 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/invoicesections/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/invoicesections/method_get.go b/resource-manager/billing/2020-05-01/invoicesections/method_get.go index ab1c23c8ad9..528adbf0f77 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/method_get.go +++ b/resource-manager/billing/2020-05-01/invoicesections/method_get.go @@ -45,7 +45,6 @@ func (c InvoiceSectionsClient) Get(ctx context.Context, id InvoiceSectionId) (re var model InvoiceSection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/invoicesections/version.go b/resource-manager/billing/2020-05-01/invoicesections/version.go index 7e98cf31606..b70398adf06 100644 --- a/resource-manager/billing/2020-05-01/invoicesections/version.go +++ b/resource-manager/billing/2020-05-01/invoicesections/version.go @@ -1,12 +1,10 @@ package invoicesections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoicesections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoicesections/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/policies/README.md b/resource-manager/billing/2020-05-01/policies/README.md index 5c4a03ebf93..50aa823a792 100644 --- a/resource-manager/billing/2020-05-01/policies/README.md +++ b/resource-manager/billing/2020-05-01/policies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/policies` Documentation -The `policies` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `policies` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/policies/client.go b/resource-manager/billing/2020-05-01/policies/client.go index 76d2cca9fb6..aa2cda46eb2 100644 --- a/resource-manager/billing/2020-05-01/policies/client.go +++ b/resource-manager/billing/2020-05-01/policies/client.go @@ -15,7 +15,7 @@ type PoliciesClient struct { } func NewPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoliciesClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/policies/id_billingprofile.go b/resource-manager/billing/2020-05-01/policies/id_billingprofile.go index b4089abb34d..085b93c0a4f 100644 --- a/resource-manager/billing/2020-05-01/policies/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/policies/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/policies/id_customer.go b/resource-manager/billing/2020-05-01/policies/id_customer.go index 594e3fe97ba..f22ed8bf7bb 100644 --- a/resource-manager/billing/2020-05-01/policies/id_customer.go +++ b/resource-manager/billing/2020-05-01/policies/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/policies/method_getbybillingprofile.go b/resource-manager/billing/2020-05-01/policies/method_getbybillingprofile.go index ce9814067e7..e4b132af640 100644 --- a/resource-manager/billing/2020-05-01/policies/method_getbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/policies/method_getbybillingprofile.go @@ -46,7 +46,6 @@ func (c PoliciesClient) GetByBillingProfile(ctx context.Context, id BillingProfi var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/policies/method_getbycustomer.go b/resource-manager/billing/2020-05-01/policies/method_getbycustomer.go index 7ae1cd2e582..6a95e09548c 100644 --- a/resource-manager/billing/2020-05-01/policies/method_getbycustomer.go +++ b/resource-manager/billing/2020-05-01/policies/method_getbycustomer.go @@ -46,7 +46,6 @@ func (c PoliciesClient) GetByCustomer(ctx context.Context, id CustomerId) (resul var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/policies/method_update.go b/resource-manager/billing/2020-05-01/policies/method_update.go index 13419b43450..f711424b3e6 100644 --- a/resource-manager/billing/2020-05-01/policies/method_update.go +++ b/resource-manager/billing/2020-05-01/policies/method_update.go @@ -50,7 +50,6 @@ func (c PoliciesClient) Update(ctx context.Context, id BillingProfileId, input P var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/policies/method_updatecustomer.go b/resource-manager/billing/2020-05-01/policies/method_updatecustomer.go index 0c0fc81d415..9b489a2f351 100644 --- a/resource-manager/billing/2020-05-01/policies/method_updatecustomer.go +++ b/resource-manager/billing/2020-05-01/policies/method_updatecustomer.go @@ -50,7 +50,6 @@ func (c PoliciesClient) UpdateCustomer(ctx context.Context, id CustomerId, input var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/policies/version.go b/resource-manager/billing/2020-05-01/policies/version.go index da56721cc69..dbebaeb3fca 100644 --- a/resource-manager/billing/2020-05-01/policies/version.go +++ b/resource-manager/billing/2020-05-01/policies/version.go @@ -1,12 +1,10 @@ package policies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policies/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/products/README.md b/resource-manager/billing/2020-05-01/products/README.md index 520cb6a9ab5..be084a1344b 100644 --- a/resource-manager/billing/2020-05-01/products/README.md +++ b/resource-manager/billing/2020-05-01/products/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/products` Documentation -The `products` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `products` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/products/client.go b/resource-manager/billing/2020-05-01/products/client.go index 83f27a68760..9a5702afaa5 100644 --- a/resource-manager/billing/2020-05-01/products/client.go +++ b/resource-manager/billing/2020-05-01/products/client.go @@ -15,7 +15,7 @@ type ProductsClient struct { } func NewProductsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "products", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "products", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/products/id_billingaccount.go b/resource-manager/billing/2020-05-01/products/id_billingaccount.go index 58737d6f557..5c675de99db 100644 --- a/resource-manager/billing/2020-05-01/products/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/products/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/products/id_billingprofile.go b/resource-manager/billing/2020-05-01/products/id_billingprofile.go index dd08d9532d5..eaf5664101c 100644 --- a/resource-manager/billing/2020-05-01/products/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/products/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/products/id_customer.go b/resource-manager/billing/2020-05-01/products/id_customer.go index 0e9577d9e2c..b57469d952e 100644 --- a/resource-manager/billing/2020-05-01/products/id_customer.go +++ b/resource-manager/billing/2020-05-01/products/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/products/id_invoicesection.go b/resource-manager/billing/2020-05-01/products/id_invoicesection.go index 6ba2a8a8979..2324bc5103a 100644 --- a/resource-manager/billing/2020-05-01/products/id_invoicesection.go +++ b/resource-manager/billing/2020-05-01/products/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/products/id_product.go b/resource-manager/billing/2020-05-01/products/id_product.go index 3e29ae976c2..e5fc5e0a9b6 100644 --- a/resource-manager/billing/2020-05-01/products/id_product.go +++ b/resource-manager/billing/2020-05-01/products/id_product.go @@ -40,7 +40,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/products/method_get.go b/resource-manager/billing/2020-05-01/products/method_get.go index f69654e9513..1a6dd5c6444 100644 --- a/resource-manager/billing/2020-05-01/products/method_get.go +++ b/resource-manager/billing/2020-05-01/products/method_get.go @@ -45,7 +45,6 @@ func (c ProductsClient) Get(ctx context.Context, id ProductId) (result GetOperat var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/products/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/products/method_listbybillingaccount.go index 62bce9b91bb..c101b671e83 100644 --- a/resource-manager/billing/2020-05-01/products/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/products/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/products/method_listbybillingprofile.go b/resource-manager/billing/2020-05-01/products/method_listbybillingprofile.go index 37ef26966d4..35884c74ea2 100644 --- a/resource-manager/billing/2020-05-01/products/method_listbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/products/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/products/method_listbyinvoicesection.go b/resource-manager/billing/2020-05-01/products/method_listbyinvoicesection.go index 7ef18e20a42..db9e2d17105 100644 --- a/resource-manager/billing/2020-05-01/products/method_listbyinvoicesection.go +++ b/resource-manager/billing/2020-05-01/products/method_listbyinvoicesection.go @@ -39,6 +39,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/products/method_move.go b/resource-manager/billing/2020-05-01/products/method_move.go index f639c3c0e13..8258d81605c 100644 --- a/resource-manager/billing/2020-05-01/products/method_move.go +++ b/resource-manager/billing/2020-05-01/products/method_move.go @@ -51,7 +51,6 @@ func (c ProductsClient) Move(ctx context.Context, id ProductId, input TransferPr var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/products/method_update.go b/resource-manager/billing/2020-05-01/products/method_update.go index da92700c464..4ed11031991 100644 --- a/resource-manager/billing/2020-05-01/products/method_update.go +++ b/resource-manager/billing/2020-05-01/products/method_update.go @@ -49,7 +49,6 @@ func (c ProductsClient) Update(ctx context.Context, id ProductId, input Product) var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2020-05-01/products/version.go b/resource-manager/billing/2020-05-01/products/version.go index 69dfe8f8015..4da2358ba0f 100644 --- a/resource-manager/billing/2020-05-01/products/version.go +++ b/resource-manager/billing/2020-05-01/products/version.go @@ -1,12 +1,10 @@ package products -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/products/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/products/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/reservations/README.md b/resource-manager/billing/2020-05-01/reservations/README.md index 831a8bca1ab..c8ea7b2a368 100644 --- a/resource-manager/billing/2020-05-01/reservations/README.md +++ b/resource-manager/billing/2020-05-01/reservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/reservations` Documentation -The `reservations` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `reservations` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/reservations/client.go b/resource-manager/billing/2020-05-01/reservations/client.go index ed9233a2124..1c96bb5d43d 100644 --- a/resource-manager/billing/2020-05-01/reservations/client.go +++ b/resource-manager/billing/2020-05-01/reservations/client.go @@ -15,7 +15,7 @@ type ReservationsClient struct { } func NewReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/reservations/id_billingaccount.go b/resource-manager/billing/2020-05-01/reservations/id_billingaccount.go index 16690630e97..7808e067d6d 100644 --- a/resource-manager/billing/2020-05-01/reservations/id_billingaccount.go +++ b/resource-manager/billing/2020-05-01/reservations/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/reservations/id_billingprofile.go b/resource-manager/billing/2020-05-01/reservations/id_billingprofile.go index 2b9e4e723fd..64f6d9f3890 100644 --- a/resource-manager/billing/2020-05-01/reservations/id_billingprofile.go +++ b/resource-manager/billing/2020-05-01/reservations/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/reservations/method_listbybillingaccount.go b/resource-manager/billing/2020-05-01/reservations/method_listbybillingaccount.go index f4c7f059fb7..60a7ce65eaa 100644 --- a/resource-manager/billing/2020-05-01/reservations/method_listbybillingaccount.go +++ b/resource-manager/billing/2020-05-01/reservations/method_listbybillingaccount.go @@ -42,6 +42,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/reservations/method_listbybillingprofile.go b/resource-manager/billing/2020-05-01/reservations/method_listbybillingprofile.go index 1afeb5e59d2..df1e650721d 100644 --- a/resource-manager/billing/2020-05-01/reservations/method_listbybillingprofile.go +++ b/resource-manager/billing/2020-05-01/reservations/method_listbybillingprofile.go @@ -42,6 +42,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2020-05-01/reservations/version.go b/resource-manager/billing/2020-05-01/reservations/version.go index 8d3d9e72541..2d452a0fba6 100644 --- a/resource-manager/billing/2020-05-01/reservations/version.go +++ b/resource-manager/billing/2020-05-01/reservations/version.go @@ -1,12 +1,10 @@ package reservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservations/2020-05-01" } diff --git a/resource-manager/billing/2020-05-01/transactions/README.md b/resource-manager/billing/2020-05-01/transactions/README.md index 65a1fdea5ed..999b23f9063 100644 --- a/resource-manager/billing/2020-05-01/transactions/README.md +++ b/resource-manager/billing/2020-05-01/transactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/transactions` Documentation -The `transactions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2020-05-01`). +The `transactions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2020-05-01/transactions/client.go b/resource-manager/billing/2020-05-01/transactions/client.go index beac3892e4e..1ce13f03a3d 100644 --- a/resource-manager/billing/2020-05-01/transactions/client.go +++ b/resource-manager/billing/2020-05-01/transactions/client.go @@ -15,7 +15,7 @@ type TransactionsClient struct { } func NewTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransactionsClient: %+v", err) } diff --git a/resource-manager/billing/2020-05-01/transactions/id_billingaccountinvoice.go b/resource-manager/billing/2020-05-01/transactions/id_billingaccountinvoice.go index 77f4d02fdfb..3b628c3192f 100644 --- a/resource-manager/billing/2020-05-01/transactions/id_billingaccountinvoice.go +++ b/resource-manager/billing/2020-05-01/transactions/id_billingaccountinvoice.go @@ -40,7 +40,7 @@ func ParseBillingAccountInvoiceID(input string) (*BillingAccountInvoiceId, error } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountInvoiceIDInsensitively(input string) (*BillingAccountInv } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2020-05-01/transactions/version.go b/resource-manager/billing/2020-05-01/transactions/version.go index 4b77b75a11a..6352569305b 100644 --- a/resource-manager/billing/2020-05-01/transactions/version.go +++ b/resource-manager/billing/2020-05-01/transactions/version.go @@ -1,12 +1,10 @@ package transactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transactions/2020-05-01" } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/README.md b/resource-manager/billing/2021-10-01/billingsubscriptions/README.md index f1d1c42647c..3c725c29c32 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/README.md +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2021-10-01/billingsubscriptions` Documentation -The `billingsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2021-10-01`). +The `billingsubscriptions` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/client.go b/resource-manager/billing/2021-10-01/billingsubscriptions/client.go index fd6e451bb3f..7c146c67251 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/client.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/client.go @@ -15,7 +15,7 @@ type BillingSubscriptionsClient struct { } func NewBillingSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingSubscriptionsClient: %+v", err) } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingaccount.go b/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingaccount.go index 00f46e0f6b8..fd5fb3496d8 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingaccount.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingsubscription.go b/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingsubscription.go index 2eb751bce8a..9c617e5ceba 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingsubscription.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/id_billingsubscription.go @@ -40,7 +40,7 @@ func ParseBillingSubscriptionID(input string) (*BillingSubscriptionId, error) { } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingSubscriptionIDInsensitively(input string) (*BillingSubscription } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/method_billingsubscriptionsvalidatemoveeligibility.go b/resource-manager/billing/2021-10-01/billingsubscriptions/method_billingsubscriptionsvalidatemoveeligibility.go index 2fd885f10d1..cf32c4723a1 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/method_billingsubscriptionsvalidatemoveeligibility.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/method_billingsubscriptionsvalidatemoveeligibility.go @@ -50,7 +50,6 @@ func (c BillingSubscriptionsClient) BillingSubscriptionsValidateMoveEligibility( var model ValidateMoveBillingSubscriptionEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/method_get.go b/resource-manager/billing/2021-10-01/billingsubscriptions/method_get.go index d7b699628c0..d02f183694a 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/method_get.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionsClient) Get(ctx context.Context, id BillingSubscript var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptions/version.go b/resource-manager/billing/2021-10-01/billingsubscriptions/version.go index 725f88916ec..4f494c6e13d 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptions/version.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptions/version.go @@ -1,12 +1,10 @@ package billingsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingsubscriptions/2021-10-01" } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/README.md b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/README.md index b9cce0605a1..8b33ce32670 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/README.md +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2021-10-01/billingsubscriptionsaliases` Documentation -The `billingsubscriptionsaliases` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2021-10-01`). +The `billingsubscriptionsaliases` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/client.go b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/client.go index b15a168b9b7..5ea2afed5e7 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/client.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/client.go @@ -15,7 +15,7 @@ type BillingSubscriptionsAliasesClient struct { } func NewBillingSubscriptionsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingsubscriptionsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingsubscriptionsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingSubscriptionsAliasesClient: %+v", err) } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingaccount.go b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingaccount.go index 557325951c4..eeef719f773 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingaccount.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingsubscriptionalias.go b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingsubscriptionalias.go index d9e3609aee1..5c4f48d3ef3 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingsubscriptionalias.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/id_billingsubscriptionalias.go @@ -40,7 +40,7 @@ func ParseBillingSubscriptionAliasID(input string) (*BillingSubscriptionAliasId, } id := BillingSubscriptionAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingSubscriptionAliasIDInsensitively(input string) (*BillingSubscri } id := BillingSubscriptionAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/method_get.go b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/method_get.go index d0a763229ec..916e3f0447b 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/method_get.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/method_get.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionsAliasesClient) Get(ctx context.Context, id BillingSu var model BillingSubscriptionAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/version.go b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/version.go index 0d7ead684fb..ad5f9e233e5 100644 --- a/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/version.go +++ b/resource-manager/billing/2021-10-01/billingsubscriptionsaliases/version.go @@ -1,12 +1,10 @@ package billingsubscriptionsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingsubscriptionsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingsubscriptionsaliases/2021-10-01" } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/README.md b/resource-manager/billing/2021-10-01/paymentmethods/README.md index 851deb75ff2..d1407c8912d 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/README.md +++ b/resource-manager/billing/2021-10-01/paymentmethods/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2021-10-01/paymentmethods` Documentation -The `paymentmethods` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2021-10-01`). +The `paymentmethods` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2021-10-01/paymentmethods/client.go b/resource-manager/billing/2021-10-01/paymentmethods/client.go index 37553b5fe12..7b9f3505a6b 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/client.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/client.go @@ -15,7 +15,7 @@ type PaymentMethodsClient struct { } func NewPaymentMethodsClientWithBaseURI(sdkApi sdkEnv.Api) (*PaymentMethodsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "paymentmethods", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "paymentmethods", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PaymentMethodsClient: %+v", err) } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccount.go b/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccount.go index a8d58a2d4c0..887816df9a4 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccount.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccountpaymentmethod.go b/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccountpaymentmethod.go index 6163d1cebb0..e451a76b915 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccountpaymentmethod.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/id_billingaccountpaymentmethod.go @@ -40,7 +40,7 @@ func ParseBillingAccountPaymentMethodID(input string) (*BillingAccountPaymentMet } id := BillingAccountPaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountPaymentMethodIDInsensitively(input string) (*BillingAcco } id := BillingAccountPaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/id_billingprofile.go b/resource-manager/billing/2021-10-01/paymentmethods/id_billingprofile.go index 5a4f5944164..ef90831134e 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/id_billingprofile.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethod.go b/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethod.go index d778aaa58d8..82d820d8c41 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethod.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethod.go @@ -38,7 +38,7 @@ func ParsePaymentMethodID(input string) (*PaymentMethodId, error) { } id := PaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePaymentMethodIDInsensitively(input string) (*PaymentMethodId, error) { } id := PaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethodlink.go b/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethodlink.go index 2663f3cfb2e..91d5655081a 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethodlink.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/id_paymentmethodlink.go @@ -42,7 +42,7 @@ func ParsePaymentMethodLinkID(input string) (*PaymentMethodLinkId, error) { } id := PaymentMethodLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePaymentMethodLinkIDInsensitively(input string) (*PaymentMethodLinkId, } id := PaymentMethodLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingaccount.go b/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingaccount.go index bf912c280f9..4309186411f 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingaccount.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByBillingAccount(ctx context.Context, id Billin var model PaymentMethod result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingprofile.go b/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingprofile.go index 53484fb6c84..816a2ebbb99 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingprofile.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByBillingProfile(ctx context.Context, id Paymen var model PaymentMethodLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/method_getbyuser.go b/resource-manager/billing/2021-10-01/paymentmethods/method_getbyuser.go index 29889992b54..11bfd43048e 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/method_getbyuser.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/method_getbyuser.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByUser(ctx context.Context, id PaymentMethodId) var model PaymentMethod result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2021-10-01/paymentmethods/version.go b/resource-manager/billing/2021-10-01/paymentmethods/version.go index 3a97fda83f8..a15066d877f 100644 --- a/resource-manager/billing/2021-10-01/paymentmethods/version.go +++ b/resource-manager/billing/2021-10-01/paymentmethods/version.go @@ -1,12 +1,10 @@ package paymentmethods -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/paymentmethods/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/paymentmethods/2021-10-01" } diff --git a/resource-manager/billing/2024-04-01/agreement/README.md b/resource-manager/billing/2024-04-01/agreement/README.md index e60025f06fe..58d9c14ec3b 100644 --- a/resource-manager/billing/2024-04-01/agreement/README.md +++ b/resource-manager/billing/2024-04-01/agreement/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/agreement` Documentation -The `agreement` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `agreement` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/agreement/client.go b/resource-manager/billing/2024-04-01/agreement/client.go index 60ad4e6bdd1..da497b5f8e9 100644 --- a/resource-manager/billing/2024-04-01/agreement/client.go +++ b/resource-manager/billing/2024-04-01/agreement/client.go @@ -15,7 +15,7 @@ type AgreementClient struct { } func NewAgreementClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreement", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreement", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/agreement/id_agreement.go b/resource-manager/billing/2024-04-01/agreement/id_agreement.go index f73783bd1d5..3e3e8d0c156 100644 --- a/resource-manager/billing/2024-04-01/agreement/id_agreement.go +++ b/resource-manager/billing/2024-04-01/agreement/id_agreement.go @@ -40,7 +40,7 @@ func ParseAgreementID(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/agreement/id_billingaccount.go b/resource-manager/billing/2024-04-01/agreement/id_billingaccount.go index 1221dc88d3e..32310050118 100644 --- a/resource-manager/billing/2024-04-01/agreement/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/agreement/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/agreement/method_get.go b/resource-manager/billing/2024-04-01/agreement/method_get.go index a4dd09b3637..603327e1983 100644 --- a/resource-manager/billing/2024-04-01/agreement/method_get.go +++ b/resource-manager/billing/2024-04-01/agreement/method_get.go @@ -45,7 +45,6 @@ func (c AgreementClient) Get(ctx context.Context, id AgreementId) (result GetOpe var model Agreement result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/agreement/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/agreement/method_listbybillingaccount.go index 3f2887fb50c..3162a1287cd 100644 --- a/resource-manager/billing/2024-04-01/agreement/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/agreement/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/agreement/version.go b/resource-manager/billing/2024-04-01/agreement/version.go index 36bb6f4305f..2b7022c7129 100644 --- a/resource-manager/billing/2024-04-01/agreement/version.go +++ b/resource-manager/billing/2024-04-01/agreement/version.go @@ -1,12 +1,10 @@ package agreement -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreement/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreement/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/README.md b/resource-manager/billing/2024-04-01/associatedtenant/README.md index 704dbaa6fb8..550d474617d 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/README.md +++ b/resource-manager/billing/2024-04-01/associatedtenant/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/associatedtenant` Documentation -The `associatedtenant` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `associatedtenant` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/associatedtenant/client.go b/resource-manager/billing/2024-04-01/associatedtenant/client.go index 3d7b6d71041..2687b6063fe 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/client.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/client.go @@ -15,7 +15,7 @@ type AssociatedTenantClient struct { } func NewAssociatedTenantClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociatedTenantClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "associatedtenant", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "associatedtenant", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssociatedTenantClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/id_associatedtenant.go b/resource-manager/billing/2024-04-01/associatedtenant/id_associatedtenant.go index 53c3fcbc907..d07173e56bd 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/id_associatedtenant.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/id_associatedtenant.go @@ -40,7 +40,7 @@ func ParseAssociatedTenantID(input string) (*AssociatedTenantId, error) { } id := AssociatedTenantId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAssociatedTenantIDInsensitively(input string) (*AssociatedTenantId, er } id := AssociatedTenantId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/id_billingaccount.go b/resource-manager/billing/2024-04-01/associatedtenant/id_billingaccount.go index 6f19f5c1060..cd8b4b4bd56 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/method_get.go b/resource-manager/billing/2024-04-01/associatedtenant/method_get.go index 768f20d16bf..b356adc26fe 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/method_get.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/method_get.go @@ -45,7 +45,6 @@ func (c AssociatedTenantClient) Get(ctx context.Context, id AssociatedTenantId) var model AssociatedTenant result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/associatedtenant/method_listbybillingaccount.go index 19b871de69f..7537934f033 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/method_listbybillingaccount.go @@ -45,6 +45,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/associatedtenant/version.go b/resource-manager/billing/2024-04-01/associatedtenant/version.go index 74743035683..37979a2dd83 100644 --- a/resource-manager/billing/2024-04-01/associatedtenant/version.go +++ b/resource-manager/billing/2024-04-01/associatedtenant/version.go @@ -1,12 +1,10 @@ package associatedtenant -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/associatedtenant/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/associatedtenant/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/availablebalance/README.md b/resource-manager/billing/2024-04-01/availablebalance/README.md index b7c16c40493..3a33c8333ab 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/README.md +++ b/resource-manager/billing/2024-04-01/availablebalance/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/availablebalance` Documentation -The `availablebalance` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `availablebalance` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/availablebalance/client.go b/resource-manager/billing/2024-04-01/availablebalance/client.go index 60d91cc0f2f..ef4adc18780 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/client.go +++ b/resource-manager/billing/2024-04-01/availablebalance/client.go @@ -15,7 +15,7 @@ type AvailableBalanceClient struct { } func NewAvailableBalanceClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableBalanceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availablebalance", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availablebalance", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableBalanceClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/availablebalance/id_billingaccount.go b/resource-manager/billing/2024-04-01/availablebalance/id_billingaccount.go index c147556786c..404ba776949 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/availablebalance/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/availablebalance/id_billingprofile.go b/resource-manager/billing/2024-04-01/availablebalance/id_billingprofile.go index d144a7736fc..601a408ae66 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/availablebalance/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingaccount.go index bb3053dda1c..b7b66666117 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c AvailableBalanceClient) GetByBillingAccount(ctx context.Context, id Bill var model AvailableBalance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingprofile.go b/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingprofile.go index c204207b13e..006ea11a443 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/availablebalance/method_getbybillingprofile.go @@ -46,7 +46,6 @@ func (c AvailableBalanceClient) GetByBillingProfile(ctx context.Context, id Bill var model AvailableBalance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/availablebalance/version.go b/resource-manager/billing/2024-04-01/availablebalance/version.go index dd7ad3ecccb..cfc3c9f9780 100644 --- a/resource-manager/billing/2024-04-01/availablebalance/version.go +++ b/resource-manager/billing/2024-04-01/availablebalance/version.go @@ -1,12 +1,10 @@ package availablebalance -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availablebalance/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availablebalance/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingaccount/README.md b/resource-manager/billing/2024-04-01/billingaccount/README.md index 8274f9942e5..de84e733db9 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/README.md +++ b/resource-manager/billing/2024-04-01/billingaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingaccount` Documentation -The `billingaccount` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingaccount` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingaccount/client.go b/resource-manager/billing/2024-04-01/billingaccount/client.go index 740dfb26965..b4634c4815d 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/client.go +++ b/resource-manager/billing/2024-04-01/billingaccount/client.go @@ -15,7 +15,7 @@ type BillingAccountClient struct { } func NewBillingAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingAccountClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingaccount/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingaccount/id_billingaccount.go index 53855c9d839..a723aa68c66 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingaccount/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_addressvalidate.go b/resource-manager/billing/2024-04-01/billingaccount/method_addressvalidate.go index 336cb190d6e..1a614ca049e 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_addressvalidate.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_addressvalidate.go @@ -49,7 +49,6 @@ func (c BillingAccountClient) AddressValidate(ctx context.Context, input Address var model AddressValidationResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_confirmtransition.go b/resource-manager/billing/2024-04-01/billingaccount/method_confirmtransition.go index 78e69b9eb62..a5a020e7807 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_confirmtransition.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_confirmtransition.go @@ -46,7 +46,6 @@ func (c BillingAccountClient) ConfirmTransition(ctx context.Context, id BillingA var model TransitionDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_get.go b/resource-manager/billing/2024-04-01/billingaccount/method_get.go index ee5c8dd85c2..0ffeb7b5604 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_get.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_get.go @@ -45,7 +45,6 @@ func (c BillingAccountClient) Get(ctx context.Context, id BillingAccountId) (res var model BillingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_list.go b/resource-manager/billing/2024-04-01/billingaccount/method_list.go index ee9ddd169d0..4fb47ed0950 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_list.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_list.go @@ -50,6 +50,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_listinvoicesectionsbycreatesubscriptionpermission.go b/resource-manager/billing/2024-04-01/billingaccount/method_listinvoicesectionsbycreatesubscriptionpermission.go index 0197575c59f..f8740bee0b4 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_listinvoicesectionsbycreatesubscriptionpermission.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_listinvoicesectionsbycreatesubscriptionpermission.go @@ -39,6 +39,7 @@ func (o ListInvoiceSectionsByCreateSubscriptionPermissionOperationOptions) ToHea func (o ListInvoiceSectionsByCreateSubscriptionPermissionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingaccount/method_validatepaymentterms.go b/resource-manager/billing/2024-04-01/billingaccount/method_validatepaymentterms.go index 69f1b96c872..2144ece7689 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/method_validatepaymentterms.go +++ b/resource-manager/billing/2024-04-01/billingaccount/method_validatepaymentterms.go @@ -50,7 +50,6 @@ func (c BillingAccountClient) ValidatePaymentTerms(ctx context.Context, id Billi var model PaymentTermsEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingaccount/version.go b/resource-manager/billing/2024-04-01/billingaccount/version.go index 558a6b3f4d1..9357e427705 100644 --- a/resource-manager/billing/2024-04-01/billingaccount/version.go +++ b/resource-manager/billing/2024-04-01/billingaccount/version.go @@ -1,12 +1,10 @@ package billingaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingaccount/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingpermission/README.md b/resource-manager/billing/2024-04-01/billingpermission/README.md index 41c72a4d593..0cf93f509f1 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/README.md +++ b/resource-manager/billing/2024-04-01/billingpermission/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingpermission` Documentation -The `billingpermission` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingpermission` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingpermission/client.go b/resource-manager/billing/2024-04-01/billingpermission/client.go index 45d51785806..fe305d8307e 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/client.go +++ b/resource-manager/billing/2024-04-01/billingpermission/client.go @@ -15,7 +15,7 @@ type BillingPermissionClient struct { } func NewBillingPermissionClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPermissionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingpermission", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingpermission", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPermissionClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingpermission/id_billingaccount.go index 0839f0ff3e6..cce0d7bdbc8 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingpermission/id_billingprofile.go index 3e0e87a8f55..681c289cf27 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/billingpermission/id_billingprofilecustomer.go index 22c653df1cf..27fe48824ff 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_customer.go b/resource-manager/billing/2024-04-01/billingpermission/id_customer.go index 32043a3ef7d..f6a05e6e6fc 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_customer.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_department.go b/resource-manager/billing/2024-04-01/billingpermission/id_department.go index 05f540e8057..02ab9124cda 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_department.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_enrollmentaccount.go b/resource-manager/billing/2024-04-01/billingpermission/id_enrollmentaccount.go index a27ecec4eff..f320aec1a5a 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_enrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/id_invoicesection.go b/resource-manager/billing/2024-04-01/billingpermission/id_invoicesection.go index 395a27a219b..a31531448c7 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/billingpermission/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingaccount.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingaccount.go index 6a296a812c8..bda6c1ca72e 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingaccount.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByBillingAccount(ctx context.Context var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingprofile.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingprofile.go index 70964d35423..f41111c9851 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbybillingprofile.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByBillingProfile(ctx context.Context var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbycustomer.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbycustomer.go index 1c066a30ac2..e8d7974d9ca 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbycustomer.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByCustomer(ctx context.Context, id B var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbydepartment.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbydepartment.go index fab6e3f7a7f..30c8dcca6ca 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbydepartment.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbydepartment.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByDepartment(ctx context.Context, id var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyenrollmentaccount.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyenrollmentaccount.go index 9efcc362f2a..1eb733427ba 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyenrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyenrollmentaccount.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByEnrollmentAccount(ctx context.Cont var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyinvoicesection.go index ed95e0b8403..05e9a98a1ef 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingpermission/method_checkaccessbyinvoicesection.go @@ -50,7 +50,6 @@ func (c BillingPermissionClient) CheckAccessByInvoiceSection(ctx context.Context var model []CheckAccessResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingpermission/version.go b/resource-manager/billing/2024-04-01/billingpermission/version.go index 75da385095f..5d3c80ef874 100644 --- a/resource-manager/billing/2024-04-01/billingpermission/version.go +++ b/resource-manager/billing/2024-04-01/billingpermission/version.go @@ -1,12 +1,10 @@ package billingpermission -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingpermission/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingpermission/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingprofile/README.md b/resource-manager/billing/2024-04-01/billingprofile/README.md index f74ac4121f5..e7ab035e7f0 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/README.md +++ b/resource-manager/billing/2024-04-01/billingprofile/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingprofile` Documentation -The `billingprofile` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingprofile` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingprofile/client.go b/resource-manager/billing/2024-04-01/billingprofile/client.go index e73864779ab..e3ce64e1ede 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/client.go +++ b/resource-manager/billing/2024-04-01/billingprofile/client.go @@ -15,7 +15,7 @@ type BillingProfileClient struct { } func NewBillingProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingProfileClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingprofile", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingprofile", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingProfileClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingprofile/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingprofile/id_billingaccount.go index 85aa842ab6d..1b15cf17cfd 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingprofile/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingprofile/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingprofile/id_billingprofile.go index 87b18bbfe75..ead89645a72 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingprofile/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingprofile/method_get.go b/resource-manager/billing/2024-04-01/billingprofile/method_get.go index f43fd86fc2c..64c01f7b5bb 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/method_get.go +++ b/resource-manager/billing/2024-04-01/billingprofile/method_get.go @@ -45,7 +45,6 @@ func (c BillingProfileClient) Get(ctx context.Context, id BillingProfileId) (res var model BillingProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingprofile/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/billingprofile/method_listbybillingaccount.go index aa2ae520e16..407a0a29d67 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingprofile/method_listbybillingaccount.go @@ -45,6 +45,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingprofile/method_validatedeleteeligibility.go b/resource-manager/billing/2024-04-01/billingprofile/method_validatedeleteeligibility.go index 67179038ada..d52fddbb6b7 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/method_validatedeleteeligibility.go +++ b/resource-manager/billing/2024-04-01/billingprofile/method_validatedeleteeligibility.go @@ -46,7 +46,6 @@ func (c BillingProfileClient) ValidateDeleteEligibility(ctx context.Context, id var model DeleteBillingProfileEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingprofile/version.go b/resource-manager/billing/2024-04-01/billingprofile/version.go index bcd6775a15f..38098eee4ed 100644 --- a/resource-manager/billing/2024-04-01/billingprofile/version.go +++ b/resource-manager/billing/2024-04-01/billingprofile/version.go @@ -1,12 +1,10 @@ package billingprofile -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingprofile/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingprofile/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingproperty/README.md b/resource-manager/billing/2024-04-01/billingproperty/README.md index 390b8de3588..2e844b0fa95 100644 --- a/resource-manager/billing/2024-04-01/billingproperty/README.md +++ b/resource-manager/billing/2024-04-01/billingproperty/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingproperty` Documentation -The `billingproperty` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingproperty` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingproperty/client.go b/resource-manager/billing/2024-04-01/billingproperty/client.go index 1d1e59d8f4f..318d43ced26 100644 --- a/resource-manager/billing/2024-04-01/billingproperty/client.go +++ b/resource-manager/billing/2024-04-01/billingproperty/client.go @@ -15,7 +15,7 @@ type BillingPropertyClient struct { } func NewBillingPropertyClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingPropertyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingproperty", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingproperty", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingPropertyClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingproperty/method_get.go b/resource-manager/billing/2024-04-01/billingproperty/method_get.go index c1bf39081f4..39e06e7482f 100644 --- a/resource-manager/billing/2024-04-01/billingproperty/method_get.go +++ b/resource-manager/billing/2024-04-01/billingproperty/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BillingPropertyClient) Get(ctx context.Context, id commonids.Subscriptio var model BillingProperty result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingproperty/method_update.go b/resource-manager/billing/2024-04-01/billingproperty/method_update.go index f960e3eb575..58d1b814e9f 100644 --- a/resource-manager/billing/2024-04-01/billingproperty/method_update.go +++ b/resource-manager/billing/2024-04-01/billingproperty/method_update.go @@ -51,7 +51,6 @@ func (c BillingPropertyClient) Update(ctx context.Context, id commonids.Subscrip var model BillingProperty result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingproperty/version.go b/resource-manager/billing/2024-04-01/billingproperty/version.go index 9f96e224c0f..d566cd675a9 100644 --- a/resource-manager/billing/2024-04-01/billingproperty/version.go +++ b/resource-manager/billing/2024-04-01/billingproperty/version.go @@ -1,12 +1,10 @@ package billingproperty -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingproperty/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingproperty/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingrequest/README.md b/resource-manager/billing/2024-04-01/billingrequest/README.md index ed830ab216f..bc67007b574 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/README.md +++ b/resource-manager/billing/2024-04-01/billingrequest/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingrequest` Documentation -The `billingrequest` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingrequest` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingrequest/client.go b/resource-manager/billing/2024-04-01/billingrequest/client.go index 3b130ae6b47..9702a8e3e09 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/client.go +++ b/resource-manager/billing/2024-04-01/billingrequest/client.go @@ -15,7 +15,7 @@ type BillingRequestClient struct { } func NewBillingRequestClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRequestClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingrequest", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingrequest", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRequestClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingrequest/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingrequest/id_billingaccount.go index 030b052d905..b1e5a868311 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingrequest/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingrequest/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingrequest/id_billingprofile.go index 9751f926a49..c95736256dc 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingrequest/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingrequest/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/billingrequest/id_billingprofilecustomer.go index 557d4e61129..0aada35f0c8 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/billingrequest/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingrequest/id_billingrequest.go b/resource-manager/billing/2024-04-01/billingrequest/id_billingrequest.go index 99c8d2128f9..401ba5edec6 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/id_billingrequest.go +++ b/resource-manager/billing/2024-04-01/billingrequest/id_billingrequest.go @@ -38,7 +38,7 @@ func ParseBillingRequestID(input string) (*BillingRequestId, error) { } id := BillingRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingRequestIDInsensitively(input string) (*BillingRequestId, error) } id := BillingRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingrequest/id_invoicesection.go b/resource-manager/billing/2024-04-01/billingrequest/id_invoicesection.go index 439cf7e2f83..486ffd15f16 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/billingrequest/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_get.go b/resource-manager/billing/2024-04-01/billingrequest/method_get.go index 62f92dc5412..f370387bc59 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_get.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_get.go @@ -45,7 +45,6 @@ func (c BillingRequestClient) Get(ctx context.Context, id BillingRequestId) (res var model BillingRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingaccount.go index e06a5676440..5f7fb59780b 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingaccount.go @@ -44,6 +44,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingprofile.go index 32299ce08e7..cb0d896b3c8 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_listbybillingprofile.go @@ -44,6 +44,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_listbycustomer.go b/resource-manager/billing/2024-04-01/billingrequest/method_listbycustomer.go index 435f88feddb..8c7c6932242 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_listbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_listbycustomer.go @@ -44,6 +44,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_listbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingrequest/method_listbyinvoicesection.go index 73f01e8cdba..20a7e2f78c8 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_listbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_listbyinvoicesection.go @@ -44,6 +44,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingrequest/method_listbyuser.go b/resource-manager/billing/2024-04-01/billingrequest/method_listbyuser.go index b3c9ed765de..a6ec9c49479 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/method_listbyuser.go +++ b/resource-manager/billing/2024-04-01/billingrequest/method_listbyuser.go @@ -44,6 +44,7 @@ func (o ListByUserOperationOptions) ToHeaders() *client.Headers { func (o ListByUserOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingrequest/version.go b/resource-manager/billing/2024-04-01/billingrequest/version.go index c915a9d4f56..f2443e65472 100644 --- a/resource-manager/billing/2024-04-01/billingrequest/version.go +++ b/resource-manager/billing/2024-04-01/billingrequest/version.go @@ -1,12 +1,10 @@ package billingrequest -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingrequest/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingrequest/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/README.md b/resource-manager/billing/2024-04-01/billingroleassignment/README.md index 1d0af14c0b9..c92241cb4c8 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/README.md +++ b/resource-manager/billing/2024-04-01/billingroleassignment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingroleassignment` Documentation -The `billingroleassignment` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingroleassignment` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/client.go b/resource-manager/billing/2024-04-01/billingroleassignment/client.go index 98535eada3a..c5205b6f672 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/client.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/client.go @@ -15,7 +15,7 @@ type BillingRoleAssignmentClient struct { } func NewBillingRoleAssignmentClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleAssignmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroleassignment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroleassignment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleAssignmentClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingaccount.go index f0b8d927350..fd1beea16f5 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofile.go index 1cccc52289f..89947866fb6 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilebillingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilebillingroleassignment.go index 22b17c26e57..882a1f4288c 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilebillingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilebillingroleassignment.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleAssignmentID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleAssignmentIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilecustomer.go index f1ded9d1f07..db539b8dbb7 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingroleassignment.go index 05d7f85e2d5..0cdbdbabf3f 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_billingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_billingroleassignment.go @@ -40,7 +40,7 @@ func ParseBillingRoleAssignmentID(input string) (*BillingRoleAssignmentId, error } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleAssignmentIDInsensitively(input string) (*BillingRoleAssign } id := BillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_customerbillingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_customerbillingroleassignment.go index 36cd56310ab..3332e0c0d17 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_customerbillingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_customerbillingroleassignment.go @@ -44,7 +44,7 @@ func ParseCustomerBillingRoleAssignmentID(input string) (*CustomerBillingRoleAss } id := CustomerBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomerBillingRoleAssignmentIDInsensitively(input string) (*CustomerB } id := CustomerBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_department.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_department.go index 0c55c652243..05212cfd21b 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_department.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_departmentbillingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_departmentbillingroleassignment.go index 4659d0c7cae..7748c6d60f9 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_departmentbillingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_departmentbillingroleassignment.go @@ -42,7 +42,7 @@ func ParseDepartmentBillingRoleAssignmentID(input string) (*DepartmentBillingRol } id := DepartmentBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDepartmentBillingRoleAssignmentIDInsensitively(input string) (*Departm } id := DepartmentBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccount.go index f7f0860373c..e672674c896 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccountbillingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccountbillingroleassignment.go index c1501364d30..7e35e6ea88d 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccountbillingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_enrollmentaccountbillingroleassignment.go @@ -42,7 +42,7 @@ func ParseEnrollmentAccountBillingRoleAssignmentID(input string) (*EnrollmentAcc } id := EnrollmentAccountBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnrollmentAccountBillingRoleAssignmentIDInsensitively(input string) (* } id := EnrollmentAccountBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesection.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesection.go index 66f02e21c5b..4dde4ff20ed 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesectionbillingroleassignment.go b/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesectionbillingroleassignment.go index eb28738646d..b3fde5739bc 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesectionbillingroleassignment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/id_invoicesectionbillingroleassignment.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleAssignmentID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleAssignmentIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingaccount.go index 1612661f86b..1ffe9062464 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByBillingAccount(ctx context.Context, id var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingprofile.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingprofile.go index 967d86d9cff..7edc93ec1ed 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByBillingProfile(ctx context.Context, id var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbycustomer.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbycustomer.go index 5a40c050e72..2dcaf159aa0 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbycustomer.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByCustomer(ctx context.Context, id Custo var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbydepartment.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbydepartment.go index a7169ee8d1b..8ef214b78cb 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbydepartment.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbydepartment.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByDepartment(ctx context.Context, id Dep var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyenrollmentaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyenrollmentaccount.go index fffb6b51813..d7fb25296e5 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyenrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyenrollmentaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByEnrollmentAccount(ctx context.Context, var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyinvoicesection.go index b7c9b466188..48359aa1a1e 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleAssignmentClient) GetByInvoiceSection(ctx context.Context, id var model BillingRoleAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingaccount.go index 1957b949b24..fca5ef68655 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingaccount.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingprofile.go index a6ade28708e..d57899916ff 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbybillingprofile.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbycustomer.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbycustomer.go index 2a85b517a71..8647654e330 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbycustomer.go @@ -41,6 +41,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbyinvoicesection.go index dd4ea519b10..159afc18418 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_listbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_listbyinvoicesection.go @@ -41,6 +41,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingaccount.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingaccount.go index 9cda0134e2b..9f4fc310705 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingaccount.go @@ -43,6 +43,7 @@ func (o ResolveByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ResolveByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingprofile.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingprofile.go index 09e7b023a40..4dc56b824b0 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebybillingprofile.go @@ -43,6 +43,7 @@ func (o ResolveByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ResolveByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebycustomer.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebycustomer.go index 1d8ccc75c7f..c13379bd45a 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebycustomer.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebycustomer.go @@ -43,6 +43,7 @@ func (o ResolveByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ResolveByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebyinvoicesection.go b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebyinvoicesection.go index fd22e18c0dd..4406e819c96 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/method_resolvebyinvoicesection.go @@ -43,6 +43,7 @@ func (o ResolveByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ResolveByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingroleassignment/version.go b/resource-manager/billing/2024-04-01/billingroleassignment/version.go index 055d01813e2..e35f7a9491a 100644 --- a/resource-manager/billing/2024-04-01/billingroleassignment/version.go +++ b/resource-manager/billing/2024-04-01/billingroleassignment/version.go @@ -1,12 +1,10 @@ package billingroleassignment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroleassignment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroleassignment/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/README.md b/resource-manager/billing/2024-04-01/billingroledefinition/README.md index 5486812c0f6..534df544a1f 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/README.md +++ b/resource-manager/billing/2024-04-01/billingroledefinition/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingroledefinition` Documentation -The `billingroledefinition` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingroledefinition` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/client.go b/resource-manager/billing/2024-04-01/billingroledefinition/client.go index 67d6b1ebe38..941f572a0a4 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/client.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/client.go @@ -15,7 +15,7 @@ type BillingRoleDefinitionClient struct { } func NewBillingRoleDefinitionClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingRoleDefinitionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingroledefinition", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingroledefinition", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingRoleDefinitionClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingaccount.go index 8526fbced2d..678667e0cc7 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofile.go index 98f59895b49..e36a5b955a1 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilebillingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilebillingroledefinition.go index 9b7c8fcf5f4..ee0073daee0 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilebillingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilebillingroledefinition.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingRoleDefinitionID(input string) (*BillingProfileBi } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingRoleDefinitionIDInsensitively(input string) (*Bil } id := BillingProfileBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilecustomer.go index 89935d44df0..2e1341a89fa 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingroledefinition.go index b129144ea59..434916d6cba 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_billingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_billingroledefinition.go @@ -40,7 +40,7 @@ func ParseBillingRoleDefinitionID(input string) (*BillingRoleDefinitionId, error } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingRoleDefinitionIDInsensitively(input string) (*BillingRoleDefini } id := BillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_customerbillingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_customerbillingroledefinition.go index 6a00f8e84e2..bcb61bd5754 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_customerbillingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_customerbillingroledefinition.go @@ -44,7 +44,7 @@ func ParseCustomerBillingRoleDefinitionID(input string) (*CustomerBillingRoleDef } id := CustomerBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomerBillingRoleDefinitionIDInsensitively(input string) (*CustomerB } id := CustomerBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_department.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_department.go index f8d5a9e0806..6e6bd5ae4fc 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_department.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_departmentbillingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_departmentbillingroledefinition.go index f883f7cbcc8..b57a9398797 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_departmentbillingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_departmentbillingroledefinition.go @@ -42,7 +42,7 @@ func ParseDepartmentBillingRoleDefinitionID(input string) (*DepartmentBillingRol } id := DepartmentBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDepartmentBillingRoleDefinitionIDInsensitively(input string) (*Departm } id := DepartmentBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccount.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccount.go index 171ee357382..e7805132e19 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccountbillingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccountbillingroledefinition.go index 3275d5dca9c..c95292a3ae5 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccountbillingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_enrollmentaccountbillingroledefinition.go @@ -42,7 +42,7 @@ func ParseEnrollmentAccountBillingRoleDefinitionID(input string) (*EnrollmentAcc } id := EnrollmentAccountBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnrollmentAccountBillingRoleDefinitionIDInsensitively(input string) (* } id := EnrollmentAccountBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesection.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesection.go index 8c7db38a65d..92a7f949b55 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesectionbillingroledefinition.go b/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesectionbillingroledefinition.go index dd19dc78f0c..ee738a32cac 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesectionbillingroledefinition.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/id_invoicesectionbillingroledefinition.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionBillingRoleDefinitionID(input string) (*InvoiceSectionBi } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionBillingRoleDefinitionIDInsensitively(input string) (*Inv } id := InvoiceSectionBillingRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingaccount.go index 05abe473d8b..0e042743a21 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByBillingAccount(ctx context.Context, id var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingprofile.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingprofile.go index 5e2194f2829..1a17a53fd50 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByBillingProfile(ctx context.Context, id var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbycustomer.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbycustomer.go index fd263477112..8dad5f7c71c 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbycustomer.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByCustomer(ctx context.Context, id Custo var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbydepartment.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbydepartment.go index 9bfe68c91a3..b25c8f5b554 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbydepartment.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbydepartment.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByDepartment(ctx context.Context, id Dep var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyenrollmentaccount.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyenrollmentaccount.go index 8b787078bf1..d3dc1361bcf 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyenrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyenrollmentaccount.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByEnrollmentAccount(ctx context.Context, var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyinvoicesection.go index 9b3384a285d..1b54e074b9d 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/method_getbyinvoicesection.go @@ -45,7 +45,6 @@ func (c BillingRoleDefinitionClient) GetByInvoiceSection(ctx context.Context, id var model BillingRoleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingroledefinition/version.go b/resource-manager/billing/2024-04-01/billingroledefinition/version.go index 2a84be923d3..7c5b17f8195 100644 --- a/resource-manager/billing/2024-04-01/billingroledefinition/version.go +++ b/resource-manager/billing/2024-04-01/billingroledefinition/version.go @@ -1,12 +1,10 @@ package billingroledefinition -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingroledefinition/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingroledefinition/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/README.md b/resource-manager/billing/2024-04-01/billingsubscription/README.md index b97bc2ae03b..d7dba35ed6c 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/README.md +++ b/resource-manager/billing/2024-04-01/billingsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/billingsubscription` Documentation -The `billingsubscription` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `billingsubscription` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/billingsubscription/client.go b/resource-manager/billing/2024-04-01/billingsubscription/client.go index b5cd54b6704..3f5764225ac 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/client.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/client.go @@ -15,7 +15,7 @@ type BillingSubscriptionClient struct { } func NewBillingSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingsubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingsubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingSubscriptionClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccount.go index 720f1292776..5004b4af35b 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccountbillingsubscription.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccountbillingsubscription.go index 1fb34cc3e86..901bc35dec5 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccountbillingsubscription.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingaccountbillingsubscription.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBill } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*Billi } id := BillingAccountBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofile.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofile.go index 8a148826ad5..0fad96dde98 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilebillingsubscription.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilebillingsubscription.go index 2b255383e3c..8ac065393ed 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilebillingsubscription.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilebillingsubscription.go @@ -42,7 +42,7 @@ func ParseBillingProfileBillingSubscriptionID(input string) (*BillingProfileBill } id := BillingProfileBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileBillingSubscriptionIDInsensitively(input string) (*Billi } id := BillingProfileBillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilecustomer.go index b5558bbde2a..8a35f32f4cd 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_billingsubscriptionalias.go b/resource-manager/billing/2024-04-01/billingsubscription/id_billingsubscriptionalias.go index f49dab63673..ad0cc47c13d 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_billingsubscriptionalias.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_billingsubscriptionalias.go @@ -40,7 +40,7 @@ func ParseBillingSubscriptionAliasID(input string) (*BillingSubscriptionAliasId, } id := BillingSubscriptionAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingSubscriptionAliasIDInsensitively(input string) (*BillingSubscri } id := BillingSubscriptionAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_customer.go b/resource-manager/billing/2024-04-01/billingsubscription/id_customer.go index 39a9b825575..a1e4a2dd6b4 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_customer.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_enrollmentaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/id_enrollmentaccount.go index 25e1747794e..87048e455cf 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_enrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/id_invoicesection.go b/resource-manager/billing/2024-04-01/billingsubscription/id_invoicesection.go index e01d01570b8..b6c71221936 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_aliasesget.go b/resource-manager/billing/2024-04-01/billingsubscription/method_aliasesget.go index fe180b611d0..457f6966fb9 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_aliasesget.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_aliasesget.go @@ -45,7 +45,6 @@ func (c BillingSubscriptionClient) AliasesGet(ctx context.Context, id BillingSub var model BillingSubscriptionAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_aliaseslistbybillingaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/method_aliaseslistbybillingaccount.go index 4886c81a200..7d4aadb9b19 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_aliaseslistbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_aliaseslistbybillingaccount.go @@ -45,6 +45,7 @@ func (o AliasesListByBillingAccountOperationOptions) ToHeaders() *client.Headers func (o AliasesListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_get.go b/resource-manager/billing/2024-04-01/billingsubscription/method_get.go index 69e9ce35d84..074054df583 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_get.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingSubscriptionClient) Get(ctx context.Context, id BillingAccountBil var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_getbybillingprofile.go b/resource-manager/billing/2024-04-01/billingsubscription/method_getbybillingprofile.go index edc943ad1a3..4176ffbd926 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_getbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_getbybillingprofile.go @@ -34,6 +34,7 @@ func (o GetByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c BillingSubscriptionClient) GetByBillingProfile(ctx context.Context, id B var model BillingSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingaccount.go index 54405d466a9..fe3ec46a487 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingaccount.go @@ -48,6 +48,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingprofile.go index 4df8714b21e..2401a5dfc72 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbybillingprofile.go @@ -46,6 +46,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomer.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomer.go index 52e8cdb5d9f..2bcf3d95696 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomer.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomer.go @@ -46,6 +46,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomeratbillingaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomeratbillingaccount.go index 9d46d32b754..d182f0f7d07 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomeratbillingaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbycustomeratbillingaccount.go @@ -46,6 +46,7 @@ func (o ListByCustomerAtBillingAccountOperationOptions) ToHeaders() *client.Head func (o ListByCustomerAtBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbyenrollmentaccount.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbyenrollmentaccount.go index 719d13bdde5..693ca67ca2f 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbyenrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbyenrollmentaccount.go @@ -44,6 +44,7 @@ func (o ListByEnrollmentAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByEnrollmentAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_listbyinvoicesection.go b/resource-manager/billing/2024-04-01/billingsubscription/method_listbyinvoicesection.go index 4e008e51728..6de7911e4b6 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_listbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_listbyinvoicesection.go @@ -46,6 +46,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/method_validatemoveeligibility.go b/resource-manager/billing/2024-04-01/billingsubscription/method_validatemoveeligibility.go index df48e171865..731c06c6ac7 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/method_validatemoveeligibility.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/method_validatemoveeligibility.go @@ -50,7 +50,6 @@ func (c BillingSubscriptionClient) ValidateMoveEligibility(ctx context.Context, var model MoveBillingSubscriptionEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/billingsubscription/version.go b/resource-manager/billing/2024-04-01/billingsubscription/version.go index f29e1b4bdba..29133787950 100644 --- a/resource-manager/billing/2024-04-01/billingsubscription/version.go +++ b/resource-manager/billing/2024-04-01/billingsubscription/version.go @@ -1,12 +1,10 @@ package billingsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingsubscription/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/customer/README.md b/resource-manager/billing/2024-04-01/customer/README.md index 92b44b636f4..f5ebbb2a47c 100644 --- a/resource-manager/billing/2024-04-01/customer/README.md +++ b/resource-manager/billing/2024-04-01/customer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/customer` Documentation -The `customer` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `customer` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/customer/client.go b/resource-manager/billing/2024-04-01/customer/client.go index cba1b340cf5..7ef9a2d9405 100644 --- a/resource-manager/billing/2024-04-01/customer/client.go +++ b/resource-manager/billing/2024-04-01/customer/client.go @@ -15,7 +15,7 @@ type CustomerClient struct { } func NewCustomerClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomerClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/customer/id_billingaccount.go b/resource-manager/billing/2024-04-01/customer/id_billingaccount.go index b1dafb2e136..3aa9519445f 100644 --- a/resource-manager/billing/2024-04-01/customer/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/customer/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/customer/id_billingprofile.go b/resource-manager/billing/2024-04-01/customer/id_billingprofile.go index eaacc66c62c..965a65ad4e1 100644 --- a/resource-manager/billing/2024-04-01/customer/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/customer/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/customer/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/customer/id_billingprofilecustomer.go index c0562cb695e..48e424f9a91 100644 --- a/resource-manager/billing/2024-04-01/customer/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/customer/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/customer/id_customer.go b/resource-manager/billing/2024-04-01/customer/id_customer.go index 2b837a0c988..01ced135b4d 100644 --- a/resource-manager/billing/2024-04-01/customer/id_customer.go +++ b/resource-manager/billing/2024-04-01/customer/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/customer/method_get.go b/resource-manager/billing/2024-04-01/customer/method_get.go index 763a7178192..a3e455c4c28 100644 --- a/resource-manager/billing/2024-04-01/customer/method_get.go +++ b/resource-manager/billing/2024-04-01/customer/method_get.go @@ -45,7 +45,6 @@ func (c CustomerClient) Get(ctx context.Context, id BillingProfileCustomerId) (r var model Customer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/customer/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/customer/method_getbybillingaccount.go index 48c38aebd8b..f713e17c909 100644 --- a/resource-manager/billing/2024-04-01/customer/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/customer/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c CustomerClient) GetByBillingAccount(ctx context.Context, id CustomerId) var model Customer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/customer/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/customer/method_listbybillingaccount.go index c4d6bc61d64..b1781955035 100644 --- a/resource-manager/billing/2024-04-01/customer/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/customer/method_listbybillingaccount.go @@ -45,6 +45,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/customer/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/customer/method_listbybillingprofile.go index 7b31af10f42..542c7c78240 100644 --- a/resource-manager/billing/2024-04-01/customer/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/customer/method_listbybillingprofile.go @@ -45,6 +45,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/customer/version.go b/resource-manager/billing/2024-04-01/customer/version.go index 5c62b4cff87..e737b4f95fe 100644 --- a/resource-manager/billing/2024-04-01/customer/version.go +++ b/resource-manager/billing/2024-04-01/customer/version.go @@ -1,12 +1,10 @@ package customer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customer/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/department/README.md b/resource-manager/billing/2024-04-01/department/README.md index 28524d43bcb..7fdd2611b69 100644 --- a/resource-manager/billing/2024-04-01/department/README.md +++ b/resource-manager/billing/2024-04-01/department/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/department` Documentation -The `department` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `department` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/department/client.go b/resource-manager/billing/2024-04-01/department/client.go index a227443e464..51ada70f171 100644 --- a/resource-manager/billing/2024-04-01/department/client.go +++ b/resource-manager/billing/2024-04-01/department/client.go @@ -15,7 +15,7 @@ type DepartmentClient struct { } func NewDepartmentClientWithBaseURI(sdkApi sdkEnv.Api) (*DepartmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "department", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "department", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DepartmentClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/department/id_billingaccount.go b/resource-manager/billing/2024-04-01/department/id_billingaccount.go index 18a9fe67545..7a14e81564f 100644 --- a/resource-manager/billing/2024-04-01/department/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/department/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/department/id_department.go b/resource-manager/billing/2024-04-01/department/id_department.go index e1a5dc0ed92..a6c4ca1b9bc 100644 --- a/resource-manager/billing/2024-04-01/department/id_department.go +++ b/resource-manager/billing/2024-04-01/department/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/department/method_get.go b/resource-manager/billing/2024-04-01/department/method_get.go index 9d6ba7a3be1..73901b4015d 100644 --- a/resource-manager/billing/2024-04-01/department/method_get.go +++ b/resource-manager/billing/2024-04-01/department/method_get.go @@ -45,7 +45,6 @@ func (c DepartmentClient) Get(ctx context.Context, id DepartmentId) (result GetO var model Department result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/department/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/department/method_listbybillingaccount.go index 5378707ee9e..dc395ed84bf 100644 --- a/resource-manager/billing/2024-04-01/department/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/department/method_listbybillingaccount.go @@ -43,6 +43,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/department/version.go b/resource-manager/billing/2024-04-01/department/version.go index 90c992d4f21..e463cb3238e 100644 --- a/resource-manager/billing/2024-04-01/department/version.go +++ b/resource-manager/billing/2024-04-01/department/version.go @@ -1,12 +1,10 @@ package department -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/department/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/department/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/README.md b/resource-manager/billing/2024-04-01/enrollmentaccount/README.md index 3f8925ecaa0..af9b6254169 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/README.md +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/enrollmentaccount` Documentation -The `enrollmentaccount` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `enrollmentaccount` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/client.go b/resource-manager/billing/2024-04-01/enrollmentaccount/client.go index fe50d9234ec..7078dfcb076 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/client.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/client.go @@ -15,7 +15,7 @@ type EnrollmentAccountClient struct { } func NewEnrollmentAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*EnrollmentAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "enrollmentaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "enrollmentaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnrollmentAccountClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/id_billingaccount.go b/resource-manager/billing/2024-04-01/enrollmentaccount/id_billingaccount.go index 61c9f6d4a7c..c839aa43f1c 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/id_department.go b/resource-manager/billing/2024-04-01/enrollmentaccount/id_department.go index b43136795e1..153145c047e 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/id_department.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/id_department.go @@ -40,7 +40,7 @@ func ParseDepartmentID(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDepartmentIDInsensitively(input string) (*DepartmentId, error) { } id := DepartmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/id_departmentenrollmentaccount.go b/resource-manager/billing/2024-04-01/enrollmentaccount/id_departmentenrollmentaccount.go index 845dd9ed2fe..09964a694a7 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/id_departmentenrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/id_departmentenrollmentaccount.go @@ -42,7 +42,7 @@ func ParseDepartmentEnrollmentAccountID(input string) (*DepartmentEnrollmentAcco } id := DepartmentEnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDepartmentEnrollmentAccountIDInsensitively(input string) (*DepartmentE } id := DepartmentEnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/id_enrollmentaccount.go b/resource-manager/billing/2024-04-01/enrollmentaccount/id_enrollmentaccount.go index 80cf6c84c2c..26de39b70a4 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/id_enrollmentaccount.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/id_enrollmentaccount.go @@ -40,7 +40,7 @@ func ParseEnrollmentAccountID(input string) (*EnrollmentAccountId, error) { } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseEnrollmentAccountIDInsensitively(input string) (*EnrollmentAccountId, } id := EnrollmentAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/method_get.go b/resource-manager/billing/2024-04-01/enrollmentaccount/method_get.go index 4ec0257e0fb..5ce7c2212d8 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/method_get.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/method_get.go @@ -45,7 +45,6 @@ func (c EnrollmentAccountClient) Get(ctx context.Context, id EnrollmentAccountId var model EnrollmentAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/method_getbydepartment.go b/resource-manager/billing/2024-04-01/enrollmentaccount/method_getbydepartment.go index cb12f5a342c..8fcde0a0db0 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/method_getbydepartment.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/method_getbydepartment.go @@ -45,7 +45,6 @@ func (c EnrollmentAccountClient) GetByDepartment(ctx context.Context, id Departm var model EnrollmentAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbybillingaccount.go index 9dd7ef03cbc..468637d5663 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbybillingaccount.go @@ -44,6 +44,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbydepartment.go b/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbydepartment.go index f44352f8dc4..a46068e60ef 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbydepartment.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/method_listbydepartment.go @@ -44,6 +44,7 @@ func (o ListByDepartmentOperationOptions) ToHeaders() *client.Headers { func (o ListByDepartmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/enrollmentaccount/version.go b/resource-manager/billing/2024-04-01/enrollmentaccount/version.go index eba122552d3..f345b9cf3e6 100644 --- a/resource-manager/billing/2024-04-01/enrollmentaccount/version.go +++ b/resource-manager/billing/2024-04-01/enrollmentaccount/version.go @@ -1,12 +1,10 @@ package enrollmentaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/enrollmentaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/enrollmentaccount/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/invoice/README.md b/resource-manager/billing/2024-04-01/invoice/README.md index 6208916a2b0..4be37a15126 100644 --- a/resource-manager/billing/2024-04-01/invoice/README.md +++ b/resource-manager/billing/2024-04-01/invoice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/invoice` Documentation -The `invoice` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `invoice` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/invoice/client.go b/resource-manager/billing/2024-04-01/invoice/client.go index cf3b0b71914..1b9dab1c3d3 100644 --- a/resource-manager/billing/2024-04-01/invoice/client.go +++ b/resource-manager/billing/2024-04-01/invoice/client.go @@ -15,7 +15,7 @@ type InvoiceClient struct { } func NewInvoiceClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoiceClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/invoice/id_billingaccount.go b/resource-manager/billing/2024-04-01/invoice/id_billingaccount.go index e7a3f417461..0ad1a3bab3a 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/invoice/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/id_billingaccountinvoice.go b/resource-manager/billing/2024-04-01/invoice/id_billingaccountinvoice.go index 5cb2fd160e9..ff74f6180ae 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_billingaccountinvoice.go +++ b/resource-manager/billing/2024-04-01/invoice/id_billingaccountinvoice.go @@ -40,7 +40,7 @@ func ParseBillingAccountInvoiceID(input string) (*BillingAccountInvoiceId, error } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountInvoiceIDInsensitively(input string) (*BillingAccountInv } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/id_billingprofile.go b/resource-manager/billing/2024-04-01/invoice/id_billingprofile.go index b76e728fc89..2dc5b8854b4 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/invoice/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/id_billingsubscription.go b/resource-manager/billing/2024-04-01/invoice/id_billingsubscription.go index 21f169cc6cf..20f940a0b1e 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_billingsubscription.go +++ b/resource-manager/billing/2024-04-01/invoice/id_billingsubscription.go @@ -38,7 +38,7 @@ func ParseBillingSubscriptionID(input string) (*BillingSubscriptionId, error) { } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingSubscriptionIDInsensitively(input string) (*BillingSubscription } id := BillingSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/id_billingsubscriptioninvoice.go b/resource-manager/billing/2024-04-01/invoice/id_billingsubscriptioninvoice.go index 6678ff2b0cb..764f9d70a1a 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_billingsubscriptioninvoice.go +++ b/resource-manager/billing/2024-04-01/invoice/id_billingsubscriptioninvoice.go @@ -40,7 +40,7 @@ func ParseBillingSubscriptionInvoiceID(input string) (*BillingSubscriptionInvoic } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingSubscriptionInvoiceIDInsensitively(input string) (*BillingSubsc } id := BillingSubscriptionInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/id_invoice.go b/resource-manager/billing/2024-04-01/invoice/id_invoice.go index 9aee5c2dad4..1041b04403b 100644 --- a/resource-manager/billing/2024-04-01/invoice/id_invoice.go +++ b/resource-manager/billing/2024-04-01/invoice/id_invoice.go @@ -38,7 +38,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingaccount.go b/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingaccount.go index 9e272229b84..82cd105fd81 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingaccount.go @@ -37,6 +37,7 @@ func (o DownloadByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o DownloadByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingsubscription.go b/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingsubscription.go index ca9333a8970..2ff5994382b 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingsubscription.go +++ b/resource-manager/billing/2024-04-01/invoice/method_downloadbybillingsubscription.go @@ -37,6 +37,7 @@ func (o DownloadByBillingSubscriptionOperationOptions) ToHeaders() *client.Heade func (o DownloadByBillingSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoice/method_get.go b/resource-manager/billing/2024-04-01/invoice/method_get.go index 2200402fbf6..3812a5e38df 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_get.go +++ b/resource-manager/billing/2024-04-01/invoice/method_get.go @@ -45,7 +45,6 @@ func (c InvoiceClient) Get(ctx context.Context, id InvoiceId) (result GetOperati var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/invoice/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/invoice/method_getbybillingaccount.go index 172f8b21cf8..13b47328867 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/invoice/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c InvoiceClient) GetByBillingAccount(ctx context.Context, id BillingAccoun var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/invoice/method_getbybillingsubscription.go b/resource-manager/billing/2024-04-01/invoice/method_getbybillingsubscription.go index 146ec42fda1..d1ba4316258 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_getbybillingsubscription.go +++ b/resource-manager/billing/2024-04-01/invoice/method_getbybillingsubscription.go @@ -45,7 +45,6 @@ func (c InvoiceClient) GetByBillingSubscription(ctx context.Context, id BillingS var model Invoice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/invoice/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/invoice/method_listbybillingaccount.go index 844fd940663..5bade7266a2 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/invoice/method_listbybillingaccount.go @@ -46,6 +46,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoice/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/invoice/method_listbybillingprofile.go index e866cbbf8f6..aafd3366ed5 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/invoice/method_listbybillingprofile.go @@ -46,6 +46,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoice/method_listbybillingsubscription.go b/resource-manager/billing/2024-04-01/invoice/method_listbybillingsubscription.go index ef394343d74..b7c022169cf 100644 --- a/resource-manager/billing/2024-04-01/invoice/method_listbybillingsubscription.go +++ b/resource-manager/billing/2024-04-01/invoice/method_listbybillingsubscription.go @@ -46,6 +46,7 @@ func (o ListByBillingSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoice/version.go b/resource-manager/billing/2024-04-01/invoice/version.go index d8280477b42..c1835b04129 100644 --- a/resource-manager/billing/2024-04-01/invoice/version.go +++ b/resource-manager/billing/2024-04-01/invoice/version.go @@ -1,12 +1,10 @@ package invoice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoice/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/invoicesection/README.md b/resource-manager/billing/2024-04-01/invoicesection/README.md index 708710e006c..57c80645d24 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/README.md +++ b/resource-manager/billing/2024-04-01/invoicesection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/invoicesection` Documentation -The `invoicesection` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `invoicesection` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/invoicesection/client.go b/resource-manager/billing/2024-04-01/invoicesection/client.go index 46eec6dc58e..a7a3e8ae96f 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/client.go +++ b/resource-manager/billing/2024-04-01/invoicesection/client.go @@ -15,7 +15,7 @@ type InvoiceSectionClient struct { } func NewInvoiceSectionClientWithBaseURI(sdkApi sdkEnv.Api) (*InvoiceSectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invoicesection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invoicesection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvoiceSectionClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/invoicesection/id_billingprofile.go b/resource-manager/billing/2024-04-01/invoicesection/id_billingprofile.go index 38da7424694..bd9df18640d 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/invoicesection/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoicesection/id_invoicesection.go b/resource-manager/billing/2024-04-01/invoicesection/id_invoicesection.go index f9034a37de5..e73f806f488 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/invoicesection/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/invoicesection/method_get.go b/resource-manager/billing/2024-04-01/invoicesection/method_get.go index 9f3de9c7f9b..9263b3497a6 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/method_get.go +++ b/resource-manager/billing/2024-04-01/invoicesection/method_get.go @@ -45,7 +45,6 @@ func (c InvoiceSectionClient) Get(ctx context.Context, id InvoiceSectionId) (res var model InvoiceSection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/invoicesection/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/invoicesection/method_listbybillingprofile.go index 4efae2cda84..b6c6e599fe2 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/invoicesection/method_listbybillingprofile.go @@ -45,6 +45,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/invoicesection/method_validatedeleteeligibility.go b/resource-manager/billing/2024-04-01/invoicesection/method_validatedeleteeligibility.go index b779e5c61b1..6e562ebeefe 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/method_validatedeleteeligibility.go +++ b/resource-manager/billing/2024-04-01/invoicesection/method_validatedeleteeligibility.go @@ -46,7 +46,6 @@ func (c InvoiceSectionClient) ValidateDeleteEligibility(ctx context.Context, id var model DeleteInvoiceSectionEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/invoicesection/version.go b/resource-manager/billing/2024-04-01/invoicesection/version.go index a6bc6bcb99b..57446a7f51a 100644 --- a/resource-manager/billing/2024-04-01/invoicesection/version.go +++ b/resource-manager/billing/2024-04-01/invoicesection/version.go @@ -1,12 +1,10 @@ package invoicesection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invoicesection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invoicesection/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/README.md b/resource-manager/billing/2024-04-01/paymentmethods/README.md index 18f969b67d1..34b4813ee72 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/README.md +++ b/resource-manager/billing/2024-04-01/paymentmethods/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/paymentmethods` Documentation -The `paymentmethods` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `paymentmethods` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/paymentmethods/client.go b/resource-manager/billing/2024-04-01/paymentmethods/client.go index 37553b5fe12..7b9f3505a6b 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/client.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/client.go @@ -15,7 +15,7 @@ type PaymentMethodsClient struct { } func NewPaymentMethodsClientWithBaseURI(sdkApi sdkEnv.Api) (*PaymentMethodsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "paymentmethods", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "paymentmethods", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PaymentMethodsClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccount.go b/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccount.go index a8d58a2d4c0..887816df9a4 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccountpaymentmethod.go b/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccountpaymentmethod.go index 6163d1cebb0..e451a76b915 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccountpaymentmethod.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/id_billingaccountpaymentmethod.go @@ -40,7 +40,7 @@ func ParseBillingAccountPaymentMethodID(input string) (*BillingAccountPaymentMet } id := BillingAccountPaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountPaymentMethodIDInsensitively(input string) (*BillingAcco } id := BillingAccountPaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/id_billingprofile.go b/resource-manager/billing/2024-04-01/paymentmethods/id_billingprofile.go index 5a4f5944164..ef90831134e 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethod.go b/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethod.go index d778aaa58d8..82d820d8c41 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethod.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethod.go @@ -38,7 +38,7 @@ func ParsePaymentMethodID(input string) (*PaymentMethodId, error) { } id := PaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePaymentMethodIDInsensitively(input string) (*PaymentMethodId, error) { } id := PaymentMethodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethodlink.go b/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethodlink.go index 2663f3cfb2e..91d5655081a 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethodlink.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/id_paymentmethodlink.go @@ -42,7 +42,7 @@ func ParsePaymentMethodLinkID(input string) (*PaymentMethodLinkId, error) { } id := PaymentMethodLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePaymentMethodLinkIDInsensitively(input string) (*PaymentMethodLinkId, } id := PaymentMethodLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingaccount.go index bf912c280f9..4309186411f 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingaccount.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByBillingAccount(ctx context.Context, id Billin var model PaymentMethod result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingprofile.go b/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingprofile.go index 53484fb6c84..816a2ebbb99 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/method_getbybillingprofile.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByBillingProfile(ctx context.Context, id Paymen var model PaymentMethodLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/method_getbyuser.go b/resource-manager/billing/2024-04-01/paymentmethods/method_getbyuser.go index 29889992b54..11bfd43048e 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/method_getbyuser.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/method_getbyuser.go @@ -45,7 +45,6 @@ func (c PaymentMethodsClient) GetByUser(ctx context.Context, id PaymentMethodId) var model PaymentMethod result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/paymentmethods/version.go b/resource-manager/billing/2024-04-01/paymentmethods/version.go index f1e64ad9e93..adc59615b1a 100644 --- a/resource-manager/billing/2024-04-01/paymentmethods/version.go +++ b/resource-manager/billing/2024-04-01/paymentmethods/version.go @@ -1,12 +1,10 @@ package paymentmethods -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/paymentmethods/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/paymentmethods/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/policy/README.md b/resource-manager/billing/2024-04-01/policy/README.md index 467ea322baa..33083630e24 100644 --- a/resource-manager/billing/2024-04-01/policy/README.md +++ b/resource-manager/billing/2024-04-01/policy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/policy` Documentation -The `policy` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `policy` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/policy/client.go b/resource-manager/billing/2024-04-01/policy/client.go index 216d1f1ff33..d95ac216bf6 100644 --- a/resource-manager/billing/2024-04-01/policy/client.go +++ b/resource-manager/billing/2024-04-01/policy/client.go @@ -15,7 +15,7 @@ type PolicyClient struct { } func NewPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/policy/id_billingaccount.go b/resource-manager/billing/2024-04-01/policy/id_billingaccount.go index 7676613346c..bb8ebec5067 100644 --- a/resource-manager/billing/2024-04-01/policy/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/policy/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/policy/id_billingprofile.go b/resource-manager/billing/2024-04-01/policy/id_billingprofile.go index 3d575ace902..0f7c721fec0 100644 --- a/resource-manager/billing/2024-04-01/policy/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/policy/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/policy/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/policy/id_billingprofilecustomer.go index 381db0b8089..110a60bd58c 100644 --- a/resource-manager/billing/2024-04-01/policy/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/policy/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/policy/id_customer.go b/resource-manager/billing/2024-04-01/policy/id_customer.go index 9e747f224ef..c7f7a4cfdbf 100644 --- a/resource-manager/billing/2024-04-01/policy/id_customer.go +++ b/resource-manager/billing/2024-04-01/policy/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingaccount.go b/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingaccount.go index 5840f5304d4..f74162cf3d9 100644 --- a/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingaccount.go @@ -46,7 +46,6 @@ func (c PolicyClient) PoliciesGetByBillingAccount(ctx context.Context, id Billin var model BillingAccountPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingprofile.go b/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingprofile.go index 38ccc9bfcac..9fa609e8555 100644 --- a/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/policy/method_policiesgetbybillingprofile.go @@ -46,7 +46,6 @@ func (c PolicyClient) PoliciesGetByBillingProfile(ctx context.Context, id Billin var model BillingProfilePolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomer.go b/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomer.go index 7e1014c9628..70959f5d62a 100644 --- a/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomer.go +++ b/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomer.go @@ -46,7 +46,6 @@ func (c PolicyClient) PoliciesGetByCustomer(ctx context.Context, id BillingProfi var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomeratbillingaccount.go b/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomeratbillingaccount.go index d0327515454..0a955bb704d 100644 --- a/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomeratbillingaccount.go +++ b/resource-manager/billing/2024-04-01/policy/method_policiesgetbycustomeratbillingaccount.go @@ -46,7 +46,6 @@ func (c PolicyClient) PoliciesGetByCustomerAtBillingAccount(ctx context.Context, var model CustomerPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/policy/method_policiesgetbysubscription.go b/resource-manager/billing/2024-04-01/policy/method_policiesgetbysubscription.go index 67816c481e5..2cd7be5526b 100644 --- a/resource-manager/billing/2024-04-01/policy/method_policiesgetbysubscription.go +++ b/resource-manager/billing/2024-04-01/policy/method_policiesgetbysubscription.go @@ -47,7 +47,6 @@ func (c PolicyClient) PoliciesGetBySubscription(ctx context.Context, id commonid var model SubscriptionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/policy/version.go b/resource-manager/billing/2024-04-01/policy/version.go index 93b8be82486..93b24868305 100644 --- a/resource-manager/billing/2024-04-01/policy/version.go +++ b/resource-manager/billing/2024-04-01/policy/version.go @@ -1,12 +1,10 @@ package policy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policy/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/product/README.md b/resource-manager/billing/2024-04-01/product/README.md index 7d4749f590d..8ace9038d34 100644 --- a/resource-manager/billing/2024-04-01/product/README.md +++ b/resource-manager/billing/2024-04-01/product/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/product` Documentation -The `product` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `product` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/product/client.go b/resource-manager/billing/2024-04-01/product/client.go index 20069da6c20..787eaa28e4f 100644 --- a/resource-manager/billing/2024-04-01/product/client.go +++ b/resource-manager/billing/2024-04-01/product/client.go @@ -15,7 +15,7 @@ type ProductClient struct { } func NewProductClientWithBaseURI(sdkApi sdkEnv.Api) (*ProductClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "product", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "product", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProductClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/product/id_billingaccount.go b/resource-manager/billing/2024-04-01/product/id_billingaccount.go index 66248a80833..2690d4ad2be 100644 --- a/resource-manager/billing/2024-04-01/product/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/product/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/product/id_billingprofile.go b/resource-manager/billing/2024-04-01/product/id_billingprofile.go index 40bf8bde2fd..c814c3f422c 100644 --- a/resource-manager/billing/2024-04-01/product/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/product/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/product/id_customer.go b/resource-manager/billing/2024-04-01/product/id_customer.go index b812e9fb35a..2e0509d0a9b 100644 --- a/resource-manager/billing/2024-04-01/product/id_customer.go +++ b/resource-manager/billing/2024-04-01/product/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/product/id_invoicesection.go b/resource-manager/billing/2024-04-01/product/id_invoicesection.go index 6cb76cba708..014e07a9273 100644 --- a/resource-manager/billing/2024-04-01/product/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/product/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/product/id_product.go b/resource-manager/billing/2024-04-01/product/id_product.go index c62a04bc4ed..1e1de983a7c 100644 --- a/resource-manager/billing/2024-04-01/product/id_product.go +++ b/resource-manager/billing/2024-04-01/product/id_product.go @@ -40,7 +40,7 @@ func ParseProductID(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProductIDInsensitively(input string) (*ProductId, error) { } id := ProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/product/method_get.go b/resource-manager/billing/2024-04-01/product/method_get.go index ce152cbf3cb..b28423e4d85 100644 --- a/resource-manager/billing/2024-04-01/product/method_get.go +++ b/resource-manager/billing/2024-04-01/product/method_get.go @@ -45,7 +45,6 @@ func (c ProductClient) Get(ctx context.Context, id ProductId) (result GetOperati var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/product/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/product/method_listbybillingaccount.go index 4d4f9d8cb67..4558dd06f3b 100644 --- a/resource-manager/billing/2024-04-01/product/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/product/method_listbybillingaccount.go @@ -44,6 +44,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/product/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/product/method_listbybillingprofile.go index d533cdbb05d..88912481d06 100644 --- a/resource-manager/billing/2024-04-01/product/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/product/method_listbybillingprofile.go @@ -44,6 +44,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/product/method_listbycustomer.go b/resource-manager/billing/2024-04-01/product/method_listbycustomer.go index 682701108c3..1463086f8b1 100644 --- a/resource-manager/billing/2024-04-01/product/method_listbycustomer.go +++ b/resource-manager/billing/2024-04-01/product/method_listbycustomer.go @@ -44,6 +44,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/product/method_listbyinvoicesection.go b/resource-manager/billing/2024-04-01/product/method_listbyinvoicesection.go index 3c23f2dcdc2..3f76c269fbb 100644 --- a/resource-manager/billing/2024-04-01/product/method_listbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/product/method_listbyinvoicesection.go @@ -44,6 +44,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/product/method_update.go b/resource-manager/billing/2024-04-01/product/method_update.go index b69415d9729..46329659dc0 100644 --- a/resource-manager/billing/2024-04-01/product/method_update.go +++ b/resource-manager/billing/2024-04-01/product/method_update.go @@ -49,7 +49,6 @@ func (c ProductClient) Update(ctx context.Context, id ProductId, input ProductPa var model Product result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/product/method_validatemoveeligibility.go b/resource-manager/billing/2024-04-01/product/method_validatemoveeligibility.go index fe2430e3f1a..f52f69d70ec 100644 --- a/resource-manager/billing/2024-04-01/product/method_validatemoveeligibility.go +++ b/resource-manager/billing/2024-04-01/product/method_validatemoveeligibility.go @@ -50,7 +50,6 @@ func (c ProductClient) ValidateMoveEligibility(ctx context.Context, id ProductId var model MoveProductEligibilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/product/version.go b/resource-manager/billing/2024-04-01/product/version.go index d1179c7b301..74b26cde553 100644 --- a/resource-manager/billing/2024-04-01/product/version.go +++ b/resource-manager/billing/2024-04-01/product/version.go @@ -1,12 +1,10 @@ package product -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/product/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/product/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/README.md b/resource-manager/billing/2024-04-01/recipienttransfers/README.md index e559f958c57..1a7cc7158bc 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/README.md +++ b/resource-manager/billing/2024-04-01/recipienttransfers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/recipienttransfers` Documentation -The `recipienttransfers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `recipienttransfers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/client.go b/resource-manager/billing/2024-04-01/recipienttransfers/client.go index b3c6368700d..fbe938298fe 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/client.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/client.go @@ -15,7 +15,7 @@ type RecipientTransfersClient struct { } func NewRecipientTransfersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecipientTransfersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recipienttransfers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recipienttransfers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecipientTransfersClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/id_transfer.go b/resource-manager/billing/2024-04-01/recipienttransfers/id_transfer.go index 28ac8f6ec16..bba4850c6a2 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/id_transfer.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/id_transfer.go @@ -38,7 +38,7 @@ func ParseTransferID(input string) (*TransferId, error) { } id := TransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseTransferIDInsensitively(input string) (*TransferId, error) { } id := TransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/method_accept.go b/resource-manager/billing/2024-04-01/recipienttransfers/method_accept.go index abcd8085fe9..d42354f0828 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/method_accept.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/method_accept.go @@ -50,7 +50,6 @@ func (c RecipientTransfersClient) Accept(ctx context.Context, id TransferId, inp var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/method_decline.go b/resource-manager/billing/2024-04-01/recipienttransfers/method_decline.go index 8caac5cae9d..dcc67130591 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/method_decline.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/method_decline.go @@ -46,7 +46,6 @@ func (c RecipientTransfersClient) Decline(ctx context.Context, id TransferId) (r var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/method_get.go b/resource-manager/billing/2024-04-01/recipienttransfers/method_get.go index adf005d5b07..c4ae648dbd4 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/method_get.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/method_get.go @@ -45,7 +45,6 @@ func (c RecipientTransfersClient) Get(ctx context.Context, id TransferId) (resul var model RecipientTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/method_validate.go b/resource-manager/billing/2024-04-01/recipienttransfers/method_validate.go index 368a0eb52c3..a49b95771ec 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/method_validate.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/method_validate.go @@ -50,7 +50,6 @@ func (c RecipientTransfersClient) Validate(ctx context.Context, id TransferId, i var model ValidateTransferListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/recipienttransfers/version.go b/resource-manager/billing/2024-04-01/recipienttransfers/version.go index 443b8e3f116..b30274df448 100644 --- a/resource-manager/billing/2024-04-01/recipienttransfers/version.go +++ b/resource-manager/billing/2024-04-01/recipienttransfers/version.go @@ -1,12 +1,10 @@ package recipienttransfers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recipienttransfers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recipienttransfers/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/reservation/README.md b/resource-manager/billing/2024-04-01/reservation/README.md index e8c0740dfaa..1a9a53871f0 100644 --- a/resource-manager/billing/2024-04-01/reservation/README.md +++ b/resource-manager/billing/2024-04-01/reservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/reservation` Documentation -The `reservation` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `reservation` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/reservation/client.go b/resource-manager/billing/2024-04-01/reservation/client.go index 7bb224784f5..0186bd54d4b 100644 --- a/resource-manager/billing/2024-04-01/reservation/client.go +++ b/resource-manager/billing/2024-04-01/reservation/client.go @@ -15,7 +15,7 @@ type ReservationClient struct { } func NewReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/reservation/id_reservation.go b/resource-manager/billing/2024-04-01/reservation/id_reservation.go index 3a5561c9085..aab1921ba8f 100644 --- a/resource-manager/billing/2024-04-01/reservation/id_reservation.go +++ b/resource-manager/billing/2024-04-01/reservation/id_reservation.go @@ -42,7 +42,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservation/method_getbyreservationorder.go b/resource-manager/billing/2024-04-01/reservation/method_getbyreservationorder.go index 6f27d4f8bd4..88a9a7b03ce 100644 --- a/resource-manager/billing/2024-04-01/reservation/method_getbyreservationorder.go +++ b/resource-manager/billing/2024-04-01/reservation/method_getbyreservationorder.go @@ -34,6 +34,7 @@ func (o GetByReservationOrderOperationOptions) ToHeaders() *client.Headers { func (o GetByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReservationClient) GetByReservationOrder(ctx context.Context, id Reserva var model Reservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/reservation/version.go b/resource-manager/billing/2024-04-01/reservation/version.go index 414edb729cc..6542a40a5ba 100644 --- a/resource-manager/billing/2024-04-01/reservation/version.go +++ b/resource-manager/billing/2024-04-01/reservation/version.go @@ -1,12 +1,10 @@ package reservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservation/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/reservationorder/README.md b/resource-manager/billing/2024-04-01/reservationorder/README.md index c4bb8f782f5..d35a9b60242 100644 --- a/resource-manager/billing/2024-04-01/reservationorder/README.md +++ b/resource-manager/billing/2024-04-01/reservationorder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/reservationorder` Documentation -The `reservationorder` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `reservationorder` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/reservationorder/client.go b/resource-manager/billing/2024-04-01/reservationorder/client.go index 1be5e05ac73..5c51c53ef40 100644 --- a/resource-manager/billing/2024-04-01/reservationorder/client.go +++ b/resource-manager/billing/2024-04-01/reservationorder/client.go @@ -15,7 +15,7 @@ type ReservationOrderClient struct { } func NewReservationOrderClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationOrderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationorder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationorder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationOrderClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/reservationorder/id_reservationorder.go b/resource-manager/billing/2024-04-01/reservationorder/id_reservationorder.go index 3556b278bc4..c7b460314b6 100644 --- a/resource-manager/billing/2024-04-01/reservationorder/id_reservationorder.go +++ b/resource-manager/billing/2024-04-01/reservationorder/id_reservationorder.go @@ -40,7 +40,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservationorder/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/reservationorder/method_getbybillingaccount.go index ae629481a3a..3297da07c42 100644 --- a/resource-manager/billing/2024-04-01/reservationorder/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/reservationorder/method_getbybillingaccount.go @@ -34,6 +34,7 @@ func (o GetByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReservationOrderClient) GetByBillingAccount(ctx context.Context, id Rese var model ReservationOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/reservationorder/version.go b/resource-manager/billing/2024-04-01/reservationorder/version.go index 9d3cb3f664d..aa30c5b7d4a 100644 --- a/resource-manager/billing/2024-04-01/reservationorder/version.go +++ b/resource-manager/billing/2024-04-01/reservationorder/version.go @@ -1,12 +1,10 @@ package reservationorder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationorder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationorder/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/reservationorders/README.md b/resource-manager/billing/2024-04-01/reservationorders/README.md index 1c6d833eb22..eb8b722d8cd 100644 --- a/resource-manager/billing/2024-04-01/reservationorders/README.md +++ b/resource-manager/billing/2024-04-01/reservationorders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/reservationorders` Documentation -The `reservationorders` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `reservationorders` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/reservationorders/client.go b/resource-manager/billing/2024-04-01/reservationorders/client.go index e7409a3236b..a805093e4f0 100644 --- a/resource-manager/billing/2024-04-01/reservationorders/client.go +++ b/resource-manager/billing/2024-04-01/reservationorders/client.go @@ -15,7 +15,7 @@ type ReservationOrdersClient struct { } func NewReservationOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationOrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationorders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationorders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationOrdersClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/reservationorders/id_billingaccount.go b/resource-manager/billing/2024-04-01/reservationorders/id_billingaccount.go index 2a00ef26f97..d7d0fa76ef3 100644 --- a/resource-manager/billing/2024-04-01/reservationorders/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/reservationorders/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservationorders/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/reservationorders/method_listbybillingaccount.go index 033a4ff968d..7b7d8b60021 100644 --- a/resource-manager/billing/2024-04-01/reservationorders/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/reservationorders/method_listbybillingaccount.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/reservationorders/version.go b/resource-manager/billing/2024-04-01/reservationorders/version.go index 17b0bbdf6f1..50a9adef752 100644 --- a/resource-manager/billing/2024-04-01/reservationorders/version.go +++ b/resource-manager/billing/2024-04-01/reservationorders/version.go @@ -1,12 +1,10 @@ package reservationorders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationorders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationorders/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/reservations/README.md b/resource-manager/billing/2024-04-01/reservations/README.md index 9a5e4df90d9..c6c8a488d2b 100644 --- a/resource-manager/billing/2024-04-01/reservations/README.md +++ b/resource-manager/billing/2024-04-01/reservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/reservations` Documentation -The `reservations` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `reservations` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/reservations/client.go b/resource-manager/billing/2024-04-01/reservations/client.go index ed9233a2124..1c96bb5d43d 100644 --- a/resource-manager/billing/2024-04-01/reservations/client.go +++ b/resource-manager/billing/2024-04-01/reservations/client.go @@ -15,7 +15,7 @@ type ReservationsClient struct { } func NewReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationsClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/reservations/id_billingaccount.go b/resource-manager/billing/2024-04-01/reservations/id_billingaccount.go index 16690630e97..7808e067d6d 100644 --- a/resource-manager/billing/2024-04-01/reservations/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/reservations/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservations/id_billingprofile.go b/resource-manager/billing/2024-04-01/reservations/id_billingprofile.go index 2b9e4e723fd..64f6d9f3890 100644 --- a/resource-manager/billing/2024-04-01/reservations/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/reservations/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservations/id_reservationorder.go b/resource-manager/billing/2024-04-01/reservations/id_reservationorder.go index d03642d9614..be37abe482d 100644 --- a/resource-manager/billing/2024-04-01/reservations/id_reservationorder.go +++ b/resource-manager/billing/2024-04-01/reservations/id_reservationorder.go @@ -40,7 +40,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/reservations/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/reservations/method_listbybillingaccount.go index 867994a1f0b..491d54ca6f1 100644 --- a/resource-manager/billing/2024-04-01/reservations/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/reservations/method_listbybillingaccount.go @@ -44,6 +44,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/reservations/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/reservations/method_listbybillingprofile.go index 00581028d87..049552cdcd6 100644 --- a/resource-manager/billing/2024-04-01/reservations/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/reservations/method_listbybillingprofile.go @@ -44,6 +44,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/reservations/version.go b/resource-manager/billing/2024-04-01/reservations/version.go index 17b341fed2d..bfaeb5c3799 100644 --- a/resource-manager/billing/2024-04-01/reservations/version.go +++ b/resource-manager/billing/2024-04-01/reservations/version.go @@ -1,12 +1,10 @@ package reservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservations/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/savingsplan/README.md b/resource-manager/billing/2024-04-01/savingsplan/README.md index 2242201e627..6cbf8aaa5e7 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/README.md +++ b/resource-manager/billing/2024-04-01/savingsplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/savingsplan` Documentation -The `savingsplan` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `savingsplan` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/savingsplan/client.go b/resource-manager/billing/2024-04-01/savingsplan/client.go index eea5cfcfa8e..2775fc4ed32 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/client.go +++ b/resource-manager/billing/2024-04-01/savingsplan/client.go @@ -15,7 +15,7 @@ type SavingsPlanClient struct { } func NewSavingsPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*SavingsPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "savingsplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "savingsplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SavingsPlanClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/savingsplan/id_billingaccount.go b/resource-manager/billing/2024-04-01/savingsplan/id_billingaccount.go index 27c83b56ece..40bc2e0c246 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplan/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/savingsplan/id_savingsplan.go b/resource-manager/billing/2024-04-01/savingsplan/id_savingsplan.go index cfa4e2ed05f..032f75b3ae2 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/id_savingsplan.go +++ b/resource-manager/billing/2024-04-01/savingsplan/id_savingsplan.go @@ -42,7 +42,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/savingsplan/id_savingsplanorder.go b/resource-manager/billing/2024-04-01/savingsplan/id_savingsplanorder.go index 5894d009607..8023ce5e8b9 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/id_savingsplanorder.go +++ b/resource-manager/billing/2024-04-01/savingsplan/id_savingsplanorder.go @@ -40,7 +40,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/savingsplan/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/savingsplan/method_getbybillingaccount.go index 1b65ad8246d..2416f5260ec 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplan/method_getbybillingaccount.go @@ -34,6 +34,7 @@ func (o GetByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SavingsPlanClient) GetByBillingAccount(ctx context.Context, id SavingsPl var model SavingsPlanModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/savingsplan/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/savingsplan/method_listbybillingaccount.go index 9bc34b438e9..17598f29569 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplan/method_listbybillingaccount.go @@ -44,6 +44,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/savingsplan/method_validateupdatebybillingaccount.go b/resource-manager/billing/2024-04-01/savingsplan/method_validateupdatebybillingaccount.go index 8018798d5a0..17af5db6b24 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/method_validateupdatebybillingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplan/method_validateupdatebybillingaccount.go @@ -50,7 +50,6 @@ func (c SavingsPlanClient) ValidateUpdateByBillingAccount(ctx context.Context, i var model SavingsPlanValidateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/savingsplan/version.go b/resource-manager/billing/2024-04-01/savingsplan/version.go index 2298b1a84af..9cdf731eee3 100644 --- a/resource-manager/billing/2024-04-01/savingsplan/version.go +++ b/resource-manager/billing/2024-04-01/savingsplan/version.go @@ -1,12 +1,10 @@ package savingsplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/savingsplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/savingsplan/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/README.md b/resource-manager/billing/2024-04-01/savingsplanorder/README.md index 4dd57b65336..3e3ea610cba 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/README.md +++ b/resource-manager/billing/2024-04-01/savingsplanorder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/savingsplanorder` Documentation -The `savingsplanorder` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `savingsplanorder` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/client.go b/resource-manager/billing/2024-04-01/savingsplanorder/client.go index e29a10d0639..a3a90bbf1d9 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/client.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/client.go @@ -15,7 +15,7 @@ type SavingsPlanOrderClient struct { } func NewSavingsPlanOrderClientWithBaseURI(sdkApi sdkEnv.Api) (*SavingsPlanOrderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "savingsplanorder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "savingsplanorder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SavingsPlanOrderClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/id_billingaccount.go b/resource-manager/billing/2024-04-01/savingsplanorder/id_billingaccount.go index 6a33eb59c10..e8b79471529 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/id_billingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/id_savingsplanorder.go b/resource-manager/billing/2024-04-01/savingsplanorder/id_savingsplanorder.go index 6bd560c5a96..8b5b80b8af4 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/id_savingsplanorder.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/id_savingsplanorder.go @@ -40,7 +40,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/method_getbybillingaccount.go b/resource-manager/billing/2024-04-01/savingsplanorder/method_getbybillingaccount.go index 6f628106538..c63ab671e0d 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/method_getbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/method_getbybillingaccount.go @@ -34,6 +34,7 @@ func (o GetByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SavingsPlanOrderClient) GetByBillingAccount(ctx context.Context, id Savi var model SavingsPlanOrderModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/method_listbybillingaccount.go b/resource-manager/billing/2024-04-01/savingsplanorder/method_listbybillingaccount.go index f6689b321fe..c4912418617 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/method_listbybillingaccount.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/method_listbybillingaccount.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/savingsplanorder/version.go b/resource-manager/billing/2024-04-01/savingsplanorder/version.go index d3b7227182f..492b17f5f51 100644 --- a/resource-manager/billing/2024-04-01/savingsplanorder/version.go +++ b/resource-manager/billing/2024-04-01/savingsplanorder/version.go @@ -1,12 +1,10 @@ package savingsplanorder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/savingsplanorder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/savingsplanorder/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/transaction/README.md b/resource-manager/billing/2024-04-01/transaction/README.md index 0bb133bdbe3..b14c949e37b 100644 --- a/resource-manager/billing/2024-04-01/transaction/README.md +++ b/resource-manager/billing/2024-04-01/transaction/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/transaction` Documentation -The `transaction` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `transaction` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/transaction/client.go b/resource-manager/billing/2024-04-01/transaction/client.go index a526f23cc6c..408a2ebb7c8 100644 --- a/resource-manager/billing/2024-04-01/transaction/client.go +++ b/resource-manager/billing/2024-04-01/transaction/client.go @@ -15,7 +15,7 @@ type TransactionClient struct { } func NewTransactionClientWithBaseURI(sdkApi sdkEnv.Api) (*TransactionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transaction", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transaction", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransactionClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/transaction/id_billingaccountinvoice.go b/resource-manager/billing/2024-04-01/transaction/id_billingaccountinvoice.go index 057d5f6942f..8c9334407a3 100644 --- a/resource-manager/billing/2024-04-01/transaction/id_billingaccountinvoice.go +++ b/resource-manager/billing/2024-04-01/transaction/id_billingaccountinvoice.go @@ -40,7 +40,7 @@ func ParseBillingAccountInvoiceID(input string) (*BillingAccountInvoiceId, error } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountInvoiceIDInsensitively(input string) (*BillingAccountInv } id := BillingAccountInvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transaction/id_billingprofile.go b/resource-manager/billing/2024-04-01/transaction/id_billingprofile.go index 7ef60322bf4..87c6b9337dd 100644 --- a/resource-manager/billing/2024-04-01/transaction/id_billingprofile.go +++ b/resource-manager/billing/2024-04-01/transaction/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transaction/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/transaction/id_billingprofilecustomer.go index c0a7d3d62e7..89e4654d2ad 100644 --- a/resource-manager/billing/2024-04-01/transaction/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/transaction/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transaction/id_invoicesection.go b/resource-manager/billing/2024-04-01/transaction/id_invoicesection.go index e63220ca5ba..dd557b1aa92 100644 --- a/resource-manager/billing/2024-04-01/transaction/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/transaction/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transaction/method_gettransactionsummarybyinvoice.go b/resource-manager/billing/2024-04-01/transaction/method_gettransactionsummarybyinvoice.go index cd2e2e81317..c6c9840654f 100644 --- a/resource-manager/billing/2024-04-01/transaction/method_gettransactionsummarybyinvoice.go +++ b/resource-manager/billing/2024-04-01/transaction/method_gettransactionsummarybyinvoice.go @@ -35,6 +35,7 @@ func (o GetTransactionSummaryByInvoiceOperationOptions) ToHeaders() *client.Head func (o GetTransactionSummaryByInvoiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TransactionClient) GetTransactionSummaryByInvoice(ctx context.Context, i var model TransactionSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transaction/method_listbybillingprofile.go b/resource-manager/billing/2024-04-01/transaction/method_listbybillingprofile.go index cee818c46fc..47b11855fb9 100644 --- a/resource-manager/billing/2024-04-01/transaction/method_listbybillingprofile.go +++ b/resource-manager/billing/2024-04-01/transaction/method_listbybillingprofile.go @@ -47,6 +47,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/transaction/method_listbycustomer.go b/resource-manager/billing/2024-04-01/transaction/method_listbycustomer.go index eaac68a0f06..58bb9839c9d 100644 --- a/resource-manager/billing/2024-04-01/transaction/method_listbycustomer.go +++ b/resource-manager/billing/2024-04-01/transaction/method_listbycustomer.go @@ -47,6 +47,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/transaction/method_listbyinvoice.go b/resource-manager/billing/2024-04-01/transaction/method_listbyinvoice.go index 8ed24307f68..1b4a84a579d 100644 --- a/resource-manager/billing/2024-04-01/transaction/method_listbyinvoice.go +++ b/resource-manager/billing/2024-04-01/transaction/method_listbyinvoice.go @@ -44,6 +44,7 @@ func (o ListByInvoiceOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/transaction/method_listbyinvoicesection.go b/resource-manager/billing/2024-04-01/transaction/method_listbyinvoicesection.go index c2ed4686652..2a08fa011bd 100644 --- a/resource-manager/billing/2024-04-01/transaction/method_listbyinvoicesection.go +++ b/resource-manager/billing/2024-04-01/transaction/method_listbyinvoicesection.go @@ -47,6 +47,7 @@ func (o ListByInvoiceSectionOperationOptions) ToHeaders() *client.Headers { func (o ListByInvoiceSectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/billing/2024-04-01/transaction/version.go b/resource-manager/billing/2024-04-01/transaction/version.go index f221aa9783f..0e5942e6666 100644 --- a/resource-manager/billing/2024-04-01/transaction/version.go +++ b/resource-manager/billing/2024-04-01/transaction/version.go @@ -1,12 +1,10 @@ package transaction -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transaction/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transaction/2024-04-01" } diff --git a/resource-manager/billing/2024-04-01/transfers/README.md b/resource-manager/billing/2024-04-01/transfers/README.md index 336788e6a05..64effef59cc 100644 --- a/resource-manager/billing/2024-04-01/transfers/README.md +++ b/resource-manager/billing/2024-04-01/transfers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/transfers` Documentation -The `transfers` SDK allows for interaction with the Azure Resource Manager Service `billing` (API Version `2024-04-01`). +The `transfers` SDK allows for interaction with Azure Resource Manager `billing` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/billing/2024-04-01/transfers/client.go b/resource-manager/billing/2024-04-01/transfers/client.go index 48bc0377518..f503761d153 100644 --- a/resource-manager/billing/2024-04-01/transfers/client.go +++ b/resource-manager/billing/2024-04-01/transfers/client.go @@ -15,7 +15,7 @@ type TransfersClient struct { } func NewTransfersClientWithBaseURI(sdkApi sdkEnv.Api) (*TransfersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transfers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transfers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransfersClient: %+v", err) } diff --git a/resource-manager/billing/2024-04-01/transfers/id_billingprofilecustomer.go b/resource-manager/billing/2024-04-01/transfers/id_billingprofilecustomer.go index 52fae92834b..26c0d4419d1 100644 --- a/resource-manager/billing/2024-04-01/transfers/id_billingprofilecustomer.go +++ b/resource-manager/billing/2024-04-01/transfers/id_billingprofilecustomer.go @@ -42,7 +42,7 @@ func ParseBillingProfileCustomerID(input string) (*BillingProfileCustomerId, err } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBillingProfileCustomerIDInsensitively(input string) (*BillingProfileCu } id := BillingProfileCustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transfers/id_customertransfer.go b/resource-manager/billing/2024-04-01/transfers/id_customertransfer.go index 6bf0e839e4a..483aac22e6f 100644 --- a/resource-manager/billing/2024-04-01/transfers/id_customertransfer.go +++ b/resource-manager/billing/2024-04-01/transfers/id_customertransfer.go @@ -44,7 +44,7 @@ func ParseCustomerTransferID(input string) (*CustomerTransferId, error) { } id := CustomerTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomerTransferIDInsensitively(input string) (*CustomerTransferId, er } id := CustomerTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transfers/id_invoicesection.go b/resource-manager/billing/2024-04-01/transfers/id_invoicesection.go index 18143d8848f..403872bd19c 100644 --- a/resource-manager/billing/2024-04-01/transfers/id_invoicesection.go +++ b/resource-manager/billing/2024-04-01/transfers/id_invoicesection.go @@ -42,7 +42,7 @@ func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error) { } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error) } id := InvoiceSectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transfers/id_invoicesectiontransfer.go b/resource-manager/billing/2024-04-01/transfers/id_invoicesectiontransfer.go index bffefb07478..79276786f08 100644 --- a/resource-manager/billing/2024-04-01/transfers/id_invoicesectiontransfer.go +++ b/resource-manager/billing/2024-04-01/transfers/id_invoicesectiontransfer.go @@ -44,7 +44,7 @@ func ParseInvoiceSectionTransferID(input string) (*InvoiceSectionTransferId, err } id := InvoiceSectionTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInvoiceSectionTransferIDInsensitively(input string) (*InvoiceSectionTr } id := InvoiceSectionTransferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/billing/2024-04-01/transfers/method_cancel.go b/resource-manager/billing/2024-04-01/transfers/method_cancel.go index 48ec790aa87..b43127853ad 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_cancel.go +++ b/resource-manager/billing/2024-04-01/transfers/method_cancel.go @@ -46,7 +46,6 @@ func (c TransfersClient) Cancel(ctx context.Context, id InvoiceSectionTransferId var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/method_get.go b/resource-manager/billing/2024-04-01/transfers/method_get.go index 41bbf59d2d2..8407dd64979 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_get.go +++ b/resource-manager/billing/2024-04-01/transfers/method_get.go @@ -45,7 +45,6 @@ func (c TransfersClient) Get(ctx context.Context, id InvoiceSectionTransferId) ( var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/method_initiate.go b/resource-manager/billing/2024-04-01/transfers/method_initiate.go index c8aa130f596..9233327ac96 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_initiate.go +++ b/resource-manager/billing/2024-04-01/transfers/method_initiate.go @@ -50,7 +50,6 @@ func (c TransfersClient) Initiate(ctx context.Context, id InvoiceSectionTransfer var model TransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/method_partnertransferscancel.go b/resource-manager/billing/2024-04-01/transfers/method_partnertransferscancel.go index 80555a6924b..c1c9ba91f7f 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_partnertransferscancel.go +++ b/resource-manager/billing/2024-04-01/transfers/method_partnertransferscancel.go @@ -46,7 +46,6 @@ func (c TransfersClient) PartnerTransfersCancel(ctx context.Context, id Customer var model PartnerTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/method_partnertransfersget.go b/resource-manager/billing/2024-04-01/transfers/method_partnertransfersget.go index 48fa0291f54..eb413a2d812 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_partnertransfersget.go +++ b/resource-manager/billing/2024-04-01/transfers/method_partnertransfersget.go @@ -45,7 +45,6 @@ func (c TransfersClient) PartnerTransfersGet(ctx context.Context, id CustomerTra var model PartnerTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/method_partnertransfersinitiate.go b/resource-manager/billing/2024-04-01/transfers/method_partnertransfersinitiate.go index 3d1fc426826..f8aa30226ad 100644 --- a/resource-manager/billing/2024-04-01/transfers/method_partnertransfersinitiate.go +++ b/resource-manager/billing/2024-04-01/transfers/method_partnertransfersinitiate.go @@ -50,7 +50,6 @@ func (c TransfersClient) PartnerTransfersInitiate(ctx context.Context, id Custom var model PartnerTransferDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/billing/2024-04-01/transfers/version.go b/resource-manager/billing/2024-04-01/transfers/version.go index f4a028e8d61..14ec9ec53ec 100644 --- a/resource-manager/billing/2024-04-01/transfers/version.go +++ b/resource-manager/billing/2024-04-01/transfers/version.go @@ -1,12 +1,10 @@ package transfers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transfers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transfers/2024-04-01" } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/README.md b/resource-manager/blueprints/2018-11-01-preview/artifact/README.md index effca9cde5b..ad788d35214 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/artifact` Documentation -The `artifact` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `artifact` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/client.go b/resource-manager/blueprints/2018-11-01-preview/artifact/client.go index c9f5abcaf01..c24099c2195 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/client.go @@ -15,7 +15,7 @@ type ArtifactClient struct { } func NewArtifactClientWithBaseURI(sdkApi sdkEnv.Api) (*ArtifactClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "artifact", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "artifact", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArtifactClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/id_artifactscoped.go b/resource-manager/blueprints/2018-11-01-preview/artifact/id_artifactscoped.go index c791e0f8f84..f7218e1e7bb 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/id_artifactscoped.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/id_artifactscoped.go @@ -42,7 +42,7 @@ func ParseArtifactScopedID(input string) (*ArtifactScopedId, error) { } id := ArtifactScopedId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseArtifactScopedIDInsensitively(input string) (*ArtifactScopedId, error) } id := ArtifactScopedId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/id_scopedblueprint.go b/resource-manager/blueprints/2018-11-01-preview/artifact/id_scopedblueprint.go index 71cced6924b..c85288a7aa2 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/id_scopedblueprint.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/id_scopedblueprint.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error) { } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, erro } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/method_createorupdate.go b/resource-manager/blueprints/2018-11-01-preview/artifact/method_createorupdate.go index f73152f24e6..9df6d3d0322 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/method_createorupdate.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Artifact + Model Artifact } // CreateOrUpdate ... @@ -52,11 +52,11 @@ func (c ArtifactClient) CreateOrUpdate(ctx context.Context, id ArtifactScopedId, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalArtifactImplementation(respObj) + model, err := UnmarshalArtifactImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/method_delete.go b/resource-manager/blueprints/2018-11-01-preview/artifact/method_delete.go index 084767c8a8b..351754fc041 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/method_delete.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/method_delete.go @@ -15,7 +15,7 @@ import ( type DeleteOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Artifact + Model Artifact } // Delete ... @@ -49,11 +49,11 @@ func (c ArtifactClient) Delete(ctx context.Context, id ArtifactScopedId) (result if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalArtifactImplementation(respObj) + model, err := UnmarshalArtifactImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/method_get.go b/resource-manager/blueprints/2018-11-01-preview/artifact/method_get.go index ceda3257b12..2f2651a1efb 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Artifact + Model Artifact } // Get ... @@ -48,11 +48,11 @@ func (c ArtifactClient) Get(ctx context.Context, id ArtifactScopedId) (result Ge if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalArtifactImplementation(respObj) + model, err := UnmarshalArtifactImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/method_list.go b/resource-manager/blueprints/2018-11-01-preview/artifact/method_list.go index 6fa437cf480..c1fa0f71321 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/method_list.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/method_list.go @@ -73,7 +73,7 @@ func (c ArtifactClient) List(ctx context.Context, id ScopedBlueprintId) (result temp := make([]Artifact, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalArtifactImplementation(v) + val, err := UnmarshalArtifactImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Artifact (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/model_artifact.go b/resource-manager/blueprints/2018-11-01-preview/artifact/model_artifact.go index 6f72e7da013..7c511e519a4 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/model_artifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/model_artifact.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Artifact interface { + Artifact() BaseArtifactImpl } -// RawArtifactImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Artifact = BaseArtifactImpl{} + +type BaseArtifactImpl struct { + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseArtifactImpl) Artifact() BaseArtifactImpl { + return s +} + +var _ Artifact = RawArtifactImpl{} + +// RawArtifactImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawArtifactImpl struct { - Type string - Values map[string]interface{} + artifact BaseArtifactImpl + Type string + Values map[string]interface{} +} + +func (s RawArtifactImpl) Artifact() BaseArtifactImpl { + return s.artifact } -func unmarshalArtifactImplementation(input []byte) (Artifact, error) { +func UnmarshalArtifactImplementation(input []byte) (Artifact, error) { if input == nil { return nil, nil } @@ -60,10 +80,15 @@ func unmarshalArtifactImplementation(input []byte) (Artifact, error) { return out, nil } - out := RawArtifactImpl{ - Type: value, - Values: temp, + var parent BaseArtifactImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseArtifactImpl: %+v", err) } - return out, nil + + return RawArtifactImpl{ + artifact: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/model_policyassignmentartifact.go b/resource-manager/blueprints/2018-11-01-preview/artifact/model_policyassignmentartifact.go index 38f45152f17..8eb98e3353f 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/model_policyassignmentartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/model_policyassignmentartifact.go @@ -14,9 +14,20 @@ type PolicyAssignmentArtifact struct { Properties PolicyAssignmentArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s PolicyAssignmentArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = PolicyAssignmentArtifact{} @@ -30,9 +41,10 @@ func (s PolicyAssignmentArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PolicyAssignmentArtifact: %+v", err) } + decoded["kind"] = "policyAssignment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/model_roleassignmentartifact.go b/resource-manager/blueprints/2018-11-01-preview/artifact/model_roleassignmentartifact.go index 569f996404d..2b65da4cd0b 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/model_roleassignmentartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/model_roleassignmentartifact.go @@ -14,9 +14,20 @@ type RoleAssignmentArtifact struct { Properties RoleAssignmentArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s RoleAssignmentArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = RoleAssignmentArtifact{} @@ -30,9 +41,10 @@ func (s RoleAssignmentArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RoleAssignmentArtifact: %+v", err) } + decoded["kind"] = "roleAssignment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/model_templateartifact.go b/resource-manager/blueprints/2018-11-01-preview/artifact/model_templateartifact.go index e1bb5eb8bf0..bde7c2a863b 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/model_templateartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/model_templateartifact.go @@ -14,9 +14,20 @@ type TemplateArtifact struct { Properties TemplateArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s TemplateArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = TemplateArtifact{} @@ -30,9 +41,10 @@ func (s TemplateArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TemplateArtifact: %+v", err) } + decoded["kind"] = "template" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/artifact/version.go b/resource-manager/blueprints/2018-11-01-preview/artifact/version.go index c68722690e7..ef734b31e90 100644 --- a/resource-manager/blueprints/2018-11-01-preview/artifact/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/artifact/version.go @@ -1,12 +1,10 @@ package artifact -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/artifact/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/artifact/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/README.md b/resource-manager/blueprints/2018-11-01-preview/assignment/README.md index 2ccf24c9d01..375ab970814 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment` Documentation -The `assignment` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `assignment` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/client.go b/resource-manager/blueprints/2018-11-01-preview/assignment/client.go index d9abe14fd60..8047a7b4ada 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/client.go @@ -15,7 +15,7 @@ type AssignmentClient struct { } func NewAssignmentClientWithBaseURI(sdkApi sdkEnv.Api) (*AssignmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assignment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assignment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssignmentClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go b/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go index 1d7a3636eab..2411f6f0826 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/id_scopedblueprintassignment.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintAssignmentID(input string) (*ScopedBlueprintAssignmentI } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintAssignmentIDInsensitively(input string) (*ScopedBluepri } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/method_createorupdate.go b/resource-manager/blueprints/2018-11-01-preview/assignment/method_createorupdate.go index 147a97b5bb5..6736293a98f 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/method_createorupdate.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/method_createorupdate.go @@ -49,7 +49,6 @@ func (c AssignmentClient) CreateOrUpdate(ctx context.Context, id ScopedBlueprint var model Assignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/method_delete.go b/resource-manager/blueprints/2018-11-01-preview/assignment/method_delete.go index a69eea0ead2..4e084a607a0 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/method_delete.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/method_delete.go @@ -34,6 +34,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AssignmentClient) Delete(ctx context.Context, id ScopedBlueprintAssignme var model Assignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/method_get.go b/resource-manager/blueprints/2018-11-01-preview/assignment/method_get.go index 22bae0a7d94..ed3ed8839f0 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/method_get.go @@ -45,7 +45,6 @@ func (c AssignmentClient) Get(ctx context.Context, id ScopedBlueprintAssignmentI var model Assignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignment/version.go b/resource-manager/blueprints/2018-11-01-preview/assignment/version.go index 5dc87d1f8d4..17b35c6058a 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignment/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignment/version.go @@ -1,12 +1,10 @@ package assignment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assignment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assignment/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/README.md b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/README.md index 1fe33c607f5..803c24fb250 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignmentoperations` Documentation -The `assignmentoperations` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `assignmentoperations` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/client.go b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/client.go index 93a298233a5..8095de44af1 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/client.go @@ -15,7 +15,7 @@ type AssignmentOperationsClient struct { } func NewAssignmentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssignmentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assignmentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assignmentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssignmentOperationsClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedassignmentoperation.go b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedassignmentoperation.go index 1b13b108199..7c1f0020cde 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedassignmentoperation.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedassignmentoperation.go @@ -42,7 +42,7 @@ func ParseScopedAssignmentOperationID(input string) (*ScopedAssignmentOperationI } id := ScopedAssignmentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedAssignmentOperationIDInsensitively(input string) (*ScopedAssignm } id := ScopedAssignmentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedblueprintassignment.go b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedblueprintassignment.go index 9ff3990b8c7..81604db951f 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedblueprintassignment.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/id_scopedblueprintassignment.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintAssignmentID(input string) (*ScopedBlueprintAssignmentI } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintAssignmentIDInsensitively(input string) (*ScopedBluepri } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/method_get.go b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/method_get.go index 9cd52a6cea2..6e448443d65 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/method_get.go @@ -45,7 +45,6 @@ func (c AssignmentOperationsClient) Get(ctx context.Context, id ScopedAssignment var model AssignmentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/version.go b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/version.go index 89f4a6b4591..466d2be7645 100644 --- a/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/assignmentoperations/version.go @@ -1,12 +1,10 @@ package assignmentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assignmentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assignmentoperations/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/README.md b/resource-manager/blueprints/2018-11-01-preview/blueprint/README.md index fddf9ac11d1..def46f47d9e 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint` Documentation -The `blueprint` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `blueprint` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/client.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/client.go index 31ca5069039..45edc9e9d74 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/client.go @@ -15,7 +15,7 @@ type BlueprintClient struct { } func NewBlueprintClientWithBaseURI(sdkApi sdkEnv.Api) (*BlueprintClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blueprint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blueprint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlueprintClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go index 04b6539a0a8..b6908b76915 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/id_scopedblueprint.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error) { } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, erro } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_createorupdate.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_createorupdate.go index 976a540c99b..1487572e164 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_createorupdate.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BlueprintClient) CreateOrUpdate(ctx context.Context, id ScopedBlueprintI var model Blueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_delete.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_delete.go index bfef43c85f5..dcec83ed945 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_delete.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_delete.go @@ -46,7 +46,6 @@ func (c BlueprintClient) Delete(ctx context.Context, id ScopedBlueprintId) (resu var model Blueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_get.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_get.go index fbc44a1ac93..42bae100aed 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/method_get.go @@ -45,7 +45,6 @@ func (c BlueprintClient) Get(ctx context.Context, id ScopedBlueprintId) (result var model Blueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprint/version.go b/resource-manager/blueprints/2018-11-01-preview/blueprint/version.go index 4269eda99a4..a265d472891 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprint/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprint/version.go @@ -1,12 +1,10 @@ package blueprint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blueprint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blueprint/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/README.md b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/README.md index 5c750f046f3..3931f28f62f 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprintassignments` Documentation -The `blueprintassignments` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `blueprintassignments` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/client.go b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/client.go index 6a982ea1ae0..613d64cf182 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/client.go @@ -15,7 +15,7 @@ type BlueprintAssignmentsClient struct { } func NewBlueprintAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*BlueprintAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blueprintassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blueprintassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlueprintAssignmentsClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/id_scopedblueprintassignment.go b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/id_scopedblueprintassignment.go index 3f50d0f191f..e8e01afe30d 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/id_scopedblueprintassignment.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/id_scopedblueprintassignment.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintAssignmentID(input string) (*ScopedBlueprintAssignmentI } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintAssignmentIDInsensitively(input string) (*ScopedBluepri } id := ScopedBlueprintAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/method_assignmentswhoisblueprint.go b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/method_assignmentswhoisblueprint.go index 1b37fd10c71..48251b61d92 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/method_assignmentswhoisblueprint.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/method_assignmentswhoisblueprint.go @@ -46,7 +46,6 @@ func (c BlueprintAssignmentsClient) AssignmentsWhoIsBlueprint(ctx context.Contex var model WhoIsBlueprintContract result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/version.go b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/version.go index decfe9cd44c..6977ee525eb 100644 --- a/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/blueprintassignments/version.go @@ -1,12 +1,10 @@ package blueprintassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blueprintassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blueprintassignments/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/README.md b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/README.md index e389688a211..d89746d7b4b 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedartifact` Documentation -The `publishedartifact` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `publishedartifact` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/client.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/client.go index 1fed813a926..0dae7807faf 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/client.go @@ -15,7 +15,7 @@ type PublishedArtifactClient struct { } func NewPublishedArtifactClientWithBaseURI(sdkApi sdkEnv.Api) (*PublishedArtifactClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publishedartifact", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publishedartifact", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublishedArtifactClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_scopedversion.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_scopedversion.go index 4ee42fe2de9..057f5fc2e31 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_scopedversion.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_scopedversion.go @@ -42,7 +42,7 @@ func ParseScopedVersionID(input string) (*ScopedVersionId, error) { } id := ScopedVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedVersionIDInsensitively(input string) (*ScopedVersionId, error) { } id := ScopedVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_versionartifactscoped.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_versionartifactscoped.go index 333252c6bcb..0b2cf149e6d 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_versionartifactscoped.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/id_versionartifactscoped.go @@ -44,7 +44,7 @@ func ParseVersionArtifactScopedID(input string) (*VersionArtifactScopedId, error } id := VersionArtifactScopedId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVersionArtifactScopedIDInsensitively(input string) (*VersionArtifactSc } id := VersionArtifactScopedId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_get.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_get.go index 850a7cf0686..ac114db814e 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Artifact + Model Artifact } // Get ... @@ -48,11 +48,11 @@ func (c PublishedArtifactClient) Get(ctx context.Context, id VersionArtifactScop if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalArtifactImplementation(respObj) + model, err := UnmarshalArtifactImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_list.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_list.go index 1b20e244037..221478479a0 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_list.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/method_list.go @@ -73,7 +73,7 @@ func (c PublishedArtifactClient) List(ctx context.Context, id ScopedVersionId) ( temp := make([]Artifact, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalArtifactImplementation(v) + val, err := UnmarshalArtifactImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Artifact (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_artifact.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_artifact.go index 2c566e31d05..95053173b2d 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_artifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_artifact.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Artifact interface { + Artifact() BaseArtifactImpl } -// RawArtifactImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Artifact = BaseArtifactImpl{} + +type BaseArtifactImpl struct { + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseArtifactImpl) Artifact() BaseArtifactImpl { + return s +} + +var _ Artifact = RawArtifactImpl{} + +// RawArtifactImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawArtifactImpl struct { - Type string - Values map[string]interface{} + artifact BaseArtifactImpl + Type string + Values map[string]interface{} +} + +func (s RawArtifactImpl) Artifact() BaseArtifactImpl { + return s.artifact } -func unmarshalArtifactImplementation(input []byte) (Artifact, error) { +func UnmarshalArtifactImplementation(input []byte) (Artifact, error) { if input == nil { return nil, nil } @@ -60,10 +80,15 @@ func unmarshalArtifactImplementation(input []byte) (Artifact, error) { return out, nil } - out := RawArtifactImpl{ - Type: value, - Values: temp, + var parent BaseArtifactImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseArtifactImpl: %+v", err) } - return out, nil + + return RawArtifactImpl{ + artifact: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_policyassignmentartifact.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_policyassignmentartifact.go index ec4a50495d2..380b8b885b0 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_policyassignmentartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_policyassignmentartifact.go @@ -14,9 +14,20 @@ type PolicyAssignmentArtifact struct { Properties PolicyAssignmentArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s PolicyAssignmentArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = PolicyAssignmentArtifact{} @@ -30,9 +41,10 @@ func (s PolicyAssignmentArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PolicyAssignmentArtifact: %+v", err) } + decoded["kind"] = "policyAssignment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_roleassignmentartifact.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_roleassignmentartifact.go index 4ced32ccc1f..7b60581e36a 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_roleassignmentartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_roleassignmentartifact.go @@ -14,9 +14,20 @@ type RoleAssignmentArtifact struct { Properties RoleAssignmentArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s RoleAssignmentArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = RoleAssignmentArtifact{} @@ -30,9 +41,10 @@ func (s RoleAssignmentArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RoleAssignmentArtifact: %+v", err) } + decoded["kind"] = "roleAssignment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_templateartifact.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_templateartifact.go index 98f19da9896..1bc93b30f6b 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_templateartifact.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/model_templateartifact.go @@ -14,9 +14,20 @@ type TemplateArtifact struct { Properties TemplateArtifactProperties `json:"properties"` // Fields inherited from Artifact - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ArtifactKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s TemplateArtifact) Artifact() BaseArtifactImpl { + return BaseArtifactImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = TemplateArtifact{} @@ -30,9 +41,10 @@ func (s TemplateArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TemplateArtifact: %+v", err) } + decoded["kind"] = "template" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/version.go b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/version.go index 12370001190..a1cc4733212 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedartifact/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedartifact/version.go @@ -1,12 +1,10 @@ package publishedartifact -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publishedartifact/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publishedartifact/2018-11-01-preview" } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/README.md b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/README.md index cb259051988..80f07c8acf1 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/README.md +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint` Documentation -The `publishedblueprint` SDK allows for interaction with the Azure Resource Manager Service `blueprints` (API Version `2018-11-01-preview`). +The `publishedblueprint` SDK allows for interaction with Azure Resource Manager `blueprints` (API Version `2018-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/client.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/client.go index 828f8476197..b5b69bfa301 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/client.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/client.go @@ -15,7 +15,7 @@ type PublishedBlueprintClient struct { } func NewPublishedBlueprintClientWithBaseURI(sdkApi sdkEnv.Api) (*PublishedBlueprintClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publishedblueprint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publishedblueprint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublishedBlueprintClient: %+v", err) } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go index 872e5abd7c3..e1855a05b1e 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedblueprint.go @@ -40,7 +40,7 @@ func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error) { } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, erro } id := ScopedBlueprintId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go index d54712730de..faf9d1177df 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/id_scopedversion.go @@ -42,7 +42,7 @@ func ParseScopedVersionID(input string) (*ScopedVersionId, error) { } id := ScopedVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedVersionIDInsensitively(input string) (*ScopedVersionId, error) { } id := ScopedVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_create.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_create.go index 7cb14b43a72..5ec07e483a1 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_create.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_create.go @@ -49,7 +49,6 @@ func (c PublishedBlueprintClient) Create(ctx context.Context, id ScopedVersionId var model PublishedBlueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_delete.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_delete.go index ea115fc5734..381f4b4069f 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_delete.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_delete.go @@ -46,7 +46,6 @@ func (c PublishedBlueprintClient) Delete(ctx context.Context, id ScopedVersionId var model PublishedBlueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_get.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_get.go index bef6f7da00e..69c6ad4ab38 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_get.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/method_get.go @@ -45,7 +45,6 @@ func (c PublishedBlueprintClient) Get(ctx context.Context, id ScopedVersionId) ( var model PublishedBlueprint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/version.go b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/version.go index 6dadf657fe0..4a32a65274e 100644 --- a/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/version.go +++ b/resource-manager/blueprints/2018-11-01-preview/publishedblueprint/version.go @@ -1,12 +1,10 @@ package publishedblueprint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publishedblueprint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publishedblueprint/2018-11-01-preview" } diff --git a/resource-manager/botservice/2022-09-15/bot/README.md b/resource-manager/botservice/2022-09-15/bot/README.md index fe903879965..f33cb464576 100644 --- a/resource-manager/botservice/2022-09-15/bot/README.md +++ b/resource-manager/botservice/2022-09-15/bot/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/bot` Documentation -The `bot` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `bot` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/bot/client.go b/resource-manager/botservice/2022-09-15/bot/client.go index 3f50ddc4c65..8064db5c233 100644 --- a/resource-manager/botservice/2022-09-15/bot/client.go +++ b/resource-manager/botservice/2022-09-15/bot/client.go @@ -15,7 +15,7 @@ type BotClient struct { } func NewBotClientWithBaseURI(sdkApi sdkEnv.Api) (*BotClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bot", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bot", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BotClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/bot/method_create.go b/resource-manager/botservice/2022-09-15/bot/method_create.go index dd1d00ff496..302119002ce 100644 --- a/resource-manager/botservice/2022-09-15/bot/method_create.go +++ b/resource-manager/botservice/2022-09-15/bot/method_create.go @@ -51,7 +51,6 @@ func (c BotClient) Create(ctx context.Context, id commonids.BotServiceId, input var model Bot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/bot/method_get.go b/resource-manager/botservice/2022-09-15/bot/method_get.go index 03d05d5c96f..ff3b23bd8eb 100644 --- a/resource-manager/botservice/2022-09-15/bot/method_get.go +++ b/resource-manager/botservice/2022-09-15/bot/method_get.go @@ -46,7 +46,6 @@ func (c BotClient) Get(ctx context.Context, id commonids.BotServiceId) (result G var model Bot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/bot/method_getchecknameavailability.go b/resource-manager/botservice/2022-09-15/bot/method_getchecknameavailability.go index 9d02f3dc9e1..592431c688e 100644 --- a/resource-manager/botservice/2022-09-15/bot/method_getchecknameavailability.go +++ b/resource-manager/botservice/2022-09-15/bot/method_getchecknameavailability.go @@ -49,7 +49,6 @@ func (c BotClient) GetCheckNameAvailability(ctx context.Context, input CheckName var model CheckNameAvailabilityResponseBody result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/bot/method_update.go b/resource-manager/botservice/2022-09-15/bot/method_update.go index df60fb764ae..a836b4f46b1 100644 --- a/resource-manager/botservice/2022-09-15/bot/method_update.go +++ b/resource-manager/botservice/2022-09-15/bot/method_update.go @@ -51,7 +51,6 @@ func (c BotClient) Update(ctx context.Context, id commonids.BotServiceId, input var model Bot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/bot/version.go b/resource-manager/botservice/2022-09-15/bot/version.go index ce6c4e6e29b..e48df58c1fe 100644 --- a/resource-manager/botservice/2022-09-15/bot/version.go +++ b/resource-manager/botservice/2022-09-15/bot/version.go @@ -1,12 +1,10 @@ package bot -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bot/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bot/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/botconnection/README.md b/resource-manager/botservice/2022-09-15/botconnection/README.md index 4ba1dcd9d5a..3f90ae461ef 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/README.md +++ b/resource-manager/botservice/2022-09-15/botconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/botconnection` Documentation -The `botconnection` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `botconnection` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/botconnection/client.go b/resource-manager/botservice/2022-09-15/botconnection/client.go index a4c072e9244..36d9fbcd4c3 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/client.go +++ b/resource-manager/botservice/2022-09-15/botconnection/client.go @@ -15,7 +15,7 @@ type BotConnectionClient struct { } func NewBotConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*BotConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "botconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "botconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BotConnectionClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/botconnection/id_connection.go b/resource-manager/botservice/2022-09-15/botconnection/id_connection.go index c515cb8e83c..81b096a1c1a 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/id_connection.go +++ b/resource-manager/botservice/2022-09-15/botconnection/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/botservice/2022-09-15/botconnection/method_create.go b/resource-manager/botservice/2022-09-15/botconnection/method_create.go index 14e0f07006e..81f0a762f1e 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/method_create.go +++ b/resource-manager/botservice/2022-09-15/botconnection/method_create.go @@ -50,7 +50,6 @@ func (c BotConnectionClient) Create(ctx context.Context, id ConnectionId, input var model ConnectionSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/botconnection/method_get.go b/resource-manager/botservice/2022-09-15/botconnection/method_get.go index 24b5972f143..d9c7b23b8fc 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/method_get.go +++ b/resource-manager/botservice/2022-09-15/botconnection/method_get.go @@ -45,7 +45,6 @@ func (c BotConnectionClient) Get(ctx context.Context, id ConnectionId) (result G var model ConnectionSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/botconnection/method_listwithsecrets.go b/resource-manager/botservice/2022-09-15/botconnection/method_listwithsecrets.go index 89d268080c2..3a7da791bc5 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/method_listwithsecrets.go +++ b/resource-manager/botservice/2022-09-15/botconnection/method_listwithsecrets.go @@ -46,7 +46,6 @@ func (c BotConnectionClient) ListWithSecrets(ctx context.Context, id ConnectionI var model ConnectionSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/botconnection/method_update.go b/resource-manager/botservice/2022-09-15/botconnection/method_update.go index 6e0f191c634..3bd55080985 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/method_update.go +++ b/resource-manager/botservice/2022-09-15/botconnection/method_update.go @@ -50,7 +50,6 @@ func (c BotConnectionClient) Update(ctx context.Context, id ConnectionId, input var model ConnectionSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/botconnection/version.go b/resource-manager/botservice/2022-09-15/botconnection/version.go index 0096a5a8a93..63797c8886d 100644 --- a/resource-manager/botservice/2022-09-15/botconnection/version.go +++ b/resource-manager/botservice/2022-09-15/botconnection/version.go @@ -1,12 +1,10 @@ package botconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/botconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/botconnection/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/bothostsettings/README.md b/resource-manager/botservice/2022-09-15/bothostsettings/README.md index e28e05f2836..be8369a4c1f 100644 --- a/resource-manager/botservice/2022-09-15/bothostsettings/README.md +++ b/resource-manager/botservice/2022-09-15/bothostsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/bothostsettings` Documentation -The `bothostsettings` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `bothostsettings` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/bothostsettings/client.go b/resource-manager/botservice/2022-09-15/bothostsettings/client.go index 3dce13f44a6..c4dd94aa49c 100644 --- a/resource-manager/botservice/2022-09-15/bothostsettings/client.go +++ b/resource-manager/botservice/2022-09-15/bothostsettings/client.go @@ -15,7 +15,7 @@ type BotHostSettingsClient struct { } func NewBotHostSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*BotHostSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bothostsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bothostsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BotHostSettingsClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/bothostsettings/method_hostsettingsget.go b/resource-manager/botservice/2022-09-15/bothostsettings/method_hostsettingsget.go index 7e4ee1345bb..51ed203e6c3 100644 --- a/resource-manager/botservice/2022-09-15/bothostsettings/method_hostsettingsget.go +++ b/resource-manager/botservice/2022-09-15/bothostsettings/method_hostsettingsget.go @@ -47,7 +47,6 @@ func (c BotHostSettingsClient) HostSettingsGet(ctx context.Context, id commonids var model HostSettingsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/bothostsettings/version.go b/resource-manager/botservice/2022-09-15/bothostsettings/version.go index 5922815f4fa..89361da34e7 100644 --- a/resource-manager/botservice/2022-09-15/bothostsettings/version.go +++ b/resource-manager/botservice/2022-09-15/bothostsettings/version.go @@ -1,12 +1,10 @@ package bothostsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bothostsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bothostsettings/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/channel/README.md b/resource-manager/botservice/2022-09-15/channel/README.md index ab43392801d..0b529cf3513 100644 --- a/resource-manager/botservice/2022-09-15/channel/README.md +++ b/resource-manager/botservice/2022-09-15/channel/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel` Documentation -The `channel` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `channel` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/channel/client.go b/resource-manager/botservice/2022-09-15/channel/client.go index 701a4a1c8b6..199761579e7 100644 --- a/resource-manager/botservice/2022-09-15/channel/client.go +++ b/resource-manager/botservice/2022-09-15/channel/client.go @@ -15,7 +15,7 @@ type ChannelClient struct { } func NewChannelClientWithBaseURI(sdkApi sdkEnv.Api) (*ChannelClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "channel", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "channel", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChannelClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/channel/method_create.go b/resource-manager/botservice/2022-09-15/channel/method_create.go index f92eb1e674d..ec54be66bc8 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_create.go +++ b/resource-manager/botservice/2022-09-15/channel/method_create.go @@ -51,7 +51,6 @@ func (c ChannelClient) Create(ctx context.Context, id commonids.BotServiceChanne var model BotChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go b/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go index 135352a2175..a9e78e00439 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go +++ b/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go @@ -51,7 +51,6 @@ func (c ChannelClient) DirectLineRegenerateKeys(ctx context.Context, id commonid var model BotChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go b/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go index f5c886cb2d7..5c7bfa1d088 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go +++ b/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go @@ -47,7 +47,6 @@ func (c ChannelClient) EmailCreateSignInUrl(ctx context.Context, id commonids.Bo var model CreateEmailSignInUrlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/method_get.go b/resource-manager/botservice/2022-09-15/channel/method_get.go index af9810cc436..9c18a2ef102 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_get.go +++ b/resource-manager/botservice/2022-09-15/channel/method_get.go @@ -46,7 +46,6 @@ func (c ChannelClient) Get(ctx context.Context, id commonids.BotServiceChannelId var model BotChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go b/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go index ad120421604..e4cc2e2fd6d 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go +++ b/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go @@ -47,7 +47,6 @@ func (c ChannelClient) ListWithKeys(ctx context.Context, id commonids.BotService var model ListChannelWithKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/method_update.go b/resource-manager/botservice/2022-09-15/channel/method_update.go index ae454587ef7..6e971870b67 100644 --- a/resource-manager/botservice/2022-09-15/channel/method_update.go +++ b/resource-manager/botservice/2022-09-15/channel/method_update.go @@ -51,7 +51,6 @@ func (c ChannelClient) Update(ctx context.Context, id commonids.BotServiceChanne var model BotChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go b/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go index e5b245bd5c3..8343a4e8c0f 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go @@ -13,11 +13,22 @@ var _ Channel = AcsChatChannel{} type AcsChatChannel struct { // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s AcsChatChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AcsChatChannel{} func (s AcsChatChannel) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s AcsChatChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AcsChatChannel: %+v", err) } + decoded["channelName"] = "AcsChatChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go b/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go index 826c5d709b4..11865c541d9 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go @@ -14,11 +14,22 @@ type AlexaChannel struct { Properties *AlexaChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s AlexaChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AlexaChannel{} func (s AlexaChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s AlexaChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AlexaChannel: %+v", err) } + decoded["channelName"] = "AlexaChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_botchannel.go b/resource-manager/botservice/2022-09-15/channel/model_botchannel.go index 8764e733009..98a5571c25f 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_botchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_botchannel.go @@ -48,7 +48,7 @@ func (s *BotChannel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalChannelImplementation(v) + impl, err := UnmarshalChannelImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BotChannel': %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/channel/model_channel.go b/resource-manager/botservice/2022-09-15/channel/model_channel.go index ea5ac715527..46ff62a8826 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_channel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_channel.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Channel interface { + Channel() BaseChannelImpl } -// RawChannelImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Channel = BaseChannelImpl{} + +type BaseChannelImpl struct { + ChannelName string `json:"channelName"` + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s BaseChannelImpl) Channel() BaseChannelImpl { + return s +} + +var _ Channel = RawChannelImpl{} + +// RawChannelImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChannelImpl struct { - Type string - Values map[string]interface{} + channel BaseChannelImpl + Type string + Values map[string]interface{} +} + +func (s RawChannelImpl) Channel() BaseChannelImpl { + return s.channel } -func unmarshalChannelImplementation(input []byte) (Channel, error) { +func UnmarshalChannelImplementation(input []byte) (Channel, error) { if input == nil { return nil, nil } @@ -188,10 +208,15 @@ func unmarshalChannelImplementation(input []byte) (Channel, error) { return out, nil } - out := RawChannelImpl{ - Type: value, - Values: temp, + var parent BaseChannelImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChannelImpl: %+v", err) } - return out, nil + + return RawChannelImpl{ + channel: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go b/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go index 1e314cb126e..27e307e015f 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go @@ -14,11 +14,22 @@ type DirectLineChannel struct { Properties *DirectLineChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s DirectLineChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = DirectLineChannel{} func (s DirectLineChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s DirectLineChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DirectLineChannel: %+v", err) } + decoded["channelName"] = "DirectLineChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go b/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go index 00973b4d03d..137708c856d 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go @@ -14,11 +14,22 @@ type DirectLineSpeechChannel struct { Properties *DirectLineSpeechChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s DirectLineSpeechChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = DirectLineSpeechChannel{} func (s DirectLineSpeechChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s DirectLineSpeechChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DirectLineSpeechChannel: %+v", err) } + decoded["channelName"] = "DirectLineSpeechChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go b/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go index 752873bf8d5..4f9375e35b2 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go @@ -14,11 +14,22 @@ type EmailChannel struct { Properties *EmailChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s EmailChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = EmailChannel{} func (s EmailChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s EmailChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EmailChannel: %+v", err) } + decoded["channelName"] = "EmailChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go b/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go index c0ac48bfcad..42ba6f22f68 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go @@ -14,11 +14,22 @@ type FacebookChannel struct { Properties *FacebookChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s FacebookChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = FacebookChannel{} func (s FacebookChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s FacebookChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FacebookChannel: %+v", err) } + decoded["channelName"] = "FacebookChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go b/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go index e376c30b4d6..06f59c5cbb5 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go @@ -14,11 +14,22 @@ type KikChannel struct { Properties *KikChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s KikChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = KikChannel{} func (s KikChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s KikChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KikChannel: %+v", err) } + decoded["channelName"] = "KikChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_linechannel.go b/resource-manager/botservice/2022-09-15/channel/model_linechannel.go index 07c63c2d825..fd38ae80c97 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_linechannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_linechannel.go @@ -14,11 +14,22 @@ type LineChannel struct { Properties *LineChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s LineChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = LineChannel{} func (s LineChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s LineChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LineChannel: %+v", err) } + decoded["channelName"] = "LineChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go b/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go index b6361bfbe87..b2ffa0e4738 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go +++ b/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go @@ -57,7 +57,7 @@ func (s *ListChannelWithKeysResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalChannelImplementation(v) + impl, err := UnmarshalChannelImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ListChannelWithKeysResponse': %+v", err) } @@ -65,7 +65,7 @@ func (s *ListChannelWithKeysResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resource"]; ok { - impl, err := unmarshalChannelImplementation(v) + impl, err := UnmarshalChannelImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Resource' for 'ListChannelWithKeysResponse': %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go b/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go index 4d2516e0e5f..9db11578d91 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go +++ b/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go @@ -13,11 +13,22 @@ var _ Channel = M365Extensions{} type M365Extensions struct { // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s M365Extensions) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = M365Extensions{} func (s M365Extensions) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s M365Extensions) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling M365Extensions: %+v", err) } + decoded["channelName"] = "M365Extensions" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go b/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go index b4db62b5c4e..4cf0e9d8701 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go @@ -14,11 +14,22 @@ type MsTeamsChannel struct { Properties *MsTeamsChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s MsTeamsChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = MsTeamsChannel{} func (s MsTeamsChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s MsTeamsChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MsTeamsChannel: %+v", err) } + decoded["channelName"] = "MsTeamsChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go b/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go index a9be4c567fe..28a08a931ac 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go @@ -13,11 +13,22 @@ var _ Channel = Omnichannel{} type Omnichannel struct { // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s Omnichannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = Omnichannel{} func (s Omnichannel) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s Omnichannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Omnichannel: %+v", err) } + decoded["channelName"] = "Omnichannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go b/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go index a728f9f7fb6..a6f3c1dbe06 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go @@ -13,11 +13,22 @@ var _ Channel = OutlookChannel{} type OutlookChannel struct { // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s OutlookChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = OutlookChannel{} func (s OutlookChannel) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s OutlookChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OutlookChannel: %+v", err) } + decoded["channelName"] = "OutlookChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go b/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go index fe4ffe451ff..f4f69e4b9bf 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go +++ b/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go @@ -13,11 +13,22 @@ var _ Channel = SearchAssistant{} type SearchAssistant struct { // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s SearchAssistant) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SearchAssistant{} func (s SearchAssistant) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s SearchAssistant) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SearchAssistant: %+v", err) } + decoded["channelName"] = "SearchAssistant" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go b/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go index 2068c22c295..8fb7bded933 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go @@ -14,11 +14,22 @@ type SkypeChannel struct { Properties *SkypeChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s SkypeChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SkypeChannel{} func (s SkypeChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s SkypeChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SkypeChannel: %+v", err) } + decoded["channelName"] = "SkypeChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go b/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go index 09841770a7d..08c0309558a 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go @@ -14,11 +14,22 @@ type SlackChannel struct { Properties *SlackChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s SlackChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SlackChannel{} func (s SlackChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s SlackChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SlackChannel: %+v", err) } + decoded["channelName"] = "SlackChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_smschannel.go b/resource-manager/botservice/2022-09-15/channel/model_smschannel.go index 94323e141d3..7bb3a04ebe0 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_smschannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_smschannel.go @@ -14,11 +14,22 @@ type SmsChannel struct { Properties *SmsChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s SmsChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SmsChannel{} func (s SmsChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s SmsChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmsChannel: %+v", err) } + decoded["channelName"] = "SmsChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go b/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go index 716bae275a3..5763949acd1 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go @@ -14,11 +14,22 @@ type TelegramChannel struct { Properties *TelegramChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s TelegramChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = TelegramChannel{} func (s TelegramChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s TelegramChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TelegramChannel: %+v", err) } + decoded["channelName"] = "TelegramChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go b/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go index 73f48a01685..d31f590d4c2 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go @@ -14,11 +14,22 @@ type TelephonyChannel struct { Properties *TelephonyChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s TelephonyChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = TelephonyChannel{} func (s TelephonyChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s TelephonyChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TelephonyChannel: %+v", err) } + decoded["channelName"] = "TelephonyChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go b/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go index 38a968de315..441e21e4017 100644 --- a/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go +++ b/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go @@ -14,11 +14,22 @@ type WebChatChannel struct { Properties *WebChatChannelProperties `json:"properties,omitempty"` // Fields inherited from Channel + + ChannelName string `json:"channelName"` Etag *string `json:"etag,omitempty"` Location *string `json:"location,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +func (s WebChatChannel) Channel() BaseChannelImpl { + return BaseChannelImpl{ + ChannelName: s.ChannelName, + Etag: s.Etag, + Location: s.Location, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = WebChatChannel{} func (s WebChatChannel) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s WebChatChannel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebChatChannel: %+v", err) } + decoded["channelName"] = "WebChatChannel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/botservice/2022-09-15/channel/version.go b/resource-manager/botservice/2022-09-15/channel/version.go index e57afa51cb6..5c7d0e227d0 100644 --- a/resource-manager/botservice/2022-09-15/channel/version.go +++ b/resource-manager/botservice/2022-09-15/channel/version.go @@ -1,12 +1,10 @@ package channel -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/channel/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/channel/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/README.md b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/README.md index 7e9ae45ff86..471b224d8b5 100644 --- a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/README.md +++ b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys` Documentation -The `listqnamakerendpointkeys` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `listqnamakerendpointkeys` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/client.go b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/client.go index 82f36880078..1e8b3268c39 100644 --- a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/client.go +++ b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/client.go @@ -15,7 +15,7 @@ type ListQnAMakerEndpointKeysClient struct { } func NewListQnAMakerEndpointKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ListQnAMakerEndpointKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listqnamakerendpointkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listqnamakerendpointkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListQnAMakerEndpointKeysClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/method_qnamakerendpointkeysget.go b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/method_qnamakerendpointkeysget.go index 9243931bc20..ba4021df048 100644 --- a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/method_qnamakerendpointkeysget.go +++ b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/method_qnamakerendpointkeysget.go @@ -51,7 +51,6 @@ func (c ListQnAMakerEndpointKeysClient) QnAMakerEndpointKeysGet(ctx context.Cont var model QnAMakerEndpointKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/version.go b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/version.go index 5048afb34c8..b5a06fad0d0 100644 --- a/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/version.go +++ b/resource-manager/botservice/2022-09-15/listqnamakerendpointkeys/version.go @@ -1,12 +1,10 @@ package listqnamakerendpointkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listqnamakerendpointkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listqnamakerendpointkeys/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/listserviceproviders/README.md b/resource-manager/botservice/2022-09-15/listserviceproviders/README.md index 586208be76e..5457313af3f 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/README.md +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/listserviceproviders` Documentation -The `listserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `listserviceproviders` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/listserviceproviders/client.go b/resource-manager/botservice/2022-09-15/listserviceproviders/client.go index a8652fe56f4..384dbc26457 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/client.go +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/client.go @@ -15,7 +15,7 @@ type ListServiceProvidersClient struct { } func NewListServiceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ListServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listserviceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listserviceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListServiceProvidersClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/listserviceproviders/version.go b/resource-manager/botservice/2022-09-15/listserviceproviders/version.go index 20b503adf89..ac3346763df 100644 --- a/resource-manager/botservice/2022-09-15/listserviceproviders/version.go +++ b/resource-manager/botservice/2022-09-15/listserviceproviders/version.go @@ -1,12 +1,10 @@ package listserviceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listserviceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listserviceproviders/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/README.md b/resource-manager/botservice/2022-09-15/privateendpointconnections/README.md index b8bce5e0ffc..e8fc39d49af 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/README.md +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/client.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/client.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/id_privateendpointconnection.go index 41332e570eb..6e43314d037 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_create.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_create.go index dfab2173bdf..085d6b0312e 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_create.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_create.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Create(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_get.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_get.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_list.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_list.go index 51c6d7f23c8..b9208b890dd 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/method_list.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/privateendpointconnections/version.go b/resource-manager/botservice/2022-09-15/privateendpointconnections/version.go index 308c21bc9dd..52551da8d52 100644 --- a/resource-manager/botservice/2022-09-15/privateendpointconnections/version.go +++ b/resource-manager/botservice/2022-09-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-09-15" } diff --git a/resource-manager/botservice/2022-09-15/privatelinkresources/README.md b/resource-manager/botservice/2022-09-15/privatelinkresources/README.md index 3b579e000b1..dbc33db2c6a 100644 --- a/resource-manager/botservice/2022-09-15/privatelinkresources/README.md +++ b/resource-manager/botservice/2022-09-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `botservice` (API Version `2022-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/botservice/2022-09-15/privatelinkresources/client.go b/resource-manager/botservice/2022-09-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/botservice/2022-09-15/privatelinkresources/client.go +++ b/resource-manager/botservice/2022-09-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/botservice/2022-09-15/privatelinkresources/method_listbybotresource.go b/resource-manager/botservice/2022-09-15/privatelinkresources/method_listbybotresource.go index d0572bb3c85..58a55a0ecb0 100644 --- a/resource-manager/botservice/2022-09-15/privatelinkresources/method_listbybotresource.go +++ b/resource-manager/botservice/2022-09-15/privatelinkresources/method_listbybotresource.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) ListByBotResource(ctx context.Context, id co var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/botservice/2022-09-15/privatelinkresources/version.go b/resource-manager/botservice/2022-09-15/privatelinkresources/version.go index f97881fdf0c..03725f5d579 100644 --- a/resource-manager/botservice/2022-09-15/privatelinkresources/version.go +++ b/resource-manager/botservice/2022-09-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-09-15" } diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/README.md b/resource-manager/cdn/2024-02-01/afdcustomdomains/README.md new file mode 100644 index 00000000000..73a613b93db --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdcustomdomains` Documentation + +The `afdcustomdomains` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdcustomdomains" +``` + + +### Client Initialization + +```go +client := afdcustomdomains.NewAFDCustomDomainsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AFDCustomDomainsClient.Create` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + +payload := afdcustomdomains.AFDDomain{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDCustomDomainsClient.Delete` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDCustomDomainsClient.Get` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDCustomDomainsClient.ListByProfile` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDCustomDomainsClient.RefreshValidationToken` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + +if err := client.RefreshValidationTokenThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDCustomDomainsClient.Update` + +```go +ctx := context.TODO() +id := afdcustomdomains.NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + +payload := afdcustomdomains.AFDDomainUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/client.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/client.go new file mode 100644 index 00000000000..c5d7647815e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/client.go @@ -0,0 +1,26 @@ +package afdcustomdomains + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDCustomDomainsClient struct { + Client *resourcemanager.Client +} + +func NewAFDCustomDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDCustomDomainsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "afdcustomdomains", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AFDCustomDomainsClient: %+v", err) + } + + return &AFDCustomDomainsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/constants.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/constants.go new file mode 100644 index 00000000000..c0d8c92ef84 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/constants.go @@ -0,0 +1,254 @@ +package afdcustomdomains + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdCertificateType string + +const ( + AfdCertificateTypeAzureFirstPartyManagedCertificate AfdCertificateType = "AzureFirstPartyManagedCertificate" + AfdCertificateTypeCustomerCertificate AfdCertificateType = "CustomerCertificate" + AfdCertificateTypeManagedCertificate AfdCertificateType = "ManagedCertificate" +) + +func PossibleValuesForAfdCertificateType() []string { + return []string{ + string(AfdCertificateTypeAzureFirstPartyManagedCertificate), + string(AfdCertificateTypeCustomerCertificate), + string(AfdCertificateTypeManagedCertificate), + } +} + +func (s *AfdCertificateType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdCertificateType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdCertificateType(input string) (*AfdCertificateType, error) { + vals := map[string]AfdCertificateType{ + "azurefirstpartymanagedcertificate": AfdCertificateTypeAzureFirstPartyManagedCertificate, + "customercertificate": AfdCertificateTypeCustomerCertificate, + "managedcertificate": AfdCertificateTypeManagedCertificate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdCertificateType(input) + return &out, nil +} + +type AfdMinimumTlsVersion string + +const ( + AfdMinimumTlsVersionTLSOneTwo AfdMinimumTlsVersion = "TLS12" + AfdMinimumTlsVersionTLSOneZero AfdMinimumTlsVersion = "TLS10" +) + +func PossibleValuesForAfdMinimumTlsVersion() []string { + return []string{ + string(AfdMinimumTlsVersionTLSOneTwo), + string(AfdMinimumTlsVersionTLSOneZero), + } +} + +func (s *AfdMinimumTlsVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdMinimumTlsVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdMinimumTlsVersion(input string) (*AfdMinimumTlsVersion, error) { + vals := map[string]AfdMinimumTlsVersion{ + "tls12": AfdMinimumTlsVersionTLSOneTwo, + "tls10": AfdMinimumTlsVersionTLSOneZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdMinimumTlsVersion(input) + return &out, nil +} + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type DomainValidationState string + +const ( + DomainValidationStateApproved DomainValidationState = "Approved" + DomainValidationStateInternalError DomainValidationState = "InternalError" + DomainValidationStatePending DomainValidationState = "Pending" + DomainValidationStatePendingRevalidation DomainValidationState = "PendingRevalidation" + DomainValidationStateRefreshingValidationToken DomainValidationState = "RefreshingValidationToken" + DomainValidationStateRejected DomainValidationState = "Rejected" + DomainValidationStateSubmitting DomainValidationState = "Submitting" + DomainValidationStateTimedOut DomainValidationState = "TimedOut" + DomainValidationStateUnknown DomainValidationState = "Unknown" +) + +func PossibleValuesForDomainValidationState() []string { + return []string{ + string(DomainValidationStateApproved), + string(DomainValidationStateInternalError), + string(DomainValidationStatePending), + string(DomainValidationStatePendingRevalidation), + string(DomainValidationStateRefreshingValidationToken), + string(DomainValidationStateRejected), + string(DomainValidationStateSubmitting), + string(DomainValidationStateTimedOut), + string(DomainValidationStateUnknown), + } +} + +func (s *DomainValidationState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDomainValidationState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDomainValidationState(input string) (*DomainValidationState, error) { + vals := map[string]DomainValidationState{ + "approved": DomainValidationStateApproved, + "internalerror": DomainValidationStateInternalError, + "pending": DomainValidationStatePending, + "pendingrevalidation": DomainValidationStatePendingRevalidation, + "refreshingvalidationtoken": DomainValidationStateRefreshingValidationToken, + "rejected": DomainValidationStateRejected, + "submitting": DomainValidationStateSubmitting, + "timedout": DomainValidationStateTimedOut, + "unknown": DomainValidationStateUnknown, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DomainValidationState(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain.go new file mode 100644 index 00000000000..f00c244de79 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain.go @@ -0,0 +1,139 @@ +package afdcustomdomains + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CustomDomainId{}) +} + +var _ resourceids.ResourceId = &CustomDomainId{} + +// CustomDomainId is a struct representing the Resource ID for a Custom Domain +type CustomDomainId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + CustomDomainName string +} + +// NewCustomDomainID returns a new CustomDomainId struct +func NewCustomDomainID(subscriptionId string, resourceGroupName string, profileName string, customDomainName string) CustomDomainId { + return CustomDomainId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + CustomDomainName: customDomainName, + } +} + +// ParseCustomDomainID parses 'input' into a CustomDomainId +func ParseCustomDomainID(input string) (*CustomDomainId, error) { + parser := resourceids.NewParserFromResourceIdType(&CustomDomainId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CustomDomainId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCustomDomainIDInsensitively parses 'input' case-insensitively into a CustomDomainId +// note: this method should only be used for API response data and not user input +func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { + parser := resourceids.NewParserFromResourceIdType(&CustomDomainId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CustomDomainId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CustomDomainId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.CustomDomainName, ok = input.Parsed["customDomainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", input) + } + + return nil +} + +// ValidateCustomDomainID checks that 'input' can be parsed as a Custom Domain ID +func ValidateCustomDomainID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCustomDomainID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Custom Domain ID +func (id CustomDomainId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/customDomains/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.CustomDomainName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Custom Domain ID +func (id CustomDomainId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticCustomDomains", "customDomains", "customDomains"), + resourceids.UserSpecifiedSegment("customDomainName", "customDomainValue"), + } +} + +// String returns a human-readable description of this Custom Domain ID +func (id CustomDomainId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Custom Domain Name: %q", id.CustomDomainName), + } + return fmt.Sprintf("Custom Domain (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain_test.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain_test.go new file mode 100644 index 00000000000..88766acca45 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_customdomain_test.go @@ -0,0 +1,327 @@ +package afdcustomdomains + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &CustomDomainId{} + +func TestNewCustomDomainID(t *testing.T) { + id := NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.CustomDomainName != "customDomainValue" { + t.Fatalf("Expected %q but got %q for Segment 'CustomDomainName'", id.CustomDomainName, "customDomainValue") + } +} + +func TestFormatCustomDomainID(t *testing.T) { + actual := NewCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "customDomainValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains/customDomainValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseCustomDomainID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CustomDomainId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains/customDomainValue", + Expected: &CustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + CustomDomainName: "customDomainValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains/customDomainValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCustomDomainID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.CustomDomainName != v.Expected.CustomDomainName { + t.Fatalf("Expected %q but got %q for CustomDomainName", v.Expected.CustomDomainName, actual.CustomDomainName) + } + + } +} + +func TestParseCustomDomainIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CustomDomainId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/cUsToMdOmAiNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains/customDomainValue", + Expected: &CustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + CustomDomainName: "customDomainValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/customDomains/customDomainValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/cUsToMdOmAiNs/cUsToMdOmAiNvAlUe", + Expected: &CustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + CustomDomainName: "cUsToMdOmAiNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/cUsToMdOmAiNs/cUsToMdOmAiNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCustomDomainIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.CustomDomainName != v.Expected.CustomDomainName { + t.Fatalf("Expected %q but got %q for CustomDomainName", v.Expected.CustomDomainName, actual.CustomDomainName) + } + + } +} + +func TestSegmentsForCustomDomainId(t *testing.T) { + segments := CustomDomainId{}.Segments() + if len(segments) == 0 { + t.Fatalf("CustomDomainId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile.go new file mode 100644 index 00000000000..9082af34830 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile.go @@ -0,0 +1,130 @@ +package afdcustomdomains + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile_test.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile_test.go new file mode 100644 index 00000000000..9458d88fc71 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/id_profile_test.go @@ -0,0 +1,282 @@ +package afdcustomdomains + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_create.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_create.go new file mode 100644 index 00000000000..ae549ab66f3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_create.go @@ -0,0 +1,76 @@ +package afdcustomdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDDomain +} + +// Create ... +func (c AFDCustomDomainsClient) Create(ctx context.Context, id CustomDomainId, input AFDDomain) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c AFDCustomDomainsClient) CreateThenPoll(ctx context.Context, id CustomDomainId, input AFDDomain) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_delete.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_delete.go new file mode 100644 index 00000000000..0bc3be82915 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_delete.go @@ -0,0 +1,71 @@ +package afdcustomdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c AFDCustomDomainsClient) Delete(ctx context.Context, id CustomDomainId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c AFDCustomDomainsClient) DeleteThenPoll(ctx context.Context, id CustomDomainId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_get.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_get.go new file mode 100644 index 00000000000..d3a04f74127 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_get.go @@ -0,0 +1,53 @@ +package afdcustomdomains + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AFDDomain +} + +// Get ... +func (c AFDCustomDomainsClient) Get(ctx context.Context, id CustomDomainId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AFDDomain + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_listbyprofile.go new file mode 100644 index 00000000000..3519a246ca5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_listbyprofile.go @@ -0,0 +1,105 @@ +package afdcustomdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AFDDomain +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []AFDDomain +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c AFDCustomDomainsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/customDomains", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AFDDomain `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c AFDCustomDomainsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, AFDDomainOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDCustomDomainsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate AFDDomainOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]AFDDomain, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_refreshvalidationtoken.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_refreshvalidationtoken.go new file mode 100644 index 00000000000..e6247385e47 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_refreshvalidationtoken.go @@ -0,0 +1,70 @@ +package afdcustomdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RefreshValidationTokenOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// RefreshValidationToken ... +func (c AFDCustomDomainsClient) RefreshValidationToken(ctx context.Context, id CustomDomainId) (result RefreshValidationTokenOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/refreshValidationToken", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RefreshValidationTokenThenPoll performs RefreshValidationToken then polls until it's completed +func (c AFDCustomDomainsClient) RefreshValidationTokenThenPoll(ctx context.Context, id CustomDomainId) error { + result, err := c.RefreshValidationToken(ctx, id) + if err != nil { + return fmt.Errorf("performing RefreshValidationToken: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after RefreshValidationToken: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/method_update.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_update.go new file mode 100644 index 00000000000..b2841d6e1c0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/method_update.go @@ -0,0 +1,75 @@ +package afdcustomdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDDomain +} + +// Update ... +func (c AFDCustomDomainsClient) Update(ctx context.Context, id CustomDomainId, input AFDDomainUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c AFDCustomDomainsClient) UpdateThenPoll(ctx context.Context, id CustomDomainId, input AFDDomainUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomain.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomain.go new file mode 100644 index 00000000000..05cb918cf11 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomain.go @@ -0,0 +1,16 @@ +package afdcustomdomains + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomain struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *AFDDomainProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainhttpsparameters.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainhttpsparameters.go new file mode 100644 index 00000000000..e05940ce72e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainhttpsparameters.go @@ -0,0 +1,10 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomainHTTPSParameters struct { + CertificateType AfdCertificateType `json:"certificateType"` + MinimumTlsVersion *AfdMinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + Secret *ResourceReference `json:"secret,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainproperties.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainproperties.go new file mode 100644 index 00000000000..b6cd1d3ab9f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainproperties.go @@ -0,0 +1,17 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomainProperties struct { + AzureDnsZone *ResourceReference `json:"azureDnsZone,omitempty"` + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + DomainValidationState *DomainValidationState `json:"domainValidationState,omitempty"` + ExtendedProperties *map[string]string `json:"extendedProperties,omitempty"` + HostName string `json:"hostName"` + PreValidatedCustomDomainResourceId *ResourceReference `json:"preValidatedCustomDomainResourceId,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` + TlsSettings *AFDDomainHTTPSParameters `json:"tlsSettings,omitempty"` + ValidationProperties *DomainValidationProperties `json:"validationProperties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdateparameters.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdateparameters.go new file mode 100644 index 00000000000..47b41476862 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdateparameters.go @@ -0,0 +1,8 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomainUpdateParameters struct { + Properties *AFDDomainUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdatepropertiesparameters.go new file mode 100644 index 00000000000..031b13ae2f7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_afddomainupdatepropertiesparameters.go @@ -0,0 +1,11 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomainUpdatePropertiesParameters struct { + AzureDnsZone *ResourceReference `json:"azureDnsZone,omitempty"` + PreValidatedCustomDomainResourceId *ResourceReference `json:"preValidatedCustomDomainResourceId,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + TlsSettings *AFDDomainHTTPSParameters `json:"tlsSettings,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_domainvalidationproperties.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_domainvalidationproperties.go new file mode 100644 index 00000000000..7a0f09cd6af --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_domainvalidationproperties.go @@ -0,0 +1,9 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DomainValidationProperties struct { + ExpirationDate *string `json:"expirationDate,omitempty"` + ValidationToken *string `json:"validationToken,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/model_resourcereference.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_resourcereference.go new file mode 100644 index 00000000000..be573730686 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/model_resourcereference.go @@ -0,0 +1,8 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/predicates.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/predicates.go new file mode 100644 index 00000000000..91e0235faea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/predicates.go @@ -0,0 +1,27 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDDomainOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p AFDDomainOperationPredicate) Matches(input AFDDomain) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/afdcustomdomains/version.go b/resource-manager/cdn/2024-02-01/afdcustomdomains/version.go new file mode 100644 index 00000000000..aeb25630fff --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdcustomdomains/version.go @@ -0,0 +1,10 @@ +package afdcustomdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/afdcustomdomains/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/README.md b/resource-manager/cdn/2024-02-01/afdendpoints/README.md new file mode 100644 index 00000000000..0f4d593d01c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/README.md @@ -0,0 +1,154 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdendpoints` Documentation + +The `afdendpoints` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdendpoints" +``` + + +### Client Initialization + +```go +client := afdendpoints.NewAFDEndpointsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AFDEndpointsClient.Create` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +payload := afdendpoints.AFDEndpoint{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDEndpointsClient.Delete` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDEndpointsClient.Get` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDEndpointsClient.ListByProfile` + +```go +ctx := context.TODO() +id := afdendpoints.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDEndpointsClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDEndpointsClient.PurgeContent` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +payload := afdendpoints.AfdPurgeParameters{ + // ... +} + + +if err := client.PurgeContentThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDEndpointsClient.Update` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +payload := afdendpoints.AFDEndpointUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDEndpointsClient.ValidateCustomDomain` + +```go +ctx := context.TODO() +id := afdendpoints.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +payload := afdendpoints.ValidateCustomDomainInput{ + // ... +} + + +read, err := client.ValidateCustomDomain(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/client.go b/resource-manager/cdn/2024-02-01/afdendpoints/client.go new file mode 100644 index 00000000000..bf3791c198d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/client.go @@ -0,0 +1,26 @@ +package afdendpoints + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointsClient struct { + Client *resourcemanager.Client +} + +func NewAFDEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDEndpointsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "afdendpoints", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AFDEndpointsClient: %+v", err) + } + + return &AFDEndpointsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/constants.go b/resource-manager/cdn/2024-02-01/afdendpoints/constants.go new file mode 100644 index 00000000000..870818f8770 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/constants.go @@ -0,0 +1,233 @@ +package afdendpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type AutoGeneratedDomainNameLabelScope string + +const ( + AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" + AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" + AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" + AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" +) + +func PossibleValuesForAutoGeneratedDomainNameLabelScope() []string { + return []string{ + string(AutoGeneratedDomainNameLabelScopeNoReuse), + string(AutoGeneratedDomainNameLabelScopeResourceGroupReuse), + string(AutoGeneratedDomainNameLabelScopeSubscriptionReuse), + string(AutoGeneratedDomainNameLabelScopeTenantReuse), + } +} + +func (s *AutoGeneratedDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoGeneratedDomainNameLabelScope(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoGeneratedDomainNameLabelScope(input string) (*AutoGeneratedDomainNameLabelScope, error) { + vals := map[string]AutoGeneratedDomainNameLabelScope{ + "noreuse": AutoGeneratedDomainNameLabelScopeNoReuse, + "resourcegroupreuse": AutoGeneratedDomainNameLabelScopeResourceGroupReuse, + "subscriptionreuse": AutoGeneratedDomainNameLabelScopeSubscriptionReuse, + "tenantreuse": AutoGeneratedDomainNameLabelScopeTenantReuse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoGeneratedDomainNameLabelScope(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type EnabledState string + +const ( + EnabledStateDisabled EnabledState = "Disabled" + EnabledStateEnabled EnabledState = "Enabled" +) + +func PossibleValuesForEnabledState() []string { + return []string{ + string(EnabledStateDisabled), + string(EnabledStateEnabled), + } +} + +func (s *EnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnabledState(input string) (*EnabledState, error) { + vals := map[string]EnabledState{ + "disabled": EnabledStateDisabled, + "enabled": EnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnabledState(input) + return &out, nil +} + +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +func PossibleValuesForUsageUnit() []string { + return []string{ + string(UsageUnitCount), + } +} + +func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageUnit(input string) (*UsageUnit, error) { + vals := map[string]UsageUnit{ + "count": UsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint.go b/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint.go new file mode 100644 index 00000000000..51dabc43a7a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint.go @@ -0,0 +1,139 @@ +package afdendpoints + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&AfdEndpointId{}) +} + +var _ resourceids.ResourceId = &AfdEndpointId{} + +// AfdEndpointId is a struct representing the Resource ID for a Afd Endpoint +type AfdEndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + AfdEndpointName string +} + +// NewAfdEndpointID returns a new AfdEndpointId struct +func NewAfdEndpointID(subscriptionId string, resourceGroupName string, profileName string, afdEndpointName string) AfdEndpointId { + return AfdEndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + AfdEndpointName: afdEndpointName, + } +} + +// ParseAfdEndpointID parses 'input' into a AfdEndpointId +func ParseAfdEndpointID(input string) (*AfdEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&AfdEndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := AfdEndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseAfdEndpointIDInsensitively parses 'input' case-insensitively into a AfdEndpointId +// note: this method should only be used for API response data and not user input +func ParseAfdEndpointIDInsensitively(input string) (*AfdEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&AfdEndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := AfdEndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AfdEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.AfdEndpointName, ok = input.Parsed["afdEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "afdEndpointName", input) + } + + return nil +} + +// ValidateAfdEndpointID checks that 'input' can be parsed as a Afd Endpoint ID +func ValidateAfdEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseAfdEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Afd Endpoint ID +func (id AfdEndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/afdEndpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.AfdEndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Afd Endpoint ID +func (id AfdEndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticAfdEndpoints", "afdEndpoints", "afdEndpoints"), + resourceids.UserSpecifiedSegment("afdEndpointName", "afdEndpointValue"), + } +} + +// String returns a human-readable description of this Afd Endpoint ID +func (id AfdEndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Afd Endpoint Name: %q", id.AfdEndpointName), + } + return fmt.Sprintf("Afd Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint_test.go b/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint_test.go new file mode 100644 index 00000000000..edcfdc20040 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/id_afdendpoint_test.go @@ -0,0 +1,327 @@ +package afdendpoints + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &AfdEndpointId{} + +func TestNewAfdEndpointID(t *testing.T) { + id := NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.AfdEndpointName != "afdEndpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'AfdEndpointName'", id.AfdEndpointName, "afdEndpointValue") + } +} + +func TestFormatAfdEndpointID(t *testing.T) { + actual := NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseAfdEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *AfdEndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseAfdEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + } +} + +func TestParseAfdEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *AfdEndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + AfdEndpointName: "aFdEnDpOiNtVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseAfdEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + } +} + +func TestSegmentsForAfdEndpointId(t *testing.T) { + segments := AfdEndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("AfdEndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/id_profile.go b/resource-manager/cdn/2024-02-01/afdendpoints/id_profile.go new file mode 100644 index 00000000000..e5bc211ef86 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/id_profile.go @@ -0,0 +1,130 @@ +package afdendpoints + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/id_profile_test.go b/resource-manager/cdn/2024-02-01/afdendpoints/id_profile_test.go new file mode 100644 index 00000000000..1e12c4a1076 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/id_profile_test.go @@ -0,0 +1,282 @@ +package afdendpoints + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_create.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_create.go new file mode 100644 index 00000000000..ed1dd57cf10 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_create.go @@ -0,0 +1,76 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDEndpoint +} + +// Create ... +func (c AFDEndpointsClient) Create(ctx context.Context, id AfdEndpointId, input AFDEndpoint) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c AFDEndpointsClient) CreateThenPoll(ctx context.Context, id AfdEndpointId, input AFDEndpoint) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_delete.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_delete.go new file mode 100644 index 00000000000..008d9ba504a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_delete.go @@ -0,0 +1,71 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c AFDEndpointsClient) Delete(ctx context.Context, id AfdEndpointId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c AFDEndpointsClient) DeleteThenPoll(ctx context.Context, id AfdEndpointId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_get.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_get.go new file mode 100644 index 00000000000..3f75c564bbd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_get.go @@ -0,0 +1,53 @@ +package afdendpoints + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AFDEndpoint +} + +// Get ... +func (c AFDEndpointsClient) Get(ctx context.Context, id AfdEndpointId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AFDEndpoint + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_listbyprofile.go new file mode 100644 index 00000000000..328db4641b9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_listbyprofile.go @@ -0,0 +1,105 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AFDEndpoint +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []AFDEndpoint +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c AFDEndpointsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/afdEndpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AFDEndpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c AFDEndpointsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, AFDEndpointOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDEndpointsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate AFDEndpointOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]AFDEndpoint, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_listresourceusage.go new file mode 100644 index 00000000000..9d0e7501447 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_listresourceusage.go @@ -0,0 +1,105 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Usage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []Usage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c AFDEndpointsClient) ListResourceUsage(ctx context.Context, id AfdEndpointId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/usages", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Usage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c AFDEndpointsClient) ListResourceUsageComplete(ctx context.Context, id AfdEndpointId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDEndpointsClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id AfdEndpointId, predicate UsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]Usage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_purgecontent.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_purgecontent.go new file mode 100644 index 00000000000..266d22c7ea2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_purgecontent.go @@ -0,0 +1,74 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PurgeContentOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// PurgeContent ... +func (c AFDEndpointsClient) PurgeContent(ctx context.Context, id AfdEndpointId, input AfdPurgeParameters) (result PurgeContentOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/purge", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PurgeContentThenPoll performs PurgeContent then polls until it's completed +func (c AFDEndpointsClient) PurgeContentThenPoll(ctx context.Context, id AfdEndpointId, input AfdPurgeParameters) error { + result, err := c.PurgeContent(ctx, id, input) + if err != nil { + return fmt.Errorf("performing PurgeContent: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PurgeContent: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_update.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_update.go new file mode 100644 index 00000000000..911a2a70823 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_update.go @@ -0,0 +1,75 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDEndpoint +} + +// Update ... +func (c AFDEndpointsClient) Update(ctx context.Context, id AfdEndpointId, input AFDEndpointUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c AFDEndpointsClient) UpdateThenPoll(ctx context.Context, id AfdEndpointId, input AFDEndpointUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/method_validatecustomdomain.go b/resource-manager/cdn/2024-02-01/afdendpoints/method_validatecustomdomain.go new file mode 100644 index 00000000000..0ec89caf8c8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/method_validatecustomdomain.go @@ -0,0 +1,58 @@ +package afdendpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ValidateCustomDomainOutput +} + +// ValidateCustomDomain ... +func (c AFDEndpointsClient) ValidateCustomDomain(ctx context.Context, id AfdEndpointId, input ValidateCustomDomainInput) (result ValidateCustomDomainOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validateCustomDomain", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ValidateCustomDomainOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpoint.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpoint.go new file mode 100644 index 00000000000..fe851cca60c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpoint.go @@ -0,0 +1,18 @@ +package afdendpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpoint struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *AFDEndpointProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointproperties.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointproperties.go new file mode 100644 index 00000000000..9a02413671c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointproperties.go @@ -0,0 +1,13 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointProperties struct { + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope `json:"autoGeneratedDomainNameLabelScope,omitempty"` + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + EnabledState *EnabledState `json:"enabledState,omitempty"` + HostName *string `json:"hostName,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointpropertiesupdateparameters.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointpropertiesupdateparameters.go new file mode 100644 index 00000000000..8611ce0d850 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointpropertiesupdateparameters.go @@ -0,0 +1,9 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointPropertiesUpdateParameters struct { + EnabledState *EnabledState `json:"enabledState,omitempty"` + ProfileName *string `json:"profileName,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointupdateparameters.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointupdateparameters.go new file mode 100644 index 00000000000..5d6b6ab8d5b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdendpointupdateparameters.go @@ -0,0 +1,9 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointUpdateParameters struct { + Properties *AFDEndpointPropertiesUpdateParameters `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_afdpurgeparameters.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdpurgeparameters.go new file mode 100644 index 00000000000..7fa33e59b86 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_afdpurgeparameters.go @@ -0,0 +1,9 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdPurgeParameters struct { + ContentPaths []string `json:"contentPaths"` + Domains *[]string `json:"domains,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_usage.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_usage.go new file mode 100644 index 00000000000..e1410730af5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_usage.go @@ -0,0 +1,12 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Usage struct { + CurrentValue int64 `json:"currentValue"` + Id *string `json:"id,omitempty"` + Limit int64 `json:"limit"` + Name UsageName `json:"name"` + Unit UsageUnit `json:"unit"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_usagename.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_usagename.go new file mode 100644 index 00000000000..e00d7fba315 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_usagename.go @@ -0,0 +1,9 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomaininput.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomaininput.go new file mode 100644 index 00000000000..cdd8ec4488e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomaininput.go @@ -0,0 +1,8 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainInput struct { + HostName string `json:"hostName"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomainoutput.go b/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomainoutput.go new file mode 100644 index 00000000000..2aedfdc5b18 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/model_validatecustomdomainoutput.go @@ -0,0 +1,10 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainOutput struct { + CustomDomainValidated *bool `json:"customDomainValidated,omitempty"` + Message *string `json:"message,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/predicates.go b/resource-manager/cdn/2024-02-01/afdendpoints/predicates.go new file mode 100644 index 00000000000..f8a26db0ed7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/predicates.go @@ -0,0 +1,55 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p AFDEndpointOperationPredicate) Matches(input AFDEndpoint) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type UsageOperationPredicate struct { + CurrentValue *int64 + Id *string + Limit *int64 +} + +func (p UsageOperationPredicate) Matches(input Usage) bool { + + if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Limit != nil && *p.Limit != input.Limit { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/afdendpoints/version.go b/resource-manager/cdn/2024-02-01/afdendpoints/version.go new file mode 100644 index 00000000000..54c160f6aea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdendpoints/version.go @@ -0,0 +1,10 @@ +package afdendpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/afdendpoints/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/README.md b/resource-manager/cdn/2024-02-01/afdorigingroups/README.md new file mode 100644 index 00000000000..d0c9539bb04 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/README.md @@ -0,0 +1,116 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigingroups` Documentation + +The `afdorigingroups` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigingroups" +``` + + +### Client Initialization + +```go +client := afdorigingroups.NewAFDOriginGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AFDOriginGroupsClient.Create` + +```go +ctx := context.TODO() +id := afdorigingroups.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +payload := afdorigingroups.AFDOriginGroup{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDOriginGroupsClient.Delete` + +```go +ctx := context.TODO() +id := afdorigingroups.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDOriginGroupsClient.Get` + +```go +ctx := context.TODO() +id := afdorigingroups.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDOriginGroupsClient.ListByProfile` + +```go +ctx := context.TODO() +id := afdorigingroups.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDOriginGroupsClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := afdorigingroups.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDOriginGroupsClient.Update` + +```go +ctx := context.TODO() +id := afdorigingroups.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +payload := afdorigingroups.AFDOriginGroupUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/client.go b/resource-manager/cdn/2024-02-01/afdorigingroups/client.go new file mode 100644 index 00000000000..76e2701d5ab --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/client.go @@ -0,0 +1,26 @@ +package afdorigingroups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroupsClient struct { + Client *resourcemanager.Client +} + +func NewAFDOriginGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDOriginGroupsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "afdorigingroups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AFDOriginGroupsClient: %+v", err) + } + + return &AFDOriginGroupsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/constants.go b/resource-manager/cdn/2024-02-01/afdorigingroups/constants.go new file mode 100644 index 00000000000..88b86252913 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/constants.go @@ -0,0 +1,274 @@ +package afdorigingroups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type EnabledState string + +const ( + EnabledStateDisabled EnabledState = "Disabled" + EnabledStateEnabled EnabledState = "Enabled" +) + +func PossibleValuesForEnabledState() []string { + return []string{ + string(EnabledStateDisabled), + string(EnabledStateEnabled), + } +} + +func (s *EnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnabledState(input string) (*EnabledState, error) { + vals := map[string]EnabledState{ + "disabled": EnabledStateDisabled, + "enabled": EnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnabledState(input) + return &out, nil +} + +type HealthProbeRequestType string + +const ( + HealthProbeRequestTypeGET HealthProbeRequestType = "GET" + HealthProbeRequestTypeHEAD HealthProbeRequestType = "HEAD" + HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet" +) + +func PossibleValuesForHealthProbeRequestType() []string { + return []string{ + string(HealthProbeRequestTypeGET), + string(HealthProbeRequestTypeHEAD), + string(HealthProbeRequestTypeNotSet), + } +} + +func (s *HealthProbeRequestType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHealthProbeRequestType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHealthProbeRequestType(input string) (*HealthProbeRequestType, error) { + vals := map[string]HealthProbeRequestType{ + "get": HealthProbeRequestTypeGET, + "head": HealthProbeRequestTypeHEAD, + "notset": HealthProbeRequestTypeNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HealthProbeRequestType(input) + return &out, nil +} + +type ProbeProtocol string + +const ( + ProbeProtocolHTTP ProbeProtocol = "Http" + ProbeProtocolHTTPS ProbeProtocol = "Https" + ProbeProtocolNotSet ProbeProtocol = "NotSet" +) + +func PossibleValuesForProbeProtocol() []string { + return []string{ + string(ProbeProtocolHTTP), + string(ProbeProtocolHTTPS), + string(ProbeProtocolNotSet), + } +} + +func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProbeProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProbeProtocol(input string) (*ProbeProtocol, error) { + vals := map[string]ProbeProtocol{ + "http": ProbeProtocolHTTP, + "https": ProbeProtocolHTTPS, + "notset": ProbeProtocolNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProbeProtocol(input) + return &out, nil +} + +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +func PossibleValuesForUsageUnit() []string { + return []string{ + string(UsageUnitCount), + } +} + +func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageUnit(input string) (*UsageUnit, error) { + vals := map[string]UsageUnit{ + "count": UsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup.go b/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup.go new file mode 100644 index 00000000000..6ea9d092cd4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup.go @@ -0,0 +1,139 @@ +package afdorigingroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&OriginGroupId{}) +} + +var _ resourceids.ResourceId = &OriginGroupId{} + +// OriginGroupId is a struct representing the Resource ID for a Origin Group +type OriginGroupId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + OriginGroupName string +} + +// NewOriginGroupID returns a new OriginGroupId struct +func NewOriginGroupID(subscriptionId string, resourceGroupName string, profileName string, originGroupName string) OriginGroupId { + return OriginGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + OriginGroupName: originGroupName, + } +} + +// ParseOriginGroupID parses 'input' into a OriginGroupId +func ParseOriginGroupID(input string) (*OriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOriginGroupIDInsensitively parses 'input' case-insensitively into a OriginGroupId +// note: this method should only be used for API response data and not user input +func ParseOriginGroupIDInsensitively(input string) (*OriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OriginGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.OriginGroupName, ok = input.Parsed["originGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originGroupName", input) + } + + return nil +} + +// ValidateOriginGroupID checks that 'input' can be parsed as a Origin Group ID +func ValidateOriginGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOriginGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Origin Group ID +func (id OriginGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/originGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.OriginGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Origin Group ID +func (id OriginGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticOriginGroups", "originGroups", "originGroups"), + resourceids.UserSpecifiedSegment("originGroupName", "originGroupValue"), + } +} + +// String returns a human-readable description of this Origin Group ID +func (id OriginGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Origin Group Name: %q", id.OriginGroupName), + } + return fmt.Sprintf("Origin Group (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup_test.go b/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup_test.go new file mode 100644 index 00000000000..12838122ff6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/id_origingroup_test.go @@ -0,0 +1,327 @@ +package afdorigingroups + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &OriginGroupId{} + +func TestNewOriginGroupID(t *testing.T) { + id := NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.OriginGroupName != "originGroupValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginGroupName'", id.OriginGroupName, "originGroupValue") + } +} + +func TestFormatOriginGroupID(t *testing.T) { + actual := NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseOriginGroupID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestParseOriginGroupIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + OriginGroupName: "oRiGiNgRoUpVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestSegmentsForOriginGroupId(t *testing.T) { + segments := OriginGroupId{}.Segments() + if len(segments) == 0 { + t.Fatalf("OriginGroupId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile.go b/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile.go new file mode 100644 index 00000000000..131c5ada656 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile.go @@ -0,0 +1,130 @@ +package afdorigingroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile_test.go b/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile_test.go new file mode 100644 index 00000000000..b45a69b67be --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/id_profile_test.go @@ -0,0 +1,282 @@ +package afdorigingroups + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_create.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_create.go new file mode 100644 index 00000000000..5538fb9d110 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_create.go @@ -0,0 +1,76 @@ +package afdorigingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDOriginGroup +} + +// Create ... +func (c AFDOriginGroupsClient) Create(ctx context.Context, id OriginGroupId, input AFDOriginGroup) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c AFDOriginGroupsClient) CreateThenPoll(ctx context.Context, id OriginGroupId, input AFDOriginGroup) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_delete.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_delete.go new file mode 100644 index 00000000000..c95a6000a7e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_delete.go @@ -0,0 +1,71 @@ +package afdorigingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c AFDOriginGroupsClient) Delete(ctx context.Context, id OriginGroupId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c AFDOriginGroupsClient) DeleteThenPoll(ctx context.Context, id OriginGroupId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_get.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_get.go new file mode 100644 index 00000000000..7d6139ef937 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_get.go @@ -0,0 +1,53 @@ +package afdorigingroups + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AFDOriginGroup +} + +// Get ... +func (c AFDOriginGroupsClient) Get(ctx context.Context, id OriginGroupId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AFDOriginGroup + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_listbyprofile.go new file mode 100644 index 00000000000..41c9b62d2bf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_listbyprofile.go @@ -0,0 +1,105 @@ +package afdorigingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AFDOriginGroup +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []AFDOriginGroup +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c AFDOriginGroupsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/originGroups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AFDOriginGroup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c AFDOriginGroupsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, AFDOriginGroupOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDOriginGroupsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate AFDOriginGroupOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]AFDOriginGroup, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_listresourceusage.go new file mode 100644 index 00000000000..bd98ba2d547 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_listresourceusage.go @@ -0,0 +1,105 @@ +package afdorigingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Usage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []Usage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c AFDOriginGroupsClient) ListResourceUsage(ctx context.Context, id OriginGroupId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/usages", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Usage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c AFDOriginGroupsClient) ListResourceUsageComplete(ctx context.Context, id OriginGroupId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDOriginGroupsClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id OriginGroupId, predicate UsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]Usage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/method_update.go b/resource-manager/cdn/2024-02-01/afdorigingroups/method_update.go new file mode 100644 index 00000000000..caad347178d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/method_update.go @@ -0,0 +1,75 @@ +package afdorigingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDOriginGroup +} + +// Update ... +func (c AFDOriginGroupsClient) Update(ctx context.Context, id OriginGroupId, input AFDOriginGroupUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c AFDOriginGroupsClient) UpdateThenPoll(ctx context.Context, id OriginGroupId, input AFDOriginGroupUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroup.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroup.go new file mode 100644 index 00000000000..4ca3aa687ba --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroup.go @@ -0,0 +1,16 @@ +package afdorigingroups + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *AFDOriginGroupProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupproperties.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupproperties.go new file mode 100644 index 00000000000..c4ffcea699b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupproperties.go @@ -0,0 +1,14 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroupProperties struct { + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"` + LoadBalancingSettings *LoadBalancingSettingsParameters `json:"loadBalancingSettings,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` + SessionAffinityState *EnabledState `json:"sessionAffinityState,omitempty"` + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdateparameters.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdateparameters.go new file mode 100644 index 00000000000..907c42b1e77 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdateparameters.go @@ -0,0 +1,8 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroupUpdateParameters struct { + Properties *AFDOriginGroupUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdatepropertiesparameters.go new file mode 100644 index 00000000000..0cbb49b9466 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_afdorigingroupupdatepropertiesparameters.go @@ -0,0 +1,12 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroupUpdatePropertiesParameters struct { + HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"` + LoadBalancingSettings *LoadBalancingSettingsParameters `json:"loadBalancingSettings,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + SessionAffinityState *EnabledState `json:"sessionAffinityState,omitempty"` + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_healthprobeparameters.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_healthprobeparameters.go new file mode 100644 index 00000000000..987e8ba933d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_healthprobeparameters.go @@ -0,0 +1,11 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HealthProbeParameters struct { + ProbeIntervalInSeconds *int64 `json:"probeIntervalInSeconds,omitempty"` + ProbePath *string `json:"probePath,omitempty"` + ProbeProtocol *ProbeProtocol `json:"probeProtocol,omitempty"` + ProbeRequestType *HealthProbeRequestType `json:"probeRequestType,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_loadbalancingsettingsparameters.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_loadbalancingsettingsparameters.go new file mode 100644 index 00000000000..989f3fe3dd8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_loadbalancingsettingsparameters.go @@ -0,0 +1,10 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadBalancingSettingsParameters struct { + AdditionalLatencyInMilliseconds *int64 `json:"additionalLatencyInMilliseconds,omitempty"` + SampleSize *int64 `json:"sampleSize,omitempty"` + SuccessfulSamplesRequired *int64 `json:"successfulSamplesRequired,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_usage.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_usage.go new file mode 100644 index 00000000000..eaf251c8972 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_usage.go @@ -0,0 +1,12 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Usage struct { + CurrentValue int64 `json:"currentValue"` + Id *string `json:"id,omitempty"` + Limit int64 `json:"limit"` + Name UsageName `json:"name"` + Unit UsageUnit `json:"unit"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/model_usagename.go b/resource-manager/cdn/2024-02-01/afdorigingroups/model_usagename.go new file mode 100644 index 00000000000..28c2628adc3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/model_usagename.go @@ -0,0 +1,9 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/predicates.go b/resource-manager/cdn/2024-02-01/afdorigingroups/predicates.go new file mode 100644 index 00000000000..24de95a48e3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/predicates.go @@ -0,0 +1,50 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginGroupOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p AFDOriginGroupOperationPredicate) Matches(input AFDOriginGroup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type UsageOperationPredicate struct { + CurrentValue *int64 + Id *string + Limit *int64 +} + +func (p UsageOperationPredicate) Matches(input Usage) bool { + + if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Limit != nil && *p.Limit != input.Limit { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/afdorigingroups/version.go b/resource-manager/cdn/2024-02-01/afdorigingroups/version.go new file mode 100644 index 00000000000..44cdfcb89df --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigingroups/version.go @@ -0,0 +1,10 @@ +package afdorigingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/afdorigingroups/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/README.md b/resource-manager/cdn/2024-02-01/afdorigins/README.md new file mode 100644 index 00000000000..a80c1debf59 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigins` Documentation + +The `afdorigins` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigins" +``` + + +### Client Initialization + +```go +client := afdorigins.NewAFDOriginsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AFDOriginsClient.Create` + +```go +ctx := context.TODO() +id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue") + +payload := afdorigins.AFDOrigin{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDOriginsClient.Delete` + +```go +ctx := context.TODO() +id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDOriginsClient.Get` + +```go +ctx := context.TODO() +id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDOriginsClient.ListByOriginGroup` + +```go +ctx := context.TODO() +id := afdorigins.NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + +// alternatively `client.ListByOriginGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByOriginGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDOriginsClient.Update` + +```go +ctx := context.TODO() +id := afdorigins.NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue") + +payload := afdorigins.AFDOriginUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/afdorigins/client.go b/resource-manager/cdn/2024-02-01/afdorigins/client.go new file mode 100644 index 00000000000..44159420ff1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/client.go @@ -0,0 +1,26 @@ +package afdorigins + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginsClient struct { + Client *resourcemanager.Client +} + +func NewAFDOriginsClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDOriginsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "afdorigins", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AFDOriginsClient: %+v", err) + } + + return &AFDOriginsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/constants.go b/resource-manager/cdn/2024-02-01/afdorigins/constants.go new file mode 100644 index 00000000000..78f584111ad --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/constants.go @@ -0,0 +1,198 @@ +package afdorigins + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type EnabledState string + +const ( + EnabledStateDisabled EnabledState = "Disabled" + EnabledStateEnabled EnabledState = "Enabled" +) + +func PossibleValuesForEnabledState() []string { + return []string{ + string(EnabledStateDisabled), + string(EnabledStateEnabled), + } +} + +func (s *EnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnabledState(input string) (*EnabledState, error) { + vals := map[string]EnabledState{ + "disabled": EnabledStateDisabled, + "enabled": EnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnabledState(input) + return &out, nil +} + +type SharedPrivateLinkResourceStatus string + +const ( + SharedPrivateLinkResourceStatusApproved SharedPrivateLinkResourceStatus = "Approved" + SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected" + SharedPrivateLinkResourceStatusPending SharedPrivateLinkResourceStatus = "Pending" + SharedPrivateLinkResourceStatusRejected SharedPrivateLinkResourceStatus = "Rejected" + SharedPrivateLinkResourceStatusTimeout SharedPrivateLinkResourceStatus = "Timeout" +) + +func PossibleValuesForSharedPrivateLinkResourceStatus() []string { + return []string{ + string(SharedPrivateLinkResourceStatusApproved), + string(SharedPrivateLinkResourceStatusDisconnected), + string(SharedPrivateLinkResourceStatusPending), + string(SharedPrivateLinkResourceStatusRejected), + string(SharedPrivateLinkResourceStatusTimeout), + } +} + +func (s *SharedPrivateLinkResourceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSharedPrivateLinkResourceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSharedPrivateLinkResourceStatus(input string) (*SharedPrivateLinkResourceStatus, error) { + vals := map[string]SharedPrivateLinkResourceStatus{ + "approved": SharedPrivateLinkResourceStatusApproved, + "disconnected": SharedPrivateLinkResourceStatusDisconnected, + "pending": SharedPrivateLinkResourceStatusPending, + "rejected": SharedPrivateLinkResourceStatusRejected, + "timeout": SharedPrivateLinkResourceStatusTimeout, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SharedPrivateLinkResourceStatus(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup.go b/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup.go new file mode 100644 index 00000000000..3886ac6e3fa --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup.go @@ -0,0 +1,139 @@ +package afdorigins + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&OriginGroupId{}) +} + +var _ resourceids.ResourceId = &OriginGroupId{} + +// OriginGroupId is a struct representing the Resource ID for a Origin Group +type OriginGroupId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + OriginGroupName string +} + +// NewOriginGroupID returns a new OriginGroupId struct +func NewOriginGroupID(subscriptionId string, resourceGroupName string, profileName string, originGroupName string) OriginGroupId { + return OriginGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + OriginGroupName: originGroupName, + } +} + +// ParseOriginGroupID parses 'input' into a OriginGroupId +func ParseOriginGroupID(input string) (*OriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOriginGroupIDInsensitively parses 'input' case-insensitively into a OriginGroupId +// note: this method should only be used for API response data and not user input +func ParseOriginGroupIDInsensitively(input string) (*OriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OriginGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.OriginGroupName, ok = input.Parsed["originGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originGroupName", input) + } + + return nil +} + +// ValidateOriginGroupID checks that 'input' can be parsed as a Origin Group ID +func ValidateOriginGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOriginGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Origin Group ID +func (id OriginGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/originGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.OriginGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Origin Group ID +func (id OriginGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticOriginGroups", "originGroups", "originGroups"), + resourceids.UserSpecifiedSegment("originGroupName", "originGroupValue"), + } +} + +// String returns a human-readable description of this Origin Group ID +func (id OriginGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Origin Group Name: %q", id.OriginGroupName), + } + return fmt.Sprintf("Origin Group (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup_test.go b/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup_test.go new file mode 100644 index 00000000000..1f37ee3b948 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/id_origingroup_test.go @@ -0,0 +1,327 @@ +package afdorigins + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &OriginGroupId{} + +func TestNewOriginGroupID(t *testing.T) { + id := NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.OriginGroupName != "originGroupValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginGroupName'", id.OriginGroupName, "originGroupValue") + } +} + +func TestFormatOriginGroupID(t *testing.T) { + actual := NewOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseOriginGroupID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestParseOriginGroupIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE", + Expected: &OriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + OriginGroupName: "oRiGiNgRoUpVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestSegmentsForOriginGroupId(t *testing.T) { + segments := OriginGroupId{}.Segments() + if len(segments) == 0 { + t.Fatalf("OriginGroupId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin.go b/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin.go new file mode 100644 index 00000000000..1056a384210 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin.go @@ -0,0 +1,148 @@ +package afdorigins + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&OriginGroupOriginId{}) +} + +var _ resourceids.ResourceId = &OriginGroupOriginId{} + +// OriginGroupOriginId is a struct representing the Resource ID for a Origin Group Origin +type OriginGroupOriginId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + OriginGroupName string + OriginName string +} + +// NewOriginGroupOriginID returns a new OriginGroupOriginId struct +func NewOriginGroupOriginID(subscriptionId string, resourceGroupName string, profileName string, originGroupName string, originName string) OriginGroupOriginId { + return OriginGroupOriginId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + OriginGroupName: originGroupName, + OriginName: originName, + } +} + +// ParseOriginGroupOriginID parses 'input' into a OriginGroupOriginId +func ParseOriginGroupOriginID(input string) (*OriginGroupOriginId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupOriginId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupOriginId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOriginGroupOriginIDInsensitively parses 'input' case-insensitively into a OriginGroupOriginId +// note: this method should only be used for API response data and not user input +func ParseOriginGroupOriginIDInsensitively(input string) (*OriginGroupOriginId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginGroupOriginId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginGroupOriginId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OriginGroupOriginId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.OriginGroupName, ok = input.Parsed["originGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originGroupName", input) + } + + if id.OriginName, ok = input.Parsed["originName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originName", input) + } + + return nil +} + +// ValidateOriginGroupOriginID checks that 'input' can be parsed as a Origin Group Origin ID +func ValidateOriginGroupOriginID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOriginGroupOriginID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Origin Group Origin ID +func (id OriginGroupOriginId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/originGroups/%s/origins/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.OriginGroupName, id.OriginName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Origin Group Origin ID +func (id OriginGroupOriginId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticOriginGroups", "originGroups", "originGroups"), + resourceids.UserSpecifiedSegment("originGroupName", "originGroupValue"), + resourceids.StaticSegment("staticOrigins", "origins", "origins"), + resourceids.UserSpecifiedSegment("originName", "originValue"), + } +} + +// String returns a human-readable description of this Origin Group Origin ID +func (id OriginGroupOriginId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Origin Group Name: %q", id.OriginGroupName), + fmt.Sprintf("Origin Name: %q", id.OriginName), + } + return fmt.Sprintf("Origin Group Origin (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin_test.go b/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin_test.go new file mode 100644 index 00000000000..f56d87ab590 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/id_origingrouporigin_test.go @@ -0,0 +1,372 @@ +package afdorigins + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &OriginGroupOriginId{} + +func TestNewOriginGroupOriginID(t *testing.T) { + id := NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.OriginGroupName != "originGroupValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginGroupName'", id.OriginGroupName, "originGroupValue") + } + + if id.OriginName != "originValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginName'", id.OriginName, "originValue") + } +} + +func TestFormatOriginGroupOriginID(t *testing.T) { + actual := NewOriginGroupOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "originGroupValue", "originValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins/originValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseOriginGroupOriginID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupOriginId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins/originValue", + Expected: &OriginGroupOriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + OriginName: "originValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins/originValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupOriginID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + if actual.OriginName != v.Expected.OriginName { + t.Fatalf("Expected %q but got %q for OriginName", v.Expected.OriginName, actual.OriginName) + } + + } +} + +func TestParseOriginGroupOriginIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginGroupOriginId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/oRiGiNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins/originValue", + Expected: &OriginGroupOriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + OriginGroupName: "originGroupValue", + OriginName: "originValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/originGroups/originGroupValue/origins/originValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/oRiGiNs/oRiGiNvAlUe", + Expected: &OriginGroupOriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + OriginGroupName: "oRiGiNgRoUpVaLuE", + OriginName: "oRiGiNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/oRiGiNs/oRiGiNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginGroupOriginIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + if actual.OriginName != v.Expected.OriginName { + t.Fatalf("Expected %q but got %q for OriginName", v.Expected.OriginName, actual.OriginName) + } + + } +} + +func TestSegmentsForOriginGroupOriginId(t *testing.T) { + segments := OriginGroupOriginId{}.Segments() + if len(segments) == 0 { + t.Fatalf("OriginGroupOriginId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/method_create.go b/resource-manager/cdn/2024-02-01/afdorigins/method_create.go new file mode 100644 index 00000000000..77dd05478d0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/method_create.go @@ -0,0 +1,76 @@ +package afdorigins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDOrigin +} + +// Create ... +func (c AFDOriginsClient) Create(ctx context.Context, id OriginGroupOriginId, input AFDOrigin) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c AFDOriginsClient) CreateThenPoll(ctx context.Context, id OriginGroupOriginId, input AFDOrigin) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/method_delete.go b/resource-manager/cdn/2024-02-01/afdorigins/method_delete.go new file mode 100644 index 00000000000..b8373b1a8ae --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/method_delete.go @@ -0,0 +1,71 @@ +package afdorigins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c AFDOriginsClient) Delete(ctx context.Context, id OriginGroupOriginId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c AFDOriginsClient) DeleteThenPoll(ctx context.Context, id OriginGroupOriginId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/method_get.go b/resource-manager/cdn/2024-02-01/afdorigins/method_get.go new file mode 100644 index 00000000000..07d5d79dc8a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/method_get.go @@ -0,0 +1,53 @@ +package afdorigins + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AFDOrigin +} + +// Get ... +func (c AFDOriginsClient) Get(ctx context.Context, id OriginGroupOriginId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AFDOrigin + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/method_listbyorigingroup.go b/resource-manager/cdn/2024-02-01/afdorigins/method_listbyorigingroup.go new file mode 100644 index 00000000000..d1791399e80 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/method_listbyorigingroup.go @@ -0,0 +1,105 @@ +package afdorigins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByOriginGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AFDOrigin +} + +type ListByOriginGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []AFDOrigin +} + +type ListByOriginGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByOriginGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByOriginGroup ... +func (c AFDOriginsClient) ListByOriginGroup(ctx context.Context, id OriginGroupId) (result ListByOriginGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByOriginGroupCustomPager{}, + Path: fmt.Sprintf("%s/origins", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AFDOrigin `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByOriginGroupComplete retrieves all the results into a single object +func (c AFDOriginsClient) ListByOriginGroupComplete(ctx context.Context, id OriginGroupId) (ListByOriginGroupCompleteResult, error) { + return c.ListByOriginGroupCompleteMatchingPredicate(ctx, id, AFDOriginOperationPredicate{}) +} + +// ListByOriginGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDOriginsClient) ListByOriginGroupCompleteMatchingPredicate(ctx context.Context, id OriginGroupId, predicate AFDOriginOperationPredicate) (result ListByOriginGroupCompleteResult, err error) { + items := make([]AFDOrigin, 0) + + resp, err := c.ListByOriginGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByOriginGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/method_update.go b/resource-manager/cdn/2024-02-01/afdorigins/method_update.go new file mode 100644 index 00000000000..ea31f9b396a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/method_update.go @@ -0,0 +1,75 @@ +package afdorigins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AFDOrigin +} + +// Update ... +func (c AFDOriginsClient) Update(ctx context.Context, id OriginGroupOriginId, input AFDOriginUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c AFDOriginsClient) UpdateThenPoll(ctx context.Context, id OriginGroupOriginId, input AFDOriginUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_afdorigin.go b/resource-manager/cdn/2024-02-01/afdorigins/model_afdorigin.go new file mode 100644 index 00000000000..4ebe2c0ac9d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_afdorigin.go @@ -0,0 +1,16 @@ +package afdorigins + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOrigin struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *AFDOriginProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginproperties.go b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginproperties.go new file mode 100644 index 00000000000..1fa0dcacb4c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginproperties.go @@ -0,0 +1,20 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginProperties struct { + AzureOrigin *ResourceReference `json:"azureOrigin,omitempty"` + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + EnabledState *EnabledState `json:"enabledState,omitempty"` + EnforceCertificateNameCheck *bool `json:"enforceCertificateNameCheck,omitempty"` + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + HostName *string `json:"hostName,omitempty"` + OriginGroupName *string `json:"originGroupName,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + Priority *int64 `json:"priority,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdateparameters.go b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdateparameters.go new file mode 100644 index 00000000000..679950c6d4f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdateparameters.go @@ -0,0 +1,8 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginUpdateParameters struct { + Properties *AFDOriginUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdatepropertiesparameters.go new file mode 100644 index 00000000000..e1f958eac8b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_afdoriginupdatepropertiesparameters.go @@ -0,0 +1,18 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginUpdatePropertiesParameters struct { + AzureOrigin *ResourceReference `json:"azureOrigin,omitempty"` + EnabledState *EnabledState `json:"enabledState,omitempty"` + EnforceCertificateNameCheck *bool `json:"enforceCertificateNameCheck,omitempty"` + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + HostName *string `json:"hostName,omitempty"` + OriginGroupName *string `json:"originGroupName,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + Priority *int64 `json:"priority,omitempty"` + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties `json:"sharedPrivateLinkResource,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_resourcereference.go b/resource-manager/cdn/2024-02-01/afdorigins/model_resourcereference.go new file mode 100644 index 00000000000..5314652c752 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_resourcereference.go @@ -0,0 +1,8 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/model_sharedprivatelinkresourceproperties.go b/resource-manager/cdn/2024-02-01/afdorigins/model_sharedprivatelinkresourceproperties.go new file mode 100644 index 00000000000..e8a77e5c8c7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/model_sharedprivatelinkresourceproperties.go @@ -0,0 +1,12 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharedPrivateLinkResourceProperties struct { + GroupId *string `json:"groupId,omitempty"` + PrivateLink *ResourceReference `json:"privateLink,omitempty"` + PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"` + RequestMessage *string `json:"requestMessage,omitempty"` + Status *SharedPrivateLinkResourceStatus `json:"status,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/predicates.go b/resource-manager/cdn/2024-02-01/afdorigins/predicates.go new file mode 100644 index 00000000000..44ceab3f730 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/predicates.go @@ -0,0 +1,27 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDOriginOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p AFDOriginOperationPredicate) Matches(input AFDOrigin) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/afdorigins/version.go b/resource-manager/cdn/2024-02-01/afdorigins/version.go new file mode 100644 index 00000000000..90bd8ff2562 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdorigins/version.go @@ -0,0 +1,10 @@ +package afdorigins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/afdorigins/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/README.md b/resource-manager/cdn/2024-02-01/afdprofiles/README.md new file mode 100644 index 00000000000..8ce1cfb8fa9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdprofiles` Documentation + +The `afdprofiles` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdprofiles" +``` + + +### Client Initialization + +```go +client := afdprofiles.NewAFDProfilesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AFDProfilesClient.CheckEndpointNameAvailability` + +```go +ctx := context.TODO() +id := afdprofiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := afdprofiles.CheckEndpointNameAvailabilityInput{ + // ... +} + + +read, err := client.CheckEndpointNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDProfilesClient.CheckHostNameAvailability` + +```go +ctx := context.TODO() +id := afdprofiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := afdprofiles.CheckHostNameAvailabilityInput{ + // ... +} + + +read, err := client.CheckHostNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AFDProfilesClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := afdprofiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AFDProfilesClient.Upgrade` + +```go +ctx := context.TODO() +id := afdprofiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := afdprofiles.ProfileUpgradeParameters{ + // ... +} + + +if err := client.UpgradeThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AFDProfilesClient.ValidateSecret` + +```go +ctx := context.TODO() +id := afdprofiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := afdprofiles.ValidateSecretInput{ + // ... +} + + +read, err := client.ValidateSecret(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/client.go b/resource-manager/cdn/2024-02-01/afdprofiles/client.go new file mode 100644 index 00000000000..1b225a4c76a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/client.go @@ -0,0 +1,26 @@ +package afdprofiles + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDProfilesClient struct { + Client *resourcemanager.Client +} + +func NewAFDProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*AFDProfilesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "afdprofiles", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AFDProfilesClient: %+v", err) + } + + return &AFDProfilesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/constants.go b/resource-manager/cdn/2024-02-01/afdprofiles/constants.go new file mode 100644 index 00000000000..c6ab80b56dd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/constants.go @@ -0,0 +1,580 @@ +package afdprofiles + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AutoGeneratedDomainNameLabelScope string + +const ( + AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" + AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" + AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" + AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" +) + +func PossibleValuesForAutoGeneratedDomainNameLabelScope() []string { + return []string{ + string(AutoGeneratedDomainNameLabelScopeNoReuse), + string(AutoGeneratedDomainNameLabelScopeResourceGroupReuse), + string(AutoGeneratedDomainNameLabelScopeSubscriptionReuse), + string(AutoGeneratedDomainNameLabelScopeTenantReuse), + } +} + +func (s *AutoGeneratedDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoGeneratedDomainNameLabelScope(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoGeneratedDomainNameLabelScope(input string) (*AutoGeneratedDomainNameLabelScope, error) { + vals := map[string]AutoGeneratedDomainNameLabelScope{ + "noreuse": AutoGeneratedDomainNameLabelScopeNoReuse, + "resourcegroupreuse": AutoGeneratedDomainNameLabelScopeResourceGroupReuse, + "subscriptionreuse": AutoGeneratedDomainNameLabelScopeSubscriptionReuse, + "tenantreuse": AutoGeneratedDomainNameLabelScopeTenantReuse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoGeneratedDomainNameLabelScope(input) + return &out, nil +} + +type ProfileProvisioningState string + +const ( + ProfileProvisioningStateCreating ProfileProvisioningState = "Creating" + ProfileProvisioningStateDeleting ProfileProvisioningState = "Deleting" + ProfileProvisioningStateFailed ProfileProvisioningState = "Failed" + ProfileProvisioningStateSucceeded ProfileProvisioningState = "Succeeded" + ProfileProvisioningStateUpdating ProfileProvisioningState = "Updating" +) + +func PossibleValuesForProfileProvisioningState() []string { + return []string{ + string(ProfileProvisioningStateCreating), + string(ProfileProvisioningStateDeleting), + string(ProfileProvisioningStateFailed), + string(ProfileProvisioningStateSucceeded), + string(ProfileProvisioningStateUpdating), + } +} + +func (s *ProfileProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileProvisioningState(input string) (*ProfileProvisioningState, error) { + vals := map[string]ProfileProvisioningState{ + "creating": ProfileProvisioningStateCreating, + "deleting": ProfileProvisioningStateDeleting, + "failed": ProfileProvisioningStateFailed, + "succeeded": ProfileProvisioningStateSucceeded, + "updating": ProfileProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileProvisioningState(input) + return &out, nil +} + +type ProfileResourceState string + +const ( + ProfileResourceStateAbortingMigration ProfileResourceState = "AbortingMigration" + ProfileResourceStateActive ProfileResourceState = "Active" + ProfileResourceStateCommittingMigration ProfileResourceState = "CommittingMigration" + ProfileResourceStateCreating ProfileResourceState = "Creating" + ProfileResourceStateDeleting ProfileResourceState = "Deleting" + ProfileResourceStateDisabled ProfileResourceState = "Disabled" + ProfileResourceStateMigrated ProfileResourceState = "Migrated" + ProfileResourceStateMigrating ProfileResourceState = "Migrating" + ProfileResourceStatePendingMigrationCommit ProfileResourceState = "PendingMigrationCommit" +) + +func PossibleValuesForProfileResourceState() []string { + return []string{ + string(ProfileResourceStateAbortingMigration), + string(ProfileResourceStateActive), + string(ProfileResourceStateCommittingMigration), + string(ProfileResourceStateCreating), + string(ProfileResourceStateDeleting), + string(ProfileResourceStateDisabled), + string(ProfileResourceStateMigrated), + string(ProfileResourceStateMigrating), + string(ProfileResourceStatePendingMigrationCommit), + } +} + +func (s *ProfileResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileResourceState(input string) (*ProfileResourceState, error) { + vals := map[string]ProfileResourceState{ + "abortingmigration": ProfileResourceStateAbortingMigration, + "active": ProfileResourceStateActive, + "committingmigration": ProfileResourceStateCommittingMigration, + "creating": ProfileResourceStateCreating, + "deleting": ProfileResourceStateDeleting, + "disabled": ProfileResourceStateDisabled, + "migrated": ProfileResourceStateMigrated, + "migrating": ProfileResourceStateMigrating, + "pendingmigrationcommit": ProfileResourceStatePendingMigrationCommit, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileResourceState(input) + return &out, nil +} + +type ProfileScrubbingState string + +const ( + ProfileScrubbingStateDisabled ProfileScrubbingState = "Disabled" + ProfileScrubbingStateEnabled ProfileScrubbingState = "Enabled" +) + +func PossibleValuesForProfileScrubbingState() []string { + return []string{ + string(ProfileScrubbingStateDisabled), + string(ProfileScrubbingStateEnabled), + } +} + +func (s *ProfileScrubbingState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileScrubbingState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileScrubbingState(input string) (*ProfileScrubbingState, error) { + vals := map[string]ProfileScrubbingState{ + "disabled": ProfileScrubbingStateDisabled, + "enabled": ProfileScrubbingStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileScrubbingState(input) + return &out, nil +} + +type ResourceType string + +const ( + ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" + ResourceTypeMicrosoftPointCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" +) + +func PossibleValuesForResourceType() []string { + return []string{ + string(ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints), + string(ResourceTypeMicrosoftPointCdnProfilesEndpoints), + } +} + +func (s *ResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceType(input string) (*ResourceType, error) { + vals := map[string]ResourceType{ + "microsoft.cdn/profiles/afdendpoints": ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints, + "microsoft.cdn/profiles/endpoints": ResourceTypeMicrosoftPointCdnProfilesEndpoints, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceType(input) + return &out, nil +} + +type ScrubbingRuleEntryMatchOperator string + +const ( + ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" +) + +func PossibleValuesForScrubbingRuleEntryMatchOperator() []string { + return []string{ + string(ScrubbingRuleEntryMatchOperatorEqualsAny), + } +} + +func (s *ScrubbingRuleEntryMatchOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryMatchOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryMatchOperator(input string) (*ScrubbingRuleEntryMatchOperator, error) { + vals := map[string]ScrubbingRuleEntryMatchOperator{ + "equalsany": ScrubbingRuleEntryMatchOperatorEqualsAny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryMatchOperator(input) + return &out, nil +} + +type ScrubbingRuleEntryMatchVariable string + +const ( + ScrubbingRuleEntryMatchVariableQueryStringArgNames ScrubbingRuleEntryMatchVariable = "QueryStringArgNames" + ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" + ScrubbingRuleEntryMatchVariableRequestUri ScrubbingRuleEntryMatchVariable = "RequestUri" +) + +func PossibleValuesForScrubbingRuleEntryMatchVariable() []string { + return []string{ + string(ScrubbingRuleEntryMatchVariableQueryStringArgNames), + string(ScrubbingRuleEntryMatchVariableRequestIPAddress), + string(ScrubbingRuleEntryMatchVariableRequestUri), + } +} + +func (s *ScrubbingRuleEntryMatchVariable) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryMatchVariable(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryMatchVariable(input string) (*ScrubbingRuleEntryMatchVariable, error) { + vals := map[string]ScrubbingRuleEntryMatchVariable{ + "querystringargnames": ScrubbingRuleEntryMatchVariableQueryStringArgNames, + "requestipaddress": ScrubbingRuleEntryMatchVariableRequestIPAddress, + "requesturi": ScrubbingRuleEntryMatchVariableRequestUri, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryMatchVariable(input) + return &out, nil +} + +type ScrubbingRuleEntryState string + +const ( + ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" + ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" +) + +func PossibleValuesForScrubbingRuleEntryState() []string { + return []string{ + string(ScrubbingRuleEntryStateDisabled), + string(ScrubbingRuleEntryStateEnabled), + } +} + +func (s *ScrubbingRuleEntryState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryState(input string) (*ScrubbingRuleEntryState, error) { + vals := map[string]ScrubbingRuleEntryState{ + "disabled": ScrubbingRuleEntryStateDisabled, + "enabled": ScrubbingRuleEntryStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryState(input) + return &out, nil +} + +type SecretType string + +const ( + SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate" + SecretTypeCustomerCertificate SecretType = "CustomerCertificate" + SecretTypeManagedCertificate SecretType = "ManagedCertificate" + SecretTypeUrlSigningKey SecretType = "UrlSigningKey" +) + +func PossibleValuesForSecretType() []string { + return []string{ + string(SecretTypeAzureFirstPartyManagedCertificate), + string(SecretTypeCustomerCertificate), + string(SecretTypeManagedCertificate), + string(SecretTypeUrlSigningKey), + } +} + +func (s *SecretType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecretType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecretType(input string) (*SecretType, error) { + vals := map[string]SecretType{ + "azurefirstpartymanagedcertificate": SecretTypeAzureFirstPartyManagedCertificate, + "customercertificate": SecretTypeCustomerCertificate, + "managedcertificate": SecretTypeManagedCertificate, + "urlsigningkey": SecretTypeUrlSigningKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecretType(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameCustomVerizon SkuName = "Custom_Verizon" + SkuNamePremiumAzureFrontDoor SkuName = "Premium_AzureFrontDoor" + SkuNamePremiumVerizon SkuName = "Premium_Verizon" + SkuNameStandardAkamai SkuName = "Standard_Akamai" + SkuNameStandardAvgBandWidthChinaCdn SkuName = "Standard_AvgBandWidth_ChinaCdn" + SkuNameStandardAzureFrontDoor SkuName = "Standard_AzureFrontDoor" + SkuNameStandardChinaCdn SkuName = "Standard_ChinaCdn" + SkuNameStandardMicrosoft SkuName = "Standard_Microsoft" + SkuNameStandardNineFiveFiveBandWidthChinaCdn SkuName = "Standard_955BandWidth_ChinaCdn" + SkuNameStandardPlusAvgBandWidthChinaCdn SkuName = "StandardPlus_AvgBandWidth_ChinaCdn" + SkuNameStandardPlusChinaCdn SkuName = "StandardPlus_ChinaCdn" + SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn SkuName = "StandardPlus_955BandWidth_ChinaCdn" + SkuNameStandardVerizon SkuName = "Standard_Verizon" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameCustomVerizon), + string(SkuNamePremiumAzureFrontDoor), + string(SkuNamePremiumVerizon), + string(SkuNameStandardAkamai), + string(SkuNameStandardAvgBandWidthChinaCdn), + string(SkuNameStandardAzureFrontDoor), + string(SkuNameStandardChinaCdn), + string(SkuNameStandardMicrosoft), + string(SkuNameStandardNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardPlusAvgBandWidthChinaCdn), + string(SkuNameStandardPlusChinaCdn), + string(SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardVerizon), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "custom_verizon": SkuNameCustomVerizon, + "premium_azurefrontdoor": SkuNamePremiumAzureFrontDoor, + "premium_verizon": SkuNamePremiumVerizon, + "standard_akamai": SkuNameStandardAkamai, + "standard_avgbandwidth_chinacdn": SkuNameStandardAvgBandWidthChinaCdn, + "standard_azurefrontdoor": SkuNameStandardAzureFrontDoor, + "standard_chinacdn": SkuNameStandardChinaCdn, + "standard_microsoft": SkuNameStandardMicrosoft, + "standard_955bandwidth_chinacdn": SkuNameStandardNineFiveFiveBandWidthChinaCdn, + "standardplus_avgbandwidth_chinacdn": SkuNameStandardPlusAvgBandWidthChinaCdn, + "standardplus_chinacdn": SkuNameStandardPlusChinaCdn, + "standardplus_955bandwidth_chinacdn": SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn, + "standard_verizon": SkuNameStandardVerizon, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type Status string + +const ( + StatusAccessDenied Status = "AccessDenied" + StatusCertificateExpired Status = "CertificateExpired" + StatusInvalid Status = "Invalid" + StatusValid Status = "Valid" +) + +func PossibleValuesForStatus() []string { + return []string{ + string(StatusAccessDenied), + string(StatusCertificateExpired), + string(StatusInvalid), + string(StatusValid), + } +} + +func (s *Status) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStatus(input string) (*Status, error) { + vals := map[string]Status{ + "accessdenied": StatusAccessDenied, + "certificateexpired": StatusCertificateExpired, + "invalid": StatusInvalid, + "valid": StatusValid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Status(input) + return &out, nil +} + +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +func PossibleValuesForUsageUnit() []string { + return []string{ + string(UsageUnitCount), + } +} + +func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageUnit(input string) (*UsageUnit, error) { + vals := map[string]UsageUnit{ + "count": UsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/id_profile.go b/resource-manager/cdn/2024-02-01/afdprofiles/id_profile.go new file mode 100644 index 00000000000..9a12c55ad22 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/id_profile.go @@ -0,0 +1,130 @@ +package afdprofiles + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/id_profile_test.go b/resource-manager/cdn/2024-02-01/afdprofiles/id_profile_test.go new file mode 100644 index 00000000000..12fc61892f2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/id_profile_test.go @@ -0,0 +1,282 @@ +package afdprofiles + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/method_checkendpointnameavailability.go b/resource-manager/cdn/2024-02-01/afdprofiles/method_checkendpointnameavailability.go new file mode 100644 index 00000000000..e63995d03fd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/method_checkendpointnameavailability.go @@ -0,0 +1,58 @@ +package afdprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckEndpointNameAvailabilityOutput +} + +// CheckEndpointNameAvailability ... +func (c AFDProfilesClient) CheckEndpointNameAvailability(ctx context.Context, id ProfileId, input CheckEndpointNameAvailabilityInput) (result CheckEndpointNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/checkEndpointNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckEndpointNameAvailabilityOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/method_checkhostnameavailability.go b/resource-manager/cdn/2024-02-01/afdprofiles/method_checkhostnameavailability.go new file mode 100644 index 00000000000..7a0a2ca9451 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/method_checkhostnameavailability.go @@ -0,0 +1,58 @@ +package afdprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckHostNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityOutput +} + +// CheckHostNameAvailability ... +func (c AFDProfilesClient) CheckHostNameAvailability(ctx context.Context, id ProfileId, input CheckHostNameAvailabilityInput) (result CheckHostNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/checkHostNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/afdprofiles/method_listresourceusage.go new file mode 100644 index 00000000000..e0cb859dc7e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/method_listresourceusage.go @@ -0,0 +1,105 @@ +package afdprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Usage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []Usage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c AFDProfilesClient) ListResourceUsage(ctx context.Context, id ProfileId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/usages", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Usage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c AFDProfilesClient) ListResourceUsageComplete(ctx context.Context, id ProfileId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AFDProfilesClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate UsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]Usage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/method_upgrade.go b/resource-manager/cdn/2024-02-01/afdprofiles/method_upgrade.go new file mode 100644 index 00000000000..42c2540b228 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/method_upgrade.go @@ -0,0 +1,75 @@ +package afdprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpgradeOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Profile +} + +// Upgrade ... +func (c AFDProfilesClient) Upgrade(ctx context.Context, id ProfileId, input ProfileUpgradeParameters) (result UpgradeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/upgrade", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpgradeThenPoll performs Upgrade then polls until it's completed +func (c AFDProfilesClient) UpgradeThenPoll(ctx context.Context, id ProfileId, input ProfileUpgradeParameters) error { + result, err := c.Upgrade(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Upgrade: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Upgrade: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/method_validatesecret.go b/resource-manager/cdn/2024-02-01/afdprofiles/method_validatesecret.go new file mode 100644 index 00000000000..9fddaecaf92 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/method_validatesecret.go @@ -0,0 +1,58 @@ +package afdprofiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateSecretOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ValidateSecretOutput +} + +// ValidateSecret ... +func (c AFDProfilesClient) ValidateSecret(ctx context.Context, id ProfileId, input ValidateSecretInput) (result ValidateSecretOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validateSecret", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ValidateSecretOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityinput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityinput.go new file mode 100644 index 00000000000..96f0f41765e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityinput.go @@ -0,0 +1,10 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityInput struct { + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope `json:"autoGeneratedDomainNameLabelScope,omitempty"` + Name string `json:"name"` + Type ResourceType `json:"type"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityoutput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityoutput.go new file mode 100644 index 00000000000..0be9e951f73 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkendpointnameavailabilityoutput.go @@ -0,0 +1,11 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityOutput struct { + AvailableHostname *string `json:"availableHostname,omitempty"` + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_checkhostnameavailabilityinput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkhostnameavailabilityinput.go new file mode 100644 index 00000000000..b8248d20fbb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_checkhostnameavailabilityinput.go @@ -0,0 +1,8 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckHostNameAvailabilityInput struct { + HostName string `json:"hostName"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_checknameavailabilityoutput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_checknameavailabilityoutput.go new file mode 100644 index 00000000000..18e961a7842 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_checknameavailabilityoutput.go @@ -0,0 +1,10 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOutput struct { + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profile.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profile.go new file mode 100644 index 00000000000..f2093113bb4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profile.go @@ -0,0 +1,22 @@ +package afdprofiles + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Profile struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Kind *string `json:"kind,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ProfileProperties `json:"properties,omitempty"` + Sku Sku `json:"sku"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profilechangeskuwafmapping.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilechangeskuwafmapping.go new file mode 100644 index 00000000000..1e289e8c1fb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilechangeskuwafmapping.go @@ -0,0 +1,9 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileChangeSkuWafMapping struct { + ChangeToWafPolicy ResourceReference `json:"changeToWafPolicy"` + SecurityPolicyName string `json:"securityPolicyName"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profilelogscrubbing.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilelogscrubbing.go new file mode 100644 index 00000000000..6f89bfd997b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilelogscrubbing.go @@ -0,0 +1,9 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileLogScrubbing struct { + ScrubbingRules *[]ProfileScrubbingRules `json:"scrubbingRules,omitempty"` + State *ProfileScrubbingState `json:"state,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profileproperties.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profileproperties.go new file mode 100644 index 00000000000..72356670dfc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profileproperties.go @@ -0,0 +1,13 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileProperties struct { + ExtendedProperties *map[string]string `json:"extendedProperties,omitempty"` + FrontDoorId *string `json:"frontDoorId,omitempty"` + LogScrubbing *ProfileLogScrubbing `json:"logScrubbing,omitempty"` + OriginResponseTimeoutSeconds *int64 `json:"originResponseTimeoutSeconds,omitempty"` + ProvisioningState *ProfileProvisioningState `json:"provisioningState,omitempty"` + ResourceState *ProfileResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profilescrubbingrules.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilescrubbingrules.go new file mode 100644 index 00000000000..332a2f30281 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profilescrubbingrules.go @@ -0,0 +1,11 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileScrubbingRules struct { + MatchVariable ScrubbingRuleEntryMatchVariable `json:"matchVariable"` + Selector *string `json:"selector,omitempty"` + SelectorMatchOperator ScrubbingRuleEntryMatchOperator `json:"selectorMatchOperator"` + State *ScrubbingRuleEntryState `json:"state,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_profileupgradeparameters.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_profileupgradeparameters.go new file mode 100644 index 00000000000..2fe3ac4982d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_profileupgradeparameters.go @@ -0,0 +1,8 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileUpgradeParameters struct { + WafMappingList []ProfileChangeSkuWafMapping `json:"wafMappingList"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_resourcereference.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_resourcereference.go new file mode 100644 index 00000000000..6444e52fde2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_resourcereference.go @@ -0,0 +1,8 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_sku.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_sku.go new file mode 100644 index 00000000000..cb55c9a874a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_sku.go @@ -0,0 +1,8 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name *SkuName `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_usage.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_usage.go new file mode 100644 index 00000000000..7cc8e126873 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_usage.go @@ -0,0 +1,12 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Usage struct { + CurrentValue int64 `json:"currentValue"` + Id *string `json:"id,omitempty"` + Limit int64 `json:"limit"` + Name UsageName `json:"name"` + Unit UsageUnit `json:"unit"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_usagename.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_usagename.go new file mode 100644 index 00000000000..5540d53cdd5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_usagename.go @@ -0,0 +1,9 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretinput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretinput.go new file mode 100644 index 00000000000..d4e3198b21a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretinput.go @@ -0,0 +1,10 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateSecretInput struct { + SecretSource ResourceReference `json:"secretSource"` + SecretType SecretType `json:"secretType"` + SecretVersion *string `json:"secretVersion,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretoutput.go b/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretoutput.go new file mode 100644 index 00000000000..6a68c34cdd4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/model_validatesecretoutput.go @@ -0,0 +1,9 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateSecretOutput struct { + Message *string `json:"message,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/predicates.go b/resource-manager/cdn/2024-02-01/afdprofiles/predicates.go new file mode 100644 index 00000000000..0642e103835 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/predicates.go @@ -0,0 +1,27 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageOperationPredicate struct { + CurrentValue *int64 + Id *string + Limit *int64 +} + +func (p UsageOperationPredicate) Matches(input Usage) bool { + + if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Limit != nil && *p.Limit != input.Limit { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/afdprofiles/version.go b/resource-manager/cdn/2024-02-01/afdprofiles/version.go new file mode 100644 index 00000000000..e50b8360046 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/afdprofiles/version.go @@ -0,0 +1,10 @@ +package afdprofiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/afdprofiles/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/README.md b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/README.md new file mode 100644 index 00000000000..cadcb59680d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/README.md @@ -0,0 +1,42 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checkendpointnameavailability` Documentation + +The `checkendpointnameavailability` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checkendpointnameavailability" +``` + + +### Client Initialization + +```go +client := checkendpointnameavailability.NewCheckEndpointNameAvailabilityClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CheckEndpointNameAvailabilityClient.CheckEndpointNameAvailability` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +payload := checkendpointnameavailability.CheckEndpointNameAvailabilityInput{ + // ... +} + + +read, err := client.CheckEndpointNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/client.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/client.go new file mode 100644 index 00000000000..853d16cb4cf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/client.go @@ -0,0 +1,26 @@ +package checkendpointnameavailability + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityClient struct { + Client *resourcemanager.Client +} + +func NewCheckEndpointNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckEndpointNameAvailabilityClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "checkendpointnameavailability", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CheckEndpointNameAvailabilityClient: %+v", err) + } + + return &CheckEndpointNameAvailabilityClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/constants.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/constants.go new file mode 100644 index 00000000000..0197e78fa00 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/constants.go @@ -0,0 +1,98 @@ +package checkendpointnameavailability + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AutoGeneratedDomainNameLabelScope string + +const ( + AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" + AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" + AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" + AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" +) + +func PossibleValuesForAutoGeneratedDomainNameLabelScope() []string { + return []string{ + string(AutoGeneratedDomainNameLabelScopeNoReuse), + string(AutoGeneratedDomainNameLabelScopeResourceGroupReuse), + string(AutoGeneratedDomainNameLabelScopeSubscriptionReuse), + string(AutoGeneratedDomainNameLabelScopeTenantReuse), + } +} + +func (s *AutoGeneratedDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAutoGeneratedDomainNameLabelScope(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAutoGeneratedDomainNameLabelScope(input string) (*AutoGeneratedDomainNameLabelScope, error) { + vals := map[string]AutoGeneratedDomainNameLabelScope{ + "noreuse": AutoGeneratedDomainNameLabelScopeNoReuse, + "resourcegroupreuse": AutoGeneratedDomainNameLabelScopeResourceGroupReuse, + "subscriptionreuse": AutoGeneratedDomainNameLabelScopeSubscriptionReuse, + "tenantreuse": AutoGeneratedDomainNameLabelScopeTenantReuse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AutoGeneratedDomainNameLabelScope(input) + return &out, nil +} + +type ResourceType string + +const ( + ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" + ResourceTypeMicrosoftPointCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" +) + +func PossibleValuesForResourceType() []string { + return []string{ + string(ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints), + string(ResourceTypeMicrosoftPointCdnProfilesEndpoints), + } +} + +func (s *ResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceType(input string) (*ResourceType, error) { + vals := map[string]ResourceType{ + "microsoft.cdn/profiles/afdendpoints": ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints, + "microsoft.cdn/profiles/endpoints": ResourceTypeMicrosoftPointCdnProfilesEndpoints, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceType(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/method_checkendpointnameavailability.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/method_checkendpointnameavailability.go new file mode 100644 index 00000000000..ee77402ff6d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/method_checkendpointnameavailability.go @@ -0,0 +1,59 @@ +package checkendpointnameavailability + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckEndpointNameAvailabilityOutput +} + +// CheckEndpointNameAvailability ... +func (c CheckEndpointNameAvailabilityClient) CheckEndpointNameAvailability(ctx context.Context, id commonids.ResourceGroupId, input CheckEndpointNameAvailabilityInput) (result CheckEndpointNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/checkEndpointNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckEndpointNameAvailabilityOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityinput.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityinput.go new file mode 100644 index 00000000000..381cce48b2f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityinput.go @@ -0,0 +1,10 @@ +package checkendpointnameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityInput struct { + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope `json:"autoGeneratedDomainNameLabelScope,omitempty"` + Name string `json:"name"` + Type ResourceType `json:"type"` +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityoutput.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityoutput.go new file mode 100644 index 00000000000..b78fec5b55e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/model_checkendpointnameavailabilityoutput.go @@ -0,0 +1,11 @@ +package checkendpointnameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckEndpointNameAvailabilityOutput struct { + AvailableHostname *string `json:"availableHostname,omitempty"` + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/checkendpointnameavailability/version.go b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/version.go new file mode 100644 index 00000000000..7aa914ce04e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checkendpointnameavailability/version.go @@ -0,0 +1,10 @@ +package checkendpointnameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/checkendpointnameavailability/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/README.md b/resource-manager/cdn/2024-02-01/checknameavailability/README.md new file mode 100644 index 00000000000..4d548e03cd2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/README.md @@ -0,0 +1,40 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailability` Documentation + +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailability" +``` + + +### Client Initialization + +```go +client := checknameavailability.NewCheckNameAvailabilityClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CheckNameAvailabilityClient.CheckNameAvailability` + +```go +ctx := context.TODO() + +payload := checknameavailability.CheckNameAvailabilityInput{ + // ... +} + + +read, err := client.CheckNameAvailability(ctx, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/client.go b/resource-manager/cdn/2024-02-01/checknameavailability/client.go new file mode 100644 index 00000000000..777c8ea9e9f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/client.go @@ -0,0 +1,26 @@ +package checknameavailability + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityClient struct { + Client *resourcemanager.Client +} + +func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) + } + + return &CheckNameAvailabilityClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/constants.go b/resource-manager/cdn/2024-02-01/checknameavailability/constants.go new file mode 100644 index 00000000000..bf58e64a60c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/constants.go @@ -0,0 +1,51 @@ +package checknameavailability + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceType string + +const ( + ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" + ResourceTypeMicrosoftPointCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" +) + +func PossibleValuesForResourceType() []string { + return []string{ + string(ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints), + string(ResourceTypeMicrosoftPointCdnProfilesEndpoints), + } +} + +func (s *ResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceType(input string) (*ResourceType, error) { + vals := map[string]ResourceType{ + "microsoft.cdn/profiles/afdendpoints": ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints, + "microsoft.cdn/profiles/endpoints": ResourceTypeMicrosoftPointCdnProfilesEndpoints, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceType(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/method_checknameavailability.go b/resource-manager/cdn/2024-02-01/checknameavailability/method_checknameavailability.go new file mode 100644 index 00000000000..fbeb3627ddb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/method_checknameavailability.go @@ -0,0 +1,57 @@ +package checknameavailability + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityOutput +} + +// CheckNameAvailability ... +func (c CheckNameAvailabilityClient) CheckNameAvailability(ctx context.Context, input CheckNameAvailabilityInput) (result CheckNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: "/providers/Microsoft.CDN/checkNameAvailability", + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityinput.go b/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityinput.go new file mode 100644 index 00000000000..36311e975a8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityinput.go @@ -0,0 +1,9 @@ +package checknameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityInput struct { + Name string `json:"name"` + Type ResourceType `json:"type"` +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityoutput.go b/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityoutput.go new file mode 100644 index 00000000000..8b591ca1f86 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/model_checknameavailabilityoutput.go @@ -0,0 +1,10 @@ +package checknameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOutput struct { + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailability/version.go b/resource-manager/cdn/2024-02-01/checknameavailability/version.go new file mode 100644 index 00000000000..2c274298c92 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailability/version.go @@ -0,0 +1,10 @@ +package checknameavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/checknameavailability/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/README.md b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/README.md new file mode 100644 index 00000000000..fa8604025e4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/README.md @@ -0,0 +1,42 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription` Documentation + +The `checknameavailabilitywithsubscription` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription" +``` + + +### Client Initialization + +```go +client := checknameavailabilitywithsubscription.NewCheckNameAvailabilityWithSubscriptionClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CheckNameAvailabilityWithSubscriptionClient.CheckNameAvailabilityWithSubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := checknameavailabilitywithsubscription.CheckNameAvailabilityInput{ + // ... +} + + +read, err := client.CheckNameAvailabilityWithSubscription(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/client.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/client.go new file mode 100644 index 00000000000..2a9854f6b75 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/client.go @@ -0,0 +1,26 @@ +package checknameavailabilitywithsubscription + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityWithSubscriptionClient struct { + Client *resourcemanager.Client +} + +func NewCheckNameAvailabilityWithSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityWithSubscriptionClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitywithsubscription", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CheckNameAvailabilityWithSubscriptionClient: %+v", err) + } + + return &CheckNameAvailabilityWithSubscriptionClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/constants.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/constants.go new file mode 100644 index 00000000000..8dc9ec77e49 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/constants.go @@ -0,0 +1,51 @@ +package checknameavailabilitywithsubscription + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceType string + +const ( + ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" + ResourceTypeMicrosoftPointCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" +) + +func PossibleValuesForResourceType() []string { + return []string{ + string(ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints), + string(ResourceTypeMicrosoftPointCdnProfilesEndpoints), + } +} + +func (s *ResourceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceType(input string) (*ResourceType, error) { + vals := map[string]ResourceType{ + "microsoft.cdn/profiles/afdendpoints": ResourceTypeMicrosoftPointCdnProfilesAfdEndpoints, + "microsoft.cdn/profiles/endpoints": ResourceTypeMicrosoftPointCdnProfilesEndpoints, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceType(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/method_checknameavailabilitywithsubscription.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/method_checknameavailabilitywithsubscription.go new file mode 100644 index 00000000000..4f84ee148e8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/method_checknameavailabilitywithsubscription.go @@ -0,0 +1,59 @@ +package checknameavailabilitywithsubscription + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityWithSubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityOutput +} + +// CheckNameAvailabilityWithSubscription ... +func (c CheckNameAvailabilityWithSubscriptionClient) CheckNameAvailabilityWithSubscription(ctx context.Context, id commonids.SubscriptionId, input CheckNameAvailabilityInput) (result CheckNameAvailabilityWithSubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/checkNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityinput.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityinput.go new file mode 100644 index 00000000000..5025305279a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityinput.go @@ -0,0 +1,9 @@ +package checknameavailabilitywithsubscription + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityInput struct { + Name string `json:"name"` + Type ResourceType `json:"type"` +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityoutput.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityoutput.go new file mode 100644 index 00000000000..9c0781a0b16 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/model_checknameavailabilityoutput.go @@ -0,0 +1,10 @@ +package checknameavailabilitywithsubscription + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOutput struct { + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/version.go b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/version.go new file mode 100644 index 00000000000..c7017344d57 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription/version.go @@ -0,0 +1,10 @@ +package checknameavailabilitywithsubscription + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/checknameavailabilitywithsubscription/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/client.go b/resource-manager/cdn/2024-02-01/client.go new file mode 100644 index 00000000000..0c42b62c68f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/client.go @@ -0,0 +1,235 @@ +package v2024_02_01 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdcustomdomains" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdendpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigingroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdorigins" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/afdprofiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checkendpointnameavailability" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailability" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/checknameavailabilitywithsubscription" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/customdomains" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/edgenodes" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/endpoints" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/loganalytics" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origingroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origins" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/profiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/routes" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rules" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rulesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/secrets" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/securitypolicies" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/validateprobe" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/wafloganalytics" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets" + "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + AFDCustomDomains *afdcustomdomains.AFDCustomDomainsClient + AFDEndpoints *afdendpoints.AFDEndpointsClient + AFDOriginGroups *afdorigingroups.AFDOriginGroupsClient + AFDOrigins *afdorigins.AFDOriginsClient + AFDProfiles *afdprofiles.AFDProfilesClient + CheckEndpointNameAvailability *checkendpointnameavailability.CheckEndpointNameAvailabilityClient + CheckNameAvailability *checknameavailability.CheckNameAvailabilityClient + CheckNameAvailabilityWithSubscription *checknameavailabilitywithsubscription.CheckNameAvailabilityWithSubscriptionClient + CustomDomains *customdomains.CustomDomainsClient + Edgenodes *edgenodes.EdgenodesClient + Endpoints *endpoints.EndpointsClient + LogAnalytics *loganalytics.LogAnalyticsClient + OriginGroups *origingroups.OriginGroupsClient + Origins *origins.OriginsClient + Profiles *profiles.ProfilesClient + Routes *routes.RoutesClient + RuleSets *rulesets.RuleSetsClient + Rules *rules.RulesClient + Secrets *secrets.SecretsClient + SecurityPolicies *securitypolicies.SecurityPoliciesClient + ValidateProbe *validateprobe.ValidateProbeClient + WafLogAnalytics *wafloganalytics.WafLogAnalyticsClient + WebApplicationFirewallManagedRuleSets *webapplicationfirewallmanagedrulesets.WebApplicationFirewallManagedRuleSetsClient + WebApplicationFirewallPolicies *webapplicationfirewallpolicies.WebApplicationFirewallPoliciesClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + aFDCustomDomainsClient, err := afdcustomdomains.NewAFDCustomDomainsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AFDCustomDomains client: %+v", err) + } + configureFunc(aFDCustomDomainsClient.Client) + + aFDEndpointsClient, err := afdendpoints.NewAFDEndpointsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AFDEndpoints client: %+v", err) + } + configureFunc(aFDEndpointsClient.Client) + + aFDOriginGroupsClient, err := afdorigingroups.NewAFDOriginGroupsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AFDOriginGroups client: %+v", err) + } + configureFunc(aFDOriginGroupsClient.Client) + + aFDOriginsClient, err := afdorigins.NewAFDOriginsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AFDOrigins client: %+v", err) + } + configureFunc(aFDOriginsClient.Client) + + aFDProfilesClient, err := afdprofiles.NewAFDProfilesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AFDProfiles client: %+v", err) + } + configureFunc(aFDProfilesClient.Client) + + checkEndpointNameAvailabilityClient, err := checkendpointnameavailability.NewCheckEndpointNameAvailabilityClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CheckEndpointNameAvailability client: %+v", err) + } + configureFunc(checkEndpointNameAvailabilityClient.Client) + + checkNameAvailabilityClient, err := checknameavailability.NewCheckNameAvailabilityClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CheckNameAvailability client: %+v", err) + } + configureFunc(checkNameAvailabilityClient.Client) + + checkNameAvailabilityWithSubscriptionClient, err := checknameavailabilitywithsubscription.NewCheckNameAvailabilityWithSubscriptionClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CheckNameAvailabilityWithSubscription client: %+v", err) + } + configureFunc(checkNameAvailabilityWithSubscriptionClient.Client) + + customDomainsClient, err := customdomains.NewCustomDomainsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CustomDomains client: %+v", err) + } + configureFunc(customDomainsClient.Client) + + edgenodesClient, err := edgenodes.NewEdgenodesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Edgenodes client: %+v", err) + } + configureFunc(edgenodesClient.Client) + + endpointsClient, err := endpoints.NewEndpointsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Endpoints client: %+v", err) + } + configureFunc(endpointsClient.Client) + + logAnalyticsClient, err := loganalytics.NewLogAnalyticsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LogAnalytics client: %+v", err) + } + configureFunc(logAnalyticsClient.Client) + + originGroupsClient, err := origingroups.NewOriginGroupsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building OriginGroups client: %+v", err) + } + configureFunc(originGroupsClient.Client) + + originsClient, err := origins.NewOriginsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Origins client: %+v", err) + } + configureFunc(originsClient.Client) + + profilesClient, err := profiles.NewProfilesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Profiles client: %+v", err) + } + configureFunc(profilesClient.Client) + + routesClient, err := routes.NewRoutesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Routes client: %+v", err) + } + configureFunc(routesClient.Client) + + ruleSetsClient, err := rulesets.NewRuleSetsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building RuleSets client: %+v", err) + } + configureFunc(ruleSetsClient.Client) + + rulesClient, err := rules.NewRulesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Rules client: %+v", err) + } + configureFunc(rulesClient.Client) + + secretsClient, err := secrets.NewSecretsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Secrets client: %+v", err) + } + configureFunc(secretsClient.Client) + + securityPoliciesClient, err := securitypolicies.NewSecurityPoliciesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SecurityPolicies client: %+v", err) + } + configureFunc(securityPoliciesClient.Client) + + validateProbeClient, err := validateprobe.NewValidateProbeClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ValidateProbe client: %+v", err) + } + configureFunc(validateProbeClient.Client) + + wafLogAnalyticsClient, err := wafloganalytics.NewWafLogAnalyticsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building WafLogAnalytics client: %+v", err) + } + configureFunc(wafLogAnalyticsClient.Client) + + webApplicationFirewallManagedRuleSetsClient, err := webapplicationfirewallmanagedrulesets.NewWebApplicationFirewallManagedRuleSetsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building WebApplicationFirewallManagedRuleSets client: %+v", err) + } + configureFunc(webApplicationFirewallManagedRuleSetsClient.Client) + + webApplicationFirewallPoliciesClient, err := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building WebApplicationFirewallPolicies client: %+v", err) + } + configureFunc(webApplicationFirewallPoliciesClient.Client) + + return &Client{ + AFDCustomDomains: aFDCustomDomainsClient, + AFDEndpoints: aFDEndpointsClient, + AFDOriginGroups: aFDOriginGroupsClient, + AFDOrigins: aFDOriginsClient, + AFDProfiles: aFDProfilesClient, + CheckEndpointNameAvailability: checkEndpointNameAvailabilityClient, + CheckNameAvailability: checkNameAvailabilityClient, + CheckNameAvailabilityWithSubscription: checkNameAvailabilityWithSubscriptionClient, + CustomDomains: customDomainsClient, + Edgenodes: edgenodesClient, + Endpoints: endpointsClient, + LogAnalytics: logAnalyticsClient, + OriginGroups: originGroupsClient, + Origins: originsClient, + Profiles: profilesClient, + Routes: routesClient, + RuleSets: ruleSetsClient, + Rules: rulesClient, + Secrets: secretsClient, + SecurityPolicies: securityPoliciesClient, + ValidateProbe: validateProbeClient, + WafLogAnalytics: wafLogAnalyticsClient, + WebApplicationFirewallManagedRuleSets: webApplicationFirewallManagedRuleSetsClient, + WebApplicationFirewallPolicies: webApplicationFirewallPoliciesClient, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/README.md b/resource-manager/cdn/2024-02-01/customdomains/README.md new file mode 100644 index 00000000000..eec3c6a3b07 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/customdomains` Documentation + +The `customdomains` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/customdomains" +``` + + +### Client Initialization + +```go +client := customdomains.NewCustomDomainsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CustomDomainsClient.Create` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + +payload := customdomains.CustomDomainParameters{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `CustomDomainsClient.Delete` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `CustomDomainsClient.DisableCustomHTTPS` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + +if err := client.DisableCustomHTTPSThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `CustomDomainsClient.EnableCustomHTTPS` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + +payload := customdomains.CustomDomainHTTPSParameters{ + // ... +} + + +if err := client.EnableCustomHTTPSThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `CustomDomainsClient.Get` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CustomDomainsClient.ListByEndpoint` + +```go +ctx := context.TODO() +id := customdomains.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +// alternatively `client.ListByEndpoint(ctx, id)` can be used to do batched pagination +items, err := client.ListByEndpointComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/cdn/2024-02-01/customdomains/client.go b/resource-manager/cdn/2024-02-01/customdomains/client.go new file mode 100644 index 00000000000..ea9c78bea39 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/client.go @@ -0,0 +1,26 @@ +package customdomains + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainsClient struct { + Client *resourcemanager.Client +} + +func NewCustomDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomDomainsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "customdomains", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating CustomDomainsClient: %+v", err) + } + + return &CustomDomainsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/constants.go b/resource-manager/cdn/2024-02-01/customdomains/constants.go new file mode 100644 index 00000000000..c61f7162c73 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/constants.go @@ -0,0 +1,453 @@ +package customdomains + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificateSource string + +const ( + CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault" + CertificateSourceCdn CertificateSource = "Cdn" +) + +func PossibleValuesForCertificateSource() []string { + return []string{ + string(CertificateSourceAzureKeyVault), + string(CertificateSourceCdn), + } +} + +func (s *CertificateSource) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCertificateSource(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCertificateSource(input string) (*CertificateSource, error) { + vals := map[string]CertificateSource{ + "azurekeyvault": CertificateSourceAzureKeyVault, + "cdn": CertificateSourceCdn, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CertificateSource(input) + return &out, nil +} + +type CertificateSourceParametersType string + +const ( + CertificateSourceParametersTypeCdnCertificateSourceParameters CertificateSourceParametersType = "CdnCertificateSourceParameters" + CertificateSourceParametersTypeKeyVaultCertificateSourceParameters CertificateSourceParametersType = "KeyVaultCertificateSourceParameters" +) + +func PossibleValuesForCertificateSourceParametersType() []string { + return []string{ + string(CertificateSourceParametersTypeCdnCertificateSourceParameters), + string(CertificateSourceParametersTypeKeyVaultCertificateSourceParameters), + } +} + +func (s *CertificateSourceParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCertificateSourceParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCertificateSourceParametersType(input string) (*CertificateSourceParametersType, error) { + vals := map[string]CertificateSourceParametersType{ + "cdncertificatesourceparameters": CertificateSourceParametersTypeCdnCertificateSourceParameters, + "keyvaultcertificatesourceparameters": CertificateSourceParametersTypeKeyVaultCertificateSourceParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CertificateSourceParametersType(input) + return &out, nil +} + +type CertificateType string + +const ( + CertificateTypeDedicated CertificateType = "Dedicated" + CertificateTypeShared CertificateType = "Shared" +) + +func PossibleValuesForCertificateType() []string { + return []string{ + string(CertificateTypeDedicated), + string(CertificateTypeShared), + } +} + +func (s *CertificateType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCertificateType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCertificateType(input string) (*CertificateType, error) { + vals := map[string]CertificateType{ + "dedicated": CertificateTypeDedicated, + "shared": CertificateTypeShared, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CertificateType(input) + return &out, nil +} + +type CustomDomainResourceState string + +const ( + CustomDomainResourceStateActive CustomDomainResourceState = "Active" + CustomDomainResourceStateCreating CustomDomainResourceState = "Creating" + CustomDomainResourceStateDeleting CustomDomainResourceState = "Deleting" +) + +func PossibleValuesForCustomDomainResourceState() []string { + return []string{ + string(CustomDomainResourceStateActive), + string(CustomDomainResourceStateCreating), + string(CustomDomainResourceStateDeleting), + } +} + +func (s *CustomDomainResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCustomDomainResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCustomDomainResourceState(input string) (*CustomDomainResourceState, error) { + vals := map[string]CustomDomainResourceState{ + "active": CustomDomainResourceStateActive, + "creating": CustomDomainResourceStateCreating, + "deleting": CustomDomainResourceStateDeleting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CustomDomainResourceState(input) + return &out, nil +} + +type CustomHTTPSProvisioningState string + +const ( + CustomHTTPSProvisioningStateDisabled CustomHTTPSProvisioningState = "Disabled" + CustomHTTPSProvisioningStateDisabling CustomHTTPSProvisioningState = "Disabling" + CustomHTTPSProvisioningStateEnabled CustomHTTPSProvisioningState = "Enabled" + CustomHTTPSProvisioningStateEnabling CustomHTTPSProvisioningState = "Enabling" + CustomHTTPSProvisioningStateFailed CustomHTTPSProvisioningState = "Failed" +) + +func PossibleValuesForCustomHTTPSProvisioningState() []string { + return []string{ + string(CustomHTTPSProvisioningStateDisabled), + string(CustomHTTPSProvisioningStateDisabling), + string(CustomHTTPSProvisioningStateEnabled), + string(CustomHTTPSProvisioningStateEnabling), + string(CustomHTTPSProvisioningStateFailed), + } +} + +func (s *CustomHTTPSProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCustomHTTPSProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCustomHTTPSProvisioningState(input string) (*CustomHTTPSProvisioningState, error) { + vals := map[string]CustomHTTPSProvisioningState{ + "disabled": CustomHTTPSProvisioningStateDisabled, + "disabling": CustomHTTPSProvisioningStateDisabling, + "enabled": CustomHTTPSProvisioningStateEnabled, + "enabling": CustomHTTPSProvisioningStateEnabling, + "failed": CustomHTTPSProvisioningStateFailed, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CustomHTTPSProvisioningState(input) + return &out, nil +} + +type CustomHTTPSProvisioningSubstate string + +const ( + CustomHTTPSProvisioningSubstateCertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted" + CustomHTTPSProvisioningSubstateCertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed" + CustomHTTPSProvisioningSubstateDeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate" + CustomHTTPSProvisioningSubstateDeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut" + CustomHTTPSProvisioningSubstateIssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate" + CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval" + CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest" +) + +func PossibleValuesForCustomHTTPSProvisioningSubstate() []string { + return []string{ + string(CustomHTTPSProvisioningSubstateCertificateDeleted), + string(CustomHTTPSProvisioningSubstateCertificateDeployed), + string(CustomHTTPSProvisioningSubstateDeletingCertificate), + string(CustomHTTPSProvisioningSubstateDeployingCertificate), + string(CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved), + string(CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected), + string(CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut), + string(CustomHTTPSProvisioningSubstateIssuingCertificate), + string(CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval), + string(CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest), + } +} + +func (s *CustomHTTPSProvisioningSubstate) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCustomHTTPSProvisioningSubstate(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCustomHTTPSProvisioningSubstate(input string) (*CustomHTTPSProvisioningSubstate, error) { + vals := map[string]CustomHTTPSProvisioningSubstate{ + "certificatedeleted": CustomHTTPSProvisioningSubstateCertificateDeleted, + "certificatedeployed": CustomHTTPSProvisioningSubstateCertificateDeployed, + "deletingcertificate": CustomHTTPSProvisioningSubstateDeletingCertificate, + "deployingcertificate": CustomHTTPSProvisioningSubstateDeployingCertificate, + "domaincontrolvalidationrequestapproved": CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved, + "domaincontrolvalidationrequestrejected": CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected, + "domaincontrolvalidationrequesttimedout": CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut, + "issuingcertificate": CustomHTTPSProvisioningSubstateIssuingCertificate, + "pendingdomaincontrolvalidationrequestapproval": CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval, + "submittingdomaincontrolvalidationrequest": CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CustomHTTPSProvisioningSubstate(input) + return &out, nil +} + +type DeleteRule string + +const ( + DeleteRuleNoAction DeleteRule = "NoAction" +) + +func PossibleValuesForDeleteRule() []string { + return []string{ + string(DeleteRuleNoAction), + } +} + +func (s *DeleteRule) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeleteRule(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeleteRule(input string) (*DeleteRule, error) { + vals := map[string]DeleteRule{ + "noaction": DeleteRuleNoAction, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeleteRule(input) + return &out, nil +} + +type MinimumTlsVersion string + +const ( + MinimumTlsVersionNone MinimumTlsVersion = "None" + MinimumTlsVersionTLSOneTwo MinimumTlsVersion = "TLS12" + MinimumTlsVersionTLSOneZero MinimumTlsVersion = "TLS10" +) + +func PossibleValuesForMinimumTlsVersion() []string { + return []string{ + string(MinimumTlsVersionNone), + string(MinimumTlsVersionTLSOneTwo), + string(MinimumTlsVersionTLSOneZero), + } +} + +func (s *MinimumTlsVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMinimumTlsVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMinimumTlsVersion(input string) (*MinimumTlsVersion, error) { + vals := map[string]MinimumTlsVersion{ + "none": MinimumTlsVersionNone, + "tls12": MinimumTlsVersionTLSOneTwo, + "tls10": MinimumTlsVersionTLSOneZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MinimumTlsVersion(input) + return &out, nil +} + +type ProtocolType string + +const ( + ProtocolTypeIPBased ProtocolType = "IPBased" + ProtocolTypeServerNameIndication ProtocolType = "ServerNameIndication" +) + +func PossibleValuesForProtocolType() []string { + return []string{ + string(ProtocolTypeIPBased), + string(ProtocolTypeServerNameIndication), + } +} + +func (s *ProtocolType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocolType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocolType(input string) (*ProtocolType, error) { + vals := map[string]ProtocolType{ + "ipbased": ProtocolTypeIPBased, + "servernameindication": ProtocolTypeServerNameIndication, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProtocolType(input) + return &out, nil +} + +type UpdateRule string + +const ( + UpdateRuleNoAction UpdateRule = "NoAction" +) + +func PossibleValuesForUpdateRule() []string { + return []string{ + string(UpdateRuleNoAction), + } +} + +func (s *UpdateRule) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUpdateRule(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUpdateRule(input string) (*UpdateRule, error) { + vals := map[string]UpdateRule{ + "noaction": UpdateRuleNoAction, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UpdateRule(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/id_endpoint.go b/resource-manager/cdn/2024-02-01/customdomains/id_endpoint.go new file mode 100644 index 00000000000..9d852f00768 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/id_endpoint.go @@ -0,0 +1,139 @@ +package customdomains + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointId{}) +} + +var _ resourceids.ResourceId = &EndpointId{} + +// EndpointId is a struct representing the Resource ID for a Endpoint +type EndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string +} + +// NewEndpointID returns a new EndpointId struct +func NewEndpointID(subscriptionId string, resourceGroupName string, profileName string, endpointName string) EndpointId { + return EndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + } +} + +// ParseEndpointID parses 'input' into a EndpointId +func ParseEndpointID(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointIDInsensitively parses 'input' case-insensitively into a EndpointId +// note: this method should only be used for API response data and not user input +func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + return nil +} + +// ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID +func ValidateEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint ID +func (id EndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint ID +func (id EndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + } +} + +// String returns a human-readable description of this Endpoint ID +func (id EndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + } + return fmt.Sprintf("Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/id_endpoint_test.go b/resource-manager/cdn/2024-02-01/customdomains/id_endpoint_test.go new file mode 100644 index 00000000000..2be2085c289 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/id_endpoint_test.go @@ -0,0 +1,327 @@ +package customdomains + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointId{} + +func TestNewEndpointID(t *testing.T) { + id := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } +} + +func TestFormatEndpointID(t *testing.T) { + actual := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestParseEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestSegmentsForEndpointId(t *testing.T) { + segments := EndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain.go b/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain.go new file mode 100644 index 00000000000..8df3b71d603 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain.go @@ -0,0 +1,148 @@ +package customdomains + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointCustomDomainId{}) +} + +var _ resourceids.ResourceId = &EndpointCustomDomainId{} + +// EndpointCustomDomainId is a struct representing the Resource ID for a Endpoint Custom Domain +type EndpointCustomDomainId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string + CustomDomainName string +} + +// NewEndpointCustomDomainID returns a new EndpointCustomDomainId struct +func NewEndpointCustomDomainID(subscriptionId string, resourceGroupName string, profileName string, endpointName string, customDomainName string) EndpointCustomDomainId { + return EndpointCustomDomainId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + CustomDomainName: customDomainName, + } +} + +// ParseEndpointCustomDomainID parses 'input' into a EndpointCustomDomainId +func ParseEndpointCustomDomainID(input string) (*EndpointCustomDomainId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointCustomDomainId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointCustomDomainId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointCustomDomainIDInsensitively parses 'input' case-insensitively into a EndpointCustomDomainId +// note: this method should only be used for API response data and not user input +func ParseEndpointCustomDomainIDInsensitively(input string) (*EndpointCustomDomainId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointCustomDomainId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointCustomDomainId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointCustomDomainId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + if id.CustomDomainName, ok = input.Parsed["customDomainName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "customDomainName", input) + } + + return nil +} + +// ValidateEndpointCustomDomainID checks that 'input' can be parsed as a Endpoint Custom Domain ID +func ValidateEndpointCustomDomainID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointCustomDomainID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint Custom Domain ID +func (id EndpointCustomDomainId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s/customDomains/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName, id.CustomDomainName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint Custom Domain ID +func (id EndpointCustomDomainId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + resourceids.StaticSegment("staticCustomDomains", "customDomains", "customDomains"), + resourceids.UserSpecifiedSegment("customDomainName", "customDomainValue"), + } +} + +// String returns a human-readable description of this Endpoint Custom Domain ID +func (id EndpointCustomDomainId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + fmt.Sprintf("Custom Domain Name: %q", id.CustomDomainName), + } + return fmt.Sprintf("Endpoint Custom Domain (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain_test.go b/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain_test.go new file mode 100644 index 00000000000..625fe74948d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/id_endpointcustomdomain_test.go @@ -0,0 +1,372 @@ +package customdomains + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointCustomDomainId{} + +func TestNewEndpointCustomDomainID(t *testing.T) { + id := NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } + + if id.CustomDomainName != "customDomainValue" { + t.Fatalf("Expected %q but got %q for Segment 'CustomDomainName'", id.CustomDomainName, "customDomainValue") + } +} + +func TestFormatEndpointCustomDomainID(t *testing.T) { + actual := NewEndpointCustomDomainID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "customDomainValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains/customDomainValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointCustomDomainID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointCustomDomainId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains/customDomainValue", + Expected: &EndpointCustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + CustomDomainName: "customDomainValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains/customDomainValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointCustomDomainID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.CustomDomainName != v.Expected.CustomDomainName { + t.Fatalf("Expected %q but got %q for CustomDomainName", v.Expected.CustomDomainName, actual.CustomDomainName) + } + + } +} + +func TestParseEndpointCustomDomainIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointCustomDomainId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/cUsToMdOmAiNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains/customDomainValue", + Expected: &EndpointCustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + CustomDomainName: "customDomainValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/customDomains/customDomainValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/cUsToMdOmAiNs/cUsToMdOmAiNvAlUe", + Expected: &EndpointCustomDomainId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + CustomDomainName: "cUsToMdOmAiNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/cUsToMdOmAiNs/cUsToMdOmAiNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointCustomDomainIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.CustomDomainName != v.Expected.CustomDomainName { + t.Fatalf("Expected %q but got %q for CustomDomainName", v.Expected.CustomDomainName, actual.CustomDomainName) + } + + } +} + +func TestSegmentsForEndpointCustomDomainId(t *testing.T) { + segments := EndpointCustomDomainId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointCustomDomainId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_create.go b/resource-manager/cdn/2024-02-01/customdomains/method_create.go new file mode 100644 index 00000000000..a9e4d357f5d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_create.go @@ -0,0 +1,76 @@ +package customdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CustomDomain +} + +// Create ... +func (c CustomDomainsClient) Create(ctx context.Context, id EndpointCustomDomainId, input CustomDomainParameters) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c CustomDomainsClient) CreateThenPoll(ctx context.Context, id EndpointCustomDomainId, input CustomDomainParameters) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_delete.go b/resource-manager/cdn/2024-02-01/customdomains/method_delete.go new file mode 100644 index 00000000000..44b72a2da70 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_delete.go @@ -0,0 +1,72 @@ +package customdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CustomDomain +} + +// Delete ... +func (c CustomDomainsClient) Delete(ctx context.Context, id EndpointCustomDomainId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c CustomDomainsClient) DeleteThenPoll(ctx context.Context, id EndpointCustomDomainId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_disablecustomhttps.go b/resource-manager/cdn/2024-02-01/customdomains/method_disablecustomhttps.go new file mode 100644 index 00000000000..803bf0d371f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_disablecustomhttps.go @@ -0,0 +1,71 @@ +package customdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DisableCustomHTTPSOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CustomDomain +} + +// DisableCustomHTTPS ... +func (c CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, id EndpointCustomDomainId) (result DisableCustomHTTPSOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/disableCustomHttps", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DisableCustomHTTPSThenPoll performs DisableCustomHTTPS then polls until it's completed +func (c CustomDomainsClient) DisableCustomHTTPSThenPoll(ctx context.Context, id EndpointCustomDomainId) error { + result, err := c.DisableCustomHTTPS(ctx, id) + if err != nil { + return fmt.Errorf("performing DisableCustomHTTPS: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DisableCustomHTTPS: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_enablecustomhttps.go b/resource-manager/cdn/2024-02-01/customdomains/method_enablecustomhttps.go new file mode 100644 index 00000000000..355aba6796c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_enablecustomhttps.go @@ -0,0 +1,75 @@ +package customdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnableCustomHTTPSOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CustomDomain +} + +// EnableCustomHTTPS ... +func (c CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, id EndpointCustomDomainId, input CustomDomainHTTPSParameters) (result EnableCustomHTTPSOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/enableCustomHttps", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// EnableCustomHTTPSThenPoll performs EnableCustomHTTPS then polls until it's completed +func (c CustomDomainsClient) EnableCustomHTTPSThenPoll(ctx context.Context, id EndpointCustomDomainId, input CustomDomainHTTPSParameters) error { + result, err := c.EnableCustomHTTPS(ctx, id, input) + if err != nil { + return fmt.Errorf("performing EnableCustomHTTPS: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after EnableCustomHTTPS: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_get.go b/resource-manager/cdn/2024-02-01/customdomains/method_get.go new file mode 100644 index 00000000000..0217277a03b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_get.go @@ -0,0 +1,53 @@ +package customdomains + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CustomDomain +} + +// Get ... +func (c CustomDomainsClient) Get(ctx context.Context, id EndpointCustomDomainId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CustomDomain + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/method_listbyendpoint.go b/resource-manager/cdn/2024-02-01/customdomains/method_listbyendpoint.go new file mode 100644 index 00000000000..393f5f431c1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/method_listbyendpoint.go @@ -0,0 +1,105 @@ +package customdomains + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByEndpointOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]CustomDomain +} + +type ListByEndpointCompleteResult struct { + LatestHttpResponse *http.Response + Items []CustomDomain +} + +type ListByEndpointCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByEndpointCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByEndpoint ... +func (c CustomDomainsClient) ListByEndpoint(ctx context.Context, id EndpointId) (result ListByEndpointOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByEndpointCustomPager{}, + Path: fmt.Sprintf("%s/customDomains", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]CustomDomain `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByEndpointComplete retrieves all the results into a single object +func (c CustomDomainsClient) ListByEndpointComplete(ctx context.Context, id EndpointId) (ListByEndpointCompleteResult, error) { + return c.ListByEndpointCompleteMatchingPredicate(ctx, id, CustomDomainOperationPredicate{}) +} + +// ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c CustomDomainsClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate CustomDomainOperationPredicate) (result ListByEndpointCompleteResult, err error) { + items := make([]CustomDomain, 0) + + resp, err := c.ListByEndpoint(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByEndpointCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_cdncertificatesourceparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_cdncertificatesourceparameters.go new file mode 100644 index 00000000000..34f774a962c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_cdncertificatesourceparameters.go @@ -0,0 +1,50 @@ +package customdomains + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ CertificateSourceParameters = CdnCertificateSourceParameters{} + +type CdnCertificateSourceParameters struct { + CertificateType CertificateType `json:"certificateType"` + + // Fields inherited from CertificateSourceParameters + + TypeName CertificateSourceParametersType `json:"typeName"` +} + +func (s CdnCertificateSourceParameters) CertificateSourceParameters() BaseCertificateSourceParametersImpl { + return BaseCertificateSourceParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CdnCertificateSourceParameters{} + +func (s CdnCertificateSourceParameters) MarshalJSON() ([]byte, error) { + type wrapper CdnCertificateSourceParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CdnCertificateSourceParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CdnCertificateSourceParameters: %+v", err) + } + + decoded["typeName"] = "CdnCertificateSourceParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CdnCertificateSourceParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_cdnmanagedhttpsparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_cdnmanagedhttpsparameters.go new file mode 100644 index 00000000000..f404fdf321c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_cdnmanagedhttpsparameters.go @@ -0,0 +1,54 @@ +package customdomains + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ CustomDomainHTTPSParameters = CdnManagedHTTPSParameters{} + +type CdnManagedHTTPSParameters struct { + CertificateSourceParameters CdnCertificateSourceParameters `json:"certificateSourceParameters"` + + // Fields inherited from CustomDomainHTTPSParameters + + CertificateSource CertificateSource `json:"certificateSource"` + MinimumTlsVersion *MinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + ProtocolType ProtocolType `json:"protocolType"` +} + +func (s CdnManagedHTTPSParameters) CustomDomainHTTPSParameters() BaseCustomDomainHTTPSParametersImpl { + return BaseCustomDomainHTTPSParametersImpl{ + CertificateSource: s.CertificateSource, + MinimumTlsVersion: s.MinimumTlsVersion, + ProtocolType: s.ProtocolType, + } +} + +var _ json.Marshaler = CdnManagedHTTPSParameters{} + +func (s CdnManagedHTTPSParameters) MarshalJSON() ([]byte, error) { + type wrapper CdnManagedHTTPSParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CdnManagedHTTPSParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CdnManagedHTTPSParameters: %+v", err) + } + + decoded["certificateSource"] = "Cdn" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CdnManagedHTTPSParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_certificatesourceparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_certificatesourceparameters.go new file mode 100644 index 00000000000..86656acb816 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_certificatesourceparameters.go @@ -0,0 +1,83 @@ +package customdomains + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CertificateSourceParameters interface { + CertificateSourceParameters() BaseCertificateSourceParametersImpl +} + +var _ CertificateSourceParameters = BaseCertificateSourceParametersImpl{} + +type BaseCertificateSourceParametersImpl struct { + TypeName CertificateSourceParametersType `json:"typeName"` +} + +func (s BaseCertificateSourceParametersImpl) CertificateSourceParameters() BaseCertificateSourceParametersImpl { + return s +} + +var _ CertificateSourceParameters = RawCertificateSourceParametersImpl{} + +// RawCertificateSourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCertificateSourceParametersImpl struct { + certificateSourceParameters BaseCertificateSourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawCertificateSourceParametersImpl) CertificateSourceParameters() BaseCertificateSourceParametersImpl { + return s.certificateSourceParameters +} + +func UnmarshalCertificateSourceParametersImplementation(input []byte) (CertificateSourceParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CertificateSourceParameters into map[string]interface: %+v", err) + } + + value, ok := temp["typeName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "CdnCertificateSourceParameters") { + var out CdnCertificateSourceParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CdnCertificateSourceParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "KeyVaultCertificateSourceParameters") { + var out KeyVaultCertificateSourceParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into KeyVaultCertificateSourceParameters: %+v", err) + } + return out, nil + } + + var parent BaseCertificateSourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCertificateSourceParametersImpl: %+v", err) + } + + return RawCertificateSourceParametersImpl{ + certificateSourceParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_customdomain.go b/resource-manager/cdn/2024-02-01/customdomains/model_customdomain.go new file mode 100644 index 00000000000..540ed3151a2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_customdomain.go @@ -0,0 +1,16 @@ +package customdomains + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomain struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *CustomDomainProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_customdomainhttpsparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainhttpsparameters.go new file mode 100644 index 00000000000..c9a9bc211bb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainhttpsparameters.go @@ -0,0 +1,85 @@ +package customdomains + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainHTTPSParameters interface { + CustomDomainHTTPSParameters() BaseCustomDomainHTTPSParametersImpl +} + +var _ CustomDomainHTTPSParameters = BaseCustomDomainHTTPSParametersImpl{} + +type BaseCustomDomainHTTPSParametersImpl struct { + CertificateSource CertificateSource `json:"certificateSource"` + MinimumTlsVersion *MinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + ProtocolType ProtocolType `json:"protocolType"` +} + +func (s BaseCustomDomainHTTPSParametersImpl) CustomDomainHTTPSParameters() BaseCustomDomainHTTPSParametersImpl { + return s +} + +var _ CustomDomainHTTPSParameters = RawCustomDomainHTTPSParametersImpl{} + +// RawCustomDomainHTTPSParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCustomDomainHTTPSParametersImpl struct { + customDomainHTTPSParameters BaseCustomDomainHTTPSParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomDomainHTTPSParametersImpl) CustomDomainHTTPSParameters() BaseCustomDomainHTTPSParametersImpl { + return s.customDomainHTTPSParameters +} + +func UnmarshalCustomDomainHTTPSParametersImplementation(input []byte) (CustomDomainHTTPSParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CustomDomainHTTPSParameters into map[string]interface: %+v", err) + } + + value, ok := temp["certificateSource"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Cdn") { + var out CdnManagedHTTPSParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CdnManagedHTTPSParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureKeyVault") { + var out UserManagedHTTPSParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UserManagedHTTPSParameters: %+v", err) + } + return out, nil + } + + var parent BaseCustomDomainHTTPSParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomDomainHTTPSParametersImpl: %+v", err) + } + + return RawCustomDomainHTTPSParametersImpl{ + customDomainHTTPSParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_customdomainparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainparameters.go new file mode 100644 index 00000000000..a7dd7e903c9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainparameters.go @@ -0,0 +1,8 @@ +package customdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainParameters struct { + Properties *CustomDomainPropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_customdomainproperties.go b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainproperties.go new file mode 100644 index 00000000000..0eb63f262d6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainproperties.go @@ -0,0 +1,50 @@ +package customdomains + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainProperties struct { + CustomHTTPSParameters CustomDomainHTTPSParameters `json:"customHttpsParameters"` + CustomHTTPSProvisioningState *CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` + CustomHTTPSProvisioningSubstate *CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"` + HostName string `json:"hostName"` + ProvisioningState *CustomHTTPSProvisioningState `json:"provisioningState,omitempty"` + ResourceState *CustomDomainResourceState `json:"resourceState,omitempty"` + ValidationData *string `json:"validationData,omitempty"` +} + +var _ json.Unmarshaler = &CustomDomainProperties{} + +func (s *CustomDomainProperties) UnmarshalJSON(bytes []byte) error { + type alias CustomDomainProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CustomDomainProperties: %+v", err) + } + + s.CustomHTTPSProvisioningState = decoded.CustomHTTPSProvisioningState + s.CustomHTTPSProvisioningSubstate = decoded.CustomHTTPSProvisioningSubstate + s.HostName = decoded.HostName + s.ProvisioningState = decoded.ProvisioningState + s.ResourceState = decoded.ResourceState + s.ValidationData = decoded.ValidationData + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CustomDomainProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["customHttpsParameters"]; ok { + impl, err := UnmarshalCustomDomainHTTPSParametersImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CustomHTTPSParameters' for 'CustomDomainProperties': %+v", err) + } + s.CustomHTTPSParameters = impl + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_customdomainpropertiesparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainpropertiesparameters.go new file mode 100644 index 00000000000..07f04d94e8d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_customdomainpropertiesparameters.go @@ -0,0 +1,8 @@ +package customdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainPropertiesParameters struct { + HostName string `json:"hostName"` +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_keyvaultcertificatesourceparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_keyvaultcertificatesourceparameters.go new file mode 100644 index 00000000000..141686a909e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_keyvaultcertificatesourceparameters.go @@ -0,0 +1,56 @@ +package customdomains + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ CertificateSourceParameters = KeyVaultCertificateSourceParameters{} + +type KeyVaultCertificateSourceParameters struct { + DeleteRule DeleteRule `json:"deleteRule"` + ResourceGroupName string `json:"resourceGroupName"` + SecretName string `json:"secretName"` + SecretVersion *string `json:"secretVersion,omitempty"` + SubscriptionId string `json:"subscriptionId"` + UpdateRule UpdateRule `json:"updateRule"` + VaultName string `json:"vaultName"` + + // Fields inherited from CertificateSourceParameters + + TypeName CertificateSourceParametersType `json:"typeName"` +} + +func (s KeyVaultCertificateSourceParameters) CertificateSourceParameters() BaseCertificateSourceParametersImpl { + return BaseCertificateSourceParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = KeyVaultCertificateSourceParameters{} + +func (s KeyVaultCertificateSourceParameters) MarshalJSON() ([]byte, error) { + type wrapper KeyVaultCertificateSourceParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling KeyVaultCertificateSourceParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling KeyVaultCertificateSourceParameters: %+v", err) + } + + decoded["typeName"] = "KeyVaultCertificateSourceParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling KeyVaultCertificateSourceParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/model_usermanagedhttpsparameters.go b/resource-manager/cdn/2024-02-01/customdomains/model_usermanagedhttpsparameters.go new file mode 100644 index 00000000000..50120de1186 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/model_usermanagedhttpsparameters.go @@ -0,0 +1,54 @@ +package customdomains + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ CustomDomainHTTPSParameters = UserManagedHTTPSParameters{} + +type UserManagedHTTPSParameters struct { + CertificateSourceParameters KeyVaultCertificateSourceParameters `json:"certificateSourceParameters"` + + // Fields inherited from CustomDomainHTTPSParameters + + CertificateSource CertificateSource `json:"certificateSource"` + MinimumTlsVersion *MinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + ProtocolType ProtocolType `json:"protocolType"` +} + +func (s UserManagedHTTPSParameters) CustomDomainHTTPSParameters() BaseCustomDomainHTTPSParametersImpl { + return BaseCustomDomainHTTPSParametersImpl{ + CertificateSource: s.CertificateSource, + MinimumTlsVersion: s.MinimumTlsVersion, + ProtocolType: s.ProtocolType, + } +} + +var _ json.Marshaler = UserManagedHTTPSParameters{} + +func (s UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) { + type wrapper UserManagedHTTPSParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UserManagedHTTPSParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UserManagedHTTPSParameters: %+v", err) + } + + decoded["certificateSource"] = "AzureKeyVault" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UserManagedHTTPSParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/predicates.go b/resource-manager/cdn/2024-02-01/customdomains/predicates.go new file mode 100644 index 00000000000..1baf6f506dd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/predicates.go @@ -0,0 +1,27 @@ +package customdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDomainOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p CustomDomainOperationPredicate) Matches(input CustomDomain) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/customdomains/version.go b/resource-manager/cdn/2024-02-01/customdomains/version.go new file mode 100644 index 00000000000..cc08b6f1d1f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/customdomains/version.go @@ -0,0 +1,10 @@ +package customdomains + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/customdomains/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/README.md b/resource-manager/cdn/2024-02-01/edgenodes/README.md new file mode 100644 index 00000000000..c22f47291b3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/edgenodes` Documentation + +The `edgenodes` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/edgenodes" +``` + + +### Client Initialization + +```go +client := edgenodes.NewEdgenodesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `EdgenodesClient.List` + +```go +ctx := context.TODO() + + +// alternatively `client.List(ctx)` can be used to do batched pagination +items, err := client.ListComplete(ctx) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/cdn/2024-02-01/edgenodes/client.go b/resource-manager/cdn/2024-02-01/edgenodes/client.go new file mode 100644 index 00000000000..4bdc5d16a2a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/client.go @@ -0,0 +1,26 @@ +package edgenodes + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgenodesClient struct { + Client *resourcemanager.Client +} + +func NewEdgenodesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgenodesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "edgenodes", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating EdgenodesClient: %+v", err) + } + + return &EdgenodesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/method_list.go b/resource-manager/cdn/2024-02-01/edgenodes/method_list.go new file mode 100644 index 00000000000..fd492ed7009 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/method_list.go @@ -0,0 +1,105 @@ +package edgenodes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]EdgeNode +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []EdgeNode +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c EdgenodesClient) List(ctx context.Context) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: "/providers/Microsoft.CDN/edgenodes", + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]EdgeNode `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c EdgenodesClient) ListComplete(ctx context.Context) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, EdgeNodeOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c EdgenodesClient) ListCompleteMatchingPredicate(ctx context.Context, predicate EdgeNodeOperationPredicate) (result ListCompleteResult, err error) { + items := make([]EdgeNode, 0) + + resp, err := c.List(ctx) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/model_cidripaddress.go b/resource-manager/cdn/2024-02-01/edgenodes/model_cidripaddress.go new file mode 100644 index 00000000000..abac7b4c8ec --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/model_cidripaddress.go @@ -0,0 +1,9 @@ +package edgenodes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CidrIPAddress struct { + BaseIPAddress *string `json:"baseIpAddress,omitempty"` + PrefixLength *int64 `json:"prefixLength,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/model_edgenode.go b/resource-manager/cdn/2024-02-01/edgenodes/model_edgenode.go new file mode 100644 index 00000000000..8024e313b47 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/model_edgenode.go @@ -0,0 +1,16 @@ +package edgenodes + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgeNode struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *EdgeNodeProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/model_edgenodeproperties.go b/resource-manager/cdn/2024-02-01/edgenodes/model_edgenodeproperties.go new file mode 100644 index 00000000000..e5374afca1b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/model_edgenodeproperties.go @@ -0,0 +1,8 @@ +package edgenodes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgeNodeProperties struct { + IPAddressGroups []IPAddressGroup `json:"ipAddressGroups"` +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/model_ipaddressgroup.go b/resource-manager/cdn/2024-02-01/edgenodes/model_ipaddressgroup.go new file mode 100644 index 00000000000..0736eeabf64 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/model_ipaddressgroup.go @@ -0,0 +1,10 @@ +package edgenodes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IPAddressGroup struct { + DeliveryRegion *string `json:"deliveryRegion,omitempty"` + IPv4Addresses *[]CidrIPAddress `json:"ipv4Addresses,omitempty"` + IPv6Addresses *[]CidrIPAddress `json:"ipv6Addresses,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/predicates.go b/resource-manager/cdn/2024-02-01/edgenodes/predicates.go new file mode 100644 index 00000000000..db221c0d1b6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/predicates.go @@ -0,0 +1,27 @@ +package edgenodes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EdgeNodeOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p EdgeNodeOperationPredicate) Matches(input EdgeNode) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/edgenodes/version.go b/resource-manager/cdn/2024-02-01/edgenodes/version.go new file mode 100644 index 00000000000..3ac9c44f5ef --- /dev/null +++ b/resource-manager/cdn/2024-02-01/edgenodes/version.go @@ -0,0 +1,10 @@ +package edgenodes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/edgenodes/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/README.md b/resource-manager/cdn/2024-02-01/endpoints/README.md new file mode 100644 index 00000000000..3150360b282 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/README.md @@ -0,0 +1,195 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/endpoints` Documentation + +The `endpoints` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/endpoints" +``` + + +### Client Initialization + +```go +client := endpoints.NewEndpointsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `EndpointsClient.Create` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +payload := endpoints.Endpoint{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.Delete` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.Get` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `EndpointsClient.ListByProfile` + +```go +ctx := context.TODO() +id := endpoints.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `EndpointsClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `EndpointsClient.LoadContent` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +payload := endpoints.LoadParameters{ + // ... +} + + +if err := client.LoadContentThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.PurgeContent` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +payload := endpoints.PurgeParameters{ + // ... +} + + +if err := client.PurgeContentThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.Start` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +if err := client.StartThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.Stop` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +if err := client.StopThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.Update` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +payload := endpoints.EndpointUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `EndpointsClient.ValidateCustomDomain` + +```go +ctx := context.TODO() +id := endpoints.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +payload := endpoints.ValidateCustomDomainInput{ + // ... +} + + +read, err := client.ValidateCustomDomain(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/endpoints/client.go b/resource-manager/cdn/2024-02-01/endpoints/client.go new file mode 100644 index 00000000000..754a364cd33 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/client.go @@ -0,0 +1,26 @@ +package endpoints + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointsClient struct { + Client *resourcemanager.Client +} + +func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) + } + + return &EndpointsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/constants.go b/resource-manager/cdn/2024-02-01/endpoints/constants.go new file mode 100644 index 00000000000..fec07d91d23 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/constants.go @@ -0,0 +1,2629 @@ +package endpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Algorithm string + +const ( + AlgorithmSHATwoFiveSix Algorithm = "SHA256" +) + +func PossibleValuesForAlgorithm() []string { + return []string{ + string(AlgorithmSHATwoFiveSix), + } +} + +func (s *Algorithm) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAlgorithm(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAlgorithm(input string) (*Algorithm, error) { + vals := map[string]Algorithm{ + "sha256": AlgorithmSHATwoFiveSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Algorithm(input) + return &out, nil +} + +type CacheBehavior string + +const ( + CacheBehaviorBypassCache CacheBehavior = "BypassCache" + CacheBehaviorOverride CacheBehavior = "Override" + CacheBehaviorSetIfMissing CacheBehavior = "SetIfMissing" +) + +func PossibleValuesForCacheBehavior() []string { + return []string{ + string(CacheBehaviorBypassCache), + string(CacheBehaviorOverride), + string(CacheBehaviorSetIfMissing), + } +} + +func (s *CacheBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCacheBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCacheBehavior(input string) (*CacheBehavior, error) { + vals := map[string]CacheBehavior{ + "bypasscache": CacheBehaviorBypassCache, + "override": CacheBehaviorOverride, + "setifmissing": CacheBehaviorSetIfMissing, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CacheBehavior(input) + return &out, nil +} + +type CacheType string + +const ( + CacheTypeAll CacheType = "All" +) + +func PossibleValuesForCacheType() []string { + return []string{ + string(CacheTypeAll), + } +} + +func (s *CacheType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCacheType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCacheType(input string) (*CacheType, error) { + vals := map[string]CacheType{ + "all": CacheTypeAll, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CacheType(input) + return &out, nil +} + +type ClientPortOperator string + +const ( + ClientPortOperatorAny ClientPortOperator = "Any" + ClientPortOperatorBeginsWith ClientPortOperator = "BeginsWith" + ClientPortOperatorContains ClientPortOperator = "Contains" + ClientPortOperatorEndsWith ClientPortOperator = "EndsWith" + ClientPortOperatorEqual ClientPortOperator = "Equal" + ClientPortOperatorGreaterThan ClientPortOperator = "GreaterThan" + ClientPortOperatorGreaterThanOrEqual ClientPortOperator = "GreaterThanOrEqual" + ClientPortOperatorLessThan ClientPortOperator = "LessThan" + ClientPortOperatorLessThanOrEqual ClientPortOperator = "LessThanOrEqual" + ClientPortOperatorRegEx ClientPortOperator = "RegEx" +) + +func PossibleValuesForClientPortOperator() []string { + return []string{ + string(ClientPortOperatorAny), + string(ClientPortOperatorBeginsWith), + string(ClientPortOperatorContains), + string(ClientPortOperatorEndsWith), + string(ClientPortOperatorEqual), + string(ClientPortOperatorGreaterThan), + string(ClientPortOperatorGreaterThanOrEqual), + string(ClientPortOperatorLessThan), + string(ClientPortOperatorLessThanOrEqual), + string(ClientPortOperatorRegEx), + } +} + +func (s *ClientPortOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClientPortOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClientPortOperator(input string) (*ClientPortOperator, error) { + vals := map[string]ClientPortOperator{ + "any": ClientPortOperatorAny, + "beginswith": ClientPortOperatorBeginsWith, + "contains": ClientPortOperatorContains, + "endswith": ClientPortOperatorEndsWith, + "equal": ClientPortOperatorEqual, + "greaterthan": ClientPortOperatorGreaterThan, + "greaterthanorequal": ClientPortOperatorGreaterThanOrEqual, + "lessthan": ClientPortOperatorLessThan, + "lessthanorequal": ClientPortOperatorLessThanOrEqual, + "regex": ClientPortOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClientPortOperator(input) + return &out, nil +} + +type CookiesOperator string + +const ( + CookiesOperatorAny CookiesOperator = "Any" + CookiesOperatorBeginsWith CookiesOperator = "BeginsWith" + CookiesOperatorContains CookiesOperator = "Contains" + CookiesOperatorEndsWith CookiesOperator = "EndsWith" + CookiesOperatorEqual CookiesOperator = "Equal" + CookiesOperatorGreaterThan CookiesOperator = "GreaterThan" + CookiesOperatorGreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual" + CookiesOperatorLessThan CookiesOperator = "LessThan" + CookiesOperatorLessThanOrEqual CookiesOperator = "LessThanOrEqual" + CookiesOperatorRegEx CookiesOperator = "RegEx" +) + +func PossibleValuesForCookiesOperator() []string { + return []string{ + string(CookiesOperatorAny), + string(CookiesOperatorBeginsWith), + string(CookiesOperatorContains), + string(CookiesOperatorEndsWith), + string(CookiesOperatorEqual), + string(CookiesOperatorGreaterThan), + string(CookiesOperatorGreaterThanOrEqual), + string(CookiesOperatorLessThan), + string(CookiesOperatorLessThanOrEqual), + string(CookiesOperatorRegEx), + } +} + +func (s *CookiesOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCookiesOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCookiesOperator(input string) (*CookiesOperator, error) { + vals := map[string]CookiesOperator{ + "any": CookiesOperatorAny, + "beginswith": CookiesOperatorBeginsWith, + "contains": CookiesOperatorContains, + "endswith": CookiesOperatorEndsWith, + "equal": CookiesOperatorEqual, + "greaterthan": CookiesOperatorGreaterThan, + "greaterthanorequal": CookiesOperatorGreaterThanOrEqual, + "lessthan": CookiesOperatorLessThan, + "lessthanorequal": CookiesOperatorLessThanOrEqual, + "regex": CookiesOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CookiesOperator(input) + return &out, nil +} + +type DeliveryRuleActionName string + +const ( + DeliveryRuleActionNameCacheExpiration DeliveryRuleActionName = "CacheExpiration" + DeliveryRuleActionNameCacheKeyQueryString DeliveryRuleActionName = "CacheKeyQueryString" + DeliveryRuleActionNameModifyRequestHeader DeliveryRuleActionName = "ModifyRequestHeader" + DeliveryRuleActionNameModifyResponseHeader DeliveryRuleActionName = "ModifyResponseHeader" + DeliveryRuleActionNameOriginGroupOverride DeliveryRuleActionName = "OriginGroupOverride" + DeliveryRuleActionNameRouteConfigurationOverride DeliveryRuleActionName = "RouteConfigurationOverride" + DeliveryRuleActionNameUrlRedirect DeliveryRuleActionName = "UrlRedirect" + DeliveryRuleActionNameUrlRewrite DeliveryRuleActionName = "UrlRewrite" + DeliveryRuleActionNameUrlSigning DeliveryRuleActionName = "UrlSigning" +) + +func PossibleValuesForDeliveryRuleActionName() []string { + return []string{ + string(DeliveryRuleActionNameCacheExpiration), + string(DeliveryRuleActionNameCacheKeyQueryString), + string(DeliveryRuleActionNameModifyRequestHeader), + string(DeliveryRuleActionNameModifyResponseHeader), + string(DeliveryRuleActionNameOriginGroupOverride), + string(DeliveryRuleActionNameRouteConfigurationOverride), + string(DeliveryRuleActionNameUrlRedirect), + string(DeliveryRuleActionNameUrlRewrite), + string(DeliveryRuleActionNameUrlSigning), + } +} + +func (s *DeliveryRuleActionName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleActionName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleActionName(input string) (*DeliveryRuleActionName, error) { + vals := map[string]DeliveryRuleActionName{ + "cacheexpiration": DeliveryRuleActionNameCacheExpiration, + "cachekeyquerystring": DeliveryRuleActionNameCacheKeyQueryString, + "modifyrequestheader": DeliveryRuleActionNameModifyRequestHeader, + "modifyresponseheader": DeliveryRuleActionNameModifyResponseHeader, + "origingroupoverride": DeliveryRuleActionNameOriginGroupOverride, + "routeconfigurationoverride": DeliveryRuleActionNameRouteConfigurationOverride, + "urlredirect": DeliveryRuleActionNameUrlRedirect, + "urlrewrite": DeliveryRuleActionNameUrlRewrite, + "urlsigning": DeliveryRuleActionNameUrlSigning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleActionName(input) + return &out, nil +} + +type DeliveryRuleActionParametersType string + +const ( + DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters DeliveryRuleActionParametersType = "DeliveryRuleCacheExpirationActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters DeliveryRuleActionParametersType = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters DeliveryRuleActionParametersType = "DeliveryRuleHeaderActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters DeliveryRuleActionParametersType = "DeliveryRuleOriginGroupOverrideActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters DeliveryRuleActionParametersType = "DeliveryRuleRouteConfigurationOverrideActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlRedirectActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlRewriteActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlSigningActionParameters" +) + +func PossibleValuesForDeliveryRuleActionParametersType() []string { + return []string{ + string(DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters), + } +} + +func (s *DeliveryRuleActionParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleActionParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleActionParametersType(input string) (*DeliveryRuleActionParametersType, error) { + vals := map[string]DeliveryRuleActionParametersType{ + "deliveryrulecacheexpirationactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters, + "deliveryrulecachekeyquerystringbehavioractionparameters": DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters, + "deliveryruleheaderactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters, + "deliveryruleorigingroupoverrideactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters, + "deliveryrulerouteconfigurationoverrideactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters, + "deliveryruleurlredirectactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters, + "deliveryruleurlrewriteactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters, + "deliveryruleurlsigningactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleActionParametersType(input) + return &out, nil +} + +type DeliveryRuleConditionParametersType string + +const ( + DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleClientPortConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleCookiesConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleHttpVersionConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleHostNameConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleIsDeviceConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters DeliveryRuleConditionParametersType = "DeliveryRulePostArgsConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleQueryStringConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRemoteAddressConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestBodyConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestHeaderConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestMethodConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestSchemeConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestUriConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleServerPortConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleSocketAddrConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleSslProtocolConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlFilenameConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlPathMatchConditionParameters" +) + +func PossibleValuesForDeliveryRuleConditionParametersType() []string { + return []string{ + string(DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters), + } +} + +func (s *DeliveryRuleConditionParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleConditionParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleConditionParametersType(input string) (*DeliveryRuleConditionParametersType, error) { + vals := map[string]DeliveryRuleConditionParametersType{ + "deliveryruleclientportconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters, + "deliveryrulecookiesconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters, + "deliveryrulehttpversionconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters, + "deliveryrulehostnameconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters, + "deliveryruleisdeviceconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters, + "deliveryrulepostargsconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters, + "deliveryrulequerystringconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters, + "deliveryruleremoteaddressconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters, + "deliveryrulerequestbodyconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters, + "deliveryrulerequestheaderconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters, + "deliveryrulerequestmethodconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters, + "deliveryrulerequestschemeconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters, + "deliveryrulerequesturiconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters, + "deliveryruleserverportconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters, + "deliveryrulesocketaddrconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters, + "deliveryrulesslprotocolconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters, + "deliveryruleurlfileextensionmatchconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters, + "deliveryruleurlfilenameconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters, + "deliveryruleurlpathmatchconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleConditionParametersType(input) + return &out, nil +} + +type DestinationProtocol string + +const ( + DestinationProtocolHTTP DestinationProtocol = "Http" + DestinationProtocolHTTPS DestinationProtocol = "Https" + DestinationProtocolMatchRequest DestinationProtocol = "MatchRequest" +) + +func PossibleValuesForDestinationProtocol() []string { + return []string{ + string(DestinationProtocolHTTP), + string(DestinationProtocolHTTPS), + string(DestinationProtocolMatchRequest), + } +} + +func (s *DestinationProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDestinationProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDestinationProtocol(input string) (*DestinationProtocol, error) { + vals := map[string]DestinationProtocol{ + "http": DestinationProtocolHTTP, + "https": DestinationProtocolHTTPS, + "matchrequest": DestinationProtocolMatchRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DestinationProtocol(input) + return &out, nil +} + +type EndpointProvisioningState string + +const ( + EndpointProvisioningStateCreating EndpointProvisioningState = "Creating" + EndpointProvisioningStateDeleting EndpointProvisioningState = "Deleting" + EndpointProvisioningStateFailed EndpointProvisioningState = "Failed" + EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded" + EndpointProvisioningStateUpdating EndpointProvisioningState = "Updating" +) + +func PossibleValuesForEndpointProvisioningState() []string { + return []string{ + string(EndpointProvisioningStateCreating), + string(EndpointProvisioningStateDeleting), + string(EndpointProvisioningStateFailed), + string(EndpointProvisioningStateSucceeded), + string(EndpointProvisioningStateUpdating), + } +} + +func (s *EndpointProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEndpointProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEndpointProvisioningState(input string) (*EndpointProvisioningState, error) { + vals := map[string]EndpointProvisioningState{ + "creating": EndpointProvisioningStateCreating, + "deleting": EndpointProvisioningStateDeleting, + "failed": EndpointProvisioningStateFailed, + "succeeded": EndpointProvisioningStateSucceeded, + "updating": EndpointProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EndpointProvisioningState(input) + return &out, nil +} + +type EndpointResourceState string + +const ( + EndpointResourceStateCreating EndpointResourceState = "Creating" + EndpointResourceStateDeleting EndpointResourceState = "Deleting" + EndpointResourceStateRunning EndpointResourceState = "Running" + EndpointResourceStateStarting EndpointResourceState = "Starting" + EndpointResourceStateStopped EndpointResourceState = "Stopped" + EndpointResourceStateStopping EndpointResourceState = "Stopping" +) + +func PossibleValuesForEndpointResourceState() []string { + return []string{ + string(EndpointResourceStateCreating), + string(EndpointResourceStateDeleting), + string(EndpointResourceStateRunning), + string(EndpointResourceStateStarting), + string(EndpointResourceStateStopped), + string(EndpointResourceStateStopping), + } +} + +func (s *EndpointResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEndpointResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEndpointResourceState(input string) (*EndpointResourceState, error) { + vals := map[string]EndpointResourceState{ + "creating": EndpointResourceStateCreating, + "deleting": EndpointResourceStateDeleting, + "running": EndpointResourceStateRunning, + "starting": EndpointResourceStateStarting, + "stopped": EndpointResourceStateStopped, + "stopping": EndpointResourceStateStopping, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EndpointResourceState(input) + return &out, nil +} + +type ForwardingProtocol string + +const ( + ForwardingProtocolHTTPOnly ForwardingProtocol = "HttpOnly" + ForwardingProtocolHTTPSOnly ForwardingProtocol = "HttpsOnly" + ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest" +) + +func PossibleValuesForForwardingProtocol() []string { + return []string{ + string(ForwardingProtocolHTTPOnly), + string(ForwardingProtocolHTTPSOnly), + string(ForwardingProtocolMatchRequest), + } +} + +func (s *ForwardingProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseForwardingProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseForwardingProtocol(input string) (*ForwardingProtocol, error) { + vals := map[string]ForwardingProtocol{ + "httponly": ForwardingProtocolHTTPOnly, + "httpsonly": ForwardingProtocolHTTPSOnly, + "matchrequest": ForwardingProtocolMatchRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ForwardingProtocol(input) + return &out, nil +} + +type GeoFilterActions string + +const ( + GeoFilterActionsAllow GeoFilterActions = "Allow" + GeoFilterActionsBlock GeoFilterActions = "Block" +) + +func PossibleValuesForGeoFilterActions() []string { + return []string{ + string(GeoFilterActionsAllow), + string(GeoFilterActionsBlock), + } +} + +func (s *GeoFilterActions) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGeoFilterActions(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGeoFilterActions(input string) (*GeoFilterActions, error) { + vals := map[string]GeoFilterActions{ + "allow": GeoFilterActionsAllow, + "block": GeoFilterActionsBlock, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GeoFilterActions(input) + return &out, nil +} + +type HTTPVersionOperator string + +const ( + HTTPVersionOperatorEqual HTTPVersionOperator = "Equal" +) + +func PossibleValuesForHTTPVersionOperator() []string { + return []string{ + string(HTTPVersionOperatorEqual), + } +} + +func (s *HTTPVersionOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHTTPVersionOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHTTPVersionOperator(input string) (*HTTPVersionOperator, error) { + vals := map[string]HTTPVersionOperator{ + "equal": HTTPVersionOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HTTPVersionOperator(input) + return &out, nil +} + +type HeaderAction string + +const ( + HeaderActionAppend HeaderAction = "Append" + HeaderActionDelete HeaderAction = "Delete" + HeaderActionOverwrite HeaderAction = "Overwrite" +) + +func PossibleValuesForHeaderAction() []string { + return []string{ + string(HeaderActionAppend), + string(HeaderActionDelete), + string(HeaderActionOverwrite), + } +} + +func (s *HeaderAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHeaderAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHeaderAction(input string) (*HeaderAction, error) { + vals := map[string]HeaderAction{ + "append": HeaderActionAppend, + "delete": HeaderActionDelete, + "overwrite": HeaderActionOverwrite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HeaderAction(input) + return &out, nil +} + +type HealthProbeRequestType string + +const ( + HealthProbeRequestTypeGET HealthProbeRequestType = "GET" + HealthProbeRequestTypeHEAD HealthProbeRequestType = "HEAD" + HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet" +) + +func PossibleValuesForHealthProbeRequestType() []string { + return []string{ + string(HealthProbeRequestTypeGET), + string(HealthProbeRequestTypeHEAD), + string(HealthProbeRequestTypeNotSet), + } +} + +func (s *HealthProbeRequestType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHealthProbeRequestType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHealthProbeRequestType(input string) (*HealthProbeRequestType, error) { + vals := map[string]HealthProbeRequestType{ + "get": HealthProbeRequestTypeGET, + "head": HealthProbeRequestTypeHEAD, + "notset": HealthProbeRequestTypeNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HealthProbeRequestType(input) + return &out, nil +} + +type HostNameOperator string + +const ( + HostNameOperatorAny HostNameOperator = "Any" + HostNameOperatorBeginsWith HostNameOperator = "BeginsWith" + HostNameOperatorContains HostNameOperator = "Contains" + HostNameOperatorEndsWith HostNameOperator = "EndsWith" + HostNameOperatorEqual HostNameOperator = "Equal" + HostNameOperatorGreaterThan HostNameOperator = "GreaterThan" + HostNameOperatorGreaterThanOrEqual HostNameOperator = "GreaterThanOrEqual" + HostNameOperatorLessThan HostNameOperator = "LessThan" + HostNameOperatorLessThanOrEqual HostNameOperator = "LessThanOrEqual" + HostNameOperatorRegEx HostNameOperator = "RegEx" +) + +func PossibleValuesForHostNameOperator() []string { + return []string{ + string(HostNameOperatorAny), + string(HostNameOperatorBeginsWith), + string(HostNameOperatorContains), + string(HostNameOperatorEndsWith), + string(HostNameOperatorEqual), + string(HostNameOperatorGreaterThan), + string(HostNameOperatorGreaterThanOrEqual), + string(HostNameOperatorLessThan), + string(HostNameOperatorLessThanOrEqual), + string(HostNameOperatorRegEx), + } +} + +func (s *HostNameOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHostNameOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHostNameOperator(input string) (*HostNameOperator, error) { + vals := map[string]HostNameOperator{ + "any": HostNameOperatorAny, + "beginswith": HostNameOperatorBeginsWith, + "contains": HostNameOperatorContains, + "endswith": HostNameOperatorEndsWith, + "equal": HostNameOperatorEqual, + "greaterthan": HostNameOperatorGreaterThan, + "greaterthanorequal": HostNameOperatorGreaterThanOrEqual, + "lessthan": HostNameOperatorLessThan, + "lessthanorequal": HostNameOperatorLessThanOrEqual, + "regex": HostNameOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HostNameOperator(input) + return &out, nil +} + +type IsDeviceMatchValue string + +const ( + IsDeviceMatchValueDesktop IsDeviceMatchValue = "Desktop" + IsDeviceMatchValueMobile IsDeviceMatchValue = "Mobile" +) + +func PossibleValuesForIsDeviceMatchValue() []string { + return []string{ + string(IsDeviceMatchValueDesktop), + string(IsDeviceMatchValueMobile), + } +} + +func (s *IsDeviceMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIsDeviceMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIsDeviceMatchValue(input string) (*IsDeviceMatchValue, error) { + vals := map[string]IsDeviceMatchValue{ + "desktop": IsDeviceMatchValueDesktop, + "mobile": IsDeviceMatchValueMobile, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IsDeviceMatchValue(input) + return &out, nil +} + +type IsDeviceOperator string + +const ( + IsDeviceOperatorEqual IsDeviceOperator = "Equal" +) + +func PossibleValuesForIsDeviceOperator() []string { + return []string{ + string(IsDeviceOperatorEqual), + } +} + +func (s *IsDeviceOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIsDeviceOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIsDeviceOperator(input string) (*IsDeviceOperator, error) { + vals := map[string]IsDeviceOperator{ + "equal": IsDeviceOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IsDeviceOperator(input) + return &out, nil +} + +type KeyVaultSigningKeyParametersType string + +const ( + KeyVaultSigningKeyParametersTypeKeyVaultSigningKeyParameters KeyVaultSigningKeyParametersType = "KeyVaultSigningKeyParameters" +) + +func PossibleValuesForKeyVaultSigningKeyParametersType() []string { + return []string{ + string(KeyVaultSigningKeyParametersTypeKeyVaultSigningKeyParameters), + } +} + +func (s *KeyVaultSigningKeyParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKeyVaultSigningKeyParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKeyVaultSigningKeyParametersType(input string) (*KeyVaultSigningKeyParametersType, error) { + vals := map[string]KeyVaultSigningKeyParametersType{ + "keyvaultsigningkeyparameters": KeyVaultSigningKeyParametersTypeKeyVaultSigningKeyParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := KeyVaultSigningKeyParametersType(input) + return &out, nil +} + +type MatchVariable string + +const ( + MatchVariableClientPort MatchVariable = "ClientPort" + MatchVariableCookies MatchVariable = "Cookies" + MatchVariableHTTPVersion MatchVariable = "HttpVersion" + MatchVariableHostName MatchVariable = "HostName" + MatchVariableIsDevice MatchVariable = "IsDevice" + MatchVariablePostArgs MatchVariable = "PostArgs" + MatchVariableQueryString MatchVariable = "QueryString" + MatchVariableRemoteAddress MatchVariable = "RemoteAddress" + MatchVariableRequestBody MatchVariable = "RequestBody" + MatchVariableRequestHeader MatchVariable = "RequestHeader" + MatchVariableRequestMethod MatchVariable = "RequestMethod" + MatchVariableRequestScheme MatchVariable = "RequestScheme" + MatchVariableRequestUri MatchVariable = "RequestUri" + MatchVariableServerPort MatchVariable = "ServerPort" + MatchVariableSocketAddr MatchVariable = "SocketAddr" + MatchVariableSslProtocol MatchVariable = "SslProtocol" + MatchVariableUrlFileExtension MatchVariable = "UrlFileExtension" + MatchVariableUrlFileName MatchVariable = "UrlFileName" + MatchVariableUrlPath MatchVariable = "UrlPath" +) + +func PossibleValuesForMatchVariable() []string { + return []string{ + string(MatchVariableClientPort), + string(MatchVariableCookies), + string(MatchVariableHTTPVersion), + string(MatchVariableHostName), + string(MatchVariableIsDevice), + string(MatchVariablePostArgs), + string(MatchVariableQueryString), + string(MatchVariableRemoteAddress), + string(MatchVariableRequestBody), + string(MatchVariableRequestHeader), + string(MatchVariableRequestMethod), + string(MatchVariableRequestScheme), + string(MatchVariableRequestUri), + string(MatchVariableServerPort), + string(MatchVariableSocketAddr), + string(MatchVariableSslProtocol), + string(MatchVariableUrlFileExtension), + string(MatchVariableUrlFileName), + string(MatchVariableUrlPath), + } +} + +func (s *MatchVariable) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMatchVariable(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMatchVariable(input string) (*MatchVariable, error) { + vals := map[string]MatchVariable{ + "clientport": MatchVariableClientPort, + "cookies": MatchVariableCookies, + "httpversion": MatchVariableHTTPVersion, + "hostname": MatchVariableHostName, + "isdevice": MatchVariableIsDevice, + "postargs": MatchVariablePostArgs, + "querystring": MatchVariableQueryString, + "remoteaddress": MatchVariableRemoteAddress, + "requestbody": MatchVariableRequestBody, + "requestheader": MatchVariableRequestHeader, + "requestmethod": MatchVariableRequestMethod, + "requestscheme": MatchVariableRequestScheme, + "requesturi": MatchVariableRequestUri, + "serverport": MatchVariableServerPort, + "socketaddr": MatchVariableSocketAddr, + "sslprotocol": MatchVariableSslProtocol, + "urlfileextension": MatchVariableUrlFileExtension, + "urlfilename": MatchVariableUrlFileName, + "urlpath": MatchVariableUrlPath, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MatchVariable(input) + return &out, nil +} + +type Operator string + +const ( + OperatorEqual Operator = "Equal" +) + +func PossibleValuesForOperator() []string { + return []string{ + string(OperatorEqual), + } +} + +func (s *Operator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperator(input string) (*Operator, error) { + vals := map[string]Operator{ + "equal": OperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Operator(input) + return &out, nil +} + +type OptimizationType string + +const ( + OptimizationTypeDynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration" + OptimizationTypeGeneralMediaStreaming OptimizationType = "GeneralMediaStreaming" + OptimizationTypeGeneralWebDelivery OptimizationType = "GeneralWebDelivery" + OptimizationTypeLargeFileDownload OptimizationType = "LargeFileDownload" + OptimizationTypeVideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming" +) + +func PossibleValuesForOptimizationType() []string { + return []string{ + string(OptimizationTypeDynamicSiteAcceleration), + string(OptimizationTypeGeneralMediaStreaming), + string(OptimizationTypeGeneralWebDelivery), + string(OptimizationTypeLargeFileDownload), + string(OptimizationTypeVideoOnDemandMediaStreaming), + } +} + +func (s *OptimizationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOptimizationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOptimizationType(input string) (*OptimizationType, error) { + vals := map[string]OptimizationType{ + "dynamicsiteacceleration": OptimizationTypeDynamicSiteAcceleration, + "generalmediastreaming": OptimizationTypeGeneralMediaStreaming, + "generalwebdelivery": OptimizationTypeGeneralWebDelivery, + "largefiledownload": OptimizationTypeLargeFileDownload, + "videoondemandmediastreaming": OptimizationTypeVideoOnDemandMediaStreaming, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OptimizationType(input) + return &out, nil +} + +type ParamIndicator string + +const ( + ParamIndicatorExpires ParamIndicator = "Expires" + ParamIndicatorKeyId ParamIndicator = "KeyId" + ParamIndicatorSignature ParamIndicator = "Signature" +) + +func PossibleValuesForParamIndicator() []string { + return []string{ + string(ParamIndicatorExpires), + string(ParamIndicatorKeyId), + string(ParamIndicatorSignature), + } +} + +func (s *ParamIndicator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseParamIndicator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseParamIndicator(input string) (*ParamIndicator, error) { + vals := map[string]ParamIndicator{ + "expires": ParamIndicatorExpires, + "keyid": ParamIndicatorKeyId, + "signature": ParamIndicatorSignature, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ParamIndicator(input) + return &out, nil +} + +type PostArgsOperator string + +const ( + PostArgsOperatorAny PostArgsOperator = "Any" + PostArgsOperatorBeginsWith PostArgsOperator = "BeginsWith" + PostArgsOperatorContains PostArgsOperator = "Contains" + PostArgsOperatorEndsWith PostArgsOperator = "EndsWith" + PostArgsOperatorEqual PostArgsOperator = "Equal" + PostArgsOperatorGreaterThan PostArgsOperator = "GreaterThan" + PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual" + PostArgsOperatorLessThan PostArgsOperator = "LessThan" + PostArgsOperatorLessThanOrEqual PostArgsOperator = "LessThanOrEqual" + PostArgsOperatorRegEx PostArgsOperator = "RegEx" +) + +func PossibleValuesForPostArgsOperator() []string { + return []string{ + string(PostArgsOperatorAny), + string(PostArgsOperatorBeginsWith), + string(PostArgsOperatorContains), + string(PostArgsOperatorEndsWith), + string(PostArgsOperatorEqual), + string(PostArgsOperatorGreaterThan), + string(PostArgsOperatorGreaterThanOrEqual), + string(PostArgsOperatorLessThan), + string(PostArgsOperatorLessThanOrEqual), + string(PostArgsOperatorRegEx), + } +} + +func (s *PostArgsOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePostArgsOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePostArgsOperator(input string) (*PostArgsOperator, error) { + vals := map[string]PostArgsOperator{ + "any": PostArgsOperatorAny, + "beginswith": PostArgsOperatorBeginsWith, + "contains": PostArgsOperatorContains, + "endswith": PostArgsOperatorEndsWith, + "equal": PostArgsOperatorEqual, + "greaterthan": PostArgsOperatorGreaterThan, + "greaterthanorequal": PostArgsOperatorGreaterThanOrEqual, + "lessthan": PostArgsOperatorLessThan, + "lessthanorequal": PostArgsOperatorLessThanOrEqual, + "regex": PostArgsOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PostArgsOperator(input) + return &out, nil +} + +type PrivateEndpointStatus string + +const ( + PrivateEndpointStatusApproved PrivateEndpointStatus = "Approved" + PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected" + PrivateEndpointStatusPending PrivateEndpointStatus = "Pending" + PrivateEndpointStatusRejected PrivateEndpointStatus = "Rejected" + PrivateEndpointStatusTimeout PrivateEndpointStatus = "Timeout" +) + +func PossibleValuesForPrivateEndpointStatus() []string { + return []string{ + string(PrivateEndpointStatusApproved), + string(PrivateEndpointStatusDisconnected), + string(PrivateEndpointStatusPending), + string(PrivateEndpointStatusRejected), + string(PrivateEndpointStatusTimeout), + } +} + +func (s *PrivateEndpointStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointStatus(input string) (*PrivateEndpointStatus, error) { + vals := map[string]PrivateEndpointStatus{ + "approved": PrivateEndpointStatusApproved, + "disconnected": PrivateEndpointStatusDisconnected, + "pending": PrivateEndpointStatusPending, + "rejected": PrivateEndpointStatusRejected, + "timeout": PrivateEndpointStatusTimeout, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointStatus(input) + return &out, nil +} + +type ProbeProtocol string + +const ( + ProbeProtocolHTTP ProbeProtocol = "Http" + ProbeProtocolHTTPS ProbeProtocol = "Https" + ProbeProtocolNotSet ProbeProtocol = "NotSet" +) + +func PossibleValuesForProbeProtocol() []string { + return []string{ + string(ProbeProtocolHTTP), + string(ProbeProtocolHTTPS), + string(ProbeProtocolNotSet), + } +} + +func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProbeProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProbeProtocol(input string) (*ProbeProtocol, error) { + vals := map[string]ProbeProtocol{ + "http": ProbeProtocolHTTP, + "https": ProbeProtocolHTTPS, + "notset": ProbeProtocolNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProbeProtocol(input) + return &out, nil +} + +type QueryStringBehavior string + +const ( + QueryStringBehaviorExclude QueryStringBehavior = "Exclude" + QueryStringBehaviorExcludeAll QueryStringBehavior = "ExcludeAll" + QueryStringBehaviorInclude QueryStringBehavior = "Include" + QueryStringBehaviorIncludeAll QueryStringBehavior = "IncludeAll" +) + +func PossibleValuesForQueryStringBehavior() []string { + return []string{ + string(QueryStringBehaviorExclude), + string(QueryStringBehaviorExcludeAll), + string(QueryStringBehaviorInclude), + string(QueryStringBehaviorIncludeAll), + } +} + +func (s *QueryStringBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryStringBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryStringBehavior(input string) (*QueryStringBehavior, error) { + vals := map[string]QueryStringBehavior{ + "exclude": QueryStringBehaviorExclude, + "excludeall": QueryStringBehaviorExcludeAll, + "include": QueryStringBehaviorInclude, + "includeall": QueryStringBehaviorIncludeAll, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryStringBehavior(input) + return &out, nil +} + +type QueryStringCachingBehavior string + +const ( + QueryStringCachingBehaviorBypassCaching QueryStringCachingBehavior = "BypassCaching" + QueryStringCachingBehaviorIgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString" + QueryStringCachingBehaviorNotSet QueryStringCachingBehavior = "NotSet" + QueryStringCachingBehaviorUseQueryString QueryStringCachingBehavior = "UseQueryString" +) + +func PossibleValuesForQueryStringCachingBehavior() []string { + return []string{ + string(QueryStringCachingBehaviorBypassCaching), + string(QueryStringCachingBehaviorIgnoreQueryString), + string(QueryStringCachingBehaviorNotSet), + string(QueryStringCachingBehaviorUseQueryString), + } +} + +func (s *QueryStringCachingBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryStringCachingBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryStringCachingBehavior(input string) (*QueryStringCachingBehavior, error) { + vals := map[string]QueryStringCachingBehavior{ + "bypasscaching": QueryStringCachingBehaviorBypassCaching, + "ignorequerystring": QueryStringCachingBehaviorIgnoreQueryString, + "notset": QueryStringCachingBehaviorNotSet, + "usequerystring": QueryStringCachingBehaviorUseQueryString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryStringCachingBehavior(input) + return &out, nil +} + +type QueryStringOperator string + +const ( + QueryStringOperatorAny QueryStringOperator = "Any" + QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith" + QueryStringOperatorContains QueryStringOperator = "Contains" + QueryStringOperatorEndsWith QueryStringOperator = "EndsWith" + QueryStringOperatorEqual QueryStringOperator = "Equal" + QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan" + QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual" + QueryStringOperatorLessThan QueryStringOperator = "LessThan" + QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual" + QueryStringOperatorRegEx QueryStringOperator = "RegEx" +) + +func PossibleValuesForQueryStringOperator() []string { + return []string{ + string(QueryStringOperatorAny), + string(QueryStringOperatorBeginsWith), + string(QueryStringOperatorContains), + string(QueryStringOperatorEndsWith), + string(QueryStringOperatorEqual), + string(QueryStringOperatorGreaterThan), + string(QueryStringOperatorGreaterThanOrEqual), + string(QueryStringOperatorLessThan), + string(QueryStringOperatorLessThanOrEqual), + string(QueryStringOperatorRegEx), + } +} + +func (s *QueryStringOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryStringOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryStringOperator(input string) (*QueryStringOperator, error) { + vals := map[string]QueryStringOperator{ + "any": QueryStringOperatorAny, + "beginswith": QueryStringOperatorBeginsWith, + "contains": QueryStringOperatorContains, + "endswith": QueryStringOperatorEndsWith, + "equal": QueryStringOperatorEqual, + "greaterthan": QueryStringOperatorGreaterThan, + "greaterthanorequal": QueryStringOperatorGreaterThanOrEqual, + "lessthan": QueryStringOperatorLessThan, + "lessthanorequal": QueryStringOperatorLessThanOrEqual, + "regex": QueryStringOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryStringOperator(input) + return &out, nil +} + +type RedirectType string + +const ( + RedirectTypeFound RedirectType = "Found" + RedirectTypeMoved RedirectType = "Moved" + RedirectTypePermanentRedirect RedirectType = "PermanentRedirect" + RedirectTypeTemporaryRedirect RedirectType = "TemporaryRedirect" +) + +func PossibleValuesForRedirectType() []string { + return []string{ + string(RedirectTypeFound), + string(RedirectTypeMoved), + string(RedirectTypePermanentRedirect), + string(RedirectTypeTemporaryRedirect), + } +} + +func (s *RedirectType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRedirectType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRedirectType(input string) (*RedirectType, error) { + vals := map[string]RedirectType{ + "found": RedirectTypeFound, + "moved": RedirectTypeMoved, + "permanentredirect": RedirectTypePermanentRedirect, + "temporaryredirect": RedirectTypeTemporaryRedirect, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RedirectType(input) + return &out, nil +} + +type RemoteAddressOperator string + +const ( + RemoteAddressOperatorAny RemoteAddressOperator = "Any" + RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch" + RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch" +) + +func PossibleValuesForRemoteAddressOperator() []string { + return []string{ + string(RemoteAddressOperatorAny), + string(RemoteAddressOperatorGeoMatch), + string(RemoteAddressOperatorIPMatch), + } +} + +func (s *RemoteAddressOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRemoteAddressOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRemoteAddressOperator(input string) (*RemoteAddressOperator, error) { + vals := map[string]RemoteAddressOperator{ + "any": RemoteAddressOperatorAny, + "geomatch": RemoteAddressOperatorGeoMatch, + "ipmatch": RemoteAddressOperatorIPMatch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RemoteAddressOperator(input) + return &out, nil +} + +type RequestBodyOperator string + +const ( + RequestBodyOperatorAny RequestBodyOperator = "Any" + RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith" + RequestBodyOperatorContains RequestBodyOperator = "Contains" + RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith" + RequestBodyOperatorEqual RequestBodyOperator = "Equal" + RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan" + RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual" + RequestBodyOperatorLessThan RequestBodyOperator = "LessThan" + RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual" + RequestBodyOperatorRegEx RequestBodyOperator = "RegEx" +) + +func PossibleValuesForRequestBodyOperator() []string { + return []string{ + string(RequestBodyOperatorAny), + string(RequestBodyOperatorBeginsWith), + string(RequestBodyOperatorContains), + string(RequestBodyOperatorEndsWith), + string(RequestBodyOperatorEqual), + string(RequestBodyOperatorGreaterThan), + string(RequestBodyOperatorGreaterThanOrEqual), + string(RequestBodyOperatorLessThan), + string(RequestBodyOperatorLessThanOrEqual), + string(RequestBodyOperatorRegEx), + } +} + +func (s *RequestBodyOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestBodyOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestBodyOperator(input string) (*RequestBodyOperator, error) { + vals := map[string]RequestBodyOperator{ + "any": RequestBodyOperatorAny, + "beginswith": RequestBodyOperatorBeginsWith, + "contains": RequestBodyOperatorContains, + "endswith": RequestBodyOperatorEndsWith, + "equal": RequestBodyOperatorEqual, + "greaterthan": RequestBodyOperatorGreaterThan, + "greaterthanorequal": RequestBodyOperatorGreaterThanOrEqual, + "lessthan": RequestBodyOperatorLessThan, + "lessthanorequal": RequestBodyOperatorLessThanOrEqual, + "regex": RequestBodyOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestBodyOperator(input) + return &out, nil +} + +type RequestHeaderOperator string + +const ( + RequestHeaderOperatorAny RequestHeaderOperator = "Any" + RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith" + RequestHeaderOperatorContains RequestHeaderOperator = "Contains" + RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith" + RequestHeaderOperatorEqual RequestHeaderOperator = "Equal" + RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan" + RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual" + RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan" + RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual" + RequestHeaderOperatorRegEx RequestHeaderOperator = "RegEx" +) + +func PossibleValuesForRequestHeaderOperator() []string { + return []string{ + string(RequestHeaderOperatorAny), + string(RequestHeaderOperatorBeginsWith), + string(RequestHeaderOperatorContains), + string(RequestHeaderOperatorEndsWith), + string(RequestHeaderOperatorEqual), + string(RequestHeaderOperatorGreaterThan), + string(RequestHeaderOperatorGreaterThanOrEqual), + string(RequestHeaderOperatorLessThan), + string(RequestHeaderOperatorLessThanOrEqual), + string(RequestHeaderOperatorRegEx), + } +} + +func (s *RequestHeaderOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestHeaderOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestHeaderOperator(input string) (*RequestHeaderOperator, error) { + vals := map[string]RequestHeaderOperator{ + "any": RequestHeaderOperatorAny, + "beginswith": RequestHeaderOperatorBeginsWith, + "contains": RequestHeaderOperatorContains, + "endswith": RequestHeaderOperatorEndsWith, + "equal": RequestHeaderOperatorEqual, + "greaterthan": RequestHeaderOperatorGreaterThan, + "greaterthanorequal": RequestHeaderOperatorGreaterThanOrEqual, + "lessthan": RequestHeaderOperatorLessThan, + "lessthanorequal": RequestHeaderOperatorLessThanOrEqual, + "regex": RequestHeaderOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestHeaderOperator(input) + return &out, nil +} + +type RequestMethodMatchValue string + +const ( + RequestMethodMatchValueDELETE RequestMethodMatchValue = "DELETE" + RequestMethodMatchValueGET RequestMethodMatchValue = "GET" + RequestMethodMatchValueHEAD RequestMethodMatchValue = "HEAD" + RequestMethodMatchValueOPTIONS RequestMethodMatchValue = "OPTIONS" + RequestMethodMatchValuePOST RequestMethodMatchValue = "POST" + RequestMethodMatchValuePUT RequestMethodMatchValue = "PUT" + RequestMethodMatchValueTRACE RequestMethodMatchValue = "TRACE" +) + +func PossibleValuesForRequestMethodMatchValue() []string { + return []string{ + string(RequestMethodMatchValueDELETE), + string(RequestMethodMatchValueGET), + string(RequestMethodMatchValueHEAD), + string(RequestMethodMatchValueOPTIONS), + string(RequestMethodMatchValuePOST), + string(RequestMethodMatchValuePUT), + string(RequestMethodMatchValueTRACE), + } +} + +func (s *RequestMethodMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestMethodMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestMethodMatchValue(input string) (*RequestMethodMatchValue, error) { + vals := map[string]RequestMethodMatchValue{ + "delete": RequestMethodMatchValueDELETE, + "get": RequestMethodMatchValueGET, + "head": RequestMethodMatchValueHEAD, + "options": RequestMethodMatchValueOPTIONS, + "post": RequestMethodMatchValuePOST, + "put": RequestMethodMatchValuePUT, + "trace": RequestMethodMatchValueTRACE, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestMethodMatchValue(input) + return &out, nil +} + +type RequestMethodOperator string + +const ( + RequestMethodOperatorEqual RequestMethodOperator = "Equal" +) + +func PossibleValuesForRequestMethodOperator() []string { + return []string{ + string(RequestMethodOperatorEqual), + } +} + +func (s *RequestMethodOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestMethodOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestMethodOperator(input string) (*RequestMethodOperator, error) { + vals := map[string]RequestMethodOperator{ + "equal": RequestMethodOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestMethodOperator(input) + return &out, nil +} + +type RequestSchemeMatchValue string + +const ( + RequestSchemeMatchValueHTTP RequestSchemeMatchValue = "HTTP" + RequestSchemeMatchValueHTTPS RequestSchemeMatchValue = "HTTPS" +) + +func PossibleValuesForRequestSchemeMatchValue() []string { + return []string{ + string(RequestSchemeMatchValueHTTP), + string(RequestSchemeMatchValueHTTPS), + } +} + +func (s *RequestSchemeMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestSchemeMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestSchemeMatchValue(input string) (*RequestSchemeMatchValue, error) { + vals := map[string]RequestSchemeMatchValue{ + "http": RequestSchemeMatchValueHTTP, + "https": RequestSchemeMatchValueHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestSchemeMatchValue(input) + return &out, nil +} + +type RequestUriOperator string + +const ( + RequestUriOperatorAny RequestUriOperator = "Any" + RequestUriOperatorBeginsWith RequestUriOperator = "BeginsWith" + RequestUriOperatorContains RequestUriOperator = "Contains" + RequestUriOperatorEndsWith RequestUriOperator = "EndsWith" + RequestUriOperatorEqual RequestUriOperator = "Equal" + RequestUriOperatorGreaterThan RequestUriOperator = "GreaterThan" + RequestUriOperatorGreaterThanOrEqual RequestUriOperator = "GreaterThanOrEqual" + RequestUriOperatorLessThan RequestUriOperator = "LessThan" + RequestUriOperatorLessThanOrEqual RequestUriOperator = "LessThanOrEqual" + RequestUriOperatorRegEx RequestUriOperator = "RegEx" +) + +func PossibleValuesForRequestUriOperator() []string { + return []string{ + string(RequestUriOperatorAny), + string(RequestUriOperatorBeginsWith), + string(RequestUriOperatorContains), + string(RequestUriOperatorEndsWith), + string(RequestUriOperatorEqual), + string(RequestUriOperatorGreaterThan), + string(RequestUriOperatorGreaterThanOrEqual), + string(RequestUriOperatorLessThan), + string(RequestUriOperatorLessThanOrEqual), + string(RequestUriOperatorRegEx), + } +} + +func (s *RequestUriOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestUriOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestUriOperator(input string) (*RequestUriOperator, error) { + vals := map[string]RequestUriOperator{ + "any": RequestUriOperatorAny, + "beginswith": RequestUriOperatorBeginsWith, + "contains": RequestUriOperatorContains, + "endswith": RequestUriOperatorEndsWith, + "equal": RequestUriOperatorEqual, + "greaterthan": RequestUriOperatorGreaterThan, + "greaterthanorequal": RequestUriOperatorGreaterThanOrEqual, + "lessthan": RequestUriOperatorLessThan, + "lessthanorequal": RequestUriOperatorLessThanOrEqual, + "regex": RequestUriOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestUriOperator(input) + return &out, nil +} + +type ResourceUsageUnit string + +const ( + ResourceUsageUnitCount ResourceUsageUnit = "count" +) + +func PossibleValuesForResourceUsageUnit() []string { + return []string{ + string(ResourceUsageUnitCount), + } +} + +func (s *ResourceUsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceUsageUnit(input string) (*ResourceUsageUnit, error) { + vals := map[string]ResourceUsageUnit{ + "count": ResourceUsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceUsageUnit(input) + return &out, nil +} + +type ResponseBasedDetectedErrorTypes string + +const ( + ResponseBasedDetectedErrorTypesNone ResponseBasedDetectedErrorTypes = "None" + ResponseBasedDetectedErrorTypesTcpAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors" + ResponseBasedDetectedErrorTypesTcpErrorsOnly ResponseBasedDetectedErrorTypes = "TcpErrorsOnly" +) + +func PossibleValuesForResponseBasedDetectedErrorTypes() []string { + return []string{ + string(ResponseBasedDetectedErrorTypesNone), + string(ResponseBasedDetectedErrorTypesTcpAndHTTPErrors), + string(ResponseBasedDetectedErrorTypesTcpErrorsOnly), + } +} + +func (s *ResponseBasedDetectedErrorTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResponseBasedDetectedErrorTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResponseBasedDetectedErrorTypes(input string) (*ResponseBasedDetectedErrorTypes, error) { + vals := map[string]ResponseBasedDetectedErrorTypes{ + "none": ResponseBasedDetectedErrorTypesNone, + "tcpandhttperrors": ResponseBasedDetectedErrorTypesTcpAndHTTPErrors, + "tcperrorsonly": ResponseBasedDetectedErrorTypesTcpErrorsOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResponseBasedDetectedErrorTypes(input) + return &out, nil +} + +type RuleCacheBehavior string + +const ( + RuleCacheBehaviorHonorOrigin RuleCacheBehavior = "HonorOrigin" + RuleCacheBehaviorOverrideAlways RuleCacheBehavior = "OverrideAlways" + RuleCacheBehaviorOverrideIfOriginMissing RuleCacheBehavior = "OverrideIfOriginMissing" +) + +func PossibleValuesForRuleCacheBehavior() []string { + return []string{ + string(RuleCacheBehaviorHonorOrigin), + string(RuleCacheBehaviorOverrideAlways), + string(RuleCacheBehaviorOverrideIfOriginMissing), + } +} + +func (s *RuleCacheBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleCacheBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleCacheBehavior(input string) (*RuleCacheBehavior, error) { + vals := map[string]RuleCacheBehavior{ + "honororigin": RuleCacheBehaviorHonorOrigin, + "overridealways": RuleCacheBehaviorOverrideAlways, + "overrideiforiginmissing": RuleCacheBehaviorOverrideIfOriginMissing, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleCacheBehavior(input) + return &out, nil +} + +type RuleIsCompressionEnabled string + +const ( + RuleIsCompressionEnabledDisabled RuleIsCompressionEnabled = "Disabled" + RuleIsCompressionEnabledEnabled RuleIsCompressionEnabled = "Enabled" +) + +func PossibleValuesForRuleIsCompressionEnabled() []string { + return []string{ + string(RuleIsCompressionEnabledDisabled), + string(RuleIsCompressionEnabledEnabled), + } +} + +func (s *RuleIsCompressionEnabled) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleIsCompressionEnabled(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleIsCompressionEnabled(input string) (*RuleIsCompressionEnabled, error) { + vals := map[string]RuleIsCompressionEnabled{ + "disabled": RuleIsCompressionEnabledDisabled, + "enabled": RuleIsCompressionEnabledEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleIsCompressionEnabled(input) + return &out, nil +} + +type RuleQueryStringCachingBehavior string + +const ( + RuleQueryStringCachingBehaviorIgnoreQueryString RuleQueryStringCachingBehavior = "IgnoreQueryString" + RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorUseQueryString RuleQueryStringCachingBehavior = "UseQueryString" +) + +func PossibleValuesForRuleQueryStringCachingBehavior() []string { + return []string{ + string(RuleQueryStringCachingBehaviorIgnoreQueryString), + string(RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings), + string(RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings), + string(RuleQueryStringCachingBehaviorUseQueryString), + } +} + +func (s *RuleQueryStringCachingBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleQueryStringCachingBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleQueryStringCachingBehavior(input string) (*RuleQueryStringCachingBehavior, error) { + vals := map[string]RuleQueryStringCachingBehavior{ + "ignorequerystring": RuleQueryStringCachingBehaviorIgnoreQueryString, + "ignorespecifiedquerystrings": RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, + "usequerystring": RuleQueryStringCachingBehaviorUseQueryString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleQueryStringCachingBehavior(input) + return &out, nil +} + +type ServerPortOperator string + +const ( + ServerPortOperatorAny ServerPortOperator = "Any" + ServerPortOperatorBeginsWith ServerPortOperator = "BeginsWith" + ServerPortOperatorContains ServerPortOperator = "Contains" + ServerPortOperatorEndsWith ServerPortOperator = "EndsWith" + ServerPortOperatorEqual ServerPortOperator = "Equal" + ServerPortOperatorGreaterThan ServerPortOperator = "GreaterThan" + ServerPortOperatorGreaterThanOrEqual ServerPortOperator = "GreaterThanOrEqual" + ServerPortOperatorLessThan ServerPortOperator = "LessThan" + ServerPortOperatorLessThanOrEqual ServerPortOperator = "LessThanOrEqual" + ServerPortOperatorRegEx ServerPortOperator = "RegEx" +) + +func PossibleValuesForServerPortOperator() []string { + return []string{ + string(ServerPortOperatorAny), + string(ServerPortOperatorBeginsWith), + string(ServerPortOperatorContains), + string(ServerPortOperatorEndsWith), + string(ServerPortOperatorEqual), + string(ServerPortOperatorGreaterThan), + string(ServerPortOperatorGreaterThanOrEqual), + string(ServerPortOperatorLessThan), + string(ServerPortOperatorLessThanOrEqual), + string(ServerPortOperatorRegEx), + } +} + +func (s *ServerPortOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerPortOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerPortOperator(input string) (*ServerPortOperator, error) { + vals := map[string]ServerPortOperator{ + "any": ServerPortOperatorAny, + "beginswith": ServerPortOperatorBeginsWith, + "contains": ServerPortOperatorContains, + "endswith": ServerPortOperatorEndsWith, + "equal": ServerPortOperatorEqual, + "greaterthan": ServerPortOperatorGreaterThan, + "greaterthanorequal": ServerPortOperatorGreaterThanOrEqual, + "lessthan": ServerPortOperatorLessThan, + "lessthanorequal": ServerPortOperatorLessThanOrEqual, + "regex": ServerPortOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerPortOperator(input) + return &out, nil +} + +type SocketAddrOperator string + +const ( + SocketAddrOperatorAny SocketAddrOperator = "Any" + SocketAddrOperatorIPMatch SocketAddrOperator = "IPMatch" +) + +func PossibleValuesForSocketAddrOperator() []string { + return []string{ + string(SocketAddrOperatorAny), + string(SocketAddrOperatorIPMatch), + } +} + +func (s *SocketAddrOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSocketAddrOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSocketAddrOperator(input string) (*SocketAddrOperator, error) { + vals := map[string]SocketAddrOperator{ + "any": SocketAddrOperatorAny, + "ipmatch": SocketAddrOperatorIPMatch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SocketAddrOperator(input) + return &out, nil +} + +type SslProtocol string + +const ( + SslProtocolTLSvOne SslProtocol = "TLSv1" + SslProtocolTLSvOnePointOne SslProtocol = "TLSv1.1" + SslProtocolTLSvOnePointTwo SslProtocol = "TLSv1.2" +) + +func PossibleValuesForSslProtocol() []string { + return []string{ + string(SslProtocolTLSvOne), + string(SslProtocolTLSvOnePointOne), + string(SslProtocolTLSvOnePointTwo), + } +} + +func (s *SslProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslProtocol(input string) (*SslProtocol, error) { + vals := map[string]SslProtocol{ + "tlsv1": SslProtocolTLSvOne, + "tlsv1.1": SslProtocolTLSvOnePointOne, + "tlsv1.2": SslProtocolTLSvOnePointTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslProtocol(input) + return &out, nil +} + +type SslProtocolOperator string + +const ( + SslProtocolOperatorEqual SslProtocolOperator = "Equal" +) + +func PossibleValuesForSslProtocolOperator() []string { + return []string{ + string(SslProtocolOperatorEqual), + } +} + +func (s *SslProtocolOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslProtocolOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslProtocolOperator(input string) (*SslProtocolOperator, error) { + vals := map[string]SslProtocolOperator{ + "equal": SslProtocolOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslProtocolOperator(input) + return &out, nil +} + +type Transform string + +const ( + TransformLowercase Transform = "Lowercase" + TransformRemoveNulls Transform = "RemoveNulls" + TransformTrim Transform = "Trim" + TransformUppercase Transform = "Uppercase" + TransformUrlDecode Transform = "UrlDecode" + TransformUrlEncode Transform = "UrlEncode" +) + +func PossibleValuesForTransform() []string { + return []string{ + string(TransformLowercase), + string(TransformRemoveNulls), + string(TransformTrim), + string(TransformUppercase), + string(TransformUrlDecode), + string(TransformUrlEncode), + } +} + +func (s *Transform) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTransform(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTransform(input string) (*Transform, error) { + vals := map[string]Transform{ + "lowercase": TransformLowercase, + "removenulls": TransformRemoveNulls, + "trim": TransformTrim, + "uppercase": TransformUppercase, + "urldecode": TransformUrlDecode, + "urlencode": TransformUrlEncode, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Transform(input) + return &out, nil +} + +type UrlFileExtensionOperator string + +const ( + UrlFileExtensionOperatorAny UrlFileExtensionOperator = "Any" + UrlFileExtensionOperatorBeginsWith UrlFileExtensionOperator = "BeginsWith" + UrlFileExtensionOperatorContains UrlFileExtensionOperator = "Contains" + UrlFileExtensionOperatorEndsWith UrlFileExtensionOperator = "EndsWith" + UrlFileExtensionOperatorEqual UrlFileExtensionOperator = "Equal" + UrlFileExtensionOperatorGreaterThan UrlFileExtensionOperator = "GreaterThan" + UrlFileExtensionOperatorGreaterThanOrEqual UrlFileExtensionOperator = "GreaterThanOrEqual" + UrlFileExtensionOperatorLessThan UrlFileExtensionOperator = "LessThan" + UrlFileExtensionOperatorLessThanOrEqual UrlFileExtensionOperator = "LessThanOrEqual" + UrlFileExtensionOperatorRegEx UrlFileExtensionOperator = "RegEx" +) + +func PossibleValuesForUrlFileExtensionOperator() []string { + return []string{ + string(UrlFileExtensionOperatorAny), + string(UrlFileExtensionOperatorBeginsWith), + string(UrlFileExtensionOperatorContains), + string(UrlFileExtensionOperatorEndsWith), + string(UrlFileExtensionOperatorEqual), + string(UrlFileExtensionOperatorGreaterThan), + string(UrlFileExtensionOperatorGreaterThanOrEqual), + string(UrlFileExtensionOperatorLessThan), + string(UrlFileExtensionOperatorLessThanOrEqual), + string(UrlFileExtensionOperatorRegEx), + } +} + +func (s *UrlFileExtensionOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlFileExtensionOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlFileExtensionOperator(input string) (*UrlFileExtensionOperator, error) { + vals := map[string]UrlFileExtensionOperator{ + "any": UrlFileExtensionOperatorAny, + "beginswith": UrlFileExtensionOperatorBeginsWith, + "contains": UrlFileExtensionOperatorContains, + "endswith": UrlFileExtensionOperatorEndsWith, + "equal": UrlFileExtensionOperatorEqual, + "greaterthan": UrlFileExtensionOperatorGreaterThan, + "greaterthanorequal": UrlFileExtensionOperatorGreaterThanOrEqual, + "lessthan": UrlFileExtensionOperatorLessThan, + "lessthanorequal": UrlFileExtensionOperatorLessThanOrEqual, + "regex": UrlFileExtensionOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlFileExtensionOperator(input) + return &out, nil +} + +type UrlFileNameOperator string + +const ( + UrlFileNameOperatorAny UrlFileNameOperator = "Any" + UrlFileNameOperatorBeginsWith UrlFileNameOperator = "BeginsWith" + UrlFileNameOperatorContains UrlFileNameOperator = "Contains" + UrlFileNameOperatorEndsWith UrlFileNameOperator = "EndsWith" + UrlFileNameOperatorEqual UrlFileNameOperator = "Equal" + UrlFileNameOperatorGreaterThan UrlFileNameOperator = "GreaterThan" + UrlFileNameOperatorGreaterThanOrEqual UrlFileNameOperator = "GreaterThanOrEqual" + UrlFileNameOperatorLessThan UrlFileNameOperator = "LessThan" + UrlFileNameOperatorLessThanOrEqual UrlFileNameOperator = "LessThanOrEqual" + UrlFileNameOperatorRegEx UrlFileNameOperator = "RegEx" +) + +func PossibleValuesForUrlFileNameOperator() []string { + return []string{ + string(UrlFileNameOperatorAny), + string(UrlFileNameOperatorBeginsWith), + string(UrlFileNameOperatorContains), + string(UrlFileNameOperatorEndsWith), + string(UrlFileNameOperatorEqual), + string(UrlFileNameOperatorGreaterThan), + string(UrlFileNameOperatorGreaterThanOrEqual), + string(UrlFileNameOperatorLessThan), + string(UrlFileNameOperatorLessThanOrEqual), + string(UrlFileNameOperatorRegEx), + } +} + +func (s *UrlFileNameOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlFileNameOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlFileNameOperator(input string) (*UrlFileNameOperator, error) { + vals := map[string]UrlFileNameOperator{ + "any": UrlFileNameOperatorAny, + "beginswith": UrlFileNameOperatorBeginsWith, + "contains": UrlFileNameOperatorContains, + "endswith": UrlFileNameOperatorEndsWith, + "equal": UrlFileNameOperatorEqual, + "greaterthan": UrlFileNameOperatorGreaterThan, + "greaterthanorequal": UrlFileNameOperatorGreaterThanOrEqual, + "lessthan": UrlFileNameOperatorLessThan, + "lessthanorequal": UrlFileNameOperatorLessThanOrEqual, + "regex": UrlFileNameOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlFileNameOperator(input) + return &out, nil +} + +type UrlPathOperator string + +const ( + UrlPathOperatorAny UrlPathOperator = "Any" + UrlPathOperatorBeginsWith UrlPathOperator = "BeginsWith" + UrlPathOperatorContains UrlPathOperator = "Contains" + UrlPathOperatorEndsWith UrlPathOperator = "EndsWith" + UrlPathOperatorEqual UrlPathOperator = "Equal" + UrlPathOperatorGreaterThan UrlPathOperator = "GreaterThan" + UrlPathOperatorGreaterThanOrEqual UrlPathOperator = "GreaterThanOrEqual" + UrlPathOperatorLessThan UrlPathOperator = "LessThan" + UrlPathOperatorLessThanOrEqual UrlPathOperator = "LessThanOrEqual" + UrlPathOperatorRegEx UrlPathOperator = "RegEx" + UrlPathOperatorWildcard UrlPathOperator = "Wildcard" +) + +func PossibleValuesForUrlPathOperator() []string { + return []string{ + string(UrlPathOperatorAny), + string(UrlPathOperatorBeginsWith), + string(UrlPathOperatorContains), + string(UrlPathOperatorEndsWith), + string(UrlPathOperatorEqual), + string(UrlPathOperatorGreaterThan), + string(UrlPathOperatorGreaterThanOrEqual), + string(UrlPathOperatorLessThan), + string(UrlPathOperatorLessThanOrEqual), + string(UrlPathOperatorRegEx), + string(UrlPathOperatorWildcard), + } +} + +func (s *UrlPathOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlPathOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlPathOperator(input string) (*UrlPathOperator, error) { + vals := map[string]UrlPathOperator{ + "any": UrlPathOperatorAny, + "beginswith": UrlPathOperatorBeginsWith, + "contains": UrlPathOperatorContains, + "endswith": UrlPathOperatorEndsWith, + "equal": UrlPathOperatorEqual, + "greaterthan": UrlPathOperatorGreaterThan, + "greaterthanorequal": UrlPathOperatorGreaterThanOrEqual, + "lessthan": UrlPathOperatorLessThan, + "lessthanorequal": UrlPathOperatorLessThanOrEqual, + "regex": UrlPathOperatorRegEx, + "wildcard": UrlPathOperatorWildcard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlPathOperator(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/id_endpoint.go b/resource-manager/cdn/2024-02-01/endpoints/id_endpoint.go new file mode 100644 index 00000000000..4dff3105766 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/id_endpoint.go @@ -0,0 +1,139 @@ +package endpoints + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointId{}) +} + +var _ resourceids.ResourceId = &EndpointId{} + +// EndpointId is a struct representing the Resource ID for a Endpoint +type EndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string +} + +// NewEndpointID returns a new EndpointId struct +func NewEndpointID(subscriptionId string, resourceGroupName string, profileName string, endpointName string) EndpointId { + return EndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + } +} + +// ParseEndpointID parses 'input' into a EndpointId +func ParseEndpointID(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointIDInsensitively parses 'input' case-insensitively into a EndpointId +// note: this method should only be used for API response data and not user input +func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + return nil +} + +// ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID +func ValidateEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint ID +func (id EndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint ID +func (id EndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + } +} + +// String returns a human-readable description of this Endpoint ID +func (id EndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + } + return fmt.Sprintf("Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/id_endpoint_test.go b/resource-manager/cdn/2024-02-01/endpoints/id_endpoint_test.go new file mode 100644 index 00000000000..e160b2b9d3b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/id_endpoint_test.go @@ -0,0 +1,327 @@ +package endpoints + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointId{} + +func TestNewEndpointID(t *testing.T) { + id := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } +} + +func TestFormatEndpointID(t *testing.T) { + actual := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestParseEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestSegmentsForEndpointId(t *testing.T) { + segments := EndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/id_profile.go b/resource-manager/cdn/2024-02-01/endpoints/id_profile.go new file mode 100644 index 00000000000..8f4f46d3dd8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/id_profile.go @@ -0,0 +1,130 @@ +package endpoints + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/id_profile_test.go b/resource-manager/cdn/2024-02-01/endpoints/id_profile_test.go new file mode 100644 index 00000000000..81485b03c04 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/id_profile_test.go @@ -0,0 +1,282 @@ +package endpoints + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_create.go b/resource-manager/cdn/2024-02-01/endpoints/method_create.go new file mode 100644 index 00000000000..f5a28f25dec --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_create.go @@ -0,0 +1,76 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Endpoint +} + +// Create ... +func (c EndpointsClient) Create(ctx context.Context, id EndpointId, input Endpoint) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c EndpointsClient) CreateThenPoll(ctx context.Context, id EndpointId, input Endpoint) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_delete.go b/resource-manager/cdn/2024-02-01/endpoints/method_delete.go new file mode 100644 index 00000000000..466f6bc5065 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_delete.go @@ -0,0 +1,71 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c EndpointsClient) Delete(ctx context.Context, id EndpointId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c EndpointsClient) DeleteThenPoll(ctx context.Context, id EndpointId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_get.go b/resource-manager/cdn/2024-02-01/endpoints/method_get.go new file mode 100644 index 00000000000..b81e42bd7da --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_get.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Endpoint +} + +// Get ... +func (c EndpointsClient) Get(ctx context.Context, id EndpointId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Endpoint + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/endpoints/method_listbyprofile.go new file mode 100644 index 00000000000..4cc86b4aa69 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_listbyprofile.go @@ -0,0 +1,105 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Endpoint +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []Endpoint +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c EndpointsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/endpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Endpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c EndpointsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, EndpointOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c EndpointsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate EndpointOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]Endpoint, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/endpoints/method_listresourceusage.go new file mode 100644 index 00000000000..31b7829b979 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_listresourceusage.go @@ -0,0 +1,105 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ResourceUsage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []ResourceUsage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c EndpointsClient) ListResourceUsage(ctx context.Context, id EndpointId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/checkResourceUsage", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ResourceUsage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c EndpointsClient) ListResourceUsageComplete(ctx context.Context, id EndpointId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, ResourceUsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c EndpointsClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate ResourceUsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]ResourceUsage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_loadcontent.go b/resource-manager/cdn/2024-02-01/endpoints/method_loadcontent.go new file mode 100644 index 00000000000..b1ba0411544 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_loadcontent.go @@ -0,0 +1,74 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadContentOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// LoadContent ... +func (c EndpointsClient) LoadContent(ctx context.Context, id EndpointId, input LoadParameters) (result LoadContentOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/load", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// LoadContentThenPoll performs LoadContent then polls until it's completed +func (c EndpointsClient) LoadContentThenPoll(ctx context.Context, id EndpointId, input LoadParameters) error { + result, err := c.LoadContent(ctx, id, input) + if err != nil { + return fmt.Errorf("performing LoadContent: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after LoadContent: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_purgecontent.go b/resource-manager/cdn/2024-02-01/endpoints/method_purgecontent.go new file mode 100644 index 00000000000..075274be601 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_purgecontent.go @@ -0,0 +1,74 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PurgeContentOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// PurgeContent ... +func (c EndpointsClient) PurgeContent(ctx context.Context, id EndpointId, input PurgeParameters) (result PurgeContentOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/purge", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PurgeContentThenPoll performs PurgeContent then polls until it's completed +func (c EndpointsClient) PurgeContentThenPoll(ctx context.Context, id EndpointId, input PurgeParameters) error { + result, err := c.PurgeContent(ctx, id, input) + if err != nil { + return fmt.Errorf("performing PurgeContent: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PurgeContent: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_start.go b/resource-manager/cdn/2024-02-01/endpoints/method_start.go new file mode 100644 index 00000000000..c5c1f2c28a6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_start.go @@ -0,0 +1,71 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StartOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Endpoint +} + +// Start ... +func (c EndpointsClient) Start(ctx context.Context, id EndpointId) (result StartOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/start", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StartThenPoll performs Start then polls until it's completed +func (c EndpointsClient) StartThenPoll(ctx context.Context, id EndpointId) error { + result, err := c.Start(ctx, id) + if err != nil { + return fmt.Errorf("performing Start: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Start: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_stop.go b/resource-manager/cdn/2024-02-01/endpoints/method_stop.go new file mode 100644 index 00000000000..84477fff9db --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_stop.go @@ -0,0 +1,71 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StopOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Endpoint +} + +// Stop ... +func (c EndpointsClient) Stop(ctx context.Context, id EndpointId) (result StopOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/stop", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// StopThenPoll performs Stop then polls until it's completed +func (c EndpointsClient) StopThenPoll(ctx context.Context, id EndpointId) error { + result, err := c.Stop(ctx, id) + if err != nil { + return fmt.Errorf("performing Stop: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Stop: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_update.go b/resource-manager/cdn/2024-02-01/endpoints/method_update.go new file mode 100644 index 00000000000..b61db980e96 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_update.go @@ -0,0 +1,75 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Endpoint +} + +// Update ... +func (c EndpointsClient) Update(ctx context.Context, id EndpointId, input EndpointUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c EndpointsClient) UpdateThenPoll(ctx context.Context, id EndpointId, input EndpointUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/method_validatecustomdomain.go b/resource-manager/cdn/2024-02-01/endpoints/method_validatecustomdomain.go new file mode 100644 index 00000000000..9d585f35d78 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/method_validatecustomdomain.go @@ -0,0 +1,58 @@ +package endpoints + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ValidateCustomDomainOutput +} + +// ValidateCustomDomain ... +func (c EndpointsClient) ValidateCustomDomain(ctx context.Context, id EndpointId, input ValidateCustomDomainInput) (result ValidateCustomDomainOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validateCustomDomain", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ValidateCustomDomainOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_cacheconfiguration.go b/resource-manager/cdn/2024-02-01/endpoints/model_cacheconfiguration.go new file mode 100644 index 00000000000..21f119971ed --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_cacheconfiguration.go @@ -0,0 +1,12 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheConfiguration struct { + CacheBehavior *RuleCacheBehavior `json:"cacheBehavior,omitempty"` + CacheDuration *string `json:"cacheDuration,omitempty"` + IsCompressionEnabled *RuleIsCompressionEnabled `json:"isCompressionEnabled,omitempty"` + QueryParameters *string `json:"queryParameters,omitempty"` + QueryStringCachingBehavior *RuleQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_cacheexpirationactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_cacheexpirationactionparameters.go new file mode 100644 index 00000000000..d3a3dc2bc48 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_cacheexpirationactionparameters.go @@ -0,0 +1,52 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = CacheExpirationActionParameters{} + +type CacheExpirationActionParameters struct { + CacheBehavior CacheBehavior `json:"cacheBehavior"` + CacheDuration *string `json:"cacheDuration,omitempty"` + CacheType CacheType `json:"cacheType"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s CacheExpirationActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CacheExpirationActionParameters{} + +func (s CacheExpirationActionParameters) MarshalJSON() ([]byte, error) { + type wrapper CacheExpirationActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CacheExpirationActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CacheExpirationActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCacheExpirationActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CacheExpirationActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_cachekeyquerystringactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_cachekeyquerystringactionparameters.go new file mode 100644 index 00000000000..a04c58620d0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_cachekeyquerystringactionparameters.go @@ -0,0 +1,51 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = CacheKeyQueryStringActionParameters{} + +type CacheKeyQueryStringActionParameters struct { + QueryParameters *string `json:"queryParameters,omitempty"` + QueryStringBehavior QueryStringBehavior `json:"queryStringBehavior"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s CacheKeyQueryStringActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CacheKeyQueryStringActionParameters{} + +func (s CacheKeyQueryStringActionParameters) MarshalJSON() ([]byte, error) { + type wrapper CacheKeyQueryStringActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_clientportmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_clientportmatchconditionparameters.go new file mode 100644 index 00000000000..39bfc0ecd8a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_clientportmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = ClientPortMatchConditionParameters{} + +type ClientPortMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator ClientPortOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s ClientPortMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = ClientPortMatchConditionParameters{} + +func (s ClientPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper ClientPortMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ClientPortMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ClientPortMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleClientPortConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ClientPortMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_cookiesmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_cookiesmatchconditionparameters.go new file mode 100644 index 00000000000..4ed28470256 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_cookiesmatchconditionparameters.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = CookiesMatchConditionParameters{} + +type CookiesMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator CookiesOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s CookiesMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CookiesMatchConditionParameters{} + +func (s CookiesMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper CookiesMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CookiesMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CookiesMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCookiesConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CookiesMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomain.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomain.go new file mode 100644 index 00000000000..ec8b3de7b4b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomain.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedCustomDomain struct { + Name string `json:"name"` + Properties *DeepCreatedCustomDomainProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomainproperties.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomainproperties.go new file mode 100644 index 00000000000..6e671e7d83c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedcustomdomainproperties.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedCustomDomainProperties struct { + HostName string `json:"hostName"` + ValidationData *string `json:"validationData,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigin.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigin.go new file mode 100644 index 00000000000..690b78c5197 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigin.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedOrigin struct { + Name string `json:"name"` + Properties *DeepCreatedOriginProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroup.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroup.go new file mode 100644 index 00000000000..254badd74b7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroup.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedOriginGroup struct { + Name string `json:"name"` + Properties *DeepCreatedOriginGroupProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroupproperties.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroupproperties.go new file mode 100644 index 00000000000..f29aff0fea0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedorigingroupproperties.go @@ -0,0 +1,11 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedOriginGroupProperties struct { + HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"` + Origins []ResourceReference `json:"origins"` + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"` + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedoriginproperties.go b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedoriginproperties.go new file mode 100644 index 00000000000..71dbdd39e96 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deepcreatedoriginproperties.go @@ -0,0 +1,19 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeepCreatedOriginProperties struct { + Enabled *bool `json:"enabled,omitempty"` + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + HostName string `json:"hostName"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + Priority *int64 `json:"priority,omitempty"` + PrivateEndpointStatus *PrivateEndpointStatus `json:"privateEndpointStatus,omitempty"` + PrivateLinkAlias *string `json:"privateLinkAlias,omitempty"` + PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"` + PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"` + PrivateLinkResourceId *string `json:"privateLinkResourceId,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrule.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrule.go new file mode 100644 index 00000000000..239763185c0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrule.go @@ -0,0 +1,69 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRule struct { + Actions []DeliveryRuleAction `json:"actions"` + Conditions *[]DeliveryRuleCondition `json:"conditions,omitempty"` + Name *string `json:"name,omitempty"` + Order int64 `json:"order"` +} + +var _ json.Unmarshaler = &DeliveryRule{} + +func (s *DeliveryRule) UnmarshalJSON(bytes []byte) error { + type alias DeliveryRule + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DeliveryRule: %+v", err) + } + + s.Name = decoded.Name + s.Order = decoded.Order + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DeliveryRule into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["actions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Actions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleAction, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleActionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Actions' for 'DeliveryRule': %+v", i, err) + } + output = append(output, impl) + } + s.Actions = output + } + + if v, ok := temp["conditions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Conditions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleCondition, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleConditionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'DeliveryRule': %+v", i, err) + } + output = append(output, impl) + } + s.Conditions = &output + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleaction.go new file mode 100644 index 00000000000..c59def9df27 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleaction.go @@ -0,0 +1,139 @@ +package endpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleAction interface { + DeliveryRuleAction() BaseDeliveryRuleActionImpl +} + +var _ DeliveryRuleAction = BaseDeliveryRuleActionImpl{} + +type BaseDeliveryRuleActionImpl struct { + Name DeliveryRuleActionName `json:"name"` +} + +func (s BaseDeliveryRuleActionImpl) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return s +} + +var _ DeliveryRuleAction = RawDeliveryRuleActionImpl{} + +// RawDeliveryRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleActionImpl struct { + deliveryRuleAction BaseDeliveryRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleActionImpl) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return s.deliveryRuleAction +} + +func UnmarshalDeliveryRuleActionImplementation(input []byte) (DeliveryRuleAction, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleAction into map[string]interface: %+v", err) + } + + value, ok := temp["name"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "CacheExpiration") { + var out DeliveryRuleCacheExpirationAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCacheExpirationAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CacheKeyQueryString") { + var out DeliveryRuleCacheKeyQueryStringAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ModifyRequestHeader") { + var out DeliveryRuleRequestHeaderAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestHeaderAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ModifyResponseHeader") { + var out DeliveryRuleResponseHeaderAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleResponseHeaderAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RouteConfigurationOverride") { + var out DeliveryRuleRouteConfigurationOverrideAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OriginGroupOverride") { + var out OriginGroupOverrideAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OriginGroupOverrideAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlRedirect") { + var out UrlRedirectAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRedirectAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlRewrite") { + var out UrlRewriteAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRewriteAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlSigning") { + var out UrlSigningAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlSigningAction: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleActionImpl: %+v", err) + } + + return RawDeliveryRuleActionImpl{ + deliveryRuleAction: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleactionparameters.go new file mode 100644 index 00000000000..e59c59cfbf1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleactionparameters.go @@ -0,0 +1,131 @@ +package endpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleActionParameters interface { + DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl +} + +var _ DeliveryRuleActionParameters = BaseDeliveryRuleActionParametersImpl{} + +type BaseDeliveryRuleActionParametersImpl struct { + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s BaseDeliveryRuleActionParametersImpl) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return s +} + +var _ DeliveryRuleActionParameters = RawDeliveryRuleActionParametersImpl{} + +// RawDeliveryRuleActionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleActionParametersImpl struct { + deliveryRuleActionParameters BaseDeliveryRuleActionParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleActionParametersImpl) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return s.deliveryRuleActionParameters +} + +func UnmarshalDeliveryRuleActionParametersImplementation(input []byte) (DeliveryRuleActionParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleActionParameters into map[string]interface: %+v", err) + } + + value, ok := temp["typeName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "DeliveryRuleCacheExpirationActionParameters") { + var out CacheExpirationActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CacheExpirationActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") { + var out CacheKeyQueryStringActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CacheKeyQueryStringActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHeaderActionParameters") { + var out HeaderActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HeaderActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleOriginGroupOverrideActionParameters") { + var out OriginGroupOverrideActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OriginGroupOverrideActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRouteConfigurationOverrideActionParameters") { + var out RouteConfigurationOverrideActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RouteConfigurationOverrideActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlRedirectActionParameters") { + var out UrlRedirectActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRedirectActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlRewriteActionParameters") { + var out UrlRewriteActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRewriteActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlSigningActionParameters") { + var out UrlSigningActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlSigningActionParameters: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleActionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleActionParametersImpl: %+v", err) + } + + return RawDeliveryRuleActionParametersImpl{ + deliveryRuleActionParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecacheexpirationaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecacheexpirationaction.go new file mode 100644 index 00000000000..254053e11ec --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecacheexpirationaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleCacheExpirationAction{} + +type DeliveryRuleCacheExpirationAction struct { + Parameters CacheExpirationActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleCacheExpirationAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCacheExpirationAction{} + +func (s DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCacheExpirationAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + decoded["name"] = "CacheExpiration" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecachekeyquerystringaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecachekeyquerystringaction.go new file mode 100644 index 00000000000..c50984c2481 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecachekeyquerystringaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleCacheKeyQueryStringAction{} + +type DeliveryRuleCacheKeyQueryStringAction struct { + Parameters CacheKeyQueryStringActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleCacheKeyQueryStringAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCacheKeyQueryStringAction{} + +func (s DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCacheKeyQueryStringAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + decoded["name"] = "CacheKeyQueryString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleclientportcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleclientportcondition.go new file mode 100644 index 00000000000..d2f98e9677f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleclientportcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleClientPortCondition{} + +type DeliveryRuleClientPortCondition struct { + Parameters ClientPortMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleClientPortCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleClientPortCondition{} + +func (s DeliveryRuleClientPortCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleClientPortCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleClientPortCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleClientPortCondition: %+v", err) + } + + decoded["name"] = "ClientPort" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleClientPortCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecondition.go new file mode 100644 index 00000000000..3e6558ffd5d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecondition.go @@ -0,0 +1,219 @@ +package endpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleCondition interface { + DeliveryRuleCondition() BaseDeliveryRuleConditionImpl +} + +var _ DeliveryRuleCondition = BaseDeliveryRuleConditionImpl{} + +type BaseDeliveryRuleConditionImpl struct { + Name MatchVariable `json:"name"` +} + +func (s BaseDeliveryRuleConditionImpl) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return s +} + +var _ DeliveryRuleCondition = RawDeliveryRuleConditionImpl{} + +// RawDeliveryRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleConditionImpl struct { + deliveryRuleCondition BaseDeliveryRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleConditionImpl) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return s.deliveryRuleCondition +} + +func UnmarshalDeliveryRuleConditionImplementation(input []byte) (DeliveryRuleCondition, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCondition into map[string]interface: %+v", err) + } + + value, ok := temp["name"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "ClientPort") { + var out DeliveryRuleClientPortCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleClientPortCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Cookies") { + var out DeliveryRuleCookiesCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCookiesCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpVersion") { + var out DeliveryRuleHTTPVersionCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleHTTPVersionCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HostName") { + var out DeliveryRuleHostNameCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleHostNameCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "IsDevice") { + var out DeliveryRuleIsDeviceCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleIsDeviceCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostArgs") { + var out DeliveryRulePostArgsCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRulePostArgsCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "QueryString") { + var out DeliveryRuleQueryStringCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleQueryStringCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RemoteAddress") { + var out DeliveryRuleRemoteAddressCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRemoteAddressCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestBody") { + var out DeliveryRuleRequestBodyCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestBodyCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestHeader") { + var out DeliveryRuleRequestHeaderCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestHeaderCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestMethod") { + var out DeliveryRuleRequestMethodCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestMethodCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestScheme") { + var out DeliveryRuleRequestSchemeCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestSchemeCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestUri") { + var out DeliveryRuleRequestUriCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestUriCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServerPort") { + var out DeliveryRuleServerPortCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleServerPortCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SocketAddr") { + var out DeliveryRuleSocketAddrCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleSocketAddrCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SslProtocol") { + var out DeliveryRuleSslProtocolCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleSslProtocolCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlFileExtension") { + var out DeliveryRuleUrlFileExtensionCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlFileName") { + var out DeliveryRuleUrlFileNameCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlFileNameCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlPath") { + var out DeliveryRuleUrlPathCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlPathCondition: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleConditionImpl: %+v", err) + } + + return RawDeliveryRuleConditionImpl{ + deliveryRuleCondition: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleconditionparameters.go new file mode 100644 index 00000000000..de14a12ecf8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleconditionparameters.go @@ -0,0 +1,219 @@ +package endpoints + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleConditionParameters interface { + DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl +} + +var _ DeliveryRuleConditionParameters = BaseDeliveryRuleConditionParametersImpl{} + +type BaseDeliveryRuleConditionParametersImpl struct { + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s BaseDeliveryRuleConditionParametersImpl) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return s +} + +var _ DeliveryRuleConditionParameters = RawDeliveryRuleConditionParametersImpl{} + +// RawDeliveryRuleConditionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleConditionParametersImpl struct { + deliveryRuleConditionParameters BaseDeliveryRuleConditionParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleConditionParametersImpl) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return s.deliveryRuleConditionParameters +} + +func UnmarshalDeliveryRuleConditionParametersImplementation(input []byte) (DeliveryRuleConditionParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleConditionParameters into map[string]interface: %+v", err) + } + + value, ok := temp["typeName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "DeliveryRuleClientPortConditionParameters") { + var out ClientPortMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ClientPortMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleCookiesConditionParameters") { + var out CookiesMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CookiesMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHttpVersionConditionParameters") { + var out HTTPVersionMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPVersionMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHostNameConditionParameters") { + var out HostNameMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HostNameMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleIsDeviceConditionParameters") { + var out IsDeviceMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into IsDeviceMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRulePostArgsConditionParameters") { + var out PostArgsMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostArgsMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleQueryStringConditionParameters") { + var out QueryStringMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QueryStringMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRemoteAddressConditionParameters") { + var out RemoteAddressMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RemoteAddressMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestBodyConditionParameters") { + var out RequestBodyMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestBodyMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestHeaderConditionParameters") { + var out RequestHeaderMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestHeaderMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestMethodConditionParameters") { + var out RequestMethodMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestMethodMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestSchemeConditionParameters") { + var out RequestSchemeMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestSchemeMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestUriConditionParameters") { + var out RequestUriMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestUriMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleServerPortConditionParameters") { + var out ServerPortMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPortMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleSocketAddrConditionParameters") { + var out SocketAddrMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SocketAddrMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleSslProtocolConditionParameters") { + var out SslProtocolMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SslProtocolMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlFileExtensionMatchConditionParameters") { + var out UrlFileExtensionMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlFileExtensionMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlFilenameConditionParameters") { + var out UrlFileNameMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlFileNameMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlPathMatchConditionParameters") { + var out UrlPathMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlPathMatchConditionParameters: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleConditionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleConditionParametersImpl: %+v", err) + } + + return RawDeliveryRuleConditionParametersImpl{ + deliveryRuleConditionParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecookiescondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecookiescondition.go new file mode 100644 index 00000000000..40445e78379 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulecookiescondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleCookiesCondition{} + +type DeliveryRuleCookiesCondition struct { + Parameters CookiesMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleCookiesCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCookiesCondition{} + +func (s DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCookiesCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCookiesCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCookiesCondition: %+v", err) + } + + decoded["name"] = "Cookies" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCookiesCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehostnamecondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehostnamecondition.go new file mode 100644 index 00000000000..f697d6cfe3d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehostnamecondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleHostNameCondition{} + +type DeliveryRuleHostNameCondition struct { + Parameters HostNameMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleHostNameCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleHostNameCondition{} + +func (s DeliveryRuleHostNameCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleHostNameCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleHostNameCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleHostNameCondition: %+v", err) + } + + decoded["name"] = "HostName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleHostNameCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehttpversioncondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehttpversioncondition.go new file mode 100644 index 00000000000..3f619a9613b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulehttpversioncondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleHTTPVersionCondition{} + +type DeliveryRuleHTTPVersionCondition struct { + Parameters HTTPVersionMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleHTTPVersionCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleHTTPVersionCondition{} + +func (s DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleHTTPVersionCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + decoded["name"] = "HttpVersion" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleisdevicecondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleisdevicecondition.go new file mode 100644 index 00000000000..d491df21148 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleisdevicecondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleIsDeviceCondition{} + +type DeliveryRuleIsDeviceCondition struct { + Parameters IsDeviceMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleIsDeviceCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleIsDeviceCondition{} + +func (s DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleIsDeviceCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + decoded["name"] = "IsDevice" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulepostargscondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulepostargscondition.go new file mode 100644 index 00000000000..d9405b44ca7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulepostargscondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRulePostArgsCondition{} + +type DeliveryRulePostArgsCondition struct { + Parameters PostArgsMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRulePostArgsCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRulePostArgsCondition{} + +func (s DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRulePostArgsCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRulePostArgsCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRulePostArgsCondition: %+v", err) + } + + decoded["name"] = "PostArgs" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRulePostArgsCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulequerystringcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulequerystringcondition.go new file mode 100644 index 00000000000..2e0f6b1b798 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulequerystringcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleQueryStringCondition{} + +type DeliveryRuleQueryStringCondition struct { + Parameters QueryStringMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleQueryStringCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleQueryStringCondition{} + +func (s DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleQueryStringCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + decoded["name"] = "QueryString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleremoteaddresscondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleremoteaddresscondition.go new file mode 100644 index 00000000000..0f2374f5f2a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleremoteaddresscondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRemoteAddressCondition{} + +type DeliveryRuleRemoteAddressCondition struct { + Parameters RemoteAddressMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRemoteAddressCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRemoteAddressCondition{} + +func (s DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRemoteAddressCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + decoded["name"] = "RemoteAddress" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestbodycondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestbodycondition.go new file mode 100644 index 00000000000..1ad88833bf2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestbodycondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestBodyCondition{} + +type DeliveryRuleRequestBodyCondition struct { + Parameters RequestBodyMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestBodyCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestBodyCondition{} + +func (s DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestBodyCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + decoded["name"] = "RequestBody" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheaderaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheaderaction.go new file mode 100644 index 00000000000..7432a3b4eea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheaderaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleRequestHeaderAction{} + +type DeliveryRuleRequestHeaderAction struct { + Parameters HeaderActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleRequestHeaderAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestHeaderAction{} + +func (s DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestHeaderAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + decoded["name"] = "ModifyRequestHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheadercondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheadercondition.go new file mode 100644 index 00000000000..c19f7f765d2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestheadercondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestHeaderCondition{} + +type DeliveryRuleRequestHeaderCondition struct { + Parameters RequestHeaderMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestHeaderCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestHeaderCondition{} + +func (s DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestHeaderCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + decoded["name"] = "RequestHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestmethodcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestmethodcondition.go new file mode 100644 index 00000000000..beae9e17f39 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestmethodcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestMethodCondition{} + +type DeliveryRuleRequestMethodCondition struct { + Parameters RequestMethodMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestMethodCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestMethodCondition{} + +func (s DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestMethodCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + decoded["name"] = "RequestMethod" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestschemecondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestschemecondition.go new file mode 100644 index 00000000000..0b59c0fccc9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequestschemecondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestSchemeCondition{} + +type DeliveryRuleRequestSchemeCondition struct { + Parameters RequestSchemeMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestSchemeCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestSchemeCondition{} + +func (s DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestSchemeCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + decoded["name"] = "RequestScheme" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequesturicondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequesturicondition.go new file mode 100644 index 00000000000..f57742a7df8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerequesturicondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestUriCondition{} + +type DeliveryRuleRequestUriCondition struct { + Parameters RequestUriMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestUriCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestUriCondition{} + +func (s DeliveryRuleRequestUriCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestUriCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + decoded["name"] = "RequestUri" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleresponseheaderaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleresponseheaderaction.go new file mode 100644 index 00000000000..fd59a2b461d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleresponseheaderaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleResponseHeaderAction{} + +type DeliveryRuleResponseHeaderAction struct { + Parameters HeaderActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleResponseHeaderAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleResponseHeaderAction{} + +func (s DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleResponseHeaderAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + decoded["name"] = "ModifyResponseHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerouteconfigurationoverrideaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerouteconfigurationoverrideaction.go new file mode 100644 index 00000000000..58797deab40 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulerouteconfigurationoverrideaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleRouteConfigurationOverrideAction{} + +type DeliveryRuleRouteConfigurationOverrideAction struct { + Parameters RouteConfigurationOverrideActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleRouteConfigurationOverrideAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRouteConfigurationOverrideAction{} + +func (s DeliveryRuleRouteConfigurationOverrideAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRouteConfigurationOverrideAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + decoded["name"] = "RouteConfigurationOverride" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleserverportcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleserverportcondition.go new file mode 100644 index 00000000000..7b1c12f5b1b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleserverportcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleServerPortCondition{} + +type DeliveryRuleServerPortCondition struct { + Parameters ServerPortMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleServerPortCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleServerPortCondition{} + +func (s DeliveryRuleServerPortCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleServerPortCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleServerPortCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleServerPortCondition: %+v", err) + } + + decoded["name"] = "ServerPort" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleServerPortCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesocketaddrcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesocketaddrcondition.go new file mode 100644 index 00000000000..73de4ae88f7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesocketaddrcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleSocketAddrCondition{} + +type DeliveryRuleSocketAddrCondition struct { + Parameters SocketAddrMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleSocketAddrCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleSocketAddrCondition{} + +func (s DeliveryRuleSocketAddrCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleSocketAddrCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + decoded["name"] = "SocketAddr" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesslprotocolcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesslprotocolcondition.go new file mode 100644 index 00000000000..072201f5372 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryrulesslprotocolcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleSslProtocolCondition{} + +type DeliveryRuleSslProtocolCondition struct { + Parameters SslProtocolMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleSslProtocolCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleSslProtocolCondition{} + +func (s DeliveryRuleSslProtocolCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleSslProtocolCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + decoded["name"] = "SslProtocol" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfileextensioncondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfileextensioncondition.go new file mode 100644 index 00000000000..9512a01cd72 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfileextensioncondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlFileExtensionCondition{} + +type DeliveryRuleUrlFileExtensionCondition struct { + Parameters UrlFileExtensionMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlFileExtensionCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlFileExtensionCondition{} + +func (s DeliveryRuleUrlFileExtensionCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlFileExtensionCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + decoded["name"] = "UrlFileExtension" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfilenamecondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfilenamecondition.go new file mode 100644 index 00000000000..99553de40b3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlfilenamecondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlFileNameCondition{} + +type DeliveryRuleUrlFileNameCondition struct { + Parameters UrlFileNameMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlFileNameCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlFileNameCondition{} + +func (s DeliveryRuleUrlFileNameCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlFileNameCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + decoded["name"] = "UrlFileName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlpathcondition.go b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlpathcondition.go new file mode 100644 index 00000000000..d5086467665 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_deliveryruleurlpathcondition.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlPathCondition{} + +type DeliveryRuleUrlPathCondition struct { + Parameters UrlPathMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlPathCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlPathCondition{} + +func (s DeliveryRuleUrlPathCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlPathCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + decoded["name"] = "UrlPath" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpoint.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpoint.go new file mode 100644 index 00000000000..1367b86ec12 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpoint.go @@ -0,0 +1,18 @@ +package endpoints + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Endpoint struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *EndpointProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpointproperties.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpointproperties.go new file mode 100644 index 00000000000..6ee490e4fca --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpointproperties.go @@ -0,0 +1,27 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointProperties struct { + ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"` + CustomDomains *[]DeepCreatedCustomDomain `json:"customDomains,omitempty"` + DefaultOriginGroup *ResourceReference `json:"defaultOriginGroup,omitempty"` + DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"` + GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` + HostName *string `json:"hostName,omitempty"` + IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"` + IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` + IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` + OptimizationType *OptimizationType `json:"optimizationType,omitempty"` + OriginGroups *[]DeepCreatedOriginGroup `json:"originGroups,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + OriginPath *string `json:"originPath,omitempty"` + Origins []DeepCreatedOrigin `json:"origins"` + ProbePath *string `json:"probePath,omitempty"` + ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty"` + QueryStringCachingBehavior *QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` + ResourceState *EndpointResourceState `json:"resourceState,omitempty"` + UrlSigningKeys *[]UrlSigningKey `json:"urlSigningKeys,omitempty"` + WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameters.go new file mode 100644 index 00000000000..c35794d9388 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameters.go @@ -0,0 +1,21 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointPropertiesUpdateParameters struct { + ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"` + DefaultOriginGroup *ResourceReference `json:"defaultOriginGroup,omitempty"` + DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"` + GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` + IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"` + IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` + IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` + OptimizationType *OptimizationType `json:"optimizationType,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + OriginPath *string `json:"originPath,omitempty"` + ProbePath *string `json:"probePath,omitempty"` + QueryStringCachingBehavior *QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` + UrlSigningKeys *[]UrlSigningKey `json:"urlSigningKeys,omitempty"` + WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink `json:"webApplicationFirewallPolicyLink,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparametersdeliverypolicy.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparametersdeliverypolicy.go new file mode 100644 index 00000000000..fc16bce3fc3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparametersdeliverypolicy.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointPropertiesUpdateParametersDeliveryPolicy struct { + Description *string `json:"description,omitempty"` + Rules []DeliveryRule `json:"rules"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameterswebapplicationfirewallpolicylink.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameterswebapplicationfirewallpolicylink.go new file mode 100644 index 00000000000..334f027af8d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpointpropertiesupdateparameterswebapplicationfirewallpolicylink.go @@ -0,0 +1,8 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_endpointupdateparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_endpointupdateparameters.go new file mode 100644 index 00000000000..8e59a3fc5f8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_endpointupdateparameters.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointUpdateParameters struct { + Properties *EndpointPropertiesUpdateParameters `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_geofilter.go b/resource-manager/cdn/2024-02-01/endpoints/model_geofilter.go new file mode 100644 index 00000000000..245420ec643 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_geofilter.go @@ -0,0 +1,10 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GeoFilter struct { + Action GeoFilterActions `json:"action"` + CountryCodes []string `json:"countryCodes"` + RelativePath string `json:"relativePath"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_headeractionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_headeractionparameters.go new file mode 100644 index 00000000000..3753776b30a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_headeractionparameters.go @@ -0,0 +1,52 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = HeaderActionParameters{} + +type HeaderActionParameters struct { + HeaderAction HeaderAction `json:"headerAction"` + HeaderName string `json:"headerName"` + Value *string `json:"value,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s HeaderActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HeaderActionParameters{} + +func (s HeaderActionParameters) MarshalJSON() ([]byte, error) { + type wrapper HeaderActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HeaderActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HeaderActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHeaderActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HeaderActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_healthprobeparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_healthprobeparameters.go new file mode 100644 index 00000000000..f7491e35f6a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_healthprobeparameters.go @@ -0,0 +1,11 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HealthProbeParameters struct { + ProbeIntervalInSeconds *int64 `json:"probeIntervalInSeconds,omitempty"` + ProbePath *string `json:"probePath,omitempty"` + ProbeProtocol *ProbeProtocol `json:"probeProtocol,omitempty"` + ProbeRequestType *HealthProbeRequestType `json:"probeRequestType,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_hostnamematchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_hostnamematchconditionparameters.go new file mode 100644 index 00000000000..ab3ac42a66a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_hostnamematchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = HostNameMatchConditionParameters{} + +type HostNameMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator HostNameOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s HostNameMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HostNameMatchConditionParameters{} + +func (s HostNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper HostNameMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HostNameMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HostNameMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHostNameConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HostNameMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_httperrorrangeparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_httperrorrangeparameters.go new file mode 100644 index 00000000000..7ee3f694daa --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_httperrorrangeparameters.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPErrorRangeParameters struct { + Begin *int64 `json:"begin,omitempty"` + End *int64 `json:"end,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_httpversionmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_httpversionmatchconditionparameters.go new file mode 100644 index 00000000000..3e6ff5da2c4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_httpversionmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = HTTPVersionMatchConditionParameters{} + +type HTTPVersionMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator HTTPVersionOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s HTTPVersionMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HTTPVersionMatchConditionParameters{} + +func (s HTTPVersionMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper HTTPVersionMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHttpVersionConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_isdevicematchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_isdevicematchconditionparameters.go new file mode 100644 index 00000000000..d5dc64eb8b4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_isdevicematchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = IsDeviceMatchConditionParameters{} + +type IsDeviceMatchConditionParameters struct { + MatchValues *[]IsDeviceMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator IsDeviceOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s IsDeviceMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = IsDeviceMatchConditionParameters{} + +func (s IsDeviceMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper IsDeviceMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling IsDeviceMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling IsDeviceMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleIsDeviceConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling IsDeviceMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_keyvaultsigningkeyparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_keyvaultsigningkeyparameters.go new file mode 100644 index 00000000000..9c7b3e64eb1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_keyvaultsigningkeyparameters.go @@ -0,0 +1,13 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KeyVaultSigningKeyParameters struct { + ResourceGroupName string `json:"resourceGroupName"` + SecretName string `json:"secretName"` + SecretVersion string `json:"secretVersion"` + SubscriptionId string `json:"subscriptionId"` + TypeName KeyVaultSigningKeyParametersType `json:"typeName"` + VaultName string `json:"vaultName"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_loadparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_loadparameters.go new file mode 100644 index 00000000000..4ba6766cb34 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_loadparameters.go @@ -0,0 +1,8 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LoadParameters struct { + ContentPaths []string `json:"contentPaths"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverride.go b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverride.go new file mode 100644 index 00000000000..e01336f6451 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverride.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupOverride struct { + ForwardingProtocol *ForwardingProtocol `json:"forwardingProtocol,omitempty"` + OriginGroup *ResourceReference `json:"originGroup,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideaction.go new file mode 100644 index 00000000000..48eb25360ed --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = OriginGroupOverrideAction{} + +type OriginGroupOverrideAction struct { + Parameters OriginGroupOverrideActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s OriginGroupOverrideAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = OriginGroupOverrideAction{} + +func (s OriginGroupOverrideAction) MarshalJSON() ([]byte, error) { + type wrapper OriginGroupOverrideAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OriginGroupOverrideAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OriginGroupOverrideAction: %+v", err) + } + + decoded["name"] = "OriginGroupOverride" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OriginGroupOverrideAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideactionparameters.go new file mode 100644 index 00000000000..0a949266e4d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_origingroupoverrideactionparameters.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = OriginGroupOverrideActionParameters{} + +type OriginGroupOverrideActionParameters struct { + OriginGroup ResourceReference `json:"originGroup"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s OriginGroupOverrideActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = OriginGroupOverrideActionParameters{} + +func (s OriginGroupOverrideActionParameters) MarshalJSON() ([]byte, error) { + type wrapper OriginGroupOverrideActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OriginGroupOverrideActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OriginGroupOverrideActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleOriginGroupOverrideActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OriginGroupOverrideActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_postargsmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_postargsmatchconditionparameters.go new file mode 100644 index 00000000000..19dab87e852 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_postargsmatchconditionparameters.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = PostArgsMatchConditionParameters{} + +type PostArgsMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator PostArgsOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s PostArgsMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = PostArgsMatchConditionParameters{} + +func (s PostArgsMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper PostArgsMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostArgsMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostArgsMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRulePostArgsConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostArgsMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_purgeparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_purgeparameters.go new file mode 100644 index 00000000000..7df637012d1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_purgeparameters.go @@ -0,0 +1,8 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PurgeParameters struct { + ContentPaths []string `json:"contentPaths"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_querystringmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_querystringmatchconditionparameters.go new file mode 100644 index 00000000000..fc8bf16d226 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_querystringmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = QueryStringMatchConditionParameters{} + +type QueryStringMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator QueryStringOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s QueryStringMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = QueryStringMatchConditionParameters{} + +func (s QueryStringMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper QueryStringMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QueryStringMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QueryStringMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleQueryStringConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QueryStringMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_remoteaddressmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_remoteaddressmatchconditionparameters.go new file mode 100644 index 00000000000..5c923d39500 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_remoteaddressmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RemoteAddressMatchConditionParameters{} + +type RemoteAddressMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RemoteAddressOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RemoteAddressMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RemoteAddressMatchConditionParameters{} + +func (s RemoteAddressMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RemoteAddressMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRemoteAddressConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_requestbodymatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_requestbodymatchconditionparameters.go new file mode 100644 index 00000000000..3c56322cee3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_requestbodymatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestBodyMatchConditionParameters{} + +type RequestBodyMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestBodyOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestBodyMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestBodyMatchConditionParameters{} + +func (s RequestBodyMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestBodyMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestBodyMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestBodyMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestBodyConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestBodyMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_requestheadermatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_requestheadermatchconditionparameters.go new file mode 100644 index 00000000000..9ab38ac5afb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_requestheadermatchconditionparameters.go @@ -0,0 +1,54 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestHeaderMatchConditionParameters{} + +type RequestHeaderMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestHeaderOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestHeaderMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestHeaderMatchConditionParameters{} + +func (s RequestHeaderMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestHeaderMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestHeaderConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_requestmethodmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_requestmethodmatchconditionparameters.go new file mode 100644 index 00000000000..d2b7b5f6d62 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_requestmethodmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestMethodMatchConditionParameters{} + +type RequestMethodMatchConditionParameters struct { + MatchValues *[]RequestMethodMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestMethodOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestMethodMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestMethodMatchConditionParameters{} + +func (s RequestMethodMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestMethodMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestMethodMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestMethodMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestMethodConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestMethodMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_requestschemematchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_requestschemematchconditionparameters.go new file mode 100644 index 00000000000..f90b69b35bf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_requestschemematchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestSchemeMatchConditionParameters{} + +type RequestSchemeMatchConditionParameters struct { + MatchValues *[]RequestSchemeMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator Operator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestSchemeMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestSchemeMatchConditionParameters{} + +func (s RequestSchemeMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestSchemeMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestSchemeConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_requesturimatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_requesturimatchconditionparameters.go new file mode 100644 index 00000000000..5ddcfe8d72c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_requesturimatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestUriMatchConditionParameters{} + +type RequestUriMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestUriOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestUriMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestUriMatchConditionParameters{} + +func (s RequestUriMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestUriMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestUriMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestUriMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestUriConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestUriMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_resourcereference.go b/resource-manager/cdn/2024-02-01/endpoints/model_resourcereference.go new file mode 100644 index 00000000000..d2738a85404 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_resourcereference.go @@ -0,0 +1,8 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_resourceusage.go b/resource-manager/cdn/2024-02-01/endpoints/model_resourceusage.go new file mode 100644 index 00000000000..e9ab54ffd5c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_resourceusage.go @@ -0,0 +1,11 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceUsage struct { + CurrentValue *int64 `json:"currentValue,omitempty"` + Limit *int64 `json:"limit,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Unit *ResourceUsageUnit `json:"unit,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_responsebasedoriginerrordetectionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_responsebasedoriginerrordetectionparameters.go new file mode 100644 index 00000000000..e9d37b8212f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_responsebasedoriginerrordetectionparameters.go @@ -0,0 +1,10 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResponseBasedOriginErrorDetectionParameters struct { + HTTPErrorRanges *[]HTTPErrorRangeParameters `json:"httpErrorRanges,omitempty"` + ResponseBasedDetectedErrorTypes *ResponseBasedDetectedErrorTypes `json:"responseBasedDetectedErrorTypes,omitempty"` + ResponseBasedFailoverThresholdPercentage *int64 `json:"responseBasedFailoverThresholdPercentage,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_routeconfigurationoverrideactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_routeconfigurationoverrideactionparameters.go new file mode 100644 index 00000000000..7bfb2fb6be3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_routeconfigurationoverrideactionparameters.go @@ -0,0 +1,51 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = RouteConfigurationOverrideActionParameters{} + +type RouteConfigurationOverrideActionParameters struct { + CacheConfiguration *CacheConfiguration `json:"cacheConfiguration,omitempty"` + OriginGroupOverride *OriginGroupOverride `json:"originGroupOverride,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s RouteConfigurationOverrideActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RouteConfigurationOverrideActionParameters{} + +func (s RouteConfigurationOverrideActionParameters) MarshalJSON() ([]byte, error) { + type wrapper RouteConfigurationOverrideActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRouteConfigurationOverrideActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_serverportmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_serverportmatchconditionparameters.go new file mode 100644 index 00000000000..27d2be14b5d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_serverportmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = ServerPortMatchConditionParameters{} + +type ServerPortMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator ServerPortOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s ServerPortMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = ServerPortMatchConditionParameters{} + +func (s ServerPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper ServerPortMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPortMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPortMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleServerPortConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPortMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_socketaddrmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_socketaddrmatchconditionparameters.go new file mode 100644 index 00000000000..ebc67818797 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_socketaddrmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = SocketAddrMatchConditionParameters{} + +type SocketAddrMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator SocketAddrOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s SocketAddrMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = SocketAddrMatchConditionParameters{} + +func (s SocketAddrMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper SocketAddrMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SocketAddrMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SocketAddrMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleSocketAddrConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SocketAddrMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_sslprotocolmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_sslprotocolmatchconditionparameters.go new file mode 100644 index 00000000000..875a8a68b53 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_sslprotocolmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = SslProtocolMatchConditionParameters{} + +type SslProtocolMatchConditionParameters struct { + MatchValues *[]SslProtocol `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator SslProtocolOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s SslProtocolMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = SslProtocolMatchConditionParameters{} + +func (s SslProtocolMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper SslProtocolMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SslProtocolMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SslProtocolMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleSslProtocolConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SslProtocolMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlfileextensionmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlfileextensionmatchconditionparameters.go new file mode 100644 index 00000000000..69e22adcabd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlfileextensionmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlFileExtensionMatchConditionParameters{} + +type UrlFileExtensionMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlFileExtensionOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlFileExtensionMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlFileExtensionMatchConditionParameters{} + +func (s UrlFileExtensionMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlFileExtensionMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlfilenamematchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlfilenamematchconditionparameters.go new file mode 100644 index 00000000000..3c1f9542bb1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlfilenamematchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlFileNameMatchConditionParameters{} + +type UrlFileNameMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlFileNameOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlFileNameMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlFileNameMatchConditionParameters{} + +func (s UrlFileNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlFileNameMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlFilenameConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlpathmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlpathmatchconditionparameters.go new file mode 100644 index 00000000000..a3b8d9fb970 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlpathmatchconditionparameters.go @@ -0,0 +1,53 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlPathMatchConditionParameters{} + +type UrlPathMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlPathOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlPathMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlPathMatchConditionParameters{} + +func (s UrlPathMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlPathMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlPathMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlPathMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlPathMatchConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlPathMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectaction.go new file mode 100644 index 00000000000..59b77e9342f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlRedirectAction{} + +type UrlRedirectAction struct { + Parameters UrlRedirectActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlRedirectAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlRedirectAction{} + +func (s UrlRedirectAction) MarshalJSON() ([]byte, error) { + type wrapper UrlRedirectAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRedirectAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRedirectAction: %+v", err) + } + + decoded["name"] = "UrlRedirect" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRedirectAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectactionparameters.go new file mode 100644 index 00000000000..a0983325e04 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlredirectactionparameters.go @@ -0,0 +1,55 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlRedirectActionParameters{} + +type UrlRedirectActionParameters struct { + CustomFragment *string `json:"customFragment,omitempty"` + CustomHostname *string `json:"customHostname,omitempty"` + CustomPath *string `json:"customPath,omitempty"` + CustomQueryString *string `json:"customQueryString,omitempty"` + DestinationProtocol *DestinationProtocol `json:"destinationProtocol,omitempty"` + RedirectType RedirectType `json:"redirectType"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlRedirectActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlRedirectActionParameters{} + +func (s UrlRedirectActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlRedirectActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRedirectActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRedirectActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlRedirectActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRedirectActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteaction.go new file mode 100644 index 00000000000..0f4dbbfdccb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlRewriteAction{} + +type UrlRewriteAction struct { + Parameters UrlRewriteActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlRewriteAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlRewriteAction{} + +func (s UrlRewriteAction) MarshalJSON() ([]byte, error) { + type wrapper UrlRewriteAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRewriteAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRewriteAction: %+v", err) + } + + decoded["name"] = "UrlRewrite" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRewriteAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteactionparameters.go new file mode 100644 index 00000000000..ed5d929eff7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlrewriteactionparameters.go @@ -0,0 +1,52 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlRewriteActionParameters{} + +type UrlRewriteActionParameters struct { + Destination string `json:"destination"` + PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"` + SourcePattern string `json:"sourcePattern"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlRewriteActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlRewriteActionParameters{} + +func (s UrlRewriteActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlRewriteActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRewriteActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRewriteActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlRewriteActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRewriteActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningaction.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningaction.go new file mode 100644 index 00000000000..1aa8ea2ab6f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningaction.go @@ -0,0 +1,50 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlSigningAction{} + +type UrlSigningAction struct { + Parameters UrlSigningActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlSigningAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlSigningAction{} + +func (s UrlSigningAction) MarshalJSON() ([]byte, error) { + type wrapper UrlSigningAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlSigningAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlSigningAction: %+v", err) + } + + decoded["name"] = "UrlSigning" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlSigningAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningactionparameters.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningactionparameters.go new file mode 100644 index 00000000000..b7de6a63660 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningactionparameters.go @@ -0,0 +1,51 @@ +package endpoints + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlSigningActionParameters{} + +type UrlSigningActionParameters struct { + Algorithm *Algorithm `json:"algorithm,omitempty"` + ParameterNameOverride *[]UrlSigningParamIdentifier `json:"parameterNameOverride,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlSigningActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlSigningActionParameters{} + +func (s UrlSigningActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlSigningActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlSigningActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlSigningActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlSigningActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlSigningActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningkey.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningkey.go new file mode 100644 index 00000000000..9249776a493 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningkey.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UrlSigningKey struct { + KeyId string `json:"keyId"` + KeySourceParameters KeyVaultSigningKeyParameters `json:"keySourceParameters"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningparamidentifier.go b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningparamidentifier.go new file mode 100644 index 00000000000..a8bdab0f7a2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_urlsigningparamidentifier.go @@ -0,0 +1,9 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UrlSigningParamIdentifier struct { + ParamIndicator ParamIndicator `json:"paramIndicator"` + ParamName string `json:"paramName"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomaininput.go b/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomaininput.go new file mode 100644 index 00000000000..e143829b2e9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomaininput.go @@ -0,0 +1,8 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainInput struct { + HostName string `json:"hostName"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomainoutput.go b/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomainoutput.go new file mode 100644 index 00000000000..ca152306143 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/model_validatecustomdomainoutput.go @@ -0,0 +1,10 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateCustomDomainOutput struct { + CustomDomainValidated *bool `json:"customDomainValidated,omitempty"` + Message *string `json:"message,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/predicates.go b/resource-manager/cdn/2024-02-01/endpoints/predicates.go new file mode 100644 index 00000000000..bb41ee6d27a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/predicates.go @@ -0,0 +1,55 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EndpointOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p EndpointOperationPredicate) Matches(input Endpoint) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ResourceUsageOperationPredicate struct { + CurrentValue *int64 + Limit *int64 + ResourceType *string +} + +func (p ResourceUsageOperationPredicate) Matches(input ResourceUsage) bool { + + if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { + return false + } + + if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { + return false + } + + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/endpoints/version.go b/resource-manager/cdn/2024-02-01/endpoints/version.go new file mode 100644 index 00000000000..8411b754eea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/endpoints/version.go @@ -0,0 +1,10 @@ +package endpoints + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/endpoints/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/README.md b/resource-manager/cdn/2024-02-01/loganalytics/README.md new file mode 100644 index 00000000000..94cc413c4e8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/README.md @@ -0,0 +1,84 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/loganalytics` Documentation + +The `loganalytics` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/loganalytics" +``` + + +### Client Initialization + +```go +client := loganalytics.NewLogAnalyticsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LogAnalyticsClient.GetLogAnalyticsLocations` + +```go +ctx := context.TODO() +id := loganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.GetLogAnalyticsLocations(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LogAnalyticsClient.GetLogAnalyticsMetrics` + +```go +ctx := context.TODO() +id := loganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.GetLogAnalyticsMetrics(ctx, id, loganalytics.DefaultGetLogAnalyticsMetricsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LogAnalyticsClient.GetLogAnalyticsRankings` + +```go +ctx := context.TODO() +id := loganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.GetLogAnalyticsRankings(ctx, id, loganalytics.DefaultGetLogAnalyticsRankingsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LogAnalyticsClient.GetLogAnalyticsResources` + +```go +ctx := context.TODO() +id := loganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.GetLogAnalyticsResources(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/loganalytics/client.go b/resource-manager/cdn/2024-02-01/loganalytics/client.go new file mode 100644 index 00000000000..b32a74cf728 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/client.go @@ -0,0 +1,26 @@ +package loganalytics + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogAnalyticsClient struct { + Client *resourcemanager.Client +} + +func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) + } + + return &LogAnalyticsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/constants.go b/resource-manager/cdn/2024-02-01/loganalytics/constants.go new file mode 100644 index 00000000000..b6b4815c44d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/constants.go @@ -0,0 +1,145 @@ +package loganalytics + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogMetricsGranularity string + +const ( + LogMetricsGranularityPOneD LogMetricsGranularity = "P1D" + LogMetricsGranularityPTFiveM LogMetricsGranularity = "PT5M" + LogMetricsGranularityPTOneH LogMetricsGranularity = "PT1H" +) + +func PossibleValuesForLogMetricsGranularity() []string { + return []string{ + string(LogMetricsGranularityPOneD), + string(LogMetricsGranularityPTFiveM), + string(LogMetricsGranularityPTOneH), + } +} + +func (s *LogMetricsGranularity) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLogMetricsGranularity(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLogMetricsGranularity(input string) (*LogMetricsGranularity, error) { + vals := map[string]LogMetricsGranularity{ + "p1d": LogMetricsGranularityPOneD, + "pt5m": LogMetricsGranularityPTFiveM, + "pt1h": LogMetricsGranularityPTOneH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LogMetricsGranularity(input) + return &out, nil +} + +type MetricsGranularity string + +const ( + MetricsGranularityPOneD MetricsGranularity = "P1D" + MetricsGranularityPTFiveM MetricsGranularity = "PT5M" + MetricsGranularityPTOneH MetricsGranularity = "PT1H" +) + +func PossibleValuesForMetricsGranularity() []string { + return []string{ + string(MetricsGranularityPOneD), + string(MetricsGranularityPTFiveM), + string(MetricsGranularityPTOneH), + } +} + +func (s *MetricsGranularity) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMetricsGranularity(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMetricsGranularity(input string) (*MetricsGranularity, error) { + vals := map[string]MetricsGranularity{ + "p1d": MetricsGranularityPOneD, + "pt5m": MetricsGranularityPTFiveM, + "pt1h": MetricsGranularityPTOneH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MetricsGranularity(input) + return &out, nil +} + +type MetricsSeriesUnit string + +const ( + MetricsSeriesUnitBitsPerSecond MetricsSeriesUnit = "bitsPerSecond" + MetricsSeriesUnitBytes MetricsSeriesUnit = "bytes" + MetricsSeriesUnitCount MetricsSeriesUnit = "count" + MetricsSeriesUnitMilliSeconds MetricsSeriesUnit = "milliSeconds" +) + +func PossibleValuesForMetricsSeriesUnit() []string { + return []string{ + string(MetricsSeriesUnitBitsPerSecond), + string(MetricsSeriesUnitBytes), + string(MetricsSeriesUnitCount), + string(MetricsSeriesUnitMilliSeconds), + } +} + +func (s *MetricsSeriesUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMetricsSeriesUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMetricsSeriesUnit(input string) (*MetricsSeriesUnit, error) { + vals := map[string]MetricsSeriesUnit{ + "bitspersecond": MetricsSeriesUnitBitsPerSecond, + "bytes": MetricsSeriesUnitBytes, + "count": MetricsSeriesUnitCount, + "milliseconds": MetricsSeriesUnitMilliSeconds, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MetricsSeriesUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/id_profile.go b/resource-manager/cdn/2024-02-01/loganalytics/id_profile.go new file mode 100644 index 00000000000..5d380e11fc8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/id_profile.go @@ -0,0 +1,130 @@ +package loganalytics + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/id_profile_test.go b/resource-manager/cdn/2024-02-01/loganalytics/id_profile_test.go new file mode 100644 index 00000000000..118207dc63f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/id_profile_test.go @@ -0,0 +1,282 @@ +package loganalytics + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticslocations.go b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticslocations.go new file mode 100644 index 00000000000..8fc487bb49d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticslocations.go @@ -0,0 +1,54 @@ +package loganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetLogAnalyticsLocationsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ContinentsResponse +} + +// GetLogAnalyticsLocations ... +func (c LogAnalyticsClient) GetLogAnalyticsLocations(ctx context.Context, id ProfileId) (result GetLogAnalyticsLocationsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/getLogAnalyticsLocations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ContinentsResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsmetrics.go b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsmetrics.go new file mode 100644 index 00000000000..a4b28e022a0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsmetrics.go @@ -0,0 +1,115 @@ +package loganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetLogAnalyticsMetricsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *MetricsResponse +} + +type GetLogAnalyticsMetricsOperationOptions struct { + Continents *[]string + CountryOrRegions *[]string + CustomDomains *[]string + DateTimeBegin *string + DateTimeEnd *string + Granularity *LogMetricsGranularity + GroupBy *[]string + Metrics *[]string + Protocols *[]string +} + +func DefaultGetLogAnalyticsMetricsOperationOptions() GetLogAnalyticsMetricsOperationOptions { + return GetLogAnalyticsMetricsOperationOptions{} +} + +func (o GetLogAnalyticsMetricsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetLogAnalyticsMetricsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o GetLogAnalyticsMetricsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Continents != nil { + out.Append("continents", fmt.Sprintf("%v", *o.Continents)) + } + if o.CountryOrRegions != nil { + out.Append("countryOrRegions", fmt.Sprintf("%v", *o.CountryOrRegions)) + } + if o.CustomDomains != nil { + out.Append("customDomains", fmt.Sprintf("%v", *o.CustomDomains)) + } + if o.DateTimeBegin != nil { + out.Append("dateTimeBegin", fmt.Sprintf("%v", *o.DateTimeBegin)) + } + if o.DateTimeEnd != nil { + out.Append("dateTimeEnd", fmt.Sprintf("%v", *o.DateTimeEnd)) + } + if o.Granularity != nil { + out.Append("granularity", fmt.Sprintf("%v", *o.Granularity)) + } + if o.GroupBy != nil { + out.Append("groupBy", fmt.Sprintf("%v", *o.GroupBy)) + } + if o.Metrics != nil { + out.Append("metrics", fmt.Sprintf("%v", *o.Metrics)) + } + if o.Protocols != nil { + out.Append("protocols", fmt.Sprintf("%v", *o.Protocols)) + } + return &out +} + +// GetLogAnalyticsMetrics ... +func (c LogAnalyticsClient) GetLogAnalyticsMetrics(ctx context.Context, id ProfileId, options GetLogAnalyticsMetricsOperationOptions) (result GetLogAnalyticsMetricsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: fmt.Sprintf("%s/getLogAnalyticsMetrics", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model MetricsResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsrankings.go b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsrankings.go new file mode 100644 index 00000000000..4f42f8fd86c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsrankings.go @@ -0,0 +1,103 @@ +package loganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetLogAnalyticsRankingsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RankingsResponse +} + +type GetLogAnalyticsRankingsOperationOptions struct { + CustomDomains *[]string + DateTimeBegin *string + DateTimeEnd *string + MaxRanking *int64 + Metrics *[]string + Rankings *[]string +} + +func DefaultGetLogAnalyticsRankingsOperationOptions() GetLogAnalyticsRankingsOperationOptions { + return GetLogAnalyticsRankingsOperationOptions{} +} + +func (o GetLogAnalyticsRankingsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o GetLogAnalyticsRankingsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o GetLogAnalyticsRankingsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.CustomDomains != nil { + out.Append("customDomains", fmt.Sprintf("%v", *o.CustomDomains)) + } + if o.DateTimeBegin != nil { + out.Append("dateTimeBegin", fmt.Sprintf("%v", *o.DateTimeBegin)) + } + if o.DateTimeEnd != nil { + out.Append("dateTimeEnd", fmt.Sprintf("%v", *o.DateTimeEnd)) + } + if o.MaxRanking != nil { + out.Append("maxRanking", fmt.Sprintf("%v", *o.MaxRanking)) + } + if o.Metrics != nil { + out.Append("metrics", fmt.Sprintf("%v", *o.Metrics)) + } + if o.Rankings != nil { + out.Append("rankings", fmt.Sprintf("%v", *o.Rankings)) + } + return &out +} + +// GetLogAnalyticsRankings ... +func (c LogAnalyticsClient) GetLogAnalyticsRankings(ctx context.Context, id ProfileId, options GetLogAnalyticsRankingsOperationOptions) (result GetLogAnalyticsRankingsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: fmt.Sprintf("%s/getLogAnalyticsRankings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RankingsResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsresources.go b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsresources.go new file mode 100644 index 00000000000..ebb8ef4109a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/method_getloganalyticsresources.go @@ -0,0 +1,54 @@ +package loganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetLogAnalyticsResourcesOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ResourcesResponse +} + +// GetLogAnalyticsResources ... +func (c LogAnalyticsClient) GetLogAnalyticsResources(ctx context.Context, id ProfileId) (result GetLogAnalyticsResourcesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/getLogAnalyticsResources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ResourcesResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponse.go b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponse.go new file mode 100644 index 00000000000..2769d4b2734 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponse.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContinentsResponse struct { + Continents *[]ContinentsResponseContinentsInlined `json:"continents,omitempty"` + CountryOrRegions *[]ContinentsResponseCountryOrRegionsInlined `json:"countryOrRegions,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecontinentsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecontinentsinlined.go new file mode 100644 index 00000000000..78369bd519c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecontinentsinlined.go @@ -0,0 +1,8 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContinentsResponseContinentsInlined struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecountryorregionsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecountryorregionsinlined.go new file mode 100644 index 00000000000..5fc2ba4521d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_continentsresponsecountryorregionsinlined.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ContinentsResponseCountryOrRegionsInlined struct { + ContinentId *string `json:"continentId,omitempty"` + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponse.go b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponse.go new file mode 100644 index 00000000000..0bbcacac905 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponse.go @@ -0,0 +1,41 @@ +package loganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MetricsResponse struct { + DateTimeBegin *string `json:"dateTimeBegin,omitempty"` + DateTimeEnd *string `json:"dateTimeEnd,omitempty"` + Granularity *MetricsGranularity `json:"granularity,omitempty"` + Series *[]MetricsResponseSeriesInlined `json:"series,omitempty"` +} + +func (o *MetricsResponse) GetDateTimeBeginAsTime() (*time.Time, error) { + if o.DateTimeBegin == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeBegin, "2006-01-02T15:04:05Z07:00") +} + +func (o *MetricsResponse) SetDateTimeBeginAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeBegin = &formatted +} + +func (o *MetricsResponse) GetDateTimeEndAsTime() (*time.Time, error) { + if o.DateTimeEnd == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeEnd, "2006-01-02T15:04:05Z07:00") +} + +func (o *MetricsResponse) SetDateTimeEndAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeEnd = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlined.go new file mode 100644 index 00000000000..2f151cc93d3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlined.go @@ -0,0 +1,11 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MetricsResponseSeriesInlined struct { + Data *[]MetricsResponseSeriesInlinedDataInlined `json:"data,omitempty"` + Groups *[]MetricsResponseSeriesInlinedGroupsInlined `json:"groups,omitempty"` + Metric *string `json:"metric,omitempty"` + Unit *MetricsSeriesUnit `json:"unit,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlineddatainlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlineddatainlined.go new file mode 100644 index 00000000000..7d848aecfce --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlineddatainlined.go @@ -0,0 +1,27 @@ +package loganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MetricsResponseSeriesInlinedDataInlined struct { + DateTime *string `json:"dateTime,omitempty"` + Value *float64 `json:"value,omitempty"` +} + +func (o *MetricsResponseSeriesInlinedDataInlined) GetDateTimeAsTime() (*time.Time, error) { + if o.DateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MetricsResponseSeriesInlinedDataInlined) SetDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTime = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlinedgroupsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlinedgroupsinlined.go new file mode 100644 index 00000000000..ffd5770e6f5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_metricsresponseseriesinlinedgroupsinlined.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MetricsResponseSeriesInlinedGroupsInlined struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponse.go b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponse.go new file mode 100644 index 00000000000..c7d2cbd3a7e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponse.go @@ -0,0 +1,40 @@ +package loganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RankingsResponse struct { + DateTimeBegin *string `json:"dateTimeBegin,omitempty"` + DateTimeEnd *string `json:"dateTimeEnd,omitempty"` + Tables *[]RankingsResponseTablesInlined `json:"tables,omitempty"` +} + +func (o *RankingsResponse) GetDateTimeBeginAsTime() (*time.Time, error) { + if o.DateTimeBegin == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeBegin, "2006-01-02T15:04:05Z07:00") +} + +func (o *RankingsResponse) SetDateTimeBeginAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeBegin = &formatted +} + +func (o *RankingsResponse) GetDateTimeEndAsTime() (*time.Time, error) { + if o.DateTimeEnd == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeEnd, "2006-01-02T15:04:05Z07:00") +} + +func (o *RankingsResponse) SetDateTimeEndAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeEnd = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlined.go new file mode 100644 index 00000000000..41b56e2085e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlined.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RankingsResponseTablesInlined struct { + Data *[]RankingsResponseTablesInlinedDataInlined `json:"data,omitempty"` + Ranking *string `json:"ranking,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlined.go new file mode 100644 index 00000000000..4cc5bfe9476 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlined.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RankingsResponseTablesInlinedDataInlined struct { + Metrics *[]RankingsResponseTablesInlinedDataInlinedMetricsInlined `json:"metrics,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlinedmetricsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlinedmetricsinlined.go new file mode 100644 index 00000000000..61a3412e580 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_rankingsresponsetablesinlineddatainlinedmetricsinlined.go @@ -0,0 +1,10 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RankingsResponseTablesInlinedDataInlinedMetricsInlined struct { + Metric *string `json:"metric,omitempty"` + Percentage *float64 `json:"percentage,omitempty"` + Value *int64 `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponse.go b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponse.go new file mode 100644 index 00000000000..3def33df803 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponse.go @@ -0,0 +1,9 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourcesResponse struct { + CustomDomains *[]ResourcesResponseCustomDomainsInlined `json:"customDomains,omitempty"` + Endpoints *[]ResourcesResponseEndpointsInlined `json:"endpoints,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponsecustomdomainsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponsecustomdomainsinlined.go new file mode 100644 index 00000000000..1414be5266a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponsecustomdomainsinlined.go @@ -0,0 +1,11 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourcesResponseCustomDomainsInlined struct { + EndpointId *string `json:"endpointId,omitempty"` + History *bool `json:"history,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlined.go new file mode 100644 index 00000000000..086302ac252 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlined.go @@ -0,0 +1,11 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourcesResponseEndpointsInlined struct { + CustomDomains *[]ResourcesResponseEndpointsInlinedCustomDomainsInlined `json:"customDomains,omitempty"` + History *bool `json:"history,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlinedcustomdomainsinlined.go b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlinedcustomdomainsinlined.go new file mode 100644 index 00000000000..5b907cc5cf7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/model_resourcesresponseendpointsinlinedcustomdomainsinlined.go @@ -0,0 +1,11 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourcesResponseEndpointsInlinedCustomDomainsInlined struct { + EndpointId *string `json:"endpointId,omitempty"` + History *bool `json:"history,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/loganalytics/version.go b/resource-manager/cdn/2024-02-01/loganalytics/version.go new file mode 100644 index 00000000000..cac998bc2de --- /dev/null +++ b/resource-manager/cdn/2024-02-01/loganalytics/version.go @@ -0,0 +1,10 @@ +package loganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/loganalytics/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/README.md b/resource-manager/cdn/2024-02-01/origingroups/README.md new file mode 100644 index 00000000000..b0611e5cb7f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origingroups` Documentation + +The `origingroups` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origingroups" +``` + + +### Client Initialization + +```go +client := origingroups.NewOriginGroupsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OriginGroupsClient.Create` + +```go +ctx := context.TODO() +id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue") + +payload := origingroups.OriginGroup{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `OriginGroupsClient.Delete` + +```go +ctx := context.TODO() +id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `OriginGroupsClient.Get` + +```go +ctx := context.TODO() +id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OriginGroupsClient.ListByEndpoint` + +```go +ctx := context.TODO() +id := origingroups.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +// alternatively `client.ListByEndpoint(ctx, id)` can be used to do batched pagination +items, err := client.ListByEndpointComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `OriginGroupsClient.Update` + +```go +ctx := context.TODO() +id := origingroups.NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue") + +payload := origingroups.OriginGroupUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/origingroups/client.go b/resource-manager/cdn/2024-02-01/origingroups/client.go new file mode 100644 index 00000000000..cd67131f745 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/client.go @@ -0,0 +1,26 @@ +package origingroups + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupsClient struct { + Client *resourcemanager.Client +} + +func NewOriginGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*OriginGroupsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "origingroups", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating OriginGroupsClient: %+v", err) + } + + return &OriginGroupsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/constants.go b/resource-manager/cdn/2024-02-01/origingroups/constants.go new file mode 100644 index 00000000000..b7f9848fff3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/constants.go @@ -0,0 +1,236 @@ +package origingroups + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HealthProbeRequestType string + +const ( + HealthProbeRequestTypeGET HealthProbeRequestType = "GET" + HealthProbeRequestTypeHEAD HealthProbeRequestType = "HEAD" + HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet" +) + +func PossibleValuesForHealthProbeRequestType() []string { + return []string{ + string(HealthProbeRequestTypeGET), + string(HealthProbeRequestTypeHEAD), + string(HealthProbeRequestTypeNotSet), + } +} + +func (s *HealthProbeRequestType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHealthProbeRequestType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHealthProbeRequestType(input string) (*HealthProbeRequestType, error) { + vals := map[string]HealthProbeRequestType{ + "get": HealthProbeRequestTypeGET, + "head": HealthProbeRequestTypeHEAD, + "notset": HealthProbeRequestTypeNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HealthProbeRequestType(input) + return &out, nil +} + +type OriginGroupProvisioningState string + +const ( + OriginGroupProvisioningStateCreating OriginGroupProvisioningState = "Creating" + OriginGroupProvisioningStateDeleting OriginGroupProvisioningState = "Deleting" + OriginGroupProvisioningStateFailed OriginGroupProvisioningState = "Failed" + OriginGroupProvisioningStateSucceeded OriginGroupProvisioningState = "Succeeded" + OriginGroupProvisioningStateUpdating OriginGroupProvisioningState = "Updating" +) + +func PossibleValuesForOriginGroupProvisioningState() []string { + return []string{ + string(OriginGroupProvisioningStateCreating), + string(OriginGroupProvisioningStateDeleting), + string(OriginGroupProvisioningStateFailed), + string(OriginGroupProvisioningStateSucceeded), + string(OriginGroupProvisioningStateUpdating), + } +} + +func (s *OriginGroupProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOriginGroupProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOriginGroupProvisioningState(input string) (*OriginGroupProvisioningState, error) { + vals := map[string]OriginGroupProvisioningState{ + "creating": OriginGroupProvisioningStateCreating, + "deleting": OriginGroupProvisioningStateDeleting, + "failed": OriginGroupProvisioningStateFailed, + "succeeded": OriginGroupProvisioningStateSucceeded, + "updating": OriginGroupProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OriginGroupProvisioningState(input) + return &out, nil +} + +type OriginGroupResourceState string + +const ( + OriginGroupResourceStateActive OriginGroupResourceState = "Active" + OriginGroupResourceStateCreating OriginGroupResourceState = "Creating" + OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting" +) + +func PossibleValuesForOriginGroupResourceState() []string { + return []string{ + string(OriginGroupResourceStateActive), + string(OriginGroupResourceStateCreating), + string(OriginGroupResourceStateDeleting), + } +} + +func (s *OriginGroupResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOriginGroupResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOriginGroupResourceState(input string) (*OriginGroupResourceState, error) { + vals := map[string]OriginGroupResourceState{ + "active": OriginGroupResourceStateActive, + "creating": OriginGroupResourceStateCreating, + "deleting": OriginGroupResourceStateDeleting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OriginGroupResourceState(input) + return &out, nil +} + +type ProbeProtocol string + +const ( + ProbeProtocolHTTP ProbeProtocol = "Http" + ProbeProtocolHTTPS ProbeProtocol = "Https" + ProbeProtocolNotSet ProbeProtocol = "NotSet" +) + +func PossibleValuesForProbeProtocol() []string { + return []string{ + string(ProbeProtocolHTTP), + string(ProbeProtocolHTTPS), + string(ProbeProtocolNotSet), + } +} + +func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProbeProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProbeProtocol(input string) (*ProbeProtocol, error) { + vals := map[string]ProbeProtocol{ + "http": ProbeProtocolHTTP, + "https": ProbeProtocolHTTPS, + "notset": ProbeProtocolNotSet, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProbeProtocol(input) + return &out, nil +} + +type ResponseBasedDetectedErrorTypes string + +const ( + ResponseBasedDetectedErrorTypesNone ResponseBasedDetectedErrorTypes = "None" + ResponseBasedDetectedErrorTypesTcpAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors" + ResponseBasedDetectedErrorTypesTcpErrorsOnly ResponseBasedDetectedErrorTypes = "TcpErrorsOnly" +) + +func PossibleValuesForResponseBasedDetectedErrorTypes() []string { + return []string{ + string(ResponseBasedDetectedErrorTypesNone), + string(ResponseBasedDetectedErrorTypesTcpAndHTTPErrors), + string(ResponseBasedDetectedErrorTypesTcpErrorsOnly), + } +} + +func (s *ResponseBasedDetectedErrorTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResponseBasedDetectedErrorTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResponseBasedDetectedErrorTypes(input string) (*ResponseBasedDetectedErrorTypes, error) { + vals := map[string]ResponseBasedDetectedErrorTypes{ + "none": ResponseBasedDetectedErrorTypesNone, + "tcpandhttperrors": ResponseBasedDetectedErrorTypesTcpAndHTTPErrors, + "tcperrorsonly": ResponseBasedDetectedErrorTypesTcpErrorsOnly, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResponseBasedDetectedErrorTypes(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/id_endpoint.go b/resource-manager/cdn/2024-02-01/origingroups/id_endpoint.go new file mode 100644 index 00000000000..80a4475e067 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/id_endpoint.go @@ -0,0 +1,139 @@ +package origingroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointId{}) +} + +var _ resourceids.ResourceId = &EndpointId{} + +// EndpointId is a struct representing the Resource ID for a Endpoint +type EndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string +} + +// NewEndpointID returns a new EndpointId struct +func NewEndpointID(subscriptionId string, resourceGroupName string, profileName string, endpointName string) EndpointId { + return EndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + } +} + +// ParseEndpointID parses 'input' into a EndpointId +func ParseEndpointID(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointIDInsensitively parses 'input' case-insensitively into a EndpointId +// note: this method should only be used for API response data and not user input +func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + return nil +} + +// ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID +func ValidateEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint ID +func (id EndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint ID +func (id EndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + } +} + +// String returns a human-readable description of this Endpoint ID +func (id EndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + } + return fmt.Sprintf("Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/id_endpoint_test.go b/resource-manager/cdn/2024-02-01/origingroups/id_endpoint_test.go new file mode 100644 index 00000000000..2887bff0677 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/id_endpoint_test.go @@ -0,0 +1,327 @@ +package origingroups + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointId{} + +func TestNewEndpointID(t *testing.T) { + id := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } +} + +func TestFormatEndpointID(t *testing.T) { + actual := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestParseEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestSegmentsForEndpointId(t *testing.T) { + segments := EndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup.go b/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup.go new file mode 100644 index 00000000000..90358174dcc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup.go @@ -0,0 +1,148 @@ +package origingroups + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointOriginGroupId{}) +} + +var _ resourceids.ResourceId = &EndpointOriginGroupId{} + +// EndpointOriginGroupId is a struct representing the Resource ID for a Endpoint Origin Group +type EndpointOriginGroupId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string + OriginGroupName string +} + +// NewEndpointOriginGroupID returns a new EndpointOriginGroupId struct +func NewEndpointOriginGroupID(subscriptionId string, resourceGroupName string, profileName string, endpointName string, originGroupName string) EndpointOriginGroupId { + return EndpointOriginGroupId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + OriginGroupName: originGroupName, + } +} + +// ParseEndpointOriginGroupID parses 'input' into a EndpointOriginGroupId +func ParseEndpointOriginGroupID(input string) (*EndpointOriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointOriginGroupId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointOriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointOriginGroupIDInsensitively parses 'input' case-insensitively into a EndpointOriginGroupId +// note: this method should only be used for API response data and not user input +func ParseEndpointOriginGroupIDInsensitively(input string) (*EndpointOriginGroupId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointOriginGroupId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointOriginGroupId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointOriginGroupId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + if id.OriginGroupName, ok = input.Parsed["originGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originGroupName", input) + } + + return nil +} + +// ValidateEndpointOriginGroupID checks that 'input' can be parsed as a Endpoint Origin Group ID +func ValidateEndpointOriginGroupID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointOriginGroupID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint Origin Group ID +func (id EndpointOriginGroupId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s/originGroups/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName, id.OriginGroupName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint Origin Group ID +func (id EndpointOriginGroupId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + resourceids.StaticSegment("staticOriginGroups", "originGroups", "originGroups"), + resourceids.UserSpecifiedSegment("originGroupName", "originGroupValue"), + } +} + +// String returns a human-readable description of this Endpoint Origin Group ID +func (id EndpointOriginGroupId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + fmt.Sprintf("Origin Group Name: %q", id.OriginGroupName), + } + return fmt.Sprintf("Endpoint Origin Group (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup_test.go b/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup_test.go new file mode 100644 index 00000000000..7b15a4680c5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/id_endpointorigingroup_test.go @@ -0,0 +1,372 @@ +package origingroups + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointOriginGroupId{} + +func TestNewEndpointOriginGroupID(t *testing.T) { + id := NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } + + if id.OriginGroupName != "originGroupValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginGroupName'", id.OriginGroupName, "originGroupValue") + } +} + +func TestFormatEndpointOriginGroupID(t *testing.T) { + actual := NewEndpointOriginGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originGroupValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups/originGroupValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointOriginGroupID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointOriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups/originGroupValue", + Expected: &EndpointOriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups/originGroupValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointOriginGroupID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestParseEndpointOriginGroupIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointOriginGroupId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNgRoUpS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups/originGroupValue", + Expected: &EndpointOriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + OriginGroupName: "originGroupValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/originGroups/originGroupValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE", + Expected: &EndpointOriginGroupId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + OriginGroupName: "oRiGiNgRoUpVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNgRoUpS/oRiGiNgRoUpVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointOriginGroupIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.OriginGroupName != v.Expected.OriginGroupName { + t.Fatalf("Expected %q but got %q for OriginGroupName", v.Expected.OriginGroupName, actual.OriginGroupName) + } + + } +} + +func TestSegmentsForEndpointOriginGroupId(t *testing.T) { + segments := EndpointOriginGroupId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointOriginGroupId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/method_create.go b/resource-manager/cdn/2024-02-01/origingroups/method_create.go new file mode 100644 index 00000000000..db797b0f3e0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/method_create.go @@ -0,0 +1,76 @@ +package origingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *OriginGroup +} + +// Create ... +func (c OriginGroupsClient) Create(ctx context.Context, id EndpointOriginGroupId, input OriginGroup) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c OriginGroupsClient) CreateThenPoll(ctx context.Context, id EndpointOriginGroupId, input OriginGroup) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/method_delete.go b/resource-manager/cdn/2024-02-01/origingroups/method_delete.go new file mode 100644 index 00000000000..81cc0819cdc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/method_delete.go @@ -0,0 +1,71 @@ +package origingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c OriginGroupsClient) Delete(ctx context.Context, id EndpointOriginGroupId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c OriginGroupsClient) DeleteThenPoll(ctx context.Context, id EndpointOriginGroupId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/method_get.go b/resource-manager/cdn/2024-02-01/origingroups/method_get.go new file mode 100644 index 00000000000..e23e01f71fb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/method_get.go @@ -0,0 +1,53 @@ +package origingroups + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *OriginGroup +} + +// Get ... +func (c OriginGroupsClient) Get(ctx context.Context, id EndpointOriginGroupId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model OriginGroup + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/method_listbyendpoint.go b/resource-manager/cdn/2024-02-01/origingroups/method_listbyendpoint.go new file mode 100644 index 00000000000..fa1f3ae0b80 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/method_listbyendpoint.go @@ -0,0 +1,105 @@ +package origingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByEndpointOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]OriginGroup +} + +type ListByEndpointCompleteResult struct { + LatestHttpResponse *http.Response + Items []OriginGroup +} + +type ListByEndpointCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByEndpointCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByEndpoint ... +func (c OriginGroupsClient) ListByEndpoint(ctx context.Context, id EndpointId) (result ListByEndpointOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByEndpointCustomPager{}, + Path: fmt.Sprintf("%s/originGroups", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]OriginGroup `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByEndpointComplete retrieves all the results into a single object +func (c OriginGroupsClient) ListByEndpointComplete(ctx context.Context, id EndpointId) (ListByEndpointCompleteResult, error) { + return c.ListByEndpointCompleteMatchingPredicate(ctx, id, OriginGroupOperationPredicate{}) +} + +// ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c OriginGroupsClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate OriginGroupOperationPredicate) (result ListByEndpointCompleteResult, err error) { + items := make([]OriginGroup, 0) + + resp, err := c.ListByEndpoint(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByEndpointCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/method_update.go b/resource-manager/cdn/2024-02-01/origingroups/method_update.go new file mode 100644 index 00000000000..b4051dee39a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/method_update.go @@ -0,0 +1,75 @@ +package origingroups + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *OriginGroup +} + +// Update ... +func (c OriginGroupsClient) Update(ctx context.Context, id EndpointOriginGroupId, input OriginGroupUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c OriginGroupsClient) UpdateThenPoll(ctx context.Context, id EndpointOriginGroupId, input OriginGroupUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_healthprobeparameters.go b/resource-manager/cdn/2024-02-01/origingroups/model_healthprobeparameters.go new file mode 100644 index 00000000000..67018c3f6da --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_healthprobeparameters.go @@ -0,0 +1,11 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HealthProbeParameters struct { + ProbeIntervalInSeconds *int64 `json:"probeIntervalInSeconds,omitempty"` + ProbePath *string `json:"probePath,omitempty"` + ProbeProtocol *ProbeProtocol `json:"probeProtocol,omitempty"` + ProbeRequestType *HealthProbeRequestType `json:"probeRequestType,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_httperrorrangeparameters.go b/resource-manager/cdn/2024-02-01/origingroups/model_httperrorrangeparameters.go new file mode 100644 index 00000000000..b6b3fe27f23 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_httperrorrangeparameters.go @@ -0,0 +1,9 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPErrorRangeParameters struct { + Begin *int64 `json:"begin,omitempty"` + End *int64 `json:"end,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_origingroup.go b/resource-manager/cdn/2024-02-01/origingroups/model_origingroup.go new file mode 100644 index 00000000000..649ed9a3b6b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_origingroup.go @@ -0,0 +1,16 @@ +package origingroups + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *OriginGroupProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_origingroupproperties.go b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupproperties.go new file mode 100644 index 00000000000..a407158a8d0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupproperties.go @@ -0,0 +1,13 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupProperties struct { + HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"` + Origins *[]ResourceReference `json:"origins,omitempty"` + ProvisioningState *OriginGroupProvisioningState `json:"provisioningState,omitempty"` + ResourceState *OriginGroupResourceState `json:"resourceState,omitempty"` + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"` + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdateparameters.go b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdateparameters.go new file mode 100644 index 00000000000..03f4cb09dc3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdateparameters.go @@ -0,0 +1,8 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupUpdateParameters struct { + Properties *OriginGroupUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdatepropertiesparameters.go new file mode 100644 index 00000000000..12ea2b4d7f5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_origingroupupdatepropertiesparameters.go @@ -0,0 +1,11 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupUpdatePropertiesParameters struct { + HealthProbeSettings *HealthProbeParameters `json:"healthProbeSettings,omitempty"` + Origins *[]ResourceReference `json:"origins,omitempty"` + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters `json:"responseBasedOriginErrorDetectionSettings,omitempty"` + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int64 `json:"trafficRestorationTimeToHealedOrNewEndpointsInMinutes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_resourcereference.go b/resource-manager/cdn/2024-02-01/origingroups/model_resourcereference.go new file mode 100644 index 00000000000..67700c54e20 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_resourcereference.go @@ -0,0 +1,8 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/model_responsebasedoriginerrordetectionparameters.go b/resource-manager/cdn/2024-02-01/origingroups/model_responsebasedoriginerrordetectionparameters.go new file mode 100644 index 00000000000..f6bdf7d8ced --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/model_responsebasedoriginerrordetectionparameters.go @@ -0,0 +1,10 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResponseBasedOriginErrorDetectionParameters struct { + HTTPErrorRanges *[]HTTPErrorRangeParameters `json:"httpErrorRanges,omitempty"` + ResponseBasedDetectedErrorTypes *ResponseBasedDetectedErrorTypes `json:"responseBasedDetectedErrorTypes,omitempty"` + ResponseBasedFailoverThresholdPercentage *int64 `json:"responseBasedFailoverThresholdPercentage,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/predicates.go b/resource-manager/cdn/2024-02-01/origingroups/predicates.go new file mode 100644 index 00000000000..74bab74fc98 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/predicates.go @@ -0,0 +1,27 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p OriginGroupOperationPredicate) Matches(input OriginGroup) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/origingroups/version.go b/resource-manager/cdn/2024-02-01/origingroups/version.go new file mode 100644 index 00000000000..a2d580fe822 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origingroups/version.go @@ -0,0 +1,10 @@ +package origingroups + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/origingroups/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/origins/README.md b/resource-manager/cdn/2024-02-01/origins/README.md new file mode 100644 index 00000000000..1187f5e05ce --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origins` Documentation + +The `origins` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/origins" +``` + + +### Client Initialization + +```go +client := origins.NewOriginsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OriginsClient.Create` + +```go +ctx := context.TODO() +id := origins.NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue") + +payload := origins.Origin{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `OriginsClient.Delete` + +```go +ctx := context.TODO() +id := origins.NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `OriginsClient.Get` + +```go +ctx := context.TODO() +id := origins.NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OriginsClient.ListByEndpoint` + +```go +ctx := context.TODO() +id := origins.NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + +// alternatively `client.ListByEndpoint(ctx, id)` can be used to do batched pagination +items, err := client.ListByEndpointComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `OriginsClient.Update` + +```go +ctx := context.TODO() +id := origins.NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue") + +payload := origins.OriginUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/origins/client.go b/resource-manager/cdn/2024-02-01/origins/client.go new file mode 100644 index 00000000000..ce3ee970663 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/client.go @@ -0,0 +1,26 @@ +package origins + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginsClient struct { + Client *resourcemanager.Client +} + +func NewOriginsClientWithBaseURI(sdkApi sdkEnv.Api) (*OriginsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "origins", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating OriginsClient: %+v", err) + } + + return &OriginsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/origins/constants.go b/resource-manager/cdn/2024-02-01/origins/constants.go new file mode 100644 index 00000000000..a04f9ed83bf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/constants.go @@ -0,0 +1,154 @@ +package origins + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginProvisioningState string + +const ( + OriginProvisioningStateCreating OriginProvisioningState = "Creating" + OriginProvisioningStateDeleting OriginProvisioningState = "Deleting" + OriginProvisioningStateFailed OriginProvisioningState = "Failed" + OriginProvisioningStateSucceeded OriginProvisioningState = "Succeeded" + OriginProvisioningStateUpdating OriginProvisioningState = "Updating" +) + +func PossibleValuesForOriginProvisioningState() []string { + return []string{ + string(OriginProvisioningStateCreating), + string(OriginProvisioningStateDeleting), + string(OriginProvisioningStateFailed), + string(OriginProvisioningStateSucceeded), + string(OriginProvisioningStateUpdating), + } +} + +func (s *OriginProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOriginProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOriginProvisioningState(input string) (*OriginProvisioningState, error) { + vals := map[string]OriginProvisioningState{ + "creating": OriginProvisioningStateCreating, + "deleting": OriginProvisioningStateDeleting, + "failed": OriginProvisioningStateFailed, + "succeeded": OriginProvisioningStateSucceeded, + "updating": OriginProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OriginProvisioningState(input) + return &out, nil +} + +type OriginResourceState string + +const ( + OriginResourceStateActive OriginResourceState = "Active" + OriginResourceStateCreating OriginResourceState = "Creating" + OriginResourceStateDeleting OriginResourceState = "Deleting" +) + +func PossibleValuesForOriginResourceState() []string { + return []string{ + string(OriginResourceStateActive), + string(OriginResourceStateCreating), + string(OriginResourceStateDeleting), + } +} + +func (s *OriginResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOriginResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOriginResourceState(input string) (*OriginResourceState, error) { + vals := map[string]OriginResourceState{ + "active": OriginResourceStateActive, + "creating": OriginResourceStateCreating, + "deleting": OriginResourceStateDeleting, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OriginResourceState(input) + return &out, nil +} + +type PrivateEndpointStatus string + +const ( + PrivateEndpointStatusApproved PrivateEndpointStatus = "Approved" + PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected" + PrivateEndpointStatusPending PrivateEndpointStatus = "Pending" + PrivateEndpointStatusRejected PrivateEndpointStatus = "Rejected" + PrivateEndpointStatusTimeout PrivateEndpointStatus = "Timeout" +) + +func PossibleValuesForPrivateEndpointStatus() []string { + return []string{ + string(PrivateEndpointStatusApproved), + string(PrivateEndpointStatusDisconnected), + string(PrivateEndpointStatusPending), + string(PrivateEndpointStatusRejected), + string(PrivateEndpointStatusTimeout), + } +} + +func (s *PrivateEndpointStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointStatus(input string) (*PrivateEndpointStatus, error) { + vals := map[string]PrivateEndpointStatus{ + "approved": PrivateEndpointStatusApproved, + "disconnected": PrivateEndpointStatusDisconnected, + "pending": PrivateEndpointStatusPending, + "rejected": PrivateEndpointStatusRejected, + "timeout": PrivateEndpointStatusTimeout, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointStatus(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/origins/id_endpoint.go b/resource-manager/cdn/2024-02-01/origins/id_endpoint.go new file mode 100644 index 00000000000..5d34a7e8e5e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/id_endpoint.go @@ -0,0 +1,139 @@ +package origins + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&EndpointId{}) +} + +var _ resourceids.ResourceId = &EndpointId{} + +// EndpointId is a struct representing the Resource ID for a Endpoint +type EndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string +} + +// NewEndpointID returns a new EndpointId struct +func NewEndpointID(subscriptionId string, resourceGroupName string, profileName string, endpointName string) EndpointId { + return EndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + } +} + +// ParseEndpointID parses 'input' into a EndpointId +func ParseEndpointID(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseEndpointIDInsensitively parses 'input' case-insensitively into a EndpointId +// note: this method should only be used for API response data and not user input +func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&EndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := EndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *EndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + return nil +} + +// ValidateEndpointID checks that 'input' can be parsed as a Endpoint ID +func ValidateEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Endpoint ID +func (id EndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Endpoint ID +func (id EndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + } +} + +// String returns a human-readable description of this Endpoint ID +func (id EndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + } + return fmt.Sprintf("Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/origins/id_endpoint_test.go b/resource-manager/cdn/2024-02-01/origins/id_endpoint_test.go new file mode 100644 index 00000000000..f3a3e68fe2a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/id_endpoint_test.go @@ -0,0 +1,327 @@ +package origins + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &EndpointId{} + +func TestNewEndpointID(t *testing.T) { + id := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } +} + +func TestFormatEndpointID(t *testing.T) { + actual := NewEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestParseEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *EndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Expected: &EndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + } +} + +func TestSegmentsForEndpointId(t *testing.T) { + segments := EndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("EndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/origins/id_origin.go b/resource-manager/cdn/2024-02-01/origins/id_origin.go new file mode 100644 index 00000000000..9f7a9f91c7f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/id_origin.go @@ -0,0 +1,148 @@ +package origins + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&OriginId{}) +} + +var _ resourceids.ResourceId = &OriginId{} + +// OriginId is a struct representing the Resource ID for a Origin +type OriginId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + EndpointName string + OriginName string +} + +// NewOriginID returns a new OriginId struct +func NewOriginID(subscriptionId string, resourceGroupName string, profileName string, endpointName string, originName string) OriginId { + return OriginId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + EndpointName: endpointName, + OriginName: originName, + } +} + +// ParseOriginID parses 'input' into a OriginId +func ParseOriginID(input string) (*OriginId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOriginIDInsensitively parses 'input' case-insensitively into a OriginId +// note: this method should only be used for API response data and not user input +func ParseOriginIDInsensitively(input string) (*OriginId, error) { + parser := resourceids.NewParserFromResourceIdType(&OriginId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OriginId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OriginId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.EndpointName, ok = input.Parsed["endpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "endpointName", input) + } + + if id.OriginName, ok = input.Parsed["originName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "originName", input) + } + + return nil +} + +// ValidateOriginID checks that 'input' can be parsed as a Origin ID +func ValidateOriginID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOriginID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Origin ID +func (id OriginId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/endpoints/%s/origins/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.EndpointName, id.OriginName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Origin ID +func (id OriginId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticEndpoints", "endpoints", "endpoints"), + resourceids.UserSpecifiedSegment("endpointName", "endpointValue"), + resourceids.StaticSegment("staticOrigins", "origins", "origins"), + resourceids.UserSpecifiedSegment("originName", "originValue"), + } +} + +// String returns a human-readable description of this Origin ID +func (id OriginId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Endpoint Name: %q", id.EndpointName), + fmt.Sprintf("Origin Name: %q", id.OriginName), + } + return fmt.Sprintf("Origin (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/origins/id_origin_test.go b/resource-manager/cdn/2024-02-01/origins/id_origin_test.go new file mode 100644 index 00000000000..6d0f8778f41 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/id_origin_test.go @@ -0,0 +1,372 @@ +package origins + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &OriginId{} + +func TestNewOriginID(t *testing.T) { + id := NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.EndpointName != "endpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'EndpointName'", id.EndpointName, "endpointValue") + } + + if id.OriginName != "originValue" { + t.Fatalf("Expected %q but got %q for Segment 'OriginName'", id.OriginName, "originValue") + } +} + +func TestFormatOriginID(t *testing.T) { + actual := NewOriginID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "endpointValue", "originValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins/originValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseOriginID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins/originValue", + Expected: &OriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + OriginName: "originValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins/originValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.OriginName != v.Expected.OriginName { + t.Fatalf("Expected %q but got %q for OriginName", v.Expected.OriginName, actual.OriginName) + } + + } +} + +func TestParseOriginIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *OriginId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins/originValue", + Expected: &OriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + EndpointName: "endpointValue", + OriginName: "originValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/endpoints/endpointValue/origins/originValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNs/oRiGiNvAlUe", + Expected: &OriginId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + EndpointName: "eNdPoInTvAlUe", + OriginName: "oRiGiNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/eNdPoInTs/eNdPoInTvAlUe/oRiGiNs/oRiGiNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseOriginIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.EndpointName != v.Expected.EndpointName { + t.Fatalf("Expected %q but got %q for EndpointName", v.Expected.EndpointName, actual.EndpointName) + } + + if actual.OriginName != v.Expected.OriginName { + t.Fatalf("Expected %q but got %q for OriginName", v.Expected.OriginName, actual.OriginName) + } + + } +} + +func TestSegmentsForOriginId(t *testing.T) { + segments := OriginId{}.Segments() + if len(segments) == 0 { + t.Fatalf("OriginId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/origins/method_create.go b/resource-manager/cdn/2024-02-01/origins/method_create.go new file mode 100644 index 00000000000..e6005a205a4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/method_create.go @@ -0,0 +1,76 @@ +package origins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Origin +} + +// Create ... +func (c OriginsClient) Create(ctx context.Context, id OriginId, input Origin) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c OriginsClient) CreateThenPoll(ctx context.Context, id OriginId, input Origin) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origins/method_delete.go b/resource-manager/cdn/2024-02-01/origins/method_delete.go new file mode 100644 index 00000000000..47d36e6e87f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/method_delete.go @@ -0,0 +1,71 @@ +package origins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c OriginsClient) Delete(ctx context.Context, id OriginId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c OriginsClient) DeleteThenPoll(ctx context.Context, id OriginId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origins/method_get.go b/resource-manager/cdn/2024-02-01/origins/method_get.go new file mode 100644 index 00000000000..a7594c26290 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/method_get.go @@ -0,0 +1,53 @@ +package origins + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Origin +} + +// Get ... +func (c OriginsClient) Get(ctx context.Context, id OriginId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Origin + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/origins/method_listbyendpoint.go b/resource-manager/cdn/2024-02-01/origins/method_listbyendpoint.go new file mode 100644 index 00000000000..476f311d7bb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/method_listbyendpoint.go @@ -0,0 +1,105 @@ +package origins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByEndpointOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Origin +} + +type ListByEndpointCompleteResult struct { + LatestHttpResponse *http.Response + Items []Origin +} + +type ListByEndpointCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByEndpointCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByEndpoint ... +func (c OriginsClient) ListByEndpoint(ctx context.Context, id EndpointId) (result ListByEndpointOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByEndpointCustomPager{}, + Path: fmt.Sprintf("%s/origins", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Origin `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByEndpointComplete retrieves all the results into a single object +func (c OriginsClient) ListByEndpointComplete(ctx context.Context, id EndpointId) (ListByEndpointCompleteResult, error) { + return c.ListByEndpointCompleteMatchingPredicate(ctx, id, OriginOperationPredicate{}) +} + +// ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c OriginsClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id EndpointId, predicate OriginOperationPredicate) (result ListByEndpointCompleteResult, err error) { + items := make([]Origin, 0) + + resp, err := c.ListByEndpoint(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByEndpointCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/origins/method_update.go b/resource-manager/cdn/2024-02-01/origins/method_update.go new file mode 100644 index 00000000000..830da0e27ff --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/method_update.go @@ -0,0 +1,75 @@ +package origins + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Origin +} + +// Update ... +func (c OriginsClient) Update(ctx context.Context, id OriginId, input OriginUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c OriginsClient) UpdateThenPoll(ctx context.Context, id OriginId, input OriginUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/origins/model_origin.go b/resource-manager/cdn/2024-02-01/origins/model_origin.go new file mode 100644 index 00000000000..38f21bdbd29 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/model_origin.go @@ -0,0 +1,16 @@ +package origins + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Origin struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *OriginProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origins/model_originproperties.go b/resource-manager/cdn/2024-02-01/origins/model_originproperties.go new file mode 100644 index 00000000000..1c6a60f33a7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/model_originproperties.go @@ -0,0 +1,21 @@ +package origins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginProperties struct { + Enabled *bool `json:"enabled,omitempty"` + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + HostName *string `json:"hostName,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + Priority *int64 `json:"priority,omitempty"` + PrivateEndpointStatus *PrivateEndpointStatus `json:"privateEndpointStatus,omitempty"` + PrivateLinkAlias *string `json:"privateLinkAlias,omitempty"` + PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"` + PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"` + PrivateLinkResourceId *string `json:"privateLinkResourceId,omitempty"` + ProvisioningState *OriginProvisioningState `json:"provisioningState,omitempty"` + ResourceState *OriginResourceState `json:"resourceState,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origins/model_originupdateparameters.go b/resource-manager/cdn/2024-02-01/origins/model_originupdateparameters.go new file mode 100644 index 00000000000..7277698e9d5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/model_originupdateparameters.go @@ -0,0 +1,8 @@ +package origins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginUpdateParameters struct { + Properties *OriginUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origins/model_originupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/origins/model_originupdatepropertiesparameters.go new file mode 100644 index 00000000000..c442bb8d4d9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/model_originupdatepropertiesparameters.go @@ -0,0 +1,18 @@ +package origins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginUpdatePropertiesParameters struct { + Enabled *bool `json:"enabled,omitempty"` + HTTPPort *int64 `json:"httpPort,omitempty"` + HTTPSPort *int64 `json:"httpsPort,omitempty"` + HostName *string `json:"hostName,omitempty"` + OriginHostHeader *string `json:"originHostHeader,omitempty"` + Priority *int64 `json:"priority,omitempty"` + PrivateLinkAlias *string `json:"privateLinkAlias,omitempty"` + PrivateLinkApprovalMessage *string `json:"privateLinkApprovalMessage,omitempty"` + PrivateLinkLocation *string `json:"privateLinkLocation,omitempty"` + PrivateLinkResourceId *string `json:"privateLinkResourceId,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/origins/predicates.go b/resource-manager/cdn/2024-02-01/origins/predicates.go new file mode 100644 index 00000000000..2424013ceb9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/predicates.go @@ -0,0 +1,27 @@ +package origins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p OriginOperationPredicate) Matches(input Origin) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/origins/version.go b/resource-manager/cdn/2024-02-01/origins/version.go new file mode 100644 index 00000000000..615b7e14a8e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/origins/version.go @@ -0,0 +1,10 @@ +package origins + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/origins/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/profiles/README.md b/resource-manager/cdn/2024-02-01/profiles/README.md new file mode 100644 index 00000000000..e70b07e5945 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/README.md @@ -0,0 +1,212 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/profiles` Documentation + +The `profiles` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/profiles" +``` + + +### Client Initialization + +```go +client := profiles.NewProfilesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ProfilesClient.CanMigrate` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +payload := profiles.CanMigrateParameters{ + // ... +} + + +if err := client.CanMigrateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProfilesClient.Create` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := profiles.Profile{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProfilesClient.Delete` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProfilesClient.GenerateSsoUri` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.GenerateSsoUri(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ProfilesClient.Get` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ProfilesClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ProfilesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ProfilesClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ProfilesClient.ListSupportedOptimizationTypes` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.ListSupportedOptimizationTypes(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ProfilesClient.Migrate` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +payload := profiles.MigrationParameters{ + // ... +} + + +if err := client.MigrateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProfilesClient.MigrationCommit` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +if err := client.MigrationCommitThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `ProfilesClient.Update` + +```go +ctx := context.TODO() +id := profiles.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +payload := profiles.ProfileUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/profiles/client.go b/resource-manager/cdn/2024-02-01/profiles/client.go new file mode 100644 index 00000000000..16eaef71194 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/client.go @@ -0,0 +1,26 @@ +package profiles + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfilesClient struct { + Client *resourcemanager.Client +} + +func NewProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProfilesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "profiles", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ProfilesClient: %+v", err) + } + + return &ProfilesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/constants.go b/resource-manager/cdn/2024-02-01/profiles/constants.go new file mode 100644 index 00000000000..7c46f402b9a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/constants.go @@ -0,0 +1,489 @@ +package profiles + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CanMigrateDefaultSku string + +const ( + CanMigrateDefaultSkuPremiumAzureFrontDoor CanMigrateDefaultSku = "Premium_AzureFrontDoor" + CanMigrateDefaultSkuStandardAzureFrontDoor CanMigrateDefaultSku = "Standard_AzureFrontDoor" +) + +func PossibleValuesForCanMigrateDefaultSku() []string { + return []string{ + string(CanMigrateDefaultSkuPremiumAzureFrontDoor), + string(CanMigrateDefaultSkuStandardAzureFrontDoor), + } +} + +func (s *CanMigrateDefaultSku) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCanMigrateDefaultSku(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCanMigrateDefaultSku(input string) (*CanMigrateDefaultSku, error) { + vals := map[string]CanMigrateDefaultSku{ + "premium_azurefrontdoor": CanMigrateDefaultSkuPremiumAzureFrontDoor, + "standard_azurefrontdoor": CanMigrateDefaultSkuStandardAzureFrontDoor, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CanMigrateDefaultSku(input) + return &out, nil +} + +type OptimizationType string + +const ( + OptimizationTypeDynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration" + OptimizationTypeGeneralMediaStreaming OptimizationType = "GeneralMediaStreaming" + OptimizationTypeGeneralWebDelivery OptimizationType = "GeneralWebDelivery" + OptimizationTypeLargeFileDownload OptimizationType = "LargeFileDownload" + OptimizationTypeVideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming" +) + +func PossibleValuesForOptimizationType() []string { + return []string{ + string(OptimizationTypeDynamicSiteAcceleration), + string(OptimizationTypeGeneralMediaStreaming), + string(OptimizationTypeGeneralWebDelivery), + string(OptimizationTypeLargeFileDownload), + string(OptimizationTypeVideoOnDemandMediaStreaming), + } +} + +func (s *OptimizationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOptimizationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOptimizationType(input string) (*OptimizationType, error) { + vals := map[string]OptimizationType{ + "dynamicsiteacceleration": OptimizationTypeDynamicSiteAcceleration, + "generalmediastreaming": OptimizationTypeGeneralMediaStreaming, + "generalwebdelivery": OptimizationTypeGeneralWebDelivery, + "largefiledownload": OptimizationTypeLargeFileDownload, + "videoondemandmediastreaming": OptimizationTypeVideoOnDemandMediaStreaming, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OptimizationType(input) + return &out, nil +} + +type ProfileProvisioningState string + +const ( + ProfileProvisioningStateCreating ProfileProvisioningState = "Creating" + ProfileProvisioningStateDeleting ProfileProvisioningState = "Deleting" + ProfileProvisioningStateFailed ProfileProvisioningState = "Failed" + ProfileProvisioningStateSucceeded ProfileProvisioningState = "Succeeded" + ProfileProvisioningStateUpdating ProfileProvisioningState = "Updating" +) + +func PossibleValuesForProfileProvisioningState() []string { + return []string{ + string(ProfileProvisioningStateCreating), + string(ProfileProvisioningStateDeleting), + string(ProfileProvisioningStateFailed), + string(ProfileProvisioningStateSucceeded), + string(ProfileProvisioningStateUpdating), + } +} + +func (s *ProfileProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileProvisioningState(input string) (*ProfileProvisioningState, error) { + vals := map[string]ProfileProvisioningState{ + "creating": ProfileProvisioningStateCreating, + "deleting": ProfileProvisioningStateDeleting, + "failed": ProfileProvisioningStateFailed, + "succeeded": ProfileProvisioningStateSucceeded, + "updating": ProfileProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileProvisioningState(input) + return &out, nil +} + +type ProfileResourceState string + +const ( + ProfileResourceStateAbortingMigration ProfileResourceState = "AbortingMigration" + ProfileResourceStateActive ProfileResourceState = "Active" + ProfileResourceStateCommittingMigration ProfileResourceState = "CommittingMigration" + ProfileResourceStateCreating ProfileResourceState = "Creating" + ProfileResourceStateDeleting ProfileResourceState = "Deleting" + ProfileResourceStateDisabled ProfileResourceState = "Disabled" + ProfileResourceStateMigrated ProfileResourceState = "Migrated" + ProfileResourceStateMigrating ProfileResourceState = "Migrating" + ProfileResourceStatePendingMigrationCommit ProfileResourceState = "PendingMigrationCommit" +) + +func PossibleValuesForProfileResourceState() []string { + return []string{ + string(ProfileResourceStateAbortingMigration), + string(ProfileResourceStateActive), + string(ProfileResourceStateCommittingMigration), + string(ProfileResourceStateCreating), + string(ProfileResourceStateDeleting), + string(ProfileResourceStateDisabled), + string(ProfileResourceStateMigrated), + string(ProfileResourceStateMigrating), + string(ProfileResourceStatePendingMigrationCommit), + } +} + +func (s *ProfileResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileResourceState(input string) (*ProfileResourceState, error) { + vals := map[string]ProfileResourceState{ + "abortingmigration": ProfileResourceStateAbortingMigration, + "active": ProfileResourceStateActive, + "committingmigration": ProfileResourceStateCommittingMigration, + "creating": ProfileResourceStateCreating, + "deleting": ProfileResourceStateDeleting, + "disabled": ProfileResourceStateDisabled, + "migrated": ProfileResourceStateMigrated, + "migrating": ProfileResourceStateMigrating, + "pendingmigrationcommit": ProfileResourceStatePendingMigrationCommit, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileResourceState(input) + return &out, nil +} + +type ProfileScrubbingState string + +const ( + ProfileScrubbingStateDisabled ProfileScrubbingState = "Disabled" + ProfileScrubbingStateEnabled ProfileScrubbingState = "Enabled" +) + +func PossibleValuesForProfileScrubbingState() []string { + return []string{ + string(ProfileScrubbingStateDisabled), + string(ProfileScrubbingStateEnabled), + } +} + +func (s *ProfileScrubbingState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProfileScrubbingState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProfileScrubbingState(input string) (*ProfileScrubbingState, error) { + vals := map[string]ProfileScrubbingState{ + "disabled": ProfileScrubbingStateDisabled, + "enabled": ProfileScrubbingStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProfileScrubbingState(input) + return &out, nil +} + +type ResourceUsageUnit string + +const ( + ResourceUsageUnitCount ResourceUsageUnit = "count" +) + +func PossibleValuesForResourceUsageUnit() []string { + return []string{ + string(ResourceUsageUnitCount), + } +} + +func (s *ResourceUsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceUsageUnit(input string) (*ResourceUsageUnit, error) { + vals := map[string]ResourceUsageUnit{ + "count": ResourceUsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceUsageUnit(input) + return &out, nil +} + +type ScrubbingRuleEntryMatchOperator string + +const ( + ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" +) + +func PossibleValuesForScrubbingRuleEntryMatchOperator() []string { + return []string{ + string(ScrubbingRuleEntryMatchOperatorEqualsAny), + } +} + +func (s *ScrubbingRuleEntryMatchOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryMatchOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryMatchOperator(input string) (*ScrubbingRuleEntryMatchOperator, error) { + vals := map[string]ScrubbingRuleEntryMatchOperator{ + "equalsany": ScrubbingRuleEntryMatchOperatorEqualsAny, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryMatchOperator(input) + return &out, nil +} + +type ScrubbingRuleEntryMatchVariable string + +const ( + ScrubbingRuleEntryMatchVariableQueryStringArgNames ScrubbingRuleEntryMatchVariable = "QueryStringArgNames" + ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" + ScrubbingRuleEntryMatchVariableRequestUri ScrubbingRuleEntryMatchVariable = "RequestUri" +) + +func PossibleValuesForScrubbingRuleEntryMatchVariable() []string { + return []string{ + string(ScrubbingRuleEntryMatchVariableQueryStringArgNames), + string(ScrubbingRuleEntryMatchVariableRequestIPAddress), + string(ScrubbingRuleEntryMatchVariableRequestUri), + } +} + +func (s *ScrubbingRuleEntryMatchVariable) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryMatchVariable(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryMatchVariable(input string) (*ScrubbingRuleEntryMatchVariable, error) { + vals := map[string]ScrubbingRuleEntryMatchVariable{ + "querystringargnames": ScrubbingRuleEntryMatchVariableQueryStringArgNames, + "requestipaddress": ScrubbingRuleEntryMatchVariableRequestIPAddress, + "requesturi": ScrubbingRuleEntryMatchVariableRequestUri, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryMatchVariable(input) + return &out, nil +} + +type ScrubbingRuleEntryState string + +const ( + ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" + ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" +) + +func PossibleValuesForScrubbingRuleEntryState() []string { + return []string{ + string(ScrubbingRuleEntryStateDisabled), + string(ScrubbingRuleEntryStateEnabled), + } +} + +func (s *ScrubbingRuleEntryState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScrubbingRuleEntryState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScrubbingRuleEntryState(input string) (*ScrubbingRuleEntryState, error) { + vals := map[string]ScrubbingRuleEntryState{ + "disabled": ScrubbingRuleEntryStateDisabled, + "enabled": ScrubbingRuleEntryStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScrubbingRuleEntryState(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameCustomVerizon SkuName = "Custom_Verizon" + SkuNamePremiumAzureFrontDoor SkuName = "Premium_AzureFrontDoor" + SkuNamePremiumVerizon SkuName = "Premium_Verizon" + SkuNameStandardAkamai SkuName = "Standard_Akamai" + SkuNameStandardAvgBandWidthChinaCdn SkuName = "Standard_AvgBandWidth_ChinaCdn" + SkuNameStandardAzureFrontDoor SkuName = "Standard_AzureFrontDoor" + SkuNameStandardChinaCdn SkuName = "Standard_ChinaCdn" + SkuNameStandardMicrosoft SkuName = "Standard_Microsoft" + SkuNameStandardNineFiveFiveBandWidthChinaCdn SkuName = "Standard_955BandWidth_ChinaCdn" + SkuNameStandardPlusAvgBandWidthChinaCdn SkuName = "StandardPlus_AvgBandWidth_ChinaCdn" + SkuNameStandardPlusChinaCdn SkuName = "StandardPlus_ChinaCdn" + SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn SkuName = "StandardPlus_955BandWidth_ChinaCdn" + SkuNameStandardVerizon SkuName = "Standard_Verizon" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameCustomVerizon), + string(SkuNamePremiumAzureFrontDoor), + string(SkuNamePremiumVerizon), + string(SkuNameStandardAkamai), + string(SkuNameStandardAvgBandWidthChinaCdn), + string(SkuNameStandardAzureFrontDoor), + string(SkuNameStandardChinaCdn), + string(SkuNameStandardMicrosoft), + string(SkuNameStandardNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardPlusAvgBandWidthChinaCdn), + string(SkuNameStandardPlusChinaCdn), + string(SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardVerizon), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "custom_verizon": SkuNameCustomVerizon, + "premium_azurefrontdoor": SkuNamePremiumAzureFrontDoor, + "premium_verizon": SkuNamePremiumVerizon, + "standard_akamai": SkuNameStandardAkamai, + "standard_avgbandwidth_chinacdn": SkuNameStandardAvgBandWidthChinaCdn, + "standard_azurefrontdoor": SkuNameStandardAzureFrontDoor, + "standard_chinacdn": SkuNameStandardChinaCdn, + "standard_microsoft": SkuNameStandardMicrosoft, + "standard_955bandwidth_chinacdn": SkuNameStandardNineFiveFiveBandWidthChinaCdn, + "standardplus_avgbandwidth_chinacdn": SkuNameStandardPlusAvgBandWidthChinaCdn, + "standardplus_chinacdn": SkuNameStandardPlusChinaCdn, + "standardplus_955bandwidth_chinacdn": SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn, + "standard_verizon": SkuNameStandardVerizon, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/id_profile.go b/resource-manager/cdn/2024-02-01/profiles/id_profile.go new file mode 100644 index 00000000000..9b5a8a8366c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/id_profile.go @@ -0,0 +1,130 @@ +package profiles + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/profiles/id_profile_test.go b/resource-manager/cdn/2024-02-01/profiles/id_profile_test.go new file mode 100644 index 00000000000..f46c7b2aae3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/id_profile_test.go @@ -0,0 +1,282 @@ +package profiles + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_canmigrate.go b/resource-manager/cdn/2024-02-01/profiles/method_canmigrate.go new file mode 100644 index 00000000000..edda0638219 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_canmigrate.go @@ -0,0 +1,76 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CanMigrateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CanMigrateResult +} + +// CanMigrate ... +func (c ProfilesClient) CanMigrate(ctx context.Context, id commonids.ResourceGroupId, input CanMigrateParameters) (result CanMigrateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/canMigrate", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CanMigrateThenPoll performs CanMigrate then polls until it's completed +func (c ProfilesClient) CanMigrateThenPoll(ctx context.Context, id commonids.ResourceGroupId, input CanMigrateParameters) error { + result, err := c.CanMigrate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CanMigrate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CanMigrate: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_create.go b/resource-manager/cdn/2024-02-01/profiles/method_create.go new file mode 100644 index 00000000000..fdde9d737ec --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_create.go @@ -0,0 +1,76 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Profile +} + +// Create ... +func (c ProfilesClient) Create(ctx context.Context, id ProfileId, input Profile) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c ProfilesClient) CreateThenPoll(ctx context.Context, id ProfileId, input Profile) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_delete.go b/resource-manager/cdn/2024-02-01/profiles/method_delete.go new file mode 100644 index 00000000000..8d46fe3a4ff --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_delete.go @@ -0,0 +1,71 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ProfilesClient) Delete(ctx context.Context, id ProfileId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c ProfilesClient) DeleteThenPoll(ctx context.Context, id ProfileId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_generatessouri.go b/resource-manager/cdn/2024-02-01/profiles/method_generatessouri.go new file mode 100644 index 00000000000..763f54f9cc5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_generatessouri.go @@ -0,0 +1,54 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GenerateSsoUriOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SsoUri +} + +// GenerateSsoUri ... +func (c ProfilesClient) GenerateSsoUri(ctx context.Context, id ProfileId) (result GenerateSsoUriOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/generateSsoUri", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SsoUri + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_get.go b/resource-manager/cdn/2024-02-01/profiles/method_get.go new file mode 100644 index 00000000000..d26affa96a5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_get.go @@ -0,0 +1,53 @@ +package profiles + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Profile +} + +// Get ... +func (c ProfilesClient) Get(ctx context.Context, id ProfileId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Profile + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_list.go b/resource-manager/cdn/2024-02-01/profiles/method_list.go new file mode 100644 index 00000000000..3a6e95d2b42 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_list.go @@ -0,0 +1,106 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Profile +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []Profile +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c ProfilesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/profiles", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Profile `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c ProfilesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ProfileOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ProfilesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ProfileOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Profile, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_listbyresourcegroup.go b/resource-manager/cdn/2024-02-01/profiles/method_listbyresourcegroup.go new file mode 100644 index 00000000000..da005d4d92c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Profile +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Profile +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c ProfilesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/profiles", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Profile `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c ProfilesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ProfileOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ProfilesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ProfileOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Profile, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/profiles/method_listresourceusage.go new file mode 100644 index 00000000000..1f51a1643fd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_listresourceusage.go @@ -0,0 +1,105 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ResourceUsage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []ResourceUsage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c ProfilesClient) ListResourceUsage(ctx context.Context, id ProfileId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/checkResourceUsage", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ResourceUsage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c ProfilesClient) ListResourceUsageComplete(ctx context.Context, id ProfileId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, ResourceUsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ProfilesClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate ResourceUsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]ResourceUsage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_listsupportedoptimizationtypes.go b/resource-manager/cdn/2024-02-01/profiles/method_listsupportedoptimizationtypes.go new file mode 100644 index 00000000000..e743655689a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_listsupportedoptimizationtypes.go @@ -0,0 +1,54 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSupportedOptimizationTypesOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SupportedOptimizationTypesListResult +} + +// ListSupportedOptimizationTypes ... +func (c ProfilesClient) ListSupportedOptimizationTypes(ctx context.Context, id ProfileId) (result ListSupportedOptimizationTypesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/getSupportedOptimizationTypes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SupportedOptimizationTypesListResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_migrate.go b/resource-manager/cdn/2024-02-01/profiles/method_migrate.go new file mode 100644 index 00000000000..cb3ea6cce65 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_migrate.go @@ -0,0 +1,76 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MigrateResult +} + +// Migrate ... +func (c ProfilesClient) Migrate(ctx context.Context, id commonids.ResourceGroupId, input MigrationParameters) (result MigrateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/migrate", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// MigrateThenPoll performs Migrate then polls until it's completed +func (c ProfilesClient) MigrateThenPoll(ctx context.Context, id commonids.ResourceGroupId, input MigrationParameters) error { + result, err := c.Migrate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Migrate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Migrate: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_migrationcommit.go b/resource-manager/cdn/2024-02-01/profiles/method_migrationcommit.go new file mode 100644 index 00000000000..eb5e0a88a27 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_migrationcommit.go @@ -0,0 +1,70 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrationCommitOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// MigrationCommit ... +func (c ProfilesClient) MigrationCommit(ctx context.Context, id ProfileId) (result MigrationCommitOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/migrationCommit", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// MigrationCommitThenPoll performs MigrationCommit then polls until it's completed +func (c ProfilesClient) MigrationCommitThenPoll(ctx context.Context, id ProfileId) error { + result, err := c.MigrationCommit(ctx, id) + if err != nil { + return fmt.Errorf("performing MigrationCommit: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after MigrationCommit: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/method_update.go b/resource-manager/cdn/2024-02-01/profiles/method_update.go new file mode 100644 index 00000000000..5694b5666a6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/method_update.go @@ -0,0 +1,75 @@ +package profiles + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Profile +} + +// Update ... +func (c ProfilesClient) Update(ctx context.Context, id ProfileId, input ProfileUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c ProfilesClient) UpdateThenPoll(ctx context.Context, id ProfileId, input ProfileUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_canmigrateparameters.go b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateparameters.go new file mode 100644 index 00000000000..cba030af8d7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateparameters.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CanMigrateParameters struct { + ClassicResourceReference ResourceReference `json:"classicResourceReference"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_canmigrateproperties.go b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateproperties.go new file mode 100644 index 00000000000..8a79f4648c1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateproperties.go @@ -0,0 +1,10 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CanMigrateProperties struct { + CanMigrate *bool `json:"canMigrate,omitempty"` + DefaultSku *CanMigrateDefaultSku `json:"defaultSku,omitempty"` + Errors *[]MigrationErrorType `json:"errors,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_canmigrateresult.go b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateresult.go new file mode 100644 index 00000000000..500699ff775 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_canmigrateresult.go @@ -0,0 +1,10 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CanMigrateResult struct { + Id *string `json:"id,omitempty"` + Properties *CanMigrateProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_migrateresult.go b/resource-manager/cdn/2024-02-01/profiles/model_migrateresult.go new file mode 100644 index 00000000000..c53f7a73fc5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_migrateresult.go @@ -0,0 +1,10 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrateResult struct { + Id *string `json:"id,omitempty"` + Properties *MigrateResultProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_migrateresultproperties.go b/resource-manager/cdn/2024-02-01/profiles/model_migrateresultproperties.go new file mode 100644 index 00000000000..ad533db013d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_migrateresultproperties.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrateResultProperties struct { + MigratedProfileResourceId *ResourceReference `json:"migratedProfileResourceId,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_migrationerrortype.go b/resource-manager/cdn/2024-02-01/profiles/model_migrationerrortype.go new file mode 100644 index 00000000000..6155279d9c1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_migrationerrortype.go @@ -0,0 +1,11 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrationErrorType struct { + Code *string `json:"code,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + NextSteps *string `json:"nextSteps,omitempty"` + ResourceName *string `json:"resourceName,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_migrationparameters.go b/resource-manager/cdn/2024-02-01/profiles/model_migrationparameters.go new file mode 100644 index 00000000000..37a14cc634b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_migrationparameters.go @@ -0,0 +1,11 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrationParameters struct { + ClassicResourceReference ResourceReference `json:"classicResourceReference"` + MigrationWebApplicationFirewallMappings *[]MigrationWebApplicationFirewallMapping `json:"migrationWebApplicationFirewallMappings,omitempty"` + ProfileName string `json:"profileName"` + Sku Sku `json:"sku"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_migrationwebapplicationfirewallmapping.go b/resource-manager/cdn/2024-02-01/profiles/model_migrationwebapplicationfirewallmapping.go new file mode 100644 index 00000000000..342be305588 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_migrationwebapplicationfirewallmapping.go @@ -0,0 +1,9 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MigrationWebApplicationFirewallMapping struct { + MigratedFrom *ResourceReference `json:"migratedFrom,omitempty"` + MigratedTo *ResourceReference `json:"migratedTo,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profile.go b/resource-manager/cdn/2024-02-01/profiles/model_profile.go new file mode 100644 index 00000000000..2568ad9b130 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profile.go @@ -0,0 +1,22 @@ +package profiles + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Profile struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Kind *string `json:"kind,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ProfileProperties `json:"properties,omitempty"` + Sku Sku `json:"sku"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profilelogscrubbing.go b/resource-manager/cdn/2024-02-01/profiles/model_profilelogscrubbing.go new file mode 100644 index 00000000000..f897715e8c2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profilelogscrubbing.go @@ -0,0 +1,9 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileLogScrubbing struct { + ScrubbingRules *[]ProfileScrubbingRules `json:"scrubbingRules,omitempty"` + State *ProfileScrubbingState `json:"state,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profileproperties.go b/resource-manager/cdn/2024-02-01/profiles/model_profileproperties.go new file mode 100644 index 00000000000..6c9e4d175b4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profileproperties.go @@ -0,0 +1,13 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileProperties struct { + ExtendedProperties *map[string]string `json:"extendedProperties,omitempty"` + FrontDoorId *string `json:"frontDoorId,omitempty"` + LogScrubbing *ProfileLogScrubbing `json:"logScrubbing,omitempty"` + OriginResponseTimeoutSeconds *int64 `json:"originResponseTimeoutSeconds,omitempty"` + ProvisioningState *ProfileProvisioningState `json:"provisioningState,omitempty"` + ResourceState *ProfileResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profilepropertiesupdateparameters.go b/resource-manager/cdn/2024-02-01/profiles/model_profilepropertiesupdateparameters.go new file mode 100644 index 00000000000..01d3dc5ad0e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profilepropertiesupdateparameters.go @@ -0,0 +1,9 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfilePropertiesUpdateParameters struct { + LogScrubbing *ProfileLogScrubbing `json:"logScrubbing,omitempty"` + OriginResponseTimeoutSeconds *int64 `json:"originResponseTimeoutSeconds,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profilescrubbingrules.go b/resource-manager/cdn/2024-02-01/profiles/model_profilescrubbingrules.go new file mode 100644 index 00000000000..9ed138086f8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profilescrubbingrules.go @@ -0,0 +1,11 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileScrubbingRules struct { + MatchVariable ScrubbingRuleEntryMatchVariable `json:"matchVariable"` + Selector *string `json:"selector,omitempty"` + SelectorMatchOperator ScrubbingRuleEntryMatchOperator `json:"selectorMatchOperator"` + State *ScrubbingRuleEntryState `json:"state,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_profileupdateparameters.go b/resource-manager/cdn/2024-02-01/profiles/model_profileupdateparameters.go new file mode 100644 index 00000000000..01c4b966536 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_profileupdateparameters.go @@ -0,0 +1,14 @@ +package profiles + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileUpdateParameters struct { + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *ProfilePropertiesUpdateParameters `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_resourcereference.go b/resource-manager/cdn/2024-02-01/profiles/model_resourcereference.go new file mode 100644 index 00000000000..3e5faa3a3d7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_resourcereference.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_resourceusage.go b/resource-manager/cdn/2024-02-01/profiles/model_resourceusage.go new file mode 100644 index 00000000000..f56db4430e2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_resourceusage.go @@ -0,0 +1,11 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceUsage struct { + CurrentValue *int64 `json:"currentValue,omitempty"` + Limit *int64 `json:"limit,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Unit *ResourceUsageUnit `json:"unit,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_sku.go b/resource-manager/cdn/2024-02-01/profiles/model_sku.go new file mode 100644 index 00000000000..a70d546bfd6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_sku.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name *SkuName `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_ssouri.go b/resource-manager/cdn/2024-02-01/profiles/model_ssouri.go new file mode 100644 index 00000000000..ae93b0584f8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_ssouri.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsoUri struct { + SsoUriValue *string `json:"ssoUriValue,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/model_supportedoptimizationtypeslistresult.go b/resource-manager/cdn/2024-02-01/profiles/model_supportedoptimizationtypeslistresult.go new file mode 100644 index 00000000000..1242943b3db --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/model_supportedoptimizationtypeslistresult.go @@ -0,0 +1,8 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SupportedOptimizationTypesListResult struct { + SupportedOptimizationTypes *[]OptimizationType `json:"supportedOptimizationTypes,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/profiles/predicates.go b/resource-manager/cdn/2024-02-01/profiles/predicates.go new file mode 100644 index 00000000000..f48c2803370 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/predicates.go @@ -0,0 +1,60 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProfileOperationPredicate struct { + Id *string + Kind *string + Location *string + Name *string + Type *string +} + +func (p ProfileOperationPredicate) Matches(input Profile) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type ResourceUsageOperationPredicate struct { + CurrentValue *int64 + Limit *int64 + ResourceType *string +} + +func (p ResourceUsageOperationPredicate) Matches(input ResourceUsage) bool { + + if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { + return false + } + + if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { + return false + } + + if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/profiles/version.go b/resource-manager/cdn/2024-02-01/profiles/version.go new file mode 100644 index 00000000000..3a0dc8d5b91 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/profiles/version.go @@ -0,0 +1,10 @@ +package profiles + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/profiles/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/routes/README.md b/resource-manager/cdn/2024-02-01/routes/README.md new file mode 100644 index 00000000000..5122eac7d6b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/routes` Documentation + +The `routes` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/routes" +``` + + +### Client Initialization + +```go +client := routes.NewRoutesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RoutesClient.Create` + +```go +ctx := context.TODO() +id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue") + +payload := routes.Route{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RoutesClient.Delete` + +```go +ctx := context.TODO() +id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RoutesClient.Get` + +```go +ctx := context.TODO() +id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RoutesClient.ListByEndpoint` + +```go +ctx := context.TODO() +id := routes.NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + +// alternatively `client.ListByEndpoint(ctx, id)` can be used to do batched pagination +items, err := client.ListByEndpointComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RoutesClient.Update` + +```go +ctx := context.TODO() +id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue") + +payload := routes.RouteUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/routes/client.go b/resource-manager/cdn/2024-02-01/routes/client.go new file mode 100644 index 00000000000..88e9f135cd1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/client.go @@ -0,0 +1,26 @@ +package routes + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RoutesClient struct { + Client *resourcemanager.Client +} + +func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "routes", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) + } + + return &RoutesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/routes/constants.go b/resource-manager/cdn/2024-02-01/routes/constants.go new file mode 100644 index 00000000000..86d0195a3fb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/constants.go @@ -0,0 +1,362 @@ +package routes + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AFDEndpointProtocols string + +const ( + AFDEndpointProtocolsHTTP AFDEndpointProtocols = "Http" + AFDEndpointProtocolsHTTPS AFDEndpointProtocols = "Https" +) + +func PossibleValuesForAFDEndpointProtocols() []string { + return []string{ + string(AFDEndpointProtocolsHTTP), + string(AFDEndpointProtocolsHTTPS), + } +} + +func (s *AFDEndpointProtocols) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAFDEndpointProtocols(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAFDEndpointProtocols(input string) (*AFDEndpointProtocols, error) { + vals := map[string]AFDEndpointProtocols{ + "http": AFDEndpointProtocolsHTTP, + "https": AFDEndpointProtocolsHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AFDEndpointProtocols(input) + return &out, nil +} + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type AfdQueryStringCachingBehavior string + +const ( + AfdQueryStringCachingBehaviorIgnoreQueryString AfdQueryStringCachingBehavior = "IgnoreQueryString" + AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" + AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" + AfdQueryStringCachingBehaviorUseQueryString AfdQueryStringCachingBehavior = "UseQueryString" +) + +func PossibleValuesForAfdQueryStringCachingBehavior() []string { + return []string{ + string(AfdQueryStringCachingBehaviorIgnoreQueryString), + string(AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings), + string(AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings), + string(AfdQueryStringCachingBehaviorUseQueryString), + } +} + +func (s *AfdQueryStringCachingBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdQueryStringCachingBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdQueryStringCachingBehavior(input string) (*AfdQueryStringCachingBehavior, error) { + vals := map[string]AfdQueryStringCachingBehavior{ + "ignorequerystring": AfdQueryStringCachingBehaviorIgnoreQueryString, + "ignorespecifiedquerystrings": AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, + "usequerystring": AfdQueryStringCachingBehaviorUseQueryString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdQueryStringCachingBehavior(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type EnabledState string + +const ( + EnabledStateDisabled EnabledState = "Disabled" + EnabledStateEnabled EnabledState = "Enabled" +) + +func PossibleValuesForEnabledState() []string { + return []string{ + string(EnabledStateDisabled), + string(EnabledStateEnabled), + } +} + +func (s *EnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnabledState(input string) (*EnabledState, error) { + vals := map[string]EnabledState{ + "disabled": EnabledStateDisabled, + "enabled": EnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnabledState(input) + return &out, nil +} + +type ForwardingProtocol string + +const ( + ForwardingProtocolHTTPOnly ForwardingProtocol = "HttpOnly" + ForwardingProtocolHTTPSOnly ForwardingProtocol = "HttpsOnly" + ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest" +) + +func PossibleValuesForForwardingProtocol() []string { + return []string{ + string(ForwardingProtocolHTTPOnly), + string(ForwardingProtocolHTTPSOnly), + string(ForwardingProtocolMatchRequest), + } +} + +func (s *ForwardingProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseForwardingProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseForwardingProtocol(input string) (*ForwardingProtocol, error) { + vals := map[string]ForwardingProtocol{ + "httponly": ForwardingProtocolHTTPOnly, + "httpsonly": ForwardingProtocolHTTPSOnly, + "matchrequest": ForwardingProtocolMatchRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ForwardingProtocol(input) + return &out, nil +} + +type HTTPSRedirect string + +const ( + HTTPSRedirectDisabled HTTPSRedirect = "Disabled" + HTTPSRedirectEnabled HTTPSRedirect = "Enabled" +) + +func PossibleValuesForHTTPSRedirect() []string { + return []string{ + string(HTTPSRedirectDisabled), + string(HTTPSRedirectEnabled), + } +} + +func (s *HTTPSRedirect) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHTTPSRedirect(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHTTPSRedirect(input string) (*HTTPSRedirect, error) { + vals := map[string]HTTPSRedirect{ + "disabled": HTTPSRedirectDisabled, + "enabled": HTTPSRedirectEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HTTPSRedirect(input) + return &out, nil +} + +type LinkToDefaultDomain string + +const ( + LinkToDefaultDomainDisabled LinkToDefaultDomain = "Disabled" + LinkToDefaultDomainEnabled LinkToDefaultDomain = "Enabled" +) + +func PossibleValuesForLinkToDefaultDomain() []string { + return []string{ + string(LinkToDefaultDomainDisabled), + string(LinkToDefaultDomainEnabled), + } +} + +func (s *LinkToDefaultDomain) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinkToDefaultDomain(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinkToDefaultDomain(input string) (*LinkToDefaultDomain, error) { + vals := map[string]LinkToDefaultDomain{ + "disabled": LinkToDefaultDomainDisabled, + "enabled": LinkToDefaultDomainEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinkToDefaultDomain(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/routes/id_afdendpoint.go b/resource-manager/cdn/2024-02-01/routes/id_afdendpoint.go new file mode 100644 index 00000000000..cf258938c17 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/id_afdendpoint.go @@ -0,0 +1,139 @@ +package routes + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&AfdEndpointId{}) +} + +var _ resourceids.ResourceId = &AfdEndpointId{} + +// AfdEndpointId is a struct representing the Resource ID for a Afd Endpoint +type AfdEndpointId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + AfdEndpointName string +} + +// NewAfdEndpointID returns a new AfdEndpointId struct +func NewAfdEndpointID(subscriptionId string, resourceGroupName string, profileName string, afdEndpointName string) AfdEndpointId { + return AfdEndpointId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + AfdEndpointName: afdEndpointName, + } +} + +// ParseAfdEndpointID parses 'input' into a AfdEndpointId +func ParseAfdEndpointID(input string) (*AfdEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&AfdEndpointId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := AfdEndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseAfdEndpointIDInsensitively parses 'input' case-insensitively into a AfdEndpointId +// note: this method should only be used for API response data and not user input +func ParseAfdEndpointIDInsensitively(input string) (*AfdEndpointId, error) { + parser := resourceids.NewParserFromResourceIdType(&AfdEndpointId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := AfdEndpointId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *AfdEndpointId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.AfdEndpointName, ok = input.Parsed["afdEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "afdEndpointName", input) + } + + return nil +} + +// ValidateAfdEndpointID checks that 'input' can be parsed as a Afd Endpoint ID +func ValidateAfdEndpointID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseAfdEndpointID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Afd Endpoint ID +func (id AfdEndpointId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/afdEndpoints/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.AfdEndpointName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Afd Endpoint ID +func (id AfdEndpointId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticAfdEndpoints", "afdEndpoints", "afdEndpoints"), + resourceids.UserSpecifiedSegment("afdEndpointName", "afdEndpointValue"), + } +} + +// String returns a human-readable description of this Afd Endpoint ID +func (id AfdEndpointId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Afd Endpoint Name: %q", id.AfdEndpointName), + } + return fmt.Sprintf("Afd Endpoint (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/routes/id_afdendpoint_test.go b/resource-manager/cdn/2024-02-01/routes/id_afdendpoint_test.go new file mode 100644 index 00000000000..19198ee79d0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/id_afdendpoint_test.go @@ -0,0 +1,327 @@ +package routes + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &AfdEndpointId{} + +func TestNewAfdEndpointID(t *testing.T) { + id := NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.AfdEndpointName != "afdEndpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'AfdEndpointName'", id.AfdEndpointName, "afdEndpointValue") + } +} + +func TestFormatAfdEndpointID(t *testing.T) { + actual := NewAfdEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseAfdEndpointID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *AfdEndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseAfdEndpointID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + } +} + +func TestParseAfdEndpointIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *AfdEndpointId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE", + Expected: &AfdEndpointId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + AfdEndpointName: "aFdEnDpOiNtVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseAfdEndpointIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + } +} + +func TestSegmentsForAfdEndpointId(t *testing.T) { + segments := AfdEndpointId{}.Segments() + if len(segments) == 0 { + t.Fatalf("AfdEndpointId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/routes/id_route.go b/resource-manager/cdn/2024-02-01/routes/id_route.go new file mode 100644 index 00000000000..995f6fad9d4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/id_route.go @@ -0,0 +1,148 @@ +package routes + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RouteId{}) +} + +var _ resourceids.ResourceId = &RouteId{} + +// RouteId is a struct representing the Resource ID for a Route +type RouteId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + AfdEndpointName string + RouteName string +} + +// NewRouteID returns a new RouteId struct +func NewRouteID(subscriptionId string, resourceGroupName string, profileName string, afdEndpointName string, routeName string) RouteId { + return RouteId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + AfdEndpointName: afdEndpointName, + RouteName: routeName, + } +} + +// ParseRouteID parses 'input' into a RouteId +func ParseRouteID(input string) (*RouteId, error) { + parser := resourceids.NewParserFromResourceIdType(&RouteId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RouteId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRouteIDInsensitively parses 'input' case-insensitively into a RouteId +// note: this method should only be used for API response data and not user input +func ParseRouteIDInsensitively(input string) (*RouteId, error) { + parser := resourceids.NewParserFromResourceIdType(&RouteId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RouteId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RouteId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.AfdEndpointName, ok = input.Parsed["afdEndpointName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "afdEndpointName", input) + } + + if id.RouteName, ok = input.Parsed["routeName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "routeName", input) + } + + return nil +} + +// ValidateRouteID checks that 'input' can be parsed as a Route ID +func ValidateRouteID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRouteID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Route ID +func (id RouteId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/afdEndpoints/%s/routes/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.AfdEndpointName, id.RouteName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Route ID +func (id RouteId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticAfdEndpoints", "afdEndpoints", "afdEndpoints"), + resourceids.UserSpecifiedSegment("afdEndpointName", "afdEndpointValue"), + resourceids.StaticSegment("staticRoutes", "routes", "routes"), + resourceids.UserSpecifiedSegment("routeName", "routeValue"), + } +} + +// String returns a human-readable description of this Route ID +func (id RouteId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Afd Endpoint Name: %q", id.AfdEndpointName), + fmt.Sprintf("Route Name: %q", id.RouteName), + } + return fmt.Sprintf("Route (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/routes/id_route_test.go b/resource-manager/cdn/2024-02-01/routes/id_route_test.go new file mode 100644 index 00000000000..f4de3b2a2c7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/id_route_test.go @@ -0,0 +1,372 @@ +package routes + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RouteId{} + +func TestNewRouteID(t *testing.T) { + id := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.AfdEndpointName != "afdEndpointValue" { + t.Fatalf("Expected %q but got %q for Segment 'AfdEndpointName'", id.AfdEndpointName, "afdEndpointValue") + } + + if id.RouteName != "routeValue" { + t.Fatalf("Expected %q but got %q for Segment 'RouteName'", id.RouteName, "routeValue") + } +} + +func TestFormatRouteID(t *testing.T) { + actual := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "afdEndpointValue", "routeValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes/routeValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRouteID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RouteId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes/routeValue", + Expected: &RouteId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + RouteName: "routeValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes/routeValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRouteID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + if actual.RouteName != v.Expected.RouteName { + t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) + } + + } +} + +func TestParseRouteIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RouteId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE/rOuTeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes/routeValue", + Expected: &RouteId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + AfdEndpointName: "afdEndpointValue", + RouteName: "routeValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/afdEndpoints/afdEndpointValue/routes/routeValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE/rOuTeS/rOuTeVaLuE", + Expected: &RouteId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + AfdEndpointName: "aFdEnDpOiNtVaLuE", + RouteName: "rOuTeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/aFdEnDpOiNtS/aFdEnDpOiNtVaLuE/rOuTeS/rOuTeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRouteIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.AfdEndpointName != v.Expected.AfdEndpointName { + t.Fatalf("Expected %q but got %q for AfdEndpointName", v.Expected.AfdEndpointName, actual.AfdEndpointName) + } + + if actual.RouteName != v.Expected.RouteName { + t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) + } + + } +} + +func TestSegmentsForRouteId(t *testing.T) { + segments := RouteId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RouteId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/routes/method_create.go b/resource-manager/cdn/2024-02-01/routes/method_create.go new file mode 100644 index 00000000000..a2df43fefb7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/method_create.go @@ -0,0 +1,76 @@ +package routes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Route +} + +// Create ... +func (c RoutesClient) Create(ctx context.Context, id RouteId, input Route) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c RoutesClient) CreateThenPoll(ctx context.Context, id RouteId, input Route) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/routes/method_delete.go b/resource-manager/cdn/2024-02-01/routes/method_delete.go new file mode 100644 index 00000000000..f6cee23c133 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/method_delete.go @@ -0,0 +1,71 @@ +package routes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c RoutesClient) Delete(ctx context.Context, id RouteId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c RoutesClient) DeleteThenPoll(ctx context.Context, id RouteId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/routes/method_get.go b/resource-manager/cdn/2024-02-01/routes/method_get.go new file mode 100644 index 00000000000..306c6528c39 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/method_get.go @@ -0,0 +1,53 @@ +package routes + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Route +} + +// Get ... +func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Route + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/routes/method_listbyendpoint.go b/resource-manager/cdn/2024-02-01/routes/method_listbyendpoint.go new file mode 100644 index 00000000000..ecac0980ee1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/method_listbyendpoint.go @@ -0,0 +1,105 @@ +package routes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByEndpointOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Route +} + +type ListByEndpointCompleteResult struct { + LatestHttpResponse *http.Response + Items []Route +} + +type ListByEndpointCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByEndpointCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByEndpoint ... +func (c RoutesClient) ListByEndpoint(ctx context.Context, id AfdEndpointId) (result ListByEndpointOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByEndpointCustomPager{}, + Path: fmt.Sprintf("%s/routes", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Route `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByEndpointComplete retrieves all the results into a single object +func (c RoutesClient) ListByEndpointComplete(ctx context.Context, id AfdEndpointId) (ListByEndpointCompleteResult, error) { + return c.ListByEndpointCompleteMatchingPredicate(ctx, id, RouteOperationPredicate{}) +} + +// ListByEndpointCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RoutesClient) ListByEndpointCompleteMatchingPredicate(ctx context.Context, id AfdEndpointId, predicate RouteOperationPredicate) (result ListByEndpointCompleteResult, err error) { + items := make([]Route, 0) + + resp, err := c.ListByEndpoint(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByEndpointCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/routes/method_update.go b/resource-manager/cdn/2024-02-01/routes/method_update.go new file mode 100644 index 00000000000..675feac0920 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/method_update.go @@ -0,0 +1,75 @@ +package routes + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Route +} + +// Update ... +func (c RoutesClient) Update(ctx context.Context, id RouteId, input RouteUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c RoutesClient) UpdateThenPoll(ctx context.Context, id RouteId, input RouteUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_activatedresourcereference.go b/resource-manager/cdn/2024-02-01/routes/model_activatedresourcereference.go new file mode 100644 index 00000000000..d8e6755a6d5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_activatedresourcereference.go @@ -0,0 +1,9 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ActivatedResourceReference struct { + Id *string `json:"id,omitempty"` + IsActive *bool `json:"isActive,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_afdroutecacheconfiguration.go b/resource-manager/cdn/2024-02-01/routes/model_afdroutecacheconfiguration.go new file mode 100644 index 00000000000..958a2a2c8dc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_afdroutecacheconfiguration.go @@ -0,0 +1,10 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdRouteCacheConfiguration struct { + CompressionSettings *CompressionSettings `json:"compressionSettings,omitempty"` + QueryParameters *string `json:"queryParameters,omitempty"` + QueryStringCachingBehavior *AfdQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_compressionsettings.go b/resource-manager/cdn/2024-02-01/routes/model_compressionsettings.go new file mode 100644 index 00000000000..a8bf44d6e7f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_compressionsettings.go @@ -0,0 +1,9 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CompressionSettings struct { + ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"` + IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_resourcereference.go b/resource-manager/cdn/2024-02-01/routes/model_resourcereference.go new file mode 100644 index 00000000000..a5bfb930279 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_resourcereference.go @@ -0,0 +1,8 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_route.go b/resource-manager/cdn/2024-02-01/routes/model_route.go new file mode 100644 index 00000000000..aa2a2d24bad --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_route.go @@ -0,0 +1,16 @@ +package routes + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Route struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RouteProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_routeproperties.go b/resource-manager/cdn/2024-02-01/routes/model_routeproperties.go new file mode 100644 index 00000000000..12df1741806 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_routeproperties.go @@ -0,0 +1,21 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteProperties struct { + CacheConfiguration *AfdRouteCacheConfiguration `json:"cacheConfiguration,omitempty"` + CustomDomains *[]ActivatedResourceReference `json:"customDomains,omitempty"` + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + EnabledState *EnabledState `json:"enabledState,omitempty"` + EndpointName *string `json:"endpointName,omitempty"` + ForwardingProtocol *ForwardingProtocol `json:"forwardingProtocol,omitempty"` + HTTPSRedirect *HTTPSRedirect `json:"httpsRedirect,omitempty"` + LinkToDefaultDomain *LinkToDefaultDomain `json:"linkToDefaultDomain,omitempty"` + OriginGroup *ResourceReference `json:"originGroup,omitempty"` + OriginPath *string `json:"originPath,omitempty"` + PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` + RuleSets *[]ResourceReference `json:"ruleSets,omitempty"` + SupportedProtocols *[]AFDEndpointProtocols `json:"supportedProtocols,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_routeupdateparameters.go b/resource-manager/cdn/2024-02-01/routes/model_routeupdateparameters.go new file mode 100644 index 00000000000..8694841b13a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_routeupdateparameters.go @@ -0,0 +1,8 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteUpdateParameters struct { + Properties *RouteUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/model_routeupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/routes/model_routeupdatepropertiesparameters.go new file mode 100644 index 00000000000..bae7745f669 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/model_routeupdatepropertiesparameters.go @@ -0,0 +1,19 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteUpdatePropertiesParameters struct { + CacheConfiguration *AfdRouteCacheConfiguration `json:"cacheConfiguration,omitempty"` + CustomDomains *[]ActivatedResourceReference `json:"customDomains,omitempty"` + EnabledState *EnabledState `json:"enabledState,omitempty"` + EndpointName *string `json:"endpointName,omitempty"` + ForwardingProtocol *ForwardingProtocol `json:"forwardingProtocol,omitempty"` + HTTPSRedirect *HTTPSRedirect `json:"httpsRedirect,omitempty"` + LinkToDefaultDomain *LinkToDefaultDomain `json:"linkToDefaultDomain,omitempty"` + OriginGroup *ResourceReference `json:"originGroup,omitempty"` + OriginPath *string `json:"originPath,omitempty"` + PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` + RuleSets *[]ResourceReference `json:"ruleSets,omitempty"` + SupportedProtocols *[]AFDEndpointProtocols `json:"supportedProtocols,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/routes/predicates.go b/resource-manager/cdn/2024-02-01/routes/predicates.go new file mode 100644 index 00000000000..81b2f212359 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/predicates.go @@ -0,0 +1,27 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RouteOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p RouteOperationPredicate) Matches(input Route) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/routes/version.go b/resource-manager/cdn/2024-02-01/routes/version.go new file mode 100644 index 00000000000..86a8705e56c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/routes/version.go @@ -0,0 +1,10 @@ +package routes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/routes/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/rules/README.md b/resource-manager/cdn/2024-02-01/rules/README.md new file mode 100644 index 00000000000..6e09616c7f6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rules` Documentation + +The `rules` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rules" +``` + + +### Client Initialization + +```go +client := rules.NewRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RulesClient.Create` + +```go +ctx := context.TODO() +id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue") + +payload := rules.Rule{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RulesClient.Delete` + +```go +ctx := context.TODO() +id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RulesClient.Get` + +```go +ctx := context.TODO() +id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RulesClient.ListByRuleSet` + +```go +ctx := context.TODO() +id := rules.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + +// alternatively `client.ListByRuleSet(ctx, id)` can be used to do batched pagination +items, err := client.ListByRuleSetComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RulesClient.Update` + +```go +ctx := context.TODO() +id := rules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue") + +payload := rules.RuleUpdateParameters{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/rules/client.go b/resource-manager/cdn/2024-02-01/rules/client.go new file mode 100644 index 00000000000..ee5a5154cef --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/client.go @@ -0,0 +1,26 @@ +package rules + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RulesClient struct { + Client *resourcemanager.Client +} + +func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating RulesClient: %+v", err) + } + + return &RulesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/constants.go b/resource-manager/cdn/2024-02-01/rules/constants.go new file mode 100644 index 00000000000..5a6cc728f67 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/constants.go @@ -0,0 +1,2268 @@ +package rules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type Algorithm string + +const ( + AlgorithmSHATwoFiveSix Algorithm = "SHA256" +) + +func PossibleValuesForAlgorithm() []string { + return []string{ + string(AlgorithmSHATwoFiveSix), + } +} + +func (s *Algorithm) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAlgorithm(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAlgorithm(input string) (*Algorithm, error) { + vals := map[string]Algorithm{ + "sha256": AlgorithmSHATwoFiveSix, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Algorithm(input) + return &out, nil +} + +type CacheBehavior string + +const ( + CacheBehaviorBypassCache CacheBehavior = "BypassCache" + CacheBehaviorOverride CacheBehavior = "Override" + CacheBehaviorSetIfMissing CacheBehavior = "SetIfMissing" +) + +func PossibleValuesForCacheBehavior() []string { + return []string{ + string(CacheBehaviorBypassCache), + string(CacheBehaviorOverride), + string(CacheBehaviorSetIfMissing), + } +} + +func (s *CacheBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCacheBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCacheBehavior(input string) (*CacheBehavior, error) { + vals := map[string]CacheBehavior{ + "bypasscache": CacheBehaviorBypassCache, + "override": CacheBehaviorOverride, + "setifmissing": CacheBehaviorSetIfMissing, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CacheBehavior(input) + return &out, nil +} + +type CacheType string + +const ( + CacheTypeAll CacheType = "All" +) + +func PossibleValuesForCacheType() []string { + return []string{ + string(CacheTypeAll), + } +} + +func (s *CacheType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCacheType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCacheType(input string) (*CacheType, error) { + vals := map[string]CacheType{ + "all": CacheTypeAll, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CacheType(input) + return &out, nil +} + +type ClientPortOperator string + +const ( + ClientPortOperatorAny ClientPortOperator = "Any" + ClientPortOperatorBeginsWith ClientPortOperator = "BeginsWith" + ClientPortOperatorContains ClientPortOperator = "Contains" + ClientPortOperatorEndsWith ClientPortOperator = "EndsWith" + ClientPortOperatorEqual ClientPortOperator = "Equal" + ClientPortOperatorGreaterThan ClientPortOperator = "GreaterThan" + ClientPortOperatorGreaterThanOrEqual ClientPortOperator = "GreaterThanOrEqual" + ClientPortOperatorLessThan ClientPortOperator = "LessThan" + ClientPortOperatorLessThanOrEqual ClientPortOperator = "LessThanOrEqual" + ClientPortOperatorRegEx ClientPortOperator = "RegEx" +) + +func PossibleValuesForClientPortOperator() []string { + return []string{ + string(ClientPortOperatorAny), + string(ClientPortOperatorBeginsWith), + string(ClientPortOperatorContains), + string(ClientPortOperatorEndsWith), + string(ClientPortOperatorEqual), + string(ClientPortOperatorGreaterThan), + string(ClientPortOperatorGreaterThanOrEqual), + string(ClientPortOperatorLessThan), + string(ClientPortOperatorLessThanOrEqual), + string(ClientPortOperatorRegEx), + } +} + +func (s *ClientPortOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClientPortOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClientPortOperator(input string) (*ClientPortOperator, error) { + vals := map[string]ClientPortOperator{ + "any": ClientPortOperatorAny, + "beginswith": ClientPortOperatorBeginsWith, + "contains": ClientPortOperatorContains, + "endswith": ClientPortOperatorEndsWith, + "equal": ClientPortOperatorEqual, + "greaterthan": ClientPortOperatorGreaterThan, + "greaterthanorequal": ClientPortOperatorGreaterThanOrEqual, + "lessthan": ClientPortOperatorLessThan, + "lessthanorequal": ClientPortOperatorLessThanOrEqual, + "regex": ClientPortOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClientPortOperator(input) + return &out, nil +} + +type CookiesOperator string + +const ( + CookiesOperatorAny CookiesOperator = "Any" + CookiesOperatorBeginsWith CookiesOperator = "BeginsWith" + CookiesOperatorContains CookiesOperator = "Contains" + CookiesOperatorEndsWith CookiesOperator = "EndsWith" + CookiesOperatorEqual CookiesOperator = "Equal" + CookiesOperatorGreaterThan CookiesOperator = "GreaterThan" + CookiesOperatorGreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual" + CookiesOperatorLessThan CookiesOperator = "LessThan" + CookiesOperatorLessThanOrEqual CookiesOperator = "LessThanOrEqual" + CookiesOperatorRegEx CookiesOperator = "RegEx" +) + +func PossibleValuesForCookiesOperator() []string { + return []string{ + string(CookiesOperatorAny), + string(CookiesOperatorBeginsWith), + string(CookiesOperatorContains), + string(CookiesOperatorEndsWith), + string(CookiesOperatorEqual), + string(CookiesOperatorGreaterThan), + string(CookiesOperatorGreaterThanOrEqual), + string(CookiesOperatorLessThan), + string(CookiesOperatorLessThanOrEqual), + string(CookiesOperatorRegEx), + } +} + +func (s *CookiesOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCookiesOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCookiesOperator(input string) (*CookiesOperator, error) { + vals := map[string]CookiesOperator{ + "any": CookiesOperatorAny, + "beginswith": CookiesOperatorBeginsWith, + "contains": CookiesOperatorContains, + "endswith": CookiesOperatorEndsWith, + "equal": CookiesOperatorEqual, + "greaterthan": CookiesOperatorGreaterThan, + "greaterthanorequal": CookiesOperatorGreaterThanOrEqual, + "lessthan": CookiesOperatorLessThan, + "lessthanorequal": CookiesOperatorLessThanOrEqual, + "regex": CookiesOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CookiesOperator(input) + return &out, nil +} + +type DeliveryRuleActionName string + +const ( + DeliveryRuleActionNameCacheExpiration DeliveryRuleActionName = "CacheExpiration" + DeliveryRuleActionNameCacheKeyQueryString DeliveryRuleActionName = "CacheKeyQueryString" + DeliveryRuleActionNameModifyRequestHeader DeliveryRuleActionName = "ModifyRequestHeader" + DeliveryRuleActionNameModifyResponseHeader DeliveryRuleActionName = "ModifyResponseHeader" + DeliveryRuleActionNameOriginGroupOverride DeliveryRuleActionName = "OriginGroupOverride" + DeliveryRuleActionNameRouteConfigurationOverride DeliveryRuleActionName = "RouteConfigurationOverride" + DeliveryRuleActionNameUrlRedirect DeliveryRuleActionName = "UrlRedirect" + DeliveryRuleActionNameUrlRewrite DeliveryRuleActionName = "UrlRewrite" + DeliveryRuleActionNameUrlSigning DeliveryRuleActionName = "UrlSigning" +) + +func PossibleValuesForDeliveryRuleActionName() []string { + return []string{ + string(DeliveryRuleActionNameCacheExpiration), + string(DeliveryRuleActionNameCacheKeyQueryString), + string(DeliveryRuleActionNameModifyRequestHeader), + string(DeliveryRuleActionNameModifyResponseHeader), + string(DeliveryRuleActionNameOriginGroupOverride), + string(DeliveryRuleActionNameRouteConfigurationOverride), + string(DeliveryRuleActionNameUrlRedirect), + string(DeliveryRuleActionNameUrlRewrite), + string(DeliveryRuleActionNameUrlSigning), + } +} + +func (s *DeliveryRuleActionName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleActionName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleActionName(input string) (*DeliveryRuleActionName, error) { + vals := map[string]DeliveryRuleActionName{ + "cacheexpiration": DeliveryRuleActionNameCacheExpiration, + "cachekeyquerystring": DeliveryRuleActionNameCacheKeyQueryString, + "modifyrequestheader": DeliveryRuleActionNameModifyRequestHeader, + "modifyresponseheader": DeliveryRuleActionNameModifyResponseHeader, + "origingroupoverride": DeliveryRuleActionNameOriginGroupOverride, + "routeconfigurationoverride": DeliveryRuleActionNameRouteConfigurationOverride, + "urlredirect": DeliveryRuleActionNameUrlRedirect, + "urlrewrite": DeliveryRuleActionNameUrlRewrite, + "urlsigning": DeliveryRuleActionNameUrlSigning, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleActionName(input) + return &out, nil +} + +type DeliveryRuleActionParametersType string + +const ( + DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters DeliveryRuleActionParametersType = "DeliveryRuleCacheExpirationActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters DeliveryRuleActionParametersType = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters DeliveryRuleActionParametersType = "DeliveryRuleHeaderActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters DeliveryRuleActionParametersType = "DeliveryRuleOriginGroupOverrideActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters DeliveryRuleActionParametersType = "DeliveryRuleRouteConfigurationOverrideActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlRedirectActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlRewriteActionParameters" + DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters DeliveryRuleActionParametersType = "DeliveryRuleUrlSigningActionParameters" +) + +func PossibleValuesForDeliveryRuleActionParametersType() []string { + return []string{ + string(DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters), + string(DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters), + } +} + +func (s *DeliveryRuleActionParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleActionParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleActionParametersType(input string) (*DeliveryRuleActionParametersType, error) { + vals := map[string]DeliveryRuleActionParametersType{ + "deliveryrulecacheexpirationactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleCacheExpirationActionParameters, + "deliveryrulecachekeyquerystringbehavioractionparameters": DeliveryRuleActionParametersTypeDeliveryRuleCacheKeyQueryStringBehaviorActionParameters, + "deliveryruleheaderactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleHeaderActionParameters, + "deliveryruleorigingroupoverrideactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleOriginGroupOverrideActionParameters, + "deliveryrulerouteconfigurationoverrideactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleRouteConfigurationOverrideActionParameters, + "deliveryruleurlredirectactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlRedirectActionParameters, + "deliveryruleurlrewriteactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlRewriteActionParameters, + "deliveryruleurlsigningactionparameters": DeliveryRuleActionParametersTypeDeliveryRuleUrlSigningActionParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleActionParametersType(input) + return &out, nil +} + +type DeliveryRuleConditionParametersType string + +const ( + DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleClientPortConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleCookiesConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleHttpVersionConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleHostNameConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleIsDeviceConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters DeliveryRuleConditionParametersType = "DeliveryRulePostArgsConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleQueryStringConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRemoteAddressConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestBodyConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestHeaderConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestMethodConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestSchemeConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleRequestUriConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleServerPortConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleSocketAddrConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleSslProtocolConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlFilenameConditionParameters" + DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters DeliveryRuleConditionParametersType = "DeliveryRuleUrlPathMatchConditionParameters" +) + +func PossibleValuesForDeliveryRuleConditionParametersType() []string { + return []string{ + string(DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters), + string(DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters), + } +} + +func (s *DeliveryRuleConditionParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeliveryRuleConditionParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeliveryRuleConditionParametersType(input string) (*DeliveryRuleConditionParametersType, error) { + vals := map[string]DeliveryRuleConditionParametersType{ + "deliveryruleclientportconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleClientPortConditionParameters, + "deliveryrulecookiesconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleCookiesConditionParameters, + "deliveryrulehttpversionconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleHTTPVersionConditionParameters, + "deliveryrulehostnameconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleHostNameConditionParameters, + "deliveryruleisdeviceconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleIsDeviceConditionParameters, + "deliveryrulepostargsconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRulePostArgsConditionParameters, + "deliveryrulequerystringconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleQueryStringConditionParameters, + "deliveryruleremoteaddressconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRemoteAddressConditionParameters, + "deliveryrulerequestbodyconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestBodyConditionParameters, + "deliveryrulerequestheaderconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestHeaderConditionParameters, + "deliveryrulerequestmethodconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestMethodConditionParameters, + "deliveryrulerequestschemeconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestSchemeConditionParameters, + "deliveryrulerequesturiconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleRequestUriConditionParameters, + "deliveryruleserverportconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleServerPortConditionParameters, + "deliveryrulesocketaddrconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleSocketAddrConditionParameters, + "deliveryrulesslprotocolconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleSslProtocolConditionParameters, + "deliveryruleurlfileextensionmatchconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlFileExtensionMatchConditionParameters, + "deliveryruleurlfilenameconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlFilenameConditionParameters, + "deliveryruleurlpathmatchconditionparameters": DeliveryRuleConditionParametersTypeDeliveryRuleUrlPathMatchConditionParameters, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeliveryRuleConditionParametersType(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type DestinationProtocol string + +const ( + DestinationProtocolHTTP DestinationProtocol = "Http" + DestinationProtocolHTTPS DestinationProtocol = "Https" + DestinationProtocolMatchRequest DestinationProtocol = "MatchRequest" +) + +func PossibleValuesForDestinationProtocol() []string { + return []string{ + string(DestinationProtocolHTTP), + string(DestinationProtocolHTTPS), + string(DestinationProtocolMatchRequest), + } +} + +func (s *DestinationProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDestinationProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDestinationProtocol(input string) (*DestinationProtocol, error) { + vals := map[string]DestinationProtocol{ + "http": DestinationProtocolHTTP, + "https": DestinationProtocolHTTPS, + "matchrequest": DestinationProtocolMatchRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DestinationProtocol(input) + return &out, nil +} + +type ForwardingProtocol string + +const ( + ForwardingProtocolHTTPOnly ForwardingProtocol = "HttpOnly" + ForwardingProtocolHTTPSOnly ForwardingProtocol = "HttpsOnly" + ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest" +) + +func PossibleValuesForForwardingProtocol() []string { + return []string{ + string(ForwardingProtocolHTTPOnly), + string(ForwardingProtocolHTTPSOnly), + string(ForwardingProtocolMatchRequest), + } +} + +func (s *ForwardingProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseForwardingProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseForwardingProtocol(input string) (*ForwardingProtocol, error) { + vals := map[string]ForwardingProtocol{ + "httponly": ForwardingProtocolHTTPOnly, + "httpsonly": ForwardingProtocolHTTPSOnly, + "matchrequest": ForwardingProtocolMatchRequest, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ForwardingProtocol(input) + return &out, nil +} + +type HTTPVersionOperator string + +const ( + HTTPVersionOperatorEqual HTTPVersionOperator = "Equal" +) + +func PossibleValuesForHTTPVersionOperator() []string { + return []string{ + string(HTTPVersionOperatorEqual), + } +} + +func (s *HTTPVersionOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHTTPVersionOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHTTPVersionOperator(input string) (*HTTPVersionOperator, error) { + vals := map[string]HTTPVersionOperator{ + "equal": HTTPVersionOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HTTPVersionOperator(input) + return &out, nil +} + +type HeaderAction string + +const ( + HeaderActionAppend HeaderAction = "Append" + HeaderActionDelete HeaderAction = "Delete" + HeaderActionOverwrite HeaderAction = "Overwrite" +) + +func PossibleValuesForHeaderAction() []string { + return []string{ + string(HeaderActionAppend), + string(HeaderActionDelete), + string(HeaderActionOverwrite), + } +} + +func (s *HeaderAction) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHeaderAction(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHeaderAction(input string) (*HeaderAction, error) { + vals := map[string]HeaderAction{ + "append": HeaderActionAppend, + "delete": HeaderActionDelete, + "overwrite": HeaderActionOverwrite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HeaderAction(input) + return &out, nil +} + +type HostNameOperator string + +const ( + HostNameOperatorAny HostNameOperator = "Any" + HostNameOperatorBeginsWith HostNameOperator = "BeginsWith" + HostNameOperatorContains HostNameOperator = "Contains" + HostNameOperatorEndsWith HostNameOperator = "EndsWith" + HostNameOperatorEqual HostNameOperator = "Equal" + HostNameOperatorGreaterThan HostNameOperator = "GreaterThan" + HostNameOperatorGreaterThanOrEqual HostNameOperator = "GreaterThanOrEqual" + HostNameOperatorLessThan HostNameOperator = "LessThan" + HostNameOperatorLessThanOrEqual HostNameOperator = "LessThanOrEqual" + HostNameOperatorRegEx HostNameOperator = "RegEx" +) + +func PossibleValuesForHostNameOperator() []string { + return []string{ + string(HostNameOperatorAny), + string(HostNameOperatorBeginsWith), + string(HostNameOperatorContains), + string(HostNameOperatorEndsWith), + string(HostNameOperatorEqual), + string(HostNameOperatorGreaterThan), + string(HostNameOperatorGreaterThanOrEqual), + string(HostNameOperatorLessThan), + string(HostNameOperatorLessThanOrEqual), + string(HostNameOperatorRegEx), + } +} + +func (s *HostNameOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHostNameOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHostNameOperator(input string) (*HostNameOperator, error) { + vals := map[string]HostNameOperator{ + "any": HostNameOperatorAny, + "beginswith": HostNameOperatorBeginsWith, + "contains": HostNameOperatorContains, + "endswith": HostNameOperatorEndsWith, + "equal": HostNameOperatorEqual, + "greaterthan": HostNameOperatorGreaterThan, + "greaterthanorequal": HostNameOperatorGreaterThanOrEqual, + "lessthan": HostNameOperatorLessThan, + "lessthanorequal": HostNameOperatorLessThanOrEqual, + "regex": HostNameOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HostNameOperator(input) + return &out, nil +} + +type IsDeviceMatchValue string + +const ( + IsDeviceMatchValueDesktop IsDeviceMatchValue = "Desktop" + IsDeviceMatchValueMobile IsDeviceMatchValue = "Mobile" +) + +func PossibleValuesForIsDeviceMatchValue() []string { + return []string{ + string(IsDeviceMatchValueDesktop), + string(IsDeviceMatchValueMobile), + } +} + +func (s *IsDeviceMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIsDeviceMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIsDeviceMatchValue(input string) (*IsDeviceMatchValue, error) { + vals := map[string]IsDeviceMatchValue{ + "desktop": IsDeviceMatchValueDesktop, + "mobile": IsDeviceMatchValueMobile, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IsDeviceMatchValue(input) + return &out, nil +} + +type IsDeviceOperator string + +const ( + IsDeviceOperatorEqual IsDeviceOperator = "Equal" +) + +func PossibleValuesForIsDeviceOperator() []string { + return []string{ + string(IsDeviceOperatorEqual), + } +} + +func (s *IsDeviceOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIsDeviceOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIsDeviceOperator(input string) (*IsDeviceOperator, error) { + vals := map[string]IsDeviceOperator{ + "equal": IsDeviceOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IsDeviceOperator(input) + return &out, nil +} + +type MatchProcessingBehavior string + +const ( + MatchProcessingBehaviorContinue MatchProcessingBehavior = "Continue" + MatchProcessingBehaviorStop MatchProcessingBehavior = "Stop" +) + +func PossibleValuesForMatchProcessingBehavior() []string { + return []string{ + string(MatchProcessingBehaviorContinue), + string(MatchProcessingBehaviorStop), + } +} + +func (s *MatchProcessingBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMatchProcessingBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMatchProcessingBehavior(input string) (*MatchProcessingBehavior, error) { + vals := map[string]MatchProcessingBehavior{ + "continue": MatchProcessingBehaviorContinue, + "stop": MatchProcessingBehaviorStop, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MatchProcessingBehavior(input) + return &out, nil +} + +type MatchVariable string + +const ( + MatchVariableClientPort MatchVariable = "ClientPort" + MatchVariableCookies MatchVariable = "Cookies" + MatchVariableHTTPVersion MatchVariable = "HttpVersion" + MatchVariableHostName MatchVariable = "HostName" + MatchVariableIsDevice MatchVariable = "IsDevice" + MatchVariablePostArgs MatchVariable = "PostArgs" + MatchVariableQueryString MatchVariable = "QueryString" + MatchVariableRemoteAddress MatchVariable = "RemoteAddress" + MatchVariableRequestBody MatchVariable = "RequestBody" + MatchVariableRequestHeader MatchVariable = "RequestHeader" + MatchVariableRequestMethod MatchVariable = "RequestMethod" + MatchVariableRequestScheme MatchVariable = "RequestScheme" + MatchVariableRequestUri MatchVariable = "RequestUri" + MatchVariableServerPort MatchVariable = "ServerPort" + MatchVariableSocketAddr MatchVariable = "SocketAddr" + MatchVariableSslProtocol MatchVariable = "SslProtocol" + MatchVariableUrlFileExtension MatchVariable = "UrlFileExtension" + MatchVariableUrlFileName MatchVariable = "UrlFileName" + MatchVariableUrlPath MatchVariable = "UrlPath" +) + +func PossibleValuesForMatchVariable() []string { + return []string{ + string(MatchVariableClientPort), + string(MatchVariableCookies), + string(MatchVariableHTTPVersion), + string(MatchVariableHostName), + string(MatchVariableIsDevice), + string(MatchVariablePostArgs), + string(MatchVariableQueryString), + string(MatchVariableRemoteAddress), + string(MatchVariableRequestBody), + string(MatchVariableRequestHeader), + string(MatchVariableRequestMethod), + string(MatchVariableRequestScheme), + string(MatchVariableRequestUri), + string(MatchVariableServerPort), + string(MatchVariableSocketAddr), + string(MatchVariableSslProtocol), + string(MatchVariableUrlFileExtension), + string(MatchVariableUrlFileName), + string(MatchVariableUrlPath), + } +} + +func (s *MatchVariable) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMatchVariable(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMatchVariable(input string) (*MatchVariable, error) { + vals := map[string]MatchVariable{ + "clientport": MatchVariableClientPort, + "cookies": MatchVariableCookies, + "httpversion": MatchVariableHTTPVersion, + "hostname": MatchVariableHostName, + "isdevice": MatchVariableIsDevice, + "postargs": MatchVariablePostArgs, + "querystring": MatchVariableQueryString, + "remoteaddress": MatchVariableRemoteAddress, + "requestbody": MatchVariableRequestBody, + "requestheader": MatchVariableRequestHeader, + "requestmethod": MatchVariableRequestMethod, + "requestscheme": MatchVariableRequestScheme, + "requesturi": MatchVariableRequestUri, + "serverport": MatchVariableServerPort, + "socketaddr": MatchVariableSocketAddr, + "sslprotocol": MatchVariableSslProtocol, + "urlfileextension": MatchVariableUrlFileExtension, + "urlfilename": MatchVariableUrlFileName, + "urlpath": MatchVariableUrlPath, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MatchVariable(input) + return &out, nil +} + +type Operator string + +const ( + OperatorEqual Operator = "Equal" +) + +func PossibleValuesForOperator() []string { + return []string{ + string(OperatorEqual), + } +} + +func (s *Operator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperator(input string) (*Operator, error) { + vals := map[string]Operator{ + "equal": OperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Operator(input) + return &out, nil +} + +type ParamIndicator string + +const ( + ParamIndicatorExpires ParamIndicator = "Expires" + ParamIndicatorKeyId ParamIndicator = "KeyId" + ParamIndicatorSignature ParamIndicator = "Signature" +) + +func PossibleValuesForParamIndicator() []string { + return []string{ + string(ParamIndicatorExpires), + string(ParamIndicatorKeyId), + string(ParamIndicatorSignature), + } +} + +func (s *ParamIndicator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseParamIndicator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseParamIndicator(input string) (*ParamIndicator, error) { + vals := map[string]ParamIndicator{ + "expires": ParamIndicatorExpires, + "keyid": ParamIndicatorKeyId, + "signature": ParamIndicatorSignature, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ParamIndicator(input) + return &out, nil +} + +type PostArgsOperator string + +const ( + PostArgsOperatorAny PostArgsOperator = "Any" + PostArgsOperatorBeginsWith PostArgsOperator = "BeginsWith" + PostArgsOperatorContains PostArgsOperator = "Contains" + PostArgsOperatorEndsWith PostArgsOperator = "EndsWith" + PostArgsOperatorEqual PostArgsOperator = "Equal" + PostArgsOperatorGreaterThan PostArgsOperator = "GreaterThan" + PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual" + PostArgsOperatorLessThan PostArgsOperator = "LessThan" + PostArgsOperatorLessThanOrEqual PostArgsOperator = "LessThanOrEqual" + PostArgsOperatorRegEx PostArgsOperator = "RegEx" +) + +func PossibleValuesForPostArgsOperator() []string { + return []string{ + string(PostArgsOperatorAny), + string(PostArgsOperatorBeginsWith), + string(PostArgsOperatorContains), + string(PostArgsOperatorEndsWith), + string(PostArgsOperatorEqual), + string(PostArgsOperatorGreaterThan), + string(PostArgsOperatorGreaterThanOrEqual), + string(PostArgsOperatorLessThan), + string(PostArgsOperatorLessThanOrEqual), + string(PostArgsOperatorRegEx), + } +} + +func (s *PostArgsOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePostArgsOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePostArgsOperator(input string) (*PostArgsOperator, error) { + vals := map[string]PostArgsOperator{ + "any": PostArgsOperatorAny, + "beginswith": PostArgsOperatorBeginsWith, + "contains": PostArgsOperatorContains, + "endswith": PostArgsOperatorEndsWith, + "equal": PostArgsOperatorEqual, + "greaterthan": PostArgsOperatorGreaterThan, + "greaterthanorequal": PostArgsOperatorGreaterThanOrEqual, + "lessthan": PostArgsOperatorLessThan, + "lessthanorequal": PostArgsOperatorLessThanOrEqual, + "regex": PostArgsOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PostArgsOperator(input) + return &out, nil +} + +type QueryStringBehavior string + +const ( + QueryStringBehaviorExclude QueryStringBehavior = "Exclude" + QueryStringBehaviorExcludeAll QueryStringBehavior = "ExcludeAll" + QueryStringBehaviorInclude QueryStringBehavior = "Include" + QueryStringBehaviorIncludeAll QueryStringBehavior = "IncludeAll" +) + +func PossibleValuesForQueryStringBehavior() []string { + return []string{ + string(QueryStringBehaviorExclude), + string(QueryStringBehaviorExcludeAll), + string(QueryStringBehaviorInclude), + string(QueryStringBehaviorIncludeAll), + } +} + +func (s *QueryStringBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryStringBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryStringBehavior(input string) (*QueryStringBehavior, error) { + vals := map[string]QueryStringBehavior{ + "exclude": QueryStringBehaviorExclude, + "excludeall": QueryStringBehaviorExcludeAll, + "include": QueryStringBehaviorInclude, + "includeall": QueryStringBehaviorIncludeAll, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryStringBehavior(input) + return &out, nil +} + +type QueryStringOperator string + +const ( + QueryStringOperatorAny QueryStringOperator = "Any" + QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith" + QueryStringOperatorContains QueryStringOperator = "Contains" + QueryStringOperatorEndsWith QueryStringOperator = "EndsWith" + QueryStringOperatorEqual QueryStringOperator = "Equal" + QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan" + QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual" + QueryStringOperatorLessThan QueryStringOperator = "LessThan" + QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual" + QueryStringOperatorRegEx QueryStringOperator = "RegEx" +) + +func PossibleValuesForQueryStringOperator() []string { + return []string{ + string(QueryStringOperatorAny), + string(QueryStringOperatorBeginsWith), + string(QueryStringOperatorContains), + string(QueryStringOperatorEndsWith), + string(QueryStringOperatorEqual), + string(QueryStringOperatorGreaterThan), + string(QueryStringOperatorGreaterThanOrEqual), + string(QueryStringOperatorLessThan), + string(QueryStringOperatorLessThanOrEqual), + string(QueryStringOperatorRegEx), + } +} + +func (s *QueryStringOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseQueryStringOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseQueryStringOperator(input string) (*QueryStringOperator, error) { + vals := map[string]QueryStringOperator{ + "any": QueryStringOperatorAny, + "beginswith": QueryStringOperatorBeginsWith, + "contains": QueryStringOperatorContains, + "endswith": QueryStringOperatorEndsWith, + "equal": QueryStringOperatorEqual, + "greaterthan": QueryStringOperatorGreaterThan, + "greaterthanorequal": QueryStringOperatorGreaterThanOrEqual, + "lessthan": QueryStringOperatorLessThan, + "lessthanorequal": QueryStringOperatorLessThanOrEqual, + "regex": QueryStringOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := QueryStringOperator(input) + return &out, nil +} + +type RedirectType string + +const ( + RedirectTypeFound RedirectType = "Found" + RedirectTypeMoved RedirectType = "Moved" + RedirectTypePermanentRedirect RedirectType = "PermanentRedirect" + RedirectTypeTemporaryRedirect RedirectType = "TemporaryRedirect" +) + +func PossibleValuesForRedirectType() []string { + return []string{ + string(RedirectTypeFound), + string(RedirectTypeMoved), + string(RedirectTypePermanentRedirect), + string(RedirectTypeTemporaryRedirect), + } +} + +func (s *RedirectType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRedirectType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRedirectType(input string) (*RedirectType, error) { + vals := map[string]RedirectType{ + "found": RedirectTypeFound, + "moved": RedirectTypeMoved, + "permanentredirect": RedirectTypePermanentRedirect, + "temporaryredirect": RedirectTypeTemporaryRedirect, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RedirectType(input) + return &out, nil +} + +type RemoteAddressOperator string + +const ( + RemoteAddressOperatorAny RemoteAddressOperator = "Any" + RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch" + RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch" +) + +func PossibleValuesForRemoteAddressOperator() []string { + return []string{ + string(RemoteAddressOperatorAny), + string(RemoteAddressOperatorGeoMatch), + string(RemoteAddressOperatorIPMatch), + } +} + +func (s *RemoteAddressOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRemoteAddressOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRemoteAddressOperator(input string) (*RemoteAddressOperator, error) { + vals := map[string]RemoteAddressOperator{ + "any": RemoteAddressOperatorAny, + "geomatch": RemoteAddressOperatorGeoMatch, + "ipmatch": RemoteAddressOperatorIPMatch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RemoteAddressOperator(input) + return &out, nil +} + +type RequestBodyOperator string + +const ( + RequestBodyOperatorAny RequestBodyOperator = "Any" + RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith" + RequestBodyOperatorContains RequestBodyOperator = "Contains" + RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith" + RequestBodyOperatorEqual RequestBodyOperator = "Equal" + RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan" + RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual" + RequestBodyOperatorLessThan RequestBodyOperator = "LessThan" + RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual" + RequestBodyOperatorRegEx RequestBodyOperator = "RegEx" +) + +func PossibleValuesForRequestBodyOperator() []string { + return []string{ + string(RequestBodyOperatorAny), + string(RequestBodyOperatorBeginsWith), + string(RequestBodyOperatorContains), + string(RequestBodyOperatorEndsWith), + string(RequestBodyOperatorEqual), + string(RequestBodyOperatorGreaterThan), + string(RequestBodyOperatorGreaterThanOrEqual), + string(RequestBodyOperatorLessThan), + string(RequestBodyOperatorLessThanOrEqual), + string(RequestBodyOperatorRegEx), + } +} + +func (s *RequestBodyOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestBodyOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestBodyOperator(input string) (*RequestBodyOperator, error) { + vals := map[string]RequestBodyOperator{ + "any": RequestBodyOperatorAny, + "beginswith": RequestBodyOperatorBeginsWith, + "contains": RequestBodyOperatorContains, + "endswith": RequestBodyOperatorEndsWith, + "equal": RequestBodyOperatorEqual, + "greaterthan": RequestBodyOperatorGreaterThan, + "greaterthanorequal": RequestBodyOperatorGreaterThanOrEqual, + "lessthan": RequestBodyOperatorLessThan, + "lessthanorequal": RequestBodyOperatorLessThanOrEqual, + "regex": RequestBodyOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestBodyOperator(input) + return &out, nil +} + +type RequestHeaderOperator string + +const ( + RequestHeaderOperatorAny RequestHeaderOperator = "Any" + RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith" + RequestHeaderOperatorContains RequestHeaderOperator = "Contains" + RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith" + RequestHeaderOperatorEqual RequestHeaderOperator = "Equal" + RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan" + RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual" + RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan" + RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual" + RequestHeaderOperatorRegEx RequestHeaderOperator = "RegEx" +) + +func PossibleValuesForRequestHeaderOperator() []string { + return []string{ + string(RequestHeaderOperatorAny), + string(RequestHeaderOperatorBeginsWith), + string(RequestHeaderOperatorContains), + string(RequestHeaderOperatorEndsWith), + string(RequestHeaderOperatorEqual), + string(RequestHeaderOperatorGreaterThan), + string(RequestHeaderOperatorGreaterThanOrEqual), + string(RequestHeaderOperatorLessThan), + string(RequestHeaderOperatorLessThanOrEqual), + string(RequestHeaderOperatorRegEx), + } +} + +func (s *RequestHeaderOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestHeaderOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestHeaderOperator(input string) (*RequestHeaderOperator, error) { + vals := map[string]RequestHeaderOperator{ + "any": RequestHeaderOperatorAny, + "beginswith": RequestHeaderOperatorBeginsWith, + "contains": RequestHeaderOperatorContains, + "endswith": RequestHeaderOperatorEndsWith, + "equal": RequestHeaderOperatorEqual, + "greaterthan": RequestHeaderOperatorGreaterThan, + "greaterthanorequal": RequestHeaderOperatorGreaterThanOrEqual, + "lessthan": RequestHeaderOperatorLessThan, + "lessthanorequal": RequestHeaderOperatorLessThanOrEqual, + "regex": RequestHeaderOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestHeaderOperator(input) + return &out, nil +} + +type RequestMethodMatchValue string + +const ( + RequestMethodMatchValueDELETE RequestMethodMatchValue = "DELETE" + RequestMethodMatchValueGET RequestMethodMatchValue = "GET" + RequestMethodMatchValueHEAD RequestMethodMatchValue = "HEAD" + RequestMethodMatchValueOPTIONS RequestMethodMatchValue = "OPTIONS" + RequestMethodMatchValuePOST RequestMethodMatchValue = "POST" + RequestMethodMatchValuePUT RequestMethodMatchValue = "PUT" + RequestMethodMatchValueTRACE RequestMethodMatchValue = "TRACE" +) + +func PossibleValuesForRequestMethodMatchValue() []string { + return []string{ + string(RequestMethodMatchValueDELETE), + string(RequestMethodMatchValueGET), + string(RequestMethodMatchValueHEAD), + string(RequestMethodMatchValueOPTIONS), + string(RequestMethodMatchValuePOST), + string(RequestMethodMatchValuePUT), + string(RequestMethodMatchValueTRACE), + } +} + +func (s *RequestMethodMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestMethodMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestMethodMatchValue(input string) (*RequestMethodMatchValue, error) { + vals := map[string]RequestMethodMatchValue{ + "delete": RequestMethodMatchValueDELETE, + "get": RequestMethodMatchValueGET, + "head": RequestMethodMatchValueHEAD, + "options": RequestMethodMatchValueOPTIONS, + "post": RequestMethodMatchValuePOST, + "put": RequestMethodMatchValuePUT, + "trace": RequestMethodMatchValueTRACE, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestMethodMatchValue(input) + return &out, nil +} + +type RequestMethodOperator string + +const ( + RequestMethodOperatorEqual RequestMethodOperator = "Equal" +) + +func PossibleValuesForRequestMethodOperator() []string { + return []string{ + string(RequestMethodOperatorEqual), + } +} + +func (s *RequestMethodOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestMethodOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestMethodOperator(input string) (*RequestMethodOperator, error) { + vals := map[string]RequestMethodOperator{ + "equal": RequestMethodOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestMethodOperator(input) + return &out, nil +} + +type RequestSchemeMatchValue string + +const ( + RequestSchemeMatchValueHTTP RequestSchemeMatchValue = "HTTP" + RequestSchemeMatchValueHTTPS RequestSchemeMatchValue = "HTTPS" +) + +func PossibleValuesForRequestSchemeMatchValue() []string { + return []string{ + string(RequestSchemeMatchValueHTTP), + string(RequestSchemeMatchValueHTTPS), + } +} + +func (s *RequestSchemeMatchValue) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestSchemeMatchValue(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestSchemeMatchValue(input string) (*RequestSchemeMatchValue, error) { + vals := map[string]RequestSchemeMatchValue{ + "http": RequestSchemeMatchValueHTTP, + "https": RequestSchemeMatchValueHTTPS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestSchemeMatchValue(input) + return &out, nil +} + +type RequestUriOperator string + +const ( + RequestUriOperatorAny RequestUriOperator = "Any" + RequestUriOperatorBeginsWith RequestUriOperator = "BeginsWith" + RequestUriOperatorContains RequestUriOperator = "Contains" + RequestUriOperatorEndsWith RequestUriOperator = "EndsWith" + RequestUriOperatorEqual RequestUriOperator = "Equal" + RequestUriOperatorGreaterThan RequestUriOperator = "GreaterThan" + RequestUriOperatorGreaterThanOrEqual RequestUriOperator = "GreaterThanOrEqual" + RequestUriOperatorLessThan RequestUriOperator = "LessThan" + RequestUriOperatorLessThanOrEqual RequestUriOperator = "LessThanOrEqual" + RequestUriOperatorRegEx RequestUriOperator = "RegEx" +) + +func PossibleValuesForRequestUriOperator() []string { + return []string{ + string(RequestUriOperatorAny), + string(RequestUriOperatorBeginsWith), + string(RequestUriOperatorContains), + string(RequestUriOperatorEndsWith), + string(RequestUriOperatorEqual), + string(RequestUriOperatorGreaterThan), + string(RequestUriOperatorGreaterThanOrEqual), + string(RequestUriOperatorLessThan), + string(RequestUriOperatorLessThanOrEqual), + string(RequestUriOperatorRegEx), + } +} + +func (s *RequestUriOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRequestUriOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRequestUriOperator(input string) (*RequestUriOperator, error) { + vals := map[string]RequestUriOperator{ + "any": RequestUriOperatorAny, + "beginswith": RequestUriOperatorBeginsWith, + "contains": RequestUriOperatorContains, + "endswith": RequestUriOperatorEndsWith, + "equal": RequestUriOperatorEqual, + "greaterthan": RequestUriOperatorGreaterThan, + "greaterthanorequal": RequestUriOperatorGreaterThanOrEqual, + "lessthan": RequestUriOperatorLessThan, + "lessthanorequal": RequestUriOperatorLessThanOrEqual, + "regex": RequestUriOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RequestUriOperator(input) + return &out, nil +} + +type RuleCacheBehavior string + +const ( + RuleCacheBehaviorHonorOrigin RuleCacheBehavior = "HonorOrigin" + RuleCacheBehaviorOverrideAlways RuleCacheBehavior = "OverrideAlways" + RuleCacheBehaviorOverrideIfOriginMissing RuleCacheBehavior = "OverrideIfOriginMissing" +) + +func PossibleValuesForRuleCacheBehavior() []string { + return []string{ + string(RuleCacheBehaviorHonorOrigin), + string(RuleCacheBehaviorOverrideAlways), + string(RuleCacheBehaviorOverrideIfOriginMissing), + } +} + +func (s *RuleCacheBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleCacheBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleCacheBehavior(input string) (*RuleCacheBehavior, error) { + vals := map[string]RuleCacheBehavior{ + "honororigin": RuleCacheBehaviorHonorOrigin, + "overridealways": RuleCacheBehaviorOverrideAlways, + "overrideiforiginmissing": RuleCacheBehaviorOverrideIfOriginMissing, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleCacheBehavior(input) + return &out, nil +} + +type RuleIsCompressionEnabled string + +const ( + RuleIsCompressionEnabledDisabled RuleIsCompressionEnabled = "Disabled" + RuleIsCompressionEnabledEnabled RuleIsCompressionEnabled = "Enabled" +) + +func PossibleValuesForRuleIsCompressionEnabled() []string { + return []string{ + string(RuleIsCompressionEnabledDisabled), + string(RuleIsCompressionEnabledEnabled), + } +} + +func (s *RuleIsCompressionEnabled) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleIsCompressionEnabled(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleIsCompressionEnabled(input string) (*RuleIsCompressionEnabled, error) { + vals := map[string]RuleIsCompressionEnabled{ + "disabled": RuleIsCompressionEnabledDisabled, + "enabled": RuleIsCompressionEnabledEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleIsCompressionEnabled(input) + return &out, nil +} + +type RuleQueryStringCachingBehavior string + +const ( + RuleQueryStringCachingBehaviorIgnoreQueryString RuleQueryStringCachingBehavior = "IgnoreQueryString" + RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorUseQueryString RuleQueryStringCachingBehavior = "UseQueryString" +) + +func PossibleValuesForRuleQueryStringCachingBehavior() []string { + return []string{ + string(RuleQueryStringCachingBehaviorIgnoreQueryString), + string(RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings), + string(RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings), + string(RuleQueryStringCachingBehaviorUseQueryString), + } +} + +func (s *RuleQueryStringCachingBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRuleQueryStringCachingBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRuleQueryStringCachingBehavior(input string) (*RuleQueryStringCachingBehavior, error) { + vals := map[string]RuleQueryStringCachingBehavior{ + "ignorequerystring": RuleQueryStringCachingBehaviorIgnoreQueryString, + "ignorespecifiedquerystrings": RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, + "usequerystring": RuleQueryStringCachingBehaviorUseQueryString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RuleQueryStringCachingBehavior(input) + return &out, nil +} + +type ServerPortOperator string + +const ( + ServerPortOperatorAny ServerPortOperator = "Any" + ServerPortOperatorBeginsWith ServerPortOperator = "BeginsWith" + ServerPortOperatorContains ServerPortOperator = "Contains" + ServerPortOperatorEndsWith ServerPortOperator = "EndsWith" + ServerPortOperatorEqual ServerPortOperator = "Equal" + ServerPortOperatorGreaterThan ServerPortOperator = "GreaterThan" + ServerPortOperatorGreaterThanOrEqual ServerPortOperator = "GreaterThanOrEqual" + ServerPortOperatorLessThan ServerPortOperator = "LessThan" + ServerPortOperatorLessThanOrEqual ServerPortOperator = "LessThanOrEqual" + ServerPortOperatorRegEx ServerPortOperator = "RegEx" +) + +func PossibleValuesForServerPortOperator() []string { + return []string{ + string(ServerPortOperatorAny), + string(ServerPortOperatorBeginsWith), + string(ServerPortOperatorContains), + string(ServerPortOperatorEndsWith), + string(ServerPortOperatorEqual), + string(ServerPortOperatorGreaterThan), + string(ServerPortOperatorGreaterThanOrEqual), + string(ServerPortOperatorLessThan), + string(ServerPortOperatorLessThanOrEqual), + string(ServerPortOperatorRegEx), + } +} + +func (s *ServerPortOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerPortOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerPortOperator(input string) (*ServerPortOperator, error) { + vals := map[string]ServerPortOperator{ + "any": ServerPortOperatorAny, + "beginswith": ServerPortOperatorBeginsWith, + "contains": ServerPortOperatorContains, + "endswith": ServerPortOperatorEndsWith, + "equal": ServerPortOperatorEqual, + "greaterthan": ServerPortOperatorGreaterThan, + "greaterthanorequal": ServerPortOperatorGreaterThanOrEqual, + "lessthan": ServerPortOperatorLessThan, + "lessthanorequal": ServerPortOperatorLessThanOrEqual, + "regex": ServerPortOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerPortOperator(input) + return &out, nil +} + +type SocketAddrOperator string + +const ( + SocketAddrOperatorAny SocketAddrOperator = "Any" + SocketAddrOperatorIPMatch SocketAddrOperator = "IPMatch" +) + +func PossibleValuesForSocketAddrOperator() []string { + return []string{ + string(SocketAddrOperatorAny), + string(SocketAddrOperatorIPMatch), + } +} + +func (s *SocketAddrOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSocketAddrOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSocketAddrOperator(input string) (*SocketAddrOperator, error) { + vals := map[string]SocketAddrOperator{ + "any": SocketAddrOperatorAny, + "ipmatch": SocketAddrOperatorIPMatch, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SocketAddrOperator(input) + return &out, nil +} + +type SslProtocol string + +const ( + SslProtocolTLSvOne SslProtocol = "TLSv1" + SslProtocolTLSvOnePointOne SslProtocol = "TLSv1.1" + SslProtocolTLSvOnePointTwo SslProtocol = "TLSv1.2" +) + +func PossibleValuesForSslProtocol() []string { + return []string{ + string(SslProtocolTLSvOne), + string(SslProtocolTLSvOnePointOne), + string(SslProtocolTLSvOnePointTwo), + } +} + +func (s *SslProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslProtocol(input string) (*SslProtocol, error) { + vals := map[string]SslProtocol{ + "tlsv1": SslProtocolTLSvOne, + "tlsv1.1": SslProtocolTLSvOnePointOne, + "tlsv1.2": SslProtocolTLSvOnePointTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslProtocol(input) + return &out, nil +} + +type SslProtocolOperator string + +const ( + SslProtocolOperatorEqual SslProtocolOperator = "Equal" +) + +func PossibleValuesForSslProtocolOperator() []string { + return []string{ + string(SslProtocolOperatorEqual), + } +} + +func (s *SslProtocolOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSslProtocolOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSslProtocolOperator(input string) (*SslProtocolOperator, error) { + vals := map[string]SslProtocolOperator{ + "equal": SslProtocolOperatorEqual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SslProtocolOperator(input) + return &out, nil +} + +type Transform string + +const ( + TransformLowercase Transform = "Lowercase" + TransformRemoveNulls Transform = "RemoveNulls" + TransformTrim Transform = "Trim" + TransformUppercase Transform = "Uppercase" + TransformUrlDecode Transform = "UrlDecode" + TransformUrlEncode Transform = "UrlEncode" +) + +func PossibleValuesForTransform() []string { + return []string{ + string(TransformLowercase), + string(TransformRemoveNulls), + string(TransformTrim), + string(TransformUppercase), + string(TransformUrlDecode), + string(TransformUrlEncode), + } +} + +func (s *Transform) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTransform(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTransform(input string) (*Transform, error) { + vals := map[string]Transform{ + "lowercase": TransformLowercase, + "removenulls": TransformRemoveNulls, + "trim": TransformTrim, + "uppercase": TransformUppercase, + "urldecode": TransformUrlDecode, + "urlencode": TransformUrlEncode, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Transform(input) + return &out, nil +} + +type UrlFileExtensionOperator string + +const ( + UrlFileExtensionOperatorAny UrlFileExtensionOperator = "Any" + UrlFileExtensionOperatorBeginsWith UrlFileExtensionOperator = "BeginsWith" + UrlFileExtensionOperatorContains UrlFileExtensionOperator = "Contains" + UrlFileExtensionOperatorEndsWith UrlFileExtensionOperator = "EndsWith" + UrlFileExtensionOperatorEqual UrlFileExtensionOperator = "Equal" + UrlFileExtensionOperatorGreaterThan UrlFileExtensionOperator = "GreaterThan" + UrlFileExtensionOperatorGreaterThanOrEqual UrlFileExtensionOperator = "GreaterThanOrEqual" + UrlFileExtensionOperatorLessThan UrlFileExtensionOperator = "LessThan" + UrlFileExtensionOperatorLessThanOrEqual UrlFileExtensionOperator = "LessThanOrEqual" + UrlFileExtensionOperatorRegEx UrlFileExtensionOperator = "RegEx" +) + +func PossibleValuesForUrlFileExtensionOperator() []string { + return []string{ + string(UrlFileExtensionOperatorAny), + string(UrlFileExtensionOperatorBeginsWith), + string(UrlFileExtensionOperatorContains), + string(UrlFileExtensionOperatorEndsWith), + string(UrlFileExtensionOperatorEqual), + string(UrlFileExtensionOperatorGreaterThan), + string(UrlFileExtensionOperatorGreaterThanOrEqual), + string(UrlFileExtensionOperatorLessThan), + string(UrlFileExtensionOperatorLessThanOrEqual), + string(UrlFileExtensionOperatorRegEx), + } +} + +func (s *UrlFileExtensionOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlFileExtensionOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlFileExtensionOperator(input string) (*UrlFileExtensionOperator, error) { + vals := map[string]UrlFileExtensionOperator{ + "any": UrlFileExtensionOperatorAny, + "beginswith": UrlFileExtensionOperatorBeginsWith, + "contains": UrlFileExtensionOperatorContains, + "endswith": UrlFileExtensionOperatorEndsWith, + "equal": UrlFileExtensionOperatorEqual, + "greaterthan": UrlFileExtensionOperatorGreaterThan, + "greaterthanorequal": UrlFileExtensionOperatorGreaterThanOrEqual, + "lessthan": UrlFileExtensionOperatorLessThan, + "lessthanorequal": UrlFileExtensionOperatorLessThanOrEqual, + "regex": UrlFileExtensionOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlFileExtensionOperator(input) + return &out, nil +} + +type UrlFileNameOperator string + +const ( + UrlFileNameOperatorAny UrlFileNameOperator = "Any" + UrlFileNameOperatorBeginsWith UrlFileNameOperator = "BeginsWith" + UrlFileNameOperatorContains UrlFileNameOperator = "Contains" + UrlFileNameOperatorEndsWith UrlFileNameOperator = "EndsWith" + UrlFileNameOperatorEqual UrlFileNameOperator = "Equal" + UrlFileNameOperatorGreaterThan UrlFileNameOperator = "GreaterThan" + UrlFileNameOperatorGreaterThanOrEqual UrlFileNameOperator = "GreaterThanOrEqual" + UrlFileNameOperatorLessThan UrlFileNameOperator = "LessThan" + UrlFileNameOperatorLessThanOrEqual UrlFileNameOperator = "LessThanOrEqual" + UrlFileNameOperatorRegEx UrlFileNameOperator = "RegEx" +) + +func PossibleValuesForUrlFileNameOperator() []string { + return []string{ + string(UrlFileNameOperatorAny), + string(UrlFileNameOperatorBeginsWith), + string(UrlFileNameOperatorContains), + string(UrlFileNameOperatorEndsWith), + string(UrlFileNameOperatorEqual), + string(UrlFileNameOperatorGreaterThan), + string(UrlFileNameOperatorGreaterThanOrEqual), + string(UrlFileNameOperatorLessThan), + string(UrlFileNameOperatorLessThanOrEqual), + string(UrlFileNameOperatorRegEx), + } +} + +func (s *UrlFileNameOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlFileNameOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlFileNameOperator(input string) (*UrlFileNameOperator, error) { + vals := map[string]UrlFileNameOperator{ + "any": UrlFileNameOperatorAny, + "beginswith": UrlFileNameOperatorBeginsWith, + "contains": UrlFileNameOperatorContains, + "endswith": UrlFileNameOperatorEndsWith, + "equal": UrlFileNameOperatorEqual, + "greaterthan": UrlFileNameOperatorGreaterThan, + "greaterthanorequal": UrlFileNameOperatorGreaterThanOrEqual, + "lessthan": UrlFileNameOperatorLessThan, + "lessthanorequal": UrlFileNameOperatorLessThanOrEqual, + "regex": UrlFileNameOperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlFileNameOperator(input) + return &out, nil +} + +type UrlPathOperator string + +const ( + UrlPathOperatorAny UrlPathOperator = "Any" + UrlPathOperatorBeginsWith UrlPathOperator = "BeginsWith" + UrlPathOperatorContains UrlPathOperator = "Contains" + UrlPathOperatorEndsWith UrlPathOperator = "EndsWith" + UrlPathOperatorEqual UrlPathOperator = "Equal" + UrlPathOperatorGreaterThan UrlPathOperator = "GreaterThan" + UrlPathOperatorGreaterThanOrEqual UrlPathOperator = "GreaterThanOrEqual" + UrlPathOperatorLessThan UrlPathOperator = "LessThan" + UrlPathOperatorLessThanOrEqual UrlPathOperator = "LessThanOrEqual" + UrlPathOperatorRegEx UrlPathOperator = "RegEx" + UrlPathOperatorWildcard UrlPathOperator = "Wildcard" +) + +func PossibleValuesForUrlPathOperator() []string { + return []string{ + string(UrlPathOperatorAny), + string(UrlPathOperatorBeginsWith), + string(UrlPathOperatorContains), + string(UrlPathOperatorEndsWith), + string(UrlPathOperatorEqual), + string(UrlPathOperatorGreaterThan), + string(UrlPathOperatorGreaterThanOrEqual), + string(UrlPathOperatorLessThan), + string(UrlPathOperatorLessThanOrEqual), + string(UrlPathOperatorRegEx), + string(UrlPathOperatorWildcard), + } +} + +func (s *UrlPathOperator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUrlPathOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUrlPathOperator(input string) (*UrlPathOperator, error) { + vals := map[string]UrlPathOperator{ + "any": UrlPathOperatorAny, + "beginswith": UrlPathOperatorBeginsWith, + "contains": UrlPathOperatorContains, + "endswith": UrlPathOperatorEndsWith, + "equal": UrlPathOperatorEqual, + "greaterthan": UrlPathOperatorGreaterThan, + "greaterthanorequal": UrlPathOperatorGreaterThanOrEqual, + "lessthan": UrlPathOperatorLessThan, + "lessthanorequal": UrlPathOperatorLessThanOrEqual, + "regex": UrlPathOperatorRegEx, + "wildcard": UrlPathOperatorWildcard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UrlPathOperator(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/id_rule.go b/resource-manager/cdn/2024-02-01/rules/id_rule.go new file mode 100644 index 00000000000..8ba0c8e4e0f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/id_rule.go @@ -0,0 +1,148 @@ +package rules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RuleId{}) +} + +var _ resourceids.ResourceId = &RuleId{} + +// RuleId is a struct representing the Resource ID for a Rule +type RuleId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + RuleSetName string + RuleName string +} + +// NewRuleID returns a new RuleId struct +func NewRuleID(subscriptionId string, resourceGroupName string, profileName string, ruleSetName string, ruleName string) RuleId { + return RuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + RuleSetName: ruleSetName, + RuleName: ruleName, + } +} + +// ParseRuleID parses 'input' into a RuleId +func ParseRuleID(input string) (*RuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRuleIDInsensitively parses 'input' case-insensitively into a RuleId +// note: this method should only be used for API response data and not user input +func ParseRuleIDInsensitively(input string) (*RuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.RuleSetName, ok = input.Parsed["ruleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleSetName", input) + } + + if id.RuleName, ok = input.Parsed["ruleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleName", input) + } + + return nil +} + +// ValidateRuleID checks that 'input' can be parsed as a Rule ID +func ValidateRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Rule ID +func (id RuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/ruleSets/%s/rules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.RuleSetName, id.RuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Rule ID +func (id RuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticRuleSets", "ruleSets", "ruleSets"), + resourceids.UserSpecifiedSegment("ruleSetName", "ruleSetValue"), + resourceids.StaticSegment("staticRules", "rules", "rules"), + resourceids.UserSpecifiedSegment("ruleName", "ruleValue"), + } +} + +// String returns a human-readable description of this Rule ID +func (id RuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Rule Set Name: %q", id.RuleSetName), + fmt.Sprintf("Rule Name: %q", id.RuleName), + } + return fmt.Sprintf("Rule (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/rules/id_rule_test.go b/resource-manager/cdn/2024-02-01/rules/id_rule_test.go new file mode 100644 index 00000000000..1ae5c7da749 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/id_rule_test.go @@ -0,0 +1,372 @@ +package rules + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RuleId{} + +func TestNewRuleID(t *testing.T) { + id := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.RuleSetName != "ruleSetValue" { + t.Fatalf("Expected %q but got %q for Segment 'RuleSetName'", id.RuleSetName, "ruleSetValue") + } + + if id.RuleName != "ruleValue" { + t.Fatalf("Expected %q but got %q for Segment 'RuleName'", id.RuleName, "ruleValue") + } +} + +func TestFormatRuleID(t *testing.T) { + actual := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue", "ruleValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules/ruleValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRuleID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules/ruleValue", + Expected: &RuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + RuleName: "ruleValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules/ruleValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + if actual.RuleName != v.Expected.RuleName { + t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) + } + + } +} + +func TestParseRuleIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE/rUlEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules/ruleValue", + Expected: &RuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + RuleName: "ruleValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/rules/ruleValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE/rUlEs/rUlEvAlUe", + Expected: &RuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + RuleSetName: "rUlEsEtVaLuE", + RuleName: "rUlEvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE/rUlEs/rUlEvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + if actual.RuleName != v.Expected.RuleName { + t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) + } + + } +} + +func TestSegmentsForRuleId(t *testing.T) { + segments := RuleId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RuleId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/rules/id_ruleset.go b/resource-manager/cdn/2024-02-01/rules/id_ruleset.go new file mode 100644 index 00000000000..8ab0f9ee781 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/id_ruleset.go @@ -0,0 +1,139 @@ +package rules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RuleSetId{}) +} + +var _ resourceids.ResourceId = &RuleSetId{} + +// RuleSetId is a struct representing the Resource ID for a Rule Set +type RuleSetId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + RuleSetName string +} + +// NewRuleSetID returns a new RuleSetId struct +func NewRuleSetID(subscriptionId string, resourceGroupName string, profileName string, ruleSetName string) RuleSetId { + return RuleSetId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + RuleSetName: ruleSetName, + } +} + +// ParseRuleSetID parses 'input' into a RuleSetId +func ParseRuleSetID(input string) (*RuleSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleSetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleSetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRuleSetIDInsensitively parses 'input' case-insensitively into a RuleSetId +// note: this method should only be used for API response data and not user input +func ParseRuleSetIDInsensitively(input string) (*RuleSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleSetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleSetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RuleSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.RuleSetName, ok = input.Parsed["ruleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleSetName", input) + } + + return nil +} + +// ValidateRuleSetID checks that 'input' can be parsed as a Rule Set ID +func ValidateRuleSetID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRuleSetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Rule Set ID +func (id RuleSetId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/ruleSets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.RuleSetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Rule Set ID +func (id RuleSetId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticRuleSets", "ruleSets", "ruleSets"), + resourceids.UserSpecifiedSegment("ruleSetName", "ruleSetValue"), + } +} + +// String returns a human-readable description of this Rule Set ID +func (id RuleSetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Rule Set Name: %q", id.RuleSetName), + } + return fmt.Sprintf("Rule Set (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/rules/id_ruleset_test.go b/resource-manager/cdn/2024-02-01/rules/id_ruleset_test.go new file mode 100644 index 00000000000..5310f397871 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/id_ruleset_test.go @@ -0,0 +1,327 @@ +package rules + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RuleSetId{} + +func TestNewRuleSetID(t *testing.T) { + id := NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.RuleSetName != "ruleSetValue" { + t.Fatalf("Expected %q but got %q for Segment 'RuleSetName'", id.RuleSetName, "ruleSetValue") + } +} + +func TestFormatRuleSetID(t *testing.T) { + actual := NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRuleSetID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleSetId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleSetID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + } +} + +func TestParseRuleSetIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleSetId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + RuleSetName: "rUlEsEtVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleSetIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + } +} + +func TestSegmentsForRuleSetId(t *testing.T) { + segments := RuleSetId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RuleSetId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/rules/method_create.go b/resource-manager/cdn/2024-02-01/rules/method_create.go new file mode 100644 index 00000000000..84a6f02dc5e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/method_create.go @@ -0,0 +1,76 @@ +package rules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Rule +} + +// Create ... +func (c RulesClient) Create(ctx context.Context, id RuleId, input Rule) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c RulesClient) CreateThenPoll(ctx context.Context, id RuleId, input Rule) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/method_delete.go b/resource-manager/cdn/2024-02-01/rules/method_delete.go new file mode 100644 index 00000000000..beb0bc70b2e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/method_delete.go @@ -0,0 +1,71 @@ +package rules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c RulesClient) Delete(ctx context.Context, id RuleId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c RulesClient) DeleteThenPoll(ctx context.Context, id RuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/method_get.go b/resource-manager/cdn/2024-02-01/rules/method_get.go new file mode 100644 index 00000000000..fb626b44bac --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/method_get.go @@ -0,0 +1,53 @@ +package rules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Rule +} + +// Get ... +func (c RulesClient) Get(ctx context.Context, id RuleId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Rule + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/rules/method_listbyruleset.go b/resource-manager/cdn/2024-02-01/rules/method_listbyruleset.go new file mode 100644 index 00000000000..45074b4d014 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/method_listbyruleset.go @@ -0,0 +1,105 @@ +package rules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByRuleSetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Rule +} + +type ListByRuleSetCompleteResult struct { + LatestHttpResponse *http.Response + Items []Rule +} + +type ListByRuleSetCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByRuleSetCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByRuleSet ... +func (c RulesClient) ListByRuleSet(ctx context.Context, id RuleSetId) (result ListByRuleSetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByRuleSetCustomPager{}, + Path: fmt.Sprintf("%s/rules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Rule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByRuleSetComplete retrieves all the results into a single object +func (c RulesClient) ListByRuleSetComplete(ctx context.Context, id RuleSetId) (ListByRuleSetCompleteResult, error) { + return c.ListByRuleSetCompleteMatchingPredicate(ctx, id, RuleOperationPredicate{}) +} + +// ListByRuleSetCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RulesClient) ListByRuleSetCompleteMatchingPredicate(ctx context.Context, id RuleSetId, predicate RuleOperationPredicate) (result ListByRuleSetCompleteResult, err error) { + items := make([]Rule, 0) + + resp, err := c.ListByRuleSet(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByRuleSetCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/rules/method_update.go b/resource-manager/cdn/2024-02-01/rules/method_update.go new file mode 100644 index 00000000000..1d7a1bd0f41 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/method_update.go @@ -0,0 +1,75 @@ +package rules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Rule +} + +// Update ... +func (c RulesClient) Update(ctx context.Context, id RuleId, input RuleUpdateParameters) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c RulesClient) UpdateThenPoll(ctx context.Context, id RuleId, input RuleUpdateParameters) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_cacheconfiguration.go b/resource-manager/cdn/2024-02-01/rules/model_cacheconfiguration.go new file mode 100644 index 00000000000..af68de873ac --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_cacheconfiguration.go @@ -0,0 +1,12 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CacheConfiguration struct { + CacheBehavior *RuleCacheBehavior `json:"cacheBehavior,omitempty"` + CacheDuration *string `json:"cacheDuration,omitempty"` + IsCompressionEnabled *RuleIsCompressionEnabled `json:"isCompressionEnabled,omitempty"` + QueryParameters *string `json:"queryParameters,omitempty"` + QueryStringCachingBehavior *RuleQueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_cacheexpirationactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_cacheexpirationactionparameters.go new file mode 100644 index 00000000000..77c5d8d3082 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_cacheexpirationactionparameters.go @@ -0,0 +1,52 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = CacheExpirationActionParameters{} + +type CacheExpirationActionParameters struct { + CacheBehavior CacheBehavior `json:"cacheBehavior"` + CacheDuration *string `json:"cacheDuration,omitempty"` + CacheType CacheType `json:"cacheType"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s CacheExpirationActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CacheExpirationActionParameters{} + +func (s CacheExpirationActionParameters) MarshalJSON() ([]byte, error) { + type wrapper CacheExpirationActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CacheExpirationActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CacheExpirationActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCacheExpirationActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CacheExpirationActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_cachekeyquerystringactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_cachekeyquerystringactionparameters.go new file mode 100644 index 00000000000..b552b31226e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_cachekeyquerystringactionparameters.go @@ -0,0 +1,51 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = CacheKeyQueryStringActionParameters{} + +type CacheKeyQueryStringActionParameters struct { + QueryParameters *string `json:"queryParameters,omitempty"` + QueryStringBehavior QueryStringBehavior `json:"queryStringBehavior"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s CacheKeyQueryStringActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CacheKeyQueryStringActionParameters{} + +func (s CacheKeyQueryStringActionParameters) MarshalJSON() ([]byte, error) { + type wrapper CacheKeyQueryStringActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CacheKeyQueryStringActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_clientportmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_clientportmatchconditionparameters.go new file mode 100644 index 00000000000..f989d7c0314 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_clientportmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = ClientPortMatchConditionParameters{} + +type ClientPortMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator ClientPortOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s ClientPortMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = ClientPortMatchConditionParameters{} + +func (s ClientPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper ClientPortMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ClientPortMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ClientPortMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleClientPortConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ClientPortMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_cookiesmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_cookiesmatchconditionparameters.go new file mode 100644 index 00000000000..63296e5671a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_cookiesmatchconditionparameters.go @@ -0,0 +1,54 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = CookiesMatchConditionParameters{} + +type CookiesMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator CookiesOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s CookiesMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = CookiesMatchConditionParameters{} + +func (s CookiesMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper CookiesMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CookiesMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CookiesMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleCookiesConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CookiesMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleaction.go new file mode 100644 index 00000000000..1d348aeadb3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleaction.go @@ -0,0 +1,139 @@ +package rules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleAction interface { + DeliveryRuleAction() BaseDeliveryRuleActionImpl +} + +var _ DeliveryRuleAction = BaseDeliveryRuleActionImpl{} + +type BaseDeliveryRuleActionImpl struct { + Name DeliveryRuleActionName `json:"name"` +} + +func (s BaseDeliveryRuleActionImpl) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return s +} + +var _ DeliveryRuleAction = RawDeliveryRuleActionImpl{} + +// RawDeliveryRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleActionImpl struct { + deliveryRuleAction BaseDeliveryRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleActionImpl) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return s.deliveryRuleAction +} + +func UnmarshalDeliveryRuleActionImplementation(input []byte) (DeliveryRuleAction, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleAction into map[string]interface: %+v", err) + } + + value, ok := temp["name"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "CacheExpiration") { + var out DeliveryRuleCacheExpirationAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCacheExpirationAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CacheKeyQueryString") { + var out DeliveryRuleCacheKeyQueryStringAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ModifyRequestHeader") { + var out DeliveryRuleRequestHeaderAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestHeaderAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ModifyResponseHeader") { + var out DeliveryRuleResponseHeaderAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleResponseHeaderAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RouteConfigurationOverride") { + var out DeliveryRuleRouteConfigurationOverrideAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OriginGroupOverride") { + var out OriginGroupOverrideAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OriginGroupOverrideAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlRedirect") { + var out UrlRedirectAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRedirectAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlRewrite") { + var out UrlRewriteAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRewriteAction: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlSigning") { + var out UrlSigningAction + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlSigningAction: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleActionImpl: %+v", err) + } + + return RawDeliveryRuleActionImpl{ + deliveryRuleAction: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleactionparameters.go new file mode 100644 index 00000000000..664bd770e2b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleactionparameters.go @@ -0,0 +1,131 @@ +package rules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleActionParameters interface { + DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl +} + +var _ DeliveryRuleActionParameters = BaseDeliveryRuleActionParametersImpl{} + +type BaseDeliveryRuleActionParametersImpl struct { + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s BaseDeliveryRuleActionParametersImpl) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return s +} + +var _ DeliveryRuleActionParameters = RawDeliveryRuleActionParametersImpl{} + +// RawDeliveryRuleActionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleActionParametersImpl struct { + deliveryRuleActionParameters BaseDeliveryRuleActionParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleActionParametersImpl) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return s.deliveryRuleActionParameters +} + +func UnmarshalDeliveryRuleActionParametersImplementation(input []byte) (DeliveryRuleActionParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleActionParameters into map[string]interface: %+v", err) + } + + value, ok := temp["typeName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "DeliveryRuleCacheExpirationActionParameters") { + var out CacheExpirationActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CacheExpirationActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") { + var out CacheKeyQueryStringActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CacheKeyQueryStringActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHeaderActionParameters") { + var out HeaderActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HeaderActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleOriginGroupOverrideActionParameters") { + var out OriginGroupOverrideActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OriginGroupOverrideActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRouteConfigurationOverrideActionParameters") { + var out RouteConfigurationOverrideActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RouteConfigurationOverrideActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlRedirectActionParameters") { + var out UrlRedirectActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRedirectActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlRewriteActionParameters") { + var out UrlRewriteActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlRewriteActionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlSigningActionParameters") { + var out UrlSigningActionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlSigningActionParameters: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleActionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleActionParametersImpl: %+v", err) + } + + return RawDeliveryRuleActionParametersImpl{ + deliveryRuleActionParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecacheexpirationaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecacheexpirationaction.go new file mode 100644 index 00000000000..2106d68c543 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecacheexpirationaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleCacheExpirationAction{} + +type DeliveryRuleCacheExpirationAction struct { + Parameters CacheExpirationActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleCacheExpirationAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCacheExpirationAction{} + +func (s DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCacheExpirationAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + decoded["name"] = "CacheExpiration" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCacheExpirationAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecachekeyquerystringaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecachekeyquerystringaction.go new file mode 100644 index 00000000000..db7fa3798f6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecachekeyquerystringaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleCacheKeyQueryStringAction{} + +type DeliveryRuleCacheKeyQueryStringAction struct { + Parameters CacheKeyQueryStringActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleCacheKeyQueryStringAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCacheKeyQueryStringAction{} + +func (s DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCacheKeyQueryStringAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + decoded["name"] = "CacheKeyQueryString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCacheKeyQueryStringAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleclientportcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleclientportcondition.go new file mode 100644 index 00000000000..c825b662091 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleclientportcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleClientPortCondition{} + +type DeliveryRuleClientPortCondition struct { + Parameters ClientPortMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleClientPortCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleClientPortCondition{} + +func (s DeliveryRuleClientPortCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleClientPortCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleClientPortCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleClientPortCondition: %+v", err) + } + + decoded["name"] = "ClientPort" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleClientPortCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecondition.go new file mode 100644 index 00000000000..1fbd5cbbb89 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecondition.go @@ -0,0 +1,219 @@ +package rules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleCondition interface { + DeliveryRuleCondition() BaseDeliveryRuleConditionImpl +} + +var _ DeliveryRuleCondition = BaseDeliveryRuleConditionImpl{} + +type BaseDeliveryRuleConditionImpl struct { + Name MatchVariable `json:"name"` +} + +func (s BaseDeliveryRuleConditionImpl) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return s +} + +var _ DeliveryRuleCondition = RawDeliveryRuleConditionImpl{} + +// RawDeliveryRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleConditionImpl struct { + deliveryRuleCondition BaseDeliveryRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleConditionImpl) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return s.deliveryRuleCondition +} + +func UnmarshalDeliveryRuleConditionImplementation(input []byte) (DeliveryRuleCondition, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCondition into map[string]interface: %+v", err) + } + + value, ok := temp["name"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "ClientPort") { + var out DeliveryRuleClientPortCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleClientPortCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Cookies") { + var out DeliveryRuleCookiesCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleCookiesCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpVersion") { + var out DeliveryRuleHTTPVersionCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleHTTPVersionCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HostName") { + var out DeliveryRuleHostNameCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleHostNameCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "IsDevice") { + var out DeliveryRuleIsDeviceCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleIsDeviceCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostArgs") { + var out DeliveryRulePostArgsCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRulePostArgsCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "QueryString") { + var out DeliveryRuleQueryStringCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleQueryStringCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RemoteAddress") { + var out DeliveryRuleRemoteAddressCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRemoteAddressCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestBody") { + var out DeliveryRuleRequestBodyCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestBodyCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestHeader") { + var out DeliveryRuleRequestHeaderCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestHeaderCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestMethod") { + var out DeliveryRuleRequestMethodCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestMethodCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestScheme") { + var out DeliveryRuleRequestSchemeCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestSchemeCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RequestUri") { + var out DeliveryRuleRequestUriCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleRequestUriCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServerPort") { + var out DeliveryRuleServerPortCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleServerPortCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SocketAddr") { + var out DeliveryRuleSocketAddrCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleSocketAddrCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SslProtocol") { + var out DeliveryRuleSslProtocolCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleSslProtocolCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlFileExtension") { + var out DeliveryRuleUrlFileExtensionCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlFileName") { + var out DeliveryRuleUrlFileNameCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlFileNameCondition: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlPath") { + var out DeliveryRuleUrlPathCondition + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeliveryRuleUrlPathCondition: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleConditionImpl: %+v", err) + } + + return RawDeliveryRuleConditionImpl{ + deliveryRuleCondition: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleconditionparameters.go new file mode 100644 index 00000000000..899f42a57bb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleconditionparameters.go @@ -0,0 +1,219 @@ +package rules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeliveryRuleConditionParameters interface { + DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl +} + +var _ DeliveryRuleConditionParameters = BaseDeliveryRuleConditionParametersImpl{} + +type BaseDeliveryRuleConditionParametersImpl struct { + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s BaseDeliveryRuleConditionParametersImpl) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return s +} + +var _ DeliveryRuleConditionParameters = RawDeliveryRuleConditionParametersImpl{} + +// RawDeliveryRuleConditionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDeliveryRuleConditionParametersImpl struct { + deliveryRuleConditionParameters BaseDeliveryRuleConditionParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryRuleConditionParametersImpl) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return s.deliveryRuleConditionParameters +} + +func UnmarshalDeliveryRuleConditionParametersImplementation(input []byte) (DeliveryRuleConditionParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleConditionParameters into map[string]interface: %+v", err) + } + + value, ok := temp["typeName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "DeliveryRuleClientPortConditionParameters") { + var out ClientPortMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ClientPortMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleCookiesConditionParameters") { + var out CookiesMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CookiesMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHttpVersionConditionParameters") { + var out HTTPVersionMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPVersionMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleHostNameConditionParameters") { + var out HostNameMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HostNameMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleIsDeviceConditionParameters") { + var out IsDeviceMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into IsDeviceMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRulePostArgsConditionParameters") { + var out PostArgsMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostArgsMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleQueryStringConditionParameters") { + var out QueryStringMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QueryStringMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRemoteAddressConditionParameters") { + var out RemoteAddressMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RemoteAddressMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestBodyConditionParameters") { + var out RequestBodyMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestBodyMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestHeaderConditionParameters") { + var out RequestHeaderMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestHeaderMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestMethodConditionParameters") { + var out RequestMethodMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestMethodMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestSchemeConditionParameters") { + var out RequestSchemeMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestSchemeMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleRequestUriConditionParameters") { + var out RequestUriMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RequestUriMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleServerPortConditionParameters") { + var out ServerPortMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServerPortMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleSocketAddrConditionParameters") { + var out SocketAddrMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SocketAddrMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleSslProtocolConditionParameters") { + var out SslProtocolMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SslProtocolMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlFileExtensionMatchConditionParameters") { + var out UrlFileExtensionMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlFileExtensionMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlFilenameConditionParameters") { + var out UrlFileNameMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlFileNameMatchConditionParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DeliveryRuleUrlPathMatchConditionParameters") { + var out UrlPathMatchConditionParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlPathMatchConditionParameters: %+v", err) + } + return out, nil + } + + var parent BaseDeliveryRuleConditionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryRuleConditionParametersImpl: %+v", err) + } + + return RawDeliveryRuleConditionParametersImpl{ + deliveryRuleConditionParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecookiescondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecookiescondition.go new file mode 100644 index 00000000000..e76520b53a2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulecookiescondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleCookiesCondition{} + +type DeliveryRuleCookiesCondition struct { + Parameters CookiesMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleCookiesCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleCookiesCondition{} + +func (s DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleCookiesCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleCookiesCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleCookiesCondition: %+v", err) + } + + decoded["name"] = "Cookies" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleCookiesCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehostnamecondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehostnamecondition.go new file mode 100644 index 00000000000..44ef6b50c1e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehostnamecondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleHostNameCondition{} + +type DeliveryRuleHostNameCondition struct { + Parameters HostNameMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleHostNameCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleHostNameCondition{} + +func (s DeliveryRuleHostNameCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleHostNameCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleHostNameCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleHostNameCondition: %+v", err) + } + + decoded["name"] = "HostName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleHostNameCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehttpversioncondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehttpversioncondition.go new file mode 100644 index 00000000000..aa27793fbf2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulehttpversioncondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleHTTPVersionCondition{} + +type DeliveryRuleHTTPVersionCondition struct { + Parameters HTTPVersionMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleHTTPVersionCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleHTTPVersionCondition{} + +func (s DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleHTTPVersionCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + decoded["name"] = "HttpVersion" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleHTTPVersionCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleisdevicecondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleisdevicecondition.go new file mode 100644 index 00000000000..5ae76aaa26a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleisdevicecondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleIsDeviceCondition{} + +type DeliveryRuleIsDeviceCondition struct { + Parameters IsDeviceMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleIsDeviceCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleIsDeviceCondition{} + +func (s DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleIsDeviceCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + decoded["name"] = "IsDevice" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleIsDeviceCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulepostargscondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulepostargscondition.go new file mode 100644 index 00000000000..0b549f2b27b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulepostargscondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRulePostArgsCondition{} + +type DeliveryRulePostArgsCondition struct { + Parameters PostArgsMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRulePostArgsCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRulePostArgsCondition{} + +func (s DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRulePostArgsCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRulePostArgsCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRulePostArgsCondition: %+v", err) + } + + decoded["name"] = "PostArgs" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRulePostArgsCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulequerystringcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulequerystringcondition.go new file mode 100644 index 00000000000..8e147deab21 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulequerystringcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleQueryStringCondition{} + +type DeliveryRuleQueryStringCondition struct { + Parameters QueryStringMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleQueryStringCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleQueryStringCondition{} + +func (s DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleQueryStringCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + decoded["name"] = "QueryString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleQueryStringCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleremoteaddresscondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleremoteaddresscondition.go new file mode 100644 index 00000000000..82eb3b6165d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleremoteaddresscondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRemoteAddressCondition{} + +type DeliveryRuleRemoteAddressCondition struct { + Parameters RemoteAddressMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRemoteAddressCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRemoteAddressCondition{} + +func (s DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRemoteAddressCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + decoded["name"] = "RemoteAddress" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRemoteAddressCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestbodycondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestbodycondition.go new file mode 100644 index 00000000000..4a7ed969fdc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestbodycondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestBodyCondition{} + +type DeliveryRuleRequestBodyCondition struct { + Parameters RequestBodyMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestBodyCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestBodyCondition{} + +func (s DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestBodyCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + decoded["name"] = "RequestBody" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestBodyCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheaderaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheaderaction.go new file mode 100644 index 00000000000..0b4b70c1c74 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheaderaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleRequestHeaderAction{} + +type DeliveryRuleRequestHeaderAction struct { + Parameters HeaderActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleRequestHeaderAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestHeaderAction{} + +func (s DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestHeaderAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + decoded["name"] = "ModifyRequestHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestHeaderAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheadercondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheadercondition.go new file mode 100644 index 00000000000..f1d34dc0f76 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestheadercondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestHeaderCondition{} + +type DeliveryRuleRequestHeaderCondition struct { + Parameters RequestHeaderMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestHeaderCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestHeaderCondition{} + +func (s DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestHeaderCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + decoded["name"] = "RequestHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestHeaderCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestmethodcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestmethodcondition.go new file mode 100644 index 00000000000..3ce8ced0d67 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestmethodcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestMethodCondition{} + +type DeliveryRuleRequestMethodCondition struct { + Parameters RequestMethodMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestMethodCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestMethodCondition{} + +func (s DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestMethodCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + decoded["name"] = "RequestMethod" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestMethodCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestschemecondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestschemecondition.go new file mode 100644 index 00000000000..1af6289b7f0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequestschemecondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestSchemeCondition{} + +type DeliveryRuleRequestSchemeCondition struct { + Parameters RequestSchemeMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestSchemeCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestSchemeCondition{} + +func (s DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestSchemeCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + decoded["name"] = "RequestScheme" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestSchemeCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequesturicondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequesturicondition.go new file mode 100644 index 00000000000..63335243168 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerequesturicondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleRequestUriCondition{} + +type DeliveryRuleRequestUriCondition struct { + Parameters RequestUriMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleRequestUriCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRequestUriCondition{} + +func (s DeliveryRuleRequestUriCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRequestUriCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + decoded["name"] = "RequestUri" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRequestUriCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleresponseheaderaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleresponseheaderaction.go new file mode 100644 index 00000000000..264c599d00a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleresponseheaderaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleResponseHeaderAction{} + +type DeliveryRuleResponseHeaderAction struct { + Parameters HeaderActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleResponseHeaderAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleResponseHeaderAction{} + +func (s DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleResponseHeaderAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + decoded["name"] = "ModifyResponseHeader" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleResponseHeaderAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerouteconfigurationoverrideaction.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerouteconfigurationoverrideaction.go new file mode 100644 index 00000000000..5aed6e8f9dc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulerouteconfigurationoverrideaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = DeliveryRuleRouteConfigurationOverrideAction{} + +type DeliveryRuleRouteConfigurationOverrideAction struct { + Parameters RouteConfigurationOverrideActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s DeliveryRuleRouteConfigurationOverrideAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleRouteConfigurationOverrideAction{} + +func (s DeliveryRuleRouteConfigurationOverrideAction) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleRouteConfigurationOverrideAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + decoded["name"] = "RouteConfigurationOverride" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleRouteConfigurationOverrideAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleserverportcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleserverportcondition.go new file mode 100644 index 00000000000..ce4318a26d0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleserverportcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleServerPortCondition{} + +type DeliveryRuleServerPortCondition struct { + Parameters ServerPortMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleServerPortCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleServerPortCondition{} + +func (s DeliveryRuleServerPortCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleServerPortCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleServerPortCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleServerPortCondition: %+v", err) + } + + decoded["name"] = "ServerPort" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleServerPortCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesocketaddrcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesocketaddrcondition.go new file mode 100644 index 00000000000..e7fab395f43 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesocketaddrcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleSocketAddrCondition{} + +type DeliveryRuleSocketAddrCondition struct { + Parameters SocketAddrMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleSocketAddrCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleSocketAddrCondition{} + +func (s DeliveryRuleSocketAddrCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleSocketAddrCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + decoded["name"] = "SocketAddr" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleSocketAddrCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesslprotocolcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesslprotocolcondition.go new file mode 100644 index 00000000000..7ab504fa054 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryrulesslprotocolcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleSslProtocolCondition{} + +type DeliveryRuleSslProtocolCondition struct { + Parameters SslProtocolMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleSslProtocolCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleSslProtocolCondition{} + +func (s DeliveryRuleSslProtocolCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleSslProtocolCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + decoded["name"] = "SslProtocol" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleSslProtocolCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfileextensioncondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfileextensioncondition.go new file mode 100644 index 00000000000..3e10cd3465d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfileextensioncondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlFileExtensionCondition{} + +type DeliveryRuleUrlFileExtensionCondition struct { + Parameters UrlFileExtensionMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlFileExtensionCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlFileExtensionCondition{} + +func (s DeliveryRuleUrlFileExtensionCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlFileExtensionCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + decoded["name"] = "UrlFileExtension" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlFileExtensionCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfilenamecondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfilenamecondition.go new file mode 100644 index 00000000000..40de83410dd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlfilenamecondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlFileNameCondition{} + +type DeliveryRuleUrlFileNameCondition struct { + Parameters UrlFileNameMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlFileNameCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlFileNameCondition{} + +func (s DeliveryRuleUrlFileNameCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlFileNameCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + decoded["name"] = "UrlFileName" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlFileNameCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlpathcondition.go b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlpathcondition.go new file mode 100644 index 00000000000..937fc47bf32 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_deliveryruleurlpathcondition.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleCondition = DeliveryRuleUrlPathCondition{} + +type DeliveryRuleUrlPathCondition struct { + Parameters UrlPathMatchConditionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleCondition + + Name MatchVariable `json:"name"` +} + +func (s DeliveryRuleUrlPathCondition) DeliveryRuleCondition() BaseDeliveryRuleConditionImpl { + return BaseDeliveryRuleConditionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = DeliveryRuleUrlPathCondition{} + +func (s DeliveryRuleUrlPathCondition) MarshalJSON() ([]byte, error) { + type wrapper DeliveryRuleUrlPathCondition + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + decoded["name"] = "UrlPath" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeliveryRuleUrlPathCondition: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_headeractionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_headeractionparameters.go new file mode 100644 index 00000000000..6bf4a05fded --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_headeractionparameters.go @@ -0,0 +1,52 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = HeaderActionParameters{} + +type HeaderActionParameters struct { + HeaderAction HeaderAction `json:"headerAction"` + HeaderName string `json:"headerName"` + Value *string `json:"value,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s HeaderActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HeaderActionParameters{} + +func (s HeaderActionParameters) MarshalJSON() ([]byte, error) { + type wrapper HeaderActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HeaderActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HeaderActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHeaderActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HeaderActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_hostnamematchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_hostnamematchconditionparameters.go new file mode 100644 index 00000000000..9dde99c7f84 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_hostnamematchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = HostNameMatchConditionParameters{} + +type HostNameMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator HostNameOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s HostNameMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HostNameMatchConditionParameters{} + +func (s HostNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper HostNameMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HostNameMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HostNameMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHostNameConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HostNameMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_httpversionmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_httpversionmatchconditionparameters.go new file mode 100644 index 00000000000..4fdfdc7344d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_httpversionmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = HTTPVersionMatchConditionParameters{} + +type HTTPVersionMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator HTTPVersionOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s HTTPVersionMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = HTTPVersionMatchConditionParameters{} + +func (s HTTPVersionMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper HTTPVersionMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleHttpVersionConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPVersionMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_isdevicematchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_isdevicematchconditionparameters.go new file mode 100644 index 00000000000..f3b7e28c6bc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_isdevicematchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = IsDeviceMatchConditionParameters{} + +type IsDeviceMatchConditionParameters struct { + MatchValues *[]IsDeviceMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator IsDeviceOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s IsDeviceMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = IsDeviceMatchConditionParameters{} + +func (s IsDeviceMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper IsDeviceMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling IsDeviceMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling IsDeviceMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleIsDeviceConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling IsDeviceMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_origingroupoverride.go b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverride.go new file mode 100644 index 00000000000..72d2e00784b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverride.go @@ -0,0 +1,9 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OriginGroupOverride struct { + ForwardingProtocol *ForwardingProtocol `json:"forwardingProtocol,omitempty"` + OriginGroup *ResourceReference `json:"originGroup,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideaction.go b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideaction.go new file mode 100644 index 00000000000..d7ed168c94c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = OriginGroupOverrideAction{} + +type OriginGroupOverrideAction struct { + Parameters OriginGroupOverrideActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s OriginGroupOverrideAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = OriginGroupOverrideAction{} + +func (s OriginGroupOverrideAction) MarshalJSON() ([]byte, error) { + type wrapper OriginGroupOverrideAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OriginGroupOverrideAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OriginGroupOverrideAction: %+v", err) + } + + decoded["name"] = "OriginGroupOverride" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OriginGroupOverrideAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideactionparameters.go new file mode 100644 index 00000000000..138ece4ddea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_origingroupoverrideactionparameters.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = OriginGroupOverrideActionParameters{} + +type OriginGroupOverrideActionParameters struct { + OriginGroup ResourceReference `json:"originGroup"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s OriginGroupOverrideActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = OriginGroupOverrideActionParameters{} + +func (s OriginGroupOverrideActionParameters) MarshalJSON() ([]byte, error) { + type wrapper OriginGroupOverrideActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OriginGroupOverrideActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OriginGroupOverrideActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleOriginGroupOverrideActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OriginGroupOverrideActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_postargsmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_postargsmatchconditionparameters.go new file mode 100644 index 00000000000..3943de4a654 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_postargsmatchconditionparameters.go @@ -0,0 +1,54 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = PostArgsMatchConditionParameters{} + +type PostArgsMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator PostArgsOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s PostArgsMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = PostArgsMatchConditionParameters{} + +func (s PostArgsMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper PostArgsMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostArgsMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostArgsMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRulePostArgsConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostArgsMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_querystringmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_querystringmatchconditionparameters.go new file mode 100644 index 00000000000..6e8d907688b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_querystringmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = QueryStringMatchConditionParameters{} + +type QueryStringMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator QueryStringOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s QueryStringMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = QueryStringMatchConditionParameters{} + +func (s QueryStringMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper QueryStringMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QueryStringMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QueryStringMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleQueryStringConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QueryStringMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_remoteaddressmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_remoteaddressmatchconditionparameters.go new file mode 100644 index 00000000000..9e91456eb10 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_remoteaddressmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RemoteAddressMatchConditionParameters{} + +type RemoteAddressMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RemoteAddressOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RemoteAddressMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RemoteAddressMatchConditionParameters{} + +func (s RemoteAddressMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RemoteAddressMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRemoteAddressConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RemoteAddressMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_requestbodymatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_requestbodymatchconditionparameters.go new file mode 100644 index 00000000000..6264e1db154 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_requestbodymatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestBodyMatchConditionParameters{} + +type RequestBodyMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestBodyOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestBodyMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestBodyMatchConditionParameters{} + +func (s RequestBodyMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestBodyMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestBodyMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestBodyMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestBodyConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestBodyMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_requestheadermatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_requestheadermatchconditionparameters.go new file mode 100644 index 00000000000..8f2ca7a33d8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_requestheadermatchconditionparameters.go @@ -0,0 +1,54 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestHeaderMatchConditionParameters{} + +type RequestHeaderMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestHeaderOperator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestHeaderMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestHeaderMatchConditionParameters{} + +func (s RequestHeaderMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestHeaderMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestHeaderConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestHeaderMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_requestmethodmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_requestmethodmatchconditionparameters.go new file mode 100644 index 00000000000..ea18f9eab27 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_requestmethodmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestMethodMatchConditionParameters{} + +type RequestMethodMatchConditionParameters struct { + MatchValues *[]RequestMethodMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestMethodOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestMethodMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestMethodMatchConditionParameters{} + +func (s RequestMethodMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestMethodMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestMethodMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestMethodMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestMethodConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestMethodMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_requestschemematchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_requestschemematchconditionparameters.go new file mode 100644 index 00000000000..6e69c0badce --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_requestschemematchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestSchemeMatchConditionParameters{} + +type RequestSchemeMatchConditionParameters struct { + MatchValues *[]RequestSchemeMatchValue `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator Operator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestSchemeMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestSchemeMatchConditionParameters{} + +func (s RequestSchemeMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestSchemeMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestSchemeConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestSchemeMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_requesturimatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_requesturimatchconditionparameters.go new file mode 100644 index 00000000000..72fcf177b2d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_requesturimatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = RequestUriMatchConditionParameters{} + +type RequestUriMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator RequestUriOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s RequestUriMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RequestUriMatchConditionParameters{} + +func (s RequestUriMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper RequestUriMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RequestUriMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RequestUriMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRequestUriConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RequestUriMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_resourcereference.go b/resource-manager/cdn/2024-02-01/rules/model_resourcereference.go new file mode 100644 index 00000000000..841c18a0770 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_resourcereference.go @@ -0,0 +1,8 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_routeconfigurationoverrideactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_routeconfigurationoverrideactionparameters.go new file mode 100644 index 00000000000..39b23f835a5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_routeconfigurationoverrideactionparameters.go @@ -0,0 +1,51 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = RouteConfigurationOverrideActionParameters{} + +type RouteConfigurationOverrideActionParameters struct { + CacheConfiguration *CacheConfiguration `json:"cacheConfiguration,omitempty"` + OriginGroupOverride *OriginGroupOverride `json:"originGroupOverride,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s RouteConfigurationOverrideActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = RouteConfigurationOverrideActionParameters{} + +func (s RouteConfigurationOverrideActionParameters) MarshalJSON() ([]byte, error) { + type wrapper RouteConfigurationOverrideActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleRouteConfigurationOverrideActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RouteConfigurationOverrideActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_rule.go b/resource-manager/cdn/2024-02-01/rules/model_rule.go new file mode 100644 index 00000000000..8b9504ed600 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_rule.go @@ -0,0 +1,16 @@ +package rules + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Rule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RuleProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_ruleproperties.go b/resource-manager/cdn/2024-02-01/rules/model_ruleproperties.go new file mode 100644 index 00000000000..0fbdf2d4b1e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_ruleproperties.go @@ -0,0 +1,75 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleProperties struct { + Actions *[]DeliveryRuleAction `json:"actions,omitempty"` + Conditions *[]DeliveryRuleCondition `json:"conditions,omitempty"` + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + MatchProcessingBehavior *MatchProcessingBehavior `json:"matchProcessingBehavior,omitempty"` + Order *int64 `json:"order,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` + RuleSetName *string `json:"ruleSetName,omitempty"` +} + +var _ json.Unmarshaler = &RuleProperties{} + +func (s *RuleProperties) UnmarshalJSON(bytes []byte) error { + type alias RuleProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into RuleProperties: %+v", err) + } + + s.DeploymentStatus = decoded.DeploymentStatus + s.MatchProcessingBehavior = decoded.MatchProcessingBehavior + s.Order = decoded.Order + s.ProvisioningState = decoded.ProvisioningState + s.RuleSetName = decoded.RuleSetName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling RuleProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["actions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Actions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleAction, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleActionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Actions' for 'RuleProperties': %+v", i, err) + } + output = append(output, impl) + } + s.Actions = &output + } + + if v, ok := temp["conditions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Conditions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleCondition, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleConditionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'RuleProperties': %+v", i, err) + } + output = append(output, impl) + } + s.Conditions = &output + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_ruleupdateparameters.go b/resource-manager/cdn/2024-02-01/rules/model_ruleupdateparameters.go new file mode 100644 index 00000000000..d5bd427fc3d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_ruleupdateparameters.go @@ -0,0 +1,8 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleUpdateParameters struct { + Properties *RuleUpdatePropertiesParameters `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_ruleupdatepropertiesparameters.go b/resource-manager/cdn/2024-02-01/rules/model_ruleupdatepropertiesparameters.go new file mode 100644 index 00000000000..4c2786c92fc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_ruleupdatepropertiesparameters.go @@ -0,0 +1,71 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleUpdatePropertiesParameters struct { + Actions *[]DeliveryRuleAction `json:"actions,omitempty"` + Conditions *[]DeliveryRuleCondition `json:"conditions,omitempty"` + MatchProcessingBehavior *MatchProcessingBehavior `json:"matchProcessingBehavior,omitempty"` + Order *int64 `json:"order,omitempty"` + RuleSetName *string `json:"ruleSetName,omitempty"` +} + +var _ json.Unmarshaler = &RuleUpdatePropertiesParameters{} + +func (s *RuleUpdatePropertiesParameters) UnmarshalJSON(bytes []byte) error { + type alias RuleUpdatePropertiesParameters + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into RuleUpdatePropertiesParameters: %+v", err) + } + + s.MatchProcessingBehavior = decoded.MatchProcessingBehavior + s.Order = decoded.Order + s.RuleSetName = decoded.RuleSetName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling RuleUpdatePropertiesParameters into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["actions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Actions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleAction, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleActionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Actions' for 'RuleUpdatePropertiesParameters': %+v", i, err) + } + output = append(output, impl) + } + s.Actions = &output + } + + if v, ok := temp["conditions"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Conditions into list []json.RawMessage: %+v", err) + } + + output := make([]DeliveryRuleCondition, 0) + for i, val := range listTemp { + impl, err := UnmarshalDeliveryRuleConditionImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'RuleUpdatePropertiesParameters': %+v", i, err) + } + output = append(output, impl) + } + s.Conditions = &output + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_serverportmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_serverportmatchconditionparameters.go new file mode 100644 index 00000000000..8f96177dbcb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_serverportmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = ServerPortMatchConditionParameters{} + +type ServerPortMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator ServerPortOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s ServerPortMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = ServerPortMatchConditionParameters{} + +func (s ServerPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper ServerPortMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServerPortMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServerPortMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleServerPortConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServerPortMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_socketaddrmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_socketaddrmatchconditionparameters.go new file mode 100644 index 00000000000..c5056b07bd9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_socketaddrmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = SocketAddrMatchConditionParameters{} + +type SocketAddrMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator SocketAddrOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s SocketAddrMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = SocketAddrMatchConditionParameters{} + +func (s SocketAddrMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper SocketAddrMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SocketAddrMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SocketAddrMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleSocketAddrConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SocketAddrMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_sslprotocolmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_sslprotocolmatchconditionparameters.go new file mode 100644 index 00000000000..e424bb27aaf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_sslprotocolmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = SslProtocolMatchConditionParameters{} + +type SslProtocolMatchConditionParameters struct { + MatchValues *[]SslProtocol `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator SslProtocolOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s SslProtocolMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = SslProtocolMatchConditionParameters{} + +func (s SslProtocolMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper SslProtocolMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SslProtocolMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SslProtocolMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleSslProtocolConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SslProtocolMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlfileextensionmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlfileextensionmatchconditionparameters.go new file mode 100644 index 00000000000..21b26fd6fd1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlfileextensionmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlFileExtensionMatchConditionParameters{} + +type UrlFileExtensionMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlFileExtensionOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlFileExtensionMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlFileExtensionMatchConditionParameters{} + +func (s UrlFileExtensionMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlFileExtensionMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlFileExtensionMatchConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlFileExtensionMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlfilenamematchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlfilenamematchconditionparameters.go new file mode 100644 index 00000000000..611acf6b2cb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlfilenamematchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlFileNameMatchConditionParameters{} + +type UrlFileNameMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlFileNameOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlFileNameMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlFileNameMatchConditionParameters{} + +func (s UrlFileNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlFileNameMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlFilenameConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlFileNameMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlpathmatchconditionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlpathmatchconditionparameters.go new file mode 100644 index 00000000000..0de2e11db74 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlpathmatchconditionparameters.go @@ -0,0 +1,53 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleConditionParameters = UrlPathMatchConditionParameters{} + +type UrlPathMatchConditionParameters struct { + MatchValues *[]string `json:"matchValues,omitempty"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator UrlPathOperator `json:"operator"` + Transforms *[]Transform `json:"transforms,omitempty"` + + // Fields inherited from DeliveryRuleConditionParameters + + TypeName DeliveryRuleConditionParametersType `json:"typeName"` +} + +func (s UrlPathMatchConditionParameters) DeliveryRuleConditionParameters() BaseDeliveryRuleConditionParametersImpl { + return BaseDeliveryRuleConditionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlPathMatchConditionParameters{} + +func (s UrlPathMatchConditionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlPathMatchConditionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlPathMatchConditionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlPathMatchConditionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlPathMatchConditionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlPathMatchConditionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlredirectaction.go b/resource-manager/cdn/2024-02-01/rules/model_urlredirectaction.go new file mode 100644 index 00000000000..63d35c55d69 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlredirectaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlRedirectAction{} + +type UrlRedirectAction struct { + Parameters UrlRedirectActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlRedirectAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlRedirectAction{} + +func (s UrlRedirectAction) MarshalJSON() ([]byte, error) { + type wrapper UrlRedirectAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRedirectAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRedirectAction: %+v", err) + } + + decoded["name"] = "UrlRedirect" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRedirectAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlredirectactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlredirectactionparameters.go new file mode 100644 index 00000000000..98ca92159c8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlredirectactionparameters.go @@ -0,0 +1,55 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlRedirectActionParameters{} + +type UrlRedirectActionParameters struct { + CustomFragment *string `json:"customFragment,omitempty"` + CustomHostname *string `json:"customHostname,omitempty"` + CustomPath *string `json:"customPath,omitempty"` + CustomQueryString *string `json:"customQueryString,omitempty"` + DestinationProtocol *DestinationProtocol `json:"destinationProtocol,omitempty"` + RedirectType RedirectType `json:"redirectType"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlRedirectActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlRedirectActionParameters{} + +func (s UrlRedirectActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlRedirectActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRedirectActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRedirectActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlRedirectActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRedirectActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlrewriteaction.go b/resource-manager/cdn/2024-02-01/rules/model_urlrewriteaction.go new file mode 100644 index 00000000000..ff7258a8371 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlrewriteaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlRewriteAction{} + +type UrlRewriteAction struct { + Parameters UrlRewriteActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlRewriteAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlRewriteAction{} + +func (s UrlRewriteAction) MarshalJSON() ([]byte, error) { + type wrapper UrlRewriteAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRewriteAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRewriteAction: %+v", err) + } + + decoded["name"] = "UrlRewrite" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRewriteAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlrewriteactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlrewriteactionparameters.go new file mode 100644 index 00000000000..4cd9e9bff0c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlrewriteactionparameters.go @@ -0,0 +1,52 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlRewriteActionParameters{} + +type UrlRewriteActionParameters struct { + Destination string `json:"destination"` + PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"` + SourcePattern string `json:"sourcePattern"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlRewriteActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlRewriteActionParameters{} + +func (s UrlRewriteActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlRewriteActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlRewriteActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlRewriteActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlRewriteActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlRewriteActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlsigningaction.go b/resource-manager/cdn/2024-02-01/rules/model_urlsigningaction.go new file mode 100644 index 00000000000..c119bfa48cc --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlsigningaction.go @@ -0,0 +1,50 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleAction = UrlSigningAction{} + +type UrlSigningAction struct { + Parameters UrlSigningActionParameters `json:"parameters"` + + // Fields inherited from DeliveryRuleAction + + Name DeliveryRuleActionName `json:"name"` +} + +func (s UrlSigningAction) DeliveryRuleAction() BaseDeliveryRuleActionImpl { + return BaseDeliveryRuleActionImpl{ + Name: s.Name, + } +} + +var _ json.Marshaler = UrlSigningAction{} + +func (s UrlSigningAction) MarshalJSON() ([]byte, error) { + type wrapper UrlSigningAction + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlSigningAction: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlSigningAction: %+v", err) + } + + decoded["name"] = "UrlSigning" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlSigningAction: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlsigningactionparameters.go b/resource-manager/cdn/2024-02-01/rules/model_urlsigningactionparameters.go new file mode 100644 index 00000000000..bbab36d001f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlsigningactionparameters.go @@ -0,0 +1,51 @@ +package rules + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DeliveryRuleActionParameters = UrlSigningActionParameters{} + +type UrlSigningActionParameters struct { + Algorithm *Algorithm `json:"algorithm,omitempty"` + ParameterNameOverride *[]UrlSigningParamIdentifier `json:"parameterNameOverride,omitempty"` + + // Fields inherited from DeliveryRuleActionParameters + + TypeName DeliveryRuleActionParametersType `json:"typeName"` +} + +func (s UrlSigningActionParameters) DeliveryRuleActionParameters() BaseDeliveryRuleActionParametersImpl { + return BaseDeliveryRuleActionParametersImpl{ + TypeName: s.TypeName, + } +} + +var _ json.Marshaler = UrlSigningActionParameters{} + +func (s UrlSigningActionParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlSigningActionParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlSigningActionParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlSigningActionParameters: %+v", err) + } + + decoded["typeName"] = "DeliveryRuleUrlSigningActionParameters" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlSigningActionParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/rules/model_urlsigningparamidentifier.go b/resource-manager/cdn/2024-02-01/rules/model_urlsigningparamidentifier.go new file mode 100644 index 00000000000..c8c8ae6a812 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/model_urlsigningparamidentifier.go @@ -0,0 +1,9 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UrlSigningParamIdentifier struct { + ParamIndicator ParamIndicator `json:"paramIndicator"` + ParamName string `json:"paramName"` +} diff --git a/resource-manager/cdn/2024-02-01/rules/predicates.go b/resource-manager/cdn/2024-02-01/rules/predicates.go new file mode 100644 index 00000000000..0dd99d7ba7d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/predicates.go @@ -0,0 +1,27 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p RuleOperationPredicate) Matches(input Rule) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/rules/version.go b/resource-manager/cdn/2024-02-01/rules/version.go new file mode 100644 index 00000000000..5f6afc46572 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rules/version.go @@ -0,0 +1,10 @@ +package rules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/rules/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/README.md b/resource-manager/cdn/2024-02-01/rulesets/README.md new file mode 100644 index 00000000000..7ac7633b970 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/README.md @@ -0,0 +1,98 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rulesets` Documentation + +The `rulesets` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/rulesets" +``` + + +### Client Initialization + +```go +client := rulesets.NewRuleSetsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RuleSetsClient.Create` + +```go +ctx := context.TODO() +id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + +read, err := client.Create(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RuleSetsClient.Delete` + +```go +ctx := context.TODO() +id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RuleSetsClient.Get` + +```go +ctx := context.TODO() +id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RuleSetsClient.ListByProfile` + +```go +ctx := context.TODO() +id := rulesets.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RuleSetsClient.ListResourceUsage` + +```go +ctx := context.TODO() +id := rulesets.NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + +// alternatively `client.ListResourceUsage(ctx, id)` can be used to do batched pagination +items, err := client.ListResourceUsageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/cdn/2024-02-01/rulesets/client.go b/resource-manager/cdn/2024-02-01/rulesets/client.go new file mode 100644 index 00000000000..957ddc082f1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/client.go @@ -0,0 +1,26 @@ +package rulesets + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleSetsClient struct { + Client *resourcemanager.Client +} + +func NewRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RuleSetsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "rulesets", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating RuleSetsClient: %+v", err) + } + + return &RuleSetsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/constants.go b/resource-manager/cdn/2024-02-01/rulesets/constants.go new file mode 100644 index 00000000000..4873ab357b0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/constants.go @@ -0,0 +1,145 @@ +package rulesets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +func PossibleValuesForUsageUnit() []string { + return []string{ + string(UsageUnitCount), + } +} + +func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseUsageUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseUsageUnit(input string) (*UsageUnit, error) { + vals := map[string]UsageUnit{ + "count": UsageUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := UsageUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/id_profile.go b/resource-manager/cdn/2024-02-01/rulesets/id_profile.go new file mode 100644 index 00000000000..7122e8c51aa --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/id_profile.go @@ -0,0 +1,130 @@ +package rulesets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/id_profile_test.go b/resource-manager/cdn/2024-02-01/rulesets/id_profile_test.go new file mode 100644 index 00000000000..a0e9a4ca9f1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/id_profile_test.go @@ -0,0 +1,282 @@ +package rulesets + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/id_ruleset.go b/resource-manager/cdn/2024-02-01/rulesets/id_ruleset.go new file mode 100644 index 00000000000..098971a0d09 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/id_ruleset.go @@ -0,0 +1,139 @@ +package rulesets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RuleSetId{}) +} + +var _ resourceids.ResourceId = &RuleSetId{} + +// RuleSetId is a struct representing the Resource ID for a Rule Set +type RuleSetId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + RuleSetName string +} + +// NewRuleSetID returns a new RuleSetId struct +func NewRuleSetID(subscriptionId string, resourceGroupName string, profileName string, ruleSetName string) RuleSetId { + return RuleSetId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + RuleSetName: ruleSetName, + } +} + +// ParseRuleSetID parses 'input' into a RuleSetId +func ParseRuleSetID(input string) (*RuleSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleSetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleSetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRuleSetIDInsensitively parses 'input' case-insensitively into a RuleSetId +// note: this method should only be used for API response data and not user input +func ParseRuleSetIDInsensitively(input string) (*RuleSetId, error) { + parser := resourceids.NewParserFromResourceIdType(&RuleSetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RuleSetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RuleSetId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.RuleSetName, ok = input.Parsed["ruleSetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "ruleSetName", input) + } + + return nil +} + +// ValidateRuleSetID checks that 'input' can be parsed as a Rule Set ID +func ValidateRuleSetID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRuleSetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Rule Set ID +func (id RuleSetId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/ruleSets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.RuleSetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Rule Set ID +func (id RuleSetId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticRuleSets", "ruleSets", "ruleSets"), + resourceids.UserSpecifiedSegment("ruleSetName", "ruleSetValue"), + } +} + +// String returns a human-readable description of this Rule Set ID +func (id RuleSetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Rule Set Name: %q", id.RuleSetName), + } + return fmt.Sprintf("Rule Set (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/id_ruleset_test.go b/resource-manager/cdn/2024-02-01/rulesets/id_ruleset_test.go new file mode 100644 index 00000000000..21c4c70a82f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/id_ruleset_test.go @@ -0,0 +1,327 @@ +package rulesets + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RuleSetId{} + +func TestNewRuleSetID(t *testing.T) { + id := NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.RuleSetName != "ruleSetValue" { + t.Fatalf("Expected %q but got %q for Segment 'RuleSetName'", id.RuleSetName, "ruleSetValue") + } +} + +func TestFormatRuleSetID(t *testing.T) { + actual := NewRuleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "ruleSetValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRuleSetID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleSetId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleSetID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + } +} + +func TestParseRuleSetIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RuleSetId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + RuleSetName: "ruleSetValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/ruleSets/ruleSetValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE", + Expected: &RuleSetId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + RuleSetName: "rUlEsEtVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/rUlEsEtS/rUlEsEtVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRuleSetIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.RuleSetName != v.Expected.RuleSetName { + t.Fatalf("Expected %q but got %q for RuleSetName", v.Expected.RuleSetName, actual.RuleSetName) + } + + } +} + +func TestSegmentsForRuleSetId(t *testing.T) { + segments := RuleSetId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RuleSetId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/method_create.go b/resource-manager/cdn/2024-02-01/rulesets/method_create.go new file mode 100644 index 00000000000..25e6f40f5d1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/method_create.go @@ -0,0 +1,54 @@ +package rulesets + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RuleSet +} + +// Create ... +func (c RuleSetsClient) Create(ctx context.Context, id RuleSetId) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RuleSet + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/method_delete.go b/resource-manager/cdn/2024-02-01/rulesets/method_delete.go new file mode 100644 index 00000000000..e0f00268a45 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/method_delete.go @@ -0,0 +1,71 @@ +package rulesets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c RuleSetsClient) Delete(ctx context.Context, id RuleSetId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c RuleSetsClient) DeleteThenPoll(ctx context.Context, id RuleSetId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/method_get.go b/resource-manager/cdn/2024-02-01/rulesets/method_get.go new file mode 100644 index 00000000000..5ea1977123d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/method_get.go @@ -0,0 +1,53 @@ +package rulesets + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *RuleSet +} + +// Get ... +func (c RuleSetsClient) Get(ctx context.Context, id RuleSetId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model RuleSet + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/rulesets/method_listbyprofile.go new file mode 100644 index 00000000000..3c04ee6d0a7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/method_listbyprofile.go @@ -0,0 +1,105 @@ +package rulesets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]RuleSet +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []RuleSet +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c RuleSetsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/ruleSets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]RuleSet `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c RuleSetsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, RuleSetOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RuleSetsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate RuleSetOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]RuleSet, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/method_listresourceusage.go b/resource-manager/cdn/2024-02-01/rulesets/method_listresourceusage.go new file mode 100644 index 00000000000..08a467d0bf5 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/method_listresourceusage.go @@ -0,0 +1,105 @@ +package rulesets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListResourceUsageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Usage +} + +type ListResourceUsageCompleteResult struct { + LatestHttpResponse *http.Response + Items []Usage +} + +type ListResourceUsageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListResourceUsageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListResourceUsage ... +func (c RuleSetsClient) ListResourceUsage(ctx context.Context, id RuleSetId) (result ListResourceUsageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Pager: &ListResourceUsageCustomPager{}, + Path: fmt.Sprintf("%s/usages", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Usage `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListResourceUsageComplete retrieves all the results into a single object +func (c RuleSetsClient) ListResourceUsageComplete(ctx context.Context, id RuleSetId) (ListResourceUsageCompleteResult, error) { + return c.ListResourceUsageCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) +} + +// ListResourceUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RuleSetsClient) ListResourceUsageCompleteMatchingPredicate(ctx context.Context, id RuleSetId, predicate UsageOperationPredicate) (result ListResourceUsageCompleteResult, err error) { + items := make([]Usage, 0) + + resp, err := c.ListResourceUsage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListResourceUsageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/model_ruleset.go b/resource-manager/cdn/2024-02-01/rulesets/model_ruleset.go new file mode 100644 index 00000000000..318adf43729 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/model_ruleset.go @@ -0,0 +1,16 @@ +package rulesets + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleSet struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *RuleSetProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/model_rulesetproperties.go b/resource-manager/cdn/2024-02-01/rulesets/model_rulesetproperties.go new file mode 100644 index 00000000000..55b980e2c52 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/model_rulesetproperties.go @@ -0,0 +1,10 @@ +package rulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleSetProperties struct { + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/model_usage.go b/resource-manager/cdn/2024-02-01/rulesets/model_usage.go new file mode 100644 index 00000000000..54f0c36919f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/model_usage.go @@ -0,0 +1,12 @@ +package rulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Usage struct { + CurrentValue int64 `json:"currentValue"` + Id *string `json:"id,omitempty"` + Limit int64 `json:"limit"` + Name UsageName `json:"name"` + Unit UsageUnit `json:"unit"` +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/model_usagename.go b/resource-manager/cdn/2024-02-01/rulesets/model_usagename.go new file mode 100644 index 00000000000..023a3d43d61 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/model_usagename.go @@ -0,0 +1,9 @@ +package rulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsageName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/predicates.go b/resource-manager/cdn/2024-02-01/rulesets/predicates.go new file mode 100644 index 00000000000..0d67bcef083 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/predicates.go @@ -0,0 +1,50 @@ +package rulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RuleSetOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p RuleSetOperationPredicate) Matches(input RuleSet) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type UsageOperationPredicate struct { + CurrentValue *int64 + Id *string + Limit *int64 +} + +func (p UsageOperationPredicate) Matches(input Usage) bool { + + if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Limit != nil && *p.Limit != input.Limit { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/rulesets/version.go b/resource-manager/cdn/2024-02-01/rulesets/version.go new file mode 100644 index 00000000000..f56a9e0c40c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/rulesets/version.go @@ -0,0 +1,10 @@ +package rulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/rulesets/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/secrets/README.md b/resource-manager/cdn/2024-02-01/secrets/README.md new file mode 100644 index 00000000000..2c0d1bf9941 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/secrets` Documentation + +The `secrets` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/secrets" +``` + + +### Client Initialization + +```go +client := secrets.NewSecretsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SecretsClient.Create` + +```go +ctx := context.TODO() +id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "secretValue") + +payload := secrets.Secret{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecretsClient.Delete` + +```go +ctx := context.TODO() +id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "secretValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecretsClient.Get` + +```go +ctx := context.TODO() +id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "secretValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SecretsClient.ListByProfile` + +```go +ctx := context.TODO() +id := secrets.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/cdn/2024-02-01/secrets/client.go b/resource-manager/cdn/2024-02-01/secrets/client.go new file mode 100644 index 00000000000..07a23983c45 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/client.go @@ -0,0 +1,26 @@ +package secrets + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretsClient struct { + Client *resourcemanager.Client +} + +func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "secrets", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SecretsClient: %+v", err) + } + + return &SecretsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/constants.go b/resource-manager/cdn/2024-02-01/secrets/constants.go new file mode 100644 index 00000000000..c8027d12eef --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/constants.go @@ -0,0 +1,154 @@ +package secrets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type SecretType string + +const ( + SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate" + SecretTypeCustomerCertificate SecretType = "CustomerCertificate" + SecretTypeManagedCertificate SecretType = "ManagedCertificate" + SecretTypeUrlSigningKey SecretType = "UrlSigningKey" +) + +func PossibleValuesForSecretType() []string { + return []string{ + string(SecretTypeAzureFirstPartyManagedCertificate), + string(SecretTypeCustomerCertificate), + string(SecretTypeManagedCertificate), + string(SecretTypeUrlSigningKey), + } +} + +func (s *SecretType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecretType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecretType(input string) (*SecretType, error) { + vals := map[string]SecretType{ + "azurefirstpartymanagedcertificate": SecretTypeAzureFirstPartyManagedCertificate, + "customercertificate": SecretTypeCustomerCertificate, + "managedcertificate": SecretTypeManagedCertificate, + "urlsigningkey": SecretTypeUrlSigningKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecretType(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/id_profile.go b/resource-manager/cdn/2024-02-01/secrets/id_profile.go new file mode 100644 index 00000000000..bbe70bc3ca8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/id_profile.go @@ -0,0 +1,130 @@ +package secrets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/secrets/id_profile_test.go b/resource-manager/cdn/2024-02-01/secrets/id_profile_test.go new file mode 100644 index 00000000000..53bc427e379 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/id_profile_test.go @@ -0,0 +1,282 @@ +package secrets + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/secrets/id_secret.go b/resource-manager/cdn/2024-02-01/secrets/id_secret.go new file mode 100644 index 00000000000..d516edea508 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/id_secret.go @@ -0,0 +1,139 @@ +package secrets + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&SecretId{}) +} + +var _ resourceids.ResourceId = &SecretId{} + +// SecretId is a struct representing the Resource ID for a Secret +type SecretId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + SecretName string +} + +// NewSecretID returns a new SecretId struct +func NewSecretID(subscriptionId string, resourceGroupName string, profileName string, secretName string) SecretId { + return SecretId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + SecretName: secretName, + } +} + +// ParseSecretID parses 'input' into a SecretId +func ParseSecretID(input string) (*SecretId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecretId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecretId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSecretIDInsensitively parses 'input' case-insensitively into a SecretId +// note: this method should only be used for API response data and not user input +func ParseSecretIDInsensitively(input string) (*SecretId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecretId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecretId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecretId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.SecretName, ok = input.Parsed["secretName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "secretName", input) + } + + return nil +} + +// ValidateSecretID checks that 'input' can be parsed as a Secret ID +func ValidateSecretID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseSecretID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Secret ID +func (id SecretId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/secrets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.SecretName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Secret ID +func (id SecretId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticSecrets", "secrets", "secrets"), + resourceids.UserSpecifiedSegment("secretName", "secretValue"), + } +} + +// String returns a human-readable description of this Secret ID +func (id SecretId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Secret Name: %q", id.SecretName), + } + return fmt.Sprintf("Secret (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/secrets/id_secret_test.go b/resource-manager/cdn/2024-02-01/secrets/id_secret_test.go new file mode 100644 index 00000000000..df1cfd25479 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/id_secret_test.go @@ -0,0 +1,327 @@ +package secrets + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &SecretId{} + +func TestNewSecretID(t *testing.T) { + id := NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "secretValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.SecretName != "secretValue" { + t.Fatalf("Expected %q but got %q for Segment 'SecretName'", id.SecretName, "secretValue") + } +} + +func TestFormatSecretID(t *testing.T) { + actual := NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "secretValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets/secretValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseSecretID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *SecretId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets/secretValue", + Expected: &SecretId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + SecretName: "secretValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets/secretValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseSecretID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.SecretName != v.Expected.SecretName { + t.Fatalf("Expected %q but got %q for SecretName", v.Expected.SecretName, actual.SecretName) + } + + } +} + +func TestParseSecretIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *SecretId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcReTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets/secretValue", + Expected: &SecretId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + SecretName: "secretValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/secrets/secretValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcReTs/sEcReTvAlUe", + Expected: &SecretId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + SecretName: "sEcReTvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcReTs/sEcReTvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseSecretIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.SecretName != v.Expected.SecretName { + t.Fatalf("Expected %q but got %q for SecretName", v.Expected.SecretName, actual.SecretName) + } + + } +} + +func TestSegmentsForSecretId(t *testing.T) { + segments := SecretId{}.Segments() + if len(segments) == 0 { + t.Fatalf("SecretId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/secrets/method_create.go b/resource-manager/cdn/2024-02-01/secrets/method_create.go new file mode 100644 index 00000000000..65aac40ebab --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/method_create.go @@ -0,0 +1,76 @@ +package secrets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Secret +} + +// Create ... +func (c SecretsClient) Create(ctx context.Context, id SecretId, input Secret) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SecretsClient) CreateThenPoll(ctx context.Context, id SecretId, input Secret) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/method_delete.go b/resource-manager/cdn/2024-02-01/secrets/method_delete.go new file mode 100644 index 00000000000..7740a7a1b9f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/method_delete.go @@ -0,0 +1,71 @@ +package secrets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SecretsClient) Delete(ctx context.Context, id SecretId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SecretsClient) DeleteThenPoll(ctx context.Context, id SecretId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/method_get.go b/resource-manager/cdn/2024-02-01/secrets/method_get.go new file mode 100644 index 00000000000..dd688babed6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/method_get.go @@ -0,0 +1,53 @@ +package secrets + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Secret +} + +// Get ... +func (c SecretsClient) Get(ctx context.Context, id SecretId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Secret + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/secrets/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/secrets/method_listbyprofile.go new file mode 100644 index 00000000000..425af171780 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/method_listbyprofile.go @@ -0,0 +1,105 @@ +package secrets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Secret +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []Secret +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c SecretsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/secrets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Secret `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c SecretsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, SecretOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SecretsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate SecretOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]Secret, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_azurefirstpartymanagedcertificateparameters.go b/resource-manager/cdn/2024-02-01/secrets/model_azurefirstpartymanagedcertificateparameters.go new file mode 100644 index 00000000000..16b490633d6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_azurefirstpartymanagedcertificateparameters.go @@ -0,0 +1,55 @@ +package secrets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretParameters = AzureFirstPartyManagedCertificateParameters{} + +type AzureFirstPartyManagedCertificateParameters struct { + CertificateAuthority *string `json:"certificateAuthority,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + SecretSource *ResourceReference `json:"secretSource,omitempty"` + Subject *string `json:"subject,omitempty"` + SubjectAlternativeNames *[]string `json:"subjectAlternativeNames,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + + // Fields inherited from SecretParameters + + Type SecretType `json:"type"` +} + +func (s AzureFirstPartyManagedCertificateParameters) SecretParameters() BaseSecretParametersImpl { + return BaseSecretParametersImpl{ + Type: s.Type, + } +} + +var _ json.Marshaler = AzureFirstPartyManagedCertificateParameters{} + +func (s AzureFirstPartyManagedCertificateParameters) MarshalJSON() ([]byte, error) { + type wrapper AzureFirstPartyManagedCertificateParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFirstPartyManagedCertificateParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFirstPartyManagedCertificateParameters: %+v", err) + } + + decoded["type"] = "AzureFirstPartyManagedCertificate" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFirstPartyManagedCertificateParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_customercertificateparameters.go b/resource-manager/cdn/2024-02-01/secrets/model_customercertificateparameters.go new file mode 100644 index 00000000000..4912cb0e09c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_customercertificateparameters.go @@ -0,0 +1,57 @@ +package secrets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretParameters = CustomerCertificateParameters{} + +type CustomerCertificateParameters struct { + CertificateAuthority *string `json:"certificateAuthority,omitempty"` + ExpirationDate *string `json:"expirationDate,omitempty"` + SecretSource ResourceReference `json:"secretSource"` + SecretVersion *string `json:"secretVersion,omitempty"` + Subject *string `json:"subject,omitempty"` + SubjectAlternativeNames *[]string `json:"subjectAlternativeNames,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + UseLatestVersion *bool `json:"useLatestVersion,omitempty"` + + // Fields inherited from SecretParameters + + Type SecretType `json:"type"` +} + +func (s CustomerCertificateParameters) SecretParameters() BaseSecretParametersImpl { + return BaseSecretParametersImpl{ + Type: s.Type, + } +} + +var _ json.Marshaler = CustomerCertificateParameters{} + +func (s CustomerCertificateParameters) MarshalJSON() ([]byte, error) { + type wrapper CustomerCertificateParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CustomerCertificateParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CustomerCertificateParameters: %+v", err) + } + + decoded["type"] = "CustomerCertificate" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CustomerCertificateParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_managedcertificateparameters.go b/resource-manager/cdn/2024-02-01/secrets/model_managedcertificateparameters.go new file mode 100644 index 00000000000..0d50cb01461 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_managedcertificateparameters.go @@ -0,0 +1,51 @@ +package secrets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretParameters = ManagedCertificateParameters{} + +type ManagedCertificateParameters struct { + ExpirationDate *string `json:"expirationDate,omitempty"` + Subject *string `json:"subject,omitempty"` + + // Fields inherited from SecretParameters + + Type SecretType `json:"type"` +} + +func (s ManagedCertificateParameters) SecretParameters() BaseSecretParametersImpl { + return BaseSecretParametersImpl{ + Type: s.Type, + } +} + +var _ json.Marshaler = ManagedCertificateParameters{} + +func (s ManagedCertificateParameters) MarshalJSON() ([]byte, error) { + type wrapper ManagedCertificateParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ManagedCertificateParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ManagedCertificateParameters: %+v", err) + } + + decoded["type"] = "ManagedCertificate" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ManagedCertificateParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_resourcereference.go b/resource-manager/cdn/2024-02-01/secrets/model_resourcereference.go new file mode 100644 index 00000000000..873436b4dd8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_resourcereference.go @@ -0,0 +1,8 @@ +package secrets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_secret.go b/resource-manager/cdn/2024-02-01/secrets/model_secret.go new file mode 100644 index 00000000000..b6dcf9bbefb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_secret.go @@ -0,0 +1,16 @@ +package secrets + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Secret struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SecretProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_secretparameters.go b/resource-manager/cdn/2024-02-01/secrets/model_secretparameters.go new file mode 100644 index 00000000000..fa7184fcdeb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_secretparameters.go @@ -0,0 +1,99 @@ +package secrets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretParameters interface { + SecretParameters() BaseSecretParametersImpl +} + +var _ SecretParameters = BaseSecretParametersImpl{} + +type BaseSecretParametersImpl struct { + Type SecretType `json:"type"` +} + +func (s BaseSecretParametersImpl) SecretParameters() BaseSecretParametersImpl { + return s +} + +var _ SecretParameters = RawSecretParametersImpl{} + +// RawSecretParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSecretParametersImpl struct { + secretParameters BaseSecretParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretParametersImpl) SecretParameters() BaseSecretParametersImpl { + return s.secretParameters +} + +func UnmarshalSecretParametersImplementation(input []byte) (SecretParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SecretParameters into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AzureFirstPartyManagedCertificate") { + var out AzureFirstPartyManagedCertificateParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFirstPartyManagedCertificateParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CustomerCertificate") { + var out CustomerCertificateParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CustomerCertificateParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ManagedCertificate") { + var out ManagedCertificateParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ManagedCertificateParameters: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "UrlSigningKey") { + var out UrlSigningKeyParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UrlSigningKeyParameters: %+v", err) + } + return out, nil + } + + var parent BaseSecretParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretParametersImpl: %+v", err) + } + + return RawSecretParametersImpl{ + secretParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_secretproperties.go b/resource-manager/cdn/2024-02-01/secrets/model_secretproperties.go new file mode 100644 index 00000000000..a3b577ebe91 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_secretproperties.go @@ -0,0 +1,44 @@ +package secrets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretProperties struct { + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + Parameters SecretParameters `json:"parameters"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` +} + +var _ json.Unmarshaler = &SecretProperties{} + +func (s *SecretProperties) UnmarshalJSON(bytes []byte) error { + type alias SecretProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SecretProperties: %+v", err) + } + + s.DeploymentStatus = decoded.DeploymentStatus + s.ProfileName = decoded.ProfileName + s.ProvisioningState = decoded.ProvisioningState + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SecretProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["parameters"]; ok { + impl, err := UnmarshalSecretParametersImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Parameters' for 'SecretProperties': %+v", err) + } + s.Parameters = impl + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/model_urlsigningkeyparameters.go b/resource-manager/cdn/2024-02-01/secrets/model_urlsigningkeyparameters.go new file mode 100644 index 00000000000..0d9110f3f48 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/model_urlsigningkeyparameters.go @@ -0,0 +1,52 @@ +package secrets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretParameters = UrlSigningKeyParameters{} + +type UrlSigningKeyParameters struct { + KeyId string `json:"keyId"` + SecretSource ResourceReference `json:"secretSource"` + SecretVersion *string `json:"secretVersion,omitempty"` + + // Fields inherited from SecretParameters + + Type SecretType `json:"type"` +} + +func (s UrlSigningKeyParameters) SecretParameters() BaseSecretParametersImpl { + return BaseSecretParametersImpl{ + Type: s.Type, + } +} + +var _ json.Marshaler = UrlSigningKeyParameters{} + +func (s UrlSigningKeyParameters) MarshalJSON() ([]byte, error) { + type wrapper UrlSigningKeyParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UrlSigningKeyParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UrlSigningKeyParameters: %+v", err) + } + + decoded["type"] = "UrlSigningKey" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UrlSigningKeyParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/secrets/predicates.go b/resource-manager/cdn/2024-02-01/secrets/predicates.go new file mode 100644 index 00000000000..7bff4879b50 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/predicates.go @@ -0,0 +1,27 @@ +package secrets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p SecretOperationPredicate) Matches(input Secret) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/secrets/version.go b/resource-manager/cdn/2024-02-01/secrets/version.go new file mode 100644 index 00000000000..9c901ab7139 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/secrets/version.go @@ -0,0 +1,10 @@ +package secrets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/secrets/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/README.md b/resource-manager/cdn/2024-02-01/securitypolicies/README.md new file mode 100644 index 00000000000..c961e5e15fa --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/README.md @@ -0,0 +1,99 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/securitypolicies` Documentation + +The `securitypolicies` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/securitypolicies" +``` + + +### Client Initialization + +```go +client := securitypolicies.NewSecurityPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SecurityPoliciesClient.Create` + +```go +ctx := context.TODO() +id := securitypolicies.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue") + +payload := securitypolicies.SecurityPolicy{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecurityPoliciesClient.Delete` + +```go +ctx := context.TODO() +id := securitypolicies.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `SecurityPoliciesClient.Get` + +```go +ctx := context.TODO() +id := securitypolicies.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `SecurityPoliciesClient.ListByProfile` + +```go +ctx := context.TODO() +id := securitypolicies.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination +items, err := client.ListByProfileComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `SecurityPoliciesClient.Patch` + +```go +ctx := context.TODO() +id := securitypolicies.NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue") + +payload := securitypolicies.SecurityPolicyUpdateParameters{ + // ... +} + + +if err := client.PatchThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/client.go b/resource-manager/cdn/2024-02-01/securitypolicies/client.go new file mode 100644 index 00000000000..55cc8c476cb --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/client.go @@ -0,0 +1,26 @@ +package securitypolicies + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPoliciesClient struct { + Client *resourcemanager.Client +} + +func NewSecurityPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPoliciesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "securitypolicies", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SecurityPoliciesClient: %+v", err) + } + + return &SecurityPoliciesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/constants.go b/resource-manager/cdn/2024-02-01/securitypolicies/constants.go new file mode 100644 index 00000000000..7354c2cb326 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/constants.go @@ -0,0 +1,145 @@ +package securitypolicies + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +func PossibleValuesForAfdProvisioningState() []string { + return []string{ + string(AfdProvisioningStateCreating), + string(AfdProvisioningStateDeleting), + string(AfdProvisioningStateFailed), + string(AfdProvisioningStateSucceeded), + string(AfdProvisioningStateUpdating), + } +} + +func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAfdProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAfdProvisioningState(input string) (*AfdProvisioningState, error) { + vals := map[string]AfdProvisioningState{ + "creating": AfdProvisioningStateCreating, + "deleting": AfdProvisioningStateDeleting, + "failed": AfdProvisioningStateFailed, + "succeeded": AfdProvisioningStateSucceeded, + "updating": AfdProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AfdProvisioningState(input) + return &out, nil +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +func PossibleValuesForDeploymentStatus() []string { + return []string{ + string(DeploymentStatusFailed), + string(DeploymentStatusInProgress), + string(DeploymentStatusNotStarted), + string(DeploymentStatusSucceeded), + } +} + +func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeploymentStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeploymentStatus(input string) (*DeploymentStatus, error) { + vals := map[string]DeploymentStatus{ + "failed": DeploymentStatusFailed, + "inprogress": DeploymentStatusInProgress, + "notstarted": DeploymentStatusNotStarted, + "succeeded": DeploymentStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeploymentStatus(input) + return &out, nil +} + +type SecurityPolicyType string + +const ( + SecurityPolicyTypeWebApplicationFirewall SecurityPolicyType = "WebApplicationFirewall" +) + +func PossibleValuesForSecurityPolicyType() []string { + return []string{ + string(SecurityPolicyTypeWebApplicationFirewall), + } +} + +func (s *SecurityPolicyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSecurityPolicyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSecurityPolicyType(input string) (*SecurityPolicyType, error) { + vals := map[string]SecurityPolicyType{ + "webapplicationfirewall": SecurityPolicyTypeWebApplicationFirewall, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SecurityPolicyType(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/id_profile.go b/resource-manager/cdn/2024-02-01/securitypolicies/id_profile.go new file mode 100644 index 00000000000..8b0a028efe4 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/id_profile.go @@ -0,0 +1,130 @@ +package securitypolicies + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/id_profile_test.go b/resource-manager/cdn/2024-02-01/securitypolicies/id_profile_test.go new file mode 100644 index 00000000000..1ff9b3c3b84 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/id_profile_test.go @@ -0,0 +1,282 @@ +package securitypolicies + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy.go b/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy.go new file mode 100644 index 00000000000..46ba802e9bf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy.go @@ -0,0 +1,139 @@ +package securitypolicies + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&SecurityPolicyId{}) +} + +var _ resourceids.ResourceId = &SecurityPolicyId{} + +// SecurityPolicyId is a struct representing the Resource ID for a Security Policy +type SecurityPolicyId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string + SecurityPolicyName string +} + +// NewSecurityPolicyID returns a new SecurityPolicyId struct +func NewSecurityPolicyID(subscriptionId string, resourceGroupName string, profileName string, securityPolicyName string) SecurityPolicyId { + return SecurityPolicyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + SecurityPolicyName: securityPolicyName, + } +} + +// ParseSecurityPolicyID parses 'input' into a SecurityPolicyId +func ParseSecurityPolicyID(input string) (*SecurityPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecurityPolicyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecurityPolicyId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseSecurityPolicyIDInsensitively parses 'input' case-insensitively into a SecurityPolicyId +// note: this method should only be used for API response data and not user input +func ParseSecurityPolicyIDInsensitively(input string) (*SecurityPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&SecurityPolicyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := SecurityPolicyId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *SecurityPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + if id.SecurityPolicyName, ok = input.Parsed["securityPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "securityPolicyName", input) + } + + return nil +} + +// ValidateSecurityPolicyID checks that 'input' can be parsed as a Security Policy ID +func ValidateSecurityPolicyID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseSecurityPolicyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Security Policy ID +func (id SecurityPolicyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s/securityPolicies/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName, id.SecurityPolicyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Security Policy ID +func (id SecurityPolicyId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + resourceids.StaticSegment("staticSecurityPolicies", "securityPolicies", "securityPolicies"), + resourceids.UserSpecifiedSegment("securityPolicyName", "securityPolicyValue"), + } +} + +// String returns a human-readable description of this Security Policy ID +func (id SecurityPolicyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + fmt.Sprintf("Security Policy Name: %q", id.SecurityPolicyName), + } + return fmt.Sprintf("Security Policy (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy_test.go b/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy_test.go new file mode 100644 index 00000000000..211c76c7204 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/id_securitypolicy_test.go @@ -0,0 +1,327 @@ +package securitypolicies + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &SecurityPolicyId{} + +func TestNewSecurityPolicyID(t *testing.T) { + id := NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } + + if id.SecurityPolicyName != "securityPolicyValue" { + t.Fatalf("Expected %q but got %q for Segment 'SecurityPolicyName'", id.SecurityPolicyName, "securityPolicyValue") + } +} + +func TestFormatSecurityPolicyID(t *testing.T) { + actual := NewSecurityPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue", "securityPolicyValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies/securityPolicyValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseSecurityPolicyID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *SecurityPolicyId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies/securityPolicyValue", + Expected: &SecurityPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + SecurityPolicyName: "securityPolicyValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies/securityPolicyValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseSecurityPolicyID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.SecurityPolicyName != v.Expected.SecurityPolicyName { + t.Fatalf("Expected %q but got %q for SecurityPolicyName", v.Expected.SecurityPolicyName, actual.SecurityPolicyName) + } + + } +} + +func TestParseSecurityPolicyIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *SecurityPolicyId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcUrItYpOlIcIeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies/securityPolicyValue", + Expected: &SecurityPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + SecurityPolicyName: "securityPolicyValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/securityPolicies/securityPolicyValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcUrItYpOlIcIeS/sEcUrItYpOlIcYvAlUe", + Expected: &SecurityPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + SecurityPolicyName: "sEcUrItYpOlIcYvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/sEcUrItYpOlIcIeS/sEcUrItYpOlIcYvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseSecurityPolicyIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + if actual.SecurityPolicyName != v.Expected.SecurityPolicyName { + t.Fatalf("Expected %q but got %q for SecurityPolicyName", v.Expected.SecurityPolicyName, actual.SecurityPolicyName) + } + + } +} + +func TestSegmentsForSecurityPolicyId(t *testing.T) { + segments := SecurityPolicyId{}.Segments() + if len(segments) == 0 { + t.Fatalf("SecurityPolicyId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/method_create.go b/resource-manager/cdn/2024-02-01/securitypolicies/method_create.go new file mode 100644 index 00000000000..a95ec9d76fd --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/method_create.go @@ -0,0 +1,76 @@ +package securitypolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *SecurityPolicy +} + +// Create ... +func (c SecurityPoliciesClient) Create(ctx context.Context, id SecurityPolicyId, input SecurityPolicy) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c SecurityPoliciesClient) CreateThenPoll(ctx context.Context, id SecurityPolicyId, input SecurityPolicy) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/method_delete.go b/resource-manager/cdn/2024-02-01/securitypolicies/method_delete.go new file mode 100644 index 00000000000..9367d103c07 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/method_delete.go @@ -0,0 +1,71 @@ +package securitypolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c SecurityPoliciesClient) Delete(ctx context.Context, id SecurityPolicyId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c SecurityPoliciesClient) DeleteThenPoll(ctx context.Context, id SecurityPolicyId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/method_get.go b/resource-manager/cdn/2024-02-01/securitypolicies/method_get.go new file mode 100644 index 00000000000..c6e380485b2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/method_get.go @@ -0,0 +1,53 @@ +package securitypolicies + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *SecurityPolicy +} + +// Get ... +func (c SecurityPoliciesClient) Get(ctx context.Context, id SecurityPolicyId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model SecurityPolicy + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/method_listbyprofile.go b/resource-manager/cdn/2024-02-01/securitypolicies/method_listbyprofile.go new file mode 100644 index 00000000000..322dbf96b30 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/method_listbyprofile.go @@ -0,0 +1,105 @@ +package securitypolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByProfileOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SecurityPolicy +} + +type ListByProfileCompleteResult struct { + LatestHttpResponse *http.Response + Items []SecurityPolicy +} + +type ListByProfileCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByProfileCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByProfile ... +func (c SecurityPoliciesClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByProfileCustomPager{}, + Path: fmt.Sprintf("%s/securityPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SecurityPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByProfileComplete retrieves all the results into a single object +func (c SecurityPoliciesClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error) { + return c.ListByProfileCompleteMatchingPredicate(ctx, id, SecurityPolicyOperationPredicate{}) +} + +// ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SecurityPoliciesClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate SecurityPolicyOperationPredicate) (result ListByProfileCompleteResult, err error) { + items := make([]SecurityPolicy, 0) + + resp, err := c.ListByProfile(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByProfileCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/method_patch.go b/resource-manager/cdn/2024-02-01/securitypolicies/method_patch.go new file mode 100644 index 00000000000..c0f9a10b203 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/method_patch.go @@ -0,0 +1,75 @@ +package securitypolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PatchOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *SecurityPolicy +} + +// Patch ... +func (c SecurityPoliciesClient) Patch(ctx context.Context, id SecurityPolicyId, input SecurityPolicyUpdateParameters) (result PatchOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PatchThenPoll performs Patch then polls until it's completed +func (c SecurityPoliciesClient) PatchThenPoll(ctx context.Context, id SecurityPolicyId, input SecurityPolicyUpdateParameters) error { + result, err := c.Patch(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Patch: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Patch: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_activatedresourcereference.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_activatedresourcereference.go new file mode 100644 index 00000000000..98cdc9bedc9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_activatedresourcereference.go @@ -0,0 +1,9 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ActivatedResourceReference struct { + Id *string `json:"id,omitempty"` + IsActive *bool `json:"isActive,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_resourcereference.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_resourcereference.go new file mode 100644 index 00000000000..d5146482393 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_resourcereference.go @@ -0,0 +1,8 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceReference struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicy.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicy.go new file mode 100644 index 00000000000..798a87168df --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicy.go @@ -0,0 +1,16 @@ +package securitypolicies + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicy struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *SecurityPolicyProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyproperties.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyproperties.go new file mode 100644 index 00000000000..c86f2fcd678 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyproperties.go @@ -0,0 +1,44 @@ +package securitypolicies + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyProperties struct { + DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` + Parameters SecurityPolicyPropertiesParameters `json:"parameters"` + ProfileName *string `json:"profileName,omitempty"` + ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"` +} + +var _ json.Unmarshaler = &SecurityPolicyProperties{} + +func (s *SecurityPolicyProperties) UnmarshalJSON(bytes []byte) error { + type alias SecurityPolicyProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SecurityPolicyProperties: %+v", err) + } + + s.DeploymentStatus = decoded.DeploymentStatus + s.ProfileName = decoded.ProfileName + s.ProvisioningState = decoded.ProvisioningState + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SecurityPolicyProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["parameters"]; ok { + impl, err := UnmarshalSecurityPolicyPropertiesParametersImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Parameters' for 'SecurityPolicyProperties': %+v", err) + } + s.Parameters = impl + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicypropertiesparameters.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicypropertiesparameters.go new file mode 100644 index 00000000000..b500fb550ea --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicypropertiesparameters.go @@ -0,0 +1,75 @@ +package securitypolicies + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyPropertiesParameters interface { + SecurityPolicyPropertiesParameters() BaseSecurityPolicyPropertiesParametersImpl +} + +var _ SecurityPolicyPropertiesParameters = BaseSecurityPolicyPropertiesParametersImpl{} + +type BaseSecurityPolicyPropertiesParametersImpl struct { + Type SecurityPolicyType `json:"type"` +} + +func (s BaseSecurityPolicyPropertiesParametersImpl) SecurityPolicyPropertiesParameters() BaseSecurityPolicyPropertiesParametersImpl { + return s +} + +var _ SecurityPolicyPropertiesParameters = RawSecurityPolicyPropertiesParametersImpl{} + +// RawSecurityPolicyPropertiesParametersImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSecurityPolicyPropertiesParametersImpl struct { + securityPolicyPropertiesParameters BaseSecurityPolicyPropertiesParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawSecurityPolicyPropertiesParametersImpl) SecurityPolicyPropertiesParameters() BaseSecurityPolicyPropertiesParametersImpl { + return s.securityPolicyPropertiesParameters +} + +func UnmarshalSecurityPolicyPropertiesParametersImplementation(input []byte) (SecurityPolicyPropertiesParameters, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SecurityPolicyPropertiesParameters into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "WebApplicationFirewall") { + var out SecurityPolicyWebApplicationFirewallParameters + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SecurityPolicyWebApplicationFirewallParameters: %+v", err) + } + return out, nil + } + + var parent BaseSecurityPolicyPropertiesParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityPolicyPropertiesParametersImpl: %+v", err) + } + + return RawSecurityPolicyPropertiesParametersImpl{ + securityPolicyPropertiesParameters: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateparameters.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateparameters.go new file mode 100644 index 00000000000..c9ee5951959 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateparameters.go @@ -0,0 +1,8 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyUpdateParameters struct { + Properties *SecurityPolicyUpdateProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateproperties.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateproperties.go new file mode 100644 index 00000000000..914e3bd54ab --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicyupdateproperties.go @@ -0,0 +1,32 @@ +package securitypolicies + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyUpdateProperties struct { + Parameters SecurityPolicyPropertiesParameters `json:"parameters"` +} + +var _ json.Unmarshaler = &SecurityPolicyUpdateProperties{} + +func (s *SecurityPolicyUpdateProperties) UnmarshalJSON(bytes []byte) error { + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SecurityPolicyUpdateProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["parameters"]; ok { + impl, err := UnmarshalSecurityPolicyPropertiesParametersImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Parameters' for 'SecurityPolicyUpdateProperties': %+v", err) + } + s.Parameters = impl + } + return nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallassociation.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallassociation.go new file mode 100644 index 00000000000..78cfbe4a259 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallassociation.go @@ -0,0 +1,9 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyWebApplicationFirewallAssociation struct { + Domains *[]ActivatedResourceReference `json:"domains,omitempty"` + PatternsToMatch *[]string `json:"patternsToMatch,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallparameters.go b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallparameters.go new file mode 100644 index 00000000000..26581196cc8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/model_securitypolicywebapplicationfirewallparameters.go @@ -0,0 +1,51 @@ +package securitypolicies + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecurityPolicyPropertiesParameters = SecurityPolicyWebApplicationFirewallParameters{} + +type SecurityPolicyWebApplicationFirewallParameters struct { + Associations *[]SecurityPolicyWebApplicationFirewallAssociation `json:"associations,omitempty"` + WafPolicy *ResourceReference `json:"wafPolicy,omitempty"` + + // Fields inherited from SecurityPolicyPropertiesParameters + + Type SecurityPolicyType `json:"type"` +} + +func (s SecurityPolicyWebApplicationFirewallParameters) SecurityPolicyPropertiesParameters() BaseSecurityPolicyPropertiesParametersImpl { + return BaseSecurityPolicyPropertiesParametersImpl{ + Type: s.Type, + } +} + +var _ json.Marshaler = SecurityPolicyWebApplicationFirewallParameters{} + +func (s SecurityPolicyWebApplicationFirewallParameters) MarshalJSON() ([]byte, error) { + type wrapper SecurityPolicyWebApplicationFirewallParameters + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SecurityPolicyWebApplicationFirewallParameters: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SecurityPolicyWebApplicationFirewallParameters: %+v", err) + } + + decoded["type"] = "WebApplicationFirewall" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SecurityPolicyWebApplicationFirewallParameters: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/predicates.go b/resource-manager/cdn/2024-02-01/securitypolicies/predicates.go new file mode 100644 index 00000000000..4b70b7eef24 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/predicates.go @@ -0,0 +1,27 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecurityPolicyOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p SecurityPolicyOperationPredicate) Matches(input SecurityPolicy) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/securitypolicies/version.go b/resource-manager/cdn/2024-02-01/securitypolicies/version.go new file mode 100644 index 00000000000..16b6141b4c0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/securitypolicies/version.go @@ -0,0 +1,10 @@ +package securitypolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/securitypolicies/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/validateprobe/README.md b/resource-manager/cdn/2024-02-01/validateprobe/README.md new file mode 100644 index 00000000000..5e9729369a8 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/README.md @@ -0,0 +1,42 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/validateprobe` Documentation + +The `validateprobe` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/validateprobe" +``` + + +### Client Initialization + +```go +client := validateprobe.NewValidateProbeClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ValidateProbeClient.ValidateProbe` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := validateprobe.ValidateProbeInput{ + // ... +} + + +read, err := client.ValidateProbe(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/validateprobe/client.go b/resource-manager/cdn/2024-02-01/validateprobe/client.go new file mode 100644 index 00000000000..b3f42961472 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/client.go @@ -0,0 +1,26 @@ +package validateprobe + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateProbeClient struct { + Client *resourcemanager.Client +} + +func NewValidateProbeClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateProbeClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "validateprobe", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ValidateProbeClient: %+v", err) + } + + return &ValidateProbeClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/validateprobe/method_validateprobe.go b/resource-manager/cdn/2024-02-01/validateprobe/method_validateprobe.go new file mode 100644 index 00000000000..18904e828f2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/method_validateprobe.go @@ -0,0 +1,59 @@ +package validateprobe + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateProbeOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ValidateProbeOutput +} + +// ValidateProbe ... +func (c ValidateProbeClient) ValidateProbe(ctx context.Context, id commonids.SubscriptionId, input ValidateProbeInput) (result ValidateProbeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/validateProbe", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ValidateProbeOutput + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeinput.go b/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeinput.go new file mode 100644 index 00000000000..cdc3cc24a15 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeinput.go @@ -0,0 +1,8 @@ +package validateprobe + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateProbeInput struct { + ProbeURL string `json:"probeURL"` +} diff --git a/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeoutput.go b/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeoutput.go new file mode 100644 index 00000000000..a6e30c2b48e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/model_validateprobeoutput.go @@ -0,0 +1,10 @@ +package validateprobe + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateProbeOutput struct { + ErrorCode *string `json:"errorCode,omitempty"` + IsValid *bool `json:"isValid,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/validateprobe/version.go b/resource-manager/cdn/2024-02-01/validateprobe/version.go new file mode 100644 index 00000000000..6dfe94d8f52 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/validateprobe/version.go @@ -0,0 +1,10 @@ +package validateprobe + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/validateprobe/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/README.md b/resource-manager/cdn/2024-02-01/wafloganalytics/README.md new file mode 100644 index 00000000000..ab2cfc4dd68 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/README.md @@ -0,0 +1,52 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/wafloganalytics` Documentation + +The `wafloganalytics` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/wafloganalytics" +``` + + +### Client Initialization + +```go +client := wafloganalytics.NewWafLogAnalyticsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WafLogAnalyticsClient.LogAnalyticsGetWafLogAnalyticsMetrics` + +```go +ctx := context.TODO() +id := wafloganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.LogAnalyticsGetWafLogAnalyticsMetrics(ctx, id, wafloganalytics.DefaultLogAnalyticsGetWafLogAnalyticsMetricsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WafLogAnalyticsClient.LogAnalyticsGetWafLogAnalyticsRankings` + +```go +ctx := context.TODO() +id := wafloganalytics.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + +read, err := client.LogAnalyticsGetWafLogAnalyticsRankings(ctx, id, wafloganalytics.DefaultLogAnalyticsGetWafLogAnalyticsRankingsOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/client.go b/resource-manager/cdn/2024-02-01/wafloganalytics/client.go new file mode 100644 index 00000000000..9f7f2377b6d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/client.go @@ -0,0 +1,26 @@ +package wafloganalytics + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafLogAnalyticsClient struct { + Client *resourcemanager.Client +} + +func NewWafLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*WafLogAnalyticsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "wafloganalytics", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating WafLogAnalyticsClient: %+v", err) + } + + return &WafLogAnalyticsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/constants.go b/resource-manager/cdn/2024-02-01/wafloganalytics/constants.go new file mode 100644 index 00000000000..a7b76c70b96 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/constants.go @@ -0,0 +1,136 @@ +package wafloganalytics + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafGranularity string + +const ( + WafGranularityPOneD WafGranularity = "P1D" + WafGranularityPTFiveM WafGranularity = "PT5M" + WafGranularityPTOneH WafGranularity = "PT1H" +) + +func PossibleValuesForWafGranularity() []string { + return []string{ + string(WafGranularityPOneD), + string(WafGranularityPTFiveM), + string(WafGranularityPTOneH), + } +} + +func (s *WafGranularity) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWafGranularity(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWafGranularity(input string) (*WafGranularity, error) { + vals := map[string]WafGranularity{ + "p1d": WafGranularityPOneD, + "pt5m": WafGranularityPTFiveM, + "pt1h": WafGranularityPTOneH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WafGranularity(input) + return &out, nil +} + +type WafMetricsGranularity string + +const ( + WafMetricsGranularityPOneD WafMetricsGranularity = "P1D" + WafMetricsGranularityPTFiveM WafMetricsGranularity = "PT5M" + WafMetricsGranularityPTOneH WafMetricsGranularity = "PT1H" +) + +func PossibleValuesForWafMetricsGranularity() []string { + return []string{ + string(WafMetricsGranularityPOneD), + string(WafMetricsGranularityPTFiveM), + string(WafMetricsGranularityPTOneH), + } +} + +func (s *WafMetricsGranularity) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWafMetricsGranularity(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWafMetricsGranularity(input string) (*WafMetricsGranularity, error) { + vals := map[string]WafMetricsGranularity{ + "p1d": WafMetricsGranularityPOneD, + "pt5m": WafMetricsGranularityPTFiveM, + "pt1h": WafMetricsGranularityPTOneH, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WafMetricsGranularity(input) + return &out, nil +} + +type WafMetricsSeriesUnit string + +const ( + WafMetricsSeriesUnitCount WafMetricsSeriesUnit = "count" +) + +func PossibleValuesForWafMetricsSeriesUnit() []string { + return []string{ + string(WafMetricsSeriesUnitCount), + } +} + +func (s *WafMetricsSeriesUnit) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWafMetricsSeriesUnit(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWafMetricsSeriesUnit(input string) (*WafMetricsSeriesUnit, error) { + vals := map[string]WafMetricsSeriesUnit{ + "count": WafMetricsSeriesUnitCount, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WafMetricsSeriesUnit(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile.go b/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile.go new file mode 100644 index 00000000000..e66f463c14a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile.go @@ -0,0 +1,130 @@ +package wafloganalytics + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ProfileId{}) +} + +var _ resourceids.ResourceId = &ProfileId{} + +// ProfileId is a struct representing the Resource ID for a Profile +type ProfileId struct { + SubscriptionId string + ResourceGroupName string + ProfileName string +} + +// NewProfileID returns a new ProfileId struct +func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId { + return ProfileId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ProfileName: profileName, + } +} + +// ParseProfileID parses 'input' into a ProfileId +func ParseProfileID(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId +// note: this method should only be used for API response data and not user input +func ParseProfileIDInsensitively(input string) (*ProfileId, error) { + parser := resourceids.NewParserFromResourceIdType(&ProfileId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ProfileId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ProfileName, ok = input.Parsed["profileName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "profileName", input) + } + + return nil +} + +// ValidateProfileID checks that 'input' can be parsed as a Profile ID +func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseProfileID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Profile ID +func (id ProfileId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/profiles/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ProfileName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Profile ID +func (id ProfileId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticProfiles", "profiles", "profiles"), + resourceids.UserSpecifiedSegment("profileName", "profileValue"), + } +} + +// String returns a human-readable description of this Profile ID +func (id ProfileId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Profile Name: %q", id.ProfileName), + } + return fmt.Sprintf("Profile (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile_test.go b/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile_test.go new file mode 100644 index 00000000000..556f85b7d11 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/id_profile_test.go @@ -0,0 +1,282 @@ +package wafloganalytics + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ProfileId{} + +func TestNewProfileID(t *testing.T) { + id := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ProfileName != "profileValue" { + t.Fatalf("Expected %q but got %q for Segment 'ProfileName'", id.ProfileName, "profileValue") + } +} + +func TestFormatProfileID(t *testing.T) { + actual := NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseProfileID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestParseProfileIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ProfileId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ProfileName: "profileValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/profiles/profileValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE", + Expected: &ProfileId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ProfileName: "pRoFiLeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/pRoFiLeS/pRoFiLeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseProfileIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ProfileName != v.Expected.ProfileName { + t.Fatalf("Expected %q but got %q for ProfileName", v.Expected.ProfileName, actual.ProfileName) + } + + } +} + +func TestSegmentsForProfileId(t *testing.T) { + segments := ProfileId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ProfileId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsmetrics.go b/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsmetrics.go new file mode 100644 index 00000000000..c372d449024 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsmetrics.go @@ -0,0 +1,107 @@ +package wafloganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogAnalyticsGetWafLogAnalyticsMetricsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *WafMetricsResponse +} + +type LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions struct { + Actions *[]string + DateTimeBegin *string + DateTimeEnd *string + Granularity *WafGranularity + GroupBy *[]string + Metrics *[]string + RuleTypes *[]string +} + +func DefaultLogAnalyticsGetWafLogAnalyticsMetricsOperationOptions() LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions { + return LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions{} +} + +func (o LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Actions != nil { + out.Append("actions", fmt.Sprintf("%v", *o.Actions)) + } + if o.DateTimeBegin != nil { + out.Append("dateTimeBegin", fmt.Sprintf("%v", *o.DateTimeBegin)) + } + if o.DateTimeEnd != nil { + out.Append("dateTimeEnd", fmt.Sprintf("%v", *o.DateTimeEnd)) + } + if o.Granularity != nil { + out.Append("granularity", fmt.Sprintf("%v", *o.Granularity)) + } + if o.GroupBy != nil { + out.Append("groupBy", fmt.Sprintf("%v", *o.GroupBy)) + } + if o.Metrics != nil { + out.Append("metrics", fmt.Sprintf("%v", *o.Metrics)) + } + if o.RuleTypes != nil { + out.Append("ruleTypes", fmt.Sprintf("%v", *o.RuleTypes)) + } + return &out +} + +// LogAnalyticsGetWafLogAnalyticsMetrics ... +func (c WafLogAnalyticsClient) LogAnalyticsGetWafLogAnalyticsMetrics(ctx context.Context, id ProfileId, options LogAnalyticsGetWafLogAnalyticsMetricsOperationOptions) (result LogAnalyticsGetWafLogAnalyticsMetricsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: fmt.Sprintf("%s/getWafLogAnalyticsMetrics", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model WafMetricsResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsrankings.go b/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsrankings.go new file mode 100644 index 00000000000..0b99c21208d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/method_loganalyticsgetwafloganalyticsrankings.go @@ -0,0 +1,107 @@ +package wafloganalytics + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogAnalyticsGetWafLogAnalyticsRankingsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *WafRankingsResponse +} + +type LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions struct { + Actions *[]string + DateTimeBegin *string + DateTimeEnd *string + MaxRanking *int64 + Metrics *[]string + Rankings *[]string + RuleTypes *[]string +} + +func DefaultLogAnalyticsGetWafLogAnalyticsRankingsOperationOptions() LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions { + return LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions{} +} + +func (o LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Actions != nil { + out.Append("actions", fmt.Sprintf("%v", *o.Actions)) + } + if o.DateTimeBegin != nil { + out.Append("dateTimeBegin", fmt.Sprintf("%v", *o.DateTimeBegin)) + } + if o.DateTimeEnd != nil { + out.Append("dateTimeEnd", fmt.Sprintf("%v", *o.DateTimeEnd)) + } + if o.MaxRanking != nil { + out.Append("maxRanking", fmt.Sprintf("%v", *o.MaxRanking)) + } + if o.Metrics != nil { + out.Append("metrics", fmt.Sprintf("%v", *o.Metrics)) + } + if o.Rankings != nil { + out.Append("rankings", fmt.Sprintf("%v", *o.Rankings)) + } + if o.RuleTypes != nil { + out.Append("ruleTypes", fmt.Sprintf("%v", *o.RuleTypes)) + } + return &out +} + +// LogAnalyticsGetWafLogAnalyticsRankings ... +func (c WafLogAnalyticsClient) LogAnalyticsGetWafLogAnalyticsRankings(ctx context.Context, id ProfileId, options LogAnalyticsGetWafLogAnalyticsRankingsOperationOptions) (result LogAnalyticsGetWafLogAnalyticsRankingsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Path: fmt.Sprintf("%s/getWafLogAnalyticsRankings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model WafRankingsResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponse.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponse.go new file mode 100644 index 00000000000..290fdaacf39 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponse.go @@ -0,0 +1,41 @@ +package wafloganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafMetricsResponse struct { + DateTimeBegin *string `json:"dateTimeBegin,omitempty"` + DateTimeEnd *string `json:"dateTimeEnd,omitempty"` + Granularity *WafMetricsGranularity `json:"granularity,omitempty"` + Series *[]WafMetricsResponseSeriesInlined `json:"series,omitempty"` +} + +func (o *WafMetricsResponse) GetDateTimeBeginAsTime() (*time.Time, error) { + if o.DateTimeBegin == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeBegin, "2006-01-02T15:04:05Z07:00") +} + +func (o *WafMetricsResponse) SetDateTimeBeginAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeBegin = &formatted +} + +func (o *WafMetricsResponse) GetDateTimeEndAsTime() (*time.Time, error) { + if o.DateTimeEnd == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeEnd, "2006-01-02T15:04:05Z07:00") +} + +func (o *WafMetricsResponse) SetDateTimeEndAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeEnd = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlined.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlined.go new file mode 100644 index 00000000000..684ed281daf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlined.go @@ -0,0 +1,11 @@ +package wafloganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafMetricsResponseSeriesInlined struct { + Data *[]WafMetricsResponseSeriesInlinedDataInlined `json:"data,omitempty"` + Groups *[]WafMetricsResponseSeriesInlinedGroupsInlined `json:"groups,omitempty"` + Metric *string `json:"metric,omitempty"` + Unit *WafMetricsSeriesUnit `json:"unit,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlineddatainlined.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlineddatainlined.go new file mode 100644 index 00000000000..d4ed9da14f3 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlineddatainlined.go @@ -0,0 +1,27 @@ +package wafloganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafMetricsResponseSeriesInlinedDataInlined struct { + DateTime *string `json:"dateTime,omitempty"` + Value *float64 `json:"value,omitempty"` +} + +func (o *WafMetricsResponseSeriesInlinedDataInlined) GetDateTimeAsTime() (*time.Time, error) { + if o.DateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *WafMetricsResponseSeriesInlinedDataInlined) SetDateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTime = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlinedgroupsinlined.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlinedgroupsinlined.go new file mode 100644 index 00000000000..df00ac2df23 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafmetricsresponseseriesinlinedgroupsinlined.go @@ -0,0 +1,9 @@ +package wafloganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafMetricsResponseSeriesInlinedGroupsInlined struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponse.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponse.go new file mode 100644 index 00000000000..a19dd330615 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponse.go @@ -0,0 +1,41 @@ +package wafloganalytics + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafRankingsResponse struct { + Data *[]WafRankingsResponseDataInlined `json:"data,omitempty"` + DateTimeBegin *string `json:"dateTimeBegin,omitempty"` + DateTimeEnd *string `json:"dateTimeEnd,omitempty"` + Groups *[]string `json:"groups,omitempty"` +} + +func (o *WafRankingsResponse) GetDateTimeBeginAsTime() (*time.Time, error) { + if o.DateTimeBegin == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeBegin, "2006-01-02T15:04:05Z07:00") +} + +func (o *WafRankingsResponse) SetDateTimeBeginAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeBegin = &formatted +} + +func (o *WafRankingsResponse) GetDateTimeEndAsTime() (*time.Time, error) { + if o.DateTimeEnd == nil { + return nil, nil + } + return dates.ParseAsFormat(o.DateTimeEnd, "2006-01-02T15:04:05Z07:00") +} + +func (o *WafRankingsResponse) SetDateTimeEndAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.DateTimeEnd = &formatted +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlined.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlined.go new file mode 100644 index 00000000000..920ad82073f --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlined.go @@ -0,0 +1,9 @@ +package wafloganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafRankingsResponseDataInlined struct { + GroupValues *[]string `json:"groupValues,omitempty"` + Metrics *[]WafRankingsResponseDataInlinedMetricsInlined `json:"metrics,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlinedmetricsinlined.go b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlinedmetricsinlined.go new file mode 100644 index 00000000000..995bfd9deee --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/model_wafrankingsresponsedatainlinedmetricsinlined.go @@ -0,0 +1,10 @@ +package wafloganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WafRankingsResponseDataInlinedMetricsInlined struct { + Metric *string `json:"metric,omitempty"` + Percentage *float64 `json:"percentage,omitempty"` + Value *int64 `json:"value,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/wafloganalytics/version.go b/resource-manager/cdn/2024-02-01/wafloganalytics/version.go new file mode 100644 index 00000000000..349bd024e61 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/wafloganalytics/version.go @@ -0,0 +1,10 @@ +package wafloganalytics + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/wafloganalytics/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/README.md b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/README.md new file mode 100644 index 00000000000..1e76786d72c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/README.md @@ -0,0 +1,38 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets` Documentation + +The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets" +``` + + +### Client Initialization + +```go +client := webapplicationfirewallmanagedrulesets.NewWebApplicationFirewallManagedRuleSetsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WebApplicationFirewallManagedRuleSetsClient.ManagedRuleSetsList` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ManagedRuleSetsList(ctx, id)` can be used to do batched pagination +items, err := client.ManagedRuleSetsListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/client.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/client.go new file mode 100644 index 00000000000..53abfa89e7e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/client.go @@ -0,0 +1,26 @@ +package webapplicationfirewallmanagedrulesets + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallManagedRuleSetsClient struct { + Client *resourcemanager.Client +} + +func NewWebApplicationFirewallManagedRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallManagedRuleSetsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallmanagedrulesets", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating WebApplicationFirewallManagedRuleSetsClient: %+v", err) + } + + return &WebApplicationFirewallManagedRuleSetsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go new file mode 100644 index 00000000000..62ef54e4413 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go @@ -0,0 +1,84 @@ +package webapplicationfirewallmanagedrulesets + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuName string + +const ( + SkuNameCustomVerizon SkuName = "Custom_Verizon" + SkuNamePremiumAzureFrontDoor SkuName = "Premium_AzureFrontDoor" + SkuNamePremiumVerizon SkuName = "Premium_Verizon" + SkuNameStandardAkamai SkuName = "Standard_Akamai" + SkuNameStandardAvgBandWidthChinaCdn SkuName = "Standard_AvgBandWidth_ChinaCdn" + SkuNameStandardAzureFrontDoor SkuName = "Standard_AzureFrontDoor" + SkuNameStandardChinaCdn SkuName = "Standard_ChinaCdn" + SkuNameStandardMicrosoft SkuName = "Standard_Microsoft" + SkuNameStandardNineFiveFiveBandWidthChinaCdn SkuName = "Standard_955BandWidth_ChinaCdn" + SkuNameStandardPlusAvgBandWidthChinaCdn SkuName = "StandardPlus_AvgBandWidth_ChinaCdn" + SkuNameStandardPlusChinaCdn SkuName = "StandardPlus_ChinaCdn" + SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn SkuName = "StandardPlus_955BandWidth_ChinaCdn" + SkuNameStandardVerizon SkuName = "Standard_Verizon" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameCustomVerizon), + string(SkuNamePremiumAzureFrontDoor), + string(SkuNamePremiumVerizon), + string(SkuNameStandardAkamai), + string(SkuNameStandardAvgBandWidthChinaCdn), + string(SkuNameStandardAzureFrontDoor), + string(SkuNameStandardChinaCdn), + string(SkuNameStandardMicrosoft), + string(SkuNameStandardNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardPlusAvgBandWidthChinaCdn), + string(SkuNameStandardPlusChinaCdn), + string(SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardVerizon), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "custom_verizon": SkuNameCustomVerizon, + "premium_azurefrontdoor": SkuNamePremiumAzureFrontDoor, + "premium_verizon": SkuNamePremiumVerizon, + "standard_akamai": SkuNameStandardAkamai, + "standard_avgbandwidth_chinacdn": SkuNameStandardAvgBandWidthChinaCdn, + "standard_azurefrontdoor": SkuNameStandardAzureFrontDoor, + "standard_chinacdn": SkuNameStandardChinaCdn, + "standard_microsoft": SkuNameStandardMicrosoft, + "standard_955bandwidth_chinacdn": SkuNameStandardNineFiveFiveBandWidthChinaCdn, + "standardplus_avgbandwidth_chinacdn": SkuNameStandardPlusAvgBandWidthChinaCdn, + "standardplus_chinacdn": SkuNameStandardPlusChinaCdn, + "standardplus_955bandwidth_chinacdn": SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn, + "standard_verizon": SkuNameStandardVerizon, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/method_managedrulesetslist.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/method_managedrulesetslist.go new file mode 100644 index 00000000000..ed01a1188d7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/method_managedrulesetslist.go @@ -0,0 +1,106 @@ +package webapplicationfirewallmanagedrulesets + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSetsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ManagedRuleSetDefinition +} + +type ManagedRuleSetsListCompleteResult struct { + LatestHttpResponse *http.Response + Items []ManagedRuleSetDefinition +} + +type ManagedRuleSetsListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ManagedRuleSetsListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ManagedRuleSetsList ... +func (c WebApplicationFirewallManagedRuleSetsClient) ManagedRuleSetsList(ctx context.Context, id commonids.SubscriptionId) (result ManagedRuleSetsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ManagedRuleSetsListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/cdnWebApplicationFirewallManagedRuleSets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ManagedRuleSetDefinition `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ManagedRuleSetsListComplete retrieves all the results into a single object +func (c WebApplicationFirewallManagedRuleSetsClient) ManagedRuleSetsListComplete(ctx context.Context, id commonids.SubscriptionId) (ManagedRuleSetsListCompleteResult, error) { + return c.ManagedRuleSetsListCompleteMatchingPredicate(ctx, id, ManagedRuleSetDefinitionOperationPredicate{}) +} + +// ManagedRuleSetsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c WebApplicationFirewallManagedRuleSetsClient) ManagedRuleSetsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ManagedRuleSetDefinitionOperationPredicate) (result ManagedRuleSetsListCompleteResult, err error) { + items := make([]ManagedRuleSetDefinition, 0) + + resp, err := c.ManagedRuleSetsList(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ManagedRuleSetsListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedruledefinition.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedruledefinition.go new file mode 100644 index 00000000000..d0cd3de3858 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedruledefinition.go @@ -0,0 +1,9 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleDefinition struct { + Description *string `json:"description,omitempty"` + RuleId *string `json:"ruleId,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulegroupdefinition.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulegroupdefinition.go new file mode 100644 index 00000000000..f2663854eb1 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulegroupdefinition.go @@ -0,0 +1,10 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleGroupDefinition struct { + Description *string `json:"description,omitempty"` + RuleGroupName *string `json:"ruleGroupName,omitempty"` + Rules *[]ManagedRuleDefinition `json:"rules,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinition.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinition.go new file mode 100644 index 00000000000..8771892ca42 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinition.go @@ -0,0 +1,17 @@ +package webapplicationfirewallmanagedrulesets + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSetDefinition struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ManagedRuleSetDefinitionProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinitionproperties.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinitionproperties.go new file mode 100644 index 00000000000..ea8c773005d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_managedrulesetdefinitionproperties.go @@ -0,0 +1,11 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSetDefinitionProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + RuleGroups *[]ManagedRuleGroupDefinition `json:"ruleGroups,omitempty"` + RuleSetType *string `json:"ruleSetType,omitempty"` + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_sku.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_sku.go new file mode 100644 index 00000000000..d7de1d49a26 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/model_sku.go @@ -0,0 +1,8 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name *SkuName `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/predicates.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/predicates.go new file mode 100644 index 00000000000..f600223e4ee --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/predicates.go @@ -0,0 +1,27 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSetDefinitionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ManagedRuleSetDefinitionOperationPredicate) Matches(input ManagedRuleSetDefinition) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/version.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/version.go new file mode 100644 index 00000000000..c3fbae2b75a --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallmanagedrulesets/version.go @@ -0,0 +1,10 @@ +package webapplicationfirewallmanagedrulesets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/2024-02-01" +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/README.md b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/README.md new file mode 100644 index 00000000000..a4e110a8f44 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/README.md @@ -0,0 +1,104 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies` Documentation + +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `cdn` (API Version `2024-02-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies" +``` + + +### Client Initialization + +```go +client := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `WebApplicationFirewallPoliciesClient.PoliciesCreateOrUpdate` + +```go +ctx := context.TODO() +id := webapplicationfirewallpolicies.NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue") + +payload := webapplicationfirewallpolicies.CdnWebApplicationFirewallPolicy{ + // ... +} + + +if err := client.PoliciesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `WebApplicationFirewallPoliciesClient.PoliciesDelete` + +```go +ctx := context.TODO() +id := webapplicationfirewallpolicies.NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue") + +read, err := client.PoliciesDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebApplicationFirewallPoliciesClient.PoliciesGet` + +```go +ctx := context.TODO() +id := webapplicationfirewallpolicies.NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue") + +read, err := client.PoliciesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `WebApplicationFirewallPoliciesClient.PoliciesList` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.PoliciesList(ctx, id)` can be used to do batched pagination +items, err := client.PoliciesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `WebApplicationFirewallPoliciesClient.PoliciesUpdate` + +```go +ctx := context.TODO() +id := webapplicationfirewallpolicies.NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue") + +payload := webapplicationfirewallpolicies.CdnWebApplicationFirewallPolicyPatchParameters{ + // ... +} + + +if err := client.PoliciesUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/client.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/client.go new file mode 100644 index 00000000000..225049a7361 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/client.go @@ -0,0 +1,26 @@ +package webapplicationfirewallpolicies + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebApplicationFirewallPoliciesClient struct { + Client *resourcemanager.Client +} + +func NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallPoliciesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) + } + + return &WebApplicationFirewallPoliciesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/constants.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/constants.go new file mode 100644 index 00000000000..c5acc5a0a4b --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/constants.go @@ -0,0 +1,628 @@ +package webapplicationfirewallpolicies + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ActionType string + +const ( + ActionTypeAllow ActionType = "Allow" + ActionTypeBlock ActionType = "Block" + ActionTypeLog ActionType = "Log" + ActionTypeRedirect ActionType = "Redirect" +) + +func PossibleValuesForActionType() []string { + return []string{ + string(ActionTypeAllow), + string(ActionTypeBlock), + string(ActionTypeLog), + string(ActionTypeRedirect), + } +} + +func (s *ActionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseActionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseActionType(input string) (*ActionType, error) { + vals := map[string]ActionType{ + "allow": ActionTypeAllow, + "block": ActionTypeBlock, + "log": ActionTypeLog, + "redirect": ActionTypeRedirect, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ActionType(input) + return &out, nil +} + +type CustomRuleEnabledState string + +const ( + CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled" + CustomRuleEnabledStateEnabled CustomRuleEnabledState = "Enabled" +) + +func PossibleValuesForCustomRuleEnabledState() []string { + return []string{ + string(CustomRuleEnabledStateDisabled), + string(CustomRuleEnabledStateEnabled), + } +} + +func (s *CustomRuleEnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCustomRuleEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCustomRuleEnabledState(input string) (*CustomRuleEnabledState, error) { + vals := map[string]CustomRuleEnabledState{ + "disabled": CustomRuleEnabledStateDisabled, + "enabled": CustomRuleEnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CustomRuleEnabledState(input) + return &out, nil +} + +type DefaultCustomBlockResponseStatusCode string + +const ( + DefaultCustomBlockResponseStatusCodeFourTwoNine DefaultCustomBlockResponseStatusCode = "429" + DefaultCustomBlockResponseStatusCodeFourZeroFive DefaultCustomBlockResponseStatusCode = "405" + DefaultCustomBlockResponseStatusCodeFourZeroSix DefaultCustomBlockResponseStatusCode = "406" + DefaultCustomBlockResponseStatusCodeFourZeroThree DefaultCustomBlockResponseStatusCode = "403" + DefaultCustomBlockResponseStatusCodeTwoHundred DefaultCustomBlockResponseStatusCode = "200" +) + +func PossibleValuesForDefaultCustomBlockResponseStatusCode() []string { + return []string{ + string(DefaultCustomBlockResponseStatusCodeFourTwoNine), + string(DefaultCustomBlockResponseStatusCodeFourZeroFive), + string(DefaultCustomBlockResponseStatusCodeFourZeroSix), + string(DefaultCustomBlockResponseStatusCodeFourZeroThree), + string(DefaultCustomBlockResponseStatusCodeTwoHundred), + } +} + +func (s *DefaultCustomBlockResponseStatusCode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDefaultCustomBlockResponseStatusCode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDefaultCustomBlockResponseStatusCode(input string) (*DefaultCustomBlockResponseStatusCode, error) { + vals := map[string]DefaultCustomBlockResponseStatusCode{ + "429": DefaultCustomBlockResponseStatusCodeFourTwoNine, + "405": DefaultCustomBlockResponseStatusCodeFourZeroFive, + "406": DefaultCustomBlockResponseStatusCodeFourZeroSix, + "403": DefaultCustomBlockResponseStatusCodeFourZeroThree, + "200": DefaultCustomBlockResponseStatusCodeTwoHundred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DefaultCustomBlockResponseStatusCode(input) + return &out, nil +} + +type ManagedRuleEnabledState string + +const ( + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" + ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" +) + +func PossibleValuesForManagedRuleEnabledState() []string { + return []string{ + string(ManagedRuleEnabledStateDisabled), + string(ManagedRuleEnabledStateEnabled), + } +} + +func (s *ManagedRuleEnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedRuleEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedRuleEnabledState(input string) (*ManagedRuleEnabledState, error) { + vals := map[string]ManagedRuleEnabledState{ + "disabled": ManagedRuleEnabledStateDisabled, + "enabled": ManagedRuleEnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedRuleEnabledState(input) + return &out, nil +} + +type Operator string + +const ( + OperatorAny Operator = "Any" + OperatorBeginsWith Operator = "BeginsWith" + OperatorContains Operator = "Contains" + OperatorEndsWith Operator = "EndsWith" + OperatorEqual Operator = "Equal" + OperatorGeoMatch Operator = "GeoMatch" + OperatorGreaterThan Operator = "GreaterThan" + OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" + OperatorIPMatch Operator = "IPMatch" + OperatorLessThan Operator = "LessThan" + OperatorLessThanOrEqual Operator = "LessThanOrEqual" + OperatorRegEx Operator = "RegEx" +) + +func PossibleValuesForOperator() []string { + return []string{ + string(OperatorAny), + string(OperatorBeginsWith), + string(OperatorContains), + string(OperatorEndsWith), + string(OperatorEqual), + string(OperatorGeoMatch), + string(OperatorGreaterThan), + string(OperatorGreaterThanOrEqual), + string(OperatorIPMatch), + string(OperatorLessThan), + string(OperatorLessThanOrEqual), + string(OperatorRegEx), + } +} + +func (s *Operator) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperator(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperator(input string) (*Operator, error) { + vals := map[string]Operator{ + "any": OperatorAny, + "beginswith": OperatorBeginsWith, + "contains": OperatorContains, + "endswith": OperatorEndsWith, + "equal": OperatorEqual, + "geomatch": OperatorGeoMatch, + "greaterthan": OperatorGreaterThan, + "greaterthanorequal": OperatorGreaterThanOrEqual, + "ipmatch": OperatorIPMatch, + "lessthan": OperatorLessThan, + "lessthanorequal": OperatorLessThanOrEqual, + "regex": OperatorRegEx, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Operator(input) + return &out, nil +} + +type PolicyEnabledState string + +const ( + PolicyEnabledStateDisabled PolicyEnabledState = "Disabled" + PolicyEnabledStateEnabled PolicyEnabledState = "Enabled" +) + +func PossibleValuesForPolicyEnabledState() []string { + return []string{ + string(PolicyEnabledStateDisabled), + string(PolicyEnabledStateEnabled), + } +} + +func (s *PolicyEnabledState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePolicyEnabledState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePolicyEnabledState(input string) (*PolicyEnabledState, error) { + vals := map[string]PolicyEnabledState{ + "disabled": PolicyEnabledStateDisabled, + "enabled": PolicyEnabledStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PolicyEnabledState(input) + return &out, nil +} + +type PolicyMode string + +const ( + PolicyModeDetection PolicyMode = "Detection" + PolicyModePrevention PolicyMode = "Prevention" +) + +func PossibleValuesForPolicyMode() []string { + return []string{ + string(PolicyModeDetection), + string(PolicyModePrevention), + } +} + +func (s *PolicyMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePolicyMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePolicyMode(input string) (*PolicyMode, error) { + vals := map[string]PolicyMode{ + "detection": PolicyModeDetection, + "prevention": PolicyModePrevention, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PolicyMode(input) + return &out, nil +} + +type PolicyResourceState string + +const ( + PolicyResourceStateCreating PolicyResourceState = "Creating" + PolicyResourceStateDeleting PolicyResourceState = "Deleting" + PolicyResourceStateDisabled PolicyResourceState = "Disabled" + PolicyResourceStateDisabling PolicyResourceState = "Disabling" + PolicyResourceStateEnabled PolicyResourceState = "Enabled" + PolicyResourceStateEnabling PolicyResourceState = "Enabling" +) + +func PossibleValuesForPolicyResourceState() []string { + return []string{ + string(PolicyResourceStateCreating), + string(PolicyResourceStateDeleting), + string(PolicyResourceStateDisabled), + string(PolicyResourceStateDisabling), + string(PolicyResourceStateEnabled), + string(PolicyResourceStateEnabling), + } +} + +func (s *PolicyResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePolicyResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePolicyResourceState(input string) (*PolicyResourceState, error) { + vals := map[string]PolicyResourceState{ + "creating": PolicyResourceStateCreating, + "deleting": PolicyResourceStateDeleting, + "disabled": PolicyResourceStateDisabled, + "disabling": PolicyResourceStateDisabling, + "enabled": PolicyResourceStateEnabled, + "enabling": PolicyResourceStateEnabling, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PolicyResourceState(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCreating), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "creating": ProvisioningStateCreating, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameCustomVerizon SkuName = "Custom_Verizon" + SkuNamePremiumAzureFrontDoor SkuName = "Premium_AzureFrontDoor" + SkuNamePremiumVerizon SkuName = "Premium_Verizon" + SkuNameStandardAkamai SkuName = "Standard_Akamai" + SkuNameStandardAvgBandWidthChinaCdn SkuName = "Standard_AvgBandWidth_ChinaCdn" + SkuNameStandardAzureFrontDoor SkuName = "Standard_AzureFrontDoor" + SkuNameStandardChinaCdn SkuName = "Standard_ChinaCdn" + SkuNameStandardMicrosoft SkuName = "Standard_Microsoft" + SkuNameStandardNineFiveFiveBandWidthChinaCdn SkuName = "Standard_955BandWidth_ChinaCdn" + SkuNameStandardPlusAvgBandWidthChinaCdn SkuName = "StandardPlus_AvgBandWidth_ChinaCdn" + SkuNameStandardPlusChinaCdn SkuName = "StandardPlus_ChinaCdn" + SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn SkuName = "StandardPlus_955BandWidth_ChinaCdn" + SkuNameStandardVerizon SkuName = "Standard_Verizon" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameCustomVerizon), + string(SkuNamePremiumAzureFrontDoor), + string(SkuNamePremiumVerizon), + string(SkuNameStandardAkamai), + string(SkuNameStandardAvgBandWidthChinaCdn), + string(SkuNameStandardAzureFrontDoor), + string(SkuNameStandardChinaCdn), + string(SkuNameStandardMicrosoft), + string(SkuNameStandardNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardPlusAvgBandWidthChinaCdn), + string(SkuNameStandardPlusChinaCdn), + string(SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn), + string(SkuNameStandardVerizon), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "custom_verizon": SkuNameCustomVerizon, + "premium_azurefrontdoor": SkuNamePremiumAzureFrontDoor, + "premium_verizon": SkuNamePremiumVerizon, + "standard_akamai": SkuNameStandardAkamai, + "standard_avgbandwidth_chinacdn": SkuNameStandardAvgBandWidthChinaCdn, + "standard_azurefrontdoor": SkuNameStandardAzureFrontDoor, + "standard_chinacdn": SkuNameStandardChinaCdn, + "standard_microsoft": SkuNameStandardMicrosoft, + "standard_955bandwidth_chinacdn": SkuNameStandardNineFiveFiveBandWidthChinaCdn, + "standardplus_avgbandwidth_chinacdn": SkuNameStandardPlusAvgBandWidthChinaCdn, + "standardplus_chinacdn": SkuNameStandardPlusChinaCdn, + "standardplus_955bandwidth_chinacdn": SkuNameStandardPlusNineFiveFiveBandWidthChinaCdn, + "standard_verizon": SkuNameStandardVerizon, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type TransformType string + +const ( + TransformTypeLowercase TransformType = "Lowercase" + TransformTypeRemoveNulls TransformType = "RemoveNulls" + TransformTypeTrim TransformType = "Trim" + TransformTypeUppercase TransformType = "Uppercase" + TransformTypeUrlDecode TransformType = "UrlDecode" + TransformTypeUrlEncode TransformType = "UrlEncode" +) + +func PossibleValuesForTransformType() []string { + return []string{ + string(TransformTypeLowercase), + string(TransformTypeRemoveNulls), + string(TransformTypeTrim), + string(TransformTypeUppercase), + string(TransformTypeUrlDecode), + string(TransformTypeUrlEncode), + } +} + +func (s *TransformType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTransformType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTransformType(input string) (*TransformType, error) { + vals := map[string]TransformType{ + "lowercase": TransformTypeLowercase, + "removenulls": TransformTypeRemoveNulls, + "trim": TransformTypeTrim, + "uppercase": TransformTypeUppercase, + "urldecode": TransformTypeUrlDecode, + "urlencode": TransformTypeUrlEncode, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TransformType(input) + return &out, nil +} + +type WafMatchVariable string + +const ( + WafMatchVariableCookies WafMatchVariable = "Cookies" + WafMatchVariablePostArgs WafMatchVariable = "PostArgs" + WafMatchVariableQueryString WafMatchVariable = "QueryString" + WafMatchVariableRemoteAddr WafMatchVariable = "RemoteAddr" + WafMatchVariableRequestBody WafMatchVariable = "RequestBody" + WafMatchVariableRequestHeader WafMatchVariable = "RequestHeader" + WafMatchVariableRequestMethod WafMatchVariable = "RequestMethod" + WafMatchVariableRequestUri WafMatchVariable = "RequestUri" + WafMatchVariableSocketAddr WafMatchVariable = "SocketAddr" +) + +func PossibleValuesForWafMatchVariable() []string { + return []string{ + string(WafMatchVariableCookies), + string(WafMatchVariablePostArgs), + string(WafMatchVariableQueryString), + string(WafMatchVariableRemoteAddr), + string(WafMatchVariableRequestBody), + string(WafMatchVariableRequestHeader), + string(WafMatchVariableRequestMethod), + string(WafMatchVariableRequestUri), + string(WafMatchVariableSocketAddr), + } +} + +func (s *WafMatchVariable) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWafMatchVariable(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWafMatchVariable(input string) (*WafMatchVariable, error) { + vals := map[string]WafMatchVariable{ + "cookies": WafMatchVariableCookies, + "postargs": WafMatchVariablePostArgs, + "querystring": WafMatchVariableQueryString, + "remoteaddr": WafMatchVariableRemoteAddr, + "requestbody": WafMatchVariableRequestBody, + "requestheader": WafMatchVariableRequestHeader, + "requestmethod": WafMatchVariableRequestMethod, + "requesturi": WafMatchVariableRequestUri, + "socketaddr": WafMatchVariableSocketAddr, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WafMatchVariable(input) + return &out, nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy.go new file mode 100644 index 00000000000..39237561889 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy.go @@ -0,0 +1,130 @@ +package webapplicationfirewallpolicies + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CdnWebApplicationFirewallPolicyId{}) +} + +var _ resourceids.ResourceId = &CdnWebApplicationFirewallPolicyId{} + +// CdnWebApplicationFirewallPolicyId is a struct representing the Resource ID for a Cdn Web Application Firewall Policy +type CdnWebApplicationFirewallPolicyId struct { + SubscriptionId string + ResourceGroupName string + CdnWebApplicationFirewallPolicyName string +} + +// NewCdnWebApplicationFirewallPolicyID returns a new CdnWebApplicationFirewallPolicyId struct +func NewCdnWebApplicationFirewallPolicyID(subscriptionId string, resourceGroupName string, cdnWebApplicationFirewallPolicyName string) CdnWebApplicationFirewallPolicyId { + return CdnWebApplicationFirewallPolicyId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + CdnWebApplicationFirewallPolicyName: cdnWebApplicationFirewallPolicyName, + } +} + +// ParseCdnWebApplicationFirewallPolicyID parses 'input' into a CdnWebApplicationFirewallPolicyId +func ParseCdnWebApplicationFirewallPolicyID(input string) (*CdnWebApplicationFirewallPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&CdnWebApplicationFirewallPolicyId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CdnWebApplicationFirewallPolicyId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCdnWebApplicationFirewallPolicyIDInsensitively parses 'input' case-insensitively into a CdnWebApplicationFirewallPolicyId +// note: this method should only be used for API response data and not user input +func ParseCdnWebApplicationFirewallPolicyIDInsensitively(input string) (*CdnWebApplicationFirewallPolicyId, error) { + parser := resourceids.NewParserFromResourceIdType(&CdnWebApplicationFirewallPolicyId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CdnWebApplicationFirewallPolicyId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CdnWebApplicationFirewallPolicyId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.CdnWebApplicationFirewallPolicyName, ok = input.Parsed["cdnWebApplicationFirewallPolicyName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "cdnWebApplicationFirewallPolicyName", input) + } + + return nil +} + +// ValidateCdnWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Cdn Web Application Firewall Policy ID +func ValidateCdnWebApplicationFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCdnWebApplicationFirewallPolicyID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Cdn Web Application Firewall Policy ID +func (id CdnWebApplicationFirewallPolicyId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CdnWebApplicationFirewallPolicyName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Cdn Web Application Firewall Policy ID +func (id CdnWebApplicationFirewallPolicyId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCDN", "Microsoft.CDN", "Microsoft.CDN"), + resourceids.StaticSegment("staticCdnWebApplicationFirewallPolicies", "cdnWebApplicationFirewallPolicies", "cdnWebApplicationFirewallPolicies"), + resourceids.UserSpecifiedSegment("cdnWebApplicationFirewallPolicyName", "cdnWebApplicationFirewallPolicyValue"), + } +} + +// String returns a human-readable description of this Cdn Web Application Firewall Policy ID +func (id CdnWebApplicationFirewallPolicyId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Cdn Web Application Firewall Policy Name: %q", id.CdnWebApplicationFirewallPolicyName), + } + return fmt.Sprintf("Cdn Web Application Firewall Policy (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy_test.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy_test.go new file mode 100644 index 00000000000..7c873caf9c9 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/id_cdnwebapplicationfirewallpolicy_test.go @@ -0,0 +1,282 @@ +package webapplicationfirewallpolicies + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &CdnWebApplicationFirewallPolicyId{} + +func TestNewCdnWebApplicationFirewallPolicyID(t *testing.T) { + id := NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.CdnWebApplicationFirewallPolicyName != "cdnWebApplicationFirewallPolicyValue" { + t.Fatalf("Expected %q but got %q for Segment 'CdnWebApplicationFirewallPolicyName'", id.CdnWebApplicationFirewallPolicyName, "cdnWebApplicationFirewallPolicyValue") + } +} + +func TestFormatCdnWebApplicationFirewallPolicyID(t *testing.T) { + actual := NewCdnWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cdnWebApplicationFirewallPolicyValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/cdnWebApplicationFirewallPolicyValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseCdnWebApplicationFirewallPolicyID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CdnWebApplicationFirewallPolicyId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/cdnWebApplicationFirewallPolicyValue", + Expected: &CdnWebApplicationFirewallPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + CdnWebApplicationFirewallPolicyName: "cdnWebApplicationFirewallPolicyValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/cdnWebApplicationFirewallPolicyValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCdnWebApplicationFirewallPolicyID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.CdnWebApplicationFirewallPolicyName != v.Expected.CdnWebApplicationFirewallPolicyName { + t.Fatalf("Expected %q but got %q for CdnWebApplicationFirewallPolicyName", v.Expected.CdnWebApplicationFirewallPolicyName, actual.CdnWebApplicationFirewallPolicyName) + } + + } +} + +func TestParseCdnWebApplicationFirewallPolicyIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CdnWebApplicationFirewallPolicyId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/cDnWeBaPpLiCaTiOnFiReWaLlPoLiCiEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/cdnWebApplicationFirewallPolicyValue", + Expected: &CdnWebApplicationFirewallPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + CdnWebApplicationFirewallPolicyName: "cdnWebApplicationFirewallPolicyValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies/cdnWebApplicationFirewallPolicyValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/cDnWeBaPpLiCaTiOnFiReWaLlPoLiCiEs/cDnWeBaPpLiCaTiOnFiReWaLlPoLiCyVaLuE", + Expected: &CdnWebApplicationFirewallPolicyId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + CdnWebApplicationFirewallPolicyName: "cDnWeBaPpLiCaTiOnFiReWaLlPoLiCyVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cDn/cDnWeBaPpLiCaTiOnFiReWaLlPoLiCiEs/cDnWeBaPpLiCaTiOnFiReWaLlPoLiCyVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCdnWebApplicationFirewallPolicyIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.CdnWebApplicationFirewallPolicyName != v.Expected.CdnWebApplicationFirewallPolicyName { + t.Fatalf("Expected %q but got %q for CdnWebApplicationFirewallPolicyName", v.Expected.CdnWebApplicationFirewallPolicyName, actual.CdnWebApplicationFirewallPolicyName) + } + + } +} + +func TestSegmentsForCdnWebApplicationFirewallPolicyId(t *testing.T) { + segments := CdnWebApplicationFirewallPolicyId{}.Segments() + if len(segments) == 0 { + t.Fatalf("CdnWebApplicationFirewallPolicyId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiescreateorupdate.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiescreateorupdate.go new file mode 100644 index 00000000000..38ad5015c89 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiescreateorupdate.go @@ -0,0 +1,76 @@ +package webapplicationfirewallpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoliciesCreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CdnWebApplicationFirewallPolicy +} + +// PoliciesCreateOrUpdate ... +func (c WebApplicationFirewallPoliciesClient) PoliciesCreateOrUpdate(ctx context.Context, id CdnWebApplicationFirewallPolicyId, input CdnWebApplicationFirewallPolicy) (result PoliciesCreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PoliciesCreateOrUpdateThenPoll performs PoliciesCreateOrUpdate then polls until it's completed +func (c WebApplicationFirewallPoliciesClient) PoliciesCreateOrUpdateThenPoll(ctx context.Context, id CdnWebApplicationFirewallPolicyId, input CdnWebApplicationFirewallPolicy) error { + result, err := c.PoliciesCreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing PoliciesCreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PoliciesCreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesdelete.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesdelete.go new file mode 100644 index 00000000000..6de9740fac2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesdelete.go @@ -0,0 +1,47 @@ +package webapplicationfirewallpolicies + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoliciesDeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// PoliciesDelete ... +func (c WebApplicationFirewallPoliciesClient) PoliciesDelete(ctx context.Context, id CdnWebApplicationFirewallPolicyId) (result PoliciesDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesget.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesget.go new file mode 100644 index 00000000000..9323fcfa2f2 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesget.go @@ -0,0 +1,53 @@ +package webapplicationfirewallpolicies + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoliciesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CdnWebApplicationFirewallPolicy +} + +// PoliciesGet ... +func (c WebApplicationFirewallPoliciesClient) PoliciesGet(ctx context.Context, id CdnWebApplicationFirewallPolicyId) (result PoliciesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CdnWebApplicationFirewallPolicy + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policieslist.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policieslist.go new file mode 100644 index 00000000000..308944ddafe --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policieslist.go @@ -0,0 +1,106 @@ +package webapplicationfirewallpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoliciesListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]CdnWebApplicationFirewallPolicy +} + +type PoliciesListCompleteResult struct { + LatestHttpResponse *http.Response + Items []CdnWebApplicationFirewallPolicy +} + +type PoliciesListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PoliciesListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PoliciesList ... +func (c WebApplicationFirewallPoliciesClient) PoliciesList(ctx context.Context, id commonids.ResourceGroupId) (result PoliciesListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &PoliciesListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.CDN/cdnWebApplicationFirewallPolicies", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]CdnWebApplicationFirewallPolicy `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// PoliciesListComplete retrieves all the results into a single object +func (c WebApplicationFirewallPoliciesClient) PoliciesListComplete(ctx context.Context, id commonids.ResourceGroupId) (PoliciesListCompleteResult, error) { + return c.PoliciesListCompleteMatchingPredicate(ctx, id, CdnWebApplicationFirewallPolicyOperationPredicate{}) +} + +// PoliciesListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c WebApplicationFirewallPoliciesClient) PoliciesListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CdnWebApplicationFirewallPolicyOperationPredicate) (result PoliciesListCompleteResult, err error) { + items := make([]CdnWebApplicationFirewallPolicy, 0) + + resp, err := c.PoliciesList(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = PoliciesListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesupdate.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesupdate.go new file mode 100644 index 00000000000..1eb13e013e7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/method_policiesupdate.go @@ -0,0 +1,75 @@ +package webapplicationfirewallpolicies + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoliciesUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *CdnWebApplicationFirewallPolicy +} + +// PoliciesUpdate ... +func (c WebApplicationFirewallPoliciesClient) PoliciesUpdate(ctx context.Context, id CdnWebApplicationFirewallPolicyId, input CdnWebApplicationFirewallPolicyPatchParameters) (result PoliciesUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PoliciesUpdateThenPoll performs PoliciesUpdate then polls until it's completed +func (c WebApplicationFirewallPoliciesClient) PoliciesUpdateThenPoll(ctx context.Context, id CdnWebApplicationFirewallPolicyId, input CdnWebApplicationFirewallPolicyPatchParameters) error { + result, err := c.PoliciesUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing PoliciesUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PoliciesUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnendpoint.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnendpoint.go new file mode 100644 index 00000000000..7c542c2a5f7 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnendpoint.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CdnEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicy.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicy.go new file mode 100644 index 00000000000..f156b758d77 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicy.go @@ -0,0 +1,20 @@ +package webapplicationfirewallpolicies + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CdnWebApplicationFirewallPolicy struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *CdnWebApplicationFirewallPolicyProperties `json:"properties,omitempty"` + Sku Sku `json:"sku"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicypatchparameters.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicypatchparameters.go new file mode 100644 index 00000000000..54afad300f6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicypatchparameters.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CdnWebApplicationFirewallPolicyPatchParameters struct { + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicyproperties.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicyproperties.go new file mode 100644 index 00000000000..76344cc38c0 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_cdnwebapplicationfirewallpolicyproperties.go @@ -0,0 +1,15 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CdnWebApplicationFirewallPolicyProperties struct { + CustomRules *CustomRuleList `json:"customRules,omitempty"` + EndpointLinks *[]CdnEndpoint `json:"endpointLinks,omitempty"` + ExtendedProperties *map[string]string `json:"extendedProperties,omitempty"` + ManagedRules *ManagedRuleSetList `json:"managedRules,omitempty"` + PolicySettings *PolicySettings `json:"policySettings,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RateLimitRules *RateLimitRuleList `json:"rateLimitRules,omitempty"` + ResourceState *PolicyResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrule.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrule.go new file mode 100644 index 00000000000..12ff090b028 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrule.go @@ -0,0 +1,12 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomRule struct { + Action ActionType `json:"action"` + EnabledState *CustomRuleEnabledState `json:"enabledState,omitempty"` + MatchConditions []MatchCondition `json:"matchConditions"` + Name string `json:"name"` + Priority int64 `json:"priority"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrulelist.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrulelist.go new file mode 100644 index 00000000000..4af1175aedf --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_customrulelist.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomRuleList struct { + Rules *[]CustomRule `json:"rules,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go new file mode 100644 index 00000000000..2810e8e0e4d --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go @@ -0,0 +1,9 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleGroupOverride struct { + RuleGroupName string `json:"ruleGroupName"` + Rules *[]ManagedRuleOverride `json:"rules,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleoverride.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleoverride.go new file mode 100644 index 00000000000..595df8bc503 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleoverride.go @@ -0,0 +1,10 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleOverride struct { + Action *ActionType `json:"action,omitempty"` + EnabledState *ManagedRuleEnabledState `json:"enabledState,omitempty"` + RuleId string `json:"ruleId"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleset.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleset.go new file mode 100644 index 00000000000..b3a1388f11e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedruleset.go @@ -0,0 +1,11 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSet struct { + AnomalyScore *int64 `json:"anomalyScore,omitempty"` + RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` + RuleSetType string `json:"ruleSetType"` + RuleSetVersion string `json:"ruleSetVersion"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulesetlist.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulesetlist.go new file mode 100644 index 00000000000..f15de67cc0c --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_managedrulesetlist.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedRuleSetList struct { + ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_matchcondition.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_matchcondition.go new file mode 100644 index 00000000000..52283db218e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_matchcondition.go @@ -0,0 +1,13 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MatchCondition struct { + MatchValue []string `json:"matchValue"` + MatchVariable WafMatchVariable `json:"matchVariable"` + NegateCondition *bool `json:"negateCondition,omitempty"` + Operator Operator `json:"operator"` + Selector *string `json:"selector,omitempty"` + Transforms *[]TransformType `json:"transforms,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_policysettings.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_policysettings.go new file mode 100644 index 00000000000..dc011a63138 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_policysettings.go @@ -0,0 +1,12 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PolicySettings struct { + DefaultCustomBlockResponseBody *string `json:"defaultCustomBlockResponseBody,omitempty"` + DefaultCustomBlockResponseStatusCode *DefaultCustomBlockResponseStatusCode `json:"defaultCustomBlockResponseStatusCode,omitempty"` + DefaultRedirectUrl *string `json:"defaultRedirectUrl,omitempty"` + EnabledState *PolicyEnabledState `json:"enabledState,omitempty"` + Mode *PolicyMode `json:"mode,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrule.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrule.go new file mode 100644 index 00000000000..591db9da11e --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrule.go @@ -0,0 +1,14 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RateLimitRule struct { + Action ActionType `json:"action"` + EnabledState *CustomRuleEnabledState `json:"enabledState,omitempty"` + MatchConditions []MatchCondition `json:"matchConditions"` + Name string `json:"name"` + Priority int64 `json:"priority"` + RateLimitDurationInMinutes int64 `json:"rateLimitDurationInMinutes"` + RateLimitThreshold int64 `json:"rateLimitThreshold"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrulelist.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrulelist.go new file mode 100644 index 00000000000..b7180c9f619 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_ratelimitrulelist.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RateLimitRuleList struct { + Rules *[]RateLimitRule `json:"rules,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_sku.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_sku.go new file mode 100644 index 00000000000..2a73ceadea6 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/model_sku.go @@ -0,0 +1,8 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name *SkuName `json:"name,omitempty"` +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/predicates.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/predicates.go new file mode 100644 index 00000000000..efe55879414 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/predicates.go @@ -0,0 +1,37 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CdnWebApplicationFirewallPolicyOperationPredicate struct { + Etag *string + Id *string + Location *string + Name *string + Type *string +} + +func (p CdnWebApplicationFirewallPolicyOperationPredicate) Matches(input CdnWebApplicationFirewallPolicy) bool { + + if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/version.go b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/version.go new file mode 100644 index 00000000000..be660aa7600 --- /dev/null +++ b/resource-manager/cdn/2024-02-01/webapplicationfirewallpolicies/version.go @@ -0,0 +1,10 @@ +package webapplicationfirewallpolicies + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-02-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2024-02-01" +} diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/README.md b/resource-manager/chaosstudio/2023-11-01/capabilities/README.md index 3503b8b0c41..471de92ce37 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/README.md +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/capabilities` Documentation -The `capabilities` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2023-11-01`). +The `capabilities` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/client.go b/resource-manager/chaosstudio/2023-11-01/capabilities/client.go index a2e1031ed38..bd95e4c5f26 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/client.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/client.go @@ -15,7 +15,7 @@ type CapabilitiesClient struct { } func NewCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapabilitiesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/id_capabilitytype.go b/resource-manager/chaosstudio/2023-11-01/capabilities/id_capabilitytype.go index 9f4c9074969..bd640d74831 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/id_capabilitytype.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/id_capabilitytype.go @@ -44,7 +44,7 @@ func ParseCapabilityTypeID(input string) (*CapabilityTypeId, error) { } id := CapabilityTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapabilityTypeIDInsensitively(input string) (*CapabilityTypeId, error) } id := CapabilityTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/method_capabilitytypesget.go b/resource-manager/chaosstudio/2023-11-01/capabilities/method_capabilitytypesget.go index 6b25107514c..19e56004192 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/method_capabilitytypesget.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/method_capabilitytypesget.go @@ -45,7 +45,6 @@ func (c CapabilitiesClient) CapabilityTypesGet(ctx context.Context, id Capabilit var model CapabilityType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/method_createorupdate.go b/resource-manager/chaosstudio/2023-11-01/capabilities/method_createorupdate.go index 00ffa4a57a8..91210ca9147 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/method_createorupdate.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapabilitiesClient) CreateOrUpdate(ctx context.Context, id commonids.Cha var model Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/method_get.go b/resource-manager/chaosstudio/2023-11-01/capabilities/method_get.go index 1a3631bef9d..9f55b872c49 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/method_get.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/method_get.go @@ -46,7 +46,6 @@ func (c CapabilitiesClient) Get(ctx context.Context, id commonids.ChaosStudioCap var model Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/method_list.go b/resource-manager/chaosstudio/2023-11-01/capabilities/method_list.go index d724ac45475..35f2a115b90 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/method_list.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilities/version.go b/resource-manager/chaosstudio/2023-11-01/capabilities/version.go index a945a12b9ca..1f7b4ab8185 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilities/version.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilities/version.go @@ -1,12 +1,10 @@ package capabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capabilities/2023-11-01" } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/README.md b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/README.md index f9ee5cc9fa3..1109ca712f9 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/README.md +++ b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/capabilitytypes` Documentation -The `capabilitytypes` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2023-11-01`). +The `capabilitytypes` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/client.go b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/client.go index 3dc8b841e5d..bd5a19a00d9 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/client.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/client.go @@ -15,7 +15,7 @@ type CapabilityTypesClient struct { } func NewCapabilityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capabilitytypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capabilitytypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapabilityTypesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/id_targettype.go b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/id_targettype.go index 3a4bcf5410c..e801b37db27 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/id_targettype.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/id_targettype.go @@ -42,7 +42,7 @@ func ParseTargetTypeID(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTargetTypeIDInsensitively(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/method_list.go b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/method_list.go index 925560e0b50..dbfd5c6e5da 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/method_list.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/version.go b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/version.go index 68366274a35..26a25576b00 100644 --- a/resource-manager/chaosstudio/2023-11-01/capabilitytypes/version.go +++ b/resource-manager/chaosstudio/2023-11-01/capabilitytypes/version.go @@ -1,12 +1,10 @@ package capabilitytypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capabilitytypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capabilitytypes/2023-11-01" } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/README.md b/resource-manager/chaosstudio/2023-11-01/experiments/README.md index 46efe93e253..4fdb4ad6a01 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/README.md +++ b/resource-manager/chaosstudio/2023-11-01/experiments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/experiments` Documentation -The `experiments` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2023-11-01`). +The `experiments` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/client.go b/resource-manager/chaosstudio/2023-11-01/experiments/client.go index d2642af9418..87587479e4a 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/client.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/client.go @@ -15,7 +15,7 @@ type ExperimentsClient struct { } func NewExperimentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExperimentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "experiments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "experiments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExperimentsClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/id_execution.go b/resource-manager/chaosstudio/2023-11-01/experiments/id_execution.go index d0ff64a9d1a..ee6120b0b56 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/id_execution.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/id_execution.go @@ -44,7 +44,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/id_experiment.go b/resource-manager/chaosstudio/2023-11-01/experiments/id_experiment.go index 087913b115c..09c9c864f53 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/id_experiment.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/id_experiment.go @@ -42,7 +42,7 @@ func ParseExperimentID(input string) (*ExperimentId, error) { } id := ExperimentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExperimentIDInsensitively(input string) (*ExperimentId, error) { } id := ExperimentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/method_executiondetails.go b/resource-manager/chaosstudio/2023-11-01/experiments/method_executiondetails.go index 114fae59101..8d0252ba5c0 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/method_executiondetails.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/method_executiondetails.go @@ -46,7 +46,6 @@ func (c ExperimentsClient) ExecutionDetails(ctx context.Context, id ExecutionId) var model ExperimentExecutionDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/method_get.go b/resource-manager/chaosstudio/2023-11-01/experiments/method_get.go index 92e7fb7c52a..2fc4e315f41 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/method_get.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/method_get.go @@ -45,7 +45,6 @@ func (c ExperimentsClient) Get(ctx context.Context, id ExperimentId) (result Get var model Experiment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/method_getexecution.go b/resource-manager/chaosstudio/2023-11-01/experiments/method_getexecution.go index a561c8e5d5c..9c4da4698cf 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/method_getexecution.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/method_getexecution.go @@ -45,7 +45,6 @@ func (c ExperimentsClient) GetExecution(ctx context.Context, id ExecutionId) (re var model ExperimentExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/method_list.go b/resource-manager/chaosstudio/2023-11-01/experiments/method_list.go index bf3e84085b1..b88f1e79fee 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/method_list.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/method_listall.go b/resource-manager/chaosstudio/2023-11-01/experiments/method_listall.go index f5a05c93f16..a67cd0e199d 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/method_listall.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/method_listall.go @@ -41,6 +41,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_action.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_action.go index 1a02c7cd9e4..7fee11c611c 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_action.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_action.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Action interface { + Action() BaseActionImpl } -// RawActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Action = BaseActionImpl{} + +type BaseActionImpl struct { + Name string `json:"name"` + Type string `json:"type"` +} + +func (s BaseActionImpl) Action() BaseActionImpl { + return s +} + +var _ Action = RawActionImpl{} + +// RawActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActionImpl struct { + action BaseActionImpl Type string Values map[string]interface{} } -func unmarshalActionImplementation(input []byte) (Action, error) { +func (s RawActionImpl) Action() BaseActionImpl { + return s.action +} + +func UnmarshalActionImplementation(input []byte) (Action, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalActionImplementation(input []byte) (Action, error) { return out, nil } - out := RawActionImpl{ + var parent BaseActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActionImpl: %+v", err) + } + + return RawActionImpl{ + action: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_branch.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_branch.go index fca191b3c5b..c145f09dbab 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_branch.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_branch.go @@ -37,7 +37,7 @@ func (s *Branch) UnmarshalJSON(bytes []byte) error { output := make([]Action, 0) for i, val := range listTemp { - impl, err := unmarshalActionImplementation(val) + impl, err := UnmarshalActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'Branch': %+v", i, err) } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_continuousaction.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_continuousaction.go index f323d393ea0..6743ed7a43d 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_continuousaction.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_continuousaction.go @@ -16,7 +16,16 @@ type ContinuousAction struct { SelectorId string `json:"selectorId"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s ContinuousAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ContinuousAction{} @@ -30,9 +39,10 @@ func (s ContinuousAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousAction: %+v", err) } + decoded["type"] = "continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_delayaction.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_delayaction.go index 59420382b38..e726e420bbb 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_delayaction.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_delayaction.go @@ -14,7 +14,16 @@ type DelayAction struct { Duration string `json:"duration"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s DelayAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DelayAction{} @@ -28,9 +37,10 @@ func (s DelayAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelayAction: %+v", err) } + decoded["type"] = "delay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_discreteaction.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_discreteaction.go index 7df537a2a57..168af449ac8 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_discreteaction.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_discreteaction.go @@ -15,7 +15,16 @@ type DiscreteAction struct { SelectorId string `json:"selectorId"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s DiscreteAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DiscreteAction{} @@ -29,9 +38,10 @@ func (s DiscreteAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DiscreteAction: %+v", err) } + decoded["type"] = "discrete" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_experimentproperties.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_experimentproperties.go index 1ff5f530efb..3a7714c813f 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_experimentproperties.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_experimentproperties.go @@ -39,7 +39,7 @@ func (s *ExperimentProperties) UnmarshalJSON(bytes []byte) error { output := make([]Selector, 0) for i, val := range listTemp { - impl, err := unmarshalSelectorImplementation(val) + impl, err := UnmarshalSelectorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Selectors' for 'ExperimentProperties': %+v", i, err) } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_filter.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_filter.go index 2ad944f2346..eaa6d44f530 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_filter.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_filter.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Filter interface { + Filter() BaseFilterImpl } -// RawFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Filter = BaseFilterImpl{} + +type BaseFilterImpl struct { + Type FilterType `json:"type"` +} + +func (s BaseFilterImpl) Filter() BaseFilterImpl { + return s +} + +var _ Filter = RawFilterImpl{} + +// RawFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFilterImpl struct { + filter BaseFilterImpl Type string Values map[string]interface{} } -func unmarshalFilterImplementation(input []byte) (Filter, error) { +func (s RawFilterImpl) Filter() BaseFilterImpl { + return s.filter +} + +func UnmarshalFilterImplementation(input []byte) (Filter, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFilterImplementation(input []byte) (Filter, error) { return out, nil } - out := RawFilterImpl{ + var parent BaseFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFilterImpl: %+v", err) + } + + return RawFilterImpl{ + filter: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_listselector.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_listselector.go index e55a65ae39c..29bc539d14d 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_listselector.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_listselector.go @@ -14,8 +14,18 @@ type ListSelector struct { Targets []TargetReference `json:"targets"` // Fields inherited from Selector - Filter Filter `json:"filter"` - Id string `json:"id"` + + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s ListSelector) Selector() BaseSelectorImpl { + return BaseSelectorImpl{ + Filter: s.Filter, + Id: s.Id, + Type: s.Type, + } } var _ json.Marshaler = ListSelector{} @@ -29,9 +39,10 @@ func (s ListSelector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ListSelector: %+v", err) } + decoded["type"] = "List" encoded, err = json.Marshal(decoded) @@ -53,6 +64,7 @@ func (s *ListSelector) UnmarshalJSON(bytes []byte) error { s.Id = decoded.Id s.Targets = decoded.Targets + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -60,7 +72,7 @@ func (s *ListSelector) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalFilterImplementation(v) + impl, err := UnmarshalFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'ListSelector': %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_queryselector.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_queryselector.go index 32d8ce0331b..19a355033e6 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_queryselector.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_queryselector.go @@ -15,8 +15,18 @@ type QuerySelector struct { SubscriptionIds []string `json:"subscriptionIds"` // Fields inherited from Selector - Filter Filter `json:"filter"` - Id string `json:"id"` + + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s QuerySelector) Selector() BaseSelectorImpl { + return BaseSelectorImpl{ + Filter: s.Filter, + Id: s.Id, + Type: s.Type, + } } var _ json.Marshaler = QuerySelector{} @@ -30,9 +40,10 @@ func (s QuerySelector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuerySelector: %+v", err) } + decoded["type"] = "Query" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *QuerySelector) UnmarshalJSON(bytes []byte) error { s.Id = decoded.Id s.QueryString = decoded.QueryString s.SubscriptionIds = decoded.SubscriptionIds + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -62,7 +74,7 @@ func (s *QuerySelector) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalFilterImplementation(v) + impl, err := UnmarshalFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'QuerySelector': %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_selector.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_selector.go index 03f67eca833..0ef9a669ae1 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_selector.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_selector.go @@ -10,18 +10,64 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Selector interface { + Selector() BaseSelectorImpl } -// RawSelectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Selector = BaseSelectorImpl{} + +type BaseSelectorImpl struct { + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s BaseSelectorImpl) Selector() BaseSelectorImpl { + return s +} + +var _ Selector = RawSelectorImpl{} + +// RawSelectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSelectorImpl struct { - Type string - Values map[string]interface{} + selector BaseSelectorImpl + Type string + Values map[string]interface{} +} + +func (s RawSelectorImpl) Selector() BaseSelectorImpl { + return s.selector } -func unmarshalSelectorImplementation(input []byte) (Selector, error) { +var _ json.Unmarshaler = &BaseSelectorImpl{} + +func (s *BaseSelectorImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseSelectorImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseSelectorImpl: %+v", err) + } + + s.Id = decoded.Id + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseSelectorImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["filter"]; ok { + impl, err := UnmarshalFilterImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Filter' for 'BaseSelectorImpl': %+v", err) + } + s.Filter = impl + } + return nil +} + +func UnmarshalSelectorImplementation(input []byte) (Selector, error) { if input == nil { return nil, nil } @@ -52,10 +98,15 @@ func unmarshalSelectorImplementation(input []byte) (Selector, error) { return out, nil } - out := RawSelectorImpl{ - Type: value, - Values: temp, + var parent BaseSelectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSelectorImpl: %+v", err) } - return out, nil + + return RawSelectorImpl{ + selector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/model_simplefilter.go b/resource-manager/chaosstudio/2023-11-01/experiments/model_simplefilter.go index f8de91d5e03..c020a84c200 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/model_simplefilter.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/model_simplefilter.go @@ -14,6 +14,14 @@ type SimpleFilter struct { Parameters *SimpleFilterParameters `json:"parameters,omitempty"` // Fields inherited from Filter + + Type FilterType `json:"type"` +} + +func (s SimpleFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Type: s.Type, + } } var _ json.Marshaler = SimpleFilter{} @@ -27,9 +35,10 @@ func (s SimpleFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleFilter: %+v", err) } + decoded["type"] = "Simple" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2023-11-01/experiments/version.go b/resource-manager/chaosstudio/2023-11-01/experiments/version.go index 45dc2209c52..88de79758f8 100644 --- a/resource-manager/chaosstudio/2023-11-01/experiments/version.go +++ b/resource-manager/chaosstudio/2023-11-01/experiments/version.go @@ -1,12 +1,10 @@ package experiments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/experiments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/experiments/2023-11-01" } diff --git a/resource-manager/chaosstudio/2023-11-01/targets/README.md b/resource-manager/chaosstudio/2023-11-01/targets/README.md index 0cad1ac6081..c43cc4b4fa2 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/README.md +++ b/resource-manager/chaosstudio/2023-11-01/targets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/targets` Documentation -The `targets` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2023-11-01`). +The `targets` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2023-11-01/targets/client.go b/resource-manager/chaosstudio/2023-11-01/targets/client.go index 4fa378b2dbc..ef0e4cc7dcc 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/client.go +++ b/resource-manager/chaosstudio/2023-11-01/targets/client.go @@ -15,7 +15,7 @@ type TargetsClient struct { } func NewTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetsClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/targets/method_createorupdate.go b/resource-manager/chaosstudio/2023-11-01/targets/method_createorupdate.go index 7eeb7528da3..50bb7ec43ab 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/method_createorupdate.go +++ b/resource-manager/chaosstudio/2023-11-01/targets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TargetsClient) CreateOrUpdate(ctx context.Context, id commonids.ChaosStu var model Target result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/targets/method_get.go b/resource-manager/chaosstudio/2023-11-01/targets/method_get.go index e16ab315976..7c47058ae96 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/method_get.go +++ b/resource-manager/chaosstudio/2023-11-01/targets/method_get.go @@ -46,7 +46,6 @@ func (c TargetsClient) Get(ctx context.Context, id commonids.ChaosStudioTargetId var model Target result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/targets/method_list.go b/resource-manager/chaosstudio/2023-11-01/targets/method_list.go index 4e6681c4b1e..c875c3edaf2 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/method_list.go +++ b/resource-manager/chaosstudio/2023-11-01/targets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/targets/version.go b/resource-manager/chaosstudio/2023-11-01/targets/version.go index fe3a08d0046..3f3c0cce2a1 100644 --- a/resource-manager/chaosstudio/2023-11-01/targets/version.go +++ b/resource-manager/chaosstudio/2023-11-01/targets/version.go @@ -1,12 +1,10 @@ package targets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targets/2023-11-01" } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/README.md b/resource-manager/chaosstudio/2023-11-01/targettypes/README.md index 036773d1c8b..2f5ff145444 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/README.md +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/targettypes` Documentation -The `targettypes` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2023-11-01`). +The `targettypes` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/client.go b/resource-manager/chaosstudio/2023-11-01/targettypes/client.go index ab93296dfcb..5f40b7e59fe 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/client.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/client.go @@ -15,7 +15,7 @@ type TargetTypesClient struct { } func NewTargetTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targettypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targettypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetTypesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/id_location.go b/resource-manager/chaosstudio/2023-11-01/targettypes/id_location.go index ff2ac33008d..67bca4a3916 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/id_location.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/id_targettype.go b/resource-manager/chaosstudio/2023-11-01/targettypes/id_targettype.go index 0c73bed2e05..1f3be4c526f 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/id_targettype.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/id_targettype.go @@ -42,7 +42,7 @@ func ParseTargetTypeID(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTargetTypeIDInsensitively(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/method_get.go b/resource-manager/chaosstudio/2023-11-01/targettypes/method_get.go index 6ff56a33ce6..93867c52e02 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/method_get.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/method_get.go @@ -45,7 +45,6 @@ func (c TargetTypesClient) Get(ctx context.Context, id TargetTypeId) (result Get var model TargetType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/method_list.go b/resource-manager/chaosstudio/2023-11-01/targettypes/method_list.go index 62d8fb2d6f0..7e07ba42f4d 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/method_list.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2023-11-01/targettypes/version.go b/resource-manager/chaosstudio/2023-11-01/targettypes/version.go index 3ee9241126a..46b2c214276 100644 --- a/resource-manager/chaosstudio/2023-11-01/targettypes/version.go +++ b/resource-manager/chaosstudio/2023-11-01/targettypes/version.go @@ -1,12 +1,10 @@ package targettypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targettypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targettypes/2023-11-01" } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/README.md b/resource-manager/chaosstudio/2024-01-01/capabilities/README.md index fc3504d96a6..248451fee11 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/README.md +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2024-01-01/capabilities` Documentation -The `capabilities` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2024-01-01`). +The `capabilities` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/client.go b/resource-manager/chaosstudio/2024-01-01/capabilities/client.go index a2e1031ed38..bd95e4c5f26 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/client.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/client.go @@ -15,7 +15,7 @@ type CapabilitiesClient struct { } func NewCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapabilitiesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/id_capabilitytype.go b/resource-manager/chaosstudio/2024-01-01/capabilities/id_capabilitytype.go index 9f4c9074969..bd640d74831 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/id_capabilitytype.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/id_capabilitytype.go @@ -44,7 +44,7 @@ func ParseCapabilityTypeID(input string) (*CapabilityTypeId, error) { } id := CapabilityTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapabilityTypeIDInsensitively(input string) (*CapabilityTypeId, error) } id := CapabilityTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/method_capabilitytypesget.go b/resource-manager/chaosstudio/2024-01-01/capabilities/method_capabilitytypesget.go index 6b25107514c..19e56004192 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/method_capabilitytypesget.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/method_capabilitytypesget.go @@ -45,7 +45,6 @@ func (c CapabilitiesClient) CapabilityTypesGet(ctx context.Context, id Capabilit var model CapabilityType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/method_createorupdate.go b/resource-manager/chaosstudio/2024-01-01/capabilities/method_createorupdate.go index 00ffa4a57a8..91210ca9147 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/method_createorupdate.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapabilitiesClient) CreateOrUpdate(ctx context.Context, id commonids.Cha var model Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/method_get.go b/resource-manager/chaosstudio/2024-01-01/capabilities/method_get.go index 1a3631bef9d..9f55b872c49 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/method_get.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/method_get.go @@ -46,7 +46,6 @@ func (c CapabilitiesClient) Get(ctx context.Context, id commonids.ChaosStudioCap var model Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/method_list.go b/resource-manager/chaosstudio/2024-01-01/capabilities/method_list.go index d724ac45475..35f2a115b90 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/method_list.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilities/version.go b/resource-manager/chaosstudio/2024-01-01/capabilities/version.go index 13197bf5fa0..44798e8bf79 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilities/version.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilities/version.go @@ -1,12 +1,10 @@ package capabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capabilities/2024-01-01" } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/README.md b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/README.md index 5a021b6b92f..b0ad2d04bfb 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/README.md +++ b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2024-01-01/capabilitytypes` Documentation -The `capabilitytypes` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2024-01-01`). +The `capabilitytypes` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/client.go b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/client.go index 3dc8b841e5d..bd5a19a00d9 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/client.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/client.go @@ -15,7 +15,7 @@ type CapabilityTypesClient struct { } func NewCapabilityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capabilitytypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capabilitytypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapabilityTypesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/id_targettype.go b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/id_targettype.go index 3a4bcf5410c..e801b37db27 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/id_targettype.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/id_targettype.go @@ -42,7 +42,7 @@ func ParseTargetTypeID(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTargetTypeIDInsensitively(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/method_list.go b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/method_list.go index 925560e0b50..dbfd5c6e5da 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/method_list.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/version.go b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/version.go index 5fc8ecda1cb..e7c7662296b 100644 --- a/resource-manager/chaosstudio/2024-01-01/capabilitytypes/version.go +++ b/resource-manager/chaosstudio/2024-01-01/capabilitytypes/version.go @@ -1,12 +1,10 @@ package capabilitytypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capabilitytypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capabilitytypes/2024-01-01" } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/README.md b/resource-manager/chaosstudio/2024-01-01/experiments/README.md index 077c24f8c2a..5fd9a48dea2 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/README.md +++ b/resource-manager/chaosstudio/2024-01-01/experiments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2024-01-01/experiments` Documentation -The `experiments` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2024-01-01`). +The `experiments` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/client.go b/resource-manager/chaosstudio/2024-01-01/experiments/client.go index d2642af9418..87587479e4a 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/client.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/client.go @@ -15,7 +15,7 @@ type ExperimentsClient struct { } func NewExperimentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExperimentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "experiments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "experiments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExperimentsClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/id_execution.go b/resource-manager/chaosstudio/2024-01-01/experiments/id_execution.go index d0ff64a9d1a..ee6120b0b56 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/id_execution.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/id_execution.go @@ -44,7 +44,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/id_experiment.go b/resource-manager/chaosstudio/2024-01-01/experiments/id_experiment.go index 087913b115c..09c9c864f53 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/id_experiment.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/id_experiment.go @@ -42,7 +42,7 @@ func ParseExperimentID(input string) (*ExperimentId, error) { } id := ExperimentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExperimentIDInsensitively(input string) (*ExperimentId, error) { } id := ExperimentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/method_executiondetails.go b/resource-manager/chaosstudio/2024-01-01/experiments/method_executiondetails.go index 114fae59101..8d0252ba5c0 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/method_executiondetails.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/method_executiondetails.go @@ -46,7 +46,6 @@ func (c ExperimentsClient) ExecutionDetails(ctx context.Context, id ExecutionId) var model ExperimentExecutionDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/method_get.go b/resource-manager/chaosstudio/2024-01-01/experiments/method_get.go index 92e7fb7c52a..2fc4e315f41 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/method_get.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/method_get.go @@ -45,7 +45,6 @@ func (c ExperimentsClient) Get(ctx context.Context, id ExperimentId) (result Get var model Experiment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/method_getexecution.go b/resource-manager/chaosstudio/2024-01-01/experiments/method_getexecution.go index a561c8e5d5c..9c4da4698cf 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/method_getexecution.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/method_getexecution.go @@ -45,7 +45,6 @@ func (c ExperimentsClient) GetExecution(ctx context.Context, id ExecutionId) (re var model ExperimentExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/method_list.go b/resource-manager/chaosstudio/2024-01-01/experiments/method_list.go index bf3e84085b1..b88f1e79fee 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/method_list.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/method_listall.go b/resource-manager/chaosstudio/2024-01-01/experiments/method_listall.go index f5a05c93f16..a67cd0e199d 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/method_listall.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/method_listall.go @@ -41,6 +41,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_action.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_action.go index 1a02c7cd9e4..7fee11c611c 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_action.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_action.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Action interface { + Action() BaseActionImpl } -// RawActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Action = BaseActionImpl{} + +type BaseActionImpl struct { + Name string `json:"name"` + Type string `json:"type"` +} + +func (s BaseActionImpl) Action() BaseActionImpl { + return s +} + +var _ Action = RawActionImpl{} + +// RawActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActionImpl struct { + action BaseActionImpl Type string Values map[string]interface{} } -func unmarshalActionImplementation(input []byte) (Action, error) { +func (s RawActionImpl) Action() BaseActionImpl { + return s.action +} + +func UnmarshalActionImplementation(input []byte) (Action, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalActionImplementation(input []byte) (Action, error) { return out, nil } - out := RawActionImpl{ + var parent BaseActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActionImpl: %+v", err) + } + + return RawActionImpl{ + action: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_branch.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_branch.go index fca191b3c5b..c145f09dbab 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_branch.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_branch.go @@ -37,7 +37,7 @@ func (s *Branch) UnmarshalJSON(bytes []byte) error { output := make([]Action, 0) for i, val := range listTemp { - impl, err := unmarshalActionImplementation(val) + impl, err := UnmarshalActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'Branch': %+v", i, err) } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_continuousaction.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_continuousaction.go index f323d393ea0..6743ed7a43d 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_continuousaction.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_continuousaction.go @@ -16,7 +16,16 @@ type ContinuousAction struct { SelectorId string `json:"selectorId"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s ContinuousAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ContinuousAction{} @@ -30,9 +39,10 @@ func (s ContinuousAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousAction: %+v", err) } + decoded["type"] = "continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_delayaction.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_delayaction.go index 59420382b38..e726e420bbb 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_delayaction.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_delayaction.go @@ -14,7 +14,16 @@ type DelayAction struct { Duration string `json:"duration"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s DelayAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DelayAction{} @@ -28,9 +37,10 @@ func (s DelayAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelayAction: %+v", err) } + decoded["type"] = "delay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_discreteaction.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_discreteaction.go index 7df537a2a57..168af449ac8 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_discreteaction.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_discreteaction.go @@ -15,7 +15,16 @@ type DiscreteAction struct { SelectorId string `json:"selectorId"` // Fields inherited from Action + Name string `json:"name"` + Type string `json:"type"` +} + +func (s DiscreteAction) Action() BaseActionImpl { + return BaseActionImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DiscreteAction{} @@ -29,9 +38,10 @@ func (s DiscreteAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DiscreteAction: %+v", err) } + decoded["type"] = "discrete" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_experimentproperties.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_experimentproperties.go index 1ff5f530efb..3a7714c813f 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_experimentproperties.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_experimentproperties.go @@ -39,7 +39,7 @@ func (s *ExperimentProperties) UnmarshalJSON(bytes []byte) error { output := make([]Selector, 0) for i, val := range listTemp { - impl, err := unmarshalSelectorImplementation(val) + impl, err := UnmarshalSelectorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Selectors' for 'ExperimentProperties': %+v", i, err) } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_filter.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_filter.go index 2ad944f2346..eaa6d44f530 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_filter.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_filter.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Filter interface { + Filter() BaseFilterImpl } -// RawFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Filter = BaseFilterImpl{} + +type BaseFilterImpl struct { + Type FilterType `json:"type"` +} + +func (s BaseFilterImpl) Filter() BaseFilterImpl { + return s +} + +var _ Filter = RawFilterImpl{} + +// RawFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFilterImpl struct { + filter BaseFilterImpl Type string Values map[string]interface{} } -func unmarshalFilterImplementation(input []byte) (Filter, error) { +func (s RawFilterImpl) Filter() BaseFilterImpl { + return s.filter +} + +func UnmarshalFilterImplementation(input []byte) (Filter, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFilterImplementation(input []byte) (Filter, error) { return out, nil } - out := RawFilterImpl{ + var parent BaseFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFilterImpl: %+v", err) + } + + return RawFilterImpl{ + filter: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_listselector.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_listselector.go index e55a65ae39c..29bc539d14d 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_listselector.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_listselector.go @@ -14,8 +14,18 @@ type ListSelector struct { Targets []TargetReference `json:"targets"` // Fields inherited from Selector - Filter Filter `json:"filter"` - Id string `json:"id"` + + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s ListSelector) Selector() BaseSelectorImpl { + return BaseSelectorImpl{ + Filter: s.Filter, + Id: s.Id, + Type: s.Type, + } } var _ json.Marshaler = ListSelector{} @@ -29,9 +39,10 @@ func (s ListSelector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ListSelector: %+v", err) } + decoded["type"] = "List" encoded, err = json.Marshal(decoded) @@ -53,6 +64,7 @@ func (s *ListSelector) UnmarshalJSON(bytes []byte) error { s.Id = decoded.Id s.Targets = decoded.Targets + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -60,7 +72,7 @@ func (s *ListSelector) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalFilterImplementation(v) + impl, err := UnmarshalFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'ListSelector': %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_queryselector.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_queryselector.go index 32d8ce0331b..19a355033e6 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_queryselector.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_queryselector.go @@ -15,8 +15,18 @@ type QuerySelector struct { SubscriptionIds []string `json:"subscriptionIds"` // Fields inherited from Selector - Filter Filter `json:"filter"` - Id string `json:"id"` + + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s QuerySelector) Selector() BaseSelectorImpl { + return BaseSelectorImpl{ + Filter: s.Filter, + Id: s.Id, + Type: s.Type, + } } var _ json.Marshaler = QuerySelector{} @@ -30,9 +40,10 @@ func (s QuerySelector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuerySelector: %+v", err) } + decoded["type"] = "Query" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *QuerySelector) UnmarshalJSON(bytes []byte) error { s.Id = decoded.Id s.QueryString = decoded.QueryString s.SubscriptionIds = decoded.SubscriptionIds + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -62,7 +74,7 @@ func (s *QuerySelector) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalFilterImplementation(v) + impl, err := UnmarshalFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'QuerySelector': %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_selector.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_selector.go index 03f67eca833..0ef9a669ae1 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_selector.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_selector.go @@ -10,18 +10,64 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Selector interface { + Selector() BaseSelectorImpl } -// RawSelectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Selector = BaseSelectorImpl{} + +type BaseSelectorImpl struct { + Filter Filter `json:"filter"` + Id string `json:"id"` + Type SelectorType `json:"type"` +} + +func (s BaseSelectorImpl) Selector() BaseSelectorImpl { + return s +} + +var _ Selector = RawSelectorImpl{} + +// RawSelectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSelectorImpl struct { - Type string - Values map[string]interface{} + selector BaseSelectorImpl + Type string + Values map[string]interface{} +} + +func (s RawSelectorImpl) Selector() BaseSelectorImpl { + return s.selector } -func unmarshalSelectorImplementation(input []byte) (Selector, error) { +var _ json.Unmarshaler = &BaseSelectorImpl{} + +func (s *BaseSelectorImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseSelectorImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseSelectorImpl: %+v", err) + } + + s.Id = decoded.Id + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseSelectorImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["filter"]; ok { + impl, err := UnmarshalFilterImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Filter' for 'BaseSelectorImpl': %+v", err) + } + s.Filter = impl + } + return nil +} + +func UnmarshalSelectorImplementation(input []byte) (Selector, error) { if input == nil { return nil, nil } @@ -52,10 +98,15 @@ func unmarshalSelectorImplementation(input []byte) (Selector, error) { return out, nil } - out := RawSelectorImpl{ - Type: value, - Values: temp, + var parent BaseSelectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSelectorImpl: %+v", err) } - return out, nil + + return RawSelectorImpl{ + selector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/model_simplefilter.go b/resource-manager/chaosstudio/2024-01-01/experiments/model_simplefilter.go index f8de91d5e03..c020a84c200 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/model_simplefilter.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/model_simplefilter.go @@ -14,6 +14,14 @@ type SimpleFilter struct { Parameters *SimpleFilterParameters `json:"parameters,omitempty"` // Fields inherited from Filter + + Type FilterType `json:"type"` +} + +func (s SimpleFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Type: s.Type, + } } var _ json.Marshaler = SimpleFilter{} @@ -27,9 +35,10 @@ func (s SimpleFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleFilter: %+v", err) } + decoded["type"] = "Simple" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/chaosstudio/2024-01-01/experiments/version.go b/resource-manager/chaosstudio/2024-01-01/experiments/version.go index ec504259042..ba765350fce 100644 --- a/resource-manager/chaosstudio/2024-01-01/experiments/version.go +++ b/resource-manager/chaosstudio/2024-01-01/experiments/version.go @@ -1,12 +1,10 @@ package experiments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/experiments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/experiments/2024-01-01" } diff --git a/resource-manager/chaosstudio/2024-01-01/targets/README.md b/resource-manager/chaosstudio/2024-01-01/targets/README.md index b49afaf1e7d..ea01a37fa08 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/README.md +++ b/resource-manager/chaosstudio/2024-01-01/targets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2024-01-01/targets` Documentation -The `targets` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2024-01-01`). +The `targets` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2024-01-01/targets/client.go b/resource-manager/chaosstudio/2024-01-01/targets/client.go index 4fa378b2dbc..ef0e4cc7dcc 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/client.go +++ b/resource-manager/chaosstudio/2024-01-01/targets/client.go @@ -15,7 +15,7 @@ type TargetsClient struct { } func NewTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetsClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/targets/method_createorupdate.go b/resource-manager/chaosstudio/2024-01-01/targets/method_createorupdate.go index 7eeb7528da3..50bb7ec43ab 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/method_createorupdate.go +++ b/resource-manager/chaosstudio/2024-01-01/targets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TargetsClient) CreateOrUpdate(ctx context.Context, id commonids.ChaosStu var model Target result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/targets/method_get.go b/resource-manager/chaosstudio/2024-01-01/targets/method_get.go index e16ab315976..7c47058ae96 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/method_get.go +++ b/resource-manager/chaosstudio/2024-01-01/targets/method_get.go @@ -46,7 +46,6 @@ func (c TargetsClient) Get(ctx context.Context, id commonids.ChaosStudioTargetId var model Target result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/targets/method_list.go b/resource-manager/chaosstudio/2024-01-01/targets/method_list.go index 4e6681c4b1e..c875c3edaf2 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/method_list.go +++ b/resource-manager/chaosstudio/2024-01-01/targets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/targets/version.go b/resource-manager/chaosstudio/2024-01-01/targets/version.go index 775543a659a..3ebd7b2433c 100644 --- a/resource-manager/chaosstudio/2024-01-01/targets/version.go +++ b/resource-manager/chaosstudio/2024-01-01/targets/version.go @@ -1,12 +1,10 @@ package targets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targets/2024-01-01" } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/README.md b/resource-manager/chaosstudio/2024-01-01/targettypes/README.md index 576e2c84712..d6307abf007 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/README.md +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2024-01-01/targettypes` Documentation -The `targettypes` SDK allows for interaction with the Azure Resource Manager Service `chaosstudio` (API Version `2024-01-01`). +The `targettypes` SDK allows for interaction with Azure Resource Manager `chaosstudio` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/client.go b/resource-manager/chaosstudio/2024-01-01/targettypes/client.go index ab93296dfcb..5f40b7e59fe 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/client.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/client.go @@ -15,7 +15,7 @@ type TargetTypesClient struct { } func NewTargetTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targettypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targettypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetTypesClient: %+v", err) } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/id_location.go b/resource-manager/chaosstudio/2024-01-01/targettypes/id_location.go index ff2ac33008d..67bca4a3916 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/id_location.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/id_targettype.go b/resource-manager/chaosstudio/2024-01-01/targettypes/id_targettype.go index 0c73bed2e05..1f3be4c526f 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/id_targettype.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/id_targettype.go @@ -42,7 +42,7 @@ func ParseTargetTypeID(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTargetTypeIDInsensitively(input string) (*TargetTypeId, error) { } id := TargetTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/method_get.go b/resource-manager/chaosstudio/2024-01-01/targettypes/method_get.go index 6ff56a33ce6..93867c52e02 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/method_get.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/method_get.go @@ -45,7 +45,6 @@ func (c TargetTypesClient) Get(ctx context.Context, id TargetTypeId) (result Get var model TargetType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/method_list.go b/resource-manager/chaosstudio/2024-01-01/targettypes/method_list.go index 62d8fb2d6f0..7e07ba42f4d 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/method_list.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/chaosstudio/2024-01-01/targettypes/version.go b/resource-manager/chaosstudio/2024-01-01/targettypes/version.go index f6c1c617938..63b61f0630f 100644 --- a/resource-manager/chaosstudio/2024-01-01/targettypes/version.go +++ b/resource-manager/chaosstudio/2024-01-01/targettypes/version.go @@ -1,12 +1,10 @@ package targettypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targettypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targettypes/2024-01-01" } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md index 20f470ee0a5..f07acce1d58 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts` Documentation -The `cognitiveservicesaccounts` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `cognitiveservicesaccounts` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go index 574dcc192d1..6cd1def0437 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/client.go @@ -15,7 +15,7 @@ type CognitiveServicesAccountsClient struct { } func NewCognitiveServicesAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*CognitiveServicesAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cognitiveservicesaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cognitiveservicesaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CognitiveServicesAccountsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go index a76738051ab..3c4b082e3e8 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go index 8554c336775..01b458f20f5 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_deletedaccount.go @@ -44,7 +44,7 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go index 9375e26eabe..4b5b37a7817 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go index c6a3eb2a3e8..5d07d81b669 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c CognitiveServicesAccountsClient) AccountsGet(ctx context.Context, id Acc var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go index 3e59222efbf..c24b7f052d7 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistkeys.go @@ -46,7 +46,6 @@ func (c CognitiveServicesAccountsClient) AccountsListKeys(ctx context.Context, i var model ApiKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go index d6ff403fa1e..d796d0612bd 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistskus.go @@ -46,7 +46,6 @@ func (c CognitiveServicesAccountsClient) AccountsListSkus(ctx context.Context, i var model AccountSkuListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go index aa800ae686c..dbe6c3aca45 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountslistusages.go @@ -39,6 +39,7 @@ func (o AccountsListUsagesOperationOptions) ToHeaders() *client.Headers { func (o AccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go index 80ab81ec7a8..eeb30efbda6 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_accountsregeneratekey.go @@ -50,7 +50,6 @@ func (c CognitiveServicesAccountsClient) AccountsRegenerateKey(ctx context.Conte var model ApiKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go index a116ebb69af..8e7e462576e 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkdomainavailability.go @@ -51,7 +51,6 @@ func (c CognitiveServicesAccountsClient) CheckDomainAvailability(ctx context.Con var model DomainAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go index 17b1e327996..f0ca7782dd0 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_checkskuavailability.go @@ -50,7 +50,6 @@ func (c CognitiveServicesAccountsClient) CheckSkuAvailability(ctx context.Contex var model SkuAvailabilityListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go index 5518f33375d..7e0415db7f7 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/method_deletedaccountsget.go @@ -45,7 +45,6 @@ func (c CognitiveServicesAccountsClient) DeletedAccountsGet(ctx context.Context, var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go index 709c57b3506..c5666ad9880 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicesaccounts/version.go @@ -1,12 +1,10 @@ package cognitiveservicesaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cognitiveservicesaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cognitiveservicesaccounts/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/README.md b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/README.md index 1ed0b27754b..22d943852fc 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/README.md +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans` Documentation -The `cognitiveservicescommitmentplans` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `cognitiveservicescommitmentplans` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/client.go b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/client.go index d15b664b06f..38a558dc68c 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/client.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/client.go @@ -15,7 +15,7 @@ type CognitiveServicesCommitmentPlansClient struct { } func NewCognitiveServicesCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CognitiveServicesCommitmentPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cognitiveservicescommitmentplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cognitiveservicescommitmentplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CognitiveServicesCommitmentPlansClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/id_commitmentplan.go b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/id_commitmentplan.go index d76891e9a49..7b1a2a24710 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/id_commitmentplan.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/id_commitmentplan.go @@ -42,7 +42,7 @@ func ParseCommitmentPlanID(input string) (*CommitmentPlanId, error) { } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommitmentPlanIDInsensitively(input string) (*CommitmentPlanId, error) } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go index e72a8b796bf..9524e1a5dcb 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go @@ -45,7 +45,6 @@ func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansGetPlan(ctx conte var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/version.go b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/version.go index 997111eb53a..bb4062f11e1 100644 --- a/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/version.go +++ b/resource-manager/cognitive/2023-05-01/cognitiveservicescommitmentplans/version.go @@ -1,12 +1,10 @@ package cognitiveservicescommitmentplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cognitiveservicescommitmentplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cognitiveservicescommitmentplans/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/README.md b/resource-manager/cognitive/2023-05-01/commitmentplans/README.md index bf043b4b8ed..c48718e018f 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/README.md +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/commitmentplans` Documentation -The `commitmentplans` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `commitmentplans` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/client.go b/resource-manager/cognitive/2023-05-01/commitmentplans/client.go index eccd5e46144..f47b62665fa 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/client.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/client.go @@ -15,7 +15,7 @@ type CommitmentPlansClient struct { } func NewCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CommitmentPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commitmentplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "commitmentplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommitmentPlansClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/id_account.go b/resource-manager/cognitive/2023-05-01/commitmentplans/id_account.go index 02c261fec73..03237d96f6a 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/id_account.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountassociation.go b/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountassociation.go index 8ab219f0ddb..332ee3c7293 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountassociation.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountassociation.go @@ -44,7 +44,7 @@ func ParseAccountAssociationID(input string) (*AccountAssociationId, error) { } id := AccountAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountAssociationIDInsensitively(input string) (*AccountAssociationId } id := AccountAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountcommitmentplan.go b/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountcommitmentplan.go index 01785442577..60de8192d86 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountcommitmentplan.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/id_accountcommitmentplan.go @@ -44,7 +44,7 @@ func ParseAccountCommitmentPlanID(input string) (*AccountCommitmentPlanId, error } id := AccountCommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountCommitmentPlanIDInsensitively(input string) (*AccountCommitment } id := AccountCommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/id_commitmentplan.go b/resource-manager/cognitive/2023-05-01/commitmentplans/id_commitmentplan.go index a3cc75c62d1..b072d07c80f 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/id_commitmentplan.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/id_commitmentplan.go @@ -42,7 +42,7 @@ func ParseCommitmentPlanID(input string) (*CommitmentPlanId, error) { } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommitmentPlanIDInsensitively(input string) (*CommitmentPlanId, error) } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/method_createorupdate.go b/resource-manager/cognitive/2023-05-01/commitmentplans/method_createorupdate.go index 9e198245dd8..fb89f9e2ea2 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/method_createorupdate.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CommitmentPlansClient) CreateOrUpdate(ctx context.Context, id AccountCom var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/method_get.go b/resource-manager/cognitive/2023-05-01/commitmentplans/method_get.go index 9221f10e690..b35d2dc2934 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/method_get.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/method_get.go @@ -45,7 +45,6 @@ func (c CommitmentPlansClient) Get(ctx context.Context, id AccountCommitmentPlan var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/method_getassociation.go b/resource-manager/cognitive/2023-05-01/commitmentplans/method_getassociation.go index 89904210382..00c16179900 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/method_getassociation.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/method_getassociation.go @@ -45,7 +45,6 @@ func (c CommitmentPlansClient) GetAssociation(ctx context.Context, id AccountAss var model CommitmentPlanAccountAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/commitmentplans/version.go b/resource-manager/cognitive/2023-05-01/commitmentplans/version.go index 4d4557f4e32..137826324e0 100644 --- a/resource-manager/cognitive/2023-05-01/commitmentplans/version.go +++ b/resource-manager/cognitive/2023-05-01/commitmentplans/version.go @@ -1,12 +1,10 @@ package commitmentplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commitmentplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/commitmentplans/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/commitmenttiers/README.md b/resource-manager/cognitive/2023-05-01/commitmenttiers/README.md index 14565802644..c72ce20394e 100644 --- a/resource-manager/cognitive/2023-05-01/commitmenttiers/README.md +++ b/resource-manager/cognitive/2023-05-01/commitmenttiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/commitmenttiers` Documentation -The `commitmenttiers` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `commitmenttiers` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/commitmenttiers/client.go b/resource-manager/cognitive/2023-05-01/commitmenttiers/client.go index 859c1a4a147..b6a58469205 100644 --- a/resource-manager/cognitive/2023-05-01/commitmenttiers/client.go +++ b/resource-manager/cognitive/2023-05-01/commitmenttiers/client.go @@ -15,7 +15,7 @@ type CommitmentTiersClient struct { } func NewCommitmentTiersClientWithBaseURI(sdkApi sdkEnv.Api) (*CommitmentTiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commitmenttiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "commitmenttiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommitmentTiersClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/commitmenttiers/id_location.go b/resource-manager/cognitive/2023-05-01/commitmenttiers/id_location.go index 1ef760b3864..ae63651b0aa 100644 --- a/resource-manager/cognitive/2023-05-01/commitmenttiers/id_location.go +++ b/resource-manager/cognitive/2023-05-01/commitmenttiers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/commitmenttiers/version.go b/resource-manager/cognitive/2023-05-01/commitmenttiers/version.go index b1a004694d6..0fb89caccc7 100644 --- a/resource-manager/cognitive/2023-05-01/commitmenttiers/version.go +++ b/resource-manager/cognitive/2023-05-01/commitmenttiers/version.go @@ -1,12 +1,10 @@ package commitmenttiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commitmenttiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/commitmenttiers/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/deployments/README.md b/resource-manager/cognitive/2023-05-01/deployments/README.md index 5c705d683a2..0d12efec9dc 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/README.md +++ b/resource-manager/cognitive/2023-05-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/deployments/client.go b/resource-manager/cognitive/2023-05-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/client.go +++ b/resource-manager/cognitive/2023-05-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/deployments/id_account.go b/resource-manager/cognitive/2023-05-01/deployments/id_account.go index bccff6774a1..f96460192a9 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/id_account.go +++ b/resource-manager/cognitive/2023-05-01/deployments/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go b/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go index dbbb45912e2..b7222149acf 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go +++ b/resource-manager/cognitive/2023-05-01/deployments/id_deployment.go @@ -44,7 +44,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/deployments/method_get.go b/resource-manager/cognitive/2023-05-01/deployments/method_get.go index 957621b4fb1..4e7a125be9e 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/method_get.go +++ b/resource-manager/cognitive/2023-05-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id DeploymentId) (result Get var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/deployments/version.go b/resource-manager/cognitive/2023-05-01/deployments/version.go index 379776d6d84..a4d532834a5 100644 --- a/resource-manager/cognitive/2023-05-01/deployments/version.go +++ b/resource-manager/cognitive/2023-05-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/models/README.md b/resource-manager/cognitive/2023-05-01/models/README.md index ed5d72402b0..07ee0e528ea 100644 --- a/resource-manager/cognitive/2023-05-01/models/README.md +++ b/resource-manager/cognitive/2023-05-01/models/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/models` Documentation -The `models` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `models` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/models/client.go b/resource-manager/cognitive/2023-05-01/models/client.go index 420b150ded1..14aee55ddde 100644 --- a/resource-manager/cognitive/2023-05-01/models/client.go +++ b/resource-manager/cognitive/2023-05-01/models/client.go @@ -15,7 +15,7 @@ type ModelsClient struct { } func NewModelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "models", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "models", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/models/id_location.go b/resource-manager/cognitive/2023-05-01/models/id_location.go index 57a6f333a14..a9ba75ce34a 100644 --- a/resource-manager/cognitive/2023-05-01/models/id_location.go +++ b/resource-manager/cognitive/2023-05-01/models/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/models/version.go b/resource-manager/cognitive/2023-05-01/models/version.go index eb543a7448f..d9e54bee4c0 100644 --- a/resource-manager/cognitive/2023-05-01/models/version.go +++ b/resource-manager/cognitive/2023-05-01/models/version.go @@ -1,12 +1,10 @@ package models -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/models/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/models/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/README.md b/resource-manager/cognitive/2023-05-01/privateendpointconnections/README.md index abf21d87c06..e6cac8abf4b 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/README.md +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/client.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/client.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_account.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_account.go index 016847b35fb..6d79d84e2dd 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_account.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_privateendpointconnection.go index ffa962deae9..cd36dc9f4e6 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_get.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_get.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_list.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_list.go index 1da156ba99e..475a3257a87 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_list.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id AccountId var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/privateendpointconnections/version.go b/resource-manager/cognitive/2023-05-01/privateendpointconnections/version.go index c66466113e9..73acafaf02b 100644 --- a/resource-manager/cognitive/2023-05-01/privateendpointconnections/version.go +++ b/resource-manager/cognitive/2023-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/privatelinkresources/README.md b/resource-manager/cognitive/2023-05-01/privatelinkresources/README.md index 3787cb86d5f..a960330663b 100644 --- a/resource-manager/cognitive/2023-05-01/privatelinkresources/README.md +++ b/resource-manager/cognitive/2023-05-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/privatelinkresources/client.go b/resource-manager/cognitive/2023-05-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cognitive/2023-05-01/privatelinkresources/client.go +++ b/resource-manager/cognitive/2023-05-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/privatelinkresources/id_account.go b/resource-manager/cognitive/2023-05-01/privatelinkresources/id_account.go index 6a754728c2e..846af69a441 100644 --- a/resource-manager/cognitive/2023-05-01/privatelinkresources/id_account.go +++ b/resource-manager/cognitive/2023-05-01/privatelinkresources/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/privatelinkresources/method_list.go b/resource-manager/cognitive/2023-05-01/privatelinkresources/method_list.go index a5772a8c49c..e5b9cea2564 100644 --- a/resource-manager/cognitive/2023-05-01/privatelinkresources/method_list.go +++ b/resource-manager/cognitive/2023-05-01/privatelinkresources/method_list.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id AccountId) (res var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-05-01/privatelinkresources/version.go b/resource-manager/cognitive/2023-05-01/privatelinkresources/version.go index 924e9f36dbd..7b880f640b8 100644 --- a/resource-manager/cognitive/2023-05-01/privatelinkresources/version.go +++ b/resource-manager/cognitive/2023-05-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/skus/README.md b/resource-manager/cognitive/2023-05-01/skus/README.md index 07b4aa54fcb..5aaf487f4d2 100644 --- a/resource-manager/cognitive/2023-05-01/skus/README.md +++ b/resource-manager/cognitive/2023-05-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/skus/client.go b/resource-manager/cognitive/2023-05-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/cognitive/2023-05-01/skus/client.go +++ b/resource-manager/cognitive/2023-05-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/skus/version.go b/resource-manager/cognitive/2023-05-01/skus/version.go index a773105fcac..fbf7e498613 100644 --- a/resource-manager/cognitive/2023-05-01/skus/version.go +++ b/resource-manager/cognitive/2023-05-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-05-01" } diff --git a/resource-manager/cognitive/2023-05-01/usages/README.md b/resource-manager/cognitive/2023-05-01/usages/README.md index 1baa8bf2d8b..40e6174e9c2 100644 --- a/resource-manager/cognitive/2023-05-01/usages/README.md +++ b/resource-manager/cognitive/2023-05-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-05-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-05-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-05-01/usages/client.go b/resource-manager/cognitive/2023-05-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/cognitive/2023-05-01/usages/client.go +++ b/resource-manager/cognitive/2023-05-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-05-01/usages/id_location.go b/resource-manager/cognitive/2023-05-01/usages/id_location.go index b36f5a62c1a..c20d663dde7 100644 --- a/resource-manager/cognitive/2023-05-01/usages/id_location.go +++ b/resource-manager/cognitive/2023-05-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-05-01/usages/method_list.go b/resource-manager/cognitive/2023-05-01/usages/method_list.go index cfa904ac7f3..a77338a3921 100644 --- a/resource-manager/cognitive/2023-05-01/usages/method_list.go +++ b/resource-manager/cognitive/2023-05-01/usages/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/cognitive/2023-05-01/usages/version.go b/resource-manager/cognitive/2023-05-01/usages/version.go index c3fe8121163..bb12d54ed50 100644 --- a/resource-manager/cognitive/2023-05-01/usages/version.go +++ b/resource-manager/cognitive/2023-05-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-05-01" } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/README.md b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/README.md index 172d870e0db..4099eddb66d 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts` Documentation -The `cognitiveservicesaccounts` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `cognitiveservicesaccounts` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/client.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/client.go index 574dcc192d1..6cd1def0437 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/client.go @@ -15,7 +15,7 @@ type CognitiveServicesAccountsClient struct { } func NewCognitiveServicesAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*CognitiveServicesAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cognitiveservicesaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cognitiveservicesaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CognitiveServicesAccountsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_account.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_account.go index a76738051ab..3c4b082e3e8 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_deletedaccount.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_deletedaccount.go index 8554c336775..01b458f20f5 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_deletedaccount.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_deletedaccount.go @@ -44,7 +44,7 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_location.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_location.go index 9375e26eabe..4b5b37a7817 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_location.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsget.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsget.go index c6a3eb2a3e8..5d07d81b669 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsget.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c CognitiveServicesAccountsClient) AccountsGet(ctx context.Context, id Acc var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistkeys.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistkeys.go index 3e59222efbf..c24b7f052d7 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistkeys.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistkeys.go @@ -46,7 +46,6 @@ func (c CognitiveServicesAccountsClient) AccountsListKeys(ctx context.Context, i var model ApiKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistskus.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistskus.go index d6ff403fa1e..d796d0612bd 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistskus.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistskus.go @@ -46,7 +46,6 @@ func (c CognitiveServicesAccountsClient) AccountsListSkus(ctx context.Context, i var model AccountSkuListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistusages.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistusages.go index aa800ae686c..dbe6c3aca45 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistusages.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountslistusages.go @@ -39,6 +39,7 @@ func (o AccountsListUsagesOperationOptions) ToHeaders() *client.Headers { func (o AccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsregeneratekey.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsregeneratekey.go index 80ab81ec7a8..eeb30efbda6 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsregeneratekey.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_accountsregeneratekey.go @@ -50,7 +50,6 @@ func (c CognitiveServicesAccountsClient) AccountsRegenerateKey(ctx context.Conte var model ApiKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkdomainavailability.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkdomainavailability.go index a116ebb69af..8e7e462576e 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkdomainavailability.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkdomainavailability.go @@ -51,7 +51,6 @@ func (c CognitiveServicesAccountsClient) CheckDomainAvailability(ctx context.Con var model DomainAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkskuavailability.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkskuavailability.go index 17b1e327996..f0ca7782dd0 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkskuavailability.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_checkskuavailability.go @@ -50,7 +50,6 @@ func (c CognitiveServicesAccountsClient) CheckSkuAvailability(ctx context.Contex var model SkuAvailabilityListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_deletedaccountsget.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_deletedaccountsget.go index 5518f33375d..7e0415db7f7 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_deletedaccountsget.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/method_deletedaccountsget.go @@ -45,7 +45,6 @@ func (c CognitiveServicesAccountsClient) DeletedAccountsGet(ctx context.Context, var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/version.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/version.go index a3f76d93b91..576e2948557 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicesaccounts/version.go @@ -1,12 +1,10 @@ package cognitiveservicesaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cognitiveservicesaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cognitiveservicesaccounts/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/README.md b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/README.md index 5e4cd089bbf..24613fa515d 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans` Documentation -The `cognitiveservicescommitmentplans` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `cognitiveservicescommitmentplans` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/client.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/client.go index d15b664b06f..38a558dc68c 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/client.go @@ -15,7 +15,7 @@ type CognitiveServicesCommitmentPlansClient struct { } func NewCognitiveServicesCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CognitiveServicesCommitmentPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cognitiveservicescommitmentplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cognitiveservicescommitmentplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CognitiveServicesCommitmentPlansClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/id_commitmentplan.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/id_commitmentplan.go index d76891e9a49..7b1a2a24710 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/id_commitmentplan.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/id_commitmentplan.go @@ -42,7 +42,7 @@ func ParseCommitmentPlanID(input string) (*CommitmentPlanId, error) { } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommitmentPlanIDInsensitively(input string) (*CommitmentPlanId, error) } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go index e72a8b796bf..9524e1a5dcb 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/method_commitmentplansgetplan.go @@ -45,7 +45,6 @@ func (c CognitiveServicesCommitmentPlansClient) CommitmentPlansGetPlan(ctx conte var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/version.go b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/version.go index b38c3c699d4..d82c03cf516 100644 --- a/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/cognitiveservicescommitmentplans/version.go @@ -1,12 +1,10 @@ package cognitiveservicescommitmentplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cognitiveservicescommitmentplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cognitiveservicescommitmentplans/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/README.md b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/README.md index e2075c022f1..f8d35106d1b 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/commitmentplans` Documentation -The `commitmentplans` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `commitmentplans` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/client.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/client.go index eccd5e46144..f47b62665fa 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/client.go @@ -15,7 +15,7 @@ type CommitmentPlansClient struct { } func NewCommitmentPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*CommitmentPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commitmentplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "commitmentplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommitmentPlansClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_account.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_account.go index 02c261fec73..03237d96f6a 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountassociation.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountassociation.go index 8ab219f0ddb..332ee3c7293 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountassociation.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountassociation.go @@ -44,7 +44,7 @@ func ParseAccountAssociationID(input string) (*AccountAssociationId, error) { } id := AccountAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountAssociationIDInsensitively(input string) (*AccountAssociationId } id := AccountAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountcommitmentplan.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountcommitmentplan.go index 01785442577..60de8192d86 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountcommitmentplan.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_accountcommitmentplan.go @@ -44,7 +44,7 @@ func ParseAccountCommitmentPlanID(input string) (*AccountCommitmentPlanId, error } id := AccountCommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountCommitmentPlanIDInsensitively(input string) (*AccountCommitment } id := AccountCommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_commitmentplan.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_commitmentplan.go index a3cc75c62d1..b072d07c80f 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_commitmentplan.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/id_commitmentplan.go @@ -42,7 +42,7 @@ func ParseCommitmentPlanID(input string) (*CommitmentPlanId, error) { } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommitmentPlanIDInsensitively(input string) (*CommitmentPlanId, error) } id := CommitmentPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_createorupdate.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_createorupdate.go index 9e198245dd8..fb89f9e2ea2 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_createorupdate.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CommitmentPlansClient) CreateOrUpdate(ctx context.Context, id AccountCom var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_get.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_get.go index 9221f10e690..b35d2dc2934 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_get.go @@ -45,7 +45,6 @@ func (c CommitmentPlansClient) Get(ctx context.Context, id AccountCommitmentPlan var model CommitmentPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_getassociation.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_getassociation.go index 89904210382..00c16179900 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_getassociation.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/method_getassociation.go @@ -45,7 +45,6 @@ func (c CommitmentPlansClient) GetAssociation(ctx context.Context, id AccountAss var model CommitmentPlanAccountAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/version.go b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/version.go index 2d3cc5744d1..391b1ef2459 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmentplans/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmentplans/version.go @@ -1,12 +1,10 @@ package commitmentplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commitmentplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/commitmentplans/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/README.md b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/README.md index 8dca551690b..859e7373aae 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/commitmenttiers` Documentation -The `commitmenttiers` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `commitmenttiers` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/client.go b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/client.go index 859c1a4a147..b6a58469205 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/client.go @@ -15,7 +15,7 @@ type CommitmentTiersClient struct { } func NewCommitmentTiersClientWithBaseURI(sdkApi sdkEnv.Api) (*CommitmentTiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commitmenttiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "commitmenttiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommitmentTiersClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/id_location.go b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/id_location.go index 1ef760b3864..ae63651b0aa 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/id_location.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/version.go b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/version.go index 0ab81038c2c..060dd57ba85 100644 --- a/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/commitmenttiers/version.go @@ -1,12 +1,10 @@ package commitmenttiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commitmenttiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/commitmenttiers/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/README.md b/resource-manager/cognitive/2023-10-01-preview/deployments/README.md index 0a08b269097..a0478c5ff8d 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `deployments` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/client.go b/resource-manager/cognitive/2023-10-01-preview/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/id_account.go b/resource-manager/cognitive/2023-10-01-preview/deployments/id_account.go index bccff6774a1..f96460192a9 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/id_deployment.go b/resource-manager/cognitive/2023-10-01-preview/deployments/id_deployment.go index dbbb45912e2..b7222149acf 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/id_deployment.go +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/id_deployment.go @@ -44,7 +44,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/method_get.go b/resource-manager/cognitive/2023-10-01-preview/deployments/method_get.go index 957621b4fb1..4e7a125be9e 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id DeploymentId) (result Get var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/deployments/version.go b/resource-manager/cognitive/2023-10-01-preview/deployments/version.go index 8d5270efaf7..a9c6ce5c50e 100644 --- a/resource-manager/cognitive/2023-10-01-preview/deployments/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/README.md b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/README.md index e81097f3809..691439a28e7 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/encryptionscopes` Documentation -The `encryptionscopes` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `encryptionscopes` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/client.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/client.go index cece7665062..b91c7fbf3ce 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/client.go @@ -15,7 +15,7 @@ type EncryptionScopesClient struct { } func NewEncryptionScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionScopesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_account.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_account.go index 7b1b5c7a3f9..ea8a22de414 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_encryptionscope.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_encryptionscope.go index f6ac84fcca7..fdc613678d0 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_encryptionscope.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/id_encryptionscope.go @@ -44,7 +44,7 @@ func ParseEncryptionScopeID(input string) (*EncryptionScopeId, error) { } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEncryptionScopeIDInsensitively(input string) (*EncryptionScopeId, erro } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_createorupdate.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_createorupdate.go index 09cb6a98b6e..6813bc046b2 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_createorupdate.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EncryptionScopesClient) CreateOrUpdate(ctx context.Context, id Encryptio var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_get.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_get.go index f3d244a9d4a..9804f1d3dcd 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/method_get.go @@ -45,7 +45,6 @@ func (c EncryptionScopesClient) Get(ctx context.Context, id EncryptionScopeId) ( var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/version.go b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/version.go index a4702a0f4d0..eccb8d9aa19 100644 --- a/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/encryptionscopes/version.go @@ -1,12 +1,10 @@ package encryptionscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionscopes/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/models/README.md b/resource-manager/cognitive/2023-10-01-preview/models/README.md index f94a07987b1..c0358ed0800 100644 --- a/resource-manager/cognitive/2023-10-01-preview/models/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/models/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/models` Documentation -The `models` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `models` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/models/client.go b/resource-manager/cognitive/2023-10-01-preview/models/client.go index 420b150ded1..14aee55ddde 100644 --- a/resource-manager/cognitive/2023-10-01-preview/models/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/models/client.go @@ -15,7 +15,7 @@ type ModelsClient struct { } func NewModelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "models", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "models", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/models/id_location.go b/resource-manager/cognitive/2023-10-01-preview/models/id_location.go index 57a6f333a14..a9ba75ce34a 100644 --- a/resource-manager/cognitive/2023-10-01-preview/models/id_location.go +++ b/resource-manager/cognitive/2023-10-01-preview/models/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/models/version.go b/resource-manager/cognitive/2023-10-01-preview/models/version.go index dcdbb86a0cd..361dd03b426 100644 --- a/resource-manager/cognitive/2023-10-01-preview/models/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/models/version.go @@ -1,12 +1,10 @@ package models -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/models/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/models/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/README.md b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/README.md index 6fca1ad5862..d2d922b1ecf 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/client.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_account.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_account.go index 016847b35fb..6d79d84e2dd 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go index ffa962deae9..cd36dc9f4e6 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_get.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_list.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_list.go index 1da156ba99e..475a3257a87 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_list.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id AccountId var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/version.go b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/version.go index 6aced303ba5..3ff61899d64 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/README.md b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/README.md index e8e7464d1c6..1a544cbed38 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/client.go b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/id_account.go b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/id_account.go index 6a754728c2e..846af69a441 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/method_list.go b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/method_list.go index a5772a8c49c..e5b9cea2564 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/method_list.go +++ b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/method_list.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id AccountId) (res var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/version.go b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/version.go index 7093fcb3bc2..e9d7a8dfafc 100644 --- a/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/README.md b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/README.md index 0487017b9a8..21a3bbdbf0a 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/raiblocklists` Documentation -The `raiblocklists` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `raiblocklists` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/client.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/client.go index 64c359bae8f..8721ad1960a 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/client.go @@ -15,7 +15,7 @@ type RaiBlocklistsClient struct { } func NewRaiBlocklistsClientWithBaseURI(sdkApi sdkEnv.Api) (*RaiBlocklistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "raiblocklists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "raiblocklists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RaiBlocklistsClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_account.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_account.go index 0c754922dfa..3603870f5ee 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklist.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklist.go index 4a45754a1af..9b8bb87bb21 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklist.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklist.go @@ -44,7 +44,7 @@ func ParseRaiBlocklistID(input string) (*RaiBlocklistId, error) { } id := RaiBlocklistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRaiBlocklistIDInsensitively(input string) (*RaiBlocklistId, error) { } id := RaiBlocklistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklistitem.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklistitem.go index 55db6d1e312..7d072f168db 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklistitem.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/id_raiblocklistitem.go @@ -46,7 +46,7 @@ func ParseRaiBlocklistItemID(input string) (*RaiBlocklistItemId, error) { } id := RaiBlocklistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRaiBlocklistItemIDInsensitively(input string) (*RaiBlocklistItemId, er } id := RaiBlocklistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_createorupdate.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_createorupdate.go index 9bcd2f53455..a6b788f2ab6 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_createorupdate.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RaiBlocklistsClient) CreateOrUpdate(ctx context.Context, id RaiBlocklist var model RaiBlocklist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_get.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_get.go index 14d4705b0af..277a3c8997e 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_get.go @@ -45,7 +45,6 @@ func (c RaiBlocklistsClient) Get(ctx context.Context, id RaiBlocklistId) (result var model RaiBlocklist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemscreateorupdate.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemscreateorupdate.go index a28cc0a0d99..5caeb001e7c 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemscreateorupdate.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemscreateorupdate.go @@ -50,7 +50,6 @@ func (c RaiBlocklistsClient) RaiBlocklistItemsCreateOrUpdate(ctx context.Context var model RaiBlocklistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemsget.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemsget.go index 76cb8b2a723..390fcc14f82 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemsget.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/method_raiblocklistitemsget.go @@ -45,7 +45,6 @@ func (c RaiBlocklistsClient) RaiBlocklistItemsGet(ctx context.Context, id RaiBlo var model RaiBlocklistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/version.go b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/version.go index c529ffb2d97..465c1ff7ad2 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raiblocklists/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/raiblocklists/version.go @@ -1,12 +1,10 @@ package raiblocklists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/raiblocklists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/raiblocklists/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/README.md b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/README.md index e84e9a08566..33c9d8718aa 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/raicontentfilters` Documentation -The `raicontentfilters` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `raicontentfilters` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/client.go b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/client.go index eb82011a3c8..63dbeff0cfd 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/client.go @@ -15,7 +15,7 @@ type RaiContentFiltersClient struct { } func NewRaiContentFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*RaiContentFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "raicontentfilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "raicontentfilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RaiContentFiltersClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/id_location.go b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/id_location.go index 7577668129c..d93874cd15c 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/id_location.go +++ b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/version.go b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/version.go index c87c8983a9d..f1c8ee9d7ee 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/raicontentfilters/version.go @@ -1,12 +1,10 @@ package raicontentfilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/raicontentfilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/raicontentfilters/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/README.md b/resource-manager/cognitive/2023-10-01-preview/raipolicies/README.md index c8cfce8ed0b..c731136f5e7 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/raipolicies` Documentation -The `raipolicies` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `raipolicies` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/client.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/client.go index 0d0c51b52ca..7503f70f657 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/client.go @@ -15,7 +15,7 @@ type RaiPoliciesClient struct { } func NewRaiPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*RaiPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "raipolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "raipolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RaiPoliciesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_account.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_account.go index 485a5499c37..eec8690c75b 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_account.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_raipolicy.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_raipolicy.go index 6658133747c..bc5cec1872a 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_raipolicy.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/id_raipolicy.go @@ -44,7 +44,7 @@ func ParseRaiPolicyID(input string) (*RaiPolicyId, error) { } id := RaiPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRaiPolicyIDInsensitively(input string) (*RaiPolicyId, error) { } id := RaiPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_createorupdate.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_createorupdate.go index 5ba358f6405..f462d012d82 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_createorupdate.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RaiPoliciesClient) CreateOrUpdate(ctx context.Context, id RaiPolicyId, i var model RaiPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_get.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_get.go index 9b6b75cc0bf..3770891a82f 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_get.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/method_get.go @@ -45,7 +45,6 @@ func (c RaiPoliciesClient) Get(ctx context.Context, id RaiPolicyId) (result GetO var model RaiPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cognitive/2023-10-01-preview/raipolicies/version.go b/resource-manager/cognitive/2023-10-01-preview/raipolicies/version.go index 8f58a7c18b7..34722eaa53c 100644 --- a/resource-manager/cognitive/2023-10-01-preview/raipolicies/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/raipolicies/version.go @@ -1,12 +1,10 @@ package raipolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/raipolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/raipolicies/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/skus/README.md b/resource-manager/cognitive/2023-10-01-preview/skus/README.md index 78bc8545f57..d725ef4afb3 100644 --- a/resource-manager/cognitive/2023-10-01-preview/skus/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `skus` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/skus/client.go b/resource-manager/cognitive/2023-10-01-preview/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/cognitive/2023-10-01-preview/skus/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/skus/version.go b/resource-manager/cognitive/2023-10-01-preview/skus/version.go index 6c0e10d1131..bd135f710ec 100644 --- a/resource-manager/cognitive/2023-10-01-preview/skus/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-10-01-preview" } diff --git a/resource-manager/cognitive/2023-10-01-preview/usages/README.md b/resource-manager/cognitive/2023-10-01-preview/usages/README.md index 9984040d01c..8d8ce19ac4d 100644 --- a/resource-manager/cognitive/2023-10-01-preview/usages/README.md +++ b/resource-manager/cognitive/2023-10-01-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cognitive/2023-10-01-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `cognitive` (API Version `2023-10-01-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `cognitive` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cognitive/2023-10-01-preview/usages/client.go b/resource-manager/cognitive/2023-10-01-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/cognitive/2023-10-01-preview/usages/client.go +++ b/resource-manager/cognitive/2023-10-01-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/cognitive/2023-10-01-preview/usages/id_location.go b/resource-manager/cognitive/2023-10-01-preview/usages/id_location.go index b36f5a62c1a..c20d663dde7 100644 --- a/resource-manager/cognitive/2023-10-01-preview/usages/id_location.go +++ b/resource-manager/cognitive/2023-10-01-preview/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cognitive/2023-10-01-preview/usages/method_list.go b/resource-manager/cognitive/2023-10-01-preview/usages/method_list.go index cfa904ac7f3..a77338a3921 100644 --- a/resource-manager/cognitive/2023-10-01-preview/usages/method_list.go +++ b/resource-manager/cognitive/2023-10-01-preview/usages/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/cognitive/2023-10-01-preview/usages/version.go b/resource-manager/cognitive/2023-10-01-preview/usages/version.go index b0245054e86..f27f69d6033 100644 --- a/resource-manager/cognitive/2023-10-01-preview/usages/version.go +++ b/resource-manager/cognitive/2023-10-01-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-10-01-preview" } diff --git a/resource-manager/communication/2023-03-31/communicationservices/README.md b/resource-manager/communication/2023-03-31/communicationservices/README.md index 17952778eb9..a1f38158539 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/README.md +++ b/resource-manager/communication/2023-03-31/communicationservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/communicationservices` Documentation -The `communicationservices` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-03-31`). +The `communicationservices` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-03-31/communicationservices/client.go b/resource-manager/communication/2023-03-31/communicationservices/client.go index 489c8a36eec..0b0869f1bf0 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/client.go +++ b/resource-manager/communication/2023-03-31/communicationservices/client.go @@ -15,7 +15,7 @@ type CommunicationServicesClient struct { } func NewCommunicationServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunicationServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communicationservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communicationservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunicationServicesClient: %+v", err) } diff --git a/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go b/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go index 78092b5cbee..ecd73cf8b9a 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go +++ b/resource-manager/communication/2023-03-31/communicationservices/id_communicationservice.go @@ -42,7 +42,7 @@ func ParseCommunicationServiceID(input string) (*CommunicationServiceId, error) } id := CommunicationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationServiceIDInsensitively(input string) (*CommunicationServi } id := CommunicationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_checknameavailability.go b/resource-manager/communication/2023-03-31/communicationservices/method_checknameavailability.go index 14b8081ef64..6132597e81e 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_checknameavailability.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c CommunicationServicesClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_get.go b/resource-manager/communication/2023-03-31/communicationservices/method_get.go index 2af890681fe..6bcc549719c 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_get.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_get.go @@ -45,7 +45,6 @@ func (c CommunicationServicesClient) Get(ctx context.Context, id CommunicationSe var model CommunicationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_linknotificationhub.go b/resource-manager/communication/2023-03-31/communicationservices/method_linknotificationhub.go index c82376b9d5f..45cce64a7ea 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_linknotificationhub.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_linknotificationhub.go @@ -50,7 +50,6 @@ func (c CommunicationServicesClient) LinkNotificationHub(ctx context.Context, id var model LinkedNotificationHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_listkeys.go b/resource-manager/communication/2023-03-31/communicationservices/method_listkeys.go index 3c4c43bf356..77070fe0c74 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_listkeys.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_listkeys.go @@ -46,7 +46,6 @@ func (c CommunicationServicesClient) ListKeys(ctx context.Context, id Communicat var model CommunicationServiceKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_regeneratekey.go b/resource-manager/communication/2023-03-31/communicationservices/method_regeneratekey.go index 590cccd116b..fcf94edb394 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_regeneratekey.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c CommunicationServicesClient) RegenerateKey(ctx context.Context, id Commu var model CommunicationServiceKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/method_update.go b/resource-manager/communication/2023-03-31/communicationservices/method_update.go index c7b62c70f53..6c0de49675a 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/method_update.go +++ b/resource-manager/communication/2023-03-31/communicationservices/method_update.go @@ -49,7 +49,6 @@ func (c CommunicationServicesClient) Update(ctx context.Context, id Communicatio var model CommunicationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/communicationservices/version.go b/resource-manager/communication/2023-03-31/communicationservices/version.go index b2eb1dc88ac..1a6aab2b4d1 100644 --- a/resource-manager/communication/2023-03-31/communicationservices/version.go +++ b/resource-manager/communication/2023-03-31/communicationservices/version.go @@ -1,12 +1,10 @@ package communicationservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communicationservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communicationservices/2023-03-31" } diff --git a/resource-manager/communication/2023-03-31/domains/README.md b/resource-manager/communication/2023-03-31/domains/README.md index 08eddd35707..5ad9befb55b 100644 --- a/resource-manager/communication/2023-03-31/domains/README.md +++ b/resource-manager/communication/2023-03-31/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-03-31`). +The `domains` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-03-31/domains/client.go b/resource-manager/communication/2023-03-31/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/communication/2023-03-31/domains/client.go +++ b/resource-manager/communication/2023-03-31/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/communication/2023-03-31/domains/id_domain.go b/resource-manager/communication/2023-03-31/domains/id_domain.go index 412b08fcdf3..2270daf6ba1 100644 --- a/resource-manager/communication/2023-03-31/domains/id_domain.go +++ b/resource-manager/communication/2023-03-31/domains/id_domain.go @@ -44,7 +44,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/domains/id_emailservice.go b/resource-manager/communication/2023-03-31/domains/id_emailservice.go index 130ee50d6e4..281990813ec 100644 --- a/resource-manager/communication/2023-03-31/domains/id_emailservice.go +++ b/resource-manager/communication/2023-03-31/domains/id_emailservice.go @@ -42,7 +42,7 @@ func ParseEmailServiceID(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEmailServiceIDInsensitively(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/domains/method_get.go b/resource-manager/communication/2023-03-31/domains/method_get.go index 5aaff4ba93e..2266c40f126 100644 --- a/resource-manager/communication/2023-03-31/domains/method_get.go +++ b/resource-manager/communication/2023-03-31/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model DomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/domains/version.go b/resource-manager/communication/2023-03-31/domains/version.go index 81aadaf4b3d..c874dd74cf7 100644 --- a/resource-manager/communication/2023-03-31/domains/version.go +++ b/resource-manager/communication/2023-03-31/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2023-03-31" } diff --git a/resource-manager/communication/2023-03-31/emailservices/README.md b/resource-manager/communication/2023-03-31/emailservices/README.md index 03c9a58a63a..4f452000fdb 100644 --- a/resource-manager/communication/2023-03-31/emailservices/README.md +++ b/resource-manager/communication/2023-03-31/emailservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/emailservices` Documentation -The `emailservices` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-03-31`). +The `emailservices` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-03-31/emailservices/client.go b/resource-manager/communication/2023-03-31/emailservices/client.go index d40737164f4..5aff393f049 100644 --- a/resource-manager/communication/2023-03-31/emailservices/client.go +++ b/resource-manager/communication/2023-03-31/emailservices/client.go @@ -15,7 +15,7 @@ type EmailServicesClient struct { } func NewEmailServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailServicesClient: %+v", err) } diff --git a/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go b/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go index 326c60db1a4..dea9937831b 100644 --- a/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go +++ b/resource-manager/communication/2023-03-31/emailservices/id_emailservice.go @@ -42,7 +42,7 @@ func ParseEmailServiceID(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEmailServiceIDInsensitively(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/emailservices/method_get.go b/resource-manager/communication/2023-03-31/emailservices/method_get.go index 1b62a559437..c86979c07b3 100644 --- a/resource-manager/communication/2023-03-31/emailservices/method_get.go +++ b/resource-manager/communication/2023-03-31/emailservices/method_get.go @@ -45,7 +45,6 @@ func (c EmailServicesClient) Get(ctx context.Context, id EmailServiceId) (result var model EmailServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/emailservices/method_listverifiedexchangeonlinedomains.go b/resource-manager/communication/2023-03-31/emailservices/method_listverifiedexchangeonlinedomains.go index 5be1499ab69..aa6c54135ee 100644 --- a/resource-manager/communication/2023-03-31/emailservices/method_listverifiedexchangeonlinedomains.go +++ b/resource-manager/communication/2023-03-31/emailservices/method_listverifiedexchangeonlinedomains.go @@ -47,7 +47,6 @@ func (c EmailServicesClient) ListVerifiedExchangeOnlineDomains(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/emailservices/version.go b/resource-manager/communication/2023-03-31/emailservices/version.go index fc118e2361c..2ee44b0792d 100644 --- a/resource-manager/communication/2023-03-31/emailservices/version.go +++ b/resource-manager/communication/2023-03-31/emailservices/version.go @@ -1,12 +1,10 @@ package emailservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailservices/2023-03-31" } diff --git a/resource-manager/communication/2023-03-31/senderusernames/README.md b/resource-manager/communication/2023-03-31/senderusernames/README.md index ad7ab614c14..a1a434d2164 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/README.md +++ b/resource-manager/communication/2023-03-31/senderusernames/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-03-31/senderusernames` Documentation -The `senderusernames` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-03-31`). +The `senderusernames` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-03-31/senderusernames/client.go b/resource-manager/communication/2023-03-31/senderusernames/client.go index 99754deee81..62327291bae 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/client.go +++ b/resource-manager/communication/2023-03-31/senderusernames/client.go @@ -15,7 +15,7 @@ type SenderUsernamesClient struct { } func NewSenderUsernamesClientWithBaseURI(sdkApi sdkEnv.Api) (*SenderUsernamesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "senderusernames", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "senderusernames", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SenderUsernamesClient: %+v", err) } diff --git a/resource-manager/communication/2023-03-31/senderusernames/id_domain.go b/resource-manager/communication/2023-03-31/senderusernames/id_domain.go index 7244820787b..a06b1bb4a44 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/id_domain.go +++ b/resource-manager/communication/2023-03-31/senderusernames/id_domain.go @@ -44,7 +44,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/senderusernames/id_senderusername.go b/resource-manager/communication/2023-03-31/senderusernames/id_senderusername.go index 4f40ed88d8d..2a77de74b4d 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/id_senderusername.go +++ b/resource-manager/communication/2023-03-31/senderusernames/id_senderusername.go @@ -46,7 +46,7 @@ func ParseSenderUsernameID(input string) (*SenderUsernameId, error) { } id := SenderUsernameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSenderUsernameIDInsensitively(input string) (*SenderUsernameId, error) } id := SenderUsernameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-03-31/senderusernames/method_createorupdate.go b/resource-manager/communication/2023-03-31/senderusernames/method_createorupdate.go index ba76edc9ae6..e73a4255af2 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/method_createorupdate.go +++ b/resource-manager/communication/2023-03-31/senderusernames/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SenderUsernamesClient) CreateOrUpdate(ctx context.Context, id SenderUser var model SenderUsernameResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/senderusernames/method_get.go b/resource-manager/communication/2023-03-31/senderusernames/method_get.go index 3e8620e0053..28fdfbef3be 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/method_get.go +++ b/resource-manager/communication/2023-03-31/senderusernames/method_get.go @@ -45,7 +45,6 @@ func (c SenderUsernamesClient) Get(ctx context.Context, id SenderUsernameId) (re var model SenderUsernameResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-03-31/senderusernames/version.go b/resource-manager/communication/2023-03-31/senderusernames/version.go index ab25806c16f..b615c3fa0af 100644 --- a/resource-manager/communication/2023-03-31/senderusernames/version.go +++ b/resource-manager/communication/2023-03-31/senderusernames/version.go @@ -1,12 +1,10 @@ package senderusernames -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/senderusernames/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/senderusernames/2023-03-31" } diff --git a/resource-manager/communication/2023-04-01/communicationservices/README.md b/resource-manager/communication/2023-04-01/communicationservices/README.md index 84ec35723ab..f33a2a558a2 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/README.md +++ b/resource-manager/communication/2023-04-01/communicationservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-04-01/communicationservices` Documentation -The `communicationservices` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-04-01`). +The `communicationservices` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-04-01/communicationservices/client.go b/resource-manager/communication/2023-04-01/communicationservices/client.go index 489c8a36eec..0b0869f1bf0 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/client.go +++ b/resource-manager/communication/2023-04-01/communicationservices/client.go @@ -15,7 +15,7 @@ type CommunicationServicesClient struct { } func NewCommunicationServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunicationServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communicationservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communicationservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunicationServicesClient: %+v", err) } diff --git a/resource-manager/communication/2023-04-01/communicationservices/id_communicationservice.go b/resource-manager/communication/2023-04-01/communicationservices/id_communicationservice.go index 78092b5cbee..ecd73cf8b9a 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/id_communicationservice.go +++ b/resource-manager/communication/2023-04-01/communicationservices/id_communicationservice.go @@ -42,7 +42,7 @@ func ParseCommunicationServiceID(input string) (*CommunicationServiceId, error) } id := CommunicationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationServiceIDInsensitively(input string) (*CommunicationServi } id := CommunicationServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_checknameavailability.go b/resource-manager/communication/2023-04-01/communicationservices/method_checknameavailability.go index 14b8081ef64..6132597e81e 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_checknameavailability.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c CommunicationServicesClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_get.go b/resource-manager/communication/2023-04-01/communicationservices/method_get.go index 2af890681fe..6bcc549719c 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_get.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_get.go @@ -45,7 +45,6 @@ func (c CommunicationServicesClient) Get(ctx context.Context, id CommunicationSe var model CommunicationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_linknotificationhub.go b/resource-manager/communication/2023-04-01/communicationservices/method_linknotificationhub.go index c82376b9d5f..45cce64a7ea 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_linknotificationhub.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_linknotificationhub.go @@ -50,7 +50,6 @@ func (c CommunicationServicesClient) LinkNotificationHub(ctx context.Context, id var model LinkedNotificationHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_listkeys.go b/resource-manager/communication/2023-04-01/communicationservices/method_listkeys.go index 3c4c43bf356..77070fe0c74 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_listkeys.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_listkeys.go @@ -46,7 +46,6 @@ func (c CommunicationServicesClient) ListKeys(ctx context.Context, id Communicat var model CommunicationServiceKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_regeneratekey.go b/resource-manager/communication/2023-04-01/communicationservices/method_regeneratekey.go index 590cccd116b..fcf94edb394 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_regeneratekey.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c CommunicationServicesClient) RegenerateKey(ctx context.Context, id Commu var model CommunicationServiceKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/method_update.go b/resource-manager/communication/2023-04-01/communicationservices/method_update.go index c7b62c70f53..6c0de49675a 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/method_update.go +++ b/resource-manager/communication/2023-04-01/communicationservices/method_update.go @@ -49,7 +49,6 @@ func (c CommunicationServicesClient) Update(ctx context.Context, id Communicatio var model CommunicationServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/communicationservices/version.go b/resource-manager/communication/2023-04-01/communicationservices/version.go index e03f8d3f1e6..60df2deba6b 100644 --- a/resource-manager/communication/2023-04-01/communicationservices/version.go +++ b/resource-manager/communication/2023-04-01/communicationservices/version.go @@ -1,12 +1,10 @@ package communicationservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communicationservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communicationservices/2023-04-01" } diff --git a/resource-manager/communication/2023-04-01/domains/README.md b/resource-manager/communication/2023-04-01/domains/README.md index 485e3da17fb..80791c33c53 100644 --- a/resource-manager/communication/2023-04-01/domains/README.md +++ b/resource-manager/communication/2023-04-01/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-04-01/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-04-01`). +The `domains` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-04-01/domains/client.go b/resource-manager/communication/2023-04-01/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/communication/2023-04-01/domains/client.go +++ b/resource-manager/communication/2023-04-01/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/communication/2023-04-01/domains/id_domain.go b/resource-manager/communication/2023-04-01/domains/id_domain.go index 412b08fcdf3..2270daf6ba1 100644 --- a/resource-manager/communication/2023-04-01/domains/id_domain.go +++ b/resource-manager/communication/2023-04-01/domains/id_domain.go @@ -44,7 +44,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/domains/id_emailservice.go b/resource-manager/communication/2023-04-01/domains/id_emailservice.go index 130ee50d6e4..281990813ec 100644 --- a/resource-manager/communication/2023-04-01/domains/id_emailservice.go +++ b/resource-manager/communication/2023-04-01/domains/id_emailservice.go @@ -42,7 +42,7 @@ func ParseEmailServiceID(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEmailServiceIDInsensitively(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/domains/method_get.go b/resource-manager/communication/2023-04-01/domains/method_get.go index 5aaff4ba93e..2266c40f126 100644 --- a/resource-manager/communication/2023-04-01/domains/method_get.go +++ b/resource-manager/communication/2023-04-01/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model DomainResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/domains/version.go b/resource-manager/communication/2023-04-01/domains/version.go index da41b42ff54..b91ca9a66eb 100644 --- a/resource-manager/communication/2023-04-01/domains/version.go +++ b/resource-manager/communication/2023-04-01/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2023-04-01" } diff --git a/resource-manager/communication/2023-04-01/emailservices/README.md b/resource-manager/communication/2023-04-01/emailservices/README.md index ddb565d0f3a..82952738add 100644 --- a/resource-manager/communication/2023-04-01/emailservices/README.md +++ b/resource-manager/communication/2023-04-01/emailservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-04-01/emailservices` Documentation -The `emailservices` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-04-01`). +The `emailservices` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-04-01/emailservices/client.go b/resource-manager/communication/2023-04-01/emailservices/client.go index d40737164f4..5aff393f049 100644 --- a/resource-manager/communication/2023-04-01/emailservices/client.go +++ b/resource-manager/communication/2023-04-01/emailservices/client.go @@ -15,7 +15,7 @@ type EmailServicesClient struct { } func NewEmailServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailServicesClient: %+v", err) } diff --git a/resource-manager/communication/2023-04-01/emailservices/id_emailservice.go b/resource-manager/communication/2023-04-01/emailservices/id_emailservice.go index 326c60db1a4..dea9937831b 100644 --- a/resource-manager/communication/2023-04-01/emailservices/id_emailservice.go +++ b/resource-manager/communication/2023-04-01/emailservices/id_emailservice.go @@ -42,7 +42,7 @@ func ParseEmailServiceID(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEmailServiceIDInsensitively(input string) (*EmailServiceId, error) { } id := EmailServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/emailservices/method_get.go b/resource-manager/communication/2023-04-01/emailservices/method_get.go index 1b62a559437..c86979c07b3 100644 --- a/resource-manager/communication/2023-04-01/emailservices/method_get.go +++ b/resource-manager/communication/2023-04-01/emailservices/method_get.go @@ -45,7 +45,6 @@ func (c EmailServicesClient) Get(ctx context.Context, id EmailServiceId) (result var model EmailServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/emailservices/method_listverifiedexchangeonlinedomains.go b/resource-manager/communication/2023-04-01/emailservices/method_listverifiedexchangeonlinedomains.go index 5be1499ab69..aa6c54135ee 100644 --- a/resource-manager/communication/2023-04-01/emailservices/method_listverifiedexchangeonlinedomains.go +++ b/resource-manager/communication/2023-04-01/emailservices/method_listverifiedexchangeonlinedomains.go @@ -47,7 +47,6 @@ func (c EmailServicesClient) ListVerifiedExchangeOnlineDomains(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/emailservices/version.go b/resource-manager/communication/2023-04-01/emailservices/version.go index fecff0f53da..136cfc833a4 100644 --- a/resource-manager/communication/2023-04-01/emailservices/version.go +++ b/resource-manager/communication/2023-04-01/emailservices/version.go @@ -1,12 +1,10 @@ package emailservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailservices/2023-04-01" } diff --git a/resource-manager/communication/2023-04-01/senderusernames/README.md b/resource-manager/communication/2023-04-01/senderusernames/README.md index 19a6158791d..cdfab6bb1e6 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/README.md +++ b/resource-manager/communication/2023-04-01/senderusernames/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/communication/2023-04-01/senderusernames` Documentation -The `senderusernames` SDK allows for interaction with the Azure Resource Manager Service `communication` (API Version `2023-04-01`). +The `senderusernames` SDK allows for interaction with Azure Resource Manager `communication` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/communication/2023-04-01/senderusernames/client.go b/resource-manager/communication/2023-04-01/senderusernames/client.go index 99754deee81..62327291bae 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/client.go +++ b/resource-manager/communication/2023-04-01/senderusernames/client.go @@ -15,7 +15,7 @@ type SenderUsernamesClient struct { } func NewSenderUsernamesClientWithBaseURI(sdkApi sdkEnv.Api) (*SenderUsernamesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "senderusernames", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "senderusernames", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SenderUsernamesClient: %+v", err) } diff --git a/resource-manager/communication/2023-04-01/senderusernames/id_domain.go b/resource-manager/communication/2023-04-01/senderusernames/id_domain.go index 7244820787b..a06b1bb4a44 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/id_domain.go +++ b/resource-manager/communication/2023-04-01/senderusernames/id_domain.go @@ -44,7 +44,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/senderusernames/id_senderusername.go b/resource-manager/communication/2023-04-01/senderusernames/id_senderusername.go index 4f40ed88d8d..2a77de74b4d 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/id_senderusername.go +++ b/resource-manager/communication/2023-04-01/senderusernames/id_senderusername.go @@ -46,7 +46,7 @@ func ParseSenderUsernameID(input string) (*SenderUsernameId, error) { } id := SenderUsernameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSenderUsernameIDInsensitively(input string) (*SenderUsernameId, error) } id := SenderUsernameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/communication/2023-04-01/senderusernames/method_createorupdate.go b/resource-manager/communication/2023-04-01/senderusernames/method_createorupdate.go index ba76edc9ae6..e73a4255af2 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/method_createorupdate.go +++ b/resource-manager/communication/2023-04-01/senderusernames/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SenderUsernamesClient) CreateOrUpdate(ctx context.Context, id SenderUser var model SenderUsernameResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/senderusernames/method_get.go b/resource-manager/communication/2023-04-01/senderusernames/method_get.go index 3e8620e0053..28fdfbef3be 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/method_get.go +++ b/resource-manager/communication/2023-04-01/senderusernames/method_get.go @@ -45,7 +45,6 @@ func (c SenderUsernamesClient) Get(ctx context.Context, id SenderUsernameId) (re var model SenderUsernameResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/communication/2023-04-01/senderusernames/version.go b/resource-manager/communication/2023-04-01/senderusernames/version.go index 90668ffd990..39b4facf3fd 100644 --- a/resource-manager/communication/2023-04-01/senderusernames/version.go +++ b/resource-manager/communication/2023-04-01/senderusernames/version.go @@ -1,12 +1,10 @@ package senderusernames -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/senderusernames/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/senderusernames/2023-04-01" } diff --git a/resource-manager/compute/2021-07-01/availabilitysets/README.md b/resource-manager/compute/2021-07-01/availabilitysets/README.md index 89c8574ab03..bb6b68eed20 100644 --- a/resource-manager/compute/2021-07-01/availabilitysets/README.md +++ b/resource-manager/compute/2021-07-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/availabilitysets/client.go b/resource-manager/compute/2021-07-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/compute/2021-07-01/availabilitysets/client.go +++ b/resource-manager/compute/2021-07-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/availabilitysets/method_resourceskuslist.go b/resource-manager/compute/2021-07-01/availabilitysets/method_resourceskuslist.go index 0b7cde5be3f..f9366a3f5e4 100644 --- a/resource-manager/compute/2021-07-01/availabilitysets/method_resourceskuslist.go +++ b/resource-manager/compute/2021-07-01/availabilitysets/method_resourceskuslist.go @@ -41,6 +41,7 @@ func (o ResourceSkusListOperationOptions) ToHeaders() *client.Headers { func (o ResourceSkusListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/availabilitysets/version.go b/resource-manager/compute/2021-07-01/availabilitysets/version.go index 77a6155656e..9d153f0216f 100644 --- a/resource-manager/compute/2021-07-01/availabilitysets/version.go +++ b/resource-manager/compute/2021-07-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/capacityreservation/README.md b/resource-manager/compute/2021-07-01/capacityreservation/README.md index ab508e1b5ff..13b635c27cc 100644 --- a/resource-manager/compute/2021-07-01/capacityreservation/README.md +++ b/resource-manager/compute/2021-07-01/capacityreservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/capacityreservation` Documentation -The `capacityreservation` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `capacityreservation` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/capacityreservation/client.go b/resource-manager/compute/2021-07-01/capacityreservation/client.go index 63b03839e60..8387846bbe8 100644 --- a/resource-manager/compute/2021-07-01/capacityreservation/client.go +++ b/resource-manager/compute/2021-07-01/capacityreservation/client.go @@ -15,7 +15,7 @@ type CapacityReservationClient struct { } func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/capacityreservation/id_capacityreservationgroup.go b/resource-manager/compute/2021-07-01/capacityreservation/id_capacityreservationgroup.go index 8493ff8f67f..8be7e83d119 100644 --- a/resource-manager/compute/2021-07-01/capacityreservation/id_capacityreservationgroup.go +++ b/resource-manager/compute/2021-07-01/capacityreservation/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/capacityreservation/version.go b/resource-manager/compute/2021-07-01/capacityreservation/version.go index ee7f40463a3..11131e15e66 100644 --- a/resource-manager/compute/2021-07-01/capacityreservation/version.go +++ b/resource-manager/compute/2021-07-01/capacityreservation/version.go @@ -1,12 +1,10 @@ package capacityreservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservation/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/README.md b/resource-manager/compute/2021-07-01/capacityreservationgroups/README.md index 075b4215006..b5f8fe880ac 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/README.md +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/capacityreservationgroups` Documentation -The `capacityreservationgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `capacityreservationgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/client.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/client.go index 15ced399cbc..088a08cf103 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/client.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/client.go @@ -15,7 +15,7 @@ type CapacityReservationGroupsClient struct { } func NewCapacityReservationGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservationgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservationgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/id_capacityreservationgroup.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/id_capacityreservationgroup.go index 92a9a9e1ae1..eee67dd9eed 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_createorupdate.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_createorupdate.go index 35050e649c5..b2779f3d9df 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_createorupdate.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, id var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_get.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_get.go index 3aa39e689af..40ec743fa1e 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_get.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationGroupsClient) Get(ctx context.Context, id CapacityRes var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbyresourcegroup.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbyresourcegroup.go index e3708c6a167..471bfa93e53 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbyresourcegroup.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbysubscription.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbysubscription.go index 810c49f03b4..5a37a32d4dd 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbysubscription.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_update.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_update.go index 904fe5ef0fe..0ab0ca706c1 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/method_update.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/method_update.go @@ -49,7 +49,6 @@ func (c CapacityReservationGroupsClient) Update(ctx context.Context, id Capacity var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/capacityreservationgroups/version.go b/resource-manager/compute/2021-07-01/capacityreservationgroups/version.go index 12b499472bc..d20b7bcf0a6 100644 --- a/resource-manager/compute/2021-07-01/capacityreservationgroups/version.go +++ b/resource-manager/compute/2021-07-01/capacityreservationgroups/version.go @@ -1,12 +1,10 @@ package capacityreservationgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservationgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservationgroups/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/capacityreservations/README.md b/resource-manager/compute/2021-07-01/capacityreservations/README.md index d2164f4ba96..933b7b237ab 100644 --- a/resource-manager/compute/2021-07-01/capacityreservations/README.md +++ b/resource-manager/compute/2021-07-01/capacityreservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/capacityreservations` Documentation -The `capacityreservations` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `capacityreservations` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/capacityreservations/client.go b/resource-manager/compute/2021-07-01/capacityreservations/client.go index 03bc68e43c5..46407a5fa33 100644 --- a/resource-manager/compute/2021-07-01/capacityreservations/client.go +++ b/resource-manager/compute/2021-07-01/capacityreservations/client.go @@ -15,7 +15,7 @@ type CapacityReservationsClient struct { } func NewCapacityReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/capacityreservations/id_capacityreservation.go b/resource-manager/compute/2021-07-01/capacityreservations/id_capacityreservation.go index 0f72f8f4a70..283c492d9c4 100644 --- a/resource-manager/compute/2021-07-01/capacityreservations/id_capacityreservation.go +++ b/resource-manager/compute/2021-07-01/capacityreservations/id_capacityreservation.go @@ -44,7 +44,7 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/capacityreservations/method_get.go b/resource-manager/compute/2021-07-01/capacityreservations/method_get.go index 745d18a7fc3..b9d6e655ff4 100644 --- a/resource-manager/compute/2021-07-01/capacityreservations/method_get.go +++ b/resource-manager/compute/2021-07-01/capacityreservations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationsClient) Get(ctx context.Context, id CapacityReservat var model CapacityReservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/capacityreservations/version.go b/resource-manager/compute/2021-07-01/capacityreservations/version.go index 7c081c95adb..2ed5bd32932 100644 --- a/resource-manager/compute/2021-07-01/capacityreservations/version.go +++ b/resource-manager/compute/2021-07-01/capacityreservations/version.go @@ -1,12 +1,10 @@ package capacityreservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservations/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/communitygalleries/README.md b/resource-manager/compute/2021-07-01/communitygalleries/README.md index e70d98f1b6f..9c2ba427a5e 100644 --- a/resource-manager/compute/2021-07-01/communitygalleries/README.md +++ b/resource-manager/compute/2021-07-01/communitygalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/communitygalleries` Documentation -The `communitygalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `communitygalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/communitygalleries/client.go b/resource-manager/compute/2021-07-01/communitygalleries/client.go index ee3fe76a525..01d7a073e31 100644 --- a/resource-manager/compute/2021-07-01/communitygalleries/client.go +++ b/resource-manager/compute/2021-07-01/communitygalleries/client.go @@ -15,7 +15,7 @@ type CommunityGalleriesClient struct { } func NewCommunityGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/communitygalleries/id_communitygallery.go b/resource-manager/compute/2021-07-01/communitygalleries/id_communitygallery.go index b40a2813f6e..f3bd59f7594 100644 --- a/resource-manager/compute/2021-07-01/communitygalleries/id_communitygallery.go +++ b/resource-manager/compute/2021-07-01/communitygalleries/id_communitygallery.go @@ -42,7 +42,7 @@ func ParseCommunityGalleryID(input string) (*CommunityGalleryId, error) { } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunityGalleryIDInsensitively(input string) (*CommunityGalleryId, er } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/communitygalleries/method_get.go b/resource-manager/compute/2021-07-01/communitygalleries/method_get.go index 0ec53b5209e..b5525bfa5b0 100644 --- a/resource-manager/compute/2021-07-01/communitygalleries/method_get.go +++ b/resource-manager/compute/2021-07-01/communitygalleries/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleriesClient) Get(ctx context.Context, id CommunityGalleryId var model PirCommunityGalleryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/communitygalleries/version.go b/resource-manager/compute/2021-07-01/communitygalleries/version.go index ed792d1e8a3..d7313764f74 100644 --- a/resource-manager/compute/2021-07-01/communitygalleries/version.go +++ b/resource-manager/compute/2021-07-01/communitygalleries/version.go @@ -1,12 +1,10 @@ package communitygalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleries/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimages/README.md b/resource-manager/compute/2021-07-01/communitygalleryimages/README.md index a9303c6db4b..7347a1b9cfb 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimages/README.md +++ b/resource-manager/compute/2021-07-01/communitygalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/communitygalleryimages` Documentation -The `communitygalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `communitygalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/communitygalleryimages/client.go b/resource-manager/compute/2021-07-01/communitygalleryimages/client.go index 3462622883f..c1efdbe5536 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimages/client.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimages/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImagesClient struct { } func NewCommunityGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimages/id_communitygalleryimage.go b/resource-manager/compute/2021-07-01/communitygalleryimages/id_communitygalleryimage.go index b8512c0f58a..110bd599840 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimages/id_communitygalleryimage.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimages/id_communitygalleryimage.go @@ -44,7 +44,7 @@ func ParseCommunityGalleryImageID(input string) (*CommunityGalleryImageId, error } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommunityGalleryImageIDInsensitively(input string) (*CommunityGalleryI } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimages/method_get.go b/resource-manager/compute/2021-07-01/communitygalleryimages/method_get.go index bd9be720b32..f6357cfc819 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimages/method_get.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImagesClient) Get(ctx context.Context, id CommunityGalle var model CommunityGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimages/version.go b/resource-manager/compute/2021-07-01/communitygalleryimages/version.go index e52344d5a17..992548f582f 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimages/version.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimages/version.go @@ -1,12 +1,10 @@ package communitygalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimages/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimageversions/README.md b/resource-manager/compute/2021-07-01/communitygalleryimageversions/README.md index 8eb17c5daa0..c09dce63285 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimageversions/README.md +++ b/resource-manager/compute/2021-07-01/communitygalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/communitygalleryimageversions` Documentation -The `communitygalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `communitygalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/communitygalleryimageversions/client.go b/resource-manager/compute/2021-07-01/communitygalleryimageversions/client.go index 4982219d550..0bb37c078cc 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimageversions/client.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimageversions/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImageVersionsClient struct { } func NewCommunityGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimageversions/id_communitygalleryimageversion.go b/resource-manager/compute/2021-07-01/communitygalleryimageversions/id_communitygalleryimageversion.go index 87b478589ea..4ea6a549e34 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimageversions/id_communitygalleryimageversion.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimageversions/id_communitygalleryimageversion.go @@ -46,7 +46,7 @@ func ParseCommunityGalleryImageVersionID(input string) (*CommunityGalleryImageVe } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommunityGalleryImageVersionIDInsensitively(input string) (*CommunityG } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimageversions/method_get.go b/resource-manager/compute/2021-07-01/communitygalleryimageversions/method_get.go index 1598140bb6a..29454f20ca8 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimageversions/method_get.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImageVersionsClient) Get(ctx context.Context, id Communi var model CommunityGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/communitygalleryimageversions/version.go b/resource-manager/compute/2021-07-01/communitygalleryimageversions/version.go index 80849a39191..f4f7c3cf398 100644 --- a/resource-manager/compute/2021-07-01/communitygalleryimageversions/version.go +++ b/resource-manager/compute/2021-07-01/communitygalleryimageversions/version.go @@ -1,12 +1,10 @@ package communitygalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimageversions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/compute/README.md b/resource-manager/compute/2021-07-01/compute/README.md index 80d8a600ecd..2f402ccd16c 100644 --- a/resource-manager/compute/2021-07-01/compute/README.md +++ b/resource-manager/compute/2021-07-01/compute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/compute` Documentation -The `compute` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `compute` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/compute/client.go b/resource-manager/compute/2021-07-01/compute/client.go index b7b459fb6d6..08f1addc493 100644 --- a/resource-manager/compute/2021-07-01/compute/client.go +++ b/resource-manager/compute/2021-07-01/compute/client.go @@ -15,7 +15,7 @@ type ComputeClient struct { } func NewComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*ComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "compute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "compute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComputeClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/compute/id_restorepoint.go b/resource-manager/compute/2021-07-01/compute/id_restorepoint.go index 76622fbfb9b..d797df78523 100644 --- a/resource-manager/compute/2021-07-01/compute/id_restorepoint.go +++ b/resource-manager/compute/2021-07-01/compute/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/compute/method_restorepointsget.go b/resource-manager/compute/2021-07-01/compute/method_restorepointsget.go index 001a8a2240c..0dcfcc2ff49 100644 --- a/resource-manager/compute/2021-07-01/compute/method_restorepointsget.go +++ b/resource-manager/compute/2021-07-01/compute/method_restorepointsget.go @@ -45,7 +45,6 @@ func (c ComputeClient) RestorePointsGet(ctx context.Context, id RestorePointId) var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/compute/version.go b/resource-manager/compute/2021-07-01/compute/version.go index 07b9f17240f..f1533693c11 100644 --- a/resource-manager/compute/2021-07-01/compute/version.go +++ b/resource-manager/compute/2021-07-01/compute/version.go @@ -1,12 +1,10 @@ package compute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/compute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/compute/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/dedicatedhost/README.md b/resource-manager/compute/2021-07-01/dedicatedhost/README.md index 9cbaaa9a01a..532e61696e4 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhost/README.md +++ b/resource-manager/compute/2021-07-01/dedicatedhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/dedicatedhost` Documentation -The `dedicatedhost` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `dedicatedhost` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/dedicatedhost/client.go b/resource-manager/compute/2021-07-01/dedicatedhost/client.go index b440c051d61..5c78f75da1d 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhost/client.go +++ b/resource-manager/compute/2021-07-01/dedicatedhost/client.go @@ -15,7 +15,7 @@ type DedicatedHostClient struct { } func NewDedicatedHostClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/dedicatedhost/version.go b/resource-manager/compute/2021-07-01/dedicatedhost/version.go index dd4ec5b424e..4b6076b633f 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhost/version.go +++ b/resource-manager/compute/2021-07-01/dedicatedhost/version.go @@ -1,12 +1,10 @@ package dedicatedhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhost/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/README.md b/resource-manager/compute/2021-07-01/dedicatedhostgroups/README.md index 9bd59bc4528..2de9833cc95 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/README.md +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/dedicatedhostgroups` Documentation -The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `dedicatedhostgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/client.go b/resource-manager/compute/2021-07-01/dedicatedhostgroups/client.go index e3ac7c014b1..1198b817462 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/client.go +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/client.go @@ -15,7 +15,7 @@ type DedicatedHostGroupsClient struct { } func NewDedicatedHostGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_createorupdate.go b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_createorupdate.go index 7696a362908..4b26099152d 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_createorupdate.go +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id common var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_get.go b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_get.go index 7c5f6eba0af..8d31b580668 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_get.go +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostGroupsClient) Get(ctx context.Context, id commonids.Dedicat var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_update.go b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_update.go index 518f4006b01..0bb7d2873f7 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_update.go +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/method_update.go @@ -50,7 +50,6 @@ func (c DedicatedHostGroupsClient) Update(ctx context.Context, id commonids.Dedi var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/dedicatedhostgroups/version.go b/resource-manager/compute/2021-07-01/dedicatedhostgroups/version.go index 2ebc57ec547..b2d3adfe3b3 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhostgroups/version.go +++ b/resource-manager/compute/2021-07-01/dedicatedhostgroups/version.go @@ -1,12 +1,10 @@ package dedicatedhostgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhostgroups/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/dedicatedhosts/README.md b/resource-manager/compute/2021-07-01/dedicatedhosts/README.md index 442910dfdcb..07a5ae40ca0 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhosts/README.md +++ b/resource-manager/compute/2021-07-01/dedicatedhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/dedicatedhosts` Documentation -The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `dedicatedhosts` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/dedicatedhosts/client.go b/resource-manager/compute/2021-07-01/dedicatedhosts/client.go index 0b646338795..1f5bf6278f7 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhosts/client.go +++ b/resource-manager/compute/2021-07-01/dedicatedhosts/client.go @@ -15,7 +15,7 @@ type DedicatedHostsClient struct { } func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/dedicatedhosts/method_get.go b/resource-manager/compute/2021-07-01/dedicatedhosts/method_get.go index 63e85f0ce8b..ae7a03232ad 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhosts/method_get.go +++ b/resource-manager/compute/2021-07-01/dedicatedhosts/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostsClient) Get(ctx context.Context, id commonids.DedicatedHos var model DedicatedHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/dedicatedhosts/version.go b/resource-manager/compute/2021-07-01/dedicatedhosts/version.go index e8fdf138f9c..c26fcc67c70 100644 --- a/resource-manager/compute/2021-07-01/dedicatedhosts/version.go +++ b/resource-manager/compute/2021-07-01/dedicatedhosts/version.go @@ -1,12 +1,10 @@ package dedicatedhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhosts/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/galleries/README.md b/resource-manager/compute/2021-07-01/galleries/README.md index a54f9234fe5..a176e0b0a1f 100644 --- a/resource-manager/compute/2021-07-01/galleries/README.md +++ b/resource-manager/compute/2021-07-01/galleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleries` Documentation -The `galleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `galleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/galleries/client.go b/resource-manager/compute/2021-07-01/galleries/client.go index 624f4aaf60a..d9db0ae13ba 100644 --- a/resource-manager/compute/2021-07-01/galleries/client.go +++ b/resource-manager/compute/2021-07-01/galleries/client.go @@ -15,7 +15,7 @@ type GalleriesClient struct { } func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/galleries/method_get.go b/resource-manager/compute/2021-07-01/galleries/method_get.go index 4634c0b0cd2..d657cb9a05f 100644 --- a/resource-manager/compute/2021-07-01/galleries/method_get.go +++ b/resource-manager/compute/2021-07-01/galleries/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c GalleriesClient) Get(ctx context.Context, id commonids.SharedImageGaller var model Gallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/galleries/version.go b/resource-manager/compute/2021-07-01/galleries/version.go index 7142eb31796..25491e52dde 100644 --- a/resource-manager/compute/2021-07-01/galleries/version.go +++ b/resource-manager/compute/2021-07-01/galleries/version.go @@ -1,12 +1,10 @@ package galleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleries/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/galleryapplications/README.md b/resource-manager/compute/2021-07-01/galleryapplications/README.md index 5b93c2ed75a..e51b148f4ac 100644 --- a/resource-manager/compute/2021-07-01/galleryapplications/README.md +++ b/resource-manager/compute/2021-07-01/galleryapplications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleryapplications` Documentation -The `galleryapplications` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `galleryapplications` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/galleryapplications/client.go b/resource-manager/compute/2021-07-01/galleryapplications/client.go index efd5159e185..0131466680d 100644 --- a/resource-manager/compute/2021-07-01/galleryapplications/client.go +++ b/resource-manager/compute/2021-07-01/galleryapplications/client.go @@ -15,7 +15,7 @@ type GalleryApplicationsClient struct { } func NewGalleryApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/galleryapplications/id_application.go b/resource-manager/compute/2021-07-01/galleryapplications/id_application.go index 994259e991d..3a52dbe197f 100644 --- a/resource-manager/compute/2021-07-01/galleryapplications/id_application.go +++ b/resource-manager/compute/2021-07-01/galleryapplications/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryapplications/method_get.go b/resource-manager/compute/2021-07-01/galleryapplications/method_get.go index 8d1ab31cfd7..600f262b5af 100644 --- a/resource-manager/compute/2021-07-01/galleryapplications/method_get.go +++ b/resource-manager/compute/2021-07-01/galleryapplications/method_get.go @@ -45,7 +45,6 @@ func (c GalleryApplicationsClient) Get(ctx context.Context, id ApplicationId) (r var model GalleryApplication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/galleryapplications/version.go b/resource-manager/compute/2021-07-01/galleryapplications/version.go index 261a5f1878f..5d7624e0bd0 100644 --- a/resource-manager/compute/2021-07-01/galleryapplications/version.go +++ b/resource-manager/compute/2021-07-01/galleryapplications/version.go @@ -1,12 +1,10 @@ package galleryapplications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplications/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/README.md b/resource-manager/compute/2021-07-01/galleryapplicationversions/README.md index d3c0a6d3264..87f13be0e74 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/README.md +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleryapplicationversions` Documentation -The `galleryapplicationversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `galleryapplicationversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/client.go b/resource-manager/compute/2021-07-01/galleryapplicationversions/client.go index 76bda42bb01..c45f09e57f5 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/client.go +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/client.go @@ -15,7 +15,7 @@ type GalleryApplicationVersionsClient struct { } func NewGalleryApplicationVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplicationversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplicationversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/id_application.go b/resource-manager/compute/2021-07-01/galleryapplicationversions/id_application.go index ab968ddd82a..28ee6b4678d 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/id_application.go +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/id_applicationversion.go b/resource-manager/compute/2021-07-01/galleryapplicationversions/id_applicationversion.go index 2c01633613f..4021fd84f55 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/id_applicationversion.go +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/id_applicationversion.go @@ -46,7 +46,7 @@ func ParseApplicationVersionID(input string) (*ApplicationVersionId, error) { } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApplicationVersionIDInsensitively(input string) (*ApplicationVersionId } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/method_get.go b/resource-manager/compute/2021-07-01/galleryapplicationversions/method_get.go index fc382e13c39..84c637d6e22 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/method_get.go +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryApplicationVersionsClient) Get(ctx context.Context, id Applicatio var model GalleryApplicationVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/galleryapplicationversions/version.go b/resource-manager/compute/2021-07-01/galleryapplicationversions/version.go index 76c531c81b0..fe7db44ffd4 100644 --- a/resource-manager/compute/2021-07-01/galleryapplicationversions/version.go +++ b/resource-manager/compute/2021-07-01/galleryapplicationversions/version.go @@ -1,12 +1,10 @@ package galleryapplicationversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplicationversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplicationversions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/galleryimages/README.md b/resource-manager/compute/2021-07-01/galleryimages/README.md index c899322a631..00d6d8b045c 100644 --- a/resource-manager/compute/2021-07-01/galleryimages/README.md +++ b/resource-manager/compute/2021-07-01/galleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleryimages` Documentation -The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `galleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/galleryimages/client.go b/resource-manager/compute/2021-07-01/galleryimages/client.go index 59b9c848dbd..cebddc1c307 100644 --- a/resource-manager/compute/2021-07-01/galleryimages/client.go +++ b/resource-manager/compute/2021-07-01/galleryimages/client.go @@ -15,7 +15,7 @@ type GalleryImagesClient struct { } func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/galleryimages/id_galleryimage.go b/resource-manager/compute/2021-07-01/galleryimages/id_galleryimage.go index 951c083ad3b..b6424b69480 100644 --- a/resource-manager/compute/2021-07-01/galleryimages/id_galleryimage.go +++ b/resource-manager/compute/2021-07-01/galleryimages/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryimages/method_get.go b/resource-manager/compute/2021-07-01/galleryimages/method_get.go index 5c642368aac..730b820ae30 100644 --- a/resource-manager/compute/2021-07-01/galleryimages/method_get.go +++ b/resource-manager/compute/2021-07-01/galleryimages/method_get.go @@ -45,7 +45,6 @@ func (c GalleryImagesClient) Get(ctx context.Context, id GalleryImageId) (result var model GalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/galleryimages/version.go b/resource-manager/compute/2021-07-01/galleryimages/version.go index 8571749b16c..6ad33dfe6f2 100644 --- a/resource-manager/compute/2021-07-01/galleryimages/version.go +++ b/resource-manager/compute/2021-07-01/galleryimages/version.go @@ -1,12 +1,10 @@ package galleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimages/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/README.md b/resource-manager/compute/2021-07-01/galleryimageversions/README.md index f1fbbbdfd4b..44b799b11d6 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/README.md +++ b/resource-manager/compute/2021-07-01/galleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleryimageversions` Documentation -The `galleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `galleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/client.go b/resource-manager/compute/2021-07-01/galleryimageversions/client.go index c8bf5a50ca7..6bf3f9b0ebb 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/client.go +++ b/resource-manager/compute/2021-07-01/galleryimageversions/client.go @@ -15,7 +15,7 @@ type GalleryImageVersionsClient struct { } func NewGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/id_galleryimage.go b/resource-manager/compute/2021-07-01/galleryimageversions/id_galleryimage.go index 282c39e643a..193631afe15 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/id_galleryimage.go +++ b/resource-manager/compute/2021-07-01/galleryimageversions/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/id_imageversion.go b/resource-manager/compute/2021-07-01/galleryimageversions/id_imageversion.go index 7f98ea65bd2..e59d4737939 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/id_imageversion.go +++ b/resource-manager/compute/2021-07-01/galleryimageversions/id_imageversion.go @@ -46,7 +46,7 @@ func ParseImageVersionID(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageVersionIDInsensitively(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/method_get.go b/resource-manager/compute/2021-07-01/galleryimageversions/method_get.go index 9638bdc304d..a018545b29f 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/method_get.go +++ b/resource-manager/compute/2021-07-01/galleryimageversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryImageVersionsClient) Get(ctx context.Context, id ImageVersionId, var model GalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/galleryimageversions/version.go b/resource-manager/compute/2021-07-01/galleryimageversions/version.go index b54ac658e61..8570b419fd3 100644 --- a/resource-manager/compute/2021-07-01/galleryimageversions/version.go +++ b/resource-manager/compute/2021-07-01/galleryimageversions/version.go @@ -1,12 +1,10 @@ package galleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimageversions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/gallerysharingupdate/README.md b/resource-manager/compute/2021-07-01/gallerysharingupdate/README.md index 3ebce788043..b7b2c31fe42 100644 --- a/resource-manager/compute/2021-07-01/gallerysharingupdate/README.md +++ b/resource-manager/compute/2021-07-01/gallerysharingupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/gallerysharingupdate` Documentation -The `gallerysharingupdate` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `gallerysharingupdate` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/gallerysharingupdate/client.go b/resource-manager/compute/2021-07-01/gallerysharingupdate/client.go index 1fd6513f838..b293b189a85 100644 --- a/resource-manager/compute/2021-07-01/gallerysharingupdate/client.go +++ b/resource-manager/compute/2021-07-01/gallerysharingupdate/client.go @@ -15,7 +15,7 @@ type GallerySharingUpdateClient struct { } func NewGallerySharingUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*GallerySharingUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gallerysharingupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gallerysharingupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GallerySharingUpdateClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/gallerysharingupdate/version.go b/resource-manager/compute/2021-07-01/gallerysharingupdate/version.go index d071fc862f4..66ef537d0b4 100644 --- a/resource-manager/compute/2021-07-01/gallerysharingupdate/version.go +++ b/resource-manager/compute/2021-07-01/gallerysharingupdate/version.go @@ -1,12 +1,10 @@ package gallerysharingupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gallerysharingupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gallerysharingupdate/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/images/README.md b/resource-manager/compute/2021-07-01/images/README.md index 5c5d668ca60..126efcccb6f 100644 --- a/resource-manager/compute/2021-07-01/images/README.md +++ b/resource-manager/compute/2021-07-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `images` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/images/client.go b/resource-manager/compute/2021-07-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/compute/2021-07-01/images/client.go +++ b/resource-manager/compute/2021-07-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/images/id_image.go b/resource-manager/compute/2021-07-01/images/id_image.go index 8f3964a77c7..c258a9aca61 100644 --- a/resource-manager/compute/2021-07-01/images/id_image.go +++ b/resource-manager/compute/2021-07-01/images/id_image.go @@ -42,7 +42,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/images/method_get.go b/resource-manager/compute/2021-07-01/images/method_get.go index 73320770a28..e68f9e933bb 100644 --- a/resource-manager/compute/2021-07-01/images/method_get.go +++ b/resource-manager/compute/2021-07-01/images/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId, options GetOperationO var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/images/version.go b/resource-manager/compute/2021-07-01/images/version.go index cd43cbe0930..d4d6556afb6 100644 --- a/resource-manager/compute/2021-07-01/images/version.go +++ b/resource-manager/compute/2021-07-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/loganalytics/README.md b/resource-manager/compute/2021-07-01/loganalytics/README.md index 119df07f058..3a67c13b7f8 100644 --- a/resource-manager/compute/2021-07-01/loganalytics/README.md +++ b/resource-manager/compute/2021-07-01/loganalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/loganalytics` Documentation -The `loganalytics` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `loganalytics` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/loganalytics/client.go b/resource-manager/compute/2021-07-01/loganalytics/client.go index 5053f2ddae1..b32a74cf728 100644 --- a/resource-manager/compute/2021-07-01/loganalytics/client.go +++ b/resource-manager/compute/2021-07-01/loganalytics/client.go @@ -15,7 +15,7 @@ type LogAnalyticsClient struct { } func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loganalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/loganalytics/id_location.go b/resource-manager/compute/2021-07-01/loganalytics/id_location.go index 63d3f560403..cf24cee10e3 100644 --- a/resource-manager/compute/2021-07-01/loganalytics/id_location.go +++ b/resource-manager/compute/2021-07-01/loganalytics/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/loganalytics/version.go b/resource-manager/compute/2021-07-01/loganalytics/version.go index 789246e7e67..cc02c0683df 100644 --- a/resource-manager/compute/2021-07-01/loganalytics/version.go +++ b/resource-manager/compute/2021-07-01/loganalytics/version.go @@ -1,12 +1,10 @@ package loganalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loganalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loganalytics/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/README.md b/resource-manager/compute/2021-07-01/proximityplacementgroups/README.md index 226791cc1e3..5197541a1d1 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/README.md +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/proximityplacementgroups` Documentation -The `proximityplacementgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `proximityplacementgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/client.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/client.go index 2b737bf0f86..1a6cf3adbc3 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/client.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/client.go @@ -15,7 +15,7 @@ type ProximityPlacementGroupsClient struct { } func NewProximityPlacementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProximityPlacementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proximityplacementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proximityplacementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProximityPlacementGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/id_proximityplacementgroup.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/id_proximityplacementgroup.go index 0c0c7a01d30..0ba2b2d5fa9 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -42,7 +42,7 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_createorupdate.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_createorupdate.go index ec5dbe0e33f..b52985d0f6c 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_createorupdate.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, id P var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_get.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_get.go index 3e2a44fe371..9319acd4f9b 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_get.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProximityPlacementGroupsClient) Get(ctx context.Context, id ProximityPla var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_update.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_update.go index 2e1e1e45fc6..dd8d1e3003a 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/method_update.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/method_update.go @@ -49,7 +49,6 @@ func (c ProximityPlacementGroupsClient) Update(ctx context.Context, id Proximity var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/proximityplacementgroups/version.go b/resource-manager/compute/2021-07-01/proximityplacementgroups/version.go index 8a2c5f76d2f..a2e059b59cd 100644 --- a/resource-manager/compute/2021-07-01/proximityplacementgroups/version.go +++ b/resource-manager/compute/2021-07-01/proximityplacementgroups/version.go @@ -1,12 +1,10 @@ package proximityplacementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proximityplacementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proximityplacementgroups/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/README.md b/resource-manager/compute/2021-07-01/restorepointcollections/README.md index 4448ce74829..e5188675370 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/README.md +++ b/resource-manager/compute/2021-07-01/restorepointcollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/restorepointcollections` Documentation -The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `restorepointcollections` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/client.go b/resource-manager/compute/2021-07-01/restorepointcollections/client.go index 816bae4a346..543d327725d 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/client.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/client.go @@ -15,7 +15,7 @@ type RestorePointCollectionsClient struct { } func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepointcollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/id_restorepointcollection.go b/resource-manager/compute/2021-07-01/restorepointcollections/id_restorepointcollection.go index 5ae5a219829..f10116745d8 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/id_restorepointcollection.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/id_restorepointcollection.go @@ -42,7 +42,7 @@ func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, err } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointColl } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/method_createorupdate.go b/resource-manager/compute/2021-07-01/restorepointcollections/method_createorupdate.go index 6837427e5be..7e9dac346e3 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/method_createorupdate.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id Re var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/method_get.go b/resource-manager/compute/2021-07-01/restorepointcollections/method_get.go index 875f286c7fa..636041d46c6 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/method_get.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointC var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/method_update.go b/resource-manager/compute/2021-07-01/restorepointcollections/method_update.go index 209e763e72d..3aa41ed97ea 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/method_update.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/method_update.go @@ -49,7 +49,6 @@ func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePoi var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/restorepointcollections/version.go b/resource-manager/compute/2021-07-01/restorepointcollections/version.go index 2c28a3188b9..7950480409a 100644 --- a/resource-manager/compute/2021-07-01/restorepointcollections/version.go +++ b/resource-manager/compute/2021-07-01/restorepointcollections/version.go @@ -1,12 +1,10 @@ package restorepointcollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepointcollections/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/README.md b/resource-manager/compute/2021-07-01/sharedgalleries/README.md index 040a66d6416..c447a96468d 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/README.md +++ b/resource-manager/compute/2021-07-01/sharedgalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/sharedgalleries` Documentation -The `sharedgalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `sharedgalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/client.go b/resource-manager/compute/2021-07-01/sharedgalleries/client.go index d1ed6f27a92..d7365eacb97 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/client.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/client.go @@ -15,7 +15,7 @@ type SharedGalleriesClient struct { } func NewSharedGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/id_location.go b/resource-manager/compute/2021-07-01/sharedgalleries/id_location.go index ec03a95113f..d70722b4cd4 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/id_location.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/id_sharedgallery.go b/resource-manager/compute/2021-07-01/sharedgalleries/id_sharedgallery.go index 5dc28ef7840..98fe32a25f9 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/id_sharedgallery.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/method_get.go b/resource-manager/compute/2021-07-01/sharedgalleries/method_get.go index 155f6d68dce..571cb1bd810 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/method_get.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleriesClient) Get(ctx context.Context, id SharedGalleryId) (res var model PirSharedGalleryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/method_list.go b/resource-manager/compute/2021-07-01/sharedgalleries/method_list.go index e3949cf2c22..6483790ccc5 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/method_list.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/sharedgalleries/version.go b/resource-manager/compute/2021-07-01/sharedgalleries/version.go index bea0490f698..fc105142631 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleries/version.go +++ b/resource-manager/compute/2021-07-01/sharedgalleries/version.go @@ -1,12 +1,10 @@ package sharedgalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleries/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/README.md b/resource-manager/compute/2021-07-01/sharedgalleryimages/README.md index f6f61fda988..25e42ab3a32 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/README.md +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/sharedgalleryimages` Documentation -The `sharedgalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `sharedgalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/client.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/client.go index 2067896d391..4109d4b43bb 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/client.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/client.go @@ -15,7 +15,7 @@ type SharedGalleryImagesClient struct { } func NewSharedGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/id_image.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/id_image.go index aeabc8a0b34..bf1452d0f8e 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/id_image.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/id_sharedgallery.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/id_sharedgallery.go index d38b664da6f..31bbee97389 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/id_sharedgallery.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/method_get.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/method_get.go index b98cfcde3a2..4b49bfa2a28 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/method_get.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImagesClient) Get(ctx context.Context, id ImageId) (result var model SharedGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/method_list.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/method_list.go index 2ea5dd5b351..b0e073854fb 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/method_list.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimages/version.go b/resource-manager/compute/2021-07-01/sharedgalleryimages/version.go index 8a9eb09e2df..ffe82a04987 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimages/version.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimages/version.go @@ -1,12 +1,10 @@ package sharedgalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimages/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/README.md b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/README.md index 28321466d88..8066ffe02ea 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/README.md +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/sharedgalleryimageversions` Documentation -The `sharedgalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `sharedgalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/client.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/client.go index bdc07e226c2..1537177d507 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/client.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/client.go @@ -15,7 +15,7 @@ type SharedGalleryImageVersionsClient struct { } func NewSharedGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_image.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_image.go index df91e878767..9e6d21126c4 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_image.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_version.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_version.go index 5c70f0b25f0..b446f65e116 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_version.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_get.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_get.go index 7c2d2e13d40..db662df97bd 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_get.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImageVersionsClient) Get(ctx context.Context, id VersionId) var model SharedGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_list.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_list.go index 71525072c3d..157a30105ad 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_list.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/version.go b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/version.go index e7cd78bfdce..e47cfde335e 100644 --- a/resource-manager/compute/2021-07-01/sharedgalleryimageversions/version.go +++ b/resource-manager/compute/2021-07-01/sharedgalleryimageversions/version.go @@ -1,12 +1,10 @@ package sharedgalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimageversions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/skus/README.md b/resource-manager/compute/2021-07-01/skus/README.md index 1828e0ca136..49861a11e23 100644 --- a/resource-manager/compute/2021-07-01/skus/README.md +++ b/resource-manager/compute/2021-07-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/skus/client.go b/resource-manager/compute/2021-07-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/compute/2021-07-01/skus/client.go +++ b/resource-manager/compute/2021-07-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/skus/method_resourceskuslist.go b/resource-manager/compute/2021-07-01/skus/method_resourceskuslist.go index 6ffa0d54543..ce1916af0bc 100644 --- a/resource-manager/compute/2021-07-01/skus/method_resourceskuslist.go +++ b/resource-manager/compute/2021-07-01/skus/method_resourceskuslist.go @@ -41,6 +41,7 @@ func (o ResourceSkusListOperationOptions) ToHeaders() *client.Headers { func (o ResourceSkusListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/skus/version.go b/resource-manager/compute/2021-07-01/skus/version.go index d524fc47acc..0e9cdccf25c 100644 --- a/resource-manager/compute/2021-07-01/skus/version.go +++ b/resource-manager/compute/2021-07-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/README.md b/resource-manager/compute/2021-07-01/sshpublickeys/README.md index bd53944c960..be95f39628d 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/README.md +++ b/resource-manager/compute/2021-07-01/sshpublickeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/sshpublickeys` Documentation -The `sshpublickeys` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `sshpublickeys` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/client.go b/resource-manager/compute/2021-07-01/sshpublickeys/client.go index 60a955db2ea..b1945fe3975 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/client.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/client.go @@ -15,7 +15,7 @@ type SshPublicKeysClient struct { } func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sshpublickeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sshpublickeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SshPublicKeysClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/id_sshpublickey.go b/resource-manager/compute/2021-07-01/sshpublickeys/id_sshpublickey.go index 013618b26f3..4f003a63452 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/id_sshpublickey.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/id_sshpublickey.go @@ -42,7 +42,7 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/method_create.go b/resource-manager/compute/2021-07-01/sshpublickeys/method_create.go index 391f084ac1d..d348c2924e1 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/method_create.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/method_create.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/method_generatekeypair.go b/resource-manager/compute/2021-07-01/sshpublickeys/method_generatekeypair.go index 0793e94f13b..cf52f7b6fae 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/method_generatekeypair.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/method_generatekeypair.go @@ -46,7 +46,6 @@ func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKe var model SshPublicKeyGenerateKeyPairResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/method_get.go b/resource-manager/compute/2021-07-01/sshpublickeys/method_get.go index 3420ec987c9..dc1c3cbdb02 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/method_get.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/method_get.go @@ -45,7 +45,6 @@ func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/method_update.go b/resource-manager/compute/2021-07-01/sshpublickeys/method_update.go index d697813a6ed..da0970a3389 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/method_update.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/method_update.go @@ -49,7 +49,6 @@ func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/sshpublickeys/version.go b/resource-manager/compute/2021-07-01/sshpublickeys/version.go index 6a8cb39ed92..1e90262dcfc 100644 --- a/resource-manager/compute/2021-07-01/sshpublickeys/version.go +++ b/resource-manager/compute/2021-07-01/sshpublickeys/version.go @@ -1,12 +1,10 @@ package sshpublickeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sshpublickeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sshpublickeys/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/README.md b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/README.md index 6b3ed060a75..67cc6975019 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachineextensionimages` Documentation -The `virtualmachineextensionimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachineextensionimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/client.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/client.go index baa2d351929..4385ff41033 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionImagesClient struct { } func NewVirtualMachineExtensionImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_publisher.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_publisher.go index bb19fd74520..88f97b7a6eb 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_publisher.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_type.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_type.go index 9cf3c59da23..bf518ba8702 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_type.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_type.go @@ -44,7 +44,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_version.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_version.go index a0e8803b4a0..1ee10989db9 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_version.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_get.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_get.go index b8722c5e7f4..728c7b2ba56 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineExtensionImagesClient) Get(ctx context.Context, id Version var model VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listtypes.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listtypes.go index 706c54f8ec4..b9f09407bc0 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listtypes.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listtypes.go @@ -46,7 +46,6 @@ func (c VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, id P var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listversions.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listversions.go index ad463b163fd..2cedae68952 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listversions.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/method_listversions.go @@ -36,6 +36,7 @@ func (o ListVersionsOperationOptions) ToHeaders() *client.Headers { func (o ListVersionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, i var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/version.go b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/version.go index d754ecc62e8..d05ef156905 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensionimages/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensionimages/version.go @@ -1,12 +1,10 @@ package virtualmachineextensionimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensionimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensionimages/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/README.md b/resource-manager/compute/2021-07-01/virtualmachineextensions/README.md index 2c235446c4c..c68803d8465 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachineextensions` Documentation -The `virtualmachineextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachineextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/client.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/client.go index 4adf20a248c..c049fb742ed 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionsClient struct { } func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/id_extension.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/id_extension.go index b9ae480741d..19a447ebbbe 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/id_extension.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/id_virtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/id_virtualmachine.go index 50052e6b019..34532cbd2a4 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/id_virtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/method_get.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/method_get.go index 767c337cafb..081bdecb6ff 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) Get(ctx context.Context, id ExtensionId, var model VirtualMachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/method_list.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/method_list.go index b5541f85116..b495c3fa1d5 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) List(ctx context.Context, id VirtualMach var model VirtualMachineExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineextensions/version.go b/resource-manager/compute/2021-07-01/virtualmachineextensions/version.go index be2966df686..3331bbdd8ee 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineextensions/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachineextensions/version.go @@ -1,12 +1,10 @@ package virtualmachineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/README.md b/resource-manager/compute/2021-07-01/virtualmachineimages/README.md index 6746aae67e6..931bc8487ac 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachineimages` Documentation -The `virtualmachineimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachineimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/client.go b/resource-manager/compute/2021-07-01/virtualmachineimages/client.go index 3d9912359f8..05c5fd93d49 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineImagesClient struct { } func NewVirtualMachineImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineImagesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezone.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezone.go index 689e0be7e56..770692e1f01 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezone.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezone.go @@ -42,7 +42,7 @@ func ParseEdgeZoneID(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEdgeZoneIDInsensitively(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezonepublisher.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezonepublisher.go index 3838d08d8b8..ef3334834d7 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezonepublisher.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_edgezonepublisher.go @@ -44,7 +44,7 @@ func ParseEdgeZonePublisherID(input string) (*EdgeZonePublisherId, error) { } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeZonePublisherIDInsensitively(input string) (*EdgeZonePublisherId, } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_location.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_location.go index 21b22ae9152..aa0bd6f123c 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_location.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offer.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offer.go index 40367d1e7b5..821104312e6 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offer.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offer.go @@ -44,7 +44,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offersku.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offersku.go index 91e4a168703..08bca98cb86 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offersku.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offersku.go @@ -48,7 +48,7 @@ func ParseOfferSkuID(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOfferSkuIDInsensitively(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offerskuversion.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offerskuversion.go index dae6d7f61be..4b04850b2ae 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_offerskuversion.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_offerskuversion.go @@ -50,7 +50,7 @@ func ParseOfferSkuVersionID(input string) (*OfferSkuVersionId, error) { } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseOfferSkuVersionIDInsensitively(input string) (*OfferSkuVersionId, erro } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_publisher.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_publisher.go index 509220be144..785d3f177f0 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_publisher.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_sku.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_sku.go index 935057743f6..34fde30278a 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_sku.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_sku.go @@ -46,7 +46,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_skuversion.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_skuversion.go index 2e5d0e9a79c..0172c3e1a70 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_skuversion.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_skuversion.go @@ -48,7 +48,7 @@ func ParseSkuVersionID(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuVersionIDInsensitively(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/id_vmimageoffer.go b/resource-manager/compute/2021-07-01/virtualmachineimages/id_vmimageoffer.go index 22411c949d8..99ef25c09c5 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/id_vmimageoffer.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/id_vmimageoffer.go @@ -46,7 +46,7 @@ func ParseVMImageOfferID(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVMImageOfferIDInsensitively(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezoneget.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezoneget.go index d08e473ae5f..aae2bc8618d 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezoneget.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezoneget.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) EdgeZoneGet(ctx context.Context, id OfferSku var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelist.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelist.go index ba17ca15382..70e0120daa1 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelist.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelist.go @@ -36,6 +36,7 @@ func (o EdgeZoneListOperationOptions) ToHeaders() *client.Headers { func (o EdgeZoneListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) EdgeZoneList(ctx context.Context, id OfferSk var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistoffers.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistoffers.go index af3bb42c4ba..26cde80c448 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistoffers.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListOffers(ctx context.Context, id E var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistpublishers.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistpublishers.go index 9aadf470f3b..2ed9f07750a 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistpublishers.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListPublishers(ctx context.Context, var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistskus.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistskus.go index 42a5ccfc0ae..62b0005efdd 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistskus.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_edgezonelistskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListSkus(ctx context.Context, id VMI var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_get.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_get.go index 3be37d5f899..d9357bbb7dc 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) Get(ctx context.Context, id SkuVersionId) (r var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_list.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_list.go index 2989d0c443a..2d6df70703d 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) List(ctx context.Context, id SkuId, options var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listoffers.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listoffers.go index edba237d0ec..b44d982eaaf 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listoffers.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListOffers(ctx context.Context, id Publisher var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listpublishers.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listpublishers.go index 0ff57ba69ee..0251298dfe5 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listpublishers.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListPublishers(ctx context.Context, id Locat var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listskus.go b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listskus.go index 2613d661514..1a3ee479650 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/method_listskus.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/method_listskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListSkus(ctx context.Context, id OfferId) (r var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineimages/version.go b/resource-manager/compute/2021-07-01/virtualmachineimages/version.go index 1946c0b709b..8ac6c2bec69 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineimages/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachineimages/version.go @@ -1,12 +1,10 @@ package virtualmachineimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineimages/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/README.md b/resource-manager/compute/2021-07-01/virtualmachineruncommands/README.md index e089180342d..a54e26ecf47 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachineruncommands` Documentation -The `virtualmachineruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachineruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/client.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/client.go index ee453cd014c..48e134abb29 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineRunCommandsClient struct { } func NewVirtualMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_location.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_location.go index dfd7f350471..e553ed3913e 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_location.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_runcommand.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_runcommand.go index e2bd6f0a575..61f472d53e2 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_runcommand.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_runcommand.go @@ -42,7 +42,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachine.go index 8d098c85c3b..df64bb47d41 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go index 1c90363b725..8b3914c8d71 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go @@ -44,7 +44,7 @@ func ParseVirtualMachineRunCommandID(input string) (*VirtualMachineRunCommandId, } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachine } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_get.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_get.go index 83355bdb92b..465ea8330ad 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineRunCommandsClient) Get(ctx context.Context, id RunCommandI var model RunCommandDocument result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go index c06971e26be..f603e128c0c 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go @@ -34,6 +34,7 @@ func (o GetByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o GetByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go index d3cf5c6296b..739e09cd17f 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go @@ -39,6 +39,7 @@ func (o ListByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachineruncommands/version.go b/resource-manager/compute/2021-07-01/virtualmachineruncommands/version.go index 2610ff87e8c..21635b85b6e 100644 --- a/resource-manager/compute/2021-07-01/virtualmachineruncommands/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachineruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineruncommands/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/README.md b/resource-manager/compute/2021-07-01/virtualmachines/README.md index 10fa217fa87..62d74c52895 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachines/client.go b/resource-manager/compute/2021-07-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/id_location.go b/resource-manager/compute/2021-07-01/virtualmachines/id_location.go index 59cc8439152..4a5c1e51c52 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/id_location.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/id_virtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachines/id_virtualmachine.go index 0a676811b3a..9f10e69b236 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_deallocate.go b/resource-manager/compute/2021-07-01/virtualmachines/method_deallocate.go index ae7ee7a0d2b..c962480de36 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_deallocate.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_delete.go b/resource-manager/compute/2021-07-01/virtualmachines/method_delete.go index 7809910a33a..e2d145391fa 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_delete.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_get.go b/resource-manager/compute/2021-07-01/virtualmachines/method_get.go index ca0e72e7b04..610b8728f94 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_instanceview.go b/resource-manager/compute/2021-07-01/virtualmachines/method_instanceview.go index 629b0f65267..735f254f665 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_instanceview.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_instanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) InstanceView(ctx context.Context, id VirtualMachi var model VirtualMachineInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_listall.go b/resource-manager/compute/2021-07-01/virtualmachines/method_listall.go index c78a483d777..a2dfa697547 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_listall.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_listall.go @@ -40,6 +40,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_listavailablesizes.go b/resource-manager/compute/2021-07-01/virtualmachines/method_listavailablesizes.go index ade9d529c86..f4ad290ed8b 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_listavailablesizes.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_listavailablesizes.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListAvailableSizes(ctx context.Context, id Virtua var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_poweroff.go b/resource-manager/compute/2021-07-01/virtualmachines/method_poweroff.go index cd9da953583..f5c1b75d289 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_poweroff.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2021-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go index ef782af5c0a..cf8035af464 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachines/version.go b/resource-manager/compute/2021-07-01/virtualmachines/version.go index de981513384..d21178aa12f 100644 --- a/resource-manager/compute/2021-07-01/virtualmachines/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/README.md index fdbd7934721..5dcebf14acc 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions` Documentation -The `virtualmachinescalesetextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesetextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/client.go index 9555c0add8c..8b2f0aa3f61 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetExtensionsClient struct { } func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go index e52fb99c34f..221bbe81a25 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go index eaeca4e6677..c08756824e1 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetExtensionID(input string) (*VirtualMachineScaleS } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetExtensionIDInsensitively(input string) (*Virtual } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/method_get.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/method_get.go index 805e9846e65..58bd9a83728 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, id Virt var model VirtualMachineScaleSetExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/version.go index 0306a730842..45ad53e27ec 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetextensions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/README.md index b8ee834cef3..2e9bee36daa 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades` Documentation -The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/client.go index fb39e655c93..2bc32c3839f 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { } func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetRollingUpgradesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go index 73ab65cf8ad..c778cdb85f7 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go index e9dda93541e..647dbb00e17 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Conte var model RollingUpgradeStatusInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/version.go index 91be689db44..6a5c8f71e0f 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetrollingupgrades/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetrollingupgrades -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesets/README.md index e7746e2a6a9..a39a6e93d0c 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesets` Documentation -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/client.go index a08ba8c1d81..0548a7aec67 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetsClient struct { } func NewVirtualMachineScaleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_location.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_location.go index a674916111d..65c5f49041d 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_location.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go index d4542bba1b5..76fb35088a6 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_delete.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_delete.go index 154aacdb1ce..40c53c88532 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_delete.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_deleteinstances.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_deleteinstances.go index 375063255ba..ae1057f79fa 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_deleteinstances.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_deleteinstances.go @@ -36,6 +36,7 @@ func (o DeleteInstancesOperationOptions) ToHeaders() *client.Headers { func (o DeleteInstancesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go index 4236aa8a241..753609754c6 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go @@ -34,6 +34,7 @@ func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToHe func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateD var model RecoveryWalkResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_get.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_get.go index 1a1c806d33a..4ade8c757e1 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineScaleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_getinstanceview.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_getinstanceview.go index b79b350b676..4e409bb9b3b 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_getinstanceview.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, id V var model VirtualMachineScaleSetInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_poweroff.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_poweroff.go index 3b0e524f55b..0b805fc3b55 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_poweroff.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesets/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesets/version.go index 0877bcff4a6..077a1585c82 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesets/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesets/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesets/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/README.md index 20225269953..af828449539 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions` Documentation -The `virtualmachinescalesetvmextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesetvmextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/client.go index ee3be0e3e80..384674618ef 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { } func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go index 5bed9de5aa5..031846e1de7 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go @@ -46,7 +46,7 @@ func ParseVirtualMachineExtensionID(input string) (*VirtualMachineExtensionId, e } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineExtensionIDInsensitively(input string) (*VirtualMachineE } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go index 00ba634a6da..461b5781ea3 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_get.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_get.go index 734208e2c2b..03923b1ef4d 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, id Vi var model VirtualMachineScaleSetVMExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_list.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_list.go index d9cdfbdcc60..300d802904c 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, id V var model VirtualMachineScaleSetVMExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/version.go index 74e72f6a90b..5068402845c 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/README.md index 28e84e9e0c0..d7ddcab91ec 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands` Documentation -The `virtualmachinescalesetvmruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesetvmruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/client.go index 65dba565153..fb8224b7dda 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { } func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go index 4342ff0b57d..48139ac644b 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go index e229cb64fb0..98f6dff8b2b 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*Virtu } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input st } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_get.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_get.go index 35fe308862d..7504f816267 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, id V var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_list.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_list.go index d335e2247cf..14ad4b942ca 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/version.go index 2707c48c379..2faf81124f8 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvmruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/README.md b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/README.md index 367a196ceb8..f64e49627de 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinescalesetvms` Documentation -The `virtualmachinescalesetvms` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinescalesetvms` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/client.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/client.go index d86b351fd86..61a216f26bf 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMsClient struct { } func NewVirtualMachineScaleSetVMsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMsClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go index 83349156568..50f34af693e 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go index 5e77406f79c..fa37f879ec7 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_delete.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_delete.go index 70ab6260f49..2c4fdb5bb39 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_delete.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_get.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_get.go index 54f1a9f63ea..48056f0eab3 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_get.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) Get(ctx context.Context, id VirtualMach var model VirtualMachineScaleSetVM result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_getinstanceview.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_getinstanceview.go index 67764259f28..d2e27a1295d 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_getinstanceview.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, id var model VirtualMachineScaleSetVMInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_list.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_list.go index 25828909629..bb09ed5d71a 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_poweroff.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_poweroff.go index 1b450b80bfa..cbe987a9165 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_poweroff.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go index 29eb32435dd..a93248b3042 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/version.go b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/version.go index 80ba0ed1773..7496de62d25 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinescalesetvms/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvms/2021-07-01" } diff --git a/resource-manager/compute/2021-07-01/virtualmachinesizes/README.md b/resource-manager/compute/2021-07-01/virtualmachinesizes/README.md index 3c33ce55a4f..2ca3f17da82 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinesizes/README.md +++ b/resource-manager/compute/2021-07-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2021-07-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2021-07-01/virtualmachinesizes/client.go b/resource-manager/compute/2021-07-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinesizes/client.go +++ b/resource-manager/compute/2021-07-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/compute/2021-07-01/virtualmachinesizes/id_location.go b/resource-manager/compute/2021-07-01/virtualmachinesizes/id_location.go index 9cb3012f4e4..b5a6dbf59ef 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinesizes/id_location.go +++ b/resource-manager/compute/2021-07-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2021-07-01/virtualmachinesizes/method_list.go b/resource-manager/compute/2021-07-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinesizes/method_list.go +++ b/resource-manager/compute/2021-07-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2021-07-01/virtualmachinesizes/version.go b/resource-manager/compute/2021-07-01/virtualmachinesizes/version.go index f062ce9e4b6..76d96cde60a 100644 --- a/resource-manager/compute/2021-07-01/virtualmachinesizes/version.go +++ b/resource-manager/compute/2021-07-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2021-07-01" } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/README.md b/resource-manager/compute/2022-03-01/availabilitysets/README.md index 41c442d8705..db2a0e3bf36 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/README.md +++ b/resource-manager/compute/2022-03-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/availabilitysets/client.go b/resource-manager/compute/2022-03-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/client.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/method_createorupdate.go b/resource-manager/compute/2022-03-01/availabilitysets/method_createorupdate.go index 886d801ae4a..0fd3b44fe2c 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/method_createorupdate.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, id commonids var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/method_get.go b/resource-manager/compute/2022-03-01/availabilitysets/method_get.go index 3c2eb94bfb2..5331c2457d7 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/method_get.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/method_get.go @@ -46,7 +46,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id commonids.Availabili var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/method_listavailablesizes.go b/resource-manager/compute/2022-03-01/availabilitysets/method_listavailablesizes.go index 2e2e96fa619..d47e9dec5a7 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/method_listavailablesizes.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, id commo var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/method_listbysubscription.go b/resource-manager/compute/2022-03-01/availabilitysets/method_listbysubscription.go index 6de26336e6c..44f1ba6844b 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/method_listbysubscription.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/method_update.go b/resource-manager/compute/2022-03-01/availabilitysets/method_update.go index 3784e4c8604..8eb2093ecd2 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/method_update.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/method_update.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) Update(ctx context.Context, id commonids.Availab var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/availabilitysets/version.go b/resource-manager/compute/2022-03-01/availabilitysets/version.go index 94eebc11fe0..3563cb28adf 100644 --- a/resource-manager/compute/2022-03-01/availabilitysets/version.go +++ b/resource-manager/compute/2022-03-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/capacityreservation/README.md b/resource-manager/compute/2022-03-01/capacityreservation/README.md index 139cd49d20c..c1c0766e3a1 100644 --- a/resource-manager/compute/2022-03-01/capacityreservation/README.md +++ b/resource-manager/compute/2022-03-01/capacityreservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservation` Documentation -The `capacityreservation` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `capacityreservation` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/capacityreservation/client.go b/resource-manager/compute/2022-03-01/capacityreservation/client.go index 63b03839e60..8387846bbe8 100644 --- a/resource-manager/compute/2022-03-01/capacityreservation/client.go +++ b/resource-manager/compute/2022-03-01/capacityreservation/client.go @@ -15,7 +15,7 @@ type CapacityReservationClient struct { } func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/capacityreservation/id_capacityreservationgroup.go b/resource-manager/compute/2022-03-01/capacityreservation/id_capacityreservationgroup.go index 8493ff8f67f..8be7e83d119 100644 --- a/resource-manager/compute/2022-03-01/capacityreservation/id_capacityreservationgroup.go +++ b/resource-manager/compute/2022-03-01/capacityreservation/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/capacityreservation/version.go b/resource-manager/compute/2022-03-01/capacityreservation/version.go index 3d7c959cda7..313ee8b9451 100644 --- a/resource-manager/compute/2022-03-01/capacityreservation/version.go +++ b/resource-manager/compute/2022-03-01/capacityreservation/version.go @@ -1,12 +1,10 @@ package capacityreservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservation/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/README.md b/resource-manager/compute/2022-03-01/capacityreservationgroups/README.md index c5c1d5594e4..ac15b58b2f2 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/README.md +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservationgroups` Documentation -The `capacityreservationgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `capacityreservationgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/client.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/client.go index 15ced399cbc..088a08cf103 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/client.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/client.go @@ -15,7 +15,7 @@ type CapacityReservationGroupsClient struct { } func NewCapacityReservationGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservationgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservationgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go index 92a9a9e1ae1..eee67dd9eed 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_createorupdate.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_createorupdate.go index 35050e649c5..b2779f3d9df 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_createorupdate.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, id var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_get.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_get.go index 3aa39e689af..40ec743fa1e 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_get.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationGroupsClient) Get(ctx context.Context, id CapacityRes var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbyresourcegroup.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbyresourcegroup.go index e3708c6a167..471bfa93e53 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbyresourcegroup.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbysubscription.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbysubscription.go index 810c49f03b4..5a37a32d4dd 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbysubscription.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_update.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_update.go index 904fe5ef0fe..0ab0ca706c1 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/method_update.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/method_update.go @@ -49,7 +49,6 @@ func (c CapacityReservationGroupsClient) Update(ctx context.Context, id Capacity var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/capacityreservationgroups/version.go b/resource-manager/compute/2022-03-01/capacityreservationgroups/version.go index bbaa2d5fdf5..f97f5197d53 100644 --- a/resource-manager/compute/2022-03-01/capacityreservationgroups/version.go +++ b/resource-manager/compute/2022-03-01/capacityreservationgroups/version.go @@ -1,12 +1,10 @@ package capacityreservationgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservationgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservationgroups/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/capacityreservations/README.md b/resource-manager/compute/2022-03-01/capacityreservations/README.md index cd1bf4b50d7..7de7fd063b0 100644 --- a/resource-manager/compute/2022-03-01/capacityreservations/README.md +++ b/resource-manager/compute/2022-03-01/capacityreservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservations` Documentation -The `capacityreservations` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `capacityreservations` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/capacityreservations/client.go b/resource-manager/compute/2022-03-01/capacityreservations/client.go index 03bc68e43c5..46407a5fa33 100644 --- a/resource-manager/compute/2022-03-01/capacityreservations/client.go +++ b/resource-manager/compute/2022-03-01/capacityreservations/client.go @@ -15,7 +15,7 @@ type CapacityReservationsClient struct { } func NewCapacityReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go b/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go index 0f72f8f4a70..283c492d9c4 100644 --- a/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go +++ b/resource-manager/compute/2022-03-01/capacityreservations/id_capacityreservation.go @@ -44,7 +44,7 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/capacityreservations/method_get.go b/resource-manager/compute/2022-03-01/capacityreservations/method_get.go index 745d18a7fc3..b9d6e655ff4 100644 --- a/resource-manager/compute/2022-03-01/capacityreservations/method_get.go +++ b/resource-manager/compute/2022-03-01/capacityreservations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationsClient) Get(ctx context.Context, id CapacityReservat var model CapacityReservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/capacityreservations/version.go b/resource-manager/compute/2022-03-01/capacityreservations/version.go index a8f29720214..64b11c31e65 100644 --- a/resource-manager/compute/2022-03-01/capacityreservations/version.go +++ b/resource-manager/compute/2022-03-01/capacityreservations/version.go @@ -1,12 +1,10 @@ package capacityreservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservations/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/dedicatedhost/README.md b/resource-manager/compute/2022-03-01/dedicatedhost/README.md index 4e334f0652b..59587ce2ad4 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhost/README.md +++ b/resource-manager/compute/2022-03-01/dedicatedhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/dedicatedhost` Documentation -The `dedicatedhost` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `dedicatedhost` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/dedicatedhost/client.go b/resource-manager/compute/2022-03-01/dedicatedhost/client.go index b440c051d61..5c78f75da1d 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhost/client.go +++ b/resource-manager/compute/2022-03-01/dedicatedhost/client.go @@ -15,7 +15,7 @@ type DedicatedHostClient struct { } func NewDedicatedHostClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/dedicatedhost/version.go b/resource-manager/compute/2022-03-01/dedicatedhost/version.go index ea3ebef4b6c..83fc1b06f10 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhost/version.go +++ b/resource-manager/compute/2022-03-01/dedicatedhost/version.go @@ -1,12 +1,10 @@ package dedicatedhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhost/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/README.md b/resource-manager/compute/2022-03-01/dedicatedhostgroups/README.md index c4cb8bed06a..9056e14dfc4 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/README.md +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/dedicatedhostgroups` Documentation -The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `dedicatedhostgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/client.go b/resource-manager/compute/2022-03-01/dedicatedhostgroups/client.go index e3ac7c014b1..1198b817462 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/client.go +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/client.go @@ -15,7 +15,7 @@ type DedicatedHostGroupsClient struct { } func NewDedicatedHostGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_createorupdate.go b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_createorupdate.go index 7696a362908..4b26099152d 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_createorupdate.go +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id common var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_get.go b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_get.go index 7c5f6eba0af..8d31b580668 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_get.go +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostGroupsClient) Get(ctx context.Context, id commonids.Dedicat var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_update.go b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_update.go index 518f4006b01..0bb7d2873f7 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_update.go +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/method_update.go @@ -50,7 +50,6 @@ func (c DedicatedHostGroupsClient) Update(ctx context.Context, id commonids.Dedi var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/dedicatedhostgroups/version.go b/resource-manager/compute/2022-03-01/dedicatedhostgroups/version.go index abb692dc2fd..ea7f4045b62 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhostgroups/version.go +++ b/resource-manager/compute/2022-03-01/dedicatedhostgroups/version.go @@ -1,12 +1,10 @@ package dedicatedhostgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhostgroups/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/dedicatedhosts/README.md b/resource-manager/compute/2022-03-01/dedicatedhosts/README.md index fa630c1c545..a4be5c06563 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhosts/README.md +++ b/resource-manager/compute/2022-03-01/dedicatedhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/dedicatedhosts` Documentation -The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `dedicatedhosts` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/dedicatedhosts/client.go b/resource-manager/compute/2022-03-01/dedicatedhosts/client.go index 0b646338795..1f5bf6278f7 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhosts/client.go +++ b/resource-manager/compute/2022-03-01/dedicatedhosts/client.go @@ -15,7 +15,7 @@ type DedicatedHostsClient struct { } func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/dedicatedhosts/method_get.go b/resource-manager/compute/2022-03-01/dedicatedhosts/method_get.go index 63e85f0ce8b..ae7a03232ad 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhosts/method_get.go +++ b/resource-manager/compute/2022-03-01/dedicatedhosts/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostsClient) Get(ctx context.Context, id commonids.DedicatedHos var model DedicatedHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/dedicatedhosts/version.go b/resource-manager/compute/2022-03-01/dedicatedhosts/version.go index c645d06e8f8..25ac8a958c4 100644 --- a/resource-manager/compute/2022-03-01/dedicatedhosts/version.go +++ b/resource-manager/compute/2022-03-01/dedicatedhosts/version.go @@ -1,12 +1,10 @@ package dedicatedhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhosts/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/images/README.md b/resource-manager/compute/2022-03-01/images/README.md index d30b877a12d..be6a7605194 100644 --- a/resource-manager/compute/2022-03-01/images/README.md +++ b/resource-manager/compute/2022-03-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `images` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/images/client.go b/resource-manager/compute/2022-03-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/compute/2022-03-01/images/client.go +++ b/resource-manager/compute/2022-03-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/images/id_image.go b/resource-manager/compute/2022-03-01/images/id_image.go index 8f3964a77c7..c258a9aca61 100644 --- a/resource-manager/compute/2022-03-01/images/id_image.go +++ b/resource-manager/compute/2022-03-01/images/id_image.go @@ -42,7 +42,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/images/method_get.go b/resource-manager/compute/2022-03-01/images/method_get.go index 73320770a28..e68f9e933bb 100644 --- a/resource-manager/compute/2022-03-01/images/method_get.go +++ b/resource-manager/compute/2022-03-01/images/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId, options GetOperationO var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/images/version.go b/resource-manager/compute/2022-03-01/images/version.go index 6f323f36e34..f92ae5a5a51 100644 --- a/resource-manager/compute/2022-03-01/images/version.go +++ b/resource-manager/compute/2022-03-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/loganalytics/README.md b/resource-manager/compute/2022-03-01/loganalytics/README.md index fe9b67a0fed..ff0e418c44f 100644 --- a/resource-manager/compute/2022-03-01/loganalytics/README.md +++ b/resource-manager/compute/2022-03-01/loganalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/loganalytics` Documentation -The `loganalytics` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `loganalytics` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/loganalytics/client.go b/resource-manager/compute/2022-03-01/loganalytics/client.go index 5053f2ddae1..b32a74cf728 100644 --- a/resource-manager/compute/2022-03-01/loganalytics/client.go +++ b/resource-manager/compute/2022-03-01/loganalytics/client.go @@ -15,7 +15,7 @@ type LogAnalyticsClient struct { } func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loganalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/loganalytics/id_location.go b/resource-manager/compute/2022-03-01/loganalytics/id_location.go index 63d3f560403..cf24cee10e3 100644 --- a/resource-manager/compute/2022-03-01/loganalytics/id_location.go +++ b/resource-manager/compute/2022-03-01/loganalytics/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/loganalytics/version.go b/resource-manager/compute/2022-03-01/loganalytics/version.go index b613e998954..2e1328add02 100644 --- a/resource-manager/compute/2022-03-01/loganalytics/version.go +++ b/resource-manager/compute/2022-03-01/loganalytics/version.go @@ -1,12 +1,10 @@ package loganalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loganalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loganalytics/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/README.md b/resource-manager/compute/2022-03-01/proximityplacementgroups/README.md index 36bc71c6881..8ac93f8d598 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/README.md +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/proximityplacementgroups` Documentation -The `proximityplacementgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `proximityplacementgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/client.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/client.go index 2b737bf0f86..1a6cf3adbc3 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/client.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/client.go @@ -15,7 +15,7 @@ type ProximityPlacementGroupsClient struct { } func NewProximityPlacementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProximityPlacementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proximityplacementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proximityplacementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProximityPlacementGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go index 0c0c7a01d30..0ba2b2d5fa9 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -42,7 +42,7 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_createorupdate.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_createorupdate.go index ec5dbe0e33f..b52985d0f6c 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_createorupdate.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, id P var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_get.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_get.go index 3e2a44fe371..9319acd4f9b 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_get.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProximityPlacementGroupsClient) Get(ctx context.Context, id ProximityPla var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_update.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_update.go index 2e1e1e45fc6..dd8d1e3003a 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/method_update.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/method_update.go @@ -49,7 +49,6 @@ func (c ProximityPlacementGroupsClient) Update(ctx context.Context, id Proximity var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/proximityplacementgroups/version.go b/resource-manager/compute/2022-03-01/proximityplacementgroups/version.go index a595529e42b..078d95e4e78 100644 --- a/resource-manager/compute/2022-03-01/proximityplacementgroups/version.go +++ b/resource-manager/compute/2022-03-01/proximityplacementgroups/version.go @@ -1,12 +1,10 @@ package proximityplacementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proximityplacementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proximityplacementgroups/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/README.md b/resource-manager/compute/2022-03-01/restorepointcollections/README.md index 143a40925ec..296ae3b40dc 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/README.md +++ b/resource-manager/compute/2022-03-01/restorepointcollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/restorepointcollections` Documentation -The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `restorepointcollections` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/client.go b/resource-manager/compute/2022-03-01/restorepointcollections/client.go index 816bae4a346..543d327725d 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/client.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/client.go @@ -15,7 +15,7 @@ type RestorePointCollectionsClient struct { } func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepointcollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/id_restorepointcollection.go b/resource-manager/compute/2022-03-01/restorepointcollections/id_restorepointcollection.go index 5ae5a219829..f10116745d8 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/id_restorepointcollection.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/id_restorepointcollection.go @@ -42,7 +42,7 @@ func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, err } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointColl } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/method_createorupdate.go b/resource-manager/compute/2022-03-01/restorepointcollections/method_createorupdate.go index 6837427e5be..7e9dac346e3 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/method_createorupdate.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id Re var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/method_get.go b/resource-manager/compute/2022-03-01/restorepointcollections/method_get.go index 875f286c7fa..636041d46c6 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/method_get.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointC var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/method_update.go b/resource-manager/compute/2022-03-01/restorepointcollections/method_update.go index 209e763e72d..3aa41ed97ea 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/method_update.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/method_update.go @@ -49,7 +49,6 @@ func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePoi var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/restorepointcollections/version.go b/resource-manager/compute/2022-03-01/restorepointcollections/version.go index f4e790c2f39..fe1174f44eb 100644 --- a/resource-manager/compute/2022-03-01/restorepointcollections/version.go +++ b/resource-manager/compute/2022-03-01/restorepointcollections/version.go @@ -1,12 +1,10 @@ package restorepointcollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepointcollections/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/restorepoints/README.md b/resource-manager/compute/2022-03-01/restorepoints/README.md index 75e70db02f8..6c6907008e3 100644 --- a/resource-manager/compute/2022-03-01/restorepoints/README.md +++ b/resource-manager/compute/2022-03-01/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/restorepoints/client.go b/resource-manager/compute/2022-03-01/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/compute/2022-03-01/restorepoints/client.go +++ b/resource-manager/compute/2022-03-01/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/restorepoints/id_restorepoint.go b/resource-manager/compute/2022-03-01/restorepoints/id_restorepoint.go index 5ffe0e1d42b..853e2a1b58d 100644 --- a/resource-manager/compute/2022-03-01/restorepoints/id_restorepoint.go +++ b/resource-manager/compute/2022-03-01/restorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/restorepoints/method_get.go b/resource-manager/compute/2022-03-01/restorepoints/method_get.go index 1fb0a01b3f8..ccf229525cb 100644 --- a/resource-manager/compute/2022-03-01/restorepoints/method_get.go +++ b/resource-manager/compute/2022-03-01/restorepoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId, options var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/restorepoints/version.go b/resource-manager/compute/2022-03-01/restorepoints/version.go index 2afc9461a4b..5c60c3851a8 100644 --- a/resource-manager/compute/2022-03-01/restorepoints/version.go +++ b/resource-manager/compute/2022-03-01/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/README.md b/resource-manager/compute/2022-03-01/sshpublickeys/README.md index e948f678d58..e0f6f18391e 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/README.md +++ b/resource-manager/compute/2022-03-01/sshpublickeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/sshpublickeys` Documentation -The `sshpublickeys` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `sshpublickeys` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/client.go b/resource-manager/compute/2022-03-01/sshpublickeys/client.go index 60a955db2ea..b1945fe3975 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/client.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/client.go @@ -15,7 +15,7 @@ type SshPublicKeysClient struct { } func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sshpublickeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sshpublickeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SshPublicKeysClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/id_sshpublickey.go b/resource-manager/compute/2022-03-01/sshpublickeys/id_sshpublickey.go index 013618b26f3..4f003a63452 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/id_sshpublickey.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/id_sshpublickey.go @@ -42,7 +42,7 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/method_create.go b/resource-manager/compute/2022-03-01/sshpublickeys/method_create.go index 391f084ac1d..d348c2924e1 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/method_create.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/method_create.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/method_generatekeypair.go b/resource-manager/compute/2022-03-01/sshpublickeys/method_generatekeypair.go index 0793e94f13b..cf52f7b6fae 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/method_generatekeypair.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/method_generatekeypair.go @@ -46,7 +46,6 @@ func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKe var model SshPublicKeyGenerateKeyPairResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/method_get.go b/resource-manager/compute/2022-03-01/sshpublickeys/method_get.go index 3420ec987c9..dc1c3cbdb02 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/method_get.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/method_get.go @@ -45,7 +45,6 @@ func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/method_update.go b/resource-manager/compute/2022-03-01/sshpublickeys/method_update.go index d697813a6ed..da0970a3389 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/method_update.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/method_update.go @@ -49,7 +49,6 @@ func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/sshpublickeys/version.go b/resource-manager/compute/2022-03-01/sshpublickeys/version.go index bb957196236..bcb8baf24d3 100644 --- a/resource-manager/compute/2022-03-01/sshpublickeys/version.go +++ b/resource-manager/compute/2022-03-01/sshpublickeys/version.go @@ -1,12 +1,10 @@ package sshpublickeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sshpublickeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sshpublickeys/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/README.md b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/README.md index 26c6fb8d79b..00d6b6818ab 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachineextensionimages` Documentation -The `virtualmachineextensionimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachineextensionimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/client.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/client.go index baa2d351929..4385ff41033 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionImagesClient struct { } func NewVirtualMachineExtensionImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_publisher.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_publisher.go index bb19fd74520..88f97b7a6eb 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_publisher.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_type.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_type.go index 9cf3c59da23..bf518ba8702 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_type.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_type.go @@ -44,7 +44,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_version.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_version.go index a0e8803b4a0..1ee10989db9 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_version.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_get.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_get.go index b8722c5e7f4..728c7b2ba56 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineExtensionImagesClient) Get(ctx context.Context, id Version var model VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listtypes.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listtypes.go index 706c54f8ec4..b9f09407bc0 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listtypes.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listtypes.go @@ -46,7 +46,6 @@ func (c VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, id P var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listversions.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listversions.go index ad463b163fd..2cedae68952 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listversions.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/method_listversions.go @@ -36,6 +36,7 @@ func (o ListVersionsOperationOptions) ToHeaders() *client.Headers { func (o ListVersionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, i var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/version.go b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/version.go index 444a1162c28..690f95c66d3 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensionimages/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensionimages/version.go @@ -1,12 +1,10 @@ package virtualmachineextensionimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensionimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensionimages/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/README.md b/resource-manager/compute/2022-03-01/virtualmachineextensions/README.md index edbf426a7bf..e0c31cdd8de 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachineextensions` Documentation -The `virtualmachineextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachineextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/client.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/client.go index 4adf20a248c..c049fb742ed 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionsClient struct { } func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/id_extension.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/id_extension.go index b9ae480741d..19a447ebbbe 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/id_extension.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/id_virtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/id_virtualmachine.go index 50052e6b019..34532cbd2a4 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/id_virtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/method_get.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/method_get.go index 767c337cafb..081bdecb6ff 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) Get(ctx context.Context, id ExtensionId, var model VirtualMachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/method_list.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/method_list.go index b5541f85116..b495c3fa1d5 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) List(ctx context.Context, id VirtualMach var model VirtualMachineExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineextensions/version.go b/resource-manager/compute/2022-03-01/virtualmachineextensions/version.go index d7825528562..c8e715767a7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineextensions/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachineextensions/version.go @@ -1,12 +1,10 @@ package virtualmachineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensions/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/README.md b/resource-manager/compute/2022-03-01/virtualmachineimages/README.md index 6fb2a0a17e7..2345d87fdc7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachineimages` Documentation -The `virtualmachineimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachineimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/client.go b/resource-manager/compute/2022-03-01/virtualmachineimages/client.go index 3d9912359f8..05c5fd93d49 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineImagesClient struct { } func NewVirtualMachineImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezone.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezone.go index 689e0be7e56..770692e1f01 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezone.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezone.go @@ -42,7 +42,7 @@ func ParseEdgeZoneID(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEdgeZoneIDInsensitively(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezonepublisher.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezonepublisher.go index 3838d08d8b8..ef3334834d7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezonepublisher.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_edgezonepublisher.go @@ -44,7 +44,7 @@ func ParseEdgeZonePublisherID(input string) (*EdgeZonePublisherId, error) { } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeZonePublisherIDInsensitively(input string) (*EdgeZonePublisherId, } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_location.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_location.go index 21b22ae9152..aa0bd6f123c 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_location.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offer.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offer.go index 40367d1e7b5..821104312e6 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offer.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offer.go @@ -44,7 +44,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offersku.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offersku.go index 91e4a168703..08bca98cb86 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offersku.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offersku.go @@ -48,7 +48,7 @@ func ParseOfferSkuID(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOfferSkuIDInsensitively(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offerskuversion.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offerskuversion.go index dae6d7f61be..4b04850b2ae 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_offerskuversion.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_offerskuversion.go @@ -50,7 +50,7 @@ func ParseOfferSkuVersionID(input string) (*OfferSkuVersionId, error) { } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseOfferSkuVersionIDInsensitively(input string) (*OfferSkuVersionId, erro } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_publisher.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_publisher.go index 509220be144..785d3f177f0 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_publisher.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_sku.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_sku.go index 935057743f6..34fde30278a 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_sku.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_sku.go @@ -46,7 +46,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_skuversion.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_skuversion.go index 2e5d0e9a79c..0172c3e1a70 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_skuversion.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_skuversion.go @@ -48,7 +48,7 @@ func ParseSkuVersionID(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuVersionIDInsensitively(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/id_vmimageoffer.go b/resource-manager/compute/2022-03-01/virtualmachineimages/id_vmimageoffer.go index 22411c949d8..99ef25c09c5 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/id_vmimageoffer.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/id_vmimageoffer.go @@ -46,7 +46,7 @@ func ParseVMImageOfferID(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVMImageOfferIDInsensitively(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezoneget.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezoneget.go index d08e473ae5f..aae2bc8618d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezoneget.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezoneget.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) EdgeZoneGet(ctx context.Context, id OfferSku var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelist.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelist.go index ba17ca15382..70e0120daa1 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelist.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelist.go @@ -36,6 +36,7 @@ func (o EdgeZoneListOperationOptions) ToHeaders() *client.Headers { func (o EdgeZoneListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) EdgeZoneList(ctx context.Context, id OfferSk var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistoffers.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistoffers.go index af3bb42c4ba..26cde80c448 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistoffers.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListOffers(ctx context.Context, id E var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistpublishers.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistpublishers.go index 9aadf470f3b..2ed9f07750a 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistpublishers.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListPublishers(ctx context.Context, var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistskus.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistskus.go index 42a5ccfc0ae..62b0005efdd 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistskus.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_edgezonelistskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListSkus(ctx context.Context, id VMI var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_get.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_get.go index 3be37d5f899..d9357bbb7dc 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) Get(ctx context.Context, id SkuVersionId) (r var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_list.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_list.go index 2989d0c443a..2d6df70703d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) List(ctx context.Context, id SkuId, options var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listoffers.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listoffers.go index edba237d0ec..b44d982eaaf 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listoffers.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListOffers(ctx context.Context, id Publisher var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listpublishers.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listpublishers.go index 0ff57ba69ee..0251298dfe5 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listpublishers.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListPublishers(ctx context.Context, id Locat var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listskus.go b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listskus.go index 2613d661514..1a3ee479650 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/method_listskus.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/method_listskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListSkus(ctx context.Context, id OfferId) (r var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineimages/version.go b/resource-manager/compute/2022-03-01/virtualmachineimages/version.go index dc685fabb0b..55a9d15feea 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineimages/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachineimages/version.go @@ -1,12 +1,10 @@ package virtualmachineimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineimages/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/README.md b/resource-manager/compute/2022-03-01/virtualmachineruncommands/README.md index 8fdd5ef4019..1a6ba734011 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachineruncommands` Documentation -The `virtualmachineruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachineruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/client.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/client.go index ee453cd014c..48e134abb29 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineRunCommandsClient struct { } func NewVirtualMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_location.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_location.go index dfd7f350471..e553ed3913e 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_location.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_runcommand.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_runcommand.go index e2bd6f0a575..61f472d53e2 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_runcommand.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_runcommand.go @@ -42,7 +42,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachine.go index 8d098c85c3b..df64bb47d41 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go index 1c90363b725..8b3914c8d71 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go @@ -44,7 +44,7 @@ func ParseVirtualMachineRunCommandID(input string) (*VirtualMachineRunCommandId, } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachine } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_get.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_get.go index 83355bdb92b..465ea8330ad 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineRunCommandsClient) Get(ctx context.Context, id RunCommandI var model RunCommandDocument result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go index c06971e26be..f603e128c0c 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go @@ -34,6 +34,7 @@ func (o GetByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o GetByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go index d3cf5c6296b..739e09cd17f 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go @@ -39,6 +39,7 @@ func (o ListByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachineruncommands/version.go b/resource-manager/compute/2022-03-01/virtualmachineruncommands/version.go index 71567b332ae..07cd15f15b7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachineruncommands/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachineruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineruncommands/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/README.md b/resource-manager/compute/2022-03-01/virtualmachines/README.md index a53ccdd2f9d..eacda81872d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachines/client.go b/resource-manager/compute/2022-03-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/id_location.go b/resource-manager/compute/2022-03-01/virtualmachines/id_location.go index 59cc8439152..4a5c1e51c52 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/id_location.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/id_virtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachines/id_virtualmachine.go index 0a676811b3a..9f10e69b236 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_deallocate.go b/resource-manager/compute/2022-03-01/virtualmachines/method_deallocate.go index ae7ee7a0d2b..c962480de36 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_deallocate.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_delete.go b/resource-manager/compute/2022-03-01/virtualmachines/method_delete.go index 7809910a33a..e2d145391fa 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_delete.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_get.go b/resource-manager/compute/2022-03-01/virtualmachines/method_get.go index ca0e72e7b04..610b8728f94 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_instanceview.go b/resource-manager/compute/2022-03-01/virtualmachines/method_instanceview.go index 629b0f65267..735f254f665 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_instanceview.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_instanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) InstanceView(ctx context.Context, id VirtualMachi var model VirtualMachineInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_list.go b/resource-manager/compute/2022-03-01/virtualmachines/method_list.go index 739d48eb829..f75794b2731 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_listall.go b/resource-manager/compute/2022-03-01/virtualmachines/method_listall.go index 87a1958240a..3e67dce8eed 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_listall.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_listall.go @@ -41,6 +41,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_listavailablesizes.go b/resource-manager/compute/2022-03-01/virtualmachines/method_listavailablesizes.go index ade9d529c86..f4ad290ed8b 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_listavailablesizes.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_listavailablesizes.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListAvailableSizes(ctx context.Context, id Virtua var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_poweroff.go b/resource-manager/compute/2022-03-01/virtualmachines/method_poweroff.go index cd9da953583..f5c1b75d289 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_poweroff.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2022-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go index ef782af5c0a..cf8035af464 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachines/version.go b/resource-manager/compute/2022-03-01/virtualmachines/version.go index 352830a34d8..7a3c68c64a8 100644 --- a/resource-manager/compute/2022-03-01/virtualmachines/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/README.md index 983546ed471..82508a62fe5 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions` Documentation -The `virtualmachinescalesetextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesetextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/client.go index 9555c0add8c..8b2f0aa3f61 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetExtensionsClient struct { } func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go index e52fb99c34f..221bbe81a25 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go index eaeca4e6677..c08756824e1 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetExtensionID(input string) (*VirtualMachineScaleS } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetExtensionIDInsensitively(input string) (*Virtual } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/method_get.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/method_get.go index 805e9846e65..58bd9a83728 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, id Virt var model VirtualMachineScaleSetExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/version.go index b8c1b5fef9c..664ad9cbd42 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetextensions/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/README.md index 114168eec43..1ed58f154b5 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades` Documentation -The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/client.go index fb39e655c93..2bc32c3839f 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { } func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetRollingUpgradesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go index 73ab65cf8ad..c778cdb85f7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go index e9dda93541e..647dbb00e17 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Conte var model RollingUpgradeStatusInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/version.go index d672d224318..99ff4797644 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetrollingupgrades/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetrollingupgrades -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesets/README.md index 46e66e99344..e58c83241a2 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesets` Documentation -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/client.go index a08ba8c1d81..0548a7aec67 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetsClient struct { } func NewVirtualMachineScaleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_location.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_location.go index a674916111d..65c5f49041d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_location.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go index d4542bba1b5..76fb35088a6 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_delete.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_delete.go index 154aacdb1ce..40c53c88532 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_delete.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_deleteinstances.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_deleteinstances.go index 375063255ba..ae1057f79fa 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_deleteinstances.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_deleteinstances.go @@ -36,6 +36,7 @@ func (o DeleteInstancesOperationOptions) ToHeaders() *client.Headers { func (o DeleteInstancesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go index 9e2117d6a63..a49b926c058 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go @@ -36,6 +36,7 @@ func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToHe func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateD var model RecoveryWalkResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_get.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_get.go index 1a1c806d33a..4ade8c757e1 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineScaleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_getinstanceview.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_getinstanceview.go index b79b350b676..4e409bb9b3b 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_getinstanceview.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, id V var model VirtualMachineScaleSetInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_poweroff.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_poweroff.go index 3b0e524f55b..0b805fc3b55 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_poweroff.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesets/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesets/version.go index 927f889fdeb..50f9f61614d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesets/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesets/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesets/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/README.md index 631237947cd..1e75fd5a919 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions` Documentation -The `virtualmachinescalesetvmextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesetvmextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/client.go index ee3be0e3e80..384674618ef 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { } func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go index 5bed9de5aa5..031846e1de7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go @@ -46,7 +46,7 @@ func ParseVirtualMachineExtensionID(input string) (*VirtualMachineExtensionId, e } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineExtensionIDInsensitively(input string) (*VirtualMachineE } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go index 00ba634a6da..461b5781ea3 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_get.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_get.go index 734208e2c2b..03923b1ef4d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, id Vi var model VirtualMachineScaleSetVMExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_list.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_list.go index d9cdfbdcc60..300d802904c 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, id V var model VirtualMachineScaleSetVMExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/version.go index fa18215e023..4d9c5880f79 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/README.md index 74a3159d9db..a1dee73d43a 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands` Documentation -The `virtualmachinescalesetvmruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesetvmruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/client.go index 65dba565153..fb8224b7dda 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { } func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go index 4342ff0b57d..48139ac644b 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go index e229cb64fb0..98f6dff8b2b 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*Virtu } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input st } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_get.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_get.go index 35fe308862d..7504f816267 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, id V var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_list.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_list.go index d335e2247cf..14ad4b942ca 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/version.go index 7728013caef..e7ad84f7ef8 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvmruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/README.md b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/README.md index 40f7d2ca595..a96426a6844 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinescalesetvms` Documentation -The `virtualmachinescalesetvms` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinescalesetvms` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/client.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/client.go index d86b351fd86..61a216f26bf 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMsClient struct { } func NewVirtualMachineScaleSetVMsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go index 83349156568..50f34af693e 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go index 5e77406f79c..fa37f879ec7 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_delete.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_delete.go index 70ab6260f49..2c4fdb5bb39 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_delete.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_get.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_get.go index 54f1a9f63ea..48056f0eab3 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_get.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) Get(ctx context.Context, id VirtualMach var model VirtualMachineScaleSetVM result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_getinstanceview.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_getinstanceview.go index 67764259f28..d2e27a1295d 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_getinstanceview.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, id var model VirtualMachineScaleSetVMInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_list.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_list.go index 25828909629..bb09ed5d71a 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_poweroff.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_poweroff.go index 1b450b80bfa..cbe987a9165 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_poweroff.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go index 29eb32435dd..a93248b3042 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/version.go b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/version.go index 8790e2ab6c2..6893261f34e 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinescalesetvms/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvms/2022-03-01" } diff --git a/resource-manager/compute/2022-03-01/virtualmachinesizes/README.md b/resource-manager/compute/2022-03-01/virtualmachinesizes/README.md index 9e88b1c1a06..caee9adc1ad 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinesizes/README.md +++ b/resource-manager/compute/2022-03-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-01/virtualmachinesizes/client.go b/resource-manager/compute/2022-03-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinesizes/client.go +++ b/resource-manager/compute/2022-03-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-01/virtualmachinesizes/id_location.go b/resource-manager/compute/2022-03-01/virtualmachinesizes/id_location.go index 9cb3012f4e4..b5a6dbf59ef 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinesizes/id_location.go +++ b/resource-manager/compute/2022-03-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-01/virtualmachinesizes/method_list.go b/resource-manager/compute/2022-03-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinesizes/method_list.go +++ b/resource-manager/compute/2022-03-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-01/virtualmachinesizes/version.go b/resource-manager/compute/2022-03-01/virtualmachinesizes/version.go index 5f016b8cef6..e948a67f254 100644 --- a/resource-manager/compute/2022-03-01/virtualmachinesizes/version.go +++ b/resource-manager/compute/2022-03-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2022-03-01" } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/README.md b/resource-manager/compute/2022-03-02/diskaccesses/README.md index 8a09545bc9a..24f77090346 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/README.md +++ b/resource-manager/compute/2022-03-02/diskaccesses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskaccesses` Documentation -The `diskaccesses` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-02`). +The `diskaccesses` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-02/diskaccesses/client.go b/resource-manager/compute/2022-03-02/diskaccesses/client.go index 5f54514c997..cda295ab038 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/client.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/client.go @@ -15,7 +15,7 @@ type DiskAccessesClient struct { } func NewDiskAccessesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskAccessesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskaccesses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskaccesses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskAccessesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go b/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go index 16e931edbe0..9d04268e700 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/id_diskaccess.go @@ -42,7 +42,7 @@ func ParseDiskAccessID(input string) (*DiskAccessId, error) { } id := DiskAccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDiskAccessIDInsensitively(input string) (*DiskAccessId, error) { } id := DiskAccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go b/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go index 8ee9e9ce467..fe09ecc5568 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/method_get.go b/resource-manager/compute/2022-03-02/diskaccesses/method_get.go index 43095965756..601add75a17 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/method_get.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/method_get.go @@ -45,7 +45,6 @@ func (c DiskAccessesClient) Get(ctx context.Context, id DiskAccessId) (result Ge var model DiskAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/method_getaprivateendpointconnection.go b/resource-manager/compute/2022-03-02/diskaccesses/method_getaprivateendpointconnection.go index a0494a9e434..8ae0f646ec2 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/method_getaprivateendpointconnection.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/method_getaprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, i var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/method_getprivatelinkresources.go b/resource-manager/compute/2022-03-02/diskaccesses/method_getprivatelinkresources.go index 5f5fcd21509..9af74e8677f 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/method_getprivatelinkresources.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/method_getprivatelinkresources.go @@ -46,7 +46,6 @@ func (c DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, id Disk var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/diskaccesses/version.go b/resource-manager/compute/2022-03-02/diskaccesses/version.go index eff0467ba5a..83ccd233562 100644 --- a/resource-manager/compute/2022-03-02/diskaccesses/version.go +++ b/resource-manager/compute/2022-03-02/diskaccesses/version.go @@ -1,12 +1,10 @@ package diskaccesses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskaccesses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskaccesses/2022-03-02" } diff --git a/resource-manager/compute/2022-03-02/diskencryptionsets/README.md b/resource-manager/compute/2022-03-02/diskencryptionsets/README.md index 9b58789c524..05adf1f3e8a 100644 --- a/resource-manager/compute/2022-03-02/diskencryptionsets/README.md +++ b/resource-manager/compute/2022-03-02/diskencryptionsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets` Documentation -The `diskencryptionsets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-02`). +The `diskencryptionsets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-02/diskencryptionsets/client.go b/resource-manager/compute/2022-03-02/diskencryptionsets/client.go index cd5615541d1..c5deb5876d7 100644 --- a/resource-manager/compute/2022-03-02/diskencryptionsets/client.go +++ b/resource-manager/compute/2022-03-02/diskencryptionsets/client.go @@ -15,7 +15,7 @@ type DiskEncryptionSetsClient struct { } func NewDiskEncryptionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskEncryptionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskencryptionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskencryptionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskEncryptionSetsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-02/diskencryptionsets/method_get.go b/resource-manager/compute/2022-03-02/diskencryptionsets/method_get.go index 47f9c08835d..441ab4200e0 100644 --- a/resource-manager/compute/2022-03-02/diskencryptionsets/method_get.go +++ b/resource-manager/compute/2022-03-02/diskencryptionsets/method_get.go @@ -46,7 +46,6 @@ func (c DiskEncryptionSetsClient) Get(ctx context.Context, id commonids.DiskEncr var model DiskEncryptionSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/diskencryptionsets/version.go b/resource-manager/compute/2022-03-02/diskencryptionsets/version.go index 172f878f2fb..4b4785474a7 100644 --- a/resource-manager/compute/2022-03-02/diskencryptionsets/version.go +++ b/resource-manager/compute/2022-03-02/diskencryptionsets/version.go @@ -1,12 +1,10 @@ package diskencryptionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskencryptionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskencryptionsets/2022-03-02" } diff --git a/resource-manager/compute/2022-03-02/disks/README.md b/resource-manager/compute/2022-03-02/disks/README.md index ddd100a2f91..55d6eb5c32c 100644 --- a/resource-manager/compute/2022-03-02/disks/README.md +++ b/resource-manager/compute/2022-03-02/disks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/disks` Documentation -The `disks` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-02`). +The `disks` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-02/disks/client.go b/resource-manager/compute/2022-03-02/disks/client.go index 16f70b8378d..e5accbb35a3 100644 --- a/resource-manager/compute/2022-03-02/disks/client.go +++ b/resource-manager/compute/2022-03-02/disks/client.go @@ -15,7 +15,7 @@ type DisksClient struct { } func NewDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*DisksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisksClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-02/disks/method_get.go b/resource-manager/compute/2022-03-02/disks/method_get.go index 699a246fb99..6aee9076755 100644 --- a/resource-manager/compute/2022-03-02/disks/method_get.go +++ b/resource-manager/compute/2022-03-02/disks/method_get.go @@ -46,7 +46,6 @@ func (c DisksClient) Get(ctx context.Context, id commonids.ManagedDiskId) (resul var model Disk result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/disks/version.go b/resource-manager/compute/2022-03-02/disks/version.go index 4c3637d6d79..72e85abe3b6 100644 --- a/resource-manager/compute/2022-03-02/disks/version.go +++ b/resource-manager/compute/2022-03-02/disks/version.go @@ -1,12 +1,10 @@ package disks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disks/2022-03-02" } diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/README.md b/resource-manager/compute/2022-03-02/incrementalrestorepoints/README.md index 4a6fa8e0343..196a2591af2 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/README.md +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/incrementalrestorepoints` Documentation -The `incrementalrestorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-02`). +The `incrementalrestorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/client.go b/resource-manager/compute/2022-03-02/incrementalrestorepoints/client.go index f724721258e..5935094edf6 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/client.go +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/client.go @@ -15,7 +15,7 @@ type IncrementalRestorePointsClient struct { } func NewIncrementalRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncrementalRestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incrementalrestorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incrementalrestorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncrementalRestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_diskrestorepoint.go b/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_diskrestorepoint.go index 6029cfdd6a0..7fc32894338 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_diskrestorepoint.go +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_diskrestorepoint.go @@ -46,7 +46,7 @@ func ParseDiskRestorePointID(input string) (*DiskRestorePointId, error) { } id := DiskRestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiskRestorePointIDInsensitively(input string) (*DiskRestorePointId, er } id := DiskRestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_restorepoint.go b/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_restorepoint.go index 1171514e9db..08b6361bd7a 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_restorepoint.go +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/method_diskrestorepointget.go b/resource-manager/compute/2022-03-02/incrementalrestorepoints/method_diskrestorepointget.go index 9f7de1fa66f..d45ccd720f1 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/method_diskrestorepointget.go +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/method_diskrestorepointget.go @@ -45,7 +45,6 @@ func (c IncrementalRestorePointsClient) DiskRestorePointGet(ctx context.Context, var model DiskRestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/incrementalrestorepoints/version.go b/resource-manager/compute/2022-03-02/incrementalrestorepoints/version.go index 95d445b7224..09ccd96cae9 100644 --- a/resource-manager/compute/2022-03-02/incrementalrestorepoints/version.go +++ b/resource-manager/compute/2022-03-02/incrementalrestorepoints/version.go @@ -1,12 +1,10 @@ package incrementalrestorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incrementalrestorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incrementalrestorepoints/2022-03-02" } diff --git a/resource-manager/compute/2022-03-02/snapshots/README.md b/resource-manager/compute/2022-03-02/snapshots/README.md index a6a0ad36fcb..43641b50aca 100644 --- a/resource-manager/compute/2022-03-02/snapshots/README.md +++ b/resource-manager/compute/2022-03-02/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-02`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-02/snapshots/client.go b/resource-manager/compute/2022-03-02/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/compute/2022-03-02/snapshots/client.go +++ b/resource-manager/compute/2022-03-02/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go b/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go index 87928ccc3ad..c1832f99d11 100644 --- a/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go +++ b/resource-manager/compute/2022-03-02/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-02/snapshots/method_get.go b/resource-manager/compute/2022-03-02/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/compute/2022-03-02/snapshots/method_get.go +++ b/resource-manager/compute/2022-03-02/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-02/snapshots/version.go b/resource-manager/compute/2022-03-02/snapshots/version.go index 21604564bc8..9a14900b723 100644 --- a/resource-manager/compute/2022-03-02/snapshots/version.go +++ b/resource-manager/compute/2022-03-02/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2022-03-02" } diff --git a/resource-manager/compute/2022-03-03/communitygalleries/README.md b/resource-manager/compute/2022-03-03/communitygalleries/README.md index 3be6312a29b..f98ad758a93 100644 --- a/resource-manager/compute/2022-03-03/communitygalleries/README.md +++ b/resource-manager/compute/2022-03-03/communitygalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/communitygalleries` Documentation -The `communitygalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `communitygalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/communitygalleries/client.go b/resource-manager/compute/2022-03-03/communitygalleries/client.go index ee3fe76a525..01d7a073e31 100644 --- a/resource-manager/compute/2022-03-03/communitygalleries/client.go +++ b/resource-manager/compute/2022-03-03/communitygalleries/client.go @@ -15,7 +15,7 @@ type CommunityGalleriesClient struct { } func NewCommunityGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/communitygalleries/id_communitygallery.go b/resource-manager/compute/2022-03-03/communitygalleries/id_communitygallery.go index b40a2813f6e..f3bd59f7594 100644 --- a/resource-manager/compute/2022-03-03/communitygalleries/id_communitygallery.go +++ b/resource-manager/compute/2022-03-03/communitygalleries/id_communitygallery.go @@ -42,7 +42,7 @@ func ParseCommunityGalleryID(input string) (*CommunityGalleryId, error) { } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunityGalleryIDInsensitively(input string) (*CommunityGalleryId, er } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/communitygalleries/method_get.go b/resource-manager/compute/2022-03-03/communitygalleries/method_get.go index 0ec53b5209e..b5525bfa5b0 100644 --- a/resource-manager/compute/2022-03-03/communitygalleries/method_get.go +++ b/resource-manager/compute/2022-03-03/communitygalleries/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleriesClient) Get(ctx context.Context, id CommunityGalleryId var model PirCommunityGalleryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/communitygalleries/version.go b/resource-manager/compute/2022-03-03/communitygalleries/version.go index 2e7f158b9ae..a0c82fa7e9a 100644 --- a/resource-manager/compute/2022-03-03/communitygalleries/version.go +++ b/resource-manager/compute/2022-03-03/communitygalleries/version.go @@ -1,12 +1,10 @@ package communitygalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleries/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/README.md b/resource-manager/compute/2022-03-03/communitygalleryimages/README.md index d782c0630ab..c0a148e47b8 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/README.md +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/communitygalleryimages` Documentation -The `communitygalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `communitygalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/client.go b/resource-manager/compute/2022-03-03/communitygalleryimages/client.go index 3462622883f..c1efdbe5536 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/client.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImagesClient struct { } func NewCommunityGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygallery.go b/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygallery.go index a7803ddbaf9..0ce88dd818a 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygallery.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygallery.go @@ -42,7 +42,7 @@ func ParseCommunityGalleryID(input string) (*CommunityGalleryId, error) { } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunityGalleryIDInsensitively(input string) (*CommunityGalleryId, er } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygalleryimage.go b/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygalleryimage.go index b8512c0f58a..110bd599840 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygalleryimage.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/id_communitygalleryimage.go @@ -44,7 +44,7 @@ func ParseCommunityGalleryImageID(input string) (*CommunityGalleryImageId, error } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommunityGalleryImageIDInsensitively(input string) (*CommunityGalleryI } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/method_get.go b/resource-manager/compute/2022-03-03/communitygalleryimages/method_get.go index bd9be720b32..f6357cfc819 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/method_get.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImagesClient) Get(ctx context.Context, id CommunityGalle var model CommunityGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimages/version.go b/resource-manager/compute/2022-03-03/communitygalleryimages/version.go index 420582f5f7c..f78e89a4e8e 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimages/version.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimages/version.go @@ -1,12 +1,10 @@ package communitygalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimages/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/README.md b/resource-manager/compute/2022-03-03/communitygalleryimageversions/README.md index 3f8237fb229..9e3e01038f0 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/README.md +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/communitygalleryimageversions` Documentation -The `communitygalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `communitygalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/client.go b/resource-manager/compute/2022-03-03/communitygalleryimageversions/client.go index 4982219d550..0bb37c078cc 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/client.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImageVersionsClient struct { } func NewCommunityGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimage.go b/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimage.go index aa113b34c28..9d47a0f5aaa 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimage.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimage.go @@ -44,7 +44,7 @@ func ParseCommunityGalleryImageID(input string) (*CommunityGalleryImageId, error } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommunityGalleryImageIDInsensitively(input string) (*CommunityGalleryI } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimageversion.go b/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimageversion.go index 87b478589ea..4ea6a549e34 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimageversion.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/id_communitygalleryimageversion.go @@ -46,7 +46,7 @@ func ParseCommunityGalleryImageVersionID(input string) (*CommunityGalleryImageVe } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommunityGalleryImageVersionIDInsensitively(input string) (*CommunityG } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/method_get.go b/resource-manager/compute/2022-03-03/communitygalleryimageversions/method_get.go index 1598140bb6a..29454f20ca8 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/method_get.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImageVersionsClient) Get(ctx context.Context, id Communi var model CommunityGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/communitygalleryimageversions/version.go b/resource-manager/compute/2022-03-03/communitygalleryimageversions/version.go index e1b5597f7a5..44ae99221f5 100644 --- a/resource-manager/compute/2022-03-03/communitygalleryimageversions/version.go +++ b/resource-manager/compute/2022-03-03/communitygalleryimageversions/version.go @@ -1,12 +1,10 @@ package communitygalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimageversions/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/galleries/README.md b/resource-manager/compute/2022-03-03/galleries/README.md index 2781ffa4ca9..aec379baa8e 100644 --- a/resource-manager/compute/2022-03-03/galleries/README.md +++ b/resource-manager/compute/2022-03-03/galleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleries` Documentation -The `galleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `galleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/galleries/client.go b/resource-manager/compute/2022-03-03/galleries/client.go index 624f4aaf60a..d9db0ae13ba 100644 --- a/resource-manager/compute/2022-03-03/galleries/client.go +++ b/resource-manager/compute/2022-03-03/galleries/client.go @@ -15,7 +15,7 @@ type GalleriesClient struct { } func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/galleries/method_get.go b/resource-manager/compute/2022-03-03/galleries/method_get.go index b8f3b9be59a..702aa561751 100644 --- a/resource-manager/compute/2022-03-03/galleries/method_get.go +++ b/resource-manager/compute/2022-03-03/galleries/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GalleriesClient) Get(ctx context.Context, id commonids.SharedImageGaller var model Gallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/galleries/version.go b/resource-manager/compute/2022-03-03/galleries/version.go index e63648020b4..a860db9d684 100644 --- a/resource-manager/compute/2022-03-03/galleries/version.go +++ b/resource-manager/compute/2022-03-03/galleries/version.go @@ -1,12 +1,10 @@ package galleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleries/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/galleryapplications/README.md b/resource-manager/compute/2022-03-03/galleryapplications/README.md index 7aba5a0d4aa..b7a4cd04458 100644 --- a/resource-manager/compute/2022-03-03/galleryapplications/README.md +++ b/resource-manager/compute/2022-03-03/galleryapplications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplications` Documentation -The `galleryapplications` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `galleryapplications` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/galleryapplications/client.go b/resource-manager/compute/2022-03-03/galleryapplications/client.go index efd5159e185..0131466680d 100644 --- a/resource-manager/compute/2022-03-03/galleryapplications/client.go +++ b/resource-manager/compute/2022-03-03/galleryapplications/client.go @@ -15,7 +15,7 @@ type GalleryApplicationsClient struct { } func NewGalleryApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/galleryapplications/id_application.go b/resource-manager/compute/2022-03-03/galleryapplications/id_application.go index 994259e991d..3a52dbe197f 100644 --- a/resource-manager/compute/2022-03-03/galleryapplications/id_application.go +++ b/resource-manager/compute/2022-03-03/galleryapplications/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryapplications/method_get.go b/resource-manager/compute/2022-03-03/galleryapplications/method_get.go index 8d1ab31cfd7..600f262b5af 100644 --- a/resource-manager/compute/2022-03-03/galleryapplications/method_get.go +++ b/resource-manager/compute/2022-03-03/galleryapplications/method_get.go @@ -45,7 +45,6 @@ func (c GalleryApplicationsClient) Get(ctx context.Context, id ApplicationId) (r var model GalleryApplication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/galleryapplications/version.go b/resource-manager/compute/2022-03-03/galleryapplications/version.go index 154468f4750..ceb1bed380f 100644 --- a/resource-manager/compute/2022-03-03/galleryapplications/version.go +++ b/resource-manager/compute/2022-03-03/galleryapplications/version.go @@ -1,12 +1,10 @@ package galleryapplications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplications/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/README.md b/resource-manager/compute/2022-03-03/galleryapplicationversions/README.md index bdfc53043fe..6242c6d488e 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/README.md +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryapplicationversions` Documentation -The `galleryapplicationversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `galleryapplicationversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/client.go b/resource-manager/compute/2022-03-03/galleryapplicationversions/client.go index 76bda42bb01..c45f09e57f5 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/client.go +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/client.go @@ -15,7 +15,7 @@ type GalleryApplicationVersionsClient struct { } func NewGalleryApplicationVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplicationversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplicationversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go b/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go index ab968ddd82a..28ee6b4678d 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go b/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go index 2c01633613f..4021fd84f55 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/id_applicationversion.go @@ -46,7 +46,7 @@ func ParseApplicationVersionID(input string) (*ApplicationVersionId, error) { } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApplicationVersionIDInsensitively(input string) (*ApplicationVersionId } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/method_get.go b/resource-manager/compute/2022-03-03/galleryapplicationversions/method_get.go index fc382e13c39..84c637d6e22 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/method_get.go +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryApplicationVersionsClient) Get(ctx context.Context, id Applicatio var model GalleryApplicationVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/galleryapplicationversions/version.go b/resource-manager/compute/2022-03-03/galleryapplicationversions/version.go index 86f964e4969..b654df03370 100644 --- a/resource-manager/compute/2022-03-03/galleryapplicationversions/version.go +++ b/resource-manager/compute/2022-03-03/galleryapplicationversions/version.go @@ -1,12 +1,10 @@ package galleryapplicationversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplicationversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplicationversions/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/galleryimages/README.md b/resource-manager/compute/2022-03-03/galleryimages/README.md index 915c0167863..994246afcb5 100644 --- a/resource-manager/compute/2022-03-03/galleryimages/README.md +++ b/resource-manager/compute/2022-03-03/galleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryimages` Documentation -The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `galleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/galleryimages/client.go b/resource-manager/compute/2022-03-03/galleryimages/client.go index 59b9c848dbd..cebddc1c307 100644 --- a/resource-manager/compute/2022-03-03/galleryimages/client.go +++ b/resource-manager/compute/2022-03-03/galleryimages/client.go @@ -15,7 +15,7 @@ type GalleryImagesClient struct { } func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/galleryimages/id_galleryimage.go b/resource-manager/compute/2022-03-03/galleryimages/id_galleryimage.go index 951c083ad3b..b6424b69480 100644 --- a/resource-manager/compute/2022-03-03/galleryimages/id_galleryimage.go +++ b/resource-manager/compute/2022-03-03/galleryimages/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryimages/method_get.go b/resource-manager/compute/2022-03-03/galleryimages/method_get.go index 5c642368aac..730b820ae30 100644 --- a/resource-manager/compute/2022-03-03/galleryimages/method_get.go +++ b/resource-manager/compute/2022-03-03/galleryimages/method_get.go @@ -45,7 +45,6 @@ func (c GalleryImagesClient) Get(ctx context.Context, id GalleryImageId) (result var model GalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/galleryimages/version.go b/resource-manager/compute/2022-03-03/galleryimages/version.go index 2eafb4c1271..6ca29c44294 100644 --- a/resource-manager/compute/2022-03-03/galleryimages/version.go +++ b/resource-manager/compute/2022-03-03/galleryimages/version.go @@ -1,12 +1,10 @@ package galleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimages/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/README.md b/resource-manager/compute/2022-03-03/galleryimageversions/README.md index 3c2142389ce..1db32314629 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/README.md +++ b/resource-manager/compute/2022-03-03/galleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/galleryimageversions` Documentation -The `galleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `galleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/client.go b/resource-manager/compute/2022-03-03/galleryimageversions/client.go index c8bf5a50ca7..6bf3f9b0ebb 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/client.go +++ b/resource-manager/compute/2022-03-03/galleryimageversions/client.go @@ -15,7 +15,7 @@ type GalleryImageVersionsClient struct { } func NewGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/id_galleryimage.go b/resource-manager/compute/2022-03-03/galleryimageversions/id_galleryimage.go index 282c39e643a..193631afe15 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/id_galleryimage.go +++ b/resource-manager/compute/2022-03-03/galleryimageversions/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/id_imageversion.go b/resource-manager/compute/2022-03-03/galleryimageversions/id_imageversion.go index 7f98ea65bd2..e59d4737939 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/id_imageversion.go +++ b/resource-manager/compute/2022-03-03/galleryimageversions/id_imageversion.go @@ -46,7 +46,7 @@ func ParseImageVersionID(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageVersionIDInsensitively(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/method_get.go b/resource-manager/compute/2022-03-03/galleryimageversions/method_get.go index 9638bdc304d..a018545b29f 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/method_get.go +++ b/resource-manager/compute/2022-03-03/galleryimageversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryImageVersionsClient) Get(ctx context.Context, id ImageVersionId, var model GalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/galleryimageversions/version.go b/resource-manager/compute/2022-03-03/galleryimageversions/version.go index 1a7f8e9a413..979089db567 100644 --- a/resource-manager/compute/2022-03-03/galleryimageversions/version.go +++ b/resource-manager/compute/2022-03-03/galleryimageversions/version.go @@ -1,12 +1,10 @@ package galleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimageversions/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/gallerysharingupdate/README.md b/resource-manager/compute/2022-03-03/gallerysharingupdate/README.md index 838eb33378b..36212d7e37c 100644 --- a/resource-manager/compute/2022-03-03/gallerysharingupdate/README.md +++ b/resource-manager/compute/2022-03-03/gallerysharingupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/gallerysharingupdate` Documentation -The `gallerysharingupdate` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `gallerysharingupdate` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/gallerysharingupdate/client.go b/resource-manager/compute/2022-03-03/gallerysharingupdate/client.go index 1fd6513f838..b293b189a85 100644 --- a/resource-manager/compute/2022-03-03/gallerysharingupdate/client.go +++ b/resource-manager/compute/2022-03-03/gallerysharingupdate/client.go @@ -15,7 +15,7 @@ type GallerySharingUpdateClient struct { } func NewGallerySharingUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*GallerySharingUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gallerysharingupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gallerysharingupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GallerySharingUpdateClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/gallerysharingupdate/version.go b/resource-manager/compute/2022-03-03/gallerysharingupdate/version.go index d122548a0eb..366818045f7 100644 --- a/resource-manager/compute/2022-03-03/gallerysharingupdate/version.go +++ b/resource-manager/compute/2022-03-03/gallerysharingupdate/version.go @@ -1,12 +1,10 @@ package gallerysharingupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gallerysharingupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gallerysharingupdate/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/README.md b/resource-manager/compute/2022-03-03/sharedgalleries/README.md index 775ec9b4b89..958a9bd6521 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/README.md +++ b/resource-manager/compute/2022-03-03/sharedgalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/sharedgalleries` Documentation -The `sharedgalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `sharedgalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/client.go b/resource-manager/compute/2022-03-03/sharedgalleries/client.go index d1ed6f27a92..d7365eacb97 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/client.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/client.go @@ -15,7 +15,7 @@ type SharedGalleriesClient struct { } func NewSharedGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/id_location.go b/resource-manager/compute/2022-03-03/sharedgalleries/id_location.go index ec03a95113f..d70722b4cd4 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/id_location.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/id_sharedgallery.go b/resource-manager/compute/2022-03-03/sharedgalleries/id_sharedgallery.go index 5dc28ef7840..98fe32a25f9 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/id_sharedgallery.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/method_get.go b/resource-manager/compute/2022-03-03/sharedgalleries/method_get.go index 155f6d68dce..571cb1bd810 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/method_get.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleriesClient) Get(ctx context.Context, id SharedGalleryId) (res var model PirSharedGalleryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/method_list.go b/resource-manager/compute/2022-03-03/sharedgalleries/method_list.go index e3949cf2c22..6483790ccc5 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/method_list.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-03/sharedgalleries/version.go b/resource-manager/compute/2022-03-03/sharedgalleries/version.go index b20acf59b35..523b7d848d4 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleries/version.go +++ b/resource-manager/compute/2022-03-03/sharedgalleries/version.go @@ -1,12 +1,10 @@ package sharedgalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleries/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/README.md b/resource-manager/compute/2022-03-03/sharedgalleryimages/README.md index d37498e24be..07f5086555c 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/README.md +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/sharedgalleryimages` Documentation -The `sharedgalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `sharedgalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/client.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/client.go index 2067896d391..4109d4b43bb 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/client.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/client.go @@ -15,7 +15,7 @@ type SharedGalleryImagesClient struct { } func NewSharedGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/id_image.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/id_image.go index aeabc8a0b34..bf1452d0f8e 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/id_image.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/id_sharedgallery.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/id_sharedgallery.go index d38b664da6f..31bbee97389 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/id_sharedgallery.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/method_get.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/method_get.go index b98cfcde3a2..4b49bfa2a28 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/method_get.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImagesClient) Get(ctx context.Context, id ImageId) (result var model SharedGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/method_list.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/method_list.go index 2ea5dd5b351..b0e073854fb 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/method_list.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimages/version.go b/resource-manager/compute/2022-03-03/sharedgalleryimages/version.go index b9704aaaa98..4794bd625a1 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimages/version.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimages/version.go @@ -1,12 +1,10 @@ package sharedgalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimages/2022-03-03" } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/README.md b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/README.md index 12751cc0415..9ea8c52cf5a 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/README.md +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-03/sharedgalleryimageversions` Documentation -The `sharedgalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2022-03-03`). +The `sharedgalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2022-03-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/client.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/client.go index bdc07e226c2..1537177d507 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/client.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/client.go @@ -15,7 +15,7 @@ type SharedGalleryImageVersionsClient struct { } func NewSharedGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_image.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_image.go index df91e878767..9e6d21126c4 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_image.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_version.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_version.go index 5c70f0b25f0..b446f65e116 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_version.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_get.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_get.go index 7c2d2e13d40..db662df97bd 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_get.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImageVersionsClient) Get(ctx context.Context, id VersionId) var model SharedGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_list.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_list.go index 71525072c3d..157a30105ad 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_list.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/version.go b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/version.go index 968da87f2d6..cb47a89abb5 100644 --- a/resource-manager/compute/2022-03-03/sharedgalleryimageversions/version.go +++ b/resource-manager/compute/2022-03-03/sharedgalleryimageversions/version.go @@ -1,12 +1,10 @@ package sharedgalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimageversions/2022-03-03" } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/README.md b/resource-manager/compute/2023-03-01/availabilitysets/README.md index 365eb2ad4c2..77476a871db 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/README.md +++ b/resource-manager/compute/2023-03-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/availabilitysets/client.go b/resource-manager/compute/2023-03-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/client.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/method_createorupdate.go b/resource-manager/compute/2023-03-01/availabilitysets/method_createorupdate.go index 886d801ae4a..0fd3b44fe2c 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/method_createorupdate.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, id commonids var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/method_get.go b/resource-manager/compute/2023-03-01/availabilitysets/method_get.go index 3c2eb94bfb2..5331c2457d7 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/method_get.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/method_get.go @@ -46,7 +46,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id commonids.Availabili var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/method_listavailablesizes.go b/resource-manager/compute/2023-03-01/availabilitysets/method_listavailablesizes.go index 2e2e96fa619..d47e9dec5a7 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/method_listavailablesizes.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, id commo var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/method_listbysubscription.go b/resource-manager/compute/2023-03-01/availabilitysets/method_listbysubscription.go index 6de26336e6c..44f1ba6844b 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/method_listbysubscription.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/method_update.go b/resource-manager/compute/2023-03-01/availabilitysets/method_update.go index 3784e4c8604..8eb2093ecd2 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/method_update.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/method_update.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) Update(ctx context.Context, id commonids.Availab var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/availabilitysets/version.go b/resource-manager/compute/2023-03-01/availabilitysets/version.go index a581696bd4a..6f777bba301 100644 --- a/resource-manager/compute/2023-03-01/availabilitysets/version.go +++ b/resource-manager/compute/2023-03-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/capacityreservation/README.md b/resource-manager/compute/2023-03-01/capacityreservation/README.md index 4d6c0dfbd7d..0ac6c3e6d96 100644 --- a/resource-manager/compute/2023-03-01/capacityreservation/README.md +++ b/resource-manager/compute/2023-03-01/capacityreservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/capacityreservation` Documentation -The `capacityreservation` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `capacityreservation` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/capacityreservation/client.go b/resource-manager/compute/2023-03-01/capacityreservation/client.go index 63b03839e60..8387846bbe8 100644 --- a/resource-manager/compute/2023-03-01/capacityreservation/client.go +++ b/resource-manager/compute/2023-03-01/capacityreservation/client.go @@ -15,7 +15,7 @@ type CapacityReservationClient struct { } func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/capacityreservation/id_capacityreservationgroup.go b/resource-manager/compute/2023-03-01/capacityreservation/id_capacityreservationgroup.go index 8493ff8f67f..8be7e83d119 100644 --- a/resource-manager/compute/2023-03-01/capacityreservation/id_capacityreservationgroup.go +++ b/resource-manager/compute/2023-03-01/capacityreservation/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/capacityreservation/version.go b/resource-manager/compute/2023-03-01/capacityreservation/version.go index 2a673906826..6b9bb662580 100644 --- a/resource-manager/compute/2023-03-01/capacityreservation/version.go +++ b/resource-manager/compute/2023-03-01/capacityreservation/version.go @@ -1,12 +1,10 @@ package capacityreservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservation/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/README.md b/resource-manager/compute/2023-03-01/capacityreservationgroups/README.md index f879e873185..bb6fae3a90d 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/README.md +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/capacityreservationgroups` Documentation -The `capacityreservationgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `capacityreservationgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/client.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/client.go index 15ced399cbc..088a08cf103 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/client.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/client.go @@ -15,7 +15,7 @@ type CapacityReservationGroupsClient struct { } func NewCapacityReservationGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservationgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservationgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/id_capacityreservationgroup.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/id_capacityreservationgroup.go index 92a9a9e1ae1..eee67dd9eed 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_createorupdate.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_createorupdate.go index 35050e649c5..b2779f3d9df 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_createorupdate.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, id var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_get.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_get.go index 3aa39e689af..40ec743fa1e 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_get.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationGroupsClient) Get(ctx context.Context, id CapacityRes var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbyresourcegroup.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbyresourcegroup.go index e3708c6a167..471bfa93e53 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbyresourcegroup.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbysubscription.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbysubscription.go index 810c49f03b4..5a37a32d4dd 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbysubscription.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_update.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_update.go index 904fe5ef0fe..0ab0ca706c1 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/method_update.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/method_update.go @@ -49,7 +49,6 @@ func (c CapacityReservationGroupsClient) Update(ctx context.Context, id Capacity var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/capacityreservationgroups/version.go b/resource-manager/compute/2023-03-01/capacityreservationgroups/version.go index 71a0745bd25..b5f2b55ad44 100644 --- a/resource-manager/compute/2023-03-01/capacityreservationgroups/version.go +++ b/resource-manager/compute/2023-03-01/capacityreservationgroups/version.go @@ -1,12 +1,10 @@ package capacityreservationgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservationgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservationgroups/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/capacityreservations/README.md b/resource-manager/compute/2023-03-01/capacityreservations/README.md index 7971336d91b..fcaf77cd968 100644 --- a/resource-manager/compute/2023-03-01/capacityreservations/README.md +++ b/resource-manager/compute/2023-03-01/capacityreservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/capacityreservations` Documentation -The `capacityreservations` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `capacityreservations` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/capacityreservations/client.go b/resource-manager/compute/2023-03-01/capacityreservations/client.go index 03bc68e43c5..46407a5fa33 100644 --- a/resource-manager/compute/2023-03-01/capacityreservations/client.go +++ b/resource-manager/compute/2023-03-01/capacityreservations/client.go @@ -15,7 +15,7 @@ type CapacityReservationsClient struct { } func NewCapacityReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/capacityreservations/id_capacityreservation.go b/resource-manager/compute/2023-03-01/capacityreservations/id_capacityreservation.go index 0f72f8f4a70..283c492d9c4 100644 --- a/resource-manager/compute/2023-03-01/capacityreservations/id_capacityreservation.go +++ b/resource-manager/compute/2023-03-01/capacityreservations/id_capacityreservation.go @@ -44,7 +44,7 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/capacityreservations/method_get.go b/resource-manager/compute/2023-03-01/capacityreservations/method_get.go index 745d18a7fc3..b9d6e655ff4 100644 --- a/resource-manager/compute/2023-03-01/capacityreservations/method_get.go +++ b/resource-manager/compute/2023-03-01/capacityreservations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationsClient) Get(ctx context.Context, id CapacityReservat var model CapacityReservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/capacityreservations/version.go b/resource-manager/compute/2023-03-01/capacityreservations/version.go index f868109236d..d8ebcb507eb 100644 --- a/resource-manager/compute/2023-03-01/capacityreservations/version.go +++ b/resource-manager/compute/2023-03-01/capacityreservations/version.go @@ -1,12 +1,10 @@ package capacityreservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservations/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/dedicatedhost/README.md b/resource-manager/compute/2023-03-01/dedicatedhost/README.md index bcaa9e5479e..d2398ce911f 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhost/README.md +++ b/resource-manager/compute/2023-03-01/dedicatedhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/dedicatedhost` Documentation -The `dedicatedhost` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `dedicatedhost` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/dedicatedhost/client.go b/resource-manager/compute/2023-03-01/dedicatedhost/client.go index b440c051d61..5c78f75da1d 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhost/client.go +++ b/resource-manager/compute/2023-03-01/dedicatedhost/client.go @@ -15,7 +15,7 @@ type DedicatedHostClient struct { } func NewDedicatedHostClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/dedicatedhost/method_listavailablesizes.go b/resource-manager/compute/2023-03-01/dedicatedhost/method_listavailablesizes.go index 1b928c5d629..b18a354564c 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhost/method_listavailablesizes.go +++ b/resource-manager/compute/2023-03-01/dedicatedhost/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c DedicatedHostClient) ListAvailableSizes(ctx context.Context, id commonid var model DedicatedHostSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/dedicatedhost/version.go b/resource-manager/compute/2023-03-01/dedicatedhost/version.go index d70f50f37d2..dc786f1de01 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhost/version.go +++ b/resource-manager/compute/2023-03-01/dedicatedhost/version.go @@ -1,12 +1,10 @@ package dedicatedhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhost/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/README.md b/resource-manager/compute/2023-03-01/dedicatedhostgroups/README.md index 5857c2765b4..ec1292d6c6e 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/README.md +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/dedicatedhostgroups` Documentation -The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `dedicatedhostgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/client.go b/resource-manager/compute/2023-03-01/dedicatedhostgroups/client.go index e3ac7c014b1..1198b817462 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/client.go +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/client.go @@ -15,7 +15,7 @@ type DedicatedHostGroupsClient struct { } func NewDedicatedHostGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_createorupdate.go b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_createorupdate.go index 7696a362908..4b26099152d 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_createorupdate.go +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id common var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_get.go b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_get.go index 7c5f6eba0af..8d31b580668 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_get.go +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostGroupsClient) Get(ctx context.Context, id commonids.Dedicat var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_update.go b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_update.go index 518f4006b01..0bb7d2873f7 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_update.go +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/method_update.go @@ -50,7 +50,6 @@ func (c DedicatedHostGroupsClient) Update(ctx context.Context, id commonids.Dedi var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/dedicatedhostgroups/version.go b/resource-manager/compute/2023-03-01/dedicatedhostgroups/version.go index f57225e417a..fd1d04eeb21 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhostgroups/version.go +++ b/resource-manager/compute/2023-03-01/dedicatedhostgroups/version.go @@ -1,12 +1,10 @@ package dedicatedhostgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhostgroups/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/dedicatedhosts/README.md b/resource-manager/compute/2023-03-01/dedicatedhosts/README.md index e9408e2a70c..c47f1237fdb 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhosts/README.md +++ b/resource-manager/compute/2023-03-01/dedicatedhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/dedicatedhosts` Documentation -The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `dedicatedhosts` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/dedicatedhosts/client.go b/resource-manager/compute/2023-03-01/dedicatedhosts/client.go index 0b646338795..1f5bf6278f7 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhosts/client.go +++ b/resource-manager/compute/2023-03-01/dedicatedhosts/client.go @@ -15,7 +15,7 @@ type DedicatedHostsClient struct { } func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/dedicatedhosts/method_get.go b/resource-manager/compute/2023-03-01/dedicatedhosts/method_get.go index 63e85f0ce8b..ae7a03232ad 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhosts/method_get.go +++ b/resource-manager/compute/2023-03-01/dedicatedhosts/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostsClient) Get(ctx context.Context, id commonids.DedicatedHos var model DedicatedHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/dedicatedhosts/version.go b/resource-manager/compute/2023-03-01/dedicatedhosts/version.go index 12eb50fc476..baab04f7a25 100644 --- a/resource-manager/compute/2023-03-01/dedicatedhosts/version.go +++ b/resource-manager/compute/2023-03-01/dedicatedhosts/version.go @@ -1,12 +1,10 @@ package dedicatedhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhosts/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/images/README.md b/resource-manager/compute/2023-03-01/images/README.md index 8f74942b4d9..2287aec0f23 100644 --- a/resource-manager/compute/2023-03-01/images/README.md +++ b/resource-manager/compute/2023-03-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `images` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/images/client.go b/resource-manager/compute/2023-03-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/compute/2023-03-01/images/client.go +++ b/resource-manager/compute/2023-03-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/images/id_image.go b/resource-manager/compute/2023-03-01/images/id_image.go index 8f3964a77c7..c258a9aca61 100644 --- a/resource-manager/compute/2023-03-01/images/id_image.go +++ b/resource-manager/compute/2023-03-01/images/id_image.go @@ -42,7 +42,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/images/method_get.go b/resource-manager/compute/2023-03-01/images/method_get.go index 73320770a28..e68f9e933bb 100644 --- a/resource-manager/compute/2023-03-01/images/method_get.go +++ b/resource-manager/compute/2023-03-01/images/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId, options GetOperationO var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/images/version.go b/resource-manager/compute/2023-03-01/images/version.go index 0d31213acc8..4f3d23a6381 100644 --- a/resource-manager/compute/2023-03-01/images/version.go +++ b/resource-manager/compute/2023-03-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/loganalytics/README.md b/resource-manager/compute/2023-03-01/loganalytics/README.md index 1aeef7cdeed..c76dd4ce0a8 100644 --- a/resource-manager/compute/2023-03-01/loganalytics/README.md +++ b/resource-manager/compute/2023-03-01/loganalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/loganalytics` Documentation -The `loganalytics` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `loganalytics` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/loganalytics/client.go b/resource-manager/compute/2023-03-01/loganalytics/client.go index 5053f2ddae1..b32a74cf728 100644 --- a/resource-manager/compute/2023-03-01/loganalytics/client.go +++ b/resource-manager/compute/2023-03-01/loganalytics/client.go @@ -15,7 +15,7 @@ type LogAnalyticsClient struct { } func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loganalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/loganalytics/id_location.go b/resource-manager/compute/2023-03-01/loganalytics/id_location.go index 63d3f560403..cf24cee10e3 100644 --- a/resource-manager/compute/2023-03-01/loganalytics/id_location.go +++ b/resource-manager/compute/2023-03-01/loganalytics/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/loganalytics/version.go b/resource-manager/compute/2023-03-01/loganalytics/version.go index f1d3e5279ee..5fc3ecbae86 100644 --- a/resource-manager/compute/2023-03-01/loganalytics/version.go +++ b/resource-manager/compute/2023-03-01/loganalytics/version.go @@ -1,12 +1,10 @@ package loganalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loganalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loganalytics/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/README.md b/resource-manager/compute/2023-03-01/proximityplacementgroups/README.md index 7676a64182a..795d37d1166 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/README.md +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/proximityplacementgroups` Documentation -The `proximityplacementgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `proximityplacementgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/client.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/client.go index 2b737bf0f86..1a6cf3adbc3 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/client.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/client.go @@ -15,7 +15,7 @@ type ProximityPlacementGroupsClient struct { } func NewProximityPlacementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProximityPlacementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proximityplacementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proximityplacementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProximityPlacementGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/id_proximityplacementgroup.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/id_proximityplacementgroup.go index 0c0c7a01d30..0ba2b2d5fa9 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -42,7 +42,7 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_createorupdate.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_createorupdate.go index ec5dbe0e33f..b52985d0f6c 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_createorupdate.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, id P var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_get.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_get.go index 3e2a44fe371..9319acd4f9b 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_get.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProximityPlacementGroupsClient) Get(ctx context.Context, id ProximityPla var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_update.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_update.go index 2e1e1e45fc6..dd8d1e3003a 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/method_update.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/method_update.go @@ -49,7 +49,6 @@ func (c ProximityPlacementGroupsClient) Update(ctx context.Context, id Proximity var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/proximityplacementgroups/version.go b/resource-manager/compute/2023-03-01/proximityplacementgroups/version.go index 9b420c4404b..02bc27c99f2 100644 --- a/resource-manager/compute/2023-03-01/proximityplacementgroups/version.go +++ b/resource-manager/compute/2023-03-01/proximityplacementgroups/version.go @@ -1,12 +1,10 @@ package proximityplacementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proximityplacementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proximityplacementgroups/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/README.md b/resource-manager/compute/2023-03-01/restorepointcollections/README.md index 57394072e18..a6a801d7c06 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/README.md +++ b/resource-manager/compute/2023-03-01/restorepointcollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/restorepointcollections` Documentation -The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `restorepointcollections` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/client.go b/resource-manager/compute/2023-03-01/restorepointcollections/client.go index 816bae4a346..543d327725d 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/client.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/client.go @@ -15,7 +15,7 @@ type RestorePointCollectionsClient struct { } func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepointcollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/id_restorepointcollection.go b/resource-manager/compute/2023-03-01/restorepointcollections/id_restorepointcollection.go index 5ae5a219829..f10116745d8 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/id_restorepointcollection.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/id_restorepointcollection.go @@ -42,7 +42,7 @@ func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, err } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointColl } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/method_createorupdate.go b/resource-manager/compute/2023-03-01/restorepointcollections/method_createorupdate.go index 6837427e5be..7e9dac346e3 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/method_createorupdate.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id Re var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/method_get.go b/resource-manager/compute/2023-03-01/restorepointcollections/method_get.go index 875f286c7fa..636041d46c6 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/method_get.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointC var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/method_update.go b/resource-manager/compute/2023-03-01/restorepointcollections/method_update.go index 209e763e72d..3aa41ed97ea 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/method_update.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/method_update.go @@ -49,7 +49,6 @@ func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePoi var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/restorepointcollections/version.go b/resource-manager/compute/2023-03-01/restorepointcollections/version.go index 5419d012738..c89f97186b2 100644 --- a/resource-manager/compute/2023-03-01/restorepointcollections/version.go +++ b/resource-manager/compute/2023-03-01/restorepointcollections/version.go @@ -1,12 +1,10 @@ package restorepointcollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepointcollections/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/restorepoints/README.md b/resource-manager/compute/2023-03-01/restorepoints/README.md index cda7111170c..51fd22005a3 100644 --- a/resource-manager/compute/2023-03-01/restorepoints/README.md +++ b/resource-manager/compute/2023-03-01/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/restorepoints/client.go b/resource-manager/compute/2023-03-01/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/compute/2023-03-01/restorepoints/client.go +++ b/resource-manager/compute/2023-03-01/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/restorepoints/id_restorepoint.go b/resource-manager/compute/2023-03-01/restorepoints/id_restorepoint.go index 5ffe0e1d42b..853e2a1b58d 100644 --- a/resource-manager/compute/2023-03-01/restorepoints/id_restorepoint.go +++ b/resource-manager/compute/2023-03-01/restorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/restorepoints/method_get.go b/resource-manager/compute/2023-03-01/restorepoints/method_get.go index 1fb0a01b3f8..ccf229525cb 100644 --- a/resource-manager/compute/2023-03-01/restorepoints/method_get.go +++ b/resource-manager/compute/2023-03-01/restorepoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId, options var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/restorepoints/version.go b/resource-manager/compute/2023-03-01/restorepoints/version.go index 85a0cba59c3..31293bd408b 100644 --- a/resource-manager/compute/2023-03-01/restorepoints/version.go +++ b/resource-manager/compute/2023-03-01/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/README.md b/resource-manager/compute/2023-03-01/sshpublickeys/README.md index 8e2e6daecce..f8920c96222 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/README.md +++ b/resource-manager/compute/2023-03-01/sshpublickeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/sshpublickeys` Documentation -The `sshpublickeys` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `sshpublickeys` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/client.go b/resource-manager/compute/2023-03-01/sshpublickeys/client.go index 60a955db2ea..b1945fe3975 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/client.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/client.go @@ -15,7 +15,7 @@ type SshPublicKeysClient struct { } func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sshpublickeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sshpublickeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SshPublicKeysClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/id_sshpublickey.go b/resource-manager/compute/2023-03-01/sshpublickeys/id_sshpublickey.go index 013618b26f3..4f003a63452 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/id_sshpublickey.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/id_sshpublickey.go @@ -42,7 +42,7 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/method_create.go b/resource-manager/compute/2023-03-01/sshpublickeys/method_create.go index 391f084ac1d..d348c2924e1 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/method_create.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/method_create.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/method_generatekeypair.go b/resource-manager/compute/2023-03-01/sshpublickeys/method_generatekeypair.go index 0793e94f13b..cf52f7b6fae 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/method_generatekeypair.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/method_generatekeypair.go @@ -46,7 +46,6 @@ func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKe var model SshPublicKeyGenerateKeyPairResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/method_get.go b/resource-manager/compute/2023-03-01/sshpublickeys/method_get.go index 3420ec987c9..dc1c3cbdb02 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/method_get.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/method_get.go @@ -45,7 +45,6 @@ func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/method_update.go b/resource-manager/compute/2023-03-01/sshpublickeys/method_update.go index d697813a6ed..da0970a3389 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/method_update.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/method_update.go @@ -49,7 +49,6 @@ func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/sshpublickeys/version.go b/resource-manager/compute/2023-03-01/sshpublickeys/version.go index fe4f458fabb..125099acc03 100644 --- a/resource-manager/compute/2023-03-01/sshpublickeys/version.go +++ b/resource-manager/compute/2023-03-01/sshpublickeys/version.go @@ -1,12 +1,10 @@ package sshpublickeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sshpublickeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sshpublickeys/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/README.md b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/README.md index 848d828d2e7..14e40147857 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachineextensionimages` Documentation -The `virtualmachineextensionimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachineextensionimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/client.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/client.go index baa2d351929..4385ff41033 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionImagesClient struct { } func NewVirtualMachineExtensionImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_publisher.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_publisher.go index bb19fd74520..88f97b7a6eb 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_publisher.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_type.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_type.go index 9cf3c59da23..bf518ba8702 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_type.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_type.go @@ -44,7 +44,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_version.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_version.go index a0e8803b4a0..1ee10989db9 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_version.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_get.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_get.go index b8722c5e7f4..728c7b2ba56 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineExtensionImagesClient) Get(ctx context.Context, id Version var model VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listtypes.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listtypes.go index 706c54f8ec4..b9f09407bc0 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listtypes.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listtypes.go @@ -46,7 +46,6 @@ func (c VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, id P var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listversions.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listversions.go index ad463b163fd..2cedae68952 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listversions.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/method_listversions.go @@ -36,6 +36,7 @@ func (o ListVersionsOperationOptions) ToHeaders() *client.Headers { func (o ListVersionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, i var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/version.go b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/version.go index 076acd7b3c9..d9cb2e90396 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensionimages/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensionimages/version.go @@ -1,12 +1,10 @@ package virtualmachineextensionimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensionimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensionimages/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/README.md b/resource-manager/compute/2023-03-01/virtualmachineextensions/README.md index c061453dd15..3771dcc00df 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachineextensions` Documentation -The `virtualmachineextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachineextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/client.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/client.go index 4adf20a248c..c049fb742ed 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionsClient struct { } func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/id_extension.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/id_extension.go index b9ae480741d..19a447ebbbe 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/id_extension.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/id_virtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/id_virtualmachine.go index 50052e6b019..34532cbd2a4 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/id_virtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/method_get.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/method_get.go index 767c337cafb..081bdecb6ff 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) Get(ctx context.Context, id ExtensionId, var model VirtualMachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/method_list.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/method_list.go index b5541f85116..b495c3fa1d5 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) List(ctx context.Context, id VirtualMach var model VirtualMachineExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineextensions/version.go b/resource-manager/compute/2023-03-01/virtualmachineextensions/version.go index f5b62a778f7..daf0dc04c08 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineextensions/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachineextensions/version.go @@ -1,12 +1,10 @@ package virtualmachineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensions/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/README.md b/resource-manager/compute/2023-03-01/virtualmachineimages/README.md index c9417c23298..7bfbe8623ca 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachineimages` Documentation -The `virtualmachineimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachineimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/client.go b/resource-manager/compute/2023-03-01/virtualmachineimages/client.go index 3d9912359f8..05c5fd93d49 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineImagesClient struct { } func NewVirtualMachineImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezone.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezone.go index 689e0be7e56..770692e1f01 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezone.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezone.go @@ -42,7 +42,7 @@ func ParseEdgeZoneID(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEdgeZoneIDInsensitively(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezonepublisher.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezonepublisher.go index 3838d08d8b8..ef3334834d7 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezonepublisher.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_edgezonepublisher.go @@ -44,7 +44,7 @@ func ParseEdgeZonePublisherID(input string) (*EdgeZonePublisherId, error) { } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeZonePublisherIDInsensitively(input string) (*EdgeZonePublisherId, } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_location.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_location.go index 21b22ae9152..aa0bd6f123c 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_location.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offer.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offer.go index 40367d1e7b5..821104312e6 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offer.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offer.go @@ -44,7 +44,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offersku.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offersku.go index 91e4a168703..08bca98cb86 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offersku.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offersku.go @@ -48,7 +48,7 @@ func ParseOfferSkuID(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOfferSkuIDInsensitively(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offerskuversion.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offerskuversion.go index dae6d7f61be..4b04850b2ae 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_offerskuversion.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_offerskuversion.go @@ -50,7 +50,7 @@ func ParseOfferSkuVersionID(input string) (*OfferSkuVersionId, error) { } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseOfferSkuVersionIDInsensitively(input string) (*OfferSkuVersionId, erro } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_publisher.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_publisher.go index 509220be144..785d3f177f0 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_publisher.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_sku.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_sku.go index 935057743f6..34fde30278a 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_sku.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_sku.go @@ -46,7 +46,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_skuversion.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_skuversion.go index 2e5d0e9a79c..0172c3e1a70 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_skuversion.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_skuversion.go @@ -48,7 +48,7 @@ func ParseSkuVersionID(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuVersionIDInsensitively(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/id_vmimageoffer.go b/resource-manager/compute/2023-03-01/virtualmachineimages/id_vmimageoffer.go index 22411c949d8..99ef25c09c5 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/id_vmimageoffer.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/id_vmimageoffer.go @@ -46,7 +46,7 @@ func ParseVMImageOfferID(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVMImageOfferIDInsensitively(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezoneget.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezoneget.go index d08e473ae5f..aae2bc8618d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezoneget.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezoneget.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) EdgeZoneGet(ctx context.Context, id OfferSku var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelist.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelist.go index ba17ca15382..70e0120daa1 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelist.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelist.go @@ -36,6 +36,7 @@ func (o EdgeZoneListOperationOptions) ToHeaders() *client.Headers { func (o EdgeZoneListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) EdgeZoneList(ctx context.Context, id OfferSk var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistoffers.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistoffers.go index af3bb42c4ba..26cde80c448 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistoffers.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListOffers(ctx context.Context, id E var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistpublishers.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistpublishers.go index 9aadf470f3b..2ed9f07750a 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistpublishers.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListPublishers(ctx context.Context, var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistskus.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistskus.go index 42a5ccfc0ae..62b0005efdd 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistskus.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_edgezonelistskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListSkus(ctx context.Context, id VMI var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_get.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_get.go index 3be37d5f899..d9357bbb7dc 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) Get(ctx context.Context, id SkuVersionId) (r var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_list.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_list.go index 2989d0c443a..2d6df70703d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) List(ctx context.Context, id SkuId, options var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listoffers.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listoffers.go index edba237d0ec..b44d982eaaf 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listoffers.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListOffers(ctx context.Context, id Publisher var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listpublishers.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listpublishers.go index 0ff57ba69ee..0251298dfe5 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listpublishers.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListPublishers(ctx context.Context, id Locat var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listskus.go b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listskus.go index 2613d661514..1a3ee479650 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/method_listskus.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/method_listskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListSkus(ctx context.Context, id OfferId) (r var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineimages/version.go b/resource-manager/compute/2023-03-01/virtualmachineimages/version.go index 259da7df815..a4274d9029c 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineimages/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachineimages/version.go @@ -1,12 +1,10 @@ package virtualmachineimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineimages/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/README.md b/resource-manager/compute/2023-03-01/virtualmachineruncommands/README.md index 84d5e4aaca1..bed795043ac 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachineruncommands` Documentation -The `virtualmachineruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachineruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/client.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/client.go index ee453cd014c..48e134abb29 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineRunCommandsClient struct { } func NewVirtualMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_location.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_location.go index dfd7f350471..e553ed3913e 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_location.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_runcommand.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_runcommand.go index e2bd6f0a575..61f472d53e2 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_runcommand.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_runcommand.go @@ -42,7 +42,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachine.go index 8d098c85c3b..df64bb47d41 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go index 1c90363b725..8b3914c8d71 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go @@ -44,7 +44,7 @@ func ParseVirtualMachineRunCommandID(input string) (*VirtualMachineRunCommandId, } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachine } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_get.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_get.go index 83355bdb92b..465ea8330ad 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineRunCommandsClient) Get(ctx context.Context, id RunCommandI var model RunCommandDocument result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go index c06971e26be..f603e128c0c 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go @@ -34,6 +34,7 @@ func (o GetByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o GetByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go index d3cf5c6296b..739e09cd17f 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go @@ -39,6 +39,7 @@ func (o ListByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachineruncommands/version.go b/resource-manager/compute/2023-03-01/virtualmachineruncommands/version.go index d3edc4e602f..e568cdeff8b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachineruncommands/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachineruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineruncommands/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/README.md b/resource-manager/compute/2023-03-01/virtualmachines/README.md index e676b46b906..d8d4543021d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachines/client.go b/resource-manager/compute/2023-03-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/id_location.go b/resource-manager/compute/2023-03-01/virtualmachines/id_location.go index 59cc8439152..4a5c1e51c52 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/id_location.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/id_virtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachines/id_virtualmachine.go index 0a676811b3a..9f10e69b236 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_deallocate.go b/resource-manager/compute/2023-03-01/virtualmachines/method_deallocate.go index ae7ee7a0d2b..c962480de36 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_deallocate.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_delete.go b/resource-manager/compute/2023-03-01/virtualmachines/method_delete.go index 7809910a33a..e2d145391fa 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_delete.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_get.go b/resource-manager/compute/2023-03-01/virtualmachines/method_get.go index ca0e72e7b04..610b8728f94 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_instanceview.go b/resource-manager/compute/2023-03-01/virtualmachines/method_instanceview.go index 629b0f65267..735f254f665 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_instanceview.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_instanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) InstanceView(ctx context.Context, id VirtualMachi var model VirtualMachineInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_list.go b/resource-manager/compute/2023-03-01/virtualmachines/method_list.go index 824fde5beb2..64092df3b3a 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_listall.go b/resource-manager/compute/2023-03-01/virtualmachines/method_listall.go index 30caaba2f04..c5abe6abb74 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_listall.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_listall.go @@ -42,6 +42,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_listavailablesizes.go b/resource-manager/compute/2023-03-01/virtualmachines/method_listavailablesizes.go index ade9d529c86..f4ad290ed8b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_listavailablesizes.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_listavailablesizes.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListAvailableSizes(ctx context.Context, id Virtua var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_poweroff.go b/resource-manager/compute/2023-03-01/virtualmachines/method_poweroff.go index cd9da953583..f5c1b75d289 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_poweroff.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2023-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go index ef782af5c0a..cf8035af464 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachines/version.go b/resource-manager/compute/2023-03-01/virtualmachines/version.go index 0c70d647ac6..0a1b876ca37 100644 --- a/resource-manager/compute/2023-03-01/virtualmachines/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/README.md index c0806c95157..c8389303fdc 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions` Documentation -The `virtualmachinescalesetextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesetextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/client.go index 9555c0add8c..8b2f0aa3f61 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetExtensionsClient struct { } func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go index e52fb99c34f..221bbe81a25 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go index eaeca4e6677..c08756824e1 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetExtensionID(input string) (*VirtualMachineScaleS } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetExtensionIDInsensitively(input string) (*Virtual } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/method_get.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/method_get.go index 805e9846e65..58bd9a83728 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, id Virt var model VirtualMachineScaleSetExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/version.go index 8a3390d9eef..4827243b50b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetextensions/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/README.md index 8146235288e..b98e92f2f73 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades` Documentation -The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/client.go index fb39e655c93..2bc32c3839f 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { } func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetRollingUpgradesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go index 73ab65cf8ad..c778cdb85f7 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go index e9dda93541e..647dbb00e17 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Conte var model RollingUpgradeStatusInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/version.go index 3485fde0e10..8488edd8dd9 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetrollingupgrades/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetrollingupgrades -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesets/README.md index f67edaf9d8c..32c9da01f2c 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesets` Documentation -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/client.go index a08ba8c1d81..0548a7aec67 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetsClient struct { } func NewVirtualMachineScaleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_location.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_location.go index a674916111d..65c5f49041d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_location.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go index d4542bba1b5..76fb35088a6 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deallocate.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deallocate.go index 45110630048..1965e606c51 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deallocate.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_delete.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_delete.go index 154aacdb1ce..40c53c88532 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_delete.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deleteinstances.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deleteinstances.go index 375063255ba..ae1057f79fa 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deleteinstances.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_deleteinstances.go @@ -36,6 +36,7 @@ func (o DeleteInstancesOperationOptions) ToHeaders() *client.Headers { func (o DeleteInstancesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go index 9e2117d6a63..a49b926c058 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go @@ -36,6 +36,7 @@ func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToHe func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateD var model RecoveryWalkResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_get.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_get.go index 1a1c806d33a..4ade8c757e1 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineScaleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_getinstanceview.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_getinstanceview.go index b79b350b676..4e409bb9b3b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_getinstanceview.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, id V var model VirtualMachineScaleSetInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_poweroff.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_poweroff.go index 3b0e524f55b..0b805fc3b55 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_poweroff.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesets/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesets/version.go index 6b001e611fd..1406b419695 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesets/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesets/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesets/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/README.md index 156e140e412..93605736253 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions` Documentation -The `virtualmachinescalesetvmextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesetvmextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/client.go index ee3be0e3e80..384674618ef 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { } func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go index 5bed9de5aa5..031846e1de7 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go @@ -46,7 +46,7 @@ func ParseVirtualMachineExtensionID(input string) (*VirtualMachineExtensionId, e } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineExtensionIDInsensitively(input string) (*VirtualMachineE } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go index 00ba634a6da..461b5781ea3 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_get.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_get.go index 734208e2c2b..03923b1ef4d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, id Vi var model VirtualMachineScaleSetVMExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_list.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_list.go index d9cdfbdcc60..300d802904c 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, id V var model VirtualMachineScaleSetVMExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/version.go index 2af6458bef5..ae5c6c93145 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/README.md index 2a10d0f6070..e7b137c9046 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands` Documentation -The `virtualmachinescalesetvmruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesetvmruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/client.go index 65dba565153..fb8224b7dda 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { } func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go index 4342ff0b57d..48139ac644b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go index e229cb64fb0..98f6dff8b2b 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*Virtu } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input st } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_get.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_get.go index 35fe308862d..7504f816267 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, id V var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_list.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_list.go index d335e2247cf..14ad4b942ca 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/version.go index 4a74481acc8..600fc1c2203 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvmruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/README.md b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/README.md index 3bf99c56dc8..b01720dcf89 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinescalesetvms` Documentation -The `virtualmachinescalesetvms` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinescalesetvms` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/client.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/client.go index d86b351fd86..61a216f26bf 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMsClient struct { } func NewVirtualMachineScaleSetVMsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMsClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go index 83349156568..50f34af693e 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go index 5e77406f79c..fa37f879ec7 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_delete.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_delete.go index 70ab6260f49..2c4fdb5bb39 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_delete.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_get.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_get.go index 54f1a9f63ea..48056f0eab3 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_get.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) Get(ctx context.Context, id VirtualMach var model VirtualMachineScaleSetVM result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_getinstanceview.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_getinstanceview.go index 67764259f28..d2e27a1295d 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_getinstanceview.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, id var model VirtualMachineScaleSetVMInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_list.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_list.go index 25828909629..bb09ed5d71a 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_poweroff.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_poweroff.go index 1b450b80bfa..cbe987a9165 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_poweroff.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go index 29eb32435dd..a93248b3042 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/version.go b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/version.go index a438b7a5459..82dd9d81566 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinescalesetvms/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvms/2023-03-01" } diff --git a/resource-manager/compute/2023-03-01/virtualmachinesizes/README.md b/resource-manager/compute/2023-03-01/virtualmachinesizes/README.md index 142045daec1..f073b263438 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinesizes/README.md +++ b/resource-manager/compute/2023-03-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-03-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-03-01/virtualmachinesizes/client.go b/resource-manager/compute/2023-03-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinesizes/client.go +++ b/resource-manager/compute/2023-03-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/compute/2023-03-01/virtualmachinesizes/id_location.go b/resource-manager/compute/2023-03-01/virtualmachinesizes/id_location.go index 9cb3012f4e4..b5a6dbf59ef 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinesizes/id_location.go +++ b/resource-manager/compute/2023-03-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-03-01/virtualmachinesizes/method_list.go b/resource-manager/compute/2023-03-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinesizes/method_list.go +++ b/resource-manager/compute/2023-03-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-03-01/virtualmachinesizes/version.go b/resource-manager/compute/2023-03-01/virtualmachinesizes/version.go index 6181062d17f..117072a963e 100644 --- a/resource-manager/compute/2023-03-01/virtualmachinesizes/version.go +++ b/resource-manager/compute/2023-03-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2023-03-01" } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/README.md b/resource-manager/compute/2023-04-02/diskaccesses/README.md index e357180fed8..34b5b5cffea 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/README.md +++ b/resource-manager/compute/2023-04-02/diskaccesses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/diskaccesses` Documentation -The `diskaccesses` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-04-02`). +The `diskaccesses` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-04-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-04-02/diskaccesses/client.go b/resource-manager/compute/2023-04-02/diskaccesses/client.go index 5f54514c997..cda295ab038 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/client.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/client.go @@ -15,7 +15,7 @@ type DiskAccessesClient struct { } func NewDiskAccessesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskAccessesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskaccesses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskaccesses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskAccessesClient: %+v", err) } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/id_diskaccess.go b/resource-manager/compute/2023-04-02/diskaccesses/id_diskaccess.go index 16e931edbe0..9d04268e700 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/id_diskaccess.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/id_diskaccess.go @@ -42,7 +42,7 @@ func ParseDiskAccessID(input string) (*DiskAccessId, error) { } id := DiskAccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDiskAccessIDInsensitively(input string) (*DiskAccessId, error) { } id := DiskAccessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/id_privateendpointconnection.go b/resource-manager/compute/2023-04-02/diskaccesses/id_privateendpointconnection.go index 8ee9e9ce467..fe09ecc5568 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/id_privateendpointconnection.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/method_get.go b/resource-manager/compute/2023-04-02/diskaccesses/method_get.go index 43095965756..601add75a17 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/method_get.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/method_get.go @@ -45,7 +45,6 @@ func (c DiskAccessesClient) Get(ctx context.Context, id DiskAccessId) (result Ge var model DiskAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/method_getaprivateendpointconnection.go b/resource-manager/compute/2023-04-02/diskaccesses/method_getaprivateendpointconnection.go index a0494a9e434..8ae0f646ec2 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/method_getaprivateendpointconnection.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/method_getaprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, i var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/method_getprivatelinkresources.go b/resource-manager/compute/2023-04-02/diskaccesses/method_getprivatelinkresources.go index 5f5fcd21509..9af74e8677f 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/method_getprivatelinkresources.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/method_getprivatelinkresources.go @@ -46,7 +46,6 @@ func (c DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, id Disk var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/diskaccesses/version.go b/resource-manager/compute/2023-04-02/diskaccesses/version.go index 03c89e4cf93..0523545ec92 100644 --- a/resource-manager/compute/2023-04-02/diskaccesses/version.go +++ b/resource-manager/compute/2023-04-02/diskaccesses/version.go @@ -1,12 +1,10 @@ package diskaccesses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskaccesses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskaccesses/2023-04-02" } diff --git a/resource-manager/compute/2023-04-02/diskencryptionsets/README.md b/resource-manager/compute/2023-04-02/diskencryptionsets/README.md index 0e56295ad90..0b361999c7f 100644 --- a/resource-manager/compute/2023-04-02/diskencryptionsets/README.md +++ b/resource-manager/compute/2023-04-02/diskencryptionsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/diskencryptionsets` Documentation -The `diskencryptionsets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-04-02`). +The `diskencryptionsets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-04-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-04-02/diskencryptionsets/client.go b/resource-manager/compute/2023-04-02/diskencryptionsets/client.go index cd5615541d1..c5deb5876d7 100644 --- a/resource-manager/compute/2023-04-02/diskencryptionsets/client.go +++ b/resource-manager/compute/2023-04-02/diskencryptionsets/client.go @@ -15,7 +15,7 @@ type DiskEncryptionSetsClient struct { } func NewDiskEncryptionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskEncryptionSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskencryptionsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskencryptionsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskEncryptionSetsClient: %+v", err) } diff --git a/resource-manager/compute/2023-04-02/diskencryptionsets/method_get.go b/resource-manager/compute/2023-04-02/diskencryptionsets/method_get.go index 47f9c08835d..441ab4200e0 100644 --- a/resource-manager/compute/2023-04-02/diskencryptionsets/method_get.go +++ b/resource-manager/compute/2023-04-02/diskencryptionsets/method_get.go @@ -46,7 +46,6 @@ func (c DiskEncryptionSetsClient) Get(ctx context.Context, id commonids.DiskEncr var model DiskEncryptionSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/diskencryptionsets/version.go b/resource-manager/compute/2023-04-02/diskencryptionsets/version.go index d90950a5e8c..4cbc848f6dd 100644 --- a/resource-manager/compute/2023-04-02/diskencryptionsets/version.go +++ b/resource-manager/compute/2023-04-02/diskencryptionsets/version.go @@ -1,12 +1,10 @@ package diskencryptionsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskencryptionsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskencryptionsets/2023-04-02" } diff --git a/resource-manager/compute/2023-04-02/disks/README.md b/resource-manager/compute/2023-04-02/disks/README.md index 0e2b9a7ef18..ec7020d7fa1 100644 --- a/resource-manager/compute/2023-04-02/disks/README.md +++ b/resource-manager/compute/2023-04-02/disks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/disks` Documentation -The `disks` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-04-02`). +The `disks` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-04-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-04-02/disks/client.go b/resource-manager/compute/2023-04-02/disks/client.go index 16f70b8378d..e5accbb35a3 100644 --- a/resource-manager/compute/2023-04-02/disks/client.go +++ b/resource-manager/compute/2023-04-02/disks/client.go @@ -15,7 +15,7 @@ type DisksClient struct { } func NewDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*DisksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisksClient: %+v", err) } diff --git a/resource-manager/compute/2023-04-02/disks/method_get.go b/resource-manager/compute/2023-04-02/disks/method_get.go index 699a246fb99..6aee9076755 100644 --- a/resource-manager/compute/2023-04-02/disks/method_get.go +++ b/resource-manager/compute/2023-04-02/disks/method_get.go @@ -46,7 +46,6 @@ func (c DisksClient) Get(ctx context.Context, id commonids.ManagedDiskId) (resul var model Disk result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/disks/version.go b/resource-manager/compute/2023-04-02/disks/version.go index f678fc2f352..cfa434a98f0 100644 --- a/resource-manager/compute/2023-04-02/disks/version.go +++ b/resource-manager/compute/2023-04-02/disks/version.go @@ -1,12 +1,10 @@ package disks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disks/2023-04-02" } diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/README.md b/resource-manager/compute/2023-04-02/incrementalrestorepoints/README.md index e773c362bc3..761c37039b4 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/README.md +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/incrementalrestorepoints` Documentation -The `incrementalrestorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-04-02`). +The `incrementalrestorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-04-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/client.go b/resource-manager/compute/2023-04-02/incrementalrestorepoints/client.go index f724721258e..5935094edf6 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/client.go +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/client.go @@ -15,7 +15,7 @@ type IncrementalRestorePointsClient struct { } func NewIncrementalRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncrementalRestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incrementalrestorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incrementalrestorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncrementalRestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_diskrestorepoint.go b/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_diskrestorepoint.go index 6029cfdd6a0..7fc32894338 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_diskrestorepoint.go +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_diskrestorepoint.go @@ -46,7 +46,7 @@ func ParseDiskRestorePointID(input string) (*DiskRestorePointId, error) { } id := DiskRestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiskRestorePointIDInsensitively(input string) (*DiskRestorePointId, er } id := DiskRestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_restorepoint.go b/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_restorepoint.go index 1171514e9db..08b6361bd7a 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_restorepoint.go +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/method_diskrestorepointget.go b/resource-manager/compute/2023-04-02/incrementalrestorepoints/method_diskrestorepointget.go index 9f7de1fa66f..d45ccd720f1 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/method_diskrestorepointget.go +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/method_diskrestorepointget.go @@ -45,7 +45,6 @@ func (c IncrementalRestorePointsClient) DiskRestorePointGet(ctx context.Context, var model DiskRestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/incrementalrestorepoints/version.go b/resource-manager/compute/2023-04-02/incrementalrestorepoints/version.go index c16db2eb08e..83d36d3e536 100644 --- a/resource-manager/compute/2023-04-02/incrementalrestorepoints/version.go +++ b/resource-manager/compute/2023-04-02/incrementalrestorepoints/version.go @@ -1,12 +1,10 @@ package incrementalrestorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incrementalrestorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incrementalrestorepoints/2023-04-02" } diff --git a/resource-manager/compute/2023-04-02/snapshots/README.md b/resource-manager/compute/2023-04-02/snapshots/README.md index 5f0c5befa01..85062cd17fb 100644 --- a/resource-manager/compute/2023-04-02/snapshots/README.md +++ b/resource-manager/compute/2023-04-02/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-04-02/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-04-02`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-04-02`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-04-02/snapshots/client.go b/resource-manager/compute/2023-04-02/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/compute/2023-04-02/snapshots/client.go +++ b/resource-manager/compute/2023-04-02/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/compute/2023-04-02/snapshots/id_snapshot.go b/resource-manager/compute/2023-04-02/snapshots/id_snapshot.go index 87928ccc3ad..c1832f99d11 100644 --- a/resource-manager/compute/2023-04-02/snapshots/id_snapshot.go +++ b/resource-manager/compute/2023-04-02/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-04-02/snapshots/method_get.go b/resource-manager/compute/2023-04-02/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/compute/2023-04-02/snapshots/method_get.go +++ b/resource-manager/compute/2023-04-02/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-04-02/snapshots/version.go b/resource-manager/compute/2023-04-02/snapshots/version.go index 71521aba769..a475df277e8 100644 --- a/resource-manager/compute/2023-04-02/snapshots/version.go +++ b/resource-manager/compute/2023-04-02/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-02" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-04-02" } diff --git a/resource-manager/compute/2023-07-03/communitygalleries/README.md b/resource-manager/compute/2023-07-03/communitygalleries/README.md index ecbf1c54cb9..0b5bbf77dd0 100644 --- a/resource-manager/compute/2023-07-03/communitygalleries/README.md +++ b/resource-manager/compute/2023-07-03/communitygalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/communitygalleries` Documentation -The `communitygalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `communitygalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/communitygalleries/client.go b/resource-manager/compute/2023-07-03/communitygalleries/client.go index ee3fe76a525..01d7a073e31 100644 --- a/resource-manager/compute/2023-07-03/communitygalleries/client.go +++ b/resource-manager/compute/2023-07-03/communitygalleries/client.go @@ -15,7 +15,7 @@ type CommunityGalleriesClient struct { } func NewCommunityGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/communitygalleries/id_communitygallery.go b/resource-manager/compute/2023-07-03/communitygalleries/id_communitygallery.go index b40a2813f6e..f3bd59f7594 100644 --- a/resource-manager/compute/2023-07-03/communitygalleries/id_communitygallery.go +++ b/resource-manager/compute/2023-07-03/communitygalleries/id_communitygallery.go @@ -42,7 +42,7 @@ func ParseCommunityGalleryID(input string) (*CommunityGalleryId, error) { } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunityGalleryIDInsensitively(input string) (*CommunityGalleryId, er } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/communitygalleries/method_get.go b/resource-manager/compute/2023-07-03/communitygalleries/method_get.go index 5c7fa5f5ae5..8b67f5e842d 100644 --- a/resource-manager/compute/2023-07-03/communitygalleries/method_get.go +++ b/resource-manager/compute/2023-07-03/communitygalleries/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleriesClient) Get(ctx context.Context, id CommunityGalleryId var model CommunityGallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/communitygalleries/version.go b/resource-manager/compute/2023-07-03/communitygalleries/version.go index 678ccc9d191..ecfd189392d 100644 --- a/resource-manager/compute/2023-07-03/communitygalleries/version.go +++ b/resource-manager/compute/2023-07-03/communitygalleries/version.go @@ -1,12 +1,10 @@ package communitygalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleries/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/README.md b/resource-manager/compute/2023-07-03/communitygalleryimages/README.md index 82273854be0..4823b029a39 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/README.md +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/communitygalleryimages` Documentation -The `communitygalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `communitygalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/client.go b/resource-manager/compute/2023-07-03/communitygalleryimages/client.go index 3462622883f..c1efdbe5536 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/client.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImagesClient struct { } func NewCommunityGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygallery.go b/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygallery.go index a7803ddbaf9..0ce88dd818a 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygallery.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygallery.go @@ -42,7 +42,7 @@ func ParseCommunityGalleryID(input string) (*CommunityGalleryId, error) { } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunityGalleryIDInsensitively(input string) (*CommunityGalleryId, er } id := CommunityGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygalleryimage.go b/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygalleryimage.go index b8512c0f58a..110bd599840 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygalleryimage.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/id_communitygalleryimage.go @@ -44,7 +44,7 @@ func ParseCommunityGalleryImageID(input string) (*CommunityGalleryImageId, error } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommunityGalleryImageIDInsensitively(input string) (*CommunityGalleryI } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/method_get.go b/resource-manager/compute/2023-07-03/communitygalleryimages/method_get.go index bd9be720b32..f6357cfc819 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/method_get.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImagesClient) Get(ctx context.Context, id CommunityGalle var model CommunityGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimages/version.go b/resource-manager/compute/2023-07-03/communitygalleryimages/version.go index eedb98c1667..fe4003e1557 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimages/version.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimages/version.go @@ -1,12 +1,10 @@ package communitygalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimages/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/README.md b/resource-manager/compute/2023-07-03/communitygalleryimageversions/README.md index 8c9634fcf46..331501b8a51 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/README.md +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/communitygalleryimageversions` Documentation -The `communitygalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `communitygalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/client.go b/resource-manager/compute/2023-07-03/communitygalleryimageversions/client.go index 4982219d550..0bb37c078cc 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/client.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/client.go @@ -15,7 +15,7 @@ type CommunityGalleryImageVersionsClient struct { } func NewCommunityGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunityGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communitygalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunityGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimage.go b/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimage.go index aa113b34c28..9d47a0f5aaa 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimage.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimage.go @@ -44,7 +44,7 @@ func ParseCommunityGalleryImageID(input string) (*CommunityGalleryImageId, error } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommunityGalleryImageIDInsensitively(input string) (*CommunityGalleryI } id := CommunityGalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimageversion.go b/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimageversion.go index 87b478589ea..4ea6a549e34 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimageversion.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/id_communitygalleryimageversion.go @@ -46,7 +46,7 @@ func ParseCommunityGalleryImageVersionID(input string) (*CommunityGalleryImageVe } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommunityGalleryImageVersionIDInsensitively(input string) (*CommunityG } id := CommunityGalleryImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/method_get.go b/resource-manager/compute/2023-07-03/communitygalleryimageversions/method_get.go index 1598140bb6a..29454f20ca8 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/method_get.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c CommunityGalleryImageVersionsClient) Get(ctx context.Context, id Communi var model CommunityGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/communitygalleryimageversions/version.go b/resource-manager/compute/2023-07-03/communitygalleryimageversions/version.go index 7d7bb0f7175..ebdfd830cee 100644 --- a/resource-manager/compute/2023-07-03/communitygalleryimageversions/version.go +++ b/resource-manager/compute/2023-07-03/communitygalleryimageversions/version.go @@ -1,12 +1,10 @@ package communitygalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communitygalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communitygalleryimageversions/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/galleries/README.md b/resource-manager/compute/2023-07-03/galleries/README.md index 0d368493bbe..70b4d77b699 100644 --- a/resource-manager/compute/2023-07-03/galleries/README.md +++ b/resource-manager/compute/2023-07-03/galleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/galleries` Documentation -The `galleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `galleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/galleries/client.go b/resource-manager/compute/2023-07-03/galleries/client.go index 624f4aaf60a..d9db0ae13ba 100644 --- a/resource-manager/compute/2023-07-03/galleries/client.go +++ b/resource-manager/compute/2023-07-03/galleries/client.go @@ -15,7 +15,7 @@ type GalleriesClient struct { } func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/galleries/method_get.go b/resource-manager/compute/2023-07-03/galleries/method_get.go index b8f3b9be59a..702aa561751 100644 --- a/resource-manager/compute/2023-07-03/galleries/method_get.go +++ b/resource-manager/compute/2023-07-03/galleries/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c GalleriesClient) Get(ctx context.Context, id commonids.SharedImageGaller var model Gallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/galleries/version.go b/resource-manager/compute/2023-07-03/galleries/version.go index ab7db386fb4..4613654ff5b 100644 --- a/resource-manager/compute/2023-07-03/galleries/version.go +++ b/resource-manager/compute/2023-07-03/galleries/version.go @@ -1,12 +1,10 @@ package galleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleries/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/galleryapplications/README.md b/resource-manager/compute/2023-07-03/galleryapplications/README.md index 39b3b896918..c9b95b8988d 100644 --- a/resource-manager/compute/2023-07-03/galleryapplications/README.md +++ b/resource-manager/compute/2023-07-03/galleryapplications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/galleryapplications` Documentation -The `galleryapplications` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `galleryapplications` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/galleryapplications/client.go b/resource-manager/compute/2023-07-03/galleryapplications/client.go index efd5159e185..0131466680d 100644 --- a/resource-manager/compute/2023-07-03/galleryapplications/client.go +++ b/resource-manager/compute/2023-07-03/galleryapplications/client.go @@ -15,7 +15,7 @@ type GalleryApplicationsClient struct { } func NewGalleryApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationsClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/galleryapplications/id_application.go b/resource-manager/compute/2023-07-03/galleryapplications/id_application.go index 994259e991d..3a52dbe197f 100644 --- a/resource-manager/compute/2023-07-03/galleryapplications/id_application.go +++ b/resource-manager/compute/2023-07-03/galleryapplications/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryapplications/method_get.go b/resource-manager/compute/2023-07-03/galleryapplications/method_get.go index 8d1ab31cfd7..600f262b5af 100644 --- a/resource-manager/compute/2023-07-03/galleryapplications/method_get.go +++ b/resource-manager/compute/2023-07-03/galleryapplications/method_get.go @@ -45,7 +45,6 @@ func (c GalleryApplicationsClient) Get(ctx context.Context, id ApplicationId) (r var model GalleryApplication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/galleryapplications/version.go b/resource-manager/compute/2023-07-03/galleryapplications/version.go index 6712d8d6762..a55f6f968c6 100644 --- a/resource-manager/compute/2023-07-03/galleryapplications/version.go +++ b/resource-manager/compute/2023-07-03/galleryapplications/version.go @@ -1,12 +1,10 @@ package galleryapplications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplications/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/README.md b/resource-manager/compute/2023-07-03/galleryapplicationversions/README.md index a910208fe2c..f24f3d94c1b 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/README.md +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/galleryapplicationversions` Documentation -The `galleryapplicationversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `galleryapplicationversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/client.go b/resource-manager/compute/2023-07-03/galleryapplicationversions/client.go index 76bda42bb01..c45f09e57f5 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/client.go +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/client.go @@ -15,7 +15,7 @@ type GalleryApplicationVersionsClient struct { } func NewGalleryApplicationVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryApplicationVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryapplicationversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryapplicationversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryApplicationVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/id_application.go b/resource-manager/compute/2023-07-03/galleryapplicationversions/id_application.go index ab968ddd82a..28ee6b4678d 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/id_application.go +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/id_applicationversion.go b/resource-manager/compute/2023-07-03/galleryapplicationversions/id_applicationversion.go index 2c01633613f..4021fd84f55 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/id_applicationversion.go +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/id_applicationversion.go @@ -46,7 +46,7 @@ func ParseApplicationVersionID(input string) (*ApplicationVersionId, error) { } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseApplicationVersionIDInsensitively(input string) (*ApplicationVersionId } id := ApplicationVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/method_get.go b/resource-manager/compute/2023-07-03/galleryapplicationversions/method_get.go index fc382e13c39..84c637d6e22 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/method_get.go +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryApplicationVersionsClient) Get(ctx context.Context, id Applicatio var model GalleryApplicationVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/galleryapplicationversions/version.go b/resource-manager/compute/2023-07-03/galleryapplicationversions/version.go index 1c58aa99e87..d1a2fac9358 100644 --- a/resource-manager/compute/2023-07-03/galleryapplicationversions/version.go +++ b/resource-manager/compute/2023-07-03/galleryapplicationversions/version.go @@ -1,12 +1,10 @@ package galleryapplicationversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryapplicationversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryapplicationversions/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/galleryimages/README.md b/resource-manager/compute/2023-07-03/galleryimages/README.md index 85d9abb9c6d..5cb2572d7fd 100644 --- a/resource-manager/compute/2023-07-03/galleryimages/README.md +++ b/resource-manager/compute/2023-07-03/galleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/galleryimages` Documentation -The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `galleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/galleryimages/client.go b/resource-manager/compute/2023-07-03/galleryimages/client.go index 59b9c848dbd..cebddc1c307 100644 --- a/resource-manager/compute/2023-07-03/galleryimages/client.go +++ b/resource-manager/compute/2023-07-03/galleryimages/client.go @@ -15,7 +15,7 @@ type GalleryImagesClient struct { } func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/galleryimages/id_galleryimage.go b/resource-manager/compute/2023-07-03/galleryimages/id_galleryimage.go index 951c083ad3b..b6424b69480 100644 --- a/resource-manager/compute/2023-07-03/galleryimages/id_galleryimage.go +++ b/resource-manager/compute/2023-07-03/galleryimages/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryimages/method_get.go b/resource-manager/compute/2023-07-03/galleryimages/method_get.go index 5c642368aac..730b820ae30 100644 --- a/resource-manager/compute/2023-07-03/galleryimages/method_get.go +++ b/resource-manager/compute/2023-07-03/galleryimages/method_get.go @@ -45,7 +45,6 @@ func (c GalleryImagesClient) Get(ctx context.Context, id GalleryImageId) (result var model GalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/galleryimages/version.go b/resource-manager/compute/2023-07-03/galleryimages/version.go index a1bb18d5741..1baefcc8b82 100644 --- a/resource-manager/compute/2023-07-03/galleryimages/version.go +++ b/resource-manager/compute/2023-07-03/galleryimages/version.go @@ -1,12 +1,10 @@ package galleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimages/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/README.md b/resource-manager/compute/2023-07-03/galleryimageversions/README.md index 5c2c3edd13a..0ba1dd7d7ad 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/README.md +++ b/resource-manager/compute/2023-07-03/galleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/galleryimageversions` Documentation -The `galleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `galleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/client.go b/resource-manager/compute/2023-07-03/galleryimageversions/client.go index c8bf5a50ca7..6bf3f9b0ebb 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/client.go +++ b/resource-manager/compute/2023-07-03/galleryimageversions/client.go @@ -15,7 +15,7 @@ type GalleryImageVersionsClient struct { } func NewGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/id_galleryimage.go b/resource-manager/compute/2023-07-03/galleryimageversions/id_galleryimage.go index 282c39e643a..193631afe15 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/id_galleryimage.go +++ b/resource-manager/compute/2023-07-03/galleryimageversions/id_galleryimage.go @@ -44,7 +44,7 @@ func ParseGalleryImageID(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryImageIDInsensitively(input string) (*GalleryImageId, error) { } id := GalleryImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/id_imageversion.go b/resource-manager/compute/2023-07-03/galleryimageversions/id_imageversion.go index 7f98ea65bd2..e59d4737939 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/id_imageversion.go +++ b/resource-manager/compute/2023-07-03/galleryimageversions/id_imageversion.go @@ -46,7 +46,7 @@ func ParseImageVersionID(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageVersionIDInsensitively(input string) (*ImageVersionId, error) { } id := ImageVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/method_get.go b/resource-manager/compute/2023-07-03/galleryimageversions/method_get.go index 9638bdc304d..a018545b29f 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/method_get.go +++ b/resource-manager/compute/2023-07-03/galleryimageversions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GalleryImageVersionsClient) Get(ctx context.Context, id ImageVersionId, var model GalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/galleryimageversions/version.go b/resource-manager/compute/2023-07-03/galleryimageversions/version.go index 89490886115..e3e00fedc9e 100644 --- a/resource-manager/compute/2023-07-03/galleryimageversions/version.go +++ b/resource-manager/compute/2023-07-03/galleryimageversions/version.go @@ -1,12 +1,10 @@ package galleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimageversions/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/gallerysharingupdate/README.md b/resource-manager/compute/2023-07-03/gallerysharingupdate/README.md index f376c3aee47..64a1b83e3b6 100644 --- a/resource-manager/compute/2023-07-03/gallerysharingupdate/README.md +++ b/resource-manager/compute/2023-07-03/gallerysharingupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/gallerysharingupdate` Documentation -The `gallerysharingupdate` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `gallerysharingupdate` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/gallerysharingupdate/client.go b/resource-manager/compute/2023-07-03/gallerysharingupdate/client.go index 1fd6513f838..b293b189a85 100644 --- a/resource-manager/compute/2023-07-03/gallerysharingupdate/client.go +++ b/resource-manager/compute/2023-07-03/gallerysharingupdate/client.go @@ -15,7 +15,7 @@ type GallerySharingUpdateClient struct { } func NewGallerySharingUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*GallerySharingUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gallerysharingupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gallerysharingupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GallerySharingUpdateClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/gallerysharingupdate/version.go b/resource-manager/compute/2023-07-03/gallerysharingupdate/version.go index beea800719b..dc690cef30f 100644 --- a/resource-manager/compute/2023-07-03/gallerysharingupdate/version.go +++ b/resource-manager/compute/2023-07-03/gallerysharingupdate/version.go @@ -1,12 +1,10 @@ package gallerysharingupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gallerysharingupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gallerysharingupdate/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/README.md b/resource-manager/compute/2023-07-03/sharedgalleries/README.md index f542e7b0771..8009c19cb2a 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/README.md +++ b/resource-manager/compute/2023-07-03/sharedgalleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/sharedgalleries` Documentation -The `sharedgalleries` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `sharedgalleries` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/client.go b/resource-manager/compute/2023-07-03/sharedgalleries/client.go index d1ed6f27a92..d7365eacb97 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/client.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/client.go @@ -15,7 +15,7 @@ type SharedGalleriesClient struct { } func NewSharedGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleriesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/id_location.go b/resource-manager/compute/2023-07-03/sharedgalleries/id_location.go index ec03a95113f..d70722b4cd4 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/id_location.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/id_sharedgallery.go b/resource-manager/compute/2023-07-03/sharedgalleries/id_sharedgallery.go index 5dc28ef7840..98fe32a25f9 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/id_sharedgallery.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/method_get.go b/resource-manager/compute/2023-07-03/sharedgalleries/method_get.go index adaf389eecb..3d8b5259d97 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/method_get.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleriesClient) Get(ctx context.Context, id SharedGalleryId) (res var model SharedGallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/method_list.go b/resource-manager/compute/2023-07-03/sharedgalleries/method_list.go index b9c8f6b4af1..29728905b60 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/method_list.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-07-03/sharedgalleries/version.go b/resource-manager/compute/2023-07-03/sharedgalleries/version.go index 632ba81c68d..8fa2b9a118b 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleries/version.go +++ b/resource-manager/compute/2023-07-03/sharedgalleries/version.go @@ -1,12 +1,10 @@ package sharedgalleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleries/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/README.md b/resource-manager/compute/2023-07-03/sharedgalleryimages/README.md index c6a93f60f00..f4ff8a39f72 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/README.md +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/sharedgalleryimages` Documentation -The `sharedgalleryimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `sharedgalleryimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/client.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/client.go index 2067896d391..4109d4b43bb 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/client.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/client.go @@ -15,7 +15,7 @@ type SharedGalleryImagesClient struct { } func NewSharedGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImagesClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/id_image.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/id_image.go index aeabc8a0b34..bf1452d0f8e 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/id_image.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/id_sharedgallery.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/id_sharedgallery.go index d38b664da6f..31bbee97389 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/id_sharedgallery.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/id_sharedgallery.go @@ -42,7 +42,7 @@ func ParseSharedGalleryID(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSharedGalleryIDInsensitively(input string) (*SharedGalleryId, error) { } id := SharedGalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/method_get.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/method_get.go index b98cfcde3a2..4b49bfa2a28 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/method_get.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImagesClient) Get(ctx context.Context, id ImageId) (result var model SharedGalleryImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/method_list.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/method_list.go index 2ea5dd5b351..b0e073854fb 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/method_list.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimages/version.go b/resource-manager/compute/2023-07-03/sharedgalleryimages/version.go index 3b7bdb94745..82f565a6c07 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimages/version.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimages/version.go @@ -1,12 +1,10 @@ package sharedgalleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimages/2023-07-03" } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/README.md b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/README.md index 22304ad4067..2bd3e0aa4c7 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/README.md +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-07-03/sharedgalleryimageversions` Documentation -The `sharedgalleryimageversions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2023-07-03`). +The `sharedgalleryimageversions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2023-07-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/client.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/client.go index bdc07e226c2..1537177d507 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/client.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/client.go @@ -15,7 +15,7 @@ type SharedGalleryImageVersionsClient struct { } func NewSharedGalleryImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedGalleryImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedgalleryimageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedGalleryImageVersionsClient: %+v", err) } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_image.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_image.go index df91e878767..9e6d21126c4 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_image.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_version.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_version.go index 5c70f0b25f0..b446f65e116 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_version.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_get.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_get.go index 7c2d2e13d40..db662df97bd 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_get.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_get.go @@ -45,7 +45,6 @@ func (c SharedGalleryImageVersionsClient) Get(ctx context.Context, id VersionId) var model SharedGalleryImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_list.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_list.go index 71525072c3d..157a30105ad 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_list.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/version.go b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/version.go index 0780f014b17..ed0401155e6 100644 --- a/resource-manager/compute/2023-07-03/sharedgalleryimageversions/version.go +++ b/resource-manager/compute/2023-07-03/sharedgalleryimageversions/version.go @@ -1,12 +1,10 @@ package sharedgalleryimageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedgalleryimageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedgalleryimageversions/2023-07-03" } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/README.md b/resource-manager/compute/2024-03-01/availabilitysets/README.md index bd2653d7318..3a2d61c173c 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/README.md +++ b/resource-manager/compute/2024-03-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/availabilitysets/client.go b/resource-manager/compute/2024-03-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/client.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/method_createorupdate.go b/resource-manager/compute/2024-03-01/availabilitysets/method_createorupdate.go index 886d801ae4a..0fd3b44fe2c 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, id commonids var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/method_get.go b/resource-manager/compute/2024-03-01/availabilitysets/method_get.go index 3c2eb94bfb2..5331c2457d7 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/method_get.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/method_get.go @@ -46,7 +46,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id commonids.Availabili var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/method_listavailablesizes.go b/resource-manager/compute/2024-03-01/availabilitysets/method_listavailablesizes.go index 2e2e96fa619..d47e9dec5a7 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/method_listavailablesizes.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, id commo var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/method_listbysubscription.go b/resource-manager/compute/2024-03-01/availabilitysets/method_listbysubscription.go index 6de26336e6c..44f1ba6844b 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/method_listbysubscription.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/method_update.go b/resource-manager/compute/2024-03-01/availabilitysets/method_update.go index 3784e4c8604..8eb2093ecd2 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/method_update.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/method_update.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) Update(ctx context.Context, id commonids.Availab var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/availabilitysets/version.go b/resource-manager/compute/2024-03-01/availabilitysets/version.go index ef8fe9081df..a62c90f16d8 100644 --- a/resource-manager/compute/2024-03-01/availabilitysets/version.go +++ b/resource-manager/compute/2024-03-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/capacityreservation/README.md b/resource-manager/compute/2024-03-01/capacityreservation/README.md index e3999f14f55..853ee5219af 100644 --- a/resource-manager/compute/2024-03-01/capacityreservation/README.md +++ b/resource-manager/compute/2024-03-01/capacityreservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/capacityreservation` Documentation -The `capacityreservation` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `capacityreservation` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/capacityreservation/client.go b/resource-manager/compute/2024-03-01/capacityreservation/client.go index 63b03839e60..8387846bbe8 100644 --- a/resource-manager/compute/2024-03-01/capacityreservation/client.go +++ b/resource-manager/compute/2024-03-01/capacityreservation/client.go @@ -15,7 +15,7 @@ type CapacityReservationClient struct { } func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/capacityreservation/id_capacityreservationgroup.go b/resource-manager/compute/2024-03-01/capacityreservation/id_capacityreservationgroup.go index 8493ff8f67f..8be7e83d119 100644 --- a/resource-manager/compute/2024-03-01/capacityreservation/id_capacityreservationgroup.go +++ b/resource-manager/compute/2024-03-01/capacityreservation/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/capacityreservation/version.go b/resource-manager/compute/2024-03-01/capacityreservation/version.go index 1085aca077d..cbaefcec538 100644 --- a/resource-manager/compute/2024-03-01/capacityreservation/version.go +++ b/resource-manager/compute/2024-03-01/capacityreservation/version.go @@ -1,12 +1,10 @@ package capacityreservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservation/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/README.md b/resource-manager/compute/2024-03-01/capacityreservationgroups/README.md index 42c2fec4e4f..8cc513c6418 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/README.md +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/capacityreservationgroups` Documentation -The `capacityreservationgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `capacityreservationgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/client.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/client.go index 15ced399cbc..088a08cf103 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/client.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/client.go @@ -15,7 +15,7 @@ type CapacityReservationGroupsClient struct { } func NewCapacityReservationGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservationgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservationgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/id_capacityreservationgroup.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/id_capacityreservationgroup.go index 92a9a9e1ae1..eee67dd9eed 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_createorupdate.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_createorupdate.go index 35050e649c5..b2779f3d9df 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, id var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_get.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_get.go index 3aa39e689af..40ec743fa1e 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_get.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationGroupsClient) Get(ctx context.Context, id CapacityRes var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbyresourcegroup.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbyresourcegroup.go index e3708c6a167..471bfa93e53 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbyresourcegroup.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbysubscription.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbysubscription.go index 8e4768628ac..ef48698b737 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbysubscription.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_update.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_update.go index 904fe5ef0fe..0ab0ca706c1 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/method_update.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/method_update.go @@ -49,7 +49,6 @@ func (c CapacityReservationGroupsClient) Update(ctx context.Context, id Capacity var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/capacityreservationgroups/version.go b/resource-manager/compute/2024-03-01/capacityreservationgroups/version.go index 755729fa283..21aaff35cbd 100644 --- a/resource-manager/compute/2024-03-01/capacityreservationgroups/version.go +++ b/resource-manager/compute/2024-03-01/capacityreservationgroups/version.go @@ -1,12 +1,10 @@ package capacityreservationgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservationgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservationgroups/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/capacityreservations/README.md b/resource-manager/compute/2024-03-01/capacityreservations/README.md index ed68d34ecbf..6206e46b0e1 100644 --- a/resource-manager/compute/2024-03-01/capacityreservations/README.md +++ b/resource-manager/compute/2024-03-01/capacityreservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/capacityreservations` Documentation -The `capacityreservations` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `capacityreservations` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/capacityreservations/client.go b/resource-manager/compute/2024-03-01/capacityreservations/client.go index 03bc68e43c5..46407a5fa33 100644 --- a/resource-manager/compute/2024-03-01/capacityreservations/client.go +++ b/resource-manager/compute/2024-03-01/capacityreservations/client.go @@ -15,7 +15,7 @@ type CapacityReservationsClient struct { } func NewCapacityReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/capacityreservations/id_capacityreservation.go b/resource-manager/compute/2024-03-01/capacityreservations/id_capacityreservation.go index 0f72f8f4a70..283c492d9c4 100644 --- a/resource-manager/compute/2024-03-01/capacityreservations/id_capacityreservation.go +++ b/resource-manager/compute/2024-03-01/capacityreservations/id_capacityreservation.go @@ -44,7 +44,7 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/capacityreservations/method_get.go b/resource-manager/compute/2024-03-01/capacityreservations/method_get.go index 745d18a7fc3..b9d6e655ff4 100644 --- a/resource-manager/compute/2024-03-01/capacityreservations/method_get.go +++ b/resource-manager/compute/2024-03-01/capacityreservations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationsClient) Get(ctx context.Context, id CapacityReservat var model CapacityReservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/capacityreservations/version.go b/resource-manager/compute/2024-03-01/capacityreservations/version.go index d2fa109f372..4d650094916 100644 --- a/resource-manager/compute/2024-03-01/capacityreservations/version.go +++ b/resource-manager/compute/2024-03-01/capacityreservations/version.go @@ -1,12 +1,10 @@ package capacityreservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservations/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/dedicatedhost/README.md b/resource-manager/compute/2024-03-01/dedicatedhost/README.md index cf2da5cf570..0133c55a8ea 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhost/README.md +++ b/resource-manager/compute/2024-03-01/dedicatedhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhost` Documentation -The `dedicatedhost` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `dedicatedhost` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/dedicatedhost/client.go b/resource-manager/compute/2024-03-01/dedicatedhost/client.go index b440c051d61..5c78f75da1d 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhost/client.go +++ b/resource-manager/compute/2024-03-01/dedicatedhost/client.go @@ -15,7 +15,7 @@ type DedicatedHostClient struct { } func NewDedicatedHostClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/dedicatedhost/method_listavailablesizes.go b/resource-manager/compute/2024-03-01/dedicatedhost/method_listavailablesizes.go index 1b928c5d629..b18a354564c 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhost/method_listavailablesizes.go +++ b/resource-manager/compute/2024-03-01/dedicatedhost/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c DedicatedHostClient) ListAvailableSizes(ctx context.Context, id commonid var model DedicatedHostSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/dedicatedhost/version.go b/resource-manager/compute/2024-03-01/dedicatedhost/version.go index 9686af5b018..f684204cdee 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhost/version.go +++ b/resource-manager/compute/2024-03-01/dedicatedhost/version.go @@ -1,12 +1,10 @@ package dedicatedhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhost/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/README.md b/resource-manager/compute/2024-03-01/dedicatedhostgroups/README.md index bc83232b572..d175f66f6a2 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/README.md +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhostgroups` Documentation -The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `dedicatedhostgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/client.go b/resource-manager/compute/2024-03-01/dedicatedhostgroups/client.go index e3ac7c014b1..1198b817462 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/client.go +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/client.go @@ -15,7 +15,7 @@ type DedicatedHostGroupsClient struct { } func NewDedicatedHostGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_createorupdate.go b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_createorupdate.go index 7696a362908..4b26099152d 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id common var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_get.go b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_get.go index 7c5f6eba0af..8d31b580668 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_get.go +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostGroupsClient) Get(ctx context.Context, id commonids.Dedicat var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_update.go b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_update.go index 518f4006b01..0bb7d2873f7 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_update.go +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/method_update.go @@ -50,7 +50,6 @@ func (c DedicatedHostGroupsClient) Update(ctx context.Context, id commonids.Dedi var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/dedicatedhostgroups/version.go b/resource-manager/compute/2024-03-01/dedicatedhostgroups/version.go index 618f3a46fec..978c2b35b6d 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhostgroups/version.go +++ b/resource-manager/compute/2024-03-01/dedicatedhostgroups/version.go @@ -1,12 +1,10 @@ package dedicatedhostgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhostgroups/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/dedicatedhosts/README.md b/resource-manager/compute/2024-03-01/dedicatedhosts/README.md index e5b1553c82f..a1a96e6aa48 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhosts/README.md +++ b/resource-manager/compute/2024-03-01/dedicatedhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/dedicatedhosts` Documentation -The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `dedicatedhosts` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/dedicatedhosts/client.go b/resource-manager/compute/2024-03-01/dedicatedhosts/client.go index 0b646338795..1f5bf6278f7 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhosts/client.go +++ b/resource-manager/compute/2024-03-01/dedicatedhosts/client.go @@ -15,7 +15,7 @@ type DedicatedHostsClient struct { } func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/dedicatedhosts/method_get.go b/resource-manager/compute/2024-03-01/dedicatedhosts/method_get.go index 63e85f0ce8b..ae7a03232ad 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhosts/method_get.go +++ b/resource-manager/compute/2024-03-01/dedicatedhosts/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostsClient) Get(ctx context.Context, id commonids.DedicatedHos var model DedicatedHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/dedicatedhosts/version.go b/resource-manager/compute/2024-03-01/dedicatedhosts/version.go index ff71e375c07..f00e50bd1c8 100644 --- a/resource-manager/compute/2024-03-01/dedicatedhosts/version.go +++ b/resource-manager/compute/2024-03-01/dedicatedhosts/version.go @@ -1,12 +1,10 @@ package dedicatedhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhosts/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/images/README.md b/resource-manager/compute/2024-03-01/images/README.md index 75c2b2ffed7..50b339d4c9c 100644 --- a/resource-manager/compute/2024-03-01/images/README.md +++ b/resource-manager/compute/2024-03-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `images` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/images/client.go b/resource-manager/compute/2024-03-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/compute/2024-03-01/images/client.go +++ b/resource-manager/compute/2024-03-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/images/id_image.go b/resource-manager/compute/2024-03-01/images/id_image.go index 8f3964a77c7..c258a9aca61 100644 --- a/resource-manager/compute/2024-03-01/images/id_image.go +++ b/resource-manager/compute/2024-03-01/images/id_image.go @@ -42,7 +42,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/images/method_get.go b/resource-manager/compute/2024-03-01/images/method_get.go index 73320770a28..e68f9e933bb 100644 --- a/resource-manager/compute/2024-03-01/images/method_get.go +++ b/resource-manager/compute/2024-03-01/images/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId, options GetOperationO var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/images/version.go b/resource-manager/compute/2024-03-01/images/version.go index 844899fccee..8229a10156d 100644 --- a/resource-manager/compute/2024-03-01/images/version.go +++ b/resource-manager/compute/2024-03-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/loganalytics/README.md b/resource-manager/compute/2024-03-01/loganalytics/README.md index be03604aab2..002b837f8cd 100644 --- a/resource-manager/compute/2024-03-01/loganalytics/README.md +++ b/resource-manager/compute/2024-03-01/loganalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/loganalytics` Documentation -The `loganalytics` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `loganalytics` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/loganalytics/client.go b/resource-manager/compute/2024-03-01/loganalytics/client.go index 5053f2ddae1..b32a74cf728 100644 --- a/resource-manager/compute/2024-03-01/loganalytics/client.go +++ b/resource-manager/compute/2024-03-01/loganalytics/client.go @@ -15,7 +15,7 @@ type LogAnalyticsClient struct { } func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loganalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/loganalytics/id_location.go b/resource-manager/compute/2024-03-01/loganalytics/id_location.go index 63d3f560403..cf24cee10e3 100644 --- a/resource-manager/compute/2024-03-01/loganalytics/id_location.go +++ b/resource-manager/compute/2024-03-01/loganalytics/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/loganalytics/version.go b/resource-manager/compute/2024-03-01/loganalytics/version.go index 9de2c808e1c..536d123b150 100644 --- a/resource-manager/compute/2024-03-01/loganalytics/version.go +++ b/resource-manager/compute/2024-03-01/loganalytics/version.go @@ -1,12 +1,10 @@ package loganalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loganalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loganalytics/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/README.md b/resource-manager/compute/2024-03-01/proximityplacementgroups/README.md index ac2be186b8a..dfe3da41d18 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/README.md +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/proximityplacementgroups` Documentation -The `proximityplacementgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `proximityplacementgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/client.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/client.go index 2b737bf0f86..1a6cf3adbc3 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/client.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/client.go @@ -15,7 +15,7 @@ type ProximityPlacementGroupsClient struct { } func NewProximityPlacementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProximityPlacementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proximityplacementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proximityplacementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProximityPlacementGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/id_proximityplacementgroup.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/id_proximityplacementgroup.go index 0c0c7a01d30..0ba2b2d5fa9 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -42,7 +42,7 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_createorupdate.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_createorupdate.go index ec5dbe0e33f..b52985d0f6c 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, id P var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_get.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_get.go index 3e2a44fe371..9319acd4f9b 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_get.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProximityPlacementGroupsClient) Get(ctx context.Context, id ProximityPla var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_update.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_update.go index 2e1e1e45fc6..dd8d1e3003a 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/method_update.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/method_update.go @@ -49,7 +49,6 @@ func (c ProximityPlacementGroupsClient) Update(ctx context.Context, id Proximity var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/proximityplacementgroups/version.go b/resource-manager/compute/2024-03-01/proximityplacementgroups/version.go index 84c649f03d8..9deff74eef6 100644 --- a/resource-manager/compute/2024-03-01/proximityplacementgroups/version.go +++ b/resource-manager/compute/2024-03-01/proximityplacementgroups/version.go @@ -1,12 +1,10 @@ package proximityplacementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proximityplacementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proximityplacementgroups/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/README.md b/resource-manager/compute/2024-03-01/restorepointcollections/README.md index 27964ff3e62..bfb73ef38a0 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/README.md +++ b/resource-manager/compute/2024-03-01/restorepointcollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepointcollections` Documentation -The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `restorepointcollections` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/client.go b/resource-manager/compute/2024-03-01/restorepointcollections/client.go index 816bae4a346..543d327725d 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/client.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/client.go @@ -15,7 +15,7 @@ type RestorePointCollectionsClient struct { } func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepointcollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go b/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go index 5ae5a219829..f10116745d8 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/id_restorepointcollection.go @@ -42,7 +42,7 @@ func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, err } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointColl } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go b/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go index 6837427e5be..7e9dac346e3 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id Re var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go b/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go index 875f286c7fa..636041d46c6 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointC var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go b/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go index 209e763e72d..3aa41ed97ea 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/method_update.go @@ -49,7 +49,6 @@ func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePoi var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/restorepointcollections/version.go b/resource-manager/compute/2024-03-01/restorepointcollections/version.go index 681e25f32a7..4e76ad84074 100644 --- a/resource-manager/compute/2024-03-01/restorepointcollections/version.go +++ b/resource-manager/compute/2024-03-01/restorepointcollections/version.go @@ -1,12 +1,10 @@ package restorepointcollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepointcollections/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/restorepoints/README.md b/resource-manager/compute/2024-03-01/restorepoints/README.md index 90438c912df..b27e8acf5d4 100644 --- a/resource-manager/compute/2024-03-01/restorepoints/README.md +++ b/resource-manager/compute/2024-03-01/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/restorepoints/client.go b/resource-manager/compute/2024-03-01/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/compute/2024-03-01/restorepoints/client.go +++ b/resource-manager/compute/2024-03-01/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/restorepoints/id_restorepoint.go b/resource-manager/compute/2024-03-01/restorepoints/id_restorepoint.go index 5ffe0e1d42b..853e2a1b58d 100644 --- a/resource-manager/compute/2024-03-01/restorepoints/id_restorepoint.go +++ b/resource-manager/compute/2024-03-01/restorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/restorepoints/method_get.go b/resource-manager/compute/2024-03-01/restorepoints/method_get.go index 1fb0a01b3f8..ccf229525cb 100644 --- a/resource-manager/compute/2024-03-01/restorepoints/method_get.go +++ b/resource-manager/compute/2024-03-01/restorepoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId, options var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/restorepoints/version.go b/resource-manager/compute/2024-03-01/restorepoints/version.go index 14ad7bf2f4c..cd941d58762 100644 --- a/resource-manager/compute/2024-03-01/restorepoints/version.go +++ b/resource-manager/compute/2024-03-01/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/README.md b/resource-manager/compute/2024-03-01/sshpublickeys/README.md index 5fb9c4d7672..5131a36e47c 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/README.md +++ b/resource-manager/compute/2024-03-01/sshpublickeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/sshpublickeys` Documentation -The `sshpublickeys` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `sshpublickeys` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/client.go b/resource-manager/compute/2024-03-01/sshpublickeys/client.go index 60a955db2ea..b1945fe3975 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/client.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/client.go @@ -15,7 +15,7 @@ type SshPublicKeysClient struct { } func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sshpublickeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sshpublickeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SshPublicKeysClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/id_sshpublickey.go b/resource-manager/compute/2024-03-01/sshpublickeys/id_sshpublickey.go index 013618b26f3..4f003a63452 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/id_sshpublickey.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/id_sshpublickey.go @@ -42,7 +42,7 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/method_create.go b/resource-manager/compute/2024-03-01/sshpublickeys/method_create.go index 391f084ac1d..d348c2924e1 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/method_create.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/method_create.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/method_generatekeypair.go b/resource-manager/compute/2024-03-01/sshpublickeys/method_generatekeypair.go index c4670a0c432..d0a6f830ed0 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/method_generatekeypair.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/method_generatekeypair.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKe var model SshPublicKeyGenerateKeyPairResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/method_get.go b/resource-manager/compute/2024-03-01/sshpublickeys/method_get.go index 3420ec987c9..dc1c3cbdb02 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/method_get.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/method_get.go @@ -45,7 +45,6 @@ func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/method_update.go b/resource-manager/compute/2024-03-01/sshpublickeys/method_update.go index d697813a6ed..da0970a3389 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/method_update.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/method_update.go @@ -49,7 +49,6 @@ func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/sshpublickeys/version.go b/resource-manager/compute/2024-03-01/sshpublickeys/version.go index 77095cd40ff..3347cdd192a 100644 --- a/resource-manager/compute/2024-03-01/sshpublickeys/version.go +++ b/resource-manager/compute/2024-03-01/sshpublickeys/version.go @@ -1,12 +1,10 @@ package sshpublickeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sshpublickeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sshpublickeys/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/README.md b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/README.md index 1251842e0f0..5be8e2f25d4 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineextensionimages` Documentation -The `virtualmachineextensionimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachineextensionimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/client.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/client.go index baa2d351929..4385ff41033 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionImagesClient struct { } func NewVirtualMachineExtensionImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_publisher.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_publisher.go index bb19fd74520..88f97b7a6eb 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_publisher.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_type.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_type.go index 9cf3c59da23..bf518ba8702 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_type.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_type.go @@ -44,7 +44,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_version.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_version.go index a0e8803b4a0..1ee10989db9 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_version.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_get.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_get.go index b8722c5e7f4..728c7b2ba56 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineExtensionImagesClient) Get(ctx context.Context, id Version var model VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listtypes.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listtypes.go index 706c54f8ec4..b9f09407bc0 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listtypes.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listtypes.go @@ -46,7 +46,6 @@ func (c VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, id P var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listversions.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listversions.go index ad463b163fd..2cedae68952 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listversions.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/method_listversions.go @@ -36,6 +36,7 @@ func (o ListVersionsOperationOptions) ToHeaders() *client.Headers { func (o ListVersionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, i var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/version.go b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/version.go index 154adfe6e98..df0705ff211 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensionimages/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensionimages/version.go @@ -1,12 +1,10 @@ package virtualmachineextensionimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensionimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensionimages/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/README.md b/resource-manager/compute/2024-03-01/virtualmachineextensions/README.md index 90b97a512d0..2913a58669c 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineextensions` Documentation -The `virtualmachineextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachineextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/client.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/client.go index 4adf20a248c..c049fb742ed 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionsClient struct { } func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/id_extension.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/id_extension.go index b9ae480741d..19a447ebbbe 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/id_extension.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/id_virtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/id_virtualmachine.go index 50052e6b019..34532cbd2a4 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/id_virtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/method_get.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/method_get.go index 767c337cafb..081bdecb6ff 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) Get(ctx context.Context, id ExtensionId, var model VirtualMachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/method_list.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/method_list.go index b5541f85116..b495c3fa1d5 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) List(ctx context.Context, id VirtualMach var model VirtualMachineExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineextensions/version.go b/resource-manager/compute/2024-03-01/virtualmachineextensions/version.go index 4a8f80505ea..9a08bdd366f 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineextensions/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachineextensions/version.go @@ -1,12 +1,10 @@ package virtualmachineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensions/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/README.md b/resource-manager/compute/2024-03-01/virtualmachineimages/README.md index 714713a6cb6..1c3ab10fe71 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineimages` Documentation -The `virtualmachineimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachineimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/client.go b/resource-manager/compute/2024-03-01/virtualmachineimages/client.go index 3d9912359f8..05c5fd93d49 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineImagesClient struct { } func NewVirtualMachineImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezone.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezone.go index 689e0be7e56..770692e1f01 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezone.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezone.go @@ -42,7 +42,7 @@ func ParseEdgeZoneID(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEdgeZoneIDInsensitively(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezonepublisher.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezonepublisher.go index 3838d08d8b8..ef3334834d7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezonepublisher.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_edgezonepublisher.go @@ -44,7 +44,7 @@ func ParseEdgeZonePublisherID(input string) (*EdgeZonePublisherId, error) { } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeZonePublisherIDInsensitively(input string) (*EdgeZonePublisherId, } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_location.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_location.go index 21b22ae9152..aa0bd6f123c 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_location.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offer.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offer.go index 40367d1e7b5..821104312e6 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offer.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offer.go @@ -44,7 +44,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offersku.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offersku.go index 91e4a168703..08bca98cb86 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offersku.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offersku.go @@ -48,7 +48,7 @@ func ParseOfferSkuID(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOfferSkuIDInsensitively(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offerskuversion.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offerskuversion.go index dae6d7f61be..4b04850b2ae 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_offerskuversion.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_offerskuversion.go @@ -50,7 +50,7 @@ func ParseOfferSkuVersionID(input string) (*OfferSkuVersionId, error) { } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseOfferSkuVersionIDInsensitively(input string) (*OfferSkuVersionId, erro } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_publisher.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_publisher.go index 509220be144..785d3f177f0 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_publisher.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_sku.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_sku.go index 935057743f6..34fde30278a 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_sku.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_sku.go @@ -46,7 +46,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_skuversion.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_skuversion.go index 2e5d0e9a79c..0172c3e1a70 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_skuversion.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_skuversion.go @@ -48,7 +48,7 @@ func ParseSkuVersionID(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuVersionIDInsensitively(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/id_vmimageoffer.go b/resource-manager/compute/2024-03-01/virtualmachineimages/id_vmimageoffer.go index 22411c949d8..99ef25c09c5 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/id_vmimageoffer.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/id_vmimageoffer.go @@ -46,7 +46,7 @@ func ParseVMImageOfferID(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVMImageOfferIDInsensitively(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezoneget.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezoneget.go index d08e473ae5f..aae2bc8618d 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezoneget.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezoneget.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) EdgeZoneGet(ctx context.Context, id OfferSku var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelist.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelist.go index ba17ca15382..70e0120daa1 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelist.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelist.go @@ -36,6 +36,7 @@ func (o EdgeZoneListOperationOptions) ToHeaders() *client.Headers { func (o EdgeZoneListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) EdgeZoneList(ctx context.Context, id OfferSk var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistoffers.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistoffers.go index af3bb42c4ba..26cde80c448 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistoffers.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListOffers(ctx context.Context, id E var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistpublishers.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistpublishers.go index 9aadf470f3b..2ed9f07750a 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistpublishers.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListPublishers(ctx context.Context, var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistskus.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistskus.go index 42a5ccfc0ae..62b0005efdd 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistskus.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_edgezonelistskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListSkus(ctx context.Context, id VMI var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_get.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_get.go index 3be37d5f899..d9357bbb7dc 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) Get(ctx context.Context, id SkuVersionId) (r var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_list.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_list.go index 2989d0c443a..2d6df70703d 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) List(ctx context.Context, id SkuId, options var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listoffers.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listoffers.go index edba237d0ec..b44d982eaaf 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listoffers.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListOffers(ctx context.Context, id Publisher var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listpublishers.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listpublishers.go index 0ff57ba69ee..0251298dfe5 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listpublishers.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListPublishers(ctx context.Context, id Locat var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listskus.go b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listskus.go index 2613d661514..1a3ee479650 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/method_listskus.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/method_listskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListSkus(ctx context.Context, id OfferId) (r var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineimages/version.go b/resource-manager/compute/2024-03-01/virtualmachineimages/version.go index b64bf9f2a8f..ac85fda9d86 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineimages/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachineimages/version.go @@ -1,12 +1,10 @@ package virtualmachineimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineimages/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/README.md b/resource-manager/compute/2024-03-01/virtualmachineruncommands/README.md index 10ab6499a80..86df2cb4add 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachineruncommands` Documentation -The `virtualmachineruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachineruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/client.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/client.go index ee453cd014c..48e134abb29 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineRunCommandsClient struct { } func NewVirtualMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_location.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_location.go index dfd7f350471..e553ed3913e 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_location.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_runcommand.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_runcommand.go index e2bd6f0a575..61f472d53e2 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_runcommand.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_runcommand.go @@ -42,7 +42,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachine.go index 8d098c85c3b..df64bb47d41 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go index 1c90363b725..8b3914c8d71 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/id_virtualmachineruncommand.go @@ -44,7 +44,7 @@ func ParseVirtualMachineRunCommandID(input string) (*VirtualMachineRunCommandId, } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachine } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_get.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_get.go index 83355bdb92b..465ea8330ad 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineRunCommandsClient) Get(ctx context.Context, id RunCommandI var model RunCommandDocument result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go index c06971e26be..f603e128c0c 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_getbyvirtualmachine.go @@ -34,6 +34,7 @@ func (o GetByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o GetByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go index d3cf5c6296b..739e09cd17f 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/method_listbyvirtualmachine.go @@ -39,6 +39,7 @@ func (o ListByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachineruncommands/version.go b/resource-manager/compute/2024-03-01/virtualmachineruncommands/version.go index 8329dbf3c3f..4dd1a260542 100644 --- a/resource-manager/compute/2024-03-01/virtualmachineruncommands/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachineruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineruncommands/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/README.md b/resource-manager/compute/2024-03-01/virtualmachines/README.md index ec267ed59a2..647ba41b877 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachines/client.go b/resource-manager/compute/2024-03-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/id_location.go b/resource-manager/compute/2024-03-01/virtualmachines/id_location.go index 59cc8439152..4a5c1e51c52 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/id_location.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/id_virtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachines/id_virtualmachine.go index 0a676811b3a..9f10e69b236 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_createorupdate.go b/resource-manager/compute/2024-03-01/virtualmachines/method_createorupdate.go index 120d8edf9af..cce467977a6 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_deallocate.go b/resource-manager/compute/2024-03-01/virtualmachines/method_deallocate.go index ae7ee7a0d2b..c962480de36 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_deallocate.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_delete.go b/resource-manager/compute/2024-03-01/virtualmachines/method_delete.go index 7809910a33a..e2d145391fa 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_delete.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_get.go b/resource-manager/compute/2024-03-01/virtualmachines/method_get.go index ca0e72e7b04..610b8728f94 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_instanceview.go b/resource-manager/compute/2024-03-01/virtualmachines/method_instanceview.go index 629b0f65267..735f254f665 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_instanceview.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_instanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) InstanceView(ctx context.Context, id VirtualMachi var model VirtualMachineInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_list.go b/resource-manager/compute/2024-03-01/virtualmachines/method_list.go index 824fde5beb2..64092df3b3a 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_listall.go b/resource-manager/compute/2024-03-01/virtualmachines/method_listall.go index 30caaba2f04..c5abe6abb74 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_listall.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_listall.go @@ -42,6 +42,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_listavailablesizes.go b/resource-manager/compute/2024-03-01/virtualmachines/method_listavailablesizes.go index ade9d529c86..f4ad290ed8b 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_listavailablesizes.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_listavailablesizes.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListAvailableSizes(ctx context.Context, id Virtua var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_poweroff.go b/resource-manager/compute/2024-03-01/virtualmachines/method_poweroff.go index cd9da953583..f5c1b75d289 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_poweroff.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2024-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go index ef782af5c0a..cf8035af464 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/method_update.go b/resource-manager/compute/2024-03-01/virtualmachines/method_update.go index 89a435a1566..96f8c0490ea 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/method_update.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachines/version.go b/resource-manager/compute/2024-03-01/virtualmachines/version.go index 9540ddcd820..b5dc809faec 100644 --- a/resource-manager/compute/2024-03-01/virtualmachines/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/README.md index a9bda78667e..c7a02e7e7d7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions` Documentation -The `virtualmachinescalesetextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesetextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/client.go index 9555c0add8c..8b2f0aa3f61 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetExtensionsClient struct { } func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go index e52fb99c34f..221bbe81a25 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go index eaeca4e6677..c08756824e1 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetExtensionID(input string) (*VirtualMachineScaleS } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetExtensionIDInsensitively(input string) (*Virtual } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/method_get.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/method_get.go index 805e9846e65..58bd9a83728 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, id Virt var model VirtualMachineScaleSetExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/version.go index e42772350cc..3135297f14a 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetextensions/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/README.md index 645948bde64..26ca6b3b116 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades` Documentation -The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/client.go index fb39e655c93..2bc32c3839f 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { } func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetRollingUpgradesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go index 73ab65cf8ad..c778cdb85f7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go index e9dda93541e..647dbb00e17 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/method_getlatest.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Conte var model RollingUpgradeStatusInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/version.go index c7ad2716033..f07388f5a7b 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetrollingupgrades/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetrollingupgrades -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md index 37d2b0079fe..977b2a018e6 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesets` Documentation -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go index a08ba8c1d81..0548a7aec67 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetsClient struct { } func NewVirtualMachineScaleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go index a674916111d..65c5f49041d 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go index d4542bba1b5..76fb35088a6 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go index 75e8e97e63f..ce61579304c 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go index 45110630048..1965e606c51 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go index 154aacdb1ce..40c53c88532 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go index 375063255ba..ae1057f79fa 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_deleteinstances.go @@ -36,6 +36,7 @@ func (o DeleteInstancesOperationOptions) ToHeaders() *client.Headers { func (o DeleteInstancesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go index 9e2117d6a63..a49b926c058 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go @@ -36,6 +36,7 @@ func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToHe func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateD var model RecoveryWalkResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go index 1a1c806d33a..4ade8c757e1 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineScaleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go index b79b350b676..4e409bb9b3b 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, id V var model VirtualMachineScaleSetInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go index 3b0e524f55b..0b805fc3b55 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go index 4a22fdf65cf..f508f4deebf 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go index 752c8b744cb..6ffebfcbbe2 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesets/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesets/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/README.md index 2556fbea33b..2c8353dd757 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions` Documentation -The `virtualmachinescalesetvmextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesetvmextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/client.go index ee3be0e3e80..384674618ef 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { } func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go index 5bed9de5aa5..031846e1de7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go @@ -46,7 +46,7 @@ func ParseVirtualMachineExtensionID(input string) (*VirtualMachineExtensionId, e } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineExtensionIDInsensitively(input string) (*VirtualMachineE } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go index 00ba634a6da..461b5781ea3 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_get.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_get.go index 734208e2c2b..03923b1ef4d 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, id Vi var model VirtualMachineScaleSetVMExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_list.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_list.go index d9cdfbdcc60..300d802904c 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, id V var model VirtualMachineScaleSetVMExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/version.go index 709e4b14133..14905ce02c9 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/README.md index ea5b9512a2a..6ec7b6457a7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands` Documentation -The `virtualmachinescalesetvmruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesetvmruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/client.go index 65dba565153..fb8224b7dda 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { } func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go index 4342ff0b57d..48139ac644b 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go index e229cb64fb0..98f6dff8b2b 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*Virtu } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input st } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_get.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_get.go index 35fe308862d..7504f816267 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, id V var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_list.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_list.go index d335e2247cf..14ad4b942ca 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/version.go index 5b7774f54d5..00fd80f4d56 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/README.md b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/README.md index 36f56c4ee40..965e92dfeab 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvms` Documentation -The `virtualmachinescalesetvms` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinescalesetvms` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/client.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/client.go index d86b351fd86..61a216f26bf 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMsClient struct { } func NewVirtualMachineScaleSetVMsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMsClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go index 83349156568..50f34af693e 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go index 5e77406f79c..fa37f879ec7 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_delete.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_delete.go index 70ab6260f49..2c4fdb5bb39 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_delete.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_get.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_get.go index 54f1a9f63ea..48056f0eab3 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_get.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) Get(ctx context.Context, id VirtualMach var model VirtualMachineScaleSetVM result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_getinstanceview.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_getinstanceview.go index 67764259f28..d2e27a1295d 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_getinstanceview.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, id var model VirtualMachineScaleSetVMInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_list.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_list.go index 25828909629..bb09ed5d71a 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_poweroff.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_poweroff.go index 1b450b80bfa..cbe987a9165 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_poweroff.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go index 29eb32435dd..a93248b3042 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_update.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_update.go index c63bdf8b2cd..e08fda7ace4 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_update.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/version.go b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/version.go index 1232f8d82c6..a90109a15b0 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinescalesetvms/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvms/2024-03-01" } diff --git a/resource-manager/compute/2024-03-01/virtualmachinesizes/README.md b/resource-manager/compute/2024-03-01/virtualmachinesizes/README.md index 5a6534bc3d0..d5f3360dc9f 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinesizes/README.md +++ b/resource-manager/compute/2024-03-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-03-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-03-01/virtualmachinesizes/client.go b/resource-manager/compute/2024-03-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinesizes/client.go +++ b/resource-manager/compute/2024-03-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/compute/2024-03-01/virtualmachinesizes/id_location.go b/resource-manager/compute/2024-03-01/virtualmachinesizes/id_location.go index 9cb3012f4e4..b5a6dbf59ef 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinesizes/id_location.go +++ b/resource-manager/compute/2024-03-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-03-01/virtualmachinesizes/method_list.go b/resource-manager/compute/2024-03-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinesizes/method_list.go +++ b/resource-manager/compute/2024-03-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-03-01/virtualmachinesizes/version.go b/resource-manager/compute/2024-03-01/virtualmachinesizes/version.go index 5f928f804d3..ab65b490ca0 100644 --- a/resource-manager/compute/2024-03-01/virtualmachinesizes/version.go +++ b/resource-manager/compute/2024-03-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2024-03-01" } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/README.md b/resource-manager/compute/2024-07-01/availabilitysets/README.md index c74ea6405d4..5b8769f1831 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/README.md +++ b/resource-manager/compute/2024-07-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/availabilitysets/client.go b/resource-manager/compute/2024-07-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/client.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/method_createorupdate.go b/resource-manager/compute/2024-07-01/availabilitysets/method_createorupdate.go index 886d801ae4a..0fd3b44fe2c 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, id commonids var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/method_get.go b/resource-manager/compute/2024-07-01/availabilitysets/method_get.go index 3c2eb94bfb2..5331c2457d7 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/method_get.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/method_get.go @@ -46,7 +46,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id commonids.Availabili var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/method_listavailablesizes.go b/resource-manager/compute/2024-07-01/availabilitysets/method_listavailablesizes.go index 2e2e96fa619..d47e9dec5a7 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/method_listavailablesizes.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, id commo var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/method_listbysubscription.go b/resource-manager/compute/2024-07-01/availabilitysets/method_listbysubscription.go index 6de26336e6c..44f1ba6844b 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/method_listbysubscription.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/method_update.go b/resource-manager/compute/2024-07-01/availabilitysets/method_update.go index 3784e4c8604..8eb2093ecd2 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/method_update.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/method_update.go @@ -50,7 +50,6 @@ func (c AvailabilitySetsClient) Update(ctx context.Context, id commonids.Availab var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/availabilitysets/version.go b/resource-manager/compute/2024-07-01/availabilitysets/version.go index 82fd51392bb..4c7bd93f14d 100644 --- a/resource-manager/compute/2024-07-01/availabilitysets/version.go +++ b/resource-manager/compute/2024-07-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/capacityreservation/README.md b/resource-manager/compute/2024-07-01/capacityreservation/README.md index 376dcd7c320..c66c3c0efe1 100644 --- a/resource-manager/compute/2024-07-01/capacityreservation/README.md +++ b/resource-manager/compute/2024-07-01/capacityreservation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/capacityreservation` Documentation -The `capacityreservation` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `capacityreservation` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/capacityreservation/client.go b/resource-manager/compute/2024-07-01/capacityreservation/client.go index 63b03839e60..8387846bbe8 100644 --- a/resource-manager/compute/2024-07-01/capacityreservation/client.go +++ b/resource-manager/compute/2024-07-01/capacityreservation/client.go @@ -15,7 +15,7 @@ type CapacityReservationClient struct { } func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/capacityreservation/id_capacityreservationgroup.go b/resource-manager/compute/2024-07-01/capacityreservation/id_capacityreservationgroup.go index 8493ff8f67f..8be7e83d119 100644 --- a/resource-manager/compute/2024-07-01/capacityreservation/id_capacityreservationgroup.go +++ b/resource-manager/compute/2024-07-01/capacityreservation/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/capacityreservation/version.go b/resource-manager/compute/2024-07-01/capacityreservation/version.go index f884c58359a..aeb2c996155 100644 --- a/resource-manager/compute/2024-07-01/capacityreservation/version.go +++ b/resource-manager/compute/2024-07-01/capacityreservation/version.go @@ -1,12 +1,10 @@ package capacityreservation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservation/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/README.md b/resource-manager/compute/2024-07-01/capacityreservationgroups/README.md index f1ab4cf061b..a614d0ff246 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/README.md +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/capacityreservationgroups` Documentation -The `capacityreservationgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `capacityreservationgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/client.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/client.go index 15ced399cbc..088a08cf103 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/client.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/client.go @@ -15,7 +15,7 @@ type CapacityReservationGroupsClient struct { } func NewCapacityReservationGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservationgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservationgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/id_capacityreservationgroup.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/id_capacityreservationgroup.go index 92a9a9e1ae1..eee67dd9eed 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/id_capacityreservationgroup.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/id_capacityreservationgroup.go @@ -42,7 +42,7 @@ func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReserv } id := CapacityReservationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_createorupdate.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_createorupdate.go index 35050e649c5..b2779f3d9df 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, id var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_get.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_get.go index 3aa39e689af..40ec743fa1e 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_get.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationGroupsClient) Get(ctx context.Context, id CapacityRes var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbyresourcegroup.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbyresourcegroup.go index e3708c6a167..471bfa93e53 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbyresourcegroup.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbysubscription.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbysubscription.go index 8e4768628ac..ef48698b737 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbysubscription.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_update.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_update.go index 904fe5ef0fe..0ab0ca706c1 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/method_update.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/method_update.go @@ -49,7 +49,6 @@ func (c CapacityReservationGroupsClient) Update(ctx context.Context, id Capacity var model CapacityReservationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/capacityreservationgroups/version.go b/resource-manager/compute/2024-07-01/capacityreservationgroups/version.go index cd0edfda183..55f0d4f3444 100644 --- a/resource-manager/compute/2024-07-01/capacityreservationgroups/version.go +++ b/resource-manager/compute/2024-07-01/capacityreservationgroups/version.go @@ -1,12 +1,10 @@ package capacityreservationgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservationgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservationgroups/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/capacityreservations/README.md b/resource-manager/compute/2024-07-01/capacityreservations/README.md index 2260895369b..c11b4594deb 100644 --- a/resource-manager/compute/2024-07-01/capacityreservations/README.md +++ b/resource-manager/compute/2024-07-01/capacityreservations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/capacityreservations` Documentation -The `capacityreservations` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `capacityreservations` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/capacityreservations/client.go b/resource-manager/compute/2024-07-01/capacityreservations/client.go index 03bc68e43c5..46407a5fa33 100644 --- a/resource-manager/compute/2024-07-01/capacityreservations/client.go +++ b/resource-manager/compute/2024-07-01/capacityreservations/client.go @@ -15,7 +15,7 @@ type CapacityReservationsClient struct { } func NewCapacityReservationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacityreservations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacityreservations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityReservationsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/capacityreservations/id_capacityreservation.go b/resource-manager/compute/2024-07-01/capacityreservations/id_capacityreservation.go index 0f72f8f4a70..283c492d9c4 100644 --- a/resource-manager/compute/2024-07-01/capacityreservations/id_capacityreservation.go +++ b/resource-manager/compute/2024-07-01/capacityreservations/id_capacityreservation.go @@ -44,7 +44,7 @@ func ParseCapacityReservationID(input string) (*CapacityReservationId, error) { } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityReservationIDInsensitively(input string) (*CapacityReservation } id := CapacityReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/capacityreservations/method_get.go b/resource-manager/compute/2024-07-01/capacityreservations/method_get.go index 745d18a7fc3..b9d6e655ff4 100644 --- a/resource-manager/compute/2024-07-01/capacityreservations/method_get.go +++ b/resource-manager/compute/2024-07-01/capacityreservations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CapacityReservationsClient) Get(ctx context.Context, id CapacityReservat var model CapacityReservation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/capacityreservations/version.go b/resource-manager/compute/2024-07-01/capacityreservations/version.go index 27a9eeb4c43..fb5c9b37f5d 100644 --- a/resource-manager/compute/2024-07-01/capacityreservations/version.go +++ b/resource-manager/compute/2024-07-01/capacityreservations/version.go @@ -1,12 +1,10 @@ package capacityreservations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacityreservations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacityreservations/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/dedicatedhost/README.md b/resource-manager/compute/2024-07-01/dedicatedhost/README.md index 0d4080aaeca..79c2ac9b2b7 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhost/README.md +++ b/resource-manager/compute/2024-07-01/dedicatedhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/dedicatedhost` Documentation -The `dedicatedhost` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `dedicatedhost` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/dedicatedhost/client.go b/resource-manager/compute/2024-07-01/dedicatedhost/client.go index b440c051d61..5c78f75da1d 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhost/client.go +++ b/resource-manager/compute/2024-07-01/dedicatedhost/client.go @@ -15,7 +15,7 @@ type DedicatedHostClient struct { } func NewDedicatedHostClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/dedicatedhost/method_listavailablesizes.go b/resource-manager/compute/2024-07-01/dedicatedhost/method_listavailablesizes.go index 1b928c5d629..b18a354564c 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhost/method_listavailablesizes.go +++ b/resource-manager/compute/2024-07-01/dedicatedhost/method_listavailablesizes.go @@ -47,7 +47,6 @@ func (c DedicatedHostClient) ListAvailableSizes(ctx context.Context, id commonid var model DedicatedHostSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/dedicatedhost/version.go b/resource-manager/compute/2024-07-01/dedicatedhost/version.go index 2880c12c776..b53b2422510 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhost/version.go +++ b/resource-manager/compute/2024-07-01/dedicatedhost/version.go @@ -1,12 +1,10 @@ package dedicatedhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhost/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/README.md b/resource-manager/compute/2024-07-01/dedicatedhostgroups/README.md index 108ab86e39d..ed1db7140e8 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/README.md +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/dedicatedhostgroups` Documentation -The `dedicatedhostgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `dedicatedhostgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/client.go b/resource-manager/compute/2024-07-01/dedicatedhostgroups/client.go index e3ac7c014b1..1198b817462 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/client.go +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/client.go @@ -15,7 +15,7 @@ type DedicatedHostGroupsClient struct { } func NewDedicatedHostGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhostgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_createorupdate.go b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_createorupdate.go index 7696a362908..4b26099152d 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, id common var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_get.go b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_get.go index 7c5f6eba0af..8d31b580668 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_get.go +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostGroupsClient) Get(ctx context.Context, id commonids.Dedicat var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_update.go b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_update.go index 518f4006b01..0bb7d2873f7 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_update.go +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/method_update.go @@ -50,7 +50,6 @@ func (c DedicatedHostGroupsClient) Update(ctx context.Context, id commonids.Dedi var model DedicatedHostGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/dedicatedhostgroups/version.go b/resource-manager/compute/2024-07-01/dedicatedhostgroups/version.go index 5030d131c1b..82c209a1bec 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhostgroups/version.go +++ b/resource-manager/compute/2024-07-01/dedicatedhostgroups/version.go @@ -1,12 +1,10 @@ package dedicatedhostgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhostgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhostgroups/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/dedicatedhosts/README.md b/resource-manager/compute/2024-07-01/dedicatedhosts/README.md index cb6b2fc10da..f4f60963458 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhosts/README.md +++ b/resource-manager/compute/2024-07-01/dedicatedhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/dedicatedhosts` Documentation -The `dedicatedhosts` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `dedicatedhosts` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/dedicatedhosts/client.go b/resource-manager/compute/2024-07-01/dedicatedhosts/client.go index 0b646338795..1f5bf6278f7 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhosts/client.go +++ b/resource-manager/compute/2024-07-01/dedicatedhosts/client.go @@ -15,7 +15,7 @@ type DedicatedHostsClient struct { } func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHostsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/dedicatedhosts/method_get.go b/resource-manager/compute/2024-07-01/dedicatedhosts/method_get.go index 63e85f0ce8b..ae7a03232ad 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhosts/method_get.go +++ b/resource-manager/compute/2024-07-01/dedicatedhosts/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DedicatedHostsClient) Get(ctx context.Context, id commonids.DedicatedHos var model DedicatedHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/dedicatedhosts/version.go b/resource-manager/compute/2024-07-01/dedicatedhosts/version.go index 1f432f98236..d6abdab55a6 100644 --- a/resource-manager/compute/2024-07-01/dedicatedhosts/version.go +++ b/resource-manager/compute/2024-07-01/dedicatedhosts/version.go @@ -1,12 +1,10 @@ package dedicatedhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhosts/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/images/README.md b/resource-manager/compute/2024-07-01/images/README.md index d44678139a8..1594580bbd0 100644 --- a/resource-manager/compute/2024-07-01/images/README.md +++ b/resource-manager/compute/2024-07-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `images` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/images/client.go b/resource-manager/compute/2024-07-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/compute/2024-07-01/images/client.go +++ b/resource-manager/compute/2024-07-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/images/id_image.go b/resource-manager/compute/2024-07-01/images/id_image.go index 8f3964a77c7..c258a9aca61 100644 --- a/resource-manager/compute/2024-07-01/images/id_image.go +++ b/resource-manager/compute/2024-07-01/images/id_image.go @@ -42,7 +42,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/images/method_get.go b/resource-manager/compute/2024-07-01/images/method_get.go index 73320770a28..e68f9e933bb 100644 --- a/resource-manager/compute/2024-07-01/images/method_get.go +++ b/resource-manager/compute/2024-07-01/images/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId, options GetOperationO var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/images/version.go b/resource-manager/compute/2024-07-01/images/version.go index 8197bceccd8..ee1bda2ecf9 100644 --- a/resource-manager/compute/2024-07-01/images/version.go +++ b/resource-manager/compute/2024-07-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/loganalytics/README.md b/resource-manager/compute/2024-07-01/loganalytics/README.md index 96776dde8cc..8c4e06236dd 100644 --- a/resource-manager/compute/2024-07-01/loganalytics/README.md +++ b/resource-manager/compute/2024-07-01/loganalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/loganalytics` Documentation -The `loganalytics` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `loganalytics` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/loganalytics/client.go b/resource-manager/compute/2024-07-01/loganalytics/client.go index 5053f2ddae1..b32a74cf728 100644 --- a/resource-manager/compute/2024-07-01/loganalytics/client.go +++ b/resource-manager/compute/2024-07-01/loganalytics/client.go @@ -15,7 +15,7 @@ type LogAnalyticsClient struct { } func NewLogAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loganalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loganalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogAnalyticsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/loganalytics/id_location.go b/resource-manager/compute/2024-07-01/loganalytics/id_location.go index 63d3f560403..cf24cee10e3 100644 --- a/resource-manager/compute/2024-07-01/loganalytics/id_location.go +++ b/resource-manager/compute/2024-07-01/loganalytics/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/loganalytics/version.go b/resource-manager/compute/2024-07-01/loganalytics/version.go index ddecb830273..3de74eca636 100644 --- a/resource-manager/compute/2024-07-01/loganalytics/version.go +++ b/resource-manager/compute/2024-07-01/loganalytics/version.go @@ -1,12 +1,10 @@ package loganalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loganalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loganalytics/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/README.md b/resource-manager/compute/2024-07-01/proximityplacementgroups/README.md index ae8553fbcec..77f003b419b 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/README.md +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/proximityplacementgroups` Documentation -The `proximityplacementgroups` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `proximityplacementgroups` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/client.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/client.go index 2b737bf0f86..1a6cf3adbc3 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/client.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/client.go @@ -15,7 +15,7 @@ type ProximityPlacementGroupsClient struct { } func NewProximityPlacementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProximityPlacementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proximityplacementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proximityplacementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProximityPlacementGroupsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/id_proximityplacementgroup.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/id_proximityplacementgroup.go index 0c0c7a01d30..0ba2b2d5fa9 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/id_proximityplacementgroup.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/id_proximityplacementgroup.go @@ -42,7 +42,7 @@ func ParseProximityPlacementGroupID(input string) (*ProximityPlacementGroupId, e } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProximityPlacementGroupIDInsensitively(input string) (*ProximityPlacem } id := ProximityPlacementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_createorupdate.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_createorupdate.go index ec5dbe0e33f..b52985d0f6c 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, id P var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_get.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_get.go index 3e2a44fe371..9319acd4f9b 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_get.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProximityPlacementGroupsClient) Get(ctx context.Context, id ProximityPla var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_update.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_update.go index 2e1e1e45fc6..dd8d1e3003a 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/method_update.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/method_update.go @@ -49,7 +49,6 @@ func (c ProximityPlacementGroupsClient) Update(ctx context.Context, id Proximity var model ProximityPlacementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/proximityplacementgroups/version.go b/resource-manager/compute/2024-07-01/proximityplacementgroups/version.go index 722709ef857..dbdba8d12cc 100644 --- a/resource-manager/compute/2024-07-01/proximityplacementgroups/version.go +++ b/resource-manager/compute/2024-07-01/proximityplacementgroups/version.go @@ -1,12 +1,10 @@ package proximityplacementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proximityplacementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proximityplacementgroups/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/README.md b/resource-manager/compute/2024-07-01/restorepointcollections/README.md index 41f77363ff3..9d203257ab8 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/README.md +++ b/resource-manager/compute/2024-07-01/restorepointcollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/restorepointcollections` Documentation -The `restorepointcollections` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `restorepointcollections` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/client.go b/resource-manager/compute/2024-07-01/restorepointcollections/client.go index 816bae4a346..543d327725d 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/client.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/client.go @@ -15,7 +15,7 @@ type RestorePointCollectionsClient struct { } func NewRestorePointCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepointcollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepointcollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointCollectionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/id_restorepointcollection.go b/resource-manager/compute/2024-07-01/restorepointcollections/id_restorepointcollection.go index 5ae5a219829..f10116745d8 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/id_restorepointcollection.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/id_restorepointcollection.go @@ -42,7 +42,7 @@ func ParseRestorePointCollectionID(input string) (*RestorePointCollectionId, err } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorePointCollectionIDInsensitively(input string) (*RestorePointColl } id := RestorePointCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/method_createorupdate.go b/resource-manager/compute/2024-07-01/restorepointcollections/method_createorupdate.go index 6837427e5be..7e9dac346e3 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, id Re var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/method_get.go b/resource-manager/compute/2024-07-01/restorepointcollections/method_get.go index 875f286c7fa..636041d46c6 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/method_get.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointCollectionsClient) Get(ctx context.Context, id RestorePointC var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/method_update.go b/resource-manager/compute/2024-07-01/restorepointcollections/method_update.go index 209e763e72d..3aa41ed97ea 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/method_update.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/method_update.go @@ -49,7 +49,6 @@ func (c RestorePointCollectionsClient) Update(ctx context.Context, id RestorePoi var model RestorePointCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/restorepointcollections/version.go b/resource-manager/compute/2024-07-01/restorepointcollections/version.go index 63f8710d1e6..cd7427acd81 100644 --- a/resource-manager/compute/2024-07-01/restorepointcollections/version.go +++ b/resource-manager/compute/2024-07-01/restorepointcollections/version.go @@ -1,12 +1,10 @@ package restorepointcollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepointcollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepointcollections/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/restorepoints/README.md b/resource-manager/compute/2024-07-01/restorepoints/README.md index dfa86aa25b0..3aa84e9b17a 100644 --- a/resource-manager/compute/2024-07-01/restorepoints/README.md +++ b/resource-manager/compute/2024-07-01/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/restorepoints/client.go b/resource-manager/compute/2024-07-01/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/compute/2024-07-01/restorepoints/client.go +++ b/resource-manager/compute/2024-07-01/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/restorepoints/id_restorepoint.go b/resource-manager/compute/2024-07-01/restorepoints/id_restorepoint.go index 5ffe0e1d42b..853e2a1b58d 100644 --- a/resource-manager/compute/2024-07-01/restorepoints/id_restorepoint.go +++ b/resource-manager/compute/2024-07-01/restorepoints/id_restorepoint.go @@ -44,7 +44,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/restorepoints/method_get.go b/resource-manager/compute/2024-07-01/restorepoints/method_get.go index 1fb0a01b3f8..ccf229525cb 100644 --- a/resource-manager/compute/2024-07-01/restorepoints/method_get.go +++ b/resource-manager/compute/2024-07-01/restorepoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId, options var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/restorepoints/version.go b/resource-manager/compute/2024-07-01/restorepoints/version.go index c74f7505932..7df18b32696 100644 --- a/resource-manager/compute/2024-07-01/restorepoints/version.go +++ b/resource-manager/compute/2024-07-01/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/README.md b/resource-manager/compute/2024-07-01/sshpublickeys/README.md index 8d86dbd657c..6d96c1d5cc8 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/README.md +++ b/resource-manager/compute/2024-07-01/sshpublickeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/sshpublickeys` Documentation -The `sshpublickeys` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `sshpublickeys` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/client.go b/resource-manager/compute/2024-07-01/sshpublickeys/client.go index 60a955db2ea..b1945fe3975 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/client.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/client.go @@ -15,7 +15,7 @@ type SshPublicKeysClient struct { } func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sshpublickeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sshpublickeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SshPublicKeysClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/id_sshpublickey.go b/resource-manager/compute/2024-07-01/sshpublickeys/id_sshpublickey.go index 013618b26f3..4f003a63452 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/id_sshpublickey.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/id_sshpublickey.go @@ -42,7 +42,7 @@ func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error) { } id := SshPublicKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/method_create.go b/resource-manager/compute/2024-07-01/sshpublickeys/method_create.go index 391f084ac1d..d348c2924e1 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/method_create.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/method_create.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/method_generatekeypair.go b/resource-manager/compute/2024-07-01/sshpublickeys/method_generatekeypair.go index c4670a0c432..d0a6f830ed0 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/method_generatekeypair.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/method_generatekeypair.go @@ -50,7 +50,6 @@ func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKe var model SshPublicKeyGenerateKeyPairResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/method_get.go b/resource-manager/compute/2024-07-01/sshpublickeys/method_get.go index 3420ec987c9..dc1c3cbdb02 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/method_get.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/method_get.go @@ -45,7 +45,6 @@ func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/method_update.go b/resource-manager/compute/2024-07-01/sshpublickeys/method_update.go index d697813a6ed..da0970a3389 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/method_update.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/method_update.go @@ -49,7 +49,6 @@ func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, inpu var model SshPublicKeyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/sshpublickeys/version.go b/resource-manager/compute/2024-07-01/sshpublickeys/version.go index e2c2f64c8e7..46a142f8fe2 100644 --- a/resource-manager/compute/2024-07-01/sshpublickeys/version.go +++ b/resource-manager/compute/2024-07-01/sshpublickeys/version.go @@ -1,12 +1,10 @@ package sshpublickeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sshpublickeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sshpublickeys/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/README.md b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/README.md index 5ab51b9b8ca..aeb3af60e51 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachineextensionimages` Documentation -The `virtualmachineextensionimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachineextensionimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/client.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/client.go index baa2d351929..4385ff41033 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionImagesClient struct { } func NewVirtualMachineExtensionImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensionimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_publisher.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_publisher.go index bb19fd74520..88f97b7a6eb 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_publisher.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_type.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_type.go index 9cf3c59da23..bf518ba8702 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_type.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_type.go @@ -44,7 +44,7 @@ func ParseTypeID(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTypeIDInsensitively(input string) (*TypeId, error) { } id := TypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_version.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_version.go index a0e8803b4a0..1ee10989db9 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_version.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_get.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_get.go index b8722c5e7f4..728c7b2ba56 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineExtensionImagesClient) Get(ctx context.Context, id Version var model VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listtypes.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listtypes.go index 706c54f8ec4..b9f09407bc0 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listtypes.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listtypes.go @@ -46,7 +46,6 @@ func (c VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, id P var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listversions.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listversions.go index ad463b163fd..2cedae68952 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listversions.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/method_listversions.go @@ -36,6 +36,7 @@ func (o ListVersionsOperationOptions) ToHeaders() *client.Headers { func (o ListVersionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, i var model []VirtualMachineExtensionImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/version.go b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/version.go index a099147724b..c2a5b96e849 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensionimages/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensionimages/version.go @@ -1,12 +1,10 @@ package virtualmachineextensionimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensionimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensionimages/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/README.md b/resource-manager/compute/2024-07-01/virtualmachineextensions/README.md index 1276055815b..6002258537d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachineextensions` Documentation -The `virtualmachineextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachineextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/client.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/client.go index 4adf20a248c..c049fb742ed 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineExtensionsClient struct { } func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/id_extension.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/id_extension.go index b9ae480741d..19a447ebbbe 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/id_extension.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/id_virtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/id_virtualmachine.go index 50052e6b019..34532cbd2a4 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/id_virtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/method_get.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/method_get.go index 767c337cafb..081bdecb6ff 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) Get(ctx context.Context, id ExtensionId, var model VirtualMachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/method_list.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/method_list.go index b5541f85116..b495c3fa1d5 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineExtensionsClient) List(ctx context.Context, id VirtualMach var model VirtualMachineExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineextensions/version.go b/resource-manager/compute/2024-07-01/virtualmachineextensions/version.go index 088919185a3..8e9eb4066b1 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineextensions/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachineextensions/version.go @@ -1,12 +1,10 @@ package virtualmachineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineextensions/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/README.md b/resource-manager/compute/2024-07-01/virtualmachineimages/README.md index aa96b222b14..a139fca266b 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachineimages` Documentation -The `virtualmachineimages` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachineimages` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/client.go b/resource-manager/compute/2024-07-01/virtualmachineimages/client.go index 3d9912359f8..05c5fd93d49 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/client.go @@ -15,7 +15,7 @@ type VirtualMachineImagesClient struct { } func NewVirtualMachineImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineImagesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezone.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezone.go index 689e0be7e56..770692e1f01 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezone.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezone.go @@ -42,7 +42,7 @@ func ParseEdgeZoneID(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEdgeZoneIDInsensitively(input string) (*EdgeZoneId, error) { } id := EdgeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezonepublisher.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezonepublisher.go index 3838d08d8b8..ef3334834d7 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezonepublisher.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_edgezonepublisher.go @@ -44,7 +44,7 @@ func ParseEdgeZonePublisherID(input string) (*EdgeZonePublisherId, error) { } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeZonePublisherIDInsensitively(input string) (*EdgeZonePublisherId, } id := EdgeZonePublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_location.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_location.go index 21b22ae9152..aa0bd6f123c 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_location.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offer.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offer.go index 40367d1e7b5..821104312e6 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offer.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offer.go @@ -44,7 +44,7 @@ func ParseOfferID(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferIDInsensitively(input string) (*OfferId, error) { } id := OfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offersku.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offersku.go index 91e4a168703..08bca98cb86 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offersku.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offersku.go @@ -48,7 +48,7 @@ func ParseOfferSkuID(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseOfferSkuIDInsensitively(input string) (*OfferSkuId, error) { } id := OfferSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offerskuversion.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offerskuversion.go index dae6d7f61be..4b04850b2ae 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_offerskuversion.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_offerskuversion.go @@ -50,7 +50,7 @@ func ParseOfferSkuVersionID(input string) (*OfferSkuVersionId, error) { } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseOfferSkuVersionIDInsensitively(input string) (*OfferSkuVersionId, erro } id := OfferSkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_publisher.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_publisher.go index 509220be144..785d3f177f0 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_publisher.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_publisher.go @@ -42,7 +42,7 @@ func ParsePublisherID(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublisherIDInsensitively(input string) (*PublisherId, error) { } id := PublisherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_sku.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_sku.go index 935057743f6..34fde30278a 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_sku.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_sku.go @@ -46,7 +46,7 @@ func ParseSkuID(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSkuIDInsensitively(input string) (*SkuId, error) { } id := SkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_skuversion.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_skuversion.go index 2e5d0e9a79c..0172c3e1a70 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_skuversion.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_skuversion.go @@ -48,7 +48,7 @@ func ParseSkuVersionID(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSkuVersionIDInsensitively(input string) (*SkuVersionId, error) { } id := SkuVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/id_vmimageoffer.go b/resource-manager/compute/2024-07-01/virtualmachineimages/id_vmimageoffer.go index 22411c949d8..99ef25c09c5 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/id_vmimageoffer.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/id_vmimageoffer.go @@ -46,7 +46,7 @@ func ParseVMImageOfferID(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVMImageOfferIDInsensitively(input string) (*VMImageOfferId, error) { } id := VMImageOfferId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezoneget.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezoneget.go index d08e473ae5f..aae2bc8618d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezoneget.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezoneget.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) EdgeZoneGet(ctx context.Context, id OfferSku var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelist.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelist.go index ba17ca15382..70e0120daa1 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelist.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelist.go @@ -36,6 +36,7 @@ func (o EdgeZoneListOperationOptions) ToHeaders() *client.Headers { func (o EdgeZoneListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) EdgeZoneList(ctx context.Context, id OfferSk var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistoffers.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistoffers.go index af3bb42c4ba..26cde80c448 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistoffers.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListOffers(ctx context.Context, id E var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistpublishers.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistpublishers.go index 9aadf470f3b..2ed9f07750a 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistpublishers.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListPublishers(ctx context.Context, var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistskus.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistskus.go index 42a5ccfc0ae..62b0005efdd 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistskus.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_edgezonelistskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) EdgeZoneListSkus(ctx context.Context, id VMI var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_get.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_get.go index 3be37d5f899..d9357bbb7dc 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineImagesClient) Get(ctx context.Context, id SkuVersionId) (r var model VirtualMachineImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_list.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_list.go index 2989d0c443a..2d6df70703d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineImagesClient) List(ctx context.Context, id SkuId, options var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listoffers.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listoffers.go index edba237d0ec..b44d982eaaf 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listoffers.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listoffers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListOffers(ctx context.Context, id Publisher var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listpublishers.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listpublishers.go index 0ff57ba69ee..0251298dfe5 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listpublishers.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listpublishers.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListPublishers(ctx context.Context, id Locat var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listskus.go b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listskus.go index 2613d661514..1a3ee479650 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/method_listskus.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/method_listskus.go @@ -46,7 +46,6 @@ func (c VirtualMachineImagesClient) ListSkus(ctx context.Context, id OfferId) (r var model []VirtualMachineImageResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineimages/version.go b/resource-manager/compute/2024-07-01/virtualmachineimages/version.go index fb9a1b29dcc..5a4b164997f 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineimages/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachineimages/version.go @@ -1,12 +1,10 @@ package virtualmachineimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineimages/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/README.md b/resource-manager/compute/2024-07-01/virtualmachineruncommands/README.md index 0ab033f48f7..e657e298660 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachineruncommands` Documentation -The `virtualmachineruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachineruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/client.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/client.go index ee453cd014c..48e134abb29 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineRunCommandsClient struct { } func NewVirtualMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_location.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_location.go index dfd7f350471..e553ed3913e 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_location.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_runcommand.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_runcommand.go index e2bd6f0a575..61f472d53e2 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_runcommand.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_runcommand.go @@ -42,7 +42,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachine.go index 8d098c85c3b..df64bb47d41 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go index 1c90363b725..8b3914c8d71 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/id_virtualmachineruncommand.go @@ -44,7 +44,7 @@ func ParseVirtualMachineRunCommandID(input string) (*VirtualMachineRunCommandId, } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachine } id := VirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_get.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_get.go index 83355bdb92b..465ea8330ad 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineRunCommandsClient) Get(ctx context.Context, id RunCommandI var model RunCommandDocument result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go index c06971e26be..f603e128c0c 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_getbyvirtualmachine.go @@ -34,6 +34,7 @@ func (o GetByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o GetByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go index d3cf5c6296b..739e09cd17f 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/method_listbyvirtualmachine.go @@ -39,6 +39,7 @@ func (o ListByVirtualMachineOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualMachineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachineruncommands/version.go b/resource-manager/compute/2024-07-01/virtualmachineruncommands/version.go index d63001be3ce..92ff1f82651 100644 --- a/resource-manager/compute/2024-07-01/virtualmachineruncommands/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachineruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineruncommands/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/README.md b/resource-manager/compute/2024-07-01/virtualmachines/README.md index 1c73016a48b..e7c156623f2 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachines/client.go b/resource-manager/compute/2024-07-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/id_location.go b/resource-manager/compute/2024-07-01/virtualmachines/id_location.go index 59cc8439152..4a5c1e51c52 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/id_location.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/id_virtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachines/id_virtualmachine.go index 0a676811b3a..9f10e69b236 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_createorupdate.go b/resource-manager/compute/2024-07-01/virtualmachines/method_createorupdate.go index 120d8edf9af..cce467977a6 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_deallocate.go b/resource-manager/compute/2024-07-01/virtualmachines/method_deallocate.go index ae7ee7a0d2b..c962480de36 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_deallocate.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_delete.go b/resource-manager/compute/2024-07-01/virtualmachines/method_delete.go index 7809910a33a..e2d145391fa 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_delete.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_get.go b/resource-manager/compute/2024-07-01/virtualmachines/method_get.go index ca0e72e7b04..610b8728f94 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_instanceview.go b/resource-manager/compute/2024-07-01/virtualmachines/method_instanceview.go index 629b0f65267..735f254f665 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_instanceview.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_instanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) InstanceView(ctx context.Context, id VirtualMachi var model VirtualMachineInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_list.go b/resource-manager/compute/2024-07-01/virtualmachines/method_list.go index 824fde5beb2..64092df3b3a 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_listall.go b/resource-manager/compute/2024-07-01/virtualmachines/method_listall.go index 30caaba2f04..c5abe6abb74 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_listall.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_listall.go @@ -42,6 +42,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_listavailablesizes.go b/resource-manager/compute/2024-07-01/virtualmachines/method_listavailablesizes.go index ade9d529c86..f4ad290ed8b 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_listavailablesizes.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_listavailablesizes.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListAvailableSizes(ctx context.Context, id Virtua var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_poweroff.go b/resource-manager/compute/2024-07-01/virtualmachines/method_poweroff.go index cd9da953583..f5c1b75d289 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_poweroff.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2024-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go index ef782af5c0a..cf8035af464 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/method_update.go b/resource-manager/compute/2024-07-01/virtualmachines/method_update.go index 89a435a1566..96f8c0490ea 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/method_update.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachines/version.go b/resource-manager/compute/2024-07-01/virtualmachines/version.go index a488bf86009..dc813243d60 100644 --- a/resource-manager/compute/2024-07-01/virtualmachines/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/README.md index 992b0d0a6c8..b1c796fc9e4 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions` Documentation -The `virtualmachinescalesetextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesetextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/client.go index 9555c0add8c..8b2f0aa3f61 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetExtensionsClient struct { } func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go index e52fb99c34f..221bbe81a25 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go index eaeca4e6677..c08756824e1 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/id_virtualmachinescalesetextension.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetExtensionID(input string) (*VirtualMachineScaleS } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetExtensionIDInsensitively(input string) (*Virtual } id := VirtualMachineScaleSetExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/method_get.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/method_get.go index 805e9846e65..58bd9a83728 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, id Virt var model VirtualMachineScaleSetExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/version.go index 5c3161acae9..efaf3cb8752 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetextensions/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/README.md index c81ad534c19..fd2fd3f18e0 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades` Documentation -The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesetrollingupgrades` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/client.go index fb39e655c93..2bc32c3839f 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetRollingUpgradesClient struct { } func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetRollingUpgradesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetrollingupgrades", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetRollingUpgradesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go index 73ab65cf8ad..c778cdb85f7 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go index e9dda93541e..647dbb00e17 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/method_getlatest.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Conte var model RollingUpgradeStatusInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/version.go index a2513c84b17..bad1aae5fd9 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetrollingupgrades/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetrollingupgrades -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetrollingupgrades/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md index d801bd3293b..7ecad99c074 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesets` Documentation -The `virtualmachinescalesets` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesets` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go index a08ba8c1d81..0548a7aec67 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetsClient struct { } func NewVirtualMachineScaleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go index a674916111d..65c5f49041d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go index d4542bba1b5..76fb35088a6 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go index 75e8e97e63f..ce61579304c 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go index 45110630048..1965e606c51 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deallocate.go @@ -36,6 +36,7 @@ func (o DeallocateOperationOptions) ToHeaders() *client.Headers { func (o DeallocateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go index 154aacdb1ce..40c53c88532 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go index 375063255ba..ae1057f79fa 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_deleteinstances.go @@ -36,6 +36,7 @@ func (o DeleteInstancesOperationOptions) ToHeaders() *client.Headers { func (o DeleteInstancesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go index 9e2117d6a63..a49b926c058 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_forcerecoveryservicefabricplatformupdatedomainwalk.go @@ -36,6 +36,7 @@ func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToHe func (o ForceRecoveryServiceFabricPlatformUpdateDomainWalkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateD var model RecoveryWalkResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go index 1a1c806d33a..4ade8c757e1 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetsClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineScaleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go index b79b350b676..4e409bb9b3b 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, id V var model VirtualMachineScaleSetInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go index 3b0e524f55b..0b805fc3b55 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go index 4a22fdf65cf..f508f4deebf 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go index 1cd085583d2..2d49a76bf5a 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesets/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesets/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/README.md index 863fa866925..3b1fd9e172e 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions` Documentation -The `virtualmachinescalesetvmextensions` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesetvmextensions` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/client.go index ee3be0e3e80..384674618ef 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMExtensionsClient struct { } func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMExtensionsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go index 5bed9de5aa5..031846e1de7 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachineextension.go @@ -46,7 +46,7 @@ func ParseVirtualMachineExtensionID(input string) (*VirtualMachineExtensionId, e } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineExtensionIDInsensitively(input string) (*VirtualMachineE } id := VirtualMachineExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go index 00ba634a6da..461b5781ea3 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_get.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_get.go index 734208e2c2b..03923b1ef4d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, id Vi var model VirtualMachineScaleSetVMExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_list.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_list.go index d9cdfbdcc60..300d802904c 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, id V var model VirtualMachineScaleSetVMExtensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/version.go index e3aeca3bf37..018f404fb61 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmextensions/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmextensions/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/README.md index da72965beda..31d7652d952 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands` Documentation -The `virtualmachinescalesetvmruncommands` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesetvmruncommands` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/client.go index 65dba565153..fb8224b7dda 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMRunCommandsClient struct { } func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvmruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMRunCommandsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go index 4342ff0b57d..48139ac644b 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go index e229cb64fb0..98f6dff8b2b 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/id_virtualmachinescalesetvirtualmachineruncommand.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*Virtu } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input st } id := VirtualMachineScaleSetVirtualMachineRunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_get.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_get.go index 35fe308862d..7504f816267 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, id V var model VirtualMachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_list.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_list.go index d335e2247cf..14ad4b942ca 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/version.go index e434a15a981..3114dce1aef 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvmruncommands/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvmruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvmruncommands/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/README.md b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/README.md index b3c52b6c762..c71075416f0 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinescalesetvms` Documentation -The `virtualmachinescalesetvms` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinescalesetvms` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/client.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/client.go index d86b351fd86..61a216f26bf 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/client.go @@ -15,7 +15,7 @@ type VirtualMachineScaleSetVMsClient struct { } func NewVirtualMachineScaleSetVMsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinescalesetvms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineScaleSetVMsClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go index 83349156568..50f34af693e 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go index 5e77406f79c..fa37f879ec7 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/id_virtualmachinescalesetvirtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineS } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*Vi } id := VirtualMachineScaleSetVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_delete.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_delete.go index 70ab6260f49..2c4fdb5bb39 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_delete.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_get.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_get.go index 54f1a9f63ea..48056f0eab3 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_get.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) Get(ctx context.Context, id VirtualMach var model VirtualMachineScaleSetVM result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_getinstanceview.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_getinstanceview.go index 67764259f28..d2e27a1295d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_getinstanceview.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_getinstanceview.go @@ -46,7 +46,6 @@ func (c VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, id var model VirtualMachineScaleSetVMInstanceView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_list.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_list.go index 25828909629..bb09ed5d71a 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_poweroff.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_poweroff.go index 1b450b80bfa..cbe987a9165 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_poweroff.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_poweroff.go @@ -36,6 +36,7 @@ func (o PowerOffOperationOptions) ToHeaders() *client.Headers { func (o PowerOffOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go index 29eb32435dd..a93248b3042 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_retrievebootdiagnosticsdata.go @@ -34,6 +34,7 @@ func (o RetrieveBootDiagnosticsDataOperationOptions) ToHeaders() *client.Headers func (o RetrieveBootDiagnosticsDataOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context var model RetrieveBootDiagnosticsDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_update.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_update.go index c63bdf8b2cd..e08fda7ace4 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_update.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/method_update.go @@ -43,6 +43,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/version.go b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/version.go index 443e641b804..c667622e9be 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinescalesetvms/version.go @@ -1,12 +1,10 @@ package virtualmachinescalesetvms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinescalesetvms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinescalesetvms/2024-07-01" } diff --git a/resource-manager/compute/2024-07-01/virtualmachinesizes/README.md b/resource-manager/compute/2024-07-01/virtualmachinesizes/README.md index 47ea108da39..5f478ab5b9d 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinesizes/README.md +++ b/resource-manager/compute/2024-07-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `compute` (API Version `2024-07-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `compute` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/compute/2024-07-01/virtualmachinesizes/client.go b/resource-manager/compute/2024-07-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinesizes/client.go +++ b/resource-manager/compute/2024-07-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/compute/2024-07-01/virtualmachinesizes/id_location.go b/resource-manager/compute/2024-07-01/virtualmachinesizes/id_location.go index 9cb3012f4e4..b5a6dbf59ef 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinesizes/id_location.go +++ b/resource-manager/compute/2024-07-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/compute/2024-07-01/virtualmachinesizes/method_list.go b/resource-manager/compute/2024-07-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinesizes/method_list.go +++ b/resource-manager/compute/2024-07-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/compute/2024-07-01/virtualmachinesizes/version.go b/resource-manager/compute/2024-07-01/virtualmachinesizes/version.go index 5726552fa0a..261a9cd02ea 100644 --- a/resource-manager/compute/2024-07-01/virtualmachinesizes/version.go +++ b/resource-manager/compute/2024-07-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2024-07-01" } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md b/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md index 71869deb544..f19757c50d6 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger` Documentation -The `confidentialledger` SDK allows for interaction with the Azure Resource Manager Service `confidentialledger` (API Version `2022-05-13`). +The `confidentialledger` SDK allows for interaction with Azure Resource Manager `confidentialledger` (API Version `2022-05-13`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/client.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/client.go index 7bcdb08b106..fce0c86160b 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/client.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/client.go @@ -15,7 +15,7 @@ type ConfidentialLedgerClient struct { } func NewConfidentialLedgerClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfidentialLedgerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "confidentialledger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "confidentialledger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfidentialLedgerClient: %+v", err) } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go index 91e8f79a51c..1a0a24ccd21 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/id_ledger.go @@ -42,7 +42,7 @@ func ParseLedgerID(input string) (*LedgerId, error) { } id := LedgerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLedgerIDInsensitively(input string) (*LedgerId, error) { } id := LedgerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget.go index 35e2ca0d5e9..bce71ae3ee0 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerget.go @@ -45,7 +45,6 @@ func (c ConfidentialLedgerClient) LedgerGet(ctx context.Context, id LedgerId) (r var model ConfidentialLedger result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup.go index 01152022317..e99e3026b91 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbyresourcegroup.go @@ -40,6 +40,7 @@ func (o LedgerListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o LedgerListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription.go index a74fc3e73a6..5151a16bcc0 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/method_ledgerlistbysubscription.go @@ -40,6 +40,7 @@ func (o LedgerListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o LedgerListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/confidentialledger/2022-05-13/confidentialledger/version.go b/resource-manager/confidentialledger/2022-05-13/confidentialledger/version.go index 2528fa3818c..2efc1988852 100644 --- a/resource-manager/confidentialledger/2022-05-13/confidentialledger/version.go +++ b/resource-manager/confidentialledger/2022-05-13/confidentialledger/version.go @@ -1,12 +1,10 @@ package confidentialledger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-13" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/confidentialledger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/confidentialledger/2022-05-13" } diff --git a/resource-manager/confidentialledger/2022-05-13/nameavailability/README.md b/resource-manager/confidentialledger/2022-05-13/nameavailability/README.md index 27ac0c65ce2..69b1f4bb066 100644 --- a/resource-manager/confidentialledger/2022-05-13/nameavailability/README.md +++ b/resource-manager/confidentialledger/2022-05-13/nameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/nameavailability` Documentation -The `nameavailability` SDK allows for interaction with the Azure Resource Manager Service `confidentialledger` (API Version `2022-05-13`). +The `nameavailability` SDK allows for interaction with Azure Resource Manager `confidentialledger` (API Version `2022-05-13`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/confidentialledger/2022-05-13/nameavailability/client.go b/resource-manager/confidentialledger/2022-05-13/nameavailability/client.go index c04cb60595d..f2f16d23618 100644 --- a/resource-manager/confidentialledger/2022-05-13/nameavailability/client.go +++ b/resource-manager/confidentialledger/2022-05-13/nameavailability/client.go @@ -15,7 +15,7 @@ type NameAvailabilityClient struct { } func NewNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*NameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NameAvailabilityClient: %+v", err) } diff --git a/resource-manager/confidentialledger/2022-05-13/nameavailability/method_checknameavailability.go b/resource-manager/confidentialledger/2022-05-13/nameavailability/method_checknameavailability.go index 029fa0ddf79..579945bc676 100644 --- a/resource-manager/confidentialledger/2022-05-13/nameavailability/method_checknameavailability.go +++ b/resource-manager/confidentialledger/2022-05-13/nameavailability/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NameAvailabilityClient) CheckNameAvailability(ctx context.Context, id co var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/confidentialledger/2022-05-13/nameavailability/version.go b/resource-manager/confidentialledger/2022-05-13/nameavailability/version.go index fe882a9cecf..cc0d503be8e 100644 --- a/resource-manager/confidentialledger/2022-05-13/nameavailability/version.go +++ b/resource-manager/confidentialledger/2022-05-13/nameavailability/version.go @@ -1,12 +1,10 @@ package nameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-13" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nameavailability/2022-05-13" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/README.md b/resource-manager/connectedvmware/2022-01-10-preview/clusters/README.md index dfea17ef94c..eef84c70a68 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `clusters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/client.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/id_cluster.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/id_cluster.go index ccbaf362f6d..3cff30b86ba 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/id_cluster.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_delete.go index 4bafe4f34f0..d07a1e6c0f4 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_update.go index f6061c7bbf9..8285929e596 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/method_update.go @@ -49,7 +49,6 @@ func (c ClustersClient) Update(ctx context.Context, id ClusterId, input Resource var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/clusters/version.go b/resource-manager/connectedvmware/2022-01-10-preview/clusters/version.go index 23db10c9013..4cb76e51a91 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/clusters/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/README.md b/resource-manager/connectedvmware/2022-01-10-preview/datastores/README.md index 2e61acb5f7a..b529679dde4 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `datastores` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/client.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/id_datastore.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/id_datastore.go index 4fda75496d0..d1de40aa124 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/id_datastore.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/id_datastore.go @@ -42,7 +42,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_delete.go index 299de11dc57..0c3f3492052 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_update.go index 96ce4801235..3b6c5cbb9fe 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/method_update.go @@ -49,7 +49,6 @@ func (c DataStoresClient) Update(ctx context.Context, id DataStoreId, input Reso var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/datastores/version.go b/resource-manager/connectedvmware/2022-01-10-preview/datastores/version.go index e019889a26d..24a78e5ed9c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/datastores/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/README.md b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/README.md index 382c83e421f..db4e3e2a8a3 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/guestagents` Documentation -The `guestagents` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `guestagents` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/client.go b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/client.go index 8b3899fa940..8bafe6eb1b9 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/client.go @@ -15,7 +15,7 @@ type GuestAgentsClient struct { } func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestAgentsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_guestagent.go b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_guestagent.go index 8856c4278f6..d08c3b5de9e 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_guestagent.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_guestagent.go @@ -44,7 +44,7 @@ func ParseGuestAgentID(input string) (*GuestAgentId, error) { } id := GuestAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestAgentIDInsensitively(input string) (*GuestAgentId, error) { } id := GuestAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_virtualmachine.go b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_virtualmachine.go index 525224beb63..6490f37cd1b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_virtualmachine.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/method_get.go index 724523accac..905f483608e 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/method_get.go @@ -45,7 +45,6 @@ func (c GuestAgentsClient) Get(ctx context.Context, id GuestAgentId) (result Get var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/version.go b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/version.go index 62b09bd32c5..8b94a64de3c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/guestagents/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/guestagents/version.go @@ -1,12 +1,10 @@ package guestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestagents/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/README.md b/resource-manager/connectedvmware/2022-01-10-preview/hosts/README.md index cc92400c9a4..45d7270a889 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `hosts` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/client.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/id_host.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/id_host.go index 95adc6e4b2a..7b80694c80e 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/id_host.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/id_host.go @@ -42,7 +42,7 @@ func ParseHostID(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_delete.go index 9a7b641d869..83d7acd3f14 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_get.go index f9a9efb6940..c68204523ce 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_get.go @@ -45,7 +45,6 @@ func (c HostsClient) Get(ctx context.Context, id HostId) (result GetOperationRes var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_update.go index eb34aa8fa32..8e37b22cf9d 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/method_update.go @@ -49,7 +49,6 @@ func (c HostsClient) Update(ctx context.Context, id HostId, input ResourcePatch) var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hosts/version.go b/resource-manager/connectedvmware/2022-01-10-preview/hosts/version.go index ce887f70886..c773590b5f8 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hosts/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/README.md b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/README.md index f17fc623790..7d6cab5c55f 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata` Documentation -The `hybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `hybrididentitymetadata` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/client.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/client.go index 597657e5901..94125d9df11 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/client.go @@ -15,7 +15,7 @@ type HybridIdentityMetadataClient struct { } func NewHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridIdentityMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridIdentityMetadataClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_hybrididentitymetadata.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_hybrididentitymetadata.go index a6d4f445e35..d3258362ecb 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_hybrididentitymetadata.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_hybrididentitymetadata.go @@ -44,7 +44,7 @@ func ParseHybridIdentityMetadataID(input string) (*HybridIdentityMetadataId, err } id := HybridIdentityMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridIdentityMetadataIDInsensitively(input string) (*HybridIdentityMe } id := HybridIdentityMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_virtualmachine.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_virtualmachine.go index e754b5d02ea..5eb6d094b1b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_virtualmachine.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_create.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_create.go index 68fb3f13365..692441ce2db 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_create.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_create.go @@ -49,7 +49,6 @@ func (c HybridIdentityMetadataClient) Create(ctx context.Context, id HybridIdent var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_get.go index 3aeab72c3b8..6ed3a97b3ef 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/method_get.go @@ -45,7 +45,6 @@ func (c HybridIdentityMetadataClient) Get(ctx context.Context, id HybridIdentity var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/version.go b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/version.go index 9b74a9a2bef..71f0ebc3ed6 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/hybrididentitymetadata/version.go @@ -1,12 +1,10 @@ package hybrididentitymetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybrididentitymetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybrididentitymetadata/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/README.md b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/README.md index b4e98c37719..062279483f2 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems` Documentation -The `inventoryitems` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `inventoryitems` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/client.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/client.go index fbe00f649cc..d0909622b9a 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/client.go @@ -15,7 +15,7 @@ type InventoryItemsClient struct { } func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inventoryitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inventoryitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InventoryItemsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_inventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_inventoryitem.go index 466a0d2f1fc..55bc11ca276 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_inventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_inventoryitem.go @@ -44,7 +44,7 @@ func ParseInventoryItemID(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_vcenter.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_vcenter.go index 2bdff43b9bb..7449c16a7b9 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_vcenter.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_create.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_create.go index 05ee4a39269..be8145868f8 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_create.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_create.go @@ -49,7 +49,6 @@ func (c InventoryItemsClient) Create(ctx context.Context, id InventoryItemId, in var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_get.go index 4df52d77cdc..c143a4f83ea 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/method_get.go @@ -45,7 +45,6 @@ func (c InventoryItemsClient) Get(ctx context.Context, id InventoryItemId) (resu var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_clusterinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_clusterinventoryitem.go index aa7b9bef37a..9c512e78aa3 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_clusterinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_clusterinventoryitem.go @@ -13,10 +13,22 @@ var _ InventoryItemProperties = ClusterInventoryItem{} type ClusterInventoryItem struct { // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s ClusterInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = ClusterInventoryItem{} @@ -30,9 +42,10 @@ func (s ClusterInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterInventoryItem: %+v", err) } + decoded["inventoryType"] = "Cluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_datastoreinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_datastoreinventoryitem.go index 7ac97600645..88063f1dffb 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_datastoreinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_datastoreinventoryitem.go @@ -15,10 +15,22 @@ type DatastoreInventoryItem struct { FreeSpaceGB *int64 `json:"freeSpaceGB,omitempty"` // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s DatastoreInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = DatastoreInventoryItem{} @@ -32,9 +44,10 @@ func (s DatastoreInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatastoreInventoryItem: %+v", err) } + decoded["inventoryType"] = "Datastore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_hostinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_hostinventoryitem.go index 5199ae48bdb..de48050dfa2 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_hostinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_hostinventoryitem.go @@ -14,10 +14,22 @@ type HostInventoryItem struct { Parent *InventoryItemDetails `json:"parent,omitempty"` // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s HostInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = HostInventoryItem{} @@ -31,9 +43,10 @@ func (s HostInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HostInventoryItem: %+v", err) } + decoded["inventoryType"] = "Host" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitem.go index 92f80c1062d..c941ca67a24 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitem.go @@ -40,7 +40,7 @@ func (s *InventoryItem) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInventoryItemPropertiesImplementation(v) + impl, err := UnmarshalInventoryItemPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'InventoryItem': %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitemproperties.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitemproperties.go index 585d050785c..f4f074a78b5 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitemproperties.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_inventoryitemproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InventoryItemProperties interface { + InventoryItemProperties() BaseInventoryItemPropertiesImpl } -// RawInventoryItemPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InventoryItemProperties = BaseInventoryItemPropertiesImpl{} + +type BaseInventoryItemPropertiesImpl struct { + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s BaseInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s +} + +var _ InventoryItemProperties = RawInventoryItemPropertiesImpl{} + +// RawInventoryItemPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInventoryItemPropertiesImpl struct { - Type string - Values map[string]interface{} + inventoryItemProperties BaseInventoryItemPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s.inventoryItemProperties } -func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { +func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItem return out, nil } - out := RawInventoryItemPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInventoryItemPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInventoryItemPropertiesImpl: %+v", err) } - return out, nil + + return RawInventoryItemPropertiesImpl{ + inventoryItemProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_resourcepoolinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_resourcepoolinventoryitem.go index 644e3e2514b..5638032cc91 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_resourcepoolinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_resourcepoolinventoryitem.go @@ -14,10 +14,22 @@ type ResourcePoolInventoryItem struct { Parent *InventoryItemDetails `json:"parent,omitempty"` // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s ResourcePoolInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = ResourcePoolInventoryItem{} @@ -31,9 +43,10 @@ func (s ResourcePoolInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourcePoolInventoryItem: %+v", err) } + decoded["inventoryType"] = "ResourcePool" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachineinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachineinventoryitem.go index 49e47117206..8ae09a2a0c9 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachineinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachineinventoryitem.go @@ -25,10 +25,22 @@ type VirtualMachineInventoryItem struct { ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"` // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s VirtualMachineInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = VirtualMachineInventoryItem{} @@ -42,9 +54,10 @@ func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachinetemplateinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachinetemplateinventoryitem.go index c57f9e9a574..894ac12ded2 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachinetemplateinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualmachinetemplateinventoryitem.go @@ -19,10 +19,22 @@ type VirtualMachineTemplateInventoryItem struct { OsType *OsType `json:"osType,omitempty"` // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s VirtualMachineTemplateInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = VirtualMachineTemplateInventoryItem{} @@ -36,9 +48,10 @@ func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTemplateInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachineTemplate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualnetworkinventoryitem.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualnetworkinventoryitem.go index af6c686cc81..d6b28c85a04 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualnetworkinventoryitem.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/model_virtualnetworkinventoryitem.go @@ -13,10 +13,22 @@ var _ InventoryItemProperties = VirtualNetworkInventoryItem{} type VirtualNetworkInventoryItem struct { // Fields inherited from InventoryItemProperties - ManagedResourceId *string `json:"managedResourceId,omitempty"` - MoName *string `json:"moName,omitempty"` - MoRefId *string `json:"moRefId,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +func (s VirtualNetworkInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } } var _ json.Marshaler = VirtualNetworkInventoryItem{} @@ -30,9 +42,10 @@ func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualNetworkInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualNetwork" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/version.go b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/version.go index 028a807a214..c26dc99c22c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/inventoryitems/version.go @@ -1,12 +1,10 @@ package inventoryitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inventoryitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inventoryitems/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/README.md b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/README.md index 36e34b1d786..e23d8e644fe 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/machineextensions` Documentation -The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `machineextensions` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/client.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/client.go index a4336266a29..63a73f0818b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/client.go @@ -15,7 +15,7 @@ type MachineExtensionsClient struct { } func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_extension.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_extension.go index b70f7db3f26..7ba43d287a0 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_extension.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_virtualmachine.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_virtualmachine.go index 200415522e0..118d5fd83bb 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_virtualmachine.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_get.go index e21d210a448..de726cb7687 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_get.go @@ -45,7 +45,6 @@ func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (resul var model MachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_list.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_list.go index e7b571e829d..bd2bd78c9e5 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_list.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/version.go b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/version.go index 5c594b79218..416597d296b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/machineextensions/version.go @@ -1,12 +1,10 @@ package machineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensions/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/README.md b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/README.md index 8f4749c7f2a..0b92ec2f55d 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/resourcepools` Documentation -The `resourcepools` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `resourcepools` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/client.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/client.go index e62fc2bf47f..36e6ae7bf0b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/client.go @@ -15,7 +15,7 @@ type ResourcePoolsClient struct { } func NewResourcePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcePoolsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/id_resourcepool.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/id_resourcepool.go index d12b87a8394..21af50f5ff5 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/id_resourcepool.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/id_resourcepool.go @@ -42,7 +42,7 @@ func ParseResourcePoolID(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourcePoolIDInsensitively(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_delete.go index 63f60c2259f..576de10e86b 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_get.go index d08e1e3323b..6468d5daf85 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_get.go @@ -45,7 +45,6 @@ func (c ResourcePoolsClient) Get(ctx context.Context, id ResourcePoolId) (result var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_update.go index 58628b6cb6c..82e41381802 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/method_update.go @@ -49,7 +49,6 @@ func (c ResourcePoolsClient) Update(ctx context.Context, id ResourcePoolId, inpu var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/version.go b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/version.go index 1e843a52c02..00be804d260 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/resourcepools/version.go @@ -1,12 +1,10 @@ package resourcepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcepools/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/README.md b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/README.md index a9a50d1e672..ef7469ac012 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/vcenters` Documentation -The `vcenters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `vcenters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/client.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/client.go index 2ac439c076d..3b01bea0a6c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/client.go @@ -15,7 +15,7 @@ type VCentersClient struct { } func NewVCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*VCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VCentersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/id_vcenter.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/id_vcenter.go index 1cc53342784..1ab482df1f6 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/id_vcenter.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_delete.go index c4941732776..cc2539f03d3 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_get.go index acb1d306643..f157d201a3c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_get.go @@ -45,7 +45,6 @@ func (c VCentersClient) Get(ctx context.Context, id VCenterId) (result GetOperat var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_update.go index e670bfec2f8..48758168402 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/method_update.go @@ -49,7 +49,6 @@ func (c VCentersClient) Update(ctx context.Context, id VCenterId, input Resource var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/version.go b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/version.go index fd6da14fee8..d3d4682c955 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/vcenters/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/vcenters/version.go @@ -1,12 +1,10 @@ package vcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vcenters/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/README.md b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/README.md index 45f047ae346..e92dbf69afb 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/client.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/id_virtualmachine.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/id_virtualmachine.go index a20cf98df30..6defdb9f706 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/id_virtualmachine.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_delete.go index f6674483828..d3a71abf29c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_get.go index 05c63620238..b3c70a159d8 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId) (re var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/version.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/version.go index b5526d66332..f437c4dd16d 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/README.md b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/README.md index 6ef87294cb8..825d142d57c 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates` Documentation -The `virtualmachinetemplates` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `virtualmachinetemplates` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/client.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/client.go index 12c5314c789..fc11bf98a1a 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/client.go @@ -15,7 +15,7 @@ type VirtualMachineTemplatesClient struct { } func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineTemplatesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/id_virtualmachinetemplate.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/id_virtualmachinetemplate.go index 6cb805ff3db..f3d50aced14 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/id_virtualmachinetemplate.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/id_virtualmachinetemplate.go @@ -42,7 +42,7 @@ func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, err } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTe } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_delete.go index d77b5e05ab1..84305515bf1 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_get.go index 9792aa1db2b..379f0f21ea4 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineTemplatesClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_update.go index 3dd48db9cfe..fba15dbdb78 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/method_update.go @@ -49,7 +49,6 @@ func (c VirtualMachineTemplatesClient) Update(ctx context.Context, id VirtualMac var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/version.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/version.go index 23bb9970f59..680e40e899f 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualmachinetemplates/version.go @@ -1,12 +1,10 @@ package virtualmachinetemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinetemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinetemplates/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/README.md b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/README.md index 68c60e97725..d51a0a6d1eb 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/README.md +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2022-01-10-preview`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2022-01-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/client.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/client.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/id_virtualnetwork.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/id_virtualnetwork.go index 3295c21af0e..32e9068aa43 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_delete.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_delete.go index 53c2f55721a..995fcdb49b3 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_delete.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_get.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_get.go index a27c17c1604..273f0922d91 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_get.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (re var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_update.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_update.go index 21e8697a539..5aaee78c48f 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_update.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/method_update.go @@ -49,7 +49,6 @@ func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/version.go b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/version.go index d383cc97c56..82b6506b4c1 100644 --- a/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/version.go +++ b/resource-manager/connectedvmware/2022-01-10-preview/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2022-01-10-preview" } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/README.md b/resource-manager/connectedvmware/2023-10-01/clusters/README.md index 0e197b5f501..c20a215dbd6 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/README.md +++ b/resource-manager/connectedvmware/2023-10-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/client.go b/resource-manager/connectedvmware/2023-10-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/client.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/id_cluster.go b/resource-manager/connectedvmware/2023-10-01/clusters/id_cluster.go index ccbaf362f6d..3cff30b86ba 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/id_cluster.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/method_delete.go b/resource-manager/connectedvmware/2023-10-01/clusters/method_delete.go index 4bafe4f34f0..d07a1e6c0f4 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/method_get.go b/resource-manager/connectedvmware/2023-10-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/method_update.go b/resource-manager/connectedvmware/2023-10-01/clusters/method_update.go index f6061c7bbf9..8285929e596 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/method_update.go @@ -49,7 +49,6 @@ func (c ClustersClient) Update(ctx context.Context, id ClusterId, input Resource var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/clusters/version.go b/resource-manager/connectedvmware/2023-10-01/clusters/version.go index a15c19d0571..94466f22125 100644 --- a/resource-manager/connectedvmware/2023-10-01/clusters/version.go +++ b/resource-manager/connectedvmware/2023-10-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/README.md b/resource-manager/connectedvmware/2023-10-01/datastores/README.md index 21224ff9407..f908923a7a3 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/README.md +++ b/resource-manager/connectedvmware/2023-10-01/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `datastores` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/client.go b/resource-manager/connectedvmware/2023-10-01/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/client.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/id_datastore.go b/resource-manager/connectedvmware/2023-10-01/datastores/id_datastore.go index 4fda75496d0..d1de40aa124 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/id_datastore.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/id_datastore.go @@ -42,7 +42,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/method_delete.go b/resource-manager/connectedvmware/2023-10-01/datastores/method_delete.go index 299de11dc57..0c3f3492052 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/method_get.go b/resource-manager/connectedvmware/2023-10-01/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/method_update.go b/resource-manager/connectedvmware/2023-10-01/datastores/method_update.go index 96ce4801235..3b6c5cbb9fe 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/method_update.go @@ -49,7 +49,6 @@ func (c DataStoresClient) Update(ctx context.Context, id DataStoreId, input Reso var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/datastores/version.go b/resource-manager/connectedvmware/2023-10-01/datastores/version.go index 5b2f87d855c..0db6f9bcdd3 100644 --- a/resource-manager/connectedvmware/2023-10-01/datastores/version.go +++ b/resource-manager/connectedvmware/2023-10-01/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/README.md b/resource-manager/connectedvmware/2023-10-01/hosts/README.md index b5f3970cf67..1df65cbe2a7 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/README.md +++ b/resource-manager/connectedvmware/2023-10-01/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `hosts` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/client.go b/resource-manager/connectedvmware/2023-10-01/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/client.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/id_host.go b/resource-manager/connectedvmware/2023-10-01/hosts/id_host.go index 95adc6e4b2a..7b80694c80e 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/id_host.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/id_host.go @@ -42,7 +42,7 @@ func ParseHostID(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/method_delete.go b/resource-manager/connectedvmware/2023-10-01/hosts/method_delete.go index 9a7b641d869..83d7acd3f14 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/method_get.go b/resource-manager/connectedvmware/2023-10-01/hosts/method_get.go index f9a9efb6940..c68204523ce 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/method_get.go @@ -45,7 +45,6 @@ func (c HostsClient) Get(ctx context.Context, id HostId) (result GetOperationRes var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/method_update.go b/resource-manager/connectedvmware/2023-10-01/hosts/method_update.go index eb34aa8fa32..8e37b22cf9d 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/method_update.go @@ -49,7 +49,6 @@ func (c HostsClient) Update(ctx context.Context, id HostId, input ResourcePatch) var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/hosts/version.go b/resource-manager/connectedvmware/2023-10-01/hosts/version.go index 5e8f4e29e5c..d17f8a26ef6 100644 --- a/resource-manager/connectedvmware/2023-10-01/hosts/version.go +++ b/resource-manager/connectedvmware/2023-10-01/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/README.md b/resource-manager/connectedvmware/2023-10-01/inventoryitems/README.md index 956d823f43e..667cc23b87f 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/README.md +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/inventoryitems` Documentation -The `inventoryitems` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `inventoryitems` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/client.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/client.go index fbe00f649cc..d0909622b9a 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/client.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/client.go @@ -15,7 +15,7 @@ type InventoryItemsClient struct { } func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inventoryitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inventoryitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InventoryItemsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_inventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_inventoryitem.go index 466a0d2f1fc..55bc11ca276 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_inventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_inventoryitem.go @@ -44,7 +44,7 @@ func ParseInventoryItemID(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_vcenter.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_vcenter.go index 2bdff43b9bb..7449c16a7b9 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_vcenter.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_create.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_create.go index 05ee4a39269..be8145868f8 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_create.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_create.go @@ -49,7 +49,6 @@ func (c InventoryItemsClient) Create(ctx context.Context, id InventoryItemId, in var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_get.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_get.go index 4df52d77cdc..c143a4f83ea 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/method_get.go @@ -45,7 +45,6 @@ func (c InventoryItemsClient) Get(ctx context.Context, id InventoryItemId) (resu var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_clusterinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_clusterinventoryitem.go index 57560e84429..1791c0423ef 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_clusterinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_clusterinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = ClusterInventoryItem{} type ClusterInventoryItem struct { // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s ClusterInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = ClusterInventoryItem{} func (s ClusterInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s ClusterInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterInventoryItem: %+v", err) } + decoded["inventoryType"] = "Cluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_datastoreinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_datastoreinventoryitem.go index 8024d751803..232fdd82201 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_datastoreinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_datastoreinventoryitem.go @@ -15,12 +15,24 @@ type DatastoreInventoryItem struct { FreeSpaceGB *int64 `json:"freeSpaceGB,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s DatastoreInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = DatastoreInventoryItem{} func (s DatastoreInventoryItem) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s DatastoreInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatastoreInventoryItem: %+v", err) } + decoded["inventoryType"] = "Datastore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_hostinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_hostinventoryitem.go index 275e548f1de..4fe8986152a 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_hostinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_hostinventoryitem.go @@ -14,12 +14,24 @@ type HostInventoryItem struct { Parent *InventoryItemDetails `json:"parent,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s HostInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = HostInventoryItem{} func (s HostInventoryItem) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s HostInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HostInventoryItem: %+v", err) } + decoded["inventoryType"] = "Host" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitem.go index 92f80c1062d..c941ca67a24 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitem.go @@ -40,7 +40,7 @@ func (s *InventoryItem) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInventoryItemPropertiesImplementation(v) + impl, err := UnmarshalInventoryItemPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'InventoryItem': %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitemproperties.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitemproperties.go index 585d050785c..090af1f1343 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitemproperties.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_inventoryitemproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InventoryItemProperties interface { + InventoryItemProperties() BaseInventoryItemPropertiesImpl } -// RawInventoryItemPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InventoryItemProperties = BaseInventoryItemPropertiesImpl{} + +type BaseInventoryItemPropertiesImpl struct { + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s +} + +var _ InventoryItemProperties = RawInventoryItemPropertiesImpl{} + +// RawInventoryItemPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInventoryItemPropertiesImpl struct { - Type string - Values map[string]interface{} + inventoryItemProperties BaseInventoryItemPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s.inventoryItemProperties } -func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { +func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItem return out, nil } - out := RawInventoryItemPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInventoryItemPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInventoryItemPropertiesImpl: %+v", err) } - return out, nil + + return RawInventoryItemPropertiesImpl{ + inventoryItemProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_resourcepoolinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_resourcepoolinventoryitem.go index 34355eafd17..c25f9496c04 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_resourcepoolinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_resourcepoolinventoryitem.go @@ -14,12 +14,24 @@ type ResourcePoolInventoryItem struct { Parent *InventoryItemDetails `json:"parent,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s ResourcePoolInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = ResourcePoolInventoryItem{} func (s ResourcePoolInventoryItem) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ResourcePoolInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourcePoolInventoryItem: %+v", err) } + decoded["inventoryType"] = "ResourcePool" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachineinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachineinventoryitem.go index 09ab975c332..ed19d11d5ff 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachineinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachineinventoryitem.go @@ -26,12 +26,24 @@ type VirtualMachineInventoryItem struct { ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualMachineInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualMachineInventoryItem{} func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { @@ -43,9 +55,10 @@ func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go index 8ff1acbe1d8..ea594286ebb 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go @@ -21,12 +21,24 @@ type VirtualMachineTemplateInventoryItem struct { ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualMachineTemplateInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualMachineTemplateInventoryItem{} func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTemplateInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachineTemplate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualnetworkinventoryitem.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualnetworkinventoryitem.go index 3f57ca228b4..c80a27f68e5 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualnetworkinventoryitem.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/model_virtualnetworkinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = VirtualNetworkInventoryItem{} type VirtualNetworkInventoryItem struct { // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualNetworkInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualNetworkInventoryItem{} func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualNetworkInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualNetwork" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-10-01/inventoryitems/version.go b/resource-manager/connectedvmware/2023-10-01/inventoryitems/version.go index 878da2cf8eb..50ac331b951 100644 --- a/resource-manager/connectedvmware/2023-10-01/inventoryitems/version.go +++ b/resource-manager/connectedvmware/2023-10-01/inventoryitems/version.go @@ -1,12 +1,10 @@ package inventoryitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inventoryitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inventoryitems/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/README.md b/resource-manager/connectedvmware/2023-10-01/resourcepools/README.md index 5cefb601f71..ab7d8d4437b 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/README.md +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/resourcepools` Documentation -The `resourcepools` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `resourcepools` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/client.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/client.go index e62fc2bf47f..36e6ae7bf0b 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/client.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/client.go @@ -15,7 +15,7 @@ type ResourcePoolsClient struct { } func NewResourcePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcePoolsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/id_resourcepool.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/id_resourcepool.go index d12b87a8394..21af50f5ff5 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/id_resourcepool.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/id_resourcepool.go @@ -42,7 +42,7 @@ func ParseResourcePoolID(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourcePoolIDInsensitively(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_delete.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_delete.go index 63f60c2259f..576de10e86b 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_get.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_get.go index d08e1e3323b..6468d5daf85 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_get.go @@ -45,7 +45,6 @@ func (c ResourcePoolsClient) Get(ctx context.Context, id ResourcePoolId) (result var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_update.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_update.go index 58628b6cb6c..82e41381802 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/method_update.go @@ -49,7 +49,6 @@ func (c ResourcePoolsClient) Update(ctx context.Context, id ResourcePoolId, inpu var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/resourcepools/version.go b/resource-manager/connectedvmware/2023-10-01/resourcepools/version.go index 777951fdb5d..28b5003a4dd 100644 --- a/resource-manager/connectedvmware/2023-10-01/resourcepools/version.go +++ b/resource-manager/connectedvmware/2023-10-01/resourcepools/version.go @@ -1,12 +1,10 @@ package resourcepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcepools/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/README.md b/resource-manager/connectedvmware/2023-10-01/vcenters/README.md index 03555381da8..742b4d79758 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/README.md +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/vcenters` Documentation -The `vcenters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `vcenters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/client.go b/resource-manager/connectedvmware/2023-10-01/vcenters/client.go index 2ac439c076d..3b01bea0a6c 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/client.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/client.go @@ -15,7 +15,7 @@ type VCentersClient struct { } func NewVCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*VCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VCentersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/id_vcenter.go b/resource-manager/connectedvmware/2023-10-01/vcenters/id_vcenter.go index 1cc53342784..1ab482df1f6 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/id_vcenter.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/method_delete.go b/resource-manager/connectedvmware/2023-10-01/vcenters/method_delete.go index c4941732776..cc2539f03d3 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/method_get.go b/resource-manager/connectedvmware/2023-10-01/vcenters/method_get.go index acb1d306643..f157d201a3c 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/method_get.go @@ -45,7 +45,6 @@ func (c VCentersClient) Get(ctx context.Context, id VCenterId) (result GetOperat var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/method_update.go b/resource-manager/connectedvmware/2023-10-01/vcenters/method_update.go index e670bfec2f8..48758168402 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/method_update.go @@ -49,7 +49,6 @@ func (c VCentersClient) Update(ctx context.Context, id VCenterId, input Resource var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/vcenters/version.go b/resource-manager/connectedvmware/2023-10-01/vcenters/version.go index a1ce63e2009..22a1ae54a55 100644 --- a/resource-manager/connectedvmware/2023-10-01/vcenters/version.go +++ b/resource-manager/connectedvmware/2023-10-01/vcenters/version.go @@ -1,12 +1,10 @@ package vcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vcenters/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/README.md b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/README.md index 1f060e055e0..82419c8da75 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/README.md +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances` Documentation -The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `virtualmachineinstances` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/client.go b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/client.go index e40ddc4adf5..18d28a8f009 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/client.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/client.go @@ -15,7 +15,7 @@ type VirtualMachineInstancesClient struct { } func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_delete.go b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_delete.go index 520968d448b..ac383b4da87 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_get.go b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_get.go index 07c230080f8..982c90e2492 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/method_get.go @@ -47,7 +47,6 @@ func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.Sco var model VirtualMachineInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/version.go b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/version.go index 8f2c46cda73..d1fa727023f 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/version.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachineinstances/version.go @@ -1,12 +1,10 @@ package virtualmachineinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineinstances/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/README.md b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/README.md index b8f655726da..15939ef0e05 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/README.md +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates` Documentation -The `virtualmachinetemplates` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `virtualmachinetemplates` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/client.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/client.go index 12c5314c789..fc11bf98a1a 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/client.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/client.go @@ -15,7 +15,7 @@ type VirtualMachineTemplatesClient struct { } func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineTemplatesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/id_virtualmachinetemplate.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/id_virtualmachinetemplate.go index 6cb805ff3db..f3d50aced14 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/id_virtualmachinetemplate.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/id_virtualmachinetemplate.go @@ -42,7 +42,7 @@ func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, err } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTe } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_delete.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_delete.go index d77b5e05ab1..84305515bf1 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_get.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_get.go index 9792aa1db2b..379f0f21ea4 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineTemplatesClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_update.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_update.go index 3dd48db9cfe..fba15dbdb78 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/method_update.go @@ -49,7 +49,6 @@ func (c VirtualMachineTemplatesClient) Update(ctx context.Context, id VirtualMac var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/version.go b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/version.go index 40392e395f4..ef20e1ba66f 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/version.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualmachinetemplates/version.go @@ -1,12 +1,10 @@ package virtualmachinetemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinetemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinetemplates/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/README.md b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/README.md index 0b70193a6f3..3c4ae2a0c90 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/README.md +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/client.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/client.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/id_virtualnetwork.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/id_virtualnetwork.go index 3295c21af0e..32e9068aa43 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_delete.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_delete.go index 53c2f55721a..995fcdb49b3 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_delete.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_get.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_get.go index a27c17c1604..273f0922d91 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (re var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_update.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_update.go index 21e8697a539..5aaee78c48f 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_update.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/method_update.go @@ -49,7 +49,6 @@ func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/version.go b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/version.go index 61c7dc124c5..9184699be46 100644 --- a/resource-manager/connectedvmware/2023-10-01/virtualnetworks/version.go +++ b/resource-manager/connectedvmware/2023-10-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/README.md b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/README.md index 65f7bbaf208..3acf7a6920c 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/README.md +++ b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents` Documentation -The `vminstanceguestagents` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `vminstanceguestagents` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/client.go b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/client.go index c50f6663706..24e3b7d4b39 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/client.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/client.go @@ -15,7 +15,7 @@ type VMInstanceGuestAgentsClient struct { } func NewVMInstanceGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceGuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstanceguestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstanceguestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceGuestAgentsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/method_get.go b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/method_get.go index d7a3e6c3250..fe27f35e732 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceGuestAgentsClient) Get(ctx context.Context, id commonids.Scope var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/version.go b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/version.go index 5d89e32bac2..28fa858382a 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/version.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstanceguestagents/version.go @@ -1,12 +1,10 @@ package vminstanceguestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstanceguestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstanceguestagents/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/README.md b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/README.md index 7e9c5014904..a9c409ef008 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/README.md +++ b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata` Documentation -The `vminstancehybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-10-01`). +The `vminstancehybrididentitymetadata` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/client.go b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/client.go index 605e66135cb..a1787cd68e4 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/client.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/client.go @@ -15,7 +15,7 @@ type VMInstanceHybridIdentityMetadataClient struct { } func NewVMInstanceHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceHybridIdentityMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstancehybrididentitymetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstancehybrididentitymetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceHybridIdentityMetadataClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/method_get.go b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/method_get.go index 6425f87dff1..4f5243d2994 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/method_get.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceHybridIdentityMetadataClient) Get(ctx context.Context, id comm var model VMInstanceHybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/version.go b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/version.go index 6805937fcba..90d75574014 100644 --- a/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/version.go +++ b/resource-manager/connectedvmware/2023-10-01/vminstancehybrididentitymetadata/version.go @@ -1,12 +1,10 @@ package vminstancehybrididentitymetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstancehybrididentitymetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstancehybrididentitymetadata/2023-10-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/README.md b/resource-manager/connectedvmware/2023-12-01/clusters/README.md index 7e287fe1c29..d5ed31f183c 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/README.md +++ b/resource-manager/connectedvmware/2023-12-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/client.go b/resource-manager/connectedvmware/2023-12-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/client.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/id_cluster.go b/resource-manager/connectedvmware/2023-12-01/clusters/id_cluster.go index ccbaf362f6d..3cff30b86ba 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/id_cluster.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/method_delete.go b/resource-manager/connectedvmware/2023-12-01/clusters/method_delete.go index 4bafe4f34f0..d07a1e6c0f4 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/method_get.go b/resource-manager/connectedvmware/2023-12-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/method_update.go b/resource-manager/connectedvmware/2023-12-01/clusters/method_update.go index f6061c7bbf9..8285929e596 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/method_update.go @@ -49,7 +49,6 @@ func (c ClustersClient) Update(ctx context.Context, id ClusterId, input Resource var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/clusters/version.go b/resource-manager/connectedvmware/2023-12-01/clusters/version.go index 1aecef56a8d..1e1d0073eac 100644 --- a/resource-manager/connectedvmware/2023-12-01/clusters/version.go +++ b/resource-manager/connectedvmware/2023-12-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/README.md b/resource-manager/connectedvmware/2023-12-01/datastores/README.md index c82996b853e..1b514cbf56d 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/README.md +++ b/resource-manager/connectedvmware/2023-12-01/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `datastores` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/client.go b/resource-manager/connectedvmware/2023-12-01/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/client.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/id_datastore.go b/resource-manager/connectedvmware/2023-12-01/datastores/id_datastore.go index 4fda75496d0..d1de40aa124 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/id_datastore.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/id_datastore.go @@ -42,7 +42,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/method_delete.go b/resource-manager/connectedvmware/2023-12-01/datastores/method_delete.go index 299de11dc57..0c3f3492052 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/method_get.go b/resource-manager/connectedvmware/2023-12-01/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/method_update.go b/resource-manager/connectedvmware/2023-12-01/datastores/method_update.go index 96ce4801235..3b6c5cbb9fe 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/method_update.go @@ -49,7 +49,6 @@ func (c DataStoresClient) Update(ctx context.Context, id DataStoreId, input Reso var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/datastores/version.go b/resource-manager/connectedvmware/2023-12-01/datastores/version.go index a6fa40055b9..514a644c3c3 100644 --- a/resource-manager/connectedvmware/2023-12-01/datastores/version.go +++ b/resource-manager/connectedvmware/2023-12-01/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/README.md b/resource-manager/connectedvmware/2023-12-01/hosts/README.md index 64e3e75c13c..5a8cbfd994f 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/README.md +++ b/resource-manager/connectedvmware/2023-12-01/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `hosts` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/client.go b/resource-manager/connectedvmware/2023-12-01/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/client.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/id_host.go b/resource-manager/connectedvmware/2023-12-01/hosts/id_host.go index 95adc6e4b2a..7b80694c80e 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/id_host.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/id_host.go @@ -42,7 +42,7 @@ func ParseHostID(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/method_delete.go b/resource-manager/connectedvmware/2023-12-01/hosts/method_delete.go index 9a7b641d869..83d7acd3f14 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/method_get.go b/resource-manager/connectedvmware/2023-12-01/hosts/method_get.go index f9a9efb6940..c68204523ce 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/method_get.go @@ -45,7 +45,6 @@ func (c HostsClient) Get(ctx context.Context, id HostId) (result GetOperationRes var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/method_update.go b/resource-manager/connectedvmware/2023-12-01/hosts/method_update.go index eb34aa8fa32..8e37b22cf9d 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/method_update.go @@ -49,7 +49,6 @@ func (c HostsClient) Update(ctx context.Context, id HostId, input ResourcePatch) var model Host result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/hosts/version.go b/resource-manager/connectedvmware/2023-12-01/hosts/version.go index 0fdbe59f07d..2d9dfacfb34 100644 --- a/resource-manager/connectedvmware/2023-12-01/hosts/version.go +++ b/resource-manager/connectedvmware/2023-12-01/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/README.md b/resource-manager/connectedvmware/2023-12-01/inventoryitems/README.md index 8067f22f91c..1f1d0b68828 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/README.md +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/inventoryitems` Documentation -The `inventoryitems` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `inventoryitems` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/client.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/client.go index fbe00f649cc..d0909622b9a 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/client.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/client.go @@ -15,7 +15,7 @@ type InventoryItemsClient struct { } func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inventoryitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inventoryitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InventoryItemsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_inventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_inventoryitem.go index 466a0d2f1fc..55bc11ca276 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_inventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_inventoryitem.go @@ -44,7 +44,7 @@ func ParseInventoryItemID(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_vcenter.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_vcenter.go index 2bdff43b9bb..7449c16a7b9 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_vcenter.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_create.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_create.go index 05ee4a39269..be8145868f8 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_create.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_create.go @@ -49,7 +49,6 @@ func (c InventoryItemsClient) Create(ctx context.Context, id InventoryItemId, in var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_get.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_get.go index 4df52d77cdc..c143a4f83ea 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/method_get.go @@ -45,7 +45,6 @@ func (c InventoryItemsClient) Get(ctx context.Context, id InventoryItemId) (resu var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_clusterinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_clusterinventoryitem.go index 57560e84429..1791c0423ef 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_clusterinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_clusterinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = ClusterInventoryItem{} type ClusterInventoryItem struct { // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s ClusterInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = ClusterInventoryItem{} func (s ClusterInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s ClusterInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterInventoryItem: %+v", err) } + decoded["inventoryType"] = "Cluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_datastoreinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_datastoreinventoryitem.go index 8024d751803..232fdd82201 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_datastoreinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_datastoreinventoryitem.go @@ -15,12 +15,24 @@ type DatastoreInventoryItem struct { FreeSpaceGB *int64 `json:"freeSpaceGB,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s DatastoreInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = DatastoreInventoryItem{} func (s DatastoreInventoryItem) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s DatastoreInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatastoreInventoryItem: %+v", err) } + decoded["inventoryType"] = "Datastore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_hostinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_hostinventoryitem.go index 105ccd94358..2f260afd51e 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_hostinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_hostinventoryitem.go @@ -20,12 +20,24 @@ type HostInventoryItem struct { Version *string `json:"version,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s HostInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = HostInventoryItem{} func (s HostInventoryItem) MarshalJSON() ([]byte, error) { @@ -37,9 +49,10 @@ func (s HostInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HostInventoryItem: %+v", err) } + decoded["inventoryType"] = "Host" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitem.go index 92f80c1062d..c941ca67a24 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitem.go @@ -40,7 +40,7 @@ func (s *InventoryItem) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInventoryItemPropertiesImplementation(v) + impl, err := UnmarshalInventoryItemPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'InventoryItem': %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitemproperties.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitemproperties.go index 585d050785c..090af1f1343 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitemproperties.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_inventoryitemproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InventoryItemProperties interface { + InventoryItemProperties() BaseInventoryItemPropertiesImpl } -// RawInventoryItemPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InventoryItemProperties = BaseInventoryItemPropertiesImpl{} + +type BaseInventoryItemPropertiesImpl struct { + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + MoName *string `json:"moName,omitempty"` + MoRefId *string `json:"moRefId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s +} + +var _ InventoryItemProperties = RawInventoryItemPropertiesImpl{} + +// RawInventoryItemPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInventoryItemPropertiesImpl struct { - Type string - Values map[string]interface{} + inventoryItemProperties BaseInventoryItemPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s.inventoryItemProperties } -func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { +func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItem return out, nil } - out := RawInventoryItemPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInventoryItemPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInventoryItemPropertiesImpl: %+v", err) } - return out, nil + + return RawInventoryItemPropertiesImpl{ + inventoryItemProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_resourcepoolinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_resourcepoolinventoryitem.go index 34355eafd17..c25f9496c04 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_resourcepoolinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_resourcepoolinventoryitem.go @@ -14,12 +14,24 @@ type ResourcePoolInventoryItem struct { Parent *InventoryItemDetails `json:"parent,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s ResourcePoolInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = ResourcePoolInventoryItem{} func (s ResourcePoolInventoryItem) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ResourcePoolInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourcePoolInventoryItem: %+v", err) } + decoded["inventoryType"] = "ResourcePool" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachineinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachineinventoryitem.go index 69846868efa..e340258ac47 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachineinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachineinventoryitem.go @@ -37,12 +37,24 @@ type VirtualMachineInventoryItem struct { ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualMachineInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualMachineInventoryItem{} func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { @@ -54,9 +66,10 @@ func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go index 8ff1acbe1d8..ea594286ebb 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go @@ -21,12 +21,24 @@ type VirtualMachineTemplateInventoryItem struct { ToolsVersionStatus *string `json:"toolsVersionStatus,omitempty"` // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualMachineTemplateInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualMachineTemplateInventoryItem{} func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTemplateInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachineTemplate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualnetworkinventoryitem.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualnetworkinventoryitem.go index 3f57ca228b4..c80a27f68e5 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualnetworkinventoryitem.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/model_virtualnetworkinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = VirtualNetworkInventoryItem{} type VirtualNetworkInventoryItem struct { // Fields inherited from InventoryItemProperties + + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` MoName *string `json:"moName,omitempty"` MoRefId *string `json:"moRefId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s VirtualNetworkInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + MoName: s.MoName, + MoRefId: s.MoRefId, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = VirtualNetworkInventoryItem{} func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualNetworkInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualNetwork" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/connectedvmware/2023-12-01/inventoryitems/version.go b/resource-manager/connectedvmware/2023-12-01/inventoryitems/version.go index c177504dcae..79dcce850c7 100644 --- a/resource-manager/connectedvmware/2023-12-01/inventoryitems/version.go +++ b/resource-manager/connectedvmware/2023-12-01/inventoryitems/version.go @@ -1,12 +1,10 @@ package inventoryitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inventoryitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inventoryitems/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/README.md b/resource-manager/connectedvmware/2023-12-01/resourcepools/README.md index 13f9bcf1204..a61c4ad5fa1 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/README.md +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/resourcepools` Documentation -The `resourcepools` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `resourcepools` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/client.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/client.go index e62fc2bf47f..36e6ae7bf0b 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/client.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/client.go @@ -15,7 +15,7 @@ type ResourcePoolsClient struct { } func NewResourcePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcePoolsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/id_resourcepool.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/id_resourcepool.go index d12b87a8394..21af50f5ff5 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/id_resourcepool.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/id_resourcepool.go @@ -42,7 +42,7 @@ func ParseResourcePoolID(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourcePoolIDInsensitively(input string) (*ResourcePoolId, error) { } id := ResourcePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_delete.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_delete.go index 63f60c2259f..576de10e86b 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_get.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_get.go index d08e1e3323b..6468d5daf85 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_get.go @@ -45,7 +45,6 @@ func (c ResourcePoolsClient) Get(ctx context.Context, id ResourcePoolId) (result var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_update.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_update.go index 58628b6cb6c..82e41381802 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/method_update.go @@ -49,7 +49,6 @@ func (c ResourcePoolsClient) Update(ctx context.Context, id ResourcePoolId, inpu var model ResourcePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/resourcepools/version.go b/resource-manager/connectedvmware/2023-12-01/resourcepools/version.go index beaa1f58e31..b29e35c5be5 100644 --- a/resource-manager/connectedvmware/2023-12-01/resourcepools/version.go +++ b/resource-manager/connectedvmware/2023-12-01/resourcepools/version.go @@ -1,12 +1,10 @@ package resourcepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcepools/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/README.md b/resource-manager/connectedvmware/2023-12-01/vcenters/README.md index 873b01390c0..5cfb615179a 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/README.md +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/vcenters` Documentation -The `vcenters` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `vcenters` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/client.go b/resource-manager/connectedvmware/2023-12-01/vcenters/client.go index 2ac439c076d..3b01bea0a6c 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/client.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/client.go @@ -15,7 +15,7 @@ type VCentersClient struct { } func NewVCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*VCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VCentersClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/id_vcenter.go b/resource-manager/connectedvmware/2023-12-01/vcenters/id_vcenter.go index 1cc53342784..1ab482df1f6 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/id_vcenter.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/id_vcenter.go @@ -42,7 +42,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/method_delete.go b/resource-manager/connectedvmware/2023-12-01/vcenters/method_delete.go index c4941732776..cc2539f03d3 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/method_get.go b/resource-manager/connectedvmware/2023-12-01/vcenters/method_get.go index acb1d306643..f157d201a3c 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/method_get.go @@ -45,7 +45,6 @@ func (c VCentersClient) Get(ctx context.Context, id VCenterId) (result GetOperat var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/method_update.go b/resource-manager/connectedvmware/2023-12-01/vcenters/method_update.go index e670bfec2f8..48758168402 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/method_update.go @@ -49,7 +49,6 @@ func (c VCentersClient) Update(ctx context.Context, id VCenterId, input Resource var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/vcenters/version.go b/resource-manager/connectedvmware/2023-12-01/vcenters/version.go index 7a42a880dfc..d85313f5dcc 100644 --- a/resource-manager/connectedvmware/2023-12-01/vcenters/version.go +++ b/resource-manager/connectedvmware/2023-12-01/vcenters/version.go @@ -1,12 +1,10 @@ package vcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vcenters/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/README.md b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/README.md index fa7ad6648db..404d7ba6140 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/README.md +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances` Documentation -The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `virtualmachineinstances` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/client.go b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/client.go index e40ddc4adf5..18d28a8f009 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/client.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/client.go @@ -15,7 +15,7 @@ type VirtualMachineInstancesClient struct { } func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_delete.go b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_delete.go index 520968d448b..ac383b4da87 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_get.go b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_get.go index 07c230080f8..982c90e2492 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/method_get.go @@ -47,7 +47,6 @@ func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.Sco var model VirtualMachineInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/version.go b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/version.go index e9fdffdfd71..457f6e16c89 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/version.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachineinstances/version.go @@ -1,12 +1,10 @@ package virtualmachineinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineinstances/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/README.md b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/README.md index 163646fc43f..ee82683ff92 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/README.md +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates` Documentation -The `virtualmachinetemplates` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `virtualmachinetemplates` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/client.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/client.go index 12c5314c789..fc11bf98a1a 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/client.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/client.go @@ -15,7 +15,7 @@ type VirtualMachineTemplatesClient struct { } func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineTemplatesClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/id_virtualmachinetemplate.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/id_virtualmachinetemplate.go index 6cb805ff3db..f3d50aced14 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/id_virtualmachinetemplate.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/id_virtualmachinetemplate.go @@ -42,7 +42,7 @@ func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, err } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTe } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_delete.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_delete.go index d77b5e05ab1..84305515bf1 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_get.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_get.go index 9792aa1db2b..379f0f21ea4 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineTemplatesClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_update.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_update.go index 3dd48db9cfe..fba15dbdb78 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/method_update.go @@ -49,7 +49,6 @@ func (c VirtualMachineTemplatesClient) Update(ctx context.Context, id VirtualMac var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/version.go b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/version.go index 69547ee4f7b..4e971c03ec4 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/version.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualmachinetemplates/version.go @@ -1,12 +1,10 @@ package virtualmachinetemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinetemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinetemplates/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/README.md b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/README.md index f917af8fce3..f552e417f33 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/README.md +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/client.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/client.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/id_virtualnetwork.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/id_virtualnetwork.go index 3295c21af0e..32e9068aa43 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_delete.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_delete.go index 53c2f55721a..995fcdb49b3 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_delete.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_get.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_get.go index a27c17c1604..273f0922d91 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (re var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_update.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_update.go index 21e8697a539..5aaee78c48f 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_update.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/method_update.go @@ -49,7 +49,6 @@ func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/version.go b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/version.go index 6ab5eb46b6e..fca643d7aed 100644 --- a/resource-manager/connectedvmware/2023-12-01/virtualnetworks/version.go +++ b/resource-manager/connectedvmware/2023-12-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/README.md b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/README.md index aac866dc8bc..9e27c626a9e 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/README.md +++ b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents` Documentation -The `vminstanceguestagents` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `vminstanceguestagents` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/client.go b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/client.go index c50f6663706..24e3b7d4b39 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/client.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/client.go @@ -15,7 +15,7 @@ type VMInstanceGuestAgentsClient struct { } func NewVMInstanceGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceGuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstanceguestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstanceguestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceGuestAgentsClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/method_get.go b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/method_get.go index d7a3e6c3250..fe27f35e732 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceGuestAgentsClient) Get(ctx context.Context, id commonids.Scope var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/version.go b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/version.go index d08bbb0f731..07a81d4cb64 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/version.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstanceguestagents/version.go @@ -1,12 +1,10 @@ package vminstanceguestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstanceguestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstanceguestagents/2023-12-01" } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/README.md b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/README.md index 4793af430ea..169b8c4b467 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/README.md +++ b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata` Documentation -The `vminstancehybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `connectedvmware` (API Version `2023-12-01`). +The `vminstancehybrididentitymetadata` SDK allows for interaction with Azure Resource Manager `connectedvmware` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/client.go b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/client.go index 605e66135cb..a1787cd68e4 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/client.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/client.go @@ -15,7 +15,7 @@ type VMInstanceHybridIdentityMetadataClient struct { } func NewVMInstanceHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceHybridIdentityMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstancehybrididentitymetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstancehybrididentitymetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceHybridIdentityMetadataClient: %+v", err) } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/method_get.go b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/method_get.go index 6425f87dff1..4f5243d2994 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/method_get.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceHybridIdentityMetadataClient) Get(ctx context.Context, id comm var model VMInstanceHybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/version.go b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/version.go index 9ec9b40d6aa..d57dd684bb2 100644 --- a/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/version.go +++ b/resource-manager/connectedvmware/2023-12-01/vminstancehybrididentitymetadata/version.go @@ -1,12 +1,10 @@ package vminstancehybrididentitymetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstancehybrididentitymetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstancehybrididentitymetadata/2023-12-01" } diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/README.md b/resource-manager/consumption/2019-10-01/aggregatedcost/README.md index bfabf45f0c5..ee321f15123 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/client.go b/resource-manager/consumption/2019-10-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2019-10-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2019-10-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2019-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index 9d2ecf657a2..56a1547250f 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/aggregatedcost/version.go b/resource-manager/consumption/2019-10-01/aggregatedcost/version.go index 8cdc0ebd1d6..c80bc24dc8c 100644 --- a/resource-manager/consumption/2019-10-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2019-10-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/balances/README.md b/resource-manager/consumption/2019-10-01/balances/README.md index e717c945065..da74dc5003c 100644 --- a/resource-manager/consumption/2019-10-01/balances/README.md +++ b/resource-manager/consumption/2019-10-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/balances/client.go b/resource-manager/consumption/2019-10-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2019-10-01/balances/client.go +++ b/resource-manager/consumption/2019-10-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/balances/id_billingaccount.go b/resource-manager/consumption/2019-10-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2019-10-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2019-10-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2019-10-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2019-10-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2019-10-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2019-10-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2019-10-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2019-10-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2019-10-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2019-10-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2019-10-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/balances/version.go b/resource-manager/consumption/2019-10-01/balances/version.go index 77008301b0a..2821f152958 100644 --- a/resource-manager/consumption/2019-10-01/balances/version.go +++ b/resource-manager/consumption/2019-10-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/budgets/README.md b/resource-manager/consumption/2019-10-01/budgets/README.md index 47665ca6320..82e67fa2703 100644 --- a/resource-manager/consumption/2019-10-01/budgets/README.md +++ b/resource-manager/consumption/2019-10-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/budgets/client.go b/resource-manager/consumption/2019-10-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2019-10-01/budgets/client.go +++ b/resource-manager/consumption/2019-10-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2019-10-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/budgets/method_createorupdate.go b/resource-manager/consumption/2019-10-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2019-10-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2019-10-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/budgets/method_get.go b/resource-manager/consumption/2019-10-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2019-10-01/budgets/method_get.go +++ b/resource-manager/consumption/2019-10-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/budgets/version.go b/resource-manager/consumption/2019-10-01/budgets/version.go index 4e582168a9f..2b2e5b23fff 100644 --- a/resource-manager/consumption/2019-10-01/budgets/version.go +++ b/resource-manager/consumption/2019-10-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/charges/README.md b/resource-manager/consumption/2019-10-01/charges/README.md index 9811e7dfe6e..33c8f2da91a 100644 --- a/resource-manager/consumption/2019-10-01/charges/README.md +++ b/resource-manager/consumption/2019-10-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/charges/client.go b/resource-manager/consumption/2019-10-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2019-10-01/charges/client.go +++ b/resource-manager/consumption/2019-10-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/charges/method_list.go b/resource-manager/consumption/2019-10-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2019-10-01/charges/method_list.go +++ b/resource-manager/consumption/2019-10-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2019-10-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2019-10-01/charges/model_chargesummary.go b/resource-manager/consumption/2019-10-01/charges/model_chargesummary.go index 8b9c3d9267f..bde84e81a72 100644 --- a/resource-manager/consumption/2019-10-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2019-10-01/charges/model_chargesummary.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2019-10-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2019-10-01/charges/model_legacychargesummary.go index 3d2ccd99237..4a25cc035f9 100644 --- a/resource-manager/consumption/2019-10-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2019-10-01/charges/model_legacychargesummary.go @@ -14,13 +14,26 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary + ETag *string `json:"eTag,omitempty"` Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` Name *string `json:"name,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = LegacyChargeSummary{} func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2019-10-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2019-10-01/charges/model_modernchargesummary.go index a55f1c510d7..e8d21d0a0c7 100644 --- a/resource-manager/consumption/2019-10-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2019-10-01/charges/model_modernchargesummary.go @@ -14,13 +14,26 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary + ETag *string `json:"eTag,omitempty"` Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` Name *string `json:"name,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = ModernChargeSummary{} func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2019-10-01/charges/version.go b/resource-manager/consumption/2019-10-01/charges/version.go index 67b0ea2353f..b8feaa60113 100644 --- a/resource-manager/consumption/2019-10-01/charges/version.go +++ b/resource-manager/consumption/2019-10-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/credits/README.md b/resource-manager/consumption/2019-10-01/credits/README.md index 81e9fba9504..2ef67b27716 100644 --- a/resource-manager/consumption/2019-10-01/credits/README.md +++ b/resource-manager/consumption/2019-10-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/credits/client.go b/resource-manager/consumption/2019-10-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2019-10-01/credits/client.go +++ b/resource-manager/consumption/2019-10-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/credits/method_get.go b/resource-manager/consumption/2019-10-01/credits/method_get.go index 62237d864e4..abaaa0227e0 100644 --- a/resource-manager/consumption/2019-10-01/credits/method_get.go +++ b/resource-manager/consumption/2019-10-01/credits/method_get.go @@ -48,7 +48,6 @@ func (c CreditsClient) Get(ctx context.Context, id commonids.ScopeId) (result Ge var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/credits/version.go b/resource-manager/consumption/2019-10-01/credits/version.go index 122346360e0..6c1d49954ed 100644 --- a/resource-manager/consumption/2019-10-01/credits/version.go +++ b/resource-manager/consumption/2019-10-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/events/README.md b/resource-manager/consumption/2019-10-01/events/README.md index 975406a3344..febda938301 100644 --- a/resource-manager/consumption/2019-10-01/events/README.md +++ b/resource-manager/consumption/2019-10-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/events/client.go b/resource-manager/consumption/2019-10-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2019-10-01/events/client.go +++ b/resource-manager/consumption/2019-10-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/events/method_list.go b/resource-manager/consumption/2019-10-01/events/method_list.go index f3c0e13cb07..deefc3ca965 100644 --- a/resource-manager/consumption/2019-10-01/events/method_list.go +++ b/resource-manager/consumption/2019-10-01/events/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/events/version.go b/resource-manager/consumption/2019-10-01/events/version.go index 28384cf372a..dd9d63ffe2b 100644 --- a/resource-manager/consumption/2019-10-01/events/version.go +++ b/resource-manager/consumption/2019-10-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/forecasts/README.md b/resource-manager/consumption/2019-10-01/forecasts/README.md index 98dc433c0f2..0efa8e3e261 100644 --- a/resource-manager/consumption/2019-10-01/forecasts/README.md +++ b/resource-manager/consumption/2019-10-01/forecasts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/forecasts` Documentation -The `forecasts` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `forecasts` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/forecasts/client.go b/resource-manager/consumption/2019-10-01/forecasts/client.go index 26b48d37fb7..53bd44d10c0 100644 --- a/resource-manager/consumption/2019-10-01/forecasts/client.go +++ b/resource-manager/consumption/2019-10-01/forecasts/client.go @@ -15,7 +15,7 @@ type ForecastsClient struct { } func NewForecastsClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecasts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecasts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/forecasts/method_list.go b/resource-manager/consumption/2019-10-01/forecasts/method_list.go index 5af81124423..b0bc885c957 100644 --- a/resource-manager/consumption/2019-10-01/forecasts/method_list.go +++ b/resource-manager/consumption/2019-10-01/forecasts/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ForecastsClient) List(ctx context.Context, id commonids.SubscriptionId, var model ForecastsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/forecasts/version.go b/resource-manager/consumption/2019-10-01/forecasts/version.go index 7a54da8ee58..1cc3a849759 100644 --- a/resource-manager/consumption/2019-10-01/forecasts/version.go +++ b/resource-manager/consumption/2019-10-01/forecasts/version.go @@ -1,12 +1,10 @@ package forecasts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecasts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecasts/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/lots/README.md b/resource-manager/consumption/2019-10-01/lots/README.md index 38088b29364..aa5e9c90b05 100644 --- a/resource-manager/consumption/2019-10-01/lots/README.md +++ b/resource-manager/consumption/2019-10-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/lots/client.go b/resource-manager/consumption/2019-10-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2019-10-01/lots/client.go +++ b/resource-manager/consumption/2019-10-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/lots/version.go b/resource-manager/consumption/2019-10-01/lots/version.go index 10b4497c6d8..cbedf37185d 100644 --- a/resource-manager/consumption/2019-10-01/lots/version.go +++ b/resource-manager/consumption/2019-10-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/marketplaces/README.md b/resource-manager/consumption/2019-10-01/marketplaces/README.md index 35e86f9588c..25859f6bc5d 100644 --- a/resource-manager/consumption/2019-10-01/marketplaces/README.md +++ b/resource-manager/consumption/2019-10-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/marketplaces/client.go b/resource-manager/consumption/2019-10-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2019-10-01/marketplaces/client.go +++ b/resource-manager/consumption/2019-10-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/marketplaces/method_list.go b/resource-manager/consumption/2019-10-01/marketplaces/method_list.go index 16ac7b3b8ab..554b51779ab 100644 --- a/resource-manager/consumption/2019-10-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2019-10-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/marketplaces/version.go b/resource-manager/consumption/2019-10-01/marketplaces/version.go index 2868a7d910d..1748d56f59a 100644 --- a/resource-manager/consumption/2019-10-01/marketplaces/version.go +++ b/resource-manager/consumption/2019-10-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/pricesheet/README.md b/resource-manager/consumption/2019-10-01/pricesheet/README.md index 9142cd7999f..5092f055d7d 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/README.md +++ b/resource-manager/consumption/2019-10-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/pricesheet/client.go b/resource-manager/consumption/2019-10-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/client.go +++ b/resource-manager/consumption/2019-10-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2019-10-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2019-10-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/pricesheet/method_get.go b/resource-manager/consumption/2019-10-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2019-10-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2019-10-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2019-10-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/pricesheet/version.go b/resource-manager/consumption/2019-10-01/pricesheet/version.go index acbe4aafcc7..48b5a51c02f 100644 --- a/resource-manager/consumption/2019-10-01/pricesheet/version.go +++ b/resource-manager/consumption/2019-10-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/README.md b/resource-manager/consumption/2019-10-01/reservationdetails/README.md index fb67229c334..8dbb741a015 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/README.md +++ b/resource-manager/consumption/2019-10-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/client.go b/resource-manager/consumption/2019-10-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/client.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2019-10-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2019-10-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationdetails/version.go b/resource-manager/consumption/2019-10-01/reservationdetails/version.go index 8d826511390..2ea1e7cd422 100644 --- a/resource-manager/consumption/2019-10-01/reservationdetails/version.go +++ b/resource-manager/consumption/2019-10-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/README.md index a19b025f034..ce429fe91e4 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/method_get.go index 9bde40fd925..59eec6e861a 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/method_get.go @@ -39,6 +39,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -92,7 +93,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/version.go index 4d5b8b0492f..fcfefb610a7 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/README.md b/resource-manager/consumption/2019-10-01/reservationrecommendations/README.md index 8e564540dbe..f90774522bb 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/client.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_legacyreservationrecommendation.go index a9bca6246b4..f67b1c13da7 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_modernreservationrecommendation.go index f44250a49fd..65f744077f8 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..15b67db86e4 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2019-10-01/reservationrecommendations/version.go b/resource-manager/consumption/2019-10-01/reservationrecommendations/version.go index d278fdb8b09..222c9ec6c73 100644 --- a/resource-manager/consumption/2019-10-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2019-10-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/README.md b/resource-manager/consumption/2019-10-01/reservationsummaries/README.md index b4576d6f8d9..ec7793275ca 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/client.go b/resource-manager/consumption/2019-10-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationsummaries/version.go b/resource-manager/consumption/2019-10-01/reservationsummaries/version.go index cc3196803b1..c0280f3011f 100644 --- a/resource-manager/consumption/2019-10-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2019-10-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2019-10-01" } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/README.md b/resource-manager/consumption/2019-10-01/reservationtransactions/README.md index 5c9b64606fa..1a7c35a257f 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2019-10-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2019-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/client.go b/resource-manager/consumption/2019-10-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/method_list.go b/resource-manager/consumption/2019-10-01/reservationtransactions/method_list.go index ba84b770cba..38b14d48256 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2019-10-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2019-10-01/reservationtransactions/version.go b/resource-manager/consumption/2019-10-01/reservationtransactions/version.go index 6e354aa62fd..6a0d99bf90b 100644 --- a/resource-manager/consumption/2019-10-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2019-10-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2019-10-01" } diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/README.md b/resource-manager/consumption/2021-10-01/aggregatedcost/README.md index 9da1a33dcf5..719651d46a0 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/client.go b/resource-manager/consumption/2021-10-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2021-10-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2021-10-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2021-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index bd960ea6d3e..686c2c231e7 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/aggregatedcost/version.go b/resource-manager/consumption/2021-10-01/aggregatedcost/version.go index 009cc98a788..481e00f3d87 100644 --- a/resource-manager/consumption/2021-10-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2021-10-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/balances/README.md b/resource-manager/consumption/2021-10-01/balances/README.md index b6fec7362aa..8f2c205f61f 100644 --- a/resource-manager/consumption/2021-10-01/balances/README.md +++ b/resource-manager/consumption/2021-10-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/balances/client.go b/resource-manager/consumption/2021-10-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2021-10-01/balances/client.go +++ b/resource-manager/consumption/2021-10-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/balances/id_billingaccount.go b/resource-manager/consumption/2021-10-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2021-10-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2021-10-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2021-10-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2021-10-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2021-10-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2021-10-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2021-10-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2021-10-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2021-10-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2021-10-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2021-10-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/balances/version.go b/resource-manager/consumption/2021-10-01/balances/version.go index 8c94f21cbff..4d22a375155 100644 --- a/resource-manager/consumption/2021-10-01/balances/version.go +++ b/resource-manager/consumption/2021-10-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/budgets/README.md b/resource-manager/consumption/2021-10-01/budgets/README.md index 0480c8f6b20..ba3616491ef 100644 --- a/resource-manager/consumption/2021-10-01/budgets/README.md +++ b/resource-manager/consumption/2021-10-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/budgets/client.go b/resource-manager/consumption/2021-10-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2021-10-01/budgets/client.go +++ b/resource-manager/consumption/2021-10-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2021-10-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2021-10-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2021-10-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/budgets/method_createorupdate.go b/resource-manager/consumption/2021-10-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2021-10-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2021-10-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/budgets/method_get.go b/resource-manager/consumption/2021-10-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2021-10-01/budgets/method_get.go +++ b/resource-manager/consumption/2021-10-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/budgets/version.go b/resource-manager/consumption/2021-10-01/budgets/version.go index cb55a719fb3..cb2232831e0 100644 --- a/resource-manager/consumption/2021-10-01/budgets/version.go +++ b/resource-manager/consumption/2021-10-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/charges/README.md b/resource-manager/consumption/2021-10-01/charges/README.md index 862be2a0295..b9138a23e58 100644 --- a/resource-manager/consumption/2021-10-01/charges/README.md +++ b/resource-manager/consumption/2021-10-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/charges/client.go b/resource-manager/consumption/2021-10-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2021-10-01/charges/client.go +++ b/resource-manager/consumption/2021-10-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/charges/method_list.go b/resource-manager/consumption/2021-10-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2021-10-01/charges/method_list.go +++ b/resource-manager/consumption/2021-10-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2021-10-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2021-10-01/charges/model_chargesummary.go b/resource-manager/consumption/2021-10-01/charges/model_chargesummary.go index 8b9c3d9267f..d4e83ce2415 100644 --- a/resource-manager/consumption/2021-10-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2021-10-01/charges/model_chargesummary.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2021-10-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2021-10-01/charges/model_legacychargesummary.go index e23092e5989..0f044d72c29 100644 --- a/resource-manager/consumption/2021-10-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2021-10-01/charges/model_legacychargesummary.go @@ -14,10 +14,22 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = LegacyChargeSummary{} @@ -31,9 +43,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2021-10-01/charges/model_modernchargesummary.go index 13ab91d445a..24a5d5a22f0 100644 --- a/resource-manager/consumption/2021-10-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2021-10-01/charges/model_modernchargesummary.go @@ -14,10 +14,22 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ModernChargeSummary{} @@ -31,9 +43,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/charges/version.go b/resource-manager/consumption/2021-10-01/charges/version.go index 0224a3f7782..bb9040ed8fc 100644 --- a/resource-manager/consumption/2021-10-01/charges/version.go +++ b/resource-manager/consumption/2021-10-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/credits/README.md b/resource-manager/consumption/2021-10-01/credits/README.md index 59e6fe2f8af..2cdc449248b 100644 --- a/resource-manager/consumption/2021-10-01/credits/README.md +++ b/resource-manager/consumption/2021-10-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/credits/client.go b/resource-manager/consumption/2021-10-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2021-10-01/credits/client.go +++ b/resource-manager/consumption/2021-10-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/credits/id_billingprofile.go b/resource-manager/consumption/2021-10-01/credits/id_billingprofile.go index 66a63661695..6d8c0703695 100644 --- a/resource-manager/consumption/2021-10-01/credits/id_billingprofile.go +++ b/resource-manager/consumption/2021-10-01/credits/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/credits/method_get.go b/resource-manager/consumption/2021-10-01/credits/method_get.go index 91b84086bc4..75524f021ef 100644 --- a/resource-manager/consumption/2021-10-01/credits/method_get.go +++ b/resource-manager/consumption/2021-10-01/credits/method_get.go @@ -47,7 +47,6 @@ func (c CreditsClient) Get(ctx context.Context, id BillingProfileId) (result Get var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/credits/version.go b/resource-manager/consumption/2021-10-01/credits/version.go index ad9c5dff920..a08cea33972 100644 --- a/resource-manager/consumption/2021-10-01/credits/version.go +++ b/resource-manager/consumption/2021-10-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/events/README.md b/resource-manager/consumption/2021-10-01/events/README.md index 032143be3c5..d56362cf39e 100644 --- a/resource-manager/consumption/2021-10-01/events/README.md +++ b/resource-manager/consumption/2021-10-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/events/client.go b/resource-manager/consumption/2021-10-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2021-10-01/events/client.go +++ b/resource-manager/consumption/2021-10-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/events/id_billingaccount.go b/resource-manager/consumption/2021-10-01/events/id_billingaccount.go index 91b9db04177..b330b7a9876 100644 --- a/resource-manager/consumption/2021-10-01/events/id_billingaccount.go +++ b/resource-manager/consumption/2021-10-01/events/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/events/id_billingprofile.go b/resource-manager/consumption/2021-10-01/events/id_billingprofile.go index f107ce44b73..2edf290768a 100644 --- a/resource-manager/consumption/2021-10-01/events/id_billingprofile.go +++ b/resource-manager/consumption/2021-10-01/events/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/events/method_listbybillingaccount.go b/resource-manager/consumption/2021-10-01/events/method_listbybillingaccount.go index bc739678dcf..87b3e9974dc 100644 --- a/resource-manager/consumption/2021-10-01/events/method_listbybillingaccount.go +++ b/resource-manager/consumption/2021-10-01/events/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/events/method_listbybillingprofile.go b/resource-manager/consumption/2021-10-01/events/method_listbybillingprofile.go index d4e4d2d8933..397605d17eb 100644 --- a/resource-manager/consumption/2021-10-01/events/method_listbybillingprofile.go +++ b/resource-manager/consumption/2021-10-01/events/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/events/version.go b/resource-manager/consumption/2021-10-01/events/version.go index 7dc7af275c5..ff1fc6bb8e5 100644 --- a/resource-manager/consumption/2021-10-01/events/version.go +++ b/resource-manager/consumption/2021-10-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/lots/README.md b/resource-manager/consumption/2021-10-01/lots/README.md index 633d14fc706..211275c45fa 100644 --- a/resource-manager/consumption/2021-10-01/lots/README.md +++ b/resource-manager/consumption/2021-10-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/lots/client.go b/resource-manager/consumption/2021-10-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2021-10-01/lots/client.go +++ b/resource-manager/consumption/2021-10-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/lots/id_billingaccount.go b/resource-manager/consumption/2021-10-01/lots/id_billingaccount.go index b4530130d19..23f877b23ab 100644 --- a/resource-manager/consumption/2021-10-01/lots/id_billingaccount.go +++ b/resource-manager/consumption/2021-10-01/lots/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/lots/id_billingprofile.go b/resource-manager/consumption/2021-10-01/lots/id_billingprofile.go index cb16c33bf79..94d881d7dc1 100644 --- a/resource-manager/consumption/2021-10-01/lots/id_billingprofile.go +++ b/resource-manager/consumption/2021-10-01/lots/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/lots/id_customer.go b/resource-manager/consumption/2021-10-01/lots/id_customer.go index ab9905c620e..bfe7a942705 100644 --- a/resource-manager/consumption/2021-10-01/lots/id_customer.go +++ b/resource-manager/consumption/2021-10-01/lots/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/lots/method_listbybillingaccount.go b/resource-manager/consumption/2021-10-01/lots/method_listbybillingaccount.go index 71679325bb1..0db9cbcbcb1 100644 --- a/resource-manager/consumption/2021-10-01/lots/method_listbybillingaccount.go +++ b/resource-manager/consumption/2021-10-01/lots/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/lots/method_listbycustomer.go b/resource-manager/consumption/2021-10-01/lots/method_listbycustomer.go index f3697ec4834..d46b755580b 100644 --- a/resource-manager/consumption/2021-10-01/lots/method_listbycustomer.go +++ b/resource-manager/consumption/2021-10-01/lots/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/lots/version.go b/resource-manager/consumption/2021-10-01/lots/version.go index b31e1706407..25fc51a434c 100644 --- a/resource-manager/consumption/2021-10-01/lots/version.go +++ b/resource-manager/consumption/2021-10-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/marketplaces/README.md b/resource-manager/consumption/2021-10-01/marketplaces/README.md index 7142f266902..8144acd9f48 100644 --- a/resource-manager/consumption/2021-10-01/marketplaces/README.md +++ b/resource-manager/consumption/2021-10-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/marketplaces/client.go b/resource-manager/consumption/2021-10-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2021-10-01/marketplaces/client.go +++ b/resource-manager/consumption/2021-10-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/marketplaces/method_list.go b/resource-manager/consumption/2021-10-01/marketplaces/method_list.go index 473fc8b7ca4..5375f3b66b4 100644 --- a/resource-manager/consumption/2021-10-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2021-10-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/marketplaces/version.go b/resource-manager/consumption/2021-10-01/marketplaces/version.go index b9d4a36bd6b..ecc887aa981 100644 --- a/resource-manager/consumption/2021-10-01/marketplaces/version.go +++ b/resource-manager/consumption/2021-10-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/pricesheet/README.md b/resource-manager/consumption/2021-10-01/pricesheet/README.md index c8678d90865..f6db0e01786 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/README.md +++ b/resource-manager/consumption/2021-10-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/pricesheet/client.go b/resource-manager/consumption/2021-10-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/client.go +++ b/resource-manager/consumption/2021-10-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2021-10-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2021-10-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/pricesheet/method_get.go b/resource-manager/consumption/2021-10-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2021-10-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2021-10-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2021-10-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/pricesheet/version.go b/resource-manager/consumption/2021-10-01/pricesheet/version.go index 8f6024dd7db..a57da7dda44 100644 --- a/resource-manager/consumption/2021-10-01/pricesheet/version.go +++ b/resource-manager/consumption/2021-10-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/README.md b/resource-manager/consumption/2021-10-01/reservationdetails/README.md index b0349c3e3d7..49003558fa2 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/README.md +++ b/resource-manager/consumption/2021-10-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/client.go b/resource-manager/consumption/2021-10-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/client.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2021-10-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2021-10-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationdetails/version.go b/resource-manager/consumption/2021-10-01/reservationdetails/version.go index 77e1039d81d..7fb51f4d6c3 100644 --- a/resource-manager/consumption/2021-10-01/reservationdetails/version.go +++ b/resource-manager/consumption/2021-10-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/README.md index 4e012eb8642..d19a7e328ec 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/method_get.go index 9bde40fd925..59eec6e861a 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/method_get.go @@ -39,6 +39,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -92,7 +93,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/version.go index 8043c289a21..02305f89ec0 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/README.md b/resource-manager/consumption/2021-10-01/reservationrecommendations/README.md index 695f9627a09..e70935baa8c 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/client.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendation.go index ed80adcc64c..545936f8285 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLegacyReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalLegacyReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LegacyReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go index 73d2056def0..7362c9616a4 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go @@ -10,18 +10,49 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LegacyReservationRecommendationProperties interface { + LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl } -// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LegacyReservationRecommendationProperties = BaseLegacyReservationRecommendationPropertiesImpl{} + +type BaseLegacyReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LookBackPeriod *string `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *float64 `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s +} + +var _ LegacyReservationRecommendationProperties = RawLegacyReservationRecommendationPropertiesImpl{} + +// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLegacyReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + legacyReservationRecommendationProperties BaseLegacyReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { +func (s RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s.legacyReservationRecommendationProperties +} + +func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +83,15 @@ func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawLegacyReservationRecommendationPropertiesImpl{ + var parent BaseLegacyReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLegacyReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawLegacyReservationRecommendationPropertiesImpl{ + legacyReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go index b983dcdcceb..756b699b86a 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ LegacyReservationRecommendationProperties = LegacySharedScopeReservationRe type LegacySharedScopeReservationRecommendationProperties struct { // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -27,11 +28,32 @@ type LegacySharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -55,9 +77,10 @@ func (s LegacySharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go index c29fe9c2e82..7b140932c79 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type LegacySingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,11 +29,32 @@ type LegacySingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -56,9 +78,10 @@ func (s LegacySingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendation.go index aee0b561d4c..cae25d44958 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalModernReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalModernReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ModernReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendationproperties.go index b759d91cc62..1f3a930cc10 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernreservationrecommendationproperties.go @@ -10,18 +10,51 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModernReservationRecommendationProperties interface { + ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl } -// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ModernReservationRecommendationProperties = BaseModernReservationRecommendationPropertiesImpl{} + +type BaseModernReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + Location *string `json:"location,omitempty"` + LookBackPeriod *int64 `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *Amount `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuName *string `json:"skuName,omitempty"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s +} + +var _ ModernReservationRecommendationProperties = RawModernReservationRecommendationPropertiesImpl{} + +// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawModernReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + modernReservationRecommendationProperties BaseModernReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { +func (s RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s.modernReservationRecommendationProperties +} + +func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +85,15 @@ func unmarshalModernReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawModernReservationRecommendationPropertiesImpl{ + var parent BaseModernReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseModernReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawModernReservationRecommendationPropertiesImpl{ + modernReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go index 78f1eb94354..c52182f4a3f 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ ModernReservationRecommendationProperties = ModernSharedScopeReservationRe type ModernSharedScopeReservationRecommendationProperties struct { // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,12 +29,35 @@ type ModernSharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -57,9 +81,10 @@ func (s ModernSharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go index df042ef9dc8..d32896f8ac3 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,12 +30,35 @@ type ModernSingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -58,9 +82,10 @@ func (s ModernSingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..e43fc78b4ad 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2021-10-01/reservationrecommendations/version.go b/resource-manager/consumption/2021-10-01/reservationrecommendations/version.go index b9e1093986b..b5bafa0f29c 100644 --- a/resource-manager/consumption/2021-10-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2021-10-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/README.md b/resource-manager/consumption/2021-10-01/reservationsummaries/README.md index 0df7efaedc1..0ff8eee71c8 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/client.go b/resource-manager/consumption/2021-10-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationsummaries/version.go b/resource-manager/consumption/2021-10-01/reservationsummaries/version.go index 831e8de2df3..9dc8f15003b 100644 --- a/resource-manager/consumption/2021-10-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2021-10-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2021-10-01" } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/README.md b/resource-manager/consumption/2021-10-01/reservationtransactions/README.md index a590b4f6205..8b86b867078 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2021-10-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/client.go b/resource-manager/consumption/2021-10-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/method_list.go b/resource-manager/consumption/2021-10-01/reservationtransactions/method_list.go index ba84b770cba..38b14d48256 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2021-10-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2021-10-01/reservationtransactions/version.go b/resource-manager/consumption/2021-10-01/reservationtransactions/version.go index 84ea5d48a3e..9468c2ed9b2 100644 --- a/resource-manager/consumption/2021-10-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2021-10-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2021-10-01" } diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/README.md b/resource-manager/consumption/2022-09-01/aggregatedcost/README.md index 5e8e30cd61e..73de90d217c 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/client.go b/resource-manager/consumption/2022-09-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2022-09-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2022-09-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2022-09-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index bd960ea6d3e..686c2c231e7 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/aggregatedcost/version.go b/resource-manager/consumption/2022-09-01/aggregatedcost/version.go index 23a6660c644..d1ba96f283a 100644 --- a/resource-manager/consumption/2022-09-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2022-09-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/balances/README.md b/resource-manager/consumption/2022-09-01/balances/README.md index ff7a025bd86..dffe768f019 100644 --- a/resource-manager/consumption/2022-09-01/balances/README.md +++ b/resource-manager/consumption/2022-09-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/balances/client.go b/resource-manager/consumption/2022-09-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2022-09-01/balances/client.go +++ b/resource-manager/consumption/2022-09-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/balances/id_billingaccount.go b/resource-manager/consumption/2022-09-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2022-09-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2022-09-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2022-09-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2022-09-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2022-09-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2022-09-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2022-09-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2022-09-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2022-09-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2022-09-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2022-09-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/balances/version.go b/resource-manager/consumption/2022-09-01/balances/version.go index 542502dbe27..17a70b3462e 100644 --- a/resource-manager/consumption/2022-09-01/balances/version.go +++ b/resource-manager/consumption/2022-09-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/budgets/README.md b/resource-manager/consumption/2022-09-01/budgets/README.md index d37751e4db7..1ae957e1266 100644 --- a/resource-manager/consumption/2022-09-01/budgets/README.md +++ b/resource-manager/consumption/2022-09-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/budgets/client.go b/resource-manager/consumption/2022-09-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2022-09-01/budgets/client.go +++ b/resource-manager/consumption/2022-09-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2022-09-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2022-09-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2022-09-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/budgets/method_createorupdate.go b/resource-manager/consumption/2022-09-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2022-09-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2022-09-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/budgets/method_get.go b/resource-manager/consumption/2022-09-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2022-09-01/budgets/method_get.go +++ b/resource-manager/consumption/2022-09-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/budgets/version.go b/resource-manager/consumption/2022-09-01/budgets/version.go index b1e7622391f..4a563222aad 100644 --- a/resource-manager/consumption/2022-09-01/budgets/version.go +++ b/resource-manager/consumption/2022-09-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/charges/README.md b/resource-manager/consumption/2022-09-01/charges/README.md index 4fd0e315f9e..b19ea0d72e4 100644 --- a/resource-manager/consumption/2022-09-01/charges/README.md +++ b/resource-manager/consumption/2022-09-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/charges/client.go b/resource-manager/consumption/2022-09-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2022-09-01/charges/client.go +++ b/resource-manager/consumption/2022-09-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/charges/method_list.go b/resource-manager/consumption/2022-09-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2022-09-01/charges/method_list.go +++ b/resource-manager/consumption/2022-09-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2022-09-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2022-09-01/charges/model_chargesummary.go b/resource-manager/consumption/2022-09-01/charges/model_chargesummary.go index 8b9c3d9267f..d4e83ce2415 100644 --- a/resource-manager/consumption/2022-09-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2022-09-01/charges/model_chargesummary.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2022-09-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2022-09-01/charges/model_legacychargesummary.go index e23092e5989..0f044d72c29 100644 --- a/resource-manager/consumption/2022-09-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2022-09-01/charges/model_legacychargesummary.go @@ -14,10 +14,22 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = LegacyChargeSummary{} @@ -31,9 +43,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2022-09-01/charges/model_modernchargesummary.go index 13ab91d445a..24a5d5a22f0 100644 --- a/resource-manager/consumption/2022-09-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2022-09-01/charges/model_modernchargesummary.go @@ -14,10 +14,22 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ModernChargeSummary{} @@ -31,9 +43,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/charges/version.go b/resource-manager/consumption/2022-09-01/charges/version.go index 5498fc5ea93..58601d105ba 100644 --- a/resource-manager/consumption/2022-09-01/charges/version.go +++ b/resource-manager/consumption/2022-09-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/credits/README.md b/resource-manager/consumption/2022-09-01/credits/README.md index acee2cf6a32..a1c306f733e 100644 --- a/resource-manager/consumption/2022-09-01/credits/README.md +++ b/resource-manager/consumption/2022-09-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/credits/client.go b/resource-manager/consumption/2022-09-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2022-09-01/credits/client.go +++ b/resource-manager/consumption/2022-09-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/credits/id_billingprofile.go b/resource-manager/consumption/2022-09-01/credits/id_billingprofile.go index 66a63661695..6d8c0703695 100644 --- a/resource-manager/consumption/2022-09-01/credits/id_billingprofile.go +++ b/resource-manager/consumption/2022-09-01/credits/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/credits/method_get.go b/resource-manager/consumption/2022-09-01/credits/method_get.go index 91b84086bc4..75524f021ef 100644 --- a/resource-manager/consumption/2022-09-01/credits/method_get.go +++ b/resource-manager/consumption/2022-09-01/credits/method_get.go @@ -47,7 +47,6 @@ func (c CreditsClient) Get(ctx context.Context, id BillingProfileId) (result Get var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/credits/version.go b/resource-manager/consumption/2022-09-01/credits/version.go index a3979a4b088..8d30f2cf44c 100644 --- a/resource-manager/consumption/2022-09-01/credits/version.go +++ b/resource-manager/consumption/2022-09-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/events/README.md b/resource-manager/consumption/2022-09-01/events/README.md index a4483a5b156..ae612d8ad1f 100644 --- a/resource-manager/consumption/2022-09-01/events/README.md +++ b/resource-manager/consumption/2022-09-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/events/client.go b/resource-manager/consumption/2022-09-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2022-09-01/events/client.go +++ b/resource-manager/consumption/2022-09-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/events/id_billingaccount.go b/resource-manager/consumption/2022-09-01/events/id_billingaccount.go index 91b9db04177..b330b7a9876 100644 --- a/resource-manager/consumption/2022-09-01/events/id_billingaccount.go +++ b/resource-manager/consumption/2022-09-01/events/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/events/id_billingprofile.go b/resource-manager/consumption/2022-09-01/events/id_billingprofile.go index f107ce44b73..2edf290768a 100644 --- a/resource-manager/consumption/2022-09-01/events/id_billingprofile.go +++ b/resource-manager/consumption/2022-09-01/events/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/events/method_listbybillingaccount.go b/resource-manager/consumption/2022-09-01/events/method_listbybillingaccount.go index bc739678dcf..87b3e9974dc 100644 --- a/resource-manager/consumption/2022-09-01/events/method_listbybillingaccount.go +++ b/resource-manager/consumption/2022-09-01/events/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/events/method_listbybillingprofile.go b/resource-manager/consumption/2022-09-01/events/method_listbybillingprofile.go index d4e4d2d8933..397605d17eb 100644 --- a/resource-manager/consumption/2022-09-01/events/method_listbybillingprofile.go +++ b/resource-manager/consumption/2022-09-01/events/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/events/version.go b/resource-manager/consumption/2022-09-01/events/version.go index e246107622b..35523bc7cb6 100644 --- a/resource-manager/consumption/2022-09-01/events/version.go +++ b/resource-manager/consumption/2022-09-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/lots/README.md b/resource-manager/consumption/2022-09-01/lots/README.md index 5bcf85b6e55..cc062b5ec07 100644 --- a/resource-manager/consumption/2022-09-01/lots/README.md +++ b/resource-manager/consumption/2022-09-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/lots/client.go b/resource-manager/consumption/2022-09-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2022-09-01/lots/client.go +++ b/resource-manager/consumption/2022-09-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/lots/id_billingaccount.go b/resource-manager/consumption/2022-09-01/lots/id_billingaccount.go index b4530130d19..23f877b23ab 100644 --- a/resource-manager/consumption/2022-09-01/lots/id_billingaccount.go +++ b/resource-manager/consumption/2022-09-01/lots/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/lots/id_billingprofile.go b/resource-manager/consumption/2022-09-01/lots/id_billingprofile.go index cb16c33bf79..94d881d7dc1 100644 --- a/resource-manager/consumption/2022-09-01/lots/id_billingprofile.go +++ b/resource-manager/consumption/2022-09-01/lots/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/lots/id_customer.go b/resource-manager/consumption/2022-09-01/lots/id_customer.go index ab9905c620e..bfe7a942705 100644 --- a/resource-manager/consumption/2022-09-01/lots/id_customer.go +++ b/resource-manager/consumption/2022-09-01/lots/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/lots/method_listbybillingaccount.go b/resource-manager/consumption/2022-09-01/lots/method_listbybillingaccount.go index 71679325bb1..0db9cbcbcb1 100644 --- a/resource-manager/consumption/2022-09-01/lots/method_listbybillingaccount.go +++ b/resource-manager/consumption/2022-09-01/lots/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/lots/method_listbycustomer.go b/resource-manager/consumption/2022-09-01/lots/method_listbycustomer.go index f3697ec4834..d46b755580b 100644 --- a/resource-manager/consumption/2022-09-01/lots/method_listbycustomer.go +++ b/resource-manager/consumption/2022-09-01/lots/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/lots/version.go b/resource-manager/consumption/2022-09-01/lots/version.go index 3ff76eb5c65..8386ffc7a31 100644 --- a/resource-manager/consumption/2022-09-01/lots/version.go +++ b/resource-manager/consumption/2022-09-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/marketplaces/README.md b/resource-manager/consumption/2022-09-01/marketplaces/README.md index 709abd53e6d..726e8b3ef97 100644 --- a/resource-manager/consumption/2022-09-01/marketplaces/README.md +++ b/resource-manager/consumption/2022-09-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/marketplaces/client.go b/resource-manager/consumption/2022-09-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2022-09-01/marketplaces/client.go +++ b/resource-manager/consumption/2022-09-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/marketplaces/method_list.go b/resource-manager/consumption/2022-09-01/marketplaces/method_list.go index 473fc8b7ca4..5375f3b66b4 100644 --- a/resource-manager/consumption/2022-09-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2022-09-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/marketplaces/version.go b/resource-manager/consumption/2022-09-01/marketplaces/version.go index ddd766d75a9..156ee9717b6 100644 --- a/resource-manager/consumption/2022-09-01/marketplaces/version.go +++ b/resource-manager/consumption/2022-09-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/pricesheet/README.md b/resource-manager/consumption/2022-09-01/pricesheet/README.md index e024fe16fc7..555e9c92335 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/README.md +++ b/resource-manager/consumption/2022-09-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/pricesheet/client.go b/resource-manager/consumption/2022-09-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/client.go +++ b/resource-manager/consumption/2022-09-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2022-09-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2022-09-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/pricesheet/method_get.go b/resource-manager/consumption/2022-09-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2022-09-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2022-09-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2022-09-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/pricesheet/version.go b/resource-manager/consumption/2022-09-01/pricesheet/version.go index 3a12ccba7bf..0ab3d9223e3 100644 --- a/resource-manager/consumption/2022-09-01/pricesheet/version.go +++ b/resource-manager/consumption/2022-09-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/README.md b/resource-manager/consumption/2022-09-01/reservationdetails/README.md index 3ec941f389b..4c891cb261a 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/README.md +++ b/resource-manager/consumption/2022-09-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/client.go b/resource-manager/consumption/2022-09-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/client.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2022-09-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2022-09-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationdetails/version.go b/resource-manager/consumption/2022-09-01/reservationdetails/version.go index 06ad25e6321..7480ece21c6 100644 --- a/resource-manager/consumption/2022-09-01/reservationdetails/version.go +++ b/resource-manager/consumption/2022-09-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/README.md index 7dff5a31d84..c218c5f7a45 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/method_get.go index 9bde40fd925..59eec6e861a 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/method_get.go @@ -39,6 +39,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -92,7 +93,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/version.go index eee20b7f11a..28b0e6adeb9 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/README.md b/resource-manager/consumption/2022-09-01/reservationrecommendations/README.md index 53f49d804fb..b1c32449148 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/client.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendation.go index ed80adcc64c..545936f8285 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLegacyReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalLegacyReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LegacyReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go index 73d2056def0..7362c9616a4 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go @@ -10,18 +10,49 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LegacyReservationRecommendationProperties interface { + LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl } -// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LegacyReservationRecommendationProperties = BaseLegacyReservationRecommendationPropertiesImpl{} + +type BaseLegacyReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LookBackPeriod *string `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *float64 `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s +} + +var _ LegacyReservationRecommendationProperties = RawLegacyReservationRecommendationPropertiesImpl{} + +// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLegacyReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + legacyReservationRecommendationProperties BaseLegacyReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { +func (s RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s.legacyReservationRecommendationProperties +} + +func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +83,15 @@ func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawLegacyReservationRecommendationPropertiesImpl{ + var parent BaseLegacyReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLegacyReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawLegacyReservationRecommendationPropertiesImpl{ + legacyReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go index b983dcdcceb..756b699b86a 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ LegacyReservationRecommendationProperties = LegacySharedScopeReservationRe type LegacySharedScopeReservationRecommendationProperties struct { // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -27,11 +28,32 @@ type LegacySharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -55,9 +77,10 @@ func (s LegacySharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go index c29fe9c2e82..7b140932c79 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type LegacySingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,11 +29,32 @@ type LegacySingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -56,9 +78,10 @@ func (s LegacySingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendation.go index aee0b561d4c..cae25d44958 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalModernReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalModernReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ModernReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendationproperties.go index b759d91cc62..1f3a930cc10 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernreservationrecommendationproperties.go @@ -10,18 +10,51 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModernReservationRecommendationProperties interface { + ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl } -// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ModernReservationRecommendationProperties = BaseModernReservationRecommendationPropertiesImpl{} + +type BaseModernReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + Location *string `json:"location,omitempty"` + LookBackPeriod *int64 `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *Amount `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuName *string `json:"skuName,omitempty"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s +} + +var _ ModernReservationRecommendationProperties = RawModernReservationRecommendationPropertiesImpl{} + +// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawModernReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + modernReservationRecommendationProperties BaseModernReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { +func (s RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s.modernReservationRecommendationProperties +} + +func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +85,15 @@ func unmarshalModernReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawModernReservationRecommendationPropertiesImpl{ + var parent BaseModernReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseModernReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawModernReservationRecommendationPropertiesImpl{ + modernReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go index 78f1eb94354..c52182f4a3f 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ ModernReservationRecommendationProperties = ModernSharedScopeReservationRe type ModernSharedScopeReservationRecommendationProperties struct { // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,12 +29,35 @@ type ModernSharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -57,9 +81,10 @@ func (s ModernSharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go index df042ef9dc8..d32896f8ac3 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,12 +30,35 @@ type ModernSingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -58,9 +82,10 @@ func (s ModernSingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..e43fc78b4ad 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2022-09-01/reservationrecommendations/version.go b/resource-manager/consumption/2022-09-01/reservationrecommendations/version.go index 2a80369a3e3..fc8d16d8613 100644 --- a/resource-manager/consumption/2022-09-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2022-09-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/README.md b/resource-manager/consumption/2022-09-01/reservationsummaries/README.md index f57b8e56e54..0d57978a5ee 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/client.go b/resource-manager/consumption/2022-09-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationsummaries/version.go b/resource-manager/consumption/2022-09-01/reservationsummaries/version.go index a300b01596b..d95e3c95060 100644 --- a/resource-manager/consumption/2022-09-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2022-09-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2022-09-01" } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/README.md b/resource-manager/consumption/2022-09-01/reservationtransactions/README.md index e92eaa3c499..744c205996d 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2022-09-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/client.go b/resource-manager/consumption/2022-09-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/method_list.go b/resource-manager/consumption/2022-09-01/reservationtransactions/method_list.go index ba84b770cba..38b14d48256 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2022-09-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2022-09-01/reservationtransactions/version.go b/resource-manager/consumption/2022-09-01/reservationtransactions/version.go index 934c4336561..c9a61dcad9b 100644 --- a/resource-manager/consumption/2022-09-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2022-09-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2022-09-01" } diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/README.md b/resource-manager/consumption/2023-05-01/aggregatedcost/README.md index 9c7442ec7e0..c69a1411728 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/client.go b/resource-manager/consumption/2023-05-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2023-05-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2023-05-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2023-05-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index bd960ea6d3e..686c2c231e7 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/aggregatedcost/version.go b/resource-manager/consumption/2023-05-01/aggregatedcost/version.go index 32eb6bbafa3..21449419d20 100644 --- a/resource-manager/consumption/2023-05-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2023-05-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/balances/README.md b/resource-manager/consumption/2023-05-01/balances/README.md index 2e5c165a248..ec2d7efd1a1 100644 --- a/resource-manager/consumption/2023-05-01/balances/README.md +++ b/resource-manager/consumption/2023-05-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/balances/client.go b/resource-manager/consumption/2023-05-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2023-05-01/balances/client.go +++ b/resource-manager/consumption/2023-05-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/balances/id_billingaccount.go b/resource-manager/consumption/2023-05-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2023-05-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2023-05-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2023-05-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2023-05-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2023-05-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2023-05-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2023-05-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2023-05-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2023-05-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2023-05-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2023-05-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/balances/version.go b/resource-manager/consumption/2023-05-01/balances/version.go index 6f327f38c80..fdb87b8aa0f 100644 --- a/resource-manager/consumption/2023-05-01/balances/version.go +++ b/resource-manager/consumption/2023-05-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/budgets/README.md b/resource-manager/consumption/2023-05-01/budgets/README.md index 5f14460e78a..dc0fdd959c2 100644 --- a/resource-manager/consumption/2023-05-01/budgets/README.md +++ b/resource-manager/consumption/2023-05-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/budgets/client.go b/resource-manager/consumption/2023-05-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2023-05-01/budgets/client.go +++ b/resource-manager/consumption/2023-05-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2023-05-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2023-05-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2023-05-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/budgets/method_createorupdate.go b/resource-manager/consumption/2023-05-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2023-05-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2023-05-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/budgets/method_get.go b/resource-manager/consumption/2023-05-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2023-05-01/budgets/method_get.go +++ b/resource-manager/consumption/2023-05-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/budgets/version.go b/resource-manager/consumption/2023-05-01/budgets/version.go index f910b0da561..6fb20daebe2 100644 --- a/resource-manager/consumption/2023-05-01/budgets/version.go +++ b/resource-manager/consumption/2023-05-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/charges/README.md b/resource-manager/consumption/2023-05-01/charges/README.md index aeba06ec3b1..659220628c5 100644 --- a/resource-manager/consumption/2023-05-01/charges/README.md +++ b/resource-manager/consumption/2023-05-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/charges/client.go b/resource-manager/consumption/2023-05-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2023-05-01/charges/client.go +++ b/resource-manager/consumption/2023-05-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/charges/method_list.go b/resource-manager/consumption/2023-05-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2023-05-01/charges/method_list.go +++ b/resource-manager/consumption/2023-05-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2023-05-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2023-05-01/charges/model_chargesummary.go b/resource-manager/consumption/2023-05-01/charges/model_chargesummary.go index 8b9c3d9267f..d4e83ce2415 100644 --- a/resource-manager/consumption/2023-05-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2023-05-01/charges/model_chargesummary.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2023-05-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2023-05-01/charges/model_legacychargesummary.go index e23092e5989..0f044d72c29 100644 --- a/resource-manager/consumption/2023-05-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2023-05-01/charges/model_legacychargesummary.go @@ -14,10 +14,22 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = LegacyChargeSummary{} @@ -31,9 +43,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2023-05-01/charges/model_modernchargesummary.go index 13ab91d445a..24a5d5a22f0 100644 --- a/resource-manager/consumption/2023-05-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2023-05-01/charges/model_modernchargesummary.go @@ -14,10 +14,22 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ModernChargeSummary{} @@ -31,9 +43,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/charges/version.go b/resource-manager/consumption/2023-05-01/charges/version.go index 3ace4a542ed..43a197a411d 100644 --- a/resource-manager/consumption/2023-05-01/charges/version.go +++ b/resource-manager/consumption/2023-05-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/credits/README.md b/resource-manager/consumption/2023-05-01/credits/README.md index fe0cd052a95..5876dd3b48b 100644 --- a/resource-manager/consumption/2023-05-01/credits/README.md +++ b/resource-manager/consumption/2023-05-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/credits/client.go b/resource-manager/consumption/2023-05-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2023-05-01/credits/client.go +++ b/resource-manager/consumption/2023-05-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/credits/id_billingprofile.go b/resource-manager/consumption/2023-05-01/credits/id_billingprofile.go index 66a63661695..6d8c0703695 100644 --- a/resource-manager/consumption/2023-05-01/credits/id_billingprofile.go +++ b/resource-manager/consumption/2023-05-01/credits/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/credits/method_get.go b/resource-manager/consumption/2023-05-01/credits/method_get.go index 91b84086bc4..75524f021ef 100644 --- a/resource-manager/consumption/2023-05-01/credits/method_get.go +++ b/resource-manager/consumption/2023-05-01/credits/method_get.go @@ -47,7 +47,6 @@ func (c CreditsClient) Get(ctx context.Context, id BillingProfileId) (result Get var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/credits/version.go b/resource-manager/consumption/2023-05-01/credits/version.go index 42a8a716454..ce312d2904a 100644 --- a/resource-manager/consumption/2023-05-01/credits/version.go +++ b/resource-manager/consumption/2023-05-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/events/README.md b/resource-manager/consumption/2023-05-01/events/README.md index a24ca961613..3795c567dfb 100644 --- a/resource-manager/consumption/2023-05-01/events/README.md +++ b/resource-manager/consumption/2023-05-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/events/client.go b/resource-manager/consumption/2023-05-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2023-05-01/events/client.go +++ b/resource-manager/consumption/2023-05-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/events/id_billingaccount.go b/resource-manager/consumption/2023-05-01/events/id_billingaccount.go index 91b9db04177..b330b7a9876 100644 --- a/resource-manager/consumption/2023-05-01/events/id_billingaccount.go +++ b/resource-manager/consumption/2023-05-01/events/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/events/id_billingprofile.go b/resource-manager/consumption/2023-05-01/events/id_billingprofile.go index f107ce44b73..2edf290768a 100644 --- a/resource-manager/consumption/2023-05-01/events/id_billingprofile.go +++ b/resource-manager/consumption/2023-05-01/events/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/events/method_listbybillingaccount.go b/resource-manager/consumption/2023-05-01/events/method_listbybillingaccount.go index bc739678dcf..87b3e9974dc 100644 --- a/resource-manager/consumption/2023-05-01/events/method_listbybillingaccount.go +++ b/resource-manager/consumption/2023-05-01/events/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/events/method_listbybillingprofile.go b/resource-manager/consumption/2023-05-01/events/method_listbybillingprofile.go index d4e4d2d8933..397605d17eb 100644 --- a/resource-manager/consumption/2023-05-01/events/method_listbybillingprofile.go +++ b/resource-manager/consumption/2023-05-01/events/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/events/version.go b/resource-manager/consumption/2023-05-01/events/version.go index fb2eeb35e7c..a993f0a06e0 100644 --- a/resource-manager/consumption/2023-05-01/events/version.go +++ b/resource-manager/consumption/2023-05-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/lots/README.md b/resource-manager/consumption/2023-05-01/lots/README.md index 9795a19b5bc..fea74068566 100644 --- a/resource-manager/consumption/2023-05-01/lots/README.md +++ b/resource-manager/consumption/2023-05-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/lots/client.go b/resource-manager/consumption/2023-05-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2023-05-01/lots/client.go +++ b/resource-manager/consumption/2023-05-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/lots/id_billingaccount.go b/resource-manager/consumption/2023-05-01/lots/id_billingaccount.go index b4530130d19..23f877b23ab 100644 --- a/resource-manager/consumption/2023-05-01/lots/id_billingaccount.go +++ b/resource-manager/consumption/2023-05-01/lots/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/lots/id_billingprofile.go b/resource-manager/consumption/2023-05-01/lots/id_billingprofile.go index cb16c33bf79..94d881d7dc1 100644 --- a/resource-manager/consumption/2023-05-01/lots/id_billingprofile.go +++ b/resource-manager/consumption/2023-05-01/lots/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/lots/id_customer.go b/resource-manager/consumption/2023-05-01/lots/id_customer.go index ab9905c620e..bfe7a942705 100644 --- a/resource-manager/consumption/2023-05-01/lots/id_customer.go +++ b/resource-manager/consumption/2023-05-01/lots/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/lots/method_listbybillingaccount.go b/resource-manager/consumption/2023-05-01/lots/method_listbybillingaccount.go index 71679325bb1..0db9cbcbcb1 100644 --- a/resource-manager/consumption/2023-05-01/lots/method_listbybillingaccount.go +++ b/resource-manager/consumption/2023-05-01/lots/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/lots/method_listbycustomer.go b/resource-manager/consumption/2023-05-01/lots/method_listbycustomer.go index f3697ec4834..d46b755580b 100644 --- a/resource-manager/consumption/2023-05-01/lots/method_listbycustomer.go +++ b/resource-manager/consumption/2023-05-01/lots/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/lots/version.go b/resource-manager/consumption/2023-05-01/lots/version.go index 0dce61f8c5b..c965d3e5908 100644 --- a/resource-manager/consumption/2023-05-01/lots/version.go +++ b/resource-manager/consumption/2023-05-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/marketplaces/README.md b/resource-manager/consumption/2023-05-01/marketplaces/README.md index 2e79333fd98..c79f0e90959 100644 --- a/resource-manager/consumption/2023-05-01/marketplaces/README.md +++ b/resource-manager/consumption/2023-05-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/marketplaces/client.go b/resource-manager/consumption/2023-05-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2023-05-01/marketplaces/client.go +++ b/resource-manager/consumption/2023-05-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/marketplaces/method_list.go b/resource-manager/consumption/2023-05-01/marketplaces/method_list.go index 473fc8b7ca4..5375f3b66b4 100644 --- a/resource-manager/consumption/2023-05-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2023-05-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/marketplaces/version.go b/resource-manager/consumption/2023-05-01/marketplaces/version.go index 2c91aa655f8..876eb1678ef 100644 --- a/resource-manager/consumption/2023-05-01/marketplaces/version.go +++ b/resource-manager/consumption/2023-05-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/README.md b/resource-manager/consumption/2023-05-01/pricesheet/README.md index 76c7e936b7c..003f10aa9d3 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/README.md +++ b/resource-manager/consumption/2023-05-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/pricesheet/client.go b/resource-manager/consumption/2023-05-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/client.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/id_billingaccountbillingperiod.go b/resource-manager/consumption/2023-05-01/pricesheet/id_billingaccountbillingperiod.go index 2dc504edb1b..16871beb636 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2023-05-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/method_get.go b/resource-manager/consumption/2023-05-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2023-05-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/pricesheet/version.go b/resource-manager/consumption/2023-05-01/pricesheet/version.go index 08956dcd0af..8a5dfa4e65d 100644 --- a/resource-manager/consumption/2023-05-01/pricesheet/version.go +++ b/resource-manager/consumption/2023-05-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/README.md b/resource-manager/consumption/2023-05-01/reservationdetails/README.md index f2368379fcd..5150b512c5e 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/README.md +++ b/resource-manager/consumption/2023-05-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/client.go b/resource-manager/consumption/2023-05-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/client.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2023-05-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2023-05-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationdetails/version.go b/resource-manager/consumption/2023-05-01/reservationdetails/version.go index 7747f3a3cdb..683b9551bfd 100644 --- a/resource-manager/consumption/2023-05-01/reservationdetails/version.go +++ b/resource-manager/consumption/2023-05-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/README.md index 309b81bfe8b..fb55f7583b9 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/method_get.go index d34c15eb2cb..1e21aa9bc92 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -96,7 +97,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/version.go index 0c076158df2..175788eb08f 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/README.md b/resource-manager/consumption/2023-05-01/reservationrecommendations/README.md index 6f07f943a0a..c6f39bb7a05 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/client.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendation.go index ed80adcc64c..545936f8285 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLegacyReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalLegacyReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LegacyReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go index 73d2056def0..7362c9616a4 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go @@ -10,18 +10,49 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LegacyReservationRecommendationProperties interface { + LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl } -// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LegacyReservationRecommendationProperties = BaseLegacyReservationRecommendationPropertiesImpl{} + +type BaseLegacyReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LookBackPeriod *string `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *float64 `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s +} + +var _ LegacyReservationRecommendationProperties = RawLegacyReservationRecommendationPropertiesImpl{} + +// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLegacyReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + legacyReservationRecommendationProperties BaseLegacyReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { +func (s RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s.legacyReservationRecommendationProperties +} + +func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +83,15 @@ func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawLegacyReservationRecommendationPropertiesImpl{ + var parent BaseLegacyReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLegacyReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawLegacyReservationRecommendationPropertiesImpl{ + legacyReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go index b983dcdcceb..756b699b86a 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ LegacyReservationRecommendationProperties = LegacySharedScopeReservationRe type LegacySharedScopeReservationRecommendationProperties struct { // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -27,11 +28,32 @@ type LegacySharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -55,9 +77,10 @@ func (s LegacySharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go index c29fe9c2e82..7b140932c79 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type LegacySingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,11 +29,32 @@ type LegacySingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` } +func (s LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -56,9 +78,10 @@ func (s LegacySingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendation.go index aee0b561d4c..cae25d44958 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalModernReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalModernReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ModernReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendationproperties.go index b759d91cc62..1f3a930cc10 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernreservationrecommendationproperties.go @@ -10,18 +10,51 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModernReservationRecommendationProperties interface { + ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl } -// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ModernReservationRecommendationProperties = BaseModernReservationRecommendationPropertiesImpl{} + +type BaseModernReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + Location *string `json:"location,omitempty"` + LookBackPeriod *int64 `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *Amount `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuName *string `json:"skuName,omitempty"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` +} + +func (s BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s +} + +var _ ModernReservationRecommendationProperties = RawModernReservationRecommendationPropertiesImpl{} + +// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawModernReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + modernReservationRecommendationProperties BaseModernReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { +func (s RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s.modernReservationRecommendationProperties +} + +func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +85,15 @@ func unmarshalModernReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawModernReservationRecommendationPropertiesImpl{ + var parent BaseModernReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseModernReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawModernReservationRecommendationPropertiesImpl{ + modernReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go index 78f1eb94354..c52182f4a3f 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ ModernReservationRecommendationProperties = ModernSharedScopeReservationRe type ModernSharedScopeReservationRecommendationProperties struct { // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,12 +29,35 @@ type ModernSharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -57,9 +81,10 @@ func (s ModernSharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go index df042ef9dc8..d32896f8ac3 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,12 +30,35 @@ type ModernSingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` } +func (s ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + } +} + func (o *ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -58,9 +82,10 @@ func (s ModernSingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..e43fc78b4ad 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2023-05-01/reservationrecommendations/version.go b/resource-manager/consumption/2023-05-01/reservationrecommendations/version.go index b39e55be775..68152375a37 100644 --- a/resource-manager/consumption/2023-05-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2023-05-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/README.md b/resource-manager/consumption/2023-05-01/reservationsummaries/README.md index 770435a7d8e..3eb308fd862 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/client.go b/resource-manager/consumption/2023-05-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationsummaries/version.go b/resource-manager/consumption/2023-05-01/reservationsummaries/version.go index 1e4a3abfd15..55f0faae764 100644 --- a/resource-manager/consumption/2023-05-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2023-05-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2023-05-01" } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/README.md b/resource-manager/consumption/2023-05-01/reservationtransactions/README.md index ad2c06bbc55..7f5ad310629 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-05-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/client.go b/resource-manager/consumption/2023-05-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/method_list.go b/resource-manager/consumption/2023-05-01/reservationtransactions/method_list.go index 2e66d1e6bcb..18c98eebaf2 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2023-05-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-05-01/reservationtransactions/version.go b/resource-manager/consumption/2023-05-01/reservationtransactions/version.go index 1cbe80103e0..20437b3fc0e 100644 --- a/resource-manager/consumption/2023-05-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2023-05-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2023-05-01" } diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/README.md b/resource-manager/consumption/2023-11-01/aggregatedcost/README.md index 9919fd7651e..31f278d6760 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/client.go b/resource-manager/consumption/2023-11-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2023-11-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2023-11-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2023-11-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index bd960ea6d3e..686c2c231e7 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/aggregatedcost/version.go b/resource-manager/consumption/2023-11-01/aggregatedcost/version.go index b2bbb9a1d0e..088f48116fd 100644 --- a/resource-manager/consumption/2023-11-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2023-11-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/balances/README.md b/resource-manager/consumption/2023-11-01/balances/README.md index 852d302d623..83abf9bc43c 100644 --- a/resource-manager/consumption/2023-11-01/balances/README.md +++ b/resource-manager/consumption/2023-11-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/balances/client.go b/resource-manager/consumption/2023-11-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2023-11-01/balances/client.go +++ b/resource-manager/consumption/2023-11-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/balances/id_billingaccount.go b/resource-manager/consumption/2023-11-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2023-11-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2023-11-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2023-11-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2023-11-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2023-11-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2023-11-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2023-11-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2023-11-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2023-11-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2023-11-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2023-11-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/balances/version.go b/resource-manager/consumption/2023-11-01/balances/version.go index ee85adfc314..9d7d759b451 100644 --- a/resource-manager/consumption/2023-11-01/balances/version.go +++ b/resource-manager/consumption/2023-11-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/budgets/README.md b/resource-manager/consumption/2023-11-01/budgets/README.md index 2c134475376..6b9d3bd77fc 100644 --- a/resource-manager/consumption/2023-11-01/budgets/README.md +++ b/resource-manager/consumption/2023-11-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/budgets/client.go b/resource-manager/consumption/2023-11-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2023-11-01/budgets/client.go +++ b/resource-manager/consumption/2023-11-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2023-11-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2023-11-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2023-11-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/budgets/method_createorupdate.go b/resource-manager/consumption/2023-11-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2023-11-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2023-11-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/budgets/method_get.go b/resource-manager/consumption/2023-11-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2023-11-01/budgets/method_get.go +++ b/resource-manager/consumption/2023-11-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/budgets/version.go b/resource-manager/consumption/2023-11-01/budgets/version.go index a05c8bc9010..0b2ab857dcc 100644 --- a/resource-manager/consumption/2023-11-01/budgets/version.go +++ b/resource-manager/consumption/2023-11-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/charges/README.md b/resource-manager/consumption/2023-11-01/charges/README.md index 145d3abefe9..ac4a487ccbd 100644 --- a/resource-manager/consumption/2023-11-01/charges/README.md +++ b/resource-manager/consumption/2023-11-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/charges/client.go b/resource-manager/consumption/2023-11-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2023-11-01/charges/client.go +++ b/resource-manager/consumption/2023-11-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/charges/method_list.go b/resource-manager/consumption/2023-11-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2023-11-01/charges/method_list.go +++ b/resource-manager/consumption/2023-11-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2023-11-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2023-11-01/charges/model_chargesummary.go b/resource-manager/consumption/2023-11-01/charges/model_chargesummary.go index 8b9c3d9267f..d4e83ce2415 100644 --- a/resource-manager/consumption/2023-11-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2023-11-01/charges/model_chargesummary.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2023-11-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2023-11-01/charges/model_legacychargesummary.go index e23092e5989..0f044d72c29 100644 --- a/resource-manager/consumption/2023-11-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2023-11-01/charges/model_legacychargesummary.go @@ -14,10 +14,22 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = LegacyChargeSummary{} @@ -31,9 +43,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2023-11-01/charges/model_modernchargesummary.go index 13ab91d445a..24a5d5a22f0 100644 --- a/resource-manager/consumption/2023-11-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2023-11-01/charges/model_modernchargesummary.go @@ -14,10 +14,22 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ModernChargeSummary{} @@ -31,9 +43,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/charges/version.go b/resource-manager/consumption/2023-11-01/charges/version.go index b924a15032c..70c272b3b69 100644 --- a/resource-manager/consumption/2023-11-01/charges/version.go +++ b/resource-manager/consumption/2023-11-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/credits/README.md b/resource-manager/consumption/2023-11-01/credits/README.md index fd66f344cd4..0849d27fc8c 100644 --- a/resource-manager/consumption/2023-11-01/credits/README.md +++ b/resource-manager/consumption/2023-11-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/credits/client.go b/resource-manager/consumption/2023-11-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2023-11-01/credits/client.go +++ b/resource-manager/consumption/2023-11-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/credits/id_billingprofile.go b/resource-manager/consumption/2023-11-01/credits/id_billingprofile.go index 66a63661695..6d8c0703695 100644 --- a/resource-manager/consumption/2023-11-01/credits/id_billingprofile.go +++ b/resource-manager/consumption/2023-11-01/credits/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/credits/method_get.go b/resource-manager/consumption/2023-11-01/credits/method_get.go index 91b84086bc4..75524f021ef 100644 --- a/resource-manager/consumption/2023-11-01/credits/method_get.go +++ b/resource-manager/consumption/2023-11-01/credits/method_get.go @@ -47,7 +47,6 @@ func (c CreditsClient) Get(ctx context.Context, id BillingProfileId) (result Get var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/credits/version.go b/resource-manager/consumption/2023-11-01/credits/version.go index 4a45810c3a2..a73d2bcc396 100644 --- a/resource-manager/consumption/2023-11-01/credits/version.go +++ b/resource-manager/consumption/2023-11-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/events/README.md b/resource-manager/consumption/2023-11-01/events/README.md index 8d165967e5b..85d25959461 100644 --- a/resource-manager/consumption/2023-11-01/events/README.md +++ b/resource-manager/consumption/2023-11-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/events/client.go b/resource-manager/consumption/2023-11-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2023-11-01/events/client.go +++ b/resource-manager/consumption/2023-11-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/events/id_billingaccount.go b/resource-manager/consumption/2023-11-01/events/id_billingaccount.go index 91b9db04177..b330b7a9876 100644 --- a/resource-manager/consumption/2023-11-01/events/id_billingaccount.go +++ b/resource-manager/consumption/2023-11-01/events/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/events/id_billingprofile.go b/resource-manager/consumption/2023-11-01/events/id_billingprofile.go index f107ce44b73..2edf290768a 100644 --- a/resource-manager/consumption/2023-11-01/events/id_billingprofile.go +++ b/resource-manager/consumption/2023-11-01/events/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/events/method_listbybillingaccount.go b/resource-manager/consumption/2023-11-01/events/method_listbybillingaccount.go index bc739678dcf..87b3e9974dc 100644 --- a/resource-manager/consumption/2023-11-01/events/method_listbybillingaccount.go +++ b/resource-manager/consumption/2023-11-01/events/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/events/method_listbybillingprofile.go b/resource-manager/consumption/2023-11-01/events/method_listbybillingprofile.go index d4e4d2d8933..397605d17eb 100644 --- a/resource-manager/consumption/2023-11-01/events/method_listbybillingprofile.go +++ b/resource-manager/consumption/2023-11-01/events/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/events/version.go b/resource-manager/consumption/2023-11-01/events/version.go index 1c69b058e45..a1a1c4147ec 100644 --- a/resource-manager/consumption/2023-11-01/events/version.go +++ b/resource-manager/consumption/2023-11-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/lots/README.md b/resource-manager/consumption/2023-11-01/lots/README.md index fb06a6a4045..eb97104d616 100644 --- a/resource-manager/consumption/2023-11-01/lots/README.md +++ b/resource-manager/consumption/2023-11-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/lots/client.go b/resource-manager/consumption/2023-11-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2023-11-01/lots/client.go +++ b/resource-manager/consumption/2023-11-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/lots/id_billingaccount.go b/resource-manager/consumption/2023-11-01/lots/id_billingaccount.go index b4530130d19..23f877b23ab 100644 --- a/resource-manager/consumption/2023-11-01/lots/id_billingaccount.go +++ b/resource-manager/consumption/2023-11-01/lots/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/lots/id_billingprofile.go b/resource-manager/consumption/2023-11-01/lots/id_billingprofile.go index cb16c33bf79..94d881d7dc1 100644 --- a/resource-manager/consumption/2023-11-01/lots/id_billingprofile.go +++ b/resource-manager/consumption/2023-11-01/lots/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/lots/id_customer.go b/resource-manager/consumption/2023-11-01/lots/id_customer.go index ab9905c620e..bfe7a942705 100644 --- a/resource-manager/consumption/2023-11-01/lots/id_customer.go +++ b/resource-manager/consumption/2023-11-01/lots/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/lots/method_listbybillingaccount.go b/resource-manager/consumption/2023-11-01/lots/method_listbybillingaccount.go index 71679325bb1..0db9cbcbcb1 100644 --- a/resource-manager/consumption/2023-11-01/lots/method_listbybillingaccount.go +++ b/resource-manager/consumption/2023-11-01/lots/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/lots/method_listbycustomer.go b/resource-manager/consumption/2023-11-01/lots/method_listbycustomer.go index f3697ec4834..d46b755580b 100644 --- a/resource-manager/consumption/2023-11-01/lots/method_listbycustomer.go +++ b/resource-manager/consumption/2023-11-01/lots/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/lots/version.go b/resource-manager/consumption/2023-11-01/lots/version.go index 47df229abab..fa9c1e4c28a 100644 --- a/resource-manager/consumption/2023-11-01/lots/version.go +++ b/resource-manager/consumption/2023-11-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/marketplaces/README.md b/resource-manager/consumption/2023-11-01/marketplaces/README.md index 732f4f17231..42b02a83a11 100644 --- a/resource-manager/consumption/2023-11-01/marketplaces/README.md +++ b/resource-manager/consumption/2023-11-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/marketplaces/client.go b/resource-manager/consumption/2023-11-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2023-11-01/marketplaces/client.go +++ b/resource-manager/consumption/2023-11-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/marketplaces/method_list.go b/resource-manager/consumption/2023-11-01/marketplaces/method_list.go index 473fc8b7ca4..5375f3b66b4 100644 --- a/resource-manager/consumption/2023-11-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2023-11-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/marketplaces/version.go b/resource-manager/consumption/2023-11-01/marketplaces/version.go index 5b48f6e4099..ac3e5cdf571 100644 --- a/resource-manager/consumption/2023-11-01/marketplaces/version.go +++ b/resource-manager/consumption/2023-11-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/README.md b/resource-manager/consumption/2023-11-01/pricesheet/README.md index 0262aa27463..62071445a7e 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/README.md +++ b/resource-manager/consumption/2023-11-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/pricesheet/client.go b/resource-manager/consumption/2023-11-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/client.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/id_billingaccountbillingperiod.go b/resource-manager/consumption/2023-11-01/pricesheet/id_billingaccountbillingperiod.go index 2dc504edb1b..16871beb636 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2023-11-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/method_get.go b/resource-manager/consumption/2023-11-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2023-11-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/pricesheet/version.go b/resource-manager/consumption/2023-11-01/pricesheet/version.go index fc41b878de4..fd9c5b71a3c 100644 --- a/resource-manager/consumption/2023-11-01/pricesheet/version.go +++ b/resource-manager/consumption/2023-11-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/README.md b/resource-manager/consumption/2023-11-01/reservationdetails/README.md index 3aac99effe1..7a94cc1e943 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/README.md +++ b/resource-manager/consumption/2023-11-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/client.go b/resource-manager/consumption/2023-11-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/client.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2023-11-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2023-11-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationdetails/version.go b/resource-manager/consumption/2023-11-01/reservationdetails/version.go index 15b4944c9bb..f9265eda024 100644 --- a/resource-manager/consumption/2023-11-01/reservationdetails/version.go +++ b/resource-manager/consumption/2023-11-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/README.md index 6a43818b51a..69147b8126e 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/method_get.go index d34c15eb2cb..1e21aa9bc92 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -96,7 +97,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/version.go index 9cafad68306..1337a655526 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/README.md b/resource-manager/consumption/2023-11-01/reservationrecommendations/README.md index 6d8c9d55129..0ce9bfa0a5b 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/client.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendation.go index ed80adcc64c..545936f8285 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLegacyReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalLegacyReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LegacyReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go index 73d2056def0..875440d7d6d 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go @@ -10,18 +10,51 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LegacyReservationRecommendationProperties interface { + LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl } -// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LegacyReservationRecommendationProperties = BaseLegacyReservationRecommendationPropertiesImpl{} + +type BaseLegacyReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LastUsageDate *string `json:"lastUsageDate,omitempty"` + LookBackPeriod *string `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *float64 `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` +} + +func (s BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s +} + +var _ LegacyReservationRecommendationProperties = RawLegacyReservationRecommendationPropertiesImpl{} + +// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLegacyReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + legacyReservationRecommendationProperties BaseLegacyReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { +func (s RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s.legacyReservationRecommendationProperties +} + +func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +85,15 @@ func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawLegacyReservationRecommendationPropertiesImpl{ + var parent BaseLegacyReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLegacyReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawLegacyReservationRecommendationPropertiesImpl{ + legacyReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go index b73484103aa..5d482e2462e 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ LegacyReservationRecommendationProperties = LegacySharedScopeReservationRe type LegacySharedScopeReservationRecommendationProperties struct { // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,12 +29,35 @@ type LegacySharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` } +func (s LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -69,9 +93,10 @@ func (s LegacySharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go index 140b95dcf3e..eab5790f487 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type LegacySingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,12 +30,35 @@ type LegacySingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` } +func (s LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -70,9 +94,10 @@ func (s LegacySingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendation.go index aee0b561d4c..cae25d44958 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalModernReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalModernReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ModernReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendationproperties.go index b759d91cc62..013c872b38a 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernreservationrecommendationproperties.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModernReservationRecommendationProperties interface { + ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl } -// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ModernReservationRecommendationProperties = BaseModernReservationRecommendationPropertiesImpl{} + +type BaseModernReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LastUsageDate *string `json:"lastUsageDate,omitempty"` + Location *string `json:"location,omitempty"` + LookBackPeriod *int64 `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *Amount `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuName *string `json:"skuName,omitempty"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` +} + +func (s BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s +} + +var _ ModernReservationRecommendationProperties = RawModernReservationRecommendationPropertiesImpl{} + +// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawModernReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + modernReservationRecommendationProperties BaseModernReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { +func (s RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s.modernReservationRecommendationProperties +} + +func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +87,15 @@ func unmarshalModernReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawModernReservationRecommendationPropertiesImpl{ + var parent BaseModernReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseModernReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawModernReservationRecommendationPropertiesImpl{ + modernReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go index 30647d1b9e6..84accc14972 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ ModernReservationRecommendationProperties = ModernSharedScopeReservationRe type ModernSharedScopeReservationRecommendationProperties struct { // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,6 +30,7 @@ type ModernSharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` @@ -36,6 +38,30 @@ type ModernSharedScopeReservationRecommendationProperties struct { TotalHours *int64 `json:"totalHours,omitempty"` } +func (s ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -71,9 +97,10 @@ func (s ModernSharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go index ba936f6c1f9..d1903fbb6c5 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -30,6 +31,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` @@ -37,6 +39,30 @@ type ModernSingleScopeReservationRecommendationProperties struct { TotalHours *int64 `json:"totalHours,omitempty"` } +func (s ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -72,9 +98,10 @@ func (s ModernSingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..e43fc78b4ad 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2023-11-01/reservationrecommendations/version.go b/resource-manager/consumption/2023-11-01/reservationrecommendations/version.go index 2e3dd3131fe..4ad159c7d7a 100644 --- a/resource-manager/consumption/2023-11-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2023-11-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/README.md b/resource-manager/consumption/2023-11-01/reservationsummaries/README.md index dc4fd687520..c85ab025fe7 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/client.go b/resource-manager/consumption/2023-11-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationsummaries/version.go b/resource-manager/consumption/2023-11-01/reservationsummaries/version.go index e965e053b18..fb3738c6ba6 100644 --- a/resource-manager/consumption/2023-11-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2023-11-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2023-11-01" } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/README.md b/resource-manager/consumption/2023-11-01/reservationtransactions/README.md index f6f92133de9..2ef9c58d301 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2023-11-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/client.go b/resource-manager/consumption/2023-11-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/method_list.go b/resource-manager/consumption/2023-11-01/reservationtransactions/method_list.go index 2e66d1e6bcb..18c98eebaf2 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2023-11-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2023-11-01/reservationtransactions/version.go b/resource-manager/consumption/2023-11-01/reservationtransactions/version.go index 094fb34a535..8e1b582ca83 100644 --- a/resource-manager/consumption/2023-11-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2023-11-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2023-11-01" } diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/README.md b/resource-manager/consumption/2024-08-01/aggregatedcost/README.md index c5c75ca85ab..ce6d8b4b7d7 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/README.md +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/aggregatedcost` Documentation -The `aggregatedcost` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `aggregatedcost` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/client.go b/resource-manager/consumption/2024-08-01/aggregatedcost/client.go index 18c9625e6bf..c58a955e245 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/client.go +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/client.go @@ -15,7 +15,7 @@ type AggregatedCostClient struct { } func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aggregatedcost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aggregatedcost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AggregatedCostClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/id_providers2billingperiod.go b/resource-manager/consumption/2024-08-01/aggregatedcost/id_providers2billingperiod.go index 948889c3ba7..c4ff12d4206 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/id_providers2billingperiod.go +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/id_providers2billingperiod.go @@ -40,7 +40,7 @@ func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, e } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2Billi } id := Providers2BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/method_getbymanagementgroup.go b/resource-manager/consumption/2024-08-01/aggregatedcost/method_getbymanagementgroup.go index 5f5030bcf40..0f2008a80fb 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/method_getbymanagementgroup.go +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/method_getbymanagementgroup.go @@ -35,6 +35,7 @@ func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commo var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go b/resource-manager/consumption/2024-08-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go index bd960ea6d3e..686c2c231e7 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/method_getforbillingperiodbymanagementgroup.go @@ -46,7 +46,6 @@ func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.C var model ManagementGroupAggregatedCostResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/aggregatedcost/version.go b/resource-manager/consumption/2024-08-01/aggregatedcost/version.go index af9896a38a7..9b5597d908a 100644 --- a/resource-manager/consumption/2024-08-01/aggregatedcost/version.go +++ b/resource-manager/consumption/2024-08-01/aggregatedcost/version.go @@ -1,12 +1,10 @@ package aggregatedcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aggregatedcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aggregatedcost/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/balances/README.md b/resource-manager/consumption/2024-08-01/balances/README.md index c98196f75a8..fb7a79c0e3c 100644 --- a/resource-manager/consumption/2024-08-01/balances/README.md +++ b/resource-manager/consumption/2024-08-01/balances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/balances` Documentation -The `balances` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `balances` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/balances/client.go b/resource-manager/consumption/2024-08-01/balances/client.go index 110d9423c48..5cf8fc10378 100644 --- a/resource-manager/consumption/2024-08-01/balances/client.go +++ b/resource-manager/consumption/2024-08-01/balances/client.go @@ -15,7 +15,7 @@ type BalancesClient struct { } func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "balances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "balances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BalancesClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/balances/id_billingaccount.go b/resource-manager/consumption/2024-08-01/balances/id_billingaccount.go index 35d7f87f95d..88c24503a1d 100644 --- a/resource-manager/consumption/2024-08-01/balances/id_billingaccount.go +++ b/resource-manager/consumption/2024-08-01/balances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/balances/id_billingaccountbillingperiod.go b/resource-manager/consumption/2024-08-01/balances/id_billingaccountbillingperiod.go index 675931c329e..e1c624800fd 100644 --- a/resource-manager/consumption/2024-08-01/balances/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2024-08-01/balances/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/balances/method_getbybillingaccount.go b/resource-manager/consumption/2024-08-01/balances/method_getbybillingaccount.go index 4511607702c..b6213dc3999 100644 --- a/resource-manager/consumption/2024-08-01/balances/method_getbybillingaccount.go +++ b/resource-manager/consumption/2024-08-01/balances/method_getbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccou var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/balances/method_getforbillingperiodbybillingaccount.go b/resource-manager/consumption/2024-08-01/balances/method_getforbillingperiodbybillingaccount.go index 7c57a001271..df3b31df59e 100644 --- a/resource-manager/consumption/2024-08-01/balances/method_getforbillingperiodbybillingaccount.go +++ b/resource-manager/consumption/2024-08-01/balances/method_getforbillingperiodbybillingaccount.go @@ -46,7 +46,6 @@ func (c BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, var model Balance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/balances/version.go b/resource-manager/consumption/2024-08-01/balances/version.go index bc37c030a73..1484b4a7cb4 100644 --- a/resource-manager/consumption/2024-08-01/balances/version.go +++ b/resource-manager/consumption/2024-08-01/balances/version.go @@ -1,12 +1,10 @@ package balances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/balances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/balances/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/budgets/README.md b/resource-manager/consumption/2024-08-01/budgets/README.md index 80191a9b4e5..a1ce6e2184c 100644 --- a/resource-manager/consumption/2024-08-01/budgets/README.md +++ b/resource-manager/consumption/2024-08-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/budgets/client.go b/resource-manager/consumption/2024-08-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/consumption/2024-08-01/budgets/client.go +++ b/resource-manager/consumption/2024-08-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/budgets/id_scopedbudget.go b/resource-manager/consumption/2024-08-01/budgets/id_scopedbudget.go index a7a18b1cd30..d36b8610db9 100644 --- a/resource-manager/consumption/2024-08-01/budgets/id_scopedbudget.go +++ b/resource-manager/consumption/2024-08-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/budgets/method_createorupdate.go b/resource-manager/consumption/2024-08-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/consumption/2024-08-01/budgets/method_createorupdate.go +++ b/resource-manager/consumption/2024-08-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/budgets/method_get.go b/resource-manager/consumption/2024-08-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/consumption/2024-08-01/budgets/method_get.go +++ b/resource-manager/consumption/2024-08-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/budgets/version.go b/resource-manager/consumption/2024-08-01/budgets/version.go index 0a287d755b1..38452e108ca 100644 --- a/resource-manager/consumption/2024-08-01/budgets/version.go +++ b/resource-manager/consumption/2024-08-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/charges/README.md b/resource-manager/consumption/2024-08-01/charges/README.md index 0e6ed2ec118..85b8de450ab 100644 --- a/resource-manager/consumption/2024-08-01/charges/README.md +++ b/resource-manager/consumption/2024-08-01/charges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/charges` Documentation -The `charges` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `charges` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/charges/client.go b/resource-manager/consumption/2024-08-01/charges/client.go index e3b79c412c6..036959f4130 100644 --- a/resource-manager/consumption/2024-08-01/charges/client.go +++ b/resource-manager/consumption/2024-08-01/charges/client.go @@ -15,7 +15,7 @@ type ChargesClient struct { } func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "charges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "charges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChargesClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/charges/method_list.go b/resource-manager/consumption/2024-08-01/charges/method_list.go index e5691031026..9ab82b0a418 100644 --- a/resource-manager/consumption/2024-08-01/charges/method_list.go +++ b/resource-manager/consumption/2024-08-01/charges/method_list.go @@ -38,6 +38,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -87,7 +88,6 @@ func (c ChargesClient) List(ctx context.Context, id commonids.ScopeId, options L var model ChargesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/charges/model_chargeslistresult.go b/resource-manager/consumption/2024-08-01/charges/model_chargeslistresult.go index 9e32e3f8fcb..3649fcbbb85 100644 --- a/resource-manager/consumption/2024-08-01/charges/model_chargeslistresult.go +++ b/resource-manager/consumption/2024-08-01/charges/model_chargeslistresult.go @@ -29,7 +29,7 @@ func (s *ChargesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ChargeSummary, 0) for i, val := range listTemp { - impl, err := unmarshalChargeSummaryImplementation(val) + impl, err := UnmarshalChargeSummaryImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ChargesListResult': %+v", i, err) } diff --git a/resource-manager/consumption/2024-08-01/charges/model_chargesummary.go b/resource-manager/consumption/2024-08-01/charges/model_chargesummary.go index 8b9c3d9267f..d4e83ce2415 100644 --- a/resource-manager/consumption/2024-08-01/charges/model_chargesummary.go +++ b/resource-manager/consumption/2024-08-01/charges/model_chargesummary.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ChargeSummary interface { + ChargeSummary() BaseChargeSummaryImpl } -// RawChargeSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ChargeSummary = BaseChargeSummaryImpl{} + +type BaseChargeSummaryImpl struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s +} + +var _ ChargeSummary = RawChargeSummaryImpl{} + +// RawChargeSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawChargeSummaryImpl struct { - Type string - Values map[string]interface{} + chargeSummary BaseChargeSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawChargeSummaryImpl) ChargeSummary() BaseChargeSummaryImpl { + return s.chargeSummary } -func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { +func UnmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalChargeSummaryImplementation(input []byte) (ChargeSummary, error) { return out, nil } - out := RawChargeSummaryImpl{ - Type: value, - Values: temp, + var parent BaseChargeSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseChargeSummaryImpl: %+v", err) } - return out, nil + + return RawChargeSummaryImpl{ + chargeSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2024-08-01/charges/model_legacychargesummary.go b/resource-manager/consumption/2024-08-01/charges/model_legacychargesummary.go index e23092e5989..0f044d72c29 100644 --- a/resource-manager/consumption/2024-08-01/charges/model_legacychargesummary.go +++ b/resource-manager/consumption/2024-08-01/charges/model_legacychargesummary.go @@ -14,10 +14,22 @@ type LegacyChargeSummary struct { Properties LegacyChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = LegacyChargeSummary{} @@ -31,9 +43,10 @@ func (s LegacyChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyChargeSummary: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/charges/model_modernchargesummary.go b/resource-manager/consumption/2024-08-01/charges/model_modernchargesummary.go index 13ab91d445a..24a5d5a22f0 100644 --- a/resource-manager/consumption/2024-08-01/charges/model_modernchargesummary.go +++ b/resource-manager/consumption/2024-08-01/charges/model_modernchargesummary.go @@ -14,10 +14,22 @@ type ModernChargeSummary struct { Properties ModernChargeSummaryProperties `json:"properties"` // Fields inherited from ChargeSummary - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ChargeSummaryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernChargeSummary) ChargeSummary() BaseChargeSummaryImpl { + return BaseChargeSummaryImpl{ + ETag: s.ETag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ModernChargeSummary{} @@ -31,9 +43,10 @@ func (s ModernChargeSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernChargeSummary: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/charges/version.go b/resource-manager/consumption/2024-08-01/charges/version.go index d96a685a57d..de5d7cc75d1 100644 --- a/resource-manager/consumption/2024-08-01/charges/version.go +++ b/resource-manager/consumption/2024-08-01/charges/version.go @@ -1,12 +1,10 @@ package charges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/charges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/charges/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/credits/README.md b/resource-manager/consumption/2024-08-01/credits/README.md index 5c30f0ed094..e1b919a4911 100644 --- a/resource-manager/consumption/2024-08-01/credits/README.md +++ b/resource-manager/consumption/2024-08-01/credits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/credits` Documentation -The `credits` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `credits` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/credits/client.go b/resource-manager/consumption/2024-08-01/credits/client.go index 341bae6efd2..324303c6d4d 100644 --- a/resource-manager/consumption/2024-08-01/credits/client.go +++ b/resource-manager/consumption/2024-08-01/credits/client.go @@ -15,7 +15,7 @@ type CreditsClient struct { } func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreditsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/credits/id_billingprofile.go b/resource-manager/consumption/2024-08-01/credits/id_billingprofile.go index 66a63661695..6d8c0703695 100644 --- a/resource-manager/consumption/2024-08-01/credits/id_billingprofile.go +++ b/resource-manager/consumption/2024-08-01/credits/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/credits/method_get.go b/resource-manager/consumption/2024-08-01/credits/method_get.go index 91b84086bc4..75524f021ef 100644 --- a/resource-manager/consumption/2024-08-01/credits/method_get.go +++ b/resource-manager/consumption/2024-08-01/credits/method_get.go @@ -47,7 +47,6 @@ func (c CreditsClient) Get(ctx context.Context, id BillingProfileId) (result Get var model CreditSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/credits/version.go b/resource-manager/consumption/2024-08-01/credits/version.go index 03cc254406b..b72c863054a 100644 --- a/resource-manager/consumption/2024-08-01/credits/version.go +++ b/resource-manager/consumption/2024-08-01/credits/version.go @@ -1,12 +1,10 @@ package credits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credits/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/events/README.md b/resource-manager/consumption/2024-08-01/events/README.md index 76faf6e6f10..55bca90e490 100644 --- a/resource-manager/consumption/2024-08-01/events/README.md +++ b/resource-manager/consumption/2024-08-01/events/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/events` Documentation -The `events` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `events` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/events/client.go b/resource-manager/consumption/2024-08-01/events/client.go index b72f79aeae7..07a78d3abb8 100644 --- a/resource-manager/consumption/2024-08-01/events/client.go +++ b/resource-manager/consumption/2024-08-01/events/client.go @@ -15,7 +15,7 @@ type EventsClient struct { } func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "events", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "events", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/events/id_billingaccount.go b/resource-manager/consumption/2024-08-01/events/id_billingaccount.go index 91b9db04177..b330b7a9876 100644 --- a/resource-manager/consumption/2024-08-01/events/id_billingaccount.go +++ b/resource-manager/consumption/2024-08-01/events/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/events/id_billingprofile.go b/resource-manager/consumption/2024-08-01/events/id_billingprofile.go index f107ce44b73..2edf290768a 100644 --- a/resource-manager/consumption/2024-08-01/events/id_billingprofile.go +++ b/resource-manager/consumption/2024-08-01/events/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/events/method_listbybillingaccount.go b/resource-manager/consumption/2024-08-01/events/method_listbybillingaccount.go index bc739678dcf..87b3e9974dc 100644 --- a/resource-manager/consumption/2024-08-01/events/method_listbybillingaccount.go +++ b/resource-manager/consumption/2024-08-01/events/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/events/method_listbybillingprofile.go b/resource-manager/consumption/2024-08-01/events/method_listbybillingprofile.go index d4e4d2d8933..397605d17eb 100644 --- a/resource-manager/consumption/2024-08-01/events/method_listbybillingprofile.go +++ b/resource-manager/consumption/2024-08-01/events/method_listbybillingprofile.go @@ -40,6 +40,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/events/version.go b/resource-manager/consumption/2024-08-01/events/version.go index 967fa1d26b0..eeaf5ea8cef 100644 --- a/resource-manager/consumption/2024-08-01/events/version.go +++ b/resource-manager/consumption/2024-08-01/events/version.go @@ -1,12 +1,10 @@ package events -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/events/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/events/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/lots/README.md b/resource-manager/consumption/2024-08-01/lots/README.md index c3c52b30904..050fa682954 100644 --- a/resource-manager/consumption/2024-08-01/lots/README.md +++ b/resource-manager/consumption/2024-08-01/lots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/lots` Documentation -The `lots` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `lots` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/lots/client.go b/resource-manager/consumption/2024-08-01/lots/client.go index da568cd252e..eb29fc12016 100644 --- a/resource-manager/consumption/2024-08-01/lots/client.go +++ b/resource-manager/consumption/2024-08-01/lots/client.go @@ -15,7 +15,7 @@ type LotsClient struct { } func NewLotsClientWithBaseURI(sdkApi sdkEnv.Api) (*LotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LotsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/lots/id_billingaccount.go b/resource-manager/consumption/2024-08-01/lots/id_billingaccount.go index b4530130d19..23f877b23ab 100644 --- a/resource-manager/consumption/2024-08-01/lots/id_billingaccount.go +++ b/resource-manager/consumption/2024-08-01/lots/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/lots/id_billingprofile.go b/resource-manager/consumption/2024-08-01/lots/id_billingprofile.go index cb16c33bf79..94d881d7dc1 100644 --- a/resource-manager/consumption/2024-08-01/lots/id_billingprofile.go +++ b/resource-manager/consumption/2024-08-01/lots/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/lots/id_customer.go b/resource-manager/consumption/2024-08-01/lots/id_customer.go index ab9905c620e..bfe7a942705 100644 --- a/resource-manager/consumption/2024-08-01/lots/id_customer.go +++ b/resource-manager/consumption/2024-08-01/lots/id_customer.go @@ -40,7 +40,7 @@ func ParseCustomerID(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCustomerIDInsensitively(input string) (*CustomerId, error) { } id := CustomerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/lots/method_listbybillingaccount.go b/resource-manager/consumption/2024-08-01/lots/method_listbybillingaccount.go index 71679325bb1..0db9cbcbcb1 100644 --- a/resource-manager/consumption/2024-08-01/lots/method_listbybillingaccount.go +++ b/resource-manager/consumption/2024-08-01/lots/method_listbybillingaccount.go @@ -39,6 +39,7 @@ func (o ListByBillingAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/lots/method_listbycustomer.go b/resource-manager/consumption/2024-08-01/lots/method_listbycustomer.go index f3697ec4834..d46b755580b 100644 --- a/resource-manager/consumption/2024-08-01/lots/method_listbycustomer.go +++ b/resource-manager/consumption/2024-08-01/lots/method_listbycustomer.go @@ -39,6 +39,7 @@ func (o ListByCustomerOperationOptions) ToHeaders() *client.Headers { func (o ListByCustomerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/lots/version.go b/resource-manager/consumption/2024-08-01/lots/version.go index 96a343fc5a3..21f1a333fcb 100644 --- a/resource-manager/consumption/2024-08-01/lots/version.go +++ b/resource-manager/consumption/2024-08-01/lots/version.go @@ -1,12 +1,10 @@ package lots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lots/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/marketplaces/README.md b/resource-manager/consumption/2024-08-01/marketplaces/README.md index 327e4948fc1..b82c34f0e3e 100644 --- a/resource-manager/consumption/2024-08-01/marketplaces/README.md +++ b/resource-manager/consumption/2024-08-01/marketplaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/marketplaces` Documentation -The `marketplaces` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `marketplaces` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/marketplaces/client.go b/resource-manager/consumption/2024-08-01/marketplaces/client.go index 7b322e5adff..071985d16a9 100644 --- a/resource-manager/consumption/2024-08-01/marketplaces/client.go +++ b/resource-manager/consumption/2024-08-01/marketplaces/client.go @@ -15,7 +15,7 @@ type MarketplacesClient struct { } func NewMarketplacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplacesClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/marketplaces/method_list.go b/resource-manager/consumption/2024-08-01/marketplaces/method_list.go index 473fc8b7ca4..5375f3b66b4 100644 --- a/resource-manager/consumption/2024-08-01/marketplaces/method_list.go +++ b/resource-manager/consumption/2024-08-01/marketplaces/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/marketplaces/version.go b/resource-manager/consumption/2024-08-01/marketplaces/version.go index c85389a97ae..8b25ca244ce 100644 --- a/resource-manager/consumption/2024-08-01/marketplaces/version.go +++ b/resource-manager/consumption/2024-08-01/marketplaces/version.go @@ -1,12 +1,10 @@ package marketplaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaces/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/README.md b/resource-manager/consumption/2024-08-01/pricesheet/README.md index ac73e043dd3..3f2cd79fc22 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/README.md +++ b/resource-manager/consumption/2024-08-01/pricesheet/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/pricesheet` Documentation -The `pricesheet` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `pricesheet` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/pricesheet/client.go b/resource-manager/consumption/2024-08-01/pricesheet/client.go index e44ac098866..5ab2fa22769 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/client.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/client.go @@ -15,7 +15,7 @@ type PriceSheetClient struct { } func NewPriceSheetClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheet", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheet", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/id_billingaccountbillingperiod.go b/resource-manager/consumption/2024-08-01/pricesheet/id_billingaccountbillingperiod.go index 2dc504edb1b..16871beb636 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/id_billingaccountbillingperiod.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/id_billingaccountbillingperiod.go @@ -40,7 +40,7 @@ func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPer } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAcco } id := BillingAccountBillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/id_billingperiod.go b/resource-manager/consumption/2024-08-01/pricesheet/id_billingperiod.go index afa5d8e2b95..31fb233420c 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/id_billingperiod.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/method_get.go b/resource-manager/consumption/2024-08-01/pricesheet/method_get.go index 52dfa7ce731..bb6d209b9b2 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/method_get.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c PriceSheetClient) Get(ctx context.Context, id commonids.SubscriptionId, var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/method_getbybillingperiod.go b/resource-manager/consumption/2024-08-01/pricesheet/method_getbybillingperiod.go index 6b9d73036be..97c950efef2 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/method_getbybillingperiod.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/method_getbybillingperiod.go @@ -35,6 +35,7 @@ func (o GetByBillingPeriodOperationOptions) ToHeaders() *client.Headers { func (o GetByBillingPeriodOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PriceSheetClient) GetByBillingPeriod(ctx context.Context, id BillingPeri var model PriceSheetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/pricesheet/version.go b/resource-manager/consumption/2024-08-01/pricesheet/version.go index fda7e5eb88f..05ceba3d522 100644 --- a/resource-manager/consumption/2024-08-01/pricesheet/version.go +++ b/resource-manager/consumption/2024-08-01/pricesheet/version.go @@ -1,12 +1,10 @@ package pricesheet -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheet/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheet/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/README.md b/resource-manager/consumption/2024-08-01/reservationdetails/README.md index 12b0534c91a..47519e70b16 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/README.md +++ b/resource-manager/consumption/2024-08-01/reservationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationdetails` Documentation -The `reservationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `reservationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/client.go b/resource-manager/consumption/2024-08-01/reservationdetails/client.go index 4464dcd98e5..7984ab28a88 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/client.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/client.go @@ -15,7 +15,7 @@ type ReservationDetailsClient struct { } func NewReservationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/id_reservation.go b/resource-manager/consumption/2024-08-01/reservationdetails/id_reservation.go index 89029aebaca..613d9947b27 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/id_reservation.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/id_reservationorder.go b/resource-manager/consumption/2024-08-01/reservationdetails/id_reservationorder.go index 4e8239621a2..5e24b128148 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/id_reservationorder.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslist.go b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslist.go index 6fb07ab02f5..2b4c1a8ddb1 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslist.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslist.go @@ -44,6 +44,7 @@ func (o ReservationsDetailsListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsDetailsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go index aa1795dac26..709a502b0a5 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorder.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders() * func (o ReservationsDetailsListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go index 2c7c1d40261..38cf11f3a4f 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/method_reservationsdetailslistbyreservationorderandreservation.go @@ -39,6 +39,7 @@ func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) func (o ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationdetails/version.go b/resource-manager/consumption/2024-08-01/reservationdetails/version.go index ab957b0b355..f48478ff323 100644 --- a/resource-manager/consumption/2024-08-01/reservationdetails/version.go +++ b/resource-manager/consumption/2024-08-01/reservationdetails/version.go @@ -1,12 +1,10 @@ package reservationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationdetails/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/README.md b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/README.md index 963dcd6bf03..9664a0ad5a3 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/README.md +++ b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationrecommendationdetails` Documentation -The `reservationrecommendationdetails` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `reservationrecommendationdetails` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/client.go b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/client.go index 9637c1ee773..2ecfc6625df 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/client.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationDetailsClient struct { } func NewReservationRecommendationDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendationdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationDetailsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/method_get.go b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/method_get.go index d34c15eb2cb..1e21aa9bc92 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/method_get.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -96,7 +97,6 @@ func (c ReservationRecommendationDetailsClient) Get(ctx context.Context, id comm var model ReservationRecommendationDetailsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/version.go b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/version.go index 477417106dc..92131387f46 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/version.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendationdetails/version.go @@ -1,12 +1,10 @@ package reservationrecommendationdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendationdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendationdetails/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/README.md b/resource-manager/consumption/2024-08-01/reservationrecommendations/README.md index 3060fa6d202..389a8ff7b22 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/README.md +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationrecommendations` Documentation -The `reservationrecommendations` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `reservationrecommendations` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/client.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/client.go index 282978fc9af..1f528573054 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/client.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/client.go @@ -15,7 +15,7 @@ type ReservationRecommendationsClient struct { } func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationRecommendationsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/method_list.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/method_list.go index fff4b3070f7..3a59e52cd4a 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/method_list.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -103,7 +104,7 @@ func (c ReservationRecommendationsClient) List(ctx context.Context, id commonids temp := make([]ReservationRecommendation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalReservationRecommendationImplementation(v) + val, err := UnmarshalReservationRecommendationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ReservationRecommendation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendation.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendation.go index ed80adcc64c..545936f8285 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendation.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendation.go @@ -14,13 +14,28 @@ type LegacyReservationRecommendation struct { Properties LegacyReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s LegacyReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = LegacyReservationRecommendation{} @@ -34,9 +49,10 @@ func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacyReservationRecommendation: %+v", err) } + decoded["kind"] = "legacy" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *LegacyReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLegacyReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalLegacyReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LegacyReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go index 73d2056def0..875440d7d6d 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacyreservationrecommendationproperties.go @@ -10,18 +10,51 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LegacyReservationRecommendationProperties interface { + LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl } -// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LegacyReservationRecommendationProperties = BaseLegacyReservationRecommendationPropertiesImpl{} + +type BaseLegacyReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LastUsageDate *string `json:"lastUsageDate,omitempty"` + LookBackPeriod *string `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *float64 `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` +} + +func (s BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s +} + +var _ LegacyReservationRecommendationProperties = RawLegacyReservationRecommendationPropertiesImpl{} + +// RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLegacyReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + legacyReservationRecommendationProperties BaseLegacyReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { +func (s RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return s.legacyReservationRecommendationProperties +} + +func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +85,15 @@ func unmarshalLegacyReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawLegacyReservationRecommendationPropertiesImpl{ + var parent BaseLegacyReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLegacyReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawLegacyReservationRecommendationPropertiesImpl{ + legacyReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go index b73484103aa..5d482e2462e 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ LegacyReservationRecommendationProperties = LegacySharedScopeReservationRe type LegacySharedScopeReservationRecommendationProperties struct { // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -28,12 +29,35 @@ type LegacySharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` } +func (s LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -69,9 +93,10 @@ func (s LegacySharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go index 140b95dcf3e..eab5790f487 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_legacysinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type LegacySingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from LegacyReservationRecommendationProperties + CostWithNoReservedInstances *float64 `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,12 +30,35 @@ type LegacySingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` TotalCostWithReservedInstances *float64 `json:"totalCostWithReservedInstances,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` } +func (s LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl { + return BaseLegacyReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -70,9 +94,10 @@ func (s LegacySingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LegacySingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendation.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendation.go index aee0b561d4c..cae25d44958 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendation.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendation.go @@ -14,13 +14,28 @@ type ModernReservationRecommendation struct { Properties ModernReservationRecommendationProperties `json:"properties"` // Fields inherited from ReservationRecommendation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Sku *string `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ModernReservationRecommendation) ReservationRecommendation() BaseReservationRecommendationImpl { + return BaseReservationRecommendationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } } var _ json.Marshaler = ModernReservationRecommendation{} @@ -34,9 +49,10 @@ func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernReservationRecommendation: %+v", err) } + decoded["kind"] = "modern" encoded, err = json.Marshal(decoded) @@ -58,6 +74,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { s.Etag = decoded.Etag s.Id = decoded.Id + s.Kind = decoded.Kind s.Location = decoded.Location s.Name = decoded.Name s.Sku = decoded.Sku @@ -70,7 +87,7 @@ func (s *ModernReservationRecommendation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalModernReservationRecommendationPropertiesImplementation(v) + impl, err := UnmarshalModernReservationRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ModernReservationRecommendation': %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendationproperties.go index b759d91cc62..013c872b38a 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernreservationrecommendationproperties.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ModernReservationRecommendationProperties interface { + ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl } -// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ModernReservationRecommendationProperties = BaseModernReservationRecommendationPropertiesImpl{} + +type BaseModernReservationRecommendationPropertiesImpl struct { + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` + FirstUsageDate *string `json:"firstUsageDate,omitempty"` + InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` + InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"` + LastUsageDate *string `json:"lastUsageDate,omitempty"` + Location *string `json:"location,omitempty"` + LookBackPeriod *int64 `json:"lookBackPeriod,omitempty"` + MeterId *string `json:"meterId,omitempty"` + NetSavings *Amount `json:"netSavings,omitempty"` + NormalizedSize *string `json:"normalizedSize,omitempty"` + RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` + RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` + SkuName *string `json:"skuName,omitempty"` + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + Term *string `json:"term,omitempty"` + TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` +} + +func (s BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s +} + +var _ ModernReservationRecommendationProperties = RawModernReservationRecommendationPropertiesImpl{} + +// RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawModernReservationRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + modernReservationRecommendationProperties BaseModernReservationRecommendationPropertiesImpl + Type string + Values map[string]interface{} } -func unmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { +func (s RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return s.modernReservationRecommendationProperties +} + +func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +87,15 @@ func unmarshalModernReservationRecommendationPropertiesImplementation(input []by return out, nil } - out := RawModernReservationRecommendationPropertiesImpl{ + var parent BaseModernReservationRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseModernReservationRecommendationPropertiesImpl: %+v", err) + } + + return RawModernReservationRecommendationPropertiesImpl{ + modernReservationRecommendationProperties: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go index 30647d1b9e6..84accc14972 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsharedscopereservationrecommendationproperties.go @@ -16,6 +16,7 @@ var _ ModernReservationRecommendationProperties = ModernSharedScopeReservationRe type ModernSharedScopeReservationRecommendationProperties struct { // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -29,6 +30,7 @@ type ModernSharedScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` @@ -36,6 +38,30 @@ type ModernSharedScopeReservationRecommendationProperties struct { TotalHours *int64 `json:"totalHours,omitempty"` } +func (s ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -71,9 +97,10 @@ func (s ModernSharedScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSharedScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go index ba936f6c1f9..d1903fbb6c5 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_modernsinglescopereservationrecommendationproperties.go @@ -17,6 +17,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from ModernReservationRecommendationProperties + CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"` FirstUsageDate *string `json:"firstUsageDate,omitempty"` InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"` @@ -30,6 +31,7 @@ type ModernSingleScopeReservationRecommendationProperties struct { RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"` RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"` ResourceType *string `json:"resourceType,omitempty"` + Scope string `json:"scope"` SkuName *string `json:"skuName,omitempty"` SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` Term *string `json:"term,omitempty"` @@ -37,6 +39,30 @@ type ModernSingleScopeReservationRecommendationProperties struct { TotalHours *int64 `json:"totalHours,omitempty"` } +func (s ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl { + return BaseModernReservationRecommendationPropertiesImpl{ + CostWithNoReservedInstances: s.CostWithNoReservedInstances, + FirstUsageDate: s.FirstUsageDate, + InstanceFlexibilityGroup: s.InstanceFlexibilityGroup, + InstanceFlexibilityRatio: s.InstanceFlexibilityRatio, + LastUsageDate: s.LastUsageDate, + Location: s.Location, + LookBackPeriod: s.LookBackPeriod, + MeterId: s.MeterId, + NetSavings: s.NetSavings, + NormalizedSize: s.NormalizedSize, + RecommendedQuantity: s.RecommendedQuantity, + RecommendedQuantityNormalized: s.RecommendedQuantityNormalized, + ResourceType: s.ResourceType, + Scope: s.Scope, + SkuName: s.SkuName, + SkuProperties: s.SkuProperties, + Term: s.Term, + TotalCostWithReservedInstances: s.TotalCostWithReservedInstances, + TotalHours: s.TotalHours, + } +} + func (o *ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error) { if o.FirstUsageDate == nil { return nil, nil @@ -72,9 +98,10 @@ func (s ModernSingleScopeReservationRecommendationProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ModernSingleScopeReservationRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_reservationrecommendation.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_reservationrecommendation.go index 3e175fe06c0..e43fc78b4ad 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/model_reservationrecommendation.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/model_reservationrecommendation.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReservationRecommendation interface { + ReservationRecommendation() BaseReservationRecommendationImpl } -// RawReservationRecommendationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReservationRecommendation = BaseReservationRecommendationImpl{} + +type BaseReservationRecommendationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ReservationRecommendationKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Sku *string `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s +} + +var _ ReservationRecommendation = RawReservationRecommendationImpl{} + +// RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReservationRecommendationImpl struct { - Type string - Values map[string]interface{} + reservationRecommendation BaseReservationRecommendationImpl + Type string + Values map[string]interface{} +} + +func (s RawReservationRecommendationImpl) ReservationRecommendation() BaseReservationRecommendationImpl { + return s.reservationRecommendation } -func unmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { +func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalReservationRecommendationImplementation(input []byte) (Reservation return out, nil } - out := RawReservationRecommendationImpl{ - Type: value, - Values: temp, + var parent BaseReservationRecommendationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReservationRecommendationImpl: %+v", err) } - return out, nil + + return RawReservationRecommendationImpl{ + reservationRecommendation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/consumption/2024-08-01/reservationrecommendations/version.go b/resource-manager/consumption/2024-08-01/reservationrecommendations/version.go index 17aab91f526..003632bf4bc 100644 --- a/resource-manager/consumption/2024-08-01/reservationrecommendations/version.go +++ b/resource-manager/consumption/2024-08-01/reservationrecommendations/version.go @@ -1,12 +1,10 @@ package reservationrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationrecommendations/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/README.md b/resource-manager/consumption/2024-08-01/reservationsummaries/README.md index 7ef66405637..6a212a3b774 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/README.md +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationsummaries` Documentation -The `reservationsummaries` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `reservationsummaries` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/client.go b/resource-manager/consumption/2024-08-01/reservationsummaries/client.go index eb74d5cf5eb..89a47c0edda 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/client.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/client.go @@ -15,7 +15,7 @@ type ReservationSummariesClient struct { } func NewReservationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationSummariesClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservation.go b/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservation.go index 67c81754435..56749154b2e 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservation.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservationorder.go b/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservationorder.go index c779abf230a..6916414c7a5 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservationorder.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslist.go b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslist.go index 635bc11f2bb..34e4b96c84e 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslist.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslist.go @@ -45,6 +45,7 @@ func (o ReservationsSummariesListOperationOptions) ToHeaders() *client.Headers { func (o ReservationsSummariesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go index ba4e96ea155..77ca0323d80 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorder.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders() func (o ReservationsSummariesListByReservationOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go index 6fe1b80343d..fe14bd33ffb 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/method_reservationssummarieslistbyreservationorderandreservation.go @@ -40,6 +40,7 @@ func (o ReservationsSummariesListByReservationOrderAndReservationOperationOption func (o ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationsummaries/version.go b/resource-manager/consumption/2024-08-01/reservationsummaries/version.go index bced024fd72..f9be6412643 100644 --- a/resource-manager/consumption/2024-08-01/reservationsummaries/version.go +++ b/resource-manager/consumption/2024-08-01/reservationsummaries/version.go @@ -1,12 +1,10 @@ package reservationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationsummaries/2024-08-01" } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/README.md b/resource-manager/consumption/2024-08-01/reservationtransactions/README.md index 5089f764659..7187b07788e 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/README.md +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationtransactions` Documentation -The `reservationtransactions` SDK allows for interaction with the Azure Resource Manager Service `consumption` (API Version `2024-08-01`). +The `reservationtransactions` SDK allows for interaction with Azure Resource Manager `consumption` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/client.go b/resource-manager/consumption/2024-08-01/reservationtransactions/client.go index a2984677d8e..547e9a2cf94 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/client.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/client.go @@ -15,7 +15,7 @@ type ReservationTransactionsClient struct { } func NewReservationTransactionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationTransactionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservationtransactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservationtransactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservationTransactionsClient: %+v", err) } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingaccount.go b/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingaccount.go index b2d6c15e949..1e85a3b72ea 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingaccount.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingprofile.go b/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingprofile.go index 8a3fe38d6d8..eda4ab3835a 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingprofile.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/method_list.go b/resource-manager/consumption/2024-08-01/reservationtransactions/method_list.go index 2e66d1e6bcb..18c98eebaf2 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/method_list.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/method_listbybillingprofile.go b/resource-manager/consumption/2024-08-01/reservationtransactions/method_listbybillingprofile.go index 3f0a1a80b38..9a7c139373a 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/method_listbybillingprofile.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/method_listbybillingprofile.go @@ -39,6 +39,7 @@ func (o ListByBillingProfileOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/consumption/2024-08-01/reservationtransactions/version.go b/resource-manager/consumption/2024-08-01/reservationtransactions/version.go index e6e2a611b38..4183c1c6a0c 100644 --- a/resource-manager/consumption/2024-08-01/reservationtransactions/version.go +++ b/resource-manager/consumption/2024-08-01/reservationtransactions/version.go @@ -1,12 +1,10 @@ package reservationtransactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservationtransactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservationtransactions/2024-08-01" } diff --git a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/README.md b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/README.md index 140f4026138..69664c92c9b 100644 --- a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/README.md +++ b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/availableworkloadprofiles` Documentation -The `availableworkloadprofiles` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `availableworkloadprofiles` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/client.go b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/client.go index 13f22503d96..997a05c7055 100644 --- a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/client.go +++ b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/client.go @@ -15,7 +15,7 @@ type AvailableWorkloadProfilesClient struct { } func NewAvailableWorkloadProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableWorkloadProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableWorkloadProfilesClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/id_location.go b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/id_location.go index 4178e6bfbab..86d01667cd9 100644 --- a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/id_location.go +++ b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/version.go b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/version.go index fd540439e41..bacd61ed235 100644 --- a/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/version.go +++ b/resource-manager/containerapps/2023-05-01/availableworkloadprofiles/version.go @@ -1,12 +1,10 @@ package availableworkloadprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableworkloadprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableworkloadprofiles/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/billingmeters/README.md b/resource-manager/containerapps/2023-05-01/billingmeters/README.md index 51daff68fed..908bc7cbd6d 100644 --- a/resource-manager/containerapps/2023-05-01/billingmeters/README.md +++ b/resource-manager/containerapps/2023-05-01/billingmeters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/billingmeters` Documentation -The `billingmeters` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `billingmeters` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/billingmeters/client.go b/resource-manager/containerapps/2023-05-01/billingmeters/client.go index ca343e3db48..3c07a1d5967 100644 --- a/resource-manager/containerapps/2023-05-01/billingmeters/client.go +++ b/resource-manager/containerapps/2023-05-01/billingmeters/client.go @@ -15,7 +15,7 @@ type BillingMetersClient struct { } func NewBillingMetersClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingMetersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingmeters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingmeters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingMetersClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/billingmeters/id_location.go b/resource-manager/containerapps/2023-05-01/billingmeters/id_location.go index 39035bfc073..eeb0af8e864 100644 --- a/resource-manager/containerapps/2023-05-01/billingmeters/id_location.go +++ b/resource-manager/containerapps/2023-05-01/billingmeters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/billingmeters/method_get.go b/resource-manager/containerapps/2023-05-01/billingmeters/method_get.go index 0a4c2df9948..126e6134bc5 100644 --- a/resource-manager/containerapps/2023-05-01/billingmeters/method_get.go +++ b/resource-manager/containerapps/2023-05-01/billingmeters/method_get.go @@ -46,7 +46,6 @@ func (c BillingMetersClient) Get(ctx context.Context, id LocationId) (result Get var model BillingMeterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/billingmeters/version.go b/resource-manager/containerapps/2023-05-01/billingmeters/version.go index 71c0e66eea0..5b8320a0d43 100644 --- a/resource-manager/containerapps/2023-05-01/billingmeters/version.go +++ b/resource-manager/containerapps/2023-05-01/billingmeters/version.go @@ -1,12 +1,10 @@ package billingmeters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingmeters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingmeters/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/certificates/README.md b/resource-manager/containerapps/2023-05-01/certificates/README.md index 43ed8b751ef..f32d9b35162 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/README.md +++ b/resource-manager/containerapps/2023-05-01/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `certificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/certificates/client.go b/resource-manager/containerapps/2023-05-01/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/client.go +++ b/resource-manager/containerapps/2023-05-01/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go b/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go index 1f3c85bd29a..b74bf8278c1 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go +++ b/resource-manager/containerapps/2023-05-01/certificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go b/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go index 4147c3edea2..010ca028e82 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go index d066a1f6d08..af563f70319 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2023-05-01/certificates/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go index 5f5f0986d2a..fc6036374bd 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/certificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go index 08223ec1f7e..2af96101d74 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesCreateOrUpdate(ctx var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesget.go b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesget.go index 46ad518db87..9f597b7931b 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesget.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesget.go @@ -45,7 +45,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesGet(ctx context.Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesupdate.go b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesupdate.go index 65a14b672c3..e0a4b47cbf2 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesupdate.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_connectedenvironmentscertificatesupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesUpdate(ctx context. var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_createorupdate.go b/resource-manager/containerapps/2023-05-01/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_createorupdate.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_get.go b/resource-manager/containerapps/2023-05-01/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_get.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/method_update.go b/resource-manager/containerapps/2023-05-01/certificates/method_update.go index fa22e1ab8ac..a7cab2abe04 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/method_update.go +++ b/resource-manager/containerapps/2023-05-01/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/certificates/version.go b/resource-manager/containerapps/2023-05-01/certificates/version.go index 99d93672900..fb0b1c445b1 100644 --- a/resource-manager/containerapps/2023-05-01/certificates/version.go +++ b/resource-manager/containerapps/2023-05-01/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/README.md b/resource-manager/containerapps/2023-05-01/connectedenvironments/README.md index 6fcd1330a26..ddbcefecb6e 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/README.md +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/connectedenvironments` Documentation -The `connectedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `connectedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/client.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/client.go index 05cf79bdaad..cef1faa8988 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/client.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsClient struct { } func NewConnectedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironment.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironment.go index b477bcb1616..a71762039ac 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironmentcertificate.go index 51e7eae4c8d..2eaf0c9e086 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatescreateorupdate.go index 07244dc5d7a..3d22a251dc9 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Cont var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesget.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesget.go index 655d77efb6f..966a4a27ff3 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) CertificatesGet(ctx context.Context, id Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesupdate.go index 8685e29f2bd..e4c28cc87b2 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_checknameavailability.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_checknameavailability.go index 9d99735268b..59402ea647f 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_checknameavailability.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_get.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_get.go index 16e0c9915d3..b1fb378276d 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_get.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Get(ctx context.Context, id ConnectedEnviro var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_update.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_update.go index 9c2f5c993a9..d9e7ed00759 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/method_update.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/method_update.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Update(ctx context.Context, id ConnectedEnv var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironments/version.go b/resource-manager/containerapps/2023-05-01/connectedenvironments/version.go index eeeee3f1811..da42d51fa1f 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironments/version.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironments/version.go @@ -1,12 +1,10 @@ package connectedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironments/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/README.md b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/README.md index 620e0f5e85c..bcd1af7a496 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages` Documentation -The `connectedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `connectedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/client.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/client.go index a216f239cfc..a93c2290a8e 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsStoragesClient struct { } func NewConnectedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironment.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironment.go index 8896dd215dd..b58d1ca7f85 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go index bcdb639d7ac..fa23d0e1698 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentStorageID(input string) (*ConnectedEnvironmentStor } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentStorageIDInsensitively(input string) (*ConnectedEn } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_createorupdate.go index 66a61f10f69..b15be5ee53c 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_get.go index bb888e00447..926b8eeba69 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, id Connect var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_list.go index 6faefbeb2db..b661d7781ac 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ConnectedEnvironmentsStoragesClient) List(ctx context.Context, id Connec var model ConnectedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/version.go b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/version.go index e339d8f777f..8a62b2b1b03 100644 --- a/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2023-05-01/connectedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package connectedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironmentsstorages/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/README.md b/resource-manager/containerapps/2023-05-01/containerapps/README.md index a0549f0cd78..b9fa96246e2 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/README.md +++ b/resource-manager/containerapps/2023-05-01/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/containerapps/client.go b/resource-manager/containerapps/2023-05-01/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/client.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go b/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go index bfd98ec0555..d280a1e318e 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go b/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go index e887d9bbf5a..527f61e6f3a 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go b/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go index cf7fcd3b4e9..8e7ee316a8e 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetdetector.go b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetdetector.go index adbefc98d50..f298d8ffc48 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetdetector.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetDetector(ctx context.Context, id Dete var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetrevision.go b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetrevision.go index 376c7031e06..968db6baceb 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetrevision.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetRevision(ctx context.Context, id Revi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetroot.go b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetroot.go index f21a7434252..8c9904e5395 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) DiagnosticsGetRoot(ctx context.Context, id Containe var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticslistrevisions.go b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticslistrevisions.go index 996b89e3a7c..6d8d5523fbd 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticslistrevisions.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_diagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o DiagnosticsListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o DiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_get.go b/resource-manager/containerapps/2023-05-01/containerapps/method_get.go index 1cf49840634..b17e455e923 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_get.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ContainerAppId) (result var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_getauthtoken.go b/resource-manager/containerapps/2023-05-01/containerapps/method_getauthtoken.go index 33667cea14c..7203313fe74 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_getauthtoken.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) GetAuthToken(ctx context.Context, id ContainerAppId var model ContainerAppAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_listcustomhostnameanalysis.go b/resource-manager/containerapps/2023-05-01/containerapps/method_listcustomhostnameanalysis.go index be6a76b9e53..17119ef149e 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_listcustomhostnameanalysis.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_listcustomhostnameanalysis.go @@ -34,6 +34,7 @@ func (o ListCustomHostNameAnalysisOperationOptions) ToHeaders() *client.Headers func (o ListCustomHostNameAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ContainerAppsClient) ListCustomHostNameAnalysis(ctx context.Context, id var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/method_listsecrets.go b/resource-manager/containerapps/2023-05-01/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/method_listsecrets.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerapps/version.go b/resource-manager/containerapps/2023-05-01/containerapps/version.go index 07a5b1edc55..d1525032b4b 100644 --- a/resource-manager/containerapps/2023-05-01/containerapps/version.go +++ b/resource-manager/containerapps/2023-05-01/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/README.md b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/README.md index 93c4cb54505..15f73d22701 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/README.md +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsauthconfigs` Documentation -The `containerappsauthconfigs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `containerappsauthconfigs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/client.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/client.go index f57bc2d149f..b118542a497 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/client.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/client.go @@ -15,7 +15,7 @@ type ContainerAppsAuthConfigsClient struct { } func NewContainerAppsAuthConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsAuthConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsAuthConfigsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_authconfig.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_authconfig.go index 419a1f003e8..be4f070df7b 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_authconfig.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_authconfig.go @@ -44,7 +44,7 @@ func ParseAuthConfigID(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthConfigIDInsensitively(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_containerapp.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_containerapp.go index 82389da4f1b..b1aaf094746 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_containerapp.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_createorupdate.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_createorupdate.go index 28f50cb36f8..8a74d6915bc 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_createorupdate.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ContainerAppsAuthConfigsClient) CreateOrUpdate(ctx context.Context, id A var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_get.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_get.go index 96870ebd993..3fd93ca8c3a 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_get.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsAuthConfigsClient) Get(ctx context.Context, id AuthConfigId var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/version.go b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/version.go index 28cee17b86b..a50c64d09c5 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/version.go +++ b/resource-manager/containerapps/2023-05-01/containerappsauthconfigs/version.go @@ -1,12 +1,10 @@ package containerappsauthconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsauthconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsauthconfigs/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/README.md b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/README.md index 84cda46a804..b6dd34d0111 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/README.md +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas` Documentation -The `containerappsrevisionreplicas` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `containerappsrevisionreplicas` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/client.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/client.go index 5945a5c4038..6948105cc45 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/client.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionReplicasClient struct { } func NewContainerAppsRevisionReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionReplicasClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_replica.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_replica.go index 2f799e6a951..18c5ae3ed3c 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_replica.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_replica.go @@ -46,7 +46,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_revision.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_revision.go index 9f3f6992915..ec04c9bac2b 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_revision.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_getreplica.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_getreplica.go index f6ce85856e3..9e4b91ade70 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_getreplica.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_getreplica.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionReplicasClient) GetReplica(ctx context.Context, id var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_listreplicas.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_listreplicas.go index 8bbd98c80b4..2e6ffdcf031 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_listreplicas.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/method_listreplicas.go @@ -46,7 +46,6 @@ func (c ContainerAppsRevisionReplicasClient) ListReplicas(ctx context.Context, i var model ReplicaCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/version.go b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/version.go index d00fdc6b290..33d4021cefe 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/version.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisionreplicas/version.go @@ -1,12 +1,10 @@ package containerappsrevisionreplicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisionreplicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisionreplicas/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/README.md b/resource-manager/containerapps/2023-05-01/containerappsrevisions/README.md index b0db98f8088..1f5b1b266bc 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/README.md +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/client.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/client.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go index 469c5109b01..65bdb873dbc 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go index 54f63273632..0d1dbad8974 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_getrevision.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_getrevision.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_listrevisions.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_listrevisions.go index 1ba89167188..b25d4c9fd53 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_listrevisions.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/method_listrevisions.go @@ -39,6 +39,7 @@ func (o ListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o ListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2023-05-01/containerappsrevisions/version.go b/resource-manager/containerapps/2023-05-01/containerappsrevisions/version.go index fa0ac8268de..825abd07680 100644 --- a/resource-manager/containerapps/2023-05-01/containerappsrevisions/version.go +++ b/resource-manager/containerapps/2023-05-01/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/README.md b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/README.md index e3452e25771..98b8f110783 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/README.md +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/containerappssourcecontrols` Documentation -The `containerappssourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `containerappssourcecontrols` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/client.go b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/client.go index eb9a8a10a09..5946a41621a 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/client.go +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/client.go @@ -15,7 +15,7 @@ type ContainerAppsSourceControlsClient struct { } func NewContainerAppsSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsSourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsSourceControlsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_containerapp.go b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_containerapp.go index eac989dd012..c28b43d410b 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_containerapp.go +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_sourcecontrol.go b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_sourcecontrol.go index e8444fd36fb..dc808727403 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_sourcecontrol.go +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/method_get.go b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/method_get.go index 0c0bdf0b5e4..fab8194e2ab 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/method_get.go +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsSourceControlsClient) Get(ctx context.Context, id SourceCon var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/version.go b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/version.go index d9d6cc1652b..affb0256177 100644 --- a/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/version.go +++ b/resource-manager/containerapps/2023-05-01/containerappssourcecontrols/version.go @@ -1,12 +1,10 @@ package containerappssourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappssourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappssourcecontrols/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/README.md b/resource-manager/containerapps/2023-05-01/daprcomponents/README.md index a55e054f4b6..b88865a7499 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/README.md +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/daprcomponents` Documentation -The `daprcomponents` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `daprcomponents` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/client.go b/resource-manager/containerapps/2023-05-01/daprcomponents/client.go index f018f00bdee..7fb966bb0e5 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/client.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/client.go @@ -15,7 +15,7 @@ type DaprComponentsClient struct { } func NewDaprComponentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DaprComponentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "daprcomponents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "daprcomponents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DaprComponentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go b/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go index 94391e0338e..dc633e920ee 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go b/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go index 554b54acb91..2bd3cc1eb38 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/id_connectedenvironmentdaprcomponent.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentDaprComponentID(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentDaprComponentIDInsensitively(input string) (*Conne } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go b/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go index 755d9dc094d..87a65f53711 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/id_daprcomponent.go @@ -44,7 +44,7 @@ func ParseDaprComponentID(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDaprComponentIDInsensitively(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go index d2a90d1954e..1467f5b6ebd 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go index b372ec0d96c..3b339e8d2a8 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsCreateOrUpdate( var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go index 3336d264da5..fa7c1d61804 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsGet(ctx context var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go index 57cb5795567..6474a29e1d8 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsListSecrets(ctx var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_createorupdate.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_createorupdate.go index d19e2f104cb..b9ca657b15d 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_createorupdate.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) CreateOrUpdate(ctx context.Context, id DaprCompone var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_get.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_get.go index 3ce780b6d03..b60e81d0ae5 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_get.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_get.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) Get(ctx context.Context, id DaprComponentId) (resu var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/method_listsecrets.go b/resource-manager/containerapps/2023-05-01/daprcomponents/method_listsecrets.go index 636ae80459c..03d6c3ccdcb 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/method_listsecrets.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ListSecrets(ctx context.Context, id DaprComponentI var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/daprcomponents/version.go b/resource-manager/containerapps/2023-05-01/daprcomponents/version.go index 928d2c04bdd..507e819c8cb 100644 --- a/resource-manager/containerapps/2023-05-01/daprcomponents/version.go +++ b/resource-manager/containerapps/2023-05-01/daprcomponents/version.go @@ -1,12 +1,10 @@ package daprcomponents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/daprcomponents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/daprcomponents/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/README.md b/resource-manager/containerapps/2023-05-01/diagnostics/README.md index f5b389f8c50..130f619760a 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/README.md +++ b/resource-manager/containerapps/2023-05-01/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/client.go b/resource-manager/containerapps/2023-05-01/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/client.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/id_containerapp.go b/resource-manager/containerapps/2023-05-01/diagnostics/id_containerapp.go index b9b33f26301..25ca553e527 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/id_containerapp.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/id_detector.go b/resource-manager/containerapps/2023-05-01/diagnostics/id_detector.go index 398e3c26251..f56a098e47e 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/id_detector.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironment.go index 7200a7fa7c3..70633fae86c 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironmentdetector.go b/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironmentdetector.go index 208ee9069b4..bf5cb7d7940 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/id_revisionsapirevision.go b/resource-manager/containerapps/2023-05-01/diagnostics/id_revisionsapirevision.go index 24c29accc47..4cd950c2b43 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetdetector.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetdetector.go index 683d4b26910..066a43e16f9 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetDetector(ctx context.Conte var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetrevision.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetrevision.go index 6a28b8c8b69..af6794d14ab 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetrevision.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRevision(ctx context.Conte var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetroot.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetroot.go index f19f93687e7..ec30717f8d0 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRoot(ctx context.Context, var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticslistrevisions.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticslistrevisions.go index f37c117df81..96e393b50eb 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticslistrevisions.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_containerappsdiagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToHeaders() *clie func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go index 106b5ec9d4f..fe513db6b31 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx context. var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go b/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go index 25fb922a48e..2c03f97f04c 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ManagedEnvironmentsDiagnosticsGetRoot(ctx context.Con var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/diagnostics/version.go b/resource-manager/containerapps/2023-05-01/diagnostics/version.go index b72efd3b2d9..587ecb42b7f 100644 --- a/resource-manager/containerapps/2023-05-01/diagnostics/version.go +++ b/resource-manager/containerapps/2023-05-01/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/jobs/README.md b/resource-manager/containerapps/2023-05-01/jobs/README.md index 9ea27af9886..8a3804c854e 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/README.md +++ b/resource-manager/containerapps/2023-05-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/jobs/client.go b/resource-manager/containerapps/2023-05-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/client.go +++ b/resource-manager/containerapps/2023-05-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/jobs/id_execution.go b/resource-manager/containerapps/2023-05-01/jobs/id_execution.go index 252582285a7..65eb68d25b5 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/id_execution.go +++ b/resource-manager/containerapps/2023-05-01/jobs/id_execution.go @@ -44,7 +44,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/jobs/id_job.go b/resource-manager/containerapps/2023-05-01/jobs/id_job.go index 818f9f6aa82..0060f5abffc 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/id_job.go +++ b/resource-manager/containerapps/2023-05-01/jobs/id_job.go @@ -42,7 +42,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/jobs/method_executionslist.go b/resource-manager/containerapps/2023-05-01/jobs/method_executionslist.go index 8032ccc4ee2..98280e2c319 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/method_executionslist.go +++ b/resource-manager/containerapps/2023-05-01/jobs/method_executionslist.go @@ -39,6 +39,7 @@ func (o ExecutionsListOperationOptions) ToHeaders() *client.Headers { func (o ExecutionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2023-05-01/jobs/method_get.go b/resource-manager/containerapps/2023-05-01/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/method_get.go +++ b/resource-manager/containerapps/2023-05-01/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/jobs/method_jobexecution.go b/resource-manager/containerapps/2023-05-01/jobs/method_jobexecution.go index 910aedeff62..d305cdb2c5a 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/method_jobexecution.go +++ b/resource-manager/containerapps/2023-05-01/jobs/method_jobexecution.go @@ -45,7 +45,6 @@ func (c JobsClient) JobExecution(ctx context.Context, id ExecutionId) (result Jo var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/jobs/method_listsecrets.go b/resource-manager/containerapps/2023-05-01/jobs/method_listsecrets.go index 33fe668d3c9..6d9e1f870c1 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/method_listsecrets.go +++ b/resource-manager/containerapps/2023-05-01/jobs/method_listsecrets.go @@ -46,7 +46,6 @@ func (c JobsClient) ListSecrets(ctx context.Context, id JobId) (result ListSecre var model JobSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/jobs/version.go b/resource-manager/containerapps/2023-05-01/jobs/version.go index 1c5e74b8919..6ffe53c367d 100644 --- a/resource-manager/containerapps/2023-05-01/jobs/version.go +++ b/resource-manager/containerapps/2023-05-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/README.md b/resource-manager/containerapps/2023-05-01/managedcertificates/README.md index 7d34c20c132..69ce93e3d81 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/README.md +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedcertificates` Documentation -The `managedcertificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `managedcertificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/client.go b/resource-manager/containerapps/2023-05-01/managedcertificates/client.go index 4d48850b531..bbb557ef073 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/client.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/client.go @@ -15,7 +15,7 @@ type ManagedCertificatesClient struct { } func NewManagedCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedcertificate.go b/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedcertificate.go index 87752a47a9d..979ce05d4fd 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedcertificate.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedenvironment.go index caee9fab87c..23292c60487 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/method_get.go b/resource-manager/containerapps/2023-05-01/managedcertificates/method_get.go index ee99eddd759..04cfdd52374 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/method_get.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ManagedCertificatesClient) Get(ctx context.Context, id ManagedCertificat var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/method_update.go b/resource-manager/containerapps/2023-05-01/managedcertificates/method_update.go index 6bbba8cc98c..a517009cae7 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/method_update.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/method_update.go @@ -49,7 +49,6 @@ func (c ManagedCertificatesClient) Update(ctx context.Context, id ManagedCertifi var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedcertificates/version.go b/resource-manager/containerapps/2023-05-01/managedcertificates/version.go index ad8a30700ea..ed0ab6142a9 100644 --- a/resource-manager/containerapps/2023-05-01/managedcertificates/version.go +++ b/resource-manager/containerapps/2023-05-01/managedcertificates/version.go @@ -1,12 +1,10 @@ package managedcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcertificates/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/README.md b/resource-manager/containerapps/2023-05-01/managedenvironments/README.md index aed44ceaed1..adaee73c728 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/README.md +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironments` Documentation -The `managedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `managedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/client.go b/resource-manager/containerapps/2023-05-01/managedenvironments/client.go index d1f90d9f441..b7d8992fa30 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/client.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsClient struct { } func NewManagedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go b/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go index 8f924206e86..2fd8a661a9d 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go index 610fc08db29..f170fafa558 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go index e96a1dd8ba5..48c73c06534 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go index 6f4fce7eb18..025666f579c 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatescreateorupdate.go index 4b74842fc14..6e71a190b18 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Contex var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesget.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesget.go index 718c7d0f340..9c379c868c5 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) CertificatesGet(ctx context.Context, id Certi var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesupdate.go index 761029f13c6..64f05973e55 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id Ce var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_diagnosticsgetroot.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_diagnosticsgetroot.go index 88cccae7e27..f41bb5dd697 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) DiagnosticsGetRoot(ctx context.Context, id Ma var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_get.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_get.go index 8b0cdde0fe5..5c821baf637 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_get.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) Get(ctx context.Context, id ManagedEnvironmen var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_getauthtoken.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_getauthtoken.go index fe7eb3d026e..fac4db2d554 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_getauthtoken.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, id ManagedE var model EnvironmentAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesget.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesget.go index 7b3915bd5d8..c1768ca5b9b 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesget.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesGet(ctx context.Context, i var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesupdate.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesupdate.go index d4ecb3dd00b..3a177ed8d30 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesupdate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedcertificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesUpdate(ctx context.Context var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go index 43845d85187..8097358a0b8 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/method_namespaceschecknameavailability.go b/resource-manager/containerapps/2023-05-01/managedenvironments/method_namespaceschecknameavailability.go index b1f2717072a..f2c52cfc7bb 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/method_namespaceschecknameavailability.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/method_namespaceschecknameavailability.go @@ -50,7 +50,6 @@ func (c ManagedEnvironmentsClient) NamespacesCheckNameAvailability(ctx context.C var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironments/version.go b/resource-manager/containerapps/2023-05-01/managedenvironments/version.go index e3b0cf7f9f0..16b7d0cf42a 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironments/version.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironments/version.go @@ -1,12 +1,10 @@ package managedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironments/2023-05-01" } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/README.md b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/README.md index dcea63a4cfa..42559299c59 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages` Documentation -The `managedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2023-05-01`). +The `managedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/client.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/client.go index 48b7aee12b3..7b39b5e0e38 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsStoragesClient struct { } func NewManagedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go index 4bf35d8d15b..3fb93fe1ab6 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go index d3c5f4b065c..f3363cc8ac1 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_createorupdate.go index 3221f2c5162..6111332ea74 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, i var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_get.go index dbb3feab7e8..97349d79481 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsStoragesClient) Get(ctx context.Context, id StorageId var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_list.go index 90f9fe55a5f..ff3a55a4b4e 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsStoragesClient) List(ctx context.Context, id ManagedE var model ManagedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/version.go b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/version.go index 75d2da96cef..281839bbc98 100644 --- a/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2023-05-01/managedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package managedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironmentsstorages/2023-05-01" } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/README.md b/resource-manager/containerapps/2024-02-02-preview/appresiliency/README.md index daab99fb319..282979ec348 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/appresiliency` Documentation -The `appresiliency` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `appresiliency` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/client.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/client.go index e45420d1bf8..83bb6120bcc 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/client.go @@ -15,7 +15,7 @@ type AppResiliencyClient struct { } func NewAppResiliencyClientWithBaseURI(sdkApi sdkEnv.Api) (*AppResiliencyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appresiliency", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appresiliency", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppResiliencyClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_containerapp.go index cefde117743..74fe64cce61 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_resiliencypolicy.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_resiliencypolicy.go index 8e7b79b1ee6..e91b1346e41 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_resiliencypolicy.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/id_resiliencypolicy.go @@ -44,7 +44,7 @@ func ParseResiliencyPolicyID(input string) (*ResiliencyPolicyId, error) { } id := ResiliencyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResiliencyPolicyIDInsensitively(input string) (*ResiliencyPolicyId, er } id := ResiliencyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_createorupdate.go index 1bb89266101..6ab22adec48 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AppResiliencyClient) CreateOrUpdate(ctx context.Context, id ResiliencyPo var model AppResiliency result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_get.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_get.go index d3a9d11eb4c..0b5ac3b2f01 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_get.go @@ -45,7 +45,6 @@ func (c AppResiliencyClient) Get(ctx context.Context, id ResiliencyPolicyId) (re var model AppResiliency result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_update.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_update.go index e8c70fdacf0..aa8ca280c74 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_update.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/method_update.go @@ -49,7 +49,6 @@ func (c AppResiliencyClient) Update(ctx context.Context, id ResiliencyPolicyId, var model AppResiliency result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/appresiliency/version.go b/resource-manager/containerapps/2024-02-02-preview/appresiliency/version.go index 93b351749e9..2ddbbf2ccac 100644 --- a/resource-manager/containerapps/2024-02-02-preview/appresiliency/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/appresiliency/version.go @@ -1,12 +1,10 @@ package appresiliency -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appresiliency/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appresiliency/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/README.md b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/README.md index 79939200f47..785eb042db6 100644 --- a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles` Documentation -The `availableworkloadprofiles` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `availableworkloadprofiles` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/client.go b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/client.go index 13f22503d96..997a05c7055 100644 --- a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/client.go @@ -15,7 +15,7 @@ type AvailableWorkloadProfilesClient struct { } func NewAvailableWorkloadProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableWorkloadProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableWorkloadProfilesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/id_location.go b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/id_location.go index 4178e6bfbab..86d01667cd9 100644 --- a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/id_location.go +++ b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/version.go b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/version.go index 75c435ae3ea..5204e4ba42b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/availableworkloadprofiles/version.go @@ -1,12 +1,10 @@ package availableworkloadprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableworkloadprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableworkloadprofiles/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/billingmeters/README.md b/resource-manager/containerapps/2024-02-02-preview/billingmeters/README.md index b84b7d9557f..dc3ed66ff90 100644 --- a/resource-manager/containerapps/2024-02-02-preview/billingmeters/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/billingmeters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/billingmeters` Documentation -The `billingmeters` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `billingmeters` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/billingmeters/client.go b/resource-manager/containerapps/2024-02-02-preview/billingmeters/client.go index ca343e3db48..3c07a1d5967 100644 --- a/resource-manager/containerapps/2024-02-02-preview/billingmeters/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/billingmeters/client.go @@ -15,7 +15,7 @@ type BillingMetersClient struct { } func NewBillingMetersClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingMetersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingmeters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingmeters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingMetersClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/billingmeters/id_location.go b/resource-manager/containerapps/2024-02-02-preview/billingmeters/id_location.go index 39035bfc073..eeb0af8e864 100644 --- a/resource-manager/containerapps/2024-02-02-preview/billingmeters/id_location.go +++ b/resource-manager/containerapps/2024-02-02-preview/billingmeters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/billingmeters/method_get.go b/resource-manager/containerapps/2024-02-02-preview/billingmeters/method_get.go index 0a4c2df9948..126e6134bc5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/billingmeters/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/billingmeters/method_get.go @@ -46,7 +46,6 @@ func (c BillingMetersClient) Get(ctx context.Context, id LocationId) (result Get var model BillingMeterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/billingmeters/version.go b/resource-manager/containerapps/2024-02-02-preview/billingmeters/version.go index 82817b004e9..36b57261359 100644 --- a/resource-manager/containerapps/2024-02-02-preview/billingmeters/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/billingmeters/version.go @@ -1,12 +1,10 @@ package billingmeters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingmeters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingmeters/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/builders/README.md b/resource-manager/containerapps/2024-02-02-preview/builders/README.md index cd4d1751c37..a2b8f662203 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builders/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/builders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/builders` Documentation -The `builders` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `builders` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/builders/client.go b/resource-manager/containerapps/2024-02-02-preview/builders/client.go index 39800fdb51d..8b64d30edfa 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builders/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/builders/client.go @@ -15,7 +15,7 @@ type BuildersClient struct { } func NewBuildersClientWithBaseURI(sdkApi sdkEnv.Api) (*BuildersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "builders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "builders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BuildersClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/builders/id_builder.go b/resource-manager/containerapps/2024-02-02-preview/builders/id_builder.go index 95d132b7d64..195709c0fcc 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builders/id_builder.go +++ b/resource-manager/containerapps/2024-02-02-preview/builders/id_builder.go @@ -42,7 +42,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/builders/method_get.go b/resource-manager/containerapps/2024-02-02-preview/builders/method_get.go index a7bf9bc45da..849af61a2ef 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builders/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/builders/method_get.go @@ -45,7 +45,6 @@ func (c BuildersClient) Get(ctx context.Context, id BuilderId) (result GetOperat var model BuilderResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/builders/version.go b/resource-manager/containerapps/2024-02-02-preview/builders/version.go index ae38ea9011e..73f8c5d53d4 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builders/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/builders/version.go @@ -1,12 +1,10 @@ package builders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/builders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/builders/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/README.md b/resource-manager/containerapps/2024-02-02-preview/builds/README.md index ea54ad5c22a..9eb46b0ea0f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/builds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/builds` Documentation -The `builds` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `builds` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/client.go b/resource-manager/containerapps/2024-02-02-preview/builds/client.go index f5dcf3903e4..658a87b9e52 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/client.go @@ -15,7 +15,7 @@ type BuildsClient struct { } func NewBuildsClientWithBaseURI(sdkApi sdkEnv.Api) (*BuildsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "builds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "builds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BuildsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/id_build.go b/resource-manager/containerapps/2024-02-02-preview/builds/id_build.go index 4f7ec63b93e..4c4ed21aa20 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/id_build.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/id_build.go @@ -44,7 +44,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/id_builder.go b/resource-manager/containerapps/2024-02-02-preview/builds/id_builder.go index 47c26918db9..487dfe1848f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/id_builder.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/id_builder.go @@ -42,7 +42,7 @@ func ParseBuilderID(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBuilderIDInsensitively(input string) (*BuilderId, error) { } id := BuilderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/method_buildauthtokenlist.go b/resource-manager/containerapps/2024-02-02-preview/builds/method_buildauthtokenlist.go index 6b19e00fcd6..026c31b727f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/method_buildauthtokenlist.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/method_buildauthtokenlist.go @@ -46,7 +46,6 @@ func (c BuildsClient) BuildAuthTokenList(ctx context.Context, id BuildId) (resul var model BuildToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/method_get.go b/resource-manager/containerapps/2024-02-02-preview/builds/method_get.go index a6df8d11a8d..9906ae681ca 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/method_get.go @@ -45,7 +45,6 @@ func (c BuildsClient) Get(ctx context.Context, id BuildId) (result GetOperationR var model BuildResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/builds/version.go b/resource-manager/containerapps/2024-02-02-preview/builds/version.go index 0cfaba9e3be..18433744f5d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/builds/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/builds/version.go @@ -1,12 +1,10 @@ package builds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/builds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/builds/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/README.md b/resource-manager/containerapps/2024-02-02-preview/certificates/README.md index 7ccf6ba79f2..42815a8dd81 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `certificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/client.go b/resource-manager/containerapps/2024-02-02-preview/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/id_certificate.go b/resource-manager/containerapps/2024-02-02-preview/certificates/id_certificate.go index 1f3c85bd29a..b74bf8278c1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/id_certificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironment.go index 4147c3edea2..010ca028e82 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironmentcertificate.go index d066a1f6d08..af563f70319 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/certificates/id_managedenvironment.go index 5f5f0986d2a..fc6036374bd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatescreateorupdate.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatescreateorupdate.go index 08223ec1f7e..2af96101d74 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesCreateOrUpdate(ctx var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesget.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesget.go index 46ad518db87..9f597b7931b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesget.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesget.go @@ -45,7 +45,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesGet(ctx context.Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesupdate.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesupdate.go index 65a14b672c3..e0a4b47cbf2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_connectedenvironmentscertificatesupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesUpdate(ctx context. var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_get.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/method_update.go b/resource-manager/containerapps/2024-02-02-preview/certificates/method_update.go index fa22e1ab8ac..a7cab2abe04 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/method_update.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/certificates/version.go b/resource-manager/containerapps/2024-02-02-preview/certificates/version.go index d8f92e7ffe7..ae8f459d7a0 100644 --- a/resource-manager/containerapps/2024-02-02-preview/certificates/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/README.md b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/README.md index dd796da7397..2f9973b01b0 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/connectedenvironments` Documentation -The `connectedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `connectedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/client.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/client.go index 05cf79bdaad..cef1faa8988 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsClient struct { } func NewConnectedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironment.go index b477bcb1616..a71762039ac 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironmentcertificate.go index 51e7eae4c8d..2eaf0c9e086 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatescreateorupdate.go index 07244dc5d7a..3d22a251dc9 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Cont var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesget.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesget.go index 655d77efb6f..966a4a27ff3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) CertificatesGet(ctx context.Context, id Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesupdate.go index 8685e29f2bd..e4c28cc87b2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_checknameavailability.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_checknameavailability.go index 9d99735268b..59402ea647f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_checknameavailability.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_get.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_get.go index 16e0c9915d3..b1fb378276d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Get(ctx context.Context, id ConnectedEnviro var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_update.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_update.go index 9c2f5c993a9..d9e7ed00759 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_update.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/method_update.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Update(ctx context.Context, id ConnectedEnv var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/version.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/version.go index 9d46d69809d..456c860d672 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironments/version.go @@ -1,12 +1,10 @@ package connectedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironments/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/README.md b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/README.md index f03a4343b73..f90f2b7b877 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages` Documentation -The `connectedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `connectedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/client.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/client.go index a216f239cfc..a93c2290a8e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsStoragesClient struct { } func NewConnectedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironment.go index 8896dd215dd..b58d1ca7f85 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironmentstorage.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironmentstorage.go index bcdb639d7ac..fa23d0e1698 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironmentstorage.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/id_connectedenvironmentstorage.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentStorageID(input string) (*ConnectedEnvironmentStor } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentStorageIDInsensitively(input string) (*ConnectedEn } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_createorupdate.go index 66a61f10f69..b15be5ee53c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_get.go index bb888e00447..926b8eeba69 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, id Connect var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_list.go index 6faefbeb2db..b661d7781ac 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ConnectedEnvironmentsStoragesClient) List(ctx context.Context, id Connec var model ConnectedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/version.go b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/version.go index 83868cfba24..d8c7aa720e5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/connectedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package connectedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironmentsstorages/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/README.md b/resource-manager/containerapps/2024-02-02-preview/containerapps/README.md index 38d9372a2dd..93b1b6b8776 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/client.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerapp.go index bfd98ec0555..d280a1e318e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerappdetector.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerappdetector.go index cb4cc8c877c..e497ebb34be 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerappdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_containerappdetector.go @@ -44,7 +44,7 @@ func ParseContainerAppDetectorID(input string) (*ContainerAppDetectorId, error) } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerAppDetectorIDInsensitively(input string) (*ContainerAppDetect } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_revisionsapirevision.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_revisionsapirevision.go index cf7fcd3b4e9..8e7ee316a8e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetdetector.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetdetector.go index 2cb3d1d5723..0a9e86c2cd6 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetDetector(ctx context.Context, id Cont var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetrevision.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetrevision.go index 376c7031e06..968db6baceb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetrevision.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetRevision(ctx context.Context, id Revi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetroot.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetroot.go index f21a7434252..8c9904e5395 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) DiagnosticsGetRoot(ctx context.Context, id Containe var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticslistrevisions.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticslistrevisions.go index 996b89e3a7c..6d8d5523fbd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticslistrevisions.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_diagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o DiagnosticsListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o DiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_get.go index 1cf49840634..b17e455e923 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ContainerAppId) (result var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_getauthtoken.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_getauthtoken.go index 33667cea14c..7203313fe74 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_getauthtoken.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) GetAuthToken(ctx context.Context, id ContainerAppId var model ContainerAppAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listcustomhostnameanalysis.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listcustomhostnameanalysis.go index be6a76b9e53..17119ef149e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listcustomhostnameanalysis.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listcustomhostnameanalysis.go @@ -34,6 +34,7 @@ func (o ListCustomHostNameAnalysisOperationOptions) ToHeaders() *client.Headers func (o ListCustomHostNameAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ContainerAppsClient) ListCustomHostNameAnalysis(ctx context.Context, id var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listsecrets.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listsecrets.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerapps/version.go b/resource-manager/containerapps/2024-02-02-preview/containerapps/version.go index b91761003c6..db1b51efe99 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerapps/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/README.md index 500938efaa6..bf2208ae174 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs` Documentation -The `containerappsauthconfigs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappsauthconfigs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/client.go index f57bc2d149f..b118542a497 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/client.go @@ -15,7 +15,7 @@ type ContainerAppsAuthConfigsClient struct { } func NewContainerAppsAuthConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsAuthConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsAuthConfigsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_authconfig.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_authconfig.go index 419a1f003e8..be4f070df7b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_authconfig.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_authconfig.go @@ -44,7 +44,7 @@ func ParseAuthConfigID(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthConfigIDInsensitively(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_containerapp.go index 82389da4f1b..b1aaf094746 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_createorupdate.go index 28f50cb36f8..8a74d6915bc 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ContainerAppsAuthConfigsClient) CreateOrUpdate(ctx context.Context, id A var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_get.go index 96870ebd993..3fd93ca8c3a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsAuthConfigsClient) Get(ctx context.Context, id AuthConfigId var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/version.go index bd400427302..1063da1bf5f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsauthconfigs/version.go @@ -1,12 +1,10 @@ package containerappsauthconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsauthconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsauthconfigs/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/README.md index 580d92c8f83..82856fb6b20 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds` Documentation -The `containerappsbuilds` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappsbuilds` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/client.go index 4c2a90ce267..87ea0c02022 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/client.go @@ -15,7 +15,7 @@ type ContainerAppsBuildsClient struct { } func NewContainerAppsBuildsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsBuildsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsbuilds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsbuilds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsBuildsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerapp.go index c5e3193827c..eaabd51dae9 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerappbuild.go b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerappbuild.go index 6c76ff871b4..db423e6e89a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerappbuild.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/id_containerappbuild.go @@ -44,7 +44,7 @@ func ParseContainerAppBuildID(input string) (*ContainerAppBuildId, error) { } id := ContainerAppBuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerAppBuildIDInsensitively(input string) (*ContainerAppBuildId, } id := ContainerAppBuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/method_get.go index 3e304047ae2..38d660bb9fd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsBuildsClient) Get(ctx context.Context, id ContainerAppBuild var model ContainerAppsBuildResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/version.go index 19110a7a1ec..3ea12f30282 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsbuilds/version.go @@ -1,12 +1,10 @@ package containerappsbuilds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsbuilds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsbuilds/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/README.md index f885609ad64..6322dac08f2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappspatches` Documentation -The `containerappspatches` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappspatches` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/client.go index 1446514c153..a26d433bcdb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/client.go @@ -15,7 +15,7 @@ type ContainerAppsPatchesClient struct { } func NewContainerAppsPatchesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsPatchesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappspatches", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappspatches", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsPatchesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_containerapp.go index d8b8b5ecb88..1d1b149e9bb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_patch.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_patch.go index 572f226f5f3..7e256d0feb0 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_patch.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/id_patch.go @@ -44,7 +44,7 @@ func ParsePatchID(input string) (*PatchId, error) { } id := PatchId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePatchIDInsensitively(input string) (*PatchId, error) { } id := PatchId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_get.go index d611fb6a645..d7b0b7f01a3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsPatchesClient) Get(ctx context.Context, id PatchId) (result var model ContainerAppsPatchResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_listbycontainerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_listbycontainerapp.go index 037e05e60b7..20ce60d4167 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_listbycontainerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/method_listbycontainerapp.go @@ -39,6 +39,7 @@ func (o ListByContainerAppOperationOptions) ToHeaders() *client.Headers { func (o ListByContainerAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/version.go index 716e6521742..0c5a231c6a2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappspatches/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappspatches/version.go @@ -1,12 +1,10 @@ package containerappspatches -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappspatches/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappspatches/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/README.md index 16bfc3e21f0..8c6e8df49ec 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas` Documentation -The `containerappsrevisionreplicas` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappsrevisionreplicas` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/client.go index 5945a5c4038..6948105cc45 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionReplicasClient struct { } func NewContainerAppsRevisionReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionReplicasClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_replica.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_replica.go index 2f799e6a951..18c5ae3ed3c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_replica.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_replica.go @@ -46,7 +46,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_revision.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_revision.go index 9f3f6992915..ec04c9bac2b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_revision.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_getreplica.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_getreplica.go index f6ce85856e3..9e4b91ade70 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_getreplica.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_getreplica.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionReplicasClient) GetReplica(ctx context.Context, id var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_listreplicas.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_listreplicas.go index 8bbd98c80b4..2e6ffdcf031 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_listreplicas.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/method_listreplicas.go @@ -46,7 +46,6 @@ func (c ContainerAppsRevisionReplicasClient) ListReplicas(ctx context.Context, i var model ReplicaCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/version.go index bfba575617c..e4d7976687d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisionreplicas/version.go @@ -1,12 +1,10 @@ package containerappsrevisionreplicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisionreplicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisionreplicas/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/README.md index 3e19e0f0899..fa0e764645d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_containerapp.go index 469c5109b01..65bdb873dbc 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_revision.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_revision.go index 54f63273632..0d1dbad8974 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_revision.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_getrevision.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_getrevision.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_listrevisions.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_listrevisions.go index 1ba89167188..b25d4c9fd53 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_listrevisions.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/method_listrevisions.go @@ -39,6 +39,7 @@ func (o ListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o ListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/version.go index 5274495b8ab..cdca19dd816 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/README.md index dbcf3392280..43b53f51157 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools` Documentation -The `containerappssessionpools` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappssessionpools` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/client.go index 0e58cedb0a7..e5fa83624fd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/client.go @@ -15,7 +15,7 @@ type ContainerAppsSessionPoolsClient struct { } func NewContainerAppsSessionPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsSessionPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappssessionpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappssessionpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsSessionPoolsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/id_sessionpool.go b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/id_sessionpool.go index 0fb2c0028d5..be1fe7e188f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/id_sessionpool.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/id_sessionpool.go @@ -42,7 +42,7 @@ func ParseSessionPoolID(input string) (*SessionPoolId, error) { } id := SessionPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSessionPoolIDInsensitively(input string) (*SessionPoolId, error) { } id := SessionPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/method_get.go index 86c8d5d985d..a07d09c6519 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsSessionPoolsClient) Get(ctx context.Context, id SessionPool var model SessionPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/version.go index 9e66624b5ec..8ebe85211bf 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssessionpools/version.go @@ -1,12 +1,10 @@ package containerappssessionpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappssessionpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappssessionpools/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/README.md b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/README.md index c22f2e470ce..f3dc89440ae 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols` Documentation -The `containerappssourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `containerappssourcecontrols` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/client.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/client.go index eb9a8a10a09..5946a41621a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/client.go @@ -15,7 +15,7 @@ type ContainerAppsSourceControlsClient struct { } func NewContainerAppsSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsSourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsSourceControlsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_containerapp.go index eac989dd012..c28b43d410b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_sourcecontrol.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_sourcecontrol.go index e8444fd36fb..dc808727403 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_sourcecontrol.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_createorupdate.go index 179015cfddc..d59e22e3c77 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_delete.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_delete.go index 67c544f46ba..3d5aedc83ef 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_delete.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_delete.go @@ -40,6 +40,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_get.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_get.go index 0c0bdf0b5e4..fab8194e2ab 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsSourceControlsClient) Get(ctx context.Context, id SourceCon var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/version.go b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/version.go index de1f0726a17..a8f1a045ea5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/containerappssourcecontrols/version.go @@ -1,12 +1,10 @@ package containerappssourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappssourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappssourcecontrols/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/README.md b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/README.md index 80ec3b00be1..7ee3587129c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies` Documentation -The `daprcomponentresiliencypolicies` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `daprcomponentresiliencypolicies` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/client.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/client.go index 411e5247e5b..edb2e6a6541 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/client.go @@ -15,7 +15,7 @@ type DaprComponentResiliencyPoliciesClient struct { } func NewDaprComponentResiliencyPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DaprComponentResiliencyPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "daprcomponentresiliencypolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "daprcomponentresiliencypolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DaprComponentResiliencyPoliciesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponent.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponent.go index 8d935279847..494674aef3a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponent.go @@ -44,7 +44,7 @@ func ParseDaprComponentID(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDaprComponentIDInsensitively(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponentresiliencypolicy.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponentresiliencypolicy.go index 5319f559b62..3b98893ec6f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponentresiliencypolicy.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/id_daprcomponentresiliencypolicy.go @@ -46,7 +46,7 @@ func ParseDaprComponentResiliencyPolicyID(input string) (*DaprComponentResilienc } id := DaprComponentResiliencyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDaprComponentResiliencyPolicyIDInsensitively(input string) (*DaprCompo } id := DaprComponentResiliencyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_createorupdate.go index e16f6a67fb6..d71cef10a7a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DaprComponentResiliencyPoliciesClient) CreateOrUpdate(ctx context.Contex var model DaprComponentResiliencyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_get.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_get.go index a84666dc54b..42392a56598 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/method_get.go @@ -45,7 +45,6 @@ func (c DaprComponentResiliencyPoliciesClient) Get(ctx context.Context, id DaprC var model DaprComponentResiliencyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/version.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/version.go index ad02725f293..02b8b755bdd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponentresiliencypolicies/version.go @@ -1,12 +1,10 @@ package daprcomponentresiliencypolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/daprcomponentresiliencypolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/daprcomponentresiliencypolicies/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/README.md b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/README.md index 607bbba0973..d24a980ecd3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/daprcomponents` Documentation -The `daprcomponents` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `daprcomponents` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/client.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/client.go index f018f00bdee..7fb966bb0e5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/client.go @@ -15,7 +15,7 @@ type DaprComponentsClient struct { } func NewDaprComponentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DaprComponentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "daprcomponents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "daprcomponents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DaprComponentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironment.go index 94391e0338e..dc633e920ee 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironmentdaprcomponent.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironmentdaprcomponent.go index 554b54acb91..2bd3cc1eb38 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironmentdaprcomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_connectedenvironmentdaprcomponent.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentDaprComponentID(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentDaprComponentIDInsensitively(input string) (*Conne } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_daprcomponent.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_daprcomponent.go index 755d9dc094d..87a65f53711 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_daprcomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_daprcomponent.go @@ -44,7 +44,7 @@ func ParseDaprComponentID(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDaprComponentIDInsensitively(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_managedenvironment.go index d2a90d1954e..1467f5b6ebd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go index b372ec0d96c..3b339e8d2a8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsCreateOrUpdate( var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go index 3336d264da5..fa7c1d61804 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsGet(ctx context var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go index 57cb5795567..6474a29e1d8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsListSecrets(ctx var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_createorupdate.go index d19e2f104cb..b9ca657b15d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) CreateOrUpdate(ctx context.Context, id DaprCompone var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_get.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_get.go index 3ce780b6d03..b60e81d0ae5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_get.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) Get(ctx context.Context, id DaprComponentId) (resu var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_listsecrets.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_listsecrets.go index 636ae80459c..03d6c3ccdcb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_listsecrets.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ListSecrets(ctx context.Context, id DaprComponentI var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/version.go b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/version.go index a4053468cac..e2a157f0d9c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprcomponents/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprcomponents/version.go @@ -1,12 +1,10 @@ package daprcomponents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/daprcomponents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/daprcomponents/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/README.md b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/README.md index 5b2518d3c7d..c295a7d218a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions` Documentation -The `daprsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `daprsubscriptions` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/client.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/client.go index 5e4d4c52d84..501500ac6be 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/client.go @@ -15,7 +15,7 @@ type DaprSubscriptionsClient struct { } func NewDaprSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DaprSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "daprsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "daprsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DaprSubscriptionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_daprsubscription.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_daprsubscription.go index a700bfc739b..3d2d38aaad0 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_daprsubscription.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_daprsubscription.go @@ -44,7 +44,7 @@ func ParseDaprSubscriptionID(input string) (*DaprSubscriptionId, error) { } id := DaprSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDaprSubscriptionIDInsensitively(input string) (*DaprSubscriptionId, er } id := DaprSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_managedenvironment.go index 38b1cf859d2..9dde5f78701 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_createorupdate.go index 93426546f29..365a55988c9 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DaprSubscriptionsClient) CreateOrUpdate(ctx context.Context, id DaprSubs var model DaprSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_get.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_get.go index 8b9bcf99c06..761cd253d15 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c DaprSubscriptionsClient) Get(ctx context.Context, id DaprSubscriptionId) var model DaprSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/version.go b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/version.go index d464728d4d5..cd0b28a977e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/daprsubscriptions/version.go @@ -1,12 +1,10 @@ package daprsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/daprsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/daprsubscriptions/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/README.md b/resource-manager/containerapps/2024-02-02-preview/diagnostics/README.md index e9d97cf84e0..c1b23369bd8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/client.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerapp.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerapp.go index b9b33f26301..25ca553e527 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerappdetector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerappdetector.go index 52799321d3c..b8272ca5ea8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerappdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_containerappdetector.go @@ -44,7 +44,7 @@ func ParseContainerAppDetectorID(input string) (*ContainerAppDetectorId, error) } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerAppDetectorIDInsensitively(input string) (*ContainerAppDetect } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_detector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_detector.go index 008e20f601e..587da3e034e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_detector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_job.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_job.go index 4e0a06fab0a..936cf36c8c7 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_job.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_job.go @@ -42,7 +42,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironment.go index 7200a7fa7c3..70633fae86c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironmentdetector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironmentdetector.go index 208ee9069b4..bf5cb7d7940 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_revisionsapirevision.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_revisionsapirevision.go index 24c29accc47..4cd950c2b43 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetdetector.go index 536d079858a..9a2a1c43e1f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetDetector(ctx context.Conte var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetrevision.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetrevision.go index 6a28b8c8b69..af6794d14ab 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetrevision.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRevision(ctx context.Conte var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetroot.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetroot.go index f19f93687e7..ec30717f8d0 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRoot(ctx context.Context, var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticslistrevisions.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticslistrevisions.go index f37c117df81..96e393b50eb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticslistrevisions.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_containerappsdiagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToHeaders() *clie func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsgetdetector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsgetdetector.go index e368fa57e33..e14b69e502e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsgetdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) JobsGetDetector(ctx context.Context, id DetectorId) ( var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsproxyget.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsproxyget.go index 1ec485e43e2..3367ab105f3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsproxyget.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_jobsproxyget.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) JobsProxyGet(ctx context.Context, id JobId) (result J var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go index 106b5ec9d4f..fe513db6b31 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx context. var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go index 25fb922a48e..2c03f97f04c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ManagedEnvironmentsDiagnosticsGetRoot(ctx context.Con var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/diagnostics/version.go b/resource-manager/containerapps/2024-02-02-preview/diagnostics/version.go index c4b43a4ec72..db6997afe7a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/diagnostics/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/README.md b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/README.md index b4be08dc814..cf12ac74b65 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents` Documentation -The `dotnetcomponents` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `dotnetcomponents` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/client.go b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/client.go index 9fd0be87923..a47be6150e3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/client.go @@ -15,7 +15,7 @@ type DotNetComponentsClient struct { } func NewDotNetComponentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DotNetComponentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dotnetcomponents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dotnetcomponents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DotNetComponentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_dotnetcomponent.go b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_dotnetcomponent.go index b09e50e5525..ea93a1c6d7e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_dotnetcomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_dotnetcomponent.go @@ -44,7 +44,7 @@ func ParseDotNetComponentID(input string) (*DotNetComponentId, error) { } id := DotNetComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDotNetComponentIDInsensitively(input string) (*DotNetComponentId, erro } id := DotNetComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_managedenvironment.go index 7095490a3a5..9c9b45a3d1e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/method_get.go b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/method_get.go index 8e22b3bec98..a3ec669a4ad 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/method_get.go @@ -45,7 +45,6 @@ func (c DotNetComponentsClient) Get(ctx context.Context, id DotNetComponentId) ( var model DotNetComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/version.go b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/version.go index f9b5067359f..fbddb3ed1bb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/dotnetcomponents/version.go @@ -1,12 +1,10 @@ package dotnetcomponents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dotnetcomponents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dotnetcomponents/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/functionsextension/client.go b/resource-manager/containerapps/2024-02-02-preview/functionsextension/client.go index 3b8f9725e0a..f82afcd201e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/functionsextension/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/functionsextension/client.go @@ -15,7 +15,7 @@ type FunctionsExtensionClient struct { } func NewFunctionsExtensionClientWithBaseURI(sdkApi sdkEnv.Api) (*FunctionsExtensionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "functionsextension", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "functionsextension", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FunctionsExtensionClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/functionsextension/id_function.go b/resource-manager/containerapps/2024-02-02-preview/functionsextension/id_function.go index 733deb612cc..b502f38a93f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/functionsextension/id_function.go +++ b/resource-manager/containerapps/2024-02-02-preview/functionsextension/id_function.go @@ -46,7 +46,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/functionsextension/method_invokefunctionshost.go b/resource-manager/containerapps/2024-02-02-preview/functionsextension/method_invokefunctionshost.go index b5c317fbbbd..dbb932f24fd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/functionsextension/method_invokefunctionshost.go +++ b/resource-manager/containerapps/2024-02-02-preview/functionsextension/method_invokefunctionshost.go @@ -46,7 +46,6 @@ func (c FunctionsExtensionClient) InvokeFunctionsHost(ctx context.Context, id Fu var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/functionsextension/version.go b/resource-manager/containerapps/2024-02-02-preview/functionsextension/version.go index ca63584d616..0491f56535b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/functionsextension/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/functionsextension/version.go @@ -1,12 +1,10 @@ package functionsextension -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/functionsextension/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/functionsextension/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/README.md b/resource-manager/containerapps/2024-02-02-preview/javacomponents/README.md index a2070433df9..4ebfadd06bb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/javacomponents` Documentation -The `javacomponents` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `javacomponents` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/client.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/client.go index a937212bb86..d02ba0844ff 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/client.go @@ -15,7 +15,7 @@ type JavaComponentsClient struct { } func NewJavaComponentsClientWithBaseURI(sdkApi sdkEnv.Api) (*JavaComponentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "javacomponents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "javacomponents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JavaComponentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_javacomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_javacomponent.go index 1b44d598349..4821618983e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_javacomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_javacomponent.go @@ -44,7 +44,7 @@ func ParseJavaComponentID(input string) (*JavaComponentId, error) { } id := JavaComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJavaComponentIDInsensitively(input string) (*JavaComponentId, error) { } id := JavaComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_managedenvironment.go index ac89516a1d2..469d8bd0380 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/method_get.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/method_get.go index 92b1288e88e..2dc708149bf 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/method_get.go @@ -45,7 +45,6 @@ func (c JavaComponentsClient) Get(ctx context.Context, id JavaComponentId) (resu var model JavaComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponent.go index 4f02e930cb3..cb2000f711c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponent.go @@ -38,7 +38,7 @@ func (s *JavaComponent) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJavaComponentPropertiesImplementation(v) + impl, err := UnmarshalJavaComponentPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JavaComponent': %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponentproperties.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponentproperties.go index 1811ba7cbe9..4cf5a90ddb3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponentproperties.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_javacomponentproperties.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JavaComponentProperties interface { + JavaComponentProperties() BaseJavaComponentPropertiesImpl } -// RawJavaComponentPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JavaComponentProperties = BaseJavaComponentPropertiesImpl{} + +type BaseJavaComponentPropertiesImpl struct { + ComponentType JavaComponentType `json:"componentType"` + Configurations *[]JavaComponentConfigurationProperty `json:"configurations,omitempty"` + ProvisioningState *JavaComponentProvisioningState `json:"provisioningState,omitempty"` + ServiceBinds *[]JavaComponentServiceBind `json:"serviceBinds,omitempty"` +} + +func (s BaseJavaComponentPropertiesImpl) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return s +} + +var _ JavaComponentProperties = RawJavaComponentPropertiesImpl{} + +// RawJavaComponentPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJavaComponentPropertiesImpl struct { - Type string - Values map[string]interface{} + javaComponentProperties BaseJavaComponentPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawJavaComponentPropertiesImpl) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return s.javaComponentProperties } -func unmarshalJavaComponentPropertiesImplementation(input []byte) (JavaComponentProperties, error) { +func UnmarshalJavaComponentPropertiesImplementation(input []byte) (JavaComponentProperties, error) { if input == nil { return nil, nil } @@ -68,10 +88,15 @@ func unmarshalJavaComponentPropertiesImplementation(input []byte) (JavaComponent return out, nil } - out := RawJavaComponentPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseJavaComponentPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJavaComponentPropertiesImpl: %+v", err) } - return out, nil + + return RawJavaComponentPropertiesImpl{ + javaComponentProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_nacoscomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_nacoscomponent.go index 6e979daf725..417b58807ea 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_nacoscomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_nacoscomponent.go @@ -14,11 +14,22 @@ type NacosComponent struct { Ingress *JavaComponentIngress `json:"ingress,omitempty"` // Fields inherited from JavaComponentProperties + + ComponentType JavaComponentType `json:"componentType"` Configurations *[]JavaComponentConfigurationProperty `json:"configurations,omitempty"` ProvisioningState *JavaComponentProvisioningState `json:"provisioningState,omitempty"` ServiceBinds *[]JavaComponentServiceBind `json:"serviceBinds,omitempty"` } +func (s NacosComponent) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return BaseJavaComponentPropertiesImpl{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + ServiceBinds: s.ServiceBinds, + } +} + var _ json.Marshaler = NacosComponent{} func (s NacosComponent) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s NacosComponent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NacosComponent: %+v", err) } + decoded["componentType"] = "Nacos" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springbootadmincomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springbootadmincomponent.go index 304ae98c134..260598ab9b3 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springbootadmincomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springbootadmincomponent.go @@ -14,11 +14,22 @@ type SpringBootAdminComponent struct { Ingress *JavaComponentIngress `json:"ingress,omitempty"` // Fields inherited from JavaComponentProperties + + ComponentType JavaComponentType `json:"componentType"` Configurations *[]JavaComponentConfigurationProperty `json:"configurations,omitempty"` ProvisioningState *JavaComponentProvisioningState `json:"provisioningState,omitempty"` ServiceBinds *[]JavaComponentServiceBind `json:"serviceBinds,omitempty"` } +func (s SpringBootAdminComponent) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return BaseJavaComponentPropertiesImpl{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + ServiceBinds: s.ServiceBinds, + } +} + var _ json.Marshaler = SpringBootAdminComponent{} func (s SpringBootAdminComponent) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s SpringBootAdminComponent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SpringBootAdminComponent: %+v", err) } + decoded["componentType"] = "SpringBootAdmin" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudconfigcomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudconfigcomponent.go index f7d5591c8ad..3768b1be3d8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudconfigcomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudconfigcomponent.go @@ -13,11 +13,22 @@ var _ JavaComponentProperties = SpringCloudConfigComponent{} type SpringCloudConfigComponent struct { // Fields inherited from JavaComponentProperties + + ComponentType JavaComponentType `json:"componentType"` Configurations *[]JavaComponentConfigurationProperty `json:"configurations,omitempty"` ProvisioningState *JavaComponentProvisioningState `json:"provisioningState,omitempty"` ServiceBinds *[]JavaComponentServiceBind `json:"serviceBinds,omitempty"` } +func (s SpringCloudConfigComponent) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return BaseJavaComponentPropertiesImpl{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + ServiceBinds: s.ServiceBinds, + } +} + var _ json.Marshaler = SpringCloudConfigComponent{} func (s SpringCloudConfigComponent) MarshalJSON() ([]byte, error) { @@ -29,9 +40,10 @@ func (s SpringCloudConfigComponent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SpringCloudConfigComponent: %+v", err) } + decoded["componentType"] = "SpringCloudConfig" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudeurekacomponent.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudeurekacomponent.go index d1d39954472..b18ff1b424e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudeurekacomponent.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/model_springcloudeurekacomponent.go @@ -14,11 +14,22 @@ type SpringCloudEurekaComponent struct { Ingress *JavaComponentIngress `json:"ingress,omitempty"` // Fields inherited from JavaComponentProperties + + ComponentType JavaComponentType `json:"componentType"` Configurations *[]JavaComponentConfigurationProperty `json:"configurations,omitempty"` ProvisioningState *JavaComponentProvisioningState `json:"provisioningState,omitempty"` ServiceBinds *[]JavaComponentServiceBind `json:"serviceBinds,omitempty"` } +func (s SpringCloudEurekaComponent) JavaComponentProperties() BaseJavaComponentPropertiesImpl { + return BaseJavaComponentPropertiesImpl{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + ServiceBinds: s.ServiceBinds, + } +} + var _ json.Marshaler = SpringCloudEurekaComponent{} func (s SpringCloudEurekaComponent) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s SpringCloudEurekaComponent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SpringCloudEurekaComponent: %+v", err) } + decoded["componentType"] = "SpringCloudEureka" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerapps/2024-02-02-preview/javacomponents/version.go b/resource-manager/containerapps/2024-02-02-preview/javacomponents/version.go index 824a6b273be..d2cb9f4a607 100644 --- a/resource-manager/containerapps/2024-02-02-preview/javacomponents/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/javacomponents/version.go @@ -1,12 +1,10 @@ package javacomponents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/javacomponents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/javacomponents/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/README.md b/resource-manager/containerapps/2024-02-02-preview/jobs/README.md index e379a74954c..ab5755d788e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `jobs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/client.go b/resource-manager/containerapps/2024-02-02-preview/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go b/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go index 778152219f6..921b8c91b2c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go b/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go index 252582285a7..65eb68d25b5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/id_execution.go @@ -44,7 +44,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go b/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go index 818f9f6aa82..0060f5abffc 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/id_job.go @@ -42,7 +42,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go index 8032ccc4ee2..98280e2c319 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_executionslist.go @@ -39,6 +39,7 @@ func (o ExecutionsListOperationOptions) ToHeaders() *client.Headers { func (o ExecutionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go index 548f39c5369..d2957d9afaf 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_getdetector.go @@ -45,7 +45,6 @@ func (c JobsClient) GetDetector(ctx context.Context, id DetectorId) (result GetD var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go index 910aedeff62..d305cdb2c5a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_jobexecution.go @@ -45,7 +45,6 @@ func (c JobsClient) JobExecution(ctx context.Context, id ExecutionId) (result Jo var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go index 33fe668d3c9..6d9e1f870c1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_listsecrets.go @@ -46,7 +46,6 @@ func (c JobsClient) ListSecrets(ctx context.Context, id JobId) (result ListSecre var model JobSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go b/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go index 278f2840fda..b500defe75a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/method_proxyget.go @@ -46,7 +46,6 @@ func (c JobsClient) ProxyGet(ctx context.Context, id JobId) (result ProxyGetOper var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/jobs/version.go b/resource-manager/containerapps/2024-02-02-preview/jobs/version.go index 66a99b1c30a..7fd6131cb0e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/jobs/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/README.md b/resource-manager/containerapps/2024-02-02-preview/logicapps/README.md index ba70827488f..e5de118201f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/logicapps` Documentation -The `logicapps` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `logicapps` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/client.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/client.go index 3f5e2f3efd0..078c76e3d61 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/client.go @@ -15,7 +15,7 @@ type LogicAppsClient struct { } func NewLogicAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogicAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logicapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logicapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogicAppsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/id_logicapp.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/id_logicapp.go index 179f173365b..02ca5c2cc86 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/id_logicapp.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/id_logicapp.go @@ -44,7 +44,7 @@ func ParseLogicAppID(input string) (*LogicAppId, error) { } id := LogicAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLogicAppIDInsensitively(input string) (*LogicAppId, error) { } id := LogicAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/id_workflow.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/id_workflow.go index 1af5392b29b..17efe71d080 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/id_workflow.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/id_workflow.go @@ -46,7 +46,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_createorupdate.go index d5d7c1d0d45..305dd056a71 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_createorupdate.go @@ -50,7 +50,6 @@ func (c LogicAppsClient) CreateOrUpdate(ctx context.Context, id LogicAppId, inpu var model LogicApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_get.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_get.go index 0aa41010efa..a5124b9d737 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_get.go @@ -45,7 +45,6 @@ func (c LogicAppsClient) Get(ctx context.Context, id LogicAppId) (result GetOper var model LogicApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_getworkflow.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_getworkflow.go index 47e265389d9..7c9a50fba20 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_getworkflow.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_getworkflow.go @@ -45,7 +45,6 @@ func (c LogicAppsClient) GetWorkflow(ctx context.Context, id WorkflowId) (result var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_invoke.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_invoke.go index 4be2d5bb4d8..6750c66f722 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_invoke.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_invoke.go @@ -40,6 +40,7 @@ func (o InvokeOperationOptions) ToHeaders() *client.Headers { func (o InvokeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LogicAppsClient) Invoke(ctx context.Context, id LogicAppId, options Invo var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_listworkflowsconnections.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_listworkflowsconnections.go index 1dcc6ab42e8..a52e76a4fd1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/method_listworkflowsconnections.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/method_listworkflowsconnections.go @@ -46,7 +46,6 @@ func (c LogicAppsClient) ListWorkflowsConnections(ctx context.Context, id LogicA var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/logicapps/version.go b/resource-manager/containerapps/2024-02-02-preview/logicapps/version.go index 8e8fe0a86fc..0c45ac8d25c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/logicapps/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/logicapps/version.go @@ -1,12 +1,10 @@ package logicapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logicapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logicapps/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/README.md b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/README.md index eaf0eab4389..b5e3767de7a 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/managedcertificates` Documentation -The `managedcertificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `managedcertificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/client.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/client.go index 4d48850b531..bbb557ef073 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/client.go @@ -15,7 +15,7 @@ type ManagedCertificatesClient struct { } func NewManagedCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedcertificate.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedcertificate.go index 87752a47a9d..979ce05d4fd 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedcertificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedenvironment.go index caee9fab87c..23292c60487 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_get.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_get.go index ee99eddd759..04cfdd52374 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ManagedCertificatesClient) Get(ctx context.Context, id ManagedCertificat var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_update.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_update.go index 6bbba8cc98c..a517009cae7 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_update.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/method_update.go @@ -49,7 +49,6 @@ func (c ManagedCertificatesClient) Update(ctx context.Context, id ManagedCertifi var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/version.go b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/version.go index 9cb42d9f872..d4435bf1ebb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedcertificates/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedcertificates/version.go @@ -1,12 +1,10 @@ package managedcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcertificates/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/README.md b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/README.md index d3d6eaf1264..97d39449ab6 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/managedenvironments` Documentation -The `managedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `managedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/client.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/client.go index d1f90d9f441..b7d8992fa30 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsClient struct { } func NewManagedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_certificate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_certificate.go index 8f924206e86..2fd8a661a9d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_certificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedcertificate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedcertificate.go index 610fc08db29..f170fafa558 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedcertificate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironment.go index e96a1dd8ba5..48c73c06534 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironmentdetector.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironmentdetector.go index 6f4fce7eb18..025666f579c 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_privateendpointconnection.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_privateendpointconnection.go index 31a8cca07ad..63747e71402 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_privateendpointconnection.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatescreateorupdate.go index 4b74842fc14..6e71a190b18 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Contex var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesget.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesget.go index 718c7d0f340..9c379c868c5 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) CertificatesGet(ctx context.Context, id Certi var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesupdate.go index 761029f13c6..64f05973e55 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id Ce var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_diagnosticsgetroot.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_diagnosticsgetroot.go index 88cccae7e27..f41bb5dd697 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) DiagnosticsGetRoot(ctx context.Context, id Ma var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_get.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_get.go index 8b0cdde0fe5..5c821baf637 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) Get(ctx context.Context, id ManagedEnvironmen var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_getauthtoken.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_getauthtoken.go index fe7eb3d026e..fac4db2d554 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_getauthtoken.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, id ManagedE var model EnvironmentAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesget.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesget.go index 7b3915bd5d8..c1768ca5b9b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesget.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesGet(ctx context.Context, i var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesupdate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesupdate.go index d4ecb3dd00b..3a177ed8d30 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedcertificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesUpdate(ctx context.Context var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go index 43845d85187..8097358a0b8 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentprivateendpointconnectionsget.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentprivateendpointconnectionsget.go index 0ef1212a820..2b716080f81 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentprivateendpointconnectionsget.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_managedenvironmentprivateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedEnvironmentPrivateEndpointConnectionsG var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_namespaceschecknameavailability.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_namespaceschecknameavailability.go index b1f2717072a..f2c52cfc7bb 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_namespaceschecknameavailability.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/method_namespaceschecknameavailability.go @@ -50,7 +50,6 @@ func (c ManagedEnvironmentsClient) NamespacesCheckNameAvailability(ctx context.C var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/version.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/version.go index 7a1760033fc..cb74ef3b9f2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironments/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironments/version.go @@ -1,12 +1,10 @@ package managedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironments/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/README.md b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/README.md index 12c26b98e62..71ece8d07ed 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages` Documentation -The `managedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `managedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/client.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/client.go index 48b7aee12b3..7b39b5e0e38 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsStoragesClient struct { } func NewManagedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_managedenvironment.go index 4bf35d8d15b..3fb93fe1ab6 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_storage.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_storage.go index d3c5f4b065c..f3363cc8ac1 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_storage.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_createorupdate.go index 3221f2c5162..6111332ea74 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, i var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_get.go index dbb3feab7e8..97349d79481 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsStoragesClient) Get(ctx context.Context, id StorageId var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_list.go index 90f9fe55a5f..ff3a55a4b4e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsStoragesClient) List(ctx context.Context, id ManagedE var model ManagedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/version.go b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/version.go index 4651291d946..9ca2b93d52e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/managedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package managedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironmentsstorages/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/README.md b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/README.md index b0efcbd0c35..bcc65073f4e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/client.go b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_managedenvironment.go index b45b8ce9c8b..6a4db5017d2 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_privateendpointconnection.go index 8ce7702c569..06a555e843d 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/method_managedenvironmentprivateendpointconnectionsget.go b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/method_managedenvironmentprivateendpointconnectionsget.go index ca743e0b31b..ac9be02c40e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/method_managedenvironmentprivateendpointconnectionsget.go +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/method_managedenvironmentprivateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) ManagedEnvironmentPrivateEndpointConne var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/version.go b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/version.go index 5aad88e46a7..5ab3b705b66 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/README.md b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/README.md index a16771ac277..dd82ab0991f 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/client.go b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/id_managedenvironment.go index af68fc491a6..424b8cd8fb7 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/version.go b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/version.go index f8e0c89579d..cebfbe7db47 100644 --- a/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/subscriptions/client.go b/resource-manager/containerapps/2024-02-02-preview/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/containerapps/2024-02-02-preview/subscriptions/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/subscriptions/method_getcustomdomainverificationid.go b/resource-manager/containerapps/2024-02-02-preview/subscriptions/method_getcustomdomainverificationid.go index 00e862b0909..197b8a7b43e 100644 --- a/resource-manager/containerapps/2024-02-02-preview/subscriptions/method_getcustomdomainverificationid.go +++ b/resource-manager/containerapps/2024-02-02-preview/subscriptions/method_getcustomdomainverificationid.go @@ -47,7 +47,6 @@ func (c SubscriptionsClient) GetCustomDomainVerificationId(ctx context.Context, var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-02-02-preview/subscriptions/version.go b/resource-manager/containerapps/2024-02-02-preview/subscriptions/version.go index 50fbc6e489d..c7d10651c06 100644 --- a/resource-manager/containerapps/2024-02-02-preview/subscriptions/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-02-02-preview/usages/README.md b/resource-manager/containerapps/2024-02-02-preview/usages/README.md index 5872cd217b0..68ff3236bfe 100644 --- a/resource-manager/containerapps/2024-02-02-preview/usages/README.md +++ b/resource-manager/containerapps/2024-02-02-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-02-02-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-02-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-02-02-preview/usages/client.go b/resource-manager/containerapps/2024-02-02-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/containerapps/2024-02-02-preview/usages/client.go +++ b/resource-manager/containerapps/2024-02-02-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-02-02-preview/usages/id_location.go b/resource-manager/containerapps/2024-02-02-preview/usages/id_location.go index 668b29aaeda..9b249baf599 100644 --- a/resource-manager/containerapps/2024-02-02-preview/usages/id_location.go +++ b/resource-manager/containerapps/2024-02-02-preview/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/usages/id_managedenvironment.go b/resource-manager/containerapps/2024-02-02-preview/usages/id_managedenvironment.go index 05bd0ac8d64..d727eb82272 100644 --- a/resource-manager/containerapps/2024-02-02-preview/usages/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-02-02-preview/usages/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-02-02-preview/usages/version.go b/resource-manager/containerapps/2024-02-02-preview/usages/version.go index 286a8bda76f..0c090fec333 100644 --- a/resource-manager/containerapps/2024-02-02-preview/usages/version.go +++ b/resource-manager/containerapps/2024-02-02-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2024-02-02-preview" } diff --git a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/README.md b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/README.md index 9ac8f3e1ef2..6ab91f1f95c 100644 --- a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/README.md +++ b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/availableworkloadprofiles` Documentation -The `availableworkloadprofiles` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `availableworkloadprofiles` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/client.go b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/client.go index 13f22503d96..997a05c7055 100644 --- a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/client.go +++ b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/client.go @@ -15,7 +15,7 @@ type AvailableWorkloadProfilesClient struct { } func NewAvailableWorkloadProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableWorkloadProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableworkloadprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableWorkloadProfilesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/id_location.go b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/id_location.go index 4178e6bfbab..86d01667cd9 100644 --- a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/id_location.go +++ b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/version.go b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/version.go index 84169219777..eec32795b70 100644 --- a/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/version.go +++ b/resource-manager/containerapps/2024-03-01/availableworkloadprofiles/version.go @@ -1,12 +1,10 @@ package availableworkloadprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableworkloadprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableworkloadprofiles/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/billingmeters/README.md b/resource-manager/containerapps/2024-03-01/billingmeters/README.md index 6f5825f498a..305748e8197 100644 --- a/resource-manager/containerapps/2024-03-01/billingmeters/README.md +++ b/resource-manager/containerapps/2024-03-01/billingmeters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/billingmeters` Documentation -The `billingmeters` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `billingmeters` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/billingmeters/client.go b/resource-manager/containerapps/2024-03-01/billingmeters/client.go index ca343e3db48..3c07a1d5967 100644 --- a/resource-manager/containerapps/2024-03-01/billingmeters/client.go +++ b/resource-manager/containerapps/2024-03-01/billingmeters/client.go @@ -15,7 +15,7 @@ type BillingMetersClient struct { } func NewBillingMetersClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingMetersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "billingmeters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "billingmeters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BillingMetersClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/billingmeters/id_location.go b/resource-manager/containerapps/2024-03-01/billingmeters/id_location.go index 39035bfc073..eeb0af8e864 100644 --- a/resource-manager/containerapps/2024-03-01/billingmeters/id_location.go +++ b/resource-manager/containerapps/2024-03-01/billingmeters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/billingmeters/method_get.go b/resource-manager/containerapps/2024-03-01/billingmeters/method_get.go index 0a4c2df9948..126e6134bc5 100644 --- a/resource-manager/containerapps/2024-03-01/billingmeters/method_get.go +++ b/resource-manager/containerapps/2024-03-01/billingmeters/method_get.go @@ -46,7 +46,6 @@ func (c BillingMetersClient) Get(ctx context.Context, id LocationId) (result Get var model BillingMeterCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/billingmeters/version.go b/resource-manager/containerapps/2024-03-01/billingmeters/version.go index f49f12ef030..09e3deb549a 100644 --- a/resource-manager/containerapps/2024-03-01/billingmeters/version.go +++ b/resource-manager/containerapps/2024-03-01/billingmeters/version.go @@ -1,12 +1,10 @@ package billingmeters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/billingmeters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/billingmeters/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/certificates/README.md b/resource-manager/containerapps/2024-03-01/certificates/README.md index f9e63105745..02731180c62 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/README.md +++ b/resource-manager/containerapps/2024-03-01/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `certificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/certificates/client.go b/resource-manager/containerapps/2024-03-01/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/client.go +++ b/resource-manager/containerapps/2024-03-01/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/certificates/id_certificate.go b/resource-manager/containerapps/2024-03-01/certificates/id_certificate.go index 1f3c85bd29a..b74bf8278c1 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/id_certificate.go +++ b/resource-manager/containerapps/2024-03-01/certificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironment.go b/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironment.go index 4147c3edea2..010ca028e82 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironmentcertificate.go index d066a1f6d08..af563f70319 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2024-03-01/certificates/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/certificates/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/certificates/id_managedenvironment.go index 5f5f0986d2a..fc6036374bd 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/certificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go index 08223ec1f7e..2af96101d74 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesCreateOrUpdate(ctx var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesget.go b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesget.go index 46ad518db87..9f597b7931b 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesget.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesget.go @@ -45,7 +45,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesGet(ctx context.Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesupdate.go b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesupdate.go index 65a14b672c3..e0a4b47cbf2 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesupdate.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_connectedenvironmentscertificatesupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) ConnectedEnvironmentsCertificatesUpdate(ctx context. var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_createorupdate.go b/resource-manager/containerapps/2024-03-01/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_createorupdate.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_get.go b/resource-manager/containerapps/2024-03-01/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_get.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/method_update.go b/resource-manager/containerapps/2024-03-01/certificates/method_update.go index fa22e1ab8ac..a7cab2abe04 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/method_update.go +++ b/resource-manager/containerapps/2024-03-01/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/certificates/version.go b/resource-manager/containerapps/2024-03-01/certificates/version.go index 6fe14565ca6..eba2396fe6e 100644 --- a/resource-manager/containerapps/2024-03-01/certificates/version.go +++ b/resource-manager/containerapps/2024-03-01/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/README.md b/resource-manager/containerapps/2024-03-01/connectedenvironments/README.md index 7d653f2a22d..5c01ce6ef8e 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/README.md +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/connectedenvironments` Documentation -The `connectedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `connectedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/client.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/client.go index 05cf79bdaad..cef1faa8988 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/client.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsClient struct { } func NewConnectedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironment.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironment.go index b477bcb1616..a71762039ac 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironmentcertificate.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironmentcertificate.go index 51e7eae4c8d..2eaf0c9e086 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironmentcertificate.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/id_connectedenvironmentcertificate.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentCertificateID(input string) (*ConnectedEnvironment } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentCertificateIDInsensitively(input string) (*Connect } id := ConnectedEnvironmentCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatescreateorupdate.go index 07244dc5d7a..3d22a251dc9 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Cont var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesget.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesget.go index 655d77efb6f..966a4a27ff3 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) CertificatesGet(ctx context.Context, id Con var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesupdate.go index 8685e29f2bd..e4c28cc87b2 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_checknameavailability.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_checknameavailability.go index 9d99735268b..59402ea647f 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_checknameavailability.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_get.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_get.go index 16e0c9915d3..b1fb378276d 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_get.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Get(ctx context.Context, id ConnectedEnviro var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_update.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_update.go index 9c2f5c993a9..d9e7ed00759 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/method_update.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/method_update.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsClient) Update(ctx context.Context, id ConnectedEnv var model ConnectedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironments/version.go b/resource-manager/containerapps/2024-03-01/connectedenvironments/version.go index 6c212398f63..bc58720d445 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironments/version.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironments/version.go @@ -1,12 +1,10 @@ package connectedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironments/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/README.md b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/README.md index 8356c5db965..73c4e90e762 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages` Documentation -The `connectedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `connectedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/client.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/client.go index a216f239cfc..a93c2290a8e 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ConnectedEnvironmentsStoragesClient struct { } func NewConnectedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironment.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironment.go index 8896dd215dd..b58d1ca7f85 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go index bcdb639d7ac..fa23d0e1698 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/id_connectedenvironmentstorage.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentStorageID(input string) (*ConnectedEnvironmentStor } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentStorageIDInsensitively(input string) (*ConnectedEn } id := ConnectedEnvironmentStorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_createorupdate.go index 66a61f10f69..b15be5ee53c 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_get.go index bb888e00447..926b8eeba69 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, id Connect var model ConnectedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_list.go index 6faefbeb2db..b661d7781ac 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ConnectedEnvironmentsStoragesClient) List(ctx context.Context, id Connec var model ConnectedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/version.go b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/version.go index b4886280260..2a23eaa8815 100644 --- a/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2024-03-01/connectedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package connectedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedenvironmentsstorages/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/README.md b/resource-manager/containerapps/2024-03-01/containerapps/README.md index 32625e67164..a0bdba08b88 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/README.md +++ b/resource-manager/containerapps/2024-03-01/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/containerapps/client.go b/resource-manager/containerapps/2024-03-01/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/client.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/id_containerapp.go b/resource-manager/containerapps/2024-03-01/containerapps/id_containerapp.go index bfd98ec0555..d280a1e318e 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/id_containerapp.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/id_containerappdetector.go b/resource-manager/containerapps/2024-03-01/containerapps/id_containerappdetector.go index cb4cc8c877c..e497ebb34be 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/id_containerappdetector.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/id_containerappdetector.go @@ -44,7 +44,7 @@ func ParseContainerAppDetectorID(input string) (*ContainerAppDetectorId, error) } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerAppDetectorIDInsensitively(input string) (*ContainerAppDetect } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/id_revisionsapirevision.go b/resource-manager/containerapps/2024-03-01/containerapps/id_revisionsapirevision.go index cf7fcd3b4e9..8e7ee316a8e 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetdetector.go b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetdetector.go index 2cb3d1d5723..0a9e86c2cd6 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetDetector(ctx context.Context, id Cont var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetrevision.go b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetrevision.go index 376c7031e06..968db6baceb 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetrevision.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) DiagnosticsGetRevision(ctx context.Context, id Revi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetroot.go b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetroot.go index f21a7434252..8c9904e5395 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) DiagnosticsGetRoot(ctx context.Context, id Containe var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticslistrevisions.go b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticslistrevisions.go index 996b89e3a7c..6d8d5523fbd 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticslistrevisions.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_diagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o DiagnosticsListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o DiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_get.go b/resource-manager/containerapps/2024-03-01/containerapps/method_get.go index 1cf49840634..b17e455e923 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_get.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ContainerAppId) (result var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_getauthtoken.go b/resource-manager/containerapps/2024-03-01/containerapps/method_getauthtoken.go index 33667cea14c..7203313fe74 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_getauthtoken.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) GetAuthToken(ctx context.Context, id ContainerAppId var model ContainerAppAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_listcustomhostnameanalysis.go b/resource-manager/containerapps/2024-03-01/containerapps/method_listcustomhostnameanalysis.go index be6a76b9e53..17119ef149e 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_listcustomhostnameanalysis.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_listcustomhostnameanalysis.go @@ -34,6 +34,7 @@ func (o ListCustomHostNameAnalysisOperationOptions) ToHeaders() *client.Headers func (o ListCustomHostNameAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ContainerAppsClient) ListCustomHostNameAnalysis(ctx context.Context, id var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/method_listsecrets.go b/resource-manager/containerapps/2024-03-01/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/method_listsecrets.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerapps/version.go b/resource-manager/containerapps/2024-03-01/containerapps/version.go index 72768e64a8b..35ae3e5a630 100644 --- a/resource-manager/containerapps/2024-03-01/containerapps/version.go +++ b/resource-manager/containerapps/2024-03-01/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/README.md b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/README.md index 5d1a23c1f86..aa7462605cb 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/README.md +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/containerappsauthconfigs` Documentation -The `containerappsauthconfigs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `containerappsauthconfigs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/client.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/client.go index f57bc2d149f..b118542a497 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/client.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/client.go @@ -15,7 +15,7 @@ type ContainerAppsAuthConfigsClient struct { } func NewContainerAppsAuthConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsAuthConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsauthconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsAuthConfigsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_authconfig.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_authconfig.go index 419a1f003e8..be4f070df7b 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_authconfig.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_authconfig.go @@ -44,7 +44,7 @@ func ParseAuthConfigID(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthConfigIDInsensitively(input string) (*AuthConfigId, error) { } id := AuthConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_containerapp.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_containerapp.go index 82389da4f1b..b1aaf094746 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_containerapp.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_createorupdate.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_createorupdate.go index 28f50cb36f8..8a74d6915bc 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_createorupdate.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ContainerAppsAuthConfigsClient) CreateOrUpdate(ctx context.Context, id A var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_get.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_get.go index 96870ebd993..3fd93ca8c3a 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_get.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsAuthConfigsClient) Get(ctx context.Context, id AuthConfigId var model AuthConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/version.go b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/version.go index 3a5123f6a6d..9b6affcf792 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/version.go +++ b/resource-manager/containerapps/2024-03-01/containerappsauthconfigs/version.go @@ -1,12 +1,10 @@ package containerappsauthconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsauthconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsauthconfigs/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/README.md b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/README.md index 24bc4af8792..c1a25e13dbe 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/README.md +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas` Documentation -The `containerappsrevisionreplicas` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `containerappsrevisionreplicas` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/client.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/client.go index 5945a5c4038..6948105cc45 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/client.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionReplicasClient struct { } func NewContainerAppsRevisionReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisionreplicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionReplicasClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_replica.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_replica.go index 2f799e6a951..18c5ae3ed3c 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_replica.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_replica.go @@ -46,7 +46,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_revision.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_revision.go index 9f3f6992915..ec04c9bac2b 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_revision.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_getreplica.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_getreplica.go index f6ce85856e3..9e4b91ade70 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_getreplica.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_getreplica.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionReplicasClient) GetReplica(ctx context.Context, id var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_listreplicas.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_listreplicas.go index 8bbd98c80b4..2e6ffdcf031 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_listreplicas.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/method_listreplicas.go @@ -46,7 +46,6 @@ func (c ContainerAppsRevisionReplicasClient) ListReplicas(ctx context.Context, i var model ReplicaCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/version.go b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/version.go index dcc1e63b9f6..4bb8efe07f2 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/version.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisionreplicas/version.go @@ -1,12 +1,10 @@ package containerappsrevisionreplicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisionreplicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisionreplicas/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/README.md b/resource-manager/containerapps/2024-03-01/containerappsrevisions/README.md index 55b3f8b3f6a..fa997288095 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/README.md +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/client.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/client.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_containerapp.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_containerapp.go index 469c5109b01..65bdb873dbc 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_containerapp.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_revision.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_revision.go index 54f63273632..0d1dbad8974 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_revision.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_getrevision.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_getrevision.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_listrevisions.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_listrevisions.go index 1ba89167188..b25d4c9fd53 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_listrevisions.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/method_listrevisions.go @@ -39,6 +39,7 @@ func (o ListRevisionsOperationOptions) ToHeaders() *client.Headers { func (o ListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-03-01/containerappsrevisions/version.go b/resource-manager/containerapps/2024-03-01/containerappsrevisions/version.go index bae4610f417..3134d65805b 100644 --- a/resource-manager/containerapps/2024-03-01/containerappsrevisions/version.go +++ b/resource-manager/containerapps/2024-03-01/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/README.md b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/README.md index 4795fe584bf..e0ea0765223 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/README.md +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/containerappssourcecontrols` Documentation -The `containerappssourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `containerappssourcecontrols` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/client.go b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/client.go index eb9a8a10a09..5946a41621a 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/client.go +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/client.go @@ -15,7 +15,7 @@ type ContainerAppsSourceControlsClient struct { } func NewContainerAppsSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsSourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappssourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsSourceControlsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_containerapp.go b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_containerapp.go index eac989dd012..c28b43d410b 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_containerapp.go +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_sourcecontrol.go b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_sourcecontrol.go index e8444fd36fb..dc808727403 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_sourcecontrol.go +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/method_get.go b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/method_get.go index 0c0bdf0b5e4..fab8194e2ab 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/method_get.go +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsSourceControlsClient) Get(ctx context.Context, id SourceCon var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/version.go b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/version.go index 7356e7c867f..cc090b7a9c6 100644 --- a/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/version.go +++ b/resource-manager/containerapps/2024-03-01/containerappssourcecontrols/version.go @@ -1,12 +1,10 @@ package containerappssourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappssourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappssourcecontrols/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/README.md b/resource-manager/containerapps/2024-03-01/daprcomponents/README.md index 0287cc1438e..713578f1417 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/README.md +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/daprcomponents` Documentation -The `daprcomponents` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `daprcomponents` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/client.go b/resource-manager/containerapps/2024-03-01/daprcomponents/client.go index f018f00bdee..7fb966bb0e5 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/client.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/client.go @@ -15,7 +15,7 @@ type DaprComponentsClient struct { } func NewDaprComponentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DaprComponentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "daprcomponents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "daprcomponents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DaprComponentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironment.go b/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironment.go index 94391e0338e..dc633e920ee 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironment.go @@ -42,7 +42,7 @@ func ParseConnectedEnvironmentID(input string) (*ConnectedEnvironmentId, error) } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedEnvironmentIDInsensitively(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironmentdaprcomponent.go b/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironmentdaprcomponent.go index 554b54acb91..2bd3cc1eb38 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironmentdaprcomponent.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/id_connectedenvironmentdaprcomponent.go @@ -44,7 +44,7 @@ func ParseConnectedEnvironmentDaprComponentID(input string) (*ConnectedEnvironme } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedEnvironmentDaprComponentIDInsensitively(input string) (*Conne } id := ConnectedEnvironmentDaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/id_daprcomponent.go b/resource-manager/containerapps/2024-03-01/daprcomponents/id_daprcomponent.go index 755d9dc094d..87a65f53711 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/id_daprcomponent.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/id_daprcomponent.go @@ -44,7 +44,7 @@ func ParseDaprComponentID(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDaprComponentIDInsensitively(input string) (*DaprComponentId, error) { } id := DaprComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/daprcomponents/id_managedenvironment.go index d2a90d1954e..1467f5b6ebd 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go index b372ec0d96c..3b339e8d2a8 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentscreateorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsCreateOrUpdate( var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go index 3336d264da5..fa7c1d61804 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentsget.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsGet(ctx context var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go index 57cb5795567..6474a29e1d8 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_connectedenvironmentsdaprcomponentslistsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ConnectedEnvironmentsDaprComponentsListSecrets(ctx var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_createorupdate.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_createorupdate.go index d19e2f104cb..b9ca657b15d 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_createorupdate.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DaprComponentsClient) CreateOrUpdate(ctx context.Context, id DaprCompone var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_get.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_get.go index 3ce780b6d03..b60e81d0ae5 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_get.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_get.go @@ -45,7 +45,6 @@ func (c DaprComponentsClient) Get(ctx context.Context, id DaprComponentId) (resu var model DaprComponent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/method_listsecrets.go b/resource-manager/containerapps/2024-03-01/daprcomponents/method_listsecrets.go index 636ae80459c..03d6c3ccdcb 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/method_listsecrets.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/method_listsecrets.go @@ -46,7 +46,6 @@ func (c DaprComponentsClient) ListSecrets(ctx context.Context, id DaprComponentI var model DaprSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/daprcomponents/version.go b/resource-manager/containerapps/2024-03-01/daprcomponents/version.go index 02ae3cd889d..07ae15474d2 100644 --- a/resource-manager/containerapps/2024-03-01/daprcomponents/version.go +++ b/resource-manager/containerapps/2024-03-01/daprcomponents/version.go @@ -1,12 +1,10 @@ package daprcomponents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/daprcomponents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/daprcomponents/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/README.md b/resource-manager/containerapps/2024-03-01/diagnostics/README.md index 7b95aa26573..9a7b31f584f 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/README.md +++ b/resource-manager/containerapps/2024-03-01/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/client.go b/resource-manager/containerapps/2024-03-01/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/client.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_containerapp.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_containerapp.go index b9b33f26301..25ca553e527 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_containerapp.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_containerapp.go @@ -42,7 +42,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_containerappdetector.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_containerappdetector.go index 52799321d3c..b8272ca5ea8 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_containerappdetector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_containerappdetector.go @@ -44,7 +44,7 @@ func ParseContainerAppDetectorID(input string) (*ContainerAppDetectorId, error) } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerAppDetectorIDInsensitively(input string) (*ContainerAppDetect } id := ContainerAppDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_detector.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_detector.go index 008e20f601e..587da3e034e 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_detector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_detectorproperty.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_detectorproperty.go index b689ef62e1d..6723dfceb85 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_detectorproperty.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_detectorproperty.go @@ -44,7 +44,7 @@ func ParseDetectorPropertyID(input string) (*DetectorPropertyId, error) { } id := DetectorPropertyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorPropertyIDInsensitively(input string) (*DetectorPropertyId, er } id := DetectorPropertyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_job.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_job.go index 4e0a06fab0a..936cf36c8c7 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_job.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_job.go @@ -42,7 +42,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironment.go index 7200a7fa7c3..70633fae86c 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironmentdetector.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironmentdetector.go index 208ee9069b4..bf5cb7d7940 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/id_revisionsapirevision.go b/resource-manager/containerapps/2024-03-01/diagnostics/id_revisionsapirevision.go index 24c29accc47..4cd950c2b43 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/id_revisionsapirevision.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/id_revisionsapirevision.go @@ -44,7 +44,7 @@ func ParseRevisionsApiRevisionID(input string) (*RevisionsApiRevisionId, error) } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionsApiRevisionIDInsensitively(input string) (*RevisionsApiRevisi } id := RevisionsApiRevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetdetector.go index 536d079858a..9a2a1c43e1f 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetDetector(ctx context.Conte var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetrevision.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetrevision.go index 6a28b8c8b69..af6794d14ab 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetrevision.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetrevision.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRevision(ctx context.Conte var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetroot.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetroot.go index f19f93687e7..ec30717f8d0 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ContainerAppsDiagnosticsGetRoot(ctx context.Context, var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticslistrevisions.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticslistrevisions.go index f37c117df81..96e393b50eb 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticslistrevisions.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_containerappsdiagnosticslistrevisions.go @@ -39,6 +39,7 @@ func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToHeaders() *clie func (o ContainerAppsDiagnosticsListRevisionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsgetdetector.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsgetdetector.go index e368fa57e33..e14b69e502e 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsgetdetector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) JobsGetDetector(ctx context.Context, id DetectorId) ( var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsproxyget.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsproxyget.go index 8195bd72b9d..73b67337e25 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsproxyget.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_jobsproxyget.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) JobsProxyGet(ctx context.Context, id DetectorProperty var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go index 106b5ec9d4f..fe513db6b31 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx context. var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go b/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go index 25fb922a48e..2c03f97f04c 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/method_managedenvironmentsdiagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c DiagnosticsClient) ManagedEnvironmentsDiagnosticsGetRoot(ctx context.Con var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/diagnostics/version.go b/resource-manager/containerapps/2024-03-01/diagnostics/version.go index e5d57d40934..5f949fe45c1 100644 --- a/resource-manager/containerapps/2024-03-01/diagnostics/version.go +++ b/resource-manager/containerapps/2024-03-01/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/jobs/README.md b/resource-manager/containerapps/2024-03-01/jobs/README.md index f9cdbcd2e47..1670d766c38 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/README.md +++ b/resource-manager/containerapps/2024-03-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/jobs/client.go b/resource-manager/containerapps/2024-03-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/client.go +++ b/resource-manager/containerapps/2024-03-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/jobs/id_detector.go b/resource-manager/containerapps/2024-03-01/jobs/id_detector.go index 778152219f6..921b8c91b2c 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/id_detector.go +++ b/resource-manager/containerapps/2024-03-01/jobs/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/jobs/id_detectorproperty.go b/resource-manager/containerapps/2024-03-01/jobs/id_detectorproperty.go index b073bcafefc..00abcf18b84 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/id_detectorproperty.go +++ b/resource-manager/containerapps/2024-03-01/jobs/id_detectorproperty.go @@ -44,7 +44,7 @@ func ParseDetectorPropertyID(input string) (*DetectorPropertyId, error) { } id := DetectorPropertyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorPropertyIDInsensitively(input string) (*DetectorPropertyId, er } id := DetectorPropertyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/jobs/id_execution.go b/resource-manager/containerapps/2024-03-01/jobs/id_execution.go index 252582285a7..65eb68d25b5 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/id_execution.go +++ b/resource-manager/containerapps/2024-03-01/jobs/id_execution.go @@ -44,7 +44,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/jobs/id_job.go b/resource-manager/containerapps/2024-03-01/jobs/id_job.go index 818f9f6aa82..0060f5abffc 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/id_job.go +++ b/resource-manager/containerapps/2024-03-01/jobs/id_job.go @@ -42,7 +42,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_executionslist.go b/resource-manager/containerapps/2024-03-01/jobs/method_executionslist.go index 8032ccc4ee2..98280e2c319 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_executionslist.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_executionslist.go @@ -39,6 +39,7 @@ func (o ExecutionsListOperationOptions) ToHeaders() *client.Headers { func (o ExecutionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_get.go b/resource-manager/containerapps/2024-03-01/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_get.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_getdetector.go b/resource-manager/containerapps/2024-03-01/jobs/method_getdetector.go index 548f39c5369..d2957d9afaf 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_getdetector.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_getdetector.go @@ -45,7 +45,6 @@ func (c JobsClient) GetDetector(ctx context.Context, id DetectorId) (result GetD var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_jobexecution.go b/resource-manager/containerapps/2024-03-01/jobs/method_jobexecution.go index 910aedeff62..d305cdb2c5a 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_jobexecution.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_jobexecution.go @@ -45,7 +45,6 @@ func (c JobsClient) JobExecution(ctx context.Context, id ExecutionId) (result Jo var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_listsecrets.go b/resource-manager/containerapps/2024-03-01/jobs/method_listsecrets.go index 33fe668d3c9..6d9e1f870c1 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_listsecrets.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_listsecrets.go @@ -46,7 +46,6 @@ func (c JobsClient) ListSecrets(ctx context.Context, id JobId) (result ListSecre var model JobSecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/jobs/method_proxyget.go b/resource-manager/containerapps/2024-03-01/jobs/method_proxyget.go index ec53882d687..ae55334e586 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/method_proxyget.go +++ b/resource-manager/containerapps/2024-03-01/jobs/method_proxyget.go @@ -45,7 +45,6 @@ func (c JobsClient) ProxyGet(ctx context.Context, id DetectorPropertyId) (result var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/jobs/version.go b/resource-manager/containerapps/2024-03-01/jobs/version.go index 76827f0e322..96058f16b83 100644 --- a/resource-manager/containerapps/2024-03-01/jobs/version.go +++ b/resource-manager/containerapps/2024-03-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/README.md b/resource-manager/containerapps/2024-03-01/managedcertificates/README.md index 1b4cc768fd9..cdedf95ceee 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/README.md +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedcertificates` Documentation -The `managedcertificates` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `managedcertificates` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/client.go b/resource-manager/containerapps/2024-03-01/managedcertificates/client.go index 4d48850b531..bbb557ef073 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/client.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/client.go @@ -15,7 +15,7 @@ type ManagedCertificatesClient struct { } func NewManagedCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCertificatesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedcertificate.go b/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedcertificate.go index 87752a47a9d..979ce05d4fd 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedcertificate.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedenvironment.go index caee9fab87c..23292c60487 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/method_get.go b/resource-manager/containerapps/2024-03-01/managedcertificates/method_get.go index ee99eddd759..04cfdd52374 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/method_get.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ManagedCertificatesClient) Get(ctx context.Context, id ManagedCertificat var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/method_update.go b/resource-manager/containerapps/2024-03-01/managedcertificates/method_update.go index 6bbba8cc98c..a517009cae7 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/method_update.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/method_update.go @@ -49,7 +49,6 @@ func (c ManagedCertificatesClient) Update(ctx context.Context, id ManagedCertifi var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedcertificates/version.go b/resource-manager/containerapps/2024-03-01/managedcertificates/version.go index 2a4083d47d3..be226ba75eb 100644 --- a/resource-manager/containerapps/2024-03-01/managedcertificates/version.go +++ b/resource-manager/containerapps/2024-03-01/managedcertificates/version.go @@ -1,12 +1,10 @@ package managedcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcertificates/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/README.md b/resource-manager/containerapps/2024-03-01/managedenvironments/README.md index 471d3b21fc5..5b4f7abdd43 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/README.md +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironments` Documentation -The `managedenvironments` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `managedenvironments` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/client.go b/resource-manager/containerapps/2024-03-01/managedenvironments/client.go index d1f90d9f441..b7d8992fa30 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/client.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsClient struct { } func NewManagedEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/id_certificate.go b/resource-manager/containerapps/2024-03-01/managedenvironments/id_certificate.go index 8f924206e86..2fd8a661a9d 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/id_certificate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedcertificate.go b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedcertificate.go index 610fc08db29..f170fafa558 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedcertificate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedcertificate.go @@ -44,7 +44,7 @@ func ParseManagedCertificateID(input string) (*ManagedCertificateId, error) { } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedCertificateIDInsensitively(input string) (*ManagedCertificateId } id := ManagedCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironment.go index e96a1dd8ba5..48c73c06534 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironmentdetector.go b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironmentdetector.go index 6f4fce7eb18..025666f579c 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironmentdetector.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/id_managedenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseManagedEnvironmentDetectorID(input string) (*ManagedEnvironmentDetecto } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedEnvironmentDetectorIDInsensitively(input string) (*ManagedEnvir } id := ManagedEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatescreateorupdate.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatescreateorupdate.go index 4b74842fc14..6e71a190b18 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatescreateorupdate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatescreateorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesCreateOrUpdate(ctx context.Contex var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesget.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesget.go index 718c7d0f340..9c379c868c5 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesget.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) CertificatesGet(ctx context.Context, id Certi var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesupdate.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesupdate.go index 761029f13c6..64f05973e55 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesupdate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_certificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) CertificatesUpdate(ctx context.Context, id Ce var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_diagnosticsgetroot.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_diagnosticsgetroot.go index 88cccae7e27..f41bb5dd697 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_diagnosticsgetroot.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_diagnosticsgetroot.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) DiagnosticsGetRoot(ctx context.Context, id Ma var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_get.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_get.go index 8b0cdde0fe5..5c821baf637 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_get.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) Get(ctx context.Context, id ManagedEnvironmen var model ManagedEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_getauthtoken.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_getauthtoken.go index fe7eb3d026e..fac4db2d554 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_getauthtoken.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_getauthtoken.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, id ManagedE var model EnvironmentAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesget.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesget.go index 7b3915bd5d8..c1768ca5b9b 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesget.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesget.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesGet(ctx context.Context, i var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesupdate.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesupdate.go index d4ecb3dd00b..3a177ed8d30 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesupdate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedcertificatesupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsClient) ManagedCertificatesUpdate(ctx context.Context var model ManagedCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go index 43845d85187..8097358a0b8 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_managedenvironmentdiagnosticsgetdetector.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsClient) ManagedEnvironmentDiagnosticsGetDetector(ctx var model Diagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/method_namespaceschecknameavailability.go b/resource-manager/containerapps/2024-03-01/managedenvironments/method_namespaceschecknameavailability.go index b1f2717072a..f2c52cfc7bb 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/method_namespaceschecknameavailability.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/method_namespaceschecknameavailability.go @@ -50,7 +50,6 @@ func (c ManagedEnvironmentsClient) NamespacesCheckNameAvailability(ctx context.C var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironments/version.go b/resource-manager/containerapps/2024-03-01/managedenvironments/version.go index 725bcb7fac3..96e6016eb23 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironments/version.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironments/version.go @@ -1,12 +1,10 @@ package managedenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironments/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/README.md b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/README.md index 5423fb72720..79e1e2bd55b 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/README.md +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages` Documentation -The `managedenvironmentsstorages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `managedenvironmentsstorages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/client.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/client.go index 48b7aee12b3..7b39b5e0e38 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/client.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/client.go @@ -15,7 +15,7 @@ type ManagedEnvironmentsStoragesClient struct { } func NewManagedEnvironmentsStoragesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedEnvironmentsStoragesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedenvironmentsstorages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedEnvironmentsStoragesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_managedenvironment.go index 4bf35d8d15b..3fb93fe1ab6 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_storage.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_storage.go index d3c5f4b065c..f3363cc8ac1 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_storage.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/id_storage.go @@ -44,7 +44,7 @@ func ParseStorageID(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageIDInsensitively(input string) (*StorageId, error) { } id := StorageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_createorupdate.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_createorupdate.go index 3221f2c5162..6111332ea74 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_createorupdate.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Context, i var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_get.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_get.go index dbb3feab7e8..97349d79481 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_get.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_get.go @@ -45,7 +45,6 @@ func (c ManagedEnvironmentsStoragesClient) Get(ctx context.Context, id StorageId var model ManagedEnvironmentStorage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_list.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_list.go index 90f9fe55a5f..ff3a55a4b4e 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_list.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/method_list.go @@ -46,7 +46,6 @@ func (c ManagedEnvironmentsStoragesClient) List(ctx context.Context, id ManagedE var model ManagedEnvironmentStoragesCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/version.go b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/version.go index 33ca835175c..41064b6458f 100644 --- a/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/version.go +++ b/resource-manager/containerapps/2024-03-01/managedenvironmentsstorages/version.go @@ -1,12 +1,10 @@ package managedenvironmentsstorages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedenvironmentsstorages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedenvironmentsstorages/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/subscriptions/client.go b/resource-manager/containerapps/2024-03-01/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/containerapps/2024-03-01/subscriptions/client.go +++ b/resource-manager/containerapps/2024-03-01/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/subscriptions/method_getcustomdomainverificationid.go b/resource-manager/containerapps/2024-03-01/subscriptions/method_getcustomdomainverificationid.go index 00e862b0909..197b8a7b43e 100644 --- a/resource-manager/containerapps/2024-03-01/subscriptions/method_getcustomdomainverificationid.go +++ b/resource-manager/containerapps/2024-03-01/subscriptions/method_getcustomdomainverificationid.go @@ -47,7 +47,6 @@ func (c SubscriptionsClient) GetCustomDomainVerificationId(ctx context.Context, var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerapps/2024-03-01/subscriptions/version.go b/resource-manager/containerapps/2024-03-01/subscriptions/version.go index 81b23fe88f7..4f519a165f6 100644 --- a/resource-manager/containerapps/2024-03-01/subscriptions/version.go +++ b/resource-manager/containerapps/2024-03-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2024-03-01" } diff --git a/resource-manager/containerapps/2024-03-01/usages/README.md b/resource-manager/containerapps/2024-03-01/usages/README.md index 101a4a90b45..1e73770b5b6 100644 --- a/resource-manager/containerapps/2024-03-01/usages/README.md +++ b/resource-manager/containerapps/2024-03-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `containerapps` (API Version `2024-03-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `containerapps` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerapps/2024-03-01/usages/client.go b/resource-manager/containerapps/2024-03-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/containerapps/2024-03-01/usages/client.go +++ b/resource-manager/containerapps/2024-03-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/containerapps/2024-03-01/usages/id_location.go b/resource-manager/containerapps/2024-03-01/usages/id_location.go index 668b29aaeda..9b249baf599 100644 --- a/resource-manager/containerapps/2024-03-01/usages/id_location.go +++ b/resource-manager/containerapps/2024-03-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/usages/id_managedenvironment.go b/resource-manager/containerapps/2024-03-01/usages/id_managedenvironment.go index 05bd0ac8d64..d727eb82272 100644 --- a/resource-manager/containerapps/2024-03-01/usages/id_managedenvironment.go +++ b/resource-manager/containerapps/2024-03-01/usages/id_managedenvironment.go @@ -42,7 +42,7 @@ func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error) { } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId } id := ManagedEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerapps/2024-03-01/usages/version.go b/resource-manager/containerapps/2024-03-01/usages/version.go index 8065341ea18..bd9406a21a7 100644 --- a/resource-manager/containerapps/2024-03-01/usages/version.go +++ b/resource-manager/containerapps/2024-03-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2024-03-01" } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/README.md b/resource-manager/containerinstance/2023-05-01/containerinstance/README.md index dbc924faa1d..c29d55fc951 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/README.md +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerinstance/2023-05-01/containerinstance` Documentation -The `containerinstance` SDK allows for interaction with the Azure Resource Manager Service `containerinstance` (API Version `2023-05-01`). +The `containerinstance` SDK allows for interaction with Azure Resource Manager `containerinstance` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/client.go b/resource-manager/containerinstance/2023-05-01/containerinstance/client.go index bec267c5086..9e2dd14ce18 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/client.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/client.go @@ -15,7 +15,7 @@ type ContainerInstanceClient struct { } func NewContainerInstanceClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerInstanceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerinstance", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerinstance", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerInstanceClient: %+v", err) } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go b/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go index 53ab184b921..4c0270c79ba 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/id_container.go @@ -44,7 +44,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go b/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go index 31b7833bb10..748efbe94b9 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/id_containergroup.go @@ -42,7 +42,7 @@ func ParseContainerGroupID(input string) (*ContainerGroupId, error) { } id := ContainerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContainerGroupIDInsensitively(input string) (*ContainerGroupId, error) } id := ContainerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go b/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go index dc6b8110935..05394230f20 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsget.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsget.go index a185e3f9284..56a159e9123 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsget.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsget.go @@ -45,7 +45,6 @@ func (c ContainerInstanceClient) ContainerGroupsGet(ctx context.Context, id Cont var model ContainerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsgetoutboundnetworkdependenciesendpoints.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsgetoutboundnetworkdependenciesendpoints.go index e957860b761..85d12a682e4 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsgetoutboundnetworkdependenciesendpoints.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsgetoutboundnetworkdependenciesendpoints.go @@ -46,7 +46,6 @@ func (c ContainerInstanceClient) ContainerGroupsGetOutboundNetworkDependenciesEn var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsupdate.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsupdate.go index ab81ed5b734..25dcf502693 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsupdate.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containergroupsupdate.go @@ -49,7 +49,6 @@ func (c ContainerInstanceClient) ContainerGroupsUpdate(ctx context.Context, id C var model ContainerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersattach.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersattach.go index bf56bbcf939..89c06f345eb 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersattach.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersattach.go @@ -46,7 +46,6 @@ func (c ContainerInstanceClient) ContainersAttach(ctx context.Context, id Contai var model ContainerAttachResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersexecutecommand.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersexecutecommand.go index 1701b25a299..04d63544727 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersexecutecommand.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containersexecutecommand.go @@ -50,7 +50,6 @@ func (c ContainerInstanceClient) ContainersExecuteCommand(ctx context.Context, i var model ContainerExecResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containerslistlogs.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containerslistlogs.go index 510df9c13d2..968ef8f3636 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_containerslistlogs.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_containerslistlogs.go @@ -35,6 +35,7 @@ func (o ContainersListLogsOperationOptions) ToHeaders() *client.Headers { func (o ContainersListLogsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ContainerInstanceClient) ContainersListLogs(ctx context.Context, id Cont var model Logs result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/method_locationlistusage.go b/resource-manager/containerinstance/2023-05-01/containerinstance/method_locationlistusage.go index e7f7dfc3786..2883aab9a36 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/method_locationlistusage.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/method_locationlistusage.go @@ -46,7 +46,6 @@ func (c ContainerInstanceClient) LocationListUsage(ctx context.Context, id Locat var model UsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerinstance/2023-05-01/containerinstance/version.go b/resource-manager/containerinstance/2023-05-01/containerinstance/version.go index 149f9fc52e3..b8185322d4f 100644 --- a/resource-manager/containerinstance/2023-05-01/containerinstance/version.go +++ b/resource-manager/containerinstance/2023-05-01/containerinstance/version.go @@ -1,12 +1,10 @@ package containerinstance -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerinstance/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerinstance/2023-05-01" } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/README.md b/resource-manager/containerregistry/2019-06-01-preview/agentpools/README.md index 1adb5f12945..0f80b001401 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/README.md +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2019-06-01-preview`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2019-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/client.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/client.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go index f2d222a3015..7122d85296e 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go index 16f46119fd4..0641894cd0f 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_get.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_get.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_getqueuestatus.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_getqueuestatus.go index f500dec799d..6c28b373bc2 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_getqueuestatus.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/method_getqueuestatus.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetQueueStatus(ctx context.Context, id AgentPoolId) (r var model AgentPoolQueueStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/agentpools/version.go b/resource-manager/containerregistry/2019-06-01-preview/agentpools/version.go index 4f7cc47b565..7ba674358df 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/agentpools/version.go +++ b/resource-manager/containerregistry/2019-06-01-preview/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2019-06-01-preview" } diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/README.md b/resource-manager/containerregistry/2019-06-01-preview/registries/README.md index 87e7d582950..f43bb7559d9 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/README.md +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/registries` Documentation -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2019-06-01-preview`). +The `registries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2019-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/client.go b/resource-manager/containerregistry/2019-06-01-preview/registries/client.go index f3defc5ecd2..19546ba8db3 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/client.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/client.go @@ -15,7 +15,7 @@ type RegistriesClient struct { } func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go b/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go index ced90cd79e7..913c0b47055 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/method_getbuildsourceuploadurl.go b/resource-manager/containerregistry/2019-06-01-preview/registries/method_getbuildsourceuploadurl.go index 427c284c5b7..52a6376864b 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/method_getbuildsourceuploadurl.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/method_getbuildsourceuploadurl.go @@ -46,7 +46,6 @@ func (c RegistriesClient) GetBuildSourceUploadUrl(ctx context.Context, id Regist var model SourceUploadDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/model_dockerbuildrequest.go b/resource-manager/containerregistry/2019-06-01-preview/registries/model_dockerbuildrequest.go index 1c87052e3ba..4d1ef33a877 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/model_dockerbuildrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/model_dockerbuildrequest.go @@ -24,9 +24,20 @@ type DockerBuildRequest struct { Timeout *int64 `json:"timeout,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s DockerBuildRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = DockerBuildRequest{} @@ -40,9 +51,10 @@ func (s DockerBuildRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerBuildRequest: %+v", err) } + decoded["type"] = "DockerBuildRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/model_encodedtaskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/registries/model_encodedtaskrunrequest.go index 302e9083147..ed68dfae8f8 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/model_encodedtaskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/model_encodedtaskrunrequest.go @@ -21,9 +21,20 @@ type EncodedTaskRunRequest struct { Values *[]SetValue `json:"values,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s EncodedTaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = EncodedTaskRunRequest{} @@ -37,9 +48,10 @@ func (s EncodedTaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EncodedTaskRunRequest: %+v", err) } + decoded["type"] = "EncodedTaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/model_filetaskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/registries/model_filetaskrunrequest.go index 0730c7d1d86..dd24449b382 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/model_filetaskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/model_filetaskrunrequest.go @@ -21,9 +21,20 @@ type FileTaskRunRequest struct { ValuesFilePath *string `json:"valuesFilePath,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s FileTaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = FileTaskRunRequest{} @@ -37,9 +48,10 @@ func (s FileTaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileTaskRunRequest: %+v", err) } + decoded["type"] = "FileTaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/model_runrequest.go b/resource-manager/containerregistry/2019-06-01-preview/registries/model_runrequest.go index d98eb00a9e2..12c6d274a57 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/model_runrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/model_runrequest.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RunRequest interface { + RunRequest() BaseRunRequestImpl } -// RawRunRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RunRequest = BaseRunRequestImpl{} + +type BaseRunRequestImpl struct { + AgentPoolName *string `json:"agentPoolName,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s BaseRunRequestImpl) RunRequest() BaseRunRequestImpl { + return s +} + +var _ RunRequest = RawRunRequestImpl{} + +// RawRunRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRunRequestImpl struct { - Type string - Values map[string]interface{} + runRequest BaseRunRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRunRequestImpl) RunRequest() BaseRunRequestImpl { + return s.runRequest } -func unmarshalRunRequestImplementation(input []byte) (RunRequest, error) { +func UnmarshalRunRequestImplementation(input []byte) (RunRequest, error) { if input == nil { return nil, nil } @@ -68,10 +88,15 @@ func unmarshalRunRequestImplementation(input []byte) (RunRequest, error) { return out, nil } - out := RawRunRequestImpl{ - Type: value, - Values: temp, + var parent BaseRunRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRunRequestImpl: %+v", err) } - return out, nil + + return RawRunRequestImpl{ + runRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/model_taskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/registries/model_taskrunrequest.go index 1d8d25fa906..a304985549b 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/model_taskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/model_taskrunrequest.go @@ -15,9 +15,20 @@ type TaskRunRequest struct { TaskId string `json:"taskId"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s TaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = TaskRunRequest{} @@ -31,9 +42,10 @@ func (s TaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TaskRunRequest: %+v", err) } + decoded["type"] = "TaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/registries/version.go b/resource-manager/containerregistry/2019-06-01-preview/registries/version.go index 84290c8d0ab..5fdbb7c65f7 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/registries/version.go +++ b/resource-manager/containerregistry/2019-06-01-preview/registries/version.go @@ -1,12 +1,10 @@ package registries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registries/2019-06-01-preview" } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/README.md b/resource-manager/containerregistry/2019-06-01-preview/runs/README.md index 699b55b1d60..2cfd445415a 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/README.md +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs` Documentation -The `runs` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2019-06-01-preview`). +The `runs` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2019-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/client.go b/resource-manager/containerregistry/2019-06-01-preview/runs/client.go index 22236a80b62..648f48a0016 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/client.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/client.go @@ -15,7 +15,7 @@ type RunsClient struct { } func NewRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*RunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go b/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go index 6571c702904..538a12c82e4 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go b/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go index 1df6e0ee6c7..7dedd36ccfd 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/id_run.go @@ -44,7 +44,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/method_get.go b/resource-manager/containerregistry/2019-06-01-preview/runs/method_get.go index bf67db39220..02e7e276125 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/method_get.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/method_get.go @@ -45,7 +45,6 @@ func (c RunsClient) Get(ctx context.Context, id RunId) (result GetOperationRespo var model Run result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/method_getlogsasurl.go b/resource-manager/containerregistry/2019-06-01-preview/runs/method_getlogsasurl.go index cd6ba9a028d..4a1e7d9e3de 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/method_getlogsasurl.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/method_getlogsasurl.go @@ -46,7 +46,6 @@ func (c RunsClient) GetLogSasUrl(ctx context.Context, id RunId) (result GetLogSa var model RunGetLogResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/method_list.go b/resource-manager/containerregistry/2019-06-01-preview/runs/method_list.go index 8e4d9bf8c33..a2575c844cf 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/method_list.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerregistry/2019-06-01-preview/runs/version.go b/resource-manager/containerregistry/2019-06-01-preview/runs/version.go index b47eab3fa4d..af53be099ea 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/runs/version.go +++ b/resource-manager/containerregistry/2019-06-01-preview/runs/version.go @@ -1,12 +1,10 @@ package runs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runs/2019-06-01-preview" } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/README.md b/resource-manager/containerregistry/2019-06-01-preview/taskruns/README.md index 2c9bc38a235..31adc0b1508 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/README.md +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/taskruns` Documentation -The `taskruns` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2019-06-01-preview`). +The `taskruns` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2019-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/client.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/client.go index 690d8b47df7..9b04e022566 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/client.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/client.go @@ -15,7 +15,7 @@ type TaskRunsClient struct { } func NewTaskRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*TaskRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "taskruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "taskruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TaskRunsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go index b95dbe45ce0..4da63192310 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go index 02199eebf65..d202cbd9ab0 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/id_taskrun.go @@ -44,7 +44,7 @@ func ParseTaskRunID(input string) (*TaskRunId, error) { } id := TaskRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTaskRunIDInsensitively(input string) (*TaskRunId, error) { } id := TaskRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_get.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_get.go index f08d0975567..a4f659a5ef9 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_get.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_get.go @@ -45,7 +45,6 @@ func (c TaskRunsClient) Get(ctx context.Context, id TaskRunId) (result GetOperat var model TaskRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_getdetails.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_getdetails.go index d1271f6ea6c..f78e360333a 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_getdetails.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/method_getdetails.go @@ -46,7 +46,6 @@ func (c TaskRunsClient) GetDetails(ctx context.Context, id TaskRunId) (result Ge var model TaskRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_dockerbuildrequest.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_dockerbuildrequest.go index cd21a0e12c5..ea3d500279d 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_dockerbuildrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_dockerbuildrequest.go @@ -24,9 +24,20 @@ type DockerBuildRequest struct { Timeout *int64 `json:"timeout,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s DockerBuildRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = DockerBuildRequest{} @@ -40,9 +51,10 @@ func (s DockerBuildRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerBuildRequest: %+v", err) } + decoded["type"] = "DockerBuildRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_encodedtaskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_encodedtaskrunrequest.go index daf14c7a3e1..36ddb42ee9c 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_encodedtaskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_encodedtaskrunrequest.go @@ -21,9 +21,20 @@ type EncodedTaskRunRequest struct { Values *[]SetValue `json:"values,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s EncodedTaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = EncodedTaskRunRequest{} @@ -37,9 +48,10 @@ func (s EncodedTaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EncodedTaskRunRequest: %+v", err) } + decoded["type"] = "EncodedTaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_filetaskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_filetaskrunrequest.go index 822d06143e0..df4ab95e822 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_filetaskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_filetaskrunrequest.go @@ -21,9 +21,20 @@ type FileTaskRunRequest struct { ValuesFilePath *string `json:"valuesFilePath,omitempty"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s FileTaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = FileTaskRunRequest{} @@ -37,9 +48,10 @@ func (s FileTaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileTaskRunRequest: %+v", err) } + decoded["type"] = "FileTaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_runrequest.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_runrequest.go index 8ced0bcd755..8178ba504bf 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_runrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_runrequest.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RunRequest interface { + RunRequest() BaseRunRequestImpl } -// RawRunRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RunRequest = BaseRunRequestImpl{} + +type BaseRunRequestImpl struct { + AgentPoolName *string `json:"agentPoolName,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s BaseRunRequestImpl) RunRequest() BaseRunRequestImpl { + return s +} + +var _ RunRequest = RawRunRequestImpl{} + +// RawRunRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRunRequestImpl struct { - Type string - Values map[string]interface{} + runRequest BaseRunRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRunRequestImpl) RunRequest() BaseRunRequestImpl { + return s.runRequest } -func unmarshalRunRequestImplementation(input []byte) (RunRequest, error) { +func UnmarshalRunRequestImplementation(input []byte) (RunRequest, error) { if input == nil { return nil, nil } @@ -68,10 +88,15 @@ func unmarshalRunRequestImplementation(input []byte) (RunRequest, error) { return out, nil } - out := RawRunRequestImpl{ - Type: value, - Values: temp, + var parent BaseRunRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRunRequestImpl: %+v", err) } - return out, nil + + return RawRunRequestImpl{ + runRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunproperties.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunproperties.go index 32c79c1b1e1..63329cd53d2 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunproperties.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunproperties.go @@ -34,7 +34,7 @@ func (s *TaskRunProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["runRequest"]; ok { - impl, err := unmarshalRunRequestImplementation(v) + impl, err := UnmarshalRunRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RunRequest' for 'TaskRunProperties': %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunpropertiesupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunpropertiesupdateparameters.go index 9426ec59aaa..9ed4537c2a0 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunpropertiesupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunpropertiesupdateparameters.go @@ -30,7 +30,7 @@ func (s *TaskRunPropertiesUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["runRequest"]; ok { - impl, err := unmarshalRunRequestImplementation(v) + impl, err := UnmarshalRunRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RunRequest' for 'TaskRunPropertiesUpdateParameters': %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunrequest.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunrequest.go index 6dee3faeb06..c176e0aaba8 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunrequest.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/model_taskrunrequest.go @@ -15,9 +15,20 @@ type TaskRunRequest struct { TaskId string `json:"taskId"` // Fields inherited from RunRequest + AgentPoolName *string `json:"agentPoolName,omitempty"` IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` LogTemplate *string `json:"logTemplate,omitempty"` + Type string `json:"type"` +} + +func (s TaskRunRequest) RunRequest() BaseRunRequestImpl { + return BaseRunRequestImpl{ + AgentPoolName: s.AgentPoolName, + IsArchiveEnabled: s.IsArchiveEnabled, + LogTemplate: s.LogTemplate, + Type: s.Type, + } } var _ json.Marshaler = TaskRunRequest{} @@ -31,9 +42,10 @@ func (s TaskRunRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TaskRunRequest: %+v", err) } + decoded["type"] = "TaskRunRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/taskruns/version.go b/resource-manager/containerregistry/2019-06-01-preview/taskruns/version.go index 121b169bf5a..e5ebfaf8846 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/taskruns/version.go +++ b/resource-manager/containerregistry/2019-06-01-preview/taskruns/version.go @@ -1,12 +1,10 @@ package taskruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/taskruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/taskruns/2019-06-01-preview" } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/README.md b/resource-manager/containerregistry/2019-06-01-preview/tasks/README.md index 52cb5f23283..485f95e6544 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/README.md +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/tasks` Documentation -The `tasks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2019-06-01-preview`). +The `tasks` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2019-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/client.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/client.go index 8e365f36b1a..acc4e56ed72 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/client.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/client.go @@ -15,7 +15,7 @@ type TasksClient struct { } func NewTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*TasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tasks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tasks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TasksClient: %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go index e5cfc9b044c..327e020f556 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go index 24f595ca1b0..a9c6f73bcff 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/id_task.go @@ -44,7 +44,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/method_get.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/method_get.go index 2781b2e53ca..e4424858155 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/method_get.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/method_get.go @@ -45,7 +45,6 @@ func (c TasksClient) Get(ctx context.Context, id TaskId) (result GetOperationRes var model Task result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/method_getdetails.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/method_getdetails.go index 64cac88d553..18c4539fada 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/method_getdetails.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/method_getdetails.go @@ -46,7 +46,6 @@ func (c TasksClient) GetDetails(ctx context.Context, id TaskId) (result GetDetai var model Task result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstep.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstep.go index bbaf354d48c..ca306a9dc89 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstep.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstep.go @@ -19,9 +19,20 @@ type DockerBuildStep struct { Target *string `json:"target,omitempty"` // Fields inherited from TaskStepProperties + BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` ContextAccessToken *string `json:"contextAccessToken,omitempty"` ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s DockerBuildStep) TaskStepProperties() BaseTaskStepPropertiesImpl { + return BaseTaskStepPropertiesImpl{ + BaseImageDependencies: s.BaseImageDependencies, + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = DockerBuildStep{} @@ -35,9 +46,10 @@ func (s DockerBuildStep) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerBuildStep: %+v", err) } + decoded["type"] = "Docker" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstepupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstepupdateparameters.go index 5ed89fb74cb..1c5fe1a99bd 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstepupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_dockerbuildstepupdateparameters.go @@ -19,8 +19,18 @@ type DockerBuildStepUpdateParameters struct { Target *string `json:"target,omitempty"` // Fields inherited from TaskStepUpdateParameters - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - ContextPath *string `json:"contextPath,omitempty"` + + ContextAccessToken *string `json:"contextAccessToken,omitempty"` + ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s DockerBuildStepUpdateParameters) TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl { + return BaseTaskStepUpdateParametersImpl{ + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = DockerBuildStepUpdateParameters{} @@ -34,9 +44,10 @@ func (s DockerBuildStepUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerBuildStepUpdateParameters: %+v", err) } + decoded["type"] = "Docker" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstep.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstep.go index ae5d6c1ad5c..2521f3b48c5 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstep.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstep.go @@ -16,9 +16,20 @@ type EncodedTaskStep struct { Values *[]SetValue `json:"values,omitempty"` // Fields inherited from TaskStepProperties + BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` ContextAccessToken *string `json:"contextAccessToken,omitempty"` ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s EncodedTaskStep) TaskStepProperties() BaseTaskStepPropertiesImpl { + return BaseTaskStepPropertiesImpl{ + BaseImageDependencies: s.BaseImageDependencies, + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = EncodedTaskStep{} @@ -32,9 +43,10 @@ func (s EncodedTaskStep) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EncodedTaskStep: %+v", err) } + decoded["type"] = "EncodedTask" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstepupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstepupdateparameters.go index c69e7bcb860..5bfe6195566 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstepupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_encodedtaskstepupdateparameters.go @@ -16,8 +16,18 @@ type EncodedTaskStepUpdateParameters struct { Values *[]SetValue `json:"values,omitempty"` // Fields inherited from TaskStepUpdateParameters - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - ContextPath *string `json:"contextPath,omitempty"` + + ContextAccessToken *string `json:"contextAccessToken,omitempty"` + ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s EncodedTaskStepUpdateParameters) TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl { + return BaseTaskStepUpdateParametersImpl{ + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = EncodedTaskStepUpdateParameters{} @@ -31,9 +41,10 @@ func (s EncodedTaskStepUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EncodedTaskStepUpdateParameters: %+v", err) } + decoded["type"] = "EncodedTask" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstep.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstep.go index 762e4bc864e..afbfdbdfae5 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstep.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstep.go @@ -16,9 +16,20 @@ type FileTaskStep struct { ValuesFilePath *string `json:"valuesFilePath,omitempty"` // Fields inherited from TaskStepProperties + BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` ContextAccessToken *string `json:"contextAccessToken,omitempty"` ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s FileTaskStep) TaskStepProperties() BaseTaskStepPropertiesImpl { + return BaseTaskStepPropertiesImpl{ + BaseImageDependencies: s.BaseImageDependencies, + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = FileTaskStep{} @@ -32,9 +43,10 @@ func (s FileTaskStep) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileTaskStep: %+v", err) } + decoded["type"] = "FileTask" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstepupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstepupdateparameters.go index a155bf5da29..1ffe69f86a1 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstepupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_filetaskstepupdateparameters.go @@ -16,8 +16,18 @@ type FileTaskStepUpdateParameters struct { ValuesFilePath *string `json:"valuesFilePath,omitempty"` // Fields inherited from TaskStepUpdateParameters - ContextAccessToken *string `json:"contextAccessToken,omitempty"` - ContextPath *string `json:"contextPath,omitempty"` + + ContextAccessToken *string `json:"contextAccessToken,omitempty"` + ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s FileTaskStepUpdateParameters) TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl { + return BaseTaskStepUpdateParametersImpl{ + ContextAccessToken: s.ContextAccessToken, + ContextPath: s.ContextPath, + Type: s.Type, + } } var _ json.Marshaler = FileTaskStepUpdateParameters{} @@ -31,9 +41,10 @@ func (s FileTaskStepUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileTaskStepUpdateParameters: %+v", err) } + decoded["type"] = "FileTask" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskproperties.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskproperties.go index f862a445cd9..41d588d46c3 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskproperties.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskproperties.go @@ -65,7 +65,7 @@ func (s *TaskProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["step"]; ok { - impl, err := unmarshalTaskStepPropertiesImplementation(v) + impl, err := UnmarshalTaskStepPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Step' for 'TaskProperties': %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskpropertiesupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskpropertiesupdateparameters.go index b280132f68a..078cb6c5721 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskpropertiesupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskpropertiesupdateparameters.go @@ -44,7 +44,7 @@ func (s *TaskPropertiesUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["step"]; ok { - impl, err := unmarshalTaskStepUpdateParametersImplementation(v) + impl, err := UnmarshalTaskStepUpdateParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Step' for 'TaskPropertiesUpdateParameters': %+v", err) } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepproperties.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepproperties.go index a2715325318..a3fd5e87823 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepproperties.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepproperties.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskStepProperties interface { + TaskStepProperties() BaseTaskStepPropertiesImpl } -// RawTaskStepPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskStepProperties = BaseTaskStepPropertiesImpl{} + +type BaseTaskStepPropertiesImpl struct { + BaseImageDependencies *[]BaseImageDependency `json:"baseImageDependencies,omitempty"` + ContextAccessToken *string `json:"contextAccessToken,omitempty"` + ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s BaseTaskStepPropertiesImpl) TaskStepProperties() BaseTaskStepPropertiesImpl { + return s +} + +var _ TaskStepProperties = RawTaskStepPropertiesImpl{} + +// RawTaskStepPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskStepPropertiesImpl struct { - Type string - Values map[string]interface{} + taskStepProperties BaseTaskStepPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskStepPropertiesImpl) TaskStepProperties() BaseTaskStepPropertiesImpl { + return s.taskStepProperties } -func unmarshalTaskStepPropertiesImplementation(input []byte) (TaskStepProperties, error) { +func UnmarshalTaskStepPropertiesImplementation(input []byte) (TaskStepProperties, error) { if input == nil { return nil, nil } @@ -60,10 +80,15 @@ func unmarshalTaskStepPropertiesImplementation(input []byte) (TaskStepProperties return out, nil } - out := RawTaskStepPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseTaskStepPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskStepPropertiesImpl: %+v", err) } - return out, nil + + return RawTaskStepPropertiesImpl{ + taskStepProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepupdateparameters.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepupdateparameters.go index 3cb8d860474..fa368511fcf 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepupdateparameters.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/model_taskstepupdateparameters.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskStepUpdateParameters interface { + TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl } -// RawTaskStepUpdateParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskStepUpdateParameters = BaseTaskStepUpdateParametersImpl{} + +type BaseTaskStepUpdateParametersImpl struct { + ContextAccessToken *string `json:"contextAccessToken,omitempty"` + ContextPath *string `json:"contextPath,omitempty"` + Type StepType `json:"type"` +} + +func (s BaseTaskStepUpdateParametersImpl) TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl { + return s +} + +var _ TaskStepUpdateParameters = RawTaskStepUpdateParametersImpl{} + +// RawTaskStepUpdateParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskStepUpdateParametersImpl struct { - Type string - Values map[string]interface{} + taskStepUpdateParameters BaseTaskStepUpdateParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskStepUpdateParametersImpl) TaskStepUpdateParameters() BaseTaskStepUpdateParametersImpl { + return s.taskStepUpdateParameters } -func unmarshalTaskStepUpdateParametersImplementation(input []byte) (TaskStepUpdateParameters, error) { +func UnmarshalTaskStepUpdateParametersImplementation(input []byte) (TaskStepUpdateParameters, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalTaskStepUpdateParametersImplementation(input []byte) (TaskStepUpda return out, nil } - out := RawTaskStepUpdateParametersImpl{ - Type: value, - Values: temp, + var parent BaseTaskStepUpdateParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskStepUpdateParametersImpl: %+v", err) } - return out, nil + + return RawTaskStepUpdateParametersImpl{ + taskStepUpdateParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/containerregistry/2019-06-01-preview/tasks/version.go b/resource-manager/containerregistry/2019-06-01-preview/tasks/version.go index 331eb7bcbc9..32c2b1d97fe 100644 --- a/resource-manager/containerregistry/2019-06-01-preview/tasks/version.go +++ b/resource-manager/containerregistry/2019-06-01-preview/tasks/version.go @@ -1,12 +1,10 @@ package tasks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tasks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tasks/2019-06-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md index 8302ad05eeb..5c72a298aa7 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/connectedregistries` Documentation -The `connectedregistries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `connectedregistries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go index e91198e1cad..7580fc11c65 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/client.go @@ -15,7 +15,7 @@ type ConnectedRegistriesClient struct { } func NewConnectedRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedRegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedregistries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedregistries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedRegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go index 115af5e197d..ce56bf446f7 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_connectedregistry.go @@ -44,7 +44,7 @@ func ParseConnectedRegistryID(input string) (*ConnectedRegistryId, error) { } id := ConnectedRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedRegistryIDInsensitively(input string) (*ConnectedRegistryId, } id := ConnectedRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go index cfb0e000332..6985c4f471d 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go index 923fff7d903..4c81bf8b4b1 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedRegistriesClient) Get(ctx context.Context, id ConnectedRegistry var model ConnectedRegistry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go index cd37a551ab1..8bb816547bb 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go index cc9f341d808..685a516286f 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/connectedregistries/version.go @@ -1,12 +1,10 @@ package connectedregistries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedregistries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedregistries/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md index 5d20ae95075..9d05442f0ca 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/exportpipelines` Documentation -The `exportpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `exportpipelines` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go index c744a0df824..2762c473627 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/client.go @@ -15,7 +15,7 @@ type ExportPipelinesClient struct { } func NewExportPipelinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportPipelinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exportpipelines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exportpipelines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportPipelinesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go index 759d844ce6f..1aa4f767247 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_exportpipeline.go @@ -44,7 +44,7 @@ func ParseExportPipelineID(input string) (*ExportPipelineId, error) { } id := ExportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExportPipelineIDInsensitively(input string) (*ExportPipelineId, error) } id := ExportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go index 18b200c1131..14a2080b262 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go index 3b290aebdc5..fc95722aa94 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/method_get.go @@ -45,7 +45,6 @@ func (c ExportPipelinesClient) Get(ctx context.Context, id ExportPipelineId) (re var model ExportPipeline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go index 69d1fa978d6..4d997c42e5a 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/exportpipelines/version.go @@ -1,12 +1,10 @@ package exportpipelines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exportpipelines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exportpipelines/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md index 5388528c570..2d69f91074e 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/importpipelines` Documentation -The `importpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `importpipelines` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go index b761ac37d61..ef442ee8ef8 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/client.go @@ -15,7 +15,7 @@ type ImportPipelinesClient struct { } func NewImportPipelinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImportPipelinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "importpipelines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "importpipelines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImportPipelinesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go index 3f59946d3dc..a2309f62dc9 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_importpipeline.go @@ -44,7 +44,7 @@ func ParseImportPipelineID(input string) (*ImportPipelineId, error) { } id := ImportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImportPipelineIDInsensitively(input string) (*ImportPipelineId, error) } id := ImportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go index 1d176b670fa..bb724fe1b6e 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go index fe6128c1dfc..d392563356d 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/method_get.go @@ -45,7 +45,6 @@ func (c ImportPipelinesClient) Get(ctx context.Context, id ImportPipelineId) (re var model ImportPipeline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go index c79963ede2e..fc7b38b30c6 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/importpipelines/version.go @@ -1,12 +1,10 @@ package importpipelines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/importpipelines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/importpipelines/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/operation/README.md b/resource-manager/containerregistry/2021-08-01-preview/operation/README.md index 42ee0689f45..8d3b9601428 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/operation/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `operation` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/operation/client.go b/resource-manager/containerregistry/2021-08-01-preview/operation/client.go index bac3e788aaf..d7880ff0414 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/operation/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/operation/client.go @@ -15,7 +15,7 @@ type OperationClient struct { } func NewOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go b/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go index 975fa300016..971af5b4587 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go +++ b/resource-manager/containerregistry/2021-08-01-preview/operation/method_registrieschecknameavailability.go @@ -51,7 +51,6 @@ func (c OperationClient) RegistriesCheckNameAvailability(ctx context.Context, id var model RegistryNameStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/operation/version.go b/resource-manager/containerregistry/2021-08-01-preview/operation/version.go index 5b681b7a482..a317588eebe 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/operation/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md index 803a3e84616..a1890db21f9 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/pipelineruns` Documentation -The `pipelineruns` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `pipelineruns` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go index 72adfa237c8..f5e877b401a 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/client.go @@ -15,7 +15,7 @@ type PipelineRunsClient struct { } func NewPipelineRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*PipelineRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pipelineruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pipelineruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PipelineRunsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go index 24ad7e056d5..4eea41a3639 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_pipelinerun.go @@ -44,7 +44,7 @@ func ParsePipelineRunID(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePipelineRunIDInsensitively(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go index 7f91d9fbd7f..f95ae7900c5 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go index 7ab8d1c589d..572b20c19cd 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/method_get.go @@ -45,7 +45,6 @@ func (c PipelineRunsClient) Get(ctx context.Context, id PipelineRunId) (result G var model PipelineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go index ab774a9aec2..504746eb1f2 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/pipelineruns/version.go @@ -1,12 +1,10 @@ package pipelineruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pipelineruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pipelineruns/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md index 64e9856d3f6..19b38c353ca 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go index 3a5c1c4d378..5010fc9d4fc 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go index 109960059c4..c791705a6d4 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go index 5e5c6a92f9c..b3227619bc1 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/README.md b/resource-manager/containerregistry/2021-08-01-preview/registries/README.md index 0096cff1c94..5ad50663f17 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/registries` Documentation -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `registries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/client.go b/resource-manager/containerregistry/2021-08-01-preview/registries/client.go index f3defc5ecd2..19546ba8db3 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/client.go @@ -15,7 +15,7 @@ type RegistriesClient struct { } func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go index ced90cd79e7..913c0b47055 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go index bfd0c811921..35c99ecc4a6 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/method_get.go @@ -45,7 +45,6 @@ func (c RegistriesClient) Get(ctx context.Context, id RegistryId) (result GetOpe var model Registry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go b/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go index cc5f3f64da1..2c9ddf64535 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/method_listcredentials.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListCredentials(ctx context.Context, id RegistryId) (r var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go b/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go index 6a981aee267..d5f43985b7b 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/method_listusages.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListUsages(ctx context.Context, id RegistryId) (result var model RegistryUsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go b/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go index 4db46fb579b..03fa33af49d 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/method_regeneratecredential.go @@ -50,7 +50,6 @@ func (c RegistriesClient) RegenerateCredential(ctx context.Context, id RegistryI var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/registries/version.go b/resource-manager/containerregistry/2021-08-01-preview/registries/version.go index 6ed8387338d..f4a10d1fdd9 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/registries/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/registries/version.go @@ -1,12 +1,10 @@ package registries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registries/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/README.md b/resource-manager/containerregistry/2021-08-01-preview/replications/README.md index 86303f981a2..c1c41a2f558 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications` Documentation -The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `replications` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/client.go b/resource-manager/containerregistry/2021-08-01-preview/replications/client.go index 4cd118374ac..3728690aaae 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/client.go @@ -15,7 +15,7 @@ type ReplicationsClient struct { } func NewReplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go index 5aa993ef70c..c7dac5380a7 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go b/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go index 604cae9aead..afcafe2174f 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/id_replication.go @@ -44,7 +44,7 @@ func ParseReplicationID(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationIDInsensitively(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go index 13be12c7ca1..2e98060169b 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationsClient) Get(ctx context.Context, id ReplicationId) (result G var model Replication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/replications/version.go b/resource-manager/containerregistry/2021-08-01-preview/replications/version.go index 0e61e8237be..61af2e456f6 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/replications/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/replications/version.go @@ -1,12 +1,10 @@ package replications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replications/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md index cc4ef8bd91d..d65e350911d 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/scopemaps` Documentation -The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `scopemaps` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go index a5ac7bcecec..fe18db9d17a 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/client.go @@ -15,7 +15,7 @@ type ScopeMapsClient struct { } func NewScopeMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopemaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopemaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeMapsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go index 185bfc9501d..4847b872d62 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go index f70441f715a..73dbda53696 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/id_scopemap.go @@ -44,7 +44,7 @@ func ParseScopeMapID(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeMapIDInsensitively(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go index 48e684aa402..851cf9e9c46 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/method_get.go @@ -45,7 +45,6 @@ func (c ScopeMapsClient) Get(ctx context.Context, id ScopeMapId) (result GetOper var model ScopeMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go index 448fb16a706..f7859a1d17a 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/scopemaps/version.go @@ -1,12 +1,10 @@ package scopemaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopemaps/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md b/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md index f94bda6b5c7..ac2da29a070 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/tokens` Documentation -The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `tokens` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go b/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go index 11f08be868c..496fade07ad 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/client.go @@ -15,7 +15,7 @@ type TokensClient struct { } func NewTokensClientWithBaseURI(sdkApi sdkEnv.Api) (*TokensClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tokens", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tokens", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TokensClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go index fda07a2cc32..55926cf9271 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go b/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go index af095b01bde..8f6a3dcb276 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/id_token.go @@ -44,7 +44,7 @@ func ParseTokenID(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTokenIDInsensitively(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go index d7c6df407ba..6f07e5caa5a 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/method_get.go @@ -45,7 +45,6 @@ func (c TokensClient) Get(ctx context.Context, id TokenId) (result GetOperationR var model Token result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go b/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go index 11d47f6f178..28bdb67f7ec 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/tokens/version.go @@ -1,12 +1,10 @@ package tokens -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tokens/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md b/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md index 27d45490941..4acc2d00f37 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/webhooks` Documentation -The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2021-08-01-preview`). +The `webhooks` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2021-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go index b5da8564ffd..8fce4a9da49 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/client.go @@ -15,7 +15,7 @@ type WebHooksClient struct { } func NewWebHooksClientWithBaseURI(sdkApi sdkEnv.Api) (*WebHooksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webhooks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webhooks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebHooksClient: %+v", err) } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go index c878a6063dc..57dc3c732b0 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go index 72e5710069e..8ddc665879b 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/id_webhook.go @@ -44,7 +44,7 @@ func ParseWebHookID(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go index e89ea9db5db..dfb306899c1 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_get.go @@ -45,7 +45,6 @@ func (c WebHooksClient) Get(ctx context.Context, id WebHookId) (result GetOperat var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go index 17146c00e68..ecb3c8aded6 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_getcallbackconfig.go @@ -46,7 +46,6 @@ func (c WebHooksClient) GetCallbackConfig(ctx context.Context, id WebHookId) (re var model CallbackConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go index 04e4ef1fde7..a56359e2560 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/method_ping.go @@ -46,7 +46,6 @@ func (c WebHooksClient) Ping(ctx context.Context, id WebHookId) (result PingOper var model EventInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go b/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go index 062a8a5a6b4..b820206fe37 100644 --- a/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go +++ b/resource-manager/containerregistry/2021-08-01-preview/webhooks/version.go @@ -1,12 +1,10 @@ package webhooks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webhooks/2021-08-01-preview" } diff --git a/resource-manager/containerregistry/2022-12-01/operation/README.md b/resource-manager/containerregistry/2022-12-01/operation/README.md index 36792b8a85c..36fa94cf3f6 100644 --- a/resource-manager/containerregistry/2022-12-01/operation/README.md +++ b/resource-manager/containerregistry/2022-12-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/operation/client.go b/resource-manager/containerregistry/2022-12-01/operation/client.go index bac3e788aaf..d7880ff0414 100644 --- a/resource-manager/containerregistry/2022-12-01/operation/client.go +++ b/resource-manager/containerregistry/2022-12-01/operation/client.go @@ -15,7 +15,7 @@ type OperationClient struct { } func NewOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/operation/method_registrieschecknameavailability.go b/resource-manager/containerregistry/2022-12-01/operation/method_registrieschecknameavailability.go index 975fa300016..971af5b4587 100644 --- a/resource-manager/containerregistry/2022-12-01/operation/method_registrieschecknameavailability.go +++ b/resource-manager/containerregistry/2022-12-01/operation/method_registrieschecknameavailability.go @@ -51,7 +51,6 @@ func (c OperationClient) RegistriesCheckNameAvailability(ctx context.Context, id var model RegistryNameStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/operation/version.go b/resource-manager/containerregistry/2022-12-01/operation/version.go index dfdcdd48b6f..b0ee674130a 100644 --- a/resource-manager/containerregistry/2022-12-01/operation/version.go +++ b/resource-manager/containerregistry/2022-12-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/README.md b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/README.md index e4ed7e0da1f..f99a9f66ef1 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/README.md +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/client.go b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/client.go +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_privateendpointconnection.go index 3a5c1c4d378..5010fc9d4fc 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_registry.go b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_registry.go index 109960059c4..c791705a6d4 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/method_get.go b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/version.go b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/version.go index 243847de1cf..3a159e4762a 100644 --- a/resource-manager/containerregistry/2022-12-01/privateendpointconnections/version.go +++ b/resource-manager/containerregistry/2022-12-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/registries/README.md b/resource-manager/containerregistry/2022-12-01/registries/README.md index be35c1682c3..072a806061a 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/README.md +++ b/resource-manager/containerregistry/2022-12-01/registries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/registries` Documentation -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `registries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/registries/client.go b/resource-manager/containerregistry/2022-12-01/registries/client.go index f3defc5ecd2..19546ba8db3 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/client.go +++ b/resource-manager/containerregistry/2022-12-01/registries/client.go @@ -15,7 +15,7 @@ type RegistriesClient struct { } func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/registries/id_privatelinkresource.go b/resource-manager/containerregistry/2022-12-01/registries/id_privatelinkresource.go index ebf2b8bcac5..ea20c131b66 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/id_privatelinkresource.go +++ b/resource-manager/containerregistry/2022-12-01/registries/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/registries/id_registry.go b/resource-manager/containerregistry/2022-12-01/registries/id_registry.go index ced90cd79e7..913c0b47055 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/registries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/registries/method_get.go b/resource-manager/containerregistry/2022-12-01/registries/method_get.go index bfd0c811921..35c99ecc4a6 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/registries/method_get.go @@ -45,7 +45,6 @@ func (c RegistriesClient) Get(ctx context.Context, id RegistryId) (result GetOpe var model Registry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/registries/method_getprivatelinkresource.go b/resource-manager/containerregistry/2022-12-01/registries/method_getprivatelinkresource.go index 1f017340494..163aa93ca75 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/method_getprivatelinkresource.go +++ b/resource-manager/containerregistry/2022-12-01/registries/method_getprivatelinkresource.go @@ -45,7 +45,6 @@ func (c RegistriesClient) GetPrivateLinkResource(ctx context.Context, id Private var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/registries/method_listcredentials.go b/resource-manager/containerregistry/2022-12-01/registries/method_listcredentials.go index cc5f3f64da1..2c9ddf64535 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/method_listcredentials.go +++ b/resource-manager/containerregistry/2022-12-01/registries/method_listcredentials.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListCredentials(ctx context.Context, id RegistryId) (r var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/registries/method_listusages.go b/resource-manager/containerregistry/2022-12-01/registries/method_listusages.go index 6a981aee267..d5f43985b7b 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/method_listusages.go +++ b/resource-manager/containerregistry/2022-12-01/registries/method_listusages.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListUsages(ctx context.Context, id RegistryId) (result var model RegistryUsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/registries/method_regeneratecredential.go b/resource-manager/containerregistry/2022-12-01/registries/method_regeneratecredential.go index 4db46fb579b..03fa33af49d 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/method_regeneratecredential.go +++ b/resource-manager/containerregistry/2022-12-01/registries/method_regeneratecredential.go @@ -50,7 +50,6 @@ func (c RegistriesClient) RegenerateCredential(ctx context.Context, id RegistryI var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/registries/version.go b/resource-manager/containerregistry/2022-12-01/registries/version.go index bfe31e831fe..71753c12ef8 100644 --- a/resource-manager/containerregistry/2022-12-01/registries/version.go +++ b/resource-manager/containerregistry/2022-12-01/registries/version.go @@ -1,12 +1,10 @@ package registries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registries/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/replications/README.md b/resource-manager/containerregistry/2022-12-01/replications/README.md index 9301ecf4a52..c82e22deefe 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/README.md +++ b/resource-manager/containerregistry/2022-12-01/replications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/replications` Documentation -The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `replications` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/replications/client.go b/resource-manager/containerregistry/2022-12-01/replications/client.go index 4cd118374ac..3728690aaae 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/client.go +++ b/resource-manager/containerregistry/2022-12-01/replications/client.go @@ -15,7 +15,7 @@ type ReplicationsClient struct { } func NewReplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/replications/id_registry.go b/resource-manager/containerregistry/2022-12-01/replications/id_registry.go index 5aa993ef70c..c7dac5380a7 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/replications/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/replications/id_replication.go b/resource-manager/containerregistry/2022-12-01/replications/id_replication.go index 604cae9aead..afcafe2174f 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/id_replication.go +++ b/resource-manager/containerregistry/2022-12-01/replications/id_replication.go @@ -44,7 +44,7 @@ func ParseReplicationID(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationIDInsensitively(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/replications/method_get.go b/resource-manager/containerregistry/2022-12-01/replications/method_get.go index 13be12c7ca1..2e98060169b 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/replications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationsClient) Get(ctx context.Context, id ReplicationId) (result G var model Replication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/replications/version.go b/resource-manager/containerregistry/2022-12-01/replications/version.go index 347e807de1a..1d62990a223 100644 --- a/resource-manager/containerregistry/2022-12-01/replications/version.go +++ b/resource-manager/containerregistry/2022-12-01/replications/version.go @@ -1,12 +1,10 @@ package replications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replications/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/README.md b/resource-manager/containerregistry/2022-12-01/scopemaps/README.md index f92fee9104e..dcfaa794288 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/README.md +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/scopemaps` Documentation -The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `scopemaps` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/client.go b/resource-manager/containerregistry/2022-12-01/scopemaps/client.go index a5ac7bcecec..fe18db9d17a 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/client.go +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/client.go @@ -15,7 +15,7 @@ type ScopeMapsClient struct { } func NewScopeMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopemaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopemaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeMapsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/id_registry.go b/resource-manager/containerregistry/2022-12-01/scopemaps/id_registry.go index 185bfc9501d..4847b872d62 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/id_scopemap.go b/resource-manager/containerregistry/2022-12-01/scopemaps/id_scopemap.go index f70441f715a..73dbda53696 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/id_scopemap.go +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/id_scopemap.go @@ -44,7 +44,7 @@ func ParseScopeMapID(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeMapIDInsensitively(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/method_get.go b/resource-manager/containerregistry/2022-12-01/scopemaps/method_get.go index 48e684aa402..851cf9e9c46 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/method_get.go @@ -45,7 +45,6 @@ func (c ScopeMapsClient) Get(ctx context.Context, id ScopeMapId) (result GetOper var model ScopeMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/scopemaps/version.go b/resource-manager/containerregistry/2022-12-01/scopemaps/version.go index 609c25b13b0..181877d38e5 100644 --- a/resource-manager/containerregistry/2022-12-01/scopemaps/version.go +++ b/resource-manager/containerregistry/2022-12-01/scopemaps/version.go @@ -1,12 +1,10 @@ package scopemaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopemaps/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/tokens/README.md b/resource-manager/containerregistry/2022-12-01/tokens/README.md index c6d31e0a266..896f38d1a15 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/README.md +++ b/resource-manager/containerregistry/2022-12-01/tokens/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/tokens` Documentation -The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `tokens` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/tokens/client.go b/resource-manager/containerregistry/2022-12-01/tokens/client.go index 11f08be868c..496fade07ad 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/client.go +++ b/resource-manager/containerregistry/2022-12-01/tokens/client.go @@ -15,7 +15,7 @@ type TokensClient struct { } func NewTokensClientWithBaseURI(sdkApi sdkEnv.Api) (*TokensClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tokens", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tokens", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TokensClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/tokens/id_registry.go b/resource-manager/containerregistry/2022-12-01/tokens/id_registry.go index fda07a2cc32..55926cf9271 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/tokens/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/tokens/id_token.go b/resource-manager/containerregistry/2022-12-01/tokens/id_token.go index af095b01bde..8f6a3dcb276 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/id_token.go +++ b/resource-manager/containerregistry/2022-12-01/tokens/id_token.go @@ -44,7 +44,7 @@ func ParseTokenID(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTokenIDInsensitively(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/tokens/method_get.go b/resource-manager/containerregistry/2022-12-01/tokens/method_get.go index d7c6df407ba..6f07e5caa5a 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/tokens/method_get.go @@ -45,7 +45,6 @@ func (c TokensClient) Get(ctx context.Context, id TokenId) (result GetOperationR var model Token result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/tokens/version.go b/resource-manager/containerregistry/2022-12-01/tokens/version.go index 64a52d05cb4..027386b4265 100644 --- a/resource-manager/containerregistry/2022-12-01/tokens/version.go +++ b/resource-manager/containerregistry/2022-12-01/tokens/version.go @@ -1,12 +1,10 @@ package tokens -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tokens/2022-12-01" } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/README.md b/resource-manager/containerregistry/2022-12-01/webhooks/README.md index 9c35dbb940b..9b9129d9c3e 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/README.md +++ b/resource-manager/containerregistry/2022-12-01/webhooks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2022-12-01/webhooks` Documentation -The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2022-12-01`). +The `webhooks` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/client.go b/resource-manager/containerregistry/2022-12-01/webhooks/client.go index b5da8564ffd..8fce4a9da49 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/client.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/client.go @@ -15,7 +15,7 @@ type WebHooksClient struct { } func NewWebHooksClientWithBaseURI(sdkApi sdkEnv.Api) (*WebHooksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webhooks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webhooks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebHooksClient: %+v", err) } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/id_registry.go b/resource-manager/containerregistry/2022-12-01/webhooks/id_registry.go index c878a6063dc..57dc3c732b0 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/id_registry.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/id_webhook.go b/resource-manager/containerregistry/2022-12-01/webhooks/id_webhook.go index 72e5710069e..8ddc665879b 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/id_webhook.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/id_webhook.go @@ -44,7 +44,7 @@ func ParseWebHookID(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/method_get.go b/resource-manager/containerregistry/2022-12-01/webhooks/method_get.go index e89ea9db5db..dfb306899c1 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/method_get.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/method_get.go @@ -45,7 +45,6 @@ func (c WebHooksClient) Get(ctx context.Context, id WebHookId) (result GetOperat var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/method_getcallbackconfig.go b/resource-manager/containerregistry/2022-12-01/webhooks/method_getcallbackconfig.go index 17146c00e68..ecb3c8aded6 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/method_getcallbackconfig.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/method_getcallbackconfig.go @@ -46,7 +46,6 @@ func (c WebHooksClient) GetCallbackConfig(ctx context.Context, id WebHookId) (re var model CallbackConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/method_ping.go b/resource-manager/containerregistry/2022-12-01/webhooks/method_ping.go index 04e4ef1fde7..a56359e2560 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/method_ping.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/method_ping.go @@ -46,7 +46,6 @@ func (c WebHooksClient) Ping(ctx context.Context, id WebHookId) (result PingOper var model EventInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2022-12-01/webhooks/version.go b/resource-manager/containerregistry/2022-12-01/webhooks/version.go index f13602f7c37..437b60c703b 100644 --- a/resource-manager/containerregistry/2022-12-01/webhooks/version.go +++ b/resource-manager/containerregistry/2022-12-01/webhooks/version.go @@ -1,12 +1,10 @@ package webhooks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webhooks/2022-12-01" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/README.md b/resource-manager/containerregistry/2023-06-01-preview/archives/README.md index 21288c1293b..f36cce0e2c1 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archives` Documentation -The `archives` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `archives` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/client.go b/resource-manager/containerregistry/2023-06-01-preview/archives/client.go index b7c449dd3d1..76210037207 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/client.go @@ -15,7 +15,7 @@ type ArchivesClient struct { } func NewArchivesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArchivesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "archives", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "archives", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArchivesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go b/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go index 6f95c8d0cbc..9f72c2ed876 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/id_archive.go @@ -46,7 +46,7 @@ func ParseArchiveID(input string) (*ArchiveId, error) { } id := ArchiveId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArchiveIDInsensitively(input string) (*ArchiveId, error) { } id := ArchiveId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go b/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go index 20b128bda76..bfd4639d137 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/id_package.go @@ -44,7 +44,7 @@ func ParsePackageID(input string) (*PackageId, error) { } id := PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePackageIDInsensitively(input string) (*PackageId, error) { } id := PackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go index 70ccf688a3f..3d18cdfab3d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/method_get.go @@ -45,7 +45,6 @@ func (c ArchivesClient) Get(ctx context.Context, id ArchiveId) (result GetOperat var model Archive result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go b/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go index 7bcb8caaa98..3b32e4bd438 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/method_update.go @@ -49,7 +49,6 @@ func (c ArchivesClient) Update(ctx context.Context, id ArchiveId, input ArchiveU var model Archive result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archives/version.go b/resource-manager/containerregistry/2023-06-01-preview/archives/version.go index 5cbf3426585..2c486abe329 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archives/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archives/version.go @@ -1,12 +1,10 @@ package archives -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/archives/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/archives/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md index f836e5abeec..3b8944656b7 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/archiveversions` Documentation -The `archiveversions` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `archiveversions` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go index 2ac7d871ed3..cef30b31ebd 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/client.go @@ -15,7 +15,7 @@ type ArchiveVersionsClient struct { } func NewArchiveVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArchiveVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "archiveversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "archiveversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArchiveVersionsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go index aec038aac95..e05ab22cbd8 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_archive.go @@ -46,7 +46,7 @@ func ParseArchiveID(input string) (*ArchiveId, error) { } id := ArchiveId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArchiveIDInsensitively(input string) (*ArchiveId, error) { } id := ArchiveId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go index 25c4b7da7ed..ba2a3909d54 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go index 0e5cef42a8a..c4ca3d2dfc8 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/method_get.go @@ -45,7 +45,6 @@ func (c ArchiveVersionsClient) Get(ctx context.Context, id VersionId) (result Ge var model ArchiveVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go index ca8afaf5338..00a7e3cf69d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/archiveversions/version.go @@ -1,12 +1,10 @@ package archiveversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/archiveversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/archiveversions/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md b/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md index 84d0f73b142..d0a8c227d32 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/cacherules` Documentation -The `cacherules` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `cacherules` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go b/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go index 8a3c87e0787..d8e98c949c5 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/client.go @@ -15,7 +15,7 @@ type CacheRulesClient struct { } func NewCacheRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cacherules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cacherules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheRulesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go b/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go index 47244dd517b..9e3ec40ce44 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_cacherule.go @@ -44,7 +44,7 @@ func ParseCacheRuleID(input string) (*CacheRuleId, error) { } id := CacheRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheRuleIDInsensitively(input string) (*CacheRuleId, error) { } id := CacheRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go index e60010c55ea..14a868b9ca9 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go index 8514302dbc3..5934319965f 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/method_get.go @@ -45,7 +45,6 @@ func (c CacheRulesClient) Get(ctx context.Context, id CacheRuleId) (result GetOp var model CacheRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go b/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go index f6a78e9ea3f..b5f0f22edf0 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/cacherules/version.go @@ -1,12 +1,10 @@ package cacherules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cacherules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cacherules/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md index 6e446264d72..a944799fee7 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/connectedregistries` Documentation -The `connectedregistries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `connectedregistries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go index e91198e1cad..7580fc11c65 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/client.go @@ -15,7 +15,7 @@ type ConnectedRegistriesClient struct { } func NewConnectedRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedRegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedregistries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedregistries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedRegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go index 115af5e197d..ce56bf446f7 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_connectedregistry.go @@ -44,7 +44,7 @@ func ParseConnectedRegistryID(input string) (*ConnectedRegistryId, error) { } id := ConnectedRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectedRegistryIDInsensitively(input string) (*ConnectedRegistryId, } id := ConnectedRegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go index cfb0e000332..6985c4f471d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go index 923fff7d903..4c81bf8b4b1 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_get.go @@ -45,7 +45,6 @@ func (c ConnectedRegistriesClient) Get(ctx context.Context, id ConnectedRegistry var model ConnectedRegistry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go index cd37a551ab1..8bb816547bb 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go index f5fc55a547c..ebe2a9d7655 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/connectedregistries/version.go @@ -1,12 +1,10 @@ package connectedregistries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedregistries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedregistries/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md index a1c57db1526..7873e62468b 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/credentialsets` Documentation -The `credentialsets` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `credentialsets` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go index cb20ca22446..8a4cdeafb1a 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/client.go @@ -15,7 +15,7 @@ type CredentialSetsClient struct { } func NewCredentialSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credentialsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credentialsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialSetsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go index 2538c5cf311..32f67d3a9e2 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_credentialset.go @@ -44,7 +44,7 @@ func ParseCredentialSetID(input string) (*CredentialSetId, error) { } id := CredentialSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialSetIDInsensitively(input string) (*CredentialSetId, error) { } id := CredentialSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go index e688b3adba0..632a5bdeb58 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go index 83eef1b0ac5..65e3a16b9da 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/method_get.go @@ -45,7 +45,6 @@ func (c CredentialSetsClient) Get(ctx context.Context, id CredentialSetId) (resu var model CredentialSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go index 53062945849..e1198cc81ff 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/credentialsets/version.go @@ -1,12 +1,10 @@ package credentialsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credentialsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credentialsets/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md index d1508ce1bdd..3b8fd98b53a 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/exportpipelines` Documentation -The `exportpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `exportpipelines` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go index c744a0df824..2762c473627 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/client.go @@ -15,7 +15,7 @@ type ExportPipelinesClient struct { } func NewExportPipelinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportPipelinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exportpipelines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exportpipelines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportPipelinesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go index 759d844ce6f..1aa4f767247 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_exportpipeline.go @@ -44,7 +44,7 @@ func ParseExportPipelineID(input string) (*ExportPipelineId, error) { } id := ExportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExportPipelineIDInsensitively(input string) (*ExportPipelineId, error) } id := ExportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go index 18b200c1131..14a2080b262 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go index 3b290aebdc5..fc95722aa94 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/method_get.go @@ -45,7 +45,6 @@ func (c ExportPipelinesClient) Get(ctx context.Context, id ExportPipelineId) (re var model ExportPipeline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go index cac8701d42f..5e46014ffd2 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/exportpipelines/version.go @@ -1,12 +1,10 @@ package exportpipelines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exportpipelines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exportpipelines/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md index f506d237527..c8564501dce 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/importpipelines` Documentation -The `importpipelines` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `importpipelines` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go index b761ac37d61..ef442ee8ef8 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/client.go @@ -15,7 +15,7 @@ type ImportPipelinesClient struct { } func NewImportPipelinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImportPipelinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "importpipelines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "importpipelines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImportPipelinesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go index 3f59946d3dc..a2309f62dc9 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_importpipeline.go @@ -44,7 +44,7 @@ func ParseImportPipelineID(input string) (*ImportPipelineId, error) { } id := ImportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImportPipelineIDInsensitively(input string) (*ImportPipelineId, error) } id := ImportPipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go index 1d176b670fa..bb724fe1b6e 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go index fe6128c1dfc..d392563356d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/method_get.go @@ -45,7 +45,6 @@ func (c ImportPipelinesClient) Get(ctx context.Context, id ImportPipelineId) (re var model ImportPipeline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go index 3113dada4e4..7d8ca3a4442 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/importpipelines/version.go @@ -1,12 +1,10 @@ package importpipelines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/importpipelines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/importpipelines/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/operation/README.md b/resource-manager/containerregistry/2023-06-01-preview/operation/README.md index 92b636a428a..45fb225fd7d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/operation/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `operation` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/operation/client.go b/resource-manager/containerregistry/2023-06-01-preview/operation/client.go index bac3e788aaf..d7880ff0414 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/operation/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/operation/client.go @@ -15,7 +15,7 @@ type OperationClient struct { } func NewOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go b/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go index 975fa300016..971af5b4587 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go +++ b/resource-manager/containerregistry/2023-06-01-preview/operation/method_registrieschecknameavailability.go @@ -51,7 +51,6 @@ func (c OperationClient) RegistriesCheckNameAvailability(ctx context.Context, id var model RegistryNameStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/operation/version.go b/resource-manager/containerregistry/2023-06-01-preview/operation/version.go index 1acd5e6016d..5773e304691 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/operation/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md index 3125c4cefce..04ca4e758a1 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/pipelineruns` Documentation -The `pipelineruns` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `pipelineruns` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go index 72adfa237c8..f5e877b401a 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/client.go @@ -15,7 +15,7 @@ type PipelineRunsClient struct { } func NewPipelineRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*PipelineRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pipelineruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pipelineruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PipelineRunsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go index 24ad7e056d5..4eea41a3639 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_pipelinerun.go @@ -44,7 +44,7 @@ func ParsePipelineRunID(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePipelineRunIDInsensitively(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go index 7f91d9fbd7f..f95ae7900c5 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go index 7ab8d1c589d..572b20c19cd 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/method_get.go @@ -45,7 +45,6 @@ func (c PipelineRunsClient) Get(ctx context.Context, id PipelineRunId) (result G var model PipelineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go index c54632b8e63..ab18db63427 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/pipelineruns/version.go @@ -1,12 +1,10 @@ package pipelineruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pipelineruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pipelineruns/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md index b213fe8fea5..228d8dc0bf0 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go index 3a5c1c4d378..5010fc9d4fc 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go index 109960059c4..c791705a6d4 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go index e5b68d8d6ce..88b36253fd4 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/README.md b/resource-manager/containerregistry/2023-06-01-preview/registries/README.md index d9e0e20a5bf..32f7aff3e32 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/registries` Documentation -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `registries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/client.go b/resource-manager/containerregistry/2023-06-01-preview/registries/client.go index f3defc5ecd2..19546ba8db3 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/client.go @@ -15,7 +15,7 @@ type RegistriesClient struct { } func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go b/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go index ebf2b8bcac5..ea20c131b66 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go index ced90cd79e7..913c0b47055 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go index bfd0c811921..35c99ecc4a6 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/method_get.go @@ -45,7 +45,6 @@ func (c RegistriesClient) Get(ctx context.Context, id RegistryId) (result GetOpe var model Registry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go b/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go index 1f017340494..163aa93ca75 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/method_getprivatelinkresource.go @@ -45,7 +45,6 @@ func (c RegistriesClient) GetPrivateLinkResource(ctx context.Context, id Private var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go b/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go index cc5f3f64da1..2c9ddf64535 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/method_listcredentials.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListCredentials(ctx context.Context, id RegistryId) (r var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go b/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go index 6a981aee267..d5f43985b7b 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/method_listusages.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListUsages(ctx context.Context, id RegistryId) (result var model RegistryUsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go b/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go index 4db46fb579b..03fa33af49d 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/method_regeneratecredential.go @@ -50,7 +50,6 @@ func (c RegistriesClient) RegenerateCredential(ctx context.Context, id RegistryI var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/registries/version.go b/resource-manager/containerregistry/2023-06-01-preview/registries/version.go index 957d6ac0c4d..258ae6e679f 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/registries/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/registries/version.go @@ -1,12 +1,10 @@ package registries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registries/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/README.md b/resource-manager/containerregistry/2023-06-01-preview/replications/README.md index e049f7af4fa..c08ca2a2382 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/replications` Documentation -The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `replications` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/client.go b/resource-manager/containerregistry/2023-06-01-preview/replications/client.go index 4cd118374ac..3728690aaae 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/client.go @@ -15,7 +15,7 @@ type ReplicationsClient struct { } func NewReplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go index 5aa993ef70c..c7dac5380a7 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go b/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go index 604cae9aead..afcafe2174f 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/id_replication.go @@ -44,7 +44,7 @@ func ParseReplicationID(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationIDInsensitively(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go index 13be12c7ca1..2e98060169b 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationsClient) Get(ctx context.Context, id ReplicationId) (result G var model Replication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/replications/version.go b/resource-manager/containerregistry/2023-06-01-preview/replications/version.go index f38e9ca9c28..a42b723ef15 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/replications/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/replications/version.go @@ -1,12 +1,10 @@ package replications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replications/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md index 233535ccd6f..58f83a88274 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/scopemaps` Documentation -The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `scopemaps` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go index a5ac7bcecec..fe18db9d17a 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/client.go @@ -15,7 +15,7 @@ type ScopeMapsClient struct { } func NewScopeMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopemaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopemaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeMapsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go index 185bfc9501d..4847b872d62 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go index f70441f715a..73dbda53696 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/id_scopemap.go @@ -44,7 +44,7 @@ func ParseScopeMapID(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeMapIDInsensitively(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go index 48e684aa402..851cf9e9c46 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/method_get.go @@ -45,7 +45,6 @@ func (c ScopeMapsClient) Get(ctx context.Context, id ScopeMapId) (result GetOper var model ScopeMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go index 4b3c2a8619f..3ab06ed5ce2 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/scopemaps/version.go @@ -1,12 +1,10 @@ package scopemaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopemaps/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md b/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md index 4b40948e9b7..ebf52de4f51 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/tokens` Documentation -The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `tokens` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go b/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go index 11f08be868c..496fade07ad 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/client.go @@ -15,7 +15,7 @@ type TokensClient struct { } func NewTokensClientWithBaseURI(sdkApi sdkEnv.Api) (*TokensClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tokens", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tokens", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TokensClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go index fda07a2cc32..55926cf9271 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go b/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go index af095b01bde..8f6a3dcb276 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/id_token.go @@ -44,7 +44,7 @@ func ParseTokenID(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTokenIDInsensitively(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go index d7c6df407ba..6f07e5caa5a 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/method_get.go @@ -45,7 +45,6 @@ func (c TokensClient) Get(ctx context.Context, id TokenId) (result GetOperationR var model Token result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go b/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go index b2dfc439841..c4025a2aae2 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/tokens/version.go @@ -1,12 +1,10 @@ package tokens -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tokens/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md b/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md index 9062845286b..9b981f767d2 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-06-01-preview/webhooks` Documentation -The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-06-01-preview`). +The `webhooks` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go index b5da8564ffd..8fce4a9da49 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/client.go @@ -15,7 +15,7 @@ type WebHooksClient struct { } func NewWebHooksClientWithBaseURI(sdkApi sdkEnv.Api) (*WebHooksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webhooks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webhooks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebHooksClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go index c878a6063dc..57dc3c732b0 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go index 72e5710069e..8ddc665879b 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/id_webhook.go @@ -44,7 +44,7 @@ func ParseWebHookID(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go index e89ea9db5db..dfb306899c1 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_get.go @@ -45,7 +45,6 @@ func (c WebHooksClient) Get(ctx context.Context, id WebHookId) (result GetOperat var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go index 17146c00e68..ecb3c8aded6 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_getcallbackconfig.go @@ -46,7 +46,6 @@ func (c WebHooksClient) GetCallbackConfig(ctx context.Context, id WebHookId) (re var model CallbackConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go index 04e4ef1fde7..a56359e2560 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/method_ping.go @@ -46,7 +46,6 @@ func (c WebHooksClient) Ping(ctx context.Context, id WebHookId) (result PingOper var model EventInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go b/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go index 1a86c1789a8..ba43fa1c37b 100644 --- a/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go +++ b/resource-manager/containerregistry/2023-06-01-preview/webhooks/version.go @@ -1,12 +1,10 @@ package webhooks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webhooks/2023-06-01-preview" } diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/README.md b/resource-manager/containerregistry/2023-07-01/cacherules/README.md index c3a022566c9..d67dfa1943e 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/README.md +++ b/resource-manager/containerregistry/2023-07-01/cacherules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/cacherules` Documentation -The `cacherules` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `cacherules` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/client.go b/resource-manager/containerregistry/2023-07-01/cacherules/client.go index 8a3c87e0787..d8e98c949c5 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/client.go +++ b/resource-manager/containerregistry/2023-07-01/cacherules/client.go @@ -15,7 +15,7 @@ type CacheRulesClient struct { } func NewCacheRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*CacheRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cacherules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cacherules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CacheRulesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/id_cacherule.go b/resource-manager/containerregistry/2023-07-01/cacherules/id_cacherule.go index 47244dd517b..9e3ec40ce44 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/id_cacherule.go +++ b/resource-manager/containerregistry/2023-07-01/cacherules/id_cacherule.go @@ -44,7 +44,7 @@ func ParseCacheRuleID(input string) (*CacheRuleId, error) { } id := CacheRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCacheRuleIDInsensitively(input string) (*CacheRuleId, error) { } id := CacheRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/id_registry.go b/resource-manager/containerregistry/2023-07-01/cacherules/id_registry.go index e60010c55ea..14a868b9ca9 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/cacherules/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/method_get.go b/resource-manager/containerregistry/2023-07-01/cacherules/method_get.go index 8514302dbc3..5934319965f 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/cacherules/method_get.go @@ -45,7 +45,6 @@ func (c CacheRulesClient) Get(ctx context.Context, id CacheRuleId) (result GetOp var model CacheRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/cacherules/version.go b/resource-manager/containerregistry/2023-07-01/cacherules/version.go index 92ef098585d..0aabb120cea 100644 --- a/resource-manager/containerregistry/2023-07-01/cacherules/version.go +++ b/resource-manager/containerregistry/2023-07-01/cacherules/version.go @@ -1,12 +1,10 @@ package cacherules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cacherules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cacherules/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/README.md b/resource-manager/containerregistry/2023-07-01/credentialsets/README.md index 1928c694ff7..0ea487f20bb 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/README.md +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/credentialsets` Documentation -The `credentialsets` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `credentialsets` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/client.go b/resource-manager/containerregistry/2023-07-01/credentialsets/client.go index cb20ca22446..8a4cdeafb1a 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/client.go +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/client.go @@ -15,7 +15,7 @@ type CredentialSetsClient struct { } func NewCredentialSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credentialsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credentialsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialSetsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/id_credentialset.go b/resource-manager/containerregistry/2023-07-01/credentialsets/id_credentialset.go index 2538c5cf311..32f67d3a9e2 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/id_credentialset.go +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/id_credentialset.go @@ -44,7 +44,7 @@ func ParseCredentialSetID(input string) (*CredentialSetId, error) { } id := CredentialSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialSetIDInsensitively(input string) (*CredentialSetId, error) { } id := CredentialSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/id_registry.go b/resource-manager/containerregistry/2023-07-01/credentialsets/id_registry.go index e688b3adba0..632a5bdeb58 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/method_get.go b/resource-manager/containerregistry/2023-07-01/credentialsets/method_get.go index 83eef1b0ac5..65e3a16b9da 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/method_get.go @@ -45,7 +45,6 @@ func (c CredentialSetsClient) Get(ctx context.Context, id CredentialSetId) (resu var model CredentialSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/credentialsets/version.go b/resource-manager/containerregistry/2023-07-01/credentialsets/version.go index 51ea87a3966..a9c3c9e84ce 100644 --- a/resource-manager/containerregistry/2023-07-01/credentialsets/version.go +++ b/resource-manager/containerregistry/2023-07-01/credentialsets/version.go @@ -1,12 +1,10 @@ package credentialsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credentialsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credentialsets/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/operation/README.md b/resource-manager/containerregistry/2023-07-01/operation/README.md index edfbd6ac3db..6b5e3ce85bd 100644 --- a/resource-manager/containerregistry/2023-07-01/operation/README.md +++ b/resource-manager/containerregistry/2023-07-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/operation/client.go b/resource-manager/containerregistry/2023-07-01/operation/client.go index bac3e788aaf..d7880ff0414 100644 --- a/resource-manager/containerregistry/2023-07-01/operation/client.go +++ b/resource-manager/containerregistry/2023-07-01/operation/client.go @@ -15,7 +15,7 @@ type OperationClient struct { } func NewOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/operation/method_registrieschecknameavailability.go b/resource-manager/containerregistry/2023-07-01/operation/method_registrieschecknameavailability.go index 975fa300016..971af5b4587 100644 --- a/resource-manager/containerregistry/2023-07-01/operation/method_registrieschecknameavailability.go +++ b/resource-manager/containerregistry/2023-07-01/operation/method_registrieschecknameavailability.go @@ -51,7 +51,6 @@ func (c OperationClient) RegistriesCheckNameAvailability(ctx context.Context, id var model RegistryNameStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/operation/version.go b/resource-manager/containerregistry/2023-07-01/operation/version.go index 1fb535b7cd2..7e395f1b4fd 100644 --- a/resource-manager/containerregistry/2023-07-01/operation/version.go +++ b/resource-manager/containerregistry/2023-07-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/README.md b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/README.md index d2d94fd16c9..caa3af04f68 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/README.md +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/client.go b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/client.go +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_privateendpointconnection.go index 3a5c1c4d378..5010fc9d4fc 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_registry.go b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_registry.go index 109960059c4..c791705a6d4 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/method_get.go b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/version.go b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/version.go index 35cb9c96d6d..3216474b9d5 100644 --- a/resource-manager/containerregistry/2023-07-01/privateendpointconnections/version.go +++ b/resource-manager/containerregistry/2023-07-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/registries/README.md b/resource-manager/containerregistry/2023-07-01/registries/README.md index 5e8f78ccc90..2cef4881ac1 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/README.md +++ b/resource-manager/containerregistry/2023-07-01/registries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/registries` Documentation -The `registries` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `registries` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/registries/client.go b/resource-manager/containerregistry/2023-07-01/registries/client.go index f3defc5ecd2..19546ba8db3 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/client.go +++ b/resource-manager/containerregistry/2023-07-01/registries/client.go @@ -15,7 +15,7 @@ type RegistriesClient struct { } func NewRegistriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistriesClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/registries/id_privatelinkresource.go b/resource-manager/containerregistry/2023-07-01/registries/id_privatelinkresource.go index ebf2b8bcac5..ea20c131b66 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/id_privatelinkresource.go +++ b/resource-manager/containerregistry/2023-07-01/registries/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/registries/id_registry.go b/resource-manager/containerregistry/2023-07-01/registries/id_registry.go index ced90cd79e7..913c0b47055 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/registries/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/registries/method_get.go b/resource-manager/containerregistry/2023-07-01/registries/method_get.go index bfd0c811921..35c99ecc4a6 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/registries/method_get.go @@ -45,7 +45,6 @@ func (c RegistriesClient) Get(ctx context.Context, id RegistryId) (result GetOpe var model Registry result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/registries/method_getprivatelinkresource.go b/resource-manager/containerregistry/2023-07-01/registries/method_getprivatelinkresource.go index 1f017340494..163aa93ca75 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/method_getprivatelinkresource.go +++ b/resource-manager/containerregistry/2023-07-01/registries/method_getprivatelinkresource.go @@ -45,7 +45,6 @@ func (c RegistriesClient) GetPrivateLinkResource(ctx context.Context, id Private var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/registries/method_listcredentials.go b/resource-manager/containerregistry/2023-07-01/registries/method_listcredentials.go index cc5f3f64da1..2c9ddf64535 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/method_listcredentials.go +++ b/resource-manager/containerregistry/2023-07-01/registries/method_listcredentials.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListCredentials(ctx context.Context, id RegistryId) (r var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/registries/method_listusages.go b/resource-manager/containerregistry/2023-07-01/registries/method_listusages.go index 6a981aee267..d5f43985b7b 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/method_listusages.go +++ b/resource-manager/containerregistry/2023-07-01/registries/method_listusages.go @@ -46,7 +46,6 @@ func (c RegistriesClient) ListUsages(ctx context.Context, id RegistryId) (result var model RegistryUsageListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/registries/method_regeneratecredential.go b/resource-manager/containerregistry/2023-07-01/registries/method_regeneratecredential.go index 4db46fb579b..03fa33af49d 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/method_regeneratecredential.go +++ b/resource-manager/containerregistry/2023-07-01/registries/method_regeneratecredential.go @@ -50,7 +50,6 @@ func (c RegistriesClient) RegenerateCredential(ctx context.Context, id RegistryI var model RegistryListCredentialsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/registries/version.go b/resource-manager/containerregistry/2023-07-01/registries/version.go index 4bb3fc9fbc7..e82f5067884 100644 --- a/resource-manager/containerregistry/2023-07-01/registries/version.go +++ b/resource-manager/containerregistry/2023-07-01/registries/version.go @@ -1,12 +1,10 @@ package registries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registries/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/replications/README.md b/resource-manager/containerregistry/2023-07-01/replications/README.md index a972471d00c..f99a1200e36 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/README.md +++ b/resource-manager/containerregistry/2023-07-01/replications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/replications` Documentation -The `replications` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `replications` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/replications/client.go b/resource-manager/containerregistry/2023-07-01/replications/client.go index 4cd118374ac..3728690aaae 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/client.go +++ b/resource-manager/containerregistry/2023-07-01/replications/client.go @@ -15,7 +15,7 @@ type ReplicationsClient struct { } func NewReplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/replications/id_registry.go b/resource-manager/containerregistry/2023-07-01/replications/id_registry.go index 5aa993ef70c..c7dac5380a7 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/replications/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/replications/id_replication.go b/resource-manager/containerregistry/2023-07-01/replications/id_replication.go index 604cae9aead..afcafe2174f 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/id_replication.go +++ b/resource-manager/containerregistry/2023-07-01/replications/id_replication.go @@ -44,7 +44,7 @@ func ParseReplicationID(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationIDInsensitively(input string) (*ReplicationId, error) { } id := ReplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/replications/method_get.go b/resource-manager/containerregistry/2023-07-01/replications/method_get.go index 13be12c7ca1..2e98060169b 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/replications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationsClient) Get(ctx context.Context, id ReplicationId) (result G var model Replication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/replications/version.go b/resource-manager/containerregistry/2023-07-01/replications/version.go index 9d09e1d982c..c421e783b6c 100644 --- a/resource-manager/containerregistry/2023-07-01/replications/version.go +++ b/resource-manager/containerregistry/2023-07-01/replications/version.go @@ -1,12 +1,10 @@ package replications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replications/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/README.md b/resource-manager/containerregistry/2023-07-01/scopemaps/README.md index d5bb9fb1213..b450611f807 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/README.md +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/scopemaps` Documentation -The `scopemaps` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `scopemaps` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/client.go b/resource-manager/containerregistry/2023-07-01/scopemaps/client.go index a5ac7bcecec..fe18db9d17a 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/client.go +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/client.go @@ -15,7 +15,7 @@ type ScopeMapsClient struct { } func NewScopeMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopemaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopemaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeMapsClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/id_registry.go b/resource-manager/containerregistry/2023-07-01/scopemaps/id_registry.go index 185bfc9501d..4847b872d62 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/id_scopemap.go b/resource-manager/containerregistry/2023-07-01/scopemaps/id_scopemap.go index f70441f715a..73dbda53696 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/id_scopemap.go +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/id_scopemap.go @@ -44,7 +44,7 @@ func ParseScopeMapID(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeMapIDInsensitively(input string) (*ScopeMapId, error) { } id := ScopeMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/method_get.go b/resource-manager/containerregistry/2023-07-01/scopemaps/method_get.go index 48e684aa402..851cf9e9c46 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/method_get.go @@ -45,7 +45,6 @@ func (c ScopeMapsClient) Get(ctx context.Context, id ScopeMapId) (result GetOper var model ScopeMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/scopemaps/version.go b/resource-manager/containerregistry/2023-07-01/scopemaps/version.go index 567a42d9286..09439eb009d 100644 --- a/resource-manager/containerregistry/2023-07-01/scopemaps/version.go +++ b/resource-manager/containerregistry/2023-07-01/scopemaps/version.go @@ -1,12 +1,10 @@ package scopemaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopemaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopemaps/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/tokens/README.md b/resource-manager/containerregistry/2023-07-01/tokens/README.md index 35c41d68b72..818c023a3f2 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/README.md +++ b/resource-manager/containerregistry/2023-07-01/tokens/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/tokens` Documentation -The `tokens` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `tokens` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/tokens/client.go b/resource-manager/containerregistry/2023-07-01/tokens/client.go index 11f08be868c..496fade07ad 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/client.go +++ b/resource-manager/containerregistry/2023-07-01/tokens/client.go @@ -15,7 +15,7 @@ type TokensClient struct { } func NewTokensClientWithBaseURI(sdkApi sdkEnv.Api) (*TokensClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tokens", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tokens", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TokensClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/tokens/id_registry.go b/resource-manager/containerregistry/2023-07-01/tokens/id_registry.go index fda07a2cc32..55926cf9271 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/tokens/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/tokens/id_token.go b/resource-manager/containerregistry/2023-07-01/tokens/id_token.go index af095b01bde..8f6a3dcb276 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/id_token.go +++ b/resource-manager/containerregistry/2023-07-01/tokens/id_token.go @@ -44,7 +44,7 @@ func ParseTokenID(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTokenIDInsensitively(input string) (*TokenId, error) { } id := TokenId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/tokens/method_get.go b/resource-manager/containerregistry/2023-07-01/tokens/method_get.go index d7c6df407ba..6f07e5caa5a 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/tokens/method_get.go @@ -45,7 +45,6 @@ func (c TokensClient) Get(ctx context.Context, id TokenId) (result GetOperationR var model Token result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/tokens/version.go b/resource-manager/containerregistry/2023-07-01/tokens/version.go index 9b11230b9b8..4bfb7e348ff 100644 --- a/resource-manager/containerregistry/2023-07-01/tokens/version.go +++ b/resource-manager/containerregistry/2023-07-01/tokens/version.go @@ -1,12 +1,10 @@ package tokens -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tokens/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tokens/2023-07-01" } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/README.md b/resource-manager/containerregistry/2023-07-01/webhooks/README.md index 201c6990d07..2019b193b26 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/README.md +++ b/resource-manager/containerregistry/2023-07-01/webhooks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/webhooks` Documentation -The `webhooks` SDK allows for interaction with the Azure Resource Manager Service `containerregistry` (API Version `2023-07-01`). +The `webhooks` SDK allows for interaction with Azure Resource Manager `containerregistry` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/client.go b/resource-manager/containerregistry/2023-07-01/webhooks/client.go index b5da8564ffd..8fce4a9da49 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/client.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/client.go @@ -15,7 +15,7 @@ type WebHooksClient struct { } func NewWebHooksClientWithBaseURI(sdkApi sdkEnv.Api) (*WebHooksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webhooks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webhooks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebHooksClient: %+v", err) } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/id_registry.go b/resource-manager/containerregistry/2023-07-01/webhooks/id_registry.go index c878a6063dc..57dc3c732b0 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/id_registry.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/id_webhook.go b/resource-manager/containerregistry/2023-07-01/webhooks/id_webhook.go index 72e5710069e..8ddc665879b 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/id_webhook.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/id_webhook.go @@ -44,7 +44,7 @@ func ParseWebHookID(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebHookIDInsensitively(input string) (*WebHookId, error) { } id := WebHookId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/method_get.go b/resource-manager/containerregistry/2023-07-01/webhooks/method_get.go index e89ea9db5db..dfb306899c1 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/method_get.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/method_get.go @@ -45,7 +45,6 @@ func (c WebHooksClient) Get(ctx context.Context, id WebHookId) (result GetOperat var model Webhook result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/method_getcallbackconfig.go b/resource-manager/containerregistry/2023-07-01/webhooks/method_getcallbackconfig.go index 17146c00e68..ecb3c8aded6 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/method_getcallbackconfig.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/method_getcallbackconfig.go @@ -46,7 +46,6 @@ func (c WebHooksClient) GetCallbackConfig(ctx context.Context, id WebHookId) (re var model CallbackConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/method_ping.go b/resource-manager/containerregistry/2023-07-01/webhooks/method_ping.go index 04e4ef1fde7..a56359e2560 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/method_ping.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/method_ping.go @@ -46,7 +46,6 @@ func (c WebHooksClient) Ping(ctx context.Context, id WebHookId) (result PingOper var model EventInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerregistry/2023-07-01/webhooks/version.go b/resource-manager/containerregistry/2023-07-01/webhooks/version.go index 2b33962a2b0..d1a3817f84c 100644 --- a/resource-manager/containerregistry/2023-07-01/webhooks/version.go +++ b/resource-manager/containerregistry/2023-07-01/webhooks/version.go @@ -1,12 +1,10 @@ package webhooks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webhooks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webhooks/2023-07-01" } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/README.md b/resource-manager/containerservice/2019-08-01/agentpools/README.md index 22f1a8e012c..898f06a607a 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/README.md +++ b/resource-manager/containerservice/2019-08-01/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2019-08-01`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2019-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2019-08-01/agentpools/client.go b/resource-manager/containerservice/2019-08-01/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/client.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/id_agentpool.go b/resource-manager/containerservice/2019-08-01/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/method_get.go b/resource-manager/containerservice/2019-08-01/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/method_get.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2019-08-01/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2019-08-01/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/agentpools/version.go b/resource-manager/containerservice/2019-08-01/agentpools/version.go index 746dd1e04ac..686a234f225 100644 --- a/resource-manager/containerservice/2019-08-01/agentpools/version.go +++ b/resource-manager/containerservice/2019-08-01/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2019-08-01" } diff --git a/resource-manager/containerservice/2019-08-01/containerservices/README.md b/resource-manager/containerservice/2019-08-01/containerservices/README.md index 0930a3f061d..e5c0015d276 100644 --- a/resource-manager/containerservice/2019-08-01/containerservices/README.md +++ b/resource-manager/containerservice/2019-08-01/containerservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/containerservices` Documentation -The `containerservices` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2019-08-01`). +The `containerservices` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2019-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2019-08-01/containerservices/client.go b/resource-manager/containerservice/2019-08-01/containerservices/client.go index dbb918e99a6..e893c4d57a4 100644 --- a/resource-manager/containerservice/2019-08-01/containerservices/client.go +++ b/resource-manager/containerservice/2019-08-01/containerservices/client.go @@ -15,7 +15,7 @@ type ContainerServicesClient struct { } func NewContainerServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerServicesClient: %+v", err) } diff --git a/resource-manager/containerservice/2019-08-01/containerservices/id_location.go b/resource-manager/containerservice/2019-08-01/containerservices/id_location.go index 40ba667266c..af9637b18ad 100644 --- a/resource-manager/containerservice/2019-08-01/containerservices/id_location.go +++ b/resource-manager/containerservice/2019-08-01/containerservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2019-08-01/containerservices/method_listorchestrators.go b/resource-manager/containerservice/2019-08-01/containerservices/method_listorchestrators.go index 9940d416c04..93e73859b64 100644 --- a/resource-manager/containerservice/2019-08-01/containerservices/method_listorchestrators.go +++ b/resource-manager/containerservice/2019-08-01/containerservices/method_listorchestrators.go @@ -34,6 +34,7 @@ func (o ListOrchestratorsOperationOptions) ToHeaders() *client.Headers { func (o ListOrchestratorsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ContainerServicesClient) ListOrchestrators(ctx context.Context, id Locat var model OrchestratorVersionProfileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/containerservices/version.go b/resource-manager/containerservice/2019-08-01/containerservices/version.go index b89b4c90531..69b5d00acc8 100644 --- a/resource-manager/containerservice/2019-08-01/containerservices/version.go +++ b/resource-manager/containerservice/2019-08-01/containerservices/version.go @@ -1,12 +1,10 @@ package containerservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerservices/2019-08-01" } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/README.md b/resource-manager/containerservice/2019-08-01/managedclusters/README.md index 0d697eeedb8..7725a746cb0 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/README.md +++ b/resource-manager/containerservice/2019-08-01/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2019-08-01/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2019-08-01`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2019-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/client.go b/resource-manager/containerservice/2019-08-01/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/client.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2019-08-01/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/method_get.go b/resource-manager/containerservice/2019-08-01/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/method_get.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2019-08-01/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2019-08-01/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusteradmincredentials.go index 5a8bd16bfd5..f01d2cd7190 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusteradmincredentials.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusterusercredentials.go index db4fc0dd6d0..fdf384e92d6 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/method_listclusterusercredentials.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2019-08-01/managedclusters/version.go b/resource-manager/containerservice/2019-08-01/managedclusters/version.go index b8c08483f3d..a671689fab9 100644 --- a/resource-manager/containerservice/2019-08-01/managedclusters/version.go +++ b/resource-manager/containerservice/2019-08-01/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2019-08-01" } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/README.md b/resource-manager/containerservice/2023-03-02-preview/agentpools/README.md index aaacb5c5e48..28c9cd3b4c7 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/client.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_delete.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_delete.go index 4943dd2d43e..046bdd6d7b3 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_delete.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_get.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/agentpools/version.go b/resource-manager/containerservice/2023-03-02-preview/agentpools/version.go index 80d44b191e2..10075230c05 100644 --- a/resource-manager/containerservice/2023-03-02-preview/agentpools/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/README.md b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/README.md index 10bf032259c..4b528e2631d 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/client.go b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_createorupdate.go index 726183cac89..17459f461eb 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_createorupdate.go @@ -49,7 +49,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/version.go b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/version.go index e9ccc7096d9..ebe3bbacc1d 100644 --- a/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/README.md b/resource-manager/containerservice/2023-03-02-preview/managedclusters/README.md index e8afcddb3b8..099c5717d5b 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/client.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_delete.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_delete.go index d7cee216475..5fe68bf23ab 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_delete.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_get.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclusters/version.go b/resource-manager/containerservice/2023-03-02-preview/managedclusters/version.go index 321a7a0eed7..3c0434fe0c0 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclusters/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/README.md b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/README.md index 9dff4dbe26d..b9eb4d9c562 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots` Documentation -The `managedclustersnapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `managedclustersnapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/client.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/client.go index 939ebd0b984..87f79ccf563 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/client.go @@ -15,7 +15,7 @@ type ManagedClusterSnapshotsClient struct { } func NewManagedClusterSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterSnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclustersnapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclustersnapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterSnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go index bd22899cf08..9c514f089d6 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/id_managedclustersnapshot.go @@ -42,7 +42,7 @@ func ParseManagedClusterSnapshotID(input string) (*ManagedClusterSnapshotId, err } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterSnapshotIDInsensitively(input string) (*ManagedClusterSn } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_createorupdate.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_createorupdate.go index 1041144ec50..1d79274192e 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ManagedClusterSnapshotsClient) CreateOrUpdate(ctx context.Context, id Ma var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_get.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_get.go index ead8643d9dc..3b0b9a991fa 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterSnapshotsClient) Get(ctx context.Context, id ManagedCluste var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_updatetags.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_updatetags.go index f6dcaa5a53e..11373c0908f 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c ManagedClusterSnapshotsClient) UpdateTags(ctx context.Context, id Manage var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/version.go b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/version.go index 2db5d2b0905..4644cfa43a4 100644 --- a/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/managedclustersnapshots/version.go @@ -1,12 +1,10 @@ package managedclustersnapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclustersnapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclustersnapshots/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/README.md b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/README.md index 8ce6529a7f6..ddf74ce7382 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/client.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_get.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_list.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_update.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_update.go index c118ecada7d..1b91edb4dda 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/method_update.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/version.go b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/version.go index eef3cdbcf26..34b1b079ab6 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/README.md b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/README.md index b7775c0efd0..f44e11fce4a 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/client.go b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/method_list.go b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/version.go b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/version.go index 6d4c708c238..57e34b7a3d2 100644 --- a/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/README.md index dbc24b832d8..3debea32c62 100644 --- a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/version.go index d9166e02ecf..134e71852f0 100644 --- a/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/README.md b/resource-manager/containerservice/2023-03-02-preview/snapshots/README.md index effae843adf..544112c165c 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/client.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_createorupdate.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_get.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_get.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_updatetags.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/snapshots/version.go b/resource-manager/containerservice/2023-03-02-preview/snapshots/version.go index 2ee5abc1fca..a2ac47f2113 100644 --- a/resource-manager/containerservice/2023-03-02-preview/snapshots/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/README.md b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/README.md index 5638d8d0a27..381c5478c6e 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/README.md +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-03-02-preview/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-03-02-preview`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-03-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/client.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/client.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingscreateorupdate.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingscreateorupdate.go index a8371698581..7d5802ff7f7 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingscreateorupdate.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingscreateorupdate.go @@ -49,7 +49,6 @@ func (c TrustedAccessClient) RoleBindingsCreateOrUpdate(ctx context.Context, id var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/version.go b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/version.go index 4d9414bda78..8c4511b21ce 100644 --- a/resource-manager/containerservice/2023-03-02-preview/trustedaccess/version.go +++ b/resource-manager/containerservice/2023-03-02-preview/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2023-03-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/README.md b/resource-manager/containerservice/2023-06-02-preview/agentpools/README.md index 5aacd4d4779..8b86bd1bc01 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/client.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/id_agentpool.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_delete.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_delete.go index 4943dd2d43e..046bdd6d7b3 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_delete.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_get.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/agentpools/version.go b/resource-manager/containerservice/2023-06-02-preview/agentpools/version.go index 67d912e4e27..48ae19903ce 100644 --- a/resource-manager/containerservice/2023-06-02-preview/agentpools/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/README.md b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/README.md index bd9d5cc01bd..328e9eaa9c0 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/client.go b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/version.go b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/version.go index a5c43f23238..53dba1bdd88 100644 --- a/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/README.md b/resource-manager/containerservice/2023-06-02-preview/managedclusters/README.md index 2b9b1e1f983..12bd1b2a0f8 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/client.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_commandresult.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_location.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_location.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_delete.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_delete.go index d7cee216475..5fe68bf23ab 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_delete.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_get.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclusters/version.go b/resource-manager/containerservice/2023-06-02-preview/managedclusters/version.go index c3e8cb775b0..9e697b97153 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclusters/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/README.md b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/README.md index 81c4bc898fb..f72d916c485 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots` Documentation -The `managedclustersnapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `managedclustersnapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/client.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/client.go index 939ebd0b984..87f79ccf563 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/client.go @@ -15,7 +15,7 @@ type ManagedClusterSnapshotsClient struct { } func NewManagedClusterSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterSnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclustersnapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclustersnapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterSnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/id_managedclustersnapshot.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/id_managedclustersnapshot.go index bd22899cf08..9c514f089d6 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/id_managedclustersnapshot.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/id_managedclustersnapshot.go @@ -42,7 +42,7 @@ func ParseManagedClusterSnapshotID(input string) (*ManagedClusterSnapshotId, err } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterSnapshotIDInsensitively(input string) (*ManagedClusterSn } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_createorupdate.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_createorupdate.go index 1041144ec50..1d79274192e 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ManagedClusterSnapshotsClient) CreateOrUpdate(ctx context.Context, id Ma var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_get.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_get.go index ead8643d9dc..3b0b9a991fa 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterSnapshotsClient) Get(ctx context.Context, id ManagedCluste var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_updatetags.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_updatetags.go index f6dcaa5a53e..11373c0908f 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c ManagedClusterSnapshotsClient) UpdateTags(ctx context.Context, id Manage var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/version.go b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/version.go index a851d05e793..2343b178583 100644 --- a/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/managedclustersnapshots/version.go @@ -1,12 +1,10 @@ package managedclustersnapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclustersnapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclustersnapshots/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/README.md b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/README.md index 538d57050f6..407072a460e 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/client.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_get.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_list.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_update.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/version.go b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/version.go index 990498c0da1..c9d372567ad 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/README.md b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/README.md index 1a0bd6fb73a..3274f8354f3 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/client.go b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/method_list.go b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/version.go b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/version.go index b14b76994e2..0e92a5d90b3 100644 --- a/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/README.md index 5257ffa8abf..6103ba3e4e4 100644 --- a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/version.go index b25ba552342..cfe372fb482 100644 --- a/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/README.md b/resource-manager/containerservice/2023-06-02-preview/snapshots/README.md index d29288eb083..355eff25737 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/client.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/id_snapshot.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_createorupdate.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_get.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_get.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_updatetags.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/snapshots/version.go b/resource-manager/containerservice/2023-06-02-preview/snapshots/version.go index dfb5d5515a8..66fb475b482 100644 --- a/resource-manager/containerservice/2023-06-02-preview/snapshots/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/README.md b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/README.md index 0222350b391..5447295251c 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/README.md +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-06-02-preview/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-06-02-preview`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-06-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/client.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/client.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_location.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingscreateorupdate.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingscreateorupdate.go index 31df99dd732..50ade65bc66 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingscreateorupdate.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingscreateorupdate.go @@ -50,7 +50,6 @@ func (c TrustedAccessClient) RoleBindingsCreateOrUpdate(ctx context.Context, id var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/version.go b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/version.go index 97c8426963d..7d6842fd6e4 100644 --- a/resource-manager/containerservice/2023-06-02-preview/trustedaccess/version.go +++ b/resource-manager/containerservice/2023-06-02-preview/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2023-06-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md b/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md index fb9f674841d..f45c7fd621d 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go index 4943dd2d43e..046bdd6d7b3 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go b/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go index 48761a95215..2630ee49363 100644 --- a/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/README.md b/resource-manager/containerservice/2023-09-02-preview/machines/README.md index e006cc2390d..f219bac13c7 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `machines` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/client.go b/resource-manager/containerservice/2023-09-02-preview/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/id_agentpool.go b/resource-manager/containerservice/2023-09-02-preview/machines/id_agentpool.go index 37959edf6f0..ad60d5582f3 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/id_agentpool.go +++ b/resource-manager/containerservice/2023-09-02-preview/machines/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/id_machine.go b/resource-manager/containerservice/2023-09-02-preview/machines/id_machine.go index 8b8a3741439..3c1ec7c8828 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/id_machine.go +++ b/resource-manager/containerservice/2023-09-02-preview/machines/id_machine.go @@ -46,7 +46,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/method_get.go b/resource-manager/containerservice/2023-09-02-preview/machines/method_get.go index 28a34563dec..14636e392c1 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/machines/method_get.go @@ -45,7 +45,6 @@ func (c MachinesClient) Get(ctx context.Context, id MachineId) (result GetOperat var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/machines/version.go b/resource-manager/containerservice/2023-09-02-preview/machines/version.go index dea43a5e02b..f5861fbf000 100644 --- a/resource-manager/containerservice/2023-09-02-preview/machines/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md index 257970049ec..2794641e04d 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go index 062be907928..d1f44448e56 100644 --- a/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md b/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md index feabd3665b6..fc7ea26f2bf 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go index 893637a2d7a..5f4dfa6c3c9 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_guardrailsversion.go @@ -42,7 +42,7 @@ func ParseGuardrailsVersionID(input string) (*GuardrailsVersionId, error) { } id := GuardrailsVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGuardrailsVersionIDInsensitively(input string) (*GuardrailsVersionId, } id := GuardrailsVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go index d7cee216475..5fe68bf23ab 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go index fbd1c0ce6c3..a7140aedde5 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getguardrailsversions.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetGuardrailsVersions(ctx context.Context, id Gua var model GuardrailsAvailableVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go b/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go index ffcad7e8ebb..39f7624101c 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/README.md b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/README.md index af883467bc0..69915e2c4fd 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots` Documentation -The `managedclustersnapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `managedclustersnapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/client.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/client.go index 939ebd0b984..87f79ccf563 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/client.go @@ -15,7 +15,7 @@ type ManagedClusterSnapshotsClient struct { } func NewManagedClusterSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterSnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclustersnapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclustersnapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterSnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go index bd22899cf08..9c514f089d6 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/id_managedclustersnapshot.go @@ -42,7 +42,7 @@ func ParseManagedClusterSnapshotID(input string) (*ManagedClusterSnapshotId, err } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterSnapshotIDInsensitively(input string) (*ManagedClusterSn } id := ManagedClusterSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_createorupdate.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_createorupdate.go index 1041144ec50..1d79274192e 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ManagedClusterSnapshotsClient) CreateOrUpdate(ctx context.Context, id Ma var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_get.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_get.go index ead8643d9dc..3b0b9a991fa 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterSnapshotsClient) Get(ctx context.Context, id ManagedCluste var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_updatetags.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_updatetags.go index f6dcaa5a53e..11373c0908f 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c ManagedClusterSnapshotsClient) UpdateTags(ctx context.Context, id Manage var model ManagedClusterSnapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/version.go b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/version.go index 16d00b58c13..44f0be8dfa4 100644 --- a/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/managedclustersnapshots/version.go @@ -1,12 +1,10 @@ package managedclustersnapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclustersnapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclustersnapshots/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/README.md b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/README.md index 845c7dfb992..d03f3bb77bf 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/client.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_get.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_list.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_update.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/version.go b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/version.go index 67b25d60806..783391d96bf 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/README.md b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/README.md index 9fb614e0b55..b92cc6b2102 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/client.go b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/method_list.go b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/version.go b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/version.go index 0e61a8bb508..8de4a32b1f9 100644 --- a/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/README.md index a2d93fc4f4b..19f6824e4e0 100644 --- a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/version.go index 494f5ffdec4..cb5546927da 100644 --- a/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md b/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md index bed60a5f999..6a85ac19096 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go b/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go index ea2366fd813..76e2d39ef34 100644 --- a/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/README.md b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/README.md index 52a965ad352..fb490c3d73e 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/README.md +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-09-02-preview/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-09-02-preview`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-09-02-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/client.go b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/client.go +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_location.go b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/version.go b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/version.go index 74db9c99258..02ca421a202 100644 --- a/resource-manager/containerservice/2023-09-02-preview/trustedaccess/version.go +++ b/resource-manager/containerservice/2023-09-02-preview/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-02-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2023-09-02-preview" } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/README.md b/resource-manager/containerservice/2023-10-01/agentpools/README.md index ff972fc7395..1ef34e29b5a 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/README.md +++ b/resource-manager/containerservice/2023-10-01/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/agentpools/client.go b/resource-manager/containerservice/2023-10-01/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/client.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/id_agentpool.go b/resource-manager/containerservice/2023-10-01/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/method_get.go b/resource-manager/containerservice/2023-10-01/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/method_get.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2023-10-01/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2023-10-01/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/agentpools/version.go b/resource-manager/containerservice/2023-10-01/agentpools/version.go index 2e4870c6f04..121e1f88a01 100644 --- a/resource-manager/containerservice/2023-10-01/agentpools/version.go +++ b/resource-manager/containerservice/2023-10-01/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/README.md b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/README.md index 946bf8c09e8..5b4accca4f2 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/client.go b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/version.go b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/version.go index 63324d41642..dd45471fdca 100644 --- a/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2023-10-01/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/README.md b/resource-manager/containerservice/2023-10-01/managedclusters/README.md index 5460d4d797c..51b4bc3cfc3 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/README.md +++ b/resource-manager/containerservice/2023-10-01/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/client.go b/resource-manager/containerservice/2023-10-01/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/client.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/id_commandresult.go b/resource-manager/containerservice/2023-10-01/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/id_location.go b/resource-manager/containerservice/2023-10-01/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/id_location.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_get.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_get.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2023-10-01/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/managedclusters/version.go b/resource-manager/containerservice/2023-10-01/managedclusters/version.go index 236cfd27868..8bd9c010fb4 100644 --- a/resource-manager/containerservice/2023-10-01/managedclusters/version.go +++ b/resource-manager/containerservice/2023-10-01/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/README.md b/resource-manager/containerservice/2023-10-01/privateendpointconnections/README.md index 2966e0674f7..73a2c1e188e 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/client.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_get.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_list.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_update.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/privateendpointconnections/version.go b/resource-manager/containerservice/2023-10-01/privateendpointconnections/version.go index d00cd7bcb8f..92b2452064f 100644 --- a/resource-manager/containerservice/2023-10-01/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2023-10-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/privatelinkresources/README.md b/resource-manager/containerservice/2023-10-01/privatelinkresources/README.md index becf0f8f0e2..817015689ef 100644 --- a/resource-manager/containerservice/2023-10-01/privatelinkresources/README.md +++ b/resource-manager/containerservice/2023-10-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/privatelinkresources/client.go b/resource-manager/containerservice/2023-10-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2023-10-01/privatelinkresources/client.go +++ b/resource-manager/containerservice/2023-10-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/privatelinkresources/method_list.go b/resource-manager/containerservice/2023-10-01/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2023-10-01/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2023-10-01/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/privatelinkresources/version.go b/resource-manager/containerservice/2023-10-01/privatelinkresources/version.go index b64e95ea1a3..4a874de4e5b 100644 --- a/resource-manager/containerservice/2023-10-01/privatelinkresources/version.go +++ b/resource-manager/containerservice/2023-10-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/README.md index 39481674e6f..805ba545585 100644 --- a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/version.go index 6073d279fe1..8f23fa1abf7 100644 --- a/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2023-10-01/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/README.md b/resource-manager/containerservice/2023-10-01/snapshots/README.md index 9a465d1dd0b..eb68840bf71 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/README.md +++ b/resource-manager/containerservice/2023-10-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/snapshots/client.go b/resource-manager/containerservice/2023-10-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/client.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/id_snapshot.go b/resource-manager/containerservice/2023-10-01/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/method_createorupdate.go b/resource-manager/containerservice/2023-10-01/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/method_get.go b/resource-manager/containerservice/2023-10-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/method_get.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/method_updatetags.go b/resource-manager/containerservice/2023-10-01/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/snapshots/version.go b/resource-manager/containerservice/2023-10-01/snapshots/version.go index 5c182833437..6a30b6e37d9 100644 --- a/resource-manager/containerservice/2023-10-01/snapshots/version.go +++ b/resource-manager/containerservice/2023-10-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/README.md b/resource-manager/containerservice/2023-10-01/trustedaccess/README.md index ac206b8902b..277a43c25e8 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/README.md +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-01/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-01`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/client.go b/resource-manager/containerservice/2023-10-01/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/client.go +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/id_location.go b/resource-manager/containerservice/2023-10-01/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2023-10-01/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2023-10-01/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-01/trustedaccess/version.go b/resource-manager/containerservice/2023-10-01/trustedaccess/version.go index a59df9a10c5..f23342a2bb6 100644 --- a/resource-manager/containerservice/2023-10-01/trustedaccess/version.go +++ b/resource-manager/containerservice/2023-10-01/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2023-10-01" } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/README.md b/resource-manager/containerservice/2023-10-15/fleetmembers/README.md index 9cd6d051527..3594363632c 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/README.md +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-15/fleetmembers` Documentation -The `fleetmembers` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-15`). +The `fleetmembers` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/client.go b/resource-manager/containerservice/2023-10-15/fleetmembers/client.go index 1f2556b8743..4ae813805f1 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/client.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/client.go @@ -15,7 +15,7 @@ type FleetMembersClient struct { } func NewFleetMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleetmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleetmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetMembersClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/id_fleet.go b/resource-manager/containerservice/2023-10-15/fleetmembers/id_fleet.go index 2795f9626bd..0c5d79cdc54 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/id_fleet.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/id_member.go b/resource-manager/containerservice/2023-10-15/fleetmembers/id_member.go index 4363bf1487a..52b4a2f7d2b 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/id_member.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/id_member.go @@ -44,7 +44,7 @@ func ParseMemberID(input string) (*MemberId, error) { } id := MemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMemberIDInsensitively(input string) (*MemberId, error) { } id := MemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/method_create.go b/resource-manager/containerservice/2023-10-15/fleetmembers/method_create.go index 9262ed20170..863427e015b 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/method_create.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/method_create.go @@ -43,6 +43,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/method_delete.go b/resource-manager/containerservice/2023-10-15/fleetmembers/method_delete.go index 9a1357f94b5..b4dcd897327 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/method_delete.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/method_get.go b/resource-manager/containerservice/2023-10-15/fleetmembers/method_get.go index 3987fc968d2..40f85147798 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/method_get.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/method_get.go @@ -45,7 +45,6 @@ func (c FleetMembersClient) Get(ctx context.Context, id MemberId) (result GetOpe var model FleetMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/method_update.go b/resource-manager/containerservice/2023-10-15/fleetmembers/method_update.go index d3cf5af1fcd..8be3394469b 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/method_update.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleetmembers/version.go b/resource-manager/containerservice/2023-10-15/fleetmembers/version.go index bd026832988..57de59a04d8 100644 --- a/resource-manager/containerservice/2023-10-15/fleetmembers/version.go +++ b/resource-manager/containerservice/2023-10-15/fleetmembers/version.go @@ -1,12 +1,10 @@ package fleetmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleetmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleetmembers/2023-10-15" } diff --git a/resource-manager/containerservice/2023-10-15/fleets/README.md b/resource-manager/containerservice/2023-10-15/fleets/README.md index af40d17e8fa..80827e2b778 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/README.md +++ b/resource-manager/containerservice/2023-10-15/fleets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-15/fleets` Documentation -The `fleets` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-15`). +The `fleets` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-15/fleets/client.go b/resource-manager/containerservice/2023-10-15/fleets/client.go index 199fd2ac0ed..212151c2570 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/client.go +++ b/resource-manager/containerservice/2023-10-15/fleets/client.go @@ -15,7 +15,7 @@ type FleetsClient struct { } func NewFleetsClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-15/fleets/id_fleet.go b/resource-manager/containerservice/2023-10-15/fleets/id_fleet.go index 6fce8b8ea59..186c670c931 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/id_fleet.go +++ b/resource-manager/containerservice/2023-10-15/fleets/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/fleets/method_createorupdate.go b/resource-manager/containerservice/2023-10-15/fleets/method_createorupdate.go index f2a4ae483c0..8ce25cd6c50 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/method_createorupdate.go +++ b/resource-manager/containerservice/2023-10-15/fleets/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleets/method_delete.go b/resource-manager/containerservice/2023-10-15/fleets/method_delete.go index f8ce48096f6..603d4bba4bf 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/method_delete.go +++ b/resource-manager/containerservice/2023-10-15/fleets/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleets/method_get.go b/resource-manager/containerservice/2023-10-15/fleets/method_get.go index 146f057c861..c45bbd36e11 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/method_get.go +++ b/resource-manager/containerservice/2023-10-15/fleets/method_get.go @@ -45,7 +45,6 @@ func (c FleetsClient) Get(ctx context.Context, id FleetId) (result GetOperationR var model Fleet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-15/fleets/method_listcredentials.go b/resource-manager/containerservice/2023-10-15/fleets/method_listcredentials.go index 1e024cb076c..67aefe4c3c0 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/method_listcredentials.go +++ b/resource-manager/containerservice/2023-10-15/fleets/method_listcredentials.go @@ -46,7 +46,6 @@ func (c FleetsClient) ListCredentials(ctx context.Context, id FleetId) (result L var model FleetCredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-15/fleets/method_update.go b/resource-manager/containerservice/2023-10-15/fleets/method_update.go index c227554999a..0ee99d9de02 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/method_update.go +++ b/resource-manager/containerservice/2023-10-15/fleets/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleets/version.go b/resource-manager/containerservice/2023-10-15/fleets/version.go index 08fb74d1ffa..b1138775f7f 100644 --- a/resource-manager/containerservice/2023-10-15/fleets/version.go +++ b/resource-manager/containerservice/2023-10-15/fleets/version.go @@ -1,12 +1,10 @@ package fleets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleets/2023-10-15" } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/README.md b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/README.md index f00c6e04a14..216a051e490 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/README.md +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-15/fleetupdatestrategies` Documentation -The `fleetupdatestrategies` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-15`). +The `fleetupdatestrategies` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/client.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/client.go index 4f33ef884ac..ef7f28de5bc 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/client.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/client.go @@ -15,7 +15,7 @@ type FleetUpdateStrategiesClient struct { } func NewFleetUpdateStrategiesClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetUpdateStrategiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleetupdatestrategies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleetupdatestrategies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetUpdateStrategiesClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_fleet.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_fleet.go index fdfca4e7241..9000c3f8907 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_fleet.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_updatestrategy.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_updatestrategy.go index 5d4d6e2a9bf..32309916fa5 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_updatestrategy.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/id_updatestrategy.go @@ -44,7 +44,7 @@ func ParseUpdateStrategyID(input string) (*UpdateStrategyId, error) { } id := UpdateStrategyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateStrategyIDInsensitively(input string) (*UpdateStrategyId, error) } id := UpdateStrategyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_createorupdate.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_createorupdate.go index e8bbc761205..bb24a7a38fe 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_createorupdate.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_delete.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_delete.go index c825765bfe6..c4cdd1a25d5 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_delete.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_get.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_get.go index 6abfa83b7e3..fffad5ecff7 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_get.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/method_get.go @@ -45,7 +45,6 @@ func (c FleetUpdateStrategiesClient) Get(ctx context.Context, id UpdateStrategyI var model FleetUpdateStrategy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/version.go b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/version.go index ec414cf17bf..54bef1fb2e4 100644 --- a/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/version.go +++ b/resource-manager/containerservice/2023-10-15/fleetupdatestrategies/version.go @@ -1,12 +1,10 @@ package fleetupdatestrategies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleetupdatestrategies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleetupdatestrategies/2023-10-15" } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/README.md b/resource-manager/containerservice/2023-10-15/updateruns/README.md index 8780d272169..ea870c1e079 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/README.md +++ b/resource-manager/containerservice/2023-10-15/updateruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2023-10-15/updateruns` Documentation -The `updateruns` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2023-10-15`). +The `updateruns` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2023-10-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2023-10-15/updateruns/client.go b/resource-manager/containerservice/2023-10-15/updateruns/client.go index a5becca3c6b..e25bd852788 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/client.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/client.go @@ -15,7 +15,7 @@ type UpdateRunsClient struct { } func NewUpdateRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updateruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updateruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdateRunsClient: %+v", err) } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/id_fleet.go b/resource-manager/containerservice/2023-10-15/updateruns/id_fleet.go index c64c7ee3c36..6b9d411546f 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/id_fleet.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/id_updaterun.go b/resource-manager/containerservice/2023-10-15/updateruns/id_updaterun.go index 08d19f8e02a..d138bdccad0 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/id_updaterun.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/id_updaterun.go @@ -44,7 +44,7 @@ func ParseUpdateRunID(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateRunIDInsensitively(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/method_createorupdate.go b/resource-manager/containerservice/2023-10-15/updateruns/method_createorupdate.go index 77b246d571a..ab0f8d6a506 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/method_createorupdate.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/method_delete.go b/resource-manager/containerservice/2023-10-15/updateruns/method_delete.go index 5987e76eb41..a26ed011af1 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/method_delete.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/method_get.go b/resource-manager/containerservice/2023-10-15/updateruns/method_get.go index 674bbb589e9..499bee735f8 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/method_get.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/method_get.go @@ -45,7 +45,6 @@ func (c UpdateRunsClient) Get(ctx context.Context, id UpdateRunId) (result GetOp var model UpdateRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/method_start.go b/resource-manager/containerservice/2023-10-15/updateruns/method_start.go index 618fd2ad6f6..fc306bd10de 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/method_start.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/method_start.go @@ -39,6 +39,7 @@ func (o StartOperationOptions) ToHeaders() *client.Headers { func (o StartOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/method_stop.go b/resource-manager/containerservice/2023-10-15/updateruns/method_stop.go index 507884b05e8..cef624442f0 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/method_stop.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/method_stop.go @@ -39,6 +39,7 @@ func (o StopOperationOptions) ToHeaders() *client.Headers { func (o StopOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2023-10-15/updateruns/version.go b/resource-manager/containerservice/2023-10-15/updateruns/version.go index 761dffad466..9a7e29c19fe 100644 --- a/resource-manager/containerservice/2023-10-15/updateruns/version.go +++ b/resource-manager/containerservice/2023-10-15/updateruns/version.go @@ -1,12 +1,10 @@ package updateruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updateruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updateruns/2023-10-15" } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/README.md b/resource-manager/containerservice/2024-01-01/agentpools/README.md index 93f7f166b01..dbd55046da8 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/README.md +++ b/resource-manager/containerservice/2024-01-01/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/agentpools/client.go b/resource-manager/containerservice/2024-01-01/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/client.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/id_agentpool.go b/resource-manager/containerservice/2024-01-01/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/method_get.go b/resource-manager/containerservice/2024-01-01/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/method_get.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2024-01-01/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2024-01-01/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/agentpools/version.go b/resource-manager/containerservice/2024-01-01/agentpools/version.go index 073b635e643..1ed75709091 100644 --- a/resource-manager/containerservice/2024-01-01/agentpools/version.go +++ b/resource-manager/containerservice/2024-01-01/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/README.md b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/README.md index de30e0ed3ff..f114ca471d1 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/client.go b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/version.go b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/version.go index c8a2cc5a6e0..693603babd9 100644 --- a/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2024-01-01/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/README.md b/resource-manager/containerservice/2024-01-01/managedclusters/README.md index a1d9a79c6fe..fad552d03a0 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/README.md +++ b/resource-manager/containerservice/2024-01-01/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/client.go b/resource-manager/containerservice/2024-01-01/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/client.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/id_commandresult.go b/resource-manager/containerservice/2024-01-01/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/id_location.go b/resource-manager/containerservice/2024-01-01/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/id_location.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_get.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_get.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2024-01-01/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/managedclusters/version.go b/resource-manager/containerservice/2024-01-01/managedclusters/version.go index f67abd79723..a79615406f2 100644 --- a/resource-manager/containerservice/2024-01-01/managedclusters/version.go +++ b/resource-manager/containerservice/2024-01-01/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/README.md b/resource-manager/containerservice/2024-01-01/privateendpointconnections/README.md index 0dbe8e331fd..c0c74c68445 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/client.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_get.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_list.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_update.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/privateendpointconnections/version.go b/resource-manager/containerservice/2024-01-01/privateendpointconnections/version.go index 04128773e22..771d0918f3a 100644 --- a/resource-manager/containerservice/2024-01-01/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2024-01-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/privatelinkresources/README.md b/resource-manager/containerservice/2024-01-01/privatelinkresources/README.md index e695378b708..ca893393db8 100644 --- a/resource-manager/containerservice/2024-01-01/privatelinkresources/README.md +++ b/resource-manager/containerservice/2024-01-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/privatelinkresources/client.go b/resource-manager/containerservice/2024-01-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2024-01-01/privatelinkresources/client.go +++ b/resource-manager/containerservice/2024-01-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/privatelinkresources/method_list.go b/resource-manager/containerservice/2024-01-01/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2024-01-01/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2024-01-01/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/privatelinkresources/version.go b/resource-manager/containerservice/2024-01-01/privatelinkresources/version.go index e3e2e8821c3..fbeba1f0500 100644 --- a/resource-manager/containerservice/2024-01-01/privatelinkresources/version.go +++ b/resource-manager/containerservice/2024-01-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/README.md index d14a1431281..57428b2e388 100644 --- a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/version.go index 78f8ba46b75..a187cc16b96 100644 --- a/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2024-01-01/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/README.md b/resource-manager/containerservice/2024-01-01/snapshots/README.md index 6e1c9ee135f..b1cfc1c7474 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/README.md +++ b/resource-manager/containerservice/2024-01-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/snapshots/client.go b/resource-manager/containerservice/2024-01-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/client.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/id_snapshot.go b/resource-manager/containerservice/2024-01-01/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/method_createorupdate.go b/resource-manager/containerservice/2024-01-01/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/method_get.go b/resource-manager/containerservice/2024-01-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/method_get.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/method_updatetags.go b/resource-manager/containerservice/2024-01-01/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/snapshots/version.go b/resource-manager/containerservice/2024-01-01/snapshots/version.go index 66bb167d570..493e39dea3e 100644 --- a/resource-manager/containerservice/2024-01-01/snapshots/version.go +++ b/resource-manager/containerservice/2024-01-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2024-01-01" } diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/README.md b/resource-manager/containerservice/2024-01-01/trustedaccess/README.md index 721677bca2e..6c35d111300 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/README.md +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-01-01/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-01-01`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/client.go b/resource-manager/containerservice/2024-01-01/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/client.go +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/id_location.go b/resource-manager/containerservice/2024-01-01/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2024-01-01/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2024-01-01/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-01-01/trustedaccess/version.go b/resource-manager/containerservice/2024-01-01/trustedaccess/version.go index 8feb1c746c4..3dfaf8f15b4 100644 --- a/resource-manager/containerservice/2024-01-01/trustedaccess/version.go +++ b/resource-manager/containerservice/2024-01-01/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2024-01-01" } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/README.md b/resource-manager/containerservice/2024-02-01/agentpools/README.md index 4a60938d4e0..4e8ccae7bfe 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/README.md +++ b/resource-manager/containerservice/2024-02-01/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/agentpools/client.go b/resource-manager/containerservice/2024-02-01/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/client.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/id_agentpool.go b/resource-manager/containerservice/2024-02-01/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/method_get.go b/resource-manager/containerservice/2024-02-01/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/method_get.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2024-02-01/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2024-02-01/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/agentpools/version.go b/resource-manager/containerservice/2024-02-01/agentpools/version.go index 8754f0485ac..c4c11b7bfa6 100644 --- a/resource-manager/containerservice/2024-02-01/agentpools/version.go +++ b/resource-manager/containerservice/2024-02-01/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/README.md b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/README.md index 75fac920c03..5154d8728c8 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/client.go b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/version.go b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/version.go index 673aceb7fce..3600a32ef1d 100644 --- a/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2024-02-01/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/README.md b/resource-manager/containerservice/2024-02-01/managedclusters/README.md index 93851cbb6d6..ca5fe449961 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/README.md +++ b/resource-manager/containerservice/2024-02-01/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/client.go b/resource-manager/containerservice/2024-02-01/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/client.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/id_commandresult.go b/resource-manager/containerservice/2024-02-01/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/id_location.go b/resource-manager/containerservice/2024-02-01/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/id_location.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_get.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_get.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getosoptions.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getosoptions.go index f255b25649c..84d4ecd3744 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getosoptions.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getosoptions.go @@ -34,6 +34,7 @@ func (o GetOSOptionsOperationOptions) ToHeaders() *client.Headers { func (o GetOSOptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedClustersClient) GetOSOptions(ctx context.Context, id LocationId, var model OSOptionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2024-02-01/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/managedclusters/version.go b/resource-manager/containerservice/2024-02-01/managedclusters/version.go index 3eb0da92b52..65f8c1ffdb4 100644 --- a/resource-manager/containerservice/2024-02-01/managedclusters/version.go +++ b/resource-manager/containerservice/2024-02-01/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/README.md b/resource-manager/containerservice/2024-02-01/privateendpointconnections/README.md index 7c9e9054f93..beb8901f33b 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/client.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_get.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_list.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_update.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/privateendpointconnections/version.go b/resource-manager/containerservice/2024-02-01/privateendpointconnections/version.go index 8c78ad1eb13..a865c0680ef 100644 --- a/resource-manager/containerservice/2024-02-01/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2024-02-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/privatelinkresources/README.md b/resource-manager/containerservice/2024-02-01/privatelinkresources/README.md index 6468bbc6748..ddf6862d959 100644 --- a/resource-manager/containerservice/2024-02-01/privatelinkresources/README.md +++ b/resource-manager/containerservice/2024-02-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/privatelinkresources/client.go b/resource-manager/containerservice/2024-02-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2024-02-01/privatelinkresources/client.go +++ b/resource-manager/containerservice/2024-02-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/privatelinkresources/method_list.go b/resource-manager/containerservice/2024-02-01/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2024-02-01/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2024-02-01/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/privatelinkresources/version.go b/resource-manager/containerservice/2024-02-01/privatelinkresources/version.go index a97b8c55eb1..297b1664d9a 100644 --- a/resource-manager/containerservice/2024-02-01/privatelinkresources/version.go +++ b/resource-manager/containerservice/2024-02-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/README.md index e7c2f0eea90..beb4084d55f 100644 --- a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/version.go index e6b0125f344..ec9db42e77d 100644 --- a/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2024-02-01/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/README.md b/resource-manager/containerservice/2024-02-01/snapshots/README.md index 93de9e7c873..191da4f6958 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/README.md +++ b/resource-manager/containerservice/2024-02-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/snapshots/client.go b/resource-manager/containerservice/2024-02-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/client.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/id_snapshot.go b/resource-manager/containerservice/2024-02-01/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/method_createorupdate.go b/resource-manager/containerservice/2024-02-01/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/method_get.go b/resource-manager/containerservice/2024-02-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/method_get.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/method_updatetags.go b/resource-manager/containerservice/2024-02-01/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/snapshots/version.go b/resource-manager/containerservice/2024-02-01/snapshots/version.go index 1a919e5ff5a..2016195e8a7 100644 --- a/resource-manager/containerservice/2024-02-01/snapshots/version.go +++ b/resource-manager/containerservice/2024-02-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2024-02-01" } diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/README.md b/resource-manager/containerservice/2024-02-01/trustedaccess/README.md index 0dbff93f469..aeb38d6d276 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/README.md +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-02-01/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-02-01`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/client.go b/resource-manager/containerservice/2024-02-01/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/client.go +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/id_location.go b/resource-manager/containerservice/2024-02-01/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2024-02-01/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2024-02-01/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-02-01/trustedaccess/version.go b/resource-manager/containerservice/2024-02-01/trustedaccess/version.go index 4efe0e157a4..703081cb1fe 100644 --- a/resource-manager/containerservice/2024-02-01/trustedaccess/version.go +++ b/resource-manager/containerservice/2024-02-01/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2024-02-01" } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/README.md b/resource-manager/containerservice/2024-04-01/fleetmembers/README.md index f78359cb9a7..52947f4cd23 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/README.md +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleetmembers` Documentation -The `fleetmembers` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-04-01`). +The `fleetmembers` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/client.go b/resource-manager/containerservice/2024-04-01/fleetmembers/client.go index 1f2556b8743..4ae813805f1 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/client.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/client.go @@ -15,7 +15,7 @@ type FleetMembersClient struct { } func NewFleetMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleetmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleetmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetMembersClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/id_fleet.go b/resource-manager/containerservice/2024-04-01/fleetmembers/id_fleet.go index 2795f9626bd..0c5d79cdc54 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/id_fleet.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/id_member.go b/resource-manager/containerservice/2024-04-01/fleetmembers/id_member.go index 4363bf1487a..52b4a2f7d2b 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/id_member.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/id_member.go @@ -44,7 +44,7 @@ func ParseMemberID(input string) (*MemberId, error) { } id := MemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMemberIDInsensitively(input string) (*MemberId, error) { } id := MemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/method_create.go b/resource-manager/containerservice/2024-04-01/fleetmembers/method_create.go index 9262ed20170..863427e015b 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/method_create.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/method_create.go @@ -43,6 +43,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/method_delete.go b/resource-manager/containerservice/2024-04-01/fleetmembers/method_delete.go index 9a1357f94b5..b4dcd897327 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/method_delete.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/method_get.go b/resource-manager/containerservice/2024-04-01/fleetmembers/method_get.go index 3987fc968d2..40f85147798 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/method_get.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/method_get.go @@ -45,7 +45,6 @@ func (c FleetMembersClient) Get(ctx context.Context, id MemberId) (result GetOpe var model FleetMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/method_update.go b/resource-manager/containerservice/2024-04-01/fleetmembers/method_update.go index d3cf5af1fcd..8be3394469b 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/method_update.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleetmembers/version.go b/resource-manager/containerservice/2024-04-01/fleetmembers/version.go index 4d295640acc..f6bab2178a4 100644 --- a/resource-manager/containerservice/2024-04-01/fleetmembers/version.go +++ b/resource-manager/containerservice/2024-04-01/fleetmembers/version.go @@ -1,12 +1,10 @@ package fleetmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleetmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleetmembers/2024-04-01" } diff --git a/resource-manager/containerservice/2024-04-01/fleets/README.md b/resource-manager/containerservice/2024-04-01/fleets/README.md index ede3f078aef..4fc84eedf4b 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/README.md +++ b/resource-manager/containerservice/2024-04-01/fleets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleets` Documentation -The `fleets` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-04-01`). +The `fleets` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-04-01/fleets/client.go b/resource-manager/containerservice/2024-04-01/fleets/client.go index 199fd2ac0ed..212151c2570 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/client.go +++ b/resource-manager/containerservice/2024-04-01/fleets/client.go @@ -15,7 +15,7 @@ type FleetsClient struct { } func NewFleetsClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-04-01/fleets/id_fleet.go b/resource-manager/containerservice/2024-04-01/fleets/id_fleet.go index 6fce8b8ea59..186c670c931 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/id_fleet.go +++ b/resource-manager/containerservice/2024-04-01/fleets/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/fleets/method_createorupdate.go b/resource-manager/containerservice/2024-04-01/fleets/method_createorupdate.go index f2a4ae483c0..8ce25cd6c50 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/method_createorupdate.go +++ b/resource-manager/containerservice/2024-04-01/fleets/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleets/method_delete.go b/resource-manager/containerservice/2024-04-01/fleets/method_delete.go index f8ce48096f6..603d4bba4bf 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/method_delete.go +++ b/resource-manager/containerservice/2024-04-01/fleets/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleets/method_get.go b/resource-manager/containerservice/2024-04-01/fleets/method_get.go index 146f057c861..c45bbd36e11 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/method_get.go +++ b/resource-manager/containerservice/2024-04-01/fleets/method_get.go @@ -45,7 +45,6 @@ func (c FleetsClient) Get(ctx context.Context, id FleetId) (result GetOperationR var model Fleet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-04-01/fleets/method_listcredentials.go b/resource-manager/containerservice/2024-04-01/fleets/method_listcredentials.go index 1e024cb076c..67aefe4c3c0 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/method_listcredentials.go +++ b/resource-manager/containerservice/2024-04-01/fleets/method_listcredentials.go @@ -46,7 +46,6 @@ func (c FleetsClient) ListCredentials(ctx context.Context, id FleetId) (result L var model FleetCredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-04-01/fleets/method_update.go b/resource-manager/containerservice/2024-04-01/fleets/method_update.go index c227554999a..0ee99d9de02 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/method_update.go +++ b/resource-manager/containerservice/2024-04-01/fleets/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleets/version.go b/resource-manager/containerservice/2024-04-01/fleets/version.go index d31bc8fa96a..f7553ad5fa5 100644 --- a/resource-manager/containerservice/2024-04-01/fleets/version.go +++ b/resource-manager/containerservice/2024-04-01/fleets/version.go @@ -1,12 +1,10 @@ package fleets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleets/2024-04-01" } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/README.md b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/README.md index cd732f0522a..f39d2bf8c29 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/README.md +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/fleetupdatestrategies` Documentation -The `fleetupdatestrategies` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-04-01`). +The `fleetupdatestrategies` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/client.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/client.go index 4f33ef884ac..ef7f28de5bc 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/client.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/client.go @@ -15,7 +15,7 @@ type FleetUpdateStrategiesClient struct { } func NewFleetUpdateStrategiesClientWithBaseURI(sdkApi sdkEnv.Api) (*FleetUpdateStrategiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fleetupdatestrategies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fleetupdatestrategies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FleetUpdateStrategiesClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_fleet.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_fleet.go index fdfca4e7241..9000c3f8907 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_fleet.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_updatestrategy.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_updatestrategy.go index 5d4d6e2a9bf..32309916fa5 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_updatestrategy.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/id_updatestrategy.go @@ -44,7 +44,7 @@ func ParseUpdateStrategyID(input string) (*UpdateStrategyId, error) { } id := UpdateStrategyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateStrategyIDInsensitively(input string) (*UpdateStrategyId, error) } id := UpdateStrategyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_createorupdate.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_createorupdate.go index e8bbc761205..bb24a7a38fe 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_createorupdate.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_delete.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_delete.go index c825765bfe6..c4cdd1a25d5 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_delete.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_get.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_get.go index 6abfa83b7e3..fffad5ecff7 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_get.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/method_get.go @@ -45,7 +45,6 @@ func (c FleetUpdateStrategiesClient) Get(ctx context.Context, id UpdateStrategyI var model FleetUpdateStrategy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/version.go b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/version.go index d7894cc6ae1..47a395f841d 100644 --- a/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/version.go +++ b/resource-manager/containerservice/2024-04-01/fleetupdatestrategies/version.go @@ -1,12 +1,10 @@ package fleetupdatestrategies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fleetupdatestrategies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fleetupdatestrategies/2024-04-01" } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/README.md b/resource-manager/containerservice/2024-04-01/updateruns/README.md index 9f0f612a5be..6484c8f2726 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/README.md +++ b/resource-manager/containerservice/2024-04-01/updateruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-04-01/updateruns` Documentation -The `updateruns` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-04-01`). +The `updateruns` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-04-01/updateruns/client.go b/resource-manager/containerservice/2024-04-01/updateruns/client.go index a5becca3c6b..e25bd852788 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/client.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/client.go @@ -15,7 +15,7 @@ type UpdateRunsClient struct { } func NewUpdateRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updateruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updateruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdateRunsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/id_fleet.go b/resource-manager/containerservice/2024-04-01/updateruns/id_fleet.go index c64c7ee3c36..6b9d411546f 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/id_fleet.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/id_fleet.go @@ -42,7 +42,7 @@ func ParseFleetID(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFleetIDInsensitively(input string) (*FleetId, error) { } id := FleetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/id_updaterun.go b/resource-manager/containerservice/2024-04-01/updateruns/id_updaterun.go index 08d19f8e02a..d138bdccad0 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/id_updaterun.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/id_updaterun.go @@ -44,7 +44,7 @@ func ParseUpdateRunID(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateRunIDInsensitively(input string) (*UpdateRunId, error) { } id := UpdateRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_createorupdate.go b/resource-manager/containerservice/2024-04-01/updateruns/method_createorupdate.go index 77b246d571a..ab0f8d6a506 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_createorupdate.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_delete.go b/resource-manager/containerservice/2024-04-01/updateruns/method_delete.go index 5987e76eb41..a26ed011af1 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_delete.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_get.go b/resource-manager/containerservice/2024-04-01/updateruns/method_get.go index 674bbb589e9..499bee735f8 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_get.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_get.go @@ -45,7 +45,6 @@ func (c UpdateRunsClient) Get(ctx context.Context, id UpdateRunId) (result GetOp var model UpdateRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_skip.go b/resource-manager/containerservice/2024-04-01/updateruns/method_skip.go index eac1dab6fb6..e6dbcc5d046 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_skip.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_skip.go @@ -39,6 +39,7 @@ func (o SkipOperationOptions) ToHeaders() *client.Headers { func (o SkipOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_start.go b/resource-manager/containerservice/2024-04-01/updateruns/method_start.go index 618fd2ad6f6..fc306bd10de 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_start.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_start.go @@ -39,6 +39,7 @@ func (o StartOperationOptions) ToHeaders() *client.Headers { func (o StartOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/method_stop.go b/resource-manager/containerservice/2024-04-01/updateruns/method_stop.go index 507884b05e8..cef624442f0 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/method_stop.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/method_stop.go @@ -39,6 +39,7 @@ func (o StopOperationOptions) ToHeaders() *client.Headers { func (o StopOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/containerservice/2024-04-01/updateruns/version.go b/resource-manager/containerservice/2024-04-01/updateruns/version.go index 9a418161c05..263fa66da0f 100644 --- a/resource-manager/containerservice/2024-04-01/updateruns/version.go +++ b/resource-manager/containerservice/2024-04-01/updateruns/version.go @@ -1,12 +1,10 @@ package updateruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updateruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updateruns/2024-04-01" } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/README.md b/resource-manager/containerservice/2024-05-01/agentpools/README.md index 4d852fa96b8..80f48d804bd 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/README.md +++ b/resource-manager/containerservice/2024-05-01/agentpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/agentpools` Documentation -The `agentpools` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `agentpools` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/agentpools/client.go b/resource-manager/containerservice/2024-05-01/agentpools/client.go index 2edad36c005..c46e6323495 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/client.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/client.go @@ -15,7 +15,7 @@ type AgentPoolsClient struct { } func NewAgentPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentPoolsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go b/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go index 3f847038351..fd1f5cef8c9 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/method_get.go b/resource-manager/containerservice/2024-05-01/agentpools/method_get.go index 97eecd6a97a..ea20389e4a3 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/method_get.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/method_get.go @@ -45,7 +45,6 @@ func (c AgentPoolsClient) Get(ctx context.Context, id AgentPoolId) (result GetOp var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go b/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go index 81aa1c660a4..685d4c2c2ec 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/method_getavailableagentpoolversions.go @@ -47,7 +47,6 @@ func (c AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, id var model AgentPoolAvailableVersions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go b/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go index e8d8a91ceed..1810ae898b6 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/method_getupgradeprofile.go @@ -46,7 +46,6 @@ func (c AgentPoolsClient) GetUpgradeProfile(ctx context.Context, id AgentPoolId) var model AgentPoolUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/agentpools/version.go b/resource-manager/containerservice/2024-05-01/agentpools/version.go index be0357b8bc2..276532eba78 100644 --- a/resource-manager/containerservice/2024-05-01/agentpools/version.go +++ b/resource-manager/containerservice/2024-05-01/agentpools/version.go @@ -1,12 +1,10 @@ package agentpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentpools/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md index d8dfda44d33..b47f2489e18 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go index cb172f6bd60..943342cd4fc 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -44,7 +44,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go index 97140e0ba21..94e9a6cec40 100644 --- a/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go +++ b/resource-manager/containerservice/2024-05-01/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/README.md b/resource-manager/containerservice/2024-05-01/managedclusters/README.md index 31f49582ea3..8a2f3e8f19d 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/README.md +++ b/resource-manager/containerservice/2024-05-01/managedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/managedclusters` Documentation -The `managedclusters` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `managedclusters` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/client.go b/resource-manager/containerservice/2024-05-01/managedclusters/client.go index 5081c63c8e6..a2037a7e28b 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/client.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/client.go @@ -15,7 +15,7 @@ type ManagedClustersClient struct { } func NewManagedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClustersClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go index 6719ccebee1..7118437b8ac 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/id_accessprofile.go @@ -44,7 +44,7 @@ func ParseAccessProfileID(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessProfileIDInsensitively(input string) (*AccessProfileId, error) { } id := AccessProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go b/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go index 8cad7061547..ed8f6e12d2f 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/id_commandresult.go @@ -44,7 +44,7 @@ func ParseCommandResultID(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCommandResultIDInsensitively(input string) (*CommandResultId, error) { } id := CommandResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go b/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go index 2a97028d499..e14f1b63554 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go index 6a9b778fbae..02895d149f9 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/id_meshrevisionprofile.go @@ -42,7 +42,7 @@ func ParseMeshRevisionProfileID(input string) (*MeshRevisionProfileId, error) { } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMeshRevisionProfileIDInsensitively(input string) (*MeshRevisionProfile } id := MeshRevisionProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go index 6354c5ca0b8..3aa2e327e57 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/id_meshupgradeprofile.go @@ -44,7 +44,7 @@ func ParseMeshUpgradeProfileID(input string) (*MeshUpgradeProfileId, error) { } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMeshUpgradeProfileIDInsensitively(input string) (*MeshUpgradeProfileId } id := MeshUpgradeProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go index 7962c50ca93..5c5b9cd89b8 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_get.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) Get(ctx context.Context, id commonids.KubernetesC var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go index fb2fd875c42..99bbda7cca5 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_getaccessprofile.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetAccessProfile(ctx context.Context, id AccessPr var model ManagedClusterAccessProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go index 3f6f4f1f00f..9cd6f99a5f9 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_getcommandresult.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) GetCommandResult(ctx context.Context, id CommandR var model RunCommandResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go index 2aa4f55b1c3..aba6637b834 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshrevisionprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, id Me var model MeshRevisionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go index 12b2a1032ed..536044f5875 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_getmeshupgradeprofile.go @@ -45,7 +45,6 @@ func (c ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, id Mes var model MeshUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go index 9b500de8b58..b5a5533d9e3 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ManagedClustersClient) GetUpgradeProfile(ctx context.Context, id commoni var model ManagedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go index c1281445462..7ccb6f0d6eb 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusteradmincredentials.go @@ -35,6 +35,7 @@ func (o ListClusterAdminCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterAdminCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go index 17ffc52bd4c..cdf8383752e 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclustermonitoringusercredentials.go @@ -35,6 +35,7 @@ func (o ListClusterMonitoringUserCredentialsOperationOptions) ToHeaders() *clien func (o ListClusterMonitoringUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context. var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go index 20feffa4418..ce168c171aa 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_listclusterusercredentials.go @@ -36,6 +36,7 @@ func (o ListClusterUserCredentialsOperationOptions) ToHeaders() *client.Headers func (o ListClusterUserCredentialsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, i var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go b/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go index 4de425a9201..286125762cd 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/method_listkubernetesversions.go @@ -46,7 +46,6 @@ func (c ManagedClustersClient) ListKubernetesVersions(ctx context.Context, id Lo var model KubernetesVersionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/managedclusters/version.go b/resource-manager/containerservice/2024-05-01/managedclusters/version.go index 6c773894558..7a078bf6542 100644 --- a/resource-manager/containerservice/2024-05-01/managedclusters/version.go +++ b/resource-manager/containerservice/2024-05-01/managedclusters/version.go @@ -1,12 +1,10 @@ package managedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusters/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/README.md b/resource-manager/containerservice/2024-05-01/privateendpointconnections/README.md index 565878f486e..0de89f439dd 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/README.md +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/client.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/client.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/id_privateendpointconnection.go index c682166f416..41923a87ede 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_get.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_get.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_list.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_list.go index bd4dd26e8bb..1ed7cfe4cf6 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_list.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_update.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_update.go index e0579b67245..12c2adf4c15 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_update.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/method_update.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/privateendpointconnections/version.go b/resource-manager/containerservice/2024-05-01/privateendpointconnections/version.go index b541d16e87d..584766e8f3b 100644 --- a/resource-manager/containerservice/2024-05-01/privateendpointconnections/version.go +++ b/resource-manager/containerservice/2024-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/privatelinkresources/README.md b/resource-manager/containerservice/2024-05-01/privatelinkresources/README.md index 7f249f07945..aa4d5c49772 100644 --- a/resource-manager/containerservice/2024-05-01/privatelinkresources/README.md +++ b/resource-manager/containerservice/2024-05-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/privatelinkresources/client.go b/resource-manager/containerservice/2024-05-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/containerservice/2024-05-01/privatelinkresources/client.go +++ b/resource-manager/containerservice/2024-05-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/privatelinkresources/method_list.go b/resource-manager/containerservice/2024-05-01/privatelinkresources/method_list.go index 836fd220ae3..905a02fa803 100644 --- a/resource-manager/containerservice/2024-05-01/privatelinkresources/method_list.go +++ b/resource-manager/containerservice/2024-05-01/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kuber var model PrivateLinkResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/privatelinkresources/version.go b/resource-manager/containerservice/2024-05-01/privatelinkresources/version.go index 14d0bb2a379..901bca12605 100644 --- a/resource-manager/containerservice/2024-05-01/privatelinkresources/version.go +++ b/resource-manager/containerservice/2024-05-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/README.md b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/README.md index d17c2562aa8..35a4748d3a5 100644 --- a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/README.md +++ b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid` Documentation -The `resolveprivatelinkserviceid` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `resolveprivatelinkserviceid` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/client.go b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/client.go index dd21ffc0b6b..5682fe91725 100644 --- a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/client.go +++ b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/client.go @@ -15,7 +15,7 @@ type ResolvePrivateLinkServiceIdClient struct { } func NewResolvePrivateLinkServiceIdClientWithBaseURI(sdkApi sdkEnv.Api) (*ResolvePrivateLinkServiceIdClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resolveprivatelinkserviceid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResolvePrivateLinkServiceIdClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/method_post.go b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/method_post.go index f583a77cede..de55fb54ccc 100644 --- a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/method_post.go +++ b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/method_post.go @@ -51,7 +51,6 @@ func (c ResolvePrivateLinkServiceIdClient) POST(ctx context.Context, id commonid var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/version.go b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/version.go index 7ce93af5bf3..f3701d2047f 100644 --- a/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/version.go +++ b/resource-manager/containerservice/2024-05-01/resolveprivatelinkserviceid/version.go @@ -1,12 +1,10 @@ package resolveprivatelinkserviceid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resolveprivatelinkserviceid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resolveprivatelinkserviceid/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/README.md b/resource-manager/containerservice/2024-05-01/snapshots/README.md index d6b53d27f3b..9b1455834cf 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/README.md +++ b/resource-manager/containerservice/2024-05-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/snapshots/client.go b/resource-manager/containerservice/2024-05-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/client.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go b/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go index 36f5d370bdf..7c5da39d9ba 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/id_snapshot.go @@ -42,7 +42,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go b/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go index 201c0eaedc7..2085af2f95b 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SnapshotsClient) CreateOrUpdate(ctx context.Context, id SnapshotId, inpu var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/method_get.go b/resource-manager/containerservice/2024-05-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/method_get.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go b/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go index 60346d7cddc..86fd5d87f00 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/method_updatetags.go @@ -49,7 +49,6 @@ func (c SnapshotsClient) UpdateTags(ctx context.Context, id SnapshotId, input Ta var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/snapshots/version.go b/resource-manager/containerservice/2024-05-01/snapshots/version.go index 5297cad0e16..264ed3f2731 100644 --- a/resource-manager/containerservice/2024-05-01/snapshots/version.go +++ b/resource-manager/containerservice/2024-05-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2024-05-01" } diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/README.md b/resource-manager/containerservice/2024-05-01/trustedaccess/README.md index c7caaa7c667..00cb3f3b374 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/README.md +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/containerservice/2024-05-01/trustedaccess` Documentation -The `trustedaccess` SDK allows for interaction with the Azure Resource Manager Service `containerservice` (API Version `2024-05-01`). +The `trustedaccess` SDK allows for interaction with Azure Resource Manager `containerservice` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/client.go b/resource-manager/containerservice/2024-05-01/trustedaccess/client.go index 3478bfc5e37..e3e1d5a54e4 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/client.go +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/client.go @@ -15,7 +15,7 @@ type TrustedAccessClient struct { } func NewTrustedAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedAccessClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedaccess", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedaccess", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedAccessClient: %+v", err) } diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/id_location.go b/resource-manager/containerservice/2024-05-01/trustedaccess/id_location.go index f2c540d6e65..d2493ff671f 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/id_location.go +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/id_trustedaccessrolebinding.go b/resource-manager/containerservice/2024-05-01/trustedaccess/id_trustedaccessrolebinding.go index 18c1e6b10f3..169cb6af5b2 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/id_trustedaccessrolebinding.go +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/id_trustedaccessrolebinding.go @@ -44,7 +44,7 @@ func ParseTrustedAccessRoleBindingID(input string) (*TrustedAccessRoleBindingId, } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedAccessRoleBindingIDInsensitively(input string) (*TrustedAccessR } id := TrustedAccessRoleBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/method_rolebindingsget.go b/resource-manager/containerservice/2024-05-01/trustedaccess/method_rolebindingsget.go index a0b81891af6..d70aa4cbfb4 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/method_rolebindingsget.go +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/method_rolebindingsget.go @@ -45,7 +45,6 @@ func (c TrustedAccessClient) RoleBindingsGet(ctx context.Context, id TrustedAcce var model TrustedAccessRoleBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/containerservice/2024-05-01/trustedaccess/version.go b/resource-manager/containerservice/2024-05-01/trustedaccess/version.go index 8119867865e..1ef14bf433f 100644 --- a/resource-manager/containerservice/2024-05-01/trustedaccess/version.go +++ b/resource-manager/containerservice/2024-05-01/trustedaccess/version.go @@ -1,12 +1,10 @@ package trustedaccess -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedaccess/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedaccess/2024-05-01" } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/README.md b/resource-manager/cosmosdb/2022-05-15/cosmosdb/README.md index 8c3eddd8355..f5be799e6b1 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/client.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_continuousmodebackuppolicy.go index f23ae252bb6..ec38a9b7261 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -13,7 +13,16 @@ var _ BackupPolicy = ContinuousModeBackupPolicy{} type ContinuousModeBackupPolicy struct { // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -27,9 +36,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index c99fa1c9190..3eb3ac5bb68 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -80,7 +80,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountgetproperties.go index ec292f3fd96..71a22c26b0b 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountgetproperties.go @@ -94,7 +94,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountupdateproperties.go index 7e115f81dc4..ce56bfde5b8 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -74,7 +74,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/cosmosdb/version.go b/resource-manager/cosmosdb/2022-05-15/cosmosdb/version.go index f558f3b978d..bb445d53df0 100644 --- a/resource-manager/cosmosdb/2022-05-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2022-05-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/README.md b/resource-manager/cosmosdb/2022-05-15/datatransfer/README.md index 4f0a8387ad8..79a0dba99a2 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/client.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index caec9b33cbe..f538513bcc0 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/datatransfer/version.go b/resource-manager/cosmosdb/2022-05-15/datatransfer/version.go index 713c89eeb0a..6f99d8ab54d 100644 --- a/resource-manager/cosmosdb/2022-05-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2022-05-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/README.md b/resource-manager/cosmosdb/2022-05-15/graphapicompute/README.md index c39f872ebfa..f75b9a2b169 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/client.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 8405b5b1699..379f9fc72d9 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/graphapicompute/version.go b/resource-manager/cosmosdb/2022-05-15/graphapicompute/version.go index f736875c77c..709333f32a9 100644 --- a/resource-manager/cosmosdb/2022-05-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2022-05-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/README.md b/resource-manager/cosmosdb/2022-05-15/managedcassandras/README.md index f9a24767161..2cc38c30c21 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/client.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/managedcassandras/version.go b/resource-manager/cosmosdb/2022-05-15/managedcassandras/version.go index a3dfed28657..d5455a2a285 100644 --- a/resource-manager/cosmosdb/2022-05-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2022-05-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/README.md index 39a0578186c..f96f60f4fad 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 99ab018fe12..dab99f1c18b 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/version.go index 9959d314a46..bbd7c497d87 100644 --- a/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2022-05-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/README.md index 093fd4e2bb4..648dc497cb2 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/version.go index 44e3a5c8ed4..dba4813dd45 100644 --- a/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2022-05-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/README.md index ebdc6eef60d..4bd600e2787 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/version.go index 9db24efd383..1c4f158515b 100644 --- a/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2022-05-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/README.md index 3f7438a80cb..1b21083876a 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/version.go index 3f3b3b5b04e..92b0d2cf0f7 100644 --- a/resource-manager/cosmosdb/2022-05-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2022-05-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/README.md b/resource-manager/cosmosdb/2022-05-15/rbacs/README.md index f27b9a44693..19e127b5922 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/client.go b/resource-manager/cosmosdb/2022-05-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/id_account.go b/resource-manager/cosmosdb/2022-05-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2022-05-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/rbacs/version.go b/resource-manager/cosmosdb/2022-05-15/rbacs/version.go index 32e6b330258..b74078b2c8d 100644 --- a/resource-manager/cosmosdb/2022-05-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2022-05-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/README.md b/resource-manager/cosmosdb/2022-05-15/restorables/README.md index d01167eb381..4fce9db4a17 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/README.md +++ b/resource-manager/cosmosdb/2022-05-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/client.go b/resource-manager/cosmosdb/2022-05-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/client.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/id_container.go b/resource-manager/cosmosdb/2022-05-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/id_location.go b/resource-manager/cosmosdb/2022-05-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2022-05-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2022-05-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbcollectionslist.go index 78be84805fd..7987503b55c 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbcollectionslist.go @@ -34,6 +34,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/restorables/version.go b/resource-manager/cosmosdb/2022-05-15/restorables/version.go index 98888204955..d063b2e3fe9 100644 --- a/resource-manager/cosmosdb/2022-05-15/restorables/version.go +++ b/resource-manager/cosmosdb/2022-05-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/services/README.md b/resource-manager/cosmosdb/2022-05-15/services/README.md index cf30524acfc..dcb6e07df99 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/README.md +++ b/resource-manager/cosmosdb/2022-05-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/services/client.go b/resource-manager/cosmosdb/2022-05-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/client.go +++ b/resource-manager/cosmosdb/2022-05-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2022-05-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-05-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/services/method_servicelist.go b/resource-manager/cosmosdb/2022-05-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2022-05-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2022-05-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index e5952d798ba..7d6bcbee9a0 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/services/version.go b/resource-manager/cosmosdb/2022-05-15/services/version.go index 070457ab34c..5f9a815ba65 100644 --- a/resource-manager/cosmosdb/2022-05-15/services/version.go +++ b/resource-manager/cosmosdb/2022-05-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/README.md index 27f403b3bc9..52b0d37a45c 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-05-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 6637bd6d573..f75bd97eba2 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/version.go index c067d4ed04e..d1b046bddd6 100644 --- a/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2022-05-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2022-05-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/README.md b/resource-manager/cosmosdb/2022-11-15/cosmosdb/README.md index c96a35c4f33..10d3e45c2bc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/client.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_clientencryptionkey.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_clientencryptionkey.go index f7dfcab2d27..34d006e6980 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_clientencryptionkey.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_clientencryptionkey.go @@ -46,7 +46,7 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go index 74d727c841d..af241efa45e 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetClientEncryptionKey(ctx context.Context, var model ClientEncryptionKeyGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go index 98e90ecff88..0fbb76de445 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListClientEncryptionKeys(ctx context.Context var model ClientEncryptionKeysListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_continuousmodebackuppolicy.go index f23ae252bb6..ec38a9b7261 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -13,7 +13,16 @@ var _ BackupPolicy = ContinuousModeBackupPolicy{} type ContinuousModeBackupPolicy struct { // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -27,9 +36,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index 84aa318b548..7d82e6242a7 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -86,7 +86,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountgetproperties.go index f7f26903545..52fb3f796f0 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountgetproperties.go @@ -100,7 +100,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountupdateproperties.go index 9cc963368f4..e49b3f75c3a 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -80,7 +80,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/cosmosdb/version.go b/resource-manager/cosmosdb/2022-11-15/cosmosdb/version.go index 60a20461c63..ddb1476f5da 100644 --- a/resource-manager/cosmosdb/2022-11-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2022-11-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/README.md b/resource-manager/cosmosdb/2022-11-15/datatransfer/README.md index 7d852a01dd2..66c4a9db3fc 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/client.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index caec9b33cbe..f538513bcc0 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/datatransfer/version.go b/resource-manager/cosmosdb/2022-11-15/datatransfer/version.go index 98670749695..ecbdb7ed9ef 100644 --- a/resource-manager/cosmosdb/2022-11-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2022-11-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/README.md b/resource-manager/cosmosdb/2022-11-15/graphapicompute/README.md index 47664fc2874..c4db327b468 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/client.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 8405b5b1699..379f9fc72d9 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/graphapicompute/version.go b/resource-manager/cosmosdb/2022-11-15/graphapicompute/version.go index 635a1fd54e6..cf81dd3edaa 100644 --- a/resource-manager/cosmosdb/2022-11-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2022-11-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/README.md b/resource-manager/cosmosdb/2022-11-15/managedcassandras/README.md index a3766c37542..be3eae2d486 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/client.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/managedcassandras/version.go b/resource-manager/cosmosdb/2022-11-15/managedcassandras/version.go index f158c9a5916..01f0905bd44 100644 --- a/resource-manager/cosmosdb/2022-11-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2022-11-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/README.md index 68ac21d116f..75ca46e0016 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 99ab018fe12..dab99f1c18b 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/version.go index 235cde004e7..e7c203a0352 100644 --- a/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2022-11-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/README.md b/resource-manager/cosmosdb/2022-11-15/mongorbacs/README.md index 90154513b09..c35919b5917 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/README.md +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs` Documentation -The `mongorbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `mongorbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/client.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/client.go index 34578d6c049..1e50d8ed79a 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/client.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/client.go @@ -15,7 +15,7 @@ type MongorbacsClient struct { } func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongorbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mongorbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MongorbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go index 32d94aefd54..b9d3067661d 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go index 7f0d94ddc2d..9b9d268ba49 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbroledefinition.go @@ -44,7 +44,7 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go index ad83825170a..f35163412dc 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/id_mongodbuserdefinition.go @@ -44,7 +44,7 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go index 14181939047..1e7c9e694dd 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Con var model MongoRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go index 09cfb34386d..718e65a3110 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Con var model MongoUserDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go index ef803b9c9a1..2992b8305b8 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.C var model MongoRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go index bab767da5f7..cb49b606573 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.C var model MongoUserDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/mongorbacs/version.go b/resource-manager/cosmosdb/2022-11-15/mongorbacs/version.go index c3b347512f3..bdb88711843 100644 --- a/resource-manager/cosmosdb/2022-11-15/mongorbacs/version.go +++ b/resource-manager/cosmosdb/2022-11-15/mongorbacs/version.go @@ -1,12 +1,10 @@ package mongorbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongorbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mongorbacs/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/README.md index f0c2be18bd3..3ef075c4b38 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/version.go index 12c2425d48b..30e53c8100f 100644 --- a/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2022-11-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/README.md index f0c893f1e73..e1c1c0deb4a 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/version.go index f039ac9f026..79c780f50c6 100644 --- a/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2022-11-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/README.md index e67750e5afa..f6524d46479 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/version.go index 9c6207b94ee..1f39f302e61 100644 --- a/resource-manager/cosmosdb/2022-11-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2022-11-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/README.md b/resource-manager/cosmosdb/2022-11-15/rbacs/README.md index fda95fc6c93..236bc9f209f 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/client.go b/resource-manager/cosmosdb/2022-11-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/id_account.go b/resource-manager/cosmosdb/2022-11-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2022-11-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/rbacs/version.go b/resource-manager/cosmosdb/2022-11-15/rbacs/version.go index dcab8fb618d..b83c1859d12 100644 --- a/resource-manager/cosmosdb/2022-11-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2022-11-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/README.md b/resource-manager/cosmosdb/2022-11-15/restorables/README.md index 0ec788a8d32..eb70204dd11 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/README.md +++ b/resource-manager/cosmosdb/2022-11-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/client.go b/resource-manager/cosmosdb/2022-11-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/client.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_container.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_graph.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_graph.go index 9d18acee1c0..a9ec9ef1133 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_graph.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_location.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/id_table.go b/resource-manager/cosmosdb/2022-11-15/restorables/id_table.go index 3b4bc9cd3b6..a1d58a6e90d 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/id_table.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlindatabaseslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlindatabaseslist.go index 4b9d410ce0b..1de1530f1c5 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlindatabaseslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlindatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableGremlinDatabasesList(ctx context.Context, i var model RestorableGremlinDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlingraphslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlingraphslist.go index 79560702981..8c1c9bcc1c8 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlingraphslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlingraphslist.go @@ -36,6 +36,7 @@ func (o RestorableGremlinGraphsListOperationOptions) ToHeaders() *client.Headers func (o RestorableGremlinGraphsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableGremlinGraphsList(ctx context.Context, id R var model RestorableGremlinGraphsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlinresourceslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlinresourceslist.go index b4b2baaa38e..ed88ce785d0 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlinresourceslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablegremlinresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableGremlinResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableGremlinResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableGremlinResourcesList(ctx context.Context, i var model RestorableGremlinResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbcollectionslist.go index 36dbc2ed0af..634d30fb9b6 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbcollectionslist.go @@ -36,6 +36,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableresourceslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableresourceslist.go index fac595e97cf..9fb261ac67c 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableresourceslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableTableResourcesListOperationOptions) ToHeaders() *client.Header func (o RestorableTableResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTableResourcesList(ctx context.Context, id var model RestorableTableResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableslist.go b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableslist.go index 1cd08b2da3e..fd4c0a4039d 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableslist.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/method_restorabletableslist.go @@ -35,6 +35,7 @@ func (o RestorableTablesListOperationOptions) ToHeaders() *client.Headers { func (o RestorableTablesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTablesList(ctx context.Context, id Restorab var model RestorableTablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/restorables/version.go b/resource-manager/cosmosdb/2022-11-15/restorables/version.go index 23a5ab6030e..7986e831309 100644 --- a/resource-manager/cosmosdb/2022-11-15/restorables/version.go +++ b/resource-manager/cosmosdb/2022-11-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/services/README.md b/resource-manager/cosmosdb/2022-11-15/services/README.md index bdf38d0cd7f..716ff9d345a 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/README.md +++ b/resource-manager/cosmosdb/2022-11-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/services/client.go b/resource-manager/cosmosdb/2022-11-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/client.go +++ b/resource-manager/cosmosdb/2022-11-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2022-11-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2022-11-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/services/method_servicelist.go b/resource-manager/cosmosdb/2022-11-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2022-11-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2022-11-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index e5952d798ba..7d6bcbee9a0 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/services/version.go b/resource-manager/cosmosdb/2022-11-15/services/version.go index 3c77af0b273..bbab9555dc4 100644 --- a/resource-manager/cosmosdb/2022-11-15/services/version.go +++ b/resource-manager/cosmosdb/2022-11-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2022-11-15" } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/README.md index 8c9b5e00ea9..63a55462a6f 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2022-11-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2022-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 6637bd6d573..f75bd97eba2 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/version.go index 4557d0be123..ee9235e3e6a 100644 --- a/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2022-11-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2022-11-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/README.md b/resource-manager/cosmosdb/2023-04-15/cosmosdb/README.md index 7af7cc8799e..d4f8f020a6a 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/client.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go index f7dfcab2d27..34d006e6980 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_clientencryptionkey.go @@ -46,7 +46,7 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go index 74d727c841d..af241efa45e 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetClientEncryptionKey(ctx context.Context, var model ClientEncryptionKeyGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go index 98e90ecff88..0fbb76de445 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListClientEncryptionKeys(ctx context.Context var model ClientEncryptionKeysListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_continuousmodebackuppolicy.go index 1d53e0c4eca..eb15c07e5f2 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -14,7 +14,16 @@ type ContinuousModeBackupPolicy struct { ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index 84aa318b548..7d82e6242a7 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -86,7 +86,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountgetproperties.go index f7f26903545..52fb3f796f0 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountgetproperties.go @@ -100,7 +100,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountupdateproperties.go index 9cc963368f4..e49b3f75c3a 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -80,7 +80,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/cosmosdb/version.go b/resource-manager/cosmosdb/2023-04-15/cosmosdb/version.go index a72f2679504..eb1ff753513 100644 --- a/resource-manager/cosmosdb/2023-04-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2023-04-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/README.md b/resource-manager/cosmosdb/2023-04-15/datatransfer/README.md index f698f6730bf..60c0f294c19 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/client.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index caec9b33cbe..f538513bcc0 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/datatransfer/version.go b/resource-manager/cosmosdb/2023-04-15/datatransfer/version.go index effb45872c3..1c18bd28b37 100644 --- a/resource-manager/cosmosdb/2023-04-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2023-04-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/README.md b/resource-manager/cosmosdb/2023-04-15/graphapicompute/README.md index 5c43e2d3e85..a17caac4ee2 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/client.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 8405b5b1699..379f9fc72d9 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/graphapicompute/version.go b/resource-manager/cosmosdb/2023-04-15/graphapicompute/version.go index e5a015e5382..de9b87cfae1 100644 --- a/resource-manager/cosmosdb/2023-04-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2023-04-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/README.md b/resource-manager/cosmosdb/2023-04-15/managedcassandras/README.md index d80001c75f2..d73a8b823d0 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/client.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/managedcassandras/version.go b/resource-manager/cosmosdb/2023-04-15/managedcassandras/version.go index 04f8a2e8f9c..21196c79097 100644 --- a/resource-manager/cosmosdb/2023-04-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2023-04-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/README.md index 73d9d24c2e1..1c8d48fff94 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 99ab018fe12..dab99f1c18b 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/version.go index ebfc2e727e6..3d582965ab5 100644 --- a/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2023-04-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/README.md b/resource-manager/cosmosdb/2023-04-15/mongorbacs/README.md index 3ea4d889283..21668dcc9e9 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/README.md +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/mongorbacs` Documentation -The `mongorbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `mongorbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/client.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/client.go index 34578d6c049..1e50d8ed79a 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/client.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/client.go @@ -15,7 +15,7 @@ type MongorbacsClient struct { } func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongorbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mongorbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MongorbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_databaseaccount.go index 32d94aefd54..b9d3067661d 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbroledefinition.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbroledefinition.go index 7f0d94ddc2d..9b9d268ba49 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbroledefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbroledefinition.go @@ -44,7 +44,7 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbuserdefinition.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbuserdefinition.go index ad83825170a..f35163412dc 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbuserdefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/id_mongodbuserdefinition.go @@ -44,7 +44,7 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go index 14181939047..1e7c9e694dd 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Con var model MongoRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go index 09cfb34386d..718e65a3110 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Con var model MongoUserDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go index ef803b9c9a1..2992b8305b8 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.C var model MongoRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go index bab767da5f7..cb49b606573 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.C var model MongoUserDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/mongorbacs/version.go b/resource-manager/cosmosdb/2023-04-15/mongorbacs/version.go index a867ea5f2a9..42f3ab6c76b 100644 --- a/resource-manager/cosmosdb/2023-04-15/mongorbacs/version.go +++ b/resource-manager/cosmosdb/2023-04-15/mongorbacs/version.go @@ -1,12 +1,10 @@ package mongorbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongorbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mongorbacs/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/README.md index 761d4205daa..b7251295030 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/version.go index d5472ec694f..5761d2d8475 100644 --- a/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2023-04-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/README.md index b9003eb5c51..a7ed4c33e61 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/version.go index 423f6ac93fd..11cb28637cd 100644 --- a/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2023-04-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/README.md index c4274bcd1ca..928cb20c26d 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/version.go index d1e853c2bb6..e30e974026a 100644 --- a/resource-manager/cosmosdb/2023-04-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2023-04-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/README.md b/resource-manager/cosmosdb/2023-04-15/rbacs/README.md index b2cf8bc788e..e35fc284a91 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/client.go b/resource-manager/cosmosdb/2023-04-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/id_account.go b/resource-manager/cosmosdb/2023-04-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2023-04-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/rbacs/version.go b/resource-manager/cosmosdb/2023-04-15/rbacs/version.go index b959c8eca70..a5e8626fff8 100644 --- a/resource-manager/cosmosdb/2023-04-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2023-04-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/README.md b/resource-manager/cosmosdb/2023-04-15/restorables/README.md index 78f69e6dee8..5c905d9e578 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/README.md +++ b/resource-manager/cosmosdb/2023-04-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/client.go b/resource-manager/cosmosdb/2023-04-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/client.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_container.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_graph.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_graph.go index 9d18acee1c0..a9ec9ef1133 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_graph.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_location.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/id_table.go b/resource-manager/cosmosdb/2023-04-15/restorables/id_table.go index 3b4bc9cd3b6..a1d58a6e90d 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/id_table.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlindatabaseslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlindatabaseslist.go index 4b9d410ce0b..1de1530f1c5 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlindatabaseslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlindatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableGremlinDatabasesList(ctx context.Context, i var model RestorableGremlinDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlingraphslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlingraphslist.go index 79560702981..8c1c9bcc1c8 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlingraphslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlingraphslist.go @@ -36,6 +36,7 @@ func (o RestorableGremlinGraphsListOperationOptions) ToHeaders() *client.Headers func (o RestorableGremlinGraphsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableGremlinGraphsList(ctx context.Context, id R var model RestorableGremlinGraphsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlinresourceslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlinresourceslist.go index b4b2baaa38e..ed88ce785d0 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlinresourceslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablegremlinresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableGremlinResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableGremlinResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableGremlinResourcesList(ctx context.Context, i var model RestorableGremlinResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbcollectionslist.go index 36dbc2ed0af..634d30fb9b6 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbcollectionslist.go @@ -36,6 +36,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableresourceslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableresourceslist.go index fac595e97cf..9fb261ac67c 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableresourceslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableTableResourcesListOperationOptions) ToHeaders() *client.Header func (o RestorableTableResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTableResourcesList(ctx context.Context, id var model RestorableTableResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableslist.go b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableslist.go index 1cd08b2da3e..fd4c0a4039d 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableslist.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/method_restorabletableslist.go @@ -35,6 +35,7 @@ func (o RestorableTablesListOperationOptions) ToHeaders() *client.Headers { func (o RestorableTablesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTablesList(ctx context.Context, id Restorab var model RestorableTablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/restorables/version.go b/resource-manager/cosmosdb/2023-04-15/restorables/version.go index 1498d0749f8..23365e9ed13 100644 --- a/resource-manager/cosmosdb/2023-04-15/restorables/version.go +++ b/resource-manager/cosmosdb/2023-04-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/services/README.md b/resource-manager/cosmosdb/2023-04-15/services/README.md index e1bd2b85296..61a4b688750 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/README.md +++ b/resource-manager/cosmosdb/2023-04-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/services/client.go b/resource-manager/cosmosdb/2023-04-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/client.go +++ b/resource-manager/cosmosdb/2023-04-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2023-04-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-04-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/services/method_servicelist.go b/resource-manager/cosmosdb/2023-04-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2023-04-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2023-04-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index e5952d798ba..7d6bcbee9a0 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/services/version.go b/resource-manager/cosmosdb/2023-04-15/services/version.go index 539af541701..1ef26394025 100644 --- a/resource-manager/cosmosdb/2023-04-15/services/version.go +++ b/resource-manager/cosmosdb/2023-04-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/README.md index 43574d8e9d8..a707ccaf1e8 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-04-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-04-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 6637bd6d573..f75bd97eba2 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/version.go index d0f4ae33bbf..ca306a38947 100644 --- a/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2023-04-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2023-04-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/README.md b/resource-manager/cosmosdb/2023-09-15/cosmosdb/README.md index 97786574f00..7a0d68698c6 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/client.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_clientencryptionkey.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_clientencryptionkey.go index f7dfcab2d27..34d006e6980 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_clientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_clientencryptionkey.go @@ -46,7 +46,7 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go index 74d727c841d..af241efa45e 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetClientEncryptionKey(ctx context.Context, var model ClientEncryptionKeyGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go index 98e90ecff88..0fbb76de445 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListClientEncryptionKeys(ctx context.Context var model ClientEncryptionKeysListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_continuousmodebackuppolicy.go index 1d53e0c4eca..eb15c07e5f2 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -14,7 +14,16 @@ type ContinuousModeBackupPolicy struct { ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index ecaed2095d7..156f4c17e50 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -90,7 +90,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountgetproperties.go index 5cb6b5e9e66..af322616b7e 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountgetproperties.go @@ -104,7 +104,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountupdateproperties.go index 2964ef586b3..9f3e252d7e8 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -84,7 +84,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/cosmosdb/version.go b/resource-manager/cosmosdb/2023-09-15/cosmosdb/version.go index 92da538e0d0..e57ba09e73d 100644 --- a/resource-manager/cosmosdb/2023-09-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2023-09-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/README.md b/resource-manager/cosmosdb/2023-09-15/datatransfer/README.md index 395c6b36cac..00f38c0e106 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/client.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index caec9b33cbe..f538513bcc0 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/datatransfer/version.go b/resource-manager/cosmosdb/2023-09-15/datatransfer/version.go index 39f8bda6fa2..e89a6f364d1 100644 --- a/resource-manager/cosmosdb/2023-09-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2023-09-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/README.md b/resource-manager/cosmosdb/2023-09-15/graphapicompute/README.md index da30c028e46..710fc689ee7 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/client.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 8405b5b1699..379f9fc72d9 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/graphapicompute/version.go b/resource-manager/cosmosdb/2023-09-15/graphapicompute/version.go index 8a854de88c8..673080ecdca 100644 --- a/resource-manager/cosmosdb/2023-09-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2023-09-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/README.md b/resource-manager/cosmosdb/2023-09-15/managedcassandras/README.md index 1620ddc5dbc..2e7b8e6a4d8 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/client.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/managedcassandras/version.go b/resource-manager/cosmosdb/2023-09-15/managedcassandras/version.go index ddef89458c4..3c525dae9bd 100644 --- a/resource-manager/cosmosdb/2023-09-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2023-09-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/README.md index d3e27b5ce8c..d9e23859252 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 99ab018fe12..dab99f1c18b 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/version.go index 1dcc2c41c91..6131170f409 100644 --- a/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2023-09-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/README.md b/resource-manager/cosmosdb/2023-09-15/mongorbacs/README.md index 3a8c297ae7c..cc5b209ee58 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/README.md +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/mongorbacs` Documentation -The `mongorbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `mongorbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/client.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/client.go index 34578d6c049..1e50d8ed79a 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/client.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/client.go @@ -15,7 +15,7 @@ type MongorbacsClient struct { } func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongorbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mongorbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MongorbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_databaseaccount.go index 32d94aefd54..b9d3067661d 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbroledefinition.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbroledefinition.go index 7f0d94ddc2d..9b9d268ba49 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbroledefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbroledefinition.go @@ -44,7 +44,7 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbuserdefinition.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbuserdefinition.go index ad83825170a..f35163412dc 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbuserdefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/id_mongodbuserdefinition.go @@ -44,7 +44,7 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go index 14181939047..1e7c9e694dd 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Con var model MongoRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go index 09cfb34386d..718e65a3110 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Con var model MongoUserDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go index ef803b9c9a1..2992b8305b8 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.C var model MongoRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go index bab767da5f7..cb49b606573 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.C var model MongoUserDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/mongorbacs/version.go b/resource-manager/cosmosdb/2023-09-15/mongorbacs/version.go index 051de6ccb5b..cf8c54c246c 100644 --- a/resource-manager/cosmosdb/2023-09-15/mongorbacs/version.go +++ b/resource-manager/cosmosdb/2023-09-15/mongorbacs/version.go @@ -1,12 +1,10 @@ package mongorbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongorbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mongorbacs/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/README.md index 3518f0c9c7a..97e0bd2757d 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/version.go index bb8cf08be1e..2861bb793a0 100644 --- a/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2023-09-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/README.md index b0107ee6a10..8eac233019c 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/version.go index 69b839ffd3b..7a5d5f79057 100644 --- a/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2023-09-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/README.md index 8be2ad87302..7b9022ea9b5 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/version.go index 0aef488fb79..ba4234acf90 100644 --- a/resource-manager/cosmosdb/2023-09-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2023-09-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/README.md b/resource-manager/cosmosdb/2023-09-15/rbacs/README.md index c5358facffc..596b8914b7c 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/client.go b/resource-manager/cosmosdb/2023-09-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/id_account.go b/resource-manager/cosmosdb/2023-09-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2023-09-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/rbacs/version.go b/resource-manager/cosmosdb/2023-09-15/rbacs/version.go index bcf6f06d7cd..b4751873277 100644 --- a/resource-manager/cosmosdb/2023-09-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2023-09-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/README.md b/resource-manager/cosmosdb/2023-09-15/restorables/README.md index 46006a7ea26..55b31dcbb48 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/README.md +++ b/resource-manager/cosmosdb/2023-09-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/client.go b/resource-manager/cosmosdb/2023-09-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/client.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_container.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_graph.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_graph.go index 9d18acee1c0..a9ec9ef1133 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_graph.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_location.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/id_table.go b/resource-manager/cosmosdb/2023-09-15/restorables/id_table.go index 3b4bc9cd3b6..a1d58a6e90d 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/id_table.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlindatabaseslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlindatabaseslist.go index 4b9d410ce0b..1de1530f1c5 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlindatabaseslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlindatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableGremlinDatabasesList(ctx context.Context, i var model RestorableGremlinDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlingraphslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlingraphslist.go index 79560702981..8c1c9bcc1c8 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlingraphslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlingraphslist.go @@ -36,6 +36,7 @@ func (o RestorableGremlinGraphsListOperationOptions) ToHeaders() *client.Headers func (o RestorableGremlinGraphsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableGremlinGraphsList(ctx context.Context, id R var model RestorableGremlinGraphsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlinresourceslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlinresourceslist.go index b4b2baaa38e..ed88ce785d0 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlinresourceslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablegremlinresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableGremlinResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableGremlinResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableGremlinResourcesList(ctx context.Context, i var model RestorableGremlinResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbcollectionslist.go index 36dbc2ed0af..634d30fb9b6 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbcollectionslist.go @@ -36,6 +36,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableresourceslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableresourceslist.go index fac595e97cf..9fb261ac67c 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableresourceslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableTableResourcesListOperationOptions) ToHeaders() *client.Header func (o RestorableTableResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTableResourcesList(ctx context.Context, id var model RestorableTableResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableslist.go b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableslist.go index 1cd08b2da3e..fd4c0a4039d 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableslist.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/method_restorabletableslist.go @@ -35,6 +35,7 @@ func (o RestorableTablesListOperationOptions) ToHeaders() *client.Headers { func (o RestorableTablesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTablesList(ctx context.Context, id Restorab var model RestorableTablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/restorables/version.go b/resource-manager/cosmosdb/2023-09-15/restorables/version.go index c78c5c1cd89..729e24c6d4c 100644 --- a/resource-manager/cosmosdb/2023-09-15/restorables/version.go +++ b/resource-manager/cosmosdb/2023-09-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/services/README.md b/resource-manager/cosmosdb/2023-09-15/services/README.md index 8bed0592493..8c51ee18213 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/README.md +++ b/resource-manager/cosmosdb/2023-09-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/services/client.go b/resource-manager/cosmosdb/2023-09-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/client.go +++ b/resource-manager/cosmosdb/2023-09-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2023-09-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-09-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/services/method_servicelist.go b/resource-manager/cosmosdb/2023-09-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2023-09-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2023-09-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index e5952d798ba..7d6bcbee9a0 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/services/version.go b/resource-manager/cosmosdb/2023-09-15/services/version.go index bf4dc9c4fd3..3bd381d6e2d 100644 --- a/resource-manager/cosmosdb/2023-09-15/services/version.go +++ b/resource-manager/cosmosdb/2023-09-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/README.md index 47e9f6a6ff9..1e64ea205b8 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-09-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 6637bd6d573..f75bd97eba2 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/version.go index 1d77709b132..a93d245d0c6 100644 --- a/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2023-09-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2023-09-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/README.md b/resource-manager/cosmosdb/2023-11-15/cosmosdb/README.md index 86c663c8fcf..8c736a7ae90 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/client.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_clientencryptionkey.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_clientencryptionkey.go index f7dfcab2d27..34d006e6980 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_clientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_clientencryptionkey.go @@ -46,7 +46,7 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go index 74d727c841d..af241efa45e 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetClientEncryptionKey(ctx context.Context, var model ClientEncryptionKeyGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go index 98e90ecff88..0fbb76de445 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListClientEncryptionKeys(ctx context.Context var model ClientEncryptionKeysListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_continuousmodebackuppolicy.go index 1d53e0c4eca..eb15c07e5f2 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -14,7 +14,16 @@ type ContinuousModeBackupPolicy struct { ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index e36d0f666d3..8b40529da19 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -90,7 +90,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountgetproperties.go index ff896712cd1..c8358003525 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountgetproperties.go @@ -104,7 +104,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountupdateproperties.go index a7198a354a7..9d5508e15a5 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -84,7 +84,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/cosmosdb/version.go b/resource-manager/cosmosdb/2023-11-15/cosmosdb/version.go index d4f3319a77e..e6ed399955b 100644 --- a/resource-manager/cosmosdb/2023-11-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2023-11-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/README.md b/resource-manager/cosmosdb/2023-11-15/datatransfer/README.md index d9718593282..0a4c9e23e18 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/client.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index caec9b33cbe..f538513bcc0 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/datatransfer/version.go b/resource-manager/cosmosdb/2023-11-15/datatransfer/version.go index 083cfa560bd..021e9d34dcf 100644 --- a/resource-manager/cosmosdb/2023-11-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2023-11-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/README.md b/resource-manager/cosmosdb/2023-11-15/graphapicompute/README.md index a89395da3bb..065f6725d6d 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/client.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 8405b5b1699..379f9fc72d9 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/graphapicompute/version.go b/resource-manager/cosmosdb/2023-11-15/graphapicompute/version.go index 640b92e1e6d..927533b0a87 100644 --- a/resource-manager/cosmosdb/2023-11-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2023-11-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/README.md b/resource-manager/cosmosdb/2023-11-15/managedcassandras/README.md index 02e70da42c4..6866d999fbc 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/client.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/managedcassandras/version.go b/resource-manager/cosmosdb/2023-11-15/managedcassandras/version.go index 5eb5b0ae570..538f47d15e8 100644 --- a/resource-manager/cosmosdb/2023-11-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2023-11-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/README.md index d5dcbf22e5f..a86511330e4 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 99ab018fe12..dab99f1c18b 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/version.go index 49093735af5..96f96856ddd 100644 --- a/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2023-11-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/README.md b/resource-manager/cosmosdb/2023-11-15/mongorbacs/README.md index b2985aa8613..dee36d45e5a 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/README.md +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/mongorbacs` Documentation -The `mongorbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `mongorbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/client.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/client.go index 34578d6c049..1e50d8ed79a 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/client.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/client.go @@ -15,7 +15,7 @@ type MongorbacsClient struct { } func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongorbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mongorbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MongorbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_databaseaccount.go index 32d94aefd54..b9d3067661d 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbroledefinition.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbroledefinition.go index 7f0d94ddc2d..9b9d268ba49 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbroledefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbroledefinition.go @@ -44,7 +44,7 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbuserdefinition.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbuserdefinition.go index ad83825170a..f35163412dc 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbuserdefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/id_mongodbuserdefinition.go @@ -44,7 +44,7 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go index 14181939047..1e7c9e694dd 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Con var model MongoRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go index 09cfb34386d..718e65a3110 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Con var model MongoUserDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go index ef803b9c9a1..2992b8305b8 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.C var model MongoRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go index bab767da5f7..cb49b606573 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.C var model MongoUserDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/mongorbacs/version.go b/resource-manager/cosmosdb/2023-11-15/mongorbacs/version.go index 9a58e3d424c..29abe8c30ad 100644 --- a/resource-manager/cosmosdb/2023-11-15/mongorbacs/version.go +++ b/resource-manager/cosmosdb/2023-11-15/mongorbacs/version.go @@ -1,12 +1,10 @@ package mongorbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongorbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mongorbacs/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/README.md index 9e4e0396b2e..af4f0a70a7b 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/version.go index 2f427e3353c..2a7d8541fc4 100644 --- a/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2023-11-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/README.md index 24b760e5375..de1f728141d 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/version.go index 89a63a86d34..8987a6a460e 100644 --- a/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2023-11-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/README.md index 0bd0f421abe..cac0232d521 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/version.go index d188ea4b30a..f0635db32d4 100644 --- a/resource-manager/cosmosdb/2023-11-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2023-11-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/README.md b/resource-manager/cosmosdb/2023-11-15/rbacs/README.md index f9a12204969..4aa3c9f0768 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/client.go b/resource-manager/cosmosdb/2023-11-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/id_account.go b/resource-manager/cosmosdb/2023-11-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2023-11-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/rbacs/version.go b/resource-manager/cosmosdb/2023-11-15/rbacs/version.go index f6ee3beaf5d..742a5846813 100644 --- a/resource-manager/cosmosdb/2023-11-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2023-11-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/README.md b/resource-manager/cosmosdb/2023-11-15/restorables/README.md index f39363c0aad..e9eaac2f721 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/README.md +++ b/resource-manager/cosmosdb/2023-11-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/client.go b/resource-manager/cosmosdb/2023-11-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/client.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_container.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_graph.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_graph.go index 9d18acee1c0..a9ec9ef1133 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_graph.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_location.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/id_table.go b/resource-manager/cosmosdb/2023-11-15/restorables/id_table.go index 3b4bc9cd3b6..a1d58a6e90d 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/id_table.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlindatabaseslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlindatabaseslist.go index 4b9d410ce0b..1de1530f1c5 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlindatabaseslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlindatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableGremlinDatabasesList(ctx context.Context, i var model RestorableGremlinDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlingraphslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlingraphslist.go index 79560702981..8c1c9bcc1c8 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlingraphslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlingraphslist.go @@ -36,6 +36,7 @@ func (o RestorableGremlinGraphsListOperationOptions) ToHeaders() *client.Headers func (o RestorableGremlinGraphsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableGremlinGraphsList(ctx context.Context, id R var model RestorableGremlinGraphsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlinresourceslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlinresourceslist.go index b4b2baaa38e..ed88ce785d0 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlinresourceslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablegremlinresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableGremlinResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableGremlinResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableGremlinResourcesList(ctx context.Context, i var model RestorableGremlinResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbcollectionslist.go index 36dbc2ed0af..634d30fb9b6 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbcollectionslist.go @@ -36,6 +36,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableresourceslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableresourceslist.go index fac595e97cf..9fb261ac67c 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableresourceslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableTableResourcesListOperationOptions) ToHeaders() *client.Header func (o RestorableTableResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTableResourcesList(ctx context.Context, id var model RestorableTableResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableslist.go b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableslist.go index 1cd08b2da3e..fd4c0a4039d 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableslist.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/method_restorabletableslist.go @@ -35,6 +35,7 @@ func (o RestorableTablesListOperationOptions) ToHeaders() *client.Headers { func (o RestorableTablesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTablesList(ctx context.Context, id Restorab var model RestorableTablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/restorables/version.go b/resource-manager/cosmosdb/2023-11-15/restorables/version.go index e151512f430..cba5d853b21 100644 --- a/resource-manager/cosmosdb/2023-11-15/restorables/version.go +++ b/resource-manager/cosmosdb/2023-11-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/services/README.md b/resource-manager/cosmosdb/2023-11-15/services/README.md index 07fd1958807..d76b7f41e4e 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/README.md +++ b/resource-manager/cosmosdb/2023-11-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/services/client.go b/resource-manager/cosmosdb/2023-11-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/client.go +++ b/resource-manager/cosmosdb/2023-11-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2023-11-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2023-11-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/services/method_servicelist.go b/resource-manager/cosmosdb/2023-11-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2023-11-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2023-11-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index e5952d798ba..7d6bcbee9a0 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/services/version.go b/resource-manager/cosmosdb/2023-11-15/services/version.go index 851bbf9b4c1..350892d1db3 100644 --- a/resource-manager/cosmosdb/2023-11-15/services/version.go +++ b/resource-manager/cosmosdb/2023-11-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-11-15" } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/README.md index 86b017213a8..85d5efad29c 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2023-11-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 6637bd6d573..f75bd97eba2 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -18,12 +18,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/version.go index 838e14d6b8f..125a8639927 100644 --- a/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2023-11-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2023-11-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/README.md b/resource-manager/cosmosdb/2024-05-15/cosmosdb/README.md index 7a72c435119..11b95cc4dbd 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/README.md +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/cosmosdb` Documentation -The `cosmosdb` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `cosmosdb` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/client.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/client.go index febde609079..68f649fae55 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/client.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/client.go @@ -15,7 +15,7 @@ type CosmosDBClient struct { } func NewCosmosDBClientWithBaseURI(sdkApi sdkEnv.Api) (*CosmosDBClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cosmosdb", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cosmosdb", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CosmosDBClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspace.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspace.go index be6cc48a9c8..6218bb5dad1 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspace.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspace.go @@ -44,7 +44,7 @@ func ParseCassandraKeyspaceID(input string) (*CassandraKeyspaceId, error) { } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCassandraKeyspaceIDInsensitively(input string) (*CassandraKeyspaceId, } id := CassandraKeyspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspacetable.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspacetable.go index 4fe3c8c5928..158147c504e 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspacetable.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_cassandrakeyspacetable.go @@ -46,7 +46,7 @@ func ParseCassandraKeyspaceTableID(input string) (*CassandraKeyspaceTableId, err } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCassandraKeyspaceTableIDInsensitively(input string) (*CassandraKeyspac } id := CassandraKeyspaceTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_clientencryptionkey.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_clientencryptionkey.go index f7dfcab2d27..34d006e6980 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_clientencryptionkey.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_clientencryptionkey.go @@ -46,7 +46,7 @@ func ParseClientEncryptionKeyID(input string) (*ClientEncryptionKeyId, error) { } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseClientEncryptionKeyIDInsensitively(input string) (*ClientEncryptionKey } id := ClientEncryptionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collection.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collection.go index c6dee44ebec..6a1a0c81f21 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collection.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collection.go @@ -46,7 +46,7 @@ func ParseCollectionID(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCollectionIDInsensitively(input string) (*CollectionId, error) { } id := CollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go index 59a42397284..3963f75b15d 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_collectionpartitionkeyrangeid.go @@ -50,7 +50,7 @@ func ParseCollectionPartitionKeyRangeIdID(input string) (*CollectionPartitionKey } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseCollectionPartitionKeyRangeIdIDInsensitively(input string) (*Collectio } id := CollectionPartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_container.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_container.go index ce95a8e413e..66e3ff90317 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_container.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_database.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_database.go index d036afcf324..121a4ce5c9b 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_database.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccount.go index 42910a8aff3..c03ce820979 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccountname.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccountname.go index 4102315da93..be769ad581a 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccountname.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databaseaccountname.go @@ -38,7 +38,7 @@ func ParseDatabaseAccountNameID(input string) (*DatabaseAccountNameId, error) { } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDatabaseAccountNameIDInsensitively(input string) (*DatabaseAccountName } id := DatabaseAccountNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databasecollection.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databasecollection.go index 6472795f536..240fc9942b2 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databasecollection.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_databasecollection.go @@ -48,7 +48,7 @@ func ParseDatabaseCollectionID(input string) (*DatabaseCollectionId, error) { } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDatabaseCollectionIDInsensitively(input string) (*DatabaseCollectionId } id := DatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_graph.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_graph.go index e49a26e6ce9..9fcd38da183 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_graph.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_gremlindatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_gremlindatabase.go index a116c8e5d54..86f3cad39c5 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_gremlindatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_gremlindatabase.go @@ -44,7 +44,7 @@ func ParseGremlinDatabaseID(input string) (*GremlinDatabaseId, error) { } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGremlinDatabaseIDInsensitively(input string) (*GremlinDatabaseId, erro } id := GremlinDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_location.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_location.go index 7420a7e1af3..986f3ce51e1 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_location.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabase.go index 801a7fd57dc..4b9516fca55 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabase.go @@ -44,7 +44,7 @@ func ParseMongodbDatabaseID(input string) (*MongodbDatabaseId, error) { } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbDatabaseIDInsensitively(input string) (*MongodbDatabaseId, erro } id := MongodbDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabasecollection.go index bfe0a7d85fd..29c4f563ff3 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_partitionkeyrangeid.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_partitionkeyrangeid.go index da2bb45a226..9769d83e1a4 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_partitionkeyrangeid.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_partitionkeyrangeid.go @@ -48,7 +48,7 @@ func ParsePartitionKeyRangeIdID(input string) (*PartitionKeyRangeIdId, error) { } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParsePartitionKeyRangeIdIDInsensitively(input string) (*PartitionKeyRangeId } id := PartitionKeyRangeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_region.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_region.go index 42244d99291..698d4b0b91b 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_region.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_region.go @@ -44,7 +44,7 @@ func ParseRegionID(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegionIDInsensitively(input string) (*RegionId, error) { } id := RegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sourceregiontargetregion.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sourceregiontargetregion.go index 51f21bd0244..6ca53830a12 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sourceregiontargetregion.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sourceregiontargetregion.go @@ -46,7 +46,7 @@ func ParseSourceRegionTargetRegionID(input string) (*SourceRegionTargetRegionId, } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSourceRegionTargetRegionIDInsensitively(input string) (*SourceRegionTa } id := SourceRegionTargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sqldatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sqldatabase.go index e4ea79b04b2..a1e7b81a1e2 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sqldatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_sqldatabase.go @@ -44,7 +44,7 @@ func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlDatabaseIDInsensitively(input string) (*SqlDatabaseId, error) { } id := SqlDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_storedprocedure.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_storedprocedure.go index 0ab65f0783e..de8c0e8f0cd 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_storedprocedure.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_storedprocedure.go @@ -48,7 +48,7 @@ func ParseStoredProcedureID(input string) (*StoredProcedureId, error) { } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStoredProcedureIDInsensitively(input string) (*StoredProcedureId, erro } id := StoredProcedureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_table.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_table.go index 6687c58036a..3dafa17b33a 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_table.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_targetregion.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_targetregion.go index e265a8e40b9..56e62d5a835 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_targetregion.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_targetregion.go @@ -44,7 +44,7 @@ func ParseTargetRegionID(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTargetRegionIDInsensitively(input string) (*TargetRegionId, error) { } id := TargetRegionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_trigger.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_trigger.go index fb8394f03c5..ebc9cb05c45 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_trigger.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_trigger.go @@ -48,7 +48,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_userdefinedfunction.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_userdefinedfunction.go index b06ae438ba2..2d9573fe563 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_userdefinedfunction.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/id_userdefinedfunction.go @@ -48,7 +48,7 @@ func ParseUserDefinedFunctionID(input string) (*UserDefinedFunctionId, error) { } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseUserDefinedFunctionIDInsensitively(input string) (*UserDefinedFunction } id := UserDefinedFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go index a31069fc0b0..de461e25dc1 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspace.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspace(ctx context.Conte var model CassandraKeyspaceGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go index 356498418ec..89e084cef74 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandrakeyspacethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraKeyspaceThroughput(ctx con var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go index 95fb74caa42..41dc5195f74 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTable(ctx context.Context, var model CassandraTableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go index 907c40dea87..c328ab67406 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourcesgetcassandratablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesGetCassandraTableThroughput(ctx contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go index 92cf658bfc1..8fd6832e589 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandrakeyspaces.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraKeyspaces(ctx context.Con var model CassandraKeyspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go index ea52708f45b..2c2d361034f 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_cassandraresourceslistcassandratables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CassandraResourcesListCassandraTables(ctx context.Contex var model CassandraTableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetricdefinitions.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetricdefinitions.go index 5d7fb05541c..759da61266f 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) CollectionListMetricDefinitions(ctx context.Context, id var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetrics.go index 8747f3a471c..cf0c2018682 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionListMetricsOperationOptions) ToHeaders() *client.Headers { func (o CollectionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListMetrics(ctx context.Context, id Collection var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistusages.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistusages.go index eaf8390c6a0..114d55e873d 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistusages.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionListUsagesOperationOptions) ToHeaders() *client.Headers { func (o CollectionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionListUsages(ctx context.Context, id CollectionI var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistmetrics.go index 9b26ee59ba2..e4738325382 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListMetricsOperationOptions) ToHeaders() *client.Head func (o CollectionPartitionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListMetrics(ctx context.Context, id C var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistusages.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistusages.go index 1df08750fb2..11b7cd3bb49 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistusages.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionlistusages.go @@ -34,6 +34,7 @@ func (o CollectionPartitionListUsagesOperationOptions) ToHeaders() *client.Heade func (o CollectionPartitionListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionListUsages(ctx context.Context, id Co var model PartitionUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go index 725fbc82bf2..4c36c242ff3 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionpartitionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionPartitionRegionListMetricsOperationOptions) ToHeaders() *clien func (o CollectionPartitionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionPartitionRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionregionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionregionlistmetrics.go index 335458e0b4b..af8051f65e0 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionregionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_collectionregionlistmetrics.go @@ -34,6 +34,7 @@ func (o CollectionRegionListMetricsOperationOptions) ToHeaders() *client.Headers func (o CollectionRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) CollectionRegionListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go index 16c5eb70c05..f8be1c1d41f 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountregionlistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountRegionListMetricsOperationOptions) ToHeaders() *client.He func (o DatabaseAccountRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountRegionListMetrics(ctx context.Context, id var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsget.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsget.go index d2a51fe0586..062b96a49c5 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsget.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) DatabaseAccountsGet(ctx context.Context, id DatabaseAcco var model DatabaseAccountGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go index 8dcfbf47e43..72046c42d04 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountsgetreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsGetReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslist.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslist.go index f52d3473a1b..05f6c342ff5 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslist.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsList(ctx context.Context, id commonids.S var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go index 73c610536c4..df3eeb3dd38 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) DatabaseAccountsListByResourceGroup(ctx context.Context, var model DatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go index 61af9c871af..73fc75aa1ad 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistconnectionstrings.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListConnectionStrings(ctx context.Contex var model DatabaseAccountListConnectionStringsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistkeys.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistkeys.go index 1c8b71debc4..d47fc347572 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistkeys.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListKeys(ctx context.Context, id Databas var model DatabaseAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go index ddb38a2c1d6..4357cd02e66 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetricDefinitions(ctx context.Contex var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetrics.go index 42ea855bbe4..d0ba70fcbad 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListMetricsOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListMetrics(ctx context.Context, id Data var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go index 13666b0d36a..d8667228ecc 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistreadonlykeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseAccountsListReadOnlyKeys(ctx context.Context, id var model DatabaseAccountListReadOnlyKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistusages.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistusages.go index fd740072dd9..6409fa4aa88 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistusages.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaseaccountslistusages.go @@ -34,6 +34,7 @@ func (o DatabaseAccountsListUsagesOperationOptions) ToHeaders() *client.Headers func (o DatabaseAccountsListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseAccountsListUsages(ctx context.Context, id Datab var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetricdefinitions.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetricdefinitions.go index 7bbf108e68f..60cd6e072bc 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetricdefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetricdefinitions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) DatabaseListMetricDefinitions(ctx context.Context, id Da var model MetricDefinitionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetrics.go index 22284462c5b..77dc7d128cc 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistmetrics.go @@ -34,6 +34,7 @@ func (o DatabaseListMetricsOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListMetrics(ctx context.Context, id DatabaseId, var model MetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistusages.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistusages.go index 46d21b5a89d..2d5907aa068 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistusages.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_databaselistusages.go @@ -34,6 +34,7 @@ func (o DatabaseListUsagesOperationOptions) ToHeaders() *client.Headers { func (o DatabaseListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) DatabaseListUsages(ctx context.Context, id DatabaseId, o var model UsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go index 240425bac22..2be37b7e65e 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabase(ctx context.Context, var model GremlinDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go index 6ab56029e1d..497eb988e79 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlindatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go index f7dfd226985..3a72459fd70 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraph.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraph(ctx context.Context, id var model GremlinGraphGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go index d333b4c27d6..29469526c52 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourcesgetgremlingraphthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesGetGremlinGraphThroughput(ctx context.Co var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go index c71ca9938ed..48bf17fd940 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlindatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinDatabases(ctx context.Context var model GremlinDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go index ecf46a99a9f..97e332b3d32 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_gremlinresourceslistgremlingraphs.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) GremlinResourcesListGremlinGraphs(ctx context.Context, i var model GremlinGraphListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationsget.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationsget.go index edabf67eb7e..1bcf857f623 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationsget.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationsget.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) LocationsGet(ctx context.Context, id LocationId) (result var model LocationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationslist.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationslist.go index 84429f5d3a4..3d3b8a3c99e 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationslist.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_locationslist.go @@ -47,7 +47,6 @@ func (c CosmosDBClient) LocationsList(ctx context.Context, id commonids.Subscrip var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go index 8047c0f5772..9296bf8ab51 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollection.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollection(ctx context.Context var model MongoDBCollectionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go index 895e544a646..ef4212d2237 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbcollectionthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBCollectionThroughput(ctx conte var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go index b1294ca767c..af37b27fdc8 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabase(ctx context.Context, var model MongoDBDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go index c91e198e2c4..424444e72fc 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourcesgetmongodbdatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesGetMongoDBDatabaseThroughput(ctx context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go index b5019bfa393..b1404d5a8d1 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbcollections.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBCollections(ctx context.Conte var model MongoDBCollectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go index 4b062b95f9a..1144c74833b 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_mongodbresourceslistmongodbdatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) MongoDBResourcesListMongoDBDatabases(ctx context.Context var model MongoDBDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go index 123d59fc3cd..dd48b8f3546 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdListMetricsOperationOptions) ToHeaders() *client.Head func (o PartitionKeyRangeIdListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdListMetrics(ctx context.Context, id P var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go index 0ef6c622f7f..4683537bc32 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_partitionkeyrangeidregionlistmetrics.go @@ -34,6 +34,7 @@ func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToHeaders() *clien func (o PartitionKeyRangeIdRegionListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PartitionKeyRangeIdRegionListMetrics(ctx context.Context var model PartitionMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilelistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilelistmetrics.go index 3815628c1f6..e47c0b30189 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilelistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilelistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileListMetricsOperationOptions) ToHeaders() *client.Headers { func (o PercentileListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileListMetrics(ctx context.Context, id DatabaseAc var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go index ee2c78f33da..0a8441c8ce3 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentilesourcetargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileSourceTargetListMetricsOperationOptions) ToHeaders() *client.H func (o PercentileSourceTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileSourceTargetListMetrics(ctx context.Context, i var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentiletargetlistmetrics.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentiletargetlistmetrics.go index 8f757b3beba..af6ff16b4e3 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentiletargetlistmetrics.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_percentiletargetlistmetrics.go @@ -34,6 +34,7 @@ func (o PercentileTargetListMetricsOperationOptions) ToHeaders() *client.Headers func (o PercentileTargetListMetricsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CosmosDBClient) PercentileTargetListMetrics(ctx context.Context, id Targ var model PercentileMetricListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go index 74d727c841d..af241efa45e 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetclientencryptionkey.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetClientEncryptionKey(ctx context.Context, var model ClientEncryptionKeyGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go index e4dbdcbfb72..5eb7bc222c3 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainer.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainer(ctx context.Context, id Cont var model SqlContainerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go index 26bdc14a683..0a00c8a8bfe 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlcontainerthroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlContainerThroughput(ctx context.Contex var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go index 6c487b4584b..fc043b7c3b0 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabase.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabase(ctx context.Context, id SqlDa var model SqlDatabaseGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go index 9e0d1786f8a..0293bba4a08 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqldatabasethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlDatabaseThroughput(ctx context.Context var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go index 1c8b39a10a8..553c530859b 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqlstoredprocedure.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlStoredProcedure(ctx context.Context, i var model SqlStoredProcedureGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go index eafc6a9e3d7..adc75a36c58 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqltrigger.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlTrigger(ctx context.Context, id Trigge var model SqlTriggerGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go index 39a794f47a8..1d1ddce00d4 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourcesgetsqluserdefinedfunction.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) SqlResourcesGetSqlUserDefinedFunction(ctx context.Contex var model SqlUserDefinedFunctionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go index 98e90ecff88..0fbb76de445 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistclientencryptionkeys.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListClientEncryptionKeys(ctx context.Context var model ClientEncryptionKeysListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go index 512199371fb..932b86bd0dc 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlcontainers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlContainers(ctx context.Context, id Sq var model SqlContainerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go index 39649912188..6f5fadd616d 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqldatabases.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlDatabases(ctx context.Context, id Dat var model SqlDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go index b554525b5a4..0c5708f20a2 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqlstoredprocedures.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlStoredProcedures(ctx context.Context, var model SqlStoredProcedureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go index 149cca803da..87d5232c835 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqltriggers.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlTriggers(ctx context.Context, id Cont var model SqlTriggerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go index d81ebf50d17..93ecc4e048c 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_sqlresourceslistsqluserdefinedfunctions.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) SqlResourcesListSqlUserDefinedFunctions(ctx context.Cont var model SqlUserDefinedFunctionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettable.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettable.go index f96caea16e3..26645d49a19 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettable.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettable.go @@ -45,7 +45,6 @@ func (c CosmosDBClient) TableResourcesGetTable(ctx context.Context, id TableId) var model TableGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettablethroughput.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettablethroughput.go index 05059dee57a..8c7bf14664d 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettablethroughput.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourcesgettablethroughput.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesGetTableThroughput(ctx context.Context, id var model ThroughputSettingsGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourceslisttables.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourceslisttables.go index 977a8bf214a..9a22a7530b6 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourceslisttables.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/method_tableresourceslisttables.go @@ -46,7 +46,6 @@ func (c CosmosDBClient) TableResourcesListTables(ctx context.Context, id Databas var model TableListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_backuppolicy.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_backuppolicy.go index 2e4805f1c2f..4901ed8b659 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_backuppolicy.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_backuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupPolicy interface { + BackupPolicy() BaseBackupPolicyImpl } -// RawBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupPolicy = BaseBackupPolicyImpl{} + +type BaseBackupPolicyImpl struct { + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s BaseBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s +} + +var _ BackupPolicy = RawBackupPolicyImpl{} + +// RawBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupPolicyImpl struct { - Type string - Values map[string]interface{} + backupPolicy BaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupPolicyImpl) BackupPolicy() BaseBackupPolicyImpl { + return s.backupPolicy } -func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { +func UnmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBackupPolicyImplementation(input []byte) (BackupPolicy, error) { return out, nil } - out := RawBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBackupPolicyImpl{ + backupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_continuousmodebackuppolicy.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_continuousmodebackuppolicy.go index 1d53e0c4eca..eb15c07e5f2 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_continuousmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_continuousmodebackuppolicy.go @@ -14,7 +14,16 @@ type ContinuousModeBackupPolicy struct { ContinuousModeProperties *ContinuousModeProperties `json:"continuousModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s ContinuousModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = ContinuousModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s ContinuousModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContinuousModeBackupPolicy: %+v", err) } + decoded["type"] = "Continuous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go index e36d0f666d3..8b40529da19 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountcreateupdateproperties.go @@ -90,7 +90,7 @@ func (s *DatabaseAccountCreateUpdateProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountCreateUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountgetproperties.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountgetproperties.go index ff896712cd1..c8358003525 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountgetproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountgetproperties.go @@ -104,7 +104,7 @@ func (s *DatabaseAccountGetProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountGetProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountupdateproperties.go index a7198a354a7..9d5508e15a5 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_databaseaccountupdateproperties.go @@ -84,7 +84,7 @@ func (s *DatabaseAccountUpdateProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupPolicy"]; ok { - impl, err := unmarshalBackupPolicyImplementation(v) + impl, err := UnmarshalBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupPolicy' for 'DatabaseAccountUpdateProperties': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_periodicmodebackuppolicy.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_periodicmodebackuppolicy.go index b3d0a4a335c..0ead8c8a1f7 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_periodicmodebackuppolicy.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/model_periodicmodebackuppolicy.go @@ -14,7 +14,16 @@ type PeriodicModeBackupPolicy struct { PeriodicModeProperties *PeriodicModeProperties `json:"periodicModeProperties,omitempty"` // Fields inherited from BackupPolicy + MigrationState *BackupPolicyMigrationState `json:"migrationState,omitempty"` + Type BackupPolicyType `json:"type"` +} + +func (s PeriodicModeBackupPolicy) BackupPolicy() BaseBackupPolicyImpl { + return BaseBackupPolicyImpl{ + MigrationState: s.MigrationState, + Type: s.Type, + } } var _ json.Marshaler = PeriodicModeBackupPolicy{} @@ -28,9 +37,10 @@ func (s PeriodicModeBackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicModeBackupPolicy: %+v", err) } + decoded["type"] = "Periodic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/cosmosdb/version.go b/resource-manager/cosmosdb/2024-05-15/cosmosdb/version.go index 8c65bd14b7c..48e53a5d306 100644 --- a/resource-manager/cosmosdb/2024-05-15/cosmosdb/version.go +++ b/resource-manager/cosmosdb/2024-05-15/cosmosdb/version.go @@ -1,12 +1,10 @@ package cosmosdb -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cosmosdb/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cosmosdb/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/README.md b/resource-manager/cosmosdb/2024-05-15/datatransfer/README.md index 1aa186ce2c5..bb8172e20a7 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/README.md +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/datatransfer` Documentation -The `datatransfer` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `datatransfer` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/client.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/client.go index f8c19493154..890e6ad354e 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/client.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/client.go @@ -15,7 +15,7 @@ type DataTransferClient struct { } func NewDataTransferClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTransferClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatransfer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatransfer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTransferClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/id_service.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/id_service.go index e1cb7aa5adb..988f714ef0a 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/id_service.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/method_serviceget.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/method_serviceget.go index 1b66179d8d9..1b9f727f156 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/method_serviceget.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/method_serviceget.go @@ -45,7 +45,6 @@ func (c DataTransferClient) ServiceGet(ctx context.Context, id ServiceId) (resul var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourcecreateupdateproperties.go index f60484dff67..2ca1a6279a6 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = DataTransferServiceResourceCreateU type DataTransferServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s DataTransferServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = DataTransferServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourceproperties.go index 1d1e6644222..df3ab2d06ac 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourcecreateupdateproperties.go index f55ff18b34d..8434caa4227 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = GraphAPIComputeServiceResourceCrea type GraphAPIComputeServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s GraphAPIComputeServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = GraphAPIComputeServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go index d010f2b990f..8cac60c8de8 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go index b3a75e2ce69..fbab9b8f4d4 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = MaterializedViewsBuilderServiceRes type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = MaterializedViewsBuilderServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJS } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go index bb37ef2155f..eadc905e763 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresource.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresource.go index 49e1f80c7af..5afeec0e878 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresource.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateparameters.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateparameters.go index 4cad43f31d7..bcfa618d3e4 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateparameters.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateparameters.go @@ -22,7 +22,7 @@ func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourceCreateUpdatePropertiesImplementation(v) + impl, err := UnmarshalServiceResourceCreateUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResourceCreateUpdateParameters': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateproperties.go index 684d5c6ab7e..d2d7623475c 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourcecreateupdateproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceCreateUpdateProperties interface { + ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl } -// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceCreateUpdateProperties = BaseServiceResourceCreateUpdatePropertiesImpl{} + +type BaseServiceResourceCreateUpdatePropertiesImpl struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s BaseServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s +} + +var _ ServiceResourceCreateUpdateProperties = RawServiceResourceCreateUpdatePropertiesImpl{} + +// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourceCreateUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceCreateUpdateProperties BaseServiceResourceCreateUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s.serviceResourceCreateUpdateProperties } -func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { +func UnmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) return out, nil } - out := RawServiceResourceCreateUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourceCreateUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourceCreateUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourceCreateUpdatePropertiesImpl{ + serviceResourceCreateUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourceproperties.go index 9190c691730..58d7482e80e 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go index 7d647a2e6b6..4c2a7576bf1 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go @@ -14,8 +14,18 @@ type SqlDedicatedGatewayServiceResourceCreateUpdateProperties struct { DedicatedGatewayType *DedicatedGatewayType `json:"dedicatedGatewayType,omitempty"` // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = SqlDedicatedGatewayServiceResourceCreateUpdateProperties{} @@ -29,9 +39,10 @@ func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go index c1022639c9c..83bc369f117 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/model_sqldedicatedgatewayserviceresourceproperties.go @@ -19,12 +19,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -48,9 +60,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/datatransfer/version.go b/resource-manager/cosmosdb/2024-05-15/datatransfer/version.go index b6b096b65a8..f58a7726495 100644 --- a/resource-manager/cosmosdb/2024-05-15/datatransfer/version.go +++ b/resource-manager/cosmosdb/2024-05-15/datatransfer/version.go @@ -1,12 +1,10 @@ package datatransfer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatransfer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatransfer/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/README.md b/resource-manager/cosmosdb/2024-05-15/graphapicompute/README.md index c9ee533871e..ca1f443ac3a 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/README.md +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/graphapicompute` Documentation -The `graphapicompute` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `graphapicompute` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/client.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/client.go index b90dac2d770..3a7548e0438 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/client.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/client.go @@ -15,7 +15,7 @@ type GraphAPIComputeClient struct { } func NewGraphAPIComputeClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphAPIComputeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphapicompute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphapicompute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphAPIComputeClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/id_service.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/id_service.go index cf625220e2d..f862de75a00 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/id_service.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/method_serviceget.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/method_serviceget.go index dcf8c625311..57b27bc513c 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/method_serviceget.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/method_serviceget.go @@ -45,7 +45,6 @@ func (c GraphAPIComputeClient) ServiceGet(ctx context.Context, id ServiceId) (re var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourcecreateupdateproperties.go index ef50b882b67..9f86d71cea8 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = DataTransferServiceResourceCreateU type DataTransferServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s DataTransferServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = DataTransferServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourceproperties.go index cbdc7858788..a0cf9e497ba 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourcecreateupdateproperties.go index a73456b06e5..b2a96f18e2b 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = GraphAPIComputeServiceResourceCrea type GraphAPIComputeServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s GraphAPIComputeServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = GraphAPIComputeServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go index 22bc1e36e32..7db063700d2 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go index f6b8f1cd5b9..850555c0254 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = MaterializedViewsBuilderServiceRes type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = MaterializedViewsBuilderServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJS } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go index 6476116d45b..affb11a6ba9 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresource.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresource.go index 6a78fba779b..79b064ec373 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresource.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateparameters.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateparameters.go index cc3448f28cc..058dc2ffcda 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateparameters.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateparameters.go @@ -22,7 +22,7 @@ func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourceCreateUpdatePropertiesImplementation(v) + impl, err := UnmarshalServiceResourceCreateUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResourceCreateUpdateParameters': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateproperties.go index ba310ff2eb8..8ae069cfa1b 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourcecreateupdateproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceCreateUpdateProperties interface { + ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl } -// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceCreateUpdateProperties = BaseServiceResourceCreateUpdatePropertiesImpl{} + +type BaseServiceResourceCreateUpdatePropertiesImpl struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s BaseServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s +} + +var _ ServiceResourceCreateUpdateProperties = RawServiceResourceCreateUpdatePropertiesImpl{} + +// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourceCreateUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceCreateUpdateProperties BaseServiceResourceCreateUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s.serviceResourceCreateUpdateProperties } -func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { +func UnmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) return out, nil } - out := RawServiceResourceCreateUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourceCreateUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourceCreateUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourceCreateUpdatePropertiesImpl{ + serviceResourceCreateUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourceproperties.go index f56fbd1a007..29f0f2390a1 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go index 3fec4760f55..7c3c86dacb4 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go @@ -14,8 +14,18 @@ type SqlDedicatedGatewayServiceResourceCreateUpdateProperties struct { DedicatedGatewayType *DedicatedGatewayType `json:"dedicatedGatewayType,omitempty"` // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = SqlDedicatedGatewayServiceResourceCreateUpdateProperties{} @@ -29,9 +39,10 @@ func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go index 168d20cad40..d2da743c829 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/model_sqldedicatedgatewayserviceresourceproperties.go @@ -19,12 +19,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -48,9 +60,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/graphapicompute/version.go b/resource-manager/cosmosdb/2024-05-15/graphapicompute/version.go index b9d1c3bfc34..aa5c80f8c9e 100644 --- a/resource-manager/cosmosdb/2024-05-15/graphapicompute/version.go +++ b/resource-manager/cosmosdb/2024-05-15/graphapicompute/version.go @@ -1,12 +1,10 @@ package graphapicompute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphapicompute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphapicompute/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/README.md b/resource-manager/cosmosdb/2024-05-15/managedcassandras/README.md index abf350a7770..ce40c090930 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/README.md +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/managedcassandras` Documentation -The `managedcassandras` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `managedcassandras` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/client.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/client.go index 1c38e874ac7..381eeefaf3c 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/client.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/client.go @@ -15,7 +15,7 @@ type ManagedCassandrasClient struct { } func NewManagedCassandrasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedCassandrasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcassandras", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcassandras", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedCassandrasClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_cassandracluster.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_cassandracluster.go index 2daf54e8184..165f09de859 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_cassandracluster.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_cassandracluster.go @@ -42,7 +42,7 @@ func ParseCassandraClusterID(input string) (*CassandraClusterId, error) { } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCassandraClusterIDInsensitively(input string) (*CassandraClusterId, er } id := CassandraClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_datacenter.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_datacenter.go index 0c8f1035307..f749068cf21 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_datacenter.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/id_datacenter.go @@ -44,7 +44,7 @@ func ParseDataCenterID(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataCenterIDInsensitively(input string) (*DataCenterId, error) { } id := DataCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersget.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersget.go index b91319fe142..2f175432557 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersget.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraClustersGet(ctx context.Context, id Ca var model ClusterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go index aee0d0356ff..118bde5196f 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListByResourceGroup(ctx contex var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go index 3f2da8d2a23..07ee7cad4fe 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclusterslistbysubscription.go @@ -47,7 +47,6 @@ func (c ManagedCassandrasClient) CassandraClustersListBySubscription(ctx context var model ListClusters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersstatus.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersstatus.go index c544dcd24c9..e893f931bed 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersstatus.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandraclustersstatus.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraClustersStatus(ctx context.Context, id var model CassandraClusterPublicStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacentersget.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacentersget.go index a4732a84516..1da18b7e763 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacentersget.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacentersget.go @@ -45,7 +45,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersGet(ctx context.Context, id var model DataCenterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacenterslist.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacenterslist.go index 9c116fd0bc3..00794e30f1f 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacenterslist.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/method_cassandradatacenterslist.go @@ -46,7 +46,6 @@ func (c ManagedCassandrasClient) CassandraDataCentersList(ctx context.Context, i var model ListDataCenters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/managedcassandras/version.go b/resource-manager/cosmosdb/2024-05-15/managedcassandras/version.go index b5113c3674d..9f8b11db09f 100644 --- a/resource-manager/cosmosdb/2024-05-15/managedcassandras/version.go +++ b/resource-manager/cosmosdb/2024-05-15/managedcassandras/version.go @@ -1,12 +1,10 @@ package managedcassandras -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcassandras/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcassandras/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/README.md b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/README.md index 906c519c14c..b18ad6ec2b5 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/README.md +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder` Documentation -The `materializedviewsbuilder` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `materializedviewsbuilder` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/client.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/client.go index 33817964d99..0a72e3e9ade 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/client.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/client.go @@ -15,7 +15,7 @@ type MaterializedViewsBuilderClient struct { } func NewMaterializedViewsBuilderClientWithBaseURI(sdkApi sdkEnv.Api) (*MaterializedViewsBuilderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "materializedviewsbuilder", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaterializedViewsBuilderClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/id_service.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/id_service.go index 7dd15e6dc32..72a8a23fdd5 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/id_service.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/method_serviceget.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/method_serviceget.go index b9b7d19c8d2..98965b6b841 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/method_serviceget.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/method_serviceget.go @@ -45,7 +45,6 @@ func (c MaterializedViewsBuilderClient) ServiceGet(ctx context.Context, id Servi var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourcecreateupdateproperties.go index c054ef1a21e..58ad99ee73c 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = DataTransferServiceResourceCreateU type DataTransferServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s DataTransferServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = DataTransferServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go index 5b16c70c77b..ea79107534b 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourcecreateupdateproperties.go index c5eb7ad2ee9..00b10609019 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = GraphAPIComputeServiceResourceCrea type GraphAPIComputeServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s GraphAPIComputeServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = GraphAPIComputeServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go index 36e888299d9..069b276664b 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go index 714552cd091..ef2299db0d7 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = MaterializedViewsBuilderServiceRes type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = MaterializedViewsBuilderServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJS } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go index 23e80c47028..235a61a3a58 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresource.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresource.go index 695da1212cc..f0892cceee5 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresource.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateparameters.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateparameters.go index 7171bdf1b00..716b031cb23 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateparameters.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateparameters.go @@ -22,7 +22,7 @@ func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourceCreateUpdatePropertiesImplementation(v) + impl, err := UnmarshalServiceResourceCreateUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResourceCreateUpdateParameters': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateproperties.go index 6e57713c9cf..1d8eadd773c 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourcecreateupdateproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceCreateUpdateProperties interface { + ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl } -// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceCreateUpdateProperties = BaseServiceResourceCreateUpdatePropertiesImpl{} + +type BaseServiceResourceCreateUpdatePropertiesImpl struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s BaseServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s +} + +var _ ServiceResourceCreateUpdateProperties = RawServiceResourceCreateUpdatePropertiesImpl{} + +// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourceCreateUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceCreateUpdateProperties BaseServiceResourceCreateUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s.serviceResourceCreateUpdateProperties } -func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { +func UnmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) return out, nil } - out := RawServiceResourceCreateUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourceCreateUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourceCreateUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourceCreateUpdatePropertiesImpl{ + serviceResourceCreateUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourceproperties.go index 87e8b65210d..e1dbf80e3d2 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go index 1dbd107ac77..66ad106a698 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go @@ -14,8 +14,18 @@ type SqlDedicatedGatewayServiceResourceCreateUpdateProperties struct { DedicatedGatewayType *DedicatedGatewayType `json:"dedicatedGatewayType,omitempty"` // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = SqlDedicatedGatewayServiceResourceCreateUpdateProperties{} @@ -29,9 +39,10 @@ func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go index 36f8f9303ec..bfff4e5f726 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/model_sqldedicatedgatewayserviceresourceproperties.go @@ -19,12 +19,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -48,9 +60,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/version.go b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/version.go index eb36adad160..8e15477f7be 100644 --- a/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/version.go +++ b/resource-manager/cosmosdb/2024-05-15/materializedviewsbuilder/version.go @@ -1,12 +1,10 @@ package materializedviewsbuilder -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/materializedviewsbuilder/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/materializedviewsbuilder/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/README.md b/resource-manager/cosmosdb/2024-05-15/mongorbacs/README.md index 675c9dd2eee..2f02e4ea2e6 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/README.md +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/mongorbacs` Documentation -The `mongorbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `mongorbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/client.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/client.go index 34578d6c049..1e50d8ed79a 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/client.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/client.go @@ -15,7 +15,7 @@ type MongorbacsClient struct { } func NewMongorbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*MongorbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongorbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mongorbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MongorbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_databaseaccount.go index 32d94aefd54..b9d3067661d 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbroledefinition.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbroledefinition.go index 7f0d94ddc2d..9b9d268ba49 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbroledefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbroledefinition.go @@ -44,7 +44,7 @@ func ParseMongodbRoleDefinitionID(input string) (*MongodbRoleDefinitionId, error } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbRoleDefinitionIDInsensitively(input string) (*MongodbRoleDefini } id := MongodbRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbuserdefinition.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbuserdefinition.go index ad83825170a..f35163412dc 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbuserdefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/id_mongodbuserdefinition.go @@ -44,7 +44,7 @@ func ParseMongodbUserDefinitionID(input string) (*MongodbUserDefinitionId, error } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMongodbUserDefinitionIDInsensitively(input string) (*MongodbUserDefini } id := MongodbUserDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go index 14181939047..1e7c9e694dd 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongoroledefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoRoleDefinition(ctx context.Con var model MongoRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go index 09cfb34386d..718e65a3110 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourcesgetmongouserdefinition.go @@ -45,7 +45,6 @@ func (c MongorbacsClient) MongoDBResourcesGetMongoUserDefinition(ctx context.Con var model MongoUserDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go index ef803b9c9a1..2992b8305b8 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongoroledefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoRoleDefinitions(ctx context.C var model MongoRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go index bab767da5f7..cb49b606573 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/method_mongodbresourceslistmongouserdefinitions.go @@ -46,7 +46,6 @@ func (c MongorbacsClient) MongoDBResourcesListMongoUserDefinitions(ctx context.C var model MongoUserDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/mongorbacs/version.go b/resource-manager/cosmosdb/2024-05-15/mongorbacs/version.go index 366d02d1032..344e849efb1 100644 --- a/resource-manager/cosmosdb/2024-05-15/mongorbacs/version.go +++ b/resource-manager/cosmosdb/2024-05-15/mongorbacs/version.go @@ -1,12 +1,10 @@ package mongorbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongorbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mongorbacs/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/README.md b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/README.md index 5561344925c..80534d3ab91 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/README.md +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource` Documentation -The `notebookworkspacesresource` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `notebookworkspacesresource` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/client.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/client.go index 9d49c89559d..b14ff9f0d18 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/client.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/client.go @@ -15,7 +15,7 @@ type NotebookWorkspacesResourceClient struct { } func NewNotebookWorkspacesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NotebookWorkspacesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notebookworkspacesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotebookWorkspacesResourceClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/id_databaseaccount.go index 4a7e7806c28..6ae24dc47f6 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspacesget.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspacesget.go index f06bfc52026..1d735eaef17 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspacesget.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspacesget.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesGet(ctx context.Cont var model NotebookWorkspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go index 95beb923597..31991adb685 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListByDatabaseAccoun var model NotebookWorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go index bff498ad465..178c432112d 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/method_notebookworkspaceslistconnectioninfo.go @@ -46,7 +46,6 @@ func (c NotebookWorkspacesResourceClient) NotebookWorkspacesListConnectionInfo(c var model NotebookWorkspaceConnectionInfoResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/version.go b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/version.go index 3c8a5af90fb..2d323e671bc 100644 --- a/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/version.go +++ b/resource-manager/cosmosdb/2024-05-15/notebookworkspacesresource/version.go @@ -1,12 +1,10 @@ package notebookworkspacesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notebookworkspacesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notebookworkspacesresource/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/README.md b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/README.md index 5c5ca7e8711..e1a169585e3 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/README.md +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/client.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/client.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_databaseaccount.go index e3b1f6a4551..226c56ead5d 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_privateendpointconnection.go index 16aa70b3b08..5882fef1f64 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_get.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_get.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_listbydatabaseaccount.go index 6d5e2901d3f..a1df4f311aa 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByDatabaseAccount(ctx context.Cont var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/version.go b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/version.go index 6dae73e6de1..62e7d532444 100644 --- a/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/version.go +++ b/resource-manager/cosmosdb/2024-05-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/README.md b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/README.md index 7dcea48560f..ff641ea1bc1 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/README.md +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/client.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/client.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_databaseaccount.go index 869b645eb8e..48f448988b0 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_privatelinkresource.go index 8d61605a088..5bfbb845dac 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_get.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_get.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_listbydatabaseaccount.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_listbydatabaseaccount.go index 94474040ff8..3d60391808b 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_listbydatabaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/method_listbydatabaseaccount.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByDatabaseAccount(ctx context.Context, i var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/version.go b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/version.go index cf21b8fcf28..91dbb284298 100644 --- a/resource-manager/cosmosdb/2024-05-15/privatelinkresources/version.go +++ b/resource-manager/cosmosdb/2024-05-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/README.md b/resource-manager/cosmosdb/2024-05-15/rbacs/README.md index e0b10350e62..8d13861d721 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/README.md +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/rbacs` Documentation -The `rbacs` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `rbacs` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/client.go b/resource-manager/cosmosdb/2024-05-15/rbacs/client.go index 8520be9984f..9cefbe649f1 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/client.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/client.go @@ -15,7 +15,7 @@ type RbacsClient struct { } func NewRbacsClientWithBaseURI(sdkApi sdkEnv.Api) (*RbacsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rbacs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rbacs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RbacsClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/id_account.go b/resource-manager/cosmosdb/2024-05-15/rbacs/id_account.go index 982a6b494b8..d80efe19598 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/id_account.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/rbacs/id_databaseaccount.go index ba481178976..a9198e8ecd5 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/id_sqlroledefinition.go b/resource-manager/cosmosdb/2024-05-15/rbacs/id_sqlroledefinition.go index 18246f48efd..b2e41e67861 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/id_sqlroledefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/id_sqlroledefinition.go @@ -44,7 +44,7 @@ func ParseSqlRoleDefinitionID(input string) (*SqlRoleDefinitionId, error) { } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlRoleDefinitionIDInsensitively(input string) (*SqlRoleDefinitionId, } id := SqlRoleDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go index 3d5ee29b638..1efc15a0de1 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroleassignment.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleAssignment(ctx context.Context, id Ac var model SqlRoleAssignmentGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go index eefe1c5853a..b666f08154d 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourcesgetsqlroledefinition.go @@ -45,7 +45,6 @@ func (c RbacsClient) SqlResourcesGetSqlRoleDefinition(ctx context.Context, id Sq var model SqlRoleDefinitionGetResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go index bc726caad71..9eb8653b0c6 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroleassignments.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleAssignments(ctx context.Context, id var model SqlRoleAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go index e1853246c8b..7bb5cae75cd 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/method_sqlresourceslistsqlroledefinitions.go @@ -46,7 +46,6 @@ func (c RbacsClient) SqlResourcesListSqlRoleDefinitions(ctx context.Context, id var model SqlRoleDefinitionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/rbacs/version.go b/resource-manager/cosmosdb/2024-05-15/rbacs/version.go index fa5c859a635..01d1f5fa485 100644 --- a/resource-manager/cosmosdb/2024-05-15/rbacs/version.go +++ b/resource-manager/cosmosdb/2024-05-15/rbacs/version.go @@ -1,12 +1,10 @@ package rbacs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rbacs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rbacs/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/README.md b/resource-manager/cosmosdb/2024-05-15/restorables/README.md index 3ed9fa6b72c..d0ee411d79b 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/README.md +++ b/resource-manager/cosmosdb/2024-05-15/restorables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/restorables` Documentation -The `restorables` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `restorables` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/client.go b/resource-manager/cosmosdb/2024-05-15/restorables/client.go index 3be68a751e9..9192fc9307e 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/client.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/client.go @@ -15,7 +15,7 @@ type RestorablesClient struct { } func NewRestorablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorablesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_container.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_container.go index e94d82dc640..808da3cd141 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_container.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_graph.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_graph.go index 9d18acee1c0..a9ec9ef1133 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_graph.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_graph.go @@ -46,7 +46,7 @@ func ParseGraphID(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGraphIDInsensitively(input string) (*GraphId, error) { } id := GraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_location.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_location.go index 6ea7d07875a..1084e3dbfcd 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_location.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_mongodbdatabasecollection.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_mongodbdatabasecollection.go index baf3f1a723b..8774ce98449 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_mongodbdatabasecollection.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_mongodbdatabasecollection.go @@ -46,7 +46,7 @@ func ParseMongodbDatabaseCollectionID(input string) (*MongodbDatabaseCollectionI } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseMongodbDatabaseCollectionIDInsensitively(input string) (*MongodbDataba } id := MongodbDatabaseCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_restorabledatabaseaccount.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_restorabledatabaseaccount.go index 06cd8ececfb..174ab1accb4 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_restorabledatabaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_restorabledatabaseaccount.go @@ -42,7 +42,7 @@ func ParseRestorableDatabaseAccountID(input string) (*RestorableDatabaseAccountI } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRestorableDatabaseAccountIDInsensitively(input string) (*RestorableDat } id := RestorableDatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/id_table.go b/resource-manager/cosmosdb/2024-05-15/restorables/id_table.go index 3b4bc9cd3b6..a1d58a6e90d 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/id_table.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go index 393966ac68b..536ceceb108 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountsgetbylocation.go @@ -45,7 +45,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsGetByLocation(ctx context.C var model RestorableDatabaseAccountGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslist.go index 84985c07474..874c2df23eb 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslist.go @@ -47,7 +47,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsList(ctx context.Context, i var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go index c471129b5d3..b3d00c3082d 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabledatabaseaccountslistbylocation.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableDatabaseAccountsListByLocation(ctx context. var model RestorableDatabaseAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlindatabaseslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlindatabaseslist.go index 4b9d410ce0b..1de1530f1c5 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlindatabaseslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlindatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableGremlinDatabasesList(ctx context.Context, i var model RestorableGremlinDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlingraphslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlingraphslist.go index 79560702981..8c1c9bcc1c8 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlingraphslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlingraphslist.go @@ -36,6 +36,7 @@ func (o RestorableGremlinGraphsListOperationOptions) ToHeaders() *client.Headers func (o RestorableGremlinGraphsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableGremlinGraphsList(ctx context.Context, id R var model RestorableGremlinGraphsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlinresourceslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlinresourceslist.go index b4b2baaa38e..ed88ce785d0 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlinresourceslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablegremlinresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableGremlinResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableGremlinResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableGremlinResourcesList(ctx context.Context, i var model RestorableGremlinResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbcollectionslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbcollectionslist.go index 36dbc2ed0af..634d30fb9b6 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbcollectionslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbcollectionslist.go @@ -36,6 +36,7 @@ func (o RestorableMongodbCollectionsListOperationOptions) ToHeaders() *client.He func (o RestorableMongodbCollectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableMongodbCollectionsList(ctx context.Context, var model RestorableMongodbCollectionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbdatabaseslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbdatabaseslist.go index d37fa4b90dc..70bff11cfac 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbdatabaseslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbdatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableMongodbDatabasesList(ctx context.Context, i var model RestorableMongodbDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbresourceslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbresourceslist.go index aa8793d9088..b9c7d94bfd8 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbresourceslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablemongodbresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableMongodbResourcesListOperationOptions) ToHeaders() *client.Head func (o RestorableMongodbResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableMongodbResourcesList(ctx context.Context, i var model RestorableMongodbResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlcontainerslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlcontainerslist.go index 8e5272abbd7..c2c8624e6a3 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlcontainerslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlcontainerslist.go @@ -36,6 +36,7 @@ func (o RestorableSqlContainersListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c RestorablesClient) RestorableSqlContainersList(ctx context.Context, id R var model RestorableSqlContainersListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqldatabaseslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqldatabaseslist.go index 4fee5e5c279..7b15c2d9b25 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqldatabaseslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqldatabaseslist.go @@ -46,7 +46,6 @@ func (c RestorablesClient) RestorableSqlDatabasesList(ctx context.Context, id Re var model RestorableSqlDatabasesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlresourceslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlresourceslist.go index 0447b113b2e..e326137bb93 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlresourceslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorablesqlresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableSqlResourcesListOperationOptions) ToHeaders() *client.Headers func (o RestorableSqlResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableSqlResourcesList(ctx context.Context, id Re var model RestorableSqlResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableresourceslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableresourceslist.go index fac595e97cf..9fb261ac67c 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableresourceslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableresourceslist.go @@ -35,6 +35,7 @@ func (o RestorableTableResourcesListOperationOptions) ToHeaders() *client.Header func (o RestorableTableResourcesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTableResourcesList(ctx context.Context, id var model RestorableTableResourcesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableslist.go b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableslist.go index 1cd08b2da3e..fd4c0a4039d 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableslist.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/method_restorabletableslist.go @@ -35,6 +35,7 @@ func (o RestorableTablesListOperationOptions) ToHeaders() *client.Headers { func (o RestorableTablesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorablesClient) RestorableTablesList(ctx context.Context, id Restorab var model RestorableTablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/restorables/version.go b/resource-manager/cosmosdb/2024-05-15/restorables/version.go index 6416d20d404..f68a266305d 100644 --- a/resource-manager/cosmosdb/2024-05-15/restorables/version.go +++ b/resource-manager/cosmosdb/2024-05-15/restorables/version.go @@ -1,12 +1,10 @@ package restorables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorables/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/services/README.md b/resource-manager/cosmosdb/2024-05-15/services/README.md index 0e793629feb..e53ad12ee8e 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/README.md +++ b/resource-manager/cosmosdb/2024-05-15/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `services` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/services/client.go b/resource-manager/cosmosdb/2024-05-15/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/client.go +++ b/resource-manager/cosmosdb/2024-05-15/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/services/id_databaseaccount.go b/resource-manager/cosmosdb/2024-05-15/services/id_databaseaccount.go index 85144fd862b..0a26a90bfdc 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/id_databaseaccount.go +++ b/resource-manager/cosmosdb/2024-05-15/services/id_databaseaccount.go @@ -42,7 +42,7 @@ func ParseDatabaseAccountID(input string) (*DatabaseAccountId, error) { } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDatabaseAccountIDInsensitively(input string) (*DatabaseAccountId, erro } id := DatabaseAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/services/method_servicelist.go b/resource-manager/cosmosdb/2024-05-15/services/method_servicelist.go index 2d6af4e6fe9..767b21042fc 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/method_servicelist.go +++ b/resource-manager/cosmosdb/2024-05-15/services/method_servicelist.go @@ -46,7 +46,6 @@ func (c ServicesClient) ServiceList(ctx context.Context, id DatabaseAccountId) ( var model ServiceResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/services/model_datatransferserviceresourceproperties.go index 05d249f7a06..6564d315929 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/services/model_graphapicomputeserviceresourceproperties.go index e92c68fc016..a738fff301e 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go index bbfe5028e91..3fb1d86d5e4 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_serviceresource.go b/resource-manager/cosmosdb/2024-05-15/services/model_serviceresource.go index e27fcdd8883..b029223cf31 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_serviceresource.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/services/model_serviceresourceproperties.go index 55c8ac138fe..cd471df5edb 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go index bb64613e220..1be4bb3bb59 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/services/model_sqldedicatedgatewayserviceresourceproperties.go @@ -19,12 +19,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -48,9 +60,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/services/version.go b/resource-manager/cosmosdb/2024-05-15/services/version.go index da31b82969d..8c937a3699c 100644 --- a/resource-manager/cosmosdb/2024-05-15/services/version.go +++ b/resource-manager/cosmosdb/2024-05-15/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-05-15" } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/README.md b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/README.md index eabce0736af..4f233abf7f8 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/README.md +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway` Documentation -The `sqldedicatedgateway` SDK allows for interaction with the Azure Resource Manager Service `cosmosdb` (API Version `2024-05-15`). +The `sqldedicatedgateway` SDK allows for interaction with Azure Resource Manager `cosmosdb` (API Version `2024-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/client.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/client.go index fecc7a836eb..36faaebb619 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/client.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/client.go @@ -15,7 +15,7 @@ type SqlDedicatedGatewayClient struct { } func NewSqlDedicatedGatewayClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlDedicatedGatewayClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqldedicatedgateway", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlDedicatedGatewayClient: %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/id_service.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/id_service.go index deac5c4e9c1..02e0c9dbf05 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/id_service.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/method_serviceget.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/method_serviceget.go index afe30a2dcd8..e4c481bbe69 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/method_serviceget.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/method_serviceget.go @@ -45,7 +45,6 @@ func (c SqlDedicatedGatewayClient) ServiceGet(ctx context.Context, id ServiceId) var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourcecreateupdateproperties.go index e54ed80bf21..d240d7d056e 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = DataTransferServiceResourceCreateU type DataTransferServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s DataTransferServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = DataTransferServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s DataTransferServiceResourceCreateUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go index dfb970d32da..14399b118ab 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_datatransferserviceresourceproperties.go @@ -17,12 +17,24 @@ type DataTransferServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s DataTransferServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *DataTransferServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s DataTransferServiceResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataTransferServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "DataTransfer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourcecreateupdateproperties.go index b5488e6e7cd..6ce366182ee 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = GraphAPIComputeServiceResourceCrea type GraphAPIComputeServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s GraphAPIComputeServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = GraphAPIComputeServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s GraphAPIComputeServiceResourceCreateUpdateProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go index 5621706c4c8..4a3df37bd1c 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_graphapicomputeserviceresourceproperties.go @@ -18,12 +18,24 @@ type GraphAPIComputeServiceResourceProperties struct { Locations *[]GraphAPIComputeRegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s GraphAPIComputeServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *GraphAPIComputeServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -47,9 +59,10 @@ func (s GraphAPIComputeServiceResourceProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GraphAPIComputeServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "GraphAPICompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go index 054196357c3..16b8151945a 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourcecreateupdateproperties.go @@ -13,8 +13,18 @@ var _ ServiceResourceCreateUpdateProperties = MaterializedViewsBuilderServiceRes type MaterializedViewsBuilderServiceResourceCreateUpdateProperties struct { // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = MaterializedViewsBuilderServiceResourceCreateUpdateProperties{} @@ -28,9 +38,10 @@ func (s MaterializedViewsBuilderServiceResourceCreateUpdateProperties) MarshalJS } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go index c530a00d242..9062b4166c3 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_materializedviewsbuilderserviceresourceproperties.go @@ -17,12 +17,24 @@ type MaterializedViewsBuilderServiceResourceProperties struct { Locations *[]RegionalServiceResource `json:"locations,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s MaterializedViewsBuilderServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *MaterializedViewsBuilderServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -46,9 +58,10 @@ func (s MaterializedViewsBuilderServiceResourceProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MaterializedViewsBuilderServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "MaterializedViewsBuilder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresource.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresource.go index b85d11d4927..3aa12eed447 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresource.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresource.go @@ -34,7 +34,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateparameters.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateparameters.go index 97d1168cb16..b66a4989722 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateparameters.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateparameters.go @@ -22,7 +22,7 @@ func (s *ServiceResourceCreateUpdateParameters) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourceCreateUpdatePropertiesImplementation(v) + impl, err := UnmarshalServiceResourceCreateUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResourceCreateUpdateParameters': %+v", err) } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateproperties.go index 1eade30a41d..e8656c6abf7 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourcecreateupdateproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceCreateUpdateProperties interface { + ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl } -// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceCreateUpdateProperties = BaseServiceResourceCreateUpdatePropertiesImpl{} + +type BaseServiceResourceCreateUpdatePropertiesImpl struct { + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s BaseServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s +} + +var _ ServiceResourceCreateUpdateProperties = RawServiceResourceCreateUpdatePropertiesImpl{} + +// RawServiceResourceCreateUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourceCreateUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceCreateUpdateProperties BaseServiceResourceCreateUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourceCreateUpdatePropertiesImpl) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return s.serviceResourceCreateUpdateProperties } -func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { +func UnmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) (ServiceResourceCreateUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalServiceResourceCreateUpdatePropertiesImplementation(input []byte) return out, nil } - out := RawServiceResourceCreateUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourceCreateUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourceCreateUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourceCreateUpdatePropertiesImpl{ + serviceResourceCreateUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourceproperties.go index 73d5a0131fe..4a74dbc3772 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_serviceresourceproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CreationTime *string `json:"creationTime,omitempty"` + InstanceCount *int64 `json:"instanceCount,omitempty"` + InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` + Status *ServiceStatus `json:"status,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go index dedb2816cdd..223d32eed77 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourcecreateupdateproperties.go @@ -14,8 +14,18 @@ type SqlDedicatedGatewayServiceResourceCreateUpdateProperties struct { DedicatedGatewayType *DedicatedGatewayType `json:"dedicatedGatewayType,omitempty"` // Fields inherited from ServiceResourceCreateUpdateProperties + InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` +} + +func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) ServiceResourceCreateUpdateProperties() BaseServiceResourceCreateUpdatePropertiesImpl { + return BaseServiceResourceCreateUpdatePropertiesImpl{ + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + } } var _ json.Marshaler = SqlDedicatedGatewayServiceResourceCreateUpdateProperties{} @@ -29,9 +39,10 @@ func (s SqlDedicatedGatewayServiceResourceCreateUpdateProperties) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceCreateUpdateProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go index 81963f86275..fe6bd3a7a54 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/model_sqldedicatedgatewayserviceresourceproperties.go @@ -19,12 +19,24 @@ type SqlDedicatedGatewayServiceResourceProperties struct { SqlDedicatedGatewayEndpoint *string `json:"sqlDedicatedGatewayEndpoint,omitempty"` // Fields inherited from ServiceResourceProperties + CreationTime *string `json:"creationTime,omitempty"` InstanceCount *int64 `json:"instanceCount,omitempty"` InstanceSize *ServiceSize `json:"instanceSize,omitempty"` + ServiceType ServiceType `json:"serviceType"` Status *ServiceStatus `json:"status,omitempty"` } +func (s SqlDedicatedGatewayServiceResourceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CreationTime: s.CreationTime, + InstanceCount: s.InstanceCount, + InstanceSize: s.InstanceSize, + ServiceType: s.ServiceType, + Status: s.Status, + } +} + func (o *SqlDedicatedGatewayServiceResourceProperties) GetCreationTimeAsTime() (*time.Time, error) { if o.CreationTime == nil { return nil, nil @@ -48,9 +60,10 @@ func (s SqlDedicatedGatewayServiceResourceProperties) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDedicatedGatewayServiceResourceProperties: %+v", err) } + decoded["serviceType"] = "SqlDedicatedGateway" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/version.go b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/version.go index 9b3aed106ce..fd321a51394 100644 --- a/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/version.go +++ b/resource-manager/cosmosdb/2024-05-15/sqldedicatedgateway/version.go @@ -1,12 +1,10 @@ package sqldedicatedgateway -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqldedicatedgateway/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqldedicatedgateway/2024-05-15" } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/README.md b/resource-manager/costmanagement/2021-10-01/alerts/README.md index ab52d33dbb1..106a728b9bc 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/README.md +++ b/resource-manager/costmanagement/2021-10-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/alerts/client.go b/resource-manager/costmanagement/2021-10-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/client.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/id_scopedalert.go b/resource-manager/costmanagement/2021-10-01/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/method_dismiss.go b/resource-manager/costmanagement/2021-10-01/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/method_get.go b/resource-manager/costmanagement/2021-10-01/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/method_get.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/alerts/version.go b/resource-manager/costmanagement/2021-10-01/alerts/version.go index 8ebba511458..993a3115707 100644 --- a/resource-manager/costmanagement/2021-10-01/alerts/version.go +++ b/resource-manager/costmanagement/2021-10-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/README.md b/resource-manager/costmanagement/2021-10-01/dimensions/README.md index f31536f783e..dfaa7240afb 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/README.md +++ b/resource-manager/costmanagement/2021-10-01/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/client.go b/resource-manager/costmanagement/2021-10-01/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/client.go +++ b/resource-manager/costmanagement/2021-10-01/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/method_list.go b/resource-manager/costmanagement/2021-10-01/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/method_list.go +++ b/resource-manager/costmanagement/2021-10-01/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/dimensions/version.go b/resource-manager/costmanagement/2021-10-01/dimensions/version.go index 2495e89b2dd..722beed789e 100644 --- a/resource-manager/costmanagement/2021-10-01/dimensions/version.go +++ b/resource-manager/costmanagement/2021-10-01/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/exports/README.md b/resource-manager/costmanagement/2021-10-01/exports/README.md index 77f79d25d05..cbc44920875 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/README.md +++ b/resource-manager/costmanagement/2021-10-01/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/exports/client.go b/resource-manager/costmanagement/2021-10-01/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/client.go +++ b/resource-manager/costmanagement/2021-10-01/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go b/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go b/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/exports/method_get.go b/resource-manager/costmanagement/2021-10-01/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/method_get.go +++ b/resource-manager/costmanagement/2021-10-01/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/exports/method_list.go b/resource-manager/costmanagement/2021-10-01/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/method_list.go +++ b/resource-manager/costmanagement/2021-10-01/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/exports/version.go b/resource-manager/costmanagement/2021-10-01/exports/version.go index 96be6d93da3..5f1858d26b4 100644 --- a/resource-manager/costmanagement/2021-10-01/exports/version.go +++ b/resource-manager/costmanagement/2021-10-01/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/forecast/README.md b/resource-manager/costmanagement/2021-10-01/forecast/README.md index ccbaa81d89d..c35d4f84b30 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/README.md +++ b/resource-manager/costmanagement/2021-10-01/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/forecast/client.go b/resource-manager/costmanagement/2021-10-01/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/client.go +++ b/resource-manager/costmanagement/2021-10-01/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2021-10-01/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2021-10-01/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/forecast/method_usage.go b/resource-manager/costmanagement/2021-10-01/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/method_usage.go +++ b/resource-manager/costmanagement/2021-10-01/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/forecast/version.go b/resource-manager/costmanagement/2021-10-01/forecast/version.go index 3c0cb31a2be..83591f0a359 100644 --- a/resource-manager/costmanagement/2021-10-01/forecast/version.go +++ b/resource-manager/costmanagement/2021-10-01/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/query/README.md b/resource-manager/costmanagement/2021-10-01/query/README.md index dd9f38233dd..4e909d403ee 100644 --- a/resource-manager/costmanagement/2021-10-01/query/README.md +++ b/resource-manager/costmanagement/2021-10-01/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/query/client.go b/resource-manager/costmanagement/2021-10-01/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2021-10-01/query/client.go +++ b/resource-manager/costmanagement/2021-10-01/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2021-10-01/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/query/method_usage.go b/resource-manager/costmanagement/2021-10-01/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2021-10-01/query/method_usage.go +++ b/resource-manager/costmanagement/2021-10-01/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2021-10-01/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2021-10-01/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2021-10-01/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/query/version.go b/resource-manager/costmanagement/2021-10-01/query/version.go index f4035c1d29d..c59e512f4b9 100644 --- a/resource-manager/costmanagement/2021-10-01/query/version.go +++ b/resource-manager/costmanagement/2021-10-01/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/README.md b/resource-manager/costmanagement/2021-10-01/reservedinstances/README.md index 1320cae32b3..deb4ac3d8c6 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/README.md +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/client.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/client.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2021-10-01/reservedinstances/version.go b/resource-manager/costmanagement/2021-10-01/reservedinstances/version.go index 32f2f09cabb..78079733607 100644 --- a/resource-manager/costmanagement/2021-10-01/reservedinstances/version.go +++ b/resource-manager/costmanagement/2021-10-01/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/usagedetails/README.md b/resource-manager/costmanagement/2021-10-01/usagedetails/README.md index 0afffb27a80..4c5c2827c76 100644 --- a/resource-manager/costmanagement/2021-10-01/usagedetails/README.md +++ b/resource-manager/costmanagement/2021-10-01/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/usagedetails/client.go b/resource-manager/costmanagement/2021-10-01/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2021-10-01/usagedetails/client.go +++ b/resource-manager/costmanagement/2021-10-01/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/usagedetails/version.go b/resource-manager/costmanagement/2021-10-01/usagedetails/version.go index 2f671d34d64..fe4e6181072 100644 --- a/resource-manager/costmanagement/2021-10-01/usagedetails/version.go +++ b/resource-manager/costmanagement/2021-10-01/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2021-10-01" } diff --git a/resource-manager/costmanagement/2021-10-01/views/README.md b/resource-manager/costmanagement/2021-10-01/views/README.md index eb00e1b8644..369a32aa2ec 100644 --- a/resource-manager/costmanagement/2021-10-01/views/README.md +++ b/resource-manager/costmanagement/2021-10-01/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2021-10-01/views/client.go b/resource-manager/costmanagement/2021-10-01/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2021-10-01/views/client.go +++ b/resource-manager/costmanagement/2021-10-01/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2021-10-01/views/id_scopedview.go b/resource-manager/costmanagement/2021-10-01/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2021-10-01/views/id_scopedview.go +++ b/resource-manager/costmanagement/2021-10-01/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/views/id_view.go b/resource-manager/costmanagement/2021-10-01/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2021-10-01/views/id_view.go +++ b/resource-manager/costmanagement/2021-10-01/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2021-10-01/views/method_createorupdate.go b/resource-manager/costmanagement/2021-10-01/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2021-10-01/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2021-10-01/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2021-10-01/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2021-10-01/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2021-10-01/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/views/method_get.go b/resource-manager/costmanagement/2021-10-01/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2021-10-01/views/method_get.go +++ b/resource-manager/costmanagement/2021-10-01/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/views/method_getbyscope.go b/resource-manager/costmanagement/2021-10-01/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2021-10-01/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2021-10-01/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2021-10-01/views/version.go b/resource-manager/costmanagement/2021-10-01/views/version.go index 7ce8636a5ef..0b817b23154 100644 --- a/resource-manager/costmanagement/2021-10-01/views/version.go +++ b/resource-manager/costmanagement/2021-10-01/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2021-10-01" } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/README.md b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/README.md index 64b789b2719..a2b2f82bfcd 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/README.md +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-06-01-preview`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/client.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/client.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdate.go index 05d0e043801..bada485b8fe 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdatebyscope.go index 5146690cf6c..636c9075980 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_get.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_list.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/version.go b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/version.go index a8a14260e27..ff08bd05729 100644 --- a/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/version.go +++ b/resource-manager/costmanagement/2022-06-01-preview/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2022-06-01-preview" } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/README.md b/resource-manager/costmanagement/2022-10-01/alerts/README.md index b0464e07112..5e981de11e6 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/README.md +++ b/resource-manager/costmanagement/2022-10-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/alerts/client.go b/resource-manager/costmanagement/2022-10-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/client.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/id_scopedalert.go b/resource-manager/costmanagement/2022-10-01/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/method_dismiss.go b/resource-manager/costmanagement/2022-10-01/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/method_get.go b/resource-manager/costmanagement/2022-10-01/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/method_get.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/alerts/version.go b/resource-manager/costmanagement/2022-10-01/alerts/version.go index d577b5aeacd..c600dc1c156 100644 --- a/resource-manager/costmanagement/2022-10-01/alerts/version.go +++ b/resource-manager/costmanagement/2022-10-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/README.md b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/README.md index 99a31cd305a..2b9ca58af58 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/README.md +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/benefitrecommendations` Documentation -The `benefitrecommendations` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `benefitrecommendations` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/client.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/client.go index a01d721f32f..2e248713c75 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/client.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/client.go @@ -15,7 +15,7 @@ type BenefitRecommendationsClient struct { } func NewBenefitRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitRecommendationsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/method_list.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/method_list.go index 27da9258c6b..2cab4a79073 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/method_list.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationmodel.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationmodel.go index 5151a7aafc2..00f53d6c3d2 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationmodel.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationmodel.go @@ -36,7 +36,7 @@ func (s *BenefitRecommendationModel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBenefitRecommendationPropertiesImplementation(v) + impl, err := UnmarshalBenefitRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BenefitRecommendationModel': %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationproperties.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationproperties.go index c64301ec1c0..7945d1cb52c 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_benefitrecommendationproperties.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitRecommendationProperties interface { + BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl } -// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitRecommendationProperties = BaseBenefitRecommendationPropertiesImpl{} + +type BaseBenefitRecommendationPropertiesImpl struct { + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` + ArmSkuName *string `json:"armSkuName,omitempty"` + CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` + CostWithoutBenefit *float64 `json:"costWithoutBenefit,omitempty"` + CurrencyCode *string `json:"currencyCode,omitempty"` + FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"` + LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` + LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` + RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` + Term *Term `json:"term,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` + Usage *RecommendationUsageDetails `json:"usage,omitempty"` +} + +func (s BaseBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s +} + +var _ BenefitRecommendationProperties = RawBenefitRecommendationPropertiesImpl{} + +// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + benefitRecommendationProperties BaseBenefitRecommendationPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s.benefitRecommendationProperties } -func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { +func UnmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (Benef return out, nil } - out := RawBenefitRecommendationPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBenefitRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitRecommendationPropertiesImpl: %+v", err) } - return out, nil + + return RawBenefitRecommendationPropertiesImpl{ + benefitRecommendationProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go index 81a5f6f0e30..0dd2c7d6693 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go @@ -16,6 +16,7 @@ var _ BenefitRecommendationProperties = SharedScopeBenefitRecommendationProperti type SharedScopeBenefitRecommendationProperties struct { // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -25,11 +26,30 @@ type SharedScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SharedScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -65,9 +85,10 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharedScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go index ec6d12ef9c0..c4f7b62d4f2 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go @@ -18,6 +18,7 @@ type SingleScopeBenefitRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -27,11 +28,30 @@ type SingleScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SingleScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -67,9 +87,10 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/version.go b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/version.go index ad053437068..b8b0c35595c 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitrecommendations/version.go +++ b/resource-manager/costmanagement/2022-10-01/benefitrecommendations/version.go @@ -1,12 +1,10 @@ package benefitrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitrecommendations/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/README.md b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/README.md index 02a0569884a..fe8ec1dcfb4 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/README.md +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries` Documentation -The `benefitutilizationsummaries` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `benefitutilizationsummaries` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/client.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/client.go index a1791ea3fd4..7a4ecf7c986 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/client.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesClient struct { } func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingaccount.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingaccount.go index fed7acf47e4..754dd311dd5 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingaccount.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingprofile.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingprofile.go index 36a4181f9fc..8bcadc0f7b9 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingprofile.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplan.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplan.go index 435f572e064..95490c9057f 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplan.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplanorder.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplanorder.go index ce4a1cce3ff..ce828821476 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingaccountid.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingaccountid.go index e541d866d32..802f44ece83 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingaccountid.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingaccountid.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingAccountId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingprofileid.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingprofileid.go index 5e0b8f92cce..75947163736 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingprofileid.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbybillingprofileid.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingProfileId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanid.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanid.go index 01c5f8c1032..689a3a2b24c 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanid.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanid.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanIdOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanId(ctx context.Conte temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanorder.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanorder.go index c7b749ca32a..6e484f25bac 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanorder.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/method_listbysavingsplanorder.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanOrderOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanOrder(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_benefitutilizationsummary.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_benefitutilizationsummary.go index 3a145e88ea1..8c2269fa24d 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_benefitutilizationsummary.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_benefitutilizationsummary.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitUtilizationSummary interface { + BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl } -// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitUtilizationSummary = BaseBenefitUtilizationSummaryImpl{} + +type BaseBenefitUtilizationSummaryImpl struct { + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s +} + +var _ BenefitUtilizationSummary = RawBenefitUtilizationSummaryImpl{} + +// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitUtilizationSummaryImpl struct { - Type string - Values map[string]interface{} + benefitUtilizationSummary BaseBenefitUtilizationSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s.benefitUtilizationSummary } -func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { +func UnmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtil return out, nil } - out := RawBenefitUtilizationSummaryImpl{ - Type: value, - Values: temp, + var parent BaseBenefitUtilizationSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitUtilizationSummaryImpl: %+v", err) } - return out, nil + + return RawBenefitUtilizationSummaryImpl{ + benefitUtilizationSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go index 48e7170c8de..863b9cd100a 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go @@ -14,9 +14,20 @@ type IncludedQuantityUtilizationSummary struct { Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IncludedQuantityUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IncludedQuantityUtilizationSummary{} @@ -30,9 +41,10 @@ func (s IncludedQuantityUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IncludedQuantityUtilizationSummary: %+v", err) } + decoded["kind"] = "IncludedQuantity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go index 6d6a6d56802..2920f6dc0bf 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go @@ -14,9 +14,20 @@ type SavingsPlanUtilizationSummary struct { Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SavingsPlanUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SavingsPlanUtilizationSummary{} @@ -30,9 +41,10 @@ func (s SavingsPlanUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SavingsPlanUtilizationSummary: %+v", err) } + decoded["kind"] = "SavingsPlan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/version.go b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/version.go index 4dba8fb3b51..af8bee95894 100644 --- a/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/version.go +++ b/resource-manager/costmanagement/2022-10-01/benefitutilizationsummaries/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummaries/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/costdetails/README.md b/resource-manager/costmanagement/2022-10-01/costdetails/README.md index 01e386b57e2..dd5c7650173 100644 --- a/resource-manager/costmanagement/2022-10-01/costdetails/README.md +++ b/resource-manager/costmanagement/2022-10-01/costdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/costdetails` Documentation -The `costdetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `costdetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/costdetails/client.go b/resource-manager/costmanagement/2022-10-01/costdetails/client.go index e7cebe17215..d109cc872ba 100644 --- a/resource-manager/costmanagement/2022-10-01/costdetails/client.go +++ b/resource-manager/costmanagement/2022-10-01/costdetails/client.go @@ -15,7 +15,7 @@ type CostDetailsClient struct { } func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/costdetails/version.go b/resource-manager/costmanagement/2022-10-01/costdetails/version.go index 3d97a665eac..51c49edf3df 100644 --- a/resource-manager/costmanagement/2022-10-01/costdetails/version.go +++ b/resource-manager/costmanagement/2022-10-01/costdetails/version.go @@ -1,12 +1,10 @@ package costdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costdetails/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/README.md b/resource-manager/costmanagement/2022-10-01/dimensions/README.md index 9b79e084a8d..55cd13094a9 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/README.md +++ b/resource-manager/costmanagement/2022-10-01/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/client.go b/resource-manager/costmanagement/2022-10-01/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/client.go +++ b/resource-manager/costmanagement/2022-10-01/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/method_list.go b/resource-manager/costmanagement/2022-10-01/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/method_list.go +++ b/resource-manager/costmanagement/2022-10-01/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/dimensions/version.go b/resource-manager/costmanagement/2022-10-01/dimensions/version.go index a7bf311c6af..ffdef9d9081 100644 --- a/resource-manager/costmanagement/2022-10-01/dimensions/version.go +++ b/resource-manager/costmanagement/2022-10-01/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/exports/README.md b/resource-manager/costmanagement/2022-10-01/exports/README.md index 5bd7c94c63b..d627d61a5da 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/README.md +++ b/resource-manager/costmanagement/2022-10-01/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/exports/client.go b/resource-manager/costmanagement/2022-10-01/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/client.go +++ b/resource-manager/costmanagement/2022-10-01/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/exports/id_scopedexport.go b/resource-manager/costmanagement/2022-10-01/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2022-10-01/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/exports/method_createorupdate.go b/resource-manager/costmanagement/2022-10-01/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2022-10-01/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/exports/method_get.go b/resource-manager/costmanagement/2022-10-01/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/method_get.go +++ b/resource-manager/costmanagement/2022-10-01/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2022-10-01/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2022-10-01/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/exports/method_list.go b/resource-manager/costmanagement/2022-10-01/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/method_list.go +++ b/resource-manager/costmanagement/2022-10-01/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/exports/version.go b/resource-manager/costmanagement/2022-10-01/exports/version.go index e7c0c93b03f..ad6d3ac7cba 100644 --- a/resource-manager/costmanagement/2022-10-01/exports/version.go +++ b/resource-manager/costmanagement/2022-10-01/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/forecast/README.md b/resource-manager/costmanagement/2022-10-01/forecast/README.md index c5a75b9db1b..c023c2fc7c3 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/README.md +++ b/resource-manager/costmanagement/2022-10-01/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/forecast/client.go b/resource-manager/costmanagement/2022-10-01/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/client.go +++ b/resource-manager/costmanagement/2022-10-01/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2022-10-01/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2022-10-01/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/forecast/method_usage.go b/resource-manager/costmanagement/2022-10-01/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/method_usage.go +++ b/resource-manager/costmanagement/2022-10-01/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/forecast/version.go b/resource-manager/costmanagement/2022-10-01/forecast/version.go index 245a8ea2f34..dc38c517ccd 100644 --- a/resource-manager/costmanagement/2022-10-01/forecast/version.go +++ b/resource-manager/costmanagement/2022-10-01/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/pricesheets/README.md b/resource-manager/costmanagement/2022-10-01/pricesheets/README.md index 74fda3e9a13..797323591be 100644 --- a/resource-manager/costmanagement/2022-10-01/pricesheets/README.md +++ b/resource-manager/costmanagement/2022-10-01/pricesheets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/pricesheets` Documentation -The `pricesheets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `pricesheets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/pricesheets/client.go b/resource-manager/costmanagement/2022-10-01/pricesheets/client.go index 426633c8f50..395b4b3794a 100644 --- a/resource-manager/costmanagement/2022-10-01/pricesheets/client.go +++ b/resource-manager/costmanagement/2022-10-01/pricesheets/client.go @@ -15,7 +15,7 @@ type PriceSheetsClient struct { } func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/pricesheets/id_billingprofile.go b/resource-manager/costmanagement/2022-10-01/pricesheets/id_billingprofile.go index 6bdcc943e59..c20f50555d7 100644 --- a/resource-manager/costmanagement/2022-10-01/pricesheets/id_billingprofile.go +++ b/resource-manager/costmanagement/2022-10-01/pricesheets/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/pricesheets/id_invoice.go b/resource-manager/costmanagement/2022-10-01/pricesheets/id_invoice.go index a4f2544f090..e786ff1d4ee 100644 --- a/resource-manager/costmanagement/2022-10-01/pricesheets/id_invoice.go +++ b/resource-manager/costmanagement/2022-10-01/pricesheets/id_invoice.go @@ -42,7 +42,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/pricesheets/version.go b/resource-manager/costmanagement/2022-10-01/pricesheets/version.go index dd92bfd815d..ee91e801c7b 100644 --- a/resource-manager/costmanagement/2022-10-01/pricesheets/version.go +++ b/resource-manager/costmanagement/2022-10-01/pricesheets/version.go @@ -1,12 +1,10 @@ package pricesheets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheets/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/query/README.md b/resource-manager/costmanagement/2022-10-01/query/README.md index 28dcb9843db..8a99e7768b8 100644 --- a/resource-manager/costmanagement/2022-10-01/query/README.md +++ b/resource-manager/costmanagement/2022-10-01/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/query/client.go b/resource-manager/costmanagement/2022-10-01/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2022-10-01/query/client.go +++ b/resource-manager/costmanagement/2022-10-01/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2022-10-01/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/query/method_usage.go b/resource-manager/costmanagement/2022-10-01/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2022-10-01/query/method_usage.go +++ b/resource-manager/costmanagement/2022-10-01/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2022-10-01/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2022-10-01/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2022-10-01/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/query/version.go b/resource-manager/costmanagement/2022-10-01/query/version.go index b9e9b4da9ae..79bae9e882c 100644 --- a/resource-manager/costmanagement/2022-10-01/query/version.go +++ b/resource-manager/costmanagement/2022-10-01/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/README.md b/resource-manager/costmanagement/2022-10-01/reservedinstances/README.md index b090ab4d9c4..41fa392beb5 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/README.md +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/client.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/client.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-10-01/reservedinstances/version.go b/resource-manager/costmanagement/2022-10-01/reservedinstances/version.go index 869a597a408..029023f2bef 100644 --- a/resource-manager/costmanagement/2022-10-01/reservedinstances/version.go +++ b/resource-manager/costmanagement/2022-10-01/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/README.md b/resource-manager/costmanagement/2022-10-01/scheduledactions/README.md index 3d04f3fdc89..000c59a804c 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/README.md +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/client.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/client.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdate.go index 7ce81fbece9..4a9d5d9fc3d 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdatebyscope.go index c87a0eb91fc..89c59910780 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_createorupdatebyscope.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateByScopeOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_get.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_list.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2022-10-01/scheduledactions/version.go b/resource-manager/costmanagement/2022-10-01/scheduledactions/version.go index a5c1a30ebc1..ff0bf6bd438 100644 --- a/resource-manager/costmanagement/2022-10-01/scheduledactions/version.go +++ b/resource-manager/costmanagement/2022-10-01/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/usagedetails/README.md b/resource-manager/costmanagement/2022-10-01/usagedetails/README.md index 76b24c1247e..faa5149196c 100644 --- a/resource-manager/costmanagement/2022-10-01/usagedetails/README.md +++ b/resource-manager/costmanagement/2022-10-01/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/usagedetails/client.go b/resource-manager/costmanagement/2022-10-01/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2022-10-01/usagedetails/client.go +++ b/resource-manager/costmanagement/2022-10-01/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/usagedetails/version.go b/resource-manager/costmanagement/2022-10-01/usagedetails/version.go index f8fb6b49480..1446eae0e23 100644 --- a/resource-manager/costmanagement/2022-10-01/usagedetails/version.go +++ b/resource-manager/costmanagement/2022-10-01/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2022-10-01" } diff --git a/resource-manager/costmanagement/2022-10-01/views/README.md b/resource-manager/costmanagement/2022-10-01/views/README.md index a6dfad987e0..618ae468c70 100644 --- a/resource-manager/costmanagement/2022-10-01/views/README.md +++ b/resource-manager/costmanagement/2022-10-01/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2022-10-01`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2022-10-01/views/client.go b/resource-manager/costmanagement/2022-10-01/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2022-10-01/views/client.go +++ b/resource-manager/costmanagement/2022-10-01/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go b/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go +++ b/resource-manager/costmanagement/2022-10-01/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/views/id_view.go b/resource-manager/costmanagement/2022-10-01/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2022-10-01/views/id_view.go +++ b/resource-manager/costmanagement/2022-10-01/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2022-10-01/views/method_createorupdate.go b/resource-manager/costmanagement/2022-10-01/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2022-10-01/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2022-10-01/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2022-10-01/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2022-10-01/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2022-10-01/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/views/method_get.go b/resource-manager/costmanagement/2022-10-01/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2022-10-01/views/method_get.go +++ b/resource-manager/costmanagement/2022-10-01/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/views/method_getbyscope.go b/resource-manager/costmanagement/2022-10-01/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2022-10-01/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2022-10-01/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2022-10-01/views/version.go b/resource-manager/costmanagement/2022-10-01/views/version.go index b517aab914e..40d34f474ed 100644 --- a/resource-manager/costmanagement/2022-10-01/views/version.go +++ b/resource-manager/costmanagement/2022-10-01/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2022-10-01" } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/README.md b/resource-manager/costmanagement/2023-03-01/alerts/README.md index 7f4cb873da9..522f7383976 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/README.md +++ b/resource-manager/costmanagement/2023-03-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/alerts/client.go b/resource-manager/costmanagement/2023-03-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/client.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/id_scopedalert.go b/resource-manager/costmanagement/2023-03-01/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/method_dismiss.go b/resource-manager/costmanagement/2023-03-01/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/method_get.go b/resource-manager/costmanagement/2023-03-01/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/method_get.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/alerts/version.go b/resource-manager/costmanagement/2023-03-01/alerts/version.go index 249bfafa3f0..06fc889d49e 100644 --- a/resource-manager/costmanagement/2023-03-01/alerts/version.go +++ b/resource-manager/costmanagement/2023-03-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/README.md b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/README.md index 011ce386460..aeba005a65a 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/README.md +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/benefitrecommendations` Documentation -The `benefitrecommendations` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `benefitrecommendations` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/client.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/client.go index a01d721f32f..2e248713c75 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/client.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/client.go @@ -15,7 +15,7 @@ type BenefitRecommendationsClient struct { } func NewBenefitRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitRecommendationsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/method_list.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/method_list.go index 27da9258c6b..2cab4a79073 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/method_list.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationmodel.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationmodel.go index 5151a7aafc2..00f53d6c3d2 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationmodel.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationmodel.go @@ -36,7 +36,7 @@ func (s *BenefitRecommendationModel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBenefitRecommendationPropertiesImplementation(v) + impl, err := UnmarshalBenefitRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BenefitRecommendationModel': %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationproperties.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationproperties.go index c64301ec1c0..7945d1cb52c 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_benefitrecommendationproperties.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitRecommendationProperties interface { + BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl } -// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitRecommendationProperties = BaseBenefitRecommendationPropertiesImpl{} + +type BaseBenefitRecommendationPropertiesImpl struct { + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` + ArmSkuName *string `json:"armSkuName,omitempty"` + CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` + CostWithoutBenefit *float64 `json:"costWithoutBenefit,omitempty"` + CurrencyCode *string `json:"currencyCode,omitempty"` + FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"` + LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` + LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` + RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` + Term *Term `json:"term,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` + Usage *RecommendationUsageDetails `json:"usage,omitempty"` +} + +func (s BaseBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s +} + +var _ BenefitRecommendationProperties = RawBenefitRecommendationPropertiesImpl{} + +// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + benefitRecommendationProperties BaseBenefitRecommendationPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s.benefitRecommendationProperties } -func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { +func UnmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (Benef return out, nil } - out := RawBenefitRecommendationPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBenefitRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitRecommendationPropertiesImpl: %+v", err) } - return out, nil + + return RawBenefitRecommendationPropertiesImpl{ + benefitRecommendationProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go index 81a5f6f0e30..0dd2c7d6693 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go @@ -16,6 +16,7 @@ var _ BenefitRecommendationProperties = SharedScopeBenefitRecommendationProperti type SharedScopeBenefitRecommendationProperties struct { // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -25,11 +26,30 @@ type SharedScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SharedScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -65,9 +85,10 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharedScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go index ec6d12ef9c0..c4f7b62d4f2 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go @@ -18,6 +18,7 @@ type SingleScopeBenefitRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -27,11 +28,30 @@ type SingleScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SingleScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -67,9 +87,10 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/version.go b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/version.go index 29ab3789fe1..3290809f818 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitrecommendations/version.go +++ b/resource-manager/costmanagement/2023-03-01/benefitrecommendations/version.go @@ -1,12 +1,10 @@ package benefitrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitrecommendations/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/README.md b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/README.md index d82ca297f51..d8c4dec5d82 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/README.md +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries` Documentation -The `benefitutilizationsummaries` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `benefitutilizationsummaries` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/client.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/client.go index a1791ea3fd4..7a4ecf7c986 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/client.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesClient struct { } func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingaccount.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingaccount.go index fed7acf47e4..754dd311dd5 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingprofile.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingprofile.go index 36a4181f9fc..8bcadc0f7b9 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplan.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplan.go index 435f572e064..95490c9057f 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplanorder.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplanorder.go index ce4a1cce3ff..ce828821476 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingaccountid.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingaccountid.go index e541d866d32..802f44ece83 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingaccountid.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingAccountId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingprofileid.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingprofileid.go index 5e0b8f92cce..75947163736 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbybillingprofileid.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingProfileId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanid.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanid.go index 01c5f8c1032..689a3a2b24c 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanid.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanid.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanIdOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanId(ctx context.Conte temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanorder.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanorder.go index c7b749ca32a..6e484f25bac 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanorder.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/method_listbysavingsplanorder.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanOrderOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanOrder(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_benefitutilizationsummary.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_benefitutilizationsummary.go index 3a145e88ea1..8c2269fa24d 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_benefitutilizationsummary.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_benefitutilizationsummary.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitUtilizationSummary interface { + BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl } -// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitUtilizationSummary = BaseBenefitUtilizationSummaryImpl{} + +type BaseBenefitUtilizationSummaryImpl struct { + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s +} + +var _ BenefitUtilizationSummary = RawBenefitUtilizationSummaryImpl{} + +// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitUtilizationSummaryImpl struct { - Type string - Values map[string]interface{} + benefitUtilizationSummary BaseBenefitUtilizationSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s.benefitUtilizationSummary } -func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { +func UnmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtil return out, nil } - out := RawBenefitUtilizationSummaryImpl{ - Type: value, - Values: temp, + var parent BaseBenefitUtilizationSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitUtilizationSummaryImpl: %+v", err) } - return out, nil + + return RawBenefitUtilizationSummaryImpl{ + benefitUtilizationSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go index 48e7170c8de..863b9cd100a 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go @@ -14,9 +14,20 @@ type IncludedQuantityUtilizationSummary struct { Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IncludedQuantityUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IncludedQuantityUtilizationSummary{} @@ -30,9 +41,10 @@ func (s IncludedQuantityUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IncludedQuantityUtilizationSummary: %+v", err) } + decoded["kind"] = "IncludedQuantity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go index 6d6a6d56802..2920f6dc0bf 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go @@ -14,9 +14,20 @@ type SavingsPlanUtilizationSummary struct { Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SavingsPlanUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SavingsPlanUtilizationSummary{} @@ -30,9 +41,10 @@ func (s SavingsPlanUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SavingsPlanUtilizationSummary: %+v", err) } + decoded["kind"] = "SavingsPlan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/version.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/version.go index 17d287a2f9e..70142a1030d 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/version.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummaries/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummaries/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/README.md b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/README.md index 49d67d2f2dc..f342c0d3878 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/README.md +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync` Documentation -The `benefitutilizationsummariesasync` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `benefitutilizationsummariesasync` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/client.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/client.go index 1aeefdac651..85faaf6ba26 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/client.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesAsyncClient struct { } func NewBenefitUtilizationSummariesAsyncClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesAsyncClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesAsyncClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingaccount.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingaccount.go index 4e554ecb41d..1fcf6d9853a 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingprofile.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingprofile.go index e5a6774541c..f85d7006967 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservation.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservation.go index 062dba1498f..5024e4ccd71 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservation.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservationorder.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservationorder.go index 85676317bd7..450d77914a8 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservationorder.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplan.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplan.go index b82feca7660..5f453624229 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplanorder.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplanorder.go index d8eb517093e..48a16367f0c 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/version.go b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/version.go index afa11cc4939..f115dde8012 100644 --- a/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/version.go +++ b/resource-manager/costmanagement/2023-03-01/benefitutilizationsummariesasync/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummariesasync -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummariesasync/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummariesasync/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/costdetails/README.md b/resource-manager/costmanagement/2023-03-01/costdetails/README.md index 08c95115cb3..49e945e3d99 100644 --- a/resource-manager/costmanagement/2023-03-01/costdetails/README.md +++ b/resource-manager/costmanagement/2023-03-01/costdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/costdetails` Documentation -The `costdetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `costdetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/costdetails/client.go b/resource-manager/costmanagement/2023-03-01/costdetails/client.go index e7cebe17215..d109cc872ba 100644 --- a/resource-manager/costmanagement/2023-03-01/costdetails/client.go +++ b/resource-manager/costmanagement/2023-03-01/costdetails/client.go @@ -15,7 +15,7 @@ type CostDetailsClient struct { } func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/costdetails/version.go b/resource-manager/costmanagement/2023-03-01/costdetails/version.go index 2ec8d9e81ec..ca8b511dbd4 100644 --- a/resource-manager/costmanagement/2023-03-01/costdetails/version.go +++ b/resource-manager/costmanagement/2023-03-01/costdetails/version.go @@ -1,12 +1,10 @@ package costdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costdetails/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/README.md b/resource-manager/costmanagement/2023-03-01/dimensions/README.md index 385fff00c57..428fc6b94d0 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/README.md +++ b/resource-manager/costmanagement/2023-03-01/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/client.go b/resource-manager/costmanagement/2023-03-01/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/client.go +++ b/resource-manager/costmanagement/2023-03-01/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/method_list.go b/resource-manager/costmanagement/2023-03-01/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/method_list.go +++ b/resource-manager/costmanagement/2023-03-01/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/dimensions/version.go b/resource-manager/costmanagement/2023-03-01/dimensions/version.go index a650f485560..aab8ee59a2f 100644 --- a/resource-manager/costmanagement/2023-03-01/dimensions/version.go +++ b/resource-manager/costmanagement/2023-03-01/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/exports/README.md b/resource-manager/costmanagement/2023-03-01/exports/README.md index e04e9ca46b7..6958ff9435f 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/README.md +++ b/resource-manager/costmanagement/2023-03-01/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/exports/client.go b/resource-manager/costmanagement/2023-03-01/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/client.go +++ b/resource-manager/costmanagement/2023-03-01/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/exports/id_scopedexport.go b/resource-manager/costmanagement/2023-03-01/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2023-03-01/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/exports/method_createorupdate.go b/resource-manager/costmanagement/2023-03-01/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-03-01/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/exports/method_get.go b/resource-manager/costmanagement/2023-03-01/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/method_get.go +++ b/resource-manager/costmanagement/2023-03-01/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2023-03-01/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2023-03-01/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/exports/method_list.go b/resource-manager/costmanagement/2023-03-01/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/method_list.go +++ b/resource-manager/costmanagement/2023-03-01/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/exports/version.go b/resource-manager/costmanagement/2023-03-01/exports/version.go index 3ac531bd327..4a149e2692c 100644 --- a/resource-manager/costmanagement/2023-03-01/exports/version.go +++ b/resource-manager/costmanagement/2023-03-01/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/forecast/README.md b/resource-manager/costmanagement/2023-03-01/forecast/README.md index ee63d7f1c03..2f2a5827b61 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/README.md +++ b/resource-manager/costmanagement/2023-03-01/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/forecast/client.go b/resource-manager/costmanagement/2023-03-01/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/client.go +++ b/resource-manager/costmanagement/2023-03-01/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2023-03-01/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2023-03-01/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/forecast/method_usage.go b/resource-manager/costmanagement/2023-03-01/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/method_usage.go +++ b/resource-manager/costmanagement/2023-03-01/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/forecast/version.go b/resource-manager/costmanagement/2023-03-01/forecast/version.go index e3533d924fe..e49fed59d66 100644 --- a/resource-manager/costmanagement/2023-03-01/forecast/version.go +++ b/resource-manager/costmanagement/2023-03-01/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/pricesheets/README.md b/resource-manager/costmanagement/2023-03-01/pricesheets/README.md index 8c483192fdf..18dda0c9662 100644 --- a/resource-manager/costmanagement/2023-03-01/pricesheets/README.md +++ b/resource-manager/costmanagement/2023-03-01/pricesheets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/pricesheets` Documentation -The `pricesheets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `pricesheets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/pricesheets/client.go b/resource-manager/costmanagement/2023-03-01/pricesheets/client.go index 426633c8f50..395b4b3794a 100644 --- a/resource-manager/costmanagement/2023-03-01/pricesheets/client.go +++ b/resource-manager/costmanagement/2023-03-01/pricesheets/client.go @@ -15,7 +15,7 @@ type PriceSheetsClient struct { } func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/pricesheets/id_billingprofile.go b/resource-manager/costmanagement/2023-03-01/pricesheets/id_billingprofile.go index 6bdcc943e59..c20f50555d7 100644 --- a/resource-manager/costmanagement/2023-03-01/pricesheets/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-03-01/pricesheets/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/pricesheets/id_invoice.go b/resource-manager/costmanagement/2023-03-01/pricesheets/id_invoice.go index a4f2544f090..e786ff1d4ee 100644 --- a/resource-manager/costmanagement/2023-03-01/pricesheets/id_invoice.go +++ b/resource-manager/costmanagement/2023-03-01/pricesheets/id_invoice.go @@ -42,7 +42,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/pricesheets/version.go b/resource-manager/costmanagement/2023-03-01/pricesheets/version.go index 33761f307d2..939d58b5cde 100644 --- a/resource-manager/costmanagement/2023-03-01/pricesheets/version.go +++ b/resource-manager/costmanagement/2023-03-01/pricesheets/version.go @@ -1,12 +1,10 @@ package pricesheets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheets/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/query/README.md b/resource-manager/costmanagement/2023-03-01/query/README.md index a9e4c9336ae..cd9f7741cf9 100644 --- a/resource-manager/costmanagement/2023-03-01/query/README.md +++ b/resource-manager/costmanagement/2023-03-01/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/query/client.go b/resource-manager/costmanagement/2023-03-01/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2023-03-01/query/client.go +++ b/resource-manager/costmanagement/2023-03-01/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2023-03-01/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/query/method_usage.go b/resource-manager/costmanagement/2023-03-01/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2023-03-01/query/method_usage.go +++ b/resource-manager/costmanagement/2023-03-01/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-03-01/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2023-03-01/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-03-01/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/query/version.go b/resource-manager/costmanagement/2023-03-01/query/version.go index 974b2cf01d8..0ec4afffeba 100644 --- a/resource-manager/costmanagement/2023-03-01/query/version.go +++ b/resource-manager/costmanagement/2023-03-01/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/README.md b/resource-manager/costmanagement/2023-03-01/reservedinstances/README.md index 0c3cc0eb1ce..41e72761b34 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/README.md +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/client.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/client.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-03-01/reservedinstances/version.go b/resource-manager/costmanagement/2023-03-01/reservedinstances/version.go index dd6411491ac..2225e070ee3 100644 --- a/resource-manager/costmanagement/2023-03-01/reservedinstances/version.go +++ b/resource-manager/costmanagement/2023-03-01/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/README.md b/resource-manager/costmanagement/2023-03-01/scheduledactions/README.md index f4b74665d03..e7df4c447aa 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/README.md +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/client.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/client.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdate.go index 7ce81fbece9..4a9d5d9fc3d 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdatebyscope.go index c87a0eb91fc..89c59910780 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_createorupdatebyscope.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateByScopeOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_get.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_list.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-03-01/scheduledactions/version.go b/resource-manager/costmanagement/2023-03-01/scheduledactions/version.go index a0db0402b0d..d8aaa2a3bcf 100644 --- a/resource-manager/costmanagement/2023-03-01/scheduledactions/version.go +++ b/resource-manager/costmanagement/2023-03-01/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/usagedetails/README.md b/resource-manager/costmanagement/2023-03-01/usagedetails/README.md index b92be498a7c..ac92167cffb 100644 --- a/resource-manager/costmanagement/2023-03-01/usagedetails/README.md +++ b/resource-manager/costmanagement/2023-03-01/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/usagedetails/client.go b/resource-manager/costmanagement/2023-03-01/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2023-03-01/usagedetails/client.go +++ b/resource-manager/costmanagement/2023-03-01/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/usagedetails/version.go b/resource-manager/costmanagement/2023-03-01/usagedetails/version.go index 82a1e4a4031..9f67ddbe2b7 100644 --- a/resource-manager/costmanagement/2023-03-01/usagedetails/version.go +++ b/resource-manager/costmanagement/2023-03-01/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-03-01/views/README.md b/resource-manager/costmanagement/2023-03-01/views/README.md index 0113d4d4bb6..ddbe1e9484b 100644 --- a/resource-manager/costmanagement/2023-03-01/views/README.md +++ b/resource-manager/costmanagement/2023-03-01/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-03-01`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-03-01/views/client.go b/resource-manager/costmanagement/2023-03-01/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2023-03-01/views/client.go +++ b/resource-manager/costmanagement/2023-03-01/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-03-01/views/id_scopedview.go b/resource-manager/costmanagement/2023-03-01/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2023-03-01/views/id_scopedview.go +++ b/resource-manager/costmanagement/2023-03-01/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/views/id_view.go b/resource-manager/costmanagement/2023-03-01/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2023-03-01/views/id_view.go +++ b/resource-manager/costmanagement/2023-03-01/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-03-01/views/method_createorupdate.go b/resource-manager/costmanagement/2023-03-01/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2023-03-01/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-03-01/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-03-01/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2023-03-01/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-03-01/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/views/method_get.go b/resource-manager/costmanagement/2023-03-01/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2023-03-01/views/method_get.go +++ b/resource-manager/costmanagement/2023-03-01/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/views/method_getbyscope.go b/resource-manager/costmanagement/2023-03-01/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2023-03-01/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-03-01/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-03-01/views/version.go b/resource-manager/costmanagement/2023-03-01/views/version.go index d0a01d15ea6..d4c88537c6e 100644 --- a/resource-manager/costmanagement/2023-03-01/views/version.go +++ b/resource-manager/costmanagement/2023-03-01/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2023-03-01" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/README.md b/resource-manager/costmanagement/2023-07-01-preview/alerts/README.md index 5e64dd3a22b..79441dbd410 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/client.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/id_scopedalert.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/method_dismiss.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/method_get.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/method_get.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/alerts/version.go b/resource-manager/costmanagement/2023-07-01-preview/alerts/version.go index 73b92650c95..f313ec110f5 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/alerts/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/README.md b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/README.md index 68ed2c6f7c7..66671c1e2df 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations` Documentation -The `benefitrecommendations` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `benefitrecommendations` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/client.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/client.go index a01d721f32f..2e248713c75 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/client.go @@ -15,7 +15,7 @@ type BenefitRecommendationsClient struct { } func NewBenefitRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitRecommendationsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/method_list.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/method_list.go index 27da9258c6b..2cab4a79073 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/method_list.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationmodel.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationmodel.go index 5151a7aafc2..00f53d6c3d2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationmodel.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationmodel.go @@ -36,7 +36,7 @@ func (s *BenefitRecommendationModel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBenefitRecommendationPropertiesImplementation(v) + impl, err := UnmarshalBenefitRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BenefitRecommendationModel': %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationproperties.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationproperties.go index c64301ec1c0..7945d1cb52c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_benefitrecommendationproperties.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitRecommendationProperties interface { + BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl } -// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitRecommendationProperties = BaseBenefitRecommendationPropertiesImpl{} + +type BaseBenefitRecommendationPropertiesImpl struct { + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` + ArmSkuName *string `json:"armSkuName,omitempty"` + CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` + CostWithoutBenefit *float64 `json:"costWithoutBenefit,omitempty"` + CurrencyCode *string `json:"currencyCode,omitempty"` + FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"` + LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` + LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` + RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` + Term *Term `json:"term,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` + Usage *RecommendationUsageDetails `json:"usage,omitempty"` +} + +func (s BaseBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s +} + +var _ BenefitRecommendationProperties = RawBenefitRecommendationPropertiesImpl{} + +// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + benefitRecommendationProperties BaseBenefitRecommendationPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s.benefitRecommendationProperties } -func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { +func UnmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (Benef return out, nil } - out := RawBenefitRecommendationPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBenefitRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitRecommendationPropertiesImpl: %+v", err) } - return out, nil + + return RawBenefitRecommendationPropertiesImpl{ + benefitRecommendationProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go index 81a5f6f0e30..0dd2c7d6693 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go @@ -16,6 +16,7 @@ var _ BenefitRecommendationProperties = SharedScopeBenefitRecommendationProperti type SharedScopeBenefitRecommendationProperties struct { // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -25,11 +26,30 @@ type SharedScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SharedScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -65,9 +85,10 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharedScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go index ec6d12ef9c0..c4f7b62d4f2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go @@ -18,6 +18,7 @@ type SingleScopeBenefitRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -27,11 +28,30 @@ type SingleScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SingleScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -67,9 +87,10 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/version.go b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/version.go index 3451c6af7bd..fe4968fb0a2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitrecommendations/version.go @@ -1,12 +1,10 @@ package benefitrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitrecommendations/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/README.md b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/README.md index 6330680f83f..5231e39c337 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries` Documentation -The `benefitutilizationsummaries` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `benefitutilizationsummaries` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/client.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/client.go index a1791ea3fd4..7a4ecf7c986 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesClient struct { } func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingaccount.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingaccount.go index fed7acf47e4..754dd311dd5 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingprofile.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingprofile.go index 36a4181f9fc..8bcadc0f7b9 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplan.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplan.go index 435f572e064..95490c9057f 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplanorder.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplanorder.go index ce4a1cce3ff..ce828821476 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingaccountid.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingaccountid.go index e541d866d32..802f44ece83 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingaccountid.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingAccountId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingprofileid.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingprofileid.go index 5e0b8f92cce..75947163736 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbybillingprofileid.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingProfileId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanid.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanid.go index 01c5f8c1032..689a3a2b24c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanid.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanid.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanIdOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanId(ctx context.Conte temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanorder.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanorder.go index c7b749ca32a..6e484f25bac 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanorder.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/method_listbysavingsplanorder.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanOrderOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanOrder(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_benefitutilizationsummary.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_benefitutilizationsummary.go index 3a145e88ea1..8c2269fa24d 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_benefitutilizationsummary.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_benefitutilizationsummary.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitUtilizationSummary interface { + BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl } -// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitUtilizationSummary = BaseBenefitUtilizationSummaryImpl{} + +type BaseBenefitUtilizationSummaryImpl struct { + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s +} + +var _ BenefitUtilizationSummary = RawBenefitUtilizationSummaryImpl{} + +// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitUtilizationSummaryImpl struct { - Type string - Values map[string]interface{} + benefitUtilizationSummary BaseBenefitUtilizationSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s.benefitUtilizationSummary } -func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { +func UnmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtil return out, nil } - out := RawBenefitUtilizationSummaryImpl{ - Type: value, - Values: temp, + var parent BaseBenefitUtilizationSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitUtilizationSummaryImpl: %+v", err) } - return out, nil + + return RawBenefitUtilizationSummaryImpl{ + benefitUtilizationSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_includedquantityutilizationsummary.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_includedquantityutilizationsummary.go index 48e7170c8de..863b9cd100a 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_includedquantityutilizationsummary.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_includedquantityutilizationsummary.go @@ -14,9 +14,20 @@ type IncludedQuantityUtilizationSummary struct { Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IncludedQuantityUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IncludedQuantityUtilizationSummary{} @@ -30,9 +41,10 @@ func (s IncludedQuantityUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IncludedQuantityUtilizationSummary: %+v", err) } + decoded["kind"] = "IncludedQuantity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_savingsplanutilizationsummary.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_savingsplanutilizationsummary.go index 6d6a6d56802..2920f6dc0bf 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_savingsplanutilizationsummary.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/model_savingsplanutilizationsummary.go @@ -14,9 +14,20 @@ type SavingsPlanUtilizationSummary struct { Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SavingsPlanUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SavingsPlanUtilizationSummary{} @@ -30,9 +41,10 @@ func (s SavingsPlanUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SavingsPlanUtilizationSummary: %+v", err) } + decoded["kind"] = "SavingsPlan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/version.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/version.go index 9da99cb437d..0811e4d7000 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummaries/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummaries/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/README.md b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/README.md index ee24cdb8b00..2c200da4381 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync` Documentation -The `benefitutilizationsummariesasync` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `benefitutilizationsummariesasync` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/client.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/client.go index 1aeefdac651..85faaf6ba26 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesAsyncClient struct { } func NewBenefitUtilizationSummariesAsyncClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesAsyncClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesAsyncClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingaccount.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingaccount.go index 4e554ecb41d..1fcf6d9853a 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingprofile.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingprofile.go index e5a6774541c..f85d7006967 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservation.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservation.go index 062dba1498f..5024e4ccd71 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservation.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservationorder.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservationorder.go index 85676317bd7..450d77914a8 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservationorder.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplan.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplan.go index b82feca7660..5f453624229 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplanorder.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplanorder.go index d8eb517093e..48a16367f0c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/version.go b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/version.go index ccc97245d71..b1692bd2564 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/benefitutilizationsummariesasync/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummariesasync -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummariesasync/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummariesasync/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/costdetails/README.md b/resource-manager/costmanagement/2023-07-01-preview/costdetails/README.md index 80568b65285..25858592ac3 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/costdetails/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/costdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/costdetails` Documentation -The `costdetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `costdetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/costdetails/client.go b/resource-manager/costmanagement/2023-07-01-preview/costdetails/client.go index e7cebe17215..d109cc872ba 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/costdetails/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/costdetails/client.go @@ -15,7 +15,7 @@ type CostDetailsClient struct { } func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/costdetails/version.go b/resource-manager/costmanagement/2023-07-01-preview/costdetails/version.go index 00da8b3cf25..d7efb4da2ee 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/costdetails/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/costdetails/version.go @@ -1,12 +1,10 @@ package costdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costdetails/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/README.md b/resource-manager/costmanagement/2023-07-01-preview/dimensions/README.md index d3f4fca5358..f2506a66a64 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/client.go b/resource-manager/costmanagement/2023-07-01-preview/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_list.go b/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_list.go +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/dimensions/version.go b/resource-manager/costmanagement/2023-07-01-preview/dimensions/version.go index 9a83adf27ad..70afcc396a3 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/dimensions/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/README.md b/resource-manager/costmanagement/2023-07-01-preview/exports/README.md index 94ed874b9f1..0307200a263 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/client.go b/resource-manager/costmanagement/2023-07-01-preview/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go b/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go b/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go b/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go b/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/exports/version.go b/resource-manager/costmanagement/2023-07-01-preview/exports/version.go index 11cf25298fa..20df8e9e86f 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/exports/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/README.md b/resource-manager/costmanagement/2023-07-01-preview/forecast/README.md index ffd6e632217..2c841a3f160 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/client.go b/resource-manager/costmanagement/2023-07-01-preview/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2023-07-01-preview/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/method_usage.go b/resource-manager/costmanagement/2023-07-01-preview/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/method_usage.go +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/forecast/version.go b/resource-manager/costmanagement/2023-07-01-preview/forecast/version.go index 8dffa5a1306..ffaa2bec11e 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/forecast/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/README.md b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/README.md index 8ffa981be66..85a30c7ec96 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/pricesheets` Documentation -The `pricesheets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `pricesheets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/client.go b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/client.go index 426633c8f50..395b4b3794a 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/client.go @@ -15,7 +15,7 @@ type PriceSheetsClient struct { } func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_billingprofile.go b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_billingprofile.go index 6bdcc943e59..c20f50555d7 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_invoice.go b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_invoice.go index a4f2544f090..e786ff1d4ee 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_invoice.go +++ b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/id_invoice.go @@ -42,7 +42,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/version.go b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/version.go index 70f85276bbb..1f95daa965a 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/pricesheets/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/pricesheets/version.go @@ -1,12 +1,10 @@ package pricesheets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheets/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/README.md b/resource-manager/costmanagement/2023-07-01-preview/query/README.md index 07d54b616f5..b00c46d8f72 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/client.go b/resource-manager/costmanagement/2023-07-01-preview/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/method_usage.go b/resource-manager/costmanagement/2023-07-01-preview/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/method_usage.go +++ b/resource-manager/costmanagement/2023-07-01-preview/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-07-01-preview/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-07-01-preview/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/query/version.go b/resource-manager/costmanagement/2023-07-01-preview/query/version.go index 19e154ef014..de2256eabac 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/query/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/README.md b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/README.md index 038341aa1fb..26d7150f7b5 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/client.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/version.go b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/version.go index 07b30002af3..5d3d4d9e1cb 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/README.md b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/README.md index 771392cef2d..65d5b67a67b 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/client.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdate.go index 7ce81fbece9..4a9d5d9fc3d 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdatebyscope.go index c87a0eb91fc..89c59910780 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_createorupdatebyscope.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateByScopeOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_get.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_list.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/version.go b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/version.go index 266887e1036..74bf7c97ff0 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/README.md b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/README.md index 38c4f446457..368f9e8f09e 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/client.go b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/version.go b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/version.go index 3a455a97afc..52461b8b8ed 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/usagedetails/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/README.md b/resource-manager/costmanagement/2023-07-01-preview/views/README.md index 9662956d6c5..955e95fe4e7 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/README.md +++ b/resource-manager/costmanagement/2023-07-01-preview/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/client.go b/resource-manager/costmanagement/2023-07-01-preview/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/client.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/id_scopedview.go b/resource-manager/costmanagement/2023-07-01-preview/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/id_scopedview.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/id_view.go b/resource-manager/costmanagement/2023-07-01-preview/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/id_view.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdate.go b/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/method_get.go b/resource-manager/costmanagement/2023-07-01-preview/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/method_get.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/method_getbyscope.go b/resource-manager/costmanagement/2023-07-01-preview/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-07-01-preview/views/version.go b/resource-manager/costmanagement/2023-07-01-preview/views/version.go index 03238aa9870..3b27d1a1f9c 100644 --- a/resource-manager/costmanagement/2023-07-01-preview/views/version.go +++ b/resource-manager/costmanagement/2023-07-01-preview/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2023-07-01-preview" } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/README.md b/resource-manager/costmanagement/2023-08-01/alerts/README.md index 27be224d884..d24e600b076 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/README.md +++ b/resource-manager/costmanagement/2023-08-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/alerts/client.go b/resource-manager/costmanagement/2023-08-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/client.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/id_scopedalert.go b/resource-manager/costmanagement/2023-08-01/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/method_dismiss.go b/resource-manager/costmanagement/2023-08-01/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/method_get.go b/resource-manager/costmanagement/2023-08-01/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/alerts/version.go b/resource-manager/costmanagement/2023-08-01/alerts/version.go index 9224e0ea5ed..83254b4a379 100644 --- a/resource-manager/costmanagement/2023-08-01/alerts/version.go +++ b/resource-manager/costmanagement/2023-08-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/README.md b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/README.md index 2537ab022ad..26a003f3dee 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/README.md +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/benefitrecommendations` Documentation -The `benefitrecommendations` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `benefitrecommendations` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/client.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/client.go index a01d721f32f..2e248713c75 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/client.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/client.go @@ -15,7 +15,7 @@ type BenefitRecommendationsClient struct { } func NewBenefitRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitRecommendationsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/method_list.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/method_list.go index 27da9258c6b..2cab4a79073 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationmodel.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationmodel.go index 5151a7aafc2..00f53d6c3d2 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationmodel.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationmodel.go @@ -36,7 +36,7 @@ func (s *BenefitRecommendationModel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBenefitRecommendationPropertiesImplementation(v) + impl, err := UnmarshalBenefitRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BenefitRecommendationModel': %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationproperties.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationproperties.go index c64301ec1c0..7945d1cb52c 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_benefitrecommendationproperties.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitRecommendationProperties interface { + BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl } -// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitRecommendationProperties = BaseBenefitRecommendationPropertiesImpl{} + +type BaseBenefitRecommendationPropertiesImpl struct { + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` + ArmSkuName *string `json:"armSkuName,omitempty"` + CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` + CostWithoutBenefit *float64 `json:"costWithoutBenefit,omitempty"` + CurrencyCode *string `json:"currencyCode,omitempty"` + FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"` + LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` + LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` + RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` + Term *Term `json:"term,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` + Usage *RecommendationUsageDetails `json:"usage,omitempty"` +} + +func (s BaseBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s +} + +var _ BenefitRecommendationProperties = RawBenefitRecommendationPropertiesImpl{} + +// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + benefitRecommendationProperties BaseBenefitRecommendationPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s.benefitRecommendationProperties } -func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { +func UnmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (Benef return out, nil } - out := RawBenefitRecommendationPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBenefitRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitRecommendationPropertiesImpl: %+v", err) } - return out, nil + + return RawBenefitRecommendationPropertiesImpl{ + benefitRecommendationProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go index 81a5f6f0e30..0dd2c7d6693 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go @@ -16,6 +16,7 @@ var _ BenefitRecommendationProperties = SharedScopeBenefitRecommendationProperti type SharedScopeBenefitRecommendationProperties struct { // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -25,11 +26,30 @@ type SharedScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SharedScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -65,9 +85,10 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharedScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go index ec6d12ef9c0..c4f7b62d4f2 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go @@ -18,6 +18,7 @@ type SingleScopeBenefitRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -27,11 +28,30 @@ type SingleScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SingleScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -67,9 +87,10 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/version.go b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/version.go index e3f64c86f5b..b611516d3ea 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitrecommendations/version.go +++ b/resource-manager/costmanagement/2023-08-01/benefitrecommendations/version.go @@ -1,12 +1,10 @@ package benefitrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitrecommendations/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/README.md b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/README.md index eac40bf6af3..d038b7eca03 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/README.md +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries` Documentation -The `benefitutilizationsummaries` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `benefitutilizationsummaries` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/client.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/client.go index a1791ea3fd4..7a4ecf7c986 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/client.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesClient struct { } func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingaccount.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingaccount.go index fed7acf47e4..754dd311dd5 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingprofile.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingprofile.go index 36a4181f9fc..8bcadc0f7b9 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplan.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplan.go index 435f572e064..95490c9057f 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplanorder.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplanorder.go index ce4a1cce3ff..ce828821476 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingaccountid.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingaccountid.go index e541d866d32..802f44ece83 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingaccountid.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingAccountId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingprofileid.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingprofileid.go index 5e0b8f92cce..75947163736 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbybillingprofileid.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingProfileId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanid.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanid.go index 01c5f8c1032..689a3a2b24c 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanid.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanid.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanIdOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanId(ctx context.Conte temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanorder.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanorder.go index c7b749ca32a..6e484f25bac 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanorder.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/method_listbysavingsplanorder.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanOrderOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanOrder(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_benefitutilizationsummary.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_benefitutilizationsummary.go index 3a145e88ea1..8c2269fa24d 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_benefitutilizationsummary.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_benefitutilizationsummary.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitUtilizationSummary interface { + BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl } -// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitUtilizationSummary = BaseBenefitUtilizationSummaryImpl{} + +type BaseBenefitUtilizationSummaryImpl struct { + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s +} + +var _ BenefitUtilizationSummary = RawBenefitUtilizationSummaryImpl{} + +// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitUtilizationSummaryImpl struct { - Type string - Values map[string]interface{} + benefitUtilizationSummary BaseBenefitUtilizationSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s.benefitUtilizationSummary } -func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { +func UnmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtil return out, nil } - out := RawBenefitUtilizationSummaryImpl{ - Type: value, - Values: temp, + var parent BaseBenefitUtilizationSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitUtilizationSummaryImpl: %+v", err) } - return out, nil + + return RawBenefitUtilizationSummaryImpl{ + benefitUtilizationSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go index 48e7170c8de..863b9cd100a 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go @@ -14,9 +14,20 @@ type IncludedQuantityUtilizationSummary struct { Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IncludedQuantityUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IncludedQuantityUtilizationSummary{} @@ -30,9 +41,10 @@ func (s IncludedQuantityUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IncludedQuantityUtilizationSummary: %+v", err) } + decoded["kind"] = "IncludedQuantity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go index 6d6a6d56802..2920f6dc0bf 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go @@ -14,9 +14,20 @@ type SavingsPlanUtilizationSummary struct { Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SavingsPlanUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SavingsPlanUtilizationSummary{} @@ -30,9 +41,10 @@ func (s SavingsPlanUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SavingsPlanUtilizationSummary: %+v", err) } + decoded["kind"] = "SavingsPlan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/version.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/version.go index 048aa9dc3fe..75ccdf2f843 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/version.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummaries/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummaries/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/README.md b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/README.md index e9707f98050..4d66d5838c0 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/README.md +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync` Documentation -The `benefitutilizationsummariesasync` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `benefitutilizationsummariesasync` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/client.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/client.go index 1aeefdac651..85faaf6ba26 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/client.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesAsyncClient struct { } func NewBenefitUtilizationSummariesAsyncClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesAsyncClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesAsyncClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingaccount.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingaccount.go index 4e554ecb41d..1fcf6d9853a 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingprofile.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingprofile.go index e5a6774541c..f85d7006967 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservation.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservation.go index 062dba1498f..5024e4ccd71 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservation.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservationorder.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservationorder.go index 85676317bd7..450d77914a8 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservationorder.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplan.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplan.go index b82feca7660..5f453624229 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplanorder.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplanorder.go index d8eb517093e..48a16367f0c 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/version.go b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/version.go index d8c23c80579..dd9a717c1b9 100644 --- a/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/version.go +++ b/resource-manager/costmanagement/2023-08-01/benefitutilizationsummariesasync/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummariesasync -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummariesasync/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummariesasync/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/README.md b/resource-manager/costmanagement/2023-08-01/budgets/README.md index 7d38a3d258a..3ffa3fa0de4 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/README.md +++ b/resource-manager/costmanagement/2023-08-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/budgets/client.go b/resource-manager/costmanagement/2023-08-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/client.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/id_scopedbudget.go b/resource-manager/costmanagement/2023-08-01/budgets/id_scopedbudget.go index 30ab4e106c9..23b22fcbf2b 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/id_scopedbudget.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/method_createorupdate.go b/resource-manager/costmanagement/2023-08-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/method_get.go b/resource-manager/costmanagement/2023-08-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/method_list.go b/resource-manager/costmanagement/2023-08-01/budgets/method_list.go index 5b533cfca25..24766589a09 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/budgets/version.go b/resource-manager/costmanagement/2023-08-01/budgets/version.go index e22914d643b..bef0a18fab6 100644 --- a/resource-manager/costmanagement/2023-08-01/budgets/version.go +++ b/resource-manager/costmanagement/2023-08-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/README.md b/resource-manager/costmanagement/2023-08-01/costallocationrules/README.md index 9aba2ac2331..5a4997646c3 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/README.md +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/costallocationrules` Documentation -The `costallocationrules` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `costallocationrules` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/client.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/client.go index 43af201cf15..79429313723 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/client.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/client.go @@ -15,7 +15,7 @@ type CostAllocationRulesClient struct { } func NewCostAllocationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*CostAllocationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costallocationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costallocationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostAllocationRulesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/id_billingaccount.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/id_billingaccount.go index 47e6c07bb38..57ee122a96b 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/id_costallocationrule.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/id_costallocationrule.go index e895cd1010e..83de11b32e9 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/id_costallocationrule.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/id_costallocationrule.go @@ -40,7 +40,7 @@ func ParseCostAllocationRuleID(input string) (*CostAllocationRuleId, error) { } id := CostAllocationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCostAllocationRuleIDInsensitively(input string) (*CostAllocationRuleId } id := CostAllocationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_checknameavailability.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_checknameavailability.go index b51a968b528..a48de6282e7 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c CostAllocationRulesClient) CheckNameAvailability(ctx context.Context, id var model CostAllocationRuleCheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_createorupdate.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_createorupdate.go index 6fbd1a591d8..68523dab115 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CostAllocationRulesClient) CreateOrUpdate(ctx context.Context, id CostAl var model CostAllocationRuleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_get.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_get.go index 3026a9388ae..140c17ec016 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/method_get.go @@ -45,7 +45,6 @@ func (c CostAllocationRulesClient) Get(ctx context.Context, id CostAllocationRul var model CostAllocationRuleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/costallocationrules/version.go b/resource-manager/costmanagement/2023-08-01/costallocationrules/version.go index 500d3bbb463..4b26eb84014 100644 --- a/resource-manager/costmanagement/2023-08-01/costallocationrules/version.go +++ b/resource-manager/costmanagement/2023-08-01/costallocationrules/version.go @@ -1,12 +1,10 @@ package costallocationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costallocationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costallocationrules/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/costdetails/README.md b/resource-manager/costmanagement/2023-08-01/costdetails/README.md index 12fe9a4a3ed..b6b05900d08 100644 --- a/resource-manager/costmanagement/2023-08-01/costdetails/README.md +++ b/resource-manager/costmanagement/2023-08-01/costdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/costdetails` Documentation -The `costdetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `costdetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/costdetails/client.go b/resource-manager/costmanagement/2023-08-01/costdetails/client.go index e7cebe17215..d109cc872ba 100644 --- a/resource-manager/costmanagement/2023-08-01/costdetails/client.go +++ b/resource-manager/costmanagement/2023-08-01/costdetails/client.go @@ -15,7 +15,7 @@ type CostDetailsClient struct { } func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/costdetails/version.go b/resource-manager/costmanagement/2023-08-01/costdetails/version.go index 6964e41bbba..bad51cab3c6 100644 --- a/resource-manager/costmanagement/2023-08-01/costdetails/version.go +++ b/resource-manager/costmanagement/2023-08-01/costdetails/version.go @@ -1,12 +1,10 @@ package costdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costdetails/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/README.md b/resource-manager/costmanagement/2023-08-01/dimensions/README.md index df1be4a6c0c..e95176ef63d 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/README.md +++ b/resource-manager/costmanagement/2023-08-01/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/client.go b/resource-manager/costmanagement/2023-08-01/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/client.go +++ b/resource-manager/costmanagement/2023-08-01/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/method_list.go b/resource-manager/costmanagement/2023-08-01/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/dimensions/version.go b/resource-manager/costmanagement/2023-08-01/dimensions/version.go index 62a036e9c24..206ebbdfafe 100644 --- a/resource-manager/costmanagement/2023-08-01/dimensions/version.go +++ b/resource-manager/costmanagement/2023-08-01/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/exports/README.md b/resource-manager/costmanagement/2023-08-01/exports/README.md index 48e34e65877..c05cacfe5ab 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/README.md +++ b/resource-manager/costmanagement/2023-08-01/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/exports/client.go b/resource-manager/costmanagement/2023-08-01/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/client.go +++ b/resource-manager/costmanagement/2023-08-01/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/exports/id_scopedexport.go b/resource-manager/costmanagement/2023-08-01/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2023-08-01/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/exports/method_createorupdate.go b/resource-manager/costmanagement/2023-08-01/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-08-01/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/exports/method_get.go b/resource-manager/costmanagement/2023-08-01/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2023-08-01/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2023-08-01/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/exports/method_list.go b/resource-manager/costmanagement/2023-08-01/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/exports/version.go b/resource-manager/costmanagement/2023-08-01/exports/version.go index cb448eb7acf..b0b4809e1a7 100644 --- a/resource-manager/costmanagement/2023-08-01/exports/version.go +++ b/resource-manager/costmanagement/2023-08-01/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/forecast/README.md b/resource-manager/costmanagement/2023-08-01/forecast/README.md index a3d0096b045..fdb2ee5eb28 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/README.md +++ b/resource-manager/costmanagement/2023-08-01/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/forecast/client.go b/resource-manager/costmanagement/2023-08-01/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/client.go +++ b/resource-manager/costmanagement/2023-08-01/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2023-08-01/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2023-08-01/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/forecast/method_usage.go b/resource-manager/costmanagement/2023-08-01/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/method_usage.go +++ b/resource-manager/costmanagement/2023-08-01/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/forecast/version.go b/resource-manager/costmanagement/2023-08-01/forecast/version.go index 6dee95721f0..3a79087d08c 100644 --- a/resource-manager/costmanagement/2023-08-01/forecast/version.go +++ b/resource-manager/costmanagement/2023-08-01/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/pricesheets/README.md b/resource-manager/costmanagement/2023-08-01/pricesheets/README.md index f1a1ffae69d..b4ca7a72bcd 100644 --- a/resource-manager/costmanagement/2023-08-01/pricesheets/README.md +++ b/resource-manager/costmanagement/2023-08-01/pricesheets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/pricesheets` Documentation -The `pricesheets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `pricesheets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/pricesheets/client.go b/resource-manager/costmanagement/2023-08-01/pricesheets/client.go index 426633c8f50..395b4b3794a 100644 --- a/resource-manager/costmanagement/2023-08-01/pricesheets/client.go +++ b/resource-manager/costmanagement/2023-08-01/pricesheets/client.go @@ -15,7 +15,7 @@ type PriceSheetsClient struct { } func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/pricesheets/id_billingprofile.go b/resource-manager/costmanagement/2023-08-01/pricesheets/id_billingprofile.go index 6bdcc943e59..c20f50555d7 100644 --- a/resource-manager/costmanagement/2023-08-01/pricesheets/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-08-01/pricesheets/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/pricesheets/id_invoice.go b/resource-manager/costmanagement/2023-08-01/pricesheets/id_invoice.go index a4f2544f090..e786ff1d4ee 100644 --- a/resource-manager/costmanagement/2023-08-01/pricesheets/id_invoice.go +++ b/resource-manager/costmanagement/2023-08-01/pricesheets/id_invoice.go @@ -42,7 +42,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/pricesheets/version.go b/resource-manager/costmanagement/2023-08-01/pricesheets/version.go index 7932c0680fb..ca9b97c6eed 100644 --- a/resource-manager/costmanagement/2023-08-01/pricesheets/version.go +++ b/resource-manager/costmanagement/2023-08-01/pricesheets/version.go @@ -1,12 +1,10 @@ package pricesheets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheets/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/query/README.md b/resource-manager/costmanagement/2023-08-01/query/README.md index 96332f28b95..2e09bb485a2 100644 --- a/resource-manager/costmanagement/2023-08-01/query/README.md +++ b/resource-manager/costmanagement/2023-08-01/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/query/client.go b/resource-manager/costmanagement/2023-08-01/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2023-08-01/query/client.go +++ b/resource-manager/costmanagement/2023-08-01/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2023-08-01/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/query/method_usage.go b/resource-manager/costmanagement/2023-08-01/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2023-08-01/query/method_usage.go +++ b/resource-manager/costmanagement/2023-08-01/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-08-01/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2023-08-01/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-08-01/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/query/version.go b/resource-manager/costmanagement/2023-08-01/query/version.go index dd90b67387a..d23add73334 100644 --- a/resource-manager/costmanagement/2023-08-01/query/version.go +++ b/resource-manager/costmanagement/2023-08-01/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/README.md b/resource-manager/costmanagement/2023-08-01/reservedinstances/README.md index b69bc831ae5..e5aa9128a6c 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/README.md +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/client.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/client.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/reservedinstances/version.go b/resource-manager/costmanagement/2023-08-01/reservedinstances/version.go index b51fc2892c4..5653d58efb9 100644 --- a/resource-manager/costmanagement/2023-08-01/reservedinstances/version.go +++ b/resource-manager/costmanagement/2023-08-01/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/README.md b/resource-manager/costmanagement/2023-08-01/scheduledactions/README.md index e86671c32cc..b96847e791c 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/README.md +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/client.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/client.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdate.go index 7ce81fbece9..4a9d5d9fc3d 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdatebyscope.go index c87a0eb91fc..89c59910780 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_createorupdatebyscope.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateByScopeOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_get.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_list.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-08-01/scheduledactions/version.go b/resource-manager/costmanagement/2023-08-01/scheduledactions/version.go index a62a1f54c7e..07b4a28716f 100644 --- a/resource-manager/costmanagement/2023-08-01/scheduledactions/version.go +++ b/resource-manager/costmanagement/2023-08-01/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/settings/README.md b/resource-manager/costmanagement/2023-08-01/settings/README.md index 571f1bf3c32..d4854c4d69a 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/README.md +++ b/resource-manager/costmanagement/2023-08-01/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `settings` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/settings/client.go b/resource-manager/costmanagement/2023-08-01/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/client.go +++ b/resource-manager/costmanagement/2023-08-01/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/settings/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-08-01/settings/method_createorupdatebyscope.go index efdc684f2cd..e02d6325286 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-08-01/settings/method_createorupdatebyscope.go @@ -17,7 +17,7 @@ import ( type CreateOrUpdateByScopeOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // CreateOrUpdateByScope ... @@ -55,11 +55,11 @@ func (c SettingsClient) CreateOrUpdateByScope(ctx context.Context, id commonids. if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/costmanagement/2023-08-01/settings/method_getbyscope.go b/resource-manager/costmanagement/2023-08-01/settings/method_getbyscope.go index 19d624c022b..6a80b8c5c47 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-08-01/settings/method_getbyscope.go @@ -17,7 +17,7 @@ import ( type GetByScopeOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // GetByScope ... @@ -50,11 +50,11 @@ func (c SettingsClient) GetByScope(ctx context.Context, id commonids.ScopeId) (r if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/costmanagement/2023-08-01/settings/method_list.go b/resource-manager/costmanagement/2023-08-01/settings/method_list.go index 24714b79a2c..1993ab6a3ea 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/method_list.go +++ b/resource-manager/costmanagement/2023-08-01/settings/method_list.go @@ -47,7 +47,6 @@ func (c SettingsClient) List(ctx context.Context, id commonids.ScopeId) (result var model SettingsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/settings/model_setting.go b/resource-manager/costmanagement/2023-08-01/settings/model_setting.go index ec35735d69f..22d33fcf727 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/model_setting.go +++ b/resource-manager/costmanagement/2023-08-01/settings/model_setting.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Setting interface { + Setting() BaseSettingImpl } -// RawSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Setting = BaseSettingImpl{} + +type BaseSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSettingImpl) Setting() BaseSettingImpl { + return s +} + +var _ Setting = RawSettingImpl{} + +// RawSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSettingImpl struct { - Type string - Values map[string]interface{} + setting BaseSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSettingImpl) Setting() BaseSettingImpl { + return s.setting } -func unmarshalSettingImplementation(input []byte) (Setting, error) { +func UnmarshalSettingImplementation(input []byte) (Setting, error) { if input == nil { return nil, nil } @@ -44,10 +64,15 @@ func unmarshalSettingImplementation(input []byte) (Setting, error) { return out, nil } - out := RawSettingImpl{ - Type: value, - Values: temp, + var parent BaseSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSettingImpl: %+v", err) } - return out, nil + + return RawSettingImpl{ + setting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go b/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go index 8f112cedd41..56bc6dd6dc8 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go +++ b/resource-manager/costmanagement/2023-08-01/settings/model_settingslistresult.go @@ -29,7 +29,7 @@ func (s *SettingsListResult) UnmarshalJSON(bytes []byte) error { output := make([]Setting, 0) for i, val := range listTemp { - impl, err := unmarshalSettingImplementation(val) + impl, err := UnmarshalSettingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'SettingsListResult': %+v", i, err) } diff --git a/resource-manager/costmanagement/2023-08-01/settings/model_taginheritancesetting.go b/resource-manager/costmanagement/2023-08-01/settings/model_taginheritancesetting.go index 6fe10f86ec1..4e20b2d9d98 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/model_taginheritancesetting.go +++ b/resource-manager/costmanagement/2023-08-01/settings/model_taginheritancesetting.go @@ -14,9 +14,20 @@ type TagInheritanceSetting struct { Properties *TagInheritanceProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s TagInheritanceSetting) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = TagInheritanceSetting{} @@ -30,9 +41,10 @@ func (s TagInheritanceSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TagInheritanceSetting: %+v", err) } + decoded["kind"] = "taginheritance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-08-01/settings/version.go b/resource-manager/costmanagement/2023-08-01/settings/version.go index 85cd1147926..309b2b2291c 100644 --- a/resource-manager/costmanagement/2023-08-01/settings/version.go +++ b/resource-manager/costmanagement/2023-08-01/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/usagedetails/README.md b/resource-manager/costmanagement/2023-08-01/usagedetails/README.md index 06565493128..f6c7979b487 100644 --- a/resource-manager/costmanagement/2023-08-01/usagedetails/README.md +++ b/resource-manager/costmanagement/2023-08-01/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/usagedetails/client.go b/resource-manager/costmanagement/2023-08-01/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2023-08-01/usagedetails/client.go +++ b/resource-manager/costmanagement/2023-08-01/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/usagedetails/version.go b/resource-manager/costmanagement/2023-08-01/usagedetails/version.go index 89560ec615c..26e39c1605c 100644 --- a/resource-manager/costmanagement/2023-08-01/usagedetails/version.go +++ b/resource-manager/costmanagement/2023-08-01/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-08-01/views/README.md b/resource-manager/costmanagement/2023-08-01/views/README.md index 3988518713c..8317d0f6142 100644 --- a/resource-manager/costmanagement/2023-08-01/views/README.md +++ b/resource-manager/costmanagement/2023-08-01/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-08-01/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-08-01`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-08-01/views/client.go b/resource-manager/costmanagement/2023-08-01/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2023-08-01/views/client.go +++ b/resource-manager/costmanagement/2023-08-01/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-08-01/views/id_scopedview.go b/resource-manager/costmanagement/2023-08-01/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2023-08-01/views/id_scopedview.go +++ b/resource-manager/costmanagement/2023-08-01/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/views/id_view.go b/resource-manager/costmanagement/2023-08-01/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2023-08-01/views/id_view.go +++ b/resource-manager/costmanagement/2023-08-01/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-08-01/views/method_createorupdate.go b/resource-manager/costmanagement/2023-08-01/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2023-08-01/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-08-01/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-08-01/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2023-08-01/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-08-01/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/views/method_get.go b/resource-manager/costmanagement/2023-08-01/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2023-08-01/views/method_get.go +++ b/resource-manager/costmanagement/2023-08-01/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/views/method_getbyscope.go b/resource-manager/costmanagement/2023-08-01/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2023-08-01/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-08-01/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-08-01/views/version.go b/resource-manager/costmanagement/2023-08-01/views/version.go index 2ad8ea0180f..5f32c84e262 100644 --- a/resource-manager/costmanagement/2023-08-01/views/version.go +++ b/resource-manager/costmanagement/2023-08-01/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2023-08-01" } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/README.md b/resource-manager/costmanagement/2023-11-01/alerts/README.md index 918f412f05f..690cb25b79b 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/README.md +++ b/resource-manager/costmanagement/2023-11-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/alerts/client.go b/resource-manager/costmanagement/2023-11-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/client.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/alerts/id_externalcloudprovidertype.go index fc639fb3d5c..77aede12e1d 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/id_scopedalert.go b/resource-manager/costmanagement/2023-11-01/alerts/id_scopedalert.go index ae53435e0cf..47da891ba1f 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/id_scopedalert.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/id_scopedalert.go @@ -40,7 +40,7 @@ func ParseScopedAlertID(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAlertIDInsensitively(input string) (*ScopedAlertId, error) { } id := ScopedAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/method_dismiss.go b/resource-manager/costmanagement/2023-11-01/alerts/method_dismiss.go index 40edeae9a59..76aff29f370 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/method_dismiss.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/method_dismiss.go @@ -49,7 +49,6 @@ func (c AlertsClient) Dismiss(ctx context.Context, id ScopedAlertId, input Dismi var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/method_get.go b/resource-manager/costmanagement/2023-11-01/alerts/method_get.go index 1d03a389a52..5128f9d7998 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id ScopedAlertId) (result GetOper var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/alerts/version.go b/resource-manager/costmanagement/2023-11-01/alerts/version.go index 54e1c0b879f..1ff62d9c53b 100644 --- a/resource-manager/costmanagement/2023-11-01/alerts/version.go +++ b/resource-manager/costmanagement/2023-11-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/README.md b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/README.md index b1e40473f0c..2d2c8df65d2 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/README.md +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/benefitrecommendations` Documentation -The `benefitrecommendations` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `benefitrecommendations` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/client.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/client.go index a01d721f32f..2e248713c75 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/client.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/client.go @@ -15,7 +15,7 @@ type BenefitRecommendationsClient struct { } func NewBenefitRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitrecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitrecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitRecommendationsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/method_list.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/method_list.go index 27da9258c6b..2cab4a79073 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationmodel.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationmodel.go index 5151a7aafc2..00f53d6c3d2 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationmodel.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationmodel.go @@ -36,7 +36,7 @@ func (s *BenefitRecommendationModel) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBenefitRecommendationPropertiesImplementation(v) + impl, err := UnmarshalBenefitRecommendationPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BenefitRecommendationModel': %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationproperties.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationproperties.go index c64301ec1c0..7945d1cb52c 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_benefitrecommendationproperties.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitRecommendationProperties interface { + BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl } -// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitRecommendationProperties = BaseBenefitRecommendationPropertiesImpl{} + +type BaseBenefitRecommendationPropertiesImpl struct { + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` + ArmSkuName *string `json:"armSkuName,omitempty"` + CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` + CostWithoutBenefit *float64 `json:"costWithoutBenefit,omitempty"` + CurrencyCode *string `json:"currencyCode,omitempty"` + FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"` + LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` + LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` + RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` + Term *Term `json:"term,omitempty"` + TotalHours *int64 `json:"totalHours,omitempty"` + Usage *RecommendationUsageDetails `json:"usage,omitempty"` +} + +func (s BaseBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s +} + +var _ BenefitRecommendationProperties = RawBenefitRecommendationPropertiesImpl{} + +// RawBenefitRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitRecommendationPropertiesImpl struct { - Type string - Values map[string]interface{} + benefitRecommendationProperties BaseBenefitRecommendationPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitRecommendationPropertiesImpl) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return s.benefitRecommendationProperties } -func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { +func UnmarshalBenefitRecommendationPropertiesImplementation(input []byte) (BenefitRecommendationProperties, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBenefitRecommendationPropertiesImplementation(input []byte) (Benef return out, nil } - out := RawBenefitRecommendationPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBenefitRecommendationPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitRecommendationPropertiesImpl: %+v", err) } - return out, nil + + return RawBenefitRecommendationPropertiesImpl{ + benefitRecommendationProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go index 81a5f6f0e30..0dd2c7d6693 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_sharedscopebenefitrecommendationproperties.go @@ -16,6 +16,7 @@ var _ BenefitRecommendationProperties = SharedScopeBenefitRecommendationProperti type SharedScopeBenefitRecommendationProperties struct { // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -25,11 +26,30 @@ type SharedScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SharedScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -65,9 +85,10 @@ func (s SharedScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharedScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Shared" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go index ec6d12ef9c0..c4f7b62d4f2 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/model_singlescopebenefitrecommendationproperties.go @@ -18,6 +18,7 @@ type SingleScopeBenefitRecommendationProperties struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from BenefitRecommendationProperties + AllRecommendationDetails *AllSavingsList `json:"allRecommendationDetails,omitempty"` ArmSkuName *string `json:"armSkuName,omitempty"` CommitmentGranularity *Grain `json:"commitmentGranularity,omitempty"` @@ -27,11 +28,30 @@ type SingleScopeBenefitRecommendationProperties struct { LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"` LookBackPeriod *LookBackPeriod `json:"lookBackPeriod,omitempty"` RecommendationDetails *AllSavingsBenefitDetails `json:"recommendationDetails,omitempty"` + Scope Scope `json:"scope"` Term *Term `json:"term,omitempty"` TotalHours *int64 `json:"totalHours,omitempty"` Usage *RecommendationUsageDetails `json:"usage,omitempty"` } +func (s SingleScopeBenefitRecommendationProperties) BenefitRecommendationProperties() BaseBenefitRecommendationPropertiesImpl { + return BaseBenefitRecommendationPropertiesImpl{ + AllRecommendationDetails: s.AllRecommendationDetails, + ArmSkuName: s.ArmSkuName, + CommitmentGranularity: s.CommitmentGranularity, + CostWithoutBenefit: s.CostWithoutBenefit, + CurrencyCode: s.CurrencyCode, + FirstConsumptionDate: s.FirstConsumptionDate, + LastConsumptionDate: s.LastConsumptionDate, + LookBackPeriod: s.LookBackPeriod, + RecommendationDetails: s.RecommendationDetails, + Scope: s.Scope, + Term: s.Term, + TotalHours: s.TotalHours, + Usage: s.Usage, + } +} + func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error) { if o.FirstConsumptionDate == nil { return nil, nil @@ -67,9 +87,10 @@ func (s SingleScopeBenefitRecommendationProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleScopeBenefitRecommendationProperties: %+v", err) } + decoded["scope"] = "Single" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/version.go b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/version.go index 768999c49cf..988a42f6975 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitrecommendations/version.go +++ b/resource-manager/costmanagement/2023-11-01/benefitrecommendations/version.go @@ -1,12 +1,10 @@ package benefitrecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitrecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitrecommendations/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/README.md b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/README.md index 90602015991..468bd3411a5 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/README.md +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries` Documentation -The `benefitutilizationsummaries` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `benefitutilizationsummaries` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/client.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/client.go index a1791ea3fd4..7a4ecf7c986 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/client.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesClient struct { } func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingaccount.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingaccount.go index fed7acf47e4..754dd311dd5 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingprofile.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingprofile.go index 36a4181f9fc..8bcadc0f7b9 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplan.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplan.go index 435f572e064..95490c9057f 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplanorder.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplanorder.go index ce4a1cce3ff..ce828821476 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingaccountid.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingaccountid.go index e541d866d32..802f44ece83 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingaccountid.go @@ -41,6 +41,7 @@ func (o ListByBillingAccountIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingAccountId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingprofileid.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingprofileid.go index 5e0b8f92cce..75947163736 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbybillingprofileid.go @@ -41,6 +41,7 @@ func (o ListByBillingProfileIdOperationOptions) ToHeaders() *client.Headers { func (o ListByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListByBillingProfileId(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanid.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanid.go index 01c5f8c1032..689a3a2b24c 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanid.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanid.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanIdOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanId(ctx context.Conte temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanorder.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanorder.go index c7b749ca32a..6e484f25bac 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanorder.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/method_listbysavingsplanorder.go @@ -41,6 +41,7 @@ func (o ListBySavingsPlanOrderOperationOptions) ToHeaders() *client.Headers { func (o ListBySavingsPlanOrderOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c BenefitUtilizationSummariesClient) ListBySavingsPlanOrder(ctx context.Co temp := make([]BenefitUtilizationSummary, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBenefitUtilizationSummaryImplementation(v) + val, err := UnmarshalBenefitUtilizationSummaryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BenefitUtilizationSummary (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_benefitutilizationsummary.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_benefitutilizationsummary.go index 3a145e88ea1..8c2269fa24d 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_benefitutilizationsummary.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_benefitutilizationsummary.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BenefitUtilizationSummary interface { + BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl } -// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BenefitUtilizationSummary = BaseBenefitUtilizationSummaryImpl{} + +type BaseBenefitUtilizationSummaryImpl struct { + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s +} + +var _ BenefitUtilizationSummary = RawBenefitUtilizationSummaryImpl{} + +// RawBenefitUtilizationSummaryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBenefitUtilizationSummaryImpl struct { - Type string - Values map[string]interface{} + benefitUtilizationSummary BaseBenefitUtilizationSummaryImpl + Type string + Values map[string]interface{} +} + +func (s RawBenefitUtilizationSummaryImpl) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return s.benefitUtilizationSummary } -func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { +func UnmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtilizationSummary, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalBenefitUtilizationSummaryImplementation(input []byte) (BenefitUtil return out, nil } - out := RawBenefitUtilizationSummaryImpl{ - Type: value, - Values: temp, + var parent BaseBenefitUtilizationSummaryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBenefitUtilizationSummaryImpl: %+v", err) } - return out, nil + + return RawBenefitUtilizationSummaryImpl{ + benefitUtilizationSummary: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go index 48e7170c8de..863b9cd100a 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_includedquantityutilizationsummary.go @@ -14,9 +14,20 @@ type IncludedQuantityUtilizationSummary struct { Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IncludedQuantityUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IncludedQuantityUtilizationSummary{} @@ -30,9 +41,10 @@ func (s IncludedQuantityUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IncludedQuantityUtilizationSummary: %+v", err) } + decoded["kind"] = "IncludedQuantity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go index 6d6a6d56802..2920f6dc0bf 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/model_savingsplanutilizationsummary.go @@ -14,9 +14,20 @@ type SavingsPlanUtilizationSummary struct { Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"` // Fields inherited from BenefitUtilizationSummary - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind BenefitKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SavingsPlanUtilizationSummary) BenefitUtilizationSummary() BaseBenefitUtilizationSummaryImpl { + return BaseBenefitUtilizationSummaryImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SavingsPlanUtilizationSummary{} @@ -30,9 +41,10 @@ func (s SavingsPlanUtilizationSummary) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SavingsPlanUtilizationSummary: %+v", err) } + decoded["kind"] = "SavingsPlan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/version.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/version.go index a508e472f50..2237db9af23 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/version.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummaries/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummaries/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/README.md b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/README.md index 928bdf9e251..9acf05640aa 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/README.md +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync` Documentation -The `benefitutilizationsummariesasync` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `benefitutilizationsummariesasync` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/client.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/client.go index 1aeefdac651..85faaf6ba26 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/client.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/client.go @@ -15,7 +15,7 @@ type BenefitUtilizationSummariesAsyncClient struct { } func NewBenefitUtilizationSummariesAsyncClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesAsyncClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "benefitutilizationsummariesasync", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BenefitUtilizationSummariesAsyncClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingaccount.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingaccount.go index 4e554ecb41d..1fcf6d9853a 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingprofile.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingprofile.go index e5a6774541c..f85d7006967 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservation.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservation.go index 062dba1498f..5024e4ccd71 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservation.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservation.go @@ -40,7 +40,7 @@ func ParseReservationID(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseReservationIDInsensitively(input string) (*ReservationId, error) { } id := ReservationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservationorder.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservationorder.go index 85676317bd7..450d77914a8 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservationorder.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_reservationorder.go @@ -38,7 +38,7 @@ func ParseReservationOrderID(input string) (*ReservationOrderId, error) { } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, er } id := ReservationOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplan.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplan.go index b82feca7660..5f453624229 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplan.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplan.go @@ -40,7 +40,7 @@ func ParseSavingsPlanID(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error) { } id := SavingsPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplanorder.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplanorder.go index d8eb517093e..48a16367f0c 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplanorder.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/id_savingsplanorder.go @@ -38,7 +38,7 @@ func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error) { } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, er } id := SavingsPlanOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/version.go b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/version.go index 942a1c6f260..ff8819b13b1 100644 --- a/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/version.go +++ b/resource-manager/costmanagement/2023-11-01/benefitutilizationsummariesasync/version.go @@ -1,12 +1,10 @@ package benefitutilizationsummariesasync -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/benefitutilizationsummariesasync/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/benefitutilizationsummariesasync/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/README.md b/resource-manager/costmanagement/2023-11-01/budgets/README.md index e39e40a4d96..bfd40fcc49d 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/README.md +++ b/resource-manager/costmanagement/2023-11-01/budgets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/budgets` Documentation -The `budgets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `budgets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/budgets/client.go b/resource-manager/costmanagement/2023-11-01/budgets/client.go index ad5bfc85857..57e800a930c 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/client.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/client.go @@ -15,7 +15,7 @@ type BudgetsClient struct { } func NewBudgetsClientWithBaseURI(sdkApi sdkEnv.Api) (*BudgetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "budgets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "budgets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BudgetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/id_scopedbudget.go b/resource-manager/costmanagement/2023-11-01/budgets/id_scopedbudget.go index 30ab4e106c9..23b22fcbf2b 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/id_scopedbudget.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/id_scopedbudget.go @@ -40,7 +40,7 @@ func ParseScopedBudgetID(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedBudgetIDInsensitively(input string) (*ScopedBudgetId, error) { } id := ScopedBudgetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/method_createorupdate.go b/resource-manager/costmanagement/2023-11-01/budgets/method_createorupdate.go index efacada91d4..9ea587d4cea 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BudgetsClient) CreateOrUpdate(ctx context.Context, id ScopedBudgetId, in var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/method_get.go b/resource-manager/costmanagement/2023-11-01/budgets/method_get.go index d597fcc76e5..22197d5789d 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/method_get.go @@ -45,7 +45,6 @@ func (c BudgetsClient) Get(ctx context.Context, id ScopedBudgetId) (result GetOp var model Budget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/method_list.go b/resource-manager/costmanagement/2023-11-01/budgets/method_list.go index 5b533cfca25..24766589a09 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/budgets/version.go b/resource-manager/costmanagement/2023-11-01/budgets/version.go index a05c8bc9010..0b2ab857dcc 100644 --- a/resource-manager/costmanagement/2023-11-01/budgets/version.go +++ b/resource-manager/costmanagement/2023-11-01/budgets/version.go @@ -1,12 +1,10 @@ package budgets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/budgets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/budgets/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/README.md b/resource-manager/costmanagement/2023-11-01/costallocationrules/README.md index 8fd6dfeb65c..5f8ca2867c1 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/README.md +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/costallocationrules` Documentation -The `costallocationrules` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `costallocationrules` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/client.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/client.go index 43af201cf15..79429313723 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/client.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/client.go @@ -15,7 +15,7 @@ type CostAllocationRulesClient struct { } func NewCostAllocationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*CostAllocationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costallocationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costallocationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostAllocationRulesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/id_billingaccount.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/id_billingaccount.go index 47e6c07bb38..57ee122a96b 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/id_costallocationrule.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/id_costallocationrule.go index e895cd1010e..83de11b32e9 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/id_costallocationrule.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/id_costallocationrule.go @@ -40,7 +40,7 @@ func ParseCostAllocationRuleID(input string) (*CostAllocationRuleId, error) { } id := CostAllocationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCostAllocationRuleIDInsensitively(input string) (*CostAllocationRuleId } id := CostAllocationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_checknameavailability.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_checknameavailability.go index b51a968b528..a48de6282e7 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c CostAllocationRulesClient) CheckNameAvailability(ctx context.Context, id var model CostAllocationRuleCheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_createorupdate.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_createorupdate.go index 6fbd1a591d8..68523dab115 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CostAllocationRulesClient) CreateOrUpdate(ctx context.Context, id CostAl var model CostAllocationRuleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_get.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_get.go index 3026a9388ae..140c17ec016 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/method_get.go @@ -45,7 +45,6 @@ func (c CostAllocationRulesClient) Get(ctx context.Context, id CostAllocationRul var model CostAllocationRuleDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/costallocationrules/version.go b/resource-manager/costmanagement/2023-11-01/costallocationrules/version.go index 406737a8fd8..4648f41f728 100644 --- a/resource-manager/costmanagement/2023-11-01/costallocationrules/version.go +++ b/resource-manager/costmanagement/2023-11-01/costallocationrules/version.go @@ -1,12 +1,10 @@ package costallocationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costallocationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costallocationrules/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/costdetails/README.md b/resource-manager/costmanagement/2023-11-01/costdetails/README.md index 17f96ddc789..66612acc8b4 100644 --- a/resource-manager/costmanagement/2023-11-01/costdetails/README.md +++ b/resource-manager/costmanagement/2023-11-01/costdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/costdetails` Documentation -The `costdetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `costdetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/costdetails/client.go b/resource-manager/costmanagement/2023-11-01/costdetails/client.go index e7cebe17215..d109cc872ba 100644 --- a/resource-manager/costmanagement/2023-11-01/costdetails/client.go +++ b/resource-manager/costmanagement/2023-11-01/costdetails/client.go @@ -15,7 +15,7 @@ type CostDetailsClient struct { } func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costdetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costdetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/costdetails/version.go b/resource-manager/costmanagement/2023-11-01/costdetails/version.go index b97d8054d9f..736414ba16d 100644 --- a/resource-manager/costmanagement/2023-11-01/costdetails/version.go +++ b/resource-manager/costmanagement/2023-11-01/costdetails/version.go @@ -1,12 +1,10 @@ package costdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costdetails/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/README.md b/resource-manager/costmanagement/2023-11-01/dimensions/README.md index 23c321ee097..463d0f493f5 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/README.md +++ b/resource-manager/costmanagement/2023-11-01/dimensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/dimensions` Documentation -The `dimensions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `dimensions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/client.go b/resource-manager/costmanagement/2023-11-01/dimensions/client.go index f54261d0191..48312ba53cf 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/client.go +++ b/resource-manager/costmanagement/2023-11-01/dimensions/client.go @@ -15,7 +15,7 @@ type DimensionsClient struct { } func NewDimensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DimensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dimensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dimensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DimensionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/dimensions/id_externalcloudprovidertype.go index b3598bebdba..a01a8013715 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/dimensions/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/method_byexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/dimensions/method_byexternalcloudprovidertype.go index 16a01eb231f..fd358ea03fd 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/method_byexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/dimensions/method_byexternalcloudprovidertype.go @@ -36,6 +36,7 @@ func (o ByExternalCloudProviderTypeOperationOptions) ToHeaders() *client.Headers func (o ByExternalCloudProviderTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DimensionsClient) ByExternalCloudProviderType(ctx context.Context, id Ex var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/method_list.go b/resource-manager/costmanagement/2023-11-01/dimensions/method_list.go index 3b15e130078..e5f9b2d5c2a 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/dimensions/method_list.go @@ -37,6 +37,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -84,7 +85,6 @@ func (c DimensionsClient) List(ctx context.Context, id commonids.ScopeId, option var model DimensionsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/dimensions/version.go b/resource-manager/costmanagement/2023-11-01/dimensions/version.go index f39414bcd56..e00748d20aa 100644 --- a/resource-manager/costmanagement/2023-11-01/dimensions/version.go +++ b/resource-manager/costmanagement/2023-11-01/dimensions/version.go @@ -1,12 +1,10 @@ package dimensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dimensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dimensions/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/exports/README.md b/resource-manager/costmanagement/2023-11-01/exports/README.md index 8618c948823..31110e50093 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/README.md +++ b/resource-manager/costmanagement/2023-11-01/exports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `exports` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/exports/client.go b/resource-manager/costmanagement/2023-11-01/exports/client.go index d66fcf02cc7..783067f2723 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/client.go +++ b/resource-manager/costmanagement/2023-11-01/exports/client.go @@ -15,7 +15,7 @@ type ExportsClient struct { } func NewExportsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExportsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/exports/id_scopedexport.go b/resource-manager/costmanagement/2023-11-01/exports/id_scopedexport.go index 7db2e02ed55..8bef852c396 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/id_scopedexport.go +++ b/resource-manager/costmanagement/2023-11-01/exports/id_scopedexport.go @@ -40,7 +40,7 @@ func ParseScopedExportID(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExportIDInsensitively(input string) (*ScopedExportId, error) { } id := ScopedExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/exports/method_createorupdate.go b/resource-manager/costmanagement/2023-11-01/exports/method_createorupdate.go index 07d74535042..0ce129b7742 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-11-01/exports/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ExportsClient) CreateOrUpdate(ctx context.Context, id ScopedExportId, in var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/exports/method_get.go b/resource-manager/costmanagement/2023-11-01/exports/method_get.go index bed88c94514..325c75fe4ea 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/exports/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ExportsClient) Get(ctx context.Context, id ScopedExportId, options GetOp var model Export result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/exports/method_getexecutionhistory.go b/resource-manager/costmanagement/2023-11-01/exports/method_getexecutionhistory.go index 687216d36d5..99c38c07df7 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/method_getexecutionhistory.go +++ b/resource-manager/costmanagement/2023-11-01/exports/method_getexecutionhistory.go @@ -46,7 +46,6 @@ func (c ExportsClient) GetExecutionHistory(ctx context.Context, id ScopedExportI var model ExportExecutionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/exports/method_list.go b/resource-manager/costmanagement/2023-11-01/exports/method_list.go index 6b9e0d7ef58..d18e687c04c 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/exports/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ExportsClient) List(ctx context.Context, id commonids.ScopeId, options L var model ExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/exports/version.go b/resource-manager/costmanagement/2023-11-01/exports/version.go index 6bd9d025aa9..e194e711c89 100644 --- a/resource-manager/costmanagement/2023-11-01/exports/version.go +++ b/resource-manager/costmanagement/2023-11-01/exports/version.go @@ -1,12 +1,10 @@ package exports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exports/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/forecast/README.md b/resource-manager/costmanagement/2023-11-01/forecast/README.md index 6c8f427c0a8..448a8319e3a 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/README.md +++ b/resource-manager/costmanagement/2023-11-01/forecast/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/forecast` Documentation -The `forecast` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `forecast` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/forecast/client.go b/resource-manager/costmanagement/2023-11-01/forecast/client.go index cb67562e979..012a2eb1441 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/client.go +++ b/resource-manager/costmanagement/2023-11-01/forecast/client.go @@ -15,7 +15,7 @@ type ForecastClient struct { } func NewForecastClientWithBaseURI(sdkApi sdkEnv.Api) (*ForecastClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forecast", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forecast", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForecastClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/forecast/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/forecast/id_externalcloudprovidertype.go index 10b5988ac74..53f9ece6313 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/forecast/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/forecast/method_externalcloudproviderusage.go b/resource-manager/costmanagement/2023-11-01/forecast/method_externalcloudproviderusage.go index d766f670cb8..4dc4bfabe8e 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/method_externalcloudproviderusage.go +++ b/resource-manager/costmanagement/2023-11-01/forecast/method_externalcloudproviderusage.go @@ -34,6 +34,7 @@ func (o ExternalCloudProviderUsageOperationOptions) ToHeaders() *client.Headers func (o ExternalCloudProviderUsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForecastClient) ExternalCloudProviderUsage(ctx context.Context, id Exter var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/forecast/method_usage.go b/resource-manager/costmanagement/2023-11-01/forecast/method_usage.go index 2c7a09642b7..a3d33f16ee2 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/method_usage.go +++ b/resource-manager/costmanagement/2023-11-01/forecast/method_usage.go @@ -35,6 +35,7 @@ func (o UsageOperationOptions) ToHeaders() *client.Headers { func (o UsageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -80,7 +81,6 @@ func (c ForecastClient) Usage(ctx context.Context, id commonids.ScopeId, input F var model ForecastResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/forecast/version.go b/resource-manager/costmanagement/2023-11-01/forecast/version.go index 898aac9c8a4..55ffade4447 100644 --- a/resource-manager/costmanagement/2023-11-01/forecast/version.go +++ b/resource-manager/costmanagement/2023-11-01/forecast/version.go @@ -1,12 +1,10 @@ package forecast -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forecast/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forecast/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/README.md b/resource-manager/costmanagement/2023-11-01/pricesheets/README.md index 42fef55aaec..fbc8893491a 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/README.md +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/pricesheets` Documentation -The `pricesheets` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `pricesheets` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/client.go b/resource-manager/costmanagement/2023-11-01/pricesheets/client.go index 426633c8f50..395b4b3794a 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/client.go +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/client.go @@ -15,7 +15,7 @@ type PriceSheetsClient struct { } func NewPriceSheetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PriceSheetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricesheets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricesheets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PriceSheetsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingperiod.go b/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingperiod.go index 190cca9ebee..acc42022f61 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingperiod.go +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingperiod.go @@ -40,7 +40,7 @@ func ParseBillingPeriodID(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingPeriodIDInsensitively(input string) (*BillingPeriodId, error) { } id := BillingPeriodId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingprofile.go b/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingprofile.go index 6bdcc943e59..c20f50555d7 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/id_invoice.go b/resource-manager/costmanagement/2023-11-01/pricesheets/id_invoice.go index a4f2544f090..e786ff1d4ee 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/id_invoice.go +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/id_invoice.go @@ -42,7 +42,7 @@ func ParseInvoiceID(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInvoiceIDInsensitively(input string) (*InvoiceId, error) { } id := InvoiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/pricesheets/version.go b/resource-manager/costmanagement/2023-11-01/pricesheets/version.go index d6815484684..fb5a158b21f 100644 --- a/resource-manager/costmanagement/2023-11-01/pricesheets/version.go +++ b/resource-manager/costmanagement/2023-11-01/pricesheets/version.go @@ -1,12 +1,10 @@ package pricesheets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricesheets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricesheets/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/query/README.md b/resource-manager/costmanagement/2023-11-01/query/README.md index a10906a9743..e1fa1836dc3 100644 --- a/resource-manager/costmanagement/2023-11-01/query/README.md +++ b/resource-manager/costmanagement/2023-11-01/query/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/query` Documentation -The `query` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `query` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/query/client.go b/resource-manager/costmanagement/2023-11-01/query/client.go index a18152c5277..9b5f1435155 100644 --- a/resource-manager/costmanagement/2023-11-01/query/client.go +++ b/resource-manager/costmanagement/2023-11-01/query/client.go @@ -15,7 +15,7 @@ type QueryClient struct { } func NewQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "query", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "query", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/query/id_externalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/query/id_externalcloudprovidertype.go index 6d220c04360..97b6e187495 100644 --- a/resource-manager/costmanagement/2023-11-01/query/id_externalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/query/id_externalcloudprovidertype.go @@ -40,7 +40,7 @@ func ParseExternalCloudProviderTypeID(input string) (*ExternalCloudProviderTypeI } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExternalCloudProviderTypeIDInsensitively(input string) (*ExternalCloud } id := ExternalCloudProviderTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/query/method_usage.go b/resource-manager/costmanagement/2023-11-01/query/method_usage.go index cfb5363655b..94523716a80 100644 --- a/resource-manager/costmanagement/2023-11-01/query/method_usage.go +++ b/resource-manager/costmanagement/2023-11-01/query/method_usage.go @@ -52,7 +52,6 @@ func (c QueryClient) Usage(ctx context.Context, id commonids.ScopeId, input Quer var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/query/method_usagebyexternalcloudprovidertype.go b/resource-manager/costmanagement/2023-11-01/query/method_usagebyexternalcloudprovidertype.go index 96a18750e34..34fa99ffbff 100644 --- a/resource-manager/costmanagement/2023-11-01/query/method_usagebyexternalcloudprovidertype.go +++ b/resource-manager/costmanagement/2023-11-01/query/method_usagebyexternalcloudprovidertype.go @@ -50,7 +50,6 @@ func (c QueryClient) UsageByExternalCloudProviderType(ctx context.Context, id Ex var model QueryResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/query/version.go b/resource-manager/costmanagement/2023-11-01/query/version.go index 25bad667ce0..6f90ceceebd 100644 --- a/resource-manager/costmanagement/2023-11-01/query/version.go +++ b/resource-manager/costmanagement/2023-11-01/query/version.go @@ -1,12 +1,10 @@ package query -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/query/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/query/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/README.md b/resource-manager/costmanagement/2023-11-01/reservedinstances/README.md index 2a5d78def09..7280fb4c38a 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/README.md +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/reservedinstances` Documentation -The `reservedinstances` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `reservedinstances` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/client.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/client.go index bc9a50e3734..26dbe162264 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/client.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/client.go @@ -15,7 +15,7 @@ type ReservedInstancesClient struct { } func NewReservedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "reservedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "reservedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReservedInstancesClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingaccount.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingaccount.go index 62922e630b8..5ab0307ea80 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingaccount.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingprofile.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingprofile.go index 59278834748..50f59be1dd9 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingprofile.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/id_billingprofile.go @@ -40,7 +40,7 @@ func ParseBillingProfileID(input string) (*BillingProfileId, error) { } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error) } id := BillingProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go index 08e7caf3c72..08d36246dc0 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingaccountid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingAccountIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go index 4a8c6bbf57e..020a1465360 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/method_generatereservationdetailsreportbybillingprofileid.go @@ -38,6 +38,7 @@ func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToHe func (o GenerateReservationDetailsReportByBillingProfileIdOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/reservedinstances/version.go b/resource-manager/costmanagement/2023-11-01/reservedinstances/version.go index c1effd1820c..6f25019b964 100644 --- a/resource-manager/costmanagement/2023-11-01/reservedinstances/version.go +++ b/resource-manager/costmanagement/2023-11-01/reservedinstances/version.go @@ -1,12 +1,10 @@ package reservedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/reservedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/reservedinstances/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/README.md b/resource-manager/costmanagement/2023-11-01/scheduledactions/README.md index 50ddd62cd50..e79f0f0393c 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/README.md +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/scheduledactions` Documentation -The `scheduledactions` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `scheduledactions` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/client.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/client.go index bca0696832f..2ad38dee43c 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/client.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/client.go @@ -15,7 +15,7 @@ type ScheduledActionsClient struct { } func NewScheduledActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledActionsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scheduledaction.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scheduledaction.go index fef59f3f03d..8c9e6c35939 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scheduledaction.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scheduledaction.go @@ -38,7 +38,7 @@ func ParseScheduledActionID(input string) (*ScheduledActionId, error) { } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, erro } id := ScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scopedscheduledaction.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scopedscheduledaction.go index 3605a487daf..b551ab04ef2 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scopedscheduledaction.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/id_scopedscheduledaction.go @@ -40,7 +40,7 @@ func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledAc } id := ScopedScheduledActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailability.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailability.go index 784263b1c5e..3e3c05e72bc 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailability.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c ScheduledActionsClient) CheckNameAvailability(ctx context.Context, input var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailabilitybyscope.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailabilitybyscope.go index 16761a3d565..dcc90e23d36 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailabilitybyscope.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_checknameavailabilitybyscope.go @@ -51,7 +51,6 @@ func (c ScheduledActionsClient) CheckNameAvailabilityByScope(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdate.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdate.go index 7ce81fbece9..4a9d5d9fc3d 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdate(ctx context.Context, id Scheduled var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdatebyscope.go index c87a0eb91fc..89c59910780 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_createorupdatebyscope.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateByScopeOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ScheduledActionsClient) CreateOrUpdateByScope(ctx context.Context, id Sc var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_get.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_get.go index 60d64aba5e7..7d8f87f99ca 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) Get(ctx context.Context, id ScheduledActionId) ( var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_getbyscope.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_getbyscope.go index 5f3e628d15b..ddf1f0b66f2 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ScheduledActionsClient) GetByScope(ctx context.Context, id ScopedSchedul var model ScheduledAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_list.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_list.go index 57b3efc62dd..00803631088 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_listbyscope.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_listbyscope.go index 959bc9896b8..a2f82657270 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/method_listbyscope.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/costmanagement/2023-11-01/scheduledactions/version.go b/resource-manager/costmanagement/2023-11-01/scheduledactions/version.go index d362018a0f1..81d4f4c5f9c 100644 --- a/resource-manager/costmanagement/2023-11-01/scheduledactions/version.go +++ b/resource-manager/costmanagement/2023-11-01/scheduledactions/version.go @@ -1,12 +1,10 @@ package scheduledactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledactions/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/settings/README.md b/resource-manager/costmanagement/2023-11-01/settings/README.md index b453005beef..d17061615b5 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/README.md +++ b/resource-manager/costmanagement/2023-11-01/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `settings` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/settings/client.go b/resource-manager/costmanagement/2023-11-01/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/client.go +++ b/resource-manager/costmanagement/2023-11-01/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/settings/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-11-01/settings/method_createorupdatebyscope.go index efdc684f2cd..e02d6325286 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-11-01/settings/method_createorupdatebyscope.go @@ -17,7 +17,7 @@ import ( type CreateOrUpdateByScopeOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // CreateOrUpdateByScope ... @@ -55,11 +55,11 @@ func (c SettingsClient) CreateOrUpdateByScope(ctx context.Context, id commonids. if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/costmanagement/2023-11-01/settings/method_getbyscope.go b/resource-manager/costmanagement/2023-11-01/settings/method_getbyscope.go index 19d624c022b..6a80b8c5c47 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-11-01/settings/method_getbyscope.go @@ -17,7 +17,7 @@ import ( type GetByScopeOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // GetByScope ... @@ -50,11 +50,11 @@ func (c SettingsClient) GetByScope(ctx context.Context, id commonids.ScopeId) (r if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/costmanagement/2023-11-01/settings/method_list.go b/resource-manager/costmanagement/2023-11-01/settings/method_list.go index 24714b79a2c..1993ab6a3ea 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/method_list.go +++ b/resource-manager/costmanagement/2023-11-01/settings/method_list.go @@ -47,7 +47,6 @@ func (c SettingsClient) List(ctx context.Context, id commonids.ScopeId) (result var model SettingsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/settings/model_setting.go b/resource-manager/costmanagement/2023-11-01/settings/model_setting.go index ec35735d69f..22d33fcf727 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/model_setting.go +++ b/resource-manager/costmanagement/2023-11-01/settings/model_setting.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Setting interface { + Setting() BaseSettingImpl } -// RawSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Setting = BaseSettingImpl{} + +type BaseSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSettingImpl) Setting() BaseSettingImpl { + return s +} + +var _ Setting = RawSettingImpl{} + +// RawSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSettingImpl struct { - Type string - Values map[string]interface{} + setting BaseSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSettingImpl) Setting() BaseSettingImpl { + return s.setting } -func unmarshalSettingImplementation(input []byte) (Setting, error) { +func UnmarshalSettingImplementation(input []byte) (Setting, error) { if input == nil { return nil, nil } @@ -44,10 +64,15 @@ func unmarshalSettingImplementation(input []byte) (Setting, error) { return out, nil } - out := RawSettingImpl{ - Type: value, - Values: temp, + var parent BaseSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSettingImpl: %+v", err) } - return out, nil + + return RawSettingImpl{ + setting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go b/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go index 8f112cedd41..56bc6dd6dc8 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go +++ b/resource-manager/costmanagement/2023-11-01/settings/model_settingslistresult.go @@ -29,7 +29,7 @@ func (s *SettingsListResult) UnmarshalJSON(bytes []byte) error { output := make([]Setting, 0) for i, val := range listTemp { - impl, err := unmarshalSettingImplementation(val) + impl, err := UnmarshalSettingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'SettingsListResult': %+v", i, err) } diff --git a/resource-manager/costmanagement/2023-11-01/settings/model_taginheritancesetting.go b/resource-manager/costmanagement/2023-11-01/settings/model_taginheritancesetting.go index 6fe10f86ec1..4e20b2d9d98 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/model_taginheritancesetting.go +++ b/resource-manager/costmanagement/2023-11-01/settings/model_taginheritancesetting.go @@ -14,9 +14,20 @@ type TagInheritanceSetting struct { Properties *TagInheritanceProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s TagInheritanceSetting) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = TagInheritanceSetting{} @@ -30,9 +41,10 @@ func (s TagInheritanceSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TagInheritanceSetting: %+v", err) } + decoded["kind"] = "taginheritance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/costmanagement/2023-11-01/settings/version.go b/resource-manager/costmanagement/2023-11-01/settings/version.go index 6cff0df04d4..20ea092223e 100644 --- a/resource-manager/costmanagement/2023-11-01/settings/version.go +++ b/resource-manager/costmanagement/2023-11-01/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/usagedetails/README.md b/resource-manager/costmanagement/2023-11-01/usagedetails/README.md index 3c9999f8f31..89d0fd1ae80 100644 --- a/resource-manager/costmanagement/2023-11-01/usagedetails/README.md +++ b/resource-manager/costmanagement/2023-11-01/usagedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/usagedetails` Documentation -The `usagedetails` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `usagedetails` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/usagedetails/client.go b/resource-manager/costmanagement/2023-11-01/usagedetails/client.go index 8364a0fb4de..d671396ed8e 100644 --- a/resource-manager/costmanagement/2023-11-01/usagedetails/client.go +++ b/resource-manager/costmanagement/2023-11-01/usagedetails/client.go @@ -15,7 +15,7 @@ type UsageDetailsClient struct { } func NewUsageDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageDetailsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/usagedetails/version.go b/resource-manager/costmanagement/2023-11-01/usagedetails/version.go index a28b2b26690..8bbbfed4291 100644 --- a/resource-manager/costmanagement/2023-11-01/usagedetails/version.go +++ b/resource-manager/costmanagement/2023-11-01/usagedetails/version.go @@ -1,12 +1,10 @@ package usagedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagedetails/2023-11-01" } diff --git a/resource-manager/costmanagement/2023-11-01/views/README.md b/resource-manager/costmanagement/2023-11-01/views/README.md index e53569661df..606894ad433 100644 --- a/resource-manager/costmanagement/2023-11-01/views/README.md +++ b/resource-manager/costmanagement/2023-11-01/views/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-11-01/views` Documentation -The `views` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-11-01`). +The `views` SDK allows for interaction with Azure Resource Manager `costmanagement` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/costmanagement/2023-11-01/views/client.go b/resource-manager/costmanagement/2023-11-01/views/client.go index 8c009db6319..39dfbeb83c4 100644 --- a/resource-manager/costmanagement/2023-11-01/views/client.go +++ b/resource-manager/costmanagement/2023-11-01/views/client.go @@ -15,7 +15,7 @@ type ViewsClient struct { } func NewViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*ViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "views", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "views", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ViewsClient: %+v", err) } diff --git a/resource-manager/costmanagement/2023-11-01/views/id_scopedview.go b/resource-manager/costmanagement/2023-11-01/views/id_scopedview.go index cc727a1e00b..220278419b8 100644 --- a/resource-manager/costmanagement/2023-11-01/views/id_scopedview.go +++ b/resource-manager/costmanagement/2023-11-01/views/id_scopedview.go @@ -40,7 +40,7 @@ func ParseScopedViewID(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedViewIDInsensitively(input string) (*ScopedViewId, error) { } id := ScopedViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/views/id_view.go b/resource-manager/costmanagement/2023-11-01/views/id_view.go index a8a4ef6475d..a7a1944ae81 100644 --- a/resource-manager/costmanagement/2023-11-01/views/id_view.go +++ b/resource-manager/costmanagement/2023-11-01/views/id_view.go @@ -38,7 +38,7 @@ func ParseViewID(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseViewIDInsensitively(input string) (*ViewId, error) { } id := ViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/costmanagement/2023-11-01/views/method_createorupdate.go b/resource-manager/costmanagement/2023-11-01/views/method_createorupdate.go index ee004eef312..d4415bbe04f 100644 --- a/resource-manager/costmanagement/2023-11-01/views/method_createorupdate.go +++ b/resource-manager/costmanagement/2023-11-01/views/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdate(ctx context.Context, id ViewId, input View) var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/views/method_createorupdatebyscope.go b/resource-manager/costmanagement/2023-11-01/views/method_createorupdatebyscope.go index a013f26696b..0e520ebb645 100644 --- a/resource-manager/costmanagement/2023-11-01/views/method_createorupdatebyscope.go +++ b/resource-manager/costmanagement/2023-11-01/views/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ViewsClient) CreateOrUpdateByScope(ctx context.Context, id ScopedViewId, var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/views/method_get.go b/resource-manager/costmanagement/2023-11-01/views/method_get.go index c2730eb8416..d8ccf3940ac 100644 --- a/resource-manager/costmanagement/2023-11-01/views/method_get.go +++ b/resource-manager/costmanagement/2023-11-01/views/method_get.go @@ -45,7 +45,6 @@ func (c ViewsClient) Get(ctx context.Context, id ViewId) (result GetOperationRes var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/views/method_getbyscope.go b/resource-manager/costmanagement/2023-11-01/views/method_getbyscope.go index 781b520869d..2322d1b1eff 100644 --- a/resource-manager/costmanagement/2023-11-01/views/method_getbyscope.go +++ b/resource-manager/costmanagement/2023-11-01/views/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ViewsClient) GetByScope(ctx context.Context, id ScopedViewId) (result Ge var model View result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/costmanagement/2023-11-01/views/version.go b/resource-manager/costmanagement/2023-11-01/views/version.go index 72c4d77dde9..dbef98c3aef 100644 --- a/resource-manager/costmanagement/2023-11-01/views/version.go +++ b/resource-manager/costmanagement/2023-11-01/views/version.go @@ -1,12 +1,10 @@ package views -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/views/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/views/2023-11-01" } diff --git a/resource-manager/customproviders/2018-09-01-preview/associations/README.md b/resource-manager/customproviders/2018-09-01-preview/associations/README.md index 450578d5a14..aca2ae6b4a0 100644 --- a/resource-manager/customproviders/2018-09-01-preview/associations/README.md +++ b/resource-manager/customproviders/2018-09-01-preview/associations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/associations` Documentation -The `associations` SDK allows for interaction with the Azure Resource Manager Service `customproviders` (API Version `2018-09-01-preview`). +The `associations` SDK allows for interaction with Azure Resource Manager `customproviders` (API Version `2018-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/customproviders/2018-09-01-preview/associations/client.go b/resource-manager/customproviders/2018-09-01-preview/associations/client.go index d863c5ffbd8..47b9c885e6a 100644 --- a/resource-manager/customproviders/2018-09-01-preview/associations/client.go +++ b/resource-manager/customproviders/2018-09-01-preview/associations/client.go @@ -15,7 +15,7 @@ type AssociationsClient struct { } func NewAssociationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "associations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "associations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssociationsClient: %+v", err) } diff --git a/resource-manager/customproviders/2018-09-01-preview/associations/id_scopedassociation.go b/resource-manager/customproviders/2018-09-01-preview/associations/id_scopedassociation.go index 3b1fdcb3275..a198e8a5aea 100644 --- a/resource-manager/customproviders/2018-09-01-preview/associations/id_scopedassociation.go +++ b/resource-manager/customproviders/2018-09-01-preview/associations/id_scopedassociation.go @@ -40,7 +40,7 @@ func ParseScopedAssociationID(input string) (*ScopedAssociationId, error) { } id := ScopedAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAssociationIDInsensitively(input string) (*ScopedAssociationId, } id := ScopedAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/customproviders/2018-09-01-preview/associations/method_get.go b/resource-manager/customproviders/2018-09-01-preview/associations/method_get.go index 3377534024f..3b5c7092a6d 100644 --- a/resource-manager/customproviders/2018-09-01-preview/associations/method_get.go +++ b/resource-manager/customproviders/2018-09-01-preview/associations/method_get.go @@ -45,7 +45,6 @@ func (c AssociationsClient) Get(ctx context.Context, id ScopedAssociationId) (re var model Association result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/customproviders/2018-09-01-preview/associations/version.go b/resource-manager/customproviders/2018-09-01-preview/associations/version.go index 93cf8b75c2a..e2941e9cb84 100644 --- a/resource-manager/customproviders/2018-09-01-preview/associations/version.go +++ b/resource-manager/customproviders/2018-09-01-preview/associations/version.go @@ -1,12 +1,10 @@ package associations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/associations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/associations/2018-09-01-preview" } diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/README.md b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/README.md index 54f03280f73..fffdeb84e59 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/README.md +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider` Documentation -The `customresourceprovider` SDK allows for interaction with the Azure Resource Manager Service `customproviders` (API Version `2018-09-01-preview`). +The `customresourceprovider` SDK allows for interaction with Azure Resource Manager `customproviders` (API Version `2018-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/client.go b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/client.go index c7e9f464bc0..92089271dcc 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/client.go +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/client.go @@ -15,7 +15,7 @@ type CustomResourceProviderClient struct { } func NewCustomResourceProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomResourceProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customresourceprovider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customresourceprovider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomResourceProviderClient: %+v", err) } diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go index c865f6eff20..760dcd18b6f 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/id_resourceprovider.go @@ -42,7 +42,7 @@ func ParseResourceProviderID(input string) (*ResourceProviderId, error) { } id := ResourceProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceProviderIDInsensitively(input string) (*ResourceProviderId, er } id := ResourceProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_get.go b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_get.go index f7e63a7ca33..a6f4ce84edd 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_get.go +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_get.go @@ -45,7 +45,6 @@ func (c CustomResourceProviderClient) Get(ctx context.Context, id ResourceProvid var model CustomRPManifest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_update.go b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_update.go index e871c4633e1..af2109e9d68 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_update.go +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/method_update.go @@ -49,7 +49,6 @@ func (c CustomResourceProviderClient) Update(ctx context.Context, id ResourcePro var model CustomRPManifest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/version.go b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/version.go index 5c2bb858a34..ba9f501579e 100644 --- a/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/version.go +++ b/resource-manager/customproviders/2018-09-01-preview/customresourceprovider/version.go @@ -1,12 +1,10 @@ package customresourceprovider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customresourceprovider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customresourceprovider/2018-09-01-preview" } diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/README.md b/resource-manager/dashboard/2022-08-01/grafanaresource/README.md index 1d35eac65c6..e90b7520e83 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/README.md +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2022-08-01/grafanaresource` Documentation -The `grafanaresource` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2022-08-01`). +The `grafanaresource` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/client.go b/resource-manager/dashboard/2022-08-01/grafanaresource/client.go index 3c739c7c4d3..e4df7c7aa8b 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/client.go +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/client.go @@ -15,7 +15,7 @@ type GrafanaResourceClient struct { } func NewGrafanaResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*GrafanaResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "grafanaresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "grafanaresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GrafanaResourceClient: %+v", err) } diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/id_grafana.go b/resource-manager/dashboard/2022-08-01/grafanaresource/id_grafana.go index f557f3500f1..7c2009a7cae 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/id_grafana.go +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaget.go b/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaget.go index c20f300d05f..f1371abbec4 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaget.go +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaget.go @@ -45,7 +45,6 @@ func (c GrafanaResourceClient) GrafanaGet(ctx context.Context, id GrafanaId) (re var model ManagedGrafana result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaupdate.go b/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaupdate.go index cf0f88e0a62..e260315d6a2 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaupdate.go +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/method_grafanaupdate.go @@ -50,7 +50,6 @@ func (c GrafanaResourceClient) GrafanaUpdate(ctx context.Context, id GrafanaId, var model ManagedGrafana result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2022-08-01/grafanaresource/version.go b/resource-manager/dashboard/2022-08-01/grafanaresource/version.go index f452602c04d..e1075bbb7ef 100644 --- a/resource-manager/dashboard/2022-08-01/grafanaresource/version.go +++ b/resource-manager/dashboard/2022-08-01/grafanaresource/version.go @@ -1,12 +1,10 @@ package grafanaresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/grafanaresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/grafanaresource/2022-08-01" } diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/README.md b/resource-manager/dashboard/2022-08-01/privateendpointconnection/README.md index dee6de51f78..16b4594e7a1 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/README.md +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2022-08-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2022-08-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/client.go b/resource-manager/dashboard/2022-08-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/client.go +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_grafana.go b/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_grafana.go index e0ff875a600..b1e33678833 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_grafana.go +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_privateendpointconnection.go index a047058f00e..c68f91da919 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/method_get.go b/resource-manager/dashboard/2022-08-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/method_get.go +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2022-08-01/privateendpointconnection/version.go b/resource-manager/dashboard/2022-08-01/privateendpointconnection/version.go index e3c3f70ca6a..0c4b12c9c13 100644 --- a/resource-manager/dashboard/2022-08-01/privateendpointconnection/version.go +++ b/resource-manager/dashboard/2022-08-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2022-08-01" } diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/README.md b/resource-manager/dashboard/2022-08-01/privatelinkresource/README.md index 003fd7c9ee7..a5e34fc3382 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/README.md +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2022-08-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2022-08-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/client.go b/resource-manager/dashboard/2022-08-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/client.go +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/id_grafana.go b/resource-manager/dashboard/2022-08-01/privatelinkresource/id_grafana.go index 2eb7757c8e7..a719ae30c2f 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/id_grafana.go +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/dashboard/2022-08-01/privatelinkresource/id_privatelinkresource.go index 8bbcb3c6ef4..7d5bf4f69a6 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/method_get.go b/resource-manager/dashboard/2022-08-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/method_get.go +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2022-08-01/privatelinkresource/version.go b/resource-manager/dashboard/2022-08-01/privatelinkresource/version.go index 784dfd12534..5a717bcfaa1 100644 --- a/resource-manager/dashboard/2022-08-01/privatelinkresource/version.go +++ b/resource-manager/dashboard/2022-08-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2022-08-01" } diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md b/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md index 44f5ead703a..be889c78fe3 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaplugin` Documentation -The `grafanaplugin` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2023-09-01`). +The `grafanaplugin` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/client.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/client.go index ce7d8d6da19..d5366691666 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/client.go +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/client.go @@ -15,7 +15,7 @@ type GrafanaPluginClient struct { } func NewGrafanaPluginClientWithBaseURI(sdkApi sdkEnv.Api) (*GrafanaPluginClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "grafanaplugin", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "grafanaplugin", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GrafanaPluginClient: %+v", err) } diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/id_grafana.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/id_grafana.go index 399e2e354bf..9a8605f52b7 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/id_grafana.go +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/grafanaplugin/version.go b/resource-manager/dashboard/2023-09-01/grafanaplugin/version.go index 6fe668f5fe3..5f313d87db8 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaplugin/version.go +++ b/resource-manager/dashboard/2023-09-01/grafanaplugin/version.go @@ -1,12 +1,10 @@ package grafanaplugin -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/grafanaplugin/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/grafanaplugin/2023-09-01" } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/README.md b/resource-manager/dashboard/2023-09-01/grafanaresource/README.md index a4c1332bed3..9f5cd8ea68b 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/README.md +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource` Documentation -The `grafanaresource` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2023-09-01`). +The `grafanaresource` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/client.go b/resource-manager/dashboard/2023-09-01/grafanaresource/client.go index 3c739c7c4d3..e4df7c7aa8b 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/client.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/client.go @@ -15,7 +15,7 @@ type GrafanaResourceClient struct { } func NewGrafanaResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*GrafanaResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "grafanaresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "grafanaresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GrafanaResourceClient: %+v", err) } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go b/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go index f557f3500f1..7c2009a7cae 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanacheckenterprisedetails.go b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanacheckenterprisedetails.go index e728cb9126c..2a5fca2d796 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanacheckenterprisedetails.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanacheckenterprisedetails.go @@ -46,7 +46,6 @@ func (c GrafanaResourceClient) GrafanaCheckEnterpriseDetails(ctx context.Context var model EnterpriseDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaget.go b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaget.go index c20f300d05f..f1371abbec4 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaget.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaget.go @@ -45,7 +45,6 @@ func (c GrafanaResourceClient) GrafanaGet(ctx context.Context, id GrafanaId) (re var model ManagedGrafana result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaupdate.go b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaupdate.go index cf0f88e0a62..e260315d6a2 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaupdate.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/method_grafanaupdate.go @@ -50,7 +50,6 @@ func (c GrafanaResourceClient) GrafanaUpdate(ctx context.Context, id GrafanaId, var model ManagedGrafana result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/grafanaresource/version.go b/resource-manager/dashboard/2023-09-01/grafanaresource/version.go index bc9a8bdd9ff..011a5541572 100644 --- a/resource-manager/dashboard/2023-09-01/grafanaresource/version.go +++ b/resource-manager/dashboard/2023-09-01/grafanaresource/version.go @@ -1,12 +1,10 @@ package grafanaresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/grafanaresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/grafanaresource/2023-09-01" } diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/README.md b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/README.md index 6ce583efd4b..f77ce2b2ffa 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/README.md +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/managedprivateendpoints` Documentation -The `managedprivateendpoints` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2023-09-01`). +The `managedprivateendpoints` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/client.go b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/client.go index c0a043e0525..e02237558e4 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/client.go +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/client.go @@ -15,7 +15,7 @@ type ManagedPrivateEndpointsClient struct { } func NewManagedPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedPrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedprivateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedprivateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedPrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_grafana.go b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_grafana.go index db438af4eb4..e6094dc7958 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_grafana.go +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_managedprivateendpoint.go b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_managedprivateendpoint.go index 35b57f63e50..0e8e841a73b 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_managedprivateendpoint.go +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/id_managedprivateendpoint.go @@ -44,7 +44,7 @@ func ParseManagedPrivateEndpointID(input string) (*ManagedPrivateEndpointId, err } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedPrivateEndpointIDInsensitively(input string) (*ManagedPrivateEn } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/method_get.go b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/method_get.go index d459792da64..6840e6b4592 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/method_get.go +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/method_get.go @@ -45,7 +45,6 @@ func (c ManagedPrivateEndpointsClient) Get(ctx context.Context, id ManagedPrivat var model ManagedPrivateEndpointModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/version.go b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/version.go index a94232f8aa1..819d2c6107f 100644 --- a/resource-manager/dashboard/2023-09-01/managedprivateendpoints/version.go +++ b/resource-manager/dashboard/2023-09-01/managedprivateendpoints/version.go @@ -1,12 +1,10 @@ package managedprivateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedprivateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedprivateendpoints/2023-09-01" } diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/README.md b/resource-manager/dashboard/2023-09-01/privateendpointconnection/README.md index 1dd46b0369a..41b3b74aa46 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/README.md +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2023-09-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/client.go b/resource-manager/dashboard/2023-09-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/client.go +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_grafana.go b/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_grafana.go index e0ff875a600..b1e33678833 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_grafana.go +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_privateendpointconnection.go index a047058f00e..c68f91da919 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/method_get.go b/resource-manager/dashboard/2023-09-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/method_get.go +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/privateendpointconnection/version.go b/resource-manager/dashboard/2023-09-01/privateendpointconnection/version.go index d44508888b7..ad67ea03828 100644 --- a/resource-manager/dashboard/2023-09-01/privateendpointconnection/version.go +++ b/resource-manager/dashboard/2023-09-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-09-01" } diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/README.md b/resource-manager/dashboard/2023-09-01/privatelinkresource/README.md index 28e6ae9ad82..bfa45030171 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/README.md +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `dashboard` (API Version `2023-09-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `dashboard` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/client.go b/resource-manager/dashboard/2023-09-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/client.go +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/id_grafana.go b/resource-manager/dashboard/2023-09-01/privatelinkresource/id_grafana.go index 2eb7757c8e7..a719ae30c2f 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/id_grafana.go +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/id_grafana.go @@ -42,7 +42,7 @@ func ParseGrafanaID(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGrafanaIDInsensitively(input string) (*GrafanaId, error) { } id := GrafanaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/dashboard/2023-09-01/privatelinkresource/id_privatelinkresource.go index 8bbcb3c6ef4..7d5bf4f69a6 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/method_get.go b/resource-manager/dashboard/2023-09-01/privatelinkresource/method_get.go index 3a5bfc9e044..a408895b355 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/method_get.go +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResour var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dashboard/2023-09-01/privatelinkresource/version.go b/resource-manager/dashboard/2023-09-01/privatelinkresource/version.go index 28b6deafbd0..3a59af35934 100644 --- a/resource-manager/dashboard/2023-09-01/privatelinkresource/version.go +++ b/resource-manager/dashboard/2023-09-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2023-09-01" } diff --git a/resource-manager/databoxedge/2022-03-01/addons/README.md b/resource-manager/databoxedge/2022-03-01/addons/README.md index c476502553c..d53102314e3 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/README.md +++ b/resource-manager/databoxedge/2022-03-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/addons/client.go b/resource-manager/databoxedge/2022-03-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/client.go +++ b/resource-manager/databoxedge/2022-03-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/addons/id_addon.go b/resource-manager/databoxedge/2022-03-01/addons/id_addon.go index 2dbfd2ebf64..85a682d76cf 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/id_addon.go +++ b/resource-manager/databoxedge/2022-03-01/addons/id_addon.go @@ -46,7 +46,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/addons/id_role.go b/resource-manager/databoxedge/2022-03-01/addons/id_role.go index 64766ca274b..d359b3bd66e 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/id_role.go +++ b/resource-manager/databoxedge/2022-03-01/addons/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/addons/method_createorupdate.go b/resource-manager/databoxedge/2022-03-01/addons/method_createorupdate.go index 8cf09e24a10..40116fb4f1c 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/method_createorupdate.go +++ b/resource-manager/databoxedge/2022-03-01/addons/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2022-03-01/addons/method_get.go b/resource-manager/databoxedge/2022-03-01/addons/method_get.go index 43d8014778d..57bfb9d6817 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/addons/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // Get ... @@ -48,11 +48,11 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAddonImplementation(respObj) + model, err := UnmarshalAddonImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2022-03-01/addons/method_listbyrole.go b/resource-manager/databoxedge/2022-03-01/addons/method_listbyrole.go index 988a69ac246..f06b187b345 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/method_listbyrole.go +++ b/resource-manager/databoxedge/2022-03-01/addons/method_listbyrole.go @@ -73,7 +73,7 @@ func (c AddonsClient) ListByRole(ctx context.Context, id RoleId) (result ListByR temp := make([]Addon, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAddonImplementation(v) + val, err := UnmarshalAddonImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Addon (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2022-03-01/addons/model_addon.go b/resource-manager/databoxedge/2022-03-01/addons/model_addon.go index c009261fc64..2ea77c34bdf 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/model_addon.go +++ b/resource-manager/databoxedge/2022-03-01/addons/model_addon.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Addon interface { + Addon() BaseAddonImpl +} + +var _ Addon = BaseAddonImpl{} + +type BaseAddonImpl struct { + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAddonImpl) Addon() BaseAddonImpl { + return s } -// RawAddonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Addon = RawAddonImpl{} + +// RawAddonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonImpl struct { + addon BaseAddonImpl Type string Values map[string]interface{} } -func unmarshalAddonImplementation(input []byte) (Addon, error) { +func (s RawAddonImpl) Addon() BaseAddonImpl { + return s.addon +} + +func UnmarshalAddonImplementation(input []byte) (Addon, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalAddonImplementation(input []byte) (Addon, error) { return out, nil } - out := RawAddonImpl{ + var parent BaseAddonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonImpl: %+v", err) + } + + return RawAddonImpl{ + addon: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2022-03-01/addons/model_arcaddon.go b/resource-manager/databoxedge/2022-03-01/addons/model_arcaddon.go index de6939f88e6..3db12101db7 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/model_arcaddon.go +++ b/resource-manager/databoxedge/2022-03-01/addons/model_arcaddon.go @@ -16,12 +16,24 @@ type ArcAddon struct { Properties ArcAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ArcAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ArcAddon{} func (s ArcAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ArcAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ArcAddon: %+v", err) } + decoded["kind"] = "ArcForKubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/addons/model_iotaddon.go b/resource-manager/databoxedge/2022-03-01/addons/model_iotaddon.go index a5880939d0b..109a048758e 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/model_iotaddon.go +++ b/resource-manager/databoxedge/2022-03-01/addons/model_iotaddon.go @@ -16,12 +16,24 @@ type IoTAddon struct { Properties IoTAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTAddon{} func (s IoTAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTAddon: %+v", err) } + decoded["kind"] = "IotEdge" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/addons/version.go b/resource-manager/databoxedge/2022-03-01/addons/version.go index 50f33a24c5d..a4304adac2e 100644 --- a/resource-manager/databoxedge/2022-03-01/addons/version.go +++ b/resource-manager/databoxedge/2022-03-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/alerts/README.md b/resource-manager/databoxedge/2022-03-01/alerts/README.md index 95a24589396..bed60bd59b0 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/README.md +++ b/resource-manager/databoxedge/2022-03-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/alerts/client.go b/resource-manager/databoxedge/2022-03-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/client.go +++ b/resource-manager/databoxedge/2022-03-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/alerts/id_alert.go b/resource-manager/databoxedge/2022-03-01/alerts/id_alert.go index cedbd3287c2..243e537dc0b 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/id_alert.go +++ b/resource-manager/databoxedge/2022-03-01/alerts/id_alert.go @@ -44,7 +44,7 @@ func ParseAlertID(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertIDInsensitively(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/alerts/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/alerts/id_databoxedgedevice.go index 78f65d94bf2..b8e77d0deb8 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/alerts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/alerts/method_get.go b/resource-manager/databoxedge/2022-03-01/alerts/method_get.go index 86fd0c8dd00..02dc1f0ada9 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id AlertId) (result GetOperationR var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/alerts/version.go b/resource-manager/databoxedge/2022-03-01/alerts/version.go index 98080655b80..ed7a303870f 100644 --- a/resource-manager/databoxedge/2022-03-01/alerts/version.go +++ b/resource-manager/databoxedge/2022-03-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/availableskus/README.md b/resource-manager/databoxedge/2022-03-01/availableskus/README.md index c9f455e4eb8..d8036279ad9 100644 --- a/resource-manager/databoxedge/2022-03-01/availableskus/README.md +++ b/resource-manager/databoxedge/2022-03-01/availableskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/availableskus` Documentation -The `availableskus` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `availableskus` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/availableskus/client.go b/resource-manager/databoxedge/2022-03-01/availableskus/client.go index 76747ad145c..e7f778a7748 100644 --- a/resource-manager/databoxedge/2022-03-01/availableskus/client.go +++ b/resource-manager/databoxedge/2022-03-01/availableskus/client.go @@ -15,7 +15,7 @@ type AvailableSkusClient struct { } func NewAvailableSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableSkusClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/availableskus/version.go b/resource-manager/databoxedge/2022-03-01/availableskus/version.go index 7d93bd87f8d..1238b62dcf4 100644 --- a/resource-manager/databoxedge/2022-03-01/availableskus/version.go +++ b/resource-manager/databoxedge/2022-03-01/availableskus/version.go @@ -1,12 +1,10 @@ package availableskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableskus/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/README.md b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/README.md index c6dc1927531..ae8ec4f0cae 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/README.md +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/bandwidthschedules` Documentation -The `bandwidthschedules` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `bandwidthschedules` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/client.go b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/client.go index d3bd829908c..8c27b3fbc1b 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/client.go +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/client.go @@ -15,7 +15,7 @@ type BandwidthSchedulesClient struct { } func NewBandwidthSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*BandwidthSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bandwidthschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bandwidthschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BandwidthSchedulesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_bandwidthschedule.go b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_bandwidthschedule.go index d9d50f76d1f..6192d113465 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_bandwidthschedule.go +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_bandwidthschedule.go @@ -44,7 +44,7 @@ func ParseBandwidthScheduleID(input string) (*BandwidthScheduleId, error) { } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBandwidthScheduleIDInsensitively(input string) (*BandwidthScheduleId, } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_databoxedgedevice.go index bdf92107f37..515bb3a9fcf 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/method_get.go b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/method_get.go index eace3d88e88..19036f745d2 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/method_get.go @@ -45,7 +45,6 @@ func (c BandwidthSchedulesClient) Get(ctx context.Context, id BandwidthScheduleI var model BandwidthSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/version.go b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/version.go index a495ac70bf3..74029baba51 100644 --- a/resource-manager/databoxedge/2022-03-01/bandwidthschedules/version.go +++ b/resource-manager/databoxedge/2022-03-01/bandwidthschedules/version.go @@ -1,12 +1,10 @@ package bandwidthschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bandwidthschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bandwidthschedules/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/containers/README.md b/resource-manager/databoxedge/2022-03-01/containers/README.md index 17618d8f5ff..1892e51b7f2 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/README.md +++ b/resource-manager/databoxedge/2022-03-01/containers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/containers` Documentation -The `containers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `containers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/containers/client.go b/resource-manager/databoxedge/2022-03-01/containers/client.go index c4fe5813aa1..bd1c47c53ac 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/client.go +++ b/resource-manager/databoxedge/2022-03-01/containers/client.go @@ -15,7 +15,7 @@ type ContainersClient struct { } func NewContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/containers/id_container.go b/resource-manager/databoxedge/2022-03-01/containers/id_container.go index ae472796e28..24f4952e107 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/id_container.go +++ b/resource-manager/databoxedge/2022-03-01/containers/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/containers/id_storageaccount.go b/resource-manager/databoxedge/2022-03-01/containers/id_storageaccount.go index d4ef6f00f22..487a6dbbed9 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/id_storageaccount.go +++ b/resource-manager/databoxedge/2022-03-01/containers/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/containers/method_get.go b/resource-manager/databoxedge/2022-03-01/containers/method_get.go index 49c88bc1f91..2953701c92b 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/containers/method_get.go @@ -45,7 +45,6 @@ func (c ContainersClient) Get(ctx context.Context, id ContainerId) (result GetOp var model Container result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/containers/version.go b/resource-manager/databoxedge/2022-03-01/containers/version.go index df35fb98ed9..1f447d0efec 100644 --- a/resource-manager/databoxedge/2022-03-01/containers/version.go +++ b/resource-manager/databoxedge/2022-03-01/containers/version.go @@ -1,12 +1,10 @@ package containers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containers/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/README.md b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/README.md index fc4a52e64c3..0579f618961 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/README.md +++ b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devicecapacitycheck` Documentation -The `devicecapacitycheck` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `devicecapacitycheck` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/client.go b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/client.go index c11c3b93321..dbf2e1c6bd6 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/client.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/client.go @@ -15,7 +15,7 @@ type DeviceCapacityCheckClient struct { } func NewDeviceCapacityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityCheckClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/id_databoxedgedevice.go index 0ef97e8e238..54172a17bc6 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go index 2d800b5a70d..fa614c4ca77 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go @@ -36,6 +36,7 @@ func (o CheckResourceCreationFeasibilityOperationOptions) ToHeaders() *client.He func (o CheckResourceCreationFeasibilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/version.go b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/version.go index f33380945b5..d04d0422521 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/version.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacitycheck/version.go @@ -1,12 +1,10 @@ package devicecapacitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacitycheck/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/README.md b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/README.md index 7dd1f592b52..81de45db718 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/README.md +++ b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devicecapacityinfo` Documentation -The `devicecapacityinfo` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `devicecapacityinfo` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/client.go b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/client.go index 722c9d8de2c..e372fbd47ca 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/client.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/client.go @@ -15,7 +15,7 @@ type DeviceCapacityInfoClient struct { } func NewDeviceCapacityInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacityinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacityinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityInfoClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/id_databoxedgedevice.go index 102b837acc6..1a913976ebe 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/method_getdevicecapacityinfo.go b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/method_getdevicecapacityinfo.go index 23b0555d07c..0ebff10987d 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/method_getdevicecapacityinfo.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/method_getdevicecapacityinfo.go @@ -46,7 +46,6 @@ func (c DeviceCapacityInfoClient) GetDeviceCapacityInfo(ctx context.Context, id var model DeviceCapacityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/version.go b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/version.go index 05155198886..a0a025e4503 100644 --- a/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/version.go +++ b/resource-manager/databoxedge/2022-03-01/devicecapacityinfo/version.go @@ -1,12 +1,10 @@ package devicecapacityinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacityinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacityinfo/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/devices/README.md b/resource-manager/databoxedge/2022-03-01/devices/README.md index b409deb7f28..263513d18a4 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/README.md +++ b/resource-manager/databoxedge/2022-03-01/devices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices` Documentation -The `devices` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `devices` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/devices/client.go b/resource-manager/databoxedge/2022-03-01/devices/client.go index 11a6944e913..5941fcf50ea 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/client.go +++ b/resource-manager/databoxedge/2022-03-01/devices/client.go @@ -15,7 +15,7 @@ type DevicesClient struct { } func NewDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DevicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevicesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go index c3b5b1e8139..dafcdbcd44f 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/devices/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_createorupdate.go b/resource-manager/databoxedge/2022-03-01/devices/method_createorupdate.go index 7e28d6de94a..6b341b171a9 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_createorupdate.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DevicesClient) CreateOrUpdate(ctx context.Context, id DataBoxEdgeDeviceI var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_generatecertificate.go b/resource-manager/databoxedge/2022-03-01/devices/method_generatecertificate.go index 8d09369b4bc..3d369faba8c 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_generatecertificate.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_generatecertificate.go @@ -46,7 +46,6 @@ func (c DevicesClient) GenerateCertificate(ctx context.Context, id DataBoxEdgeDe var model GenerateCertResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_get.go b/resource-manager/databoxedge/2022-03-01/devices/method_get.go index 1cf1caee5e5..9aeec182f95 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_get.go @@ -45,7 +45,6 @@ func (c DevicesClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_getextendedinformation.go b/resource-manager/databoxedge/2022-03-01/devices/method_getextendedinformation.go index 76027576458..c646f8a405f 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_getextendedinformation.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_getextendedinformation.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetExtendedInformation(ctx context.Context, id DataBoxEdg var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_getnetworksettings.go b/resource-manager/databoxedge/2022-03-01/devices/method_getnetworksettings.go index c4a5297f5db..21392f2297a 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_getnetworksettings.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_getnetworksettings.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetNetworkSettings(ctx context.Context, id DataBoxEdgeDev var model NetworkSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_getupdatesummary.go b/resource-manager/databoxedge/2022-03-01/devices/method_getupdatesummary.go index 147f004c8dd..8043341b568 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_getupdatesummary.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_getupdatesummary.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetUpdateSummary(ctx context.Context, id DataBoxEdgeDevic var model UpdateSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_listbyresourcegroup.go b/resource-manager/databoxedge/2022-03-01/devices/method_listbyresourcegroup.go index 779f42afcf6..aa5e3470e9c 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_listbyresourcegroup.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_listbysubscription.go b/resource-manager/databoxedge/2022-03-01/devices/method_listbysubscription.go index 46ad1d3fced..5d429f30267 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_listbysubscription.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_update.go b/resource-manager/databoxedge/2022-03-01/devices/method_update.go index 6020e3a2109..0b87e2f8778 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_update.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_update.go @@ -49,7 +49,6 @@ func (c DevicesClient) Update(ctx context.Context, id DataBoxEdgeDeviceId, input var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_updateextendedinformation.go b/resource-manager/databoxedge/2022-03-01/devices/method_updateextendedinformation.go index b132f78d1ec..7f81ea957ab 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_updateextendedinformation.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_updateextendedinformation.go @@ -50,7 +50,6 @@ func (c DevicesClient) UpdateExtendedInformation(ctx context.Context, id DataBox var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/method_uploadcertificate.go b/resource-manager/databoxedge/2022-03-01/devices/method_uploadcertificate.go index b65c680ad87..73cbfa2d8a7 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/method_uploadcertificate.go +++ b/resource-manager/databoxedge/2022-03-01/devices/method_uploadcertificate.go @@ -50,7 +50,6 @@ func (c DevicesClient) UploadCertificate(ctx context.Context, id DataBoxEdgeDevi var model UploadCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/devices/version.go b/resource-manager/databoxedge/2022-03-01/devices/version.go index a786fbfe57b..f304b74d3e9 100644 --- a/resource-manager/databoxedge/2022-03-01/devices/version.go +++ b/resource-manager/databoxedge/2022-03-01/devices/version.go @@ -1,12 +1,10 @@ package devices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devices/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/README.md b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/README.md index d9311bed12e..dbeb08961ef 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/README.md +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/diagnosticsettings` Documentation -The `diagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `diagnosticsettings` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/client.go b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/client.go index 336818ef929..6e01407ed2a 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/client.go +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsClient struct { } func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/id_databoxedgedevice.go index 4e934d71948..b1d22209009 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go index 687a1f291d8..ed240fcf995 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticProactiveLogCollectionSettings(ct var model DiagnosticProactiveLogCollectionSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go index b81d4737ffb..273ef8436fa 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticRemoteSupportSettings(ctx context var model DiagnosticRemoteSupportSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/version.go b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/version.go index 78f250e15bd..9a1e328cec1 100644 --- a/resource-manager/databoxedge/2022-03-01/diagnosticsettings/version.go +++ b/resource-manager/databoxedge/2022-03-01/diagnosticsettings/version.go @@ -1,12 +1,10 @@ package diagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettings/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/jobs/README.md b/resource-manager/databoxedge/2022-03-01/jobs/README.md index 7fb8cd94252..8009778227c 100644 --- a/resource-manager/databoxedge/2022-03-01/jobs/README.md +++ b/resource-manager/databoxedge/2022-03-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/jobs/client.go b/resource-manager/databoxedge/2022-03-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/databoxedge/2022-03-01/jobs/client.go +++ b/resource-manager/databoxedge/2022-03-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/jobs/id_job.go b/resource-manager/databoxedge/2022-03-01/jobs/id_job.go index 815c77d458f..9ddc3aa4da2 100644 --- a/resource-manager/databoxedge/2022-03-01/jobs/id_job.go +++ b/resource-manager/databoxedge/2022-03-01/jobs/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/jobs/method_get.go b/resource-manager/databoxedge/2022-03-01/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/databoxedge/2022-03-01/jobs/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/jobs/version.go b/resource-manager/databoxedge/2022-03-01/jobs/version.go index 57043a21ba2..367ec2e291b 100644 --- a/resource-manager/databoxedge/2022-03-01/jobs/version.go +++ b/resource-manager/databoxedge/2022-03-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/monitoringconfig/README.md b/resource-manager/databoxedge/2022-03-01/monitoringconfig/README.md index 26e54635359..a3361e0e91b 100644 --- a/resource-manager/databoxedge/2022-03-01/monitoringconfig/README.md +++ b/resource-manager/databoxedge/2022-03-01/monitoringconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/monitoringconfig` Documentation -The `monitoringconfig` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `monitoringconfig` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/monitoringconfig/client.go b/resource-manager/databoxedge/2022-03-01/monitoringconfig/client.go index 76a289e4ecf..301c005a825 100644 --- a/resource-manager/databoxedge/2022-03-01/monitoringconfig/client.go +++ b/resource-manager/databoxedge/2022-03-01/monitoringconfig/client.go @@ -15,7 +15,7 @@ type MonitoringConfigClient struct { } func NewMonitoringConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoringConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoringconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoringconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoringConfigClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/monitoringconfig/id_role.go b/resource-manager/databoxedge/2022-03-01/monitoringconfig/id_role.go index d0422264c98..e48e163a446 100644 --- a/resource-manager/databoxedge/2022-03-01/monitoringconfig/id_role.go +++ b/resource-manager/databoxedge/2022-03-01/monitoringconfig/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/monitoringconfig/method_get.go b/resource-manager/databoxedge/2022-03-01/monitoringconfig/method_get.go index a3c1e1a212e..d011eabfe4c 100644 --- a/resource-manager/databoxedge/2022-03-01/monitoringconfig/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/monitoringconfig/method_get.go @@ -46,7 +46,6 @@ func (c MonitoringConfigClient) Get(ctx context.Context, id RoleId) (result GetO var model MonitoringMetricConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/monitoringconfig/version.go b/resource-manager/databoxedge/2022-03-01/monitoringconfig/version.go index 9170c0539d5..be852d56280 100644 --- a/resource-manager/databoxedge/2022-03-01/monitoringconfig/version.go +++ b/resource-manager/databoxedge/2022-03-01/monitoringconfig/version.go @@ -1,12 +1,10 @@ package monitoringconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoringconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoringconfig/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/nodes/README.md b/resource-manager/databoxedge/2022-03-01/nodes/README.md index f63408bb9f7..5881e9cefde 100644 --- a/resource-manager/databoxedge/2022-03-01/nodes/README.md +++ b/resource-manager/databoxedge/2022-03-01/nodes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/nodes` Documentation -The `nodes` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `nodes` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/nodes/client.go b/resource-manager/databoxedge/2022-03-01/nodes/client.go index 46342ec2468..1e266f8fd62 100644 --- a/resource-manager/databoxedge/2022-03-01/nodes/client.go +++ b/resource-manager/databoxedge/2022-03-01/nodes/client.go @@ -15,7 +15,7 @@ type NodesClient struct { } func NewNodesClientWithBaseURI(sdkApi sdkEnv.Api) (*NodesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/nodes/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/nodes/id_databoxedgedevice.go index 26e89973a75..8d1ea4164f8 100644 --- a/resource-manager/databoxedge/2022-03-01/nodes/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/nodes/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/nodes/version.go b/resource-manager/databoxedge/2022-03-01/nodes/version.go index d363e66c0f8..4eb8ea09d75 100644 --- a/resource-manager/databoxedge/2022-03-01/nodes/version.go +++ b/resource-manager/databoxedge/2022-03-01/nodes/version.go @@ -1,12 +1,10 @@ package nodes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodes/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/orders/README.md b/resource-manager/databoxedge/2022-03-01/orders/README.md index 12234216ac4..2f8c171f244 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/README.md +++ b/resource-manager/databoxedge/2022-03-01/orders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/orders` Documentation -The `orders` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `orders` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/orders/client.go b/resource-manager/databoxedge/2022-03-01/orders/client.go index 5be700510b6..2a1b7c07abf 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/client.go +++ b/resource-manager/databoxedge/2022-03-01/orders/client.go @@ -15,7 +15,7 @@ type OrdersClient struct { } func NewOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*OrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "orders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "orders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrdersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go index f4b04f8fc65..2a8564ec8d7 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/orders/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/orders/method_get.go b/resource-manager/databoxedge/2022-03-01/orders/method_get.go index 3d5bd988a8a..456aefeeebc 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/orders/method_get.go @@ -46,7 +46,6 @@ func (c OrdersClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result G var model Order result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/orders/method_listdcaccesscode.go b/resource-manager/databoxedge/2022-03-01/orders/method_listdcaccesscode.go index ba62ef019ca..76b105c72b9 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/method_listdcaccesscode.go +++ b/resource-manager/databoxedge/2022-03-01/orders/method_listdcaccesscode.go @@ -46,7 +46,6 @@ func (c OrdersClient) ListDCAccessCode(ctx context.Context, id DataBoxEdgeDevice var model DCAccessCode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/orders/version.go b/resource-manager/databoxedge/2022-03-01/orders/version.go index aee0b512f95..d922d884ff0 100644 --- a/resource-manager/databoxedge/2022-03-01/orders/version.go +++ b/resource-manager/databoxedge/2022-03-01/orders/version.go @@ -1,12 +1,10 @@ package orders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/orders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/orders/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/roles/README.md b/resource-manager/databoxedge/2022-03-01/roles/README.md index 200f0f1d32f..309b4f00842 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/README.md +++ b/resource-manager/databoxedge/2022-03-01/roles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/roles` Documentation -The `roles` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `roles` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/roles/client.go b/resource-manager/databoxedge/2022-03-01/roles/client.go index eddcb107e5b..fa6a9c686f1 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/client.go +++ b/resource-manager/databoxedge/2022-03-01/roles/client.go @@ -15,7 +15,7 @@ type RolesClient struct { } func NewRolesClientWithBaseURI(sdkApi sdkEnv.Api) (*RolesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RolesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/roles/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/roles/id_databoxedgedevice.go index d5c9755f422..97c440bd920 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/roles/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/roles/id_role.go b/resource-manager/databoxedge/2022-03-01/roles/id_role.go index b1cd56710c3..56825190746 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/id_role.go +++ b/resource-manager/databoxedge/2022-03-01/roles/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/roles/method_createorupdate.go b/resource-manager/databoxedge/2022-03-01/roles/method_createorupdate.go index b68b5a360a9..62c63583d7d 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/method_createorupdate.go +++ b/resource-manager/databoxedge/2022-03-01/roles/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2022-03-01/roles/method_get.go b/resource-manager/databoxedge/2022-03-01/roles/method_get.go index a06ac4de776..55c7df66a05 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/roles/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // Get ... @@ -48,11 +48,11 @@ func (c RolesClient) Get(ctx context.Context, id RoleId) (result GetOperationRes if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalRoleImplementation(respObj) + model, err := UnmarshalRoleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2022-03-01/roles/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2022-03-01/roles/method_listbydataboxedgedevice.go index 06fd34c8f86..f2c7267d285 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/roles/method_listbydataboxedgedevice.go @@ -73,7 +73,7 @@ func (c RolesClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdge temp := make([]Role, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalRoleImplementation(v) + val, err := UnmarshalRoleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Role (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2022-03-01/roles/model_cloudedgemanagementrole.go b/resource-manager/databoxedge/2022-03-01/roles/model_cloudedgemanagementrole.go index 813de354ccb..ca451b83e61 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/model_cloudedgemanagementrole.go +++ b/resource-manager/databoxedge/2022-03-01/roles/model_cloudedgemanagementrole.go @@ -16,12 +16,24 @@ type CloudEdgeManagementRole struct { Properties *CloudEdgeManagementRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s CloudEdgeManagementRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = CloudEdgeManagementRole{} func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CloudEdgeManagementRole: %+v", err) } + decoded["kind"] = "CloudEdgeManagement" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/roles/model_iotrole.go b/resource-manager/databoxedge/2022-03-01/roles/model_iotrole.go index 2b59cab426f..1e08150463e 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/model_iotrole.go +++ b/resource-manager/databoxedge/2022-03-01/roles/model_iotrole.go @@ -16,12 +16,24 @@ type IoTRole struct { Properties *IoTRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTRole{} func (s IoTRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTRole: %+v", err) } + decoded["kind"] = "IOT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/roles/model_kubernetesrole.go b/resource-manager/databoxedge/2022-03-01/roles/model_kubernetesrole.go index a7381f430c5..a92097ab7fb 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/model_kubernetesrole.go +++ b/resource-manager/databoxedge/2022-03-01/roles/model_kubernetesrole.go @@ -16,12 +16,24 @@ type KubernetesRole struct { Properties *KubernetesRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KubernetesRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KubernetesRole{} func (s KubernetesRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KubernetesRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesRole: %+v", err) } + decoded["kind"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/roles/model_mecrole.go b/resource-manager/databoxedge/2022-03-01/roles/model_mecrole.go index dd995e6ab34..cf66fc4f26d 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/model_mecrole.go +++ b/resource-manager/databoxedge/2022-03-01/roles/model_mecrole.go @@ -16,12 +16,24 @@ type MECRole struct { Properties *MECRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MECRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MECRole{} func (s MECRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MECRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MECRole: %+v", err) } + decoded["kind"] = "MEC" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/roles/model_role.go b/resource-manager/databoxedge/2022-03-01/roles/model_role.go index 368c17a903d..6fd3699ab03 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/model_role.go +++ b/resource-manager/databoxedge/2022-03-01/roles/model_role.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Role interface { + Role() BaseRoleImpl +} + +var _ Role = BaseRoleImpl{} + +type BaseRoleImpl struct { + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseRoleImpl) Role() BaseRoleImpl { + return s } -// RawRoleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Role = RawRoleImpl{} + +// RawRoleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRoleImpl struct { + role BaseRoleImpl Type string Values map[string]interface{} } -func unmarshalRoleImplementation(input []byte) (Role, error) { +func (s RawRoleImpl) Role() BaseRoleImpl { + return s.role +} + +func UnmarshalRoleImplementation(input []byte) (Role, error) { if input == nil { return nil, nil } @@ -68,10 +91,15 @@ func unmarshalRoleImplementation(input []byte) (Role, error) { return out, nil } - out := RawRoleImpl{ + var parent BaseRoleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRoleImpl: %+v", err) + } + + return RawRoleImpl{ + role: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2022-03-01/roles/version.go b/resource-manager/databoxedge/2022-03-01/roles/version.go index 77e0382df58..0e9f597011c 100644 --- a/resource-manager/databoxedge/2022-03-01/roles/version.go +++ b/resource-manager/databoxedge/2022-03-01/roles/version.go @@ -1,12 +1,10 @@ package roles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roles/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/shares/README.md b/resource-manager/databoxedge/2022-03-01/shares/README.md index 0cb98612af6..fcb49a422f4 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/README.md +++ b/resource-manager/databoxedge/2022-03-01/shares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/shares` Documentation -The `shares` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `shares` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/shares/client.go b/resource-manager/databoxedge/2022-03-01/shares/client.go index f6b300e4cc1..0b6d68d77a3 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/client.go +++ b/resource-manager/databoxedge/2022-03-01/shares/client.go @@ -15,7 +15,7 @@ type SharesClient struct { } func NewSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "shares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "shares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/shares/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/shares/id_databoxedgedevice.go index 33b9f11eb54..512cdbd83ef 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/shares/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/shares/id_share.go b/resource-manager/databoxedge/2022-03-01/shares/id_share.go index 32d048aeed3..97ab7e20619 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/id_share.go +++ b/resource-manager/databoxedge/2022-03-01/shares/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/shares/method_get.go b/resource-manager/databoxedge/2022-03-01/shares/method_get.go index be5b58d55a6..23afabf6647 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/shares/method_get.go @@ -45,7 +45,6 @@ func (c SharesClient) Get(ctx context.Context, id ShareId) (result GetOperationR var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/shares/version.go b/resource-manager/databoxedge/2022-03-01/shares/version.go index c3cebeac056..64c2f78de70 100644 --- a/resource-manager/databoxedge/2022-03-01/shares/version.go +++ b/resource-manager/databoxedge/2022-03-01/shares/version.go @@ -1,12 +1,10 @@ package shares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/shares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/shares/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/README.md b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/README.md index 226565465c2..a79b7c22404 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/README.md +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/storageaccountcredentials` Documentation -The `storageaccountcredentials` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `storageaccountcredentials` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/client.go b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/client.go index 75da116008c..9fe12405f5a 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/client.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/client.go @@ -15,7 +15,7 @@ type StorageAccountCredentialsClient struct { } func NewStorageAccountCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccountcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccountcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountCredentialsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_databoxedgedevice.go index 1a15d85b8fc..10427fdd397 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_storageaccountcredential.go b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_storageaccountcredential.go index df5e9b2ed9b..6b55897dbe2 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_storageaccountcredential.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/id_storageaccountcredential.go @@ -44,7 +44,7 @@ func ParseStorageAccountCredentialID(input string) (*StorageAccountCredentialId, } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountCredentialIDInsensitively(input string) (*StorageAccount } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/method_get.go b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/method_get.go index 82eacb9fced..824d7631ecf 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountCredentialsClient) Get(ctx context.Context, id StorageAcco var model StorageAccountCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/version.go b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/version.go index ba8f8cbdf4b..e11988c99f2 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/version.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccountcredentials/version.go @@ -1,12 +1,10 @@ package storageaccountcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccountcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccountcredentials/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/README.md b/resource-manager/databoxedge/2022-03-01/storageaccounts/README.md index 8620b580f6d..b2cda970e41 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/README.md +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/client.go b/resource-manager/databoxedge/2022-03-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/client.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/storageaccounts/id_databoxedgedevice.go index 25b2d7f4dd2..2eadf0ddf3b 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/id_storageaccount.go b/resource-manager/databoxedge/2022-03-01/storageaccounts/id_storageaccount.go index f3f1857c6fd..fce97c38a6d 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/id_storageaccount.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/method_get.go b/resource-manager/databoxedge/2022-03-01/storageaccounts/method_get.go index 492b1158753..60d991cc1a2 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountsClient) Get(ctx context.Context, id StorageAccountId) (re var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/storageaccounts/version.go b/resource-manager/databoxedge/2022-03-01/storageaccounts/version.go index a39907c06eb..d6c89f6febd 100644 --- a/resource-manager/databoxedge/2022-03-01/storageaccounts/version.go +++ b/resource-manager/databoxedge/2022-03-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/supportpackages/README.md b/resource-manager/databoxedge/2022-03-01/supportpackages/README.md index 1f6edbedc76..d1924488968 100644 --- a/resource-manager/databoxedge/2022-03-01/supportpackages/README.md +++ b/resource-manager/databoxedge/2022-03-01/supportpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/supportpackages` Documentation -The `supportpackages` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `supportpackages` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/supportpackages/client.go b/resource-manager/databoxedge/2022-03-01/supportpackages/client.go index ea29a77caa2..83cd95fa7ab 100644 --- a/resource-manager/databoxedge/2022-03-01/supportpackages/client.go +++ b/resource-manager/databoxedge/2022-03-01/supportpackages/client.go @@ -15,7 +15,7 @@ type SupportPackagesClient struct { } func NewSupportPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportPackagesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/supportpackages/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/supportpackages/id_databoxedgedevice.go index c9456a32a03..927257541ad 100644 --- a/resource-manager/databoxedge/2022-03-01/supportpackages/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/supportpackages/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/supportpackages/version.go b/resource-manager/databoxedge/2022-03-01/supportpackages/version.go index 7a30ac27f7a..ce05906ff46 100644 --- a/resource-manager/databoxedge/2022-03-01/supportpackages/version.go +++ b/resource-manager/databoxedge/2022-03-01/supportpackages/version.go @@ -1,12 +1,10 @@ package supportpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportpackages/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/README.md b/resource-manager/databoxedge/2022-03-01/triggers/README.md index ba99c715e96..00f5cb62f90 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/README.md +++ b/resource-manager/databoxedge/2022-03-01/triggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/triggers` Documentation -The `triggers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `triggers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/triggers/client.go b/resource-manager/databoxedge/2022-03-01/triggers/client.go index 9fdf5bed02e..6e6df4f9267 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/client.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/client.go @@ -15,7 +15,7 @@ type TriggersClient struct { } func NewTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "triggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "triggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/triggers/id_databoxedgedevice.go index 7164418e743..0a97cbbc0d4 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/id_trigger.go b/resource-manager/databoxedge/2022-03-01/triggers/id_trigger.go index 1d76a75fa5b..042ab0bacca 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/id_trigger.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/method_createorupdate.go b/resource-manager/databoxedge/2022-03-01/triggers/method_createorupdate.go index f2af6162933..d67c646f15c 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/method_createorupdate.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2022-03-01/triggers/method_get.go b/resource-manager/databoxedge/2022-03-01/triggers/method_get.go index e71861e479e..e4098630193 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Get ... @@ -48,11 +48,11 @@ func (c TriggersClient) Get(ctx context.Context, id TriggerId) (result GetOperat if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalTriggerImplementation(respObj) + model, err := UnmarshalTriggerImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2022-03-01/triggers/method_listbydataboxedgedevice.go index eeecf442ba2..43fd1ee00a4 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/method_listbydataboxedgedevice.go @@ -40,6 +40,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -101,7 +102,7 @@ func (c TriggersClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxE temp := make([]Trigger, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalTriggerImplementation(v) + val, err := UnmarshalTriggerImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Trigger (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2022-03-01/triggers/model_fileeventtrigger.go b/resource-manager/databoxedge/2022-03-01/triggers/model_fileeventtrigger.go index 8bb8064c078..4b6dcd2c963 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/model_fileeventtrigger.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/model_fileeventtrigger.go @@ -16,12 +16,24 @@ type FileEventTrigger struct { Properties FileTriggerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FileEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FileEventTrigger{} func (s FileEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FileEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileEventTrigger: %+v", err) } + decoded["kind"] = "FileEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/triggers/model_periodictimereventtrigger.go b/resource-manager/databoxedge/2022-03-01/triggers/model_periodictimereventtrigger.go index 52db0d6864b..791baf045a2 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/model_periodictimereventtrigger.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/model_periodictimereventtrigger.go @@ -16,12 +16,24 @@ type PeriodicTimerEventTrigger struct { Properties PeriodicTimerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s PeriodicTimerEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = PeriodicTimerEventTrigger{} func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicTimerEventTrigger: %+v", err) } + decoded["kind"] = "PeriodicTimerEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2022-03-01/triggers/model_trigger.go b/resource-manager/databoxedge/2022-03-01/triggers/model_trigger.go index 4e3dc24d2b4..8aad2e84477 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/model_trigger.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/model_trigger.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl +} + +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger +} + +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/databoxedge/2022-03-01/triggers/version.go b/resource-manager/databoxedge/2022-03-01/triggers/version.go index c1ce8b808c9..c26067a6364 100644 --- a/resource-manager/databoxedge/2022-03-01/triggers/version.go +++ b/resource-manager/databoxedge/2022-03-01/triggers/version.go @@ -1,12 +1,10 @@ package triggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/triggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/triggers/2022-03-01" } diff --git a/resource-manager/databoxedge/2022-03-01/users/README.md b/resource-manager/databoxedge/2022-03-01/users/README.md index 645641d4b2b..16e21ca74ea 100644 --- a/resource-manager/databoxedge/2022-03-01/users/README.md +++ b/resource-manager/databoxedge/2022-03-01/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2022-03-01`). +The `users` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2022-03-01/users/client.go b/resource-manager/databoxedge/2022-03-01/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/databoxedge/2022-03-01/users/client.go +++ b/resource-manager/databoxedge/2022-03-01/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2022-03-01/users/id_databoxedgedevice.go b/resource-manager/databoxedge/2022-03-01/users/id_databoxedgedevice.go index b73e64ec5f0..6e0847706b5 100644 --- a/resource-manager/databoxedge/2022-03-01/users/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/users/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/users/id_user.go b/resource-manager/databoxedge/2022-03-01/users/id_user.go index e545457aea1..cbd25b1b79d 100644 --- a/resource-manager/databoxedge/2022-03-01/users/id_user.go +++ b/resource-manager/databoxedge/2022-03-01/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2022-03-01/users/method_get.go b/resource-manager/databoxedge/2022-03-01/users/method_get.go index f133fcaebd3..178f7670117 100644 --- a/resource-manager/databoxedge/2022-03-01/users/method_get.go +++ b/resource-manager/databoxedge/2022-03-01/users/method_get.go @@ -45,7 +45,6 @@ func (c UsersClient) Get(ctx context.Context, id UserId) (result GetOperationRes var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2022-03-01/users/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2022-03-01/users/method_listbydataboxedgedevice.go index d7046442312..80cb58e1f84 100644 --- a/resource-manager/databoxedge/2022-03-01/users/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2022-03-01/users/method_listbydataboxedgedevice.go @@ -39,6 +39,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2022-03-01/users/version.go b/resource-manager/databoxedge/2022-03-01/users/version.go index 1829a0b4a0b..418741695af 100644 --- a/resource-manager/databoxedge/2022-03-01/users/version.go +++ b/resource-manager/databoxedge/2022-03-01/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2022-03-01" } diff --git a/resource-manager/databoxedge/2023-07-01/addons/README.md b/resource-manager/databoxedge/2023-07-01/addons/README.md index 07542b4c02a..ffc429e1afc 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/README.md +++ b/resource-manager/databoxedge/2023-07-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/addons/client.go b/resource-manager/databoxedge/2023-07-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/client.go +++ b/resource-manager/databoxedge/2023-07-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/addons/id_addon.go b/resource-manager/databoxedge/2023-07-01/addons/id_addon.go index 2dbfd2ebf64..85a682d76cf 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/id_addon.go +++ b/resource-manager/databoxedge/2023-07-01/addons/id_addon.go @@ -46,7 +46,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/addons/id_role.go b/resource-manager/databoxedge/2023-07-01/addons/id_role.go index 64766ca274b..d359b3bd66e 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/id_role.go +++ b/resource-manager/databoxedge/2023-07-01/addons/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/addons/method_createorupdate.go b/resource-manager/databoxedge/2023-07-01/addons/method_createorupdate.go index 8cf09e24a10..40116fb4f1c 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-07-01/addons/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-07-01/addons/method_get.go b/resource-manager/databoxedge/2023-07-01/addons/method_get.go index 43d8014778d..57bfb9d6817 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/addons/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // Get ... @@ -48,11 +48,11 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAddonImplementation(respObj) + model, err := UnmarshalAddonImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-07-01/addons/method_listbyrole.go b/resource-manager/databoxedge/2023-07-01/addons/method_listbyrole.go index 988a69ac246..f06b187b345 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/method_listbyrole.go +++ b/resource-manager/databoxedge/2023-07-01/addons/method_listbyrole.go @@ -73,7 +73,7 @@ func (c AddonsClient) ListByRole(ctx context.Context, id RoleId) (result ListByR temp := make([]Addon, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAddonImplementation(v) + val, err := UnmarshalAddonImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Addon (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-07-01/addons/model_addon.go b/resource-manager/databoxedge/2023-07-01/addons/model_addon.go index c009261fc64..2ea77c34bdf 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/model_addon.go +++ b/resource-manager/databoxedge/2023-07-01/addons/model_addon.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Addon interface { + Addon() BaseAddonImpl +} + +var _ Addon = BaseAddonImpl{} + +type BaseAddonImpl struct { + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAddonImpl) Addon() BaseAddonImpl { + return s } -// RawAddonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Addon = RawAddonImpl{} + +// RawAddonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonImpl struct { + addon BaseAddonImpl Type string Values map[string]interface{} } -func unmarshalAddonImplementation(input []byte) (Addon, error) { +func (s RawAddonImpl) Addon() BaseAddonImpl { + return s.addon +} + +func UnmarshalAddonImplementation(input []byte) (Addon, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalAddonImplementation(input []byte) (Addon, error) { return out, nil } - out := RawAddonImpl{ + var parent BaseAddonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonImpl: %+v", err) + } + + return RawAddonImpl{ + addon: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2023-07-01/addons/model_arcaddon.go b/resource-manager/databoxedge/2023-07-01/addons/model_arcaddon.go index de6939f88e6..3db12101db7 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/model_arcaddon.go +++ b/resource-manager/databoxedge/2023-07-01/addons/model_arcaddon.go @@ -16,12 +16,24 @@ type ArcAddon struct { Properties ArcAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ArcAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ArcAddon{} func (s ArcAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ArcAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ArcAddon: %+v", err) } + decoded["kind"] = "ArcForKubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/addons/model_iotaddon.go b/resource-manager/databoxedge/2023-07-01/addons/model_iotaddon.go index a5880939d0b..109a048758e 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/model_iotaddon.go +++ b/resource-manager/databoxedge/2023-07-01/addons/model_iotaddon.go @@ -16,12 +16,24 @@ type IoTAddon struct { Properties IoTAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTAddon{} func (s IoTAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTAddon: %+v", err) } + decoded["kind"] = "IotEdge" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/addons/version.go b/resource-manager/databoxedge/2023-07-01/addons/version.go index 7401c4dbc09..ecdc6214ddf 100644 --- a/resource-manager/databoxedge/2023-07-01/addons/version.go +++ b/resource-manager/databoxedge/2023-07-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/alerts/README.md b/resource-manager/databoxedge/2023-07-01/alerts/README.md index d84210e8276..e966971cb2a 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/README.md +++ b/resource-manager/databoxedge/2023-07-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/alerts/client.go b/resource-manager/databoxedge/2023-07-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/client.go +++ b/resource-manager/databoxedge/2023-07-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/alerts/id_alert.go b/resource-manager/databoxedge/2023-07-01/alerts/id_alert.go index cedbd3287c2..243e537dc0b 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/id_alert.go +++ b/resource-manager/databoxedge/2023-07-01/alerts/id_alert.go @@ -44,7 +44,7 @@ func ParseAlertID(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertIDInsensitively(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/alerts/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/alerts/id_databoxedgedevice.go index 78f65d94bf2..b8e77d0deb8 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/alerts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/alerts/method_get.go b/resource-manager/databoxedge/2023-07-01/alerts/method_get.go index 86fd0c8dd00..02dc1f0ada9 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id AlertId) (result GetOperationR var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/alerts/version.go b/resource-manager/databoxedge/2023-07-01/alerts/version.go index 8173908592b..792d8b2f5b5 100644 --- a/resource-manager/databoxedge/2023-07-01/alerts/version.go +++ b/resource-manager/databoxedge/2023-07-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/availableskus/README.md b/resource-manager/databoxedge/2023-07-01/availableskus/README.md index a9066f3e71b..504538d5d37 100644 --- a/resource-manager/databoxedge/2023-07-01/availableskus/README.md +++ b/resource-manager/databoxedge/2023-07-01/availableskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/availableskus` Documentation -The `availableskus` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `availableskus` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/availableskus/client.go b/resource-manager/databoxedge/2023-07-01/availableskus/client.go index 76747ad145c..e7f778a7748 100644 --- a/resource-manager/databoxedge/2023-07-01/availableskus/client.go +++ b/resource-manager/databoxedge/2023-07-01/availableskus/client.go @@ -15,7 +15,7 @@ type AvailableSkusClient struct { } func NewAvailableSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableSkusClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/availableskus/version.go b/resource-manager/databoxedge/2023-07-01/availableskus/version.go index cc654ea3dad..272a966cd89 100644 --- a/resource-manager/databoxedge/2023-07-01/availableskus/version.go +++ b/resource-manager/databoxedge/2023-07-01/availableskus/version.go @@ -1,12 +1,10 @@ package availableskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableskus/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/README.md b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/README.md index f0c6efb53a0..29f2794fec0 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/README.md +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/bandwidthschedules` Documentation -The `bandwidthschedules` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `bandwidthschedules` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/client.go b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/client.go index d3bd829908c..8c27b3fbc1b 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/client.go +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/client.go @@ -15,7 +15,7 @@ type BandwidthSchedulesClient struct { } func NewBandwidthSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*BandwidthSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bandwidthschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bandwidthschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BandwidthSchedulesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_bandwidthschedule.go b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_bandwidthschedule.go index d9d50f76d1f..6192d113465 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_bandwidthschedule.go +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_bandwidthschedule.go @@ -44,7 +44,7 @@ func ParseBandwidthScheduleID(input string) (*BandwidthScheduleId, error) { } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBandwidthScheduleIDInsensitively(input string) (*BandwidthScheduleId, } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_databoxedgedevice.go index bdf92107f37..515bb3a9fcf 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/method_get.go b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/method_get.go index eace3d88e88..19036f745d2 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/method_get.go @@ -45,7 +45,6 @@ func (c BandwidthSchedulesClient) Get(ctx context.Context, id BandwidthScheduleI var model BandwidthSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/version.go b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/version.go index ac1c78d6e0a..3d38aa017c4 100644 --- a/resource-manager/databoxedge/2023-07-01/bandwidthschedules/version.go +++ b/resource-manager/databoxedge/2023-07-01/bandwidthschedules/version.go @@ -1,12 +1,10 @@ package bandwidthschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bandwidthschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bandwidthschedules/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/containers/README.md b/resource-manager/databoxedge/2023-07-01/containers/README.md index ea92566e9fa..30d19c7f1e1 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/README.md +++ b/resource-manager/databoxedge/2023-07-01/containers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/containers` Documentation -The `containers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `containers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/containers/client.go b/resource-manager/databoxedge/2023-07-01/containers/client.go index c4fe5813aa1..bd1c47c53ac 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/client.go +++ b/resource-manager/databoxedge/2023-07-01/containers/client.go @@ -15,7 +15,7 @@ type ContainersClient struct { } func NewContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/containers/id_container.go b/resource-manager/databoxedge/2023-07-01/containers/id_container.go index ae472796e28..24f4952e107 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/id_container.go +++ b/resource-manager/databoxedge/2023-07-01/containers/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/containers/id_storageaccount.go b/resource-manager/databoxedge/2023-07-01/containers/id_storageaccount.go index d4ef6f00f22..487a6dbbed9 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/id_storageaccount.go +++ b/resource-manager/databoxedge/2023-07-01/containers/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/containers/method_get.go b/resource-manager/databoxedge/2023-07-01/containers/method_get.go index 49c88bc1f91..2953701c92b 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/containers/method_get.go @@ -45,7 +45,6 @@ func (c ContainersClient) Get(ctx context.Context, id ContainerId) (result GetOp var model Container result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/containers/version.go b/resource-manager/databoxedge/2023-07-01/containers/version.go index e1d98aa83ff..562db821fd9 100644 --- a/resource-manager/databoxedge/2023-07-01/containers/version.go +++ b/resource-manager/databoxedge/2023-07-01/containers/version.go @@ -1,12 +1,10 @@ package containers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containers/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/README.md b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/README.md index c16108db98f..502ad0dfb8e 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/README.md +++ b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/devicecapacitycheck` Documentation -The `devicecapacitycheck` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `devicecapacitycheck` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/client.go b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/client.go index c11c3b93321..dbf2e1c6bd6 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/client.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/client.go @@ -15,7 +15,7 @@ type DeviceCapacityCheckClient struct { } func NewDeviceCapacityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityCheckClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/id_databoxedgedevice.go index 0ef97e8e238..54172a17bc6 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go index 2d800b5a70d..fa614c4ca77 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go @@ -36,6 +36,7 @@ func (o CheckResourceCreationFeasibilityOperationOptions) ToHeaders() *client.He func (o CheckResourceCreationFeasibilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/version.go b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/version.go index ceb00af1118..6d2f6fb58c9 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/version.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacitycheck/version.go @@ -1,12 +1,10 @@ package devicecapacitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacitycheck/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/README.md b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/README.md index e983bf0c4b2..d9907382462 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/README.md +++ b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/devicecapacityinfo` Documentation -The `devicecapacityinfo` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `devicecapacityinfo` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/client.go b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/client.go index 722c9d8de2c..e372fbd47ca 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/client.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/client.go @@ -15,7 +15,7 @@ type DeviceCapacityInfoClient struct { } func NewDeviceCapacityInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacityinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacityinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityInfoClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/id_databoxedgedevice.go index 102b837acc6..1a913976ebe 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/method_getdevicecapacityinfo.go b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/method_getdevicecapacityinfo.go index 23b0555d07c..0ebff10987d 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/method_getdevicecapacityinfo.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/method_getdevicecapacityinfo.go @@ -46,7 +46,6 @@ func (c DeviceCapacityInfoClient) GetDeviceCapacityInfo(ctx context.Context, id var model DeviceCapacityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/version.go b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/version.go index bc7568cd38d..a6a62ebbb35 100644 --- a/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/version.go +++ b/resource-manager/databoxedge/2023-07-01/devicecapacityinfo/version.go @@ -1,12 +1,10 @@ package devicecapacityinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacityinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacityinfo/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/devices/README.md b/resource-manager/databoxedge/2023-07-01/devices/README.md index df4860a4e76..1ded5d237e6 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/README.md +++ b/resource-manager/databoxedge/2023-07-01/devices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/devices` Documentation -The `devices` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `devices` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/devices/client.go b/resource-manager/databoxedge/2023-07-01/devices/client.go index 11a6944e913..5941fcf50ea 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/client.go +++ b/resource-manager/databoxedge/2023-07-01/devices/client.go @@ -15,7 +15,7 @@ type DevicesClient struct { } func NewDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DevicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevicesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/devices/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/devices/id_databoxedgedevice.go index c3b5b1e8139..dafcdbcd44f 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/devices/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_createorupdate.go b/resource-manager/databoxedge/2023-07-01/devices/method_createorupdate.go index 7e28d6de94a..6b341b171a9 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DevicesClient) CreateOrUpdate(ctx context.Context, id DataBoxEdgeDeviceI var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_generatecertificate.go b/resource-manager/databoxedge/2023-07-01/devices/method_generatecertificate.go index 8d09369b4bc..3d369faba8c 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_generatecertificate.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_generatecertificate.go @@ -46,7 +46,6 @@ func (c DevicesClient) GenerateCertificate(ctx context.Context, id DataBoxEdgeDe var model GenerateCertResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_get.go b/resource-manager/databoxedge/2023-07-01/devices/method_get.go index 1cf1caee5e5..9aeec182f95 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_get.go @@ -45,7 +45,6 @@ func (c DevicesClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_getextendedinformation.go b/resource-manager/databoxedge/2023-07-01/devices/method_getextendedinformation.go index 76027576458..c646f8a405f 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_getextendedinformation.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_getextendedinformation.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetExtendedInformation(ctx context.Context, id DataBoxEdg var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_getnetworksettings.go b/resource-manager/databoxedge/2023-07-01/devices/method_getnetworksettings.go index c4a5297f5db..21392f2297a 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_getnetworksettings.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_getnetworksettings.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetNetworkSettings(ctx context.Context, id DataBoxEdgeDev var model NetworkSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_getupdatesummary.go b/resource-manager/databoxedge/2023-07-01/devices/method_getupdatesummary.go index 147f004c8dd..8043341b568 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_getupdatesummary.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_getupdatesummary.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetUpdateSummary(ctx context.Context, id DataBoxEdgeDevic var model UpdateSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_listbyresourcegroup.go b/resource-manager/databoxedge/2023-07-01/devices/method_listbyresourcegroup.go index 779f42afcf6..aa5e3470e9c 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_listbyresourcegroup.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_listbysubscription.go b/resource-manager/databoxedge/2023-07-01/devices/method_listbysubscription.go index 46ad1d3fced..5d429f30267 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_listbysubscription.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_update.go b/resource-manager/databoxedge/2023-07-01/devices/method_update.go index 6020e3a2109..0b87e2f8778 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_update.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_update.go @@ -49,7 +49,6 @@ func (c DevicesClient) Update(ctx context.Context, id DataBoxEdgeDeviceId, input var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_updateextendedinformation.go b/resource-manager/databoxedge/2023-07-01/devices/method_updateextendedinformation.go index b132f78d1ec..7f81ea957ab 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_updateextendedinformation.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_updateextendedinformation.go @@ -50,7 +50,6 @@ func (c DevicesClient) UpdateExtendedInformation(ctx context.Context, id DataBox var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/method_uploadcertificate.go b/resource-manager/databoxedge/2023-07-01/devices/method_uploadcertificate.go index b65c680ad87..73cbfa2d8a7 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/method_uploadcertificate.go +++ b/resource-manager/databoxedge/2023-07-01/devices/method_uploadcertificate.go @@ -50,7 +50,6 @@ func (c DevicesClient) UploadCertificate(ctx context.Context, id DataBoxEdgeDevi var model UploadCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/devices/version.go b/resource-manager/databoxedge/2023-07-01/devices/version.go index 143861ef8aa..a7a42abf2d1 100644 --- a/resource-manager/databoxedge/2023-07-01/devices/version.go +++ b/resource-manager/databoxedge/2023-07-01/devices/version.go @@ -1,12 +1,10 @@ package devices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devices/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/README.md b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/README.md index f019e651e67..2c6bdfbed47 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/README.md +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/diagnosticsettings` Documentation -The `diagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `diagnosticsettings` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/client.go b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/client.go index 336818ef929..6e01407ed2a 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/client.go +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsClient struct { } func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/id_databoxedgedevice.go index 4e934d71948..b1d22209009 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go index 687a1f291d8..ed240fcf995 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticProactiveLogCollectionSettings(ct var model DiagnosticProactiveLogCollectionSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go index b81d4737ffb..273ef8436fa 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticRemoteSupportSettings(ctx context var model DiagnosticRemoteSupportSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/version.go b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/version.go index 11715a2a63b..b58f84732aa 100644 --- a/resource-manager/databoxedge/2023-07-01/diagnosticsettings/version.go +++ b/resource-manager/databoxedge/2023-07-01/diagnosticsettings/version.go @@ -1,12 +1,10 @@ package diagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettings/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/jobs/README.md b/resource-manager/databoxedge/2023-07-01/jobs/README.md index 8b9d0145c66..ac85127b5ce 100644 --- a/resource-manager/databoxedge/2023-07-01/jobs/README.md +++ b/resource-manager/databoxedge/2023-07-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/jobs/client.go b/resource-manager/databoxedge/2023-07-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/databoxedge/2023-07-01/jobs/client.go +++ b/resource-manager/databoxedge/2023-07-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/jobs/id_job.go b/resource-manager/databoxedge/2023-07-01/jobs/id_job.go index 815c77d458f..9ddc3aa4da2 100644 --- a/resource-manager/databoxedge/2023-07-01/jobs/id_job.go +++ b/resource-manager/databoxedge/2023-07-01/jobs/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/jobs/method_get.go b/resource-manager/databoxedge/2023-07-01/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/databoxedge/2023-07-01/jobs/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/jobs/version.go b/resource-manager/databoxedge/2023-07-01/jobs/version.go index 4cc975c0ae3..eedb7d342c4 100644 --- a/resource-manager/databoxedge/2023-07-01/jobs/version.go +++ b/resource-manager/databoxedge/2023-07-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/monitoringconfig/README.md b/resource-manager/databoxedge/2023-07-01/monitoringconfig/README.md index 82ad520e587..b76e3a5002a 100644 --- a/resource-manager/databoxedge/2023-07-01/monitoringconfig/README.md +++ b/resource-manager/databoxedge/2023-07-01/monitoringconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/monitoringconfig` Documentation -The `monitoringconfig` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `monitoringconfig` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/monitoringconfig/client.go b/resource-manager/databoxedge/2023-07-01/monitoringconfig/client.go index 76a289e4ecf..301c005a825 100644 --- a/resource-manager/databoxedge/2023-07-01/monitoringconfig/client.go +++ b/resource-manager/databoxedge/2023-07-01/monitoringconfig/client.go @@ -15,7 +15,7 @@ type MonitoringConfigClient struct { } func NewMonitoringConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoringConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoringconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoringconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoringConfigClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/monitoringconfig/id_role.go b/resource-manager/databoxedge/2023-07-01/monitoringconfig/id_role.go index d0422264c98..e48e163a446 100644 --- a/resource-manager/databoxedge/2023-07-01/monitoringconfig/id_role.go +++ b/resource-manager/databoxedge/2023-07-01/monitoringconfig/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/monitoringconfig/method_get.go b/resource-manager/databoxedge/2023-07-01/monitoringconfig/method_get.go index a3c1e1a212e..d011eabfe4c 100644 --- a/resource-manager/databoxedge/2023-07-01/monitoringconfig/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/monitoringconfig/method_get.go @@ -46,7 +46,6 @@ func (c MonitoringConfigClient) Get(ctx context.Context, id RoleId) (result GetO var model MonitoringMetricConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/monitoringconfig/version.go b/resource-manager/databoxedge/2023-07-01/monitoringconfig/version.go index 5b61aaee3b1..e679de2cca6 100644 --- a/resource-manager/databoxedge/2023-07-01/monitoringconfig/version.go +++ b/resource-manager/databoxedge/2023-07-01/monitoringconfig/version.go @@ -1,12 +1,10 @@ package monitoringconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoringconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoringconfig/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/nodes/README.md b/resource-manager/databoxedge/2023-07-01/nodes/README.md index 27d34df03da..6ad897a7d54 100644 --- a/resource-manager/databoxedge/2023-07-01/nodes/README.md +++ b/resource-manager/databoxedge/2023-07-01/nodes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/nodes` Documentation -The `nodes` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `nodes` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/nodes/client.go b/resource-manager/databoxedge/2023-07-01/nodes/client.go index 46342ec2468..1e266f8fd62 100644 --- a/resource-manager/databoxedge/2023-07-01/nodes/client.go +++ b/resource-manager/databoxedge/2023-07-01/nodes/client.go @@ -15,7 +15,7 @@ type NodesClient struct { } func NewNodesClientWithBaseURI(sdkApi sdkEnv.Api) (*NodesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/nodes/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/nodes/id_databoxedgedevice.go index 26e89973a75..8d1ea4164f8 100644 --- a/resource-manager/databoxedge/2023-07-01/nodes/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/nodes/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/nodes/version.go b/resource-manager/databoxedge/2023-07-01/nodes/version.go index 5f3079bd259..65f9e71013c 100644 --- a/resource-manager/databoxedge/2023-07-01/nodes/version.go +++ b/resource-manager/databoxedge/2023-07-01/nodes/version.go @@ -1,12 +1,10 @@ package nodes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodes/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/orders/README.md b/resource-manager/databoxedge/2023-07-01/orders/README.md index a476310a441..cba709dd7ef 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/README.md +++ b/resource-manager/databoxedge/2023-07-01/orders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/orders` Documentation -The `orders` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `orders` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/orders/client.go b/resource-manager/databoxedge/2023-07-01/orders/client.go index 5be700510b6..2a1b7c07abf 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/client.go +++ b/resource-manager/databoxedge/2023-07-01/orders/client.go @@ -15,7 +15,7 @@ type OrdersClient struct { } func NewOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*OrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "orders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "orders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrdersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/orders/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/orders/id_databoxedgedevice.go index f4b04f8fc65..2a8564ec8d7 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/orders/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/orders/method_get.go b/resource-manager/databoxedge/2023-07-01/orders/method_get.go index 3d5bd988a8a..456aefeeebc 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/orders/method_get.go @@ -46,7 +46,6 @@ func (c OrdersClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result G var model Order result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/orders/method_listdcaccesscode.go b/resource-manager/databoxedge/2023-07-01/orders/method_listdcaccesscode.go index ba62ef019ca..76b105c72b9 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/method_listdcaccesscode.go +++ b/resource-manager/databoxedge/2023-07-01/orders/method_listdcaccesscode.go @@ -46,7 +46,6 @@ func (c OrdersClient) ListDCAccessCode(ctx context.Context, id DataBoxEdgeDevice var model DCAccessCode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/orders/version.go b/resource-manager/databoxedge/2023-07-01/orders/version.go index 263f9db5d38..5d90a0c9cae 100644 --- a/resource-manager/databoxedge/2023-07-01/orders/version.go +++ b/resource-manager/databoxedge/2023-07-01/orders/version.go @@ -1,12 +1,10 @@ package orders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/orders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/orders/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/roles/README.md b/resource-manager/databoxedge/2023-07-01/roles/README.md index cbbbb50d664..be77969beaa 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/README.md +++ b/resource-manager/databoxedge/2023-07-01/roles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/roles` Documentation -The `roles` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `roles` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/roles/client.go b/resource-manager/databoxedge/2023-07-01/roles/client.go index eddcb107e5b..fa6a9c686f1 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/client.go +++ b/resource-manager/databoxedge/2023-07-01/roles/client.go @@ -15,7 +15,7 @@ type RolesClient struct { } func NewRolesClientWithBaseURI(sdkApi sdkEnv.Api) (*RolesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RolesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/roles/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/roles/id_databoxedgedevice.go index d5c9755f422..97c440bd920 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/roles/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/roles/id_role.go b/resource-manager/databoxedge/2023-07-01/roles/id_role.go index b1cd56710c3..56825190746 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/id_role.go +++ b/resource-manager/databoxedge/2023-07-01/roles/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/roles/method_createorupdate.go b/resource-manager/databoxedge/2023-07-01/roles/method_createorupdate.go index b68b5a360a9..62c63583d7d 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-07-01/roles/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-07-01/roles/method_get.go b/resource-manager/databoxedge/2023-07-01/roles/method_get.go index a06ac4de776..55c7df66a05 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/roles/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // Get ... @@ -48,11 +48,11 @@ func (c RolesClient) Get(ctx context.Context, id RoleId) (result GetOperationRes if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalRoleImplementation(respObj) + model, err := UnmarshalRoleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-07-01/roles/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-07-01/roles/method_listbydataboxedgedevice.go index 06fd34c8f86..f2c7267d285 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/roles/method_listbydataboxedgedevice.go @@ -73,7 +73,7 @@ func (c RolesClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdge temp := make([]Role, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalRoleImplementation(v) + val, err := UnmarshalRoleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Role (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-07-01/roles/model_cloudedgemanagementrole.go b/resource-manager/databoxedge/2023-07-01/roles/model_cloudedgemanagementrole.go index 813de354ccb..ca451b83e61 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/model_cloudedgemanagementrole.go +++ b/resource-manager/databoxedge/2023-07-01/roles/model_cloudedgemanagementrole.go @@ -16,12 +16,24 @@ type CloudEdgeManagementRole struct { Properties *CloudEdgeManagementRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s CloudEdgeManagementRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = CloudEdgeManagementRole{} func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CloudEdgeManagementRole: %+v", err) } + decoded["kind"] = "CloudEdgeManagement" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/roles/model_iotrole.go b/resource-manager/databoxedge/2023-07-01/roles/model_iotrole.go index 2b59cab426f..1e08150463e 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/model_iotrole.go +++ b/resource-manager/databoxedge/2023-07-01/roles/model_iotrole.go @@ -16,12 +16,24 @@ type IoTRole struct { Properties *IoTRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTRole{} func (s IoTRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTRole: %+v", err) } + decoded["kind"] = "IOT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/roles/model_kubernetesrole.go b/resource-manager/databoxedge/2023-07-01/roles/model_kubernetesrole.go index a7381f430c5..a92097ab7fb 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/model_kubernetesrole.go +++ b/resource-manager/databoxedge/2023-07-01/roles/model_kubernetesrole.go @@ -16,12 +16,24 @@ type KubernetesRole struct { Properties *KubernetesRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KubernetesRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KubernetesRole{} func (s KubernetesRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KubernetesRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesRole: %+v", err) } + decoded["kind"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/roles/model_mecrole.go b/resource-manager/databoxedge/2023-07-01/roles/model_mecrole.go index dd995e6ab34..cf66fc4f26d 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/model_mecrole.go +++ b/resource-manager/databoxedge/2023-07-01/roles/model_mecrole.go @@ -16,12 +16,24 @@ type MECRole struct { Properties *MECRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MECRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MECRole{} func (s MECRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MECRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MECRole: %+v", err) } + decoded["kind"] = "MEC" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/roles/model_role.go b/resource-manager/databoxedge/2023-07-01/roles/model_role.go index 368c17a903d..6fd3699ab03 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/model_role.go +++ b/resource-manager/databoxedge/2023-07-01/roles/model_role.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Role interface { + Role() BaseRoleImpl +} + +var _ Role = BaseRoleImpl{} + +type BaseRoleImpl struct { + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseRoleImpl) Role() BaseRoleImpl { + return s } -// RawRoleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Role = RawRoleImpl{} + +// RawRoleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRoleImpl struct { + role BaseRoleImpl Type string Values map[string]interface{} } -func unmarshalRoleImplementation(input []byte) (Role, error) { +func (s RawRoleImpl) Role() BaseRoleImpl { + return s.role +} + +func UnmarshalRoleImplementation(input []byte) (Role, error) { if input == nil { return nil, nil } @@ -68,10 +91,15 @@ func unmarshalRoleImplementation(input []byte) (Role, error) { return out, nil } - out := RawRoleImpl{ + var parent BaseRoleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRoleImpl: %+v", err) + } + + return RawRoleImpl{ + role: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2023-07-01/roles/version.go b/resource-manager/databoxedge/2023-07-01/roles/version.go index 4cd7fcde15e..00d6fa0b6d0 100644 --- a/resource-manager/databoxedge/2023-07-01/roles/version.go +++ b/resource-manager/databoxedge/2023-07-01/roles/version.go @@ -1,12 +1,10 @@ package roles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roles/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/shares/README.md b/resource-manager/databoxedge/2023-07-01/shares/README.md index 0c6ee4a0d63..ba81a11d4a4 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/README.md +++ b/resource-manager/databoxedge/2023-07-01/shares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/shares` Documentation -The `shares` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `shares` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/shares/client.go b/resource-manager/databoxedge/2023-07-01/shares/client.go index f6b300e4cc1..0b6d68d77a3 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/client.go +++ b/resource-manager/databoxedge/2023-07-01/shares/client.go @@ -15,7 +15,7 @@ type SharesClient struct { } func NewSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "shares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "shares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/shares/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/shares/id_databoxedgedevice.go index 33b9f11eb54..512cdbd83ef 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/shares/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/shares/id_share.go b/resource-manager/databoxedge/2023-07-01/shares/id_share.go index 32d048aeed3..97ab7e20619 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/id_share.go +++ b/resource-manager/databoxedge/2023-07-01/shares/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/shares/method_get.go b/resource-manager/databoxedge/2023-07-01/shares/method_get.go index be5b58d55a6..23afabf6647 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/shares/method_get.go @@ -45,7 +45,6 @@ func (c SharesClient) Get(ctx context.Context, id ShareId) (result GetOperationR var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/shares/version.go b/resource-manager/databoxedge/2023-07-01/shares/version.go index 64284dd7ebd..20b0c6f9cd4 100644 --- a/resource-manager/databoxedge/2023-07-01/shares/version.go +++ b/resource-manager/databoxedge/2023-07-01/shares/version.go @@ -1,12 +1,10 @@ package shares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/shares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/shares/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/README.md b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/README.md index b54a8f3c89d..377750f5c17 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/README.md +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/storageaccountcredentials` Documentation -The `storageaccountcredentials` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `storageaccountcredentials` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/client.go b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/client.go index 75da116008c..9fe12405f5a 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/client.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/client.go @@ -15,7 +15,7 @@ type StorageAccountCredentialsClient struct { } func NewStorageAccountCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccountcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccountcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountCredentialsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_databoxedgedevice.go index 1a15d85b8fc..10427fdd397 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_storageaccountcredential.go b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_storageaccountcredential.go index df5e9b2ed9b..6b55897dbe2 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_storageaccountcredential.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/id_storageaccountcredential.go @@ -44,7 +44,7 @@ func ParseStorageAccountCredentialID(input string) (*StorageAccountCredentialId, } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountCredentialIDInsensitively(input string) (*StorageAccount } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/method_get.go b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/method_get.go index 82eacb9fced..824d7631ecf 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountCredentialsClient) Get(ctx context.Context, id StorageAcco var model StorageAccountCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/version.go b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/version.go index 7fc56f05552..267f7f48770 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/version.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccountcredentials/version.go @@ -1,12 +1,10 @@ package storageaccountcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccountcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccountcredentials/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/README.md b/resource-manager/databoxedge/2023-07-01/storageaccounts/README.md index bf59519e164..563521a7668 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/README.md +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/client.go b/resource-manager/databoxedge/2023-07-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/client.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/storageaccounts/id_databoxedgedevice.go index 25b2d7f4dd2..2eadf0ddf3b 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/id_storageaccount.go b/resource-manager/databoxedge/2023-07-01/storageaccounts/id_storageaccount.go index f3f1857c6fd..fce97c38a6d 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/id_storageaccount.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/method_get.go b/resource-manager/databoxedge/2023-07-01/storageaccounts/method_get.go index 492b1158753..60d991cc1a2 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountsClient) Get(ctx context.Context, id StorageAccountId) (re var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/storageaccounts/version.go b/resource-manager/databoxedge/2023-07-01/storageaccounts/version.go index d934b6bb09d..5f31cba31e6 100644 --- a/resource-manager/databoxedge/2023-07-01/storageaccounts/version.go +++ b/resource-manager/databoxedge/2023-07-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/supportpackages/README.md b/resource-manager/databoxedge/2023-07-01/supportpackages/README.md index 381e2b67714..aaeb0e714a6 100644 --- a/resource-manager/databoxedge/2023-07-01/supportpackages/README.md +++ b/resource-manager/databoxedge/2023-07-01/supportpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/supportpackages` Documentation -The `supportpackages` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `supportpackages` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/supportpackages/client.go b/resource-manager/databoxedge/2023-07-01/supportpackages/client.go index ea29a77caa2..83cd95fa7ab 100644 --- a/resource-manager/databoxedge/2023-07-01/supportpackages/client.go +++ b/resource-manager/databoxedge/2023-07-01/supportpackages/client.go @@ -15,7 +15,7 @@ type SupportPackagesClient struct { } func NewSupportPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportPackagesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/supportpackages/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/supportpackages/id_databoxedgedevice.go index c9456a32a03..927257541ad 100644 --- a/resource-manager/databoxedge/2023-07-01/supportpackages/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/supportpackages/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/supportpackages/version.go b/resource-manager/databoxedge/2023-07-01/supportpackages/version.go index 0c4fb81b0d5..bbd73b5d741 100644 --- a/resource-manager/databoxedge/2023-07-01/supportpackages/version.go +++ b/resource-manager/databoxedge/2023-07-01/supportpackages/version.go @@ -1,12 +1,10 @@ package supportpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportpackages/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/README.md b/resource-manager/databoxedge/2023-07-01/triggers/README.md index 65fdbf9ed97..bd7b6cc4c57 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/README.md +++ b/resource-manager/databoxedge/2023-07-01/triggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/triggers` Documentation -The `triggers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `triggers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/triggers/client.go b/resource-manager/databoxedge/2023-07-01/triggers/client.go index 9fdf5bed02e..6e6df4f9267 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/client.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/client.go @@ -15,7 +15,7 @@ type TriggersClient struct { } func NewTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "triggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "triggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/triggers/id_databoxedgedevice.go index 7164418e743..0a97cbbc0d4 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/id_trigger.go b/resource-manager/databoxedge/2023-07-01/triggers/id_trigger.go index 1d76a75fa5b..042ab0bacca 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/id_trigger.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/method_createorupdate.go b/resource-manager/databoxedge/2023-07-01/triggers/method_createorupdate.go index f2af6162933..d67c646f15c 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-07-01/triggers/method_get.go b/resource-manager/databoxedge/2023-07-01/triggers/method_get.go index e71861e479e..e4098630193 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Get ... @@ -48,11 +48,11 @@ func (c TriggersClient) Get(ctx context.Context, id TriggerId) (result GetOperat if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalTriggerImplementation(respObj) + model, err := UnmarshalTriggerImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-07-01/triggers/method_listbydataboxedgedevice.go index eeecf442ba2..43fd1ee00a4 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/method_listbydataboxedgedevice.go @@ -40,6 +40,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -101,7 +102,7 @@ func (c TriggersClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxE temp := make([]Trigger, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalTriggerImplementation(v) + val, err := UnmarshalTriggerImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Trigger (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-07-01/triggers/model_fileeventtrigger.go b/resource-manager/databoxedge/2023-07-01/triggers/model_fileeventtrigger.go index 8bb8064c078..4b6dcd2c963 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/model_fileeventtrigger.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/model_fileeventtrigger.go @@ -16,12 +16,24 @@ type FileEventTrigger struct { Properties FileTriggerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FileEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FileEventTrigger{} func (s FileEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FileEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileEventTrigger: %+v", err) } + decoded["kind"] = "FileEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/triggers/model_periodictimereventtrigger.go b/resource-manager/databoxedge/2023-07-01/triggers/model_periodictimereventtrigger.go index 52db0d6864b..791baf045a2 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/model_periodictimereventtrigger.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/model_periodictimereventtrigger.go @@ -16,12 +16,24 @@ type PeriodicTimerEventTrigger struct { Properties PeriodicTimerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s PeriodicTimerEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = PeriodicTimerEventTrigger{} func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicTimerEventTrigger: %+v", err) } + decoded["kind"] = "PeriodicTimerEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-07-01/triggers/model_trigger.go b/resource-manager/databoxedge/2023-07-01/triggers/model_trigger.go index 4e3dc24d2b4..8aad2e84477 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/model_trigger.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/model_trigger.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl +} + +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger +} + +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/databoxedge/2023-07-01/triggers/version.go b/resource-manager/databoxedge/2023-07-01/triggers/version.go index 24df380794c..ea14e4a9f3a 100644 --- a/resource-manager/databoxedge/2023-07-01/triggers/version.go +++ b/resource-manager/databoxedge/2023-07-01/triggers/version.go @@ -1,12 +1,10 @@ package triggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/triggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/triggers/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-07-01/users/README.md b/resource-manager/databoxedge/2023-07-01/users/README.md index ca74ddab7bf..6ab9bb2baa5 100644 --- a/resource-manager/databoxedge/2023-07-01/users/README.md +++ b/resource-manager/databoxedge/2023-07-01/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-07-01/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-07-01`). +The `users` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-07-01/users/client.go b/resource-manager/databoxedge/2023-07-01/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/databoxedge/2023-07-01/users/client.go +++ b/resource-manager/databoxedge/2023-07-01/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-07-01/users/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-07-01/users/id_databoxedgedevice.go index b73e64ec5f0..6e0847706b5 100644 --- a/resource-manager/databoxedge/2023-07-01/users/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/users/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/users/id_user.go b/resource-manager/databoxedge/2023-07-01/users/id_user.go index e545457aea1..cbd25b1b79d 100644 --- a/resource-manager/databoxedge/2023-07-01/users/id_user.go +++ b/resource-manager/databoxedge/2023-07-01/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-07-01/users/method_get.go b/resource-manager/databoxedge/2023-07-01/users/method_get.go index f133fcaebd3..178f7670117 100644 --- a/resource-manager/databoxedge/2023-07-01/users/method_get.go +++ b/resource-manager/databoxedge/2023-07-01/users/method_get.go @@ -45,7 +45,6 @@ func (c UsersClient) Get(ctx context.Context, id UserId) (result GetOperationRes var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-07-01/users/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-07-01/users/method_listbydataboxedgedevice.go index d7046442312..80cb58e1f84 100644 --- a/resource-manager/databoxedge/2023-07-01/users/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-07-01/users/method_listbydataboxedgedevice.go @@ -39,6 +39,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-07-01/users/version.go b/resource-manager/databoxedge/2023-07-01/users/version.go index f160cd356ea..d20d41c9433 100644 --- a/resource-manager/databoxedge/2023-07-01/users/version.go +++ b/resource-manager/databoxedge/2023-07-01/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2023-07-01" } diff --git a/resource-manager/databoxedge/2023-12-01/addons/README.md b/resource-manager/databoxedge/2023-12-01/addons/README.md index 6131ae61246..d4c79773ccc 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/README.md +++ b/resource-manager/databoxedge/2023-12-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/addons/client.go b/resource-manager/databoxedge/2023-12-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/client.go +++ b/resource-manager/databoxedge/2023-12-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/addons/id_addon.go b/resource-manager/databoxedge/2023-12-01/addons/id_addon.go index 2dbfd2ebf64..85a682d76cf 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/id_addon.go +++ b/resource-manager/databoxedge/2023-12-01/addons/id_addon.go @@ -46,7 +46,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/addons/id_role.go b/resource-manager/databoxedge/2023-12-01/addons/id_role.go index 64766ca274b..d359b3bd66e 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/id_role.go +++ b/resource-manager/databoxedge/2023-12-01/addons/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/addons/method_createorupdate.go b/resource-manager/databoxedge/2023-12-01/addons/method_createorupdate.go index 8cf09e24a10..40116fb4f1c 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-12-01/addons/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-12-01/addons/method_get.go b/resource-manager/databoxedge/2023-12-01/addons/method_get.go index 43d8014778d..57bfb9d6817 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/addons/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Addon + Model Addon } // Get ... @@ -48,11 +48,11 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAddonImplementation(respObj) + model, err := UnmarshalAddonImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-12-01/addons/method_listbyrole.go b/resource-manager/databoxedge/2023-12-01/addons/method_listbyrole.go index 988a69ac246..f06b187b345 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/method_listbyrole.go +++ b/resource-manager/databoxedge/2023-12-01/addons/method_listbyrole.go @@ -73,7 +73,7 @@ func (c AddonsClient) ListByRole(ctx context.Context, id RoleId) (result ListByR temp := make([]Addon, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAddonImplementation(v) + val, err := UnmarshalAddonImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Addon (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-12-01/addons/model_addon.go b/resource-manager/databoxedge/2023-12-01/addons/model_addon.go index c009261fc64..2ea77c34bdf 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/model_addon.go +++ b/resource-manager/databoxedge/2023-12-01/addons/model_addon.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Addon interface { + Addon() BaseAddonImpl +} + +var _ Addon = BaseAddonImpl{} + +type BaseAddonImpl struct { + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAddonImpl) Addon() BaseAddonImpl { + return s } -// RawAddonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Addon = RawAddonImpl{} + +// RawAddonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonImpl struct { + addon BaseAddonImpl Type string Values map[string]interface{} } -func unmarshalAddonImplementation(input []byte) (Addon, error) { +func (s RawAddonImpl) Addon() BaseAddonImpl { + return s.addon +} + +func UnmarshalAddonImplementation(input []byte) (Addon, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalAddonImplementation(input []byte) (Addon, error) { return out, nil } - out := RawAddonImpl{ + var parent BaseAddonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonImpl: %+v", err) + } + + return RawAddonImpl{ + addon: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2023-12-01/addons/model_arcaddon.go b/resource-manager/databoxedge/2023-12-01/addons/model_arcaddon.go index de6939f88e6..3db12101db7 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/model_arcaddon.go +++ b/resource-manager/databoxedge/2023-12-01/addons/model_arcaddon.go @@ -16,12 +16,24 @@ type ArcAddon struct { Properties ArcAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ArcAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ArcAddon{} func (s ArcAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ArcAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ArcAddon: %+v", err) } + decoded["kind"] = "ArcForKubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/addons/model_iotaddon.go b/resource-manager/databoxedge/2023-12-01/addons/model_iotaddon.go index a5880939d0b..109a048758e 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/model_iotaddon.go +++ b/resource-manager/databoxedge/2023-12-01/addons/model_iotaddon.go @@ -16,12 +16,24 @@ type IoTAddon struct { Properties IoTAddonProperties `json:"properties"` // Fields inherited from Addon + Id *string `json:"id,omitempty"` + Kind AddonType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTAddon) Addon() BaseAddonImpl { + return BaseAddonImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTAddon{} func (s IoTAddon) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTAddon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTAddon: %+v", err) } + decoded["kind"] = "IotEdge" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/addons/version.go b/resource-manager/databoxedge/2023-12-01/addons/version.go index 748318cebd8..dca5feef504 100644 --- a/resource-manager/databoxedge/2023-12-01/addons/version.go +++ b/resource-manager/databoxedge/2023-12-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/alerts/README.md b/resource-manager/databoxedge/2023-12-01/alerts/README.md index 4df536ba175..6ee5967e973 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/README.md +++ b/resource-manager/databoxedge/2023-12-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/alerts/client.go b/resource-manager/databoxedge/2023-12-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/client.go +++ b/resource-manager/databoxedge/2023-12-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/alerts/id_alert.go b/resource-manager/databoxedge/2023-12-01/alerts/id_alert.go index cedbd3287c2..243e537dc0b 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/id_alert.go +++ b/resource-manager/databoxedge/2023-12-01/alerts/id_alert.go @@ -44,7 +44,7 @@ func ParseAlertID(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertIDInsensitively(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/alerts/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/alerts/id_databoxedgedevice.go index 78f65d94bf2..b8e77d0deb8 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/alerts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/alerts/method_get.go b/resource-manager/databoxedge/2023-12-01/alerts/method_get.go index 86fd0c8dd00..02dc1f0ada9 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/alerts/method_get.go @@ -45,7 +45,6 @@ func (c AlertsClient) Get(ctx context.Context, id AlertId) (result GetOperationR var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/alerts/version.go b/resource-manager/databoxedge/2023-12-01/alerts/version.go index 18aa4a7ca5d..c963ccd5cf7 100644 --- a/resource-manager/databoxedge/2023-12-01/alerts/version.go +++ b/resource-manager/databoxedge/2023-12-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/availableskus/README.md b/resource-manager/databoxedge/2023-12-01/availableskus/README.md index b454236c8b0..01733175d2a 100644 --- a/resource-manager/databoxedge/2023-12-01/availableskus/README.md +++ b/resource-manager/databoxedge/2023-12-01/availableskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/availableskus` Documentation -The `availableskus` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `availableskus` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/availableskus/client.go b/resource-manager/databoxedge/2023-12-01/availableskus/client.go index 76747ad145c..e7f778a7748 100644 --- a/resource-manager/databoxedge/2023-12-01/availableskus/client.go +++ b/resource-manager/databoxedge/2023-12-01/availableskus/client.go @@ -15,7 +15,7 @@ type AvailableSkusClient struct { } func NewAvailableSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableSkusClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/availableskus/version.go b/resource-manager/databoxedge/2023-12-01/availableskus/version.go index 4dde86f7010..78f75fd3487 100644 --- a/resource-manager/databoxedge/2023-12-01/availableskus/version.go +++ b/resource-manager/databoxedge/2023-12-01/availableskus/version.go @@ -1,12 +1,10 @@ package availableskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableskus/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/README.md b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/README.md index 6cfa7ee1fdc..29be7bd2bf5 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/README.md +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/bandwidthschedules` Documentation -The `bandwidthschedules` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `bandwidthschedules` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/client.go b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/client.go index d3bd829908c..8c27b3fbc1b 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/client.go +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/client.go @@ -15,7 +15,7 @@ type BandwidthSchedulesClient struct { } func NewBandwidthSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*BandwidthSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bandwidthschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bandwidthschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BandwidthSchedulesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_bandwidthschedule.go b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_bandwidthschedule.go index d9d50f76d1f..6192d113465 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_bandwidthschedule.go +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_bandwidthschedule.go @@ -44,7 +44,7 @@ func ParseBandwidthScheduleID(input string) (*BandwidthScheduleId, error) { } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBandwidthScheduleIDInsensitively(input string) (*BandwidthScheduleId, } id := BandwidthScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_databoxedgedevice.go index bdf92107f37..515bb3a9fcf 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/method_get.go b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/method_get.go index eace3d88e88..19036f745d2 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/method_get.go @@ -45,7 +45,6 @@ func (c BandwidthSchedulesClient) Get(ctx context.Context, id BandwidthScheduleI var model BandwidthSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/version.go b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/version.go index 9d72da4a408..b555af1b7e4 100644 --- a/resource-manager/databoxedge/2023-12-01/bandwidthschedules/version.go +++ b/resource-manager/databoxedge/2023-12-01/bandwidthschedules/version.go @@ -1,12 +1,10 @@ package bandwidthschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bandwidthschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bandwidthschedules/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/containers/README.md b/resource-manager/databoxedge/2023-12-01/containers/README.md index b9eceaec322..ae1316683b9 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/README.md +++ b/resource-manager/databoxedge/2023-12-01/containers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/containers` Documentation -The `containers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `containers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/containers/client.go b/resource-manager/databoxedge/2023-12-01/containers/client.go index c4fe5813aa1..bd1c47c53ac 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/client.go +++ b/resource-manager/databoxedge/2023-12-01/containers/client.go @@ -15,7 +15,7 @@ type ContainersClient struct { } func NewContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/containers/id_container.go b/resource-manager/databoxedge/2023-12-01/containers/id_container.go index ae472796e28..24f4952e107 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/id_container.go +++ b/resource-manager/databoxedge/2023-12-01/containers/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/containers/id_storageaccount.go b/resource-manager/databoxedge/2023-12-01/containers/id_storageaccount.go index d4ef6f00f22..487a6dbbed9 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/id_storageaccount.go +++ b/resource-manager/databoxedge/2023-12-01/containers/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/containers/method_get.go b/resource-manager/databoxedge/2023-12-01/containers/method_get.go index 49c88bc1f91..2953701c92b 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/containers/method_get.go @@ -45,7 +45,6 @@ func (c ContainersClient) Get(ctx context.Context, id ContainerId) (result GetOp var model Container result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/containers/version.go b/resource-manager/databoxedge/2023-12-01/containers/version.go index 1bf75ee5cd3..ac4a597b0b6 100644 --- a/resource-manager/databoxedge/2023-12-01/containers/version.go +++ b/resource-manager/databoxedge/2023-12-01/containers/version.go @@ -1,12 +1,10 @@ package containers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containers/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/README.md b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/README.md index c1d654af784..27c839098e3 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/README.md +++ b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/devicecapacitycheck` Documentation -The `devicecapacitycheck` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `devicecapacitycheck` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/client.go b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/client.go index c11c3b93321..dbf2e1c6bd6 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/client.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/client.go @@ -15,7 +15,7 @@ type DeviceCapacityCheckClient struct { } func NewDeviceCapacityCheckClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityCheckClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacitycheck", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacitycheck", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityCheckClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/id_databoxedgedevice.go index 0ef97e8e238..54172a17bc6 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go index 2d800b5a70d..fa614c4ca77 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/method_checkresourcecreationfeasibility.go @@ -36,6 +36,7 @@ func (o CheckResourceCreationFeasibilityOperationOptions) ToHeaders() *client.He func (o CheckResourceCreationFeasibilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/version.go b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/version.go index 4af8136002f..fb0b39679c3 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/version.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacitycheck/version.go @@ -1,12 +1,10 @@ package devicecapacitycheck -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacitycheck/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacitycheck/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/README.md b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/README.md index d52cfb2b431..135fc8b924e 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/README.md +++ b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/devicecapacityinfo` Documentation -The `devicecapacityinfo` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `devicecapacityinfo` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/client.go b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/client.go index 722c9d8de2c..e372fbd47ca 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/client.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/client.go @@ -15,7 +15,7 @@ type DeviceCapacityInfoClient struct { } func NewDeviceCapacityInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceCapacityInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devicecapacityinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devicecapacityinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceCapacityInfoClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/id_databoxedgedevice.go index 102b837acc6..1a913976ebe 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/method_getdevicecapacityinfo.go b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/method_getdevicecapacityinfo.go index 23b0555d07c..0ebff10987d 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/method_getdevicecapacityinfo.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/method_getdevicecapacityinfo.go @@ -46,7 +46,6 @@ func (c DeviceCapacityInfoClient) GetDeviceCapacityInfo(ctx context.Context, id var model DeviceCapacityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/version.go b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/version.go index 7fcc471a76d..1cfd794880a 100644 --- a/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/version.go +++ b/resource-manager/databoxedge/2023-12-01/devicecapacityinfo/version.go @@ -1,12 +1,10 @@ package devicecapacityinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devicecapacityinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devicecapacityinfo/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/devices/README.md b/resource-manager/databoxedge/2023-12-01/devices/README.md index 942b609023d..3a3bed7f52c 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/README.md +++ b/resource-manager/databoxedge/2023-12-01/devices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/devices` Documentation -The `devices` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `devices` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/devices/client.go b/resource-manager/databoxedge/2023-12-01/devices/client.go index 11a6944e913..5941fcf50ea 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/client.go +++ b/resource-manager/databoxedge/2023-12-01/devices/client.go @@ -15,7 +15,7 @@ type DevicesClient struct { } func NewDevicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DevicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevicesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/devices/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/devices/id_databoxedgedevice.go index c3b5b1e8139..dafcdbcd44f 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/devices/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_createorupdate.go b/resource-manager/databoxedge/2023-12-01/devices/method_createorupdate.go index 7e28d6de94a..6b341b171a9 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DevicesClient) CreateOrUpdate(ctx context.Context, id DataBoxEdgeDeviceI var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_generatecertificate.go b/resource-manager/databoxedge/2023-12-01/devices/method_generatecertificate.go index 8d09369b4bc..3d369faba8c 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_generatecertificate.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_generatecertificate.go @@ -46,7 +46,6 @@ func (c DevicesClient) GenerateCertificate(ctx context.Context, id DataBoxEdgeDe var model GenerateCertResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_get.go b/resource-manager/databoxedge/2023-12-01/devices/method_get.go index 1cf1caee5e5..9aeec182f95 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_get.go @@ -45,7 +45,6 @@ func (c DevicesClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_getextendedinformation.go b/resource-manager/databoxedge/2023-12-01/devices/method_getextendedinformation.go index 76027576458..c646f8a405f 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_getextendedinformation.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_getextendedinformation.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetExtendedInformation(ctx context.Context, id DataBoxEdg var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_getnetworksettings.go b/resource-manager/databoxedge/2023-12-01/devices/method_getnetworksettings.go index c4a5297f5db..21392f2297a 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_getnetworksettings.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_getnetworksettings.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetNetworkSettings(ctx context.Context, id DataBoxEdgeDev var model NetworkSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_getupdatesummary.go b/resource-manager/databoxedge/2023-12-01/devices/method_getupdatesummary.go index 147f004c8dd..8043341b568 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_getupdatesummary.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_getupdatesummary.go @@ -46,7 +46,6 @@ func (c DevicesClient) GetUpdateSummary(ctx context.Context, id DataBoxEdgeDevic var model UpdateSummary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_listbyresourcegroup.go b/resource-manager/databoxedge/2023-12-01/devices/method_listbyresourcegroup.go index 779f42afcf6..aa5e3470e9c 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_listbyresourcegroup.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_listbysubscription.go b/resource-manager/databoxedge/2023-12-01/devices/method_listbysubscription.go index 46ad1d3fced..5d429f30267 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_listbysubscription.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_update.go b/resource-manager/databoxedge/2023-12-01/devices/method_update.go index 6020e3a2109..0b87e2f8778 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_update.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_update.go @@ -49,7 +49,6 @@ func (c DevicesClient) Update(ctx context.Context, id DataBoxEdgeDeviceId, input var model DataBoxEdgeDevice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_updateextendedinformation.go b/resource-manager/databoxedge/2023-12-01/devices/method_updateextendedinformation.go index b132f78d1ec..7f81ea957ab 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_updateextendedinformation.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_updateextendedinformation.go @@ -50,7 +50,6 @@ func (c DevicesClient) UpdateExtendedInformation(ctx context.Context, id DataBox var model DataBoxEdgeDeviceExtendedInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/method_uploadcertificate.go b/resource-manager/databoxedge/2023-12-01/devices/method_uploadcertificate.go index b65c680ad87..73cbfa2d8a7 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/method_uploadcertificate.go +++ b/resource-manager/databoxedge/2023-12-01/devices/method_uploadcertificate.go @@ -50,7 +50,6 @@ func (c DevicesClient) UploadCertificate(ctx context.Context, id DataBoxEdgeDevi var model UploadCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/devices/version.go b/resource-manager/databoxedge/2023-12-01/devices/version.go index aa64026342a..a3e1cbb3531 100644 --- a/resource-manager/databoxedge/2023-12-01/devices/version.go +++ b/resource-manager/databoxedge/2023-12-01/devices/version.go @@ -1,12 +1,10 @@ package devices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devices/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/README.md b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/README.md index 555a53c0778..baa79469e25 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/README.md +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/diagnosticsettings` Documentation -The `diagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `diagnosticsettings` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/client.go b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/client.go index 336818ef929..6e01407ed2a 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/client.go +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsClient struct { } func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/id_databoxedgedevice.go index 4e934d71948..b1d22209009 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go index 687a1f291d8..ed240fcf995 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticproactivelogcollectionsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticProactiveLogCollectionSettings(ct var model DiagnosticProactiveLogCollectionSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go index b81d4737ffb..273ef8436fa 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/method_getdiagnosticremotesupportsettings.go @@ -46,7 +46,6 @@ func (c DiagnosticSettingsClient) GetDiagnosticRemoteSupportSettings(ctx context var model DiagnosticRemoteSupportSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/version.go b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/version.go index 20b267bbd43..64df96e6e52 100644 --- a/resource-manager/databoxedge/2023-12-01/diagnosticsettings/version.go +++ b/resource-manager/databoxedge/2023-12-01/diagnosticsettings/version.go @@ -1,12 +1,10 @@ package diagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettings/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/jobs/README.md b/resource-manager/databoxedge/2023-12-01/jobs/README.md index a0215614d20..4ec0717a006 100644 --- a/resource-manager/databoxedge/2023-12-01/jobs/README.md +++ b/resource-manager/databoxedge/2023-12-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/jobs/client.go b/resource-manager/databoxedge/2023-12-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/databoxedge/2023-12-01/jobs/client.go +++ b/resource-manager/databoxedge/2023-12-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/jobs/id_job.go b/resource-manager/databoxedge/2023-12-01/jobs/id_job.go index 815c77d458f..9ddc3aa4da2 100644 --- a/resource-manager/databoxedge/2023-12-01/jobs/id_job.go +++ b/resource-manager/databoxedge/2023-12-01/jobs/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/jobs/method_get.go b/resource-manager/databoxedge/2023-12-01/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/databoxedge/2023-12-01/jobs/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/jobs/version.go b/resource-manager/databoxedge/2023-12-01/jobs/version.go index 60c2b5f0dcd..4d38cda5103 100644 --- a/resource-manager/databoxedge/2023-12-01/jobs/version.go +++ b/resource-manager/databoxedge/2023-12-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/monitoringconfig/README.md b/resource-manager/databoxedge/2023-12-01/monitoringconfig/README.md index c738085bffc..66f9671aeb7 100644 --- a/resource-manager/databoxedge/2023-12-01/monitoringconfig/README.md +++ b/resource-manager/databoxedge/2023-12-01/monitoringconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/monitoringconfig` Documentation -The `monitoringconfig` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `monitoringconfig` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/monitoringconfig/client.go b/resource-manager/databoxedge/2023-12-01/monitoringconfig/client.go index 76a289e4ecf..301c005a825 100644 --- a/resource-manager/databoxedge/2023-12-01/monitoringconfig/client.go +++ b/resource-manager/databoxedge/2023-12-01/monitoringconfig/client.go @@ -15,7 +15,7 @@ type MonitoringConfigClient struct { } func NewMonitoringConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoringConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoringconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoringconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoringConfigClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/monitoringconfig/id_role.go b/resource-manager/databoxedge/2023-12-01/monitoringconfig/id_role.go index d0422264c98..e48e163a446 100644 --- a/resource-manager/databoxedge/2023-12-01/monitoringconfig/id_role.go +++ b/resource-manager/databoxedge/2023-12-01/monitoringconfig/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/monitoringconfig/method_get.go b/resource-manager/databoxedge/2023-12-01/monitoringconfig/method_get.go index a3c1e1a212e..d011eabfe4c 100644 --- a/resource-manager/databoxedge/2023-12-01/monitoringconfig/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/monitoringconfig/method_get.go @@ -46,7 +46,6 @@ func (c MonitoringConfigClient) Get(ctx context.Context, id RoleId) (result GetO var model MonitoringMetricConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/monitoringconfig/version.go b/resource-manager/databoxedge/2023-12-01/monitoringconfig/version.go index ee1c2c65927..a9057a5e358 100644 --- a/resource-manager/databoxedge/2023-12-01/monitoringconfig/version.go +++ b/resource-manager/databoxedge/2023-12-01/monitoringconfig/version.go @@ -1,12 +1,10 @@ package monitoringconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoringconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoringconfig/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/nodes/README.md b/resource-manager/databoxedge/2023-12-01/nodes/README.md index 2841597c565..5834d0d91ba 100644 --- a/resource-manager/databoxedge/2023-12-01/nodes/README.md +++ b/resource-manager/databoxedge/2023-12-01/nodes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/nodes` Documentation -The `nodes` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `nodes` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/nodes/client.go b/resource-manager/databoxedge/2023-12-01/nodes/client.go index 46342ec2468..1e266f8fd62 100644 --- a/resource-manager/databoxedge/2023-12-01/nodes/client.go +++ b/resource-manager/databoxedge/2023-12-01/nodes/client.go @@ -15,7 +15,7 @@ type NodesClient struct { } func NewNodesClientWithBaseURI(sdkApi sdkEnv.Api) (*NodesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/nodes/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/nodes/id_databoxedgedevice.go index 26e89973a75..8d1ea4164f8 100644 --- a/resource-manager/databoxedge/2023-12-01/nodes/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/nodes/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/nodes/version.go b/resource-manager/databoxedge/2023-12-01/nodes/version.go index 812685cb94e..8fbdb87b581 100644 --- a/resource-manager/databoxedge/2023-12-01/nodes/version.go +++ b/resource-manager/databoxedge/2023-12-01/nodes/version.go @@ -1,12 +1,10 @@ package nodes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodes/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/orders/README.md b/resource-manager/databoxedge/2023-12-01/orders/README.md index 53b4fd15d86..fd67a8388ac 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/README.md +++ b/resource-manager/databoxedge/2023-12-01/orders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/orders` Documentation -The `orders` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `orders` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/orders/client.go b/resource-manager/databoxedge/2023-12-01/orders/client.go index 5be700510b6..2a1b7c07abf 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/client.go +++ b/resource-manager/databoxedge/2023-12-01/orders/client.go @@ -15,7 +15,7 @@ type OrdersClient struct { } func NewOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*OrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "orders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "orders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrdersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/orders/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/orders/id_databoxedgedevice.go index f4b04f8fc65..2a8564ec8d7 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/orders/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/orders/method_get.go b/resource-manager/databoxedge/2023-12-01/orders/method_get.go index 3d5bd988a8a..456aefeeebc 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/orders/method_get.go @@ -46,7 +46,6 @@ func (c OrdersClient) Get(ctx context.Context, id DataBoxEdgeDeviceId) (result G var model Order result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/orders/method_listdcaccesscode.go b/resource-manager/databoxedge/2023-12-01/orders/method_listdcaccesscode.go index ba62ef019ca..76b105c72b9 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/method_listdcaccesscode.go +++ b/resource-manager/databoxedge/2023-12-01/orders/method_listdcaccesscode.go @@ -46,7 +46,6 @@ func (c OrdersClient) ListDCAccessCode(ctx context.Context, id DataBoxEdgeDevice var model DCAccessCode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/orders/version.go b/resource-manager/databoxedge/2023-12-01/orders/version.go index 37b3df0230f..03e7b98df48 100644 --- a/resource-manager/databoxedge/2023-12-01/orders/version.go +++ b/resource-manager/databoxedge/2023-12-01/orders/version.go @@ -1,12 +1,10 @@ package orders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/orders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/orders/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/roles/README.md b/resource-manager/databoxedge/2023-12-01/roles/README.md index 256d99b494c..b9afbefa21a 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/README.md +++ b/resource-manager/databoxedge/2023-12-01/roles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/roles` Documentation -The `roles` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `roles` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/roles/client.go b/resource-manager/databoxedge/2023-12-01/roles/client.go index eddcb107e5b..fa6a9c686f1 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/client.go +++ b/resource-manager/databoxedge/2023-12-01/roles/client.go @@ -15,7 +15,7 @@ type RolesClient struct { } func NewRolesClientWithBaseURI(sdkApi sdkEnv.Api) (*RolesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RolesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/roles/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/roles/id_databoxedgedevice.go index d5c9755f422..97c440bd920 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/roles/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/roles/id_role.go b/resource-manager/databoxedge/2023-12-01/roles/id_role.go index b1cd56710c3..56825190746 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/id_role.go +++ b/resource-manager/databoxedge/2023-12-01/roles/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/roles/method_createorupdate.go b/resource-manager/databoxedge/2023-12-01/roles/method_createorupdate.go index b68b5a360a9..62c63583d7d 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-12-01/roles/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-12-01/roles/method_get.go b/resource-manager/databoxedge/2023-12-01/roles/method_get.go index a06ac4de776..55c7df66a05 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/roles/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Role + Model Role } // Get ... @@ -48,11 +48,11 @@ func (c RolesClient) Get(ctx context.Context, id RoleId) (result GetOperationRes if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalRoleImplementation(respObj) + model, err := UnmarshalRoleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-12-01/roles/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-12-01/roles/method_listbydataboxedgedevice.go index 06fd34c8f86..f2c7267d285 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/roles/method_listbydataboxedgedevice.go @@ -73,7 +73,7 @@ func (c RolesClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdge temp := make([]Role, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalRoleImplementation(v) + val, err := UnmarshalRoleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Role (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-12-01/roles/model_cloudedgemanagementrole.go b/resource-manager/databoxedge/2023-12-01/roles/model_cloudedgemanagementrole.go index 813de354ccb..ca451b83e61 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/model_cloudedgemanagementrole.go +++ b/resource-manager/databoxedge/2023-12-01/roles/model_cloudedgemanagementrole.go @@ -16,12 +16,24 @@ type CloudEdgeManagementRole struct { Properties *CloudEdgeManagementRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s CloudEdgeManagementRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = CloudEdgeManagementRole{} func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CloudEdgeManagementRole: %+v", err) } + decoded["kind"] = "CloudEdgeManagement" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/roles/model_iotrole.go b/resource-manager/databoxedge/2023-12-01/roles/model_iotrole.go index 2b59cab426f..1e08150463e 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/model_iotrole.go +++ b/resource-manager/databoxedge/2023-12-01/roles/model_iotrole.go @@ -16,12 +16,24 @@ type IoTRole struct { Properties *IoTRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTRole{} func (s IoTRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IoTRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTRole: %+v", err) } + decoded["kind"] = "IOT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/roles/model_kubernetesrole.go b/resource-manager/databoxedge/2023-12-01/roles/model_kubernetesrole.go index a7381f430c5..a92097ab7fb 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/model_kubernetesrole.go +++ b/resource-manager/databoxedge/2023-12-01/roles/model_kubernetesrole.go @@ -16,12 +16,24 @@ type KubernetesRole struct { Properties *KubernetesRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KubernetesRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KubernetesRole{} func (s KubernetesRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KubernetesRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesRole: %+v", err) } + decoded["kind"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/roles/model_mecrole.go b/resource-manager/databoxedge/2023-12-01/roles/model_mecrole.go index dd995e6ab34..cf66fc4f26d 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/model_mecrole.go +++ b/resource-manager/databoxedge/2023-12-01/roles/model_mecrole.go @@ -16,12 +16,24 @@ type MECRole struct { Properties *MECRoleProperties `json:"properties,omitempty"` // Fields inherited from Role + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MECRole) Role() BaseRoleImpl { + return BaseRoleImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MECRole{} func (s MECRole) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MECRole) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MECRole: %+v", err) } + decoded["kind"] = "MEC" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/roles/model_role.go b/resource-manager/databoxedge/2023-12-01/roles/model_role.go index 368c17a903d..6fd3699ab03 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/model_role.go +++ b/resource-manager/databoxedge/2023-12-01/roles/model_role.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Role interface { + Role() BaseRoleImpl +} + +var _ Role = BaseRoleImpl{} + +type BaseRoleImpl struct { + Id *string `json:"id,omitempty"` + Kind RoleTypes `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseRoleImpl) Role() BaseRoleImpl { + return s } -// RawRoleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Role = RawRoleImpl{} + +// RawRoleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRoleImpl struct { + role BaseRoleImpl Type string Values map[string]interface{} } -func unmarshalRoleImplementation(input []byte) (Role, error) { +func (s RawRoleImpl) Role() BaseRoleImpl { + return s.role +} + +func UnmarshalRoleImplementation(input []byte) (Role, error) { if input == nil { return nil, nil } @@ -68,10 +91,15 @@ func unmarshalRoleImplementation(input []byte) (Role, error) { return out, nil } - out := RawRoleImpl{ + var parent BaseRoleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRoleImpl: %+v", err) + } + + return RawRoleImpl{ + role: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/databoxedge/2023-12-01/roles/version.go b/resource-manager/databoxedge/2023-12-01/roles/version.go index f7bf9fc1dd3..46951f1e224 100644 --- a/resource-manager/databoxedge/2023-12-01/roles/version.go +++ b/resource-manager/databoxedge/2023-12-01/roles/version.go @@ -1,12 +1,10 @@ package roles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roles/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/shares/README.md b/resource-manager/databoxedge/2023-12-01/shares/README.md index 628868ca67b..c55cc107603 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/README.md +++ b/resource-manager/databoxedge/2023-12-01/shares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/shares` Documentation -The `shares` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `shares` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/shares/client.go b/resource-manager/databoxedge/2023-12-01/shares/client.go index f6b300e4cc1..0b6d68d77a3 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/client.go +++ b/resource-manager/databoxedge/2023-12-01/shares/client.go @@ -15,7 +15,7 @@ type SharesClient struct { } func NewSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "shares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "shares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/shares/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/shares/id_databoxedgedevice.go index 33b9f11eb54..512cdbd83ef 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/shares/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/shares/id_share.go b/resource-manager/databoxedge/2023-12-01/shares/id_share.go index 32d048aeed3..97ab7e20619 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/id_share.go +++ b/resource-manager/databoxedge/2023-12-01/shares/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/shares/method_get.go b/resource-manager/databoxedge/2023-12-01/shares/method_get.go index be5b58d55a6..23afabf6647 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/shares/method_get.go @@ -45,7 +45,6 @@ func (c SharesClient) Get(ctx context.Context, id ShareId) (result GetOperationR var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/shares/version.go b/resource-manager/databoxedge/2023-12-01/shares/version.go index 735a7a24447..35df900c07e 100644 --- a/resource-manager/databoxedge/2023-12-01/shares/version.go +++ b/resource-manager/databoxedge/2023-12-01/shares/version.go @@ -1,12 +1,10 @@ package shares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/shares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/shares/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/README.md b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/README.md index b22b908e1db..7f742418255 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/README.md +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/storageaccountcredentials` Documentation -The `storageaccountcredentials` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `storageaccountcredentials` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/client.go b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/client.go index 75da116008c..9fe12405f5a 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/client.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/client.go @@ -15,7 +15,7 @@ type StorageAccountCredentialsClient struct { } func NewStorageAccountCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccountcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccountcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountCredentialsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_databoxedgedevice.go index 1a15d85b8fc..10427fdd397 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_storageaccountcredential.go b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_storageaccountcredential.go index df5e9b2ed9b..6b55897dbe2 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_storageaccountcredential.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/id_storageaccountcredential.go @@ -44,7 +44,7 @@ func ParseStorageAccountCredentialID(input string) (*StorageAccountCredentialId, } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountCredentialIDInsensitively(input string) (*StorageAccount } id := StorageAccountCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/method_get.go b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/method_get.go index 82eacb9fced..824d7631ecf 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountCredentialsClient) Get(ctx context.Context, id StorageAcco var model StorageAccountCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/version.go b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/version.go index 27bc0df3e96..8923846cd42 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/version.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccountcredentials/version.go @@ -1,12 +1,10 @@ package storageaccountcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccountcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccountcredentials/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/README.md b/resource-manager/databoxedge/2023-12-01/storageaccounts/README.md index 1cf5cb791b7..2672083a9a1 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/README.md +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/client.go b/resource-manager/databoxedge/2023-12-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/client.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/storageaccounts/id_databoxedgedevice.go index 25b2d7f4dd2..2eadf0ddf3b 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/id_storageaccount.go b/resource-manager/databoxedge/2023-12-01/storageaccounts/id_storageaccount.go index f3f1857c6fd..fce97c38a6d 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/id_storageaccount.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/method_get.go b/resource-manager/databoxedge/2023-12-01/storageaccounts/method_get.go index 492b1158753..60d991cc1a2 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountsClient) Get(ctx context.Context, id StorageAccountId) (re var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/storageaccounts/version.go b/resource-manager/databoxedge/2023-12-01/storageaccounts/version.go index b8f7be85e33..e0b20dd55aa 100644 --- a/resource-manager/databoxedge/2023-12-01/storageaccounts/version.go +++ b/resource-manager/databoxedge/2023-12-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/supportpackages/README.md b/resource-manager/databoxedge/2023-12-01/supportpackages/README.md index cb4946b3e3d..dd2be4a4e28 100644 --- a/resource-manager/databoxedge/2023-12-01/supportpackages/README.md +++ b/resource-manager/databoxedge/2023-12-01/supportpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/supportpackages` Documentation -The `supportpackages` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `supportpackages` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/supportpackages/client.go b/resource-manager/databoxedge/2023-12-01/supportpackages/client.go index ea29a77caa2..83cd95fa7ab 100644 --- a/resource-manager/databoxedge/2023-12-01/supportpackages/client.go +++ b/resource-manager/databoxedge/2023-12-01/supportpackages/client.go @@ -15,7 +15,7 @@ type SupportPackagesClient struct { } func NewSupportPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportPackagesClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/supportpackages/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/supportpackages/id_databoxedgedevice.go index c9456a32a03..927257541ad 100644 --- a/resource-manager/databoxedge/2023-12-01/supportpackages/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/supportpackages/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/supportpackages/version.go b/resource-manager/databoxedge/2023-12-01/supportpackages/version.go index 66fa43eee7e..52c0d7243d8 100644 --- a/resource-manager/databoxedge/2023-12-01/supportpackages/version.go +++ b/resource-manager/databoxedge/2023-12-01/supportpackages/version.go @@ -1,12 +1,10 @@ package supportpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportpackages/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/README.md b/resource-manager/databoxedge/2023-12-01/triggers/README.md index 077bf459c85..6d9ff21f18f 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/README.md +++ b/resource-manager/databoxedge/2023-12-01/triggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/triggers` Documentation -The `triggers` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `triggers` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/triggers/client.go b/resource-manager/databoxedge/2023-12-01/triggers/client.go index 9fdf5bed02e..6e6df4f9267 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/client.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/client.go @@ -15,7 +15,7 @@ type TriggersClient struct { } func NewTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "triggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "triggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/triggers/id_databoxedgedevice.go index 7164418e743..0a97cbbc0d4 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/id_trigger.go b/resource-manager/databoxedge/2023-12-01/triggers/id_trigger.go index 1d76a75fa5b..042ab0bacca 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/id_trigger.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/method_createorupdate.go b/resource-manager/databoxedge/2023-12-01/triggers/method_createorupdate.go index f2af6162933..d67c646f15c 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/method_createorupdate.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // CreateOrUpdate ... diff --git a/resource-manager/databoxedge/2023-12-01/triggers/method_get.go b/resource-manager/databoxedge/2023-12-01/triggers/method_get.go index e71861e479e..e4098630193 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Get ... @@ -48,11 +48,11 @@ func (c TriggersClient) Get(ctx context.Context, id TriggerId) (result GetOperat if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalTriggerImplementation(respObj) + model, err := UnmarshalTriggerImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-12-01/triggers/method_listbydataboxedgedevice.go index eeecf442ba2..43fd1ee00a4 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/method_listbydataboxedgedevice.go @@ -40,6 +40,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -101,7 +102,7 @@ func (c TriggersClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxE temp := make([]Trigger, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalTriggerImplementation(v) + val, err := UnmarshalTriggerImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Trigger (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/databoxedge/2023-12-01/triggers/model_fileeventtrigger.go b/resource-manager/databoxedge/2023-12-01/triggers/model_fileeventtrigger.go index 8bb8064c078..4b6dcd2c963 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/model_fileeventtrigger.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/model_fileeventtrigger.go @@ -16,12 +16,24 @@ type FileEventTrigger struct { Properties FileTriggerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FileEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FileEventTrigger{} func (s FileEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FileEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileEventTrigger: %+v", err) } + decoded["kind"] = "FileEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/triggers/model_periodictimereventtrigger.go b/resource-manager/databoxedge/2023-12-01/triggers/model_periodictimereventtrigger.go index 52db0d6864b..791baf045a2 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/model_periodictimereventtrigger.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/model_periodictimereventtrigger.go @@ -16,12 +16,24 @@ type PeriodicTimerEventTrigger struct { Properties PeriodicTimerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s PeriodicTimerEventTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = PeriodicTimerEventTrigger{} func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PeriodicTimerEventTrigger: %+v", err) } + decoded["kind"] = "PeriodicTimerEvent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/databoxedge/2023-12-01/triggers/model_trigger.go b/resource-manager/databoxedge/2023-12-01/triggers/model_trigger.go index 4e3dc24d2b4..8aad2e84477 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/model_trigger.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/model_trigger.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl +} + +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Id *string `json:"id,omitempty"` + Kind TriggerEventType `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger +} + +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/databoxedge/2023-12-01/triggers/version.go b/resource-manager/databoxedge/2023-12-01/triggers/version.go index bf9dbcb43be..3edc1a964b0 100644 --- a/resource-manager/databoxedge/2023-12-01/triggers/version.go +++ b/resource-manager/databoxedge/2023-12-01/triggers/version.go @@ -1,12 +1,10 @@ package triggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/triggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/triggers/2023-12-01" } diff --git a/resource-manager/databoxedge/2023-12-01/users/README.md b/resource-manager/databoxedge/2023-12-01/users/README.md index 1949be459b4..592f4c974b7 100644 --- a/resource-manager/databoxedge/2023-12-01/users/README.md +++ b/resource-manager/databoxedge/2023-12-01/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `databoxedge` (API Version `2023-12-01`). +The `users` SDK allows for interaction with Azure Resource Manager `databoxedge` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databoxedge/2023-12-01/users/client.go b/resource-manager/databoxedge/2023-12-01/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/databoxedge/2023-12-01/users/client.go +++ b/resource-manager/databoxedge/2023-12-01/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/databoxedge/2023-12-01/users/id_databoxedgedevice.go b/resource-manager/databoxedge/2023-12-01/users/id_databoxedgedevice.go index b73e64ec5f0..6e0847706b5 100644 --- a/resource-manager/databoxedge/2023-12-01/users/id_databoxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/users/id_databoxedgedevice.go @@ -42,7 +42,7 @@ func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error) { } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, } id := DataBoxEdgeDeviceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/users/id_user.go b/resource-manager/databoxedge/2023-12-01/users/id_user.go index e545457aea1..cbd25b1b79d 100644 --- a/resource-manager/databoxedge/2023-12-01/users/id_user.go +++ b/resource-manager/databoxedge/2023-12-01/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databoxedge/2023-12-01/users/method_get.go b/resource-manager/databoxedge/2023-12-01/users/method_get.go index f133fcaebd3..178f7670117 100644 --- a/resource-manager/databoxedge/2023-12-01/users/method_get.go +++ b/resource-manager/databoxedge/2023-12-01/users/method_get.go @@ -45,7 +45,6 @@ func (c UsersClient) Get(ctx context.Context, id UserId) (result GetOperationRes var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databoxedge/2023-12-01/users/method_listbydataboxedgedevice.go b/resource-manager/databoxedge/2023-12-01/users/method_listbydataboxedgedevice.go index d7046442312..80cb58e1f84 100644 --- a/resource-manager/databoxedge/2023-12-01/users/method_listbydataboxedgedevice.go +++ b/resource-manager/databoxedge/2023-12-01/users/method_listbydataboxedgedevice.go @@ -39,6 +39,7 @@ func (o ListByDataBoxEdgeDeviceOperationOptions) ToHeaders() *client.Headers { func (o ListByDataBoxEdgeDeviceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databoxedge/2023-12-01/users/version.go b/resource-manager/databoxedge/2023-12-01/users/version.go index 5478b0c1647..ed9bae58944 100644 --- a/resource-manager/databoxedge/2023-12-01/users/version.go +++ b/resource-manager/databoxedge/2023-12-01/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2023-12-01" } diff --git a/resource-manager/databricks/2022-04-01-preview/accessconnector/README.md b/resource-manager/databricks/2022-04-01-preview/accessconnector/README.md index a4c34b7d412..f665fb7b44c 100644 --- a/resource-manager/databricks/2022-04-01-preview/accessconnector/README.md +++ b/resource-manager/databricks/2022-04-01-preview/accessconnector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/accessconnector` Documentation -The `accessconnector` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `accessconnector` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/accessconnector/client.go b/resource-manager/databricks/2022-04-01-preview/accessconnector/client.go index 934dd952c30..815c524909d 100644 --- a/resource-manager/databricks/2022-04-01-preview/accessconnector/client.go +++ b/resource-manager/databricks/2022-04-01-preview/accessconnector/client.go @@ -15,7 +15,7 @@ type AccessConnectorClient struct { } func NewAccessConnectorClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessConnectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accessconnector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accessconnector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccessConnectorClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/accessconnector/id_accessconnector.go b/resource-manager/databricks/2022-04-01-preview/accessconnector/id_accessconnector.go index 7945a8c422b..8db0f1b34cd 100644 --- a/resource-manager/databricks/2022-04-01-preview/accessconnector/id_accessconnector.go +++ b/resource-manager/databricks/2022-04-01-preview/accessconnector/id_accessconnector.go @@ -42,7 +42,7 @@ func ParseAccessConnectorID(input string) (*AccessConnectorId, error) { } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccessConnectorIDInsensitively(input string) (*AccessConnectorId, erro } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/accessconnector/method_get.go b/resource-manager/databricks/2022-04-01-preview/accessconnector/method_get.go index b35134f9e29..2337dc50e6e 100644 --- a/resource-manager/databricks/2022-04-01-preview/accessconnector/method_get.go +++ b/resource-manager/databricks/2022-04-01-preview/accessconnector/method_get.go @@ -45,7 +45,6 @@ func (c AccessConnectorClient) Get(ctx context.Context, id AccessConnectorId) (r var model AccessConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/accessconnector/version.go b/resource-manager/databricks/2022-04-01-preview/accessconnector/version.go index f099c1d4866..10aa2d8fee3 100644 --- a/resource-manager/databricks/2022-04-01-preview/accessconnector/version.go +++ b/resource-manager/databricks/2022-04-01-preview/accessconnector/version.go @@ -1,12 +1,10 @@ package accessconnector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accessconnector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accessconnector/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/delete/client.go b/resource-manager/databricks/2022-04-01-preview/delete/client.go index f7a3ebd1edb..a151c0362da 100644 --- a/resource-manager/databricks/2022-04-01-preview/delete/client.go +++ b/resource-manager/databricks/2022-04-01-preview/delete/client.go @@ -15,7 +15,7 @@ type DELETEClient struct { } func NewDELETEClientWithBaseURI(sdkApi sdkEnv.Api) (*DELETEClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delete", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delete", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DELETEClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/delete/id_privateendpointconnection.go b/resource-manager/databricks/2022-04-01-preview/delete/id_privateendpointconnection.go index 61ac031cf2f..e15499c8de6 100644 --- a/resource-manager/databricks/2022-04-01-preview/delete/id_privateendpointconnection.go +++ b/resource-manager/databricks/2022-04-01-preview/delete/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/delete/version.go b/resource-manager/databricks/2022-04-01-preview/delete/version.go index 01a866dd1ed..ffd7bfabdb7 100644 --- a/resource-manager/databricks/2022-04-01-preview/delete/version.go +++ b/resource-manager/databricks/2022-04-01-preview/delete/version.go @@ -1,12 +1,10 @@ package delete -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delete/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delete/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/README.md b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/README.md index a5a2b97fccb..8013c7bfa2e 100644 --- a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/client.go b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/id_workspace.go b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/id_workspace.go index df605774924..e475808d5d7 100644 --- a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/id_workspace.go +++ b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/method_list.go b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/method_list.go index f9dac1d6f6a..4a52b5e24c0 100644 --- a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/method_list.go +++ b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/method_list.go @@ -46,7 +46,6 @@ func (c OutboundNetworkDependenciesEndpointsClient) List(ctx context.Context, id var model []OutboundEnvironmentEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/version.go b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/version.go index 23bfc97fcc7..34f3c59efdf 100644 --- a/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/databricks/2022-04-01-preview/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/README.md b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/README.md index 74e9d9b99ad..252dafc2886 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/README.md +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/client.go b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/client.go +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_privateendpointconnection.go index 9307cc52bd0..d5928e268f7 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_workspace.go b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_workspace.go index 20bd077f889..03f8b633fa1 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_workspace.go +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/method_get.go b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/version.go b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/version.go index a0c08591714..5161220f474 100644 --- a/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/version.go +++ b/resource-manager/databricks/2022-04-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/README.md b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/README.md index b14db4dd110..156086f5531 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/README.md +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/client.go b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/client.go +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_privatelinkresource.go index bd946e8a4ea..8e953359b4f 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_workspace.go b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_workspace.go index f74868d63e3..4006059458a 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_workspace.go +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/method_get.go b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/method_get.go index e8de18c1783..befd7af3800 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/version.go b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/version.go index dd4a9a9c1d6..d6ae3bcc694 100644 --- a/resource-manager/databricks/2022-04-01-preview/privatelinkresources/version.go +++ b/resource-manager/databricks/2022-04-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/put/README.md b/resource-manager/databricks/2022-04-01-preview/put/README.md index a6450d9c14f..c22e806dc14 100644 --- a/resource-manager/databricks/2022-04-01-preview/put/README.md +++ b/resource-manager/databricks/2022-04-01-preview/put/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/put` Documentation -The `put` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `put` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/put/client.go b/resource-manager/databricks/2022-04-01-preview/put/client.go index 6f8700864e0..54fb640a8e1 100644 --- a/resource-manager/databricks/2022-04-01-preview/put/client.go +++ b/resource-manager/databricks/2022-04-01-preview/put/client.go @@ -15,7 +15,7 @@ type PUTClient struct { } func NewPUTClientWithBaseURI(sdkApi sdkEnv.Api) (*PUTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "put", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "put", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PUTClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/put/id_privateendpointconnection.go b/resource-manager/databricks/2022-04-01-preview/put/id_privateendpointconnection.go index 808bfd0f9af..fcb658bf860 100644 --- a/resource-manager/databricks/2022-04-01-preview/put/id_privateendpointconnection.go +++ b/resource-manager/databricks/2022-04-01-preview/put/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/put/version.go b/resource-manager/databricks/2022-04-01-preview/put/version.go index 71ab68f8d87..0dbe1303b0b 100644 --- a/resource-manager/databricks/2022-04-01-preview/put/version.go +++ b/resource-manager/databricks/2022-04-01-preview/put/version.go @@ -1,12 +1,10 @@ package put -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/put/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/put/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/README.md b/resource-manager/databricks/2022-04-01-preview/vnetpeering/README.md index 57b898d62c9..de0cb1d58f3 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/README.md +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/vnetpeering` Documentation -The `vnetpeering` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `vnetpeering` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/client.go b/resource-manager/databricks/2022-04-01-preview/vnetpeering/client.go index 32828af1493..5b85b9745b0 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/client.go +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/client.go @@ -15,7 +15,7 @@ type VNetPeeringClient struct { } func NewVNetPeeringClientWithBaseURI(sdkApi sdkEnv.Api) (*VNetPeeringClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vnetpeering", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vnetpeering", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VNetPeeringClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_virtualnetworkpeering.go b/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_virtualnetworkpeering.go index c69b815cd85..a5fdbb11514 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_virtualnetworkpeering.go +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_workspace.go b/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_workspace.go index 763c748e5e4..ac92e4f2a2c 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_workspace.go +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/method_get.go b/resource-manager/databricks/2022-04-01-preview/vnetpeering/method_get.go index 7a39c3f6b64..af52e4b4637 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/method_get.go +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/method_get.go @@ -46,7 +46,6 @@ func (c VNetPeeringClient) Get(ctx context.Context, id VirtualNetworkPeeringId) var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/vnetpeering/version.go b/resource-manager/databricks/2022-04-01-preview/vnetpeering/version.go index 3e6d1f7950a..16c916e92a1 100644 --- a/resource-manager/databricks/2022-04-01-preview/vnetpeering/version.go +++ b/resource-manager/databricks/2022-04-01-preview/vnetpeering/version.go @@ -1,12 +1,10 @@ package vnetpeering -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vnetpeering/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vnetpeering/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-04-01-preview/workspaces/README.md b/resource-manager/databricks/2022-04-01-preview/workspaces/README.md index 254a91dd535..f7a00465735 100644 --- a/resource-manager/databricks/2022-04-01-preview/workspaces/README.md +++ b/resource-manager/databricks/2022-04-01-preview/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-04-01-preview/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-04-01-preview`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-04-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-04-01-preview/workspaces/client.go b/resource-manager/databricks/2022-04-01-preview/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/databricks/2022-04-01-preview/workspaces/client.go +++ b/resource-manager/databricks/2022-04-01-preview/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go b/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go index 815bf37d843..2f87a915519 100644 --- a/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go +++ b/resource-manager/databricks/2022-04-01-preview/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-04-01-preview/workspaces/method_get.go b/resource-manager/databricks/2022-04-01-preview/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/databricks/2022-04-01-preview/workspaces/method_get.go +++ b/resource-manager/databricks/2022-04-01-preview/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-04-01-preview/workspaces/version.go b/resource-manager/databricks/2022-04-01-preview/workspaces/version.go index 51a37b51aa6..464229d5b23 100644 --- a/resource-manager/databricks/2022-04-01-preview/workspaces/version.go +++ b/resource-manager/databricks/2022-04-01-preview/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2022-04-01-preview" } diff --git a/resource-manager/databricks/2022-10-01-preview/accessconnector/README.md b/resource-manager/databricks/2022-10-01-preview/accessconnector/README.md index 29a35b84b6e..cdeaae87265 100644 --- a/resource-manager/databricks/2022-10-01-preview/accessconnector/README.md +++ b/resource-manager/databricks/2022-10-01-preview/accessconnector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2022-10-01-preview/accessconnector` Documentation -The `accessconnector` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2022-10-01-preview`). +The `accessconnector` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2022-10-01-preview/accessconnector/client.go b/resource-manager/databricks/2022-10-01-preview/accessconnector/client.go index 934dd952c30..815c524909d 100644 --- a/resource-manager/databricks/2022-10-01-preview/accessconnector/client.go +++ b/resource-manager/databricks/2022-10-01-preview/accessconnector/client.go @@ -15,7 +15,7 @@ type AccessConnectorClient struct { } func NewAccessConnectorClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessConnectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accessconnector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accessconnector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccessConnectorClient: %+v", err) } diff --git a/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go b/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go index 7945a8c422b..8db0f1b34cd 100644 --- a/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go +++ b/resource-manager/databricks/2022-10-01-preview/accessconnector/id_accessconnector.go @@ -42,7 +42,7 @@ func ParseAccessConnectorID(input string) (*AccessConnectorId, error) { } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccessConnectorIDInsensitively(input string) (*AccessConnectorId, erro } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2022-10-01-preview/accessconnector/method_get.go b/resource-manager/databricks/2022-10-01-preview/accessconnector/method_get.go index b35134f9e29..2337dc50e6e 100644 --- a/resource-manager/databricks/2022-10-01-preview/accessconnector/method_get.go +++ b/resource-manager/databricks/2022-10-01-preview/accessconnector/method_get.go @@ -45,7 +45,6 @@ func (c AccessConnectorClient) Get(ctx context.Context, id AccessConnectorId) (r var model AccessConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2022-10-01-preview/accessconnector/version.go b/resource-manager/databricks/2022-10-01-preview/accessconnector/version.go index 9591cefee34..16cc91c4dc4 100644 --- a/resource-manager/databricks/2022-10-01-preview/accessconnector/version.go +++ b/resource-manager/databricks/2022-10-01-preview/accessconnector/version.go @@ -1,12 +1,10 @@ package accessconnector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accessconnector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accessconnector/2022-10-01-preview" } diff --git a/resource-manager/databricks/2023-02-01/delete/client.go b/resource-manager/databricks/2023-02-01/delete/client.go index f7a3ebd1edb..a151c0362da 100644 --- a/resource-manager/databricks/2023-02-01/delete/client.go +++ b/resource-manager/databricks/2023-02-01/delete/client.go @@ -15,7 +15,7 @@ type DELETEClient struct { } func NewDELETEClientWithBaseURI(sdkApi sdkEnv.Api) (*DELETEClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delete", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delete", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DELETEClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/delete/id_privateendpointconnection.go b/resource-manager/databricks/2023-02-01/delete/id_privateendpointconnection.go index 61ac031cf2f..e15499c8de6 100644 --- a/resource-manager/databricks/2023-02-01/delete/id_privateendpointconnection.go +++ b/resource-manager/databricks/2023-02-01/delete/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/delete/version.go b/resource-manager/databricks/2023-02-01/delete/version.go index 387efcf7d10..4a17fcf1eec 100644 --- a/resource-manager/databricks/2023-02-01/delete/version.go +++ b/resource-manager/databricks/2023-02-01/delete/version.go @@ -1,12 +1,10 @@ package delete -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delete/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delete/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/README.md index c21e221db5f..6f5a8a8fb54 100644 --- a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/id_workspace.go b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/id_workspace.go index df605774924..e475808d5d7 100644 --- a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/id_workspace.go +++ b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/method_list.go b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/method_list.go index f9dac1d6f6a..4a52b5e24c0 100644 --- a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/method_list.go +++ b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/method_list.go @@ -46,7 +46,6 @@ func (c OutboundNetworkDependenciesEndpointsClient) List(ctx context.Context, id var model []OutboundEnvironmentEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/version.go index 1085a28f81b..20d2dbd0b34 100644 --- a/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/databricks/2023-02-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/README.md b/resource-manager/databricks/2023-02-01/privateendpointconnections/README.md index aca8fc0c926..2bbe22c16ad 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/README.md +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/client.go b/resource-manager/databricks/2023-02-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/client.go +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/databricks/2023-02-01/privateendpointconnections/id_privateendpointconnection.go index 9307cc52bd0..d5928e268f7 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/id_workspace.go b/resource-manager/databricks/2023-02-01/privateendpointconnections/id_workspace.go index 20bd077f889..03f8b633fa1 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/id_workspace.go +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/method_get.go b/resource-manager/databricks/2023-02-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/method_get.go +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-02-01/privateendpointconnections/version.go b/resource-manager/databricks/2023-02-01/privateendpointconnections/version.go index c52ff6ca032..bb23f356eb9 100644 --- a/resource-manager/databricks/2023-02-01/privateendpointconnections/version.go +++ b/resource-manager/databricks/2023-02-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/README.md b/resource-manager/databricks/2023-02-01/privatelinkresources/README.md index 7ba18202098..9e36b01d282 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/README.md +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/client.go b/resource-manager/databricks/2023-02-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/client.go +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/databricks/2023-02-01/privatelinkresources/id_privatelinkresource.go index bd946e8a4ea..8e953359b4f 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/id_workspace.go b/resource-manager/databricks/2023-02-01/privatelinkresources/id_workspace.go index f74868d63e3..4006059458a 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/id_workspace.go +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/method_get.go b/resource-manager/databricks/2023-02-01/privatelinkresources/method_get.go index e8de18c1783..befd7af3800 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/method_get.go +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-02-01/privatelinkresources/version.go b/resource-manager/databricks/2023-02-01/privatelinkresources/version.go index b722fc19353..1fdea962d74 100644 --- a/resource-manager/databricks/2023-02-01/privatelinkresources/version.go +++ b/resource-manager/databricks/2023-02-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/put/README.md b/resource-manager/databricks/2023-02-01/put/README.md index 17462686649..25489aea588 100644 --- a/resource-manager/databricks/2023-02-01/put/README.md +++ b/resource-manager/databricks/2023-02-01/put/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/put` Documentation -The `put` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `put` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/put/client.go b/resource-manager/databricks/2023-02-01/put/client.go index 6f8700864e0..54fb640a8e1 100644 --- a/resource-manager/databricks/2023-02-01/put/client.go +++ b/resource-manager/databricks/2023-02-01/put/client.go @@ -15,7 +15,7 @@ type PUTClient struct { } func NewPUTClientWithBaseURI(sdkApi sdkEnv.Api) (*PUTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "put", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "put", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PUTClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/put/id_privateendpointconnection.go b/resource-manager/databricks/2023-02-01/put/id_privateendpointconnection.go index 808bfd0f9af..fcb658bf860 100644 --- a/resource-manager/databricks/2023-02-01/put/id_privateendpointconnection.go +++ b/resource-manager/databricks/2023-02-01/put/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/put/version.go b/resource-manager/databricks/2023-02-01/put/version.go index f9d8990f100..e664e1689e5 100644 --- a/resource-manager/databricks/2023-02-01/put/version.go +++ b/resource-manager/databricks/2023-02-01/put/version.go @@ -1,12 +1,10 @@ package put -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/put/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/put/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/README.md b/resource-manager/databricks/2023-02-01/vnetpeering/README.md index 2a781f0e3e5..b027759502a 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/README.md +++ b/resource-manager/databricks/2023-02-01/vnetpeering/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/vnetpeering` Documentation -The `vnetpeering` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `vnetpeering` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/client.go b/resource-manager/databricks/2023-02-01/vnetpeering/client.go index 32828af1493..5b85b9745b0 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/client.go +++ b/resource-manager/databricks/2023-02-01/vnetpeering/client.go @@ -15,7 +15,7 @@ type VNetPeeringClient struct { } func NewVNetPeeringClientWithBaseURI(sdkApi sdkEnv.Api) (*VNetPeeringClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vnetpeering", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vnetpeering", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VNetPeeringClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go b/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go index c69b815cd85..a5fdbb11514 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go +++ b/resource-manager/databricks/2023-02-01/vnetpeering/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go b/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go index 763c748e5e4..ac92e4f2a2c 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go +++ b/resource-manager/databricks/2023-02-01/vnetpeering/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go b/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go index 7a39c3f6b64..af52e4b4637 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go +++ b/resource-manager/databricks/2023-02-01/vnetpeering/method_get.go @@ -46,7 +46,6 @@ func (c VNetPeeringClient) Get(ctx context.Context, id VirtualNetworkPeeringId) var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-02-01/vnetpeering/version.go b/resource-manager/databricks/2023-02-01/vnetpeering/version.go index 1d9a4d8e1b2..d78e12dc7dd 100644 --- a/resource-manager/databricks/2023-02-01/vnetpeering/version.go +++ b/resource-manager/databricks/2023-02-01/vnetpeering/version.go @@ -1,12 +1,10 @@ package vnetpeering -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vnetpeering/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vnetpeering/2023-02-01" } diff --git a/resource-manager/databricks/2023-02-01/workspaces/README.md b/resource-manager/databricks/2023-02-01/workspaces/README.md index c9da1471518..fd0edd84f93 100644 --- a/resource-manager/databricks/2023-02-01/workspaces/README.md +++ b/resource-manager/databricks/2023-02-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-02-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-02-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-02-01/workspaces/client.go b/resource-manager/databricks/2023-02-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/databricks/2023-02-01/workspaces/client.go +++ b/resource-manager/databricks/2023-02-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go b/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go index 815bf37d843..2f87a915519 100644 --- a/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go +++ b/resource-manager/databricks/2023-02-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-02-01/workspaces/method_get.go b/resource-manager/databricks/2023-02-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/databricks/2023-02-01/workspaces/method_get.go +++ b/resource-manager/databricks/2023-02-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-02-01/workspaces/version.go b/resource-manager/databricks/2023-02-01/workspaces/version.go index bff8e584cad..9147c9ac962 100644 --- a/resource-manager/databricks/2023-02-01/workspaces/version.go +++ b/resource-manager/databricks/2023-02-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-02-01" } diff --git a/resource-manager/databricks/2023-05-01/accessconnector/README.md b/resource-manager/databricks/2023-05-01/accessconnector/README.md index 737719690b3..b4f874bd8ef 100644 --- a/resource-manager/databricks/2023-05-01/accessconnector/README.md +++ b/resource-manager/databricks/2023-05-01/accessconnector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2023-05-01/accessconnector` Documentation -The `accessconnector` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2023-05-01`). +The `accessconnector` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2023-05-01/accessconnector/client.go b/resource-manager/databricks/2023-05-01/accessconnector/client.go index 934dd952c30..815c524909d 100644 --- a/resource-manager/databricks/2023-05-01/accessconnector/client.go +++ b/resource-manager/databricks/2023-05-01/accessconnector/client.go @@ -15,7 +15,7 @@ type AccessConnectorClient struct { } func NewAccessConnectorClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessConnectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accessconnector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accessconnector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccessConnectorClient: %+v", err) } diff --git a/resource-manager/databricks/2023-05-01/accessconnector/id_accessconnector.go b/resource-manager/databricks/2023-05-01/accessconnector/id_accessconnector.go index 7945a8c422b..8db0f1b34cd 100644 --- a/resource-manager/databricks/2023-05-01/accessconnector/id_accessconnector.go +++ b/resource-manager/databricks/2023-05-01/accessconnector/id_accessconnector.go @@ -42,7 +42,7 @@ func ParseAccessConnectorID(input string) (*AccessConnectorId, error) { } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccessConnectorIDInsensitively(input string) (*AccessConnectorId, erro } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2023-05-01/accessconnector/method_get.go b/resource-manager/databricks/2023-05-01/accessconnector/method_get.go index b35134f9e29..2337dc50e6e 100644 --- a/resource-manager/databricks/2023-05-01/accessconnector/method_get.go +++ b/resource-manager/databricks/2023-05-01/accessconnector/method_get.go @@ -45,7 +45,6 @@ func (c AccessConnectorClient) Get(ctx context.Context, id AccessConnectorId) (r var model AccessConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2023-05-01/accessconnector/version.go b/resource-manager/databricks/2023-05-01/accessconnector/version.go index f3f020a30ab..074d2117751 100644 --- a/resource-manager/databricks/2023-05-01/accessconnector/version.go +++ b/resource-manager/databricks/2023-05-01/accessconnector/version.go @@ -1,12 +1,10 @@ package accessconnector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accessconnector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accessconnector/2023-05-01" } diff --git a/resource-manager/databricks/2024-05-01/accessconnector/README.md b/resource-manager/databricks/2024-05-01/accessconnector/README.md index 821aeed5adf..0539c552058 100644 --- a/resource-manager/databricks/2024-05-01/accessconnector/README.md +++ b/resource-manager/databricks/2024-05-01/accessconnector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/accessconnector` Documentation -The `accessconnector` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `accessconnector` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/accessconnector/client.go b/resource-manager/databricks/2024-05-01/accessconnector/client.go index 934dd952c30..815c524909d 100644 --- a/resource-manager/databricks/2024-05-01/accessconnector/client.go +++ b/resource-manager/databricks/2024-05-01/accessconnector/client.go @@ -15,7 +15,7 @@ type AccessConnectorClient struct { } func NewAccessConnectorClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessConnectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accessconnector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accessconnector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccessConnectorClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/accessconnector/id_accessconnector.go b/resource-manager/databricks/2024-05-01/accessconnector/id_accessconnector.go index 7945a8c422b..8db0f1b34cd 100644 --- a/resource-manager/databricks/2024-05-01/accessconnector/id_accessconnector.go +++ b/resource-manager/databricks/2024-05-01/accessconnector/id_accessconnector.go @@ -42,7 +42,7 @@ func ParseAccessConnectorID(input string) (*AccessConnectorId, error) { } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccessConnectorIDInsensitively(input string) (*AccessConnectorId, erro } id := AccessConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/accessconnector/method_get.go b/resource-manager/databricks/2024-05-01/accessconnector/method_get.go index b35134f9e29..2337dc50e6e 100644 --- a/resource-manager/databricks/2024-05-01/accessconnector/method_get.go +++ b/resource-manager/databricks/2024-05-01/accessconnector/method_get.go @@ -45,7 +45,6 @@ func (c AccessConnectorClient) Get(ctx context.Context, id AccessConnectorId) (r var model AccessConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/accessconnector/version.go b/resource-manager/databricks/2024-05-01/accessconnector/version.go index fcc706808f4..00695710e6f 100644 --- a/resource-manager/databricks/2024-05-01/accessconnector/version.go +++ b/resource-manager/databricks/2024-05-01/accessconnector/version.go @@ -1,12 +1,10 @@ package accessconnector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accessconnector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accessconnector/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/delete/client.go b/resource-manager/databricks/2024-05-01/delete/client.go index f7a3ebd1edb..a151c0362da 100644 --- a/resource-manager/databricks/2024-05-01/delete/client.go +++ b/resource-manager/databricks/2024-05-01/delete/client.go @@ -15,7 +15,7 @@ type DELETEClient struct { } func NewDELETEClientWithBaseURI(sdkApi sdkEnv.Api) (*DELETEClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delete", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delete", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DELETEClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/delete/id_privateendpointconnection.go b/resource-manager/databricks/2024-05-01/delete/id_privateendpointconnection.go index 61ac031cf2f..e15499c8de6 100644 --- a/resource-manager/databricks/2024-05-01/delete/id_privateendpointconnection.go +++ b/resource-manager/databricks/2024-05-01/delete/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/delete/version.go b/resource-manager/databricks/2024-05-01/delete/version.go index 6b1e42af68a..220f67c596a 100644 --- a/resource-manager/databricks/2024-05-01/delete/version.go +++ b/resource-manager/databricks/2024-05-01/delete/version.go @@ -1,12 +1,10 @@ package delete -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delete/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delete/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/README.md index 8a20eba4e7a..b74199c51a6 100644 --- a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/id_workspace.go b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/id_workspace.go index df605774924..e475808d5d7 100644 --- a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/id_workspace.go +++ b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/method_list.go b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/method_list.go index f9dac1d6f6a..4a52b5e24c0 100644 --- a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/method_list.go +++ b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/method_list.go @@ -46,7 +46,6 @@ func (c OutboundNetworkDependenciesEndpointsClient) List(ctx context.Context, id var model []OutboundEnvironmentEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/version.go index 642b15db3ac..665d8d38389 100644 --- a/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/databricks/2024-05-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/README.md b/resource-manager/databricks/2024-05-01/privateendpointconnections/README.md index f8b82cfe60c..502643331c6 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/README.md +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/client.go b/resource-manager/databricks/2024-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/client.go +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/databricks/2024-05-01/privateendpointconnections/id_privateendpointconnection.go index 9307cc52bd0..d5928e268f7 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/id_workspace.go b/resource-manager/databricks/2024-05-01/privateendpointconnections/id_workspace.go index 20bd077f889..03f8b633fa1 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/id_workspace.go +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/method_get.go b/resource-manager/databricks/2024-05-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/method_get.go +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/privateendpointconnections/version.go b/resource-manager/databricks/2024-05-01/privateendpointconnections/version.go index b541d16e87d..584766e8f3b 100644 --- a/resource-manager/databricks/2024-05-01/privateendpointconnections/version.go +++ b/resource-manager/databricks/2024-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/README.md b/resource-manager/databricks/2024-05-01/privatelinkresources/README.md index 2076df49ac0..d470b5f710a 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/README.md +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/client.go b/resource-manager/databricks/2024-05-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/client.go +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/databricks/2024-05-01/privatelinkresources/id_privatelinkresource.go index bd946e8a4ea..8e953359b4f 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/id_workspace.go b/resource-manager/databricks/2024-05-01/privatelinkresources/id_workspace.go index f74868d63e3..4006059458a 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/id_workspace.go +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/method_get.go b/resource-manager/databricks/2024-05-01/privatelinkresources/method_get.go index e8de18c1783..befd7af3800 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/method_get.go +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/privatelinkresources/version.go b/resource-manager/databricks/2024-05-01/privatelinkresources/version.go index 14d0bb2a379..901bca12605 100644 --- a/resource-manager/databricks/2024-05-01/privatelinkresources/version.go +++ b/resource-manager/databricks/2024-05-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/put/README.md b/resource-manager/databricks/2024-05-01/put/README.md index 98cca7c04b5..da4d91aeefa 100644 --- a/resource-manager/databricks/2024-05-01/put/README.md +++ b/resource-manager/databricks/2024-05-01/put/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/put` Documentation -The `put` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `put` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/put/client.go b/resource-manager/databricks/2024-05-01/put/client.go index 6f8700864e0..54fb640a8e1 100644 --- a/resource-manager/databricks/2024-05-01/put/client.go +++ b/resource-manager/databricks/2024-05-01/put/client.go @@ -15,7 +15,7 @@ type PUTClient struct { } func NewPUTClientWithBaseURI(sdkApi sdkEnv.Api) (*PUTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "put", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "put", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PUTClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/put/id_privateendpointconnection.go b/resource-manager/databricks/2024-05-01/put/id_privateendpointconnection.go index 808bfd0f9af..fcb658bf860 100644 --- a/resource-manager/databricks/2024-05-01/put/id_privateendpointconnection.go +++ b/resource-manager/databricks/2024-05-01/put/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/put/version.go b/resource-manager/databricks/2024-05-01/put/version.go index d853a9d353b..bd79045b51a 100644 --- a/resource-manager/databricks/2024-05-01/put/version.go +++ b/resource-manager/databricks/2024-05-01/put/version.go @@ -1,12 +1,10 @@ package put -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/put/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/put/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/README.md b/resource-manager/databricks/2024-05-01/vnetpeering/README.md index 65527a7b990..9f660ddb76e 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/README.md +++ b/resource-manager/databricks/2024-05-01/vnetpeering/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/vnetpeering` Documentation -The `vnetpeering` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `vnetpeering` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/client.go b/resource-manager/databricks/2024-05-01/vnetpeering/client.go index 32828af1493..5b85b9745b0 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/client.go +++ b/resource-manager/databricks/2024-05-01/vnetpeering/client.go @@ -15,7 +15,7 @@ type VNetPeeringClient struct { } func NewVNetPeeringClientWithBaseURI(sdkApi sdkEnv.Api) (*VNetPeeringClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vnetpeering", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vnetpeering", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VNetPeeringClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go b/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go index c69b815cd85..a5fdbb11514 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go +++ b/resource-manager/databricks/2024-05-01/vnetpeering/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go b/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go index 763c748e5e4..ac92e4f2a2c 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go +++ b/resource-manager/databricks/2024-05-01/vnetpeering/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go b/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go index 7a39c3f6b64..af52e4b4637 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go +++ b/resource-manager/databricks/2024-05-01/vnetpeering/method_get.go @@ -46,7 +46,6 @@ func (c VNetPeeringClient) Get(ctx context.Context, id VirtualNetworkPeeringId) var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/vnetpeering/version.go b/resource-manager/databricks/2024-05-01/vnetpeering/version.go index 9dfae6e7ab0..9f2b6c170a0 100644 --- a/resource-manager/databricks/2024-05-01/vnetpeering/version.go +++ b/resource-manager/databricks/2024-05-01/vnetpeering/version.go @@ -1,12 +1,10 @@ package vnetpeering -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vnetpeering/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vnetpeering/2024-05-01" } diff --git a/resource-manager/databricks/2024-05-01/workspaces/README.md b/resource-manager/databricks/2024-05-01/workspaces/README.md index edfa240488e..d297cf23505 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/README.md +++ b/resource-manager/databricks/2024-05-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/databricks/2024-05-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `databricks` (API Version `2024-05-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `databricks` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/databricks/2024-05-01/workspaces/client.go b/resource-manager/databricks/2024-05-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/client.go +++ b/resource-manager/databricks/2024-05-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go b/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go index 815bf37d843..2f87a915519 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go +++ b/resource-manager/databricks/2024-05-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/databricks/2024-05-01/workspaces/method_delete.go b/resource-manager/databricks/2024-05-01/workspaces/method_delete.go index 35366130e75..a5714b20575 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/method_delete.go +++ b/resource-manager/databricks/2024-05-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/databricks/2024-05-01/workspaces/method_get.go b/resource-manager/databricks/2024-05-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/method_get.go +++ b/resource-manager/databricks/2024-05-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/databricks/2024-05-01/workspaces/version.go b/resource-manager/databricks/2024-05-01/workspaces/version.go index 743af8d4e07..f974340b5a2 100644 --- a/resource-manager/databricks/2024-05-01/workspaces/version.go +++ b/resource-manager/databricks/2024-05-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-05-01" } diff --git a/resource-manager/datadog/2021-03-01/agreements/README.md b/resource-manager/datadog/2021-03-01/agreements/README.md index 90529f8a202..51a9b76a9a8 100644 --- a/resource-manager/datadog/2021-03-01/agreements/README.md +++ b/resource-manager/datadog/2021-03-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/agreements/client.go b/resource-manager/datadog/2021-03-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/datadog/2021-03-01/agreements/client.go +++ b/resource-manager/datadog/2021-03-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/agreements/method_marketplaceagreementscreateorupdate.go b/resource-manager/datadog/2021-03-01/agreements/method_marketplaceagreementscreateorupdate.go index afd0beed1c8..6deef30408d 100644 --- a/resource-manager/datadog/2021-03-01/agreements/method_marketplaceagreementscreateorupdate.go +++ b/resource-manager/datadog/2021-03-01/agreements/method_marketplaceagreementscreateorupdate.go @@ -51,7 +51,6 @@ func (c AgreementsClient) MarketplaceAgreementsCreateOrUpdate(ctx context.Contex var model DatadogAgreementResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/agreements/version.go b/resource-manager/datadog/2021-03-01/agreements/version.go index 5fa9fe63de1..d7296ba38c3 100644 --- a/resource-manager/datadog/2021-03-01/agreements/version.go +++ b/resource-manager/datadog/2021-03-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/apikey/README.md b/resource-manager/datadog/2021-03-01/apikey/README.md index ff9ff00d393..2448fe3c9f4 100644 --- a/resource-manager/datadog/2021-03-01/apikey/README.md +++ b/resource-manager/datadog/2021-03-01/apikey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/apikey` Documentation -The `apikey` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `apikey` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/apikey/client.go b/resource-manager/datadog/2021-03-01/apikey/client.go index ed977c4ea4e..94ca415d9d6 100644 --- a/resource-manager/datadog/2021-03-01/apikey/client.go +++ b/resource-manager/datadog/2021-03-01/apikey/client.go @@ -15,7 +15,7 @@ type ApiKeyClient struct { } func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apikey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/apikey/id_monitor.go b/resource-manager/datadog/2021-03-01/apikey/id_monitor.go index 6683067dcfc..e971c6c14aa 100644 --- a/resource-manager/datadog/2021-03-01/apikey/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/apikey/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/apikey/method_monitorsgetdefaultkey.go b/resource-manager/datadog/2021-03-01/apikey/method_monitorsgetdefaultkey.go index 2fba36a9c41..d17df22f1b4 100644 --- a/resource-manager/datadog/2021-03-01/apikey/method_monitorsgetdefaultkey.go +++ b/resource-manager/datadog/2021-03-01/apikey/method_monitorsgetdefaultkey.go @@ -46,7 +46,6 @@ func (c ApiKeyClient) MonitorsGetDefaultKey(ctx context.Context, id MonitorId) ( var model DatadogApiKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/apikey/version.go b/resource-manager/datadog/2021-03-01/apikey/version.go index 0cd56849d75..2d0aa321a8f 100644 --- a/resource-manager/datadog/2021-03-01/apikey/version.go +++ b/resource-manager/datadog/2021-03-01/apikey/version.go @@ -1,12 +1,10 @@ package apikey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apikey/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/hosts/README.md b/resource-manager/datadog/2021-03-01/hosts/README.md index ed3fbc5189c..22ab508223b 100644 --- a/resource-manager/datadog/2021-03-01/hosts/README.md +++ b/resource-manager/datadog/2021-03-01/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `hosts` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/hosts/client.go b/resource-manager/datadog/2021-03-01/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/datadog/2021-03-01/hosts/client.go +++ b/resource-manager/datadog/2021-03-01/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/hosts/id_monitor.go b/resource-manager/datadog/2021-03-01/hosts/id_monitor.go index 58ec8051794..81756a05111 100644 --- a/resource-manager/datadog/2021-03-01/hosts/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/hosts/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/hosts/version.go b/resource-manager/datadog/2021-03-01/hosts/version.go index 25bf521dbae..a011e402098 100644 --- a/resource-manager/datadog/2021-03-01/hosts/version.go +++ b/resource-manager/datadog/2021-03-01/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/linkedresources/README.md b/resource-manager/datadog/2021-03-01/linkedresources/README.md index e8bbd35345e..6c8e6bde1ec 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/README.md +++ b/resource-manager/datadog/2021-03-01/linkedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/linkedresources` Documentation -The `linkedresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `linkedresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/linkedresources/client.go b/resource-manager/datadog/2021-03-01/linkedresources/client.go index b796d625158..3def6afad30 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/client.go +++ b/resource-manager/datadog/2021-03-01/linkedresources/client.go @@ -15,7 +15,7 @@ type LinkedResourcesClient struct { } func NewLinkedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go b/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go index a49eaa651a7..e96ddfd7faa 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/linkedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/linkedresources/version.go b/resource-manager/datadog/2021-03-01/linkedresources/version.go index 0c8113d2b5b..c243fa4b15c 100644 --- a/resource-manager/datadog/2021-03-01/linkedresources/version.go +++ b/resource-manager/datadog/2021-03-01/linkedresources/version.go @@ -1,12 +1,10 @@ package linkedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedresources/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/README.md b/resource-manager/datadog/2021-03-01/monitoredresources/README.md index 9efc2cdc6c4..803a2d56a49 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/README.md +++ b/resource-manager/datadog/2021-03-01/monitoredresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitoredresources` Documentation -The `monitoredresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `monitoredresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/client.go b/resource-manager/datadog/2021-03-01/monitoredresources/client.go index 68ce9836cd7..8548ed2734d 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/client.go +++ b/resource-manager/datadog/2021-03-01/monitoredresources/client.go @@ -15,7 +15,7 @@ type MonitoredResourcesClient struct { } func NewMonitoredResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go b/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go index f3b55f0261f..1c9453ff16b 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/monitoredresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/monitoredresources/version.go b/resource-manager/datadog/2021-03-01/monitoredresources/version.go index b631fbd65d5..3f9bba8e1c5 100644 --- a/resource-manager/datadog/2021-03-01/monitoredresources/version.go +++ b/resource-manager/datadog/2021-03-01/monitoredresources/version.go @@ -1,12 +1,10 @@ package monitoredresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredresources/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/monitorsresource/README.md b/resource-manager/datadog/2021-03-01/monitorsresource/README.md index 72f406547f0..8e175b685ae 100644 --- a/resource-manager/datadog/2021-03-01/monitorsresource/README.md +++ b/resource-manager/datadog/2021-03-01/monitorsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/monitorsresource` Documentation -The `monitorsresource` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `monitorsresource` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/monitorsresource/client.go b/resource-manager/datadog/2021-03-01/monitorsresource/client.go index be6f7acb94b..5e8ae38cada 100644 --- a/resource-manager/datadog/2021-03-01/monitorsresource/client.go +++ b/resource-manager/datadog/2021-03-01/monitorsresource/client.go @@ -15,7 +15,7 @@ type MonitorsResourceClient struct { } func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsResourceClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go b/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go index c701aa84c41..2e1b9094503 100644 --- a/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/monitorsresource/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/monitorsresource/method_monitorsget.go b/resource-manager/datadog/2021-03-01/monitorsresource/method_monitorsget.go index ce85abc6cac..221cbce6132 100644 --- a/resource-manager/datadog/2021-03-01/monitorsresource/method_monitorsget.go +++ b/resource-manager/datadog/2021-03-01/monitorsresource/method_monitorsget.go @@ -45,7 +45,6 @@ func (c MonitorsResourceClient) MonitorsGet(ctx context.Context, id MonitorId) ( var model DatadogMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/monitorsresource/version.go b/resource-manager/datadog/2021-03-01/monitorsresource/version.go index 71b9e8ba542..851801c6a76 100644 --- a/resource-manager/datadog/2021-03-01/monitorsresource/version.go +++ b/resource-manager/datadog/2021-03-01/monitorsresource/version.go @@ -1,12 +1,10 @@ package monitorsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorsresource/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/README.md b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/README.md index 9fa7c636182..d0c15ceb27b 100644 --- a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/README.md +++ b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/refreshsetpasswordlink` Documentation -The `refreshsetpasswordlink` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `refreshsetpasswordlink` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/client.go b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/client.go index 89c88e0c4d7..c765560ae22 100644 --- a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/client.go +++ b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/client.go @@ -15,7 +15,7 @@ type RefreshSetPasswordLinkClient struct { } func NewRefreshSetPasswordLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*RefreshSetPasswordLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RefreshSetPasswordLinkClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go index 30dab040638..e14cfe2fc3c 100644 --- a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go index e7e555f3481..bc543edfd95 100644 --- a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go +++ b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go @@ -46,7 +46,6 @@ func (c RefreshSetPasswordLinkClient) MonitorsRefreshSetPasswordLink(ctx context var model DatadogSetPasswordLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/version.go b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/version.go index 98842ce0c5e..a8107dafb5c 100644 --- a/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/version.go +++ b/resource-manager/datadog/2021-03-01/refreshsetpasswordlink/version.go @@ -1,12 +1,10 @@ package refreshsetpasswordlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/refreshsetpasswordlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/refreshsetpasswordlink/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/rules/README.md b/resource-manager/datadog/2021-03-01/rules/README.md index 8cddfe9f70e..a12f9af17a9 100644 --- a/resource-manager/datadog/2021-03-01/rules/README.md +++ b/resource-manager/datadog/2021-03-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/rules/client.go b/resource-manager/datadog/2021-03-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/datadog/2021-03-01/rules/client.go +++ b/resource-manager/datadog/2021-03-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/rules/id_monitor.go b/resource-manager/datadog/2021-03-01/rules/id_monitor.go index 48be788a5ec..14e0b0a20d3 100644 --- a/resource-manager/datadog/2021-03-01/rules/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/rules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/rules/id_tagrule.go b/resource-manager/datadog/2021-03-01/rules/id_tagrule.go index 04f72287de1..ca9e3a29d0b 100644 --- a/resource-manager/datadog/2021-03-01/rules/id_tagrule.go +++ b/resource-manager/datadog/2021-03-01/rules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/rules/method_tagrulescreateorupdate.go b/resource-manager/datadog/2021-03-01/rules/method_tagrulescreateorupdate.go index fcb1b93a265..5ddded602ce 100644 --- a/resource-manager/datadog/2021-03-01/rules/method_tagrulescreateorupdate.go +++ b/resource-manager/datadog/2021-03-01/rules/method_tagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, i var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/rules/method_tagrulesget.go b/resource-manager/datadog/2021-03-01/rules/method_tagrulesget.go index 680b675fa8b..86d73a88c56 100644 --- a/resource-manager/datadog/2021-03-01/rules/method_tagrulesget.go +++ b/resource-manager/datadog/2021-03-01/rules/method_tagrulesget.go @@ -45,7 +45,6 @@ func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagR var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/rules/version.go b/resource-manager/datadog/2021-03-01/rules/version.go index 9cc99e8fb4d..e10a568030e 100644 --- a/resource-manager/datadog/2021-03-01/rules/version.go +++ b/resource-manager/datadog/2021-03-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2021-03-01" } diff --git a/resource-manager/datadog/2021-03-01/singlesignon/README.md b/resource-manager/datadog/2021-03-01/singlesignon/README.md index 25a97346eaa..48d5260de20 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/README.md +++ b/resource-manager/datadog/2021-03-01/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2021-03-01/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2021-03-01`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2021-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2021-03-01/singlesignon/client.go b/resource-manager/datadog/2021-03-01/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/client.go +++ b/resource-manager/datadog/2021-03-01/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go b/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go index 3aa6da451ea..c45eea4fa50 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go +++ b/resource-manager/datadog/2021-03-01/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go b/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go index 7682e6135d2..38e5e916227 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/datadog/2021-03-01/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2021-03-01/singlesignon/method_configurationsget.go b/resource-manager/datadog/2021-03-01/singlesignon/method_configurationsget.go index 60e9df02c41..73ab9b27853 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/method_configurationsget.go +++ b/resource-manager/datadog/2021-03-01/singlesignon/method_configurationsget.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) ConfigurationsGet(ctx context.Context, id SingleSign var model DatadogSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2021-03-01/singlesignon/version.go b/resource-manager/datadog/2021-03-01/singlesignon/version.go index 00596ebe683..9fc4e65d7b5 100644 --- a/resource-manager/datadog/2021-03-01/singlesignon/version.go +++ b/resource-manager/datadog/2021-03-01/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2021-03-01" } diff --git a/resource-manager/datadog/2022-06-01/agreements/README.md b/resource-manager/datadog/2022-06-01/agreements/README.md index 95fbec032e0..bb494fbc119 100644 --- a/resource-manager/datadog/2022-06-01/agreements/README.md +++ b/resource-manager/datadog/2022-06-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/agreements/client.go b/resource-manager/datadog/2022-06-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/datadog/2022-06-01/agreements/client.go +++ b/resource-manager/datadog/2022-06-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/agreements/method_marketplaceagreementscreateorupdate.go b/resource-manager/datadog/2022-06-01/agreements/method_marketplaceagreementscreateorupdate.go index afd0beed1c8..6deef30408d 100644 --- a/resource-manager/datadog/2022-06-01/agreements/method_marketplaceagreementscreateorupdate.go +++ b/resource-manager/datadog/2022-06-01/agreements/method_marketplaceagreementscreateorupdate.go @@ -51,7 +51,6 @@ func (c AgreementsClient) MarketplaceAgreementsCreateOrUpdate(ctx context.Contex var model DatadogAgreementResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/agreements/version.go b/resource-manager/datadog/2022-06-01/agreements/version.go index f3df97f65cf..3d8bf46376c 100644 --- a/resource-manager/datadog/2022-06-01/agreements/version.go +++ b/resource-manager/datadog/2022-06-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/apikey/README.md b/resource-manager/datadog/2022-06-01/apikey/README.md index dd240c2cf36..422b08ff9f6 100644 --- a/resource-manager/datadog/2022-06-01/apikey/README.md +++ b/resource-manager/datadog/2022-06-01/apikey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/apikey` Documentation -The `apikey` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `apikey` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/apikey/client.go b/resource-manager/datadog/2022-06-01/apikey/client.go index ed977c4ea4e..94ca415d9d6 100644 --- a/resource-manager/datadog/2022-06-01/apikey/client.go +++ b/resource-manager/datadog/2022-06-01/apikey/client.go @@ -15,7 +15,7 @@ type ApiKeyClient struct { } func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apikey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/apikey/id_monitor.go b/resource-manager/datadog/2022-06-01/apikey/id_monitor.go index 6683067dcfc..e971c6c14aa 100644 --- a/resource-manager/datadog/2022-06-01/apikey/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/apikey/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/apikey/method_monitorsgetdefaultkey.go b/resource-manager/datadog/2022-06-01/apikey/method_monitorsgetdefaultkey.go index 2fba36a9c41..d17df22f1b4 100644 --- a/resource-manager/datadog/2022-06-01/apikey/method_monitorsgetdefaultkey.go +++ b/resource-manager/datadog/2022-06-01/apikey/method_monitorsgetdefaultkey.go @@ -46,7 +46,6 @@ func (c ApiKeyClient) MonitorsGetDefaultKey(ctx context.Context, id MonitorId) ( var model DatadogApiKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/apikey/version.go b/resource-manager/datadog/2022-06-01/apikey/version.go index 1135a5bd2da..601503f406f 100644 --- a/resource-manager/datadog/2022-06-01/apikey/version.go +++ b/resource-manager/datadog/2022-06-01/apikey/version.go @@ -1,12 +1,10 @@ package apikey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apikey/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/hosts/README.md b/resource-manager/datadog/2022-06-01/hosts/README.md index fd6d29e2f6e..ad4c58dff2d 100644 --- a/resource-manager/datadog/2022-06-01/hosts/README.md +++ b/resource-manager/datadog/2022-06-01/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `hosts` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/hosts/client.go b/resource-manager/datadog/2022-06-01/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/datadog/2022-06-01/hosts/client.go +++ b/resource-manager/datadog/2022-06-01/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/hosts/id_monitor.go b/resource-manager/datadog/2022-06-01/hosts/id_monitor.go index 58ec8051794..81756a05111 100644 --- a/resource-manager/datadog/2022-06-01/hosts/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/hosts/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/hosts/version.go b/resource-manager/datadog/2022-06-01/hosts/version.go index 93c8a10066e..9bfcf95961a 100644 --- a/resource-manager/datadog/2022-06-01/hosts/version.go +++ b/resource-manager/datadog/2022-06-01/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/linkedresources/README.md b/resource-manager/datadog/2022-06-01/linkedresources/README.md index 61c8cb22695..338d4c53fab 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/README.md +++ b/resource-manager/datadog/2022-06-01/linkedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/linkedresources` Documentation -The `linkedresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `linkedresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/linkedresources/client.go b/resource-manager/datadog/2022-06-01/linkedresources/client.go index b796d625158..3def6afad30 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/client.go +++ b/resource-manager/datadog/2022-06-01/linkedresources/client.go @@ -15,7 +15,7 @@ type LinkedResourcesClient struct { } func NewLinkedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/linkedresources/id_monitor.go b/resource-manager/datadog/2022-06-01/linkedresources/id_monitor.go index a49eaa651a7..e96ddfd7faa 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/linkedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/linkedresources/version.go b/resource-manager/datadog/2022-06-01/linkedresources/version.go index 305adec42f0..2bda2bfcb76 100644 --- a/resource-manager/datadog/2022-06-01/linkedresources/version.go +++ b/resource-manager/datadog/2022-06-01/linkedresources/version.go @@ -1,12 +1,10 @@ package linkedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedresources/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/README.md b/resource-manager/datadog/2022-06-01/monitoredresources/README.md index a5303fac71b..53c436c4d5d 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/README.md +++ b/resource-manager/datadog/2022-06-01/monitoredresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/monitoredresources` Documentation -The `monitoredresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `monitoredresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/client.go b/resource-manager/datadog/2022-06-01/monitoredresources/client.go index 68ce9836cd7..8548ed2734d 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/client.go +++ b/resource-manager/datadog/2022-06-01/monitoredresources/client.go @@ -15,7 +15,7 @@ type MonitoredResourcesClient struct { } func NewMonitoredResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/id_monitor.go b/resource-manager/datadog/2022-06-01/monitoredresources/id_monitor.go index f3b55f0261f..1c9453ff16b 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/monitoredresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/monitoredresources/version.go b/resource-manager/datadog/2022-06-01/monitoredresources/version.go index 21924af66ae..0e6ee9211ef 100644 --- a/resource-manager/datadog/2022-06-01/monitoredresources/version.go +++ b/resource-manager/datadog/2022-06-01/monitoredresources/version.go @@ -1,12 +1,10 @@ package monitoredresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredresources/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/monitorsresource/README.md b/resource-manager/datadog/2022-06-01/monitorsresource/README.md index f156017c9c1..571f066a0f9 100644 --- a/resource-manager/datadog/2022-06-01/monitorsresource/README.md +++ b/resource-manager/datadog/2022-06-01/monitorsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/monitorsresource` Documentation -The `monitorsresource` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `monitorsresource` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/monitorsresource/client.go b/resource-manager/datadog/2022-06-01/monitorsresource/client.go index be6f7acb94b..5e8ae38cada 100644 --- a/resource-manager/datadog/2022-06-01/monitorsresource/client.go +++ b/resource-manager/datadog/2022-06-01/monitorsresource/client.go @@ -15,7 +15,7 @@ type MonitorsResourceClient struct { } func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsResourceClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/monitorsresource/id_monitor.go b/resource-manager/datadog/2022-06-01/monitorsresource/id_monitor.go index c701aa84c41..2e1b9094503 100644 --- a/resource-manager/datadog/2022-06-01/monitorsresource/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/monitorsresource/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/monitorsresource/method_monitorsget.go b/resource-manager/datadog/2022-06-01/monitorsresource/method_monitorsget.go index ce85abc6cac..221cbce6132 100644 --- a/resource-manager/datadog/2022-06-01/monitorsresource/method_monitorsget.go +++ b/resource-manager/datadog/2022-06-01/monitorsresource/method_monitorsget.go @@ -45,7 +45,6 @@ func (c MonitorsResourceClient) MonitorsGet(ctx context.Context, id MonitorId) ( var model DatadogMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/monitorsresource/version.go b/resource-manager/datadog/2022-06-01/monitorsresource/version.go index 53a0a8e9741..8fe2a858530 100644 --- a/resource-manager/datadog/2022-06-01/monitorsresource/version.go +++ b/resource-manager/datadog/2022-06-01/monitorsresource/version.go @@ -1,12 +1,10 @@ package monitorsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorsresource/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/README.md b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/README.md index 6848ea454ad..7989724328e 100644 --- a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/README.md +++ b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/refreshsetpasswordlink` Documentation -The `refreshsetpasswordlink` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `refreshsetpasswordlink` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/client.go b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/client.go index 89c88e0c4d7..c765560ae22 100644 --- a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/client.go +++ b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/client.go @@ -15,7 +15,7 @@ type RefreshSetPasswordLinkClient struct { } func NewRefreshSetPasswordLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*RefreshSetPasswordLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RefreshSetPasswordLinkClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/id_monitor.go b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/id_monitor.go index 30dab040638..e14cfe2fc3c 100644 --- a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go index e7e555f3481..bc543edfd95 100644 --- a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go +++ b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go @@ -46,7 +46,6 @@ func (c RefreshSetPasswordLinkClient) MonitorsRefreshSetPasswordLink(ctx context var model DatadogSetPasswordLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/version.go b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/version.go index cd3bfc4213e..8fed0972a74 100644 --- a/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/version.go +++ b/resource-manager/datadog/2022-06-01/refreshsetpasswordlink/version.go @@ -1,12 +1,10 @@ package refreshsetpasswordlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/refreshsetpasswordlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/refreshsetpasswordlink/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/rules/README.md b/resource-manager/datadog/2022-06-01/rules/README.md index 0033a03690b..e746b474a55 100644 --- a/resource-manager/datadog/2022-06-01/rules/README.md +++ b/resource-manager/datadog/2022-06-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/rules/client.go b/resource-manager/datadog/2022-06-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/datadog/2022-06-01/rules/client.go +++ b/resource-manager/datadog/2022-06-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/rules/id_monitor.go b/resource-manager/datadog/2022-06-01/rules/id_monitor.go index 48be788a5ec..14e0b0a20d3 100644 --- a/resource-manager/datadog/2022-06-01/rules/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/rules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/rules/id_tagrule.go b/resource-manager/datadog/2022-06-01/rules/id_tagrule.go index 04f72287de1..ca9e3a29d0b 100644 --- a/resource-manager/datadog/2022-06-01/rules/id_tagrule.go +++ b/resource-manager/datadog/2022-06-01/rules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/rules/method_tagrulescreateorupdate.go b/resource-manager/datadog/2022-06-01/rules/method_tagrulescreateorupdate.go index fcb1b93a265..5ddded602ce 100644 --- a/resource-manager/datadog/2022-06-01/rules/method_tagrulescreateorupdate.go +++ b/resource-manager/datadog/2022-06-01/rules/method_tagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, i var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/rules/method_tagrulesget.go b/resource-manager/datadog/2022-06-01/rules/method_tagrulesget.go index 680b675fa8b..86d73a88c56 100644 --- a/resource-manager/datadog/2022-06-01/rules/method_tagrulesget.go +++ b/resource-manager/datadog/2022-06-01/rules/method_tagrulesget.go @@ -45,7 +45,6 @@ func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagR var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/rules/version.go b/resource-manager/datadog/2022-06-01/rules/version.go index 2187bd17bab..ac17072042d 100644 --- a/resource-manager/datadog/2022-06-01/rules/version.go +++ b/resource-manager/datadog/2022-06-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2022-06-01" } diff --git a/resource-manager/datadog/2022-06-01/singlesignon/README.md b/resource-manager/datadog/2022-06-01/singlesignon/README.md index db0efa608ac..992a52a2e42 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/README.md +++ b/resource-manager/datadog/2022-06-01/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2022-06-01/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2022-06-01`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2022-06-01/singlesignon/client.go b/resource-manager/datadog/2022-06-01/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/client.go +++ b/resource-manager/datadog/2022-06-01/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/datadog/2022-06-01/singlesignon/id_monitor.go b/resource-manager/datadog/2022-06-01/singlesignon/id_monitor.go index 3aa6da451ea..c45eea4fa50 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/id_monitor.go +++ b/resource-manager/datadog/2022-06-01/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/singlesignon/id_singlesignonconfiguration.go b/resource-manager/datadog/2022-06-01/singlesignon/id_singlesignonconfiguration.go index 7682e6135d2..38e5e916227 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/datadog/2022-06-01/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2022-06-01/singlesignon/method_configurationsget.go b/resource-manager/datadog/2022-06-01/singlesignon/method_configurationsget.go index 60e9df02c41..73ab9b27853 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/method_configurationsget.go +++ b/resource-manager/datadog/2022-06-01/singlesignon/method_configurationsget.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) ConfigurationsGet(ctx context.Context, id SingleSign var model DatadogSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2022-06-01/singlesignon/version.go b/resource-manager/datadog/2022-06-01/singlesignon/version.go index dca3fe43de1..8395105cdeb 100644 --- a/resource-manager/datadog/2022-06-01/singlesignon/version.go +++ b/resource-manager/datadog/2022-06-01/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2022-06-01" } diff --git a/resource-manager/datadog/2023-01-01/agreements/README.md b/resource-manager/datadog/2023-01-01/agreements/README.md index eb94de927be..ad56f5887f9 100644 --- a/resource-manager/datadog/2023-01-01/agreements/README.md +++ b/resource-manager/datadog/2023-01-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/agreements/client.go b/resource-manager/datadog/2023-01-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/datadog/2023-01-01/agreements/client.go +++ b/resource-manager/datadog/2023-01-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/agreements/method_marketplaceagreementscreateorupdate.go b/resource-manager/datadog/2023-01-01/agreements/method_marketplaceagreementscreateorupdate.go index afd0beed1c8..6deef30408d 100644 --- a/resource-manager/datadog/2023-01-01/agreements/method_marketplaceagreementscreateorupdate.go +++ b/resource-manager/datadog/2023-01-01/agreements/method_marketplaceagreementscreateorupdate.go @@ -51,7 +51,6 @@ func (c AgreementsClient) MarketplaceAgreementsCreateOrUpdate(ctx context.Contex var model DatadogAgreementResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/agreements/version.go b/resource-manager/datadog/2023-01-01/agreements/version.go index 3ea8107983a..70ece111914 100644 --- a/resource-manager/datadog/2023-01-01/agreements/version.go +++ b/resource-manager/datadog/2023-01-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/apikey/README.md b/resource-manager/datadog/2023-01-01/apikey/README.md index e3646775c4b..7a4a2b87bd4 100644 --- a/resource-manager/datadog/2023-01-01/apikey/README.md +++ b/resource-manager/datadog/2023-01-01/apikey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/apikey` Documentation -The `apikey` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `apikey` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/apikey/client.go b/resource-manager/datadog/2023-01-01/apikey/client.go index ed977c4ea4e..94ca415d9d6 100644 --- a/resource-manager/datadog/2023-01-01/apikey/client.go +++ b/resource-manager/datadog/2023-01-01/apikey/client.go @@ -15,7 +15,7 @@ type ApiKeyClient struct { } func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apikey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/apikey/id_monitor.go b/resource-manager/datadog/2023-01-01/apikey/id_monitor.go index 6683067dcfc..e971c6c14aa 100644 --- a/resource-manager/datadog/2023-01-01/apikey/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/apikey/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/apikey/method_monitorsgetdefaultkey.go b/resource-manager/datadog/2023-01-01/apikey/method_monitorsgetdefaultkey.go index 2fba36a9c41..d17df22f1b4 100644 --- a/resource-manager/datadog/2023-01-01/apikey/method_monitorsgetdefaultkey.go +++ b/resource-manager/datadog/2023-01-01/apikey/method_monitorsgetdefaultkey.go @@ -46,7 +46,6 @@ func (c ApiKeyClient) MonitorsGetDefaultKey(ctx context.Context, id MonitorId) ( var model DatadogApiKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/apikey/version.go b/resource-manager/datadog/2023-01-01/apikey/version.go index a5793f38e07..6121d8e2c86 100644 --- a/resource-manager/datadog/2023-01-01/apikey/version.go +++ b/resource-manager/datadog/2023-01-01/apikey/version.go @@ -1,12 +1,10 @@ package apikey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apikey/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/createresource/README.md b/resource-manager/datadog/2023-01-01/createresource/README.md index 3af65b13c29..2ff09463f2a 100644 --- a/resource-manager/datadog/2023-01-01/createresource/README.md +++ b/resource-manager/datadog/2023-01-01/createresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/createresource` Documentation -The `createresource` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `createresource` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/createresource/client.go b/resource-manager/datadog/2023-01-01/createresource/client.go index 9f440cb102f..9647d67895d 100644 --- a/resource-manager/datadog/2023-01-01/createresource/client.go +++ b/resource-manager/datadog/2023-01-01/createresource/client.go @@ -15,7 +15,7 @@ type CreateResourceClient struct { } func NewCreateResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*CreateResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "createresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "createresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreateResourceClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedget.go b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedget.go index 4ce700da373..35efe4e9461 100644 --- a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedget.go +++ b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedget.go @@ -35,6 +35,7 @@ func (o CreationSupportedGetOperationOptions) ToHeaders() *client.Headers { func (o CreationSupportedGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CreateResourceClient) CreationSupportedGet(ctx context.Context, id commo var model CreateResourceSupportedResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go index ef5f5c5a4fa..41b7075e70f 100644 --- a/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go +++ b/resource-manager/datadog/2023-01-01/createresource/method_creationsupportedlist.go @@ -35,6 +35,7 @@ func (o CreationSupportedListOperationOptions) ToHeaders() *client.Headers { func (o CreationSupportedListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CreateResourceClient) CreationSupportedList(ctx context.Context, id comm var model CreateResourceSupportedResponseList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/createresource/version.go b/resource-manager/datadog/2023-01-01/createresource/version.go index 9f8ed76f28c..2f21eb105c1 100644 --- a/resource-manager/datadog/2023-01-01/createresource/version.go +++ b/resource-manager/datadog/2023-01-01/createresource/version.go @@ -1,12 +1,10 @@ package createresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/createresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/createresource/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/hosts/README.md b/resource-manager/datadog/2023-01-01/hosts/README.md index 38640cdc7be..65fc83579d1 100644 --- a/resource-manager/datadog/2023-01-01/hosts/README.md +++ b/resource-manager/datadog/2023-01-01/hosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/hosts` Documentation -The `hosts` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `hosts` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/hosts/client.go b/resource-manager/datadog/2023-01-01/hosts/client.go index 47294adfe7f..b8da7c2f8fd 100644 --- a/resource-manager/datadog/2023-01-01/hosts/client.go +++ b/resource-manager/datadog/2023-01-01/hosts/client.go @@ -15,7 +15,7 @@ type HostsClient struct { } func NewHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*HostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostsClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/hosts/id_monitor.go b/resource-manager/datadog/2023-01-01/hosts/id_monitor.go index 58ec8051794..81756a05111 100644 --- a/resource-manager/datadog/2023-01-01/hosts/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/hosts/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/hosts/version.go b/resource-manager/datadog/2023-01-01/hosts/version.go index 8b72d464d97..b6124abc329 100644 --- a/resource-manager/datadog/2023-01-01/hosts/version.go +++ b/resource-manager/datadog/2023-01-01/hosts/version.go @@ -1,12 +1,10 @@ package hosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hosts/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/linkedresources/README.md b/resource-manager/datadog/2023-01-01/linkedresources/README.md index 1462c7c9200..7bb96fd57af 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/README.md +++ b/resource-manager/datadog/2023-01-01/linkedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/linkedresources` Documentation -The `linkedresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `linkedresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/linkedresources/client.go b/resource-manager/datadog/2023-01-01/linkedresources/client.go index b796d625158..3def6afad30 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/client.go +++ b/resource-manager/datadog/2023-01-01/linkedresources/client.go @@ -15,7 +15,7 @@ type LinkedResourcesClient struct { } func NewLinkedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/linkedresources/id_monitor.go b/resource-manager/datadog/2023-01-01/linkedresources/id_monitor.go index a49eaa651a7..e96ddfd7faa 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/linkedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/linkedresources/version.go b/resource-manager/datadog/2023-01-01/linkedresources/version.go index b72b287284c..0f891bd70e2 100644 --- a/resource-manager/datadog/2023-01-01/linkedresources/version.go +++ b/resource-manager/datadog/2023-01-01/linkedresources/version.go @@ -1,12 +1,10 @@ package linkedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedresources/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/README.md b/resource-manager/datadog/2023-01-01/monitoredresources/README.md index 955205a67b1..52d86bb5254 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/README.md +++ b/resource-manager/datadog/2023-01-01/monitoredresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/monitoredresources` Documentation -The `monitoredresources` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `monitoredresources` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/client.go b/resource-manager/datadog/2023-01-01/monitoredresources/client.go index 68ce9836cd7..8548ed2734d 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/client.go +++ b/resource-manager/datadog/2023-01-01/monitoredresources/client.go @@ -15,7 +15,7 @@ type MonitoredResourcesClient struct { } func NewMonitoredResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredResourcesClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/id_monitor.go b/resource-manager/datadog/2023-01-01/monitoredresources/id_monitor.go index f3b55f0261f..1c9453ff16b 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/monitoredresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/monitoredresources/version.go b/resource-manager/datadog/2023-01-01/monitoredresources/version.go index 30bd4ab45d2..796f0e75577 100644 --- a/resource-manager/datadog/2023-01-01/monitoredresources/version.go +++ b/resource-manager/datadog/2023-01-01/monitoredresources/version.go @@ -1,12 +1,10 @@ package monitoredresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredresources/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md index 597605d8641..73fa0f5d466 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/monitoredsubscriptions` Documentation -The `monitoredsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `monitoredsubscriptions` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/client.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/client.go index dbbccaa87dc..3e047b7e997 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/client.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/client.go @@ -15,7 +15,7 @@ type MonitoredSubscriptionsClient struct { } func NewMonitoredSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredSubscriptionsClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitor.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitor.go index b3f09ce6aa4..b4b03cede1b 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitoredsubscription.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitoredsubscription.go index 1b061a95a66..5f1fbd4aedf 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitoredsubscription.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/id_monitoredsubscription.go @@ -44,7 +44,7 @@ func ParseMonitoredSubscriptionID(input string) (*MonitoredSubscriptionId, error } id := MonitoredSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMonitoredSubscriptionIDInsensitively(input string) (*MonitoredSubscrip } id := MonitoredSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_get.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_get.go index 5ae9cc9abc6..92e066e378c 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_get.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c MonitoredSubscriptionsClient) Get(ctx context.Context, id MonitoredSubsc var model MonitoredSubscriptionProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go index 8ff3bffa432..dc41d74e5d3 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/method_list.go @@ -46,7 +46,6 @@ func (c MonitoredSubscriptionsClient) List(ctx context.Context, id MonitorId) (r var model MonitoredSubscriptionPropertiesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/version.go b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/version.go index ccab22d1120..bc255942097 100644 --- a/resource-manager/datadog/2023-01-01/monitoredsubscriptions/version.go +++ b/resource-manager/datadog/2023-01-01/monitoredsubscriptions/version.go @@ -1,12 +1,10 @@ package monitoredsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredsubscriptions/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/monitorsresource/README.md b/resource-manager/datadog/2023-01-01/monitorsresource/README.md index a1f4a8a0f79..6b211d0b567 100644 --- a/resource-manager/datadog/2023-01-01/monitorsresource/README.md +++ b/resource-manager/datadog/2023-01-01/monitorsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/monitorsresource` Documentation -The `monitorsresource` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `monitorsresource` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/monitorsresource/client.go b/resource-manager/datadog/2023-01-01/monitorsresource/client.go index be6f7acb94b..5e8ae38cada 100644 --- a/resource-manager/datadog/2023-01-01/monitorsresource/client.go +++ b/resource-manager/datadog/2023-01-01/monitorsresource/client.go @@ -15,7 +15,7 @@ type MonitorsResourceClient struct { } func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsResourceClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/monitorsresource/id_monitor.go b/resource-manager/datadog/2023-01-01/monitorsresource/id_monitor.go index c701aa84c41..2e1b9094503 100644 --- a/resource-manager/datadog/2023-01-01/monitorsresource/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/monitorsresource/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/monitorsresource/method_monitorsget.go b/resource-manager/datadog/2023-01-01/monitorsresource/method_monitorsget.go index ce85abc6cac..221cbce6132 100644 --- a/resource-manager/datadog/2023-01-01/monitorsresource/method_monitorsget.go +++ b/resource-manager/datadog/2023-01-01/monitorsresource/method_monitorsget.go @@ -45,7 +45,6 @@ func (c MonitorsResourceClient) MonitorsGet(ctx context.Context, id MonitorId) ( var model DatadogMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/monitorsresource/version.go b/resource-manager/datadog/2023-01-01/monitorsresource/version.go index b447bfddaf3..ecdf592d44a 100644 --- a/resource-manager/datadog/2023-01-01/monitorsresource/version.go +++ b/resource-manager/datadog/2023-01-01/monitorsresource/version.go @@ -1,12 +1,10 @@ package monitorsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorsresource/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/README.md b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/README.md index 391426e5e70..12e5afcc024 100644 --- a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/README.md +++ b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/refreshsetpasswordlink` Documentation -The `refreshsetpasswordlink` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `refreshsetpasswordlink` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/client.go b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/client.go index 89c88e0c4d7..c765560ae22 100644 --- a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/client.go +++ b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/client.go @@ -15,7 +15,7 @@ type RefreshSetPasswordLinkClient struct { } func NewRefreshSetPasswordLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*RefreshSetPasswordLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "refreshsetpasswordlink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RefreshSetPasswordLinkClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/id_monitor.go b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/id_monitor.go index 30dab040638..e14cfe2fc3c 100644 --- a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go index e7e555f3481..bc543edfd95 100644 --- a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go +++ b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/method_monitorsrefreshsetpasswordlink.go @@ -46,7 +46,6 @@ func (c RefreshSetPasswordLinkClient) MonitorsRefreshSetPasswordLink(ctx context var model DatadogSetPasswordLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/version.go b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/version.go index 354aceee8bd..85e072a7931 100644 --- a/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/version.go +++ b/resource-manager/datadog/2023-01-01/refreshsetpasswordlink/version.go @@ -1,12 +1,10 @@ package refreshsetpasswordlink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/refreshsetpasswordlink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/refreshsetpasswordlink/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/rules/README.md b/resource-manager/datadog/2023-01-01/rules/README.md index 20228644bae..60020a83fc7 100644 --- a/resource-manager/datadog/2023-01-01/rules/README.md +++ b/resource-manager/datadog/2023-01-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/rules/client.go b/resource-manager/datadog/2023-01-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/datadog/2023-01-01/rules/client.go +++ b/resource-manager/datadog/2023-01-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/rules/id_monitor.go b/resource-manager/datadog/2023-01-01/rules/id_monitor.go index 48be788a5ec..14e0b0a20d3 100644 --- a/resource-manager/datadog/2023-01-01/rules/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/rules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/rules/id_tagrule.go b/resource-manager/datadog/2023-01-01/rules/id_tagrule.go index 04f72287de1..ca9e3a29d0b 100644 --- a/resource-manager/datadog/2023-01-01/rules/id_tagrule.go +++ b/resource-manager/datadog/2023-01-01/rules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/rules/method_tagrulescreateorupdate.go b/resource-manager/datadog/2023-01-01/rules/method_tagrulescreateorupdate.go index fcb1b93a265..5ddded602ce 100644 --- a/resource-manager/datadog/2023-01-01/rules/method_tagrulescreateorupdate.go +++ b/resource-manager/datadog/2023-01-01/rules/method_tagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, i var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/rules/method_tagrulesget.go b/resource-manager/datadog/2023-01-01/rules/method_tagrulesget.go index 680b675fa8b..86d73a88c56 100644 --- a/resource-manager/datadog/2023-01-01/rules/method_tagrulesget.go +++ b/resource-manager/datadog/2023-01-01/rules/method_tagrulesget.go @@ -45,7 +45,6 @@ func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagR var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/rules/version.go b/resource-manager/datadog/2023-01-01/rules/version.go index ac31f7e8767..75ba2eeea5f 100644 --- a/resource-manager/datadog/2023-01-01/rules/version.go +++ b/resource-manager/datadog/2023-01-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2023-01-01" } diff --git a/resource-manager/datadog/2023-01-01/singlesignon/README.md b/resource-manager/datadog/2023-01-01/singlesignon/README.md index 9054762e91c..69a25fe6a87 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/README.md +++ b/resource-manager/datadog/2023-01-01/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `datadog` (API Version `2023-01-01`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `datadog` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datadog/2023-01-01/singlesignon/client.go b/resource-manager/datadog/2023-01-01/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/client.go +++ b/resource-manager/datadog/2023-01-01/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/datadog/2023-01-01/singlesignon/id_monitor.go b/resource-manager/datadog/2023-01-01/singlesignon/id_monitor.go index 3aa6da451ea..c45eea4fa50 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/id_monitor.go +++ b/resource-manager/datadog/2023-01-01/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/singlesignon/id_singlesignonconfiguration.go b/resource-manager/datadog/2023-01-01/singlesignon/id_singlesignonconfiguration.go index 7682e6135d2..38e5e916227 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/datadog/2023-01-01/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datadog/2023-01-01/singlesignon/method_configurationsget.go b/resource-manager/datadog/2023-01-01/singlesignon/method_configurationsget.go index 60e9df02c41..73ab9b27853 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/method_configurationsget.go +++ b/resource-manager/datadog/2023-01-01/singlesignon/method_configurationsget.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) ConfigurationsGet(ctx context.Context, id SingleSign var model DatadogSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datadog/2023-01-01/singlesignon/version.go b/resource-manager/datadog/2023-01-01/singlesignon/version.go index 620a7d9c7a2..485542e85cd 100644 --- a/resource-manager/datadog/2023-01-01/singlesignon/version.go +++ b/resource-manager/datadog/2023-01-01/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2023-01-01" } diff --git a/resource-manager/datafactory/2018-06-01/activityruns/README.md b/resource-manager/datafactory/2018-06-01/activityruns/README.md index b8fa65cdced..6b867d96c3c 100644 --- a/resource-manager/datafactory/2018-06-01/activityruns/README.md +++ b/resource-manager/datafactory/2018-06-01/activityruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/activityruns` Documentation -The `activityruns` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `activityruns` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/activityruns/client.go b/resource-manager/datafactory/2018-06-01/activityruns/client.go index 1a3ac16c087..090aa889c59 100644 --- a/resource-manager/datafactory/2018-06-01/activityruns/client.go +++ b/resource-manager/datafactory/2018-06-01/activityruns/client.go @@ -15,7 +15,7 @@ type ActivityrunsClient struct { } func NewActivityrunsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityrunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activityruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activityruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityrunsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/activityruns/id_pipelinerun.go b/resource-manager/datafactory/2018-06-01/activityruns/id_pipelinerun.go index 803e646698f..9a97a513a55 100644 --- a/resource-manager/datafactory/2018-06-01/activityruns/id_pipelinerun.go +++ b/resource-manager/datafactory/2018-06-01/activityruns/id_pipelinerun.go @@ -44,7 +44,7 @@ func ParsePipelineRunID(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePipelineRunIDInsensitively(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/activityruns/method_querybypipelinerun.go b/resource-manager/datafactory/2018-06-01/activityruns/method_querybypipelinerun.go index aef60f2d99b..30f384ff45e 100644 --- a/resource-manager/datafactory/2018-06-01/activityruns/method_querybypipelinerun.go +++ b/resource-manager/datafactory/2018-06-01/activityruns/method_querybypipelinerun.go @@ -50,7 +50,6 @@ func (c ActivityrunsClient) QueryByPipelineRun(ctx context.Context, id PipelineR var model ActivityRunsQueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/activityruns/version.go b/resource-manager/datafactory/2018-06-01/activityruns/version.go index 413d77d56b7..c6d88d17b24 100644 --- a/resource-manager/datafactory/2018-06-01/activityruns/version.go +++ b/resource-manager/datafactory/2018-06-01/activityruns/version.go @@ -1,12 +1,10 @@ package activityruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activityruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activityruns/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/README.md b/resource-manager/datafactory/2018-06-01/changedatacapture/README.md index 85ba98efdc2..a49796f5e00 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/README.md +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/changedatacapture` Documentation -The `changedatacapture` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `changedatacapture` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/client.go b/resource-manager/datafactory/2018-06-01/changedatacapture/client.go index c6e71f27d12..d59402c5737 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/client.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/client.go @@ -15,7 +15,7 @@ type ChangeDataCaptureClient struct { } func NewChangeDataCaptureClientWithBaseURI(sdkApi sdkEnv.Api) (*ChangeDataCaptureClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "changedatacapture", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "changedatacapture", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChangeDataCaptureClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/id_adfcdc.go b/resource-manager/datafactory/2018-06-01/changedatacapture/id_adfcdc.go index 59ca3fefc3b..1c2b898d689 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/id_adfcdc.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/id_adfcdc.go @@ -44,7 +44,7 @@ func ParseAdfcdcID(input string) (*AdfcdcId, error) { } id := AdfcdcId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdfcdcIDInsensitively(input string) (*AdfcdcId, error) { } id := AdfcdcId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/id_factory.go b/resource-manager/datafactory/2018-06-01/changedatacapture/id_factory.go index 564f725c2d5..2eda704ca37 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/changedatacapture/method_createorupdate.go index a6ece91ad33..897781e7a4f 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ChangeDataCaptureClient) CreateOrUpdate(ctx context.Context, id AdfcdcId var model ChangeDataCaptureResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/method_get.go b/resource-manager/datafactory/2018-06-01/changedatacapture/method_get.go index 4acb9b87c68..b4fd21bd544 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/method_get.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ChangeDataCaptureClient) Get(ctx context.Context, id AdfcdcId, options G var model ChangeDataCaptureResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/method_status.go b/resource-manager/datafactory/2018-06-01/changedatacapture/method_status.go index 015979161e8..3c1eaa6bb61 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/method_status.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/method_status.go @@ -46,7 +46,6 @@ func (c ChangeDataCaptureClient) Status(ctx context.Context, id AdfcdcId) (resul var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/changedatacapture/version.go b/resource-manager/datafactory/2018-06-01/changedatacapture/version.go index 498aa0ba6bd..772534eb072 100644 --- a/resource-manager/datafactory/2018-06-01/changedatacapture/version.go +++ b/resource-manager/datafactory/2018-06-01/changedatacapture/version.go @@ -1,12 +1,10 @@ package changedatacapture -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/changedatacapture/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/changedatacapture/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/credentials/README.md b/resource-manager/datafactory/2018-06-01/credentials/README.md index ecfef7836ec..e6459019be2 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/README.md +++ b/resource-manager/datafactory/2018-06-01/credentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/credentials` Documentation -The `credentials` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `credentials` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/credentials/client.go b/resource-manager/datafactory/2018-06-01/credentials/client.go index 47d62cef53e..667909fa19e 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/client.go +++ b/resource-manager/datafactory/2018-06-01/credentials/client.go @@ -15,7 +15,7 @@ type CredentialsClient struct { } func NewCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "credentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "credentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CredentialsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/credentials/id_credential.go b/resource-manager/datafactory/2018-06-01/credentials/id_credential.go index 6721ab9a5b1..4397d09e223 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/id_credential.go +++ b/resource-manager/datafactory/2018-06-01/credentials/id_credential.go @@ -44,7 +44,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/credentials/id_factory.go b/resource-manager/datafactory/2018-06-01/credentials/id_factory.go index 1e003a168f3..3527b07dd5a 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/credentials/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationscreateorupdate.go b/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationscreateorupdate.go index eb08f80543f..faea07cb9e3 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationscreateorupdate.go +++ b/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationscreateorupdate.go @@ -36,6 +36,7 @@ func (o CredentialOperationsCreateOrUpdateOperationOptions) ToHeaders() *client. func (o CredentialOperationsCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c CredentialsClient) CredentialOperationsCreateOrUpdate(ctx context.Contex var model CredentialResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationsget.go b/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationsget.go index f61d46ae2ad..d7b235bc97e 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationsget.go +++ b/resource-manager/datafactory/2018-06-01/credentials/method_credentialoperationsget.go @@ -36,6 +36,7 @@ func (o CredentialOperationsGetOperationOptions) ToHeaders() *client.Headers { func (o CredentialOperationsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CredentialsClient) CredentialOperationsGet(ctx context.Context, id Crede var model CredentialResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_azurekeyvaultsecretreference.go b/resource-manager/datafactory/2018-06-01/credentials/model_azurekeyvaultsecretreference.go index 2dfc40f747f..9ab8ef96dfb 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_azurekeyvaultsecretreference.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_azurekeyvaultsecretreference.go @@ -16,6 +16,14 @@ type AzureKeyVaultSecretReference struct { Store LinkedServiceReference `json:"store"` // Fields inherited from SecretBase + + Type string `json:"type"` +} + +func (s AzureKeyVaultSecretReference) SecretBase() BaseSecretBaseImpl { + return BaseSecretBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultSecretReference{} @@ -29,9 +37,10 @@ func (s AzureKeyVaultSecretReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultSecretReference: %+v", err) } + decoded["type"] = "AzureKeyVaultSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_credential.go b/resource-manager/datafactory/2018-06-01/credentials/model_credential.go index 7090ed3de23..82dd2404871 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_credential.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_credential.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Credential interface { + Credential() BaseCredentialImpl } -// RawCredentialImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Credential = BaseCredentialImpl{} + +type BaseCredentialImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Type string `json:"type"` +} + +func (s BaseCredentialImpl) Credential() BaseCredentialImpl { + return s +} + +var _ Credential = RawCredentialImpl{} + +// RawCredentialImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCredentialImpl struct { - Type string - Values map[string]interface{} + credential BaseCredentialImpl + Type string + Values map[string]interface{} +} + +func (s RawCredentialImpl) Credential() BaseCredentialImpl { + return s.credential } -func unmarshalCredentialImplementation(input []byte) (Credential, error) { +func UnmarshalCredentialImplementation(input []byte) (Credential, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalCredentialImplementation(input []byte) (Credential, error) { return out, nil } - out := RawCredentialImpl{ - Type: value, - Values: temp, + var parent BaseCredentialImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCredentialImpl: %+v", err) } - return out, nil + + return RawCredentialImpl{ + credential: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_credentialresource.go b/resource-manager/datafactory/2018-06-01/credentials/model_credentialresource.go index 84cb469911d..604a811fec6 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_credentialresource.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_credentialresource.go @@ -36,7 +36,7 @@ func (s *CredentialResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalCredentialImplementation(v) + impl, err := UnmarshalCredentialImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'CredentialResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitycredential.go b/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitycredential.go index e17dc212836..0688708fd2b 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitycredential.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitycredential.go @@ -14,8 +14,18 @@ type ManagedIdentityCredential struct { TypeProperties *ManagedIdentityTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Credential + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` + Type string `json:"type"` +} + +func (s ManagedIdentityCredential) Credential() BaseCredentialImpl { + return BaseCredentialImpl{ + Annotations: s.Annotations, + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = ManagedIdentityCredential{} @@ -29,9 +39,10 @@ func (s ManagedIdentityCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentityCredential: %+v", err) } + decoded["type"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_secretbase.go b/resource-manager/datafactory/2018-06-01/credentials/model_secretbase.go index 1ddf8a889f5..f49a81ccb47 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_secretbase.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_secretbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretBase interface { + SecretBase() BaseSecretBaseImpl } -// RawSecretBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretBase = BaseSecretBaseImpl{} + +type BaseSecretBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s +} + +var _ SecretBase = RawSecretBaseImpl{} + +// RawSecretBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretBaseImpl struct { - Type string - Values map[string]interface{} + secretBase BaseSecretBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s.secretBase } -func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { +func UnmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { return out, nil } - out := RawSecretBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretBaseImpl: %+v", err) } - return out, nil + + return RawSecretBaseImpl{ + secretBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_serviceprincipalcredential.go b/resource-manager/datafactory/2018-06-01/credentials/model_serviceprincipalcredential.go index 4cd767d3bd3..53d13341529 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/model_serviceprincipalcredential.go +++ b/resource-manager/datafactory/2018-06-01/credentials/model_serviceprincipalcredential.go @@ -14,8 +14,18 @@ type ServicePrincipalCredential struct { TypeProperties ServicePrincipalCredentialTypeProperties `json:"typeProperties"` // Fields inherited from Credential + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` + Type string `json:"type"` +} + +func (s ServicePrincipalCredential) Credential() BaseCredentialImpl { + return BaseCredentialImpl{ + Annotations: s.Annotations, + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = ServicePrincipalCredential{} @@ -29,9 +39,10 @@ func (s ServicePrincipalCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCredential: %+v", err) } + decoded["type"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/credentials/version.go b/resource-manager/datafactory/2018-06-01/credentials/version.go index c75056fd9a4..ab0167cdbb9 100644 --- a/resource-manager/datafactory/2018-06-01/credentials/version.go +++ b/resource-manager/datafactory/2018-06-01/credentials/version.go @@ -1,12 +1,10 @@ package credentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/credentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/credentials/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/README.md b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/README.md index 6a138b2604d..2722430fae4 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/README.md +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/dataflowdebugsession` Documentation -The `dataflowdebugsession` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `dataflowdebugsession` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/client.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/client.go index 38da0c531f9..6fcf3471fa0 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/client.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/client.go @@ -15,7 +15,7 @@ type DataFlowDebugSessionClient struct { } func NewDataFlowDebugSessionClientWithBaseURI(sdkApi sdkEnv.Api) (*DataFlowDebugSessionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataflowdebugsession", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataflowdebugsession", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataFlowDebugSessionClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/id_factory.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/id_factory.go index 4b71214b745..3e6fe335804 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_adddataflow.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_adddataflow.go index 6e65d98b811..d14a4c22561 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_adddataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/method_adddataflow.go @@ -50,7 +50,6 @@ func (c DataFlowDebugSessionClient) AddDataFlow(ctx context.Context, id FactoryI var model AddDataFlowToDebugSessionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataflowstaginginfo.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataflowstaginginfo.go index bcd81898d66..696858252ca 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataflowstaginginfo.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataflowstaginginfo.go @@ -30,7 +30,7 @@ func (s *DataFlowStagingInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["linkedService"]; ok { - impl, err := unmarshalReferenceImplementation(v) + impl, err := UnmarshalReferenceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'LinkedService' for 'DataFlowStagingInfo': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataset.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataset.go index d29c09091e1..97ef93e4862 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataset.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_dataset.go @@ -42,7 +42,7 @@ func (s *Dataset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["linkedServiceName"]; ok { - impl, err := unmarshalReferenceImplementation(v) + impl, err := UnmarshalReferenceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'LinkedServiceName' for 'Dataset': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_integrationruntimereference.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_integrationruntimereference.go index 8cb9bab58b2..a14778984ac 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_integrationruntimereference.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_integrationruntimereference.go @@ -15,6 +15,14 @@ type IntegrationRuntimeReference struct { ReferenceName string `json:"referenceName"` // Fields inherited from Reference + + Type string `json:"type"` +} + +func (s IntegrationRuntimeReference) Reference() BaseReferenceImpl { + return BaseReferenceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IntegrationRuntimeReference{} @@ -28,9 +36,10 @@ func (s IntegrationRuntimeReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IntegrationRuntimeReference: %+v", err) } + decoded["type"] = "IntegrationRuntimeReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservice.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservice.go index 2e327fa318c..dd70ec98178 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservice.go @@ -38,7 +38,7 @@ func (s *LinkedService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["connectVia"]; ok { - impl, err := unmarshalReferenceImplementation(v) + impl, err := UnmarshalReferenceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ConnectVia' for 'LinkedService': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservicereference.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservicereference.go index fb2fbb2826a..48faa4560ae 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservicereference.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_linkedservicereference.go @@ -15,6 +15,14 @@ type LinkedServiceReference struct { ReferenceName string `json:"referenceName"` // Fields inherited from Reference + + Type string `json:"type"` +} + +func (s LinkedServiceReference) Reference() BaseReferenceImpl { + return BaseReferenceImpl{ + Type: s.Type, + } } var _ json.Marshaler = LinkedServiceReference{} @@ -28,9 +36,10 @@ func (s LinkedServiceReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinkedServiceReference: %+v", err) } + decoded["type"] = "LinkedServiceReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_reference.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_reference.go index b11e4938ca4..9a0b0c9c67a 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_reference.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/model_reference.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Reference interface { + Reference() BaseReferenceImpl } -// RawReferenceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Reference = BaseReferenceImpl{} + +type BaseReferenceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceImpl) Reference() BaseReferenceImpl { + return s +} + +var _ Reference = RawReferenceImpl{} + +// RawReferenceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceImpl struct { - Type string - Values map[string]interface{} + reference BaseReferenceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceImpl) Reference() BaseReferenceImpl { + return s.reference } -func unmarshalReferenceImplementation(input []byte) (Reference, error) { +func UnmarshalReferenceImplementation(input []byte) (Reference, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReferenceImplementation(input []byte) (Reference, error) { return out, nil } - out := RawReferenceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceImpl: %+v", err) } - return out, nil + + return RawReferenceImpl{ + reference: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/version.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/version.go index 02ef17e715f..ff6204e8d31 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/version.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/version.go @@ -1,12 +1,10 @@ package dataflowdebugsession -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataflowdebugsession/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataflowdebugsession/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/README.md b/resource-manager/datafactory/2018-06-01/dataflows/README.md index 74c4e8436d5..c653c6d0356 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/README.md +++ b/resource-manager/datafactory/2018-06-01/dataflows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/dataflows` Documentation -The `dataflows` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `dataflows` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/dataflows/client.go b/resource-manager/datafactory/2018-06-01/dataflows/client.go index d0373748479..c4d36251add 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/client.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/client.go @@ -15,7 +15,7 @@ type DataFlowsClient struct { } func NewDataFlowsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataFlowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataflows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataflows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataFlowsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/id_dataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/id_dataflow.go index bfbb628f1a0..f9ddf06143f 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/id_dataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/id_dataflow.go @@ -44,7 +44,7 @@ func ParseDataflowID(input string) (*DataflowId, error) { } id := DataflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataflowIDInsensitively(input string) (*DataflowId, error) { } id := DataflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/id_factory.go b/resource-manager/datafactory/2018-06-01/dataflows/id_factory.go index 615b199edc6..c3e464737ea 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/dataflows/method_createorupdate.go index a7b2e43acee..b92957d6d60 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DataFlowsClient) CreateOrUpdate(ctx context.Context, id DataflowId, inpu var model DataFlowResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/method_get.go b/resource-manager/datafactory/2018-06-01/dataflows/method_get.go index 4a0c06a3321..506edd75551 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/method_get.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DataFlowsClient) Get(ctx context.Context, id DataflowId, options GetOper var model DataFlowResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go index f2e4da7ca0c..a2c3e42d365 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataFlow interface { + DataFlow() BaseDataFlowImpl } -// RawDataFlowImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataFlow = BaseDataFlowImpl{} + +type BaseDataFlowImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DataFlowFolder `json:"folder,omitempty"` + Type string `json:"type"` +} + +func (s BaseDataFlowImpl) DataFlow() BaseDataFlowImpl { + return s +} + +var _ DataFlow = RawDataFlowImpl{} + +// RawDataFlowImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataFlowImpl struct { - Type string - Values map[string]interface{} + dataFlow BaseDataFlowImpl + Type string + Values map[string]interface{} +} + +func (s RawDataFlowImpl) DataFlow() BaseDataFlowImpl { + return s.dataFlow } -func unmarshalDataFlowImplementation(input []byte) (DataFlow, error) { +func UnmarshalDataFlowImplementation(input []byte) (DataFlow, error) { if input == nil { return nil, nil } @@ -60,10 +80,15 @@ func unmarshalDataFlowImplementation(input []byte) (DataFlow, error) { return out, nil } - out := RawDataFlowImpl{ - Type: value, - Values: temp, + var parent BaseDataFlowImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataFlowImpl: %+v", err) } - return out, nil + + return RawDataFlowImpl{ + dataFlow: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go index d34e6587922..434bc502477 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go @@ -36,7 +36,7 @@ func (s *DataFlowResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataFlowImplementation(v) + impl, err := UnmarshalDataFlowImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataFlowResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go index 41cba7be12d..ed62e336b35 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go @@ -14,9 +14,20 @@ type Flowlet struct { TypeProperties *FlowletTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DataFlowFolder `json:"folder,omitempty"` + Type string `json:"type"` +} + +func (s Flowlet) DataFlow() BaseDataFlowImpl { + return BaseDataFlowImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + Type: s.Type, + } } var _ json.Marshaler = Flowlet{} @@ -30,9 +41,10 @@ func (s Flowlet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Flowlet: %+v", err) } + decoded["type"] = "Flowlet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go index e2b7f4092f1..a27add4f2fd 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go @@ -14,9 +14,20 @@ type MappingDataFlow struct { TypeProperties *MappingDataFlowTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DataFlowFolder `json:"folder,omitempty"` + Type string `json:"type"` +} + +func (s MappingDataFlow) DataFlow() BaseDataFlowImpl { + return BaseDataFlowImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + Type: s.Type, + } } var _ json.Marshaler = MappingDataFlow{} @@ -30,9 +41,10 @@ func (s MappingDataFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MappingDataFlow: %+v", err) } + decoded["type"] = "MappingDataFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go index 08af2e52045..a54b818ad96 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go @@ -14,9 +14,20 @@ type WranglingDataFlow struct { TypeProperties *PowerQueryTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DataFlowFolder `json:"folder,omitempty"` + Type string `json:"type"` +} + +func (s WranglingDataFlow) DataFlow() BaseDataFlowImpl { + return BaseDataFlowImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + Type: s.Type, + } } var _ json.Marshaler = WranglingDataFlow{} @@ -30,9 +41,10 @@ func (s WranglingDataFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WranglingDataFlow: %+v", err) } + decoded["type"] = "WranglingDataFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/dataflows/version.go b/resource-manager/datafactory/2018-06-01/dataflows/version.go index 3a074b0ad77..6be87c0a85b 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/version.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/version.go @@ -1,12 +1,10 @@ package dataflows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataflows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataflows/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/datasets/README.md b/resource-manager/datafactory/2018-06-01/datasets/README.md index 13e75ec21c6..f50fe54710c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/README.md +++ b/resource-manager/datafactory/2018-06-01/datasets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/datasets` Documentation -The `datasets` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `datasets` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/datasets/client.go b/resource-manager/datafactory/2018-06-01/datasets/client.go index dc13d2559d1..addd7dcdf5c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/client.go +++ b/resource-manager/datafactory/2018-06-01/datasets/client.go @@ -15,7 +15,7 @@ type DatasetsClient struct { } func NewDatasetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatasetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datasets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datasets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatasetsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go b/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go index e02c88bfd16..8d27f830b00 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/id_dataset.go @@ -44,7 +44,7 @@ func ParseDatasetID(input string) (*DatasetId, error) { } id := DatasetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatasetIDInsensitively(input string) (*DatasetId, error) { } id := DatasetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/datasets/id_factory.go b/resource-manager/datafactory/2018-06-01/datasets/id_factory.go index 6acf8083b85..98841cd9808 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/datasets/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go index edbeb3a53df..1d4172e5826 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/datasets/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DatasetsClient) CreateOrUpdate(ctx context.Context, id DatasetId, input var model DatasetResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/datasets/method_get.go b/resource-manager/datafactory/2018-06-01/datasets/method_get.go index c82fc1d4577..93a5abfa1ea 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/method_get.go +++ b/resource-manager/datafactory/2018-06-01/datasets/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DatasetsClient) Get(ctx context.Context, id DatasetId, options GetOperat var model DatasetResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go index 137ddd64439..447b36e3c64 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go @@ -14,6 +14,7 @@ type AmazonMWSObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AmazonMWSObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonMWSObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AmazonMWSObjectDataset{} @@ -34,9 +49,10 @@ func (s AmazonMWSObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonMWSObjectDataset: %+v", err) } + decoded["type"] = "AmazonMWSObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go index b11b8e9f05b..fc442ea0ee7 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go @@ -14,6 +14,7 @@ type AmazonRdsForOracleTableDataset struct { TypeProperties *AmazonRdsForOracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AmazonRdsForOracleTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForOracleTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AmazonRdsForOracleTableDataset{} @@ -34,9 +49,10 @@ func (s AmazonRdsForOracleTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleTableDataset: %+v", err) } + decoded["type"] = "AmazonRdsForOracleTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go index dd41dade77c..de052fcf296 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go @@ -14,6 +14,7 @@ type AmazonRdsForSqlServerTableDataset struct { TypeProperties *AmazonRdsForSqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AmazonRdsForSqlServerTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForSqlServerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AmazonRdsForSqlServerTableDataset{} @@ -34,9 +49,10 @@ func (s AmazonRdsForSqlServerTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerTableDataset: %+v", err) } + decoded["type"] = "AmazonRdsForSqlServerTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go index b53e5486e7e..b3751a1772b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go @@ -14,6 +14,7 @@ type AmazonRedshiftTableDataset struct { TypeProperties *AmazonRedshiftTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AmazonRedshiftTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRedshiftTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AmazonRedshiftTableDataset{} @@ -34,9 +49,10 @@ func (s AmazonRedshiftTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRedshiftTableDataset: %+v", err) } + decoded["type"] = "AmazonRedshiftTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go index d4f92906275..8b2008fd7e7 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go @@ -15,8 +15,18 @@ type AmazonS3CompatibleLocation struct { Version *string `json:"version,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3CompatibleLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AmazonS3CompatibleLocation{} @@ -30,9 +40,10 @@ func (s AmazonS3CompatibleLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleLocation: %+v", err) } + decoded["type"] = "AmazonS3CompatibleLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go index 2352970a78d..58283305388 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go @@ -14,6 +14,7 @@ type AmazonS3Dataset struct { TypeProperties AmazonS3DatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AmazonS3Dataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AmazonS3Dataset{} @@ -34,9 +49,10 @@ func (s AmazonS3Dataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3Dataset: %+v", err) } + decoded["type"] = "AmazonS3Object" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go index 00f7aeaa545..b90bb1967bc 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go @@ -42,7 +42,7 @@ func (s *AmazonS3DatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'AmazonS3DatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go index ce225053196..22bec2a5723 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go @@ -15,8 +15,18 @@ type AmazonS3Location struct { Version *string `json:"version,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3Location) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AmazonS3Location{} @@ -30,9 +40,10 @@ func (s AmazonS3Location) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3Location: %+v", err) } + decoded["type"] = "AmazonS3Location" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go index 9b66ffe4718..2c736a416da 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go @@ -14,6 +14,7 @@ type AvroDataset struct { TypeProperties *AvroDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AvroDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AvroDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AvroDataset{} @@ -34,9 +49,10 @@ func (s AvroDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroDataset: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go index ac4ded76bc8..78acd42d034 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go @@ -32,7 +32,7 @@ func (s *AvroDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'AvroDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go index ca2957d0da8..22764c496c3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go @@ -13,8 +13,18 @@ var _ DatasetStorageFormat = AvroFormat{} type AvroFormat struct { // Fields inherited from DatasetStorageFormat + Deserializer *string `json:"deserializer,omitempty"` Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s AvroFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } } var _ json.Marshaler = AvroFormat{} @@ -28,9 +38,10 @@ func (s AvroFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroFormat: %+v", err) } + decoded["type"] = "AvroFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go index 39f87168d0e..a8043d54fc3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go @@ -14,6 +14,7 @@ type AzureBlobDataset struct { TypeProperties *AzureBlobDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureBlobDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobDataset{} @@ -34,9 +49,10 @@ func (s AzureBlobDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobDataset: %+v", err) } + decoded["type"] = "AzureBlob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go index c8b42d61f1d..ddcf57023a8 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go @@ -40,7 +40,7 @@ func (s *AzureBlobDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go index 2a9d397aad7..b2b91bab06f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go @@ -14,6 +14,7 @@ type AzureBlobFSDataset struct { TypeProperties *AzureBlobFSDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureBlobFSDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobFSDataset{} @@ -34,9 +49,10 @@ func (s AzureBlobFSDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSDataset: %+v", err) } + decoded["type"] = "AzureBlobFSFile" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go index f91556d6713..bece81f0ffd 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go @@ -34,7 +34,7 @@ func (s *AzureBlobFSDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobFSDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go index cdddce6b9c8..209b4eb3532 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go @@ -14,8 +14,18 @@ type AzureBlobFSLocation struct { FileSystem *string `json:"fileSystem,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobFSLocation{} @@ -29,9 +39,10 @@ func (s AzureBlobFSLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSLocation: %+v", err) } + decoded["type"] = "AzureBlobFSLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go index 8072f1aea3c..11104f69871 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go @@ -14,8 +14,18 @@ type AzureBlobStorageLocation struct { Container *string `json:"container,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobStorageLocation{} @@ -29,9 +39,10 @@ func (s AzureBlobStorageLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobStorageLocation: %+v", err) } + decoded["type"] = "AzureBlobStorageLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go index b21d48f7ab4..966729d7d43 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go @@ -14,6 +14,7 @@ type AzureDatabricksDeltaLakeDataset struct { TypeProperties *AzureDatabricksDeltaLakeDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureDatabricksDeltaLakeDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDatabricksDeltaLakeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureDatabricksDeltaLakeDataset{} @@ -34,9 +49,10 @@ func (s AzureDatabricksDeltaLakeDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeDataset: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLakeDataset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go index 69865e2a67f..42eb237c0ba 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go @@ -14,6 +14,7 @@ type AzureDataExplorerTableDataset struct { TypeProperties AzureDataExplorerDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureDataExplorerTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataExplorerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureDataExplorerTableDataset{} @@ -34,9 +49,10 @@ func (s AzureDataExplorerTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerTableDataset: %+v", err) } + decoded["type"] = "AzureDataExplorerTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go index 6918b7ee25d..9ff26004ac5 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go @@ -14,6 +14,7 @@ type AzureDataLakeStoreDataset struct { TypeProperties *AzureDataLakeStoreDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureDataLakeStoreDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreDataset{} @@ -34,9 +49,10 @@ func (s AzureDataLakeStoreDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreDataset: %+v", err) } + decoded["type"] = "AzureDataLakeStoreFile" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go index 4d1e4c13ccd..b8086c40615 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go @@ -34,7 +34,7 @@ func (s *AzureDataLakeStoreDatasetTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'AzureDataLakeStoreDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go index 13d00d0e75d..d2257490e9b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = AzureDataLakeStoreLocation{} type AzureDataLakeStoreLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreLocation{} @@ -28,9 +38,10 @@ func (s AzureDataLakeStoreLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreLocation: %+v", err) } + decoded["type"] = "AzureDataLakeStoreLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go index 38f3e140c62..92ac6431bd3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = AzureFileStorageLocation{} type AzureFileStorageLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s AzureFileStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = AzureFileStorageLocation{} @@ -28,9 +38,10 @@ func (s AzureFileStorageLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileStorageLocation: %+v", err) } + decoded["type"] = "AzureFileStorageLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go index ebe239abcaf..5c324de6b76 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go @@ -14,6 +14,7 @@ type AzureMariaDBTableDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureMariaDBTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureMariaDBTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureMariaDBTableDataset{} @@ -34,9 +49,10 @@ func (s AzureMariaDBTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMariaDBTableDataset: %+v", err) } + decoded["type"] = "AzureMariaDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go index 5cc9a5476a8..e4a3e412b41 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go @@ -14,6 +14,7 @@ type AzureMySqlTableDataset struct { TypeProperties AzureMySqlTableDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureMySqlTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureMySqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureMySqlTableDataset{} @@ -34,9 +49,10 @@ func (s AzureMySqlTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMySqlTableDataset: %+v", err) } + decoded["type"] = "AzureMySqlTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go index ffa368f6e41..aa60d0dec36 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go @@ -14,6 +14,7 @@ type AzurePostgreSqlTableDataset struct { TypeProperties *AzurePostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzurePostgreSqlTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzurePostgreSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzurePostgreSqlTableDataset{} @@ -34,9 +49,10 @@ func (s AzurePostgreSqlTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePostgreSqlTableDataset: %+v", err) } + decoded["type"] = "AzurePostgreSqlTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go index 61dcac613b6..e91977acc31 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go @@ -14,6 +14,7 @@ type AzureSearchIndexDataset struct { TypeProperties AzureSearchIndexDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureSearchIndexDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSearchIndexDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureSearchIndexDataset{} @@ -34,9 +49,10 @@ func (s AzureSearchIndexDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSearchIndexDataset: %+v", err) } + decoded["type"] = "AzureSearchIndex" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go index 8484c460390..dfadf803bb3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go @@ -14,6 +14,7 @@ type AzureSqlDWTableDataset struct { TypeProperties *AzureSqlDWTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureSqlDWTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlDWTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDWTableDataset{} @@ -34,9 +49,10 @@ func (s AzureSqlDWTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDWTableDataset: %+v", err) } + decoded["type"] = "AzureSqlDWTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go index d70740c0490..3f155ceeb90 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go @@ -14,6 +14,7 @@ type AzureSqlMITableDataset struct { TypeProperties *AzureSqlMITableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureSqlMITableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlMITableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureSqlMITableDataset{} @@ -34,9 +49,10 @@ func (s AzureSqlMITableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlMITableDataset: %+v", err) } + decoded["type"] = "AzureSqlMITable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go index 0454ae6852e..87f767d3d32 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go @@ -14,6 +14,7 @@ type AzureSqlTableDataset struct { TypeProperties *AzureSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureSqlTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureSqlTableDataset{} @@ -34,9 +49,10 @@ func (s AzureSqlTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlTableDataset: %+v", err) } + decoded["type"] = "AzureSqlTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go index 05eca7ff7be..29ce208d132 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go @@ -14,6 +14,7 @@ type AzureTableDataset struct { TypeProperties AzureTableDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type AzureTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s AzureTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = AzureTableDataset{} @@ -34,9 +49,10 @@ func (s AzureTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableDataset: %+v", err) } + decoded["type"] = "AzureTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go index 196324fd66e..3106bfc2295 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go @@ -14,6 +14,7 @@ type BinaryDataset struct { TypeProperties *BinaryDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type BinaryDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s BinaryDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = BinaryDataset{} @@ -34,9 +49,10 @@ func (s BinaryDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BinaryDataset: %+v", err) } + decoded["type"] = "Binary" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go index 131a2afc289..c1b8c14b5e2 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go @@ -30,7 +30,7 @@ func (s *BinaryDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'BinaryDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go index e7942315113..706b866c5a8 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go @@ -14,6 +14,7 @@ type CassandraTableDataset struct { TypeProperties *CassandraTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CassandraTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CassandraTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CassandraTableDataset{} @@ -34,9 +49,10 @@ func (s CassandraTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CassandraTableDataset: %+v", err) } + decoded["type"] = "CassandraTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go index ad74f0abb7a..d1b1f81ef19 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go @@ -14,6 +14,7 @@ type CommonDataServiceForAppsEntityDataset struct { TypeProperties *CommonDataServiceForAppsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CommonDataServiceForAppsEntityDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CommonDataServiceForAppsEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CommonDataServiceForAppsEntityDataset{} @@ -34,9 +49,10 @@ func (s CommonDataServiceForAppsEntityDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsEntityDataset: %+v", err) } + decoded["type"] = "CommonDataServiceForAppsEntity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go index db94d9bd729..884ce7f6920 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go @@ -14,6 +14,7 @@ type ConcurObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ConcurObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ConcurObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ConcurObjectDataset{} @@ -34,9 +49,10 @@ func (s ConcurObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConcurObjectDataset: %+v", err) } + decoded["type"] = "ConcurObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go index 247472f4caf..ce8a7aa555e 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go @@ -14,6 +14,7 @@ type CosmosDbMongoDbApiCollectionDataset struct { TypeProperties CosmosDbMongoDbApiCollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CosmosDbMongoDbApiCollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbMongoDbApiCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CosmosDbMongoDbApiCollectionDataset{} @@ -34,9 +49,10 @@ func (s CosmosDbMongoDbApiCollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) } + decoded["type"] = "CosmosDbMongoDbApiCollection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go index 69af3cdad73..5958b36e22a 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go @@ -14,6 +14,7 @@ type CosmosDbSqlApiCollectionDataset struct { TypeProperties CosmosDbSqlApiCollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CosmosDbSqlApiCollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbSqlApiCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CosmosDbSqlApiCollectionDataset{} @@ -34,9 +49,10 @@ func (s CosmosDbSqlApiCollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbSqlApiCollectionDataset: %+v", err) } + decoded["type"] = "CosmosDbSqlApiCollection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go index 0126103e700..147acc0aef7 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go @@ -14,6 +14,7 @@ type CouchbaseTableDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CouchbaseTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CouchbaseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CouchbaseTableDataset{} @@ -34,9 +49,10 @@ func (s CouchbaseTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CouchbaseTableDataset: %+v", err) } + decoded["type"] = "CouchbaseTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go index 63a58a67af4..d81ba6be288 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go @@ -14,6 +14,7 @@ type CustomDataset struct { TypeProperties *interface{} `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type CustomDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s CustomDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = CustomDataset{} @@ -34,9 +49,10 @@ func (s CustomDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomDataset: %+v", err) } + decoded["type"] = "CustomDataset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go index ca1e6e3e1dc..5d5df1e0cb4 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Dataset interface { + Dataset() BaseDatasetImpl } -// RawDatasetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Dataset = BaseDatasetImpl{} + +type BaseDatasetImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetImpl) Dataset() BaseDatasetImpl { + return s +} + +var _ Dataset = RawDatasetImpl{} + +// RawDatasetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatasetImpl struct { - Type string - Values map[string]interface{} + dataset BaseDatasetImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetImpl) Dataset() BaseDatasetImpl { + return s.dataset } -func unmarshalDatasetImplementation(input []byte) (Dataset, error) { +func UnmarshalDatasetImplementation(input []byte) (Dataset, error) { if input == nil { return nil, nil } @@ -876,10 +900,15 @@ func unmarshalDatasetImplementation(input []byte) (Dataset, error) { return out, nil } - out := RawDatasetImpl{ - Type: value, - Values: temp, + var parent BaseDatasetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetImpl: %+v", err) } - return out, nil + + return RawDatasetImpl{ + dataset: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go index 9cf6d9e9039..f41a1c7dbde 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatasetLocation interface { + DatasetLocation() BaseDatasetLocationImpl } -// RawDatasetLocationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatasetLocation = BaseDatasetLocationImpl{} + +type BaseDatasetLocationImpl struct { + FileName *string `json:"fileName,omitempty"` + FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetLocationImpl) DatasetLocation() BaseDatasetLocationImpl { + return s +} + +var _ DatasetLocation = RawDatasetLocationImpl{} + +// RawDatasetLocationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatasetLocationImpl struct { - Type string - Values map[string]interface{} + datasetLocation BaseDatasetLocationImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetLocationImpl) DatasetLocation() BaseDatasetLocationImpl { + return s.datasetLocation } -func unmarshalDatasetLocationImplementation(input []byte) (DatasetLocation, error) { +func UnmarshalDatasetLocationImplementation(input []byte) (DatasetLocation, error) { if input == nil { return nil, nil } @@ -148,10 +167,15 @@ func unmarshalDatasetLocationImplementation(input []byte) (DatasetLocation, erro return out, nil } - out := RawDatasetLocationImpl{ - Type: value, - Values: temp, + var parent BaseDatasetLocationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetLocationImpl: %+v", err) } - return out, nil + + return RawDatasetLocationImpl{ + datasetLocation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go index e84d42a2de2..fe30172f173 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go @@ -36,7 +36,7 @@ func (s *DatasetResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDatasetImplementation(v) + impl, err := UnmarshalDatasetImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DatasetResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go index 462f8d15065..e3534eb7f95 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatasetStorageFormat interface { + DatasetStorageFormat() BaseDatasetStorageFormatImpl } -// RawDatasetStorageFormatImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatasetStorageFormat = BaseDatasetStorageFormatImpl{} + +type BaseDatasetStorageFormatImpl struct { + Deserializer *string `json:"deserializer,omitempty"` + Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s BaseDatasetStorageFormatImpl) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return s +} + +var _ DatasetStorageFormat = RawDatasetStorageFormatImpl{} + +// RawDatasetStorageFormatImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatasetStorageFormatImpl struct { - Type string - Values map[string]interface{} + datasetStorageFormat BaseDatasetStorageFormatImpl + Type string + Values map[string]interface{} +} + +func (s RawDatasetStorageFormatImpl) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return s.datasetStorageFormat } -func unmarshalDatasetStorageFormatImplementation(input []byte) (DatasetStorageFormat, error) { +func UnmarshalDatasetStorageFormatImplementation(input []byte) (DatasetStorageFormat, error) { if input == nil { return nil, nil } @@ -76,10 +95,15 @@ func unmarshalDatasetStorageFormatImplementation(input []byte) (DatasetStorageFo return out, nil } - out := RawDatasetStorageFormatImpl{ - Type: value, - Values: temp, + var parent BaseDatasetStorageFormatImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatasetStorageFormatImpl: %+v", err) } - return out, nil + + return RawDatasetStorageFormatImpl{ + datasetStorageFormat: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go index 1c1ccb657f8..8d690c5363a 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go @@ -14,6 +14,7 @@ type Db2TableDataset struct { TypeProperties *Db2TableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type Db2TableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s Db2TableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = Db2TableDataset{} @@ -34,9 +49,10 @@ func (s Db2TableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Db2TableDataset: %+v", err) } + decoded["type"] = "Db2Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go index e06e38b5229..e5b71f2eb41 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go @@ -14,6 +14,7 @@ type DelimitedTextDataset struct { TypeProperties *DelimitedTextDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DelimitedTextDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DelimitedTextDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DelimitedTextDataset{} @@ -34,9 +49,10 @@ func (s DelimitedTextDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelimitedTextDataset: %+v", err) } + decoded["type"] = "DelimitedText" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go index b348979b090..0fca9cd32c5 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go @@ -46,7 +46,7 @@ func (s *DelimitedTextDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'DelimitedTextDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go index adfc33da003..a0aa4d9c346 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go @@ -14,6 +14,7 @@ type DocumentDbCollectionDataset struct { TypeProperties DocumentDbCollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DocumentDbCollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DocumentDbCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DocumentDbCollectionDataset{} @@ -34,9 +49,10 @@ func (s DocumentDbCollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbCollectionDataset: %+v", err) } + decoded["type"] = "DocumentDbCollection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go index c9e7fa63684..ad4ce222a0e 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go @@ -14,6 +14,7 @@ type DrillTableDataset struct { TypeProperties *DrillDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DrillTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DrillTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DrillTableDataset{} @@ -34,9 +49,10 @@ func (s DrillTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DrillTableDataset: %+v", err) } + decoded["type"] = "DrillTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go index e8284adc140..6906408bf36 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go @@ -14,6 +14,7 @@ type DynamicsAXResourceDataset struct { TypeProperties DynamicsAXResourceDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DynamicsAXResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsAXResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DynamicsAXResourceDataset{} @@ -34,9 +49,10 @@ func (s DynamicsAXResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsAXResourceDataset: %+v", err) } + decoded["type"] = "DynamicsAXResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go index df1870108e2..f813c9b6d25 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go @@ -14,6 +14,7 @@ type DynamicsCrmEntityDataset struct { TypeProperties *DynamicsCrmEntityDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DynamicsCrmEntityDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsCrmEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DynamicsCrmEntityDataset{} @@ -34,9 +49,10 @@ func (s DynamicsCrmEntityDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsCrmEntityDataset: %+v", err) } + decoded["type"] = "DynamicsCrmEntity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go index fe27a29a6e8..d668fe8e542 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go @@ -14,6 +14,7 @@ type DynamicsEntityDataset struct { TypeProperties *DynamicsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type DynamicsEntityDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsEntityDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = DynamicsEntityDataset{} @@ -34,9 +49,10 @@ func (s DynamicsEntityDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsEntityDataset: %+v", err) } + decoded["type"] = "DynamicsEntity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go index 222e20eebc9..f43a905fe8e 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go @@ -14,6 +14,7 @@ type EloquaObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type EloquaObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s EloquaObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = EloquaObjectDataset{} @@ -34,9 +49,10 @@ func (s EloquaObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EloquaObjectDataset: %+v", err) } + decoded["type"] = "EloquaObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go index 4261922dba0..1bf55a9d781 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go @@ -14,6 +14,7 @@ type ExcelDataset struct { TypeProperties *ExcelDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ExcelDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ExcelDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ExcelDataset{} @@ -34,9 +49,10 @@ func (s ExcelDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExcelDataset: %+v", err) } + decoded["type"] = "Excel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go index 59d6875c5f4..a078e9625d8 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go @@ -40,7 +40,7 @@ func (s *ExcelDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'ExcelDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go index 8bb0e85ef6c..5cc48d26598 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = FileServerLocation{} type FileServerLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s FileServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = FileServerLocation{} @@ -28,9 +38,10 @@ func (s FileServerLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileServerLocation: %+v", err) } + decoded["type"] = "FileServerLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go index 7046c6bd912..0a1adbab340 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go @@ -14,6 +14,7 @@ type FileShareDataset struct { TypeProperties *FileShareDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type FileShareDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s FileShareDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = FileShareDataset{} @@ -34,9 +49,10 @@ func (s FileShareDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileShareDataset: %+v", err) } + decoded["type"] = "FileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go index fb4a3a056fb..a79facfedd5 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go @@ -40,7 +40,7 @@ func (s *FileShareDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'FileShareDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go index 20b2fa99491..a693bd96179 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = FtpServerLocation{} type FtpServerLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s FtpServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = FtpServerLocation{} @@ -28,9 +38,10 @@ func (s FtpServerLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FtpServerLocation: %+v", err) } + decoded["type"] = "FtpServerLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go index 831ac1ad809..a9fca033b91 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go @@ -14,6 +14,7 @@ type GoogleAdWordsObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type GoogleAdWordsObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleAdWordsObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = GoogleAdWordsObjectDataset{} @@ -34,9 +49,10 @@ func (s GoogleAdWordsObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleAdWordsObjectDataset: %+v", err) } + decoded["type"] = "GoogleAdWordsObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go index fd5fbb2b15a..cbef91be0c4 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go @@ -14,6 +14,7 @@ type GoogleBigQueryObjectDataset struct { TypeProperties *GoogleBigQueryDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type GoogleBigQueryObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQueryObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = GoogleBigQueryObjectDataset{} @@ -34,9 +49,10 @@ func (s GoogleBigQueryObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQueryObjectDataset: %+v", err) } + decoded["type"] = "GoogleBigQueryObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go index 4ad3700793d..c9ee1cdfdaa 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go @@ -14,6 +14,7 @@ type GoogleBigQueryV2ObjectDataset struct { TypeProperties *GoogleBigQueryV2DatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type GoogleBigQueryV2ObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQueryV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = GoogleBigQueryV2ObjectDataset{} @@ -34,9 +49,10 @@ func (s GoogleBigQueryV2ObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2ObjectDataset: %+v", err) } + decoded["type"] = "GoogleBigQueryV2Object" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go index 1350a597431..c5f0b9b031c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go @@ -15,8 +15,18 @@ type GoogleCloudStorageLocation struct { Version *string `json:"version,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s GoogleCloudStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = GoogleCloudStorageLocation{} @@ -30,9 +40,10 @@ func (s GoogleCloudStorageLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleCloudStorageLocation: %+v", err) } + decoded["type"] = "GoogleCloudStorageLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go index e7db7044c11..618e80b6e26 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go @@ -14,6 +14,7 @@ type GreenplumTableDataset struct { TypeProperties *GreenplumDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type GreenplumTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s GreenplumTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = GreenplumTableDataset{} @@ -34,9 +49,10 @@ func (s GreenplumTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GreenplumTableDataset: %+v", err) } + decoded["type"] = "GreenplumTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go index 25594062387..4328b31379f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go @@ -14,6 +14,7 @@ type HBaseObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type HBaseObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HBaseObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = HBaseObjectDataset{} @@ -34,9 +49,10 @@ func (s HBaseObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HBaseObjectDataset: %+v", err) } + decoded["type"] = "HBaseObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go index 08df17d5fbc..c7e9c17953a 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = HdfsLocation{} type HdfsLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s HdfsLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = HdfsLocation{} @@ -28,9 +38,10 @@ func (s HdfsLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HdfsLocation: %+v", err) } + decoded["type"] = "HdfsLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go index 163f9b84149..89b45af696f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go @@ -14,6 +14,7 @@ type HiveObjectDataset struct { TypeProperties *HiveDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type HiveObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HiveObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = HiveObjectDataset{} @@ -34,9 +49,10 @@ func (s HiveObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HiveObjectDataset: %+v", err) } + decoded["type"] = "HiveObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go index 63e6c8b1e02..7ac55c3b591 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go @@ -14,6 +14,7 @@ type HTTPDataset struct { TypeProperties *HTTPDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type HTTPDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HTTPDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = HTTPDataset{} @@ -34,9 +49,10 @@ func (s HTTPDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPDataset: %+v", err) } + decoded["type"] = "HttpFile" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go index c59a394f430..23ab5beddd8 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go @@ -38,7 +38,7 @@ func (s *HTTPDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["format"]; ok { - impl, err := unmarshalDatasetStorageFormatImplementation(v) + impl, err := UnmarshalDatasetStorageFormatImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Format' for 'HTTPDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go index c0a672da8c6..c94d72aa3be 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go @@ -14,8 +14,18 @@ type HTTPServerLocation struct { RelativeUrl *string `json:"relativeUrl,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s HTTPServerLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = HTTPServerLocation{} @@ -29,9 +39,10 @@ func (s HTTPServerLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPServerLocation: %+v", err) } + decoded["type"] = "HttpServerLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go index 2d45a169dbf..a74dff6295f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go @@ -14,6 +14,7 @@ type HubspotObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type HubspotObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s HubspotObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = HubspotObjectDataset{} @@ -34,9 +49,10 @@ func (s HubspotObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HubspotObjectDataset: %+v", err) } + decoded["type"] = "HubspotObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go index 18009e5f4aa..427ebe75925 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_icebergdataset.go @@ -14,6 +14,7 @@ type IcebergDataset struct { TypeProperties *IcebergDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type IcebergDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s IcebergDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = IcebergDataset{} @@ -34,9 +49,10 @@ func (s IcebergDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IcebergDataset: %+v", err) } + decoded["type"] = "Iceberg" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go index d4b5f66db7c..c0ec3702f95 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_icebergdatasettypeproperties.go @@ -22,7 +22,7 @@ func (s *IcebergDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'IcebergDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go index 13c1bfb7bc0..9a1354d52fe 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go @@ -14,6 +14,7 @@ type ImpalaObjectDataset struct { TypeProperties *ImpalaDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ImpalaObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ImpalaObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ImpalaObjectDataset{} @@ -34,9 +49,10 @@ func (s ImpalaObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImpalaObjectDataset: %+v", err) } + decoded["type"] = "ImpalaObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go index 65e4cdbecbb..4699821053c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go @@ -14,6 +14,7 @@ type InformixTableDataset struct { TypeProperties *InformixTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type InformixTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s InformixTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = InformixTableDataset{} @@ -34,9 +49,10 @@ func (s InformixTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InformixTableDataset: %+v", err) } + decoded["type"] = "InformixTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go index 7674a8b4ce9..8d540593512 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go @@ -14,6 +14,7 @@ type JiraObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type JiraObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s JiraObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = JiraObjectDataset{} @@ -34,9 +49,10 @@ func (s JiraObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JiraObjectDataset: %+v", err) } + decoded["type"] = "JiraObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go index 77f34fd6b24..54b8169e9a3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go @@ -14,6 +14,7 @@ type JsonDataset struct { TypeProperties *JsonDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type JsonDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s JsonDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = JsonDataset{} @@ -34,9 +49,10 @@ func (s JsonDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonDataset: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go index 7a6687ec482..849671dbfb0 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go @@ -32,7 +32,7 @@ func (s *JsonDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'JsonDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go index 59b724e62e3..400d4ae3858 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go @@ -18,8 +18,18 @@ type JsonFormat struct { NestingSeparator *string `json:"nestingSeparator,omitempty"` // Fields inherited from DatasetStorageFormat + Deserializer *string `json:"deserializer,omitempty"` Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s JsonFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } } var _ json.Marshaler = JsonFormat{} @@ -33,9 +43,10 @@ func (s JsonFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonFormat: %+v", err) } + decoded["type"] = "JsonFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go index a1937c2d098..03dbc0cd4f6 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = LakeHouseLocation{} type LakeHouseLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = LakeHouseLocation{} @@ -28,9 +38,10 @@ func (s LakeHouseLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseLocation: %+v", err) } + decoded["type"] = "LakeHouseLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go index e75058f6f0b..6428ef65e3b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go @@ -14,6 +14,7 @@ type LakeHouseTableDataset struct { TypeProperties *LakeHouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type LakeHouseTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = LakeHouseTableDataset{} @@ -34,9 +49,10 @@ func (s LakeHouseTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseTableDataset: %+v", err) } + decoded["type"] = "LakeHouseTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go index 3a5d3041624..eae8e80be80 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go @@ -14,6 +14,7 @@ type MagentoObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MagentoObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MagentoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MagentoObjectDataset{} @@ -34,9 +49,10 @@ func (s MagentoObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MagentoObjectDataset: %+v", err) } + decoded["type"] = "MagentoObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go index 9c363dc3832..9e30628b6c5 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go @@ -14,6 +14,7 @@ type MariaDBTableDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MariaDBTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MariaDBTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MariaDBTableDataset{} @@ -34,9 +49,10 @@ func (s MariaDBTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MariaDBTableDataset: %+v", err) } + decoded["type"] = "MariaDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go index 50561c5a193..da9648f4f16 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go @@ -14,6 +14,7 @@ type MarketoObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MarketoObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MarketoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MarketoObjectDataset{} @@ -34,9 +49,10 @@ func (s MarketoObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MarketoObjectDataset: %+v", err) } + decoded["type"] = "MarketoObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go index 023dd86b9af..29668f5be07 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go @@ -14,6 +14,7 @@ type MicrosoftAccessTableDataset struct { TypeProperties *MicrosoftAccessTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MicrosoftAccessTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MicrosoftAccessTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MicrosoftAccessTableDataset{} @@ -34,9 +49,10 @@ func (s MicrosoftAccessTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftAccessTableDataset: %+v", err) } + decoded["type"] = "MicrosoftAccessTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go index de84e66a25c..0af9117a1f0 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go @@ -14,6 +14,7 @@ type MongoDbAtlasCollectionDataset struct { TypeProperties MongoDbAtlasCollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MongoDbAtlasCollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbAtlasCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MongoDbAtlasCollectionDataset{} @@ -34,9 +49,10 @@ func (s MongoDbAtlasCollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbAtlasCollectionDataset: %+v", err) } + decoded["type"] = "MongoDbAtlasCollection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go index ae2fa8ef9aa..bc286348347 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go @@ -14,6 +14,7 @@ type MongoDbCollectionDataset struct { TypeProperties MongoDbCollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MongoDbCollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbCollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MongoDbCollectionDataset{} @@ -34,9 +49,10 @@ func (s MongoDbCollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbCollectionDataset: %+v", err) } + decoded["type"] = "MongoDbCollection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go index 9445652b37b..be6b16677aa 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go @@ -14,6 +14,7 @@ type MongoDbV2CollectionDataset struct { TypeProperties MongoDbV2CollectionDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MongoDbV2CollectionDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbV2CollectionDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MongoDbV2CollectionDataset{} @@ -34,9 +49,10 @@ func (s MongoDbV2CollectionDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbV2CollectionDataset: %+v", err) } + decoded["type"] = "MongoDbV2Collection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go index 6f8d7c93fa3..b99223212a5 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go @@ -14,6 +14,7 @@ type MySqlTableDataset struct { TypeProperties *MySqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type MySqlTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s MySqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = MySqlTableDataset{} @@ -34,9 +49,10 @@ func (s MySqlTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MySqlTableDataset: %+v", err) } + decoded["type"] = "MySqlTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go index f00cb823ae6..2755e44f3dc 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go @@ -14,6 +14,7 @@ type NetezzaTableDataset struct { TypeProperties *NetezzaTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type NetezzaTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s NetezzaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = NetezzaTableDataset{} @@ -34,9 +49,10 @@ func (s NetezzaTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetezzaTableDataset: %+v", err) } + decoded["type"] = "NetezzaTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go index cf0b94b785b..a8524d06ca8 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go @@ -14,6 +14,7 @@ type ODataResourceDataset struct { TypeProperties *ODataResourceDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ODataResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ODataResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ODataResourceDataset{} @@ -34,9 +49,10 @@ func (s ODataResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ODataResourceDataset: %+v", err) } + decoded["type"] = "ODataResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go index bcccbc19231..788838d219c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go @@ -14,6 +14,7 @@ type OdbcTableDataset struct { TypeProperties *OdbcTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type OdbcTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OdbcTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = OdbcTableDataset{} @@ -34,9 +49,10 @@ func (s OdbcTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OdbcTableDataset: %+v", err) } + decoded["type"] = "OdbcTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go index 9494623e52b..d406c079a1b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go @@ -14,6 +14,7 @@ type Office365Dataset struct { TypeProperties Office365DatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type Office365Dataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s Office365Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = Office365Dataset{} @@ -34,9 +49,10 @@ func (s Office365Dataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Office365Dataset: %+v", err) } + decoded["type"] = "Office365Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go index 92a7cabb6f9..d4a73c8e72f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go @@ -15,8 +15,18 @@ type OracleCloudStorageLocation struct { Version *string `json:"version,omitempty"` // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s OracleCloudStorageLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = OracleCloudStorageLocation{} @@ -30,9 +40,10 @@ func (s OracleCloudStorageLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleCloudStorageLocation: %+v", err) } + decoded["type"] = "OracleCloudStorageLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go index e2aab43b082..e1591eb9fc6 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go @@ -14,6 +14,7 @@ type OracleServiceCloudObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type OracleServiceCloudObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OracleServiceCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = OracleServiceCloudObjectDataset{} @@ -34,9 +49,10 @@ func (s OracleServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleServiceCloudObjectDataset: %+v", err) } + decoded["type"] = "OracleServiceCloudObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go index b68895d9767..352b1cd31c9 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go @@ -14,6 +14,7 @@ type OracleTableDataset struct { TypeProperties *OracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type OracleTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OracleTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = OracleTableDataset{} @@ -34,9 +49,10 @@ func (s OracleTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleTableDataset: %+v", err) } + decoded["type"] = "OracleTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go index 905edad7add..61faaf19b49 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go @@ -14,6 +14,7 @@ type OrcDataset struct { TypeProperties *OrcDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type OrcDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s OrcDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = OrcDataset{} @@ -34,9 +49,10 @@ func (s OrcDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OrcDataset: %+v", err) } + decoded["type"] = "Orc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go index caaca7c2c6c..f6e2b91b088 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go @@ -30,7 +30,7 @@ func (s *OrcDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'OrcDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go index 8796a896fce..2b550bf5a37 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go @@ -13,8 +13,18 @@ var _ DatasetStorageFormat = OrcFormat{} type OrcFormat struct { // Fields inherited from DatasetStorageFormat + Deserializer *string `json:"deserializer,omitempty"` Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s OrcFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } } var _ json.Marshaler = OrcFormat{} @@ -28,9 +38,10 @@ func (s OrcFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OrcFormat: %+v", err) } + decoded["type"] = "OrcFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go index fbbdf978ed1..5ae3255b1ed 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go @@ -14,6 +14,7 @@ type ParquetDataset struct { TypeProperties *ParquetDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ParquetDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ParquetDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ParquetDataset{} @@ -34,9 +49,10 @@ func (s ParquetDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetDataset: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go index 39a4ba379b3..d512c6bb22b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go @@ -30,7 +30,7 @@ func (s *ParquetDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'ParquetDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go index 728f9950b31..aeb8d2a224c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go @@ -13,8 +13,18 @@ var _ DatasetStorageFormat = ParquetFormat{} type ParquetFormat struct { // Fields inherited from DatasetStorageFormat + Deserializer *string `json:"deserializer,omitempty"` Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s ParquetFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } } var _ json.Marshaler = ParquetFormat{} @@ -28,9 +38,10 @@ func (s ParquetFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetFormat: %+v", err) } + decoded["type"] = "ParquetFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go index bdba774505e..2a8224b967e 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go @@ -14,6 +14,7 @@ type PaypalObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type PaypalObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PaypalObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = PaypalObjectDataset{} @@ -34,9 +49,10 @@ func (s PaypalObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PaypalObjectDataset: %+v", err) } + decoded["type"] = "PaypalObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go index fdf95c28be7..983eb481ffd 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go @@ -14,6 +14,7 @@ type PhoenixObjectDataset struct { TypeProperties *PhoenixDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type PhoenixObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PhoenixObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = PhoenixObjectDataset{} @@ -34,9 +49,10 @@ func (s PhoenixObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PhoenixObjectDataset: %+v", err) } + decoded["type"] = "PhoenixObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go index f8a0a47387f..f61d34574a9 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go @@ -14,6 +14,7 @@ type PostgreSqlTableDataset struct { TypeProperties *PostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type PostgreSqlTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = PostgreSqlTableDataset{} @@ -34,9 +49,10 @@ func (s PostgreSqlTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlTableDataset: %+v", err) } + decoded["type"] = "PostgreSqlTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go index ae2e700d8da..77e6c17cc0b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go @@ -14,6 +14,7 @@ type PostgreSqlV2TableDataset struct { TypeProperties *PostgreSqlV2TableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type PostgreSqlV2TableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlV2TableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = PostgreSqlV2TableDataset{} @@ -34,9 +49,10 @@ func (s PostgreSqlV2TableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlV2TableDataset: %+v", err) } + decoded["type"] = "PostgreSqlV2Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go index b9236c39de9..937dca38c89 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go @@ -14,6 +14,7 @@ type PrestoObjectDataset struct { TypeProperties *PrestoDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type PrestoObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s PrestoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = PrestoObjectDataset{} @@ -34,9 +49,10 @@ func (s PrestoObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrestoObjectDataset: %+v", err) } + decoded["type"] = "PrestoObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go index 036efa63894..e9885cfba0d 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go @@ -14,6 +14,7 @@ type QuickBooksObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type QuickBooksObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s QuickBooksObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = QuickBooksObjectDataset{} @@ -34,9 +49,10 @@ func (s QuickBooksObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuickBooksObjectDataset: %+v", err) } + decoded["type"] = "QuickBooksObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go index eeb66a2f268..4b2bf736440 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go @@ -14,6 +14,7 @@ type RelationalTableDataset struct { TypeProperties *RelationalTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type RelationalTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s RelationalTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = RelationalTableDataset{} @@ -34,9 +49,10 @@ func (s RelationalTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RelationalTableDataset: %+v", err) } + decoded["type"] = "RelationalTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go index 5bdd66ee820..72e37e3d158 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go @@ -14,6 +14,7 @@ type ResponsysObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ResponsysObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ResponsysObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ResponsysObjectDataset{} @@ -34,9 +49,10 @@ func (s ResponsysObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResponsysObjectDataset: %+v", err) } + decoded["type"] = "ResponsysObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go index c2a82aa9883..ca3cc639f1c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go @@ -14,6 +14,7 @@ type RestResourceDataset struct { TypeProperties *RestResourceDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type RestResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s RestResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = RestResourceDataset{} @@ -34,9 +49,10 @@ func (s RestResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestResourceDataset: %+v", err) } + decoded["type"] = "RestResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go index fb6fbcfab50..45c5f3b7cce 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go @@ -14,6 +14,7 @@ type SalesforceMarketingCloudObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SalesforceMarketingCloudObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceMarketingCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SalesforceMarketingCloudObjectDataset{} @@ -34,9 +49,10 @@ func (s SalesforceMarketingCloudObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudObjectDataset: %+v", err) } + decoded["type"] = "SalesforceMarketingCloudObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go index 20b449c28a0..1f3aa31fefc 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go @@ -14,6 +14,7 @@ type SalesforceObjectDataset struct { TypeProperties *SalesforceObjectDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SalesforceObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SalesforceObjectDataset{} @@ -34,9 +49,10 @@ func (s SalesforceObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceObjectDataset: %+v", err) } + decoded["type"] = "SalesforceObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go index a8e72503901..4b5142ba544 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go @@ -14,6 +14,7 @@ type SalesforceServiceCloudObjectDataset struct { TypeProperties *SalesforceServiceCloudObjectDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SalesforceServiceCloudObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SalesforceServiceCloudObjectDataset{} @@ -34,9 +49,10 @@ func (s SalesforceServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudObjectDataset: %+v", err) } + decoded["type"] = "SalesforceServiceCloudObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go index 30e0df6e166..490859db731 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go @@ -14,6 +14,7 @@ type SalesforceServiceCloudV2ObjectDataset struct { TypeProperties *SalesforceServiceCloudV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SalesforceServiceCloudV2ObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SalesforceServiceCloudV2ObjectDataset{} @@ -34,9 +49,10 @@ func (s SalesforceServiceCloudV2ObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) } + decoded["type"] = "SalesforceServiceCloudV2Object" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go index 8370fe244bb..1cc0ff1fc0b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go @@ -14,6 +14,7 @@ type SalesforceV2ObjectDataset struct { TypeProperties *SalesforceV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SalesforceV2ObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SalesforceV2ObjectDataset{} @@ -34,9 +49,10 @@ func (s SalesforceV2ObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceV2ObjectDataset: %+v", err) } + decoded["type"] = "SalesforceV2Object" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go index 922fcc6d30c..6d0a62eb77c 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go @@ -13,6 +13,7 @@ var _ Dataset = SapBwCubeDataset{} type SapBwCubeDataset struct { // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -20,6 +21,20 @@ type SapBwCubeDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapBwCubeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapBwCubeDataset{} @@ -33,9 +48,10 @@ func (s SapBwCubeDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapBwCubeDataset: %+v", err) } + decoded["type"] = "SapBwCube" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go index 43139ebb934..48b3af7c10b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go @@ -14,6 +14,7 @@ type SapCloudForCustomerResourceDataset struct { TypeProperties SapCloudForCustomerResourceDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapCloudForCustomerResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapCloudForCustomerResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapCloudForCustomerResourceDataset{} @@ -34,9 +49,10 @@ func (s SapCloudForCustomerResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapCloudForCustomerResourceDataset: %+v", err) } + decoded["type"] = "SapCloudForCustomerResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go index 9d635944b1c..7c33dd9e387 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go @@ -14,6 +14,7 @@ type SapEccResourceDataset struct { TypeProperties SapEccResourceDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapEccResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapEccResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapEccResourceDataset{} @@ -34,9 +49,10 @@ func (s SapEccResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapEccResourceDataset: %+v", err) } + decoded["type"] = "SapEccResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go index 7720a0e5943..a2a76461dac 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go @@ -14,6 +14,7 @@ type SapHanaTableDataset struct { TypeProperties *SapHanaTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapHanaTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapHanaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapHanaTableDataset{} @@ -34,9 +49,10 @@ func (s SapHanaTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapHanaTableDataset: %+v", err) } + decoded["type"] = "SapHanaTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go index 16968f7e16c..77b9c282188 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go @@ -14,6 +14,7 @@ type SapOdpResourceDataset struct { TypeProperties SapOdpResourceDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapOdpResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapOdpResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapOdpResourceDataset{} @@ -34,9 +49,10 @@ func (s SapOdpResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOdpResourceDataset: %+v", err) } + decoded["type"] = "SapOdpResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go index 6c05b0b34fc..b82133e5133 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go @@ -14,6 +14,7 @@ type SapOpenHubTableDataset struct { TypeProperties SapOpenHubTableDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapOpenHubTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapOpenHubTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapOpenHubTableDataset{} @@ -34,9 +49,10 @@ func (s SapOpenHubTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOpenHubTableDataset: %+v", err) } + decoded["type"] = "SapOpenHubTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go index 7a350c2cf64..1564b32afe2 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go @@ -14,6 +14,7 @@ type SapTableResourceDataset struct { TypeProperties SapTableResourceDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SapTableResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SapTableResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SapTableResourceDataset{} @@ -34,9 +49,10 @@ func (s SapTableResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapTableResourceDataset: %+v", err) } + decoded["type"] = "SapTableResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go index 7f55937902a..9a1770b54df 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go @@ -14,6 +14,7 @@ type ServiceNowObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ServiceNowObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ServiceNowObjectDataset{} @@ -34,9 +49,10 @@ func (s ServiceNowObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowObjectDataset: %+v", err) } + decoded["type"] = "ServiceNowObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go index 76425f9d156..c8adc0f91d2 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go @@ -14,6 +14,7 @@ type ServiceNowV2ObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ServiceNowV2ObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowV2ObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ServiceNowV2ObjectDataset{} @@ -34,9 +49,10 @@ func (s ServiceNowV2ObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowV2ObjectDataset: %+v", err) } + decoded["type"] = "ServiceNowV2Object" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go index 7199e2cc7cd..2f187f66f14 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go @@ -13,8 +13,18 @@ var _ DatasetLocation = SftpLocation{} type SftpLocation struct { // Fields inherited from DatasetLocation + FileName *string `json:"fileName,omitempty"` FolderPath *string `json:"folderPath,omitempty"` + Type string `json:"type"` +} + +func (s SftpLocation) DatasetLocation() BaseDatasetLocationImpl { + return BaseDatasetLocationImpl{ + FileName: s.FileName, + FolderPath: s.FolderPath, + Type: s.Type, + } } var _ json.Marshaler = SftpLocation{} @@ -28,9 +38,10 @@ func (s SftpLocation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SftpLocation: %+v", err) } + decoded["type"] = "SftpLocation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go index 10b1c60fe3e..0d546daf3ef 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go @@ -14,6 +14,7 @@ type SharePointOnlineListResourceDataset struct { TypeProperties *SharePointOnlineListDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SharePointOnlineListResourceDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SharePointOnlineListResourceDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SharePointOnlineListResourceDataset{} @@ -34,9 +49,10 @@ func (s SharePointOnlineListResourceDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharePointOnlineListResourceDataset: %+v", err) } + decoded["type"] = "SharePointOnlineListResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go index 24899249693..ebd3e4bd0fb 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go @@ -14,6 +14,7 @@ type ShopifyObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ShopifyObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ShopifyObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ShopifyObjectDataset{} @@ -34,9 +49,10 @@ func (s ShopifyObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ShopifyObjectDataset: %+v", err) } + decoded["type"] = "ShopifyObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go index 957d1c855d8..a6eeb254830 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go @@ -14,6 +14,7 @@ type SnowflakeDataset struct { TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SnowflakeDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SnowflakeDataset{} @@ -34,9 +49,10 @@ func (s SnowflakeDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeDataset: %+v", err) } + decoded["type"] = "SnowflakeTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go index 8eb3c076f68..e6a11f830fd 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go @@ -14,6 +14,7 @@ type SnowflakeV2Dataset struct { TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SnowflakeV2Dataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeV2Dataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SnowflakeV2Dataset{} @@ -34,9 +49,10 @@ func (s SnowflakeV2Dataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeV2Dataset: %+v", err) } + decoded["type"] = "SnowflakeV2Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go index b991dffc760..7562371e33d 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go @@ -14,6 +14,7 @@ type SparkObjectDataset struct { TypeProperties *SparkDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SparkObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SparkObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SparkObjectDataset{} @@ -34,9 +49,10 @@ func (s SparkObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkObjectDataset: %+v", err) } + decoded["type"] = "SparkObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go index b1216c1ae53..bc8c4d4836b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go @@ -14,6 +14,7 @@ type SqlServerTableDataset struct { TypeProperties *SqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SqlServerTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SqlServerTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SqlServerTableDataset{} @@ -34,9 +49,10 @@ func (s SqlServerTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerTableDataset: %+v", err) } + decoded["type"] = "SqlServerTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go index 197beccf51d..48a5421db89 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go @@ -14,6 +14,7 @@ type SquareObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SquareObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SquareObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SquareObjectDataset{} @@ -34,9 +49,10 @@ func (s SquareObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SquareObjectDataset: %+v", err) } + decoded["type"] = "SquareObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go index 43e2aebbd9a..b9031548d45 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go @@ -14,6 +14,7 @@ type SybaseTableDataset struct { TypeProperties *SybaseTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type SybaseTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s SybaseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = SybaseTableDataset{} @@ -34,9 +49,10 @@ func (s SybaseTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SybaseTableDataset: %+v", err) } + decoded["type"] = "SybaseTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go index d96c76bc16e..01c8be23f9d 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go @@ -14,6 +14,7 @@ type TeradataTableDataset struct { TypeProperties *TeradataTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type TeradataTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s TeradataTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = TeradataTableDataset{} @@ -34,9 +49,10 @@ func (s TeradataTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TeradataTableDataset: %+v", err) } + decoded["type"] = "TeradataTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go index d32ebdb6e6d..858732fa985 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go @@ -22,8 +22,18 @@ type TextFormat struct { TreatEmptyAsNull *bool `json:"treatEmptyAsNull,omitempty"` // Fields inherited from DatasetStorageFormat + Deserializer *string `json:"deserializer,omitempty"` Serializer *string `json:"serializer,omitempty"` + Type string `json:"type"` +} + +func (s TextFormat) DatasetStorageFormat() BaseDatasetStorageFormatImpl { + return BaseDatasetStorageFormatImpl{ + Deserializer: s.Deserializer, + Serializer: s.Serializer, + Type: s.Type, + } } var _ json.Marshaler = TextFormat{} @@ -37,9 +47,10 @@ func (s TextFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextFormat: %+v", err) } + decoded["type"] = "TextFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go index 1b1be813e2f..1b4008c034f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go @@ -14,6 +14,7 @@ type VerticaTableDataset struct { TypeProperties *VerticaDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type VerticaTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s VerticaTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = VerticaTableDataset{} @@ -34,9 +49,10 @@ func (s VerticaTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VerticaTableDataset: %+v", err) } + decoded["type"] = "VerticaTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go index 1be360d523f..c844313d05d 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go @@ -14,6 +14,7 @@ type WarehouseTableDataset struct { TypeProperties *WarehouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type WarehouseTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s WarehouseTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = WarehouseTableDataset{} @@ -34,9 +49,10 @@ func (s WarehouseTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarehouseTableDataset: %+v", err) } + decoded["type"] = "WarehouseTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go index 43ac9694724..9b8452e03ca 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go @@ -14,6 +14,7 @@ type WebTableDataset struct { TypeProperties WebTableDatasetTypeProperties `json:"typeProperties"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type WebTableDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s WebTableDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = WebTableDataset{} @@ -34,9 +49,10 @@ func (s WebTableDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebTableDataset: %+v", err) } + decoded["type"] = "WebTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go index 5181f88ed77..649f70cf108 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go @@ -14,6 +14,7 @@ type XeroObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type XeroObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s XeroObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = XeroObjectDataset{} @@ -34,9 +49,10 @@ func (s XeroObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XeroObjectDataset: %+v", err) } + decoded["type"] = "XeroObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go index e99d34f1a48..3b5b5fd134b 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go @@ -14,6 +14,7 @@ type XmlDataset struct { TypeProperties *XmlDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type XmlDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s XmlDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = XmlDataset{} @@ -34,9 +49,10 @@ func (s XmlDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XmlDataset: %+v", err) } + decoded["type"] = "Xml" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go index eeaf1624b39..6fc9dfccda3 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go @@ -34,7 +34,7 @@ func (s *XmlDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["location"]; ok { - impl, err := unmarshalDatasetLocationImplementation(v) + impl, err := UnmarshalDatasetLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Location' for 'XmlDatasetTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go index 34fa0189186..ac118afdf16 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go @@ -14,6 +14,7 @@ type ZohoObjectDataset struct { TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` Folder *DatasetFolder `json:"folder,omitempty"` @@ -21,6 +22,20 @@ type ZohoObjectDataset struct { Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` Schema *interface{} `json:"schema,omitempty"` Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` +} + +func (s ZohoObjectDataset) Dataset() BaseDatasetImpl { + return BaseDatasetImpl{ + Annotations: s.Annotations, + Description: s.Description, + Folder: s.Folder, + LinkedServiceName: s.LinkedServiceName, + Parameters: s.Parameters, + Schema: s.Schema, + Structure: s.Structure, + Type: s.Type, + } } var _ json.Marshaler = ZohoObjectDataset{} @@ -34,9 +49,10 @@ func (s ZohoObjectDataset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ZohoObjectDataset: %+v", err) } + decoded["type"] = "ZohoObject" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/datasets/version.go b/resource-manager/datafactory/2018-06-01/datasets/version.go index ae00c1b3b45..852bb3b7576 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/version.go +++ b/resource-manager/datafactory/2018-06-01/datasets/version.go @@ -1,12 +1,10 @@ package datasets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datasets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datasets/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/README.md b/resource-manager/datafactory/2018-06-01/exposurecontrol/README.md index 13b705dc4f7..59ab08a8e7a 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/README.md +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/exposurecontrol` Documentation -The `exposurecontrol` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `exposurecontrol` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/client.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/client.go index 134dc6d09ca..6bab51bc23b 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/client.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/client.go @@ -15,7 +15,7 @@ type ExposureControlClient struct { } func NewExposureControlClientWithBaseURI(sdkApi sdkEnv.Api) (*ExposureControlClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "exposurecontrol", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "exposurecontrol", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExposureControlClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/id_factory.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/id_factory.go index f597d256b57..58fb3ca05e6 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/id_location.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/id_location.go index 2e7085e1222..4fd5cb79809 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/id_location.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevalue.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevalue.go index 2bd0299758c..9511f336e12 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevalue.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevalue.go @@ -50,7 +50,6 @@ func (c ExposureControlClient) GetFeatureValue(ctx context.Context, id LocationI var model ExposureControlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevaluebyfactory.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevaluebyfactory.go index 1924085d3ee..90bc6d0045f 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevaluebyfactory.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_getfeaturevaluebyfactory.go @@ -50,7 +50,6 @@ func (c ExposureControlClient) GetFeatureValueByFactory(ctx context.Context, id var model ExposureControlResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_queryfeaturevaluesbyfactory.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_queryfeaturevaluesbyfactory.go index 71401feee51..0563f8b3da1 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/method_queryfeaturevaluesbyfactory.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/method_queryfeaturevaluesbyfactory.go @@ -50,7 +50,6 @@ func (c ExposureControlClient) QueryFeatureValuesByFactory(ctx context.Context, var model ExposureControlBatchResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/exposurecontrol/version.go b/resource-manager/datafactory/2018-06-01/exposurecontrol/version.go index 6a69c23cd32..695c77f54ca 100644 --- a/resource-manager/datafactory/2018-06-01/exposurecontrol/version.go +++ b/resource-manager/datafactory/2018-06-01/exposurecontrol/version.go @@ -1,12 +1,10 @@ package exposurecontrol -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/exposurecontrol/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/exposurecontrol/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/factories/README.md b/resource-manager/datafactory/2018-06-01/factories/README.md index a6dd1fc8bb3..1563aa27a57 100644 --- a/resource-manager/datafactory/2018-06-01/factories/README.md +++ b/resource-manager/datafactory/2018-06-01/factories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/factories` Documentation -The `factories` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `factories` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/factories/client.go b/resource-manager/datafactory/2018-06-01/factories/client.go index da22ad6192c..af5c79cf4b6 100644 --- a/resource-manager/datafactory/2018-06-01/factories/client.go +++ b/resource-manager/datafactory/2018-06-01/factories/client.go @@ -15,7 +15,7 @@ type FactoriesClient struct { } func NewFactoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*FactoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "factories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "factories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FactoriesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/factories/id_factory.go b/resource-manager/datafactory/2018-06-01/factories/id_factory.go index 91473b750f1..cc41f791b8c 100644 --- a/resource-manager/datafactory/2018-06-01/factories/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/factories/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/factories/id_location.go b/resource-manager/datafactory/2018-06-01/factories/id_location.go index c7b76f23c31..ddba36b604a 100644 --- a/resource-manager/datafactory/2018-06-01/factories/id_location.go +++ b/resource-manager/datafactory/2018-06-01/factories/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_configurefactoryrepo.go b/resource-manager/datafactory/2018-06-01/factories/method_configurefactoryrepo.go index 6480203dc89..e9ad7b26e2f 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_configurefactoryrepo.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_configurefactoryrepo.go @@ -50,7 +50,6 @@ func (c FactoriesClient) ConfigureFactoryRepo(ctx context.Context, id LocationId var model Factory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/factories/method_createorupdate.go index d572f7c9f81..ca66c3ca44b 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c FactoriesClient) CreateOrUpdate(ctx context.Context, id FactoryId, input var model Factory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_get.go b/resource-manager/datafactory/2018-06-01/factories/method_get.go index 5ef5d19abce..8066b20859e 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_get.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FactoriesClient) Get(ctx context.Context, id FactoryId, options GetOpera var model Factory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_getdataplaneaccess.go b/resource-manager/datafactory/2018-06-01/factories/method_getdataplaneaccess.go index 1be448f2ae3..ba33880e016 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_getdataplaneaccess.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_getdataplaneaccess.go @@ -50,7 +50,6 @@ func (c FactoriesClient) GetDataPlaneAccess(ctx context.Context, id FactoryId, i var model AccessPolicyResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_getgithubaccesstoken.go b/resource-manager/datafactory/2018-06-01/factories/method_getgithubaccesstoken.go index e5b9ddf3fc8..2c91cbf2a66 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_getgithubaccesstoken.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_getgithubaccesstoken.go @@ -50,7 +50,6 @@ func (c FactoriesClient) GetGitHubAccessToken(ctx context.Context, id FactoryId, var model GitHubAccessTokenResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/method_update.go b/resource-manager/datafactory/2018-06-01/factories/method_update.go index a9f0e189762..b0fc178d30e 100644 --- a/resource-manager/datafactory/2018-06-01/factories/method_update.go +++ b/resource-manager/datafactory/2018-06-01/factories/method_update.go @@ -49,7 +49,6 @@ func (c FactoriesClient) Update(ctx context.Context, id FactoryId, input Factory var model Factory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/factories/model_factorygithubconfiguration.go b/resource-manager/datafactory/2018-06-01/factories/model_factorygithubconfiguration.go index 804f48ec09f..840475e30a8 100644 --- a/resource-manager/datafactory/2018-06-01/factories/model_factorygithubconfiguration.go +++ b/resource-manager/datafactory/2018-06-01/factories/model_factorygithubconfiguration.go @@ -16,12 +16,26 @@ type FactoryGitHubConfiguration struct { HostName *string `json:"hostName,omitempty"` // Fields inherited from FactoryRepoConfiguration + AccountName string `json:"accountName"` CollaborationBranch string `json:"collaborationBranch"` DisablePublish *bool `json:"disablePublish,omitempty"` LastCommitId *string `json:"lastCommitId,omitempty"` RepositoryName string `json:"repositoryName"` RootFolder string `json:"rootFolder"` + Type string `json:"type"` +} + +func (s FactoryGitHubConfiguration) FactoryRepoConfiguration() BaseFactoryRepoConfigurationImpl { + return BaseFactoryRepoConfigurationImpl{ + AccountName: s.AccountName, + CollaborationBranch: s.CollaborationBranch, + DisablePublish: s.DisablePublish, + LastCommitId: s.LastCommitId, + RepositoryName: s.RepositoryName, + RootFolder: s.RootFolder, + Type: s.Type, + } } var _ json.Marshaler = FactoryGitHubConfiguration{} @@ -35,9 +49,10 @@ func (s FactoryGitHubConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FactoryGitHubConfiguration: %+v", err) } + decoded["type"] = "FactoryGitHubConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/factories/model_factoryproperties.go b/resource-manager/datafactory/2018-06-01/factories/model_factoryproperties.go index 853ab92d91c..e3e41583e76 100644 --- a/resource-manager/datafactory/2018-06-01/factories/model_factoryproperties.go +++ b/resource-manager/datafactory/2018-06-01/factories/model_factoryproperties.go @@ -57,7 +57,7 @@ func (s *FactoryProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["repoConfiguration"]; ok { - impl, err := unmarshalFactoryRepoConfigurationImplementation(v) + impl, err := UnmarshalFactoryRepoConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RepoConfiguration' for 'FactoryProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoconfiguration.go b/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoconfiguration.go index 37176cae866..8835bc73d81 100644 --- a/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoconfiguration.go +++ b/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoconfiguration.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FactoryRepoConfiguration interface { + FactoryRepoConfiguration() BaseFactoryRepoConfigurationImpl } -// RawFactoryRepoConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FactoryRepoConfiguration = BaseFactoryRepoConfigurationImpl{} + +type BaseFactoryRepoConfigurationImpl struct { + AccountName string `json:"accountName"` + CollaborationBranch string `json:"collaborationBranch"` + DisablePublish *bool `json:"disablePublish,omitempty"` + LastCommitId *string `json:"lastCommitId,omitempty"` + RepositoryName string `json:"repositoryName"` + RootFolder string `json:"rootFolder"` + Type string `json:"type"` +} + +func (s BaseFactoryRepoConfigurationImpl) FactoryRepoConfiguration() BaseFactoryRepoConfigurationImpl { + return s +} + +var _ FactoryRepoConfiguration = RawFactoryRepoConfigurationImpl{} + +// RawFactoryRepoConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFactoryRepoConfigurationImpl struct { - Type string - Values map[string]interface{} + factoryRepoConfiguration BaseFactoryRepoConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawFactoryRepoConfigurationImpl) FactoryRepoConfiguration() BaseFactoryRepoConfigurationImpl { + return s.factoryRepoConfiguration } -func unmarshalFactoryRepoConfigurationImplementation(input []byte) (FactoryRepoConfiguration, error) { +func UnmarshalFactoryRepoConfigurationImplementation(input []byte) (FactoryRepoConfiguration, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalFactoryRepoConfigurationImplementation(input []byte) (FactoryRepoC return out, nil } - out := RawFactoryRepoConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseFactoryRepoConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFactoryRepoConfigurationImpl: %+v", err) } - return out, nil + + return RawFactoryRepoConfigurationImpl{ + factoryRepoConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoupdate.go b/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoupdate.go index 29a449011d1..d6399c22855 100644 --- a/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoupdate.go +++ b/resource-manager/datafactory/2018-06-01/factories/model_factoryrepoupdate.go @@ -30,7 +30,7 @@ func (s *FactoryRepoUpdate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["repoConfiguration"]; ok { - impl, err := unmarshalFactoryRepoConfigurationImplementation(v) + impl, err := UnmarshalFactoryRepoConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RepoConfiguration' for 'FactoryRepoUpdate': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/factories/model_factoryvstsconfiguration.go b/resource-manager/datafactory/2018-06-01/factories/model_factoryvstsconfiguration.go index bedcfa1237f..d94a3c771bf 100644 --- a/resource-manager/datafactory/2018-06-01/factories/model_factoryvstsconfiguration.go +++ b/resource-manager/datafactory/2018-06-01/factories/model_factoryvstsconfiguration.go @@ -15,12 +15,26 @@ type FactoryVSTSConfiguration struct { TenantId *string `json:"tenantId,omitempty"` // Fields inherited from FactoryRepoConfiguration + AccountName string `json:"accountName"` CollaborationBranch string `json:"collaborationBranch"` DisablePublish *bool `json:"disablePublish,omitempty"` LastCommitId *string `json:"lastCommitId,omitempty"` RepositoryName string `json:"repositoryName"` RootFolder string `json:"rootFolder"` + Type string `json:"type"` +} + +func (s FactoryVSTSConfiguration) FactoryRepoConfiguration() BaseFactoryRepoConfigurationImpl { + return BaseFactoryRepoConfigurationImpl{ + AccountName: s.AccountName, + CollaborationBranch: s.CollaborationBranch, + DisablePublish: s.DisablePublish, + LastCommitId: s.LastCommitId, + RepositoryName: s.RepositoryName, + RootFolder: s.RootFolder, + Type: s.Type, + } } var _ json.Marshaler = FactoryVSTSConfiguration{} @@ -34,9 +48,10 @@ func (s FactoryVSTSConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FactoryVSTSConfiguration: %+v", err) } + decoded["type"] = "FactoryVSTSConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/factories/version.go b/resource-manager/datafactory/2018-06-01/factories/version.go index 17590682c70..f856e96c3b9 100644 --- a/resource-manager/datafactory/2018-06-01/factories/version.go +++ b/resource-manager/datafactory/2018-06-01/factories/version.go @@ -1,12 +1,10 @@ package factories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/factories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/factories/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/README.md b/resource-manager/datafactory/2018-06-01/globalparameters/README.md index 6f9d84fd4ce..b6f0eac384e 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/README.md +++ b/resource-manager/datafactory/2018-06-01/globalparameters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/globalparameters` Documentation -The `globalparameters` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `globalparameters` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/client.go b/resource-manager/datafactory/2018-06-01/globalparameters/client.go index 4660f998905..a10cfd62089 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/client.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/client.go @@ -15,7 +15,7 @@ type GlobalParametersClient struct { } func NewGlobalParametersClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalParametersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalparameters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalparameters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalParametersClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/id_factory.go b/resource-manager/datafactory/2018-06-01/globalparameters/id_factory.go index 8c0ce1af091..e523a9f44cb 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/id_globalparameter.go b/resource-manager/datafactory/2018-06-01/globalparameters/id_globalparameter.go index 6de363a4eb5..a6b39ced549 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/id_globalparameter.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/id_globalparameter.go @@ -44,7 +44,7 @@ func ParseGlobalParameterID(input string) (*GlobalParameterId, error) { } id := GlobalParameterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGlobalParameterIDInsensitively(input string) (*GlobalParameterId, erro } id := GlobalParameterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/globalparameters/method_createorupdate.go index fa4937a04fe..3d131b1d6f3 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/method_createorupdate.go @@ -49,7 +49,6 @@ func (c GlobalParametersClient) CreateOrUpdate(ctx context.Context, id GlobalPar var model GlobalParameterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/method_get.go b/resource-manager/datafactory/2018-06-01/globalparameters/method_get.go index fa023f34ec0..b8cf8de045a 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/method_get.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/method_get.go @@ -45,7 +45,6 @@ func (c GlobalParametersClient) Get(ctx context.Context, id GlobalParameterId) ( var model GlobalParameterResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/globalparameters/version.go b/resource-manager/datafactory/2018-06-01/globalparameters/version.go index 4695ade02a8..23af5cf6fca 100644 --- a/resource-manager/datafactory/2018-06-01/globalparameters/version.go +++ b/resource-manager/datafactory/2018-06-01/globalparameters/version.go @@ -1,12 +1,10 @@ package globalparameters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalparameters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalparameters/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/README.md b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/README.md index b7b81295034..4e256c8926d 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/README.md +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/integrationruntimenodes` Documentation -The `integrationruntimenodes` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `integrationruntimenodes` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/client.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/client.go index 1def970a2ab..25d0abbe701 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/client.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/client.go @@ -15,7 +15,7 @@ type IntegrationRuntimeNodesClient struct { } func NewIntegrationRuntimeNodesClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationRuntimeNodesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationruntimenodes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationruntimenodes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationRuntimeNodesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/id_node.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/id_node.go index b72382f848c..12caada02d6 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/id_node.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/id_node.go @@ -46,7 +46,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_get.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_get.go index 23b2d1e6e8a..dd54cb6fde2 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_get.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationRuntimeNodesClient) Get(ctx context.Context, id NodeId) (resu var model SelfHostedIntegrationRuntimeNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_getipaddress.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_getipaddress.go index f2d0b2acc60..029e1a24bc0 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_getipaddress.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_getipaddress.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeNodesClient) GetIPAddress(ctx context.Context, id Node var model IntegrationRuntimeNodeIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_update.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_update.go index 7b64f01ce7e..e7e2953ef20 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_update.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/method_update.go @@ -49,7 +49,6 @@ func (c IntegrationRuntimeNodesClient) Update(ctx context.Context, id NodeId, in var model SelfHostedIntegrationRuntimeNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/version.go b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/version.go index c562327a7c0..9f5a0787a43 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimenodes/version.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimenodes/version.go @@ -1,12 +1,10 @@ package integrationruntimenodes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationruntimenodes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationruntimenodes/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md index 922be3b8dfe..efd3c34e987 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata` Documentation -The `integrationruntimeobjectmetadata` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `integrationruntimeobjectmetadata` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/client.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/client.go index 9aa1fd228dc..53dc535ad09 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/client.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/client.go @@ -15,7 +15,7 @@ type IntegrationRuntimeObjectMetadataClient struct { } func NewIntegrationRuntimeObjectMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationRuntimeObjectMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationruntimeobjectmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationruntimeobjectmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationRuntimeObjectMetadataClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/id_integrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/id_integrationruntime.go index 350b3a455df..a678221455f 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/id_integrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/id_integrationruntime.go @@ -44,7 +44,7 @@ func ParseIntegrationRuntimeID(input string) (*IntegrationRuntimeId, error) { } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntegrationRuntimeIDInsensitively(input string) (*IntegrationRuntimeId } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/version.go b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/version.go index 8cf427ecd8e..dae406104b0 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/version.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimeobjectmetadata/version.go @@ -1,12 +1,10 @@ package integrationruntimeobjectmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationruntimeobjectmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationruntimeobjectmetadata/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/README.md b/resource-manager/datafactory/2018-06-01/integrationruntimes/README.md index 49a1d0ff094..829c54ffb73 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/README.md +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/integrationruntimes` Documentation -The `integrationruntimes` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `integrationruntimes` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/client.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/client.go index a2601dc5e85..f94eefeabde 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/client.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/client.go @@ -15,7 +15,7 @@ type IntegrationRuntimesClient struct { } func NewIntegrationRuntimesClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationRuntimesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationruntimes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationruntimes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationRuntimesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/id_factory.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/id_factory.go index 342db747703..3cda14af6a4 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/id_integrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/id_integrationruntime.go index a82d562e7a8..8afca4ee044 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/id_integrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/id_integrationruntime.go @@ -44,7 +44,7 @@ func ParseIntegrationRuntimeID(input string) (*IntegrationRuntimeId, error) { } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntegrationRuntimeIDInsensitively(input string) (*IntegrationRuntimeId } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createlinkedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createlinkedintegrationruntime.go index 7753b0ad353..5246156550e 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createlinkedintegrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createlinkedintegrationruntime.go @@ -50,7 +50,6 @@ func (c IntegrationRuntimesClient) CreateLinkedIntegrationRuntime(ctx context.Co var model IntegrationRuntimeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createorupdate.go index d5554b7f3d1..516de93c266 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c IntegrationRuntimesClient) CreateOrUpdate(ctx context.Context, id Integr var model IntegrationRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_get.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_get.go index 528235f7daa..4e4f6c2a7bc 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_get.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IntegrationRuntimesClient) Get(ctx context.Context, id IntegrationRuntim var model IntegrationRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getconnectioninfo.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getconnectioninfo.go index 3917a11bd7d..eef15bda47b 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getconnectioninfo.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getconnectioninfo.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) GetConnectionInfo(ctx context.Context, id Int var model IntegrationRuntimeConnectionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getmonitoringdata.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getmonitoringdata.go index 21fce7f5ef9..30ab6597d57 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getmonitoringdata.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getmonitoringdata.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) GetMonitoringData(ctx context.Context, id Int var model IntegrationRuntimeMonitoringData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getstatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getstatus.go index 7679ce33573..e10d7602937 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getstatus.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_getstatus.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) GetStatus(ctx context.Context, id Integration var model IntegrationRuntimeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listauthkeys.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listauthkeys.go index ce2bb4dc167..4de9955eacc 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listauthkeys.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listauthkeys.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) ListAuthKeys(ctx context.Context, id Integrat var model IntegrationRuntimeAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go index 7311ab42ab1..2bef1952ab9 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpoints(ctx var model IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_regenerateauthkey.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_regenerateauthkey.go index 5fee7e849ea..c97dce0fc9d 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_regenerateauthkey.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_regenerateauthkey.go @@ -50,7 +50,6 @@ func (c IntegrationRuntimesClient) RegenerateAuthKey(ctx context.Context, id Int var model IntegrationRuntimeAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_update.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_update.go index dfb8feba810..d1ed5a65988 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/method_update.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/method_update.go @@ -49,7 +49,6 @@ func (c IntegrationRuntimesClient) Update(ctx context.Context, id IntegrationRun var model IntegrationRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go index d7a0d84812c..05126f9482b 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go @@ -14,6 +14,14 @@ type AzPowerShellSetup struct { TypeProperties AzPowerShellSetupTypeProperties `json:"typeProperties"` // Fields inherited from CustomSetupBase + + Type string `json:"type"` +} + +func (s AzPowerShellSetup) CustomSetupBase() BaseCustomSetupBaseImpl { + return BaseCustomSetupBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzPowerShellSetup{} @@ -27,9 +35,10 @@ func (s AzPowerShellSetup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzPowerShellSetup: %+v", err) } + decoded["type"] = "AzPowerShellSetup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go index c521f424b38..963a6a8ad11 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go @@ -14,6 +14,14 @@ type CmdkeySetup struct { TypeProperties CmdkeySetupTypeProperties `json:"typeProperties"` // Fields inherited from CustomSetupBase + + Type string `json:"type"` +} + +func (s CmdkeySetup) CustomSetupBase() BaseCustomSetupBaseImpl { + return BaseCustomSetupBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = CmdkeySetup{} @@ -27,9 +35,10 @@ func (s CmdkeySetup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CmdkeySetup: %+v", err) } + decoded["type"] = "CmdkeySetup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go index 797ac5be3b3..d4ec61ac210 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go @@ -32,7 +32,7 @@ func (s *CmdkeySetupTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'CmdkeySetupTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go index 8d80fb9d69f..16a6997b5c0 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go @@ -14,6 +14,14 @@ type ComponentSetup struct { TypeProperties LicensedComponentSetupTypeProperties `json:"typeProperties"` // Fields inherited from CustomSetupBase + + Type string `json:"type"` +} + +func (s ComponentSetup) CustomSetupBase() BaseCustomSetupBaseImpl { + return BaseCustomSetupBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ComponentSetup{} @@ -27,9 +35,10 @@ func (s ComponentSetup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ComponentSetup: %+v", err) } + decoded["type"] = "ComponentSetup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go index fe66c75cb8b..12628b2d787 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomSetupBase interface { + CustomSetupBase() BaseCustomSetupBaseImpl } -// RawCustomSetupBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomSetupBase = BaseCustomSetupBaseImpl{} + +type BaseCustomSetupBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseCustomSetupBaseImpl) CustomSetupBase() BaseCustomSetupBaseImpl { + return s +} + +var _ CustomSetupBase = RawCustomSetupBaseImpl{} + +// RawCustomSetupBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomSetupBaseImpl struct { - Type string - Values map[string]interface{} + customSetupBase BaseCustomSetupBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomSetupBaseImpl) CustomSetupBase() BaseCustomSetupBaseImpl { + return s.customSetupBase } -func unmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, error) { +func UnmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, erro return out, nil } - out := RawCustomSetupBaseImpl{ - Type: value, - Values: temp, + var parent BaseCustomSetupBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomSetupBaseImpl: %+v", err) } - return out, nil + + return RawCustomSetupBaseImpl{ + customSetupBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go index c9e31ea61a7..ea6a0efcf73 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go @@ -14,6 +14,14 @@ type EnvironmentVariableSetup struct { TypeProperties EnvironmentVariableSetupTypeProperties `json:"typeProperties"` // Fields inherited from CustomSetupBase + + Type string `json:"type"` +} + +func (s EnvironmentVariableSetup) CustomSetupBase() BaseCustomSetupBaseImpl { + return BaseCustomSetupBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = EnvironmentVariableSetup{} @@ -27,9 +35,10 @@ func (s EnvironmentVariableSetup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EnvironmentVariableSetup: %+v", err) } + decoded["type"] = "EnvironmentVariableSetup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go index e500a979909..85cc87746ba 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IntegrationRuntime interface { + IntegrationRuntime() BaseIntegrationRuntimeImpl } -// RawIntegrationRuntimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IntegrationRuntime = BaseIntegrationRuntimeImpl{} + +type BaseIntegrationRuntimeImpl struct { + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s BaseIntegrationRuntimeImpl) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return s +} + +var _ IntegrationRuntime = RawIntegrationRuntimeImpl{} + +// RawIntegrationRuntimeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIntegrationRuntimeImpl struct { - Type string - Values map[string]interface{} + integrationRuntime BaseIntegrationRuntimeImpl + Type string + Values map[string]interface{} +} + +func (s RawIntegrationRuntimeImpl) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return s.integrationRuntime } -func unmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime, error) { +func UnmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime return out, nil } - out := RawIntegrationRuntimeImpl{ - Type: value, - Values: temp, + var parent BaseIntegrationRuntimeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIntegrationRuntimeImpl: %+v", err) } - return out, nil + + return RawIntegrationRuntimeImpl{ + integrationRuntime: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go index bc1a15b77fd..0b629bccf70 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go @@ -36,7 +36,7 @@ func (s *IntegrationRuntimeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalIntegrationRuntimeImplementation(v) + impl, err := UnmarshalIntegrationRuntimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go index 94a0d529d76..3c88a2b7c72 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go @@ -49,7 +49,7 @@ func (s *IntegrationRuntimeSsisProperties) UnmarshalJSON(bytes []byte) error { output := make([]CustomSetupBase, 0) for i, val := range listTemp { - impl, err := unmarshalCustomSetupBaseImplementation(val) + impl, err := UnmarshalCustomSetupBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ExpressCustomSetupProperties' for 'IntegrationRuntimeSsisProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go index a2423f57c4e..22b5e0018f8 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IntegrationRuntimeStatus interface { + IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl } -// RawIntegrationRuntimeStatusImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IntegrationRuntimeStatus = BaseIntegrationRuntimeStatusImpl{} + +type BaseIntegrationRuntimeStatusImpl struct { + DataFactoryName *string `json:"dataFactoryName,omitempty"` + State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s BaseIntegrationRuntimeStatusImpl) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return s +} + +var _ IntegrationRuntimeStatus = RawIntegrationRuntimeStatusImpl{} + +// RawIntegrationRuntimeStatusImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIntegrationRuntimeStatusImpl struct { - Type string - Values map[string]interface{} + integrationRuntimeStatus BaseIntegrationRuntimeStatusImpl + Type string + Values map[string]interface{} +} + +func (s RawIntegrationRuntimeStatusImpl) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return s.integrationRuntimeStatus } -func unmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationRuntimeStatus, error) { +func UnmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationRuntimeStatus, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationR return out, nil } - out := RawIntegrationRuntimeStatusImpl{ - Type: value, - Values: temp, + var parent BaseIntegrationRuntimeStatusImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIntegrationRuntimeStatusImpl: %+v", err) } - return out, nil + + return RawIntegrationRuntimeStatusImpl{ + integrationRuntimeStatus: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go index 5972880c1a5..b22e4d71ce1 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go @@ -30,7 +30,7 @@ func (s *IntegrationRuntimeStatusResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalIntegrationRuntimeStatusImplementation(v) + impl, err := UnmarshalIntegrationRuntimeStatusImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeStatusResponse': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go index 4d2c8aaf7b5..9e57c047a38 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go @@ -30,7 +30,7 @@ func (s *LicensedComponentSetupTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["licenseKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'LicenseKey' for 'LicensedComponentSetupTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go index cb22fdbc6f3..ac1ed962950 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go @@ -14,6 +14,14 @@ type LinkedIntegrationRuntimeKeyAuthorization struct { Key SecureString `json:"key"` // Fields inherited from LinkedIntegrationRuntimeType + + AuthorizationType string `json:"authorizationType"` +} + +func (s LinkedIntegrationRuntimeKeyAuthorization) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return BaseLinkedIntegrationRuntimeTypeImpl{ + AuthorizationType: s.AuthorizationType, + } } var _ json.Marshaler = LinkedIntegrationRuntimeKeyAuthorization{} @@ -27,9 +35,10 @@ func (s LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeKeyAuthorization: %+v", err) } + decoded["authorizationType"] = "Key" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go index eb4496f3de9..d7e73f9c780 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go @@ -15,6 +15,14 @@ type LinkedIntegrationRuntimeRbacAuthorization struct { ResourceId string `json:"resourceId"` // Fields inherited from LinkedIntegrationRuntimeType + + AuthorizationType string `json:"authorizationType"` +} + +func (s LinkedIntegrationRuntimeRbacAuthorization) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return BaseLinkedIntegrationRuntimeTypeImpl{ + AuthorizationType: s.AuthorizationType, + } } var _ json.Marshaler = LinkedIntegrationRuntimeRbacAuthorization{} @@ -28,9 +36,10 @@ func (s LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeRbacAuthorization: %+v", err) } + decoded["authorizationType"] = "RBAC" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go index 9d27a96d530..be982d97068 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LinkedIntegrationRuntimeType interface { + LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl } -// RawLinkedIntegrationRuntimeTypeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LinkedIntegrationRuntimeType = BaseLinkedIntegrationRuntimeTypeImpl{} + +type BaseLinkedIntegrationRuntimeTypeImpl struct { + AuthorizationType string `json:"authorizationType"` +} + +func (s BaseLinkedIntegrationRuntimeTypeImpl) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return s +} + +var _ LinkedIntegrationRuntimeType = RawLinkedIntegrationRuntimeTypeImpl{} + +// RawLinkedIntegrationRuntimeTypeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLinkedIntegrationRuntimeTypeImpl struct { - Type string - Values map[string]interface{} + linkedIntegrationRuntimeType BaseLinkedIntegrationRuntimeTypeImpl + Type string + Values map[string]interface{} +} + +func (s RawLinkedIntegrationRuntimeTypeImpl) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return s.linkedIntegrationRuntimeType } -func unmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIntegrationRuntimeType, error) { +func UnmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIntegrationRuntimeType, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIn return out, nil } - out := RawLinkedIntegrationRuntimeTypeImpl{ - Type: value, - Values: temp, + var parent BaseLinkedIntegrationRuntimeTypeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLinkedIntegrationRuntimeTypeImpl: %+v", err) } - return out, nil + + return RawLinkedIntegrationRuntimeTypeImpl{ + linkedIntegrationRuntimeType: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go index 6fd19b011fd..f65e5adb98d 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go @@ -16,7 +16,16 @@ type ManagedIntegrationRuntime struct { TypeProperties ManagedIntegrationRuntimeTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntime - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s ManagedIntegrationRuntime) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return BaseIntegrationRuntimeImpl{ + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = ManagedIntegrationRuntime{} @@ -30,9 +39,10 @@ func (s ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntime: %+v", err) } + decoded["type"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go index 4fec6362e36..71a3dd2a5d7 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go @@ -14,8 +14,18 @@ type ManagedIntegrationRuntimeStatus struct { TypeProperties ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s ManagedIntegrationRuntimeStatus) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return BaseIntegrationRuntimeStatusImpl{ + DataFactoryName: s.DataFactoryName, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = ManagedIntegrationRuntimeStatus{} @@ -29,9 +39,10 @@ func (s ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntimeStatus: %+v", err) } + decoded["type"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go index fedb949b9a3..65c1b4d2a78 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretBase interface { + SecretBase() BaseSecretBaseImpl } -// RawSecretBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretBase = BaseSecretBaseImpl{} + +type BaseSecretBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s +} + +var _ SecretBase = RawSecretBaseImpl{} + +// RawSecretBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretBaseImpl struct { - Type string - Values map[string]interface{} + secretBase BaseSecretBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s.secretBase } -func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { +func UnmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { return out, nil } - out := RawSecretBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretBaseImpl: %+v", err) } - return out, nil + + return RawSecretBaseImpl{ + secretBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go index a737aa2596a..bedafbb0f12 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go @@ -14,6 +14,14 @@ type SecureString struct { Value string `json:"value"` // Fields inherited from SecretBase + + Type string `json:"type"` +} + +func (s SecureString) SecretBase() BaseSecretBaseImpl { + return BaseSecretBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SecureString{} @@ -27,9 +35,10 @@ func (s SecureString) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecureString: %+v", err) } + decoded["type"] = "SecureString" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go index 53cb965b889..c8176d29683 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go @@ -14,7 +14,16 @@ type SelfHostedIntegrationRuntime struct { TypeProperties *SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from IntegrationRuntime - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s SelfHostedIntegrationRuntime) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return BaseIntegrationRuntimeImpl{ + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = SelfHostedIntegrationRuntime{} @@ -28,9 +37,10 @@ func (s SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntime: %+v", err) } + decoded["type"] = "SelfHosted" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go index effb44f6e55..637d5a1e411 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go @@ -14,8 +14,18 @@ type SelfHostedIntegrationRuntimeStatus struct { TypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s SelfHostedIntegrationRuntimeStatus) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return BaseIntegrationRuntimeStatusImpl{ + DataFactoryName: s.DataFactoryName, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = SelfHostedIntegrationRuntimeStatus{} @@ -29,9 +39,10 @@ func (s SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntimeStatus: %+v", err) } + decoded["type"] = "SelfHosted" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go index af2513869f4..4d3f59c0400 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go @@ -30,7 +30,7 @@ func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["linkedInfo"]; ok { - impl, err := unmarshalLinkedIntegrationRuntimeTypeImplementation(v) + impl, err := UnmarshalLinkedIntegrationRuntimeTypeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'LinkedInfo' for 'SelfHostedIntegrationRuntimeTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go index 6fc854a47fa..0a2a2c0a1b4 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go @@ -15,9 +15,20 @@ type SsisEnvironment struct { Variables *[]SsisVariable `json:"variables,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisEnvironment) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisEnvironment{} @@ -31,9 +42,10 @@ func (s SsisEnvironment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisEnvironment: %+v", err) } + decoded["type"] = "Environment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go index a7a349ba9fb..a35f954e4e1 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go @@ -13,9 +13,20 @@ var _ SsisObjectMetadata = SsisFolder{} type SsisFolder struct { // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisFolder) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisFolder{} @@ -29,9 +40,10 @@ func (s SsisFolder) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisFolder: %+v", err) } + decoded["type"] = "Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go index a09d65c1d1b..e2388f8626a 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SsisObjectMetadata interface { + SsisObjectMetadata() BaseSsisObjectMetadataImpl } -// RawSsisObjectMetadataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SsisObjectMetadata = BaseSsisObjectMetadataImpl{} + +type BaseSsisObjectMetadataImpl struct { + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s BaseSsisObjectMetadataImpl) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return s +} + +var _ SsisObjectMetadata = RawSsisObjectMetadataImpl{} + +// RawSsisObjectMetadataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSsisObjectMetadataImpl struct { - Type string - Values map[string]interface{} + ssisObjectMetadata BaseSsisObjectMetadataImpl + Type string + Values map[string]interface{} +} + +func (s RawSsisObjectMetadataImpl) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return s.ssisObjectMetadata } -func unmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata, error) { +func UnmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata, error) { if input == nil { return nil, nil } @@ -68,10 +88,15 @@ func unmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata return out, nil } - out := RawSsisObjectMetadataImpl{ - Type: value, - Values: temp, + var parent BaseSsisObjectMetadataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSsisObjectMetadataImpl: %+v", err) } - return out, nil + + return RawSsisObjectMetadataImpl{ + ssisObjectMetadata: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go index 58dfeef4504..0cf8807bcbe 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go @@ -17,9 +17,20 @@ type SsisPackage struct { ProjectVersion *int64 `json:"projectVersion,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisPackage) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisPackage{} @@ -33,9 +44,10 @@ func (s SsisPackage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisPackage: %+v", err) } + decoded["type"] = "Package" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go index c7f5a7e8f0d..5d8f86bde78 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go @@ -17,9 +17,20 @@ type SsisProject struct { Version *int64 `json:"version,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisProject) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisProject{} @@ -33,9 +44,10 @@ func (s SsisProject) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisProject: %+v", err) } + decoded["type"] = "Project" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/version.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/version.go index aff43ec8da8..f58b93255db 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/version.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/version.go @@ -1,12 +1,10 @@ package integrationruntimes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationruntimes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationruntimes/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/README.md b/resource-manager/datafactory/2018-06-01/linkedservices/README.md index 41b04c53f3c..9031c51d00b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/README.md +++ b/resource-manager/datafactory/2018-06-01/linkedservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/linkedservices` Documentation -The `linkedservices` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `linkedservices` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/client.go b/resource-manager/datafactory/2018-06-01/linkedservices/client.go index c016c4a2bb8..3dad68f5d5e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/client.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/client.go @@ -15,7 +15,7 @@ type LinkedServicesClient struct { } func NewLinkedServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedServicesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/id_factory.go b/resource-manager/datafactory/2018-06-01/linkedservices/id_factory.go index 526afa25878..beeb882ae3a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/id_linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/id_linkedservice.go index 48d09df4620..7513ee2ed08 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/id_linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/id_linkedservice.go @@ -44,7 +44,7 @@ func ParseLinkedServiceID(input string) (*LinkedServiceId, error) { } id := LinkedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedServiceIDInsensitively(input string) (*LinkedServiceId, error) { } id := LinkedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/linkedservices/method_createorupdate.go index 8f631277b71..12464e7c656 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c LinkedServicesClient) CreateOrUpdate(ctx context.Context, id LinkedServi var model LinkedServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/method_get.go b/resource-manager/datafactory/2018-06-01/linkedservices/method_get.go index dbf9ce8537c..2bbb1d03988 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/method_get.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LinkedServicesClient) Get(ctx context.Context, id LinkedServiceId, optio var model LinkedServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go index 432447c7ced..9cf1c542947 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go @@ -14,13 +14,26 @@ type AmazonMWSLinkedService struct { TypeProperties AmazonMWSLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonMWSLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonMWSLinkedService{} func (s AmazonMWSLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonMWSLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonMWSLinkedService: %+v", err) } + decoded["type"] = "AmazonMWS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go index 6f49cc9f4ff..bf6a6d79b8e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go @@ -45,7 +45,7 @@ func (s *AmazonMWSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["mwsAuthToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'MwsAuthToken' for 'AmazonMWSLinkedServiceTypeProperties': %+v", err) } @@ -53,7 +53,7 @@ func (s *AmazonMWSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["secretKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretKey' for 'AmazonMWSLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go index 5086312d617..9cf6848a7dc 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go @@ -32,7 +32,7 @@ func (s *AmazonRdsForLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRdsForLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go index 2524be4d12d..3956f50edc7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go @@ -14,13 +14,26 @@ type AmazonRdsForOracleLinkedService struct { TypeProperties AmazonRdsForLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonRdsForOracleLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonRdsForOracleLinkedService{} func (s AmazonRdsForOracleLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonRdsForOracleLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleLinkedService: %+v", err) } + decoded["type"] = "AmazonRdsForOracle" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go index cbf7d7f69ee..41a8532b1c5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go @@ -14,13 +14,26 @@ type AmazonRdsForSqlServerLinkedService struct { TypeProperties AmazonRdsForSqlServerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonRdsForSqlServerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonRdsForSqlServerLinkedService{} func (s AmazonRdsForSqlServerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonRdsForSqlServerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerLinkedService: %+v", err) } + decoded["type"] = "AmazonRdsForSqlServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go index 6659de14636..795625d6333 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go @@ -76,7 +76,7 @@ func (s *AmazonRdsForSqlServerLinkedServiceTypeProperties) UnmarshalJSON(bytes [ } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRdsForSqlServerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go index 364073ea00e..1d010b58dbd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go @@ -14,13 +14,26 @@ type AmazonRedshiftLinkedService struct { TypeProperties AmazonRedshiftLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonRedshiftLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonRedshiftLinkedService{} func (s AmazonRedshiftLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonRedshiftLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRedshiftLinkedService: %+v", err) } + decoded["type"] = "AmazonRedshift" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go index a577adbee12..e62169be45f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *AmazonRedshiftLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRedshiftLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go index 48d0e1c857f..d8b5013a524 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go @@ -14,13 +14,26 @@ type AmazonS3CompatibleLinkedService struct { TypeProperties AmazonS3CompatibleLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonS3CompatibleLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonS3CompatibleLinkedService{} func (s AmazonS3CompatibleLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonS3CompatibleLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleLinkedService: %+v", err) } + decoded["type"] = "AmazonS3Compatible" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go index 78daa1b5f18..99e17bdd5c7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go @@ -36,7 +36,7 @@ func (s *AmazonS3CompatibleLinkedServiceTypeProperties) UnmarshalJSON(bytes []by } if v, ok := temp["secretAccessKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'AmazonS3CompatibleLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go index 97c02f8b282..1bec3ecbcbd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go @@ -14,13 +14,26 @@ type AmazonS3LinkedService struct { TypeProperties AmazonS3LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AmazonS3LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AmazonS3LinkedService{} func (s AmazonS3LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AmazonS3LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3LinkedService: %+v", err) } + decoded["type"] = "AmazonS3" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go index 0264d52e58f..f5615c4c294 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *AmazonS3LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["secretAccessKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'AmazonS3LinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *AmazonS3LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["sessionToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SessionToken' for 'AmazonS3LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go index 681ab2b59fe..87d4161043a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go @@ -14,13 +14,26 @@ type AppFiguresLinkedService struct { TypeProperties AppFiguresLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AppFiguresLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AppFiguresLinkedService{} func (s AppFiguresLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AppFiguresLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AppFiguresLinkedService: %+v", err) } + decoded["type"] = "AppFigures" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go index a1e2cc246fd..73d3ec0f995 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go @@ -31,7 +31,7 @@ func (s *AppFiguresLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["clientKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientKey' for 'AppFiguresLinkedServiceTypeProperties': %+v", err) } @@ -39,7 +39,7 @@ func (s *AppFiguresLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'AppFiguresLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go index 648ceb406d8..6e349cbbfd3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go @@ -14,13 +14,26 @@ type AsanaLinkedService struct { TypeProperties AsanaLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AsanaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AsanaLinkedService{} func (s AsanaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AsanaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsanaLinkedService: %+v", err) } + decoded["type"] = "Asana" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go index 8d182955a10..f0e46efc77b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go @@ -30,7 +30,7 @@ func (s *AsanaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'AsanaLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go index 8ceef3f481b..4f18d425b88 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go @@ -14,13 +14,26 @@ type AzureBatchLinkedService struct { TypeProperties AzureBatchLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureBatchLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureBatchLinkedService{} func (s AzureBatchLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureBatchLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBatchLinkedService: %+v", err) } + decoded["type"] = "AzureBatch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go index 02c74598b03..bbddfb1fc6a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *AzureBatchLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["accessKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessKey' for 'AzureBatchLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go index 2c39c43aa08..f72f8497519 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go @@ -14,13 +14,26 @@ type AzureBlobFSLinkedService struct { TypeProperties AzureBlobFSLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureBlobFSLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureBlobFSLinkedService{} func (s AzureBlobFSLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureBlobFSLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSLinkedService: %+v", err) } + decoded["type"] = "AzureBlobFS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go index 9b229d05e58..30de0faaab2 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go @@ -48,7 +48,7 @@ func (s *AzureBlobFSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["sasToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SasToken' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) } @@ -56,7 +56,7 @@ func (s *AzureBlobFSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) } @@ -64,7 +64,7 @@ func (s *AzureBlobFSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go index f02a2a05bab..cb1af8ef44b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go @@ -14,13 +14,26 @@ type AzureBlobStorageLinkedService struct { TypeProperties AzureBlobStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureBlobStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureBlobStorageLinkedService{} func (s AzureBlobStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureBlobStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobStorageLinkedService: %+v", err) } + decoded["type"] = "AzureBlobStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go index 02969c0ba52..737d2b88a36 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go @@ -54,7 +54,7 @@ func (s *AzureBlobStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureBlobStorageLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go index 9383385585d..4e2eaf134df 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go @@ -14,13 +14,26 @@ type AzureDatabricksDeltaLakeLinkedService struct { TypeProperties AzureDatabricksDetltaLakeLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureDatabricksDeltaLakeLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureDatabricksDeltaLakeLinkedService{} func (s AzureDatabricksDeltaLakeLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureDatabricksDeltaLakeLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeLinkedService: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLake" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go index 066a71ff85d..5327ba00d71 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *AzureDatabricksDetltaLakeLinkedServiceTypeProperties) UnmarshalJSON(byt } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'AzureDatabricksDetltaLakeLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go index 3446a529ddf..a020b811872 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go @@ -14,13 +14,26 @@ type AzureDatabricksLinkedService struct { TypeProperties AzureDatabricksLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureDatabricksLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureDatabricksLinkedService{} func (s AzureDatabricksLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureDatabricksLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksLinkedService: %+v", err) } + decoded["type"] = "AzureDatabricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go index 300a6b099ed..d047d1e86e5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go @@ -64,7 +64,7 @@ func (s *AzureDatabricksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'AzureDatabricksLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go index 8dba19ea78e..deef98a8dda 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go @@ -14,13 +14,26 @@ type AzureDataExplorerLinkedService struct { TypeProperties AzureDataExplorerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureDataExplorerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureDataExplorerLinkedService{} func (s AzureDataExplorerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureDataExplorerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerLinkedService: %+v", err) } + decoded["type"] = "AzureDataExplorer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go index ea59356dfa5..97619246b78 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *AzureDataExplorerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byt } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataExplorerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go index 7d948d43270..0cfbf6325f5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go @@ -14,13 +14,26 @@ type AzureDataLakeAnalyticsLinkedService struct { TypeProperties AzureDataLakeAnalyticsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureDataLakeAnalyticsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureDataLakeAnalyticsLinkedService{} func (s AzureDataLakeAnalyticsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureDataLakeAnalyticsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeAnalyticsLinkedService: %+v", err) } + decoded["type"] = "AzureDataLakeAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go index 63134c1c3c5..161bc82759b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *AzureDataLakeAnalyticsLinkedServiceTypeProperties) UnmarshalJSON(bytes } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataLakeAnalyticsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go index 08ef63ece97..8085346b48d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go @@ -14,13 +14,26 @@ type AzureDataLakeStoreLinkedService struct { TypeProperties AzureDataLakeStoreLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureDataLakeStoreLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureDataLakeStoreLinkedService{} func (s AzureDataLakeStoreLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureDataLakeStoreLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreLinkedService: %+v", err) } + decoded["type"] = "AzureDataLakeStore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go index 2ab52fdec30..bf7ef94b725 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go @@ -46,7 +46,7 @@ func (s *AzureDataLakeStoreLinkedServiceTypeProperties) UnmarshalJSON(bytes []by } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataLakeStoreLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go index d810977fab8..f1b6779be10 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go @@ -14,13 +14,26 @@ type AzureFileStorageLinkedService struct { TypeProperties AzureFileStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureFileStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureFileStorageLinkedService{} func (s AzureFileStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureFileStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileStorageLinkedService: %+v", err) } + decoded["type"] = "AzureFileStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go index 584b02a6f00..e9503128003 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go @@ -50,7 +50,7 @@ func (s *AzureFileStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'AzureFileStorageLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go index 0ad5f590c03..6f3653c7977 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go @@ -14,13 +14,26 @@ type AzureFunctionLinkedService struct { TypeProperties AzureFunctionLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureFunctionLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureFunctionLinkedService{} func (s AzureFunctionLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureFunctionLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionLinkedService: %+v", err) } + decoded["type"] = "AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go index f7231b53182..80585bc714b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *AzureFunctionLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["functionKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FunctionKey' for 'AzureFunctionLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go index 1baccaf2ed1..6a1e0c93a08 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go @@ -14,13 +14,26 @@ type AzureKeyVaultLinkedService struct { TypeProperties AzureKeyVaultLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureKeyVaultLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureKeyVaultLinkedService{} func (s AzureKeyVaultLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureKeyVaultLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultLinkedService: %+v", err) } + decoded["type"] = "AzureKeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go index 29e94081ae7..270f5ee2dd9 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go @@ -16,6 +16,14 @@ type AzureKeyVaultSecretReference struct { Store LinkedServiceReference `json:"store"` // Fields inherited from SecretBase + + Type string `json:"type"` +} + +func (s AzureKeyVaultSecretReference) SecretBase() BaseSecretBaseImpl { + return BaseSecretBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultSecretReference{} @@ -29,9 +37,10 @@ func (s AzureKeyVaultSecretReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultSecretReference: %+v", err) } + decoded["type"] = "AzureKeyVaultSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go index 36206748107..3e6ccdc18f6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go @@ -14,13 +14,26 @@ type AzureMariaDBLinkedService struct { TypeProperties AzureMariaDBLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureMariaDBLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureMariaDBLinkedService{} func (s AzureMariaDBLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureMariaDBLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMariaDBLinkedService: %+v", err) } + decoded["type"] = "AzureMariaDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go index f7d70004b38..148ebd3d535 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go @@ -14,13 +14,26 @@ type AzureMLLinkedService struct { TypeProperties AzureMLLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureMLLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureMLLinkedService{} func (s AzureMLLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureMLLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMLLinkedService: %+v", err) } + decoded["type"] = "AzureML" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go index ec03082169f..e99a5b0dfbd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go @@ -41,7 +41,7 @@ func (s *AzureMLLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["apiKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiKey' for 'AzureMLLinkedServiceTypeProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *AzureMLLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureMLLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go index bd4e53e999f..5c650bebf09 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go @@ -14,13 +14,26 @@ type AzureMLServiceLinkedService struct { TypeProperties AzureMLServiceLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureMLServiceLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureMLServiceLinkedService{} func (s AzureMLServiceLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureMLServiceLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMLServiceLinkedService: %+v", err) } + decoded["type"] = "AzureMLService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go index 4b15a340566..af90bb24a84 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *AzureMLServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureMLServiceLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go index afbeb74f36b..2a25ea3d553 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go @@ -14,13 +14,26 @@ type AzureMySqlLinkedService struct { TypeProperties AzureMySqlLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureMySqlLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureMySqlLinkedService{} func (s AzureMySqlLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureMySqlLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMySqlLinkedService: %+v", err) } + decoded["type"] = "AzureMySql" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go index b1e90ebaacb..d900c56f7f7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go @@ -14,13 +14,26 @@ type AzurePostgreSqlLinkedService struct { TypeProperties AzurePostgreSqlLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzurePostgreSqlLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzurePostgreSqlLinkedService{} func (s AzurePostgreSqlLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzurePostgreSqlLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePostgreSqlLinkedService: %+v", err) } + decoded["type"] = "AzurePostgreSql" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go index 19b4444c6db..c06893d8777 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go @@ -14,13 +14,26 @@ type AzureSearchLinkedService struct { TypeProperties AzureSearchLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureSearchLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureSearchLinkedService{} func (s AzureSearchLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureSearchLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSearchLinkedService: %+v", err) } + decoded["type"] = "AzureSearch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go index 59b2629fa5f..73669b4a4b2 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go @@ -32,7 +32,7 @@ func (s *AzureSearchLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["key"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Key' for 'AzureSearchLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go index 27de51a02f2..f25c0bbc74d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go @@ -14,13 +14,26 @@ type AzureSqlDatabaseLinkedService struct { TypeProperties AzureSqlDatabaseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureSqlDatabaseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureSqlDatabaseLinkedService{} func (s AzureSqlDatabaseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureSqlDatabaseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseLinkedService: %+v", err) } + decoded["type"] = "AzureSqlDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go index fb28da62f1a..9386babd0bc 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go @@ -89,7 +89,7 @@ func (s *AzureSqlDatabaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'AzureSqlDatabaseLinkedServiceTypeProperties': %+v", err) } @@ -97,7 +97,7 @@ func (s *AzureSqlDatabaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlDatabaseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go index 258727f44b0..38a437a0737 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go @@ -14,13 +14,26 @@ type AzureSqlDWLinkedService struct { TypeProperties AzureSqlDWLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureSqlDWLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureSqlDWLinkedService{} func (s AzureSqlDWLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureSqlDWLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDWLinkedService: %+v", err) } + decoded["type"] = "AzureSqlDW" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go index ca43f8e02df..0ceda3e21f3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go @@ -87,7 +87,7 @@ func (s *AzureSqlDWLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'AzureSqlDWLinkedServiceTypeProperties': %+v", err) } @@ -95,7 +95,7 @@ func (s *AzureSqlDWLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlDWLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go index 96ae1c9ab66..334cc2bc295 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go @@ -14,13 +14,26 @@ type AzureSqlMILinkedService struct { TypeProperties AzureSqlMILinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureSqlMILinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureSqlMILinkedService{} func (s AzureSqlMILinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureSqlMILinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlMILinkedService: %+v", err) } + decoded["type"] = "AzureSqlMI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go index 52e92f71604..0b9abbfd4af 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go @@ -89,7 +89,7 @@ func (s *AzureSqlMILinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'AzureSqlMILinkedServiceTypeProperties': %+v", err) } @@ -97,7 +97,7 @@ func (s *AzureSqlMILinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlMILinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go index e250a6f50d4..44b96cad742 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go @@ -14,13 +14,26 @@ type AzureStorageLinkedService struct { TypeProperties AzureStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureStorageLinkedService{} func (s AzureStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageLinkedService: %+v", err) } + decoded["type"] = "AzureStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go index b5a514dd4f3..5a806ddea08 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go @@ -14,13 +14,26 @@ type AzureSynapseArtifactsLinkedService struct { TypeProperties AzureSynapseArtifactsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureSynapseArtifactsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureSynapseArtifactsLinkedService{} func (s AzureSynapseArtifactsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureSynapseArtifactsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseArtifactsLinkedService: %+v", err) } + decoded["type"] = "AzureSynapseArtifacts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go index ce40e1d1cfc..b707c070233 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go @@ -14,13 +14,26 @@ type AzureTableStorageLinkedService struct { TypeProperties AzureTableStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s AzureTableStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = AzureTableStorageLinkedService{} func (s AzureTableStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureTableStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableStorageLinkedService: %+v", err) } + decoded["type"] = "AzureTableStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go index ac4764c8657..39de7af3d1d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go @@ -14,13 +14,26 @@ type CassandraLinkedService struct { TypeProperties CassandraLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CassandraLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CassandraLinkedService{} func (s CassandraLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CassandraLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CassandraLinkedService: %+v", err) } + decoded["type"] = "Cassandra" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go index 9dcb2befc62..52712d248c5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *CassandraLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'CassandraLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go index 92c1b38ca9b..0ea05993181 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go @@ -14,13 +14,26 @@ type CommonDataServiceForAppsLinkedService struct { TypeProperties CommonDataServiceForAppsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CommonDataServiceForAppsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CommonDataServiceForAppsLinkedService{} func (s CommonDataServiceForAppsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CommonDataServiceForAppsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsLinkedService: %+v", err) } + decoded["type"] = "CommonDataServiceForApps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go index a0ba253c33d..9a27ef90c6e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go @@ -51,7 +51,7 @@ func (s *CommonDataServiceForAppsLinkedServiceTypeProperties) UnmarshalJSON(byte } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'CommonDataServiceForAppsLinkedServiceTypeProperties': %+v", err) } @@ -59,7 +59,7 @@ func (s *CommonDataServiceForAppsLinkedServiceTypeProperties) UnmarshalJSON(byte } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'CommonDataServiceForAppsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go index 52079a6153f..b6e88a3d732 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go @@ -14,13 +14,26 @@ type ConcurLinkedService struct { TypeProperties ConcurLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ConcurLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ConcurLinkedService{} func (s ConcurLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ConcurLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConcurLinkedService: %+v", err) } + decoded["type"] = "Concur" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go index 39f9c4f3ea1..4221dfb38c4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *ConcurLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ConcurLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go index 8ec8216b0e5..366f5b3c8a3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go @@ -14,13 +14,26 @@ type CosmosDbLinkedService struct { TypeProperties CosmosDbLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CosmosDbLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CosmosDbLinkedService{} func (s CosmosDbLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CosmosDbLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbLinkedService: %+v", err) } + decoded["type"] = "CosmosDb" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go index bca99ae6994..d31880a9f09 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go @@ -49,7 +49,7 @@ func (s *CosmosDbLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["accountKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccountKey' for 'CosmosDbLinkedServiceTypeProperties': %+v", err) } @@ -57,7 +57,7 @@ func (s *CosmosDbLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'CosmosDbLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go index 8f80411c25d..2346dd035f2 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go @@ -14,13 +14,26 @@ type CosmosDbMongoDbApiLinkedService struct { TypeProperties CosmosDbMongoDbApiLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CosmosDbMongoDbApiLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CosmosDbMongoDbApiLinkedService{} func (s CosmosDbMongoDbApiLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CosmosDbMongoDbApiLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiLinkedService: %+v", err) } + decoded["type"] = "CosmosDbMongoDbApi" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go index 5317bb6a239..11769ef5116 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go @@ -14,13 +14,26 @@ type CouchbaseLinkedService struct { TypeProperties CouchbaseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CouchbaseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CouchbaseLinkedService{} func (s CouchbaseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CouchbaseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CouchbaseLinkedService: %+v", err) } + decoded["type"] = "Couchbase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go index 34e481ff121..c71ed900122 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go @@ -14,13 +14,26 @@ type CustomDataSourceLinkedService struct { TypeProperties interface{} `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s CustomDataSourceLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = CustomDataSourceLinkedService{} func (s CustomDataSourceLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s CustomDataSourceLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomDataSourceLinkedService: %+v", err) } + decoded["type"] = "CustomDataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go index 6caedb63e6d..0c662b90a49 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go @@ -14,13 +14,26 @@ type DataworldLinkedService struct { TypeProperties DataworldLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s DataworldLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = DataworldLinkedService{} func (s DataworldLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s DataworldLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataworldLinkedService: %+v", err) } + decoded["type"] = "Dataworld" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go index 69173deb237..7d038e802ea 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go @@ -30,7 +30,7 @@ func (s *DataworldLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'DataworldLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go index a6effb3f61e..736a7d15fb0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go @@ -14,13 +14,26 @@ type Db2LinkedService struct { TypeProperties Db2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s Db2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = Db2LinkedService{} func (s Db2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s Db2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Db2LinkedService: %+v", err) } + decoded["type"] = "Db2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go index f3b8b6e418d..1ed0709a4a6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go @@ -44,7 +44,7 @@ func (s *Db2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'Db2LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go index a7dba8a4fb7..42ccac1a5f6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go @@ -14,13 +14,26 @@ type DrillLinkedService struct { TypeProperties DrillLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s DrillLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = DrillLinkedService{} func (s DrillLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s DrillLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DrillLinkedService: %+v", err) } + decoded["type"] = "Drill" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go index 568a83ff6cb..431dbefafda 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go @@ -14,13 +14,26 @@ type DynamicsAXLinkedService struct { TypeProperties DynamicsAXLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s DynamicsAXLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = DynamicsAXLinkedService{} func (s DynamicsAXLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s DynamicsAXLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsAXLinkedService: %+v", err) } + decoded["type"] = "DynamicsAX" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go index 1b3bfaf2fba..e14345f068d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *DynamicsAXLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'DynamicsAXLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go index c3b1a77595e..44eec4c473d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go @@ -14,13 +14,26 @@ type DynamicsCrmLinkedService struct { TypeProperties DynamicsCrmLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s DynamicsCrmLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = DynamicsCrmLinkedService{} func (s DynamicsCrmLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s DynamicsCrmLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsCrmLinkedService: %+v", err) } + decoded["type"] = "DynamicsCrm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go index 964da95ecde..24810fc8631 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go @@ -53,7 +53,7 @@ func (s *DynamicsCrmLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'DynamicsCrmLinkedServiceTypeProperties': %+v", err) } @@ -61,7 +61,7 @@ func (s *DynamicsCrmLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'DynamicsCrmLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go index af7b3c89829..f9e2a5cb006 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go @@ -14,13 +14,26 @@ type DynamicsLinkedService struct { TypeProperties DynamicsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s DynamicsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = DynamicsLinkedService{} func (s DynamicsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s DynamicsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsLinkedService: %+v", err) } + decoded["type"] = "Dynamics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go index 17133a5fd63..36751a75c41 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go @@ -53,7 +53,7 @@ func (s *DynamicsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'DynamicsLinkedServiceTypeProperties': %+v", err) } @@ -61,7 +61,7 @@ func (s *DynamicsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'DynamicsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go index 513f83dee39..67f88a6eba2 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go @@ -14,13 +14,26 @@ type EloquaLinkedService struct { TypeProperties EloquaLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s EloquaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = EloquaLinkedService{} func (s EloquaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EloquaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EloquaLinkedService: %+v", err) } + decoded["type"] = "Eloqua" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go index 3a045d8da35..84baa90a247 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *EloquaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'EloquaLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go index 9a8000e898c..b0a645b043f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go @@ -14,13 +14,26 @@ type FileServerLinkedService struct { TypeProperties FileServerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s FileServerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = FileServerLinkedService{} func (s FileServerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s FileServerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileServerLinkedService: %+v", err) } + decoded["type"] = "FileServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go index ccaa09bc9e3..3fdeaa9f94e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go @@ -34,7 +34,7 @@ func (s *FileServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'FileServerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go index 354a3518f60..ba1bbbc1b41 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go @@ -14,13 +14,26 @@ type FtpServerLinkedService struct { TypeProperties FtpServerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s FtpServerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = FtpServerLinkedService{} func (s FtpServerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s FtpServerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FtpServerLinkedService: %+v", err) } + decoded["type"] = "FtpServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go index c44eb55a062..017069210d6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *FtpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'FtpServerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go index 14933bf704d..e9fe3c2768f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go @@ -14,13 +14,26 @@ type GoogleAdWordsLinkedService struct { TypeProperties GoogleAdWordsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GoogleAdWordsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GoogleAdWordsLinkedService{} func (s GoogleAdWordsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GoogleAdWordsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleAdWordsLinkedService: %+v", err) } + decoded["type"] = "GoogleAdWords" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go index 60a737dd542..b1bb15bcc57 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go @@ -55,7 +55,7 @@ func (s *GoogleAdWordsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) } @@ -63,7 +63,7 @@ func (s *GoogleAdWordsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["developerToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeveloperToken' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) } @@ -71,7 +71,7 @@ func (s *GoogleAdWordsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["privateKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrivateKey' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) } @@ -79,7 +79,7 @@ func (s *GoogleAdWordsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["refreshToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go index 5d2f297813d..757c58a0b3b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go @@ -14,13 +14,26 @@ type GoogleBigQueryLinkedService struct { TypeProperties GoogleBigQueryLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GoogleBigQueryLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GoogleBigQueryLinkedService{} func (s GoogleBigQueryLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GoogleBigQueryLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQueryLinkedService: %+v", err) } + decoded["type"] = "GoogleBigQuery" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go index f88c997bcb1..7e0a5798743 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go @@ -49,7 +49,7 @@ func (s *GoogleBigQueryLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleBigQueryLinkedServiceTypeProperties': %+v", err) } @@ -57,7 +57,7 @@ func (s *GoogleBigQueryLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["refreshToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleBigQueryLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go index f7c7ec9a7ce..c639aac532e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go @@ -14,13 +14,26 @@ type GoogleBigQueryV2LinkedService struct { TypeProperties GoogleBigQueryV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GoogleBigQueryV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GoogleBigQueryV2LinkedService{} func (s GoogleBigQueryV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GoogleBigQueryV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2LinkedService: %+v", err) } + decoded["type"] = "GoogleBigQueryV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go index 7bc7e6a2889..354b0aa1f8c 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *GoogleBigQueryV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) } @@ -46,7 +46,7 @@ func (s *GoogleBigQueryV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["keyFileContent"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'KeyFileContent' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) } @@ -54,7 +54,7 @@ func (s *GoogleBigQueryV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte } if v, ok := temp["refreshToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go index 5adb8f1999b..7a6c351746f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go @@ -14,13 +14,26 @@ type GoogleCloudStorageLinkedService struct { TypeProperties GoogleCloudStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GoogleCloudStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GoogleCloudStorageLinkedService{} func (s GoogleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GoogleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleCloudStorageLinkedService: %+v", err) } + decoded["type"] = "GoogleCloudStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go index fd91df28886..17d4d4010d0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go @@ -34,7 +34,7 @@ func (s *GoogleCloudStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []by } if v, ok := temp["secretAccessKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'GoogleCloudStorageLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go index a51cdc99247..2b0cdaa8cb8 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go @@ -14,13 +14,26 @@ type GoogleSheetsLinkedService struct { TypeProperties GoogleSheetsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GoogleSheetsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GoogleSheetsLinkedService{} func (s GoogleSheetsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GoogleSheetsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleSheetsLinkedService: %+v", err) } + decoded["type"] = "GoogleSheets" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go index c05a89d0294..c57cf99fddf 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go @@ -30,7 +30,7 @@ func (s *GoogleSheetsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'GoogleSheetsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go index bed7f7ab300..0e50e330082 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go @@ -14,13 +14,26 @@ type GreenplumLinkedService struct { TypeProperties GreenplumLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s GreenplumLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = GreenplumLinkedService{} func (s GreenplumLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s GreenplumLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GreenplumLinkedService: %+v", err) } + decoded["type"] = "Greenplum" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go index d24c891184c..34c55079d49 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go @@ -14,13 +14,26 @@ type HBaseLinkedService struct { TypeProperties HBaseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HBaseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HBaseLinkedService{} func (s HBaseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HBaseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HBaseLinkedService: %+v", err) } + decoded["type"] = "HBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go index 2cd826f8f6c..805c1cb69c6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go @@ -48,7 +48,7 @@ func (s *HBaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'HBaseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go index 03e28415ba6..ff0936f8631 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go @@ -14,13 +14,26 @@ type HdfsLinkedService struct { TypeProperties HdfsLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HdfsLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HdfsLinkedService{} func (s HdfsLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HdfsLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HdfsLinkedService: %+v", err) } + decoded["type"] = "Hdfs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go index 4a146ac76d0..2388e1f70be 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go @@ -36,7 +36,7 @@ func (s *HdfsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'HdfsLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go index 7eedafcf3b6..fc0610528bb 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go @@ -14,13 +14,26 @@ type HDInsightLinkedService struct { TypeProperties HDInsightLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HDInsightLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HDInsightLinkedService{} func (s HDInsightLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HDInsightLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightLinkedService: %+v", err) } + decoded["type"] = "HDInsight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go index 8db1d47704e..e1662e549ea 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *HDInsightLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'HDInsightLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go index 7395ec5103e..70505eac142 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go @@ -14,13 +14,26 @@ type HDInsightOnDemandLinkedService struct { TypeProperties HDInsightOnDemandLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HDInsightOnDemandLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HDInsightOnDemandLinkedService{} func (s HDInsightOnDemandLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HDInsightOnDemandLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightOnDemandLinkedService: %+v", err) } + decoded["type"] = "HDInsightOnDemand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go index a38cbecb799..b8376e77e70 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go @@ -92,7 +92,7 @@ func (s *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(bytes []byt } if v, ok := temp["clusterPassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClusterPassword' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) } @@ -100,7 +100,7 @@ func (s *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(bytes []byt } if v, ok := temp["clusterSshPassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClusterSshPassword' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) } @@ -108,7 +108,7 @@ func (s *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(bytes []byt } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go index a799c68bc45..3c572d5cc53 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go @@ -14,13 +14,26 @@ type HiveLinkedService struct { TypeProperties HiveLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HiveLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HiveLinkedService{} func (s HiveLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HiveLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HiveLinkedService: %+v", err) } + decoded["type"] = "Hive" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go index e5720c3d706..c8584c659fc 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go @@ -60,7 +60,7 @@ func (s *HiveLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'HiveLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go index 20607228733..c2cc2242c98 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go @@ -14,13 +14,26 @@ type HTTPLinkedService struct { TypeProperties HTTPLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HTTPLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HTTPLinkedService{} func (s HTTPLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HTTPLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPLinkedService: %+v", err) } + decoded["type"] = "HttpServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go index 4144ffb47ea..45ba997379a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go @@ -44,7 +44,7 @@ func (s *HTTPLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'HTTPLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go index 8ee074a6961..feebc5358df 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go @@ -14,13 +14,26 @@ type HubspotLinkedService struct { TypeProperties HubspotLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s HubspotLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = HubspotLinkedService{} func (s HubspotLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s HubspotLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HubspotLinkedService: %+v", err) } + decoded["type"] = "Hubspot" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go index b491f6da4d6..28b118629f4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *HubspotLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'HubspotLinkedServiceTypeProperties': %+v", err) } @@ -48,7 +48,7 @@ func (s *HubspotLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'HubspotLinkedServiceTypeProperties': %+v", err) } @@ -56,7 +56,7 @@ func (s *HubspotLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["refreshToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RefreshToken' for 'HubspotLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go index 111c3b65fd3..941f8200426 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go @@ -14,13 +14,26 @@ type ImpalaLinkedService struct { TypeProperties ImpalaLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ImpalaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ImpalaLinkedService{} func (s ImpalaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ImpalaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImpalaLinkedService: %+v", err) } + decoded["type"] = "Impala" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go index 8dede312474..46f6cef505f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go @@ -48,7 +48,7 @@ func (s *ImpalaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ImpalaLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go index 6cc773bbf83..779dbcdefa7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go @@ -14,13 +14,26 @@ type InformixLinkedService struct { TypeProperties InformixLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s InformixLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = InformixLinkedService{} func (s InformixLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s InformixLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InformixLinkedService: %+v", err) } + decoded["type"] = "Informix" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go index c4e3f0125ce..87363da0c71 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *InformixLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["credential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'InformixLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *InformixLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'InformixLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go index 3d6778185ea..0a2d108127a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go @@ -14,13 +14,26 @@ type JiraLinkedService struct { TypeProperties JiraLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s JiraLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = JiraLinkedService{} func (s JiraLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s JiraLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JiraLinkedService: %+v", err) } + decoded["type"] = "Jira" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go index 28827abfec7..944ce79adb4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *JiraLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'JiraLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go index 00d75212cc6..ffb363bdc28 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go @@ -14,13 +14,26 @@ type LakeHouseLinkedService struct { TypeProperties LakeHouseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s LakeHouseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = LakeHouseLinkedService{} func (s LakeHouseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s LakeHouseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseLinkedService: %+v", err) } + decoded["type"] = "LakeHouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go index c82fd49ac9b..c0d1b15c890 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go @@ -41,7 +41,7 @@ func (s *LakeHouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'LakeHouseLinkedServiceTypeProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *LakeHouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'LakeHouseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go index 18c95b2c651..c121c55d1ce 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LinkedService interface { + LinkedService() BaseLinkedServiceImpl } -// RawLinkedServiceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LinkedService = BaseLinkedServiceImpl{} + +type BaseLinkedServiceImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` + Version *string `json:"version,omitempty"` +} + +func (s BaseLinkedServiceImpl) LinkedService() BaseLinkedServiceImpl { + return s +} + +var _ LinkedService = RawLinkedServiceImpl{} + +// RawLinkedServiceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLinkedServiceImpl struct { - Type string - Values map[string]interface{} + linkedService BaseLinkedServiceImpl + Type string + Values map[string]interface{} +} + +func (s RawLinkedServiceImpl) LinkedService() BaseLinkedServiceImpl { + return s.linkedService } -func unmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) { +func UnmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) { if input == nil { return nil, nil } @@ -1004,10 +1026,15 @@ func unmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) { return out, nil } - out := RawLinkedServiceImpl{ - Type: value, - Values: temp, + var parent BaseLinkedServiceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLinkedServiceImpl: %+v", err) } - return out, nil + + return RawLinkedServiceImpl{ + linkedService: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go index f691316e49d..8f5024a0250 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go @@ -36,7 +36,7 @@ func (s *LinkedServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalLinkedServiceImplementation(v) + impl, err := UnmarshalLinkedServiceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'LinkedServiceResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go index becf86bf1ce..e05529d1015 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go @@ -14,13 +14,26 @@ type MagentoLinkedService struct { TypeProperties MagentoLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MagentoLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MagentoLinkedService{} func (s MagentoLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MagentoLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MagentoLinkedService: %+v", err) } + decoded["type"] = "Magento" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go index 3ca9c8f0a66..8a3fa5159e1 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *MagentoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'MagentoLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go index 44d15926975..a9ccddf21e4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go @@ -14,13 +14,26 @@ type MariaDBLinkedService struct { TypeProperties MariaDBLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MariaDBLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MariaDBLinkedService{} func (s MariaDBLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MariaDBLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MariaDBLinkedService: %+v", err) } + decoded["type"] = "MariaDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go index 39490667bb5..2785eb3e00a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go @@ -14,13 +14,26 @@ type MarketoLinkedService struct { TypeProperties MarketoLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MarketoLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MarketoLinkedService{} func (s MarketoLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MarketoLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MarketoLinkedService: %+v", err) } + decoded["type"] = "Marketo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go index 8764a331b8b..76b10eab0eb 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *MarketoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'MarketoLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go index fea9b1e79c9..a2ba1aed314 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go @@ -14,13 +14,26 @@ type MicrosoftAccessLinkedService struct { TypeProperties MicrosoftAccessLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MicrosoftAccessLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MicrosoftAccessLinkedService{} func (s MicrosoftAccessLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MicrosoftAccessLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftAccessLinkedService: %+v", err) } + decoded["type"] = "MicrosoftAccess" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go index 2ac1fd4bc0f..e77ed5fe0fd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *MicrosoftAccessLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["credential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'MicrosoftAccessLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *MicrosoftAccessLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'MicrosoftAccessLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go index fc406d6aacb..383bb2e3464 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go @@ -14,13 +14,26 @@ type MongoDbAtlasLinkedService struct { TypeProperties MongoDbAtlasLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MongoDbAtlasLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MongoDbAtlasLinkedService{} func (s MongoDbAtlasLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MongoDbAtlasLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbAtlasLinkedService: %+v", err) } + decoded["type"] = "MongoDbAtlas" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go index d0a39fccb60..3d2c391fdd0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go @@ -14,13 +14,26 @@ type MongoDbLinkedService struct { TypeProperties MongoDbLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MongoDbLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MongoDbLinkedService{} func (s MongoDbLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MongoDbLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbLinkedService: %+v", err) } + decoded["type"] = "MongoDb" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go index 57fd680c18f..54c974d1964 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go @@ -46,7 +46,7 @@ func (s *MongoDbLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'MongoDbLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go index 4258ae31330..9aefd91f549 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go @@ -14,13 +14,26 @@ type MongoDbV2LinkedService struct { TypeProperties MongoDbV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MongoDbV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MongoDbV2LinkedService{} func (s MongoDbV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MongoDbV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbV2LinkedService: %+v", err) } + decoded["type"] = "MongoDbV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go index 3019022f4a6..5ece0b4a5a1 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go @@ -14,13 +14,26 @@ type MySqlLinkedService struct { TypeProperties MySqlLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s MySqlLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = MySqlLinkedService{} func (s MySqlLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s MySqlLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MySqlLinkedService: %+v", err) } + decoded["type"] = "MySql" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go index 58b61440688..d74b7a0301c 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go @@ -14,13 +14,26 @@ type NetezzaLinkedService struct { TypeProperties NetezzaLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s NetezzaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = NetezzaLinkedService{} func (s NetezzaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s NetezzaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetezzaLinkedService: %+v", err) } + decoded["type"] = "Netezza" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go index f849142cb13..a8b19ef996b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go @@ -14,13 +14,26 @@ type ODataLinkedService struct { TypeProperties ODataLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ODataLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ODataLinkedService{} func (s ODataLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ODataLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ODataLinkedService: %+v", err) } + decoded["type"] = "OData" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go index fd2066440f5..36ee885f3a0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go @@ -51,7 +51,7 @@ func (s *ODataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ODataLinkedServiceTypeProperties': %+v", err) } @@ -59,7 +59,7 @@ func (s *ODataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["servicePrincipalEmbeddedCert"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCert' for 'ODataLinkedServiceTypeProperties': %+v", err) } @@ -67,7 +67,7 @@ func (s *ODataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["servicePrincipalEmbeddedCertPassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCertPassword' for 'ODataLinkedServiceTypeProperties': %+v", err) } @@ -75,7 +75,7 @@ func (s *ODataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'ODataLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go index ea603496d47..59d3b235805 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go @@ -14,13 +14,26 @@ type OdbcLinkedService struct { TypeProperties OdbcLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s OdbcLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = OdbcLinkedService{} func (s OdbcLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s OdbcLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OdbcLinkedService: %+v", err) } + decoded["type"] = "Odbc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go index e039c18d3a7..0d7ac9bde45 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *OdbcLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'OdbcLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *OdbcLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'OdbcLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go index a477a6120b7..c3b95b5e6d8 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go @@ -14,13 +14,26 @@ type Office365LinkedService struct { TypeProperties Office365LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s Office365LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = Office365LinkedService{} func (s Office365LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s Office365LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Office365LinkedService: %+v", err) } + decoded["type"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go index 1907e1e5476..2f705f19274 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go @@ -36,7 +36,7 @@ func (s *Office365LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'Office365LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go index 355fa7f5173..8eb146e86e6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go @@ -14,13 +14,26 @@ type OracleCloudStorageLinkedService struct { TypeProperties OracleCloudStorageLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s OracleCloudStorageLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = OracleCloudStorageLinkedService{} func (s OracleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s OracleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleCloudStorageLinkedService: %+v", err) } + decoded["type"] = "OracleCloudStorage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go index 3669530b511..26f2620b54a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go @@ -34,7 +34,7 @@ func (s *OracleCloudStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []by } if v, ok := temp["secretAccessKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'OracleCloudStorageLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go index 723c5a48f38..33a752d3860 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go @@ -14,13 +14,26 @@ type OracleLinkedService struct { TypeProperties OracleLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s OracleLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = OracleLinkedService{} func (s OracleLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s OracleLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleLinkedService: %+v", err) } + decoded["type"] = "Oracle" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go index 5aff46690c8..918e0cd6cbd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go @@ -14,13 +14,26 @@ type OracleServiceCloudLinkedService struct { TypeProperties OracleServiceCloudLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s OracleServiceCloudLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = OracleServiceCloudLinkedService{} func (s OracleServiceCloudLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s OracleServiceCloudLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleServiceCloudLinkedService: %+v", err) } + decoded["type"] = "OracleServiceCloud" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go index e5f8bce9150..bfb327af752 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *OracleServiceCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes []by } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'OracleServiceCloudLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go index 806c97381bb..023efffa8f5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go @@ -14,13 +14,26 @@ type PaypalLinkedService struct { TypeProperties PaypalLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s PaypalLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = PaypalLinkedService{} func (s PaypalLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s PaypalLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PaypalLinkedService: %+v", err) } + decoded["type"] = "Paypal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go index 2e2d442fb95..99da062e8d3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *PaypalLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'PaypalLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go index 263d0e7878e..0f19d890e95 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go @@ -14,13 +14,26 @@ type PhoenixLinkedService struct { TypeProperties PhoenixLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s PhoenixLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = PhoenixLinkedService{} func (s PhoenixLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s PhoenixLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PhoenixLinkedService: %+v", err) } + decoded["type"] = "Phoenix" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go index c8d398dff1d..16bd3b42676 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go @@ -50,7 +50,7 @@ func (s *PhoenixLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'PhoenixLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go index 879f7079269..52aa1dd9455 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go @@ -14,13 +14,26 @@ type PostgreSqlLinkedService struct { TypeProperties PostgreSqlLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s PostgreSqlLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = PostgreSqlLinkedService{} func (s PostgreSqlLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s PostgreSqlLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlLinkedService: %+v", err) } + decoded["type"] = "PostgreSql" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go index 4d29c354c03..0c73569faa6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go @@ -14,13 +14,26 @@ type PostgreSqlV2LinkedService struct { TypeProperties PostgreSqlV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s PostgreSqlV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = PostgreSqlV2LinkedService{} func (s PostgreSqlV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s PostgreSqlV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlV2LinkedService: %+v", err) } + decoded["type"] = "PostgreSqlV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go index 050fd05d7c3..f35d116125c 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go @@ -14,13 +14,26 @@ type PrestoLinkedService struct { TypeProperties PrestoLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s PrestoLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = PrestoLinkedService{} func (s PrestoLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s PrestoLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrestoLinkedService: %+v", err) } + decoded["type"] = "Presto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go index 13094a75d3f..a489e060309 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go @@ -54,7 +54,7 @@ func (s *PrestoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'PrestoLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go index 6dd35a99429..7e95437d2e0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go @@ -14,13 +14,26 @@ type QuickbaseLinkedService struct { TypeProperties QuickbaseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s QuickbaseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = QuickbaseLinkedService{} func (s QuickbaseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s QuickbaseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuickbaseLinkedService: %+v", err) } + decoded["type"] = "Quickbase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go index 268f5f38f4f..ab1d40cbf3f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go @@ -32,7 +32,7 @@ func (s *QuickbaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["userToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'UserToken' for 'QuickbaseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go index 8a2cfeaa3d2..58ecfcb389f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go @@ -14,13 +14,26 @@ type QuickBooksLinkedService struct { TypeProperties QuickBooksLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s QuickBooksLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = QuickBooksLinkedService{} func (s QuickBooksLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s QuickBooksLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuickBooksLinkedService: %+v", err) } + decoded["type"] = "QuickBooks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go index ee964f60884..163f6d8e455 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go @@ -42,7 +42,7 @@ func (s *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) } @@ -50,7 +50,7 @@ func (s *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["accessTokenSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessTokenSecret' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) } @@ -58,7 +58,7 @@ func (s *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["consumerSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ConsumerSecret' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go index 2170d69d3a8..c98300e43fd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go @@ -14,13 +14,26 @@ type ResponsysLinkedService struct { TypeProperties ResponsysLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ResponsysLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ResponsysLinkedService{} func (s ResponsysLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ResponsysLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResponsysLinkedService: %+v", err) } + decoded["type"] = "Responsys" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go index 63085d91d9b..2cf628b1771 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *ResponsysLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ResponsysLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go index 4c9e04e61eb..fbe8c9f7274 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go @@ -14,13 +14,26 @@ type RestServiceLinkedService struct { TypeProperties RestServiceLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s RestServiceLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = RestServiceLinkedService{} func (s RestServiceLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s RestServiceLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestServiceLinkedService: %+v", err) } + decoded["type"] = "RestService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go index b0ea5202159..8347b058ddf 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go @@ -64,7 +64,7 @@ func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'RestServiceLinkedServiceTypeProperties': %+v", err) } @@ -72,7 +72,7 @@ func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'RestServiceLinkedServiceTypeProperties': %+v", err) } @@ -80,7 +80,7 @@ func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalEmbeddedCert"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCert' for 'RestServiceLinkedServiceTypeProperties': %+v", err) } @@ -88,7 +88,7 @@ func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalEmbeddedCertPassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCertPassword' for 'RestServiceLinkedServiceTypeProperties': %+v", err) } @@ -96,7 +96,7 @@ func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'RestServiceLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go index 48692289495..83494a3b4b6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go @@ -14,13 +14,26 @@ type SalesforceLinkedService struct { TypeProperties SalesforceLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SalesforceLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SalesforceLinkedService{} func (s SalesforceLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SalesforceLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceLinkedService: %+v", err) } + decoded["type"] = "Salesforce" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go index e93c01aafbe..71aee0e32e7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *SalesforceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SalesforceLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *SalesforceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["securityToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecurityToken' for 'SalesforceLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go index 827345b3182..71b9bc74ce4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go @@ -14,13 +14,26 @@ type SalesforceMarketingCloudLinkedService struct { TypeProperties SalesforceMarketingCloudLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SalesforceMarketingCloudLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SalesforceMarketingCloudLinkedService{} func (s SalesforceMarketingCloudLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SalesforceMarketingCloudLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudLinkedService: %+v", err) } + decoded["type"] = "SalesforceMarketingCloud" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go index 2d6e7216301..0c2eb4e022f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *SalesforceMarketingCloudLinkedServiceTypeProperties) UnmarshalJSON(byte } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceMarketingCloudLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go index c2ffb6baf7d..a2968aec9c3 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go @@ -14,13 +14,26 @@ type SalesforceServiceCloudLinkedService struct { TypeProperties SalesforceServiceCloudLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SalesforceServiceCloudLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SalesforceServiceCloudLinkedService{} func (s SalesforceServiceCloudLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SalesforceServiceCloudLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudLinkedService: %+v", err) } + decoded["type"] = "SalesforceServiceCloud" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go index 5b90adcebbd..e65be456fe6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go @@ -39,7 +39,7 @@ func (s *SalesforceServiceCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SalesforceServiceCloudLinkedServiceTypeProperties': %+v", err) } @@ -47,7 +47,7 @@ func (s *SalesforceServiceCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes } if v, ok := temp["securityToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecurityToken' for 'SalesforceServiceCloudLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go index 91a9a19c287..128dbc6ba6d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go @@ -14,13 +14,26 @@ type SalesforceServiceCloudV2LinkedService struct { TypeProperties SalesforceServiceCloudV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SalesforceServiceCloudV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SalesforceServiceCloudV2LinkedService{} func (s SalesforceServiceCloudV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SalesforceServiceCloudV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2LinkedService: %+v", err) } + decoded["type"] = "SalesforceServiceCloudV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go index d7e438e4387..b4dee30f2d5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *SalesforceServiceCloudV2LinkedServiceTypeProperties) UnmarshalJSON(byte } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceServiceCloudV2LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go index 757d1fe4e5b..da6c9e8ddeb 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go @@ -14,13 +14,26 @@ type SalesforceV2LinkedService struct { TypeProperties SalesforceV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SalesforceV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SalesforceV2LinkedService{} func (s SalesforceV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SalesforceV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceV2LinkedService: %+v", err) } + decoded["type"] = "SalesforceV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go index 8cb267b8fcf..4297249b025 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *SalesforceV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceV2LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go index f76bd8f68fe..8085b5896f5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go @@ -14,13 +14,26 @@ type SapBWLinkedService struct { TypeProperties SapBWLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapBWLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapBWLinkedService{} func (s SapBWLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapBWLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapBWLinkedService: %+v", err) } + decoded["type"] = "SapBW" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go index 7b61bcd3bf6..d3898ae6fca 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *SapBWLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapBWLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go index 5e7390659d5..b4283917925 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go @@ -14,13 +14,26 @@ type SapCloudForCustomerLinkedService struct { TypeProperties SapCloudForCustomerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapCloudForCustomerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapCloudForCustomerLinkedService{} func (s SapCloudForCustomerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapCloudForCustomerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapCloudForCustomerLinkedService: %+v", err) } + decoded["type"] = "SapCloudForCustomer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go index 811bd7345ef..dc666b10cfb 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go @@ -34,7 +34,7 @@ func (s *SapCloudForCustomerLinkedServiceTypeProperties) UnmarshalJSON(bytes []b } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapCloudForCustomerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go index fbaa5ac7c7a..c7e72847558 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go @@ -14,13 +14,26 @@ type SapEccLinkedService struct { TypeProperties SapEccLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapEccLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapEccLinkedService{} func (s SapEccLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapEccLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapEccLinkedService: %+v", err) } + decoded["type"] = "SapEcc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go index eeb385e11ab..8aebb47c03e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go @@ -34,7 +34,7 @@ func (s *SapEccLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapEccLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go index 06aeb7b059f..c82b55136bc 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go @@ -14,13 +14,26 @@ type SapHanaLinkedService struct { TypeProperties SapHanaLinkedServiceProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapHanaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapHanaLinkedService{} func (s SapHanaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapHanaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapHanaLinkedService: %+v", err) } + decoded["type"] = "SapHana" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go index 173433f7ef4..9ab9906648b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go @@ -38,7 +38,7 @@ func (s *SapHanaLinkedServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapHanaLinkedServiceProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go index 50f07b7c774..a17cddf2444 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go @@ -14,13 +14,26 @@ type SapOdpLinkedService struct { TypeProperties SapOdpLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapOdpLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapOdpLinkedService{} func (s SapOdpLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapOdpLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOdpLinkedService: %+v", err) } + decoded["type"] = "SapOdp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go index dba944bbe8a..bdb8ce65685 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go @@ -62,7 +62,7 @@ func (s *SapOdpLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapOdpLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go index 065705f2fa5..9ca21cfcd6f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go @@ -14,13 +14,26 @@ type SapOpenHubLinkedService struct { TypeProperties SapOpenHubLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapOpenHubLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapOpenHubLinkedService{} func (s SapOpenHubLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapOpenHubLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOpenHubLinkedService: %+v", err) } + decoded["type"] = "SapOpenHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go index 5b452dd1be9..551ab4099a5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go @@ -48,7 +48,7 @@ func (s *SapOpenHubLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapOpenHubLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go index 51eacbbfc54..a531ac98b0e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go @@ -14,13 +14,26 @@ type SapTableLinkedService struct { TypeProperties SapTableLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SapTableLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SapTableLinkedService{} func (s SapTableLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SapTableLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapTableLinkedService: %+v", err) } + decoded["type"] = "SapTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go index d804caa2350..d1ae6647968 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go @@ -58,7 +58,7 @@ func (s *SapTableLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SapTableLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go index 5c0c14a5405..76acd4bb0e5 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretBase interface { + SecretBase() BaseSecretBaseImpl } -// RawSecretBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretBase = BaseSecretBaseImpl{} + +type BaseSecretBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s +} + +var _ SecretBase = RawSecretBaseImpl{} + +// RawSecretBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretBaseImpl struct { - Type string - Values map[string]interface{} + secretBase BaseSecretBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s.secretBase } -func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { +func UnmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { return out, nil } - out := RawSecretBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretBaseImpl: %+v", err) } - return out, nil + + return RawSecretBaseImpl{ + secretBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go index a2fb03d3001..f9da8d37328 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go @@ -14,13 +14,26 @@ type ServiceNowLinkedService struct { TypeProperties ServiceNowLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ServiceNowLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ServiceNowLinkedService{} func (s ServiceNowLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ServiceNowLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowLinkedService: %+v", err) } + decoded["type"] = "ServiceNow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go index 4c7d3a48d4e..76e82ccb50b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go @@ -45,7 +45,7 @@ func (s *ServiceNowLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ServiceNowLinkedServiceTypeProperties': %+v", err) } @@ -53,7 +53,7 @@ func (s *ServiceNowLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ServiceNowLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go index e621db64bab..22a9add650e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go @@ -14,13 +14,26 @@ type ServiceNowV2LinkedService struct { TypeProperties ServiceNowV2LinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ServiceNowV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ServiceNowV2LinkedService{} func (s ServiceNowV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ServiceNowV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowV2LinkedService: %+v", err) } + decoded["type"] = "ServiceNowV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go index 04cb00d21c3..8e76d8996ca 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go @@ -41,7 +41,7 @@ func (s *ServiceNowV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ServiceNowV2LinkedServiceTypeProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *ServiceNowV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ServiceNowV2LinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go index 616e2ced83f..353a57aed32 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go @@ -14,13 +14,26 @@ type SftpServerLinkedService struct { TypeProperties SftpServerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SftpServerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SftpServerLinkedService{} func (s SftpServerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SftpServerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SftpServerLinkedService: %+v", err) } + decoded["type"] = "Sftp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go index 4eca0d52912..ab771e29675 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go @@ -46,7 +46,7 @@ func (s *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["passPhrase"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PassPhrase' for 'SftpServerLinkedServiceTypeProperties': %+v", err) } @@ -54,7 +54,7 @@ func (s *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SftpServerLinkedServiceTypeProperties': %+v", err) } @@ -62,7 +62,7 @@ func (s *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["privateKeyContent"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrivateKeyContent' for 'SftpServerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go index 3172f207d48..152ec3e6fde 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go @@ -14,13 +14,26 @@ type SharePointOnlineListLinkedService struct { TypeProperties SharePointOnlineListLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SharePointOnlineListLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SharePointOnlineListLinkedService{} func (s SharePointOnlineListLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SharePointOnlineListLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharePointOnlineListLinkedService: %+v", err) } + decoded["type"] = "SharePointOnlineList" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go index f4d8dda9d8c..6238ac38a8b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *SharePointOnlineListLinkedServiceTypeProperties) UnmarshalJSON(bytes [] } if v, ok := temp["servicePrincipalEmbeddedCert"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCert' for 'SharePointOnlineListLinkedServiceTypeProperties': %+v", err) } @@ -48,7 +48,7 @@ func (s *SharePointOnlineListLinkedServiceTypeProperties) UnmarshalJSON(bytes [] } if v, ok := temp["servicePrincipalEmbeddedCertPassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCertPassword' for 'SharePointOnlineListLinkedServiceTypeProperties': %+v", err) } @@ -56,7 +56,7 @@ func (s *SharePointOnlineListLinkedServiceTypeProperties) UnmarshalJSON(bytes [] } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'SharePointOnlineListLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go index 690429d4dfb..224ac33bbf7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go @@ -14,13 +14,26 @@ type ShopifyLinkedService struct { TypeProperties ShopifyLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ShopifyLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ShopifyLinkedService{} func (s ShopifyLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ShopifyLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ShopifyLinkedService: %+v", err) } + decoded["type"] = "Shopify" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go index e9a98a3c1a3..90c217f177c 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *ShopifyLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'ShopifyLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go index 461bdbe43d5..49ef02db4f0 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go @@ -14,13 +14,26 @@ type SmartsheetLinkedService struct { TypeProperties SmartsheetLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SmartsheetLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SmartsheetLinkedService{} func (s SmartsheetLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SmartsheetLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmartsheetLinkedService: %+v", err) } + decoded["type"] = "Smartsheet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go index 2c4ac318c65..458917f62d7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go @@ -30,7 +30,7 @@ func (s *SmartsheetLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'SmartsheetLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go index ced6d9466ad..c53e5dd5c4e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go @@ -14,13 +14,26 @@ type SnowflakeLinkedService struct { TypeProperties SnowflakeLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SnowflakeLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SnowflakeLinkedService{} func (s SnowflakeLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SnowflakeLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeLinkedService: %+v", err) } + decoded["type"] = "Snowflake" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go index 2e02753520b..facac45ebd7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go @@ -49,7 +49,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) } @@ -57,7 +57,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) } @@ -65,7 +65,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["privateKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrivateKey' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) } @@ -73,7 +73,7 @@ func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["privateKeyPassphrase"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrivateKeyPassphrase' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go index ddd4b7f8f08..c23487a77ed 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go @@ -14,13 +14,26 @@ type SnowflakeV2LinkedService struct { TypeProperties SnowflakeLinkedV2ServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SnowflakeV2LinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SnowflakeV2LinkedService{} func (s SnowflakeV2LinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SnowflakeV2LinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeV2LinkedService: %+v", err) } + decoded["type"] = "SnowflakeV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go index b817ef1d04e..06c9448a8f6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go @@ -14,13 +14,26 @@ type SparkLinkedService struct { TypeProperties SparkLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SparkLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SparkLinkedService{} func (s SparkLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SparkLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkLinkedService: %+v", err) } + decoded["type"] = "Spark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go index fb433cab7e8..01a405f8fe4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go @@ -54,7 +54,7 @@ func (s *SparkLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SparkLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go index 2053678ee8e..f15e89514bf 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go @@ -34,7 +34,7 @@ func (s *SqlAlwaysEncryptedProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'SqlAlwaysEncryptedProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go index b53cb76b250..52891d10fd4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go @@ -14,13 +14,26 @@ type SqlServerLinkedService struct { TypeProperties SqlServerLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SqlServerLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SqlServerLinkedService{} func (s SqlServerLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SqlServerLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerLinkedService: %+v", err) } + decoded["type"] = "SqlServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go index 901ba62c665..e8d081c9455 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go @@ -78,7 +78,7 @@ func (s *SqlServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SqlServerLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go index b01dd264f90..43893c49d52 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go @@ -14,13 +14,26 @@ type SquareLinkedService struct { TypeProperties SquareLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SquareLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SquareLinkedService{} func (s SquareLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SquareLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SquareLinkedService: %+v", err) } + decoded["type"] = "Square" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go index a37a1b6adc3..623a2dc4488 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go @@ -44,7 +44,7 @@ func (s *SquareLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["clientSecret"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SquareLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go index 6d4b4454afb..aed8c3602f8 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go @@ -14,13 +14,26 @@ type SybaseLinkedService struct { TypeProperties SybaseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s SybaseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = SybaseLinkedService{} func (s SybaseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s SybaseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SybaseLinkedService: %+v", err) } + decoded["type"] = "Sybase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go index 36eeabe456c..cc57422dc3f 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *SybaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SybaseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go index 7fb61ba0acf..b59064974b7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go @@ -14,13 +14,26 @@ type TeamDeskLinkedService struct { TypeProperties TeamDeskLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s TeamDeskLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = TeamDeskLinkedService{} func (s TeamDeskLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s TeamDeskLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TeamDeskLinkedService: %+v", err) } + decoded["type"] = "TeamDesk" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go index 2bf60396d8d..d9d4130640e 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *TeamDeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'TeamDeskLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *TeamDeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'TeamDeskLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go index 73c8a3f210c..55df875e0f1 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go @@ -14,13 +14,26 @@ type TeradataLinkedService struct { TypeProperties TeradataLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s TeradataLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = TeradataLinkedService{} func (s TeradataLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s TeradataLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TeradataLinkedService: %+v", err) } + decoded["type"] = "Teradata" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go index db62fdf3aae..a315ee5cde6 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go @@ -38,7 +38,7 @@ func (s *TeradataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'TeradataLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go index c6fc797bf17..e9364c1540c 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go @@ -14,13 +14,26 @@ type TwilioLinkedService struct { TypeProperties TwilioLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s TwilioLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = TwilioLinkedService{} func (s TwilioLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s TwilioLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TwilioLinkedService: %+v", err) } + decoded["type"] = "Twilio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go index 000014b1f99..b27b19ea513 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go @@ -30,7 +30,7 @@ func (s *TwilioLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'TwilioLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go index babaf6ca36f..ceb5073c240 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go @@ -14,13 +14,26 @@ type VerticaLinkedService struct { TypeProperties VerticaLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s VerticaLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = VerticaLinkedService{} func (s VerticaLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s VerticaLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VerticaLinkedService: %+v", err) } + decoded["type"] = "Vertica" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go index d39e9ace9c6..3d9020ce7e7 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go @@ -14,13 +14,26 @@ type WarehouseLinkedService struct { TypeProperties WarehouseLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WarehouseLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WarehouseLinkedService{} func (s WarehouseLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s WarehouseLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarehouseLinkedService: %+v", err) } + decoded["type"] = "Warehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go index 72a1430a9f9..82fef008bff 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go @@ -43,7 +43,7 @@ func (s *WarehouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalCredential"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'WarehouseLinkedServiceTypeProperties': %+v", err) } @@ -51,7 +51,7 @@ func (s *WarehouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["servicePrincipalKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'WarehouseLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go index 8dbaf91492d..5e7556f2d05 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go @@ -13,7 +13,16 @@ var _ WebLinkedServiceTypeProperties = WebAnonymousAuthentication{} type WebAnonymousAuthentication struct { // Fields inherited from WebLinkedServiceTypeProperties - Url string `json:"url"` + + AuthenticationType WebAuthenticationType `json:"authenticationType"` + Url string `json:"url"` +} + +func (s WebAnonymousAuthentication) WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl { + return BaseWebLinkedServiceTypePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + Url: s.Url, + } } var _ json.Marshaler = WebAnonymousAuthentication{} @@ -27,9 +36,10 @@ func (s WebAnonymousAuthentication) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebAnonymousAuthentication: %+v", err) } + decoded["authenticationType"] = "Anonymous" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go index c7a4bff1a82..8da57b90d01 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go @@ -15,7 +15,16 @@ type WebBasicAuthentication struct { Username string `json:"username"` // Fields inherited from WebLinkedServiceTypeProperties - Url string `json:"url"` + + AuthenticationType WebAuthenticationType `json:"authenticationType"` + Url string `json:"url"` +} + +func (s WebBasicAuthentication) WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl { + return BaseWebLinkedServiceTypePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + Url: s.Url, + } } var _ json.Marshaler = WebBasicAuthentication{} @@ -29,9 +38,10 @@ func (s WebBasicAuthentication) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebBasicAuthentication: %+v", err) } + decoded["authenticationType"] = "Basic" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *WebBasicAuthentication) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into WebBasicAuthentication: %+v", err) } + s.AuthenticationType = decoded.AuthenticationType s.Url = decoded.Url s.Username = decoded.Username @@ -60,7 +71,7 @@ func (s *WebBasicAuthentication) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'WebBasicAuthentication': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go index 7eca93e40ff..9c9e1d26990 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go @@ -15,7 +15,16 @@ type WebClientCertificateAuthentication struct { Pfx SecretBase `json:"pfx"` // Fields inherited from WebLinkedServiceTypeProperties - Url string `json:"url"` + + AuthenticationType WebAuthenticationType `json:"authenticationType"` + Url string `json:"url"` +} + +func (s WebClientCertificateAuthentication) WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl { + return BaseWebLinkedServiceTypePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + Url: s.Url, + } } var _ json.Marshaler = WebClientCertificateAuthentication{} @@ -29,9 +38,10 @@ func (s WebClientCertificateAuthentication) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebClientCertificateAuthentication: %+v", err) } + decoded["authenticationType"] = "ClientCertificate" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *WebClientCertificateAuthentication) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into WebClientCertificateAuthentication: %+v", err) } + s.AuthenticationType = decoded.AuthenticationType s.Url = decoded.Url var temp map[string]json.RawMessage @@ -59,7 +70,7 @@ func (s *WebClientCertificateAuthentication) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'WebClientCertificateAuthentication': %+v", err) } @@ -67,7 +78,7 @@ func (s *WebClientCertificateAuthentication) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["pfx"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Pfx' for 'WebClientCertificateAuthentication': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go index b8531e6f126..edda263410b 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go @@ -14,13 +14,26 @@ type WebLinkedService struct { TypeProperties WebLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s WebLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = WebLinkedService{} func (s WebLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s WebLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebLinkedService: %+v", err) } + decoded["type"] = "Web" encoded, err = json.Marshal(decoded) @@ -58,6 +72,7 @@ func (s *WebLinkedService) UnmarshalJSON(bytes []byte) error { s.ConnectVia = decoded.ConnectVia s.Description = decoded.Description s.Parameters = decoded.Parameters + s.Type = decoded.Type s.Version = decoded.Version var temp map[string]json.RawMessage @@ -66,7 +81,7 @@ func (s *WebLinkedService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["typeProperties"]; ok { - impl, err := unmarshalWebLinkedServiceTypePropertiesImplementation(v) + impl, err := UnmarshalWebLinkedServiceTypePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TypeProperties' for 'WebLinkedService': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go index 86ef4335677..6829dd247ed 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WebLinkedServiceTypeProperties interface { + WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl } -// RawWebLinkedServiceTypePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WebLinkedServiceTypeProperties = BaseWebLinkedServiceTypePropertiesImpl{} + +type BaseWebLinkedServiceTypePropertiesImpl struct { + AuthenticationType WebAuthenticationType `json:"authenticationType"` + Url string `json:"url"` +} + +func (s BaseWebLinkedServiceTypePropertiesImpl) WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl { + return s +} + +var _ WebLinkedServiceTypeProperties = RawWebLinkedServiceTypePropertiesImpl{} + +// RawWebLinkedServiceTypePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWebLinkedServiceTypePropertiesImpl struct { - Type string - Values map[string]interface{} + webLinkedServiceTypeProperties BaseWebLinkedServiceTypePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawWebLinkedServiceTypePropertiesImpl) WebLinkedServiceTypeProperties() BaseWebLinkedServiceTypePropertiesImpl { + return s.webLinkedServiceTypeProperties } -func unmarshalWebLinkedServiceTypePropertiesImplementation(input []byte) (WebLinkedServiceTypeProperties, error) { +func UnmarshalWebLinkedServiceTypePropertiesImplementation(input []byte) (WebLinkedServiceTypeProperties, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalWebLinkedServiceTypePropertiesImplementation(input []byte) (WebLin return out, nil } - out := RawWebLinkedServiceTypePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseWebLinkedServiceTypePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWebLinkedServiceTypePropertiesImpl: %+v", err) } - return out, nil + + return RawWebLinkedServiceTypePropertiesImpl{ + webLinkedServiceTypeProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go index 67eb9a3699e..67388b5d888 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go @@ -14,13 +14,26 @@ type XeroLinkedService struct { TypeProperties XeroLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s XeroLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = XeroLinkedService{} func (s XeroLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s XeroLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XeroLinkedService: %+v", err) } + decoded["type"] = "Xero" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go index c3156214335..09c457698cd 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go @@ -41,7 +41,7 @@ func (s *XeroLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["consumerKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ConsumerKey' for 'XeroLinkedServiceTypeProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *XeroLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["privateKey"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrivateKey' for 'XeroLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go index 167838ed829..77af69b772a 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go @@ -14,13 +14,26 @@ type ZendeskLinkedService struct { TypeProperties ZendeskLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ZendeskLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ZendeskLinkedService{} func (s ZendeskLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ZendeskLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ZendeskLinkedService: %+v", err) } + decoded["type"] = "Zendesk" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go index 8c192051757..9a585bc9fc4 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go @@ -37,7 +37,7 @@ func (s *ZendeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["apiToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ApiToken' for 'ZendeskLinkedServiceTypeProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *ZendeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'ZendeskLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go index 641bfe88358..a7e2f10debc 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go @@ -14,13 +14,26 @@ type ZohoLinkedService struct { TypeProperties ZohoLinkedServiceTypeProperties `json:"typeProperties"` // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` Description *string `json:"description,omitempty"` Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Type string `json:"type"` Version *string `json:"version,omitempty"` } +func (s ZohoLinkedService) LinkedService() BaseLinkedServiceImpl { + return BaseLinkedServiceImpl{ + Annotations: s.Annotations, + ConnectVia: s.ConnectVia, + Description: s.Description, + Parameters: s.Parameters, + Type: s.Type, + Version: s.Version, + } +} + var _ json.Marshaler = ZohoLinkedService{} func (s ZohoLinkedService) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ZohoLinkedService) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ZohoLinkedService: %+v", err) } + decoded["type"] = "Zoho" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go index 37e35425065..e43451a40b8 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go @@ -40,7 +40,7 @@ func (s *ZohoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["accessToken"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AccessToken' for 'ZohoLinkedServiceTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/version.go b/resource-manager/datafactory/2018-06-01/linkedservices/version.go index 72569f4438a..cd716b172da 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/version.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/version.go @@ -1,12 +1,10 @@ package linkedservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedservices/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/README.md b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/README.md index e43c0443bc1..a2528b17b6b 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/README.md +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedprivateendpoints` Documentation -The `managedprivateendpoints` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `managedprivateendpoints` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/client.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/client.go index c0a043e0525..e02237558e4 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/client.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/client.go @@ -15,7 +15,7 @@ type ManagedPrivateEndpointsClient struct { } func NewManagedPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedPrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedprivateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedprivateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedPrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go index b1c17e5fc37..eaf51a09c74 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedprivateendpoint.go @@ -46,7 +46,7 @@ func ParseManagedPrivateEndpointID(input string) (*ManagedPrivateEndpointId, err } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseManagedPrivateEndpointIDInsensitively(input string) (*ManagedPrivateEn } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go index 8b5c47f390b..0dff6339848 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/id_managedvirtualnetwork.go @@ -44,7 +44,7 @@ func ParseManagedVirtualNetworkID(input string) (*ManagedVirtualNetworkId, error } id := ManagedVirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedVirtualNetworkIDInsensitively(input string) (*ManagedVirtualNet } id := ManagedVirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_createorupdate.go index eba183e8415..dafef1f7280 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ManagedPrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id Ma var model ManagedPrivateEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_get.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_get.go index ebca28c71f2..11ea55eae56 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_get.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedPrivateEndpointsClient) Get(ctx context.Context, id ManagedPrivat var model ManagedPrivateEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/version.go b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/version.go index a30ee2d7b48..feaf3fab502 100644 --- a/resource-manager/datafactory/2018-06-01/managedprivateendpoints/version.go +++ b/resource-manager/datafactory/2018-06-01/managedprivateendpoints/version.go @@ -1,12 +1,10 @@ package managedprivateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedprivateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedprivateendpoints/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/README.md b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/README.md index f587af1094f..67570663a89 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/README.md +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/managedvirtualnetworks` Documentation -The `managedvirtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `managedvirtualnetworks` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/client.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/client.go index 82ba88c262b..59d0cde348b 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/client.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/client.go @@ -15,7 +15,7 @@ type ManagedVirtualNetworksClient struct { } func NewManagedVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedVirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedvirtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedvirtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedVirtualNetworksClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go index 7acf90dc070..8124bb2f63f 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go index 0059f098376..8fe02048a16 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/id_managedvirtualnetwork.go @@ -44,7 +44,7 @@ func ParseManagedVirtualNetworkID(input string) (*ManagedVirtualNetworkId, error } id := ManagedVirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedVirtualNetworkIDInsensitively(input string) (*ManagedVirtualNet } id := ManagedVirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_createorupdate.go index a9e00f4874b..e565487ff1a 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ManagedVirtualNetworksClient) CreateOrUpdate(ctx context.Context, id Man var model ManagedVirtualNetworkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_get.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_get.go index 035d910d410..d19f2dd714c 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_get.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagedVirtualNetworksClient) Get(ctx context.Context, id ManagedVirtual var model ManagedVirtualNetworkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/version.go b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/version.go index ac066480fea..2a1dcc36fef 100644 --- a/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/version.go +++ b/resource-manager/datafactory/2018-06-01/managedvirtualnetworks/version.go @@ -1,12 +1,10 @@ package managedvirtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedvirtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedvirtualnetworks/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/README.md b/resource-manager/datafactory/2018-06-01/pipelineruns/README.md index 65947403fb3..aaaf0f7e704 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/README.md +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/pipelineruns` Documentation -The `pipelineruns` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `pipelineruns` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/client.go b/resource-manager/datafactory/2018-06-01/pipelineruns/client.go index 72adfa237c8..f5e877b401a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/client.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/client.go @@ -15,7 +15,7 @@ type PipelineRunsClient struct { } func NewPipelineRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*PipelineRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pipelineruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pipelineruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PipelineRunsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/id_factory.go b/resource-manager/datafactory/2018-06-01/pipelineruns/id_factory.go index cebddbfd425..a3263067074 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/id_pipelinerun.go b/resource-manager/datafactory/2018-06-01/pipelineruns/id_pipelinerun.go index 828ca3d1d11..e8b8161a109 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/id_pipelinerun.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/id_pipelinerun.go @@ -44,7 +44,7 @@ func ParsePipelineRunID(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePipelineRunIDInsensitively(input string) (*PipelineRunId, error) { } id := PipelineRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/method_cancel.go b/resource-manager/datafactory/2018-06-01/pipelineruns/method_cancel.go index d67de0e3351..2e577cad52d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/method_cancel.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/method_cancel.go @@ -33,6 +33,7 @@ func (o CancelOperationOptions) ToHeaders() *client.Headers { func (o CancelOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/method_get.go b/resource-manager/datafactory/2018-06-01/pipelineruns/method_get.go index 7ab8d1c589d..572b20c19cd 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/method_get.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/method_get.go @@ -45,7 +45,6 @@ func (c PipelineRunsClient) Get(ctx context.Context, id PipelineRunId) (result G var model PipelineRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/method_querybyfactory.go b/resource-manager/datafactory/2018-06-01/pipelineruns/method_querybyfactory.go index 80a9e910c18..2bc3b3ddc22 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/method_querybyfactory.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/method_querybyfactory.go @@ -50,7 +50,6 @@ func (c PipelineRunsClient) QueryByFactory(ctx context.Context, id FactoryId, in var model PipelineRunsQueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/pipelineruns/version.go b/resource-manager/datafactory/2018-06-01/pipelineruns/version.go index 111206b9e73..a24cd4d87ed 100644 --- a/resource-manager/datafactory/2018-06-01/pipelineruns/version.go +++ b/resource-manager/datafactory/2018-06-01/pipelineruns/version.go @@ -1,12 +1,10 @@ package pipelineruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pipelineruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pipelineruns/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/README.md b/resource-manager/datafactory/2018-06-01/pipelines/README.md index ba4eafed683..63821976581 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/README.md +++ b/resource-manager/datafactory/2018-06-01/pipelines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/pipelines` Documentation -The `pipelines` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `pipelines` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/pipelines/client.go b/resource-manager/datafactory/2018-06-01/pipelines/client.go index 7e295d313f1..b57b8a2a22e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/client.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/client.go @@ -15,7 +15,7 @@ type PipelinesClient struct { } func NewPipelinesClientWithBaseURI(sdkApi sdkEnv.Api) (*PipelinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pipelines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pipelines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PipelinesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/id_factory.go b/resource-manager/datafactory/2018-06-01/pipelines/id_factory.go index 1e538d94368..197e2602628 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/id_pipeline.go b/resource-manager/datafactory/2018-06-01/pipelines/id_pipeline.go index 882b8d1fe73..febb38e29e3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/id_pipeline.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/id_pipeline.go @@ -44,7 +44,7 @@ func ParsePipelineID(input string) (*PipelineId, error) { } id := PipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePipelineIDInsensitively(input string) (*PipelineId, error) { } id := PipelineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/pipelines/method_createorupdate.go index 5f343867b64..b6eb0298676 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PipelinesClient) CreateOrUpdate(ctx context.Context, id PipelineId, inpu var model PipelineResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/method_createrun.go b/resource-manager/datafactory/2018-06-01/pipelines/method_createrun.go index 084e829005e..b76e545e7c2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/method_createrun.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/method_createrun.go @@ -37,6 +37,7 @@ func (o CreateRunOperationOptions) ToHeaders() *client.Headers { func (o CreateRunOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -90,7 +91,6 @@ func (c PipelinesClient) CreateRun(ctx context.Context, id PipelineId, input map var model CreateRunResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/method_get.go b/resource-manager/datafactory/2018-06-01/pipelines/method_get.go index dcde5f079da..5361a128225 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/method_get.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PipelinesClient) Get(ctx context.Context, id PipelineId, options GetOper var model PipelineResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go index f53c2e480c1..62651c90dfd 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Activity interface { + Activity() BaseActivityImpl } -// RawActivityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Activity = BaseActivityImpl{} + +type BaseActivityImpl struct { + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +func (s BaseActivityImpl) Activity() BaseActivityImpl { + return s +} + +var _ Activity = RawActivityImpl{} + +// RawActivityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActivityImpl struct { - Type string - Values map[string]interface{} + activity BaseActivityImpl + Type string + Values map[string]interface{} +} + +func (s RawActivityImpl) Activity() BaseActivityImpl { + return s.activity } -func unmarshalActivityImplementation(input []byte) (Activity, error) { +func UnmarshalActivityImplementation(input []byte) (Activity, error) { if input == nil { return nil, nil } @@ -364,10 +387,15 @@ func unmarshalActivityImplementation(input []byte) (Activity, error) { return out, nil } - out := RawActivityImpl{ - Type: value, - Values: temp, + var parent BaseActivityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActivityImpl: %+v", err) } - return out, nil + + return RawActivityImpl{ + activity: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go index 8cf9c916bb2..26cb864ab8a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go @@ -16,10 +16,22 @@ type AmazonMWSSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AmazonMWSSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AmazonMWSSource{} @@ -33,9 +45,10 @@ func (s AmazonMWSSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonMWSSource: %+v", err) } + decoded["type"] = "AmazonMWSSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go index eb1e5dc22fb..e840ad27069 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go @@ -18,10 +18,22 @@ type AmazonRdsForOracleSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForOracleSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AmazonRdsForOracleSource{} @@ -35,9 +47,10 @@ func (s AmazonRdsForOracleSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleSource: %+v", err) } + decoded["type"] = "AmazonRdsForOracleSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go index 6afffebf158..8d45af564b5 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go @@ -22,10 +22,22 @@ type AmazonRdsForSqlServerSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRdsForSqlServerSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AmazonRdsForSqlServerSource{} @@ -39,9 +51,10 @@ func (s AmazonRdsForSqlServerSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerSource: %+v", err) } + decoded["type"] = "AmazonRdsForSqlServerSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go index 71a161ea17b..03ffeec5258 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go @@ -17,10 +17,22 @@ type AmazonRedshiftSource struct { RedshiftUnloadSettings *RedshiftUnloadSettings `json:"redshiftUnloadSettings,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AmazonRedshiftSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AmazonRedshiftSource{} @@ -34,9 +46,10 @@ func (s AmazonRedshiftSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonRedshiftSource: %+v", err) } + decoded["type"] = "AmazonRedshiftSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go index f8bc6bca424..e2d27863737 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go @@ -23,8 +23,18 @@ type AmazonS3CompatibleReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3CompatibleReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AmazonS3CompatibleReadSettings{} @@ -38,9 +48,10 @@ func (s AmazonS3CompatibleReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleReadSettings: %+v", err) } + decoded["type"] = "AmazonS3CompatibleReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go index 702b6ec2fa8..62f6aa57fbb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go @@ -23,8 +23,18 @@ type AmazonS3ReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AmazonS3ReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AmazonS3ReadSettings{} @@ -38,9 +48,10 @@ func (s AmazonS3ReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmazonS3ReadSettings: %+v", err) } + decoded["type"] = "AmazonS3ReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go index 2c9b30fdb45..f0bf6bbbeae 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go @@ -14,14 +14,28 @@ type AppendVariableActivity struct { TypeProperties AppendVariableActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AppendVariableActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AppendVariableActivity{} func (s AppendVariableActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s AppendVariableActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AppendVariableActivity: %+v", err) } + decoded["type"] = "AppendVariable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go index 962199907dc..9f90c4f8e67 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go @@ -15,14 +15,28 @@ type AvroSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AvroSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AvroSink{} func (s AvroSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s AvroSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSink: %+v", err) } + decoded["type"] = "AvroSink" encoded, err = json.Marshal(decoded) @@ -61,6 +76,7 @@ func (s *AvroSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -70,7 +86,7 @@ func (s *AvroSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'AvroSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go index b1c6ef9317d..f2c529b7132 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go @@ -15,10 +15,22 @@ type AvroSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AvroSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AvroSource{} @@ -32,9 +44,10 @@ func (s AvroSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSource: %+v", err) } + decoded["type"] = "AvroSource" encoded, err = json.Marshal(decoded) @@ -59,6 +72,7 @@ func (s *AvroSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -66,7 +80,7 @@ func (s *AvroSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'AvroSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go index 60284d89508..1422da0230c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go @@ -17,6 +17,14 @@ type AvroWriteSettings struct { RecordNamespace *string `json:"recordNamespace,omitempty"` // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s AvroWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroWriteSettings{} @@ -30,9 +38,10 @@ func (s AvroWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroWriteSettings: %+v", err) } + decoded["type"] = "AvroWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go index 7e567283902..0c46878ecf5 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go @@ -22,8 +22,18 @@ type AzureBlobFSReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobFSReadSettings{} @@ -37,9 +47,10 @@ func (s AzureBlobFSReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSReadSettings: %+v", err) } + decoded["type"] = "AzureBlobFSReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go index 2bd8480f881..565c620e0a3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go @@ -15,14 +15,28 @@ type AzureBlobFSSink struct { Metadata *[]MetadataItem `json:"metadata,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureBlobFSSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureBlobFSSink{} func (s AzureBlobFSSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s AzureBlobFSSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSSink: %+v", err) } + decoded["type"] = "AzureBlobFSSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go index d3adee290e7..cd1498dcefd 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go @@ -16,10 +16,22 @@ type AzureBlobFSSource struct { TreatEmptyAsNull *bool `json:"treatEmptyAsNull,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobFSSource{} @@ -33,9 +45,10 @@ func (s AzureBlobFSSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSSource: %+v", err) } + decoded["type"] = "AzureBlobFSSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go index d388cd05c65..dffd77fa1fa 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go @@ -14,10 +14,22 @@ type AzureBlobFSWriteSettings struct { BlockSizeInMB *int64 `json:"blockSizeInMB,omitempty"` // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobFSWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobFSWriteSettings{} @@ -31,9 +43,10 @@ func (s AzureBlobFSWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobFSWriteSettings: %+v", err) } + decoded["type"] = "AzureBlobFSWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go index 43e44fb3ee0..002e3502548 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go @@ -23,8 +23,18 @@ type AzureBlobStorageReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobStorageReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobStorageReadSettings{} @@ -38,9 +48,10 @@ func (s AzureBlobStorageReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobStorageReadSettings: %+v", err) } + decoded["type"] = "AzureBlobStorageReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go index ef7d93ff2ff..d003a3c513b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go @@ -14,10 +14,22 @@ type AzureBlobStorageWriteSettings struct { BlockSizeInMB *int64 `json:"blockSizeInMB,omitempty"` // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s AzureBlobStorageWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = AzureBlobStorageWriteSettings{} @@ -31,9 +43,10 @@ func (s AzureBlobStorageWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobStorageWriteSettings: %+v", err) } + decoded["type"] = "AzureBlobStorageWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go index 6a8504b6eaa..999b4d13655 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go @@ -15,6 +15,14 @@ type AzureDatabricksDeltaLakeExportCommand struct { TimestampFormat *string `json:"timestampFormat,omitempty"` // Fields inherited from ExportSettings + + Type string `json:"type"` +} + +func (s AzureDatabricksDeltaLakeExportCommand) ExportSettings() BaseExportSettingsImpl { + return BaseExportSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDatabricksDeltaLakeExportCommand{} @@ -28,9 +36,10 @@ func (s AzureDatabricksDeltaLakeExportCommand) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeExportCommand: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLakeExportCommand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go index 7b7a3ac4a3f..c3cb9671e0e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go @@ -15,6 +15,14 @@ type AzureDatabricksDeltaLakeImportCommand struct { TimestampFormat *string `json:"timestampFormat,omitempty"` // Fields inherited from ImportSettings + + Type string `json:"type"` +} + +func (s AzureDatabricksDeltaLakeImportCommand) ImportSettings() BaseImportSettingsImpl { + return BaseImportSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDatabricksDeltaLakeImportCommand{} @@ -28,9 +36,10 @@ func (s AzureDatabricksDeltaLakeImportCommand) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeImportCommand: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLakeImportCommand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go index 8ad3b3fc1af..4801a0a51a1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go @@ -15,14 +15,28 @@ type AzureDatabricksDeltaLakeSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureDatabricksDeltaLakeSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureDatabricksDeltaLakeSink{} func (s AzureDatabricksDeltaLakeSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s AzureDatabricksDeltaLakeSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeSink: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLakeSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go index 79fc75b57d7..44f247d2828 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go @@ -15,10 +15,22 @@ type AzureDatabricksDeltaLakeSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureDatabricksDeltaLakeSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureDatabricksDeltaLakeSource{} @@ -32,9 +44,10 @@ func (s AzureDatabricksDeltaLakeSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeSource: %+v", err) } + decoded["type"] = "AzureDatabricksDeltaLakeSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go index 0c58527f7e8..854a218c1e4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go @@ -16,14 +16,28 @@ type AzureDataExplorerCommandActivity struct { TypeProperties AzureDataExplorerCommandActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AzureDataExplorerCommandActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AzureDataExplorerCommandActivity{} func (s AzureDataExplorerCommandActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureDataExplorerCommandActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerCommandActivity: %+v", err) } + decoded["type"] = "AzureDataExplorerCommand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go index 128db9d28ef..e8ac0c68b62 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go @@ -16,14 +16,28 @@ type AzureDataExplorerSink struct { IngestionMappingName *string `json:"ingestionMappingName,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureDataExplorerSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureDataExplorerSink{} func (s AzureDataExplorerSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureDataExplorerSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerSink: %+v", err) } + decoded["type"] = "AzureDataExplorerSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go index cab5a10aa46..5dce4b02134 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go @@ -17,10 +17,22 @@ type AzureDataExplorerSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataExplorerSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureDataExplorerSource{} @@ -34,9 +46,10 @@ func (s AzureDataExplorerSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerSource: %+v", err) } + decoded["type"] = "AzureDataExplorerSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go index 7c41c00f4ad..af816ef58f0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go @@ -24,8 +24,18 @@ type AzureDataLakeStoreReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreReadSettings{} @@ -39,9 +49,10 @@ func (s AzureDataLakeStoreReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreReadSettings: %+v", err) } + decoded["type"] = "AzureDataLakeStoreReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go index b2ac640292f..c2831afb139 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go @@ -15,14 +15,28 @@ type AzureDataLakeStoreSink struct { EnableAdlsSingleFileParallel *bool `json:"enableAdlsSingleFileParallel,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureDataLakeStoreSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureDataLakeStoreSink{} func (s AzureDataLakeStoreSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s AzureDataLakeStoreSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreSink: %+v", err) } + decoded["type"] = "AzureDataLakeStoreSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go index 6351c1d4df9..e27b10ab0a3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go @@ -14,10 +14,22 @@ type AzureDataLakeStoreSource struct { Recursive *bool `json:"recursive,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreSource{} @@ -31,9 +43,10 @@ func (s AzureDataLakeStoreSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreSource: %+v", err) } + decoded["type"] = "AzureDataLakeStoreSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go index d623c97372c..fd15db0e1b2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go @@ -14,10 +14,22 @@ type AzureDataLakeStoreWriteSettings struct { ExpiryDateTime *string `json:"expiryDateTime,omitempty"` // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s AzureDataLakeStoreWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreWriteSettings{} @@ -31,9 +43,10 @@ func (s AzureDataLakeStoreWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreWriteSettings: %+v", err) } + decoded["type"] = "AzureDataLakeStoreWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go index 60f01b786bd..68958dc6914 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go @@ -23,8 +23,18 @@ type AzureFileStorageReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s AzureFileStorageReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = AzureFileStorageReadSettings{} @@ -38,9 +48,10 @@ func (s AzureFileStorageReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileStorageReadSettings: %+v", err) } + decoded["type"] = "AzureFileStorageReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go index d0fae5bb64b..f444e2e8398 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go @@ -13,10 +13,22 @@ var _ StoreWriteSettings = AzureFileStorageWriteSettings{} type AzureFileStorageWriteSettings struct { // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s AzureFileStorageWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = AzureFileStorageWriteSettings{} @@ -30,9 +42,10 @@ func (s AzureFileStorageWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileStorageWriteSettings: %+v", err) } + decoded["type"] = "AzureFileStorageWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go index 90f4369b556..bf44d87bc62 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go @@ -16,14 +16,28 @@ type AzureFunctionActivity struct { TypeProperties AzureFunctionActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AzureFunctionActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AzureFunctionActivity{} func (s AzureFunctionActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureFunctionActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionActivity: %+v", err) } + decoded["type"] = "AzureFunctionActivity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go index 6cdd41717da..a4207040e63 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go @@ -16,10 +16,22 @@ type AzureMariaDBSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureMariaDBSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureMariaDBSource{} @@ -33,9 +45,10 @@ func (s AzureMariaDBSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMariaDBSource: %+v", err) } + decoded["type"] = "AzureMariaDBSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go index adb4fe6ce14..6d334d9a1ce 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go @@ -16,14 +16,28 @@ type AzureMLBatchExecutionActivity struct { TypeProperties AzureMLBatchExecutionActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AzureMLBatchExecutionActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AzureMLBatchExecutionActivity{} func (s AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMLBatchExecutionActivity: %+v", err) } + decoded["type"] = "AzureMLBatchExecution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go index 1499a1835c9..13da54be2c3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go @@ -16,14 +16,28 @@ type AzureMLExecutePipelineActivity struct { TypeProperties AzureMLExecutePipelineActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AzureMLExecutePipelineActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AzureMLExecutePipelineActivity{} func (s AzureMLExecutePipelineActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureMLExecutePipelineActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMLExecutePipelineActivity: %+v", err) } + decoded["type"] = "AzureMLExecutePipeline" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go index dce4f0179f1..f1c67ca807c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go @@ -16,14 +16,28 @@ type AzureMLUpdateResourceActivity struct { TypeProperties AzureMLUpdateResourceActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s AzureMLUpdateResourceActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = AzureMLUpdateResourceActivity{} func (s AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMLUpdateResourceActivity: %+v", err) } + decoded["type"] = "AzureMLUpdateResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go index aab835f0304..23f53b5ec0a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go @@ -14,14 +14,28 @@ type AzureMySqlSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureMySqlSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureMySqlSink{} func (s AzureMySqlSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s AzureMySqlSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMySqlSink: %+v", err) } + decoded["type"] = "AzureMySqlSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go index 0ecd9f806d0..ac1ae876ec1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go @@ -16,10 +16,22 @@ type AzureMySqlSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureMySqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureMySqlSource{} @@ -33,9 +45,10 @@ func (s AzureMySqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMySqlSource: %+v", err) } + decoded["type"] = "AzureMySqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go index 2f758820f27..8cddff6f209 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go @@ -14,14 +14,28 @@ type AzurePostgreSqlSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzurePostgreSqlSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzurePostgreSqlSink{} func (s AzurePostgreSqlSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s AzurePostgreSqlSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePostgreSqlSink: %+v", err) } + decoded["type"] = "AzurePostgreSqlSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go index fc33671399c..60c9c2a754e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go @@ -16,10 +16,22 @@ type AzurePostgreSqlSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzurePostgreSqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzurePostgreSqlSource{} @@ -33,9 +45,10 @@ func (s AzurePostgreSqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePostgreSqlSource: %+v", err) } + decoded["type"] = "AzurePostgreSqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go index b305154f74c..9fa9378ce74 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go @@ -13,14 +13,28 @@ var _ CopySink = AzureQueueSink{} type AzureQueueSink struct { // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureQueueSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureQueueSink{} func (s AzureQueueSink) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s AzureQueueSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureQueueSink: %+v", err) } + decoded["type"] = "AzureQueueSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go index 15e846e101a..ac9a426c332 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go @@ -14,14 +14,28 @@ type AzureSearchIndexSink struct { WriteBehavior *AzureSearchIndexWriteBehaviorType `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureSearchIndexSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureSearchIndexSink{} func (s AzureSearchIndexSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s AzureSearchIndexSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSearchIndexSink: %+v", err) } + decoded["type"] = "AzureSearchIndexSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go index 3660a1cdfd4..d911db81025 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go @@ -22,14 +22,28 @@ type AzureSqlSink struct { WriteBehavior *interface{} `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureSqlSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureSqlSink{} func (s AzureSqlSink) MarshalJSON() ([]byte, error) { @@ -41,9 +55,10 @@ func (s AzureSqlSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlSink: %+v", err) } + decoded["type"] = "AzureSqlSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go index ad2f4520c46..1fe30d9ab1f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go @@ -22,10 +22,22 @@ type AzureSqlSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureSqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureSqlSource{} @@ -39,9 +51,10 @@ func (s AzureSqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlSource: %+v", err) } + decoded["type"] = "AzureSqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go index 825e6e7e0fc..d62d9b106b4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go @@ -17,14 +17,28 @@ type AzureTableSink struct { AzureTableRowKeyName *string `json:"azureTableRowKeyName,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s AzureTableSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = AzureTableSink{} func (s AzureTableSink) MarshalJSON() ([]byte, error) { @@ -36,9 +50,10 @@ func (s AzureTableSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableSink: %+v", err) } + decoded["type"] = "AzureTableSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go index 46be72543cb..50e276bf779 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go @@ -17,10 +17,22 @@ type AzureTableSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s AzureTableSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = AzureTableSource{} @@ -34,9 +46,10 @@ func (s AzureTableSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableSource: %+v", err) } + decoded["type"] = "AzureTableSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go index b673b23d5ae..d2c556f9ba0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go @@ -14,6 +14,14 @@ type BinaryReadSettings struct { CompressionProperties CompressionReadSettings `json:"compressionProperties"` // Fields inherited from FormatReadSettings + + Type string `json:"type"` +} + +func (s BinaryReadSettings) FormatReadSettings() BaseFormatReadSettingsImpl { + return BaseFormatReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = BinaryReadSettings{} @@ -27,9 +35,10 @@ func (s BinaryReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BinaryReadSettings: %+v", err) } + decoded["type"] = "BinaryReadSettings" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s BinaryReadSettings) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &BinaryReadSettings{} func (s *BinaryReadSettings) UnmarshalJSON(bytes []byte) error { + type alias BinaryReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BinaryReadSettings: %+v", err) + } + + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *BinaryReadSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["compressionProperties"]; ok { - impl, err := unmarshalCompressionReadSettingsImplementation(v) + impl, err := UnmarshalCompressionReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'BinaryReadSettings': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go index 5c048f9a90e..79ea3209560 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go @@ -14,14 +14,28 @@ type BinarySink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s BinarySink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = BinarySink{} func (s BinarySink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s BinarySink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BinarySink: %+v", err) } + decoded["type"] = "BinarySink" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *BinarySink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -68,7 +84,7 @@ func (s *BinarySink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'BinarySink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go index 767aa66be91..6ac46cfd9bc 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go @@ -15,10 +15,22 @@ type BinarySource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s BinarySource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = BinarySource{} @@ -32,9 +44,10 @@ func (s BinarySource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BinarySource: %+v", err) } + decoded["type"] = "BinarySource" encoded, err = json.Marshal(decoded) @@ -59,6 +72,7 @@ func (s *BinarySource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -66,7 +80,7 @@ func (s *BinarySource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'BinarySource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go index 23e1fc9cbe3..4196d21b7cf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go @@ -18,14 +18,28 @@ type BlobSink struct { Metadata *[]MetadataItem `json:"metadata,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s BlobSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = BlobSink{} func (s BlobSink) MarshalJSON() ([]byte, error) { @@ -37,9 +51,10 @@ func (s BlobSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobSink: %+v", err) } + decoded["type"] = "BlobSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go index beac7dea2aa..64edd50a1fe 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go @@ -16,10 +16,22 @@ type BlobSource struct { TreatEmptyAsNull *bool `json:"treatEmptyAsNull,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s BlobSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = BlobSource{} @@ -33,9 +45,10 @@ func (s BlobSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobSource: %+v", err) } + decoded["type"] = "BlobSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go index a1aba3e970a..ab3fa92118a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go @@ -17,10 +17,22 @@ type CassandraSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s CassandraSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = CassandraSource{} @@ -34,9 +46,10 @@ func (s CassandraSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CassandraSource: %+v", err) } + decoded["type"] = "CassandraSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go index 72eefef3807..0548a99fb82 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go @@ -16,14 +16,28 @@ type CommonDataServiceForAppsSink struct { WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s CommonDataServiceForAppsSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = CommonDataServiceForAppsSink{} func (s CommonDataServiceForAppsSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s CommonDataServiceForAppsSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsSink: %+v", err) } + decoded["type"] = "CommonDataServiceForAppsSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go index 1ceef3f2545..685ed7138e1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go @@ -15,10 +15,22 @@ type CommonDataServiceForAppsSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s CommonDataServiceForAppsSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = CommonDataServiceForAppsSource{} @@ -32,9 +44,10 @@ func (s CommonDataServiceForAppsSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsSource: %+v", err) } + decoded["type"] = "CommonDataServiceForAppsSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go index 0e16b6f276d..8f5643cb770 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CompressionReadSettings interface { + CompressionReadSettings() BaseCompressionReadSettingsImpl } -// RawCompressionReadSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CompressionReadSettings = BaseCompressionReadSettingsImpl{} + +type BaseCompressionReadSettingsImpl struct { + Type string `json:"type"` +} + +func (s BaseCompressionReadSettingsImpl) CompressionReadSettings() BaseCompressionReadSettingsImpl { + return s +} + +var _ CompressionReadSettings = RawCompressionReadSettingsImpl{} + +// RawCompressionReadSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCompressionReadSettingsImpl struct { - Type string - Values map[string]interface{} + compressionReadSettings BaseCompressionReadSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawCompressionReadSettingsImpl) CompressionReadSettings() BaseCompressionReadSettingsImpl { + return s.compressionReadSettings } -func unmarshalCompressionReadSettingsImplementation(input []byte) (CompressionReadSettings, error) { +func UnmarshalCompressionReadSettingsImplementation(input []byte) (CompressionReadSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCompressionReadSettingsImplementation(input []byte) (CompressionRe return out, nil } - out := RawCompressionReadSettingsImpl{ - Type: value, - Values: temp, + var parent BaseCompressionReadSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCompressionReadSettingsImpl: %+v", err) } - return out, nil + + return RawCompressionReadSettingsImpl{ + compressionReadSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go index be4534cc8db..7ad97e4f234 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go @@ -16,10 +16,22 @@ type ConcurSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ConcurSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ConcurSource{} @@ -33,9 +45,10 @@ func (s ConcurSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConcurSource: %+v", err) } + decoded["type"] = "ConcurSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go index 212dbcaad46..182731b6bb9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go @@ -13,14 +13,28 @@ var _ Activity = ControlActivity{} type ControlActivity struct { // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ControlActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ControlActivity{} func (s ControlActivity) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s ControlActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ControlActivity: %+v", err) } + decoded["type"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go index e64d4f9f4d9..2ec19c75d27 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go @@ -18,14 +18,28 @@ type CopyActivity struct { TypeProperties CopyActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s CopyActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = CopyActivity{} func (s CopyActivity) MarshalJSON() ([]byte, error) { @@ -37,9 +51,10 @@ func (s CopyActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyActivity: %+v", err) } + decoded["type"] = "Copy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go index bcb81687015..8ae28b118d3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go @@ -55,7 +55,7 @@ func (s *CopyActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["sink"]; ok { - impl, err := unmarshalCopySinkImplementation(v) + impl, err := UnmarshalCopySinkImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Sink' for 'CopyActivityTypeProperties': %+v", err) } @@ -63,7 +63,7 @@ func (s *CopyActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalCopySourceImplementation(v) + impl, err := UnmarshalCopySourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'CopyActivityTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go index 6d64c7d1827..9de42a11025 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopySink interface { + CopySink() BaseCopySinkImpl } -// RawCopySinkImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopySink = BaseCopySinkImpl{} + +type BaseCopySinkImpl struct { + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` + SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` +} + +func (s BaseCopySinkImpl) CopySink() BaseCopySinkImpl { + return s +} + +var _ CopySink = RawCopySinkImpl{} + +// RawCopySinkImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopySinkImpl struct { - Type string - Values map[string]interface{} + copySink BaseCopySinkImpl + Type string + Values map[string]interface{} +} + +func (s RawCopySinkImpl) CopySink() BaseCopySinkImpl { + return s.copySink } -func unmarshalCopySinkImplementation(input []byte) (CopySink, error) { +func UnmarshalCopySinkImplementation(input []byte) (CopySink, error) { if input == nil { return nil, nil } @@ -396,10 +419,15 @@ func unmarshalCopySinkImplementation(input []byte) (CopySink, error) { return out, nil } - out := RawCopySinkImpl{ - Type: value, - Values: temp, + var parent BaseCopySinkImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopySinkImpl: %+v", err) } - return out, nil + + return RawCopySinkImpl{ + copySink: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go index cd687e84db8..487f2ea1c82 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopySource interface { + CopySource() BaseCopySourceImpl } -// RawCopySourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopySource = BaseCopySourceImpl{} + +type BaseCopySourceImpl struct { + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` + SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s BaseCopySourceImpl) CopySource() BaseCopySourceImpl { + return s +} + +var _ CopySource = RawCopySourceImpl{} + +// RawCopySourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopySourceImpl struct { - Type string - Values map[string]interface{} + copySource BaseCopySourceImpl + Type string + Values map[string]interface{} +} + +func (s RawCopySourceImpl) CopySource() BaseCopySourceImpl { + return s.copySource } -func unmarshalCopySourceImplementation(input []byte) (CopySource, error) { +func UnmarshalCopySourceImplementation(input []byte) (CopySource, error) { if input == nil { return nil, nil } @@ -868,10 +889,15 @@ func unmarshalCopySourceImplementation(input []byte) (CopySource, error) { return out, nil } - out := RawCopySourceImpl{ - Type: value, - Values: temp, + var parent BaseCopySourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopySourceImpl: %+v", err) } - return out, nil + + return RawCopySourceImpl{ + copySource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copytranslator.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copytranslator.go index 30fc542ec1f..7940d0e081c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_copytranslator.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copytranslator.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyTranslator interface { + CopyTranslator() BaseCopyTranslatorImpl } -// RawCopyTranslatorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyTranslator = BaseCopyTranslatorImpl{} + +type BaseCopyTranslatorImpl struct { + Type string `json:"type"` +} + +func (s BaseCopyTranslatorImpl) CopyTranslator() BaseCopyTranslatorImpl { + return s +} + +var _ CopyTranslator = RawCopyTranslatorImpl{} + +// RawCopyTranslatorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyTranslatorImpl struct { - Type string - Values map[string]interface{} + copyTranslator BaseCopyTranslatorImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyTranslatorImpl) CopyTranslator() BaseCopyTranslatorImpl { + return s.copyTranslator } -func unmarshalCopyTranslatorImplementation(input []byte) (CopyTranslator, error) { +func UnmarshalCopyTranslatorImplementation(input []byte) (CopyTranslator, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCopyTranslatorImplementation(input []byte) (CopyTranslator, error) return out, nil } - out := RawCopyTranslatorImpl{ - Type: value, - Values: temp, + var parent BaseCopyTranslatorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyTranslatorImpl: %+v", err) } - return out, nil + + return RawCopyTranslatorImpl{ + copyTranslator: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go index 7348ec9cfc3..f7b679383a3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go @@ -14,14 +14,28 @@ type CosmosDbMongoDbApiSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s CosmosDbMongoDbApiSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = CosmosDbMongoDbApiSink{} func (s CosmosDbMongoDbApiSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s CosmosDbMongoDbApiSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiSink: %+v", err) } + decoded["type"] = "CosmosDbMongoDbApiSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go index cca82565a84..f4a2b4e8ab9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go @@ -18,10 +18,22 @@ type CosmosDbMongoDbApiSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbMongoDbApiSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = CosmosDbMongoDbApiSource{} @@ -35,9 +47,10 @@ func (s CosmosDbMongoDbApiSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiSource: %+v", err) } + decoded["type"] = "CosmosDbMongoDbApiSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go index 2cf7e51dd02..749920b0dc6 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go @@ -14,14 +14,28 @@ type CosmosDbSqlApiSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s CosmosDbSqlApiSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = CosmosDbSqlApiSink{} func (s CosmosDbSqlApiSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s CosmosDbSqlApiSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbSqlApiSink: %+v", err) } + decoded["type"] = "CosmosDbSqlApiSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go index b219db07e02..0f2e1199f1f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go @@ -18,10 +18,22 @@ type CosmosDbSqlApiSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s CosmosDbSqlApiSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = CosmosDbSqlApiSource{} @@ -35,9 +47,10 @@ func (s CosmosDbSqlApiSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbSqlApiSource: %+v", err) } + decoded["type"] = "CosmosDbSqlApiSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go index 1ff859790b9..9b81d860f25 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go @@ -16,10 +16,22 @@ type CouchbaseSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s CouchbaseSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = CouchbaseSource{} @@ -33,9 +45,10 @@ func (s CouchbaseSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CouchbaseSource: %+v", err) } + decoded["type"] = "CouchbaseSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go index e1e2185427a..90cc6692580 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go @@ -16,14 +16,28 @@ type CustomActivity struct { TypeProperties CustomActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s CustomActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = CustomActivity{} func (s CustomActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s CustomActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomActivity: %+v", err) } + decoded["type"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go index e400b68132e..41c543f7e54 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go @@ -16,14 +16,28 @@ type DatabricksNotebookActivity struct { TypeProperties DatabricksNotebookActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s DatabricksNotebookActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = DatabricksNotebookActivity{} func (s DatabricksNotebookActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DatabricksNotebookActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksNotebookActivity: %+v", err) } + decoded["type"] = "DatabricksNotebook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go index b45b74beb42..876b60578e7 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go @@ -16,14 +16,28 @@ type DatabricksSparkJarActivity struct { TypeProperties DatabricksSparkJarActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s DatabricksSparkJarActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = DatabricksSparkJarActivity{} func (s DatabricksSparkJarActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DatabricksSparkJarActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksSparkJarActivity: %+v", err) } + decoded["type"] = "DatabricksSparkJar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go index 95a89beed78..bafcd993fe0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go @@ -16,14 +16,28 @@ type DatabricksSparkPythonActivity struct { TypeProperties DatabricksSparkPythonActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s DatabricksSparkPythonActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = DatabricksSparkPythonActivity{} func (s DatabricksSparkPythonActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DatabricksSparkPythonActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksSparkPythonActivity: %+v", err) } + decoded["type"] = "DatabricksSparkPython" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go index 00364ff95e0..d6b8008b642 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go @@ -16,14 +16,28 @@ type DataLakeAnalyticsUSQLActivity struct { TypeProperties DataLakeAnalyticsUSQLActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s DataLakeAnalyticsUSQLActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = DataLakeAnalyticsUSQLActivity{} func (s DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataLakeAnalyticsUSQLActivity: %+v", err) } + decoded["type"] = "DataLakeAnalyticsU-SQL" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go index 5eb6e6561cf..8972f42ea0e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go @@ -16,10 +16,22 @@ type Db2Source struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s Db2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = Db2Source{} @@ -33,9 +45,10 @@ func (s Db2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Db2Source: %+v", err) } + decoded["type"] = "Db2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go index 6cfee1a9b37..c80276445f1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go @@ -16,14 +16,28 @@ type DeleteActivity struct { TypeProperties DeleteActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s DeleteActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = DeleteActivity{} func (s DeleteActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DeleteActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeleteActivity: %+v", err) } + decoded["type"] = "Delete" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go index 5b3583fa949..74841a5d292 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go @@ -38,7 +38,7 @@ func (s *DeleteActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DeleteActivityTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go index e5f8d74e339..57cc6151e59 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go @@ -15,6 +15,14 @@ type DelimitedTextReadSettings struct { SkipLineCount *int64 `json:"skipLineCount,omitempty"` // Fields inherited from FormatReadSettings + + Type string `json:"type"` +} + +func (s DelimitedTextReadSettings) FormatReadSettings() BaseFormatReadSettingsImpl { + return BaseFormatReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = DelimitedTextReadSettings{} @@ -28,9 +36,10 @@ func (s DelimitedTextReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelimitedTextReadSettings: %+v", err) } + decoded["type"] = "DelimitedTextReadSettings" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *DelimitedTextReadSettings) UnmarshalJSON(bytes []byte) error { } s.SkipLineCount = decoded.SkipLineCount + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *DelimitedTextReadSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["compressionProperties"]; ok { - impl, err := unmarshalCompressionReadSettingsImplementation(v) + impl, err := UnmarshalCompressionReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'DelimitedTextReadSettings': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go index 650eacb9ce2..e1f28d1ab68 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go @@ -15,14 +15,28 @@ type DelimitedTextSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s DelimitedTextSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = DelimitedTextSink{} func (s DelimitedTextSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s DelimitedTextSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelimitedTextSink: %+v", err) } + decoded["type"] = "DelimitedTextSink" encoded, err = json.Marshal(decoded) @@ -61,6 +76,7 @@ func (s *DelimitedTextSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -70,7 +86,7 @@ func (s *DelimitedTextSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DelimitedTextSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go index 1a9deb93660..1db94362b81 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go @@ -16,10 +16,22 @@ type DelimitedTextSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DelimitedTextSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DelimitedTextSource{} @@ -33,9 +45,10 @@ func (s DelimitedTextSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelimitedTextSource: %+v", err) } + decoded["type"] = "DelimitedTextSource" encoded, err = json.Marshal(decoded) @@ -61,6 +74,7 @@ func (s *DelimitedTextSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -68,7 +82,7 @@ func (s *DelimitedTextSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DelimitedTextSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go index d9392ca7aeb..f554f4711a0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go @@ -17,6 +17,14 @@ type DelimitedTextWriteSettings struct { QuoteAllText *bool `json:"quoteAllText,omitempty"` // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s DelimitedTextWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = DelimitedTextWriteSettings{} @@ -30,9 +38,10 @@ func (s DelimitedTextWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DelimitedTextWriteSettings: %+v", err) } + decoded["type"] = "DelimitedTextWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go index f498732a343..545773f4bf3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go @@ -15,14 +15,28 @@ type DocumentDbCollectionSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s DocumentDbCollectionSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = DocumentDbCollectionSink{} func (s DocumentDbCollectionSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s DocumentDbCollectionSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbCollectionSink: %+v", err) } + decoded["type"] = "DocumentDbCollectionSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go index 58fcda638b4..f19c3ff3310 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go @@ -17,10 +17,22 @@ type DocumentDbCollectionSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DocumentDbCollectionSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DocumentDbCollectionSource{} @@ -34,9 +46,10 @@ func (s DocumentDbCollectionSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbCollectionSource: %+v", err) } + decoded["type"] = "DocumentDbCollectionSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go index 7f7eba7d52c..d5ff03c8801 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go @@ -16,10 +16,22 @@ type DrillSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DrillSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DrillSource{} @@ -33,9 +45,10 @@ func (s DrillSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DrillSource: %+v", err) } + decoded["type"] = "DrillSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go index aa637b17a98..42b9a34dae4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go @@ -17,10 +17,22 @@ type DynamicsAXSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsAXSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DynamicsAXSource{} @@ -34,9 +46,10 @@ func (s DynamicsAXSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsAXSource: %+v", err) } + decoded["type"] = "DynamicsAXSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go index ce2ed2c4ad0..3cc7697f97e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go @@ -16,14 +16,28 @@ type DynamicsCrmSink struct { WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s DynamicsCrmSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = DynamicsCrmSink{} func (s DynamicsCrmSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DynamicsCrmSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsCrmSink: %+v", err) } + decoded["type"] = "DynamicsCrmSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go index c156516f44a..a3cacb4b19e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go @@ -15,10 +15,22 @@ type DynamicsCrmSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsCrmSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DynamicsCrmSource{} @@ -32,9 +44,10 @@ func (s DynamicsCrmSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsCrmSource: %+v", err) } + decoded["type"] = "DynamicsCrmSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go index fc417c06c9b..8b54747319c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go @@ -16,14 +16,28 @@ type DynamicsSink struct { WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s DynamicsSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = DynamicsSink{} func (s DynamicsSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s DynamicsSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsSink: %+v", err) } + decoded["type"] = "DynamicsSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go index 90e7ac4fee0..e4745349d7b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go @@ -15,10 +15,22 @@ type DynamicsSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s DynamicsSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = DynamicsSource{} @@ -32,9 +44,10 @@ func (s DynamicsSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicsSource: %+v", err) } + decoded["type"] = "DynamicsSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go index cf77af8f320..4aed6e7119e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go @@ -16,10 +16,22 @@ type EloquaSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s EloquaSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = EloquaSource{} @@ -33,9 +45,10 @@ func (s EloquaSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EloquaSource: %+v", err) } + decoded["type"] = "EloquaSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go index 682d24dfe61..3080cd4b39b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go @@ -15,10 +15,22 @@ type ExcelSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ExcelSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ExcelSource{} @@ -32,9 +44,10 @@ func (s ExcelSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExcelSource: %+v", err) } + decoded["type"] = "ExcelSource" encoded, err = json.Marshal(decoded) @@ -59,6 +72,7 @@ func (s *ExcelSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -66,7 +80,7 @@ func (s *ExcelSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ExcelSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go index e4e71110c75..1e38f2059cf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go @@ -16,14 +16,28 @@ type ExecuteDataFlowActivity struct { TypeProperties ExecuteDataFlowActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ExecuteDataFlowActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ExecuteDataFlowActivity{} func (s ExecuteDataFlowActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s ExecuteDataFlowActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecuteDataFlowActivity: %+v", err) } + decoded["type"] = "ExecuteDataFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go index d71bf192ec3..d56d15a021a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go @@ -15,14 +15,28 @@ type ExecutePipelineActivity struct { TypeProperties ExecutePipelineActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ExecutePipelineActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ExecutePipelineActivity{} func (s ExecutePipelineActivity) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ExecutePipelineActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecutePipelineActivity: %+v", err) } + decoded["type"] = "ExecutePipeline" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go index b4173b79989..16cbc2c94f3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go @@ -16,14 +16,28 @@ type ExecuteSSISPackageActivity struct { TypeProperties ExecuteSSISPackageActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ExecuteSSISPackageActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ExecuteSSISPackageActivity{} func (s ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecuteSSISPackageActivity: %+v", err) } + decoded["type"] = "ExecuteSSISPackage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go index c30c9d28390..62afd6d9221 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go @@ -15,14 +15,28 @@ type ExecuteWranglingDataflowActivity struct { TypeProperties ExecutePowerQueryActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ExecuteWranglingDataflowActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ExecuteWranglingDataflowActivity{} func (s ExecuteWranglingDataflowActivity) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ExecuteWranglingDataflowActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecuteWranglingDataflowActivity: %+v", err) } + decoded["type"] = "ExecuteWranglingDataflow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go index 59154f200cb..ebc7b1bc4d2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go @@ -15,14 +15,28 @@ type ExecutionActivity struct { Policy *ActivityPolicy `json:"policy,omitempty"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ExecutionActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ExecutionActivity{} func (s ExecutionActivity) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ExecutionActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExecutionActivity: %+v", err) } + decoded["type"] = "Execution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_exportsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_exportsettings.go index 226d2ca9834..34a8a067fec 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_exportsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_exportsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ExportSettings interface { + ExportSettings() BaseExportSettingsImpl } -// RawExportSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ExportSettings = BaseExportSettingsImpl{} + +type BaseExportSettingsImpl struct { + Type string `json:"type"` +} + +func (s BaseExportSettingsImpl) ExportSettings() BaseExportSettingsImpl { + return s +} + +var _ ExportSettings = RawExportSettingsImpl{} + +// RawExportSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawExportSettingsImpl struct { - Type string - Values map[string]interface{} + exportSettings BaseExportSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawExportSettingsImpl) ExportSettings() BaseExportSettingsImpl { + return s.exportSettings } -func unmarshalExportSettingsImplementation(input []byte) (ExportSettings, error) { +func UnmarshalExportSettingsImplementation(input []byte) (ExportSettings, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalExportSettingsImplementation(input []byte) (ExportSettings, error) return out, nil } - out := RawExportSettingsImpl{ - Type: value, - Values: temp, + var parent BaseExportSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseExportSettingsImpl: %+v", err) } - return out, nil + + return RawExportSettingsImpl{ + exportSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go index 3a432ee8037..91576ba4198 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go @@ -14,14 +14,28 @@ type FailActivity struct { TypeProperties FailActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s FailActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = FailActivity{} func (s FailActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s FailActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailActivity: %+v", err) } + decoded["type"] = "Fail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go index c6a1d7ef209..5c4d231b452 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go @@ -23,8 +23,18 @@ type FileServerReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s FileServerReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = FileServerReadSettings{} @@ -38,9 +48,10 @@ func (s FileServerReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileServerReadSettings: %+v", err) } + decoded["type"] = "FileServerReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go index 026addeed68..d58db5c5e96 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go @@ -13,10 +13,22 @@ var _ StoreWriteSettings = FileServerWriteSettings{} type FileServerWriteSettings struct { // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s FileServerWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = FileServerWriteSettings{} @@ -30,9 +42,10 @@ func (s FileServerWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileServerWriteSettings: %+v", err) } + decoded["type"] = "FileServerWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go index 00983eebfd7..9b88eb4957e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go @@ -14,14 +14,28 @@ type FileSystemSink struct { CopyBehavior *string `json:"copyBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s FileSystemSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = FileSystemSink{} func (s FileSystemSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s FileSystemSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileSystemSink: %+v", err) } + decoded["type"] = "FileSystemSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go index e0b5d08f675..2e7d8e144b1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go @@ -15,10 +15,22 @@ type FileSystemSource struct { Recursive *bool `json:"recursive,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s FileSystemSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = FileSystemSource{} @@ -32,9 +44,10 @@ func (s FileSystemSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileSystemSource: %+v", err) } + decoded["type"] = "FileSystemSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go index 7f4051bb33c..8765030f09f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go @@ -14,14 +14,28 @@ type FilterActivity struct { TypeProperties FilterActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s FilterActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = FilterActivity{} func (s FilterActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s FilterActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FilterActivity: %+v", err) } + decoded["type"] = "Filter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go index 873b3f11a35..c318d9b1699 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go @@ -14,14 +14,28 @@ type ForEachActivity struct { TypeProperties ForEachActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ForEachActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ForEachActivity{} func (s ForEachActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ForEachActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ForEachActivity: %+v", err) } + decoded["type"] = "ForEach" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go index def50b2d89f..29a1a31787c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go @@ -41,7 +41,7 @@ func (s *ForEachActivityTypeProperties) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Activities' for 'ForEachActivityTypeProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go index 21d5e49e0e7..fd5e46dbeaa 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FormatReadSettings interface { + FormatReadSettings() BaseFormatReadSettingsImpl } -// RawFormatReadSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FormatReadSettings = BaseFormatReadSettingsImpl{} + +type BaseFormatReadSettingsImpl struct { + Type string `json:"type"` +} + +func (s BaseFormatReadSettingsImpl) FormatReadSettings() BaseFormatReadSettingsImpl { + return s +} + +var _ FormatReadSettings = RawFormatReadSettingsImpl{} + +// RawFormatReadSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFormatReadSettingsImpl struct { - Type string - Values map[string]interface{} + formatReadSettings BaseFormatReadSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawFormatReadSettingsImpl) FormatReadSettings() BaseFormatReadSettingsImpl { + return s.formatReadSettings } -func unmarshalFormatReadSettingsImplementation(input []byte) (FormatReadSettings, error) { +func UnmarshalFormatReadSettingsImplementation(input []byte) (FormatReadSettings, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalFormatReadSettingsImplementation(input []byte) (FormatReadSettings return out, nil } - out := RawFormatReadSettingsImpl{ - Type: value, - Values: temp, + var parent BaseFormatReadSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFormatReadSettingsImpl: %+v", err) } - return out, nil + + return RawFormatReadSettingsImpl{ + formatReadSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_formatwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_formatwritesettings.go index 84a4834f283..f4270209087 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_formatwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_formatwritesettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FormatWriteSettings interface { + FormatWriteSettings() BaseFormatWriteSettingsImpl } -// RawFormatWriteSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FormatWriteSettings = BaseFormatWriteSettingsImpl{} + +type BaseFormatWriteSettingsImpl struct { + Type string `json:"type"` +} + +func (s BaseFormatWriteSettingsImpl) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return s +} + +var _ FormatWriteSettings = RawFormatWriteSettingsImpl{} + +// RawFormatWriteSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFormatWriteSettingsImpl struct { - Type string - Values map[string]interface{} + formatWriteSettings BaseFormatWriteSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawFormatWriteSettingsImpl) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return s.formatWriteSettings } -func unmarshalFormatWriteSettingsImplementation(input []byte) (FormatWriteSettings, error) { +func UnmarshalFormatWriteSettingsImplementation(input []byte) (FormatWriteSettings, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFormatWriteSettingsImplementation(input []byte) (FormatWriteSettin return out, nil } - out := RawFormatWriteSettingsImpl{ - Type: value, - Values: temp, + var parent BaseFormatWriteSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFormatWriteSettingsImpl: %+v", err) } - return out, nil + + return RawFormatWriteSettingsImpl{ + formatWriteSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go index 5b5d8c34137..c2ef76acbc1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go @@ -22,8 +22,18 @@ type FtpReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s FtpReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = FtpReadSettings{} @@ -37,9 +47,10 @@ func (s FtpReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FtpReadSettings: %+v", err) } + decoded["type"] = "FtpReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go index 9703b9cc0d2..bee582d2bb1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go @@ -16,14 +16,28 @@ type GetMetadataActivity struct { TypeProperties GetMetadataActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s GetMetadataActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = GetMetadataActivity{} func (s GetMetadataActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s GetMetadataActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GetMetadataActivity: %+v", err) } + decoded["type"] = "GetMetadata" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go index 1abff7caf59..ebd45664d39 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go @@ -33,7 +33,7 @@ func (s *GetMetadataActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["formatSettings"]; ok { - impl, err := unmarshalFormatReadSettingsImplementation(v) + impl, err := UnmarshalFormatReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FormatSettings' for 'GetMetadataActivityTypeProperties': %+v", err) } @@ -41,7 +41,7 @@ func (s *GetMetadataActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'GetMetadataActivityTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go index fa067967c07..3bbed32882e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go @@ -16,10 +16,22 @@ type GoogleAdWordsSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s GoogleAdWordsSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = GoogleAdWordsSource{} @@ -33,9 +45,10 @@ func (s GoogleAdWordsSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleAdWordsSource: %+v", err) } + decoded["type"] = "GoogleAdWordsSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go index fc8fa15b780..1b5a4f1d470 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go @@ -16,10 +16,22 @@ type GoogleBigQuerySource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQuerySource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = GoogleBigQuerySource{} @@ -33,9 +45,10 @@ func (s GoogleBigQuerySource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQuerySource: %+v", err) } + decoded["type"] = "GoogleBigQuerySource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go index 1a460cf712f..6e6883d2a63 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go @@ -16,10 +16,22 @@ type GoogleBigQueryV2Source struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s GoogleBigQueryV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = GoogleBigQueryV2Source{} @@ -33,9 +45,10 @@ func (s GoogleBigQueryV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2Source: %+v", err) } + decoded["type"] = "GoogleBigQueryV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go index 1ee19eb1e58..7b7efbd5926 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go @@ -23,8 +23,18 @@ type GoogleCloudStorageReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s GoogleCloudStorageReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = GoogleCloudStorageReadSettings{} @@ -38,9 +48,10 @@ func (s GoogleCloudStorageReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GoogleCloudStorageReadSettings: %+v", err) } + decoded["type"] = "GoogleCloudStorageReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go index 2a645aed7c5..8c3c9eaf78d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go @@ -16,10 +16,22 @@ type GreenplumSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s GreenplumSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = GreenplumSource{} @@ -33,9 +45,10 @@ func (s GreenplumSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GreenplumSource: %+v", err) } + decoded["type"] = "GreenplumSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go index 4cc19b3bb36..574d27e5ad1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go @@ -16,10 +16,22 @@ type HBaseSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s HBaseSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = HBaseSource{} @@ -33,9 +45,10 @@ func (s HBaseSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HBaseSource: %+v", err) } + decoded["type"] = "HBaseSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go index 1da6e0f8621..9062f63b5da 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go @@ -23,8 +23,18 @@ type HdfsReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s HdfsReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = HdfsReadSettings{} @@ -38,9 +48,10 @@ func (s HdfsReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HdfsReadSettings: %+v", err) } + decoded["type"] = "HdfsReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go index 9068a5ca189..4c50dd59746 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go @@ -15,10 +15,22 @@ type HdfsSource struct { Recursive *bool `json:"recursive,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s HdfsSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = HdfsSource{} @@ -32,9 +44,10 @@ func (s HdfsSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HdfsSource: %+v", err) } + decoded["type"] = "HdfsSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go index 1e446fd2693..f115c1fcab8 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go @@ -16,14 +16,28 @@ type HDInsightHiveActivity struct { TypeProperties HDInsightHiveActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s HDInsightHiveActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = HDInsightHiveActivity{} func (s HDInsightHiveActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s HDInsightHiveActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightHiveActivity: %+v", err) } + decoded["type"] = "HDInsightHive" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go index 062055a7c16..cf257f5c841 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go @@ -16,14 +16,28 @@ type HDInsightMapReduceActivity struct { TypeProperties HDInsightMapReduceActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s HDInsightMapReduceActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = HDInsightMapReduceActivity{} func (s HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightMapReduceActivity: %+v", err) } + decoded["type"] = "HDInsightMapReduce" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go index cb35484a5d6..2df23168d69 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go @@ -16,14 +16,28 @@ type HDInsightPigActivity struct { TypeProperties HDInsightPigActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s HDInsightPigActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = HDInsightPigActivity{} func (s HDInsightPigActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s HDInsightPigActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightPigActivity: %+v", err) } + decoded["type"] = "HDInsightPig" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go index 5c19cfc67b5..b0428a1d7ae 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go @@ -16,14 +16,28 @@ type HDInsightSparkActivity struct { TypeProperties HDInsightSparkActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s HDInsightSparkActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = HDInsightSparkActivity{} func (s HDInsightSparkActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s HDInsightSparkActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightSparkActivity: %+v", err) } + decoded["type"] = "HDInsightSpark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go index 110a3c2d6c8..154793f50a2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go @@ -16,14 +16,28 @@ type HDInsightStreamingActivity struct { TypeProperties HDInsightStreamingActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s HDInsightStreamingActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = HDInsightStreamingActivity{} func (s HDInsightStreamingActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s HDInsightStreamingActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsightStreamingActivity: %+v", err) } + decoded["type"] = "HDInsightStreaming" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go index fbd3837f9d2..528699d8aec 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go @@ -16,10 +16,22 @@ type HiveSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s HiveSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = HiveSource{} @@ -33,9 +45,10 @@ func (s HiveSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HiveSource: %+v", err) } + decoded["type"] = "HiveSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go index 7e6e1d8b2cb..039e0e023d0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go @@ -18,8 +18,18 @@ type HTTPReadSettings struct { RequestTimeout *string `json:"requestTimeout,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s HTTPReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = HTTPReadSettings{} @@ -33,9 +43,10 @@ func (s HTTPReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPReadSettings: %+v", err) } + decoded["type"] = "HttpReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go index 761c7c1c718..c1b6fa88577 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go @@ -14,10 +14,22 @@ type HTTPSource struct { HTTPRequestTimeout *string `json:"httpRequestTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s HTTPSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = HTTPSource{} @@ -31,9 +43,10 @@ func (s HTTPSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HTTPSource: %+v", err) } + decoded["type"] = "HttpSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go index 5be6cc6b7a4..44b2fe271c0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go @@ -16,10 +16,22 @@ type HubspotSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s HubspotSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = HubspotSource{} @@ -33,9 +45,10 @@ func (s HubspotSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HubspotSource: %+v", err) } + decoded["type"] = "HubspotSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_icebergsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_icebergsink.go index 8c9867f23b5..2a8c07a66ce 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_icebergsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_icebergsink.go @@ -15,14 +15,28 @@ type IcebergSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s IcebergSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = IcebergSink{} func (s IcebergSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s IcebergSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IcebergSink: %+v", err) } + decoded["type"] = "IcebergSink" encoded, err = json.Marshal(decoded) @@ -60,6 +75,7 @@ func (s *IcebergSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -69,7 +85,7 @@ func (s *IcebergSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["formatSettings"]; ok { - impl, err := unmarshalFormatWriteSettingsImplementation(v) + impl, err := UnmarshalFormatWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FormatSettings' for 'IcebergSink': %+v", err) } @@ -77,7 +93,7 @@ func (s *IcebergSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'IcebergSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_icebergwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_icebergwritesettings.go index 6f75d1a2c42..6754dd59b17 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_icebergwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_icebergwritesettings.go @@ -13,6 +13,14 @@ var _ FormatWriteSettings = IcebergWriteSettings{} type IcebergWriteSettings struct { // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s IcebergWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = IcebergWriteSettings{} @@ -26,9 +34,10 @@ func (s IcebergWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IcebergWriteSettings: %+v", err) } + decoded["type"] = "IcebergWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go index 08a71a229df..5134be6dfa0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go @@ -14,14 +14,28 @@ type IfConditionActivity struct { TypeProperties IfConditionActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s IfConditionActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = IfConditionActivity{} func (s IfConditionActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s IfConditionActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IfConditionActivity: %+v", err) } + decoded["type"] = "IfCondition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go index 073f70bf33b..44d0eedd0c3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go @@ -38,7 +38,7 @@ func (s *IfConditionActivityTypeProperties) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IfFalseActivities' for 'IfConditionActivityTypeProperties': %+v", i, err) } @@ -55,7 +55,7 @@ func (s *IfConditionActivityTypeProperties) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IfTrueActivities' for 'IfConditionActivityTypeProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go index 7a4ce4e4b2a..d5d4849142e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go @@ -16,10 +16,22 @@ type ImpalaSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ImpalaSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ImpalaSource{} @@ -33,9 +45,10 @@ func (s ImpalaSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImpalaSource: %+v", err) } + decoded["type"] = "ImpalaSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_importsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_importsettings.go index f4e04281b2e..170a3c65a33 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_importsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_importsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ImportSettings interface { + ImportSettings() BaseImportSettingsImpl } -// RawImportSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ImportSettings = BaseImportSettingsImpl{} + +type BaseImportSettingsImpl struct { + Type string `json:"type"` +} + +func (s BaseImportSettingsImpl) ImportSettings() BaseImportSettingsImpl { + return s +} + +var _ ImportSettings = RawImportSettingsImpl{} + +// RawImportSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawImportSettingsImpl struct { - Type string - Values map[string]interface{} + importSettings BaseImportSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawImportSettingsImpl) ImportSettings() BaseImportSettingsImpl { + return s.importSettings } -func unmarshalImportSettingsImplementation(input []byte) (ImportSettings, error) { +func UnmarshalImportSettingsImplementation(input []byte) (ImportSettings, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalImportSettingsImplementation(input []byte) (ImportSettings, error) return out, nil } - out := RawImportSettingsImpl{ - Type: value, - Values: temp, + var parent BaseImportSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseImportSettingsImpl: %+v", err) } - return out, nil + + return RawImportSettingsImpl{ + importSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go index 51e5ed7865b..292c59b7ed2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go @@ -14,14 +14,28 @@ type InformixSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s InformixSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = InformixSink{} func (s InformixSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s InformixSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InformixSink: %+v", err) } + decoded["type"] = "InformixSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go index 0ecda8a48c6..4c0ceea696c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go @@ -16,10 +16,22 @@ type InformixSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s InformixSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = InformixSource{} @@ -33,9 +45,10 @@ func (s InformixSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InformixSource: %+v", err) } + decoded["type"] = "InformixSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go index 284947dd3d1..45c3b838c01 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go @@ -16,10 +16,22 @@ type JiraSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s JiraSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = JiraSource{} @@ -33,9 +45,10 @@ func (s JiraSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JiraSource: %+v", err) } + decoded["type"] = "JiraSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go index 9bf66e9aec5..c9c37666979 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go @@ -14,6 +14,14 @@ type JsonReadSettings struct { CompressionProperties CompressionReadSettings `json:"compressionProperties"` // Fields inherited from FormatReadSettings + + Type string `json:"type"` +} + +func (s JsonReadSettings) FormatReadSettings() BaseFormatReadSettingsImpl { + return BaseFormatReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonReadSettings{} @@ -27,9 +35,10 @@ func (s JsonReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonReadSettings: %+v", err) } + decoded["type"] = "JsonReadSettings" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s JsonReadSettings) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &JsonReadSettings{} func (s *JsonReadSettings) UnmarshalJSON(bytes []byte) error { + type alias JsonReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JsonReadSettings: %+v", err) + } + + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *JsonReadSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["compressionProperties"]; ok { - impl, err := unmarshalCompressionReadSettingsImplementation(v) + impl, err := UnmarshalCompressionReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'JsonReadSettings': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go index 94b6f1c6274..7b7ae12db9a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go @@ -15,14 +15,28 @@ type JsonSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s JsonSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = JsonSink{} func (s JsonSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s JsonSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSink: %+v", err) } + decoded["type"] = "JsonSink" encoded, err = json.Marshal(decoded) @@ -61,6 +76,7 @@ func (s *JsonSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -70,7 +86,7 @@ func (s *JsonSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'JsonSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go index f1162daeaa0..c3faf147d0c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go @@ -16,10 +16,22 @@ type JsonSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s JsonSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = JsonSource{} @@ -33,9 +45,10 @@ func (s JsonSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSource: %+v", err) } + decoded["type"] = "JsonSource" encoded, err = json.Marshal(decoded) @@ -61,6 +74,7 @@ func (s *JsonSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -68,7 +82,7 @@ func (s *JsonSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'JsonSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go index c382ab87456..f9ee76344fb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go @@ -14,6 +14,14 @@ type JsonWriteSettings struct { FilePattern *string `json:"filePattern,omitempty"` // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s JsonWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonWriteSettings{} @@ -27,9 +35,10 @@ func (s JsonWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonWriteSettings: %+v", err) } + decoded["type"] = "JsonWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go index 7654cc28d33..8397d44ea65 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go @@ -22,8 +22,18 @@ type LakeHouseReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = LakeHouseReadSettings{} @@ -37,9 +47,10 @@ func (s LakeHouseReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseReadSettings: %+v", err) } + decoded["type"] = "LakeHouseReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go index c7367d04bb3..a364770031c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go @@ -16,14 +16,28 @@ type LakeHouseTableSink struct { TableActionOption *string `json:"tableActionOption,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s LakeHouseTableSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = LakeHouseTableSink{} func (s LakeHouseTableSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s LakeHouseTableSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseTableSink: %+v", err) } + decoded["type"] = "LakeHouseTableSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go index 6facf3f371b..7a987b7d80c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go @@ -16,10 +16,22 @@ type LakeHouseTableSource struct { VersionAsOf *int64 `json:"versionAsOf,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseTableSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = LakeHouseTableSource{} @@ -33,9 +45,10 @@ func (s LakeHouseTableSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseTableSource: %+v", err) } + decoded["type"] = "LakeHouseTableSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go index 5687b4ea515..8c84fbe2091 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go @@ -13,10 +13,22 @@ var _ StoreWriteSettings = LakeHouseWriteSettings{} type LakeHouseWriteSettings struct { // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s LakeHouseWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = LakeHouseWriteSettings{} @@ -30,9 +42,10 @@ func (s LakeHouseWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseWriteSettings: %+v", err) } + decoded["type"] = "LakeHouseWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go index f613fb08d9d..55bd2490d2b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go @@ -16,14 +16,28 @@ type LookupActivity struct { TypeProperties LookupActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s LookupActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = LookupActivity{} func (s LookupActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s LookupActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LookupActivity: %+v", err) } + decoded["type"] = "Lookup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go index 731ce1a9907..060c3e70610 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go @@ -32,7 +32,7 @@ func (s *LookupActivityTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["source"]; ok { - impl, err := unmarshalCopySourceImplementation(v) + impl, err := UnmarshalCopySourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Source' for 'LookupActivityTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go index d0d0c6d9db8..d2abb02bfc0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go @@ -16,10 +16,22 @@ type MagentoSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MagentoSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MagentoSource{} @@ -33,9 +45,10 @@ func (s MagentoSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MagentoSource: %+v", err) } + decoded["type"] = "MagentoSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go index 3a6e56099ed..6a98340ae1b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go @@ -16,10 +16,22 @@ type MariaDBSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MariaDBSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MariaDBSource{} @@ -33,9 +45,10 @@ func (s MariaDBSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MariaDBSource: %+v", err) } + decoded["type"] = "MariaDBSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go index db9b17ce86d..9263318f9ba 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go @@ -16,10 +16,22 @@ type MarketoSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MarketoSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MarketoSource{} @@ -33,9 +45,10 @@ func (s MarketoSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MarketoSource: %+v", err) } + decoded["type"] = "MarketoSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go index 48fce759511..8bec8fb1f1d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go @@ -14,14 +14,28 @@ type MicrosoftAccessSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s MicrosoftAccessSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = MicrosoftAccessSink{} func (s MicrosoftAccessSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MicrosoftAccessSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftAccessSink: %+v", err) } + decoded["type"] = "MicrosoftAccessSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go index 68b94e06c12..b39918829ff 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go @@ -15,10 +15,22 @@ type MicrosoftAccessSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MicrosoftAccessSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MicrosoftAccessSource{} @@ -32,9 +44,10 @@ func (s MicrosoftAccessSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftAccessSource: %+v", err) } + decoded["type"] = "MicrosoftAccessSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go index 657aaa82c37..d57cdda53e9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go @@ -14,14 +14,28 @@ type MongoDbAtlasSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s MongoDbAtlasSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = MongoDbAtlasSink{} func (s MongoDbAtlasSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MongoDbAtlasSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbAtlasSink: %+v", err) } + decoded["type"] = "MongoDbAtlasSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go index ca4a5c99e30..7f226a6ee04 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go @@ -18,10 +18,22 @@ type MongoDbAtlasSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbAtlasSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MongoDbAtlasSource{} @@ -35,9 +47,10 @@ func (s MongoDbAtlasSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbAtlasSource: %+v", err) } + decoded["type"] = "MongoDbAtlasSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go index caa16b5c2b8..fe09abffc9a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go @@ -15,10 +15,22 @@ type MongoDbSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MongoDbSource{} @@ -32,9 +44,10 @@ func (s MongoDbSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbSource: %+v", err) } + decoded["type"] = "MongoDbSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go index 1fee54b802e..9cec5dbe13a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go @@ -14,14 +14,28 @@ type MongoDbV2Sink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s MongoDbV2Sink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = MongoDbV2Sink{} func (s MongoDbV2Sink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MongoDbV2Sink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbV2Sink: %+v", err) } + decoded["type"] = "MongoDbV2Sink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go index 08a02c35526..7095f6bd099 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go @@ -18,10 +18,22 @@ type MongoDbV2Source struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MongoDbV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MongoDbV2Source{} @@ -35,9 +47,10 @@ func (s MongoDbV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MongoDbV2Source: %+v", err) } + decoded["type"] = "MongoDbV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go index 4833ae7804b..0ed018d9e8b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go @@ -16,10 +16,22 @@ type MySqlSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s MySqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = MySqlSource{} @@ -33,9 +45,10 @@ func (s MySqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MySqlSource: %+v", err) } + decoded["type"] = "MySqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go index 0b5a1bb71f9..d0ccc19457c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go @@ -18,10 +18,22 @@ type NetezzaSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s NetezzaSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = NetezzaSource{} @@ -35,9 +47,10 @@ func (s NetezzaSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetezzaSource: %+v", err) } + decoded["type"] = "NetezzaSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go index 849458e193b..1d43e40c0be 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go @@ -16,10 +16,22 @@ type ODataSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ODataSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ODataSource{} @@ -33,9 +45,10 @@ func (s ODataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ODataSource: %+v", err) } + decoded["type"] = "ODataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go index c220a8972ce..2b611d292ff 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go @@ -14,14 +14,28 @@ type OdbcSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s OdbcSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = OdbcSink{} func (s OdbcSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s OdbcSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OdbcSink: %+v", err) } + decoded["type"] = "OdbcSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go index 0d4ac0c4625..8221029b9d2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go @@ -16,10 +16,22 @@ type OdbcSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s OdbcSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = OdbcSource{} @@ -33,9 +45,10 @@ func (s OdbcSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OdbcSource: %+v", err) } + decoded["type"] = "OdbcSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go index fbe4972b429..b2bea4391fd 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go @@ -19,10 +19,22 @@ type Office365Source struct { UserScopeFilterUri *string `json:"userScopeFilterUri,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s Office365Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = Office365Source{} @@ -36,9 +48,10 @@ func (s Office365Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Office365Source: %+v", err) } + decoded["type"] = "Office365Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go index 239695cd71a..86ed2f3eeb6 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go @@ -23,8 +23,18 @@ type OracleCloudStorageReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s OracleCloudStorageReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = OracleCloudStorageReadSettings{} @@ -38,9 +48,10 @@ func (s OracleCloudStorageReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleCloudStorageReadSettings: %+v", err) } + decoded["type"] = "OracleCloudStorageReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go index 369f246c21a..fa2941047be 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go @@ -16,10 +16,22 @@ type OracleServiceCloudSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s OracleServiceCloudSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = OracleServiceCloudSource{} @@ -33,9 +45,10 @@ func (s OracleServiceCloudSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleServiceCloudSource: %+v", err) } + decoded["type"] = "OracleServiceCloudSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go index d8d82dd32f6..0dfd4ba0334 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go @@ -14,14 +14,28 @@ type OracleSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s OracleSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = OracleSink{} func (s OracleSink) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s OracleSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleSink: %+v", err) } + decoded["type"] = "OracleSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go index ae205ddf275..844b8ed1e67 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go @@ -18,10 +18,22 @@ type OracleSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s OracleSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = OracleSource{} @@ -35,9 +47,10 @@ func (s OracleSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OracleSource: %+v", err) } + decoded["type"] = "OracleSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go index 237e744099c..bd4748a592f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go @@ -15,14 +15,28 @@ type OrcSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s OrcSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = OrcSink{} func (s OrcSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s OrcSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OrcSink: %+v", err) } + decoded["type"] = "OrcSink" encoded, err = json.Marshal(decoded) @@ -61,6 +76,7 @@ func (s *OrcSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -70,7 +86,7 @@ func (s *OrcSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'OrcSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go index a30a1741a22..2852db9ca8d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go @@ -15,10 +15,22 @@ type OrcSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s OrcSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = OrcSource{} @@ -32,9 +44,10 @@ func (s OrcSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OrcSource: %+v", err) } + decoded["type"] = "OrcSource" encoded, err = json.Marshal(decoded) @@ -59,6 +72,7 @@ func (s *OrcSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -66,7 +80,7 @@ func (s *OrcSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'OrcSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go index 7d476d64cbf..777daeb9b08 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go @@ -15,6 +15,14 @@ type OrcWriteSettings struct { MaxRowsPerFile *int64 `json:"maxRowsPerFile,omitempty"` // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s OrcWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = OrcWriteSettings{} @@ -28,9 +36,10 @@ func (s OrcWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OrcWriteSettings: %+v", err) } + decoded["type"] = "OrcWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go index 73320045a43..7bc3cf3ad42 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go @@ -14,6 +14,14 @@ type ParquetReadSettings struct { CompressionProperties CompressionReadSettings `json:"compressionProperties"` // Fields inherited from FormatReadSettings + + Type string `json:"type"` +} + +func (s ParquetReadSettings) FormatReadSettings() BaseFormatReadSettingsImpl { + return BaseFormatReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetReadSettings{} @@ -27,9 +35,10 @@ func (s ParquetReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetReadSettings: %+v", err) } + decoded["type"] = "ParquetReadSettings" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ParquetReadSettings) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ParquetReadSettings{} func (s *ParquetReadSettings) UnmarshalJSON(bytes []byte) error { + type alias ParquetReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ParquetReadSettings: %+v", err) + } + + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ParquetReadSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["compressionProperties"]; ok { - impl, err := unmarshalCompressionReadSettingsImplementation(v) + impl, err := UnmarshalCompressionReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'ParquetReadSettings': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go index d83de6009bc..1449383ac91 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go @@ -15,14 +15,28 @@ type ParquetSink struct { StoreSettings StoreWriteSettings `json:"storeSettings"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s ParquetSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = ParquetSink{} func (s ParquetSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ParquetSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSink: %+v", err) } + decoded["type"] = "ParquetSink" encoded, err = json.Marshal(decoded) @@ -61,6 +76,7 @@ func (s *ParquetSink) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SinkRetryCount = decoded.SinkRetryCount s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type s.WriteBatchSize = decoded.WriteBatchSize s.WriteBatchTimeout = decoded.WriteBatchTimeout @@ -70,7 +86,7 @@ func (s *ParquetSink) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreWriteSettingsImplementation(v) + impl, err := UnmarshalStoreWriteSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ParquetSink': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go index c27314ae376..f5440c61ad8 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go @@ -16,10 +16,22 @@ type ParquetSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ParquetSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ParquetSource{} @@ -33,9 +45,10 @@ func (s ParquetSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSource: %+v", err) } + decoded["type"] = "ParquetSource" encoded, err = json.Marshal(decoded) @@ -61,6 +74,7 @@ func (s *ParquetSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -68,7 +82,7 @@ func (s *ParquetSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ParquetSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go index a758f48480c..d7fc19e63f3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go @@ -15,6 +15,14 @@ type ParquetWriteSettings struct { MaxRowsPerFile *int64 `json:"maxRowsPerFile,omitempty"` // Fields inherited from FormatWriteSettings + + Type string `json:"type"` +} + +func (s ParquetWriteSettings) FormatWriteSettings() BaseFormatWriteSettingsImpl { + return BaseFormatWriteSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetWriteSettings{} @@ -28,9 +36,10 @@ func (s ParquetWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetWriteSettings: %+v", err) } + decoded["type"] = "ParquetWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go index f34f3766cd5..b0448d0aa3f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go @@ -16,10 +16,22 @@ type PaypalSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s PaypalSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = PaypalSource{} @@ -33,9 +45,10 @@ func (s PaypalSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PaypalSource: %+v", err) } + decoded["type"] = "PaypalSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go index 589be382fb4..acf0edc0bf4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go @@ -16,10 +16,22 @@ type PhoenixSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s PhoenixSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = PhoenixSource{} @@ -33,9 +45,10 @@ func (s PhoenixSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PhoenixSource: %+v", err) } + decoded["type"] = "PhoenixSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go b/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go index cdbd57fa8fd..acd3579499b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go @@ -51,7 +51,7 @@ func (s *Pipeline) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Activities' for 'Pipeline': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go index 7cedac5bb4a..6918799e70b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go @@ -16,10 +16,22 @@ type PostgreSqlSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = PostgreSqlSource{} @@ -33,9 +45,10 @@ func (s PostgreSqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlSource: %+v", err) } + decoded["type"] = "PostgreSqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go index 219bddd1309..ffe9a8f958a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go @@ -16,10 +16,22 @@ type PostgreSqlV2Source struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s PostgreSqlV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = PostgreSqlV2Source{} @@ -33,9 +45,10 @@ func (s PostgreSqlV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSqlV2Source: %+v", err) } + decoded["type"] = "PostgreSqlV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go index ac2e57a4341..34ef240799c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go @@ -16,10 +16,22 @@ type PrestoSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s PrestoSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = PrestoSource{} @@ -33,9 +45,10 @@ func (s PrestoSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrestoSource: %+v", err) } + decoded["type"] = "PrestoSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go index 29d224f77ef..0629330e7a9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go @@ -16,10 +16,22 @@ type QuickBooksSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s QuickBooksSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = QuickBooksSource{} @@ -33,9 +45,10 @@ func (s QuickBooksSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling QuickBooksSource: %+v", err) } + decoded["type"] = "QuickBooksSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go index f26cc46afce..08dacf853bf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go @@ -15,10 +15,22 @@ type RelationalSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s RelationalSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = RelationalSource{} @@ -32,9 +44,10 @@ func (s RelationalSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RelationalSource: %+v", err) } + decoded["type"] = "RelationalSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go index 1c0d5720c1d..d21a8061754 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go @@ -16,10 +16,22 @@ type ResponsysSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ResponsysSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ResponsysSource{} @@ -33,9 +45,10 @@ func (s ResponsysSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResponsysSource: %+v", err) } + decoded["type"] = "ResponsysSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go index 476210454cb..912c8244c0a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go @@ -18,14 +18,28 @@ type RestSink struct { RequestMethod *string `json:"requestMethod,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s RestSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = RestSink{} func (s RestSink) MarshalJSON() ([]byte, error) { @@ -37,9 +51,10 @@ func (s RestSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestSink: %+v", err) } + decoded["type"] = "RestSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go index 5719c9df0b1..a7d3c7316c7 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go @@ -20,10 +20,22 @@ type RestSource struct { RequestMethod *string `json:"requestMethod,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s RestSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = RestSource{} @@ -37,9 +49,10 @@ func (s RestSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestSource: %+v", err) } + decoded["type"] = "RestSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go index 51ed837559c..6cf885f127b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go @@ -16,10 +16,22 @@ type SalesforceMarketingCloudSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceMarketingCloudSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SalesforceMarketingCloudSource{} @@ -33,9 +45,10 @@ func (s SalesforceMarketingCloudSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudSource: %+v", err) } + decoded["type"] = "SalesforceMarketingCloudSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go index e96280eeae5..365513c259e 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go @@ -16,14 +16,28 @@ type SalesforceServiceCloudSink struct { WriteBehavior *SalesforceSinkWriteBehavior `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SalesforceServiceCloudSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SalesforceServiceCloudSink{} func (s SalesforceServiceCloudSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SalesforceServiceCloudSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudSink: %+v", err) } + decoded["type"] = "SalesforceServiceCloudSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go index 8c2a8ca7a2c..111d7b2e98c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go @@ -16,10 +16,22 @@ type SalesforceServiceCloudSource struct { ReadBehavior *string `json:"readBehavior,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SalesforceServiceCloudSource{} @@ -33,9 +45,10 @@ func (s SalesforceServiceCloudSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudSource: %+v", err) } + decoded["type"] = "SalesforceServiceCloudSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go index c89e9f2f313..a005fe6d999 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go @@ -16,14 +16,28 @@ type SalesforceServiceCloudV2Sink struct { WriteBehavior *SalesforceV2SinkWriteBehavior `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SalesforceServiceCloudV2Sink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SalesforceServiceCloudV2Sink{} func (s SalesforceServiceCloudV2Sink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SalesforceServiceCloudV2Sink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2Sink: %+v", err) } + decoded["type"] = "SalesforceServiceCloudV2Sink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go index 2d5bb17b35d..4472c24babf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go @@ -17,10 +17,22 @@ type SalesforceServiceCloudV2Source struct { SOQLQuery *string `json:"SOQLQuery,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceServiceCloudV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SalesforceServiceCloudV2Source{} @@ -34,9 +46,10 @@ func (s SalesforceServiceCloudV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2Source: %+v", err) } + decoded["type"] = "SalesforceServiceCloudV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go index 583a1dcc8df..58ec722825d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go @@ -16,14 +16,28 @@ type SalesforceSink struct { WriteBehavior *SalesforceSinkWriteBehavior `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SalesforceSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SalesforceSink{} func (s SalesforceSink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SalesforceSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceSink: %+v", err) } + decoded["type"] = "SalesforceSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go index 71decf71208..a7343846cef 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go @@ -17,10 +17,22 @@ type SalesforceSource struct { ReadBehavior *string `json:"readBehavior,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SalesforceSource{} @@ -34,9 +46,10 @@ func (s SalesforceSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceSource: %+v", err) } + decoded["type"] = "SalesforceSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go index 5efbfd79850..a075be2142d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go @@ -16,14 +16,28 @@ type SalesforceV2Sink struct { WriteBehavior *SalesforceV2SinkWriteBehavior `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SalesforceV2Sink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SalesforceV2Sink{} func (s SalesforceV2Sink) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SalesforceV2Sink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceV2Sink: %+v", err) } + decoded["type"] = "SalesforceV2Sink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go index 15c65b0c49c..a51c87a91ab 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go @@ -18,10 +18,22 @@ type SalesforceV2Source struct { SOQLQuery *string `json:"SOQLQuery,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SalesforceV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SalesforceV2Source{} @@ -35,9 +47,10 @@ func (s SalesforceV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SalesforceV2Source: %+v", err) } + decoded["type"] = "SalesforceV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go index 2c7ec47e32f..fb2111052d4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go @@ -16,10 +16,22 @@ type SapBwSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapBwSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapBwSource{} @@ -33,9 +45,10 @@ func (s SapBwSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapBwSource: %+v", err) } + decoded["type"] = "SapBwSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go index cc5934794dc..773faae0dba 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go @@ -15,14 +15,28 @@ type SapCloudForCustomerSink struct { WriteBehavior *SapCloudForCustomerSinkWriteBehavior `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SapCloudForCustomerSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SapCloudForCustomerSink{} func (s SapCloudForCustomerSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s SapCloudForCustomerSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapCloudForCustomerSink: %+v", err) } + decoded["type"] = "SapCloudForCustomerSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go index c48a4ef0e59..510d21cdeb0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go @@ -17,10 +17,22 @@ type SapCloudForCustomerSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapCloudForCustomerSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapCloudForCustomerSource{} @@ -34,9 +46,10 @@ func (s SapCloudForCustomerSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapCloudForCustomerSource: %+v", err) } + decoded["type"] = "SapCloudForCustomerSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go index a211ef70406..d60437b422f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go @@ -17,10 +17,22 @@ type SapEccSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapEccSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapEccSource{} @@ -34,9 +46,10 @@ func (s SapEccSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapEccSource: %+v", err) } + decoded["type"] = "SapEccSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go index 577f7c95a4c..66c2345b1ae 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go @@ -19,10 +19,22 @@ type SapHanaSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapHanaSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapHanaSource{} @@ -36,9 +48,10 @@ func (s SapHanaSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapHanaSource: %+v", err) } + decoded["type"] = "SapHanaSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go index 8740aa5f597..d4b65cc5489 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go @@ -19,10 +19,22 @@ type SapOdpSource struct { SubscriberProcess *string `json:"subscriberProcess,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapOdpSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapOdpSource{} @@ -36,9 +48,10 @@ func (s SapOdpSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOdpSource: %+v", err) } + decoded["type"] = "SapOdpSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go index 18286a5c7ba..eace3ecd955 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go @@ -19,10 +19,22 @@ type SapOpenHubSource struct { SapDataColumnDelimiter *string `json:"sapDataColumnDelimiter,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapOpenHubSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapOpenHubSource{} @@ -36,9 +48,10 @@ func (s SapOpenHubSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapOpenHubSource: %+v", err) } + decoded["type"] = "SapOpenHubSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go index 871201d07a5..a5ca61cb6cc 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go @@ -24,10 +24,22 @@ type SapTableSource struct { SapDataColumnDelimiter *string `json:"sapDataColumnDelimiter,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SapTableSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SapTableSource{} @@ -41,9 +53,10 @@ func (s SapTableSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapTableSource: %+v", err) } + decoded["type"] = "SapTableSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go index 9040ca01f2a..1441346e9a2 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go @@ -16,14 +16,28 @@ type ScriptActivity struct { TypeProperties ScriptActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ScriptActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ScriptActivity{} func (s ScriptActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s ScriptActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActivity: %+v", err) } + decoded["type"] = "Script" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go b/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go index 142309e2d0c..168dae234a9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretBase interface { + SecretBase() BaseSecretBaseImpl } -// RawSecretBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretBase = BaseSecretBaseImpl{} + +type BaseSecretBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s +} + +var _ SecretBase = RawSecretBaseImpl{} + +// RawSecretBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretBaseImpl struct { - Type string - Values map[string]interface{} + secretBase BaseSecretBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s.secretBase } -func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { +func UnmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { return out, nil } - out := RawSecretBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretBaseImpl: %+v", err) } - return out, nil + + return RawSecretBaseImpl{ + secretBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go b/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go index 43405297b7b..69d4ce5e66b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go @@ -14,6 +14,14 @@ type SecureString struct { Value string `json:"value"` // Fields inherited from SecretBase + + Type string `json:"type"` +} + +func (s SecureString) SecretBase() BaseSecretBaseImpl { + return BaseSecretBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SecureString{} @@ -27,9 +35,10 @@ func (s SecureString) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecureString: %+v", err) } + decoded["type"] = "SecureString" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go index e6da112b635..bf0c0d3e823 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go @@ -16,10 +16,22 @@ type ServiceNowSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ServiceNowSource{} @@ -33,9 +45,10 @@ func (s ServiceNowSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowSource: %+v", err) } + decoded["type"] = "ServiceNowSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go index ef48bc600d4..9d9f4c643cf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go @@ -16,10 +16,22 @@ type ServiceNowV2Source struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ServiceNowV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ServiceNowV2Source{} @@ -33,9 +45,10 @@ func (s ServiceNowV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceNowV2Source: %+v", err) } + decoded["type"] = "ServiceNowV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go index 970a04ebbf1..dc70cc162f3 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go @@ -15,14 +15,28 @@ type SetVariableActivity struct { TypeProperties SetVariableActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s SetVariableActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = SetVariableActivity{} func (s SetVariableActivity) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s SetVariableActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SetVariableActivity: %+v", err) } + decoded["type"] = "SetVariable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go index 997188906a8..71d2863cc5a 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go @@ -23,8 +23,18 @@ type SftpReadSettings struct { WildcardFolderPath *string `json:"wildcardFolderPath,omitempty"` // Fields inherited from StoreReadSettings + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s SftpReadSettings) StoreReadSettings() BaseStoreReadSettingsImpl { + return BaseStoreReadSettingsImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Type: s.Type, + } } var _ json.Marshaler = SftpReadSettings{} @@ -38,9 +48,10 @@ func (s SftpReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SftpReadSettings: %+v", err) } + decoded["type"] = "SftpReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go index 4913c339c46..44e1b82c26f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go @@ -15,10 +15,22 @@ type SftpWriteSettings struct { UseTempFileRename *bool `json:"useTempFileRename,omitempty"` // Fields inherited from StoreWriteSettings + CopyBehavior *string `json:"copyBehavior,omitempty"` DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s SftpWriteSettings) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return BaseStoreWriteSettingsImpl{ + CopyBehavior: s.CopyBehavior, + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + Metadata: s.Metadata, + Type: s.Type, + } } var _ json.Marshaler = SftpWriteSettings{} @@ -32,9 +44,10 @@ func (s SftpWriteSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SftpWriteSettings: %+v", err) } + decoded["type"] = "SftpWriteSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go index 749b5e87bd6..77b606b1de0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go @@ -15,10 +15,22 @@ type SharePointOnlineListSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SharePointOnlineListSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SharePointOnlineListSource{} @@ -32,9 +44,10 @@ func (s SharePointOnlineListSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SharePointOnlineListSource: %+v", err) } + decoded["type"] = "SharePointOnlineListSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go index 02fe27f04cf..c8e259f883f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go @@ -16,10 +16,22 @@ type ShopifySource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ShopifySource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ShopifySource{} @@ -33,9 +45,10 @@ func (s ShopifySource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ShopifySource: %+v", err) } + decoded["type"] = "ShopifySource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go index d37b302aeef..de9352b09c0 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go @@ -16,6 +16,14 @@ type SnowflakeExportCopyCommand struct { StorageIntegration *string `json:"storageIntegration,omitempty"` // Fields inherited from ExportSettings + + Type string `json:"type"` +} + +func (s SnowflakeExportCopyCommand) ExportSettings() BaseExportSettingsImpl { + return BaseExportSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = SnowflakeExportCopyCommand{} @@ -29,9 +37,10 @@ func (s SnowflakeExportCopyCommand) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeExportCopyCommand: %+v", err) } + decoded["type"] = "SnowflakeExportCopyCommand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go index da33dc26f3e..c025651345d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go @@ -16,6 +16,14 @@ type SnowflakeImportCopyCommand struct { StorageIntegration *string `json:"storageIntegration,omitempty"` // Fields inherited from ImportSettings + + Type string `json:"type"` +} + +func (s SnowflakeImportCopyCommand) ImportSettings() BaseImportSettingsImpl { + return BaseImportSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = SnowflakeImportCopyCommand{} @@ -29,9 +37,10 @@ func (s SnowflakeImportCopyCommand) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeImportCopyCommand: %+v", err) } + decoded["type"] = "SnowflakeImportCopyCommand" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go index bd4faaaefe4..35aafb39338 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go @@ -15,14 +15,28 @@ type SnowflakeSink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SnowflakeSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SnowflakeSink{} func (s SnowflakeSink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s SnowflakeSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeSink: %+v", err) } + decoded["type"] = "SnowflakeSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go index debe10fd94d..a8dc67398cb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go @@ -15,10 +15,22 @@ type SnowflakeSource struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SnowflakeSource{} @@ -32,9 +44,10 @@ func (s SnowflakeSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeSource: %+v", err) } + decoded["type"] = "SnowflakeSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go index 932190eb9ff..37952c448e6 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go @@ -15,14 +15,28 @@ type SnowflakeV2Sink struct { PreCopyScript *string `json:"preCopyScript,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SnowflakeV2Sink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SnowflakeV2Sink{} func (s SnowflakeV2Sink) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s SnowflakeV2Sink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeV2Sink: %+v", err) } + decoded["type"] = "SnowflakeV2Sink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go index 797ba4703a7..29c819bdb5b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go @@ -15,10 +15,22 @@ type SnowflakeV2Source struct { Query *string `json:"query,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SnowflakeV2Source) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SnowflakeV2Source{} @@ -32,9 +44,10 @@ func (s SnowflakeV2Source) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SnowflakeV2Source: %+v", err) } + decoded["type"] = "SnowflakeV2Source" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go index 8bc49eec608..eebc00904be 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go @@ -16,10 +16,22 @@ type SparkSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SparkSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SparkSource{} @@ -33,9 +45,10 @@ func (s SparkSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkSource: %+v", err) } + decoded["type"] = "SparkSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go index 614f79e1616..563046c72b5 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go @@ -22,14 +22,28 @@ type SqlDWSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SqlDWSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SqlDWSink{} func (s SqlDWSink) MarshalJSON() ([]byte, error) { @@ -41,9 +55,10 @@ func (s SqlDWSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWSink: %+v", err) } + decoded["type"] = "SqlDWSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go index c6cdf87e692..88a6473690b 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go @@ -21,10 +21,22 @@ type SqlDWSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SqlDWSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SqlDWSource{} @@ -38,9 +50,10 @@ func (s SqlDWSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWSource: %+v", err) } + decoded["type"] = "SqlDWSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go index a80e6f32b1b..70565436836 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go @@ -22,14 +22,28 @@ type SqlMISink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SqlMISink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SqlMISink{} func (s SqlMISink) MarshalJSON() ([]byte, error) { @@ -41,9 +55,10 @@ func (s SqlMISink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlMISink: %+v", err) } + decoded["type"] = "SqlMISink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go index 6a8901d8cf1..e1a019051dd 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go @@ -22,10 +22,22 @@ type SqlMISource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SqlMISource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SqlMISource{} @@ -39,9 +51,10 @@ func (s SqlMISource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlMISource: %+v", err) } + decoded["type"] = "SqlMISource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go index 6f85ee2a7d0..15fa8eeda81 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go @@ -22,14 +22,28 @@ type SqlServerSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SqlServerSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SqlServerSink{} func (s SqlServerSink) MarshalJSON() ([]byte, error) { @@ -41,9 +55,10 @@ func (s SqlServerSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerSink: %+v", err) } + decoded["type"] = "SqlServerSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go index df2a57828ab..312fcbaf8fb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go @@ -22,10 +22,22 @@ type SqlServerSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SqlServerSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SqlServerSource{} @@ -39,9 +51,10 @@ func (s SqlServerSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerSource: %+v", err) } + decoded["type"] = "SqlServerSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go index 5b4e3224135..8ef9beabdee 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go @@ -16,14 +16,28 @@ type SqlServerStoredProcedureActivity struct { TypeProperties SqlServerStoredProcedureActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s SqlServerStoredProcedureActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = SqlServerStoredProcedureActivity{} func (s SqlServerStoredProcedureActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SqlServerStoredProcedureActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerStoredProcedureActivity: %+v", err) } + decoded["type"] = "SqlServerStoredProcedure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go index c4b929252c9..ceceebd9f6f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go @@ -22,14 +22,28 @@ type SqlSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s SqlSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = SqlSink{} func (s SqlSink) MarshalJSON() ([]byte, error) { @@ -41,9 +55,10 @@ func (s SqlSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlSink: %+v", err) } + decoded["type"] = "SqlSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go index 84c64966563..d46105bcf44 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go @@ -21,10 +21,22 @@ type SqlSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SqlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SqlSource{} @@ -38,9 +50,10 @@ func (s SqlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlSource: %+v", err) } + decoded["type"] = "SqlSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go index 4feff604a6f..6332c447d34 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go @@ -16,10 +16,22 @@ type SquareSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SquareSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SquareSource{} @@ -33,9 +45,10 @@ func (s SquareSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SquareSource: %+v", err) } + decoded["type"] = "SquareSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go index c7897f9b6c0..5738f75f23f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go @@ -32,7 +32,7 @@ func (s *SSISAccessCredential) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'SSISAccessCredential': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go index 64cb0e7395f..9793d235132 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go @@ -42,7 +42,7 @@ func (s *SSISPackageLocationTypeProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["packagePassword"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PackagePassword' for 'SSISPackageLocationTypeProperties': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go index 0fb6986c408..cdd85382aca 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StoreReadSettings interface { + StoreReadSettings() BaseStoreReadSettingsImpl } -// RawStoreReadSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StoreReadSettings = BaseStoreReadSettingsImpl{} + +type BaseStoreReadSettingsImpl struct { + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Type string `json:"type"` +} + +func (s BaseStoreReadSettingsImpl) StoreReadSettings() BaseStoreReadSettingsImpl { + return s +} + +var _ StoreReadSettings = RawStoreReadSettingsImpl{} + +// RawStoreReadSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoreReadSettingsImpl struct { - Type string - Values map[string]interface{} + storeReadSettings BaseStoreReadSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawStoreReadSettingsImpl) StoreReadSettings() BaseStoreReadSettingsImpl { + return s.storeReadSettings } -func unmarshalStoreReadSettingsImplementation(input []byte) (StoreReadSettings, error) { +func UnmarshalStoreReadSettingsImplementation(input []byte) (StoreReadSettings, error) { if input == nil { return nil, nil } @@ -148,10 +167,15 @@ func unmarshalStoreReadSettingsImplementation(input []byte) (StoreReadSettings, return out, nil } - out := RawStoreReadSettingsImpl{ - Type: value, - Values: temp, + var parent BaseStoreReadSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoreReadSettingsImpl: %+v", err) } - return out, nil + + return RawStoreReadSettingsImpl{ + storeReadSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go index f13e7c2ec13..0bf3cce3483 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StoreWriteSettings interface { + StoreWriteSettings() BaseStoreWriteSettingsImpl } -// RawStoreWriteSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StoreWriteSettings = BaseStoreWriteSettingsImpl{} + +type BaseStoreWriteSettingsImpl struct { + CopyBehavior *string `json:"copyBehavior,omitempty"` + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} + +func (s BaseStoreWriteSettingsImpl) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return s +} + +var _ StoreWriteSettings = RawStoreWriteSettingsImpl{} + +// RawStoreWriteSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStoreWriteSettingsImpl struct { - Type string - Values map[string]interface{} + storeWriteSettings BaseStoreWriteSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawStoreWriteSettingsImpl) StoreWriteSettings() BaseStoreWriteSettingsImpl { + return s.storeWriteSettings } -func unmarshalStoreWriteSettingsImplementation(input []byte) (StoreWriteSettings, error) { +func UnmarshalStoreWriteSettingsImplementation(input []byte) (StoreWriteSettings, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalStoreWriteSettingsImplementation(input []byte) (StoreWriteSettings return out, nil } - out := RawStoreWriteSettingsImpl{ - Type: value, - Values: temp, + var parent BaseStoreWriteSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStoreWriteSettingsImpl: %+v", err) } - return out, nil + + return RawStoreWriteSettingsImpl{ + storeWriteSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go index 0bfdff1c675..5f0f8b75760 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go @@ -14,14 +14,28 @@ type SwitchActivity struct { TypeProperties SwitchActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s SwitchActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = SwitchActivity{} func (s SwitchActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s SwitchActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchActivity: %+v", err) } + decoded["type"] = "Switch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go index eb607abb743..41efdd728bf 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go @@ -39,7 +39,7 @@ func (s *SwitchActivityTypeProperties) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DefaultActivities' for 'SwitchActivityTypeProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go index 7d1f900a700..70414e785b4 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go @@ -37,7 +37,7 @@ func (s *SwitchCase) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Activities' for 'SwitchCase': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go index 0d90cfdf8df..6fec34faf09 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go @@ -16,10 +16,22 @@ type SybaseSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s SybaseSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = SybaseSource{} @@ -33,9 +45,10 @@ func (s SybaseSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SybaseSource: %+v", err) } + decoded["type"] = "SybaseSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go index cc270352eae..f44327d3ba9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go @@ -16,14 +16,28 @@ type SynapseNotebookActivity struct { TypeProperties SynapseNotebookActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s SynapseNotebookActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = SynapseNotebookActivity{} func (s SynapseNotebookActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SynapseNotebookActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseNotebookActivity: %+v", err) } + decoded["type"] = "SynapseNotebook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go index dc5dfa1ee76..4c18599cff9 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go @@ -16,14 +16,28 @@ type SynapseSparkJobDefinitionActivity struct { TypeProperties SynapseSparkJobActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s SynapseSparkJobDefinitionActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = SynapseSparkJobDefinitionActivity{} func (s SynapseSparkJobDefinitionActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s SynapseSparkJobDefinitionActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseSparkJobDefinitionActivity: %+v", err) } + decoded["type"] = "SparkJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go index 016ef96c818..e28afd6e0e8 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go @@ -15,10 +15,22 @@ type TabularSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s TabularSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = TabularSource{} @@ -32,9 +44,10 @@ func (s TabularSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TabularSource: %+v", err) } + decoded["type"] = "TabularSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_tabulartranslator.go b/resource-manager/datafactory/2018-06-01/pipelines/model_tabulartranslator.go index a1c12b00669..765a7484271 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_tabulartranslator.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_tabulartranslator.go @@ -20,6 +20,14 @@ type TabularTranslator struct { TypeConversionSettings *TypeConversionSettings `json:"typeConversionSettings,omitempty"` // Fields inherited from CopyTranslator + + Type string `json:"type"` +} + +func (s TabularTranslator) CopyTranslator() BaseCopyTranslatorImpl { + return BaseCopyTranslatorImpl{ + Type: s.Type, + } } var _ json.Marshaler = TabularTranslator{} @@ -33,9 +41,10 @@ func (s TabularTranslator) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TabularTranslator: %+v", err) } + decoded["type"] = "TabularTranslator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go index d51584563b3..888b5200cbb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go @@ -14,6 +14,14 @@ type TarGZipReadSettings struct { PreserveCompressionFileNameAsFolder *bool `json:"preserveCompressionFileNameAsFolder,omitempty"` // Fields inherited from CompressionReadSettings + + Type string `json:"type"` +} + +func (s TarGZipReadSettings) CompressionReadSettings() BaseCompressionReadSettingsImpl { + return BaseCompressionReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = TarGZipReadSettings{} @@ -27,9 +35,10 @@ func (s TarGZipReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TarGZipReadSettings: %+v", err) } + decoded["type"] = "TarGZipReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go index 4823bc1cc29..61623e601ad 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go @@ -14,6 +14,14 @@ type TarReadSettings struct { PreserveCompressionFileNameAsFolder *bool `json:"preserveCompressionFileNameAsFolder,omitempty"` // Fields inherited from CompressionReadSettings + + Type string `json:"type"` +} + +func (s TarReadSettings) CompressionReadSettings() BaseCompressionReadSettingsImpl { + return BaseCompressionReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = TarReadSettings{} @@ -27,9 +35,10 @@ func (s TarReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TarReadSettings: %+v", err) } + decoded["type"] = "TarReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go index ee9e28a6d6f..2c583da5240 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go @@ -18,10 +18,22 @@ type TeradataSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s TeradataSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = TeradataSource{} @@ -35,9 +47,10 @@ func (s TeradataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TeradataSource: %+v", err) } + decoded["type"] = "TeradataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go index 8709e81cf71..0bafa53e4b7 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go @@ -14,14 +14,28 @@ type UntilActivity struct { TypeProperties UntilActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s UntilActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = UntilActivity{} func (s UntilActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s UntilActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UntilActivity: %+v", err) } + decoded["type"] = "Until" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go index 9d040be6265..0c3f9cf1826 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go @@ -39,7 +39,7 @@ func (s *UntilActivityTypeProperties) UnmarshalJSON(bytes []byte) error { output := make([]Activity, 0) for i, val := range listTemp { - impl, err := unmarshalActivityImplementation(val) + impl, err := UnmarshalActivityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Activities' for 'UntilActivityTypeProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go index 8807b7b3159..1d63435f623 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go @@ -14,14 +14,28 @@ type ValidationActivity struct { TypeProperties ValidationActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s ValidationActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = ValidationActivity{} func (s ValidationActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ValidationActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidationActivity: %+v", err) } + decoded["type"] = "Validation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go index 1967dc6454b..2c29bc1a088 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go @@ -16,10 +16,22 @@ type VerticaSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s VerticaSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = VerticaSource{} @@ -33,9 +45,10 @@ func (s VerticaSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VerticaSource: %+v", err) } + decoded["type"] = "VerticaSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go index 556bdd891ee..a092b708658 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go @@ -14,14 +14,28 @@ type WaitActivity struct { TypeProperties WaitActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s WaitActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = WaitActivity{} func (s WaitActivity) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s WaitActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WaitActivity: %+v", err) } + decoded["type"] = "Wait" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go index e147bfd23e0..aec86357373 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go @@ -18,14 +18,28 @@ type WarehouseSink struct { WriteBehavior *string `json:"writeBehavior,omitempty"` // Fields inherited from CopySink + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SinkRetryCount *int64 `json:"sinkRetryCount,omitempty"` SinkRetryWait *string `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` WriteBatchSize *int64 `json:"writeBatchSize,omitempty"` WriteBatchTimeout *string `json:"writeBatchTimeout,omitempty"` } +func (s WarehouseSink) CopySink() BaseCopySinkImpl { + return BaseCopySinkImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SinkRetryCount: s.SinkRetryCount, + SinkRetryWait: s.SinkRetryWait, + Type: s.Type, + WriteBatchSize: s.WriteBatchSize, + WriteBatchTimeout: s.WriteBatchTimeout, + } +} + var _ json.Marshaler = WarehouseSink{} func (s WarehouseSink) MarshalJSON() ([]byte, error) { @@ -37,9 +51,10 @@ func (s WarehouseSink) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarehouseSink: %+v", err) } + decoded["type"] = "WarehouseSink" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go index 38dc33fe9e6..db9a5c06bbb 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go @@ -21,10 +21,22 @@ type WarehouseSource struct { StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s WarehouseSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = WarehouseSource{} @@ -38,9 +50,10 @@ func (s WarehouseSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WarehouseSource: %+v", err) } + decoded["type"] = "WarehouseSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go index 8cfc7113636..50ef226c344 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go @@ -16,14 +16,28 @@ type WebActivity struct { TypeProperties WebActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s WebActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = WebActivity{} func (s WebActivity) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s WebActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebActivity: %+v", err) } + decoded["type"] = "WebActivity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go index 2c8f2e1903e..f1cc4488677 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go @@ -39,7 +39,7 @@ func (s *WebActivityAuthentication) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["password"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Password' for 'WebActivityAuthentication': %+v", err) } @@ -47,7 +47,7 @@ func (s *WebActivityAuthentication) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["pfx"]; ok { - impl, err := unmarshalSecretBaseImplementation(v) + impl, err := UnmarshalSecretBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Pfx' for 'WebActivityAuthentication': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go index 5b8ab963ca9..33afef2fad5 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go @@ -15,14 +15,28 @@ type WebHookActivity struct { TypeProperties WebHookActivityTypeProperties `json:"typeProperties"` // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` Description *string `json:"description,omitempty"` Name string `json:"name"` OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` State *ActivityState `json:"state,omitempty"` + Type string `json:"type"` UserProperties *[]UserProperty `json:"userProperties,omitempty"` } +func (s WebHookActivity) Activity() BaseActivityImpl { + return BaseActivityImpl{ + DependsOn: s.DependsOn, + Description: s.Description, + Name: s.Name, + OnInactiveMarkAs: s.OnInactiveMarkAs, + State: s.State, + Type: s.Type, + UserProperties: s.UserProperties, + } +} + var _ json.Marshaler = WebHookActivity{} func (s WebHookActivity) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s WebHookActivity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebHookActivity: %+v", err) } + decoded["type"] = "WebHook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go index 4005c96bd1a..89aa2f4a372 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go @@ -14,10 +14,22 @@ type WebSource struct { AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s WebSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = WebSource{} @@ -31,9 +43,10 @@ func (s WebSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebSource: %+v", err) } + decoded["type"] = "WebSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go index 2c0bf0f051f..f94c1e884b5 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go @@ -16,10 +16,22 @@ type XeroSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s XeroSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = XeroSource{} @@ -33,9 +45,10 @@ func (s XeroSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XeroSource: %+v", err) } + decoded["type"] = "XeroSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go index e6d51c070b0..7fe11b0d137 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go @@ -18,6 +18,14 @@ type XmlReadSettings struct { ValidationMode *string `json:"validationMode,omitempty"` // Fields inherited from FormatReadSettings + + Type string `json:"type"` +} + +func (s XmlReadSettings) FormatReadSettings() BaseFormatReadSettingsImpl { + return BaseFormatReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = XmlReadSettings{} @@ -31,9 +39,10 @@ func (s XmlReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XmlReadSettings: %+v", err) } + decoded["type"] = "XmlReadSettings" encoded, err = json.Marshal(decoded) @@ -56,6 +65,7 @@ func (s *XmlReadSettings) UnmarshalJSON(bytes []byte) error { s.DetectDataType = decoded.DetectDataType s.NamespacePrefixes = decoded.NamespacePrefixes s.Namespaces = decoded.Namespaces + s.Type = decoded.Type s.ValidationMode = decoded.ValidationMode var temp map[string]json.RawMessage @@ -64,7 +74,7 @@ func (s *XmlReadSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["compressionProperties"]; ok { - impl, err := unmarshalCompressionReadSettingsImplementation(v) + impl, err := UnmarshalCompressionReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'XmlReadSettings': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go index 1e1ca34b3d4..2ec5897aa1f 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go @@ -16,10 +16,22 @@ type XmlSource struct { StoreSettings StoreReadSettings `json:"storeSettings"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s XmlSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = XmlSource{} @@ -33,9 +45,10 @@ func (s XmlSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling XmlSource: %+v", err) } + decoded["type"] = "XmlSource" encoded, err = json.Marshal(decoded) @@ -61,6 +74,7 @@ func (s *XmlSource) UnmarshalJSON(bytes []byte) error { s.MaxConcurrentConnections = decoded.MaxConcurrentConnections s.SourceRetryCount = decoded.SourceRetryCount s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -68,7 +82,7 @@ func (s *XmlSource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["storeSettings"]; ok { - impl, err := unmarshalStoreReadSettingsImplementation(v) + impl, err := UnmarshalStoreReadSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'StoreSettings' for 'XmlSource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go index ec1f1ebeac2..416f0ea142c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go @@ -14,6 +14,14 @@ type ZipDeflateReadSettings struct { PreserveZipFileNameAsFolder *bool `json:"preserveZipFileNameAsFolder,omitempty"` // Fields inherited from CompressionReadSettings + + Type string `json:"type"` +} + +func (s ZipDeflateReadSettings) CompressionReadSettings() BaseCompressionReadSettingsImpl { + return BaseCompressionReadSettingsImpl{ + Type: s.Type, + } } var _ json.Marshaler = ZipDeflateReadSettings{} @@ -27,9 +35,10 @@ func (s ZipDeflateReadSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ZipDeflateReadSettings: %+v", err) } + decoded["type"] = "ZipDeflateReadSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go index ef791869305..4d66de1732d 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go @@ -16,10 +16,22 @@ type ZohoSource struct { QueryTimeout *string `json:"queryTimeout,omitempty"` // Fields inherited from CopySource + DisableMetricsCollection *bool `json:"disableMetricsCollection,omitempty"` MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` SourceRetryCount *int64 `json:"sourceRetryCount,omitempty"` SourceRetryWait *string `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} + +func (s ZohoSource) CopySource() BaseCopySourceImpl { + return BaseCopySourceImpl{ + DisableMetricsCollection: s.DisableMetricsCollection, + MaxConcurrentConnections: s.MaxConcurrentConnections, + SourceRetryCount: s.SourceRetryCount, + SourceRetryWait: s.SourceRetryWait, + Type: s.Type, + } } var _ json.Marshaler = ZohoSource{} @@ -33,9 +45,10 @@ func (s ZohoSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ZohoSource: %+v", err) } + decoded["type"] = "ZohoSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/pipelines/version.go b/resource-manager/datafactory/2018-06-01/pipelines/version.go index 1d7aeb1d4c0..3d4d16e31ca 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/version.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/version.go @@ -1,12 +1,10 @@ package pipelines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pipelines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pipelines/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/README.md b/resource-manager/datafactory/2018-06-01/privateendpointconnections/README.md index 59a6a95c2d7..034bde4eab5 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/README.md +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/client.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/client.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_factory.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_factory.go index c1e82d1c51b..d44e2dc5c94 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_privateendpointconnection.go index 0d08773d63e..72ed99e71b5 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectioncreateorupdate.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectioncreateorupdate.go index 738deacbffc..ff5d45ebd3a 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectioncreateorupdate.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectioncreateorupdate.go @@ -36,6 +36,7 @@ func (o PrivateEndpointConnectionCreateOrUpdateOperationOptions) ToHeaders() *cl func (o PrivateEndpointConnectionCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionCreateOrUpdat var model PrivateEndpointConnectionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectionget.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectionget.go index 26832ae3445..1d1bce310c4 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectionget.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/method_privateendpointconnectionget.go @@ -36,6 +36,7 @@ func (o PrivateEndpointConnectionGetOperationOptions) ToHeaders() *client.Header func (o PrivateEndpointConnectionGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGet(ctx conte var model PrivateEndpointConnectionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/privateendpointconnections/version.go b/resource-manager/datafactory/2018-06-01/privateendpointconnections/version.go index 9b9844f0ad6..335cb41cadb 100644 --- a/resource-manager/datafactory/2018-06-01/privateendpointconnections/version.go +++ b/resource-manager/datafactory/2018-06-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/privatelinkresources/README.md b/resource-manager/datafactory/2018-06-01/privatelinkresources/README.md index 8ea48e52dcf..fd0fbf7c33f 100644 --- a/resource-manager/datafactory/2018-06-01/privatelinkresources/README.md +++ b/resource-manager/datafactory/2018-06-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/privatelinkresources/client.go b/resource-manager/datafactory/2018-06-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/datafactory/2018-06-01/privatelinkresources/client.go +++ b/resource-manager/datafactory/2018-06-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/privatelinkresources/id_factory.go b/resource-manager/datafactory/2018-06-01/privatelinkresources/id_factory.go index 8ae2311889a..2520b40f22d 100644 --- a/resource-manager/datafactory/2018-06-01/privatelinkresources/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/privatelinkresources/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/privatelinkresources/method_get.go b/resource-manager/datafactory/2018-06-01/privatelinkresources/method_get.go index bb37ce40788..06d1e2fbbe0 100644 --- a/resource-manager/datafactory/2018-06-01/privatelinkresources/method_get.go +++ b/resource-manager/datafactory/2018-06-01/privatelinkresources/method_get.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id FactoryId) (resu var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/privatelinkresources/version.go b/resource-manager/datafactory/2018-06-01/privatelinkresources/version.go index d435f81e223..7d5f140a198 100644 --- a/resource-manager/datafactory/2018-06-01/privatelinkresources/version.go +++ b/resource-manager/datafactory/2018-06-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/trigger/README.md b/resource-manager/datafactory/2018-06-01/trigger/README.md index c52e7c51e76..be85eaf42df 100644 --- a/resource-manager/datafactory/2018-06-01/trigger/README.md +++ b/resource-manager/datafactory/2018-06-01/trigger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/trigger` Documentation -The `trigger` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `trigger` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/trigger/client.go b/resource-manager/datafactory/2018-06-01/trigger/client.go index d64fe022f52..9f27e22218f 100644 --- a/resource-manager/datafactory/2018-06-01/trigger/client.go +++ b/resource-manager/datafactory/2018-06-01/trigger/client.go @@ -15,7 +15,7 @@ type TriggerClient struct { } func NewTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trigger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trigger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggerClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/trigger/id_trigger.go b/resource-manager/datafactory/2018-06-01/trigger/id_trigger.go index 8b6a895342f..1a3d0fa9a06 100644 --- a/resource-manager/datafactory/2018-06-01/trigger/id_trigger.go +++ b/resource-manager/datafactory/2018-06-01/trigger/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/trigger/method_get.go b/resource-manager/datafactory/2018-06-01/trigger/method_get.go index 7a0ebbc7840..89df1abcfdf 100644 --- a/resource-manager/datafactory/2018-06-01/trigger/method_get.go +++ b/resource-manager/datafactory/2018-06-01/trigger/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c TriggerClient) Get(ctx context.Context, id TriggerId, options GetOperati var model TriggerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/trigger/version.go b/resource-manager/datafactory/2018-06-01/trigger/version.go index e8275741828..afad866130b 100644 --- a/resource-manager/datafactory/2018-06-01/trigger/version.go +++ b/resource-manager/datafactory/2018-06-01/trigger/version.go @@ -1,12 +1,10 @@ package trigger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trigger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trigger/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/README.md b/resource-manager/datafactory/2018-06-01/triggerruns/README.md index bf46fabe5c3..0cdf7a308bd 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/README.md +++ b/resource-manager/datafactory/2018-06-01/triggerruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/triggerruns` Documentation -The `triggerruns` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `triggerruns` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/client.go b/resource-manager/datafactory/2018-06-01/triggerruns/client.go index 89ed67b7f0e..658e9b4a0e4 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/client.go +++ b/resource-manager/datafactory/2018-06-01/triggerruns/client.go @@ -15,7 +15,7 @@ type TriggerrunsClient struct { } func NewTriggerrunsClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggerrunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "triggerruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "triggerruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggerrunsClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/id_factory.go b/resource-manager/datafactory/2018-06-01/triggerruns/id_factory.go index 8bf8d84a2e7..47cfaf9522f 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/triggerruns/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/id_triggerrun.go b/resource-manager/datafactory/2018-06-01/triggerruns/id_triggerrun.go index ea53eca2c04..ab9a92da922 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/id_triggerrun.go +++ b/resource-manager/datafactory/2018-06-01/triggerruns/id_triggerrun.go @@ -46,7 +46,7 @@ func ParseTriggerRunID(input string) (*TriggerRunId, error) { } id := TriggerRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerRunIDInsensitively(input string) (*TriggerRunId, error) { } id := TriggerRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/method_querybyfactory.go b/resource-manager/datafactory/2018-06-01/triggerruns/method_querybyfactory.go index c6765991330..f70fcac9796 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/method_querybyfactory.go +++ b/resource-manager/datafactory/2018-06-01/triggerruns/method_querybyfactory.go @@ -50,7 +50,6 @@ func (c TriggerrunsClient) QueryByFactory(ctx context.Context, id FactoryId, inp var model TriggerRunsQueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/triggerruns/version.go b/resource-manager/datafactory/2018-06-01/triggerruns/version.go index 9a7d1dab01d..a924a3fac52 100644 --- a/resource-manager/datafactory/2018-06-01/triggerruns/version.go +++ b/resource-manager/datafactory/2018-06-01/triggerruns/version.go @@ -1,12 +1,10 @@ package triggerruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/triggerruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/triggerruns/2018-06-01" } diff --git a/resource-manager/datafactory/2018-06-01/triggers/README.md b/resource-manager/datafactory/2018-06-01/triggers/README.md index 61c06dd8f22..69a209b432d 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/README.md +++ b/resource-manager/datafactory/2018-06-01/triggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/triggers` Documentation -The `triggers` SDK allows for interaction with the Azure Resource Manager Service `datafactory` (API Version `2018-06-01`). +The `triggers` SDK allows for interaction with Azure Resource Manager `datafactory` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datafactory/2018-06-01/triggers/client.go b/resource-manager/datafactory/2018-06-01/triggers/client.go index 9fdf5bed02e..6e6df4f9267 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/client.go +++ b/resource-manager/datafactory/2018-06-01/triggers/client.go @@ -15,7 +15,7 @@ type TriggersClient struct { } func NewTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "triggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "triggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggersClient: %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/triggers/id_factory.go b/resource-manager/datafactory/2018-06-01/triggers/id_factory.go index 48c543f71fa..e5a16bd9c14 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/id_factory.go +++ b/resource-manager/datafactory/2018-06-01/triggers/id_factory.go @@ -42,7 +42,7 @@ func ParseFactoryID(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFactoryIDInsensitively(input string) (*FactoryId, error) { } id := FactoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/triggers/id_trigger.go b/resource-manager/datafactory/2018-06-01/triggers/id_trigger.go index 47747dfc839..c12e868364f 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/id_trigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datafactory/2018-06-01/triggers/method_createorupdate.go b/resource-manager/datafactory/2018-06-01/triggers/method_createorupdate.go index 31c6276d6a8..50750a6004b 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/method_createorupdate.go +++ b/resource-manager/datafactory/2018-06-01/triggers/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TriggersClient) CreateOrUpdate(ctx context.Context, id TriggerId, input var model TriggerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/triggers/method_geteventsubscriptionstatus.go b/resource-manager/datafactory/2018-06-01/triggers/method_geteventsubscriptionstatus.go index 6b22e5b1bb0..360ce363470 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/method_geteventsubscriptionstatus.go +++ b/resource-manager/datafactory/2018-06-01/triggers/method_geteventsubscriptionstatus.go @@ -46,7 +46,6 @@ func (c TriggersClient) GetEventSubscriptionStatus(ctx context.Context, id Trigg var model TriggerSubscriptionOperationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/triggers/method_querybyfactory.go b/resource-manager/datafactory/2018-06-01/triggers/method_querybyfactory.go index b052cbfe5f7..4230cd91aaa 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/method_querybyfactory.go +++ b/resource-manager/datafactory/2018-06-01/triggers/method_querybyfactory.go @@ -50,7 +50,6 @@ func (c TriggersClient) QueryByFactory(ctx context.Context, id FactoryId, input var model TriggerQueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go index 0f7f0c55cb8..44911302690 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go @@ -15,9 +15,20 @@ type BlobEventsTrigger struct { TypeProperties BlobEventsTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s BlobEventsTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = BlobEventsTrigger{} @@ -31,9 +42,10 @@ func (s BlobEventsTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobEventsTrigger: %+v", err) } + decoded["type"] = "BlobEventsTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go index a14e59e7b0e..7e8ae06ea24 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go @@ -15,9 +15,20 @@ type BlobTrigger struct { TypeProperties BlobTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s BlobTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = BlobTrigger{} @@ -31,9 +42,10 @@ func (s BlobTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobTrigger: %+v", err) } + decoded["type"] = "BlobTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go index 89857b3b514..ee25de73499 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go @@ -15,9 +15,20 @@ type ChainingTrigger struct { TypeProperties ChainingTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s ChainingTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = ChainingTrigger{} @@ -31,9 +42,10 @@ func (s ChainingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ChainingTrigger: %+v", err) } + decoded["type"] = "ChainingTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go index 021f39c22fb..06ff24704d8 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go @@ -15,9 +15,20 @@ type CustomEventsTrigger struct { TypeProperties CustomEventsTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s CustomEventsTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = CustomEventsTrigger{} @@ -31,9 +42,10 @@ func (s CustomEventsTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomEventsTrigger: %+v", err) } + decoded["type"] = "CustomEventsTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go index f340b18373f..ee1a126fa89 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DependencyReference interface { + DependencyReference() BaseDependencyReferenceImpl } -// RawDependencyReferenceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DependencyReference = BaseDependencyReferenceImpl{} + +type BaseDependencyReferenceImpl struct { + Type string `json:"type"` +} + +func (s BaseDependencyReferenceImpl) DependencyReference() BaseDependencyReferenceImpl { + return s +} + +var _ DependencyReference = RawDependencyReferenceImpl{} + +// RawDependencyReferenceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDependencyReferenceImpl struct { - Type string - Values map[string]interface{} + dependencyReference BaseDependencyReferenceImpl + Type string + Values map[string]interface{} +} + +func (s RawDependencyReferenceImpl) DependencyReference() BaseDependencyReferenceImpl { + return s.dependencyReference } -func unmarshalDependencyReferenceImplementation(input []byte) (DependencyReference, error) { +func UnmarshalDependencyReferenceImplementation(input []byte) (DependencyReference, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalDependencyReferenceImplementation(input []byte) (DependencyReferen return out, nil } - out := RawDependencyReferenceImpl{ - Type: value, - Values: temp, + var parent BaseDependencyReferenceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDependencyReferenceImpl: %+v", err) } - return out, nil + + return RawDependencyReferenceImpl{ + dependencyReference: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go index 51338a08321..c1d0f989428 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go @@ -14,9 +14,20 @@ type MultiplePipelineTrigger struct { Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s MultiplePipelineTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = MultiplePipelineTrigger{} @@ -30,9 +41,10 @@ func (s MultiplePipelineTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MultiplePipelineTrigger: %+v", err) } + decoded["type"] = "MultiplePipelineTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go index ed78527f94f..91afdedc754 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go @@ -14,9 +14,20 @@ type RerunTumblingWindowTrigger struct { TypeProperties RerunTumblingWindowTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s RerunTumblingWindowTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = RerunTumblingWindowTrigger{} @@ -30,9 +41,10 @@ func (s RerunTumblingWindowTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RerunTumblingWindowTrigger: %+v", err) } + decoded["type"] = "RerunTumblingWindowTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go index 75a72fbe0ff..0655406c41e 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go @@ -15,9 +15,20 @@ type ScheduleTrigger struct { TypeProperties ScheduleTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s ScheduleTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = ScheduleTrigger{} @@ -31,9 +42,10 @@ func (s ScheduleTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleTrigger: %+v", err) } + decoded["type"] = "ScheduleTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go index 8076c5f3774..a93a3974d77 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go @@ -15,6 +15,14 @@ type SelfDependencyTumblingWindowTriggerReference struct { Size *string `json:"size,omitempty"` // Fields inherited from DependencyReference + + Type string `json:"type"` +} + +func (s SelfDependencyTumblingWindowTriggerReference) DependencyReference() BaseDependencyReferenceImpl { + return BaseDependencyReferenceImpl{ + Type: s.Type, + } } var _ json.Marshaler = SelfDependencyTumblingWindowTriggerReference{} @@ -28,9 +36,10 @@ func (s SelfDependencyTumblingWindowTriggerReference) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfDependencyTumblingWindowTriggerReference: %+v", err) } + decoded["type"] = "SelfDependencyTumblingWindowTriggerReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go index 81f85dde6b1..21c438af02c 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s +} + +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -100,10 +120,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go index aad650415b9..b17326a2848 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go @@ -14,6 +14,14 @@ type TriggerDependencyReference struct { ReferenceTrigger TriggerReference `json:"referenceTrigger"` // Fields inherited from DependencyReference + + Type string `json:"type"` +} + +func (s TriggerDependencyReference) DependencyReference() BaseDependencyReferenceImpl { + return BaseDependencyReferenceImpl{ + Type: s.Type, + } } var _ json.Marshaler = TriggerDependencyReference{} @@ -27,9 +35,10 @@ func (s TriggerDependencyReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TriggerDependencyReference: %+v", err) } + decoded["type"] = "TriggerDependencyReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go index c9c0fe89895..9ae76b8c85e 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go @@ -36,7 +36,7 @@ func (s *TriggerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalTriggerImplementation(v) + impl, err := UnmarshalTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'TriggerResource': %+v", err) } diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go index b64d1ddd932..bb640a76f63 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go @@ -15,9 +15,20 @@ type TumblingWindowTrigger struct { TypeProperties TumblingWindowTriggerTypeProperties `json:"typeProperties"` // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` Description *string `json:"description,omitempty"` RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` +} + +func (s TumblingWindowTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Annotations: s.Annotations, + Description: s.Description, + RuntimeState: s.RuntimeState, + Type: s.Type, + } } var _ json.Marshaler = TumblingWindowTrigger{} @@ -31,9 +42,10 @@ func (s TumblingWindowTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TumblingWindowTrigger: %+v", err) } + decoded["type"] = "TumblingWindowTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go index c3f5624b9df..80e7b33a30b 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go @@ -16,6 +16,14 @@ type TumblingWindowTriggerDependencyReference struct { Size *string `json:"size,omitempty"` // Fields inherited from DependencyReference + + Type string `json:"type"` +} + +func (s TumblingWindowTriggerDependencyReference) DependencyReference() BaseDependencyReferenceImpl { + return BaseDependencyReferenceImpl{ + Type: s.Type, + } } var _ json.Marshaler = TumblingWindowTriggerDependencyReference{} @@ -29,9 +37,10 @@ func (s TumblingWindowTriggerDependencyReference) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TumblingWindowTriggerDependencyReference: %+v", err) } + decoded["type"] = "TumblingWindowTriggerDependencyReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go index 0f8921115f0..e385e027b03 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go @@ -73,7 +73,7 @@ func (s *TumblingWindowTriggerTypeProperties) UnmarshalJSON(bytes []byte) error output := make([]DependencyReference, 0) for i, val := range listTemp { - impl, err := unmarshalDependencyReferenceImplementation(val) + impl, err := UnmarshalDependencyReferenceImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DependsOn' for 'TumblingWindowTriggerTypeProperties': %+v", i, err) } diff --git a/resource-manager/datafactory/2018-06-01/triggers/version.go b/resource-manager/datafactory/2018-06-01/triggers/version.go index 2a84c54d1da..4d8549d7e4f 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/version.go +++ b/resource-manager/datafactory/2018-06-01/triggers/version.go @@ -1,12 +1,10 @@ package triggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/triggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/triggers/2018-06-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/README.md b/resource-manager/datalakeanalytics/2016-11-01/accounts/README.md index 257acb11bae..54dd506feb3 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/client.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/id_account.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/id_account.go index c5a72c0f5d4..032470eed15 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/id_account.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/id_location.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/id_location.go index d1e3eb8b9a4..50433de75d3 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/id_location.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_checknameavailability.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_checknameavailability.go index f6fb648a3b5..77d82314f1d 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_checknameavailability.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c AccountsClient) CheckNameAvailability(ctx context.Context, id LocationId var model NameAvailabilityInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_get.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_get.go index 1c68454085a..770a5c50fef 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_get.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_get.go @@ -45,7 +45,6 @@ func (c AccountsClient) Get(ctx context.Context, id AccountId) (result GetOperat var model DataLakeAnalyticsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_list.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_list.go index f8f8f1be5c2..b2c501fd662 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_list.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_listbyresourcegroup.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_listbyresourcegroup.go index 7a9fdcefbc9..2d7f8cb4b47 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/method_listbyresourcegroup.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/method_listbyresourcegroup.go @@ -45,6 +45,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/version.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/version.go index fe0dbdf6334..95bd0164e23 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2016-11-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/README.md b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/README.md index a3a62d7b72f..c77770cd936 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/computepolicies` Documentation -The `computepolicies` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `computepolicies` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/client.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/client.go index 70fb13f1fa3..6832b065aa1 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/client.go @@ -15,7 +15,7 @@ type ComputePoliciesClient struct { } func NewComputePoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ComputePoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "computepolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "computepolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComputePoliciesClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_account.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_account.go index 999ce23c175..1f71d8eabed 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_account.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_computepolicy.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_computepolicy.go index 585b1085cf4..9c9e5e2eb9a 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_computepolicy.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/id_computepolicy.go @@ -44,7 +44,7 @@ func ParseComputePolicyID(input string) (*ComputePolicyId, error) { } id := ComputePolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComputePolicyIDInsensitively(input string) (*ComputePolicyId, error) { } id := ComputePolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_createorupdate.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_createorupdate.go index dd1a9993fef..9be14132d5f 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_createorupdate.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ComputePoliciesClient) CreateOrUpdate(ctx context.Context, id ComputePol var model ComputePolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_get.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_get.go index 1e1fb1465e8..303673c455b 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_get.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_get.go @@ -45,7 +45,6 @@ func (c ComputePoliciesClient) Get(ctx context.Context, id ComputePolicyId) (res var model ComputePolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_update.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_update.go index 3b580ab12a9..ac962cabed2 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_update.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/method_update.go @@ -49,7 +49,6 @@ func (c ComputePoliciesClient) Update(ctx context.Context, id ComputePolicyId, i var model ComputePolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/version.go b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/version.go index 8d6a2d95f49..e9eac032b33 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/computepolicies/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/computepolicies/version.go @@ -1,12 +1,10 @@ package computepolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/computepolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/computepolicies/2016-11-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/README.md b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/README.md index 75682eb4c1e..693b7eca0d6 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts` Documentation -The `datalakestoreaccounts` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `datalakestoreaccounts` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/client.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/client.go index 0efb00dd2ac..250ca6a9273 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/client.go @@ -15,7 +15,7 @@ type DataLakeStoreAccountsClient struct { } func NewDataLakeStoreAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataLakeStoreAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datalakestoreaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datalakestoreaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataLakeStoreAccountsClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_account.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_account.go index daf98ff1d78..83ddb9760ad 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_account.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_datalakestoreaccount.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_datalakestoreaccount.go index 3061d7ac1cb..bc74fdf0068 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_datalakestoreaccount.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/id_datalakestoreaccount.go @@ -44,7 +44,7 @@ func ParseDataLakeStoreAccountID(input string) (*DataLakeStoreAccountId, error) } id := DataLakeStoreAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataLakeStoreAccountIDInsensitively(input string) (*DataLakeStoreAccou } id := DataLakeStoreAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_get.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_get.go index 52bb3a77780..1daab4471e4 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_get.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_get.go @@ -45,7 +45,6 @@ func (c DataLakeStoreAccountsClient) Get(ctx context.Context, id DataLakeStoreAc var model DataLakeStoreAccountInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_listbyaccount.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_listbyaccount.go index fa0062864db..dc5afaadacb 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_listbyaccount.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/method_listbyaccount.go @@ -44,6 +44,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/version.go b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/version.go index 57c4d361559..2ba9058fcda 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/datalakestoreaccounts/version.go @@ -1,12 +1,10 @@ package datalakestoreaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datalakestoreaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datalakestoreaccounts/2016-11-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/README.md b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/README.md index 1a190cfd855..769cde7a472 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/client.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_account.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_account.go index 7529c219d4a..5c07133aada 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_account.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_firewallrule.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_firewallrule.go index 51afa512de2..4663dbb6d65 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_firewallrule.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_createorupdate.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_createorupdate.go index eabf4b017b5..226e4eb6c01 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_createorupdate.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_get.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_get.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_update.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_update.go index cde4cbdeb58..9daebc82308 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_update.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/method_update.go @@ -49,7 +49,6 @@ func (c FirewallRulesClient) Update(ctx context.Context, id FirewallRuleId, inpu var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/version.go b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/version.go index b5f0ff6e733..9ce40759f89 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/firewallrules/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2016-11-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/locations/README.md b/resource-manager/datalakeanalytics/2016-11-01/locations/README.md index a0517441513..b84c6f86977 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/locations/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/locations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/locations` Documentation -The `locations` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `locations` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/locations/client.go b/resource-manager/datalakeanalytics/2016-11-01/locations/client.go index a9a14613b89..57102dca10e 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/locations/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/locations/client.go @@ -15,7 +15,7 @@ type LocationsClient struct { } func NewLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationsClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/locations/id_location.go b/resource-manager/datalakeanalytics/2016-11-01/locations/id_location.go index 4c04cf129a2..7b1b75a049f 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/locations/id_location.go +++ b/resource-manager/datalakeanalytics/2016-11-01/locations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/locations/method_getcapability.go b/resource-manager/datalakeanalytics/2016-11-01/locations/method_getcapability.go index 18f618b573f..29f10255604 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/locations/method_getcapability.go +++ b/resource-manager/datalakeanalytics/2016-11-01/locations/method_getcapability.go @@ -46,7 +46,6 @@ func (c LocationsClient) GetCapability(ctx context.Context, id LocationId) (resu var model CapabilityInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/locations/version.go b/resource-manager/datalakeanalytics/2016-11-01/locations/version.go index d2e5153ec72..baa96f29a41 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/locations/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/locations/version.go @@ -1,12 +1,10 @@ package locations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locations/2016-11-01" } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/README.md b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/README.md index 973f99e638e..c1214fa84b4 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/README.md +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `datalakeanalytics` (API Version `2016-11-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `datalakeanalytics` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/client.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/client.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_account.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_account.go index 8cc7cdc27f1..dc297b7b803 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_account.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_container.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_container.go index 7bf37d8992c..c364ae3a70c 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_container.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_container.go @@ -46,7 +46,7 @@ func ParseContainerID(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseContainerIDInsensitively(input string) (*ContainerId, error) { } id := ContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_storageaccount.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_storageaccount.go index faf8f53637a..02707889c63 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_storageaccount.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/id_storageaccount.go @@ -44,7 +44,7 @@ func ParseStorageAccountID(input string) (*StorageAccountId, error) { } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageAccountIDInsensitively(input string) (*StorageAccountId, error) } id := StorageAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_get.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_get.go index 9558975dc9e..769f5855e7a 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_get.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_get.go @@ -45,7 +45,6 @@ func (c StorageAccountsClient) Get(ctx context.Context, id StorageAccountId) (re var model StorageAccountInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_getstoragecontainer.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_getstoragecontainer.go index 49d1bd565ae..bdb7d687f93 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_getstoragecontainer.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_getstoragecontainer.go @@ -45,7 +45,6 @@ func (c StorageAccountsClient) GetStorageContainer(ctx context.Context, id Conta var model StorageContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listbyaccount.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listbyaccount.go index c7ef3ba6683..71a6a372842 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listbyaccount.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/method_listbyaccount.go @@ -44,6 +44,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/version.go b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/version.go index b9daf7fb222..f6dfa69336f 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/version.go +++ b/resource-manager/datalakeanalytics/2016-11-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2016-11-01" } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/README.md b/resource-manager/datalakestore/2016-11-01/accounts/README.md index eb15f8c0de5..54f9c8f73b9 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/README.md +++ b/resource-manager/datalakestore/2016-11-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakestore/2016-11-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `datalakestore` (API Version `2016-11-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `datalakestore` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakestore/2016-11-01/accounts/client.go b/resource-manager/datalakestore/2016-11-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/client.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/id_account.go b/resource-manager/datalakestore/2016-11-01/accounts/id_account.go index 9d3d192ecb4..be7889ccf89 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/id_account.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/id_location.go b/resource-manager/datalakestore/2016-11-01/accounts/id_location.go index 75c2d89d404..9d563e53cac 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/id_location.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/method_checknameavailability.go b/resource-manager/datalakestore/2016-11-01/accounts/method_checknameavailability.go index f6fb648a3b5..77d82314f1d 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/method_checknameavailability.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c AccountsClient) CheckNameAvailability(ctx context.Context, id LocationId var model NameAvailabilityInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/method_get.go b/resource-manager/datalakestore/2016-11-01/accounts/method_get.go index d840af8524e..a47b5b0447a 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/method_get.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/method_get.go @@ -45,7 +45,6 @@ func (c AccountsClient) Get(ctx context.Context, id AccountId) (result GetOperat var model DataLakeStoreAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/method_list.go b/resource-manager/datalakestore/2016-11-01/accounts/method_list.go index 3b545689a70..7f9c750335b 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/method_list.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/method_listbyresourcegroup.go b/resource-manager/datalakestore/2016-11-01/accounts/method_listbyresourcegroup.go index a58a7a80d97..f239798a1c4 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/method_listbyresourcegroup.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/method_listbyresourcegroup.go @@ -45,6 +45,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/version.go b/resource-manager/datalakestore/2016-11-01/accounts/version.go index fe0dbdf6334..95bd0164e23 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/version.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2016-11-01" } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/README.md b/resource-manager/datalakestore/2016-11-01/firewallrules/README.md index a6c3c50fad1..47b8a94f67b 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/README.md +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakestore/2016-11-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `datalakestore` (API Version `2016-11-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `datalakestore` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/client.go b/resource-manager/datalakestore/2016-11-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/client.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/id_account.go b/resource-manager/datalakestore/2016-11-01/firewallrules/id_account.go index acc1c7cabe8..9952002aaf2 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/id_account.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/id_firewallrule.go b/resource-manager/datalakestore/2016-11-01/firewallrules/id_firewallrule.go index 34d3eda7770..e179a63272a 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/id_firewallrule.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/method_createorupdate.go b/resource-manager/datalakestore/2016-11-01/firewallrules/method_createorupdate.go index eabf4b017b5..226e4eb6c01 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/method_createorupdate.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/method_get.go b/resource-manager/datalakestore/2016-11-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/method_get.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/method_update.go b/resource-manager/datalakestore/2016-11-01/firewallrules/method_update.go index cde4cbdeb58..9daebc82308 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/method_update.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/method_update.go @@ -49,7 +49,6 @@ func (c FirewallRulesClient) Update(ctx context.Context, id FirewallRuleId, inpu var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/firewallrules/version.go b/resource-manager/datalakestore/2016-11-01/firewallrules/version.go index b5f0ff6e733..9ce40759f89 100644 --- a/resource-manager/datalakestore/2016-11-01/firewallrules/version.go +++ b/resource-manager/datalakestore/2016-11-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2016-11-01" } diff --git a/resource-manager/datalakestore/2016-11-01/locations/README.md b/resource-manager/datalakestore/2016-11-01/locations/README.md index 23c6d1fef73..cb061a7d337 100644 --- a/resource-manager/datalakestore/2016-11-01/locations/README.md +++ b/resource-manager/datalakestore/2016-11-01/locations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakestore/2016-11-01/locations` Documentation -The `locations` SDK allows for interaction with the Azure Resource Manager Service `datalakestore` (API Version `2016-11-01`). +The `locations` SDK allows for interaction with Azure Resource Manager `datalakestore` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakestore/2016-11-01/locations/client.go b/resource-manager/datalakestore/2016-11-01/locations/client.go index a9a14613b89..57102dca10e 100644 --- a/resource-manager/datalakestore/2016-11-01/locations/client.go +++ b/resource-manager/datalakestore/2016-11-01/locations/client.go @@ -15,7 +15,7 @@ type LocationsClient struct { } func NewLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationsClient: %+v", err) } diff --git a/resource-manager/datalakestore/2016-11-01/locations/id_location.go b/resource-manager/datalakestore/2016-11-01/locations/id_location.go index ddcbf134755..bc461c18518 100644 --- a/resource-manager/datalakestore/2016-11-01/locations/id_location.go +++ b/resource-manager/datalakestore/2016-11-01/locations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/locations/method_getcapability.go b/resource-manager/datalakestore/2016-11-01/locations/method_getcapability.go index 18f618b573f..29f10255604 100644 --- a/resource-manager/datalakestore/2016-11-01/locations/method_getcapability.go +++ b/resource-manager/datalakestore/2016-11-01/locations/method_getcapability.go @@ -46,7 +46,6 @@ func (c LocationsClient) GetCapability(ctx context.Context, id LocationId) (resu var model CapabilityInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/locations/version.go b/resource-manager/datalakestore/2016-11-01/locations/version.go index d2e5153ec72..baa96f29a41 100644 --- a/resource-manager/datalakestore/2016-11-01/locations/version.go +++ b/resource-manager/datalakestore/2016-11-01/locations/version.go @@ -1,12 +1,10 @@ package locations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locations/2016-11-01" } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/README.md b/resource-manager/datalakestore/2016-11-01/trustedidproviders/README.md index 40cb42ef939..878b3639935 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/README.md +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakestore/2016-11-01/trustedidproviders` Documentation -The `trustedidproviders` SDK allows for interaction with the Azure Resource Manager Service `datalakestore` (API Version `2016-11-01`). +The `trustedidproviders` SDK allows for interaction with Azure Resource Manager `datalakestore` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/client.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/client.go index 0a1196caa8a..4bb48d2958c 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/client.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/client.go @@ -15,7 +15,7 @@ type TrustedIdProvidersClient struct { } func NewTrustedIdProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*TrustedIdProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trustedidproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trustedidproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrustedIdProvidersClient: %+v", err) } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_account.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_account.go index 776092d4f20..21a8d896d2c 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_account.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_trustedidprovider.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_trustedidprovider.go index 9120716bfab..07285b8d411 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_trustedidprovider.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/id_trustedidprovider.go @@ -44,7 +44,7 @@ func ParseTrustedIdProviderID(input string) (*TrustedIdProviderId, error) { } id := TrustedIdProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTrustedIdProviderIDInsensitively(input string) (*TrustedIdProviderId, } id := TrustedIdProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_createorupdate.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_createorupdate.go index 88ae82f8115..c265e3c1539 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_createorupdate.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TrustedIdProvidersClient) CreateOrUpdate(ctx context.Context, id Trusted var model TrustedIdProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_get.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_get.go index 2e36231528d..1807d505429 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_get.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_get.go @@ -45,7 +45,6 @@ func (c TrustedIdProvidersClient) Get(ctx context.Context, id TrustedIdProviderI var model TrustedIdProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_update.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_update.go index 4d8d4b8c7fe..ae9494160df 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_update.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/method_update.go @@ -49,7 +49,6 @@ func (c TrustedIdProvidersClient) Update(ctx context.Context, id TrustedIdProvid var model TrustedIdProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/trustedidproviders/version.go b/resource-manager/datalakestore/2016-11-01/trustedidproviders/version.go index b15a208a3d4..6e4179bcf2b 100644 --- a/resource-manager/datalakestore/2016-11-01/trustedidproviders/version.go +++ b/resource-manager/datalakestore/2016-11-01/trustedidproviders/version.go @@ -1,12 +1,10 @@ package trustedidproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trustedidproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trustedidproviders/2016-11-01" } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/README.md b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/README.md index 980f8317cf1..80b1b589f64 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/README.md +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datalakestore/2016-11-01/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `datalakestore` (API Version `2016-11-01`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `datalakestore` (API Version `2016-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/client.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/client.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_account.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_account.go index ffd99fb3e4c..faeb1e69f52 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_account.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_virtualnetworkrule.go index b2615196d2a..a013289152a 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_createorupdate.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_createorupdate.go index 78fea499602..cc5cc41e290 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_createorupdate.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, id Virtua var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_get.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_get.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_update.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_update.go index 46535d60a50..981e749045b 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_update.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/method_update.go @@ -49,7 +49,6 @@ func (c VirtualNetworkRulesClient) Update(ctx context.Context, id VirtualNetwork var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/version.go b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/version.go index 16fdb4e8985..fb27f6c1471 100644 --- a/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/version.go +++ b/resource-manager/datalakestore/2016-11-01/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2016-11-01" } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/README.md b/resource-manager/datamigration/2018-04-19/customoperation/README.md index 1e7b4874b72..0aea97383f0 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/README.md +++ b/resource-manager/datamigration/2018-04-19/customoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/customoperation` Documentation -The `customoperation` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `customoperation` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/customoperation/client.go b/resource-manager/datamigration/2018-04-19/customoperation/client.go index 0cfbc77b4d0..dd76465d0b7 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/client.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/client.go @@ -15,7 +15,7 @@ type CustomOperationClient struct { } func NewCustomOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customoperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customoperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomOperationClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/id_service.go b/resource-manager/datamigration/2018-04-19/customoperation/id_service.go index 35d98394e53..7cea4a5c239 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/id_service.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/id_task.go b/resource-manager/datamigration/2018-04-19/customoperation/id_task.go index 331a5a4b1c2..d504f038506 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/id_task.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/method_servicescheckstatus.go b/resource-manager/datamigration/2018-04-19/customoperation/method_servicescheckstatus.go index 7c7e6dfef3c..c829bc827ab 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c CustomOperationClient) ServicesCheckStatus(ctx context.Context, id Servi var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/method_servicesnestedchecknameavailability.go b/resource-manager/datamigration/2018-04-19/customoperation/method_servicesnestedchecknameavailability.go index 96d0d6ae9a0..38cede969a2 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/method_servicesnestedchecknameavailability.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/method_servicesnestedchecknameavailability.go @@ -50,7 +50,6 @@ func (c CustomOperationClient) ServicesNestedCheckNameAvailability(ctx context.C var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/method_taskscancel.go b/resource-manager/datamigration/2018-04-19/customoperation/method_taskscancel.go index eba86e06b88..679b12ac906 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/method_taskscancel.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/method_taskscancel.go @@ -46,7 +46,6 @@ func (c CustomOperationClient) TasksCancel(ctx context.Context, id TaskId) (resu var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/customoperation/version.go b/resource-manager/datamigration/2018-04-19/customoperation/version.go index 5caae6b988d..b61451d3722 100644 --- a/resource-manager/datamigration/2018-04-19/customoperation/version.go +++ b/resource-manager/datamigration/2018-04-19/customoperation/version.go @@ -1,12 +1,10 @@ package customoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customoperation/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/delete/client.go b/resource-manager/datamigration/2018-04-19/delete/client.go index f7a3ebd1edb..a151c0362da 100644 --- a/resource-manager/datamigration/2018-04-19/delete/client.go +++ b/resource-manager/datamigration/2018-04-19/delete/client.go @@ -15,7 +15,7 @@ type DELETEClient struct { } func NewDELETEClientWithBaseURI(sdkApi sdkEnv.Api) (*DELETEClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delete", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delete", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DELETEClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/delete/id_project.go b/resource-manager/datamigration/2018-04-19/delete/id_project.go index 8019e1bc212..b50bd3fd700 100644 --- a/resource-manager/datamigration/2018-04-19/delete/id_project.go +++ b/resource-manager/datamigration/2018-04-19/delete/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/delete/id_service.go b/resource-manager/datamigration/2018-04-19/delete/id_service.go index 2df1fbcaed9..dd8729c34ef 100644 --- a/resource-manager/datamigration/2018-04-19/delete/id_service.go +++ b/resource-manager/datamigration/2018-04-19/delete/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/delete/id_task.go b/resource-manager/datamigration/2018-04-19/delete/id_task.go index 5ae138100ea..cc1fb8f8d55 100644 --- a/resource-manager/datamigration/2018-04-19/delete/id_task.go +++ b/resource-manager/datamigration/2018-04-19/delete/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/delete/method_projectsdelete.go b/resource-manager/datamigration/2018-04-19/delete/method_projectsdelete.go index 2b5b9a5c69d..f78f722c581 100644 --- a/resource-manager/datamigration/2018-04-19/delete/method_projectsdelete.go +++ b/resource-manager/datamigration/2018-04-19/delete/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/delete/method_servicesdelete.go b/resource-manager/datamigration/2018-04-19/delete/method_servicesdelete.go index 62063551e37..5f98f0b59c7 100644 --- a/resource-manager/datamigration/2018-04-19/delete/method_servicesdelete.go +++ b/resource-manager/datamigration/2018-04-19/delete/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/delete/method_tasksdelete.go b/resource-manager/datamigration/2018-04-19/delete/method_tasksdelete.go index 2f41c9a791f..fd49246a727 100644 --- a/resource-manager/datamigration/2018-04-19/delete/method_tasksdelete.go +++ b/resource-manager/datamigration/2018-04-19/delete/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/delete/version.go b/resource-manager/datamigration/2018-04-19/delete/version.go index 8c495850344..928059e3500 100644 --- a/resource-manager/datamigration/2018-04-19/delete/version.go +++ b/resource-manager/datamigration/2018-04-19/delete/version.go @@ -1,12 +1,10 @@ package delete -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delete/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delete/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/get/README.md b/resource-manager/datamigration/2018-04-19/get/README.md index 60793400f1d..acb2cc76b26 100644 --- a/resource-manager/datamigration/2018-04-19/get/README.md +++ b/resource-manager/datamigration/2018-04-19/get/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/get` Documentation -The `get` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `get` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/get/client.go b/resource-manager/datamigration/2018-04-19/get/client.go index 90d3b70f6a7..ebc4d89f523 100644 --- a/resource-manager/datamigration/2018-04-19/get/client.go +++ b/resource-manager/datamigration/2018-04-19/get/client.go @@ -15,7 +15,7 @@ type GETClient struct { } func NewGETClientWithBaseURI(sdkApi sdkEnv.Api) (*GETClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "get", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "get", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GETClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/get/id_location.go b/resource-manager/datamigration/2018-04-19/get/id_location.go index eca4c4d182a..5766db5d3c1 100644 --- a/resource-manager/datamigration/2018-04-19/get/id_location.go +++ b/resource-manager/datamigration/2018-04-19/get/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/get/id_project.go b/resource-manager/datamigration/2018-04-19/get/id_project.go index 99d3134362b..03b69e4c059 100644 --- a/resource-manager/datamigration/2018-04-19/get/id_project.go +++ b/resource-manager/datamigration/2018-04-19/get/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/get/id_resourcegroup.go b/resource-manager/datamigration/2018-04-19/get/id_resourcegroup.go index ff22670ebde..f5ba726ec23 100644 --- a/resource-manager/datamigration/2018-04-19/get/id_resourcegroup.go +++ b/resource-manager/datamigration/2018-04-19/get/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/get/id_service.go b/resource-manager/datamigration/2018-04-19/get/id_service.go index 60387a8cbc7..ed3af955d08 100644 --- a/resource-manager/datamigration/2018-04-19/get/id_service.go +++ b/resource-manager/datamigration/2018-04-19/get/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/get/id_task.go b/resource-manager/datamigration/2018-04-19/get/id_task.go index 9382dd00053..e27464c6d88 100644 --- a/resource-manager/datamigration/2018-04-19/get/id_task.go +++ b/resource-manager/datamigration/2018-04-19/get/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/get/method_projectsget.go b/resource-manager/datamigration/2018-04-19/get/method_projectsget.go index 9500ba2f14c..8632137438f 100644 --- a/resource-manager/datamigration/2018-04-19/get/method_projectsget.go +++ b/resource-manager/datamigration/2018-04-19/get/method_projectsget.go @@ -45,7 +45,6 @@ func (c GETClient) ProjectsGet(ctx context.Context, id ProjectId) (result Projec var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/get/method_servicesget.go b/resource-manager/datamigration/2018-04-19/get/method_servicesget.go index a765e4f390a..4edea98b206 100644 --- a/resource-manager/datamigration/2018-04-19/get/method_servicesget.go +++ b/resource-manager/datamigration/2018-04-19/get/method_servicesget.go @@ -45,7 +45,6 @@ func (c GETClient) ServicesGet(ctx context.Context, id ServiceId) (result Servic var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/get/method_tasksget.go b/resource-manager/datamigration/2018-04-19/get/method_tasksget.go index d32d2378180..22dc283d8ad 100644 --- a/resource-manager/datamigration/2018-04-19/get/method_tasksget.go +++ b/resource-manager/datamigration/2018-04-19/get/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GETClient) TasksGet(ctx context.Context, id TaskId, options TasksGetOper var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/get/method_taskslist.go b/resource-manager/datamigration/2018-04-19/get/method_taskslist.go index eb3baf51701..e00e68d1653 100644 --- a/resource-manager/datamigration/2018-04-19/get/method_taskslist.go +++ b/resource-manager/datamigration/2018-04-19/get/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/get/version.go b/resource-manager/datamigration/2018-04-19/get/version.go index 9f09151a526..7e0a29d1dd0 100644 --- a/resource-manager/datamigration/2018-04-19/get/version.go +++ b/resource-manager/datamigration/2018-04-19/get/version.go @@ -1,12 +1,10 @@ package get -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/get/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/get/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/patch/README.md b/resource-manager/datamigration/2018-04-19/patch/README.md index da7aaf0fe3f..a734ebee5fa 100644 --- a/resource-manager/datamigration/2018-04-19/patch/README.md +++ b/resource-manager/datamigration/2018-04-19/patch/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/patch` Documentation -The `patch` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `patch` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/patch/client.go b/resource-manager/datamigration/2018-04-19/patch/client.go index 817e85d7d6f..80052bdd76d 100644 --- a/resource-manager/datamigration/2018-04-19/patch/client.go +++ b/resource-manager/datamigration/2018-04-19/patch/client.go @@ -15,7 +15,7 @@ type PATCHClient struct { } func NewPATCHClientWithBaseURI(sdkApi sdkEnv.Api) (*PATCHClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "patch", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "patch", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PATCHClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/patch/id_project.go b/resource-manager/datamigration/2018-04-19/patch/id_project.go index 55d850b546f..7197fd64597 100644 --- a/resource-manager/datamigration/2018-04-19/patch/id_project.go +++ b/resource-manager/datamigration/2018-04-19/patch/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/patch/id_service.go b/resource-manager/datamigration/2018-04-19/patch/id_service.go index 703251391fb..275398bda0c 100644 --- a/resource-manager/datamigration/2018-04-19/patch/id_service.go +++ b/resource-manager/datamigration/2018-04-19/patch/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/patch/id_task.go b/resource-manager/datamigration/2018-04-19/patch/id_task.go index 9d5e0728fc0..f415c0a3d33 100644 --- a/resource-manager/datamigration/2018-04-19/patch/id_task.go +++ b/resource-manager/datamigration/2018-04-19/patch/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/patch/method_projectsupdate.go b/resource-manager/datamigration/2018-04-19/patch/method_projectsupdate.go index 73ddb845a8f..9fb392d7502 100644 --- a/resource-manager/datamigration/2018-04-19/patch/method_projectsupdate.go +++ b/resource-manager/datamigration/2018-04-19/patch/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) ProjectsUpdate(ctx context.Context, id ProjectId, input Pro var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/patch/method_tasksupdate.go b/resource-manager/datamigration/2018-04-19/patch/method_tasksupdate.go index d8bce20b292..6701840200d 100644 --- a/resource-manager/datamigration/2018-04-19/patch/method_tasksupdate.go +++ b/resource-manager/datamigration/2018-04-19/patch/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) TasksUpdate(ctx context.Context, id TaskId, input ProjectTa var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/patch/version.go b/resource-manager/datamigration/2018-04-19/patch/version.go index ac57d3e9773..daa0980ef3f 100644 --- a/resource-manager/datamigration/2018-04-19/patch/version.go +++ b/resource-manager/datamigration/2018-04-19/patch/version.go @@ -1,12 +1,10 @@ package patch -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/patch/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/patch/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/post/README.md b/resource-manager/datamigration/2018-04-19/post/README.md index 5348adc9c4e..3c2c72d5168 100644 --- a/resource-manager/datamigration/2018-04-19/post/README.md +++ b/resource-manager/datamigration/2018-04-19/post/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/post` Documentation -The `post` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `post` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/post/client.go b/resource-manager/datamigration/2018-04-19/post/client.go index 4a1b2dc3045..5a71c067caa 100644 --- a/resource-manager/datamigration/2018-04-19/post/client.go +++ b/resource-manager/datamigration/2018-04-19/post/client.go @@ -15,7 +15,7 @@ type POSTClient struct { } func NewPOSTClientWithBaseURI(sdkApi sdkEnv.Api) (*POSTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "post", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "post", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating POSTClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/post/id_location.go b/resource-manager/datamigration/2018-04-19/post/id_location.go index 2392b251572..c76b3fc1b9e 100644 --- a/resource-manager/datamigration/2018-04-19/post/id_location.go +++ b/resource-manager/datamigration/2018-04-19/post/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/post/id_service.go b/resource-manager/datamigration/2018-04-19/post/id_service.go index a815c0b3c2c..87548982019 100644 --- a/resource-manager/datamigration/2018-04-19/post/id_service.go +++ b/resource-manager/datamigration/2018-04-19/post/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/post/id_task.go b/resource-manager/datamigration/2018-04-19/post/id_task.go index dc38923f932..98b1d37323b 100644 --- a/resource-manager/datamigration/2018-04-19/post/id_task.go +++ b/resource-manager/datamigration/2018-04-19/post/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/post/method_serviceschecknameavailability.go b/resource-manager/datamigration/2018-04-19/post/method_serviceschecknameavailability.go index 10ff41a60e7..8617015e25a 100644 --- a/resource-manager/datamigration/2018-04-19/post/method_serviceschecknameavailability.go +++ b/resource-manager/datamigration/2018-04-19/post/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c POSTClient) ServicesCheckNameAvailability(ctx context.Context, id Locati var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/post/method_servicescheckstatus.go b/resource-manager/datamigration/2018-04-19/post/method_servicescheckstatus.go index b3ebd2a097a..2b883a894f7 100644 --- a/resource-manager/datamigration/2018-04-19/post/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2018-04-19/post/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c POSTClient) ServicesCheckStatus(ctx context.Context, id ServiceId) (resu var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/post/method_servicesnestedchecknameavailability.go b/resource-manager/datamigration/2018-04-19/post/method_servicesnestedchecknameavailability.go index f6cb68079a0..519d76b9726 100644 --- a/resource-manager/datamigration/2018-04-19/post/method_servicesnestedchecknameavailability.go +++ b/resource-manager/datamigration/2018-04-19/post/method_servicesnestedchecknameavailability.go @@ -50,7 +50,6 @@ func (c POSTClient) ServicesNestedCheckNameAvailability(ctx context.Context, id var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/post/method_taskscancel.go b/resource-manager/datamigration/2018-04-19/post/method_taskscancel.go index eb278a3c176..0508294ce8e 100644 --- a/resource-manager/datamigration/2018-04-19/post/method_taskscancel.go +++ b/resource-manager/datamigration/2018-04-19/post/method_taskscancel.go @@ -46,7 +46,6 @@ func (c POSTClient) TasksCancel(ctx context.Context, id TaskId) (result TasksCan var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/post/version.go b/resource-manager/datamigration/2018-04-19/post/version.go index c7730d9b88f..258b3a8cbe4 100644 --- a/resource-manager/datamigration/2018-04-19/post/version.go +++ b/resource-manager/datamigration/2018-04-19/post/version.go @@ -1,12 +1,10 @@ package post -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/post/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/post/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/README.md b/resource-manager/datamigration/2018-04-19/projectresource/README.md index c24a8ae16cc..371102548ac 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/README.md +++ b/resource-manager/datamigration/2018-04-19/projectresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource` Documentation -The `projectresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `projectresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/projectresource/client.go b/resource-manager/datamigration/2018-04-19/projectresource/client.go index 511a84d728c..cd47b992f3f 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/client.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/client.go @@ -15,7 +15,7 @@ type ProjectResourceClient struct { } func NewProjectResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projectresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projectresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/id_project.go b/resource-manager/datamigration/2018-04-19/projectresource/id_project.go index 6b70e2427ef..15f70adce38 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/id_project.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/id_service.go b/resource-manager/datamigration/2018-04-19/projectresource/id_service.go index 46510e7b4b3..19838eefefc 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/id_service.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/method_projectscreateorupdate.go b/resource-manager/datamigration/2018-04-19/projectresource/method_projectscreateorupdate.go index f3c8fba10ab..12aedec0328 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c ProjectResourceClient) ProjectsCreateOrUpdate(ctx context.Context, id Pr var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsdelete.go b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsdelete.go index f74d7bbd8be..3de22d4ba25 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsdelete.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsget.go b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsget.go index d62130224ae..53664662bf1 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsget.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsget.go @@ -45,7 +45,6 @@ func (c ProjectResourceClient) ProjectsGet(ctx context.Context, id ProjectId) (r var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsupdate.go b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsupdate.go index 88048fe4c18..01c4a4e72f4 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/method_projectsupdate.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c ProjectResourceClient) ProjectsUpdate(ctx context.Context, id ProjectId, var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/projectresource/version.go b/resource-manager/datamigration/2018-04-19/projectresource/version.go index 79d19c463ff..a6c7bc92b04 100644 --- a/resource-manager/datamigration/2018-04-19/projectresource/version.go +++ b/resource-manager/datamigration/2018-04-19/projectresource/version.go @@ -1,12 +1,10 @@ package projectresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projectresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projectresource/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/put/README.md b/resource-manager/datamigration/2018-04-19/put/README.md index 5401c3d565b..2d8ae2c820c 100644 --- a/resource-manager/datamigration/2018-04-19/put/README.md +++ b/resource-manager/datamigration/2018-04-19/put/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/put` Documentation -The `put` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `put` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/put/client.go b/resource-manager/datamigration/2018-04-19/put/client.go index 6f8700864e0..54fb640a8e1 100644 --- a/resource-manager/datamigration/2018-04-19/put/client.go +++ b/resource-manager/datamigration/2018-04-19/put/client.go @@ -15,7 +15,7 @@ type PUTClient struct { } func NewPUTClientWithBaseURI(sdkApi sdkEnv.Api) (*PUTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "put", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "put", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PUTClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/put/id_project.go b/resource-manager/datamigration/2018-04-19/put/id_project.go index 7a900715ffa..42e3faf63ab 100644 --- a/resource-manager/datamigration/2018-04-19/put/id_project.go +++ b/resource-manager/datamigration/2018-04-19/put/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/put/id_service.go b/resource-manager/datamigration/2018-04-19/put/id_service.go index 21c6d0e427c..751da48a0c5 100644 --- a/resource-manager/datamigration/2018-04-19/put/id_service.go +++ b/resource-manager/datamigration/2018-04-19/put/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/put/id_task.go b/resource-manager/datamigration/2018-04-19/put/id_task.go index b390a510b1e..6b8657f9434 100644 --- a/resource-manager/datamigration/2018-04-19/put/id_task.go +++ b/resource-manager/datamigration/2018-04-19/put/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/put/method_projectscreateorupdate.go b/resource-manager/datamigration/2018-04-19/put/method_projectscreateorupdate.go index 58a6aa08ca1..1d765813367 100644 --- a/resource-manager/datamigration/2018-04-19/put/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/put/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) ProjectsCreateOrUpdate(ctx context.Context, id ProjectId, inp var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/put/method_taskscreateorupdate.go b/resource-manager/datamigration/2018-04-19/put/method_taskscreateorupdate.go index dba72c0fc94..a7ebdfd36e0 100644 --- a/resource-manager/datamigration/2018-04-19/put/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/put/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, input Pro var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/put/version.go b/resource-manager/datamigration/2018-04-19/put/version.go index 28e783b09b5..2d79d3c8694 100644 --- a/resource-manager/datamigration/2018-04-19/put/version.go +++ b/resource-manager/datamigration/2018-04-19/put/version.go @@ -1,12 +1,10 @@ package put -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/put/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/put/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/README.md b/resource-manager/datamigration/2018-04-19/serviceresource/README.md index 2c55a226711..6d1044bae98 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/README.md +++ b/resource-manager/datamigration/2018-04-19/serviceresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource` Documentation -The `serviceresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `serviceresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/client.go b/resource-manager/datamigration/2018-04-19/serviceresource/client.go index 3617b27a6c5..60618461d07 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/client.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/client.go @@ -15,7 +15,7 @@ type ServiceResourceClient struct { } func NewServiceResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go b/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go index a2b46bd8d9e..133cfa4a754 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go b/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go index 058aaf15dde..44a998e5f72 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go b/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go index 783fa128265..c3b1a382361 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicescheckstatus.go b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicescheckstatus.go index a12b9661f79..33f7180c4ad 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c ServiceResourceClient) ServicesCheckStatus(ctx context.Context, id Servi var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesdelete.go b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesdelete.go index 48ffb46094f..32630ee1f93 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesdelete.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesget.go b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesget.go index 9d4a60b3542..0e7a2126e5e 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesget.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ServiceResourceClient) ServicesGet(ctx context.Context, id ServiceId) (r var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/method_taskslist.go b/resource-manager/datamigration/2018-04-19/serviceresource/method_taskslist.go index b64c3edcf99..6628f689637 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/method_taskslist.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/serviceresource/version.go b/resource-manager/datamigration/2018-04-19/serviceresource/version.go index 0b34147d464..13c7d165521 100644 --- a/resource-manager/datamigration/2018-04-19/serviceresource/version.go +++ b/resource-manager/datamigration/2018-04-19/serviceresource/version.go @@ -1,12 +1,10 @@ package serviceresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceresource/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/README.md b/resource-manager/datamigration/2018-04-19/standardoperation/README.md index 9c64f636ccc..e280f8d9968 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/README.md +++ b/resource-manager/datamigration/2018-04-19/standardoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/standardoperation` Documentation -The `standardoperation` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `standardoperation` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/client.go b/resource-manager/datamigration/2018-04-19/standardoperation/client.go index b76d6c149a1..18dbdc555a7 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/client.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/client.go @@ -15,7 +15,7 @@ type StandardOperationClient struct { } func NewStandardOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*StandardOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "standardoperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "standardoperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StandardOperationClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/id_location.go b/resource-manager/datamigration/2018-04-19/standardoperation/id_location.go index 53c5249d18d..2276d453b12 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/id_location.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/id_project.go b/resource-manager/datamigration/2018-04-19/standardoperation/id_project.go index 64578321839..6c2d590a62a 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/id_project.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/id_resourcegroup.go b/resource-manager/datamigration/2018-04-19/standardoperation/id_resourcegroup.go index 59084d68563..a2ec291e4c8 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/id_resourcegroup.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/id_service.go b/resource-manager/datamigration/2018-04-19/standardoperation/id_service.go index f082ad3ce14..c38c8fdcbfc 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/id_service.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/id_task.go b/resource-manager/datamigration/2018-04-19/standardoperation/id_task.go index 776bcd8306e..4dfe70945b3 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/id_task.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectscreateorupdate.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectscreateorupdate.go index eec5ca24d2f..03b5f09e6e7 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) ProjectsCreateOrUpdate(ctx context.Context, id var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsdelete.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsdelete.go index c77b26c2fd2..f1c7ee96cfc 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsdelete.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsget.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsget.go index 5eb040520f0..360c8039781 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsget.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsget.go @@ -45,7 +45,6 @@ func (c StandardOperationClient) ProjectsGet(ctx context.Context, id ProjectId) var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsupdate.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsupdate.go index 77801e4814e..aa949a7e7b9 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsupdate.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) ProjectsUpdate(ctx context.Context, id ProjectI var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_serviceschecknameavailability.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_serviceschecknameavailability.go index 4c1c660117b..06138e3ed52 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_serviceschecknameavailability.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) ServicesCheckNameAvailability(ctx context.Conte var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesdelete.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesdelete.go index a742c1d3b2b..cde486f14d9 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesdelete.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesget.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesget.go index bac2d39f34f..7c357a21ed6 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesget.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_servicesget.go @@ -45,7 +45,6 @@ func (c StandardOperationClient) ServicesGet(ctx context.Context, id ServiceId) var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_taskscreateorupdate.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_taskscreateorupdate.go index 3f43fe15537..eb88253093d 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) TasksCreateOrUpdate(ctx context.Context, id Tas var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksdelete.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksdelete.go index b7f23256be6..a3d7a6f5597 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksdelete.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksget.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksget.go index bf24758b108..c5df301d16d 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksget.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StandardOperationClient) TasksGet(ctx context.Context, id TaskId, option var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_taskslist.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_taskslist.go index beb8daa919a..7699272a86d 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_taskslist.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksupdate.go b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksupdate.go index 90804db1b95..3d93993f5cd 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksupdate.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) TasksUpdate(ctx context.Context, id TaskId, inp var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/standardoperation/version.go b/resource-manager/datamigration/2018-04-19/standardoperation/version.go index 33f2f625f6b..bcdfa24ab37 100644 --- a/resource-manager/datamigration/2018-04-19/standardoperation/version.go +++ b/resource-manager/datamigration/2018-04-19/standardoperation/version.go @@ -1,12 +1,10 @@ package standardoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/standardoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/standardoperation/2018-04-19" } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/README.md b/resource-manager/datamigration/2018-04-19/taskresource/README.md index f2499968ac8..1f310ebc0e9 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/README.md +++ b/resource-manager/datamigration/2018-04-19/taskresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskresource` Documentation -The `taskresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). +The `taskresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2018-04-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2018-04-19/taskresource/client.go b/resource-manager/datamigration/2018-04-19/taskresource/client.go index 68d01d1275e..c5e05f923c8 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/client.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/client.go @@ -15,7 +15,7 @@ type TaskResourceClient struct { } func NewTaskResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TaskResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "taskresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "taskresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TaskResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/id_task.go b/resource-manager/datamigration/2018-04-19/taskresource/id_task.go index 3712d1b0c0a..efa5cf5e654 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/id_task.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/method_taskscancel.go b/resource-manager/datamigration/2018-04-19/taskresource/method_taskscancel.go index 6ac9c447561..3704d4b0672 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/method_taskscancel.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/method_taskscancel.go @@ -46,7 +46,6 @@ func (c TaskResourceClient) TasksCancel(ctx context.Context, id TaskId) (result var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/method_taskscreateorupdate.go b/resource-manager/datamigration/2018-04-19/taskresource/method_taskscreateorupdate.go index c5862640750..ffa9541b884 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c TaskResourceClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksdelete.go b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksdelete.go index 5c525992353..8605acbd0f9 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksdelete.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksget.go b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksget.go index bef0863df67..57ee4118924 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksget.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c TaskResourceClient) TasksGet(ctx context.Context, id TaskId, options Tas var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksupdate.go b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksupdate.go index bf96c1e55d2..5c2a5cee6b8 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/method_tasksupdate.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c TaskResourceClient) TasksUpdate(ctx context.Context, id TaskId, input Pr var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2018-04-19/taskresource/version.go b/resource-manager/datamigration/2018-04-19/taskresource/version.go index 681442da254..d948518fda0 100644 --- a/resource-manager/datamigration/2018-04-19/taskresource/version.go +++ b/resource-manager/datamigration/2018-04-19/taskresource/version.go @@ -1,12 +1,10 @@ package taskresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/taskresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/taskresource/2018-04-19" } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/README.md b/resource-manager/datamigration/2021-06-30/customoperation/README.md index 319bd4cb90d..49f738f554e 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/README.md +++ b/resource-manager/datamigration/2021-06-30/customoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/customoperation` Documentation -The `customoperation` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `customoperation` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/customoperation/client.go b/resource-manager/datamigration/2021-06-30/customoperation/client.go index 0cfbc77b4d0..dd76465d0b7 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/client.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/client.go @@ -15,7 +15,7 @@ type CustomOperationClient struct { } func NewCustomOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customoperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customoperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomOperationClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/id_service.go b/resource-manager/datamigration/2021-06-30/customoperation/id_service.go index 35d98394e53..7cea4a5c239 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/id_service.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/id_servicetask.go b/resource-manager/datamigration/2021-06-30/customoperation/id_servicetask.go index 31e30e016f6..7bbdf4b2ffa 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/id_task.go b/resource-manager/datamigration/2021-06-30/customoperation/id_task.go index 331a5a4b1c2..d504f038506 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/id_task.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckchildrennameavailability.go b/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckchildrennameavailability.go index 65d7cf27583..728683fe0a2 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckchildrennameavailability.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckchildrennameavailability.go @@ -50,7 +50,6 @@ func (c CustomOperationClient) ServicesCheckChildrenNameAvailability(ctx context var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckstatus.go b/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckstatus.go index 7c7e6dfef3c..c829bc827ab 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c CustomOperationClient) ServicesCheckStatus(ctx context.Context, id Servi var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/method_servicetaskscancel.go b/resource-manager/datamigration/2021-06-30/customoperation/method_servicetaskscancel.go index b9c5ab9e49e..37dcf7c1615 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/method_servicetaskscancel.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/method_servicetaskscancel.go @@ -46,7 +46,6 @@ func (c CustomOperationClient) ServiceTasksCancel(ctx context.Context, id Servic var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/method_taskscancel.go b/resource-manager/datamigration/2021-06-30/customoperation/method_taskscancel.go index eba86e06b88..679b12ac906 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/method_taskscancel.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/method_taskscancel.go @@ -46,7 +46,6 @@ func (c CustomOperationClient) TasksCancel(ctx context.Context, id TaskId) (resu var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/method_taskscommand.go b/resource-manager/datamigration/2021-06-30/customoperation/method_taskscommand.go index 3742b30ffa6..72226f6f47b 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/method_taskscommand.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/method_taskscommand.go @@ -50,7 +50,6 @@ func (c CustomOperationClient) TasksCommand(ctx context.Context, id TaskId, inpu var model CommandProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/customoperation/version.go b/resource-manager/datamigration/2021-06-30/customoperation/version.go index ef47b1c1c25..c4556a36d6e 100644 --- a/resource-manager/datamigration/2021-06-30/customoperation/version.go +++ b/resource-manager/datamigration/2021-06-30/customoperation/version.go @@ -1,12 +1,10 @@ package customoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customoperation/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/delete/client.go b/resource-manager/datamigration/2021-06-30/delete/client.go index f7a3ebd1edb..a151c0362da 100644 --- a/resource-manager/datamigration/2021-06-30/delete/client.go +++ b/resource-manager/datamigration/2021-06-30/delete/client.go @@ -15,7 +15,7 @@ type DELETEClient struct { } func NewDELETEClientWithBaseURI(sdkApi sdkEnv.Api) (*DELETEClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "delete", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "delete", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DELETEClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/delete/id_file.go b/resource-manager/datamigration/2021-06-30/delete/id_file.go index 5311848f79c..c57e220f537 100644 --- a/resource-manager/datamigration/2021-06-30/delete/id_file.go +++ b/resource-manager/datamigration/2021-06-30/delete/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/delete/id_project.go b/resource-manager/datamigration/2021-06-30/delete/id_project.go index 8019e1bc212..b50bd3fd700 100644 --- a/resource-manager/datamigration/2021-06-30/delete/id_project.go +++ b/resource-manager/datamigration/2021-06-30/delete/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/delete/id_service.go b/resource-manager/datamigration/2021-06-30/delete/id_service.go index 2df1fbcaed9..dd8729c34ef 100644 --- a/resource-manager/datamigration/2021-06-30/delete/id_service.go +++ b/resource-manager/datamigration/2021-06-30/delete/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/delete/id_servicetask.go b/resource-manager/datamigration/2021-06-30/delete/id_servicetask.go index 8bf80f8675b..9a583d87d5b 100644 --- a/resource-manager/datamigration/2021-06-30/delete/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/delete/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/delete/id_task.go b/resource-manager/datamigration/2021-06-30/delete/id_task.go index 5ae138100ea..cc1fb8f8d55 100644 --- a/resource-manager/datamigration/2021-06-30/delete/id_task.go +++ b/resource-manager/datamigration/2021-06-30/delete/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/delete/method_projectsdelete.go b/resource-manager/datamigration/2021-06-30/delete/method_projectsdelete.go index 2b5b9a5c69d..f78f722c581 100644 --- a/resource-manager/datamigration/2021-06-30/delete/method_projectsdelete.go +++ b/resource-manager/datamigration/2021-06-30/delete/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/delete/method_servicesdelete.go b/resource-manager/datamigration/2021-06-30/delete/method_servicesdelete.go index 62063551e37..5f98f0b59c7 100644 --- a/resource-manager/datamigration/2021-06-30/delete/method_servicesdelete.go +++ b/resource-manager/datamigration/2021-06-30/delete/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/delete/method_servicetasksdelete.go b/resource-manager/datamigration/2021-06-30/delete/method_servicetasksdelete.go index 80bde7c0f6c..9a6569fe221 100644 --- a/resource-manager/datamigration/2021-06-30/delete/method_servicetasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/delete/method_servicetasksdelete.go @@ -33,6 +33,7 @@ func (o ServiceTasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/delete/method_tasksdelete.go b/resource-manager/datamigration/2021-06-30/delete/method_tasksdelete.go index 2f41c9a791f..fd49246a727 100644 --- a/resource-manager/datamigration/2021-06-30/delete/method_tasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/delete/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/delete/version.go b/resource-manager/datamigration/2021-06-30/delete/version.go index 517ecea05cd..686083a09d3 100644 --- a/resource-manager/datamigration/2021-06-30/delete/version.go +++ b/resource-manager/datamigration/2021-06-30/delete/version.go @@ -1,12 +1,10 @@ package delete -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/delete/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/delete/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/fieresource/README.md b/resource-manager/datamigration/2021-06-30/fieresource/README.md index 3ba4386f2b9..ef8c62e8ce2 100644 --- a/resource-manager/datamigration/2021-06-30/fieresource/README.md +++ b/resource-manager/datamigration/2021-06-30/fieresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fieresource` Documentation -The `fieresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `fieresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/fieresource/client.go b/resource-manager/datamigration/2021-06-30/fieresource/client.go index f8cec9320a1..6840b7ba0cf 100644 --- a/resource-manager/datamigration/2021-06-30/fieresource/client.go +++ b/resource-manager/datamigration/2021-06-30/fieresource/client.go @@ -15,7 +15,7 @@ type FieResourceClient struct { } func NewFieResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*FieResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fieresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fieresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FieResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/fieresource/id_file.go b/resource-manager/datamigration/2021-06-30/fieresource/id_file.go index 77647975402..d58e2d162a6 100644 --- a/resource-manager/datamigration/2021-06-30/fieresource/id_file.go +++ b/resource-manager/datamigration/2021-06-30/fieresource/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/fieresource/method_filescreateorupdate.go b/resource-manager/datamigration/2021-06-30/fieresource/method_filescreateorupdate.go index 0a41653931f..35ee1e167d8 100644 --- a/resource-manager/datamigration/2021-06-30/fieresource/method_filescreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/fieresource/method_filescreateorupdate.go @@ -50,7 +50,6 @@ func (c FieResourceClient) FilesCreateOrUpdate(ctx context.Context, id FileId, i var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/fieresource/version.go b/resource-manager/datamigration/2021-06-30/fieresource/version.go index 4c428137de3..2530b4aa7ac 100644 --- a/resource-manager/datamigration/2021-06-30/fieresource/version.go +++ b/resource-manager/datamigration/2021-06-30/fieresource/version.go @@ -1,12 +1,10 @@ package fieresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fieresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fieresource/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/README.md b/resource-manager/datamigration/2021-06-30/fileresource/README.md index 7738413a179..6b5a1173ad3 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/README.md +++ b/resource-manager/datamigration/2021-06-30/fileresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fileresource` Documentation -The `fileresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `fileresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/fileresource/client.go b/resource-manager/datamigration/2021-06-30/fileresource/client.go index a21bb4477a7..a76a462c144 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/client.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/client.go @@ -15,7 +15,7 @@ type FileResourceClient struct { } func NewFileResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*FileResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/id_file.go b/resource-manager/datamigration/2021-06-30/fileresource/id_file.go index 25d3c373314..8cc722feb12 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/id_file.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/id_project.go b/resource-manager/datamigration/2021-06-30/fileresource/id_project.go index 038fe0ea598..66ad701f8ed 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/id_project.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/method_filesget.go b/resource-manager/datamigration/2021-06-30/fileresource/method_filesget.go index 8b1fbafd7a4..1b2ec80afeb 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/method_filesget.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/method_filesget.go @@ -45,7 +45,6 @@ func (c FileResourceClient) FilesGet(ctx context.Context, id FileId) (result Fil var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/method_filesread.go b/resource-manager/datamigration/2021-06-30/fileresource/method_filesread.go index 77bbd89d723..2ed298377f8 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/method_filesread.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/method_filesread.go @@ -46,7 +46,6 @@ func (c FileResourceClient) FilesRead(ctx context.Context, id FileId) (result Fi var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/method_filesreadwrite.go b/resource-manager/datamigration/2021-06-30/fileresource/method_filesreadwrite.go index fbea60dc05c..d1ec6f1c739 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/method_filesreadwrite.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/method_filesreadwrite.go @@ -46,7 +46,6 @@ func (c FileResourceClient) FilesReadWrite(ctx context.Context, id FileId) (resu var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/method_filesupdate.go b/resource-manager/datamigration/2021-06-30/fileresource/method_filesupdate.go index 112feb27283..03d5341271a 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/method_filesupdate.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/method_filesupdate.go @@ -49,7 +49,6 @@ func (c FileResourceClient) FilesUpdate(ctx context.Context, id FileId, input Pr var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/fileresource/version.go b/resource-manager/datamigration/2021-06-30/fileresource/version.go index 404db432b3f..c33c599f1ea 100644 --- a/resource-manager/datamigration/2021-06-30/fileresource/version.go +++ b/resource-manager/datamigration/2021-06-30/fileresource/version.go @@ -1,12 +1,10 @@ package fileresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileresource/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/get/README.md b/resource-manager/datamigration/2021-06-30/get/README.md index 882f2b7462a..22f30d18627 100644 --- a/resource-manager/datamigration/2021-06-30/get/README.md +++ b/resource-manager/datamigration/2021-06-30/get/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/get` Documentation -The `get` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `get` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/get/client.go b/resource-manager/datamigration/2021-06-30/get/client.go index 90d3b70f6a7..ebc4d89f523 100644 --- a/resource-manager/datamigration/2021-06-30/get/client.go +++ b/resource-manager/datamigration/2021-06-30/get/client.go @@ -15,7 +15,7 @@ type GETClient struct { } func NewGETClientWithBaseURI(sdkApi sdkEnv.Api) (*GETClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "get", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "get", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GETClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/get/id_file.go b/resource-manager/datamigration/2021-06-30/get/id_file.go index d80caa6344a..ddbaa54689d 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_file.go +++ b/resource-manager/datamigration/2021-06-30/get/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_location.go b/resource-manager/datamigration/2021-06-30/get/id_location.go index eca4c4d182a..5766db5d3c1 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_location.go +++ b/resource-manager/datamigration/2021-06-30/get/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_project.go b/resource-manager/datamigration/2021-06-30/get/id_project.go index 99d3134362b..03b69e4c059 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_project.go +++ b/resource-manager/datamigration/2021-06-30/get/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_resourcegroup.go b/resource-manager/datamigration/2021-06-30/get/id_resourcegroup.go index ff22670ebde..f5ba726ec23 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_resourcegroup.go +++ b/resource-manager/datamigration/2021-06-30/get/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_service.go b/resource-manager/datamigration/2021-06-30/get/id_service.go index 60387a8cbc7..ed3af955d08 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_service.go +++ b/resource-manager/datamigration/2021-06-30/get/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_servicetask.go b/resource-manager/datamigration/2021-06-30/get/id_servicetask.go index db87196ee02..84f3a8604f6 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/get/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/id_task.go b/resource-manager/datamigration/2021-06-30/get/id_task.go index 9382dd00053..e27464c6d88 100644 --- a/resource-manager/datamigration/2021-06-30/get/id_task.go +++ b/resource-manager/datamigration/2021-06-30/get/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/get/method_filesget.go b/resource-manager/datamigration/2021-06-30/get/method_filesget.go index 761b761f246..0cbffa3ea3d 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_filesget.go +++ b/resource-manager/datamigration/2021-06-30/get/method_filesget.go @@ -45,7 +45,6 @@ func (c GETClient) FilesGet(ctx context.Context, id FileId) (result FilesGetOper var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/get/method_projectsget.go b/resource-manager/datamigration/2021-06-30/get/method_projectsget.go index 9500ba2f14c..8632137438f 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_projectsget.go +++ b/resource-manager/datamigration/2021-06-30/get/method_projectsget.go @@ -45,7 +45,6 @@ func (c GETClient) ProjectsGet(ctx context.Context, id ProjectId) (result Projec var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/get/method_servicesget.go b/resource-manager/datamigration/2021-06-30/get/method_servicesget.go index a765e4f390a..4edea98b206 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_servicesget.go +++ b/resource-manager/datamigration/2021-06-30/get/method_servicesget.go @@ -45,7 +45,6 @@ func (c GETClient) ServicesGet(ctx context.Context, id ServiceId) (result Servic var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/get/method_servicetasksget.go b/resource-manager/datamigration/2021-06-30/get/method_servicetasksget.go index 6778d16651a..ee8fe70e6e4 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_servicetasksget.go +++ b/resource-manager/datamigration/2021-06-30/get/method_servicetasksget.go @@ -34,6 +34,7 @@ func (o ServiceTasksGetOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GETClient) ServiceTasksGet(ctx context.Context, id ServiceTaskId, option var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/get/method_servicetaskslist.go b/resource-manager/datamigration/2021-06-30/get/method_servicetaskslist.go index 2822b67f1b2..7b8dbcade99 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_servicetaskslist.go +++ b/resource-manager/datamigration/2021-06-30/get/method_servicetaskslist.go @@ -39,6 +39,7 @@ func (o ServiceTasksListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/get/method_tasksget.go b/resource-manager/datamigration/2021-06-30/get/method_tasksget.go index d32d2378180..22dc283d8ad 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_tasksget.go +++ b/resource-manager/datamigration/2021-06-30/get/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GETClient) TasksGet(ctx context.Context, id TaskId, options TasksGetOper var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/get/method_taskslist.go b/resource-manager/datamigration/2021-06-30/get/method_taskslist.go index eb3baf51701..e00e68d1653 100644 --- a/resource-manager/datamigration/2021-06-30/get/method_taskslist.go +++ b/resource-manager/datamigration/2021-06-30/get/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/get/version.go b/resource-manager/datamigration/2021-06-30/get/version.go index b04df381cde..4cb2297b88e 100644 --- a/resource-manager/datamigration/2021-06-30/get/version.go +++ b/resource-manager/datamigration/2021-06-30/get/version.go @@ -1,12 +1,10 @@ package get -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/get/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/get/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/patch/README.md b/resource-manager/datamigration/2021-06-30/patch/README.md index d199294d0fd..8c2881d7e63 100644 --- a/resource-manager/datamigration/2021-06-30/patch/README.md +++ b/resource-manager/datamigration/2021-06-30/patch/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/patch` Documentation -The `patch` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `patch` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/patch/client.go b/resource-manager/datamigration/2021-06-30/patch/client.go index 817e85d7d6f..80052bdd76d 100644 --- a/resource-manager/datamigration/2021-06-30/patch/client.go +++ b/resource-manager/datamigration/2021-06-30/patch/client.go @@ -15,7 +15,7 @@ type PATCHClient struct { } func NewPATCHClientWithBaseURI(sdkApi sdkEnv.Api) (*PATCHClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "patch", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "patch", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PATCHClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/patch/id_file.go b/resource-manager/datamigration/2021-06-30/patch/id_file.go index 711887ad3bc..1328ee6d803 100644 --- a/resource-manager/datamigration/2021-06-30/patch/id_file.go +++ b/resource-manager/datamigration/2021-06-30/patch/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/patch/id_project.go b/resource-manager/datamigration/2021-06-30/patch/id_project.go index 55d850b546f..7197fd64597 100644 --- a/resource-manager/datamigration/2021-06-30/patch/id_project.go +++ b/resource-manager/datamigration/2021-06-30/patch/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/patch/id_service.go b/resource-manager/datamigration/2021-06-30/patch/id_service.go index 703251391fb..275398bda0c 100644 --- a/resource-manager/datamigration/2021-06-30/patch/id_service.go +++ b/resource-manager/datamigration/2021-06-30/patch/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/patch/id_servicetask.go b/resource-manager/datamigration/2021-06-30/patch/id_servicetask.go index 4314a6f6c39..4131c9c6d72 100644 --- a/resource-manager/datamigration/2021-06-30/patch/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/patch/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/patch/id_task.go b/resource-manager/datamigration/2021-06-30/patch/id_task.go index 9d5e0728fc0..f415c0a3d33 100644 --- a/resource-manager/datamigration/2021-06-30/patch/id_task.go +++ b/resource-manager/datamigration/2021-06-30/patch/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/patch/method_filesupdate.go b/resource-manager/datamigration/2021-06-30/patch/method_filesupdate.go index 12d5f2ab8a1..52ee4c5b69e 100644 --- a/resource-manager/datamigration/2021-06-30/patch/method_filesupdate.go +++ b/resource-manager/datamigration/2021-06-30/patch/method_filesupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) FilesUpdate(ctx context.Context, id FileId, input ProjectFi var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/patch/method_projectsupdate.go b/resource-manager/datamigration/2021-06-30/patch/method_projectsupdate.go index 73ddb845a8f..9fb392d7502 100644 --- a/resource-manager/datamigration/2021-06-30/patch/method_projectsupdate.go +++ b/resource-manager/datamigration/2021-06-30/patch/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) ProjectsUpdate(ctx context.Context, id ProjectId, input Pro var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/patch/method_servicetasksupdate.go b/resource-manager/datamigration/2021-06-30/patch/method_servicetasksupdate.go index 2d814216fd4..ac44c7ae58e 100644 --- a/resource-manager/datamigration/2021-06-30/patch/method_servicetasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/patch/method_servicetasksupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) ServiceTasksUpdate(ctx context.Context, id ServiceTaskId, i var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/patch/method_tasksupdate.go b/resource-manager/datamigration/2021-06-30/patch/method_tasksupdate.go index d8bce20b292..6701840200d 100644 --- a/resource-manager/datamigration/2021-06-30/patch/method_tasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/patch/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c PATCHClient) TasksUpdate(ctx context.Context, id TaskId, input ProjectTa var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/patch/version.go b/resource-manager/datamigration/2021-06-30/patch/version.go index 2f0b67d83a9..9dfbe83a802 100644 --- a/resource-manager/datamigration/2021-06-30/patch/version.go +++ b/resource-manager/datamigration/2021-06-30/patch/version.go @@ -1,12 +1,10 @@ package patch -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/patch/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/patch/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/post/README.md b/resource-manager/datamigration/2021-06-30/post/README.md index 7925f24a95c..6b3988a6375 100644 --- a/resource-manager/datamigration/2021-06-30/post/README.md +++ b/resource-manager/datamigration/2021-06-30/post/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/post` Documentation -The `post` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `post` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/post/client.go b/resource-manager/datamigration/2021-06-30/post/client.go index 4a1b2dc3045..5a71c067caa 100644 --- a/resource-manager/datamigration/2021-06-30/post/client.go +++ b/resource-manager/datamigration/2021-06-30/post/client.go @@ -15,7 +15,7 @@ type POSTClient struct { } func NewPOSTClientWithBaseURI(sdkApi sdkEnv.Api) (*POSTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "post", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "post", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating POSTClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/post/id_file.go b/resource-manager/datamigration/2021-06-30/post/id_file.go index db2fecd1fa7..38f36122b43 100644 --- a/resource-manager/datamigration/2021-06-30/post/id_file.go +++ b/resource-manager/datamigration/2021-06-30/post/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/post/id_location.go b/resource-manager/datamigration/2021-06-30/post/id_location.go index 2392b251572..c76b3fc1b9e 100644 --- a/resource-manager/datamigration/2021-06-30/post/id_location.go +++ b/resource-manager/datamigration/2021-06-30/post/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/post/id_service.go b/resource-manager/datamigration/2021-06-30/post/id_service.go index a815c0b3c2c..87548982019 100644 --- a/resource-manager/datamigration/2021-06-30/post/id_service.go +++ b/resource-manager/datamigration/2021-06-30/post/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/post/id_servicetask.go b/resource-manager/datamigration/2021-06-30/post/id_servicetask.go index e19f93e7461..383a0254707 100644 --- a/resource-manager/datamigration/2021-06-30/post/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/post/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/post/id_task.go b/resource-manager/datamigration/2021-06-30/post/id_task.go index dc38923f932..98b1d37323b 100644 --- a/resource-manager/datamigration/2021-06-30/post/id_task.go +++ b/resource-manager/datamigration/2021-06-30/post/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/post/method_filesread.go b/resource-manager/datamigration/2021-06-30/post/method_filesread.go index f52ccfe0174..864032cd83f 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_filesread.go +++ b/resource-manager/datamigration/2021-06-30/post/method_filesread.go @@ -46,7 +46,6 @@ func (c POSTClient) FilesRead(ctx context.Context, id FileId) (result FilesReadO var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_filesreadwrite.go b/resource-manager/datamigration/2021-06-30/post/method_filesreadwrite.go index 7e84d3d2901..ec9ef6445bc 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_filesreadwrite.go +++ b/resource-manager/datamigration/2021-06-30/post/method_filesreadwrite.go @@ -46,7 +46,6 @@ func (c POSTClient) FilesReadWrite(ctx context.Context, id FileId) (result Files var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_servicescheckchildrennameavailability.go b/resource-manager/datamigration/2021-06-30/post/method_servicescheckchildrennameavailability.go index 61812f9c2a6..f17f5114bc1 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_servicescheckchildrennameavailability.go +++ b/resource-manager/datamigration/2021-06-30/post/method_servicescheckchildrennameavailability.go @@ -50,7 +50,6 @@ func (c POSTClient) ServicesCheckChildrenNameAvailability(ctx context.Context, i var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_serviceschecknameavailability.go b/resource-manager/datamigration/2021-06-30/post/method_serviceschecknameavailability.go index 10ff41a60e7..8617015e25a 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_serviceschecknameavailability.go +++ b/resource-manager/datamigration/2021-06-30/post/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c POSTClient) ServicesCheckNameAvailability(ctx context.Context, id Locati var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_servicescheckstatus.go b/resource-manager/datamigration/2021-06-30/post/method_servicescheckstatus.go index b3ebd2a097a..2b883a894f7 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2021-06-30/post/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c POSTClient) ServicesCheckStatus(ctx context.Context, id ServiceId) (resu var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_servicetaskscancel.go b/resource-manager/datamigration/2021-06-30/post/method_servicetaskscancel.go index e6bd386bb93..cc350ec901d 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_servicetaskscancel.go +++ b/resource-manager/datamigration/2021-06-30/post/method_servicetaskscancel.go @@ -46,7 +46,6 @@ func (c POSTClient) ServiceTasksCancel(ctx context.Context, id ServiceTaskId) (r var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_taskscancel.go b/resource-manager/datamigration/2021-06-30/post/method_taskscancel.go index eb278a3c176..0508294ce8e 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_taskscancel.go +++ b/resource-manager/datamigration/2021-06-30/post/method_taskscancel.go @@ -46,7 +46,6 @@ func (c POSTClient) TasksCancel(ctx context.Context, id TaskId) (result TasksCan var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/method_taskscommand.go b/resource-manager/datamigration/2021-06-30/post/method_taskscommand.go index 641cb3365c6..4f416f94e81 100644 --- a/resource-manager/datamigration/2021-06-30/post/method_taskscommand.go +++ b/resource-manager/datamigration/2021-06-30/post/method_taskscommand.go @@ -50,7 +50,6 @@ func (c POSTClient) TasksCommand(ctx context.Context, id TaskId, input CommandPr var model CommandProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/post/version.go b/resource-manager/datamigration/2021-06-30/post/version.go index 96b7f0fb2b8..3b49ade25d6 100644 --- a/resource-manager/datamigration/2021-06-30/post/version.go +++ b/resource-manager/datamigration/2021-06-30/post/version.go @@ -1,12 +1,10 @@ package post -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/post/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/post/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/README.md b/resource-manager/datamigration/2021-06-30/projectresource/README.md index 701fc40df0a..1bf81aaebe5 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/README.md +++ b/resource-manager/datamigration/2021-06-30/projectresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/projectresource` Documentation -The `projectresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `projectresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/projectresource/client.go b/resource-manager/datamigration/2021-06-30/projectresource/client.go index 511a84d728c..cd47b992f3f 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/client.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/client.go @@ -15,7 +15,7 @@ type ProjectResourceClient struct { } func NewProjectResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projectresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projectresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/id_project.go b/resource-manager/datamigration/2021-06-30/projectresource/id_project.go index 6b70e2427ef..15f70adce38 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/id_project.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/id_service.go b/resource-manager/datamigration/2021-06-30/projectresource/id_service.go index 46510e7b4b3..19838eefefc 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/id_service.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/method_projectscreateorupdate.go b/resource-manager/datamigration/2021-06-30/projectresource/method_projectscreateorupdate.go index f3c8fba10ab..12aedec0328 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c ProjectResourceClient) ProjectsCreateOrUpdate(ctx context.Context, id Pr var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsdelete.go b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsdelete.go index f74d7bbd8be..3de22d4ba25 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsdelete.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsget.go b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsget.go index d62130224ae..53664662bf1 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsget.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsget.go @@ -45,7 +45,6 @@ func (c ProjectResourceClient) ProjectsGet(ctx context.Context, id ProjectId) (r var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsupdate.go b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsupdate.go index 88048fe4c18..01c4a4e72f4 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/method_projectsupdate.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c ProjectResourceClient) ProjectsUpdate(ctx context.Context, id ProjectId, var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/projectresource/version.go b/resource-manager/datamigration/2021-06-30/projectresource/version.go index 97be01773f3..a3206358715 100644 --- a/resource-manager/datamigration/2021-06-30/projectresource/version.go +++ b/resource-manager/datamigration/2021-06-30/projectresource/version.go @@ -1,12 +1,10 @@ package projectresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projectresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projectresource/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/put/README.md b/resource-manager/datamigration/2021-06-30/put/README.md index 9ab78034d6d..061678d0de3 100644 --- a/resource-manager/datamigration/2021-06-30/put/README.md +++ b/resource-manager/datamigration/2021-06-30/put/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/put` Documentation -The `put` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `put` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/put/client.go b/resource-manager/datamigration/2021-06-30/put/client.go index 6f8700864e0..54fb640a8e1 100644 --- a/resource-manager/datamigration/2021-06-30/put/client.go +++ b/resource-manager/datamigration/2021-06-30/put/client.go @@ -15,7 +15,7 @@ type PUTClient struct { } func NewPUTClientWithBaseURI(sdkApi sdkEnv.Api) (*PUTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "put", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "put", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PUTClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/put/id_file.go b/resource-manager/datamigration/2021-06-30/put/id_file.go index dd7987f33dc..377ccd1cf79 100644 --- a/resource-manager/datamigration/2021-06-30/put/id_file.go +++ b/resource-manager/datamigration/2021-06-30/put/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/put/id_project.go b/resource-manager/datamigration/2021-06-30/put/id_project.go index 7a900715ffa..42e3faf63ab 100644 --- a/resource-manager/datamigration/2021-06-30/put/id_project.go +++ b/resource-manager/datamigration/2021-06-30/put/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/put/id_service.go b/resource-manager/datamigration/2021-06-30/put/id_service.go index 21c6d0e427c..751da48a0c5 100644 --- a/resource-manager/datamigration/2021-06-30/put/id_service.go +++ b/resource-manager/datamigration/2021-06-30/put/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/put/id_servicetask.go b/resource-manager/datamigration/2021-06-30/put/id_servicetask.go index 20b3ee8241a..252f68ef54f 100644 --- a/resource-manager/datamigration/2021-06-30/put/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/put/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/put/id_task.go b/resource-manager/datamigration/2021-06-30/put/id_task.go index b390a510b1e..6b8657f9434 100644 --- a/resource-manager/datamigration/2021-06-30/put/id_task.go +++ b/resource-manager/datamigration/2021-06-30/put/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/put/method_filescreateorupdate.go b/resource-manager/datamigration/2021-06-30/put/method_filescreateorupdate.go index fb5b6124dc5..4c766c41b56 100644 --- a/resource-manager/datamigration/2021-06-30/put/method_filescreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/put/method_filescreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) FilesCreateOrUpdate(ctx context.Context, id FileId, input Pro var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/put/method_projectscreateorupdate.go b/resource-manager/datamigration/2021-06-30/put/method_projectscreateorupdate.go index 58a6aa08ca1..1d765813367 100644 --- a/resource-manager/datamigration/2021-06-30/put/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/put/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) ProjectsCreateOrUpdate(ctx context.Context, id ProjectId, inp var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/put/method_servicetaskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/put/method_servicetaskscreateorupdate.go index 18a7a943c32..bf9f7bac02c 100644 --- a/resource-manager/datamigration/2021-06-30/put/method_servicetaskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/put/method_servicetaskscreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) ServiceTasksCreateOrUpdate(ctx context.Context, id ServiceTas var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/put/method_taskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/put/method_taskscreateorupdate.go index dba72c0fc94..a7ebdfd36e0 100644 --- a/resource-manager/datamigration/2021-06-30/put/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/put/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c PUTClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, input Pro var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/put/version.go b/resource-manager/datamigration/2021-06-30/put/version.go index bf246122204..ee1c08c57cf 100644 --- a/resource-manager/datamigration/2021-06-30/put/version.go +++ b/resource-manager/datamigration/2021-06-30/put/version.go @@ -1,12 +1,10 @@ package put -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/put/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/put/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/README.md b/resource-manager/datamigration/2021-06-30/serviceresource/README.md index 6695ccca301..dd04793e2d8 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/README.md +++ b/resource-manager/datamigration/2021-06-30/serviceresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/serviceresource` Documentation -The `serviceresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `serviceresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/client.go b/resource-manager/datamigration/2021-06-30/serviceresource/client.go index 3617b27a6c5..60618461d07 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/client.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/client.go @@ -15,7 +15,7 @@ type ServiceResourceClient struct { } func NewServiceResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/id_project.go b/resource-manager/datamigration/2021-06-30/serviceresource/id_project.go index a2b46bd8d9e..133cfa4a754 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/id_project.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/id_resourcegroup.go b/resource-manager/datamigration/2021-06-30/serviceresource/id_resourcegroup.go index 058aaf15dde..44a998e5f72 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/id_resourcegroup.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/id_service.go b/resource-manager/datamigration/2021-06-30/serviceresource/id_service.go index 783fa128265..c3b1a382361 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/id_service.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicescheckstatus.go b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicescheckstatus.go index a12b9661f79..33f7180c4ad 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicescheckstatus.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicescheckstatus.go @@ -46,7 +46,6 @@ func (c ServiceResourceClient) ServicesCheckStatus(ctx context.Context, id Servi var model DataMigrationServiceStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesdelete.go b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesdelete.go index 48ffb46094f..32630ee1f93 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesdelete.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesget.go b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesget.go index 9d4a60b3542..0e7a2126e5e 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesget.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ServiceResourceClient) ServicesGet(ctx context.Context, id ServiceId) (r var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicetaskslist.go b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicetaskslist.go index fed6e85c162..2909fd64be7 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/method_servicetaskslist.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/method_servicetaskslist.go @@ -39,6 +39,7 @@ func (o ServiceTasksListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/method_taskslist.go b/resource-manager/datamigration/2021-06-30/serviceresource/method_taskslist.go index b64c3edcf99..6628f689637 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/method_taskslist.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/serviceresource/version.go b/resource-manager/datamigration/2021-06-30/serviceresource/version.go index 760bade3a0b..dc7c5f7f2a2 100644 --- a/resource-manager/datamigration/2021-06-30/serviceresource/version.go +++ b/resource-manager/datamigration/2021-06-30/serviceresource/version.go @@ -1,12 +1,10 @@ package serviceresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceresource/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/README.md b/resource-manager/datamigration/2021-06-30/servicetaskresource/README.md index 8d1a24bdc2b..72f608abdcf 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/README.md +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/servicetaskresource` Documentation -The `servicetaskresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `servicetaskresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/client.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/client.go index 0a2adeae607..d47d30e2813 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/client.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/client.go @@ -15,7 +15,7 @@ type ServiceTaskResourceClient struct { } func NewServiceTaskResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTaskResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetaskresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicetaskresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceTaskResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/id_servicetask.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/id_servicetask.go index e3ff36336e3..146b6aea221 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscancel.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscancel.go index d858349ba99..571ce1ec259 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscancel.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscancel.go @@ -46,7 +46,6 @@ func (c ServiceTaskResourceClient) ServiceTasksCancel(ctx context.Context, id Se var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscreateorupdate.go index 019cc6c1aa0..139e9010af9 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetaskscreateorupdate.go @@ -50,7 +50,6 @@ func (c ServiceTaskResourceClient) ServiceTasksCreateOrUpdate(ctx context.Contex var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksdelete.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksdelete.go index 1627b07ec34..9012f747ae4 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksdelete.go @@ -33,6 +33,7 @@ func (o ServiceTasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksget.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksget.go index c120a929243..756b5616001 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksget.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksget.go @@ -34,6 +34,7 @@ func (o ServiceTasksGetOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceTaskResourceClient) ServiceTasksGet(ctx context.Context, id Servi var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksupdate.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksupdate.go index fdbeb6ecbda..88c7b7ecf8c 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/method_servicetasksupdate.go @@ -49,7 +49,6 @@ func (c ServiceTaskResourceClient) ServiceTasksUpdate(ctx context.Context, id Se var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/servicetaskresource/version.go b/resource-manager/datamigration/2021-06-30/servicetaskresource/version.go index 065ac2e0a9d..2d59112dd37 100644 --- a/resource-manager/datamigration/2021-06-30/servicetaskresource/version.go +++ b/resource-manager/datamigration/2021-06-30/servicetaskresource/version.go @@ -1,12 +1,10 @@ package servicetaskresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetaskresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicetaskresource/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/README.md b/resource-manager/datamigration/2021-06-30/standardoperation/README.md index c00ba68aa8e..5142e4f203d 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/README.md +++ b/resource-manager/datamigration/2021-06-30/standardoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/standardoperation` Documentation -The `standardoperation` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `standardoperation` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/client.go b/resource-manager/datamigration/2021-06-30/standardoperation/client.go index b76d6c149a1..18dbdc555a7 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/client.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/client.go @@ -15,7 +15,7 @@ type StandardOperationClient struct { } func NewStandardOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*StandardOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "standardoperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "standardoperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StandardOperationClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_file.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_file.go index b4f83033d28..718e806461f 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_file.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_file.go @@ -46,7 +46,7 @@ func ParseFileID(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFileIDInsensitively(input string) (*FileId, error) { } id := FileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_location.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_location.go index 53c5249d18d..2276d453b12 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_location.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_project.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_project.go index 64578321839..6c2d590a62a 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_project.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_resourcegroup.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_resourcegroup.go index 59084d68563..a2ec291e4c8 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_resourcegroup.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_resourcegroup.go @@ -40,7 +40,7 @@ func ParseResourceGroupID(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseResourceGroupIDInsensitively(input string) (*ResourceGroupId, error) { } id := ResourceGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_service.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_service.go index f082ad3ce14..c38c8fdcbfc 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_service.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_servicetask.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_servicetask.go index 04417827bc4..4f83a50c6e9 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_servicetask.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_servicetask.go @@ -44,7 +44,7 @@ func ParseServiceTaskID(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error) { } id := ServiceTaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/id_task.go b/resource-manager/datamigration/2021-06-30/standardoperation/id_task.go index 776bcd8306e..4dfe70945b3 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/id_task.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_filescreateorupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_filescreateorupdate.go index 105c17015ab..4dc618827b7 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_filescreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_filescreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) FilesCreateOrUpdate(ctx context.Context, id Fil var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesget.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesget.go index be7a2518029..2ff0250ea1e 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesget.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesget.go @@ -45,7 +45,6 @@ func (c StandardOperationClient) FilesGet(ctx context.Context, id FileId) (resul var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesread.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesread.go index 2049b41ee0e..07fe4979221 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesread.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesread.go @@ -46,7 +46,6 @@ func (c StandardOperationClient) FilesRead(ctx context.Context, id FileId) (resu var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesreadwrite.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesreadwrite.go index 7b8e8ebaea4..afe50ed2688 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesreadwrite.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesreadwrite.go @@ -46,7 +46,6 @@ func (c StandardOperationClient) FilesReadWrite(ctx context.Context, id FileId) var model FileStorageInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesupdate.go index 0198fe60198..c717a324a43 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_filesupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_filesupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) FilesUpdate(ctx context.Context, id FileId, inp var model ProjectFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectscreateorupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectscreateorupdate.go index eec5ca24d2f..03b5f09e6e7 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectscreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) ProjectsCreateOrUpdate(ctx context.Context, id var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsdelete.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsdelete.go index c77b26c2fd2..f1c7ee96cfc 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsdelete.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsdelete.go @@ -33,6 +33,7 @@ func (o ProjectsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ProjectsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsget.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsget.go index 5eb040520f0..360c8039781 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsget.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsget.go @@ -45,7 +45,6 @@ func (c StandardOperationClient) ProjectsGet(ctx context.Context, id ProjectId) var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsupdate.go index 77801e4814e..aa949a7e7b9 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_projectsupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) ProjectsUpdate(ctx context.Context, id ProjectI var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_serviceschecknameavailability.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_serviceschecknameavailability.go index 4c1c660117b..06138e3ed52 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_serviceschecknameavailability.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_serviceschecknameavailability.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) ServicesCheckNameAvailability(ctx context.Conte var model NameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesdelete.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesdelete.go index a742c1d3b2b..cde486f14d9 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesdelete.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesdelete.go @@ -36,6 +36,7 @@ func (o ServicesDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServicesDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesget.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesget.go index bac2d39f34f..7c357a21ed6 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesget.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicesget.go @@ -45,7 +45,6 @@ func (c StandardOperationClient) ServicesGet(ctx context.Context, id ServiceId) var model DataMigrationService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskscreateorupdate.go index e588ca8f023..f85b2d9507d 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskscreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) ServiceTasksCreateOrUpdate(ctx context.Context, var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksdelete.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksdelete.go index eea70ddb677..c0e8177b21a 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksdelete.go @@ -33,6 +33,7 @@ func (o ServiceTasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksget.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksget.go index b785146ac7b..7576196eab7 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksget.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksget.go @@ -34,6 +34,7 @@ func (o ServiceTasksGetOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StandardOperationClient) ServiceTasksGet(ctx context.Context, id Service var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskslist.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskslist.go index 631f37d4703..5095ff607db 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskslist.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetaskslist.go @@ -39,6 +39,7 @@ func (o ServiceTasksListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksupdate.go index 91f457f6948..788fe892ca9 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_servicetasksupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) ServiceTasksUpdate(ctx context.Context, id Serv var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_taskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_taskscreateorupdate.go index 3f43fe15537..eb88253093d 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c StandardOperationClient) TasksCreateOrUpdate(ctx context.Context, id Tas var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksdelete.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksdelete.go index b7f23256be6..a3d7a6f5597 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksget.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksget.go index bf24758b108..c5df301d16d 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksget.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StandardOperationClient) TasksGet(ctx context.Context, id TaskId, option var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_taskslist.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_taskslist.go index beb8daa919a..7699272a86d 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_taskslist.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_taskslist.go @@ -39,6 +39,7 @@ func (o TasksListOperationOptions) ToHeaders() *client.Headers { func (o TasksListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksupdate.go b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksupdate.go index 90804db1b95..3d93993f5cd 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c StandardOperationClient) TasksUpdate(ctx context.Context, id TaskId, inp var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/standardoperation/version.go b/resource-manager/datamigration/2021-06-30/standardoperation/version.go index 96acbc27bc2..15eb2096951 100644 --- a/resource-manager/datamigration/2021-06-30/standardoperation/version.go +++ b/resource-manager/datamigration/2021-06-30/standardoperation/version.go @@ -1,12 +1,10 @@ package standardoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/standardoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/standardoperation/2021-06-30" } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/README.md b/resource-manager/datamigration/2021-06-30/taskresource/README.md index 09a20053a84..6b21d26f8ac 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/README.md +++ b/resource-manager/datamigration/2021-06-30/taskresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskresource` Documentation -The `taskresource` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). +The `taskresource` SDK allows for interaction with Azure Resource Manager `datamigration` (API Version `2021-06-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datamigration/2021-06-30/taskresource/client.go b/resource-manager/datamigration/2021-06-30/taskresource/client.go index 68d01d1275e..c5e05f923c8 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/client.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/client.go @@ -15,7 +15,7 @@ type TaskResourceClient struct { } func NewTaskResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TaskResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "taskresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "taskresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TaskResourceClient: %+v", err) } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/id_task.go b/resource-manager/datamigration/2021-06-30/taskresource/id_task.go index 3712d1b0c0a..efa5cf5e654 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/id_task.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscancel.go b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscancel.go index 6ac9c447561..3704d4b0672 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscancel.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscancel.go @@ -46,7 +46,6 @@ func (c TaskResourceClient) TasksCancel(ctx context.Context, id TaskId) (result var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscommand.go b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscommand.go index b17ad1c82b4..cfc3646901a 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscommand.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscommand.go @@ -50,7 +50,6 @@ func (c TaskResourceClient) TasksCommand(ctx context.Context, id TaskId, input C var model CommandProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscreateorupdate.go b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscreateorupdate.go index c5862640750..ffa9541b884 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_taskscreateorupdate.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_taskscreateorupdate.go @@ -50,7 +50,6 @@ func (c TaskResourceClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksdelete.go b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksdelete.go index 5c525992353..8605acbd0f9 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksdelete.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksdelete.go @@ -33,6 +33,7 @@ func (o TasksDeleteOperationOptions) ToHeaders() *client.Headers { func (o TasksDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksget.go b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksget.go index bef0863df67..57ee4118924 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksget.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksget.go @@ -34,6 +34,7 @@ func (o TasksGetOperationOptions) ToHeaders() *client.Headers { func (o TasksGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c TaskResourceClient) TasksGet(ctx context.Context, id TaskId, options Tas var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksupdate.go b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksupdate.go index bf96c1e55d2..5c2a5cee6b8 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/method_tasksupdate.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/method_tasksupdate.go @@ -49,7 +49,6 @@ func (c TaskResourceClient) TasksUpdate(ctx context.Context, id TaskId, input Pr var model ProjectTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datamigration/2021-06-30/taskresource/version.go b/resource-manager/datamigration/2021-06-30/taskresource/version.go index 9660e9643fe..dc6dabcd11b 100644 --- a/resource-manager/datamigration/2021-06-30/taskresource/version.go +++ b/resource-manager/datamigration/2021-06-30/taskresource/version.go @@ -1,12 +1,10 @@ package taskresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/taskresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/taskresource/2021-06-30" } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/README.md b/resource-manager/dataprotection/2023-05-01/azurebackupjob/README.md index a9b85748397..96aecac39b4 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/README.md +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/azurebackupjob` Documentation -The `azurebackupjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `azurebackupjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/client.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/client.go index 11ba06b263b..e8e66d81c81 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/client.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/client.go @@ -15,7 +15,7 @@ type AzureBackupJobClient struct { } func NewAzureBackupJobClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupjob.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupjob.go index 1089c3fd6d4..57696bb1ffb 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupjob.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupvault.go index d0675f57728..7208d3d1aa6 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_operationid.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_operationid.go index bed20827391..b55c145002d 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_operationid.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/id_operationid.go @@ -44,7 +44,7 @@ func ParseOperationIdID(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIdIDInsensitively(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_exportjobsoperationresultget.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_exportjobsoperationresultget.go index 9f61784cc45..4df7d900a99 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_exportjobsoperationresultget.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_exportjobsoperationresultget.go @@ -46,7 +46,6 @@ func (c AzureBackupJobClient) ExportJobsOperationResultGet(ctx context.Context, var model ExportJobsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_jobsget.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_jobsget.go index d895ee2d205..ea51644c134 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_jobsget.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/method_jobsget.go @@ -45,7 +45,6 @@ func (c AzureBackupJobClient) JobsGet(ctx context.Context, id BackupJobId) (resu var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjob/version.go b/resource-manager/dataprotection/2023-05-01/azurebackupjob/version.go index 64f4e97be93..dfd9961c26e 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjob/version.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjob/version.go @@ -1,12 +1,10 @@ package azurebackupjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjob/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/README.md b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/README.md index 22bfe069387..d53443eecba 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/README.md +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/azurebackupjobs` Documentation -The `azurebackupjobs` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `azurebackupjobs` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/client.go b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/client.go index 9cb5bb85556..1028ad5240a 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/client.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/client.go @@ -15,7 +15,7 @@ type AzureBackupJobsClient struct { } func NewAzureBackupJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/id_backupvault.go index 3d797b731f7..5b928cc2675 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/version.go b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/version.go index b47aebc2803..8d3fd5261ea 100644 --- a/resource-manager/dataprotection/2023-05-01/azurebackupjobs/version.go +++ b/resource-manager/dataprotection/2023-05-01/azurebackupjobs/version.go @@ -1,12 +1,10 @@ package azurebackupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjobs/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/README.md b/resource-manager/dataprotection/2023-05-01/backupinstances/README.md index b894eea6aec..d39622cfaf1 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/README.md +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/backupinstances` Documentation -The `backupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `backupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/client.go b/resource-manager/dataprotection/2023-05-01/backupinstances/client.go index 9e37fa3fed5..d0c8a08b5f2 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/client.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/client.go @@ -15,7 +15,7 @@ type BackupInstancesClient struct { } func NewBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupinstance.go b/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupinstance.go index 9120ff5c7b9..dc9734f7a43 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupvault.go index 3e2cc254429..11f896cba11 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/method_get.go b/resource-manager/dataprotection/2023-05-01/backupinstances/method_get.go index dc268db7fc1..39aa6d46c90 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/method_get.go @@ -45,7 +45,6 @@ func (c BackupInstancesClient) Get(ctx context.Context, id BackupInstanceId) (re var model BackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_authcredentials.go index 8be823b957b..b743312fc69 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go index 5809de628f0..656e15d1842 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryPointBasedRestoreRequest struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryPointBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryPointBasedRestoreRequest{} func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryPointBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryPointBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go index 17052c6294a..f5d0231ca11 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryTimeBasedRestoreRequest struct { RecoveryPointTime string `json:"recoveryPointTime"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryTimeBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryTimeBasedRestoreRequest{} func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryTimeBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointTime = decoded.RecoveryPointTime s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryTimeBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorerequest.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorerequest.go index 3b5348e6cdf..06f550bb5e9 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorerequest.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorerequest.go @@ -10,18 +10,68 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRestoreRequest interface { + AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl } -// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRestoreRequest = BaseAzureBackupRestoreRequestImpl{} + +type BaseAzureBackupRestoreRequestImpl struct { + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` + RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s +} + +var _ AzureBackupRestoreRequest = RawAzureBackupRestoreRequestImpl{} + +// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRestoreRequestImpl struct { - Type string - Values map[string]interface{} + azureBackupRestoreRequest BaseAzureBackupRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s.azureBackupRestoreRequest } -func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { +var _ json.Unmarshaler = &BaseAzureBackupRestoreRequestImpl{} + +func (s *BaseAzureBackupRestoreRequestImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAzureBackupRestoreRequestImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) + } + + s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType + s.SourceDataStoreType = decoded.SourceDataStoreType + s.SourceResourceId = decoded.SourceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAzureBackupRestoreRequestImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["restoreTargetInfo"]; ok { + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'BaseAzureBackupRestoreRequestImpl': %+v", err) + } + s.RestoreTargetInfo = impl + } + return nil +} + +func UnmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { if input == nil { return nil, nil } @@ -60,10 +110,15 @@ func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackup return out, nil } - out := RawAzureBackupRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) } - return out, nil + + return RawAzureBackupRestoreRequestImpl{ + azureBackupRestoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go index 1e8e3e86089..ff9c2300a43 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go @@ -16,12 +16,24 @@ type AzureBackupRestoreWithRehydrationRequest struct { RehydrationRetentionDuration string `json:"rehydrationRetentionDuration"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRestoreWithRehydrationRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRestoreWithRehydrationRequest{} func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) @@ -56,6 +69,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.RehydrationPriority = decoded.RehydrationPriority s.RehydrationRetentionDuration = decoded.RehydrationRetentionDuration @@ -68,7 +82,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRestoreWithRehydrationRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azureoperationalstoreparameters.go index f7daf43fe3e..2c2c8c9086a 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupdatasourceparameters.go index 035cc0633ac..944abaf16cc 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupinstance.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupinstance.go index 73c49dd6840..96144ab3905 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_backupinstance.go @@ -50,7 +50,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_baseresourceproperties.go index fcf07932382..cc03a988b9b 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_blobbackupdatasourceparameters.go index 84f49ead22c..fc701b02154 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasource.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasource.go index a8e07a37117..b24319e48fd 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasourceset.go index 537af263c0b..63859485cb4 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datastoreparameters.go index ee57cd90fa3..f66bb93df79 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_defaultresourceproperties.go index adac6099d8b..6de216a9daa 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestorecriteria.go index 93d51faea79..329b273b71d 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestorecriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ItemLevelRestoreCriteria interface { + ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl } -// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ItemLevelRestoreCriteria = BaseItemLevelRestoreCriteriaImpl{} + +type BaseItemLevelRestoreCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s +} + +var _ ItemLevelRestoreCriteria = RawItemLevelRestoreCriteriaImpl{} + +// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawItemLevelRestoreCriteriaImpl struct { - Type string - Values map[string]interface{} + itemLevelRestoreCriteria BaseItemLevelRestoreCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s.itemLevelRestoreCriteria } -func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { +func UnmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRes return out, nil } - out := RawItemLevelRestoreCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseItemLevelRestoreCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseItemLevelRestoreCriteriaImpl: %+v", err) } - return out, nil + + return RawItemLevelRestoreCriteriaImpl{ + itemLevelRestoreCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestoretargetinfo.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestoretargetinfo.go index 475d8764212..9490dd04de7 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestoretargetinfo.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itemlevelrestoretargetinfo.go @@ -17,10 +17,20 @@ type ItemLevelRestoreTargetInfo struct { RestoreCriteria []ItemLevelRestoreCriteria `json:"restoreCriteria"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s ItemLevelRestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = ItemLevelRestoreTargetInfo{} func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemLevelRestoreTargetInfo: %+v", err) } + decoded["objectType"] = "ItemLevelRestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -56,6 +67,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -65,7 +77,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'ItemLevelRestoreTargetInfo': %+v", err) } @@ -80,7 +92,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { output := make([]ItemLevelRestoreCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalItemLevelRestoreCriteriaImplementation(val) + impl, err := UnmarshalItemLevelRestoreCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RestoreCriteria' for 'ItemLevelRestoreTargetInfo': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itempathbasedrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itempathbasedrestorecriteria.go index bd6640be142..293c8227b06 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_itempathbasedrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_itempathbasedrestorecriteria.go @@ -16,6 +16,14 @@ type ItemPathBasedRestoreCriteria struct { SubItemPathPrefix *[]string `json:"subItemPathPrefix,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s ItemPathBasedRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ItemPathBasedRestoreCriteria{} @@ -29,9 +37,10 @@ func (s ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemPathBasedRestoreCriteria: %+v", err) } + decoded["objectType"] = "ItemPathBasedRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 021230e39ac..fedc5d4bc51 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterrestorecriteria.go index 070030fbbe0..8c9284a5aa2 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesclusterrestorecriteria.go @@ -23,6 +23,14 @@ type KubernetesClusterRestoreCriteria struct { RestoreHookReferences *[]NamespacedNameResource `json:"restoreHookReferences,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterRestoreCriteria{} @@ -36,9 +44,10 @@ func (s KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetespvrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetespvrestorecriteria.go index 0f3d56cbfeb..4a0189b1de3 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetespvrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetespvrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesPVRestoreCriteria struct { StorageClassName *string `json:"storageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesPVRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesPVRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesPVRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesPVRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go index d4b08aa1e6f..a1f6748502f 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesStorageClassRestoreCriteria struct { SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesStorageClassRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesStorageClassRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesStorageClassRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesStorageClassRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationextendedinfo.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationextendedinfo.go index 53581d9a9e1..7293611199b 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationextendedinfo.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationextendedinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OperationExtendedInfo interface { + OperationExtendedInfo() BaseOperationExtendedInfoImpl } -// RawOperationExtendedInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OperationExtendedInfo = BaseOperationExtendedInfoImpl{} + +type BaseOperationExtendedInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s +} + +var _ OperationExtendedInfo = RawOperationExtendedInfoImpl{} + +// RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOperationExtendedInfoImpl struct { - Type string - Values map[string]interface{} + operationExtendedInfo BaseOperationExtendedInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s.operationExtendedInfo } -func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { +func UnmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtend return out, nil } - out := RawOperationExtendedInfoImpl{ - Type: value, - Values: temp, + var parent BaseOperationExtendedInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationExtendedInfoImpl: %+v", err) } - return out, nil + + return RawOperationExtendedInfoImpl{ + operationExtendedInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationjobextendedinfo.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationjobextendedinfo.go index 59cd3f9ddf6..c0ead370cf2 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationjobextendedinfo.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_operationjobextendedinfo.go @@ -14,6 +14,14 @@ type OperationJobExtendedInfo struct { JobId *string `json:"jobId,omitempty"` // Fields inherited from OperationExtendedInfo + + ObjectType string `json:"objectType"` +} + +func (s OperationJobExtendedInfo) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return BaseOperationExtendedInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = OperationJobExtendedInfo{} @@ -27,9 +35,10 @@ func (s OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OperationJobExtendedInfo: %+v", err) } + decoded["objectType"] = "OperationJobExtendedInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_policyparameters.go index ba00f440ca8..00ca7abb0fd 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go index c7df0c52c2b..365518530ec 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go @@ -15,6 +15,14 @@ type RangeBasedItemLevelRestoreCriteria struct { MinMatchingValue *string `json:"minMatchingValue,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s RangeBasedItemLevelRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = RangeBasedItemLevelRestoreCriteria{} @@ -28,9 +36,10 @@ func (s RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RangeBasedItemLevelRestoreCriteria: %+v", err) } + decoded["objectType"] = "RangeBasedItemLevelRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restorefilestargetinfo.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restorefilestargetinfo.go index 04fe194025c..b5cf6722012 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restorefilestargetinfo.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restorefilestargetinfo.go @@ -14,10 +14,20 @@ type RestoreFilesTargetInfo struct { TargetDetails TargetDetails `json:"targetDetails"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreFilesTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreFilesTargetInfo{} func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreFilesTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreFilesTargetInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfo.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfo.go index 23f512f2c31..b1a8ea521b8 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfo.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfo.go @@ -16,10 +16,20 @@ type RestoreTargetInfo struct { DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreTargetInfo{} func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -64,7 +76,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'RestoreTargetInfo': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfobase.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfobase.go index ce31702dc78..f4f60833a9c 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfobase.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_restoretargetinfobase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreTargetInfoBase interface { + RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl } -// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreTargetInfoBase = BaseRestoreTargetInfoBaseImpl{} + +type BaseRestoreTargetInfoBaseImpl struct { + ObjectType string `json:"objectType"` + RecoveryOption RecoveryOption `json:"recoveryOption"` + RestoreLocation *string `json:"restoreLocation,omitempty"` +} + +func (s BaseRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s +} + +var _ RestoreTargetInfoBase = RawRestoreTargetInfoBaseImpl{} + +// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreTargetInfoBaseImpl struct { - Type string - Values map[string]interface{} + restoreTargetInfoBase BaseRestoreTargetInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s.restoreTargetInfoBase } -func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { +func UnmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetIn return out, nil } - out := RawRestoreTargetInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseRestoreTargetInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreTargetInfoBaseImpl: %+v", err) } - return out, nil + + return RawRestoreTargetInfoBaseImpl{ + restoreTargetInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_secretstorebasedauthcredentials.go index 76f2af98598..859bcef3249 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/model_validaterestorerequestobject.go b/resource-manager/dataprotection/2023-05-01/backupinstances/model_validaterestorerequestobject.go index e59fe83da41..fcef764da4b 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/model_validaterestorerequestobject.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/model_validaterestorerequestobject.go @@ -22,7 +22,7 @@ func (s *ValidateRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupinstances/version.go b/resource-manager/dataprotection/2023-05-01/backupinstances/version.go index dafd8149aa5..6926ee80cca 100644 --- a/resource-manager/dataprotection/2023-05-01/backupinstances/version.go +++ b/resource-manager/dataprotection/2023-05-01/backupinstances/version.go @@ -1,12 +1,10 @@ package backupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstances/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/README.md b/resource-manager/dataprotection/2023-05-01/backuppolicies/README.md index 64ae79b864c..cc28bca9677 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/README.md +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/client.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/client.go index 7867fb217cc..a888bef7263 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/client.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/client.go @@ -15,7 +15,7 @@ type BackupPoliciesClient struct { } func NewBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPoliciesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backuppolicy.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backuppolicy.go index 567587f55bd..be6e8b11b7c 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backuppolicy.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backupvault.go index 630fbdb1a15..b844c8ed70f 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/method_createorupdate.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/method_createorupdate.go index fbea2f083fb..04342e7a5d0 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/method_createorupdate.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BackupPoliciesClient) CreateOrUpdate(ctx context.Context, id BackupPolic var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/method_get.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/method_get.go index 2275adb94b5..1dbecf80051 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/method_get.go @@ -45,7 +45,6 @@ func (c BackupPoliciesClient) Get(ctx context.Context, id BackupPolicyId) (resul var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_absolutedeleteoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_absolutedeleteoption.go index a9aaf47dcb7..fe6ce6d3432 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_absolutedeleteoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_absolutedeleteoption.go @@ -13,7 +13,16 @@ var _ DeleteOption = AbsoluteDeleteOption{} type AbsoluteDeleteOption struct { // Fields inherited from DeleteOption - Duration string `json:"duration"` + + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s AbsoluteDeleteOption) DeleteOption() BaseDeleteOptionImpl { + return BaseDeleteOptionImpl{ + Duration: s.Duration, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AbsoluteDeleteOption{} @@ -27,9 +36,10 @@ func (s AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteDeleteOption: %+v", err) } + decoded["objectType"] = "AbsoluteDeleteOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_adhocbasedtriggercontext.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_adhocbasedtriggercontext.go index 5505a40b8a6..30cb106ddf1 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_adhocbasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_adhocbasedtriggercontext.go @@ -14,6 +14,14 @@ type AdhocBasedTriggerContext struct { TaggingCriteria AdhocBasedTaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s AdhocBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AdhocBasedTriggerContext{} @@ -27,9 +35,10 @@ func (s AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdhocBasedTriggerContext: %+v", err) } + decoded["objectType"] = "AdhocBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackupparams.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackupparams.go index 024401c3d86..6b98b1df1f3 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackupparams.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackupparams.go @@ -14,6 +14,14 @@ type AzureBackupParams struct { BackupType string `json:"backupType"` // Fields inherited from BackupParameters + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupParams) BackupParameters() BaseBackupParametersImpl { + return BaseBackupParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupParams{} @@ -27,9 +35,10 @@ func (s AzureBackupParams) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupParams: %+v", err) } + decoded["objectType"] = "AzureBackupParams" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackuprule.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackuprule.go index 884536bf720..a06a9d21176 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackuprule.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azurebackuprule.go @@ -16,7 +16,16 @@ type AzureBackupRule struct { Trigger TriggerContext `json:"trigger"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureBackupRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupRule{} @@ -30,9 +39,10 @@ func (s AzureBackupRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRule: %+v", err) } + decoded["objectType"] = "AzureBackupRule" encoded, err = json.Marshal(decoded) @@ -54,6 +64,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { s.DataStore = decoded.DataStore s.Name = decoded.Name + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -61,7 +72,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupParameters"]; ok { - impl, err := unmarshalBackupParametersImplementation(v) + impl, err := UnmarshalBackupParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupParameters' for 'AzureBackupRule': %+v", err) } @@ -69,7 +80,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerContextImplementation(v) + impl, err := UnmarshalTriggerContextImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'AzureBackupRule': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azureretentionrule.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azureretentionrule.go index 1362ef8628d..f6c4c671bcc 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azureretentionrule.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_azureretentionrule.go @@ -15,7 +15,16 @@ type AzureRetentionRule struct { Lifecycles []SourceLifeCycle `json:"lifecycles"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureRetentionRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureRetentionRule{} @@ -29,9 +38,10 @@ func (s AzureRetentionRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRetentionRule: %+v", err) } + decoded["objectType"] = "AzureRetentionRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupcriteria.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupcriteria.go index ae5e3acf7f9..1d4eda9f3ce 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupcriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupCriteria interface { + BackupCriteria() BaseBackupCriteriaImpl } -// RawBackupCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupCriteria = BaseBackupCriteriaImpl{} + +type BaseBackupCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s +} + +var _ BackupCriteria = RawBackupCriteriaImpl{} + +// RawBackupCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupCriteriaImpl struct { - Type string - Values map[string]interface{} + backupCriteria BaseBackupCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s.backupCriteria } -func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { +func UnmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) return out, nil } - out := RawBackupCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseBackupCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupCriteriaImpl: %+v", err) } - return out, nil + + return RawBackupCriteriaImpl{ + backupCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupparameters.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupparameters.go index 2cd46e5bbe7..9df43d72eeb 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupparameters.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backupparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupParameters interface { + BackupParameters() BaseBackupParametersImpl } -// RawBackupParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupParameters = BaseBackupParametersImpl{} + +type BaseBackupParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s +} + +var _ BackupParameters = RawBackupParametersImpl{} + +// RawBackupParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupParametersImpl struct { - Type string - Values map[string]interface{} + backupParameters BaseBackupParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s.backupParameters } -func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { +func UnmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, er return out, nil } - out := RawBackupParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupParametersImpl: %+v", err) } - return out, nil + + return RawBackupParametersImpl{ + backupParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backuppolicy.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backuppolicy.go index 5b770c9a733..861df204488 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backuppolicy.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_backuppolicy.go @@ -14,7 +14,16 @@ type BackupPolicy struct { PolicyRules []BasePolicyRule `json:"policyRules"` // Fields inherited from BaseBackupPolicy + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BackupPolicy) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return BaseBaseBackupPolicyImpl{ + DatasourceTypes: s.DatasourceTypes, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BackupPolicy{} @@ -28,9 +37,10 @@ func (s BackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BackupPolicy: %+v", err) } + decoded["objectType"] = "BackupPolicy" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { } s.DatasourceTypes = decoded.DatasourceTypes + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { output := make([]BasePolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalBasePolicyRuleImplementation(val) + impl, err := UnmarshalBasePolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PolicyRules' for 'BackupPolicy': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicy.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicy.go index 5da7096ec0c..67380424475 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicy.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseBackupPolicy interface { + BaseBackupPolicy() BaseBaseBackupPolicyImpl } -// RawBaseBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseBackupPolicy = BaseBaseBackupPolicyImpl{} + +type BaseBaseBackupPolicyImpl struct { + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BaseBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s +} + +var _ BaseBackupPolicy = RawBaseBackupPolicyImpl{} + +// RawBaseBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseBackupPolicyImpl struct { - Type string - Values map[string]interface{} + baseBackupPolicy BaseBaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s.baseBackupPolicy } -func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { +func UnmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, er return out, nil } - out := RawBaseBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBaseBackupPolicyImpl{ + baseBackupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicyresource.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicyresource.go index dbc62cc6103..1fc0de8ac07 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicyresource.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basebackuppolicyresource.go @@ -38,7 +38,7 @@ func (s *BaseBackupPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBaseBackupPolicyImplementation(v) + impl, err := UnmarshalBaseBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BaseBackupPolicyResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basepolicyrule.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basepolicyrule.go index 2434dc31521..b1610388497 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basepolicyrule.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_basepolicyrule.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BasePolicyRule interface { + BasePolicyRule() BaseBasePolicyRuleImpl } -// RawBasePolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BasePolicyRule = BaseBasePolicyRuleImpl{} + +type BaseBasePolicyRuleImpl struct { + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s BaseBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s +} + +var _ BasePolicyRule = RawBasePolicyRuleImpl{} + +// RawBasePolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBasePolicyRuleImpl struct { - Type string - Values map[string]interface{} + basePolicyRule BaseBasePolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s.basePolicyRule } -func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { +func UnmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) return out, nil } - out := RawBasePolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseBasePolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBasePolicyRuleImpl: %+v", err) } - return out, nil + + return RawBasePolicyRuleImpl{ + basePolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyonexpiryoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyonexpiryoption.go index 38c92a43d50..de3ff29737c 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyonexpiryoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyonexpiryoption.go @@ -13,6 +13,14 @@ var _ CopyOption = CopyOnExpiryOption{} type CopyOnExpiryOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CopyOnExpiryOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CopyOnExpiryOption{} @@ -26,9 +34,10 @@ func (s CopyOnExpiryOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyOnExpiryOption: %+v", err) } + decoded["objectType"] = "CopyOnExpiryOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyoption.go index 8015dcb6bfd..9fba9c2df88 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_copyoption.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyOption interface { + CopyOption() BaseCopyOptionImpl } -// RawCopyOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyOption = BaseCopyOptionImpl{} + +type BaseCopyOptionImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s +} + +var _ CopyOption = RawCopyOptionImpl{} + +// RawCopyOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyOptionImpl struct { - Type string - Values map[string]interface{} + copyOption BaseCopyOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s.copyOption } -func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { +func UnmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { return out, nil } - out := RawCopyOptionImpl{ - Type: value, - Values: temp, + var parent BaseCopyOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyOptionImpl: %+v", err) } - return out, nil + + return RawCopyOptionImpl{ + copyOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_customcopyoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_customcopyoption.go index f450054e89a..e23a6200cb3 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_customcopyoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_customcopyoption.go @@ -14,6 +14,14 @@ type CustomCopyOption struct { Duration *string `json:"duration,omitempty"` // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CustomCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CustomCopyOption{} @@ -27,9 +35,10 @@ func (s CustomCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomCopyOption: %+v", err) } + decoded["objectType"] = "CustomCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_deleteoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_deleteoption.go index d8ac5dc7882..35a8b3c0fe0 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_deleteoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_deleteoption.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeleteOption interface { + DeleteOption() BaseDeleteOptionImpl } -// RawDeleteOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeleteOption = BaseDeleteOptionImpl{} + +type BaseDeleteOptionImpl struct { + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s BaseDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s +} + +var _ DeleteOption = RawDeleteOptionImpl{} + +// RawDeleteOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeleteOptionImpl struct { - Type string - Values map[string]interface{} + deleteOption BaseDeleteOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s.deleteOption } -func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { +func UnmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { return out, nil } - out := RawDeleteOptionImpl{ - Type: value, - Values: temp, + var parent BaseDeleteOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeleteOptionImpl: %+v", err) } - return out, nil + + return RawDeleteOptionImpl{ + deleteOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_immediatecopyoption.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_immediatecopyoption.go index a8e54686cc9..8be58faec52 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_immediatecopyoption.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_immediatecopyoption.go @@ -13,6 +13,14 @@ var _ CopyOption = ImmediateCopyOption{} type ImmediateCopyOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s ImmediateCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ImmediateCopyOption{} @@ -26,9 +34,10 @@ func (s ImmediateCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImmediateCopyOption: %+v", err) } + decoded["objectType"] = "ImmediateCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedbackupcriteria.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedbackupcriteria.go index 6e2c614f630..69188ba4962 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedbackupcriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedbackupcriteria.go @@ -19,6 +19,14 @@ type ScheduleBasedBackupCriteria struct { WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` // Fields inherited from BackupCriteria + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedBackupCriteria) BackupCriteria() BaseBackupCriteriaImpl { + return BaseBackupCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedBackupCriteria{} @@ -32,9 +40,10 @@ func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedBackupCriteria: %+v", err) } + decoded["objectType"] = "ScheduleBasedBackupCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedtriggercontext.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedtriggercontext.go index c7f96a85c13..aee5719cd5c 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_schedulebasedtriggercontext.go @@ -15,6 +15,14 @@ type ScheduleBasedTriggerContext struct { TaggingCriteria []TaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedTriggerContext{} @@ -28,9 +36,10 @@ func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedTriggerContext: %+v", err) } + decoded["objectType"] = "ScheduleBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_sourcelifecycle.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_sourcelifecycle.go index 7538681c1b2..0792fff629b 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_sourcelifecycle.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_sourcelifecycle.go @@ -32,7 +32,7 @@ func (s *SourceLifeCycle) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deleteAfter"]; ok { - impl, err := unmarshalDeleteOptionImplementation(v) + impl, err := UnmarshalDeleteOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeleteAfter' for 'SourceLifeCycle': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_taggingcriteria.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_taggingcriteria.go index 71c094c4d32..06458ef725e 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_taggingcriteria.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_taggingcriteria.go @@ -41,7 +41,7 @@ func (s *TaggingCriteria) UnmarshalJSON(bytes []byte) error { output := make([]BackupCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalBackupCriteriaImplementation(val) + impl, err := UnmarshalBackupCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Criteria' for 'TaggingCriteria': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_targetcopysetting.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_targetcopysetting.go index 2c3e72d496e..e59c6f70777 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_targetcopysetting.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_targetcopysetting.go @@ -30,7 +30,7 @@ func (s *TargetCopySetting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["copyAfter"]; ok { - impl, err := unmarshalCopyOptionImplementation(v) + impl, err := UnmarshalCopyOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CopyAfter' for 'TargetCopySetting': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_triggercontext.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_triggercontext.go index 866643b9b21..73252a42b95 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/model_triggercontext.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/model_triggercontext.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerContext interface { + TriggerContext() BaseTriggerContextImpl } -// RawTriggerContextImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerContext = BaseTriggerContextImpl{} + +type BaseTriggerContextImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s +} + +var _ TriggerContext = RawTriggerContextImpl{} + +// RawTriggerContextImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerContextImpl struct { - Type string - Values map[string]interface{} + triggerContext BaseTriggerContextImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s.triggerContext } -func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { +func UnmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) return out, nil } - out := RawTriggerContextImpl{ - Type: value, - Values: temp, + var parent BaseTriggerContextImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerContextImpl: %+v", err) } - return out, nil + + return RawTriggerContextImpl{ + triggerContext: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/backuppolicies/version.go b/resource-manager/dataprotection/2023-05-01/backuppolicies/version.go index 57a8657aa9e..4876b66fc3b 100644 --- a/resource-manager/dataprotection/2023-05-01/backuppolicies/version.go +++ b/resource-manager/dataprotection/2023-05-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/README.md b/resource-manager/dataprotection/2023-05-01/backupvaults/README.md index a77289cd1ba..eb3230efae2 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/README.md +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/client.go b/resource-manager/dataprotection/2023-05-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/client.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/backupvaults/id_backupvault.go index 037dbb924a0..8bb7503f8f1 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/id_providerlocation.go b/resource-manager/dataprotection/2023-05-01/backupvaults/id_providerlocation.go index 0a99f41369d..c133cfe7a08 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/method_checknameavailability.go b/resource-manager/dataprotection/2023-05-01/backupvaults/method_checknameavailability.go index 6e006b786d0..de967ac422d 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/method_checknameavailability.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c BackupVaultsClient) CheckNameAvailability(ctx context.Context, id Provid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/method_get.go b/resource-manager/dataprotection/2023-05-01/backupvaults/method_get.go index 5e1ed9d0258..638bcc8f8ce 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVaultResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/backupvaults/version.go b/resource-manager/dataprotection/2023-05-01/backupvaults/version.go index 4f9316699c2..6cc43059371 100644 --- a/resource-manager/dataprotection/2023-05-01/backupvaults/version.go +++ b/resource-manager/dataprotection/2023-05-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/README.md b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/README.md index baed1c02c78..ffe8e19b6bb 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/README.md +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/deletedbackupinstances` Documentation -The `deletedbackupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `deletedbackupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/client.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/client.go index e70cb344e5d..65c723446b5 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/client.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/client.go @@ -15,7 +15,7 @@ type DeletedBackupInstancesClient struct { } func NewDeletedBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedBackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedbackupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedbackupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedBackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_backupvault.go index 6dc4dce0b7f..e53a4c55121 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_deletedbackupinstance.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_deletedbackupinstance.go index f81e2080068..570f077f942 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/id_deletedbackupinstance.go @@ -44,7 +44,7 @@ func ParseDeletedBackupInstanceID(input string) (*DeletedBackupInstanceId, error } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedBackupInstanceIDInsensitively(input string) (*DeletedBackupInst } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/method_get.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/method_get.go index 8326bd4395b..d884717c36e 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/method_get.go @@ -45,7 +45,6 @@ func (c DeletedBackupInstancesClient) Get(ctx context.Context, id DeletedBackupI var model DeletedBackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_authcredentials.go index e1f6967a3f6..0df9b7da64f 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_azureoperationalstoreparameters.go index 82c85ebf9e1..34ee2168445 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_backupdatasourceparameters.go index 61a96f79393..43c826178a4 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_baseresourceproperties.go index 395fa05201d..fa056a53fdb 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go index 8dbfe3038cd..8531c83eb0f 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasource.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasource.go index ae955b4355b..8a27dd1d309 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasourceset.go index 03857806dea..094ee1abfa4 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datastoreparameters.go index 0c5750816d1..422133b08f5 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_defaultresourceproperties.go index 618a75af3b9..9ac69e0ad5f 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_deletedbackupinstance.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_deletedbackupinstance.go index a1cec159406..fdfb4ccd325 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_deletedbackupinstance.go @@ -52,7 +52,7 @@ func (s *DeletedBackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'DeletedBackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 10068d31fa5..d79157220be 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_policyparameters.go index b1f479381f0..ca65ed7ce6e 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go index 61dd7ae1963..baef7fd69ef 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/version.go b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/version.go index b39ca0ffd38..bea349c6829 100644 --- a/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/version.go +++ b/resource-manager/dataprotection/2023-05-01/deletedbackupinstances/version.go @@ -1,12 +1,10 @@ package deletedbackupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedbackupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedbackupinstances/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/README.md b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/README.md index 7903feb1113..995fb26a7c1 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/README.md +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/dppfeaturesupport` Documentation -The `dppfeaturesupport` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `dppfeaturesupport` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/client.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/client.go index 05f9070486d..01ef8c69f05 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/client.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/client.go @@ -15,7 +15,7 @@ type DppFeatureSupportClient struct { } func NewDppFeatureSupportClientWithBaseURI(sdkApi sdkEnv.Api) (*DppFeatureSupportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppfeaturesupport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppfeaturesupport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppFeatureSupportClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/id_location.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/id_location.go index 4d1ff865e11..71291884078 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/id_location.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go index 5b01a004060..eae58cdc096 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go @@ -16,7 +16,7 @@ import ( type DataProtectionCheckFeatureSupportOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *FeatureValidationResponseBase + Model FeatureValidationResponseBase } // DataProtectionCheckFeatureSupport ... @@ -53,11 +53,11 @@ func (c DppFeatureSupportClient) DataProtectionCheckFeatureSupport(ctx context.C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalFeatureValidationResponseBaseImplementation(respObj) + model, err := UnmarshalFeatureValidationResponseBaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequest.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequest.go index 245619e2f34..1c4657b517a 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequest.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequest.go @@ -15,6 +15,14 @@ type FeatureValidationRequest struct { FeatureType *FeatureType `json:"featureType,omitempty"` // Fields inherited from FeatureValidationRequestBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationRequest) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return BaseFeatureValidationRequestBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationRequest{} @@ -28,9 +36,10 @@ func (s FeatureValidationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationRequest: %+v", err) } + decoded["objectType"] = "FeatureValidationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequestbase.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequestbase.go index 80efd7fd693..8e51d6587e0 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequestbase.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationrequestbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationRequestBase interface { + FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl } -// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationRequestBase = BaseFeatureValidationRequestBaseImpl{} + +type BaseFeatureValidationRequestBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s +} + +var _ FeatureValidationRequestBase = RawFeatureValidationRequestBaseImpl{} + +// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationRequestBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationRequestBase BaseFeatureValidationRequestBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s.featureValidationRequestBase } -func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { +func UnmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureV return out, nil } - out := RawFeatureValidationRequestBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationRequestBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationRequestBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationRequestBaseImpl{ + featureValidationRequestBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponse.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponse.go index cf7a0191334..05506b82ee9 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponse.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponse.go @@ -15,6 +15,14 @@ type FeatureValidationResponse struct { Features *[]SupportedFeature `json:"features,omitempty"` // Fields inherited from FeatureValidationResponseBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationResponse) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return BaseFeatureValidationResponseBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationResponse{} @@ -28,9 +36,10 @@ func (s FeatureValidationResponse) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationResponse: %+v", err) } + decoded["objectType"] = "FeatureValidationResponse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponsebase.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponsebase.go index 77514fd0908..2856f973105 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponsebase.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/model_featurevalidationresponsebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationResponseBase interface { + FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl } -// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationResponseBase = BaseFeatureValidationResponseBaseImpl{} + +type BaseFeatureValidationResponseBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s +} + +var _ FeatureValidationResponseBase = RawFeatureValidationResponseBaseImpl{} + +// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationResponseBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationResponseBase BaseFeatureValidationResponseBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s.featureValidationResponseBase } -func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { +func UnmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (Feature return out, nil } - out := RawFeatureValidationResponseBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationResponseBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationResponseBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationResponseBaseImpl{ + featureValidationResponseBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/version.go b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/version.go index d2636c86db7..3818ade9a5f 100644 --- a/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/version.go +++ b/resource-manager/dataprotection/2023-05-01/dppfeaturesupport/version.go @@ -1,12 +1,10 @@ package dppfeaturesupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppfeaturesupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppfeaturesupport/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/README.md b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/README.md index 1701d64ee53..59af00d1af5 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/README.md +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies` Documentation -The `dppresourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `dppresourceguardproxies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/client.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/client.go index f44efd92c08..d0374e7e5bc 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/client.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/client.go @@ -15,7 +15,7 @@ type DppResourceGuardProxiesClient struct { } func NewDppResourceGuardProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DppResourceGuardProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppResourceGuardProxiesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupresourceguardproxy.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupresourceguardproxy.go index a6f07c8cb77..eed9974ebe7 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupresourceguardproxy.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupvault.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupvault.go index e495aa166e4..f9b6a081a8f 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go index a59d9ee6c52..f66d7644b9c 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go @@ -49,7 +49,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyCreateOrUpdate(ctx c var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyget.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyget.go index 33b05521f54..a2c7afa278b 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyget.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyget.go @@ -45,7 +45,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyGet(ctx context.Cont var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go index 1c0bbafa78a..1a88c4848f3 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go @@ -50,7 +50,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyUnlockDelete(ctx con var model UnlockDeleteResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/version.go b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/version.go index 53fedcc969b..9d6bb1659de 100644 --- a/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/version.go +++ b/resource-manager/dataprotection/2023-05-01/dppresourceguardproxies/version.go @@ -1,12 +1,10 @@ package dppresourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppresourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppresourceguardproxies/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/README.md b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/README.md index 7813534864d..3eddb5320c9 100644 --- a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/README.md +++ b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges` Documentation -The `findrestorabletimeranges` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `findrestorabletimeranges` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/client.go b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/client.go index bfd1fda26df..d342b80d165 100644 --- a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/client.go +++ b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/client.go @@ -15,7 +15,7 @@ type FindRestorableTimeRangesClient struct { } func NewFindRestorableTimeRangesClientWithBaseURI(sdkApi sdkEnv.Api) (*FindRestorableTimeRangesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FindRestorableTimeRangesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/id_backupinstance.go b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/id_backupinstance.go index 25f53ef1e8a..0cf75c2d2df 100644 --- a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/method_restorabletimerangesfind.go b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/method_restorabletimerangesfind.go index a0c43a05b78..fab15204651 100644 --- a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/method_restorabletimerangesfind.go +++ b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/method_restorabletimerangesfind.go @@ -50,7 +50,6 @@ func (c FindRestorableTimeRangesClient) RestorableTimeRangesFind(ctx context.Con var model AzureBackupFindRestorableTimeRangesResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/version.go b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/version.go index 95de9d33d41..23c535f21da 100644 --- a/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/version.go +++ b/resource-manager/dataprotection/2023-05-01/findrestorabletimeranges/version.go @@ -1,12 +1,10 @@ package findrestorabletimeranges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/findrestorabletimeranges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/findrestorabletimeranges/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/README.md b/resource-manager/dataprotection/2023-05-01/recoverypoint/README.md index 04200e79568..7e0230eb03e 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/README.md +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/client.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/client.go index d58f74c6c6a..3808ce1905f 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/client.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/client.go @@ -15,7 +15,7 @@ type RecoveryPointClient struct { } func NewRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/id_backupinstance.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/id_backupinstance.go index ae213017beb..3951fd7bc79 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/id_recoverypoint.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/id_recoverypoint.go index 8a6823eb8aa..0cf676d8e2e 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/id_recoverypoint.go @@ -46,7 +46,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/method_get.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/method_get.go index aef9f3c1f69..527ea0e9599 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointClient) Get(ctx context.Context, id RecoveryPointId) (resul var model AzureBackupRecoveryPointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/method_list.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/method_list.go index ace5d834658..8c3642589d9 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/method_list.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go index d58398bfa00..8cba729e518 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go @@ -23,6 +23,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -36,9 +44,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypoint.go index 384f69a0f65..8824a972a2a 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypointresource.go index 8f11d9bda9d..e7302b20ae8 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/recoverypoint/version.go b/resource-manager/dataprotection/2023-05-01/recoverypoint/version.go index 6edf954ae30..b14f3f69cf3 100644 --- a/resource-manager/dataprotection/2023-05-01/recoverypoint/version.go +++ b/resource-manager/dataprotection/2023-05-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/README.md b/resource-manager/dataprotection/2023-05-01/resourceguards/README.md index f58c7ea4b0b..b477ac1328b 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/README.md +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-05-01/resourceguards` Documentation -The `resourceguards` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-05-01`). +The `resourceguards` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/client.go b/resource-manager/dataprotection/2023-05-01/resourceguards/client.go index 2a79980112d..0f0913402ff 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/client.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/client.go @@ -15,7 +15,7 @@ type ResourceGuardsClient struct { } func NewResourceGuardsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGuardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceguards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceguards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGuardsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteprotecteditemrequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteprotecteditemrequest.go index 797704c5a13..60a37b80109 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteresourceguardproxyrequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteresourceguardproxyrequest.go index 698fd773b09..1d6e985f86a 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -44,7 +44,7 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_disablesoftdeleterequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_disablesoftdeleterequest.go index a4a28e2d325..895f4edf5ba 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_disablesoftdeleterequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_disablesoftdeleterequest.go @@ -44,7 +44,7 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_getbackupsecuritypinrequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_getbackupsecuritypinrequest.go index 9975ae3fc13..6181e271847 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -44,7 +44,7 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_resourceguard.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_resourceguard.go index db774ade737..c6c0804b636 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_resourceguard.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_resourceguard.go @@ -42,7 +42,7 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotecteditemrequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotecteditemrequest.go index b49508843a6..41ef782ccd4 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotectionpolicyrequest.go b/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotectionpolicyrequest.go index d1a6daf9f64..bdd5ac39cd4 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_get.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_get.go index e95a3d77f1b..8c3fae9b334 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_get.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_get.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) Get(ctx context.Context, id ResourceGuardId) (resu var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go index 4638718dc46..c4c17baa63e 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go index b3a996b5514..01a918c9ed2 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go index 82604a5c9ed..94bb22e07d2 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(c var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go index e618503da42..cf1270f04a5 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go index 13158cedebe..22159bc163f 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go index ed3cb61d2f0..a2389d2fd93 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_patch.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_patch.go index 1c4cf4482c6..0f38b0517b3 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_patch.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_patch.go @@ -49,7 +49,6 @@ func (c ResourceGuardsClient) Patch(ctx context.Context, id ResourceGuardId, inp var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/method_put.go b/resource-manager/dataprotection/2023-05-01/resourceguards/method_put.go index 1f0339e6424..c71ad58adca 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/method_put.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/method_put.go @@ -50,7 +50,6 @@ func (c ResourceGuardsClient) Put(ctx context.Context, id ResourceGuardId, input var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-05-01/resourceguards/version.go b/resource-manager/dataprotection/2023-05-01/resourceguards/version.go index 45497b87c08..487f7b194d3 100644 --- a/resource-manager/dataprotection/2023-05-01/resourceguards/version.go +++ b/resource-manager/dataprotection/2023-05-01/resourceguards/version.go @@ -1,12 +1,10 @@ package resourceguards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguards/2023-05-01" } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/README.md b/resource-manager/dataprotection/2023-11-01/azurebackupjob/README.md index e60beed1df8..9654eccd31a 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/README.md +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/azurebackupjob` Documentation -The `azurebackupjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `azurebackupjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/client.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/client.go index 11ba06b263b..e8e66d81c81 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/client.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/client.go @@ -15,7 +15,7 @@ type AzureBackupJobClient struct { } func NewAzureBackupJobClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupjob.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupjob.go index 1089c3fd6d4..57696bb1ffb 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupjob.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupvault.go index d0675f57728..7208d3d1aa6 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_operationid.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_operationid.go index bed20827391..b55c145002d 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_operationid.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/id_operationid.go @@ -44,7 +44,7 @@ func ParseOperationIdID(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIdIDInsensitively(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_exportjobsoperationresultget.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_exportjobsoperationresultget.go index 9f61784cc45..4df7d900a99 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_exportjobsoperationresultget.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_exportjobsoperationresultget.go @@ -46,7 +46,6 @@ func (c AzureBackupJobClient) ExportJobsOperationResultGet(ctx context.Context, var model ExportJobsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_jobsget.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_jobsget.go index d895ee2d205..ea51644c134 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_jobsget.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/method_jobsget.go @@ -45,7 +45,6 @@ func (c AzureBackupJobClient) JobsGet(ctx context.Context, id BackupJobId) (resu var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjob/version.go b/resource-manager/dataprotection/2023-11-01/azurebackupjob/version.go index 3620cb9fbb7..f7bb03604be 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjob/version.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjob/version.go @@ -1,12 +1,10 @@ package azurebackupjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjob/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/README.md b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/README.md index c15e1cac90f..308877175aa 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/README.md +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/azurebackupjobs` Documentation -The `azurebackupjobs` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `azurebackupjobs` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/client.go b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/client.go index 9cb5bb85556..1028ad5240a 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/client.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/client.go @@ -15,7 +15,7 @@ type AzureBackupJobsClient struct { } func NewAzureBackupJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/id_backupvault.go index 3d797b731f7..5b928cc2675 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/version.go b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/version.go index 3886d5b56ed..34f91a23c13 100644 --- a/resource-manager/dataprotection/2023-11-01/azurebackupjobs/version.go +++ b/resource-manager/dataprotection/2023-11-01/azurebackupjobs/version.go @@ -1,12 +1,10 @@ package azurebackupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjobs/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/README.md b/resource-manager/dataprotection/2023-11-01/backupinstances/README.md index 975e77e520b..e60a3b6a950 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/README.md +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/backupinstances` Documentation -The `backupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `backupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/client.go b/resource-manager/dataprotection/2023-11-01/backupinstances/client.go index 9e37fa3fed5..d0c8a08b5f2 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/client.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/client.go @@ -15,7 +15,7 @@ type BackupInstancesClient struct { } func NewBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupinstance.go b/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupinstance.go index 9120ff5c7b9..dc9734f7a43 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupvault.go index 3e2cc254429..11f896cba11 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/id_providerlocation.go b/resource-manager/dataprotection/2023-11-01/backupinstances/id_providerlocation.go index 41446698550..b0d1d2724df 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/method_get.go b/resource-manager/dataprotection/2023-11-01/backupinstances/method_get.go index dc268db7fc1..39aa6d46c90 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/method_get.go @@ -45,7 +45,6 @@ func (c BackupInstancesClient) Get(ctx context.Context, id BackupInstanceId) (re var model BackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_authcredentials.go index 8be823b957b..b743312fc69 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go index 5809de628f0..656e15d1842 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryPointBasedRestoreRequest struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryPointBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryPointBasedRestoreRequest{} func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryPointBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryPointBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go index 17052c6294a..f5d0231ca11 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryTimeBasedRestoreRequest struct { RecoveryPointTime string `json:"recoveryPointTime"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryTimeBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryTimeBasedRestoreRequest{} func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryTimeBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointTime = decoded.RecoveryPointTime s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryTimeBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorerequest.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorerequest.go index 3b5348e6cdf..06f550bb5e9 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorerequest.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorerequest.go @@ -10,18 +10,68 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRestoreRequest interface { + AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl } -// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRestoreRequest = BaseAzureBackupRestoreRequestImpl{} + +type BaseAzureBackupRestoreRequestImpl struct { + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` + RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s +} + +var _ AzureBackupRestoreRequest = RawAzureBackupRestoreRequestImpl{} + +// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRestoreRequestImpl struct { - Type string - Values map[string]interface{} + azureBackupRestoreRequest BaseAzureBackupRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s.azureBackupRestoreRequest } -func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { +var _ json.Unmarshaler = &BaseAzureBackupRestoreRequestImpl{} + +func (s *BaseAzureBackupRestoreRequestImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAzureBackupRestoreRequestImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) + } + + s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType + s.SourceDataStoreType = decoded.SourceDataStoreType + s.SourceResourceId = decoded.SourceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAzureBackupRestoreRequestImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["restoreTargetInfo"]; ok { + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'BaseAzureBackupRestoreRequestImpl': %+v", err) + } + s.RestoreTargetInfo = impl + } + return nil +} + +func UnmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { if input == nil { return nil, nil } @@ -60,10 +110,15 @@ func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackup return out, nil } - out := RawAzureBackupRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) } - return out, nil + + return RawAzureBackupRestoreRequestImpl{ + azureBackupRestoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go index 1e8e3e86089..ff9c2300a43 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go @@ -16,12 +16,24 @@ type AzureBackupRestoreWithRehydrationRequest struct { RehydrationRetentionDuration string `json:"rehydrationRetentionDuration"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRestoreWithRehydrationRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRestoreWithRehydrationRequest{} func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) @@ -56,6 +69,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.RehydrationPriority = decoded.RehydrationPriority s.RehydrationRetentionDuration = decoded.RehydrationRetentionDuration @@ -68,7 +82,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRestoreWithRehydrationRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azureoperationalstoreparameters.go index f7daf43fe3e..2c2c8c9086a 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupdatasourceparameters.go index 035cc0633ac..944abaf16cc 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupinstance.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupinstance.go index 73c49dd6840..96144ab3905 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_backupinstance.go @@ -50,7 +50,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_baseresourceproperties.go index fcf07932382..cc03a988b9b 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_blobbackupdatasourceparameters.go index 84f49ead22c..fc701b02154 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_crossregionrestorerequestobject.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_crossregionrestorerequestobject.go index d958127a0de..f86657b433b 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_crossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_crossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *CrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'CrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasource.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasource.go index a8e07a37117..b24319e48fd 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasourceset.go index 537af263c0b..63859485cb4 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datastoreparameters.go index ee57cd90fa3..f66bb93df79 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_defaultresourceproperties.go index adac6099d8b..6de216a9daa 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestorecriteria.go index 5c1b5326ced..47f3587ef24 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestorecriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ItemLevelRestoreCriteria interface { + ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl } -// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ItemLevelRestoreCriteria = BaseItemLevelRestoreCriteriaImpl{} + +type BaseItemLevelRestoreCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s +} + +var _ ItemLevelRestoreCriteria = RawItemLevelRestoreCriteriaImpl{} + +// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawItemLevelRestoreCriteriaImpl struct { - Type string - Values map[string]interface{} + itemLevelRestoreCriteria BaseItemLevelRestoreCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s.itemLevelRestoreCriteria } -func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { +func UnmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRes return out, nil } - out := RawItemLevelRestoreCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseItemLevelRestoreCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseItemLevelRestoreCriteriaImpl: %+v", err) } - return out, nil + + return RawItemLevelRestoreCriteriaImpl{ + itemLevelRestoreCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestoretargetinfo.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestoretargetinfo.go index 475d8764212..9490dd04de7 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestoretargetinfo.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itemlevelrestoretargetinfo.go @@ -17,10 +17,20 @@ type ItemLevelRestoreTargetInfo struct { RestoreCriteria []ItemLevelRestoreCriteria `json:"restoreCriteria"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s ItemLevelRestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = ItemLevelRestoreTargetInfo{} func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemLevelRestoreTargetInfo: %+v", err) } + decoded["objectType"] = "ItemLevelRestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -56,6 +67,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -65,7 +77,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'ItemLevelRestoreTargetInfo': %+v", err) } @@ -80,7 +92,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { output := make([]ItemLevelRestoreCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalItemLevelRestoreCriteriaImplementation(val) + impl, err := UnmarshalItemLevelRestoreCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RestoreCriteria' for 'ItemLevelRestoreTargetInfo': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itempathbasedrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itempathbasedrestorecriteria.go index bd6640be142..293c8227b06 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_itempathbasedrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_itempathbasedrestorecriteria.go @@ -16,6 +16,14 @@ type ItemPathBasedRestoreCriteria struct { SubItemPathPrefix *[]string `json:"subItemPathPrefix,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s ItemPathBasedRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ItemPathBasedRestoreCriteria{} @@ -29,9 +37,10 @@ func (s ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemPathBasedRestoreCriteria: %+v", err) } + decoded["objectType"] = "ItemPathBasedRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 021230e39ac..fedc5d4bc51 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterrestorecriteria.go index 070030fbbe0..8c9284a5aa2 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclusterrestorecriteria.go @@ -23,6 +23,14 @@ type KubernetesClusterRestoreCriteria struct { RestoreHookReferences *[]NamespacedNameResource `json:"restoreHookReferences,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterRestoreCriteria{} @@ -36,9 +44,10 @@ func (s KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go index 5cd1ff7c95c..ec34f92d8f2 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go @@ -25,6 +25,14 @@ type KubernetesClusterVaultTierRestoreCriteria struct { StagingStorageAccountId *string `json:"stagingStorageAccountId,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterVaultTierRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterVaultTierRestoreCriteria{} @@ -38,9 +46,10 @@ func (s KubernetesClusterVaultTierRestoreCriteria) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterVaultTierRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterVaultTierRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetespvrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetespvrestorecriteria.go index 0f3d56cbfeb..4a0189b1de3 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetespvrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetespvrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesPVRestoreCriteria struct { StorageClassName *string `json:"storageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesPVRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesPVRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesPVRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesPVRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go index d4b08aa1e6f..a1f6748502f 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesStorageClassRestoreCriteria struct { SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesStorageClassRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesStorageClassRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesStorageClassRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesStorageClassRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationextendedinfo.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationextendedinfo.go index 53581d9a9e1..7293611199b 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationextendedinfo.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationextendedinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OperationExtendedInfo interface { + OperationExtendedInfo() BaseOperationExtendedInfoImpl } -// RawOperationExtendedInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OperationExtendedInfo = BaseOperationExtendedInfoImpl{} + +type BaseOperationExtendedInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s +} + +var _ OperationExtendedInfo = RawOperationExtendedInfoImpl{} + +// RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOperationExtendedInfoImpl struct { - Type string - Values map[string]interface{} + operationExtendedInfo BaseOperationExtendedInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s.operationExtendedInfo } -func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { +func UnmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtend return out, nil } - out := RawOperationExtendedInfoImpl{ - Type: value, - Values: temp, + var parent BaseOperationExtendedInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationExtendedInfoImpl: %+v", err) } - return out, nil + + return RawOperationExtendedInfoImpl{ + operationExtendedInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationjobextendedinfo.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationjobextendedinfo.go index 59cd3f9ddf6..c0ead370cf2 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationjobextendedinfo.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_operationjobextendedinfo.go @@ -14,6 +14,14 @@ type OperationJobExtendedInfo struct { JobId *string `json:"jobId,omitempty"` // Fields inherited from OperationExtendedInfo + + ObjectType string `json:"objectType"` +} + +func (s OperationJobExtendedInfo) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return BaseOperationExtendedInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = OperationJobExtendedInfo{} @@ -27,9 +35,10 @@ func (s OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OperationJobExtendedInfo: %+v", err) } + decoded["objectType"] = "OperationJobExtendedInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_policyparameters.go index ba00f440ca8..00ca7abb0fd 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go index c7df0c52c2b..365518530ec 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go @@ -15,6 +15,14 @@ type RangeBasedItemLevelRestoreCriteria struct { MinMatchingValue *string `json:"minMatchingValue,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s RangeBasedItemLevelRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = RangeBasedItemLevelRestoreCriteria{} @@ -28,9 +36,10 @@ func (s RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RangeBasedItemLevelRestoreCriteria: %+v", err) } + decoded["objectType"] = "RangeBasedItemLevelRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restorefilestargetinfo.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restorefilestargetinfo.go index 04fe194025c..b5cf6722012 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restorefilestargetinfo.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restorefilestargetinfo.go @@ -14,10 +14,20 @@ type RestoreFilesTargetInfo struct { TargetDetails TargetDetails `json:"targetDetails"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreFilesTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreFilesTargetInfo{} func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreFilesTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreFilesTargetInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfo.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfo.go index 23f512f2c31..b1a8ea521b8 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfo.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfo.go @@ -16,10 +16,20 @@ type RestoreTargetInfo struct { DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreTargetInfo{} func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -64,7 +76,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'RestoreTargetInfo': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfobase.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfobase.go index ce31702dc78..f4f60833a9c 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfobase.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_restoretargetinfobase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreTargetInfoBase interface { + RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl } -// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreTargetInfoBase = BaseRestoreTargetInfoBaseImpl{} + +type BaseRestoreTargetInfoBaseImpl struct { + ObjectType string `json:"objectType"` + RecoveryOption RecoveryOption `json:"recoveryOption"` + RestoreLocation *string `json:"restoreLocation,omitempty"` +} + +func (s BaseRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s +} + +var _ RestoreTargetInfoBase = RawRestoreTargetInfoBaseImpl{} + +// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreTargetInfoBaseImpl struct { - Type string - Values map[string]interface{} + restoreTargetInfoBase BaseRestoreTargetInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s.restoreTargetInfoBase } -func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { +func UnmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetIn return out, nil } - out := RawRestoreTargetInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseRestoreTargetInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreTargetInfoBaseImpl: %+v", err) } - return out, nil + + return RawRestoreTargetInfoBaseImpl{ + restoreTargetInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_secretstorebasedauthcredentials.go index 76f2af98598..859bcef3249 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_validatecrossregionrestorerequestobject.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_validatecrossregionrestorerequestobject.go index 64c70ca0be3..06b9dc2dda9 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_validatecrossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_validatecrossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *ValidateCrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) er } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateCrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/model_validaterestorerequestobject.go b/resource-manager/dataprotection/2023-11-01/backupinstances/model_validaterestorerequestobject.go index e59fe83da41..fcef764da4b 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/model_validaterestorerequestobject.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/model_validaterestorerequestobject.go @@ -22,7 +22,7 @@ func (s *ValidateRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupinstances/version.go b/resource-manager/dataprotection/2023-11-01/backupinstances/version.go index 0f1143df6f2..b531ccb0303 100644 --- a/resource-manager/dataprotection/2023-11-01/backupinstances/version.go +++ b/resource-manager/dataprotection/2023-11-01/backupinstances/version.go @@ -1,12 +1,10 @@ package backupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstances/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/README.md b/resource-manager/dataprotection/2023-11-01/backuppolicies/README.md index 960b346abad..69a0066aa0b 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/README.md +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/client.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/client.go index 7867fb217cc..a888bef7263 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/client.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/client.go @@ -15,7 +15,7 @@ type BackupPoliciesClient struct { } func NewBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPoliciesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backuppolicy.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backuppolicy.go index 567587f55bd..be6e8b11b7c 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backuppolicy.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backupvault.go index 630fbdb1a15..b844c8ed70f 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/method_createorupdate.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/method_createorupdate.go index fbea2f083fb..04342e7a5d0 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/method_createorupdate.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BackupPoliciesClient) CreateOrUpdate(ctx context.Context, id BackupPolic var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/method_get.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/method_get.go index 2275adb94b5..1dbecf80051 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/method_get.go @@ -45,7 +45,6 @@ func (c BackupPoliciesClient) Get(ctx context.Context, id BackupPolicyId) (resul var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_absolutedeleteoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_absolutedeleteoption.go index a9aaf47dcb7..fe6ce6d3432 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_absolutedeleteoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_absolutedeleteoption.go @@ -13,7 +13,16 @@ var _ DeleteOption = AbsoluteDeleteOption{} type AbsoluteDeleteOption struct { // Fields inherited from DeleteOption - Duration string `json:"duration"` + + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s AbsoluteDeleteOption) DeleteOption() BaseDeleteOptionImpl { + return BaseDeleteOptionImpl{ + Duration: s.Duration, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AbsoluteDeleteOption{} @@ -27,9 +36,10 @@ func (s AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteDeleteOption: %+v", err) } + decoded["objectType"] = "AbsoluteDeleteOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_adhocbasedtriggercontext.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_adhocbasedtriggercontext.go index 5505a40b8a6..30cb106ddf1 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_adhocbasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_adhocbasedtriggercontext.go @@ -14,6 +14,14 @@ type AdhocBasedTriggerContext struct { TaggingCriteria AdhocBasedTaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s AdhocBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AdhocBasedTriggerContext{} @@ -27,9 +35,10 @@ func (s AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdhocBasedTriggerContext: %+v", err) } + decoded["objectType"] = "AdhocBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackupparams.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackupparams.go index 024401c3d86..6b98b1df1f3 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackupparams.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackupparams.go @@ -14,6 +14,14 @@ type AzureBackupParams struct { BackupType string `json:"backupType"` // Fields inherited from BackupParameters + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupParams) BackupParameters() BaseBackupParametersImpl { + return BaseBackupParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupParams{} @@ -27,9 +35,10 @@ func (s AzureBackupParams) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupParams: %+v", err) } + decoded["objectType"] = "AzureBackupParams" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackuprule.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackuprule.go index 884536bf720..a06a9d21176 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackuprule.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azurebackuprule.go @@ -16,7 +16,16 @@ type AzureBackupRule struct { Trigger TriggerContext `json:"trigger"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureBackupRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupRule{} @@ -30,9 +39,10 @@ func (s AzureBackupRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRule: %+v", err) } + decoded["objectType"] = "AzureBackupRule" encoded, err = json.Marshal(decoded) @@ -54,6 +64,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { s.DataStore = decoded.DataStore s.Name = decoded.Name + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -61,7 +72,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupParameters"]; ok { - impl, err := unmarshalBackupParametersImplementation(v) + impl, err := UnmarshalBackupParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupParameters' for 'AzureBackupRule': %+v", err) } @@ -69,7 +80,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerContextImplementation(v) + impl, err := UnmarshalTriggerContextImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'AzureBackupRule': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azureretentionrule.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azureretentionrule.go index 1362ef8628d..f6c4c671bcc 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azureretentionrule.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_azureretentionrule.go @@ -15,7 +15,16 @@ type AzureRetentionRule struct { Lifecycles []SourceLifeCycle `json:"lifecycles"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureRetentionRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureRetentionRule{} @@ -29,9 +38,10 @@ func (s AzureRetentionRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRetentionRule: %+v", err) } + decoded["objectType"] = "AzureRetentionRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupcriteria.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupcriteria.go index ae5e3acf7f9..1d4eda9f3ce 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupcriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupCriteria interface { + BackupCriteria() BaseBackupCriteriaImpl } -// RawBackupCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupCriteria = BaseBackupCriteriaImpl{} + +type BaseBackupCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s +} + +var _ BackupCriteria = RawBackupCriteriaImpl{} + +// RawBackupCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupCriteriaImpl struct { - Type string - Values map[string]interface{} + backupCriteria BaseBackupCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s.backupCriteria } -func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { +func UnmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) return out, nil } - out := RawBackupCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseBackupCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupCriteriaImpl: %+v", err) } - return out, nil + + return RawBackupCriteriaImpl{ + backupCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupparameters.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupparameters.go index 2cd46e5bbe7..9df43d72eeb 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupparameters.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backupparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupParameters interface { + BackupParameters() BaseBackupParametersImpl } -// RawBackupParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupParameters = BaseBackupParametersImpl{} + +type BaseBackupParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s +} + +var _ BackupParameters = RawBackupParametersImpl{} + +// RawBackupParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupParametersImpl struct { - Type string - Values map[string]interface{} + backupParameters BaseBackupParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s.backupParameters } -func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { +func UnmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, er return out, nil } - out := RawBackupParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupParametersImpl: %+v", err) } - return out, nil + + return RawBackupParametersImpl{ + backupParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backuppolicy.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backuppolicy.go index 5b770c9a733..861df204488 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backuppolicy.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_backuppolicy.go @@ -14,7 +14,16 @@ type BackupPolicy struct { PolicyRules []BasePolicyRule `json:"policyRules"` // Fields inherited from BaseBackupPolicy + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BackupPolicy) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return BaseBaseBackupPolicyImpl{ + DatasourceTypes: s.DatasourceTypes, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BackupPolicy{} @@ -28,9 +37,10 @@ func (s BackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BackupPolicy: %+v", err) } + decoded["objectType"] = "BackupPolicy" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { } s.DatasourceTypes = decoded.DatasourceTypes + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { output := make([]BasePolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalBasePolicyRuleImplementation(val) + impl, err := UnmarshalBasePolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PolicyRules' for 'BackupPolicy': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicy.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicy.go index 5da7096ec0c..67380424475 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicy.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseBackupPolicy interface { + BaseBackupPolicy() BaseBaseBackupPolicyImpl } -// RawBaseBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseBackupPolicy = BaseBaseBackupPolicyImpl{} + +type BaseBaseBackupPolicyImpl struct { + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BaseBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s +} + +var _ BaseBackupPolicy = RawBaseBackupPolicyImpl{} + +// RawBaseBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseBackupPolicyImpl struct { - Type string - Values map[string]interface{} + baseBackupPolicy BaseBaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s.baseBackupPolicy } -func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { +func UnmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, er return out, nil } - out := RawBaseBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBaseBackupPolicyImpl{ + baseBackupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicyresource.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicyresource.go index dbc62cc6103..1fc0de8ac07 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicyresource.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basebackuppolicyresource.go @@ -38,7 +38,7 @@ func (s *BaseBackupPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBaseBackupPolicyImplementation(v) + impl, err := UnmarshalBaseBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BaseBackupPolicyResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basepolicyrule.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basepolicyrule.go index 2434dc31521..b1610388497 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basepolicyrule.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_basepolicyrule.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BasePolicyRule interface { + BasePolicyRule() BaseBasePolicyRuleImpl } -// RawBasePolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BasePolicyRule = BaseBasePolicyRuleImpl{} + +type BaseBasePolicyRuleImpl struct { + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s BaseBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s +} + +var _ BasePolicyRule = RawBasePolicyRuleImpl{} + +// RawBasePolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBasePolicyRuleImpl struct { - Type string - Values map[string]interface{} + basePolicyRule BaseBasePolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s.basePolicyRule } -func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { +func UnmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) return out, nil } - out := RawBasePolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseBasePolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBasePolicyRuleImpl: %+v", err) } - return out, nil + + return RawBasePolicyRuleImpl{ + basePolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyonexpiryoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyonexpiryoption.go index 38c92a43d50..de3ff29737c 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyonexpiryoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyonexpiryoption.go @@ -13,6 +13,14 @@ var _ CopyOption = CopyOnExpiryOption{} type CopyOnExpiryOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CopyOnExpiryOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CopyOnExpiryOption{} @@ -26,9 +34,10 @@ func (s CopyOnExpiryOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyOnExpiryOption: %+v", err) } + decoded["objectType"] = "CopyOnExpiryOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyoption.go index 8015dcb6bfd..9fba9c2df88 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_copyoption.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyOption interface { + CopyOption() BaseCopyOptionImpl } -// RawCopyOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyOption = BaseCopyOptionImpl{} + +type BaseCopyOptionImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s +} + +var _ CopyOption = RawCopyOptionImpl{} + +// RawCopyOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyOptionImpl struct { - Type string - Values map[string]interface{} + copyOption BaseCopyOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s.copyOption } -func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { +func UnmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { return out, nil } - out := RawCopyOptionImpl{ - Type: value, - Values: temp, + var parent BaseCopyOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyOptionImpl: %+v", err) } - return out, nil + + return RawCopyOptionImpl{ + copyOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_customcopyoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_customcopyoption.go index f450054e89a..e23a6200cb3 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_customcopyoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_customcopyoption.go @@ -14,6 +14,14 @@ type CustomCopyOption struct { Duration *string `json:"duration,omitempty"` // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CustomCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CustomCopyOption{} @@ -27,9 +35,10 @@ func (s CustomCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomCopyOption: %+v", err) } + decoded["objectType"] = "CustomCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_deleteoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_deleteoption.go index d8ac5dc7882..35a8b3c0fe0 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_deleteoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_deleteoption.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeleteOption interface { + DeleteOption() BaseDeleteOptionImpl } -// RawDeleteOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeleteOption = BaseDeleteOptionImpl{} + +type BaseDeleteOptionImpl struct { + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s BaseDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s +} + +var _ DeleteOption = RawDeleteOptionImpl{} + +// RawDeleteOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeleteOptionImpl struct { - Type string - Values map[string]interface{} + deleteOption BaseDeleteOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s.deleteOption } -func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { +func UnmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { return out, nil } - out := RawDeleteOptionImpl{ - Type: value, - Values: temp, + var parent BaseDeleteOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeleteOptionImpl: %+v", err) } - return out, nil + + return RawDeleteOptionImpl{ + deleteOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_immediatecopyoption.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_immediatecopyoption.go index a8e54686cc9..8be58faec52 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_immediatecopyoption.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_immediatecopyoption.go @@ -13,6 +13,14 @@ var _ CopyOption = ImmediateCopyOption{} type ImmediateCopyOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s ImmediateCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ImmediateCopyOption{} @@ -26,9 +34,10 @@ func (s ImmediateCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImmediateCopyOption: %+v", err) } + decoded["objectType"] = "ImmediateCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedbackupcriteria.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedbackupcriteria.go index 6e2c614f630..69188ba4962 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedbackupcriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedbackupcriteria.go @@ -19,6 +19,14 @@ type ScheduleBasedBackupCriteria struct { WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` // Fields inherited from BackupCriteria + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedBackupCriteria) BackupCriteria() BaseBackupCriteriaImpl { + return BaseBackupCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedBackupCriteria{} @@ -32,9 +40,10 @@ func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedBackupCriteria: %+v", err) } + decoded["objectType"] = "ScheduleBasedBackupCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedtriggercontext.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedtriggercontext.go index c7f96a85c13..aee5719cd5c 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_schedulebasedtriggercontext.go @@ -15,6 +15,14 @@ type ScheduleBasedTriggerContext struct { TaggingCriteria []TaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedTriggerContext{} @@ -28,9 +36,10 @@ func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedTriggerContext: %+v", err) } + decoded["objectType"] = "ScheduleBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_sourcelifecycle.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_sourcelifecycle.go index 7538681c1b2..0792fff629b 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_sourcelifecycle.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_sourcelifecycle.go @@ -32,7 +32,7 @@ func (s *SourceLifeCycle) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deleteAfter"]; ok { - impl, err := unmarshalDeleteOptionImplementation(v) + impl, err := UnmarshalDeleteOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeleteAfter' for 'SourceLifeCycle': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_taggingcriteria.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_taggingcriteria.go index 71c094c4d32..06458ef725e 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_taggingcriteria.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_taggingcriteria.go @@ -41,7 +41,7 @@ func (s *TaggingCriteria) UnmarshalJSON(bytes []byte) error { output := make([]BackupCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalBackupCriteriaImplementation(val) + impl, err := UnmarshalBackupCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Criteria' for 'TaggingCriteria': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_targetcopysetting.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_targetcopysetting.go index 2c3e72d496e..e59c6f70777 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_targetcopysetting.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_targetcopysetting.go @@ -30,7 +30,7 @@ func (s *TargetCopySetting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["copyAfter"]; ok { - impl, err := unmarshalCopyOptionImplementation(v) + impl, err := UnmarshalCopyOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CopyAfter' for 'TargetCopySetting': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_triggercontext.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_triggercontext.go index 866643b9b21..73252a42b95 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/model_triggercontext.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/model_triggercontext.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerContext interface { + TriggerContext() BaseTriggerContextImpl } -// RawTriggerContextImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerContext = BaseTriggerContextImpl{} + +type BaseTriggerContextImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s +} + +var _ TriggerContext = RawTriggerContextImpl{} + +// RawTriggerContextImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerContextImpl struct { - Type string - Values map[string]interface{} + triggerContext BaseTriggerContextImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s.triggerContext } -func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { +func UnmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) return out, nil } - out := RawTriggerContextImpl{ - Type: value, - Values: temp, + var parent BaseTriggerContextImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerContextImpl: %+v", err) } - return out, nil + + return RawTriggerContextImpl{ + triggerContext: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/backuppolicies/version.go b/resource-manager/dataprotection/2023-11-01/backuppolicies/version.go index 5bd30b89694..42533efb1eb 100644 --- a/resource-manager/dataprotection/2023-11-01/backuppolicies/version.go +++ b/resource-manager/dataprotection/2023-11-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/README.md b/resource-manager/dataprotection/2023-11-01/backupvaults/README.md index 6bc9d990764..6f776e10802 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/README.md +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/client.go b/resource-manager/dataprotection/2023-11-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/client.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/backupvaults/id_backupvault.go index 037dbb924a0..8bb7503f8f1 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/id_providerlocation.go b/resource-manager/dataprotection/2023-11-01/backupvaults/id_providerlocation.go index 0a99f41369d..c133cfe7a08 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/method_checknameavailability.go b/resource-manager/dataprotection/2023-11-01/backupvaults/method_checknameavailability.go index 6e006b786d0..de967ac422d 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/method_checknameavailability.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c BackupVaultsClient) CheckNameAvailability(ctx context.Context, id Provid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/method_get.go b/resource-manager/dataprotection/2023-11-01/backupvaults/method_get.go index 5e1ed9d0258..638bcc8f8ce 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVaultResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/backupvaults/version.go b/resource-manager/dataprotection/2023-11-01/backupvaults/version.go index 742a32aa461..5077915e9e5 100644 --- a/resource-manager/dataprotection/2023-11-01/backupvaults/version.go +++ b/resource-manager/dataprotection/2023-11-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/README.md b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/README.md index 1ff36deee31..65e72ce2881 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/README.md +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/deletedbackupinstances` Documentation -The `deletedbackupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `deletedbackupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/client.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/client.go index e70cb344e5d..65c723446b5 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/client.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/client.go @@ -15,7 +15,7 @@ type DeletedBackupInstancesClient struct { } func NewDeletedBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedBackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedbackupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedbackupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedBackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_backupvault.go index 6dc4dce0b7f..e53a4c55121 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_deletedbackupinstance.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_deletedbackupinstance.go index f81e2080068..570f077f942 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/id_deletedbackupinstance.go @@ -44,7 +44,7 @@ func ParseDeletedBackupInstanceID(input string) (*DeletedBackupInstanceId, error } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedBackupInstanceIDInsensitively(input string) (*DeletedBackupInst } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/method_get.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/method_get.go index 8326bd4395b..d884717c36e 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/method_get.go @@ -45,7 +45,6 @@ func (c DeletedBackupInstancesClient) Get(ctx context.Context, id DeletedBackupI var model DeletedBackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_authcredentials.go index e1f6967a3f6..0df9b7da64f 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_azureoperationalstoreparameters.go index 82c85ebf9e1..34ee2168445 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_backupdatasourceparameters.go index 61a96f79393..43c826178a4 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_baseresourceproperties.go index 395fa05201d..fa056a53fdb 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go index 8dbfe3038cd..8531c83eb0f 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasource.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasource.go index ae955b4355b..8a27dd1d309 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasourceset.go index 03857806dea..094ee1abfa4 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datastoreparameters.go index 0c5750816d1..422133b08f5 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_defaultresourceproperties.go index 618a75af3b9..9ac69e0ad5f 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_deletedbackupinstance.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_deletedbackupinstance.go index a1cec159406..fdfb4ccd325 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_deletedbackupinstance.go @@ -52,7 +52,7 @@ func (s *DeletedBackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'DeletedBackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 10068d31fa5..d79157220be 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_policyparameters.go index b1f479381f0..ca65ed7ce6e 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go index 61dd7ae1963..baef7fd69ef 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/version.go b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/version.go index 3998aa6bf3a..dc6bc45775b 100644 --- a/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/version.go +++ b/resource-manager/dataprotection/2023-11-01/deletedbackupinstances/version.go @@ -1,12 +1,10 @@ package deletedbackupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedbackupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedbackupinstances/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/README.md b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/README.md index 99a863ef43d..5857e7660f3 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/README.md +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/dppfeaturesupport` Documentation -The `dppfeaturesupport` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `dppfeaturesupport` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/client.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/client.go index 05f9070486d..01ef8c69f05 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/client.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/client.go @@ -15,7 +15,7 @@ type DppFeatureSupportClient struct { } func NewDppFeatureSupportClientWithBaseURI(sdkApi sdkEnv.Api) (*DppFeatureSupportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppfeaturesupport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppfeaturesupport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppFeatureSupportClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/id_location.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/id_location.go index 4d1ff865e11..71291884078 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/id_location.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go index 5b01a004060..eae58cdc096 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go @@ -16,7 +16,7 @@ import ( type DataProtectionCheckFeatureSupportOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *FeatureValidationResponseBase + Model FeatureValidationResponseBase } // DataProtectionCheckFeatureSupport ... @@ -53,11 +53,11 @@ func (c DppFeatureSupportClient) DataProtectionCheckFeatureSupport(ctx context.C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalFeatureValidationResponseBaseImplementation(respObj) + model, err := UnmarshalFeatureValidationResponseBaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequest.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequest.go index 245619e2f34..1c4657b517a 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequest.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequest.go @@ -15,6 +15,14 @@ type FeatureValidationRequest struct { FeatureType *FeatureType `json:"featureType,omitempty"` // Fields inherited from FeatureValidationRequestBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationRequest) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return BaseFeatureValidationRequestBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationRequest{} @@ -28,9 +36,10 @@ func (s FeatureValidationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationRequest: %+v", err) } + decoded["objectType"] = "FeatureValidationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequestbase.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequestbase.go index 80efd7fd693..8e51d6587e0 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequestbase.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationrequestbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationRequestBase interface { + FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl } -// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationRequestBase = BaseFeatureValidationRequestBaseImpl{} + +type BaseFeatureValidationRequestBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s +} + +var _ FeatureValidationRequestBase = RawFeatureValidationRequestBaseImpl{} + +// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationRequestBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationRequestBase BaseFeatureValidationRequestBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s.featureValidationRequestBase } -func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { +func UnmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureV return out, nil } - out := RawFeatureValidationRequestBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationRequestBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationRequestBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationRequestBaseImpl{ + featureValidationRequestBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponse.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponse.go index cf7a0191334..05506b82ee9 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponse.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponse.go @@ -15,6 +15,14 @@ type FeatureValidationResponse struct { Features *[]SupportedFeature `json:"features,omitempty"` // Fields inherited from FeatureValidationResponseBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationResponse) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return BaseFeatureValidationResponseBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationResponse{} @@ -28,9 +36,10 @@ func (s FeatureValidationResponse) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationResponse: %+v", err) } + decoded["objectType"] = "FeatureValidationResponse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponsebase.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponsebase.go index 77514fd0908..2856f973105 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponsebase.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/model_featurevalidationresponsebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationResponseBase interface { + FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl } -// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationResponseBase = BaseFeatureValidationResponseBaseImpl{} + +type BaseFeatureValidationResponseBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s +} + +var _ FeatureValidationResponseBase = RawFeatureValidationResponseBaseImpl{} + +// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationResponseBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationResponseBase BaseFeatureValidationResponseBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s.featureValidationResponseBase } -func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { +func UnmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (Feature return out, nil } - out := RawFeatureValidationResponseBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationResponseBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationResponseBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationResponseBaseImpl{ + featureValidationResponseBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/version.go b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/version.go index 66724a764fd..5b4f480155f 100644 --- a/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/version.go +++ b/resource-manager/dataprotection/2023-11-01/dppfeaturesupport/version.go @@ -1,12 +1,10 @@ package dppfeaturesupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppfeaturesupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppfeaturesupport/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/README.md b/resource-manager/dataprotection/2023-11-01/dppjob/README.md index 5870207eba4..cff7501b21a 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/README.md +++ b/resource-manager/dataprotection/2023-11-01/dppjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/dppjob` Documentation -The `dppjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `dppjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/client.go b/resource-manager/dataprotection/2023-11-01/dppjob/client.go index 0d6159de0c6..d492231a2c4 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/client.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/client.go @@ -15,7 +15,7 @@ type DppJobClient struct { } func NewDppJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DppJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/id_providerlocation.go b/resource-manager/dataprotection/2023-11-01/dppjob/id_providerlocation.go index 9e8309b040d..c8443293e1d 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobget.go b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobget.go index 9635b5ff158..2e95534048b 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobget.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobget.go @@ -50,7 +50,6 @@ func (c DppJobClient) FetchCrossRegionRestoreJobGet(ctx context.Context, id Prov var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go index 48d719aa3cb..46b0baf9b3a 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -39,6 +39,7 @@ func (o FetchCrossRegionRestoreJobsListOperationOptions) ToHeaders() *client.Hea func (o FetchCrossRegionRestoreJobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-11-01/dppjob/version.go b/resource-manager/dataprotection/2023-11-01/dppjob/version.go index 78e84edb5f1..94a22839e80 100644 --- a/resource-manager/dataprotection/2023-11-01/dppjob/version.go +++ b/resource-manager/dataprotection/2023-11-01/dppjob/version.go @@ -1,12 +1,10 @@ package dppjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppjob/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/README.md b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/README.md index 0a40e874e0d..9ff6ef69ee6 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/README.md +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies` Documentation -The `dppresourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `dppresourceguardproxies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/client.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/client.go index f44efd92c08..d0374e7e5bc 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/client.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/client.go @@ -15,7 +15,7 @@ type DppResourceGuardProxiesClient struct { } func NewDppResourceGuardProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DppResourceGuardProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppResourceGuardProxiesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupresourceguardproxy.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupresourceguardproxy.go index a6f07c8cb77..eed9974ebe7 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupresourceguardproxy.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupvault.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupvault.go index e495aa166e4..f9b6a081a8f 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go index a59d9ee6c52..f66d7644b9c 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go @@ -49,7 +49,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyCreateOrUpdate(ctx c var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyget.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyget.go index 33b05521f54..a2c7afa278b 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyget.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyget.go @@ -45,7 +45,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyGet(ctx context.Cont var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go index 1c0bbafa78a..1a88c4848f3 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go @@ -50,7 +50,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyUnlockDelete(ctx con var model UnlockDeleteResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/version.go b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/version.go index 55d829af2d3..2a271924ef6 100644 --- a/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/version.go +++ b/resource-manager/dataprotection/2023-11-01/dppresourceguardproxies/version.go @@ -1,12 +1,10 @@ package dppresourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppresourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppresourceguardproxies/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/README.md b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/README.md index 161e902de02..95333586779 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/README.md +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints` Documentation -The `fetchsecondaryrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `fetchsecondaryrecoverypoints` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/client.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/client.go index 0ac726e9656..b57013621a5 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/client.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/client.go @@ -15,7 +15,7 @@ type FetchSecondaryRecoveryPointsClient struct { } func NewFetchSecondaryRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*FetchSecondaryRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FetchSecondaryRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/id_providerlocation.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/id_providerlocation.go index 72b7a004674..a720695daf7 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go index 26723b92a47..529ba019df0 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go index 33e554f5b79..87fc8c24a23 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go index 81815b8b85c..6cfd9ea0524 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go index b09db4ee8cd..3a953277061 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/version.go b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/version.go index 2a74c791073..656e10bbb9b 100644 --- a/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/version.go +++ b/resource-manager/dataprotection/2023-11-01/fetchsecondaryrecoverypoints/version.go @@ -1,12 +1,10 @@ package fetchsecondaryrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/README.md b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/README.md index ff2e70818cd..b3abb026103 100644 --- a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/README.md +++ b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges` Documentation -The `findrestorabletimeranges` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `findrestorabletimeranges` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/client.go b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/client.go index bfd1fda26df..d342b80d165 100644 --- a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/client.go +++ b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/client.go @@ -15,7 +15,7 @@ type FindRestorableTimeRangesClient struct { } func NewFindRestorableTimeRangesClientWithBaseURI(sdkApi sdkEnv.Api) (*FindRestorableTimeRangesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FindRestorableTimeRangesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/id_backupinstance.go b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/id_backupinstance.go index 25f53ef1e8a..0cf75c2d2df 100644 --- a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/method_restorabletimerangesfind.go b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/method_restorabletimerangesfind.go index a0c43a05b78..fab15204651 100644 --- a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/method_restorabletimerangesfind.go +++ b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/method_restorabletimerangesfind.go @@ -50,7 +50,6 @@ func (c FindRestorableTimeRangesClient) RestorableTimeRangesFind(ctx context.Con var model AzureBackupFindRestorableTimeRangesResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/version.go b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/version.go index 676249247b5..4a64779778e 100644 --- a/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/version.go +++ b/resource-manager/dataprotection/2023-11-01/findrestorabletimeranges/version.go @@ -1,12 +1,10 @@ package findrestorabletimeranges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/findrestorabletimeranges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/findrestorabletimeranges/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/README.md b/resource-manager/dataprotection/2023-11-01/recoverypoint/README.md index 3198d3e94b7..26af817f0cf 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/README.md +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/client.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/client.go index d58f74c6c6a..3808ce1905f 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/client.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/client.go @@ -15,7 +15,7 @@ type RecoveryPointClient struct { } func NewRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/id_backupinstance.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/id_backupinstance.go index ae213017beb..3951fd7bc79 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/id_recoverypoint.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/id_recoverypoint.go index 8a6823eb8aa..0cf676d8e2e 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/id_recoverypoint.go @@ -46,7 +46,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/method_get.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/method_get.go index aef9f3c1f69..527ea0e9599 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointClient) Get(ctx context.Context, id RecoveryPointId) (resul var model AzureBackupRecoveryPointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/method_list.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/method_list.go index ace5d834658..8c3642589d9 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/method_list.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go index ecc3e64361c..b5e2e8ff589 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypoint.go index 384f69a0f65..8824a972a2a 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypointresource.go index 8f11d9bda9d..e7302b20ae8 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/recoverypoint/version.go b/resource-manager/dataprotection/2023-11-01/recoverypoint/version.go index 1a61dab10a3..c076fa99da6 100644 --- a/resource-manager/dataprotection/2023-11-01/recoverypoint/version.go +++ b/resource-manager/dataprotection/2023-11-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/README.md b/resource-manager/dataprotection/2023-11-01/resourceguards/README.md index 5f2d9014fef..e97e9187137 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/README.md +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-11-01/resourceguards` Documentation -The `resourceguards` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-11-01`). +The `resourceguards` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/client.go b/resource-manager/dataprotection/2023-11-01/resourceguards/client.go index 2a79980112d..0f0913402ff 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/client.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/client.go @@ -15,7 +15,7 @@ type ResourceGuardsClient struct { } func NewResourceGuardsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGuardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceguards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceguards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGuardsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteprotecteditemrequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteprotecteditemrequest.go index 797704c5a13..60a37b80109 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteresourceguardproxyrequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteresourceguardproxyrequest.go index 698fd773b09..1d6e985f86a 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -44,7 +44,7 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_disablesoftdeleterequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_disablesoftdeleterequest.go index a4a28e2d325..895f4edf5ba 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_disablesoftdeleterequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_disablesoftdeleterequest.go @@ -44,7 +44,7 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_getbackupsecuritypinrequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_getbackupsecuritypinrequest.go index 9975ae3fc13..6181e271847 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -44,7 +44,7 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_resourceguard.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_resourceguard.go index db774ade737..c6c0804b636 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_resourceguard.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_resourceguard.go @@ -42,7 +42,7 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotecteditemrequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotecteditemrequest.go index b49508843a6..41ef782ccd4 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotectionpolicyrequest.go b/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotectionpolicyrequest.go index d1a6daf9f64..bdd5ac39cd4 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_get.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_get.go index e95a3d77f1b..8c3fae9b334 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_get.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_get.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) Get(ctx context.Context, id ResourceGuardId) (resu var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go index 4638718dc46..c4c17baa63e 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go index b3a996b5514..01a918c9ed2 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go index 82604a5c9ed..94bb22e07d2 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(c var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go index e618503da42..cf1270f04a5 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go index 13158cedebe..22159bc163f 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go index ed3cb61d2f0..a2389d2fd93 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_patch.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_patch.go index 1c4cf4482c6..0f38b0517b3 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_patch.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_patch.go @@ -49,7 +49,6 @@ func (c ResourceGuardsClient) Patch(ctx context.Context, id ResourceGuardId, inp var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/method_put.go b/resource-manager/dataprotection/2023-11-01/resourceguards/method_put.go index 1f0339e6424..c71ad58adca 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/method_put.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/method_put.go @@ -50,7 +50,6 @@ func (c ResourceGuardsClient) Put(ctx context.Context, id ResourceGuardId, input var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-11-01/resourceguards/version.go b/resource-manager/dataprotection/2023-11-01/resourceguards/version.go index 6e395489fda..c666e7a25ff 100644 --- a/resource-manager/dataprotection/2023-11-01/resourceguards/version.go +++ b/resource-manager/dataprotection/2023-11-01/resourceguards/version.go @@ -1,12 +1,10 @@ package resourceguards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguards/2023-11-01" } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/README.md b/resource-manager/dataprotection/2023-12-01/azurebackupjob/README.md index 7b193c8a782..49af5e580d8 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/README.md +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/azurebackupjob` Documentation -The `azurebackupjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `azurebackupjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/client.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/client.go index 11ba06b263b..e8e66d81c81 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/client.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/client.go @@ -15,7 +15,7 @@ type AzureBackupJobClient struct { } func NewAzureBackupJobClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupjob.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupjob.go index 1089c3fd6d4..57696bb1ffb 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupjob.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupvault.go index d0675f57728..7208d3d1aa6 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_operationid.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_operationid.go index bed20827391..b55c145002d 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_operationid.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/id_operationid.go @@ -44,7 +44,7 @@ func ParseOperationIdID(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIdIDInsensitively(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_exportjobsoperationresultget.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_exportjobsoperationresultget.go index 9f61784cc45..4df7d900a99 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_exportjobsoperationresultget.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_exportjobsoperationresultget.go @@ -46,7 +46,6 @@ func (c AzureBackupJobClient) ExportJobsOperationResultGet(ctx context.Context, var model ExportJobsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_jobsget.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_jobsget.go index d895ee2d205..ea51644c134 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_jobsget.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/method_jobsget.go @@ -45,7 +45,6 @@ func (c AzureBackupJobClient) JobsGet(ctx context.Context, id BackupJobId) (resu var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjob/version.go b/resource-manager/dataprotection/2023-12-01/azurebackupjob/version.go index bfd5e84589e..4f65d51339d 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjob/version.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjob/version.go @@ -1,12 +1,10 @@ package azurebackupjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjob/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/README.md b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/README.md index d6e0c07a4c4..e5f9130b72d 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/README.md +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/azurebackupjobs` Documentation -The `azurebackupjobs` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `azurebackupjobs` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/client.go b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/client.go index 9cb5bb85556..1028ad5240a 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/client.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/client.go @@ -15,7 +15,7 @@ type AzureBackupJobsClient struct { } func NewAzureBackupJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/id_backupvault.go index 3d797b731f7..5b928cc2675 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/version.go b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/version.go index 025c1ab799c..a286cabcae4 100644 --- a/resource-manager/dataprotection/2023-12-01/azurebackupjobs/version.go +++ b/resource-manager/dataprotection/2023-12-01/azurebackupjobs/version.go @@ -1,12 +1,10 @@ package azurebackupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjobs/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/README.md b/resource-manager/dataprotection/2023-12-01/backupinstances/README.md index 9815702cf7d..8b6b90b67b7 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/README.md +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/backupinstances` Documentation -The `backupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `backupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/client.go b/resource-manager/dataprotection/2023-12-01/backupinstances/client.go index 9e37fa3fed5..d0c8a08b5f2 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/client.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/client.go @@ -15,7 +15,7 @@ type BackupInstancesClient struct { } func NewBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupinstance.go b/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupinstance.go index 9120ff5c7b9..dc9734f7a43 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupvault.go index 3e2cc254429..11f896cba11 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/id_providerlocation.go b/resource-manager/dataprotection/2023-12-01/backupinstances/id_providerlocation.go index 41446698550..b0d1d2724df 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/method_get.go b/resource-manager/dataprotection/2023-12-01/backupinstances/method_get.go index dc268db7fc1..39aa6d46c90 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/method_get.go @@ -45,7 +45,6 @@ func (c BackupInstancesClient) Get(ctx context.Context, id BackupInstanceId) (re var model BackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_authcredentials.go index 8be823b957b..b743312fc69 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go index 5809de628f0..656e15d1842 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryPointBasedRestoreRequest struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryPointBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryPointBasedRestoreRequest{} func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryPointBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryPointBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go index 17052c6294a..f5d0231ca11 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryTimeBasedRestoreRequest struct { RecoveryPointTime string `json:"recoveryPointTime"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryTimeBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryTimeBasedRestoreRequest{} func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryTimeBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointTime = decoded.RecoveryPointTime s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryTimeBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorerequest.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorerequest.go index 3b5348e6cdf..06f550bb5e9 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorerequest.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorerequest.go @@ -10,18 +10,68 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRestoreRequest interface { + AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl } -// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRestoreRequest = BaseAzureBackupRestoreRequestImpl{} + +type BaseAzureBackupRestoreRequestImpl struct { + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` + RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s +} + +var _ AzureBackupRestoreRequest = RawAzureBackupRestoreRequestImpl{} + +// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRestoreRequestImpl struct { - Type string - Values map[string]interface{} + azureBackupRestoreRequest BaseAzureBackupRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s.azureBackupRestoreRequest } -func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { +var _ json.Unmarshaler = &BaseAzureBackupRestoreRequestImpl{} + +func (s *BaseAzureBackupRestoreRequestImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAzureBackupRestoreRequestImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) + } + + s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType + s.SourceDataStoreType = decoded.SourceDataStoreType + s.SourceResourceId = decoded.SourceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAzureBackupRestoreRequestImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["restoreTargetInfo"]; ok { + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'BaseAzureBackupRestoreRequestImpl': %+v", err) + } + s.RestoreTargetInfo = impl + } + return nil +} + +func UnmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { if input == nil { return nil, nil } @@ -60,10 +110,15 @@ func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackup return out, nil } - out := RawAzureBackupRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) } - return out, nil + + return RawAzureBackupRestoreRequestImpl{ + azureBackupRestoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go index 1e8e3e86089..ff9c2300a43 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go @@ -16,12 +16,24 @@ type AzureBackupRestoreWithRehydrationRequest struct { RehydrationRetentionDuration string `json:"rehydrationRetentionDuration"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRestoreWithRehydrationRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRestoreWithRehydrationRequest{} func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) @@ -56,6 +69,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.RehydrationPriority = decoded.RehydrationPriority s.RehydrationRetentionDuration = decoded.RehydrationRetentionDuration @@ -68,7 +82,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRestoreWithRehydrationRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azureoperationalstoreparameters.go index f7daf43fe3e..2c2c8c9086a 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupdatasourceparameters.go index 035cc0633ac..944abaf16cc 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupinstance.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupinstance.go index 73c49dd6840..96144ab3905 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_backupinstance.go @@ -50,7 +50,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_baseresourceproperties.go index fcf07932382..cc03a988b9b 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_blobbackupdatasourceparameters.go index 84f49ead22c..fc701b02154 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_crossregionrestorerequestobject.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_crossregionrestorerequestobject.go index d958127a0de..f86657b433b 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_crossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_crossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *CrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'CrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasource.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasource.go index a8e07a37117..b24319e48fd 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasourceset.go index 537af263c0b..63859485cb4 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datastoreparameters.go index ee57cd90fa3..f66bb93df79 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_defaultresourceproperties.go index adac6099d8b..6de216a9daa 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestorecriteria.go index 5c1b5326ced..47f3587ef24 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestorecriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ItemLevelRestoreCriteria interface { + ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl } -// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ItemLevelRestoreCriteria = BaseItemLevelRestoreCriteriaImpl{} + +type BaseItemLevelRestoreCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s +} + +var _ ItemLevelRestoreCriteria = RawItemLevelRestoreCriteriaImpl{} + +// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawItemLevelRestoreCriteriaImpl struct { - Type string - Values map[string]interface{} + itemLevelRestoreCriteria BaseItemLevelRestoreCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s.itemLevelRestoreCriteria } -func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { +func UnmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRes return out, nil } - out := RawItemLevelRestoreCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseItemLevelRestoreCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseItemLevelRestoreCriteriaImpl: %+v", err) } - return out, nil + + return RawItemLevelRestoreCriteriaImpl{ + itemLevelRestoreCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestoretargetinfo.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestoretargetinfo.go index 475d8764212..9490dd04de7 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestoretargetinfo.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itemlevelrestoretargetinfo.go @@ -17,10 +17,20 @@ type ItemLevelRestoreTargetInfo struct { RestoreCriteria []ItemLevelRestoreCriteria `json:"restoreCriteria"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s ItemLevelRestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = ItemLevelRestoreTargetInfo{} func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemLevelRestoreTargetInfo: %+v", err) } + decoded["objectType"] = "ItemLevelRestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -56,6 +67,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -65,7 +77,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'ItemLevelRestoreTargetInfo': %+v", err) } @@ -80,7 +92,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { output := make([]ItemLevelRestoreCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalItemLevelRestoreCriteriaImplementation(val) + impl, err := UnmarshalItemLevelRestoreCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RestoreCriteria' for 'ItemLevelRestoreTargetInfo': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itempathbasedrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itempathbasedrestorecriteria.go index bd6640be142..293c8227b06 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_itempathbasedrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_itempathbasedrestorecriteria.go @@ -16,6 +16,14 @@ type ItemPathBasedRestoreCriteria struct { SubItemPathPrefix *[]string `json:"subItemPathPrefix,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s ItemPathBasedRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ItemPathBasedRestoreCriteria{} @@ -29,9 +37,10 @@ func (s ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemPathBasedRestoreCriteria: %+v", err) } + decoded["objectType"] = "ItemPathBasedRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 021230e39ac..fedc5d4bc51 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterrestorecriteria.go index ab7478006ae..c39f21cf7df 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclusterrestorecriteria.go @@ -24,6 +24,14 @@ type KubernetesClusterRestoreCriteria struct { RestoreHookReferences *[]NamespacedNameResource `json:"restoreHookReferences,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterRestoreCriteria{} @@ -37,9 +45,10 @@ func (s KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go index b172d3bed60..b192cf49ac8 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go @@ -26,6 +26,14 @@ type KubernetesClusterVaultTierRestoreCriteria struct { StagingStorageAccountId *string `json:"stagingStorageAccountId,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterVaultTierRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterVaultTierRestoreCriteria{} @@ -39,9 +47,10 @@ func (s KubernetesClusterVaultTierRestoreCriteria) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterVaultTierRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterVaultTierRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetespvrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetespvrestorecriteria.go index 0f3d56cbfeb..4a0189b1de3 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetespvrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetespvrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesPVRestoreCriteria struct { StorageClassName *string `json:"storageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesPVRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesPVRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesPVRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesPVRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go index d4b08aa1e6f..a1f6748502f 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesStorageClassRestoreCriteria struct { SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesStorageClassRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesStorageClassRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesStorageClassRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesStorageClassRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationextendedinfo.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationextendedinfo.go index 53581d9a9e1..7293611199b 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationextendedinfo.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationextendedinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OperationExtendedInfo interface { + OperationExtendedInfo() BaseOperationExtendedInfoImpl } -// RawOperationExtendedInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OperationExtendedInfo = BaseOperationExtendedInfoImpl{} + +type BaseOperationExtendedInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s +} + +var _ OperationExtendedInfo = RawOperationExtendedInfoImpl{} + +// RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOperationExtendedInfoImpl struct { - Type string - Values map[string]interface{} + operationExtendedInfo BaseOperationExtendedInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s.operationExtendedInfo } -func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { +func UnmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtend return out, nil } - out := RawOperationExtendedInfoImpl{ - Type: value, - Values: temp, + var parent BaseOperationExtendedInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationExtendedInfoImpl: %+v", err) } - return out, nil + + return RawOperationExtendedInfoImpl{ + operationExtendedInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationjobextendedinfo.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationjobextendedinfo.go index 59cd3f9ddf6..c0ead370cf2 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationjobextendedinfo.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_operationjobextendedinfo.go @@ -14,6 +14,14 @@ type OperationJobExtendedInfo struct { JobId *string `json:"jobId,omitempty"` // Fields inherited from OperationExtendedInfo + + ObjectType string `json:"objectType"` +} + +func (s OperationJobExtendedInfo) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return BaseOperationExtendedInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = OperationJobExtendedInfo{} @@ -27,9 +35,10 @@ func (s OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OperationJobExtendedInfo: %+v", err) } + decoded["objectType"] = "OperationJobExtendedInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_policyparameters.go index ba00f440ca8..00ca7abb0fd 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go index c7df0c52c2b..365518530ec 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go @@ -15,6 +15,14 @@ type RangeBasedItemLevelRestoreCriteria struct { MinMatchingValue *string `json:"minMatchingValue,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s RangeBasedItemLevelRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = RangeBasedItemLevelRestoreCriteria{} @@ -28,9 +36,10 @@ func (s RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RangeBasedItemLevelRestoreCriteria: %+v", err) } + decoded["objectType"] = "RangeBasedItemLevelRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restorefilestargetinfo.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restorefilestargetinfo.go index 04fe194025c..b5cf6722012 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restorefilestargetinfo.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restorefilestargetinfo.go @@ -14,10 +14,20 @@ type RestoreFilesTargetInfo struct { TargetDetails TargetDetails `json:"targetDetails"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreFilesTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreFilesTargetInfo{} func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreFilesTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreFilesTargetInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfo.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfo.go index 23f512f2c31..b1a8ea521b8 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfo.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfo.go @@ -16,10 +16,20 @@ type RestoreTargetInfo struct { DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreTargetInfo{} func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -64,7 +76,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'RestoreTargetInfo': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfobase.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfobase.go index ce31702dc78..f4f60833a9c 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfobase.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_restoretargetinfobase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreTargetInfoBase interface { + RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl } -// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreTargetInfoBase = BaseRestoreTargetInfoBaseImpl{} + +type BaseRestoreTargetInfoBaseImpl struct { + ObjectType string `json:"objectType"` + RecoveryOption RecoveryOption `json:"recoveryOption"` + RestoreLocation *string `json:"restoreLocation,omitempty"` +} + +func (s BaseRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s +} + +var _ RestoreTargetInfoBase = RawRestoreTargetInfoBaseImpl{} + +// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreTargetInfoBaseImpl struct { - Type string - Values map[string]interface{} + restoreTargetInfoBase BaseRestoreTargetInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s.restoreTargetInfoBase } -func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { +func UnmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetIn return out, nil } - out := RawRestoreTargetInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseRestoreTargetInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreTargetInfoBaseImpl: %+v", err) } - return out, nil + + return RawRestoreTargetInfoBaseImpl{ + restoreTargetInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_secretstorebasedauthcredentials.go index 76f2af98598..859bcef3249 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_validatecrossregionrestorerequestobject.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_validatecrossregionrestorerequestobject.go index 64c70ca0be3..06b9dc2dda9 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_validatecrossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_validatecrossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *ValidateCrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) er } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateCrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/model_validaterestorerequestobject.go b/resource-manager/dataprotection/2023-12-01/backupinstances/model_validaterestorerequestobject.go index e59fe83da41..fcef764da4b 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/model_validaterestorerequestobject.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/model_validaterestorerequestobject.go @@ -22,7 +22,7 @@ func (s *ValidateRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupinstances/version.go b/resource-manager/dataprotection/2023-12-01/backupinstances/version.go index 764a9726da5..e61ae19ae0f 100644 --- a/resource-manager/dataprotection/2023-12-01/backupinstances/version.go +++ b/resource-manager/dataprotection/2023-12-01/backupinstances/version.go @@ -1,12 +1,10 @@ package backupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstances/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/README.md b/resource-manager/dataprotection/2023-12-01/backuppolicies/README.md index d6af89fae6f..431932c336c 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/README.md +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/client.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/client.go index 7867fb217cc..a888bef7263 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/client.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/client.go @@ -15,7 +15,7 @@ type BackupPoliciesClient struct { } func NewBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPoliciesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backuppolicy.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backuppolicy.go index 567587f55bd..be6e8b11b7c 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backuppolicy.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backupvault.go index 630fbdb1a15..b844c8ed70f 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/method_createorupdate.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/method_createorupdate.go index fbea2f083fb..04342e7a5d0 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/method_createorupdate.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BackupPoliciesClient) CreateOrUpdate(ctx context.Context, id BackupPolic var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/method_get.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/method_get.go index 2275adb94b5..1dbecf80051 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/method_get.go @@ -45,7 +45,6 @@ func (c BackupPoliciesClient) Get(ctx context.Context, id BackupPolicyId) (resul var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_absolutedeleteoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_absolutedeleteoption.go index a9aaf47dcb7..fe6ce6d3432 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_absolutedeleteoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_absolutedeleteoption.go @@ -13,7 +13,16 @@ var _ DeleteOption = AbsoluteDeleteOption{} type AbsoluteDeleteOption struct { // Fields inherited from DeleteOption - Duration string `json:"duration"` + + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s AbsoluteDeleteOption) DeleteOption() BaseDeleteOptionImpl { + return BaseDeleteOptionImpl{ + Duration: s.Duration, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AbsoluteDeleteOption{} @@ -27,9 +36,10 @@ func (s AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteDeleteOption: %+v", err) } + decoded["objectType"] = "AbsoluteDeleteOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_adhocbasedtriggercontext.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_adhocbasedtriggercontext.go index 5505a40b8a6..30cb106ddf1 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_adhocbasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_adhocbasedtriggercontext.go @@ -14,6 +14,14 @@ type AdhocBasedTriggerContext struct { TaggingCriteria AdhocBasedTaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s AdhocBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AdhocBasedTriggerContext{} @@ -27,9 +35,10 @@ func (s AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdhocBasedTriggerContext: %+v", err) } + decoded["objectType"] = "AdhocBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackupparams.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackupparams.go index 024401c3d86..6b98b1df1f3 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackupparams.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackupparams.go @@ -14,6 +14,14 @@ type AzureBackupParams struct { BackupType string `json:"backupType"` // Fields inherited from BackupParameters + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupParams) BackupParameters() BaseBackupParametersImpl { + return BaseBackupParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupParams{} @@ -27,9 +35,10 @@ func (s AzureBackupParams) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupParams: %+v", err) } + decoded["objectType"] = "AzureBackupParams" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackuprule.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackuprule.go index 884536bf720..a06a9d21176 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackuprule.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azurebackuprule.go @@ -16,7 +16,16 @@ type AzureBackupRule struct { Trigger TriggerContext `json:"trigger"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureBackupRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupRule{} @@ -30,9 +39,10 @@ func (s AzureBackupRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRule: %+v", err) } + decoded["objectType"] = "AzureBackupRule" encoded, err = json.Marshal(decoded) @@ -54,6 +64,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { s.DataStore = decoded.DataStore s.Name = decoded.Name + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -61,7 +72,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupParameters"]; ok { - impl, err := unmarshalBackupParametersImplementation(v) + impl, err := UnmarshalBackupParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupParameters' for 'AzureBackupRule': %+v", err) } @@ -69,7 +80,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerContextImplementation(v) + impl, err := UnmarshalTriggerContextImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'AzureBackupRule': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azureretentionrule.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azureretentionrule.go index 1362ef8628d..f6c4c671bcc 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azureretentionrule.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_azureretentionrule.go @@ -15,7 +15,16 @@ type AzureRetentionRule struct { Lifecycles []SourceLifeCycle `json:"lifecycles"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureRetentionRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureRetentionRule{} @@ -29,9 +38,10 @@ func (s AzureRetentionRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRetentionRule: %+v", err) } + decoded["objectType"] = "AzureRetentionRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupcriteria.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupcriteria.go index ae5e3acf7f9..1d4eda9f3ce 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupcriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupCriteria interface { + BackupCriteria() BaseBackupCriteriaImpl } -// RawBackupCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupCriteria = BaseBackupCriteriaImpl{} + +type BaseBackupCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s +} + +var _ BackupCriteria = RawBackupCriteriaImpl{} + +// RawBackupCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupCriteriaImpl struct { - Type string - Values map[string]interface{} + backupCriteria BaseBackupCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s.backupCriteria } -func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { +func UnmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) return out, nil } - out := RawBackupCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseBackupCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupCriteriaImpl: %+v", err) } - return out, nil + + return RawBackupCriteriaImpl{ + backupCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupparameters.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupparameters.go index 2cd46e5bbe7..9df43d72eeb 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupparameters.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backupparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupParameters interface { + BackupParameters() BaseBackupParametersImpl } -// RawBackupParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupParameters = BaseBackupParametersImpl{} + +type BaseBackupParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s +} + +var _ BackupParameters = RawBackupParametersImpl{} + +// RawBackupParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupParametersImpl struct { - Type string - Values map[string]interface{} + backupParameters BaseBackupParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s.backupParameters } -func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { +func UnmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, er return out, nil } - out := RawBackupParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupParametersImpl: %+v", err) } - return out, nil + + return RawBackupParametersImpl{ + backupParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backuppolicy.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backuppolicy.go index 5b770c9a733..861df204488 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backuppolicy.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_backuppolicy.go @@ -14,7 +14,16 @@ type BackupPolicy struct { PolicyRules []BasePolicyRule `json:"policyRules"` // Fields inherited from BaseBackupPolicy + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BackupPolicy) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return BaseBaseBackupPolicyImpl{ + DatasourceTypes: s.DatasourceTypes, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BackupPolicy{} @@ -28,9 +37,10 @@ func (s BackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BackupPolicy: %+v", err) } + decoded["objectType"] = "BackupPolicy" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { } s.DatasourceTypes = decoded.DatasourceTypes + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { output := make([]BasePolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalBasePolicyRuleImplementation(val) + impl, err := UnmarshalBasePolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PolicyRules' for 'BackupPolicy': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicy.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicy.go index 5da7096ec0c..67380424475 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicy.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseBackupPolicy interface { + BaseBackupPolicy() BaseBaseBackupPolicyImpl } -// RawBaseBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseBackupPolicy = BaseBaseBackupPolicyImpl{} + +type BaseBaseBackupPolicyImpl struct { + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BaseBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s +} + +var _ BaseBackupPolicy = RawBaseBackupPolicyImpl{} + +// RawBaseBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseBackupPolicyImpl struct { - Type string - Values map[string]interface{} + baseBackupPolicy BaseBaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s.baseBackupPolicy } -func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { +func UnmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, er return out, nil } - out := RawBaseBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBaseBackupPolicyImpl{ + baseBackupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicyresource.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicyresource.go index dbc62cc6103..1fc0de8ac07 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicyresource.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basebackuppolicyresource.go @@ -38,7 +38,7 @@ func (s *BaseBackupPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBaseBackupPolicyImplementation(v) + impl, err := UnmarshalBaseBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BaseBackupPolicyResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basepolicyrule.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basepolicyrule.go index 2434dc31521..b1610388497 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basepolicyrule.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_basepolicyrule.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BasePolicyRule interface { + BasePolicyRule() BaseBasePolicyRuleImpl } -// RawBasePolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BasePolicyRule = BaseBasePolicyRuleImpl{} + +type BaseBasePolicyRuleImpl struct { + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s BaseBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s +} + +var _ BasePolicyRule = RawBasePolicyRuleImpl{} + +// RawBasePolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBasePolicyRuleImpl struct { - Type string - Values map[string]interface{} + basePolicyRule BaseBasePolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s.basePolicyRule } -func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { +func UnmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) return out, nil } - out := RawBasePolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseBasePolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBasePolicyRuleImpl: %+v", err) } - return out, nil + + return RawBasePolicyRuleImpl{ + basePolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyonexpiryoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyonexpiryoption.go index 38c92a43d50..de3ff29737c 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyonexpiryoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyonexpiryoption.go @@ -13,6 +13,14 @@ var _ CopyOption = CopyOnExpiryOption{} type CopyOnExpiryOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CopyOnExpiryOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CopyOnExpiryOption{} @@ -26,9 +34,10 @@ func (s CopyOnExpiryOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyOnExpiryOption: %+v", err) } + decoded["objectType"] = "CopyOnExpiryOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyoption.go index 8015dcb6bfd..9fba9c2df88 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_copyoption.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyOption interface { + CopyOption() BaseCopyOptionImpl } -// RawCopyOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyOption = BaseCopyOptionImpl{} + +type BaseCopyOptionImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s +} + +var _ CopyOption = RawCopyOptionImpl{} + +// RawCopyOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyOptionImpl struct { - Type string - Values map[string]interface{} + copyOption BaseCopyOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s.copyOption } -func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { +func UnmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { return out, nil } - out := RawCopyOptionImpl{ - Type: value, - Values: temp, + var parent BaseCopyOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyOptionImpl: %+v", err) } - return out, nil + + return RawCopyOptionImpl{ + copyOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_customcopyoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_customcopyoption.go index f450054e89a..e23a6200cb3 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_customcopyoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_customcopyoption.go @@ -14,6 +14,14 @@ type CustomCopyOption struct { Duration *string `json:"duration,omitempty"` // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CustomCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CustomCopyOption{} @@ -27,9 +35,10 @@ func (s CustomCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomCopyOption: %+v", err) } + decoded["objectType"] = "CustomCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_deleteoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_deleteoption.go index d8ac5dc7882..35a8b3c0fe0 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_deleteoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_deleteoption.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeleteOption interface { + DeleteOption() BaseDeleteOptionImpl } -// RawDeleteOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeleteOption = BaseDeleteOptionImpl{} + +type BaseDeleteOptionImpl struct { + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s BaseDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s +} + +var _ DeleteOption = RawDeleteOptionImpl{} + +// RawDeleteOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeleteOptionImpl struct { - Type string - Values map[string]interface{} + deleteOption BaseDeleteOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s.deleteOption } -func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { +func UnmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { return out, nil } - out := RawDeleteOptionImpl{ - Type: value, - Values: temp, + var parent BaseDeleteOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeleteOptionImpl: %+v", err) } - return out, nil + + return RawDeleteOptionImpl{ + deleteOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_immediatecopyoption.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_immediatecopyoption.go index a8e54686cc9..8be58faec52 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_immediatecopyoption.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_immediatecopyoption.go @@ -13,6 +13,14 @@ var _ CopyOption = ImmediateCopyOption{} type ImmediateCopyOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s ImmediateCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ImmediateCopyOption{} @@ -26,9 +34,10 @@ func (s ImmediateCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImmediateCopyOption: %+v", err) } + decoded["objectType"] = "ImmediateCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedbackupcriteria.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedbackupcriteria.go index 6e2c614f630..69188ba4962 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedbackupcriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedbackupcriteria.go @@ -19,6 +19,14 @@ type ScheduleBasedBackupCriteria struct { WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` // Fields inherited from BackupCriteria + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedBackupCriteria) BackupCriteria() BaseBackupCriteriaImpl { + return BaseBackupCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedBackupCriteria{} @@ -32,9 +40,10 @@ func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedBackupCriteria: %+v", err) } + decoded["objectType"] = "ScheduleBasedBackupCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedtriggercontext.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedtriggercontext.go index c7f96a85c13..aee5719cd5c 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedtriggercontext.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_schedulebasedtriggercontext.go @@ -15,6 +15,14 @@ type ScheduleBasedTriggerContext struct { TaggingCriteria []TaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedTriggerContext{} @@ -28,9 +36,10 @@ func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedTriggerContext: %+v", err) } + decoded["objectType"] = "ScheduleBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_sourcelifecycle.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_sourcelifecycle.go index 7538681c1b2..0792fff629b 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_sourcelifecycle.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_sourcelifecycle.go @@ -32,7 +32,7 @@ func (s *SourceLifeCycle) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deleteAfter"]; ok { - impl, err := unmarshalDeleteOptionImplementation(v) + impl, err := UnmarshalDeleteOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeleteAfter' for 'SourceLifeCycle': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_taggingcriteria.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_taggingcriteria.go index 71c094c4d32..06458ef725e 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_taggingcriteria.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_taggingcriteria.go @@ -41,7 +41,7 @@ func (s *TaggingCriteria) UnmarshalJSON(bytes []byte) error { output := make([]BackupCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalBackupCriteriaImplementation(val) + impl, err := UnmarshalBackupCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Criteria' for 'TaggingCriteria': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_targetcopysetting.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_targetcopysetting.go index 2c3e72d496e..e59c6f70777 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_targetcopysetting.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_targetcopysetting.go @@ -30,7 +30,7 @@ func (s *TargetCopySetting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["copyAfter"]; ok { - impl, err := unmarshalCopyOptionImplementation(v) + impl, err := UnmarshalCopyOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CopyAfter' for 'TargetCopySetting': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_triggercontext.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_triggercontext.go index 866643b9b21..73252a42b95 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/model_triggercontext.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/model_triggercontext.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerContext interface { + TriggerContext() BaseTriggerContextImpl } -// RawTriggerContextImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerContext = BaseTriggerContextImpl{} + +type BaseTriggerContextImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s +} + +var _ TriggerContext = RawTriggerContextImpl{} + +// RawTriggerContextImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerContextImpl struct { - Type string - Values map[string]interface{} + triggerContext BaseTriggerContextImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s.triggerContext } -func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { +func UnmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) return out, nil } - out := RawTriggerContextImpl{ - Type: value, - Values: temp, + var parent BaseTriggerContextImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerContextImpl: %+v", err) } - return out, nil + + return RawTriggerContextImpl{ + triggerContext: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/backuppolicies/version.go b/resource-manager/dataprotection/2023-12-01/backuppolicies/version.go index 0bed51ca06d..145d3c53c50 100644 --- a/resource-manager/dataprotection/2023-12-01/backuppolicies/version.go +++ b/resource-manager/dataprotection/2023-12-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/README.md b/resource-manager/dataprotection/2023-12-01/backupvaults/README.md index 94b82c8a9a1..dde5fbe842b 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/README.md +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/client.go b/resource-manager/dataprotection/2023-12-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/client.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/backupvaults/id_backupvault.go index 037dbb924a0..8bb7503f8f1 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/id_providerlocation.go b/resource-manager/dataprotection/2023-12-01/backupvaults/id_providerlocation.go index 0a99f41369d..c133cfe7a08 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/method_checknameavailability.go b/resource-manager/dataprotection/2023-12-01/backupvaults/method_checknameavailability.go index 6e006b786d0..de967ac422d 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/method_checknameavailability.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c BackupVaultsClient) CheckNameAvailability(ctx context.Context, id Provid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/method_get.go b/resource-manager/dataprotection/2023-12-01/backupvaults/method_get.go index 5e1ed9d0258..638bcc8f8ce 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVaultResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/backupvaults/version.go b/resource-manager/dataprotection/2023-12-01/backupvaults/version.go index 032073debd5..38353f516a7 100644 --- a/resource-manager/dataprotection/2023-12-01/backupvaults/version.go +++ b/resource-manager/dataprotection/2023-12-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/README.md b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/README.md index c29678774ba..f01d8594204 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/README.md +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/deletedbackupinstances` Documentation -The `deletedbackupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `deletedbackupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/client.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/client.go index e70cb344e5d..65c723446b5 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/client.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/client.go @@ -15,7 +15,7 @@ type DeletedBackupInstancesClient struct { } func NewDeletedBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedBackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedbackupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedbackupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedBackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_backupvault.go index 6dc4dce0b7f..e53a4c55121 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_deletedbackupinstance.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_deletedbackupinstance.go index f81e2080068..570f077f942 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/id_deletedbackupinstance.go @@ -44,7 +44,7 @@ func ParseDeletedBackupInstanceID(input string) (*DeletedBackupInstanceId, error } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedBackupInstanceIDInsensitively(input string) (*DeletedBackupInst } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/method_get.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/method_get.go index 8326bd4395b..d884717c36e 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/method_get.go @@ -45,7 +45,6 @@ func (c DeletedBackupInstancesClient) Get(ctx context.Context, id DeletedBackupI var model DeletedBackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_authcredentials.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_authcredentials.go index e1f6967a3f6..0df9b7da64f 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_azureoperationalstoreparameters.go index 82c85ebf9e1..34ee2168445 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_backupdatasourceparameters.go index 61a96f79393..43c826178a4 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_baseresourceproperties.go index 395fa05201d..fa056a53fdb 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go index 8dbfe3038cd..8531c83eb0f 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasource.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasource.go index ae955b4355b..8a27dd1d309 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasourceset.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasourceset.go index 03857806dea..094ee1abfa4 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datastoreparameters.go index 0c5750816d1..422133b08f5 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_defaultresourceproperties.go index 618a75af3b9..9ac69e0ad5f 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_deletedbackupinstance.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_deletedbackupinstance.go index a1cec159406..fdfb4ccd325 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_deletedbackupinstance.go @@ -52,7 +52,7 @@ func (s *DeletedBackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'DeletedBackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 10068d31fa5..d79157220be 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_policyparameters.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_policyparameters.go index b1f479381f0..ca65ed7ce6e 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go index 61dd7ae1963..baef7fd69ef 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/version.go b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/version.go index 07446987b48..8053ebab750 100644 --- a/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/version.go +++ b/resource-manager/dataprotection/2023-12-01/deletedbackupinstances/version.go @@ -1,12 +1,10 @@ package deletedbackupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedbackupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedbackupinstances/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/README.md b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/README.md index c9e76a2b6e6..ff6b13f9588 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/README.md +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/dppfeaturesupport` Documentation -The `dppfeaturesupport` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `dppfeaturesupport` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/client.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/client.go index 05f9070486d..01ef8c69f05 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/client.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/client.go @@ -15,7 +15,7 @@ type DppFeatureSupportClient struct { } func NewDppFeatureSupportClientWithBaseURI(sdkApi sdkEnv.Api) (*DppFeatureSupportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppfeaturesupport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppfeaturesupport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppFeatureSupportClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/id_location.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/id_location.go index 4d1ff865e11..71291884078 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/id_location.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go index 5b01a004060..eae58cdc096 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go @@ -16,7 +16,7 @@ import ( type DataProtectionCheckFeatureSupportOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *FeatureValidationResponseBase + Model FeatureValidationResponseBase } // DataProtectionCheckFeatureSupport ... @@ -53,11 +53,11 @@ func (c DppFeatureSupportClient) DataProtectionCheckFeatureSupport(ctx context.C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalFeatureValidationResponseBaseImplementation(respObj) + model, err := UnmarshalFeatureValidationResponseBaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequest.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequest.go index 245619e2f34..1c4657b517a 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequest.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequest.go @@ -15,6 +15,14 @@ type FeatureValidationRequest struct { FeatureType *FeatureType `json:"featureType,omitempty"` // Fields inherited from FeatureValidationRequestBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationRequest) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return BaseFeatureValidationRequestBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationRequest{} @@ -28,9 +36,10 @@ func (s FeatureValidationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationRequest: %+v", err) } + decoded["objectType"] = "FeatureValidationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequestbase.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequestbase.go index 80efd7fd693..8e51d6587e0 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequestbase.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationrequestbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationRequestBase interface { + FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl } -// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationRequestBase = BaseFeatureValidationRequestBaseImpl{} + +type BaseFeatureValidationRequestBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s +} + +var _ FeatureValidationRequestBase = RawFeatureValidationRequestBaseImpl{} + +// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationRequestBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationRequestBase BaseFeatureValidationRequestBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s.featureValidationRequestBase } -func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { +func UnmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureV return out, nil } - out := RawFeatureValidationRequestBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationRequestBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationRequestBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationRequestBaseImpl{ + featureValidationRequestBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponse.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponse.go index cf7a0191334..05506b82ee9 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponse.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponse.go @@ -15,6 +15,14 @@ type FeatureValidationResponse struct { Features *[]SupportedFeature `json:"features,omitempty"` // Fields inherited from FeatureValidationResponseBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationResponse) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return BaseFeatureValidationResponseBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationResponse{} @@ -28,9 +36,10 @@ func (s FeatureValidationResponse) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationResponse: %+v", err) } + decoded["objectType"] = "FeatureValidationResponse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponsebase.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponsebase.go index 77514fd0908..2856f973105 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponsebase.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/model_featurevalidationresponsebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationResponseBase interface { + FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl } -// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationResponseBase = BaseFeatureValidationResponseBaseImpl{} + +type BaseFeatureValidationResponseBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s +} + +var _ FeatureValidationResponseBase = RawFeatureValidationResponseBaseImpl{} + +// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationResponseBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationResponseBase BaseFeatureValidationResponseBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s.featureValidationResponseBase } -func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { +func UnmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (Feature return out, nil } - out := RawFeatureValidationResponseBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationResponseBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationResponseBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationResponseBaseImpl{ + featureValidationResponseBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/version.go b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/version.go index c9b87742190..555fbd2739d 100644 --- a/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/version.go +++ b/resource-manager/dataprotection/2023-12-01/dppfeaturesupport/version.go @@ -1,12 +1,10 @@ package dppfeaturesupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppfeaturesupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppfeaturesupport/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/README.md b/resource-manager/dataprotection/2023-12-01/dppjob/README.md index b76a8fa36ad..1d757f8aa01 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/README.md +++ b/resource-manager/dataprotection/2023-12-01/dppjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/dppjob` Documentation -The `dppjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `dppjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/client.go b/resource-manager/dataprotection/2023-12-01/dppjob/client.go index 0d6159de0c6..d492231a2c4 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/client.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/client.go @@ -15,7 +15,7 @@ type DppJobClient struct { } func NewDppJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DppJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/id_providerlocation.go b/resource-manager/dataprotection/2023-12-01/dppjob/id_providerlocation.go index 9e8309b040d..c8443293e1d 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobget.go b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobget.go index 9635b5ff158..2e95534048b 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobget.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobget.go @@ -50,7 +50,6 @@ func (c DppJobClient) FetchCrossRegionRestoreJobGet(ctx context.Context, id Prov var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go index 48d719aa3cb..46b0baf9b3a 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -39,6 +39,7 @@ func (o FetchCrossRegionRestoreJobsListOperationOptions) ToHeaders() *client.Hea func (o FetchCrossRegionRestoreJobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-12-01/dppjob/version.go b/resource-manager/dataprotection/2023-12-01/dppjob/version.go index 3d22c9fb115..529a9721e39 100644 --- a/resource-manager/dataprotection/2023-12-01/dppjob/version.go +++ b/resource-manager/dataprotection/2023-12-01/dppjob/version.go @@ -1,12 +1,10 @@ package dppjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppjob/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/README.md b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/README.md index f005d2c3d2f..a1f1f44bdb6 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/README.md +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies` Documentation -The `dppresourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `dppresourceguardproxies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/client.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/client.go index f44efd92c08..d0374e7e5bc 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/client.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/client.go @@ -15,7 +15,7 @@ type DppResourceGuardProxiesClient struct { } func NewDppResourceGuardProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DppResourceGuardProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppResourceGuardProxiesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupresourceguardproxy.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupresourceguardproxy.go index a6f07c8cb77..eed9974ebe7 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupresourceguardproxy.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupvault.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupvault.go index e495aa166e4..f9b6a081a8f 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupvault.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go index a59d9ee6c52..f66d7644b9c 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go @@ -49,7 +49,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyCreateOrUpdate(ctx c var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyget.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyget.go index 33b05521f54..a2c7afa278b 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyget.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyget.go @@ -45,7 +45,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyGet(ctx context.Cont var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go index 1c0bbafa78a..1a88c4848f3 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go @@ -50,7 +50,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyUnlockDelete(ctx con var model UnlockDeleteResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/version.go b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/version.go index fbc3e989458..8c86a2a3510 100644 --- a/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/version.go +++ b/resource-manager/dataprotection/2023-12-01/dppresourceguardproxies/version.go @@ -1,12 +1,10 @@ package dppresourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppresourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppresourceguardproxies/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/README.md b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/README.md index cdfb489b10a..ecc60eaa55a 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/README.md +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints` Documentation -The `fetchsecondaryrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `fetchsecondaryrecoverypoints` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/client.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/client.go index 0ac726e9656..b57013621a5 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/client.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/client.go @@ -15,7 +15,7 @@ type FetchSecondaryRecoveryPointsClient struct { } func NewFetchSecondaryRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*FetchSecondaryRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FetchSecondaryRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/id_providerlocation.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/id_providerlocation.go index 72b7a004674..a720695daf7 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/id_providerlocation.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go index 26723b92a47..529ba019df0 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go index 33e554f5b79..87fc8c24a23 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go index 81815b8b85c..6cfd9ea0524 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go index b09db4ee8cd..3a953277061 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/version.go b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/version.go index 7ca160ba3cf..3fd2b046d8a 100644 --- a/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/version.go +++ b/resource-manager/dataprotection/2023-12-01/fetchsecondaryrecoverypoints/version.go @@ -1,12 +1,10 @@ package fetchsecondaryrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/README.md b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/README.md index e294a44fa26..36c804c1f55 100644 --- a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/README.md +++ b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges` Documentation -The `findrestorabletimeranges` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `findrestorabletimeranges` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/client.go b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/client.go index bfd1fda26df..d342b80d165 100644 --- a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/client.go +++ b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/client.go @@ -15,7 +15,7 @@ type FindRestorableTimeRangesClient struct { } func NewFindRestorableTimeRangesClientWithBaseURI(sdkApi sdkEnv.Api) (*FindRestorableTimeRangesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FindRestorableTimeRangesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/id_backupinstance.go b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/id_backupinstance.go index 25f53ef1e8a..0cf75c2d2df 100644 --- a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/method_restorabletimerangesfind.go b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/method_restorabletimerangesfind.go index a0c43a05b78..fab15204651 100644 --- a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/method_restorabletimerangesfind.go +++ b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/method_restorabletimerangesfind.go @@ -50,7 +50,6 @@ func (c FindRestorableTimeRangesClient) RestorableTimeRangesFind(ctx context.Con var model AzureBackupFindRestorableTimeRangesResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/version.go b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/version.go index cbbf25591ff..cd4e9b7bfe0 100644 --- a/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/version.go +++ b/resource-manager/dataprotection/2023-12-01/findrestorabletimeranges/version.go @@ -1,12 +1,10 @@ package findrestorabletimeranges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/findrestorabletimeranges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/findrestorabletimeranges/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/README.md b/resource-manager/dataprotection/2023-12-01/recoverypoint/README.md index 2ee1c0d75a9..8b78311ba91 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/README.md +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/client.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/client.go index d58f74c6c6a..3808ce1905f 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/client.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/client.go @@ -15,7 +15,7 @@ type RecoveryPointClient struct { } func NewRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/id_backupinstance.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/id_backupinstance.go index ae213017beb..3951fd7bc79 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/id_backupinstance.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/id_recoverypoint.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/id_recoverypoint.go index 8a6823eb8aa..0cf676d8e2e 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/id_recoverypoint.go @@ -46,7 +46,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/method_get.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/method_get.go index aef9f3c1f69..527ea0e9599 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointClient) Get(ctx context.Context, id RecoveryPointId) (resul var model AzureBackupRecoveryPointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/method_list.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/method_list.go index ace5d834658..8c3642589d9 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/method_list.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go index ecc3e64361c..b5e2e8ff589 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypoint.go index 384f69a0f65..8824a972a2a 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypointresource.go index 8f11d9bda9d..e7302b20ae8 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/recoverypoint/version.go b/resource-manager/dataprotection/2023-12-01/recoverypoint/version.go index f4a2d81f2bd..17953087808 100644 --- a/resource-manager/dataprotection/2023-12-01/recoverypoint/version.go +++ b/resource-manager/dataprotection/2023-12-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-12-01" } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/README.md b/resource-manager/dataprotection/2023-12-01/resourceguards/README.md index a95d2188fb2..0fceba43046 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/README.md +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2023-12-01/resourceguards` Documentation -The `resourceguards` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2023-12-01`). +The `resourceguards` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/client.go b/resource-manager/dataprotection/2023-12-01/resourceguards/client.go index 2a79980112d..0f0913402ff 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/client.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/client.go @@ -15,7 +15,7 @@ type ResourceGuardsClient struct { } func NewResourceGuardsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGuardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceguards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceguards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGuardsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteprotecteditemrequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteprotecteditemrequest.go index 797704c5a13..60a37b80109 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteresourceguardproxyrequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteresourceguardproxyrequest.go index 698fd773b09..1d6e985f86a 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -44,7 +44,7 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_disablesoftdeleterequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_disablesoftdeleterequest.go index a4a28e2d325..895f4edf5ba 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_disablesoftdeleterequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_disablesoftdeleterequest.go @@ -44,7 +44,7 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_getbackupsecuritypinrequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_getbackupsecuritypinrequest.go index 9975ae3fc13..6181e271847 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -44,7 +44,7 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_resourceguard.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_resourceguard.go index db774ade737..c6c0804b636 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_resourceguard.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_resourceguard.go @@ -42,7 +42,7 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotecteditemrequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotecteditemrequest.go index b49508843a6..41ef782ccd4 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotecteditemrequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotectionpolicyrequest.go b/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotectionpolicyrequest.go index d1a6daf9f64..bdd5ac39cd4 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_get.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_get.go index e95a3d77f1b..8c3fae9b334 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_get.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_get.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) Get(ctx context.Context, id ResourceGuardId) (resu var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go index 4638718dc46..c4c17baa63e 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go index b3a996b5514..01a918c9ed2 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go index 82604a5c9ed..94bb22e07d2 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(c var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go index e618503da42..cf1270f04a5 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go index 13158cedebe..22159bc163f 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go index ed3cb61d2f0..a2389d2fd93 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_patch.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_patch.go index 1c4cf4482c6..0f38b0517b3 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_patch.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_patch.go @@ -49,7 +49,6 @@ func (c ResourceGuardsClient) Patch(ctx context.Context, id ResourceGuardId, inp var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/method_put.go b/resource-manager/dataprotection/2023-12-01/resourceguards/method_put.go index 1f0339e6424..c71ad58adca 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/method_put.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/method_put.go @@ -50,7 +50,6 @@ func (c ResourceGuardsClient) Put(ctx context.Context, id ResourceGuardId, input var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2023-12-01/resourceguards/version.go b/resource-manager/dataprotection/2023-12-01/resourceguards/version.go index 7b92d804df6..41adc061b1d 100644 --- a/resource-manager/dataprotection/2023-12-01/resourceguards/version.go +++ b/resource-manager/dataprotection/2023-12-01/resourceguards/version.go @@ -1,12 +1,10 @@ package resourceguards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguards/2023-12-01" } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/README.md b/resource-manager/dataprotection/2024-03-01/azurebackupjob/README.md index b5f30e866bd..715d682ad98 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/README.md +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/azurebackupjob` Documentation -The `azurebackupjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `azurebackupjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/client.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/client.go index 11ba06b263b..e8e66d81c81 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/client.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/client.go @@ -15,7 +15,7 @@ type AzureBackupJobClient struct { } func NewAzureBackupJobClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupjob.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupjob.go index 1089c3fd6d4..57696bb1ffb 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupjob.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupvault.go index d0675f57728..7208d3d1aa6 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_operationid.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_operationid.go index bed20827391..b55c145002d 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_operationid.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/id_operationid.go @@ -44,7 +44,7 @@ func ParseOperationIdID(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIdIDInsensitively(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_exportjobsoperationresultget.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_exportjobsoperationresultget.go index 9f61784cc45..4df7d900a99 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_exportjobsoperationresultget.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_exportjobsoperationresultget.go @@ -46,7 +46,6 @@ func (c AzureBackupJobClient) ExportJobsOperationResultGet(ctx context.Context, var model ExportJobsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_jobsget.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_jobsget.go index d895ee2d205..ea51644c134 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_jobsget.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/method_jobsget.go @@ -45,7 +45,6 @@ func (c AzureBackupJobClient) JobsGet(ctx context.Context, id BackupJobId) (resu var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjob/version.go b/resource-manager/dataprotection/2024-03-01/azurebackupjob/version.go index 62ce3fe4d8d..23482faa008 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjob/version.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjob/version.go @@ -1,12 +1,10 @@ package azurebackupjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjob/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/README.md b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/README.md index f52df1b3919..ab4b8aa4646 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/README.md +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/azurebackupjobs` Documentation -The `azurebackupjobs` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `azurebackupjobs` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/client.go b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/client.go index 9cb5bb85556..1028ad5240a 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/client.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/client.go @@ -15,7 +15,7 @@ type AzureBackupJobsClient struct { } func NewAzureBackupJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/id_backupvault.go index 3d797b731f7..5b928cc2675 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/version.go b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/version.go index 758dd0e4c02..dbe96d9a863 100644 --- a/resource-manager/dataprotection/2024-03-01/azurebackupjobs/version.go +++ b/resource-manager/dataprotection/2024-03-01/azurebackupjobs/version.go @@ -1,12 +1,10 @@ package azurebackupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjobs/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/README.md b/resource-manager/dataprotection/2024-03-01/backupinstances/README.md index f812f3a64f0..8d9599ac806 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/README.md +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/backupinstances` Documentation -The `backupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `backupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/client.go b/resource-manager/dataprotection/2024-03-01/backupinstances/client.go index 9e37fa3fed5..d0c8a08b5f2 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/client.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/client.go @@ -15,7 +15,7 @@ type BackupInstancesClient struct { } func NewBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupinstance.go b/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupinstance.go index 9120ff5c7b9..dc9734f7a43 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupvault.go index 3e2cc254429..11f896cba11 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/id_providerlocation.go b/resource-manager/dataprotection/2024-03-01/backupinstances/id_providerlocation.go index 41446698550..b0d1d2724df 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/method_get.go b/resource-manager/dataprotection/2024-03-01/backupinstances/method_get.go index dc268db7fc1..39aa6d46c90 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/method_get.go @@ -45,7 +45,6 @@ func (c BackupInstancesClient) Get(ctx context.Context, id BackupInstanceId) (re var model BackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_authcredentials.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_authcredentials.go index 8be823b957b..b743312fc69 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go index 5809de628f0..656e15d1842 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryPointBasedRestoreRequest struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryPointBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryPointBasedRestoreRequest{} func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryPointBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryPointBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go index 17052c6294a..f5d0231ca11 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go @@ -14,12 +14,24 @@ type AzureBackupRecoveryTimeBasedRestoreRequest struct { RecoveryPointTime string `json:"recoveryPointTime"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryTimeBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryTimeBasedRestoreRequest{} func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryTimeBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -54,6 +67,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointTime = decoded.RecoveryPointTime s.SourceDataStoreType = decoded.SourceDataStoreType s.SourceResourceId = decoded.SourceResourceId @@ -64,7 +78,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryTimeBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorerequest.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorerequest.go index 3b5348e6cdf..06f550bb5e9 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorerequest.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorerequest.go @@ -10,18 +10,68 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRestoreRequest interface { + AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl } -// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRestoreRequest = BaseAzureBackupRestoreRequestImpl{} + +type BaseAzureBackupRestoreRequestImpl struct { + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` + RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s +} + +var _ AzureBackupRestoreRequest = RawAzureBackupRestoreRequestImpl{} + +// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRestoreRequestImpl struct { - Type string - Values map[string]interface{} + azureBackupRestoreRequest BaseAzureBackupRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s.azureBackupRestoreRequest } -func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { +var _ json.Unmarshaler = &BaseAzureBackupRestoreRequestImpl{} + +func (s *BaseAzureBackupRestoreRequestImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAzureBackupRestoreRequestImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) + } + + s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType + s.SourceDataStoreType = decoded.SourceDataStoreType + s.SourceResourceId = decoded.SourceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAzureBackupRestoreRequestImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["restoreTargetInfo"]; ok { + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'BaseAzureBackupRestoreRequestImpl': %+v", err) + } + s.RestoreTargetInfo = impl + } + return nil +} + +func UnmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { if input == nil { return nil, nil } @@ -60,10 +110,15 @@ func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackup return out, nil } - out := RawAzureBackupRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) } - return out, nil + + return RawAzureBackupRestoreRequestImpl{ + azureBackupRestoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go index 1e8e3e86089..ff9c2300a43 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go @@ -16,12 +16,24 @@ type AzureBackupRestoreWithRehydrationRequest struct { RehydrationRetentionDuration string `json:"rehydrationRetentionDuration"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRestoreWithRehydrationRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRestoreWithRehydrationRequest{} func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) @@ -56,6 +69,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.RehydrationPriority = decoded.RehydrationPriority s.RehydrationRetentionDuration = decoded.RehydrationRetentionDuration @@ -68,7 +82,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRestoreWithRehydrationRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azureoperationalstoreparameters.go index f7daf43fe3e..2c2c8c9086a 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupdatasourceparameters.go index 035cc0633ac..944abaf16cc 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupinstance.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupinstance.go index 73c49dd6840..96144ab3905 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_backupinstance.go @@ -50,7 +50,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_baseresourceproperties.go index fcf07932382..cc03a988b9b 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_blobbackupdatasourceparameters.go index 84f49ead22c..fc701b02154 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_crossregionrestorerequestobject.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_crossregionrestorerequestobject.go index d958127a0de..f86657b433b 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_crossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_crossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *CrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'CrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasource.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasource.go index a8e07a37117..b24319e48fd 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasourceset.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasourceset.go index 537af263c0b..63859485cb4 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datastoreparameters.go index ee57cd90fa3..f66bb93df79 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_defaultresourceproperties.go index adac6099d8b..6de216a9daa 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestorecriteria.go index 5c1b5326ced..47f3587ef24 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestorecriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ItemLevelRestoreCriteria interface { + ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl } -// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ItemLevelRestoreCriteria = BaseItemLevelRestoreCriteriaImpl{} + +type BaseItemLevelRestoreCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s +} + +var _ ItemLevelRestoreCriteria = RawItemLevelRestoreCriteriaImpl{} + +// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawItemLevelRestoreCriteriaImpl struct { - Type string - Values map[string]interface{} + itemLevelRestoreCriteria BaseItemLevelRestoreCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s.itemLevelRestoreCriteria } -func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { +func UnmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRes return out, nil } - out := RawItemLevelRestoreCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseItemLevelRestoreCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseItemLevelRestoreCriteriaImpl: %+v", err) } - return out, nil + + return RawItemLevelRestoreCriteriaImpl{ + itemLevelRestoreCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestoretargetinfo.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestoretargetinfo.go index 475d8764212..9490dd04de7 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestoretargetinfo.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itemlevelrestoretargetinfo.go @@ -17,10 +17,20 @@ type ItemLevelRestoreTargetInfo struct { RestoreCriteria []ItemLevelRestoreCriteria `json:"restoreCriteria"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s ItemLevelRestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = ItemLevelRestoreTargetInfo{} func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemLevelRestoreTargetInfo: %+v", err) } + decoded["objectType"] = "ItemLevelRestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -56,6 +67,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -65,7 +77,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'ItemLevelRestoreTargetInfo': %+v", err) } @@ -80,7 +92,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { output := make([]ItemLevelRestoreCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalItemLevelRestoreCriteriaImplementation(val) + impl, err := UnmarshalItemLevelRestoreCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RestoreCriteria' for 'ItemLevelRestoreTargetInfo': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itempathbasedrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itempathbasedrestorecriteria.go index bd6640be142..293c8227b06 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_itempathbasedrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_itempathbasedrestorecriteria.go @@ -16,6 +16,14 @@ type ItemPathBasedRestoreCriteria struct { SubItemPathPrefix *[]string `json:"subItemPathPrefix,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s ItemPathBasedRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ItemPathBasedRestoreCriteria{} @@ -29,9 +37,10 @@ func (s ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemPathBasedRestoreCriteria: %+v", err) } + decoded["objectType"] = "ItemPathBasedRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 021230e39ac..fedc5d4bc51 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterrestorecriteria.go index ab7478006ae..c39f21cf7df 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclusterrestorecriteria.go @@ -24,6 +24,14 @@ type KubernetesClusterRestoreCriteria struct { RestoreHookReferences *[]NamespacedNameResource `json:"restoreHookReferences,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterRestoreCriteria{} @@ -37,9 +45,10 @@ func (s KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go index b172d3bed60..b192cf49ac8 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go @@ -26,6 +26,14 @@ type KubernetesClusterVaultTierRestoreCriteria struct { StagingStorageAccountId *string `json:"stagingStorageAccountId,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterVaultTierRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterVaultTierRestoreCriteria{} @@ -39,9 +47,10 @@ func (s KubernetesClusterVaultTierRestoreCriteria) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterVaultTierRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterVaultTierRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetespvrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetespvrestorecriteria.go index 0f3d56cbfeb..4a0189b1de3 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetespvrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetespvrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesPVRestoreCriteria struct { StorageClassName *string `json:"storageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesPVRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesPVRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesPVRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesPVRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go index d4b08aa1e6f..a1f6748502f 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesStorageClassRestoreCriteria struct { SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesStorageClassRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesStorageClassRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesStorageClassRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesStorageClassRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationextendedinfo.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationextendedinfo.go index 53581d9a9e1..7293611199b 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationextendedinfo.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationextendedinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OperationExtendedInfo interface { + OperationExtendedInfo() BaseOperationExtendedInfoImpl } -// RawOperationExtendedInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OperationExtendedInfo = BaseOperationExtendedInfoImpl{} + +type BaseOperationExtendedInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s +} + +var _ OperationExtendedInfo = RawOperationExtendedInfoImpl{} + +// RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOperationExtendedInfoImpl struct { - Type string - Values map[string]interface{} + operationExtendedInfo BaseOperationExtendedInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s.operationExtendedInfo } -func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { +func UnmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtend return out, nil } - out := RawOperationExtendedInfoImpl{ - Type: value, - Values: temp, + var parent BaseOperationExtendedInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationExtendedInfoImpl: %+v", err) } - return out, nil + + return RawOperationExtendedInfoImpl{ + operationExtendedInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationjobextendedinfo.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationjobextendedinfo.go index 59cd3f9ddf6..c0ead370cf2 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationjobextendedinfo.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_operationjobextendedinfo.go @@ -14,6 +14,14 @@ type OperationJobExtendedInfo struct { JobId *string `json:"jobId,omitempty"` // Fields inherited from OperationExtendedInfo + + ObjectType string `json:"objectType"` +} + +func (s OperationJobExtendedInfo) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return BaseOperationExtendedInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = OperationJobExtendedInfo{} @@ -27,9 +35,10 @@ func (s OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OperationJobExtendedInfo: %+v", err) } + decoded["objectType"] = "OperationJobExtendedInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_policyparameters.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_policyparameters.go index ba00f440ca8..00ca7abb0fd 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go index c7df0c52c2b..365518530ec 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go @@ -15,6 +15,14 @@ type RangeBasedItemLevelRestoreCriteria struct { MinMatchingValue *string `json:"minMatchingValue,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s RangeBasedItemLevelRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = RangeBasedItemLevelRestoreCriteria{} @@ -28,9 +36,10 @@ func (s RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RangeBasedItemLevelRestoreCriteria: %+v", err) } + decoded["objectType"] = "RangeBasedItemLevelRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restorefilestargetinfo.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restorefilestargetinfo.go index 04fe194025c..b5cf6722012 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restorefilestargetinfo.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restorefilestargetinfo.go @@ -14,10 +14,20 @@ type RestoreFilesTargetInfo struct { TargetDetails TargetDetails `json:"targetDetails"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreFilesTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreFilesTargetInfo{} func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreFilesTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreFilesTargetInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfo.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfo.go index 23f512f2c31..b1a8ea521b8 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfo.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfo.go @@ -16,10 +16,20 @@ type RestoreTargetInfo struct { DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreTargetInfo{} func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -64,7 +76,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'RestoreTargetInfo': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfobase.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfobase.go index ce31702dc78..f4f60833a9c 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfobase.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_restoretargetinfobase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreTargetInfoBase interface { + RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl } -// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreTargetInfoBase = BaseRestoreTargetInfoBaseImpl{} + +type BaseRestoreTargetInfoBaseImpl struct { + ObjectType string `json:"objectType"` + RecoveryOption RecoveryOption `json:"recoveryOption"` + RestoreLocation *string `json:"restoreLocation,omitempty"` +} + +func (s BaseRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s +} + +var _ RestoreTargetInfoBase = RawRestoreTargetInfoBaseImpl{} + +// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreTargetInfoBaseImpl struct { - Type string - Values map[string]interface{} + restoreTargetInfoBase BaseRestoreTargetInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s.restoreTargetInfoBase } -func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { +func UnmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetIn return out, nil } - out := RawRestoreTargetInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseRestoreTargetInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreTargetInfoBaseImpl: %+v", err) } - return out, nil + + return RawRestoreTargetInfoBaseImpl{ + restoreTargetInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_secretstorebasedauthcredentials.go index 76f2af98598..859bcef3249 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_validatecrossregionrestorerequestobject.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_validatecrossregionrestorerequestobject.go index 64c70ca0be3..06b9dc2dda9 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_validatecrossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_validatecrossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *ValidateCrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) er } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateCrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/model_validaterestorerequestobject.go b/resource-manager/dataprotection/2024-03-01/backupinstances/model_validaterestorerequestobject.go index e59fe83da41..fcef764da4b 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/model_validaterestorerequestobject.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/model_validaterestorerequestobject.go @@ -22,7 +22,7 @@ func (s *ValidateRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupinstances/version.go b/resource-manager/dataprotection/2024-03-01/backupinstances/version.go index 9475588e657..85ccb236671 100644 --- a/resource-manager/dataprotection/2024-03-01/backupinstances/version.go +++ b/resource-manager/dataprotection/2024-03-01/backupinstances/version.go @@ -1,12 +1,10 @@ package backupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstances/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/README.md b/resource-manager/dataprotection/2024-03-01/backuppolicies/README.md index 5c5a1a1f4da..d25ffd33c1e 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/README.md +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/client.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/client.go index 7867fb217cc..a888bef7263 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/client.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/client.go @@ -15,7 +15,7 @@ type BackupPoliciesClient struct { } func NewBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPoliciesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backuppolicy.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backuppolicy.go index 567587f55bd..be6e8b11b7c 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backuppolicy.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backupvault.go index 630fbdb1a15..b844c8ed70f 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/method_createorupdate.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/method_createorupdate.go index fbea2f083fb..04342e7a5d0 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/method_createorupdate.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BackupPoliciesClient) CreateOrUpdate(ctx context.Context, id BackupPolic var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/method_get.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/method_get.go index 2275adb94b5..1dbecf80051 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/method_get.go @@ -45,7 +45,6 @@ func (c BackupPoliciesClient) Get(ctx context.Context, id BackupPolicyId) (resul var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_absolutedeleteoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_absolutedeleteoption.go index a9aaf47dcb7..fe6ce6d3432 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_absolutedeleteoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_absolutedeleteoption.go @@ -13,7 +13,16 @@ var _ DeleteOption = AbsoluteDeleteOption{} type AbsoluteDeleteOption struct { // Fields inherited from DeleteOption - Duration string `json:"duration"` + + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s AbsoluteDeleteOption) DeleteOption() BaseDeleteOptionImpl { + return BaseDeleteOptionImpl{ + Duration: s.Duration, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AbsoluteDeleteOption{} @@ -27,9 +36,10 @@ func (s AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteDeleteOption: %+v", err) } + decoded["objectType"] = "AbsoluteDeleteOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_adhocbasedtriggercontext.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_adhocbasedtriggercontext.go index 5505a40b8a6..30cb106ddf1 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_adhocbasedtriggercontext.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_adhocbasedtriggercontext.go @@ -14,6 +14,14 @@ type AdhocBasedTriggerContext struct { TaggingCriteria AdhocBasedTaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s AdhocBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AdhocBasedTriggerContext{} @@ -27,9 +35,10 @@ func (s AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdhocBasedTriggerContext: %+v", err) } + decoded["objectType"] = "AdhocBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackupparams.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackupparams.go index 024401c3d86..6b98b1df1f3 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackupparams.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackupparams.go @@ -14,6 +14,14 @@ type AzureBackupParams struct { BackupType string `json:"backupType"` // Fields inherited from BackupParameters + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupParams) BackupParameters() BaseBackupParametersImpl { + return BaseBackupParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupParams{} @@ -27,9 +35,10 @@ func (s AzureBackupParams) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupParams: %+v", err) } + decoded["objectType"] = "AzureBackupParams" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackuprule.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackuprule.go index 884536bf720..a06a9d21176 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackuprule.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azurebackuprule.go @@ -16,7 +16,16 @@ type AzureBackupRule struct { Trigger TriggerContext `json:"trigger"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureBackupRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupRule{} @@ -30,9 +39,10 @@ func (s AzureBackupRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRule: %+v", err) } + decoded["objectType"] = "AzureBackupRule" encoded, err = json.Marshal(decoded) @@ -54,6 +64,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { s.DataStore = decoded.DataStore s.Name = decoded.Name + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -61,7 +72,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupParameters"]; ok { - impl, err := unmarshalBackupParametersImplementation(v) + impl, err := UnmarshalBackupParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupParameters' for 'AzureBackupRule': %+v", err) } @@ -69,7 +80,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerContextImplementation(v) + impl, err := UnmarshalTriggerContextImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'AzureBackupRule': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azureretentionrule.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azureretentionrule.go index 1362ef8628d..f6c4c671bcc 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azureretentionrule.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_azureretentionrule.go @@ -15,7 +15,16 @@ type AzureRetentionRule struct { Lifecycles []SourceLifeCycle `json:"lifecycles"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureRetentionRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureRetentionRule{} @@ -29,9 +38,10 @@ func (s AzureRetentionRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRetentionRule: %+v", err) } + decoded["objectType"] = "AzureRetentionRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupcriteria.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupcriteria.go index ae5e3acf7f9..1d4eda9f3ce 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupcriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupCriteria interface { + BackupCriteria() BaseBackupCriteriaImpl } -// RawBackupCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupCriteria = BaseBackupCriteriaImpl{} + +type BaseBackupCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s +} + +var _ BackupCriteria = RawBackupCriteriaImpl{} + +// RawBackupCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupCriteriaImpl struct { - Type string - Values map[string]interface{} + backupCriteria BaseBackupCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s.backupCriteria } -func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { +func UnmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) return out, nil } - out := RawBackupCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseBackupCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupCriteriaImpl: %+v", err) } - return out, nil + + return RawBackupCriteriaImpl{ + backupCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupparameters.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupparameters.go index 2cd46e5bbe7..9df43d72eeb 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupparameters.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backupparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupParameters interface { + BackupParameters() BaseBackupParametersImpl } -// RawBackupParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupParameters = BaseBackupParametersImpl{} + +type BaseBackupParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s +} + +var _ BackupParameters = RawBackupParametersImpl{} + +// RawBackupParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupParametersImpl struct { - Type string - Values map[string]interface{} + backupParameters BaseBackupParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s.backupParameters } -func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { +func UnmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, er return out, nil } - out := RawBackupParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupParametersImpl: %+v", err) } - return out, nil + + return RawBackupParametersImpl{ + backupParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backuppolicy.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backuppolicy.go index 5b770c9a733..861df204488 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backuppolicy.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_backuppolicy.go @@ -14,7 +14,16 @@ type BackupPolicy struct { PolicyRules []BasePolicyRule `json:"policyRules"` // Fields inherited from BaseBackupPolicy + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BackupPolicy) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return BaseBaseBackupPolicyImpl{ + DatasourceTypes: s.DatasourceTypes, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BackupPolicy{} @@ -28,9 +37,10 @@ func (s BackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BackupPolicy: %+v", err) } + decoded["objectType"] = "BackupPolicy" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { } s.DatasourceTypes = decoded.DatasourceTypes + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { output := make([]BasePolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalBasePolicyRuleImplementation(val) + impl, err := UnmarshalBasePolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PolicyRules' for 'BackupPolicy': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicy.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicy.go index 5da7096ec0c..67380424475 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicy.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseBackupPolicy interface { + BaseBackupPolicy() BaseBaseBackupPolicyImpl } -// RawBaseBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseBackupPolicy = BaseBaseBackupPolicyImpl{} + +type BaseBaseBackupPolicyImpl struct { + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BaseBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s +} + +var _ BaseBackupPolicy = RawBaseBackupPolicyImpl{} + +// RawBaseBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseBackupPolicyImpl struct { - Type string - Values map[string]interface{} + baseBackupPolicy BaseBaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s.baseBackupPolicy } -func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { +func UnmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, er return out, nil } - out := RawBaseBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBaseBackupPolicyImpl{ + baseBackupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicyresource.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicyresource.go index dbc62cc6103..1fc0de8ac07 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicyresource.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basebackuppolicyresource.go @@ -38,7 +38,7 @@ func (s *BaseBackupPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBaseBackupPolicyImplementation(v) + impl, err := UnmarshalBaseBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BaseBackupPolicyResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basepolicyrule.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basepolicyrule.go index 2434dc31521..b1610388497 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basepolicyrule.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_basepolicyrule.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BasePolicyRule interface { + BasePolicyRule() BaseBasePolicyRuleImpl } -// RawBasePolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BasePolicyRule = BaseBasePolicyRuleImpl{} + +type BaseBasePolicyRuleImpl struct { + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s BaseBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s +} + +var _ BasePolicyRule = RawBasePolicyRuleImpl{} + +// RawBasePolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBasePolicyRuleImpl struct { - Type string - Values map[string]interface{} + basePolicyRule BaseBasePolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s.basePolicyRule } -func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { +func UnmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) return out, nil } - out := RawBasePolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseBasePolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBasePolicyRuleImpl: %+v", err) } - return out, nil + + return RawBasePolicyRuleImpl{ + basePolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyonexpiryoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyonexpiryoption.go index 38c92a43d50..de3ff29737c 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyonexpiryoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyonexpiryoption.go @@ -13,6 +13,14 @@ var _ CopyOption = CopyOnExpiryOption{} type CopyOnExpiryOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CopyOnExpiryOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CopyOnExpiryOption{} @@ -26,9 +34,10 @@ func (s CopyOnExpiryOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyOnExpiryOption: %+v", err) } + decoded["objectType"] = "CopyOnExpiryOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyoption.go index 8015dcb6bfd..9fba9c2df88 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_copyoption.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyOption interface { + CopyOption() BaseCopyOptionImpl } -// RawCopyOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyOption = BaseCopyOptionImpl{} + +type BaseCopyOptionImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s +} + +var _ CopyOption = RawCopyOptionImpl{} + +// RawCopyOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyOptionImpl struct { - Type string - Values map[string]interface{} + copyOption BaseCopyOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s.copyOption } -func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { +func UnmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { return out, nil } - out := RawCopyOptionImpl{ - Type: value, - Values: temp, + var parent BaseCopyOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyOptionImpl: %+v", err) } - return out, nil + + return RawCopyOptionImpl{ + copyOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_customcopyoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_customcopyoption.go index f450054e89a..e23a6200cb3 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_customcopyoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_customcopyoption.go @@ -14,6 +14,14 @@ type CustomCopyOption struct { Duration *string `json:"duration,omitempty"` // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CustomCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CustomCopyOption{} @@ -27,9 +35,10 @@ func (s CustomCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomCopyOption: %+v", err) } + decoded["objectType"] = "CustomCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_deleteoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_deleteoption.go index d8ac5dc7882..35a8b3c0fe0 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_deleteoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_deleteoption.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeleteOption interface { + DeleteOption() BaseDeleteOptionImpl } -// RawDeleteOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeleteOption = BaseDeleteOptionImpl{} + +type BaseDeleteOptionImpl struct { + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s BaseDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s +} + +var _ DeleteOption = RawDeleteOptionImpl{} + +// RawDeleteOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeleteOptionImpl struct { - Type string - Values map[string]interface{} + deleteOption BaseDeleteOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s.deleteOption } -func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { +func UnmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { return out, nil } - out := RawDeleteOptionImpl{ - Type: value, - Values: temp, + var parent BaseDeleteOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeleteOptionImpl: %+v", err) } - return out, nil + + return RawDeleteOptionImpl{ + deleteOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_immediatecopyoption.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_immediatecopyoption.go index a8e54686cc9..8be58faec52 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_immediatecopyoption.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_immediatecopyoption.go @@ -13,6 +13,14 @@ var _ CopyOption = ImmediateCopyOption{} type ImmediateCopyOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s ImmediateCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ImmediateCopyOption{} @@ -26,9 +34,10 @@ func (s ImmediateCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImmediateCopyOption: %+v", err) } + decoded["objectType"] = "ImmediateCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedbackupcriteria.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedbackupcriteria.go index 6e2c614f630..69188ba4962 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedbackupcriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedbackupcriteria.go @@ -19,6 +19,14 @@ type ScheduleBasedBackupCriteria struct { WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` // Fields inherited from BackupCriteria + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedBackupCriteria) BackupCriteria() BaseBackupCriteriaImpl { + return BaseBackupCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedBackupCriteria{} @@ -32,9 +40,10 @@ func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedBackupCriteria: %+v", err) } + decoded["objectType"] = "ScheduleBasedBackupCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedtriggercontext.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedtriggercontext.go index c7f96a85c13..aee5719cd5c 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedtriggercontext.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_schedulebasedtriggercontext.go @@ -15,6 +15,14 @@ type ScheduleBasedTriggerContext struct { TaggingCriteria []TaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedTriggerContext{} @@ -28,9 +36,10 @@ func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedTriggerContext: %+v", err) } + decoded["objectType"] = "ScheduleBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_sourcelifecycle.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_sourcelifecycle.go index 7538681c1b2..0792fff629b 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_sourcelifecycle.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_sourcelifecycle.go @@ -32,7 +32,7 @@ func (s *SourceLifeCycle) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deleteAfter"]; ok { - impl, err := unmarshalDeleteOptionImplementation(v) + impl, err := UnmarshalDeleteOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeleteAfter' for 'SourceLifeCycle': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_taggingcriteria.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_taggingcriteria.go index 71c094c4d32..06458ef725e 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_taggingcriteria.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_taggingcriteria.go @@ -41,7 +41,7 @@ func (s *TaggingCriteria) UnmarshalJSON(bytes []byte) error { output := make([]BackupCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalBackupCriteriaImplementation(val) + impl, err := UnmarshalBackupCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Criteria' for 'TaggingCriteria': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_targetcopysetting.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_targetcopysetting.go index 2c3e72d496e..e59c6f70777 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_targetcopysetting.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_targetcopysetting.go @@ -30,7 +30,7 @@ func (s *TargetCopySetting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["copyAfter"]; ok { - impl, err := unmarshalCopyOptionImplementation(v) + impl, err := UnmarshalCopyOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CopyAfter' for 'TargetCopySetting': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_triggercontext.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_triggercontext.go index 866643b9b21..73252a42b95 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/model_triggercontext.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/model_triggercontext.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerContext interface { + TriggerContext() BaseTriggerContextImpl } -// RawTriggerContextImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerContext = BaseTriggerContextImpl{} + +type BaseTriggerContextImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s +} + +var _ TriggerContext = RawTriggerContextImpl{} + +// RawTriggerContextImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerContextImpl struct { - Type string - Values map[string]interface{} + triggerContext BaseTriggerContextImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s.triggerContext } -func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { +func UnmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) return out, nil } - out := RawTriggerContextImpl{ - Type: value, - Values: temp, + var parent BaseTriggerContextImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerContextImpl: %+v", err) } - return out, nil + + return RawTriggerContextImpl{ + triggerContext: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/backuppolicies/version.go b/resource-manager/dataprotection/2024-03-01/backuppolicies/version.go index 3fe0dacd8f8..3e42a30b715 100644 --- a/resource-manager/dataprotection/2024-03-01/backuppolicies/version.go +++ b/resource-manager/dataprotection/2024-03-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/README.md b/resource-manager/dataprotection/2024-03-01/backupvaults/README.md index 88cfd6091b0..48f5024597b 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/README.md +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/client.go b/resource-manager/dataprotection/2024-03-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/client.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/backupvaults/id_backupvault.go index 037dbb924a0..8bb7503f8f1 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/id_providerlocation.go b/resource-manager/dataprotection/2024-03-01/backupvaults/id_providerlocation.go index 0a99f41369d..c133cfe7a08 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/method_checknameavailability.go b/resource-manager/dataprotection/2024-03-01/backupvaults/method_checknameavailability.go index 6e006b786d0..de967ac422d 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/method_checknameavailability.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c BackupVaultsClient) CheckNameAvailability(ctx context.Context, id Provid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/method_get.go b/resource-manager/dataprotection/2024-03-01/backupvaults/method_get.go index 5e1ed9d0258..638bcc8f8ce 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVaultResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/backupvaults/version.go b/resource-manager/dataprotection/2024-03-01/backupvaults/version.go index 029ef1334e2..692bfdc1257 100644 --- a/resource-manager/dataprotection/2024-03-01/backupvaults/version.go +++ b/resource-manager/dataprotection/2024-03-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/README.md b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/README.md index cf33f6be332..c92ee03dc4e 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/README.md +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/deletedbackupinstances` Documentation -The `deletedbackupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `deletedbackupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/client.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/client.go index e70cb344e5d..65c723446b5 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/client.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/client.go @@ -15,7 +15,7 @@ type DeletedBackupInstancesClient struct { } func NewDeletedBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedBackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedbackupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedbackupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedBackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_backupvault.go index 6dc4dce0b7f..e53a4c55121 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_deletedbackupinstance.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_deletedbackupinstance.go index f81e2080068..570f077f942 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/id_deletedbackupinstance.go @@ -44,7 +44,7 @@ func ParseDeletedBackupInstanceID(input string) (*DeletedBackupInstanceId, error } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedBackupInstanceIDInsensitively(input string) (*DeletedBackupInst } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/method_get.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/method_get.go index 8326bd4395b..d884717c36e 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/method_get.go @@ -45,7 +45,6 @@ func (c DeletedBackupInstancesClient) Get(ctx context.Context, id DeletedBackupI var model DeletedBackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_authcredentials.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_authcredentials.go index e1f6967a3f6..0df9b7da64f 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_azureoperationalstoreparameters.go index 82c85ebf9e1..34ee2168445 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_backupdatasourceparameters.go index 61a96f79393..43c826178a4 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_baseresourceproperties.go index 395fa05201d..fa056a53fdb 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go index 8dbfe3038cd..8531c83eb0f 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasource.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasource.go index ae955b4355b..8a27dd1d309 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasourceset.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasourceset.go index 03857806dea..094ee1abfa4 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datastoreparameters.go index 0c5750816d1..422133b08f5 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_defaultresourceproperties.go index 618a75af3b9..9ac69e0ad5f 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_deletedbackupinstance.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_deletedbackupinstance.go index a1cec159406..fdfb4ccd325 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_deletedbackupinstance.go @@ -52,7 +52,7 @@ func (s *DeletedBackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'DeletedBackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 10068d31fa5..d79157220be 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_policyparameters.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_policyparameters.go index b1f479381f0..ca65ed7ce6e 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go index 61dd7ae1963..baef7fd69ef 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/version.go b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/version.go index f3d349fd7fa..9e6421649a8 100644 --- a/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/version.go +++ b/resource-manager/dataprotection/2024-03-01/deletedbackupinstances/version.go @@ -1,12 +1,10 @@ package deletedbackupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedbackupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedbackupinstances/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/README.md b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/README.md index c0e35489fba..e3411e7cc4f 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/README.md +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/dppfeaturesupport` Documentation -The `dppfeaturesupport` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `dppfeaturesupport` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/client.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/client.go index 05f9070486d..01ef8c69f05 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/client.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/client.go @@ -15,7 +15,7 @@ type DppFeatureSupportClient struct { } func NewDppFeatureSupportClientWithBaseURI(sdkApi sdkEnv.Api) (*DppFeatureSupportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppfeaturesupport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppfeaturesupport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppFeatureSupportClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/id_location.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/id_location.go index 4d1ff865e11..71291884078 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/id_location.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go index 5b01a004060..eae58cdc096 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go @@ -16,7 +16,7 @@ import ( type DataProtectionCheckFeatureSupportOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *FeatureValidationResponseBase + Model FeatureValidationResponseBase } // DataProtectionCheckFeatureSupport ... @@ -53,11 +53,11 @@ func (c DppFeatureSupportClient) DataProtectionCheckFeatureSupport(ctx context.C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalFeatureValidationResponseBaseImplementation(respObj) + model, err := UnmarshalFeatureValidationResponseBaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequest.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequest.go index 245619e2f34..1c4657b517a 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequest.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequest.go @@ -15,6 +15,14 @@ type FeatureValidationRequest struct { FeatureType *FeatureType `json:"featureType,omitempty"` // Fields inherited from FeatureValidationRequestBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationRequest) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return BaseFeatureValidationRequestBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationRequest{} @@ -28,9 +36,10 @@ func (s FeatureValidationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationRequest: %+v", err) } + decoded["objectType"] = "FeatureValidationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequestbase.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequestbase.go index 80efd7fd693..8e51d6587e0 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequestbase.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationrequestbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationRequestBase interface { + FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl } -// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationRequestBase = BaseFeatureValidationRequestBaseImpl{} + +type BaseFeatureValidationRequestBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s +} + +var _ FeatureValidationRequestBase = RawFeatureValidationRequestBaseImpl{} + +// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationRequestBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationRequestBase BaseFeatureValidationRequestBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s.featureValidationRequestBase } -func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { +func UnmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureV return out, nil } - out := RawFeatureValidationRequestBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationRequestBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationRequestBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationRequestBaseImpl{ + featureValidationRequestBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponse.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponse.go index cf7a0191334..05506b82ee9 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponse.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponse.go @@ -15,6 +15,14 @@ type FeatureValidationResponse struct { Features *[]SupportedFeature `json:"features,omitempty"` // Fields inherited from FeatureValidationResponseBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationResponse) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return BaseFeatureValidationResponseBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationResponse{} @@ -28,9 +36,10 @@ func (s FeatureValidationResponse) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationResponse: %+v", err) } + decoded["objectType"] = "FeatureValidationResponse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponsebase.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponsebase.go index 77514fd0908..2856f973105 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponsebase.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/model_featurevalidationresponsebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationResponseBase interface { + FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl } -// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationResponseBase = BaseFeatureValidationResponseBaseImpl{} + +type BaseFeatureValidationResponseBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s +} + +var _ FeatureValidationResponseBase = RawFeatureValidationResponseBaseImpl{} + +// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationResponseBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationResponseBase BaseFeatureValidationResponseBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s.featureValidationResponseBase } -func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { +func UnmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (Feature return out, nil } - out := RawFeatureValidationResponseBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationResponseBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationResponseBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationResponseBaseImpl{ + featureValidationResponseBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/version.go b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/version.go index f5f217d8356..6221d5433c7 100644 --- a/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/version.go +++ b/resource-manager/dataprotection/2024-03-01/dppfeaturesupport/version.go @@ -1,12 +1,10 @@ package dppfeaturesupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppfeaturesupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppfeaturesupport/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/README.md b/resource-manager/dataprotection/2024-03-01/dppjob/README.md index e76fd0e1657..d58e6cc25d5 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/README.md +++ b/resource-manager/dataprotection/2024-03-01/dppjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/dppjob` Documentation -The `dppjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `dppjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/client.go b/resource-manager/dataprotection/2024-03-01/dppjob/client.go index 0d6159de0c6..d492231a2c4 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/client.go +++ b/resource-manager/dataprotection/2024-03-01/dppjob/client.go @@ -15,7 +15,7 @@ type DppJobClient struct { } func NewDppJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DppJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/id_providerlocation.go b/resource-manager/dataprotection/2024-03-01/dppjob/id_providerlocation.go index 9e8309b040d..c8443293e1d 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-03-01/dppjob/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobget.go b/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobget.go index 9635b5ff158..2e95534048b 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobget.go +++ b/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobget.go @@ -50,7 +50,6 @@ func (c DppJobClient) FetchCrossRegionRestoreJobGet(ctx context.Context, id Prov var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobslist.go index 48d719aa3cb..46b0baf9b3a 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2024-03-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -39,6 +39,7 @@ func (o FetchCrossRegionRestoreJobsListOperationOptions) ToHeaders() *client.Hea func (o FetchCrossRegionRestoreJobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-03-01/dppjob/version.go b/resource-manager/dataprotection/2024-03-01/dppjob/version.go index 0ddf2554c90..d3065f34bca 100644 --- a/resource-manager/dataprotection/2024-03-01/dppjob/version.go +++ b/resource-manager/dataprotection/2024-03-01/dppjob/version.go @@ -1,12 +1,10 @@ package dppjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppjob/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/README.md b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/README.md index d440e1aedcf..f7f98c83db4 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/README.md +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies` Documentation -The `dppresourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `dppresourceguardproxies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/client.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/client.go index f44efd92c08..d0374e7e5bc 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/client.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/client.go @@ -15,7 +15,7 @@ type DppResourceGuardProxiesClient struct { } func NewDppResourceGuardProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DppResourceGuardProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppResourceGuardProxiesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupresourceguardproxy.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupresourceguardproxy.go index a6f07c8cb77..eed9974ebe7 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupresourceguardproxy.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupvault.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupvault.go index e495aa166e4..f9b6a081a8f 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupvault.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go index a59d9ee6c52..f66d7644b9c 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go @@ -49,7 +49,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyCreateOrUpdate(ctx c var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyget.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyget.go index 33b05521f54..a2c7afa278b 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyget.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyget.go @@ -45,7 +45,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyGet(ctx context.Cont var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go index 1c0bbafa78a..1a88c4848f3 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go @@ -50,7 +50,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyUnlockDelete(ctx con var model UnlockDeleteResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/version.go b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/version.go index 68b47ce5a34..ee5ce06eb52 100644 --- a/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/version.go +++ b/resource-manager/dataprotection/2024-03-01/dppresourceguardproxies/version.go @@ -1,12 +1,10 @@ package dppresourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppresourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppresourceguardproxies/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/README.md b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/README.md index 957544d30de..1fd3e381b8c 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/README.md +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints` Documentation -The `fetchsecondaryrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `fetchsecondaryrecoverypoints` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/client.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/client.go index 0ac726e9656..b57013621a5 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/client.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/client.go @@ -15,7 +15,7 @@ type FetchSecondaryRecoveryPointsClient struct { } func NewFetchSecondaryRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*FetchSecondaryRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FetchSecondaryRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/id_providerlocation.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/id_providerlocation.go index 72b7a004674..a720695daf7 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/method_list.go index 26723b92a47..529ba019df0 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go index 33e554f5b79..87fc8c24a23 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go index 81815b8b85c..6cfd9ea0524 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go index b09db4ee8cd..3a953277061 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/version.go b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/version.go index 1af0243c903..00e00bb2b17 100644 --- a/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/version.go +++ b/resource-manager/dataprotection/2024-03-01/fetchsecondaryrecoverypoints/version.go @@ -1,12 +1,10 @@ package fetchsecondaryrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/README.md b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/README.md index 6aecd8602a5..7a109270973 100644 --- a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/README.md +++ b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges` Documentation -The `findrestorabletimeranges` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `findrestorabletimeranges` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/client.go b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/client.go index bfd1fda26df..d342b80d165 100644 --- a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/client.go +++ b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/client.go @@ -15,7 +15,7 @@ type FindRestorableTimeRangesClient struct { } func NewFindRestorableTimeRangesClientWithBaseURI(sdkApi sdkEnv.Api) (*FindRestorableTimeRangesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FindRestorableTimeRangesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/id_backupinstance.go b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/id_backupinstance.go index 25f53ef1e8a..0cf75c2d2df 100644 --- a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/method_restorabletimerangesfind.go b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/method_restorabletimerangesfind.go index a0c43a05b78..fab15204651 100644 --- a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/method_restorabletimerangesfind.go +++ b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/method_restorabletimerangesfind.go @@ -50,7 +50,6 @@ func (c FindRestorableTimeRangesClient) RestorableTimeRangesFind(ctx context.Con var model AzureBackupFindRestorableTimeRangesResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/version.go b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/version.go index a84db11db4d..717bd5be73e 100644 --- a/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/version.go +++ b/resource-manager/dataprotection/2024-03-01/findrestorabletimeranges/version.go @@ -1,12 +1,10 @@ package findrestorabletimeranges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/findrestorabletimeranges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/findrestorabletimeranges/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/README.md b/resource-manager/dataprotection/2024-03-01/recoverypoint/README.md index 87b82de7934..6b597222b76 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/README.md +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/client.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/client.go index d58f74c6c6a..3808ce1905f 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/client.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/client.go @@ -15,7 +15,7 @@ type RecoveryPointClient struct { } func NewRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/id_backupinstance.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/id_backupinstance.go index ae213017beb..3951fd7bc79 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/id_recoverypoint.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/id_recoverypoint.go index 8a6823eb8aa..0cf676d8e2e 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/id_recoverypoint.go @@ -46,7 +46,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/method_get.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/method_get.go index aef9f3c1f69..527ea0e9599 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointClient) Get(ctx context.Context, id RecoveryPointId) (resul var model AzureBackupRecoveryPointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/method_list.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/method_list.go index ace5d834658..8c3642589d9 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/method_list.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go index ecc3e64361c..b5e2e8ff589 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypoint.go index 384f69a0f65..8824a972a2a 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypointresource.go index 8f11d9bda9d..e7302b20ae8 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/recoverypoint/version.go b/resource-manager/dataprotection/2024-03-01/recoverypoint/version.go index 2c92ccd47f5..f6a6290534e 100644 --- a/resource-manager/dataprotection/2024-03-01/recoverypoint/version.go +++ b/resource-manager/dataprotection/2024-03-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/README.md b/resource-manager/dataprotection/2024-03-01/resourceguards/README.md index 9f6da931b7d..ec8efe9870d 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/README.md +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-03-01/resourceguards` Documentation -The `resourceguards` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-03-01`). +The `resourceguards` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/client.go b/resource-manager/dataprotection/2024-03-01/resourceguards/client.go index 2a79980112d..0f0913402ff 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/client.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/client.go @@ -15,7 +15,7 @@ type ResourceGuardsClient struct { } func NewResourceGuardsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGuardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceguards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceguards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGuardsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteprotecteditemrequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteprotecteditemrequest.go index 797704c5a13..60a37b80109 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteresourceguardproxyrequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteresourceguardproxyrequest.go index 698fd773b09..1d6e985f86a 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -44,7 +44,7 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_disablesoftdeleterequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_disablesoftdeleterequest.go index a4a28e2d325..895f4edf5ba 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_disablesoftdeleterequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_disablesoftdeleterequest.go @@ -44,7 +44,7 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_getbackupsecuritypinrequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_getbackupsecuritypinrequest.go index 9975ae3fc13..6181e271847 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -44,7 +44,7 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_resourceguard.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_resourceguard.go index db774ade737..c6c0804b636 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_resourceguard.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_resourceguard.go @@ -42,7 +42,7 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotecteditemrequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotecteditemrequest.go index b49508843a6..41ef782ccd4 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotecteditemrequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotectionpolicyrequest.go b/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotectionpolicyrequest.go index d1a6daf9f64..bdd5ac39cd4 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_get.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_get.go index e95a3d77f1b..8c3fae9b334 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_get.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_get.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) Get(ctx context.Context, id ResourceGuardId) (resu var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go index 4638718dc46..c4c17baa63e 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go index b3a996b5514..01a918c9ed2 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go index 82604a5c9ed..94bb22e07d2 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(c var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go index e618503da42..cf1270f04a5 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go index 13158cedebe..22159bc163f 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go index ed3cb61d2f0..a2389d2fd93 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_patch.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_patch.go index 1c4cf4482c6..0f38b0517b3 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_patch.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_patch.go @@ -49,7 +49,6 @@ func (c ResourceGuardsClient) Patch(ctx context.Context, id ResourceGuardId, inp var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/method_put.go b/resource-manager/dataprotection/2024-03-01/resourceguards/method_put.go index 1f0339e6424..c71ad58adca 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/method_put.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/method_put.go @@ -50,7 +50,6 @@ func (c ResourceGuardsClient) Put(ctx context.Context, id ResourceGuardId, input var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-03-01/resourceguards/version.go b/resource-manager/dataprotection/2024-03-01/resourceguards/version.go index cc91b9e760d..eabbc0b5b62 100644 --- a/resource-manager/dataprotection/2024-03-01/resourceguards/version.go +++ b/resource-manager/dataprotection/2024-03-01/resourceguards/version.go @@ -1,12 +1,10 @@ package resourceguards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguards/2024-03-01" } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/README.md b/resource-manager/dataprotection/2024-04-01/azurebackupjob/README.md index 4c8f6f8f127..055dc0cfa09 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/README.md +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/azurebackupjob` Documentation -The `azurebackupjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `azurebackupjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/client.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/client.go index 11ba06b263b..e8e66d81c81 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/client.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/client.go @@ -15,7 +15,7 @@ type AzureBackupJobClient struct { } func NewAzureBackupJobClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupjob.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupjob.go index 1089c3fd6d4..57696bb1ffb 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupjob.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupvault.go index d0675f57728..7208d3d1aa6 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_operationid.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_operationid.go index bed20827391..b55c145002d 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_operationid.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/id_operationid.go @@ -44,7 +44,7 @@ func ParseOperationIdID(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIdIDInsensitively(input string) (*OperationIdId, error) { } id := OperationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_exportjobsoperationresultget.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_exportjobsoperationresultget.go index 9f61784cc45..4df7d900a99 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_exportjobsoperationresultget.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_exportjobsoperationresultget.go @@ -46,7 +46,6 @@ func (c AzureBackupJobClient) ExportJobsOperationResultGet(ctx context.Context, var model ExportJobsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_jobsget.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_jobsget.go index d895ee2d205..ea51644c134 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_jobsget.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/method_jobsget.go @@ -45,7 +45,6 @@ func (c AzureBackupJobClient) JobsGet(ctx context.Context, id BackupJobId) (resu var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjob/version.go b/resource-manager/dataprotection/2024-04-01/azurebackupjob/version.go index 755d4df5bdb..6b96303ae67 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjob/version.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjob/version.go @@ -1,12 +1,10 @@ package azurebackupjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjob/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/README.md b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/README.md index b4b8013b214..710462a7554 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/README.md +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/azurebackupjobs` Documentation -The `azurebackupjobs` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `azurebackupjobs` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/client.go b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/client.go index 9cb5bb85556..1028ad5240a 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/client.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/client.go @@ -15,7 +15,7 @@ type AzureBackupJobsClient struct { } func NewAzureBackupJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureBackupJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurebackupjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurebackupjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureBackupJobsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/id_backupvault.go index 3d797b731f7..5b928cc2675 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/version.go b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/version.go index 382479f7221..da829cb83f7 100644 --- a/resource-manager/dataprotection/2024-04-01/azurebackupjobs/version.go +++ b/resource-manager/dataprotection/2024-04-01/azurebackupjobs/version.go @@ -1,12 +1,10 @@ package azurebackupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurebackupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurebackupjobs/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/README.md b/resource-manager/dataprotection/2024-04-01/backupinstances/README.md index 4601327dcd8..4a4ed452ca5 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/README.md +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupinstances` Documentation -The `backupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `backupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/client.go b/resource-manager/dataprotection/2024-04-01/backupinstances/client.go index 9e37fa3fed5..d0c8a08b5f2 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/client.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/client.go @@ -15,7 +15,7 @@ type BackupInstancesClient struct { } func NewBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupinstance.go b/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupinstance.go index 9120ff5c7b9..dc9734f7a43 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupvault.go index 3e2cc254429..11f896cba11 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/id_providerlocation.go b/resource-manager/dataprotection/2024-04-01/backupinstances/id_providerlocation.go index 41446698550..b0d1d2724df 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_createorupdate.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_createorupdate.go index 9b7d414a7e8..7f9162cb178 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_createorupdate.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_delete.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_delete.go index f7c7e187ba7..3de0e319d1f 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_delete.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_get.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_get.go index dc268db7fc1..39aa6d46c90 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_get.go @@ -45,7 +45,6 @@ func (c BackupInstancesClient) Get(ctx context.Context, id BackupInstanceId) (re var model BackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_stopprotection.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_stopprotection.go index 5340191884e..f42acb7c160 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_stopprotection.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_stopprotection.go @@ -38,6 +38,7 @@ func (o StopProtectionOperationOptions) ToHeaders() *client.Headers { func (o StopProtectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_suspendbackups.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_suspendbackups.go index a99e82a0bde..28443e575a6 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_suspendbackups.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_suspendbackups.go @@ -38,6 +38,7 @@ func (o SuspendBackupsOperationOptions) ToHeaders() *client.Headers { func (o SuspendBackupsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/method_triggerrestore.go b/resource-manager/dataprotection/2024-04-01/backupinstances/method_triggerrestore.go index 0d868dfde67..c301fac0f4a 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/method_triggerrestore.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/method_triggerrestore.go @@ -39,6 +39,7 @@ func (o TriggerRestoreOperationOptions) ToHeaders() *client.Headers { func (o TriggerRestoreOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_authcredentials.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_authcredentials.go index 8be823b957b..b743312fc69 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go index cccd7deb636..ff02ba0f51c 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverypointbasedrestorerequest.go @@ -14,13 +14,26 @@ type AzureBackupRecoveryPointBasedRestoreRequest struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryPointBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryPointBasedRestoreRequest{} func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryPointBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -55,6 +69,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.SourceDataStoreType = decoded.SourceDataStoreType @@ -66,7 +81,7 @@ func (s *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(bytes []byte } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryPointBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go index 6527462cb94..1cb6e02b034 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprecoverytimebasedrestorerequest.go @@ -14,13 +14,26 @@ type AzureBackupRecoveryTimeBasedRestoreRequest struct { RecoveryPointTime string `json:"recoveryPointTime"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRecoveryTimeBasedRestoreRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRecoveryTimeBasedRestoreRequest{} func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRecoveryTimeBasedRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" encoded, err = json.Marshal(decoded) @@ -55,6 +69,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointTime = decoded.RecoveryPointTime s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.SourceDataStoreType = decoded.SourceDataStoreType @@ -66,7 +81,7 @@ func (s *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(bytes []byte) } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRecoveryTimeBasedRestoreRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorerequest.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorerequest.go index 3b5348e6cdf..4762a0eb609 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorerequest.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorerequest.go @@ -10,18 +10,70 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRestoreRequest interface { + AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl } -// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRestoreRequest = BaseAzureBackupRestoreRequestImpl{} + +type BaseAzureBackupRestoreRequestImpl struct { + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` + SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s +} + +var _ AzureBackupRestoreRequest = RawAzureBackupRestoreRequestImpl{} + +// RawAzureBackupRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRestoreRequestImpl struct { - Type string - Values map[string]interface{} + azureBackupRestoreRequest BaseAzureBackupRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRestoreRequestImpl) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return s.azureBackupRestoreRequest } -func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { +var _ json.Unmarshaler = &BaseAzureBackupRestoreRequestImpl{} + +func (s *BaseAzureBackupRestoreRequestImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAzureBackupRestoreRequestImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) + } + + s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType + s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests + s.SourceDataStoreType = decoded.SourceDataStoreType + s.SourceResourceId = decoded.SourceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAzureBackupRestoreRequestImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["restoreTargetInfo"]; ok { + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'BaseAzureBackupRestoreRequestImpl': %+v", err) + } + s.RestoreTargetInfo = impl + } + return nil +} + +func UnmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackupRestoreRequest, error) { if input == nil { return nil, nil } @@ -60,10 +112,15 @@ func unmarshalAzureBackupRestoreRequestImplementation(input []byte) (AzureBackup return out, nil } - out := RawAzureBackupRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRestoreRequestImpl: %+v", err) } - return out, nil + + return RawAzureBackupRestoreRequestImpl{ + azureBackupRestoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go index effe6125322..dd80def9378 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azurebackuprestorewithrehydrationrequest.go @@ -16,13 +16,26 @@ type AzureBackupRestoreWithRehydrationRequest struct { RehydrationRetentionDuration string `json:"rehydrationRetentionDuration"` // Fields inherited from AzureBackupRestoreRequest + IdentityDetails *IdentityDetails `json:"identityDetails,omitempty"` + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` RestoreTargetInfo RestoreTargetInfoBase `json:"restoreTargetInfo"` SourceDataStoreType SourceDataStoreType `json:"sourceDataStoreType"` SourceResourceId *string `json:"sourceResourceId,omitempty"` } +func (s AzureBackupRestoreWithRehydrationRequest) AzureBackupRestoreRequest() BaseAzureBackupRestoreRequestImpl { + return BaseAzureBackupRestoreRequestImpl{ + IdentityDetails: s.IdentityDetails, + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + RestoreTargetInfo: s.RestoreTargetInfo, + SourceDataStoreType: s.SourceDataStoreType, + SourceResourceId: s.SourceResourceId, + } +} + var _ json.Marshaler = AzureBackupRestoreWithRehydrationRequest{} func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "AzureBackupRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) @@ -57,6 +71,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } s.IdentityDetails = decoded.IdentityDetails + s.ObjectType = decoded.ObjectType s.RecoveryPointId = decoded.RecoveryPointId s.RehydrationPriority = decoded.RehydrationPriority s.RehydrationRetentionDuration = decoded.RehydrationRetentionDuration @@ -70,7 +85,7 @@ func (s *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(bytes []byte) e } if v, ok := temp["restoreTargetInfo"]; ok { - impl, err := unmarshalRestoreTargetInfoBaseImplementation(v) + impl, err := UnmarshalRestoreTargetInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreTargetInfo' for 'AzureBackupRestoreWithRehydrationRequest': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azureoperationalstoreparameters.go index f7daf43fe3e..2c2c8c9086a 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupdatasourceparameters.go index 035cc0633ac..944abaf16cc 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupinstance.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupinstance.go index ca616f380e7..b0cf05eb712 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_backupinstance.go @@ -52,7 +52,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_baseresourceproperties.go index fcf07932382..cc03a988b9b 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_blobbackupdatasourceparameters.go index 84f49ead22c..fc701b02154 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_crossregionrestorerequestobject.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_crossregionrestorerequestobject.go index d958127a0de..f86657b433b 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_crossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_crossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *CrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'CrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasource.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasource.go index a8e07a37117..b24319e48fd 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasourceset.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasourceset.go index 537af263c0b..63859485cb4 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datastoreparameters.go index ee57cd90fa3..f66bb93df79 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_defaultresourceproperties.go index adac6099d8b..6de216a9daa 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestorecriteria.go index 5c1b5326ced..47f3587ef24 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestorecriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ItemLevelRestoreCriteria interface { + ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl } -// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ItemLevelRestoreCriteria = BaseItemLevelRestoreCriteriaImpl{} + +type BaseItemLevelRestoreCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s +} + +var _ ItemLevelRestoreCriteria = RawItemLevelRestoreCriteriaImpl{} + +// RawItemLevelRestoreCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawItemLevelRestoreCriteriaImpl struct { - Type string - Values map[string]interface{} + itemLevelRestoreCriteria BaseItemLevelRestoreCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawItemLevelRestoreCriteriaImpl) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return s.itemLevelRestoreCriteria } -func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { +func UnmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRestoreCriteria, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalItemLevelRestoreCriteriaImplementation(input []byte) (ItemLevelRes return out, nil } - out := RawItemLevelRestoreCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseItemLevelRestoreCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseItemLevelRestoreCriteriaImpl: %+v", err) } - return out, nil + + return RawItemLevelRestoreCriteriaImpl{ + itemLevelRestoreCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestoretargetinfo.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestoretargetinfo.go index 475d8764212..9490dd04de7 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestoretargetinfo.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itemlevelrestoretargetinfo.go @@ -17,10 +17,20 @@ type ItemLevelRestoreTargetInfo struct { RestoreCriteria []ItemLevelRestoreCriteria `json:"restoreCriteria"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s ItemLevelRestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = ItemLevelRestoreTargetInfo{} func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemLevelRestoreTargetInfo: %+v", err) } + decoded["objectType"] = "ItemLevelRestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -56,6 +67,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -65,7 +77,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'ItemLevelRestoreTargetInfo': %+v", err) } @@ -80,7 +92,7 @@ func (s *ItemLevelRestoreTargetInfo) UnmarshalJSON(bytes []byte) error { output := make([]ItemLevelRestoreCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalItemLevelRestoreCriteriaImplementation(val) + impl, err := UnmarshalItemLevelRestoreCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RestoreCriteria' for 'ItemLevelRestoreTargetInfo': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itempathbasedrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itempathbasedrestorecriteria.go index bd6640be142..293c8227b06 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_itempathbasedrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_itempathbasedrestorecriteria.go @@ -16,6 +16,14 @@ type ItemPathBasedRestoreCriteria struct { SubItemPathPrefix *[]string `json:"subItemPathPrefix,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s ItemPathBasedRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ItemPathBasedRestoreCriteria{} @@ -29,9 +37,10 @@ func (s ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ItemPathBasedRestoreCriteria: %+v", err) } + decoded["objectType"] = "ItemPathBasedRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 021230e39ac..fedc5d4bc51 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterrestorecriteria.go index ab7478006ae..c39f21cf7df 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclusterrestorecriteria.go @@ -24,6 +24,14 @@ type KubernetesClusterRestoreCriteria struct { RestoreHookReferences *[]NamespacedNameResource `json:"restoreHookReferences,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterRestoreCriteria{} @@ -37,9 +45,10 @@ func (s KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go index b172d3bed60..b192cf49ac8 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesclustervaulttierrestorecriteria.go @@ -26,6 +26,14 @@ type KubernetesClusterVaultTierRestoreCriteria struct { StagingStorageAccountId *string `json:"stagingStorageAccountId,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterVaultTierRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterVaultTierRestoreCriteria{} @@ -39,9 +47,10 @@ func (s KubernetesClusterVaultTierRestoreCriteria) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterVaultTierRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesClusterVaultTierRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetespvrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetespvrestorecriteria.go index 0f3d56cbfeb..4a0189b1de3 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetespvrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetespvrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesPVRestoreCriteria struct { StorageClassName *string `json:"storageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesPVRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesPVRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesPVRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesPVRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go index d4b08aa1e6f..a1f6748502f 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_kubernetesstorageclassrestorecriteria.go @@ -15,6 +15,14 @@ type KubernetesStorageClassRestoreCriteria struct { SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s KubernetesStorageClassRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesStorageClassRestoreCriteria{} @@ -28,9 +36,10 @@ func (s KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesStorageClassRestoreCriteria: %+v", err) } + decoded["objectType"] = "KubernetesStorageClassRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationextendedinfo.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationextendedinfo.go index 53581d9a9e1..7293611199b 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationextendedinfo.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationextendedinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OperationExtendedInfo interface { + OperationExtendedInfo() BaseOperationExtendedInfoImpl } -// RawOperationExtendedInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OperationExtendedInfo = BaseOperationExtendedInfoImpl{} + +type BaseOperationExtendedInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s +} + +var _ OperationExtendedInfo = RawOperationExtendedInfoImpl{} + +// RawOperationExtendedInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOperationExtendedInfoImpl struct { - Type string - Values map[string]interface{} + operationExtendedInfo BaseOperationExtendedInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationExtendedInfoImpl) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return s.operationExtendedInfo } -func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { +func UnmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtendedInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalOperationExtendedInfoImplementation(input []byte) (OperationExtend return out, nil } - out := RawOperationExtendedInfoImpl{ - Type: value, - Values: temp, + var parent BaseOperationExtendedInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationExtendedInfoImpl: %+v", err) } - return out, nil + + return RawOperationExtendedInfoImpl{ + operationExtendedInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationjobextendedinfo.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationjobextendedinfo.go index 59cd3f9ddf6..c0ead370cf2 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationjobextendedinfo.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_operationjobextendedinfo.go @@ -14,6 +14,14 @@ type OperationJobExtendedInfo struct { JobId *string `json:"jobId,omitempty"` // Fields inherited from OperationExtendedInfo + + ObjectType string `json:"objectType"` +} + +func (s OperationJobExtendedInfo) OperationExtendedInfo() BaseOperationExtendedInfoImpl { + return BaseOperationExtendedInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = OperationJobExtendedInfo{} @@ -27,9 +35,10 @@ func (s OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OperationJobExtendedInfo: %+v", err) } + decoded["objectType"] = "OperationJobExtendedInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_policyparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_policyparameters.go index ba00f440ca8..00ca7abb0fd 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go index c7df0c52c2b..365518530ec 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_rangebaseditemlevelrestorecriteria.go @@ -15,6 +15,14 @@ type RangeBasedItemLevelRestoreCriteria struct { MinMatchingValue *string `json:"minMatchingValue,omitempty"` // Fields inherited from ItemLevelRestoreCriteria + + ObjectType string `json:"objectType"` +} + +func (s RangeBasedItemLevelRestoreCriteria) ItemLevelRestoreCriteria() BaseItemLevelRestoreCriteriaImpl { + return BaseItemLevelRestoreCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = RangeBasedItemLevelRestoreCriteria{} @@ -28,9 +36,10 @@ func (s RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RangeBasedItemLevelRestoreCriteria: %+v", err) } + decoded["objectType"] = "RangeBasedItemLevelRestoreCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restorefilestargetinfo.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restorefilestargetinfo.go index 04fe194025c..b5cf6722012 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restorefilestargetinfo.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restorefilestargetinfo.go @@ -14,10 +14,20 @@ type RestoreFilesTargetInfo struct { TargetDetails TargetDetails `json:"targetDetails"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreFilesTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreFilesTargetInfo{} func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreFilesTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreFilesTargetInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfo.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfo.go index 23f512f2c31..b1a8ea521b8 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfo.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfo.go @@ -16,10 +16,20 @@ type RestoreTargetInfo struct { DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` // Fields inherited from RestoreTargetInfoBase + + ObjectType string `json:"objectType"` RecoveryOption RecoveryOption `json:"recoveryOption"` RestoreLocation *string `json:"restoreLocation,omitempty"` } +func (s RestoreTargetInfo) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return BaseRestoreTargetInfoBaseImpl{ + ObjectType: s.ObjectType, + RecoveryOption: s.RecoveryOption, + RestoreLocation: s.RestoreLocation, + } +} + var _ json.Marshaler = RestoreTargetInfo{} func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s RestoreTargetInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RestoreTargetInfo: %+v", err) } + decoded["objectType"] = "RestoreTargetInfo" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { s.DatasourceInfo = decoded.DatasourceInfo s.DatasourceSetInfo = decoded.DatasourceSetInfo + s.ObjectType = decoded.ObjectType s.RecoveryOption = decoded.RecoveryOption s.RestoreLocation = decoded.RestoreLocation @@ -64,7 +76,7 @@ func (s *RestoreTargetInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'RestoreTargetInfo': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfobase.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfobase.go index ce31702dc78..f4f60833a9c 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfobase.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_restoretargetinfobase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreTargetInfoBase interface { + RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl } -// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreTargetInfoBase = BaseRestoreTargetInfoBaseImpl{} + +type BaseRestoreTargetInfoBaseImpl struct { + ObjectType string `json:"objectType"` + RecoveryOption RecoveryOption `json:"recoveryOption"` + RestoreLocation *string `json:"restoreLocation,omitempty"` +} + +func (s BaseRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s +} + +var _ RestoreTargetInfoBase = RawRestoreTargetInfoBaseImpl{} + +// RawRestoreTargetInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreTargetInfoBaseImpl struct { - Type string - Values map[string]interface{} + restoreTargetInfoBase BaseRestoreTargetInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreTargetInfoBaseImpl) RestoreTargetInfoBase() BaseRestoreTargetInfoBaseImpl { + return s.restoreTargetInfoBase } -func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { +func UnmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalRestoreTargetInfoBaseImplementation(input []byte) (RestoreTargetIn return out, nil } - out := RawRestoreTargetInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseRestoreTargetInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreTargetInfoBaseImpl: %+v", err) } - return out, nil + + return RawRestoreTargetInfoBaseImpl{ + restoreTargetInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_secretstorebasedauthcredentials.go index 76f2af98598..859bcef3249 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_validatecrossregionrestorerequestobject.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_validatecrossregionrestorerequestobject.go index 64c70ca0be3..06b9dc2dda9 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_validatecrossregionrestorerequestobject.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_validatecrossregionrestorerequestobject.go @@ -30,7 +30,7 @@ func (s *ValidateCrossRegionRestoreRequestObject) UnmarshalJSON(bytes []byte) er } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateCrossRegionRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/model_validaterestorerequestobject.go b/resource-manager/dataprotection/2024-04-01/backupinstances/model_validaterestorerequestobject.go index e59fe83da41..fcef764da4b 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/model_validaterestorerequestobject.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/model_validaterestorerequestobject.go @@ -22,7 +22,7 @@ func (s *ValidateRestoreRequestObject) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequestObject"]; ok { - impl, err := unmarshalAzureBackupRestoreRequestImplementation(v) + impl, err := UnmarshalAzureBackupRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequestObject' for 'ValidateRestoreRequestObject': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstances/version.go b/resource-manager/dataprotection/2024-04-01/backupinstances/version.go index eada6fa8b12..af21c5d16ce 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstances/version.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstances/version.go @@ -1,12 +1,10 @@ package backupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstances/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/README.md b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/README.md index 6543d1329d4..4e6468931a2 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/README.md +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting` Documentation -The `backupinstancesextensionrouting` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `backupinstancesextensionrouting` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/client.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/client.go index 4f36c1f1bdc..fa5061f45f5 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/client.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/client.go @@ -15,7 +15,7 @@ type BackupInstancesExtensionRoutingClient struct { } func NewBackupInstancesExtensionRoutingClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupInstancesExtensionRoutingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupinstancesextensionrouting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupinstancesextensionrouting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupInstancesExtensionRoutingClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_authcredentials.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_authcredentials.go index 8044111951b..ab311a36fb5 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_authcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_azureoperationalstoreparameters.go index 512747be67d..7d380b73623 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupdatasourceparameters.go index 8b65bb33421..ba5b35a1909 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupinstance.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupinstance.go index 7e28f6f3528..17c4023de06 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_backupinstance.go @@ -52,7 +52,7 @@ func (s *BackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'BackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_baseresourceproperties.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_baseresourceproperties.go index 9be644502dc..ebd5070092a 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_blobbackupdatasourceparameters.go index d865da90ac5..84bada559e2 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasource.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasource.go index 417ab5d0d0e..6df9a085581 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasource.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasourceset.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasourceset.go index ba4a143ead5..fae45792e4a 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasourceset.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datastoreparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datastoreparameters.go index 2bb312ac887..36fab03ba27 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_defaultresourceproperties.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_defaultresourceproperties.go index d86bee5be3e..545969d7cdf 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_kubernetesclusterbackupdatasourceparameters.go index 767ca36bde8..0cff802b408 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_policyparameters.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_policyparameters.go index 7d6c28ba39e..14239b4c062 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_policyparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_secretstorebasedauthcredentials.go index 6ab1e305537..c2f65da6553 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/version.go b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/version.go index 2b728e2111b..02cc58c9a15 100644 --- a/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/version.go +++ b/resource-manager/dataprotection/2024-04-01/backupinstancesextensionrouting/version.go @@ -1,12 +1,10 @@ package backupinstancesextensionrouting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupinstancesextensionrouting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupinstancesextensionrouting/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/README.md b/resource-manager/dataprotection/2024-04-01/backuppolicies/README.md index 61af8f9f833..8435d1e3ac4 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/README.md +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/client.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/client.go index 7867fb217cc..a888bef7263 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/client.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/client.go @@ -15,7 +15,7 @@ type BackupPoliciesClient struct { } func NewBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPoliciesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backuppolicy.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backuppolicy.go index 567587f55bd..be6e8b11b7c 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backuppolicy.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backupvault.go index 630fbdb1a15..b844c8ed70f 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/method_createorupdate.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/method_createorupdate.go index fbea2f083fb..04342e7a5d0 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/method_createorupdate.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c BackupPoliciesClient) CreateOrUpdate(ctx context.Context, id BackupPolic var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/method_get.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/method_get.go index 2275adb94b5..1dbecf80051 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/method_get.go @@ -45,7 +45,6 @@ func (c BackupPoliciesClient) Get(ctx context.Context, id BackupPolicyId) (resul var model BaseBackupPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_absolutedeleteoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_absolutedeleteoption.go index a9aaf47dcb7..fe6ce6d3432 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_absolutedeleteoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_absolutedeleteoption.go @@ -13,7 +13,16 @@ var _ DeleteOption = AbsoluteDeleteOption{} type AbsoluteDeleteOption struct { // Fields inherited from DeleteOption - Duration string `json:"duration"` + + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s AbsoluteDeleteOption) DeleteOption() BaseDeleteOptionImpl { + return BaseDeleteOptionImpl{ + Duration: s.Duration, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AbsoluteDeleteOption{} @@ -27,9 +36,10 @@ func (s AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteDeleteOption: %+v", err) } + decoded["objectType"] = "AbsoluteDeleteOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_adhocbasedtriggercontext.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_adhocbasedtriggercontext.go index 5505a40b8a6..30cb106ddf1 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_adhocbasedtriggercontext.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_adhocbasedtriggercontext.go @@ -14,6 +14,14 @@ type AdhocBasedTriggerContext struct { TaggingCriteria AdhocBasedTaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s AdhocBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AdhocBasedTriggerContext{} @@ -27,9 +35,10 @@ func (s AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdhocBasedTriggerContext: %+v", err) } + decoded["objectType"] = "AdhocBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackupparams.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackupparams.go index 024401c3d86..6b98b1df1f3 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackupparams.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackupparams.go @@ -14,6 +14,14 @@ type AzureBackupParams struct { BackupType string `json:"backupType"` // Fields inherited from BackupParameters + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupParams) BackupParameters() BaseBackupParametersImpl { + return BaseBackupParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupParams{} @@ -27,9 +35,10 @@ func (s AzureBackupParams) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupParams: %+v", err) } + decoded["objectType"] = "AzureBackupParams" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackuprule.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackuprule.go index 884536bf720..a06a9d21176 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackuprule.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azurebackuprule.go @@ -16,7 +16,16 @@ type AzureBackupRule struct { Trigger TriggerContext `json:"trigger"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureBackupRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupRule{} @@ -30,9 +39,10 @@ func (s AzureBackupRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupRule: %+v", err) } + decoded["objectType"] = "AzureBackupRule" encoded, err = json.Marshal(decoded) @@ -54,6 +64,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { s.DataStore = decoded.DataStore s.Name = decoded.Name + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -61,7 +72,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["backupParameters"]; ok { - impl, err := unmarshalBackupParametersImplementation(v) + impl, err := UnmarshalBackupParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'BackupParameters' for 'AzureBackupRule': %+v", err) } @@ -69,7 +80,7 @@ func (s *AzureBackupRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerContextImplementation(v) + impl, err := UnmarshalTriggerContextImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'AzureBackupRule': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azureretentionrule.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azureretentionrule.go index 1362ef8628d..f6c4c671bcc 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azureretentionrule.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_azureretentionrule.go @@ -15,7 +15,16 @@ type AzureRetentionRule struct { Lifecycles []SourceLifeCycle `json:"lifecycles"` // Fields inherited from BasePolicyRule - Name string `json:"name"` + + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s AzureRetentionRule) BasePolicyRule() BaseBasePolicyRuleImpl { + return BaseBasePolicyRuleImpl{ + Name: s.Name, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureRetentionRule{} @@ -29,9 +38,10 @@ func (s AzureRetentionRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRetentionRule: %+v", err) } + decoded["objectType"] = "AzureRetentionRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupcriteria.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupcriteria.go index ae5e3acf7f9..1d4eda9f3ce 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupcriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupCriteria interface { + BackupCriteria() BaseBackupCriteriaImpl } -// RawBackupCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupCriteria = BaseBackupCriteriaImpl{} + +type BaseBackupCriteriaImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s +} + +var _ BackupCriteria = RawBackupCriteriaImpl{} + +// RawBackupCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupCriteriaImpl struct { - Type string - Values map[string]interface{} + backupCriteria BaseBackupCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupCriteriaImpl) BackupCriteria() BaseBackupCriteriaImpl { + return s.backupCriteria } -func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { +func UnmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupCriteriaImplementation(input []byte) (BackupCriteria, error) return out, nil } - out := RawBackupCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseBackupCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupCriteriaImpl: %+v", err) } - return out, nil + + return RawBackupCriteriaImpl{ + backupCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupparameters.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupparameters.go index 2cd46e5bbe7..9df43d72eeb 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupparameters.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backupparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupParameters interface { + BackupParameters() BaseBackupParametersImpl } -// RawBackupParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupParameters = BaseBackupParametersImpl{} + +type BaseBackupParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s +} + +var _ BackupParameters = RawBackupParametersImpl{} + +// RawBackupParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupParametersImpl struct { - Type string - Values map[string]interface{} + backupParameters BaseBackupParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupParametersImpl) BackupParameters() BaseBackupParametersImpl { + return s.backupParameters } -func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { +func UnmarshalBackupParametersImplementation(input []byte) (BackupParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBackupParametersImplementation(input []byte) (BackupParameters, er return out, nil } - out := RawBackupParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupParametersImpl: %+v", err) } - return out, nil + + return RawBackupParametersImpl{ + backupParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backuppolicy.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backuppolicy.go index 5b770c9a733..861df204488 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backuppolicy.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_backuppolicy.go @@ -14,7 +14,16 @@ type BackupPolicy struct { PolicyRules []BasePolicyRule `json:"policyRules"` // Fields inherited from BaseBackupPolicy + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BackupPolicy) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return BaseBaseBackupPolicyImpl{ + DatasourceTypes: s.DatasourceTypes, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BackupPolicy{} @@ -28,9 +37,10 @@ func (s BackupPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BackupPolicy: %+v", err) } + decoded["objectType"] = "BackupPolicy" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { } s.DatasourceTypes = decoded.DatasourceTypes + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *BackupPolicy) UnmarshalJSON(bytes []byte) error { output := make([]BasePolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalBasePolicyRuleImplementation(val) + impl, err := UnmarshalBasePolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PolicyRules' for 'BackupPolicy': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicy.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicy.go index 5da7096ec0c..67380424475 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicy.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseBackupPolicy interface { + BaseBackupPolicy() BaseBaseBackupPolicyImpl } -// RawBaseBackupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseBackupPolicy = BaseBaseBackupPolicyImpl{} + +type BaseBaseBackupPolicyImpl struct { + DatasourceTypes []string `json:"datasourceTypes"` + ObjectType string `json:"objectType"` +} + +func (s BaseBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s +} + +var _ BaseBackupPolicy = RawBaseBackupPolicyImpl{} + +// RawBaseBackupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseBackupPolicyImpl struct { - Type string - Values map[string]interface{} + baseBackupPolicy BaseBaseBackupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseBackupPolicyImpl) BaseBackupPolicy() BaseBaseBackupPolicyImpl { + return s.baseBackupPolicy } -func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { +func UnmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalBaseBackupPolicyImplementation(input []byte) (BaseBackupPolicy, er return out, nil } - out := RawBaseBackupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseBaseBackupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseBackupPolicyImpl: %+v", err) } - return out, nil + + return RawBaseBackupPolicyImpl{ + baseBackupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicyresource.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicyresource.go index dbc62cc6103..1fc0de8ac07 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicyresource.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basebackuppolicyresource.go @@ -38,7 +38,7 @@ func (s *BaseBackupPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBaseBackupPolicyImplementation(v) + impl, err := UnmarshalBaseBackupPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BaseBackupPolicyResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basepolicyrule.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basepolicyrule.go index 2434dc31521..b1610388497 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basepolicyrule.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_basepolicyrule.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BasePolicyRule interface { + BasePolicyRule() BaseBasePolicyRuleImpl } -// RawBasePolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BasePolicyRule = BaseBasePolicyRuleImpl{} + +type BaseBasePolicyRuleImpl struct { + Name string `json:"name"` + ObjectType string `json:"objectType"` +} + +func (s BaseBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s +} + +var _ BasePolicyRule = RawBasePolicyRuleImpl{} + +// RawBasePolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBasePolicyRuleImpl struct { - Type string - Values map[string]interface{} + basePolicyRule BaseBasePolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawBasePolicyRuleImpl) BasePolicyRule() BaseBasePolicyRuleImpl { + return s.basePolicyRule } -func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { +func UnmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalBasePolicyRuleImplementation(input []byte) (BasePolicyRule, error) return out, nil } - out := RawBasePolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseBasePolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBasePolicyRuleImpl: %+v", err) } - return out, nil + + return RawBasePolicyRuleImpl{ + basePolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyonexpiryoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyonexpiryoption.go index 38c92a43d50..de3ff29737c 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyonexpiryoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyonexpiryoption.go @@ -13,6 +13,14 @@ var _ CopyOption = CopyOnExpiryOption{} type CopyOnExpiryOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CopyOnExpiryOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CopyOnExpiryOption{} @@ -26,9 +34,10 @@ func (s CopyOnExpiryOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyOnExpiryOption: %+v", err) } + decoded["objectType"] = "CopyOnExpiryOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyoption.go index 8015dcb6bfd..9fba9c2df88 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_copyoption.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CopyOption interface { + CopyOption() BaseCopyOptionImpl } -// RawCopyOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CopyOption = BaseCopyOptionImpl{} + +type BaseCopyOptionImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s +} + +var _ CopyOption = RawCopyOptionImpl{} + +// RawCopyOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCopyOptionImpl struct { - Type string - Values map[string]interface{} + copyOption BaseCopyOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawCopyOptionImpl) CopyOption() BaseCopyOptionImpl { + return s.copyOption } -func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { +func UnmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalCopyOptionImplementation(input []byte) (CopyOption, error) { return out, nil } - out := RawCopyOptionImpl{ - Type: value, - Values: temp, + var parent BaseCopyOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCopyOptionImpl: %+v", err) } - return out, nil + + return RawCopyOptionImpl{ + copyOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_customcopyoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_customcopyoption.go index f450054e89a..e23a6200cb3 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_customcopyoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_customcopyoption.go @@ -14,6 +14,14 @@ type CustomCopyOption struct { Duration *string `json:"duration,omitempty"` // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s CustomCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = CustomCopyOption{} @@ -27,9 +35,10 @@ func (s CustomCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomCopyOption: %+v", err) } + decoded["objectType"] = "CustomCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_deleteoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_deleteoption.go index d8ac5dc7882..35a8b3c0fe0 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_deleteoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_deleteoption.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeleteOption interface { + DeleteOption() BaseDeleteOptionImpl } -// RawDeleteOptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeleteOption = BaseDeleteOptionImpl{} + +type BaseDeleteOptionImpl struct { + Duration string `json:"duration"` + ObjectType string `json:"objectType"` +} + +func (s BaseDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s +} + +var _ DeleteOption = RawDeleteOptionImpl{} + +// RawDeleteOptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeleteOptionImpl struct { - Type string - Values map[string]interface{} + deleteOption BaseDeleteOptionImpl + Type string + Values map[string]interface{} +} + +func (s RawDeleteOptionImpl) DeleteOption() BaseDeleteOptionImpl { + return s.deleteOption } -func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { +func UnmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDeleteOptionImplementation(input []byte) (DeleteOption, error) { return out, nil } - out := RawDeleteOptionImpl{ - Type: value, - Values: temp, + var parent BaseDeleteOptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeleteOptionImpl: %+v", err) } - return out, nil + + return RawDeleteOptionImpl{ + deleteOption: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_immediatecopyoption.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_immediatecopyoption.go index a8e54686cc9..8be58faec52 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_immediatecopyoption.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_immediatecopyoption.go @@ -13,6 +13,14 @@ var _ CopyOption = ImmediateCopyOption{} type ImmediateCopyOption struct { // Fields inherited from CopyOption + + ObjectType string `json:"objectType"` +} + +func (s ImmediateCopyOption) CopyOption() BaseCopyOptionImpl { + return BaseCopyOptionImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ImmediateCopyOption{} @@ -26,9 +34,10 @@ func (s ImmediateCopyOption) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImmediateCopyOption: %+v", err) } + decoded["objectType"] = "ImmediateCopyOption" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedbackupcriteria.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedbackupcriteria.go index 6e2c614f630..69188ba4962 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedbackupcriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedbackupcriteria.go @@ -19,6 +19,14 @@ type ScheduleBasedBackupCriteria struct { WeeksOfTheMonth *[]WeekNumber `json:"weeksOfTheMonth,omitempty"` // Fields inherited from BackupCriteria + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedBackupCriteria) BackupCriteria() BaseBackupCriteriaImpl { + return BaseBackupCriteriaImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedBackupCriteria{} @@ -32,9 +40,10 @@ func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedBackupCriteria: %+v", err) } + decoded["objectType"] = "ScheduleBasedBackupCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedtriggercontext.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedtriggercontext.go index c7f96a85c13..aee5719cd5c 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedtriggercontext.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_schedulebasedtriggercontext.go @@ -15,6 +15,14 @@ type ScheduleBasedTriggerContext struct { TaggingCriteria []TaggingCriteria `json:"taggingCriteria"` // Fields inherited from TriggerContext + + ObjectType string `json:"objectType"` +} + +func (s ScheduleBasedTriggerContext) TriggerContext() BaseTriggerContextImpl { + return BaseTriggerContextImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ScheduleBasedTriggerContext{} @@ -28,9 +36,10 @@ func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduleBasedTriggerContext: %+v", err) } + decoded["objectType"] = "ScheduleBasedTriggerContext" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_sourcelifecycle.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_sourcelifecycle.go index 7538681c1b2..0792fff629b 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_sourcelifecycle.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_sourcelifecycle.go @@ -32,7 +32,7 @@ func (s *SourceLifeCycle) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deleteAfter"]; ok { - impl, err := unmarshalDeleteOptionImplementation(v) + impl, err := UnmarshalDeleteOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeleteAfter' for 'SourceLifeCycle': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_taggingcriteria.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_taggingcriteria.go index 71c094c4d32..06458ef725e 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_taggingcriteria.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_taggingcriteria.go @@ -41,7 +41,7 @@ func (s *TaggingCriteria) UnmarshalJSON(bytes []byte) error { output := make([]BackupCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalBackupCriteriaImplementation(val) + impl, err := UnmarshalBackupCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Criteria' for 'TaggingCriteria': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_targetcopysetting.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_targetcopysetting.go index 2c3e72d496e..e59c6f70777 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_targetcopysetting.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_targetcopysetting.go @@ -30,7 +30,7 @@ func (s *TargetCopySetting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["copyAfter"]; ok { - impl, err := unmarshalCopyOptionImplementation(v) + impl, err := UnmarshalCopyOptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CopyAfter' for 'TargetCopySetting': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_triggercontext.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_triggercontext.go index 866643b9b21..73252a42b95 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/model_triggercontext.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/model_triggercontext.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerContext interface { + TriggerContext() BaseTriggerContextImpl } -// RawTriggerContextImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerContext = BaseTriggerContextImpl{} + +type BaseTriggerContextImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s +} + +var _ TriggerContext = RawTriggerContextImpl{} + +// RawTriggerContextImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerContextImpl struct { - Type string - Values map[string]interface{} + triggerContext BaseTriggerContextImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerContextImpl) TriggerContext() BaseTriggerContextImpl { + return s.triggerContext } -func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { +func UnmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTriggerContextImplementation(input []byte) (TriggerContext, error) return out, nil } - out := RawTriggerContextImpl{ - Type: value, - Values: temp, + var parent BaseTriggerContextImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerContextImpl: %+v", err) } - return out, nil + + return RawTriggerContextImpl{ + triggerContext: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/backuppolicies/version.go b/resource-manager/dataprotection/2024-04-01/backuppolicies/version.go index 30df912a279..27e2eac52c0 100644 --- a/resource-manager/dataprotection/2024-04-01/backuppolicies/version.go +++ b/resource-manager/dataprotection/2024-04-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/README.md b/resource-manager/dataprotection/2024-04-01/backupvaults/README.md index 7e3162863e6..381c3fd0283 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/README.md +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/client.go b/resource-manager/dataprotection/2024-04-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/client.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/backupvaults/id_backupvault.go index 037dbb924a0..8bb7503f8f1 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/id_providerlocation.go b/resource-manager/dataprotection/2024-04-01/backupvaults/id_providerlocation.go index 0a99f41369d..c133cfe7a08 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/method_checknameavailability.go b/resource-manager/dataprotection/2024-04-01/backupvaults/method_checknameavailability.go index 6e006b786d0..de967ac422d 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/method_checknameavailability.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c BackupVaultsClient) CheckNameAvailability(ctx context.Context, id Provid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/method_createorupdate.go b/resource-manager/dataprotection/2024-04-01/backupvaults/method_createorupdate.go index 345636a7702..9ac0e63d1c8 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/method_createorupdate.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/method_get.go b/resource-manager/dataprotection/2024-04-01/backupvaults/method_get.go index 5e1ed9d0258..638bcc8f8ce 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVaultResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/method_update.go b/resource-manager/dataprotection/2024-04-01/backupvaults/method_update.go index aa31cfa58d9..1153481cbae 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/method_update.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/backupvaults/version.go b/resource-manager/dataprotection/2024-04-01/backupvaults/version.go index fa80e7e1c21..a1ab9d3c522 100644 --- a/resource-manager/dataprotection/2024-04-01/backupvaults/version.go +++ b/resource-manager/dataprotection/2024-04-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/README.md b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/README.md index 2c0a40435c3..355d3d1bb64 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/README.md +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/deletedbackupinstances` Documentation -The `deletedbackupinstances` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `deletedbackupinstances` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/client.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/client.go index e70cb344e5d..65c723446b5 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/client.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/client.go @@ -15,7 +15,7 @@ type DeletedBackupInstancesClient struct { } func NewDeletedBackupInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedBackupInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedbackupinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedbackupinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedBackupInstancesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_backupvault.go index 6dc4dce0b7f..e53a4c55121 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_deletedbackupinstance.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_deletedbackupinstance.go index f81e2080068..570f077f942 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/id_deletedbackupinstance.go @@ -44,7 +44,7 @@ func ParseDeletedBackupInstanceID(input string) (*DeletedBackupInstanceId, error } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeletedBackupInstanceIDInsensitively(input string) (*DeletedBackupInst } id := DeletedBackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/method_get.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/method_get.go index 8326bd4395b..d884717c36e 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/method_get.go @@ -45,7 +45,6 @@ func (c DeletedBackupInstancesClient) Get(ctx context.Context, id DeletedBackupI var model DeletedBackupInstanceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_authcredentials.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_authcredentials.go index e1f6967a3f6..0df9b7da64f 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_authcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_authcredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthCredentials interface { + AuthCredentials() BaseAuthCredentialsImpl } -// RawAuthCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthCredentials = BaseAuthCredentialsImpl{} + +type BaseAuthCredentialsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s +} + +var _ AuthCredentials = RawAuthCredentialsImpl{} + +// RawAuthCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthCredentialsImpl struct { - Type string - Values map[string]interface{} + authCredentials BaseAuthCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthCredentialsImpl) AuthCredentials() BaseAuthCredentialsImpl { + return s.authCredentials } -func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { +func UnmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthCredentialsImplementation(input []byte) (AuthCredentials, erro return out, nil } - out := RawAuthCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseAuthCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthCredentialsImpl: %+v", err) } - return out, nil + + return RawAuthCredentialsImpl{ + authCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_azureoperationalstoreparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_azureoperationalstoreparameters.go index 82c85ebf9e1..34ee2168445 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_azureoperationalstoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_azureoperationalstoreparameters.go @@ -14,7 +14,16 @@ type AzureOperationalStoreParameters struct { ResourceGroupId *string `json:"resourceGroupId,omitempty"` // Fields inherited from DataStoreParameters + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s AzureOperationalStoreParameters) DataStoreParameters() BaseDataStoreParametersImpl { + return BaseDataStoreParametersImpl{ + DataStoreType: s.DataStoreType, + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureOperationalStoreParameters{} @@ -28,9 +37,10 @@ func (s AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureOperationalStoreParameters: %+v", err) } + decoded["objectType"] = "AzureOperationalStoreParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_backupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_backupdatasourceparameters.go index 61a96f79393..43c826178a4 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_backupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_backupdatasourceparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupDatasourceParameters interface { + BackupDatasourceParameters() BaseBackupDatasourceParametersImpl } -// RawBackupDatasourceParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupDatasourceParameters = BaseBackupDatasourceParametersImpl{} + +type BaseBackupDatasourceParametersImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s +} + +var _ BackupDatasourceParameters = RawBackupDatasourceParametersImpl{} + +// RawBackupDatasourceParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupDatasourceParametersImpl struct { - Type string - Values map[string]interface{} + backupDatasourceParameters BaseBackupDatasourceParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupDatasourceParametersImpl) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return s.backupDatasourceParameters } -func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { +func UnmarshalBackupDatasourceParametersImplementation(input []byte) (BackupDatasourceParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalBackupDatasourceParametersImplementation(input []byte) (BackupData return out, nil } - out := RawBackupDatasourceParametersImpl{ - Type: value, - Values: temp, + var parent BaseBackupDatasourceParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupDatasourceParametersImpl: %+v", err) } - return out, nil + + return RawBackupDatasourceParametersImpl{ + backupDatasourceParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_baseresourceproperties.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_baseresourceproperties.go index 395fa05201d..fa056a53fdb 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_baseresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_baseresourceproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseResourceProperties interface { + BaseResourceProperties() BaseBaseResourcePropertiesImpl } -// RawBaseResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseResourceProperties = BaseBaseResourcePropertiesImpl{} + +type BaseBaseResourcePropertiesImpl struct { + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s BaseBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s +} + +var _ BaseResourceProperties = RawBaseResourcePropertiesImpl{} + +// RawBaseResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + baseResourceProperties BaseBaseResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawBaseResourcePropertiesImpl) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return s.baseResourceProperties } -func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { +func UnmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourceProperties, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBaseResourcePropertiesImplementation(input []byte) (BaseResourcePr return out, nil } - out := RawBaseResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseBaseResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawBaseResourcePropertiesImpl{ + baseResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go index 8dbfe3038cd..8531c83eb0f 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_blobbackupdatasourceparameters.go @@ -14,6 +14,14 @@ type BlobBackupDatasourceParameters struct { ContainersList []string `json:"containersList"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s BlobBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = BlobBackupDatasourceParameters{} @@ -27,9 +35,10 @@ func (s BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "BlobBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasource.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasource.go index ae955b4355b..8a27dd1d309 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasource.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasource.go @@ -42,7 +42,7 @@ func (s *Datasource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'Datasource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasourceset.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasourceset.go index 03857806dea..094ee1abfa4 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasourceset.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datasourceset.go @@ -42,7 +42,7 @@ func (s *DatasourceSet) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalBaseResourcePropertiesImplementation(v) + impl, err := UnmarshalBaseResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'DatasourceSet': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datastoreparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datastoreparameters.go index 0c5750816d1..422133b08f5 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datastoreparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_datastoreparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataStoreParameters interface { + DataStoreParameters() BaseDataStoreParametersImpl } -// RawDataStoreParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataStoreParameters = BaseDataStoreParametersImpl{} + +type BaseDataStoreParametersImpl struct { + DataStoreType DataStoreTypes `json:"dataStoreType"` + ObjectType string `json:"objectType"` +} + +func (s BaseDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s +} + +var _ DataStoreParameters = RawDataStoreParametersImpl{} + +// RawDataStoreParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataStoreParametersImpl struct { - Type string - Values map[string]interface{} + dataStoreParameters BaseDataStoreParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDataStoreParametersImpl) DataStoreParameters() BaseDataStoreParametersImpl { + return s.dataStoreParameters } -func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { +func UnmarshalDataStoreParametersImplementation(input []byte) (DataStoreParameters, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalDataStoreParametersImplementation(input []byte) (DataStoreParamete return out, nil } - out := RawDataStoreParametersImpl{ - Type: value, - Values: temp, + var parent BaseDataStoreParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataStoreParametersImpl: %+v", err) } - return out, nil + + return RawDataStoreParametersImpl{ + dataStoreParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_defaultresourceproperties.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_defaultresourceproperties.go index 618a75af3b9..9ac69e0ad5f 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_defaultresourceproperties.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_defaultresourceproperties.go @@ -13,6 +13,14 @@ var _ BaseResourceProperties = DefaultResourceProperties{} type DefaultResourceProperties struct { // Fields inherited from BaseResourceProperties + + ObjectType ResourcePropertiesObjectType `json:"objectType"` +} + +func (s DefaultResourceProperties) BaseResourceProperties() BaseBaseResourcePropertiesImpl { + return BaseBaseResourcePropertiesImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = DefaultResourceProperties{} @@ -26,9 +34,10 @@ func (s DefaultResourceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultResourceProperties: %+v", err) } + decoded["objectType"] = "DefaultResourceProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_deletedbackupinstance.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_deletedbackupinstance.go index fc2cbfb5c99..961410003fd 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_deletedbackupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_deletedbackupinstance.go @@ -54,7 +54,7 @@ func (s *DeletedBackupInstance) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasourceAuthCredentials"]; ok { - impl, err := unmarshalAuthCredentialsImplementation(v) + impl, err := UnmarshalAuthCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DatasourceAuthCredentials' for 'DeletedBackupInstance': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go index 10068d31fa5..d79157220be 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_kubernetesclusterbackupdatasourceparameters.go @@ -21,6 +21,14 @@ type KubernetesClusterBackupDatasourceParameters struct { SnapshotVolumes bool `json:"snapshotVolumes"` // Fields inherited from BackupDatasourceParameters + + ObjectType string `json:"objectType"` +} + +func (s KubernetesClusterBackupDatasourceParameters) BackupDatasourceParameters() BaseBackupDatasourceParametersImpl { + return BaseBackupDatasourceParametersImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = KubernetesClusterBackupDatasourceParameters{} @@ -34,9 +42,10 @@ func (s KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesClusterBackupDatasourceParameters: %+v", err) } + decoded["objectType"] = "KubernetesClusterBackupDatasourceParameters" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_policyparameters.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_policyparameters.go index b1f479381f0..ca65ed7ce6e 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_policyparameters.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_policyparameters.go @@ -30,7 +30,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]BackupDatasourceParameters, 0) for i, val := range listTemp { - impl, err := unmarshalBackupDatasourceParametersImplementation(val) + impl, err := UnmarshalBackupDatasourceParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'BackupDatasourceParametersList' for 'PolicyParameters': %+v", i, err) } @@ -47,7 +47,7 @@ func (s *PolicyParameters) UnmarshalJSON(bytes []byte) error { output := make([]DataStoreParameters, 0) for i, val := range listTemp { - impl, err := unmarshalDataStoreParametersImplementation(val) + impl, err := UnmarshalDataStoreParametersImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DataStoreParametersList' for 'PolicyParameters': %+v", i, err) } diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go index 61dd7ae1963..baef7fd69ef 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/model_secretstorebasedauthcredentials.go @@ -14,6 +14,14 @@ type SecretStoreBasedAuthCredentials struct { SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` // Fields inherited from AuthCredentials + + ObjectType string `json:"objectType"` +} + +func (s SecretStoreBasedAuthCredentials) AuthCredentials() BaseAuthCredentialsImpl { + return BaseAuthCredentialsImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = SecretStoreBasedAuthCredentials{} @@ -27,9 +35,10 @@ func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretStoreBasedAuthCredentials: %+v", err) } + decoded["objectType"] = "SecretStoreBasedAuthCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/version.go b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/version.go index 7d2529b9e2c..345a30f691e 100644 --- a/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/version.go +++ b/resource-manager/dataprotection/2024-04-01/deletedbackupinstances/version.go @@ -1,12 +1,10 @@ package deletedbackupinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedbackupinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedbackupinstances/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/README.md b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/README.md index 9089cd760c0..7378c0cd53c 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/README.md +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/dppfeaturesupport` Documentation -The `dppfeaturesupport` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `dppfeaturesupport` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/client.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/client.go index 05f9070486d..01ef8c69f05 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/client.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/client.go @@ -15,7 +15,7 @@ type DppFeatureSupportClient struct { } func NewDppFeatureSupportClientWithBaseURI(sdkApi sdkEnv.Api) (*DppFeatureSupportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppfeaturesupport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppfeaturesupport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppFeatureSupportClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/id_location.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/id_location.go index 4d1ff865e11..71291884078 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/id_location.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go index 5b01a004060..eae58cdc096 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/method_dataprotectioncheckfeaturesupport.go @@ -16,7 +16,7 @@ import ( type DataProtectionCheckFeatureSupportOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *FeatureValidationResponseBase + Model FeatureValidationResponseBase } // DataProtectionCheckFeatureSupport ... @@ -53,11 +53,11 @@ func (c DppFeatureSupportClient) DataProtectionCheckFeatureSupport(ctx context.C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalFeatureValidationResponseBaseImplementation(respObj) + model, err := UnmarshalFeatureValidationResponseBaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequest.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequest.go index 245619e2f34..1c4657b517a 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequest.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequest.go @@ -15,6 +15,14 @@ type FeatureValidationRequest struct { FeatureType *FeatureType `json:"featureType,omitempty"` // Fields inherited from FeatureValidationRequestBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationRequest) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return BaseFeatureValidationRequestBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationRequest{} @@ -28,9 +36,10 @@ func (s FeatureValidationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationRequest: %+v", err) } + decoded["objectType"] = "FeatureValidationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequestbase.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequestbase.go index 80efd7fd693..8e51d6587e0 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequestbase.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationrequestbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationRequestBase interface { + FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl } -// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationRequestBase = BaseFeatureValidationRequestBaseImpl{} + +type BaseFeatureValidationRequestBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s +} + +var _ FeatureValidationRequestBase = RawFeatureValidationRequestBaseImpl{} + +// RawFeatureValidationRequestBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationRequestBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationRequestBase BaseFeatureValidationRequestBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationRequestBaseImpl) FeatureValidationRequestBase() BaseFeatureValidationRequestBaseImpl { + return s.featureValidationRequestBase } -func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { +func UnmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureValidationRequestBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationRequestBaseImplementation(input []byte) (FeatureV return out, nil } - out := RawFeatureValidationRequestBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationRequestBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationRequestBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationRequestBaseImpl{ + featureValidationRequestBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponse.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponse.go index cf7a0191334..05506b82ee9 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponse.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponse.go @@ -15,6 +15,14 @@ type FeatureValidationResponse struct { Features *[]SupportedFeature `json:"features,omitempty"` // Fields inherited from FeatureValidationResponseBase + + ObjectType string `json:"objectType"` +} + +func (s FeatureValidationResponse) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return BaseFeatureValidationResponseBaseImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = FeatureValidationResponse{} @@ -28,9 +36,10 @@ func (s FeatureValidationResponse) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureValidationResponse: %+v", err) } + decoded["objectType"] = "FeatureValidationResponse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponsebase.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponsebase.go index 77514fd0908..2856f973105 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponsebase.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/model_featurevalidationresponsebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureValidationResponseBase interface { + FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl } -// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureValidationResponseBase = BaseFeatureValidationResponseBaseImpl{} + +type BaseFeatureValidationResponseBaseImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s +} + +var _ FeatureValidationResponseBase = RawFeatureValidationResponseBaseImpl{} + +// RawFeatureValidationResponseBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureValidationResponseBaseImpl struct { - Type string - Values map[string]interface{} + featureValidationResponseBase BaseFeatureValidationResponseBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureValidationResponseBaseImpl) FeatureValidationResponseBase() BaseFeatureValidationResponseBaseImpl { + return s.featureValidationResponseBase } -func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { +func UnmarshalFeatureValidationResponseBaseImplementation(input []byte) (FeatureValidationResponseBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalFeatureValidationResponseBaseImplementation(input []byte) (Feature return out, nil } - out := RawFeatureValidationResponseBaseImpl{ - Type: value, - Values: temp, + var parent BaseFeatureValidationResponseBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureValidationResponseBaseImpl: %+v", err) } - return out, nil + + return RawFeatureValidationResponseBaseImpl{ + featureValidationResponseBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/version.go b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/version.go index eb22d1ac312..f8fdad129cf 100644 --- a/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/version.go +++ b/resource-manager/dataprotection/2024-04-01/dppfeaturesupport/version.go @@ -1,12 +1,10 @@ package dppfeaturesupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppfeaturesupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppfeaturesupport/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/README.md b/resource-manager/dataprotection/2024-04-01/dppjob/README.md index ecb18342127..bbb148b0af3 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/README.md +++ b/resource-manager/dataprotection/2024-04-01/dppjob/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/dppjob` Documentation -The `dppjob` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `dppjob` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/client.go b/resource-manager/dataprotection/2024-04-01/dppjob/client.go index 0d6159de0c6..d492231a2c4 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/client.go +++ b/resource-manager/dataprotection/2024-04-01/dppjob/client.go @@ -15,7 +15,7 @@ type DppJobClient struct { } func NewDppJobClientWithBaseURI(sdkApi sdkEnv.Api) (*DppJobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppjob", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppjob", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppJobClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/id_providerlocation.go b/resource-manager/dataprotection/2024-04-01/dppjob/id_providerlocation.go index 9e8309b040d..c8443293e1d 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-04-01/dppjob/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobget.go b/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobget.go index 9635b5ff158..2e95534048b 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobget.go +++ b/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobget.go @@ -50,7 +50,6 @@ func (c DppJobClient) FetchCrossRegionRestoreJobGet(ctx context.Context, id Prov var model AzureBackupJobResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobslist.go b/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobslist.go index 48d719aa3cb..46b0baf9b3a 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobslist.go +++ b/resource-manager/dataprotection/2024-04-01/dppjob/method_fetchcrossregionrestorejobslist.go @@ -39,6 +39,7 @@ func (o FetchCrossRegionRestoreJobsListOperationOptions) ToHeaders() *client.Hea func (o FetchCrossRegionRestoreJobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/dppjob/version.go b/resource-manager/dataprotection/2024-04-01/dppjob/version.go index 99425ee09c5..b78c6bce19f 100644 --- a/resource-manager/dataprotection/2024-04-01/dppjob/version.go +++ b/resource-manager/dataprotection/2024-04-01/dppjob/version.go @@ -1,12 +1,10 @@ package dppjob -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppjob/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppjob/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/README.md b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/README.md index 92d27602337..68c396cbd59 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/README.md +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies` Documentation -The `dppresourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `dppresourceguardproxies` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/client.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/client.go index f44efd92c08..d0374e7e5bc 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/client.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/client.go @@ -15,7 +15,7 @@ type DppResourceGuardProxiesClient struct { } func NewDppResourceGuardProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DppResourceGuardProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dppresourceguardproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DppResourceGuardProxiesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupresourceguardproxy.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupresourceguardproxy.go index a6f07c8cb77..eed9974ebe7 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupresourceguardproxy.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupvault.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupvault.go index e495aa166e4..f9b6a081a8f 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupvault.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/id_backupvault.go @@ -42,7 +42,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go index a59d9ee6c52..f66d7644b9c 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxycreateorupdate.go @@ -49,7 +49,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyCreateOrUpdate(ctx c var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyget.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyget.go index 33b05521f54..a2c7afa278b 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyget.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyget.go @@ -45,7 +45,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyGet(ctx context.Cont var model ResourceGuardProxyBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go index 0f893ab03d6..b823f13895a 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/method_dppresourceguardproxyunlockdelete.go @@ -36,6 +36,7 @@ func (o DppResourceGuardProxyUnlockDeleteOperationOptions) ToHeaders() *client.H func (o DppResourceGuardProxyUnlockDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DppResourceGuardProxiesClient) DppResourceGuardProxyUnlockDelete(ctx con var model UnlockDeleteResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/version.go b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/version.go index a0cdd34fe55..d8feed82a11 100644 --- a/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/version.go +++ b/resource-manager/dataprotection/2024-04-01/dppresourceguardproxies/version.go @@ -1,12 +1,10 @@ package dppresourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dppresourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dppresourceguardproxies/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/README.md b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/README.md index 36c620284eb..6ef1246e953 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/README.md +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints` Documentation -The `fetchsecondaryrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `fetchsecondaryrecoverypoints` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/client.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/client.go index 0ac726e9656..b57013621a5 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/client.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/client.go @@ -15,7 +15,7 @@ type FetchSecondaryRecoveryPointsClient struct { } func NewFetchSecondaryRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*FetchSecondaryRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fetchsecondaryrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FetchSecondaryRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/id_providerlocation.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/id_providerlocation.go index 72b7a004674..a720695daf7 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/id_providerlocation.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/method_list.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/method_list.go index 26723b92a47..529ba019df0 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/method_list.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go index 33e554f5b79..87fc8c24a23 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go index 81815b8b85c..6cfd9ea0524 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go index b09db4ee8cd..3a953277061 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/version.go b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/version.go index 98346fda9bd..95386e36fee 100644 --- a/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/version.go +++ b/resource-manager/dataprotection/2024-04-01/fetchsecondaryrecoverypoints/version.go @@ -1,12 +1,10 @@ package fetchsecondaryrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchsecondaryrecoverypoints/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/README.md b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/README.md index 7322509ad29..f565c8e9308 100644 --- a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/README.md +++ b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges` Documentation -The `findrestorabletimeranges` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `findrestorabletimeranges` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/client.go b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/client.go index bfd1fda26df..d342b80d165 100644 --- a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/client.go +++ b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/client.go @@ -15,7 +15,7 @@ type FindRestorableTimeRangesClient struct { } func NewFindRestorableTimeRangesClientWithBaseURI(sdkApi sdkEnv.Api) (*FindRestorableTimeRangesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "findrestorabletimeranges", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FindRestorableTimeRangesClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/id_backupinstance.go b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/id_backupinstance.go index 25f53ef1e8a..0cf75c2d2df 100644 --- a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/method_restorabletimerangesfind.go b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/method_restorabletimerangesfind.go index a0c43a05b78..fab15204651 100644 --- a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/method_restorabletimerangesfind.go +++ b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/method_restorabletimerangesfind.go @@ -50,7 +50,6 @@ func (c FindRestorableTimeRangesClient) RestorableTimeRangesFind(ctx context.Con var model AzureBackupFindRestorableTimeRangesResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/version.go b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/version.go index 515ceb0ad09..b3b779f8aa0 100644 --- a/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/version.go +++ b/resource-manager/dataprotection/2024-04-01/findrestorabletimeranges/version.go @@ -1,12 +1,10 @@ package findrestorabletimeranges -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/findrestorabletimeranges/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/findrestorabletimeranges/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/README.md b/resource-manager/dataprotection/2024-04-01/recoverypoint/README.md index 38fde1ef01c..30375d6c2bc 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/README.md +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/client.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/client.go index d58f74c6c6a..3808ce1905f 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/client.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/client.go @@ -15,7 +15,7 @@ type RecoveryPointClient struct { } func NewRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/id_backupinstance.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/id_backupinstance.go index ae213017beb..3951fd7bc79 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/id_backupinstance.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/id_backupinstance.go @@ -44,7 +44,7 @@ func ParseBackupInstanceID(input string) (*BackupInstanceId, error) { } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupInstanceIDInsensitively(input string) (*BackupInstanceId, error) } id := BackupInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/id_recoverypoint.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/id_recoverypoint.go index 8a6823eb8aa..0cf676d8e2e 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/id_recoverypoint.go @@ -46,7 +46,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/method_get.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/method_get.go index aef9f3c1f69..527ea0e9599 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointClient) Get(ctx context.Context, id RecoveryPointId) (resul var model AzureBackupRecoveryPointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/method_list.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/method_list.go index ace5d834658..8c3642589d9 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/method_list.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go index ecc3e64361c..b5e2e8ff589 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackupdiscreterecoverypoint.go @@ -24,6 +24,14 @@ type AzureBackupDiscreteRecoveryPoint struct { RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` // Fields inherited from AzureBackupRecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureBackupDiscreteRecoveryPoint) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return BaseAzureBackupRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureBackupDiscreteRecoveryPoint{} @@ -37,9 +45,10 @@ func (s AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupDiscreteRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureBackupDiscreteRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypoint.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypoint.go index 384f69a0f65..8824a972a2a 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypoint.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureBackupRecoveryPoint interface { + AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl } -// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureBackupRecoveryPoint = BaseAzureBackupRecoveryPointImpl{} + +type BaseAzureBackupRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s +} + +var _ AzureBackupRecoveryPoint = RawAzureBackupRecoveryPointImpl{} + +// RawAzureBackupRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureBackupRecoveryPointImpl struct { - Type string - Values map[string]interface{} + azureBackupRecoveryPoint BaseAzureBackupRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureBackupRecoveryPointImpl) AzureBackupRecoveryPoint() BaseAzureBackupRecoveryPointImpl { + return s.azureBackupRecoveryPoint } -func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { +func UnmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupRecoveryPoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureBackupRecoveryPointImplementation(input []byte) (AzureBackupR return out, nil } - out := RawAzureBackupRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseAzureBackupRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureBackupRecoveryPointImpl: %+v", err) } - return out, nil + + return RawAzureBackupRecoveryPointImpl{ + azureBackupRecoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypointresource.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypointresource.go index 8f11d9bda9d..e7302b20ae8 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypointresource.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/model_azurebackuprecoverypointresource.go @@ -38,7 +38,7 @@ func (s *AzureBackupRecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAzureBackupRecoveryPointImplementation(v) + impl, err := UnmarshalAzureBackupRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AzureBackupRecoveryPointResource': %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/recoverypoint/version.go b/resource-manager/dataprotection/2024-04-01/recoverypoint/version.go index 6dd0d8881d3..6c623138462 100644 --- a/resource-manager/dataprotection/2024-04-01/recoverypoint/version.go +++ b/resource-manager/dataprotection/2024-04-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2024-04-01" } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/README.md b/resource-manager/dataprotection/2024-04-01/resourceguards/README.md index 5e568680884..48903094a49 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/README.md +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/resourceguards` Documentation -The `resourceguards` SDK allows for interaction with the Azure Resource Manager Service `dataprotection` (API Version `2024-04-01`). +The `resourceguards` SDK allows for interaction with Azure Resource Manager `dataprotection` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/client.go b/resource-manager/dataprotection/2024-04-01/resourceguards/client.go index 2a79980112d..0f0913402ff 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/client.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/client.go @@ -15,7 +15,7 @@ type ResourceGuardsClient struct { } func NewResourceGuardsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGuardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceguards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceguards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGuardsClient: %+v", err) } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteprotecteditemrequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteprotecteditemrequest.go index 797704c5a13..60a37b80109 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteprotecteditemrequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseDeleteProtectedItemRequestID(input string) (*DeleteProtectedItemReques } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteProtectedItemRequestIDInsensitively(input string) (*DeleteProtec } id := DeleteProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteresourceguardproxyrequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteresourceguardproxyrequest.go index 698fd773b09..1d6e985f86a 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteresourceguardproxyrequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_deleteresourceguardproxyrequest.go @@ -44,7 +44,7 @@ func ParseDeleteResourceGuardProxyRequestID(input string) (*DeleteResourceGuardP } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteResourceGuardProxyRequestIDInsensitively(input string) (*DeleteR } id := DeleteResourceGuardProxyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_disablesoftdeleterequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_disablesoftdeleterequest.go index a4a28e2d325..895f4edf5ba 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_disablesoftdeleterequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_disablesoftdeleterequest.go @@ -44,7 +44,7 @@ func ParseDisableSoftDeleteRequestID(input string) (*DisableSoftDeleteRequestId, } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisableSoftDeleteRequestIDInsensitively(input string) (*DisableSoftDel } id := DisableSoftDeleteRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_getbackupsecuritypinrequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_getbackupsecuritypinrequest.go index 9975ae3fc13..6181e271847 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_getbackupsecuritypinrequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_getbackupsecuritypinrequest.go @@ -44,7 +44,7 @@ func ParseGetBackupSecurityPINRequestID(input string) (*GetBackupSecurityPINRequ } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGetBackupSecurityPINRequestIDInsensitively(input string) (*GetBackupSe } id := GetBackupSecurityPINRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_resourceguard.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_resourceguard.go index db774ade737..c6c0804b636 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_resourceguard.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_resourceguard.go @@ -42,7 +42,7 @@ func ParseResourceGuardID(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGuardIDInsensitively(input string) (*ResourceGuardId, error) { } id := ResourceGuardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotecteditemrequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotecteditemrequest.go index b49508843a6..41ef782ccd4 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotecteditemrequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotecteditemrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectedItemRequestID(input string) (*UpdateProtectedItemReques } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectedItemRequestIDInsensitively(input string) (*UpdateProtec } id := UpdateProtectedItemRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotectionpolicyrequest.go b/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotectionpolicyrequest.go index d1a6daf9f64..bdd5ac39cd4 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotectionpolicyrequest.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/id_updateprotectionpolicyrequest.go @@ -44,7 +44,7 @@ func ParseUpdateProtectionPolicyRequestID(input string) (*UpdateProtectionPolicy } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpdateProtectionPolicyRequestIDInsensitively(input string) (*UpdatePro } id := UpdateProtectionPolicyRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_get.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_get.go index e95a3d77f1b..8c3fae9b334 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_get.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_get.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) Get(ctx context.Context, id ResourceGuardId) (resu var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go index 4638718dc46..c4c17baa63e 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultbackupsecuritypinrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go index b3a996b5514..01a918c9ed2 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go index 82604a5c9ed..94bb22e07d2 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdeleteresourceguardproxyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(c var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go index e618503da42..cf1270f04a5 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultdisablesoftdeleterequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx cont var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go index 13158cedebe..22159bc163f 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotecteditemrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx co var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go index ed3cb61d2f0..a2389d2fd93 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_getdefaultupdateprotectionpolicyrequestsobject.go @@ -45,7 +45,6 @@ func (c ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx var model DppBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_patch.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_patch.go index 1c4cf4482c6..0f38b0517b3 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_patch.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_patch.go @@ -49,7 +49,6 @@ func (c ResourceGuardsClient) Patch(ctx context.Context, id ResourceGuardId, inp var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/method_put.go b/resource-manager/dataprotection/2024-04-01/resourceguards/method_put.go index 1f0339e6424..c71ad58adca 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/method_put.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/method_put.go @@ -50,7 +50,6 @@ func (c ResourceGuardsClient) Put(ctx context.Context, id ResourceGuardId, input var model ResourceGuardResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dataprotection/2024-04-01/resourceguards/version.go b/resource-manager/dataprotection/2024-04-01/resourceguards/version.go index 501ce9c5d02..81caf2256b2 100644 --- a/resource-manager/dataprotection/2024-04-01/resourceguards/version.go +++ b/resource-manager/dataprotection/2024-04-01/resourceguards/version.go @@ -1,12 +1,10 @@ package resourceguards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguards/2024-04-01" } diff --git a/resource-manager/datashare/2019-11-01/account/README.md b/resource-manager/datashare/2019-11-01/account/README.md index f7305bf9a87..45401bb13ba 100644 --- a/resource-manager/datashare/2019-11-01/account/README.md +++ b/resource-manager/datashare/2019-11-01/account/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/account` Documentation -The `account` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `account` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/account/client.go b/resource-manager/datashare/2019-11-01/account/client.go index 4bcb9151fc1..ca8361d93ef 100644 --- a/resource-manager/datashare/2019-11-01/account/client.go +++ b/resource-manager/datashare/2019-11-01/account/client.go @@ -15,7 +15,7 @@ type AccountClient struct { } func NewAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "account", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "account", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/account/id_account.go b/resource-manager/datashare/2019-11-01/account/id_account.go index 2ac7dbcbfe8..09dca0eacb9 100644 --- a/resource-manager/datashare/2019-11-01/account/id_account.go +++ b/resource-manager/datashare/2019-11-01/account/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/account/method_get.go b/resource-manager/datashare/2019-11-01/account/method_get.go index 6fc12dff8ca..50b88c8421d 100644 --- a/resource-manager/datashare/2019-11-01/account/method_get.go +++ b/resource-manager/datashare/2019-11-01/account/method_get.go @@ -45,7 +45,6 @@ func (c AccountClient) Get(ctx context.Context, id AccountId) (result GetOperati var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/account/method_update.go b/resource-manager/datashare/2019-11-01/account/method_update.go index bfeb0bd2daa..dcc8639fead 100644 --- a/resource-manager/datashare/2019-11-01/account/method_update.go +++ b/resource-manager/datashare/2019-11-01/account/method_update.go @@ -49,7 +49,6 @@ func (c AccountClient) Update(ctx context.Context, id AccountId, input AccountUp var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/account/version.go b/resource-manager/datashare/2019-11-01/account/version.go index ceae4cb3a05..6ee8856f384 100644 --- a/resource-manager/datashare/2019-11-01/account/version.go +++ b/resource-manager/datashare/2019-11-01/account/version.go @@ -1,12 +1,10 @@ package account -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/account/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/account/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/README.md b/resource-manager/datashare/2019-11-01/consumerinvitation/README.md index 00c7112f161..3e8d0b325c2 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/README.md +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/consumerinvitation` Documentation -The `consumerinvitation` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `consumerinvitation` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/client.go b/resource-manager/datashare/2019-11-01/consumerinvitation/client.go index 0216e707521..7d2f1c95344 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/client.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/client.go @@ -15,7 +15,7 @@ type ConsumerInvitationClient struct { } func NewConsumerInvitationClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerInvitationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "consumerinvitation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "consumerinvitation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConsumerInvitationClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/id_consumerinvitation.go b/resource-manager/datashare/2019-11-01/consumerinvitation/id_consumerinvitation.go index 39dfdb3a8c5..e0718b0b5f9 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/id_consumerinvitation.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/id_consumerinvitation.go @@ -40,7 +40,7 @@ func ParseConsumerInvitationID(input string) (*ConsumerInvitationId, error) { } id := ConsumerInvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseConsumerInvitationIDInsensitively(input string) (*ConsumerInvitationId } id := ConsumerInvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/id_location.go b/resource-manager/datashare/2019-11-01/consumerinvitation/id_location.go index 8b99bba6e09..002843fd7ff 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/id_location.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/method_get.go b/resource-manager/datashare/2019-11-01/consumerinvitation/method_get.go index 17503763224..efb2943ba73 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/method_get.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/method_get.go @@ -45,7 +45,6 @@ func (c ConsumerInvitationClient) Get(ctx context.Context, id ConsumerInvitation var model ConsumerInvitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/method_rejectinvitation.go b/resource-manager/datashare/2019-11-01/consumerinvitation/method_rejectinvitation.go index ee8b51fe7d9..7534c96ffd5 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/method_rejectinvitation.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/method_rejectinvitation.go @@ -50,7 +50,6 @@ func (c ConsumerInvitationClient) RejectInvitation(ctx context.Context, id Locat var model ConsumerInvitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/consumerinvitation/version.go b/resource-manager/datashare/2019-11-01/consumerinvitation/version.go index d874007ca63..ff21182c6f3 100644 --- a/resource-manager/datashare/2019-11-01/consumerinvitation/version.go +++ b/resource-manager/datashare/2019-11-01/consumerinvitation/version.go @@ -1,12 +1,10 @@ package consumerinvitation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/consumerinvitation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/consumerinvitation/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/dataset/README.md b/resource-manager/datashare/2019-11-01/dataset/README.md index e6d75823f62..5e11421e6e0 100644 --- a/resource-manager/datashare/2019-11-01/dataset/README.md +++ b/resource-manager/datashare/2019-11-01/dataset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/dataset` Documentation -The `dataset` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `dataset` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/dataset/client.go b/resource-manager/datashare/2019-11-01/dataset/client.go index 13f0f3936d4..de2af2f4bc5 100644 --- a/resource-manager/datashare/2019-11-01/dataset/client.go +++ b/resource-manager/datashare/2019-11-01/dataset/client.go @@ -15,7 +15,7 @@ type DataSetClient struct { } func NewDataSetClientWithBaseURI(sdkApi sdkEnv.Api) (*DataSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataSetClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/dataset/id_dataset.go b/resource-manager/datashare/2019-11-01/dataset/id_dataset.go index fa49264829d..afafb3e8b69 100644 --- a/resource-manager/datashare/2019-11-01/dataset/id_dataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/id_dataset.go @@ -46,7 +46,7 @@ func ParseDataSetID(input string) (*DataSetId, error) { } id := DataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataSetIDInsensitively(input string) (*DataSetId, error) { } id := DataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/dataset/id_share.go b/resource-manager/datashare/2019-11-01/dataset/id_share.go index 0919ab0c78d..0c014f997cc 100644 --- a/resource-manager/datashare/2019-11-01/dataset/id_share.go +++ b/resource-manager/datashare/2019-11-01/dataset/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/dataset/method_create.go b/resource-manager/datashare/2019-11-01/dataset/method_create.go index cd421171a65..166e70c1e1b 100644 --- a/resource-manager/datashare/2019-11-01/dataset/method_create.go +++ b/resource-manager/datashare/2019-11-01/dataset/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSet + Model DataSet } // Create ... @@ -53,11 +53,11 @@ func (c DataSetClient) Create(ctx context.Context, id DataSetId, input DataSet) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetImplementation(respObj) + model, err := UnmarshalDataSetImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/dataset/method_get.go b/resource-manager/datashare/2019-11-01/dataset/method_get.go index 7b38a729130..196e988a411 100644 --- a/resource-manager/datashare/2019-11-01/dataset/method_get.go +++ b/resource-manager/datashare/2019-11-01/dataset/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSet + Model DataSet } // Get ... @@ -48,11 +48,11 @@ func (c DataSetClient) Get(ctx context.Context, id DataSetId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetImplementation(respObj) + model, err := UnmarshalDataSetImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go b/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go index 0cd5cf0bd96..b53d40106bb 100644 --- a/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go +++ b/resource-manager/datashare/2019-11-01/dataset/method_listbyshare.go @@ -41,6 +41,7 @@ func (o ListByShareOperationOptions) ToHeaders() *client.Headers { func (o ListByShareOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c DataSetClient) ListByShare(ctx context.Context, id ShareId, options List temp := make([]DataSet, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataSetImplementation(v) + val, err := UnmarshalDataSetImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataSet (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1filedataset.go b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1filedataset.go index f5e09903ee4..b4f6929b970 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1filedataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1filedataset.go @@ -14,9 +14,20 @@ type ADLSGen1FileDataSet struct { Properties ADLSGen1FileProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen1FileDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen1FileDataSet{} @@ -30,9 +41,10 @@ func (s ADLSGen1FileDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen1FileDataSet: %+v", err) } + decoded["kind"] = "AdlsGen1File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1folderdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1folderdataset.go index 6be08cf392a..ce1910ea570 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1folderdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen1folderdataset.go @@ -14,9 +14,20 @@ type ADLSGen1FolderDataSet struct { Properties ADLSGen1FolderProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen1FolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen1FolderDataSet{} @@ -30,9 +41,10 @@ func (s ADLSGen1FolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen1FolderDataSet: %+v", err) } + decoded["kind"] = "AdlsGen1Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filedataset.go b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filedataset.go index d51cce78f58..bc79aafe386 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filedataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filedataset.go @@ -14,9 +14,20 @@ type ADLSGen2FileDataSet struct { Properties ADLSGen2FileProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FileDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FileDataSet{} @@ -30,9 +41,10 @@ func (s ADLSGen2FileDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filesystemdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filesystemdataset.go index 527d9d38791..f86d7e2953f 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filesystemdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2filesystemdataset.go @@ -14,9 +14,20 @@ type ADLSGen2FileSystemDataSet struct { Properties ADLSGen2FileSystemProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FileSystemDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FileSystemDataSet{} @@ -30,9 +41,10 @@ func (s ADLSGen2FileSystemDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileSystemDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2FileSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2folderdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2folderdataset.go index bbd0eb960d6..772b4bb7a9a 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2folderdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_adlsgen2folderdataset.go @@ -14,9 +14,20 @@ type ADLSGen2FolderDataSet struct { Properties ADLSGen2FolderProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FolderDataSet{} @@ -30,9 +41,10 @@ func (s ADLSGen2FolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FolderDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_blobcontainerdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_blobcontainerdataset.go index 1e24d2f2849..bd8ce0d0959 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_blobcontainerdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_blobcontainerdataset.go @@ -14,9 +14,20 @@ type BlobContainerDataSet struct { Properties BlobContainerProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobContainerDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobContainerDataSet{} @@ -30,9 +41,10 @@ func (s BlobContainerDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobContainerDataSet: %+v", err) } + decoded["kind"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_blobdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_blobdataset.go index b26fb8f16aa..585f4eecb22 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_blobdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_blobdataset.go @@ -14,9 +14,20 @@ type BlobDataSet struct { Properties BlobProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobDataSet{} @@ -30,9 +41,10 @@ func (s BlobDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobDataSet: %+v", err) } + decoded["kind"] = "Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_blobfolderdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_blobfolderdataset.go index 4ab5a200c42..344659d5ba4 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_blobfolderdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_blobfolderdataset.go @@ -14,9 +14,20 @@ type BlobFolderDataSet struct { Properties BlobFolderProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobFolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobFolderDataSet{} @@ -30,9 +41,10 @@ func (s BlobFolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobFolderDataSet: %+v", err) } + decoded["kind"] = "BlobFolder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_dataset.go b/resource-manager/datashare/2019-11-01/dataset/model_dataset.go index 1b6be39fc67..0c4b4e52238 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_dataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_dataset.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataSet interface { + DataSet() BaseDataSetImpl } -// RawDataSetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataSet = BaseDataSetImpl{} + +type BaseDataSetImpl struct { + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataSetImpl) DataSet() BaseDataSetImpl { + return s +} + +var _ DataSet = RawDataSetImpl{} + +// RawDataSetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataSetImpl struct { - Type string - Values map[string]interface{} + dataSet BaseDataSetImpl + Type string + Values map[string]interface{} +} + +func (s RawDataSetImpl) DataSet() BaseDataSetImpl { + return s.dataSet } -func unmarshalDataSetImplementation(input []byte) (DataSet, error) { +func UnmarshalDataSetImplementation(input []byte) (DataSet, error) { if input == nil { return nil, nil } @@ -132,10 +152,15 @@ func unmarshalDataSetImplementation(input []byte) (DataSet, error) { return out, nil } - out := RawDataSetImpl{ - Type: value, - Values: temp, + var parent BaseDataSetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataSetImpl: %+v", err) } - return out, nil + + return RawDataSetImpl{ + dataSet: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2019-11-01/dataset/model_kustoclusterdataset.go b/resource-manager/datashare/2019-11-01/dataset/model_kustoclusterdataset.go index 5383c37db97..bdad95e2c71 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_kustoclusterdataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_kustoclusterdataset.go @@ -14,9 +14,20 @@ type KustoClusterDataSet struct { Properties KustoClusterDataSetProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s KustoClusterDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = KustoClusterDataSet{} @@ -30,9 +41,10 @@ func (s KustoClusterDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoClusterDataSet: %+v", err) } + decoded["kind"] = "KustoCluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_kustodatabasedataset.go b/resource-manager/datashare/2019-11-01/dataset/model_kustodatabasedataset.go index 9d7c00754d7..0a0e85f8d1f 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_kustodatabasedataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_kustodatabasedataset.go @@ -14,9 +14,20 @@ type KustoDatabaseDataSet struct { Properties KustoDatabaseDataSetProperties `json:"properties"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s KustoDatabaseDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = KustoDatabaseDataSet{} @@ -30,9 +41,10 @@ func (s KustoDatabaseDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoDatabaseDataSet: %+v", err) } + decoded["kind"] = "KustoDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_sqldbtabledataset.go b/resource-manager/datashare/2019-11-01/dataset/model_sqldbtabledataset.go index 4dc4e4bbd88..fb770ffe262 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_sqldbtabledataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_sqldbtabledataset.go @@ -14,9 +14,20 @@ type SqlDBTableDataSet struct { Properties *SqlDBTableProperties `json:"properties,omitempty"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SqlDBTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SqlDBTableDataSet{} @@ -30,9 +41,10 @@ func (s SqlDBTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDBTableDataSet: %+v", err) } + decoded["kind"] = "SqlDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/model_sqldwtabledataset.go b/resource-manager/datashare/2019-11-01/dataset/model_sqldwtabledataset.go index f9b8a87f5a2..19c0904a399 100644 --- a/resource-manager/datashare/2019-11-01/dataset/model_sqldwtabledataset.go +++ b/resource-manager/datashare/2019-11-01/dataset/model_sqldwtabledataset.go @@ -14,9 +14,20 @@ type SqlDWTableDataSet struct { Properties *SqlDWTableProperties `json:"properties,omitempty"` // Fields inherited from DataSet - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SqlDWTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SqlDWTableDataSet{} @@ -30,9 +41,10 @@ func (s SqlDWTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWTableDataSet: %+v", err) } + decoded["kind"] = "SqlDWTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/dataset/version.go b/resource-manager/datashare/2019-11-01/dataset/version.go index 63478e818f6..5c3cd176961 100644 --- a/resource-manager/datashare/2019-11-01/dataset/version.go +++ b/resource-manager/datashare/2019-11-01/dataset/version.go @@ -1,12 +1,10 @@ package dataset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataset/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/README.md b/resource-manager/datashare/2019-11-01/datasetmapping/README.md index 594ad3474d0..8be9dec53a4 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/README.md +++ b/resource-manager/datashare/2019-11-01/datasetmapping/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/datasetmapping` Documentation -The `datasetmapping` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `datasetmapping` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/client.go b/resource-manager/datashare/2019-11-01/datasetmapping/client.go index bd30238ef39..3f513487b3b 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/client.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/client.go @@ -15,7 +15,7 @@ type DataSetMappingClient struct { } func NewDataSetMappingClientWithBaseURI(sdkApi sdkEnv.Api) (*DataSetMappingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datasetmapping", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datasetmapping", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataSetMappingClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/id_datasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/id_datasetmapping.go index f14508082d9..f09a67dd4b6 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/id_datasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/id_datasetmapping.go @@ -46,7 +46,7 @@ func ParseDataSetMappingID(input string) (*DataSetMappingId, error) { } id := DataSetMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataSetMappingIDInsensitively(input string) (*DataSetMappingId, error) } id := DataSetMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/id_sharesubscription.go b/resource-manager/datashare/2019-11-01/datasetmapping/id_sharesubscription.go index 0a270169e0a..72ad91f5b5f 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/id_sharesubscription.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/method_create.go b/resource-manager/datashare/2019-11-01/datasetmapping/method_create.go index 8707c000f60..37a5c6b7525 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/method_create.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSetMapping + Model DataSetMapping } // Create ... @@ -53,11 +53,11 @@ func (c DataSetMappingClient) Create(ctx context.Context, id DataSetMappingId, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetMappingImplementation(respObj) + model, err := UnmarshalDataSetMappingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/method_get.go b/resource-manager/datashare/2019-11-01/datasetmapping/method_get.go index 40ebb078b74..a1c4c89ef77 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/method_get.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSetMapping + Model DataSetMapping } // Get ... @@ -48,11 +48,11 @@ func (c DataSetMappingClient) Get(ctx context.Context, id DataSetMappingId) (res if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetMappingImplementation(respObj) + model, err := UnmarshalDataSetMappingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/method_listbysharesubscription.go b/resource-manager/datashare/2019-11-01/datasetmapping/method_listbysharesubscription.go index f0686132b96..ec0bbe0535a 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/method_listbysharesubscription.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/method_listbysharesubscription.go @@ -41,6 +41,7 @@ func (o ListByShareSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListByShareSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c DataSetMappingClient) ListByShareSubscription(ctx context.Context, id Sh temp := make([]DataSetMapping, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataSetMappingImplementation(v) + val, err := UnmarshalDataSetMappingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataSetMapping (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filedatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filedatasetmapping.go index 3f1a0306cec..314006596e5 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filedatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filedatasetmapping.go @@ -14,9 +14,20 @@ type ADLSGen2FileDataSetMapping struct { Properties ADLSGen2FileDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FileDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FileDataSetMapping{} @@ -30,9 +41,10 @@ func (s ADLSGen2FileDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go index ee9927bc610..e93e160b124 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go @@ -14,9 +14,20 @@ type ADLSGen2FileSystemDataSetMapping struct { Properties ADLSGen2FileSystemDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FileSystemDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FileSystemDataSetMapping{} @@ -30,9 +41,10 @@ func (s ADLSGen2FileSystemDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileSystemDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2FileSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2folderdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2folderdatasetmapping.go index 5f95be1b7a3..d1a6339081a 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2folderdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_adlsgen2folderdatasetmapping.go @@ -14,9 +14,20 @@ type ADLSGen2FolderDataSetMapping struct { Properties ADLSGen2FolderDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ADLSGen2FolderDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ADLSGen2FolderDataSetMapping{} @@ -30,9 +41,10 @@ func (s ADLSGen2FolderDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FolderDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobcontainerdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobcontainerdatasetmapping.go index 7d3e9b56a37..f98357678df 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobcontainerdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobcontainerdatasetmapping.go @@ -14,9 +14,20 @@ type BlobContainerDataSetMapping struct { Properties BlobContainerMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobContainerDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobContainerDataSetMapping{} @@ -30,9 +41,10 @@ func (s BlobContainerDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobContainerDataSetMapping: %+v", err) } + decoded["kind"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobdatasetmapping.go index ef9a74df4bf..32588b637bd 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobdatasetmapping.go @@ -14,9 +14,20 @@ type BlobDataSetMapping struct { Properties BlobMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobDataSetMapping{} @@ -30,9 +41,10 @@ func (s BlobDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobDataSetMapping: %+v", err) } + decoded["kind"] = "Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobfolderdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobfolderdatasetmapping.go index 76e43a6a8bc..e193bacc74e 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_blobfolderdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_blobfolderdatasetmapping.go @@ -14,9 +14,20 @@ type BlobFolderDataSetMapping struct { Properties BlobFolderMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BlobFolderDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = BlobFolderDataSetMapping{} @@ -30,9 +41,10 @@ func (s BlobFolderDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobFolderDataSetMapping: %+v", err) } + decoded["kind"] = "BlobFolder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_datasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_datasetmapping.go index d8586bd5833..78c890f0c76 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_datasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_datasetmapping.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataSetMapping interface { + DataSetMapping() BaseDataSetMappingImpl } -// RawDataSetMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataSetMapping = BaseDataSetMappingImpl{} + +type BaseDataSetMappingImpl struct { + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataSetMappingImpl) DataSetMapping() BaseDataSetMappingImpl { + return s +} + +var _ DataSetMapping = RawDataSetMappingImpl{} + +// RawDataSetMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataSetMappingImpl struct { - Type string - Values map[string]interface{} + dataSetMapping BaseDataSetMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawDataSetMappingImpl) DataSetMapping() BaseDataSetMappingImpl { + return s.dataSetMapping } -func unmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) { +func UnmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) { if input == nil { return nil, nil } @@ -116,10 +136,15 @@ func unmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) return out, nil } - out := RawDataSetMappingImpl{ - Type: value, - Values: temp, + var parent BaseDataSetMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataSetMappingImpl: %+v", err) } - return out, nil + + return RawDataSetMappingImpl{ + dataSetMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_kustoclusterdatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_kustoclusterdatasetmapping.go index db742a7b92b..460522450e5 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_kustoclusterdatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_kustoclusterdatasetmapping.go @@ -14,9 +14,20 @@ type KustoClusterDataSetMapping struct { Properties KustoClusterDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s KustoClusterDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = KustoClusterDataSetMapping{} @@ -30,9 +41,10 @@ func (s KustoClusterDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoClusterDataSetMapping: %+v", err) } + decoded["kind"] = "KustoCluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_kustodatabasedatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_kustodatabasedatasetmapping.go index 5f70dc2a08e..32232bb6b35 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_kustodatabasedatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_kustodatabasedatasetmapping.go @@ -14,9 +14,20 @@ type KustoDatabaseDataSetMapping struct { Properties KustoDatabaseDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s KustoDatabaseDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = KustoDatabaseDataSetMapping{} @@ -30,9 +41,10 @@ func (s KustoDatabaseDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoDatabaseDataSetMapping: %+v", err) } + decoded["kind"] = "KustoDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldbtabledatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldbtabledatasetmapping.go index 0bf8a840316..0780b1cf3e7 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldbtabledatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldbtabledatasetmapping.go @@ -14,9 +14,20 @@ type SqlDBTableDataSetMapping struct { Properties SqlDBTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SqlDBTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SqlDBTableDataSetMapping{} @@ -30,9 +41,10 @@ func (s SqlDBTableDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDBTableDataSetMapping: %+v", err) } + decoded["kind"] = "SqlDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldwtabledatasetmapping.go b/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldwtabledatasetmapping.go index 5e86d55c5f4..2d1c07ada0a 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldwtabledatasetmapping.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/model_sqldwtabledatasetmapping.go @@ -14,9 +14,20 @@ type SqlDWTableDataSetMapping struct { Properties SqlDWTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s SqlDWTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SqlDWTableDataSetMapping{} @@ -30,9 +41,10 @@ func (s SqlDWTableDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWTableDataSetMapping: %+v", err) } + decoded["kind"] = "SqlDWTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/datasetmapping/version.go b/resource-manager/datashare/2019-11-01/datasetmapping/version.go index d3a7260a4db..804f2ef7e07 100644 --- a/resource-manager/datashare/2019-11-01/datasetmapping/version.go +++ b/resource-manager/datashare/2019-11-01/datasetmapping/version.go @@ -1,12 +1,10 @@ package datasetmapping -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datasetmapping/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datasetmapping/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/emailregistration/README.md b/resource-manager/datashare/2019-11-01/emailregistration/README.md index 63b48f9b0b4..1766ce2b605 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/README.md +++ b/resource-manager/datashare/2019-11-01/emailregistration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/emailregistration` Documentation -The `emailregistration` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `emailregistration` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/emailregistration/client.go b/resource-manager/datashare/2019-11-01/emailregistration/client.go index e9f78a19e35..10445ddd46c 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/client.go +++ b/resource-manager/datashare/2019-11-01/emailregistration/client.go @@ -15,7 +15,7 @@ type EmailRegistrationClient struct { } func NewEmailRegistrationClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailRegistrationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailregistration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailregistration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailRegistrationClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/emailregistration/id_location.go b/resource-manager/datashare/2019-11-01/emailregistration/id_location.go index 1f58e492f32..e8876d5e9e9 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/id_location.go +++ b/resource-manager/datashare/2019-11-01/emailregistration/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/emailregistration/method_activateemail.go b/resource-manager/datashare/2019-11-01/emailregistration/method_activateemail.go index bdf2b5dd9ce..bbcd9fec172 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/method_activateemail.go +++ b/resource-manager/datashare/2019-11-01/emailregistration/method_activateemail.go @@ -50,7 +50,6 @@ func (c EmailRegistrationClient) ActivateEmail(ctx context.Context, id LocationI var model EmailRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/emailregistration/method_registeremail.go b/resource-manager/datashare/2019-11-01/emailregistration/method_registeremail.go index e5767ed1873..b18f55d878c 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/method_registeremail.go +++ b/resource-manager/datashare/2019-11-01/emailregistration/method_registeremail.go @@ -46,7 +46,6 @@ func (c EmailRegistrationClient) RegisterEmail(ctx context.Context, id LocationI var model EmailRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/emailregistration/version.go b/resource-manager/datashare/2019-11-01/emailregistration/version.go index 3bf7a9c8a6c..667533748ff 100644 --- a/resource-manager/datashare/2019-11-01/emailregistration/version.go +++ b/resource-manager/datashare/2019-11-01/emailregistration/version.go @@ -1,12 +1,10 @@ package emailregistration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailregistration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailregistration/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/invitation/README.md b/resource-manager/datashare/2019-11-01/invitation/README.md index d2529f003f2..623e57db5fc 100644 --- a/resource-manager/datashare/2019-11-01/invitation/README.md +++ b/resource-manager/datashare/2019-11-01/invitation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/invitation` Documentation -The `invitation` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `invitation` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/invitation/client.go b/resource-manager/datashare/2019-11-01/invitation/client.go index 54d83318f55..7887014cddb 100644 --- a/resource-manager/datashare/2019-11-01/invitation/client.go +++ b/resource-manager/datashare/2019-11-01/invitation/client.go @@ -15,7 +15,7 @@ type InvitationClient struct { } func NewInvitationClientWithBaseURI(sdkApi sdkEnv.Api) (*InvitationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invitation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invitation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvitationClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/invitation/id_invitation.go b/resource-manager/datashare/2019-11-01/invitation/id_invitation.go index 0575a819719..75a2dd04862 100644 --- a/resource-manager/datashare/2019-11-01/invitation/id_invitation.go +++ b/resource-manager/datashare/2019-11-01/invitation/id_invitation.go @@ -46,7 +46,7 @@ func ParseInvitationID(input string) (*InvitationId, error) { } id := InvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseInvitationIDInsensitively(input string) (*InvitationId, error) { } id := InvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/invitation/id_share.go b/resource-manager/datashare/2019-11-01/invitation/id_share.go index f6e93a3c9e5..699b749c946 100644 --- a/resource-manager/datashare/2019-11-01/invitation/id_share.go +++ b/resource-manager/datashare/2019-11-01/invitation/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/invitation/method_create.go b/resource-manager/datashare/2019-11-01/invitation/method_create.go index 819bf40b85a..6e1212c98c9 100644 --- a/resource-manager/datashare/2019-11-01/invitation/method_create.go +++ b/resource-manager/datashare/2019-11-01/invitation/method_create.go @@ -50,7 +50,6 @@ func (c InvitationClient) Create(ctx context.Context, id InvitationId, input Inv var model Invitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/invitation/method_get.go b/resource-manager/datashare/2019-11-01/invitation/method_get.go index 4305987ba91..dc1dc1a4716 100644 --- a/resource-manager/datashare/2019-11-01/invitation/method_get.go +++ b/resource-manager/datashare/2019-11-01/invitation/method_get.go @@ -45,7 +45,6 @@ func (c InvitationClient) Get(ctx context.Context, id InvitationId) (result GetO var model Invitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/invitation/method_listbyshare.go b/resource-manager/datashare/2019-11-01/invitation/method_listbyshare.go index 9e45854e85e..c0448d3d415 100644 --- a/resource-manager/datashare/2019-11-01/invitation/method_listbyshare.go +++ b/resource-manager/datashare/2019-11-01/invitation/method_listbyshare.go @@ -40,6 +40,7 @@ func (o ListByShareOperationOptions) ToHeaders() *client.Headers { func (o ListByShareOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/invitation/version.go b/resource-manager/datashare/2019-11-01/invitation/version.go index a6a757d1986..cebb1db87d6 100644 --- a/resource-manager/datashare/2019-11-01/invitation/version.go +++ b/resource-manager/datashare/2019-11-01/invitation/version.go @@ -1,12 +1,10 @@ package invitation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invitation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invitation/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/share/README.md b/resource-manager/datashare/2019-11-01/share/README.md index f7c387a9d42..b6307ebbe25 100644 --- a/resource-manager/datashare/2019-11-01/share/README.md +++ b/resource-manager/datashare/2019-11-01/share/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/share` Documentation -The `share` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `share` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/share/client.go b/resource-manager/datashare/2019-11-01/share/client.go index 29d6f0ab432..8e87ccfac37 100644 --- a/resource-manager/datashare/2019-11-01/share/client.go +++ b/resource-manager/datashare/2019-11-01/share/client.go @@ -15,7 +15,7 @@ type ShareClient struct { } func NewShareClientWithBaseURI(sdkApi sdkEnv.Api) (*ShareClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "share", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "share", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ShareClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/share/id_account.go b/resource-manager/datashare/2019-11-01/share/id_account.go index 3d281b45680..9c3c8d9fffc 100644 --- a/resource-manager/datashare/2019-11-01/share/id_account.go +++ b/resource-manager/datashare/2019-11-01/share/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go b/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go index 6e6e77c0c13..7a1e9b7ace7 100644 --- a/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go +++ b/resource-manager/datashare/2019-11-01/share/id_providersharesubscription.go @@ -46,7 +46,7 @@ func ParseProviderShareSubscriptionID(input string) (*ProviderShareSubscriptionI } id := ProviderShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviderShareSubscriptionIDInsensitively(input string) (*ProviderShare } id := ProviderShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/share/id_share.go b/resource-manager/datashare/2019-11-01/share/id_share.go index b61c357df6e..aa61511e9d6 100644 --- a/resource-manager/datashare/2019-11-01/share/id_share.go +++ b/resource-manager/datashare/2019-11-01/share/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/share/method_create.go b/resource-manager/datashare/2019-11-01/share/method_create.go index dff4fb47af1..603dd154f87 100644 --- a/resource-manager/datashare/2019-11-01/share/method_create.go +++ b/resource-manager/datashare/2019-11-01/share/method_create.go @@ -50,7 +50,6 @@ func (c ShareClient) Create(ctx context.Context, id ShareId, input Share) (resul var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/share/method_get.go b/resource-manager/datashare/2019-11-01/share/method_get.go index 6d3900d577c..3a68737185c 100644 --- a/resource-manager/datashare/2019-11-01/share/method_get.go +++ b/resource-manager/datashare/2019-11-01/share/method_get.go @@ -45,7 +45,6 @@ func (c ShareClient) Get(ctx context.Context, id ShareId) (result GetOperationRe var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/share/method_listbyaccount.go b/resource-manager/datashare/2019-11-01/share/method_listbyaccount.go index 324c3f2a9e0..6d33b34ce12 100644 --- a/resource-manager/datashare/2019-11-01/share/method_listbyaccount.go +++ b/resource-manager/datashare/2019-11-01/share/method_listbyaccount.go @@ -40,6 +40,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go b/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go index 256e50f61ba..59378063ced 100644 --- a/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2019-11-01/share/method_listsynchronizationdetails.go @@ -40,6 +40,7 @@ func (o ListSynchronizationDetailsOperationOptions) ToHeaders() *client.Headers func (o ListSynchronizationDetailsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go b/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go index e58e9b40b43..64c4ca19d70 100644 --- a/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go +++ b/resource-manager/datashare/2019-11-01/share/method_listsynchronizations.go @@ -40,6 +40,7 @@ func (o ListSynchronizationsOperationOptions) ToHeaders() *client.Headers { func (o ListSynchronizationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsgetbyshare.go b/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsgetbyshare.go index 0bdc6697402..468d67be7b4 100644 --- a/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsgetbyshare.go +++ b/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsgetbyshare.go @@ -45,7 +45,6 @@ func (c ShareClient) ProviderShareSubscriptionsGetByShare(ctx context.Context, i var model ProviderShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsreinstate.go b/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsreinstate.go index 556891ad05e..6362809e036 100644 --- a/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsreinstate.go +++ b/resource-manager/datashare/2019-11-01/share/method_providersharesubscriptionsreinstate.go @@ -46,7 +46,6 @@ func (c ShareClient) ProviderShareSubscriptionsReinstate(ctx context.Context, id var model ProviderShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/share/version.go b/resource-manager/datashare/2019-11-01/share/version.go index 240f56a7a4d..964669d4b2d 100644 --- a/resource-manager/datashare/2019-11-01/share/version.go +++ b/resource-manager/datashare/2019-11-01/share/version.go @@ -1,12 +1,10 @@ package share -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/share/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/share/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/README.md b/resource-manager/datashare/2019-11-01/sharesubscription/README.md index 8bf00592423..caad43096a8 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/README.md +++ b/resource-manager/datashare/2019-11-01/sharesubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/sharesubscription` Documentation -The `sharesubscription` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `sharesubscription` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/client.go b/resource-manager/datashare/2019-11-01/sharesubscription/client.go index 0a8b1989ade..0c9b41a665b 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/client.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/client.go @@ -15,7 +15,7 @@ type ShareSubscriptionClient struct { } func NewShareSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ShareSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharesubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharesubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ShareSubscriptionClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/id_account.go b/resource-manager/datashare/2019-11-01/sharesubscription/id_account.go index 4a3e2eb2f61..35c7eea1630 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/id_account.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/id_sharesubscription.go b/resource-manager/datashare/2019-11-01/sharesubscription/id_sharesubscription.go index 68fb1491c4a..f58fbf072ea 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/id_sharesubscription.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_create.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_create.go index 2842954baaf..e6e58e9c3f0 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_create.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_create.go @@ -50,7 +50,6 @@ func (c ShareSubscriptionClient) Create(ctx context.Context, id ShareSubscriptio var model ShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_get.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_get.go index 23692ec482e..b6fd4057eba 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_get.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_get.go @@ -45,7 +45,6 @@ func (c ShareSubscriptionClient) Get(ctx context.Context, id ShareSubscriptionId var model ShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listbyaccount.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listbyaccount.go index 5d5c2f0c598..95acbbe36a1 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listbyaccount.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listbyaccount.go @@ -40,6 +40,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go index b9a025803ae..b5a06dc4663 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsourcesharesynchronizationsettings.go @@ -73,7 +73,7 @@ func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettings(ctx cont temp := make([]SourceShareSynchronizationSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSourceShareSynchronizationSettingImplementation(v) + val, err := UnmarshalSourceShareSynchronizationSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SourceShareSynchronizationSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go index 854a1d2ac6c..0bf1fc81f89 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizationdetails.go @@ -40,6 +40,7 @@ func (o ListSynchronizationDetailsOperationOptions) ToHeaders() *client.Headers func (o ListSynchronizationDetailsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go index e85015321c1..c743bbc8445 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/method_listsynchronizations.go @@ -40,6 +40,7 @@ func (o ListSynchronizationsOperationOptions) ToHeaders() *client.Headers { func (o ListSynchronizationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go b/resource-manager/datashare/2019-11-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go index a7492d88707..6ab40d98da5 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go @@ -14,6 +14,14 @@ type ScheduledSourceSynchronizationSetting struct { Properties *ScheduledSourceShareSynchronizationSettingProperties `json:"properties,omitempty"` // Fields inherited from SourceShareSynchronizationSetting + + Kind SourceShareSynchronizationSettingKind `json:"kind"` +} + +func (s ScheduledSourceSynchronizationSetting) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return BaseSourceShareSynchronizationSettingImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = ScheduledSourceSynchronizationSetting{} @@ -27,9 +35,10 @@ func (s ScheduledSourceSynchronizationSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledSourceSynchronizationSetting: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsetting.go b/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsetting.go index a9363ad3e7e..bad2fb9d05d 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsetting.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/model_sourcesharesynchronizationsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SourceShareSynchronizationSetting interface { + SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl } -// RawSourceShareSynchronizationSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SourceShareSynchronizationSetting = BaseSourceShareSynchronizationSettingImpl{} + +type BaseSourceShareSynchronizationSettingImpl struct { + Kind SourceShareSynchronizationSettingKind `json:"kind"` +} + +func (s BaseSourceShareSynchronizationSettingImpl) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return s +} + +var _ SourceShareSynchronizationSetting = RawSourceShareSynchronizationSettingImpl{} + +// RawSourceShareSynchronizationSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSourceShareSynchronizationSettingImpl struct { - Type string - Values map[string]interface{} + sourceShareSynchronizationSetting BaseSourceShareSynchronizationSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSourceShareSynchronizationSettingImpl) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return s.sourceShareSynchronizationSetting } -func unmarshalSourceShareSynchronizationSettingImplementation(input []byte) (SourceShareSynchronizationSetting, error) { +func UnmarshalSourceShareSynchronizationSettingImplementation(input []byte) (SourceShareSynchronizationSetting, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSourceShareSynchronizationSettingImplementation(input []byte) (Sou return out, nil } - out := RawSourceShareSynchronizationSettingImpl{ - Type: value, - Values: temp, + var parent BaseSourceShareSynchronizationSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSourceShareSynchronizationSettingImpl: %+v", err) } - return out, nil + + return RawSourceShareSynchronizationSettingImpl{ + sourceShareSynchronizationSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2019-11-01/sharesubscription/version.go b/resource-manager/datashare/2019-11-01/sharesubscription/version.go index 24f564d4ef6..89ec79c5a69 100644 --- a/resource-manager/datashare/2019-11-01/sharesubscription/version.go +++ b/resource-manager/datashare/2019-11-01/sharesubscription/version.go @@ -1,12 +1,10 @@ package sharesubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharesubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharesubscription/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/README.md b/resource-manager/datashare/2019-11-01/synchronizationsetting/README.md index effbba5d10d..d0c126f372d 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/README.md +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/synchronizationsetting` Documentation -The `synchronizationsetting` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `synchronizationsetting` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/client.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/client.go index 52826df26a9..58e75916232 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/client.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/client.go @@ -15,7 +15,7 @@ type SynchronizationSettingClient struct { } func NewSynchronizationSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*SynchronizationSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "synchronizationsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "synchronizationsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SynchronizationSettingClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go index 2dc1978f4a5..5bf34d95b99 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go index 60a34257112..c6a06be34d3 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/id_synchronizationsetting.go @@ -46,7 +46,7 @@ func ParseSynchronizationSettingID(input string) (*SynchronizationSettingId, err } id := SynchronizationSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSynchronizationSettingIDInsensitively(input string) (*SynchronizationS } id := SynchronizationSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_create.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_create.go index 024a62ba97f..a064f105c41 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_create.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SynchronizationSetting + Model SynchronizationSetting } // Create ... @@ -53,11 +53,11 @@ func (c SynchronizationSettingClient) Create(ctx context.Context, id Synchroniza if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSynchronizationSettingImplementation(respObj) + model, err := UnmarshalSynchronizationSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_get.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_get.go index 8ac6ea736af..5c301093f4c 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_get.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SynchronizationSetting + Model SynchronizationSetting } // Get ... @@ -48,11 +48,11 @@ func (c SynchronizationSettingClient) Get(ctx context.Context, id Synchronizatio if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSynchronizationSettingImplementation(respObj) + model, err := UnmarshalSynchronizationSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go index 8ae40f376c4..c3a32491c40 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/method_listbyshare.go @@ -73,7 +73,7 @@ func (c SynchronizationSettingClient) ListByShare(ctx context.Context, id ShareI temp := make([]SynchronizationSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSynchronizationSettingImplementation(v) + val, err := UnmarshalSynchronizationSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SynchronizationSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/model_scheduledsynchronizationsetting.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/model_scheduledsynchronizationsetting.go index 6a0a42d4229..682f4ebe494 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/model_scheduledsynchronizationsetting.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/model_scheduledsynchronizationsetting.go @@ -14,9 +14,20 @@ type ScheduledSynchronizationSetting struct { Properties ScheduledSynchronizationSettingProperties `json:"properties"` // Fields inherited from SynchronizationSetting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SynchronizationSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ScheduledSynchronizationSetting) SynchronizationSetting() BaseSynchronizationSettingImpl { + return BaseSynchronizationSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScheduledSynchronizationSetting{} @@ -30,9 +41,10 @@ func (s ScheduledSynchronizationSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledSynchronizationSetting: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/model_synchronizationsetting.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/model_synchronizationsetting.go index e8dfdd22f39..589bfaa9cb4 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/model_synchronizationsetting.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/model_synchronizationsetting.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SynchronizationSetting interface { + SynchronizationSetting() BaseSynchronizationSettingImpl } -// RawSynchronizationSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SynchronizationSetting = BaseSynchronizationSettingImpl{} + +type BaseSynchronizationSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SynchronizationSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSynchronizationSettingImpl) SynchronizationSetting() BaseSynchronizationSettingImpl { + return s +} + +var _ SynchronizationSetting = RawSynchronizationSettingImpl{} + +// RawSynchronizationSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSynchronizationSettingImpl struct { - Type string - Values map[string]interface{} + synchronizationSetting BaseSynchronizationSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSynchronizationSettingImpl) SynchronizationSetting() BaseSynchronizationSettingImpl { + return s.synchronizationSetting } -func unmarshalSynchronizationSettingImplementation(input []byte) (SynchronizationSetting, error) { +func UnmarshalSynchronizationSettingImplementation(input []byte) (SynchronizationSetting, error) { if input == nil { return nil, nil } @@ -44,10 +64,15 @@ func unmarshalSynchronizationSettingImplementation(input []byte) (Synchronizatio return out, nil } - out := RawSynchronizationSettingImpl{ - Type: value, - Values: temp, + var parent BaseSynchronizationSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSynchronizationSettingImpl: %+v", err) } - return out, nil + + return RawSynchronizationSettingImpl{ + synchronizationSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2019-11-01/synchronizationsetting/version.go b/resource-manager/datashare/2019-11-01/synchronizationsetting/version.go index 194b89c9141..668d0c8db66 100644 --- a/resource-manager/datashare/2019-11-01/synchronizationsetting/version.go +++ b/resource-manager/datashare/2019-11-01/synchronizationsetting/version.go @@ -1,12 +1,10 @@ package synchronizationsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/synchronizationsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/synchronizationsetting/2019-11-01" } diff --git a/resource-manager/datashare/2019-11-01/trigger/README.md b/resource-manager/datashare/2019-11-01/trigger/README.md index dddcba60915..9584cc05fc9 100644 --- a/resource-manager/datashare/2019-11-01/trigger/README.md +++ b/resource-manager/datashare/2019-11-01/trigger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/trigger` Documentation -The `trigger` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2019-11-01`). +The `trigger` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2019-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2019-11-01/trigger/client.go b/resource-manager/datashare/2019-11-01/trigger/client.go index d64fe022f52..9f27e22218f 100644 --- a/resource-manager/datashare/2019-11-01/trigger/client.go +++ b/resource-manager/datashare/2019-11-01/trigger/client.go @@ -15,7 +15,7 @@ type TriggerClient struct { } func NewTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trigger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trigger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggerClient: %+v", err) } diff --git a/resource-manager/datashare/2019-11-01/trigger/id_sharesubscription.go b/resource-manager/datashare/2019-11-01/trigger/id_sharesubscription.go index 8cb7d9d74e6..c1e911714ed 100644 --- a/resource-manager/datashare/2019-11-01/trigger/id_sharesubscription.go +++ b/resource-manager/datashare/2019-11-01/trigger/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/trigger/id_trigger.go b/resource-manager/datashare/2019-11-01/trigger/id_trigger.go index ff34852c3de..552bd862121 100644 --- a/resource-manager/datashare/2019-11-01/trigger/id_trigger.go +++ b/resource-manager/datashare/2019-11-01/trigger/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2019-11-01/trigger/method_create.go b/resource-manager/datashare/2019-11-01/trigger/method_create.go index b67d187ff47..43131d1532d 100644 --- a/resource-manager/datashare/2019-11-01/trigger/method_create.go +++ b/resource-manager/datashare/2019-11-01/trigger/method_create.go @@ -18,7 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Create ... diff --git a/resource-manager/datashare/2019-11-01/trigger/method_get.go b/resource-manager/datashare/2019-11-01/trigger/method_get.go index bd1667cb005..4e315b60939 100644 --- a/resource-manager/datashare/2019-11-01/trigger/method_get.go +++ b/resource-manager/datashare/2019-11-01/trigger/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Get ... @@ -48,11 +48,11 @@ func (c TriggerClient) Get(ctx context.Context, id TriggerId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalTriggerImplementation(respObj) + model, err := UnmarshalTriggerImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2019-11-01/trigger/method_listbysharesubscription.go b/resource-manager/datashare/2019-11-01/trigger/method_listbysharesubscription.go index 7d4ef4dec7f..c6e6cc8000e 100644 --- a/resource-manager/datashare/2019-11-01/trigger/method_listbysharesubscription.go +++ b/resource-manager/datashare/2019-11-01/trigger/method_listbysharesubscription.go @@ -73,7 +73,7 @@ func (c TriggerClient) ListByShareSubscription(ctx context.Context, id ShareSubs temp := make([]Trigger, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalTriggerImplementation(v) + val, err := UnmarshalTriggerImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Trigger (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2019-11-01/trigger/model_scheduledtrigger.go b/resource-manager/datashare/2019-11-01/trigger/model_scheduledtrigger.go index 46332dad04f..3a057ca3d5f 100644 --- a/resource-manager/datashare/2019-11-01/trigger/model_scheduledtrigger.go +++ b/resource-manager/datashare/2019-11-01/trigger/model_scheduledtrigger.go @@ -14,9 +14,20 @@ type ScheduledTrigger struct { Properties ScheduledTriggerProperties `json:"properties"` // Fields inherited from Trigger - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind TriggerKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ScheduledTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScheduledTrigger{} @@ -30,9 +41,10 @@ func (s ScheduledTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledTrigger: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2019-11-01/trigger/model_trigger.go b/resource-manager/datashare/2019-11-01/trigger/model_trigger.go index ce18691535b..01e19dc94f9 100644 --- a/resource-manager/datashare/2019-11-01/trigger/model_trigger.go +++ b/resource-manager/datashare/2019-11-01/trigger/model_trigger.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Id *string `json:"id,omitempty"` + Kind TriggerKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s +} + +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -44,10 +64,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2019-11-01/trigger/version.go b/resource-manager/datashare/2019-11-01/trigger/version.go index 9503a44a57f..c8a79ce3e66 100644 --- a/resource-manager/datashare/2019-11-01/trigger/version.go +++ b/resource-manager/datashare/2019-11-01/trigger/version.go @@ -1,12 +1,10 @@ package trigger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trigger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trigger/2019-11-01" } diff --git a/resource-manager/datashare/2021-08-01/account/README.md b/resource-manager/datashare/2021-08-01/account/README.md index 7e27e1b5e29..c304a3e40ca 100644 --- a/resource-manager/datashare/2021-08-01/account/README.md +++ b/resource-manager/datashare/2021-08-01/account/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/account` Documentation -The `account` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `account` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/account/client.go b/resource-manager/datashare/2021-08-01/account/client.go index 4bcb9151fc1..ca8361d93ef 100644 --- a/resource-manager/datashare/2021-08-01/account/client.go +++ b/resource-manager/datashare/2021-08-01/account/client.go @@ -15,7 +15,7 @@ type AccountClient struct { } func NewAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "account", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "account", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/account/id_account.go b/resource-manager/datashare/2021-08-01/account/id_account.go index 2ac7dbcbfe8..09dca0eacb9 100644 --- a/resource-manager/datashare/2021-08-01/account/id_account.go +++ b/resource-manager/datashare/2021-08-01/account/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/account/method_get.go b/resource-manager/datashare/2021-08-01/account/method_get.go index 6fc12dff8ca..50b88c8421d 100644 --- a/resource-manager/datashare/2021-08-01/account/method_get.go +++ b/resource-manager/datashare/2021-08-01/account/method_get.go @@ -45,7 +45,6 @@ func (c AccountClient) Get(ctx context.Context, id AccountId) (result GetOperati var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/account/method_update.go b/resource-manager/datashare/2021-08-01/account/method_update.go index bfeb0bd2daa..dcc8639fead 100644 --- a/resource-manager/datashare/2021-08-01/account/method_update.go +++ b/resource-manager/datashare/2021-08-01/account/method_update.go @@ -49,7 +49,6 @@ func (c AccountClient) Update(ctx context.Context, id AccountId, input AccountUp var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/account/version.go b/resource-manager/datashare/2021-08-01/account/version.go index ad0a188963e..75f28a47055 100644 --- a/resource-manager/datashare/2021-08-01/account/version.go +++ b/resource-manager/datashare/2021-08-01/account/version.go @@ -1,12 +1,10 @@ package account -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/account/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/account/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/README.md b/resource-manager/datashare/2021-08-01/consumerinvitation/README.md index cc033c1740e..63648c3921a 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/README.md +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/consumerinvitation` Documentation -The `consumerinvitation` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `consumerinvitation` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/client.go b/resource-manager/datashare/2021-08-01/consumerinvitation/client.go index 0216e707521..7d2f1c95344 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/client.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/client.go @@ -15,7 +15,7 @@ type ConsumerInvitationClient struct { } func NewConsumerInvitationClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerInvitationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "consumerinvitation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "consumerinvitation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConsumerInvitationClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/id_consumerinvitation.go b/resource-manager/datashare/2021-08-01/consumerinvitation/id_consumerinvitation.go index 39dfdb3a8c5..e0718b0b5f9 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/id_consumerinvitation.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/id_consumerinvitation.go @@ -40,7 +40,7 @@ func ParseConsumerInvitationID(input string) (*ConsumerInvitationId, error) { } id := ConsumerInvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseConsumerInvitationIDInsensitively(input string) (*ConsumerInvitationId } id := ConsumerInvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/id_location.go b/resource-manager/datashare/2021-08-01/consumerinvitation/id_location.go index 8b99bba6e09..002843fd7ff 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/id_location.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/method_get.go b/resource-manager/datashare/2021-08-01/consumerinvitation/method_get.go index 17503763224..efb2943ba73 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/method_get.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/method_get.go @@ -45,7 +45,6 @@ func (c ConsumerInvitationClient) Get(ctx context.Context, id ConsumerInvitation var model ConsumerInvitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/method_rejectinvitation.go b/resource-manager/datashare/2021-08-01/consumerinvitation/method_rejectinvitation.go index ee8b51fe7d9..7534c96ffd5 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/method_rejectinvitation.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/method_rejectinvitation.go @@ -50,7 +50,6 @@ func (c ConsumerInvitationClient) RejectInvitation(ctx context.Context, id Locat var model ConsumerInvitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/consumerinvitation/version.go b/resource-manager/datashare/2021-08-01/consumerinvitation/version.go index f81796bdd61..1a61877b5e7 100644 --- a/resource-manager/datashare/2021-08-01/consumerinvitation/version.go +++ b/resource-manager/datashare/2021-08-01/consumerinvitation/version.go @@ -1,12 +1,10 @@ package consumerinvitation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/consumerinvitation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/consumerinvitation/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/dataset/README.md b/resource-manager/datashare/2021-08-01/dataset/README.md index cc51b6a51f1..6bd935845a8 100644 --- a/resource-manager/datashare/2021-08-01/dataset/README.md +++ b/resource-manager/datashare/2021-08-01/dataset/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/dataset` Documentation -The `dataset` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `dataset` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/dataset/client.go b/resource-manager/datashare/2021-08-01/dataset/client.go index 13f0f3936d4..de2af2f4bc5 100644 --- a/resource-manager/datashare/2021-08-01/dataset/client.go +++ b/resource-manager/datashare/2021-08-01/dataset/client.go @@ -15,7 +15,7 @@ type DataSetClient struct { } func NewDataSetClientWithBaseURI(sdkApi sdkEnv.Api) (*DataSetClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataset", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataset", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataSetClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/dataset/id_dataset.go b/resource-manager/datashare/2021-08-01/dataset/id_dataset.go index fa49264829d..afafb3e8b69 100644 --- a/resource-manager/datashare/2021-08-01/dataset/id_dataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/id_dataset.go @@ -46,7 +46,7 @@ func ParseDataSetID(input string) (*DataSetId, error) { } id := DataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataSetIDInsensitively(input string) (*DataSetId, error) { } id := DataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/dataset/id_share.go b/resource-manager/datashare/2021-08-01/dataset/id_share.go index 0919ab0c78d..0c014f997cc 100644 --- a/resource-manager/datashare/2021-08-01/dataset/id_share.go +++ b/resource-manager/datashare/2021-08-01/dataset/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/dataset/method_create.go b/resource-manager/datashare/2021-08-01/dataset/method_create.go index cd421171a65..166e70c1e1b 100644 --- a/resource-manager/datashare/2021-08-01/dataset/method_create.go +++ b/resource-manager/datashare/2021-08-01/dataset/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSet + Model DataSet } // Create ... @@ -53,11 +53,11 @@ func (c DataSetClient) Create(ctx context.Context, id DataSetId, input DataSet) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetImplementation(respObj) + model, err := UnmarshalDataSetImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/dataset/method_get.go b/resource-manager/datashare/2021-08-01/dataset/method_get.go index 7b38a729130..196e988a411 100644 --- a/resource-manager/datashare/2021-08-01/dataset/method_get.go +++ b/resource-manager/datashare/2021-08-01/dataset/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSet + Model DataSet } // Get ... @@ -48,11 +48,11 @@ func (c DataSetClient) Get(ctx context.Context, id DataSetId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetImplementation(respObj) + model, err := UnmarshalDataSetImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/dataset/method_listbyshare.go b/resource-manager/datashare/2021-08-01/dataset/method_listbyshare.go index 0cd5cf0bd96..b53d40106bb 100644 --- a/resource-manager/datashare/2021-08-01/dataset/method_listbyshare.go +++ b/resource-manager/datashare/2021-08-01/dataset/method_listbyshare.go @@ -41,6 +41,7 @@ func (o ListByShareOperationOptions) ToHeaders() *client.Headers { func (o ListByShareOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c DataSetClient) ListByShare(ctx context.Context, id ShareId, options List temp := make([]DataSet, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataSetImplementation(v) + val, err := UnmarshalDataSetImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataSet (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1filedataset.go b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1filedataset.go index ab749966d54..f3ad54d4076 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1filedataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1filedataset.go @@ -16,12 +16,24 @@ type ADLSGen1FileDataSet struct { Properties ADLSGen1FileProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen1FileDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen1FileDataSet{} func (s ADLSGen1FileDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen1FileDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen1FileDataSet: %+v", err) } + decoded["kind"] = "AdlsGen1File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1folderdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1folderdataset.go index b49f849495e..9782d67d5bc 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1folderdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen1folderdataset.go @@ -16,12 +16,24 @@ type ADLSGen1FolderDataSet struct { Properties ADLSGen1FolderProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen1FolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen1FolderDataSet{} func (s ADLSGen1FolderDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen1FolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen1FolderDataSet: %+v", err) } + decoded["kind"] = "AdlsGen1Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filedataset.go b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filedataset.go index 09cb006e591..98cff8eac21 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filedataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filedataset.go @@ -16,12 +16,24 @@ type ADLSGen2FileDataSet struct { Properties ADLSGen2FileProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FileDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FileDataSet{} func (s ADLSGen2FileDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FileDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filesystemdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filesystemdataset.go index 9944726e83f..5504d645ea7 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filesystemdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2filesystemdataset.go @@ -16,12 +16,24 @@ type ADLSGen2FileSystemDataSet struct { Properties ADLSGen2FileSystemProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FileSystemDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FileSystemDataSet{} func (s ADLSGen2FileSystemDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FileSystemDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileSystemDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2FileSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2folderdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2folderdataset.go index 855ba36c19c..f447f742a69 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2folderdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_adlsgen2folderdataset.go @@ -16,12 +16,24 @@ type ADLSGen2FolderDataSet struct { Properties ADLSGen2FolderProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FolderDataSet{} func (s ADLSGen2FolderDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FolderDataSet: %+v", err) } + decoded["kind"] = "AdlsGen2Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_blobcontainerdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_blobcontainerdataset.go index 71c12831638..e128ebee501 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_blobcontainerdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_blobcontainerdataset.go @@ -16,12 +16,24 @@ type BlobContainerDataSet struct { Properties BlobContainerProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobContainerDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobContainerDataSet{} func (s BlobContainerDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobContainerDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobContainerDataSet: %+v", err) } + decoded["kind"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_blobdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_blobdataset.go index 6520f9b6351..274b9aaf86a 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_blobdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_blobdataset.go @@ -16,12 +16,24 @@ type BlobDataSet struct { Properties BlobProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobDataSet{} func (s BlobDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobDataSet: %+v", err) } + decoded["kind"] = "Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_blobfolderdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_blobfolderdataset.go index 1eeb4b8ff23..93b2d1d64fe 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_blobfolderdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_blobfolderdataset.go @@ -16,12 +16,24 @@ type BlobFolderDataSet struct { Properties BlobFolderProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobFolderDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobFolderDataSet{} func (s BlobFolderDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobFolderDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobFolderDataSet: %+v", err) } + decoded["kind"] = "BlobFolder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_dataset.go b/resource-manager/datashare/2021-08-01/dataset/model_dataset.go index b21efb6ddbe..1fa015942ba 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_dataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_dataset.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataSet interface { + DataSet() BaseDataSetImpl +} + +var _ DataSet = BaseDataSetImpl{} + +type BaseDataSetImpl struct { + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataSetImpl) DataSet() BaseDataSetImpl { + return s } -// RawDataSetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataSet = RawDataSetImpl{} + +// RawDataSetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataSetImpl struct { - Type string - Values map[string]interface{} + dataSet BaseDataSetImpl + Type string + Values map[string]interface{} } -func unmarshalDataSetImplementation(input []byte) (DataSet, error) { +func (s RawDataSetImpl) DataSet() BaseDataSetImpl { + return s.dataSet +} + +func UnmarshalDataSetImplementation(input []byte) (DataSet, error) { if input == nil { return nil, nil } @@ -148,10 +171,15 @@ func unmarshalDataSetImplementation(input []byte) (DataSet, error) { return out, nil } - out := RawDataSetImpl{ - Type: value, - Values: temp, + var parent BaseDataSetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataSetImpl: %+v", err) } - return out, nil + + return RawDataSetImpl{ + dataSet: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2021-08-01/dataset/model_kustoclusterdataset.go b/resource-manager/datashare/2021-08-01/dataset/model_kustoclusterdataset.go index 6a17d9f7fa6..e5dfa5f4fdf 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_kustoclusterdataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_kustoclusterdataset.go @@ -16,12 +16,24 @@ type KustoClusterDataSet struct { Properties KustoClusterDataSetProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoClusterDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoClusterDataSet{} func (s KustoClusterDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoClusterDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoClusterDataSet: %+v", err) } + decoded["kind"] = "KustoCluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_kustodatabasedataset.go b/resource-manager/datashare/2021-08-01/dataset/model_kustodatabasedataset.go index b6f61bbaceb..6c00e7e1e4d 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_kustodatabasedataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_kustodatabasedataset.go @@ -16,12 +16,24 @@ type KustoDatabaseDataSet struct { Properties KustoDatabaseDataSetProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoDatabaseDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoDatabaseDataSet{} func (s KustoDatabaseDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoDatabaseDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoDatabaseDataSet: %+v", err) } + decoded["kind"] = "KustoDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_kustotabledataset.go b/resource-manager/datashare/2021-08-01/dataset/model_kustotabledataset.go index a0dc817b789..34e56b83c99 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_kustotabledataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_kustotabledataset.go @@ -16,12 +16,24 @@ type KustoTableDataSet struct { Properties KustoTableDataSetProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoTableDataSet{} func (s KustoTableDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoTableDataSet: %+v", err) } + decoded["kind"] = "KustoTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_sqldbtabledataset.go b/resource-manager/datashare/2021-08-01/dataset/model_sqldbtabledataset.go index aeaaf221613..6348b625785 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_sqldbtabledataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_sqldbtabledataset.go @@ -16,12 +16,24 @@ type SqlDBTableDataSet struct { Properties *SqlDBTableProperties `json:"properties,omitempty"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SqlDBTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SqlDBTableDataSet{} func (s SqlDBTableDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SqlDBTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDBTableDataSet: %+v", err) } + decoded["kind"] = "SqlDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_sqldwtabledataset.go b/resource-manager/datashare/2021-08-01/dataset/model_sqldwtabledataset.go index 0d09ccfce4a..c68979659ef 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_sqldwtabledataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_sqldwtabledataset.go @@ -16,12 +16,24 @@ type SqlDWTableDataSet struct { Properties *SqlDWTableProperties `json:"properties,omitempty"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SqlDWTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SqlDWTableDataSet{} func (s SqlDWTableDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SqlDWTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWTableDataSet: %+v", err) } + decoded["kind"] = "SqlDWTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/model_synapseworkspacesqlpooltabledataset.go b/resource-manager/datashare/2021-08-01/dataset/model_synapseworkspacesqlpooltabledataset.go index 98df5677954..cdfb8e51be0 100644 --- a/resource-manager/datashare/2021-08-01/dataset/model_synapseworkspacesqlpooltabledataset.go +++ b/resource-manager/datashare/2021-08-01/dataset/model_synapseworkspacesqlpooltabledataset.go @@ -16,12 +16,24 @@ type SynapseWorkspaceSqlPoolTableDataSet struct { Properties SynapseWorkspaceSqlPoolTableDataSetProperties `json:"properties"` // Fields inherited from DataSet + Id *string `json:"id,omitempty"` + Kind DataSetKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SynapseWorkspaceSqlPoolTableDataSet) DataSet() BaseDataSetImpl { + return BaseDataSetImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SynapseWorkspaceSqlPoolTableDataSet{} func (s SynapseWorkspaceSqlPoolTableDataSet) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SynapseWorkspaceSqlPoolTableDataSet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseWorkspaceSqlPoolTableDataSet: %+v", err) } + decoded["kind"] = "SynapseWorkspaceSqlPoolTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/dataset/version.go b/resource-manager/datashare/2021-08-01/dataset/version.go index 1e0c55bbd8f..91144b9f367 100644 --- a/resource-manager/datashare/2021-08-01/dataset/version.go +++ b/resource-manager/datashare/2021-08-01/dataset/version.go @@ -1,12 +1,10 @@ package dataset -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataset/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataset/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/README.md b/resource-manager/datashare/2021-08-01/datasetmapping/README.md index 3546e770e84..0c7ac4a85da 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/README.md +++ b/resource-manager/datashare/2021-08-01/datasetmapping/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/datasetmapping` Documentation -The `datasetmapping` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `datasetmapping` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/client.go b/resource-manager/datashare/2021-08-01/datasetmapping/client.go index bd30238ef39..3f513487b3b 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/client.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/client.go @@ -15,7 +15,7 @@ type DataSetMappingClient struct { } func NewDataSetMappingClientWithBaseURI(sdkApi sdkEnv.Api) (*DataSetMappingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datasetmapping", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datasetmapping", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataSetMappingClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/id_datasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/id_datasetmapping.go index f14508082d9..f09a67dd4b6 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/id_datasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/id_datasetmapping.go @@ -46,7 +46,7 @@ func ParseDataSetMappingID(input string) (*DataSetMappingId, error) { } id := DataSetMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataSetMappingIDInsensitively(input string) (*DataSetMappingId, error) } id := DataSetMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/id_sharesubscription.go b/resource-manager/datashare/2021-08-01/datasetmapping/id_sharesubscription.go index 0a270169e0a..72ad91f5b5f 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/id_sharesubscription.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/method_create.go b/resource-manager/datashare/2021-08-01/datasetmapping/method_create.go index 8707c000f60..37a5c6b7525 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/method_create.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSetMapping + Model DataSetMapping } // Create ... @@ -53,11 +53,11 @@ func (c DataSetMappingClient) Create(ctx context.Context, id DataSetMappingId, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetMappingImplementation(respObj) + model, err := UnmarshalDataSetMappingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/method_get.go b/resource-manager/datashare/2021-08-01/datasetmapping/method_get.go index 40ebb078b74..a1c4c89ef77 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/method_get.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataSetMapping + Model DataSetMapping } // Get ... @@ -48,11 +48,11 @@ func (c DataSetMappingClient) Get(ctx context.Context, id DataSetMappingId) (res if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataSetMappingImplementation(respObj) + model, err := UnmarshalDataSetMappingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/method_listbysharesubscription.go b/resource-manager/datashare/2021-08-01/datasetmapping/method_listbysharesubscription.go index f0686132b96..ec0bbe0535a 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/method_listbysharesubscription.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/method_listbysharesubscription.go @@ -41,6 +41,7 @@ func (o ListByShareSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListByShareSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,7 @@ func (c DataSetMappingClient) ListByShareSubscription(ctx context.Context, id Sh temp := make([]DataSetMapping, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataSetMappingImplementation(v) + val, err := UnmarshalDataSetMappingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataSetMapping (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filedatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filedatasetmapping.go index 10febd51d61..0883bb8fab7 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filedatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filedatasetmapping.go @@ -16,12 +16,24 @@ type ADLSGen2FileDataSetMapping struct { Properties ADLSGen2FileDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FileDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FileDataSetMapping{} func (s ADLSGen2FileDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FileDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go index 7450f7e430a..2dad73e9423 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2filesystemdatasetmapping.go @@ -16,12 +16,24 @@ type ADLSGen2FileSystemDataSetMapping struct { Properties ADLSGen2FileSystemDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FileSystemDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FileSystemDataSetMapping{} func (s ADLSGen2FileSystemDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FileSystemDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FileSystemDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2FileSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2folderdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2folderdatasetmapping.go index b74666539aa..f090400bfb0 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2folderdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_adlsgen2folderdatasetmapping.go @@ -16,12 +16,24 @@ type ADLSGen2FolderDataSetMapping struct { Properties ADLSGen2FolderDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ADLSGen2FolderDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ADLSGen2FolderDataSetMapping{} func (s ADLSGen2FolderDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ADLSGen2FolderDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ADLSGen2FolderDataSetMapping: %+v", err) } + decoded["kind"] = "AdlsGen2Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobcontainerdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobcontainerdatasetmapping.go index 18a9532d2bf..42fd818a569 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobcontainerdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobcontainerdatasetmapping.go @@ -16,12 +16,24 @@ type BlobContainerDataSetMapping struct { Properties BlobContainerMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobContainerDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobContainerDataSetMapping{} func (s BlobContainerDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobContainerDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobContainerDataSetMapping: %+v", err) } + decoded["kind"] = "Container" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobdatasetmapping.go index 8876c7b54aa..93f170d3c64 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobdatasetmapping.go @@ -16,12 +16,24 @@ type BlobDataSetMapping struct { Properties BlobMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobDataSetMapping{} func (s BlobDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobDataSetMapping: %+v", err) } + decoded["kind"] = "Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobfolderdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobfolderdatasetmapping.go index d93ca7d42c2..be7839e6b02 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_blobfolderdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_blobfolderdatasetmapping.go @@ -16,12 +16,24 @@ type BlobFolderDataSetMapping struct { Properties BlobFolderMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s BlobFolderDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = BlobFolderDataSetMapping{} func (s BlobFolderDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s BlobFolderDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobFolderDataSetMapping: %+v", err) } + decoded["kind"] = "BlobFolder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_datasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_datasetmapping.go index 31175c105d7..122a0fdfbf9 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_datasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_datasetmapping.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataSetMapping interface { + DataSetMapping() BaseDataSetMappingImpl +} + +var _ DataSetMapping = BaseDataSetMappingImpl{} + +type BaseDataSetMappingImpl struct { + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataSetMappingImpl) DataSetMapping() BaseDataSetMappingImpl { + return s } -// RawDataSetMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataSetMapping = RawDataSetMappingImpl{} + +// RawDataSetMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataSetMappingImpl struct { - Type string - Values map[string]interface{} + dataSetMapping BaseDataSetMappingImpl + Type string + Values map[string]interface{} } -func unmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) { +func (s RawDataSetMappingImpl) DataSetMapping() BaseDataSetMappingImpl { + return s.dataSetMapping +} + +func UnmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) { if input == nil { return nil, nil } @@ -132,10 +155,15 @@ func unmarshalDataSetMappingImplementation(input []byte) (DataSetMapping, error) return out, nil } - out := RawDataSetMappingImpl{ - Type: value, - Values: temp, + var parent BaseDataSetMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataSetMappingImpl: %+v", err) } - return out, nil + + return RawDataSetMappingImpl{ + dataSetMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustoclusterdatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustoclusterdatasetmapping.go index 15c227edda9..55f19cc3dc1 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustoclusterdatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustoclusterdatasetmapping.go @@ -16,12 +16,24 @@ type KustoClusterDataSetMapping struct { Properties KustoClusterDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoClusterDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoClusterDataSetMapping{} func (s KustoClusterDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoClusterDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoClusterDataSetMapping: %+v", err) } + decoded["kind"] = "KustoCluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustodatabasedatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustodatabasedatasetmapping.go index 3a98d263db8..980245ca423 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustodatabasedatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustodatabasedatasetmapping.go @@ -16,12 +16,24 @@ type KustoDatabaseDataSetMapping struct { Properties KustoDatabaseDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoDatabaseDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoDatabaseDataSetMapping{} func (s KustoDatabaseDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoDatabaseDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoDatabaseDataSetMapping: %+v", err) } + decoded["kind"] = "KustoDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustotabledatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustotabledatasetmapping.go index c7baa27f001..d5a6426f15c 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_kustotabledatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_kustotabledatasetmapping.go @@ -16,12 +16,24 @@ type KustoTableDataSetMapping struct { Properties KustoTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s KustoTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = KustoTableDataSetMapping{} func (s KustoTableDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s KustoTableDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KustoTableDataSetMapping: %+v", err) } + decoded["kind"] = "KustoTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldbtabledatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldbtabledatasetmapping.go index a370270436f..0d60536dd2c 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldbtabledatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldbtabledatasetmapping.go @@ -16,12 +16,24 @@ type SqlDBTableDataSetMapping struct { Properties SqlDBTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SqlDBTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SqlDBTableDataSetMapping{} func (s SqlDBTableDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SqlDBTableDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDBTableDataSetMapping: %+v", err) } + decoded["kind"] = "SqlDBTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldwtabledatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldwtabledatasetmapping.go index 3a8256621d9..ff163f2ad02 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldwtabledatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_sqldwtabledatasetmapping.go @@ -16,12 +16,24 @@ type SqlDWTableDataSetMapping struct { Properties SqlDWTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SqlDWTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SqlDWTableDataSetMapping{} func (s SqlDWTableDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SqlDWTableDataSetMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlDWTableDataSetMapping: %+v", err) } + decoded["kind"] = "SqlDWTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/model_synapseworkspacesqlpooltabledatasetmapping.go b/resource-manager/datashare/2021-08-01/datasetmapping/model_synapseworkspacesqlpooltabledatasetmapping.go index 3392dd0200e..d3a1861e82b 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/model_synapseworkspacesqlpooltabledatasetmapping.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/model_synapseworkspacesqlpooltabledatasetmapping.go @@ -16,12 +16,24 @@ type SynapseWorkspaceSqlPoolTableDataSetMapping struct { Properties SynapseWorkspaceSqlPoolTableDataSetMappingProperties `json:"properties"` // Fields inherited from DataSetMapping + Id *string `json:"id,omitempty"` + Kind DataSetMappingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SynapseWorkspaceSqlPoolTableDataSetMapping) DataSetMapping() BaseDataSetMappingImpl { + return BaseDataSetMappingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SynapseWorkspaceSqlPoolTableDataSetMapping{} func (s SynapseWorkspaceSqlPoolTableDataSetMapping) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SynapseWorkspaceSqlPoolTableDataSetMapping) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseWorkspaceSqlPoolTableDataSetMapping: %+v", err) } + decoded["kind"] = "SynapseWorkspaceSqlPoolTable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/datasetmapping/version.go b/resource-manager/datashare/2021-08-01/datasetmapping/version.go index 6b82d8e7fc7..784aefd26a2 100644 --- a/resource-manager/datashare/2021-08-01/datasetmapping/version.go +++ b/resource-manager/datashare/2021-08-01/datasetmapping/version.go @@ -1,12 +1,10 @@ package datasetmapping -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datasetmapping/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datasetmapping/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/emailregistration/README.md b/resource-manager/datashare/2021-08-01/emailregistration/README.md index 2c0d23803d1..e8c9266682a 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/README.md +++ b/resource-manager/datashare/2021-08-01/emailregistration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/emailregistration` Documentation -The `emailregistration` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `emailregistration` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/emailregistration/client.go b/resource-manager/datashare/2021-08-01/emailregistration/client.go index e9f78a19e35..10445ddd46c 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/client.go +++ b/resource-manager/datashare/2021-08-01/emailregistration/client.go @@ -15,7 +15,7 @@ type EmailRegistrationClient struct { } func NewEmailRegistrationClientWithBaseURI(sdkApi sdkEnv.Api) (*EmailRegistrationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "emailregistration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "emailregistration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EmailRegistrationClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/emailregistration/id_location.go b/resource-manager/datashare/2021-08-01/emailregistration/id_location.go index 1f58e492f32..e8876d5e9e9 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/id_location.go +++ b/resource-manager/datashare/2021-08-01/emailregistration/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/emailregistration/method_activateemail.go b/resource-manager/datashare/2021-08-01/emailregistration/method_activateemail.go index bdf2b5dd9ce..bbcd9fec172 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/method_activateemail.go +++ b/resource-manager/datashare/2021-08-01/emailregistration/method_activateemail.go @@ -50,7 +50,6 @@ func (c EmailRegistrationClient) ActivateEmail(ctx context.Context, id LocationI var model EmailRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/emailregistration/method_registeremail.go b/resource-manager/datashare/2021-08-01/emailregistration/method_registeremail.go index e5767ed1873..b18f55d878c 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/method_registeremail.go +++ b/resource-manager/datashare/2021-08-01/emailregistration/method_registeremail.go @@ -46,7 +46,6 @@ func (c EmailRegistrationClient) RegisterEmail(ctx context.Context, id LocationI var model EmailRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/emailregistration/version.go b/resource-manager/datashare/2021-08-01/emailregistration/version.go index 6509643c0e1..7caedf89aa5 100644 --- a/resource-manager/datashare/2021-08-01/emailregistration/version.go +++ b/resource-manager/datashare/2021-08-01/emailregistration/version.go @@ -1,12 +1,10 @@ package emailregistration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/emailregistration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/emailregistration/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/invitation/README.md b/resource-manager/datashare/2021-08-01/invitation/README.md index dc0cdf813c5..b4d735b8af3 100644 --- a/resource-manager/datashare/2021-08-01/invitation/README.md +++ b/resource-manager/datashare/2021-08-01/invitation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/invitation` Documentation -The `invitation` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `invitation` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/invitation/client.go b/resource-manager/datashare/2021-08-01/invitation/client.go index 54d83318f55..7887014cddb 100644 --- a/resource-manager/datashare/2021-08-01/invitation/client.go +++ b/resource-manager/datashare/2021-08-01/invitation/client.go @@ -15,7 +15,7 @@ type InvitationClient struct { } func NewInvitationClientWithBaseURI(sdkApi sdkEnv.Api) (*InvitationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "invitation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "invitation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InvitationClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/invitation/id_invitation.go b/resource-manager/datashare/2021-08-01/invitation/id_invitation.go index 0575a819719..75a2dd04862 100644 --- a/resource-manager/datashare/2021-08-01/invitation/id_invitation.go +++ b/resource-manager/datashare/2021-08-01/invitation/id_invitation.go @@ -46,7 +46,7 @@ func ParseInvitationID(input string) (*InvitationId, error) { } id := InvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseInvitationIDInsensitively(input string) (*InvitationId, error) { } id := InvitationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/invitation/id_share.go b/resource-manager/datashare/2021-08-01/invitation/id_share.go index f6e93a3c9e5..699b749c946 100644 --- a/resource-manager/datashare/2021-08-01/invitation/id_share.go +++ b/resource-manager/datashare/2021-08-01/invitation/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/invitation/method_create.go b/resource-manager/datashare/2021-08-01/invitation/method_create.go index 819bf40b85a..6e1212c98c9 100644 --- a/resource-manager/datashare/2021-08-01/invitation/method_create.go +++ b/resource-manager/datashare/2021-08-01/invitation/method_create.go @@ -50,7 +50,6 @@ func (c InvitationClient) Create(ctx context.Context, id InvitationId, input Inv var model Invitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/invitation/method_get.go b/resource-manager/datashare/2021-08-01/invitation/method_get.go index 4305987ba91..dc1dc1a4716 100644 --- a/resource-manager/datashare/2021-08-01/invitation/method_get.go +++ b/resource-manager/datashare/2021-08-01/invitation/method_get.go @@ -45,7 +45,6 @@ func (c InvitationClient) Get(ctx context.Context, id InvitationId) (result GetO var model Invitation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/invitation/method_listbyshare.go b/resource-manager/datashare/2021-08-01/invitation/method_listbyshare.go index 9e45854e85e..c0448d3d415 100644 --- a/resource-manager/datashare/2021-08-01/invitation/method_listbyshare.go +++ b/resource-manager/datashare/2021-08-01/invitation/method_listbyshare.go @@ -40,6 +40,7 @@ func (o ListByShareOperationOptions) ToHeaders() *client.Headers { func (o ListByShareOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/invitation/version.go b/resource-manager/datashare/2021-08-01/invitation/version.go index e420c9ed8f0..02c6351ffd8 100644 --- a/resource-manager/datashare/2021-08-01/invitation/version.go +++ b/resource-manager/datashare/2021-08-01/invitation/version.go @@ -1,12 +1,10 @@ package invitation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/invitation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/invitation/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/share/README.md b/resource-manager/datashare/2021-08-01/share/README.md index cc2e1f8d503..fc35e229c06 100644 --- a/resource-manager/datashare/2021-08-01/share/README.md +++ b/resource-manager/datashare/2021-08-01/share/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/share` Documentation -The `share` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `share` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/share/client.go b/resource-manager/datashare/2021-08-01/share/client.go index 29d6f0ab432..8e87ccfac37 100644 --- a/resource-manager/datashare/2021-08-01/share/client.go +++ b/resource-manager/datashare/2021-08-01/share/client.go @@ -15,7 +15,7 @@ type ShareClient struct { } func NewShareClientWithBaseURI(sdkApi sdkEnv.Api) (*ShareClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "share", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "share", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ShareClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/share/id_account.go b/resource-manager/datashare/2021-08-01/share/id_account.go index 3d281b45680..9c3c8d9fffc 100644 --- a/resource-manager/datashare/2021-08-01/share/id_account.go +++ b/resource-manager/datashare/2021-08-01/share/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/share/id_providersharesubscription.go b/resource-manager/datashare/2021-08-01/share/id_providersharesubscription.go index 6e6e77c0c13..7a1e9b7ace7 100644 --- a/resource-manager/datashare/2021-08-01/share/id_providersharesubscription.go +++ b/resource-manager/datashare/2021-08-01/share/id_providersharesubscription.go @@ -46,7 +46,7 @@ func ParseProviderShareSubscriptionID(input string) (*ProviderShareSubscriptionI } id := ProviderShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviderShareSubscriptionIDInsensitively(input string) (*ProviderShare } id := ProviderShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/share/id_share.go b/resource-manager/datashare/2021-08-01/share/id_share.go index b61c357df6e..aa61511e9d6 100644 --- a/resource-manager/datashare/2021-08-01/share/id_share.go +++ b/resource-manager/datashare/2021-08-01/share/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/share/method_create.go b/resource-manager/datashare/2021-08-01/share/method_create.go index dff4fb47af1..603dd154f87 100644 --- a/resource-manager/datashare/2021-08-01/share/method_create.go +++ b/resource-manager/datashare/2021-08-01/share/method_create.go @@ -50,7 +50,6 @@ func (c ShareClient) Create(ctx context.Context, id ShareId, input Share) (resul var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/share/method_get.go b/resource-manager/datashare/2021-08-01/share/method_get.go index 6d3900d577c..3a68737185c 100644 --- a/resource-manager/datashare/2021-08-01/share/method_get.go +++ b/resource-manager/datashare/2021-08-01/share/method_get.go @@ -45,7 +45,6 @@ func (c ShareClient) Get(ctx context.Context, id ShareId) (result GetOperationRe var model Share result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/share/method_listbyaccount.go b/resource-manager/datashare/2021-08-01/share/method_listbyaccount.go index 324c3f2a9e0..6d33b34ce12 100644 --- a/resource-manager/datashare/2021-08-01/share/method_listbyaccount.go +++ b/resource-manager/datashare/2021-08-01/share/method_listbyaccount.go @@ -40,6 +40,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go b/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go index 256e50f61ba..59378063ced 100644 --- a/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2021-08-01/share/method_listsynchronizationdetails.go @@ -40,6 +40,7 @@ func (o ListSynchronizationDetailsOperationOptions) ToHeaders() *client.Headers func (o ListSynchronizationDetailsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go b/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go index e58e9b40b43..64c4ca19d70 100644 --- a/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go +++ b/resource-manager/datashare/2021-08-01/share/method_listsynchronizations.go @@ -40,6 +40,7 @@ func (o ListSynchronizationsOperationOptions) ToHeaders() *client.Headers { func (o ListSynchronizationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsadjust.go b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsadjust.go index 1b34a984f9e..b0c6c9c9925 100644 --- a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsadjust.go +++ b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsadjust.go @@ -50,7 +50,6 @@ func (c ShareClient) ProviderShareSubscriptionsAdjust(ctx context.Context, id Pr var model ProviderShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsgetbyshare.go b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsgetbyshare.go index 0bdc6697402..468d67be7b4 100644 --- a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsgetbyshare.go +++ b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsgetbyshare.go @@ -45,7 +45,6 @@ func (c ShareClient) ProviderShareSubscriptionsGetByShare(ctx context.Context, i var model ProviderShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsreinstate.go b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsreinstate.go index 13da1b38eef..940f9b9e7a4 100644 --- a/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsreinstate.go +++ b/resource-manager/datashare/2021-08-01/share/method_providersharesubscriptionsreinstate.go @@ -50,7 +50,6 @@ func (c ShareClient) ProviderShareSubscriptionsReinstate(ctx context.Context, id var model ProviderShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/share/version.go b/resource-manager/datashare/2021-08-01/share/version.go index 72a3f9cd041..4d957a506e0 100644 --- a/resource-manager/datashare/2021-08-01/share/version.go +++ b/resource-manager/datashare/2021-08-01/share/version.go @@ -1,12 +1,10 @@ package share -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/share/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/share/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/README.md b/resource-manager/datashare/2021-08-01/sharesubscription/README.md index 2c093b48d47..91ef4e0ff41 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/README.md +++ b/resource-manager/datashare/2021-08-01/sharesubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/sharesubscription` Documentation -The `sharesubscription` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `sharesubscription` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/client.go b/resource-manager/datashare/2021-08-01/sharesubscription/client.go index 0a8b1989ade..0c9b41a665b 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/client.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/client.go @@ -15,7 +15,7 @@ type ShareSubscriptionClient struct { } func NewShareSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ShareSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharesubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharesubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ShareSubscriptionClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/id_account.go b/resource-manager/datashare/2021-08-01/sharesubscription/id_account.go index 4a3e2eb2f61..35c7eea1630 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/id_account.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/id_sharesubscription.go b/resource-manager/datashare/2021-08-01/sharesubscription/id_sharesubscription.go index 68fb1491c4a..f58fbf072ea 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/id_sharesubscription.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_create.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_create.go index 2842954baaf..e6e58e9c3f0 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_create.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_create.go @@ -50,7 +50,6 @@ func (c ShareSubscriptionClient) Create(ctx context.Context, id ShareSubscriptio var model ShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_get.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_get.go index 23692ec482e..b6fd4057eba 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_get.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_get.go @@ -45,7 +45,6 @@ func (c ShareSubscriptionClient) Get(ctx context.Context, id ShareSubscriptionId var model ShareSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listbyaccount.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listbyaccount.go index 5d5c2f0c598..95acbbe36a1 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listbyaccount.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listbyaccount.go @@ -40,6 +40,7 @@ func (o ListByAccountOperationOptions) ToHeaders() *client.Headers { func (o ListByAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go index b9a025803ae..b5a06dc4663 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsourcesharesynchronizationsettings.go @@ -73,7 +73,7 @@ func (c ShareSubscriptionClient) ListSourceShareSynchronizationSettings(ctx cont temp := make([]SourceShareSynchronizationSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSourceShareSynchronizationSettingImplementation(v) + val, err := UnmarshalSourceShareSynchronizationSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SourceShareSynchronizationSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go index 854a1d2ac6c..0bf1fc81f89 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizationdetails.go @@ -40,6 +40,7 @@ func (o ListSynchronizationDetailsOperationOptions) ToHeaders() *client.Headers func (o ListSynchronizationDetailsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go index e85015321c1..c743bbc8445 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/method_listsynchronizations.go @@ -40,6 +40,7 @@ func (o ListSynchronizationsOperationOptions) ToHeaders() *client.Headers { func (o ListSynchronizationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go b/resource-manager/datashare/2021-08-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go index a7492d88707..6ab40d98da5 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/model_scheduledsourcesynchronizationsetting.go @@ -14,6 +14,14 @@ type ScheduledSourceSynchronizationSetting struct { Properties *ScheduledSourceShareSynchronizationSettingProperties `json:"properties,omitempty"` // Fields inherited from SourceShareSynchronizationSetting + + Kind SourceShareSynchronizationSettingKind `json:"kind"` +} + +func (s ScheduledSourceSynchronizationSetting) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return BaseSourceShareSynchronizationSettingImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = ScheduledSourceSynchronizationSetting{} @@ -27,9 +35,10 @@ func (s ScheduledSourceSynchronizationSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledSourceSynchronizationSetting: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsetting.go b/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsetting.go index a9363ad3e7e..bad2fb9d05d 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsetting.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/model_sourcesharesynchronizationsetting.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SourceShareSynchronizationSetting interface { + SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl } -// RawSourceShareSynchronizationSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SourceShareSynchronizationSetting = BaseSourceShareSynchronizationSettingImpl{} + +type BaseSourceShareSynchronizationSettingImpl struct { + Kind SourceShareSynchronizationSettingKind `json:"kind"` +} + +func (s BaseSourceShareSynchronizationSettingImpl) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return s +} + +var _ SourceShareSynchronizationSetting = RawSourceShareSynchronizationSettingImpl{} + +// RawSourceShareSynchronizationSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSourceShareSynchronizationSettingImpl struct { - Type string - Values map[string]interface{} + sourceShareSynchronizationSetting BaseSourceShareSynchronizationSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSourceShareSynchronizationSettingImpl) SourceShareSynchronizationSetting() BaseSourceShareSynchronizationSettingImpl { + return s.sourceShareSynchronizationSetting } -func unmarshalSourceShareSynchronizationSettingImplementation(input []byte) (SourceShareSynchronizationSetting, error) { +func UnmarshalSourceShareSynchronizationSettingImplementation(input []byte) (SourceShareSynchronizationSetting, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSourceShareSynchronizationSettingImplementation(input []byte) (Sou return out, nil } - out := RawSourceShareSynchronizationSettingImpl{ - Type: value, - Values: temp, + var parent BaseSourceShareSynchronizationSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSourceShareSynchronizationSettingImpl: %+v", err) } - return out, nil + + return RawSourceShareSynchronizationSettingImpl{ + sourceShareSynchronizationSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2021-08-01/sharesubscription/version.go b/resource-manager/datashare/2021-08-01/sharesubscription/version.go index cda1bb309cf..7511a454c55 100644 --- a/resource-manager/datashare/2021-08-01/sharesubscription/version.go +++ b/resource-manager/datashare/2021-08-01/sharesubscription/version.go @@ -1,12 +1,10 @@ package sharesubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharesubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharesubscription/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/README.md b/resource-manager/datashare/2021-08-01/synchronizationsetting/README.md index 7a9b70b200c..76ca9af9518 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/README.md +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/synchronizationsetting` Documentation -The `synchronizationsetting` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `synchronizationsetting` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/client.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/client.go index 52826df26a9..58e75916232 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/client.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/client.go @@ -15,7 +15,7 @@ type SynchronizationSettingClient struct { } func NewSynchronizationSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*SynchronizationSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "synchronizationsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "synchronizationsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SynchronizationSettingClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/id_share.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/id_share.go index 2dc1978f4a5..5bf34d95b99 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/id_share.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/id_synchronizationsetting.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/id_synchronizationsetting.go index 60a34257112..c6a06be34d3 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/id_synchronizationsetting.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/id_synchronizationsetting.go @@ -46,7 +46,7 @@ func ParseSynchronizationSettingID(input string) (*SynchronizationSettingId, err } id := SynchronizationSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSynchronizationSettingIDInsensitively(input string) (*SynchronizationS } id := SynchronizationSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_create.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_create.go index 024a62ba97f..a064f105c41 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_create.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_create.go @@ -15,7 +15,7 @@ import ( type CreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SynchronizationSetting + Model SynchronizationSetting } // Create ... @@ -53,11 +53,11 @@ func (c SynchronizationSettingClient) Create(ctx context.Context, id Synchroniza if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSynchronizationSettingImplementation(respObj) + model, err := UnmarshalSynchronizationSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_get.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_get.go index 8ac6ea736af..5c301093f4c 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_get.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SynchronizationSetting + Model SynchronizationSetting } // Get ... @@ -48,11 +48,11 @@ func (c SynchronizationSettingClient) Get(ctx context.Context, id Synchronizatio if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSynchronizationSettingImplementation(respObj) + model, err := UnmarshalSynchronizationSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_listbyshare.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_listbyshare.go index 8ae40f376c4..c3a32491c40 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/method_listbyshare.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/method_listbyshare.go @@ -73,7 +73,7 @@ func (c SynchronizationSettingClient) ListByShare(ctx context.Context, id ShareI temp := make([]SynchronizationSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSynchronizationSettingImplementation(v) + val, err := UnmarshalSynchronizationSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SynchronizationSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/model_scheduledsynchronizationsetting.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/model_scheduledsynchronizationsetting.go index 48211e7f0e8..8ffceb470b1 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/model_scheduledsynchronizationsetting.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/model_scheduledsynchronizationsetting.go @@ -16,10 +16,22 @@ type ScheduledSynchronizationSetting struct { Properties ScheduledSynchronizationSettingProperties `json:"properties"` // Fields inherited from SynchronizationSetting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SynchronizationSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ScheduledSynchronizationSetting) SynchronizationSetting() BaseSynchronizationSettingImpl { + return BaseSynchronizationSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ScheduledSynchronizationSetting{} @@ -33,9 +45,10 @@ func (s ScheduledSynchronizationSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledSynchronizationSetting: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/model_synchronizationsetting.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/model_synchronizationsetting.go index e8dfdd22f39..e3406578a8d 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/model_synchronizationsetting.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/model_synchronizationsetting.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SynchronizationSetting interface { + SynchronizationSetting() BaseSynchronizationSettingImpl +} + +var _ SynchronizationSetting = BaseSynchronizationSettingImpl{} + +type BaseSynchronizationSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SynchronizationSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSynchronizationSettingImpl) SynchronizationSetting() BaseSynchronizationSettingImpl { + return s } -// RawSynchronizationSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SynchronizationSetting = RawSynchronizationSettingImpl{} + +// RawSynchronizationSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSynchronizationSettingImpl struct { - Type string - Values map[string]interface{} + synchronizationSetting BaseSynchronizationSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSynchronizationSettingImplementation(input []byte) (SynchronizationSetting, error) { +func (s RawSynchronizationSettingImpl) SynchronizationSetting() BaseSynchronizationSettingImpl { + return s.synchronizationSetting +} + +func UnmarshalSynchronizationSettingImplementation(input []byte) (SynchronizationSetting, error) { if input == nil { return nil, nil } @@ -44,10 +67,15 @@ func unmarshalSynchronizationSettingImplementation(input []byte) (Synchronizatio return out, nil } - out := RawSynchronizationSettingImpl{ - Type: value, - Values: temp, + var parent BaseSynchronizationSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSynchronizationSettingImpl: %+v", err) } - return out, nil + + return RawSynchronizationSettingImpl{ + synchronizationSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2021-08-01/synchronizationsetting/version.go b/resource-manager/datashare/2021-08-01/synchronizationsetting/version.go index db5f8197df1..cc8eff20de2 100644 --- a/resource-manager/datashare/2021-08-01/synchronizationsetting/version.go +++ b/resource-manager/datashare/2021-08-01/synchronizationsetting/version.go @@ -1,12 +1,10 @@ package synchronizationsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/synchronizationsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/synchronizationsetting/2021-08-01" } diff --git a/resource-manager/datashare/2021-08-01/trigger/README.md b/resource-manager/datashare/2021-08-01/trigger/README.md index 451a5cc02c2..aacd96f6caf 100644 --- a/resource-manager/datashare/2021-08-01/trigger/README.md +++ b/resource-manager/datashare/2021-08-01/trigger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2021-08-01/trigger` Documentation -The `trigger` SDK allows for interaction with the Azure Resource Manager Service `datashare` (API Version `2021-08-01`). +The `trigger` SDK allows for interaction with Azure Resource Manager `datashare` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/datashare/2021-08-01/trigger/client.go b/resource-manager/datashare/2021-08-01/trigger/client.go index d64fe022f52..9f27e22218f 100644 --- a/resource-manager/datashare/2021-08-01/trigger/client.go +++ b/resource-manager/datashare/2021-08-01/trigger/client.go @@ -15,7 +15,7 @@ type TriggerClient struct { } func NewTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trigger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trigger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TriggerClient: %+v", err) } diff --git a/resource-manager/datashare/2021-08-01/trigger/id_sharesubscription.go b/resource-manager/datashare/2021-08-01/trigger/id_sharesubscription.go index 8cb7d9d74e6..c1e911714ed 100644 --- a/resource-manager/datashare/2021-08-01/trigger/id_sharesubscription.go +++ b/resource-manager/datashare/2021-08-01/trigger/id_sharesubscription.go @@ -44,7 +44,7 @@ func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error) { } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, } id := ShareSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/trigger/id_trigger.go b/resource-manager/datashare/2021-08-01/trigger/id_trigger.go index ff34852c3de..552bd862121 100644 --- a/resource-manager/datashare/2021-08-01/trigger/id_trigger.go +++ b/resource-manager/datashare/2021-08-01/trigger/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/datashare/2021-08-01/trigger/method_create.go b/resource-manager/datashare/2021-08-01/trigger/method_create.go index b67d187ff47..43131d1532d 100644 --- a/resource-manager/datashare/2021-08-01/trigger/method_create.go +++ b/resource-manager/datashare/2021-08-01/trigger/method_create.go @@ -18,7 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Create ... diff --git a/resource-manager/datashare/2021-08-01/trigger/method_get.go b/resource-manager/datashare/2021-08-01/trigger/method_get.go index bd1667cb005..4e315b60939 100644 --- a/resource-manager/datashare/2021-08-01/trigger/method_get.go +++ b/resource-manager/datashare/2021-08-01/trigger/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Trigger + Model Trigger } // Get ... @@ -48,11 +48,11 @@ func (c TriggerClient) Get(ctx context.Context, id TriggerId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalTriggerImplementation(respObj) + model, err := UnmarshalTriggerImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/datashare/2021-08-01/trigger/method_listbysharesubscription.go b/resource-manager/datashare/2021-08-01/trigger/method_listbysharesubscription.go index 7d4ef4dec7f..c6e6cc8000e 100644 --- a/resource-manager/datashare/2021-08-01/trigger/method_listbysharesubscription.go +++ b/resource-manager/datashare/2021-08-01/trigger/method_listbysharesubscription.go @@ -73,7 +73,7 @@ func (c TriggerClient) ListByShareSubscription(ctx context.Context, id ShareSubs temp := make([]Trigger, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalTriggerImplementation(v) + val, err := UnmarshalTriggerImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Trigger (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/datashare/2021-08-01/trigger/model_scheduledtrigger.go b/resource-manager/datashare/2021-08-01/trigger/model_scheduledtrigger.go index 5c88ee120d7..98477f68967 100644 --- a/resource-manager/datashare/2021-08-01/trigger/model_scheduledtrigger.go +++ b/resource-manager/datashare/2021-08-01/trigger/model_scheduledtrigger.go @@ -16,12 +16,24 @@ type ScheduledTrigger struct { Properties ScheduledTriggerProperties `json:"properties"` // Fields inherited from Trigger + Id *string `json:"id,omitempty"` + Kind TriggerKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledTrigger) Trigger() BaseTriggerImpl { + return BaseTriggerImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledTrigger{} func (s ScheduledTrigger) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledTrigger: %+v", err) } + decoded["kind"] = "ScheduleBased" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/datashare/2021-08-01/trigger/model_trigger.go b/resource-manager/datashare/2021-08-01/trigger/model_trigger.go index ce18691535b..0be750db25d 100644 --- a/resource-manager/datashare/2021-08-01/trigger/model_trigger.go +++ b/resource-manager/datashare/2021-08-01/trigger/model_trigger.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Trigger interface { + Trigger() BaseTriggerImpl +} + +var _ Trigger = BaseTriggerImpl{} + +type BaseTriggerImpl struct { + Id *string `json:"id,omitempty"` + Kind TriggerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseTriggerImpl) Trigger() BaseTriggerImpl { + return s } -// RawTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Trigger = RawTriggerImpl{} + +// RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerImpl struct { - Type string - Values map[string]interface{} + trigger BaseTriggerImpl + Type string + Values map[string]interface{} } -func unmarshalTriggerImplementation(input []byte) (Trigger, error) { +func (s RawTriggerImpl) Trigger() BaseTriggerImpl { + return s.trigger +} + +func UnmarshalTriggerImplementation(input []byte) (Trigger, error) { if input == nil { return nil, nil } @@ -44,10 +67,15 @@ func unmarshalTriggerImplementation(input []byte) (Trigger, error) { return out, nil } - out := RawTriggerImpl{ - Type: value, - Values: temp, + var parent BaseTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerImpl: %+v", err) } - return out, nil + + return RawTriggerImpl{ + trigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/datashare/2021-08-01/trigger/version.go b/resource-manager/datashare/2021-08-01/trigger/version.go index 47625c748cd..71b32d9fcf5 100644 --- a/resource-manager/datashare/2021-08-01/trigger/version.go +++ b/resource-manager/datashare/2021-08-01/trigger/version.go @@ -1,12 +1,10 @@ package trigger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trigger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trigger/2021-08-01" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md index 0b8fb592855..b2593761a8f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `application` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_application.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_application.go index 7493893a202..4bc3d1fb2d2 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_application.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_applicationgroup.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_applicationgroup.go index 5cb6591ef0b..1f6445ebe2f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate.go index d990367d806..b708f0b7f4f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationClient) CreateOrUpdate(ctx context.Context, id ApplicationId, var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update.go index 45a7787c6cc..4c47958c02e 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/application/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/application/version.go index b3bd5a71e05..298af2d03e1 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/application/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md index f5cc43fd110..5bb90a00523 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup` Documentation -The `applicationgroup` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `applicationgroup` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/client.go index b07bf02a25f..286f253207b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/client.go @@ -15,7 +15,7 @@ type ApplicationGroupClient struct { } func NewApplicationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGroupClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go index cc7473a70e0..a4533dcf29b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate.go index 207f2306a43..d68aa2ad139 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationGroupClient) CreateOrUpdate(ctx context.Context, id Applicati var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get.go index 8af1aeae85a..5f689277e19 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGroupClient) Get(ctx context.Context, id ApplicationGroupId) var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup.go index 3de214a8e69..85114a90ac8 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription.go index c34b661ee10..50a6f418503 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update.go index 2673570a9a2..503845615c2 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationGroupClient) Update(ctx context.Context, id ApplicationGroupI var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/version.go index abe65319f8b..425de69192b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/applicationgroup/version.go @@ -1,12 +1,10 @@ package applicationgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgroup/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md index 851bda3ba3f..6062860f97c 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/desktop` Documentation -The `desktop` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `desktop` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/client.go index e1b1dd005ce..fccabe50eda 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/client.go @@ -15,7 +15,7 @@ type DesktopClient struct { } func NewDesktopClientWithBaseURI(sdkApi sdkEnv.Api) (*DesktopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "desktop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "desktop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DesktopClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_applicationgroup.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_applicationgroup.go index 404609d4ca0..b3fd34c003f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_desktop.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_desktop.go index 9891d38e321..07d7d96b3fb 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_desktop.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/id_desktop.go @@ -44,7 +44,7 @@ func ParseDesktopID(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDesktopIDInsensitively(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get.go index 292a37dfaec..63a8032f34d 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_get.go @@ -45,7 +45,6 @@ func (c DesktopClient) Get(ctx context.Context, id DesktopId) (result GetOperati var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update.go index 6b02d0385a5..5d797f083b7 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/method_update.go @@ -49,7 +49,6 @@ func (c DesktopClient) Update(ctx context.Context, id DesktopId, input DesktopPa var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/version.go index 82f4c83323b..bb0f1932a1f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/desktop/version.go @@ -1,12 +1,10 @@ package desktop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/desktop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/desktop/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md index ec377ab9872..dc92a31c017 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool` Documentation -The `hostpool` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `hostpool` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/client.go index 66a85262985..e052d6173f9 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/client.go @@ -15,7 +15,7 @@ type HostPoolClient struct { } func NewHostPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*HostPoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hostpool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hostpool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostPoolClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go index dab797a1553..5ad8d6b6531 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate.go index c990a6de7e6..4256dfa27bb 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HostPoolClient) CreateOrUpdate(ctx context.Context, id HostPoolId, input var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete.go index c0d78cc24b4..d83814eacc1 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get.go index 002299ecd96..1beab20188e 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_get.go @@ -45,7 +45,6 @@ func (c HostPoolClient) Get(ctx context.Context, id HostPoolId) (result GetOpera var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken.go index 6e3d2acc005..d6ba45ec662 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_retrieveregistrationtoken.go @@ -46,7 +46,6 @@ func (c HostPoolClient) RetrieveRegistrationToken(ctx context.Context, id HostPo var model RegistrationInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update.go index af6dc0fe82e..ec302eab026 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/method_update.go @@ -49,7 +49,6 @@ func (c HostPoolClient) Update(ctx context.Context, id HostPoolId, input HostPoo var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/version.go index 3601ff52ba2..adad28f9019 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/hostpool/version.go @@ -1,12 +1,10 @@ package hostpool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hostpool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hostpool/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/README.md index c52b4c35aad..01e4588fb7b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage` Documentation -The `msiximage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `msiximage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/client.go index ecdb73afc25..ae8a2fb4410 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/client.go @@ -15,7 +15,7 @@ type MsixImageClient struct { } func NewMsixImageClientWithBaseURI(sdkApi sdkEnv.Api) (*MsixImageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msiximage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msiximage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MsixImageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/id_hostpool.go index 3344fc529c2..163dffe8888 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/version.go index 80c9552da98..51d414c7ef1 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msiximage/version.go @@ -1,12 +1,10 @@ package msiximage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msiximage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msiximage/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/README.md index b6435ec23b9..7c023becbad 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage` Documentation -The `msixpackage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `msixpackage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/client.go index 08a6f16b840..7104aaa71b3 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/client.go @@ -15,7 +15,7 @@ type MSIXPackageClient struct { } func NewMSIXPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*MSIXPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msixpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msixpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MSIXPackageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_hostpool.go index 040ac20ab76..b4e856ec1ac 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_msixpackage.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_msixpackage.go index 79bf202ed0e..e331d5548c1 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_msixpackage.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/id_msixpackage.go @@ -44,7 +44,7 @@ func ParseMsixPackageID(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMsixPackageIDInsensitively(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_createorupdate.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_createorupdate.go index 3161039d931..c5a9487907b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MSIXPackageClient) CreateOrUpdate(ctx context.Context, id MsixPackageId, var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_get.go index 634d42a9b17..5fe6bb9175f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_get.go @@ -45,7 +45,6 @@ func (c MSIXPackageClient) Get(ctx context.Context, id MsixPackageId) (result Ge var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_update.go index fc74a6b6a19..21ff1e3a75b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/method_update.go @@ -49,7 +49,6 @@ func (c MSIXPackageClient) Update(ctx context.Context, id MsixPackageId, input M var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/version.go index 5909acdbdbd..1fff4b8def8 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/msixpackage/version.go @@ -1,12 +1,10 @@ package msixpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msixpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msixpackage/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/README.md index b9859368877..667f344adfc 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink` Documentation -The `privatelink` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `privatelink` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/client.go index d8e4d40206f..84b106c4ad6 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/client.go @@ -15,7 +15,7 @@ type PrivateLinkClient struct { } func NewPrivateLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_hostpool.go index 579d038a99f..f516f40cc52 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_privateendpointconnection.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_privateendpointconnection.go index bff48a3058c..2b47e4a1e59 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_privateendpointconnection.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspace.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspace.go index b64db7b5874..ad95ad7d467 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspace.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspaceprivateendpointconnection.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspaceprivateendpointconnection.go index 09d7a97a2b2..4dfb1be1b9d 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspaceprivateendpointconnection.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go index 2f91d5eb7c7..edc7197e9b6 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGetByHostPool(ctx context.C var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go index 1527d680677..431c1182404 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGetByWorkspace(ctx context. var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go index a17d68f0b98..8a925a10a4b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go @@ -49,7 +49,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsUpdateByHostPool(ctx contex var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go index c66567ecb46..3a4bab53489 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go @@ -49,7 +49,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsUpdateByWorkspace(ctx conte var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/version.go index 58fd62fd5b3..d75f8d84fe4 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/privatelink/version.go @@ -1,12 +1,10 @@ package privatelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelink/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md index 4e69c8dde1c..3a4a11d93fa 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan` Documentation -The `scalingplan` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `scalingplan` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/client.go index 9f61c932c45..e4ef80bb2b3 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/client.go @@ -15,7 +15,7 @@ type ScalingPlanClient struct { } func NewScalingPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*ScalingPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scalingplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scalingplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScalingPlanClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_hostpool.go index e07babf38ed..99a777187a7 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_scalingplan.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_scalingplan.go index c109bd50046..7cff978873e 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_scalingplan.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/id_scalingplan.go @@ -42,7 +42,7 @@ func ParseScalingPlanID(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create.go index 9d0de3395f4..52557422ed3 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_create.go @@ -50,7 +50,6 @@ func (c ScalingPlanClient) Create(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get.go index 656371a9d06..0bd28e3a491 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_get.go @@ -45,7 +45,6 @@ func (c ScalingPlanClient) Get(ctx context.Context, id ScalingPlanId) (result Ge var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update.go index 6e580a64db6..5757e0ebec6 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/method_update.go @@ -49,7 +49,6 @@ func (c ScalingPlanClient) Update(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/version.go index 577b2cdd7db..01922d7de8f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/scalingplan/version.go @@ -1,12 +1,10 @@ package scalingplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scalingplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scalingplan/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md index ff187e4b7e2..6246c670fad 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost` Documentation -The `sessionhost` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `sessionhost` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/client.go index 0ea9ae0befc..ced1537db50 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/client.go @@ -15,7 +15,7 @@ type SessionHostClient struct { } func NewSessionHostClientWithBaseURI(sdkApi sdkEnv.Api) (*SessionHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sessionhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sessionhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SessionHostClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_hostpool.go index 71402210a51..2b0c2ef6918 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_sessionhost.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_sessionhost.go index 2f48874e279..002f1661002 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete.go index e62625d7a67..9eebfcf3a86 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get.go index d419b6d876d..32d3a452e0b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_get.go @@ -45,7 +45,6 @@ func (c SessionHostClient) Get(ctx context.Context, id SessionHostId) (result Ge var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update.go index cff5fcae123..01d50994dfd 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/method_update.go @@ -34,6 +34,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SessionHostClient) Update(ctx context.Context, id SessionHostId, input S var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/version.go index a9a312570df..a4f277761b0 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/sessionhost/version.go @@ -1,12 +1,10 @@ package sessionhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sessionhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sessionhost/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/README.md index 81c857304c5..f211bee662f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem` Documentation -The `startmenuitem` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `startmenuitem` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/client.go index 8bb4ca4de7e..fb8fbf510c6 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/client.go @@ -15,7 +15,7 @@ type StartMenuItemClient struct { } func NewStartMenuItemClientWithBaseURI(sdkApi sdkEnv.Api) (*StartMenuItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startmenuitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startmenuitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartMenuItemClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/id_applicationgroup.go b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/id_applicationgroup.go index bd5d1809f1a..0604cc0d19b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/version.go index 73375b36830..9e5dd1cdea0 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/startmenuitem/version.go @@ -1,12 +1,10 @@ package startmenuitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startmenuitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startmenuitem/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/README.md index e0cd157fe44..782b84dd8fc 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/usersession` Documentation -The `usersession` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `usersession` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/client.go index 2f52a9d8f34..25871535051 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/client.go @@ -15,7 +15,7 @@ type UserSessionClient struct { } func NewUserSessionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSessionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersession", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersession", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSessionClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_hostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_hostpool.go index b586016f685..4861ecfae51 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_sessionhost.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_sessionhost.go index e709e8c7410..2600471a266 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_usersession.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_usersession.go index 138f66a1c75..fb1ce3f8760 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_usersession.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/id_usersession.go @@ -46,7 +46,7 @@ func ParseUserSessionID(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSessionIDInsensitively(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_delete.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_delete.go index 3cff333d871..ab809bdd242 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_delete.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_get.go index ad1e9b90927..0836c7b82f1 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_get.go @@ -45,7 +45,6 @@ func (c UserSessionClient) Get(ctx context.Context, id UserSessionId) (result Ge var model UserSession result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_listbyhostpool.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_listbyhostpool.go index 49682d9f86b..e4b368a059d 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_listbyhostpool.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/method_listbyhostpool.go @@ -39,6 +39,7 @@ func (o ListByHostPoolOperationOptions) ToHeaders() *client.Headers { func (o ListByHostPoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/version.go index c5379e4bd38..424b9724295 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/usersession/version.go @@ -1,12 +1,10 @@ package usersession -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersession/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersession/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md index e93513c3a8a..3bb856c33f3 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2021-09-03-preview/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2021-09-03-preview`). +The `workspace` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2021-09-03-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/client.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/client.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go index d5c85af907d..bd4f602857a 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate.go index 346da474838..3a6d6d331f2 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get.go index b52f054ada7..3a673fbc7c2 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update.go index c527b084b73..f7f12884d0f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/method_update.go @@ -49,7 +49,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/version.go b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/version.go index 2337ea8938f..4787613fd4f 100644 --- a/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/version.go +++ b/resource-manager/desktopvirtualization/2021-09-03-preview/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-03-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2021-09-03-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/application/README.md index 56e5140f028..21c8325d324 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `application` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go index 7493893a202..4bc3d1fb2d2 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go index 5cb6591ef0b..1f6445ebe2f 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_createorupdate.go index d990367d806..b708f0b7f4f 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationClient) CreateOrUpdate(ctx context.Context, id ApplicationId, var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_update.go index 45a7787c6cc..4c47958c02e 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/application/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/application/version.go index 48bb39efae5..2644053a988 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/application/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/README.md index 79cf91fe42b..0367fb9b2a2 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup` Documentation -The `applicationgroup` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `applicationgroup` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/client.go index b07bf02a25f..286f253207b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/client.go @@ -15,7 +15,7 @@ type ApplicationGroupClient struct { } func NewApplicationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGroupClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go index cc7473a70e0..a4533dcf29b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_createorupdate.go index 207f2306a43..d68aa2ad139 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationGroupClient) CreateOrUpdate(ctx context.Context, id Applicati var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_get.go index 8af1aeae85a..5f689277e19 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGroupClient) Get(ctx context.Context, id ApplicationGroupId) var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbyresourcegroup.go index 3de214a8e69..85114a90ac8 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbysubscription.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbysubscription.go index c34b661ee10..50a6f418503 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbysubscription.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_update.go index 2673570a9a2..503845615c2 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationGroupClient) Update(ctx context.Context, id ApplicationGroupI var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/version.go index 077a0ddc441..c2b5d6d47c1 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/applicationgroup/version.go @@ -1,12 +1,10 @@ package applicationgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgroup/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/README.md index 3537dba4c72..268a4273bab 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/desktop` Documentation -The `desktop` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `desktop` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/client.go index e1b1dd005ce..fccabe50eda 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/client.go @@ -15,7 +15,7 @@ type DesktopClient struct { } func NewDesktopClientWithBaseURI(sdkApi sdkEnv.Api) (*DesktopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "desktop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "desktop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DesktopClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go index 404609d4ca0..b3fd34c003f 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go index 9891d38e321..07d7d96b3fb 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/id_desktop.go @@ -44,7 +44,7 @@ func ParseDesktopID(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDesktopIDInsensitively(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_get.go index 292a37dfaec..63a8032f34d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_get.go @@ -45,7 +45,6 @@ func (c DesktopClient) Get(ctx context.Context, id DesktopId) (result GetOperati var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_update.go index 6b02d0385a5..5d797f083b7 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/method_update.go @@ -49,7 +49,6 @@ func (c DesktopClient) Update(ctx context.Context, id DesktopId, input DesktopPa var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/version.go index c70db4ebaaf..3b8dcf9caf1 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/desktop/version.go @@ -1,12 +1,10 @@ package desktop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/desktop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/desktop/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/README.md index ce75dc46826..b5b65050c1d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool` Documentation -The `hostpool` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `hostpool` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/client.go index 66a85262985..e052d6173f9 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/client.go @@ -15,7 +15,7 @@ type HostPoolClient struct { } func NewHostPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*HostPoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hostpool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hostpool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostPoolClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go index dab797a1553..5ad8d6b6531 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_createorupdate.go index c990a6de7e6..4256dfa27bb 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HostPoolClient) CreateOrUpdate(ctx context.Context, id HostPoolId, input var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_delete.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_delete.go index c0d78cc24b4..d83814eacc1 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_get.go index 002299ecd96..1beab20188e 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_get.go @@ -45,7 +45,6 @@ func (c HostPoolClient) Get(ctx context.Context, id HostPoolId) (result GetOpera var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_retrieveregistrationtoken.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_retrieveregistrationtoken.go index 6e3d2acc005..d6ba45ec662 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_retrieveregistrationtoken.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_retrieveregistrationtoken.go @@ -46,7 +46,6 @@ func (c HostPoolClient) RetrieveRegistrationToken(ctx context.Context, id HostPo var model RegistrationInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_update.go index af6dc0fe82e..ec302eab026 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/method_update.go @@ -49,7 +49,6 @@ func (c HostPoolClient) Update(ctx context.Context, id HostPoolId, input HostPoo var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/version.go index 9bfcfbec469..0eedc95c37c 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/hostpool/version.go @@ -1,12 +1,10 @@ package hostpool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hostpool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hostpool/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/README.md index f2bb515aea1..a0293468370 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage` Documentation -The `msiximage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `msiximage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/client.go index ecdb73afc25..ae8a2fb4410 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/client.go @@ -15,7 +15,7 @@ type MsixImageClient struct { } func NewMsixImageClientWithBaseURI(sdkApi sdkEnv.Api) (*MsixImageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msiximage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msiximage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MsixImageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/id_hostpool.go index 3344fc529c2..163dffe8888 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/version.go index 1593e2f1f91..a9ef66dde84 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msiximage/version.go @@ -1,12 +1,10 @@ package msiximage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msiximage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msiximage/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/README.md index 3bca03b076e..b7512158645 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage` Documentation -The `msixpackage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `msixpackage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/client.go index 08a6f16b840..7104aaa71b3 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/client.go @@ -15,7 +15,7 @@ type MSIXPackageClient struct { } func NewMSIXPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*MSIXPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msixpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msixpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MSIXPackageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_hostpool.go index 040ac20ab76..b4e856ec1ac 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_msixpackage.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_msixpackage.go index 79bf202ed0e..e331d5548c1 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_msixpackage.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/id_msixpackage.go @@ -44,7 +44,7 @@ func ParseMsixPackageID(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMsixPackageIDInsensitively(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_createorupdate.go index 3161039d931..c5a9487907b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MSIXPackageClient) CreateOrUpdate(ctx context.Context, id MsixPackageId, var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_get.go index 634d42a9b17..5fe6bb9175f 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_get.go @@ -45,7 +45,6 @@ func (c MSIXPackageClient) Get(ctx context.Context, id MsixPackageId) (result Ge var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_update.go index fc74a6b6a19..21ff1e3a75b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/method_update.go @@ -49,7 +49,6 @@ func (c MSIXPackageClient) Update(ctx context.Context, id MsixPackageId, input M var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/version.go index 272cd7a04f5..43949fea08b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/msixpackage/version.go @@ -1,12 +1,10 @@ package msixpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msixpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msixpackage/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/README.md index 691214224d1..8d570b71afb 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink` Documentation -The `privatelink` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `privatelink` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/client.go index d8e4d40206f..84b106c4ad6 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/client.go @@ -15,7 +15,7 @@ type PrivateLinkClient struct { } func NewPrivateLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_hostpool.go index 579d038a99f..f516f40cc52 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_privateendpointconnection.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_privateendpointconnection.go index bff48a3058c..2b47e4a1e59 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_privateendpointconnection.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspace.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspace.go index b64db7b5874..ad95ad7d467 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspace.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspaceprivateendpointconnection.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspaceprivateendpointconnection.go index 09d7a97a2b2..4dfb1be1b9d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspaceprivateendpointconnection.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go index 2f91d5eb7c7..edc7197e9b6 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyhostpool.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGetByHostPool(ctx context.C var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go index 1527d680677..431c1182404 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsgetbyworkspace.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGetByWorkspace(ctx context. var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go index a17d68f0b98..8a925a10a4b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyhostpool.go @@ -49,7 +49,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsUpdateByHostPool(ctx contex var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go index c66567ecb46..3a4bab53489 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/method_privateendpointconnectionsupdatebyworkspace.go @@ -49,7 +49,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsUpdateByWorkspace(ctx conte var model PrivateEndpointConnectionWithSystemData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/version.go index 95a9d87bb72..a45c8d803ba 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/privatelink/version.go @@ -1,12 +1,10 @@ package privatelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelink/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/README.md index 4ba4fa7fc12..cef11c88f33 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan` Documentation -The `scalingplan` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `scalingplan` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/client.go index 9f61c932c45..e4ef80bb2b3 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/client.go @@ -15,7 +15,7 @@ type ScalingPlanClient struct { } func NewScalingPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*ScalingPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scalingplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scalingplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScalingPlanClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go index e07babf38ed..99a777187a7 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go index c109bd50046..7cff978873e 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/id_scalingplan.go @@ -42,7 +42,7 @@ func ParseScalingPlanID(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_create.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_create.go index 9d0de3395f4..52557422ed3 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_create.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_create.go @@ -50,7 +50,6 @@ func (c ScalingPlanClient) Create(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_get.go index 656371a9d06..0bd28e3a491 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_get.go @@ -45,7 +45,6 @@ func (c ScalingPlanClient) Get(ctx context.Context, id ScalingPlanId) (result Ge var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_update.go index 6e580a64db6..5757e0ebec6 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/method_update.go @@ -49,7 +49,6 @@ func (c ScalingPlanClient) Update(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/version.go index 2e79c42b774..3946cbd0cfb 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/scalingplan/version.go @@ -1,12 +1,10 @@ package scalingplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scalingplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scalingplan/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/README.md index 942434ee4ab..94bcf49b4cc 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost` Documentation -The `sessionhost` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `sessionhost` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/client.go index 0ea9ae0befc..ced1537db50 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/client.go @@ -15,7 +15,7 @@ type SessionHostClient struct { } func NewSessionHostClientWithBaseURI(sdkApi sdkEnv.Api) (*SessionHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sessionhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sessionhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SessionHostClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go index 71402210a51..2b0c2ef6918 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go index 2f48874e279..002f1661002 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_delete.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_delete.go index e62625d7a67..9eebfcf3a86 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_get.go index d419b6d876d..32d3a452e0b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_get.go @@ -45,7 +45,6 @@ func (c SessionHostClient) Get(ctx context.Context, id SessionHostId) (result Ge var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_update.go index cff5fcae123..01d50994dfd 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/method_update.go @@ -34,6 +34,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SessionHostClient) Update(ctx context.Context, id SessionHostId, input S var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/version.go index 083d3bb712a..10535b22568 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/sessionhost/version.go @@ -1,12 +1,10 @@ package sessionhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sessionhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sessionhost/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/README.md index ed1b57476a6..7bc63b74237 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem` Documentation -The `startmenuitem` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `startmenuitem` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/client.go index 8bb4ca4de7e..fb8fbf510c6 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/client.go @@ -15,7 +15,7 @@ type StartMenuItemClient struct { } func NewStartMenuItemClientWithBaseURI(sdkApi sdkEnv.Api) (*StartMenuItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startmenuitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startmenuitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartMenuItemClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/id_applicationgroup.go index bd5d1809f1a..0604cc0d19b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/version.go index 8fd996cf77f..17a9db6ec4b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/startmenuitem/version.go @@ -1,12 +1,10 @@ package startmenuitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startmenuitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startmenuitem/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/README.md index da4f132f014..8c90c23e720 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/usersession` Documentation -The `usersession` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `usersession` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/client.go index 2f52a9d8f34..25871535051 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/client.go @@ -15,7 +15,7 @@ type UserSessionClient struct { } func NewUserSessionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSessionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersession", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersession", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSessionClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_hostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_hostpool.go index b586016f685..4861ecfae51 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_sessionhost.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_sessionhost.go index e709e8c7410..2600471a266 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_usersession.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_usersession.go index 138f66a1c75..fb1ce3f8760 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_usersession.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/id_usersession.go @@ -46,7 +46,7 @@ func ParseUserSessionID(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSessionIDInsensitively(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_delete.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_delete.go index 3cff333d871..ab809bdd242 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_get.go index ad1e9b90927..0836c7b82f1 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_get.go @@ -45,7 +45,6 @@ func (c UserSessionClient) Get(ctx context.Context, id UserSessionId) (result Ge var model UserSession result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_listbyhostpool.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_listbyhostpool.go index 49682d9f86b..e4b368a059d 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_listbyhostpool.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/method_listbyhostpool.go @@ -39,6 +39,7 @@ func (o ListByHostPoolOperationOptions) ToHeaders() *client.Headers { func (o ListByHostPoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/version.go index 34d6457579a..e7476ef7dd0 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/usersession/version.go @@ -1,12 +1,10 @@ package usersession -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersession/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersession/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/README.md b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/README.md index 74b58235726..e8c96ee81c4 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/README.md +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-02-10-preview/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-02-10-preview`). +The `workspace` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-02-10-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/client.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/client.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go index d5c85af907d..bd4f602857a 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_createorupdate.go index 346da474838..3a6d6d331f2 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_get.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_get.go index b52f054ada7..3a673fbc7c2 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_get.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_update.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_update.go index c527b084b73..f7f12884d0f 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_update.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/method_update.go @@ -49,7 +49,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/version.go b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/version.go index 537513b53d9..f0d7fb2e5b6 100644 --- a/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/version.go +++ b/resource-manager/desktopvirtualization/2022-02-10-preview/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-10-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2022-02-10-preview" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/README.md b/resource-manager/desktopvirtualization/2022-09-09/application/README.md index 63a355c7efa..138e4720a64 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `application` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/client.go b/resource-manager/desktopvirtualization/2022-09-09/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/id_application.go b/resource-manager/desktopvirtualization/2022-09-09/application/id_application.go index 7493893a202..4bc3d1fb2d2 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/id_application.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-09-09/application/id_applicationgroup.go index 5cb6591ef0b..1f6445ebe2f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-09-09/application/method_createorupdate.go index d990367d806..b708f0b7f4f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationClient) CreateOrUpdate(ctx context.Context, id ApplicationId, var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/application/method_get.go index 4098c587ba5..288a250a410 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/application/method_list.go index 12db64bf993..676a0e02709 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/application/method_update.go index 45a7787c6cc..4c47958c02e 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/application/version.go b/resource-manager/desktopvirtualization/2022-09-09/application/version.go index cf18f549a63..d097a2823e7 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/application/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/README.md b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/README.md index 84101cdce6b..22183ee3dc2 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/applicationgroup` Documentation -The `applicationgroup` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `applicationgroup` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/client.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/client.go index b07bf02a25f..286f253207b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/client.go @@ -15,7 +15,7 @@ type ApplicationGroupClient struct { } func NewApplicationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGroupClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/id_applicationgroup.go index cc7473a70e0..a4533dcf29b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_createorupdate.go index 207f2306a43..d68aa2ad139 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationGroupClient) CreateOrUpdate(ctx context.Context, id Applicati var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_get.go index 8af1aeae85a..5f689277e19 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGroupClient) Get(ctx context.Context, id ApplicationGroupId) var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbyresourcegroup.go index 0ced042e1b1..80f65ad5955 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbyresourcegroup.go @@ -43,6 +43,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbysubscription.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbysubscription.go index c34b661ee10..50a6f418503 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbysubscription.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_update.go index 2673570a9a2..503845615c2 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationGroupClient) Update(ctx context.Context, id ApplicationGroupI var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/version.go b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/version.go index a6d84dfabd9..2f6ea4915cd 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/applicationgroup/version.go @@ -1,12 +1,10 @@ package applicationgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgroup/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/README.md b/resource-manager/desktopvirtualization/2022-09-09/desktop/README.md index d11099035d8..64cff6eed17 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/desktop` Documentation -The `desktop` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `desktop` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/client.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/client.go index e1b1dd005ce..fccabe50eda 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/client.go @@ -15,7 +15,7 @@ type DesktopClient struct { } func NewDesktopClientWithBaseURI(sdkApi sdkEnv.Api) (*DesktopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "desktop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "desktop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DesktopClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/id_applicationgroup.go index 404609d4ca0..b3fd34c003f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/id_desktop.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/id_desktop.go index 9891d38e321..07d7d96b3fb 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/id_desktop.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/id_desktop.go @@ -44,7 +44,7 @@ func ParseDesktopID(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDesktopIDInsensitively(input string) (*DesktopId, error) { } id := DesktopId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_get.go index 292a37dfaec..63a8032f34d 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_get.go @@ -45,7 +45,6 @@ func (c DesktopClient) Get(ctx context.Context, id DesktopId) (result GetOperati var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_list.go index e94b2d5cd86..03d313a4854 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_update.go index 6b02d0385a5..5d797f083b7 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/method_update.go @@ -49,7 +49,6 @@ func (c DesktopClient) Update(ctx context.Context, id DesktopId, input DesktopPa var model Desktop result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/desktop/version.go b/resource-manager/desktopvirtualization/2022-09-09/desktop/version.go index b2235e738df..af60cb89ff5 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/desktop/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/desktop/version.go @@ -1,12 +1,10 @@ package desktop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/desktop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/desktop/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/README.md b/resource-manager/desktopvirtualization/2022-09-09/hostpool/README.md index 55534e7baf4..3de55de692a 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/hostpool` Documentation -The `hostpool` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `hostpool` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/client.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/client.go index 66a85262985..e052d6173f9 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/client.go @@ -15,7 +15,7 @@ type HostPoolClient struct { } func NewHostPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*HostPoolClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hostpool", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hostpool", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HostPoolClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/id_hostpool.go index dab797a1553..5ad8d6b6531 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_createorupdate.go index c990a6de7e6..4256dfa27bb 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HostPoolClient) CreateOrUpdate(ctx context.Context, id HostPoolId, input var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_delete.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_delete.go index c0d78cc24b4..d83814eacc1 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_get.go index 002299ecd96..1beab20188e 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_get.go @@ -45,7 +45,6 @@ func (c HostPoolClient) Get(ctx context.Context, id HostPoolId) (result GetOpera var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_list.go index b29094dc70c..167656ecfd7 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_listbyresourcegroup.go index 161d9daf436..fc6de240f33 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_listbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_retrieveregistrationtoken.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_retrieveregistrationtoken.go index 6e3d2acc005..d6ba45ec662 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_retrieveregistrationtoken.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_retrieveregistrationtoken.go @@ -46,7 +46,6 @@ func (c HostPoolClient) RetrieveRegistrationToken(ctx context.Context, id HostPo var model RegistrationInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_update.go index af6dc0fe82e..ec302eab026 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/method_update.go @@ -49,7 +49,6 @@ func (c HostPoolClient) Update(ctx context.Context, id HostPoolId, input HostPoo var model HostPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/hostpool/version.go b/resource-manager/desktopvirtualization/2022-09-09/hostpool/version.go index b99b89a4bd2..3921bc6b02c 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/hostpool/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/hostpool/version.go @@ -1,12 +1,10 @@ package hostpool -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hostpool/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hostpool/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/README.md b/resource-manager/desktopvirtualization/2022-09-09/msiximage/README.md index 1e0ce57fd52..ad5af9b25cb 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/msiximage` Documentation -The `msiximage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `msiximage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/client.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/client.go index ecdb73afc25..ae8a2fb4410 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/client.go @@ -15,7 +15,7 @@ type MsixImageClient struct { } func NewMsixImageClientWithBaseURI(sdkApi sdkEnv.Api) (*MsixImageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msiximage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msiximage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MsixImageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/id_hostpool.go index 3344fc529c2..163dffe8888 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msiximage/version.go b/resource-manager/desktopvirtualization/2022-09-09/msiximage/version.go index d7eb5dfd563..ba705a134f6 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msiximage/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msiximage/version.go @@ -1,12 +1,10 @@ package msiximage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msiximage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msiximage/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/README.md b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/README.md index 8a67d6123a5..6a7eb32e922 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/msixpackage` Documentation -The `msixpackage` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `msixpackage` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/client.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/client.go index 08a6f16b840..7104aaa71b3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/client.go @@ -15,7 +15,7 @@ type MSIXPackageClient struct { } func NewMSIXPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*MSIXPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "msixpackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "msixpackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MSIXPackageClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_hostpool.go index 040ac20ab76..b4e856ec1ac 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_msixpackage.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_msixpackage.go index 79bf202ed0e..e331d5548c1 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_msixpackage.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/id_msixpackage.go @@ -44,7 +44,7 @@ func ParseMsixPackageID(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMsixPackageIDInsensitively(input string) (*MsixPackageId, error) { } id := MsixPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_createorupdate.go index 3161039d931..c5a9487907b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MSIXPackageClient) CreateOrUpdate(ctx context.Context, id MsixPackageId, var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_get.go index 634d42a9b17..5fe6bb9175f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_get.go @@ -45,7 +45,6 @@ func (c MSIXPackageClient) Get(ctx context.Context, id MsixPackageId) (result Ge var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_list.go index 473768db5e8..99b04eab71f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_update.go index fc74a6b6a19..21ff1e3a75b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/method_update.go @@ -49,7 +49,6 @@ func (c MSIXPackageClient) Update(ctx context.Context, id MsixPackageId, input M var model MSIXPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/version.go b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/version.go index 5dad1291f91..b92a46ddcb4 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/msixpackage/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/msixpackage/version.go @@ -1,12 +1,10 @@ package msixpackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/msixpackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/msixpackage/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/README.md b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/README.md index 5dc789d4fc5..765cec7384b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/scalingplan` Documentation -The `scalingplan` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `scalingplan` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/client.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/client.go index 9f61c932c45..e4ef80bb2b3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/client.go @@ -15,7 +15,7 @@ type ScalingPlanClient struct { } func NewScalingPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*ScalingPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scalingplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scalingplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScalingPlanClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_hostpool.go index e07babf38ed..99a777187a7 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_scalingplan.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_scalingplan.go index c109bd50046..7cff978873e 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_scalingplan.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/id_scalingplan.go @@ -42,7 +42,7 @@ func ParseScalingPlanID(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_create.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_create.go index 9d0de3395f4..52557422ed3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_create.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_create.go @@ -50,7 +50,6 @@ func (c ScalingPlanClient) Create(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_get.go index 656371a9d06..0bd28e3a491 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_get.go @@ -45,7 +45,6 @@ func (c ScalingPlanClient) Get(ctx context.Context, id ScalingPlanId) (result Ge var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyhostpool.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyhostpool.go index 38d684eed56..e526a537535 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyhostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyhostpool.go @@ -41,6 +41,7 @@ func (o ListByHostPoolOperationOptions) ToHeaders() *client.Headers { func (o ListByHostPoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyresourcegroup.go index feb7d9ec457..918692b7a54 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbysubscription.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbysubscription.go index ce77bfa6412..d58d149c5f0 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbysubscription.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_update.go index 6e580a64db6..5757e0ebec6 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/method_update.go @@ -49,7 +49,6 @@ func (c ScalingPlanClient) Update(ctx context.Context, id ScalingPlanId, input S var model ScalingPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/version.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/version.go index b56fe4333d9..02d8d2938f3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplan/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplan/version.go @@ -1,12 +1,10 @@ package scalingplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scalingplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scalingplan/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/README.md b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/README.md index 9807152d312..31b0be7f367 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule` Documentation -The `scalingplanpooledschedule` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `scalingplanpooledschedule` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/client.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/client.go index a1f26f86297..3822aff5059 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/client.go @@ -15,7 +15,7 @@ type ScalingPlanPooledScheduleClient struct { } func NewScalingPlanPooledScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScalingPlanPooledScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scalingplanpooledschedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scalingplanpooledschedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScalingPlanPooledScheduleClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_pooledschedule.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_pooledschedule.go index 2e71af4fd6e..775d5c4ec50 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_pooledschedule.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_pooledschedule.go @@ -44,7 +44,7 @@ func ParsePooledScheduleID(input string) (*PooledScheduleId, error) { } id := PooledScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePooledScheduleIDInsensitively(input string) (*PooledScheduleId, error) } id := PooledScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_scalingplan.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_scalingplan.go index dba68f06932..0ad83aefe9b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_scalingplan.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/id_scalingplan.go @@ -42,7 +42,7 @@ func ParseScalingPlanID(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScalingPlanIDInsensitively(input string) (*ScalingPlanId, error) { } id := ScalingPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_create.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_create.go index c0de0485efc..c00f1038f65 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_create.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_create.go @@ -50,7 +50,6 @@ func (c ScalingPlanPooledScheduleClient) Create(ctx context.Context, id PooledSc var model ScalingPlanPooledSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_get.go index 8c4ec419ed2..be6d9a31b6c 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_get.go @@ -45,7 +45,6 @@ func (c ScalingPlanPooledScheduleClient) Get(ctx context.Context, id PooledSched var model ScalingPlanPooledSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_list.go index 17c249485af..b7b9f9e21a4 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_update.go index 83a01762501..d3ead6728bf 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/method_update.go @@ -49,7 +49,6 @@ func (c ScalingPlanPooledScheduleClient) Update(ctx context.Context, id PooledSc var model ScalingPlanPooledSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/version.go b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/version.go index 72d6fbe7ffd..bab855a509a 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/scalingplanpooledschedule/version.go @@ -1,12 +1,10 @@ package scalingplanpooledschedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scalingplanpooledschedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scalingplanpooledschedule/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/README.md b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/README.md index 39eabf6c6de..e2097feeefc 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/sessionhost` Documentation -The `sessionhost` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `sessionhost` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/client.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/client.go index 0ea9ae0befc..ced1537db50 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/client.go @@ -15,7 +15,7 @@ type SessionHostClient struct { } func NewSessionHostClientWithBaseURI(sdkApi sdkEnv.Api) (*SessionHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sessionhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sessionhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SessionHostClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_hostpool.go index 71402210a51..2b0c2ef6918 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_sessionhost.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_sessionhost.go index 2f48874e279..002f1661002 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_delete.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_delete.go index e62625d7a67..9eebfcf3a86 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_get.go index d419b6d876d..32d3a452e0b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_get.go @@ -45,7 +45,6 @@ func (c SessionHostClient) Get(ctx context.Context, id SessionHostId) (result Ge var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_list.go index bd6dc085c4e..0ecf840a9f7 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_update.go index cff5fcae123..01d50994dfd 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/method_update.go @@ -34,6 +34,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SessionHostClient) Update(ctx context.Context, id SessionHostId, input S var model SessionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/version.go b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/version.go index 8723f767f3b..b923e73a186 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/sessionhost/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/sessionhost/version.go @@ -1,12 +1,10 @@ package sessionhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sessionhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sessionhost/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/README.md b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/README.md index 5a9c2e64f9f..8db28cece7d 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/startmenuitem` Documentation -The `startmenuitem` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `startmenuitem` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/client.go b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/client.go index 8bb4ca4de7e..fb8fbf510c6 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/client.go @@ -15,7 +15,7 @@ type StartMenuItemClient struct { } func NewStartMenuItemClientWithBaseURI(sdkApi sdkEnv.Api) (*StartMenuItemClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startmenuitem", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startmenuitem", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartMenuItemClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/id_applicationgroup.go b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/id_applicationgroup.go index bd5d1809f1a..0604cc0d19b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/id_applicationgroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/id_applicationgroup.go @@ -42,7 +42,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/method_list.go index af0e69228da..3fd6cb1a47f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/version.go b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/version.go index d9080acf551..38c51adf0e3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/startmenuitem/version.go @@ -1,12 +1,10 @@ package startmenuitem -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startmenuitem/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startmenuitem/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/README.md b/resource-manager/desktopvirtualization/2022-09-09/usersession/README.md index 279ba0df3b6..0343729cf48 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/usersession` Documentation -The `usersession` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `usersession` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/client.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/client.go index 2f52a9d8f34..25871535051 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/client.go @@ -15,7 +15,7 @@ type UserSessionClient struct { } func NewUserSessionClientWithBaseURI(sdkApi sdkEnv.Api) (*UserSessionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usersession", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usersession", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserSessionClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_hostpool.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_hostpool.go index b586016f685..4861ecfae51 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_hostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_hostpool.go @@ -42,7 +42,7 @@ func ParseHostPoolID(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHostPoolIDInsensitively(input string) (*HostPoolId, error) { } id := HostPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_sessionhost.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_sessionhost.go index e709e8c7410..2600471a266 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_sessionhost.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_sessionhost.go @@ -44,7 +44,7 @@ func ParseSessionHostID(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionHostIDInsensitively(input string) (*SessionHostId, error) { } id := SessionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_usersession.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_usersession.go index 138f66a1c75..fb1ce3f8760 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/id_usersession.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/id_usersession.go @@ -46,7 +46,7 @@ func ParseUserSessionID(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserSessionIDInsensitively(input string) (*UserSessionId, error) { } id := UserSessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_delete.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_delete.go index 3cff333d871..ab809bdd242 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_delete.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_get.go index ad1e9b90927..0836c7b82f1 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_get.go @@ -45,7 +45,6 @@ func (c UserSessionClient) Get(ctx context.Context, id UserSessionId) (result Ge var model UserSession result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_list.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_list.go index 9341415512c..dfbf45ec335 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_list.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_listbyhostpool.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_listbyhostpool.go index 6fed4fedf24..7982632f254 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/method_listbyhostpool.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/method_listbyhostpool.go @@ -42,6 +42,7 @@ func (o ListByHostPoolOperationOptions) ToHeaders() *client.Headers { func (o ListByHostPoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/usersession/version.go b/resource-manager/desktopvirtualization/2022-09-09/usersession/version.go index dd8c8499f3a..b2851c600b3 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/usersession/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/usersession/version.go @@ -1,12 +1,10 @@ package usersession -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usersession/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usersession/2022-09-09" } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/README.md b/resource-manager/desktopvirtualization/2022-09-09/workspace/README.md index 99031027dab..9cb8d4798f9 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/README.md +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/desktopvirtualization/2022-09-09/workspace` Documentation -The `workspace` SDK allows for interaction with the Azure Resource Manager Service `desktopvirtualization` (API Version `2022-09-09`). +The `workspace` SDK allows for interaction with Azure Resource Manager `desktopvirtualization` (API Version `2022-09-09`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/client.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/client.go index 183f0254ebd..ead98c0060b 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/client.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/client.go @@ -15,7 +15,7 @@ type WorkspaceClient struct { } func NewWorkspaceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceClient: %+v", err) } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/id_workspace.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/id_workspace.go index d5c85af907d..bd4f602857a 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/id_workspace.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_createorupdate.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_createorupdate.go index 346da474838..3a6d6d331f2 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_createorupdate.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkspaceClient) CreateOrUpdate(ctx context.Context, id WorkspaceId, inp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_get.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_get.go index b52f054ada7..3a673fbc7c2 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_get.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceClient) Get(ctx context.Context, id WorkspaceId) (result GetOpe var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_listbyresourcegroup.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_listbyresourcegroup.go index 37ebe86267c..58fc7e68a7a 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_listbyresourcegroup.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_listbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_update.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_update.go index c527b084b73..f7f12884d0f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/method_update.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/method_update.go @@ -49,7 +49,6 @@ func (c WorkspaceClient) Update(ctx context.Context, id WorkspaceId, input Works var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/desktopvirtualization/2022-09-09/workspace/version.go b/resource-manager/desktopvirtualization/2022-09-09/workspace/version.go index 86fa4cd974e..e5c6006244f 100644 --- a/resource-manager/desktopvirtualization/2022-09-09/workspace/version.go +++ b/resource-manager/desktopvirtualization/2022-09-09/workspace/version.go @@ -1,12 +1,10 @@ package workspace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-09" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspace/2022-09-09" } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/README.md b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/README.md index 3675658dbbb..817a93f81a3 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/README.md +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/attachednetworkconnections` Documentation -The `attachednetworkconnections` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `attachednetworkconnections` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/client.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/client.go index c047bb519e2..22e37780469 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/client.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/client.go @@ -15,7 +15,7 @@ type AttachedNetworkConnectionsClient struct { } func NewAttachedNetworkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedNetworkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attachednetworkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attachednetworkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedNetworkConnectionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go index abbb0c60e93..98bf255ac54 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go index e81d45a9947..dea54b2f05c 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go index a98a300e3cd..33befb6558b 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go @@ -39,6 +39,7 @@ func (o AttachedNetworksListByDevCenterOperationOptions) ToHeaders() *client.Hea func (o AttachedNetworksListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbyproject.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbyproject.go index 8ed8d644a8e..9b9a721d6dc 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbyproject.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/method_attachednetworkslistbyproject.go @@ -39,6 +39,7 @@ func (o AttachedNetworksListByProjectOperationOptions) ToHeaders() *client.Heade func (o AttachedNetworksListByProjectOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/version.go b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/version.go index 14f4bd4f634..4bdaf8d6f44 100644 --- a/resource-manager/devcenter/2023-04-01/attachednetworkconnections/version.go +++ b/resource-manager/devcenter/2023-04-01/attachednetworkconnections/version.go @@ -1,12 +1,10 @@ package attachednetworkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attachednetworkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attachednetworkconnections/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/README.md b/resource-manager/devcenter/2023-04-01/catalogs/README.md index 9b1d8b24a77..94c78d13445 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/README.md +++ b/resource-manager/devcenter/2023-04-01/catalogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs` Documentation -The `catalogs` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `catalogs` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/catalogs/client.go b/resource-manager/devcenter/2023-04-01/catalogs/client.go index fe6ad53cdd7..04da2fd7083 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/client.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/client.go @@ -15,7 +15,7 @@ type CatalogsClient struct { } func NewCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*CatalogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "catalogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "catalogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CatalogsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go b/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go index 89cc204d1b9..55330c4599d 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/id_catalog.go @@ -44,7 +44,7 @@ func ParseCatalogID(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCatalogIDInsensitively(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go b/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go index 84ea034ca14..d520b42f2e3 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/method_get.go b/resource-manager/devcenter/2023-04-01/catalogs/method_get.go index dd2b5cd1a63..a9e775d9213 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/method_get.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/method_get.go @@ -45,7 +45,6 @@ func (c CatalogsClient) Get(ctx context.Context, id CatalogId) (result GetOperat var model Catalog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/method_listbydevcenter.go b/resource-manager/devcenter/2023-04-01/catalogs/method_listbydevcenter.go index 4a27fe87351..787b93ff40b 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/method_listbydevcenter.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/catalogs/version.go b/resource-manager/devcenter/2023-04-01/catalogs/version.go index 731d6a0f86f..9e2d3578693 100644 --- a/resource-manager/devcenter/2023-04-01/catalogs/version.go +++ b/resource-manager/devcenter/2023-04-01/catalogs/version.go @@ -1,12 +1,10 @@ package catalogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/catalogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/catalogs/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/checknameavailability/README.md b/resource-manager/devcenter/2023-04-01/checknameavailability/README.md index d0a1f775d41..0bd6cf931bd 100644 --- a/resource-manager/devcenter/2023-04-01/checknameavailability/README.md +++ b/resource-manager/devcenter/2023-04-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/checknameavailability/client.go b/resource-manager/devcenter/2023-04-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/devcenter/2023-04-01/checknameavailability/client.go +++ b/resource-manager/devcenter/2023-04-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/checknameavailability/method_execute.go b/resource-manager/devcenter/2023-04-01/checknameavailability/method_execute.go index 6fb99dc8a93..0a1721e423f 100644 --- a/resource-manager/devcenter/2023-04-01/checknameavailability/method_execute.go +++ b/resource-manager/devcenter/2023-04-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/checknameavailability/version.go b/resource-manager/devcenter/2023-04-01/checknameavailability/version.go index afd1e580d3c..7a996ea06c2 100644 --- a/resource-manager/devcenter/2023-04-01/checknameavailability/version.go +++ b/resource-manager/devcenter/2023-04-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/README.md b/resource-manager/devcenter/2023-04-01/devboxdefinitions/README.md index 47015df35ae..b6b31ad6ae5 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/README.md +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devboxdefinitions` Documentation -The `devboxdefinitions` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `devboxdefinitions` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/client.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/client.go index 42eb06cd579..7b3b15a1897 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/client.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/client.go @@ -15,7 +15,7 @@ type DevBoxDefinitionsClient struct { } func NewDevBoxDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DevBoxDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devboxdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devboxdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevBoxDefinitionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go index c242fe1a895..afd81f7fbb6 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devboxdefinition.go @@ -44,7 +44,7 @@ func ParseDevBoxDefinitionID(input string) (*DevBoxDefinitionId, error) { } id := DevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevBoxDefinitionIDInsensitively(input string) (*DevBoxDefinitionId, er } id := DevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go index 5182c247a8a..b902b58788c 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go index 1199cf94b87..6e47f39d03b 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_devcenterdevboxdefinition.go @@ -44,7 +44,7 @@ func ParseDevCenterDevBoxDefinitionID(input string) (*DevCenterDevBoxDefinitionI } id := DevCenterDevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterDevBoxDefinitionIDInsensitively(input string) (*DevCenterDevB } id := DevCenterDevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go index c300dfe1cbe..645a70ac121 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_get.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_get.go index 4797f572dfe..2f39e85e022 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_get.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c DevBoxDefinitionsClient) Get(ctx context.Context, id DevCenterDevBoxDefi var model DevBoxDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_getbyproject.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_getbyproject.go index 1cc47c3e4ff..79887f3fe96 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_getbyproject.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/method_getbyproject.go @@ -45,7 +45,6 @@ func (c DevBoxDefinitionsClient) GetByProject(ctx context.Context, id DevBoxDefi var model DevBoxDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/devboxdefinitions/version.go b/resource-manager/devcenter/2023-04-01/devboxdefinitions/version.go index 2baa98c8be9..2023f5794b2 100644 --- a/resource-manager/devcenter/2023-04-01/devboxdefinitions/version.go +++ b/resource-manager/devcenter/2023-04-01/devboxdefinitions/version.go @@ -1,12 +1,10 @@ package devboxdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devboxdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devboxdefinitions/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/README.md b/resource-manager/devcenter/2023-04-01/devcenters/README.md index 9474fc62090..598be0c00d1 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/README.md +++ b/resource-manager/devcenter/2023-04-01/devcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/devcenters` Documentation -The `devcenters` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `devcenters` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/devcenters/client.go b/resource-manager/devcenter/2023-04-01/devcenters/client.go index 166e4043995..c5128fc89ff 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/client.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/client.go @@ -15,7 +15,7 @@ type DevCentersClient struct { } func NewDevCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*DevCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevCentersClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go b/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go index 09ec8eb0df5..2a8269a509e 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/method_get.go b/resource-manager/devcenter/2023-04-01/devcenters/method_get.go index 66374322581..8dbc8b9921c 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/method_get.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/method_get.go @@ -45,7 +45,6 @@ func (c DevCentersClient) Get(ctx context.Context, id DevCenterId) (result GetOp var model DevCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/method_listbyresourcegroup.go b/resource-manager/devcenter/2023-04-01/devcenters/method_listbyresourcegroup.go index d2d4412b999..67cdc0090d1 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/method_listbyresourcegroup.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/method_listbysubscription.go b/resource-manager/devcenter/2023-04-01/devcenters/method_listbysubscription.go index 30b65d648e4..d82f9855b56 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/method_listbysubscription.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/devcenters/model_devcenterproperties.go b/resource-manager/devcenter/2023-04-01/devcenters/model_devcenterproperties.go index 03fd772de97..8715461f701 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/model_devcenterproperties.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/model_devcenterproperties.go @@ -1,5 +1,10 @@ package devcenters +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -7,3 +12,28 @@ type DevCenterProperties struct { DevCenterUri *string `json:"devCenterUri,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } + +var _ json.Marshaler = DevCenterProperties{} + +func (s DevCenterProperties) MarshalJSON() ([]byte, error) { + type wrapper DevCenterProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DevCenterProperties: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DevCenterProperties: %+v", err) + } + + delete(decoded, "devCenterUri") + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DevCenterProperties: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devcenter/2023-04-01/devcenters/version.go b/resource-manager/devcenter/2023-04-01/devcenters/version.go index e84d0c95c4b..19086c2f45e 100644 --- a/resource-manager/devcenter/2023-04-01/devcenters/version.go +++ b/resource-manager/devcenter/2023-04-01/devcenters/version.go @@ -1,12 +1,10 @@ package devcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devcenters/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/README.md b/resource-manager/devcenter/2023-04-01/environmenttypes/README.md index ff3ddb0b884..df5b2b772a7 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/README.md +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/environmenttypes` Documentation -The `environmenttypes` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `environmenttypes` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/client.go b/resource-manager/devcenter/2023-04-01/environmenttypes/client.go index 9e3aa2ec5db..482a804ae1b 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/client.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/client.go @@ -15,7 +15,7 @@ type EnvironmentTypesClient struct { } func NewEnvironmentTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmenttypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmenttypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentTypesClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go b/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go index 88ef0bedcda..038f54e7ca8 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/id_allowedenvironmenttype.go @@ -44,7 +44,7 @@ func ParseAllowedEnvironmentTypeID(input string) (*AllowedEnvironmentTypeId, err } id := AllowedEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAllowedEnvironmentTypeIDInsensitively(input string) (*AllowedEnvironme } id := AllowedEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go b/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go index 78b08381749..48e69545423 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go b/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go index c44828f9c02..0d106d93dd6 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/id_devcenterenvironmenttype.go @@ -44,7 +44,7 @@ func ParseDevCenterEnvironmentTypeID(input string) (*DevCenterEnvironmentTypeId, } id := DevCenterEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterEnvironmentTypeIDInsensitively(input string) (*DevCenterEnvir } id := DevCenterEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go b/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go index e2afb524d60..969a35018d0 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/id_environmenttype.go @@ -44,7 +44,7 @@ func ParseEnvironmentTypeID(input string) (*EnvironmentTypeId, error) { } id := EnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentTypeIDInsensitively(input string) (*EnvironmentTypeId, erro } id := EnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go b/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go index 9fa8662f8a6..ac9551a1d30 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypescreateorupdate.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypescreateorupdate.go index ad08694847b..d5813601ee5 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypescreateorupdate.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypescreateorupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesCreateOrUpdate(ctx context.Conte var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesget.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesget.go index ac45221fa84..b56268a689d 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesget.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesGet(ctx context.Context, id DevC var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypeslistbydevcenter.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypeslistbydevcenter.go index 8485ff45786..3d444369021 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypeslistbydevcenter.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypeslistbydevcenter.go @@ -39,6 +39,7 @@ func (o EnvironmentTypesListByDevCenterOperationOptions) ToHeaders() *client.Hea func (o EnvironmentTypesListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesupdate.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesupdate.go index 563d3525a9a..7b1f1d9b836 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesupdate.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_environmenttypesupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesUpdate(ctx context.Context, id D var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypesget.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypesget.go index 2a648560215..5cb5a1a5486 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypesget.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) ProjectAllowedEnvironmentTypesGet(ctx context.Co var model AllowedEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypeslist.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypeslist.go index 2508c2e2c22..5dff2424933 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypeslist.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectallowedenvironmenttypeslist.go @@ -39,6 +39,7 @@ func (o ProjectAllowedEnvironmentTypesListOperationOptions) ToHeaders() *client. func (o ProjectAllowedEnvironmentTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go index 520953f44c1..cf8fd196a51 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesCreateOrUpdate(ctx contex var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesget.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesget.go index 9b790b8dccd..9ebf1ab14f8 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesget.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesGet(ctx context.Context, var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypeslist.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypeslist.go index 789e6b69160..62d3d2abc50 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypeslist.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypeslist.go @@ -39,6 +39,7 @@ func (o ProjectEnvironmentTypesListOperationOptions) ToHeaders() *client.Headers func (o ProjectEnvironmentTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesupdate.go b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesupdate.go index e4505a1a71f..058d1cfad9c 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesupdate.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/method_projectenvironmenttypesupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesUpdate(ctx context.Contex var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/environmenttypes/version.go b/resource-manager/devcenter/2023-04-01/environmenttypes/version.go index 619d049a442..5f3e898ef9f 100644 --- a/resource-manager/devcenter/2023-04-01/environmenttypes/version.go +++ b/resource-manager/devcenter/2023-04-01/environmenttypes/version.go @@ -1,12 +1,10 @@ package environmenttypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmenttypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmenttypes/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/galleries/README.md b/resource-manager/devcenter/2023-04-01/galleries/README.md index d4ebc8a1ee5..6b83a97256e 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/README.md +++ b/resource-manager/devcenter/2023-04-01/galleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/galleries` Documentation -The `galleries` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `galleries` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/galleries/client.go b/resource-manager/devcenter/2023-04-01/galleries/client.go index 624f4aaf60a..d9db0ae13ba 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/client.go +++ b/resource-manager/devcenter/2023-04-01/galleries/client.go @@ -15,7 +15,7 @@ type GalleriesClient struct { } func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleriesClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go b/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go index 895a4c60ac7..5e6694d3f4d 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/galleries/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go b/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go index 3e3d9f6e809..cadb9ecaf1a 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go +++ b/resource-manager/devcenter/2023-04-01/galleries/id_gallery.go @@ -44,7 +44,7 @@ func ParseGalleryID(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/galleries/method_get.go b/resource-manager/devcenter/2023-04-01/galleries/method_get.go index 5262914c268..9273b0c4efe 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/method_get.go +++ b/resource-manager/devcenter/2023-04-01/galleries/method_get.go @@ -45,7 +45,6 @@ func (c GalleriesClient) Get(ctx context.Context, id GalleryId) (result GetOpera var model Gallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/galleries/method_listbydevcenter.go b/resource-manager/devcenter/2023-04-01/galleries/method_listbydevcenter.go index 792ad276ecb..6d53af35212 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/method_listbydevcenter.go +++ b/resource-manager/devcenter/2023-04-01/galleries/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/galleries/version.go b/resource-manager/devcenter/2023-04-01/galleries/version.go index 12a47bfd2f0..0aefa1d770e 100644 --- a/resource-manager/devcenter/2023-04-01/galleries/version.go +++ b/resource-manager/devcenter/2023-04-01/galleries/version.go @@ -1,12 +1,10 @@ package galleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleries/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/images/README.md b/resource-manager/devcenter/2023-04-01/images/README.md index 740d711776d..3b16a7603b1 100644 --- a/resource-manager/devcenter/2023-04-01/images/README.md +++ b/resource-manager/devcenter/2023-04-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `images` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/images/client.go b/resource-manager/devcenter/2023-04-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/devcenter/2023-04-01/images/client.go +++ b/resource-manager/devcenter/2023-04-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/images/id_devcenter.go b/resource-manager/devcenter/2023-04-01/images/id_devcenter.go index 947b6740863..1deec7a30f6 100644 --- a/resource-manager/devcenter/2023-04-01/images/id_devcenter.go +++ b/resource-manager/devcenter/2023-04-01/images/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/images/id_gallery.go b/resource-manager/devcenter/2023-04-01/images/id_gallery.go index e5c9bca8d4e..d0a702efbd6 100644 --- a/resource-manager/devcenter/2023-04-01/images/id_gallery.go +++ b/resource-manager/devcenter/2023-04-01/images/id_gallery.go @@ -44,7 +44,7 @@ func ParseGalleryID(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/images/id_image.go b/resource-manager/devcenter/2023-04-01/images/id_image.go index 7aaad3ee1ce..4acc1c56139 100644 --- a/resource-manager/devcenter/2023-04-01/images/id_image.go +++ b/resource-manager/devcenter/2023-04-01/images/id_image.go @@ -46,7 +46,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/images/method_get.go b/resource-manager/devcenter/2023-04-01/images/method_get.go index 07d56032538..09e04752f35 100644 --- a/resource-manager/devcenter/2023-04-01/images/method_get.go +++ b/resource-manager/devcenter/2023-04-01/images/method_get.go @@ -45,7 +45,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId) (result GetOperationR var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/images/method_listbydevcenter.go b/resource-manager/devcenter/2023-04-01/images/method_listbydevcenter.go index 2fcf6e1d00e..39dc321ab59 100644 --- a/resource-manager/devcenter/2023-04-01/images/method_listbydevcenter.go +++ b/resource-manager/devcenter/2023-04-01/images/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/images/method_listbygallery.go b/resource-manager/devcenter/2023-04-01/images/method_listbygallery.go index 65bc7c9a771..59afe52da50 100644 --- a/resource-manager/devcenter/2023-04-01/images/method_listbygallery.go +++ b/resource-manager/devcenter/2023-04-01/images/method_listbygallery.go @@ -39,6 +39,7 @@ func (o ListByGalleryOperationOptions) ToHeaders() *client.Headers { func (o ListByGalleryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/images/version.go b/resource-manager/devcenter/2023-04-01/images/version.go index 4a630389019..ecca2d30483 100644 --- a/resource-manager/devcenter/2023-04-01/images/version.go +++ b/resource-manager/devcenter/2023-04-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/imageversions/README.md b/resource-manager/devcenter/2023-04-01/imageversions/README.md index 2619ef35f95..33fae17d307 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/README.md +++ b/resource-manager/devcenter/2023-04-01/imageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/imageversions` Documentation -The `imageversions` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `imageversions` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/imageversions/client.go b/resource-manager/devcenter/2023-04-01/imageversions/client.go index e7f72638c73..7a3a0578fb2 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/client.go +++ b/resource-manager/devcenter/2023-04-01/imageversions/client.go @@ -15,7 +15,7 @@ type ImageVersionsClient struct { } func NewImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "imageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "imageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImageVersionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/imageversions/id_image.go b/resource-manager/devcenter/2023-04-01/imageversions/id_image.go index b953534db0c..f27bbf07a45 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/id_image.go +++ b/resource-manager/devcenter/2023-04-01/imageversions/id_image.go @@ -46,7 +46,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/imageversions/id_version.go b/resource-manager/devcenter/2023-04-01/imageversions/id_version.go index 25e6c7c01d3..e799e6b5d6e 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/id_version.go +++ b/resource-manager/devcenter/2023-04-01/imageversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/imageversions/method_get.go b/resource-manager/devcenter/2023-04-01/imageversions/method_get.go index 4a32465bcd3..9bf2d63c758 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/method_get.go +++ b/resource-manager/devcenter/2023-04-01/imageversions/method_get.go @@ -45,7 +45,6 @@ func (c ImageVersionsClient) Get(ctx context.Context, id VersionId) (result GetO var model ImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/imageversions/version.go b/resource-manager/devcenter/2023-04-01/imageversions/version.go index bbf6792c987..32eb71b24ac 100644 --- a/resource-manager/devcenter/2023-04-01/imageversions/version.go +++ b/resource-manager/devcenter/2023-04-01/imageversions/version.go @@ -1,12 +1,10 @@ package imageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/imageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/imageversions/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/networkconnection/README.md b/resource-manager/devcenter/2023-04-01/networkconnection/README.md index 6e5eb37ca2b..ef2e0067256 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnection/README.md +++ b/resource-manager/devcenter/2023-04-01/networkconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnection` Documentation -The `networkconnection` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `networkconnection` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/networkconnection/client.go b/resource-manager/devcenter/2023-04-01/networkconnection/client.go index c4b7f5032ee..05a1f161722 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnection/client.go +++ b/resource-manager/devcenter/2023-04-01/networkconnection/client.go @@ -15,7 +15,7 @@ type NetworkConnectionClient struct { } func NewNetworkConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkConnectionClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go b/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go index 17430cdaa66..54558899528 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go +++ b/resource-manager/devcenter/2023-04-01/networkconnection/id_networkconnection.go @@ -42,7 +42,7 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/networkconnection/version.go b/resource-manager/devcenter/2023-04-01/networkconnection/version.go index 11698adda07..c46b04f878d 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnection/version.go +++ b/resource-manager/devcenter/2023-04-01/networkconnection/version.go @@ -1,12 +1,10 @@ package networkconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkconnection/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/README.md b/resource-manager/devcenter/2023-04-01/networkconnections/README.md index 2368936c6b1..3820c7f8139 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/README.md +++ b/resource-manager/devcenter/2023-04-01/networkconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/networkconnections` Documentation -The `networkconnections` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `networkconnections` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/client.go b/resource-manager/devcenter/2023-04-01/networkconnections/client.go index b8ed056a338..9bcd63ef619 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/client.go +++ b/resource-manager/devcenter/2023-04-01/networkconnections/client.go @@ -15,7 +15,7 @@ type NetworkConnectionsClient struct { } func NewNetworkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkConnectionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go b/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go index b7e0cfe5a58..2ac8b81f8cb 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go +++ b/resource-manager/devcenter/2023-04-01/networkconnections/id_networkconnection.go @@ -42,7 +42,7 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/method_get.go b/resource-manager/devcenter/2023-04-01/networkconnections/method_get.go index fbc2a39d16d..17cc6351f14 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/method_get.go +++ b/resource-manager/devcenter/2023-04-01/networkconnections/method_get.go @@ -45,7 +45,6 @@ func (c NetworkConnectionsClient) Get(ctx context.Context, id NetworkConnectionI var model NetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/method_gethealthdetails.go b/resource-manager/devcenter/2023-04-01/networkconnections/method_gethealthdetails.go index ae0a8f73ead..e709cc3d206 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/method_gethealthdetails.go +++ b/resource-manager/devcenter/2023-04-01/networkconnections/method_gethealthdetails.go @@ -46,7 +46,6 @@ func (c NetworkConnectionsClient) GetHealthDetails(ctx context.Context, id Netwo var model HealthCheckStatusDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/networkconnections/version.go b/resource-manager/devcenter/2023-04-01/networkconnections/version.go index 6bb022f8d05..f2960df26f1 100644 --- a/resource-manager/devcenter/2023-04-01/networkconnections/version.go +++ b/resource-manager/devcenter/2023-04-01/networkconnections/version.go @@ -1,12 +1,10 @@ package networkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkconnections/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/pools/README.md b/resource-manager/devcenter/2023-04-01/pools/README.md index db4c979a0de..238cf9a7d7c 100644 --- a/resource-manager/devcenter/2023-04-01/pools/README.md +++ b/resource-manager/devcenter/2023-04-01/pools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/pools` Documentation -The `pools` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `pools` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/pools/client.go b/resource-manager/devcenter/2023-04-01/pools/client.go index ea65f5527d9..5860764dffe 100644 --- a/resource-manager/devcenter/2023-04-01/pools/client.go +++ b/resource-manager/devcenter/2023-04-01/pools/client.go @@ -15,7 +15,7 @@ type PoolsClient struct { } func NewPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/pools/id_pool.go b/resource-manager/devcenter/2023-04-01/pools/id_pool.go index 6fd5d90ebce..66508c3f33f 100644 --- a/resource-manager/devcenter/2023-04-01/pools/id_pool.go +++ b/resource-manager/devcenter/2023-04-01/pools/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/pools/id_project.go b/resource-manager/devcenter/2023-04-01/pools/id_project.go index 18461e64d14..1c87f8c70a1 100644 --- a/resource-manager/devcenter/2023-04-01/pools/id_project.go +++ b/resource-manager/devcenter/2023-04-01/pools/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/pools/method_get.go b/resource-manager/devcenter/2023-04-01/pools/method_get.go index f74c4fdbca9..8947bf1c25f 100644 --- a/resource-manager/devcenter/2023-04-01/pools/method_get.go +++ b/resource-manager/devcenter/2023-04-01/pools/method_get.go @@ -45,7 +45,6 @@ func (c PoolsClient) Get(ctx context.Context, id PoolId) (result GetOperationRes var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/pools/version.go b/resource-manager/devcenter/2023-04-01/pools/version.go index 93fbf2419e7..5d363f0bdbb 100644 --- a/resource-manager/devcenter/2023-04-01/pools/version.go +++ b/resource-manager/devcenter/2023-04-01/pools/version.go @@ -1,12 +1,10 @@ package pools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pools/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/projects/README.md b/resource-manager/devcenter/2023-04-01/projects/README.md index 9bc17f99e29..bb4df8baec6 100644 --- a/resource-manager/devcenter/2023-04-01/projects/README.md +++ b/resource-manager/devcenter/2023-04-01/projects/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects` Documentation -The `projects` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `projects` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/projects/client.go b/resource-manager/devcenter/2023-04-01/projects/client.go index f862a93697c..78ad23b0856 100644 --- a/resource-manager/devcenter/2023-04-01/projects/client.go +++ b/resource-manager/devcenter/2023-04-01/projects/client.go @@ -15,7 +15,7 @@ type ProjectsClient struct { } func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projects", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projects", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/projects/id_project.go b/resource-manager/devcenter/2023-04-01/projects/id_project.go index 35bb5544405..8c96e3bb661 100644 --- a/resource-manager/devcenter/2023-04-01/projects/id_project.go +++ b/resource-manager/devcenter/2023-04-01/projects/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/projects/method_get.go b/resource-manager/devcenter/2023-04-01/projects/method_get.go index b37e667ef3d..98e1f02f188 100644 --- a/resource-manager/devcenter/2023-04-01/projects/method_get.go +++ b/resource-manager/devcenter/2023-04-01/projects/method_get.go @@ -45,7 +45,6 @@ func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperat var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/projects/method_listbyresourcegroup.go b/resource-manager/devcenter/2023-04-01/projects/method_listbyresourcegroup.go index ea09446344a..97acd133405 100644 --- a/resource-manager/devcenter/2023-04-01/projects/method_listbyresourcegroup.go +++ b/resource-manager/devcenter/2023-04-01/projects/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/projects/method_listbysubscription.go b/resource-manager/devcenter/2023-04-01/projects/method_listbysubscription.go index 4a003a1da89..e7ffcb8b3f5 100644 --- a/resource-manager/devcenter/2023-04-01/projects/method_listbysubscription.go +++ b/resource-manager/devcenter/2023-04-01/projects/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go b/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go index 8db7e192d06..038f676c025 100644 --- a/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go +++ b/resource-manager/devcenter/2023-04-01/projects/model_projectproperties.go @@ -1,5 +1,10 @@ package projects +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,28 @@ type ProjectProperties struct { MaxDevBoxesPerUser *int64 `json:"maxDevBoxesPerUser,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } + +var _ json.Marshaler = ProjectProperties{} + +func (s ProjectProperties) MarshalJSON() ([]byte, error) { + type wrapper ProjectProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ProjectProperties: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ProjectProperties: %+v", err) + } + + delete(decoded, "devCenterUri") + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ProjectProperties: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devcenter/2023-04-01/projects/version.go b/resource-manager/devcenter/2023-04-01/projects/version.go index ff69b7aa9ea..1b821460ca7 100644 --- a/resource-manager/devcenter/2023-04-01/projects/version.go +++ b/resource-manager/devcenter/2023-04-01/projects/version.go @@ -1,12 +1,10 @@ package projects -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projects/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projects/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/schedules/README.md b/resource-manager/devcenter/2023-04-01/schedules/README.md index 140afe992c1..5eca95e6378 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/README.md +++ b/resource-manager/devcenter/2023-04-01/schedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/schedules` Documentation -The `schedules` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `schedules` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/schedules/client.go b/resource-manager/devcenter/2023-04-01/schedules/client.go index 36a9b3c9f6f..f00be22a71d 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/client.go +++ b/resource-manager/devcenter/2023-04-01/schedules/client.go @@ -15,7 +15,7 @@ type SchedulesClient struct { } func NewSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchedulesClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/schedules/id_pool.go b/resource-manager/devcenter/2023-04-01/schedules/id_pool.go index 4d77bd727a5..0b98daad83d 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/id_pool.go +++ b/resource-manager/devcenter/2023-04-01/schedules/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go b/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go index ff47cab2c4c..90dd7834859 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go +++ b/resource-manager/devcenter/2023-04-01/schedules/id_schedule.go @@ -46,7 +46,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/schedules/method_get.go b/resource-manager/devcenter/2023-04-01/schedules/method_get.go index c92229c96c5..6325280a1b4 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/method_get.go +++ b/resource-manager/devcenter/2023-04-01/schedules/method_get.go @@ -45,7 +45,6 @@ func (c SchedulesClient) Get(ctx context.Context, id ScheduleId) (result GetOper var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2023-04-01/schedules/version.go b/resource-manager/devcenter/2023-04-01/schedules/version.go index 31ed8d82c7d..b06e6159daf 100644 --- a/resource-manager/devcenter/2023-04-01/schedules/version.go +++ b/resource-manager/devcenter/2023-04-01/schedules/version.go @@ -1,12 +1,10 @@ package schedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedules/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/skus/README.md b/resource-manager/devcenter/2023-04-01/skus/README.md index d23503beb33..fdbdc15c6b4 100644 --- a/resource-manager/devcenter/2023-04-01/skus/README.md +++ b/resource-manager/devcenter/2023-04-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/skus/client.go b/resource-manager/devcenter/2023-04-01/skus/client.go index d2fbc1d3af0..0a133f4bbca 100644 --- a/resource-manager/devcenter/2023-04-01/skus/client.go +++ b/resource-manager/devcenter/2023-04-01/skus/client.go @@ -15,7 +15,7 @@ type SKUsClient struct { } func NewSKUsClientWithBaseURI(sdkApi sdkEnv.Api) (*SKUsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SKUsClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/skus/version.go b/resource-manager/devcenter/2023-04-01/skus/version.go index 6b9ba048814..0849f057eca 100644 --- a/resource-manager/devcenter/2023-04-01/skus/version.go +++ b/resource-manager/devcenter/2023-04-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-04-01" } diff --git a/resource-manager/devcenter/2023-04-01/usages/README.md b/resource-manager/devcenter/2023-04-01/usages/README.md index eac30c867b2..1c6c7168225 100644 --- a/resource-manager/devcenter/2023-04-01/usages/README.md +++ b/resource-manager/devcenter/2023-04-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2023-04-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2023-04-01/usages/client.go b/resource-manager/devcenter/2023-04-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/devcenter/2023-04-01/usages/client.go +++ b/resource-manager/devcenter/2023-04-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/devcenter/2023-04-01/usages/id_location.go b/resource-manager/devcenter/2023-04-01/usages/id_location.go index 4f6ba394403..4c60535b4f4 100644 --- a/resource-manager/devcenter/2023-04-01/usages/id_location.go +++ b/resource-manager/devcenter/2023-04-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2023-04-01/usages/version.go b/resource-manager/devcenter/2023-04-01/usages/version.go index 31971f4c048..9fb609e17e2 100644 --- a/resource-manager/devcenter/2023-04-01/usages/version.go +++ b/resource-manager/devcenter/2023-04-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-04-01" } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/README.md b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/README.md index 74f64be764c..714c4ff2ec2 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/README.md +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/attachednetworkconnections` Documentation -The `attachednetworkconnections` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `attachednetworkconnections` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/client.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/client.go index c047bb519e2..22e37780469 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/client.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/client.go @@ -15,7 +15,7 @@ type AttachedNetworkConnectionsClient struct { } func NewAttachedNetworkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedNetworkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attachednetworkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attachednetworkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedNetworkConnectionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_devcenter.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_devcenter.go index abbb0c60e93..98bf255ac54 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_project.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_project.go index e81d45a9947..dea54b2f05c 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_project.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go index a98a300e3cd..33befb6558b 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbydevcenter.go @@ -39,6 +39,7 @@ func (o AttachedNetworksListByDevCenterOperationOptions) ToHeaders() *client.Hea func (o AttachedNetworksListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbyproject.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbyproject.go index 8ed8d644a8e..9b9a721d6dc 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbyproject.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/method_attachednetworkslistbyproject.go @@ -39,6 +39,7 @@ func (o AttachedNetworksListByProjectOperationOptions) ToHeaders() *client.Heade func (o AttachedNetworksListByProjectOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/version.go b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/version.go index 67f8686188a..67230f6c945 100644 --- a/resource-manager/devcenter/2024-02-01/attachednetworkconnections/version.go +++ b/resource-manager/devcenter/2024-02-01/attachednetworkconnections/version.go @@ -1,12 +1,10 @@ package attachednetworkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attachednetworkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attachednetworkconnections/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/README.md b/resource-manager/devcenter/2024-02-01/catalogs/README.md index 39434ecc569..e650aac047b 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/README.md +++ b/resource-manager/devcenter/2024-02-01/catalogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/catalogs` Documentation -The `catalogs` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `catalogs` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/catalogs/client.go b/resource-manager/devcenter/2024-02-01/catalogs/client.go index fe6ad53cdd7..04da2fd7083 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/client.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/client.go @@ -15,7 +15,7 @@ type CatalogsClient struct { } func NewCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*CatalogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "catalogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "catalogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CatalogsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/id_devcenter.go b/resource-manager/devcenter/2024-02-01/catalogs/id_devcenter.go index 84ea034ca14..d520b42f2e3 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/id_devcentercatalog.go b/resource-manager/devcenter/2024-02-01/catalogs/id_devcentercatalog.go index d612925963b..38f8feed3c7 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/id_devcentercatalog.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/id_devcentercatalog.go @@ -44,7 +44,7 @@ func ParseDevCenterCatalogID(input string) (*DevCenterCatalogId, error) { } id := DevCenterCatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterCatalogIDInsensitively(input string) (*DevCenterCatalogId, er } id := DevCenterCatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/method_get.go b/resource-manager/devcenter/2024-02-01/catalogs/method_get.go index ac57c556f8f..825d461b99e 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/method_get.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/method_get.go @@ -45,7 +45,6 @@ func (c CatalogsClient) Get(ctx context.Context, id DevCenterCatalogId) (result var model Catalog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/method_getsyncerrordetails.go b/resource-manager/devcenter/2024-02-01/catalogs/method_getsyncerrordetails.go index 06baffc838d..90126a91a35 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/method_getsyncerrordetails.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/method_getsyncerrordetails.go @@ -46,7 +46,6 @@ func (c CatalogsClient) GetSyncErrorDetails(ctx context.Context, id DevCenterCat var model SyncErrorDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/method_listbydevcenter.go b/resource-manager/devcenter/2024-02-01/catalogs/method_listbydevcenter.go index 4a27fe87351..787b93ff40b 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/method_listbydevcenter.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/catalogs/version.go b/resource-manager/devcenter/2024-02-01/catalogs/version.go index d69eccd038b..5f3b39542c6 100644 --- a/resource-manager/devcenter/2024-02-01/catalogs/version.go +++ b/resource-manager/devcenter/2024-02-01/catalogs/version.go @@ -1,12 +1,10 @@ package catalogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/catalogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/catalogs/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/checknameavailability/README.md b/resource-manager/devcenter/2024-02-01/checknameavailability/README.md index 11a6529255f..5b4b7e327cd 100644 --- a/resource-manager/devcenter/2024-02-01/checknameavailability/README.md +++ b/resource-manager/devcenter/2024-02-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/checknameavailability/client.go b/resource-manager/devcenter/2024-02-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/devcenter/2024-02-01/checknameavailability/client.go +++ b/resource-manager/devcenter/2024-02-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/checknameavailability/method_execute.go b/resource-manager/devcenter/2024-02-01/checknameavailability/method_execute.go index 6fb99dc8a93..0a1721e423f 100644 --- a/resource-manager/devcenter/2024-02-01/checknameavailability/method_execute.go +++ b/resource-manager/devcenter/2024-02-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/checknameavailability/version.go b/resource-manager/devcenter/2024-02-01/checknameavailability/version.go index e43d7329c52..2c274298c92 100644 --- a/resource-manager/devcenter/2024-02-01/checknameavailability/version.go +++ b/resource-manager/devcenter/2024-02-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/README.md b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/README.md index 19e8ff82ae0..e923c1e653a 100644 --- a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/README.md +++ b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/checkscopednameavailability` Documentation -The `checkscopednameavailability` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `checkscopednameavailability` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/client.go b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/client.go index 83d5b1b41e0..3e0681ab0cd 100644 --- a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/client.go +++ b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/client.go @@ -15,7 +15,7 @@ type CheckScopedNameAvailabilityClient struct { } func NewCheckScopedNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckScopedNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkscopednameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkscopednameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckScopedNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/method_execute.go b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/method_execute.go index deafd6e2c3d..b210dc66dbe 100644 --- a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/method_execute.go +++ b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckScopedNameAvailabilityClient) Execute(ctx context.Context, id commo var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/version.go b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/version.go index 32cadc4b7d7..47e7fb12b84 100644 --- a/resource-manager/devcenter/2024-02-01/checkscopednameavailability/version.go +++ b/resource-manager/devcenter/2024-02-01/checkscopednameavailability/version.go @@ -1,12 +1,10 @@ package checkscopednameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkscopednameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkscopednameavailability/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/README.md b/resource-manager/devcenter/2024-02-01/devboxdefinitions/README.md index f2d8bbe1c00..f09801cbac9 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/README.md +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/devboxdefinitions` Documentation -The `devboxdefinitions` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `devboxdefinitions` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/client.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/client.go index 42eb06cd579..7b3b15a1897 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/client.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/client.go @@ -15,7 +15,7 @@ type DevBoxDefinitionsClient struct { } func NewDevBoxDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DevBoxDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devboxdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devboxdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevBoxDefinitionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devboxdefinition.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devboxdefinition.go index c242fe1a895..afd81f7fbb6 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devboxdefinition.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devboxdefinition.go @@ -44,7 +44,7 @@ func ParseDevBoxDefinitionID(input string) (*DevBoxDefinitionId, error) { } id := DevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevBoxDefinitionIDInsensitively(input string) (*DevBoxDefinitionId, er } id := DevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenter.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenter.go index 5182c247a8a..b902b58788c 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenterdevboxdefinition.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenterdevboxdefinition.go index 1199cf94b87..6e47f39d03b 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenterdevboxdefinition.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_devcenterdevboxdefinition.go @@ -44,7 +44,7 @@ func ParseDevCenterDevBoxDefinitionID(input string) (*DevCenterDevBoxDefinitionI } id := DevCenterDevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterDevBoxDefinitionIDInsensitively(input string) (*DevCenterDevB } id := DevCenterDevBoxDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_project.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_project.go index c300dfe1cbe..645a70ac121 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_project.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_get.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_get.go index 4797f572dfe..2f39e85e022 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_get.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c DevBoxDefinitionsClient) Get(ctx context.Context, id DevCenterDevBoxDefi var model DevBoxDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_getbyproject.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_getbyproject.go index 1cc47c3e4ff..79887f3fe96 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_getbyproject.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/method_getbyproject.go @@ -45,7 +45,6 @@ func (c DevBoxDefinitionsClient) GetByProject(ctx context.Context, id DevBoxDefi var model DevBoxDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/devboxdefinitions/version.go b/resource-manager/devcenter/2024-02-01/devboxdefinitions/version.go index a0f0b3ede0f..92ed0d3c023 100644 --- a/resource-manager/devcenter/2024-02-01/devboxdefinitions/version.go +++ b/resource-manager/devcenter/2024-02-01/devboxdefinitions/version.go @@ -1,12 +1,10 @@ package devboxdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devboxdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devboxdefinitions/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/README.md b/resource-manager/devcenter/2024-02-01/devcenters/README.md index 2e83f67ffa9..d3d9cd5ac08 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/README.md +++ b/resource-manager/devcenter/2024-02-01/devcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/devcenters` Documentation -The `devcenters` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `devcenters` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/devcenters/client.go b/resource-manager/devcenter/2024-02-01/devcenters/client.go index 166e4043995..c5128fc89ff 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/client.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/client.go @@ -15,7 +15,7 @@ type DevCentersClient struct { } func NewDevCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*DevCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevCentersClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/id_devcenter.go b/resource-manager/devcenter/2024-02-01/devcenters/id_devcenter.go index 09ec8eb0df5..2a8269a509e 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/method_get.go b/resource-manager/devcenter/2024-02-01/devcenters/method_get.go index 66374322581..8dbc8b9921c 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/method_get.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/method_get.go @@ -45,7 +45,6 @@ func (c DevCentersClient) Get(ctx context.Context, id DevCenterId) (result GetOp var model DevCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/method_listbyresourcegroup.go b/resource-manager/devcenter/2024-02-01/devcenters/method_listbyresourcegroup.go index d2d4412b999..67cdc0090d1 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/method_listbyresourcegroup.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/method_listbysubscription.go b/resource-manager/devcenter/2024-02-01/devcenters/method_listbysubscription.go index 30b65d648e4..d82f9855b56 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/method_listbysubscription.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/devcenters/version.go b/resource-manager/devcenter/2024-02-01/devcenters/version.go index a54f986004f..6b4acd35bcc 100644 --- a/resource-manager/devcenter/2024-02-01/devcenters/version.go +++ b/resource-manager/devcenter/2024-02-01/devcenters/version.go @@ -1,12 +1,10 @@ package devcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devcenters/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/README.md b/resource-manager/devcenter/2024-02-01/environmentdefinitions/README.md index a28a130d0c5..cae7d5d3d47 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/README.md +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/environmentdefinitions` Documentation -The `environmentdefinitions` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `environmentdefinitions` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/client.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/client.go index 696e8a84381..3d54d0a4217 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/client.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/client.go @@ -15,7 +15,7 @@ type EnvironmentDefinitionsClient struct { } func NewEnvironmentDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmentdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmentdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentDefinitionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalog.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalog.go index 169754abe27..e94aa5b0199 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalog.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalog.go @@ -44,7 +44,7 @@ func ParseCatalogID(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCatalogIDInsensitively(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalogenvironmentdefinition.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalogenvironmentdefinition.go index 86f4855c80a..48879d9486a 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalogenvironmentdefinition.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_catalogenvironmentdefinition.go @@ -46,7 +46,7 @@ func ParseCatalogEnvironmentDefinitionID(input string) (*CatalogEnvironmentDefin } id := CatalogEnvironmentDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCatalogEnvironmentDefinitionIDInsensitively(input string) (*CatalogEnv } id := CatalogEnvironmentDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_devcentercatalog.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_devcentercatalog.go index 6ab10b0fcc9..f575210dc93 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_devcentercatalog.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_devcentercatalog.go @@ -44,7 +44,7 @@ func ParseDevCenterCatalogID(input string) (*DevCenterCatalogId, error) { } id := DevCenterCatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterCatalogIDInsensitively(input string) (*DevCenterCatalogId, er } id := DevCenterCatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_environmentdefinition.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_environmentdefinition.go index f6ec2dc375f..09c90b71b90 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_environmentdefinition.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/id_environmentdefinition.go @@ -46,7 +46,7 @@ func ParseEnvironmentDefinitionID(input string) (*EnvironmentDefinitionId, error } id := EnvironmentDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentDefinitionIDInsensitively(input string) (*EnvironmentDefini } id := EnvironmentDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsget.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsget.go index 3e0c5a39352..dc80e57226a 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsget.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsget.go @@ -45,7 +45,6 @@ func (c EnvironmentDefinitionsClient) EnvironmentDefinitionsGet(ctx context.Cont var model EnvironmentDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgetbyprojectcatalog.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgetbyprojectcatalog.go index 06310f30dbb..18a3a6d026d 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgetbyprojectcatalog.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgetbyprojectcatalog.go @@ -45,7 +45,6 @@ func (c EnvironmentDefinitionsClient) EnvironmentDefinitionsGetByProjectCatalog( var model EnvironmentDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgeterrordetails.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgeterrordetails.go index 2d05c22c3c2..3a4738a1071 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgeterrordetails.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionsgeterrordetails.go @@ -46,7 +46,6 @@ func (c EnvironmentDefinitionsClient) EnvironmentDefinitionsGetErrorDetails(ctx var model CatalogResourceValidationErrorDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionslistbycatalog.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionslistbycatalog.go index ca6a6851bba..2c18ded4044 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionslistbycatalog.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_environmentdefinitionslistbycatalog.go @@ -39,6 +39,7 @@ func (o EnvironmentDefinitionsListByCatalogOperationOptions) ToHeaders() *client func (o EnvironmentDefinitionsListByCatalogOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_projectcatalogenvironmentdefinitionsgeterrordetails.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_projectcatalogenvironmentdefinitionsgeterrordetails.go index bd809e9a8c7..16ef1dea626 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_projectcatalogenvironmentdefinitionsgeterrordetails.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/method_projectcatalogenvironmentdefinitionsgeterrordetails.go @@ -46,7 +46,6 @@ func (c EnvironmentDefinitionsClient) ProjectCatalogEnvironmentDefinitionsGetErr var model CatalogResourceValidationErrorDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmentdefinitions/version.go b/resource-manager/devcenter/2024-02-01/environmentdefinitions/version.go index 4e50411b970..f536038eb4a 100644 --- a/resource-manager/devcenter/2024-02-01/environmentdefinitions/version.go +++ b/resource-manager/devcenter/2024-02-01/environmentdefinitions/version.go @@ -1,12 +1,10 @@ package environmentdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmentdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmentdefinitions/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/README.md b/resource-manager/devcenter/2024-02-01/environmenttypes/README.md index af6e0ffa6c0..a7b52ccfa30 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/README.md +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/environmenttypes` Documentation -The `environmenttypes` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `environmenttypes` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/client.go b/resource-manager/devcenter/2024-02-01/environmenttypes/client.go index 9e3aa2ec5db..482a804ae1b 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/client.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/client.go @@ -15,7 +15,7 @@ type EnvironmentTypesClient struct { } func NewEnvironmentTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmenttypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmenttypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentTypesClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/id_allowedenvironmenttype.go b/resource-manager/devcenter/2024-02-01/environmenttypes/id_allowedenvironmenttype.go index 88ef0bedcda..038f54e7ca8 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/id_allowedenvironmenttype.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/id_allowedenvironmenttype.go @@ -44,7 +44,7 @@ func ParseAllowedEnvironmentTypeID(input string) (*AllowedEnvironmentTypeId, err } id := AllowedEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAllowedEnvironmentTypeIDInsensitively(input string) (*AllowedEnvironme } id := AllowedEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenter.go b/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenter.go index 78b08381749..48e69545423 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenterenvironmenttype.go b/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenterenvironmenttype.go index c44828f9c02..0d106d93dd6 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenterenvironmenttype.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/id_devcenterenvironmenttype.go @@ -44,7 +44,7 @@ func ParseDevCenterEnvironmentTypeID(input string) (*DevCenterEnvironmentTypeId, } id := DevCenterEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDevCenterEnvironmentTypeIDInsensitively(input string) (*DevCenterEnvir } id := DevCenterEnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/id_environmenttype.go b/resource-manager/devcenter/2024-02-01/environmenttypes/id_environmenttype.go index e2afb524d60..969a35018d0 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/id_environmenttype.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/id_environmenttype.go @@ -44,7 +44,7 @@ func ParseEnvironmentTypeID(input string) (*EnvironmentTypeId, error) { } id := EnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentTypeIDInsensitively(input string) (*EnvironmentTypeId, erro } id := EnvironmentTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/id_project.go b/resource-manager/devcenter/2024-02-01/environmenttypes/id_project.go index 9fa8662f8a6..ac9551a1d30 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/id_project.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypescreateorupdate.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypescreateorupdate.go index caf724e7b5f..f6634af51b4 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypescreateorupdate.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypescreateorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesCreateOrUpdate(ctx context.Conte var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesget.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesget.go index ac45221fa84..b56268a689d 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesget.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesGet(ctx context.Context, id DevC var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypeslistbydevcenter.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypeslistbydevcenter.go index 8485ff45786..3d444369021 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypeslistbydevcenter.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypeslistbydevcenter.go @@ -39,6 +39,7 @@ func (o EnvironmentTypesListByDevCenterOperationOptions) ToHeaders() *client.Hea func (o EnvironmentTypesListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesupdate.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesupdate.go index 563d3525a9a..7b1f1d9b836 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesupdate.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_environmenttypesupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) EnvironmentTypesUpdate(ctx context.Context, id D var model EnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypesget.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypesget.go index 2a648560215..5cb5a1a5486 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypesget.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) ProjectAllowedEnvironmentTypesGet(ctx context.Co var model AllowedEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypeslist.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypeslist.go index 2508c2e2c22..5dff2424933 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypeslist.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectallowedenvironmenttypeslist.go @@ -39,6 +39,7 @@ func (o ProjectAllowedEnvironmentTypesListOperationOptions) ToHeaders() *client. func (o ProjectAllowedEnvironmentTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go index 204649cf11c..6825713f8c9 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypescreateorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesCreateOrUpdate(ctx contex var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesget.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesget.go index 9b790b8dccd..9ebf1ab14f8 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesget.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesget.go @@ -45,7 +45,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesGet(ctx context.Context, var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypeslist.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypeslist.go index 789e6b69160..62d3d2abc50 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypeslist.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypeslist.go @@ -39,6 +39,7 @@ func (o ProjectEnvironmentTypesListOperationOptions) ToHeaders() *client.Headers func (o ProjectEnvironmentTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesupdate.go b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesupdate.go index e4505a1a71f..058d1cfad9c 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesupdate.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/method_projectenvironmenttypesupdate.go @@ -49,7 +49,6 @@ func (c EnvironmentTypesClient) ProjectEnvironmentTypesUpdate(ctx context.Contex var model ProjectEnvironmentType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/environmenttypes/version.go b/resource-manager/devcenter/2024-02-01/environmenttypes/version.go index 9b61bc5c6af..049b702cd53 100644 --- a/resource-manager/devcenter/2024-02-01/environmenttypes/version.go +++ b/resource-manager/devcenter/2024-02-01/environmenttypes/version.go @@ -1,12 +1,10 @@ package environmenttypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmenttypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmenttypes/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/galleries/README.md b/resource-manager/devcenter/2024-02-01/galleries/README.md index bdd416b7527..b4b93af93da 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/README.md +++ b/resource-manager/devcenter/2024-02-01/galleries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/galleries` Documentation -The `galleries` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `galleries` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/galleries/client.go b/resource-manager/devcenter/2024-02-01/galleries/client.go index 624f4aaf60a..d9db0ae13ba 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/client.go +++ b/resource-manager/devcenter/2024-02-01/galleries/client.go @@ -15,7 +15,7 @@ type GalleriesClient struct { } func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleriesClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/galleries/id_devcenter.go b/resource-manager/devcenter/2024-02-01/galleries/id_devcenter.go index 895a4c60ac7..5e6694d3f4d 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/galleries/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/galleries/id_gallery.go b/resource-manager/devcenter/2024-02-01/galleries/id_gallery.go index 3e3d9f6e809..cadb9ecaf1a 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/id_gallery.go +++ b/resource-manager/devcenter/2024-02-01/galleries/id_gallery.go @@ -44,7 +44,7 @@ func ParseGalleryID(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/galleries/method_get.go b/resource-manager/devcenter/2024-02-01/galleries/method_get.go index 5262914c268..9273b0c4efe 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/method_get.go +++ b/resource-manager/devcenter/2024-02-01/galleries/method_get.go @@ -45,7 +45,6 @@ func (c GalleriesClient) Get(ctx context.Context, id GalleryId) (result GetOpera var model Gallery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/galleries/method_listbydevcenter.go b/resource-manager/devcenter/2024-02-01/galleries/method_listbydevcenter.go index 792ad276ecb..6d53af35212 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/method_listbydevcenter.go +++ b/resource-manager/devcenter/2024-02-01/galleries/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/galleries/version.go b/resource-manager/devcenter/2024-02-01/galleries/version.go index 3c625285d93..aaeb04e8849 100644 --- a/resource-manager/devcenter/2024-02-01/galleries/version.go +++ b/resource-manager/devcenter/2024-02-01/galleries/version.go @@ -1,12 +1,10 @@ package galleries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleries/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/images/README.md b/resource-manager/devcenter/2024-02-01/images/README.md index a393946a878..568b55879d1 100644 --- a/resource-manager/devcenter/2024-02-01/images/README.md +++ b/resource-manager/devcenter/2024-02-01/images/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/images` Documentation -The `images` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `images` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/images/client.go b/resource-manager/devcenter/2024-02-01/images/client.go index efdeb17e082..1732ff32057 100644 --- a/resource-manager/devcenter/2024-02-01/images/client.go +++ b/resource-manager/devcenter/2024-02-01/images/client.go @@ -15,7 +15,7 @@ type ImagesClient struct { } func NewImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "images", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "images", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImagesClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/images/id_devcenter.go b/resource-manager/devcenter/2024-02-01/images/id_devcenter.go index 947b6740863..1deec7a30f6 100644 --- a/resource-manager/devcenter/2024-02-01/images/id_devcenter.go +++ b/resource-manager/devcenter/2024-02-01/images/id_devcenter.go @@ -42,7 +42,7 @@ func ParseDevCenterID(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error) { } id := DevCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/images/id_gallery.go b/resource-manager/devcenter/2024-02-01/images/id_gallery.go index e5c9bca8d4e..d0a702efbd6 100644 --- a/resource-manager/devcenter/2024-02-01/images/id_gallery.go +++ b/resource-manager/devcenter/2024-02-01/images/id_gallery.go @@ -44,7 +44,7 @@ func ParseGalleryID(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGalleryIDInsensitively(input string) (*GalleryId, error) { } id := GalleryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/images/id_image.go b/resource-manager/devcenter/2024-02-01/images/id_image.go index 7aaad3ee1ce..4acc1c56139 100644 --- a/resource-manager/devcenter/2024-02-01/images/id_image.go +++ b/resource-manager/devcenter/2024-02-01/images/id_image.go @@ -46,7 +46,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/images/method_get.go b/resource-manager/devcenter/2024-02-01/images/method_get.go index 07d56032538..09e04752f35 100644 --- a/resource-manager/devcenter/2024-02-01/images/method_get.go +++ b/resource-manager/devcenter/2024-02-01/images/method_get.go @@ -45,7 +45,6 @@ func (c ImagesClient) Get(ctx context.Context, id ImageId) (result GetOperationR var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/images/method_listbydevcenter.go b/resource-manager/devcenter/2024-02-01/images/method_listbydevcenter.go index 2fcf6e1d00e..39dc321ab59 100644 --- a/resource-manager/devcenter/2024-02-01/images/method_listbydevcenter.go +++ b/resource-manager/devcenter/2024-02-01/images/method_listbydevcenter.go @@ -39,6 +39,7 @@ func (o ListByDevCenterOperationOptions) ToHeaders() *client.Headers { func (o ListByDevCenterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/images/method_listbygallery.go b/resource-manager/devcenter/2024-02-01/images/method_listbygallery.go index 65bc7c9a771..59afe52da50 100644 --- a/resource-manager/devcenter/2024-02-01/images/method_listbygallery.go +++ b/resource-manager/devcenter/2024-02-01/images/method_listbygallery.go @@ -39,6 +39,7 @@ func (o ListByGalleryOperationOptions) ToHeaders() *client.Headers { func (o ListByGalleryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/images/version.go b/resource-manager/devcenter/2024-02-01/images/version.go index 4ef5ec2c5cd..fe1d02700b7 100644 --- a/resource-manager/devcenter/2024-02-01/images/version.go +++ b/resource-manager/devcenter/2024-02-01/images/version.go @@ -1,12 +1,10 @@ package images -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/images/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/images/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/imageversions/README.md b/resource-manager/devcenter/2024-02-01/imageversions/README.md index c005455ba94..c96cfb83076 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/README.md +++ b/resource-manager/devcenter/2024-02-01/imageversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/imageversions` Documentation -The `imageversions` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `imageversions` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/imageversions/client.go b/resource-manager/devcenter/2024-02-01/imageversions/client.go index e7f72638c73..7a3a0578fb2 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/client.go +++ b/resource-manager/devcenter/2024-02-01/imageversions/client.go @@ -15,7 +15,7 @@ type ImageVersionsClient struct { } func NewImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "imageversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "imageversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImageVersionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/imageversions/id_image.go b/resource-manager/devcenter/2024-02-01/imageversions/id_image.go index b953534db0c..f27bbf07a45 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/id_image.go +++ b/resource-manager/devcenter/2024-02-01/imageversions/id_image.go @@ -46,7 +46,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/imageversions/id_version.go b/resource-manager/devcenter/2024-02-01/imageversions/id_version.go index 25e6c7c01d3..e799e6b5d6e 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/id_version.go +++ b/resource-manager/devcenter/2024-02-01/imageversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/imageversions/method_get.go b/resource-manager/devcenter/2024-02-01/imageversions/method_get.go index 4a32465bcd3..9bf2d63c758 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/method_get.go +++ b/resource-manager/devcenter/2024-02-01/imageversions/method_get.go @@ -45,7 +45,6 @@ func (c ImageVersionsClient) Get(ctx context.Context, id VersionId) (result GetO var model ImageVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/imageversions/version.go b/resource-manager/devcenter/2024-02-01/imageversions/version.go index 8d11cf53bb5..cc7f828e2c1 100644 --- a/resource-manager/devcenter/2024-02-01/imageversions/version.go +++ b/resource-manager/devcenter/2024-02-01/imageversions/version.go @@ -1,12 +1,10 @@ package imageversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/imageversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/imageversions/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/networkconnection/README.md b/resource-manager/devcenter/2024-02-01/networkconnection/README.md index 22ef6d1242b..b2ac1b8ebdf 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnection/README.md +++ b/resource-manager/devcenter/2024-02-01/networkconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/networkconnection` Documentation -The `networkconnection` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `networkconnection` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/networkconnection/client.go b/resource-manager/devcenter/2024-02-01/networkconnection/client.go index c4b7f5032ee..05a1f161722 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnection/client.go +++ b/resource-manager/devcenter/2024-02-01/networkconnection/client.go @@ -15,7 +15,7 @@ type NetworkConnectionClient struct { } func NewNetworkConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkConnectionClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/networkconnection/id_networkconnection.go b/resource-manager/devcenter/2024-02-01/networkconnection/id_networkconnection.go index 17430cdaa66..54558899528 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnection/id_networkconnection.go +++ b/resource-manager/devcenter/2024-02-01/networkconnection/id_networkconnection.go @@ -42,7 +42,7 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/networkconnection/version.go b/resource-manager/devcenter/2024-02-01/networkconnection/version.go index a9a06fc471a..05987dbea35 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnection/version.go +++ b/resource-manager/devcenter/2024-02-01/networkconnection/version.go @@ -1,12 +1,10 @@ package networkconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkconnection/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/README.md b/resource-manager/devcenter/2024-02-01/networkconnections/README.md index ec06f930313..e5eddbb240e 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/README.md +++ b/resource-manager/devcenter/2024-02-01/networkconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/networkconnections` Documentation -The `networkconnections` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `networkconnections` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/client.go b/resource-manager/devcenter/2024-02-01/networkconnections/client.go index b8ed056a338..9bcd63ef619 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/client.go +++ b/resource-manager/devcenter/2024-02-01/networkconnections/client.go @@ -15,7 +15,7 @@ type NetworkConnectionsClient struct { } func NewNetworkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkConnectionsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/id_networkconnection.go b/resource-manager/devcenter/2024-02-01/networkconnections/id_networkconnection.go index b7e0cfe5a58..2ac8b81f8cb 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/id_networkconnection.go +++ b/resource-manager/devcenter/2024-02-01/networkconnections/id_networkconnection.go @@ -42,7 +42,7 @@ func ParseNetworkConnectionID(input string) (*NetworkConnectionId, error) { } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkConnectionIDInsensitively(input string) (*NetworkConnectionId, } id := NetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/method_get.go b/resource-manager/devcenter/2024-02-01/networkconnections/method_get.go index fbc2a39d16d..17cc6351f14 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/method_get.go +++ b/resource-manager/devcenter/2024-02-01/networkconnections/method_get.go @@ -45,7 +45,6 @@ func (c NetworkConnectionsClient) Get(ctx context.Context, id NetworkConnectionI var model NetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/method_gethealthdetails.go b/resource-manager/devcenter/2024-02-01/networkconnections/method_gethealthdetails.go index ae0a8f73ead..e709cc3d206 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/method_gethealthdetails.go +++ b/resource-manager/devcenter/2024-02-01/networkconnections/method_gethealthdetails.go @@ -46,7 +46,6 @@ func (c NetworkConnectionsClient) GetHealthDetails(ctx context.Context, id Netwo var model HealthCheckStatusDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/networkconnections/version.go b/resource-manager/devcenter/2024-02-01/networkconnections/version.go index 2986e662bcf..a6dca9cf46f 100644 --- a/resource-manager/devcenter/2024-02-01/networkconnections/version.go +++ b/resource-manager/devcenter/2024-02-01/networkconnections/version.go @@ -1,12 +1,10 @@ package networkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkconnections/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/pools/README.md b/resource-manager/devcenter/2024-02-01/pools/README.md index e5ed29b3d05..253f728b4bd 100644 --- a/resource-manager/devcenter/2024-02-01/pools/README.md +++ b/resource-manager/devcenter/2024-02-01/pools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/pools` Documentation -The `pools` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `pools` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/pools/client.go b/resource-manager/devcenter/2024-02-01/pools/client.go index ea65f5527d9..5860764dffe 100644 --- a/resource-manager/devcenter/2024-02-01/pools/client.go +++ b/resource-manager/devcenter/2024-02-01/pools/client.go @@ -15,7 +15,7 @@ type PoolsClient struct { } func NewPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/pools/id_pool.go b/resource-manager/devcenter/2024-02-01/pools/id_pool.go index 6fd5d90ebce..66508c3f33f 100644 --- a/resource-manager/devcenter/2024-02-01/pools/id_pool.go +++ b/resource-manager/devcenter/2024-02-01/pools/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/pools/id_project.go b/resource-manager/devcenter/2024-02-01/pools/id_project.go index 18461e64d14..1c87f8c70a1 100644 --- a/resource-manager/devcenter/2024-02-01/pools/id_project.go +++ b/resource-manager/devcenter/2024-02-01/pools/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/pools/method_get.go b/resource-manager/devcenter/2024-02-01/pools/method_get.go index f74c4fdbca9..8947bf1c25f 100644 --- a/resource-manager/devcenter/2024-02-01/pools/method_get.go +++ b/resource-manager/devcenter/2024-02-01/pools/method_get.go @@ -45,7 +45,6 @@ func (c PoolsClient) Get(ctx context.Context, id PoolId) (result GetOperationRes var model Pool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/pools/version.go b/resource-manager/devcenter/2024-02-01/pools/version.go index 5f740c0a043..404c168c705 100644 --- a/resource-manager/devcenter/2024-02-01/pools/version.go +++ b/resource-manager/devcenter/2024-02-01/pools/version.go @@ -1,12 +1,10 @@ package pools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pools/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/README.md b/resource-manager/devcenter/2024-02-01/projectcatalogs/README.md index ff6f1458576..2d01089d49f 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/README.md +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/projectcatalogs` Documentation -The `projectcatalogs` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `projectcatalogs` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/client.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/client.go index 565db81ad49..849f2281ac2 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/client.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/client.go @@ -15,7 +15,7 @@ type ProjectCatalogsClient struct { } func NewProjectCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectCatalogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projectcatalogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projectcatalogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectCatalogsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/id_catalog.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/id_catalog.go index 5f97c99cd67..809a99ebf87 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/id_catalog.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/id_catalog.go @@ -44,7 +44,7 @@ func ParseCatalogID(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCatalogIDInsensitively(input string) (*CatalogId, error) { } id := CatalogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/id_project.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/id_project.go index bbe5290e35c..64e7bdcb561 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/id_project.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_get.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_get.go index 58e3bef78b1..0eeb7fe8c45 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_get.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_get.go @@ -45,7 +45,6 @@ func (c ProjectCatalogsClient) Get(ctx context.Context, id CatalogId) (result Ge var model Catalog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_getsyncerrordetails.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_getsyncerrordetails.go index 1202fdf37c4..c0ff4aef069 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_getsyncerrordetails.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_getsyncerrordetails.go @@ -46,7 +46,6 @@ func (c ProjectCatalogsClient) GetSyncErrorDetails(ctx context.Context, id Catal var model SyncErrorDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_list.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_list.go index bf7ab68e537..9c3e4d2adea 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/method_list.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/projectcatalogs/version.go b/resource-manager/devcenter/2024-02-01/projectcatalogs/version.go index 303148140aa..f6c62a4fbf8 100644 --- a/resource-manager/devcenter/2024-02-01/projectcatalogs/version.go +++ b/resource-manager/devcenter/2024-02-01/projectcatalogs/version.go @@ -1,12 +1,10 @@ package projectcatalogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projectcatalogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projectcatalogs/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/projects/README.md b/resource-manager/devcenter/2024-02-01/projects/README.md index 903273a5da3..55b7699d052 100644 --- a/resource-manager/devcenter/2024-02-01/projects/README.md +++ b/resource-manager/devcenter/2024-02-01/projects/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/projects` Documentation -The `projects` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `projects` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/projects/client.go b/resource-manager/devcenter/2024-02-01/projects/client.go index f862a93697c..78ad23b0856 100644 --- a/resource-manager/devcenter/2024-02-01/projects/client.go +++ b/resource-manager/devcenter/2024-02-01/projects/client.go @@ -15,7 +15,7 @@ type ProjectsClient struct { } func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projects", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projects", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/projects/id_project.go b/resource-manager/devcenter/2024-02-01/projects/id_project.go index 35bb5544405..8c96e3bb661 100644 --- a/resource-manager/devcenter/2024-02-01/projects/id_project.go +++ b/resource-manager/devcenter/2024-02-01/projects/id_project.go @@ -42,7 +42,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/projects/method_get.go b/resource-manager/devcenter/2024-02-01/projects/method_get.go index b37e667ef3d..98e1f02f188 100644 --- a/resource-manager/devcenter/2024-02-01/projects/method_get.go +++ b/resource-manager/devcenter/2024-02-01/projects/method_get.go @@ -45,7 +45,6 @@ func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperat var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/projects/method_listbyresourcegroup.go b/resource-manager/devcenter/2024-02-01/projects/method_listbyresourcegroup.go index ea09446344a..97acd133405 100644 --- a/resource-manager/devcenter/2024-02-01/projects/method_listbyresourcegroup.go +++ b/resource-manager/devcenter/2024-02-01/projects/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/projects/method_listbysubscription.go b/resource-manager/devcenter/2024-02-01/projects/method_listbysubscription.go index 4a003a1da89..e7ffcb8b3f5 100644 --- a/resource-manager/devcenter/2024-02-01/projects/method_listbysubscription.go +++ b/resource-manager/devcenter/2024-02-01/projects/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devcenter/2024-02-01/projects/version.go b/resource-manager/devcenter/2024-02-01/projects/version.go index dd4a06a9413..643e48ddd7a 100644 --- a/resource-manager/devcenter/2024-02-01/projects/version.go +++ b/resource-manager/devcenter/2024-02-01/projects/version.go @@ -1,12 +1,10 @@ package projects -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projects/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projects/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/schedules/README.md b/resource-manager/devcenter/2024-02-01/schedules/README.md index 757d58c7721..b728f2636cc 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/README.md +++ b/resource-manager/devcenter/2024-02-01/schedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/schedules` Documentation -The `schedules` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `schedules` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/schedules/client.go b/resource-manager/devcenter/2024-02-01/schedules/client.go index 36a9b3c9f6f..f00be22a71d 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/client.go +++ b/resource-manager/devcenter/2024-02-01/schedules/client.go @@ -15,7 +15,7 @@ type SchedulesClient struct { } func NewSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchedulesClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/schedules/id_pool.go b/resource-manager/devcenter/2024-02-01/schedules/id_pool.go index 4d77bd727a5..0b98daad83d 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/id_pool.go +++ b/resource-manager/devcenter/2024-02-01/schedules/id_pool.go @@ -44,7 +44,7 @@ func ParsePoolID(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePoolIDInsensitively(input string) (*PoolId, error) { } id := PoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/schedules/id_schedule.go b/resource-manager/devcenter/2024-02-01/schedules/id_schedule.go index ff47cab2c4c..90dd7834859 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/id_schedule.go +++ b/resource-manager/devcenter/2024-02-01/schedules/id_schedule.go @@ -46,7 +46,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/schedules/method_get.go b/resource-manager/devcenter/2024-02-01/schedules/method_get.go index c92229c96c5..6325280a1b4 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/method_get.go +++ b/resource-manager/devcenter/2024-02-01/schedules/method_get.go @@ -45,7 +45,6 @@ func (c SchedulesClient) Get(ctx context.Context, id ScheduleId) (result GetOper var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devcenter/2024-02-01/schedules/version.go b/resource-manager/devcenter/2024-02-01/schedules/version.go index d58932230cb..a1fb011539a 100644 --- a/resource-manager/devcenter/2024-02-01/schedules/version.go +++ b/resource-manager/devcenter/2024-02-01/schedules/version.go @@ -1,12 +1,10 @@ package schedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedules/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/skus/README.md b/resource-manager/devcenter/2024-02-01/skus/README.md index 543b48c2b60..063328e60a8 100644 --- a/resource-manager/devcenter/2024-02-01/skus/README.md +++ b/resource-manager/devcenter/2024-02-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/skus/client.go b/resource-manager/devcenter/2024-02-01/skus/client.go index d2fbc1d3af0..0a133f4bbca 100644 --- a/resource-manager/devcenter/2024-02-01/skus/client.go +++ b/resource-manager/devcenter/2024-02-01/skus/client.go @@ -15,7 +15,7 @@ type SKUsClient struct { } func NewSKUsClientWithBaseURI(sdkApi sdkEnv.Api) (*SKUsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SKUsClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/skus/version.go b/resource-manager/devcenter/2024-02-01/skus/version.go index c5301cf59e9..2ffbb4f668e 100644 --- a/resource-manager/devcenter/2024-02-01/skus/version.go +++ b/resource-manager/devcenter/2024-02-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2024-02-01" } diff --git a/resource-manager/devcenter/2024-02-01/usages/README.md b/resource-manager/devcenter/2024-02-01/usages/README.md index b068273bd06..5475e52d23c 100644 --- a/resource-manager/devcenter/2024-02-01/usages/README.md +++ b/resource-manager/devcenter/2024-02-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `devcenter` (API Version `2024-02-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `devcenter` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devcenter/2024-02-01/usages/client.go b/resource-manager/devcenter/2024-02-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/devcenter/2024-02-01/usages/client.go +++ b/resource-manager/devcenter/2024-02-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/devcenter/2024-02-01/usages/id_location.go b/resource-manager/devcenter/2024-02-01/usages/id_location.go index 4f6ba394403..4c60535b4f4 100644 --- a/resource-manager/devcenter/2024-02-01/usages/id_location.go +++ b/resource-manager/devcenter/2024-02-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devcenter/2024-02-01/usages/version.go b/resource-manager/devcenter/2024-02-01/usages/version.go index 8ab46f7e22b..b0c9a422289 100644 --- a/resource-manager/devcenter/2024-02-01/usages/version.go +++ b/resource-manager/devcenter/2024-02-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2024-02-01" } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/README.md b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/README.md index a8e7fb57f0e..f8f33a39859 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/README.md +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate` Documentation -The `dpscertificate` SDK allows for interaction with the Azure Resource Manager Service `deviceprovisioningservices` (API Version `2022-02-05`). +The `dpscertificate` SDK allows for interaction with Azure Resource Manager `deviceprovisioningservices` (API Version `2022-02-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/client.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/client.go index 1af80c5ab79..65d9ca93e70 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/client.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/client.go @@ -15,7 +15,7 @@ type DpsCertificateClient struct { } func NewDpsCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*DpsCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dpscertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dpscertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DpsCertificateClient: %+v", err) } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go index 0d6aef7533a..0d0f3f00c45 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_createorupdate.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_createorupdate.go index 3797134fbb9..3f22d6b3275 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_createorupdate.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DpsCertificateClient) CreateOrUpdate(ctx context.Context, id Certificate var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_delete.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_delete.go index 0a5fa975528..1a2b963a9fa 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_delete.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_delete.go @@ -43,6 +43,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_generateverificationcode.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_generateverificationcode.go index fcc97b0e472..b8d4d0d8b5b 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_generateverificationcode.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_generateverificationcode.go @@ -44,6 +44,7 @@ func (o GenerateVerificationCodeOperationOptions) ToHeaders() *client.Headers { func (o GenerateVerificationCodeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,6 @@ func (c DpsCertificateClient) GenerateVerificationCode(ctx context.Context, id C var model VerificationCodeResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_get.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_get.go index dee3f63b274..84eda9a4de2 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_get.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DpsCertificateClient) Get(ctx context.Context, id CertificateId, options var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_list.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_list.go index 493dc04e454..ee386d79995 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_list.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_list.go @@ -47,7 +47,6 @@ func (c DpsCertificateClient) List(ctx context.Context, id commonids.Provisionin var model CertificateListDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_verifycertificate.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_verifycertificate.go index 7980b41d1eb..d18ff4ce4d9 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_verifycertificate.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/method_verifycertificate.go @@ -44,6 +44,7 @@ func (o VerifyCertificateOperationOptions) ToHeaders() *client.Headers { func (o VerifyCertificateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,6 @@ func (c DpsCertificateClient) VerifyCertificate(ctx context.Context, id Certific var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/version.go b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/version.go index 0bc6b1be837..061c8c0aae2 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/version.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate/version.go @@ -1,12 +1,10 @@ package dpscertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dpscertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dpscertificate/2022-02-05" } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/README.md b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/README.md index 47bb02e22e9..de8d34896dc 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/README.md +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource` Documentation -The `iotdpsresource` SDK allows for interaction with the Azure Resource Manager Service `deviceprovisioningservices` (API Version `2022-02-05`). +The `iotdpsresource` SDK allows for interaction with Azure Resource Manager `deviceprovisioningservices` (API Version `2022-02-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/client.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/client.go index eec3ab0d624..d3d98b56a65 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/client.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/client.go @@ -15,7 +15,7 @@ type IotDpsResourceClient struct { } func NewIotDpsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*IotDpsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotdpsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotdpsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotDpsResourceClient: %+v", err) } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go index b43c0c53005..96b39f913d4 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go index c788366a3aa..b8cca86ea81 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go index 34daa61cf4e..fdd65999e78 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_checkprovisioningservicenameavailability.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_checkprovisioningservicenameavailability.go index 9bd1d9fc821..07697d5fb98 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_checkprovisioningservicenameavailability.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_checkprovisioningservicenameavailability.go @@ -51,7 +51,6 @@ func (c IotDpsResourceClient) CheckProvisioningServiceNameAvailability(ctx conte var model NameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_get.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_get.go index 2e09ec6da4a..bf5fd803332 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_get.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_get.go @@ -46,7 +46,6 @@ func (c IotDpsResourceClient) Get(ctx context.Context, id commonids.Provisioning var model ProvisioningServiceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivateendpointconnection.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivateendpointconnection.go index 86653e3fa15..d83d6838282 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivateendpointconnection.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c IotDpsResourceClient) GetPrivateEndpointConnection(ctx context.Context, var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivatelinkresources.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivatelinkresources.go index 0bf5d70f1fb..3dbaeb365b2 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivatelinkresources.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_getprivatelinkresources.go @@ -45,7 +45,6 @@ func (c IotDpsResourceClient) GetPrivateLinkResources(ctx context.Context, id Pr var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go index 8666e67a73e..46b620778f1 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listkeysforkeyname.go @@ -46,7 +46,6 @@ func (c IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, id KeyId) var model SharedAccessSignatureAuthorizationRuleAccessRightsDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivateendpointconnections.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivateendpointconnections.go index 273a592a8bd..a2dd0ec74c6 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivateendpointconnections.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivateendpointconnections.go @@ -47,7 +47,6 @@ func (c IotDpsResourceClient) ListPrivateEndpointConnections(ctx context.Context var model []PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivatelinkresources.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivatelinkresources.go index 53c7e6d4c54..327915a5d89 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivatelinkresources.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/method_listprivatelinkresources.go @@ -47,7 +47,6 @@ func (c IotDpsResourceClient) ListPrivateLinkResources(ctx context.Context, id c var model PrivateLinkResources result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/version.go b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/version.go index 4f3f68eb460..2049ece3928 100644 --- a/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/version.go +++ b/resource-manager/deviceprovisioningservices/2022-02-05/iotdpsresource/version.go @@ -1,12 +1,10 @@ package iotdpsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotdpsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotdpsresource/2022-02-05" } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/README.md b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/README.md index 381ab2842f0..e80586aff68 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/README.md +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate` Documentation -The `dpscertificate` SDK allows for interaction with the Azure Resource Manager Service `deviceprovisioningservices` (API Version `2022-12-12`). +The `dpscertificate` SDK allows for interaction with Azure Resource Manager `deviceprovisioningservices` (API Version `2022-12-12`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/client.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/client.go index 1af80c5ab79..65d9ca93e70 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/client.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/client.go @@ -15,7 +15,7 @@ type DpsCertificateClient struct { } func NewDpsCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*DpsCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dpscertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dpscertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DpsCertificateClient: %+v", err) } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/id_certificate.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/id_certificate.go index 0d6aef7533a..0d0f3f00c45 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/id_certificate.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_createorupdate.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_createorupdate.go index 3797134fbb9..3f22d6b3275 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_createorupdate.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c DpsCertificateClient) CreateOrUpdate(ctx context.Context, id Certificate var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_delete.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_delete.go index 0a5fa975528..1a2b963a9fa 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_delete.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_delete.go @@ -43,6 +43,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_generateverificationcode.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_generateverificationcode.go index fcc97b0e472..b8d4d0d8b5b 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_generateverificationcode.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_generateverificationcode.go @@ -44,6 +44,7 @@ func (o GenerateVerificationCodeOperationOptions) ToHeaders() *client.Headers { func (o GenerateVerificationCodeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -105,7 +106,6 @@ func (c DpsCertificateClient) GenerateVerificationCode(ctx context.Context, id C var model VerificationCodeResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_get.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_get.go index dee3f63b274..84eda9a4de2 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_get.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DpsCertificateClient) Get(ctx context.Context, id CertificateId, options var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_list.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_list.go index 493dc04e454..ee386d79995 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_list.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_list.go @@ -47,7 +47,6 @@ func (c DpsCertificateClient) List(ctx context.Context, id commonids.Provisionin var model CertificateListDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_verifycertificate.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_verifycertificate.go index 7980b41d1eb..d18ff4ce4d9 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_verifycertificate.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/method_verifycertificate.go @@ -44,6 +44,7 @@ func (o VerifyCertificateOperationOptions) ToHeaders() *client.Headers { func (o VerifyCertificateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,6 @@ func (c DpsCertificateClient) VerifyCertificate(ctx context.Context, id Certific var model CertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/version.go b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/version.go index 79b7cd41012..c6e6d92a3f3 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/version.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate/version.go @@ -1,12 +1,10 @@ package dpscertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-12" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dpscertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dpscertificate/2022-12-12" } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/README.md b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/README.md index 526dc92bc6d..8633aea4b31 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/README.md +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource` Documentation -The `iotdpsresource` SDK allows for interaction with the Azure Resource Manager Service `deviceprovisioningservices` (API Version `2022-12-12`). +The `iotdpsresource` SDK allows for interaction with Azure Resource Manager `deviceprovisioningservices` (API Version `2022-12-12`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/client.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/client.go index eec3ab0d624..d3d98b56a65 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/client.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/client.go @@ -15,7 +15,7 @@ type IotDpsResourceClient struct { } func NewIotDpsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*IotDpsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotdpsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotdpsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotDpsResourceClient: %+v", err) } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_key.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_key.go index b43c0c53005..96b39f913d4 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_key.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privateendpointconnection.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privateendpointconnection.go index c788366a3aa..b8cca86ea81 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privateendpointconnection.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privatelinkresource.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privatelinkresource.go index 34daa61cf4e..fdd65999e78 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privatelinkresource.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_checkprovisioningservicenameavailability.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_checkprovisioningservicenameavailability.go index 9bd1d9fc821..07697d5fb98 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_checkprovisioningservicenameavailability.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_checkprovisioningservicenameavailability.go @@ -51,7 +51,6 @@ func (c IotDpsResourceClient) CheckProvisioningServiceNameAvailability(ctx conte var model NameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_get.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_get.go index 2e09ec6da4a..bf5fd803332 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_get.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_get.go @@ -46,7 +46,6 @@ func (c IotDpsResourceClient) Get(ctx context.Context, id commonids.Provisioning var model ProvisioningServiceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivateendpointconnection.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivateendpointconnection.go index 86653e3fa15..d83d6838282 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivateendpointconnection.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c IotDpsResourceClient) GetPrivateEndpointConnection(ctx context.Context, var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivatelinkresources.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivatelinkresources.go index 0bf5d70f1fb..3dbaeb365b2 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivatelinkresources.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_getprivatelinkresources.go @@ -45,7 +45,6 @@ func (c IotDpsResourceClient) GetPrivateLinkResources(ctx context.Context, id Pr var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeysforkeyname.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeysforkeyname.go index 8666e67a73e..46b620778f1 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeysforkeyname.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listkeysforkeyname.go @@ -46,7 +46,6 @@ func (c IotDpsResourceClient) ListKeysForKeyName(ctx context.Context, id KeyId) var model SharedAccessSignatureAuthorizationRuleAccessRightsDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivateendpointconnections.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivateendpointconnections.go index 273a592a8bd..a2dd0ec74c6 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivateendpointconnections.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivateendpointconnections.go @@ -47,7 +47,6 @@ func (c IotDpsResourceClient) ListPrivateEndpointConnections(ctx context.Context var model []PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivatelinkresources.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivatelinkresources.go index 53c7e6d4c54..327915a5d89 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivatelinkresources.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/method_listprivatelinkresources.go @@ -47,7 +47,6 @@ func (c IotDpsResourceClient) ListPrivateLinkResources(ctx context.Context, id c var model PrivateLinkResources result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/version.go b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/version.go index 94010925b48..bc9fcc897b6 100644 --- a/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/version.go +++ b/resource-manager/deviceprovisioningservices/2022-12-12/iotdpsresource/version.go @@ -1,12 +1,10 @@ package iotdpsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-12" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotdpsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotdpsresource/2022-12-12" } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/README.md b/resource-manager/deviceupdate/2022-10-01/deviceupdates/README.md index 7c7c995c2f3..b267fe282d0 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/README.md +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/deviceupdates` Documentation -The `deviceupdates` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2022-10-01`). +The `deviceupdates` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/client.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/client.go index d90b56d6a34..93ff29b915d 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/client.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/client.go @@ -15,7 +15,7 @@ type DeviceupdatesClient struct { } func NewDeviceupdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceupdatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deviceupdates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deviceupdates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceupdatesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go index 8eed3e36e38..0c823051970 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go index 2a06e933332..8f49e788381 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_instance.go @@ -44,7 +44,7 @@ func ParseInstanceID(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go index 6c1049274b8..da21b68748c 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_accountsget.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_accountsget.go index c37aaa48d6a..2b290a67c4d 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_accountsget.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_accountsget.go @@ -45,7 +45,6 @@ func (c DeviceupdatesClient) AccountsGet(ctx context.Context, id AccountId) (res var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_checknameavailability.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_checknameavailability.go index b5e679fd327..abab13c3ae7 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_checknameavailability.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c DeviceupdatesClient) CheckNameAvailability(ctx context.Context, id commo var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesget.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesget.go index da98e5b716e..1259d55e811 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesget.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesget.go @@ -45,7 +45,6 @@ func (c DeviceupdatesClient) InstancesGet(ctx context.Context, id InstanceId) (r var model Instance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesupdate.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesupdate.go index 26958bc3e99..c772e5c1cb2 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesupdate.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/method_instancesupdate.go @@ -49,7 +49,6 @@ func (c DeviceupdatesClient) InstancesUpdate(ctx context.Context, id InstanceId, var model Instance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/deviceupdates/version.go b/resource-manager/deviceupdate/2022-10-01/deviceupdates/version.go index 2f121c3227d..418460c3e73 100644 --- a/resource-manager/deviceupdate/2022-10-01/deviceupdates/version.go +++ b/resource-manager/deviceupdate/2022-10-01/deviceupdates/version.go @@ -1,12 +1,10 @@ package deviceupdates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deviceupdates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deviceupdates/2022-10-01" } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/README.md b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/README.md index 84ff24bc31b..f9ccd869e0b 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/README.md +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies` Documentation -The `privateendpointconnectionproxies` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2022-10-01`). +The `privateendpointconnectionproxies` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/client.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/client.go index 587eec35d04..35fdc06bf3c 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/client.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionProxiesClient struct { } func NewPrivateEndpointConnectionProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnectionproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnectionproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionProxiesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_account.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_account.go index e71633d502d..1c1d2c8d4d4 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_account.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go index d47ac2422f4..10688f266c6 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/version.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/version.go index 107d95cd2a5..aee8ca5cc54 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/version.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnectionproxies/version.go @@ -1,12 +1,10 @@ package privateendpointconnectionproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnectionproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnectionproxies/2022-10-01" } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/README.md b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/README.md index ead1fd96d04..f8b794089a7 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/README.md +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2022-10-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/client.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/client.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_account.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_account.go index 83f91e1c54d..ffa74b66487 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_account.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnection.go index 7ede20257e1..9f7403f0d20 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnectionproxy.go index 9228e2ebb58..0584b681ae4 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_get.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_get.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_listbyaccount.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_listbyaccount.go index e3e936ece45..a554cc93aad 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_listbyaccount.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_listbyaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByAccount(ctx context.Context, id var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go index ead11056211..3f9a7c9b1f3 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionProxiesGet(ct var model PrivateEndpointConnectionProxy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/version.go b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/version.go index df3a52e2c9e..2739630ef63 100644 --- a/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/version.go +++ b/resource-manager/deviceupdate/2022-10-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-10-01" } diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/README.md b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/README.md index 202a728b94a..5c1349c3135 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/README.md +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2022-10-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2022-10-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/client.go b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/client.go +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_account.go b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_account.go index 720f72bb342..6eff0144c46 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_account.go +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_privatelinkresource.go index cfc27f89af1..dcba5b23987 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/method_get.go b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/method_get.go index 573968b0437..9669302fdb2 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/method_get.go +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model GroupInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/version.go b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/version.go index d1fe764f925..30aef0a7475 100644 --- a/resource-manager/deviceupdate/2022-10-01/privatelinkresources/version.go +++ b/resource-manager/deviceupdate/2022-10-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-10-01" } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/README.md b/resource-manager/deviceupdate/2023-07-01/deviceupdates/README.md index 8ae135dd90c..1bac802f3c5 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/README.md +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2023-07-01/deviceupdates` Documentation -The `deviceupdates` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2023-07-01`). +The `deviceupdates` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/client.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/client.go index d90b56d6a34..93ff29b915d 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/client.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/client.go @@ -15,7 +15,7 @@ type DeviceupdatesClient struct { } func NewDeviceupdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeviceupdatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deviceupdates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deviceupdates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeviceupdatesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_account.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_account.go index 8eed3e36e38..0c823051970 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_account.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_instance.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_instance.go index 2a06e933332..8f49e788381 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_instance.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_instance.go @@ -44,7 +44,7 @@ func ParseInstanceID(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_privateendpointconnectionproxy.go index 6c1049274b8..da21b68748c 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_accountsget.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_accountsget.go index c37aaa48d6a..2b290a67c4d 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_accountsget.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_accountsget.go @@ -45,7 +45,6 @@ func (c DeviceupdatesClient) AccountsGet(ctx context.Context, id AccountId) (res var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_checknameavailability.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_checknameavailability.go index b5e679fd327..abab13c3ae7 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_checknameavailability.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c DeviceupdatesClient) CheckNameAvailability(ctx context.Context, id commo var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesget.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesget.go index da98e5b716e..1259d55e811 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesget.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesget.go @@ -45,7 +45,6 @@ func (c DeviceupdatesClient) InstancesGet(ctx context.Context, id InstanceId) (r var model Instance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesupdate.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesupdate.go index 26958bc3e99..c772e5c1cb2 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesupdate.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/method_instancesupdate.go @@ -49,7 +49,6 @@ func (c DeviceupdatesClient) InstancesUpdate(ctx context.Context, id InstanceId, var model Instance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/deviceupdates/version.go b/resource-manager/deviceupdate/2023-07-01/deviceupdates/version.go index 9df494d50a5..e37cd28e263 100644 --- a/resource-manager/deviceupdate/2023-07-01/deviceupdates/version.go +++ b/resource-manager/deviceupdate/2023-07-01/deviceupdates/version.go @@ -1,12 +1,10 @@ package deviceupdates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deviceupdates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deviceupdates/2023-07-01" } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/README.md b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/README.md index c08d94c6046..f62bda9e870 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/README.md +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies` Documentation -The `privateendpointconnectionproxies` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2023-07-01`). +The `privateendpointconnectionproxies` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/client.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/client.go index 587eec35d04..35fdc06bf3c 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/client.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionProxiesClient struct { } func NewPrivateEndpointConnectionProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnectionproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnectionproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionProxiesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_account.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_account.go index e71633d502d..1c1d2c8d4d4 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_account.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go index d47ac2422f4..10688f266c6 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/version.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/version.go index 8245cde26f0..23352158631 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/version.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnectionproxies/version.go @@ -1,12 +1,10 @@ package privateendpointconnectionproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnectionproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnectionproxies/2023-07-01" } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/README.md b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/README.md index 5587fcc08af..36062f92538 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/README.md +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2023-07-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2023-07-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/client.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/client.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_account.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_account.go index 83f91e1c54d..ffa74b66487 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_account.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnection.go index 7ede20257e1..9f7403f0d20 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnectionproxy.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnectionproxy.go index 9228e2ebb58..0584b681ae4 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnectionproxy.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/id_privateendpointconnectionproxy.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionProxyID(input string) (*PrivateEndpointConnec } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionProxyIDInsensitively(input string) (*PrivateE } id := PrivateEndpointConnectionProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_get.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_get.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_listbyaccount.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_listbyaccount.go index e3e936ece45..a554cc93aad 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_listbyaccount.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_listbyaccount.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByAccount(ctx context.Context, id var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go index ead11056211..3f9a7c9b1f3 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/method_privateendpointconnectionproxiesget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionProxiesGet(ct var model PrivateEndpointConnectionProxy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/version.go b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/version.go index 35cb9c96d6d..3216474b9d5 100644 --- a/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/version.go +++ b/resource-manager/deviceupdate/2023-07-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-07-01" } diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/README.md b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/README.md index ec54ae4712f..7957c98d6d1 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/README.md +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/deviceupdate/2023-07-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `deviceupdate` (API Version `2023-07-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `deviceupdate` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/client.go b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/client.go +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_account.go b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_account.go index 720f72bb342..6eff0144c46 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_account.go +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_privatelinkresource.go index cfc27f89af1..dcba5b23987 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/method_get.go b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/method_get.go index 573968b0437..9669302fdb2 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/method_get.go +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model GroupInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/version.go b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/version.go index 1ba0006f742..7b5c2d96a3e 100644 --- a/resource-manager/deviceupdate/2023-07-01/privatelinkresources/version.go +++ b/resource-manager/deviceupdate/2023-07-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-07-01" } diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/client.go new file mode 100644 index 00000000000..0b5752d334c --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/client.go @@ -0,0 +1,64 @@ +package v2024_04_04_preview + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions" + "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/pools" + "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails" + "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/sku" + "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + ImageVersions *imageversions.ImageVersionsClient + Pools *pools.PoolsClient + ResourceDetails *resourcedetails.ResourceDetailsClient + Sku *sku.SkuClient + SubscriptionUsages *subscriptionusages.SubscriptionUsagesClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + imageVersionsClient, err := imageversions.NewImageVersionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ImageVersions client: %+v", err) + } + configureFunc(imageVersionsClient.Client) + + poolsClient, err := pools.NewPoolsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Pools client: %+v", err) + } + configureFunc(poolsClient.Client) + + resourceDetailsClient, err := resourcedetails.NewResourceDetailsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ResourceDetails client: %+v", err) + } + configureFunc(resourceDetailsClient.Client) + + skuClient, err := sku.NewSkuClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Sku client: %+v", err) + } + configureFunc(skuClient.Client) + + subscriptionUsagesClient, err := subscriptionusages.NewSubscriptionUsagesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building SubscriptionUsages client: %+v", err) + } + configureFunc(subscriptionUsagesClient.Client) + + return &Client{ + ImageVersions: imageVersionsClient, + Pools: poolsClient, + ResourceDetails: resourceDetailsClient, + Sku: skuClient, + SubscriptionUsages: subscriptionUsagesClient, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/README.md b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/README.md new file mode 100644 index 00000000000..7f4a51860b8 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions` Documentation + +The `imageversions` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2024-04-04-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions" +``` + + +### Client Initialization + +```go +client := imageversions.NewImageVersionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ImageVersionsClient.ListByImage` + +```go +ctx := context.TODO() +id := imageversions.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "imageValue") + +// alternatively `client.ListByImage(ctx, id)` can be used to do batched pagination +items, err := client.ListByImageComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/client.go new file mode 100644 index 00000000000..7a3a0578fb2 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/client.go @@ -0,0 +1,26 @@ +package imageversions + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImageVersionsClient struct { + Client *resourcemanager.Client +} + +func NewImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageVersionsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "imageversions", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ImageVersionsClient: %+v", err) + } + + return &ImageVersionsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image.go new file mode 100644 index 00000000000..2a4dec87ee9 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image.go @@ -0,0 +1,130 @@ +package imageversions + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&ImageId{}) +} + +var _ resourceids.ResourceId = &ImageId{} + +// ImageId is a struct representing the Resource ID for a Image +type ImageId struct { + SubscriptionId string + ResourceGroupName string + ImageName string +} + +// NewImageID returns a new ImageId struct +func NewImageID(subscriptionId string, resourceGroupName string, imageName string) ImageId { + return ImageId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + ImageName: imageName, + } +} + +// ParseImageID parses 'input' into a ImageId +func ParseImageID(input string) (*ImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&ImageId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ImageId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseImageIDInsensitively parses 'input' case-insensitively into a ImageId +// note: this method should only be used for API response data and not user input +func ParseImageIDInsensitively(input string) (*ImageId, error) { + parser := resourceids.NewParserFromResourceIdType(&ImageId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := ImageId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *ImageId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.ImageName, ok = input.Parsed["imageName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input) + } + + return nil +} + +// ValidateImageID checks that 'input' can be parsed as a Image ID +func ValidateImageID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseImageID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Image ID +func (id ImageId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DevOpsInfrastructure/images/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ImageName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Image ID +func (id ImageId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"), + resourceids.StaticSegment("staticImages", "images", "images"), + resourceids.UserSpecifiedSegment("imageName", "imageValue"), + } +} + +// String returns a human-readable description of this Image ID +func (id ImageId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Image Name: %q", id.ImageName), + } + return fmt.Sprintf("Image (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image_test.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image_test.go new file mode 100644 index 00000000000..6c8982bf863 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/id_image_test.go @@ -0,0 +1,282 @@ +package imageversions + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &ImageId{} + +func TestNewImageID(t *testing.T) { + id := NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "imageValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.ImageName != "imageValue" { + t.Fatalf("Expected %q but got %q for Segment 'ImageName'", id.ImageName, "imageValue") + } +} + +func TestFormatImageID(t *testing.T) { + actual := NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "imageValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images/imageValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseImageID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ImageId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images/imageValue", + Expected: &ImageId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ImageName: "imageValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images/imageValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseImageID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ImageName != v.Expected.ImageName { + t.Fatalf("Expected %q but got %q for ImageName", v.Expected.ImageName, actual.ImageName) + } + + } +} + +func TestParseImageIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *ImageId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/iMaGeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images/imageValue", + Expected: &ImageId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + ImageName: "imageValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/images/imageValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/iMaGeS/iMaGeVaLuE", + Expected: &ImageId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + ImageName: "iMaGeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/iMaGeS/iMaGeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseImageIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.ImageName != v.Expected.ImageName { + t.Fatalf("Expected %q but got %q for ImageName", v.Expected.ImageName, actual.ImageName) + } + + } +} + +func TestSegmentsForImageId(t *testing.T) { + segments := ImageId{}.Segments() + if len(segments) == 0 { + t.Fatalf("ImageId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/method_listbyimage.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/method_listbyimage.go new file mode 100644 index 00000000000..34815b734af --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/method_listbyimage.go @@ -0,0 +1,105 @@ +package imageversions + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByImageOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ImageVersion +} + +type ListByImageCompleteResult struct { + LatestHttpResponse *http.Response + Items []ImageVersion +} + +type ListByImageCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByImageCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByImage ... +func (c ImageVersionsClient) ListByImage(ctx context.Context, id ImageId) (result ListByImageOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByImageCustomPager{}, + Path: fmt.Sprintf("%s/versions", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ImageVersion `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByImageComplete retrieves all the results into a single object +func (c ImageVersionsClient) ListByImageComplete(ctx context.Context, id ImageId) (ListByImageCompleteResult, error) { + return c.ListByImageCompleteMatchingPredicate(ctx, id, ImageVersionOperationPredicate{}) +} + +// ListByImageCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ImageVersionsClient) ListByImageCompleteMatchingPredicate(ctx context.Context, id ImageId, predicate ImageVersionOperationPredicate) (result ListByImageCompleteResult, err error) { + items := make([]ImageVersion, 0) + + resp, err := c.ListByImage(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByImageCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversion.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversion.go new file mode 100644 index 00000000000..9080d66706e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversion.go @@ -0,0 +1,16 @@ +package imageversions + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImageVersion struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ImageVersionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversionproperties.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversionproperties.go new file mode 100644 index 00000000000..1f97bd37b50 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/model_imageversionproperties.go @@ -0,0 +1,8 @@ +package imageversions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImageVersionProperties struct { + Version string `json:"version"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/predicates.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/predicates.go new file mode 100644 index 00000000000..4744837f5f3 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/predicates.go @@ -0,0 +1,27 @@ +package imageversions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImageVersionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ImageVersionOperationPredicate) Matches(input ImageVersion) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/version.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/version.go new file mode 100644 index 00000000000..7b9d7004789 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/imageversions/version.go @@ -0,0 +1,10 @@ +package imageversions + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-04-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/imageversions/2024-04-04-preview" +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/README.md b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/README.md new file mode 100644 index 00000000000..77b8b1166cf --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/README.md @@ -0,0 +1,117 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/pools` Documentation + +The `pools` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2024-04-04-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/pools" +``` + + +### Client Initialization + +```go +client := pools.NewPoolsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PoolsClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + +payload := pools.Pool{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PoolsClient.Delete` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PoolsClient.Get` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PoolsClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PoolsClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PoolsClient.Update` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + +payload := pools.PoolUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/client.go new file mode 100644 index 00000000000..5860764dffe --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/client.go @@ -0,0 +1,26 @@ +package pools + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolsClient struct { + Client *resourcemanager.Client +} + +func NewPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "pools", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PoolsClient: %+v", err) + } + + return &PoolsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/constants.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/constants.go new file mode 100644 index 00000000000..e311ee19900 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/constants.go @@ -0,0 +1,380 @@ +package pools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDevOpsPermissionType string + +const ( + AzureDevOpsPermissionTypeCreatorOnly AzureDevOpsPermissionType = "CreatorOnly" + AzureDevOpsPermissionTypeInherit AzureDevOpsPermissionType = "Inherit" + AzureDevOpsPermissionTypeSpecificAccounts AzureDevOpsPermissionType = "SpecificAccounts" +) + +func PossibleValuesForAzureDevOpsPermissionType() []string { + return []string{ + string(AzureDevOpsPermissionTypeCreatorOnly), + string(AzureDevOpsPermissionTypeInherit), + string(AzureDevOpsPermissionTypeSpecificAccounts), + } +} + +func (s *AzureDevOpsPermissionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureDevOpsPermissionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureDevOpsPermissionType(input string) (*AzureDevOpsPermissionType, error) { + vals := map[string]AzureDevOpsPermissionType{ + "creatoronly": AzureDevOpsPermissionTypeCreatorOnly, + "inherit": AzureDevOpsPermissionTypeInherit, + "specificaccounts": AzureDevOpsPermissionTypeSpecificAccounts, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureDevOpsPermissionType(input) + return &out, nil +} + +type CachingType string + +const ( + CachingTypeNone CachingType = "None" + CachingTypeReadOnly CachingType = "ReadOnly" + CachingTypeReadWrite CachingType = "ReadWrite" +) + +func PossibleValuesForCachingType() []string { + return []string{ + string(CachingTypeNone), + string(CachingTypeReadOnly), + string(CachingTypeReadWrite), + } +} + +func (s *CachingType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCachingType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCachingType(input string) (*CachingType, error) { + vals := map[string]CachingType{ + "none": CachingTypeNone, + "readonly": CachingTypeReadOnly, + "readwrite": CachingTypeReadWrite, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CachingType(input) + return &out, nil +} + +type LogonType string + +const ( + LogonTypeInteractive LogonType = "Interactive" + LogonTypeService LogonType = "Service" +) + +func PossibleValuesForLogonType() []string { + return []string{ + string(LogonTypeInteractive), + string(LogonTypeService), + } +} + +func (s *LogonType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLogonType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLogonType(input string) (*LogonType, error) { + vals := map[string]LogonType{ + "interactive": LogonTypeInteractive, + "service": LogonTypeService, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LogonType(input) + return &out, nil +} + +type OsDiskStorageAccountType string + +const ( + OsDiskStorageAccountTypePremium OsDiskStorageAccountType = "Premium" + OsDiskStorageAccountTypeStandard OsDiskStorageAccountType = "Standard" + OsDiskStorageAccountTypeStandardSSD OsDiskStorageAccountType = "StandardSSD" +) + +func PossibleValuesForOsDiskStorageAccountType() []string { + return []string{ + string(OsDiskStorageAccountTypePremium), + string(OsDiskStorageAccountTypeStandard), + string(OsDiskStorageAccountTypeStandardSSD), + } +} + +func (s *OsDiskStorageAccountType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOsDiskStorageAccountType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOsDiskStorageAccountType(input string) (*OsDiskStorageAccountType, error) { + vals := map[string]OsDiskStorageAccountType{ + "premium": OsDiskStorageAccountTypePremium, + "standard": OsDiskStorageAccountTypeStandard, + "standardssd": OsDiskStorageAccountTypeStandardSSD, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OsDiskStorageAccountType(input) + return &out, nil +} + +type PredictionPreference string + +const ( + PredictionPreferenceBalanced PredictionPreference = "Balanced" + PredictionPreferenceBestPerformance PredictionPreference = "BestPerformance" + PredictionPreferenceMoreCostEffective PredictionPreference = "MoreCostEffective" + PredictionPreferenceMorePerformance PredictionPreference = "MorePerformance" + PredictionPreferenceMostCostEffective PredictionPreference = "MostCostEffective" +) + +func PossibleValuesForPredictionPreference() []string { + return []string{ + string(PredictionPreferenceBalanced), + string(PredictionPreferenceBestPerformance), + string(PredictionPreferenceMoreCostEffective), + string(PredictionPreferenceMorePerformance), + string(PredictionPreferenceMostCostEffective), + } +} + +func (s *PredictionPreference) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePredictionPreference(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePredictionPreference(input string) (*PredictionPreference, error) { + vals := map[string]PredictionPreference{ + "balanced": PredictionPreferenceBalanced, + "bestperformance": PredictionPreferenceBestPerformance, + "morecosteffective": PredictionPreferenceMoreCostEffective, + "moreperformance": PredictionPreferenceMorePerformance, + "mostcosteffective": PredictionPreferenceMostCostEffective, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PredictionPreference(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateAccepted), + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateProvisioning), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "accepted": ProvisioningStateAccepted, + "canceled": ProvisioningStateCanceled, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "provisioning": ProvisioningStateProvisioning, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type ResourcePredictionsProfileType string + +const ( + ResourcePredictionsProfileTypeAutomatic ResourcePredictionsProfileType = "Automatic" + ResourcePredictionsProfileTypeManual ResourcePredictionsProfileType = "Manual" +) + +func PossibleValuesForResourcePredictionsProfileType() []string { + return []string{ + string(ResourcePredictionsProfileTypeAutomatic), + string(ResourcePredictionsProfileTypeManual), + } +} + +func (s *ResourcePredictionsProfileType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourcePredictionsProfileType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourcePredictionsProfileType(input string) (*ResourcePredictionsProfileType, error) { + vals := map[string]ResourcePredictionsProfileType{ + "automatic": ResourcePredictionsProfileTypeAutomatic, + "manual": ResourcePredictionsProfileTypeManual, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourcePredictionsProfileType(input) + return &out, nil +} + +type StorageAccountType string + +const ( + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" + StorageAccountTypePremiumZRS StorageAccountType = "Premium_ZRS" + StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" + StorageAccountTypeStandardSSDLRS StorageAccountType = "StandardSSD_LRS" + StorageAccountTypeStandardSSDZRS StorageAccountType = "StandardSSD_ZRS" +) + +func PossibleValuesForStorageAccountType() []string { + return []string{ + string(StorageAccountTypePremiumLRS), + string(StorageAccountTypePremiumZRS), + string(StorageAccountTypeStandardLRS), + string(StorageAccountTypeStandardSSDLRS), + string(StorageAccountTypeStandardSSDZRS), + } +} + +func (s *StorageAccountType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageAccountType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageAccountType(input string) (*StorageAccountType, error) { + vals := map[string]StorageAccountType{ + "premium_lrs": StorageAccountTypePremiumLRS, + "premium_zrs": StorageAccountTypePremiumZRS, + "standard_lrs": StorageAccountTypeStandardLRS, + "standardssd_lrs": StorageAccountTypeStandardSSDLRS, + "standardssd_zrs": StorageAccountTypeStandardSSDZRS, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageAccountType(input) + return &out, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool.go new file mode 100644 index 00000000000..e2872150604 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool.go @@ -0,0 +1,130 @@ +package pools + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PoolId{}) +} + +var _ resourceids.ResourceId = &PoolId{} + +// PoolId is a struct representing the Resource ID for a Pool +type PoolId struct { + SubscriptionId string + ResourceGroupName string + PoolName string +} + +// NewPoolID returns a new PoolId struct +func NewPoolID(subscriptionId string, resourceGroupName string, poolName string) PoolId { + return PoolId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PoolName: poolName, + } +} + +// ParsePoolID parses 'input' into a PoolId +func ParsePoolID(input string) (*PoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&PoolId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PoolId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePoolIDInsensitively parses 'input' case-insensitively into a PoolId +// note: this method should only be used for API response data and not user input +func ParsePoolIDInsensitively(input string) (*PoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&PoolId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PoolId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) + } + + return nil +} + +// ValidatePoolID checks that 'input' can be parsed as a Pool ID +func ValidatePoolID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePoolID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Pool ID +func (id PoolId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DevOpsInfrastructure/pools/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PoolName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Pool ID +func (id PoolId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"), + resourceids.StaticSegment("staticPools", "pools", "pools"), + resourceids.UserSpecifiedSegment("poolName", "poolValue"), + } +} + +// String returns a human-readable description of this Pool ID +func (id PoolId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Pool Name: %q", id.PoolName), + } + return fmt.Sprintf("Pool (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool_test.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool_test.go new file mode 100644 index 00000000000..5451da8b724 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/id_pool_test.go @@ -0,0 +1,282 @@ +package pools + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PoolId{} + +func TestNewPoolID(t *testing.T) { + id := NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.PoolName != "poolValue" { + t.Fatalf("Expected %q but got %q for Segment 'PoolName'", id.PoolName, "poolValue") + } +} + +func TestFormatPoolID(t *testing.T) { + actual := NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParsePoolID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PoolId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + PoolName: "poolValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePoolID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.PoolName != v.Expected.PoolName { + t.Fatalf("Expected %q but got %q for PoolName", v.Expected.PoolName, actual.PoolName) + } + + } +} + +func TestParsePoolIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PoolId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + PoolName: "poolValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs/pOoLvAlUe", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + PoolName: "pOoLvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs/pOoLvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePoolIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.PoolName != v.Expected.PoolName { + t.Fatalf("Expected %q but got %q for PoolName", v.Expected.PoolName, actual.PoolName) + } + + } +} + +func TestSegmentsForPoolId(t *testing.T) { + segments := PoolId{}.Segments() + if len(segments) == 0 { + t.Fatalf("PoolId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_createorupdate.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_createorupdate.go new file mode 100644 index 00000000000..6017e9f5eab --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_createorupdate.go @@ -0,0 +1,75 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Pool +} + +// CreateOrUpdate ... +func (c PoolsClient) CreateOrUpdate(ctx context.Context, id PoolId, input Pool) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c PoolsClient) CreateOrUpdateThenPoll(ctx context.Context, id PoolId, input Pool) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_delete.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_delete.go new file mode 100644 index 00000000000..deed72618de --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_delete.go @@ -0,0 +1,70 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PoolsClient) Delete(ctx context.Context, id PoolId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PoolsClient) DeleteThenPoll(ctx context.Context, id PoolId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_get.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_get.go new file mode 100644 index 00000000000..8947bf1c25f --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_get.go @@ -0,0 +1,53 @@ +package pools + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Pool +} + +// Get ... +func (c PoolsClient) Get(ctx context.Context, id PoolId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Pool + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbyresourcegroup.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbyresourcegroup.go new file mode 100644 index 00000000000..3f040edc555 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Pool +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Pool +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c PoolsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.DevOpsInfrastructure/pools", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Pool `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c PoolsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, PoolOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PoolsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PoolOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Pool, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbysubscription.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbysubscription.go new file mode 100644 index 00000000000..131eac5670e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_listbysubscription.go @@ -0,0 +1,106 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Pool +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []Pool +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c PoolsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.DevOpsInfrastructure/pools", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Pool `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c PoolsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PoolOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PoolsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PoolOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]Pool, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_update.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_update.go new file mode 100644 index 00000000000..3bec7d745bc --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/method_update.go @@ -0,0 +1,75 @@ +package pools + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Pool +} + +// Update ... +func (c PoolsClient) Update(ctx context.Context, id PoolId, input PoolUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c PoolsClient) UpdateThenPoll(ctx context.Context, id PoolId, input PoolUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_agentprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_agentprofile.go new file mode 100644 index 00000000000..91752bb9a60 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_agentprofile.go @@ -0,0 +1,112 @@ +package pools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AgentProfile interface { + AgentProfile() BaseAgentProfileImpl +} + +var _ AgentProfile = BaseAgentProfileImpl{} + +type BaseAgentProfileImpl struct { + Kind string `json:"kind"` + ResourcePredictions *interface{} `json:"resourcePredictions,omitempty"` + ResourcePredictionsProfile ResourcePredictionsProfile `json:"resourcePredictionsProfile"` +} + +func (s BaseAgentProfileImpl) AgentProfile() BaseAgentProfileImpl { + return s +} + +var _ AgentProfile = RawAgentProfileImpl{} + +// RawAgentProfileImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawAgentProfileImpl struct { + agentProfile BaseAgentProfileImpl + Type string + Values map[string]interface{} +} + +func (s RawAgentProfileImpl) AgentProfile() BaseAgentProfileImpl { + return s.agentProfile +} + +var _ json.Unmarshaler = &BaseAgentProfileImpl{} + +func (s *BaseAgentProfileImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseAgentProfileImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseAgentProfileImpl: %+v", err) + } + + s.Kind = decoded.Kind + s.ResourcePredictions = decoded.ResourcePredictions + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseAgentProfileImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["resourcePredictionsProfile"]; ok { + impl, err := UnmarshalResourcePredictionsProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ResourcePredictionsProfile' for 'BaseAgentProfileImpl': %+v", err) + } + s.ResourcePredictionsProfile = impl + } + return nil +} + +func UnmarshalAgentProfileImplementation(input []byte) (AgentProfile, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling AgentProfile into map[string]interface: %+v", err) + } + + value, ok := temp["kind"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Stateful") { + var out Stateful + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Stateful: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Stateless") { + var out StatelessAgentProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into StatelessAgentProfile: %+v", err) + } + return out, nil + } + + var parent BaseAgentProfileImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAgentProfileImpl: %+v", err) + } + + return RawAgentProfileImpl{ + agentProfile: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_automaticresourcepredictionsprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_automaticresourcepredictionsprofile.go new file mode 100644 index 00000000000..aadf94c6367 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_automaticresourcepredictionsprofile.go @@ -0,0 +1,50 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ResourcePredictionsProfile = AutomaticResourcePredictionsProfile{} + +type AutomaticResourcePredictionsProfile struct { + PredictionPreference *PredictionPreference `json:"predictionPreference,omitempty"` + + // Fields inherited from ResourcePredictionsProfile + + Kind ResourcePredictionsProfileType `json:"kind"` +} + +func (s AutomaticResourcePredictionsProfile) ResourcePredictionsProfile() BaseResourcePredictionsProfileImpl { + return BaseResourcePredictionsProfileImpl{ + Kind: s.Kind, + } +} + +var _ json.Marshaler = AutomaticResourcePredictionsProfile{} + +func (s AutomaticResourcePredictionsProfile) MarshalJSON() ([]byte, error) { + type wrapper AutomaticResourcePredictionsProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AutomaticResourcePredictionsProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AutomaticResourcePredictionsProfile: %+v", err) + } + + decoded["kind"] = "Automatic" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AutomaticResourcePredictionsProfile: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopsorganizationprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopsorganizationprofile.go new file mode 100644 index 00000000000..8bfb7d68d9e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopsorganizationprofile.go @@ -0,0 +1,51 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OrganizationProfile = AzureDevOpsOrganizationProfile{} + +type AzureDevOpsOrganizationProfile struct { + Organizations []Organization `json:"organizations"` + PermissionProfile *AzureDevOpsPermissionProfile `json:"permissionProfile,omitempty"` + + // Fields inherited from OrganizationProfile + + Kind string `json:"kind"` +} + +func (s AzureDevOpsOrganizationProfile) OrganizationProfile() BaseOrganizationProfileImpl { + return BaseOrganizationProfileImpl{ + Kind: s.Kind, + } +} + +var _ json.Marshaler = AzureDevOpsOrganizationProfile{} + +func (s AzureDevOpsOrganizationProfile) MarshalJSON() ([]byte, error) { + type wrapper AzureDevOpsOrganizationProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDevOpsOrganizationProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDevOpsOrganizationProfile: %+v", err) + } + + decoded["kind"] = "AzureDevOps" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDevOpsOrganizationProfile: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopspermissionprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopspermissionprofile.go new file mode 100644 index 00000000000..8f6cb8a42d8 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_azuredevopspermissionprofile.go @@ -0,0 +1,10 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDevOpsPermissionProfile struct { + Groups *[]string `json:"groups,omitempty"` + Kind AzureDevOpsPermissionType `json:"kind"` + Users *[]string `json:"users,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_datadisk.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_datadisk.go new file mode 100644 index 00000000000..d7e570a9c31 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_datadisk.go @@ -0,0 +1,11 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataDisk struct { + Caching *CachingType `json:"caching,omitempty"` + DiskSizeGiB *int64 `json:"diskSizeGiB,omitempty"` + DriveLetter *string `json:"driveLetter,omitempty"` + StorageAccountType *StorageAccountType `json:"storageAccountType,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_devopsazuresku.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_devopsazuresku.go new file mode 100644 index 00000000000..0fff7500dd0 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_devopsazuresku.go @@ -0,0 +1,8 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DevOpsAzureSku struct { + Name string `json:"name"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_fabricprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_fabricprofile.go new file mode 100644 index 00000000000..941f5852858 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_fabricprofile.go @@ -0,0 +1,75 @@ +package pools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricProfile interface { + FabricProfile() BaseFabricProfileImpl +} + +var _ FabricProfile = BaseFabricProfileImpl{} + +type BaseFabricProfileImpl struct { + Kind string `json:"kind"` +} + +func (s BaseFabricProfileImpl) FabricProfile() BaseFabricProfileImpl { + return s +} + +var _ FabricProfile = RawFabricProfileImpl{} + +// RawFabricProfileImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawFabricProfileImpl struct { + fabricProfile BaseFabricProfileImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricProfileImpl) FabricProfile() BaseFabricProfileImpl { + return s.fabricProfile +} + +func UnmarshalFabricProfileImplementation(input []byte) (FabricProfile, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling FabricProfile into map[string]interface: %+v", err) + } + + value, ok := temp["kind"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Vmss") { + var out VMSSFabricProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into VMSSFabricProfile: %+v", err) + } + return out, nil + } + + var parent BaseFabricProfileImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricProfileImpl: %+v", err) + } + + return RawFabricProfileImpl{ + fabricProfile: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganization.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganization.go new file mode 100644 index 00000000000..ebeb8c98da5 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganization.go @@ -0,0 +1,9 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GitHubOrganization struct { + Repositories *[]string `json:"repositories,omitempty"` + Url string `json:"url"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganizationprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganizationprofile.go new file mode 100644 index 00000000000..849a5ed4077 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_githuborganizationprofile.go @@ -0,0 +1,50 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ OrganizationProfile = GitHubOrganizationProfile{} + +type GitHubOrganizationProfile struct { + Organizations []GitHubOrganization `json:"organizations"` + + // Fields inherited from OrganizationProfile + + Kind string `json:"kind"` +} + +func (s GitHubOrganizationProfile) OrganizationProfile() BaseOrganizationProfileImpl { + return BaseOrganizationProfileImpl{ + Kind: s.Kind, + } +} + +var _ json.Marshaler = GitHubOrganizationProfile{} + +func (s GitHubOrganizationProfile) MarshalJSON() ([]byte, error) { + type wrapper GitHubOrganizationProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GitHubOrganizationProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GitHubOrganizationProfile: %+v", err) + } + + decoded["kind"] = "GitHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GitHubOrganizationProfile: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_manualresourcepredictionsprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_manualresourcepredictionsprofile.go new file mode 100644 index 00000000000..bdc0efb37ef --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_manualresourcepredictionsprofile.go @@ -0,0 +1,49 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ ResourcePredictionsProfile = ManualResourcePredictionsProfile{} + +type ManualResourcePredictionsProfile struct { + + // Fields inherited from ResourcePredictionsProfile + + Kind ResourcePredictionsProfileType `json:"kind"` +} + +func (s ManualResourcePredictionsProfile) ResourcePredictionsProfile() BaseResourcePredictionsProfileImpl { + return BaseResourcePredictionsProfileImpl{ + Kind: s.Kind, + } +} + +var _ json.Marshaler = ManualResourcePredictionsProfile{} + +func (s ManualResourcePredictionsProfile) MarshalJSON() ([]byte, error) { + type wrapper ManualResourcePredictionsProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ManualResourcePredictionsProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ManualResourcePredictionsProfile: %+v", err) + } + + decoded["kind"] = "Manual" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ManualResourcePredictionsProfile: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_networkprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_networkprofile.go new file mode 100644 index 00000000000..8ecd0977e60 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_networkprofile.go @@ -0,0 +1,8 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetworkProfile struct { + SubnetId string `json:"subnetId"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organization.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organization.go new file mode 100644 index 00000000000..9f2517e48f7 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organization.go @@ -0,0 +1,10 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Organization struct { + Parallelism *int64 `json:"parallelism,omitempty"` + Projects *[]string `json:"projects,omitempty"` + Url string `json:"url"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organizationprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organizationprofile.go new file mode 100644 index 00000000000..7589bede2b1 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_organizationprofile.go @@ -0,0 +1,83 @@ +package pools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrganizationProfile interface { + OrganizationProfile() BaseOrganizationProfileImpl +} + +var _ OrganizationProfile = BaseOrganizationProfileImpl{} + +type BaseOrganizationProfileImpl struct { + Kind string `json:"kind"` +} + +func (s BaseOrganizationProfileImpl) OrganizationProfile() BaseOrganizationProfileImpl { + return s +} + +var _ OrganizationProfile = RawOrganizationProfileImpl{} + +// RawOrganizationProfileImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawOrganizationProfileImpl struct { + organizationProfile BaseOrganizationProfileImpl + Type string + Values map[string]interface{} +} + +func (s RawOrganizationProfileImpl) OrganizationProfile() BaseOrganizationProfileImpl { + return s.organizationProfile +} + +func UnmarshalOrganizationProfileImplementation(input []byte) (OrganizationProfile, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling OrganizationProfile into map[string]interface: %+v", err) + } + + value, ok := temp["kind"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AzureDevOps") { + var out AzureDevOpsOrganizationProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDevOpsOrganizationProfile: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GitHub") { + var out GitHubOrganizationProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GitHubOrganizationProfile: %+v", err) + } + return out, nil + } + + var parent BaseOrganizationProfileImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOrganizationProfileImpl: %+v", err) + } + + return RawOrganizationProfileImpl{ + organizationProfile: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_osprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_osprofile.go new file mode 100644 index 00000000000..6e9f8503ad0 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_osprofile.go @@ -0,0 +1,9 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OsProfile struct { + LogonType *LogonType `json:"logonType,omitempty"` + SecretsManagementSettings *SecretsManagementSettings `json:"secretsManagementSettings,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_pool.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_pool.go new file mode 100644 index 00000000000..bc8e20ffc98 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_pool.go @@ -0,0 +1,20 @@ +package pools + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Pool struct { + Id *string `json:"id,omitempty"` + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *PoolProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolimage.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolimage.go new file mode 100644 index 00000000000..3a80c669b43 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolimage.go @@ -0,0 +1,11 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolImage struct { + Aliases *[]string `json:"aliases,omitempty"` + Buffer *string `json:"buffer,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + WellKnownImageName *string `json:"wellKnownImageName,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolproperties.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolproperties.go new file mode 100644 index 00000000000..504e7fdde78 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolproperties.go @@ -0,0 +1,62 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolProperties struct { + AgentProfile AgentProfile `json:"agentProfile"` + DevCenterProjectResourceId string `json:"devCenterProjectResourceId"` + FabricProfile FabricProfile `json:"fabricProfile"` + MaximumConcurrency int64 `json:"maximumConcurrency"` + OrganizationProfile OrganizationProfile `json:"organizationProfile"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +var _ json.Unmarshaler = &PoolProperties{} + +func (s *PoolProperties) UnmarshalJSON(bytes []byte) error { + type alias PoolProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into PoolProperties: %+v", err) + } + + s.DevCenterProjectResourceId = decoded.DevCenterProjectResourceId + s.MaximumConcurrency = decoded.MaximumConcurrency + s.ProvisioningState = decoded.ProvisioningState + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling PoolProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["agentProfile"]; ok { + impl, err := UnmarshalAgentProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AgentProfile' for 'PoolProperties': %+v", err) + } + s.AgentProfile = impl + } + + if v, ok := temp["fabricProfile"]; ok { + impl, err := UnmarshalFabricProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'FabricProfile' for 'PoolProperties': %+v", err) + } + s.FabricProfile = impl + } + + if v, ok := temp["organizationProfile"]; ok { + impl, err := UnmarshalOrganizationProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'OrganizationProfile' for 'PoolProperties': %+v", err) + } + s.OrganizationProfile = impl + } + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdate.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdate.go new file mode 100644 index 00000000000..596e730feb1 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdate.go @@ -0,0 +1,14 @@ +package pools + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolUpdate struct { + Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *PoolUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdateproperties.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdateproperties.go new file mode 100644 index 00000000000..56ca69f173a --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_poolupdateproperties.go @@ -0,0 +1,62 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolUpdateProperties struct { + AgentProfile AgentProfile `json:"agentProfile"` + DevCenterProjectResourceId *string `json:"devCenterProjectResourceId,omitempty"` + FabricProfile FabricProfile `json:"fabricProfile"` + MaximumConcurrency *int64 `json:"maximumConcurrency,omitempty"` + OrganizationProfile OrganizationProfile `json:"organizationProfile"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +var _ json.Unmarshaler = &PoolUpdateProperties{} + +func (s *PoolUpdateProperties) UnmarshalJSON(bytes []byte) error { + type alias PoolUpdateProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into PoolUpdateProperties: %+v", err) + } + + s.DevCenterProjectResourceId = decoded.DevCenterProjectResourceId + s.MaximumConcurrency = decoded.MaximumConcurrency + s.ProvisioningState = decoded.ProvisioningState + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling PoolUpdateProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["agentProfile"]; ok { + impl, err := UnmarshalAgentProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AgentProfile' for 'PoolUpdateProperties': %+v", err) + } + s.AgentProfile = impl + } + + if v, ok := temp["fabricProfile"]; ok { + impl, err := UnmarshalFabricProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'FabricProfile' for 'PoolUpdateProperties': %+v", err) + } + s.FabricProfile = impl + } + + if v, ok := temp["organizationProfile"]; ok { + impl, err := UnmarshalOrganizationProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'OrganizationProfile' for 'PoolUpdateProperties': %+v", err) + } + s.OrganizationProfile = impl + } + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_resourcepredictionsprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_resourcepredictionsprofile.go new file mode 100644 index 00000000000..220c3ccd876 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_resourcepredictionsprofile.go @@ -0,0 +1,83 @@ +package pools + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourcePredictionsProfile interface { + ResourcePredictionsProfile() BaseResourcePredictionsProfileImpl +} + +var _ ResourcePredictionsProfile = BaseResourcePredictionsProfileImpl{} + +type BaseResourcePredictionsProfileImpl struct { + Kind ResourcePredictionsProfileType `json:"kind"` +} + +func (s BaseResourcePredictionsProfileImpl) ResourcePredictionsProfile() BaseResourcePredictionsProfileImpl { + return s +} + +var _ ResourcePredictionsProfile = RawResourcePredictionsProfileImpl{} + +// RawResourcePredictionsProfileImpl is returned when the Discriminated Value doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawResourcePredictionsProfileImpl struct { + resourcePredictionsProfile BaseResourcePredictionsProfileImpl + Type string + Values map[string]interface{} +} + +func (s RawResourcePredictionsProfileImpl) ResourcePredictionsProfile() BaseResourcePredictionsProfileImpl { + return s.resourcePredictionsProfile +} + +func UnmarshalResourcePredictionsProfileImplementation(input []byte) (ResourcePredictionsProfile, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling ResourcePredictionsProfile into map[string]interface: %+v", err) + } + + value, ok := temp["kind"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Automatic") { + var out AutomaticResourcePredictionsProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AutomaticResourcePredictionsProfile: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Manual") { + var out ManualResourcePredictionsProfile + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ManualResourcePredictionsProfile: %+v", err) + } + return out, nil + } + + var parent BaseResourcePredictionsProfileImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourcePredictionsProfileImpl: %+v", err) + } + + return RawResourcePredictionsProfileImpl{ + resourcePredictionsProfile: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_secretsmanagementsettings.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_secretsmanagementsettings.go new file mode 100644 index 00000000000..27d0fef3d0f --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_secretsmanagementsettings.go @@ -0,0 +1,10 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretsManagementSettings struct { + CertificateStoreLocation *string `json:"certificateStoreLocation,omitempty"` + KeyExportable bool `json:"keyExportable"` + ObservedCertificates []string `json:"observedCertificates"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_stateful.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_stateful.go new file mode 100644 index 00000000000..64648bd3685 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_stateful.go @@ -0,0 +1,84 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ AgentProfile = Stateful{} + +type Stateful struct { + GracePeriodTimeSpan *string `json:"gracePeriodTimeSpan,omitempty"` + MaxAgentLifetime *string `json:"maxAgentLifetime,omitempty"` + + // Fields inherited from AgentProfile + + Kind string `json:"kind"` + ResourcePredictions *interface{} `json:"resourcePredictions,omitempty"` + ResourcePredictionsProfile ResourcePredictionsProfile `json:"resourcePredictionsProfile"` +} + +func (s Stateful) AgentProfile() BaseAgentProfileImpl { + return BaseAgentProfileImpl{ + Kind: s.Kind, + ResourcePredictions: s.ResourcePredictions, + ResourcePredictionsProfile: s.ResourcePredictionsProfile, + } +} + +var _ json.Marshaler = Stateful{} + +func (s Stateful) MarshalJSON() ([]byte, error) { + type wrapper Stateful + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Stateful: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Stateful: %+v", err) + } + + decoded["kind"] = "Stateful" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Stateful: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &Stateful{} + +func (s *Stateful) UnmarshalJSON(bytes []byte) error { + type alias Stateful + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Stateful: %+v", err) + } + + s.GracePeriodTimeSpan = decoded.GracePeriodTimeSpan + s.Kind = decoded.Kind + s.MaxAgentLifetime = decoded.MaxAgentLifetime + s.ResourcePredictions = decoded.ResourcePredictions + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Stateful into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["resourcePredictionsProfile"]; ok { + impl, err := UnmarshalResourcePredictionsProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ResourcePredictionsProfile' for 'Stateful': %+v", err) + } + s.ResourcePredictionsProfile = impl + } + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_statelessagentprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_statelessagentprofile.go new file mode 100644 index 00000000000..9f7cab14341 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_statelessagentprofile.go @@ -0,0 +1,80 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ AgentProfile = StatelessAgentProfile{} + +type StatelessAgentProfile struct { + + // Fields inherited from AgentProfile + + Kind string `json:"kind"` + ResourcePredictions *interface{} `json:"resourcePredictions,omitempty"` + ResourcePredictionsProfile ResourcePredictionsProfile `json:"resourcePredictionsProfile"` +} + +func (s StatelessAgentProfile) AgentProfile() BaseAgentProfileImpl { + return BaseAgentProfileImpl{ + Kind: s.Kind, + ResourcePredictions: s.ResourcePredictions, + ResourcePredictionsProfile: s.ResourcePredictionsProfile, + } +} + +var _ json.Marshaler = StatelessAgentProfile{} + +func (s StatelessAgentProfile) MarshalJSON() ([]byte, error) { + type wrapper StatelessAgentProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling StatelessAgentProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling StatelessAgentProfile: %+v", err) + } + + decoded["kind"] = "Stateless" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling StatelessAgentProfile: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &StatelessAgentProfile{} + +func (s *StatelessAgentProfile) UnmarshalJSON(bytes []byte) error { + type alias StatelessAgentProfile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into StatelessAgentProfile: %+v", err) + } + + s.Kind = decoded.Kind + s.ResourcePredictions = decoded.ResourcePredictions + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling StatelessAgentProfile into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["resourcePredictionsProfile"]; ok { + impl, err := UnmarshalResourcePredictionsProfileImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ResourcePredictionsProfile' for 'StatelessAgentProfile': %+v", err) + } + s.ResourcePredictionsProfile = impl + } + return nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_storageprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_storageprofile.go new file mode 100644 index 00000000000..327c32aec0f --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_storageprofile.go @@ -0,0 +1,9 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProfile struct { + DataDisks *[]DataDisk `json:"dataDisks,omitempty"` + OsDiskStorageAccountType *OsDiskStorageAccountType `json:"osDiskStorageAccountType,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_vmssfabricprofile.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_vmssfabricprofile.go new file mode 100644 index 00000000000..7dbc8973ac9 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/model_vmssfabricprofile.go @@ -0,0 +1,54 @@ +package pools + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ FabricProfile = VMSSFabricProfile{} + +type VMSSFabricProfile struct { + Images []PoolImage `json:"images"` + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + OsProfile *OsProfile `json:"osProfile,omitempty"` + Sku DevOpsAzureSku `json:"sku"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + + // Fields inherited from FabricProfile + + Kind string `json:"kind"` +} + +func (s VMSSFabricProfile) FabricProfile() BaseFabricProfileImpl { + return BaseFabricProfileImpl{ + Kind: s.Kind, + } +} + +var _ json.Marshaler = VMSSFabricProfile{} + +func (s VMSSFabricProfile) MarshalJSON() ([]byte, error) { + type wrapper VMSSFabricProfile + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling VMSSFabricProfile: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling VMSSFabricProfile: %+v", err) + } + + decoded["kind"] = "Vmss" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling VMSSFabricProfile: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/predicates.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/predicates.go new file mode 100644 index 00000000000..3db83e0643e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/predicates.go @@ -0,0 +1,32 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PoolOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p PoolOperationPredicate) Matches(input Pool) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/version.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/version.go new file mode 100644 index 00000000000..64b6ef96bab --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/pools/version.go @@ -0,0 +1,10 @@ +package pools + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-04-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/pools/2024-04-04-preview" +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/README.md b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/README.md new file mode 100644 index 00000000000..410a6410f87 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails` Documentation + +The `resourcedetails` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2024-04-04-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails" +``` + + +### Client Initialization + +```go +client := resourcedetails.NewResourceDetailsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ResourceDetailsClient.ListByPool` + +```go +ctx := context.TODO() +id := resourcedetails.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + +// alternatively `client.ListByPool(ctx, id)` can be used to do batched pagination +items, err := client.ListByPoolComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/client.go new file mode 100644 index 00000000000..5b0006bf4e6 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/client.go @@ -0,0 +1,26 @@ +package resourcedetails + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceDetailsClient struct { + Client *resourcemanager.Client +} + +func NewResourceDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceDetailsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "resourcedetails", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ResourceDetailsClient: %+v", err) + } + + return &ResourceDetailsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/constants.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/constants.go new file mode 100644 index 00000000000..e2a8101d4b1 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/constants.go @@ -0,0 +1,78 @@ +package resourcedetails + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceStatus string + +const ( + ResourceStatusAllocated ResourceStatus = "Allocated" + ResourceStatusLeased ResourceStatus = "Leased" + ResourceStatusNotReady ResourceStatus = "NotReady" + ResourceStatusPendingReimage ResourceStatus = "PendingReimage" + ResourceStatusPendingReturn ResourceStatus = "PendingReturn" + ResourceStatusProvisioning ResourceStatus = "Provisioning" + ResourceStatusReady ResourceStatus = "Ready" + ResourceStatusReimaging ResourceStatus = "Reimaging" + ResourceStatusReturned ResourceStatus = "Returned" + ResourceStatusStarting ResourceStatus = "Starting" + ResourceStatusUpdating ResourceStatus = "Updating" +) + +func PossibleValuesForResourceStatus() []string { + return []string{ + string(ResourceStatusAllocated), + string(ResourceStatusLeased), + string(ResourceStatusNotReady), + string(ResourceStatusPendingReimage), + string(ResourceStatusPendingReturn), + string(ResourceStatusProvisioning), + string(ResourceStatusReady), + string(ResourceStatusReimaging), + string(ResourceStatusReturned), + string(ResourceStatusStarting), + string(ResourceStatusUpdating), + } +} + +func (s *ResourceStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceStatus(input string) (*ResourceStatus, error) { + vals := map[string]ResourceStatus{ + "allocated": ResourceStatusAllocated, + "leased": ResourceStatusLeased, + "notready": ResourceStatusNotReady, + "pendingreimage": ResourceStatusPendingReimage, + "pendingreturn": ResourceStatusPendingReturn, + "provisioning": ResourceStatusProvisioning, + "ready": ResourceStatusReady, + "reimaging": ResourceStatusReimaging, + "returned": ResourceStatusReturned, + "starting": ResourceStatusStarting, + "updating": ResourceStatusUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceStatus(input) + return &out, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool.go new file mode 100644 index 00000000000..9126fa306cd --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool.go @@ -0,0 +1,130 @@ +package resourcedetails + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PoolId{}) +} + +var _ resourceids.ResourceId = &PoolId{} + +// PoolId is a struct representing the Resource ID for a Pool +type PoolId struct { + SubscriptionId string + ResourceGroupName string + PoolName string +} + +// NewPoolID returns a new PoolId struct +func NewPoolID(subscriptionId string, resourceGroupName string, poolName string) PoolId { + return PoolId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + PoolName: poolName, + } +} + +// ParsePoolID parses 'input' into a PoolId +func ParsePoolID(input string) (*PoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&PoolId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PoolId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePoolIDInsensitively parses 'input' case-insensitively into a PoolId +// note: this method should only be used for API response data and not user input +func ParsePoolIDInsensitively(input string) (*PoolId, error) { + parser := resourceids.NewParserFromResourceIdType(&PoolId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PoolId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PoolId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.PoolName, ok = input.Parsed["poolName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "poolName", input) + } + + return nil +} + +// ValidatePoolID checks that 'input' can be parsed as a Pool ID +func ValidatePoolID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePoolID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Pool ID +func (id PoolId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DevOpsInfrastructure/pools/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PoolName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Pool ID +func (id PoolId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"), + resourceids.StaticSegment("staticPools", "pools", "pools"), + resourceids.UserSpecifiedSegment("poolName", "poolValue"), + } +} + +// String returns a human-readable description of this Pool ID +func (id PoolId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Pool Name: %q", id.PoolName), + } + return fmt.Sprintf("Pool (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool_test.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool_test.go new file mode 100644 index 00000000000..eca5af1603b --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/id_pool_test.go @@ -0,0 +1,282 @@ +package resourcedetails + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PoolId{} + +func TestNewPoolID(t *testing.T) { + id := NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.PoolName != "poolValue" { + t.Fatalf("Expected %q but got %q for Segment 'PoolName'", id.PoolName, "poolValue") + } +} + +func TestFormatPoolID(t *testing.T) { + actual := NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "poolValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParsePoolID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PoolId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + PoolName: "poolValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePoolID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.PoolName != v.Expected.PoolName { + t.Fatalf("Expected %q but got %q for PoolName", v.Expected.PoolName, actual.PoolName) + } + + } +} + +func TestParsePoolIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PoolId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + PoolName: "poolValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/poolValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs/pOoLvAlUe", + Expected: &PoolId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + PoolName: "pOoLvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/pOoLs/pOoLvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePoolIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.PoolName != v.Expected.PoolName { + t.Fatalf("Expected %q but got %q for PoolName", v.Expected.PoolName, actual.PoolName) + } + + } +} + +func TestSegmentsForPoolId(t *testing.T) { + segments := PoolId{}.Segments() + if len(segments) == 0 { + t.Fatalf("PoolId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/method_listbypool.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/method_listbypool.go new file mode 100644 index 00000000000..6330001e75f --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/method_listbypool.go @@ -0,0 +1,105 @@ +package resourcedetails + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByPoolOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ResourceDetailsObject +} + +type ListByPoolCompleteResult struct { + LatestHttpResponse *http.Response + Items []ResourceDetailsObject +} + +type ListByPoolCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByPoolCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByPool ... +func (c ResourceDetailsClient) ListByPool(ctx context.Context, id PoolId) (result ListByPoolOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByPoolCustomPager{}, + Path: fmt.Sprintf("%s/resources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ResourceDetailsObject `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByPoolComplete retrieves all the results into a single object +func (c ResourceDetailsClient) ListByPoolComplete(ctx context.Context, id PoolId) (ListByPoolCompleteResult, error) { + return c.ListByPoolCompleteMatchingPredicate(ctx, id, ResourceDetailsObjectOperationPredicate{}) +} + +// ListByPoolCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ResourceDetailsClient) ListByPoolCompleteMatchingPredicate(ctx context.Context, id PoolId, predicate ResourceDetailsObjectOperationPredicate) (result ListByPoolCompleteResult, err error) { + items := make([]ResourceDetailsObject, 0) + + resp, err := c.ListByPool(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByPoolCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobject.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobject.go new file mode 100644 index 00000000000..4427ce65ddc --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobject.go @@ -0,0 +1,16 @@ +package resourcedetails + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceDetailsObject struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ResourceDetailsObjectProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobjectproperties.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobjectproperties.go new file mode 100644 index 00000000000..2656eb02a73 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/model_resourcedetailsobjectproperties.go @@ -0,0 +1,10 @@ +package resourcedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceDetailsObjectProperties struct { + Image string `json:"image"` + ImageVersion string `json:"imageVersion"` + Status ResourceStatus `json:"status"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/predicates.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/predicates.go new file mode 100644 index 00000000000..cf92e73a78d --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/predicates.go @@ -0,0 +1,27 @@ +package resourcedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceDetailsObjectOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ResourceDetailsObjectOperationPredicate) Matches(input ResourceDetailsObject) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/version.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/version.go new file mode 100644 index 00000000000..f571f5538b4 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/resourcedetails/version.go @@ -0,0 +1,10 @@ +package resourcedetails + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-04-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/resourcedetails/2024-04-04-preview" +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/README.md b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/README.md new file mode 100644 index 00000000000..d2dce13e943 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/sku` Documentation + +The `sku` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2024-04-04-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/sku" +``` + + +### Client Initialization + +```go +client := sku.NewSkuClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SkuClient.ListByLocation` + +```go +ctx := context.TODO() +id := sku.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination +items, err := client.ListByLocationComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/client.go new file mode 100644 index 00000000000..136c3fb0285 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/client.go @@ -0,0 +1,26 @@ +package sku + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuClient struct { + Client *resourcemanager.Client +} + +func NewSkuClientWithBaseURI(sdkApi sdkEnv.Api) (*SkuClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "sku", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SkuClient: %+v", err) + } + + return &SkuClient{ + Client: client, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/constants.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/constants.go new file mode 100644 index 00000000000..5bc093139f5 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/constants.go @@ -0,0 +1,92 @@ +package sku + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuRestrictionsReasonCode string + +const ( + ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" + ResourceSkuRestrictionsReasonCodeQuotaId ResourceSkuRestrictionsReasonCode = "QuotaId" +) + +func PossibleValuesForResourceSkuRestrictionsReasonCode() []string { + return []string{ + string(ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription), + string(ResourceSkuRestrictionsReasonCodeQuotaId), + } +} + +func (s *ResourceSkuRestrictionsReasonCode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceSkuRestrictionsReasonCode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceSkuRestrictionsReasonCode(input string) (*ResourceSkuRestrictionsReasonCode, error) { + vals := map[string]ResourceSkuRestrictionsReasonCode{ + "notavailableforsubscription": ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription, + "quotaid": ResourceSkuRestrictionsReasonCodeQuotaId, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceSkuRestrictionsReasonCode(input) + return &out, nil +} + +type ResourceSkuRestrictionsType string + +const ( + ResourceSkuRestrictionsTypeLocation ResourceSkuRestrictionsType = "Location" + ResourceSkuRestrictionsTypeZone ResourceSkuRestrictionsType = "Zone" +) + +func PossibleValuesForResourceSkuRestrictionsType() []string { + return []string{ + string(ResourceSkuRestrictionsTypeLocation), + string(ResourceSkuRestrictionsTypeZone), + } +} + +func (s *ResourceSkuRestrictionsType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceSkuRestrictionsType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceSkuRestrictionsType(input string) (*ResourceSkuRestrictionsType, error) { + vals := map[string]ResourceSkuRestrictionsType{ + "location": ResourceSkuRestrictionsTypeLocation, + "zone": ResourceSkuRestrictionsTypeZone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceSkuRestrictionsType(input) + return &out, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location.go new file mode 100644 index 00000000000..3f770d53d94 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location.go @@ -0,0 +1,121 @@ +package sku + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&LocationId{}) +} + +var _ resourceids.ResourceId = &LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.DevOpsInfrastructure/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location_test.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location_test.go new file mode 100644 index 00000000000..7e8201d994f --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/id_location_test.go @@ -0,0 +1,237 @@ +package sku + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &LocationId{} + +func TestNewLocationID(t *testing.T) { + id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.LocationName != "locationValue" { + t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") + } +} + +func TestFormatLocationID(t *testing.T) { + actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseLocationID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestParseLocationIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs/lOcAtIoNvAlUe", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "lOcAtIoNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs/lOcAtIoNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestSegmentsForLocationId(t *testing.T) { + segments := LocationId{}.Segments() + if len(segments) == 0 { + t.Fatalf("LocationId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/method_listbylocation.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/method_listbylocation.go new file mode 100644 index 00000000000..734beee7e1e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/method_listbylocation.go @@ -0,0 +1,105 @@ +package sku + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByLocationOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ResourceSku +} + +type ListByLocationCompleteResult struct { + LatestHttpResponse *http.Response + Items []ResourceSku +} + +type ListByLocationCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByLocationCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByLocation ... +func (c SkuClient) ListByLocation(ctx context.Context, id LocationId) (result ListByLocationOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByLocationCustomPager{}, + Path: fmt.Sprintf("%s/skus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ResourceSku `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByLocationComplete retrieves all the results into a single object +func (c SkuClient) ListByLocationComplete(ctx context.Context, id LocationId) (ListByLocationCompleteResult, error) { + return c.ListByLocationCompleteMatchingPredicate(ctx, id, ResourceSkuOperationPredicate{}) +} + +// ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SkuClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ResourceSkuOperationPredicate) (result ListByLocationCompleteResult, err error) { + items := make([]ResourceSku, 0) + + resp, err := c.ListByLocation(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByLocationCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourcesku.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourcesku.go new file mode 100644 index 00000000000..76971520808 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourcesku.go @@ -0,0 +1,16 @@ +package sku + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSku struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ResourceSkuProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskucapabilities.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskucapabilities.go new file mode 100644 index 00000000000..30b04f49dba --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskucapabilities.go @@ -0,0 +1,9 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuCapabilities struct { + Name string `json:"name"` + Value string `json:"value"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskulocationinfo.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskulocationinfo.go new file mode 100644 index 00000000000..dd758ed458c --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskulocationinfo.go @@ -0,0 +1,14 @@ +package sku + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuLocationInfo struct { + Location string `json:"location"` + ZoneDetails []ResourceSkuZoneDetails `json:"zoneDetails"` + Zones zones.Schema `json:"zones"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuproperties.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuproperties.go new file mode 100644 index 00000000000..c53adbca99e --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuproperties.go @@ -0,0 +1,15 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuProperties struct { + Capabilities []ResourceSkuCapabilities `json:"capabilities"` + Family string `json:"family"` + LocationInfo []ResourceSkuLocationInfo `json:"locationInfo"` + Locations []string `json:"locations"` + ResourceType string `json:"resourceType"` + Restrictions []ResourceSkuRestrictions `json:"restrictions"` + Size string `json:"size"` + Tier string `json:"tier"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictioninfo.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictioninfo.go new file mode 100644 index 00000000000..de21b17c69a --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictioninfo.go @@ -0,0 +1,13 @@ +package sku + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuRestrictionInfo struct { + Locations *[]string `json:"locations,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictions.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictions.go new file mode 100644 index 00000000000..0362a669791 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskurestrictions.go @@ -0,0 +1,11 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuRestrictions struct { + ReasonCode *ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` + RestrictionInfo ResourceSkuRestrictionInfo `json:"restrictionInfo"` + Type *ResourceSkuRestrictionsType `json:"type,omitempty"` + Values []string `json:"values"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuzonedetails.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuzonedetails.go new file mode 100644 index 00000000000..11e98a5c961 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/model_resourceskuzonedetails.go @@ -0,0 +1,9 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuZoneDetails struct { + Capabilities []ResourceSkuCapabilities `json:"capabilities"` + Name []string `json:"name"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/predicates.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/predicates.go new file mode 100644 index 00000000000..a92bcf28a13 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/predicates.go @@ -0,0 +1,27 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResourceSkuOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ResourceSkuOperationPredicate) Matches(input ResourceSku) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/version.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/version.go new file mode 100644 index 00000000000..02bfdcb6733 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/sku/version.go @@ -0,0 +1,10 @@ +package sku + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-04-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/sku/2024-04-04-preview" +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/README.md b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/README.md new file mode 100644 index 00000000000..c15282dbcd6 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages` Documentation + +The `subscriptionusages` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2024-04-04-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages" +``` + + +### Client Initialization + +```go +client := subscriptionusages.NewSubscriptionUsagesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `SubscriptionUsagesClient.Usages` + +```go +ctx := context.TODO() +id := subscriptionusages.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +// alternatively `client.Usages(ctx, id)` can be used to do batched pagination +items, err := client.UsagesComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/client.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/client.go new file mode 100644 index 00000000000..5829a9a22b0 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/client.go @@ -0,0 +1,26 @@ +package subscriptionusages + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SubscriptionUsagesClient struct { + Client *resourcemanager.Client +} + +func NewSubscriptionUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionUsagesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "subscriptionusages", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating SubscriptionUsagesClient: %+v", err) + } + + return &SubscriptionUsagesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location.go new file mode 100644 index 00000000000..e5a61f315ee --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location.go @@ -0,0 +1,121 @@ +package subscriptionusages + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&LocationId{}) +} + +var _ resourceids.ResourceId = &LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.DevOpsInfrastructure/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location_test.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location_test.go new file mode 100644 index 00000000000..55457addc50 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/id_location_test.go @@ -0,0 +1,237 @@ +package subscriptionusages + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &LocationId{} + +func TestNewLocationID(t *testing.T) { + id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.LocationName != "locationValue" { + t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") + } +} + +func TestFormatLocationID(t *testing.T) { + actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseLocationID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestParseLocationIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DevOpsInfrastructure/locations/locationValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs/lOcAtIoNvAlUe", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "lOcAtIoNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dEvOpSiNfRaStRuCtUrE/lOcAtIoNs/lOcAtIoNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestSegmentsForLocationId(t *testing.T) { + segments := LocationId{}.Segments() + if len(segments) == 0 { + t.Fatalf("LocationId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/method_usages.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/method_usages.go new file mode 100644 index 00000000000..7e702bf4cc9 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/method_usages.go @@ -0,0 +1,105 @@ +package subscriptionusages + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UsagesOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Quota +} + +type UsagesCompleteResult struct { + LatestHttpResponse *http.Response + Items []Quota +} + +type UsagesCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *UsagesCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// Usages ... +func (c SubscriptionUsagesClient) Usages(ctx context.Context, id LocationId) (result UsagesOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &UsagesCustomPager{}, + Path: fmt.Sprintf("%s/usages", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Quota `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// UsagesComplete retrieves all the results into a single object +func (c SubscriptionUsagesClient) UsagesComplete(ctx context.Context, id LocationId) (UsagesCompleteResult, error) { + return c.UsagesCompleteMatchingPredicate(ctx, id, QuotaOperationPredicate{}) +} + +// UsagesCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c SubscriptionUsagesClient) UsagesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate QuotaOperationPredicate) (result UsagesCompleteResult, err error) { + items := make([]Quota, 0) + + resp, err := c.Usages(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = UsagesCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quota.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quota.go new file mode 100644 index 00000000000..e0574a3af69 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quota.go @@ -0,0 +1,12 @@ +package subscriptionusages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Quota struct { + CurrentValue int64 `json:"currentValue"` + Id string `json:"id"` + Limit int64 `json:"limit"` + Name *QuotaName `json:"name,omitempty"` + Unit string `json:"unit"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quotaname.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quotaname.go new file mode 100644 index 00000000000..f19eeab6cdc --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/model_quotaname.go @@ -0,0 +1,9 @@ +package subscriptionusages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QuotaName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/predicates.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/predicates.go new file mode 100644 index 00000000000..6f1a4a19081 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/predicates.go @@ -0,0 +1,32 @@ +package subscriptionusages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QuotaOperationPredicate struct { + CurrentValue *int64 + Id *string + Limit *int64 + Unit *string +} + +func (p QuotaOperationPredicate) Matches(input Quota) bool { + + if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { + return false + } + + if p.Id != nil && *p.Id != input.Id { + return false + } + + if p.Limit != nil && *p.Limit != input.Limit { + return false + } + + if p.Unit != nil && *p.Unit != input.Unit { + return false + } + + return true +} diff --git a/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/version.go b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/version.go new file mode 100644 index 00000000000..154e84c6df1 --- /dev/null +++ b/resource-manager/devopsinfrastructure/2024-04-04-preview/subscriptionusages/version.go @@ -0,0 +1,10 @@ +package subscriptionusages + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-04-04-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/subscriptionusages/2024-04-04-preview" +} diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/README.md b/resource-manager/devtestlab/2018-09-15/armtemplates/README.md index e6bde5f1f96..1f8a1aa269a 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/README.md +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/armtemplates` Documentation -The `armtemplates` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `armtemplates` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/client.go b/resource-manager/devtestlab/2018-09-15/armtemplates/client.go index db52388e3bb..96729d7db44 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/client.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/client.go @@ -15,7 +15,7 @@ type ArmTemplatesClient struct { } func NewArmTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArmTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "armtemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "armtemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArmTemplatesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/id_armtemplate.go b/resource-manager/devtestlab/2018-09-15/armtemplates/id_armtemplate.go index cd3a37ef8b0..01a907fa8fb 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/id_armtemplate.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/id_armtemplate.go @@ -46,7 +46,7 @@ func ParseArmTemplateID(input string) (*ArmTemplateId, error) { } id := ArmTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArmTemplateIDInsensitively(input string) (*ArmTemplateId, error) { } id := ArmTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/id_artifactsource.go b/resource-manager/devtestlab/2018-09-15/armtemplates/id_artifactsource.go index cfe9e05acce..9915537d1d3 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/id_artifactsource.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/id_artifactsource.go @@ -44,7 +44,7 @@ func ParseArtifactSourceID(input string) (*ArtifactSourceId, error) { } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseArtifactSourceIDInsensitively(input string) (*ArtifactSourceId, error) } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/method_get.go b/resource-manager/devtestlab/2018-09-15/armtemplates/method_get.go index 106d20f140b..afb7ffe936b 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ArmTemplatesClient) Get(ctx context.Context, id ArmTemplateId, options G var model ArmTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/method_list.go b/resource-manager/devtestlab/2018-09-15/armtemplates/method_list.go index 91ff22c62dd..a7d9cb87b63 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/armtemplates/version.go b/resource-manager/devtestlab/2018-09-15/armtemplates/version.go index e2a5296732c..c743c4c9240 100644 --- a/resource-manager/devtestlab/2018-09-15/armtemplates/version.go +++ b/resource-manager/devtestlab/2018-09-15/armtemplates/version.go @@ -1,12 +1,10 @@ package armtemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/armtemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/armtemplates/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/README.md b/resource-manager/devtestlab/2018-09-15/artifacts/README.md index a6531e4d32d..dcdf0cd8be3 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/README.md +++ b/resource-manager/devtestlab/2018-09-15/artifacts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/artifacts` Documentation -The `artifacts` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `artifacts` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/client.go b/resource-manager/devtestlab/2018-09-15/artifacts/client.go index 5a9c8e4d1a8..ba848c75fe8 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/client.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/client.go @@ -15,7 +15,7 @@ type ArtifactsClient struct { } func NewArtifactsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArtifactsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "artifacts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "artifacts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArtifactsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/id_artifact.go b/resource-manager/devtestlab/2018-09-15/artifacts/id_artifact.go index f2ed30dc256..7e21ec69483 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/id_artifact.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/id_artifact.go @@ -46,7 +46,7 @@ func ParseArtifactID(input string) (*ArtifactId, error) { } id := ArtifactId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArtifactIDInsensitively(input string) (*ArtifactId, error) { } id := ArtifactId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/id_artifactsource.go b/resource-manager/devtestlab/2018-09-15/artifacts/id_artifactsource.go index 4b819341f79..46ed8a1824b 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/id_artifactsource.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/id_artifactsource.go @@ -44,7 +44,7 @@ func ParseArtifactSourceID(input string) (*ArtifactSourceId, error) { } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseArtifactSourceIDInsensitively(input string) (*ArtifactSourceId, error) } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/method_generatearmtemplate.go b/resource-manager/devtestlab/2018-09-15/artifacts/method_generatearmtemplate.go index 7c7af9d0a78..9cdfcbef2c5 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/method_generatearmtemplate.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/method_generatearmtemplate.go @@ -50,7 +50,6 @@ func (c ArtifactsClient) GenerateArmTemplate(ctx context.Context, id ArtifactId, var model ArmTemplateInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/method_get.go b/resource-manager/devtestlab/2018-09-15/artifacts/method_get.go index 25bf90b0628..e67a0e7ccae 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ArtifactsClient) Get(ctx context.Context, id ArtifactId, options GetOper var model Artifact result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/method_list.go b/resource-manager/devtestlab/2018-09-15/artifacts/method_list.go index eb22833841f..24adf0e20f7 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/artifacts/version.go b/resource-manager/devtestlab/2018-09-15/artifacts/version.go index 24c5b1ba6c8..34ae2868057 100644 --- a/resource-manager/devtestlab/2018-09-15/artifacts/version.go +++ b/resource-manager/devtestlab/2018-09-15/artifacts/version.go @@ -1,12 +1,10 @@ package artifacts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/artifacts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/artifacts/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/README.md b/resource-manager/devtestlab/2018-09-15/artifactsources/README.md index 8c0a47d68f2..bba037b71ed 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/README.md +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/artifactsources` Documentation -The `artifactsources` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `artifactsources` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/client.go b/resource-manager/devtestlab/2018-09-15/artifactsources/client.go index dc1989cd4da..185e489e21a 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/client.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/client.go @@ -15,7 +15,7 @@ type ArtifactSourcesClient struct { } func NewArtifactSourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArtifactSourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "artifactsources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "artifactsources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ArtifactSourcesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/id_artifactsource.go b/resource-manager/devtestlab/2018-09-15/artifactsources/id_artifactsource.go index 85017d938c6..a71ccd4d34f 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/id_artifactsource.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/id_artifactsource.go @@ -44,7 +44,7 @@ func ParseArtifactSourceID(input string) (*ArtifactSourceId, error) { } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseArtifactSourceIDInsensitively(input string) (*ArtifactSourceId, error) } id := ArtifactSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/id_lab.go b/resource-manager/devtestlab/2018-09-15/artifactsources/id_lab.go index 61771848bc3..1501d456315 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/artifactsources/method_createorupdate.go index 3e6d31805e4..4fec56e3422 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ArtifactSourcesClient) CreateOrUpdate(ctx context.Context, id ArtifactSo var model ArtifactSource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/method_get.go b/resource-manager/devtestlab/2018-09-15/artifactsources/method_get.go index 4ead758f77a..7a23fcaac77 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ArtifactSourcesClient) Get(ctx context.Context, id ArtifactSourceId, opt var model ArtifactSource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/method_list.go b/resource-manager/devtestlab/2018-09-15/artifactsources/method_list.go index 9d808df950d..28732e234de 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/method_update.go b/resource-manager/devtestlab/2018-09-15/artifactsources/method_update.go index 089bd441bfb..209d6ed5d0e 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/method_update.go @@ -49,7 +49,6 @@ func (c ArtifactSourcesClient) Update(ctx context.Context, id ArtifactSourceId, var model ArtifactSource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/artifactsources/version.go b/resource-manager/devtestlab/2018-09-15/artifactsources/version.go index 9d05eadb9cf..acda8ce5a56 100644 --- a/resource-manager/devtestlab/2018-09-15/artifactsources/version.go +++ b/resource-manager/devtestlab/2018-09-15/artifactsources/version.go @@ -1,12 +1,10 @@ package artifactsources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/artifactsources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/artifactsources/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/costs/README.md b/resource-manager/devtestlab/2018-09-15/costs/README.md index 5bb431201da..498c3a518d4 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/README.md +++ b/resource-manager/devtestlab/2018-09-15/costs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/costs` Documentation -The `costs` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `costs` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/costs/client.go b/resource-manager/devtestlab/2018-09-15/costs/client.go index 03e8bc03059..651c820aaf0 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/client.go +++ b/resource-manager/devtestlab/2018-09-15/costs/client.go @@ -15,7 +15,7 @@ type CostsClient struct { } func NewCostsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "costs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "costs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CostsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/costs/id_cost.go b/resource-manager/devtestlab/2018-09-15/costs/id_cost.go index c36c7c9ca09..95a8eadd270 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/id_cost.go +++ b/resource-manager/devtestlab/2018-09-15/costs/id_cost.go @@ -44,7 +44,7 @@ func ParseCostID(input string) (*CostId, error) { } id := CostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCostIDInsensitively(input string) (*CostId, error) { } id := CostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/costs/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/costs/method_createorupdate.go index f4a8d8acba0..9fa7692e68f 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/costs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CostsClient) CreateOrUpdate(ctx context.Context, id CostId, input LabCos var model LabCost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/costs/method_get.go b/resource-manager/devtestlab/2018-09-15/costs/method_get.go index e371bce1d99..40f2dd4a3ca 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/costs/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CostsClient) Get(ctx context.Context, id CostId, options GetOperationOpt var model LabCost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/costs/version.go b/resource-manager/devtestlab/2018-09-15/costs/version.go index 4c3713d50d0..528e5711bc7 100644 --- a/resource-manager/devtestlab/2018-09-15/costs/version.go +++ b/resource-manager/devtestlab/2018-09-15/costs/version.go @@ -1,12 +1,10 @@ package costs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/costs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/costs/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/README.md b/resource-manager/devtestlab/2018-09-15/customimages/README.md index fd5123f2e2a..cae0c9a26a7 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/README.md +++ b/resource-manager/devtestlab/2018-09-15/customimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/customimages` Documentation -The `customimages` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `customimages` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/customimages/client.go b/resource-manager/devtestlab/2018-09-15/customimages/client.go index 5712b2770ec..53753c9beac 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/client.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/client.go @@ -15,7 +15,7 @@ type CustomImagesClient struct { } func NewCustomImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomImagesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/id_customimage.go b/resource-manager/devtestlab/2018-09-15/customimages/id_customimage.go index 1eaa8c7c95f..3475473d29c 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/id_customimage.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/id_customimage.go @@ -44,7 +44,7 @@ func ParseCustomImageID(input string) (*CustomImageId, error) { } id := CustomImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomImageIDInsensitively(input string) (*CustomImageId, error) { } id := CustomImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/id_lab.go b/resource-manager/devtestlab/2018-09-15/customimages/id_lab.go index 038ecc9df92..dd74976b2af 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/method_get.go b/resource-manager/devtestlab/2018-09-15/customimages/method_get.go index 0d99663abbd..5c90538b08e 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomImagesClient) Get(ctx context.Context, id CustomImageId, options G var model CustomImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/method_list.go b/resource-manager/devtestlab/2018-09-15/customimages/method_list.go index 1f639eae894..bcc19004cfe 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/method_update.go b/resource-manager/devtestlab/2018-09-15/customimages/method_update.go index c9ce7140a78..caf6c8f1d51 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/method_update.go @@ -49,7 +49,6 @@ func (c CustomImagesClient) Update(ctx context.Context, id CustomImageId, input var model CustomImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/customimages/version.go b/resource-manager/devtestlab/2018-09-15/customimages/version.go index 29f0abe40af..ef8b0081fa9 100644 --- a/resource-manager/devtestlab/2018-09-15/customimages/version.go +++ b/resource-manager/devtestlab/2018-09-15/customimages/version.go @@ -1,12 +1,10 @@ package customimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customimages/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/disks/README.md b/resource-manager/devtestlab/2018-09-15/disks/README.md index a9dae61b77c..4fec697b2ce 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/README.md +++ b/resource-manager/devtestlab/2018-09-15/disks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/disks` Documentation -The `disks` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `disks` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/disks/client.go b/resource-manager/devtestlab/2018-09-15/disks/client.go index 16f70b8378d..e5accbb35a3 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/client.go +++ b/resource-manager/devtestlab/2018-09-15/disks/client.go @@ -15,7 +15,7 @@ type DisksClient struct { } func NewDisksClientWithBaseURI(sdkApi sdkEnv.Api) (*DisksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisksClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/disks/id_disk.go b/resource-manager/devtestlab/2018-09-15/disks/id_disk.go index b7d39fc9e49..e0e78bafa49 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/id_disk.go +++ b/resource-manager/devtestlab/2018-09-15/disks/id_disk.go @@ -46,7 +46,7 @@ func ParseDiskID(input string) (*DiskId, error) { } id := DiskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiskIDInsensitively(input string) (*DiskId, error) { } id := DiskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/disks/id_user.go b/resource-manager/devtestlab/2018-09-15/disks/id_user.go index 38a727abe9c..9596cd88b7b 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/id_user.go +++ b/resource-manager/devtestlab/2018-09-15/disks/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/disks/method_get.go b/resource-manager/devtestlab/2018-09-15/disks/method_get.go index 420e962d537..2a8b23c3bbf 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/disks/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DisksClient) Get(ctx context.Context, id DiskId, options GetOperationOpt var model Disk result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/disks/method_list.go b/resource-manager/devtestlab/2018-09-15/disks/method_list.go index 7b41c2bc3a5..115255e9ca8 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/disks/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/disks/method_update.go b/resource-manager/devtestlab/2018-09-15/disks/method_update.go index 76dbc699469..3610174b292 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/disks/method_update.go @@ -49,7 +49,6 @@ func (c DisksClient) Update(ctx context.Context, id DiskId, input UpdateResource var model Disk result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/disks/version.go b/resource-manager/devtestlab/2018-09-15/disks/version.go index 0bf2bcfb07f..9bf83e9db48 100644 --- a/resource-manager/devtestlab/2018-09-15/disks/version.go +++ b/resource-manager/devtestlab/2018-09-15/disks/version.go @@ -1,12 +1,10 @@ package disks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disks/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/environments/README.md b/resource-manager/devtestlab/2018-09-15/environments/README.md index f9acbcf064f..1b49c6f39fc 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/README.md +++ b/resource-manager/devtestlab/2018-09-15/environments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/environments` Documentation -The `environments` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `environments` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/environments/client.go b/resource-manager/devtestlab/2018-09-15/environments/client.go index 89a5b84aa90..eafef1a1e95 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/client.go +++ b/resource-manager/devtestlab/2018-09-15/environments/client.go @@ -15,7 +15,7 @@ type EnvironmentsClient struct { } func NewEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/environments/id_environment.go b/resource-manager/devtestlab/2018-09-15/environments/id_environment.go index c8e3b23d916..61111b164f1 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/id_environment.go +++ b/resource-manager/devtestlab/2018-09-15/environments/id_environment.go @@ -46,7 +46,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/environments/id_user.go b/resource-manager/devtestlab/2018-09-15/environments/id_user.go index 324d5dfc859..2d92588a338 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/id_user.go +++ b/resource-manager/devtestlab/2018-09-15/environments/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/environments/method_get.go b/resource-manager/devtestlab/2018-09-15/environments/method_get.go index bbe7988eaab..ded1ae849f6 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/environments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId, options G var model DtlEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/environments/method_list.go b/resource-manager/devtestlab/2018-09-15/environments/method_list.go index 6e9c7510d14..2e9294306ad 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/environments/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/environments/method_update.go b/resource-manager/devtestlab/2018-09-15/environments/method_update.go index 63a6fd27c1e..9cc9d7044ab 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/environments/method_update.go @@ -49,7 +49,6 @@ func (c EnvironmentsClient) Update(ctx context.Context, id EnvironmentId, input var model DtlEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/environments/version.go b/resource-manager/devtestlab/2018-09-15/environments/version.go index 8300593555e..010842ea11e 100644 --- a/resource-manager/devtestlab/2018-09-15/environments/version.go +++ b/resource-manager/devtestlab/2018-09-15/environments/version.go @@ -1,12 +1,10 @@ package environments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environments/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/README.md b/resource-manager/devtestlab/2018-09-15/formulas/README.md index c78f2e45d88..729c427fc8f 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/README.md +++ b/resource-manager/devtestlab/2018-09-15/formulas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/formulas` Documentation -The `formulas` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `formulas` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/formulas/client.go b/resource-manager/devtestlab/2018-09-15/formulas/client.go index ff0ee8deec7..36c70445cb6 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/client.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/client.go @@ -15,7 +15,7 @@ type FormulasClient struct { } func NewFormulasClientWithBaseURI(sdkApi sdkEnv.Api) (*FormulasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "formulas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "formulas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FormulasClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/id_formula.go b/resource-manager/devtestlab/2018-09-15/formulas/id_formula.go index 4482a0e2eb2..7c715e59605 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/id_formula.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/id_formula.go @@ -44,7 +44,7 @@ func ParseFormulaID(input string) (*FormulaId, error) { } id := FormulaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFormulaIDInsensitively(input string) (*FormulaId, error) { } id := FormulaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/id_lab.go b/resource-manager/devtestlab/2018-09-15/formulas/id_lab.go index 32f7a43358e..3fd00ff37dc 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/method_get.go b/resource-manager/devtestlab/2018-09-15/formulas/method_get.go index da49b3a4587..6df094a1e1d 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FormulasClient) Get(ctx context.Context, id FormulaId, options GetOperat var model Formula result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/method_list.go b/resource-manager/devtestlab/2018-09-15/formulas/method_list.go index a513dcb0bdd..58034a66b3d 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/method_update.go b/resource-manager/devtestlab/2018-09-15/formulas/method_update.go index 551f3f7cf19..1dc193c989c 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/method_update.go @@ -49,7 +49,6 @@ func (c FormulasClient) Update(ctx context.Context, id FormulaId, input UpdateRe var model Formula result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/formulas/version.go b/resource-manager/devtestlab/2018-09-15/formulas/version.go index 9bf491ee735..3c799f04e14 100644 --- a/resource-manager/devtestlab/2018-09-15/formulas/version.go +++ b/resource-manager/devtestlab/2018-09-15/formulas/version.go @@ -1,12 +1,10 @@ package formulas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/formulas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/formulas/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/galleryimages/README.md b/resource-manager/devtestlab/2018-09-15/galleryimages/README.md index 572de34bb07..786604004e1 100644 --- a/resource-manager/devtestlab/2018-09-15/galleryimages/README.md +++ b/resource-manager/devtestlab/2018-09-15/galleryimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/galleryimages` Documentation -The `galleryimages` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `galleryimages` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/galleryimages/client.go b/resource-manager/devtestlab/2018-09-15/galleryimages/client.go index 59b9c848dbd..cebddc1c307 100644 --- a/resource-manager/devtestlab/2018-09-15/galleryimages/client.go +++ b/resource-manager/devtestlab/2018-09-15/galleryimages/client.go @@ -15,7 +15,7 @@ type GalleryImagesClient struct { } func NewGalleryImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleryImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "galleryimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "galleryimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GalleryImagesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/galleryimages/id_lab.go b/resource-manager/devtestlab/2018-09-15/galleryimages/id_lab.go index 1d879c18922..981fec7673d 100644 --- a/resource-manager/devtestlab/2018-09-15/galleryimages/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/galleryimages/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/galleryimages/method_list.go b/resource-manager/devtestlab/2018-09-15/galleryimages/method_list.go index 4749e31b459..175dbbe8b99 100644 --- a/resource-manager/devtestlab/2018-09-15/galleryimages/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/galleryimages/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/galleryimages/version.go b/resource-manager/devtestlab/2018-09-15/galleryimages/version.go index 36dafe0b06d..951f846e77f 100644 --- a/resource-manager/devtestlab/2018-09-15/galleryimages/version.go +++ b/resource-manager/devtestlab/2018-09-15/galleryimages/version.go @@ -1,12 +1,10 @@ package galleryimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/galleryimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/galleryimages/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/README.md b/resource-manager/devtestlab/2018-09-15/globalschedules/README.md index 412a02f7d5b..5f896bb81ec 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/README.md +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/globalschedules` Documentation -The `globalschedules` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `globalschedules` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/client.go b/resource-manager/devtestlab/2018-09-15/globalschedules/client.go index 5a4f8bada2e..91976e98a7c 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/client.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/client.go @@ -15,7 +15,7 @@ type GlobalSchedulesClient struct { } func NewGlobalSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalSchedulesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go b/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go index e0d1c7ef74b..66c6ce63f85 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/id_schedule.go @@ -42,7 +42,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/globalschedules/method_createorupdate.go index edc63b43c83..7b1cf1c2e26 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GlobalSchedulesClient) CreateOrUpdate(ctx context.Context, id ScheduleId var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/method_get.go b/resource-manager/devtestlab/2018-09-15/globalschedules/method_get.go index 5a5441a7dcd..8b52a958461 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c GlobalSchedulesClient) Get(ctx context.Context, id ScheduleId, options G var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbyresourcegroup.go b/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbyresourcegroup.go index 260f09a35fe..f190657b726 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbyresourcegroup.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbyresourcegroup.go @@ -43,6 +43,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbysubscription.go b/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbysubscription.go index 710adf67e22..8a3d80c03ad 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbysubscription.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/method_listbysubscription.go @@ -43,6 +43,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/method_update.go b/resource-manager/devtestlab/2018-09-15/globalschedules/method_update.go index 9f1371b156d..090c8120625 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/method_update.go @@ -49,7 +49,6 @@ func (c GlobalSchedulesClient) Update(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/globalschedules/version.go b/resource-manager/devtestlab/2018-09-15/globalschedules/version.go index 23c34b84f6e..df8aeadf7a5 100644 --- a/resource-manager/devtestlab/2018-09-15/globalschedules/version.go +++ b/resource-manager/devtestlab/2018-09-15/globalschedules/version.go @@ -1,12 +1,10 @@ package globalschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalschedules/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/labs/README.md b/resource-manager/devtestlab/2018-09-15/labs/README.md index 99c9de4594c..bffa0b5eadc 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/README.md +++ b/resource-manager/devtestlab/2018-09-15/labs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/labs` Documentation -The `labs` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `labs` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/labs/client.go b/resource-manager/devtestlab/2018-09-15/labs/client.go index b22489088f4..0b9316a6aae 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/client.go +++ b/resource-manager/devtestlab/2018-09-15/labs/client.go @@ -15,7 +15,7 @@ type LabsClient struct { } func NewLabsClientWithBaseURI(sdkApi sdkEnv.Api) (*LabsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "labs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "labs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LabsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/labs/id_lab.go b/resource-manager/devtestlab/2018-09-15/labs/id_lab.go index d77f1f31758..038a70eab3a 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/labs/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_generateuploaduri.go b/resource-manager/devtestlab/2018-09-15/labs/method_generateuploaduri.go index 8621611bc1f..ef5c038055b 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_generateuploaduri.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_generateuploaduri.go @@ -50,7 +50,6 @@ func (c LabsClient) GenerateUploadUri(ctx context.Context, id LabId, input Gener var model GenerateUploadUriResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_get.go b/resource-manager/devtestlab/2018-09-15/labs/method_get.go index 894d9288302..5d98d8bf7d0 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LabsClient) Get(ctx context.Context, id LabId, options GetOperationOptio var model Lab result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_listbyresourcegroup.go b/resource-manager/devtestlab/2018-09-15/labs/method_listbyresourcegroup.go index 1d7a75cd0ce..86a519ae639 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_listbyresourcegroup.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_listbyresourcegroup.go @@ -43,6 +43,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_listbysubscription.go b/resource-manager/devtestlab/2018-09-15/labs/method_listbysubscription.go index 2eef6907401..56c942ef824 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_listbysubscription.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_listbysubscription.go @@ -43,6 +43,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/labs/method_update.go b/resource-manager/devtestlab/2018-09-15/labs/method_update.go index 19ca6b89b14..b2093fce9d0 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/labs/method_update.go @@ -49,7 +49,6 @@ func (c LabsClient) Update(ctx context.Context, id LabId, input UpdateResource) var model Lab result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/labs/version.go b/resource-manager/devtestlab/2018-09-15/labs/version.go index 1b30b0db761..4100e533311 100644 --- a/resource-manager/devtestlab/2018-09-15/labs/version.go +++ b/resource-manager/devtestlab/2018-09-15/labs/version.go @@ -1,12 +1,10 @@ package labs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/labs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/labs/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/README.md b/resource-manager/devtestlab/2018-09-15/notificationchannels/README.md index 89dec7db0b9..8599b3931e4 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/README.md +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/notificationchannels` Documentation -The `notificationchannels` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `notificationchannels` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/client.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/client.go index 9f2076bbf33..ef1cc18e649 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/client.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/client.go @@ -15,7 +15,7 @@ type NotificationChannelsClient struct { } func NewNotificationChannelsClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationChannelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationchannels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationchannels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationChannelsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/id_lab.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/id_lab.go index 068aae42a91..06af58ed5cd 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/id_notificationchannel.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/id_notificationchannel.go index 2245d06a2ab..40a74637826 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/id_notificationchannel.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/id_notificationchannel.go @@ -44,7 +44,7 @@ func ParseNotificationChannelID(input string) (*NotificationChannelId, error) { } id := NotificationChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationChannelIDInsensitively(input string) (*NotificationChannel } id := NotificationChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_createorupdate.go index 42886f07f83..7590d994731 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NotificationChannelsClient) CreateOrUpdate(ctx context.Context, id Notif var model NotificationChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_get.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_get.go index f3fbb9871a4..89eb678804a 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NotificationChannelsClient) Get(ctx context.Context, id NotificationChan var model NotificationChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_list.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_list.go index 996e68c9514..467e2a81070 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_update.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_update.go index dc7764edec2..eff66693fb0 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/method_update.go @@ -49,7 +49,6 @@ func (c NotificationChannelsClient) Update(ctx context.Context, id NotificationC var model NotificationChannel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/notificationchannels/version.go b/resource-manager/devtestlab/2018-09-15/notificationchannels/version.go index b48ac4512f8..6b3c6a82350 100644 --- a/resource-manager/devtestlab/2018-09-15/notificationchannels/version.go +++ b/resource-manager/devtestlab/2018-09-15/notificationchannels/version.go @@ -1,12 +1,10 @@ package notificationchannels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationchannels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationchannels/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/operations/README.md b/resource-manager/devtestlab/2018-09-15/operations/README.md index 7552514585d..097a92398e3 100644 --- a/resource-manager/devtestlab/2018-09-15/operations/README.md +++ b/resource-manager/devtestlab/2018-09-15/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `operations` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/operations/client.go b/resource-manager/devtestlab/2018-09-15/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/devtestlab/2018-09-15/operations/client.go +++ b/resource-manager/devtestlab/2018-09-15/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/operations/id_operation.go b/resource-manager/devtestlab/2018-09-15/operations/id_operation.go index 0836956828d..ef9167551d7 100644 --- a/resource-manager/devtestlab/2018-09-15/operations/id_operation.go +++ b/resource-manager/devtestlab/2018-09-15/operations/id_operation.go @@ -42,7 +42,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/operations/method_get.go b/resource-manager/devtestlab/2018-09-15/operations/method_get.go index ab6fc7b5686..bdb4354d624 100644 --- a/resource-manager/devtestlab/2018-09-15/operations/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/operations/method_get.go @@ -46,7 +46,6 @@ func (c OperationsClient) Get(ctx context.Context, id OperationId) (result GetOp var model OperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/operations/version.go b/resource-manager/devtestlab/2018-09-15/operations/version.go index 9ab363f5353..b3c243a1400 100644 --- a/resource-manager/devtestlab/2018-09-15/operations/version.go +++ b/resource-manager/devtestlab/2018-09-15/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/policies/README.md b/resource-manager/devtestlab/2018-09-15/policies/README.md index d773bfb76ab..d9325e5ff7d 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/README.md +++ b/resource-manager/devtestlab/2018-09-15/policies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policies` Documentation -The `policies` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `policies` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/policies/client.go b/resource-manager/devtestlab/2018-09-15/policies/client.go index 76d2cca9fb6..aa2cda46eb2 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/client.go +++ b/resource-manager/devtestlab/2018-09-15/policies/client.go @@ -15,7 +15,7 @@ type PoliciesClient struct { } func NewPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoliciesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/policies/id_policy.go b/resource-manager/devtestlab/2018-09-15/policies/id_policy.go index 648284b8ec5..b4d63ca86a9 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/id_policy.go +++ b/resource-manager/devtestlab/2018-09-15/policies/id_policy.go @@ -46,7 +46,7 @@ func ParsePolicyID(input string) (*PolicyId, error) { } id := PolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePolicyIDInsensitively(input string) (*PolicyId, error) { } id := PolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go b/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go index 43d0657e3ca..217acd396f1 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go +++ b/resource-manager/devtestlab/2018-09-15/policies/id_policyset.go @@ -44,7 +44,7 @@ func ParsePolicySetID(input string) (*PolicySetId, error) { } id := PolicySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicySetIDInsensitively(input string) (*PolicySetId, error) { } id := PolicySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/policies/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/policies/method_createorupdate.go index 1f38a02871a..018276d6136 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/policies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PoliciesClient) CreateOrUpdate(ctx context.Context, id PolicyId, input P var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/policies/method_get.go b/resource-manager/devtestlab/2018-09-15/policies/method_get.go index ea46a7e0130..0dcafc8f36b 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/policies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PoliciesClient) Get(ctx context.Context, id PolicyId, options GetOperati var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/policies/method_list.go b/resource-manager/devtestlab/2018-09-15/policies/method_list.go index 789e43c7c74..c2b0a30d4e8 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/policies/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/policies/method_update.go b/resource-manager/devtestlab/2018-09-15/policies/method_update.go index 4b74aa21d45..2de0259d359 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/policies/method_update.go @@ -49,7 +49,6 @@ func (c PoliciesClient) Update(ctx context.Context, id PolicyId, input UpdateRes var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/policies/version.go b/resource-manager/devtestlab/2018-09-15/policies/version.go index 202eae23393..8dde4ade6ac 100644 --- a/resource-manager/devtestlab/2018-09-15/policies/version.go +++ b/resource-manager/devtestlab/2018-09-15/policies/version.go @@ -1,12 +1,10 @@ package policies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policies/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/policysets/README.md b/resource-manager/devtestlab/2018-09-15/policysets/README.md index 0adb2015f1c..5b60cf262cd 100644 --- a/resource-manager/devtestlab/2018-09-15/policysets/README.md +++ b/resource-manager/devtestlab/2018-09-15/policysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policysets` Documentation -The `policysets` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `policysets` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/policysets/client.go b/resource-manager/devtestlab/2018-09-15/policysets/client.go index a5eef8a8032..0bfccdf03c7 100644 --- a/resource-manager/devtestlab/2018-09-15/policysets/client.go +++ b/resource-manager/devtestlab/2018-09-15/policysets/client.go @@ -15,7 +15,7 @@ type PolicySetsClient struct { } func NewPolicySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicySetsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/policysets/id_policyset.go b/resource-manager/devtestlab/2018-09-15/policysets/id_policyset.go index 97e3a4760c3..012a35df0b6 100644 --- a/resource-manager/devtestlab/2018-09-15/policysets/id_policyset.go +++ b/resource-manager/devtestlab/2018-09-15/policysets/id_policyset.go @@ -44,7 +44,7 @@ func ParsePolicySetID(input string) (*PolicySetId, error) { } id := PolicySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePolicySetIDInsensitively(input string) (*PolicySetId, error) { } id := PolicySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/policysets/method_evaluatepolicies.go b/resource-manager/devtestlab/2018-09-15/policysets/method_evaluatepolicies.go index 2b5eaf0f81a..efe182427e7 100644 --- a/resource-manager/devtestlab/2018-09-15/policysets/method_evaluatepolicies.go +++ b/resource-manager/devtestlab/2018-09-15/policysets/method_evaluatepolicies.go @@ -50,7 +50,6 @@ func (c PolicySetsClient) EvaluatePolicies(ctx context.Context, id PolicySetId, var model EvaluatePoliciesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/policysets/version.go b/resource-manager/devtestlab/2018-09-15/policysets/version.go index c26df263ee3..61177c2530a 100644 --- a/resource-manager/devtestlab/2018-09-15/policysets/version.go +++ b/resource-manager/devtestlab/2018-09-15/policysets/version.go @@ -1,12 +1,10 @@ package policysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policysets/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/README.md b/resource-manager/devtestlab/2018-09-15/schedules/README.md index 19e566dfb4c..7076cfd692e 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/README.md +++ b/resource-manager/devtestlab/2018-09-15/schedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/schedules` Documentation -The `schedules` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `schedules` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/schedules/client.go b/resource-manager/devtestlab/2018-09-15/schedules/client.go index 36a9b3c9f6f..f00be22a71d 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/client.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/client.go @@ -15,7 +15,7 @@ type SchedulesClient struct { } func NewSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchedulesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go b/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go index 06c3c5e09eb..f0dd55a9683 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go b/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go index 5cddd948806..d12d779a8f9 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/id_labschedule.go @@ -44,7 +44,7 @@ func ParseLabScheduleID(input string) (*LabScheduleId, error) { } id := LabScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLabScheduleIDInsensitively(input string) (*LabScheduleId, error) { } id := LabScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/schedules/method_createorupdate.go index ce4e9db872d..e3b013f920f 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SchedulesClient) CreateOrUpdate(ctx context.Context, id LabScheduleId, i var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/method_get.go b/resource-manager/devtestlab/2018-09-15/schedules/method_get.go index 157c3f02de5..21856b2466f 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SchedulesClient) Get(ctx context.Context, id LabScheduleId, options GetO var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/method_list.go b/resource-manager/devtestlab/2018-09-15/schedules/method_list.go index e1e1629428a..8996c061d0a 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/method_update.go b/resource-manager/devtestlab/2018-09-15/schedules/method_update.go index 96261ff1a11..e63b06bcf35 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/method_update.go @@ -49,7 +49,6 @@ func (c SchedulesClient) Update(ctx context.Context, id LabScheduleId, input Upd var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/schedules/version.go b/resource-manager/devtestlab/2018-09-15/schedules/version.go index 1455add5ff9..e77673618e8 100644 --- a/resource-manager/devtestlab/2018-09-15/schedules/version.go +++ b/resource-manager/devtestlab/2018-09-15/schedules/version.go @@ -1,12 +1,10 @@ package schedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedules/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/README.md b/resource-manager/devtestlab/2018-09-15/secrets/README.md index 802df065049..e9125e9d7b2 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/README.md +++ b/resource-manager/devtestlab/2018-09-15/secrets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/secrets` Documentation -The `secrets` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `secrets` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/secrets/client.go b/resource-manager/devtestlab/2018-09-15/secrets/client.go index c8a49ae1e6b..07a23983c45 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/client.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/client.go @@ -15,7 +15,7 @@ type SecretsClient struct { } func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "secrets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "secrets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecretsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/id_secret.go b/resource-manager/devtestlab/2018-09-15/secrets/id_secret.go index d2c2e2121ef..db1d8d1a9f4 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/id_secret.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/id_secret.go @@ -46,7 +46,7 @@ func ParseSecretID(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSecretIDInsensitively(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/id_user.go b/resource-manager/devtestlab/2018-09-15/secrets/id_user.go index bf98f4bb67b..90efdce9c92 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/id_user.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/method_get.go b/resource-manager/devtestlab/2018-09-15/secrets/method_get.go index e066e589249..0817fad81f5 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SecretsClient) Get(ctx context.Context, id SecretId, options GetOperatio var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/method_list.go b/resource-manager/devtestlab/2018-09-15/secrets/method_list.go index cc1a4f624f5..e5b447bbb12 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/method_update.go b/resource-manager/devtestlab/2018-09-15/secrets/method_update.go index 39499f0ce56..6ba0de1ca84 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/method_update.go @@ -49,7 +49,6 @@ func (c SecretsClient) Update(ctx context.Context, id SecretId, input UpdateReso var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/secrets/version.go b/resource-manager/devtestlab/2018-09-15/secrets/version.go index e73d1861555..4db738afc81 100644 --- a/resource-manager/devtestlab/2018-09-15/secrets/version.go +++ b/resource-manager/devtestlab/2018-09-15/secrets/version.go @@ -1,12 +1,10 @@ package secrets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/secrets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/secrets/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/README.md b/resource-manager/devtestlab/2018-09-15/servicefabrics/README.md index b5a3a034288..12acf827715 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/README.md +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/servicefabrics` Documentation -The `servicefabrics` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `servicefabrics` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/client.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/client.go index 7770c29f384..453bfe88dbe 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/client.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/client.go @@ -15,7 +15,7 @@ type ServiceFabricsClient struct { } func NewServiceFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicefabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicefabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceFabricsClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/id_servicefabric.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/id_servicefabric.go index 5fc95e40717..63b7ca7f50e 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/id_servicefabric.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/id_servicefabric.go @@ -46,7 +46,7 @@ func ParseServiceFabricID(input string) (*ServiceFabricId, error) { } id := ServiceFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceFabricIDInsensitively(input string) (*ServiceFabricId, error) { } id := ServiceFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/id_user.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/id_user.go index 59570fd95d2..a07f3b6587f 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/id_user.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_get.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_get.go index 6b6a2af7ca2..a977f47eaac 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceFabricsClient) Get(ctx context.Context, id ServiceFabricId, optio var model ServiceFabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_list.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_list.go index 5876eb9651f..e12d2098675 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_listapplicableschedules.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_listapplicableschedules.go index 19d0481a208..7722ad7027b 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_listapplicableschedules.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_listapplicableschedules.go @@ -46,7 +46,6 @@ func (c ServiceFabricsClient) ListApplicableSchedules(ctx context.Context, id Se var model ApplicableSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_update.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_update.go index 54f0eba11bb..10827e868cb 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/method_update.go @@ -49,7 +49,6 @@ func (c ServiceFabricsClient) Update(ctx context.Context, id ServiceFabricId, in var model ServiceFabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabrics/version.go b/resource-manager/devtestlab/2018-09-15/servicefabrics/version.go index 770a4ad2982..2d71d4852ef 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabrics/version.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabrics/version.go @@ -1,12 +1,10 @@ package servicefabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicefabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicefabrics/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/README.md b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/README.md index 790f2ee4b68..7e1863c3dc0 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/README.md +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/servicefabricschedules` Documentation -The `servicefabricschedules` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `servicefabricschedules` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/client.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/client.go index c480c48309a..cca485b5fe3 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/client.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/client.go @@ -15,7 +15,7 @@ type ServiceFabricSchedulesClient struct { } func NewServiceFabricSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceFabricSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicefabricschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicefabricschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceFabricSchedulesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabric.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabric.go index 071f9fe2299..9eb14ea68b6 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabric.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabric.go @@ -46,7 +46,7 @@ func ParseServiceFabricID(input string) (*ServiceFabricId, error) { } id := ServiceFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceFabricIDInsensitively(input string) (*ServiceFabricId, error) { } id := ServiceFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabricschedule.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabricschedule.go index a7cca0c69e7..3c945316ae7 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabricschedule.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/id_servicefabricschedule.go @@ -48,7 +48,7 @@ func ParseServiceFabricScheduleID(input string) (*ServiceFabricScheduleId, error } id := ServiceFabricScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseServiceFabricScheduleIDInsensitively(input string) (*ServiceFabricSche } id := ServiceFabricScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_createorupdate.go index bd73590e668..ffe2bb2e740 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ServiceFabricSchedulesClient) CreateOrUpdate(ctx context.Context, id Ser var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_get.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_get.go index 0f9d18887b8..f223964b2d9 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceFabricSchedulesClient) Get(ctx context.Context, id ServiceFabricS var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_list.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_list.go index d91906a2ce8..4b93979d42b 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_update.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_update.go index b92817d6bac..d58200c2ff5 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/method_update.go @@ -49,7 +49,6 @@ func (c ServiceFabricSchedulesClient) Update(ctx context.Context, id ServiceFabr var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/version.go b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/version.go index 8de6915c63f..90d8b506c1d 100644 --- a/resource-manager/devtestlab/2018-09-15/servicefabricschedules/version.go +++ b/resource-manager/devtestlab/2018-09-15/servicefabricschedules/version.go @@ -1,12 +1,10 @@ package servicefabricschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicefabricschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicefabricschedules/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/README.md b/resource-manager/devtestlab/2018-09-15/servicerunners/README.md index 00ccdb90a10..d5078a227dc 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/README.md +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/servicerunners` Documentation -The `servicerunners` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `servicerunners` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/client.go b/resource-manager/devtestlab/2018-09-15/servicerunners/client.go index e535b04f8db..569e07d3c3d 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/client.go +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/client.go @@ -15,7 +15,7 @@ type ServiceRunnersClient struct { } func NewServiceRunnersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceRunnersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicerunners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicerunners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceRunnersClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/id_servicerunner.go b/resource-manager/devtestlab/2018-09-15/servicerunners/id_servicerunner.go index 791ec421c1d..10d65cd73d8 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/id_servicerunner.go +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/id_servicerunner.go @@ -44,7 +44,7 @@ func ParseServiceRunnerID(input string) (*ServiceRunnerId, error) { } id := ServiceRunnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceRunnerIDInsensitively(input string) (*ServiceRunnerId, error) { } id := ServiceRunnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/servicerunners/method_createorupdate.go index 34f9fbaf450..799c19795b4 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ServiceRunnersClient) CreateOrUpdate(ctx context.Context, id ServiceRunn var model ServiceRunner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/method_get.go b/resource-manager/devtestlab/2018-09-15/servicerunners/method_get.go index 00b52707eff..4aeca92fc5d 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/method_get.go @@ -45,7 +45,6 @@ func (c ServiceRunnersClient) Get(ctx context.Context, id ServiceRunnerId) (resu var model ServiceRunner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/servicerunners/version.go b/resource-manager/devtestlab/2018-09-15/servicerunners/version.go index edb62679bb1..62469cd072d 100644 --- a/resource-manager/devtestlab/2018-09-15/servicerunners/version.go +++ b/resource-manager/devtestlab/2018-09-15/servicerunners/version.go @@ -1,12 +1,10 @@ package servicerunners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicerunners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicerunners/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/users/README.md b/resource-manager/devtestlab/2018-09-15/users/README.md index 5e1cdcd1c32..4201ef713a3 100644 --- a/resource-manager/devtestlab/2018-09-15/users/README.md +++ b/resource-manager/devtestlab/2018-09-15/users/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/users` Documentation -The `users` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `users` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/users/client.go b/resource-manager/devtestlab/2018-09-15/users/client.go index 61acff0d5ad..15e8122a1f5 100644 --- a/resource-manager/devtestlab/2018-09-15/users/client.go +++ b/resource-manager/devtestlab/2018-09-15/users/client.go @@ -15,7 +15,7 @@ type UsersClient struct { } func NewUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*UsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "users", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "users", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsersClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/users/id_lab.go b/resource-manager/devtestlab/2018-09-15/users/id_lab.go index be4ca36255c..1e054adf300 100644 --- a/resource-manager/devtestlab/2018-09-15/users/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/users/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/users/id_user.go b/resource-manager/devtestlab/2018-09-15/users/id_user.go index 538aa7a785e..30607d7ee1f 100644 --- a/resource-manager/devtestlab/2018-09-15/users/id_user.go +++ b/resource-manager/devtestlab/2018-09-15/users/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/users/method_get.go b/resource-manager/devtestlab/2018-09-15/users/method_get.go index 9ac848c44ff..abc227bfcf7 100644 --- a/resource-manager/devtestlab/2018-09-15/users/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/users/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c UsersClient) Get(ctx context.Context, id UserId, options GetOperationOpt var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/users/method_list.go b/resource-manager/devtestlab/2018-09-15/users/method_list.go index 82a3bc34b10..94e8f43c321 100644 --- a/resource-manager/devtestlab/2018-09-15/users/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/users/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/users/method_update.go b/resource-manager/devtestlab/2018-09-15/users/method_update.go index 9b11eb8eecc..7f18fc83b50 100644 --- a/resource-manager/devtestlab/2018-09-15/users/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/users/method_update.go @@ -49,7 +49,6 @@ func (c UsersClient) Update(ctx context.Context, id UserId, input UpdateResource var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/users/version.go b/resource-manager/devtestlab/2018-09-15/users/version.go index 06955686616..4c85657c63f 100644 --- a/resource-manager/devtestlab/2018-09-15/users/version.go +++ b/resource-manager/devtestlab/2018-09-15/users/version.go @@ -1,12 +1,10 @@ package users -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/users/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/users/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/README.md b/resource-manager/devtestlab/2018-09-15/virtualmachines/README.md index de49926dd03..a8c3c1d97c4 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/README.md +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/client.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/client.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go index fb32449530f..2dc8a0bebf2 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go index 81b8c3f1b6c..bb82381a21d 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_get.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_get.go index e7a04cfe4ec..4b2cd379af2 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId, opt var model LabVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_getrdpfilecontents.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_getrdpfilecontents.go index 1fd9ea56e1e..782285814c8 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_getrdpfilecontents.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_getrdpfilecontents.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) GetRdpFileContents(ctx context.Context, id Virtua var model RdpConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_list.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_list.go index 1cdf1f74d37..7bb0e92009c 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_listapplicableschedules.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_listapplicableschedules.go index b985a02779f..a25b7501b74 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_listapplicableschedules.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_listapplicableschedules.go @@ -46,7 +46,6 @@ func (c VirtualMachinesClient) ListApplicableSchedules(ctx context.Context, id V var model ApplicableSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_update.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_update.go index 0992abfa741..83aac6a5174 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/method_update.go @@ -49,7 +49,6 @@ func (c VirtualMachinesClient) Update(ctx context.Context, id VirtualMachineId, var model LabVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachines/version.go b/resource-manager/devtestlab/2018-09-15/virtualmachines/version.go index 06c8127876e..be6acd871d7 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachines/version.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/README.md b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/README.md index fc9d1d7f000..99c43213553 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/README.md +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualmachineschedules` Documentation -The `virtualmachineschedules` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `virtualmachineschedules` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/client.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/client.go index 3958781de37..66d524f1889 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/client.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/client.go @@ -15,7 +15,7 @@ type VirtualMachineSchedulesClient struct { } func NewVirtualMachineSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSchedulesClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachine.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachine.go index 719e7839ecd..1f38001e870 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachine.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachineschedule.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachineschedule.go index df990363f91..1d1f728aaa6 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachineschedule.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/id_virtualmachineschedule.go @@ -46,7 +46,7 @@ func ParseVirtualMachineScheduleID(input string) (*VirtualMachineScheduleId, err } id := VirtualMachineScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineScheduleIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_createorupdate.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_createorupdate.go index 2bc3a3a4639..9453b6a70af 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_createorupdate.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VirtualMachineSchedulesClient) CreateOrUpdate(ctx context.Context, id Vi var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_get.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_get.go index 5d04eacd772..12c457a669a 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualMachineSchedulesClient) Get(ctx context.Context, id VirtualMachin var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_list.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_list.go index 1ffd709dcd2..ef168ebce6c 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_update.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_update.go index a0e8ac212ba..535905fcf65 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/method_update.go @@ -49,7 +49,6 @@ func (c VirtualMachineSchedulesClient) Update(ctx context.Context, id VirtualMac var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/version.go b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/version.go index 5f32eee350f..16dd580fc39 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/version.go +++ b/resource-manager/devtestlab/2018-09-15/virtualmachineschedules/version.go @@ -1,12 +1,10 @@ package virtualmachineschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineschedules/2018-09-15" } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/README.md b/resource-manager/devtestlab/2018-09-15/virtualnetworks/README.md index ed6e3b6baf1..b6669310f4f 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/README.md +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `devtestlab` (API Version `2018-09-15`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `devtestlab` (API Version `2018-09-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/client.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/client.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go index 7e18698bab6..96d16ad8c3d 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go index 510874a744d..835cfd96d80 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/id_virtualnetwork.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_get.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_get.go index 9e9262872fc..0197701ed58 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_get.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId, opt var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_list.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_list.go index 8d0feb63478..47f7292eefc 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_list.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_update.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_update.go index 8dfa93a78f7..c7eccf1c848 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_update.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/method_update.go @@ -49,7 +49,6 @@ func (c VirtualNetworksClient) Update(ctx context.Context, id VirtualNetworkId, var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/devtestlab/2018-09-15/virtualnetworks/version.go b/resource-manager/devtestlab/2018-09-15/virtualnetworks/version.go index 97df3a33087..c2a032bb82b 100644 --- a/resource-manager/devtestlab/2018-09-15/virtualnetworks/version.go +++ b/resource-manager/devtestlab/2018-09-15/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-09-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2018-09-15" } diff --git a/resource-manager/digitaltwins/2023-01-31/checknameavailability/README.md b/resource-manager/digitaltwins/2023-01-31/checknameavailability/README.md index 6d4c004f517..57aa4ab9b23 100644 --- a/resource-manager/digitaltwins/2023-01-31/checknameavailability/README.md +++ b/resource-manager/digitaltwins/2023-01-31/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `digitaltwins` (API Version `2023-01-31`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `digitaltwins` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/digitaltwins/2023-01-31/checknameavailability/client.go b/resource-manager/digitaltwins/2023-01-31/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/digitaltwins/2023-01-31/checknameavailability/client.go +++ b/resource-manager/digitaltwins/2023-01-31/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/checknameavailability/id_location.go b/resource-manager/digitaltwins/2023-01-31/checknameavailability/id_location.go index 18b16cfc35d..fa137db2a41 100644 --- a/resource-manager/digitaltwins/2023-01-31/checknameavailability/id_location.go +++ b/resource-manager/digitaltwins/2023-01-31/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/checknameavailability/method_digitaltwinschecknameavailability.go b/resource-manager/digitaltwins/2023-01-31/checknameavailability/method_digitaltwinschecknameavailability.go index 8fe767b21da..f45c6bdc916 100644 --- a/resource-manager/digitaltwins/2023-01-31/checknameavailability/method_digitaltwinschecknameavailability.go +++ b/resource-manager/digitaltwins/2023-01-31/checknameavailability/method_digitaltwinschecknameavailability.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) DigitalTwinsCheckNameAvailability(ctx conte var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/checknameavailability/version.go b/resource-manager/digitaltwins/2023-01-31/checknameavailability/version.go index 64db3eda390..8d309a8741c 100644 --- a/resource-manager/digitaltwins/2023-01-31/checknameavailability/version.go +++ b/resource-manager/digitaltwins/2023-01-31/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2023-01-31" } diff --git a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/README.md b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/README.md index 2bcd548bebb..1393f29330c 100644 --- a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/README.md +++ b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance` Documentation -The `digitaltwinsinstance` SDK allows for interaction with the Azure Resource Manager Service `digitaltwins` (API Version `2023-01-31`). +The `digitaltwinsinstance` SDK allows for interaction with Azure Resource Manager `digitaltwins` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/client.go b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/client.go index 59ef06127de..6491ca355db 100644 --- a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/client.go +++ b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/client.go @@ -15,7 +15,7 @@ type DigitalTwinsInstanceClient struct { } func NewDigitalTwinsInstanceClientWithBaseURI(sdkApi sdkEnv.Api) (*DigitalTwinsInstanceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "digitaltwinsinstance", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "digitaltwinsinstance", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DigitalTwinsInstanceClient: %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go index 1cb9ebed92c..bd707e296a1 100644 --- a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go +++ b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/id_digitaltwinsinstance.go @@ -42,7 +42,7 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/method_digitaltwinsget.go b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/method_digitaltwinsget.go index 38f7e0e3b05..26bcd243999 100644 --- a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/method_digitaltwinsget.go +++ b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/method_digitaltwinsget.go @@ -45,7 +45,6 @@ func (c DigitalTwinsInstanceClient) DigitalTwinsGet(ctx context.Context, id Digi var model DigitalTwinsDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/version.go b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/version.go index 0285c99e16d..3283e1dd22c 100644 --- a/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/version.go +++ b/resource-manager/digitaltwins/2023-01-31/digitaltwinsinstance/version.go @@ -1,12 +1,10 @@ package digitaltwinsinstance -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/digitaltwinsinstance/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/digitaltwinsinstance/2023-01-31" } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/README.md b/resource-manager/digitaltwins/2023-01-31/endpoints/README.md index 3fc6fa1ba93..514e2e72246 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/README.md +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `digitaltwins` (API Version `2023-01-31`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `digitaltwins` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/client.go b/resource-manager/digitaltwins/2023-01-31/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/client.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go b/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go index ac949c7fe55..8f3aaef2806 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/id_digitaltwinsinstance.go @@ -42,7 +42,7 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go b/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go index 95253c53f3a..081bf98e33d 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/id_endpoint.go @@ -44,7 +44,7 @@ func ParseEndpointID(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/method_digitaltwinsendpointget.go b/resource-manager/digitaltwins/2023-01-31/endpoints/method_digitaltwinsendpointget.go index 815a1cb74ad..c314ee9b679 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/method_digitaltwinsendpointget.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/method_digitaltwinsendpointget.go @@ -45,7 +45,6 @@ func (c EndpointsClient) DigitalTwinsEndpointGet(ctx context.Context, id Endpoin var model DigitalTwinsEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresource.go b/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresource.go index 201558e7f74..912dfba4690 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresource.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresource.go @@ -38,7 +38,7 @@ func (s *DigitalTwinsEndpointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDigitalTwinsEndpointResourcePropertiesImplementation(v) + impl, err := UnmarshalDigitalTwinsEndpointResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DigitalTwinsEndpointResource': %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresourceproperties.go b/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresourceproperties.go index e5658b7bbb2..770389d7115 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresourceproperties.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/model_digitaltwinsendpointresourceproperties.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DigitalTwinsEndpointResourceProperties interface { + DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl } -// RawDigitalTwinsEndpointResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DigitalTwinsEndpointResourceProperties = BaseDigitalTwinsEndpointResourcePropertiesImpl{} + +type BaseDigitalTwinsEndpointResourcePropertiesImpl struct { + AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` + CreatedTime *string `json:"createdTime,omitempty"` + DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` + DeadLetterUri *string `json:"deadLetterUri,omitempty"` + EndpointType EndpointType `json:"endpointType"` + Identity *ManagedIdentityReference `json:"identity,omitempty"` + ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseDigitalTwinsEndpointResourcePropertiesImpl) DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl { + return s +} + +var _ DigitalTwinsEndpointResourceProperties = RawDigitalTwinsEndpointResourcePropertiesImpl{} + +// RawDigitalTwinsEndpointResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDigitalTwinsEndpointResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + digitalTwinsEndpointResourceProperties BaseDigitalTwinsEndpointResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawDigitalTwinsEndpointResourcePropertiesImpl) DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl { + return s.digitalTwinsEndpointResourceProperties } -func unmarshalDigitalTwinsEndpointResourcePropertiesImplementation(input []byte) (DigitalTwinsEndpointResourceProperties, error) { +func UnmarshalDigitalTwinsEndpointResourcePropertiesImplementation(input []byte) (DigitalTwinsEndpointResourceProperties, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalDigitalTwinsEndpointResourcePropertiesImplementation(input []byte) return out, nil } - out := RawDigitalTwinsEndpointResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseDigitalTwinsEndpointResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDigitalTwinsEndpointResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawDigitalTwinsEndpointResourcePropertiesImpl{ + digitalTwinsEndpointResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventgrid.go b/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventgrid.go index cfcddbebc2d..facf1ca9ebc 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventgrid.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventgrid.go @@ -19,14 +19,28 @@ type EventGrid struct { TopicEndpoint string `json:"TopicEndpoint"` // Fields inherited from DigitalTwinsEndpointResourceProperties + AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` CreatedTime *string `json:"createdTime,omitempty"` DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` DeadLetterUri *string `json:"deadLetterUri,omitempty"` + EndpointType EndpointType `json:"endpointType"` Identity *ManagedIdentityReference `json:"identity,omitempty"` ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty"` } +func (s EventGrid) DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl { + return BaseDigitalTwinsEndpointResourcePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + CreatedTime: s.CreatedTime, + DeadLetterSecret: s.DeadLetterSecret, + DeadLetterUri: s.DeadLetterUri, + EndpointType: s.EndpointType, + Identity: s.Identity, + ProvisioningState: s.ProvisioningState, + } +} + func (o *EventGrid) GetCreatedTimeAsTime() (*time.Time, error) { if o.CreatedTime == nil { return nil, nil @@ -50,9 +64,10 @@ func (s EventGrid) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventGrid: %+v", err) } + decoded["endpointType"] = "EventGrid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventhub.go b/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventhub.go index 3c3b69dbd2d..65f2eac58f0 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventhub.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/model_eventhub.go @@ -20,14 +20,28 @@ type EventHub struct { EntityPath *string `json:"entityPath,omitempty"` // Fields inherited from DigitalTwinsEndpointResourceProperties + AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` CreatedTime *string `json:"createdTime,omitempty"` DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` DeadLetterUri *string `json:"deadLetterUri,omitempty"` + EndpointType EndpointType `json:"endpointType"` Identity *ManagedIdentityReference `json:"identity,omitempty"` ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty"` } +func (s EventHub) DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl { + return BaseDigitalTwinsEndpointResourcePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + CreatedTime: s.CreatedTime, + DeadLetterSecret: s.DeadLetterSecret, + DeadLetterUri: s.DeadLetterUri, + EndpointType: s.EndpointType, + Identity: s.Identity, + ProvisioningState: s.ProvisioningState, + } +} + func (o *EventHub) GetCreatedTimeAsTime() (*time.Time, error) { if o.CreatedTime == nil { return nil, nil @@ -51,9 +65,10 @@ func (s EventHub) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHub: %+v", err) } + decoded["endpointType"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/model_servicebus.go b/resource-manager/digitaltwins/2023-01-31/endpoints/model_servicebus.go index 3e73205aa8c..213cce67064 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/model_servicebus.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/model_servicebus.go @@ -20,14 +20,28 @@ type ServiceBus struct { SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` // Fields inherited from DigitalTwinsEndpointResourceProperties + AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` CreatedTime *string `json:"createdTime,omitempty"` DeadLetterSecret *string `json:"deadLetterSecret,omitempty"` DeadLetterUri *string `json:"deadLetterUri,omitempty"` + EndpointType EndpointType `json:"endpointType"` Identity *ManagedIdentityReference `json:"identity,omitempty"` ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty"` } +func (s ServiceBus) DigitalTwinsEndpointResourceProperties() BaseDigitalTwinsEndpointResourcePropertiesImpl { + return BaseDigitalTwinsEndpointResourcePropertiesImpl{ + AuthenticationType: s.AuthenticationType, + CreatedTime: s.CreatedTime, + DeadLetterSecret: s.DeadLetterSecret, + DeadLetterUri: s.DeadLetterUri, + EndpointType: s.EndpointType, + Identity: s.Identity, + ProvisioningState: s.ProvisioningState, + } +} + func (o *ServiceBus) GetCreatedTimeAsTime() (*time.Time, error) { if o.CreatedTime == nil { return nil, nil @@ -51,9 +65,10 @@ func (s ServiceBus) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBus: %+v", err) } + decoded["endpointType"] = "ServiceBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/digitaltwins/2023-01-31/endpoints/version.go b/resource-manager/digitaltwins/2023-01-31/endpoints/version.go index 9e40048e4c7..f16255ce421 100644 --- a/resource-manager/digitaltwins/2023-01-31/endpoints/version.go +++ b/resource-manager/digitaltwins/2023-01-31/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2023-01-31" } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/README.md b/resource-manager/digitaltwins/2023-01-31/privateendpoints/README.md index cbd1741aa4f..8c7c722ca6a 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/README.md +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `digitaltwins` (API Version `2023-01-31`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `digitaltwins` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/client.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/client.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_digitaltwinsinstance.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_digitaltwinsinstance.go index 20001fa10dd..e352f10d621 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_digitaltwinsinstance.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_digitaltwinsinstance.go @@ -42,7 +42,7 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_privateendpointconnection.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_privateendpointconnection.go index 7279e5ca69f..0cc0cc4ed9b 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_privateendpointconnection.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_resource.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_resource.go index 52626f795c4..e08a775a150 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_resource.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/id_resource.go @@ -44,7 +44,7 @@ func ParseResourceID(input string) (*ResourceId, error) { } id := ResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceIDInsensitively(input string) (*ResourceId, error) { } id := ResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionsget.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionsget.go index 8b6c8877652..2d3fa0697fb 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionsget.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointsClient) PrivateEndpointConnectionsGet(ctx context.Contex var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionslist.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionslist.go index 78a2eb31cd8..c7828dbc66c 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionslist.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privateendpointconnectionslist.go @@ -46,7 +46,6 @@ func (c PrivateEndpointsClient) PrivateEndpointConnectionsList(ctx context.Conte var model PrivateEndpointConnectionsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourcesget.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourcesget.go index abd9dcd532e..26f81a7f688 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourcesget.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointsClient) PrivateLinkResourcesGet(ctx context.Context, id var model GroupIdInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourceslist.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourceslist.go index 48367a754ef..5cdf0f8e068 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourceslist.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/method_privatelinkresourceslist.go @@ -46,7 +46,6 @@ func (c PrivateEndpointsClient) PrivateLinkResourcesList(ctx context.Context, id var model GroupIdInformationResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/privateendpoints/version.go b/resource-manager/digitaltwins/2023-01-31/privateendpoints/version.go index 713b9213e9d..b6301ca6b06 100644 --- a/resource-manager/digitaltwins/2023-01-31/privateendpoints/version.go +++ b/resource-manager/digitaltwins/2023-01-31/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2023-01-31" } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/README.md b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/README.md index cf7e7191908..12e60c6e785 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/README.md +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections` Documentation -The `timeseriesdatabaseconnections` SDK allows for interaction with the Azure Resource Manager Service `digitaltwins` (API Version `2023-01-31`). +The `timeseriesdatabaseconnections` SDK allows for interaction with Azure Resource Manager `digitaltwins` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/client.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/client.go index 456d7d8540a..5496e8a07b7 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/client.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/client.go @@ -15,7 +15,7 @@ type TimeSeriesDatabaseConnectionsClient struct { } func NewTimeSeriesDatabaseConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TimeSeriesDatabaseConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "timeseriesdatabaseconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "timeseriesdatabaseconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TimeSeriesDatabaseConnectionsClient: %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go index 13d03760134..8f3df479744 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_digitaltwinsinstance.go @@ -42,7 +42,7 @@ func ParseDigitalTwinsInstanceID(input string) (*DigitalTwinsInstanceId, error) } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDigitalTwinsInstanceIDInsensitively(input string) (*DigitalTwinsInstan } id := DigitalTwinsInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go index f1474cb643b..df0ac832168 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/id_timeseriesdatabaseconnection.go @@ -44,7 +44,7 @@ func ParseTimeSeriesDatabaseConnectionID(input string) (*TimeSeriesDatabaseConne } id := TimeSeriesDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTimeSeriesDatabaseConnectionIDInsensitively(input string) (*TimeSeries } id := TimeSeriesDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_delete.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_delete.go index a1472cd43c8..b70cbfa6f8f 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_delete.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_get.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_get.go index 05b2313ec96..ae0b761eac0 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_get.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/method_get.go @@ -45,7 +45,6 @@ func (c TimeSeriesDatabaseConnectionsClient) Get(ctx context.Context, id TimeSer var model TimeSeriesDatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_azuredataexplorerconnectionproperties.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_azuredataexplorerconnectionproperties.go index fe9d4f49f55..eccdf65c0b6 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_azuredataexplorerconnectionproperties.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_azuredataexplorerconnectionproperties.go @@ -24,10 +24,20 @@ type AzureDataExplorerConnectionProperties struct { RecordPropertyAndItemRemovals *bool `json:"recordPropertyAndItemRemovals,omitempty"` // Fields inherited from TimeSeriesDatabaseConnectionProperties + + ConnectionType ConnectionType `json:"connectionType"` Identity *ManagedIdentityReference `json:"identity,omitempty"` ProvisioningState *TimeSeriesDatabaseConnectionState `json:"provisioningState,omitempty"` } +func (s AzureDataExplorerConnectionProperties) TimeSeriesDatabaseConnectionProperties() BaseTimeSeriesDatabaseConnectionPropertiesImpl { + return BaseTimeSeriesDatabaseConnectionPropertiesImpl{ + ConnectionType: s.ConnectionType, + Identity: s.Identity, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureDataExplorerConnectionProperties{} func (s AzureDataExplorerConnectionProperties) MarshalJSON() ([]byte, error) { @@ -39,9 +49,10 @@ func (s AzureDataExplorerConnectionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerConnectionProperties: %+v", err) } + decoded["connectionType"] = "AzureDataExplorer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnection.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnection.go index 226e00f4919..68b198ace99 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnection.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnection.go @@ -38,7 +38,7 @@ func (s *TimeSeriesDatabaseConnection) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalTimeSeriesDatabaseConnectionPropertiesImplementation(v) + impl, err := UnmarshalTimeSeriesDatabaseConnectionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'TimeSeriesDatabaseConnection': %+v", err) } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnectionproperties.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnectionproperties.go index d0f36d4a493..b1b6452d45e 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnectionproperties.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/model_timeseriesdatabaseconnectionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TimeSeriesDatabaseConnectionProperties interface { + TimeSeriesDatabaseConnectionProperties() BaseTimeSeriesDatabaseConnectionPropertiesImpl } -// RawTimeSeriesDatabaseConnectionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TimeSeriesDatabaseConnectionProperties = BaseTimeSeriesDatabaseConnectionPropertiesImpl{} + +type BaseTimeSeriesDatabaseConnectionPropertiesImpl struct { + ConnectionType ConnectionType `json:"connectionType"` + Identity *ManagedIdentityReference `json:"identity,omitempty"` + ProvisioningState *TimeSeriesDatabaseConnectionState `json:"provisioningState,omitempty"` +} + +func (s BaseTimeSeriesDatabaseConnectionPropertiesImpl) TimeSeriesDatabaseConnectionProperties() BaseTimeSeriesDatabaseConnectionPropertiesImpl { + return s +} + +var _ TimeSeriesDatabaseConnectionProperties = RawTimeSeriesDatabaseConnectionPropertiesImpl{} + +// RawTimeSeriesDatabaseConnectionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTimeSeriesDatabaseConnectionPropertiesImpl struct { - Type string - Values map[string]interface{} + timeSeriesDatabaseConnectionProperties BaseTimeSeriesDatabaseConnectionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawTimeSeriesDatabaseConnectionPropertiesImpl) TimeSeriesDatabaseConnectionProperties() BaseTimeSeriesDatabaseConnectionPropertiesImpl { + return s.timeSeriesDatabaseConnectionProperties } -func unmarshalTimeSeriesDatabaseConnectionPropertiesImplementation(input []byte) (TimeSeriesDatabaseConnectionProperties, error) { +func UnmarshalTimeSeriesDatabaseConnectionPropertiesImplementation(input []byte) (TimeSeriesDatabaseConnectionProperties, error) { if input == nil { return nil, nil } @@ -44,10 +63,15 @@ func unmarshalTimeSeriesDatabaseConnectionPropertiesImplementation(input []byte) return out, nil } - out := RawTimeSeriesDatabaseConnectionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseTimeSeriesDatabaseConnectionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTimeSeriesDatabaseConnectionPropertiesImpl: %+v", err) } - return out, nil + + return RawTimeSeriesDatabaseConnectionPropertiesImpl{ + timeSeriesDatabaseConnectionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/version.go b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/version.go index a3f006ae21a..e77e4187c95 100644 --- a/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/version.go +++ b/resource-manager/digitaltwins/2023-01-31/timeseriesdatabaseconnections/version.go @@ -1,12 +1,10 @@ package timeseriesdatabaseconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/timeseriesdatabaseconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/timeseriesdatabaseconnections/2023-01-31" } diff --git a/resource-manager/dns/2018-05-01/dns/README.md b/resource-manager/dns/2018-05-01/dns/README.md index 99188677a47..81bad9d549a 100644 --- a/resource-manager/dns/2018-05-01/dns/README.md +++ b/resource-manager/dns/2018-05-01/dns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/dns` Documentation -The `dns` SDK allows for interaction with the Azure Resource Manager Service `dns` (API Version `2018-05-01`). +The `dns` SDK allows for interaction with Azure Resource Manager `dns` (API Version `2018-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dns/2018-05-01/dns/client.go b/resource-manager/dns/2018-05-01/dns/client.go index 00ded5781b4..db3d9ec45fa 100644 --- a/resource-manager/dns/2018-05-01/dns/client.go +++ b/resource-manager/dns/2018-05-01/dns/client.go @@ -15,7 +15,7 @@ type DnsClient struct { } func NewDnsClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DnsClient: %+v", err) } diff --git a/resource-manager/dns/2018-05-01/dns/method_resourcereferencegetbytargetresources.go b/resource-manager/dns/2018-05-01/dns/method_resourcereferencegetbytargetresources.go index 218143920a3..0009df1c131 100644 --- a/resource-manager/dns/2018-05-01/dns/method_resourcereferencegetbytargetresources.go +++ b/resource-manager/dns/2018-05-01/dns/method_resourcereferencegetbytargetresources.go @@ -51,7 +51,6 @@ func (c DnsClient) ResourceReferenceGetByTargetResources(ctx context.Context, id var model DnsResourceReferenceResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/dns/version.go b/resource-manager/dns/2018-05-01/dns/version.go index dee2e101b8e..b3a1c232b5a 100644 --- a/resource-manager/dns/2018-05-01/dns/version.go +++ b/resource-manager/dns/2018-05-01/dns/version.go @@ -1,12 +1,10 @@ package dns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dns/2018-05-01" } diff --git a/resource-manager/dns/2018-05-01/recordsets/README.md b/resource-manager/dns/2018-05-01/recordsets/README.md index 99f2fceade2..d675bc307be 100644 --- a/resource-manager/dns/2018-05-01/recordsets/README.md +++ b/resource-manager/dns/2018-05-01/recordsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets` Documentation -The `recordsets` SDK allows for interaction with the Azure Resource Manager Service `dns` (API Version `2018-05-01`). +The `recordsets` SDK allows for interaction with Azure Resource Manager `dns` (API Version `2018-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dns/2018-05-01/recordsets/client.go b/resource-manager/dns/2018-05-01/recordsets/client.go index 18ff6ef4956..dc9e1a5c168 100644 --- a/resource-manager/dns/2018-05-01/recordsets/client.go +++ b/resource-manager/dns/2018-05-01/recordsets/client.go @@ -15,7 +15,7 @@ type RecordSetsClient struct { } func NewRecordSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecordSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recordsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recordsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecordSetsClient: %+v", err) } diff --git a/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go b/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go index 1a786760102..d4d384370e3 100644 --- a/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go +++ b/resource-manager/dns/2018-05-01/recordsets/id_dnszone.go @@ -42,7 +42,7 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go b/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go index 8a9dd2f53d4..47f2fb7cd23 100644 --- a/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go +++ b/resource-manager/dns/2018-05-01/recordsets/id_recordtype.go @@ -46,7 +46,7 @@ func ParseRecordTypeID(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dns/2018-05-01/recordsets/id_zone.go b/resource-manager/dns/2018-05-01/recordsets/id_zone.go index f51b3246a41..b313d16cbfa 100644 --- a/resource-manager/dns/2018-05-01/recordsets/id_zone.go +++ b/resource-manager/dns/2018-05-01/recordsets/id_zone.go @@ -44,7 +44,7 @@ func ParseZoneID(input string) (*ZoneId, error) { } id := ZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseZoneIDInsensitively(input string) (*ZoneId, error) { } id := ZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_createorupdate.go b/resource-manager/dns/2018-05-01/recordsets/method_createorupdate.go index da283847699..261e33677c0 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_createorupdate.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c RecordSetsClient) CreateOrUpdate(ctx context.Context, id RecordTypeId, i var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_delete.go b/resource-manager/dns/2018-05-01/recordsets/method_delete.go index bac259d0f30..cd48363f800 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_delete.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_get.go b/resource-manager/dns/2018-05-01/recordsets/method_get.go index 4cea3370054..67d36e44a1e 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_get.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_get.go @@ -45,7 +45,6 @@ func (c RecordSetsClient) Get(ctx context.Context, id RecordTypeId) (result GetO var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_listallbydnszone.go b/resource-manager/dns/2018-05-01/recordsets/method_listallbydnszone.go index fb39799f39d..187a86d7938 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_listallbydnszone.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_listallbydnszone.go @@ -40,6 +40,7 @@ func (o ListAllByDnsZoneOperationOptions) ToHeaders() *client.Headers { func (o ListAllByDnsZoneOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_listbydnszone.go b/resource-manager/dns/2018-05-01/recordsets/method_listbydnszone.go index 53bbafa4eb4..27ec3690cf6 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_listbydnszone.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_listbydnszone.go @@ -40,6 +40,7 @@ func (o ListByDnsZoneOperationOptions) ToHeaders() *client.Headers { func (o ListByDnsZoneOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_listbytype.go b/resource-manager/dns/2018-05-01/recordsets/method_listbytype.go index 8931452b9f1..86817caf8ce 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_listbytype.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_listbytype.go @@ -40,6 +40,7 @@ func (o ListByTypeOperationOptions) ToHeaders() *client.Headers { func (o ListByTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/recordsets/method_update.go b/resource-manager/dns/2018-05-01/recordsets/method_update.go index def3737e664..f5d3687ece9 100644 --- a/resource-manager/dns/2018-05-01/recordsets/method_update.go +++ b/resource-manager/dns/2018-05-01/recordsets/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecordSetsClient) Update(ctx context.Context, id RecordTypeId, input Rec var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/recordsets/version.go b/resource-manager/dns/2018-05-01/recordsets/version.go index 691500e2007..9fd6a2d7037 100644 --- a/resource-manager/dns/2018-05-01/recordsets/version.go +++ b/resource-manager/dns/2018-05-01/recordsets/version.go @@ -1,12 +1,10 @@ package recordsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recordsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recordsets/2018-05-01" } diff --git a/resource-manager/dns/2018-05-01/zones/README.md b/resource-manager/dns/2018-05-01/zones/README.md index c64b5a68bf4..c951f9bd857 100644 --- a/resource-manager/dns/2018-05-01/zones/README.md +++ b/resource-manager/dns/2018-05-01/zones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones` Documentation -The `zones` SDK allows for interaction with the Azure Resource Manager Service `dns` (API Version `2018-05-01`). +The `zones` SDK allows for interaction with Azure Resource Manager `dns` (API Version `2018-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dns/2018-05-01/zones/client.go b/resource-manager/dns/2018-05-01/zones/client.go index fd24f82359f..6ebb0592973 100644 --- a/resource-manager/dns/2018-05-01/zones/client.go +++ b/resource-manager/dns/2018-05-01/zones/client.go @@ -15,7 +15,7 @@ type ZonesClient struct { } func NewZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*ZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "zones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "zones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ZonesClient: %+v", err) } diff --git a/resource-manager/dns/2018-05-01/zones/id_dnszone.go b/resource-manager/dns/2018-05-01/zones/id_dnszone.go index bb57276d599..bec8d7b7165 100644 --- a/resource-manager/dns/2018-05-01/zones/id_dnszone.go +++ b/resource-manager/dns/2018-05-01/zones/id_dnszone.go @@ -42,7 +42,7 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dns/2018-05-01/zones/method_createorupdate.go b/resource-manager/dns/2018-05-01/zones/method_createorupdate.go index c778cdd95d1..49fbfd68db9 100644 --- a/resource-manager/dns/2018-05-01/zones/method_createorupdate.go +++ b/resource-manager/dns/2018-05-01/zones/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c ZonesClient) CreateOrUpdate(ctx context.Context, id DnsZoneId, input Zon var model Zone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/zones/method_delete.go b/resource-manager/dns/2018-05-01/zones/method_delete.go index a56b7a1b796..1a7de15564c 100644 --- a/resource-manager/dns/2018-05-01/zones/method_delete.go +++ b/resource-manager/dns/2018-05-01/zones/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/zones/method_get.go b/resource-manager/dns/2018-05-01/zones/method_get.go index 1596a0f561b..985a441d1c5 100644 --- a/resource-manager/dns/2018-05-01/zones/method_get.go +++ b/resource-manager/dns/2018-05-01/zones/method_get.go @@ -45,7 +45,6 @@ func (c ZonesClient) Get(ctx context.Context, id DnsZoneId) (result GetOperation var model Zone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/zones/method_list.go b/resource-manager/dns/2018-05-01/zones/method_list.go index 3668b92d34d..75d6571a50f 100644 --- a/resource-manager/dns/2018-05-01/zones/method_list.go +++ b/resource-manager/dns/2018-05-01/zones/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/zones/method_listbyresourcegroup.go b/resource-manager/dns/2018-05-01/zones/method_listbyresourcegroup.go index b5b4df3a980..29df62cef25 100644 --- a/resource-manager/dns/2018-05-01/zones/method_listbyresourcegroup.go +++ b/resource-manager/dns/2018-05-01/zones/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dns/2018-05-01/zones/method_update.go b/resource-manager/dns/2018-05-01/zones/method_update.go index 1188fed264b..1fecfd55d9e 100644 --- a/resource-manager/dns/2018-05-01/zones/method_update.go +++ b/resource-manager/dns/2018-05-01/zones/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ZonesClient) Update(ctx context.Context, id DnsZoneId, input ZoneUpdate, var model Zone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dns/2018-05-01/zones/version.go b/resource-manager/dns/2018-05-01/zones/version.go index 97c17a20e3a..85e99788c0a 100644 --- a/resource-manager/dns/2018-05-01/zones/version.go +++ b/resource-manager/dns/2018-05-01/zones/version.go @@ -1,12 +1,10 @@ package zones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/zones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/zones/2018-05-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/README.md b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/README.md index 00ec99fe93e..241f77eff9e 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/README.md +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets` Documentation -The `dnsforwardingrulesets` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `dnsforwardingrulesets` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/client.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/client.go index 08bd02cb4ef..73e6f7c7d9a 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/client.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/client.go @@ -15,7 +15,7 @@ type DnsForwardingRulesetsClient struct { } func NewDnsForwardingRulesetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsForwardingRulesetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dnsforwardingrulesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dnsforwardingrulesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DnsForwardingRulesetsClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go index 87db5297267..dc3b5e19dcf 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/id_dnsforwardingruleset.go @@ -42,7 +42,7 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_createorupdate.go index 3d6c4a2373d..10a7e797dde 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_delete.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_delete.go index a8f0bfab4c8..39432e2ee57 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_get.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_get.go index 0d172c6a6fd..f51a8d51d90 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_get.go @@ -45,7 +45,6 @@ func (c DnsForwardingRulesetsClient) Get(ctx context.Context, id DnsForwardingRu var model DnsForwardingRuleset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_list.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_list.go index 6afbb99977a..5440f0fa713 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyresourcegroup.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyresourcegroup.go index 5fb302c8449..881d28ac5e8 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyresourcegroup.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go index 93de0e5a47d..b62d8934933 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_listbyvirtualnetwork.go @@ -40,6 +40,7 @@ func (o ListByVirtualNetworkOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualNetworkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_update.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_update.go index 63d1f23e528..79b4f485af8 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/version.go b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/version.go index e950d8d82c8..190a81707ff 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/version.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsforwardingrulesets/version.go @@ -1,12 +1,10 @@ package dnsforwardingrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dnsforwardingrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dnsforwardingrulesets/2022-07-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/README.md b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/README.md index 9a5596cf10f..7cf383f9924 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/README.md +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers` Documentation -The `dnsresolvers` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `dnsresolvers` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/client.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/client.go index ad847df0f62..c394ee38d2c 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/client.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/client.go @@ -15,7 +15,7 @@ type DnsResolversClient struct { } func NewDnsResolversClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsResolversClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dnsresolvers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dnsresolvers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DnsResolversClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go index 3d3d8474f66..9dde5b02bfa 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/id_dnsresolver.go @@ -42,7 +42,7 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_createorupdate.go index 454e8754e8b..364ce6bc73e 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_delete.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_delete.go index 57d05da743f..a0a7c136f36 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_get.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_get.go index 53bef285e70..29fb597df97 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_get.go @@ -45,7 +45,6 @@ func (c DnsResolversClient) Get(ctx context.Context, id DnsResolverId) (result G var model DnsResolver result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_list.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_list.go index d9530c48f11..b4f19a3a5df 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyresourcegroup.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyresourcegroup.go index c5b524e452a..5fbcbbef88c 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyresourcegroup.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go index 0202c6bd9a7..02ec5695882 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_listbyvirtualnetwork.go @@ -40,6 +40,7 @@ func (o ListByVirtualNetworkOperationOptions) ToHeaders() *client.Headers { func (o ListByVirtualNetworkOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_update.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_update.go index 8095368065b..89e0f57804d 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/version.go b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/version.go index 25bfcfa0f5f..eb095ffd2b1 100644 --- a/resource-manager/dnsresolver/2022-07-01/dnsresolvers/version.go +++ b/resource-manager/dnsresolver/2022-07-01/dnsresolvers/version.go @@ -1,12 +1,10 @@ package dnsresolvers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dnsresolvers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dnsresolvers/2022-07-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/README.md b/resource-manager/dnsresolver/2022-07-01/forwardingrules/README.md index e5e3ebb4957..af71b825777 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/README.md +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/forwardingrules` Documentation -The `forwardingrules` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `forwardingrules` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/client.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/client.go index 9584b566cb6..5b99731f66b 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/client.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/client.go @@ -15,7 +15,7 @@ type ForwardingRulesClient struct { } func NewForwardingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ForwardingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "forwardingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "forwardingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ForwardingRulesClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go index d5e9c27efc7..349a15dc4a9 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_dnsforwardingruleset.go @@ -42,7 +42,7 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go index 5dab3f2fd7a..61b298956d8 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/id_forwardingrule.go @@ -44,7 +44,7 @@ func ParseForwardingRuleID(input string) (*ForwardingRuleId, error) { } id := ForwardingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseForwardingRuleIDInsensitively(input string) (*ForwardingRuleId, error) } id := ForwardingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_createorupdate.go index b3fcc356dd4..ef40afa0cd9 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c ForwardingRulesClient) CreateOrUpdate(ctx context.Context, id Forwarding var model ForwardingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_delete.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_delete.go index a86e8a34c7e..96fab02ca69 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_get.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_get.go index b17e06fb08b..683e77c63a4 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_get.go @@ -45,7 +45,6 @@ func (c ForwardingRulesClient) Get(ctx context.Context, id ForwardingRuleId) (re var model ForwardingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_list.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_list.go index c63f871e8ce..3feba0c9ec7 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_update.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_update.go index 791adfcfb7d..7d23c91b9be 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ForwardingRulesClient) Update(ctx context.Context, id ForwardingRuleId, var model ForwardingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/forwardingrules/version.go b/resource-manager/dnsresolver/2022-07-01/forwardingrules/version.go index 05035cafd47..242a3a0a4d0 100644 --- a/resource-manager/dnsresolver/2022-07-01/forwardingrules/version.go +++ b/resource-manager/dnsresolver/2022-07-01/forwardingrules/version.go @@ -1,12 +1,10 @@ package forwardingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/forwardingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/forwardingrules/2022-07-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/README.md b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/README.md index 2d0e862d4d7..4079cd3c2c7 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/README.md +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/inboundendpoints` Documentation -The `inboundendpoints` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `inboundendpoints` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/client.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/client.go index e2243baf4af..d66322f00f1 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/client.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/client.go @@ -15,7 +15,7 @@ type InboundEndpointsClient struct { } func NewInboundEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*InboundEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inboundendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inboundendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InboundEndpointsClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go index ff368fdcbe9..37c0fc50bb1 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_dnsresolver.go @@ -42,7 +42,7 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go index f2621fc1e18..f8d58eb5135 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/id_inboundendpoint.go @@ -44,7 +44,7 @@ func ParseInboundEndpointID(input string) (*InboundEndpointId, error) { } id := InboundEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundEndpointIDInsensitively(input string) (*InboundEndpointId, erro } id := InboundEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_createorupdate.go index 37bafd6306f..64642fa340a 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_delete.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_delete.go index 2faab3aa846..8505b20c5f6 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_get.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_get.go index a41a70c3a84..345973a488d 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_get.go @@ -45,7 +45,6 @@ func (c InboundEndpointsClient) Get(ctx context.Context, id InboundEndpointId) ( var model InboundEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_list.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_list.go index 7146d101779..ca722de57d5 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_update.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_update.go index 7b6e8dc464d..da5c738c318 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/version.go b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/version.go index e9d4b395fa3..1236f379168 100644 --- a/resource-manager/dnsresolver/2022-07-01/inboundendpoints/version.go +++ b/resource-manager/dnsresolver/2022-07-01/inboundendpoints/version.go @@ -1,12 +1,10 @@ package inboundendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inboundendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inboundendpoints/2022-07-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/README.md b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/README.md index decbfa9be15..239391c3204 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/README.md +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/outboundendpoints` Documentation -The `outboundendpoints` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `outboundendpoints` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/client.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/client.go index 6ddaee61751..8fbc9e23001 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/client.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/client.go @@ -15,7 +15,7 @@ type OutboundEndpointsClient struct { } func NewOutboundEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundEndpointsClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go index 49997e1cd69..444949f54fd 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_dnsresolver.go @@ -42,7 +42,7 @@ func ParseDnsResolverID(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error) { } id := DnsResolverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go index 9dbe380c909..b1217b5e042 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/id_outboundendpoint.go @@ -44,7 +44,7 @@ func ParseOutboundEndpointID(input string) (*OutboundEndpointId, error) { } id := OutboundEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundEndpointIDInsensitively(input string) (*OutboundEndpointId, er } id := OutboundEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_createorupdate.go index aec013644a9..1eed061313d 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_delete.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_delete.go index 2f787452f64..daec853c887 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_get.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_get.go index b0a5a51ed30..913303c72f1 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_get.go @@ -45,7 +45,6 @@ func (c OutboundEndpointsClient) Get(ctx context.Context, id OutboundEndpointId) var model OutboundEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_list.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_list.go index 23f09bfc5e0..b96b088ca00 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_update.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_update.go index 2ae21a7d475..08d4d904e5e 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/version.go b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/version.go index bb5d161890e..faf54d5de4b 100644 --- a/resource-manager/dnsresolver/2022-07-01/outboundendpoints/version.go +++ b/resource-manager/dnsresolver/2022-07-01/outboundendpoints/version.go @@ -1,12 +1,10 @@ package outboundendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundendpoints/2022-07-01" } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/README.md b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/README.md index 26cac385887..a9e9d9fd40f 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/README.md +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks` Documentation -The `virtualnetworklinks` SDK allows for interaction with the Azure Resource Manager Service `dnsresolver` (API Version `2022-07-01`). +The `virtualnetworklinks` SDK allows for interaction with Azure Resource Manager `dnsresolver` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/client.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/client.go index 69e2bb7e2f1..f81f0abd63a 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/client.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/client.go @@ -15,7 +15,7 @@ type VirtualNetworkLinksClient struct { } func NewVirtualNetworkLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworklinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworklinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkLinksClient: %+v", err) } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go index 55d2444cee0..7b4b4c83d85 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_dnsforwardingruleset.go @@ -42,7 +42,7 @@ func ParseDnsForwardingRulesetID(input string) (*DnsForwardingRulesetId, error) } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsForwardingRulesetIDInsensitively(input string) (*DnsForwardingRules } id := DnsForwardingRulesetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go index 9cca0e21074..fceb183b5a9 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/id_virtualnetworklink.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkLinkID(input string) (*VirtualNetworkLinkId, error) { } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkLinkIDInsensitively(input string) (*VirtualNetworkLinkId } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_createorupdate.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_createorupdate.go index c6bc6fe5517..8f62fdb509b 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_createorupdate.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_delete.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_delete.go index d170aa216a1..655a60540de 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_delete.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_get.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_get.go index 27873563faf..c3d4a23300c 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_get.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkLinksClient) Get(ctx context.Context, id VirtualNetworkLin var model VirtualNetworkLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_list.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_list.go index 98123878eac..6384fef9ffa 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_list.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_update.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_update.go index 1e1a06de269..6d19c45beaf 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_update.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/version.go b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/version.go index ad92cdffda3..3bcbeab0656 100644 --- a/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/version.go +++ b/resource-manager/dnsresolver/2022-07-01/virtualnetworklinks/version.go @@ -1,12 +1,10 @@ package virtualnetworklinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworklinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworklinks/2022-07-01" } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/README.md b/resource-manager/dynatrace/2021-09-01/monitors/README.md index ade6f7f7247..1d85791d698 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/README.md +++ b/resource-manager/dynatrace/2021-09-01/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2021-09-01/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2021-09-01`). +The `monitors` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2021-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2021-09-01/monitors/client.go b/resource-manager/dynatrace/2021-09-01/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/client.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/id_monitor.go b/resource-manager/dynatrace/2021-09-01/monitors/id_monitor.go index aa9e7fd99c8..3bcd7e5590e 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/id_monitor.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_get.go b/resource-manager/dynatrace/2021-09-01/monitors/method_get.go index 5ec643af703..f5544383fcf 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_get.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model MonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_getaccountcredentials.go b/resource-manager/dynatrace/2021-09-01/monitors/method_getaccountcredentials.go index 84cc8bc6ec1..d3192461e3e 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_getaccountcredentials.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_getaccountcredentials.go @@ -46,7 +46,6 @@ func (c MonitorsClient) GetAccountCredentials(ctx context.Context, id MonitorId) var model AccountInfoSecure result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_getssodetails.go b/resource-manager/dynatrace/2021-09-01/monitors/method_getssodetails.go index 9532f634fe8..517d1f103ce 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_getssodetails.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_getssodetails.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetSSODetails(ctx context.Context, id MonitorId, input S var model SSODetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_getvmhostpayload.go b/resource-manager/dynatrace/2021-09-01/monitors/method_getvmhostpayload.go index 01c2ecbf390..9e78d397ded 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_getvmhostpayload.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_getvmhostpayload.go @@ -46,7 +46,6 @@ func (c MonitorsClient) GetVMHostPayload(ctx context.Context, id MonitorId) (res var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/method_update.go b/resource-manager/dynatrace/2021-09-01/monitors/method_update.go index 34b2ecab26d..c93b0c76d99 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/method_update.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/method_update.go @@ -49,7 +49,6 @@ func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input MonitorR var model MonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/monitors/version.go b/resource-manager/dynatrace/2021-09-01/monitors/version.go index dbd3dc1f408..c9493523f74 100644 --- a/resource-manager/dynatrace/2021-09-01/monitors/version.go +++ b/resource-manager/dynatrace/2021-09-01/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2021-09-01" } diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/README.md b/resource-manager/dynatrace/2021-09-01/singlesignon/README.md index d23691357bf..ac7231170a0 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/README.md +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2021-09-01/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2021-09-01`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2021-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/client.go b/resource-manager/dynatrace/2021-09-01/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/client.go +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/id_monitor.go b/resource-manager/dynatrace/2021-09-01/singlesignon/id_monitor.go index 46ca5a6948f..eba5b05da59 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/id_monitor.go +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/id_singlesignonconfiguration.go b/resource-manager/dynatrace/2021-09-01/singlesignon/id_singlesignonconfiguration.go index 933d37a3196..87deaf88868 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/method_get.go b/resource-manager/dynatrace/2021-09-01/singlesignon/method_get.go index d660d24fd5f..c60f802d9b0 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/method_get.go +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/method_get.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) Get(ctx context.Context, id SingleSignOnConfiguratio var model DynatraceSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/singlesignon/version.go b/resource-manager/dynatrace/2021-09-01/singlesignon/version.go index 9678a1307a5..6a5182b4e35 100644 --- a/resource-manager/dynatrace/2021-09-01/singlesignon/version.go +++ b/resource-manager/dynatrace/2021-09-01/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2021-09-01" } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/README.md b/resource-manager/dynatrace/2021-09-01/tagrules/README.md index eb398fe4b21..438da701738 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/README.md +++ b/resource-manager/dynatrace/2021-09-01/tagrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2021-09-01/tagrules` Documentation -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2021-09-01`). +The `tagrules` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2021-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/client.go b/resource-manager/dynatrace/2021-09-01/tagrules/client.go index e35a62f3116..1353e3786ef 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/client.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/client.go @@ -15,7 +15,7 @@ type TagRulesClient struct { } func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/id_monitor.go b/resource-manager/dynatrace/2021-09-01/tagrules/id_monitor.go index 60e03cef304..12e5c2e0a75 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/id_monitor.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/id_tagrule.go b/resource-manager/dynatrace/2021-09-01/tagrules/id_tagrule.go index faeeb87a934..5002af97ad7 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/id_tagrule.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/method_get.go b/resource-manager/dynatrace/2021-09-01/tagrules/method_get.go index 474586ae575..1e082f6ccfa 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/method_get.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/method_get.go @@ -45,7 +45,6 @@ func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperat var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/method_update.go b/resource-manager/dynatrace/2021-09-01/tagrules/method_update.go index 506548949c9..2d13398b167 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/method_update.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/method_update.go @@ -49,7 +49,6 @@ func (c TagRulesClient) Update(ctx context.Context, id TagRuleId, input TagRuleU var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2021-09-01/tagrules/version.go b/resource-manager/dynatrace/2021-09-01/tagrules/version.go index 5fd691ca300..0163b3c4334 100644 --- a/resource-manager/dynatrace/2021-09-01/tagrules/version.go +++ b/resource-manager/dynatrace/2021-09-01/tagrules/version.go @@ -1,12 +1,10 @@ package tagrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagrules/2021-09-01" } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/README.md b/resource-manager/dynatrace/2023-04-27/monitors/README.md index 87625dddaf5..e4ab29d325c 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/README.md +++ b/resource-manager/dynatrace/2023-04-27/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2023-04-27/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2023-04-27`). +The `monitors` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2023-04-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2023-04-27/monitors/client.go b/resource-manager/dynatrace/2023-04-27/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/client.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/id_monitor.go b/resource-manager/dynatrace/2023-04-27/monitors/id_monitor.go index aa9e7fd99c8..3bcd7e5590e 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/id_monitor.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_get.go b/resource-manager/dynatrace/2023-04-27/monitors/method_get.go index 5ec643af703..f5544383fcf 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_get.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model MonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_getmarketplacesaasresourcedetails.go b/resource-manager/dynatrace/2023-04-27/monitors/method_getmarketplacesaasresourcedetails.go index 1374ad6614c..40e8b292162 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_getmarketplacesaasresourcedetails.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_getmarketplacesaasresourcedetails.go @@ -51,7 +51,6 @@ func (c MonitorsClient) GetMarketplaceSaaSResourceDetails(ctx context.Context, i var model MarketplaceSaaSResourceDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_getmetricstatus.go b/resource-manager/dynatrace/2023-04-27/monitors/method_getmetricstatus.go index f44d519aa96..7af50028340 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_getmetricstatus.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_getmetricstatus.go @@ -46,7 +46,6 @@ func (c MonitorsClient) GetMetricStatus(ctx context.Context, id MonitorId) (resu var model MetricsStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_getssodetails.go b/resource-manager/dynatrace/2023-04-27/monitors/method_getssodetails.go index 9532f634fe8..517d1f103ce 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_getssodetails.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_getssodetails.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetSSODetails(ctx context.Context, id MonitorId, input S var model SSODetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_getvmhostpayload.go b/resource-manager/dynatrace/2023-04-27/monitors/method_getvmhostpayload.go index 01c2ecbf390..9e78d397ded 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_getvmhostpayload.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_getvmhostpayload.go @@ -46,7 +46,6 @@ func (c MonitorsClient) GetVMHostPayload(ctx context.Context, id MonitorId) (res var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/method_update.go b/resource-manager/dynatrace/2023-04-27/monitors/method_update.go index 34b2ecab26d..c93b0c76d99 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/method_update.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/method_update.go @@ -49,7 +49,6 @@ func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input MonitorR var model MonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/monitors/version.go b/resource-manager/dynatrace/2023-04-27/monitors/version.go index ccc701b4a9e..003df71b2e4 100644 --- a/resource-manager/dynatrace/2023-04-27/monitors/version.go +++ b/resource-manager/dynatrace/2023-04-27/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2023-04-27" } diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/README.md b/resource-manager/dynatrace/2023-04-27/singlesignon/README.md index 0bdd6c87103..3786ba0d4d6 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/README.md +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2023-04-27/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2023-04-27`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2023-04-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/client.go b/resource-manager/dynatrace/2023-04-27/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/client.go +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/id_monitor.go b/resource-manager/dynatrace/2023-04-27/singlesignon/id_monitor.go index 46ca5a6948f..eba5b05da59 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/id_monitor.go +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/id_singlesignonconfiguration.go b/resource-manager/dynatrace/2023-04-27/singlesignon/id_singlesignonconfiguration.go index 933d37a3196..87deaf88868 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/method_get.go b/resource-manager/dynatrace/2023-04-27/singlesignon/method_get.go index d660d24fd5f..c60f802d9b0 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/method_get.go +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/method_get.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) Get(ctx context.Context, id SingleSignOnConfiguratio var model DynatraceSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/singlesignon/version.go b/resource-manager/dynatrace/2023-04-27/singlesignon/version.go index 7ac154d384e..a85235f0b95 100644 --- a/resource-manager/dynatrace/2023-04-27/singlesignon/version.go +++ b/resource-manager/dynatrace/2023-04-27/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2023-04-27" } diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/README.md b/resource-manager/dynatrace/2023-04-27/tagrules/README.md index 5c8d3012d6c..020da66af2d 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/README.md +++ b/resource-manager/dynatrace/2023-04-27/tagrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/dynatrace/2023-04-27/tagrules` Documentation -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `dynatrace` (API Version `2023-04-27`). +The `tagrules` SDK allows for interaction with Azure Resource Manager `dynatrace` (API Version `2023-04-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/client.go b/resource-manager/dynatrace/2023-04-27/tagrules/client.go index e35a62f3116..1353e3786ef 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/client.go +++ b/resource-manager/dynatrace/2023-04-27/tagrules/client.go @@ -15,7 +15,7 @@ type TagRulesClient struct { } func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) } diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/id_monitor.go b/resource-manager/dynatrace/2023-04-27/tagrules/id_monitor.go index 60e03cef304..12e5c2e0a75 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/id_monitor.go +++ b/resource-manager/dynatrace/2023-04-27/tagrules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/id_tagrule.go b/resource-manager/dynatrace/2023-04-27/tagrules/id_tagrule.go index faeeb87a934..5002af97ad7 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/id_tagrule.go +++ b/resource-manager/dynatrace/2023-04-27/tagrules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/method_get.go b/resource-manager/dynatrace/2023-04-27/tagrules/method_get.go index 474586ae575..1e082f6ccfa 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/method_get.go +++ b/resource-manager/dynatrace/2023-04-27/tagrules/method_get.go @@ -45,7 +45,6 @@ func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperat var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/dynatrace/2023-04-27/tagrules/version.go b/resource-manager/dynatrace/2023-04-27/tagrules/version.go index ec9c2f5f6c0..330c91cdf57 100644 --- a/resource-manager/dynatrace/2023-04-27/tagrules/version.go +++ b/resource-manager/dynatrace/2023-04-27/tagrules/version.go @@ -1,12 +1,10 @@ package tagrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagrules/2023-04-27" } diff --git a/resource-manager/elastic/2023-06-01/apikey/README.md b/resource-manager/elastic/2023-06-01/apikey/README.md index e0a55f798fe..1cdf6a3b10b 100644 --- a/resource-manager/elastic/2023-06-01/apikey/README.md +++ b/resource-manager/elastic/2023-06-01/apikey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/apikey` Documentation -The `apikey` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `apikey` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/apikey/client.go b/resource-manager/elastic/2023-06-01/apikey/client.go index ed977c4ea4e..94ca415d9d6 100644 --- a/resource-manager/elastic/2023-06-01/apikey/client.go +++ b/resource-manager/elastic/2023-06-01/apikey/client.go @@ -15,7 +15,7 @@ type ApiKeyClient struct { } func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apikey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/apikey/method_organizationsgetapikey.go b/resource-manager/elastic/2023-06-01/apikey/method_organizationsgetapikey.go index 691dcbe7d66..6bd78299be4 100644 --- a/resource-manager/elastic/2023-06-01/apikey/method_organizationsgetapikey.go +++ b/resource-manager/elastic/2023-06-01/apikey/method_organizationsgetapikey.go @@ -51,7 +51,6 @@ func (c ApiKeyClient) OrganizationsGetApiKey(ctx context.Context, id commonids.S var model UserApiKeyResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/apikey/version.go b/resource-manager/elastic/2023-06-01/apikey/version.go index 2b6f7682b3f..46c1a08a82c 100644 --- a/resource-manager/elastic/2023-06-01/apikey/version.go +++ b/resource-manager/elastic/2023-06-01/apikey/version.go @@ -1,12 +1,10 @@ package apikey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apikey/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/README.md b/resource-manager/elastic/2023-06-01/deploymentinfo/README.md index 3251ff158a6..8509ab207b0 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/README.md +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/deploymentinfo` Documentation -The `deploymentinfo` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `deploymentinfo` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/client.go b/resource-manager/elastic/2023-06-01/deploymentinfo/client.go index 2b4227f27e7..f1df604d1cf 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/client.go +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/client.go @@ -15,7 +15,7 @@ type DeploymentInfoClient struct { } func NewDeploymentInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentInfoClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/id_monitor.go b/resource-manager/elastic/2023-06-01/deploymentinfo/id_monitor.go index eb5926e1b61..ad6bc10a71d 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/method_externalusercreateorupdate.go b/resource-manager/elastic/2023-06-01/deploymentinfo/method_externalusercreateorupdate.go index db1a962e906..65805543705 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/method_externalusercreateorupdate.go +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/method_externalusercreateorupdate.go @@ -50,7 +50,6 @@ func (c DeploymentInfoClient) ExternalUserCreateOrUpdate(ctx context.Context, id var model ExternalUserCreationResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/method_list.go b/resource-manager/elastic/2023-06-01/deploymentinfo/method_list.go index 09e34cb2d78..0545c033b91 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/method_list.go +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/method_list.go @@ -46,7 +46,6 @@ func (c DeploymentInfoClient) List(ctx context.Context, id MonitorId) (result Li var model DeploymentInfoResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/deploymentinfo/version.go b/resource-manager/elastic/2023-06-01/deploymentinfo/version.go index 387f1cc7143..1120eeb661c 100644 --- a/resource-manager/elastic/2023-06-01/deploymentinfo/version.go +++ b/resource-manager/elastic/2023-06-01/deploymentinfo/version.go @@ -1,12 +1,10 @@ package deploymentinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentinfo/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/deploymentupdate/README.md b/resource-manager/elastic/2023-06-01/deploymentupdate/README.md index c8010bc32d5..d97beccd1ea 100644 --- a/resource-manager/elastic/2023-06-01/deploymentupdate/README.md +++ b/resource-manager/elastic/2023-06-01/deploymentupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/deploymentupdate` Documentation -The `deploymentupdate` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `deploymentupdate` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/deploymentupdate/client.go b/resource-manager/elastic/2023-06-01/deploymentupdate/client.go index 82bea8ab871..5972cd22c91 100644 --- a/resource-manager/elastic/2023-06-01/deploymentupdate/client.go +++ b/resource-manager/elastic/2023-06-01/deploymentupdate/client.go @@ -15,7 +15,7 @@ type DeploymentUpdateClient struct { } func NewDeploymentUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentUpdateClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/deploymentupdate/id_monitor.go b/resource-manager/elastic/2023-06-01/deploymentupdate/id_monitor.go index c8f65b797bb..642095c33ec 100644 --- a/resource-manager/elastic/2023-06-01/deploymentupdate/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/deploymentupdate/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/deploymentupdate/version.go b/resource-manager/elastic/2023-06-01/deploymentupdate/version.go index 90383db27cc..e7f1f3e59dc 100644 --- a/resource-manager/elastic/2023-06-01/deploymentupdate/version.go +++ b/resource-manager/elastic/2023-06-01/deploymentupdate/version.go @@ -1,12 +1,10 @@ package deploymentupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentupdate/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/elasticversions/README.md b/resource-manager/elastic/2023-06-01/elasticversions/README.md index 46e5dbc0e01..b636b529ec7 100644 --- a/resource-manager/elastic/2023-06-01/elasticversions/README.md +++ b/resource-manager/elastic/2023-06-01/elasticversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/elasticversions` Documentation -The `elasticversions` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `elasticversions` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/elasticversions/client.go b/resource-manager/elastic/2023-06-01/elasticversions/client.go index ad6a0af7662..3cd8eebe143 100644 --- a/resource-manager/elastic/2023-06-01/elasticversions/client.go +++ b/resource-manager/elastic/2023-06-01/elasticversions/client.go @@ -15,7 +15,7 @@ type ElasticVersionsClient struct { } func NewElasticVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticVersionsClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/elasticversions/method_list.go b/resource-manager/elastic/2023-06-01/elasticversions/method_list.go index 28ee1ce4701..850b57e42b4 100644 --- a/resource-manager/elastic/2023-06-01/elasticversions/method_list.go +++ b/resource-manager/elastic/2023-06-01/elasticversions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/elasticversions/version.go b/resource-manager/elastic/2023-06-01/elasticversions/version.go index 59660163507..83cdaef782d 100644 --- a/resource-manager/elastic/2023-06-01/elasticversions/version.go +++ b/resource-manager/elastic/2023-06-01/elasticversions/version.go @@ -1,12 +1,10 @@ package elasticversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticversions/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/README.md b/resource-manager/elastic/2023-06-01/monitoredresources/README.md index a8a97b06dd7..7c0b9345418 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/README.md +++ b/resource-manager/elastic/2023-06-01/monitoredresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitoredresources` Documentation -The `monitoredresources` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `monitoredresources` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/client.go b/resource-manager/elastic/2023-06-01/monitoredresources/client.go index 68ce9836cd7..8548ed2734d 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/client.go +++ b/resource-manager/elastic/2023-06-01/monitoredresources/client.go @@ -15,7 +15,7 @@ type MonitoredResourcesClient struct { } func NewMonitoredResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredResourcesClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/id_monitor.go b/resource-manager/elastic/2023-06-01/monitoredresources/id_monitor.go index 2a7db7db03a..3bb45eb2e84 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/monitoredresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/monitoredresources/version.go b/resource-manager/elastic/2023-06-01/monitoredresources/version.go index 88a33a7424b..d23d9534247 100644 --- a/resource-manager/elastic/2023-06-01/monitoredresources/version.go +++ b/resource-manager/elastic/2023-06-01/monitoredresources/version.go @@ -1,12 +1,10 @@ package monitoredresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredresources/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/README.md b/resource-manager/elastic/2023-06-01/monitorsresource/README.md index 6eea80a7ed0..070a2c55318 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/README.md +++ b/resource-manager/elastic/2023-06-01/monitorsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorsresource` Documentation -The `monitorsresource` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `monitorsresource` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/client.go b/resource-manager/elastic/2023-06-01/monitorsresource/client.go index be6f7acb94b..5e8ae38cada 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/client.go +++ b/resource-manager/elastic/2023-06-01/monitorsresource/client.go @@ -15,7 +15,7 @@ type MonitorsResourceClient struct { } func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsResourceClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go b/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go index 815b17016f7..f09e0ce38cf 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/monitorsresource/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsget.go b/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsget.go index f2e6c29cd08..82247400b1b 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsget.go +++ b/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsget.go @@ -45,7 +45,6 @@ func (c MonitorsResourceClient) MonitorsGet(ctx context.Context, id MonitorId) ( var model ElasticMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsupdate.go b/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsupdate.go index 571324a755d..01012e27e88 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsupdate.go +++ b/resource-manager/elastic/2023-06-01/monitorsresource/method_monitorsupdate.go @@ -49,7 +49,6 @@ func (c MonitorsResourceClient) MonitorsUpdate(ctx context.Context, id MonitorId var model ElasticMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/monitorsresource/version.go b/resource-manager/elastic/2023-06-01/monitorsresource/version.go index 55e2321d8fb..07f1820a044 100644 --- a/resource-manager/elastic/2023-06-01/monitorsresource/version.go +++ b/resource-manager/elastic/2023-06-01/monitorsresource/version.go @@ -1,12 +1,10 @@ package monitorsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorsresource/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/monitorupgradableversions/README.md b/resource-manager/elastic/2023-06-01/monitorupgradableversions/README.md index 121a1387f6b..38c2c8cb2d3 100644 --- a/resource-manager/elastic/2023-06-01/monitorupgradableversions/README.md +++ b/resource-manager/elastic/2023-06-01/monitorupgradableversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/monitorupgradableversions` Documentation -The `monitorupgradableversions` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `monitorupgradableversions` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/monitorupgradableversions/client.go b/resource-manager/elastic/2023-06-01/monitorupgradableversions/client.go index 925c2b92378..1872e366595 100644 --- a/resource-manager/elastic/2023-06-01/monitorupgradableversions/client.go +++ b/resource-manager/elastic/2023-06-01/monitorupgradableversions/client.go @@ -15,7 +15,7 @@ type MonitorUpgradableVersionsClient struct { } func NewMonitorUpgradableVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorUpgradableVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorupgradableversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorupgradableversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorUpgradableVersionsClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/monitorupgradableversions/id_monitor.go b/resource-manager/elastic/2023-06-01/monitorupgradableversions/id_monitor.go index 1742c3cbaad..f6bd1c71f4b 100644 --- a/resource-manager/elastic/2023-06-01/monitorupgradableversions/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/monitorupgradableversions/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/monitorupgradableversions/method_upgradableversionsdetails.go b/resource-manager/elastic/2023-06-01/monitorupgradableversions/method_upgradableversionsdetails.go index 2d2ea1fa221..4b27234bdfa 100644 --- a/resource-manager/elastic/2023-06-01/monitorupgradableversions/method_upgradableversionsdetails.go +++ b/resource-manager/elastic/2023-06-01/monitorupgradableversions/method_upgradableversionsdetails.go @@ -46,7 +46,6 @@ func (c MonitorUpgradableVersionsClient) UpgradableVersionsDetails(ctx context.C var model UpgradableVersionsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/monitorupgradableversions/version.go b/resource-manager/elastic/2023-06-01/monitorupgradableversions/version.go index 68c1769ab07..149d7a3f96a 100644 --- a/resource-manager/elastic/2023-06-01/monitorupgradableversions/version.go +++ b/resource-manager/elastic/2023-06-01/monitorupgradableversions/version.go @@ -1,12 +1,10 @@ package monitorupgradableversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorupgradableversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorupgradableversions/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/rules/README.md b/resource-manager/elastic/2023-06-01/rules/README.md index 9e7c2787680..e3e5d142d24 100644 --- a/resource-manager/elastic/2023-06-01/rules/README.md +++ b/resource-manager/elastic/2023-06-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/rules/client.go b/resource-manager/elastic/2023-06-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/elastic/2023-06-01/rules/client.go +++ b/resource-manager/elastic/2023-06-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/rules/id_monitor.go b/resource-manager/elastic/2023-06-01/rules/id_monitor.go index 92796420eb8..a85088805b3 100644 --- a/resource-manager/elastic/2023-06-01/rules/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/rules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/rules/id_tagrule.go b/resource-manager/elastic/2023-06-01/rules/id_tagrule.go index ae68440b271..996c43a6b03 100644 --- a/resource-manager/elastic/2023-06-01/rules/id_tagrule.go +++ b/resource-manager/elastic/2023-06-01/rules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/rules/method_tagrulescreateorupdate.go b/resource-manager/elastic/2023-06-01/rules/method_tagrulescreateorupdate.go index fcb1b93a265..5ddded602ce 100644 --- a/resource-manager/elastic/2023-06-01/rules/method_tagrulescreateorupdate.go +++ b/resource-manager/elastic/2023-06-01/rules/method_tagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, i var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/rules/method_tagrulesget.go b/resource-manager/elastic/2023-06-01/rules/method_tagrulesget.go index 680b675fa8b..86d73a88c56 100644 --- a/resource-manager/elastic/2023-06-01/rules/method_tagrulesget.go +++ b/resource-manager/elastic/2023-06-01/rules/method_tagrulesget.go @@ -45,7 +45,6 @@ func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagR var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/rules/version.go b/resource-manager/elastic/2023-06-01/rules/version.go index 6802d0f6a13..037b2fd0eb3 100644 --- a/resource-manager/elastic/2023-06-01/rules/version.go +++ b/resource-manager/elastic/2023-06-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/README.md b/resource-manager/elastic/2023-06-01/trafficfilter/README.md index 417316ed775..e5a181e3870 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/README.md +++ b/resource-manager/elastic/2023-06-01/trafficfilter/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/trafficfilter` Documentation -The `trafficfilter` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `trafficfilter` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/client.go b/resource-manager/elastic/2023-06-01/trafficfilter/client.go index f9869044078..0b39aea9367 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/client.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/client.go @@ -15,7 +15,7 @@ type TrafficFilterClient struct { } func NewTrafficFilterClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficFilterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficfilter", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficfilter", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficFilterClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/id_monitor.go b/resource-manager/elastic/2023-06-01/trafficfilter/id_monitor.go index 761d3533801..8d5a430f2ac 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_alltrafficfilterslist.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_alltrafficfilterslist.go index 2c0df1c8c3e..a65bab4de5b 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_alltrafficfilterslist.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_alltrafficfilterslist.go @@ -46,7 +46,6 @@ func (c TrafficFilterClient) AllTrafficFilterslist(ctx context.Context, id Monit var model ElasticTrafficFilterResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_associatetrafficfilterassociate.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_associatetrafficfilterassociate.go index f352f0bf59a..3a8b953db80 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_associatetrafficfilterassociate.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_associatetrafficfilterassociate.go @@ -36,6 +36,7 @@ func (o AssociateTrafficFilterAssociateOperationOptions) ToHeaders() *client.Hea func (o AssociateTrafficFilterAssociateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateipfiltercreate.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateipfiltercreate.go index 1ef08b568b9..66ae305b199 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateipfiltercreate.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateipfiltercreate.go @@ -37,6 +37,7 @@ func (o CreateAndAssociateIPFilterCreateOperationOptions) ToHeaders() *client.He func (o CreateAndAssociateIPFilterCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateplfiltercreate.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateplfiltercreate.go index 10af333d4a0..2bbd832c3d2 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateplfiltercreate.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_createandassociateplfiltercreate.go @@ -38,6 +38,7 @@ func (o CreateAndAssociatePLFilterCreateOperationOptions) ToHeaders() *client.He func (o CreateAndAssociatePLFilterCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_delete.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_delete.go index e3539d97044..e52564353c4 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_delete.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go index b6de18ba3b4..4f227e7e31c 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go @@ -33,6 +33,7 @@ func (o DetachAndDeleteTrafficFilterDeleteOperationOptions) ToHeaders() *client. func (o DetachAndDeleteTrafficFilterDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_detachtrafficfilterupdate.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_detachtrafficfilterupdate.go index db8fe54452c..5248573771d 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_detachtrafficfilterupdate.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_detachtrafficfilterupdate.go @@ -36,6 +36,7 @@ func (o DetachTrafficFilterUpdateOperationOptions) ToHeaders() *client.Headers { func (o DetachTrafficFilterUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/method_listassociatedtrafficfilterslist.go b/resource-manager/elastic/2023-06-01/trafficfilter/method_listassociatedtrafficfilterslist.go index 2c6927e0e8b..05504af95f0 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/method_listassociatedtrafficfilterslist.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/method_listassociatedtrafficfilterslist.go @@ -46,7 +46,6 @@ func (c TrafficFilterClient) ListAssociatedTrafficFilterslist(ctx context.Contex var model ElasticTrafficFilterResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/trafficfilter/version.go b/resource-manager/elastic/2023-06-01/trafficfilter/version.go index ddf3475a3dd..6d69bae0cf6 100644 --- a/resource-manager/elastic/2023-06-01/trafficfilter/version.go +++ b/resource-manager/elastic/2023-06-01/trafficfilter/version.go @@ -1,12 +1,10 @@ package trafficfilter -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficfilter/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficfilter/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/vmcollectionupdate/README.md b/resource-manager/elastic/2023-06-01/vmcollectionupdate/README.md index 4a64d64f294..a7b9851dfa0 100644 --- a/resource-manager/elastic/2023-06-01/vmcollectionupdate/README.md +++ b/resource-manager/elastic/2023-06-01/vmcollectionupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/vmcollectionupdate` Documentation -The `vmcollectionupdate` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `vmcollectionupdate` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/vmcollectionupdate/client.go b/resource-manager/elastic/2023-06-01/vmcollectionupdate/client.go index 3aa9645389c..0aea8405556 100644 --- a/resource-manager/elastic/2023-06-01/vmcollectionupdate/client.go +++ b/resource-manager/elastic/2023-06-01/vmcollectionupdate/client.go @@ -15,7 +15,7 @@ type VMCollectionUpdateClient struct { } func NewVMCollectionUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*VMCollectionUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmcollectionupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmcollectionupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMCollectionUpdateClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/vmcollectionupdate/id_monitor.go b/resource-manager/elastic/2023-06-01/vmcollectionupdate/id_monitor.go index f0aa1bef1ab..8f42699c8c6 100644 --- a/resource-manager/elastic/2023-06-01/vmcollectionupdate/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/vmcollectionupdate/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/vmcollectionupdate/version.go b/resource-manager/elastic/2023-06-01/vmcollectionupdate/version.go index 05a9cec0fcd..2cced12a225 100644 --- a/resource-manager/elastic/2023-06-01/vmcollectionupdate/version.go +++ b/resource-manager/elastic/2023-06-01/vmcollectionupdate/version.go @@ -1,12 +1,10 @@ package vmcollectionupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmcollectionupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmcollectionupdate/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/README.md b/resource-manager/elastic/2023-06-01/vmhhostlist/README.md index c715d89d4b2..186eb1fb7df 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/README.md +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/vmhhostlist` Documentation -The `vmhhostlist` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `vmhhostlist` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/client.go b/resource-manager/elastic/2023-06-01/vmhhostlist/client.go index 43094fe966f..a1562a2b921 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/client.go +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/client.go @@ -15,7 +15,7 @@ type VMHHostListClient struct { } func NewVMHHostListClientWithBaseURI(sdkApi sdkEnv.Api) (*VMHHostListClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmhhostlist", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmhhostlist", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMHHostListClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/id_monitor.go b/resource-manager/elastic/2023-06-01/vmhhostlist/id_monitor.go index 91a1adc12f6..d34022d2f8a 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/vmhhostlist/version.go b/resource-manager/elastic/2023-06-01/vmhhostlist/version.go index c75503c4c68..19031cd7dd8 100644 --- a/resource-manager/elastic/2023-06-01/vmhhostlist/version.go +++ b/resource-manager/elastic/2023-06-01/vmhhostlist/version.go @@ -1,12 +1,10 @@ package vmhhostlist -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmhhostlist/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmhhostlist/2023-06-01" } diff --git a/resource-manager/elastic/2023-06-01/vmingestiondetails/README.md b/resource-manager/elastic/2023-06-01/vmingestiondetails/README.md index 6d64c2308ce..93bba7582c0 100644 --- a/resource-manager/elastic/2023-06-01/vmingestiondetails/README.md +++ b/resource-manager/elastic/2023-06-01/vmingestiondetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2023-06-01/vmingestiondetails` Documentation -The `vmingestiondetails` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2023-06-01`). +The `vmingestiondetails` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2023-06-01/vmingestiondetails/client.go b/resource-manager/elastic/2023-06-01/vmingestiondetails/client.go index 81bde58e568..bcac0a9b6e2 100644 --- a/resource-manager/elastic/2023-06-01/vmingestiondetails/client.go +++ b/resource-manager/elastic/2023-06-01/vmingestiondetails/client.go @@ -15,7 +15,7 @@ type VMIngestionDetailsClient struct { } func NewVMIngestionDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*VMIngestionDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmingestiondetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmingestiondetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMIngestionDetailsClient: %+v", err) } diff --git a/resource-manager/elastic/2023-06-01/vmingestiondetails/id_monitor.go b/resource-manager/elastic/2023-06-01/vmingestiondetails/id_monitor.go index 7e05c2fb54e..ca3eff4e85e 100644 --- a/resource-manager/elastic/2023-06-01/vmingestiondetails/id_monitor.go +++ b/resource-manager/elastic/2023-06-01/vmingestiondetails/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2023-06-01/vmingestiondetails/method_vmingestiondetails.go b/resource-manager/elastic/2023-06-01/vmingestiondetails/method_vmingestiondetails.go index 692e653dbd7..ab106ec8c3c 100644 --- a/resource-manager/elastic/2023-06-01/vmingestiondetails/method_vmingestiondetails.go +++ b/resource-manager/elastic/2023-06-01/vmingestiondetails/method_vmingestiondetails.go @@ -46,7 +46,6 @@ func (c VMIngestionDetailsClient) VMIngestionDetails(ctx context.Context, id Mon var model VMIngestionDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2023-06-01/vmingestiondetails/version.go b/resource-manager/elastic/2023-06-01/vmingestiondetails/version.go index a3048f6b77e..378e2f6d73b 100644 --- a/resource-manager/elastic/2023-06-01/vmingestiondetails/version.go +++ b/resource-manager/elastic/2023-06-01/vmingestiondetails/version.go @@ -1,12 +1,10 @@ package vmingestiondetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmingestiondetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmingestiondetails/2023-06-01" } diff --git a/resource-manager/elastic/2024-03-01/apikey/README.md b/resource-manager/elastic/2024-03-01/apikey/README.md index 7653fa34a65..660623c0b2e 100644 --- a/resource-manager/elastic/2024-03-01/apikey/README.md +++ b/resource-manager/elastic/2024-03-01/apikey/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/apikey` Documentation -The `apikey` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `apikey` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/apikey/client.go b/resource-manager/elastic/2024-03-01/apikey/client.go index ed977c4ea4e..94ca415d9d6 100644 --- a/resource-manager/elastic/2024-03-01/apikey/client.go +++ b/resource-manager/elastic/2024-03-01/apikey/client.go @@ -15,7 +15,7 @@ type ApiKeyClient struct { } func NewApiKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*ApiKeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apikey", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apikey", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApiKeyClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/apikey/method_organizationsgetapikey.go b/resource-manager/elastic/2024-03-01/apikey/method_organizationsgetapikey.go index 691dcbe7d66..6bd78299be4 100644 --- a/resource-manager/elastic/2024-03-01/apikey/method_organizationsgetapikey.go +++ b/resource-manager/elastic/2024-03-01/apikey/method_organizationsgetapikey.go @@ -51,7 +51,6 @@ func (c ApiKeyClient) OrganizationsGetApiKey(ctx context.Context, id commonids.S var model UserApiKeyResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/apikey/version.go b/resource-manager/elastic/2024-03-01/apikey/version.go index 71d6b782441..46d30383ea8 100644 --- a/resource-manager/elastic/2024-03-01/apikey/version.go +++ b/resource-manager/elastic/2024-03-01/apikey/version.go @@ -1,12 +1,10 @@ package apikey -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apikey/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apikey/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/connectedresources/README.md b/resource-manager/elastic/2024-03-01/connectedresources/README.md index 832dbd30d29..54ba5f6c6ed 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/README.md +++ b/resource-manager/elastic/2024-03-01/connectedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/connectedresources` Documentation -The `connectedresources` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `connectedresources` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/connectedresources/client.go b/resource-manager/elastic/2024-03-01/connectedresources/client.go index 8d9127d64d4..14585172530 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/client.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/client.go @@ -15,7 +15,7 @@ type ConnectedResourcesClient struct { } func NewConnectedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedResourcesClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/connectedresources/id_monitor.go b/resource-manager/elastic/2024-03-01/connectedresources/id_monitor.go index 7f341007489..a8eb43a2429 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/connectedresources/method_billinginfoget.go b/resource-manager/elastic/2024-03-01/connectedresources/method_billinginfoget.go index 19d2d7046e7..80f3b222b1d 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/method_billinginfoget.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/method_billinginfoget.go @@ -46,7 +46,6 @@ func (c ConnectedResourcesClient) BillingInfoGet(ctx context.Context, id Monitor var model BillingInfoResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/connectedresources/version.go b/resource-manager/elastic/2024-03-01/connectedresources/version.go index 5e27af42dca..3dd7d3d7a2b 100644 --- a/resource-manager/elastic/2024-03-01/connectedresources/version.go +++ b/resource-manager/elastic/2024-03-01/connectedresources/version.go @@ -1,12 +1,10 @@ package connectedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedresources/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/README.md b/resource-manager/elastic/2024-03-01/deploymentinfo/README.md index 692ee647dac..8474de47ac5 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/README.md +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/deploymentinfo` Documentation -The `deploymentinfo` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `deploymentinfo` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/client.go b/resource-manager/elastic/2024-03-01/deploymentinfo/client.go index 2b4227f27e7..f1df604d1cf 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/client.go +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/client.go @@ -15,7 +15,7 @@ type DeploymentInfoClient struct { } func NewDeploymentInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentInfoClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/id_monitor.go b/resource-manager/elastic/2024-03-01/deploymentinfo/id_monitor.go index eb5926e1b61..ad6bc10a71d 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/method_externalusercreateorupdate.go b/resource-manager/elastic/2024-03-01/deploymentinfo/method_externalusercreateorupdate.go index db1a962e906..65805543705 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/method_externalusercreateorupdate.go +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/method_externalusercreateorupdate.go @@ -50,7 +50,6 @@ func (c DeploymentInfoClient) ExternalUserCreateOrUpdate(ctx context.Context, id var model ExternalUserCreationResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/method_list.go b/resource-manager/elastic/2024-03-01/deploymentinfo/method_list.go index 09e34cb2d78..0545c033b91 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/method_list.go +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/method_list.go @@ -46,7 +46,6 @@ func (c DeploymentInfoClient) List(ctx context.Context, id MonitorId) (result Li var model DeploymentInfoResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/deploymentinfo/version.go b/resource-manager/elastic/2024-03-01/deploymentinfo/version.go index 6335e9e098f..5817f331519 100644 --- a/resource-manager/elastic/2024-03-01/deploymentinfo/version.go +++ b/resource-manager/elastic/2024-03-01/deploymentinfo/version.go @@ -1,12 +1,10 @@ package deploymentinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentinfo/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/deploymentupdate/README.md b/resource-manager/elastic/2024-03-01/deploymentupdate/README.md index 4bce062d145..d4cfbc3eca6 100644 --- a/resource-manager/elastic/2024-03-01/deploymentupdate/README.md +++ b/resource-manager/elastic/2024-03-01/deploymentupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/deploymentupdate` Documentation -The `deploymentupdate` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `deploymentupdate` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/deploymentupdate/client.go b/resource-manager/elastic/2024-03-01/deploymentupdate/client.go index 82bea8ab871..5972cd22c91 100644 --- a/resource-manager/elastic/2024-03-01/deploymentupdate/client.go +++ b/resource-manager/elastic/2024-03-01/deploymentupdate/client.go @@ -15,7 +15,7 @@ type DeploymentUpdateClient struct { } func NewDeploymentUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentUpdateClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/deploymentupdate/id_monitor.go b/resource-manager/elastic/2024-03-01/deploymentupdate/id_monitor.go index c8f65b797bb..642095c33ec 100644 --- a/resource-manager/elastic/2024-03-01/deploymentupdate/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/deploymentupdate/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/deploymentupdate/version.go b/resource-manager/elastic/2024-03-01/deploymentupdate/version.go index 9970c351a9b..8dfa383f8db 100644 --- a/resource-manager/elastic/2024-03-01/deploymentupdate/version.go +++ b/resource-manager/elastic/2024-03-01/deploymentupdate/version.go @@ -1,12 +1,10 @@ package deploymentupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentupdate/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/elasticversions/README.md b/resource-manager/elastic/2024-03-01/elasticversions/README.md index cb0d6730efc..68ad3a7f9fc 100644 --- a/resource-manager/elastic/2024-03-01/elasticversions/README.md +++ b/resource-manager/elastic/2024-03-01/elasticversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/elasticversions` Documentation -The `elasticversions` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `elasticversions` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/elasticversions/client.go b/resource-manager/elastic/2024-03-01/elasticversions/client.go index ad6a0af7662..3cd8eebe143 100644 --- a/resource-manager/elastic/2024-03-01/elasticversions/client.go +++ b/resource-manager/elastic/2024-03-01/elasticversions/client.go @@ -15,7 +15,7 @@ type ElasticVersionsClient struct { } func NewElasticVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticVersionsClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/elasticversions/method_list.go b/resource-manager/elastic/2024-03-01/elasticversions/method_list.go index 28ee1ce4701..850b57e42b4 100644 --- a/resource-manager/elastic/2024-03-01/elasticversions/method_list.go +++ b/resource-manager/elastic/2024-03-01/elasticversions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/elasticversions/version.go b/resource-manager/elastic/2024-03-01/elasticversions/version.go index 7243517cd43..94cb2ffc0f0 100644 --- a/resource-manager/elastic/2024-03-01/elasticversions/version.go +++ b/resource-manager/elastic/2024-03-01/elasticversions/version.go @@ -1,12 +1,10 @@ package elasticversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticversions/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/README.md b/resource-manager/elastic/2024-03-01/monitoredresources/README.md index 5bca629f1dd..b0abb504307 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/README.md +++ b/resource-manager/elastic/2024-03-01/monitoredresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitoredresources` Documentation -The `monitoredresources` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `monitoredresources` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/client.go b/resource-manager/elastic/2024-03-01/monitoredresources/client.go index 68ce9836cd7..8548ed2734d 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/client.go +++ b/resource-manager/elastic/2024-03-01/monitoredresources/client.go @@ -15,7 +15,7 @@ type MonitoredResourcesClient struct { } func NewMonitoredResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredResourcesClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/id_monitor.go b/resource-manager/elastic/2024-03-01/monitoredresources/id_monitor.go index 2a7db7db03a..3bb45eb2e84 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/monitoredresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/monitoredresources/version.go b/resource-manager/elastic/2024-03-01/monitoredresources/version.go index bf4f535cc6b..4960b277405 100644 --- a/resource-manager/elastic/2024-03-01/monitoredresources/version.go +++ b/resource-manager/elastic/2024-03-01/monitoredresources/version.go @@ -1,12 +1,10 @@ package monitoredresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredresources/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/README.md b/resource-manager/elastic/2024-03-01/monitorsresource/README.md index 50eb035f296..5a97aed1b63 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/README.md +++ b/resource-manager/elastic/2024-03-01/monitorsresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorsresource` Documentation -The `monitorsresource` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `monitorsresource` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/client.go b/resource-manager/elastic/2024-03-01/monitorsresource/client.go index be6f7acb94b..5e8ae38cada 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/client.go +++ b/resource-manager/elastic/2024-03-01/monitorsresource/client.go @@ -15,7 +15,7 @@ type MonitorsResourceClient struct { } func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorsresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorsresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsResourceClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/id_monitor.go b/resource-manager/elastic/2024-03-01/monitorsresource/id_monitor.go index 815b17016f7..f09e0ce38cf 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/monitorsresource/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsget.go b/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsget.go index f2e6c29cd08..82247400b1b 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsget.go +++ b/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsget.go @@ -45,7 +45,6 @@ func (c MonitorsResourceClient) MonitorsGet(ctx context.Context, id MonitorId) ( var model ElasticMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsupdate.go b/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsupdate.go index 571324a755d..01012e27e88 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsupdate.go +++ b/resource-manager/elastic/2024-03-01/monitorsresource/method_monitorsupdate.go @@ -49,7 +49,6 @@ func (c MonitorsResourceClient) MonitorsUpdate(ctx context.Context, id MonitorId var model ElasticMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/monitorsresource/version.go b/resource-manager/elastic/2024-03-01/monitorsresource/version.go index 98acd81ec5c..6b328136463 100644 --- a/resource-manager/elastic/2024-03-01/monitorsresource/version.go +++ b/resource-manager/elastic/2024-03-01/monitorsresource/version.go @@ -1,12 +1,10 @@ package monitorsresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorsresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorsresource/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/monitorupgradableversions/README.md b/resource-manager/elastic/2024-03-01/monitorupgradableversions/README.md index bb98026ad23..6bf4af5509c 100644 --- a/resource-manager/elastic/2024-03-01/monitorupgradableversions/README.md +++ b/resource-manager/elastic/2024-03-01/monitorupgradableversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorupgradableversions` Documentation -The `monitorupgradableversions` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `monitorupgradableversions` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/monitorupgradableversions/client.go b/resource-manager/elastic/2024-03-01/monitorupgradableversions/client.go index 925c2b92378..1872e366595 100644 --- a/resource-manager/elastic/2024-03-01/monitorupgradableversions/client.go +++ b/resource-manager/elastic/2024-03-01/monitorupgradableversions/client.go @@ -15,7 +15,7 @@ type MonitorUpgradableVersionsClient struct { } func NewMonitorUpgradableVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorUpgradableVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitorupgradableversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitorupgradableversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorUpgradableVersionsClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/monitorupgradableversions/id_monitor.go b/resource-manager/elastic/2024-03-01/monitorupgradableversions/id_monitor.go index 1742c3cbaad..f6bd1c71f4b 100644 --- a/resource-manager/elastic/2024-03-01/monitorupgradableversions/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/monitorupgradableversions/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/monitorupgradableversions/method_upgradableversionsdetails.go b/resource-manager/elastic/2024-03-01/monitorupgradableversions/method_upgradableversionsdetails.go index 2d2ea1fa221..4b27234bdfa 100644 --- a/resource-manager/elastic/2024-03-01/monitorupgradableversions/method_upgradableversionsdetails.go +++ b/resource-manager/elastic/2024-03-01/monitorupgradableversions/method_upgradableversionsdetails.go @@ -46,7 +46,6 @@ func (c MonitorUpgradableVersionsClient) UpgradableVersionsDetails(ctx context.C var model UpgradableVersionsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/monitorupgradableversions/version.go b/resource-manager/elastic/2024-03-01/monitorupgradableversions/version.go index c07611e94f9..9474241772f 100644 --- a/resource-manager/elastic/2024-03-01/monitorupgradableversions/version.go +++ b/resource-manager/elastic/2024-03-01/monitorupgradableversions/version.go @@ -1,12 +1,10 @@ package monitorupgradableversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitorupgradableversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitorupgradableversions/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/README.md b/resource-manager/elastic/2024-03-01/openaiintegration/README.md index 7c2f7b18a9e..b355ca1d5fc 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/README.md +++ b/resource-manager/elastic/2024-03-01/openaiintegration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/openaiintegration` Documentation -The `openaiintegration` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `openaiintegration` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/client.go b/resource-manager/elastic/2024-03-01/openaiintegration/client.go index 02a9e39421f..85276287c49 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/client.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/client.go @@ -15,7 +15,7 @@ type OpenAIIntegrationClient struct { } func NewOpenAIIntegrationClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenAIIntegrationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openaiintegration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openaiintegration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenAIIntegrationClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/id_monitor.go b/resource-manager/elastic/2024-03-01/openaiintegration/id_monitor.go index 06abd451e48..34260f669d1 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/id_openaiintegration.go b/resource-manager/elastic/2024-03-01/openaiintegration/id_openaiintegration.go index b8995653b3a..33521af1796 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/id_openaiintegration.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/id_openaiintegration.go @@ -44,7 +44,7 @@ func ParseOpenAIIntegrationID(input string) (*OpenAIIntegrationId, error) { } id := OpenAIIntegrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOpenAIIntegrationIDInsensitively(input string) (*OpenAIIntegrationId, } id := OpenAIIntegrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaicreateorupdate.go b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaicreateorupdate.go index 91179a49161..f2f69aca85b 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaicreateorupdate.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaicreateorupdate.go @@ -50,7 +50,6 @@ func (c OpenAIIntegrationClient) OpenAICreateOrUpdate(ctx context.Context, id Op var model OpenAIIntegrationRPModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaiget.go b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaiget.go index 8865940fde9..6050228302d 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaiget.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaiget.go @@ -45,7 +45,6 @@ func (c OpenAIIntegrationClient) OpenAIGet(ctx context.Context, id OpenAIIntegra var model OpenAIIntegrationRPModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaigetstatus.go b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaigetstatus.go index 89f9fde18ab..b8f97bb2a7f 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/method_openaigetstatus.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/method_openaigetstatus.go @@ -46,7 +46,6 @@ func (c OpenAIIntegrationClient) OpenAIGetStatus(ctx context.Context, id OpenAII var model OpenAIIntegrationStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/openaiintegration/version.go b/resource-manager/elastic/2024-03-01/openaiintegration/version.go index f71681d2ed9..8f8c79cdb16 100644 --- a/resource-manager/elastic/2024-03-01/openaiintegration/version.go +++ b/resource-manager/elastic/2024-03-01/openaiintegration/version.go @@ -1,12 +1,10 @@ package openaiintegration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openaiintegration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openaiintegration/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/rules/README.md b/resource-manager/elastic/2024-03-01/rules/README.md index 6df156a86cf..7ceb1133d1c 100644 --- a/resource-manager/elastic/2024-03-01/rules/README.md +++ b/resource-manager/elastic/2024-03-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/rules/client.go b/resource-manager/elastic/2024-03-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/elastic/2024-03-01/rules/client.go +++ b/resource-manager/elastic/2024-03-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/rules/id_monitor.go b/resource-manager/elastic/2024-03-01/rules/id_monitor.go index 92796420eb8..a85088805b3 100644 --- a/resource-manager/elastic/2024-03-01/rules/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/rules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/rules/id_tagrule.go b/resource-manager/elastic/2024-03-01/rules/id_tagrule.go index ae68440b271..996c43a6b03 100644 --- a/resource-manager/elastic/2024-03-01/rules/id_tagrule.go +++ b/resource-manager/elastic/2024-03-01/rules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/rules/method_tagrulescreateorupdate.go b/resource-manager/elastic/2024-03-01/rules/method_tagrulescreateorupdate.go index fcb1b93a265..5ddded602ce 100644 --- a/resource-manager/elastic/2024-03-01/rules/method_tagrulescreateorupdate.go +++ b/resource-manager/elastic/2024-03-01/rules/method_tagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) TagRulesCreateOrUpdate(ctx context.Context, id TagRuleId, i var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/rules/method_tagrulesget.go b/resource-manager/elastic/2024-03-01/rules/method_tagrulesget.go index 680b675fa8b..86d73a88c56 100644 --- a/resource-manager/elastic/2024-03-01/rules/method_tagrulesget.go +++ b/resource-manager/elastic/2024-03-01/rules/method_tagrulesget.go @@ -45,7 +45,6 @@ func (c RulesClient) TagRulesGet(ctx context.Context, id TagRuleId) (result TagR var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/rules/version.go b/resource-manager/elastic/2024-03-01/rules/version.go index ac911303df1..1d013bc332f 100644 --- a/resource-manager/elastic/2024-03-01/rules/version.go +++ b/resource-manager/elastic/2024-03-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/README.md b/resource-manager/elastic/2024-03-01/trafficfilter/README.md index 0154eb50ff4..b2d36efd875 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/README.md +++ b/resource-manager/elastic/2024-03-01/trafficfilter/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/trafficfilter` Documentation -The `trafficfilter` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `trafficfilter` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/client.go b/resource-manager/elastic/2024-03-01/trafficfilter/client.go index f9869044078..0b39aea9367 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/client.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/client.go @@ -15,7 +15,7 @@ type TrafficFilterClient struct { } func NewTrafficFilterClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficFilterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficfilter", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficfilter", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficFilterClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/id_monitor.go b/resource-manager/elastic/2024-03-01/trafficfilter/id_monitor.go index 761d3533801..8d5a430f2ac 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_alltrafficfilterslist.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_alltrafficfilterslist.go index 2c0df1c8c3e..a65bab4de5b 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_alltrafficfilterslist.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_alltrafficfilterslist.go @@ -46,7 +46,6 @@ func (c TrafficFilterClient) AllTrafficFilterslist(ctx context.Context, id Monit var model ElasticTrafficFilterResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_associatetrafficfilterassociate.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_associatetrafficfilterassociate.go index f352f0bf59a..3a8b953db80 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_associatetrafficfilterassociate.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_associatetrafficfilterassociate.go @@ -36,6 +36,7 @@ func (o AssociateTrafficFilterAssociateOperationOptions) ToHeaders() *client.Hea func (o AssociateTrafficFilterAssociateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateipfiltercreate.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateipfiltercreate.go index 1ef08b568b9..66ae305b199 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateipfiltercreate.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateipfiltercreate.go @@ -37,6 +37,7 @@ func (o CreateAndAssociateIPFilterCreateOperationOptions) ToHeaders() *client.He func (o CreateAndAssociateIPFilterCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateplfiltercreate.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateplfiltercreate.go index 10af333d4a0..2bbd832c3d2 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateplfiltercreate.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_createandassociateplfiltercreate.go @@ -38,6 +38,7 @@ func (o CreateAndAssociatePLFilterCreateOperationOptions) ToHeaders() *client.He func (o CreateAndAssociatePLFilterCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_delete.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_delete.go index e3539d97044..e52564353c4 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_delete.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go index b6de18ba3b4..4f227e7e31c 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_detachanddeletetrafficfilterdelete.go @@ -33,6 +33,7 @@ func (o DetachAndDeleteTrafficFilterDeleteOperationOptions) ToHeaders() *client. func (o DetachAndDeleteTrafficFilterDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_detachtrafficfilterupdate.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_detachtrafficfilterupdate.go index db8fe54452c..5248573771d 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_detachtrafficfilterupdate.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_detachtrafficfilterupdate.go @@ -36,6 +36,7 @@ func (o DetachTrafficFilterUpdateOperationOptions) ToHeaders() *client.Headers { func (o DetachTrafficFilterUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/method_listassociatedtrafficfilterslist.go b/resource-manager/elastic/2024-03-01/trafficfilter/method_listassociatedtrafficfilterslist.go index 2c6927e0e8b..05504af95f0 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/method_listassociatedtrafficfilterslist.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/method_listassociatedtrafficfilterslist.go @@ -46,7 +46,6 @@ func (c TrafficFilterClient) ListAssociatedTrafficFilterslist(ctx context.Contex var model ElasticTrafficFilterResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/trafficfilter/version.go b/resource-manager/elastic/2024-03-01/trafficfilter/version.go index 02b1740906f..dfca5d94afb 100644 --- a/resource-manager/elastic/2024-03-01/trafficfilter/version.go +++ b/resource-manager/elastic/2024-03-01/trafficfilter/version.go @@ -1,12 +1,10 @@ package trafficfilter -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficfilter/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficfilter/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/userorganization/README.md b/resource-manager/elastic/2024-03-01/userorganization/README.md index 7f15360528a..fbd6a95f803 100644 --- a/resource-manager/elastic/2024-03-01/userorganization/README.md +++ b/resource-manager/elastic/2024-03-01/userorganization/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/userorganization` Documentation -The `userorganization` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `userorganization` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/userorganization/client.go b/resource-manager/elastic/2024-03-01/userorganization/client.go index 7d98cbea8a6..59301aba9b1 100644 --- a/resource-manager/elastic/2024-03-01/userorganization/client.go +++ b/resource-manager/elastic/2024-03-01/userorganization/client.go @@ -15,7 +15,7 @@ type UserOrganizationClient struct { } func NewUserOrganizationClientWithBaseURI(sdkApi sdkEnv.Api) (*UserOrganizationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "userorganization", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "userorganization", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserOrganizationClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/userorganization/method_organizationsgetelastictoazuresubscriptionmapping.go b/resource-manager/elastic/2024-03-01/userorganization/method_organizationsgetelastictoazuresubscriptionmapping.go index 6c79c40ebe3..77e1c8850b0 100644 --- a/resource-manager/elastic/2024-03-01/userorganization/method_organizationsgetelastictoazuresubscriptionmapping.go +++ b/resource-manager/elastic/2024-03-01/userorganization/method_organizationsgetelastictoazuresubscriptionmapping.go @@ -47,7 +47,6 @@ func (c UserOrganizationClient) OrganizationsGetElasticToAzureSubscriptionMappin var model ElasticOrganizationToAzureSubscriptionMappingResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/userorganization/version.go b/resource-manager/elastic/2024-03-01/userorganization/version.go index e1bec06900c..fe011a0e3b4 100644 --- a/resource-manager/elastic/2024-03-01/userorganization/version.go +++ b/resource-manager/elastic/2024-03-01/userorganization/version.go @@ -1,12 +1,10 @@ package userorganization -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/userorganization/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/userorganization/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/vmcollectionupdate/README.md b/resource-manager/elastic/2024-03-01/vmcollectionupdate/README.md index 5e00e7199ca..9d9578fbfa3 100644 --- a/resource-manager/elastic/2024-03-01/vmcollectionupdate/README.md +++ b/resource-manager/elastic/2024-03-01/vmcollectionupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmcollectionupdate` Documentation -The `vmcollectionupdate` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `vmcollectionupdate` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/vmcollectionupdate/client.go b/resource-manager/elastic/2024-03-01/vmcollectionupdate/client.go index 3aa9645389c..0aea8405556 100644 --- a/resource-manager/elastic/2024-03-01/vmcollectionupdate/client.go +++ b/resource-manager/elastic/2024-03-01/vmcollectionupdate/client.go @@ -15,7 +15,7 @@ type VMCollectionUpdateClient struct { } func NewVMCollectionUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*VMCollectionUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmcollectionupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmcollectionupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMCollectionUpdateClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/vmcollectionupdate/id_monitor.go b/resource-manager/elastic/2024-03-01/vmcollectionupdate/id_monitor.go index f0aa1bef1ab..8f42699c8c6 100644 --- a/resource-manager/elastic/2024-03-01/vmcollectionupdate/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/vmcollectionupdate/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/vmcollectionupdate/version.go b/resource-manager/elastic/2024-03-01/vmcollectionupdate/version.go index 81e7a71d5b8..1a0a7c5d10f 100644 --- a/resource-manager/elastic/2024-03-01/vmcollectionupdate/version.go +++ b/resource-manager/elastic/2024-03-01/vmcollectionupdate/version.go @@ -1,12 +1,10 @@ package vmcollectionupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmcollectionupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmcollectionupdate/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/README.md b/resource-manager/elastic/2024-03-01/vmhhostlist/README.md index 4a80c122e1f..1c3dd465ad3 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/README.md +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmhhostlist` Documentation -The `vmhhostlist` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `vmhhostlist` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/client.go b/resource-manager/elastic/2024-03-01/vmhhostlist/client.go index 43094fe966f..a1562a2b921 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/client.go +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/client.go @@ -15,7 +15,7 @@ type VMHHostListClient struct { } func NewVMHHostListClientWithBaseURI(sdkApi sdkEnv.Api) (*VMHHostListClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmhhostlist", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmhhostlist", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMHHostListClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/id_monitor.go b/resource-manager/elastic/2024-03-01/vmhhostlist/id_monitor.go index 91a1adc12f6..d34022d2f8a 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/vmhhostlist/version.go b/resource-manager/elastic/2024-03-01/vmhhostlist/version.go index 6c3bbfd3005..f5b490f1630 100644 --- a/resource-manager/elastic/2024-03-01/vmhhostlist/version.go +++ b/resource-manager/elastic/2024-03-01/vmhhostlist/version.go @@ -1,12 +1,10 @@ package vmhhostlist -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmhhostlist/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmhhostlist/2024-03-01" } diff --git a/resource-manager/elastic/2024-03-01/vmingestiondetails/README.md b/resource-manager/elastic/2024-03-01/vmingestiondetails/README.md index 241fb5cec1f..f472ae5f6de 100644 --- a/resource-manager/elastic/2024-03-01/vmingestiondetails/README.md +++ b/resource-manager/elastic/2024-03-01/vmingestiondetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/vmingestiondetails` Documentation -The `vmingestiondetails` SDK allows for interaction with the Azure Resource Manager Service `elastic` (API Version `2024-03-01`). +The `vmingestiondetails` SDK allows for interaction with Azure Resource Manager `elastic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elastic/2024-03-01/vmingestiondetails/client.go b/resource-manager/elastic/2024-03-01/vmingestiondetails/client.go index 81bde58e568..bcac0a9b6e2 100644 --- a/resource-manager/elastic/2024-03-01/vmingestiondetails/client.go +++ b/resource-manager/elastic/2024-03-01/vmingestiondetails/client.go @@ -15,7 +15,7 @@ type VMIngestionDetailsClient struct { } func NewVMIngestionDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*VMIngestionDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmingestiondetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmingestiondetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMIngestionDetailsClient: %+v", err) } diff --git a/resource-manager/elastic/2024-03-01/vmingestiondetails/id_monitor.go b/resource-manager/elastic/2024-03-01/vmingestiondetails/id_monitor.go index 7e05c2fb54e..ca3eff4e85e 100644 --- a/resource-manager/elastic/2024-03-01/vmingestiondetails/id_monitor.go +++ b/resource-manager/elastic/2024-03-01/vmingestiondetails/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elastic/2024-03-01/vmingestiondetails/method_vmingestiondetails.go b/resource-manager/elastic/2024-03-01/vmingestiondetails/method_vmingestiondetails.go index 692e653dbd7..ab106ec8c3c 100644 --- a/resource-manager/elastic/2024-03-01/vmingestiondetails/method_vmingestiondetails.go +++ b/resource-manager/elastic/2024-03-01/vmingestiondetails/method_vmingestiondetails.go @@ -46,7 +46,6 @@ func (c VMIngestionDetailsClient) VMIngestionDetails(ctx context.Context, id Mon var model VMIngestionDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elastic/2024-03-01/vmingestiondetails/version.go b/resource-manager/elastic/2024-03-01/vmingestiondetails/version.go index 7c9e0c02f0e..d18664a2ae3 100644 --- a/resource-manager/elastic/2024-03-01/vmingestiondetails/version.go +++ b/resource-manager/elastic/2024-03-01/vmingestiondetails/version.go @@ -1,12 +1,10 @@ package vmingestiondetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmingestiondetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmingestiondetails/2024-03-01" } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsan/README.md b/resource-manager/elasticsan/2023-01-01/elasticsan/README.md index 7d7db5eeb45..49bf240e5be 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsan/README.md +++ b/resource-manager/elasticsan/2023-01-01/elasticsan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsan` Documentation -The `elasticsan` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `elasticsan` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/elasticsan/client.go b/resource-manager/elasticsan/2023-01-01/elasticsan/client.go index 07d3c911fda..305b677249f 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsan/client.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsan/client.go @@ -15,7 +15,7 @@ type ElasticSanClient struct { } func NewElasticSanClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSanClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsan/version.go b/resource-manager/elasticsan/2023-01-01/elasticsan/version.go index 53f9c751641..284f548bea9 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsan/version.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsan/version.go @@ -1,12 +1,10 @@ package elasticsan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsan/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsans/README.md b/resource-manager/elasticsan/2023-01-01/elasticsans/README.md index ac2dcc31fab..eeb7409751a 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsans/README.md +++ b/resource-manager/elasticsan/2023-01-01/elasticsans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsans` Documentation -The `elasticsans` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `elasticsans` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/elasticsans/client.go b/resource-manager/elasticsan/2023-01-01/elasticsans/client.go index 7d53b7b8f80..7e549be7f22 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsans/client.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsans/client.go @@ -15,7 +15,7 @@ type ElasticSansClient struct { } func NewElasticSansClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSansClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go b/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go index 96c3b243a41..973a0d818ac 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsans/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsans/method_get.go b/resource-manager/elasticsan/2023-01-01/elasticsans/method_get.go index 6d49cae4fd6..885d070fb62 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsans/method_get.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsans/method_get.go @@ -45,7 +45,6 @@ func (c ElasticSansClient) Get(ctx context.Context, id ElasticSanId) (result Get var model ElasticSan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsans/version.go b/resource-manager/elasticsan/2023-01-01/elasticsans/version.go index 7442b5b1eea..d7a85727eb4 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsans/version.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsans/version.go @@ -1,12 +1,10 @@ package elasticsans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsans/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsanskus/README.md b/resource-manager/elasticsan/2023-01-01/elasticsanskus/README.md index b7f55753fed..70e4bb28a62 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsanskus/README.md +++ b/resource-manager/elasticsan/2023-01-01/elasticsanskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/elasticsanskus` Documentation -The `elasticsanskus` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `elasticsanskus` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/elasticsanskus/client.go b/resource-manager/elasticsan/2023-01-01/elasticsanskus/client.go index d4389823bcd..009c76c1c7d 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsanskus/client.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsanskus/client.go @@ -15,7 +15,7 @@ type ElasticSanSkusClient struct { } func NewElasticSanSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSanSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsanskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsanskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSanSkusClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsanskus/method_skuslist.go b/resource-manager/elasticsan/2023-01-01/elasticsanskus/method_skuslist.go index 6dd24ff9f5d..f16c7058f3f 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsanskus/method_skuslist.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsanskus/method_skuslist.go @@ -40,6 +40,7 @@ func (o SkusListOperationOptions) ToHeaders() *client.Headers { func (o SkusListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2023-01-01/elasticsanskus/version.go b/resource-manager/elasticsan/2023-01-01/elasticsanskus/version.go index 6fe29bd763f..1a6fdc668b7 100644 --- a/resource-manager/elasticsan/2023-01-01/elasticsanskus/version.go +++ b/resource-manager/elasticsan/2023-01-01/elasticsanskus/version.go @@ -1,12 +1,10 @@ package elasticsanskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsanskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsanskus/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/README.md b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/README.md index 5d3309525e9..1626994e5dd 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/README.md +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/client.go b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/client.go +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go index 5a773a2db21..fda401f95c1 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go index df03de06af6..cb26887bd84 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/method_get.go b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/method_get.go +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/version.go b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/version.go index 9e2a36fc350..5963c7d52f2 100644 --- a/resource-manager/elasticsan/2023-01-01/privateendpointconnections/version.go +++ b/resource-manager/elasticsan/2023-01-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/privatelinkresources/README.md b/resource-manager/elasticsan/2023-01-01/privatelinkresources/README.md index 479b5d74172..d144850adfe 100644 --- a/resource-manager/elasticsan/2023-01-01/privatelinkresources/README.md +++ b/resource-manager/elasticsan/2023-01-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/privatelinkresources/client.go b/resource-manager/elasticsan/2023-01-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/elasticsan/2023-01-01/privatelinkresources/client.go +++ b/resource-manager/elasticsan/2023-01-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go b/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go index 0d188449dfd..49c7515be5b 100644 --- a/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go +++ b/resource-manager/elasticsan/2023-01-01/privatelinkresources/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/privatelinkresources/version.go b/resource-manager/elasticsan/2023-01-01/privatelinkresources/version.go index d020bb9e164..80e78c9dced 100644 --- a/resource-manager/elasticsan/2023-01-01/privatelinkresources/version.go +++ b/resource-manager/elasticsan/2023-01-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/README.md b/resource-manager/elasticsan/2023-01-01/snapshots/README.md index d034d1f85c5..11eeea7aae0 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/README.md +++ b/resource-manager/elasticsan/2023-01-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/client.go b/resource-manager/elasticsan/2023-01-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/client.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go b/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go index 3811be351d1..458e3829b24 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/id_snapshot.go @@ -46,7 +46,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go b/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go index 11de129a31d..488aebcdb1d 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotsget.go b/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotsget.go index 2eeb02debe8..b32c4c0ec89 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotsget.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotsget.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) VolumeSnapshotsGet(ctx context.Context, id SnapshotId) var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotslistbyvolumegroup.go b/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotslistbyvolumegroup.go index 44fdd973eed..36a122316b5 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotslistbyvolumegroup.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/method_volumesnapshotslistbyvolumegroup.go @@ -39,6 +39,7 @@ func (o VolumeSnapshotsListByVolumeGroupOperationOptions) ToHeaders() *client.He func (o VolumeSnapshotsListByVolumeGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2023-01-01/snapshots/version.go b/resource-manager/elasticsan/2023-01-01/snapshots/version.go index 49ad4ca9628..1089e0b7ca2 100644 --- a/resource-manager/elasticsan/2023-01-01/snapshots/version.go +++ b/resource-manager/elasticsan/2023-01-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/README.md b/resource-manager/elasticsan/2023-01-01/volumegroups/README.md index 1d5d9e9404d..7995a8976b2 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/README.md +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/client.go b/resource-manager/elasticsan/2023-01-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/client.go +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go b/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go index ac771fd8c56..a3d837044e1 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go b/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go index b242907ec55..3192f62ec69 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/method_get.go b/resource-manager/elasticsan/2023-01-01/volumegroups/method_get.go index f0ba94aae02..6e78fa5996a 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/method_get.go +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2023-01-01/volumegroups/version.go b/resource-manager/elasticsan/2023-01-01/volumegroups/version.go index 6f019279ed6..9a9273c92e0 100644 --- a/resource-manager/elasticsan/2023-01-01/volumegroups/version.go +++ b/resource-manager/elasticsan/2023-01-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2023-01-01" } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/README.md b/resource-manager/elasticsan/2023-01-01/volumes/README.md index b8aee90bfe5..0a31aa6fdc3 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/README.md +++ b/resource-manager/elasticsan/2023-01-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2023-01-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2023-01-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2023-01-01/volumes/client.go b/resource-manager/elasticsan/2023-01-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/client.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go b/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go index 5d0095734b8..48406666a37 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go b/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go index 788010600c0..f6c8ac8b180 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/method_delete.go b/resource-manager/elasticsan/2023-01-01/volumes/method_delete.go index 1ba07cae1c0..9c7e25c3a2c 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/method_delete.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/method_delete.go @@ -42,6 +42,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/method_get.go b/resource-manager/elasticsan/2023-01-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/method_get.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2023-01-01/volumes/version.go b/resource-manager/elasticsan/2023-01-01/volumes/version.go index 419311084b8..7a4ff5ba3c8 100644 --- a/resource-manager/elasticsan/2023-01-01/volumes/version.go +++ b/resource-manager/elasticsan/2023-01-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2023-01-01" } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsan/README.md b/resource-manager/elasticsan/2024-05-01/elasticsan/README.md index b9f280bc889..3aea7109e4f 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsan/README.md +++ b/resource-manager/elasticsan/2024-05-01/elasticsan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/elasticsan` Documentation -The `elasticsan` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `elasticsan` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/elasticsan/client.go b/resource-manager/elasticsan/2024-05-01/elasticsan/client.go index 07d3c911fda..305b677249f 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsan/client.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsan/client.go @@ -15,7 +15,7 @@ type ElasticSanClient struct { } func NewElasticSanClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSanClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsan/version.go b/resource-manager/elasticsan/2024-05-01/elasticsan/version.go index 0394af5bea5..878f70bed9d 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsan/version.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsan/version.go @@ -1,12 +1,10 @@ package elasticsan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsan/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsans/README.md b/resource-manager/elasticsan/2024-05-01/elasticsans/README.md index 1f1fe692e94..17611ccf7d9 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsans/README.md +++ b/resource-manager/elasticsan/2024-05-01/elasticsans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/elasticsans` Documentation -The `elasticsans` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `elasticsans` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/elasticsans/client.go b/resource-manager/elasticsan/2024-05-01/elasticsans/client.go index 7d53b7b8f80..7e549be7f22 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsans/client.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsans/client.go @@ -15,7 +15,7 @@ type ElasticSansClient struct { } func NewElasticSansClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSansClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsans/id_elasticsan.go b/resource-manager/elasticsan/2024-05-01/elasticsans/id_elasticsan.go index 96c3b243a41..973a0d818ac 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsans/id_elasticsan.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsans/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsans/method_get.go b/resource-manager/elasticsan/2024-05-01/elasticsans/method_get.go index 6d49cae4fd6..885d070fb62 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsans/method_get.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsans/method_get.go @@ -45,7 +45,6 @@ func (c ElasticSansClient) Get(ctx context.Context, id ElasticSanId) (result Get var model ElasticSan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsans/version.go b/resource-manager/elasticsan/2024-05-01/elasticsans/version.go index 5285ed2a58e..2d5e35f65a6 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsans/version.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsans/version.go @@ -1,12 +1,10 @@ package elasticsans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsans/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsanskus/README.md b/resource-manager/elasticsan/2024-05-01/elasticsanskus/README.md index c756fae7219..10def3913b2 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsanskus/README.md +++ b/resource-manager/elasticsan/2024-05-01/elasticsanskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/elasticsanskus` Documentation -The `elasticsanskus` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `elasticsanskus` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/elasticsanskus/client.go b/resource-manager/elasticsan/2024-05-01/elasticsanskus/client.go index d4389823bcd..009c76c1c7d 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsanskus/client.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsanskus/client.go @@ -15,7 +15,7 @@ type ElasticSanSkusClient struct { } func NewElasticSanSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticSanSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticsanskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticsanskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticSanSkusClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsanskus/method_skuslist.go b/resource-manager/elasticsan/2024-05-01/elasticsanskus/method_skuslist.go index 6dd24ff9f5d..f16c7058f3f 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsanskus/method_skuslist.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsanskus/method_skuslist.go @@ -40,6 +40,7 @@ func (o SkusListOperationOptions) ToHeaders() *client.Headers { func (o SkusListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2024-05-01/elasticsanskus/version.go b/resource-manager/elasticsan/2024-05-01/elasticsanskus/version.go index dc766d20c8a..7f376a3a701 100644 --- a/resource-manager/elasticsan/2024-05-01/elasticsanskus/version.go +++ b/resource-manager/elasticsan/2024-05-01/elasticsanskus/version.go @@ -1,12 +1,10 @@ package elasticsanskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticsanskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticsanskus/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/README.md b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/README.md index 042423a4db7..c025e569e49 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/README.md +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/client.go b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/client.go +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_elasticsan.go b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_elasticsan.go index 5a773a2db21..fda401f95c1 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_elasticsan.go +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_privateendpointconnection.go index df03de06af6..cb26887bd84 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/method_get.go b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/method_get.go +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/version.go b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/version.go index b541d16e87d..584766e8f3b 100644 --- a/resource-manager/elasticsan/2024-05-01/privateendpointconnections/version.go +++ b/resource-manager/elasticsan/2024-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/privatelinkresources/README.md b/resource-manager/elasticsan/2024-05-01/privatelinkresources/README.md index 87ab34a60a7..bfa4fdc46ff 100644 --- a/resource-manager/elasticsan/2024-05-01/privatelinkresources/README.md +++ b/resource-manager/elasticsan/2024-05-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/privatelinkresources/client.go b/resource-manager/elasticsan/2024-05-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/elasticsan/2024-05-01/privatelinkresources/client.go +++ b/resource-manager/elasticsan/2024-05-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/privatelinkresources/id_elasticsan.go b/resource-manager/elasticsan/2024-05-01/privatelinkresources/id_elasticsan.go index 0d188449dfd..49c7515be5b 100644 --- a/resource-manager/elasticsan/2024-05-01/privatelinkresources/id_elasticsan.go +++ b/resource-manager/elasticsan/2024-05-01/privatelinkresources/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/privatelinkresources/version.go b/resource-manager/elasticsan/2024-05-01/privatelinkresources/version.go index 14d0bb2a379..901bca12605 100644 --- a/resource-manager/elasticsan/2024-05-01/privatelinkresources/version.go +++ b/resource-manager/elasticsan/2024-05-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/README.md b/resource-manager/elasticsan/2024-05-01/snapshots/README.md index f46ee85acfd..eec6a05792e 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/README.md +++ b/resource-manager/elasticsan/2024-05-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/client.go b/resource-manager/elasticsan/2024-05-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/client.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/id_snapshot.go b/resource-manager/elasticsan/2024-05-01/snapshots/id_snapshot.go index 3811be351d1..458e3829b24 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/id_snapshot.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/id_snapshot.go @@ -46,7 +46,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/id_volumegroup.go b/resource-manager/elasticsan/2024-05-01/snapshots/id_volumegroup.go index 11de129a31d..488aebcdb1d 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/id_volumegroup.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotsget.go b/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotsget.go index 2eeb02debe8..b32c4c0ec89 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotsget.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotsget.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) VolumeSnapshotsGet(ctx context.Context, id SnapshotId) var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotslistbyvolumegroup.go b/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotslistbyvolumegroup.go index 44fdd973eed..36a122316b5 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotslistbyvolumegroup.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/method_volumesnapshotslistbyvolumegroup.go @@ -39,6 +39,7 @@ func (o VolumeSnapshotsListByVolumeGroupOperationOptions) ToHeaders() *client.He func (o VolumeSnapshotsListByVolumeGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2024-05-01/snapshots/version.go b/resource-manager/elasticsan/2024-05-01/snapshots/version.go index 5297cad0e16..264ed3f2731 100644 --- a/resource-manager/elasticsan/2024-05-01/snapshots/version.go +++ b/resource-manager/elasticsan/2024-05-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/README.md b/resource-manager/elasticsan/2024-05-01/volumegroups/README.md index d81668ed65b..7a5ea6d7262 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/README.md +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/client.go b/resource-manager/elasticsan/2024-05-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/client.go +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/id_elasticsan.go b/resource-manager/elasticsan/2024-05-01/volumegroups/id_elasticsan.go index ac771fd8c56..a3d837044e1 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/id_elasticsan.go +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/id_elasticsan.go @@ -42,7 +42,7 @@ func ParseElasticSanID(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseElasticSanIDInsensitively(input string) (*ElasticSanId, error) { } id := ElasticSanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/id_volumegroup.go b/resource-manager/elasticsan/2024-05-01/volumegroups/id_volumegroup.go index b242907ec55..3192f62ec69 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/id_volumegroup.go +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/method_get.go b/resource-manager/elasticsan/2024-05-01/volumegroups/method_get.go index f0ba94aae02..6e78fa5996a 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/method_get.go +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2024-05-01/volumegroups/version.go b/resource-manager/elasticsan/2024-05-01/volumegroups/version.go index e27be3ea87f..b3cfc1fc6d4 100644 --- a/resource-manager/elasticsan/2024-05-01/volumegroups/version.go +++ b/resource-manager/elasticsan/2024-05-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2024-05-01" } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/README.md b/resource-manager/elasticsan/2024-05-01/volumes/README.md index a80201c4f7b..7f5d2b2b44d 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/README.md +++ b/resource-manager/elasticsan/2024-05-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/elasticsan/2024-05-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `elasticsan` (API Version `2024-05-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `elasticsan` (API Version `2024-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/elasticsan/2024-05-01/volumes/client.go b/resource-manager/elasticsan/2024-05-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/client.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/id_volume.go b/resource-manager/elasticsan/2024-05-01/volumes/id_volume.go index 5d0095734b8..48406666a37 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/id_volume.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/id_volumegroup.go b/resource-manager/elasticsan/2024-05-01/volumes/id_volumegroup.go index 788010600c0..f6c8ac8b180 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/id_volumegroup.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/method_delete.go b/resource-manager/elasticsan/2024-05-01/volumes/method_delete.go index 1ba07cae1c0..9c7e25c3a2c 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/method_delete.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/method_delete.go @@ -42,6 +42,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/method_get.go b/resource-manager/elasticsan/2024-05-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/method_get.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/elasticsan/2024-05-01/volumes/version.go b/resource-manager/elasticsan/2024-05-01/volumes/version.go index da6729593a4..ec95cf41666 100644 --- a/resource-manager/elasticsan/2024-05-01/volumes/version.go +++ b/resource-manager/elasticsan/2024-05-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2024-05-01" } diff --git a/resource-manager/eventgrid/2022-06-15/channels/README.md b/resource-manager/eventgrid/2022-06-15/channels/README.md index 3206ffa94b3..b0fc9dfa32a 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/README.md +++ b/resource-manager/eventgrid/2022-06-15/channels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels` Documentation -The `channels` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `channels` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/channels/client.go b/resource-manager/eventgrid/2022-06-15/channels/client.go index c799cab7747..290347d0c94 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/client.go +++ b/resource-manager/eventgrid/2022-06-15/channels/client.go @@ -15,7 +15,7 @@ type ChannelsClient struct { } func NewChannelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ChannelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "channels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "channels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChannelsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/channels/id_channel.go b/resource-manager/eventgrid/2022-06-15/channels/id_channel.go index 47d572c4d7b..7fdf023b81b 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/id_channel.go +++ b/resource-manager/eventgrid/2022-06-15/channels/id_channel.go @@ -44,7 +44,7 @@ func ParseChannelID(input string) (*ChannelId, error) { } id := ChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseChannelIDInsensitively(input string) (*ChannelId, error) { } id := ChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go b/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go index 351e10a9a0b..67423bae585 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go +++ b/resource-manager/eventgrid/2022-06-15/channels/id_partnernamespace.go @@ -42,7 +42,7 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/channels/method_createorupdate.go b/resource-manager/eventgrid/2022-06-15/channels/method_createorupdate.go index a4c40e77001..e1c08155b09 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/method_createorupdate.go +++ b/resource-manager/eventgrid/2022-06-15/channels/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ChannelsClient) CreateOrUpdate(ctx context.Context, id ChannelId, input var model Channel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/channels/method_get.go b/resource-manager/eventgrid/2022-06-15/channels/method_get.go index eeb0504e931..9e5b1011b1a 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/channels/method_get.go @@ -45,7 +45,6 @@ func (c ChannelsClient) Get(ctx context.Context, id ChannelId) (result GetOperat var model Channel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/channels/method_getfullurl.go b/resource-manager/eventgrid/2022-06-15/channels/method_getfullurl.go index d720e485a8d..cdf119d69dc 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/method_getfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/channels/method_getfullurl.go @@ -46,7 +46,6 @@ func (c ChannelsClient) GetFullUrl(ctx context.Context, id ChannelId) (result Ge var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/channels/method_listbypartnernamespace.go b/resource-manager/eventgrid/2022-06-15/channels/method_listbypartnernamespace.go index 49c21e5d821..6f34425b3b1 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/method_listbypartnernamespace.go +++ b/resource-manager/eventgrid/2022-06-15/channels/method_listbypartnernamespace.go @@ -40,6 +40,7 @@ func (o ListByPartnerNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByPartnerNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/channels/version.go b/resource-manager/eventgrid/2022-06-15/channels/version.go index 976b5183f7f..65805050c5e 100644 --- a/resource-manager/eventgrid/2022-06-15/channels/version.go +++ b/resource-manager/eventgrid/2022-06-15/channels/version.go @@ -1,12 +1,10 @@ package channels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/channels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/channels/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/domains/README.md b/resource-manager/eventgrid/2022-06-15/domains/README.md index 420ca80bc18..dbce56d74ee 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/README.md +++ b/resource-manager/eventgrid/2022-06-15/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `domains` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/domains/client.go b/resource-manager/eventgrid/2022-06-15/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/client.go +++ b/resource-manager/eventgrid/2022-06-15/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/domains/id_domain.go b/resource-manager/eventgrid/2022-06-15/domains/id_domain.go index 5c8d8f83ca8..f9e3743d89c 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/id_domain.go +++ b/resource-manager/eventgrid/2022-06-15/domains/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/domains/method_get.go b/resource-manager/eventgrid/2022-06-15/domains/method_get.go index b35fd82d944..20619dde9a0 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/domains/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/domains/method_listbyresourcegroup.go index b793c81e83c..1dd8ee85e00 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/domains/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/domains/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/domains/method_listbysubscription.go index 9f6e9c9d05b..fec98f9d04e 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/domains/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/domains/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2022-06-15/domains/method_listsharedaccesskeys.go index ce2010520a4..d0396a6c73d 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2022-06-15/domains/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c DomainsClient) ListSharedAccessKeys(ctx context.Context, id DomainId) (r var model DomainSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/domains/method_regeneratekey.go b/resource-manager/eventgrid/2022-06-15/domains/method_regeneratekey.go index 9e3ed3bff68..d5a87a91b79 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/method_regeneratekey.go +++ b/resource-manager/eventgrid/2022-06-15/domains/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c DomainsClient) RegenerateKey(ctx context.Context, id DomainId, input Dom var model DomainSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/domains/model_domainproperties.go b/resource-manager/eventgrid/2022-06-15/domains/model_domainproperties.go index 2e088ddd161..1595d0240be 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/model_domainproperties.go +++ b/resource-manager/eventgrid/2022-06-15/domains/model_domainproperties.go @@ -50,7 +50,7 @@ func (s *DomainProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["inputSchemaMapping"]; ok { - impl, err := unmarshalInputSchemaMappingImplementation(v) + impl, err := UnmarshalInputSchemaMappingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InputSchemaMapping' for 'DomainProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/domains/model_inputschemamapping.go b/resource-manager/eventgrid/2022-06-15/domains/model_inputschemamapping.go index 2b57ba9fbd0..85974d6030c 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/model_inputschemamapping.go +++ b/resource-manager/eventgrid/2022-06-15/domains/model_inputschemamapping.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputSchemaMapping interface { + InputSchemaMapping() BaseInputSchemaMappingImpl } -// RawInputSchemaMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputSchemaMapping = BaseInputSchemaMappingImpl{} + +type BaseInputSchemaMappingImpl struct { + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s BaseInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s +} + +var _ InputSchemaMapping = RawInputSchemaMappingImpl{} + +// RawInputSchemaMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputSchemaMappingImpl struct { - Type string - Values map[string]interface{} + inputSchemaMapping BaseInputSchemaMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s.inputSchemaMapping } -func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { +func UnmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping return out, nil } - out := RawInputSchemaMappingImpl{ - Type: value, - Values: temp, + var parent BaseInputSchemaMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputSchemaMappingImpl: %+v", err) } - return out, nil + + return RawInputSchemaMappingImpl{ + inputSchemaMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/domains/model_jsoninputschemamapping.go b/resource-manager/eventgrid/2022-06-15/domains/model_jsoninputschemamapping.go index c1d94f844f6..a80861d3351 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/model_jsoninputschemamapping.go +++ b/resource-manager/eventgrid/2022-06-15/domains/model_jsoninputschemamapping.go @@ -14,6 +14,14 @@ type JsonInputSchemaMapping struct { Properties *JsonInputSchemaMappingProperties `json:"properties,omitempty"` // Fields inherited from InputSchemaMapping + + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s JsonInputSchemaMapping) InputSchemaMapping() BaseInputSchemaMappingImpl { + return BaseInputSchemaMappingImpl{ + InputSchemaMappingType: s.InputSchemaMappingType, + } } var _ json.Marshaler = JsonInputSchemaMapping{} @@ -27,9 +35,10 @@ func (s JsonInputSchemaMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonInputSchemaMapping: %+v", err) } + decoded["inputSchemaMappingType"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/domains/version.go b/resource-manager/eventgrid/2022-06-15/domains/version.go index 68c79b7329b..d88e984a6a1 100644 --- a/resource-manager/eventgrid/2022-06-15/domains/version.go +++ b/resource-manager/eventgrid/2022-06-15/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/README.md b/resource-manager/eventgrid/2022-06-15/domaintopics/README.md index 1c5a121566a..9bb1863f0fd 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/README.md +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/domaintopics` Documentation -The `domaintopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `domaintopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/client.go b/resource-manager/eventgrid/2022-06-15/domaintopics/client.go index 2bff1850d61..318ac595a53 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/client.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/client.go @@ -15,7 +15,7 @@ type DomainTopicsClient struct { } func NewDomainTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domaintopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domaintopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go b/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go index 22c236988d0..fcfddaea472 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go b/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go index 27aa0dd6e77..0ff428f3d2d 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/id_domaintopic.go @@ -44,7 +44,7 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/method_get.go b/resource-manager/eventgrid/2022-06-15/domaintopics/method_get.go index 8b38c7d9766..459635b2b03 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/method_get.go @@ -45,7 +45,6 @@ func (c DomainTopicsClient) Get(ctx context.Context, id DomainTopicId) (result G var model DomainTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/method_listbydomain.go b/resource-manager/eventgrid/2022-06-15/domaintopics/method_listbydomain.go index 4651caedf5b..602ea38f29b 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/method_listbydomain.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/method_listbydomain.go @@ -40,6 +40,7 @@ func (o ListByDomainOperationOptions) ToHeaders() *client.Headers { func (o ListByDomainOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/domaintopics/version.go b/resource-manager/eventgrid/2022-06-15/domaintopics/version.go index eb66803e4e2..46ed139eee1 100644 --- a/resource-manager/eventgrid/2022-06-15/domaintopics/version.go +++ b/resource-manager/eventgrid/2022-06-15/domaintopics/version.go @@ -1,12 +1,10 @@ package domaintopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domaintopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domaintopics/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/README.md b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/README.md index 1d5ac47e688..9c36593506b 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/README.md +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/eventsubscriptions` Documentation -The `eventsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `eventsubscriptions` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/client.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/client.go index 0e948364c6c..f6530b8d1cb 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/client.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/client.go @@ -15,7 +15,7 @@ type EventSubscriptionsClient struct { } func NewEventSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventSubscriptionsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go index 787f917cf80..a73f84a9052 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go index e0074d9db09..5ea5cf1d50c 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaineventsubscription.go @@ -44,7 +44,7 @@ func ParseDomainEventSubscriptionID(input string) (*DomainEventSubscriptionId, e } id := DomainEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainEventSubscriptionIDInsensitively(input string) (*DomainEventSubs } id := DomainEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go index 229332cb243..cb4017f1ee2 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_domaintopic.go @@ -44,7 +44,7 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go index e5560868063..eea77dabe4d 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_eventsubscription.go @@ -44,7 +44,7 @@ func ParseEventSubscriptionID(input string) (*EventSubscriptionId, error) { } id := EventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventSubscriptionIDInsensitively(input string) (*EventSubscriptionId, } id := EventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go index 4b7f13eaa80..7fd3fa0bb2f 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go index 37ffb1a0a27..07f2bbaa7d2 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_locationtopictype.go @@ -42,7 +42,7 @@ func ParseLocationTopicTypeID(input string) (*LocationTopicTypeId, error) { } id := LocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationTopicTypeIDInsensitively(input string) (*LocationTopicTypeId, } id := LocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go index 29fe44ab6df..1155937d177 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopic.go @@ -42,7 +42,7 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go index ddfaebbf540..ba6838dd292 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_partnertopiceventsubscription.go @@ -44,7 +44,7 @@ func ParsePartnerTopicEventSubscriptionID(input string) (*PartnerTopicEventSubsc } id := PartnerTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePartnerTopicEventSubscriptionIDInsensitively(input string) (*PartnerTo } id := PartnerTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go index 9443dff760e..cf3c2c687c0 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go index d899252130d..ab4fdfb7826 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providerlocationtopictype.go @@ -44,7 +44,7 @@ func ParseProviderLocationTopicTypeID(input string) (*ProviderLocationTopicTypeI } id := ProviderLocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderLocationTopicTypeIDInsensitively(input string) (*ProviderLocat } id := ProviderLocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go index e2bc4876d00..ebe861ecf53 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_providertopictype.go @@ -40,7 +40,7 @@ func ParseProviderTopicTypeID(input string) (*ProviderTopicTypeId, error) { } id := ProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderTopicTypeIDInsensitively(input string) (*ProviderTopicTypeId, } id := ProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go index ceaccf7d225..0ab7f1c6cb2 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_resourcegroupprovidertopictype.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderTopicTypeID(input string) (*ResourceGroupProvider } id := ResourceGroupProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderTopicTypeIDInsensitively(input string) (*Resource } id := ResourceGroupProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go index 6ed2211b03b..23e4840e64a 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_scopedeventsubscription.go @@ -40,7 +40,7 @@ func ParseScopedEventSubscriptionID(input string) (*ScopedEventSubscriptionId, e } id := ScopedEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedEventSubscriptionIDInsensitively(input string) (*ScopedEventSubs } id := ScopedEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go index a4eb499e4d2..ab7960ada42 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopic.go @@ -42,7 +42,7 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go index acba0c45412..21da3aff7b1 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_systemtopiceventsubscription.go @@ -44,7 +44,7 @@ func ParseSystemTopicEventSubscriptionID(input string) (*SystemTopicEventSubscri } id := SystemTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSystemTopicEventSubscriptionIDInsensitively(input string) (*SystemTopi } id := SystemTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go index 3bd4c281bb3..12b74b58e12 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topic.go @@ -42,7 +42,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go index d8969bcbd5d..e8c66f9e26a 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/id_topiceventsubscription.go @@ -46,7 +46,7 @@ func ParseTopicEventSubscriptionID(input string) (*TopicEventSubscriptionId, err } id := TopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicEventSubscriptionIDInsensitively(input string) (*TopicEventSubscr } id := TopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsget.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsget.go index fc4a22816c7..8abe120a8d7 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsget.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGet(ctx context.Contex var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go index 43be5abe0f1..464ff65aaa1 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGetDeliveryAttributes( var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go index 9ae6056e572..b8b6b82fddd 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGetFullUrl(ctx context var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionslist.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionslist.go index 42004520924..dcc35420742 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionslist.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaineventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o DomainEventSubscriptionsListOperationOptions) ToHeaders() *client.Header func (o DomainEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsget.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsget.go index 81fcdc52e47..a496e0d5793 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGet(ctx context.C var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go index e86151c60ea..65d110b3922 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGetDeliveryAttrib var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go index f2c901e3055..84a30dceed8 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGetFullUrl(ctx co var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionslist.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionslist.go index 8e3ffb34d28..84b2781e70e 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionslist.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_domaintopiceventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o DomainTopicEventSubscriptionsListOperationOptions) ToHeaders() *client.H func (o DomainTopicEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_get.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_get.go index 8f4e1bb89cf..b982da8fa2d 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) Get(ctx context.Context, id ScopedEventSubscri var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getdeliveryattributes.go index 07b422dfe34..aca7d4625f9 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) GetDeliveryAttributes(ctx context.Context, id var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getfullurl.go index e86dc536f30..e4cc7356715 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_getfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) GetFullUrl(ctx context.Context, id ScopedEvent var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbydomaintopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbydomaintopic.go index 4a638a74722..77f20ec33f8 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbydomaintopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbydomaintopic.go @@ -40,6 +40,7 @@ func (o ListByDomainTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByDomainTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbyresource.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbyresource.go index 8b99a4bb3fa..66595c904cb 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbyresource.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroup.go index fb150fef62f..82cf428472d 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListGlobalByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListGlobalByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go index 219a6798cab..57b43607c04 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go @@ -40,6 +40,7 @@ func (o ListGlobalByResourceGroupForTopicTypeOperationOptions) ToHeaders() *clie func (o ListGlobalByResourceGroupForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscription.go index f90051169bf..c05d2b8888b 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscription.go @@ -41,6 +41,7 @@ func (o ListGlobalBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListGlobalBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go index acef9347884..426fd647d00 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go @@ -40,6 +40,7 @@ func (o ListGlobalBySubscriptionForTopicTypeOperationOptions) ToHeaders() *clien func (o ListGlobalBySubscriptionForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroup.go index 6c25ecd8ec5..a99e33b7d4e 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListRegionalByResourceGroupOperationOptions) ToHeaders() *client.Headers func (o ListRegionalByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go index eb5cb67bd6b..716d6f2ef64 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go @@ -40,6 +40,7 @@ func (o ListRegionalByResourceGroupForTopicTypeOperationOptions) ToHeaders() *cl func (o ListRegionalByResourceGroupForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscription.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscription.go index 1ca5c1df4b3..31412a13dad 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscription.go @@ -40,6 +40,7 @@ func (o ListRegionalBySubscriptionOperationOptions) ToHeaders() *client.Headers func (o ListRegionalBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go index bf76a249348..4780656ef03 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go @@ -40,6 +40,7 @@ func (o ListRegionalBySubscriptionForTopicTypeOperationOptions) ToHeaders() *cli func (o ListRegionalBySubscriptionForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsget.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsget.go index 95a2272a743..ad5a9c33b04 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGet(ctx context. var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go index 735f29a1d7f..2ff0454a125 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGetDeliveryAttri var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go index 2a7eaa97fb9..c94e3c6dadd 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGetFullUrl(ctx c var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go index 873f970532f..0520c02d803 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go @@ -40,6 +40,7 @@ func (o PartnerTopicEventSubscriptionsListByPartnerTopicOperationOptions) ToHead func (o PartnerTopicEventSubscriptionsListByPartnerTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsget.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsget.go index cdc5a2f4de7..e0572e8aa33 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGet(ctx context.C var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go index f2e0fd63275..02c699f8958 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGetDeliveryAttrib var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go index 2465d121fd2..ec8d05a2ad3 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGetFullUrl(ctx co var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go index 5428359059b..cada08d4972 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go @@ -40,6 +40,7 @@ func (o SystemTopicEventSubscriptionsListBySystemTopicOperationOptions) ToHeader func (o SystemTopicEventSubscriptionsListBySystemTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsget.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsget.go index c3bd2e6b42d..e2ecec90953 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGet(ctx context.Context var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go index 8e703714f9d..2b43490726f 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGetDeliveryAttributes(c var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go index ff481e4d08d..998c1474a03 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGetFullUrl(ctx context. var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionslist.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionslist.go index fd1ace3bff7..64d05922a74 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionslist.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/method_topiceventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o TopicEventSubscriptionsListOperationOptions) ToHeaders() *client.Headers func (o TopicEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_advancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_advancedfilter.go index 9b667278529..21dc23cad6e 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_advancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_advancedfilter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AdvancedFilter interface { + AdvancedFilter() BaseAdvancedFilterImpl } -// RawAdvancedFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AdvancedFilter = BaseAdvancedFilterImpl{} + +type BaseAdvancedFilterImpl struct { + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s BaseAdvancedFilterImpl) AdvancedFilter() BaseAdvancedFilterImpl { + return s +} + +var _ AdvancedFilter = RawAdvancedFilterImpl{} + +// RawAdvancedFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAdvancedFilterImpl struct { - Type string - Values map[string]interface{} + advancedFilter BaseAdvancedFilterImpl + Type string + Values map[string]interface{} +} + +func (s RawAdvancedFilterImpl) AdvancedFilter() BaseAdvancedFilterImpl { + return s.advancedFilter } -func unmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) { +func UnmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) { if input == nil { return nil, nil } @@ -188,10 +206,15 @@ func unmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) return out, nil } - out := RawAdvancedFilterImpl{ - Type: value, - Values: temp, + var parent BaseAdvancedFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAdvancedFilterImpl: %+v", err) } - return out, nil + + return RawAdvancedFilterImpl{ + advancedFilter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go index d580a1e3722..d403033e291 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go @@ -14,6 +14,14 @@ type AzureFunctionEventSubscriptionDestination struct { Properties *AzureFunctionEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureFunctionEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureFunctionEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s AzureFunctionEventSubscriptionDestination) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go index 38c0e10c193..1a253ca44ce 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go @@ -41,7 +41,7 @@ func (s *AzureFunctionEventSubscriptionDestinationProperties) UnmarshalJSON(byte output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'AzureFunctionEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_boolequalsadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_boolequalsadvancedfilter.go index fc35dd630b7..1fc50edfc6c 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_boolequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_boolequalsadvancedfilter.go @@ -14,7 +14,16 @@ type BoolEqualsAdvancedFilter struct { Value *bool `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s BoolEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = BoolEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s BoolEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BoolEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "BoolEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterdestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterdestination.go index b445f359655..2feffd41590 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterdestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterdestination.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeadLetterDestination interface { + DeadLetterDestination() BaseDeadLetterDestinationImpl } -// RawDeadLetterDestinationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeadLetterDestination = BaseDeadLetterDestinationImpl{} + +type BaseDeadLetterDestinationImpl struct { + EndpointType DeadLetterEndPointType `json:"endpointType"` +} + +func (s BaseDeadLetterDestinationImpl) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return s +} + +var _ DeadLetterDestination = RawDeadLetterDestinationImpl{} + +// RawDeadLetterDestinationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeadLetterDestinationImpl struct { - Type string - Values map[string]interface{} + deadLetterDestination BaseDeadLetterDestinationImpl + Type string + Values map[string]interface{} +} + +func (s RawDeadLetterDestinationImpl) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return s.deadLetterDestination } -func unmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDestination, error) { +func UnmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDestination, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDesti return out, nil } - out := RawDeadLetterDestinationImpl{ - Type: value, - Values: temp, + var parent BaseDeadLetterDestinationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeadLetterDestinationImpl: %+v", err) } - return out, nil + + return RawDeadLetterDestinationImpl{ + deadLetterDestination: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterwithresourceidentity.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterwithresourceidentity.go index 68884c87f6b..cd72791eda4 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterwithresourceidentity.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deadletterwithresourceidentity.go @@ -30,7 +30,7 @@ func (s *DeadLetterWithResourceIdentity) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'DeadLetterWithResourceIdentity': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributelistresult.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributelistresult.go index 1fc05481f8c..c3cf8601504 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributelistresult.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributelistresult.go @@ -29,7 +29,7 @@ func (s *DeliveryAttributeListResult) UnmarshalJSON(bytes []byte) error { output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'DeliveryAttributeListResult': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributemapping.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributemapping.go index 317188346aa..5bf7682ea37 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributemapping.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliveryattributemapping.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeliveryAttributeMapping interface { + DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl } -// RawDeliveryAttributeMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeliveryAttributeMapping = BaseDeliveryAttributeMappingImpl{} + +type BaseDeliveryAttributeMappingImpl struct { + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s BaseDeliveryAttributeMappingImpl) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return s +} + +var _ DeliveryAttributeMapping = RawDeliveryAttributeMappingImpl{} + +// RawDeliveryAttributeMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeliveryAttributeMappingImpl struct { - Type string - Values map[string]interface{} + deliveryAttributeMapping BaseDeliveryAttributeMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryAttributeMappingImpl) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return s.deliveryAttributeMapping } -func unmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttributeMapping, error) { +func UnmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttributeMapping, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttr return out, nil } - out := RawDeliveryAttributeMappingImpl{ - Type: value, - Values: temp, + var parent BaseDeliveryAttributeMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryAttributeMappingImpl: %+v", err) } - return out, nil + + return RawDeliveryAttributeMappingImpl{ + deliveryAttributeMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliverywithresourceidentity.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliverywithresourceidentity.go index 23396094acd..95241ded9cd 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliverywithresourceidentity.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_deliverywithresourceidentity.go @@ -30,7 +30,7 @@ func (s *DeliveryWithResourceIdentity) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'DeliveryWithResourceIdentity': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_dynamicdeliveryattributemapping.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_dynamicdeliveryattributemapping.go index d7af26c8335..5937dd8a0b3 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_dynamicdeliveryattributemapping.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_dynamicdeliveryattributemapping.go @@ -14,7 +14,16 @@ type DynamicDeliveryAttributeMapping struct { Properties *DynamicDeliveryAttributeMappingProperties `json:"properties,omitempty"` // Fields inherited from DeliveryAttributeMapping - Name *string `json:"name,omitempty"` + + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s DynamicDeliveryAttributeMapping) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return BaseDeliveryAttributeMappingImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DynamicDeliveryAttributeMapping{} @@ -28,9 +37,10 @@ func (s DynamicDeliveryAttributeMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicDeliveryAttributeMapping: %+v", err) } + decoded["type"] = "Dynamic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestination.go index b1a7a97c128..3fe1b5de212 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type EventHubEventSubscriptionDestination struct { Properties *EventHubEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s EventHubEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = EventHubEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s EventHubEventSubscriptionDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go index 57d8d816374..53dd493f758 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *EventHubEventSubscriptionDestinationProperties) UnmarshalJSON(bytes []b output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'EventHubEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptiondestination.go index b190369064f..434aa81f17b 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptiondestination.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSubscriptionDestination interface { + EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl } -// RawEventSubscriptionDestinationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSubscriptionDestination = BaseEventSubscriptionDestinationImpl{} + +type BaseEventSubscriptionDestinationImpl struct { + EndpointType EndpointType `json:"endpointType"` +} + +func (s BaseEventSubscriptionDestinationImpl) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return s +} + +var _ EventSubscriptionDestination = RawEventSubscriptionDestinationImpl{} + +// RawEventSubscriptionDestinationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSubscriptionDestinationImpl struct { - Type string - Values map[string]interface{} + eventSubscriptionDestination BaseEventSubscriptionDestinationImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSubscriptionDestinationImpl) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return s.eventSubscriptionDestination } -func unmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSubscriptionDestination, error) { +func UnmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSubscriptionDestination, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSub return out, nil } - out := RawEventSubscriptionDestinationImpl{ - Type: value, - Values: temp, + var parent BaseEventSubscriptionDestinationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSubscriptionDestinationImpl: %+v", err) } - return out, nil + + return RawEventSubscriptionDestinationImpl{ + eventSubscriptionDestination: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionfilter.go index 2bb6ec93a10..eb73087950c 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionfilter.go @@ -45,7 +45,7 @@ func (s *EventSubscriptionFilter) UnmarshalJSON(bytes []byte) error { output := make([]AdvancedFilter, 0) for i, val := range listTemp { - impl, err := unmarshalAdvancedFilterImplementation(val) + impl, err := UnmarshalAdvancedFilterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'AdvancedFilters' for 'EventSubscriptionFilter': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionproperties.go index 567ad97d79a..76c37353687 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionproperties.go @@ -62,7 +62,7 @@ func (s *EventSubscriptionProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'EventSubscriptionProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventSubscriptionProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'EventSubscriptionProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionupdateparameters.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionupdateparameters.go index 72f70f8b4d9..c481ba77913 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionupdateparameters.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_eventsubscriptionupdateparameters.go @@ -58,7 +58,7 @@ func (s *EventSubscriptionUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'EventSubscriptionUpdateParameters': %+v", err) } @@ -66,7 +66,7 @@ func (s *EventSubscriptionUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'EventSubscriptionUpdateParameters': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go index 53f4b550d28..527e83ec745 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go @@ -14,6 +14,14 @@ type HybridConnectionEventSubscriptionDestination struct { Properties *HybridConnectionEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s HybridConnectionEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = HybridConnectionEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s HybridConnectionEventSubscriptionDestination) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HybridConnectionEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "HybridConnection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go index 246fe52a443..e63ec58deff 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *HybridConnectionEventSubscriptionDestinationProperties) UnmarshalJSON(b output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'HybridConnectionEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnotnulladvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnotnulladvancedfilter.go index 46438113a68..94c99dc7473 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnotnulladvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnotnulladvancedfilter.go @@ -13,7 +13,16 @@ var _ AdvancedFilter = IsNotNullAdvancedFilter{} type IsNotNullAdvancedFilter struct { // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s IsNotNullAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNotNullAdvancedFilter{} @@ -27,9 +36,10 @@ func (s IsNotNullAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNotNullAdvancedFilter: %+v", err) } + decoded["operatorType"] = "IsNotNull" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnullorundefinedadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnullorundefinedadvancedfilter.go index bd5ffc5807b..15784423f76 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnullorundefinedadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_isnullorundefinedadvancedfilter.go @@ -13,7 +13,16 @@ var _ AdvancedFilter = IsNullOrUndefinedAdvancedFilter{} type IsNullOrUndefinedAdvancedFilter struct { // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s IsNullOrUndefinedAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNullOrUndefinedAdvancedFilter{} @@ -27,9 +36,10 @@ func (s IsNullOrUndefinedAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNullOrUndefinedAdvancedFilter: %+v", err) } + decoded["operatorType"] = "IsNullOrUndefined" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanadvancedfilter.go index 84909978854..0e62571ac89 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanadvancedfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go index 65713cba2eb..d9a9276b682 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanOrEqualsAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanOrEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanOrEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanOrEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanOrEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinadvancedfilter.go index 211f9800a91..11c8b08cfb3 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinadvancedfilter.go @@ -14,7 +14,16 @@ type NumberInAdvancedFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinrangeadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinrangeadvancedfilter.go index 1d3a5ea9774..6bb34b77724 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinrangeadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberinrangeadvancedfilter.go @@ -14,7 +14,16 @@ type NumberInRangeAdvancedFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberInRangeAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInRangeAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberInRangeAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInRangeAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanadvancedfilter.go index 1cb7714062a..42c3700ac69 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanadvancedfilter.go @@ -14,7 +14,16 @@ type NumberLessThanAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go index 3863059df16..9a2b17d16f9 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go @@ -14,7 +14,16 @@ type NumberLessThanOrEqualsAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanOrEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanOrEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanOrEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanOrEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinadvancedfilter.go index 495b6bbeae4..418b3d8f875 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinadvancedfilter.go @@ -14,7 +14,16 @@ type NumberNotInAdvancedFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinrangeadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinrangeadvancedfilter.go index 943c558903f..46d863fc133 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinrangeadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_numbernotinrangeadvancedfilter.go @@ -14,7 +14,16 @@ type NumberNotInRangeAdvancedFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInRangeAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInRangeAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInRangeAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInRangeAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberNotInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go index 8b63b749850..72f55364e53 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type ServiceBusQueueEventSubscriptionDestination struct { Properties *ServiceBusQueueEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s ServiceBusQueueEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = ServiceBusQueueEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueEventSubscriptionDestination) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "ServiceBusQueue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go index abb0204b430..02d4b570b66 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *ServiceBusQueueEventSubscriptionDestinationProperties) UnmarshalJSON(by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'ServiceBusQueueEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go index a3b47d8a5b5..d67b1efcfe0 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go @@ -14,6 +14,14 @@ type ServiceBusTopicEventSubscriptionDestination struct { Properties *ServiceBusTopicEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s ServiceBusTopicEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = ServiceBusTopicEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicEventSubscriptionDestination) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "ServiceBusTopic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go index 30e8fa6cb26..d8c90c28802 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *ServiceBusTopicEventSubscriptionDestinationProperties) UnmarshalJSON(by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'ServiceBusTopicEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_staticdeliveryattributemapping.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_staticdeliveryattributemapping.go index efc11b99fa1..4fc1df9149c 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_staticdeliveryattributemapping.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_staticdeliveryattributemapping.go @@ -14,7 +14,16 @@ type StaticDeliveryAttributeMapping struct { Properties *StaticDeliveryAttributeMappingProperties `json:"properties,omitempty"` // Fields inherited from DeliveryAttributeMapping - Name *string `json:"name,omitempty"` + + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s StaticDeliveryAttributeMapping) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return BaseDeliveryAttributeMappingImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = StaticDeliveryAttributeMapping{} @@ -28,9 +37,10 @@ func (s StaticDeliveryAttributeMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StaticDeliveryAttributeMapping: %+v", err) } + decoded["type"] = "Static" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storageblobdeadletterdestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storageblobdeadletterdestination.go index 7c184d520ac..7e213ea8a14 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storageblobdeadletterdestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storageblobdeadletterdestination.go @@ -14,6 +14,14 @@ type StorageBlobDeadLetterDestination struct { Properties *StorageBlobDeadLetterDestinationProperties `json:"properties,omitempty"` // Fields inherited from DeadLetterDestination + + EndpointType DeadLetterEndPointType `json:"endpointType"` +} + +func (s StorageBlobDeadLetterDestination) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return BaseDeadLetterDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = StorageBlobDeadLetterDestination{} @@ -27,9 +35,10 @@ func (s StorageBlobDeadLetterDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageBlobDeadLetterDestination: %+v", err) } + decoded["endpointType"] = "StorageBlob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go index 6c86f8a335b..af290359129 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type StorageQueueEventSubscriptionDestination struct { Properties *StorageQueueEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s StorageQueueEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = StorageQueueEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s StorageQueueEventSubscriptionDestination) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageQueueEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "StorageQueue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringbeginswithadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringbeginswithadvancedfilter.go index cafeef39433..d412ed24c13 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringbeginswithadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringbeginswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringBeginsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringBeginsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringBeginsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringBeginsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringBeginsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringcontainsadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringcontainsadvancedfilter.go index 3a3d2697939..077f690d5b4 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringcontainsadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringcontainsadvancedfilter.go @@ -14,7 +14,16 @@ type StringContainsAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringContainsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringContainsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringContainsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringContainsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringendswithadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringendswithadvancedfilter.go index aedb41f4e0d..77f0887e572 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringendswithadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringendswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringEndsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringEndsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringEndsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringEndsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringEndsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringinadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringinadvancedfilter.go index d0fd2071fff..4b435ee7948 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringinadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringinadvancedfilter.go @@ -14,7 +14,16 @@ type StringInAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go index cbc797c37f3..0d7ef2e6a3f 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotBeginsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotBeginsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotBeginsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotBeginsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotBeginsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotcontainsadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotcontainsadvancedfilter.go index 8a20e0daf71..cc4bc2b6083 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotcontainsadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotcontainsadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotContainsAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotContainsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotContainsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotContainsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotContainsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotendswithadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotendswithadvancedfilter.go index c892f63ac36..f68d914687e 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotendswithadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotendswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotEndsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotEndsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotEndsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotEndsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotEndsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotinadvancedfilter.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotinadvancedfilter.go index da8aeb09107..265f6abcd45 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotinadvancedfilter.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_stringnotinadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotInAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestination.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestination.go index a64dd7ca0b4..ddc2526a988 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type WebHookEventSubscriptionDestination struct { Properties *WebHookEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s WebHookEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = WebHookEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s WebHookEventSubscriptionDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebHookEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "WebHook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go index 8750d501e7c..5662c5c55d6 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go @@ -47,7 +47,7 @@ func (s *WebHookEventSubscriptionDestinationProperties) UnmarshalJSON(bytes []by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'WebHookEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/version.go b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/version.go index 541a329e2f2..879265b9262 100644 --- a/resource-manager/eventgrid/2022-06-15/eventsubscriptions/version.go +++ b/resource-manager/eventgrid/2022-06-15/eventsubscriptions/version.go @@ -1,12 +1,10 @@ package eventsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventsubscriptions/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/README.md b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/README.md index 71a77a1ad16..4889b462bb6 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/README.md +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerconfigurations` Documentation -The `partnerconfigurations` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `partnerconfigurations` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/client.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/client.go index db4c4a6d68c..81cf545e1ec 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/client.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/client.go @@ -15,7 +15,7 @@ type PartnerConfigurationsClient struct { } func NewPartnerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnerconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnerconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerConfigurationsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_authorizepartner.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_authorizepartner.go index 8510613024a..9aec03662a6 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_authorizepartner.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_authorizepartner.go @@ -51,7 +51,6 @@ func (c PartnerConfigurationsClient) AuthorizePartner(ctx context.Context, id co var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_get.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_get.go index e890871327e..0796ab24f3d 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_get.go @@ -47,7 +47,6 @@ func (c PartnerConfigurationsClient) Get(ctx context.Context, id commonids.Resou var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_listbysubscription.go index b2664083fe2..caae9105d47 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_unauthorizepartner.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_unauthorizepartner.go index b026a3ff31a..3cd55d4ec16 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_unauthorizepartner.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/method_unauthorizepartner.go @@ -51,7 +51,6 @@ func (c PartnerConfigurationsClient) UnauthorizePartner(ctx context.Context, id var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/version.go b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/version.go index 5d3682c5830..f9c4c1954f9 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerconfigurations/version.go +++ b/resource-manager/eventgrid/2022-06-15/partnerconfigurations/version.go @@ -1,12 +1,10 @@ package partnerconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnerconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnerconfigurations/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/README.md b/resource-manager/eventgrid/2022-06-15/partnernamespaces/README.md index 0760b0da528..3b05e4a6dee 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/README.md +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnernamespaces` Documentation -The `partnernamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `partnernamespaces` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/client.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/client.go index 68a21b05d23..40674d52936 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/client.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/client.go @@ -15,7 +15,7 @@ type PartnerNamespacesClient struct { } func NewPartnerNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnernamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnernamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerNamespacesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go index e66057836e1..927aae05141 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/id_partnernamespace.go @@ -42,7 +42,7 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_get.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_get.go index 56f09544bb3..45402e218ea 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_get.go @@ -45,7 +45,6 @@ func (c PartnerNamespacesClient) Get(ctx context.Context, id PartnerNamespaceId) var model PartnerNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbyresourcegroup.go index 73f19ca4eea..eeeae0918ce 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbysubscription.go index 5cea56ba9bb..9235eeafa60 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listsharedaccesskeys.go index 3680bb6ae51..bd97b786430 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c PartnerNamespacesClient) ListSharedAccessKeys(ctx context.Context, id Pa var model PartnerNamespaceSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_regeneratekey.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_regeneratekey.go index 13f92c98250..c3f2c53ae53 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_regeneratekey.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c PartnerNamespacesClient) RegenerateKey(ctx context.Context, id PartnerNa var model PartnerNamespaceSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnernamespaces/version.go b/resource-manager/eventgrid/2022-06-15/partnernamespaces/version.go index 3e21a4eae3c..c8912a32fdf 100644 --- a/resource-manager/eventgrid/2022-06-15/partnernamespaces/version.go +++ b/resource-manager/eventgrid/2022-06-15/partnernamespaces/version.go @@ -1,12 +1,10 @@ package partnernamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnernamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnernamespaces/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/README.md b/resource-manager/eventgrid/2022-06-15/partnerregistrations/README.md index af6860eca20..0407bdfbe5f 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/README.md +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnerregistrations` Documentation -The `partnerregistrations` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `partnerregistrations` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/client.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/client.go index 470bfd1ed46..9316809223e 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/client.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/client.go @@ -15,7 +15,7 @@ type PartnerRegistrationsClient struct { } func NewPartnerRegistrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerRegistrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnerregistrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnerregistrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerRegistrationsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go index ce773bf8bcc..ac02843a027 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/id_partnerregistration.go @@ -42,7 +42,7 @@ func ParsePartnerRegistrationID(input string) (*PartnerRegistrationId, error) { } id := PartnerRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerRegistrationIDInsensitively(input string) (*PartnerRegistration } id := PartnerRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_get.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_get.go index a309e2f0ed6..9ce71c0d73f 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_get.go @@ -45,7 +45,6 @@ func (c PartnerRegistrationsClient) Get(ctx context.Context, id PartnerRegistrat var model PartnerRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbyresourcegroup.go index 8da1cb23a34..58f932178c2 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbysubscription.go index 921b13c6f9a..ce73d0dd168 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnerregistrations/version.go b/resource-manager/eventgrid/2022-06-15/partnerregistrations/version.go index ccd45ded50b..bfb99cd4c52 100644 --- a/resource-manager/eventgrid/2022-06-15/partnerregistrations/version.go +++ b/resource-manager/eventgrid/2022-06-15/partnerregistrations/version.go @@ -1,12 +1,10 @@ package partnerregistrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnerregistrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnerregistrations/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/README.md b/resource-manager/eventgrid/2022-06-15/partnertopics/README.md index 54cf99f36e9..3686bb9ee11 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/README.md +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/partnertopics` Documentation -The `partnertopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `partnertopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/client.go b/resource-manager/eventgrid/2022-06-15/partnertopics/client.go index d2c0336576d..bcd943f6ed4 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/client.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/client.go @@ -15,7 +15,7 @@ type PartnerTopicsClient struct { } func NewPartnerTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnertopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnertopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go b/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go index ffdf93e176f..72b06ae50dc 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/id_partnertopic.go @@ -42,7 +42,7 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_activate.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_activate.go index d99c89ffc49..4d9e014d769 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_activate.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_activate.go @@ -46,7 +46,6 @@ func (c PartnerTopicsClient) Activate(ctx context.Context, id PartnerTopicId) (r var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_createorupdate.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_createorupdate.go index b3cc284c092..53a4eaf88ac 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_createorupdate.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PartnerTopicsClient) CreateOrUpdate(ctx context.Context, id PartnerTopic var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_deactivate.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_deactivate.go index 704ce7b2beb..ab85fadf765 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_deactivate.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_deactivate.go @@ -46,7 +46,6 @@ func (c PartnerTopicsClient) Deactivate(ctx context.Context, id PartnerTopicId) var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_get.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_get.go index 166a4bfa628..5094544062c 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_get.go @@ -45,7 +45,6 @@ func (c PartnerTopicsClient) Get(ctx context.Context, id PartnerTopicId) (result var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbyresourcegroup.go index 0ffc6566a8c..db8ceac0a17 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbysubscription.go index 1ed231e02ad..2c2e237ecb9 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/method_update.go b/resource-manager/eventgrid/2022-06-15/partnertopics/method_update.go index 223499933b6..8ca89640fdc 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/method_update.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/method_update.go @@ -50,7 +50,6 @@ func (c PartnerTopicsClient) Update(ctx context.Context, id PartnerTopicId, inpu var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/partnertopics/version.go b/resource-manager/eventgrid/2022-06-15/partnertopics/version.go index 73726a16ff4..a185c41ae45 100644 --- a/resource-manager/eventgrid/2022-06-15/partnertopics/version.go +++ b/resource-manager/eventgrid/2022-06-15/partnertopics/version.go @@ -1,12 +1,10 @@ package partnertopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnertopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnertopics/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/README.md b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/README.md index 31757855bb6..4dff6243e94 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/README.md +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/client.go b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/client.go +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go index b55d668d294..1801f480671 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/id_scopedprivateendpointconnection.go @@ -40,7 +40,7 @@ func ParseScopedPrivateEndpointConnectionID(input string) (*ScopedPrivateEndpoin } id := ScopedPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPrivateEndpointConnectionIDInsensitively(input string) (*ScopedP } id := ScopedPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_get.go b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_get.go index 09cecb3eae5..45b77d598e5 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id ScopedPriv var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_listbyresource.go b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_listbyresource.go index 4218ee362a8..0d9f6dc402d 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_listbyresource.go +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/version.go b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/version.go index a4902e85da6..07a554d614d 100644 --- a/resource-manager/eventgrid/2022-06-15/privateendpointconnections/version.go +++ b/resource-manager/eventgrid/2022-06-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/README.md b/resource-manager/eventgrid/2022-06-15/privatelinkresources/README.md index 6d7df9ddf2a..e181e45eeec 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/README.md +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/client.go b/resource-manager/eventgrid/2022-06-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/client.go +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go b/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go index 96ed69d7f63..1ca0fc27e18 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/id_scopedprivatelinkresource.go @@ -40,7 +40,7 @@ func ParseScopedPrivateLinkResourceID(input string) (*ScopedPrivateLinkResourceI } id := ScopedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPrivateLinkResourceIDInsensitively(input string) (*ScopedPrivate } id := ScopedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_get.go b/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_get.go index 3bd66c97190..c0806e78490 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id ScopedPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_listbyresource.go b/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_listbyresource.go index 9f9dcd49707..22c7e564645 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_listbyresource.go +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/privatelinkresources/version.go b/resource-manager/eventgrid/2022-06-15/privatelinkresources/version.go index bc15fa9531d..0b84ef7441b 100644 --- a/resource-manager/eventgrid/2022-06-15/privatelinkresources/version.go +++ b/resource-manager/eventgrid/2022-06-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/README.md b/resource-manager/eventgrid/2022-06-15/systemtopics/README.md index 5f0f80ac7ff..68fe8932855 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/README.md +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/systemtopics` Documentation -The `systemtopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `systemtopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/client.go b/resource-manager/eventgrid/2022-06-15/systemtopics/client.go index a75eb998451..1f5eedc71cc 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/client.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/client.go @@ -15,7 +15,7 @@ type SystemTopicsClient struct { } func NewSystemTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*SystemTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "systemtopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "systemtopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SystemTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go b/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go index bfa75efa500..b2d629865e4 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/id_systemtopic.go @@ -42,7 +42,7 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/method_get.go b/resource-manager/eventgrid/2022-06-15/systemtopics/method_get.go index a8da6a2fc6a..f0f012d6dc5 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/method_get.go @@ -45,7 +45,6 @@ func (c SystemTopicsClient) Get(ctx context.Context, id SystemTopicId) (result G var model SystemTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbyresourcegroup.go index 04b5a7090c9..7cee84affee 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbysubscription.go index 5424d6f67ff..62bf8570ec2 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/systemtopics/version.go b/resource-manager/eventgrid/2022-06-15/systemtopics/version.go index bcc24d7df56..9e04dd47e46 100644 --- a/resource-manager/eventgrid/2022-06-15/systemtopics/version.go +++ b/resource-manager/eventgrid/2022-06-15/systemtopics/version.go @@ -1,12 +1,10 @@ package systemtopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/systemtopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/systemtopics/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/topics/README.md b/resource-manager/eventgrid/2022-06-15/topics/README.md index 72d13bb1f71..907769c27ed 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/README.md +++ b/resource-manager/eventgrid/2022-06-15/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `topics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/topics/client.go b/resource-manager/eventgrid/2022-06-15/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/client.go +++ b/resource-manager/eventgrid/2022-06-15/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/topics/id_topic.go b/resource-manager/eventgrid/2022-06-15/topics/id_topic.go index 7996a9099d5..145a6128974 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/id_topic.go +++ b/resource-manager/eventgrid/2022-06-15/topics/id_topic.go @@ -42,7 +42,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_extensiontopicsget.go b/resource-manager/eventgrid/2022-06-15/topics/method_extensiontopicsget.go index e56b3e7ed5a..8d869bc6185 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_extensiontopicsget.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_extensiontopicsget.go @@ -47,7 +47,6 @@ func (c TopicsClient) ExtensionTopicsGet(ctx context.Context, id commonids.Scope var model ExtensionTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_get.go b/resource-manager/eventgrid/2022-06-15/topics/method_get.go index a276dae1132..1ed48937e12 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model Topic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2022-06-15/topics/method_listbyresourcegroup.go index b322ef0d4af..480c5a71121 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_listbysubscription.go b/resource-manager/eventgrid/2022-06-15/topics/method_listbysubscription.go index a4f4ebfc334..f8fbb741012 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_listeventtypes.go b/resource-manager/eventgrid/2022-06-15/topics/method_listeventtypes.go index 9ad02baea36..01a233da481 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_listeventtypes.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_listeventtypes.go @@ -47,7 +47,6 @@ func (c TopicsClient) ListEventTypes(ctx context.Context, id commonids.ScopeId) var model EventTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topics/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2022-06-15/topics/method_listsharedaccesskeys.go index 926e9ba1256..6e5480db9ca 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2022-06-15/topics/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c TopicsClient) ListSharedAccessKeys(ctx context.Context, id TopicId) (res var model TopicSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topics/model_inputschemamapping.go b/resource-manager/eventgrid/2022-06-15/topics/model_inputschemamapping.go index ea5cba6d2c9..5d276f029bc 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/model_inputschemamapping.go +++ b/resource-manager/eventgrid/2022-06-15/topics/model_inputschemamapping.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputSchemaMapping interface { + InputSchemaMapping() BaseInputSchemaMappingImpl } -// RawInputSchemaMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputSchemaMapping = BaseInputSchemaMappingImpl{} + +type BaseInputSchemaMappingImpl struct { + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s BaseInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s +} + +var _ InputSchemaMapping = RawInputSchemaMappingImpl{} + +// RawInputSchemaMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputSchemaMappingImpl struct { - Type string - Values map[string]interface{} + inputSchemaMapping BaseInputSchemaMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s.inputSchemaMapping } -func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { +func UnmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping return out, nil } - out := RawInputSchemaMappingImpl{ - Type: value, - Values: temp, + var parent BaseInputSchemaMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputSchemaMappingImpl: %+v", err) } - return out, nil + + return RawInputSchemaMappingImpl{ + inputSchemaMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2022-06-15/topics/model_jsoninputschemamapping.go b/resource-manager/eventgrid/2022-06-15/topics/model_jsoninputschemamapping.go index 84c4a558344..70db15710f9 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/model_jsoninputschemamapping.go +++ b/resource-manager/eventgrid/2022-06-15/topics/model_jsoninputschemamapping.go @@ -14,6 +14,14 @@ type JsonInputSchemaMapping struct { Properties *JsonInputSchemaMappingProperties `json:"properties,omitempty"` // Fields inherited from InputSchemaMapping + + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s JsonInputSchemaMapping) InputSchemaMapping() BaseInputSchemaMappingImpl { + return BaseInputSchemaMappingImpl{ + InputSchemaMappingType: s.InputSchemaMappingType, + } } var _ json.Marshaler = JsonInputSchemaMapping{} @@ -27,9 +35,10 @@ func (s JsonInputSchemaMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonInputSchemaMapping: %+v", err) } + decoded["inputSchemaMappingType"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2022-06-15/topics/model_topicproperties.go b/resource-manager/eventgrid/2022-06-15/topics/model_topicproperties.go index a3535a25f07..d2152f2ba09 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/model_topicproperties.go +++ b/resource-manager/eventgrid/2022-06-15/topics/model_topicproperties.go @@ -46,7 +46,7 @@ func (s *TopicProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["inputSchemaMapping"]; ok { - impl, err := unmarshalInputSchemaMappingImplementation(v) + impl, err := UnmarshalInputSchemaMappingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InputSchemaMapping' for 'TopicProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/topics/version.go b/resource-manager/eventgrid/2022-06-15/topics/version.go index d9dbf6fc1b8..9e62ad4ce42 100644 --- a/resource-manager/eventgrid/2022-06-15/topics/version.go +++ b/resource-manager/eventgrid/2022-06-15/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/README.md b/resource-manager/eventgrid/2022-06-15/topictypes/README.md index bc9ec3ae875..741f839c481 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/README.md +++ b/resource-manager/eventgrid/2022-06-15/topictypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/topictypes` Documentation -The `topictypes` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `topictypes` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/client.go b/resource-manager/eventgrid/2022-06-15/topictypes/client.go index 9e6399829c2..9eec8fac04e 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/client.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/client.go @@ -15,7 +15,7 @@ type TopicTypesClient struct { } func NewTopicTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topictypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topictypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicTypesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go b/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go index f860b13cb3b..29fc8905e3c 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/id_topictype.go @@ -38,7 +38,7 @@ func ParseTopicTypeID(input string) (*TopicTypeId, error) { } id := TopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseTopicTypeIDInsensitively(input string) (*TopicTypeId, error) { } id := TopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/method_get.go b/resource-manager/eventgrid/2022-06-15/topictypes/method_get.go index c1c6fbcdd6b..42a4be1a613 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/method_get.go @@ -45,7 +45,6 @@ func (c TopicTypesClient) Get(ctx context.Context, id TopicTypeId) (result GetOp var model TopicTypeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/method_list.go b/resource-manager/eventgrid/2022-06-15/topictypes/method_list.go index 99aaa9f6830..66897dde08b 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/method_list.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/method_list.go @@ -45,7 +45,6 @@ func (c TopicTypesClient) List(ctx context.Context) (result ListOperationRespons var model TopicTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/method_listeventtypes.go b/resource-manager/eventgrid/2022-06-15/topictypes/method_listeventtypes.go index b5bfb44e665..ef68b52949e 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/method_listeventtypes.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/method_listeventtypes.go @@ -46,7 +46,6 @@ func (c TopicTypesClient) ListEventTypes(ctx context.Context, id TopicTypeId) (r var model EventTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/topictypes/version.go b/resource-manager/eventgrid/2022-06-15/topictypes/version.go index 20fe5050ae3..4316fef34b4 100644 --- a/resource-manager/eventgrid/2022-06-15/topictypes/version.go +++ b/resource-manager/eventgrid/2022-06-15/topictypes/version.go @@ -1,12 +1,10 @@ package topictypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topictypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topictypes/2022-06-15" } diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/README.md b/resource-manager/eventgrid/2022-06-15/verifiedpartners/README.md index 3dc794ef5eb..d6ccba3689b 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/README.md +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/verifiedpartners` Documentation -The `verifiedpartners` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2022-06-15`). +The `verifiedpartners` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2022-06-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/client.go b/resource-manager/eventgrid/2022-06-15/verifiedpartners/client.go index 576b4f91baa..83e155cec73 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/client.go +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/client.go @@ -15,7 +15,7 @@ type VerifiedPartnersClient struct { } func NewVerifiedPartnersClientWithBaseURI(sdkApi sdkEnv.Api) (*VerifiedPartnersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "verifiedpartners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "verifiedpartners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VerifiedPartnersClient: %+v", err) } diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go b/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go index d9f85e122f9..8d1c65489fb 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/id_verifiedpartner.go @@ -38,7 +38,7 @@ func ParseVerifiedPartnerID(input string) (*VerifiedPartnerId, error) { } id := VerifiedPartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseVerifiedPartnerIDInsensitively(input string) (*VerifiedPartnerId, erro } id := VerifiedPartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_get.go b/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_get.go index 67eed1527ad..8f4806ee2ea 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_get.go +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_get.go @@ -45,7 +45,6 @@ func (c VerifiedPartnersClient) Get(ctx context.Context, id VerifiedPartnerId) ( var model VerifiedPartner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_list.go b/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_list.go index 9229769b5dc..589d1c19cd0 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_list.go +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2022-06-15/verifiedpartners/version.go b/resource-manager/eventgrid/2022-06-15/verifiedpartners/version.go index edb63626af6..e65cf350b47 100644 --- a/resource-manager/eventgrid/2022-06-15/verifiedpartners/version.go +++ b/resource-manager/eventgrid/2022-06-15/verifiedpartners/version.go @@ -1,12 +1,10 @@ package verifiedpartners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/verifiedpartners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/verifiedpartners/2022-06-15" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/README.md b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/README.md index 993a049dabb..9fadaddc172 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/cacertificates` Documentation -The `cacertificates` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `cacertificates` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/client.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/client.go index 8a649cab30f..929990ed554 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/client.go @@ -15,7 +15,7 @@ type CaCertificatesClient struct { } func NewCaCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CaCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cacertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cacertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CaCertificatesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_cacertificate.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_cacertificate.go index 536d9b33955..4e8fdcc5f9e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_cacertificate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_cacertificate.go @@ -44,7 +44,7 @@ func ParseCaCertificateID(input string) (*CaCertificateId, error) { } id := CaCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCaCertificateIDInsensitively(input string) (*CaCertificateId, error) { } id := CaCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_namespace.go index a3c4e42ee65..e7e7eecbe8c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_get.go index acea88723cf..a97f57fdf20 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_get.go @@ -45,7 +45,6 @@ func (c CaCertificatesClient) Get(ctx context.Context, id CaCertificateId) (resu var model CaCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_listbynamespace.go index 788282c1f73..cbe233acdbc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/version.go b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/version.go index 6ff32802947..271d37ae805 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/cacertificates/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/cacertificates/version.go @@ -1,12 +1,10 @@ package cacertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cacertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cacertificates/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/README.md b/resource-manager/eventgrid/2023-12-15-preview/channels/README.md index 82f106d7593..f8f540464a6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/channels` Documentation -The `channels` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `channels` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/client.go b/resource-manager/eventgrid/2023-12-15-preview/channels/client.go index c799cab7747..290347d0c94 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/client.go @@ -15,7 +15,7 @@ type ChannelsClient struct { } func NewChannelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ChannelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "channels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "channels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChannelsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/id_channel.go b/resource-manager/eventgrid/2023-12-15-preview/channels/id_channel.go index 47d572c4d7b..7fdf023b81b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/id_channel.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/id_channel.go @@ -44,7 +44,7 @@ func ParseChannelID(input string) (*ChannelId, error) { } id := ChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseChannelIDInsensitively(input string) (*ChannelId, error) { } id := ChannelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/id_partnernamespace.go b/resource-manager/eventgrid/2023-12-15-preview/channels/id_partnernamespace.go index 351e10a9a0b..67423bae585 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/id_partnernamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/id_partnernamespace.go @@ -42,7 +42,7 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/method_createorupdate.go b/resource-manager/eventgrid/2023-12-15-preview/channels/method_createorupdate.go index a4c40e77001..e1c08155b09 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/method_createorupdate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ChannelsClient) CreateOrUpdate(ctx context.Context, id ChannelId, input var model Channel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/channels/method_get.go index eeb0504e931..9e5b1011b1a 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/method_get.go @@ -45,7 +45,6 @@ func (c ChannelsClient) Get(ctx context.Context, id ChannelId) (result GetOperat var model Channel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/method_getfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/channels/method_getfullurl.go index d720e485a8d..cdf119d69dc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/method_getfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/method_getfullurl.go @@ -46,7 +46,6 @@ func (c ChannelsClient) GetFullUrl(ctx context.Context, id ChannelId) (result Ge var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/method_listbypartnernamespace.go b/resource-manager/eventgrid/2023-12-15-preview/channels/method_listbypartnernamespace.go index 49c21e5d821..6f34425b3b1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/method_listbypartnernamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/method_listbypartnernamespace.go @@ -40,6 +40,7 @@ func (o ListByPartnerNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByPartnerNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_azureadpartnerclientauthentication.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_azureadpartnerclientauthentication.go index 96a1c334d4b..60c6db1a449 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_azureadpartnerclientauthentication.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_azureadpartnerclientauthentication.go @@ -14,6 +14,14 @@ type AzureADPartnerClientAuthentication struct { Properties *AzureADPartnerClientAuthenticationProperties `json:"properties,omitempty"` // Fields inherited from PartnerClientAuthentication + + ClientAuthenticationType PartnerClientAuthenticationType `json:"clientAuthenticationType"` +} + +func (s AzureADPartnerClientAuthentication) PartnerClientAuthentication() BasePartnerClientAuthenticationImpl { + return BasePartnerClientAuthenticationImpl{ + ClientAuthenticationType: s.ClientAuthenticationType, + } } var _ json.Marshaler = AzureADPartnerClientAuthentication{} @@ -27,9 +35,10 @@ func (s AzureADPartnerClientAuthentication) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureADPartnerClientAuthentication: %+v", err) } + decoded["clientAuthenticationType"] = "AzureAD" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelproperties.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelproperties.go index 962ee6d3ee1..242cb54b8a9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelproperties.go @@ -55,7 +55,7 @@ func (s *ChannelProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partnerDestinationInfo"]; ok { - impl, err := unmarshalPartnerDestinationInfoImplementation(v) + impl, err := UnmarshalPartnerDestinationInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartnerDestinationInfo' for 'ChannelProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelupdateparametersproperties.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelupdateparametersproperties.go index b6685fea0c1..26ab6c83068 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelupdateparametersproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_channelupdateparametersproperties.go @@ -47,7 +47,7 @@ func (s *ChannelUpdateParametersProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partnerDestinationInfo"]; ok { - impl, err := unmarshalPartnerUpdateDestinationInfoImplementation(v) + impl, err := UnmarshalPartnerUpdateDestinationInfoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartnerDestinationInfo' for 'ChannelUpdateParametersProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerclientauthentication.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerclientauthentication.go index 6c50396b1bc..fcf4449cee7 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerclientauthentication.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerclientauthentication.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PartnerClientAuthentication interface { + PartnerClientAuthentication() BasePartnerClientAuthenticationImpl } -// RawPartnerClientAuthenticationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PartnerClientAuthentication = BasePartnerClientAuthenticationImpl{} + +type BasePartnerClientAuthenticationImpl struct { + ClientAuthenticationType PartnerClientAuthenticationType `json:"clientAuthenticationType"` +} + +func (s BasePartnerClientAuthenticationImpl) PartnerClientAuthentication() BasePartnerClientAuthenticationImpl { + return s +} + +var _ PartnerClientAuthentication = RawPartnerClientAuthenticationImpl{} + +// RawPartnerClientAuthenticationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartnerClientAuthenticationImpl struct { - Type string - Values map[string]interface{} + partnerClientAuthentication BasePartnerClientAuthenticationImpl + Type string + Values map[string]interface{} +} + +func (s RawPartnerClientAuthenticationImpl) PartnerClientAuthentication() BasePartnerClientAuthenticationImpl { + return s.partnerClientAuthentication } -func unmarshalPartnerClientAuthenticationImplementation(input []byte) (PartnerClientAuthentication, error) { +func UnmarshalPartnerClientAuthenticationImplementation(input []byte) (PartnerClientAuthentication, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPartnerClientAuthenticationImplementation(input []byte) (PartnerCl return out, nil } - out := RawPartnerClientAuthenticationImpl{ - Type: value, - Values: temp, + var parent BasePartnerClientAuthenticationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartnerClientAuthenticationImpl: %+v", err) } - return out, nil + + return RawPartnerClientAuthenticationImpl{ + partnerClientAuthentication: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerdestinationinfo.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerdestinationinfo.go index 9632ff4309b..f4ba8ccfb54 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerdestinationinfo.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerdestinationinfo.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PartnerDestinationInfo interface { + PartnerDestinationInfo() BasePartnerDestinationInfoImpl } -// RawPartnerDestinationInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PartnerDestinationInfo = BasePartnerDestinationInfoImpl{} + +type BasePartnerDestinationInfoImpl struct { + AzureSubscriptionId *string `json:"azureSubscriptionId,omitempty"` + EndpointServiceContext *string `json:"endpointServiceContext,omitempty"` + EndpointType PartnerEndpointType `json:"endpointType"` + Name *string `json:"name,omitempty"` + ResourceGroupName *string `json:"resourceGroupName,omitempty"` + ResourceMoveChangeHistory *[]ResourceMoveChangeHistory `json:"resourceMoveChangeHistory,omitempty"` +} + +func (s BasePartnerDestinationInfoImpl) PartnerDestinationInfo() BasePartnerDestinationInfoImpl { + return s +} + +var _ PartnerDestinationInfo = RawPartnerDestinationInfoImpl{} + +// RawPartnerDestinationInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartnerDestinationInfoImpl struct { - Type string - Values map[string]interface{} + partnerDestinationInfo BasePartnerDestinationInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawPartnerDestinationInfoImpl) PartnerDestinationInfo() BasePartnerDestinationInfoImpl { + return s.partnerDestinationInfo } -func unmarshalPartnerDestinationInfoImplementation(input []byte) (PartnerDestinationInfo, error) { +func UnmarshalPartnerDestinationInfoImplementation(input []byte) (PartnerDestinationInfo, error) { if input == nil { return nil, nil } @@ -44,10 +66,15 @@ func unmarshalPartnerDestinationInfoImplementation(input []byte) (PartnerDestina return out, nil } - out := RawPartnerDestinationInfoImpl{ - Type: value, - Values: temp, + var parent BasePartnerDestinationInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartnerDestinationInfoImpl: %+v", err) } - return out, nil + + return RawPartnerDestinationInfoImpl{ + partnerDestinationInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerupdatedestinationinfo.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerupdatedestinationinfo.go index 3b7e9562407..49b6391e9f4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerupdatedestinationinfo.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_partnerupdatedestinationinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PartnerUpdateDestinationInfo interface { + PartnerUpdateDestinationInfo() BasePartnerUpdateDestinationInfoImpl } -// RawPartnerUpdateDestinationInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PartnerUpdateDestinationInfo = BasePartnerUpdateDestinationInfoImpl{} + +type BasePartnerUpdateDestinationInfoImpl struct { + EndpointType PartnerEndpointType `json:"endpointType"` +} + +func (s BasePartnerUpdateDestinationInfoImpl) PartnerUpdateDestinationInfo() BasePartnerUpdateDestinationInfoImpl { + return s +} + +var _ PartnerUpdateDestinationInfo = RawPartnerUpdateDestinationInfoImpl{} + +// RawPartnerUpdateDestinationInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartnerUpdateDestinationInfoImpl struct { - Type string - Values map[string]interface{} + partnerUpdateDestinationInfo BasePartnerUpdateDestinationInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawPartnerUpdateDestinationInfoImpl) PartnerUpdateDestinationInfo() BasePartnerUpdateDestinationInfoImpl { + return s.partnerUpdateDestinationInfo } -func unmarshalPartnerUpdateDestinationInfoImplementation(input []byte) (PartnerUpdateDestinationInfo, error) { +func UnmarshalPartnerUpdateDestinationInfoImplementation(input []byte) (PartnerUpdateDestinationInfo, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPartnerUpdateDestinationInfoImplementation(input []byte) (PartnerU return out, nil } - out := RawPartnerUpdateDestinationInfoImpl{ - Type: value, - Values: temp, + var parent BasePartnerUpdateDestinationInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartnerUpdateDestinationInfoImpl: %+v", err) } - return out, nil + + return RawPartnerUpdateDestinationInfoImpl{ + partnerUpdateDestinationInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationinfo.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationinfo.go index 2c4c534a76b..bbfeae05c06 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationinfo.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationinfo.go @@ -14,13 +14,26 @@ type WebhookPartnerDestinationInfo struct { Properties *WebhookPartnerDestinationProperties `json:"properties,omitempty"` // Fields inherited from PartnerDestinationInfo + AzureSubscriptionId *string `json:"azureSubscriptionId,omitempty"` EndpointServiceContext *string `json:"endpointServiceContext,omitempty"` + EndpointType PartnerEndpointType `json:"endpointType"` Name *string `json:"name,omitempty"` ResourceGroupName *string `json:"resourceGroupName,omitempty"` ResourceMoveChangeHistory *[]ResourceMoveChangeHistory `json:"resourceMoveChangeHistory,omitempty"` } +func (s WebhookPartnerDestinationInfo) PartnerDestinationInfo() BasePartnerDestinationInfoImpl { + return BasePartnerDestinationInfoImpl{ + AzureSubscriptionId: s.AzureSubscriptionId, + EndpointServiceContext: s.EndpointServiceContext, + EndpointType: s.EndpointType, + Name: s.Name, + ResourceGroupName: s.ResourceGroupName, + ResourceMoveChangeHistory: s.ResourceMoveChangeHistory, + } +} + var _ json.Marshaler = WebhookPartnerDestinationInfo{} func (s WebhookPartnerDestinationInfo) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s WebhookPartnerDestinationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebhookPartnerDestinationInfo: %+v", err) } + decoded["endpointType"] = "WebHook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationproperties.go index 4c62df5380a..ea8836e6cb7 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookpartnerdestinationproperties.go @@ -32,7 +32,7 @@ func (s *WebhookPartnerDestinationProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["clientAuthentication"]; ok { - impl, err := unmarshalPartnerClientAuthenticationImplementation(v) + impl, err := UnmarshalPartnerClientAuthenticationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ClientAuthentication' for 'WebhookPartnerDestinationProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookupdatepartnerdestinationinfo.go b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookupdatepartnerdestinationinfo.go index 2ec9b0b765f..1dcba974c3d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookupdatepartnerdestinationinfo.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/model_webhookupdatepartnerdestinationinfo.go @@ -14,6 +14,14 @@ type WebhookUpdatePartnerDestinationInfo struct { Properties *WebhookPartnerDestinationProperties `json:"properties,omitempty"` // Fields inherited from PartnerUpdateDestinationInfo + + EndpointType PartnerEndpointType `json:"endpointType"` +} + +func (s WebhookUpdatePartnerDestinationInfo) PartnerUpdateDestinationInfo() BasePartnerUpdateDestinationInfoImpl { + return BasePartnerUpdateDestinationInfoImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = WebhookUpdatePartnerDestinationInfo{} @@ -27,9 +35,10 @@ func (s WebhookUpdatePartnerDestinationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebhookUpdatePartnerDestinationInfo: %+v", err) } + decoded["endpointType"] = "WebHook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/channels/version.go b/resource-manager/eventgrid/2023-12-15-preview/channels/version.go index eed41055d88..588926982ba 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/channels/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/channels/version.go @@ -1,12 +1,10 @@ package channels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/channels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/channels/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/README.md b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/README.md index ae5bc174dbe..e61a4f05198 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/clientgroups` Documentation -The `clientgroups` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `clientgroups` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/client.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/client.go index 4fbbdcdf5f6..0582fd806b6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/client.go @@ -15,7 +15,7 @@ type ClientGroupsClient struct { } func NewClientGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClientGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clientgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clientgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClientGroupsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_clientgroup.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_clientgroup.go index 1a1cecda95c..8be6e5e05ae 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_clientgroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_clientgroup.go @@ -44,7 +44,7 @@ func ParseClientGroupID(input string) (*ClientGroupId, error) { } id := ClientGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClientGroupIDInsensitively(input string) (*ClientGroupId, error) { } id := ClientGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_namespace.go index f0bf5ca2ce6..892c2614525 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_get.go index 5982ad4e269..5f4cd27b88d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_get.go @@ -45,7 +45,6 @@ func (c ClientGroupsClient) Get(ctx context.Context, id ClientGroupId) (result G var model ClientGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_listbynamespace.go index aef6069581d..5e369f49bd2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/version.go b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/version.go index 991f19507a6..d26897d0253 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clientgroups/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clientgroups/version.go @@ -1,12 +1,10 @@ package clientgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clientgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clientgroups/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/README.md b/resource-manager/eventgrid/2023-12-15-preview/clients/README.md index dbd14afcae4..87d6859f77d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/clients` Documentation -The `clients` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `clients` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/client.go b/resource-manager/eventgrid/2023-12-15-preview/clients/client.go index 758bc008017..0ffd97ee41e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/client.go @@ -15,7 +15,7 @@ type ClientsClient struct { } func NewClientsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClientsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clients", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clients", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClientsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/id_client.go b/resource-manager/eventgrid/2023-12-15-preview/clients/id_client.go index 09f1ec569e2..aa4c32843a1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/id_client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/id_client.go @@ -44,7 +44,7 @@ func ParseClientID(input string) (*ClientId, error) { } id := ClientId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClientIDInsensitively(input string) (*ClientId, error) { } id := ClientId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/clients/id_namespace.go index 4647c68a62f..6963b9a3f8b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/clients/method_get.go index 488ba4cea85..f2d0fc38ea0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/method_get.go @@ -45,7 +45,6 @@ func (c ClientsClient) Get(ctx context.Context, id ClientId) (result GetOperatio var model Client result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/clients/method_listbynamespace.go index 4d30123f3f2..050048d3ac4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/clients/version.go b/resource-manager/eventgrid/2023-12-15-preview/clients/version.go index 690bd3ebac0..c98f25cd2c6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/clients/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/clients/version.go @@ -1,12 +1,10 @@ package clients -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clients/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clients/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/README.md b/resource-manager/eventgrid/2023-12-15-preview/domains/README.md index e9330dae571..b7976e04281 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `domains` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/client.go b/resource-manager/eventgrid/2023-12-15-preview/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/id_domain.go b/resource-manager/eventgrid/2023-12-15-preview/domains/id_domain.go index 5c8d8f83ca8..f9e3743d89c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/id_domain.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/domains/method_get.go index b35fd82d944..20619dde9a0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbyresourcegroup.go index b793c81e83c..1dd8ee85e00 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbysubscription.go index 9f6e9c9d05b..fec98f9d04e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listsharedaccesskeys.go index ce2010520a4..d0396a6c73d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c DomainsClient) ListSharedAccessKeys(ctx context.Context, id DomainId) (r var model DomainSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/method_regeneratekey.go b/resource-manager/eventgrid/2023-12-15-preview/domains/method_regeneratekey.go index 9e3ed3bff68..d5a87a91b79 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/method_regeneratekey.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c DomainsClient) RegenerateKey(ctx context.Context, id DomainId, input Dom var model DomainSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/model_domainproperties.go b/resource-manager/eventgrid/2023-12-15-preview/domains/model_domainproperties.go index fde7792536b..cbfd7f5f7ec 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/model_domainproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/model_domainproperties.go @@ -54,7 +54,7 @@ func (s *DomainProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["inputSchemaMapping"]; ok { - impl, err := unmarshalInputSchemaMappingImplementation(v) + impl, err := UnmarshalInputSchemaMappingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InputSchemaMapping' for 'DomainProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/model_inputschemamapping.go b/resource-manager/eventgrid/2023-12-15-preview/domains/model_inputschemamapping.go index 2b57ba9fbd0..85974d6030c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/model_inputschemamapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/model_inputschemamapping.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputSchemaMapping interface { + InputSchemaMapping() BaseInputSchemaMappingImpl } -// RawInputSchemaMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputSchemaMapping = BaseInputSchemaMappingImpl{} + +type BaseInputSchemaMappingImpl struct { + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s BaseInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s +} + +var _ InputSchemaMapping = RawInputSchemaMappingImpl{} + +// RawInputSchemaMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputSchemaMappingImpl struct { - Type string - Values map[string]interface{} + inputSchemaMapping BaseInputSchemaMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s.inputSchemaMapping } -func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { +func UnmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping return out, nil } - out := RawInputSchemaMappingImpl{ - Type: value, - Values: temp, + var parent BaseInputSchemaMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputSchemaMappingImpl: %+v", err) } - return out, nil + + return RawInputSchemaMappingImpl{ + inputSchemaMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/model_jsoninputschemamapping.go b/resource-manager/eventgrid/2023-12-15-preview/domains/model_jsoninputschemamapping.go index c1d94f844f6..a80861d3351 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/model_jsoninputschemamapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/model_jsoninputschemamapping.go @@ -14,6 +14,14 @@ type JsonInputSchemaMapping struct { Properties *JsonInputSchemaMappingProperties `json:"properties,omitempty"` // Fields inherited from InputSchemaMapping + + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s JsonInputSchemaMapping) InputSchemaMapping() BaseInputSchemaMappingImpl { + return BaseInputSchemaMappingImpl{ + InputSchemaMappingType: s.InputSchemaMappingType, + } } var _ json.Marshaler = JsonInputSchemaMapping{} @@ -27,9 +35,10 @@ func (s JsonInputSchemaMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonInputSchemaMapping: %+v", err) } + decoded["inputSchemaMappingType"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/domains/version.go b/resource-manager/eventgrid/2023-12-15-preview/domains/version.go index 8c99e72f1a2..356da32cd37 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domains/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/README.md b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/README.md index 0e4f46f2f09..02d7056f742 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/domaintopics` Documentation -The `domaintopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `domaintopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/client.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/client.go index 2bff1850d61..318ac595a53 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/client.go @@ -15,7 +15,7 @@ type DomainTopicsClient struct { } func NewDomainTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domaintopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domaintopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domain.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domain.go index 22c236988d0..fcfddaea472 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domain.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domaintopic.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domaintopic.go index 27aa0dd6e77..0ff428f3d2d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domaintopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/id_domaintopic.go @@ -44,7 +44,7 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_get.go index 8b38c7d9766..459635b2b03 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_get.go @@ -45,7 +45,6 @@ func (c DomainTopicsClient) Get(ctx context.Context, id DomainTopicId) (result G var model DomainTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_listbydomain.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_listbydomain.go index 4651caedf5b..602ea38f29b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_listbydomain.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/method_listbydomain.go @@ -40,6 +40,7 @@ func (o ListByDomainOperationOptions) ToHeaders() *client.Headers { func (o ListByDomainOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/version.go b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/version.go index 3af76c3d67f..e287029e9fc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/domaintopics/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/domaintopics/version.go @@ -1,12 +1,10 @@ package domaintopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domaintopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domaintopics/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/README.md b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/README.md index 253b4a062d2..60f309e8711 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions` Documentation -The `eventsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `eventsubscriptions` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/client.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/client.go index 0e948364c6c..f6530b8d1cb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/client.go @@ -15,7 +15,7 @@ type EventSubscriptionsClient struct { } func NewEventSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventSubscriptionsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domain.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domain.go index 787f917cf80..a73f84a9052 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domain.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaineventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaineventsubscription.go index e0074d9db09..5ea5cf1d50c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaineventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaineventsubscription.go @@ -44,7 +44,7 @@ func ParseDomainEventSubscriptionID(input string) (*DomainEventSubscriptionId, e } id := DomainEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainEventSubscriptionIDInsensitively(input string) (*DomainEventSubs } id := DomainEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaintopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaintopic.go index 229332cb243..cb4017f1ee2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaintopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_domaintopic.go @@ -44,7 +44,7 @@ func ParseDomainTopicID(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainTopicIDInsensitively(input string) (*DomainTopicId, error) { } id := DomainTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_eventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_eventsubscription.go index e5560868063..eea77dabe4d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_eventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_eventsubscription.go @@ -44,7 +44,7 @@ func ParseEventSubscriptionID(input string) (*EventSubscriptionId, error) { } id := EventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventSubscriptionIDInsensitively(input string) (*EventSubscriptionId, } id := EventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_location.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_location.go index 4b7f13eaa80..7fd3fa0bb2f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_location.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_locationtopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_locationtopictype.go index 37ffb1a0a27..07f2bbaa7d2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_locationtopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_locationtopictype.go @@ -42,7 +42,7 @@ func ParseLocationTopicTypeID(input string) (*LocationTopicTypeId, error) { } id := LocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationTopicTypeIDInsensitively(input string) (*LocationTopicTypeId, } id := LocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopic.go index cf2204455b3..bcfd86ced8b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopic.go @@ -44,7 +44,7 @@ func ParseNamespaceTopicID(input string) (*NamespaceTopicId, error) { } id := NamespaceTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamespaceTopicIDInsensitively(input string) (*NamespaceTopicId, error) } id := NamespaceTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopiceventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopiceventsubscription.go index b233bcdde7f..321ce7159db 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopiceventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_namespacetopiceventsubscription.go @@ -46,7 +46,7 @@ func ParseNamespaceTopicEventSubscriptionID(input string) (*NamespaceTopicEventS } id := NamespaceTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNamespaceTopicEventSubscriptionIDInsensitively(input string) (*Namespa } id := NamespaceTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopic.go index 29fe44ab6df..1155937d177 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopic.go @@ -42,7 +42,7 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopiceventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopiceventsubscription.go index ddfaebbf540..ba6838dd292 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopiceventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_partnertopiceventsubscription.go @@ -44,7 +44,7 @@ func ParsePartnerTopicEventSubscriptionID(input string) (*PartnerTopicEventSubsc } id := PartnerTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePartnerTopicEventSubscriptionIDInsensitively(input string) (*PartnerTo } id := PartnerTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocation.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocation.go index 9443dff760e..cf3c2c687c0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocation.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocationtopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocationtopictype.go index d899252130d..ab4fdfb7826 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocationtopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providerlocationtopictype.go @@ -44,7 +44,7 @@ func ParseProviderLocationTopicTypeID(input string) (*ProviderLocationTopicTypeI } id := ProviderLocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderLocationTopicTypeIDInsensitively(input string) (*ProviderLocat } id := ProviderLocationTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providertopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providertopictype.go index e2bc4876d00..ebe861ecf53 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providertopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_providertopictype.go @@ -40,7 +40,7 @@ func ParseProviderTopicTypeID(input string) (*ProviderTopicTypeId, error) { } id := ProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderTopicTypeIDInsensitively(input string) (*ProviderTopicTypeId, } id := ProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_resourcegroupprovidertopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_resourcegroupprovidertopictype.go index ceaccf7d225..0ab7f1c6cb2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_resourcegroupprovidertopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_resourcegroupprovidertopictype.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderTopicTypeID(input string) (*ResourceGroupProvider } id := ResourceGroupProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderTopicTypeIDInsensitively(input string) (*Resource } id := ResourceGroupProviderTopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_scopedeventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_scopedeventsubscription.go index 6ed2211b03b..23e4840e64a 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_scopedeventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_scopedeventsubscription.go @@ -40,7 +40,7 @@ func ParseScopedEventSubscriptionID(input string) (*ScopedEventSubscriptionId, e } id := ScopedEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedEventSubscriptionIDInsensitively(input string) (*ScopedEventSubs } id := ScopedEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopic.go index a4eb499e4d2..ab7960ada42 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopic.go @@ -42,7 +42,7 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopiceventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopiceventsubscription.go index acba0c45412..21da3aff7b1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopiceventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_systemtopiceventsubscription.go @@ -44,7 +44,7 @@ func ParseSystemTopicEventSubscriptionID(input string) (*SystemTopicEventSubscri } id := SystemTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSystemTopicEventSubscriptionIDInsensitively(input string) (*SystemTopi } id := SystemTopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topic.go index 3bd4c281bb3..12b74b58e12 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topic.go @@ -42,7 +42,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topiceventsubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topiceventsubscription.go index d8969bcbd5d..e8c66f9e26a 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topiceventsubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/id_topiceventsubscription.go @@ -46,7 +46,7 @@ func ParseTopicEventSubscriptionID(input string) (*TopicEventSubscriptionId, err } id := TopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicEventSubscriptionIDInsensitively(input string) (*TopicEventSubscr } id := TopicEventSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsget.go index fc4a22816c7..8abe120a8d7 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGet(ctx context.Contex var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go index 43be5abe0f1..464ff65aaa1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGetDeliveryAttributes( var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go index 9ae6056e572..b8b6b82fddd 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainEventSubscriptionsGetFullUrl(ctx context var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionslist.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionslist.go index 42004520924..dcc35420742 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionslist.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaineventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o DomainEventSubscriptionsListOperationOptions) ToHeaders() *client.Header func (o DomainEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsget.go index 81fcdc52e47..a496e0d5793 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGet(ctx context.C var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go index e86151c60ea..65d110b3922 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGetDeliveryAttrib var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go index f2c901e3055..84a30dceed8 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) DomainTopicEventSubscriptionsGetFullUrl(ctx co var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionslist.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionslist.go index 8e3ffb34d28..84b2781e70e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionslist.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_domaintopiceventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o DomainTopicEventSubscriptionsListOperationOptions) ToHeaders() *client.H func (o DomainTopicEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_get.go index 8f4e1bb89cf..b982da8fa2d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_get.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) Get(ctx context.Context, id ScopedEventSubscri var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getdeliveryattributes.go index 07b422dfe34..aca7d4625f9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) GetDeliveryAttributes(ctx context.Context, id var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getfullurl.go index e86dc536f30..e4cc7356715 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_getfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) GetFullUrl(ctx context.Context, id ScopedEvent var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbydomaintopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbydomaintopic.go index 4a638a74722..77f20ec33f8 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbydomaintopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbydomaintopic.go @@ -40,6 +40,7 @@ func (o ListByDomainTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByDomainTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbyresource.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbyresource.go index 8b99a4bb3fa..66595c904cb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbyresource.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroup.go index fb150fef62f..82cf428472d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListGlobalByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListGlobalByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go index 219a6798cab..57b43607c04 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbyresourcegroupfortopictype.go @@ -40,6 +40,7 @@ func (o ListGlobalByResourceGroupForTopicTypeOperationOptions) ToHeaders() *clie func (o ListGlobalByResourceGroupForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscription.go index f90051169bf..c05d2b8888b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscription.go @@ -41,6 +41,7 @@ func (o ListGlobalBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListGlobalBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go index acef9347884..426fd647d00 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listglobalbysubscriptionfortopictype.go @@ -40,6 +40,7 @@ func (o ListGlobalBySubscriptionForTopicTypeOperationOptions) ToHeaders() *clien func (o ListGlobalBySubscriptionForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroup.go index 6c25ecd8ec5..a99e33b7d4e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListRegionalByResourceGroupOperationOptions) ToHeaders() *client.Headers func (o ListRegionalByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go index eb5cb67bd6b..716d6f2ef64 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbyresourcegroupfortopictype.go @@ -40,6 +40,7 @@ func (o ListRegionalByResourceGroupForTopicTypeOperationOptions) ToHeaders() *cl func (o ListRegionalByResourceGroupForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscription.go index 1ca5c1df4b3..31412a13dad 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscription.go @@ -40,6 +40,7 @@ func (o ListRegionalBySubscriptionOperationOptions) ToHeaders() *client.Headers func (o ListRegionalBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go index bf76a249348..4780656ef03 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_listregionalbysubscriptionfortopictype.go @@ -40,6 +40,7 @@ func (o ListRegionalBySubscriptionForTopicTypeOperationOptions) ToHeaders() *cli func (o ListRegionalBySubscriptionForTopicTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsget.go index ceceb3c2649..8e70e7f4ccb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) NamespaceTopicEventSubscriptionsGet(ctx contex var model Subscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsgetdeliveryattributes.go index ad55ef65336..37c86015269 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) NamespaceTopicEventSubscriptionsGetDeliveryAtt var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionslistbynamespacetopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionslistbynamespacetopic.go index e8a53c78eb0..0bda493b221 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionslistbynamespacetopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_namespacetopiceventsubscriptionslistbynamespacetopic.go @@ -40,6 +40,7 @@ func (o NamespaceTopicEventSubscriptionsListByNamespaceTopicOperationOptions) To func (o NamespaceTopicEventSubscriptionsListByNamespaceTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsget.go index 95a2272a743..ad5a9c33b04 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGet(ctx context. var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go index 735f29a1d7f..2ff0454a125 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGetDeliveryAttri var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go index 2a7eaa97fb9..c94e3c6dadd 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) PartnerTopicEventSubscriptionsGetFullUrl(ctx c var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go index 873f970532f..0520c02d803 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_partnertopiceventsubscriptionslistbypartnertopic.go @@ -40,6 +40,7 @@ func (o PartnerTopicEventSubscriptionsListByPartnerTopicOperationOptions) ToHead func (o PartnerTopicEventSubscriptionsListByPartnerTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsget.go index cdc5a2f4de7..e0572e8aa33 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGet(ctx context.C var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go index f2e0fd63275..02c699f8958 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGetDeliveryAttrib var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go index 2465d121fd2..ec8d05a2ad3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) SystemTopicEventSubscriptionsGetFullUrl(ctx co var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go index 5428359059b..cada08d4972 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_systemtopiceventsubscriptionslistbysystemtopic.go @@ -40,6 +40,7 @@ func (o SystemTopicEventSubscriptionsListBySystemTopicOperationOptions) ToHeader func (o SystemTopicEventSubscriptionsListBySystemTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsget.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsget.go index c3bd2e6b42d..e2ecec90953 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsget.go @@ -45,7 +45,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGet(ctx context.Context var model EventSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go index 8e703714f9d..2b43490726f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetdeliveryattributes.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGetDeliveryAttributes(c var model DeliveryAttributeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go index ff481e4d08d..998c1474a03 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionsgetfullurl.go @@ -46,7 +46,6 @@ func (c EventSubscriptionsClient) TopicEventSubscriptionsGetFullUrl(ctx context. var model EventSubscriptionFullUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionslist.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionslist.go index fd1ace3bff7..64d05922a74 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionslist.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/method_topiceventsubscriptionslist.go @@ -40,6 +40,7 @@ func (o TopicEventSubscriptionsListOperationOptions) ToHeaders() *client.Headers func (o TopicEventSubscriptionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_advancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_advancedfilter.go index 9b667278529..21dc23cad6e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_advancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_advancedfilter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AdvancedFilter interface { + AdvancedFilter() BaseAdvancedFilterImpl } -// RawAdvancedFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AdvancedFilter = BaseAdvancedFilterImpl{} + +type BaseAdvancedFilterImpl struct { + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s BaseAdvancedFilterImpl) AdvancedFilter() BaseAdvancedFilterImpl { + return s +} + +var _ AdvancedFilter = RawAdvancedFilterImpl{} + +// RawAdvancedFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAdvancedFilterImpl struct { - Type string - Values map[string]interface{} + advancedFilter BaseAdvancedFilterImpl + Type string + Values map[string]interface{} +} + +func (s RawAdvancedFilterImpl) AdvancedFilter() BaseAdvancedFilterImpl { + return s.advancedFilter } -func unmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) { +func UnmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) { if input == nil { return nil, nil } @@ -188,10 +206,15 @@ func unmarshalAdvancedFilterImplementation(input []byte) (AdvancedFilter, error) return out, nil } - out := RawAdvancedFilterImpl{ - Type: value, - Values: temp, + var parent BaseAdvancedFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAdvancedFilterImpl: %+v", err) } - return out, nil + + return RawAdvancedFilterImpl{ + advancedFilter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go index d580a1e3722..d403033e291 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestination.go @@ -14,6 +14,14 @@ type AzureFunctionEventSubscriptionDestination struct { Properties *AzureFunctionEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureFunctionEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureFunctionEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s AzureFunctionEventSubscriptionDestination) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go index 38c0e10c193..1a253ca44ce 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_azurefunctioneventsubscriptiondestinationproperties.go @@ -41,7 +41,7 @@ func (s *AzureFunctionEventSubscriptionDestinationProperties) UnmarshalJSON(byte output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'AzureFunctionEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsadvancedfilter.go index fc35dd630b7..1fc50edfc6c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsadvancedfilter.go @@ -14,7 +14,16 @@ type BoolEqualsAdvancedFilter struct { Value *bool `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s BoolEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = BoolEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s BoolEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BoolEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "BoolEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsfilter.go index 81c4745a466..b565185086c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_boolequalsfilter.go @@ -14,7 +14,16 @@ type BoolEqualsFilter struct { Value *bool `json:"value,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s BoolEqualsFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = BoolEqualsFilter{} @@ -28,9 +37,10 @@ func (s BoolEqualsFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BoolEqualsFilter: %+v", err) } + decoded["operatorType"] = "BoolEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterdestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterdestination.go index b445f359655..2feffd41590 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterdestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterdestination.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeadLetterDestination interface { + DeadLetterDestination() BaseDeadLetterDestinationImpl } -// RawDeadLetterDestinationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeadLetterDestination = BaseDeadLetterDestinationImpl{} + +type BaseDeadLetterDestinationImpl struct { + EndpointType DeadLetterEndPointType `json:"endpointType"` +} + +func (s BaseDeadLetterDestinationImpl) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return s +} + +var _ DeadLetterDestination = RawDeadLetterDestinationImpl{} + +// RawDeadLetterDestinationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeadLetterDestinationImpl struct { - Type string - Values map[string]interface{} + deadLetterDestination BaseDeadLetterDestinationImpl + Type string + Values map[string]interface{} +} + +func (s RawDeadLetterDestinationImpl) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return s.deadLetterDestination } -func unmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDestination, error) { +func UnmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDestination, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDeadLetterDestinationImplementation(input []byte) (DeadLetterDesti return out, nil } - out := RawDeadLetterDestinationImpl{ - Type: value, - Values: temp, + var parent BaseDeadLetterDestinationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeadLetterDestinationImpl: %+v", err) } - return out, nil + + return RawDeadLetterDestinationImpl{ + deadLetterDestination: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterwithresourceidentity.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterwithresourceidentity.go index 68884c87f6b..cd72791eda4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterwithresourceidentity.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deadletterwithresourceidentity.go @@ -30,7 +30,7 @@ func (s *DeadLetterWithResourceIdentity) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'DeadLetterWithResourceIdentity': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributelistresult.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributelistresult.go index 1fc05481f8c..c3cf8601504 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributelistresult.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributelistresult.go @@ -29,7 +29,7 @@ func (s *DeliveryAttributeListResult) UnmarshalJSON(bytes []byte) error { output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'DeliveryAttributeListResult': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributemapping.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributemapping.go index 317188346aa..5bf7682ea37 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributemapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliveryattributemapping.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeliveryAttributeMapping interface { + DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl } -// RawDeliveryAttributeMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeliveryAttributeMapping = BaseDeliveryAttributeMappingImpl{} + +type BaseDeliveryAttributeMappingImpl struct { + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s BaseDeliveryAttributeMappingImpl) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return s +} + +var _ DeliveryAttributeMapping = RawDeliveryAttributeMappingImpl{} + +// RawDeliveryAttributeMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeliveryAttributeMappingImpl struct { - Type string - Values map[string]interface{} + deliveryAttributeMapping BaseDeliveryAttributeMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawDeliveryAttributeMappingImpl) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return s.deliveryAttributeMapping } -func unmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttributeMapping, error) { +func UnmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttributeMapping, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDeliveryAttributeMappingImplementation(input []byte) (DeliveryAttr return out, nil } - out := RawDeliveryAttributeMappingImpl{ - Type: value, - Values: temp, + var parent BaseDeliveryAttributeMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeliveryAttributeMappingImpl: %+v", err) } - return out, nil + + return RawDeliveryAttributeMappingImpl{ + deliveryAttributeMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliverywithresourceidentity.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliverywithresourceidentity.go index 23396094acd..95241ded9cd 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliverywithresourceidentity.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_deliverywithresourceidentity.go @@ -30,7 +30,7 @@ func (s *DeliveryWithResourceIdentity) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'DeliveryWithResourceIdentity': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_dynamicdeliveryattributemapping.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_dynamicdeliveryattributemapping.go index d7af26c8335..5937dd8a0b3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_dynamicdeliveryattributemapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_dynamicdeliveryattributemapping.go @@ -14,7 +14,16 @@ type DynamicDeliveryAttributeMapping struct { Properties *DynamicDeliveryAttributeMappingProperties `json:"properties,omitempty"` // Fields inherited from DeliveryAttributeMapping - Name *string `json:"name,omitempty"` + + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s DynamicDeliveryAttributeMapping) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return BaseDeliveryAttributeMappingImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DynamicDeliveryAttributeMapping{} @@ -28,9 +37,10 @@ func (s DynamicDeliveryAttributeMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicDeliveryAttributeMapping: %+v", err) } + decoded["type"] = "Dynamic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestination.go index b1a7a97c128..3fe1b5de212 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type EventHubEventSubscriptionDestination struct { Properties *EventHubEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s EventHubEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = EventHubEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s EventHubEventSubscriptionDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go index 57d8d816374..53dd493f758 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventhubeventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *EventHubEventSubscriptionDestinationProperties) UnmarshalJSON(bytes []b output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'EventHubEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptiondestination.go index 0e68677824b..f79cccdbeb0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptiondestination.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSubscriptionDestination interface { + EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl } -// RawEventSubscriptionDestinationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSubscriptionDestination = BaseEventSubscriptionDestinationImpl{} + +type BaseEventSubscriptionDestinationImpl struct { + EndpointType EndpointType `json:"endpointType"` +} + +func (s BaseEventSubscriptionDestinationImpl) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return s +} + +var _ EventSubscriptionDestination = RawEventSubscriptionDestinationImpl{} + +// RawEventSubscriptionDestinationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSubscriptionDestinationImpl struct { - Type string - Values map[string]interface{} + eventSubscriptionDestination BaseEventSubscriptionDestinationImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSubscriptionDestinationImpl) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return s.eventSubscriptionDestination } -func unmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSubscriptionDestination, error) { +func UnmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSubscriptionDestination, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalEventSubscriptionDestinationImplementation(input []byte) (EventSub return out, nil } - out := RawEventSubscriptionDestinationImpl{ - Type: value, - Values: temp, + var parent BaseEventSubscriptionDestinationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSubscriptionDestinationImpl: %+v", err) } - return out, nil + + return RawEventSubscriptionDestinationImpl{ + eventSubscriptionDestination: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionfilter.go index 2bb6ec93a10..eb73087950c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionfilter.go @@ -45,7 +45,7 @@ func (s *EventSubscriptionFilter) UnmarshalJSON(bytes []byte) error { output := make([]AdvancedFilter, 0) for i, val := range listTemp { - impl, err := unmarshalAdvancedFilterImplementation(val) + impl, err := UnmarshalAdvancedFilterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'AdvancedFilters' for 'EventSubscriptionFilter': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionproperties.go index 567ad97d79a..76c37353687 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionproperties.go @@ -62,7 +62,7 @@ func (s *EventSubscriptionProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'EventSubscriptionProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventSubscriptionProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'EventSubscriptionProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionupdateparameters.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionupdateparameters.go index 72f70f8b4d9..c481ba77913 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionupdateparameters.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_eventsubscriptionupdateparameters.go @@ -58,7 +58,7 @@ func (s *EventSubscriptionUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deadLetterDestination"]; ok { - impl, err := unmarshalDeadLetterDestinationImplementation(v) + impl, err := UnmarshalDeadLetterDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeadLetterDestination' for 'EventSubscriptionUpdateParameters': %+v", err) } @@ -66,7 +66,7 @@ func (s *EventSubscriptionUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["destination"]; ok { - impl, err := unmarshalEventSubscriptionDestinationImplementation(v) + impl, err := UnmarshalEventSubscriptionDestinationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Destination' for 'EventSubscriptionUpdateParameters': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filter.go index e86ff888523..c11abc78b01 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Filter interface { + Filter() BaseFilterImpl } -// RawFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Filter = BaseFilterImpl{} + +type BaseFilterImpl struct { + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s BaseFilterImpl) Filter() BaseFilterImpl { + return s +} + +var _ Filter = RawFilterImpl{} + +// RawFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFilterImpl struct { + filter BaseFilterImpl Type string Values map[string]interface{} } -func unmarshalFilterImplementation(input []byte) (Filter, error) { +func (s RawFilterImpl) Filter() BaseFilterImpl { + return s.filter +} + +func UnmarshalFilterImplementation(input []byte) (Filter, error) { if input == nil { return nil, nil } @@ -188,10 +206,15 @@ func unmarshalFilterImplementation(input []byte) (Filter, error) { return out, nil } - out := RawFilterImpl{ + var parent BaseFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFilterImpl: %+v", err) + } + + return RawFilterImpl{ + filter: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filtersconfiguration.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filtersconfiguration.go index 8bc271cdb45..8246072dbe9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filtersconfiguration.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_filtersconfiguration.go @@ -37,7 +37,7 @@ func (s *FiltersConfiguration) UnmarshalJSON(bytes []byte) error { output := make([]Filter, 0) for i, val := range listTemp { - impl, err := unmarshalFilterImplementation(val) + impl, err := UnmarshalFilterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Filters' for 'FiltersConfiguration': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go index 53f4b550d28..527e83ec745 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestination.go @@ -14,6 +14,14 @@ type HybridConnectionEventSubscriptionDestination struct { Properties *HybridConnectionEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s HybridConnectionEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = HybridConnectionEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s HybridConnectionEventSubscriptionDestination) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HybridConnectionEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "HybridConnection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go index 246fe52a443..e63ec58deff 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_hybridconnectioneventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *HybridConnectionEventSubscriptionDestinationProperties) UnmarshalJSON(b output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'HybridConnectionEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnulladvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnulladvancedfilter.go index 46438113a68..94c99dc7473 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnulladvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnulladvancedfilter.go @@ -13,7 +13,16 @@ var _ AdvancedFilter = IsNotNullAdvancedFilter{} type IsNotNullAdvancedFilter struct { // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s IsNotNullAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNotNullAdvancedFilter{} @@ -27,9 +36,10 @@ func (s IsNotNullAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNotNullAdvancedFilter: %+v", err) } + decoded["operatorType"] = "IsNotNull" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnullfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnullfilter.go index 6fc33d51178..627b596ad5b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnullfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnotnullfilter.go @@ -13,7 +13,16 @@ var _ Filter = IsNotNullFilter{} type IsNotNullFilter struct { // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s IsNotNullFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNotNullFilter{} @@ -27,9 +36,10 @@ func (s IsNotNullFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNotNullFilter: %+v", err) } + decoded["operatorType"] = "IsNotNull" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedadvancedfilter.go index bd5ffc5807b..15784423f76 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedadvancedfilter.go @@ -13,7 +13,16 @@ var _ AdvancedFilter = IsNullOrUndefinedAdvancedFilter{} type IsNullOrUndefinedAdvancedFilter struct { // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s IsNullOrUndefinedAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNullOrUndefinedAdvancedFilter{} @@ -27,9 +36,10 @@ func (s IsNullOrUndefinedAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNullOrUndefinedAdvancedFilter: %+v", err) } + decoded["operatorType"] = "IsNullOrUndefined" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedfilter.go index 7f6f64bce45..c859ccd3482 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_isnullorundefinedfilter.go @@ -13,7 +13,16 @@ var _ Filter = IsNullOrUndefinedFilter{} type IsNullOrUndefinedFilter struct { // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s IsNullOrUndefinedFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = IsNullOrUndefinedFilter{} @@ -27,9 +36,10 @@ func (s IsNullOrUndefinedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IsNullOrUndefinedFilter: %+v", err) } + decoded["operatorType"] = "IsNullOrUndefined" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_monitoralerteventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_monitoralerteventsubscriptiondestination.go index 80a73b1e6b0..789dbab44e6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_monitoralerteventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_monitoralerteventsubscriptiondestination.go @@ -14,6 +14,14 @@ type MonitorAlertEventSubscriptionDestination struct { Properties *MonitorAlertEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s MonitorAlertEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = MonitorAlertEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s MonitorAlertEventSubscriptionDestination) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MonitorAlertEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "MonitorAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_namespacetopiceventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_namespacetopiceventsubscriptiondestination.go index 9d619dbec18..b3ba22eab80 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_namespacetopiceventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_namespacetopiceventsubscriptiondestination.go @@ -14,6 +14,14 @@ type NamespaceTopicEventSubscriptionDestination struct { Properties *NamespaceTopicEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s NamespaceTopicEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = NamespaceTopicEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s NamespaceTopicEventSubscriptionDestination) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamespaceTopicEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "NamespaceTopic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanadvancedfilter.go index 84909978854..0e62571ac89 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanadvancedfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanfilter.go index dcba1e688f0..3cb47fa05d6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go index 65713cba2eb..d9a9276b682 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsadvancedfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanOrEqualsAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanOrEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanOrEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanOrEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanOrEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsfilter.go index 5ab37ee6507..e8e576be232 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbergreaterthanorequalsfilter.go @@ -14,7 +14,16 @@ type NumberGreaterThanOrEqualsFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberGreaterThanOrEqualsFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberGreaterThanOrEqualsFilter{} @@ -28,9 +37,10 @@ func (s NumberGreaterThanOrEqualsFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberGreaterThanOrEqualsFilter: %+v", err) } + decoded["operatorType"] = "NumberGreaterThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinadvancedfilter.go index 211f9800a91..11c8b08cfb3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinadvancedfilter.go @@ -14,7 +14,16 @@ type NumberInAdvancedFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinfilter.go index 04c614c9dd4..fdc4b78b39b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinfilter.go @@ -14,7 +14,16 @@ type NumberInFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberInFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInFilter{} @@ -28,9 +37,10 @@ func (s NumberInFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInFilter: %+v", err) } + decoded["operatorType"] = "NumberIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangeadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangeadvancedfilter.go index 1d3a5ea9774..6bb34b77724 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangeadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangeadvancedfilter.go @@ -14,7 +14,16 @@ type NumberInRangeAdvancedFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberInRangeAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInRangeAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberInRangeAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInRangeAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangefilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangefilter.go index 1d19f6b645f..f799a082c59 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangefilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberinrangefilter.go @@ -14,7 +14,16 @@ type NumberInRangeFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberInRangeFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberInRangeFilter{} @@ -28,9 +37,10 @@ func (s NumberInRangeFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberInRangeFilter: %+v", err) } + decoded["operatorType"] = "NumberInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanadvancedfilter.go index 1cb7714062a..42c3700ac69 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanadvancedfilter.go @@ -14,7 +14,16 @@ type NumberLessThanAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanfilter.go index 356bbd64ceb..b7dc1d5aaf8 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanfilter.go @@ -14,7 +14,16 @@ type NumberLessThanFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThan" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go index 3863059df16..9a2b17d16f9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsadvancedfilter.go @@ -14,7 +14,16 @@ type NumberLessThanOrEqualsAdvancedFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanOrEqualsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanOrEqualsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanOrEqualsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanOrEqualsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsfilter.go index 299e0d5aba6..bd66b432696 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numberlessthanorequalsfilter.go @@ -14,7 +14,16 @@ type NumberLessThanOrEqualsFilter struct { Value *float64 `json:"value,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberLessThanOrEqualsFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberLessThanOrEqualsFilter{} @@ -28,9 +37,10 @@ func (s NumberLessThanOrEqualsFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberLessThanOrEqualsFilter: %+v", err) } + decoded["operatorType"] = "NumberLessThanOrEquals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinadvancedfilter.go index 495b6bbeae4..418b3d8f875 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinadvancedfilter.go @@ -14,7 +14,16 @@ type NumberNotInAdvancedFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinfilter.go index 193872f33ab..8e45c928eaa 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinfilter.go @@ -14,7 +14,16 @@ type NumberNotInFilter struct { Values *[]float64 `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInFilter: %+v", err) } + decoded["operatorType"] = "NumberNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangeadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangeadvancedfilter.go index 943c558903f..46d863fc133 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangeadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangeadvancedfilter.go @@ -14,7 +14,16 @@ type NumberNotInRangeAdvancedFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInRangeAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInRangeAdvancedFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInRangeAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInRangeAdvancedFilter: %+v", err) } + decoded["operatorType"] = "NumberNotInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangefilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangefilter.go index 9fb5d996c49..97436017837 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangefilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_numbernotinrangefilter.go @@ -14,7 +14,16 @@ type NumberNotInRangeFilter struct { Values *[][]float64 `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s NumberNotInRangeFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = NumberNotInRangeFilter{} @@ -28,9 +37,10 @@ func (s NumberNotInRangeFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumberNotInRangeFilter: %+v", err) } + decoded["operatorType"] = "NumberNotInRange" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_partnereventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_partnereventsubscriptiondestination.go index 1dafb8e110c..7355fdc68a1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_partnereventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_partnereventsubscriptiondestination.go @@ -14,6 +14,14 @@ type PartnerEventSubscriptionDestination struct { Properties *PartnerEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s PartnerEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = PartnerEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s PartnerEventSubscriptionDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartnerEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "PartnerDestination" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go index 8b63b749850..72f55364e53 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type ServiceBusQueueEventSubscriptionDestination struct { Properties *ServiceBusQueueEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s ServiceBusQueueEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = ServiceBusQueueEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueEventSubscriptionDestination) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "ServiceBusQueue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go index abb0204b430..02d4b570b66 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebusqueueeventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *ServiceBusQueueEventSubscriptionDestinationProperties) UnmarshalJSON(by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'ServiceBusQueueEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go index a3b47d8a5b5..d67b1efcfe0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestination.go @@ -14,6 +14,14 @@ type ServiceBusTopicEventSubscriptionDestination struct { Properties *ServiceBusTopicEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s ServiceBusTopicEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = ServiceBusTopicEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicEventSubscriptionDestination) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "ServiceBusTopic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go index 30e8fa6cb26..d8c90c28802 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_servicebustopiceventsubscriptiondestinationproperties.go @@ -37,7 +37,7 @@ func (s *ServiceBusTopicEventSubscriptionDestinationProperties) UnmarshalJSON(by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'ServiceBusTopicEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_staticdeliveryattributemapping.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_staticdeliveryattributemapping.go index efc11b99fa1..4fc1df9149c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_staticdeliveryattributemapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_staticdeliveryattributemapping.go @@ -14,7 +14,16 @@ type StaticDeliveryAttributeMapping struct { Properties *StaticDeliveryAttributeMappingProperties `json:"properties,omitempty"` // Fields inherited from DeliveryAttributeMapping - Name *string `json:"name,omitempty"` + + Name *string `json:"name,omitempty"` + Type DeliveryAttributeMappingType `json:"type"` +} + +func (s StaticDeliveryAttributeMapping) DeliveryAttributeMapping() BaseDeliveryAttributeMappingImpl { + return BaseDeliveryAttributeMappingImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = StaticDeliveryAttributeMapping{} @@ -28,9 +37,10 @@ func (s StaticDeliveryAttributeMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StaticDeliveryAttributeMapping: %+v", err) } + decoded["type"] = "Static" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storageblobdeadletterdestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storageblobdeadletterdestination.go index 7c184d520ac..7e213ea8a14 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storageblobdeadletterdestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storageblobdeadletterdestination.go @@ -14,6 +14,14 @@ type StorageBlobDeadLetterDestination struct { Properties *StorageBlobDeadLetterDestinationProperties `json:"properties,omitempty"` // Fields inherited from DeadLetterDestination + + EndpointType DeadLetterEndPointType `json:"endpointType"` +} + +func (s StorageBlobDeadLetterDestination) DeadLetterDestination() BaseDeadLetterDestinationImpl { + return BaseDeadLetterDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = StorageBlobDeadLetterDestination{} @@ -27,9 +35,10 @@ func (s StorageBlobDeadLetterDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageBlobDeadLetterDestination: %+v", err) } + decoded["endpointType"] = "StorageBlob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go index 6c86f8a335b..af290359129 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_storagequeueeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type StorageQueueEventSubscriptionDestination struct { Properties *StorageQueueEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s StorageQueueEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = StorageQueueEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s StorageQueueEventSubscriptionDestination) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StorageQueueEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "StorageQueue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithadvancedfilter.go index cafeef39433..d412ed24c13 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringBeginsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringBeginsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringBeginsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringBeginsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringBeginsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithfilter.go index 0c967fd5e9b..5a759e17707 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringbeginswithfilter.go @@ -14,7 +14,16 @@ type StringBeginsWithFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringBeginsWithFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringBeginsWithFilter{} @@ -28,9 +37,10 @@ func (s StringBeginsWithFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringBeginsWithFilter: %+v", err) } + decoded["operatorType"] = "StringBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsadvancedfilter.go index 3a3d2697939..077f690d5b4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsadvancedfilter.go @@ -14,7 +14,16 @@ type StringContainsAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringContainsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringContainsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringContainsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringContainsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsfilter.go index 3140c6e2a42..002cc189e04 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringcontainsfilter.go @@ -14,7 +14,16 @@ type StringContainsFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringContainsFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringContainsFilter{} @@ -28,9 +37,10 @@ func (s StringContainsFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringContainsFilter: %+v", err) } + decoded["operatorType"] = "StringContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithadvancedfilter.go index aedb41f4e0d..77f0887e572 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringEndsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringEndsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringEndsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringEndsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringEndsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithfilter.go index 89b3923e85d..1bb4e1a7d0f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringendswithfilter.go @@ -14,7 +14,16 @@ type StringEndsWithFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringEndsWithFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringEndsWithFilter{} @@ -28,9 +37,10 @@ func (s StringEndsWithFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringEndsWithFilter: %+v", err) } + decoded["operatorType"] = "StringEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinadvancedfilter.go index d0fd2071fff..4b435ee7948 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinadvancedfilter.go @@ -14,7 +14,16 @@ type StringInAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinfilter.go index d8d2a7b5386..07fb1d50f6b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringinfilter.go @@ -14,7 +14,16 @@ type StringInFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringInFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringInFilter{} @@ -28,9 +37,10 @@ func (s StringInFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringInFilter: %+v", err) } + decoded["operatorType"] = "StringIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go index cbc797c37f3..0d7ef2e6a3f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotBeginsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotBeginsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotBeginsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotBeginsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotBeginsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithfilter.go index 2fc2d2b7130..cb78d16e886 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotbeginswithfilter.go @@ -14,7 +14,16 @@ type StringNotBeginsWithFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringNotBeginsWithFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotBeginsWithFilter{} @@ -28,9 +37,10 @@ func (s StringNotBeginsWithFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotBeginsWithFilter: %+v", err) } + decoded["operatorType"] = "StringNotBeginsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsadvancedfilter.go index 8a20e0daf71..cc4bc2b6083 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotContainsAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotContainsAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotContainsAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotContainsAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotContainsAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsfilter.go index c73f42c48a2..e4a250a35ff 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotcontainsfilter.go @@ -14,7 +14,16 @@ type StringNotContainsFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringNotContainsFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotContainsFilter{} @@ -28,9 +37,10 @@ func (s StringNotContainsFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotContainsFilter: %+v", err) } + decoded["operatorType"] = "StringNotContains" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithadvancedfilter.go index c892f63ac36..f68d914687e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotEndsWithAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotEndsWithAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotEndsWithAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotEndsWithAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotEndsWithAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithfilter.go index e334f308789..e74f5a2e5b0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotendswithfilter.go @@ -14,7 +14,16 @@ type StringNotEndsWithFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringNotEndsWithFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotEndsWithFilter{} @@ -28,9 +37,10 @@ func (s StringNotEndsWithFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotEndsWithFilter: %+v", err) } + decoded["operatorType"] = "StringNotEndsWith" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinadvancedfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinadvancedfilter.go index da8aeb09107..265f6abcd45 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinadvancedfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinadvancedfilter.go @@ -14,7 +14,16 @@ type StringNotInAdvancedFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from AdvancedFilter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType AdvancedFilterOperatorType `json:"operatorType"` +} + +func (s StringNotInAdvancedFilter) AdvancedFilter() BaseAdvancedFilterImpl { + return BaseAdvancedFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotInAdvancedFilter{} @@ -28,9 +37,10 @@ func (s StringNotInAdvancedFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotInAdvancedFilter: %+v", err) } + decoded["operatorType"] = "StringNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinfilter.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinfilter.go index b811d3c8f9b..6b2d870afcc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinfilter.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_stringnotinfilter.go @@ -14,7 +14,16 @@ type StringNotInFilter struct { Values *[]string `json:"values,omitempty"` // Fields inherited from Filter - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + OperatorType FilterOperatorType `json:"operatorType"` +} + +func (s StringNotInFilter) Filter() BaseFilterImpl { + return BaseFilterImpl{ + Key: s.Key, + OperatorType: s.OperatorType, + } } var _ json.Marshaler = StringNotInFilter{} @@ -28,9 +37,10 @@ func (s StringNotInFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StringNotInFilter: %+v", err) } + decoded["operatorType"] = "StringNotIn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestination.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestination.go index a64dd7ca0b4..ddc2526a988 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestination.go @@ -14,6 +14,14 @@ type WebHookEventSubscriptionDestination struct { Properties *WebHookEventSubscriptionDestinationProperties `json:"properties,omitempty"` // Fields inherited from EventSubscriptionDestination + + EndpointType EndpointType `json:"endpointType"` +} + +func (s WebHookEventSubscriptionDestination) EventSubscriptionDestination() BaseEventSubscriptionDestinationImpl { + return BaseEventSubscriptionDestinationImpl{ + EndpointType: s.EndpointType, + } } var _ json.Marshaler = WebHookEventSubscriptionDestination{} @@ -27,9 +35,10 @@ func (s WebHookEventSubscriptionDestination) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebHookEventSubscriptionDestination: %+v", err) } + decoded["endpointType"] = "WebHook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go index e5ec10da4ab..8c2de5785e0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/model_webhookeventsubscriptiondestinationproperties.go @@ -49,7 +49,7 @@ func (s *WebHookEventSubscriptionDestinationProperties) UnmarshalJSON(bytes []by output := make([]DeliveryAttributeMapping, 0) for i, val := range listTemp { - impl, err := unmarshalDeliveryAttributeMappingImplementation(val) + impl, err := UnmarshalDeliveryAttributeMappingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'DeliveryAttributeMappings' for 'WebHookEventSubscriptionDestinationProperties': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/version.go b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/version.go index d6ffac6b5ca..7c7b0eb82a8 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/eventsubscriptions/version.go @@ -1,12 +1,10 @@ package eventsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventsubscriptions/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/README.md b/resource-manager/eventgrid/2023-12-15-preview/namespaces/README.md index 534dfb9ce80..12b2935e15d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/client.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/id_namespace.go index 0c6cbcde21e..a9686b8fadc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_get.go index c12b7a70469..caafd0ac34a 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model Namespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbyresourcegroup.go index 29f53c42ce1..7e565623438 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbysubscription.go index de45a811c55..e335826bd33 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listsharedaccesskeys.go index 8748c6f414b..9a3e27a52fb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c NamespacesClient) ListSharedAccessKeys(ctx context.Context, id Namespace var model NamespaceSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_routingenrichments.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_routingenrichments.go index e9c2ef191f5..e0d1abf3e46 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_routingenrichments.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_routingenrichments.go @@ -37,7 +37,7 @@ func (s *RoutingEnrichments) UnmarshalJSON(bytes []byte) error { output := make([]StaticRoutingEnrichment, 0) for i, val := range listTemp { - impl, err := unmarshalStaticRoutingEnrichmentImplementation(val) + impl, err := UnmarshalStaticRoutingEnrichmentImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Static' for 'RoutingEnrichments': %+v", i, err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticroutingenrichment.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticroutingenrichment.go index a561b88fc59..c21dd4cc4f9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticroutingenrichment.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticroutingenrichment.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StaticRoutingEnrichment interface { + StaticRoutingEnrichment() BaseStaticRoutingEnrichmentImpl } -// RawStaticRoutingEnrichmentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StaticRoutingEnrichment = BaseStaticRoutingEnrichmentImpl{} + +type BaseStaticRoutingEnrichmentImpl struct { + Key *string `json:"key,omitempty"` + ValueType StaticRoutingEnrichmentType `json:"valueType"` +} + +func (s BaseStaticRoutingEnrichmentImpl) StaticRoutingEnrichment() BaseStaticRoutingEnrichmentImpl { + return s +} + +var _ StaticRoutingEnrichment = RawStaticRoutingEnrichmentImpl{} + +// RawStaticRoutingEnrichmentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStaticRoutingEnrichmentImpl struct { - Type string - Values map[string]interface{} + staticRoutingEnrichment BaseStaticRoutingEnrichmentImpl + Type string + Values map[string]interface{} +} + +func (s RawStaticRoutingEnrichmentImpl) StaticRoutingEnrichment() BaseStaticRoutingEnrichmentImpl { + return s.staticRoutingEnrichment } -func unmarshalStaticRoutingEnrichmentImplementation(input []byte) (StaticRoutingEnrichment, error) { +func UnmarshalStaticRoutingEnrichmentImplementation(input []byte) (StaticRoutingEnrichment, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalStaticRoutingEnrichmentImplementation(input []byte) (StaticRouting return out, nil } - out := RawStaticRoutingEnrichmentImpl{ - Type: value, - Values: temp, + var parent BaseStaticRoutingEnrichmentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStaticRoutingEnrichmentImpl: %+v", err) } - return out, nil + + return RawStaticRoutingEnrichmentImpl{ + staticRoutingEnrichment: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticstringroutingenrichment.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticstringroutingenrichment.go index 027f3483693..17356902360 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticstringroutingenrichment.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/model_staticstringroutingenrichment.go @@ -14,7 +14,16 @@ type StaticStringRoutingEnrichment struct { Value *string `json:"value,omitempty"` // Fields inherited from StaticRoutingEnrichment - Key *string `json:"key,omitempty"` + + Key *string `json:"key,omitempty"` + ValueType StaticRoutingEnrichmentType `json:"valueType"` +} + +func (s StaticStringRoutingEnrichment) StaticRoutingEnrichment() BaseStaticRoutingEnrichmentImpl { + return BaseStaticRoutingEnrichmentImpl{ + Key: s.Key, + ValueType: s.ValueType, + } } var _ json.Marshaler = StaticStringRoutingEnrichment{} @@ -28,9 +37,10 @@ func (s StaticStringRoutingEnrichment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StaticStringRoutingEnrichment: %+v", err) } + decoded["valueType"] = "String" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespaces/version.go b/resource-manager/eventgrid/2023-12-15-preview/namespaces/version.go index 7cde66ef00a..9f052dd9247 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespaces/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/README.md b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/README.md index 647e9c02159..47bd67d041f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/namespacetopics` Documentation -The `namespacetopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `namespacetopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/client.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/client.go index 8fba19ade42..0eb8f646160 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/client.go @@ -15,7 +15,7 @@ type NamespaceTopicsClient struct { } func NewNamespaceTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespaceTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacetopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacetopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespaceTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespace.go index 6cc22164425..452cdb98539 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespacetopic.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespacetopic.go index 3365005c092..ec4837fc8d3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespacetopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/id_namespacetopic.go @@ -44,7 +44,7 @@ func ParseNamespaceTopicID(input string) (*NamespaceTopicId, error) { } id := NamespaceTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNamespaceTopicIDInsensitively(input string) (*NamespaceTopicId, error) } id := NamespaceTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_get.go index 79cc4f41d0f..4324bba7213 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_get.go @@ -45,7 +45,6 @@ func (c NamespaceTopicsClient) Get(ctx context.Context, id NamespaceTopicId) (re var model NamespaceTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listbynamespace.go index 5bbf00172e1..6bb10395b1e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listsharedaccesskeys.go index 86d6b0ce8e8..1003e0d1cf2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c NamespaceTopicsClient) ListSharedAccessKeys(ctx context.Context, id Name var model TopicSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/version.go b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/version.go index 8a6c4dd0d62..cb3b4417329 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/namespacetopics/version.go @@ -1,12 +1,10 @@ package namespacetopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacetopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacetopics/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/README.md b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/README.md index 9f6485a12b8..1c23dbab791 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations` Documentation -The `partnerconfigurations` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `partnerconfigurations` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/client.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/client.go index db4c4a6d68c..81cf545e1ec 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/client.go @@ -15,7 +15,7 @@ type PartnerConfigurationsClient struct { } func NewPartnerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnerconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnerconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerConfigurationsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_authorizepartner.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_authorizepartner.go index 8510613024a..9aec03662a6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_authorizepartner.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_authorizepartner.go @@ -51,7 +51,6 @@ func (c PartnerConfigurationsClient) AuthorizePartner(ctx context.Context, id co var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_get.go index e890871327e..0796ab24f3d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_get.go @@ -47,7 +47,6 @@ func (c PartnerConfigurationsClient) Get(ctx context.Context, id commonids.Resou var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_listbysubscription.go index b2664083fe2..caae9105d47 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_unauthorizepartner.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_unauthorizepartner.go index b026a3ff31a..3cd55d4ec16 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_unauthorizepartner.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/method_unauthorizepartner.go @@ -51,7 +51,6 @@ func (c PartnerConfigurationsClient) UnauthorizePartner(ctx context.Context, id var model PartnerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/version.go b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/version.go index d460a22891d..b959acaf954 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerconfigurations/version.go @@ -1,12 +1,10 @@ package partnerconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnerconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnerconfigurations/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/README.md b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/README.md index 9780b0dbb8f..9ae55c4d6a1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations` Documentation -The `partnerdestinations` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `partnerdestinations` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/client.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/client.go index 562f42dc10e..41516a7588d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/client.go @@ -15,7 +15,7 @@ type PartnerDestinationsClient struct { } func NewPartnerDestinationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerDestinationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnerdestinations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnerdestinations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerDestinationsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/id_partnerdestination.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/id_partnerdestination.go index 9a06cd45d8b..0cf28d94404 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/id_partnerdestination.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/id_partnerdestination.go @@ -42,7 +42,7 @@ func ParsePartnerDestinationID(input string) (*PartnerDestinationId, error) { } id := PartnerDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerDestinationIDInsensitively(input string) (*PartnerDestinationId } id := PartnerDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_activate.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_activate.go index e1e1a3a30c5..cf30ebd1604 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_activate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_activate.go @@ -46,7 +46,6 @@ func (c PartnerDestinationsClient) Activate(ctx context.Context, id PartnerDesti var model PartnerDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_get.go index 9e7efeea9d8..90ac689e335 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_get.go @@ -45,7 +45,6 @@ func (c PartnerDestinationsClient) Get(ctx context.Context, id PartnerDestinatio var model PartnerDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbyresourcegroup.go index 75deb5bd6a8..129d71c04d7 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbysubscription.go index 85e682cb87f..b14c082c207 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/version.go b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/version.go index 6df4351d355..441c7a49b81 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerdestinations/version.go @@ -1,12 +1,10 @@ package partnerdestinations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnerdestinations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnerdestinations/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/README.md b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/README.md index 984a7c58dcd..bdada6e5113 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces` Documentation -The `partnernamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `partnernamespaces` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/client.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/client.go index 68a21b05d23..40674d52936 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/client.go @@ -15,7 +15,7 @@ type PartnerNamespacesClient struct { } func NewPartnerNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnernamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnernamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerNamespacesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/id_partnernamespace.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/id_partnernamespace.go index e66057836e1..927aae05141 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/id_partnernamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/id_partnernamespace.go @@ -42,7 +42,7 @@ func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error) { } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, er } id := PartnerNamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_get.go index 56f09544bb3..45402e218ea 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_get.go @@ -45,7 +45,6 @@ func (c PartnerNamespacesClient) Get(ctx context.Context, id PartnerNamespaceId) var model PartnerNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbyresourcegroup.go index 73f19ca4eea..eeeae0918ce 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbysubscription.go index 5cea56ba9bb..9235eeafa60 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listsharedaccesskeys.go index 3680bb6ae51..bd97b786430 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c PartnerNamespacesClient) ListSharedAccessKeys(ctx context.Context, id Pa var model PartnerNamespaceSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_regeneratekey.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_regeneratekey.go index 13f92c98250..c3f2c53ae53 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_regeneratekey.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c PartnerNamespacesClient) RegenerateKey(ctx context.Context, id PartnerNa var model PartnerNamespaceSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/version.go b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/version.go index 668f95e9fb5..9e68b532f27 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnernamespaces/version.go @@ -1,12 +1,10 @@ package partnernamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnernamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnernamespaces/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/README.md b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/README.md index bbe76d3de25..5a217e7648f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations` Documentation -The `partnerregistrations` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `partnerregistrations` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/client.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/client.go index 470bfd1ed46..9316809223e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/client.go @@ -15,7 +15,7 @@ type PartnerRegistrationsClient struct { } func NewPartnerRegistrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerRegistrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnerregistrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnerregistrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerRegistrationsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/id_partnerregistration.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/id_partnerregistration.go index ce773bf8bcc..ac02843a027 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/id_partnerregistration.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/id_partnerregistration.go @@ -42,7 +42,7 @@ func ParsePartnerRegistrationID(input string) (*PartnerRegistrationId, error) { } id := PartnerRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerRegistrationIDInsensitively(input string) (*PartnerRegistration } id := PartnerRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_get.go index a309e2f0ed6..9ce71c0d73f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_get.go @@ -45,7 +45,6 @@ func (c PartnerRegistrationsClient) Get(ctx context.Context, id PartnerRegistrat var model PartnerRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbyresourcegroup.go index 8da1cb23a34..58f932178c2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbysubscription.go index 921b13c6f9a..ce73d0dd168 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/version.go b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/version.go index d39a97732b9..4992a4a0174 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnerregistrations/version.go @@ -1,12 +1,10 @@ package partnerregistrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnerregistrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnerregistrations/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/README.md b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/README.md index 2752490e7f2..1af37b771fb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/partnertopics` Documentation -The `partnertopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `partnertopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/client.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/client.go index d2c0336576d..bcd943f6ed4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/client.go @@ -15,7 +15,7 @@ type PartnerTopicsClient struct { } func NewPartnerTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*PartnerTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "partnertopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "partnertopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PartnerTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/id_partnertopic.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/id_partnertopic.go index ffdf93e176f..72b06ae50dc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/id_partnertopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/id_partnertopic.go @@ -42,7 +42,7 @@ func ParsePartnerTopicID(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePartnerTopicIDInsensitively(input string) (*PartnerTopicId, error) { } id := PartnerTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_activate.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_activate.go index d99c89ffc49..4d9e014d769 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_activate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_activate.go @@ -46,7 +46,6 @@ func (c PartnerTopicsClient) Activate(ctx context.Context, id PartnerTopicId) (r var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_createorupdate.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_createorupdate.go index b3cc284c092..53a4eaf88ac 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_createorupdate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PartnerTopicsClient) CreateOrUpdate(ctx context.Context, id PartnerTopic var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_deactivate.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_deactivate.go index 704ce7b2beb..ab85fadf765 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_deactivate.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_deactivate.go @@ -46,7 +46,6 @@ func (c PartnerTopicsClient) Deactivate(ctx context.Context, id PartnerTopicId) var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_get.go index 166a4bfa628..5094544062c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_get.go @@ -45,7 +45,6 @@ func (c PartnerTopicsClient) Get(ctx context.Context, id PartnerTopicId) (result var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbyresourcegroup.go index 0ffc6566a8c..db8ceac0a17 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbysubscription.go index 1ed231e02ad..2c2e237ecb9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_update.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_update.go index 223499933b6..8ca89640fdc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_update.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/method_update.go @@ -50,7 +50,6 @@ func (c PartnerTopicsClient) Update(ctx context.Context, id PartnerTopicId, inpu var model PartnerTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/version.go b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/version.go index b9e5d0b0303..59707671ec1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/partnertopics/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/partnertopics/version.go @@ -1,12 +1,10 @@ package partnertopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/partnertopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/partnertopics/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/README.md b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/README.md index 3ad5cdad6c2..38ac1721035 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies` Documentation -The `perimeterassociationproxies` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `perimeterassociationproxies` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/client.go b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/client.go index e39ac1f5eb2..7413a29f01c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/client.go @@ -15,7 +15,7 @@ type PerimeterAssociationProxiesClient struct { } func NewPerimeterAssociationProxiesClientWithBaseURI(sdkApi sdkEnv.Api) (*PerimeterAssociationProxiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "perimeterassociationproxies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "perimeterassociationproxies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PerimeterAssociationProxiesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/id_scopednetworksecurityperimeterconfiguration.go b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/id_scopednetworksecurityperimeterconfiguration.go index 55a1c7622bd..7d22c52c227 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/id_scopednetworksecurityperimeterconfiguration.go +++ b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/id_scopednetworksecurityperimeterconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedNetworkSecurityPerimeterConfigurationID(input string) (*ScopedNe } id := ScopedNetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedNetworkSecurityPerimeterConfigurationIDInsensitively(input strin } id := ScopedNetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/method_networksecurityperimeterconfigurationsget.go b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/method_networksecurityperimeterconfigurationsget.go index 6a4a4fc8f60..7c9f1074147 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/method_networksecurityperimeterconfigurationsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/method_networksecurityperimeterconfigurationsget.go @@ -45,7 +45,6 @@ func (c PerimeterAssociationProxiesClient) NetworkSecurityPerimeterConfiguration var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/version.go b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/version.go index c864f886c02..c6e70f1b685 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/perimeterassociationproxies/version.go @@ -1,12 +1,10 @@ package perimeterassociationproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/perimeterassociationproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/perimeterassociationproxies/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/README.md b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/README.md index 414f76bd704..362390c0563 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/permissionbindings` Documentation -The `permissionbindings` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `permissionbindings` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/client.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/client.go index 6c642fa4881..0029db398b5 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/client.go @@ -15,7 +15,7 @@ type PermissionBindingsClient struct { } func NewPermissionBindingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PermissionBindingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "permissionbindings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "permissionbindings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PermissionBindingsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_namespace.go index 565827f1657..cb72dc52c65 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_permissionbinding.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_permissionbinding.go index 84930e9f5f3..4b7b4ad6e6d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_permissionbinding.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/id_permissionbinding.go @@ -44,7 +44,7 @@ func ParsePermissionBindingID(input string) (*PermissionBindingId, error) { } id := PermissionBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePermissionBindingIDInsensitively(input string) (*PermissionBindingId, } id := PermissionBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_get.go index 66d5cca6474..c38ce02e2b9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_get.go @@ -45,7 +45,6 @@ func (c PermissionBindingsClient) Get(ctx context.Context, id PermissionBindingI var model PermissionBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_listbynamespace.go index e5d7fed0406..224484b972b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/version.go b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/version.go index 4dea80f3f57..6b69afe0da3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/permissionbindings/version.go @@ -1,12 +1,10 @@ package permissionbindings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/permissionbindings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/permissionbindings/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/README.md b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/README.md index 8c1dea11856..92c2de95383 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/client.go b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/id_scopedprivateendpointconnection.go b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/id_scopedprivateendpointconnection.go index b55d668d294..1801f480671 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/id_scopedprivateendpointconnection.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/id_scopedprivateendpointconnection.go @@ -40,7 +40,7 @@ func ParseScopedPrivateEndpointConnectionID(input string) (*ScopedPrivateEndpoin } id := ScopedPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPrivateEndpointConnectionIDInsensitively(input string) (*ScopedP } id := ScopedPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_get.go index 09cecb3eae5..45b77d598e5 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id ScopedPriv var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_listbyresource.go b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_listbyresource.go index 4218ee362a8..0d9f6dc402d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_listbyresource.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/version.go b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/version.go index 462164e10b7..bbbf9c81ef6 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/README.md b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/README.md index 3a30c557b39..0cc880b69fc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/client.go b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/id_scopedprivatelinkresource.go b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/id_scopedprivatelinkresource.go index 96ed69d7f63..1ca0fc27e18 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/id_scopedprivatelinkresource.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/id_scopedprivatelinkresource.go @@ -40,7 +40,7 @@ func ParseScopedPrivateLinkResourceID(input string) (*ScopedPrivateLinkResourceI } id := ScopedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPrivateLinkResourceIDInsensitively(input string) (*ScopedPrivate } id := ScopedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_get.go index 3bd66c97190..c0806e78490 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id ScopedPrivateLin var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_listbyresource.go b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_listbyresource.go index 9f9dcd49707..22c7e564645 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_listbyresource.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/method_listbyresource.go @@ -41,6 +41,7 @@ func (o ListByResourceOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/version.go b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/version.go index b6396226d74..738eb80fa09 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/README.md b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/README.md index d399cf2ec9c..444923aa177 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/systemtopics` Documentation -The `systemtopics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `systemtopics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/client.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/client.go index a75eb998451..1f5eedc71cc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/client.go @@ -15,7 +15,7 @@ type SystemTopicsClient struct { } func NewSystemTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*SystemTopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "systemtopics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "systemtopics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SystemTopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/id_systemtopic.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/id_systemtopic.go index bfa75efa500..b2d629865e4 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/id_systemtopic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/id_systemtopic.go @@ -42,7 +42,7 @@ func ParseSystemTopicID(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSystemTopicIDInsensitively(input string) (*SystemTopicId, error) { } id := SystemTopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_get.go index a8da6a2fc6a..f0f012d6dc5 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_get.go @@ -45,7 +45,6 @@ func (c SystemTopicsClient) Get(ctx context.Context, id SystemTopicId) (result G var model SystemTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbyresourcegroup.go index 04b5a7090c9..7cee84affee 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbysubscription.go index 5424d6f67ff..62bf8570ec2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/version.go b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/version.go index d4a157ba6a9..dafa4b583f3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/systemtopics/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/systemtopics/version.go @@ -1,12 +1,10 @@ package systemtopics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/systemtopics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/systemtopics/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/README.md b/resource-manager/eventgrid/2023-12-15-preview/topics/README.md index 73563205e7f..48a92728b18 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `topics` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/client.go b/resource-manager/eventgrid/2023-12-15-preview/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/id_topic.go b/resource-manager/eventgrid/2023-12-15-preview/topics/id_topic.go index 7996a9099d5..145a6128974 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/id_topic.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/id_topic.go @@ -42,7 +42,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_extensiontopicsget.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_extensiontopicsget.go index e56b3e7ed5a..8d869bc6185 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_extensiontopicsget.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_extensiontopicsget.go @@ -47,7 +47,6 @@ func (c TopicsClient) ExtensionTopicsGet(ctx context.Context, id commonids.Scope var model ExtensionTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_get.go index a276dae1132..1ed48937e12 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model Topic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbyresourcegroup.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbyresourcegroup.go index b322ef0d4af..480c5a71121 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbyresourcegroup.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbysubscription.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbysubscription.go index a4f4ebfc334..f8fbb741012 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbysubscription.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listeventtypes.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listeventtypes.go index 9ad02baea36..01a233da481 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listeventtypes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listeventtypes.go @@ -47,7 +47,6 @@ func (c TopicsClient) ListEventTypes(ctx context.Context, id commonids.ScopeId) var model EventTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listsharedaccesskeys.go b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listsharedaccesskeys.go index 926e9ba1256..6e5480db9ca 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/method_listsharedaccesskeys.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/method_listsharedaccesskeys.go @@ -46,7 +46,6 @@ func (c TopicsClient) ListSharedAccessKeys(ctx context.Context, id TopicId) (res var model TopicSharedAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/model_inputschemamapping.go b/resource-manager/eventgrid/2023-12-15-preview/topics/model_inputschemamapping.go index ea5cba6d2c9..5d276f029bc 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/model_inputschemamapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/model_inputschemamapping.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputSchemaMapping interface { + InputSchemaMapping() BaseInputSchemaMappingImpl } -// RawInputSchemaMappingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputSchemaMapping = BaseInputSchemaMappingImpl{} + +type BaseInputSchemaMappingImpl struct { + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s BaseInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s +} + +var _ InputSchemaMapping = RawInputSchemaMappingImpl{} + +// RawInputSchemaMappingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputSchemaMappingImpl struct { - Type string - Values map[string]interface{} + inputSchemaMapping BaseInputSchemaMappingImpl + Type string + Values map[string]interface{} +} + +func (s RawInputSchemaMappingImpl) InputSchemaMapping() BaseInputSchemaMappingImpl { + return s.inputSchemaMapping } -func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { +func UnmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalInputSchemaMappingImplementation(input []byte) (InputSchemaMapping return out, nil } - out := RawInputSchemaMappingImpl{ - Type: value, - Values: temp, + var parent BaseInputSchemaMappingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputSchemaMappingImpl: %+v", err) } - return out, nil + + return RawInputSchemaMappingImpl{ + inputSchemaMapping: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/model_jsoninputschemamapping.go b/resource-manager/eventgrid/2023-12-15-preview/topics/model_jsoninputschemamapping.go index 84c4a558344..70db15710f9 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/model_jsoninputschemamapping.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/model_jsoninputschemamapping.go @@ -14,6 +14,14 @@ type JsonInputSchemaMapping struct { Properties *JsonInputSchemaMappingProperties `json:"properties,omitempty"` // Fields inherited from InputSchemaMapping + + InputSchemaMappingType InputSchemaMappingType `json:"inputSchemaMappingType"` +} + +func (s JsonInputSchemaMapping) InputSchemaMapping() BaseInputSchemaMappingImpl { + return BaseInputSchemaMappingImpl{ + InputSchemaMappingType: s.InputSchemaMappingType, + } } var _ json.Marshaler = JsonInputSchemaMapping{} @@ -27,9 +35,10 @@ func (s JsonInputSchemaMapping) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonInputSchemaMapping: %+v", err) } + decoded["inputSchemaMappingType"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/model_topicproperties.go b/resource-manager/eventgrid/2023-12-15-preview/topics/model_topicproperties.go index 7a10bb88bc5..d3b0df2528b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/model_topicproperties.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/model_topicproperties.go @@ -50,7 +50,7 @@ func (s *TopicProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["inputSchemaMapping"]; ok { - impl, err := unmarshalInputSchemaMappingImplementation(v) + impl, err := UnmarshalInputSchemaMappingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InputSchemaMapping' for 'TopicProperties': %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topics/version.go b/resource-manager/eventgrid/2023-12-15-preview/topics/version.go index 9b7cc1878fc..ddb46cffce2 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topics/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/README.md b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/README.md index 1edbf769435..99b839c8aa1 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/topicspaces` Documentation -The `topicspaces` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `topicspaces` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/client.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/client.go index cd50a8e2ec9..1b03bb7e4dd 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/client.go @@ -15,7 +15,7 @@ type TopicSpacesClient struct { } func NewTopicSpacesClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicSpacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topicspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topicspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicSpacesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_namespace.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_namespace.go index 95548164bb9..186bc082238 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_namespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_topicspace.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_topicspace.go index e9e2e0e89bb..26bd203f68a 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_topicspace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/id_topicspace.go @@ -44,7 +44,7 @@ func ParseTopicSpaceID(input string) (*TopicSpaceId, error) { } id := TopicSpaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicSpaceIDInsensitively(input string) (*TopicSpaceId, error) { } id := TopicSpaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_get.go index 738ad40b640..e7abb61db0d 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_get.go @@ -45,7 +45,6 @@ func (c TopicSpacesClient) Get(ctx context.Context, id TopicSpaceId) (result Get var model TopicSpace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_listbynamespace.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_listbynamespace.go index 90d5e7cdd0e..4a187f6d423 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_listbynamespace.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/version.go b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/version.go index ee3d43fb794..6b86052cae3 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topicspaces/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topicspaces/version.go @@ -1,12 +1,10 @@ package topicspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topicspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topicspaces/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/README.md b/resource-manager/eventgrid/2023-12-15-preview/topictypes/README.md index 68a95761721..d8f7827444c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/topictypes` Documentation -The `topictypes` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `topictypes` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/client.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/client.go index 9e6399829c2..9eec8fac04e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/client.go @@ -15,7 +15,7 @@ type TopicTypesClient struct { } func NewTopicTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topictypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topictypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicTypesClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/id_topictype.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/id_topictype.go index f860b13cb3b..29fc8905e3c 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/id_topictype.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/id_topictype.go @@ -38,7 +38,7 @@ func ParseTopicTypeID(input string) (*TopicTypeId, error) { } id := TopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseTopicTypeIDInsensitively(input string) (*TopicTypeId, error) { } id := TopicTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_get.go index c1c6fbcdd6b..42a4be1a613 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_get.go @@ -45,7 +45,6 @@ func (c TopicTypesClient) Get(ctx context.Context, id TopicTypeId) (result GetOp var model TopicTypeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_list.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_list.go index 99aaa9f6830..66897dde08b 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_list.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_list.go @@ -45,7 +45,6 @@ func (c TopicTypesClient) List(ctx context.Context) (result ListOperationRespons var model TopicTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_listeventtypes.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_listeventtypes.go index b5bfb44e665..ef68b52949e 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_listeventtypes.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/method_listeventtypes.go @@ -46,7 +46,6 @@ func (c TopicTypesClient) ListEventTypes(ctx context.Context, id TopicTypeId) (r var model EventTypesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/topictypes/version.go b/resource-manager/eventgrid/2023-12-15-preview/topictypes/version.go index b2652aad9bd..a014e231389 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/topictypes/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/topictypes/version.go @@ -1,12 +1,10 @@ package topictypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topictypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topictypes/2023-12-15-preview" } diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/README.md b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/README.md index 3e1b24fceb4..6bd37cfea48 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/README.md +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners` Documentation -The `verifiedpartners` SDK allows for interaction with the Azure Resource Manager Service `eventgrid` (API Version `2023-12-15-preview`). +The `verifiedpartners` SDK allows for interaction with Azure Resource Manager `eventgrid` (API Version `2023-12-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/client.go b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/client.go index 576b4f91baa..83e155cec73 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/client.go +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/client.go @@ -15,7 +15,7 @@ type VerifiedPartnersClient struct { } func NewVerifiedPartnersClientWithBaseURI(sdkApi sdkEnv.Api) (*VerifiedPartnersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "verifiedpartners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "verifiedpartners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VerifiedPartnersClient: %+v", err) } diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/id_verifiedpartner.go b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/id_verifiedpartner.go index d9f85e122f9..8d1c65489fb 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/id_verifiedpartner.go +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/id_verifiedpartner.go @@ -38,7 +38,7 @@ func ParseVerifiedPartnerID(input string) (*VerifiedPartnerId, error) { } id := VerifiedPartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseVerifiedPartnerIDInsensitively(input string) (*VerifiedPartnerId, erro } id := VerifiedPartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_get.go b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_get.go index 67eed1527ad..8f4806ee2ea 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_get.go +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_get.go @@ -45,7 +45,6 @@ func (c VerifiedPartnersClient) Get(ctx context.Context, id VerifiedPartnerId) ( var model VerifiedPartner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_list.go b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_list.go index 9229769b5dc..589d1c19cd0 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_list.go +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/version.go b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/version.go index 352af8caba0..843b42ccd93 100644 --- a/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/version.go +++ b/resource-manager/eventgrid/2023-12-15-preview/verifiedpartners/version.go @@ -1,12 +1,10 @@ package verifiedpartners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/verifiedpartners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/verifiedpartners/2023-12-15-preview" } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/README.md index 4004c7e4b62..b04cfd3e764 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs` Documentation -The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/client.go index eaea9f694c3..5802c6385c0 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesDisasterRecoveryConfigsClient struct { } func NewAuthorizationRulesDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go index 23f6cdc6cea..040234bdc98 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 6d890247c0a..df7068eb0a2 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go index a6c4d3108f9..d7f40fff042 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go index d5f4c359724..0b836749bf3 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/version.go index aac87b17e19..bf1391adbf2 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesdisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package authorizationrulesdisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/README.md b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/README.md index 12828dc9f5b..6af2d930305 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/README.md +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs` Documentation -The `authorizationruleseventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `authorizationruleseventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/client.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/client.go index e4948fc5469..161bee08089 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/client.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesEventHubsClient struct { } func NewAuthorizationRulesEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesEventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesEventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go index f1dc368be03..95845fedee0 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go index 6db74e71a5e..5d44e82e7dc 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go index 62dc4f20f07..b67ea413d33 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsCreateOrUpdateAuthorizationR var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys.go index e8d8356dcbe..3736fb60af8 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsListKeys(ctx context.Context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go index 5405f29972f..ae319d8af5d 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsRegenerateKeys(ctx context.C var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/version.go b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/version.go index 1cc434f71c1..497d24a1a3a 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/version.go +++ b/resource-manager/eventhub/2021-11-01/authorizationruleseventhubs/version.go @@ -1,12 +1,10 @@ package authorizationruleseventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationruleseventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationruleseventhubs/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/README.md b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/README.md index b3e9317162f..3a9c4505f7b 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/README.md +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces` Documentation -The `authorizationrulesnamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `authorizationrulesnamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/client.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/client.go index 3fd1fec54e0..f0609cabf8d 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/client.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesNamespacesClient struct { } func NewAuthorizationRulesNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go index 8dcf155f45b..13034521234 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go index b72d8ea4f83..4c8276950a9 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go index 9f1a975a1be..3ef30ef03d4 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesCreateOrUpdateAuthorizatio var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go index 8b4cbd363c9..2a002461d3f 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesGetAuthorizationRule(ctx c var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys.go index f39b8d0b401..2f8ded0314b 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesListKeys(ctx context.Conte var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go index c48e9382b58..d8b5e25c692 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesRegenerateKeys(ctx context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/version.go b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/version.go index 5e1f0bd26e3..3ecfd8d2736 100644 --- a/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/version.go +++ b/resource-manager/eventhub/2021-11-01/authorizationrulesnamespaces/version.go @@ -1,12 +1,10 @@ package authorizationrulesnamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesnamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesnamespaces/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/README.md index 68e31c8b719..f5982685a25 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs` Documentation -The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/client.go index af4ddbb61a5..69999edea53 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityDisasterRecoveryConfigsClient struct { } func NewCheckNameAvailabilityDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go index bc1291f8c9f..50e941ef45f 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go index 5473c47cadc..9f6acd206ad 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityDisasterRecoveryConfigsClient) DisasterRecoveryConf var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/version.go index 091375ae905..5a6a1cdc257 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitydisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package checknameavailabilitydisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/README.md b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/README.md index e497e50bdb3..77ef2ffe1ab 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/README.md +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces` Documentation -The `checknameavailabilitynamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `checknameavailabilitynamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/client.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/client.go index b8cbe0015c7..85d09cfd4b6 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/client.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityNamespacesClient struct { } func NewCheckNameAvailabilityNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go index 9e6975c1ce6..2471d4eaf6d 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityNamespacesClient) NamespacesCheckNameAvailability(c var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/version.go b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/version.go index 3c189ae3e63..0ee81b5877b 100644 --- a/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/version.go +++ b/resource-manager/eventhub/2021-11-01/checknameavailabilitynamespaces/version.go @@ -1,12 +1,10 @@ package checknameavailabilitynamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitynamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitynamespaces/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/README.md b/resource-manager/eventhub/2021-11-01/consumergroups/README.md index d7e5b405dd3..bac8c29a171 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/README.md +++ b/resource-manager/eventhub/2021-11-01/consumergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/consumergroups` Documentation -The `consumergroups` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `consumergroups` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/client.go b/resource-manager/eventhub/2021-11-01/consumergroups/client.go index 281884beac7..7444b7e4dba 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/client.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/client.go @@ -15,7 +15,7 @@ type ConsumerGroupsClient struct { } func NewConsumerGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "consumergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "consumergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConsumerGroupsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go b/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go index 329b7ddecad..0f549e63ab8 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/id_consumergroup.go @@ -46,7 +46,7 @@ func ParseConsumerGroupID(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConsumerGroupIDInsensitively(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go b/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go index e46fab2839a..471215bacb6 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate.go b/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate.go index cbc5c795211..c7932a1636c 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, id ConsumerGro var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/method_get.go b/resource-manager/eventhub/2021-11-01/consumergroups/method_get.go index d6927432948..3ff1cc35f5f 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/method_get.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/method_get.go @@ -45,7 +45,6 @@ func (c ConsumerGroupsClient) Get(ctx context.Context, id ConsumerGroupId) (resu var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub.go b/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub.go index d3112958e5e..f57687df614 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/method_listbyeventhub.go @@ -40,6 +40,7 @@ func (o ListByEventHubOperationOptions) ToHeaders() *client.Headers { func (o ListByEventHubOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2021-11-01/consumergroups/version.go b/resource-manager/eventhub/2021-11-01/consumergroups/version.go index 5451c285311..2426c0b037f 100644 --- a/resource-manager/eventhub/2021-11-01/consumergroups/version.go +++ b/resource-manager/eventhub/2021-11-01/consumergroups/version.go @@ -1,12 +1,10 @@ package consumergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/consumergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/consumergroups/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/README.md b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/README.md index a3e4321690d..417a4ff6d7f 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/client.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index 97af75a4949..466b1d53920 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go index c6072db6e65..849ec47efa5 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/version.go b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/version.go index fc3d33fb5be..5c56282b391 100644 --- a/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2021-11-01/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/README.md b/resource-manager/eventhub/2021-11-01/eventhubs/README.md index 1dbaa310817..727b91e4488 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/README.md +++ b/resource-manager/eventhub/2021-11-01/eventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubs` Documentation -The `eventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `eventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/client.go b/resource-manager/eventhub/2021-11-01/eventhubs/client.go index e26a15560d5..abaf098b483 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/client.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/client.go @@ -15,7 +15,7 @@ type EventHubsClient struct { } func NewEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go b/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go index b890ac51acc..e7e8b6ecf56 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go index f3c87103c72..01d386cfca6 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go b/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go index 85ac87987f6..4346aa62a86 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate.go b/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate.go index 419d0817f0d..cc7de19af4f 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EventHubsClient) CreateOrUpdate(ctx context.Context, id EventhubId, inpu var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/method_get.go b/resource-manager/eventhub/2021-11-01/eventhubs/method_get.go index b0ec86f62c6..9f7b72ff857 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/method_get.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/method_get.go @@ -45,7 +45,6 @@ func (c EventHubsClient) Get(ctx context.Context, id EventhubId) (result GetOper var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule.go b/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule.go index 8b48d6f724c..b2aaca5e1dd 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c EventHubsClient) GetAuthorizationRule(ctx context.Context, id EventhubAu var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace.go b/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace.go index e146faa0cea..47ddb8f4899 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2021-11-01/eventhubs/version.go b/resource-manager/eventhub/2021-11-01/eventhubs/version.go index 724db00da13..50919eb6a75 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubs/version.go +++ b/resource-manager/eventhub/2021-11-01/eventhubs/version.go @@ -1,12 +1,10 @@ package eventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubs/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclusters/README.md b/resource-manager/eventhub/2021-11-01/eventhubsclusters/README.md index 10e7db23645..1be4bc0e90b 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclusters/README.md +++ b/resource-manager/eventhub/2021-11-01/eventhubsclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclusters` Documentation -The `eventhubsclusters` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `eventhubsclusters` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclusters/client.go b/resource-manager/eventhub/2021-11-01/eventhubsclusters/client.go index 0f1f025c69b..af8d5bc629c 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclusters/client.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclusters/client.go @@ -15,7 +15,7 @@ type EventHubsClustersClient struct { } func NewEventHubsClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go b/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go index 9136f11408b..73e536a462f 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget.go b/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget.go index 44eea50cf2f..e50c86757cf 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclusters/method_clustersget.go @@ -45,7 +45,6 @@ func (c EventHubsClustersClient) ClustersGet(ctx context.Context, id ClusterId) var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclusters/version.go b/resource-manager/eventhub/2021-11-01/eventhubsclusters/version.go index 568cb6bb581..d34fa24633c 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclusters/version.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclusters/version.go @@ -1,12 +1,10 @@ package eventhubsclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclusters/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/README.md b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/README.md index 49b8e20d769..bcc38779609 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/README.md +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions` Documentation -The `eventhubsclustersavailableclusterregions` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `eventhubsclustersavailableclusterregions` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/client.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/client.go index bb786301b48..049ffc2f4df 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/client.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/client.go @@ -15,7 +15,7 @@ type EventHubsClustersAvailableClusterRegionsClient struct { } func NewEventHubsClustersAvailableClusterRegionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersAvailableClusterRegionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersAvailableClusterRegionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go index 71fd07675a1..7f7bbd9b7e0 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go @@ -47,7 +47,6 @@ func (c EventHubsClustersAvailableClusterRegionsClient) ClustersListAvailableClu var model AvailableClustersList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/version.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/version.go index b9a7488b9a8..6529f82fb65 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/version.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersavailableclusterregions/version.go @@ -1,12 +1,10 @@ package eventhubsclustersavailableclusterregions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/README.md b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/README.md index 0a79d67b294..2c29d376abd 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/README.md +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration` Documentation -The `eventhubsclustersconfiguration` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `eventhubsclustersconfiguration` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/client.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/client.go index 0a4b78f42f7..f5f87a61dca 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/client.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/client.go @@ -15,7 +15,7 @@ type EventHubsClustersConfigurationClient struct { } func NewEventHubsClustersConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersConfigurationClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/id_cluster.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/id_cluster.go index 847e1ab02ae..e6c77d43df7 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/id_cluster.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationget.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationget.go index 029b5ceb231..53da32e4ed8 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationget.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationget.go @@ -46,7 +46,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationGet(ctx context.Conte var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationpatch.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationpatch.go index a7563197f19..f650505cfaf 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationpatch.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/method_configurationpatch.go @@ -52,7 +52,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationPatch(ctx context.Con var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/version.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/version.go index 0064e9525bc..56775ec0fcb 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/version.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersconfiguration/version.go @@ -1,12 +1,10 @@ package eventhubsclustersconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersconfiguration/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/README.md b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/README.md index df2ed42c4ad..db6451e3581 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/README.md +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace` Documentation -The `eventhubsclustersnamespace` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `eventhubsclustersnamespace` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/client.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/client.go index ab2e60f6902..763fff3d3c9 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/client.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/client.go @@ -15,7 +15,7 @@ type EventHubsClustersNamespaceClient struct { } func NewEventHubsClustersNamespaceClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersNamespaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersNamespaceClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/id_cluster.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/id_cluster.go index d8a0964e23b..cd8d71d7278 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/id_cluster.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go index ded818427e2..79885bcb934 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go @@ -46,7 +46,6 @@ func (c EventHubsClustersNamespaceClient) ClustersListNamespaces(ctx context.Con var model EHNamespaceIdListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/version.go b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/version.go index 0c60751daba..a49858758ad 100644 --- a/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/version.go +++ b/resource-manager/eventhub/2021-11-01/eventhubsclustersnamespace/version.go @@ -1,12 +1,10 @@ package eventhubsclustersnamespace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersnamespace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersnamespace/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/namespaces/README.md b/resource-manager/eventhub/2021-11-01/namespaces/README.md index a95334397d0..606813787c2 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/README.md +++ b/resource-manager/eventhub/2021-11-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/namespaces/client.go b/resource-manager/eventhub/2021-11-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/client.go +++ b/resource-manager/eventhub/2021-11-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go b/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go index cf0f434b766..2310eb61f09 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/namespaces/method_get.go b/resource-manager/eventhub/2021-11-01/namespaces/method_get.go index e072408e1d5..9e035952ce2 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/method_get.go +++ b/resource-manager/eventhub/2021-11-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/namespaces/method_update.go b/resource-manager/eventhub/2021-11-01/namespaces/method_update.go index 18f0883d8c9..50f2245b716 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/method_update.go +++ b/resource-manager/eventhub/2021-11-01/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input EHNa var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/namespaces/version.go b/resource-manager/eventhub/2021-11-01/namespaces/version.go index e7fef9f37bd..6851872c2b7 100644 --- a/resource-manager/eventhub/2021-11-01/namespaces/version.go +++ b/resource-manager/eventhub/2021-11-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/README.md b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/README.md index d68993e0c9f..7d5a8dbf84f 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/README.md +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/client.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/client.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_namespace.go index c3499b5acac..5252141f706 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go index c194b3f59cf..cadec92d52e 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index b1d36a16331..b5500f41aa6 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/version.go b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/version.go index 334ca51e706..b5579ecd7a9 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/version.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/README.md b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/README.md index 471b7b0b45a..aad89132570 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/README.md +++ b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/client.go b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/client.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/id_namespace.go b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/id_namespace.go index c764c3238f3..8c3c7f859fe 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/version.go b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/version.go index 6370c521bfa..71b933e4665 100644 --- a/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/version.go +++ b/resource-manager/eventhub/2021-11-01/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/README.md b/resource-manager/eventhub/2021-11-01/networkrulesets/README.md index d99f7603309..a0e8a71cd03 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/README.md +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/networkrulesets` Documentation -The `networkrulesets` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `networkrulesets` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/client.go b/resource-manager/eventhub/2021-11-01/networkrulesets/client.go index c1cba65adc4..71516b9dd8e 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/client.go +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/client.go @@ -15,7 +15,7 @@ type NetworkRuleSetsClient struct { } func NewNetworkRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkRuleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkrulesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkrulesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkRuleSetsClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go b/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go index 6d9e1484a0a..032ad8951b8 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go b/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go index e7bd64cf7eb..1cab3444aad 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NetworkRuleSetsClient) NamespacesCreateOrUpdateNetworkRuleSet(ctx contex var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset.go b/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset.go index fd290370baa..ce9ae93d3ce 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset.go +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/method_namespacesgetnetworkruleset.go @@ -46,7 +46,6 @@ func (c NetworkRuleSetsClient) NamespacesGetNetworkRuleSet(ctx context.Context, var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/networkrulesets/version.go b/resource-manager/eventhub/2021-11-01/networkrulesets/version.go index 69601b6725c..84f2bcff2b1 100644 --- a/resource-manager/eventhub/2021-11-01/networkrulesets/version.go +++ b/resource-manager/eventhub/2021-11-01/networkrulesets/version.go @@ -1,12 +1,10 @@ package networkrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkrulesets/2021-11-01" } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/README.md b/resource-manager/eventhub/2021-11-01/schemaregistry/README.md index 86a8c4bfcaa..d72d3b4d388 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/README.md +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2021-11-01/schemaregistry` Documentation -The `schemaregistry` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2021-11-01`). +The `schemaregistry` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/client.go b/resource-manager/eventhub/2021-11-01/schemaregistry/client.go index 438259d21c6..31bb7a8df1a 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/client.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/client.go @@ -15,7 +15,7 @@ type SchemaRegistryClient struct { } func NewSchemaRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schemaregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schemaregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaRegistryClient: %+v", err) } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go b/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go index 5a7bd5e0a7f..54f8a2409bf 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go b/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go index 7b1a62913bc..bce8d5a266b 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/id_schemagroup.go @@ -44,7 +44,7 @@ func ParseSchemaGroupID(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaGroupIDInsensitively(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/method_createorupdate.go b/resource-manager/eventhub/2021-11-01/schemaregistry/method_createorupdate.go index 0228945098c..3d3617326f7 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/method_createorupdate.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SchemaRegistryClient) CreateOrUpdate(ctx context.Context, id SchemaGroup var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/method_get.go b/resource-manager/eventhub/2021-11-01/schemaregistry/method_get.go index e5a451155cd..30dbfa4ba5c 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/method_get.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/method_get.go @@ -45,7 +45,6 @@ func (c SchemaRegistryClient) Get(ctx context.Context, id SchemaGroupId) (result var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/method_listbynamespace.go b/resource-manager/eventhub/2021-11-01/schemaregistry/method_listbynamespace.go index de10e8b42f6..1310cfbcf3b 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/method_listbynamespace.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2021-11-01/schemaregistry/version.go b/resource-manager/eventhub/2021-11-01/schemaregistry/version.go index a2676928392..eace0e5b7e0 100644 --- a/resource-manager/eventhub/2021-11-01/schemaregistry/version.go +++ b/resource-manager/eventhub/2021-11-01/schemaregistry/version.go @@ -1,12 +1,10 @@ package schemaregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schemaregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schemaregistry/2021-11-01" } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/README.md b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/README.md index 6104d4d8941..51b9679495a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/applicationgroup` Documentation -The `applicationgroup` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `applicationgroup` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/client.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/client.go index b07bf02a25f..286f253207b 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/client.go @@ -15,7 +15,7 @@ type ApplicationGroupClient struct { } func NewApplicationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGroupClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_applicationgroup.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_applicationgroup.go index 735e0da54cc..561c106b044 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_applicationgroup.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_applicationgroup.go @@ -44,7 +44,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_namespace.go index 8d48a57c2c3..453635ee6a4 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_createorupdateapplicationgroup.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_createorupdateapplicationgroup.go index a0642907c77..bcfdf651d7c 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_createorupdateapplicationgroup.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_createorupdateapplicationgroup.go @@ -49,7 +49,6 @@ func (c ApplicationGroupClient) CreateOrUpdateApplicationGroup(ctx context.Conte var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_get.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_get.go index 8af1aeae85a..5f689277e19 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGroupClient) Get(ctx context.Context, id ApplicationGroupId) var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgrouppolicy.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgrouppolicy.go index d998a6f58b4..7c6d09848f1 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgrouppolicy.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgrouppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplicationGroupPolicy interface { + ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl } -// RawApplicationGroupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplicationGroupPolicy = BaseApplicationGroupPolicyImpl{} + +type BaseApplicationGroupPolicyImpl struct { + Name string `json:"name"` + Type ApplicationGroupPolicyType `json:"type"` +} + +func (s BaseApplicationGroupPolicyImpl) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return s +} + +var _ ApplicationGroupPolicy = RawApplicationGroupPolicyImpl{} + +// RawApplicationGroupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplicationGroupPolicyImpl struct { - Type string - Values map[string]interface{} + applicationGroupPolicy BaseApplicationGroupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawApplicationGroupPolicyImpl) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return s.applicationGroupPolicy } -func unmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGroupPolicy, error) { +func UnmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGroupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGro return out, nil } - out := RawApplicationGroupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseApplicationGroupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplicationGroupPolicyImpl: %+v", err) } - return out, nil + + return RawApplicationGroupPolicyImpl{ + applicationGroupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgroupproperties.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgroupproperties.go index bcf93c1299c..8728de0bf6e 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgroupproperties.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_applicationgroupproperties.go @@ -39,7 +39,7 @@ func (s *ApplicationGroupProperties) UnmarshalJSON(bytes []byte) error { output := make([]ApplicationGroupPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalApplicationGroupPolicyImplementation(val) + impl, err := UnmarshalApplicationGroupPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Policies' for 'ApplicationGroupProperties': %+v", i, err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_throttlingpolicy.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_throttlingpolicy.go index 42af2c46ea0..3e42bb47e99 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_throttlingpolicy.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/model_throttlingpolicy.go @@ -15,7 +15,16 @@ type ThrottlingPolicy struct { RateLimitThreshold int64 `json:"rateLimitThreshold"` // Fields inherited from ApplicationGroupPolicy - Name string `json:"name"` + + Name string `json:"name"` + Type ApplicationGroupPolicyType `json:"type"` +} + +func (s ThrottlingPolicy) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return BaseApplicationGroupPolicyImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ThrottlingPolicy{} @@ -29,9 +38,10 @@ func (s ThrottlingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThrottlingPolicy: %+v", err) } + decoded["type"] = "ThrottlingPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/version.go b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/version.go index ba074272bc1..52c322f02c8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/applicationgroup/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/applicationgroup/version.go @@ -1,12 +1,10 @@ package applicationgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgroup/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/README.md index 52a92572a17..087e926d2fc 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs` Documentation -The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/client.go index eaea9f694c3..5802c6385c0 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesDisasterRecoveryConfigsClient struct { } func NewAuthorizationRulesDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go index 23f6cdc6cea..040234bdc98 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 6d890247c0a..df7068eb0a2 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go index a6c4d3108f9..d7f40fff042 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go index d5f4c359724..0b836749bf3 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/version.go index b4277dd0e1d..1cea4d5d1b5 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesdisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package authorizationrulesdisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/README.md b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/README.md index 3c70b9cd25c..94f93b04a9e 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs` Documentation -The `authorizationruleseventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `authorizationruleseventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/client.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/client.go index e4948fc5469..161bee08089 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesEventHubsClient struct { } func NewAuthorizationRulesEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesEventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesEventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhub.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhub.go index f1dc368be03..95845fedee0 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhubauthorizationrule.go index 6db74e71a5e..5d44e82e7dc 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go index 62dc4f20f07..b67ea413d33 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsCreateOrUpdateAuthorizationR var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubslistkeys.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubslistkeys.go index e8d8356dcbe..3736fb60af8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubslistkeys.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsListKeys(ctx context.Context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubsregeneratekeys.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubsregeneratekeys.go index 5405f29972f..ae319d8af5d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubsregeneratekeys.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/method_eventhubsregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsRegenerateKeys(ctx context.C var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/version.go b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/version.go index b67056a4686..8b5efaf6656 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationruleseventhubs/version.go @@ -1,12 +1,10 @@ package authorizationruleseventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationruleseventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationruleseventhubs/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/README.md b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/README.md index eab4b84bb7e..fd90e6992c2 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces` Documentation -The `authorizationrulesnamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `authorizationrulesnamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/client.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/client.go index 3fd1fec54e0..f0609cabf8d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesNamespacesClient struct { } func NewAuthorizationRulesNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_authorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_authorizationrule.go index 8dcf155f45b..13034521234 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_authorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_namespace.go index b72d8ea4f83..4c8276950a9 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go index 9f1a975a1be..3ef30ef03d4 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesCreateOrUpdateAuthorizatio var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go index 8b4cbd363c9..2a002461d3f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesGetAuthorizationRule(ctx c var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespaceslistkeys.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespaceslistkeys.go index f39b8d0b401..2f8ded0314b 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespaceslistkeys.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesListKeys(ctx context.Conte var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesregeneratekeys.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesregeneratekeys.go index c48e9382b58..d8b5e25c692 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesregeneratekeys.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesRegenerateKeys(ctx context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/version.go b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/version.go index d7ab4a634b6..4c0cd928466 100644 --- a/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/authorizationrulesnamespaces/version.go @@ -1,12 +1,10 @@ package authorizationrulesnamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesnamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesnamespaces/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/README.md index 221b8a12567..9da828215f9 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs` Documentation -The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/client.go index af4ddbb61a5..69999edea53 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityDisasterRecoveryConfigsClient struct { } func NewCheckNameAvailabilityDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go index bc1291f8c9f..50e941ef45f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go index 5473c47cadc..9f6acd206ad 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityDisasterRecoveryConfigsClient) DisasterRecoveryConf var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/version.go index c4beca53884..3ced8c09a59 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitydisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package checknameavailabilitydisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/README.md b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/README.md index 065db5ef116..7a8a3fcf944 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces` Documentation -The `checknameavailabilitynamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `checknameavailabilitynamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/client.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/client.go index b8cbe0015c7..85d09cfd4b6 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityNamespacesClient struct { } func NewCheckNameAvailabilityNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go index 9e6975c1ce6..2471d4eaf6d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityNamespacesClient) NamespacesCheckNameAvailability(c var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/version.go b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/version.go index 98cc17019fc..57e91455b23 100644 --- a/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/checknameavailabilitynamespaces/version.go @@ -1,12 +1,10 @@ package checknameavailabilitynamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitynamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitynamespaces/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/README.md b/resource-manager/eventhub/2022-01-01-preview/consumergroups/README.md index 3b74a9ec6f7..5140fc69081 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/consumergroups` Documentation -The `consumergroups` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `consumergroups` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/client.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/client.go index 281884beac7..7444b7e4dba 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/client.go @@ -15,7 +15,7 @@ type ConsumerGroupsClient struct { } func NewConsumerGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "consumergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "consumergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConsumerGroupsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_consumergroup.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_consumergroup.go index 329b7ddecad..0f549e63ab8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_consumergroup.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_consumergroup.go @@ -46,7 +46,7 @@ func ParseConsumerGroupID(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConsumerGroupIDInsensitively(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_eventhub.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_eventhub.go index e46fab2839a..471215bacb6 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_eventhub.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_createorupdate.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_createorupdate.go index cbc5c795211..c7932a1636c 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_createorupdate.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, id ConsumerGro var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_get.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_get.go index d6927432948..3ff1cc35f5f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_get.go @@ -45,7 +45,6 @@ func (c ConsumerGroupsClient) Get(ctx context.Context, id ConsumerGroupId) (resu var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_listbyeventhub.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_listbyeventhub.go index d3112958e5e..f57687df614 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_listbyeventhub.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/method_listbyeventhub.go @@ -40,6 +40,7 @@ func (o ListByEventHubOperationOptions) ToHeaders() *client.Headers { func (o ListByEventHubOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2022-01-01-preview/consumergroups/version.go b/resource-manager/eventhub/2022-01-01-preview/consumergroups/version.go index bdffc411f06..c6b73b6148a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/consumergroups/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/consumergroups/version.go @@ -1,12 +1,10 @@ package consumergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/consumergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/consumergroups/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/README.md b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/README.md index 2ac69101a26..b0f15bbaee1 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/client.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index 97af75a4949..466b1d53920 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go index c6072db6e65..849ec47efa5 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_get.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/version.go b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/version.go index c5b9ab66d5a..aa68c9d847f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/README.md b/resource-manager/eventhub/2022-01-01-preview/eventhubs/README.md index a1e8c50bf0d..813af58035d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubs` Documentation -The `eventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `eventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/client.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/client.go index e26a15560d5..abaf098b483 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/client.go @@ -15,7 +15,7 @@ type EventHubsClient struct { } func NewEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhub.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhub.go index b890ac51acc..e7e8b6ecf56 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhubauthorizationrule.go index f3c87103c72..01d386cfca6 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_namespace.go index 85ac87987f6..4346aa62a86 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_createorupdate.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_createorupdate.go index 419d0817f0d..cc7de19af4f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_createorupdate.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EventHubsClient) CreateOrUpdate(ctx context.Context, id EventhubId, inpu var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_get.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_get.go index b0ec86f62c6..9f7b72ff857 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_get.go @@ -45,7 +45,6 @@ func (c EventHubsClient) Get(ctx context.Context, id EventhubId) (result GetOper var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_getauthorizationrule.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_getauthorizationrule.go index 8b48d6f724c..b2aaca5e1dd 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_getauthorizationrule.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c EventHubsClient) GetAuthorizationRule(ctx context.Context, id EventhubAu var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_listbynamespace.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_listbynamespace.go index e146faa0cea..47ddb8f4899 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_listbynamespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubs/version.go b/resource-manager/eventhub/2022-01-01-preview/eventhubs/version.go index 771f65a69f5..debbf7e89be 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubs/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubs/version.go @@ -1,12 +1,10 @@ package eventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubs/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/README.md b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/README.md index 8a212cb8dc0..c4bbbcf7e60 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters` Documentation -The `eventhubsclusters` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `eventhubsclusters` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/client.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/client.go index 0f1f025c69b..af8d5bc629c 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/client.go @@ -15,7 +15,7 @@ type EventHubsClustersClient struct { } func NewEventHubsClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/id_cluster.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/id_cluster.go index 9136f11408b..73e536a462f 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/id_cluster.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/method_clustersget.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/method_clustersget.go index 44eea50cf2f..e50c86757cf 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/method_clustersget.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/method_clustersget.go @@ -45,7 +45,6 @@ func (c EventHubsClustersClient) ClustersGet(ctx context.Context, id ClusterId) var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/version.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/version.go index 6392c7445db..761e40bae91 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclusters/version.go @@ -1,12 +1,10 @@ package eventhubsclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclusters/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/README.md b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/README.md index 56992bb1dff..f06c4becc3a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions` Documentation -The `eventhubsclustersavailableclusterregions` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `eventhubsclustersavailableclusterregions` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/client.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/client.go index bb786301b48..049ffc2f4df 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/client.go @@ -15,7 +15,7 @@ type EventHubsClustersAvailableClusterRegionsClient struct { } func NewEventHubsClustersAvailableClusterRegionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersAvailableClusterRegionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersAvailableClusterRegionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go index 71fd07675a1..7f7bbd9b7e0 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go @@ -47,7 +47,6 @@ func (c EventHubsClustersAvailableClusterRegionsClient) ClustersListAvailableClu var model AvailableClustersList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/version.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/version.go index 71530039f70..5e926279061 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersavailableclusterregions/version.go @@ -1,12 +1,10 @@ package eventhubsclustersavailableclusterregions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/README.md b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/README.md index 140f8975596..1597400c237 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration` Documentation -The `eventhubsclustersconfiguration` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `eventhubsclustersconfiguration` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/client.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/client.go index 0a4b78f42f7..f5f87a61dca 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/client.go @@ -15,7 +15,7 @@ type EventHubsClustersConfigurationClient struct { } func NewEventHubsClustersConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersConfigurationClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/id_cluster.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/id_cluster.go index 847e1ab02ae..e6c77d43df7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/id_cluster.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationget.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationget.go index 029b5ceb231..53da32e4ed8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationget.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationget.go @@ -46,7 +46,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationGet(ctx context.Conte var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationpatch.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationpatch.go index a7563197f19..f650505cfaf 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationpatch.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/method_configurationpatch.go @@ -52,7 +52,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationPatch(ctx context.Con var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/version.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/version.go index 368b063b08a..5a56d94983a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersconfiguration/version.go @@ -1,12 +1,10 @@ package eventhubsclustersconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersconfiguration/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/README.md b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/README.md index 90628a4f4e2..f815388faea 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace` Documentation -The `eventhubsclustersnamespace` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `eventhubsclustersnamespace` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/client.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/client.go index ab2e60f6902..763fff3d3c9 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/client.go @@ -15,7 +15,7 @@ type EventHubsClustersNamespaceClient struct { } func NewEventHubsClustersNamespaceClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersNamespaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersNamespaceClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/id_cluster.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/id_cluster.go index d8a0964e23b..cd8d71d7278 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/id_cluster.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/method_clusterslistnamespaces.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/method_clusterslistnamespaces.go index ded818427e2..79885bcb934 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/method_clusterslistnamespaces.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/method_clusterslistnamespaces.go @@ -46,7 +46,6 @@ func (c EventHubsClustersNamespaceClient) ClustersListNamespaces(ctx context.Con var model EHNamespaceIdListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/version.go b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/version.go index 3a2d5eeab81..9cfb9ea314b 100644 --- a/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/eventhubsclustersnamespace/version.go @@ -1,12 +1,10 @@ package eventhubsclustersnamespace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersnamespace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersnamespace/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md b/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md index e1eaf558109..647d290193a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go b/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go index cf0f434b766..2310eb61f09 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get.go b/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get.go index e072408e1d5..9e035952ce2 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update.go b/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update.go index 18f0883d8c9..50f2245b716 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input EHNa var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go b/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go index c7efc2b68fa..9fd656eff15 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/README.md b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/README.md index 6d04f16e3b5..045d5644aa8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations` Documentation -The `namespacesnetworksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `namespacesnetworksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/client.go b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/client.go index c2ef8d9c592..ad3e9393e34 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type NamespacesNetworkSecurityPerimeterConfigurationsClient struct { } func NewNamespacesNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesNetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesnetworksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesnetworksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesNetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_namespace.go index 42dfb53b3dc..d69ec90c460 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index ff4da0717a9..edd4dac3c2d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go index 3508fc6b407..9e756338681 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go @@ -46,7 +46,6 @@ func (c NamespacesNetworkSecurityPerimeterConfigurationsClient) NetworkSecurityP var model NetworkSecurityPerimeterConfigurationList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/version.go b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/version.go index 64102d9d96b..492e52e6c1c 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesnetworksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package namespacesnetworksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesnetworksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesnetworksecurityperimeterconfigurations/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/README.md b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/README.md index 2893fbe66d2..e95a31c50a7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/client.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go index c3499b5acac..5252141f706 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go index c194b3f59cf..cadec92d52e 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/version.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/version.go index a5edb0291ad..009c372bdf9 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/README.md b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/README.md index 2f84a72e7d6..5e5c627949d 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/client.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go index c764c3238f3..8c3c7f859fe 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/version.go b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/version.go index 54548774e74..ba601d2f644 100644 --- a/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/README.md b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/README.md index d0330ef5012..85f73fb17b7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/networkrulesets` Documentation -The `networkrulesets` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `networkrulesets` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/client.go b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/client.go index c1cba65adc4..71516b9dd8e 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/client.go @@ -15,7 +15,7 @@ type NetworkRuleSetsClient struct { } func NewNetworkRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkRuleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkrulesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkrulesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkRuleSetsClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/id_namespace.go index 6d9e1484a0a..032ad8951b8 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacescreateorupdatenetworkruleset.go b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacescreateorupdatenetworkruleset.go index e7bd64cf7eb..1cab3444aad 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacescreateorupdatenetworkruleset.go +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacescreateorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NetworkRuleSetsClient) NamespacesCreateOrUpdateNetworkRuleSet(ctx contex var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacesgetnetworkruleset.go b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacesgetnetworkruleset.go index fd290370baa..ce9ae93d3ce 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacesgetnetworkruleset.go +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/method_namespacesgetnetworkruleset.go @@ -46,7 +46,6 @@ func (c NetworkRuleSetsClient) NamespacesGetNetworkRuleSet(ctx context.Context, var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/version.go b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/version.go index 0dcab81e787..accbf8de3e7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/networkrulesets/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/networkrulesets/version.go @@ -1,12 +1,10 @@ package networkrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkrulesets/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/README.md b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/README.md index b1836a64797..13f6118e531 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/README.md +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/schemaregistry` Documentation -The `schemaregistry` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2022-01-01-preview`). +The `schemaregistry` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/client.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/client.go index 438259d21c6..31bb7a8df1a 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/client.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/client.go @@ -15,7 +15,7 @@ type SchemaRegistryClient struct { } func NewSchemaRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schemaregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schemaregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaRegistryClient: %+v", err) } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_namespace.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_namespace.go index 5a7bd5e0a7f..54f8a2409bf 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_namespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_schemagroup.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_schemagroup.go index 7b1a62913bc..bce8d5a266b 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_schemagroup.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/id_schemagroup.go @@ -44,7 +44,7 @@ func ParseSchemaGroupID(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaGroupIDInsensitively(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_createorupdate.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_createorupdate.go index 0228945098c..3d3617326f7 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_createorupdate.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SchemaRegistryClient) CreateOrUpdate(ctx context.Context, id SchemaGroup var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_get.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_get.go index e5a451155cd..30dbfa4ba5c 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_get.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_get.go @@ -45,7 +45,6 @@ func (c SchemaRegistryClient) Get(ctx context.Context, id SchemaGroupId) (result var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_listbynamespace.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_listbynamespace.go index de10e8b42f6..1310cfbcf3b 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_listbynamespace.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/version.go b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/version.go index ad66dd12a32..37bddf00b82 100644 --- a/resource-manager/eventhub/2022-01-01-preview/schemaregistry/version.go +++ b/resource-manager/eventhub/2022-01-01-preview/schemaregistry/version.go @@ -1,12 +1,10 @@ package schemaregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schemaregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schemaregistry/2022-01-01-preview" } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/README.md b/resource-manager/eventhub/2024-01-01/applicationgroup/README.md index bf5c53e5d42..d5fd395bc45 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/README.md +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/applicationgroup` Documentation -The `applicationgroup` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `applicationgroup` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/client.go b/resource-manager/eventhub/2024-01-01/applicationgroup/client.go index b07bf02a25f..286f253207b 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/client.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/client.go @@ -15,7 +15,7 @@ type ApplicationGroupClient struct { } func NewApplicationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGroupClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/id_applicationgroup.go b/resource-manager/eventhub/2024-01-01/applicationgroup/id_applicationgroup.go index 735e0da54cc..561c106b044 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/id_applicationgroup.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/id_applicationgroup.go @@ -44,7 +44,7 @@ func ParseApplicationGroupID(input string) (*ApplicationGroupId, error) { } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGroupIDInsensitively(input string) (*ApplicationGroupId, er } id := ApplicationGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/id_namespace.go b/resource-manager/eventhub/2024-01-01/applicationgroup/id_namespace.go index 8d48a57c2c3..453635ee6a4 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/method_createorupdateapplicationgroup.go b/resource-manager/eventhub/2024-01-01/applicationgroup/method_createorupdateapplicationgroup.go index a0642907c77..bcfdf651d7c 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/method_createorupdateapplicationgroup.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/method_createorupdateapplicationgroup.go @@ -49,7 +49,6 @@ func (c ApplicationGroupClient) CreateOrUpdateApplicationGroup(ctx context.Conte var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/method_get.go b/resource-manager/eventhub/2024-01-01/applicationgroup/method_get.go index 8af1aeae85a..5f689277e19 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/method_get.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGroupClient) Get(ctx context.Context, id ApplicationGroupId) var model ApplicationGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgrouppolicy.go b/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgrouppolicy.go index d998a6f58b4..7c6d09848f1 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgrouppolicy.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgrouppolicy.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplicationGroupPolicy interface { + ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl } -// RawApplicationGroupPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplicationGroupPolicy = BaseApplicationGroupPolicyImpl{} + +type BaseApplicationGroupPolicyImpl struct { + Name string `json:"name"` + Type ApplicationGroupPolicyType `json:"type"` +} + +func (s BaseApplicationGroupPolicyImpl) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return s +} + +var _ ApplicationGroupPolicy = RawApplicationGroupPolicyImpl{} + +// RawApplicationGroupPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplicationGroupPolicyImpl struct { - Type string - Values map[string]interface{} + applicationGroupPolicy BaseApplicationGroupPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawApplicationGroupPolicyImpl) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return s.applicationGroupPolicy } -func unmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGroupPolicy, error) { +func UnmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGroupPolicy, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalApplicationGroupPolicyImplementation(input []byte) (ApplicationGro return out, nil } - out := RawApplicationGroupPolicyImpl{ - Type: value, - Values: temp, + var parent BaseApplicationGroupPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplicationGroupPolicyImpl: %+v", err) } - return out, nil + + return RawApplicationGroupPolicyImpl{ + applicationGroupPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgroupproperties.go b/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgroupproperties.go index bcf93c1299c..8728de0bf6e 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgroupproperties.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/model_applicationgroupproperties.go @@ -39,7 +39,7 @@ func (s *ApplicationGroupProperties) UnmarshalJSON(bytes []byte) error { output := make([]ApplicationGroupPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalApplicationGroupPolicyImplementation(val) + impl, err := UnmarshalApplicationGroupPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Policies' for 'ApplicationGroupProperties': %+v", i, err) } diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/model_throttlingpolicy.go b/resource-manager/eventhub/2024-01-01/applicationgroup/model_throttlingpolicy.go index 42af2c46ea0..3e42bb47e99 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/model_throttlingpolicy.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/model_throttlingpolicy.go @@ -15,7 +15,16 @@ type ThrottlingPolicy struct { RateLimitThreshold int64 `json:"rateLimitThreshold"` // Fields inherited from ApplicationGroupPolicy - Name string `json:"name"` + + Name string `json:"name"` + Type ApplicationGroupPolicyType `json:"type"` +} + +func (s ThrottlingPolicy) ApplicationGroupPolicy() BaseApplicationGroupPolicyImpl { + return BaseApplicationGroupPolicyImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ThrottlingPolicy{} @@ -29,9 +38,10 @@ func (s ThrottlingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThrottlingPolicy: %+v", err) } + decoded["type"] = "ThrottlingPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/eventhub/2024-01-01/applicationgroup/version.go b/resource-manager/eventhub/2024-01-01/applicationgroup/version.go index f434cdcc5d5..e74a061a9b2 100644 --- a/resource-manager/eventhub/2024-01-01/applicationgroup/version.go +++ b/resource-manager/eventhub/2024-01-01/applicationgroup/version.go @@ -1,12 +1,10 @@ package applicationgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgroup/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/README.md index 707c0a59133..84fc919b2d2 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs` Documentation -The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `authorizationrulesdisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/client.go index eaea9f694c3..5802c6385c0 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesDisasterRecoveryConfigsClient struct { } func NewAuthorizationRulesDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesdisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go index 23f6cdc6cea..040234bdc98 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 6d890247c0a..df7068eb0a2 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go index a6c4d3108f9..d7f40fff042 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go index d5f4c359724..0b836749bf3 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/method_disasterrecoveryconfigslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesDisasterRecoveryConfigsClient) DisasterRecoveryConfigs var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/version.go index 7c0f88ba3c7..9c750cf18c2 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesdisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package authorizationrulesdisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesdisasterrecoveryconfigs/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/README.md b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/README.md index 5c10b9b6062..920833a09e7 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/README.md +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs` Documentation -The `authorizationruleseventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `authorizationruleseventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/client.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/client.go index e4948fc5469..161bee08089 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/client.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesEventHubsClient struct { } func NewAuthorizationRulesEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesEventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationruleseventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesEventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhub.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhub.go index f1dc368be03..95845fedee0 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go index 6db74e71a5e..5d44e82e7dc 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go index 62dc4f20f07..b67ea413d33 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsCreateOrUpdateAuthorizationR var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubslistkeys.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubslistkeys.go index e8d8356dcbe..3736fb60af8 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubslistkeys.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsListKeys(ctx context.Context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go index 5405f29972f..ae319d8af5d 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/method_eventhubsregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesEventHubsClient) EventHubsRegenerateKeys(ctx context.C var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/version.go b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/version.go index def97f0fd78..006a68b4bc7 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/version.go +++ b/resource-manager/eventhub/2024-01-01/authorizationruleseventhubs/version.go @@ -1,12 +1,10 @@ package authorizationruleseventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationruleseventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationruleseventhubs/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/README.md b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/README.md index 18f004345ee..cc4b86ca68e 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/README.md +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces` Documentation -The `authorizationrulesnamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `authorizationrulesnamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/client.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/client.go index 3fd1fec54e0..f0609cabf8d 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/client.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/client.go @@ -15,7 +15,7 @@ type AuthorizationRulesNamespacesClient struct { } func NewAuthorizationRulesNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationRulesNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizationrulesnamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationRulesNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_authorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_authorizationrule.go index 8dcf155f45b..13034521234 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_authorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_namespace.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_namespace.go index b72d8ea4f83..4c8276950a9 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go index 9f1a975a1be..3ef30ef03d4 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesCreateOrUpdateAuthorizatio var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go index 8b4cbd363c9..2a002461d3f 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesGetAuthorizationRule(ctx c var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespaceslistkeys.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespaceslistkeys.go index f39b8d0b401..2f8ded0314b 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespaceslistkeys.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesListKeys(ctx context.Conte var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go index c48e9382b58..d8b5e25c692 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c AuthorizationRulesNamespacesClient) NamespacesRegenerateKeys(ctx context var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/version.go b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/version.go index 343f6ab4010..941b6f80182 100644 --- a/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/version.go +++ b/resource-manager/eventhub/2024-01-01/authorizationrulesnamespaces/version.go @@ -1,12 +1,10 @@ package authorizationrulesnamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizationrulesnamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizationrulesnamespaces/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/README.md b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/README.md index e087b647847..066fc7f9da6 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs` Documentation -The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `checknameavailabilitydisasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/client.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/client.go index af4ddbb61a5..69999edea53 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityDisasterRecoveryConfigsClient struct { } func NewCheckNameAvailabilityDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityDisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitydisasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityDisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go index bc1291f8c9f..50e941ef45f 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go index 5473c47cadc..9f6acd206ad 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/method_disasterrecoveryconfigschecknameavailability.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityDisasterRecoveryConfigsClient) DisasterRecoveryConf var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/version.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/version.go index 5781dea9081..f6270a74fe6 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitydisasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package checknameavailabilitydisasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitydisasterrecoveryconfigs/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/README.md b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/README.md index 8b50251aab4..8f99f859a0d 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/README.md +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces` Documentation -The `checknameavailabilitynamespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `checknameavailabilitynamespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/client.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/client.go index b8cbe0015c7..85d09cfd4b6 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/client.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityNamespacesClient struct { } func NewCheckNameAvailabilityNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailabilitynamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityNamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go index 9e6975c1ce6..2471d4eaf6d 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/method_namespaceschecknameavailability.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityNamespacesClient) NamespacesCheckNameAvailability(c var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/version.go b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/version.go index 97d42c05f7c..dfd08142936 100644 --- a/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/version.go +++ b/resource-manager/eventhub/2024-01-01/checknameavailabilitynamespaces/version.go @@ -1,12 +1,10 @@ package checknameavailabilitynamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailabilitynamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailabilitynamespaces/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/README.md b/resource-manager/eventhub/2024-01-01/consumergroups/README.md index 45efaa85044..a24a7f19b29 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/README.md +++ b/resource-manager/eventhub/2024-01-01/consumergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/consumergroups` Documentation -The `consumergroups` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `consumergroups` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/client.go b/resource-manager/eventhub/2024-01-01/consumergroups/client.go index 281884beac7..7444b7e4dba 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/client.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/client.go @@ -15,7 +15,7 @@ type ConsumerGroupsClient struct { } func NewConsumerGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "consumergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "consumergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConsumerGroupsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/id_consumergroup.go b/resource-manager/eventhub/2024-01-01/consumergroups/id_consumergroup.go index 329b7ddecad..0f549e63ab8 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/id_consumergroup.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/id_consumergroup.go @@ -46,7 +46,7 @@ func ParseConsumerGroupID(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConsumerGroupIDInsensitively(input string) (*ConsumerGroupId, error) { } id := ConsumerGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/id_eventhub.go b/resource-manager/eventhub/2024-01-01/consumergroups/id_eventhub.go index e46fab2839a..471215bacb6 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/id_eventhub.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/method_createorupdate.go b/resource-manager/eventhub/2024-01-01/consumergroups/method_createorupdate.go index cbc5c795211..c7932a1636c 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/method_createorupdate.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, id ConsumerGro var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/method_get.go b/resource-manager/eventhub/2024-01-01/consumergroups/method_get.go index d6927432948..3ff1cc35f5f 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/method_get.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/method_get.go @@ -45,7 +45,6 @@ func (c ConsumerGroupsClient) Get(ctx context.Context, id ConsumerGroupId) (resu var model ConsumerGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/method_listbyeventhub.go b/resource-manager/eventhub/2024-01-01/consumergroups/method_listbyeventhub.go index d3112958e5e..f57687df614 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/method_listbyeventhub.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/method_listbyeventhub.go @@ -40,6 +40,7 @@ func (o ListByEventHubOperationOptions) ToHeaders() *client.Headers { func (o ListByEventHubOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2024-01-01/consumergroups/version.go b/resource-manager/eventhub/2024-01-01/consumergroups/version.go index 3545d4ac0e9..d5176057ce0 100644 --- a/resource-manager/eventhub/2024-01-01/consumergroups/version.go +++ b/resource-manager/eventhub/2024-01-01/consumergroups/version.go @@ -1,12 +1,10 @@ package consumergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/consumergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/consumergroups/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/README.md b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/README.md index c4870370f23..2c9f1ea4271 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/README.md +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/client.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/client.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index 97af75a4949..466b1d53920 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_namespace.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_namespace.go index c6072db6e65..849ec47efa5 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_get.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/version.go b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/version.go index 6c9cb519d38..7827be0ea2e 100644 --- a/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/version.go +++ b/resource-manager/eventhub/2024-01-01/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/README.md b/resource-manager/eventhub/2024-01-01/eventhubs/README.md index d625697087e..c03165410c6 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/README.md +++ b/resource-manager/eventhub/2024-01-01/eventhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/eventhubs` Documentation -The `eventhubs` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `eventhubs` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/client.go b/resource-manager/eventhub/2024-01-01/eventhubs/client.go index e26a15560d5..abaf098b483 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/client.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/client.go @@ -15,7 +15,7 @@ type EventHubsClient struct { } func NewEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhub.go b/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhub.go index b890ac51acc..e7e8b6ecf56 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhub.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhub.go @@ -44,7 +44,7 @@ func ParseEventhubID(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventhubIDInsensitively(input string) (*EventhubId, error) { } id := EventhubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhubauthorizationrule.go b/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhubauthorizationrule.go index f3c87103c72..01d386cfca6 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhubauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/id_eventhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleI } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAutho } id := EventhubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/id_namespace.go b/resource-manager/eventhub/2024-01-01/eventhubs/id_namespace.go index 85ac87987f6..4346aa62a86 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/method_createorupdate.go b/resource-manager/eventhub/2024-01-01/eventhubs/method_createorupdate.go index 419d0817f0d..cc7de19af4f 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/method_createorupdate.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EventHubsClient) CreateOrUpdate(ctx context.Context, id EventhubId, inpu var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/method_get.go b/resource-manager/eventhub/2024-01-01/eventhubs/method_get.go index b0ec86f62c6..9f7b72ff857 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/method_get.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/method_get.go @@ -45,7 +45,6 @@ func (c EventHubsClient) Get(ctx context.Context, id EventhubId) (result GetOper var model Eventhub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/method_getauthorizationrule.go b/resource-manager/eventhub/2024-01-01/eventhubs/method_getauthorizationrule.go index 8b48d6f724c..b2aaca5e1dd 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/method_getauthorizationrule.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c EventHubsClient) GetAuthorizationRule(ctx context.Context, id EventhubAu var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/method_listbynamespace.go b/resource-manager/eventhub/2024-01-01/eventhubs/method_listbynamespace.go index e146faa0cea..47ddb8f4899 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/method_listbynamespace.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2024-01-01/eventhubs/version.go b/resource-manager/eventhub/2024-01-01/eventhubs/version.go index 98db497b230..535f6fb8a78 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubs/version.go +++ b/resource-manager/eventhub/2024-01-01/eventhubs/version.go @@ -1,12 +1,10 @@ package eventhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubs/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclusters/README.md b/resource-manager/eventhub/2024-01-01/eventhubsclusters/README.md index 68e10e099eb..ca140859124 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclusters/README.md +++ b/resource-manager/eventhub/2024-01-01/eventhubsclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/eventhubsclusters` Documentation -The `eventhubsclusters` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `eventhubsclusters` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclusters/client.go b/resource-manager/eventhub/2024-01-01/eventhubsclusters/client.go index 0f1f025c69b..af8d5bc629c 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclusters/client.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclusters/client.go @@ -15,7 +15,7 @@ type EventHubsClustersClient struct { } func NewEventHubsClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclusters/id_cluster.go b/resource-manager/eventhub/2024-01-01/eventhubsclusters/id_cluster.go index 9136f11408b..73e536a462f 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclusters/id_cluster.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclusters/method_clustersget.go b/resource-manager/eventhub/2024-01-01/eventhubsclusters/method_clustersget.go index 44eea50cf2f..e50c86757cf 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclusters/method_clustersget.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclusters/method_clustersget.go @@ -45,7 +45,6 @@ func (c EventHubsClustersClient) ClustersGet(ctx context.Context, id ClusterId) var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclusters/version.go b/resource-manager/eventhub/2024-01-01/eventhubsclusters/version.go index c5ead1591f1..d669e2597c3 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclusters/version.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclusters/version.go @@ -1,12 +1,10 @@ package eventhubsclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclusters/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/README.md b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/README.md index eae80c1c277..50edb0e03a7 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/README.md +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions` Documentation -The `eventhubsclustersavailableclusterregions` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `eventhubsclustersavailableclusterregions` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/client.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/client.go index bb786301b48..049ffc2f4df 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/client.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/client.go @@ -15,7 +15,7 @@ type EventHubsClustersAvailableClusterRegionsClient struct { } func NewEventHubsClustersAvailableClusterRegionsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersAvailableClusterRegionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersavailableclusterregions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersAvailableClusterRegionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go index 71fd07675a1..7f7bbd9b7e0 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/method_clusterslistavailableclusterregion.go @@ -47,7 +47,6 @@ func (c EventHubsClustersAvailableClusterRegionsClient) ClustersListAvailableClu var model AvailableClustersList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/version.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/version.go index 800d3fb03ae..0a42b55e5a1 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/version.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersavailableclusterregions/version.go @@ -1,12 +1,10 @@ package eventhubsclustersavailableclusterregions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersavailableclusterregions/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/README.md b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/README.md index 6825f2866d8..e9f61d000d1 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/README.md +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration` Documentation -The `eventhubsclustersconfiguration` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `eventhubsclustersconfiguration` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/client.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/client.go index 0a4b78f42f7..f5f87a61dca 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/client.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/client.go @@ -15,7 +15,7 @@ type EventHubsClustersConfigurationClient struct { } func NewEventHubsClustersConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersConfigurationClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/id_cluster.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/id_cluster.go index 847e1ab02ae..e6c77d43df7 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/id_cluster.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationget.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationget.go index 029b5ceb231..53da32e4ed8 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationget.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationget.go @@ -46,7 +46,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationGet(ctx context.Conte var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationpatch.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationpatch.go index a7563197f19..f650505cfaf 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationpatch.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/method_configurationpatch.go @@ -52,7 +52,6 @@ func (c EventHubsClustersConfigurationClient) ConfigurationPatch(ctx context.Con var model ClusterQuotaConfigurationProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/version.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/version.go index bff739edf09..4bbfc9287aa 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/version.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersconfiguration/version.go @@ -1,12 +1,10 @@ package eventhubsclustersconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersconfiguration/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/README.md b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/README.md index 56ed4a81cc1..1a6cc4ca28b 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/README.md +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace` Documentation -The `eventhubsclustersnamespace` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `eventhubsclustersnamespace` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/client.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/client.go index ab2e60f6902..763fff3d3c9 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/client.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/client.go @@ -15,7 +15,7 @@ type EventHubsClustersNamespaceClient struct { } func NewEventHubsClustersNamespaceClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersNamespaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventhubsclustersnamespace", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventHubsClustersNamespaceClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/id_cluster.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/id_cluster.go index d8a0964e23b..cd8d71d7278 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/id_cluster.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go index ded818427e2..79885bcb934 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/method_clusterslistnamespaces.go @@ -46,7 +46,6 @@ func (c EventHubsClustersNamespaceClient) ClustersListNamespaces(ctx context.Con var model EHNamespaceIdListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/version.go b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/version.go index 1ddaf117e9f..dbdb50dda01 100644 --- a/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/version.go +++ b/resource-manager/eventhub/2024-01-01/eventhubsclustersnamespace/version.go @@ -1,12 +1,10 @@ package eventhubsclustersnamespace -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventhubsclustersnamespace/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventhubsclustersnamespace/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/namespaces/README.md b/resource-manager/eventhub/2024-01-01/namespaces/README.md index f3e5f4ad563..2e5a616a442 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/README.md +++ b/resource-manager/eventhub/2024-01-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/namespaces/client.go b/resource-manager/eventhub/2024-01-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/client.go +++ b/resource-manager/eventhub/2024-01-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/namespaces/id_namespace.go b/resource-manager/eventhub/2024-01-01/namespaces/id_namespace.go index cf0f434b766..2310eb61f09 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespaces/method_get.go b/resource-manager/eventhub/2024-01-01/namespaces/method_get.go index e072408e1d5..9e035952ce2 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/method_get.go +++ b/resource-manager/eventhub/2024-01-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/namespaces/method_update.go b/resource-manager/eventhub/2024-01-01/namespaces/method_update.go index 18f0883d8c9..50f2245b716 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/method_update.go +++ b/resource-manager/eventhub/2024-01-01/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input EHNa var model EHNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/namespaces/version.go b/resource-manager/eventhub/2024-01-01/namespaces/version.go index 34dabffb9d7..56c3a166083 100644 --- a/resource-manager/eventhub/2024-01-01/namespaces/version.go +++ b/resource-manager/eventhub/2024-01-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/README.md b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/README.md index f6bd8770325..de0309965f1 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/README.md +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations` Documentation -The `namespacesnetworksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `namespacesnetworksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/client.go b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/client.go index c2ef8d9c592..ad3e9393e34 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/client.go +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type NamespacesNetworkSecurityPerimeterConfigurationsClient struct { } func NewNamespacesNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesNetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesnetworksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesnetworksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesNetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_namespace.go b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_namespace.go index 42dfb53b3dc..d69ec90c460 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index ff4da0717a9..edd4dac3c2d 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go index 3508fc6b407..9e756338681 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationlist.go @@ -46,7 +46,6 @@ func (c NamespacesNetworkSecurityPerimeterConfigurationsClient) NetworkSecurityP var model NetworkSecurityPerimeterConfigurationList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/version.go b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/version.go index 667bb176a20..f02957b5f1a 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/version.go +++ b/resource-manager/eventhub/2024-01-01/namespacesnetworksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package namespacesnetworksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesnetworksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesnetworksecurityperimeterconfigurations/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/README.md b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/README.md index ae8ae07c4aa..45b9d5b81f7 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/README.md +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/client.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/client.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_namespace.go index c3499b5acac..5252141f706 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_privateendpointconnection.go index c194b3f59cf..cadec92d52e 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/version.go b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/version.go index d14e4bc46d9..95eb5bf4f06 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/version.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/README.md b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/README.md index 12bb16988aa..19e732d1763 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/README.md +++ b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/client.go b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/client.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/id_namespace.go b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/id_namespace.go index c764c3238f3..8c3c7f859fe 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/version.go b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/version.go index c25c424fd65..fd3551bd5af 100644 --- a/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/version.go +++ b/resource-manager/eventhub/2024-01-01/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/README.md b/resource-manager/eventhub/2024-01-01/networkrulesets/README.md index b4012951adf..3b50eea2d9e 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/README.md +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/networkrulesets` Documentation -The `networkrulesets` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `networkrulesets` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/client.go b/resource-manager/eventhub/2024-01-01/networkrulesets/client.go index c1cba65adc4..71516b9dd8e 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/client.go +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/client.go @@ -15,7 +15,7 @@ type NetworkRuleSetsClient struct { } func NewNetworkRuleSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkRuleSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkrulesets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkrulesets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkRuleSetsClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/id_namespace.go b/resource-manager/eventhub/2024-01-01/networkrulesets/id_namespace.go index 6d9e1484a0a..032ad8951b8 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go b/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go index e7bd64cf7eb..1cab3444aad 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacescreateorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NetworkRuleSetsClient) NamespacesCreateOrUpdateNetworkRuleSet(ctx contex var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacesgetnetworkruleset.go b/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacesgetnetworkruleset.go index fd290370baa..ce9ae93d3ce 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacesgetnetworkruleset.go +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/method_namespacesgetnetworkruleset.go @@ -46,7 +46,6 @@ func (c NetworkRuleSetsClient) NamespacesGetNetworkRuleSet(ctx context.Context, var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/networkrulesets/version.go b/resource-manager/eventhub/2024-01-01/networkrulesets/version.go index 6799ed9e37a..ea58ff579dd 100644 --- a/resource-manager/eventhub/2024-01-01/networkrulesets/version.go +++ b/resource-manager/eventhub/2024-01-01/networkrulesets/version.go @@ -1,12 +1,10 @@ package networkrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkrulesets/2024-01-01" } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/README.md b/resource-manager/eventhub/2024-01-01/schemaregistry/README.md index 98314aef5f1..606a45983f0 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/README.md +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/schemaregistry` Documentation -The `schemaregistry` SDK allows for interaction with the Azure Resource Manager Service `eventhub` (API Version `2024-01-01`). +The `schemaregistry` SDK allows for interaction with Azure Resource Manager `eventhub` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/client.go b/resource-manager/eventhub/2024-01-01/schemaregistry/client.go index 438259d21c6..31bb7a8df1a 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/client.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/client.go @@ -15,7 +15,7 @@ type SchemaRegistryClient struct { } func NewSchemaRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*SchemaRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schemaregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schemaregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SchemaRegistryClient: %+v", err) } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/id_namespace.go b/resource-manager/eventhub/2024-01-01/schemaregistry/id_namespace.go index 5a7bd5e0a7f..54f8a2409bf 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/id_namespace.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/id_schemagroup.go b/resource-manager/eventhub/2024-01-01/schemaregistry/id_schemagroup.go index 7b1a62913bc..bce8d5a266b 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/id_schemagroup.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/id_schemagroup.go @@ -44,7 +44,7 @@ func ParseSchemaGroupID(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaGroupIDInsensitively(input string) (*SchemaGroupId, error) { } id := SchemaGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/method_createorupdate.go b/resource-manager/eventhub/2024-01-01/schemaregistry/method_createorupdate.go index 0228945098c..3d3617326f7 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/method_createorupdate.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SchemaRegistryClient) CreateOrUpdate(ctx context.Context, id SchemaGroup var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/method_get.go b/resource-manager/eventhub/2024-01-01/schemaregistry/method_get.go index e5a451155cd..30dbfa4ba5c 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/method_get.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/method_get.go @@ -45,7 +45,6 @@ func (c SchemaRegistryClient) Get(ctx context.Context, id SchemaGroupId) (result var model SchemaGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/method_listbynamespace.go b/resource-manager/eventhub/2024-01-01/schemaregistry/method_listbynamespace.go index de10e8b42f6..1310cfbcf3b 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/method_listbynamespace.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/eventhub/2024-01-01/schemaregistry/version.go b/resource-manager/eventhub/2024-01-01/schemaregistry/version.go index c89c07d50f7..ac30326d61a 100644 --- a/resource-manager/eventhub/2024-01-01/schemaregistry/version.go +++ b/resource-manager/eventhub/2024-01-01/schemaregistry/version.go @@ -1,12 +1,10 @@ package schemaregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schemaregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schemaregistry/2024-01-01" } diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/README.md b/resource-manager/extendedlocation/2021-08-15/customlocations/README.md index 245f8d300e0..51b1c4564aa 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/README.md +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/extendedlocation/2021-08-15/customlocations` Documentation -The `customlocations` SDK allows for interaction with the Azure Resource Manager Service `extendedlocation` (API Version `2021-08-15`). +The `customlocations` SDK allows for interaction with Azure Resource Manager `extendedlocation` (API Version `2021-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/client.go b/resource-manager/extendedlocation/2021-08-15/customlocations/client.go index bd1bcb809a5..a02841fb11d 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/client.go +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/client.go @@ -15,7 +15,7 @@ type CustomLocationsClient struct { } func NewCustomLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customlocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customlocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomLocationsClient: %+v", err) } diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/id_customlocation.go b/resource-manager/extendedlocation/2021-08-15/customlocations/id_customlocation.go index 0381e8f070d..9f12a835b11 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/id_customlocation.go +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/id_customlocation.go @@ -42,7 +42,7 @@ func ParseCustomLocationID(input string) (*CustomLocationId, error) { } id := CustomLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomLocationIDInsensitively(input string) (*CustomLocationId, error) } id := CustomLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/method_get.go b/resource-manager/extendedlocation/2021-08-15/customlocations/method_get.go index d9cfd4a36ec..1c5e3333c3c 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/method_get.go +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/method_get.go @@ -45,7 +45,6 @@ func (c CustomLocationsClient) Get(ctx context.Context, id CustomLocationId) (re var model CustomLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/method_update.go b/resource-manager/extendedlocation/2021-08-15/customlocations/method_update.go index 71e3cb7f057..90f5532510b 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/method_update.go +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/method_update.go @@ -49,7 +49,6 @@ func (c CustomLocationsClient) Update(ctx context.Context, id CustomLocationId, var model CustomLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/extendedlocation/2021-08-15/customlocations/version.go b/resource-manager/extendedlocation/2021-08-15/customlocations/version.go index efff5cadda0..7e90b8c389a 100644 --- a/resource-manager/extendedlocation/2021-08-15/customlocations/version.go +++ b/resource-manager/extendedlocation/2021-08-15/customlocations/version.go @@ -1,12 +1,10 @@ package customlocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customlocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customlocations/2021-08-15" } diff --git a/resource-manager/fabric/2023-11-01/client.go b/resource-manager/fabric/2023-11-01/client.go new file mode 100644 index 00000000000..a8702ce914c --- /dev/null +++ b/resource-manager/fabric/2023-11-01/client.go @@ -0,0 +1,28 @@ +package v2023_11_01 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/fabric/2023-11-01/fabriccapacities" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + FabricCapacities *fabriccapacities.FabricCapacitiesClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + fabricCapacitiesClient, err := fabriccapacities.NewFabricCapacitiesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building FabricCapacities client: %+v", err) + } + configureFunc(fabricCapacitiesClient.Client) + + return &Client{ + FabricCapacities: fabricCapacitiesClient, + }, nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/README.md b/resource-manager/fabric/2023-11-01/fabriccapacities/README.md new file mode 100644 index 00000000000..908059f6f91 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/README.md @@ -0,0 +1,196 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/fabric/2023-11-01/fabriccapacities` Documentation + +The `fabriccapacities` SDK allows for interaction with Azure Resource Manager `fabric` (API Version `2023-11-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/fabric/2023-11-01/fabriccapacities" +``` + + +### Client Initialization + +```go +client := fabriccapacities.NewFabricCapacitiesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FabricCapacitiesClient.CheckNameAvailability` + +```go +ctx := context.TODO() +id := fabriccapacities.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := fabriccapacities.CheckNameAvailabilityRequest{ + // ... +} + + +read, err := client.CheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FabricCapacitiesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +payload := fabriccapacities.FabricCapacity{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `FabricCapacitiesClient.Delete` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FabricCapacitiesClient.Get` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FabricCapacitiesClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FabricCapacitiesClient.ListBySubscription` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination +items, err := client.ListBySubscriptionComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FabricCapacitiesClient.ListSkus` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.ListSkus(ctx, id)` can be used to do batched pagination +items, err := client.ListSkusComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FabricCapacitiesClient.ListSkusForCapacity` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +// alternatively `client.ListSkusForCapacity(ctx, id)` can be used to do batched pagination +items, err := client.ListSkusForCapacityComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `FabricCapacitiesClient.Resume` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +if err := client.ResumeThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FabricCapacitiesClient.Suspend` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +if err := client.SuspendThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FabricCapacitiesClient.Update` + +```go +ctx := context.TODO() +id := fabriccapacities.NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + +payload := fabriccapacities.FabricCapacityUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/client.go b/resource-manager/fabric/2023-11-01/fabriccapacities/client.go new file mode 100644 index 00000000000..124528c4394 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/client.go @@ -0,0 +1,26 @@ +package fabriccapacities + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacitiesClient struct { + Client *resourcemanager.Client +} + +func NewFabricCapacitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*FabricCapacitiesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "fabriccapacities", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating FabricCapacitiesClient: %+v", err) + } + + return &FabricCapacitiesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/constants.go b/resource-manager/fabric/2023-11-01/fabriccapacities/constants.go new file mode 100644 index 00000000000..969350a0252 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/constants.go @@ -0,0 +1,213 @@ +package fabriccapacities + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForCheckNameAvailabilityReason() []string { + return []string{ + string(CheckNameAvailabilityReasonAlreadyExists), + string(CheckNameAvailabilityReasonInvalid), + } +} + +func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { + vals := map[string]CheckNameAvailabilityReason{ + "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, + "invalid": CheckNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityReason(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateProvisioning), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "provisioning": ProvisioningStateProvisioning, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type ResourceState string + +const ( + ResourceStateActive ResourceState = "Active" + ResourceStateDeleting ResourceState = "Deleting" + ResourceStateFailed ResourceState = "Failed" + ResourceStatePaused ResourceState = "Paused" + ResourceStatePausing ResourceState = "Pausing" + ResourceStatePreparing ResourceState = "Preparing" + ResourceStateProvisioning ResourceState = "Provisioning" + ResourceStateResuming ResourceState = "Resuming" + ResourceStateScaling ResourceState = "Scaling" + ResourceStateSuspended ResourceState = "Suspended" + ResourceStateSuspending ResourceState = "Suspending" + ResourceStateUpdating ResourceState = "Updating" +) + +func PossibleValuesForResourceState() []string { + return []string{ + string(ResourceStateActive), + string(ResourceStateDeleting), + string(ResourceStateFailed), + string(ResourceStatePaused), + string(ResourceStatePausing), + string(ResourceStatePreparing), + string(ResourceStateProvisioning), + string(ResourceStateResuming), + string(ResourceStateScaling), + string(ResourceStateSuspended), + string(ResourceStateSuspending), + string(ResourceStateUpdating), + } +} + +func (s *ResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceState(input string) (*ResourceState, error) { + vals := map[string]ResourceState{ + "active": ResourceStateActive, + "deleting": ResourceStateDeleting, + "failed": ResourceStateFailed, + "paused": ResourceStatePaused, + "pausing": ResourceStatePausing, + "preparing": ResourceStatePreparing, + "provisioning": ResourceStateProvisioning, + "resuming": ResourceStateResuming, + "scaling": ResourceStateScaling, + "suspended": ResourceStateSuspended, + "suspending": ResourceStateSuspending, + "updating": ResourceStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceState(input) + return &out, nil +} + +type RpSkuTier string + +const ( + RpSkuTierFabric RpSkuTier = "Fabric" +) + +func PossibleValuesForRpSkuTier() []string { + return []string{ + string(RpSkuTierFabric), + } +} + +func (s *RpSkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRpSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRpSkuTier(input string) (*RpSkuTier, error) { + vals := map[string]RpSkuTier{ + "fabric": RpSkuTierFabric, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RpSkuTier(input) + return &out, nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity.go b/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity.go new file mode 100644 index 00000000000..abd4b10dbf5 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity.go @@ -0,0 +1,130 @@ +package fabriccapacities + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&CapacityId{}) +} + +var _ resourceids.ResourceId = &CapacityId{} + +// CapacityId is a struct representing the Resource ID for a Capacity +type CapacityId struct { + SubscriptionId string + ResourceGroupName string + CapacityName string +} + +// NewCapacityID returns a new CapacityId struct +func NewCapacityID(subscriptionId string, resourceGroupName string, capacityName string) CapacityId { + return CapacityId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + CapacityName: capacityName, + } +} + +// ParseCapacityID parses 'input' into a CapacityId +func ParseCapacityID(input string) (*CapacityId, error) { + parser := resourceids.NewParserFromResourceIdType(&CapacityId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CapacityId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCapacityIDInsensitively parses 'input' case-insensitively into a CapacityId +// note: this method should only be used for API response data and not user input +func ParseCapacityIDInsensitively(input string) (*CapacityId, error) { + parser := resourceids.NewParserFromResourceIdType(&CapacityId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CapacityId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CapacityId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.CapacityName, ok = input.Parsed["capacityName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capacityName", input) + } + + return nil +} + +// ValidateCapacityID checks that 'input' can be parsed as a Capacity ID +func ValidateCapacityID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCapacityID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Capacity ID +func (id CapacityId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Fabric/capacities/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CapacityName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Capacity ID +func (id CapacityId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftFabric", "Microsoft.Fabric", "Microsoft.Fabric"), + resourceids.StaticSegment("staticCapacities", "capacities", "capacities"), + resourceids.UserSpecifiedSegment("capacityName", "capacityValue"), + } +} + +// String returns a human-readable description of this Capacity ID +func (id CapacityId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Capacity Name: %q", id.CapacityName), + } + return fmt.Sprintf("Capacity (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity_test.go b/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity_test.go new file mode 100644 index 00000000000..73859d9afd8 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/id_capacity_test.go @@ -0,0 +1,282 @@ +package fabriccapacities + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &CapacityId{} + +func TestNewCapacityID(t *testing.T) { + id := NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.CapacityName != "capacityValue" { + t.Fatalf("Expected %q but got %q for Segment 'CapacityName'", id.CapacityName, "capacityValue") + } +} + +func TestFormatCapacityID(t *testing.T) { + actual := NewCapacityID("12345678-1234-9876-4563-123456789012", "example-resource-group", "capacityValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities/capacityValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseCapacityID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CapacityId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities/capacityValue", + Expected: &CapacityId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + CapacityName: "capacityValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities/capacityValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCapacityID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.CapacityName != v.Expected.CapacityName { + t.Fatalf("Expected %q but got %q for CapacityName", v.Expected.CapacityName, actual.CapacityName) + } + + } +} + +func TestParseCapacityIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *CapacityId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.fAbRiC", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.fAbRiC/cApAcItIeS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities/capacityValue", + Expected: &CapacityId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + CapacityName: "capacityValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Fabric/capacities/capacityValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.fAbRiC/cApAcItIeS/cApAcItYvAlUe", + Expected: &CapacityId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + CapacityName: "cApAcItYvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.fAbRiC/cApAcItIeS/cApAcItYvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseCapacityIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.CapacityName != v.Expected.CapacityName { + t.Fatalf("Expected %q but got %q for CapacityName", v.Expected.CapacityName, actual.CapacityName) + } + + } +} + +func TestSegmentsForCapacityId(t *testing.T) { + segments := CapacityId{}.Segments() + if len(segments) == 0 { + t.Fatalf("CapacityId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/id_location.go b/resource-manager/fabric/2023-11-01/fabriccapacities/id_location.go new file mode 100644 index 00000000000..609368dcf49 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/id_location.go @@ -0,0 +1,121 @@ +package fabriccapacities + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&LocationId{}) +} + +var _ resourceids.ResourceId = &LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.Fabric/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftFabric", "Microsoft.Fabric", "Microsoft.Fabric"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/id_location_test.go b/resource-manager/fabric/2023-11-01/fabriccapacities/id_location_test.go new file mode 100644 index 00000000000..990920e5a62 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/id_location_test.go @@ -0,0 +1,237 @@ +package fabriccapacities + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &LocationId{} + +func TestNewLocationID(t *testing.T) { + id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.LocationName != "locationValue" { + t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") + } +} + +func TestFormatLocationID(t *testing.T) { + actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations/locationValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseLocationID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations/locationValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestParseLocationIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.fAbRiC", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.fAbRiC/lOcAtIoNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Fabric/locations/locationValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.fAbRiC/lOcAtIoNs/lOcAtIoNvAlUe", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "lOcAtIoNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.fAbRiC/lOcAtIoNs/lOcAtIoNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestSegmentsForLocationId(t *testing.T) { + segments := LocationId{}.Segments() + if len(segments) == 0 { + t.Fatalf("LocationId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_checknameavailability.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_checknameavailability.go new file mode 100644 index 00000000000..ae37788515f --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_checknameavailability.go @@ -0,0 +1,58 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityResponse +} + +// CheckNameAvailability ... +func (c FabricCapacitiesClient) CheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityRequest) (result CheckNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/checkNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_createorupdate.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_createorupdate.go new file mode 100644 index 00000000000..c28db3e5b87 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_createorupdate.go @@ -0,0 +1,75 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FabricCapacity +} + +// CreateOrUpdate ... +func (c FabricCapacitiesClient) CreateOrUpdate(ctx context.Context, id CapacityId, input FabricCapacity) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c FabricCapacitiesClient) CreateOrUpdateThenPoll(ctx context.Context, id CapacityId, input FabricCapacity) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_delete.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_delete.go new file mode 100644 index 00000000000..e87cfd96906 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_delete.go @@ -0,0 +1,70 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c FabricCapacitiesClient) Delete(ctx context.Context, id CapacityId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c FabricCapacitiesClient) DeleteThenPoll(ctx context.Context, id CapacityId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_get.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_get.go new file mode 100644 index 00000000000..5afecf413b0 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_get.go @@ -0,0 +1,53 @@ +package fabriccapacities + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *FabricCapacity +} + +// Get ... +func (c FabricCapacitiesClient) Get(ctx context.Context, id CapacityId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model FabricCapacity + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbyresourcegroup.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbyresourcegroup.go new file mode 100644 index 00000000000..3f49ade6b32 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]FabricCapacity +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []FabricCapacity +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c FabricCapacitiesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Fabric/capacities", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]FabricCapacity `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c FabricCapacitiesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, FabricCapacityOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FabricCapacitiesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FabricCapacityOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]FabricCapacity, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbysubscription.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbysubscription.go new file mode 100644 index 00000000000..74c2bbe6cc6 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listbysubscription.go @@ -0,0 +1,106 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListBySubscriptionOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]FabricCapacity +} + +type ListBySubscriptionCompleteResult struct { + LatestHttpResponse *http.Response + Items []FabricCapacity +} + +type ListBySubscriptionCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListBySubscription ... +func (c FabricCapacitiesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListBySubscriptionCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Fabric/capacities", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]FabricCapacity `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListBySubscriptionComplete retrieves all the results into a single object +func (c FabricCapacitiesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { + return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, FabricCapacityOperationPredicate{}) +} + +// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FabricCapacitiesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FabricCapacityOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { + items := make([]FabricCapacity, 0) + + resp, err := c.ListBySubscription(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListBySubscriptionCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskus.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskus.go new file mode 100644 index 00000000000..7604d561cb9 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskus.go @@ -0,0 +1,106 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSkusOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]RpSkuDetailsForNewResource +} + +type ListSkusCompleteResult struct { + LatestHttpResponse *http.Response + Items []RpSkuDetailsForNewResource +} + +type ListSkusCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListSkusCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListSkus ... +func (c FabricCapacitiesClient) ListSkus(ctx context.Context, id commonids.SubscriptionId) (result ListSkusOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListSkusCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Fabric/skus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]RpSkuDetailsForNewResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListSkusComplete retrieves all the results into a single object +func (c FabricCapacitiesClient) ListSkusComplete(ctx context.Context, id commonids.SubscriptionId) (ListSkusCompleteResult, error) { + return c.ListSkusCompleteMatchingPredicate(ctx, id, RpSkuDetailsForNewResourceOperationPredicate{}) +} + +// ListSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FabricCapacitiesClient) ListSkusCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RpSkuDetailsForNewResourceOperationPredicate) (result ListSkusCompleteResult, err error) { + items := make([]RpSkuDetailsForNewResource, 0) + + resp, err := c.ListSkus(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListSkusCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskusforcapacity.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskusforcapacity.go new file mode 100644 index 00000000000..a896be4a69a --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_listskusforcapacity.go @@ -0,0 +1,105 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListSkusForCapacityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]RpSkuDetailsForExistingResource +} + +type ListSkusForCapacityCompleteResult struct { + LatestHttpResponse *http.Response + Items []RpSkuDetailsForExistingResource +} + +type ListSkusForCapacityCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListSkusForCapacityCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListSkusForCapacity ... +func (c FabricCapacitiesClient) ListSkusForCapacity(ctx context.Context, id CapacityId) (result ListSkusForCapacityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListSkusForCapacityCustomPager{}, + Path: fmt.Sprintf("%s/skus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]RpSkuDetailsForExistingResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListSkusForCapacityComplete retrieves all the results into a single object +func (c FabricCapacitiesClient) ListSkusForCapacityComplete(ctx context.Context, id CapacityId) (ListSkusForCapacityCompleteResult, error) { + return c.ListSkusForCapacityCompleteMatchingPredicate(ctx, id, RpSkuDetailsForExistingResourceOperationPredicate{}) +} + +// ListSkusForCapacityCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FabricCapacitiesClient) ListSkusForCapacityCompleteMatchingPredicate(ctx context.Context, id CapacityId, predicate RpSkuDetailsForExistingResourceOperationPredicate) (result ListSkusForCapacityCompleteResult, err error) { + items := make([]RpSkuDetailsForExistingResource, 0) + + resp, err := c.ListSkusForCapacity(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListSkusForCapacityCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_resume.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_resume.go new file mode 100644 index 00000000000..96a20c6e161 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_resume.go @@ -0,0 +1,70 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResumeOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Resume ... +func (c FabricCapacitiesClient) Resume(ctx context.Context, id CapacityId) (result ResumeOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/resume", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ResumeThenPoll performs Resume then polls until it's completed +func (c FabricCapacitiesClient) ResumeThenPoll(ctx context.Context, id CapacityId) error { + result, err := c.Resume(ctx, id) + if err != nil { + return fmt.Errorf("performing Resume: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Resume: %+v", err) + } + + return nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_suspend.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_suspend.go new file mode 100644 index 00000000000..004e29bcb93 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_suspend.go @@ -0,0 +1,70 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SuspendOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Suspend ... +func (c FabricCapacitiesClient) Suspend(ctx context.Context, id CapacityId) (result SuspendOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/suspend", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// SuspendThenPoll performs Suspend then polls until it's completed +func (c FabricCapacitiesClient) SuspendThenPoll(ctx context.Context, id CapacityId) error { + result, err := c.Suspend(ctx, id) + if err != nil { + return fmt.Errorf("performing Suspend: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Suspend: %+v", err) + } + + return nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/method_update.go b/resource-manager/fabric/2023-11-01/fabriccapacities/method_update.go new file mode 100644 index 00000000000..4552b51b208 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/method_update.go @@ -0,0 +1,75 @@ +package fabriccapacities + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FabricCapacity +} + +// Update ... +func (c FabricCapacitiesClient) Update(ctx context.Context, id CapacityId, input FabricCapacityUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c FabricCapacitiesClient) UpdateThenPoll(ctx context.Context, id CapacityId, input FabricCapacityUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_capacityadministration.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_capacityadministration.go new file mode 100644 index 00000000000..5bd94737366 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_capacityadministration.go @@ -0,0 +1,8 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CapacityAdministration struct { + Members []string `json:"members"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityrequest.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityrequest.go new file mode 100644 index 00000000000..e5a333c98e9 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityrequest.go @@ -0,0 +1,9 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityRequest struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityresponse.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityresponse.go new file mode 100644 index 00000000000..69c97a20815 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_checknameavailabilityresponse.go @@ -0,0 +1,10 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityResponse struct { + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *CheckNameAvailabilityReason `json:"reason,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacity.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacity.go new file mode 100644 index 00000000000..6a3cd2e291b --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacity.go @@ -0,0 +1,19 @@ +package fabriccapacities + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacity struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties FabricCapacityProperties `json:"properties"` + Sku RpSku `json:"sku"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityproperties.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityproperties.go new file mode 100644 index 00000000000..86a50170003 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityproperties.go @@ -0,0 +1,10 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacityProperties struct { + Administration CapacityAdministration `json:"administration"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + State *ResourceState `json:"state,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdate.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdate.go new file mode 100644 index 00000000000..3ea754687f1 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdate.go @@ -0,0 +1,10 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacityUpdate struct { + Properties *FabricCapacityUpdateProperties `json:"properties,omitempty"` + Sku *RpSku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdateproperties.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdateproperties.go new file mode 100644 index 00000000000..7fe2afa5643 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_fabriccapacityupdateproperties.go @@ -0,0 +1,8 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacityUpdateProperties struct { + Administration *CapacityAdministration `json:"administration,omitempty"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpsku.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpsku.go new file mode 100644 index 00000000000..9ac6bf5672c --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpsku.go @@ -0,0 +1,9 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RpSku struct { + Name string `json:"name"` + Tier RpSkuTier `json:"tier"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsforexistingresource.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsforexistingresource.go new file mode 100644 index 00000000000..130356492df --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsforexistingresource.go @@ -0,0 +1,9 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RpSkuDetailsForExistingResource struct { + ResourceType string `json:"resourceType"` + Sku RpSku `json:"sku"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsfornewresource.go b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsfornewresource.go new file mode 100644 index 00000000000..147da331443 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/model_rpskudetailsfornewresource.go @@ -0,0 +1,10 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RpSkuDetailsForNewResource struct { + Locations []string `json:"locations"` + Name string `json:"name"` + ResourceType string `json:"resourceType"` +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/predicates.go b/resource-manager/fabric/2023-11-01/fabriccapacities/predicates.go new file mode 100644 index 00000000000..7f552100e83 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/predicates.go @@ -0,0 +1,63 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FabricCapacityOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p FabricCapacityOperationPredicate) Matches(input FabricCapacity) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type RpSkuDetailsForExistingResourceOperationPredicate struct { + ResourceType *string +} + +func (p RpSkuDetailsForExistingResourceOperationPredicate) Matches(input RpSkuDetailsForExistingResource) bool { + + if p.ResourceType != nil && *p.ResourceType != input.ResourceType { + return false + } + + return true +} + +type RpSkuDetailsForNewResourceOperationPredicate struct { + Name *string + ResourceType *string +} + +func (p RpSkuDetailsForNewResourceOperationPredicate) Matches(input RpSkuDetailsForNewResource) bool { + + if p.Name != nil && *p.Name != input.Name { + return false + } + + if p.ResourceType != nil && *p.ResourceType != input.ResourceType { + return false + } + + return true +} diff --git a/resource-manager/fabric/2023-11-01/fabriccapacities/version.go b/resource-manager/fabric/2023-11-01/fabriccapacities/version.go new file mode 100644 index 00000000000..9107b1143b5 --- /dev/null +++ b/resource-manager/fabric/2023-11-01/fabriccapacities/version.go @@ -0,0 +1,10 @@ +package fabriccapacities + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-11-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/fabriccapacities/2023-11-01" +} diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/README.md b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/README.md index 5fbee8f50e9..6838c7b9585 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/README.md +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers` Documentation -The `fluidrelaycontainers` SDK allows for interaction with the Azure Resource Manager Service `fluidrelay` (API Version `2022-05-26`). +The `fluidrelaycontainers` SDK allows for interaction with Azure Resource Manager `fluidrelay` (API Version `2022-05-26`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/client.go b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/client.go index 35e08773b19..7a0da793216 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/client.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/client.go @@ -15,7 +15,7 @@ type FluidRelayContainersClient struct { } func NewFluidRelayContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*FluidRelayContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluidrelaycontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluidrelaycontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluidRelayContainersClient: %+v", err) } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go index 0b7e413866b..45e85c1efcd 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelaycontainer.go @@ -44,7 +44,7 @@ func ParseFluidRelayContainerID(input string) (*FluidRelayContainerId, error) { } id := FluidRelayContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFluidRelayContainerIDInsensitively(input string) (*FluidRelayContainer } id := FluidRelayContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go index 04fd733c3c1..6cddee9a533 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/id_fluidrelayserver.go @@ -42,7 +42,7 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/method_get.go b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/method_get.go index 2fe48eb0cea..885eeb1398a 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/method_get.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/method_get.go @@ -45,7 +45,6 @@ func (c FluidRelayContainersClient) Get(ctx context.Context, id FluidRelayContai var model FluidRelayContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/version.go b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/version.go index b5d8c8f8467..e284ae9f331 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/version.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelaycontainers/version.go @@ -1,12 +1,10 @@ package fluidrelaycontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-26" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluidrelaycontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluidrelaycontainers/2022-05-26" } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/README.md b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/README.md index 8a5e0a2e9ea..b65e05d0e3d 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/README.md +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-05-26/fluidrelayservers` Documentation -The `fluidrelayservers` SDK allows for interaction with the Azure Resource Manager Service `fluidrelay` (API Version `2022-05-26`). +The `fluidrelayservers` SDK allows for interaction with Azure Resource Manager `fluidrelay` (API Version `2022-05-26`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/client.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/client.go index 5c0518ef60b..c3c98061264 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/client.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/client.go @@ -15,7 +15,7 @@ type FluidRelayServersClient struct { } func NewFluidRelayServersClientWithBaseURI(sdkApi sdkEnv.Api) (*FluidRelayServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluidrelayservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluidrelayservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluidRelayServersClient: %+v", err) } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go index 17a3074d4f8..561bf80179d 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/id_fluidrelayserver.go @@ -42,7 +42,7 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate.go index 94cf95373a4..3d440aa5f39 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c FluidRelayServersClient) CreateOrUpdate(ctx context.Context, id FluidRel var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get.go index 2807d3896a6..8b4b441e00e 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_get.go @@ -45,7 +45,6 @@ func (c FluidRelayServersClient) Get(ctx context.Context, id FluidRelayServerId) var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys.go index 3d9b3441394..f1792c4c1d5 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_getkeys.go @@ -46,7 +46,6 @@ func (c FluidRelayServersClient) GetKeys(ctx context.Context, id FluidRelayServe var model FluidRelayServerKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys.go index e18ffd033a9..295507462d3 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_listkeys.go @@ -46,7 +46,6 @@ func (c FluidRelayServersClient) ListKeys(ctx context.Context, id FluidRelayServ var model FluidRelayServerKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey.go index 572bfd1c404..1995fc3a481 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c FluidRelayServersClient) RegenerateKey(ctx context.Context, id FluidRela var model FluidRelayServerKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update.go index bb290d42c5c..784c9497a94 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/method_update.go @@ -49,7 +49,6 @@ func (c FluidRelayServersClient) Update(ctx context.Context, id FluidRelayServer var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/version.go b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/version.go index 7664a0458cc..02430b0c5a2 100644 --- a/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/version.go +++ b/resource-manager/fluidrelay/2022-05-26/fluidrelayservers/version.go @@ -1,12 +1,10 @@ package fluidrelayservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-26" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluidrelayservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluidrelayservers/2022-05-26" } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/README.md b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/README.md index c61e691b562..fe979f1842e 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/README.md +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers` Documentation -The `fluidrelaycontainers` SDK allows for interaction with the Azure Resource Manager Service `fluidrelay` (API Version `2022-06-01`). +The `fluidrelaycontainers` SDK allows for interaction with Azure Resource Manager `fluidrelay` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/client.go b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/client.go index 35e08773b19..7a0da793216 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/client.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/client.go @@ -15,7 +15,7 @@ type FluidRelayContainersClient struct { } func NewFluidRelayContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*FluidRelayContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluidrelaycontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluidrelaycontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluidRelayContainersClient: %+v", err) } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelaycontainer.go b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelaycontainer.go index 0b7e413866b..45e85c1efcd 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelaycontainer.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelaycontainer.go @@ -44,7 +44,7 @@ func ParseFluidRelayContainerID(input string) (*FluidRelayContainerId, error) { } id := FluidRelayContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFluidRelayContainerIDInsensitively(input string) (*FluidRelayContainer } id := FluidRelayContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelayserver.go b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelayserver.go index 04fd733c3c1..6cddee9a533 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelayserver.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/id_fluidrelayserver.go @@ -42,7 +42,7 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/method_get.go b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/method_get.go index 2fe48eb0cea..885eeb1398a 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/method_get.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/method_get.go @@ -45,7 +45,6 @@ func (c FluidRelayContainersClient) Get(ctx context.Context, id FluidRelayContai var model FluidRelayContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/version.go b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/version.go index 84108e81625..c954db66377 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/version.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelaycontainers/version.go @@ -1,12 +1,10 @@ package fluidrelaycontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluidrelaycontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluidrelaycontainers/2022-06-01" } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/README.md b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/README.md index 615412bcd99..906aa7945ce 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/README.md +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/fluidrelay/2022-06-01/fluidrelayservers` Documentation -The `fluidrelayservers` SDK allows for interaction with the Azure Resource Manager Service `fluidrelay` (API Version `2022-06-01`). +The `fluidrelayservers` SDK allows for interaction with Azure Resource Manager `fluidrelay` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/client.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/client.go index 5c0518ef60b..c3c98061264 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/client.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/client.go @@ -15,7 +15,7 @@ type FluidRelayServersClient struct { } func NewFluidRelayServersClientWithBaseURI(sdkApi sdkEnv.Api) (*FluidRelayServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluidrelayservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluidrelayservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluidRelayServersClient: %+v", err) } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/id_fluidrelayserver.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/id_fluidrelayserver.go index 17a3074d4f8..561bf80179d 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/id_fluidrelayserver.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/id_fluidrelayserver.go @@ -42,7 +42,7 @@ func ParseFluidRelayServerID(input string) (*FluidRelayServerId, error) { } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFluidRelayServerIDInsensitively(input string) (*FluidRelayServerId, er } id := FluidRelayServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_createorupdate.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_createorupdate.go index 94cf95373a4..3d440aa5f39 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_createorupdate.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c FluidRelayServersClient) CreateOrUpdate(ctx context.Context, id FluidRel var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_get.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_get.go index 2807d3896a6..8b4b441e00e 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_get.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_get.go @@ -45,7 +45,6 @@ func (c FluidRelayServersClient) Get(ctx context.Context, id FluidRelayServerId) var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_listkeys.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_listkeys.go index e18ffd033a9..295507462d3 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_listkeys.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_listkeys.go @@ -46,7 +46,6 @@ func (c FluidRelayServersClient) ListKeys(ctx context.Context, id FluidRelayServ var model FluidRelayServerKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_regeneratekey.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_regeneratekey.go index 572bfd1c404..1995fc3a481 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_regeneratekey.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c FluidRelayServersClient) RegenerateKey(ctx context.Context, id FluidRela var model FluidRelayServerKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_update.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_update.go index bb290d42c5c..784c9497a94 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_update.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/method_update.go @@ -49,7 +49,6 @@ func (c FluidRelayServersClient) Update(ctx context.Context, id FluidRelayServer var model FluidRelayServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/version.go b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/version.go index 7e683e9e118..76631a0cd13 100644 --- a/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/version.go +++ b/resource-manager/fluidrelay/2022-06-01/fluidrelayservers/version.go @@ -1,12 +1,10 @@ package fluidrelayservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluidrelayservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluidrelayservers/2022-06-01" } diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/README.md b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/README.md index e0237f5e374..ba362f7bd44 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/README.md +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability` Documentation -The `checkfrontdoornameavailability` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-04-01`). +The `checkfrontdoornameavailability` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/constants.go b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/constants.go index 6968786e341..3159288e234 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/constants.go +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/constants.go @@ -1,6 +1,8 @@ package checkfrontdoornameavailability -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/version.go b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/version.go index e92719d2dc6..8296aa5d446 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/version.go +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailability/version.go @@ -1,12 +1,10 @@ package checkfrontdoornameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkfrontdoornameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkfrontdoornameavailability/2020-04-01" } diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/README.md b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/README.md index 37005c449a8..6c3b1aa91c2 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/README.md +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription` Documentation -The `checkfrontdoornameavailabilitywithsubscription` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-04-01`). +The `checkfrontdoornameavailabilitywithsubscription` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/constants.go b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/constants.go index 0020c88cf60..39411b27b4c 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/constants.go +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/constants.go @@ -1,6 +1,8 @@ package checkfrontdoornameavailabilitywithsubscription -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/version.go b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/version.go index b37f0e22b95..aa21b038735 100644 --- a/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/version.go +++ b/resource-manager/frontdoor/2020-04-01/checkfrontdoornameavailabilitywithsubscription/version.go @@ -1,12 +1,10 @@ package checkfrontdoornameavailabilitywithsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkfrontdoornameavailabilitywithsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkfrontdoornameavailabilitywithsubscription/2020-04-01" } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/README.md b/resource-manager/frontdoor/2020-04-01/frontdoors/README.md index 855c580c1ec..1835d5e6d94 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/README.md +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/frontdoors` Documentation -The `frontdoors` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-04-01`). +The `frontdoors` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/constants.go b/resource-manager/frontdoor/2020-04-01/frontdoors/constants.go index 0e93ac2ded1..4d789b0851d 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/constants.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/constants.go @@ -1,6 +1,8 @@ package frontdoors -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontdoor.go b/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontdoor.go index 7124ad8cffe..14d43e0794e 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontdoor.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontdoor.go @@ -42,7 +42,7 @@ func ParseFrontDoorID(input string) (*FrontDoorId, error) { } id := FrontDoorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFrontDoorIDInsensitively(input string) (*FrontDoorId, error) { } id := FrontDoorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontendendpoint.go b/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontendendpoint.go index 0568a0297a9..1b3a2182e31 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontendendpoint.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/id_frontendendpoint.go @@ -44,7 +44,7 @@ func ParseFrontendEndpointID(input string) (*FrontendEndpointId, error) { } id := FrontendEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendEndpointIDInsensitively(input string) (*FrontendEndpointId, er } id := FrontendEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/id_rulesengine.go b/resource-manager/frontdoor/2020-04-01/frontdoors/id_rulesengine.go index 5018c2ef3b8..66f6f254fd1 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/id_rulesengine.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/id_rulesengine.go @@ -44,7 +44,7 @@ func ParseRulesEngineID(input string) (*RulesEngineId, error) { } id := RulesEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRulesEngineIDInsensitively(input string) (*RulesEngineId, error) { } id := RulesEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/model_forwardingconfiguration.go b/resource-manager/frontdoor/2020-04-01/frontdoors/model_forwardingconfiguration.go index 858e6e8fc0d..f4670fbfb75 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/model_forwardingconfiguration.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/model_forwardingconfiguration.go @@ -17,6 +17,14 @@ type ForwardingConfiguration struct { ForwardingProtocol *FrontDoorForwardingProtocol `json:"forwardingProtocol,omitempty"` // Fields inherited from RouteConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ForwardingConfiguration) RouteConfiguration() BaseRouteConfigurationImpl { + return BaseRouteConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ForwardingConfiguration{} @@ -30,9 +38,10 @@ func (s ForwardingConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ForwardingConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/model_redirectconfiguration.go b/resource-manager/frontdoor/2020-04-01/frontdoors/model_redirectconfiguration.go index 78e9991c020..8d3f96b336a 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/model_redirectconfiguration.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/model_redirectconfiguration.go @@ -19,6 +19,14 @@ type RedirectConfiguration struct { RedirectType *FrontDoorRedirectType `json:"redirectType,omitempty"` // Fields inherited from RouteConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s RedirectConfiguration) RouteConfiguration() BaseRouteConfigurationImpl { + return BaseRouteConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RedirectConfiguration{} @@ -32,9 +40,10 @@ func (s RedirectConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RedirectConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/model_routeconfiguration.go b/resource-manager/frontdoor/2020-04-01/frontdoors/model_routeconfiguration.go index b619f913755..a225d298cdd 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/model_routeconfiguration.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/model_routeconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RouteConfiguration interface { + RouteConfiguration() BaseRouteConfigurationImpl } -// RawRouteConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RouteConfiguration = BaseRouteConfigurationImpl{} + +type BaseRouteConfigurationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseRouteConfigurationImpl) RouteConfiguration() BaseRouteConfigurationImpl { + return s +} + +var _ RouteConfiguration = RawRouteConfigurationImpl{} + +// RawRouteConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRouteConfigurationImpl struct { - Type string - Values map[string]interface{} + routeConfiguration BaseRouteConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawRouteConfigurationImpl) RouteConfiguration() BaseRouteConfigurationImpl { + return s.routeConfiguration } -func unmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration, error) { +func UnmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration return out, nil } - out := RawRouteConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseRouteConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRouteConfigurationImpl: %+v", err) } - return out, nil + + return RawRouteConfigurationImpl{ + routeConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/model_routingruleproperties.go b/resource-manager/frontdoor/2020-04-01/frontdoors/model_routingruleproperties.go index cd1c1e3ef45..0a988a20ea3 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/model_routingruleproperties.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/model_routingruleproperties.go @@ -42,7 +42,7 @@ func (s *RoutingRuleProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["routeConfiguration"]; ok { - impl, err := unmarshalRouteConfigurationImplementation(v) + impl, err := UnmarshalRouteConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RouteConfiguration' for 'RoutingRuleProperties': %+v", err) } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/model_rulesengineaction.go b/resource-manager/frontdoor/2020-04-01/frontdoors/model_rulesengineaction.go index 382ac7083fc..b360f1e5b46 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/model_rulesengineaction.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/model_rulesengineaction.go @@ -32,7 +32,7 @@ func (s *RulesEngineAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["routeConfigurationOverride"]; ok { - impl, err := unmarshalRouteConfigurationImplementation(v) + impl, err := UnmarshalRouteConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RouteConfigurationOverride' for 'RulesEngineAction': %+v", err) } diff --git a/resource-manager/frontdoor/2020-04-01/frontdoors/version.go b/resource-manager/frontdoor/2020-04-01/frontdoors/version.go index 57f74e096a4..5c16922b4fc 100644 --- a/resource-manager/frontdoor/2020-04-01/frontdoors/version.go +++ b/resource-manager/frontdoor/2020-04-01/frontdoors/version.go @@ -1,12 +1,10 @@ package frontdoors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/frontdoors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/frontdoors/2020-04-01" } diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/README.md b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/README.md index 6074ee5690a..61cf8e9fa95 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/README.md +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets` Documentation -The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-04-01`). +The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/constants.go b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/constants.go index 1c8e7db9f3e..121e2967cb1 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/constants.go +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallmanagedrulesets -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/version.go b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/version.go index da0adfb67f5..14e48d5b131 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/version.go +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallmanagedrulesets/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallmanagedrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/2020-04-01" } diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/README.md b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/README.md index f1417863430..283c844a0c9 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-04-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/constants.go b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/constants.go index 8d9e4d21121..24816afee99 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/constants.go +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go index 1276a607721..5a18d1a146e 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyID(input string) (*FrontDoorWebAp } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively(input string) (*F } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/version.go b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/version.go index c984baf093a..0b32e637517 100644 --- a/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/frontdoor/2020-04-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2020-04-01" } diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/README.md b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/README.md index 3e8772f348f..c4d551eb42a 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/README.md +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability` Documentation -The `checkfrontdoornameavailability` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-05-01`). +The `checkfrontdoornameavailability` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/constants.go b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/constants.go index 6968786e341..3159288e234 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/constants.go +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/constants.go @@ -1,6 +1,8 @@ package checkfrontdoornameavailability -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/version.go b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/version.go index dec44884d8d..2d27adebbd7 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/version.go +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailability/version.go @@ -1,12 +1,10 @@ package checkfrontdoornameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkfrontdoornameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkfrontdoornameavailability/2020-05-01" } diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/README.md b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/README.md index 0eeebd94388..68b6c914e5b 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/README.md +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription` Documentation -The `checkfrontdoornameavailabilitywithsubscription` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-05-01`). +The `checkfrontdoornameavailabilitywithsubscription` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/constants.go b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/constants.go index 0020c88cf60..39411b27b4c 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/constants.go +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/constants.go @@ -1,6 +1,8 @@ package checkfrontdoornameavailabilitywithsubscription -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/version.go b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/version.go index 155e6ae524f..81661352171 100644 --- a/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/version.go +++ b/resource-manager/frontdoor/2020-05-01/checkfrontdoornameavailabilitywithsubscription/version.go @@ -1,12 +1,10 @@ package checkfrontdoornameavailabilitywithsubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkfrontdoornameavailabilitywithsubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkfrontdoornameavailabilitywithsubscription/2020-05-01" } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/README.md b/resource-manager/frontdoor/2020-05-01/frontdoors/README.md index 0e3913668d6..a3c1ecd91e1 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/README.md +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2020-05-01/frontdoors` Documentation -The `frontdoors` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2020-05-01`). +The `frontdoors` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/constants.go b/resource-manager/frontdoor/2020-05-01/frontdoors/constants.go index 0e93ac2ded1..4d789b0851d 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/constants.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/constants.go @@ -1,6 +1,8 @@ package frontdoors -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go b/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go index 7124ad8cffe..14d43e0794e 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontdoor.go @@ -42,7 +42,7 @@ func ParseFrontDoorID(input string) (*FrontDoorId, error) { } id := FrontDoorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFrontDoorIDInsensitively(input string) (*FrontDoorId, error) { } id := FrontDoorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go b/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go index 0568a0297a9..1b3a2182e31 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/id_frontendendpoint.go @@ -44,7 +44,7 @@ func ParseFrontendEndpointID(input string) (*FrontendEndpointId, error) { } id := FrontendEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendEndpointIDInsensitively(input string) (*FrontendEndpointId, er } id := FrontendEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go b/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go index 5018c2ef3b8..66f6f254fd1 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/id_rulesengine.go @@ -44,7 +44,7 @@ func ParseRulesEngineID(input string) (*RulesEngineId, error) { } id := RulesEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRulesEngineIDInsensitively(input string) (*RulesEngineId, error) { } id := RulesEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/model_forwardingconfiguration.go b/resource-manager/frontdoor/2020-05-01/frontdoors/model_forwardingconfiguration.go index 858e6e8fc0d..f4670fbfb75 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/model_forwardingconfiguration.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/model_forwardingconfiguration.go @@ -17,6 +17,14 @@ type ForwardingConfiguration struct { ForwardingProtocol *FrontDoorForwardingProtocol `json:"forwardingProtocol,omitempty"` // Fields inherited from RouteConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ForwardingConfiguration) RouteConfiguration() BaseRouteConfigurationImpl { + return BaseRouteConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ForwardingConfiguration{} @@ -30,9 +38,10 @@ func (s ForwardingConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ForwardingConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/model_redirectconfiguration.go b/resource-manager/frontdoor/2020-05-01/frontdoors/model_redirectconfiguration.go index 78e9991c020..8d3f96b336a 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/model_redirectconfiguration.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/model_redirectconfiguration.go @@ -19,6 +19,14 @@ type RedirectConfiguration struct { RedirectType *FrontDoorRedirectType `json:"redirectType,omitempty"` // Fields inherited from RouteConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s RedirectConfiguration) RouteConfiguration() BaseRouteConfigurationImpl { + return BaseRouteConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RedirectConfiguration{} @@ -32,9 +40,10 @@ func (s RedirectConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RedirectConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/model_routeconfiguration.go b/resource-manager/frontdoor/2020-05-01/frontdoors/model_routeconfiguration.go index b619f913755..a225d298cdd 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/model_routeconfiguration.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/model_routeconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RouteConfiguration interface { + RouteConfiguration() BaseRouteConfigurationImpl } -// RawRouteConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RouteConfiguration = BaseRouteConfigurationImpl{} + +type BaseRouteConfigurationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseRouteConfigurationImpl) RouteConfiguration() BaseRouteConfigurationImpl { + return s +} + +var _ RouteConfiguration = RawRouteConfigurationImpl{} + +// RawRouteConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRouteConfigurationImpl struct { - Type string - Values map[string]interface{} + routeConfiguration BaseRouteConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawRouteConfigurationImpl) RouteConfiguration() BaseRouteConfigurationImpl { + return s.routeConfiguration } -func unmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration, error) { +func UnmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRouteConfigurationImplementation(input []byte) (RouteConfiguration return out, nil } - out := RawRouteConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseRouteConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRouteConfigurationImpl: %+v", err) } - return out, nil + + return RawRouteConfigurationImpl{ + routeConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/model_routingruleproperties.go b/resource-manager/frontdoor/2020-05-01/frontdoors/model_routingruleproperties.go index cd1c1e3ef45..0a988a20ea3 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/model_routingruleproperties.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/model_routingruleproperties.go @@ -42,7 +42,7 @@ func (s *RoutingRuleProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["routeConfiguration"]; ok { - impl, err := unmarshalRouteConfigurationImplementation(v) + impl, err := UnmarshalRouteConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RouteConfiguration' for 'RoutingRuleProperties': %+v", err) } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/model_rulesengineaction.go b/resource-manager/frontdoor/2020-05-01/frontdoors/model_rulesengineaction.go index 382ac7083fc..b360f1e5b46 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/model_rulesengineaction.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/model_rulesengineaction.go @@ -32,7 +32,7 @@ func (s *RulesEngineAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["routeConfigurationOverride"]; ok { - impl, err := unmarshalRouteConfigurationImplementation(v) + impl, err := UnmarshalRouteConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RouteConfigurationOverride' for 'RulesEngineAction': %+v", err) } diff --git a/resource-manager/frontdoor/2020-05-01/frontdoors/version.go b/resource-manager/frontdoor/2020-05-01/frontdoors/version.go index 5d48a1072d2..e1089a31534 100644 --- a/resource-manager/frontdoor/2020-05-01/frontdoors/version.go +++ b/resource-manager/frontdoor/2020-05-01/frontdoors/version.go @@ -1,12 +1,10 @@ package frontdoors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/frontdoors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/frontdoors/2020-05-01" } diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/README.md b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/README.md index 6fb66ed4ceb..a271c2de018 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/README.md +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets` Documentation -The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2022-05-01`). +The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/constants.go b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/constants.go index 4b78334c991..e43ab93403d 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/constants.go +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallmanagedrulesets -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/version.go b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/version.go index 71ee6c0d8d4..36226c99802 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/version.go +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallmanagedrulesets/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallmanagedrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/2022-05-01" } diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/README.md b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/README.md index 008b755bcd1..2a5148865e9 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2022-05-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/constants.go b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/constants.go index 52f0974b45d..1b70eee7abe 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/constants.go +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go index 1276a607721..5a18d1a146e 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyID(input string) (*FrontDoorWebAp } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively(input string) (*F } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/version.go b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/version.go index a315e2ef3b6..092be55384e 100644 --- a/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/frontdoor/2022-05-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2022-05-01" } diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/README.md b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/README.md index ca209b80813..a97262c1344 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/README.md +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets` Documentation -The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2024-02-01`). +The `webapplicationfirewallmanagedrulesets` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go index bf4ab3205a2..567ac5a8ec8 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallmanagedrulesets -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/version.go b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/version.go index 94ea0bf2410..c3fbae2b75a 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/version.go +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallmanagedrulesets/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallmanagedrulesets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallmanagedrulesets/2024-02-01" } diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/README.md b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/README.md index 61f7d55a652..6754f1a037a 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `frontdoor` (API Version `2024-02-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `frontdoor` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/constants.go b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/constants.go index ab40adf65fe..ec1929c53ba 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/constants.go +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/constants.go @@ -1,6 +1,8 @@ package webapplicationfirewallpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go index 1276a607721..5a18d1a146e 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/id_frontdoorwebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyID(input string) (*FrontDoorWebAp } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFrontDoorWebApplicationFirewallPolicyIDInsensitively(input string) (*F } id := FrontDoorWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/version.go b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/version.go index 5d963580553..be660aa7600 100644 --- a/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/frontdoor/2024-02-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2024-02-01" } diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/README.md b/resource-manager/graphservices/2023-04-13/graphservicesprods/README.md index d53385fa183..42238db47cf 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/README.md +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/graphservices/2023-04-13/graphservicesprods` Documentation -The `graphservicesprods` SDK allows for interaction with the Azure Resource Manager Service `graphservices` (API Version `2023-04-13`). +The `graphservicesprods` SDK allows for interaction with Azure Resource Manager `graphservices` (API Version `2023-04-13`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/client.go b/resource-manager/graphservices/2023-04-13/graphservicesprods/client.go index 3be0f9ce027..74ee0cc84aa 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/client.go +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/client.go @@ -15,7 +15,7 @@ type GraphservicesprodsClient struct { } func NewGraphservicesprodsClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphservicesprodsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphservicesprods", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphservicesprods", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphservicesprodsClient: %+v", err) } diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go b/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go index 8dd8feafd07..74891419ada 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsget.go b/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsget.go index 63e7e46d9a3..076941f519e 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsget.go +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsget.go @@ -45,7 +45,6 @@ func (c GraphservicesprodsClient) AccountsGet(ctx context.Context, id AccountId) var model AccountResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsupdate.go b/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsupdate.go index fa07b586506..6a4b96d5c16 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsupdate.go +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/method_accountsupdate.go @@ -49,7 +49,6 @@ func (c GraphservicesprodsClient) AccountsUpdate(ctx context.Context, id Account var model AccountResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/graphservices/2023-04-13/graphservicesprods/version.go b/resource-manager/graphservices/2023-04-13/graphservicesprods/version.go index dfc7690c7e0..5ad844fd325 100644 --- a/resource-manager/graphservices/2023-04-13/graphservicesprods/version.go +++ b/resource-manager/graphservices/2023-04-13/graphservicesprods/version.go @@ -1,12 +1,10 @@ package graphservicesprods -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-13" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphservicesprods/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphservicesprods/2023-04-13" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/README.md index 373b1f92418..861b74c4425 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports` Documentation -The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/client.go index 91f43f36ce4..5bce9346d75 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentHCRPReportsClient struct { } func NewGuestConfigurationAssignmentHCRPReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentHCRPReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentHCRPReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignment.go index 20a67c313ad..957cf444010 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_report.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_report.go index 7452d2dda29..e8f86e59aa0 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_report.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go index 7fc564723cc..983c6434241 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go index 4d15cf68b79..df8026fe44d 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/version.go index 5cecadacd68..32e9c44e259 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmenthcrpreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmenthcrpreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/README.md index dc809212b92..76eb19c42aa 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports` Documentation -The `guestconfigurationassignmentreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationassignmentreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/client.go index 0025480f70f..d32e2b3553b 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentReportsClient struct { } func NewGuestConfigurationAssignmentReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_guestconfigurationassignmentreport.go index 3db7104ce8d..0fc46d9bfc1 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseGuestConfigurationAssignmentReportID(input string) (*GuestConfiguratio } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGuestConfigurationAssignmentReportIDInsensitively(input string) (*Gues } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignment.go index d0c2f564618..2183152d824 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_get.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_get.go index d92bdb532b5..c0f8ba9510c 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_get.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentReportsClient) Get(ctx context.Context, id G var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_list.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_list.go index fe48b273127..2d1947df7cb 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_list.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentReportsClient) List(ctx context.Context, id var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/version.go index 4b8e79463c2..44c11853ba3 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignmentreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmentreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmentreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmentreports/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/README.md index cedf7cd69d6..c15b73b80ca 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments` Documentation -The `guestconfigurationassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/client.go index 11ae9380924..8989493663d 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentsClient struct { } func NewGuestConfigurationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go index eb4fb012dcf..5e6aae0e14d 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go index 51867167019..58e219b2bfb 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_createorupdate.go index 63386004c3a..1acb26da730 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationAssignmentsClient) CreateOrUpdate(ctx context.Context, var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_get.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_get.go index 57dab0fd3c9..e384e2b15e8 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_get.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentsClient) Get(ctx context.Context, id Provide var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_list.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_list.go index 0eeeea6d1c9..5d810e462cb 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_list.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) List(ctx context.Context, id Virtua var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_rglist.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_rglist.go index 7ad15ef21c4..72091aaca58 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_rglist.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_rglist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) RGList(ctx context.Context, id comm var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_subscriptionlist.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_subscriptionlist.go index 79d697751d4..cd434739d99 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_subscriptionlist.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/method_subscriptionlist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) SubscriptionList(ctx context.Contex var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/version.go index 6c08c30d982..17fc56b9fc0 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignments/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/README.md index 0e4eb8e11d8..dec24d23631 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments` Documentation -The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/client.go index 797f1a15f59..d8bce5ab6c5 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go index c2d6658e421..e83894db85a 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go @@ -42,7 +42,7 @@ func ParseProviderVirtualMachineID(input string) (*ProviderVirtualMachineId, err } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderVirtualMachineIDInsensitively(input string) (*ProviderVirtualM } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_virtualmachineproviders2guestconfigurationassignment.go index df27293ce7e..a10ca0c4188 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go index 877eca8dc9b..dbd7c120a7d 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) CreateOrUpdat var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go index 95a9dbc0e8a..d319a814c1d 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) Get(ctx conte var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go index a22802bbd1f..54ee48e5511 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) List(ctx cont var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/version.go index 84213a1ab87..a4bf6838753 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md index 18954bfb468..22bfc9a1320 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports` Documentation -The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go index fd48643fc04..a1aeefffcae 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providers2guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providers2guestconfigurationassignmentreport.go index 9bad4039fcd..fd40fcb06bc 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providers2guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providers2guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseProviders2GuestConfigurationAssignmentReportID(input string) (*Provide } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviders2GuestConfigurationAssignmentReportIDInsensitively(input stri } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignment.go index d0883d87b6e..e822364d5fd 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go index e94f8dc1346..123709832ff 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) Get(ct var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go index 081b16068bd..fd8c6400cc8 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) List(c var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go index b32f14823e6..4962f9a91bc 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignmentsreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/README.md b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/README.md index f2107f8bd0a..c31993c21ec 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/README.md +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments` Documentation -The `guestconfigurationhcrpassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2020-06-25`). +The `guestconfigurationhcrpassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2020-06-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/client.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/client.go index 7513652b8f7..0e9ee5d98f6 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/client.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationHCRPAssignmentsClient struct { } func NewGuestConfigurationHCRPAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationHCRPAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationHCRPAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_guestconfigurationassignment.go index 643fb59e3a2..8b23b7398bd 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_machine.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_machine.go index c377f035cb0..da8011571f7 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_machine.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_createorupdate.go index 96f306e73aa..7256b3000ee 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) CreateOrUpdate(ctx context.Cont var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_get.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_get.go index c9134011d51..1f2c059a93a 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_get.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) Get(ctx context.Context, id Gue var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_list.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_list.go index 240c97295d3..833c3d66f7a 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_list.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) List(ctx context.Context, id Ma var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/version.go b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/version.go index 65f6ec2d959..5e567d89e8b 100644 --- a/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/version.go +++ b/resource-manager/guestconfiguration/2020-06-25/guestconfigurationhcrpassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationhcrpassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/2020-06-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/README.md index ad79454ad79..1ea0181f516 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports` Documentation -The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/client.go index 91f43f36ce4..5bce9346d75 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentHCRPReportsClient struct { } func NewGuestConfigurationAssignmentHCRPReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentHCRPReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentHCRPReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go index a3b513f29bd..c3a64b6c421 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseGuestConfigurationAssignmentReportID(input string) (*GuestConfiguratio } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGuestConfigurationAssignmentReportIDInsensitively(input string) (*Gues } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go index 8f26ca74c87..d294a9e41f3 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go index 318cc1bd5e5..217fc1a616a 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go index 68ff0b77087..95107b6135f 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/version.go index d79154770c2..e099227e379 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmenthcrpreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmenthcrpreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/README.md index 41d145943a3..4db88ba83db 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports` Documentation -The `guestconfigurationassignmentreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationassignmentreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/client.go index 0025480f70f..d32e2b3553b 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentReportsClient struct { } func NewGuestConfigurationAssignmentReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_guestconfigurationassignment.go index 243e52b74bb..9ed190b67ff 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go index 2e39369429f..462375ff6ce 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseProviders2GuestConfigurationAssignmentReportID(input string) (*Provide } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviders2GuestConfigurationAssignmentReportIDInsensitively(input stri } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_report.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_report.go index ad0b8ec9721..eccfc8b4444 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_report.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go index d118cc246a8..9179cc82a55 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_get.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_get.go index 677c53def2b..9d5ce0c38ee 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_get.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentReportsClient) Get(ctx context.Context, id P var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_list.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_list.go index 2d54eea7dff..16d632a02bf 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_list.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentReportsClient) List(ctx context.Context, id var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmssget.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmssget.go index 563c88f9866..d14947a5f29 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmssget.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmssget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentReportsClient) VMSSGet(ctx context.Context, var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmsslist.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmsslist.go index fe0a73ce95e..57c56ef3fa0 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmsslist.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/method_vmsslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentReportsClient) VMSSList(ctx context.Context, var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/version.go index feee0494639..4bec69fdbb9 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignmentreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmentreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmentreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmentreports/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/README.md index b0d32786c7f..13323a180d3 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments` Documentation -The `guestconfigurationassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/client.go index 11ae9380924..8989493663d 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentsClient struct { } func NewGuestConfigurationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_guestconfigurationassignment.go index 3874ee706cc..ce3f1222708 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachine.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachine.go index 51867167019..58e219b2bfb 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachine.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go index 26eca967cf1..6c955a0ecdf 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachinescaleset.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachinescaleset.go index 2b4666a3e5d..06f8ba4992b 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachinescaleset.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_createorupdate.go index 08d6ad2c040..ac85c607699 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationAssignmentsClient) CreateOrUpdate(ctx context.Context, var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_get.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_get.go index 0b7e9581f96..12093b88648 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_get.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentsClient) Get(ctx context.Context, id Virtual var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_list.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_list.go index 0eeeea6d1c9..5d810e462cb 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_list.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) List(ctx context.Context, id Virtua var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_rglist.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_rglist.go index 7ad15ef21c4..72091aaca58 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_rglist.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_rglist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) RGList(ctx context.Context, id comm var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_subscriptionlist.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_subscriptionlist.go index 79d697751d4..cd434739d99 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_subscriptionlist.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_subscriptionlist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) SubscriptionList(ctx context.Contex var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsscreateorupdate.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsscreateorupdate.go index 4847edf8ad9..6d38abb8733 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsscreateorupdate.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsscreateorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSCreateOrUpdate(ctx context.Cont var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssdelete.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssdelete.go index 05ca4ea94eb..c8a05c86a43 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssdelete.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssdelete.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSDelete(ctx context.Context, id var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssget.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssget.go index 29a0ae1c5a1..584142512d4 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssget.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmssget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSGet(ctx context.Context, id Gue var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsslist.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsslist.go index 392e8eb516f..b9deace541b 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsslist.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/method_vmsslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSList(ctx context.Context, id Vi var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/version.go index a1f745e5b22..e4dc5896091 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignments/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/README.md index e1fae8982ef..2e69b6a32a2 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments` Documentation -The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/client.go index 797f1a15f59..d8bce5ab6c5 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go index c2d6658e421..e83894db85a 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go @@ -42,7 +42,7 @@ func ParseProviderVirtualMachineID(input string) (*ProviderVirtualMachineId, err } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderVirtualMachineIDInsensitively(input string) (*ProviderVirtualM } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go index 8a52b339989..c6f165ea935 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentID(input s } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentIDInsensit } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go index d5398ddcd52..e8a4256d986 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) CreateOrUpdat var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go index f6f81f30399..24ff47bc825 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) Get(ctx conte var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go index a22802bbd1f..54ee48e5511 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) List(ctx cont var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/version.go index df396d1f8a4..5d37ec9eb27 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md index a1ad2eb356d..63927d792b4 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports` Documentation -The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go index fd48643fc04..a1aeefffcae 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go index d0147b37626..c77b2df219d 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentID(input s } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentIDInsensit } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go index 0cc761d283a..4d57e507da6 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentReportID(input str } id := VirtualMachineProviders2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentReportIDInsensitiv } id := VirtualMachineProviders2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go index f58a91aec33..5683ceedcc6 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) Get(ct var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go index 1f6f6501ad4..54c0864d981 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) List(c var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go index b271980ab39..f56e8f39514 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignmentsreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/README.md b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/README.md index 41a87cf9e2f..4e5a9fbe296 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/README.md +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments` Documentation -The `guestconfigurationhcrpassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2022-01-25`). +The `guestconfigurationhcrpassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2022-01-25`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/client.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/client.go index 7513652b8f7..0e9ee5d98f6 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/client.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationHCRPAssignmentsClient struct { } func NewGuestConfigurationHCRPAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationHCRPAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationHCRPAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_machine.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_machine.go index c377f035cb0..da8011571f7 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_machine.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go index 1ba652702c6..b5c958d61ad 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_createorupdate.go index 47b26dffbe2..67e3927e63e 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) CreateOrUpdate(ctx context.Cont var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_get.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_get.go index a130d3741a3..9b0aa8f8196 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_get.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) Get(ctx context.Context, id Pro var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_list.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_list.go index 240c97295d3..833c3d66f7a 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_list.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) List(ctx context.Context, id Ma var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/version.go b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/version.go index c41b58bef69..95b0c9d612c 100644 --- a/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/version.go +++ b/resource-manager/guestconfiguration/2022-01-25/guestconfigurationhcrpassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationhcrpassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-25" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/2022-01-25" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/README.md index 40b4faa54e3..be058846632 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports` Documentation -The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationassignmenthcrpreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/client.go index 91f43f36ce4..5bce9346d75 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentHCRPReportsClient struct { } func NewGuestConfigurationAssignmentHCRPReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentHCRPReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmenthcrpreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentHCRPReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go index a3b513f29bd..c3a64b6c421 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseGuestConfigurationAssignmentReportID(input string) (*GuestConfiguratio } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGuestConfigurationAssignmentReportIDInsensitively(input string) (*Gues } id := GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go index 8f26ca74c87..d294a9e41f3 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go index 318cc1bd5e5..217fc1a616a 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportsget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go index 68ff0b77087..95107b6135f 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/method_guestconfigurationhcrpassignmentreportslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentHCRPReportsClient) GuestConfigurationHCRPAss var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/version.go index 950331bac64..01eb832b1e5 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmenthcrpreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmenthcrpreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmenthcrpreports/2024-04-05" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/README.md index 073a9493f9c..f8fb67967de 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports` Documentation -The `guestconfigurationassignmentreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationassignmentreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/client.go index 0025480f70f..d32e2b3553b 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentReportsClient struct { } func NewGuestConfigurationAssignmentReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignmentreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_guestconfigurationassignment.go index 243e52b74bb..9ed190b67ff 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go index 2e39369429f..462375ff6ce 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_providers2guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseProviders2GuestConfigurationAssignmentReportID(input string) (*Provide } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProviders2GuestConfigurationAssignmentReportIDInsensitively(input stri } id := Providers2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_report.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_report.go index ad0b8ec9721..eccfc8b4444 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_report.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_report.go @@ -46,7 +46,7 @@ func ParseReportID(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReportIDInsensitively(input string) (*ReportId, error) { } id := ReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go index d118cc246a8..9179cc82a55 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_get.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_get.go index 677c53def2b..9d5ce0c38ee 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_get.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentReportsClient) Get(ctx context.Context, id P var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_list.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_list.go index 2d54eea7dff..16d632a02bf 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_list.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentReportsClient) List(ctx context.Context, id var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmssget.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmssget.go index 563c88f9866..d14947a5f29 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmssget.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmssget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentReportsClient) VMSSGet(ctx context.Context, var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmsslist.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmsslist.go index fe0a73ce95e..57c56ef3fa0 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmsslist.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/method_vmsslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentReportsClient) VMSSList(ctx context.Context, var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/version.go index 781af35426d..fead46f65df 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignmentreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignmentreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignmentreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignmentreports/2024-04-05" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/README.md index d1298340337..f3a34a87f08 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments` Documentation -The `guestconfigurationassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/client.go index 11ae9380924..8989493663d 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationAssignmentsClient struct { } func NewGuestConfigurationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_guestconfigurationassignment.go index 3874ee706cc..ce3f1222708 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseGuestConfigurationAssignmentID(input string) (*GuestConfigurationAssig } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGuestConfigurationAssignmentIDInsensitively(input string) (*GuestConfi } id := GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachine.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachine.go index 51867167019..58e219b2bfb 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachine.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go index 26eca967cf1..6c955a0ecdf 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentID(input string) ( } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentIDInsensitively(in } id := VirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachinescaleset.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachinescaleset.go index 2b4666a3e5d..06f8ba4992b 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachinescaleset.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_createorupdate.go index 08d6ad2c040..ac85c607699 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationAssignmentsClient) CreateOrUpdate(ctx context.Context, var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_get.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_get.go index 0b7e9581f96..12093b88648 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_get.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentsClient) Get(ctx context.Context, id Virtual var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_list.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_list.go index 0eeeea6d1c9..5d810e462cb 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_list.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) List(ctx context.Context, id Virtua var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_rglist.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_rglist.go index 7ad15ef21c4..72091aaca58 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_rglist.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_rglist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) RGList(ctx context.Context, id comm var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_subscriptionlist.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_subscriptionlist.go index 79d697751d4..cd434739d99 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_subscriptionlist.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_subscriptionlist.go @@ -48,7 +48,6 @@ func (c GuestConfigurationAssignmentsClient) SubscriptionList(ctx context.Contex var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsscreateorupdate.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsscreateorupdate.go index 4847edf8ad9..6d38abb8733 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsscreateorupdate.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsscreateorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSCreateOrUpdate(ctx context.Cont var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssdelete.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssdelete.go index 05ca4ea94eb..c8a05c86a43 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssdelete.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssdelete.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSDelete(ctx context.Context, id var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssget.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssget.go index 29a0ae1c5a1..584142512d4 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssget.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmssget.go @@ -45,7 +45,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSGet(ctx context.Context, id Gue var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsslist.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsslist.go index 392e8eb516f..b9deace541b 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsslist.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/method_vmsslist.go @@ -46,7 +46,6 @@ func (c GuestConfigurationAssignmentsClient) VMSSList(ctx context.Context, id Vi var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/version.go index 89665f2d84e..23956106ec3 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationassignments/2024-04-05" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/README.md index c3b4549b7be..94b67641ded 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments` Documentation -The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationconnectedvmwarevsphereassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/client.go index 797f1a15f59..d8bce5ab6c5 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go index c2d6658e421..e83894db85a 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachine.go @@ -42,7 +42,7 @@ func ParseProviderVirtualMachineID(input string) (*ProviderVirtualMachineId, err } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderVirtualMachineIDInsensitively(input string) (*ProviderVirtualM } id := ProviderVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go index 8a52b339989..c6f165ea935 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/id_providervirtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentID(input s } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentIDInsensit } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go index d5398ddcd52..e8a4256d986 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) CreateOrUpdat var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_get.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_get.go index f6f81f30399..24ff47bc825 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_get.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) Get(ctx conte var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_list.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_list.go index a22802bbd1f..54ee48e5511 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_list.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsClient) List(ctx cont var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/version.go index 95ce6c92fe4..9a40a10fd34 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignments/2024-04-05" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md index 8ca0491558a..634c6ff6114 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports` Documentation -The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationconnectedvmwarevsphereassignmentsreports` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go index fd48643fc04..a1aeefffcae 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/client.go @@ -15,7 +15,7 @@ type GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient struct { } func NewGuestConfigurationConnectedVMwarevSphereAssignmentsReportsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationconnectedvmwarevsphereassignmentsreports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go index d0147b37626..c77b2df219d 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_providervirtualmachineproviders2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentID(input s } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderVirtualMachineProviders2GuestConfigurationAssignmentIDInsensit } id := ProviderVirtualMachineProviders2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go index 0cc761d283a..4d57e507da6 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/id_virtualmachineproviders2guestconfigurationassignmentreport.go @@ -46,7 +46,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentReportID(input str } id := VirtualMachineProviders2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineProviders2GuestConfigurationAssignmentReportIDInsensitiv } id := VirtualMachineProviders2GuestConfigurationAssignmentReportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go index f58a91aec33..5683ceedcc6 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) Get(ct var model GuestConfigurationAssignmentReport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go index 1f6f6501ad4..54c0864d981 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationConnectedVMwarevSphereAssignmentsReportsClient) List(c var model GuestConfigurationAssignmentReportList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go index 44e9a672f27..22b17ec0668 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationconnectedvmwarevsphereassignmentsreports/version.go @@ -1,12 +1,10 @@ package guestconfigurationconnectedvmwarevsphereassignmentsreports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationconnectedvmwarevsphereassignmentsreports/2024-04-05" } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/README.md b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/README.md index c33cb2e5686..24354624306 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/README.md +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments` Documentation -The `guestconfigurationhcrpassignments` SDK allows for interaction with the Azure Resource Manager Service `guestconfiguration` (API Version `2024-04-05`). +The `guestconfigurationhcrpassignments` SDK allows for interaction with Azure Resource Manager `guestconfiguration` (API Version `2024-04-05`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/client.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/client.go index 7513652b8f7..0e9ee5d98f6 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/client.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/client.go @@ -15,7 +15,7 @@ type GuestConfigurationHCRPAssignmentsClient struct { } func NewGuestConfigurationHCRPAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestConfigurationHCRPAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestconfigurationhcrpassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestConfigurationHCRPAssignmentsClient: %+v", err) } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_machine.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_machine.go index c377f035cb0..da8011571f7 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_machine.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go index 1ba652702c6..b5c958d61ad 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/id_providers2guestconfigurationassignment.go @@ -44,7 +44,7 @@ func ParseProviders2GuestConfigurationAssignmentID(input string) (*Providers2Gue } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviders2GuestConfigurationAssignmentIDInsensitively(input string) (* } id := Providers2GuestConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_createorupdate.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_createorupdate.go index 47b26dffbe2..67e3927e63e 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_createorupdate.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) CreateOrUpdate(ctx context.Cont var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_get.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_get.go index a130d3741a3..9b0aa8f8196 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_get.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_get.go @@ -45,7 +45,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) Get(ctx context.Context, id Pro var model GuestConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_list.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_list.go index 240c97295d3..833c3d66f7a 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_list.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/method_list.go @@ -46,7 +46,6 @@ func (c GuestConfigurationHCRPAssignmentsClient) List(ctx context.Context, id Ma var model GuestConfigurationAssignmentList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/version.go b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/version.go index fe61ec24312..bcd2d6d86ed 100644 --- a/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/version.go +++ b/resource-manager/guestconfiguration/2024-04-05/guestconfigurationhcrpassignments/version.go @@ -1,12 +1,10 @@ package guestconfigurationhcrpassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-05" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestconfigurationhcrpassignments/2024-04-05" } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/README.md b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/README.md index 5c34de7260d..5f9fb7f7172 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/README.md +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms` Documentation -The `dedicatedhsms` SDK allows for interaction with the Azure Resource Manager Service `hardwaresecuritymodules` (API Version `2021-11-30`). +The `dedicatedhsms` SDK allows for interaction with Azure Resource Manager `hardwaresecuritymodules` (API Version `2021-11-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/client.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/client.go index b8b62118f0b..feb05e5b6a7 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/client.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/client.go @@ -15,7 +15,7 @@ type DedicatedHsmsClient struct { } func NewDedicatedHsmsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHsmsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dedicatedhsms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dedicatedhsms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DedicatedHsmsClient: %+v", err) } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go index 0e8b5104972..e98fe697c00 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/id_dedicatedhsm.go @@ -42,7 +42,7 @@ func ParseDedicatedHSMID(input string) (*DedicatedHSMId, error) { } id := DedicatedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDedicatedHSMIDInsensitively(input string) (*DedicatedHSMId, error) { } id := DedicatedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget.go index 3f524919e58..6c7b39a8d55 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmget.go @@ -45,7 +45,6 @@ func (c DedicatedHsmsClient) DedicatedHsmGet(ctx context.Context, id DedicatedHS var model DedicatedHsm result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup.go index 437035b7daf..95c1c48ce73 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbyresourcegroup.go @@ -40,6 +40,7 @@ func (o DedicatedHsmListByResourceGroupOperationOptions) ToHeaders() *client.Hea func (o DedicatedHsmListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription.go index 1b227703e62..d4df6ae7c14 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/method_dedicatedhsmlistbysubscription.go @@ -40,6 +40,7 @@ func (o DedicatedHsmListBySubscriptionOperationOptions) ToHeaders() *client.Head func (o DedicatedHsmListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/version.go b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/version.go index 1dfbb967b27..ea4a4475242 100644 --- a/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/version.go +++ b/resource-manager/hardwaresecuritymodules/2021-11-30/dedicatedhsms/version.go @@ -1,12 +1,10 @@ package dedicatedhsms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dedicatedhsms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dedicatedhsms/2021-11-30" } diff --git a/resource-manager/hdinsight/2021-06-01/applications/README.md b/resource-manager/hdinsight/2021-06-01/applications/README.md index 10c4e4fdbaf..8fa497deaf2 100644 --- a/resource-manager/hdinsight/2021-06-01/applications/README.md +++ b/resource-manager/hdinsight/2021-06-01/applications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/applications` Documentation -The `applications` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `applications` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/applications/client.go b/resource-manager/hdinsight/2021-06-01/applications/client.go index f4ad56ad4d2..01d1c5a1e05 100644 --- a/resource-manager/hdinsight/2021-06-01/applications/client.go +++ b/resource-manager/hdinsight/2021-06-01/applications/client.go @@ -15,7 +15,7 @@ type ApplicationsClient struct { } func NewApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/applications/id_application.go b/resource-manager/hdinsight/2021-06-01/applications/id_application.go index eb1b16c8c76..a04888830ff 100644 --- a/resource-manager/hdinsight/2021-06-01/applications/id_application.go +++ b/resource-manager/hdinsight/2021-06-01/applications/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/applications/method_get.go b/resource-manager/hdinsight/2021-06-01/applications/method_get.go index f15c3c0bf9f..5eb8a2355be 100644 --- a/resource-manager/hdinsight/2021-06-01/applications/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/applications/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationsClient) Get(ctx context.Context, id ApplicationId) (result G var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/applications/version.go b/resource-manager/hdinsight/2021-06-01/applications/version.go index c45ea554e12..d912a2ee4d6 100644 --- a/resource-manager/hdinsight/2021-06-01/applications/version.go +++ b/resource-manager/hdinsight/2021-06-01/applications/version.go @@ -1,12 +1,10 @@ package applications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applications/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/clusters/README.md b/resource-manager/hdinsight/2021-06-01/clusters/README.md index d5121b45b78..bdd2f15ed9c 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/README.md +++ b/resource-manager/hdinsight/2021-06-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/clusters/client.go b/resource-manager/hdinsight/2021-06-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/client.go +++ b/resource-manager/hdinsight/2021-06-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/clusters/method_get.go b/resource-manager/hdinsight/2021-06-01/clusters/method_get.go index 0a09f2c6cd0..919eac5f9da 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/clusters/method_get.go @@ -46,7 +46,6 @@ func (c ClustersClient) Get(ctx context.Context, id commonids.HDInsightClusterId var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/clusters/method_getgatewaysettings.go b/resource-manager/hdinsight/2021-06-01/clusters/method_getgatewaysettings.go index b51901a3c3b..36302c5e278 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/method_getgatewaysettings.go +++ b/resource-manager/hdinsight/2021-06-01/clusters/method_getgatewaysettings.go @@ -47,7 +47,6 @@ func (c ClustersClient) GetGatewaySettings(ctx context.Context, id commonids.HDI var model GatewaySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/clusters/method_update.go b/resource-manager/hdinsight/2021-06-01/clusters/method_update.go index cd283d4c493..bd0448655d1 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/method_update.go +++ b/resource-manager/hdinsight/2021-06-01/clusters/method_update.go @@ -50,7 +50,6 @@ func (c ClustersClient) Update(ctx context.Context, id commonids.HDInsightCluste var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/clusters/version.go b/resource-manager/hdinsight/2021-06-01/clusters/version.go index 99c68bbf775..192c56cd2e5 100644 --- a/resource-manager/hdinsight/2021-06-01/clusters/version.go +++ b/resource-manager/hdinsight/2021-06-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/configurations/README.md b/resource-manager/hdinsight/2021-06-01/configurations/README.md index 04c99200f8c..29cde88b5e8 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/README.md +++ b/resource-manager/hdinsight/2021-06-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/configurations/client.go b/resource-manager/hdinsight/2021-06-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/client.go +++ b/resource-manager/hdinsight/2021-06-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/configurations/id_configuration.go b/resource-manager/hdinsight/2021-06-01/configurations/id_configuration.go index 30f4ded8d4a..a52822cac3d 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/id_configuration.go +++ b/resource-manager/hdinsight/2021-06-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/configurations/method_get.go b/resource-manager/hdinsight/2021-06-01/configurations/method_get.go index 9fad4c707b6..beeb10cf237 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model map[string]string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/configurations/method_list.go b/resource-manager/hdinsight/2021-06-01/configurations/method_list.go index 03c02af9480..589e341c813 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/method_list.go +++ b/resource-manager/hdinsight/2021-06-01/configurations/method_list.go @@ -47,7 +47,6 @@ func (c ConfigurationsClient) List(ctx context.Context, id commonids.HDInsightCl var model ClusterConfigurations result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/configurations/version.go b/resource-manager/hdinsight/2021-06-01/configurations/version.go index d5ec5102c44..2e08fe82e90 100644 --- a/resource-manager/hdinsight/2021-06-01/configurations/version.go +++ b/resource-manager/hdinsight/2021-06-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/README.md b/resource-manager/hdinsight/2021-06-01/extensions/README.md index cb87e80d23c..1e4470aa9f4 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/README.md +++ b/resource-manager/hdinsight/2021-06-01/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `extensions` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/extensions/client.go b/resource-manager/hdinsight/2021-06-01/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/client.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/id_extension.go b/resource-manager/hdinsight/2021-06-01/extensions/id_extension.go index ecf63cf79f9..e8028b3e603 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/id_extension.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/method_get.go b/resource-manager/hdinsight/2021-06-01/extensions/method_get.go index 6fea38894ed..49470c83a61 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/method_get.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) Get(ctx context.Context, id ExtensionId) (result GetOp var model ClusterMonitoringResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/method_getazuremonitorstatus.go b/resource-manager/hdinsight/2021-06-01/extensions/method_getazuremonitorstatus.go index f034befb9f2..a67577341eb 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/method_getazuremonitorstatus.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/method_getazuremonitorstatus.go @@ -47,7 +47,6 @@ func (c ExtensionsClient) GetAzureMonitorStatus(ctx context.Context, id commonid var model AzureMonitorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/method_getmonitoringstatus.go b/resource-manager/hdinsight/2021-06-01/extensions/method_getmonitoringstatus.go index 01c294bb17b..8191415455f 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/method_getmonitoringstatus.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/method_getmonitoringstatus.go @@ -47,7 +47,6 @@ func (c ExtensionsClient) GetMonitoringStatus(ctx context.Context, id commonids. var model ClusterMonitoringResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/extensions/version.go b/resource-manager/hdinsight/2021-06-01/extensions/version.go index 008c1ff5242..aca4efcd1c9 100644 --- a/resource-manager/hdinsight/2021-06-01/extensions/version.go +++ b/resource-manager/hdinsight/2021-06-01/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/README.md b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/README.md index ffedf57ea2d..45df74aee27 100644 --- a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/README.md +++ b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/client.go b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/client.go +++ b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/id_privateendpointconnection.go index f6e3501af5e..6e78c9216fd 100644 --- a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/method_get.go b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/version.go b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/version.go index 0d17055f179..84f32b5d3b0 100644 --- a/resource-manager/hdinsight/2021-06-01/privateendpointconnections/version.go +++ b/resource-manager/hdinsight/2021-06-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/README.md b/resource-manager/hdinsight/2021-06-01/privatelinkresources/README.md index 15fba1f58b3..98fa3f96448 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/README.md +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/client.go b/resource-manager/hdinsight/2021-06-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/client.go +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/hdinsight/2021-06-01/privatelinkresources/id_privatelinkresource.go index 365d4b38f98..c7ef01559bb 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_get.go b/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_get.go +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_listbycluster.go b/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_listbycluster.go index f63fc040690..3d3d2200e7b 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_listbycluster.go +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/method_listbycluster.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id common var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/privatelinkresources/version.go b/resource-manager/hdinsight/2021-06-01/privatelinkresources/version.go index 4ee29f52669..cb4b4960d6e 100644 --- a/resource-manager/hdinsight/2021-06-01/privatelinkresources/version.go +++ b/resource-manager/hdinsight/2021-06-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/promote/client.go b/resource-manager/hdinsight/2021-06-01/promote/client.go index 1b9c9beb2ac..a5b6b3f8f89 100644 --- a/resource-manager/hdinsight/2021-06-01/promote/client.go +++ b/resource-manager/hdinsight/2021-06-01/promote/client.go @@ -15,7 +15,7 @@ type PromoteClient struct { } func NewPromoteClientWithBaseURI(sdkApi sdkEnv.Api) (*PromoteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "promote", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "promote", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PromoteClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/promote/id_scriptexecutionhistory.go b/resource-manager/hdinsight/2021-06-01/promote/id_scriptexecutionhistory.go index c1311218fc5..4fb473db8a6 100644 --- a/resource-manager/hdinsight/2021-06-01/promote/id_scriptexecutionhistory.go +++ b/resource-manager/hdinsight/2021-06-01/promote/id_scriptexecutionhistory.go @@ -44,7 +44,7 @@ func ParseScriptExecutionHistoryID(input string) (*ScriptExecutionHistoryId, err } id := ScriptExecutionHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptExecutionHistoryIDInsensitively(input string) (*ScriptExecutionH } id := ScriptExecutionHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/promote/version.go b/resource-manager/hdinsight/2021-06-01/promote/version.go index 5120da2263a..b9ef9245aa4 100644 --- a/resource-manager/hdinsight/2021-06-01/promote/version.go +++ b/resource-manager/hdinsight/2021-06-01/promote/version.go @@ -1,12 +1,10 @@ package promote -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/promote/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/promote/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/regions/README.md b/resource-manager/hdinsight/2021-06-01/regions/README.md index df6e59b0050..d57101ebb3b 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/README.md +++ b/resource-manager/hdinsight/2021-06-01/regions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/regions` Documentation -The `regions` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `regions` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/regions/client.go b/resource-manager/hdinsight/2021-06-01/regions/client.go index cf8027ad9e1..64e234bef94 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/client.go +++ b/resource-manager/hdinsight/2021-06-01/regions/client.go @@ -15,7 +15,7 @@ type RegionsClient struct { } func NewRegionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RegionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "regions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "regions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegionsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/regions/id_location.go b/resource-manager/hdinsight/2021-06-01/regions/id_location.go index b33830b248b..f160d912967 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/id_location.go +++ b/resource-manager/hdinsight/2021-06-01/regions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/regions/method_locationschecknameavailability.go b/resource-manager/hdinsight/2021-06-01/regions/method_locationschecknameavailability.go index cc65edb2c84..90e340330c2 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/method_locationschecknameavailability.go +++ b/resource-manager/hdinsight/2021-06-01/regions/method_locationschecknameavailability.go @@ -50,7 +50,6 @@ func (c RegionsClient) LocationsCheckNameAvailability(ctx context.Context, id Lo var model NameAvailabilityCheckResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/regions/method_locationsgetcapabilities.go b/resource-manager/hdinsight/2021-06-01/regions/method_locationsgetcapabilities.go index 13b192e5582..0a89ad9095b 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/method_locationsgetcapabilities.go +++ b/resource-manager/hdinsight/2021-06-01/regions/method_locationsgetcapabilities.go @@ -46,7 +46,6 @@ func (c RegionsClient) LocationsGetCapabilities(ctx context.Context, id Location var model CapabilitiesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/regions/method_locationslistbillingspecs.go b/resource-manager/hdinsight/2021-06-01/regions/method_locationslistbillingspecs.go index d5f73e16183..0cc2888fe2c 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/method_locationslistbillingspecs.go +++ b/resource-manager/hdinsight/2021-06-01/regions/method_locationslistbillingspecs.go @@ -46,7 +46,6 @@ func (c RegionsClient) LocationsListBillingSpecs(ctx context.Context, id Locatio var model BillingResponseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/regions/method_locationslistusages.go b/resource-manager/hdinsight/2021-06-01/regions/method_locationslistusages.go index d731ee1fe6b..c6b3dd503a9 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/method_locationslistusages.go +++ b/resource-manager/hdinsight/2021-06-01/regions/method_locationslistusages.go @@ -46,7 +46,6 @@ func (c RegionsClient) LocationsListUsages(ctx context.Context, id LocationId) ( var model UsagesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/regions/method_locationsvalidateclustercreaterequest.go b/resource-manager/hdinsight/2021-06-01/regions/method_locationsvalidateclustercreaterequest.go index b39422afc5b..e0b5b4b9edf 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/method_locationsvalidateclustercreaterequest.go +++ b/resource-manager/hdinsight/2021-06-01/regions/method_locationsvalidateclustercreaterequest.go @@ -50,7 +50,6 @@ func (c RegionsClient) LocationsValidateClusterCreateRequest(ctx context.Context var model ClusterCreateValidationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/regions/version.go b/resource-manager/hdinsight/2021-06-01/regions/version.go index e9f2343225d..0fe1dcc76a8 100644 --- a/resource-manager/hdinsight/2021-06-01/regions/version.go +++ b/resource-manager/hdinsight/2021-06-01/regions/version.go @@ -1,12 +1,10 @@ package regions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/regions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/regions/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/scriptactions/README.md b/resource-manager/hdinsight/2021-06-01/scriptactions/README.md index fb519a1bccf..72b6383f1b2 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptactions/README.md +++ b/resource-manager/hdinsight/2021-06-01/scriptactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/scriptactions` Documentation -The `scriptactions` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `scriptactions` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/scriptactions/client.go b/resource-manager/hdinsight/2021-06-01/scriptactions/client.go index 6d46261fc0c..80092b9affe 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptactions/client.go +++ b/resource-manager/hdinsight/2021-06-01/scriptactions/client.go @@ -15,7 +15,7 @@ type ScriptActionsClient struct { } func NewScriptActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scriptactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scriptactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptActionsClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/scriptactions/id_scriptaction.go b/resource-manager/hdinsight/2021-06-01/scriptactions/id_scriptaction.go index 2cc2a99e2d2..6bc741fa8f3 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptactions/id_scriptaction.go +++ b/resource-manager/hdinsight/2021-06-01/scriptactions/id_scriptaction.go @@ -44,7 +44,7 @@ func ParseScriptActionID(input string) (*ScriptActionId, error) { } id := ScriptActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptActionIDInsensitively(input string) (*ScriptActionId, error) { } id := ScriptActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/scriptactions/version.go b/resource-manager/hdinsight/2021-06-01/scriptactions/version.go index 2afd4b19cde..14a7acfa5e0 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptactions/version.go +++ b/resource-manager/hdinsight/2021-06-01/scriptactions/version.go @@ -1,12 +1,10 @@ package scriptactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scriptactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scriptactions/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/README.md b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/README.md index e7d6aa1ff46..37a221070a3 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/README.md +++ b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory` Documentation -The `scriptexecutionhistory` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `scriptexecutionhistory` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/client.go b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/client.go index bfe9d6db50b..26ec566cf86 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/client.go +++ b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/client.go @@ -15,7 +15,7 @@ type ScriptExecutionHistoryClient struct { } func NewScriptExecutionHistoryClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptExecutionHistoryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scriptexecutionhistory", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scriptexecutionhistory", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptExecutionHistoryClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/id_scriptexecutionhistory.go b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/id_scriptexecutionhistory.go index 002457c647c..ec7f750461c 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/id_scriptexecutionhistory.go +++ b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/id_scriptexecutionhistory.go @@ -44,7 +44,7 @@ func ParseScriptExecutionHistoryID(input string) (*ScriptExecutionHistoryId, err } id := ScriptExecutionHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptExecutionHistoryIDInsensitively(input string) (*ScriptExecutionH } id := ScriptExecutionHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/method_scriptactionsgetexecutiondetail.go b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/method_scriptactionsgetexecutiondetail.go index 91705d726d9..a5be762852b 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/method_scriptactionsgetexecutiondetail.go +++ b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/method_scriptactionsgetexecutiondetail.go @@ -45,7 +45,6 @@ func (c ScriptExecutionHistoryClient) ScriptActionsGetExecutionDetail(ctx contex var model RuntimeScriptActionDetail result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/version.go b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/version.go index 5334462a1b1..042d9dcb94b 100644 --- a/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/version.go +++ b/resource-manager/hdinsight/2021-06-01/scriptexecutionhistory/version.go @@ -1,12 +1,10 @@ package scriptexecutionhistory -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scriptexecutionhistory/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scriptexecutionhistory/2021-06-01" } diff --git a/resource-manager/hdinsight/2021-06-01/virtualmachines/README.md b/resource-manager/hdinsight/2021-06-01/virtualmachines/README.md index 6c89fe05f2d..5336662e627 100644 --- a/resource-manager/hdinsight/2021-06-01/virtualmachines/README.md +++ b/resource-manager/hdinsight/2021-06-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2021-06-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `hdinsight` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hdinsight/2021-06-01/virtualmachines/client.go b/resource-manager/hdinsight/2021-06-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/hdinsight/2021-06-01/virtualmachines/client.go +++ b/resource-manager/hdinsight/2021-06-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/hdinsight/2021-06-01/virtualmachines/method_listhosts.go b/resource-manager/hdinsight/2021-06-01/virtualmachines/method_listhosts.go index 1d9bfdfaf47..9d4c7ca3192 100644 --- a/resource-manager/hdinsight/2021-06-01/virtualmachines/method_listhosts.go +++ b/resource-manager/hdinsight/2021-06-01/virtualmachines/method_listhosts.go @@ -47,7 +47,6 @@ func (c VirtualMachinesClient) ListHosts(ctx context.Context, id commonids.HDIns var model []HostInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hdinsight/2021-06-01/virtualmachines/version.go b/resource-manager/hdinsight/2021-06-01/virtualmachines/version.go index d74c3c040d9..0ad5d528d3d 100644 --- a/resource-manager/hdinsight/2021-06-01/virtualmachines/version.go +++ b/resource-manager/hdinsight/2021-06-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2021-06-01" } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/README.md b/resource-manager/healthbot/2022-08-08/healthbots/README.md index b34448c38ad..9012cc15a56 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/README.md +++ b/resource-manager/healthbot/2022-08-08/healthbots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08/healthbots` Documentation -The `healthbots` SDK allows for interaction with the Azure Resource Manager Service `healthbot` (API Version `2022-08-08`). +The `healthbots` SDK allows for interaction with Azure Resource Manager `healthbot` (API Version `2022-08-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthbot/2022-08-08/healthbots/client.go b/resource-manager/healthbot/2022-08-08/healthbots/client.go index e9e7114f787..d2980657b16 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/client.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/client.go @@ -15,7 +15,7 @@ type HealthbotsClient struct { } func NewHealthbotsClientWithBaseURI(sdkApi sdkEnv.Api) (*HealthbotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "healthbots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "healthbots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HealthbotsClient: %+v", err) } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go b/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go index 214acbb3af9..7967cfe19be 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/id_healthbot.go @@ -42,7 +42,7 @@ func ParseHealthBotID(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHealthBotIDInsensitively(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/method_botsget.go b/resource-manager/healthbot/2022-08-08/healthbots/method_botsget.go index ef6ce701667..a2042a46af6 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/method_botsget.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/method_botsget.go @@ -45,7 +45,6 @@ func (c HealthbotsClient) BotsGet(ctx context.Context, id HealthBotId) (result B var model HealthBot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/method_botslistsecrets.go b/resource-manager/healthbot/2022-08-08/healthbots/method_botslistsecrets.go index 08584f7e135..8d41e7ca3a5 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/method_botslistsecrets.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/method_botslistsecrets.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsListSecrets(ctx context.Context, id HealthBotId) ( var model HealthBotKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/method_botsregenerateapijwtsecret.go b/resource-manager/healthbot/2022-08-08/healthbots/method_botsregenerateapijwtsecret.go index 4a0a1cc430b..1b21cc4533b 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/method_botsregenerateapijwtsecret.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/method_botsregenerateapijwtsecret.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsRegenerateApiJwtSecret(ctx context.Context, id Hea var model HealthBotKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2022-08-08/healthbots/version.go b/resource-manager/healthbot/2022-08-08/healthbots/version.go index a360fdba3b2..2a639abd99d 100644 --- a/resource-manager/healthbot/2022-08-08/healthbots/version.go +++ b/resource-manager/healthbot/2022-08-08/healthbots/version.go @@ -1,12 +1,10 @@ package healthbots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/healthbots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/healthbots/2022-08-08" } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/README.md b/resource-manager/healthbot/2023-05-01/healthbots/README.md index 97a5aeb9799..73add927e84 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/README.md +++ b/resource-manager/healthbot/2023-05-01/healthbots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2023-05-01/healthbots` Documentation -The `healthbots` SDK allows for interaction with the Azure Resource Manager Service `healthbot` (API Version `2023-05-01`). +The `healthbots` SDK allows for interaction with Azure Resource Manager `healthbot` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthbot/2023-05-01/healthbots/client.go b/resource-manager/healthbot/2023-05-01/healthbots/client.go index e9e7114f787..d2980657b16 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/client.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/client.go @@ -15,7 +15,7 @@ type HealthbotsClient struct { } func NewHealthbotsClientWithBaseURI(sdkApi sdkEnv.Api) (*HealthbotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "healthbots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "healthbots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HealthbotsClient: %+v", err) } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/id_healthbot.go b/resource-manager/healthbot/2023-05-01/healthbots/id_healthbot.go index 214acbb3af9..7967cfe19be 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/id_healthbot.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/id_healthbot.go @@ -42,7 +42,7 @@ func ParseHealthBotID(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHealthBotIDInsensitively(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/method_botsget.go b/resource-manager/healthbot/2023-05-01/healthbots/method_botsget.go index ef6ce701667..a2042a46af6 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/method_botsget.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/method_botsget.go @@ -45,7 +45,6 @@ func (c HealthbotsClient) BotsGet(ctx context.Context, id HealthBotId) (result B var model HealthBot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/method_botslistsecrets.go b/resource-manager/healthbot/2023-05-01/healthbots/method_botslistsecrets.go index 08584f7e135..8d41e7ca3a5 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/method_botslistsecrets.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/method_botslistsecrets.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsListSecrets(ctx context.Context, id HealthBotId) ( var model HealthBotKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/method_botsregenerateapijwtsecret.go b/resource-manager/healthbot/2023-05-01/healthbots/method_botsregenerateapijwtsecret.go index 4a0a1cc430b..1b21cc4533b 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/method_botsregenerateapijwtsecret.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/method_botsregenerateapijwtsecret.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsRegenerateApiJwtSecret(ctx context.Context, id Hea var model HealthBotKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2023-05-01/healthbots/version.go b/resource-manager/healthbot/2023-05-01/healthbots/version.go index f50854989b6..f514f1c99b1 100644 --- a/resource-manager/healthbot/2023-05-01/healthbots/version.go +++ b/resource-manager/healthbot/2023-05-01/healthbots/version.go @@ -1,12 +1,10 @@ package healthbots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/healthbots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/healthbots/2023-05-01" } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/README.md b/resource-manager/healthbot/2024-02-01/healthbots/README.md index 96ec45baa33..c6e59dcb1c1 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/README.md +++ b/resource-manager/healthbot/2024-02-01/healthbots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2024-02-01/healthbots` Documentation -The `healthbots` SDK allows for interaction with the Azure Resource Manager Service `healthbot` (API Version `2024-02-01`). +The `healthbots` SDK allows for interaction with Azure Resource Manager `healthbot` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthbot/2024-02-01/healthbots/client.go b/resource-manager/healthbot/2024-02-01/healthbots/client.go index e9e7114f787..d2980657b16 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/client.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/client.go @@ -15,7 +15,7 @@ type HealthbotsClient struct { } func NewHealthbotsClientWithBaseURI(sdkApi sdkEnv.Api) (*HealthbotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "healthbots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "healthbots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HealthbotsClient: %+v", err) } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/id_healthbot.go b/resource-manager/healthbot/2024-02-01/healthbots/id_healthbot.go index 214acbb3af9..7967cfe19be 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/id_healthbot.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/id_healthbot.go @@ -42,7 +42,7 @@ func ParseHealthBotID(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHealthBotIDInsensitively(input string) (*HealthBotId, error) { } id := HealthBotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/method_botsget.go b/resource-manager/healthbot/2024-02-01/healthbots/method_botsget.go index ef6ce701667..a2042a46af6 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/method_botsget.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/method_botsget.go @@ -45,7 +45,6 @@ func (c HealthbotsClient) BotsGet(ctx context.Context, id HealthBotId) (result B var model HealthBot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/method_botslistsecrets.go b/resource-manager/healthbot/2024-02-01/healthbots/method_botslistsecrets.go index 08584f7e135..8d41e7ca3a5 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/method_botslistsecrets.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/method_botslistsecrets.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsListSecrets(ctx context.Context, id HealthBotId) ( var model HealthBotKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/method_botsregenerateapijwtsecret.go b/resource-manager/healthbot/2024-02-01/healthbots/method_botsregenerateapijwtsecret.go index 4a0a1cc430b..1b21cc4533b 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/method_botsregenerateapijwtsecret.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/method_botsregenerateapijwtsecret.go @@ -46,7 +46,6 @@ func (c HealthbotsClient) BotsRegenerateApiJwtSecret(ctx context.Context, id Hea var model HealthBotKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthbot/2024-02-01/healthbots/version.go b/resource-manager/healthbot/2024-02-01/healthbots/version.go index 1f8d195f57e..52e0d038f7e 100644 --- a/resource-manager/healthbot/2024-02-01/healthbots/version.go +++ b/resource-manager/healthbot/2024-02-01/healthbots/version.go @@ -1,12 +1,10 @@ package healthbots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/healthbots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/healthbots/2024-02-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/collection/README.md b/resource-manager/healthcareapis/2022-12-01/collection/README.md index 117aebb8fd8..e235f3f32a7 100644 --- a/resource-manager/healthcareapis/2022-12-01/collection/README.md +++ b/resource-manager/healthcareapis/2022-12-01/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/collection/client.go b/resource-manager/healthcareapis/2022-12-01/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2022-12-01/collection/client.go +++ b/resource-manager/healthcareapis/2022-12-01/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/collection/version.go b/resource-manager/healthcareapis/2022-12-01/collection/version.go index ec3cd12ecd5..aa82e166a81 100644 --- a/resource-manager/healthcareapis/2022-12-01/collection/version.go +++ b/resource-manager/healthcareapis/2022-12-01/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/README.md b/resource-manager/healthcareapis/2022-12-01/dicomservices/README.md index d9e08c43f86..c87cbe4a540 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/README.md +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/client.go b/resource-manager/healthcareapis/2022-12-01/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/client.go +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/method_get.go b/resource-manager/healthcareapis/2022-12-01/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/dicomservices/version.go b/resource-manager/healthcareapis/2022-12-01/dicomservices/version.go index 6d3dd350648..5fd443cb151 100644 --- a/resource-manager/healthcareapis/2022-12-01/dicomservices/version.go +++ b/resource-manager/healthcareapis/2022-12-01/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/README.md b/resource-manager/healthcareapis/2022-12-01/fhirservices/README.md index eb9fbad640e..a0fe7e0fbc1 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/README.md +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/client.go b/resource-manager/healthcareapis/2022-12-01/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/client.go +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/method_get.go b/resource-manager/healthcareapis/2022-12-01/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/fhirservices/version.go b/resource-manager/healthcareapis/2022-12-01/fhirservices/version.go index c65dc16b618..15f14571c9c 100644 --- a/resource-manager/healthcareapis/2022-12-01/fhirservices/version.go +++ b/resource-manager/healthcareapis/2022-12-01/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/README.md b/resource-manager/healthcareapis/2022-12-01/iotconnectors/README.md index a419dfe525c..e9110837656 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/client.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_get.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/iotconnectors/version.go b/resource-manager/healthcareapis/2022-12-01/iotconnectors/version.go index ce121bcb1e4..b6fab4eb929 100644 --- a/resource-manager/healthcareapis/2022-12-01/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2022-12-01/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/README.md b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/README.md index 2f67e7edab0..e879802e7e2 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/client.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/version.go b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/version.go index 243847de1cf..3a159e4762a 100644 --- a/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2022-12-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/README.md b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/README.md index 00f20c9e32e..8824e822ab5 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/client.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/version.go b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/version.go index eec17b730db..d23be75f47f 100644 --- a/resource-manager/healthcareapis/2022-12-01/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2022-12-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/proxy/README.md b/resource-manager/healthcareapis/2022-12-01/proxy/README.md index d901850ff5e..279ea3046da 100644 --- a/resource-manager/healthcareapis/2022-12-01/proxy/README.md +++ b/resource-manager/healthcareapis/2022-12-01/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/proxy/client.go b/resource-manager/healthcareapis/2022-12-01/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2022-12-01/proxy/client.go +++ b/resource-manager/healthcareapis/2022-12-01/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2022-12-01/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2022-12-01/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2022-12-01/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/proxy/version.go b/resource-manager/healthcareapis/2022-12-01/proxy/version.go index 9d635c6f85e..724fc8e0b2a 100644 --- a/resource-manager/healthcareapis/2022-12-01/proxy/version.go +++ b/resource-manager/healthcareapis/2022-12-01/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/resource/README.md b/resource-manager/healthcareapis/2022-12-01/resource/README.md index 28c445c68b2..b26e5eff75a 100644 --- a/resource-manager/healthcareapis/2022-12-01/resource/README.md +++ b/resource-manager/healthcareapis/2022-12-01/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/resource/client.go b/resource-manager/healthcareapis/2022-12-01/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2022-12-01/resource/client.go +++ b/resource-manager/healthcareapis/2022-12-01/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/resource/id_service.go b/resource-manager/healthcareapis/2022-12-01/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2022-12-01/resource/id_service.go +++ b/resource-manager/healthcareapis/2022-12-01/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/resource/method_servicesget.go b/resource-manager/healthcareapis/2022-12-01/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2022-12-01/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2022-12-01/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/resource/version.go b/resource-manager/healthcareapis/2022-12-01/resource/version.go index 87d278fb9e1..e38572b297d 100644 --- a/resource-manager/healthcareapis/2022-12-01/resource/version.go +++ b/resource-manager/healthcareapis/2022-12-01/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/README.md index 7f6fa91a01b..bd3c09432ba 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/version.go index 7c50a94d7ab..3b49e84cdd9 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/README.md index 888b0406504..3f386d3d261 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/version.go index 75a8467b100..b80f02523bd 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2022-12-01" } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaces/README.md b/resource-manager/healthcareapis/2022-12-01/workspaces/README.md index c039b6bc14f..76bf7b7c5b0 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaces/README.md +++ b/resource-manager/healthcareapis/2022-12-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2022-12-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2022-12-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2022-12-01/workspaces/client.go b/resource-manager/healthcareapis/2022-12-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaces/client.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go b/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaces/method_get.go b/resource-manager/healthcareapis/2022-12-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2022-12-01/workspaces/version.go b/resource-manager/healthcareapis/2022-12-01/workspaces/version.go index 527423bacfc..0484223cbf7 100644 --- a/resource-manager/healthcareapis/2022-12-01/workspaces/version.go +++ b/resource-manager/healthcareapis/2022-12-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2022-12-01" } diff --git a/resource-manager/healthcareapis/2023-02-28/collection/README.md b/resource-manager/healthcareapis/2023-02-28/collection/README.md index c8321b48137..d36a3a75c0b 100644 --- a/resource-manager/healthcareapis/2023-02-28/collection/README.md +++ b/resource-manager/healthcareapis/2023-02-28/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/collection/client.go b/resource-manager/healthcareapis/2023-02-28/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2023-02-28/collection/client.go +++ b/resource-manager/healthcareapis/2023-02-28/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/collection/version.go b/resource-manager/healthcareapis/2023-02-28/collection/version.go index 0d27d04ac99..9deb2e04375 100644 --- a/resource-manager/healthcareapis/2023-02-28/collection/version.go +++ b/resource-manager/healthcareapis/2023-02-28/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/README.md b/resource-manager/healthcareapis/2023-02-28/dicomservices/README.md index aed3328d861..e4bd05abe5f 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/README.md +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/client.go b/resource-manager/healthcareapis/2023-02-28/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/client.go +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2023-02-28/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/method_get.go b/resource-manager/healthcareapis/2023-02-28/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/dicomservices/version.go b/resource-manager/healthcareapis/2023-02-28/dicomservices/version.go index 37f08618145..86385709b3d 100644 --- a/resource-manager/healthcareapis/2023-02-28/dicomservices/version.go +++ b/resource-manager/healthcareapis/2023-02-28/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/README.md b/resource-manager/healthcareapis/2023-02-28/fhirservices/README.md index aa3851ddfeb..68959839aac 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/README.md +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/client.go b/resource-manager/healthcareapis/2023-02-28/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/client.go +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2023-02-28/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/method_get.go b/resource-manager/healthcareapis/2023-02-28/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/fhirservices/version.go b/resource-manager/healthcareapis/2023-02-28/fhirservices/version.go index d6e0f2db03e..dfc337f3b9b 100644 --- a/resource-manager/healthcareapis/2023-02-28/fhirservices/version.go +++ b/resource-manager/healthcareapis/2023-02-28/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/README.md b/resource-manager/healthcareapis/2023-02-28/iotconnectors/README.md index 84dda3a09c7..f4e334596b3 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/client.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_get.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/iotconnectors/version.go b/resource-manager/healthcareapis/2023-02-28/iotconnectors/version.go index 62dd983e6fc..a718d345691 100644 --- a/resource-manager/healthcareapis/2023-02-28/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2023-02-28/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/README.md b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/README.md index d09700111d6..34902a0748f 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/client.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/version.go b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/version.go index ffa5a3bcf63..8171dabea50 100644 --- a/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-02-28/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/README.md b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/README.md index 00ce8381e2a..1479c6d96d0 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/client.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/version.go b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/version.go index 270739f4c21..266e84bdb77 100644 --- a/resource-manager/healthcareapis/2023-02-28/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-02-28/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/proxy/README.md b/resource-manager/healthcareapis/2023-02-28/proxy/README.md index eddda2b94ea..29fbcf9a225 100644 --- a/resource-manager/healthcareapis/2023-02-28/proxy/README.md +++ b/resource-manager/healthcareapis/2023-02-28/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/proxy/client.go b/resource-manager/healthcareapis/2023-02-28/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2023-02-28/proxy/client.go +++ b/resource-manager/healthcareapis/2023-02-28/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2023-02-28/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2023-02-28/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2023-02-28/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/proxy/version.go b/resource-manager/healthcareapis/2023-02-28/proxy/version.go index aa84f79fbe2..400ce63fe7e 100644 --- a/resource-manager/healthcareapis/2023-02-28/proxy/version.go +++ b/resource-manager/healthcareapis/2023-02-28/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/resource/README.md b/resource-manager/healthcareapis/2023-02-28/resource/README.md index e7949cce66c..4a446857883 100644 --- a/resource-manager/healthcareapis/2023-02-28/resource/README.md +++ b/resource-manager/healthcareapis/2023-02-28/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/resource/client.go b/resource-manager/healthcareapis/2023-02-28/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2023-02-28/resource/client.go +++ b/resource-manager/healthcareapis/2023-02-28/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/resource/id_service.go b/resource-manager/healthcareapis/2023-02-28/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2023-02-28/resource/id_service.go +++ b/resource-manager/healthcareapis/2023-02-28/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/resource/method_servicesget.go b/resource-manager/healthcareapis/2023-02-28/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2023-02-28/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2023-02-28/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/resource/version.go b/resource-manager/healthcareapis/2023-02-28/resource/version.go index dbabdace9de..f31f968b41c 100644 --- a/resource-manager/healthcareapis/2023-02-28/resource/version.go +++ b/resource-manager/healthcareapis/2023-02-28/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/README.md index 5191dd4a00c..84fdd1863cf 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/version.go index 708599dec1d..477f1c6c0f6 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/README.md index 9060306a3f9..a67f52383d6 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/version.go index 7af99232380..46140c2acb0 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaces/README.md b/resource-manager/healthcareapis/2023-02-28/workspaces/README.md index f98f4fb5656..796e91d15d9 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaces/README.md +++ b/resource-manager/healthcareapis/2023-02-28/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-02-28/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-02-28`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-02-28`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-02-28/workspaces/client.go b/resource-manager/healthcareapis/2023-02-28/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaces/client.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaces/id_workspace.go b/resource-manager/healthcareapis/2023-02-28/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaces/method_get.go b/resource-manager/healthcareapis/2023-02-28/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-02-28/workspaces/version.go b/resource-manager/healthcareapis/2023-02-28/workspaces/version.go index 4aec5b575d0..70874b9929e 100644 --- a/resource-manager/healthcareapis/2023-02-28/workspaces/version.go +++ b/resource-manager/healthcareapis/2023-02-28/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-28" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-02-28" } diff --git a/resource-manager/healthcareapis/2023-09-06/collection/README.md b/resource-manager/healthcareapis/2023-09-06/collection/README.md index ffc9c7078cf..6ee54363df7 100644 --- a/resource-manager/healthcareapis/2023-09-06/collection/README.md +++ b/resource-manager/healthcareapis/2023-09-06/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/collection/client.go b/resource-manager/healthcareapis/2023-09-06/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2023-09-06/collection/client.go +++ b/resource-manager/healthcareapis/2023-09-06/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/collection/version.go b/resource-manager/healthcareapis/2023-09-06/collection/version.go index a03e04a8b54..3dd39bcd470 100644 --- a/resource-manager/healthcareapis/2023-09-06/collection/version.go +++ b/resource-manager/healthcareapis/2023-09-06/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/README.md b/resource-manager/healthcareapis/2023-09-06/dicomservices/README.md index 21f7955f5ef..3c446d26176 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/README.md +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/client.go b/resource-manager/healthcareapis/2023-09-06/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/client.go +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2023-09-06/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/method_get.go b/resource-manager/healthcareapis/2023-09-06/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/dicomservices/version.go b/resource-manager/healthcareapis/2023-09-06/dicomservices/version.go index 5a27a986bea..383a5c04563 100644 --- a/resource-manager/healthcareapis/2023-09-06/dicomservices/version.go +++ b/resource-manager/healthcareapis/2023-09-06/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/README.md b/resource-manager/healthcareapis/2023-09-06/fhirservices/README.md index a6c40991a1d..0d435548456 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/README.md +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/client.go b/resource-manager/healthcareapis/2023-09-06/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/client.go +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2023-09-06/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/method_get.go b/resource-manager/healthcareapis/2023-09-06/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/fhirservices/version.go b/resource-manager/healthcareapis/2023-09-06/fhirservices/version.go index 6cd9fb69905..1a80e9cef83 100644 --- a/resource-manager/healthcareapis/2023-09-06/fhirservices/version.go +++ b/resource-manager/healthcareapis/2023-09-06/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/README.md b/resource-manager/healthcareapis/2023-09-06/iotconnectors/README.md index 772c1c7fe13..3f857db2438 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/client.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_get.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/iotconnectors/version.go b/resource-manager/healthcareapis/2023-09-06/iotconnectors/version.go index 482e0e32d70..cfff644cfa5 100644 --- a/resource-manager/healthcareapis/2023-09-06/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2023-09-06/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/README.md b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/README.md index 24c59b8ef7b..9427649b89e 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/client.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/version.go b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/version.go index 190096fa1c9..ba0143675d6 100644 --- a/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-09-06/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/README.md b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/README.md index 3e9f4da953a..d68c1adeb5d 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/client.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/version.go b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/version.go index 534def9603d..3ddca6fc00f 100644 --- a/resource-manager/healthcareapis/2023-09-06/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-09-06/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/proxy/README.md b/resource-manager/healthcareapis/2023-09-06/proxy/README.md index b883afbd72a..0590d770251 100644 --- a/resource-manager/healthcareapis/2023-09-06/proxy/README.md +++ b/resource-manager/healthcareapis/2023-09-06/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/proxy/client.go b/resource-manager/healthcareapis/2023-09-06/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2023-09-06/proxy/client.go +++ b/resource-manager/healthcareapis/2023-09-06/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2023-09-06/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2023-09-06/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2023-09-06/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/proxy/version.go b/resource-manager/healthcareapis/2023-09-06/proxy/version.go index c86aa1dcbdb..0d6039a6530 100644 --- a/resource-manager/healthcareapis/2023-09-06/proxy/version.go +++ b/resource-manager/healthcareapis/2023-09-06/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/resource/README.md b/resource-manager/healthcareapis/2023-09-06/resource/README.md index 02be0949b3e..d2c1045615d 100644 --- a/resource-manager/healthcareapis/2023-09-06/resource/README.md +++ b/resource-manager/healthcareapis/2023-09-06/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/resource/client.go b/resource-manager/healthcareapis/2023-09-06/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2023-09-06/resource/client.go +++ b/resource-manager/healthcareapis/2023-09-06/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/resource/id_service.go b/resource-manager/healthcareapis/2023-09-06/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2023-09-06/resource/id_service.go +++ b/resource-manager/healthcareapis/2023-09-06/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/resource/method_servicesget.go b/resource-manager/healthcareapis/2023-09-06/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2023-09-06/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2023-09-06/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/resource/version.go b/resource-manager/healthcareapis/2023-09-06/resource/version.go index cb25baacd0f..9084f072715 100644 --- a/resource-manager/healthcareapis/2023-09-06/resource/version.go +++ b/resource-manager/healthcareapis/2023-09-06/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/README.md index b2bbc0b2b46..0006d604907 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/version.go index 15801df9fd0..d1588b0d16c 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/README.md index 810cba49665..da25deb8bfe 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/version.go index eb466e8361a..f712f325dbc 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaces/README.md b/resource-manager/healthcareapis/2023-09-06/workspaces/README.md index a940f9646d2..86ac212e4cf 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaces/README.md +++ b/resource-manager/healthcareapis/2023-09-06/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-09-06/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-09-06`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-09-06`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-09-06/workspaces/client.go b/resource-manager/healthcareapis/2023-09-06/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaces/client.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaces/id_workspace.go b/resource-manager/healthcareapis/2023-09-06/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaces/method_get.go b/resource-manager/healthcareapis/2023-09-06/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-09-06/workspaces/version.go b/resource-manager/healthcareapis/2023-09-06/workspaces/version.go index 7aefd38bfe9..d8426801fdc 100644 --- a/resource-manager/healthcareapis/2023-09-06/workspaces/version.go +++ b/resource-manager/healthcareapis/2023-09-06/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-06" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-09-06" } diff --git a/resource-manager/healthcareapis/2023-11-01/collection/README.md b/resource-manager/healthcareapis/2023-11-01/collection/README.md index b1e03105cc3..cfcf3c19afe 100644 --- a/resource-manager/healthcareapis/2023-11-01/collection/README.md +++ b/resource-manager/healthcareapis/2023-11-01/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/collection/client.go b/resource-manager/healthcareapis/2023-11-01/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2023-11-01/collection/client.go +++ b/resource-manager/healthcareapis/2023-11-01/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/collection/version.go b/resource-manager/healthcareapis/2023-11-01/collection/version.go index 68973429456..a8ac33d683b 100644 --- a/resource-manager/healthcareapis/2023-11-01/collection/version.go +++ b/resource-manager/healthcareapis/2023-11-01/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/README.md b/resource-manager/healthcareapis/2023-11-01/dicomservices/README.md index e26e81f9972..13d4fbfc5c4 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/README.md +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/client.go b/resource-manager/healthcareapis/2023-11-01/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/client.go +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2023-11-01/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/method_get.go b/resource-manager/healthcareapis/2023-11-01/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/dicomservices/version.go b/resource-manager/healthcareapis/2023-11-01/dicomservices/version.go index 8ff90f8aa47..01d1071fa03 100644 --- a/resource-manager/healthcareapis/2023-11-01/dicomservices/version.go +++ b/resource-manager/healthcareapis/2023-11-01/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/README.md b/resource-manager/healthcareapis/2023-11-01/fhirservices/README.md index 5f438382eb0..2a733bdc53f 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/README.md +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/client.go b/resource-manager/healthcareapis/2023-11-01/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/client.go +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2023-11-01/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/method_get.go b/resource-manager/healthcareapis/2023-11-01/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/fhirservices/version.go b/resource-manager/healthcareapis/2023-11-01/fhirservices/version.go index c6989aa80fc..ec957b492b1 100644 --- a/resource-manager/healthcareapis/2023-11-01/fhirservices/version.go +++ b/resource-manager/healthcareapis/2023-11-01/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/README.md b/resource-manager/healthcareapis/2023-11-01/iotconnectors/README.md index 3d74ca41c55..569672ffceb 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/client.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_get.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/iotconnectors/version.go b/resource-manager/healthcareapis/2023-11-01/iotconnectors/version.go index 823275867c2..7d4dc9c1abe 100644 --- a/resource-manager/healthcareapis/2023-11-01/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2023-11-01/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/README.md b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/README.md index e8a2a0192f7..9c968163a6d 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/client.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/version.go b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/version.go index 2548ca02c5f..1e7e0fd4741 100644 --- a/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-11-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/README.md b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/README.md index 13c736120b2..ecc025dbcbb 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/client.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/version.go b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/version.go index d12469c1344..8054e325910 100644 --- a/resource-manager/healthcareapis/2023-11-01/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-11-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/proxy/README.md b/resource-manager/healthcareapis/2023-11-01/proxy/README.md index 446e86ed14b..b53bda7ff9b 100644 --- a/resource-manager/healthcareapis/2023-11-01/proxy/README.md +++ b/resource-manager/healthcareapis/2023-11-01/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/proxy/client.go b/resource-manager/healthcareapis/2023-11-01/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2023-11-01/proxy/client.go +++ b/resource-manager/healthcareapis/2023-11-01/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2023-11-01/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2023-11-01/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2023-11-01/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/proxy/version.go b/resource-manager/healthcareapis/2023-11-01/proxy/version.go index 039c9be9e05..755f8e73e5e 100644 --- a/resource-manager/healthcareapis/2023-11-01/proxy/version.go +++ b/resource-manager/healthcareapis/2023-11-01/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/resource/README.md b/resource-manager/healthcareapis/2023-11-01/resource/README.md index 33912d1c264..b470f78f6ef 100644 --- a/resource-manager/healthcareapis/2023-11-01/resource/README.md +++ b/resource-manager/healthcareapis/2023-11-01/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/resource/client.go b/resource-manager/healthcareapis/2023-11-01/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2023-11-01/resource/client.go +++ b/resource-manager/healthcareapis/2023-11-01/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/resource/id_service.go b/resource-manager/healthcareapis/2023-11-01/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2023-11-01/resource/id_service.go +++ b/resource-manager/healthcareapis/2023-11-01/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/resource/method_servicesget.go b/resource-manager/healthcareapis/2023-11-01/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2023-11-01/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2023-11-01/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/resource/version.go b/resource-manager/healthcareapis/2023-11-01/resource/version.go index 05b45c44dbe..2a8b2d37bb6 100644 --- a/resource-manager/healthcareapis/2023-11-01/resource/version.go +++ b/resource-manager/healthcareapis/2023-11-01/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/README.md index e5e7578cdf2..ce68b86c322 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/version.go index 52f59cef06f..22ae8a60b82 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/README.md index 4703850140b..2f6589d2d4e 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/version.go index 571700a8d98..2b066718c5c 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaces/README.md b/resource-manager/healthcareapis/2023-11-01/workspaces/README.md index e8a84cf71fe..c50955d10c1 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaces/README.md +++ b/resource-manager/healthcareapis/2023-11-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-11-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-11-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-11-01/workspaces/client.go b/resource-manager/healthcareapis/2023-11-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaces/client.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaces/id_workspace.go b/resource-manager/healthcareapis/2023-11-01/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaces/method_get.go b/resource-manager/healthcareapis/2023-11-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-11-01/workspaces/version.go b/resource-manager/healthcareapis/2023-11-01/workspaces/version.go index 630986e3d51..f1a32ebcf9b 100644 --- a/resource-manager/healthcareapis/2023-11-01/workspaces/version.go +++ b/resource-manager/healthcareapis/2023-11-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-11-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/collection/README.md b/resource-manager/healthcareapis/2023-12-01/collection/README.md index ecd69cc334b..63bc7ad726f 100644 --- a/resource-manager/healthcareapis/2023-12-01/collection/README.md +++ b/resource-manager/healthcareapis/2023-12-01/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/collection/client.go b/resource-manager/healthcareapis/2023-12-01/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2023-12-01/collection/client.go +++ b/resource-manager/healthcareapis/2023-12-01/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/collection/version.go b/resource-manager/healthcareapis/2023-12-01/collection/version.go index c449a58a81d..f12dc1b53c6 100644 --- a/resource-manager/healthcareapis/2023-12-01/collection/version.go +++ b/resource-manager/healthcareapis/2023-12-01/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/README.md b/resource-manager/healthcareapis/2023-12-01/dicomservices/README.md index 0f0e5b379e5..7514b589bf8 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/README.md +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/client.go b/resource-manager/healthcareapis/2023-12-01/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/client.go +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2023-12-01/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/method_get.go b/resource-manager/healthcareapis/2023-12-01/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/dicomservices/version.go b/resource-manager/healthcareapis/2023-12-01/dicomservices/version.go index b0beee89abf..710ae795477 100644 --- a/resource-manager/healthcareapis/2023-12-01/dicomservices/version.go +++ b/resource-manager/healthcareapis/2023-12-01/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/README.md b/resource-manager/healthcareapis/2023-12-01/fhirservices/README.md index d05d62bc09c..12ef7921b85 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/README.md +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/client.go b/resource-manager/healthcareapis/2023-12-01/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/client.go +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2023-12-01/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/method_get.go b/resource-manager/healthcareapis/2023-12-01/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/fhirservices/version.go b/resource-manager/healthcareapis/2023-12-01/fhirservices/version.go index 39a95db6ffd..c9b7953fe88 100644 --- a/resource-manager/healthcareapis/2023-12-01/fhirservices/version.go +++ b/resource-manager/healthcareapis/2023-12-01/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/README.md b/resource-manager/healthcareapis/2023-12-01/iotconnectors/README.md index ae69252ea6f..4a3ce17d03f 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/client.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_get.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/iotconnectors/version.go b/resource-manager/healthcareapis/2023-12-01/iotconnectors/version.go index 64168e04911..a51e07c9d43 100644 --- a/resource-manager/healthcareapis/2023-12-01/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2023-12-01/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/README.md b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/README.md index a1ea5204468..4d1f0f7f290 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/client.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/version.go b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/version.go index 6e69fb417ef..c1d7ea2dcb2 100644 --- a/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-12-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/README.md b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/README.md index 334ccbfeda0..8580a90093e 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/client.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/version.go b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/version.go index daec1ce406a..b766e7c9441 100644 --- a/resource-manager/healthcareapis/2023-12-01/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-12-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/proxy/README.md b/resource-manager/healthcareapis/2023-12-01/proxy/README.md index e1a751526a5..e52b06ab769 100644 --- a/resource-manager/healthcareapis/2023-12-01/proxy/README.md +++ b/resource-manager/healthcareapis/2023-12-01/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/proxy/client.go b/resource-manager/healthcareapis/2023-12-01/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2023-12-01/proxy/client.go +++ b/resource-manager/healthcareapis/2023-12-01/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2023-12-01/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2023-12-01/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2023-12-01/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/proxy/version.go b/resource-manager/healthcareapis/2023-12-01/proxy/version.go index bd87e1fe76c..5d9d4be0f5f 100644 --- a/resource-manager/healthcareapis/2023-12-01/proxy/version.go +++ b/resource-manager/healthcareapis/2023-12-01/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/resource/README.md b/resource-manager/healthcareapis/2023-12-01/resource/README.md index 99c2f136d7a..a31b94d3e30 100644 --- a/resource-manager/healthcareapis/2023-12-01/resource/README.md +++ b/resource-manager/healthcareapis/2023-12-01/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/resource/client.go b/resource-manager/healthcareapis/2023-12-01/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2023-12-01/resource/client.go +++ b/resource-manager/healthcareapis/2023-12-01/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/resource/id_service.go b/resource-manager/healthcareapis/2023-12-01/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2023-12-01/resource/id_service.go +++ b/resource-manager/healthcareapis/2023-12-01/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/resource/method_servicesget.go b/resource-manager/healthcareapis/2023-12-01/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2023-12-01/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2023-12-01/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/resource/version.go b/resource-manager/healthcareapis/2023-12-01/resource/version.go index faf38cc7f73..6351e873ba9 100644 --- a/resource-manager/healthcareapis/2023-12-01/resource/version.go +++ b/resource-manager/healthcareapis/2023-12-01/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/README.md index b3d2afeac76..0cb153c7e41 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/version.go index 550b27c98dc..b11a3c66a60 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/README.md index 182aeb2f863..2d216768e3d 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/version.go index 75e9d75b966..81101610e7f 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2023-12-01" } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaces/README.md b/resource-manager/healthcareapis/2023-12-01/workspaces/README.md index e99f00cb274..e128bb91d7a 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaces/README.md +++ b/resource-manager/healthcareapis/2023-12-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2023-12-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2023-12-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2023-12-01/workspaces/client.go b/resource-manager/healthcareapis/2023-12-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaces/client.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaces/id_workspace.go b/resource-manager/healthcareapis/2023-12-01/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaces/method_get.go b/resource-manager/healthcareapis/2023-12-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2023-12-01/workspaces/version.go b/resource-manager/healthcareapis/2023-12-01/workspaces/version.go index 647a27d4c63..0bcb6f16996 100644 --- a/resource-manager/healthcareapis/2023-12-01/workspaces/version.go +++ b/resource-manager/healthcareapis/2023-12-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-12-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/collection/README.md b/resource-manager/healthcareapis/2024-03-01/collection/README.md index 1de68ca78ad..a6a288e04ed 100644 --- a/resource-manager/healthcareapis/2024-03-01/collection/README.md +++ b/resource-manager/healthcareapis/2024-03-01/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/collection/client.go b/resource-manager/healthcareapis/2024-03-01/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2024-03-01/collection/client.go +++ b/resource-manager/healthcareapis/2024-03-01/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/collection/version.go b/resource-manager/healthcareapis/2024-03-01/collection/version.go index 2a77384a42d..cc6f42a1897 100644 --- a/resource-manager/healthcareapis/2024-03-01/collection/version.go +++ b/resource-manager/healthcareapis/2024-03-01/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/README.md b/resource-manager/healthcareapis/2024-03-01/dicomservices/README.md index 6e12c162356..8b667b91088 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/README.md +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/client.go b/resource-manager/healthcareapis/2024-03-01/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/client.go +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2024-03-01/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/method_get.go b/resource-manager/healthcareapis/2024-03-01/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/dicomservices/version.go b/resource-manager/healthcareapis/2024-03-01/dicomservices/version.go index 51a87e576a7..8719d20a1f4 100644 --- a/resource-manager/healthcareapis/2024-03-01/dicomservices/version.go +++ b/resource-manager/healthcareapis/2024-03-01/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/README.md b/resource-manager/healthcareapis/2024-03-01/fhirservices/README.md index f9078f9bfad..3f6108a1f3a 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/README.md +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/client.go b/resource-manager/healthcareapis/2024-03-01/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/client.go +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2024-03-01/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/method_get.go b/resource-manager/healthcareapis/2024-03-01/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/fhirservices/version.go b/resource-manager/healthcareapis/2024-03-01/fhirservices/version.go index 3273610941d..9758c6a8c98 100644 --- a/resource-manager/healthcareapis/2024-03-01/fhirservices/version.go +++ b/resource-manager/healthcareapis/2024-03-01/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/README.md b/resource-manager/healthcareapis/2024-03-01/iotconnectors/README.md index 9050097e23d..3ce672640af 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/client.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_get.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/iotconnectors/version.go b/resource-manager/healthcareapis/2024-03-01/iotconnectors/version.go index ced4d70bc25..f935b26e1e3 100644 --- a/resource-manager/healthcareapis/2024-03-01/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2024-03-01/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/README.md b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/README.md index c01adb6bf7b..608aeaa1956 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/client.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/version.go b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/version.go index 2f993e72d67..36cdac3323b 100644 --- a/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2024-03-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/README.md b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/README.md index 04e8716e1a3..23974102270 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/client.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/version.go b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/version.go index bcf05c009fe..c11ce4682c7 100644 --- a/resource-manager/healthcareapis/2024-03-01/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2024-03-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/proxy/README.md b/resource-manager/healthcareapis/2024-03-01/proxy/README.md index 3bf3d444572..1d3a3531000 100644 --- a/resource-manager/healthcareapis/2024-03-01/proxy/README.md +++ b/resource-manager/healthcareapis/2024-03-01/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/proxy/client.go b/resource-manager/healthcareapis/2024-03-01/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2024-03-01/proxy/client.go +++ b/resource-manager/healthcareapis/2024-03-01/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2024-03-01/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2024-03-01/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2024-03-01/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/proxy/version.go b/resource-manager/healthcareapis/2024-03-01/proxy/version.go index d04f20b0d6c..e3c821ce950 100644 --- a/resource-manager/healthcareapis/2024-03-01/proxy/version.go +++ b/resource-manager/healthcareapis/2024-03-01/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/resource/README.md b/resource-manager/healthcareapis/2024-03-01/resource/README.md index 7a8b10df3cd..b3c545ca32a 100644 --- a/resource-manager/healthcareapis/2024-03-01/resource/README.md +++ b/resource-manager/healthcareapis/2024-03-01/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/resource/client.go b/resource-manager/healthcareapis/2024-03-01/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2024-03-01/resource/client.go +++ b/resource-manager/healthcareapis/2024-03-01/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/resource/id_service.go b/resource-manager/healthcareapis/2024-03-01/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2024-03-01/resource/id_service.go +++ b/resource-manager/healthcareapis/2024-03-01/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/resource/method_servicesget.go b/resource-manager/healthcareapis/2024-03-01/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2024-03-01/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2024-03-01/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/resource/version.go b/resource-manager/healthcareapis/2024-03-01/resource/version.go index 604d439c717..df2356acf9d 100644 --- a/resource-manager/healthcareapis/2024-03-01/resource/version.go +++ b/resource-manager/healthcareapis/2024-03-01/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/README.md index afdae33d6cc..69b6e9c3374 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/version.go index 9660e3bd01b..dc39d6e5ff3 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/README.md index 493220f5ed6..67ae6d149c1 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/version.go index ecfe0fdf316..30bf3b6d111 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaces/README.md b/resource-manager/healthcareapis/2024-03-01/workspaces/README.md index e3dd9c2fb15..7cd3473ed6b 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaces/README.md +++ b/resource-manager/healthcareapis/2024-03-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-01/workspaces/client.go b/resource-manager/healthcareapis/2024-03-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaces/client.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaces/id_workspace.go b/resource-manager/healthcareapis/2024-03-01/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaces/method_get.go b/resource-manager/healthcareapis/2024-03-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-01/workspaces/version.go b/resource-manager/healthcareapis/2024-03-01/workspaces/version.go index 160749d2032..fa33a3959ff 100644 --- a/resource-manager/healthcareapis/2024-03-01/workspaces/version.go +++ b/resource-manager/healthcareapis/2024-03-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-03-01" } diff --git a/resource-manager/healthcareapis/2024-03-31/collection/README.md b/resource-manager/healthcareapis/2024-03-31/collection/README.md index 3b02062e070..cc0e4ac3eb7 100644 --- a/resource-manager/healthcareapis/2024-03-31/collection/README.md +++ b/resource-manager/healthcareapis/2024-03-31/collection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/collection` Documentation -The `collection` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `collection` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/collection/client.go b/resource-manager/healthcareapis/2024-03-31/collection/client.go index 1a3abe1afa2..53491a93fd1 100644 --- a/resource-manager/healthcareapis/2024-03-31/collection/client.go +++ b/resource-manager/healthcareapis/2024-03-31/collection/client.go @@ -15,7 +15,7 @@ type CollectionClient struct { } func NewCollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectionClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/collection/version.go b/resource-manager/healthcareapis/2024-03-31/collection/version.go index c72e30c0bbc..cb6ffeb9df1 100644 --- a/resource-manager/healthcareapis/2024-03-31/collection/version.go +++ b/resource-manager/healthcareapis/2024-03-31/collection/version.go @@ -1,12 +1,10 @@ package collection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collection/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/README.md b/resource-manager/healthcareapis/2024-03-31/dicomservices/README.md index 7268380520d..8193cc89e11 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/README.md +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/dicomservices` Documentation -The `dicomservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `dicomservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/client.go b/resource-manager/healthcareapis/2024-03-31/dicomservices/client.go index 911650c4837..454ac827dbc 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/client.go +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/client.go @@ -15,7 +15,7 @@ type DicomServicesClient struct { } func NewDicomServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*DicomServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dicomservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dicomservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DicomServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/id_dicomservice.go b/resource-manager/healthcareapis/2024-03-31/dicomservices/id_dicomservice.go index 52c5ad0a813..e62d110414b 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/id_dicomservice.go +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/id_dicomservice.go @@ -44,7 +44,7 @@ func ParseDicomServiceID(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDicomServiceIDInsensitively(input string) (*DicomServiceId, error) { } id := DicomServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/dicomservices/id_workspace.go index f55839251c1..4839c0dd197 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/method_get.go b/resource-manager/healthcareapis/2024-03-31/dicomservices/method_get.go index 482bad2b047..f0ea7c0e54f 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/method_get.go @@ -45,7 +45,6 @@ func (c DicomServicesClient) Get(ctx context.Context, id DicomServiceId) (result var model DicomService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/dicomservices/version.go b/resource-manager/healthcareapis/2024-03-31/dicomservices/version.go index 18fdd1b20e0..e72152f98ac 100644 --- a/resource-manager/healthcareapis/2024-03-31/dicomservices/version.go +++ b/resource-manager/healthcareapis/2024-03-31/dicomservices/version.go @@ -1,12 +1,10 @@ package dicomservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dicomservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dicomservices/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/README.md b/resource-manager/healthcareapis/2024-03-31/fhirservices/README.md index be73373e5c5..e697471e84a 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/README.md +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/fhirservices` Documentation -The `fhirservices` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `fhirservices` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/client.go b/resource-manager/healthcareapis/2024-03-31/fhirservices/client.go index 6b9652e4e99..0037c1ea292 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/client.go +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/client.go @@ -15,7 +15,7 @@ type FhirServicesClient struct { } func NewFhirServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*FhirServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fhirservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fhirservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FhirServicesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/id_fhirservice.go b/resource-manager/healthcareapis/2024-03-31/fhirservices/id_fhirservice.go index 9b841b2a9f1..31a2e7c92fe 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/id_fhirservice.go +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/id_fhirservice.go @@ -44,7 +44,7 @@ func ParseFhirServiceID(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFhirServiceIDInsensitively(input string) (*FhirServiceId, error) { } id := FhirServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/fhirservices/id_workspace.go index cfde2dd5422..a44f8413ad7 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/method_get.go b/resource-manager/healthcareapis/2024-03-31/fhirservices/method_get.go index 6a123698327..affe8f34b5c 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/method_get.go @@ -45,7 +45,6 @@ func (c FhirServicesClient) Get(ctx context.Context, id FhirServiceId) (result G var model FhirService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/fhirservices/version.go b/resource-manager/healthcareapis/2024-03-31/fhirservices/version.go index 8737bc488f2..83e4ce79e98 100644 --- a/resource-manager/healthcareapis/2024-03-31/fhirservices/version.go +++ b/resource-manager/healthcareapis/2024-03-31/fhirservices/version.go @@ -1,12 +1,10 @@ package fhirservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fhirservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fhirservices/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/README.md b/resource-manager/healthcareapis/2024-03-31/iotconnectors/README.md index 72486850082..e0f0fe820ec 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/README.md +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/iotconnectors` Documentation -The `iotconnectors` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `iotconnectors` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/client.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/client.go index dcb9444b36e..1ef0df0df3f 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/client.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/client.go @@ -15,7 +15,7 @@ type IotConnectorsClient struct { } func NewIotConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*IotConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iotconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iotconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IotConnectorsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_fhirdestination.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_fhirdestination.go index f6442c6c00c..4ee510ae9de 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_fhirdestination.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_fhirdestination.go @@ -46,7 +46,7 @@ func ParseFhirDestinationID(input string) (*FhirDestinationId, error) { } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFhirDestinationIDInsensitively(input string) (*FhirDestinationId, erro } id := FhirDestinationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_iotconnector.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_iotconnector.go index 4fe1656dd97..af2f56b683a 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_iotconnector.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_iotconnector.go @@ -44,7 +44,7 @@ func ParseIotConnectorID(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIotConnectorIDInsensitively(input string) (*IotConnectorId, error) { } id := IotConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_workspace.go index a1bfb6070dc..1641a735117 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_get.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_get.go index 940659c59c5..99c8170cf84 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_get.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) Get(ctx context.Context, id IotConnectorId) (result var model IotConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_iotconnectorfhirdestinationget.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_iotconnectorfhirdestinationget.go index a218bc967b5..3ca82b9782c 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_iotconnectorfhirdestinationget.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/method_iotconnectorfhirdestinationget.go @@ -45,7 +45,6 @@ func (c IotConnectorsClient) IotConnectorFhirDestinationGet(ctx context.Context, var model IotFhirDestination result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/iotconnectors/version.go b/resource-manager/healthcareapis/2024-03-31/iotconnectors/version.go index 286c4c07f3f..7876029fd75 100644 --- a/resource-manager/healthcareapis/2024-03-31/iotconnectors/version.go +++ b/resource-manager/healthcareapis/2024-03-31/iotconnectors/version.go @@ -1,12 +1,10 @@ package iotconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iotconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iotconnectors/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/README.md b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/README.md index 7ecb6439f08..f8f6a46b80c 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/client.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_privateendpointconnection.go index 3aef6c49899..54a80dddb84 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_service.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_service.go index 693b84b9b58..579331a2130 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_service.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_get.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_get.go index cbcc1d10ba5..6462130af44 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_listbyservice.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_listbyservice.go index 918571b357f..d4051277aef 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByService(ctx context.Context, id var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/version.go b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/version.go index ca60608d0f4..9b7aefa910a 100644 --- a/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2024-03-31/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/README.md b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/README.md index 2c31737586d..02b016a0a4b 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/README.md +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/client.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/client.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_privatelinkresource.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_privatelinkresource.go index 24f1bb893bb..3177cd177de 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_service.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_service.go index edee58abcb5..6003fece17b 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_service.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_get.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_get.go index 117c877ebee..c8420f5fc52 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_listbyservice.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_listbyservice.go index abcae501c87..c160fa1e508 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_listbyservice.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/method_listbyservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByService(ctx context.Context, id Servic var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/version.go b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/version.go index 77510ae35c9..d655a2d8400 100644 --- a/resource-manager/healthcareapis/2024-03-31/privatelinkresources/version.go +++ b/resource-manager/healthcareapis/2024-03-31/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/proxy/README.md b/resource-manager/healthcareapis/2024-03-31/proxy/README.md index c9385f75faf..464376cda1a 100644 --- a/resource-manager/healthcareapis/2024-03-31/proxy/README.md +++ b/resource-manager/healthcareapis/2024-03-31/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `proxy` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/proxy/client.go b/resource-manager/healthcareapis/2024-03-31/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/healthcareapis/2024-03-31/proxy/client.go +++ b/resource-manager/healthcareapis/2024-03-31/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/proxy/method_serviceschecknameavailability.go b/resource-manager/healthcareapis/2024-03-31/proxy/method_serviceschecknameavailability.go index ccbe18cee0f..d8fb4d90727 100644 --- a/resource-manager/healthcareapis/2024-03-31/proxy/method_serviceschecknameavailability.go +++ b/resource-manager/healthcareapis/2024-03-31/proxy/method_serviceschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProxyClient) ServicesCheckNameAvailability(ctx context.Context, id commo var model ServicesNameAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/proxy/version.go b/resource-manager/healthcareapis/2024-03-31/proxy/version.go index b96ba6577ab..d22bbb414f0 100644 --- a/resource-manager/healthcareapis/2024-03-31/proxy/version.go +++ b/resource-manager/healthcareapis/2024-03-31/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/resource/README.md b/resource-manager/healthcareapis/2024-03-31/resource/README.md index a12f29a0deb..b8a2a5242e4 100644 --- a/resource-manager/healthcareapis/2024-03-31/resource/README.md +++ b/resource-manager/healthcareapis/2024-03-31/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `resource` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/resource/client.go b/resource-manager/healthcareapis/2024-03-31/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/healthcareapis/2024-03-31/resource/client.go +++ b/resource-manager/healthcareapis/2024-03-31/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/resource/id_service.go b/resource-manager/healthcareapis/2024-03-31/resource/id_service.go index 66245b7158c..2ded177ffc3 100644 --- a/resource-manager/healthcareapis/2024-03-31/resource/id_service.go +++ b/resource-manager/healthcareapis/2024-03-31/resource/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/resource/method_servicesget.go b/resource-manager/healthcareapis/2024-03-31/resource/method_servicesget.go index e62723b2cd3..008f266d8ea 100644 --- a/resource-manager/healthcareapis/2024-03-31/resource/method_servicesget.go +++ b/resource-manager/healthcareapis/2024-03-31/resource/method_servicesget.go @@ -45,7 +45,6 @@ func (c ResourceClient) ServicesGet(ctx context.Context, id ServiceId) (result S var model ServicesDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/resource/version.go b/resource-manager/healthcareapis/2024-03-31/resource/version.go index 1d57ccdcdfc..314c0e8f91f 100644 --- a/resource-manager/healthcareapis/2024-03-31/resource/version.go +++ b/resource-manager/healthcareapis/2024-03-31/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/README.md b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/README.md index 50c3c87d28b..2f6b580b314 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/README.md +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/client.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/client.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspace.go index ddb34ce7c29..1d33e37a697 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go index e5b2ec93db5..54ce0f803ad 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/id_workspaceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateEndpointConnectionID(input string) (*WorkspacePrivateE } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateEndpointConnectionIDInsensitively(input string) (*Work } id := WorkspacePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_get.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_get.go index 03bcf6adf9e..4e573cb7795 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) Get(ctx context.Context, id W var model PrivateEndpointConnectionDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_listbyworkspace.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_listbyworkspace.go index 44ac3385ed3..71cc8700602 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) ListByWorkspace(ctx context.C var model PrivateEndpointConnectionListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/version.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/version.go index bc047386bff..bab9c9d5143 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/version.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/README.md b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/README.md index 09185587a4c..29bcae51e02 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/README.md +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/client.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/client.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspace.go index a0e54daf29e..e5aa11fe6da 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go index 5d32e8b251f..0477fbd0b4c 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/id_workspaceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseWorkspacePrivateLinkResourceID(input string) (*WorkspacePrivateLinkRes } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspacePrivateLinkResourceIDInsensitively(input string) (*WorkspaceP } id := WorkspacePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_get.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_get.go index c884ddefb76..301d8868348 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateLinkResourcesClient) Get(ctx context.Context, id Workspa var model PrivateLinkResourceDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_listbyworkspace.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_listbyworkspace.go index 2b191e4637c..1512fdeb5de 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_listbyworkspace.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) ListByWorkspace(ctx context.Context var model PrivateLinkResourceListResultDescription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/version.go b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/version.go index 1cb5dd41405..99d263b8a3d 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/version.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2024-03-31" } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaces/README.md b/resource-manager/healthcareapis/2024-03-31/workspaces/README.md index 4d786b6081e..cd57dffaa1d 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaces/README.md +++ b/resource-manager/healthcareapis/2024-03-31/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/healthcareapis/2024-03-31/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `healthcareapis` (API Version `2024-03-31`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `healthcareapis` (API Version `2024-03-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/healthcareapis/2024-03-31/workspaces/client.go b/resource-manager/healthcareapis/2024-03-31/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaces/client.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaces/id_workspace.go b/resource-manager/healthcareapis/2024-03-31/workspaces/id_workspace.go index 77c31e55c41..75d6ee1f1e4 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaces/id_workspace.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaces/method_get.go b/resource-manager/healthcareapis/2024-03-31/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaces/method_get.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/healthcareapis/2024-03-31/workspaces/version.go b/resource-manager/healthcareapis/2024-03-31/workspaces/version.go index 25b0a631991..6a6883a356a 100644 --- a/resource-manager/healthcareapis/2024-03-31/workspaces/version.go +++ b/resource-manager/healthcareapis/2024-03-31/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-03-31" } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/README.md b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/README.md index 3d96beb4fe0..a3b991e2641 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/README.md +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances` Documentation -The `provisionedclusterinstances` SDK allows for interaction with the Azure Resource Manager Service `hybridazurekubernetesservice` (API Version `2024-01-01`). +The `provisionedclusterinstances` SDK allows for interaction with Azure Resource Manager `hybridazurekubernetesservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/client.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/client.go index 6a00319ff27..bcb260adbd1 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/client.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/client.go @@ -15,7 +15,7 @@ type ProvisionedClusterInstancesClient struct { } func NewProvisionedClusterInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvisionedClusterInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provisionedclusterinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provisionedclusterinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvisionedClusterInstancesClient: %+v", err) } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/id_scopedagentpool.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/id_scopedagentpool.go index f999b2720ca..18ed62ec1b1 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/id_scopedagentpool.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/id_scopedagentpool.go @@ -40,7 +40,7 @@ func ParseScopedAgentPoolID(input string) (*ScopedAgentPoolId, error) { } id := ScopedAgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAgentPoolIDInsensitively(input string) (*ScopedAgentPoolId, erro } id := ScopedAgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_agentpoolget.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_agentpoolget.go index cbc387e3c21..f16c7489acf 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_agentpoolget.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_agentpoolget.go @@ -45,7 +45,6 @@ func (c ProvisionedClusterInstancesClient) AgentPoolGet(ctx context.Context, id var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getkubernetesversions.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getkubernetesversions.go index b47cd796427..b3c63e6b6a3 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getkubernetesversions.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getkubernetesversions.go @@ -47,7 +47,6 @@ func (c ProvisionedClusterInstancesClient) GetKubernetesVersions(ctx context.Con var model KubernetesVersionProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getupgradeprofile.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getupgradeprofile.go index 2279556e2ec..c6425cb9962 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getupgradeprofile.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getupgradeprofile.go @@ -47,7 +47,6 @@ func (c ProvisionedClusterInstancesClient) GetUpgradeProfile(ctx context.Context var model ProvisionedClusterUpgradeProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getvmskus.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getvmskus.go index 16d298704b6..1668ef6340d 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getvmskus.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_getvmskus.go @@ -47,7 +47,6 @@ func (c ProvisionedClusterInstancesClient) GetVMSkus(ctx context.Context, id com var model VMSkuProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataget.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataget.go index fe29c34d492..e3f2bd348b4 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataget.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataget.go @@ -47,7 +47,6 @@ func (c ProvisionedClusterInstancesClient) HybridIdentityMetadataGet(ctx context var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataput.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataput.go index 10a89ea87df..ac29afaa56d 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataput.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_hybrididentitymetadataput.go @@ -52,7 +52,6 @@ func (c ProvisionedClusterInstancesClient) HybridIdentityMetadataPut(ctx context var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_provisionedclusterinstancesget.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_provisionedclusterinstancesget.go index 816cc41d9d6..47e8e2dcc2e 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_provisionedclusterinstancesget.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/method_provisionedclusterinstancesget.go @@ -47,7 +47,6 @@ func (c ProvisionedClusterInstancesClient) ProvisionedClusterInstancesGet(ctx co var model ProvisionedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/version.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/version.go index 0ebd18f17bf..31bf25f4b0a 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/version.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/provisionedclusterinstances/version.go @@ -1,12 +1,10 @@ package provisionedclusterinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provisionedclusterinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provisionedclusterinstances/2024-01-01" } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/README.md b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/README.md index c84552405ff..5eea9fee15f 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/README.md +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `hybridazurekubernetesservice` (API Version `2024-01-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `hybridazurekubernetesservice` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/client.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/client.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/id_virtualnetwork.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/id_virtualnetwork.go index b926754b94a..c129518d592 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/method_retrieve.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/method_retrieve.go index 97fbc7ebd93..045f558eab5 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/method_retrieve.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/method_retrieve.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Retrieve(ctx context.Context, id VirtualNetworkId var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/version.go b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/version.go index d9a791b9024..8e288d9a64b 100644 --- a/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/version.go +++ b/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2024-01-01" } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/README.md b/resource-manager/hybridcompute/2022-11-10/extensions/README.md index 9a40e33429a..d6ae69df320 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/README.md +++ b/resource-manager/hybridcompute/2022-11-10/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `extensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/client.go b/resource-manager/hybridcompute/2022-11-10/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/client.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/id_extensiontype.go b/resource-manager/hybridcompute/2022-11-10/extensions/id_extensiontype.go index b57b7e61a53..656a969c751 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/id_extensiontype.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/id_extensiontype.go @@ -44,7 +44,7 @@ func ParseExtensionTypeID(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionTypeIDInsensitively(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/id_version.go b/resource-manager/hybridcompute/2022-11-10/extensions/id_version.go index 55ff31c5d3a..81311e23380 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/id_version.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadataget.go b/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadataget.go index 1f50b2ab8e6..495f7669976 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadataget.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadataget.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) ExtensionMetadataGet(ctx context.Context, id VersionId var model ExtensionValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadatalist.go b/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadatalist.go index 1d9af8e54ac..2a1cd841897 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadatalist.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/method_extensionmetadatalist.go @@ -46,7 +46,6 @@ func (c ExtensionsClient) ExtensionMetadataList(ctx context.Context, id Extensio var model ExtensionValueListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/extensions/version.go b/resource-manager/hybridcompute/2022-11-10/extensions/version.go index 0bf62aebc57..1569c61c629 100644 --- a/resource-manager/hybridcompute/2022-11-10/extensions/version.go +++ b/resource-manager/hybridcompute/2022-11-10/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/README.md b/resource-manager/hybridcompute/2022-11-10/machineextensions/README.md index 39fc52bad59..403de2f3bd4 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/README.md +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions` Documentation -The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `machineextensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/client.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/client.go index a4336266a29..63a73f0818b 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/client.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/client.go @@ -15,7 +15,7 @@ type MachineExtensionsClient struct { } func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go index f1f0e73d09b..c38b4bd00f0 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go index 63c29999e35..5c05eb9752a 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/method_get.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/method_get.go index e21d210a448..de726cb7687 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/method_get.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/method_get.go @@ -45,7 +45,6 @@ func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (resul var model MachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/method_list.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/method_list.go index d9646c3c81e..508180edb27 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/method_list.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensions/version.go b/resource-manager/hybridcompute/2022-11-10/machineextensions/version.go index fba16a85b09..71d69b5b88d 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensions/version.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensions/version.go @@ -1,12 +1,10 @@ package machineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensions/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/README.md b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/README.md index 1941d8843c8..d2ce547ea63 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/README.md +++ b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade` Documentation -The `machineextensionsupgrade` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `machineextensionsupgrade` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/client.go b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/client.go index c02524534ce..861b4b3e65d 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/client.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/client.go @@ -15,7 +15,7 @@ type MachineExtensionsUpgradeClient struct { } func NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsUpgradeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsUpgradeClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/id_machine.go b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/id_machine.go index 0ea82ab4023..19ae176e37c 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/id_machine.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/version.go b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/version.go index 8e365b3827f..5a0a072b3cd 100644 --- a/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/version.go +++ b/resource-manager/hybridcompute/2022-11-10/machineextensionsupgrade/version.go @@ -1,12 +1,10 @@ package machineextensionsupgrade -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensionsupgrade/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensionsupgrade/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/README.md b/resource-manager/hybridcompute/2022-11-10/machines/README.md index b5820aff2dc..414d1cd9295 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/README.md +++ b/resource-manager/hybridcompute/2022-11-10/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `machines` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/machines/client.go b/resource-manager/hybridcompute/2022-11-10/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/client.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go b/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go index e8e33b30e0c..fa0b52b3e21 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/method_createorupdate.go b/resource-manager/hybridcompute/2022-11-10/machines/method_createorupdate.go index 5bde2c1a35c..2b8e961cb50 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/method_createorupdate.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/method_get.go b/resource-manager/hybridcompute/2022-11-10/machines/method_get.go index 4cc80ee5628..dbba4fc2851 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/method_get.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperat var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/method_update.go b/resource-manager/hybridcompute/2022-11-10/machines/method_update.go index f90641d69c8..2fe776738bf 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/method_update.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/method_update.go @@ -49,7 +49,6 @@ func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineU var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/machines/version.go b/resource-manager/hybridcompute/2022-11-10/machines/version.go index 3cfed6470a4..5f872c2334a 100644 --- a/resource-manager/hybridcompute/2022-11-10/machines/version.go +++ b/resource-manager/hybridcompute/2022-11-10/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/README.md b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/README.md index 8e2dc315adc..da0bd368fba 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/README.md +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/client.go b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/client.go +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go index ac2417fe8c8..8aa5e4ae9ef 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go index 7bd8a7c1186..caf9bc07af7 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/method_get.go b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/method_get.go +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/version.go b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/version.go index 7d7b4dfbf84..c61b3ed255a 100644 --- a/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/version.go +++ b/resource-manager/hybridcompute/2022-11-10/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/README.md b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/README.md index afb010e67dd..4e5f8637376 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/README.md +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/client.go b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/client.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_privatelinkresource.go b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_privatelinkresource.go index 4f61df268c8..a5298c16516 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_providerprivatelinkscope.go index 37d15fd44e5..a257e460242 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/method_get.go b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/method_get.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/version.go b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/version.go index 01aa4ebefe8..cb27a0cbc1b 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkresources/version.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/README.md b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/README.md index 761549bc81d..ebfa6bd7c19 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/README.md +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/privatelinkscopes` Documentation -The `privatelinkscopes` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-11-10`). +The `privatelinkscopes` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-11-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/client.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/client.go index c1f8540450a..6ad00026164 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/client.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesClient struct { } func NewPrivateLinkScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go index 8296e6ce9cf..6ff21431e18 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go index ae6a8ccdd75..66f5f5fba5f 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go index 061c9f3c4cc..c0d123cc5a9 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_createorupdate.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_createorupdate.go index 5d8d8320439..e443fdeae45 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_createorupdate.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, id Provider var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_get.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_get.go index 2373e6b9b13..1d8b307be87 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_get.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) Get(ctx context.Context, id ProviderPrivateLink var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetails.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetails.go index 1c1d43dd361..6b32c351ffa 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetails.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetails.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) GetValidationDetails(ctx context.Context, id Pr var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetailsformachine.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetailsformachine.go index 724c45d8ae9..ee67466fe66 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetailsformachine.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_getvalidationdetailsformachine.go @@ -46,7 +46,6 @@ func (c PrivateLinkScopesClient) GetValidationDetailsForMachine(ctx context.Cont var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_updatetags.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_updatetags.go index 69978b7733a..2b50c500623 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_updatetags.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesClient) UpdateTags(ctx context.Context, id ProviderPriv var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/version.go b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/version.go index e819a30ec79..7ef8aa4a72c 100644 --- a/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/version.go +++ b/resource-manager/hybridcompute/2022-11-10/privatelinkscopes/version.go @@ -1,12 +1,10 @@ package privatelinkscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopes/2022-11-10" } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/README.md b/resource-manager/hybridcompute/2022-12-27/extensions/README.md index ae8bf011676..bd414073f0b 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/README.md +++ b/resource-manager/hybridcompute/2022-12-27/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `extensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/client.go b/resource-manager/hybridcompute/2022-12-27/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/client.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/id_extensiontype.go b/resource-manager/hybridcompute/2022-12-27/extensions/id_extensiontype.go index b57b7e61a53..656a969c751 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/id_extensiontype.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/id_extensiontype.go @@ -44,7 +44,7 @@ func ParseExtensionTypeID(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionTypeIDInsensitively(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/id_version.go b/resource-manager/hybridcompute/2022-12-27/extensions/id_version.go index 55ff31c5d3a..81311e23380 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/id_version.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadataget.go b/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadataget.go index 1f50b2ab8e6..495f7669976 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadataget.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadataget.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) ExtensionMetadataGet(ctx context.Context, id VersionId var model ExtensionValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadatalist.go b/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadatalist.go index 1d9af8e54ac..2a1cd841897 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadatalist.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/method_extensionmetadatalist.go @@ -46,7 +46,6 @@ func (c ExtensionsClient) ExtensionMetadataList(ctx context.Context, id Extensio var model ExtensionValueListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/extensions/version.go b/resource-manager/hybridcompute/2022-12-27/extensions/version.go index a790e9221f0..2186c8a31c3 100644 --- a/resource-manager/hybridcompute/2022-12-27/extensions/version.go +++ b/resource-manager/hybridcompute/2022-12-27/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/README.md b/resource-manager/hybridcompute/2022-12-27/machineextensions/README.md index 9bc4f1fa6bf..1e94513002d 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/README.md +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/machineextensions` Documentation -The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `machineextensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/client.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/client.go index a4336266a29..63a73f0818b 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/client.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/client.go @@ -15,7 +15,7 @@ type MachineExtensionsClient struct { } func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/id_extension.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/id_extension.go index f1f0e73d09b..c38b4bd00f0 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/id_extension.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/id_machine.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/id_machine.go index 63c29999e35..5c05eb9752a 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/id_machine.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/method_get.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/method_get.go index e21d210a448..de726cb7687 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/method_get.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/method_get.go @@ -45,7 +45,6 @@ func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (resul var model MachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/method_list.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/method_list.go index d9646c3c81e..508180edb27 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/method_list.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensions/version.go b/resource-manager/hybridcompute/2022-12-27/machineextensions/version.go index 8154fa8b26b..33dc6807f39 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensions/version.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensions/version.go @@ -1,12 +1,10 @@ package machineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensions/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/README.md b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/README.md index 81a7b9c6bda..74a446649c0 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/README.md +++ b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade` Documentation -The `machineextensionsupgrade` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `machineextensionsupgrade` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/client.go b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/client.go index c02524534ce..861b4b3e65d 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/client.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/client.go @@ -15,7 +15,7 @@ type MachineExtensionsUpgradeClient struct { } func NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsUpgradeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsUpgradeClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/id_machine.go b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/id_machine.go index 0ea82ab4023..19ae176e37c 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/id_machine.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/version.go b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/version.go index 272a9b4aebd..6c060534961 100644 --- a/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/version.go +++ b/resource-manager/hybridcompute/2022-12-27/machineextensionsupgrade/version.go @@ -1,12 +1,10 @@ package machineextensionsupgrade -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensionsupgrade/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensionsupgrade/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/README.md b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/README.md index 2e70f736f7c..9c1212d0c1d 100644 --- a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/README.md +++ b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile` Documentation -The `machinenetworkprofile` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `machinenetworkprofile` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/client.go b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/client.go index bc8fa58d8d5..0f388f5eceb 100644 --- a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/client.go +++ b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/client.go @@ -15,7 +15,7 @@ type MachineNetworkProfileClient struct { } func NewMachineNetworkProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineNetworkProfileClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinenetworkprofile", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinenetworkprofile", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineNetworkProfileClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/id_machine.go b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/id_machine.go index b70ed79b4f7..a8444530d69 100644 --- a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/id_machine.go +++ b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/method_networkprofileget.go b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/method_networkprofileget.go index 910399bc22b..f442788d530 100644 --- a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/method_networkprofileget.go +++ b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/method_networkprofileget.go @@ -46,7 +46,6 @@ func (c MachineNetworkProfileClient) NetworkProfileGet(ctx context.Context, id M var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/version.go b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/version.go index 17e47893ebf..6e69570bd66 100644 --- a/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/version.go +++ b/resource-manager/hybridcompute/2022-12-27/machinenetworkprofile/version.go @@ -1,12 +1,10 @@ package machinenetworkprofile -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinenetworkprofile/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinenetworkprofile/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/README.md b/resource-manager/hybridcompute/2022-12-27/machines/README.md index 9f53eef8b60..bb9cb51d6ea 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/README.md +++ b/resource-manager/hybridcompute/2022-12-27/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `machines` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/machines/client.go b/resource-manager/hybridcompute/2022-12-27/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/client.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/id_machine.go b/resource-manager/hybridcompute/2022-12-27/machines/id_machine.go index e8e33b30e0c..fa0b52b3e21 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/id_machine.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/method_createorupdate.go b/resource-manager/hybridcompute/2022-12-27/machines/method_createorupdate.go index 5bde2c1a35c..2b8e961cb50 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/method_createorupdate.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/method_get.go b/resource-manager/hybridcompute/2022-12-27/machines/method_get.go index 4cc80ee5628..dbba4fc2851 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/method_get.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperat var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/method_update.go b/resource-manager/hybridcompute/2022-12-27/machines/method_update.go index f90641d69c8..2fe776738bf 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/method_update.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/method_update.go @@ -49,7 +49,6 @@ func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineU var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/machines/version.go b/resource-manager/hybridcompute/2022-12-27/machines/version.go index fcc7edc9632..45afb87491a 100644 --- a/resource-manager/hybridcompute/2022-12-27/machines/version.go +++ b/resource-manager/hybridcompute/2022-12-27/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/README.md b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/README.md index ecf6d26aa3c..e1f3bf89b94 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/README.md +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/client.go b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/client.go +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_privateendpointconnection.go index ac2417fe8c8..8aa5e4ae9ef 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_providerprivatelinkscope.go index 7bd8a7c1186..caf9bc07af7 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/method_get.go b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/method_get.go +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/version.go b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/version.go index 09ba075954e..8bcb4e3f99b 100644 --- a/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/version.go +++ b/resource-manager/hybridcompute/2022-12-27/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/README.md b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/README.md index 63348b087a2..119f71538e8 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/README.md +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/client.go b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/client.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_privatelinkresource.go b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_privatelinkresource.go index 4f61df268c8..a5298c16516 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_providerprivatelinkscope.go index 37d15fd44e5..a257e460242 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/method_get.go b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/method_get.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/version.go b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/version.go index 1590f099d7f..ffe06aabebe 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkresources/version.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-12-27" } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/README.md b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/README.md index d5be3bd169a..f3507d5d8b3 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/README.md +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-12-27/privatelinkscopes` Documentation -The `privatelinkscopes` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2022-12-27`). +The `privatelinkscopes` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2022-12-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/client.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/client.go index c1f8540450a..6ad00026164 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/client.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesClient struct { } func NewPrivateLinkScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_machine.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_machine.go index 8296e6ce9cf..6ff21431e18 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_machine.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_privatelinkscope.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_privatelinkscope.go index ae6a8ccdd75..66f5f5fba5f 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_privatelinkscope.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_providerprivatelinkscope.go index 061c9f3c4cc..c0d123cc5a9 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_createorupdate.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_createorupdate.go index 5d8d8320439..e443fdeae45 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_createorupdate.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, id Provider var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_get.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_get.go index 2373e6b9b13..1d8b307be87 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_get.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) Get(ctx context.Context, id ProviderPrivateLink var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetails.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetails.go index 1c1d43dd361..6b32c351ffa 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetails.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetails.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) GetValidationDetails(ctx context.Context, id Pr var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetailsformachine.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetailsformachine.go index 724c45d8ae9..ee67466fe66 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetailsformachine.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_getvalidationdetailsformachine.go @@ -46,7 +46,6 @@ func (c PrivateLinkScopesClient) GetValidationDetailsForMachine(ctx context.Cont var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_updatetags.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_updatetags.go index 69978b7733a..2b50c500623 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_updatetags.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesClient) UpdateTags(ctx context.Context, id ProviderPriv var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/version.go b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/version.go index 49ccb4a1d30..a50fc04e2d5 100644 --- a/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/version.go +++ b/resource-manager/hybridcompute/2022-12-27/privatelinkscopes/version.go @@ -1,12 +1,10 @@ package privatelinkscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopes/2022-12-27" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/README.md b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/README.md index b5fae131dc5..a0c154b3e58 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/agentversions` Documentation -The `agentversions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `agentversions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/client.go b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/client.go index c41f8ba7e87..43ff0e88098 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/client.go @@ -15,7 +15,7 @@ type AgentVersionsClient struct { } func NewAgentVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agentversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agentversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentVersionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_agentversion.go b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_agentversion.go index c08c9898ffe..3e1ef5876e5 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_agentversion.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_agentversion.go @@ -40,7 +40,7 @@ func ParseAgentVersionID(input string) (*AgentVersionId, error) { } id := AgentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAgentVersionIDInsensitively(input string) (*AgentVersionId, error) { } id := AgentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_ostype.go b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_ostype.go index d0eb4e075bf..d3a59c52ad0 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_ostype.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/id_ostype.go @@ -38,7 +38,7 @@ func ParseOsTypeID(input string) (*OsTypeId, error) { } id := OsTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseOsTypeIDInsensitively(input string) (*OsTypeId, error) { } id := OsTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/method_agentversionget.go b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/method_agentversionget.go index a5638791741..f65b1e9ebcc 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/method_agentversionget.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/method_agentversionget.go @@ -45,7 +45,6 @@ func (c AgentVersionsClient) AgentVersionGet(ctx context.Context, id AgentVersio var model AgentVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/version.go b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/version.go index 4bb0cbde95e..66ffb4eb793 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/agentversions/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/agentversions/version.go @@ -1,12 +1,10 @@ package agentversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agentversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agentversions/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/README.md b/resource-manager/hybridcompute/2024-05-20-preview/extensions/README.md index 47b1c7c78ac..b01439d108e 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `extensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/client.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_extensiontype.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_extensiontype.go index b57b7e61a53..656a969c751 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_extensiontype.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_extensiontype.go @@ -44,7 +44,7 @@ func ParseExtensionTypeID(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionTypeIDInsensitively(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_version.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_version.go index 55ff31c5d3a..81311e23380 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadataget.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadataget.go index 1f50b2ab8e6..495f7669976 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadataget.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadataget.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) ExtensionMetadataGet(ctx context.Context, id VersionId var model ExtensionValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadatalist.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadatalist.go index 1d9af8e54ac..2a1cd841897 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadatalist.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/method_extensionmetadatalist.go @@ -46,7 +46,6 @@ func (c ExtensionsClient) ExtensionMetadataList(ctx context.Context, id Extensio var model ExtensionValueListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/extensions/version.go b/resource-manager/hybridcompute/2024-05-20-preview/extensions/version.go index da791cb5b08..9e757e85e56 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/extensions/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/README.md b/resource-manager/hybridcompute/2024-05-20-preview/gateways/README.md index cf0e0aa9d86..678cfd2dfc2 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/gateways` Documentation -The `gateways` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `gateways` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/client.go b/resource-manager/hybridcompute/2024-05-20-preview/gateways/client.go index 05700fa11b3..619859eca8a 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/client.go @@ -15,7 +15,7 @@ type GatewaysClient struct { } func NewGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*GatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "gateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GatewaysClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/id_gateway.go b/resource-manager/hybridcompute/2024-05-20-preview/gateways/id_gateway.go index cdae5424e3d..252d9bca510 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/id_gateway.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/id_gateway.go @@ -42,7 +42,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_get.go index d517f10c278..b91c910e9eb 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_get.go @@ -45,7 +45,6 @@ func (c GatewaysClient) Get(ctx context.Context, id GatewayId) (result GetOperat var model Gateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_update.go b/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_update.go index b96a6b72f08..2311bdbf3a2 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_update.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/method_update.go @@ -49,7 +49,6 @@ func (c GatewaysClient) Update(ctx context.Context, id GatewayId, input GatewayU var model Gateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/gateways/version.go b/resource-manager/hybridcompute/2024-05-20-preview/gateways/version.go index 3f5ace30b86..90373d7c484 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/gateways/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/gateways/version.go @@ -1,12 +1,10 @@ package gateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/gateways/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/README.md b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/README.md index 99337033e0a..dbd58ad1162 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata` Documentation -The `hybrididentitymetadata` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `hybrididentitymetadata` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/client.go b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/client.go index 597657e5901..94125d9df11 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/client.go @@ -15,7 +15,7 @@ type HybridIdentityMetadataClient struct { } func NewHybridIdentityMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridIdentityMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybrididentitymetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridIdentityMetadataClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_hybrididentitymetadata.go b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_hybrididentitymetadata.go index 24f20541c42..474d27c2bab 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_hybrididentitymetadata.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_hybrididentitymetadata.go @@ -44,7 +44,7 @@ func ParseHybridIdentityMetadataID(input string) (*HybridIdentityMetadataId, err } id := HybridIdentityMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridIdentityMetadataIDInsensitively(input string) (*HybridIdentityMe } id := HybridIdentityMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_machine.go index 175b9d0278c..420bc8ab4be 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/method_get.go index 3aeab72c3b8..6ed3a97b3ef 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/method_get.go @@ -45,7 +45,6 @@ func (c HybridIdentityMetadataClient) Get(ctx context.Context, id HybridIdentity var model HybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/version.go b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/version.go index b497e3f84b8..5df0f315332 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/hybrididentitymetadata/version.go @@ -1,12 +1,10 @@ package hybrididentitymetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybrididentitymetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybrididentitymetadata/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/README.md b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/README.md index a72e585ec63..02938c81d80 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles` Documentation -The `licenseprofiles` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `licenseprofiles` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/client.go b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/client.go index 5fcae28e719..587d7982b51 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/client.go @@ -15,7 +15,7 @@ type LicenseProfilesClient struct { } func NewLicenseProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicenseProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenseprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "licenseprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LicenseProfilesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/id_machine.go index 2ac28229684..26e54db4723 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/method_get.go index dd84a814213..279fdf2630a 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/method_get.go @@ -46,7 +46,6 @@ func (c LicenseProfilesClient) Get(ctx context.Context, id MachineId) (result Ge var model LicenseProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/version.go b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/version.go index 0acecba7b70..f26cf9d150a 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenseprofiles/version.go @@ -1,12 +1,10 @@ package licenseprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/licenseprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/licenseprofiles/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenses/README.md b/resource-manager/hybridcompute/2024-05-20-preview/licenses/README.md index 3a3d4f3e756..fcd9a5e3981 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenses/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/licenses` Documentation -The `licenses` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `licenses` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenses/client.go b/resource-manager/hybridcompute/2024-05-20-preview/licenses/client.go index 238b65f246d..a12e02e31a2 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenses/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenses/client.go @@ -15,7 +15,7 @@ type LicensesClient struct { } func NewLicensesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicensesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "licenses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LicensesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenses/id_license.go b/resource-manager/hybridcompute/2024-05-20-preview/licenses/id_license.go index f188fa4589a..2ad79e1a071 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenses/id_license.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenses/id_license.go @@ -42,7 +42,7 @@ func ParseLicenseID(input string) (*LicenseId, error) { } id := LicenseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLicenseIDInsensitively(input string) (*LicenseId, error) { } id := LicenseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenses/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/licenses/method_get.go index 26b4d3c4e37..7247d371818 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenses/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenses/method_get.go @@ -45,7 +45,6 @@ func (c LicensesClient) Get(ctx context.Context, id LicenseId) (result GetOperat var model License result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/licenses/version.go b/resource-manager/hybridcompute/2024-05-20-preview/licenses/version.go index f9547e596bd..0ea1fc88d29 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/licenses/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/licenses/version.go @@ -1,12 +1,10 @@ package licenses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/licenses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/licenses/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/README.md b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/README.md index bced4614500..b795585699e 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/machineextensions` Documentation -The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `machineextensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/client.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/client.go index a4336266a29..63a73f0818b 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/client.go @@ -15,7 +15,7 @@ type MachineExtensionsClient struct { } func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_extension.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_extension.go index f1f0e73d09b..c38b4bd00f0 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_extension.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_machine.go index 63c29999e35..5c05eb9752a 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_get.go index e21d210a448..de726cb7687 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_get.go @@ -45,7 +45,6 @@ func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (resul var model MachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_list.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_list.go index d9646c3c81e..508180edb27 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_list.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/version.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/version.go index 46b9f70c5b8..e27a9b625c6 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensions/version.go @@ -1,12 +1,10 @@ package machineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensions/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/README.md b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/README.md index 79b7524f7a6..a1c26bd1431 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade` Documentation -The `machineextensionsupgrade` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `machineextensionsupgrade` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/client.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/client.go index c02524534ce..861b4b3e65d 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/client.go @@ -15,7 +15,7 @@ type MachineExtensionsUpgradeClient struct { } func NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsUpgradeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsUpgradeClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/id_machine.go index 0ea82ab4023..19ae176e37c 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/version.go b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/version.go index 36f2962ae23..acd593a75f9 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineextensionsupgrade/version.go @@ -1,12 +1,10 @@ package machineextensionsupgrade -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensionsupgrade/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensionsupgrade/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/README.md b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/README.md index 3bdd1cea1d3..b1ff14cd18e 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile` Documentation -The `machinenetworkprofile` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `machinenetworkprofile` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/client.go b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/client.go index bc8fa58d8d5..0f388f5eceb 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/client.go @@ -15,7 +15,7 @@ type MachineNetworkProfileClient struct { } func NewMachineNetworkProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineNetworkProfileClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinenetworkprofile", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinenetworkprofile", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineNetworkProfileClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/id_machine.go index b70ed79b4f7..a8444530d69 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/method_networkprofileget.go b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/method_networkprofileget.go index 910399bc22b..f442788d530 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/method_networkprofileget.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/method_networkprofileget.go @@ -46,7 +46,6 @@ func (c MachineNetworkProfileClient) NetworkProfileGet(ctx context.Context, id M var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/version.go b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/version.go index 5022dc5d745..9624a95fc57 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machinenetworkprofile/version.go @@ -1,12 +1,10 @@ package machinenetworkprofile -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinenetworkprofile/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinenetworkprofile/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/README.md b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/README.md index e2405d37f05..12c1a67f6aa 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands` Documentation -The `machineruncommands` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `machineruncommands` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/client.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/client.go index bf15572ce3a..f1bca1ef53f 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/client.go @@ -15,7 +15,7 @@ type MachineRunCommandsClient struct { } func NewMachineRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineRunCommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineruncommands", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineruncommands", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineRunCommandsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_machine.go index 66c34fd2284..f6b79e3caa0 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_runcommand.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_runcommand.go index c6412bbab63..a1dd7ed76a9 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_runcommand.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/id_runcommand.go @@ -44,7 +44,7 @@ func ParseRunCommandID(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunCommandIDInsensitively(input string) (*RunCommandId, error) { } id := RunCommandId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_get.go index affc2e0407f..5e4446d620e 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_get.go @@ -45,7 +45,6 @@ func (c MachineRunCommandsClient) Get(ctx context.Context, id RunCommandId) (res var model MachineRunCommand result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_list.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_list.go index 54176d4d560..98097fdb481 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_list.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/version.go b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/version.go index 5fe18b858ea..0c49eb94667 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machineruncommands/version.go @@ -1,12 +1,10 @@ package machineruncommands -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineruncommands/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineruncommands/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/README.md b/resource-manager/hybridcompute/2024-05-20-preview/machines/README.md index 4b059f88b4b..5b619aaf0ac 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `machines` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/client.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/id_machine.go index e8e33b30e0c..fa0b52b3e21 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_createorupdate.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_createorupdate.go index c060ab48849..ae5be2f80e0 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_createorupdate.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_get.go index 4cc80ee5628..dbba4fc2851 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperat var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_listbyresourcegroup.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_listbyresourcegroup.go index 09ec696d1a0..e9302aa8875 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_listbyresourcegroup.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_update.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_update.go index f90641d69c8..2fe776738bf 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/method_update.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/method_update.go @@ -49,7 +49,6 @@ func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineU var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/machines/version.go b/resource-manager/hybridcompute/2024-05-20-preview/machines/version.go index c28dcb3772b..4df2bc7d5ac 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/machines/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/README.md b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/README.md index 3bcc6d6bdb2..b1e9fdf7c7d 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations` Documentation -The `networkconfigurations` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `networkconfigurations` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/client.go b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/client.go index 0fb89cc9283..0d5bd51d9e1 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkConfigurationsClient struct { } func NewNetworkConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkConfigurationsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_createorupdate.go b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_createorupdate.go index 29543b7273e..fff1e513a13 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_createorupdate.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_createorupdate.go @@ -52,7 +52,6 @@ func (c NetworkConfigurationsClient) CreateOrUpdate(ctx context.Context, id comm var model NetworkConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_get.go index f797ab7acba..9d382378535 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_get.go @@ -47,7 +47,6 @@ func (c NetworkConfigurationsClient) Get(ctx context.Context, id commonids.Scope var model NetworkConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_update.go b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_update.go index ac19eef8bc3..de2b6345682 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_update.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/method_update.go @@ -51,7 +51,6 @@ func (c NetworkConfigurationsClient) Update(ctx context.Context, id commonids.Sc var model NetworkConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/version.go b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/version.go index a119668cf1f..98ea92303e6 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networkconfigurations/version.go @@ -1,12 +1,10 @@ package networkconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkconfigurations/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/README.md b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/README.md index b31d578395c..bf951b96516 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration` Documentation -The `networksecurityperimeterconfiguration` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `networksecurityperimeterconfiguration` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/client.go b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/client.go index 0b7238df35f..022b3bda976 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterConfigurationClient struct { } func NewNetworkSecurityPerimeterConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go index a27de93889a..4d1be5c3680 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go index 4905047e58f..55b8d6bf2ba 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go index 7b6e6567476..f2a48a71292 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterConfigurationClient) GetByPrivateLinkScope(ctx c var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/version.go b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/version.go index 1160027b487..5a31bbaba4b 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/networksecurityperimeterconfiguration/version.go @@ -1,12 +1,10 @@ package networksecurityperimeterconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeterconfiguration/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/README.md b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/README.md index 7bafd01e091..37c37082f37 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/client.go b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_privateendpointconnection.go index ac2417fe8c8..8aa5e4ae9ef 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_providerprivatelinkscope.go index 7bd8a7c1186..caf9bc07af7 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/version.go b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/version.go index eec7d08b658..c43fb2e5855 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/README.md b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/README.md index 7775d00e633..07b21823646 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/client.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_privatelinkresource.go index 4f61df268c8..a5298c16516 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_providerprivatelinkscope.go index 37d15fd44e5..a257e460242 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/version.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/version.go index 255ca3c3623..2bc42a64812 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/README.md b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/README.md index b5f031a44a4..9076bf4f6c5 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes` Documentation -The `privatelinkscopes` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `privatelinkscopes` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/client.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/client.go index c1f8540450a..6ad00026164 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesClient struct { } func NewPrivateLinkScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_machine.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_machine.go index 8296e6ce9cf..6ff21431e18 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_machine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_privatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_privatelinkscope.go index ae6a8ccdd75..66f5f5fba5f 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_privatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_providerprivatelinkscope.go index 061c9f3c4cc..c0d123cc5a9 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_createorupdate.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_createorupdate.go index 5d8d8320439..e443fdeae45 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_createorupdate.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, id Provider var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_get.go index 2373e6b9b13..1d8b307be87 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) Get(ctx context.Context, id ProviderPrivateLink var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetails.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetails.go index 1c1d43dd361..6b32c351ffa 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetails.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetails.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) GetValidationDetails(ctx context.Context, id Pr var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetailsformachine.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetailsformachine.go index 724c45d8ae9..ee67466fe66 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetailsformachine.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_getvalidationdetailsformachine.go @@ -46,7 +46,6 @@ func (c PrivateLinkScopesClient) GetValidationDetailsForMachine(ctx context.Cont var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_updatetags.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_updatetags.go index 69978b7733a..2b50c500623 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_updatetags.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesClient) UpdateTags(ctx context.Context, id ProviderPriv var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/version.go b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/version.go index 52cd4ccbac2..09e4feb9605 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/privatelinkscopes/version.go @@ -1,12 +1,10 @@ package privatelinkscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopes/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/README.md b/resource-manager/hybridcompute/2024-05-20-preview/settings/README.md index 5ad65028a33..71818683a93 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/README.md +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-05-20-preview/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-05-20-preview`). +The `settings` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-05-20-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/client.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/client.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/id_scopedsetting.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/id_scopedsetting.go index 0edeaabbb86..b6239716705 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/id_scopedsetting.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/id_scopedsetting.go @@ -40,7 +40,7 @@ func ParseScopedSettingID(input string) (*ScopedSettingId, error) { } id := ScopedSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedSettingIDInsensitively(input string) (*ScopedSettingId, error) { } id := ScopedSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_get.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_get.go index 039370ab6a1..d570f6b5769 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_get.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_get.go @@ -45,7 +45,6 @@ func (c SettingsClient) Get(ctx context.Context, id ScopedSettingId) (result Get var model Settings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_patch.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_patch.go index b39428e5e69..fd9c695fa5b 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_patch.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_patch.go @@ -49,7 +49,6 @@ func (c SettingsClient) Patch(ctx context.Context, id ScopedSettingId, input Set var model Settings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_update.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_update.go index dd57c02bbad..4e3e6429ead 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/method_update.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/method_update.go @@ -50,7 +50,6 @@ func (c SettingsClient) Update(ctx context.Context, id ScopedSettingId, input Se var model Settings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-05-20-preview/settings/version.go b/resource-manager/hybridcompute/2024-05-20-preview/settings/version.go index 10c8ab78c9c..1653865faf8 100644 --- a/resource-manager/hybridcompute/2024-05-20-preview/settings/version.go +++ b/resource-manager/hybridcompute/2024-05-20-preview/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-20-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2024-05-20-preview" } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/README.md b/resource-manager/hybridcompute/2024-07-10/extensions/README.md index 6b1042b3164..51e968460c4 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/README.md +++ b/resource-manager/hybridcompute/2024-07-10/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `extensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/client.go b/resource-manager/hybridcompute/2024-07-10/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/client.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go b/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go index b57b7e61a53..656a969c751 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/id_extensiontype.go @@ -44,7 +44,7 @@ func ParseExtensionTypeID(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionTypeIDInsensitively(input string) (*ExtensionTypeId, error) { } id := ExtensionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go b/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go index 55ff31c5d3a..81311e23380 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go b/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go index 1f50b2ab8e6..495f7669976 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadataget.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) ExtensionMetadataGet(ctx context.Context, id VersionId var model ExtensionValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go b/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go index 1d9af8e54ac..2a1cd841897 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/method_extensionmetadatalist.go @@ -46,7 +46,6 @@ func (c ExtensionsClient) ExtensionMetadataList(ctx context.Context, id Extensio var model ExtensionValueListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/extensions/version.go b/resource-manager/hybridcompute/2024-07-10/extensions/version.go index 01cb89c5423..9b364502839 100644 --- a/resource-manager/hybridcompute/2024-07-10/extensions/version.go +++ b/resource-manager/hybridcompute/2024-07-10/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md index 4cf25ac05ae..012b82a2ec1 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md +++ b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenseprofiles` Documentation -The `licenseprofiles` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `licenseprofiles` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go index 5fcae28e719..587d7982b51 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go +++ b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/client.go @@ -15,7 +15,7 @@ type LicenseProfilesClient struct { } func NewLicenseProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicenseProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenseprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "licenseprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LicenseProfilesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go index 2ac28229684..26e54db4723 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go index dd84a814213..279fdf2630a 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/method_get.go @@ -46,7 +46,6 @@ func (c LicenseProfilesClient) Get(ctx context.Context, id MachineId) (result Ge var model LicenseProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go index a659fd18359..ebbf7c9a286 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go +++ b/resource-manager/hybridcompute/2024-07-10/licenseprofiles/version.go @@ -1,12 +1,10 @@ package licenseprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/licenseprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/licenseprofiles/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/licenses/README.md b/resource-manager/hybridcompute/2024-07-10/licenses/README.md index a9ea84fe609..af271103500 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenses/README.md +++ b/resource-manager/hybridcompute/2024-07-10/licenses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/licenses` Documentation -The `licenses` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `licenses` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/licenses/client.go b/resource-manager/hybridcompute/2024-07-10/licenses/client.go index 238b65f246d..a12e02e31a2 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenses/client.go +++ b/resource-manager/hybridcompute/2024-07-10/licenses/client.go @@ -15,7 +15,7 @@ type LicensesClient struct { } func NewLicensesClientWithBaseURI(sdkApi sdkEnv.Api) (*LicensesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "licenses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "licenses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LicensesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go b/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go index f188fa4589a..2ad79e1a071 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go +++ b/resource-manager/hybridcompute/2024-07-10/licenses/id_license.go @@ -42,7 +42,7 @@ func ParseLicenseID(input string) (*LicenseId, error) { } id := LicenseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLicenseIDInsensitively(input string) (*LicenseId, error) { } id := LicenseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go b/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go index 26b4d3c4e37..7247d371818 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/licenses/method_get.go @@ -45,7 +45,6 @@ func (c LicensesClient) Get(ctx context.Context, id LicenseId) (result GetOperat var model License result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/licenses/version.go b/resource-manager/hybridcompute/2024-07-10/licenses/version.go index 101f4caa13f..a8e7ee4f118 100644 --- a/resource-manager/hybridcompute/2024-07-10/licenses/version.go +++ b/resource-manager/hybridcompute/2024-07-10/licenses/version.go @@ -1,12 +1,10 @@ package licenses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/licenses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/licenses/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md b/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md index 61065b02fec..a715200afe2 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensions` Documentation -The `machineextensions` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `machineextensions` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go index a4336266a29..63a73f0818b 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/client.go @@ -15,7 +15,7 @@ type MachineExtensionsClient struct { } func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go index f1f0e73d09b..c38b4bd00f0 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/id_extension.go @@ -44,7 +44,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go index 63c29999e35..5c05eb9752a 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go index e21d210a448..de726cb7687 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/method_get.go @@ -45,7 +45,6 @@ func (c MachineExtensionsClient) Get(ctx context.Context, id ExtensionId) (resul var model MachineExtension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go index d9646c3c81e..508180edb27 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go b/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go index 80456604fd7..43f6a31e164 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensions/version.go @@ -1,12 +1,10 @@ package machineextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensions/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md index 8b20d3f760b..1884f2a2cb3 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md +++ b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade` Documentation -The `machineextensionsupgrade` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `machineextensionsupgrade` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go index c02524534ce..861b4b3e65d 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/client.go @@ -15,7 +15,7 @@ type MachineExtensionsUpgradeClient struct { } func NewMachineExtensionsUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsUpgradeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machineextensionsupgrade", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineExtensionsUpgradeClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go index 0ea82ab4023..19ae176e37c 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go index ef9d2cfc8d7..13f7ce7932c 100644 --- a/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go +++ b/resource-manager/hybridcompute/2024-07-10/machineextensionsupgrade/version.go @@ -1,12 +1,10 @@ package machineextensionsupgrade -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machineextensionsupgrade/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machineextensionsupgrade/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md index d779afbdd6a..720f14f46c9 100644 --- a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md +++ b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile` Documentation -The `machinenetworkprofile` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `machinenetworkprofile` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go index bc8fa58d8d5..0f388f5eceb 100644 --- a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go +++ b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/client.go @@ -15,7 +15,7 @@ type MachineNetworkProfileClient struct { } func NewMachineNetworkProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineNetworkProfileClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinenetworkprofile", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinenetworkprofile", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineNetworkProfileClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go index b70ed79b4f7..a8444530d69 100644 --- a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go index 910399bc22b..f442788d530 100644 --- a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go +++ b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/method_networkprofileget.go @@ -46,7 +46,6 @@ func (c MachineNetworkProfileClient) NetworkProfileGet(ctx context.Context, id M var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go index 7f7c47f6f6b..0b7dba1c774 100644 --- a/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go +++ b/resource-manager/hybridcompute/2024-07-10/machinenetworkprofile/version.go @@ -1,12 +1,10 @@ package machinenetworkprofile -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinenetworkprofile/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinenetworkprofile/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/README.md b/resource-manager/hybridcompute/2024-07-10/machines/README.md index a3643758d1b..7bc0883bb86 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/README.md +++ b/resource-manager/hybridcompute/2024-07-10/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `machines` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/machines/client.go b/resource-manager/hybridcompute/2024-07-10/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/client.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go b/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go index e8e33b30e0c..fa0b52b3e21 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go b/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go index c060ab48849..ae5be2f80e0 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/method_get.go b/resource-manager/hybridcompute/2024-07-10/machines/method_get.go index 4cc80ee5628..dbba4fc2851 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperat var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go b/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go index 09ec696d1a0..e9302aa8875 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/method_update.go b/resource-manager/hybridcompute/2024-07-10/machines/method_update.go index f90641d69c8..2fe776738bf 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/method_update.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/method_update.go @@ -49,7 +49,6 @@ func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineU var model Machine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/machines/version.go b/resource-manager/hybridcompute/2024-07-10/machines/version.go index d870c04e962..b7e9b98047d 100644 --- a/resource-manager/hybridcompute/2024-07-10/machines/version.go +++ b/resource-manager/hybridcompute/2024-07-10/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md index 3d150646e36..f18474f87c1 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration` Documentation -The `networksecurityperimeterconfiguration` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `networksecurityperimeterconfiguration` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go index 0b7238df35f..022b3bda976 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterConfigurationClient struct { } func NewNetworkSecurityPerimeterConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go index a27de93889a..4d1be5c3680 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go index 4905047e58f..55b8d6bf2ba 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go index 7b6e6567476..f2a48a71292 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/method_getbyprivatelinkscope.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterConfigurationClient) GetByPrivateLinkScope(ctx c var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go index 33af4a462d0..67fa84443f5 100644 --- a/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go +++ b/resource-manager/hybridcompute/2024-07-10/networksecurityperimeterconfiguration/version.go @@ -1,12 +1,10 @@ package networksecurityperimeterconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeterconfiguration/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md index 53eba9e9a95..71297e35f9a 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go index ac2417fe8c8..8aa5e4ae9ef 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go index 7bd8a7c1186..caf9bc07af7 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go index a0b7dbb763e..04452b3ea8c 100644 --- a/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go +++ b/resource-manager/hybridcompute/2024-07-10/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md index 5d5d386e310..09184e2d691 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go index 4f61df268c8..a5298c16516 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go index 37d15fd44e5..a257e460242 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go index 9957fb21f49..98e4c170dd2 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-07-10" } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md index 22a96cc6d5b..003851c8c07 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2024-07-10/privatelinkscopes` Documentation -The `privatelinkscopes` SDK allows for interaction with the Azure Resource Manager Service `hybridcompute` (API Version `2024-07-10`). +The `privatelinkscopes` SDK allows for interaction with Azure Resource Manager `hybridcompute` (API Version `2024-07-10`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go index c1f8540450a..6ad00026164 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesClient struct { } func NewPrivateLinkScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesClient: %+v", err) } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go index 8296e6ce9cf..6ff21431e18 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_machine.go @@ -42,7 +42,7 @@ func ParseMachineID(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMachineIDInsensitively(input string) (*MachineId, error) { } id := MachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go index ae6a8ccdd75..66f5f5fba5f 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go index 061c9f3c4cc..c0d123cc5a9 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/id_providerprivatelinkscope.go @@ -42,7 +42,7 @@ func ParseProviderPrivateLinkScopeID(input string) (*ProviderPrivateLinkScopeId, } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderPrivateLinkScopeIDInsensitively(input string) (*ProviderPrivat } id := ProviderPrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go index 5d8d8320439..e443fdeae45 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, id Provider var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go index 2373e6b9b13..1d8b307be87 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) Get(ctx context.Context, id ProviderPrivateLink var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go index 1c1d43dd361..6b32c351ffa 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetails.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesClient) GetValidationDetails(ctx context.Context, id Pr var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go index 724c45d8ae9..ee67466fe66 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_getvalidationdetailsformachine.go @@ -46,7 +46,6 @@ func (c PrivateLinkScopesClient) GetValidationDetailsForMachine(ctx context.Cont var model PrivateLinkScopeValidationDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go index 69978b7733a..2b50c500623 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesClient) UpdateTags(ctx context.Context, id ProviderPriv var model HybridComputePrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go index e36a79b3d7c..2433be67f15 100644 --- a/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go +++ b/resource-manager/hybridcompute/2024-07-10/privatelinkscopes/version.go @@ -1,12 +1,10 @@ package privatelinkscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-10" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopes/2024-07-10" } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/README.md b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/README.md index 29736a828c9..ca711bf6371 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/README.md +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2021-10-01/connectedclusters` Documentation -The `connectedclusters` SDK allows for interaction with the Azure Resource Manager Service `hybridkubernetes` (API Version `2021-10-01`). +The `connectedclusters` SDK allows for interaction with Azure Resource Manager `hybridkubernetes` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/client.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/client.go index c25ebd209c7..4e88403f750 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/client.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/client.go @@ -15,7 +15,7 @@ type ConnectedClustersClient struct { } func NewConnectedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedClustersClient: %+v", err) } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go index d70d3e3a357..fdbbb1d4a0f 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/id_connectedcluster.go @@ -42,7 +42,7 @@ func ParseConnectedClusterID(input string) (*ConnectedClusterId, error) { } id := ConnectedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedClusterIDInsensitively(input string) (*ConnectedClusterId, er } id := ConnectedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterget.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterget.go index 9ba97354add..8c91b30d6b6 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterget.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterget.go @@ -45,7 +45,6 @@ func (c ConnectedClustersClient) ConnectedClusterGet(ctx context.Context, id Con var model ConnectedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterlistclusterusercredential.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterlistclusterusercredential.go index 6154d1cf231..7196fc5bda3 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterlistclusterusercredential.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterlistclusterusercredential.go @@ -50,7 +50,6 @@ func (c ConnectedClustersClient) ConnectedClusterListClusterUserCredential(ctx c var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterupdate.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterupdate.go index c4a8cbe1c31..ddc758b2cb4 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterupdate.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/method_connectedclusterupdate.go @@ -49,7 +49,6 @@ func (c ConnectedClustersClient) ConnectedClusterUpdate(ctx context.Context, id var model ConnectedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/version.go b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/version.go index 078fe01f8f6..bed66d16b3a 100644 --- a/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/version.go +++ b/resource-manager/hybridkubernetes/2021-10-01/connectedclusters/version.go @@ -1,12 +1,10 @@ package connectedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedclusters/2021-10-01" } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/README.md b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/README.md index 49a0f1ef886..f72b0a3a3c1 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/README.md +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/hybridkubernetes/2024-01-01/connectedclusters` Documentation -The `connectedclusters` SDK allows for interaction with the Azure Resource Manager Service `hybridkubernetes` (API Version `2024-01-01`). +The `connectedclusters` SDK allows for interaction with Azure Resource Manager `hybridkubernetes` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/client.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/client.go index c25ebd209c7..4e88403f750 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/client.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/client.go @@ -15,7 +15,7 @@ type ConnectedClustersClient struct { } func NewConnectedClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedClustersClient: %+v", err) } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/id_connectedcluster.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/id_connectedcluster.go index d70d3e3a357..fdbbb1d4a0f 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/id_connectedcluster.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/id_connectedcluster.go @@ -42,7 +42,7 @@ func ParseConnectedClusterID(input string) (*ConnectedClusterId, error) { } id := ConnectedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectedClusterIDInsensitively(input string) (*ConnectedClusterId, er } id := ConnectedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterget.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterget.go index 9ba97354add..8c91b30d6b6 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterget.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterget.go @@ -45,7 +45,6 @@ func (c ConnectedClustersClient) ConnectedClusterGet(ctx context.Context, id Con var model ConnectedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterlistclusterusercredential.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterlistclusterusercredential.go index 6154d1cf231..7196fc5bda3 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterlistclusterusercredential.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterlistclusterusercredential.go @@ -50,7 +50,6 @@ func (c ConnectedClustersClient) ConnectedClusterListClusterUserCredential(ctx c var model CredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterupdate.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterupdate.go index c4a8cbe1c31..ddc758b2cb4 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterupdate.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/method_connectedclusterupdate.go @@ -49,7 +49,6 @@ func (c ConnectedClustersClient) ConnectedClusterUpdate(ctx context.Context, id var model ConnectedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/version.go b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/version.go index 2e5041f7dcc..b6e9d5c348f 100644 --- a/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/version.go +++ b/resource-manager/hybridkubernetes/2024-01-01/connectedclusters/version.go @@ -1,12 +1,10 @@ package connectedclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedclusters/2024-01-01" } diff --git a/resource-manager/informatica/2024-05-08/organizations/README.md b/resource-manager/informatica/2024-05-08/organizations/README.md index fbf5edd4891..bc978fbc6d5 100644 --- a/resource-manager/informatica/2024-05-08/organizations/README.md +++ b/resource-manager/informatica/2024-05-08/organizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/informatica/2024-05-08/organizations` Documentation -The `organizations` SDK allows for interaction with the Azure Resource Manager Service `informatica` (API Version `2024-05-08`). +The `organizations` SDK allows for interaction with Azure Resource Manager `informatica` (API Version `2024-05-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/informatica/2024-05-08/organizations/client.go b/resource-manager/informatica/2024-05-08/organizations/client.go index 29faa1565c8..913aec6c7a3 100644 --- a/resource-manager/informatica/2024-05-08/organizations/client.go +++ b/resource-manager/informatica/2024-05-08/organizations/client.go @@ -15,7 +15,7 @@ type OrganizationsClient struct { } func NewOrganizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OrganizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "organizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "organizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrganizationsClient: %+v", err) } diff --git a/resource-manager/informatica/2024-05-08/organizations/id_organization.go b/resource-manager/informatica/2024-05-08/organizations/id_organization.go index eaf4fc94818..9037241518e 100644 --- a/resource-manager/informatica/2024-05-08/organizations/id_organization.go +++ b/resource-manager/informatica/2024-05-08/organizations/id_organization.go @@ -42,7 +42,7 @@ func ParseOrganizationID(input string) (*OrganizationId, error) { } id := OrganizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOrganizationIDInsensitively(input string) (*OrganizationId, error) { } id := OrganizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/informatica/2024-05-08/organizations/method_get.go b/resource-manager/informatica/2024-05-08/organizations/method_get.go index 4d8feff527d..53977b0f46a 100644 --- a/resource-manager/informatica/2024-05-08/organizations/method_get.go +++ b/resource-manager/informatica/2024-05-08/organizations/method_get.go @@ -45,7 +45,6 @@ func (c OrganizationsClient) Get(ctx context.Context, id OrganizationId) (result var model InformaticaOrganizationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/organizations/method_getallserverlessruntimes.go b/resource-manager/informatica/2024-05-08/organizations/method_getallserverlessruntimes.go index e8520677a4a..8281e2806ca 100644 --- a/resource-manager/informatica/2024-05-08/organizations/method_getallserverlessruntimes.go +++ b/resource-manager/informatica/2024-05-08/organizations/method_getallserverlessruntimes.go @@ -46,7 +46,6 @@ func (c OrganizationsClient) GetAllServerlessRuntimes(ctx context.Context, id Or var model InformaticaServerlessRuntimeResourceList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/organizations/method_getserverlessmetadata.go b/resource-manager/informatica/2024-05-08/organizations/method_getserverlessmetadata.go index f199bb7130a..13a2ab882cf 100644 --- a/resource-manager/informatica/2024-05-08/organizations/method_getserverlessmetadata.go +++ b/resource-manager/informatica/2024-05-08/organizations/method_getserverlessmetadata.go @@ -46,7 +46,6 @@ func (c OrganizationsClient) GetServerlessMetadata(ctx context.Context, id Organ var model ServerlessMetadataResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/organizations/method_update.go b/resource-manager/informatica/2024-05-08/organizations/method_update.go index d2114ba4277..15af0d4f3ce 100644 --- a/resource-manager/informatica/2024-05-08/organizations/method_update.go +++ b/resource-manager/informatica/2024-05-08/organizations/method_update.go @@ -49,7 +49,6 @@ func (c OrganizationsClient) Update(ctx context.Context, id OrganizationId, inpu var model InformaticaOrganizationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/organizations/version.go b/resource-manager/informatica/2024-05-08/organizations/version.go index 3f252f4eb0d..6ac1cea0284 100644 --- a/resource-manager/informatica/2024-05-08/organizations/version.go +++ b/resource-manager/informatica/2024-05-08/organizations/version.go @@ -1,12 +1,10 @@ package organizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/organizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/organizations/2024-05-08" } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/README.md b/resource-manager/informatica/2024-05-08/serverlessruntimes/README.md index 9d203068947..ea0cd67b643 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/README.md +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/informatica/2024-05-08/serverlessruntimes` Documentation -The `serverlessruntimes` SDK allows for interaction with the Azure Resource Manager Service `informatica` (API Version `2024-05-08`). +The `serverlessruntimes` SDK allows for interaction with Azure Resource Manager `informatica` (API Version `2024-05-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/client.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/client.go index a024620bd4c..cbb929a010f 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/client.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/client.go @@ -15,7 +15,7 @@ type ServerlessRuntimesClient struct { } func NewServerlessRuntimesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerlessRuntimesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverlessruntimes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverlessruntimes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerlessRuntimesClient: %+v", err) } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/id_organization.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/id_organization.go index f57888b9350..6732e0d1a30 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/id_organization.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/id_organization.go @@ -42,7 +42,7 @@ func ParseOrganizationID(input string) (*OrganizationId, error) { } id := OrganizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOrganizationIDInsensitively(input string) (*OrganizationId, error) { } id := OrganizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/id_serverlessruntime.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/id_serverlessruntime.go index f10310e0624..bf8ecb91aaf 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/id_serverlessruntime.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/id_serverlessruntime.go @@ -44,7 +44,7 @@ func ParseServerlessRuntimeID(input string) (*ServerlessRuntimeId, error) { } id := ServerlessRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerlessRuntimeIDInsensitively(input string) (*ServerlessRuntimeId, } id := ServerlessRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_checkdependencies.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_checkdependencies.go index 2db8522d86f..ed6b57dc114 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_checkdependencies.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_checkdependencies.go @@ -46,7 +46,6 @@ func (c ServerlessRuntimesClient) CheckDependencies(ctx context.Context, id Serv var model CheckDependenciesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_get.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_get.go index 6cd69de55ec..f6a6b2a3bf2 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_get.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_get.go @@ -45,7 +45,6 @@ func (c ServerlessRuntimesClient) Get(ctx context.Context, id ServerlessRuntimeI var model InformaticaServerlessRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_serverlessresourcebyid.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_serverlessresourcebyid.go index 5ffc0ac35cb..f4533f31b62 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_serverlessresourcebyid.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_serverlessresourcebyid.go @@ -46,7 +46,6 @@ func (c ServerlessRuntimesClient) ServerlessResourceById(ctx context.Context, id var model InformaticaServerlessRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_update.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_update.go index eb059ad6ba7..2277a2fef09 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/method_update.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/method_update.go @@ -49,7 +49,6 @@ func (c ServerlessRuntimesClient) Update(ctx context.Context, id ServerlessRunti var model InformaticaServerlessRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/informatica/2024-05-08/serverlessruntimes/version.go b/resource-manager/informatica/2024-05-08/serverlessruntimes/version.go index 61d50b549ae..bedaf6f8d2b 100644 --- a/resource-manager/informatica/2024-05-08/serverlessruntimes/version.go +++ b/resource-manager/informatica/2024-05-08/serverlessruntimes/version.go @@ -1,12 +1,10 @@ package serverlessruntimes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-05-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverlessruntimes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverlessruntimes/2024-05-08" } diff --git a/resource-manager/insights/2015-04-01/activitylogs/README.md b/resource-manager/insights/2015-04-01/activitylogs/README.md index 1d1f3a99a4d..642686d455e 100644 --- a/resource-manager/insights/2015-04-01/activitylogs/README.md +++ b/resource-manager/insights/2015-04-01/activitylogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/activitylogs` Documentation -The `activitylogs` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2015-04-01`). +The `activitylogs` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2015-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2015-04-01/activitylogs/client.go b/resource-manager/insights/2015-04-01/activitylogs/client.go index 154f856b0a6..69054f44af6 100644 --- a/resource-manager/insights/2015-04-01/activitylogs/client.go +++ b/resource-manager/insights/2015-04-01/activitylogs/client.go @@ -15,7 +15,7 @@ type ActivityLogsClient struct { } func NewActivityLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activitylogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activitylogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityLogsClient: %+v", err) } diff --git a/resource-manager/insights/2015-04-01/activitylogs/method_list.go b/resource-manager/insights/2015-04-01/activitylogs/method_list.go index 5d3d59051b8..8bf9b472de3 100644 --- a/resource-manager/insights/2015-04-01/activitylogs/method_list.go +++ b/resource-manager/insights/2015-04-01/activitylogs/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/insights/2015-04-01/activitylogs/version.go b/resource-manager/insights/2015-04-01/activitylogs/version.go index 2cd33777046..a3e899ebeed 100644 --- a/resource-manager/insights/2015-04-01/activitylogs/version.go +++ b/resource-manager/insights/2015-04-01/activitylogs/version.go @@ -1,12 +1,10 @@ package activitylogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activitylogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activitylogs/2015-04-01" } diff --git a/resource-manager/insights/2015-04-01/autoscaleapis/README.md b/resource-manager/insights/2015-04-01/autoscaleapis/README.md index f914dc129e5..6e1a90e1849 100644 --- a/resource-manager/insights/2015-04-01/autoscaleapis/README.md +++ b/resource-manager/insights/2015-04-01/autoscaleapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/autoscaleapis` Documentation -The `autoscaleapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2015-04-01`). +The `autoscaleapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2015-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2015-04-01/autoscaleapis/client.go b/resource-manager/insights/2015-04-01/autoscaleapis/client.go index 9152c2b293c..a2d624b8ac6 100644 --- a/resource-manager/insights/2015-04-01/autoscaleapis/client.go +++ b/resource-manager/insights/2015-04-01/autoscaleapis/client.go @@ -15,7 +15,7 @@ type AutoscaleAPIsClient struct { } func NewAutoscaleAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoscaleAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscaleapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscaleapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoscaleAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2015-04-01/autoscaleapis/id_autoscalesetting.go b/resource-manager/insights/2015-04-01/autoscaleapis/id_autoscalesetting.go index cd1ab32ea05..7d31f2eac81 100644 --- a/resource-manager/insights/2015-04-01/autoscaleapis/id_autoscalesetting.go +++ b/resource-manager/insights/2015-04-01/autoscaleapis/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2015-04-01/autoscaleapis/method_autoscalesettingsupdate.go b/resource-manager/insights/2015-04-01/autoscaleapis/method_autoscalesettingsupdate.go index bbd3fb32cb4..3e7372457eb 100644 --- a/resource-manager/insights/2015-04-01/autoscaleapis/method_autoscalesettingsupdate.go +++ b/resource-manager/insights/2015-04-01/autoscaleapis/method_autoscalesettingsupdate.go @@ -49,7 +49,6 @@ func (c AutoscaleAPIsClient) AutoscaleSettingsUpdate(ctx context.Context, id Aut var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2015-04-01/autoscaleapis/version.go b/resource-manager/insights/2015-04-01/autoscaleapis/version.go index 86d8cbcdc4d..2d878243c81 100644 --- a/resource-manager/insights/2015-04-01/autoscaleapis/version.go +++ b/resource-manager/insights/2015-04-01/autoscaleapis/version.go @@ -1,12 +1,10 @@ package autoscaleapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscaleapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscaleapis/2015-04-01" } diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/README.md b/resource-manager/insights/2015-04-01/autoscalesettings/README.md index 2ef5e393230..26c26664fae 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/README.md +++ b/resource-manager/insights/2015-04-01/autoscalesettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/autoscalesettings` Documentation -The `autoscalesettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2015-04-01`). +The `autoscalesettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2015-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/client.go b/resource-manager/insights/2015-04-01/autoscalesettings/client.go index 6af68634bcc..06f51675ed3 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/client.go +++ b/resource-manager/insights/2015-04-01/autoscalesettings/client.go @@ -15,7 +15,7 @@ type AutoScaleSettingsClient struct { } func NewAutoScaleSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoScaleSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscalesettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscalesettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoScaleSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/id_autoscalesetting.go b/resource-manager/insights/2015-04-01/autoscalesettings/id_autoscalesetting.go index 5d89ae07420..d801cee9333 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/id_autoscalesetting.go +++ b/resource-manager/insights/2015-04-01/autoscalesettings/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/method_createorupdate.go b/resource-manager/insights/2015-04-01/autoscalesettings/method_createorupdate.go index e7e33bd60bf..dba9a4bdeb6 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/method_createorupdate.go +++ b/resource-manager/insights/2015-04-01/autoscalesettings/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutoScaleSettingsClient) CreateOrUpdate(ctx context.Context, id AutoScal var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/method_get.go b/resource-manager/insights/2015-04-01/autoscalesettings/method_get.go index 2d2cfaa8591..48a8c08cb60 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/method_get.go +++ b/resource-manager/insights/2015-04-01/autoscalesettings/method_get.go @@ -45,7 +45,6 @@ func (c AutoScaleSettingsClient) Get(ctx context.Context, id AutoScaleSettingId) var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2015-04-01/autoscalesettings/version.go b/resource-manager/insights/2015-04-01/autoscalesettings/version.go index b51f89781bf..d5787dd7420 100644 --- a/resource-manager/insights/2015-04-01/autoscalesettings/version.go +++ b/resource-manager/insights/2015-04-01/autoscalesettings/version.go @@ -1,12 +1,10 @@ package autoscalesettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscalesettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscalesettings/2015-04-01" } diff --git a/resource-manager/insights/2015-04-01/eventcategories/README.md b/resource-manager/insights/2015-04-01/eventcategories/README.md index 6443fae272f..c7ff4f6c69d 100644 --- a/resource-manager/insights/2015-04-01/eventcategories/README.md +++ b/resource-manager/insights/2015-04-01/eventcategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/eventcategories` Documentation -The `eventcategories` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2015-04-01`). +The `eventcategories` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2015-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2015-04-01/eventcategories/client.go b/resource-manager/insights/2015-04-01/eventcategories/client.go index 9bef9aeb987..4e42710f907 100644 --- a/resource-manager/insights/2015-04-01/eventcategories/client.go +++ b/resource-manager/insights/2015-04-01/eventcategories/client.go @@ -15,7 +15,7 @@ type EventCategoriesClient struct { } func NewEventCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*EventCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventcategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventcategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventCategoriesClient: %+v", err) } diff --git a/resource-manager/insights/2015-04-01/eventcategories/method_list.go b/resource-manager/insights/2015-04-01/eventcategories/method_list.go index af47fd6e3ee..048cb783c99 100644 --- a/resource-manager/insights/2015-04-01/eventcategories/method_list.go +++ b/resource-manager/insights/2015-04-01/eventcategories/method_list.go @@ -45,7 +45,6 @@ func (c EventCategoriesClient) List(ctx context.Context) (result ListOperationRe var model EventCategoryCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2015-04-01/eventcategories/version.go b/resource-manager/insights/2015-04-01/eventcategories/version.go index db385ef05c9..546dbf3e4d4 100644 --- a/resource-manager/insights/2015-04-01/eventcategories/version.go +++ b/resource-manager/insights/2015-04-01/eventcategories/version.go @@ -1,12 +1,10 @@ package eventcategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventcategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventcategories/2015-04-01" } diff --git a/resource-manager/insights/2015-04-01/tenantactivitylogs/README.md b/resource-manager/insights/2015-04-01/tenantactivitylogs/README.md index e29ddcae419..ab3244dd3e2 100644 --- a/resource-manager/insights/2015-04-01/tenantactivitylogs/README.md +++ b/resource-manager/insights/2015-04-01/tenantactivitylogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/tenantactivitylogs` Documentation -The `tenantactivitylogs` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2015-04-01`). +The `tenantactivitylogs` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2015-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2015-04-01/tenantactivitylogs/client.go b/resource-manager/insights/2015-04-01/tenantactivitylogs/client.go index 5a6c016f717..cc5136fcf64 100644 --- a/resource-manager/insights/2015-04-01/tenantactivitylogs/client.go +++ b/resource-manager/insights/2015-04-01/tenantactivitylogs/client.go @@ -15,7 +15,7 @@ type TenantActivityLogsClient struct { } func NewTenantActivityLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantActivityLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantactivitylogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantactivitylogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantActivityLogsClient: %+v", err) } diff --git a/resource-manager/insights/2015-04-01/tenantactivitylogs/method_list.go b/resource-manager/insights/2015-04-01/tenantactivitylogs/method_list.go index ae54dc4863d..ef7aa04430a 100644 --- a/resource-manager/insights/2015-04-01/tenantactivitylogs/method_list.go +++ b/resource-manager/insights/2015-04-01/tenantactivitylogs/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/insights/2015-04-01/tenantactivitylogs/version.go b/resource-manager/insights/2015-04-01/tenantactivitylogs/version.go index 3ec1c88f34e..41bb27467fd 100644 --- a/resource-manager/insights/2015-04-01/tenantactivitylogs/version.go +++ b/resource-manager/insights/2015-04-01/tenantactivitylogs/version.go @@ -1,12 +1,10 @@ package tenantactivitylogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantactivitylogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantactivitylogs/2015-04-01" } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/README.md b/resource-manager/insights/2016-03-01/alertruleincidents/README.md index 25c2de12219..be55f7ea7e1 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/README.md +++ b/resource-manager/insights/2016-03-01/alertruleincidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/alertruleincidents` Documentation -The `alertruleincidents` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `alertruleincidents` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/client.go b/resource-manager/insights/2016-03-01/alertruleincidents/client.go index e693c363837..99840e712e7 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/client.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/client.go @@ -15,7 +15,7 @@ type AlertRuleIncidentsClient struct { } func NewAlertRuleIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleIncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruleincidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruleincidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleIncidentsClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/id_alertrule.go b/resource-manager/insights/2016-03-01/alertruleincidents/id_alertrule.go index d5e22b39d69..02979dfa284 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/id_alertrule.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/id_alertrule.go @@ -42,7 +42,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/id_incident.go b/resource-manager/insights/2016-03-01/alertruleincidents/id_incident.go index 1277f522b0b..d0a31be178e 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/id_incident.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/method_get.go b/resource-manager/insights/2016-03-01/alertruleincidents/method_get.go index 16d15eb993a..45ce6611339 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/method_get.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/method_get.go @@ -45,7 +45,6 @@ func (c AlertRuleIncidentsClient) Get(ctx context.Context, id IncidentId) (resul var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/method_listbyalertrule.go b/resource-manager/insights/2016-03-01/alertruleincidents/method_listbyalertrule.go index 6750100edfa..d1bb38db663 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/method_listbyalertrule.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/method_listbyalertrule.go @@ -46,7 +46,6 @@ func (c AlertRuleIncidentsClient) ListByAlertRule(ctx context.Context, id AlertR var model IncidentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertruleincidents/version.go b/resource-manager/insights/2016-03-01/alertruleincidents/version.go index e005a091f72..0bf2ba3b13f 100644 --- a/resource-manager/insights/2016-03-01/alertruleincidents/version.go +++ b/resource-manager/insights/2016-03-01/alertruleincidents/version.go @@ -1,12 +1,10 @@ package alertruleincidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruleincidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruleincidents/2016-03-01" } diff --git a/resource-manager/insights/2016-03-01/alertrules/README.md b/resource-manager/insights/2016-03-01/alertrules/README.md index e226b10cf2b..4c0ea45425d 100644 --- a/resource-manager/insights/2016-03-01/alertrules/README.md +++ b/resource-manager/insights/2016-03-01/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/alertrules/client.go b/resource-manager/insights/2016-03-01/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/insights/2016-03-01/alertrules/client.go +++ b/resource-manager/insights/2016-03-01/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrules/id_alertrule.go b/resource-manager/insights/2016-03-01/alertrules/id_alertrule.go index 8332b86f312..e9eb5d241a7 100644 --- a/resource-manager/insights/2016-03-01/alertrules/id_alertrule.go +++ b/resource-manager/insights/2016-03-01/alertrules/id_alertrule.go @@ -42,7 +42,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/alertrules/method_createorupdate.go b/resource-manager/insights/2016-03-01/alertrules/method_createorupdate.go index bf19e449787..f681e149c3f 100644 --- a/resource-manager/insights/2016-03-01/alertrules/method_createorupdate.go +++ b/resource-manager/insights/2016-03-01/alertrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in var model AlertRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertrules/method_get.go b/resource-manager/insights/2016-03-01/alertrules/method_get.go index 64ad4d2a1bf..a48a9af89ad 100644 --- a/resource-manager/insights/2016-03-01/alertrules/method_get.go +++ b/resource-manager/insights/2016-03-01/alertrules/method_get.go @@ -45,7 +45,6 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp var model AlertRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertrules/method_listbyresourcegroup.go b/resource-manager/insights/2016-03-01/alertrules/method_listbyresourcegroup.go index 40517de9277..8ab3cb7400e 100644 --- a/resource-manager/insights/2016-03-01/alertrules/method_listbyresourcegroup.go +++ b/resource-manager/insights/2016-03-01/alertrules/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c AlertRulesClient) ListByResourceGroup(ctx context.Context, id commonids. var model AlertRuleResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertrules/method_listbysubscription.go b/resource-manager/insights/2016-03-01/alertrules/method_listbysubscription.go index 16e647e34a9..1730ff7e01f 100644 --- a/resource-manager/insights/2016-03-01/alertrules/method_listbysubscription.go +++ b/resource-manager/insights/2016-03-01/alertrules/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c AlertRulesClient) ListBySubscription(ctx context.Context, id commonids.S var model AlertRuleResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_alertrule.go b/resource-manager/insights/2016-03-01/alertrules/model_alertrule.go index d5cef49908b..c07ff8df4f8 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_alertrule.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_alertrule.go @@ -55,7 +55,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["action"]; ok { - impl, err := unmarshalRuleActionImplementation(v) + impl, err := UnmarshalRuleActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Action' for 'AlertRule': %+v", err) } @@ -70,7 +70,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { output := make([]RuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalRuleActionImplementation(val) + impl, err := UnmarshalRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AlertRule': %+v", i, err) } @@ -80,7 +80,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["condition"]; ok { - impl, err := unmarshalRuleConditionImplementation(v) + impl, err := UnmarshalRuleConditionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Condition' for 'AlertRule': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_locationthresholdrulecondition.go b/resource-manager/insights/2016-03-01/alertrules/model_locationthresholdrulecondition.go index f3653330b99..1f01c731ce6 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_locationthresholdrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_locationthresholdrulecondition.go @@ -15,7 +15,16 @@ type LocationThresholdRuleCondition struct { WindowSize *string `json:"windowSize,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s LocationThresholdRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = LocationThresholdRuleCondition{} @@ -29,9 +38,10 @@ func (s LocationThresholdRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LocationThresholdRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" encoded, err = json.Marshal(decoded) @@ -52,6 +62,7 @@ func (s *LocationThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } s.FailedLocationCount = decoded.FailedLocationCount + s.OdataType = decoded.OdataType s.WindowSize = decoded.WindowSize var temp map[string]json.RawMessage @@ -60,7 +71,7 @@ func (s *LocationThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'LocationThresholdRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_managementeventrulecondition.go b/resource-manager/insights/2016-03-01/alertrules/model_managementeventrulecondition.go index 5ee23d1ea05..771de452994 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_managementeventrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_managementeventrulecondition.go @@ -14,7 +14,16 @@ type ManagementEventRuleCondition struct { Aggregation *ManagementEventAggregationCondition `json:"aggregation,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s ManagementEventRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = ManagementEventRuleCondition{} @@ -28,9 +37,10 @@ func (s ManagementEventRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagementEventRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *ManagementEventRuleCondition) UnmarshalJSON(bytes []byte) error { } s.Aggregation = decoded.Aggregation + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +69,7 @@ func (s *ManagementEventRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'ManagementEventRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_ruleaction.go b/resource-manager/insights/2016-03-01/alertrules/model_ruleaction.go index a30be512458..fded43e1b62 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_ruleaction.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_ruleaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleAction interface { + RuleAction() BaseRuleActionImpl } -// RawRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleAction = BaseRuleActionImpl{} + +type BaseRuleActionImpl struct { + OdataType string `json:"odata.type"` +} + +func (s BaseRuleActionImpl) RuleAction() BaseRuleActionImpl { + return s +} + +var _ RuleAction = RawRuleActionImpl{} + +// RawRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleActionImpl struct { - Type string - Values map[string]interface{} + ruleAction BaseRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleActionImpl) RuleAction() BaseRuleActionImpl { + return s.ruleAction } -func unmarshalRuleActionImplementation(input []byte) (RuleAction, error) { +func UnmarshalRuleActionImplementation(input []byte) (RuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRuleActionImplementation(input []byte) (RuleAction, error) { return out, nil } - out := RawRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleActionImpl: %+v", err) } - return out, nil + + return RawRuleActionImpl{ + ruleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_rulecondition.go b/resource-manager/insights/2016-03-01/alertrules/model_rulecondition.go index 9948ee92208..d9897208fb3 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_rulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_rulecondition.go @@ -10,18 +10,62 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleCondition interface { + RuleCondition() BaseRuleConditionImpl } -// RawRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleCondition = BaseRuleConditionImpl{} + +type BaseRuleConditionImpl struct { + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s BaseRuleConditionImpl) RuleCondition() BaseRuleConditionImpl { + return s +} + +var _ RuleCondition = RawRuleConditionImpl{} + +// RawRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleConditionImpl struct { - Type string - Values map[string]interface{} + ruleCondition BaseRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleConditionImpl) RuleCondition() BaseRuleConditionImpl { + return s.ruleCondition } -func unmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { +var _ json.Unmarshaler = &BaseRuleConditionImpl{} + +func (s *BaseRuleConditionImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseRuleConditionImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseRuleConditionImpl: %+v", err) + } + + s.OdataType = decoded.OdataType + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseRuleConditionImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["dataSource"]; ok { + impl, err := UnmarshalRuleDataSourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'DataSource' for 'BaseRuleConditionImpl': %+v", err) + } + s.DataSource = impl + } + return nil +} + +func UnmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { if input == nil { return nil, nil } @@ -60,10 +104,15 @@ func unmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { return out, nil } - out := RawRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleConditionImpl: %+v", err) } - return out, nil + + return RawRuleConditionImpl{ + ruleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_ruledatasource.go b/resource-manager/insights/2016-03-01/alertrules/model_ruledatasource.go index 6860a80fc80..fd0fc9d299a 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_ruledatasource.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_ruledatasource.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleDataSource interface { + RuleDataSource() BaseRuleDataSourceImpl } -// RawRuleDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleDataSource = BaseRuleDataSourceImpl{} + +type BaseRuleDataSourceImpl struct { + LegacyResourceId *string `json:"legacyResourceId,omitempty"` + MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` + ResourceLocation *string `json:"resourceLocation,omitempty"` + ResourceUri *string `json:"resourceUri,omitempty"` +} + +func (s BaseRuleDataSourceImpl) RuleDataSource() BaseRuleDataSourceImpl { + return s +} + +var _ RuleDataSource = RawRuleDataSourceImpl{} + +// RawRuleDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleDataSourceImpl struct { - Type string - Values map[string]interface{} + ruleDataSource BaseRuleDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleDataSourceImpl) RuleDataSource() BaseRuleDataSourceImpl { + return s.ruleDataSource } -func unmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) { +func UnmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) return out, nil } - out := RawRuleDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseRuleDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleDataSourceImpl: %+v", err) } - return out, nil + + return RawRuleDataSourceImpl{ + ruleDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrules/model_ruleemailaction.go b/resource-manager/insights/2016-03-01/alertrules/model_ruleemailaction.go index bf241927638..9d2ebd3298b 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_ruleemailaction.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_ruleemailaction.go @@ -15,6 +15,14 @@ type RuleEmailAction struct { SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` // Fields inherited from RuleAction + + OdataType string `json:"odata.type"` +} + +func (s RuleEmailAction) RuleAction() BaseRuleActionImpl { + return BaseRuleActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RuleEmailAction{} @@ -28,9 +36,10 @@ func (s RuleEmailAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleEmailAction: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrules/model_rulemanagementeventdatasource.go b/resource-manager/insights/2016-03-01/alertrules/model_rulemanagementeventdatasource.go index 0804ed99066..7911ff25829 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_rulemanagementeventdatasource.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_rulemanagementeventdatasource.go @@ -22,12 +22,24 @@ type RuleManagementEventDataSource struct { SubStatus *string `json:"subStatus,omitempty"` // Fields inherited from RuleDataSource + LegacyResourceId *string `json:"legacyResourceId,omitempty"` MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` ResourceLocation *string `json:"resourceLocation,omitempty"` ResourceUri *string `json:"resourceUri,omitempty"` } +func (s RuleManagementEventDataSource) RuleDataSource() BaseRuleDataSourceImpl { + return BaseRuleDataSourceImpl{ + LegacyResourceId: s.LegacyResourceId, + MetricNamespace: s.MetricNamespace, + OdataType: s.OdataType, + ResourceLocation: s.ResourceLocation, + ResourceUri: s.ResourceUri, + } +} + var _ json.Marshaler = RuleManagementEventDataSource{} func (s RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleManagementEventDataSource: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrules/model_rulemetricdatasource.go b/resource-manager/insights/2016-03-01/alertrules/model_rulemetricdatasource.go index 032476e42b5..dd8980d2086 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_rulemetricdatasource.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_rulemetricdatasource.go @@ -14,12 +14,24 @@ type RuleMetricDataSource struct { MetricName *string `json:"metricName,omitempty"` // Fields inherited from RuleDataSource + LegacyResourceId *string `json:"legacyResourceId,omitempty"` MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` ResourceLocation *string `json:"resourceLocation,omitempty"` ResourceUri *string `json:"resourceUri,omitempty"` } +func (s RuleMetricDataSource) RuleDataSource() BaseRuleDataSourceImpl { + return BaseRuleDataSourceImpl{ + LegacyResourceId: s.LegacyResourceId, + MetricNamespace: s.MetricNamespace, + OdataType: s.OdataType, + ResourceLocation: s.ResourceLocation, + ResourceUri: s.ResourceUri, + } +} + var _ json.Marshaler = RuleMetricDataSource{} func (s RuleMetricDataSource) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s RuleMetricDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleMetricDataSource: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrules/model_rulewebhookaction.go b/resource-manager/insights/2016-03-01/alertrules/model_rulewebhookaction.go index b5e5117f46d..49cd3d5c785 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_rulewebhookaction.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_rulewebhookaction.go @@ -15,6 +15,14 @@ type RuleWebhookAction struct { ServiceUri *string `json:"serviceUri,omitempty"` // Fields inherited from RuleAction + + OdataType string `json:"odata.type"` +} + +func (s RuleWebhookAction) RuleAction() BaseRuleActionImpl { + return BaseRuleActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RuleWebhookAction{} @@ -28,9 +36,10 @@ func (s RuleWebhookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleWebhookAction: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrules/model_thresholdrulecondition.go b/resource-manager/insights/2016-03-01/alertrules/model_thresholdrulecondition.go index e70af22d4d7..550bf5b3626 100644 --- a/resource-manager/insights/2016-03-01/alertrules/model_thresholdrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrules/model_thresholdrulecondition.go @@ -17,7 +17,16 @@ type ThresholdRuleCondition struct { WindowSize *string `json:"windowSize,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s ThresholdRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = ThresholdRuleCondition{} @@ -31,9 +40,10 @@ func (s ThresholdRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThresholdRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" encoded, err = json.Marshal(decoded) @@ -53,6 +63,7 @@ func (s *ThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into ThresholdRuleCondition: %+v", err) } + s.OdataType = decoded.OdataType s.Operator = decoded.Operator s.Threshold = decoded.Threshold s.TimeAggregation = decoded.TimeAggregation @@ -64,7 +75,7 @@ func (s *ThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'ThresholdRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrules/version.go b/resource-manager/insights/2016-03-01/alertrules/version.go index 177f41bad3b..2347bc45021 100644 --- a/resource-manager/insights/2016-03-01/alertrules/version.go +++ b/resource-manager/insights/2016-03-01/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2016-03-01" } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/README.md b/resource-manager/insights/2016-03-01/alertrulesapis/README.md index 2a3325f844d..fabe0a968ff 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/README.md +++ b/resource-manager/insights/2016-03-01/alertrulesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/alertrulesapis` Documentation -The `alertrulesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `alertrulesapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/client.go b/resource-manager/insights/2016-03-01/alertrulesapis/client.go index d627047f64b..cedaaec22d8 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/client.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/client.go @@ -15,7 +15,7 @@ type AlertRulesAPIsClient struct { } func NewAlertRulesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrulesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrulesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/id_alertrule.go b/resource-manager/insights/2016-03-01/alertrulesapis/id_alertrule.go index 32ccf355559..bc8ff68695e 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/id_alertrule.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/id_alertrule.go @@ -42,7 +42,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/method_alertrulesupdate.go b/resource-manager/insights/2016-03-01/alertrulesapis/method_alertrulesupdate.go index 71aab949fcc..f0bdf812654 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/method_alertrulesupdate.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/method_alertrulesupdate.go @@ -50,7 +50,6 @@ func (c AlertRulesAPIsClient) AlertRulesUpdate(ctx context.Context, id AlertRule var model AlertRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_alertrule.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_alertrule.go index f53e971a8cc..223fb03f734 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_alertrule.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_alertrule.go @@ -55,7 +55,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["action"]; ok { - impl, err := unmarshalRuleActionImplementation(v) + impl, err := UnmarshalRuleActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Action' for 'AlertRule': %+v", err) } @@ -70,7 +70,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { output := make([]RuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalRuleActionImplementation(val) + impl, err := UnmarshalRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AlertRule': %+v", i, err) } @@ -80,7 +80,7 @@ func (s *AlertRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["condition"]; ok { - impl, err := unmarshalRuleConditionImplementation(v) + impl, err := UnmarshalRuleConditionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Condition' for 'AlertRule': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_locationthresholdrulecondition.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_locationthresholdrulecondition.go index d98fd3ba483..fbf47662644 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_locationthresholdrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_locationthresholdrulecondition.go @@ -15,7 +15,16 @@ type LocationThresholdRuleCondition struct { WindowSize *string `json:"windowSize,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s LocationThresholdRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = LocationThresholdRuleCondition{} @@ -29,9 +38,10 @@ func (s LocationThresholdRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LocationThresholdRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" encoded, err = json.Marshal(decoded) @@ -52,6 +62,7 @@ func (s *LocationThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } s.FailedLocationCount = decoded.FailedLocationCount + s.OdataType = decoded.OdataType s.WindowSize = decoded.WindowSize var temp map[string]json.RawMessage @@ -60,7 +71,7 @@ func (s *LocationThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'LocationThresholdRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_managementeventrulecondition.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_managementeventrulecondition.go index 02cb8513bb8..618d3c2dfd1 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_managementeventrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_managementeventrulecondition.go @@ -14,7 +14,16 @@ type ManagementEventRuleCondition struct { Aggregation *ManagementEventAggregationCondition `json:"aggregation,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s ManagementEventRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = ManagementEventRuleCondition{} @@ -28,9 +37,10 @@ func (s ManagementEventRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagementEventRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *ManagementEventRuleCondition) UnmarshalJSON(bytes []byte) error { } s.Aggregation = decoded.Aggregation + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +69,7 @@ func (s *ManagementEventRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'ManagementEventRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleaction.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleaction.go index a8ee65366d9..e59a4ea1f9a 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleaction.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleAction interface { + RuleAction() BaseRuleActionImpl } -// RawRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleAction = BaseRuleActionImpl{} + +type BaseRuleActionImpl struct { + OdataType string `json:"odata.type"` +} + +func (s BaseRuleActionImpl) RuleAction() BaseRuleActionImpl { + return s +} + +var _ RuleAction = RawRuleActionImpl{} + +// RawRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleActionImpl struct { - Type string - Values map[string]interface{} + ruleAction BaseRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleActionImpl) RuleAction() BaseRuleActionImpl { + return s.ruleAction } -func unmarshalRuleActionImplementation(input []byte) (RuleAction, error) { +func UnmarshalRuleActionImplementation(input []byte) (RuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRuleActionImplementation(input []byte) (RuleAction, error) { return out, nil } - out := RawRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleActionImpl: %+v", err) } - return out, nil + + return RawRuleActionImpl{ + ruleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulecondition.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulecondition.go index a4fa7408c73..6828414f6f2 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulecondition.go @@ -10,18 +10,62 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleCondition interface { + RuleCondition() BaseRuleConditionImpl } -// RawRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleCondition = BaseRuleConditionImpl{} + +type BaseRuleConditionImpl struct { + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s BaseRuleConditionImpl) RuleCondition() BaseRuleConditionImpl { + return s +} + +var _ RuleCondition = RawRuleConditionImpl{} + +// RawRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleConditionImpl struct { - Type string - Values map[string]interface{} + ruleCondition BaseRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleConditionImpl) RuleCondition() BaseRuleConditionImpl { + return s.ruleCondition } -func unmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { +var _ json.Unmarshaler = &BaseRuleConditionImpl{} + +func (s *BaseRuleConditionImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseRuleConditionImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseRuleConditionImpl: %+v", err) + } + + s.OdataType = decoded.OdataType + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseRuleConditionImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["dataSource"]; ok { + impl, err := UnmarshalRuleDataSourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'DataSource' for 'BaseRuleConditionImpl': %+v", err) + } + s.DataSource = impl + } + return nil +} + +func UnmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { if input == nil { return nil, nil } @@ -60,10 +104,15 @@ func unmarshalRuleConditionImplementation(input []byte) (RuleCondition, error) { return out, nil } - out := RawRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleConditionImpl: %+v", err) } - return out, nil + + return RawRuleConditionImpl{ + ruleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruledatasource.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruledatasource.go index 3fa4ae4f6e0..d6d5c2b2c9a 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruledatasource.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruledatasource.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RuleDataSource interface { + RuleDataSource() BaseRuleDataSourceImpl } -// RawRuleDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RuleDataSource = BaseRuleDataSourceImpl{} + +type BaseRuleDataSourceImpl struct { + LegacyResourceId *string `json:"legacyResourceId,omitempty"` + MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` + ResourceLocation *string `json:"resourceLocation,omitempty"` + ResourceUri *string `json:"resourceUri,omitempty"` +} + +func (s BaseRuleDataSourceImpl) RuleDataSource() BaseRuleDataSourceImpl { + return s +} + +var _ RuleDataSource = RawRuleDataSourceImpl{} + +// RawRuleDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRuleDataSourceImpl struct { - Type string - Values map[string]interface{} + ruleDataSource BaseRuleDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawRuleDataSourceImpl) RuleDataSource() BaseRuleDataSourceImpl { + return s.ruleDataSource } -func unmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) { +func UnmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalRuleDataSourceImplementation(input []byte) (RuleDataSource, error) return out, nil } - out := RawRuleDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseRuleDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRuleDataSourceImpl: %+v", err) } - return out, nil + + return RawRuleDataSourceImpl{ + ruleDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleemailaction.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleemailaction.go index d1c095e162d..131a724e1bb 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleemailaction.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_ruleemailaction.go @@ -15,6 +15,14 @@ type RuleEmailAction struct { SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` // Fields inherited from RuleAction + + OdataType string `json:"odata.type"` +} + +func (s RuleEmailAction) RuleAction() BaseRuleActionImpl { + return BaseRuleActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RuleEmailAction{} @@ -28,9 +36,10 @@ func (s RuleEmailAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleEmailAction: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemanagementeventdatasource.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemanagementeventdatasource.go index 8e5bfdbc5fb..49384050bc0 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemanagementeventdatasource.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemanagementeventdatasource.go @@ -22,12 +22,24 @@ type RuleManagementEventDataSource struct { SubStatus *string `json:"subStatus,omitempty"` // Fields inherited from RuleDataSource + LegacyResourceId *string `json:"legacyResourceId,omitempty"` MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` ResourceLocation *string `json:"resourceLocation,omitempty"` ResourceUri *string `json:"resourceUri,omitempty"` } +func (s RuleManagementEventDataSource) RuleDataSource() BaseRuleDataSourceImpl { + return BaseRuleDataSourceImpl{ + LegacyResourceId: s.LegacyResourceId, + MetricNamespace: s.MetricNamespace, + OdataType: s.OdataType, + ResourceLocation: s.ResourceLocation, + ResourceUri: s.ResourceUri, + } +} + var _ json.Marshaler = RuleManagementEventDataSource{} func (s RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleManagementEventDataSource: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemetricdatasource.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemetricdatasource.go index 18204a210ef..ea586c0dc01 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemetricdatasource.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulemetricdatasource.go @@ -14,12 +14,24 @@ type RuleMetricDataSource struct { MetricName *string `json:"metricName,omitempty"` // Fields inherited from RuleDataSource + LegacyResourceId *string `json:"legacyResourceId,omitempty"` MetricNamespace *string `json:"metricNamespace,omitempty"` + OdataType string `json:"odata.type"` ResourceLocation *string `json:"resourceLocation,omitempty"` ResourceUri *string `json:"resourceUri,omitempty"` } +func (s RuleMetricDataSource) RuleDataSource() BaseRuleDataSourceImpl { + return BaseRuleDataSourceImpl{ + LegacyResourceId: s.LegacyResourceId, + MetricNamespace: s.MetricNamespace, + OdataType: s.OdataType, + ResourceLocation: s.ResourceLocation, + ResourceUri: s.ResourceUri, + } +} + var _ json.Marshaler = RuleMetricDataSource{} func (s RuleMetricDataSource) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s RuleMetricDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleMetricDataSource: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulewebhookaction.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulewebhookaction.go index 5f41f746110..14058074fbb 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_rulewebhookaction.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_rulewebhookaction.go @@ -15,6 +15,14 @@ type RuleWebhookAction struct { ServiceUri *string `json:"serviceUri,omitempty"` // Fields inherited from RuleAction + + OdataType string `json:"odata.type"` +} + +func (s RuleWebhookAction) RuleAction() BaseRuleActionImpl { + return BaseRuleActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = RuleWebhookAction{} @@ -28,9 +36,10 @@ func (s RuleWebhookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RuleWebhookAction: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/model_thresholdrulecondition.go b/resource-manager/insights/2016-03-01/alertrulesapis/model_thresholdrulecondition.go index 75519e0a214..776e4daa33a 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/model_thresholdrulecondition.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/model_thresholdrulecondition.go @@ -17,7 +17,16 @@ type ThresholdRuleCondition struct { WindowSize *string `json:"windowSize,omitempty"` // Fields inherited from RuleCondition + DataSource RuleDataSource `json:"dataSource"` + OdataType string `json:"odata.type"` +} + +func (s ThresholdRuleCondition) RuleCondition() BaseRuleConditionImpl { + return BaseRuleConditionImpl{ + DataSource: s.DataSource, + OdataType: s.OdataType, + } } var _ json.Marshaler = ThresholdRuleCondition{} @@ -31,9 +40,10 @@ func (s ThresholdRuleCondition) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThresholdRuleCondition: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" encoded, err = json.Marshal(decoded) @@ -53,6 +63,7 @@ func (s *ThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into ThresholdRuleCondition: %+v", err) } + s.OdataType = decoded.OdataType s.Operator = decoded.Operator s.Threshold = decoded.Threshold s.TimeAggregation = decoded.TimeAggregation @@ -64,7 +75,7 @@ func (s *ThresholdRuleCondition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["dataSource"]; ok { - impl, err := unmarshalRuleDataSourceImplementation(v) + impl, err := UnmarshalRuleDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DataSource' for 'ThresholdRuleCondition': %+v", err) } diff --git a/resource-manager/insights/2016-03-01/alertrulesapis/version.go b/resource-manager/insights/2016-03-01/alertrulesapis/version.go index 09997f7495a..c1a6b785272 100644 --- a/resource-manager/insights/2016-03-01/alertrulesapis/version.go +++ b/resource-manager/insights/2016-03-01/alertrulesapis/version.go @@ -1,12 +1,10 @@ package alertrulesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrulesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrulesapis/2016-03-01" } diff --git a/resource-manager/insights/2016-03-01/logprofiles/README.md b/resource-manager/insights/2016-03-01/logprofiles/README.md index fd6548a936e..b6b36d86b6e 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/README.md +++ b/resource-manager/insights/2016-03-01/logprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles` Documentation -The `logprofiles` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `logprofiles` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/logprofiles/client.go b/resource-manager/insights/2016-03-01/logprofiles/client.go index 944b40f43d8..ddc8914ac13 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/client.go +++ b/resource-manager/insights/2016-03-01/logprofiles/client.go @@ -15,7 +15,7 @@ type LogProfilesClient struct { } func NewLogProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogProfilesClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go b/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go index 39c41c6a119..ebc8a001803 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go +++ b/resource-manager/insights/2016-03-01/logprofiles/id_logprofile.go @@ -40,7 +40,7 @@ func ParseLogProfileID(input string) (*LogProfileId, error) { } id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLogProfileIDInsensitively(input string) (*LogProfileId, error) { } id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go b/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go index 2001dafa077..33e23c8ea43 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go +++ b/resource-manager/insights/2016-03-01/logprofiles/method_createorupdate.go @@ -49,7 +49,6 @@ func (c LogProfilesClient) CreateOrUpdate(ctx context.Context, id LogProfileId, var model LogProfileResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/logprofiles/method_get.go b/resource-manager/insights/2016-03-01/logprofiles/method_get.go index 6a8609a2de2..4714817b084 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/method_get.go +++ b/resource-manager/insights/2016-03-01/logprofiles/method_get.go @@ -45,7 +45,6 @@ func (c LogProfilesClient) Get(ctx context.Context, id LogProfileId) (result Get var model LogProfileResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/logprofiles/method_list.go b/resource-manager/insights/2016-03-01/logprofiles/method_list.go index d1e1760f56b..3e693cea189 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/method_list.go +++ b/resource-manager/insights/2016-03-01/logprofiles/method_list.go @@ -47,7 +47,6 @@ func (c LogProfilesClient) List(ctx context.Context, id commonids.SubscriptionId var model LogProfileCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/logprofiles/version.go b/resource-manager/insights/2016-03-01/logprofiles/version.go index 338728e233f..fc39508022a 100644 --- a/resource-manager/insights/2016-03-01/logprofiles/version.go +++ b/resource-manager/insights/2016-03-01/logprofiles/version.go @@ -1,12 +1,10 @@ package logprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logprofiles/2016-03-01" } diff --git a/resource-manager/insights/2016-03-01/logprofilesapis/README.md b/resource-manager/insights/2016-03-01/logprofilesapis/README.md index fe2e6b5e6ba..a0ca8aabe4d 100644 --- a/resource-manager/insights/2016-03-01/logprofilesapis/README.md +++ b/resource-manager/insights/2016-03-01/logprofilesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofilesapis` Documentation -The `logprofilesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `logprofilesapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/logprofilesapis/client.go b/resource-manager/insights/2016-03-01/logprofilesapis/client.go index 965e248c836..c7d7fa30bed 100644 --- a/resource-manager/insights/2016-03-01/logprofilesapis/client.go +++ b/resource-manager/insights/2016-03-01/logprofilesapis/client.go @@ -15,7 +15,7 @@ type LogProfilesAPIsClient struct { } func NewLogProfilesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*LogProfilesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logprofilesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logprofilesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogProfilesAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/logprofilesapis/id_logprofile.go b/resource-manager/insights/2016-03-01/logprofilesapis/id_logprofile.go index 7f6f8cbfef4..b7077f26c6e 100644 --- a/resource-manager/insights/2016-03-01/logprofilesapis/id_logprofile.go +++ b/resource-manager/insights/2016-03-01/logprofilesapis/id_logprofile.go @@ -40,7 +40,7 @@ func ParseLogProfileID(input string) (*LogProfileId, error) { } id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLogProfileIDInsensitively(input string) (*LogProfileId, error) { } id := LogProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2016-03-01/logprofilesapis/method_logprofilesupdate.go b/resource-manager/insights/2016-03-01/logprofilesapis/method_logprofilesupdate.go index 252227f6740..8fb647932af 100644 --- a/resource-manager/insights/2016-03-01/logprofilesapis/method_logprofilesupdate.go +++ b/resource-manager/insights/2016-03-01/logprofilesapis/method_logprofilesupdate.go @@ -49,7 +49,6 @@ func (c LogProfilesAPIsClient) LogProfilesUpdate(ctx context.Context, id LogProf var model LogProfileResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/logprofilesapis/version.go b/resource-manager/insights/2016-03-01/logprofilesapis/version.go index 6f8c580af33..ef1c17cb6cc 100644 --- a/resource-manager/insights/2016-03-01/logprofilesapis/version.go +++ b/resource-manager/insights/2016-03-01/logprofilesapis/version.go @@ -1,12 +1,10 @@ package logprofilesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logprofilesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logprofilesapis/2016-03-01" } diff --git a/resource-manager/insights/2016-03-01/metricdefinitions/README.md b/resource-manager/insights/2016-03-01/metricdefinitions/README.md index aafb49984f5..b2b3ae84d42 100644 --- a/resource-manager/insights/2016-03-01/metricdefinitions/README.md +++ b/resource-manager/insights/2016-03-01/metricdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/metricdefinitions` Documentation -The `metricdefinitions` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2016-03-01`). +The `metricdefinitions` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2016-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2016-03-01/metricdefinitions/client.go b/resource-manager/insights/2016-03-01/metricdefinitions/client.go index 73ffa1b52de..71248f0507e 100644 --- a/resource-manager/insights/2016-03-01/metricdefinitions/client.go +++ b/resource-manager/insights/2016-03-01/metricdefinitions/client.go @@ -15,7 +15,7 @@ type MetricDefinitionsClient struct { } func NewMetricDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricDefinitionsClient: %+v", err) } diff --git a/resource-manager/insights/2016-03-01/metricdefinitions/method_list.go b/resource-manager/insights/2016-03-01/metricdefinitions/method_list.go index 03b7a8e4145..add089faa66 100644 --- a/resource-manager/insights/2016-03-01/metricdefinitions/method_list.go +++ b/resource-manager/insights/2016-03-01/metricdefinitions/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MetricDefinitionsClient) List(ctx context.Context, id commonids.ScopeId, var model MetricDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2016-03-01/metricdefinitions/version.go b/resource-manager/insights/2016-03-01/metricdefinitions/version.go index 58dac5cfd3b..fa87c8ecc6a 100644 --- a/resource-manager/insights/2016-03-01/metricdefinitions/version.go +++ b/resource-manager/insights/2016-03-01/metricdefinitions/version.go @@ -1,12 +1,10 @@ package metricdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricdefinitions/2016-03-01" } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/README.md b/resource-manager/insights/2018-03-01/actiongroupsapis/README.md index 43ca657e74b..7c55a9a874b 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/README.md +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/actiongroupsapis` Documentation -The `actiongroupsapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2018-03-01`). +The `actiongroupsapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2018-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/client.go b/resource-manager/insights/2018-03-01/actiongroupsapis/client.go index f5eb03facb0..98401f4cbc1 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/client.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/client.go @@ -15,7 +15,7 @@ type ActionGroupsAPIsClient struct { } func NewActionGroupsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionGroupsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actiongroupsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actiongroupsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionGroupsAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/id_actiongroup.go b/resource-manager/insights/2018-03-01/actiongroupsapis/id_actiongroup.go index cfc1a76a050..a04a8f9ee0d 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/id_actiongroup.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/id_actiongroup.go @@ -42,7 +42,7 @@ func ParseActionGroupID(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionGroupIDInsensitively(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupscreateorupdate.go b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupscreateorupdate.go index 9e6307c3732..cd67af4ac55 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupscreateorupdate.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupscreateorupdate.go @@ -50,7 +50,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsCreateOrUpdate(ctx context.Context, var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsget.go b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsget.go index 96fc3d00628..6fd22d53cb8 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsget.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsget.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGet(ctx context.Context, id ActionGr var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsupdate.go b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsupdate.go index 2c33272f8a7..f2f3fdc56f6 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsupdate.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/method_actiongroupsupdate.go @@ -49,7 +49,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsUpdate(ctx context.Context, id Actio var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/actiongroupsapis/version.go b/resource-manager/insights/2018-03-01/actiongroupsapis/version.go index 20f18a2541c..4a1b64ac25c 100644 --- a/resource-manager/insights/2018-03-01/actiongroupsapis/version.go +++ b/resource-manager/insights/2018-03-01/actiongroupsapis/version.go @@ -1,12 +1,10 @@ package actiongroupsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actiongroupsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actiongroupsapis/2018-03-01" } diff --git a/resource-manager/insights/2018-03-01/metricalerts/README.md b/resource-manager/insights/2018-03-01/metricalerts/README.md index a174a5afbb8..e64429cdca2 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/README.md +++ b/resource-manager/insights/2018-03-01/metricalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalerts` Documentation -The `metricalerts` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2018-03-01`). +The `metricalerts` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2018-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2018-03-01/metricalerts/client.go b/resource-manager/insights/2018-03-01/metricalerts/client.go index 87b5deb8cf6..a9343e36a8c 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/client.go +++ b/resource-manager/insights/2018-03-01/metricalerts/client.go @@ -15,7 +15,7 @@ type MetricAlertsClient struct { } func NewMetricAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricAlertsClient: %+v", err) } diff --git a/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go b/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go index 72ac52591e5..5f03c77559b 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go +++ b/resource-manager/insights/2018-03-01/metricalerts/id_metricalert.go @@ -42,7 +42,7 @@ func ParseMetricAlertID(input string) (*MetricAlertId, error) { } id := MetricAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMetricAlertIDInsensitively(input string) (*MetricAlertId, error) { } id := MetricAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2018-03-01/metricalerts/method_createorupdate.go b/resource-manager/insights/2018-03-01/metricalerts/method_createorupdate.go index 2168e9992f5..9c924ec9d9e 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/method_createorupdate.go +++ b/resource-manager/insights/2018-03-01/metricalerts/method_createorupdate.go @@ -49,7 +49,6 @@ func (c MetricAlertsClient) CreateOrUpdate(ctx context.Context, id MetricAlertId var model MetricAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalerts/method_get.go b/resource-manager/insights/2018-03-01/metricalerts/method_get.go index c1b6bfd76f2..114c27a76cc 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/method_get.go +++ b/resource-manager/insights/2018-03-01/metricalerts/method_get.go @@ -45,7 +45,6 @@ func (c MetricAlertsClient) Get(ctx context.Context, id MetricAlertId) (result G var model MetricAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalerts/method_listbyresourcegroup.go b/resource-manager/insights/2018-03-01/metricalerts/method_listbyresourcegroup.go index 970109ad195..d49c491b064 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/method_listbyresourcegroup.go +++ b/resource-manager/insights/2018-03-01/metricalerts/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c MetricAlertsClient) ListByResourceGroup(ctx context.Context, id commonid var model MetricAlertResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalerts/method_listbysubscription.go b/resource-manager/insights/2018-03-01/metricalerts/method_listbysubscription.go index 123c04e3224..62c5547e517 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/method_listbysubscription.go +++ b/resource-manager/insights/2018-03-01/metricalerts/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c MetricAlertsClient) ListBySubscription(ctx context.Context, id commonids var model MetricAlertResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalerts/method_update.go b/resource-manager/insights/2018-03-01/metricalerts/method_update.go index f1150f2ba8c..139f1c930f9 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/method_update.go +++ b/resource-manager/insights/2018-03-01/metricalerts/method_update.go @@ -49,7 +49,6 @@ func (c MetricAlertsClient) Update(ctx context.Context, id MetricAlertId, input var model MetricAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_dynamicmetriccriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_dynamicmetriccriteria.go index cfc9ebf76bb..3c7e76a3090 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_dynamicmetriccriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_dynamicmetriccriteria.go @@ -17,6 +17,8 @@ type DynamicMetricCriteria struct { Operator DynamicThresholdOperator `json:"operator"` // Fields inherited from MultiMetricCriteria + + CriterionType CriterionType `json:"criterionType"` Dimensions *[]MetricDimension `json:"dimensions,omitempty"` MetricName string `json:"metricName"` MetricNamespace *string `json:"metricNamespace,omitempty"` @@ -25,6 +27,18 @@ type DynamicMetricCriteria struct { TimeAggregation AggregationTypeEnum `json:"timeAggregation"` } +func (s DynamicMetricCriteria) MultiMetricCriteria() BaseMultiMetricCriteriaImpl { + return BaseMultiMetricCriteriaImpl{ + CriterionType: s.CriterionType, + Dimensions: s.Dimensions, + MetricName: s.MetricName, + MetricNamespace: s.MetricNamespace, + Name: s.Name, + SkipMetricValidation: s.SkipMetricValidation, + TimeAggregation: s.TimeAggregation, + } +} + var _ json.Marshaler = DynamicMetricCriteria{} func (s DynamicMetricCriteria) MarshalJSON() ([]byte, error) { @@ -36,9 +50,10 @@ func (s DynamicMetricCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DynamicMetricCriteria: %+v", err) } + decoded["criterionType"] = "DynamicThresholdCriterion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertcriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertcriteria.go index 6f9fc6bbbd2..1f408de3292 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertcriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertcriteria.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MetricAlertCriteria interface { + MetricAlertCriteria() BaseMetricAlertCriteriaImpl } -// RawMetricAlertCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MetricAlertCriteria = BaseMetricAlertCriteriaImpl{} + +type BaseMetricAlertCriteriaImpl struct { + OdataType Odatatype `json:"odata.type"` +} + +func (s BaseMetricAlertCriteriaImpl) MetricAlertCriteria() BaseMetricAlertCriteriaImpl { + return s +} + +var _ MetricAlertCriteria = RawMetricAlertCriteriaImpl{} + +// RawMetricAlertCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMetricAlertCriteriaImpl struct { - Type string - Values map[string]interface{} + metricAlertCriteria BaseMetricAlertCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawMetricAlertCriteriaImpl) MetricAlertCriteria() BaseMetricAlertCriteriaImpl { + return s.metricAlertCriteria } -func unmarshalMetricAlertCriteriaImplementation(input []byte) (MetricAlertCriteria, error) { +func UnmarshalMetricAlertCriteriaImplementation(input []byte) (MetricAlertCriteria, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalMetricAlertCriteriaImplementation(input []byte) (MetricAlertCriter return out, nil } - out := RawMetricAlertCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseMetricAlertCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMetricAlertCriteriaImpl: %+v", err) } - return out, nil + + return RawMetricAlertCriteriaImpl{ + metricAlertCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertmultipleresourcemultiplemetriccriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertmultipleresourcemultiplemetriccriteria.go index e3e6d89177a..0f4054efb27 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertmultipleresourcemultiplemetriccriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertmultipleresourcemultiplemetriccriteria.go @@ -14,6 +14,14 @@ type MetricAlertMultipleResourceMultipleMetricCriteria struct { AllOf *[]MultiMetricCriteria `json:"allOf,omitempty"` // Fields inherited from MetricAlertCriteria + + OdataType Odatatype `json:"odata.type"` +} + +func (s MetricAlertMultipleResourceMultipleMetricCriteria) MetricAlertCriteria() BaseMetricAlertCriteriaImpl { + return BaseMetricAlertCriteriaImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = MetricAlertMultipleResourceMultipleMetricCriteria{} @@ -27,9 +35,10 @@ func (s MetricAlertMultipleResourceMultipleMetricCriteria) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MetricAlertMultipleResourceMultipleMetricCriteria: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s MetricAlertMultipleResourceMultipleMetricCriteria) MarshalJSON() ([]byte var _ json.Unmarshaler = &MetricAlertMultipleResourceMultipleMetricCriteria{} func (s *MetricAlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON(bytes []byte) error { + type alias MetricAlertMultipleResourceMultipleMetricCriteria + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into MetricAlertMultipleResourceMultipleMetricCriteria: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +73,7 @@ func (s *MetricAlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON(bytes output := make([]MultiMetricCriteria, 0) for i, val := range listTemp { - impl, err := unmarshalMultiMetricCriteriaImplementation(val) + impl, err := UnmarshalMultiMetricCriteriaImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'AllOf' for 'MetricAlertMultipleResourceMultipleMetricCriteria': %+v", i, err) } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertproperties.go b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertproperties.go index 3098f59acb7..1ca1f93ad5c 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertproperties.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertproperties.go @@ -67,7 +67,7 @@ func (s *MetricAlertProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["criteria"]; ok { - impl, err := unmarshalMetricAlertCriteriaImplementation(v) + impl, err := UnmarshalMetricAlertCriteriaImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Criteria' for 'MetricAlertProperties': %+v", err) } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertpropertiespatch.go b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertpropertiespatch.go index 5edfc42e813..2bb4ea296ec 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertpropertiespatch.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertpropertiespatch.go @@ -67,7 +67,7 @@ func (s *MetricAlertPropertiesPatch) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["criteria"]; ok { - impl, err := unmarshalMetricAlertCriteriaImplementation(v) + impl, err := UnmarshalMetricAlertCriteriaImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Criteria' for 'MetricAlertPropertiesPatch': %+v", err) } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertsingleresourcemultiplemetriccriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertsingleresourcemultiplemetriccriteria.go index c870ab00b3e..63565d8e206 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metricalertsingleresourcemultiplemetriccriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metricalertsingleresourcemultiplemetriccriteria.go @@ -14,6 +14,14 @@ type MetricAlertSingleResourceMultipleMetricCriteria struct { AllOf *[]MetricCriteria `json:"allOf,omitempty"` // Fields inherited from MetricAlertCriteria + + OdataType Odatatype `json:"odata.type"` +} + +func (s MetricAlertSingleResourceMultipleMetricCriteria) MetricAlertCriteria() BaseMetricAlertCriteriaImpl { + return BaseMetricAlertCriteriaImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = MetricAlertSingleResourceMultipleMetricCriteria{} @@ -27,9 +35,10 @@ func (s MetricAlertSingleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MetricAlertSingleResourceMultipleMetricCriteria: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_metriccriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_metriccriteria.go index f36c22bf69b..6dfc0857130 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_metriccriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_metriccriteria.go @@ -15,6 +15,8 @@ type MetricCriteria struct { Threshold float64 `json:"threshold"` // Fields inherited from MultiMetricCriteria + + CriterionType CriterionType `json:"criterionType"` Dimensions *[]MetricDimension `json:"dimensions,omitempty"` MetricName string `json:"metricName"` MetricNamespace *string `json:"metricNamespace,omitempty"` @@ -23,6 +25,18 @@ type MetricCriteria struct { TimeAggregation AggregationTypeEnum `json:"timeAggregation"` } +func (s MetricCriteria) MultiMetricCriteria() BaseMultiMetricCriteriaImpl { + return BaseMultiMetricCriteriaImpl{ + CriterionType: s.CriterionType, + Dimensions: s.Dimensions, + MetricName: s.MetricName, + MetricNamespace: s.MetricNamespace, + Name: s.Name, + SkipMetricValidation: s.SkipMetricValidation, + TimeAggregation: s.TimeAggregation, + } +} + var _ json.Marshaler = MetricCriteria{} func (s MetricCriteria) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s MetricCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MetricCriteria: %+v", err) } + decoded["criterionType"] = "StaticThresholdCriterion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_multimetriccriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_multimetriccriteria.go index 2a0693f3131..c51bb967af3 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_multimetriccriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_multimetriccriteria.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MultiMetricCriteria interface { + MultiMetricCriteria() BaseMultiMetricCriteriaImpl } -// RawMultiMetricCriteriaImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MultiMetricCriteria = BaseMultiMetricCriteriaImpl{} + +type BaseMultiMetricCriteriaImpl struct { + CriterionType CriterionType `json:"criterionType"` + Dimensions *[]MetricDimension `json:"dimensions,omitempty"` + MetricName string `json:"metricName"` + MetricNamespace *string `json:"metricNamespace,omitempty"` + Name string `json:"name"` + SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` + TimeAggregation AggregationTypeEnum `json:"timeAggregation"` +} + +func (s BaseMultiMetricCriteriaImpl) MultiMetricCriteria() BaseMultiMetricCriteriaImpl { + return s +} + +var _ MultiMetricCriteria = RawMultiMetricCriteriaImpl{} + +// RawMultiMetricCriteriaImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMultiMetricCriteriaImpl struct { - Type string - Values map[string]interface{} + multiMetricCriteria BaseMultiMetricCriteriaImpl + Type string + Values map[string]interface{} +} + +func (s RawMultiMetricCriteriaImpl) MultiMetricCriteria() BaseMultiMetricCriteriaImpl { + return s.multiMetricCriteria } -func unmarshalMultiMetricCriteriaImplementation(input []byte) (MultiMetricCriteria, error) { +func UnmarshalMultiMetricCriteriaImplementation(input []byte) (MultiMetricCriteria, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalMultiMetricCriteriaImplementation(input []byte) (MultiMetricCriter return out, nil } - out := RawMultiMetricCriteriaImpl{ - Type: value, - Values: temp, + var parent BaseMultiMetricCriteriaImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMultiMetricCriteriaImpl: %+v", err) } - return out, nil + + return RawMultiMetricCriteriaImpl{ + multiMetricCriteria: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/insights/2018-03-01/metricalerts/model_webtestlocationavailabilitycriteria.go b/resource-manager/insights/2018-03-01/metricalerts/model_webtestlocationavailabilitycriteria.go index e40651f96c6..0aa223c05f1 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/model_webtestlocationavailabilitycriteria.go +++ b/resource-manager/insights/2018-03-01/metricalerts/model_webtestlocationavailabilitycriteria.go @@ -16,6 +16,14 @@ type WebtestLocationAvailabilityCriteria struct { WebTestId string `json:"webTestId"` // Fields inherited from MetricAlertCriteria + + OdataType Odatatype `json:"odata.type"` +} + +func (s WebtestLocationAvailabilityCriteria) MetricAlertCriteria() BaseMetricAlertCriteriaImpl { + return BaseMetricAlertCriteriaImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = WebtestLocationAvailabilityCriteria{} @@ -29,9 +37,10 @@ func (s WebtestLocationAvailabilityCriteria) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WebtestLocationAvailabilityCriteria: %+v", err) } + decoded["odata.type"] = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-03-01/metricalerts/version.go b/resource-manager/insights/2018-03-01/metricalerts/version.go index d480a7f0ab4..ef53474e234 100644 --- a/resource-manager/insights/2018-03-01/metricalerts/version.go +++ b/resource-manager/insights/2018-03-01/metricalerts/version.go @@ -1,12 +1,10 @@ package metricalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricalerts/2018-03-01" } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/README.md b/resource-manager/insights/2018-03-01/metricalertsstatus/README.md index a3bb2473c90..97a9022176a 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/README.md +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-03-01/metricalertsstatus` Documentation -The `metricalertsstatus` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2018-03-01`). +The `metricalertsstatus` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2018-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/client.go b/resource-manager/insights/2018-03-01/metricalertsstatus/client.go index e60e2d7219b..bf9b53e4852 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/client.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/client.go @@ -15,7 +15,7 @@ type MetricAlertsStatusClient struct { } func NewMetricAlertsStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricAlertsStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricalertsstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricalertsstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricAlertsStatusClient: %+v", err) } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/id_metricalert.go b/resource-manager/insights/2018-03-01/metricalertsstatus/id_metricalert.go index 78e3bf3bf0b..8d7d65741ec 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/id_metricalert.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/id_metricalert.go @@ -42,7 +42,7 @@ func ParseMetricAlertID(input string) (*MetricAlertId, error) { } id := MetricAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMetricAlertIDInsensitively(input string) (*MetricAlertId, error) { } id := MetricAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/id_status.go b/resource-manager/insights/2018-03-01/metricalertsstatus/id_status.go index 7eb39536351..e5c97d31f09 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/id_status.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/id_status.go @@ -44,7 +44,7 @@ func ParseStatusID(input string) (*StatusId, error) { } id := StatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStatusIDInsensitively(input string) (*StatusId, error) { } id := StatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/method_list.go b/resource-manager/insights/2018-03-01/metricalertsstatus/method_list.go index 184478e1e36..344210db6ea 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/method_list.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/method_list.go @@ -46,7 +46,6 @@ func (c MetricAlertsStatusClient) List(ctx context.Context, id MetricAlertId) (r var model MetricAlertStatusCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/method_listbyname.go b/resource-manager/insights/2018-03-01/metricalertsstatus/method_listbyname.go index 82c1b2c89ea..2f23a2f5b73 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/method_listbyname.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/method_listbyname.go @@ -45,7 +45,6 @@ func (c MetricAlertsStatusClient) ListByName(ctx context.Context, id StatusId) ( var model MetricAlertStatusCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-03-01/metricalertsstatus/version.go b/resource-manager/insights/2018-03-01/metricalertsstatus/version.go index 05297336afe..84c00b70e3a 100644 --- a/resource-manager/insights/2018-03-01/metricalertsstatus/version.go +++ b/resource-manager/insights/2018-03-01/metricalertsstatus/version.go @@ -1,12 +1,10 @@ package metricalertsstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricalertsstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricalertsstatus/2018-03-01" } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/README.md b/resource-manager/insights/2018-04-16/scheduledqueryrules/README.md index 36ba5d293c1..6d7f8e72138 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/README.md +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2018-04-16/scheduledqueryrules` Documentation -The `scheduledqueryrules` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2018-04-16`). +The `scheduledqueryrules` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2018-04-16`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/client.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/client.go index 63d8edbd1f8..e15caa15195 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/client.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/client.go @@ -15,7 +15,7 @@ type ScheduledQueryRulesClient struct { } func NewScheduledQueryRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledQueryRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledqueryrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledqueryrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledQueryRulesClient: %+v", err) } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go index 01cd36a9038..dcca00c795c 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/id_scheduledqueryrule.go @@ -42,7 +42,7 @@ func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error) { } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_createorupdate.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_createorupdate.go index cfff17f52fa..ba7e197c370 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_createorupdate.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, id Schedu var model LogSearchRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_get.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_get.go index 93e758676cd..751b5fd20d7 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_get.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledQueryRulesClient) Get(ctx context.Context, id ScheduledQueryRul var model LogSearchRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbyresourcegroup.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbyresourcegroup.go index 934e91c964b..11140f61be3 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbyresourcegroup.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbyresourcegroup.go @@ -35,6 +35,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ScheduledQueryRulesClient) ListByResourceGroup(ctx context.Context, id c var model LogSearchRuleResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbysubscription.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbysubscription.go index 39bc8520cb9..4106d8031dd 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbysubscription.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_listbysubscription.go @@ -35,6 +35,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ScheduledQueryRulesClient) ListBySubscription(ctx context.Context, id co var model LogSearchRuleResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_update.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_update.go index c1e4eb8553a..3f684027252 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/method_update.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/method_update.go @@ -49,7 +49,6 @@ func (c ScheduledQueryRulesClient) Update(ctx context.Context, id ScheduledQuery var model LogSearchRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_action.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_action.go index e84613de58a..8efacc4a07d 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_action.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_action.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Action interface { + Action() BaseActionImpl } -// RawActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Action = BaseActionImpl{} + +type BaseActionImpl struct { + OdataType string `json:"odata.type"` +} + +func (s BaseActionImpl) Action() BaseActionImpl { + return s +} + +var _ Action = RawActionImpl{} + +// RawActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActionImpl struct { + action BaseActionImpl Type string Values map[string]interface{} } -func unmarshalActionImplementation(input []byte) (Action, error) { +func (s RawActionImpl) Action() BaseActionImpl { + return s.action +} + +func UnmarshalActionImplementation(input []byte) (Action, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalActionImplementation(input []byte) (Action, error) { return out, nil } - out := RawActionImpl{ + var parent BaseActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActionImpl: %+v", err) + } + + return RawActionImpl{ + action: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_alertingaction.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_alertingaction.go index a0d967093f7..1ae635c4627 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_alertingaction.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_alertingaction.go @@ -17,6 +17,14 @@ type AlertingAction struct { Trigger TriggerCondition `json:"trigger"` // Fields inherited from Action + + OdataType string `json:"odata.type"` +} + +func (s AlertingAction) Action() BaseActionImpl { + return BaseActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AlertingAction{} @@ -30,9 +38,10 @@ func (s AlertingAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AlertingAction: %+v", err) } + decoded["odata.type"] = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logsearchrule.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logsearchrule.go index b3ddcb76147..eb62e39f353 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logsearchrule.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logsearchrule.go @@ -63,7 +63,7 @@ func (s *LogSearchRule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["action"]; ok { - impl, err := unmarshalActionImplementation(v) + impl, err := UnmarshalActionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Action' for 'LogSearchRule': %+v", err) } diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logtometricaction.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logtometricaction.go index 398c38b62de..74087941a1b 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logtometricaction.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/model_logtometricaction.go @@ -14,6 +14,14 @@ type LogToMetricAction struct { Criteria []Criteria `json:"criteria"` // Fields inherited from Action + + OdataType string `json:"odata.type"` +} + +func (s LogToMetricAction) Action() BaseActionImpl { + return BaseActionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = LogToMetricAction{} @@ -27,9 +35,10 @@ func (s LogToMetricAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogToMetricAction: %+v", err) } + decoded["odata.type"] = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/insights/2018-04-16/scheduledqueryrules/version.go b/resource-manager/insights/2018-04-16/scheduledqueryrules/version.go index 768df142cc3..fcaa2e2b5a9 100644 --- a/resource-manager/insights/2018-04-16/scheduledqueryrules/version.go +++ b/resource-manager/insights/2018-04-16/scheduledqueryrules/version.go @@ -1,12 +1,10 @@ package scheduledqueryrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-04-16" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledqueryrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledqueryrules/2018-04-16" } diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/README.md b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/README.md index a2cac69ade0..6cb9cdcb30b 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/README.md +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2019-10-17-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2019-10-17-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/client.go b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/client.go +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privateendpointconnection.go index d1743b78c65..e2c7339f280 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privatelinkscope.go b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privatelinkscope.go index 94e008cc775..d9f096b5675 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privatelinkscope.go +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/method_get.go b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/method_get.go +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/version.go b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/version.go index 9b4ee345b0f..2ab5da8f06d 100644 --- a/resource-manager/insights/2019-10-17-preview/privateendpointconnections/version.go +++ b/resource-manager/insights/2019-10-17-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-17-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2019-10-17-preview" } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/README.md b/resource-manager/insights/2019-10-17-preview/privatelinkresources/README.md index cb2e14f9fa1..e399cadfe84 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/README.md +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2019-10-17-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2019-10-17-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/client.go b/resource-manager/insights/2019-10-17-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/client.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkresource.go index 5ed81e4e465..ecbf3051980 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkscope.go b/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkscope.go index 262cf3fdba8..3ab0ea3481c 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkscope.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/method_get.go b/resource-manager/insights/2019-10-17-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/method_get.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkresources/version.go b/resource-manager/insights/2019-10-17-preview/privatelinkresources/version.go index 885e87f4b49..2f4cd48536d 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkresources/version.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-17-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2019-10-17-preview" } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/README.md b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/README.md index bf265fd7845..e9bc93943b1 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/README.md +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources` Documentation -The `privatelinkscopedresources` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2019-10-17-preview`). +The `privatelinkscopedresources` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2019-10-17-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/client.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/client.go index d57bf6a3767..d924d476f97 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/client.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopedResourcesClient struct { } func NewPrivateLinkScopedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopedResourcesClient: %+v", err) } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go index 8aa1d039fc0..f094ad2ec87 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go index 38f42803e81..cc42cd0f608 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/id_scopedresource.go @@ -44,7 +44,7 @@ func ParseScopedResourceID(input string) (*ScopedResourceId, error) { } id := ScopedResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopedResourceIDInsensitively(input string) (*ScopedResourceId, error) } id := ScopedResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/method_get.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/method_get.go index b4973bf6c16..7ae23ddd290 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/method_get.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopedResourcesClient) Get(ctx context.Context, id ScopedReso var model ScopedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/version.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/version.go index 467194385c1..40ee0174896 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/version.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopedresources/version.go @@ -1,12 +1,10 @@ package privatelinkscopedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-17-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopedresources/2019-10-17-preview" } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md index de817a13192..93514c71894 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis` Documentation -The `privatelinkscopesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2019-10-17-preview`). +The `privatelinkscopesapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2019-10-17-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go index 7db4b8bf924..aa9656d2469 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesAPIsClient struct { } func NewPrivateLinkScopesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go index d495f485120..fbfedbaa33d 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go index 21bf558bfb3..112fa81d894 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesCreateOrUpdate(ctx context var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget.go index 58cb807f450..5a33b38d1a3 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesget.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesGet(ctx context.Context, i var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go index 008f03d8572..9e63d1d71dd 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesUpdateTags(ctx context.Con var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go index 856718170aa..cc9d11b3206 100644 --- a/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go +++ b/resource-manager/insights/2019-10-17-preview/privatelinkscopesapis/version.go @@ -1,12 +1,10 @@ package privatelinkscopesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-10-17-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopesapis/2019-10-17-preview" } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/README.md b/resource-manager/insights/2020-10-01/activitylogalertsapis/README.md index 432741dd1f7..6fae0828bb7 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/README.md +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2020-10-01/activitylogalertsapis` Documentation -The `activitylogalertsapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2020-10-01`). +The `activitylogalertsapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/client.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/client.go index 903d1547485..d25c26f0f3e 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/client.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/client.go @@ -15,7 +15,7 @@ type ActivityLogAlertsAPIsClient struct { } func NewActivityLogAlertsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityLogAlertsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "activitylogalertsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "activitylogalertsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActivityLogAlertsAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go index e35c26bced0..9fcc0886b94 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/id_activitylogalert.go @@ -42,7 +42,7 @@ func ParseActivityLogAlertID(input string) (*ActivityLogAlertId, error) { } id := ActivityLogAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActivityLogAlertIDInsensitively(input string) (*ActivityLogAlertId, er } id := ActivityLogAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertscreateorupdate.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertscreateorupdate.go index 94a49d08e9d..ef8455f3053 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertscreateorupdate.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertscreateorupdate.go @@ -50,7 +50,6 @@ func (c ActivityLogAlertsAPIsClient) ActivityLogAlertsCreateOrUpdate(ctx context var model ActivityLogAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsget.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsget.go index 0bd5253d11a..71f561e561a 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsget.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsget.go @@ -45,7 +45,6 @@ func (c ActivityLogAlertsAPIsClient) ActivityLogAlertsGet(ctx context.Context, i var model ActivityLogAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsupdate.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsupdate.go index 6c2f0563f52..8cab05769e0 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsupdate.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/method_activitylogalertsupdate.go @@ -49,7 +49,6 @@ func (c ActivityLogAlertsAPIsClient) ActivityLogAlertsUpdate(ctx context.Context var model ActivityLogAlertResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2020-10-01/activitylogalertsapis/version.go b/resource-manager/insights/2020-10-01/activitylogalertsapis/version.go index b92bdd5e2e2..933be7e76ed 100644 --- a/resource-manager/insights/2020-10-01/activitylogalertsapis/version.go +++ b/resource-manager/insights/2020-10-01/activitylogalertsapis/version.go @@ -1,12 +1,10 @@ package activitylogalertsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/activitylogalertsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/activitylogalertsapis/2020-10-01" } diff --git a/resource-manager/insights/2021-05-01-preview/autoscaleapis/README.md b/resource-manager/insights/2021-05-01-preview/autoscaleapis/README.md index a7322b81b34..6f8e9b7c4a1 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscaleapis/README.md +++ b/resource-manager/insights/2021-05-01-preview/autoscaleapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/autoscaleapis` Documentation -The `autoscaleapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `autoscaleapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/autoscaleapis/client.go b/resource-manager/insights/2021-05-01-preview/autoscaleapis/client.go index 9152c2b293c..a2d624b8ac6 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscaleapis/client.go +++ b/resource-manager/insights/2021-05-01-preview/autoscaleapis/client.go @@ -15,7 +15,7 @@ type AutoscaleAPIsClient struct { } func NewAutoscaleAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoscaleAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscaleapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscaleapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoscaleAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/autoscaleapis/id_autoscalesetting.go b/resource-manager/insights/2021-05-01-preview/autoscaleapis/id_autoscalesetting.go index cd1ab32ea05..7d31f2eac81 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscaleapis/id_autoscalesetting.go +++ b/resource-manager/insights/2021-05-01-preview/autoscaleapis/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/autoscaleapis/method_autoscalesettingsupdate.go b/resource-manager/insights/2021-05-01-preview/autoscaleapis/method_autoscalesettingsupdate.go index bbd3fb32cb4..3e7372457eb 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscaleapis/method_autoscalesettingsupdate.go +++ b/resource-manager/insights/2021-05-01-preview/autoscaleapis/method_autoscalesettingsupdate.go @@ -49,7 +49,6 @@ func (c AutoscaleAPIsClient) AutoscaleSettingsUpdate(ctx context.Context, id Aut var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/autoscaleapis/version.go b/resource-manager/insights/2021-05-01-preview/autoscaleapis/version.go index b8270d6b9ef..5bd0e68ffdb 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscaleapis/version.go +++ b/resource-manager/insights/2021-05-01-preview/autoscaleapis/version.go @@ -1,12 +1,10 @@ package autoscaleapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscaleapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscaleapis/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/README.md b/resource-manager/insights/2021-05-01-preview/autoscalesettings/README.md index 676e91ebebc..2c9da4ef0ba 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/README.md +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/autoscalesettings` Documentation -The `autoscalesettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `autoscalesettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/client.go b/resource-manager/insights/2021-05-01-preview/autoscalesettings/client.go index 6af68634bcc..06f51675ed3 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/client.go +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/client.go @@ -15,7 +15,7 @@ type AutoScaleSettingsClient struct { } func NewAutoScaleSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoScaleSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscalesettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscalesettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoScaleSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/id_autoscalesetting.go b/resource-manager/insights/2021-05-01-preview/autoscalesettings/id_autoscalesetting.go index 5d89ae07420..d801cee9333 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/id_autoscalesetting.go +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_createorupdate.go b/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_createorupdate.go index e7e33bd60bf..dba9a4bdeb6 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_createorupdate.go +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutoScaleSettingsClient) CreateOrUpdate(ctx context.Context, id AutoScal var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_get.go b/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_get.go index 2d2cfaa8591..48a8c08cb60 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_get.go +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/method_get.go @@ -45,7 +45,6 @@ func (c AutoScaleSettingsClient) Get(ctx context.Context, id AutoScaleSettingId) var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/autoscalesettings/version.go b/resource-manager/insights/2021-05-01-preview/autoscalesettings/version.go index 6748ce3ed94..19492a1820c 100644 --- a/resource-manager/insights/2021-05-01-preview/autoscalesettings/version.go +++ b/resource-manager/insights/2021-05-01-preview/autoscalesettings/version.go @@ -1,12 +1,10 @@ package autoscalesettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscalesettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscalesettings/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/README.md b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/README.md index 9f0038989ef..a9b9735148e 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/README.md +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings` Documentation -The `diagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `diagnosticsettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/client.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/client.go index 336818ef929..6e01407ed2a 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/client.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsClient struct { } func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go index 889bc6d8ac8..dfff2c7aec5 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/id_scopeddiagnosticsetting.go @@ -40,7 +40,7 @@ func ParseScopedDiagnosticSettingID(input string) (*ScopedDiagnosticSettingId, e } id := ScopedDiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDiagnosticSettingIDInsensitively(input string) (*ScopedDiagnosti } id := ScopedDiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_createorupdate.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_createorupdate.go index 3bc33f2863f..d97371ffb00 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_createorupdate.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DiagnosticSettingsClient) CreateOrUpdate(ctx context.Context, id ScopedD var model DiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_get.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_get.go index 1872e924ae7..69738277d63 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_get.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticSettingsClient) Get(ctx context.Context, id ScopedDiagnosticSe var model DiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_list.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_list.go index 696fc763099..f3a29d309be 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_list.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/method_list.go @@ -47,7 +47,6 @@ func (c DiagnosticSettingsClient) List(ctx context.Context, id commonids.ScopeId var model DiagnosticSettingsResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/version.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/version.go index ac3ed61868d..b0a4f6f4690 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettings/version.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettings/version.go @@ -1,12 +1,10 @@ package diagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettings/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/README.md b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/README.md index 838131be8a8..16290b40083 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/README.md +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories` Documentation -The `diagnosticsettingscategories` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `diagnosticsettingscategories` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/client.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/client.go index f2d246ac10d..84b1d64f63d 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/client.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/client.go @@ -15,7 +15,7 @@ type DiagnosticSettingsCategoriesClient struct { } func NewDiagnosticSettingsCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticsettingscategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticsettingscategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticSettingsCategoriesClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go index 76caa395df1..d1d01f062ca 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/id_scopeddiagnosticsettingscategory.go @@ -40,7 +40,7 @@ func ParseScopedDiagnosticSettingsCategoryID(input string) (*ScopedDiagnosticSet } id := ScopedDiagnosticSettingsCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDiagnosticSettingsCategoryIDInsensitively(input string) (*Scoped } id := ScopedDiagnosticSettingsCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategoryget.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategoryget.go index 68b602ebd70..d87be38c458 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategoryget.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategoryget.go @@ -45,7 +45,6 @@ func (c DiagnosticSettingsCategoriesClient) DiagnosticSettingsCategoryGet(ctx co var model DiagnosticSettingsCategoryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go index 6f5fe7faf15..5f8d8199ed4 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/method_diagnosticsettingscategorylist.go @@ -47,7 +47,6 @@ func (c DiagnosticSettingsCategoriesClient) DiagnosticSettingsCategoryList(ctx c var model DiagnosticSettingsCategoryResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/version.go b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/version.go index c18b19577e8..9b3cbcb6ff7 100644 --- a/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/version.go +++ b/resource-manager/insights/2021-05-01-preview/diagnosticsettingscategories/version.go @@ -1,12 +1,10 @@ package diagnosticsettingscategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticsettingscategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticsettingscategories/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/README.md b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/README.md index e43a7449d88..ddeeaa54844 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/README.md +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings` Documentation -The `managementgroupdiagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `managementgroupdiagnosticsettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/client.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/client.go index 3af5be08619..b5232b848a4 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/client.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/client.go @@ -15,7 +15,7 @@ type ManagementGroupDiagnosticSettingsClient struct { } func NewManagementGroupDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementGroupDiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementgroupdiagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementgroupdiagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementGroupDiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/id_providers2diagnosticsetting.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/id_providers2diagnosticsetting.go index a00a168b978..d2e7f959afb 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/id_providers2diagnosticsetting.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/id_providers2diagnosticsetting.go @@ -40,7 +40,7 @@ func ParseProviders2DiagnosticSettingID(input string) (*Providers2DiagnosticSett } id := Providers2DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DiagnosticSettingIDInsensitively(input string) (*Providers2D } id := Providers2DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_createorupdate.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_createorupdate.go index 024cc38865a..bff1759e500 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_createorupdate.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagementGroupDiagnosticSettingsClient) CreateOrUpdate(ctx context.Cont var model ManagementGroupDiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_get.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_get.go index 0c29ec3b4f3..1fac81f2636 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_get.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_get.go @@ -45,7 +45,6 @@ func (c ManagementGroupDiagnosticSettingsClient) Get(ctx context.Context, id Pro var model ManagementGroupDiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_list.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_list.go index b5586d85408..e235715a28f 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_list.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/method_list.go @@ -47,7 +47,6 @@ func (c ManagementGroupDiagnosticSettingsClient) List(ctx context.Context, id co var model ManagementGroupDiagnosticSettingsResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/version.go b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/version.go index 56b128b2bf1..949b0e3f202 100644 --- a/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/version.go +++ b/resource-manager/insights/2021-05-01-preview/managementgroupdiagnosticsettings/version.go @@ -1,12 +1,10 @@ package managementgroupdiagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementgroupdiagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementgroupdiagnosticsettings/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/metrics/README.md b/resource-manager/insights/2021-05-01-preview/metrics/README.md index 2cda18c9ef3..7a437f08284 100644 --- a/resource-manager/insights/2021-05-01-preview/metrics/README.md +++ b/resource-manager/insights/2021-05-01-preview/metrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/metrics` Documentation -The `metrics` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `metrics` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/metrics/client.go b/resource-manager/insights/2021-05-01-preview/metrics/client.go index a793d0bd3f7..cfbc08d23b2 100644 --- a/resource-manager/insights/2021-05-01-preview/metrics/client.go +++ b/resource-manager/insights/2021-05-01-preview/metrics/client.go @@ -15,7 +15,7 @@ type MetricsClient struct { } func NewMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/metrics/id_autoscalesetting.go b/resource-manager/insights/2021-05-01-preview/metrics/id_autoscalesetting.go index 5ae4af928ef..d88c1b040be 100644 --- a/resource-manager/insights/2021-05-01-preview/metrics/id_autoscalesetting.go +++ b/resource-manager/insights/2021-05-01-preview/metrics/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/metrics/method_predictivemetricget.go b/resource-manager/insights/2021-05-01-preview/metrics/method_predictivemetricget.go index 3b5b932c96d..a0ce4bde403 100644 --- a/resource-manager/insights/2021-05-01-preview/metrics/method_predictivemetricget.go +++ b/resource-manager/insights/2021-05-01-preview/metrics/method_predictivemetricget.go @@ -38,6 +38,7 @@ func (o PredictiveMetricGetOperationOptions) ToHeaders() *client.Headers { func (o PredictiveMetricGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -90,7 +91,6 @@ func (c MetricsClient) PredictiveMetricGet(ctx context.Context, id AutoScaleSett var model PredictiveResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/metrics/version.go b/resource-manager/insights/2021-05-01-preview/metrics/version.go index 7058945a4d7..53f0bfb3fef 100644 --- a/resource-manager/insights/2021-05-01-preview/metrics/version.go +++ b/resource-manager/insights/2021-05-01-preview/metrics/version.go @@ -1,12 +1,10 @@ package metrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metrics/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/README.md b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/README.md index 54ed853e57a..a357835f150 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/README.md +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings` Documentation -The `subscriptiondiagnosticsettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-05-01-preview`). +The `subscriptiondiagnosticsettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/client.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/client.go index 641b4f2395d..3ffde53eb7a 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/client.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/client.go @@ -15,7 +15,7 @@ type SubscriptionDiagnosticSettingsClient struct { } func NewSubscriptionDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionDiagnosticSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptiondiagnosticsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptiondiagnosticsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionDiagnosticSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/id_diagnosticsetting.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/id_diagnosticsetting.go index 8a096133b06..50c1b6e9dc1 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/id_diagnosticsetting.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/id_diagnosticsetting.go @@ -40,7 +40,7 @@ func ParseDiagnosticSettingID(input string) (*DiagnosticSettingId, error) { } id := DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDiagnosticSettingIDInsensitively(input string) (*DiagnosticSettingId, } id := DiagnosticSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_createorupdate.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_createorupdate.go index 9bc88ff32ce..390ebc8d5fc 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_createorupdate.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionDiagnosticSettingsClient) CreateOrUpdate(ctx context.Context var model SubscriptionDiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_get.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_get.go index 1c95e30ece7..41a80b1f8f6 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_get.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionDiagnosticSettingsClient) Get(ctx context.Context, id Diagno var model SubscriptionDiagnosticSettingsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_list.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_list.go index a726f181732..0d08442f598 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_list.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/method_list.go @@ -47,7 +47,6 @@ func (c SubscriptionDiagnosticSettingsClient) List(ctx context.Context, id commo var model SubscriptionDiagnosticSettingsResourceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/version.go b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/version.go index 0c5bd8c0e5f..2bd55e65514 100644 --- a/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/version.go +++ b/resource-manager/insights/2021-05-01-preview/subscriptiondiagnosticsettings/version.go @@ -1,12 +1,10 @@ package subscriptiondiagnosticsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptiondiagnosticsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptiondiagnosticsettings/2021-05-01-preview" } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/README.md b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/README.md index 354fd78a23e..cdd7ee6867f 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/README.md +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-07-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/client.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/client.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privateendpointconnection.go index d1743b78c65..e2c7339f280 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privatelinkscope.go index 94e008cc775..d9f096b5675 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_get.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_listbyprivatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_listbyprivatelinkscope.go index 565265facee..0221d596e97 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_listbyprivatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/method_listbyprivatelinkscope.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByPrivateLinkScope(ctx context.Con var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/version.go b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/version.go index b6b27c85f86..2a33b763b12 100644 --- a/resource-manager/insights/2021-07-01-preview/privateendpointconnections/version.go +++ b/resource-manager/insights/2021-07-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2021-07-01-preview" } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/README.md b/resource-manager/insights/2021-07-01-preview/privatelinkresources/README.md index 6203ce4941d..bbf3e67818b 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/README.md +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-07-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/client.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/client.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkresource.go index 5ed81e4e465..ecbf3051980 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkscope.go index 262cf3fdba8..3ab0ea3481c 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_get.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_listbyprivatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_listbyprivatelinkscope.go index 0b8eaa9c00c..a373a5923bc 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_listbyprivatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/method_listbyprivatelinkscope.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByPrivateLinkScope(ctx context.Context, var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkresources/version.go b/resource-manager/insights/2021-07-01-preview/privatelinkresources/version.go index 5e6ee35f9a0..b9844ac636f 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkresources/version.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2021-07-01-preview" } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/README.md b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/README.md index e89f4872815..e06f47903e1 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/README.md +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources` Documentation -The `privatelinkscopedresources` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-07-01-preview`). +The `privatelinkscopedresources` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/client.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/client.go index d57bf6a3767..d924d476f97 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/client.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopedResourcesClient struct { } func NewPrivateLinkScopedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopedResourcesClient: %+v", err) } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_privatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_privatelinkscope.go index 8aa1d039fc0..f094ad2ec87 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_privatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_scopedresource.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_scopedresource.go index 38f42803e81..cc42cd0f608 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_scopedresource.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/id_scopedresource.go @@ -44,7 +44,7 @@ func ParseScopedResourceID(input string) (*ScopedResourceId, error) { } id := ScopedResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopedResourceIDInsensitively(input string) (*ScopedResourceId, error) } id := ScopedResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/method_get.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/method_get.go index b4973bf6c16..7ae23ddd290 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/method_get.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopedResourcesClient) Get(ctx context.Context, id ScopedReso var model ScopedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/version.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/version.go index 04f0456566c..fe90243d59e 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/version.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopedresources/version.go @@ -1,12 +1,10 @@ package privatelinkscopedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopedresources/2021-07-01-preview" } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md index f6e04d93b74..72908dcd011 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis` Documentation -The `privatelinkscopesapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-07-01-preview`). +The `privatelinkscopesapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go index 7db4b8bf924..aa9656d2469 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/client.go @@ -15,7 +15,7 @@ type PrivateLinkScopesAPIsClient struct { } func NewPrivateLinkScopesAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkScopesAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkscopesapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkscopesapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkScopesAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go index d495f485120..fbfedbaa33d 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/id_privatelinkscope.go @@ -42,7 +42,7 @@ func ParsePrivateLinkScopeID(input string) (*PrivateLinkScopeId, error) { } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkScopeIDInsensitively(input string) (*PrivateLinkScopeId, er } id := PrivateLinkScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go index 21bf558bfb3..112fa81d894 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopescreateorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesCreateOrUpdate(ctx context var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget.go index 58cb807f450..5a33b38d1a3 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesget.go @@ -45,7 +45,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesGet(ctx context.Context, i var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go index 008f03d8572..9e63d1d71dd 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/method_privatelinkscopesupdatetags.go @@ -49,7 +49,6 @@ func (c PrivateLinkScopesAPIsClient) PrivateLinkScopesUpdateTags(ctx context.Con var model AzureMonitorPrivateLinkScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go index e6c1b6f869f..beb001e41e2 100644 --- a/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go +++ b/resource-manager/insights/2021-07-01-preview/privatelinkscopesapis/version.go @@ -1,12 +1,10 @@ package privatelinkscopesapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkscopesapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkscopesapis/2021-07-01-preview" } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/README.md b/resource-manager/insights/2021-08-01/scheduledqueryrules/README.md index b1d8219d2cc..bf838dcb3c4 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/README.md +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-08-01/scheduledqueryrules` Documentation -The `scheduledqueryrules` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-08-01`). +The `scheduledqueryrules` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/client.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/client.go index 63d8edbd1f8..e15caa15195 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/client.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/client.go @@ -15,7 +15,7 @@ type ScheduledQueryRulesClient struct { } func NewScheduledQueryRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledQueryRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledqueryrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledqueryrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledQueryRulesClient: %+v", err) } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go index 01cd36a9038..dcca00c795c 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/id_scheduledqueryrule.go @@ -42,7 +42,7 @@ func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error) { } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_createorupdate.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_createorupdate.go index eadd944e0d4..fa2ea6765ca 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_createorupdate.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, id Schedu var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_get.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_get.go index 62152b9b78b..c910cf11291 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_get.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledQueryRulesClient) Get(ctx context.Context, id ScheduledQueryRul var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_update.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_update.go index a0bf99b1559..e130b08292c 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/method_update.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/method_update.go @@ -49,7 +49,6 @@ func (c ScheduledQueryRulesClient) Update(ctx context.Context, id ScheduledQuery var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-08-01/scheduledqueryrules/version.go b/resource-manager/insights/2021-08-01/scheduledqueryrules/version.go index 11f43740d7b..7ada5f74d50 100644 --- a/resource-manager/insights/2021-08-01/scheduledqueryrules/version.go +++ b/resource-manager/insights/2021-08-01/scheduledqueryrules/version.go @@ -1,12 +1,10 @@ package scheduledqueryrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledqueryrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledqueryrules/2021-08-01" } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/README.md b/resource-manager/insights/2021-09-01/actiongroupsapis/README.md index 166852efec3..104c562c52a 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/README.md +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-09-01/actiongroupsapis` Documentation -The `actiongroupsapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2021-09-01`). +The `actiongroupsapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2021-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/client.go b/resource-manager/insights/2021-09-01/actiongroupsapis/client.go index f5eb03facb0..98401f4cbc1 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/client.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/client.go @@ -15,7 +15,7 @@ type ActionGroupsAPIsClient struct { } func NewActionGroupsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionGroupsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actiongroupsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actiongroupsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionGroupsAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroup.go b/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroup.go index cfc1a76a050..a04a8f9ee0d 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroup.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroup.go @@ -42,7 +42,7 @@ func ParseActionGroupID(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionGroupIDInsensitively(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroupnotificationstatus.go b/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroupnotificationstatus.go index 1f339e066cc..a19ef8a9aa7 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroupnotificationstatus.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/id_actiongroupnotificationstatus.go @@ -44,7 +44,7 @@ func ParseActionGroupNotificationStatusID(input string) (*ActionGroupNotificatio } id := ActionGroupNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseActionGroupNotificationStatusIDInsensitively(input string) (*ActionGro } id := ActionGroupNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/id_notificationstatus.go b/resource-manager/insights/2021-09-01/actiongroupsapis/id_notificationstatus.go index b67d975fde9..5d8bef305da 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/id_notificationstatus.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/id_notificationstatus.go @@ -40,7 +40,7 @@ func ParseNotificationStatusID(input string) (*NotificationStatusId, error) { } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNotificationStatusIDInsensitively(input string) (*NotificationStatusId } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/id_providernotificationstatus.go b/resource-manager/insights/2021-09-01/actiongroupsapis/id_providernotificationstatus.go index 57fa203d19d..2109a9d4a75 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/id_providernotificationstatus.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/id_providernotificationstatus.go @@ -42,7 +42,7 @@ func ParseProviderNotificationStatusID(input string) (*ProviderNotificationStatu } id := ProviderNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderNotificationStatusIDInsensitively(input string) (*ProviderNoti } id := ProviderNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupscreateorupdate.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupscreateorupdate.go index 9e6307c3732..cd67af4ac55 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupscreateorupdate.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupscreateorupdate.go @@ -50,7 +50,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsCreateOrUpdate(ctx context.Context, var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsget.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsget.go index 96fc3d00628..6fd22d53cb8 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsget.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsget.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGet(ctx context.Context, id ActionGr var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotifications.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotifications.go index 0ca0bf9018b..133fdb96e88 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotifications.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotifications.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotifications(ctx context.Con var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go index 04584df374c..8b404249a66 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotificationsAtActionGroupRes var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go index 7e443a75476..5a08e284032 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotificationsAtResourceGroupL var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsupdate.go b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsupdate.go index 2c33272f8a7..f2f3fdc56f6 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsupdate.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/method_actiongroupsupdate.go @@ -49,7 +49,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsUpdate(ctx context.Context, id Actio var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2021-09-01/actiongroupsapis/version.go b/resource-manager/insights/2021-09-01/actiongroupsapis/version.go index f7859d6cdb7..e3acc81a8ef 100644 --- a/resource-manager/insights/2021-09-01/actiongroupsapis/version.go +++ b/resource-manager/insights/2021-09-01/actiongroupsapis/version.go @@ -1,12 +1,10 @@ package actiongroupsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actiongroupsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actiongroupsapis/2021-09-01" } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/README.md b/resource-manager/insights/2022-06-01/actiongroupsapis/README.md index d661ca6134d..a87672f38fc 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/README.md +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/actiongroupsapis` Documentation -The `actiongroupsapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-06-01`). +The `actiongroupsapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/client.go b/resource-manager/insights/2022-06-01/actiongroupsapis/client.go index f5eb03facb0..98401f4cbc1 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/client.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/client.go @@ -15,7 +15,7 @@ type ActionGroupsAPIsClient struct { } func NewActionGroupsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionGroupsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actiongroupsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actiongroupsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionGroupsAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroup.go b/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroup.go index cfc1a76a050..a04a8f9ee0d 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroup.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroup.go @@ -42,7 +42,7 @@ func ParseActionGroupID(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionGroupIDInsensitively(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroupnotificationstatus.go b/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroupnotificationstatus.go index 1f339e066cc..a19ef8a9aa7 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroupnotificationstatus.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/id_actiongroupnotificationstatus.go @@ -44,7 +44,7 @@ func ParseActionGroupNotificationStatusID(input string) (*ActionGroupNotificatio } id := ActionGroupNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseActionGroupNotificationStatusIDInsensitively(input string) (*ActionGro } id := ActionGroupNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/id_notificationstatus.go b/resource-manager/insights/2022-06-01/actiongroupsapis/id_notificationstatus.go index b67d975fde9..5d8bef305da 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/id_notificationstatus.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/id_notificationstatus.go @@ -40,7 +40,7 @@ func ParseNotificationStatusID(input string) (*NotificationStatusId, error) { } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNotificationStatusIDInsensitively(input string) (*NotificationStatusId } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/id_providernotificationstatus.go b/resource-manager/insights/2022-06-01/actiongroupsapis/id_providernotificationstatus.go index 57fa203d19d..2109a9d4a75 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/id_providernotificationstatus.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/id_providernotificationstatus.go @@ -42,7 +42,7 @@ func ParseProviderNotificationStatusID(input string) (*ProviderNotificationStatu } id := ProviderNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderNotificationStatusIDInsensitively(input string) (*ProviderNoti } id := ProviderNotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupscreateorupdate.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupscreateorupdate.go index 9e6307c3732..cd67af4ac55 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupscreateorupdate.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupscreateorupdate.go @@ -50,7 +50,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsCreateOrUpdate(ctx context.Context, var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsget.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsget.go index 96fc3d00628..6fd22d53cb8 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsget.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsget.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGet(ctx context.Context, id ActionGr var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotifications.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotifications.go index 0ca0bf9018b..133fdb96e88 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotifications.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotifications.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotifications(ctx context.Con var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go index 04584df374c..8b404249a66 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotificationsAtActionGroupRes var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go index 7e443a75476..5a08e284032 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsgettestnotificationsatresourcegrouplevel.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotificationsAtResourceGroupL var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsupdate.go b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsupdate.go index 2c33272f8a7..f2f3fdc56f6 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsupdate.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/method_actiongroupsupdate.go @@ -49,7 +49,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsUpdate(ctx context.Context, id Actio var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/actiongroupsapis/version.go b/resource-manager/insights/2022-06-01/actiongroupsapis/version.go index fd5d6af63b0..ec3eb446a9e 100644 --- a/resource-manager/insights/2022-06-01/actiongroupsapis/version.go +++ b/resource-manager/insights/2022-06-01/actiongroupsapis/version.go @@ -1,12 +1,10 @@ package actiongroupsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actiongroupsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actiongroupsapis/2022-06-01" } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/README.md b/resource-manager/insights/2022-06-01/datacollectionendpoints/README.md index 3506ced3738..418f65e34ad 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/README.md +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionendpoints` Documentation -The `datacollectionendpoints` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-06-01`). +The `datacollectionendpoints` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/client.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/client.go index 87bdf893d44..6bc91be42b5 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/client.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/client.go @@ -15,7 +15,7 @@ type DataCollectionEndpointsClient struct { } func NewDataCollectionEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataCollectionEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacollectionendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacollectionendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataCollectionEndpointsClient: %+v", err) } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go index 613a79533aa..565ceb637c1 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/id_datacollectionendpoint.go @@ -42,7 +42,7 @@ func ParseDataCollectionEndpointID(input string) (*DataCollectionEndpointId, err } id := DataCollectionEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataCollectionEndpointIDInsensitively(input string) (*DataCollectionEn } id := DataCollectionEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_create.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_create.go index a030026f8b8..5b18c4cef80 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_create.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_create.go @@ -50,7 +50,6 @@ func (c DataCollectionEndpointsClient) Create(ctx context.Context, id DataCollec var model DataCollectionEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_get.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_get.go index c76d55a8bf1..d9407846c6b 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_get.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_get.go @@ -45,7 +45,6 @@ func (c DataCollectionEndpointsClient) Get(ctx context.Context, id DataCollectio var model DataCollectionEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_update.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_update.go index 27ba0a5ec60..56e7fc824f1 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/method_update.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/method_update.go @@ -49,7 +49,6 @@ func (c DataCollectionEndpointsClient) Update(ctx context.Context, id DataCollec var model DataCollectionEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionendpoints/version.go b/resource-manager/insights/2022-06-01/datacollectionendpoints/version.go index 83aa2de6bd6..50d28c24348 100644 --- a/resource-manager/insights/2022-06-01/datacollectionendpoints/version.go +++ b/resource-manager/insights/2022-06-01/datacollectionendpoints/version.go @@ -1,12 +1,10 @@ package datacollectionendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacollectionendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacollectionendpoints/2022-06-01" } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/README.md b/resource-manager/insights/2022-06-01/datacollectionruleassociations/README.md index 6547406dd4f..586fdcff79d 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/README.md +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionruleassociations` Documentation -The `datacollectionruleassociations` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-06-01`). +The `datacollectionruleassociations` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/client.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/client.go index 1ac66a65960..ce8e5ef94f1 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/client.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/client.go @@ -15,7 +15,7 @@ type DataCollectionRuleAssociationsClient struct { } func NewDataCollectionRuleAssociationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataCollectionRuleAssociationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacollectionruleassociations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacollectionruleassociations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataCollectionRuleAssociationsClient: %+v", err) } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go index 49bcebd4651..aea41e18d0c 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionendpoint.go @@ -42,7 +42,7 @@ func ParseDataCollectionEndpointID(input string) (*DataCollectionEndpointId, err } id := DataCollectionEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataCollectionEndpointIDInsensitively(input string) (*DataCollectionEn } id := DataCollectionEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go index 9bd3f447ab0..21078bc1b81 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_datacollectionrule.go @@ -42,7 +42,7 @@ func ParseDataCollectionRuleID(input string) (*DataCollectionRuleId, error) { } id := DataCollectionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataCollectionRuleIDInsensitively(input string) (*DataCollectionRuleId } id := DataCollectionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go index a41aa6370ca..97c47038056 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/id_scopeddatacollectionruleassociation.go @@ -40,7 +40,7 @@ func ParseScopedDataCollectionRuleAssociationID(input string) (*ScopedDataCollec } id := ScopedDataCollectionRuleAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDataCollectionRuleAssociationIDInsensitively(input string) (*Sco } id := ScopedDataCollectionRuleAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_create.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_create.go index 296ae570265..5c5c8549781 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_create.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_create.go @@ -50,7 +50,6 @@ func (c DataCollectionRuleAssociationsClient) Create(ctx context.Context, id Sco var model DataCollectionRuleAssociationProxyOnlyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_get.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_get.go index c8dd489bea1..ae77d09198c 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_get.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/method_get.go @@ -45,7 +45,6 @@ func (c DataCollectionRuleAssociationsClient) Get(ctx context.Context, id Scoped var model DataCollectionRuleAssociationProxyOnlyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionruleassociations/version.go b/resource-manager/insights/2022-06-01/datacollectionruleassociations/version.go index 8fd7fdd1520..4dc0fe3b8b0 100644 --- a/resource-manager/insights/2022-06-01/datacollectionruleassociations/version.go +++ b/resource-manager/insights/2022-06-01/datacollectionruleassociations/version.go @@ -1,12 +1,10 @@ package datacollectionruleassociations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacollectionruleassociations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacollectionruleassociations/2022-06-01" } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/README.md b/resource-manager/insights/2022-06-01/datacollectionrules/README.md index c8688e52e35..5d570153263 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/README.md +++ b/resource-manager/insights/2022-06-01/datacollectionrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-06-01/datacollectionrules` Documentation -The `datacollectionrules` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-06-01`). +The `datacollectionrules` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/client.go b/resource-manager/insights/2022-06-01/datacollectionrules/client.go index 715b10fd358..40fd017244c 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/client.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/client.go @@ -15,7 +15,7 @@ type DataCollectionRulesClient struct { } func NewDataCollectionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataCollectionRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacollectionrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacollectionrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataCollectionRulesClient: %+v", err) } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go b/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go index 1e79f6efe93..9f952bb0064 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/id_datacollectionrule.go @@ -42,7 +42,7 @@ func ParseDataCollectionRuleID(input string) (*DataCollectionRuleId, error) { } id := DataCollectionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataCollectionRuleIDInsensitively(input string) (*DataCollectionRuleId } id := DataCollectionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/method_create.go b/resource-manager/insights/2022-06-01/datacollectionrules/method_create.go index 1aee4a277b0..61e624381a9 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/method_create.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/method_create.go @@ -50,7 +50,6 @@ func (c DataCollectionRulesClient) Create(ctx context.Context, id DataCollection var model DataCollectionRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/method_get.go b/resource-manager/insights/2022-06-01/datacollectionrules/method_get.go index 850aa256d74..fa5341855f9 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/method_get.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/method_get.go @@ -45,7 +45,6 @@ func (c DataCollectionRulesClient) Get(ctx context.Context, id DataCollectionRul var model DataCollectionRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/method_update.go b/resource-manager/insights/2022-06-01/datacollectionrules/method_update.go index 9d0d9273215..4c397b6b2ff 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/method_update.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/method_update.go @@ -49,7 +49,6 @@ func (c DataCollectionRulesClient) Update(ctx context.Context, id DataCollection var model DataCollectionRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-06-01/datacollectionrules/version.go b/resource-manager/insights/2022-06-01/datacollectionrules/version.go index 59f802f8071..21204834cd6 100644 --- a/resource-manager/insights/2022-06-01/datacollectionrules/version.go +++ b/resource-manager/insights/2022-06-01/datacollectionrules/version.go @@ -1,12 +1,10 @@ package datacollectionrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacollectionrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacollectionrules/2022-06-01" } diff --git a/resource-manager/insights/2022-10-01/autoscaleapis/README.md b/resource-manager/insights/2022-10-01/autoscaleapis/README.md index 9861a43123e..84009b9f1e8 100644 --- a/resource-manager/insights/2022-10-01/autoscaleapis/README.md +++ b/resource-manager/insights/2022-10-01/autoscaleapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscaleapis` Documentation -The `autoscaleapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-10-01`). +The `autoscaleapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-10-01/autoscaleapis/client.go b/resource-manager/insights/2022-10-01/autoscaleapis/client.go index 9152c2b293c..a2d624b8ac6 100644 --- a/resource-manager/insights/2022-10-01/autoscaleapis/client.go +++ b/resource-manager/insights/2022-10-01/autoscaleapis/client.go @@ -15,7 +15,7 @@ type AutoscaleAPIsClient struct { } func NewAutoscaleAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoscaleAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscaleapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscaleapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoscaleAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2022-10-01/autoscaleapis/id_autoscalesetting.go b/resource-manager/insights/2022-10-01/autoscaleapis/id_autoscalesetting.go index cd1ab32ea05..7d31f2eac81 100644 --- a/resource-manager/insights/2022-10-01/autoscaleapis/id_autoscalesetting.go +++ b/resource-manager/insights/2022-10-01/autoscaleapis/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-10-01/autoscaleapis/method_autoscalesettingsupdate.go b/resource-manager/insights/2022-10-01/autoscaleapis/method_autoscalesettingsupdate.go index bbd3fb32cb4..3e7372457eb 100644 --- a/resource-manager/insights/2022-10-01/autoscaleapis/method_autoscalesettingsupdate.go +++ b/resource-manager/insights/2022-10-01/autoscaleapis/method_autoscalesettingsupdate.go @@ -49,7 +49,6 @@ func (c AutoscaleAPIsClient) AutoscaleSettingsUpdate(ctx context.Context, id Aut var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-10-01/autoscaleapis/version.go b/resource-manager/insights/2022-10-01/autoscaleapis/version.go index 41fe9de7220..e233e7e86a5 100644 --- a/resource-manager/insights/2022-10-01/autoscaleapis/version.go +++ b/resource-manager/insights/2022-10-01/autoscaleapis/version.go @@ -1,12 +1,10 @@ package autoscaleapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscaleapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscaleapis/2022-10-01" } diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/README.md b/resource-manager/insights/2022-10-01/autoscalesettings/README.md index 2413d4c4c26..933a3a25adb 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/README.md +++ b/resource-manager/insights/2022-10-01/autoscalesettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/autoscalesettings` Documentation -The `autoscalesettings` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-10-01`). +The `autoscalesettings` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/client.go b/resource-manager/insights/2022-10-01/autoscalesettings/client.go index 6af68634bcc..06f51675ed3 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/client.go +++ b/resource-manager/insights/2022-10-01/autoscalesettings/client.go @@ -15,7 +15,7 @@ type AutoScaleSettingsClient struct { } func NewAutoScaleSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoScaleSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscalesettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscalesettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoScaleSettingsClient: %+v", err) } diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go b/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go index 5d89ae07420..d801cee9333 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go +++ b/resource-manager/insights/2022-10-01/autoscalesettings/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/method_createorupdate.go b/resource-manager/insights/2022-10-01/autoscalesettings/method_createorupdate.go index e7e33bd60bf..dba9a4bdeb6 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/method_createorupdate.go +++ b/resource-manager/insights/2022-10-01/autoscalesettings/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutoScaleSettingsClient) CreateOrUpdate(ctx context.Context, id AutoScal var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/method_get.go b/resource-manager/insights/2022-10-01/autoscalesettings/method_get.go index 2d2cfaa8591..48a8c08cb60 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/method_get.go +++ b/resource-manager/insights/2022-10-01/autoscalesettings/method_get.go @@ -45,7 +45,6 @@ func (c AutoScaleSettingsClient) Get(ctx context.Context, id AutoScaleSettingId) var model AutoscaleSettingResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-10-01/autoscalesettings/version.go b/resource-manager/insights/2022-10-01/autoscalesettings/version.go index 73867d20cf1..148cdcfaf46 100644 --- a/resource-manager/insights/2022-10-01/autoscalesettings/version.go +++ b/resource-manager/insights/2022-10-01/autoscalesettings/version.go @@ -1,12 +1,10 @@ package autoscalesettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscalesettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscalesettings/2022-10-01" } diff --git a/resource-manager/insights/2022-10-01/metrics/README.md b/resource-manager/insights/2022-10-01/metrics/README.md index 7336d015816..46e6551b3bc 100644 --- a/resource-manager/insights/2022-10-01/metrics/README.md +++ b/resource-manager/insights/2022-10-01/metrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2022-10-01/metrics` Documentation -The `metrics` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2022-10-01`). +The `metrics` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2022-10-01/metrics/client.go b/resource-manager/insights/2022-10-01/metrics/client.go index a793d0bd3f7..cfbc08d23b2 100644 --- a/resource-manager/insights/2022-10-01/metrics/client.go +++ b/resource-manager/insights/2022-10-01/metrics/client.go @@ -15,7 +15,7 @@ type MetricsClient struct { } func NewMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricsClient: %+v", err) } diff --git a/resource-manager/insights/2022-10-01/metrics/id_autoscalesetting.go b/resource-manager/insights/2022-10-01/metrics/id_autoscalesetting.go index 5ae4af928ef..d88c1b040be 100644 --- a/resource-manager/insights/2022-10-01/metrics/id_autoscalesetting.go +++ b/resource-manager/insights/2022-10-01/metrics/id_autoscalesetting.go @@ -42,7 +42,7 @@ func ParseAutoScaleSettingID(input string) (*AutoScaleSettingId, error) { } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleSettingIDInsensitively(input string) (*AutoScaleSettingId, er } id := AutoScaleSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2022-10-01/metrics/method_predictivemetricget.go b/resource-manager/insights/2022-10-01/metrics/method_predictivemetricget.go index 3b5b932c96d..a0ce4bde403 100644 --- a/resource-manager/insights/2022-10-01/metrics/method_predictivemetricget.go +++ b/resource-manager/insights/2022-10-01/metrics/method_predictivemetricget.go @@ -38,6 +38,7 @@ func (o PredictiveMetricGetOperationOptions) ToHeaders() *client.Headers { func (o PredictiveMetricGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -90,7 +91,6 @@ func (c MetricsClient) PredictiveMetricGet(ctx context.Context, id AutoScaleSett var model PredictiveResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2022-10-01/metrics/version.go b/resource-manager/insights/2022-10-01/metrics/version.go index 9434ebb5a06..57d5dda412b 100644 --- a/resource-manager/insights/2022-10-01/metrics/version.go +++ b/resource-manager/insights/2022-10-01/metrics/version.go @@ -1,12 +1,10 @@ package metrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metrics/2022-10-01" } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/README.md b/resource-manager/insights/2023-01-01/actiongroupsapis/README.md index e8ceabccd9f..70daef667ae 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/README.md +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-01-01/actiongroupsapis` Documentation -The `actiongroupsapis` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2023-01-01`). +The `actiongroupsapis` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/client.go b/resource-manager/insights/2023-01-01/actiongroupsapis/client.go index f5eb03facb0..98401f4cbc1 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/client.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/client.go @@ -15,7 +15,7 @@ type ActionGroupsAPIsClient struct { } func NewActionGroupsAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionGroupsAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actiongroupsapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actiongroupsapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionGroupsAPIsClient: %+v", err) } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go b/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go index cfc1a76a050..a04a8f9ee0d 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/id_actiongroup.go @@ -42,7 +42,7 @@ func ParseActionGroupID(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseActionGroupIDInsensitively(input string) (*ActionGroupId, error) { } id := ActionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go b/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go index 13e88e1105d..f87327e9c7f 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/id_notificationstatus.go @@ -44,7 +44,7 @@ func ParseNotificationStatusID(input string) (*NotificationStatusId, error) { } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationStatusIDInsensitively(input string) (*NotificationStatusId } id := NotificationStatusId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupscreateorupdate.go b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupscreateorupdate.go index 9e6307c3732..cd67af4ac55 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupscreateorupdate.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupscreateorupdate.go @@ -50,7 +50,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsCreateOrUpdate(ctx context.Context, var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsget.go b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsget.go index 96fc3d00628..6fd22d53cb8 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsget.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsget.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGet(ctx context.Context, id ActionGr var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go index b04de8ea74d..7fa9f74d458 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsgettestnotificationsatactiongroupresourcelevel.go @@ -45,7 +45,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsGetTestNotificationsAtActionGroupRes var model TestNotificationDetailsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsupdate.go b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsupdate.go index 2c33272f8a7..f2f3fdc56f6 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsupdate.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/method_actiongroupsupdate.go @@ -49,7 +49,6 @@ func (c ActionGroupsAPIsClient) ActionGroupsUpdate(ctx context.Context, id Actio var model ActionGroupResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-01-01/actiongroupsapis/version.go b/resource-manager/insights/2023-01-01/actiongroupsapis/version.go index 9d133b23f2a..0970fa39840 100644 --- a/resource-manager/insights/2023-01-01/actiongroupsapis/version.go +++ b/resource-manager/insights/2023-01-01/actiongroupsapis/version.go @@ -1,12 +1,10 @@ package actiongroupsapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actiongroupsapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actiongroupsapis/2023-01-01" } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/README.md b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/README.md index 531d05ea8e2..5c295c2f815 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/README.md +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-03-15-preview/scheduledqueryrules` Documentation -The `scheduledqueryrules` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2023-03-15-preview`). +The `scheduledqueryrules` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2023-03-15-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/client.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/client.go index 63d8edbd1f8..e15caa15195 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/client.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/client.go @@ -15,7 +15,7 @@ type ScheduledQueryRulesClient struct { } func NewScheduledQueryRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduledQueryRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scheduledqueryrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scheduledqueryrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduledQueryRulesClient: %+v", err) } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/id_scheduledqueryrule.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/id_scheduledqueryrule.go index 01cd36a9038..dcca00c795c 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/id_scheduledqueryrule.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/id_scheduledqueryrule.go @@ -42,7 +42,7 @@ func ParseScheduledQueryRuleID(input string) (*ScheduledQueryRuleId, error) { } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScheduledQueryRuleIDInsensitively(input string) (*ScheduledQueryRuleId } id := ScheduledQueryRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_createorupdate.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_createorupdate.go index eadd944e0d4..fa2ea6765ca 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_createorupdate.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, id Schedu var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_get.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_get.go index 62152b9b78b..c910cf11291 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_get.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_get.go @@ -45,7 +45,6 @@ func (c ScheduledQueryRulesClient) Get(ctx context.Context, id ScheduledQueryRul var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_update.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_update.go index a0bf99b1559..e130b08292c 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_update.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/method_update.go @@ -49,7 +49,6 @@ func (c ScheduledQueryRulesClient) Update(ctx context.Context, id ScheduledQuery var model ScheduledQueryRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/version.go b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/version.go index e6a836cb674..8d0cb18354c 100644 --- a/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/version.go +++ b/resource-manager/insights/2023-03-15-preview/scheduledqueryrules/version.go @@ -1,12 +1,10 @@ package scheduledqueryrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-15-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scheduledqueryrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scheduledqueryrules/2023-03-15-preview" } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/README.md b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/README.md index baaa60379b4..89202f6e90c 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/README.md +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-04-03/azuremonitorworkspaces` Documentation -The `azuremonitorworkspaces` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2023-04-03`). +The `azuremonitorworkspaces` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2023-04-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/client.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/client.go index c6b7282167a..7d2e76b4255 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/client.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/client.go @@ -15,7 +15,7 @@ type AzureMonitorWorkspacesClient struct { } func NewAzureMonitorWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureMonitorWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azuremonitorworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azuremonitorworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureMonitorWorkspacesClient: %+v", err) } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go index 914feefbf1b..ea6ae7ccfbf 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_create.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_create.go index 1a1d9c0a192..b2998da6daf 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_create.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_create.go @@ -50,7 +50,6 @@ func (c AzureMonitorWorkspacesClient) Create(ctx context.Context, id AccountId, var model AzureMonitorWorkspaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_get.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_get.go index 0ba899b755b..dcbbca98aea 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_get.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_get.go @@ -45,7 +45,6 @@ func (c AzureMonitorWorkspacesClient) Get(ctx context.Context, id AccountId) (re var model AzureMonitorWorkspaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_update.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_update.go index f8470b091b3..7c2c980f359 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_update.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/method_update.go @@ -49,7 +49,6 @@ func (c AzureMonitorWorkspacesClient) Update(ctx context.Context, id AccountId, var model AzureMonitorWorkspaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/version.go b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/version.go index 19f380d816f..fe3bf4ca47c 100644 --- a/resource-manager/insights/2023-04-03/azuremonitorworkspaces/version.go +++ b/resource-manager/insights/2023-04-03/azuremonitorworkspaces/version.go @@ -1,12 +1,10 @@ package azuremonitorworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azuremonitorworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azuremonitorworkspaces/2023-04-03" } diff --git a/resource-manager/insights/2023-10-01/metricdefinitions/README.md b/resource-manager/insights/2023-10-01/metricdefinitions/README.md index 54da9c0d150..df81ea2e3d8 100644 --- a/resource-manager/insights/2023-10-01/metricdefinitions/README.md +++ b/resource-manager/insights/2023-10-01/metricdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-10-01/metricdefinitions` Documentation -The `metricdefinitions` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2023-10-01`). +The `metricdefinitions` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2023-10-01/metricdefinitions/client.go b/resource-manager/insights/2023-10-01/metricdefinitions/client.go index 73ffa1b52de..71248f0507e 100644 --- a/resource-manager/insights/2023-10-01/metricdefinitions/client.go +++ b/resource-manager/insights/2023-10-01/metricdefinitions/client.go @@ -15,7 +15,7 @@ type MetricDefinitionsClient struct { } func NewMetricDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricDefinitionsClient: %+v", err) } diff --git a/resource-manager/insights/2023-10-01/metricdefinitions/method_list.go b/resource-manager/insights/2023-10-01/metricdefinitions/method_list.go index e6938e8761a..8eb6a0e9d2a 100644 --- a/resource-manager/insights/2023-10-01/metricdefinitions/method_list.go +++ b/resource-manager/insights/2023-10-01/metricdefinitions/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MetricDefinitionsClient) List(ctx context.Context, id commonids.ScopeId, var model MetricDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-10-01/metricdefinitions/method_listatsubscriptionscope.go b/resource-manager/insights/2023-10-01/metricdefinitions/method_listatsubscriptionscope.go index 7bfa5b10a49..134c81cb871 100644 --- a/resource-manager/insights/2023-10-01/metricdefinitions/method_listatsubscriptionscope.go +++ b/resource-manager/insights/2023-10-01/metricdefinitions/method_listatsubscriptionscope.go @@ -36,6 +36,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c MetricDefinitionsClient) ListAtSubscriptionScope(ctx context.Context, id var model SubscriptionScopeMetricDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-10-01/metricdefinitions/version.go b/resource-manager/insights/2023-10-01/metricdefinitions/version.go index 8f4f844574d..9487fc0ac27 100644 --- a/resource-manager/insights/2023-10-01/metricdefinitions/version.go +++ b/resource-manager/insights/2023-10-01/metricdefinitions/version.go @@ -1,12 +1,10 @@ package metricdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricdefinitions/2023-10-01" } diff --git a/resource-manager/insights/2023-10-01/metrics/README.md b/resource-manager/insights/2023-10-01/metrics/README.md index a8a3e57f679..579624eec55 100644 --- a/resource-manager/insights/2023-10-01/metrics/README.md +++ b/resource-manager/insights/2023-10-01/metrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2023-10-01/metrics` Documentation -The `metrics` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2023-10-01`). +The `metrics` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2023-10-01/metrics/client.go b/resource-manager/insights/2023-10-01/metrics/client.go index a793d0bd3f7..cfbc08d23b2 100644 --- a/resource-manager/insights/2023-10-01/metrics/client.go +++ b/resource-manager/insights/2023-10-01/metrics/client.go @@ -15,7 +15,7 @@ type MetricsClient struct { } func NewMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricsClient: %+v", err) } diff --git a/resource-manager/insights/2023-10-01/metrics/method_list.go b/resource-manager/insights/2023-10-01/metrics/method_list.go index 22655ca7850..da39f09e451 100644 --- a/resource-manager/insights/2023-10-01/metrics/method_list.go +++ b/resource-manager/insights/2023-10-01/metrics/method_list.go @@ -46,6 +46,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -119,7 +120,6 @@ func (c MetricsClient) List(ctx context.Context, id commonids.ScopeId, options L var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscope.go b/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscope.go index 79081037522..6055f0de8bd 100644 --- a/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscope.go +++ b/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscope.go @@ -47,6 +47,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -123,7 +124,6 @@ func (c MetricsClient) ListAtSubscriptionScope(ctx context.Context, id commonids var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscopepost.go b/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscopepost.go index 871dd051eac..241e2ac5cf7 100644 --- a/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscopepost.go +++ b/resource-manager/insights/2023-10-01/metrics/method_listatsubscriptionscopepost.go @@ -47,6 +47,7 @@ func (o ListAtSubscriptionScopePostOperationOptions) ToHeaders() *client.Headers func (o ListAtSubscriptionScopePostOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -127,7 +128,6 @@ func (c MetricsClient) ListAtSubscriptionScopePost(ctx context.Context, id commo var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2023-10-01/metrics/version.go b/resource-manager/insights/2023-10-01/metrics/version.go index 09c51627429..35b558edd12 100644 --- a/resource-manager/insights/2023-10-01/metrics/version.go +++ b/resource-manager/insights/2023-10-01/metrics/version.go @@ -1,12 +1,10 @@ package metrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metrics/2023-10-01" } diff --git a/resource-manager/insights/2024-02-01/metricdefinitions/README.md b/resource-manager/insights/2024-02-01/metricdefinitions/README.md index ca246380b86..529719d322e 100644 --- a/resource-manager/insights/2024-02-01/metricdefinitions/README.md +++ b/resource-manager/insights/2024-02-01/metricdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2024-02-01/metricdefinitions` Documentation -The `metricdefinitions` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2024-02-01`). +The `metricdefinitions` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2024-02-01/metricdefinitions/client.go b/resource-manager/insights/2024-02-01/metricdefinitions/client.go index 73ffa1b52de..71248f0507e 100644 --- a/resource-manager/insights/2024-02-01/metricdefinitions/client.go +++ b/resource-manager/insights/2024-02-01/metricdefinitions/client.go @@ -15,7 +15,7 @@ type MetricDefinitionsClient struct { } func NewMetricDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricDefinitionsClient: %+v", err) } diff --git a/resource-manager/insights/2024-02-01/metricdefinitions/method_list.go b/resource-manager/insights/2024-02-01/metricdefinitions/method_list.go index e6938e8761a..8eb6a0e9d2a 100644 --- a/resource-manager/insights/2024-02-01/metricdefinitions/method_list.go +++ b/resource-manager/insights/2024-02-01/metricdefinitions/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MetricDefinitionsClient) List(ctx context.Context, id commonids.ScopeId, var model MetricDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metricdefinitions/method_listatsubscriptionscope.go b/resource-manager/insights/2024-02-01/metricdefinitions/method_listatsubscriptionscope.go index 7bfa5b10a49..134c81cb871 100644 --- a/resource-manager/insights/2024-02-01/metricdefinitions/method_listatsubscriptionscope.go +++ b/resource-manager/insights/2024-02-01/metricdefinitions/method_listatsubscriptionscope.go @@ -36,6 +36,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c MetricDefinitionsClient) ListAtSubscriptionScope(ctx context.Context, id var model SubscriptionScopeMetricDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metricdefinitions/version.go b/resource-manager/insights/2024-02-01/metricdefinitions/version.go index 6f3a0abd861..38fe7d65a2b 100644 --- a/resource-manager/insights/2024-02-01/metricdefinitions/version.go +++ b/resource-manager/insights/2024-02-01/metricdefinitions/version.go @@ -1,12 +1,10 @@ package metricdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricdefinitions/2024-02-01" } diff --git a/resource-manager/insights/2024-02-01/metricnamespaces/README.md b/resource-manager/insights/2024-02-01/metricnamespaces/README.md index 46c313112ac..f731381efcd 100644 --- a/resource-manager/insights/2024-02-01/metricnamespaces/README.md +++ b/resource-manager/insights/2024-02-01/metricnamespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2024-02-01/metricnamespaces` Documentation -The `metricnamespaces` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2024-02-01`). +The `metricnamespaces` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2024-02-01/metricnamespaces/client.go b/resource-manager/insights/2024-02-01/metricnamespaces/client.go index 5b87cbfa38f..a3b6282df30 100644 --- a/resource-manager/insights/2024-02-01/metricnamespaces/client.go +++ b/resource-manager/insights/2024-02-01/metricnamespaces/client.go @@ -15,7 +15,7 @@ type MetricNamespacesClient struct { } func NewMetricNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricNamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metricnamespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metricnamespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricNamespacesClient: %+v", err) } diff --git a/resource-manager/insights/2024-02-01/metricnamespaces/method_list.go b/resource-manager/insights/2024-02-01/metricnamespaces/method_list.go index c992c6f3b99..112eec8a828 100644 --- a/resource-manager/insights/2024-02-01/metricnamespaces/method_list.go +++ b/resource-manager/insights/2024-02-01/metricnamespaces/method_list.go @@ -35,6 +35,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MetricNamespacesClient) List(ctx context.Context, id commonids.ScopeId, var model MetricNamespaceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metricnamespaces/version.go b/resource-manager/insights/2024-02-01/metricnamespaces/version.go index 0951c83a09b..070ae55fa2f 100644 --- a/resource-manager/insights/2024-02-01/metricnamespaces/version.go +++ b/resource-manager/insights/2024-02-01/metricnamespaces/version.go @@ -1,12 +1,10 @@ package metricnamespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metricnamespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metricnamespaces/2024-02-01" } diff --git a/resource-manager/insights/2024-02-01/metrics/README.md b/resource-manager/insights/2024-02-01/metrics/README.md index 767d5cafcd2..40a8133ab64 100644 --- a/resource-manager/insights/2024-02-01/metrics/README.md +++ b/resource-manager/insights/2024-02-01/metrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/insights/2024-02-01/metrics` Documentation -The `metrics` SDK allows for interaction with the Azure Resource Manager Service `insights` (API Version `2024-02-01`). +The `metrics` SDK allows for interaction with Azure Resource Manager `insights` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/insights/2024-02-01/metrics/client.go b/resource-manager/insights/2024-02-01/metrics/client.go index a793d0bd3f7..cfbc08d23b2 100644 --- a/resource-manager/insights/2024-02-01/metrics/client.go +++ b/resource-manager/insights/2024-02-01/metrics/client.go @@ -15,7 +15,7 @@ type MetricsClient struct { } func NewMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*MetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetricsClient: %+v", err) } diff --git a/resource-manager/insights/2024-02-01/metrics/method_list.go b/resource-manager/insights/2024-02-01/metrics/method_list.go index 22655ca7850..da39f09e451 100644 --- a/resource-manager/insights/2024-02-01/metrics/method_list.go +++ b/resource-manager/insights/2024-02-01/metrics/method_list.go @@ -46,6 +46,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -119,7 +120,6 @@ func (c MetricsClient) List(ctx context.Context, id commonids.ScopeId, options L var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscope.go b/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscope.go index 79081037522..6055f0de8bd 100644 --- a/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscope.go +++ b/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscope.go @@ -47,6 +47,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -123,7 +124,6 @@ func (c MetricsClient) ListAtSubscriptionScope(ctx context.Context, id commonids var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscopepost.go b/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscopepost.go index 871dd051eac..241e2ac5cf7 100644 --- a/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscopepost.go +++ b/resource-manager/insights/2024-02-01/metrics/method_listatsubscriptionscopepost.go @@ -47,6 +47,7 @@ func (o ListAtSubscriptionScopePostOperationOptions) ToHeaders() *client.Headers func (o ListAtSubscriptionScopePostOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -127,7 +128,6 @@ func (c MetricsClient) ListAtSubscriptionScopePost(ctx context.Context, id commo var model Response result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/insights/2024-02-01/metrics/version.go b/resource-manager/insights/2024-02-01/metrics/version.go index 1da8ce7a8c3..73f42557629 100644 --- a/resource-manager/insights/2024-02-01/metrics/version.go +++ b/resource-manager/insights/2024-02-01/metrics/version.go @@ -1,12 +1,10 @@ package metrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metrics/2024-02-01" } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/README.md b/resource-manager/iotcentral/2021-11-01-preview/apps/README.md index 0758234c524..fc616b5e554 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/README.md +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps` Documentation -The `apps` SDK allows for interaction with the Azure Resource Manager Service `iotcentral` (API Version `2021-11-01-preview`). +The `apps` SDK allows for interaction with Azure Resource Manager `iotcentral` (API Version `2021-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/client.go b/resource-manager/iotcentral/2021-11-01-preview/apps/client.go index ca91c5a9e2a..0706f0f8bb0 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/client.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/client.go @@ -15,7 +15,7 @@ type AppsClient struct { } func NewAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*AppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppsClient: %+v", err) } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go b/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go index feeedf87c21..7efe447fbc9 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/id_iotapp.go @@ -42,7 +42,7 @@ func ParseIotAppID(input string) (*IotAppId, error) { } id := IotAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIotAppIDInsensitively(input string) (*IotAppId, error) { } id := IotAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability.go b/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability.go index d9de92365a0..065d69af6f5 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c AppsClient) CheckNameAvailability(ctx context.Context, id commonids.Subs var model AppAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability.go b/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability.go index 8190810b878..cec21f39661 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/method_checksubdomainavailability.go @@ -51,7 +51,6 @@ func (c AppsClient) CheckSubdomainAvailability(ctx context.Context, id commonids var model AppAvailabilityInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/method_get.go b/resource-manager/iotcentral/2021-11-01-preview/apps/method_get.go index a69f5689ef3..40edc7f27e6 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/method_get.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/method_get.go @@ -45,7 +45,6 @@ func (c AppsClient) Get(ctx context.Context, id IotAppId) (result GetOperationRe var model App result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/apps/version.go b/resource-manager/iotcentral/2021-11-01-preview/apps/version.go index 057e77ab96a..26257e9ab79 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/apps/version.go +++ b/resource-manager/iotcentral/2021-11-01-preview/apps/version.go @@ -1,12 +1,10 @@ package apps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apps/2021-11-01-preview" } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/README.md b/resource-manager/iotcentral/2021-11-01-preview/networking/README.md index 35dd5aa9edd..278e323afcc 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/README.md +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/networking` Documentation -The `networking` SDK allows for interaction with the Azure Resource Manager Service `iotcentral` (API Version `2021-11-01-preview`). +The `networking` SDK allows for interaction with Azure Resource Manager `iotcentral` (API Version `2021-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/client.go b/resource-manager/iotcentral/2021-11-01-preview/networking/client.go index df72c7a6fa5..f91262afb9d 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/client.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/client.go @@ -15,7 +15,7 @@ type NetworkingClient struct { } func NewNetworkingClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networking", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networking", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkingClient: %+v", err) } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/id_iotapp.go b/resource-manager/iotcentral/2021-11-01-preview/networking/id_iotapp.go index 5854d8838db..50a19b544ea 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/id_iotapp.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/id_iotapp.go @@ -42,7 +42,7 @@ func ParseIotAppID(input string) (*IotAppId, error) { } id := IotAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIotAppIDInsensitively(input string) (*IotAppId, error) { } id := IotAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/id_privateendpointconnection.go b/resource-manager/iotcentral/2021-11-01-preview/networking/id_privateendpointconnection.go index 4d2e804490f..2f90a4e6b2f 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/id_privateendpointconnection.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/id_privatelinkresource.go b/resource-manager/iotcentral/2021-11-01-preview/networking/id_privatelinkresource.go index 59ea4710ddf..805d8be2357 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/id_privatelinkresource.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionsget.go b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionsget.go index ed2f878ac1b..e84fe164cc0 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionsget.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkingClient) PrivateEndpointConnectionsGet(ctx context.Context, id var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionslist.go b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionslist.go index 16cb3b65385..6d33ff8f50f 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionslist.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privateendpointconnectionslist.go @@ -46,7 +46,6 @@ func (c NetworkingClient) PrivateEndpointConnectionsList(ctx context.Context, id var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinksget.go b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinksget.go index d7b5241a538..b07765d130e 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinksget.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinksget.go @@ -45,7 +45,6 @@ func (c NetworkingClient) PrivateLinksGet(ctx context.Context, id PrivateLinkRes var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinkslist.go b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinkslist.go index e948dee22e6..7ab21118b68 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinkslist.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/method_privatelinkslist.go @@ -46,7 +46,6 @@ func (c NetworkingClient) PrivateLinksList(ctx context.Context, id IotAppId) (re var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/iotcentral/2021-11-01-preview/networking/version.go b/resource-manager/iotcentral/2021-11-01-preview/networking/version.go index 9d3c32bcb56..002c1368164 100644 --- a/resource-manager/iotcentral/2021-11-01-preview/networking/version.go +++ b/resource-manager/iotcentral/2021-11-01-preview/networking/version.go @@ -1,12 +1,10 @@ package networking -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networking/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networking/2021-11-01-preview" } diff --git a/resource-manager/keyvault/2023-02-01/keys/README.md b/resource-manager/keyvault/2023-02-01/keys/README.md index 707ffec235b..bdeca4c7cdf 100644 --- a/resource-manager/keyvault/2023-02-01/keys/README.md +++ b/resource-manager/keyvault/2023-02-01/keys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/keys` Documentation -The `keys` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `keys` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/keys/constants.go b/resource-manager/keyvault/2023-02-01/keys/constants.go index b72b139f6e8..fa467d2aaae 100644 --- a/resource-manager/keyvault/2023-02-01/keys/constants.go +++ b/resource-manager/keyvault/2023-02-01/keys/constants.go @@ -1,6 +1,8 @@ package keys -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/keys/version.go b/resource-manager/keyvault/2023-02-01/keys/version.go index e0df8df8fd7..c1704a4cac0 100644 --- a/resource-manager/keyvault/2023-02-01/keys/version.go +++ b/resource-manager/keyvault/2023-02-01/keys/version.go @@ -1,12 +1,10 @@ package keys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/keys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/keys/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/README.md b/resource-manager/keyvault/2023-02-01/managedhsmkeys/README.md index 81b8a2d0171..fa073f6fe8e 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/README.md +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsmkeys` Documentation -The `managedhsmkeys` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `managedhsmkeys` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/constants.go b/resource-manager/keyvault/2023-02-01/managedhsmkeys/constants.go index 20142cc93aa..75bddd78b4d 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/constants.go +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/constants.go @@ -1,6 +1,8 @@ package managedhsmkeys -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_key.go b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_key.go index 7774286f597..0cad9691337 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_key.go +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_managedhsm.go b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_managedhsm.go index ee04233b0d3..1b3c960e2d2 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_managedhsm.go +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_version.go b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_version.go index 82484afc136..76f9d970bdd 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_version.go +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/managedhsmkeys/version.go b/resource-manager/keyvault/2023-02-01/managedhsmkeys/version.go index 8d5f175be5c..fcd64f30ddc 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsmkeys/version.go +++ b/resource-manager/keyvault/2023-02-01/managedhsmkeys/version.go @@ -1,12 +1,10 @@ package managedhsmkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedhsmkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedhsmkeys/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/managedhsms/README.md b/resource-manager/keyvault/2023-02-01/managedhsms/README.md index 7db306cb3fb..80db04acf30 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsms/README.md +++ b/resource-manager/keyvault/2023-02-01/managedhsms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms` Documentation -The `managedhsms` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `managedhsms` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/managedhsms/constants.go b/resource-manager/keyvault/2023-02-01/managedhsms/constants.go index d6d903bd50d..bad605d4438 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsms/constants.go +++ b/resource-manager/keyvault/2023-02-01/managedhsms/constants.go @@ -1,6 +1,8 @@ package managedhsms -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go b/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go index e75d8dbaf29..c47c5ffc774 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go +++ b/resource-manager/keyvault/2023-02-01/managedhsms/id_deletedmanagedhsm.go @@ -42,7 +42,7 @@ func ParseDeletedManagedHSMID(input string) (*DeletedManagedHSMId, error) { } id := DeletedManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedManagedHSMIDInsensitively(input string) (*DeletedManagedHSMId, } id := DeletedManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go b/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go index 87fb72f30d7..d643f98b04a 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go +++ b/resource-manager/keyvault/2023-02-01/managedhsms/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/managedhsms/version.go b/resource-manager/keyvault/2023-02-01/managedhsms/version.go index 09de4ecdb8d..5edb0891bb7 100644 --- a/resource-manager/keyvault/2023-02-01/managedhsms/version.go +++ b/resource-manager/keyvault/2023-02-01/managedhsms/version.go @@ -1,12 +1,10 @@ package managedhsms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedhsms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedhsms/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/README.md b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/README.md index efc6bce352b..3709dc722fb 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections` Documentation -The `mhsmlistprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `mhsmlistprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/constants.go b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/constants.go index 6217f9d1eca..66bde9d92ff 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/constants.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/constants.go @@ -1,6 +1,8 @@ package mhsmlistprivateendpointconnections -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/id_managedhsm.go b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/id_managedhsm.go index 0f03d6e045f..30cbcf5a194 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/id_managedhsm.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/version.go b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/version.go index 97d9280a973..41abc519a34 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package mhsmlistprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmlistprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmlistprivateendpointconnections/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistregions/README.md b/resource-manager/keyvault/2023-02-01/mhsmlistregions/README.md index 0f84a3ed8c3..f608fa3b4af 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistregions/README.md +++ b/resource-manager/keyvault/2023-02-01/mhsmlistregions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmlistregions` Documentation -The `mhsmlistregions` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `mhsmlistregions` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistregions/constants.go b/resource-manager/keyvault/2023-02-01/mhsmlistregions/constants.go index 74a0de32d31..b2d166755bd 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistregions/constants.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistregions/constants.go @@ -1,6 +1,8 @@ package mhsmlistregions -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistregions/id_managedhsm.go b/resource-manager/keyvault/2023-02-01/mhsmlistregions/id_managedhsm.go index da4b699b203..ef07205507a 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistregions/id_managedhsm.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistregions/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/mhsmlistregions/version.go b/resource-manager/keyvault/2023-02-01/mhsmlistregions/version.go index ad60ccbe904..6dbd4324b02 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmlistregions/version.go +++ b/resource-manager/keyvault/2023-02-01/mhsmlistregions/version.go @@ -1,12 +1,10 @@ package mhsmlistregions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmlistregions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmlistregions/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/README.md b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/README.md index d9495e004df..1af7ba84364 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections` Documentation -The `mhsmprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `mhsmprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/constants.go b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/constants.go index c8d3a4886e3..5ef6378fe7c 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/constants.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/constants.go @@ -1,6 +1,8 @@ package mhsmprivateendpointconnections -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/id_privateendpointconnection.go index 876cc4ced29..c3d14772c82 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/version.go b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/version.go index 559fb80e3cc..dd0cd540936 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package mhsmprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmprivateendpointconnections/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/README.md b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/README.md index 9766183cc3f..d46ddd4ed2f 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/README.md +++ b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources` Documentation -The `mhsmprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `mhsmprivatelinkresources` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/constants.go b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/constants.go index aa5754b95cd..33968e7b417 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/constants.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/constants.go @@ -1,6 +1,8 @@ package mhsmprivatelinkresources -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/id_managedhsm.go b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/id_managedhsm.go index fa811cae02e..09f1ecad564 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/id_managedhsm.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/version.go b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/version.go index 101c688a416..fc80f5ae394 100644 --- a/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/version.go +++ b/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources/version.go @@ -1,12 +1,10 @@ package mhsmprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmprivatelinkresources/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/privateendpointconnections/README.md b/resource-manager/keyvault/2023-02-01/privateendpointconnections/README.md index fc6af346c6c..73c66ca6504 100644 --- a/resource-manager/keyvault/2023-02-01/privateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-02-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/privateendpointconnections/constants.go b/resource-manager/keyvault/2023-02-01/privateendpointconnections/constants.go index 127a9d9aafd..397bba6974f 100644 --- a/resource-manager/keyvault/2023-02-01/privateendpointconnections/constants.go +++ b/resource-manager/keyvault/2023-02-01/privateendpointconnections/constants.go @@ -1,6 +1,8 @@ package privateendpointconnections -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/privateendpointconnections/version.go b/resource-manager/keyvault/2023-02-01/privateendpointconnections/version.go index c52ff6ca032..bb23f356eb9 100644 --- a/resource-manager/keyvault/2023-02-01/privateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-02-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/privatelinkresources/README.md b/resource-manager/keyvault/2023-02-01/privatelinkresources/README.md index 3d03d9a6ad0..a1fcbbfe164 100644 --- a/resource-manager/keyvault/2023-02-01/privatelinkresources/README.md +++ b/resource-manager/keyvault/2023-02-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/privatelinkresources/version.go b/resource-manager/keyvault/2023-02-01/privatelinkresources/version.go index b722fc19353..1fdea962d74 100644 --- a/resource-manager/keyvault/2023-02-01/privatelinkresources/version.go +++ b/resource-manager/keyvault/2023-02-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/secrets/README.md b/resource-manager/keyvault/2023-02-01/secrets/README.md index ba8e8b1da1c..2a739033a26 100644 --- a/resource-manager/keyvault/2023-02-01/secrets/README.md +++ b/resource-manager/keyvault/2023-02-01/secrets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/secrets` Documentation -The `secrets` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `secrets` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/secrets/id_secret.go b/resource-manager/keyvault/2023-02-01/secrets/id_secret.go index 32365b5a6a5..2df2cfcf33b 100644 --- a/resource-manager/keyvault/2023-02-01/secrets/id_secret.go +++ b/resource-manager/keyvault/2023-02-01/secrets/id_secret.go @@ -44,7 +44,7 @@ func ParseSecretID(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecretIDInsensitively(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/secrets/version.go b/resource-manager/keyvault/2023-02-01/secrets/version.go index 9d9a45f8dd7..64f1b4447c8 100644 --- a/resource-manager/keyvault/2023-02-01/secrets/version.go +++ b/resource-manager/keyvault/2023-02-01/secrets/version.go @@ -1,12 +1,10 @@ package secrets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/secrets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/secrets/2023-02-01" } diff --git a/resource-manager/keyvault/2023-02-01/vaults/README.md b/resource-manager/keyvault/2023-02-01/vaults/README.md index de34b3b96e4..2b28fb57bdb 100644 --- a/resource-manager/keyvault/2023-02-01/vaults/README.md +++ b/resource-manager/keyvault/2023-02-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-02-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-02-01/vaults/constants.go b/resource-manager/keyvault/2023-02-01/vaults/constants.go index a9f3fd33ac5..2cafdc9b5de 100644 --- a/resource-manager/keyvault/2023-02-01/vaults/constants.go +++ b/resource-manager/keyvault/2023-02-01/vaults/constants.go @@ -1,6 +1,8 @@ package vaults -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go b/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go index c9cdbe35f3d..ebb7010c8c2 100644 --- a/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go +++ b/resource-manager/keyvault/2023-02-01/vaults/id_deletedvault.go @@ -42,7 +42,7 @@ func ParseDeletedVaultID(input string) (*DeletedVaultId, error) { } id := DeletedVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedVaultIDInsensitively(input string) (*DeletedVaultId, error) { } id := DeletedVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go b/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go index 1de0a5b2681..5179fc751eb 100644 --- a/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go +++ b/resource-manager/keyvault/2023-02-01/vaults/id_operationkind.go @@ -44,7 +44,7 @@ func ParseOperationKindID(input string) (*OperationKindId, error) { } id := OperationKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationKindIDInsensitively(input string) (*OperationKindId, error) { } id := OperationKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-02-01/vaults/version.go b/resource-manager/keyvault/2023-02-01/vaults/version.go index 02e0543ff4f..96fd80c28f5 100644 --- a/resource-manager/keyvault/2023-02-01/vaults/version.go +++ b/resource-manager/keyvault/2023-02-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2023-02-01" } diff --git a/resource-manager/keyvault/2023-07-01/keys/README.md b/resource-manager/keyvault/2023-07-01/keys/README.md index 142422a36e8..789a1af343d 100644 --- a/resource-manager/keyvault/2023-07-01/keys/README.md +++ b/resource-manager/keyvault/2023-07-01/keys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/keys` Documentation -The `keys` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `keys` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/keys/client.go b/resource-manager/keyvault/2023-07-01/keys/client.go index 91e56411c78..36c97638e22 100644 --- a/resource-manager/keyvault/2023-07-01/keys/client.go +++ b/resource-manager/keyvault/2023-07-01/keys/client.go @@ -15,7 +15,7 @@ type KeysClient struct { } func NewKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*KeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "keys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "keys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KeysClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/keys/method_createifnotexist.go b/resource-manager/keyvault/2023-07-01/keys/method_createifnotexist.go index eafcfe5f2f7..7e8e1c64add 100644 --- a/resource-manager/keyvault/2023-07-01/keys/method_createifnotexist.go +++ b/resource-manager/keyvault/2023-07-01/keys/method_createifnotexist.go @@ -50,7 +50,6 @@ func (c KeysClient) CreateIfNotExist(ctx context.Context, id commonids.KeyVaultK var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/keys/method_get.go b/resource-manager/keyvault/2023-07-01/keys/method_get.go index d5d378b6966..512fa087b6c 100644 --- a/resource-manager/keyvault/2023-07-01/keys/method_get.go +++ b/resource-manager/keyvault/2023-07-01/keys/method_get.go @@ -46,7 +46,6 @@ func (c KeysClient) Get(ctx context.Context, id commonids.KeyVaultKeyId) (result var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/keys/method_getversion.go b/resource-manager/keyvault/2023-07-01/keys/method_getversion.go index 21a312d124a..18995ab6157 100644 --- a/resource-manager/keyvault/2023-07-01/keys/method_getversion.go +++ b/resource-manager/keyvault/2023-07-01/keys/method_getversion.go @@ -46,7 +46,6 @@ func (c KeysClient) GetVersion(ctx context.Context, id commonids.KeyVaultKeyVers var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/keys/version.go b/resource-manager/keyvault/2023-07-01/keys/version.go index 9564bd2d30f..45c2b371ba4 100644 --- a/resource-manager/keyvault/2023-07-01/keys/version.go +++ b/resource-manager/keyvault/2023-07-01/keys/version.go @@ -1,12 +1,10 @@ package keys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/keys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/keys/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/README.md b/resource-manager/keyvault/2023-07-01/managedhsmkeys/README.md index f0082f7ef75..8d7958f20bc 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/README.md +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/managedhsmkeys` Documentation -The `managedhsmkeys` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `managedhsmkeys` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/client.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/client.go index e7245d7a210..8270b6fa95d 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/client.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/client.go @@ -15,7 +15,7 @@ type ManagedHsmKeysClient struct { } func NewManagedHsmKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedHsmKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedhsmkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedhsmkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedHsmKeysClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_key.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_key.go index 7774286f597..0cad9691337 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_key.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_managedhsm.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_managedhsm.go index ee04233b0d3..1b3c960e2d2 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_managedhsm.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_version.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_version.go index 82484afc136..76f9d970bdd 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_version.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_createifnotexist.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_createifnotexist.go index 06202fe1be2..15d09c223c9 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_createifnotexist.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_createifnotexist.go @@ -49,7 +49,6 @@ func (c ManagedHsmKeysClient) CreateIfNotExist(ctx context.Context, id KeyId, in var model ManagedHsmKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_get.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_get.go index 7332586f9a4..dc29f2e8cd6 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_get.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_get.go @@ -45,7 +45,6 @@ func (c ManagedHsmKeysClient) Get(ctx context.Context, id KeyId) (result GetOper var model ManagedHsmKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_getversion.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_getversion.go index a92f4e05194..1301a59a862 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_getversion.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/method_getversion.go @@ -45,7 +45,6 @@ func (c ManagedHsmKeysClient) GetVersion(ctx context.Context, id VersionId) (res var model ManagedHsmKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsmkeys/version.go b/resource-manager/keyvault/2023-07-01/managedhsmkeys/version.go index e1edaca4ca4..40ef78bc7b5 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsmkeys/version.go +++ b/resource-manager/keyvault/2023-07-01/managedhsmkeys/version.go @@ -1,12 +1,10 @@ package managedhsmkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedhsmkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedhsmkeys/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/README.md b/resource-manager/keyvault/2023-07-01/managedhsms/README.md index 7829fccab2f..6aaae919440 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/README.md +++ b/resource-manager/keyvault/2023-07-01/managedhsms/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/managedhsms` Documentation -The `managedhsms` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `managedhsms` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/client.go b/resource-manager/keyvault/2023-07-01/managedhsms/client.go index 7d80c6b65a0..4702a1257d3 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/client.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/client.go @@ -15,7 +15,7 @@ type ManagedHsmsClient struct { } func NewManagedHsmsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedHsmsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedhsms", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedhsms", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedHsmsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/id_deletedmanagedhsm.go b/resource-manager/keyvault/2023-07-01/managedhsms/id_deletedmanagedhsm.go index e75d8dbaf29..c47c5ffc774 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/id_deletedmanagedhsm.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/id_deletedmanagedhsm.go @@ -42,7 +42,7 @@ func ParseDeletedManagedHSMID(input string) (*DeletedManagedHSMId, error) { } id := DeletedManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedManagedHSMIDInsensitively(input string) (*DeletedManagedHSMId, } id := DeletedManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/id_managedhsm.go b/resource-manager/keyvault/2023-07-01/managedhsms/id_managedhsm.go index 87fb72f30d7..d643f98b04a 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/id_managedhsm.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/method_checkmhsmnameavailability.go b/resource-manager/keyvault/2023-07-01/managedhsms/method_checkmhsmnameavailability.go index 8ee226f52f3..3f7800d6c65 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/method_checkmhsmnameavailability.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/method_checkmhsmnameavailability.go @@ -51,7 +51,6 @@ func (c ManagedHsmsClient) CheckMhsmNameAvailability(ctx context.Context, id com var model CheckMhsmNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/method_get.go b/resource-manager/keyvault/2023-07-01/managedhsms/method_get.go index fa266e86103..8069e0a5619 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/method_get.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/method_get.go @@ -46,7 +46,6 @@ func (c ManagedHsmsClient) Get(ctx context.Context, id ManagedHSMId) (result Get var model ManagedHsm result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/method_getdeleted.go b/resource-manager/keyvault/2023-07-01/managedhsms/method_getdeleted.go index a1a9bd7e513..7c16558dcfc 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/method_getdeleted.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/method_getdeleted.go @@ -45,7 +45,6 @@ func (c ManagedHsmsClient) GetDeleted(ctx context.Context, id DeletedManagedHSMI var model DeletedManagedHsm result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/method_listbyresourcegroup.go b/resource-manager/keyvault/2023-07-01/managedhsms/method_listbyresourcegroup.go index 41dff99fa32..ca2f0d08e04 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/method_listbyresourcegroup.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/method_listbysubscription.go b/resource-manager/keyvault/2023-07-01/managedhsms/method_listbysubscription.go index 7298c28d3c1..6f660327ce7 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/method_listbysubscription.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/managedhsms/version.go b/resource-manager/keyvault/2023-07-01/managedhsms/version.go index d434a9ba71d..e09b8fad83b 100644 --- a/resource-manager/keyvault/2023-07-01/managedhsms/version.go +++ b/resource-manager/keyvault/2023-07-01/managedhsms/version.go @@ -1,12 +1,10 @@ package managedhsms -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedhsms/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedhsms/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/README.md b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/README.md index bedbbcec828..116da57165e 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections` Documentation -The `mhsmlistprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `mhsmlistprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/client.go b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/client.go index 5ae424fe241..ba5797c489c 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/client.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type MHSMListPrivateEndpointConnectionsClient struct { } func NewMHSMListPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MHSMListPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mhsmlistprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mhsmlistprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MHSMListPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/id_managedhsm.go b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/id_managedhsm.go index 0f03d6e045f..30cbcf5a194 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/id_managedhsm.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/version.go b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/version.go index 2796bc77cd7..cd52e0b28d9 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package mhsmlistprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmlistprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmlistprivateendpointconnections/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistregions/README.md b/resource-manager/keyvault/2023-07-01/mhsmlistregions/README.md index 6d322c854ff..ac828e4b5a1 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistregions/README.md +++ b/resource-manager/keyvault/2023-07-01/mhsmlistregions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/mhsmlistregions` Documentation -The `mhsmlistregions` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `mhsmlistregions` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistregions/client.go b/resource-manager/keyvault/2023-07-01/mhsmlistregions/client.go index 2afc4c3e8f1..1c453687514 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistregions/client.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistregions/client.go @@ -15,7 +15,7 @@ type MHSMListRegionsClient struct { } func NewMHSMListRegionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MHSMListRegionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mhsmlistregions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mhsmlistregions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MHSMListRegionsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistregions/id_managedhsm.go b/resource-manager/keyvault/2023-07-01/mhsmlistregions/id_managedhsm.go index da4b699b203..ef07205507a 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistregions/id_managedhsm.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistregions/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/mhsmlistregions/version.go b/resource-manager/keyvault/2023-07-01/mhsmlistregions/version.go index ea2933f28a8..1d19e8f964a 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmlistregions/version.go +++ b/resource-manager/keyvault/2023-07-01/mhsmlistregions/version.go @@ -1,12 +1,10 @@ package mhsmlistregions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmlistregions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmlistregions/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/README.md b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/README.md index 768a4786ff6..209acba41a5 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections` Documentation -The `mhsmprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `mhsmprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/client.go b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/client.go index 710a4a6195a..99b17fc2075 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/client.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type MHSMPrivateEndpointConnectionsClient struct { } func NewMHSMPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MHSMPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mhsmprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mhsmprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MHSMPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/id_privateendpointconnection.go index 876cc4ced29..c3d14772c82 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_get.go b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_get.go index bbec43e7eb2..3894c9fde03 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_get.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c MHSMPrivateEndpointConnectionsClient) Get(ctx context.Context, id Privat var model MHSMPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_put.go b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_put.go index 8b2a2e0452a..fd0a8f9fa2d 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_put.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/method_put.go @@ -49,7 +49,6 @@ func (c MHSMPrivateEndpointConnectionsClient) Put(ctx context.Context, id Privat var model MHSMPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/version.go b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/version.go index c219c4185a9..79be5f0f9f9 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package mhsmprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmprivateendpointconnections/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/README.md b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/README.md index a22f2b293b7..6e98c51555f 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/README.md +++ b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources` Documentation -The `mhsmprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `mhsmprivatelinkresources` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/client.go b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/client.go index 5748b25631c..27d08cdc9b1 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/client.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/client.go @@ -15,7 +15,7 @@ type MHSMPrivateLinkResourcesClient struct { } func NewMHSMPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*MHSMPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mhsmprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mhsmprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MHSMPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/id_managedhsm.go b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/id_managedhsm.go index fa811cae02e..09f1ecad564 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/id_managedhsm.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/id_managedhsm.go @@ -42,7 +42,7 @@ func ParseManagedHSMID(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error) { } id := ManagedHSMId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/method_listbymhsmresource.go b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/method_listbymhsmresource.go index ead8ef603f9..b3faf90ed75 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/method_listbymhsmresource.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/method_listbymhsmresource.go @@ -46,7 +46,6 @@ func (c MHSMPrivateLinkResourcesClient) ListByMHSMResource(ctx context.Context, var model MHSMPrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/version.go b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/version.go index db8096f2eaf..a0de88c1b47 100644 --- a/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/version.go +++ b/resource-manager/keyvault/2023-07-01/mhsmprivatelinkresources/version.go @@ -1,12 +1,10 @@ package mhsmprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mhsmprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mhsmprivatelinkresources/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/privateendpointconnections/README.md b/resource-manager/keyvault/2023-07-01/privateendpointconnections/README.md index 6e3dce79024..79285ef0fe8 100644 --- a/resource-manager/keyvault/2023-07-01/privateendpointconnections/README.md +++ b/resource-manager/keyvault/2023-07-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/privateendpointconnections/client.go b/resource-manager/keyvault/2023-07-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/keyvault/2023-07-01/privateendpointconnections/client.go +++ b/resource-manager/keyvault/2023-07-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_get.go b/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_get.go index d4181c273c7..858463234c2 100644 --- a/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_get.go +++ b/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_get.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id commonids. var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_put.go b/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_put.go index 5679253dfcc..69e432545ca 100644 --- a/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_put.go +++ b/resource-manager/keyvault/2023-07-01/privateendpointconnections/method_put.go @@ -50,7 +50,6 @@ func (c PrivateEndpointConnectionsClient) Put(ctx context.Context, id commonids. var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/privateendpointconnections/version.go b/resource-manager/keyvault/2023-07-01/privateendpointconnections/version.go index 35cb9c96d6d..3216474b9d5 100644 --- a/resource-manager/keyvault/2023-07-01/privateendpointconnections/version.go +++ b/resource-manager/keyvault/2023-07-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/privatelinkresources/README.md b/resource-manager/keyvault/2023-07-01/privatelinkresources/README.md index d9ce6058612..a2901220d2e 100644 --- a/resource-manager/keyvault/2023-07-01/privatelinkresources/README.md +++ b/resource-manager/keyvault/2023-07-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/privatelinkresources/client.go b/resource-manager/keyvault/2023-07-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/keyvault/2023-07-01/privatelinkresources/client.go +++ b/resource-manager/keyvault/2023-07-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/privatelinkresources/method_listbyvault.go b/resource-manager/keyvault/2023-07-01/privatelinkresources/method_listbyvault.go index fe2858b8b1c..1b2c4d5d6b8 100644 --- a/resource-manager/keyvault/2023-07-01/privatelinkresources/method_listbyvault.go +++ b/resource-manager/keyvault/2023-07-01/privatelinkresources/method_listbyvault.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) ListByVault(ctx context.Context, id commonid var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/privatelinkresources/version.go b/resource-manager/keyvault/2023-07-01/privatelinkresources/version.go index 1ba0006f742..7b5c2d96a3e 100644 --- a/resource-manager/keyvault/2023-07-01/privatelinkresources/version.go +++ b/resource-manager/keyvault/2023-07-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/secrets/README.md b/resource-manager/keyvault/2023-07-01/secrets/README.md index 50326165058..4ff5af07e78 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/README.md +++ b/resource-manager/keyvault/2023-07-01/secrets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/secrets` Documentation -The `secrets` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `secrets` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/secrets/client.go b/resource-manager/keyvault/2023-07-01/secrets/client.go index c8a49ae1e6b..07a23983c45 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/client.go +++ b/resource-manager/keyvault/2023-07-01/secrets/client.go @@ -15,7 +15,7 @@ type SecretsClient struct { } func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "secrets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "secrets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecretsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/secrets/id_secret.go b/resource-manager/keyvault/2023-07-01/secrets/id_secret.go index 32365b5a6a5..2df2cfcf33b 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/id_secret.go +++ b/resource-manager/keyvault/2023-07-01/secrets/id_secret.go @@ -44,7 +44,7 @@ func ParseSecretID(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecretIDInsensitively(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/secrets/method_createorupdate.go b/resource-manager/keyvault/2023-07-01/secrets/method_createorupdate.go index ea329123f4c..6dac5184eee 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/method_createorupdate.go +++ b/resource-manager/keyvault/2023-07-01/secrets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecretsClient) CreateOrUpdate(ctx context.Context, id SecretId, input Se var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/secrets/method_get.go b/resource-manager/keyvault/2023-07-01/secrets/method_get.go index 13c1528927a..dd688babed6 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/method_get.go +++ b/resource-manager/keyvault/2023-07-01/secrets/method_get.go @@ -45,7 +45,6 @@ func (c SecretsClient) Get(ctx context.Context, id SecretId) (result GetOperatio var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/secrets/method_list.go b/resource-manager/keyvault/2023-07-01/secrets/method_list.go index 772c75da33b..4e8ea3e359e 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/method_list.go +++ b/resource-manager/keyvault/2023-07-01/secrets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/secrets/method_update.go b/resource-manager/keyvault/2023-07-01/secrets/method_update.go index f6531f3a29e..38bdcc04c5f 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/method_update.go +++ b/resource-manager/keyvault/2023-07-01/secrets/method_update.go @@ -50,7 +50,6 @@ func (c SecretsClient) Update(ctx context.Context, id SecretId, input SecretPatc var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/secrets/version.go b/resource-manager/keyvault/2023-07-01/secrets/version.go index 71a0372e4a0..34a164f8d4f 100644 --- a/resource-manager/keyvault/2023-07-01/secrets/version.go +++ b/resource-manager/keyvault/2023-07-01/secrets/version.go @@ -1,12 +1,10 @@ package secrets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/secrets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/secrets/2023-07-01" } diff --git a/resource-manager/keyvault/2023-07-01/vaults/README.md b/resource-manager/keyvault/2023-07-01/vaults/README.md index 71809e8b1b0..a7cce87c1d2 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/README.md +++ b/resource-manager/keyvault/2023-07-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `keyvault` (API Version `2023-07-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `keyvault` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/keyvault/2023-07-01/vaults/client.go b/resource-manager/keyvault/2023-07-01/vaults/client.go index 1ddc5db936e..37bd7a44670 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/client.go +++ b/resource-manager/keyvault/2023-07-01/vaults/client.go @@ -15,7 +15,7 @@ type VaultsClient struct { } func NewVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultsClient: %+v", err) } diff --git a/resource-manager/keyvault/2023-07-01/vaults/id_deletedvault.go b/resource-manager/keyvault/2023-07-01/vaults/id_deletedvault.go index c9cdbe35f3d..ebb7010c8c2 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/id_deletedvault.go +++ b/resource-manager/keyvault/2023-07-01/vaults/id_deletedvault.go @@ -42,7 +42,7 @@ func ParseDeletedVaultID(input string) (*DeletedVaultId, error) { } id := DeletedVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedVaultIDInsensitively(input string) (*DeletedVaultId, error) { } id := DeletedVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/vaults/id_operationkind.go b/resource-manager/keyvault/2023-07-01/vaults/id_operationkind.go index 1de0a5b2681..5179fc751eb 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/id_operationkind.go +++ b/resource-manager/keyvault/2023-07-01/vaults/id_operationkind.go @@ -44,7 +44,7 @@ func ParseOperationKindID(input string) (*OperationKindId, error) { } id := OperationKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationKindIDInsensitively(input string) (*OperationKindId, error) { } id := OperationKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_checknameavailability.go b/resource-manager/keyvault/2023-07-01/vaults/method_checknameavailability.go index 1f0b4d7b2c8..7c7a6ee9312 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_checknameavailability.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c VaultsClient) CheckNameAvailability(ctx context.Context, id commonids.Su var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_get.go b/resource-manager/keyvault/2023-07-01/vaults/method_get.go index 5a22da356a4..2b39e261b71 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_get.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_get.go @@ -46,7 +46,6 @@ func (c VaultsClient) Get(ctx context.Context, id commonids.KeyVaultId) (result var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_getdeleted.go b/resource-manager/keyvault/2023-07-01/vaults/method_getdeleted.go index b83017e30ea..3d8e1856e62 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_getdeleted.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_getdeleted.go @@ -45,7 +45,6 @@ func (c VaultsClient) GetDeleted(ctx context.Context, id DeletedVaultId) (result var model DeletedVault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_list.go b/resource-manager/keyvault/2023-07-01/vaults/method_list.go index 30ab33d8c93..539855f32ba 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_list.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go b/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go index dc0786bc437..db6ebff4bae 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go b/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go index e062a696382..a2d216fea2f 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_update.go b/resource-manager/keyvault/2023-07-01/vaults/method_update.go index 38533b8abb1..132468e7ca3 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_update.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_update.go @@ -51,7 +51,6 @@ func (c VaultsClient) Update(ctx context.Context, id commonids.KeyVaultId, input var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/vaults/method_updateaccesspolicy.go b/resource-manager/keyvault/2023-07-01/vaults/method_updateaccesspolicy.go index 69e77188f12..7625f00ba01 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/method_updateaccesspolicy.go +++ b/resource-manager/keyvault/2023-07-01/vaults/method_updateaccesspolicy.go @@ -50,7 +50,6 @@ func (c VaultsClient) UpdateAccessPolicy(ctx context.Context, id OperationKindId var model VaultAccessPolicyParameters result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/keyvault/2023-07-01/vaults/version.go b/resource-manager/keyvault/2023-07-01/vaults/version.go index eb63831d143..5b94cabf653 100644 --- a/resource-manager/keyvault/2023-07-01/vaults/version.go +++ b/resource-manager/keyvault/2023-07-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2023-07-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/README.md index 92a1d67300b..77f53d0d6b0 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions` Documentation -The `clusterextensions` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `clusterextensions` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/client.go index 2170a0725b4..89b73b3c682 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/client.go @@ -15,7 +15,7 @@ type ClusterExtensionsClient struct { } func NewClusterExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterExtensionsClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/id_scopedextension.go b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/id_scopedextension.go index 1ff1a718ace..ed802b2d507 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/id_scopedextension.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/id_scopedextension.go @@ -40,7 +40,7 @@ func ParseScopedExtensionID(input string) (*ScopedExtensionId, error) { } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, erro } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsdelete.go b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsdelete.go index 3e3877ecd8b..c1ab66a668f 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsdelete.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsdelete.go @@ -36,6 +36,7 @@ func (o ExtensionsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ExtensionsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsget.go b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsget.go index 2381c7832f9..235a1896549 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsget.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/method_extensionsget.go @@ -45,7 +45,6 @@ func (c ClusterExtensionsClient) ExtensionsGet(ctx context.Context, id ScopedExt var model Extension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/version.go index 647662a70a4..32ad66990bc 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/clusterextensions/version.go @@ -1,12 +1,10 @@ package clusterextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterextensions/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/README.md index e8c176d6fc7..d751b708028 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `extensions` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go index 57c085319c9..1880229734e 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/id_scopedextension.go @@ -40,7 +40,7 @@ func ParseScopedExtensionID(input string) (*ScopedExtensionId, error) { } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, erro } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_delete.go b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_delete.go index 92ebf4e2280..cf626bf0fde 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_delete.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_get.go b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_get.go index cd41d7bbb2c..a889f506897 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_get.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/method_get.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) Get(ctx context.Context, id ScopedExtensionId) (result var model Extension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/version.go index 7a2daacbafc..f3ac6a2f5a6 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/extensions/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/flux/README.md index 812a8b01a4e..a1d3dbb6993 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/flux` Documentation -The `flux` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `flux` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/flux/client.go index ea34cc2b6c2..3bb7db394a0 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/client.go @@ -15,7 +15,7 @@ type FluxClient struct { } func NewFluxClientWithBaseURI(sdkApi sdkEnv.Api) (*FluxClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flux", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flux", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluxClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/id_scopedfluxconfiguration.go b/resource-manager/kubernetesconfiguration/2022-11-01/flux/id_scopedfluxconfiguration.go index 016579aff1b..4cfa0c812a7 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/id_scopedfluxconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/id_scopedfluxconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedFluxConfigurationID(input string) (*ScopedFluxConfigurationId, e } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedFluxConfigurationIDInsensitively(input string) (*ScopedFluxConfi } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsdelete.go b/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsdelete.go index cb78c710f5e..598ce43f399 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsdelete.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsdelete.go @@ -36,6 +36,7 @@ func (o ConfigurationsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ConfigurationsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsget.go b/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsget.go index e2da945854a..8e720b71432 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsget.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/method_configurationsget.go @@ -45,7 +45,6 @@ func (c FluxClient) ConfigurationsGet(ctx context.Context, id ScopedFluxConfigur var model FluxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/flux/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/flux/version.go index 8cb9d68e363..18bc0248dfa 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/flux/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/flux/version.go @@ -1,12 +1,10 @@ package flux -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flux/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flux/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/README.md index c679fa96f87..4a61378ffbc 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration` Documentation -The `fluxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `fluxconfiguration` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/client.go index 742e70f8a2b..e8a4ce031f5 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/client.go @@ -15,7 +15,7 @@ type FluxConfigurationClient struct { } func NewFluxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*FluxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluxConfigurationClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go index 41d3cd66d47..711a4879eb6 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/id_scopedfluxconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedFluxConfigurationID(input string) (*ScopedFluxConfigurationId, e } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedFluxConfigurationIDInsensitively(input string) (*ScopedFluxConfi } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_delete.go b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_delete.go index 64a49d42f18..6ead6e07261 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_delete.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_get.go b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_get.go index ecd54c34d07..0facf939c8a 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_get.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c FluxConfigurationClient) Get(ctx context.Context, id ScopedFluxConfigura var model FluxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/version.go index 35604ec47e2..ca0e7395f35 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/fluxconfiguration/version.go @@ -1,12 +1,10 @@ package fluxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluxconfiguration/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/README.md index 9081fa6e467..3bb78c3d580 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster` Documentation -The `operationsinacluster` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `operationsinacluster` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/client.go index f364711cd9b..8aa5b27190f 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/client.go @@ -15,7 +15,7 @@ type OperationsInAClusterClient struct { } func NewOperationsInAClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsInAClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationsinacluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationsinacluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsInAClusterClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/version.go index 8a01ba40548..f7b4aa9f91c 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/operationsinacluster/version.go @@ -1,12 +1,10 @@ package operationsinacluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationsinacluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationsinacluster/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/README.md b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/README.md index 6e576fea760..dd1c6445266 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/README.md +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration` Documentation -The `sourcecontrolconfiguration` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2022-11-01`). +The `sourcecontrolconfiguration` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/client.go b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/client.go index c97f0d63f9c..96ee9c0a133 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/client.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/client.go @@ -15,7 +15,7 @@ type SourceControlConfigurationClient struct { } func NewSourceControlConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlConfigurationClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go index 26f9cc1092a..a0ecfcac32a 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedSourceControlConfigurationID(input string) (*ScopedSourceControl } id := ScopedSourceControlConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedSourceControlConfigurationIDInsensitively(input string) (*Scoped } id := ScopedSourceControlConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_createorupdate.go b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_createorupdate.go index b07014d22d1..66e38cc4fef 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_createorupdate.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlConfigurationClient) CreateOrUpdate(ctx context.Context, id var model SourceControlConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_get.go b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_get.go index 11cf0be3aaf..e2e55858e6f 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_get.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlConfigurationClient) Get(ctx context.Context, id ScopedSour var model SourceControlConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/version.go b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/version.go index 817dbf4def2..1e15e5c504e 100644 --- a/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/version.go +++ b/resource-manager/kubernetesconfiguration/2022-11-01/sourcecontrolconfiguration/version.go @@ -1,12 +1,10 @@ package sourcecontrolconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolconfiguration/2022-11-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/README.md index 6395f616b64..701673ad4df 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions` Documentation -The `clusterextensions` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `clusterextensions` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/client.go index 2170a0725b4..89b73b3c682 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/client.go @@ -15,7 +15,7 @@ type ClusterExtensionsClient struct { } func NewClusterExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterExtensionsClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/id_scopedextension.go b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/id_scopedextension.go index 1ff1a718ace..ed802b2d507 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/id_scopedextension.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/id_scopedextension.go @@ -40,7 +40,7 @@ func ParseScopedExtensionID(input string) (*ScopedExtensionId, error) { } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, erro } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsdelete.go b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsdelete.go index 3e3877ecd8b..c1ab66a668f 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsdelete.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsdelete.go @@ -36,6 +36,7 @@ func (o ExtensionsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ExtensionsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsget.go b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsget.go index 2381c7832f9..235a1896549 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsget.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/method_extensionsget.go @@ -45,7 +45,6 @@ func (c ClusterExtensionsClient) ExtensionsGet(ctx context.Context, id ScopedExt var model Extension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/version.go index b9d507d62b8..f0751898a1b 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/clusterextensions/version.go @@ -1,12 +1,10 @@ package clusterextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterextensions/2023-05-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/README.md index b4344f73d7d..d0e95a79968 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/extensions` Documentation -The `extensions` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `extensions` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/client.go index 44725ac0e84..682e8266708 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/client.go @@ -15,7 +15,7 @@ type ExtensionsClient struct { } func NewExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtensionsClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/id_scopedextension.go b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/id_scopedextension.go index 57c085319c9..1880229734e 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/id_scopedextension.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/id_scopedextension.go @@ -40,7 +40,7 @@ func ParseScopedExtensionID(input string) (*ScopedExtensionId, error) { } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedExtensionIDInsensitively(input string) (*ScopedExtensionId, erro } id := ScopedExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_delete.go b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_delete.go index 92ebf4e2280..cf626bf0fde 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_delete.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_get.go b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_get.go index cd41d7bbb2c..a889f506897 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_get.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/method_get.go @@ -45,7 +45,6 @@ func (c ExtensionsClient) Get(ctx context.Context, id ScopedExtensionId) (result var model Extension result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/version.go index b4299279b77..343fa2f2311 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/extensions/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/extensions/version.go @@ -1,12 +1,10 @@ package extensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extensions/2023-05-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/flux/README.md index 6a9afcc5e73..174e53cde20 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/flux` Documentation -The `flux` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `flux` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/flux/client.go index ea34cc2b6c2..3bb7db394a0 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/client.go @@ -15,7 +15,7 @@ type FluxClient struct { } func NewFluxClientWithBaseURI(sdkApi sdkEnv.Api) (*FluxClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flux", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flux", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluxClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/id_scopedfluxconfiguration.go b/resource-manager/kubernetesconfiguration/2023-05-01/flux/id_scopedfluxconfiguration.go index 016579aff1b..4cfa0c812a7 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/id_scopedfluxconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/id_scopedfluxconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedFluxConfigurationID(input string) (*ScopedFluxConfigurationId, e } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedFluxConfigurationIDInsensitively(input string) (*ScopedFluxConfi } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsdelete.go b/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsdelete.go index cb78c710f5e..598ce43f399 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsdelete.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsdelete.go @@ -36,6 +36,7 @@ func (o ConfigurationsDeleteOperationOptions) ToHeaders() *client.Headers { func (o ConfigurationsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsget.go b/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsget.go index e2da945854a..8e720b71432 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsget.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/method_configurationsget.go @@ -45,7 +45,6 @@ func (c FluxClient) ConfigurationsGet(ctx context.Context, id ScopedFluxConfigur var model FluxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/flux/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/flux/version.go index 3ea009669d6..10ff28e9cc2 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/flux/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/flux/version.go @@ -1,12 +1,10 @@ package flux -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flux/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flux/2023-05-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/README.md index 6ca5dbfb13a..f6900119c12 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration` Documentation -The `fluxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `fluxconfiguration` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/client.go index 742e70f8a2b..e8a4ce031f5 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/client.go @@ -15,7 +15,7 @@ type FluxConfigurationClient struct { } func NewFluxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*FluxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fluxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fluxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FluxConfigurationClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/id_scopedfluxconfiguration.go b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/id_scopedfluxconfiguration.go index 41d3cd66d47..711a4879eb6 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/id_scopedfluxconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/id_scopedfluxconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedFluxConfigurationID(input string) (*ScopedFluxConfigurationId, e } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedFluxConfigurationIDInsensitively(input string) (*ScopedFluxConfi } id := ScopedFluxConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_delete.go b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_delete.go index 64a49d42f18..6ead6e07261 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_delete.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_get.go b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_get.go index ecd54c34d07..0facf939c8a 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_get.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c FluxConfigurationClient) Get(ctx context.Context, id ScopedFluxConfigura var model FluxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/version.go index da8f0a2022d..cc1a17da5fd 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/fluxconfiguration/version.go @@ -1,12 +1,10 @@ package fluxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fluxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fluxconfiguration/2023-05-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/README.md index 19952f617c5..3f978d0aa89 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster` Documentation -The `operationsinacluster` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `operationsinacluster` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/client.go index f364711cd9b..8aa5b27190f 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/client.go @@ -15,7 +15,7 @@ type OperationsInAClusterClient struct { } func NewOperationsInAClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsInAClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationsinacluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationsinacluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsInAClusterClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/version.go index 07b340ab104..035c748d208 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/operationsinacluster/version.go @@ -1,12 +1,10 @@ package operationsinacluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationsinacluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationsinacluster/2023-05-01" } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/README.md b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/README.md index f88eedbc22b..10ba87c82e6 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/README.md +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration` Documentation -The `sourcecontrolconfiguration` SDK allows for interaction with the Azure Resource Manager Service `kubernetesconfiguration` (API Version `2023-05-01`). +The `sourcecontrolconfiguration` SDK allows for interaction with Azure Resource Manager `kubernetesconfiguration` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/client.go b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/client.go index c97f0d63f9c..96ee9c0a133 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/client.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/client.go @@ -15,7 +15,7 @@ type SourceControlConfigurationClient struct { } func NewSourceControlConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrolconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrolconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlConfigurationClient: %+v", err) } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go index 26f9cc1092a..a0ecfcac32a 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/id_scopedsourcecontrolconfiguration.go @@ -40,7 +40,7 @@ func ParseScopedSourceControlConfigurationID(input string) (*ScopedSourceControl } id := ScopedSourceControlConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedSourceControlConfigurationIDInsensitively(input string) (*Scoped } id := ScopedSourceControlConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_createorupdate.go b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_createorupdate.go index b07014d22d1..66e38cc4fef 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_createorupdate.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SourceControlConfigurationClient) CreateOrUpdate(ctx context.Context, id var model SourceControlConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_get.go b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_get.go index 11cf0be3aaf..e2e55858e6f 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_get.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlConfigurationClient) Get(ctx context.Context, id ScopedSour var model SourceControlConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/version.go b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/version.go index 386c2644afa..5e2e980ae44 100644 --- a/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/version.go +++ b/resource-manager/kubernetesconfiguration/2023-05-01/sourcecontrolconfiguration/version.go @@ -1,12 +1,10 @@ package sourcecontrolconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrolconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrolconfiguration/2023-05-01" } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md index ebab7e59cfb..a628bcd66e3 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations` Documentation -The `attacheddatabaseconfigurations` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `attacheddatabaseconfigurations` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/client.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/client.go index 48860590ab4..92c6e47e4b1 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/client.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/client.go @@ -15,7 +15,7 @@ type AttachedDatabaseConfigurationsClient struct { } func NewAttachedDatabaseConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDatabaseConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatabaseconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatabaseconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDatabaseConfigurationsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go index d5052c7cfcf..ddc7d844a86 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/id_attacheddatabaseconfiguration.go @@ -44,7 +44,7 @@ func ParseAttachedDatabaseConfigurationID(input string) (*AttachedDatabaseConfig } id := AttachedDatabaseConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAttachedDatabaseConfigurationIDInsensitively(input string) (*AttachedD } id := AttachedDatabaseConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability.go index 7726f53e057..08dd7288a49 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c AttachedDatabaseConfigurationsClient) CheckNameAvailability(ctx context. var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_get.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_get.go index 153754044f5..7b2caf73fe1 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_get.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDatabaseConfigurationsClient) Get(ctx context.Context, id Attach var model AttachedDatabaseConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster.go index 50e87786b1d..881cef6fc3f 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/method_listbycluster.go @@ -47,7 +47,6 @@ func (c AttachedDatabaseConfigurationsClient) ListByCluster(ctx context.Context, var model AttachedDatabaseConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/version.go b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/version.go index 3124f6f46d5..52c9c0220db 100644 --- a/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/version.go +++ b/resource-manager/kusto/2023-08-15/attacheddatabaseconfigurations/version.go @@ -1,12 +1,10 @@ package attacheddatabaseconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatabaseconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatabaseconfigurations/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md index 7f4a0a73dec..deb881226b5 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusterprincipalassignments` Documentation -The `clusterprincipalassignments` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `clusterprincipalassignments` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/client.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/client.go index 2412ce6b030..20b3be15cf5 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/client.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/client.go @@ -15,7 +15,7 @@ type ClusterPrincipalAssignmentsClient struct { } func NewClusterPrincipalAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterPrincipalAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterprincipalassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterprincipalassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterPrincipalAssignmentsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go index ada20554ce5..ee0d8ae1c8c 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/id_principalassignment.go @@ -44,7 +44,7 @@ func ParsePrincipalAssignmentID(input string) (*PrincipalAssignmentId, error) { } id := PrincipalAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrincipalAssignmentIDInsensitively(input string) (*PrincipalAssignment } id := PrincipalAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability.go index 98b265d2418..88cd7a85a86 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Con var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_get.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_get.go index 075905a3d39..ca4ab3ccde1 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_get.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_get.go @@ -45,7 +45,6 @@ func (c ClusterPrincipalAssignmentsClient) Get(ctx context.Context, id Principal var model ClusterPrincipalAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list.go index 07434c206b3..e30ad607a75 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/method_list.go @@ -47,7 +47,6 @@ func (c ClusterPrincipalAssignmentsClient) List(ctx context.Context, id commonid var model ClusterPrincipalAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/version.go b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/version.go index f8fe15d4253..479a893b3dc 100644 --- a/resource-manager/kusto/2023-08-15/clusterprincipalassignments/version.go +++ b/resource-manager/kusto/2023-08-15/clusterprincipalassignments/version.go @@ -1,12 +1,10 @@ package clusterprincipalassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterprincipalassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterprincipalassignments/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/clusters/README.md b/resource-manager/kusto/2023-08-15/clusters/README.md index 2151c074450..15958f370ea 100644 --- a/resource-manager/kusto/2023-08-15/clusters/README.md +++ b/resource-manager/kusto/2023-08-15/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `clusters` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/clusters/client.go b/resource-manager/kusto/2023-08-15/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/kusto/2023-08-15/clusters/client.go +++ b/resource-manager/kusto/2023-08-15/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/clusters/id_location.go b/resource-manager/kusto/2023-08-15/clusters/id_location.go index 63a72ed5861..3f693de87f4 100644 --- a/resource-manager/kusto/2023-08-15/clusters/id_location.go +++ b/resource-manager/kusto/2023-08-15/clusters/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/clusters/method_checknameavailability.go index 6a7e5109da3..45fd64789ac 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c ClustersClient) CheckNameAvailability(ctx context.Context, id LocationId var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_createorupdate.go b/resource-manager/kusto/2023-08-15/clusters/method_createorupdate.go index 81d4b801d44..06b54dfc102 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_createorupdate.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_createorupdate.go @@ -44,6 +44,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_get.go b/resource-manager/kusto/2023-08-15/clusters/method_get.go index 7474df842fb..40382e83f4b 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_get.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_get.go @@ -46,7 +46,6 @@ func (c ClustersClient) Get(ctx context.Context, id commonids.KustoClusterId) (r var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_list.go b/resource-manager/kusto/2023-08-15/clusters/method_list.go index 3ad8fcf83ea..82c843af942 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_list.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_list.go @@ -47,7 +47,6 @@ func (c ClustersClient) List(ctx context.Context, id commonids.SubscriptionId) ( var model ClusterListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_listbyresourcegroup.go b/resource-manager/kusto/2023-08-15/clusters/method_listbyresourcegroup.go index 7c61f9fc5a8..776c57c3480 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_listbyresourcegroup.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.Re var model ClusterListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases.go b/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases.go index 1de47e1b987..15f64c75c2a 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_listfollowerdatabases.go @@ -47,7 +47,6 @@ func (c ClustersClient) ListFollowerDatabases(ctx context.Context, id commonids. var model FollowerDatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions.go b/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions.go index 026c0895942..c5af35d2b3e 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_listlanguageextensions.go @@ -47,7 +47,6 @@ func (c ClustersClient) ListLanguageExtensions(ctx context.Context, id commonids var model LanguageExtensionsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource.go b/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource.go index cc27125c646..19a17796d87 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_listskusbyresource.go @@ -47,7 +47,6 @@ func (c ClustersClient) ListSkusByResource(ctx context.Context, id commonids.Kus var model ListResourceSkusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/clusters/method_update.go b/resource-manager/kusto/2023-08-15/clusters/method_update.go index 877c3019474..984e1dcb321 100644 --- a/resource-manager/kusto/2023-08-15/clusters/method_update.go +++ b/resource-manager/kusto/2023-08-15/clusters/method_update.go @@ -40,6 +40,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kusto/2023-08-15/clusters/version.go b/resource-manager/kusto/2023-08-15/clusters/version.go index 12231bfcffa..65253b672e7 100644 --- a/resource-manager/kusto/2023-08-15/clusters/version.go +++ b/resource-manager/kusto/2023-08-15/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md index 1faaa5fa596..c3caec072e2 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databaseprincipalassignments` Documentation -The `databaseprincipalassignments` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `databaseprincipalassignments` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/client.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/client.go index fe184bcd76a..937513d7036 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/client.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/client.go @@ -15,7 +15,7 @@ type DatabasePrincipalAssignmentsClient struct { } func NewDatabasePrincipalAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasePrincipalAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseprincipalassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseprincipalassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasePrincipalAssignmentsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go index da710343821..755d13cc8d3 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/id_databaseprincipalassignment.go @@ -46,7 +46,7 @@ func ParseDatabasePrincipalAssignmentID(input string) (*DatabasePrincipalAssignm } id := DatabasePrincipalAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabasePrincipalAssignmentIDInsensitively(input string) (*DatabasePri } id := DatabasePrincipalAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability.go index b4b18b03b14..b7451eac2c5 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Co var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_get.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_get.go index f6511e178a4..346ec4607b5 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_get.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_get.go @@ -45,7 +45,6 @@ func (c DatabasePrincipalAssignmentsClient) Get(ctx context.Context, id Database var model DatabasePrincipalAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list.go index b0de9c50cb6..d9aea904550 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/method_list.go @@ -47,7 +47,6 @@ func (c DatabasePrincipalAssignmentsClient) List(ctx context.Context, id commoni var model DatabasePrincipalAssignmentListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/version.go b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/version.go index 5b7889470fc..4b30d27017d 100644 --- a/resource-manager/kusto/2023-08-15/databaseprincipalassignments/version.go +++ b/resource-manager/kusto/2023-08-15/databaseprincipalassignments/version.go @@ -1,12 +1,10 @@ package databaseprincipalassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseprincipalassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseprincipalassignments/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/databases/README.md b/resource-manager/kusto/2023-08-15/databases/README.md index fd68f465342..198e757e3df 100644 --- a/resource-manager/kusto/2023-08-15/databases/README.md +++ b/resource-manager/kusto/2023-08-15/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `databases` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/databases/client.go b/resource-manager/kusto/2023-08-15/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/kusto/2023-08-15/databases/client.go +++ b/resource-manager/kusto/2023-08-15/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/databases/method_addprincipals.go b/resource-manager/kusto/2023-08-15/databases/method_addprincipals.go index 4f65e033eff..f9a6893b0c3 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_addprincipals.go +++ b/resource-manager/kusto/2023-08-15/databases/method_addprincipals.go @@ -51,7 +51,6 @@ func (c DatabasesClient) AddPrincipals(ctx context.Context, id commonids.KustoDa var model DatabasePrincipalListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/databases/method_checknameavailability.go index 75cbd4a2890..dd68c75ed53 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/databases/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c DatabasesClient) CheckNameAvailability(ctx context.Context, id commonids var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_createorupdate.go b/resource-manager/kusto/2023-08-15/databases/method_createorupdate.go index 754f7644360..1a667eb0fc4 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_createorupdate.go +++ b/resource-manager/kusto/2023-08-15/databases/method_createorupdate.go @@ -19,7 +19,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Database + Model Database } type CreateOrUpdateOperationOptions struct { @@ -38,6 +38,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower.go b/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower.go index 2759d1d2319..cc72a544f30 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower.go +++ b/resource-manager/kusto/2023-08-15/databases/method_databaseinvitefollower.go @@ -51,7 +51,6 @@ func (c DatabasesClient) DatabaseInviteFollower(ctx context.Context, id commonid var model DatabaseInviteFollowerResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_get.go b/resource-manager/kusto/2023-08-15/databases/method_get.go index f2bd5b8a02d..528a39c5f19 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_get.go +++ b/resource-manager/kusto/2023-08-15/databases/method_get.go @@ -16,7 +16,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Database + Model Database } // Get ... @@ -49,11 +49,11 @@ func (c DatabasesClient) Get(ctx context.Context, id commonids.KustoDatabaseId) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDatabaseImplementation(respObj) + model, err := UnmarshalDatabaseImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go b/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go index 67c4de7c892..2db8e7a3f3e 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go +++ b/resource-manager/kusto/2023-08-15/databases/method_listbycluster.go @@ -41,6 +41,7 @@ func (o ListByClusterOperationOptions) ToHeaders() *client.Headers { func (o ListByClusterOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -102,7 +103,7 @@ func (c DatabasesClient) ListByCluster(ctx context.Context, id commonids.KustoCl temp := make([]Database, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDatabaseImplementation(v) + val, err := UnmarshalDatabaseImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Database (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/kusto/2023-08-15/databases/method_listprincipals.go b/resource-manager/kusto/2023-08-15/databases/method_listprincipals.go index 974b5a4e454..26417872959 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_listprincipals.go +++ b/resource-manager/kusto/2023-08-15/databases/method_listprincipals.go @@ -47,7 +47,6 @@ func (c DatabasesClient) ListPrincipals(ctx context.Context, id commonids.KustoD var model DatabasePrincipalListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_removeprincipals.go b/resource-manager/kusto/2023-08-15/databases/method_removeprincipals.go index 4ba8e4fbef6..24ee4c78839 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_removeprincipals.go +++ b/resource-manager/kusto/2023-08-15/databases/method_removeprincipals.go @@ -51,7 +51,6 @@ func (c DatabasesClient) RemovePrincipals(ctx context.Context, id commonids.Kust var model DatabasePrincipalListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/databases/method_update.go b/resource-manager/kusto/2023-08-15/databases/method_update.go index 2ca85eda021..e0685518bd6 100644 --- a/resource-manager/kusto/2023-08-15/databases/method_update.go +++ b/resource-manager/kusto/2023-08-15/databases/method_update.go @@ -19,7 +19,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *Database + Model Database } type UpdateOperationOptions struct { @@ -38,6 +38,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/kusto/2023-08-15/databases/model_database.go b/resource-manager/kusto/2023-08-15/databases/model_database.go index 2f3c58a1325..5222ac6dc61 100644 --- a/resource-manager/kusto/2023-08-15/databases/model_database.go +++ b/resource-manager/kusto/2023-08-15/databases/model_database.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Database interface { + Database() BaseDatabaseImpl } -// RawDatabaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Database = BaseDatabaseImpl{} + +type BaseDatabaseImpl struct { + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDatabaseImpl) Database() BaseDatabaseImpl { + return s +} + +var _ Database = RawDatabaseImpl{} + +// RawDatabaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatabaseImpl struct { - Type string - Values map[string]interface{} + database BaseDatabaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDatabaseImpl) Database() BaseDatabaseImpl { + return s.database } -func unmarshalDatabaseImplementation(input []byte) (Database, error) { +func UnmarshalDatabaseImplementation(input []byte) (Database, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalDatabaseImplementation(input []byte) (Database, error) { return out, nil } - out := RawDatabaseImpl{ - Type: value, - Values: temp, + var parent BaseDatabaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatabaseImpl: %+v", err) } - return out, nil + + return RawDatabaseImpl{ + database: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/kusto/2023-08-15/databases/model_readonlyfollowingdatabase.go b/resource-manager/kusto/2023-08-15/databases/model_readonlyfollowingdatabase.go index c31d685b6a2..69a2a96411d 100644 --- a/resource-manager/kusto/2023-08-15/databases/model_readonlyfollowingdatabase.go +++ b/resource-manager/kusto/2023-08-15/databases/model_readonlyfollowingdatabase.go @@ -14,12 +14,24 @@ type ReadOnlyFollowingDatabase struct { Properties *ReadOnlyFollowingDatabaseProperties `json:"properties,omitempty"` // Fields inherited from Database + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } +func (s ReadOnlyFollowingDatabase) Database() BaseDatabaseImpl { + return BaseDatabaseImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } +} + var _ json.Marshaler = ReadOnlyFollowingDatabase{} func (s ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReadOnlyFollowingDatabase: %+v", err) } + decoded["kind"] = "ReadOnlyFollowing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/databases/model_readwritedatabase.go b/resource-manager/kusto/2023-08-15/databases/model_readwritedatabase.go index 24aa831e2ef..441baecd65d 100644 --- a/resource-manager/kusto/2023-08-15/databases/model_readwritedatabase.go +++ b/resource-manager/kusto/2023-08-15/databases/model_readwritedatabase.go @@ -14,12 +14,24 @@ type ReadWriteDatabase struct { Properties *ReadWriteDatabaseProperties `json:"properties,omitempty"` // Fields inherited from Database + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } +func (s ReadWriteDatabase) Database() BaseDatabaseImpl { + return BaseDatabaseImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } +} + var _ json.Marshaler = ReadWriteDatabase{} func (s ReadWriteDatabase) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ReadWriteDatabase) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReadWriteDatabase: %+v", err) } + decoded["kind"] = "ReadWrite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/databases/version.go b/resource-manager/kusto/2023-08-15/databases/version.go index ba0dd7693e4..aeeb0e92179 100644 --- a/resource-manager/kusto/2023-08-15/databases/version.go +++ b/resource-manager/kusto/2023-08-15/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/README.md b/resource-manager/kusto/2023-08-15/dataconnections/README.md index 57e4d989713..d09bfbc7821 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/README.md +++ b/resource-manager/kusto/2023-08-15/dataconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/dataconnections` Documentation -The `dataconnections` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `dataconnections` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/dataconnections/client.go b/resource-manager/kusto/2023-08-15/dataconnections/client.go index c7bee31c046..8b88ce58c7e 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/client.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/client.go @@ -15,7 +15,7 @@ type DataConnectionsClient struct { } func NewDataConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectionsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go index 4b86fb76201..bb7be7aad3e 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/id_dataconnection.go @@ -46,7 +46,7 @@ func ParseDataConnectionID(input string) (*DataConnectionId, error) { } id := DataConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataConnectionIDInsensitively(input string) (*DataConnectionId, error) } id := DataConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability.go index 59ceeb3afda..b82af8b2538 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c DataConnectionsClient) CheckNameAvailability(ctx context.Context, id com var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/method_createorupdate.go b/resource-manager/kusto/2023-08-15/dataconnections/method_createorupdate.go index 81980a85cf3..ea405aa6c14 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/method_createorupdate.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *DataConnection + Model DataConnection } // CreateOrUpdate ... diff --git a/resource-manager/kusto/2023-08-15/dataconnections/method_get.go b/resource-manager/kusto/2023-08-15/dataconnections/method_get.go index 6567a103e58..a1e4482154d 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/method_get.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnection + Model DataConnection } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectionsClient) Get(ctx context.Context, id DataConnectionId) (re if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectionImplementation(respObj) + model, err := UnmarshalDataConnectionImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase.go b/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase.go index 43a44617ae1..3ef4cd6af4e 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/method_listbydatabase.go @@ -47,7 +47,6 @@ func (c DataConnectionsClient) ListByDatabase(ctx context.Context, id commonids. var model DataConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/method_update.go b/resource-manager/kusto/2023-08-15/dataconnections/method_update.go index 365e5a5c016..f45185a1307 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/method_update.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/method_update.go @@ -18,7 +18,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *DataConnection + Model DataConnection } // Update ... diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_cosmosdbdataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/model_cosmosdbdataconnection.go index 3c2eb489c01..06f15af3ac1 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_cosmosdbdataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_cosmosdbdataconnection.go @@ -14,10 +14,22 @@ type CosmosDbDataConnection struct { Properties *CosmosDbDataConnectionProperties `json:"properties,omitempty"` // Fields inherited from DataConnection - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataConnectionKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s CosmosDbDataConnection) DataConnection() BaseDataConnectionImpl { + return BaseDataConnectionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = CosmosDbDataConnection{} @@ -31,9 +43,10 @@ func (s CosmosDbDataConnection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CosmosDbDataConnection: %+v", err) } + decoded["kind"] = "CosmosDb" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnection.go index d8a779e662f..f1043457f6b 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnection.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnection interface { + DataConnection() BaseDataConnectionImpl } -// RawDataConnectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnection = BaseDataConnectionImpl{} + +type BaseDataConnectionImpl struct { + Id *string `json:"id,omitempty"` + Kind DataConnectionKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectionImpl) DataConnection() BaseDataConnectionImpl { + return s +} + +var _ DataConnection = RawDataConnectionImpl{} + +// RawDataConnectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectionImpl struct { - Type string - Values map[string]interface{} + dataConnection BaseDataConnectionImpl + Type string + Values map[string]interface{} +} + +func (s RawDataConnectionImpl) DataConnection() BaseDataConnectionImpl { + return s.dataConnection } -func unmarshalDataConnectionImplementation(input []byte) (DataConnection, error) { +func UnmarshalDataConnectionImplementation(input []byte) (DataConnection, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalDataConnectionImplementation(input []byte) (DataConnection, error) return out, nil } - out := RawDataConnectionImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectionImpl: %+v", err) } - return out, nil + + return RawDataConnectionImpl{ + dataConnection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionlistresult.go b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionlistresult.go index 2997428d1ce..412ae473e28 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionlistresult.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionlistresult.go @@ -29,7 +29,7 @@ func (s *DataConnectionListResult) UnmarshalJSON(bytes []byte) error { output := make([]DataConnection, 0) for i, val := range listTemp { - impl, err := unmarshalDataConnectionImplementation(val) + impl, err := UnmarshalDataConnectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'DataConnectionListResult': %+v", i, err) } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionvalidation.go b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionvalidation.go index b9c4dba68f1..190c88742b8 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionvalidation.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_dataconnectionvalidation.go @@ -30,7 +30,7 @@ func (s *DataConnectionValidation) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataConnectionImplementation(v) + impl, err := UnmarshalDataConnectionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataConnectionValidation': %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_eventgriddataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/model_eventgriddataconnection.go index 5e5399dfe1b..5fd8b60bc3e 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_eventgriddataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_eventgriddataconnection.go @@ -14,10 +14,22 @@ type EventGridDataConnection struct { Properties *EventGridConnectionProperties `json:"properties,omitempty"` // Fields inherited from DataConnection - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataConnectionKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s EventGridDataConnection) DataConnection() BaseDataConnectionImpl { + return BaseDataConnectionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = EventGridDataConnection{} @@ -31,9 +43,10 @@ func (s EventGridDataConnection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventGridDataConnection: %+v", err) } + decoded["kind"] = "EventGrid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_eventhubdataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/model_eventhubdataconnection.go index c92e8ef4900..cc311f452e2 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_eventhubdataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_eventhubdataconnection.go @@ -14,10 +14,22 @@ type EventHubDataConnection struct { Properties *EventHubConnectionProperties `json:"properties,omitempty"` // Fields inherited from DataConnection - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataConnectionKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s EventHubDataConnection) DataConnection() BaseDataConnectionImpl { + return BaseDataConnectionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = EventHubDataConnection{} @@ -31,9 +43,10 @@ func (s EventHubDataConnection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubDataConnection: %+v", err) } + decoded["kind"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/dataconnections/model_iothubdataconnection.go b/resource-manager/kusto/2023-08-15/dataconnections/model_iothubdataconnection.go index 9935922b66c..ed2d9ec9054 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/model_iothubdataconnection.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/model_iothubdataconnection.go @@ -14,10 +14,22 @@ type IotHubDataConnection struct { Properties *IotHubConnectionProperties `json:"properties,omitempty"` // Fields inherited from DataConnection - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind DataConnectionKind `json:"kind"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s IotHubDataConnection) DataConnection() BaseDataConnectionImpl { + return BaseDataConnectionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = IotHubDataConnection{} @@ -31,9 +43,10 @@ func (s IotHubDataConnection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IotHubDataConnection: %+v", err) } + decoded["kind"] = "IotHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/kusto/2023-08-15/dataconnections/version.go b/resource-manager/kusto/2023-08-15/dataconnections/version.go index 6682401c66f..9d0d045ba6b 100644 --- a/resource-manager/kusto/2023-08-15/dataconnections/version.go +++ b/resource-manager/kusto/2023-08-15/dataconnections/version.go @@ -1,12 +1,10 @@ package dataconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnections/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/kusto/README.md b/resource-manager/kusto/2023-08-15/kusto/README.md index 922ae884716..7ae5c332d26 100644 --- a/resource-manager/kusto/2023-08-15/kusto/README.md +++ b/resource-manager/kusto/2023-08-15/kusto/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/kusto` Documentation -The `kusto` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `kusto` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/kusto/client.go b/resource-manager/kusto/2023-08-15/kusto/client.go index 6916914aefb..34e3605a09d 100644 --- a/resource-manager/kusto/2023-08-15/kusto/client.go +++ b/resource-manager/kusto/2023-08-15/kusto/client.go @@ -15,7 +15,7 @@ type KustoClient struct { } func NewKustoClientWithBaseURI(sdkApi sdkEnv.Api) (*KustoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "kusto", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "kusto", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KustoClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/kusto/id_location.go b/resource-manager/kusto/2023-08-15/kusto/id_location.go index 2049db215f7..aaa5f8ab1a8 100644 --- a/resource-manager/kusto/2023-08-15/kusto/id_location.go +++ b/resource-manager/kusto/2023-08-15/kusto/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/kusto/method_clusterslistskus.go b/resource-manager/kusto/2023-08-15/kusto/method_clusterslistskus.go index 008b27dd4eb..90806872300 100644 --- a/resource-manager/kusto/2023-08-15/kusto/method_clusterslistskus.go +++ b/resource-manager/kusto/2023-08-15/kusto/method_clusterslistskus.go @@ -47,7 +47,6 @@ func (c KustoClient) ClustersListSkus(ctx context.Context, id commonids.Subscrip var model SkuDescriptionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/kusto/method_skuslist.go b/resource-manager/kusto/2023-08-15/kusto/method_skuslist.go index 1bcd29e4ee2..2025a2400d3 100644 --- a/resource-manager/kusto/2023-08-15/kusto/method_skuslist.go +++ b/resource-manager/kusto/2023-08-15/kusto/method_skuslist.go @@ -46,7 +46,6 @@ func (c KustoClient) SkusList(ctx context.Context, id LocationId) (result SkusLi var model SkuDescriptionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/kusto/version.go b/resource-manager/kusto/2023-08-15/kusto/version.go index 83409b6e0d0..2bf89f7b61f 100644 --- a/resource-manager/kusto/2023-08-15/kusto/version.go +++ b/resource-manager/kusto/2023-08-15/kusto/version.go @@ -1,12 +1,10 @@ package kusto -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/kusto/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/kusto/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md b/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md index 17ac7f30890..af9e4e44c6e 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/managedprivateendpoints` Documentation -The `managedprivateendpoints` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `managedprivateendpoints` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/client.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/client.go index c0a043e0525..e02237558e4 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/client.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/client.go @@ -15,7 +15,7 @@ type ManagedPrivateEndpointsClient struct { } func NewManagedPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedPrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedprivateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedprivateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedPrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go index d0db8652cd2..83acff7ccd0 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/id_managedprivateendpoint.go @@ -44,7 +44,7 @@ func ParseManagedPrivateEndpointID(input string) (*ManagedPrivateEndpointId, err } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedPrivateEndpointIDInsensitively(input string) (*ManagedPrivateEn } id := ManagedPrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability.go index 2fccac0a334..06e1c7c5a28 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ManagedPrivateEndpointsClient) CheckNameAvailability(ctx context.Context var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_get.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_get.go index 80b1911108d..d34ac2dec7b 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_get.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_get.go @@ -45,7 +45,6 @@ func (c ManagedPrivateEndpointsClient) Get(ctx context.Context, id ManagedPrivat var model ManagedPrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list.go index c93d5ac7e04..acccfe08ca8 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/method_list.go @@ -47,7 +47,6 @@ func (c ManagedPrivateEndpointsClient) List(ctx context.Context, id commonids.Ku var model ManagedPrivateEndpointListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/managedprivateendpoints/version.go b/resource-manager/kusto/2023-08-15/managedprivateendpoints/version.go index e1a9c02b790..b08a491c935 100644 --- a/resource-manager/kusto/2023-08-15/managedprivateendpoints/version.go +++ b/resource-manager/kusto/2023-08-15/managedprivateendpoints/version.go @@ -1,12 +1,10 @@ package managedprivateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedprivateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedprivateendpoints/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/README.md b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/README.md index a55f23a9be5..d8189a257ac 100644 --- a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/client.go b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/version.go b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/version.go index 05d7db9f7ae..e8d0f0e781b 100644 --- a/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/kusto/2023-08-15/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/README.md b/resource-manager/kusto/2023-08-15/privateendpointconnections/README.md index b3dcc9ee939..b8de1382464 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/README.md +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/client.go b/resource-manager/kusto/2023-08-15/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/client.go +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/kusto/2023-08-15/privateendpointconnections/id_privateendpointconnection.go index 58a45a06a8d..078753a69f6 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/method_get.go b/resource-manager/kusto/2023-08-15/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/method_get.go +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/method_list.go b/resource-manager/kusto/2023-08-15/privateendpointconnections/method_list.go index 21c2c970fe9..00024c09837 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/method_list.go +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/privateendpointconnections/version.go b/resource-manager/kusto/2023-08-15/privateendpointconnections/version.go index a8ccb36b60f..303e09953e6 100644 --- a/resource-manager/kusto/2023-08-15/privateendpointconnections/version.go +++ b/resource-manager/kusto/2023-08-15/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/README.md b/resource-manager/kusto/2023-08-15/privatelinkresources/README.md index d21c729874f..9d2fbac6776 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/README.md +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/client.go b/resource-manager/kusto/2023-08-15/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/client.go +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/id_privatelinkresource.go b/resource-manager/kusto/2023-08-15/privatelinkresources/id_privatelinkresource.go index ddfcfb4bd4f..58407109c6f 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/method_get.go b/resource-manager/kusto/2023-08-15/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/method_get.go +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/method_list.go b/resource-manager/kusto/2023-08-15/privatelinkresources/method_list.go index bce5805c9fa..33aa33fe499 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/method_list.go +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) List(ctx context.Context, id commonids.Kusto var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/privatelinkresources/version.go b/resource-manager/kusto/2023-08-15/privatelinkresources/version.go index d7a70791940..f5f2467913b 100644 --- a/resource-manager/kusto/2023-08-15/privatelinkresources/version.go +++ b/resource-manager/kusto/2023-08-15/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/README.md b/resource-manager/kusto/2023-08-15/sandboxcustomimages/README.md index 92fa33ca081..50f099071e3 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/README.md +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/sandboxcustomimages` Documentation -The `sandboxcustomimages` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `sandboxcustomimages` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/client.go b/resource-manager/kusto/2023-08-15/sandboxcustomimages/client.go index c74889fa48e..64f5709a2f2 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/client.go +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/client.go @@ -15,7 +15,7 @@ type SandboxCustomImagesClient struct { } func NewSandboxCustomImagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SandboxCustomImagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sandboxcustomimages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sandboxcustomimages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SandboxCustomImagesClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/id_sandboxcustomimage.go b/resource-manager/kusto/2023-08-15/sandboxcustomimages/id_sandboxcustomimage.go index 257728ebdd0..bb563155643 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/id_sandboxcustomimage.go +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/id_sandboxcustomimage.go @@ -44,7 +44,7 @@ func ParseSandboxCustomImageID(input string) (*SandboxCustomImageId, error) { } id := SandboxCustomImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSandboxCustomImageIDInsensitively(input string) (*SandboxCustomImageId } id := SandboxCustomImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_checknameavailability.go index cb92bd909be..da82c657982 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c SandboxCustomImagesClient) CheckNameAvailability(ctx context.Context, id var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_get.go b/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_get.go index bbf63a846f9..50744967980 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_get.go +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/method_get.go @@ -45,7 +45,6 @@ func (c SandboxCustomImagesClient) Get(ctx context.Context, id SandboxCustomImag var model SandboxCustomImage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/sandboxcustomimages/version.go b/resource-manager/kusto/2023-08-15/sandboxcustomimages/version.go index 7d1b986155d..fb3daef10ab 100644 --- a/resource-manager/kusto/2023-08-15/sandboxcustomimages/version.go +++ b/resource-manager/kusto/2023-08-15/sandboxcustomimages/version.go @@ -1,12 +1,10 @@ package sandboxcustomimages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sandboxcustomimages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sandboxcustomimages/2023-08-15" } diff --git a/resource-manager/kusto/2023-08-15/scripts/README.md b/resource-manager/kusto/2023-08-15/scripts/README.md index be0f6e7e2c5..3d21b4631d0 100644 --- a/resource-manager/kusto/2023-08-15/scripts/README.md +++ b/resource-manager/kusto/2023-08-15/scripts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2023-08-15/scripts` Documentation -The `scripts` SDK allows for interaction with the Azure Resource Manager Service `kusto` (API Version `2023-08-15`). +The `scripts` SDK allows for interaction with Azure Resource Manager `kusto` (API Version `2023-08-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/kusto/2023-08-15/scripts/client.go b/resource-manager/kusto/2023-08-15/scripts/client.go index a4b2e43918a..6ef58a49ba4 100644 --- a/resource-manager/kusto/2023-08-15/scripts/client.go +++ b/resource-manager/kusto/2023-08-15/scripts/client.go @@ -15,7 +15,7 @@ type ScriptsClient struct { } func NewScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scripts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scripts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptsClient: %+v", err) } diff --git a/resource-manager/kusto/2023-08-15/scripts/id_script.go b/resource-manager/kusto/2023-08-15/scripts/id_script.go index 6eb5d47f2aa..926d9aa420f 100644 --- a/resource-manager/kusto/2023-08-15/scripts/id_script.go +++ b/resource-manager/kusto/2023-08-15/scripts/id_script.go @@ -46,7 +46,7 @@ func ParseScriptID(input string) (*ScriptId, error) { } id := ScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScriptIDInsensitively(input string) (*ScriptId, error) { } id := ScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability.go b/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability.go index 79699e0600a..ed7cf0229b2 100644 --- a/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability.go +++ b/resource-manager/kusto/2023-08-15/scripts/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ScriptsClient) CheckNameAvailability(ctx context.Context, id commonids.K var model CheckNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/scripts/method_get.go b/resource-manager/kusto/2023-08-15/scripts/method_get.go index 612ca57df4d..46a9dfe90a7 100644 --- a/resource-manager/kusto/2023-08-15/scripts/method_get.go +++ b/resource-manager/kusto/2023-08-15/scripts/method_get.go @@ -45,7 +45,6 @@ func (c ScriptsClient) Get(ctx context.Context, id ScriptId) (result GetOperatio var model Script result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase.go b/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase.go index dd9527b8213..e3dfb29fefc 100644 --- a/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase.go +++ b/resource-manager/kusto/2023-08-15/scripts/method_listbydatabase.go @@ -47,7 +47,6 @@ func (c ScriptsClient) ListByDatabase(ctx context.Context, id commonids.KustoDat var model ScriptListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/kusto/2023-08-15/scripts/version.go b/resource-manager/kusto/2023-08-15/scripts/version.go index d0eecb83289..4af14512651 100644 --- a/resource-manager/kusto/2023-08-15/scripts/version.go +++ b/resource-manager/kusto/2023-08-15/scripts/version.go @@ -1,12 +1,10 @@ package scripts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scripts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scripts/2023-08-15" } diff --git a/resource-manager/labservices/2022-08-01/image/README.md b/resource-manager/labservices/2022-08-01/image/README.md index 45fc3058e50..fda08c08f94 100644 --- a/resource-manager/labservices/2022-08-01/image/README.md +++ b/resource-manager/labservices/2022-08-01/image/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/image` Documentation -The `image` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `image` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/image/client.go b/resource-manager/labservices/2022-08-01/image/client.go index 7b3305e5bb3..b853897bfc1 100644 --- a/resource-manager/labservices/2022-08-01/image/client.go +++ b/resource-manager/labservices/2022-08-01/image/client.go @@ -15,7 +15,7 @@ type ImageClient struct { } func NewImageClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "image", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "image", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImageClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/image/id_image.go b/resource-manager/labservices/2022-08-01/image/id_image.go index bbef75cc687..630958519c4 100644 --- a/resource-manager/labservices/2022-08-01/image/id_image.go +++ b/resource-manager/labservices/2022-08-01/image/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/image/id_labplan.go b/resource-manager/labservices/2022-08-01/image/id_labplan.go index 84f52488353..cb810237809 100644 --- a/resource-manager/labservices/2022-08-01/image/id_labplan.go +++ b/resource-manager/labservices/2022-08-01/image/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/image/method_createorupdate.go b/resource-manager/labservices/2022-08-01/image/method_createorupdate.go index ae107d33bf0..a3a62426e9f 100644 --- a/resource-manager/labservices/2022-08-01/image/method_createorupdate.go +++ b/resource-manager/labservices/2022-08-01/image/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ImageClient) CreateOrUpdate(ctx context.Context, id ImageId, input Image var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/image/method_get.go b/resource-manager/labservices/2022-08-01/image/method_get.go index 5eeea163f5b..ca22f5e1eea 100644 --- a/resource-manager/labservices/2022-08-01/image/method_get.go +++ b/resource-manager/labservices/2022-08-01/image/method_get.go @@ -45,7 +45,6 @@ func (c ImageClient) Get(ctx context.Context, id ImageId) (result GetOperationRe var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/image/method_update.go b/resource-manager/labservices/2022-08-01/image/method_update.go index 5dcdad72c91..61ccd8fad6f 100644 --- a/resource-manager/labservices/2022-08-01/image/method_update.go +++ b/resource-manager/labservices/2022-08-01/image/method_update.go @@ -49,7 +49,6 @@ func (c ImageClient) Update(ctx context.Context, id ImageId, input ImageUpdate) var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/image/version.go b/resource-manager/labservices/2022-08-01/image/version.go index 3204fe79101..cf62237f8f2 100644 --- a/resource-manager/labservices/2022-08-01/image/version.go +++ b/resource-manager/labservices/2022-08-01/image/version.go @@ -1,12 +1,10 @@ package image -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/image/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/image/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/lab/README.md b/resource-manager/labservices/2022-08-01/lab/README.md index ba17399d5ec..57fce0896f1 100644 --- a/resource-manager/labservices/2022-08-01/lab/README.md +++ b/resource-manager/labservices/2022-08-01/lab/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/lab` Documentation -The `lab` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `lab` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/lab/client.go b/resource-manager/labservices/2022-08-01/lab/client.go index 0240d2f3918..7ce08719fa8 100644 --- a/resource-manager/labservices/2022-08-01/lab/client.go +++ b/resource-manager/labservices/2022-08-01/lab/client.go @@ -15,7 +15,7 @@ type LabClient struct { } func NewLabClientWithBaseURI(sdkApi sdkEnv.Api) (*LabClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lab", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lab", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LabClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/lab/id_lab.go b/resource-manager/labservices/2022-08-01/lab/id_lab.go index eb77d34b54d..42e2f8f0df3 100644 --- a/resource-manager/labservices/2022-08-01/lab/id_lab.go +++ b/resource-manager/labservices/2022-08-01/lab/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/lab/method_get.go b/resource-manager/labservices/2022-08-01/lab/method_get.go index 744e5ffbaf7..e4796ee1201 100644 --- a/resource-manager/labservices/2022-08-01/lab/method_get.go +++ b/resource-manager/labservices/2022-08-01/lab/method_get.go @@ -45,7 +45,6 @@ func (c LabClient) Get(ctx context.Context, id LabId) (result GetOperationRespon var model Lab result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/lab/version.go b/resource-manager/labservices/2022-08-01/lab/version.go index 7b9e0fb1e82..4381b599c6d 100644 --- a/resource-manager/labservices/2022-08-01/lab/version.go +++ b/resource-manager/labservices/2022-08-01/lab/version.go @@ -1,12 +1,10 @@ package lab -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lab/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lab/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/labplan/README.md b/resource-manager/labservices/2022-08-01/labplan/README.md index 1012bf36f32..2911d981bb2 100644 --- a/resource-manager/labservices/2022-08-01/labplan/README.md +++ b/resource-manager/labservices/2022-08-01/labplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/labplan` Documentation -The `labplan` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `labplan` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/labplan/client.go b/resource-manager/labservices/2022-08-01/labplan/client.go index c00d6ef4fdd..734eb67219c 100644 --- a/resource-manager/labservices/2022-08-01/labplan/client.go +++ b/resource-manager/labservices/2022-08-01/labplan/client.go @@ -15,7 +15,7 @@ type LabPlanClient struct { } func NewLabPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*LabPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "labplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "labplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LabPlanClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/labplan/id_labplan.go b/resource-manager/labservices/2022-08-01/labplan/id_labplan.go index f0ad633137e..b5a15e5c5bf 100644 --- a/resource-manager/labservices/2022-08-01/labplan/id_labplan.go +++ b/resource-manager/labservices/2022-08-01/labplan/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/labplan/method_get.go b/resource-manager/labservices/2022-08-01/labplan/method_get.go index 19314604754..ad7661caaba 100644 --- a/resource-manager/labservices/2022-08-01/labplan/method_get.go +++ b/resource-manager/labservices/2022-08-01/labplan/method_get.go @@ -45,7 +45,6 @@ func (c LabPlanClient) Get(ctx context.Context, id LabPlanId) (result GetOperati var model LabPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/labplan/version.go b/resource-manager/labservices/2022-08-01/labplan/version.go index 895f38a474e..5e2983d38c3 100644 --- a/resource-manager/labservices/2022-08-01/labplan/version.go +++ b/resource-manager/labservices/2022-08-01/labplan/version.go @@ -1,12 +1,10 @@ package labplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/labplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/labplan/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/schedule/README.md b/resource-manager/labservices/2022-08-01/schedule/README.md index 743d95e6411..02ddcf33bd5 100644 --- a/resource-manager/labservices/2022-08-01/schedule/README.md +++ b/resource-manager/labservices/2022-08-01/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `schedule` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/schedule/client.go b/resource-manager/labservices/2022-08-01/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/labservices/2022-08-01/schedule/client.go +++ b/resource-manager/labservices/2022-08-01/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/schedule/id_lab.go b/resource-manager/labservices/2022-08-01/schedule/id_lab.go index a8736ed3364..7b96e9e5f1f 100644 --- a/resource-manager/labservices/2022-08-01/schedule/id_lab.go +++ b/resource-manager/labservices/2022-08-01/schedule/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/schedule/id_schedule.go b/resource-manager/labservices/2022-08-01/schedule/id_schedule.go index fce50774e00..b0fae01d4df 100644 --- a/resource-manager/labservices/2022-08-01/schedule/id_schedule.go +++ b/resource-manager/labservices/2022-08-01/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go b/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go index 06f15c27d8e..2a03b05a4f0 100644 --- a/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go +++ b/resource-manager/labservices/2022-08-01/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/schedule/method_get.go b/resource-manager/labservices/2022-08-01/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/labservices/2022-08-01/schedule/method_get.go +++ b/resource-manager/labservices/2022-08-01/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/schedule/method_update.go b/resource-manager/labservices/2022-08-01/schedule/method_update.go index 66c00e47ea5..99b87458b8a 100644 --- a/resource-manager/labservices/2022-08-01/schedule/method_update.go +++ b/resource-manager/labservices/2022-08-01/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/schedule/version.go b/resource-manager/labservices/2022-08-01/schedule/version.go index 2c94464c64c..23d0706d178 100644 --- a/resource-manager/labservices/2022-08-01/schedule/version.go +++ b/resource-manager/labservices/2022-08-01/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/skus/README.md b/resource-manager/labservices/2022-08-01/skus/README.md index 8dcebcd3fb9..2f3b61e5502 100644 --- a/resource-manager/labservices/2022-08-01/skus/README.md +++ b/resource-manager/labservices/2022-08-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/skus/client.go b/resource-manager/labservices/2022-08-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/labservices/2022-08-01/skus/client.go +++ b/resource-manager/labservices/2022-08-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/skus/version.go b/resource-manager/labservices/2022-08-01/skus/version.go index 37083f4f0cb..6d0d6721861 100644 --- a/resource-manager/labservices/2022-08-01/skus/version.go +++ b/resource-manager/labservices/2022-08-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/usages/README.md b/resource-manager/labservices/2022-08-01/usages/README.md index 3119620d3d7..0b72e3b9579 100644 --- a/resource-manager/labservices/2022-08-01/usages/README.md +++ b/resource-manager/labservices/2022-08-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/usages/client.go b/resource-manager/labservices/2022-08-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/labservices/2022-08-01/usages/client.go +++ b/resource-manager/labservices/2022-08-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/usages/id_location.go b/resource-manager/labservices/2022-08-01/usages/id_location.go index c716303c503..abf5a30c5c6 100644 --- a/resource-manager/labservices/2022-08-01/usages/id_location.go +++ b/resource-manager/labservices/2022-08-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/usages/version.go b/resource-manager/labservices/2022-08-01/usages/version.go index ed078ac11bf..1024c1aa86e 100644 --- a/resource-manager/labservices/2022-08-01/usages/version.go +++ b/resource-manager/labservices/2022-08-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/user/README.md b/resource-manager/labservices/2022-08-01/user/README.md index 8ed39f1966b..8ffa365192c 100644 --- a/resource-manager/labservices/2022-08-01/user/README.md +++ b/resource-manager/labservices/2022-08-01/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `user` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/user/client.go b/resource-manager/labservices/2022-08-01/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/labservices/2022-08-01/user/client.go +++ b/resource-manager/labservices/2022-08-01/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/user/id_lab.go b/resource-manager/labservices/2022-08-01/user/id_lab.go index f2191ccecc9..06bfe48cf2f 100644 --- a/resource-manager/labservices/2022-08-01/user/id_lab.go +++ b/resource-manager/labservices/2022-08-01/user/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/user/id_user.go b/resource-manager/labservices/2022-08-01/user/id_user.go index b6e22f8bc58..7912336f3ff 100644 --- a/resource-manager/labservices/2022-08-01/user/id_user.go +++ b/resource-manager/labservices/2022-08-01/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/user/method_get.go b/resource-manager/labservices/2022-08-01/user/method_get.go index e8a1c1d557f..002bdc76928 100644 --- a/resource-manager/labservices/2022-08-01/user/method_get.go +++ b/resource-manager/labservices/2022-08-01/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/user/version.go b/resource-manager/labservices/2022-08-01/user/version.go index 7a67a5894cd..818040a3693 100644 --- a/resource-manager/labservices/2022-08-01/user/version.go +++ b/resource-manager/labservices/2022-08-01/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2022-08-01" } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/README.md b/resource-manager/labservices/2022-08-01/virtualmachine/README.md index 5e426e8a740..2ba939afeca 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/README.md +++ b/resource-manager/labservices/2022-08-01/virtualmachine/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2022-08-01/virtualmachine` Documentation -The `virtualmachine` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2022-08-01`). +The `virtualmachine` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/client.go b/resource-manager/labservices/2022-08-01/virtualmachine/client.go index 8a2dacec8cb..f2cd245f2bd 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/client.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/client.go @@ -15,7 +15,7 @@ type VirtualMachineClient struct { } func NewVirtualMachineClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachine", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachine", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineClient: %+v", err) } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/id_lab.go b/resource-manager/labservices/2022-08-01/virtualmachine/id_lab.go index 086d1b5029d..5f22cf5cdb1 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/id_lab.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/id_labplan.go b/resource-manager/labservices/2022-08-01/virtualmachine/id_labplan.go index cc0ea7e3c68..2e1d911a22a 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/id_labplan.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/id_virtualmachine.go b/resource-manager/labservices/2022-08-01/virtualmachine/id_virtualmachine.go index 345e5908945..5b045560073 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/id_virtualmachine.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/method_get.go b/resource-manager/labservices/2022-08-01/virtualmachine/method_get.go index 34d61e1b691..cab728db6e7 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/method_get.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineClient) Get(ctx context.Context, id VirtualMachineId) (res var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2022-08-01/virtualmachine/version.go b/resource-manager/labservices/2022-08-01/virtualmachine/version.go index b63b17a34b7..5db22373997 100644 --- a/resource-manager/labservices/2022-08-01/virtualmachine/version.go +++ b/resource-manager/labservices/2022-08-01/virtualmachine/version.go @@ -1,12 +1,10 @@ package virtualmachine -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachine/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachine/2022-08-01" } diff --git a/resource-manager/labservices/2023-06-07/image/README.md b/resource-manager/labservices/2023-06-07/image/README.md index 0889bd07227..9bcb2d7b6a3 100644 --- a/resource-manager/labservices/2023-06-07/image/README.md +++ b/resource-manager/labservices/2023-06-07/image/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/image` Documentation -The `image` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `image` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/image/client.go b/resource-manager/labservices/2023-06-07/image/client.go index 7b3305e5bb3..b853897bfc1 100644 --- a/resource-manager/labservices/2023-06-07/image/client.go +++ b/resource-manager/labservices/2023-06-07/image/client.go @@ -15,7 +15,7 @@ type ImageClient struct { } func NewImageClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "image", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "image", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImageClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/image/id_image.go b/resource-manager/labservices/2023-06-07/image/id_image.go index bbef75cc687..630958519c4 100644 --- a/resource-manager/labservices/2023-06-07/image/id_image.go +++ b/resource-manager/labservices/2023-06-07/image/id_image.go @@ -44,7 +44,7 @@ func ParseImageID(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImageIDInsensitively(input string) (*ImageId, error) { } id := ImageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/image/id_labplan.go b/resource-manager/labservices/2023-06-07/image/id_labplan.go index 84f52488353..cb810237809 100644 --- a/resource-manager/labservices/2023-06-07/image/id_labplan.go +++ b/resource-manager/labservices/2023-06-07/image/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/image/method_createorupdate.go b/resource-manager/labservices/2023-06-07/image/method_createorupdate.go index ae107d33bf0..a3a62426e9f 100644 --- a/resource-manager/labservices/2023-06-07/image/method_createorupdate.go +++ b/resource-manager/labservices/2023-06-07/image/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ImageClient) CreateOrUpdate(ctx context.Context, id ImageId, input Image var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/image/method_get.go b/resource-manager/labservices/2023-06-07/image/method_get.go index 5eeea163f5b..ca22f5e1eea 100644 --- a/resource-manager/labservices/2023-06-07/image/method_get.go +++ b/resource-manager/labservices/2023-06-07/image/method_get.go @@ -45,7 +45,6 @@ func (c ImageClient) Get(ctx context.Context, id ImageId) (result GetOperationRe var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/image/method_update.go b/resource-manager/labservices/2023-06-07/image/method_update.go index 5dcdad72c91..61ccd8fad6f 100644 --- a/resource-manager/labservices/2023-06-07/image/method_update.go +++ b/resource-manager/labservices/2023-06-07/image/method_update.go @@ -49,7 +49,6 @@ func (c ImageClient) Update(ctx context.Context, id ImageId, input ImageUpdate) var model Image result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/image/version.go b/resource-manager/labservices/2023-06-07/image/version.go index 6cba1b26b20..f80db493466 100644 --- a/resource-manager/labservices/2023-06-07/image/version.go +++ b/resource-manager/labservices/2023-06-07/image/version.go @@ -1,12 +1,10 @@ package image -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/image/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/image/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/lab/README.md b/resource-manager/labservices/2023-06-07/lab/README.md index 4bf8d1df04b..5dd4108ccac 100644 --- a/resource-manager/labservices/2023-06-07/lab/README.md +++ b/resource-manager/labservices/2023-06-07/lab/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/lab` Documentation -The `lab` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `lab` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/lab/client.go b/resource-manager/labservices/2023-06-07/lab/client.go index 0240d2f3918..7ce08719fa8 100644 --- a/resource-manager/labservices/2023-06-07/lab/client.go +++ b/resource-manager/labservices/2023-06-07/lab/client.go @@ -15,7 +15,7 @@ type LabClient struct { } func NewLabClientWithBaseURI(sdkApi sdkEnv.Api) (*LabClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "lab", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "lab", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LabClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/lab/id_lab.go b/resource-manager/labservices/2023-06-07/lab/id_lab.go index eb77d34b54d..42e2f8f0df3 100644 --- a/resource-manager/labservices/2023-06-07/lab/id_lab.go +++ b/resource-manager/labservices/2023-06-07/lab/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/lab/method_get.go b/resource-manager/labservices/2023-06-07/lab/method_get.go index 744e5ffbaf7..e4796ee1201 100644 --- a/resource-manager/labservices/2023-06-07/lab/method_get.go +++ b/resource-manager/labservices/2023-06-07/lab/method_get.go @@ -45,7 +45,6 @@ func (c LabClient) Get(ctx context.Context, id LabId) (result GetOperationRespon var model Lab result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/lab/version.go b/resource-manager/labservices/2023-06-07/lab/version.go index b0cdbdcb743..a6bbe664ebd 100644 --- a/resource-manager/labservices/2023-06-07/lab/version.go +++ b/resource-manager/labservices/2023-06-07/lab/version.go @@ -1,12 +1,10 @@ package lab -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/lab/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/lab/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/labplan/README.md b/resource-manager/labservices/2023-06-07/labplan/README.md index 7a84ab800b0..ba1d71b3a3b 100644 --- a/resource-manager/labservices/2023-06-07/labplan/README.md +++ b/resource-manager/labservices/2023-06-07/labplan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/labplan` Documentation -The `labplan` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `labplan` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/labplan/client.go b/resource-manager/labservices/2023-06-07/labplan/client.go index c00d6ef4fdd..734eb67219c 100644 --- a/resource-manager/labservices/2023-06-07/labplan/client.go +++ b/resource-manager/labservices/2023-06-07/labplan/client.go @@ -15,7 +15,7 @@ type LabPlanClient struct { } func NewLabPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*LabPlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "labplan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "labplan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LabPlanClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/labplan/id_labplan.go b/resource-manager/labservices/2023-06-07/labplan/id_labplan.go index f0ad633137e..b5a15e5c5bf 100644 --- a/resource-manager/labservices/2023-06-07/labplan/id_labplan.go +++ b/resource-manager/labservices/2023-06-07/labplan/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/labplan/method_get.go b/resource-manager/labservices/2023-06-07/labplan/method_get.go index 19314604754..ad7661caaba 100644 --- a/resource-manager/labservices/2023-06-07/labplan/method_get.go +++ b/resource-manager/labservices/2023-06-07/labplan/method_get.go @@ -45,7 +45,6 @@ func (c LabPlanClient) Get(ctx context.Context, id LabPlanId) (result GetOperati var model LabPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/labplan/version.go b/resource-manager/labservices/2023-06-07/labplan/version.go index bc9a2666f32..fe363cc050d 100644 --- a/resource-manager/labservices/2023-06-07/labplan/version.go +++ b/resource-manager/labservices/2023-06-07/labplan/version.go @@ -1,12 +1,10 @@ package labplan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/labplan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/labplan/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/schedule/README.md b/resource-manager/labservices/2023-06-07/schedule/README.md index c51d420d839..d42b4a84985 100644 --- a/resource-manager/labservices/2023-06-07/schedule/README.md +++ b/resource-manager/labservices/2023-06-07/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `schedule` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/schedule/client.go b/resource-manager/labservices/2023-06-07/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/labservices/2023-06-07/schedule/client.go +++ b/resource-manager/labservices/2023-06-07/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/schedule/id_lab.go b/resource-manager/labservices/2023-06-07/schedule/id_lab.go index a8736ed3364..7b96e9e5f1f 100644 --- a/resource-manager/labservices/2023-06-07/schedule/id_lab.go +++ b/resource-manager/labservices/2023-06-07/schedule/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/schedule/id_schedule.go b/resource-manager/labservices/2023-06-07/schedule/id_schedule.go index fce50774e00..b0fae01d4df 100644 --- a/resource-manager/labservices/2023-06-07/schedule/id_schedule.go +++ b/resource-manager/labservices/2023-06-07/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/schedule/method_createorupdate.go b/resource-manager/labservices/2023-06-07/schedule/method_createorupdate.go index 06f15c27d8e..2a03b05a4f0 100644 --- a/resource-manager/labservices/2023-06-07/schedule/method_createorupdate.go +++ b/resource-manager/labservices/2023-06-07/schedule/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScheduleClient) CreateOrUpdate(ctx context.Context, id ScheduleId, input var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/schedule/method_get.go b/resource-manager/labservices/2023-06-07/schedule/method_get.go index 1e138129113..69fe190af24 100644 --- a/resource-manager/labservices/2023-06-07/schedule/method_get.go +++ b/resource-manager/labservices/2023-06-07/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/schedule/method_update.go b/resource-manager/labservices/2023-06-07/schedule/method_update.go index 66c00e47ea5..99b87458b8a 100644 --- a/resource-manager/labservices/2023-06-07/schedule/method_update.go +++ b/resource-manager/labservices/2023-06-07/schedule/method_update.go @@ -49,7 +49,6 @@ func (c ScheduleClient) Update(ctx context.Context, id ScheduleId, input Schedul var model Schedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/schedule/version.go b/resource-manager/labservices/2023-06-07/schedule/version.go index 8e15d81c0c1..9c922d03dde 100644 --- a/resource-manager/labservices/2023-06-07/schedule/version.go +++ b/resource-manager/labservices/2023-06-07/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/skus/README.md b/resource-manager/labservices/2023-06-07/skus/README.md index 32e4046e9fe..4f7c6d9b6b6 100644 --- a/resource-manager/labservices/2023-06-07/skus/README.md +++ b/resource-manager/labservices/2023-06-07/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `skus` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/skus/client.go b/resource-manager/labservices/2023-06-07/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/labservices/2023-06-07/skus/client.go +++ b/resource-manager/labservices/2023-06-07/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/skus/version.go b/resource-manager/labservices/2023-06-07/skus/version.go index b7ca7e27f77..68b72c328c5 100644 --- a/resource-manager/labservices/2023-06-07/skus/version.go +++ b/resource-manager/labservices/2023-06-07/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/usages/README.md b/resource-manager/labservices/2023-06-07/usages/README.md index 64b1e7d8497..700d9ef620b 100644 --- a/resource-manager/labservices/2023-06-07/usages/README.md +++ b/resource-manager/labservices/2023-06-07/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `usages` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/usages/client.go b/resource-manager/labservices/2023-06-07/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/labservices/2023-06-07/usages/client.go +++ b/resource-manager/labservices/2023-06-07/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/usages/id_location.go b/resource-manager/labservices/2023-06-07/usages/id_location.go index c716303c503..abf5a30c5c6 100644 --- a/resource-manager/labservices/2023-06-07/usages/id_location.go +++ b/resource-manager/labservices/2023-06-07/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/usages/version.go b/resource-manager/labservices/2023-06-07/usages/version.go index 2671966b09f..ba1e26259a0 100644 --- a/resource-manager/labservices/2023-06-07/usages/version.go +++ b/resource-manager/labservices/2023-06-07/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/user/README.md b/resource-manager/labservices/2023-06-07/user/README.md index ce8b46749ea..539564dc181 100644 --- a/resource-manager/labservices/2023-06-07/user/README.md +++ b/resource-manager/labservices/2023-06-07/user/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/user` Documentation -The `user` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `user` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/user/client.go b/resource-manager/labservices/2023-06-07/user/client.go index 3d1a0eb8bf3..7f755c17018 100644 --- a/resource-manager/labservices/2023-06-07/user/client.go +++ b/resource-manager/labservices/2023-06-07/user/client.go @@ -15,7 +15,7 @@ type UserClient struct { } func NewUserClientWithBaseURI(sdkApi sdkEnv.Api) (*UserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "user", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "user", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UserClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/user/id_lab.go b/resource-manager/labservices/2023-06-07/user/id_lab.go index f2191ccecc9..06bfe48cf2f 100644 --- a/resource-manager/labservices/2023-06-07/user/id_lab.go +++ b/resource-manager/labservices/2023-06-07/user/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/user/id_user.go b/resource-manager/labservices/2023-06-07/user/id_user.go index b6e22f8bc58..7912336f3ff 100644 --- a/resource-manager/labservices/2023-06-07/user/id_user.go +++ b/resource-manager/labservices/2023-06-07/user/id_user.go @@ -44,7 +44,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/user/method_get.go b/resource-manager/labservices/2023-06-07/user/method_get.go index e8a1c1d557f..002bdc76928 100644 --- a/resource-manager/labservices/2023-06-07/user/method_get.go +++ b/resource-manager/labservices/2023-06-07/user/method_get.go @@ -45,7 +45,6 @@ func (c UserClient) Get(ctx context.Context, id UserId) (result GetOperationResp var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/user/version.go b/resource-manager/labservices/2023-06-07/user/version.go index 8e64df6e78a..cc4b0717470 100644 --- a/resource-manager/labservices/2023-06-07/user/version.go +++ b/resource-manager/labservices/2023-06-07/user/version.go @@ -1,12 +1,10 @@ package user -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/user/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/user/2023-06-07" } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/README.md b/resource-manager/labservices/2023-06-07/virtualmachine/README.md index e0ba024ef91..a972f635167 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/README.md +++ b/resource-manager/labservices/2023-06-07/virtualmachine/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/labservices/2023-06-07/virtualmachine` Documentation -The `virtualmachine` SDK allows for interaction with the Azure Resource Manager Service `labservices` (API Version `2023-06-07`). +The `virtualmachine` SDK allows for interaction with Azure Resource Manager `labservices` (API Version `2023-06-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/client.go b/resource-manager/labservices/2023-06-07/virtualmachine/client.go index 8a2dacec8cb..f2cd245f2bd 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/client.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/client.go @@ -15,7 +15,7 @@ type VirtualMachineClient struct { } func NewVirtualMachineClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachine", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachine", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineClient: %+v", err) } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/id_lab.go b/resource-manager/labservices/2023-06-07/virtualmachine/id_lab.go index 086d1b5029d..5f22cf5cdb1 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/id_lab.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/id_lab.go @@ -42,7 +42,7 @@ func ParseLabID(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabIDInsensitively(input string) (*LabId, error) { } id := LabId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/id_labplan.go b/resource-manager/labservices/2023-06-07/virtualmachine/id_labplan.go index cc0ea7e3c68..2e1d911a22a 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/id_labplan.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/id_labplan.go @@ -42,7 +42,7 @@ func ParseLabPlanID(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLabPlanIDInsensitively(input string) (*LabPlanId, error) { } id := LabPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/id_virtualmachine.go b/resource-manager/labservices/2023-06-07/virtualmachine/id_virtualmachine.go index 345e5908945..5b045560073 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/id_virtualmachine.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/method_get.go b/resource-manager/labservices/2023-06-07/virtualmachine/method_get.go index 34d61e1b691..cab728db6e7 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/method_get.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineClient) Get(ctx context.Context, id VirtualMachineId) (res var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/labservices/2023-06-07/virtualmachine/version.go b/resource-manager/labservices/2023-06-07/virtualmachine/version.go index e800c766328..483ec9c3d0e 100644 --- a/resource-manager/labservices/2023-06-07/virtualmachine/version.go +++ b/resource-manager/labservices/2023-06-07/virtualmachine/version.go @@ -1,12 +1,10 @@ package virtualmachine -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachine/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachine/2023-06-07" } diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/README.md b/resource-manager/loadtestservice/2022-12-01/loadtests/README.md index 67ab44e47fe..44e060c9996 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/README.md +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests` Documentation -The `loadtests` SDK allows for interaction with the Azure Resource Manager Service `loadtestservice` (API Version `2022-12-01`). +The `loadtests` SDK allows for interaction with Azure Resource Manager `loadtestservice` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/client.go b/resource-manager/loadtestservice/2022-12-01/loadtests/client.go index b5a9ba72097..78dc0bfac7e 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/client.go +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/client.go @@ -15,7 +15,7 @@ type LoadTestsClient struct { } func NewLoadTestsClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadTestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loadtests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loadtests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoadTestsClient: %+v", err) } diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go b/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go index 5ce33662303..4e778468bb2 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/id_loadtest.go @@ -42,7 +42,7 @@ func ParseLoadTestID(input string) (*LoadTestId, error) { } id := LoadTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLoadTestIDInsensitively(input string) (*LoadTestId, error) { } id := LoadTestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/method_get.go b/resource-manager/loadtestservice/2022-12-01/loadtests/method_get.go index a0517b2945b..f3a89b1d1ea 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/method_get.go +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/method_get.go @@ -45,7 +45,6 @@ func (c LoadTestsClient) Get(ctx context.Context, id LoadTestId) (result GetOper var model LoadTestResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/model_loadtestproperties.go b/resource-manager/loadtestservice/2022-12-01/loadtests/model_loadtestproperties.go index ba93b11067e..dbaae2bd6de 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/model_loadtestproperties.go +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/model_loadtestproperties.go @@ -1,5 +1,10 @@ package loadtests +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -9,3 +14,28 @@ type LoadTestProperties struct { Encryption *EncryptionProperties `json:"encryption,omitempty"` ProvisioningState *ResourceState `json:"provisioningState,omitempty"` } + +var _ json.Marshaler = LoadTestProperties{} + +func (s LoadTestProperties) MarshalJSON() ([]byte, error) { + type wrapper LoadTestProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LoadTestProperties: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LoadTestProperties: %+v", err) + } + + delete(decoded, "dataPlaneURI") + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LoadTestProperties: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/loadtestservice/2022-12-01/loadtests/version.go b/resource-manager/loadtestservice/2022-12-01/loadtests/version.go index 3cdcb4901a3..0bce61543d0 100644 --- a/resource-manager/loadtestservice/2022-12-01/loadtests/version.go +++ b/resource-manager/loadtestservice/2022-12-01/loadtests/version.go @@ -1,12 +1,10 @@ package loadtests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadtests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loadtests/2022-12-01" } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/README.md b/resource-manager/loadtestservice/2022-12-01/quotas/README.md index 634941ca7b1..b8a2d1f5574 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/README.md +++ b/resource-manager/loadtestservice/2022-12-01/quotas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas` Documentation -The `quotas` SDK allows for interaction with the Azure Resource Manager Service `loadtestservice` (API Version `2022-12-01`). +The `quotas` SDK allows for interaction with Azure Resource Manager `loadtestservice` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/client.go b/resource-manager/loadtestservice/2022-12-01/quotas/client.go index acdc272dcb3..0b1d5c3fae1 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/client.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/client.go @@ -15,7 +15,7 @@ type QuotasClient struct { } func NewQuotasClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotasClient: %+v", err) } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go b/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go index 3df54eeca4d..e472888f99c 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go b/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go index 5b04a6e40e6..ca7a65df92d 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/id_quota.go @@ -42,7 +42,7 @@ func ParseQuotaID(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQuotaIDInsensitively(input string) (*QuotaId, error) { } id := QuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/method_checkavailability.go b/resource-manager/loadtestservice/2022-12-01/quotas/method_checkavailability.go index 3615c7bb5b4..6d85611f15d 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/method_checkavailability.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/method_checkavailability.go @@ -50,7 +50,6 @@ func (c QuotasClient) CheckAvailability(ctx context.Context, id QuotaId, input Q var model CheckQuotaAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/method_get.go b/resource-manager/loadtestservice/2022-12-01/quotas/method_get.go index dfe53b6346d..43fc8681778 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/method_get.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/method_get.go @@ -45,7 +45,6 @@ func (c QuotasClient) Get(ctx context.Context, id QuotaId) (result GetOperationR var model QuotaResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/loadtestservice/2022-12-01/quotas/version.go b/resource-manager/loadtestservice/2022-12-01/quotas/version.go index 6d7532799d1..784e4d37360 100644 --- a/resource-manager/loadtestservice/2022-12-01/quotas/version.go +++ b/resource-manager/loadtestservice/2022-12-01/quotas/version.go @@ -1,12 +1,10 @@ package quotas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotas/2022-12-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md b/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md index 46938743c9d..39ea2300550 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountagreements` Documentation -The `integrationaccountagreements` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountagreements` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go index fbd91804501..445bd95ed2d 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/client.go @@ -15,7 +15,7 @@ type IntegrationAccountAgreementsClient struct { } func NewIntegrationAccountAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountAgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountagreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountagreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountAgreementsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go index 7c05c54e935..b2538234091 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/id_agreement.go @@ -44,7 +44,7 @@ func ParseAgreementID(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgreementIDInsensitively(input string) (*AgreementId, error) { } id := AgreementId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go index 0a21c8d4833..9411c3e79bc 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate.go index dd89eed9374..1dd4f4e6809 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountAgreementsClient) CreateOrUpdate(ctx context.Context, var model IntegrationAccountAgreement result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get.go index 4a4d77096c6..970b4fdd2c3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountAgreementsClient) Get(ctx context.Context, id Agreemen var model IntegrationAccountAgreement result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list.go index 49572dfd16d..bd53d7d05a3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl.go index f925480e6cc..97ccdccb415 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/method_listcontentcallbackurl.go @@ -50,7 +50,6 @@ func (c IntegrationAccountAgreementsClient) ListContentCallbackUrl(ctx context.C var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go b/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go index 633c4c0db03..debb80b5576 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountagreements/version.go @@ -1,12 +1,10 @@ package integrationaccountagreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountagreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountagreements/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md b/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md index 137bb343ce3..328b8fe1879 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountassemblies` Documentation -The `integrationaccountassemblies` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountassemblies` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go index 6fcd1144a2b..30f72e13ff3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/client.go @@ -15,7 +15,7 @@ type IntegrationAccountAssembliesClient struct { } func NewIntegrationAccountAssembliesClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountAssembliesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountassemblies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountassemblies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountAssembliesClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go index 10ad3c5ff27..47bd2628088 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_assembly.go @@ -44,7 +44,7 @@ func ParseAssemblyID(input string) (*AssemblyId, error) { } id := AssemblyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAssemblyIDInsensitively(input string) (*AssemblyId, error) { } id := AssemblyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go index 7e2cd581766..81e07dd5e13 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate.go index 8434aee0e64..bc79c8f67f5 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, var model AssemblyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get.go index 226eabdebcb..48209ccd171 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountAssembliesClient) Get(ctx context.Context, id Assembly var model AssemblyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list.go index d5dafee7244..066e3b8cedc 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_list.go @@ -46,7 +46,6 @@ func (c IntegrationAccountAssembliesClient) List(ctx context.Context, id Integra var model AssemblyCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl.go index 753eaa1a77e..579c09994d4 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/method_listcontentcallbackurl.go @@ -46,7 +46,6 @@ func (c IntegrationAccountAssembliesClient) ListContentCallbackUrl(ctx context.C var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go b/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go index 690ff257ba0..0d065d06c6f 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountassemblies/version.go @@ -1,12 +1,10 @@ package integrationaccountassemblies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountassemblies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountassemblies/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md index 737acb22d0e..4fd214ca32b 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations` Documentation -The `integrationaccountbatchconfigurations` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountbatchconfigurations` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go index 2f3daad0f3b..e6a5ebb07b0 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/client.go @@ -15,7 +15,7 @@ type IntegrationAccountBatchConfigurationsClient struct { } func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountBatchConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountbatchconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountbatchconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountBatchConfigurationsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go index c39fbc66501..44ee7a1c69e 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_batchconfiguration.go @@ -44,7 +44,7 @@ func ParseBatchConfigurationID(input string) (*BatchConfigurationId, error) { } id := BatchConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBatchConfigurationIDInsensitively(input string) (*BatchConfigurationId } id := BatchConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go index 4b05c679247..793c14145ef 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate.go index 44b322561a4..2e9511bd47e 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context. var model BatchConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get.go index c7f8c979847..14d40aceb75 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, id var model BatchConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list.go index 6ea554461b5..eaf8e283f9b 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/method_list.go @@ -46,7 +46,6 @@ func (c IntegrationAccountBatchConfigurationsClient) List(ctx context.Context, i var model BatchConfigurationCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go index c564172c92e..0f362e580f5 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountbatchconfigurations/version.go @@ -1,12 +1,10 @@ package integrationaccountbatchconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountbatchconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountbatchconfigurations/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md b/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md index fe4cb0beed9..ba353d7b49f 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountcertificates` Documentation -The `integrationaccountcertificates` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountcertificates` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go index 9f6bd12a9e0..bf014c050b5 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/client.go @@ -15,7 +15,7 @@ type IntegrationAccountCertificatesClient struct { } func NewIntegrationAccountCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountCertificatesClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go index 56b471ac107..0a22c85d41f 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go index a06489c9175..324a0049efd 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate.go index e746022b4ab..cfc2c9a83ee 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountCertificatesClient) CreateOrUpdate(ctx context.Context var model IntegrationAccountCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get.go index 66947045fef..19465981c72 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountCertificatesClient) Get(ctx context.Context, id Certif var model IntegrationAccountCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list.go index dde96d3554a..aba0ca91614 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go b/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go index 463b6cce545..e8fc695be03 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountcertificates/version.go @@ -1,12 +1,10 @@ package integrationaccountcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountcertificates/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md b/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md index 8c5b5fe05c3..3bc36f3862a 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountmaps` Documentation -The `integrationaccountmaps` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountmaps` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go index beecb52786a..c88f3be22ad 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/client.go @@ -15,7 +15,7 @@ type IntegrationAccountMapsClient struct { } func NewIntegrationAccountMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountmaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountmaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountMapsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go index fe76e4461af..b719dce8e7d 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go index 67bc5abbebd..c61f0dff0ae 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/id_map.go @@ -44,7 +44,7 @@ func ParseMapID(input string) (*MapId, error) { } id := MapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMapIDInsensitively(input string) (*MapId, error) { } id := MapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate.go index 21f1c4574fb..f619a69bc51 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountMapsClient) CreateOrUpdate(ctx context.Context, id Map var model IntegrationAccountMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get.go index 55e01d91993..b2a6dec9224 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountMapsClient) Get(ctx context.Context, id MapId) (result var model IntegrationAccountMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list.go index a0c0de786a7..a8f768ae163 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl.go index 5682de51276..f7b09fab439 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/method_listcontentcallbackurl.go @@ -50,7 +50,6 @@ func (c IntegrationAccountMapsClient) ListContentCallbackUrl(ctx context.Context var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go b/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go index a8d445f9439..cf41793d35f 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountmaps/version.go @@ -1,12 +1,10 @@ package integrationaccountmaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountmaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountmaps/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md b/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md index 3c5c68d3f24..57de276de90 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountpartners` Documentation -The `integrationaccountpartners` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountpartners` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go index 03c0e952f17..f8d146a6af8 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/client.go @@ -15,7 +15,7 @@ type IntegrationAccountPartnersClient struct { } func NewIntegrationAccountPartnersClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountPartnersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountpartners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountpartners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountPartnersClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go index 598dee6a612..6ce0cbdb83c 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go index acb09f52c2a..2a446fee792 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/id_partner.go @@ -44,7 +44,7 @@ func ParsePartnerID(input string) (*PartnerId, error) { } id := PartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePartnerIDInsensitively(input string) (*PartnerId, error) { } id := PartnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate.go index be86f402af7..72965443ee3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountPartnersClient) CreateOrUpdate(ctx context.Context, id var model IntegrationAccountPartner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get.go index acb19eec994..ba789c884f4 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountPartnersClient) Get(ctx context.Context, id PartnerId) var model IntegrationAccountPartner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list.go index 62a91e33199..8da6c7df965 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl.go index 8347e48c951..95f390fdfc1 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/method_listcontentcallbackurl.go @@ -50,7 +50,6 @@ func (c IntegrationAccountPartnersClient) ListContentCallbackUrl(ctx context.Con var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go b/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go index e35739db53f..68d7cbeefe9 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountpartners/version.go @@ -1,12 +1,10 @@ package integrationaccountpartners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountpartners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountpartners/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/README.md b/resource-manager/logic/2019-05-01/integrationaccounts/README.md index 9daef13bf31..e39c9c811b3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccounts` Documentation -The `integrationaccounts` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccounts` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/client.go b/resource-manager/logic/2019-05-01/integrationaccounts/client.go index 55099b5175e..897aa71f6ae 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/client.go @@ -15,7 +15,7 @@ type IntegrationAccountsClient struct { } func NewIntegrationAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go index 317ce288f90..3efd505fc23 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate.go index a32b3eb4ebc..943db9b3d5a 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountsClient) CreateOrUpdate(ctx context.Context, id Integr var model IntegrationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_get.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_get.go index ebd3b072631..71a97aa889f 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountsClient) Get(ctx context.Context, id IntegrationAccoun var model IntegrationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup.go index 8fcecbe4cb6..de536ec9516 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription.go index fad0b99bb18..2e668763c59 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl.go index 2c3a5efbfa4..86ec6f72b0c 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_listcallbackurl.go @@ -50,7 +50,6 @@ func (c IntegrationAccountsClient) ListCallbackUrl(ctx context.Context, id Integ var model CallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys.go index c735b64b292..195e2744db3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_listkeyvaultkeys.go @@ -50,7 +50,6 @@ func (c IntegrationAccountsClient) ListKeyVaultKeys(ctx context.Context, id Inte var model KeyVaultKeyCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey.go index abce932825c..043ff7d7b39 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_regenerateaccesskey.go @@ -50,7 +50,6 @@ func (c IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, id I var model IntegrationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/method_update.go b/resource-manager/logic/2019-05-01/integrationaccounts/method_update.go index 56d4965c091..15c198797bd 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/method_update.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/method_update.go @@ -49,7 +49,6 @@ func (c IntegrationAccountsClient) Update(ctx context.Context, id IntegrationAcc var model IntegrationAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccounts/version.go b/resource-manager/logic/2019-05-01/integrationaccounts/version.go index e7e61e35e6d..d722a7e238e 100644 --- a/resource-manager/logic/2019-05-01/integrationaccounts/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccounts/version.go @@ -1,12 +1,10 @@ package integrationaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccounts/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md b/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md index 6b246446c4e..8877f70b88d 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountschemas` Documentation -The `integrationaccountschemas` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountschemas` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go index edb71f170c5..8c9eac36246 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/client.go @@ -15,7 +15,7 @@ type IntegrationAccountSchemasClient struct { } func NewIntegrationAccountSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountSchemasClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go index 0ef37a08062..96141585beb 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go index 71f6bf7ccd2..f1f23e61c3c 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/id_schema.go @@ -44,7 +44,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate.go index fe4941bc40a..7641dfdbeaf 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountSchemasClient) CreateOrUpdate(ctx context.Context, id var model IntegrationAccountSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get.go index 2721b548721..b961ad492f3 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountSchemasClient) Get(ctx context.Context, id SchemaId) ( var model IntegrationAccountSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list.go index e470b0715da..9c96f9fd8c0 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl.go index bd7c8fc7ed3..63791fca079 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/method_listcontentcallbackurl.go @@ -50,7 +50,6 @@ func (c IntegrationAccountSchemasClient) ListContentCallbackUrl(ctx context.Cont var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go b/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go index 5aa266b3ac1..30e9d4c3c65 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountschemas/version.go @@ -1,12 +1,10 @@ package integrationaccountschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountschemas/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md b/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md index e00cd5b6fbc..d0a45641e05 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationaccountsessions` Documentation -The `integrationaccountsessions` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationaccountsessions` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go index 10db887a089..25819e0bb87 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/client.go @@ -15,7 +15,7 @@ type IntegrationAccountSessionsClient struct { } func NewIntegrationAccountSessionsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationAccountSessionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationaccountsessions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationaccountsessions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationAccountSessionsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go index 7991f6618f8..168fda65a82 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/id_integrationaccount.go @@ -42,7 +42,7 @@ func ParseIntegrationAccountID(input string) (*IntegrationAccountId, error) { } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationAccountIDInsensitively(input string) (*IntegrationAccountId } id := IntegrationAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go index 85d255b4eb0..4a047291563 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/id_session.go @@ -44,7 +44,7 @@ func ParseSessionID(input string) (*SessionId, error) { } id := SessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSessionIDInsensitively(input string) (*SessionId, error) { } id := SessionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate.go index bd103ece397..89831bd0e48 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IntegrationAccountSessionsClient) CreateOrUpdate(ctx context.Context, id var model IntegrationAccountSession result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get.go index f82484006e8..b90fadd7849 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationAccountSessionsClient) Get(ctx context.Context, id SessionId) var model IntegrationAccountSession result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list.go index fa444ba329d..6d5860a6496 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go b/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go index 606685d6c5f..cbfb45d8a5e 100644 --- a/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go +++ b/resource-manager/logic/2019-05-01/integrationaccountsessions/version.go @@ -1,12 +1,10 @@ package integrationaccountsessions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationaccountsessions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationaccountsessions/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/README.md b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/README.md index f75d6111173..431d04e7d72 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/README.md +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi` Documentation -The `integrationserviceenvironmentmanagedapi` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationserviceenvironmentmanagedapi` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/client.go index 5c6752918a0..de9f11d12ca 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentManagedApiClient struct { } func NewIntegrationServiceEnvironmentManagedApiClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentManagedApiClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironmentmanagedapi", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironmentmanagedapi", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentManagedApiClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/id_managedapi.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/id_managedapi.go index d64d0ba586a..9776a505c36 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/id_managedapi.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/id_managedapi.go @@ -44,7 +44,7 @@ func ParseManagedApiID(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedApiIDInsensitively(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/method_get.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/method_get.go index 70d58b34aca..6ce63010ca9 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationServiceEnvironmentManagedApiClient) Get(ctx context.Context, var model IntegrationServiceEnvironmentManagedApi result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/version.go index 029f02184af..bd77a1b9fe3 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapi/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironmentmanagedapi -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironmentmanagedapi/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironmentmanagedapi/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/README.md b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/README.md index 976bbf07717..9cd54381d2f 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/README.md +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis` Documentation -The `integrationserviceenvironmentmanagedapis` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationserviceenvironmentmanagedapis` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/client.go index fc331f603d5..a0105ce83f7 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentManagedApisClient struct { } func NewIntegrationServiceEnvironmentManagedApisClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentManagedApisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironmentmanagedapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironmentmanagedapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentManagedApisClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_integrationserviceenvironment.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_integrationserviceenvironment.go index d40a0a3fe62..e0385ea0369 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_integrationserviceenvironment.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_integrationserviceenvironment.go @@ -42,7 +42,7 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_managedapi.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_managedapi.go index 3140e0f4011..8e9eb6cb276 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_managedapi.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/id_managedapi.go @@ -44,7 +44,7 @@ func ParseManagedApiID(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedApiIDInsensitively(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/version.go index 07a61efad78..7f957905e9d 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentmanagedapis/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironmentmanagedapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironmentmanagedapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironmentmanagedapis/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/README.md b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/README.md index 783fe3ab4b2..f24f87a09e7 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/README.md +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth` Documentation -The `integrationserviceenvironmentnetworkhealth` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationserviceenvironmentnetworkhealth` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/client.go index 5870442d733..cfe470a1955 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentNetworkHealthClient struct { } func NewIntegrationServiceEnvironmentNetworkHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentNetworkHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironmentnetworkhealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironmentnetworkhealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentNetworkHealthClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/id_integrationserviceenvironment.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/id_integrationserviceenvironment.go index 33b2e998878..c4a0127f2eb 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/id_integrationserviceenvironment.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/id_integrationserviceenvironment.go @@ -42,7 +42,7 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/method_get.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/method_get.go index cad2045a502..2305ce3130c 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/method_get.go @@ -46,7 +46,6 @@ func (c IntegrationServiceEnvironmentNetworkHealthClient) Get(ctx context.Contex var model map[string]IntegrationServiceEnvironmentSubnetNetworkHealth result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/version.go index d2066ba1d27..29d82028c6b 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentnetworkhealth/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironmentnetworkhealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironmentnetworkhealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironmentnetworkhealth/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/client.go index bbf976a113c..bd2e6b0ffe5 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentRestartClient struct { } func NewIntegrationServiceEnvironmentRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironmentrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironmentrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentRestartClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/id_integrationserviceenvironment.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/id_integrationserviceenvironment.go index 5a9390bec40..a8242732926 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/id_integrationserviceenvironment.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/id_integrationserviceenvironment.go @@ -42,7 +42,7 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/version.go index 573dddbfd41..2d00e24f98e 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentrestart/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironmentrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironmentrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironmentrestart/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md b/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md index c0bb6b0e055..69c91588855 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironments` Documentation -The `integrationserviceenvironments` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationserviceenvironments` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go index 51cc53aae98..8045795b75a 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentsClient struct { } func NewIntegrationServiceEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go index 885aa612e0f..e762b8d0efb 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/id_integrationserviceenvironment.go @@ -42,7 +42,7 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get.go index 109168592bb..5126c3e945e 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_get.go @@ -45,7 +45,6 @@ func (c IntegrationServiceEnvironmentsClient) Get(ctx context.Context, id Integr var model IntegrationServiceEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup.go index f8b4905aec4..40f4452f0bf 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription.go index 6407edc686c..c5908c20ca0 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go index 49bc6ae0f86..73120a5b852 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironments/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironments/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/README.md b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/README.md index 6adff083ef4..93eb04f91f7 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/README.md +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus` Documentation -The `integrationserviceenvironmentskus` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `integrationserviceenvironmentskus` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/client.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/client.go index 8b8916b25a4..72d2a38d014 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/client.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/client.go @@ -15,7 +15,7 @@ type IntegrationServiceEnvironmentSkusClient struct { } func NewIntegrationServiceEnvironmentSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationServiceEnvironmentSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationserviceenvironmentskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationserviceenvironmentskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationServiceEnvironmentSkusClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/id_integrationserviceenvironment.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/id_integrationserviceenvironment.go index d1af78c8c4a..12ddaaf074a 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/id_integrationserviceenvironment.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/id_integrationserviceenvironment.go @@ -42,7 +42,7 @@ func ParseIntegrationServiceEnvironmentID(input string) (*IntegrationServiceEnvi } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIntegrationServiceEnvironmentIDInsensitively(input string) (*Integrati } id := IntegrationServiceEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/version.go b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/version.go index e4ced6249e3..9fc89dc2181 100644 --- a/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/version.go +++ b/resource-manager/logic/2019-05-01/integrationserviceenvironmentskus/version.go @@ -1,12 +1,10 @@ package integrationserviceenvironmentskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationserviceenvironmentskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationserviceenvironmentskus/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/README.md b/resource-manager/logic/2019-05-01/workflowrunactions/README.md index e968e208a07..5448d0acaa7 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/README.md +++ b/resource-manager/logic/2019-05-01/workflowrunactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunactions` Documentation -The `workflowrunactions` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowrunactions` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/client.go b/resource-manager/logic/2019-05-01/workflowrunactions/client.go index 75492551c09..463cc06a5f9 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/client.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/client.go @@ -15,7 +15,7 @@ type WorkflowRunActionsClient struct { } func NewWorkflowRunActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowrunactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowrunactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunActionsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go index 2b134c455a5..4a75479b389 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go index a7e8eb7c465..079096aca1c 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_repetition.go @@ -48,7 +48,7 @@ func ParseRepetitionID(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go index 7750352f542..8717f76d326 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_repetitionrequesthistory.go @@ -50,7 +50,7 @@ func ParseRepetitionRequestHistoryID(input string) (*RepetitionRequestHistoryId, } id := RepetitionRequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRepetitionRequestHistoryIDInsensitively(input string) (*RepetitionRequ } id := RepetitionRequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go index 8b9d30bc01a..aa42158a5dd 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_requesthistory.go @@ -48,7 +48,7 @@ func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go index 4b5890ed5c2..6c2d004923e 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_run.go @@ -44,7 +44,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go b/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go index 8ab21590dc7..285dc986792 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/id_scoperepetition.go @@ -48,7 +48,7 @@ func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, erro } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget.go index f767e43bd99..f860d0462b4 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_coperepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) CopeRepetitionsGet(ctx context.Context, id Sco var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_get.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_get.go index 83af4ca8829..c86b02f4ca2 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) Get(ctx context.Context, id ActionId) (result var model WorkflowRunAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_list.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_list.go index 532e550d8d0..084239bb128 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_list.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces.go index 0068d54ece4..aa37ce47d2d 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_listexpressiontraces.go @@ -46,7 +46,6 @@ func (c WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, id A var model ExpressionTraces result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget.go index ecac4315b0f..eb39d17169e 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsGet(ctx context.Co var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go index 15ceb06aa56..e7e83967463 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionslistexpressiontraces.go @@ -46,7 +46,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsListExpressionTrac var model ExpressionTraces result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go index 6421f49b07c..6830262db6f 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesGe var model RequestHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget.go b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget.go index 346e35fe41b..a7cf214e35d 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/method_workflowrunactionrequesthistoriesget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRequestHistoriesGet(ctx conte var model RequestHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunactions/version.go b/resource-manager/logic/2019-05-01/workflowrunactions/version.go index 83177937c88..a8d90d51c4e 100644 --- a/resource-manager/logic/2019-05-01/workflowrunactions/version.go +++ b/resource-manager/logic/2019-05-01/workflowrunactions/version.go @@ -1,12 +1,10 @@ package workflowrunactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowrunactions/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowrunoperations/README.md b/resource-manager/logic/2019-05-01/workflowrunoperations/README.md index 8f3581d6788..b1b6045ffdf 100644 --- a/resource-manager/logic/2019-05-01/workflowrunoperations/README.md +++ b/resource-manager/logic/2019-05-01/workflowrunoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowrunoperations` Documentation -The `workflowrunoperations` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowrunoperations` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowrunoperations/client.go b/resource-manager/logic/2019-05-01/workflowrunoperations/client.go index 3fcea35d807..f04ca3d8c07 100644 --- a/resource-manager/logic/2019-05-01/workflowrunoperations/client.go +++ b/resource-manager/logic/2019-05-01/workflowrunoperations/client.go @@ -15,7 +15,7 @@ type WorkflowRunOperationsClient struct { } func NewWorkflowRunOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowrunoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowrunoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunOperationsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowrunoperations/id_operation.go b/resource-manager/logic/2019-05-01/workflowrunoperations/id_operation.go index 887633cbb44..df98b55a3f5 100644 --- a/resource-manager/logic/2019-05-01/workflowrunoperations/id_operation.go +++ b/resource-manager/logic/2019-05-01/workflowrunoperations/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowrunoperations/method_get.go b/resource-manager/logic/2019-05-01/workflowrunoperations/method_get.go index 820f4cee14f..a5dd32829c4 100644 --- a/resource-manager/logic/2019-05-01/workflowrunoperations/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowrunoperations/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunOperationsClient) Get(ctx context.Context, id OperationId) (r var model WorkflowRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowrunoperations/version.go b/resource-manager/logic/2019-05-01/workflowrunoperations/version.go index 50681562223..d2abebd0191 100644 --- a/resource-manager/logic/2019-05-01/workflowrunoperations/version.go +++ b/resource-manager/logic/2019-05-01/workflowrunoperations/version.go @@ -1,12 +1,10 @@ package workflowrunoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowrunoperations/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowruns/README.md b/resource-manager/logic/2019-05-01/workflowruns/README.md index 0cc409bbd03..4acdda267c5 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/README.md +++ b/resource-manager/logic/2019-05-01/workflowruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowruns` Documentation -The `workflowruns` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowruns` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowruns/client.go b/resource-manager/logic/2019-05-01/workflowruns/client.go index e41dae0872b..73a34bf9d60 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/client.go +++ b/resource-manager/logic/2019-05-01/workflowruns/client.go @@ -15,7 +15,7 @@ type WorkflowRunsClient struct { } func NewWorkflowRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowruns/id_run.go b/resource-manager/logic/2019-05-01/workflowruns/id_run.go index 5f3b3457a91..152553609d4 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/id_run.go +++ b/resource-manager/logic/2019-05-01/workflowruns/id_run.go @@ -44,7 +44,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowruns/id_workflow.go b/resource-manager/logic/2019-05-01/workflowruns/id_workflow.go index f702f27d3b1..983f13b7e26 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/id_workflow.go +++ b/resource-manager/logic/2019-05-01/workflowruns/id_workflow.go @@ -42,7 +42,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowruns/method_get.go b/resource-manager/logic/2019-05-01/workflowruns/method_get.go index 6ee3078a7f7..17d61b2a5b1 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowruns/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunsClient) Get(ctx context.Context, id RunId) (result GetOperat var model WorkflowRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowruns/method_list.go b/resource-manager/logic/2019-05-01/workflowruns/method_list.go index ae477169f14..c8ff7492129 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/method_list.go +++ b/resource-manager/logic/2019-05-01/workflowruns/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflowruns/version.go b/resource-manager/logic/2019-05-01/workflowruns/version.go index c11463a223a..1071f401805 100644 --- a/resource-manager/logic/2019-05-01/workflowruns/version.go +++ b/resource-manager/logic/2019-05-01/workflowruns/version.go @@ -1,12 +1,10 @@ package workflowruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowruns/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflows/README.md b/resource-manager/logic/2019-05-01/workflows/README.md index 99ef5284e22..e8a8d2dfa97 100644 --- a/resource-manager/logic/2019-05-01/workflows/README.md +++ b/resource-manager/logic/2019-05-01/workflows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflows` Documentation -The `workflows` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflows` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflows/client.go b/resource-manager/logic/2019-05-01/workflows/client.go index e036e0f1d48..46648dbfe97 100644 --- a/resource-manager/logic/2019-05-01/workflows/client.go +++ b/resource-manager/logic/2019-05-01/workflows/client.go @@ -15,7 +15,7 @@ type WorkflowsClient struct { } func NewWorkflowsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go b/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go index 9da5b3c24e7..cd7b9729c38 100644 --- a/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go +++ b/resource-manager/logic/2019-05-01/workflows/id_locationworkflow.go @@ -44,7 +44,7 @@ func ParseLocationWorkflowID(input string) (*LocationWorkflowId, error) { } id := LocationWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationWorkflowIDInsensitively(input string) (*LocationWorkflowId, er } id := LocationWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflows/id_workflow.go b/resource-manager/logic/2019-05-01/workflows/id_workflow.go index 85bee671a76..1a2567d0418 100644 --- a/resource-manager/logic/2019-05-01/workflows/id_workflow.go +++ b/resource-manager/logic/2019-05-01/workflows/id_workflow.go @@ -42,7 +42,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflows/method_createorupdate.go b/resource-manager/logic/2019-05-01/workflows/method_createorupdate.go index e3c8e35ddfa..c45df4f4463 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_createorupdate.go +++ b/resource-manager/logic/2019-05-01/workflows/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WorkflowsClient) CreateOrUpdate(ctx context.Context, id WorkflowId, inpu var model Workflow result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition.go b/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition.go index e2f2fcbfeb2..0195c87ed94 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition.go +++ b/resource-manager/logic/2019-05-01/workflows/method_generateupgradeddefinition.go @@ -50,7 +50,6 @@ func (c WorkflowsClient) GenerateUpgradedDefinition(ctx context.Context, id Work var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/method_get.go b/resource-manager/logic/2019-05-01/workflows/method_get.go index f2a58873883..afdd9b8eefd 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_get.go +++ b/resource-manager/logic/2019-05-01/workflows/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowsClient) Get(ctx context.Context, id WorkflowId) (result GetOper var model Workflow result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup.go b/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup.go index 43d38d2f0da..a6d1b3f777d 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup.go +++ b/resource-manager/logic/2019-05-01/workflows/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflows/method_listbysubscription.go b/resource-manager/logic/2019-05-01/workflows/method_listbysubscription.go index d534ebe086b..ba93742aeff 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_listbysubscription.go +++ b/resource-manager/logic/2019-05-01/workflows/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl.go b/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl.go index ec6ebc52212..c9be2ecc554 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl.go +++ b/resource-manager/logic/2019-05-01/workflows/method_listcallbackurl.go @@ -50,7 +50,6 @@ func (c WorkflowsClient) ListCallbackUrl(ctx context.Context, id WorkflowId, inp var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/method_listswagger.go b/resource-manager/logic/2019-05-01/workflows/method_listswagger.go index fb561ce8595..7f6954ed4e8 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_listswagger.go +++ b/resource-manager/logic/2019-05-01/workflows/method_listswagger.go @@ -46,7 +46,6 @@ func (c WorkflowsClient) ListSwagger(ctx context.Context, id WorkflowId) (result var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/method_update.go b/resource-manager/logic/2019-05-01/workflows/method_update.go index 31fb40d8bb8..f1dcbefdda0 100644 --- a/resource-manager/logic/2019-05-01/workflows/method_update.go +++ b/resource-manager/logic/2019-05-01/workflows/method_update.go @@ -45,7 +45,6 @@ func (c WorkflowsClient) Update(ctx context.Context, id WorkflowId) (result Upda var model Workflow result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflows/version.go b/resource-manager/logic/2019-05-01/workflows/version.go index 8658baf6a6f..c99f54193d9 100644 --- a/resource-manager/logic/2019-05-01/workflows/version.go +++ b/resource-manager/logic/2019-05-01/workflows/version.go @@ -1,12 +1,10 @@ package workflows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflows/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/README.md b/resource-manager/logic/2019-05-01/workflowtriggerhistories/README.md index 4ebcdd21cb6..c9a7edffdd0 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/README.md +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggerhistories` Documentation -The `workflowtriggerhistories` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowtriggerhistories` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/client.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/client.go index fc4b05de0ba..e1a3815134e 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/client.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/client.go @@ -15,7 +15,7 @@ type WorkflowTriggerHistoriesClient struct { } func NewWorkflowTriggerHistoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggerHistoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggerHistoriesClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_history.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_history.go index abe437fa018..a1a0484912e 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_history.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_history.go @@ -46,7 +46,7 @@ func ParseHistoryID(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHistoryIDInsensitively(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_trigger.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_trigger.go index d960be4ae5c..b585d2a5827 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_trigger.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_get.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_get.go index ffbdc2ff209..de28b957be8 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggerHistoriesClient) Get(ctx context.Context, id HistoryId) ( var model WorkflowTriggerHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_list.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_list.go index 9737ffdb68c..fa03f7faa25 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_list.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflowtriggerhistories/version.go b/resource-manager/logic/2019-05-01/workflowtriggerhistories/version.go index 7774ac794c1..23989ab0966 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggerhistories/version.go +++ b/resource-manager/logic/2019-05-01/workflowtriggerhistories/version.go @@ -1,12 +1,10 @@ package workflowtriggerhistories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggerhistories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggerhistories/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/README.md b/resource-manager/logic/2019-05-01/workflowtriggers/README.md index 55f3a38ed7a..5ea96d24939 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/README.md +++ b/resource-manager/logic/2019-05-01/workflowtriggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowtriggers` Documentation -The `workflowtriggers` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowtriggers` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/client.go b/resource-manager/logic/2019-05-01/workflowtriggers/client.go index 4788e395649..06e7b704ecf 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/client.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/client.go @@ -15,7 +15,7 @@ type WorkflowTriggersClient struct { } func NewWorkflowTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggersClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go b/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go index 9b2ee479a9c..89c9b7c3e2e 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/id_trigger.go @@ -44,7 +44,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go b/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go index 6c465d5d4d2..572c169fc2d 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/id_versiontrigger.go @@ -46,7 +46,7 @@ func ParseVersionTriggerID(input string) (*VersionTriggerId, error) { } id := VersionTriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionTriggerIDInsensitively(input string) (*VersionTriggerId, error) } id := VersionTriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go b/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go index 602e6fb8b54..363eddab1a2 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/id_workflow.go @@ -42,7 +42,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/method_get.go b/resource-manager/logic/2019-05-01/workflowtriggers/method_get.go index 6ff7e339030..d1bcd504fe2 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggersClient) Get(ctx context.Context, id TriggerId) (result G var model WorkflowTrigger result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson.go b/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson.go index 286934bd0ea..c26d831b302 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/method_getschemajson.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) GetSchemaJson(ctx context.Context, id TriggerId) var model JsonSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/method_list.go b/resource-manager/logic/2019-05-01/workflowtriggers/method_list.go index 2f71990641a..cdc29470c81 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/method_list.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl.go b/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl.go index 5f6d581c207..7e44f7f9763 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/method_listcallbackurl.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) ListCallbackUrl(ctx context.Context, id TriggerI var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl.go b/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl.go index 29e2c612da8..2405dbab3c5 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/method_workflowversiontriggerslistcallbackurl.go @@ -50,7 +50,6 @@ func (c WorkflowTriggersClient) WorkflowVersionTriggersListCallbackUrl(ctx conte var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowtriggers/version.go b/resource-manager/logic/2019-05-01/workflowtriggers/version.go index 1045dd9e474..d9e4d233a2f 100644 --- a/resource-manager/logic/2019-05-01/workflowtriggers/version.go +++ b/resource-manager/logic/2019-05-01/workflowtriggers/version.go @@ -1,12 +1,10 @@ package workflowtriggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggers/2019-05-01" } diff --git a/resource-manager/logic/2019-05-01/workflowversions/README.md b/resource-manager/logic/2019-05-01/workflowversions/README.md index f54f3c754a0..0b9a4b3b770 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/README.md +++ b/resource-manager/logic/2019-05-01/workflowversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowversions` Documentation -The `workflowversions` SDK allows for interaction with the Azure Resource Manager Service `logic` (API Version `2019-05-01`). +The `workflowversions` SDK allows for interaction with Azure Resource Manager `logic` (API Version `2019-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logic/2019-05-01/workflowversions/client.go b/resource-manager/logic/2019-05-01/workflowversions/client.go index 8a0b4fbb7be..b569325e0f3 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/client.go +++ b/resource-manager/logic/2019-05-01/workflowversions/client.go @@ -15,7 +15,7 @@ type WorkflowVersionsClient struct { } func NewWorkflowVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowVersionsClient: %+v", err) } diff --git a/resource-manager/logic/2019-05-01/workflowversions/id_version.go b/resource-manager/logic/2019-05-01/workflowversions/id_version.go index 5d1c8d82bd2..cf384c8aab8 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/id_version.go +++ b/resource-manager/logic/2019-05-01/workflowversions/id_version.go @@ -44,7 +44,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowversions/id_workflow.go b/resource-manager/logic/2019-05-01/workflowversions/id_workflow.go index 95f2af810ad..e18a02c5883 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/id_workflow.go +++ b/resource-manager/logic/2019-05-01/workflowversions/id_workflow.go @@ -42,7 +42,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logic/2019-05-01/workflowversions/method_get.go b/resource-manager/logic/2019-05-01/workflowversions/method_get.go index f0742aafdc1..f2ae2ecca09 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/method_get.go +++ b/resource-manager/logic/2019-05-01/workflowversions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowVersionsClient) Get(ctx context.Context, id VersionId) (result G var model WorkflowVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logic/2019-05-01/workflowversions/method_list.go b/resource-manager/logic/2019-05-01/workflowversions/method_list.go index 61db4a175cc..d028a04c71f 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/method_list.go +++ b/resource-manager/logic/2019-05-01/workflowversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/logic/2019-05-01/workflowversions/version.go b/resource-manager/logic/2019-05-01/workflowversions/version.go index 8cb3f33e0ef..e5c2f59aba7 100644 --- a/resource-manager/logic/2019-05-01/workflowversions/version.go +++ b/resource-manager/logic/2019-05-01/workflowversions/version.go @@ -1,12 +1,10 @@ package workflowversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowversions/2019-05-01" } diff --git a/resource-manager/logz/2020-10-01/monitors/README.md b/resource-manager/logz/2020-10-01/monitors/README.md index e856ffb42e4..3894a3e221e 100644 --- a/resource-manager/logz/2020-10-01/monitors/README.md +++ b/resource-manager/logz/2020-10-01/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). +The `monitors` SDK allows for interaction with Azure Resource Manager `logz` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logz/2020-10-01/monitors/client.go b/resource-manager/logz/2020-10-01/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/logz/2020-10-01/monitors/client.go +++ b/resource-manager/logz/2020-10-01/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/logz/2020-10-01/monitors/id_monitor.go b/resource-manager/logz/2020-10-01/monitors/id_monitor.go index 8df6cb2ed07..1e117d0d8ce 100644 --- a/resource-manager/logz/2020-10-01/monitors/id_monitor.go +++ b/resource-manager/logz/2020-10-01/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/monitors/method_get.go b/resource-manager/logz/2020-10-01/monitors/method_get.go index 1f62fb9716b..c0d0afd93e9 100644 --- a/resource-manager/logz/2020-10-01/monitors/method_get.go +++ b/resource-manager/logz/2020-10-01/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model LogzMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/monitors/method_update.go b/resource-manager/logz/2020-10-01/monitors/method_update.go index 3260f929156..704c04585b8 100644 --- a/resource-manager/logz/2020-10-01/monitors/method_update.go +++ b/resource-manager/logz/2020-10-01/monitors/method_update.go @@ -49,7 +49,6 @@ func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input LogzMoni var model LogzMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/monitors/version.go b/resource-manager/logz/2020-10-01/monitors/version.go index af69260d836..ee2f682b80a 100644 --- a/resource-manager/logz/2020-10-01/monitors/version.go +++ b/resource-manager/logz/2020-10-01/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2020-10-01" } diff --git a/resource-manager/logz/2020-10-01/singlesignon/README.md b/resource-manager/logz/2020-10-01/singlesignon/README.md index ef9ec16a1a3..105f6f42f5c 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/README.md +++ b/resource-manager/logz/2020-10-01/singlesignon/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/singlesignon` Documentation -The `singlesignon` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). +The `singlesignon` SDK allows for interaction with Azure Resource Manager `logz` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logz/2020-10-01/singlesignon/client.go b/resource-manager/logz/2020-10-01/singlesignon/client.go index 8ea820a6e37..7e124666990 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/client.go +++ b/resource-manager/logz/2020-10-01/singlesignon/client.go @@ -15,7 +15,7 @@ type SingleSignOnClient struct { } func NewSingleSignOnClientWithBaseURI(sdkApi sdkEnv.Api) (*SingleSignOnClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "singlesignon", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "singlesignon", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SingleSignOnClient: %+v", err) } diff --git a/resource-manager/logz/2020-10-01/singlesignon/id_monitor.go b/resource-manager/logz/2020-10-01/singlesignon/id_monitor.go index 37bb5e2e407..437e93bf767 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/id_monitor.go +++ b/resource-manager/logz/2020-10-01/singlesignon/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/singlesignon/id_singlesignonconfiguration.go b/resource-manager/logz/2020-10-01/singlesignon/id_singlesignonconfiguration.go index 646436819d4..52ec2b17a85 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/id_singlesignonconfiguration.go +++ b/resource-manager/logz/2020-10-01/singlesignon/id_singlesignonconfiguration.go @@ -44,7 +44,7 @@ func ParseSingleSignOnConfigurationID(input string) (*SingleSignOnConfigurationI } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSingleSignOnConfigurationIDInsensitively(input string) (*SingleSignOnC } id := SingleSignOnConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/singlesignon/method_get.go b/resource-manager/logz/2020-10-01/singlesignon/method_get.go index 8421d638bd9..693f1c8ad4d 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/method_get.go +++ b/resource-manager/logz/2020-10-01/singlesignon/method_get.go @@ -45,7 +45,6 @@ func (c SingleSignOnClient) Get(ctx context.Context, id SingleSignOnConfiguratio var model LogzSingleSignOnResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/singlesignon/version.go b/resource-manager/logz/2020-10-01/singlesignon/version.go index 9df48245027..997667701c9 100644 --- a/resource-manager/logz/2020-10-01/singlesignon/version.go +++ b/resource-manager/logz/2020-10-01/singlesignon/version.go @@ -1,12 +1,10 @@ package singlesignon -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/singlesignon/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/singlesignon/2020-10-01" } diff --git a/resource-manager/logz/2020-10-01/subaccount/README.md b/resource-manager/logz/2020-10-01/subaccount/README.md index 4fbef2743e3..1e6cc586ab7 100644 --- a/resource-manager/logz/2020-10-01/subaccount/README.md +++ b/resource-manager/logz/2020-10-01/subaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount` Documentation -The `subaccount` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). +The `subaccount` SDK allows for interaction with Azure Resource Manager `logz` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logz/2020-10-01/subaccount/client.go b/resource-manager/logz/2020-10-01/subaccount/client.go index 3d3807e5b0b..ac3d0c57052 100644 --- a/resource-manager/logz/2020-10-01/subaccount/client.go +++ b/resource-manager/logz/2020-10-01/subaccount/client.go @@ -15,7 +15,7 @@ type SubAccountClient struct { } func NewSubAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*SubAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubAccountClient: %+v", err) } diff --git a/resource-manager/logz/2020-10-01/subaccount/id_account.go b/resource-manager/logz/2020-10-01/subaccount/id_account.go index 2183d3b07e9..d4dc6ad3efd 100644 --- a/resource-manager/logz/2020-10-01/subaccount/id_account.go +++ b/resource-manager/logz/2020-10-01/subaccount/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/subaccount/id_monitor.go b/resource-manager/logz/2020-10-01/subaccount/id_monitor.go index dea48a125b1..46cc10a9e48 100644 --- a/resource-manager/logz/2020-10-01/subaccount/id_monitor.go +++ b/resource-manager/logz/2020-10-01/subaccount/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/subaccount/method_get.go b/resource-manager/logz/2020-10-01/subaccount/method_get.go index 3b13cf66542..c8bce5d37b1 100644 --- a/resource-manager/logz/2020-10-01/subaccount/method_get.go +++ b/resource-manager/logz/2020-10-01/subaccount/method_get.go @@ -45,7 +45,6 @@ func (c SubAccountClient) Get(ctx context.Context, id AccountId) (result GetOper var model LogzMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/subaccount/method_update.go b/resource-manager/logz/2020-10-01/subaccount/method_update.go index a019c857ff2..311bc71ead9 100644 --- a/resource-manager/logz/2020-10-01/subaccount/method_update.go +++ b/resource-manager/logz/2020-10-01/subaccount/method_update.go @@ -49,7 +49,6 @@ func (c SubAccountClient) Update(ctx context.Context, id AccountId, input LogzMo var model LogzMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/subaccount/version.go b/resource-manager/logz/2020-10-01/subaccount/version.go index d5ba40446d0..665cebb59e4 100644 --- a/resource-manager/logz/2020-10-01/subaccount/version.go +++ b/resource-manager/logz/2020-10-01/subaccount/version.go @@ -1,12 +1,10 @@ package subaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subaccount/2020-10-01" } diff --git a/resource-manager/logz/2020-10-01/tagrules/README.md b/resource-manager/logz/2020-10-01/tagrules/README.md index 3216eac35f8..78f4845233d 100644 --- a/resource-manager/logz/2020-10-01/tagrules/README.md +++ b/resource-manager/logz/2020-10-01/tagrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/tagrules` Documentation -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). +The `tagrules` SDK allows for interaction with Azure Resource Manager `logz` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logz/2020-10-01/tagrules/client.go b/resource-manager/logz/2020-10-01/tagrules/client.go index e35a62f3116..1353e3786ef 100644 --- a/resource-manager/logz/2020-10-01/tagrules/client.go +++ b/resource-manager/logz/2020-10-01/tagrules/client.go @@ -15,7 +15,7 @@ type TagRulesClient struct { } func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) } diff --git a/resource-manager/logz/2020-10-01/tagrules/id_account.go b/resource-manager/logz/2020-10-01/tagrules/id_account.go index b997e958b6f..85edaeb4bec 100644 --- a/resource-manager/logz/2020-10-01/tagrules/id_account.go +++ b/resource-manager/logz/2020-10-01/tagrules/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go b/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go index 4b9ee646d7b..8a82a7115d8 100644 --- a/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go +++ b/resource-manager/logz/2020-10-01/tagrules/id_accounttagrule.go @@ -46,7 +46,7 @@ func ParseAccountTagRuleID(input string) (*AccountTagRuleId, error) { } id := AccountTagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAccountTagRuleIDInsensitively(input string) (*AccountTagRuleId, error) } id := AccountTagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/tagrules/id_monitor.go b/resource-manager/logz/2020-10-01/tagrules/id_monitor.go index c74a094ad2f..0922f306dd3 100644 --- a/resource-manager/logz/2020-10-01/tagrules/id_monitor.go +++ b/resource-manager/logz/2020-10-01/tagrules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go b/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go index 8cba88a0a18..1f69713b421 100644 --- a/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go +++ b/resource-manager/logz/2020-10-01/tagrules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go b/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go index 7a148251af9..146b940122a 100644 --- a/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go +++ b/resource-manager/logz/2020-10-01/tagrules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TagRulesClient) CreateOrUpdate(ctx context.Context, id TagRuleId, input var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/tagrules/method_get.go b/resource-manager/logz/2020-10-01/tagrules/method_get.go index 5158a77a9ac..9906af3f453 100644 --- a/resource-manager/logz/2020-10-01/tagrules/method_get.go +++ b/resource-manager/logz/2020-10-01/tagrules/method_get.go @@ -45,7 +45,6 @@ func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperat var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go b/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go index 4231e4b6f67..3de8ad32941 100644 --- a/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go +++ b/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulescreateorupdate.go @@ -49,7 +49,6 @@ func (c TagRulesClient) SubAccountTagRulesCreateOrUpdate(ctx context.Context, id var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go b/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go index daa5e8f70ff..b94f6ec9a24 100644 --- a/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go +++ b/resource-manager/logz/2020-10-01/tagrules/method_subaccounttagrulesget.go @@ -45,7 +45,6 @@ func (c TagRulesClient) SubAccountTagRulesGet(ctx context.Context, id AccountTag var model MonitoringTagRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/tagrules/version.go b/resource-manager/logz/2020-10-01/tagrules/version.go index 9423ce7d16f..9dab22f6b6f 100644 --- a/resource-manager/logz/2020-10-01/tagrules/version.go +++ b/resource-manager/logz/2020-10-01/tagrules/version.go @@ -1,12 +1,10 @@ package tagrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagrules/2020-10-01" } diff --git a/resource-manager/logz/2020-10-01/vmhost/README.md b/resource-manager/logz/2020-10-01/vmhost/README.md index 1f6e5341a84..d3b19ee0369 100644 --- a/resource-manager/logz/2020-10-01/vmhost/README.md +++ b/resource-manager/logz/2020-10-01/vmhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/vmhost` Documentation -The `vmhost` SDK allows for interaction with the Azure Resource Manager Service `logz` (API Version `2020-10-01`). +The `vmhost` SDK allows for interaction with Azure Resource Manager `logz` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/logz/2020-10-01/vmhost/client.go b/resource-manager/logz/2020-10-01/vmhost/client.go index d8069d1b941..a84b784e309 100644 --- a/resource-manager/logz/2020-10-01/vmhost/client.go +++ b/resource-manager/logz/2020-10-01/vmhost/client.go @@ -15,7 +15,7 @@ type VMHostClient struct { } func NewVMHostClientWithBaseURI(sdkApi sdkEnv.Api) (*VMHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMHostClient: %+v", err) } diff --git a/resource-manager/logz/2020-10-01/vmhost/id_account.go b/resource-manager/logz/2020-10-01/vmhost/id_account.go index 6270f8f767b..a7976fe07b8 100644 --- a/resource-manager/logz/2020-10-01/vmhost/id_account.go +++ b/resource-manager/logz/2020-10-01/vmhost/id_account.go @@ -44,7 +44,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/vmhost/id_monitor.go b/resource-manager/logz/2020-10-01/vmhost/id_monitor.go index c22127ffb8c..da9bed85172 100644 --- a/resource-manager/logz/2020-10-01/vmhost/id_monitor.go +++ b/resource-manager/logz/2020-10-01/vmhost/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/logz/2020-10-01/vmhost/method_monitorvmhostpayload.go b/resource-manager/logz/2020-10-01/vmhost/method_monitorvmhostpayload.go index 1d68fd562bc..e9bf717e8bf 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_monitorvmhostpayload.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_monitorvmhostpayload.go @@ -46,7 +46,6 @@ func (c VMHostClient) MonitorVMHostPayload(ctx context.Context, id MonitorId) (r var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/vmhost/method_subaccountvmhostpayload.go b/resource-manager/logz/2020-10-01/vmhost/method_subaccountvmhostpayload.go index 5b248104347..d96691ee294 100644 --- a/resource-manager/logz/2020-10-01/vmhost/method_subaccountvmhostpayload.go +++ b/resource-manager/logz/2020-10-01/vmhost/method_subaccountvmhostpayload.go @@ -46,7 +46,6 @@ func (c VMHostClient) SubAccountVMHostPayload(ctx context.Context, id AccountId) var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/logz/2020-10-01/vmhost/version.go b/resource-manager/logz/2020-10-01/vmhost/version.go index 756f72a0961..e871abd0fb0 100644 --- a/resource-manager/logz/2020-10-01/vmhost/version.go +++ b/resource-manager/logz/2020-10-01/vmhost/version.go @@ -1,12 +1,10 @@ package vmhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmhost/2020-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/README.md b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/README.md index 4338d6fe6bd..3d68607badc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/batchdeployment` Documentation -The `batchdeployment` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `batchdeployment` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/client.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/client.go index 7dc98fd0a09..adcef61716d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/client.go @@ -15,7 +15,7 @@ type BatchDeploymentClient struct { } func NewBatchDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchDeploymentClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_batchendpoint.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_batchendpoint.go index 0da28c1f1d1..31fdbd42722 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_batchendpoint.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_batchendpoint.go @@ -44,7 +44,7 @@ func ParseBatchEndpointID(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBatchEndpointIDInsensitively(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_deployment.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_deployment.go index b8e888ae352..c5e60376be0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_deployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_get.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_get.go index 5fcf02fc12b..d1ccbe4ea9c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_get.go @@ -45,7 +45,6 @@ func (c BatchDeploymentClient) Get(ctx context.Context, id DeploymentId) (result var model BatchDeploymentTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_list.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_list.go index 507e05685a7..13f187a969e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_assetreferencebase.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_assetreferencebase.go index aca61d3adb1..e483ac07e3a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_assetreferencebase.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_assetreferencebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AssetReferenceBase interface { + AssetReferenceBase() BaseAssetReferenceBaseImpl } -// RawAssetReferenceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AssetReferenceBase = BaseAssetReferenceBaseImpl{} + +type BaseAssetReferenceBaseImpl struct { + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s BaseAssetReferenceBaseImpl) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return s +} + +var _ AssetReferenceBase = RawAssetReferenceBaseImpl{} + +// RawAssetReferenceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAssetReferenceBaseImpl struct { - Type string - Values map[string]interface{} + assetReferenceBase BaseAssetReferenceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAssetReferenceBaseImpl) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return s.assetReferenceBase } -func unmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase, error) { +func UnmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase return out, nil } - out := RawAssetReferenceBaseImpl{ - Type: value, - Values: temp, + var parent BaseAssetReferenceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAssetReferenceBaseImpl: %+v", err) } - return out, nil + + return RawAssetReferenceBaseImpl{ + assetReferenceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_batchdeployment.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_batchdeployment.go index c3fd5b23925..6e888302498 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_batchdeployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_batchdeployment.go @@ -58,7 +58,7 @@ func (s *BatchDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["model"]; ok { - impl, err := unmarshalAssetReferenceBaseImplementation(v) + impl, err := UnmarshalAssetReferenceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Model' for 'BatchDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_datapathassetreference.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_datapathassetreference.go index e78e7d339f7..5505b2d3050 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_datapathassetreference.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_datapathassetreference.go @@ -15,6 +15,14 @@ type DataPathAssetReference struct { Path *string `json:"path,omitempty"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s DataPathAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = DataPathAssetReference{} @@ -28,9 +36,10 @@ func (s DataPathAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataPathAssetReference: %+v", err) } + decoded["referenceType"] = "DataPath" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_idassetreference.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_idassetreference.go index 6439cc45245..7b61763dd5e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_idassetreference.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_idassetreference.go @@ -14,6 +14,14 @@ type IdAssetReference struct { AssetId string `json:"assetId"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s IdAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = IdAssetReference{} @@ -27,9 +35,10 @@ func (s IdAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IdAssetReference: %+v", err) } + decoded["referenceType"] = "Id" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_outputpathassetreference.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_outputpathassetreference.go index 38e93481022..df0f556e397 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_outputpathassetreference.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/model_outputpathassetreference.go @@ -15,6 +15,14 @@ type OutputPathAssetReference struct { Path *string `json:"path,omitempty"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s OutputPathAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = OutputPathAssetReference{} @@ -28,9 +36,10 @@ func (s OutputPathAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OutputPathAssetReference: %+v", err) } + decoded["referenceType"] = "OutputPath" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/version.go b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/version.go index 863addaee99..6b6621bbaa0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchdeployment/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchdeployment/version.go @@ -1,12 +1,10 @@ package batchdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchdeployment/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/README.md b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/README.md index 68c3f89612f..53e1e256857 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/batchendpoint` Documentation -The `batchendpoint` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `batchendpoint` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/client.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/client.go index 67f1c49668b..936dcc31960 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/client.go @@ -15,7 +15,7 @@ type BatchEndpointClient struct { } func NewBatchEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchEndpointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchendpoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchendpoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchEndpointClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_batchendpoint.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_batchendpoint.go index ee5f6294762..e447f954ead 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_batchendpoint.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_batchendpoint.go @@ -44,7 +44,7 @@ func ParseBatchEndpointID(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBatchEndpointIDInsensitively(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_workspace.go index c260816b77b..acecd2c9c38 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_get.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_get.go index ccf3c4ee73c..db6700bbc75 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_get.go @@ -45,7 +45,6 @@ func (c BatchEndpointClient) Get(ctx context.Context, id BatchEndpointId) (resul var model BatchEndpointTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_list.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_list.go index 15b32a57d30..5f8626cb8bd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_listkeys.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_listkeys.go index 2cab01bb631..1a1eec8dfdf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_listkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/method_listkeys.go @@ -46,7 +46,6 @@ func (c BatchEndpointClient) ListKeys(ctx context.Context, id BatchEndpointId) ( var model EndpointAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/version.go b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/version.go index 6dfa5d74733..073a2eb152e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/batchendpoint/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/batchendpoint/version.go @@ -1,12 +1,10 @@ package batchendpoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchendpoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchendpoint/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/codecontainer/README.md index 7c38931b1ef..eb63a6bbb0b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/codecontainer` Documentation -The `codecontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `codecontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/client.go index 5d68b14c91a..757f7bbcf04 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/client.go @@ -15,7 +15,7 @@ type CodeContainerClient struct { } func NewCodeContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*CodeContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "codecontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "codecontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CodeContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_code.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_code.go index 3307bad5114..64af8efa3cf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_code.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_code.go @@ -44,7 +44,7 @@ func ParseCodeID(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCodeIDInsensitively(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registry.go index 37ecab7c1c7..1e31e52fecb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registrycode.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registrycode.go index a2956920a30..64f5bf87ee5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registrycode.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_registrycode.go @@ -44,7 +44,7 @@ func ParseRegistryCodeID(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryCodeIDInsensitively(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_workspace.go index 8db448ef4cf..bcabd159ebe 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_createorupdate.go index ae25f5755d8..a97b022f8c3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CodeContainerClient) CreateOrUpdate(ctx context.Context, id CodeId, inpu var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_get.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_get.go index b3c2922eb2b..cb25a13fbab 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_get.go @@ -45,7 +45,6 @@ func (c CodeContainerClient) Get(ctx context.Context, id CodeId) (result GetOper var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_list.go index 171b99db5bc..b08f44167a0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainersget.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainersget.go index b48d3367ad3..e5b1cdadb5f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainersget.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainersget.go @@ -45,7 +45,6 @@ func (c CodeContainerClient) RegistryCodeContainersGet(ctx context.Context, id R var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainerslist.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainerslist.go index 5ff793b2303..9e0bbbd899f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainerslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/method_registrycodecontainerslist.go @@ -39,6 +39,7 @@ func (o RegistryCodeContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryCodeContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/codecontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/codecontainer/version.go index 62a156895e5..429b603bad3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codecontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/codecontainer/version.go @@ -1,12 +1,10 @@ package codecontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/codecontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/codecontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/README.md b/resource-manager/machinelearningservices/2023-10-01/codeversion/README.md index c096d4d415d..450ee07b52f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/codeversion` Documentation -The `codeversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `codeversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/client.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/client.go index 543dd48feb1..58bcd7357a9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/client.go @@ -15,7 +15,7 @@ type CodeVersionClient struct { } func NewCodeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*CodeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "codeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "codeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CodeVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_code.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_code.go index 36821e0ecf5..48e0eaa13e2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_code.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_code.go @@ -44,7 +44,7 @@ func ParseCodeID(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCodeIDInsensitively(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_codeversion.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_codeversion.go index b66d87c04b7..6348d37c078 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_codeversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_codeversion.go @@ -46,7 +46,7 @@ func ParseCodeVersionID(input string) (*CodeVersionId, error) { } id := CodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCodeVersionIDInsensitively(input string) (*CodeVersionId, error) { } id := CodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycode.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycode.go index c65761304bf..ee7ca76409a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycode.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycode.go @@ -44,7 +44,7 @@ func ParseRegistryCodeID(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryCodeIDInsensitively(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycodeversion.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycodeversion.go index 8f7b0202b8d..871e6dfed09 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycodeversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/id_registrycodeversion.go @@ -46,7 +46,7 @@ func ParseRegistryCodeVersionID(input string) (*RegistryCodeVersionId, error) { } id := RegistryCodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryCodeVersionIDInsensitively(input string) (*RegistryCodeVersion } id := RegistryCodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorgetstartpendingupload.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorgetstartpendingupload.go index b27d6f20e62..ea31f5b2347 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) CreateOrGetStartPendingUpload(ctx context.Context, id var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorupdate.go index cf50c683fae..f73034d818b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) CreateOrUpdate(ctx context.Context, id CodeVersionId, var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_get.go index a4fb85d8eb2..f74a36cf935 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_get.go @@ -45,7 +45,6 @@ func (c CodeVersionClient) Get(ctx context.Context, id CodeVersionId) (result Ge var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_list.go index 3fda420f5b3..19dc59168c3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go index 7e77f5954af..19f7d46f353 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) RegistryCodeVersionsCreateOrGetStartPendingUpload(ctx var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionsget.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionsget.go index 65f647e5767..146b07039b1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionsget.go @@ -45,7 +45,6 @@ func (c CodeVersionClient) RegistryCodeVersionsGet(ctx context.Context, id Regis var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionslist.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionslist.go index bc66ae6a1e0..c4f87bc666e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/method_registrycodeversionslist.go @@ -41,6 +41,7 @@ func (o RegistryCodeVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryCodeVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_blobreferenceforconsumptiondto.go index a736377bab9..6d933bb3864 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_pendinguploadcredentialdto.go index b138e06369f..f88859e76d0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_sascredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_sascredentialdto.go index 3876a92d93e..73cb2d470dc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/codeversion/version.go b/resource-manager/machinelearningservices/2023-10-01/codeversion/version.go index bce17309bc4..e10021d1b26 100644 --- a/resource-manager/machinelearningservices/2023-10-01/codeversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/codeversion/version.go @@ -1,12 +1,10 @@ package codeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/codeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/codeversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/README.md index 468a0582b16..3e19e7edf5c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/componentcontainer` Documentation -The `componentcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `componentcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/client.go index 6f330245767..85ab562d851 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/client.go @@ -15,7 +15,7 @@ type ComponentContainerClient struct { } func NewComponentContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_component.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_component.go index 913b5f7f86f..721dba46e3f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_component.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_component.go @@ -44,7 +44,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registry.go index 2edd2ec43b3..c7a5929dceb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registrycomponent.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registrycomponent.go index ce348024fea..f6e4c910557 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registrycomponent.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_registrycomponent.go @@ -44,7 +44,7 @@ func ParseRegistryComponentID(input string) (*RegistryComponentId, error) { } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryComponentIDInsensitively(input string) (*RegistryComponentId, } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_workspace.go index 704e379a263..ad19fe7ae41 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_createorupdate.go index a22b599184e..6915bf12224 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ComponentContainerClient) CreateOrUpdate(ctx context.Context, id Compone var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_get.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_get.go index 5ebf7d116ab..f056dd9aae9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_get.go @@ -45,7 +45,6 @@ func (c ComponentContainerClient) Get(ctx context.Context, id ComponentId) (resu var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_list.go index 8d05f37df2e..90eee5390bb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainersget.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainersget.go index 10a008aa322..08eefbe5bbe 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainersget.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainersget.go @@ -45,7 +45,6 @@ func (c ComponentContainerClient) RegistryComponentContainersGet(ctx context.Con var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainerslist.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainerslist.go index a806a3906f9..9b772c995eb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainerslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/method_registrycomponentcontainerslist.go @@ -39,6 +39,7 @@ func (o RegistryComponentContainersListOperationOptions) ToHeaders() *client.Hea func (o RegistryComponentContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/version.go index 4ac00010df7..8a2390770b7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentcontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentcontainer/version.go @@ -1,12 +1,10 @@ package componentcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentcontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/README.md b/resource-manager/machinelearningservices/2023-10-01/componentversion/README.md index 751cf7a63a3..b6c4b519865 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/componentversion` Documentation -The `componentversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `componentversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/client.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/client.go index 9a9f96c34b8..d989626c3d5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/client.go @@ -15,7 +15,7 @@ type ComponentVersionClient struct { } func NewComponentVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_component.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_component.go index 01d778cc782..dc8a80663ab 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_component.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_component.go @@ -44,7 +44,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_componentversion.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_componentversion.go index e51dda793a0..7d0d8f41995 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_componentversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_componentversion.go @@ -46,7 +46,7 @@ func ParseComponentVersionID(input string) (*ComponentVersionId, error) { } id := ComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseComponentVersionIDInsensitively(input string) (*ComponentVersionId, er } id := ComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponent.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponent.go index 6c7311c2f0c..1e545404ae7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponent.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponent.go @@ -44,7 +44,7 @@ func ParseRegistryComponentID(input string) (*RegistryComponentId, error) { } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryComponentIDInsensitively(input string) (*RegistryComponentId, } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponentversion.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponentversion.go index b983361d750..2bcc82618a9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponentversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/id_registrycomponentversion.go @@ -46,7 +46,7 @@ func ParseRegistryComponentVersionID(input string) (*RegistryComponentVersionId, } id := RegistryComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryComponentVersionIDInsensitively(input string) (*RegistryCompon } id := RegistryComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_createorupdate.go index 8c81dfe37c0..40712c7f514 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ComponentVersionClient) CreateOrUpdate(ctx context.Context, id Component var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_get.go index 48a3d37a1ff..c3f8eecf2c3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_get.go @@ -45,7 +45,6 @@ func (c ComponentVersionClient) Get(ctx context.Context, id ComponentVersionId) var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_list.go index 39ff348b6f7..b1266d0a918 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionsget.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionsget.go index 165ba881879..e9f102c4401 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionsget.go @@ -45,7 +45,6 @@ func (c ComponentVersionClient) RegistryComponentVersionsGet(ctx context.Context var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionslist.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionslist.go index 55fe1f0970a..30f0797105c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/method_registrycomponentversionslist.go @@ -41,6 +41,7 @@ func (o RegistryComponentVersionsListOperationOptions) ToHeaders() *client.Heade func (o RegistryComponentVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/componentversion/version.go b/resource-manager/machinelearningservices/2023-10-01/componentversion/version.go index 0d506853cf9..9e1cee92e43 100644 --- a/resource-manager/machinelearningservices/2023-10-01/componentversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/componentversion/version.go @@ -1,12 +1,10 @@ package componentversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/datacontainer/README.md index adb9a39c6d7..1ac73d4d5db 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datacontainer` Documentation -The `datacontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `datacontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/client.go index 25820f2b287..978372c4414 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/client.go @@ -15,7 +15,7 @@ type DataContainerClient struct { } func NewDataContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*DataContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspace.go index d2cd0083a09..3671dc88df1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspacedata.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspacedata.go index d749d00ee3b..4d76acd8bf0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspacedata.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/id_workspacedata.go @@ -44,7 +44,7 @@ func ParseWorkspaceDataID(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceDataIDInsensitively(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_createorupdate.go index daddb656105..8d250399361 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataContainerClient) CreateOrUpdate(ctx context.Context, id WorkspaceDat var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_get.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_get.go index 67c028af17d..0d9487bf2bb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_get.go @@ -45,7 +45,6 @@ func (c DataContainerClient) Get(ctx context.Context, id WorkspaceDataId) (resul var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_list.go index 4c058c3a3ee..b809b73aca1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/datacontainer/version.go index 3a9f505807a..4e64fc2ea75 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainer/version.go @@ -1,12 +1,10 @@ package datacontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/README.md b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/README.md index bd55c1e644a..01fe05e8693 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry` Documentation -The `datacontainerregistry` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `datacontainerregistry` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/client.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/client.go index 3f0c6452200..23805424218 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/client.go @@ -15,7 +15,7 @@ type DataContainerRegistryClient struct { } func NewDataContainerRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*DataContainerRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacontainerregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacontainerregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataContainerRegistryClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_data.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_data.go index a38d62895ed..cff6857d39b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_data.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_data.go @@ -44,7 +44,7 @@ func ParseDataID(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataIDInsensitively(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_registry.go index 7f2d29a3583..72beb95f30d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainersget.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainersget.go index 5c59ce343cf..94a16809760 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainersget.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainersget.go @@ -45,7 +45,6 @@ func (c DataContainerRegistryClient) RegistryDataContainersGet(ctx context.Conte var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainerslist.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainerslist.go index 9f82df7b90e..11a41c5965e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainerslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/method_registrydatacontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryDataContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryDataContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/version.go b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/version.go index e1df8ac0f0b..6290b0b123b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/datacontainerregistry/version.go @@ -1,12 +1,10 @@ package datacontainerregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacontainerregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacontainerregistry/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/README.md b/resource-manager/machinelearningservices/2023-10-01/datareference/README.md index 821665059fe..a0955de84b7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datareference` Documentation -The `datareference` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `datareference` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/client.go b/resource-manager/machinelearningservices/2023-10-01/datareference/client.go index e3d80f382dc..ad8c9e30ef4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/client.go @@ -15,7 +15,7 @@ type DataReferenceClient struct { } func NewDataReferenceClientWithBaseURI(sdkApi sdkEnv.Api) (*DataReferenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datareference", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datareference", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataReferenceClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/id_datareferenceversion.go b/resource-manager/machinelearningservices/2023-10-01/datareference/id_datareferenceversion.go index 2b3357a0be5..8ec0f09ddf6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/id_datareferenceversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/id_datareferenceversion.go @@ -46,7 +46,7 @@ func ParseDataReferenceVersionID(input string) (*DataReferenceVersionId, error) } id := DataReferenceVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataReferenceVersionIDInsensitively(input string) (*DataReferenceVersi } id := DataReferenceVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/method_registrydatareferencesgetblobreferencesas.go b/resource-manager/machinelearningservices/2023-10-01/datareference/method_registrydatareferencesgetblobreferencesas.go index de042020206..f43b79412a4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/method_registrydatareferencesgetblobreferencesas.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/method_registrydatareferencesgetblobreferencesas.go @@ -49,7 +49,6 @@ func (c DataReferenceClient) RegistryDataReferencesGetBlobReferenceSAS(ctx conte var model GetBlobReferenceSASResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_anonymousaccesscredential.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_anonymousaccesscredential.go index 18806a6484f..84df7d356c4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_anonymousaccesscredential.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_anonymousaccesscredential.go @@ -13,6 +13,14 @@ var _ DataReferenceCredential = AnonymousAccessCredential{} type AnonymousAccessCredential struct { // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s AnonymousAccessCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = AnonymousAccessCredential{} @@ -26,9 +34,10 @@ func (s AnonymousAccessCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnonymousAccessCredential: %+v", err) } + decoded["credentialType"] = "NoCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_datareferencecredential.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_datareferencecredential.go index ecde4403721..1dfaa379fd1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_datareferencecredential.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_datareferencecredential.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataReferenceCredential interface { + DataReferenceCredential() BaseDataReferenceCredentialImpl } -// RawDataReferenceCredentialImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataReferenceCredential = BaseDataReferenceCredentialImpl{} + +type BaseDataReferenceCredentialImpl struct { + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s BaseDataReferenceCredentialImpl) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return s +} + +var _ DataReferenceCredential = RawDataReferenceCredentialImpl{} + +// RawDataReferenceCredentialImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataReferenceCredentialImpl struct { - Type string - Values map[string]interface{} + dataReferenceCredential BaseDataReferenceCredentialImpl + Type string + Values map[string]interface{} +} + +func (s RawDataReferenceCredentialImpl) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return s.dataReferenceCredential } -func unmarshalDataReferenceCredentialImplementation(input []byte) (DataReferenceCredential, error) { +func UnmarshalDataReferenceCredentialImplementation(input []byte) (DataReferenceCredential, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalDataReferenceCredentialImplementation(input []byte) (DataReference return out, nil } - out := RawDataReferenceCredentialImpl{ - Type: value, - Values: temp, + var parent BaseDataReferenceCredentialImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataReferenceCredentialImpl: %+v", err) } - return out, nil + + return RawDataReferenceCredentialImpl{ + dataReferenceCredential: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_dockercredential.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_dockercredential.go index b2842e0708d..c479b6dc0f5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_dockercredential.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_dockercredential.go @@ -15,6 +15,14 @@ type DockerCredential struct { UserName *string `json:"userName,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s DockerCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = DockerCredential{} @@ -28,9 +36,10 @@ func (s DockerCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerCredential: %+v", err) } + decoded["credentialType"] = "DockerCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_getblobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_getblobreferenceforconsumptiondto.go index 11f99149f7d..3ff66d6aed6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_getblobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_getblobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *GetBlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalDataReferenceCredentialImplementation(v) + impl, err := UnmarshalDataReferenceCredentialImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'GetBlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_managedidentitycredential.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_managedidentitycredential.go index ca8d1da3cf5..2ecd6f3ddf8 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_managedidentitycredential.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_managedidentitycredential.go @@ -18,6 +18,14 @@ type ManagedIdentityCredential struct { UserManagedIdentityTenantId *string `json:"userManagedIdentityTenantId,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s ManagedIdentityCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = ManagedIdentityCredential{} @@ -31,9 +39,10 @@ func (s ManagedIdentityCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentityCredential: %+v", err) } + decoded["credentialType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/model_sascredential.go b/resource-manager/machinelearningservices/2023-10-01/datareference/model_sascredential.go index f8613ff0e65..ebd4229087b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/model_sascredential.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/model_sascredential.go @@ -14,6 +14,14 @@ type SASCredential struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s SASCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredential{} @@ -27,9 +35,10 @@ func (s SASCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredential: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datareference/version.go b/resource-manager/machinelearningservices/2023-10-01/datareference/version.go index 1dff7ba046a..19b6b185dc4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datareference/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/datareference/version.go @@ -1,12 +1,10 @@ package datareference -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datareference/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datareference/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/README.md b/resource-manager/machinelearningservices/2023-10-01/datastore/README.md index 3a043927e9c..0500aa5f5b9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/datastore` Documentation -The `datastore` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `datastore` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/client.go b/resource-manager/machinelearningservices/2023-10-01/datastore/client.go index 82a7c3741d5..41a7b1da167 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/client.go @@ -15,7 +15,7 @@ type DatastoreClient struct { } func NewDatastoreClientWithBaseURI(sdkApi sdkEnv.Api) (*DatastoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatastoreClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/id_datastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/id_datastore.go index 2f0d863f24e..ce7fa4e2b0f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/id_datastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/id_datastore.go @@ -44,7 +44,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/datastore/id_workspace.go index c2e3e005415..fb007cd7c42 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/datastore/method_createorupdate.go index 620d9f2e091..580889f1b17 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DatastoreClient) CreateOrUpdate(ctx context.Context, id DataStoreId, inp var model DatastoreResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/method_get.go b/resource-manager/machinelearningservices/2023-10-01/datastore/method_get.go index fa2299e3fbd..b3fa29358b5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/method_get.go @@ -45,7 +45,6 @@ func (c DatastoreClient) Get(ctx context.Context, id DataStoreId) (result GetOpe var model DatastoreResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/method_list.go b/resource-manager/machinelearningservices/2023-10-01/datastore/method_list.go index 3dd905b841e..878ab24a9c3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/method_listsecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/method_listsecrets.go index c4a296dcb14..c96fe852b1c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/method_listsecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/method_listsecrets.go @@ -16,7 +16,7 @@ import ( type ListSecretsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DatastoreSecrets + Model DatastoreSecrets } // ListSecrets ... @@ -49,11 +49,11 @@ func (c DatastoreClient) ListSecrets(ctx context.Context, id DataStoreId) (resul if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDatastoreSecretsImplementation(respObj) + model, err := UnmarshalDatastoreSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastorecredentials.go index 0540b7df9a6..9e67a483305 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastorecredentials.go @@ -14,6 +14,14 @@ type AccountKeyDatastoreCredentials struct { Secrets AccountKeyDatastoreSecrets `json:"secrets"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s AccountKeyDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = AccountKeyDatastoreCredentials{} @@ -27,9 +35,10 @@ func (s AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccountKeyDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "AccountKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastoresecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastoresecrets.go index c6cba7a7cff..d20d7b0b312 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastoresecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_accountkeydatastoresecrets.go @@ -14,6 +14,14 @@ type AccountKeyDatastoreSecrets struct { Key *string `json:"key,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s AccountKeyDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = AccountKeyDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccountKeyDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "AccountKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azureblobdatastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azureblobdatastore.go index 19b0a3d0060..a904e1e93db 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azureblobdatastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azureblobdatastore.go @@ -20,11 +20,24 @@ type AzureBlobDatastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureBlobDatastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureBlobDatastore{} @@ -38,9 +51,10 @@ func (s AzureBlobDatastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobDatastore: %+v", err) } + decoded["datastoreType"] = "AzureBlob" encoded, err = json.Marshal(decoded) @@ -62,6 +76,7 @@ func (s *AzureBlobDatastore) UnmarshalJSON(bytes []byte) error { s.AccountName = decoded.AccountName s.ContainerName = decoded.ContainerName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.IsDefault = decoded.IsDefault @@ -78,7 +93,7 @@ func (s *AzureBlobDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureBlobDatastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen1datastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen1datastore.go index c6a99481324..9b9e288752c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen1datastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen1datastore.go @@ -17,11 +17,24 @@ type AzureDataLakeGen1Datastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureDataLakeGen1Datastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureDataLakeGen1Datastore{} @@ -35,9 +48,10 @@ func (s AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeGen1Datastore: %+v", err) } + decoded["datastoreType"] = "AzureDataLakeGen1" encoded, err = json.Marshal(decoded) @@ -57,6 +71,7 @@ func (s *AzureDataLakeGen1Datastore) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureDataLakeGen1Datastore: %+v", err) } + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.IsDefault = decoded.IsDefault s.Properties = decoded.Properties @@ -72,7 +87,7 @@ func (s *AzureDataLakeGen1Datastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureDataLakeGen1Datastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen2datastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen2datastore.go index c96083e85ad..a0fcfbdee58 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen2datastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azuredatalakegen2datastore.go @@ -20,11 +20,24 @@ type AzureDataLakeGen2Datastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureDataLakeGen2Datastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureDataLakeGen2Datastore{} @@ -38,9 +51,10 @@ func (s AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeGen2Datastore: %+v", err) } + decoded["datastoreType"] = "AzureDataLakeGen2" encoded, err = json.Marshal(decoded) @@ -61,6 +75,7 @@ func (s *AzureDataLakeGen2Datastore) UnmarshalJSON(bytes []byte) error { } s.AccountName = decoded.AccountName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.Filesystem = decoded.Filesystem @@ -78,7 +93,7 @@ func (s *AzureDataLakeGen2Datastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureDataLakeGen2Datastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azurefiledatastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azurefiledatastore.go index 1ae68d03d25..8aebfe36293 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_azurefiledatastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_azurefiledatastore.go @@ -20,11 +20,24 @@ type AzureFileDatastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureFileDatastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureFileDatastore{} @@ -38,9 +51,10 @@ func (s AzureFileDatastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileDatastore: %+v", err) } + decoded["datastoreType"] = "AzureFile" encoded, err = json.Marshal(decoded) @@ -61,6 +75,7 @@ func (s *AzureFileDatastore) UnmarshalJSON(bytes []byte) error { } s.AccountName = decoded.AccountName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.FileShareName = decoded.FileShareName @@ -78,7 +93,7 @@ func (s *AzureFileDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureFileDatastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastorecredentials.go index a0f735f5c43..1ebce41484c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastorecredentials.go @@ -19,6 +19,14 @@ type CertificateDatastoreCredentials struct { Thumbprint string `json:"thumbprint"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s CertificateDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = CertificateDatastoreCredentials{} @@ -32,9 +40,10 @@ func (s CertificateDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CertificateDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "Certificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastoresecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastoresecrets.go index d56034ae15c..46a603c5fb1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastoresecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_certificatedatastoresecrets.go @@ -14,6 +14,14 @@ type CertificateDatastoreSecrets struct { Certificate *string `json:"certificate,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s CertificateDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = CertificateDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s CertificateDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CertificateDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "Certificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastore.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastore.go index 776b2b0a745..7caef5fc1a2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastore.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastore.go @@ -10,18 +10,70 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Datastore interface { + Datastore() BaseDatastoreImpl } -// RawDatastoreImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Datastore = BaseDatastoreImpl{} + +type BaseDatastoreImpl struct { + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDatastoreImpl) Datastore() BaseDatastoreImpl { + return s +} + +var _ Datastore = RawDatastoreImpl{} + +// RawDatastoreImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreImpl struct { - Type string - Values map[string]interface{} + datastore BaseDatastoreImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreImpl) Datastore() BaseDatastoreImpl { + return s.datastore } -func unmarshalDatastoreImplementation(input []byte) (Datastore, error) { +var _ json.Unmarshaler = &BaseDatastoreImpl{} + +func (s *BaseDatastoreImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseDatastoreImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseDatastoreImpl: %+v", err) + } + + s.DatastoreType = decoded.DatastoreType + s.Description = decoded.Description + s.IsDefault = decoded.IsDefault + s.Properties = decoded.Properties + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseDatastoreImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["credentials"]; ok { + impl, err := UnmarshalDatastoreCredentialsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Credentials' for 'BaseDatastoreImpl': %+v", err) + } + s.Credentials = impl + } + return nil +} + +func UnmarshalDatastoreImplementation(input []byte) (Datastore, error) { if input == nil { return nil, nil } @@ -68,10 +120,15 @@ func unmarshalDatastoreImplementation(input []byte) (Datastore, error) { return out, nil } - out := RawDatastoreImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreImpl: %+v", err) } - return out, nil + + return RawDatastoreImpl{ + datastore: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastorecredentials.go index 06a4bb3f51b..34082f29cf5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastorecredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatastoreCredentials interface { + DatastoreCredentials() BaseDatastoreCredentialsImpl } -// RawDatastoreCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatastoreCredentials = BaseDatastoreCredentialsImpl{} + +type BaseDatastoreCredentialsImpl struct { + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s BaseDatastoreCredentialsImpl) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return s +} + +var _ DatastoreCredentials = RawDatastoreCredentialsImpl{} + +// RawDatastoreCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreCredentialsImpl struct { - Type string - Values map[string]interface{} + datastoreCredentials BaseDatastoreCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreCredentialsImpl) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return s.datastoreCredentials } -func unmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredentials, error) { +func UnmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredentials, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredent return out, nil } - out := RawDatastoreCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreCredentialsImpl: %+v", err) } - return out, nil + + return RawDatastoreCredentialsImpl{ + datastoreCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoreresource.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoreresource.go index 31ea1d51fe7..b943a8249c1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoreresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoreresource.go @@ -38,7 +38,7 @@ func (s *DatastoreResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDatastoreImplementation(v) + impl, err := UnmarshalDatastoreImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DatastoreResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoresecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoresecrets.go index 117ac723e8c..0cb6053a808 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoresecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_datastoresecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatastoreSecrets interface { + DatastoreSecrets() BaseDatastoreSecretsImpl } -// RawDatastoreSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatastoreSecrets = BaseDatastoreSecretsImpl{} + +type BaseDatastoreSecretsImpl struct { + SecretsType SecretsType `json:"secretsType"` +} + +func (s BaseDatastoreSecretsImpl) DatastoreSecrets() BaseDatastoreSecretsImpl { + return s +} + +var _ DatastoreSecrets = RawDatastoreSecretsImpl{} + +// RawDatastoreSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreSecretsImpl struct { - Type string - Values map[string]interface{} + datastoreSecrets BaseDatastoreSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreSecretsImpl) DatastoreSecrets() BaseDatastoreSecretsImpl { + return s.datastoreSecrets } -func unmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, error) { +func UnmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, er return out, nil } - out := RawDatastoreSecretsImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreSecretsImpl: %+v", err) } - return out, nil + + return RawDatastoreSecretsImpl{ + datastoreSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_nonedatastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_nonedatastorecredentials.go index 26499e05a90..91781358c66 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_nonedatastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_nonedatastorecredentials.go @@ -13,6 +13,14 @@ var _ DatastoreCredentials = NoneDatastoreCredentials{} type NoneDatastoreCredentials struct { // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s NoneDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = NoneDatastoreCredentials{} @@ -26,9 +34,10 @@ func (s NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NoneDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "None" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastorecredentials.go index 59e2e476fba..a2ddc25f4b7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastorecredentials.go @@ -14,6 +14,14 @@ type SasDatastoreCredentials struct { Secrets SasDatastoreSecrets `json:"secrets"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s SasDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = SasDatastoreCredentials{} @@ -27,9 +35,10 @@ func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SasDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "Sas" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastoresecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastoresecrets.go index f99c98f8371..bf5cac042a7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastoresecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_sasdatastoresecrets.go @@ -14,6 +14,14 @@ type SasDatastoreSecrets struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s SasDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = SasDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SasDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "Sas" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastorecredentials.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastorecredentials.go index 2872119cccb..1e38e43f119 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastorecredentials.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastorecredentials.go @@ -18,6 +18,14 @@ type ServicePrincipalDatastoreCredentials struct { TenantId string `json:"tenantId"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s ServicePrincipalDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = ServicePrincipalDatastoreCredentials{} @@ -31,9 +39,10 @@ func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastoresecrets.go b/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastoresecrets.go index d2466b0f1da..e7767ab1806 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastoresecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/model_serviceprincipaldatastoresecrets.go @@ -14,6 +14,14 @@ type ServicePrincipalDatastoreSecrets struct { ClientSecret *string `json:"clientSecret,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s ServicePrincipalDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = ServicePrincipalDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/datastore/version.go b/resource-manager/machinelearningservices/2023-10-01/datastore/version.go index 1c5a9a2baa2..c53c6aaf51f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/datastore/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/datastore/version.go @@ -1,12 +1,10 @@ package datastore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastore/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/README.md b/resource-manager/machinelearningservices/2023-10-01/dataversion/README.md index 02944618541..9abac763660 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/dataversion` Documentation -The `dataversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `dataversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/client.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/client.go index b3272c54478..5378de1013a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/client.go @@ -15,7 +15,7 @@ type DataVersionClient struct { } func NewDataVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*DataVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/id_dataversion.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/id_dataversion.go index a83bcd0aa53..d8043e75b4c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/id_dataversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/id_dataversion.go @@ -46,7 +46,7 @@ func ParseDataVersionID(input string) (*DataVersionId, error) { } id := DataVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataVersionIDInsensitively(input string) (*DataVersionId, error) { } id := DataVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/id_workspacedata.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/id_workspacedata.go index 71c3320e631..759159d5218 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/id_workspacedata.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/id_workspacedata.go @@ -44,7 +44,7 @@ func ParseWorkspaceDataID(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceDataIDInsensitively(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_createorupdate.go index 57aeefe10c0..8cf62264d10 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataVersionClient) CreateOrUpdate(ctx context.Context, id DataVersionId, var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_get.go index 57b6b56c01c..696acdfeeb4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_get.go @@ -45,7 +45,6 @@ func (c DataVersionClient) Get(ctx context.Context, id DataVersionId) (result Ge var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_list.go index 71a60e93186..1533244b108 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbase.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbase.go index fa8d822ad29..48b2d161d99 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbase.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataVersionBase interface { + DataVersionBase() BaseDataVersionBaseImpl } -// RawDataVersionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataVersionBase = BaseDataVersionBaseImpl{} + +type BaseDataVersionBaseImpl struct { + DataType DataType `json:"dataType"` + DataUri string `json:"dataUri"` + Description *string `json:"description,omitempty"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + IsArchived *bool `json:"isArchived,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s +} + +var _ DataVersionBase = RawDataVersionBaseImpl{} + +// RawDataVersionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataVersionBaseImpl struct { - Type string - Values map[string]interface{} + dataVersionBase BaseDataVersionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s.dataVersionBase } -func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { +func UnmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, erro return out, nil } - out := RawDataVersionBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataVersionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataVersionBaseImpl: %+v", err) } - return out, nil + + return RawDataVersionBaseImpl{ + dataVersionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbaseresource.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbaseresource.go index 82c107d3d91..18288dc9bab 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbaseresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_dataversionbaseresource.go @@ -38,7 +38,7 @@ func (s *DataVersionBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataVersionBaseImplementation(v) + impl, err := UnmarshalDataVersionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataVersionBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_mltabledata.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_mltabledata.go index d1e99d11fde..0e5c16ecd56 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_mltabledata.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_mltabledata.go @@ -14,6 +14,8 @@ type MLTableData struct { ReferencedUris *[]string `json:"referencedUris,omitempty"` // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -22,6 +24,18 @@ type MLTableData struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s MLTableData) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = MLTableData{} func (s MLTableData) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MLTableData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableData: %+v", err) } + decoded["dataType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifiledataversion.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifiledataversion.go index e8162aec82f..d409ed0dfa5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifiledataversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifiledataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFileDataVersion{} type UriFileDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFileDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFileDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFileDataVersion{} func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileDataVersion: %+v", err) } + decoded["dataType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifolderdataversion.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifolderdataversion.go index e0c1569d731..60dd9f4d067 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifolderdataversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/model_urifolderdataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFolderDataVersion{} type UriFolderDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFolderDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFolderDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFolderDataVersion{} func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderDataVersion: %+v", err) } + decoded["dataType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversion/version.go b/resource-manager/machinelearningservices/2023-10-01/dataversion/version.go index 0d0173b5d85..b1f3d358d3a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversion/version.go @@ -1,12 +1,10 @@ package dataversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/README.md b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/README.md index 9bc351d8c49..0cec32ffe8e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/dataversionregistry` Documentation -The `dataversionregistry` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `dataversionregistry` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/client.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/client.go index c6b44d23be9..b4352712d79 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/client.go @@ -15,7 +15,7 @@ type DataVersionRegistryClient struct { } func NewDataVersionRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*DataVersionRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataversionregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataversionregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataVersionRegistryClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_data.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_data.go index 5ddca6947d4..21cd591baf1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_data.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_data.go @@ -44,7 +44,7 @@ func ParseDataID(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataIDInsensitively(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_version.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_version.go index cc04868472a..95b56211a6a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_version.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go index ad7c181f3ea..3bf75f7684d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c DataVersionRegistryClient) RegistryDataVersionsCreateOrGetStartPendingUp var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionsget.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionsget.go index d640885e6b5..3ab0a0c3513 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionsget.go @@ -45,7 +45,6 @@ func (c DataVersionRegistryClient) RegistryDataVersionsGet(ctx context.Context, var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionslist.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionslist.go index deb795c0a18..e49f7321eb1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/method_registrydataversionslist.go @@ -43,6 +43,7 @@ func (o RegistryDataVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryDataVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_blobreferenceforconsumptiondto.go index 1079d2aa653..bb536f58a44 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbase.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbase.go index bb6285415d5..dddac0f2484 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbase.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataVersionBase interface { + DataVersionBase() BaseDataVersionBaseImpl } -// RawDataVersionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataVersionBase = BaseDataVersionBaseImpl{} + +type BaseDataVersionBaseImpl struct { + DataType DataType `json:"dataType"` + DataUri string `json:"dataUri"` + Description *string `json:"description,omitempty"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + IsArchived *bool `json:"isArchived,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s +} + +var _ DataVersionBase = RawDataVersionBaseImpl{} + +// RawDataVersionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataVersionBaseImpl struct { - Type string - Values map[string]interface{} + dataVersionBase BaseDataVersionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s.dataVersionBase } -func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { +func UnmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, erro return out, nil } - out := RawDataVersionBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataVersionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataVersionBaseImpl: %+v", err) } - return out, nil + + return RawDataVersionBaseImpl{ + dataVersionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbaseresource.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbaseresource.go index 2d1c4451aa8..614ae597521 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbaseresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_dataversionbaseresource.go @@ -38,7 +38,7 @@ func (s *DataVersionBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataVersionBaseImplementation(v) + impl, err := UnmarshalDataVersionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataVersionBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_mltabledata.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_mltabledata.go index f2201a9945f..7bb306b22da 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_mltabledata.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_mltabledata.go @@ -14,6 +14,8 @@ type MLTableData struct { ReferencedUris *[]string `json:"referencedUris,omitempty"` // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -22,6 +24,18 @@ type MLTableData struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s MLTableData) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = MLTableData{} func (s MLTableData) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MLTableData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableData: %+v", err) } + decoded["dataType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_pendinguploadcredentialdto.go index a57b6fde325..32c184dba40 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_sascredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_sascredentialdto.go index f0743579eca..8b4b52be918 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifiledataversion.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifiledataversion.go index 3c5aa2bcb23..d1b56bc10c4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifiledataversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifiledataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFileDataVersion{} type UriFileDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFileDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFileDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFileDataVersion{} func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileDataVersion: %+v", err) } + decoded["dataType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifolderdataversion.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifolderdataversion.go index 67823e91b7a..63814cf2f54 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifolderdataversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/model_urifolderdataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFolderDataVersion{} type UriFolderDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFolderDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFolderDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFolderDataVersion{} func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderDataVersion: %+v", err) } + decoded["dataType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/version.go b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/version.go index d509e1e244d..cf2d662e2a0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/dataversionregistry/version.go @@ -1,12 +1,10 @@ package dataversionregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataversionregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataversionregistry/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/README.md index d5a5ea325a3..e356ee6f65c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/environmentcontainer` Documentation -The `environmentcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `environmentcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/client.go index 18f449084a5..c93ae001da9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/client.go @@ -15,7 +15,7 @@ type EnvironmentContainerClient struct { } func NewEnvironmentContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmentcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmentcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_environment.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_environment.go index c209781cb38..2df98940af3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_environment.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_environment.go @@ -44,7 +44,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registry.go index beab0d00d98..0ed9413b704 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registryenvironment.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registryenvironment.go index d00f274efed..8f9f3ec7e1f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registryenvironment.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_registryenvironment.go @@ -44,7 +44,7 @@ func ParseRegistryEnvironmentID(input string) (*RegistryEnvironmentId, error) { } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryEnvironmentIDInsensitively(input string) (*RegistryEnvironment } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_workspace.go index f3d11feb097..18e40abc6d4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_createorupdate.go index a6a2c5fe9d3..3c60b94267a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentContainerClient) CreateOrUpdate(ctx context.Context, id Envir var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_get.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_get.go index 66fbbc76cc7..d8ef1c6600c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentContainerClient) Get(ctx context.Context, id EnvironmentId) ( var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_list.go index 6356874c795..9c37a1f7173 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainersget.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainersget.go index 8b699d8f167..718666f0727 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainersget.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainersget.go @@ -45,7 +45,6 @@ func (c EnvironmentContainerClient) RegistryEnvironmentContainersGet(ctx context var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainerslist.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainerslist.go index 60bfbabcae8..16fe9c75ece 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainerslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/method_registryenvironmentcontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryEnvironmentContainersListOperationOptions) ToHeaders() *client.H func (o RegistryEnvironmentContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/version.go index 2bc363297e7..1c987c01dce 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentcontainer/version.go @@ -1,12 +1,10 @@ package environmentcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmentcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmentcontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/README.md b/resource-manager/machinelearningservices/2023-10-01/environmentversion/README.md index 19e76183e9f..6d7f02548ed 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/environmentversion` Documentation -The `environmentversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `environmentversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/client.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/client.go index 29b0fc2ff6b..5d10a29049b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/client.go @@ -15,7 +15,7 @@ type EnvironmentVersionClient struct { } func NewEnvironmentVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmentversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmentversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environment.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environment.go index f0ff2b0246b..b2ff36a89d5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environment.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environment.go @@ -44,7 +44,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environmentversion.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environmentversion.go index 787312f7bc7..6aa242daf29 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environmentversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_environmentversion.go @@ -46,7 +46,7 @@ func ParseEnvironmentVersionID(input string) (*EnvironmentVersionId, error) { } id := EnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentVersionIDInsensitively(input string) (*EnvironmentVersionId } id := EnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironment.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironment.go index a83cdfcdb4e..95ec102e89c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironment.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironment.go @@ -44,7 +44,7 @@ func ParseRegistryEnvironmentID(input string) (*RegistryEnvironmentId, error) { } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryEnvironmentIDInsensitively(input string) (*RegistryEnvironment } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironmentversion.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironmentversion.go index 02d7833a8d6..861abe015b6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironmentversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/id_registryenvironmentversion.go @@ -46,7 +46,7 @@ func ParseRegistryEnvironmentVersionID(input string) (*RegistryEnvironmentVersio } id := RegistryEnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryEnvironmentVersionIDInsensitively(input string) (*RegistryEnvi } id := RegistryEnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_createorupdate.go index 696c9461b3e..9d59df5e453 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentVersionClient) CreateOrUpdate(ctx context.Context, id Environ var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_get.go index 6cf16692bb3..7563144e740 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentVersionClient) Get(ctx context.Context, id EnvironmentVersion var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_list.go index 23a839f0739..2939cc5f60f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionsget.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionsget.go index cea2d10feda..bb40fdc6ebc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionsget.go @@ -45,7 +45,6 @@ func (c EnvironmentVersionClient) RegistryEnvironmentVersionsGet(ctx context.Con var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionslist.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionslist.go index 88db4de6ca3..15d1285660a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/method_registryenvironmentversionslist.go @@ -42,6 +42,7 @@ func (o RegistryEnvironmentVersionsListOperationOptions) ToHeaders() *client.Hea func (o RegistryEnvironmentVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/environmentversion/version.go b/resource-manager/machinelearningservices/2023-10-01/environmentversion/version.go index 3c7b4188ea9..d16f97462fd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/environmentversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/environmentversion/version.go @@ -1,12 +1,10 @@ package environmentversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmentversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmentversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/README.md b/resource-manager/machinelearningservices/2023-10-01/feature/README.md index a7799bb9ef7..1867aa59e41 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/feature/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/feature` Documentation -The `feature` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `feature` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/client.go b/resource-manager/machinelearningservices/2023-10-01/feature/client.go index ce76f0761aa..38863527c69 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/client.go @@ -15,7 +15,7 @@ type FeatureClient struct { } func NewFeatureClientWithBaseURI(sdkApi sdkEnv.Api) (*FeatureClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "feature", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "feature", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeatureClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/id_feature.go b/resource-manager/machinelearningservices/2023-10-01/feature/id_feature.go index 12fb6ad49d5..7ec7a6be0a5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/id_feature.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/id_feature.go @@ -48,7 +48,7 @@ func ParseFeatureID(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseFeatureIDInsensitively(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/id_featuresetversion.go b/resource-manager/machinelearningservices/2023-10-01/feature/id_featuresetversion.go index 5249b05e280..5b17258df0b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/id_featuresetversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/id_featuresetversion.go @@ -46,7 +46,7 @@ func ParseFeatureSetVersionID(input string) (*FeatureSetVersionId, error) { } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureSetVersionIDInsensitively(input string) (*FeatureSetVersionId, } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/method_get.go b/resource-manager/machinelearningservices/2023-10-01/feature/method_get.go index 2482f1f8e67..2a3e74ccdaf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/method_get.go @@ -45,7 +45,6 @@ func (c FeatureClient) Get(ctx context.Context, id FeatureId) (result GetOperati var model FeatureResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/method_list.go b/resource-manager/machinelearningservices/2023-10-01/feature/method_list.go index 1553b9965ad..9ba39db8672 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/feature/version.go b/resource-manager/machinelearningservices/2023-10-01/feature/version.go index 3d26c548f1f..e0bf34ebe51 100644 --- a/resource-manager/machinelearningservices/2023-10-01/feature/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/feature/version.go @@ -1,12 +1,10 @@ package feature -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/feature/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/feature/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/README.md index 6e4023ce326..11735d95e19 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer` Documentation -The `featuresetcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `featuresetcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/client.go index 0b1a8240abe..137b30b74d2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/client.go @@ -15,7 +15,7 @@ type FeaturesetContainerClient struct { } func NewFeaturesetContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesetContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featuresetcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featuresetcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturesetContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_featureset.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_featureset.go index bdf6e3f214e..db01a24228c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_featureset.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_featureset.go @@ -44,7 +44,7 @@ func ParseFeatureSetID(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureSetIDInsensitively(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_workspace.go index 18583836148..0e1bc57ea53 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_getentity.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_getentity.go index ebc6bcb34d3..8632557b0bb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_getentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_getentity.go @@ -45,7 +45,6 @@ func (c FeaturesetContainerClient) GetEntity(ctx context.Context, id FeatureSetI var model FeaturesetContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_list.go index b3fab75e9ff..c969714237f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/version.go index 54649438f03..b0b2414885d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetcontainer/version.go @@ -1,12 +1,10 @@ package featuresetcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresetcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresetcontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/README.md b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/README.md index 5f9187e44be..7cf21f30062 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/featuresetversion` Documentation -The `featuresetversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `featuresetversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/client.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/client.go index 5f5c0c9d5de..d7b0f6856aa 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/client.go @@ -15,7 +15,7 @@ type FeaturesetVersionClient struct { } func NewFeaturesetVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesetVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featuresetversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featuresetversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturesetVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featureset.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featureset.go index 085301d92e2..21473d93ca9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featureset.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featureset.go @@ -44,7 +44,7 @@ func ParseFeatureSetID(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureSetIDInsensitively(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featuresetversion.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featuresetversion.go index ab2aba9028c..19c3ad0cb1f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featuresetversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/id_featuresetversion.go @@ -46,7 +46,7 @@ func ParseFeatureSetVersionID(input string) (*FeatureSetVersionId, error) { } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureSetVersionIDInsensitively(input string) (*FeatureSetVersionId, } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_get.go index da44ac47cdd..4574f92d44a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_get.go @@ -45,7 +45,6 @@ func (c FeaturesetVersionClient) Get(ctx context.Context, id FeatureSetVersionId var model FeaturesetVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_list.go index fa6692e5974..17cbb34ecbd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/method_list.go @@ -47,6 +47,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_azuredevopswebhook.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_azuredevopswebhook.go index 5e23ea37146..ae4bacabe00 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_azuredevopswebhook.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_azuredevopswebhook.go @@ -13,7 +13,16 @@ var _ Webhook = AzureDevOpsWebhook{} type AzureDevOpsWebhook struct { // Fields inherited from Webhook - EventType *string `json:"eventType,omitempty"` + + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s AzureDevOpsWebhook) Webhook() BaseWebhookImpl { + return BaseWebhookImpl{ + EventType: s.EventType, + WebhookType: s.WebhookType, + } } var _ json.Marshaler = AzureDevOpsWebhook{} @@ -27,9 +36,10 @@ func (s AzureDevOpsWebhook) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDevOpsWebhook: %+v", err) } + decoded["webhookType"] = "AzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_crontrigger.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_crontrigger.go index 3cf395dc64f..c4628ac394a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_crontrigger.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_crontrigger.go @@ -14,9 +14,20 @@ type CronTrigger struct { Expression string `json:"expression"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s CronTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = CronTrigger{} @@ -30,9 +41,10 @@ func (s CronTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CronTrigger: %+v", err) } + decoded["triggerType"] = "Cron" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_notificationsetting.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_notificationsetting.go index 780fbc7fa36..d2bf8b1e755 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_notificationsetting.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_notificationsetting.go @@ -39,7 +39,7 @@ func (s *NotificationSetting) UnmarshalJSON(bytes []byte) error { output := make(map[string]Webhook) for key, val := range dictionaryTemp { - impl, err := unmarshalWebhookImplementation(val) + impl, err := UnmarshalWebhookImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'WebHooks' for 'NotificationSetting': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_recurrencetrigger.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_recurrencetrigger.go index 35afd002809..64719c65aec 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_recurrencetrigger.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_recurrencetrigger.go @@ -16,9 +16,20 @@ type RecurrenceTrigger struct { Schedule *RecurrenceSchedule `json:"schedule,omitempty"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s RecurrenceTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = RecurrenceTrigger{} @@ -32,9 +43,10 @@ func (s RecurrenceTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecurrenceTrigger: %+v", err) } + decoded["triggerType"] = "Recurrence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_triggerbase.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_triggerbase.go index 039813dab28..0cd94e8bc71 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_triggerbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_triggerbase.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerBase interface { + TriggerBase() BaseTriggerBaseImpl } -// RawTriggerBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerBase = BaseTriggerBaseImpl{} + +type BaseTriggerBaseImpl struct { + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s BaseTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s +} + +var _ TriggerBase = RawTriggerBaseImpl{} + +// RawTriggerBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerBaseImpl struct { - Type string - Values map[string]interface{} + triggerBase BaseTriggerBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s.triggerBase } -func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { +func UnmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { return out, nil } - out := RawTriggerBaseImpl{ - Type: value, - Values: temp, + var parent BaseTriggerBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerBaseImpl: %+v", err) } - return out, nil + + return RawTriggerBaseImpl{ + triggerBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_webhook.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_webhook.go index 9ebe818b7a0..4866c8acace 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_webhook.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/model_webhook.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Webhook interface { + Webhook() BaseWebhookImpl } -// RawWebhookImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Webhook = BaseWebhookImpl{} + +type BaseWebhookImpl struct { + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s BaseWebhookImpl) Webhook() BaseWebhookImpl { + return s +} + +var _ Webhook = RawWebhookImpl{} + +// RawWebhookImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWebhookImpl struct { - Type string - Values map[string]interface{} + webhook BaseWebhookImpl + Type string + Values map[string]interface{} +} + +func (s RawWebhookImpl) Webhook() BaseWebhookImpl { + return s.webhook } -func unmarshalWebhookImplementation(input []byte) (Webhook, error) { +func UnmarshalWebhookImplementation(input []byte) (Webhook, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalWebhookImplementation(input []byte) (Webhook, error) { return out, nil } - out := RawWebhookImpl{ - Type: value, - Values: temp, + var parent BaseWebhookImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWebhookImpl: %+v", err) } - return out, nil + + return RawWebhookImpl{ + webhook: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/version.go b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/version.go index 3c2bbb3ad60..4beda943163 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featuresetversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/featuresetversion/version.go @@ -1,12 +1,10 @@ package featuresetversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresetversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresetversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/README.md index 8c3f72ee211..88ce1f2106d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer` Documentation -The `featurestoreentitycontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `featurestoreentitycontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/client.go index 246e1fa8542..c13e2e5b12d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/client.go @@ -15,7 +15,7 @@ type FeaturestoreEntityContainerClient struct { } func NewFeaturestoreEntityContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturestoreEntityContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featurestoreentitycontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featurestoreentitycontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturestoreEntityContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_featurestoreentity.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_featurestoreentity.go index 5e65b201d0b..93652b284f4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_featurestoreentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_featurestoreentity.go @@ -44,7 +44,7 @@ func ParseFeatureStoreEntityID(input string) (*FeatureStoreEntityId, error) { } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureStoreEntityIDInsensitively(input string) (*FeatureStoreEntityId } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_workspace.go index 0d75ecb2682..0ba0c68b46d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_getentity.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_getentity.go index f3c10d02be1..20992ddf5b4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_getentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_getentity.go @@ -45,7 +45,6 @@ func (c FeaturestoreEntityContainerClient) GetEntity(ctx context.Context, id Fea var model FeaturestoreEntityContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_list.go index ff515e5fa30..9d2dfc6d7f3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/version.go index 9f58e6dd504..5a8ff409c2a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentitycontainer/version.go @@ -1,12 +1,10 @@ package featurestoreentitycontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featurestoreentitycontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featurestoreentitycontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/README.md b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/README.md index 98dc1e977c7..0ed6e53568e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion` Documentation -The `featurestoreentityversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `featurestoreentityversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/client.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/client.go index e9ea6afae6d..843363442eb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/client.go @@ -15,7 +15,7 @@ type FeaturestoreEntityVersionClient struct { } func NewFeaturestoreEntityVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturestoreEntityVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featurestoreentityversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featurestoreentityversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturestoreEntityVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentity.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentity.go index ec95107f203..eb45ef7abc7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentity.go @@ -44,7 +44,7 @@ func ParseFeatureStoreEntityID(input string) (*FeatureStoreEntityId, error) { } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureStoreEntityIDInsensitively(input string) (*FeatureStoreEntityId } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentityversion.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentityversion.go index 1937f01b0f9..30f0cd59ad7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentityversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/id_featurestoreentityversion.go @@ -46,7 +46,7 @@ func ParseFeatureStoreEntityVersionID(input string) (*FeatureStoreEntityVersionI } id := FeatureStoreEntityVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureStoreEntityVersionIDInsensitively(input string) (*FeatureStoreE } id := FeatureStoreEntityVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_get.go index 5f01c8f7765..ecee1aa0872 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_get.go @@ -45,7 +45,6 @@ func (c FeaturestoreEntityVersionClient) Get(ctx context.Context, id FeatureStor var model FeaturestoreEntityVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_list.go index 96a28bcd827..6d748fbef97 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/method_list.go @@ -47,6 +47,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/version.go b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/version.go index c96c184fd84..d17344d266c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/featurestoreentityversion/version.go @@ -1,12 +1,10 @@ package featurestoreentityversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featurestoreentityversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featurestoreentityversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/README.md b/resource-manager/machinelearningservices/2023-10-01/job/README.md index c68279ceb48..c73b44e1484 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `job` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/job/client.go b/resource-manager/machinelearningservices/2023-10-01/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/id_job.go b/resource-manager/machinelearningservices/2023-10-01/job/id_job.go index 4a1fa82f413..0c434c676c2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/id_job.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/job/id_workspace.go index 78013e04363..b548519864c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/job/method_createorupdate.go index a8ff1f6938f..109e9ae6e10 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobClient) CreateOrUpdate(ctx context.Context, id JobId, input JobBaseRe var model JobBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/method_get.go b/resource-manager/machinelearningservices/2023-10-01/job/method_get.go index 8dd944de882..3a3d38b8bea 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/method_get.go @@ -45,7 +45,6 @@ func (c JobClient) Get(ctx context.Context, id JobId) (result GetOperationRespon var model JobBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/method_list.go b/resource-manager/machinelearningservices/2023-10-01/job/method_list.go index 9d12e514848..e293d4ba17d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_allnodes.go b/resource-manager/machinelearningservices/2023-10-01/job/model_allnodes.go index 389e0869f44..d40cabeeda6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_allnodes.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_allnodes.go @@ -13,6 +13,14 @@ var _ Nodes = AllNodes{} type AllNodes struct { // Fields inherited from Nodes + + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s AllNodes) Nodes() BaseNodesImpl { + return BaseNodesImpl{ + NodesValueType: s.NodesValueType, + } } var _ json.Marshaler = AllNodes{} @@ -26,9 +34,10 @@ func (s AllNodes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllNodes: %+v", err) } + decoded["nodesValueType"] = "All" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_amltoken.go b/resource-manager/machinelearningservices/2023-10-01/job/model_amltoken.go index 5e8a60277ee..cd60c336de5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_amltoken.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_amltoken.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = AmlToken{} type AmlToken struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s AmlToken) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = AmlToken{} @@ -26,9 +34,10 @@ func (s AmlToken) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlToken: %+v", err) } + decoded["identityType"] = "AMLToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_autoforecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/job/model_autoforecasthorizon.go index 42fcfde7e4c..a230f6b5837 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_autoforecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_autoforecasthorizon.go @@ -13,6 +13,14 @@ var _ ForecastHorizon = AutoForecastHorizon{} type AutoForecastHorizon struct { // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s AutoForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoForecastHorizon{} @@ -26,9 +34,10 @@ func (s AutoForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoForecastHorizon: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_automljob.go b/resource-manager/machinelearningservices/2023-10-01/job/model_automljob.go index cc1aa064fed..cfa1ef3366e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_automljob.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_automljob.go @@ -19,6 +19,7 @@ type AutoMLJob struct { TaskDetails AutoMLVertical `json:"taskDetails"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -26,12 +27,30 @@ type AutoMLJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s AutoMLJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = AutoMLJob{} func (s AutoMLJob) MarshalJSON() ([]byte, error) { @@ -43,9 +62,10 @@ func (s AutoMLJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoMLJob: %+v", err) } + decoded["jobType"] = "AutoML" encoded, err = json.Marshal(decoded) @@ -73,6 +93,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings s.Resources = decoded.Resources @@ -86,7 +107,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'AutoMLJob': %+v", err) } @@ -101,7 +122,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'AutoMLJob': %+v", key, err) } @@ -111,7 +132,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["taskDetails"]; ok { - impl, err := unmarshalAutoMLVerticalImplementation(v) + impl, err := UnmarshalAutoMLVerticalImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TaskDetails' for 'AutoMLJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_automlvertical.go b/resource-manager/machinelearningservices/2023-10-01/job/model_automlvertical.go index 2b1fa7d40c1..1365db38bf7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_automlvertical.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_automlvertical.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutoMLVertical interface { + AutoMLVertical() BaseAutoMLVerticalImpl } -// RawAutoMLVerticalImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutoMLVertical = BaseAutoMLVerticalImpl{} + +type BaseAutoMLVerticalImpl struct { + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` + TrainingData MLTableJobInput `json:"trainingData"` +} + +func (s BaseAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s +} + +var _ AutoMLVertical = RawAutoMLVerticalImpl{} + +// RawAutoMLVerticalImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutoMLVerticalImpl struct { - Type string - Values map[string]interface{} + autoMLVertical BaseAutoMLVerticalImpl + Type string + Values map[string]interface{} +} + +func (s RawAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s.autoMLVertical } -func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { +func UnmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { if input == nil { return nil, nil } @@ -116,10 +136,15 @@ func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) return out, nil } - out := RawAutoMLVerticalImpl{ - Type: value, - Values: temp, + var parent BaseAutoMLVerticalImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutoMLVerticalImpl: %+v", err) } - return out, nil + + return RawAutoMLVerticalImpl{ + autoMLVertical: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_autoncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/job/model_autoncrossvalidations.go index 51e422de7fe..bee0973267a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_autoncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_autoncrossvalidations.go @@ -13,6 +13,14 @@ var _ NCrossValidations = AutoNCrossValidations{} type AutoNCrossValidations struct { // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s AutoNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoNCrossValidations{} @@ -26,9 +34,10 @@ func (s AutoNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoNCrossValidations: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_autoseasonality.go b/resource-manager/machinelearningservices/2023-10-01/job/model_autoseasonality.go index df655afb0e0..191c715de57 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_autoseasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_autoseasonality.go @@ -13,6 +13,14 @@ var _ Seasonality = AutoSeasonality{} type AutoSeasonality struct { // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s AutoSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoSeasonality{} @@ -26,9 +34,10 @@ func (s AutoSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoSeasonality: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetlags.go b/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetlags.go index 0d578339198..0e617e2455d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetlags.go @@ -13,6 +13,14 @@ var _ TargetLags = AutoTargetLags{} type AutoTargetLags struct { // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s AutoTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetLags{} @@ -26,9 +34,10 @@ func (s AutoTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetLags: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetrollingwindowsize.go index f572cdd3e27..724a92305cf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_autotargetrollingwindowsize.go @@ -13,6 +13,14 @@ var _ TargetRollingWindowSize = AutoTargetRollingWindowSize{} type AutoTargetRollingWindowSize struct { // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s AutoTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetRollingWindowSize{} @@ -26,9 +34,10 @@ func (s AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_banditpolicy.go b/resource-manager/machinelearningservices/2023-10-01/job/model_banditpolicy.go index 60398a0220d..da5ec6d8110 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_banditpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_banditpolicy.go @@ -15,8 +15,18 @@ type BanditPolicy struct { SlackFactor *float64 `json:"slackFactor,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BanditPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = BanditPolicy{} @@ -30,9 +40,10 @@ func (s BanditPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BanditPolicy: %+v", err) } + decoded["policyType"] = "Bandit" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_bayesiansamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/job/model_bayesiansamplingalgorithm.go index f2c76b5d904..c5d265166ac 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_bayesiansamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_bayesiansamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = BayesianSamplingAlgorithm{} type BayesianSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BayesianSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = BayesianSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BayesianSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Bayesian" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_classification.go b/resource-manager/machinelearningservices/2023-10-01/job/model_classification.go index 3e955fa97c1..e0e2149bf36 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_classification.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_classification.go @@ -25,11 +25,22 @@ type Classification struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Classification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Classification{} func (s Classification) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Classification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Classification: %+v", err) } + decoded["taskType"] = "Classification" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { s.PositiveLabel = decoded.PositiveLabel s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Classification': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_commandjob.go b/resource-manager/machinelearningservices/2023-10-01/job/model_commandjob.go index 8db9744f1b2..d14f1657824 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_commandjob.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_commandjob.go @@ -24,6 +24,7 @@ type CommandJob struct { Resources *JobResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -31,12 +32,30 @@ type CommandJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s CommandJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = CommandJob{} func (s CommandJob) MarshalJSON() ([]byte, error) { @@ -48,9 +67,10 @@ func (s CommandJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJob: %+v", err) } + decoded["jobType"] = "Command" encoded, err = json.Marshal(decoded) @@ -80,6 +100,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Parameters = decoded.Parameters s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings @@ -94,7 +115,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'CommandJob': %+v", err) } @@ -102,7 +123,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'CommandJob': %+v", err) } @@ -117,7 +138,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CommandJob': %+v", key, err) } @@ -127,7 +148,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limits"]; ok { - impl, err := unmarshalJobLimitsImplementation(v) + impl, err := UnmarshalJobLimitsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limits' for 'CommandJob': %+v", err) } @@ -142,7 +163,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'CommandJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_commandjoblimits.go b/resource-manager/machinelearningservices/2023-10-01/job/model_commandjoblimits.go index 092a4ed9daf..0d2c4f89460 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_commandjoblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_commandjoblimits.go @@ -13,7 +13,16 @@ var _ JobLimits = CommandJobLimits{} type CommandJobLimits struct { // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s CommandJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = CommandJobLimits{} @@ -27,9 +36,10 @@ func (s CommandJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Command" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_customforecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/job/model_customforecasthorizon.go index 00863b88f77..e04e41308fd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_customforecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_customforecasthorizon.go @@ -14,6 +14,14 @@ type CustomForecastHorizon struct { Value int64 `json:"value"` // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s CustomForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomForecastHorizon{} @@ -27,9 +35,10 @@ func (s CustomForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomForecastHorizon: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljobinput.go index 6995e1ae6a9..beb41ad4fed 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljobinput.go @@ -15,7 +15,16 @@ type CustomModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s CustomModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = CustomModelJobInput{} @@ -29,9 +38,10 @@ func (s CustomModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobInput: %+v", err) } + decoded["jobInputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljoboutput.go index 3a2898b4634..eedce78f9d2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_custommodeljoboutput.go @@ -15,7 +15,16 @@ type CustomModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s CustomModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = CustomModelJobOutput{} @@ -29,9 +38,10 @@ func (s CustomModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_customncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/job/model_customncrossvalidations.go index 422cda3d461..730a631f5b2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_customncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_customncrossvalidations.go @@ -14,6 +14,14 @@ type CustomNCrossValidations struct { Value int64 `json:"value"` // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s CustomNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomNCrossValidations{} @@ -27,9 +35,10 @@ func (s CustomNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomNCrossValidations: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_customseasonality.go b/resource-manager/machinelearningservices/2023-10-01/job/model_customseasonality.go index 0e4230d812b..c86016bdecd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_customseasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_customseasonality.go @@ -14,6 +14,14 @@ type CustomSeasonality struct { Value int64 `json:"value"` // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s CustomSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomSeasonality{} @@ -27,9 +35,10 @@ func (s CustomSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomSeasonality: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetlags.go b/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetlags.go index 78374782850..da1661ae7d5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetlags.go @@ -14,6 +14,14 @@ type CustomTargetLags struct { Values []int64 `json:"values"` // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s CustomTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetLags{} @@ -27,9 +35,10 @@ func (s CustomTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetLags: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetrollingwindowsize.go index 9b1f435bd17..ac2fae417a6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_customtargetrollingwindowsize.go @@ -14,6 +14,14 @@ type CustomTargetRollingWindowSize struct { Value int64 `json:"value"` // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s CustomTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetRollingWindowSize{} @@ -27,9 +35,10 @@ func (s CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_distributionconfiguration.go b/resource-manager/machinelearningservices/2023-10-01/job/model_distributionconfiguration.go index 1fffe36371e..6aa6bf41138 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_distributionconfiguration.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_distributionconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DistributionConfiguration interface { + DistributionConfiguration() BaseDistributionConfigurationImpl } -// RawDistributionConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DistributionConfiguration = BaseDistributionConfigurationImpl{} + +type BaseDistributionConfigurationImpl struct { + DistributionType DistributionType `json:"distributionType"` +} + +func (s BaseDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s +} + +var _ DistributionConfiguration = RawDistributionConfigurationImpl{} + +// RawDistributionConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDistributionConfigurationImpl struct { - Type string - Values map[string]interface{} + distributionConfiguration BaseDistributionConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s.distributionConfiguration } -func unmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { +func UnmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalDistributionConfigurationImplementation(input []byte) (Distributio return out, nil } - out := RawDistributionConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseDistributionConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDistributionConfigurationImpl: %+v", err) } - return out, nil + + return RawDistributionConfigurationImpl{ + distributionConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_earlyterminationpolicy.go b/resource-manager/machinelearningservices/2023-10-01/job/model_earlyterminationpolicy.go index 9f1264447ac..85c557bc44e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_earlyterminationpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_earlyterminationpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EarlyTerminationPolicy interface { + EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl } -// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EarlyTerminationPolicy = BaseEarlyTerminationPolicyImpl{} + +type BaseEarlyTerminationPolicyImpl struct { + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BaseEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s +} + +var _ EarlyTerminationPolicy = RawEarlyTerminationPolicyImpl{} + +// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEarlyTerminationPolicyImpl struct { - Type string - Values map[string]interface{} + earlyTerminationPolicy BaseEarlyTerminationPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s.earlyTerminationPolicy } -func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { +func UnmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminati return out, nil } - out := RawEarlyTerminationPolicyImpl{ - Type: value, - Values: temp, + var parent BaseEarlyTerminationPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEarlyTerminationPolicyImpl: %+v", err) } - return out, nil + + return RawEarlyTerminationPolicyImpl{ + earlyTerminationPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_forecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/job/model_forecasthorizon.go index 814731b8727..e43938c1a0c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_forecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_forecasthorizon.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForecastHorizon interface { + ForecastHorizon() BaseForecastHorizonImpl } -// RawForecastHorizonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ForecastHorizon = BaseForecastHorizonImpl{} + +type BaseForecastHorizonImpl struct { + Mode ForecastHorizonMode `json:"mode"` +} + +func (s BaseForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s +} + +var _ ForecastHorizon = RawForecastHorizonImpl{} + +// RawForecastHorizonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawForecastHorizonImpl struct { - Type string - Values map[string]interface{} + forecastHorizon BaseForecastHorizonImpl + Type string + Values map[string]interface{} +} + +func (s RawForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s.forecastHorizon } -func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { +func UnmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, erro return out, nil } - out := RawForecastHorizonImpl{ - Type: value, - Values: temp, + var parent BaseForecastHorizonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseForecastHorizonImpl: %+v", err) } - return out, nil + + return RawForecastHorizonImpl{ + forecastHorizon: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_forecasting.go b/resource-manager/machinelearningservices/2023-10-01/job/model_forecasting.go index e8a577f3d29..0511be90eef 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_forecasting.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_forecasting.go @@ -25,11 +25,22 @@ type Forecasting struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Forecasting) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Forecasting{} func (s Forecasting) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Forecasting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Forecasting: %+v", err) } + decoded["taskType"] = "Forecasting" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Forecasting': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_forecastingsettings.go b/resource-manager/machinelearningservices/2023-10-01/job/model_forecastingsettings.go index ee51047ed33..6b67cd31a78 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_forecastingsettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_forecastingsettings.go @@ -49,7 +49,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["forecastHorizon"]; ok { - impl, err := unmarshalForecastHorizonImplementation(v) + impl, err := UnmarshalForecastHorizonImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ForecastHorizon' for 'ForecastingSettings': %+v", err) } @@ -57,7 +57,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["seasonality"]; ok { - impl, err := unmarshalSeasonalityImplementation(v) + impl, err := UnmarshalSeasonalityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Seasonality' for 'ForecastingSettings': %+v", err) } @@ -65,7 +65,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetLags"]; ok { - impl, err := unmarshalTargetLagsImplementation(v) + impl, err := UnmarshalTargetLagsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetLags' for 'ForecastingSettings': %+v", err) } @@ -73,7 +73,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetRollingWindowSize"]; ok { - impl, err := unmarshalTargetRollingWindowSizeImplementation(v) + impl, err := UnmarshalTargetRollingWindowSizeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetRollingWindowSize' for 'ForecastingSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_gridsamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/job/model_gridsamplingalgorithm.go index 818c2a8de7c..491e4b359b0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_gridsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_gridsamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = GridSamplingAlgorithm{} type GridSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s GridSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = GridSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GridSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Grid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_identityconfiguration.go b/resource-manager/machinelearningservices/2023-10-01/job/model_identityconfiguration.go index 1a71f4f8e55..aeee58afa60 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_identityconfiguration.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_identityconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IdentityConfiguration interface { + IdentityConfiguration() BaseIdentityConfigurationImpl } -// RawIdentityConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IdentityConfiguration = BaseIdentityConfigurationImpl{} + +type BaseIdentityConfigurationImpl struct { + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s BaseIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s +} + +var _ IdentityConfiguration = RawIdentityConfigurationImpl{} + +// RawIdentityConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIdentityConfigurationImpl struct { - Type string - Values map[string]interface{} + identityConfiguration BaseIdentityConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s.identityConfiguration } -func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { +func UnmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfigu return out, nil } - out := RawIdentityConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseIdentityConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIdentityConfigurationImpl: %+v", err) } - return out, nil + + return RawIdentityConfigurationImpl{ + identityConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassification.go b/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassification.go index f6a0b7acf41..fbab861e4e2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassification.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassification.go @@ -20,11 +20,22 @@ type ImageClassification struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassification{} func (s ImageClassification) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassification: %+v", err) } + decoded["taskType"] = "ImageClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassificationmultilabel.go b/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassificationmultilabel.go index ea82b509896..c40ef97601b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_imageclassificationmultilabel.go @@ -20,11 +20,22 @@ type ImageClassificationMultilabel struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassificationMultilabel{} func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassificationMultilabel: %+v", err) } + decoded["taskType"] = "ImageClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_imageinstancesegmentation.go b/resource-manager/machinelearningservices/2023-10-01/job/model_imageinstancesegmentation.go index f075acc5003..b878e99a9cb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_imageinstancesegmentation.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_imageinstancesegmentation.go @@ -20,11 +20,22 @@ type ImageInstanceSegmentation struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageInstanceSegmentation) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageInstanceSegmentation{} func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageInstanceSegmentation: %+v", err) } + decoded["taskType"] = "ImageInstanceSegmentation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_imageobjectdetection.go b/resource-manager/machinelearningservices/2023-10-01/job/model_imageobjectdetection.go index f0eb8078a46..bdec18ee6c6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_imageobjectdetection.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_imageobjectdetection.go @@ -20,11 +20,22 @@ type ImageObjectDetection struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageObjectDetection) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageObjectDetection{} func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageObjectDetection: %+v", err) } + decoded["taskType"] = "ImageObjectDetection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_imagesweepsettings.go b/resource-manager/machinelearningservices/2023-10-01/job/model_imagesweepsettings.go index 5470ecf0781..c48d91fdd36 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_imagesweepsettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_imagesweepsettings.go @@ -30,7 +30,7 @@ func (s *ImageSweepSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'ImageSweepSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_jobbase.go b/resource-manager/machinelearningservices/2023-10-01/job/model_jobbase.go index 10077925bd9..19482b19510 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_jobbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_jobbase.go @@ -10,18 +10,82 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobBase interface { + JobBase() BaseJobBaseImpl } -// RawJobBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobBase = BaseJobBaseImpl{} + +type BaseJobBaseImpl struct { + ComponentId *string `json:"componentId,omitempty"` + ComputeId *string `json:"computeId,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + ExperimentName *string `json:"experimentName,omitempty"` + Identity IdentityConfiguration `json:"identity"` + IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` + Properties *map[string]string `json:"properties,omitempty"` + Services *map[string]JobService `json:"services,omitempty"` + Status *JobStatus `json:"status,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseJobBaseImpl) JobBase() BaseJobBaseImpl { + return s +} + +var _ JobBase = RawJobBaseImpl{} + +// RawJobBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobBaseImpl struct { - Type string - Values map[string]interface{} + jobBase BaseJobBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawJobBaseImpl) JobBase() BaseJobBaseImpl { + return s.jobBase } -func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { +var _ json.Unmarshaler = &BaseJobBaseImpl{} + +func (s *BaseJobBaseImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobBaseImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) + } + + s.ComponentId = decoded.ComponentId + s.ComputeId = decoded.ComputeId + s.Description = decoded.Description + s.DisplayName = decoded.DisplayName + s.ExperimentName = decoded.ExperimentName + s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType + s.Properties = decoded.Properties + s.Services = decoded.Services + s.Status = decoded.Status + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobBaseImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["identity"]; ok { + impl, err := UnmarshalIdentityConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Identity' for 'BaseJobBaseImpl': %+v", err) + } + s.Identity = impl + } + return nil +} + +func UnmarshalJobBaseImplementation(input []byte) (JobBase, error) { if input == nil { return nil, nil } @@ -68,10 +132,15 @@ func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { return out, nil } - out := RawJobBaseImpl{ - Type: value, - Values: temp, + var parent BaseJobBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) } - return out, nil + + return RawJobBaseImpl{ + jobBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_jobbaseresource.go b/resource-manager/machinelearningservices/2023-10-01/job/model_jobbaseresource.go index f5b5f4ff13d..590f3ad81fe 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_jobbaseresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_jobbaseresource.go @@ -38,7 +38,7 @@ func (s *JobBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobBaseImplementation(v) + impl, err := UnmarshalJobBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_jobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_jobinput.go index f525d0a0bb1..b5f153d488b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_jobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_jobinput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -92,10 +110,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_joblimits.go b/resource-manager/machinelearningservices/2023-10-01/job/model_joblimits.go index 57c02a64d7e..1e08ddb8754 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_joblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_joblimits.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobLimits interface { + JobLimits() BaseJobLimitsImpl } -// RawJobLimitsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobLimits = BaseJobLimitsImpl{} + +type BaseJobLimitsImpl struct { + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s BaseJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s +} + +var _ JobLimits = RawJobLimitsImpl{} + +// RawJobLimitsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobLimitsImpl struct { - Type string - Values map[string]interface{} + jobLimits BaseJobLimitsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s.jobLimits } -func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { +func UnmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { return out, nil } - out := RawJobLimitsImpl{ - Type: value, - Values: temp, + var parent BaseJobLimitsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobLimitsImpl: %+v", err) } - return out, nil + + return RawJobLimitsImpl{ + jobLimits: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_joboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_joboutput.go index 396d201d0b0..dbb5317c811 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_joboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_joboutput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_jobservice.go b/resource-manager/machinelearningservices/2023-10-01/job/model_jobservice.go index e0b80bfa248..81ef7f86c4e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_jobservice.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_jobservice.go @@ -40,7 +40,7 @@ func (s *JobService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nodes"]; ok { - impl, err := unmarshalNodesImplementation(v) + impl, err := UnmarshalNodesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Nodes' for 'JobService': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_literaljobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_literaljobinput.go index bd33bc88485..b5c2d162c3b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_literaljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_literaljobinput.go @@ -14,7 +14,16 @@ type LiteralJobInput struct { Value string `json:"value"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s LiteralJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = LiteralJobInput{} @@ -28,9 +37,10 @@ func (s LiteralJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LiteralJobInput: %+v", err) } + decoded["jobInputType"] = "literal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_managedidentity.go b/resource-manager/machinelearningservices/2023-10-01/job/model_managedidentity.go index 6617adbf7b4..650f80d2fe9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_managedidentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_managedidentity.go @@ -16,6 +16,14 @@ type ManagedIdentity struct { ResourceId *string `json:"resourceId,omitempty"` // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s ManagedIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = ManagedIdentity{} @@ -29,9 +37,10 @@ func (s ManagedIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentity: %+v", err) } + decoded["identityType"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_medianstoppingpolicy.go b/resource-manager/machinelearningservices/2023-10-01/job/model_medianstoppingpolicy.go index 0db9b997381..23def5e3925 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_medianstoppingpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_medianstoppingpolicy.go @@ -13,8 +13,18 @@ var _ EarlyTerminationPolicy = MedianStoppingPolicy{} type MedianStoppingPolicy struct { // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s MedianStoppingPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = MedianStoppingPolicy{} @@ -28,9 +38,10 @@ func (s MedianStoppingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MedianStoppingPolicy: %+v", err) } + decoded["policyType"] = "MedianStopping" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljobinput.go index e26b35621b9..f4e7ba81f7b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljobinput.go @@ -15,7 +15,16 @@ type MLFlowModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLFlowModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLFlowModelJobInput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobInput: %+v", err) } + decoded["jobInputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljoboutput.go index 7b924ace494..d4be436b031 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_mlflowmodeljoboutput.go @@ -15,7 +15,16 @@ type MLFlowModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLFlowModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLFlowModelJobOutput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejobinput.go index fba8ec64d57..e39b578b529 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejobinput.go @@ -15,7 +15,16 @@ type MLTableJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLTableJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLTableJobInput{} @@ -29,9 +38,10 @@ func (s MLTableJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobInput: %+v", err) } + decoded["jobInputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejoboutput.go index 8f9380251c8..470fb02d0c2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_mltablejoboutput.go @@ -15,7 +15,16 @@ type MLTableJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLTableJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLTableJobOutput{} @@ -29,9 +38,10 @@ func (s MLTableJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobOutput: %+v", err) } + decoded["jobOutputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_mpi.go b/resource-manager/machinelearningservices/2023-10-01/job/model_mpi.go index 65ed29edcd1..9eeed1b786f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_mpi.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_mpi.go @@ -14,6 +14,14 @@ type Mpi struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s Mpi) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = Mpi{} @@ -27,9 +35,10 @@ func (s Mpi) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mpi: %+v", err) } + decoded["distributionType"] = "Mpi" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_ncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/job/model_ncrossvalidations.go index 0f9afc8a6a1..1f52c3cbd8c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_ncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_ncrossvalidations.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NCrossValidations interface { + NCrossValidations() BaseNCrossValidationsImpl } -// RawNCrossValidationsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NCrossValidations = BaseNCrossValidationsImpl{} + +type BaseNCrossValidationsImpl struct { + Mode NCrossValidationsMode `json:"mode"` +} + +func (s BaseNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s +} + +var _ NCrossValidations = RawNCrossValidationsImpl{} + +// RawNCrossValidationsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNCrossValidationsImpl struct { - Type string - Values map[string]interface{} + nCrossValidations BaseNCrossValidationsImpl + Type string + Values map[string]interface{} +} + +func (s RawNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s.nCrossValidations } -func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { +func UnmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, return out, nil } - out := RawNCrossValidationsImpl{ - Type: value, - Values: temp, + var parent BaseNCrossValidationsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNCrossValidationsImpl: %+v", err) } - return out, nil + + return RawNCrossValidationsImpl{ + nCrossValidations: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_nodes.go b/resource-manager/machinelearningservices/2023-10-01/job/model_nodes.go index a9b6e4e7f61..18f8c6c46cf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_nodes.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_nodes.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Nodes interface { + Nodes() BaseNodesImpl } -// RawNodesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Nodes = BaseNodesImpl{} + +type BaseNodesImpl struct { + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s BaseNodesImpl) Nodes() BaseNodesImpl { + return s +} + +var _ Nodes = RawNodesImpl{} + +// RawNodesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNodesImpl struct { + nodes BaseNodesImpl Type string Values map[string]interface{} } -func unmarshalNodesImplementation(input []byte) (Nodes, error) { +func (s RawNodesImpl) Nodes() BaseNodesImpl { + return s.nodes +} + +func UnmarshalNodesImplementation(input []byte) (Nodes, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalNodesImplementation(input []byte) (Nodes, error) { return out, nil } - out := RawNodesImpl{ + var parent BaseNodesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNodesImpl: %+v", err) + } + + return RawNodesImpl{ + nodes: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_pipelinejob.go b/resource-manager/machinelearningservices/2023-10-01/job/model_pipelinejob.go index 1c89d3a4167..6240fcc64da 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_pipelinejob.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_pipelinejob.go @@ -18,6 +18,7 @@ type PipelineJob struct { SourceJobId *string `json:"sourceJobId,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -25,12 +26,30 @@ type PipelineJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s PipelineJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = PipelineJob{} func (s PipelineJob) MarshalJSON() ([]byte, error) { @@ -42,9 +61,10 @@ func (s PipelineJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PipelineJob: %+v", err) } + decoded["jobType"] = "Pipeline" encoded, err = json.Marshal(decoded) @@ -70,6 +90,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Jobs = decoded.Jobs s.Properties = decoded.Properties s.Services = decoded.Services @@ -84,7 +105,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'PipelineJob': %+v", err) } @@ -99,7 +120,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'PipelineJob': %+v", key, err) } @@ -116,7 +137,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'PipelineJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_pytorch.go b/resource-manager/machinelearningservices/2023-10-01/job/model_pytorch.go index a56a9ad6101..13ffe867753 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_pytorch.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_pytorch.go @@ -14,6 +14,14 @@ type PyTorch struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s PyTorch) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = PyTorch{} @@ -27,9 +35,10 @@ func (s PyTorch) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PyTorch: %+v", err) } + decoded["distributionType"] = "PyTorch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_randomsamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/job/model_randomsamplingalgorithm.go index ecc7606980f..5057b869f15 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_randomsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_randomsamplingalgorithm.go @@ -15,6 +15,14 @@ type RandomSamplingAlgorithm struct { Seed *int64 `json:"seed,omitempty"` // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s RandomSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = RandomSamplingAlgorithm{} @@ -28,9 +36,10 @@ func (s RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RandomSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Random" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_regression.go b/resource-manager/machinelearningservices/2023-10-01/job/model_regression.go index c15934ab502..2a22788cfb8 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_regression.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_regression.go @@ -24,11 +24,22 @@ type Regression struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Regression) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Regression{} func (s Regression) MarshalJSON() ([]byte, error) { @@ -40,9 +51,10 @@ func (s Regression) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Regression: %+v", err) } + decoded["taskType"] = "Regression" encoded, err = json.Marshal(decoded) @@ -68,6 +80,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -82,7 +95,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Regression': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_samplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/job/model_samplingalgorithm.go index dab4619b127..a8337cef1ab 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_samplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_samplingalgorithm.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SamplingAlgorithm interface { + SamplingAlgorithm() BaseSamplingAlgorithmImpl } -// RawSamplingAlgorithmImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SamplingAlgorithm = BaseSamplingAlgorithmImpl{} + +type BaseSamplingAlgorithmImpl struct { + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BaseSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s +} + +var _ SamplingAlgorithm = RawSamplingAlgorithmImpl{} + +// RawSamplingAlgorithmImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSamplingAlgorithmImpl struct { - Type string - Values map[string]interface{} + samplingAlgorithm BaseSamplingAlgorithmImpl + Type string + Values map[string]interface{} +} + +func (s RawSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s.samplingAlgorithm } -func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { +func UnmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, return out, nil } - out := RawSamplingAlgorithmImpl{ - Type: value, - Values: temp, + var parent BaseSamplingAlgorithmImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSamplingAlgorithmImpl: %+v", err) } - return out, nil + + return RawSamplingAlgorithmImpl{ + samplingAlgorithm: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_seasonality.go b/resource-manager/machinelearningservices/2023-10-01/job/model_seasonality.go index 2b939f89c89..d07c166df7a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_seasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_seasonality.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Seasonality interface { + Seasonality() BaseSeasonalityImpl } -// RawSeasonalityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Seasonality = BaseSeasonalityImpl{} + +type BaseSeasonalityImpl struct { + Mode SeasonalityMode `json:"mode"` +} + +func (s BaseSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s +} + +var _ Seasonality = RawSeasonalityImpl{} + +// RawSeasonalityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSeasonalityImpl struct { - Type string - Values map[string]interface{} + seasonality BaseSeasonalityImpl + Type string + Values map[string]interface{} +} + +func (s RawSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s.seasonality } -func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { +func UnmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { return out, nil } - out := RawSeasonalityImpl{ - Type: value, - Values: temp, + var parent BaseSeasonalityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSeasonalityImpl: %+v", err) } - return out, nil + + return RawSeasonalityImpl{ + seasonality: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjob.go b/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjob.go index dfd33f48d18..b87e7e8fd89 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjob.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjob.go @@ -22,6 +22,7 @@ type SweepJob struct { Trial TrialComponent `json:"trial"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -29,12 +30,30 @@ type SweepJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s SweepJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SweepJob{} func (s SweepJob) MarshalJSON() ([]byte, error) { @@ -46,9 +65,10 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJob: %+v", err) } + decoded["jobType"] = "Sweep" encoded, err = json.Marshal(decoded) @@ -74,6 +94,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Limits = decoded.Limits s.Objective = decoded.Objective s.Properties = decoded.Properties @@ -90,7 +111,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'SweepJob': %+v", err) } @@ -98,7 +119,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SweepJob': %+v", err) } @@ -113,7 +134,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SweepJob': %+v", key, err) } @@ -130,7 +151,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SweepJob': %+v", key, err) } @@ -140,7 +161,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["samplingAlgorithm"]; ok { - impl, err := unmarshalSamplingAlgorithmImplementation(v) + impl, err := UnmarshalSamplingAlgorithmImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SamplingAlgorithm' for 'SweepJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjoblimits.go b/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjoblimits.go index a73d6667657..454fac2fd83 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjoblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_sweepjoblimits.go @@ -16,7 +16,16 @@ type SweepJobLimits struct { TrialTimeout *string `json:"trialTimeout,omitempty"` // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s SweepJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = SweepJobLimits{} @@ -30,9 +39,10 @@ func (s SweepJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Sweep" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_targetlags.go b/resource-manager/machinelearningservices/2023-10-01/job/model_targetlags.go index 3f152e6b924..32c747cc057 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_targetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_targetlags.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetLags interface { + TargetLags() BaseTargetLagsImpl } -// RawTargetLagsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetLags = BaseTargetLagsImpl{} + +type BaseTargetLagsImpl struct { + Mode TargetLagsMode `json:"mode"` +} + +func (s BaseTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s +} + +var _ TargetLags = RawTargetLagsImpl{} + +// RawTargetLagsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetLagsImpl struct { - Type string - Values map[string]interface{} + targetLags BaseTargetLagsImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s.targetLags } -func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { +func UnmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { return out, nil } - out := RawTargetLagsImpl{ - Type: value, - Values: temp, + var parent BaseTargetLagsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetLagsImpl: %+v", err) } - return out, nil + + return RawTargetLagsImpl{ + targetLags: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_targetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/job/model_targetrollingwindowsize.go index 20432cc35e5..35de2cb32af 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_targetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_targetrollingwindowsize.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetRollingWindowSize interface { + TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl } -// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetRollingWindowSize = BaseTargetRollingWindowSizeImpl{} + +type BaseTargetRollingWindowSizeImpl struct { + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s BaseTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s +} + +var _ TargetRollingWindowSize = RawTargetRollingWindowSizeImpl{} + +// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetRollingWindowSizeImpl struct { - Type string - Values map[string]interface{} + targetRollingWindowSize BaseTargetRollingWindowSizeImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s.targetRollingWindowSize } -func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { +func UnmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRolling return out, nil } - out := RawTargetRollingWindowSizeImpl{ - Type: value, - Values: temp, + var parent BaseTargetRollingWindowSizeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetRollingWindowSizeImpl: %+v", err) } - return out, nil + + return RawTargetRollingWindowSizeImpl{ + targetRollingWindowSize: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_tensorflow.go b/resource-manager/machinelearningservices/2023-10-01/job/model_tensorflow.go index f312888de90..3c253e1be1f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_tensorflow.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_tensorflow.go @@ -15,6 +15,14 @@ type TensorFlow struct { WorkerCount *int64 `json:"workerCount,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s TensorFlow) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = TensorFlow{} @@ -28,9 +36,10 @@ func (s TensorFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TensorFlow: %+v", err) } + decoded["distributionType"] = "TensorFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_textclassification.go b/resource-manager/machinelearningservices/2023-10-01/job/model_textclassification.go index f53e965a2e0..2931cc4b784 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_textclassification.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_textclassification.go @@ -17,11 +17,22 @@ type TextClassification struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassification{} func (s TextClassification) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassification: %+v", err) } + decoded["taskType"] = "TextClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_textclassificationmultilabel.go b/resource-manager/machinelearningservices/2023-10-01/job/model_textclassificationmultilabel.go index 24edadae01a..a6c15773558 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_textclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_textclassificationmultilabel.go @@ -17,11 +17,22 @@ type TextClassificationMultilabel struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassificationMultilabel{} func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassificationMultilabel: %+v", err) } + decoded["taskType"] = "TextClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_textner.go b/resource-manager/machinelearningservices/2023-10-01/job/model_textner.go index bb3c702526b..481ae1e0a51 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_textner.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_textner.go @@ -17,11 +17,22 @@ type TextNer struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextNer) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextNer{} func (s TextNer) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextNer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextNer: %+v", err) } + decoded["taskType"] = "TextNER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_trialcomponent.go b/resource-manager/machinelearningservices/2023-10-01/job/model_trialcomponent.go index a12d8a20ad3..13976e9698d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_trialcomponent.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_trialcomponent.go @@ -38,7 +38,7 @@ func (s *TrialComponent) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'TrialComponent': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljobinput.go index f72ac7137e6..cb1aa8e5955 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljobinput.go @@ -15,7 +15,16 @@ type TritonModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s TritonModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = TritonModelJobInput{} @@ -29,9 +38,10 @@ func (s TritonModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobInput: %+v", err) } + decoded["jobInputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljoboutput.go index 34c7733e05b..c01b418e890 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_tritonmodeljoboutput.go @@ -15,7 +15,16 @@ type TritonModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s TritonModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = TritonModelJobOutput{} @@ -29,9 +38,10 @@ func (s TritonModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_truncationselectionpolicy.go b/resource-manager/machinelearningservices/2023-10-01/job/model_truncationselectionpolicy.go index 4bcfab514c8..6f7bdc5a76d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_truncationselectionpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_truncationselectionpolicy.go @@ -14,8 +14,18 @@ type TruncationSelectionPolicy struct { TruncationPercentage *int64 `json:"truncationPercentage,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s TruncationSelectionPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = TruncationSelectionPolicy{} @@ -29,9 +39,10 @@ func (s TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TruncationSelectionPolicy: %+v", err) } + decoded["policyType"] = "TruncationSelection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejobinput.go index 2cdc66e2ad8..da8491b514b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejobinput.go @@ -15,7 +15,16 @@ type UriFileJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFileJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFileJobInput{} @@ -29,9 +38,10 @@ func (s UriFileJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobInput: %+v", err) } + decoded["jobInputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejoboutput.go index b1b0bf9b886..2e0588a2aed 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_urifilejoboutput.go @@ -15,7 +15,16 @@ type UriFileJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFileJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFileJobOutput{} @@ -29,9 +38,10 @@ func (s UriFileJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjobinput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjobinput.go index 0326766bf1d..93d54a955c6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjobinput.go @@ -15,7 +15,16 @@ type UriFolderJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFolderJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFolderJobInput{} @@ -29,9 +38,10 @@ func (s UriFolderJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobInput: %+v", err) } + decoded["jobInputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjoboutput.go b/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjoboutput.go index 186181abef8..368d535cedd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_urifolderjoboutput.go @@ -15,7 +15,16 @@ type UriFolderJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFolderJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFolderJobOutput{} @@ -29,9 +38,10 @@ func (s UriFolderJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/model_useridentity.go b/resource-manager/machinelearningservices/2023-10-01/job/model_useridentity.go index 2de31367108..938c1408fc4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/model_useridentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/model_useridentity.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = UserIdentity{} type UserIdentity struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s UserIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = UserIdentity{} @@ -26,9 +34,10 @@ func (s UserIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserIdentity: %+v", err) } + decoded["identityType"] = "UserIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/job/version.go b/resource-manager/machinelearningservices/2023-10-01/job/version.go index 911af7fc285..f630eecd872 100644 --- a/resource-manager/machinelearningservices/2023-10-01/job/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/README.md b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/README.md index 0d0aefd4874..de3ec4a075e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes` Documentation -The `machinelearningcomputes` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `machinelearningcomputes` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/client.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/client.go index 84356e1d8d5..7c06a2fa111 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/client.go @@ -15,7 +15,7 @@ type MachineLearningComputesClient struct { } func NewMachineLearningComputesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineLearningComputesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinelearningcomputes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinelearningcomputes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineLearningComputesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_compute.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_compute.go index bc40b6f35c7..f80c26362ad 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_compute.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_compute.go @@ -44,7 +44,7 @@ func ParseComputeID(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComputeIDInsensitively(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_workspace.go index 3aad50eb7f3..1bfc8b917ce 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computedelete.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computedelete.go index dc6079dda52..bd200979d82 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computedelete.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computedelete.go @@ -36,6 +36,7 @@ func (o ComputeDeleteOperationOptions) ToHeaders() *client.Headers { func (o ComputeDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computeget.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computeget.go index e893e2799b4..efcd93aead0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computeget.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computeget.go @@ -45,7 +45,6 @@ func (c MachineLearningComputesClient) ComputeGet(ctx context.Context, id Comput var model ComputeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelist.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelist.go index 8641953d2f8..be727b9ad2f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelist.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelist.go @@ -39,6 +39,7 @@ func (o ComputeListOperationOptions) ToHeaders() *client.Headers { func (o ComputeListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelistkeys.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelistkeys.go index ea4b0e26f9c..0ba7e650f66 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelistkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/method_computelistkeys.go @@ -16,7 +16,7 @@ import ( type ComputeListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ComputeSecrets + Model ComputeSecrets } // ComputeListKeys ... @@ -49,11 +49,11 @@ func (c MachineLearningComputesClient) ComputeListKeys(ctx context.Context, id C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalComputeSecretsImplementation(respObj) + model, err := UnmarshalComputeSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_aks.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_aks.go index c1e56af49ca..47e58464f4c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_aks.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_aks.go @@ -17,7 +17,9 @@ type AKS struct { Properties *AKSSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AKS struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AKS) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AKS) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AKS) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AKS: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_akscomputesecrets.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_akscomputesecrets.go index 1631eeb546f..bc1d732f866 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_akscomputesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_akscomputesecrets.go @@ -16,6 +16,14 @@ type AksComputeSecrets struct { UserKubeConfig *string `json:"userKubeConfig,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s AksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = AksComputeSecrets{} @@ -29,9 +37,10 @@ func (s AksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AksComputeSecrets: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_amlcompute.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_amlcompute.go index 3f1c2957bf4..bb3a49f8bdc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_amlcompute.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_amlcompute.go @@ -17,7 +17,9 @@ type AmlCompute struct { Properties *AmlComputeProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AmlCompute struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AmlCompute) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AmlCompute) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AmlCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlCompute: %+v", err) } + decoded["computeType"] = "AmlCompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_compute.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_compute.go index 36f9d37457d..391e85765b4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_compute.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_compute.go @@ -10,18 +10,44 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Compute interface { + Compute() BaseComputeImpl } -// RawComputeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Compute = BaseComputeImpl{} + +type BaseComputeImpl struct { + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` + CreatedOn *string `json:"createdOn,omitempty"` + Description *string `json:"description,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"` + ModifiedOn *string `json:"modifiedOn,omitempty"` + ProvisioningErrors *[]ErrorResponse `json:"provisioningErrors,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} + +func (s BaseComputeImpl) Compute() BaseComputeImpl { + return s +} + +var _ Compute = RawComputeImpl{} + +// RawComputeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeImpl struct { - Type string - Values map[string]interface{} + compute BaseComputeImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeImpl) Compute() BaseComputeImpl { + return s.compute } -func unmarshalComputeImplementation(input []byte) (Compute, error) { +func UnmarshalComputeImplementation(input []byte) (Compute, error) { if input == nil { return nil, nil } @@ -116,10 +142,15 @@ func unmarshalComputeImplementation(input []byte) (Compute, error) { return out, nil } - out := RawComputeImpl{ - Type: value, - Values: temp, + var parent BaseComputeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeImpl: %+v", err) } - return out, nil + + return RawComputeImpl{ + compute: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeinstance.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeinstance.go index 292c0c1a375..10054583862 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeinstance.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeinstance.go @@ -17,7 +17,9 @@ type ComputeInstance struct { Properties *ComputeInstanceProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type ComputeInstance struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s ComputeInstance) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *ComputeInstance) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s ComputeInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ComputeInstance: %+v", err) } + decoded["computeType"] = "ComputeInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeresource.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeresource.go index 4d4a4646b3e..ad4c3e8a20f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computeresource.go @@ -47,7 +47,7 @@ func (s *ComputeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalComputeImplementation(v) + impl, err := UnmarshalComputeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ComputeResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computesecrets.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computesecrets.go index 9df90b89da3..c63a7983007 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_computesecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ComputeSecrets interface { + ComputeSecrets() BaseComputeSecretsImpl } -// RawComputeSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ComputeSecrets = BaseComputeSecretsImpl{} + +type BaseComputeSecretsImpl struct { + ComputeType ComputeType `json:"computeType"` +} + +func (s BaseComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s +} + +var _ ComputeSecrets = RawComputeSecretsImpl{} + +// RawComputeSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeSecretsImpl struct { - Type string - Values map[string]interface{} + computeSecrets BaseComputeSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s.computeSecrets } -func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { +func UnmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) return out, nil } - out := RawComputeSecretsImpl{ - Type: value, - Values: temp, + var parent BaseComputeSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeSecretsImpl: %+v", err) } - return out, nil + + return RawComputeSecretsImpl{ + computeSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databricks.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databricks.go index 3018dda2dea..6ead8d21e03 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databricks.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databricks.go @@ -17,7 +17,9 @@ type Databricks struct { Properties *DatabricksProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Databricks struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Databricks) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Databricks) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Databricks) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Databricks: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databrickscomputesecrets.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databrickscomputesecrets.go index 8beb9215889..c076e457360 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databrickscomputesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_databrickscomputesecrets.go @@ -14,6 +14,14 @@ type DatabricksComputeSecrets struct { DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s DatabricksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = DatabricksComputeSecrets{} @@ -27,9 +35,10 @@ func (s DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksComputeSecrets: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datafactory.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datafactory.go index 25a38345b02..bd37468d428 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datafactory.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datafactory.go @@ -16,7 +16,9 @@ var _ Compute = DataFactory{} type DataFactory struct { // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -27,6 +29,21 @@ type DataFactory struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataFactory) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataFactory) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -62,9 +79,10 @@ func (s DataFactory) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataFactory: %+v", err) } + decoded["computeType"] = "DataFactory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datalakeanalytics.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datalakeanalytics.go index 346316396bd..9c304ddb04e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datalakeanalytics.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_datalakeanalytics.go @@ -17,7 +17,9 @@ type DataLakeAnalytics struct { Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type DataLakeAnalytics struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataLakeAnalytics) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataLakeAnalytics) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s DataLakeAnalytics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataLakeAnalytics: %+v", err) } + decoded["computeType"] = "DataLakeAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_hdinsight.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_hdinsight.go index d0034c74c63..4e043b808fb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_hdinsight.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_hdinsight.go @@ -17,7 +17,9 @@ type HDInsight struct { Properties *HDInsightProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type HDInsight struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s HDInsight) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *HDInsight) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s HDInsight) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsight: %+v", err) } + decoded["computeType"] = "HDInsight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_kubernetes.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_kubernetes.go index 7818fb5fdf9..f74ac98dbde 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_kubernetes.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_kubernetes.go @@ -17,7 +17,9 @@ type Kubernetes struct { Properties *KubernetesProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Kubernetes struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Kubernetes) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Kubernetes) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Kubernetes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Kubernetes: %+v", err) } + decoded["computeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_synapsespark.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_synapsespark.go index 494454096ea..54cc3af0202 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_synapsespark.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_synapsespark.go @@ -17,7 +17,9 @@ type SynapseSpark struct { Properties *SynapseSparkProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type SynapseSpark struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s SynapseSpark) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *SynapseSpark) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s SynapseSpark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseSpark: %+v", err) } + decoded["computeType"] = "SynapseSpark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachine.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachine.go index 6a07ffd4f6e..5ab5de8c18f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachine.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachine.go @@ -17,7 +17,9 @@ type VirtualMachine struct { Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type VirtualMachine struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s VirtualMachine) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *VirtualMachine) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s VirtualMachine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachine: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachinesecrets.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachinesecrets.go index 9db81884f8f..b31384b4a2e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachinesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/model_virtualmachinesecrets.go @@ -14,6 +14,14 @@ type VirtualMachineSecrets struct { AdministratorAccount *VirtualMachineSshCredentials `json:"administratorAccount,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s VirtualMachineSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = VirtualMachineSecrets{} @@ -27,9 +35,10 @@ func (s VirtualMachineSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineSecrets: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/version.go b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/version.go index c042d7bc668..907264abadd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/machinelearningcomputes/version.go @@ -1,12 +1,10 @@ package machinelearningcomputes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinelearningcomputes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinelearningcomputes/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/README.md b/resource-manager/machinelearningservices/2023-10-01/managednetwork/README.md index 466a544b87f..e25fe97d006 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/managednetwork` Documentation -The `managednetwork` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `managednetwork` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/client.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/client.go index 6313700a6ea..7167dbc42a4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/client.go @@ -15,7 +15,7 @@ type ManagedNetworkClient struct { } func NewManagedNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managednetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managednetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedNetworkClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_outboundrule.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_outboundrule.go index e8f379567d6..0734954dbe6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_outboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_workspace.go index cd60cc5e74a..d116c084b63 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/method_settingsruleget.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/method_settingsruleget.go index 87f7ac2e344..d9e4990d783 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/method_settingsruleget.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/method_settingsruleget.go @@ -45,7 +45,6 @@ func (c ManagedNetworkClient) SettingsRuleGet(ctx context.Context, id OutboundRu var model OutboundRuleBasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_fqdnoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_fqdnoutboundrule.go index 70921895572..c68f41f0977 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_fqdnoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_fqdnoutboundrule.go @@ -14,8 +14,18 @@ type FqdnOutboundRule struct { Destination *string `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s FqdnOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = FqdnOutboundRule{} @@ -29,9 +39,10 @@ func (s FqdnOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FqdnOutboundRule: %+v", err) } + decoded["type"] = "FQDN" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrule.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrule.go index 8e5529b02dc..ad446182da9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutboundRule interface { + OutboundRule() BaseOutboundRuleImpl } -// RawOutboundRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutboundRule = BaseOutboundRuleImpl{} + +type BaseOutboundRuleImpl struct { + Category *RuleCategory `json:"category,omitempty"` + Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s BaseOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s +} + +var _ OutboundRule = RawOutboundRuleImpl{} + +// RawOutboundRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutboundRuleImpl struct { - Type string - Values map[string]interface{} + outboundRule BaseOutboundRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s.outboundRule } -func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { +func UnmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { return out, nil } - out := RawOutboundRuleImpl{ - Type: value, - Values: temp, + var parent BaseOutboundRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutboundRuleImpl: %+v", err) } - return out, nil + + return RawOutboundRuleImpl{ + outboundRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrulebasicresource.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrulebasicresource.go index 8c333ed73f1..05517c0bf9f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrulebasicresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_outboundrulebasicresource.go @@ -38,7 +38,7 @@ func (s *OutboundRuleBasicResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalOutboundRuleImplementation(v) + impl, err := UnmarshalOutboundRuleImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'OutboundRuleBasicResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_privateendpointoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_privateendpointoutboundrule.go index da6f88ed30c..6bda20dd829 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_privateendpointoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_privateendpointoutboundrule.go @@ -14,8 +14,18 @@ type PrivateEndpointOutboundRule struct { Destination *PrivateEndpointDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s PrivateEndpointOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = PrivateEndpointOutboundRule{} @@ -29,9 +39,10 @@ func (s PrivateEndpointOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrivateEndpointOutboundRule: %+v", err) } + decoded["type"] = "PrivateEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_servicetagoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_servicetagoutboundrule.go index 2bb23ca8815..268a1b09c83 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_servicetagoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/model_servicetagoutboundrule.go @@ -14,8 +14,18 @@ type ServiceTagOutboundRule struct { Destination *ServiceTagDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s ServiceTagOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = ServiceTagOutboundRule{} @@ -29,9 +39,10 @@ func (s ServiceTagOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceTagOutboundRule: %+v", err) } + decoded["type"] = "ServiceTag" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/managednetwork/version.go b/resource-manager/machinelearningservices/2023-10-01/managednetwork/version.go index 36c3e6839ef..738cb126f7d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/managednetwork/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/managednetwork/version.go @@ -1,12 +1,10 @@ package managednetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managednetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managednetwork/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/README.md b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/README.md index 62bb4c4191b..cb3f9876b69 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/modelcontainer` Documentation -The `modelcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `modelcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/client.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/client.go index e5a4767f83d..3404b406aa0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/client.go @@ -15,7 +15,7 @@ type ModelContainerClient struct { } func NewModelContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "modelcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "modelcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_model.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_model.go index 5b7ff94b3d2..cc0922c2b9f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_model.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_model.go @@ -44,7 +44,7 @@ func ParseModelID(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModelIDInsensitively(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registry.go index a895c841c79..c97902ab652 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registrymodel.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registrymodel.go index 8144a7fad2a..3ca78e4dbc9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registrymodel.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_registrymodel.go @@ -44,7 +44,7 @@ func ParseRegistryModelID(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryModelIDInsensitively(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_workspace.go index 7d43d27798d..8ed35e0c7f8 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_createorupdate.go index d0d3f9a863b..e1041569d1c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModelContainerClient) CreateOrUpdate(ctx context.Context, id ModelId, in var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_get.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_get.go index 515341b3c5b..66adb267096 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_get.go @@ -45,7 +45,6 @@ func (c ModelContainerClient) Get(ctx context.Context, id ModelId) (result GetOp var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_list.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_list.go index 84e5cb5e7bd..2eaced29d85 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainersget.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainersget.go index 230a1b45124..d8458035545 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainersget.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainersget.go @@ -45,7 +45,6 @@ func (c ModelContainerClient) RegistryModelContainersGet(ctx context.Context, id var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainerslist.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainerslist.go index ea94cac36d1..d01d18bbd84 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainerslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/method_registrymodelcontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryModelContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryModelContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/version.go b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/version.go index 29851c57395..f54b7436ec3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelcontainer/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelcontainer/version.go @@ -1,12 +1,10 @@ package modelcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/modelcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/modelcontainer/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/README.md b/resource-manager/machinelearningservices/2023-10-01/modelversion/README.md index 543d494a3f6..9dd7b98f95f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/modelversion` Documentation -The `modelversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `modelversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/client.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/client.go index c0da321d0e5..f2b5e5fa8c2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/client.go @@ -15,7 +15,7 @@ type ModelVersionClient struct { } func NewModelVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "modelversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "modelversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_model.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_model.go index 3c0be9426a5..0885f3b10d1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_model.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_model.go @@ -44,7 +44,7 @@ func ParseModelID(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModelIDInsensitively(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_modelversion.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_modelversion.go index 93794ec428f..23014727b4c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_modelversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_modelversion.go @@ -46,7 +46,7 @@ func ParseModelVersionID(input string) (*ModelVersionId, error) { } id := ModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModelVersionIDInsensitively(input string) (*ModelVersionId, error) { } id := ModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodel.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodel.go index 5a94130f392..4d6249dc4a2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodel.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodel.go @@ -44,7 +44,7 @@ func ParseRegistryModelID(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryModelIDInsensitively(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodelversion.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodelversion.go index a829580d0df..cfc47eb832a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodelversion.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/id_registrymodelversion.go @@ -46,7 +46,7 @@ func ParseRegistryModelVersionID(input string) (*RegistryModelVersionId, error) } id := RegistryModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryModelVersionIDInsensitively(input string) (*RegistryModelVersi } id := RegistryModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_createorupdate.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_createorupdate.go index d51569f2055..0f6670fb5dd 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModelVersionClient) CreateOrUpdate(ctx context.Context, id ModelVersionI var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_get.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_get.go index c26f26ba2a5..4e318f7353e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_get.go @@ -45,7 +45,6 @@ func (c ModelVersionClient) Get(ctx context.Context, id ModelVersionId) (result var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_list.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_list.go index ab7c9714135..11f72b9413b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_list.go @@ -48,6 +48,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go index 2e3aab0c47a..c79401b3454 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c ModelVersionClient) RegistryModelVersionsCreateOrGetStartPendingUpload(c var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionsget.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionsget.go index 23f8c162b30..e0a77444a2f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionsget.go @@ -45,7 +45,6 @@ func (c ModelVersionClient) RegistryModelVersionsGet(ctx context.Context, id Reg var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionslist.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionslist.go index 5234afd2cdb..38d74637469 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/method_registrymodelversionslist.go @@ -46,6 +46,7 @@ func (o RegistryModelVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryModelVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_blobreferenceforconsumptiondto.go index a810f7af00f..4eced688c3d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_pendinguploadcredentialdto.go index de22fe14dc1..14e1bc5d8a1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_sascredentialdto.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_sascredentialdto.go index b77ee0d3590..1c8b88412fc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/modelversion/version.go b/resource-manager/machinelearningservices/2023-10-01/modelversion/version.go index 1286eb65626..439b3990c61 100644 --- a/resource-manager/machinelearningservices/2023-10-01/modelversion/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/modelversion/version.go @@ -1,12 +1,10 @@ package modelversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/modelversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/modelversion/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/README.md b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/README.md index 7f2979a0acd..f250fe1e518 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/onlinedeployment` Documentation -The `onlinedeployment` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `onlinedeployment` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/client.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/client.go index 6fabd7b2eac..b89f27bf3fc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/client.go @@ -15,7 +15,7 @@ type OnlineDeploymentClient struct { } func NewOnlineDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*OnlineDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "onlinedeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "onlinedeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OnlineDeploymentClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpoint.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpoint.go index eab70ce70fb..2b7367360d7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpoint.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpoint.go @@ -44,7 +44,7 @@ func ParseOnlineEndpointID(input string) (*OnlineEndpointId, error) { } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnlineEndpointIDInsensitively(input string) (*OnlineEndpointId, error) } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpointdeployment.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpointdeployment.go index 0f6df020655..9ea7a41b649 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpointdeployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/id_onlineendpointdeployment.go @@ -46,7 +46,7 @@ func ParseOnlineEndpointDeploymentID(input string) (*OnlineEndpointDeploymentId, } id := OnlineEndpointDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOnlineEndpointDeploymentIDInsensitively(input string) (*OnlineEndpoint } id := OnlineEndpointDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_get.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_get.go index c17bbaac35b..a10bc75e646 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_get.go @@ -45,7 +45,6 @@ func (c OnlineDeploymentClient) Get(ctx context.Context, id OnlineEndpointDeploy var model OnlineDeploymentTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_getlogs.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_getlogs.go index 66a61739fab..7e9e4964bc6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_getlogs.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_getlogs.go @@ -50,7 +50,6 @@ func (c OnlineDeploymentClient) GetLogs(ctx context.Context, id OnlineEndpointDe var model DeploymentLogs result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_list.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_list.go index 774531ae70e..3b219f5d0e6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_listskus.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_listskus.go index 234177e825c..f2374db32ae 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_listskus.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/method_listskus.go @@ -40,6 +40,7 @@ func (o ListSkusOperationOptions) ToHeaders() *client.Headers { func (o ListSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_defaultscalesettings.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_defaultscalesettings.go index 511291a2736..6235621a9a2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_defaultscalesettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_defaultscalesettings.go @@ -13,6 +13,14 @@ var _ OnlineScaleSettings = DefaultScaleSettings{} type DefaultScaleSettings struct { // Fields inherited from OnlineScaleSettings + + ScaleType ScaleType `json:"scaleType"` +} + +func (s DefaultScaleSettings) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return BaseOnlineScaleSettingsImpl{ + ScaleType: s.ScaleType, + } } var _ json.Marshaler = DefaultScaleSettings{} @@ -26,9 +34,10 @@ func (s DefaultScaleSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultScaleSettings: %+v", err) } + decoded["scaleType"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_kubernetesonlinedeployment.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_kubernetesonlinedeployment.go index fc44ea2952d..abecf4b4e8a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_kubernetesonlinedeployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_kubernetesonlinedeployment.go @@ -14,10 +14,12 @@ type KubernetesOnlineDeployment struct { ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` // Fields inherited from OnlineDeployment + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` Description *string `json:"description,omitempty"` EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` EnvironmentId *string `json:"environmentId,omitempty"` EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` InstanceType *string `json:"instanceType,omitempty"` @@ -31,6 +33,27 @@ type KubernetesOnlineDeployment struct { ScaleSettings OnlineScaleSettings `json:"scaleSettings"` } +func (s KubernetesOnlineDeployment) OnlineDeployment() BaseOnlineDeploymentImpl { + return BaseOnlineDeploymentImpl{ + AppInsightsEnabled: s.AppInsightsEnabled, + CodeConfiguration: s.CodeConfiguration, + Description: s.Description, + EgressPublicNetworkAccess: s.EgressPublicNetworkAccess, + EndpointComputeType: s.EndpointComputeType, + EnvironmentId: s.EnvironmentId, + EnvironmentVariables: s.EnvironmentVariables, + InstanceType: s.InstanceType, + LivenessProbe: s.LivenessProbe, + Model: s.Model, + ModelMountPath: s.ModelMountPath, + Properties: s.Properties, + ProvisioningState: s.ProvisioningState, + ReadinessProbe: s.ReadinessProbe, + RequestSettings: s.RequestSettings, + ScaleSettings: s.ScaleSettings, + } +} + var _ json.Marshaler = KubernetesOnlineDeployment{} func (s KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { @@ -42,9 +65,10 @@ func (s KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesOnlineDeployment: %+v", err) } + decoded["endpointComputeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) @@ -69,6 +93,7 @@ func (s *KubernetesOnlineDeployment) UnmarshalJSON(bytes []byte) error { s.ContainerResourceRequirements = decoded.ContainerResourceRequirements s.Description = decoded.Description s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType s.EnvironmentId = decoded.EnvironmentId s.EnvironmentVariables = decoded.EnvironmentVariables s.InstanceType = decoded.InstanceType @@ -86,7 +111,7 @@ func (s *KubernetesOnlineDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scaleSettings"]; ok { - impl, err := unmarshalOnlineScaleSettingsImplementation(v) + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'KubernetesOnlineDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_managedonlinedeployment.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_managedonlinedeployment.go index b5da7d2b4a0..c1b465c96bc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_managedonlinedeployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_managedonlinedeployment.go @@ -13,10 +13,12 @@ var _ OnlineDeployment = ManagedOnlineDeployment{} type ManagedOnlineDeployment struct { // Fields inherited from OnlineDeployment + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` Description *string `json:"description,omitempty"` EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` EnvironmentId *string `json:"environmentId,omitempty"` EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` InstanceType *string `json:"instanceType,omitempty"` @@ -30,6 +32,27 @@ type ManagedOnlineDeployment struct { ScaleSettings OnlineScaleSettings `json:"scaleSettings"` } +func (s ManagedOnlineDeployment) OnlineDeployment() BaseOnlineDeploymentImpl { + return BaseOnlineDeploymentImpl{ + AppInsightsEnabled: s.AppInsightsEnabled, + CodeConfiguration: s.CodeConfiguration, + Description: s.Description, + EgressPublicNetworkAccess: s.EgressPublicNetworkAccess, + EndpointComputeType: s.EndpointComputeType, + EnvironmentId: s.EnvironmentId, + EnvironmentVariables: s.EnvironmentVariables, + InstanceType: s.InstanceType, + LivenessProbe: s.LivenessProbe, + Model: s.Model, + ModelMountPath: s.ModelMountPath, + Properties: s.Properties, + ProvisioningState: s.ProvisioningState, + ReadinessProbe: s.ReadinessProbe, + RequestSettings: s.RequestSettings, + ScaleSettings: s.ScaleSettings, + } +} + var _ json.Marshaler = ManagedOnlineDeployment{} func (s ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { @@ -41,9 +64,10 @@ func (s ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedOnlineDeployment: %+v", err) } + decoded["endpointComputeType"] = "Managed" encoded, err = json.Marshal(decoded) @@ -67,6 +91,7 @@ func (s *ManagedOnlineDeployment) UnmarshalJSON(bytes []byte) error { s.CodeConfiguration = decoded.CodeConfiguration s.Description = decoded.Description s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType s.EnvironmentId = decoded.EnvironmentId s.EnvironmentVariables = decoded.EnvironmentVariables s.InstanceType = decoded.InstanceType @@ -84,7 +109,7 @@ func (s *ManagedOnlineDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scaleSettings"]; ok { - impl, err := unmarshalOnlineScaleSettingsImplementation(v) + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'ManagedOnlineDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeployment.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeployment.go index c08c6049017..a594935f677 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeployment.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeployment.go @@ -10,18 +10,90 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OnlineDeployment interface { + OnlineDeployment() BaseOnlineDeploymentImpl } -// RawOnlineDeploymentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OnlineDeployment = BaseOnlineDeploymentImpl{} + +type BaseOnlineDeploymentImpl struct { + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + Description *string `json:"description,omitempty"` + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` + EnvironmentId *string `json:"environmentId,omitempty"` + EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` + InstanceType *string `json:"instanceType,omitempty"` + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + Model *string `json:"model,omitempty"` + ModelMountPath *string `json:"modelMountPath,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty"` + ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + ScaleSettings OnlineScaleSettings `json:"scaleSettings"` +} + +func (s BaseOnlineDeploymentImpl) OnlineDeployment() BaseOnlineDeploymentImpl { + return s +} + +var _ OnlineDeployment = RawOnlineDeploymentImpl{} + +// RawOnlineDeploymentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOnlineDeploymentImpl struct { - Type string - Values map[string]interface{} + onlineDeployment BaseOnlineDeploymentImpl + Type string + Values map[string]interface{} +} + +func (s RawOnlineDeploymentImpl) OnlineDeployment() BaseOnlineDeploymentImpl { + return s.onlineDeployment } -func unmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, error) { +var _ json.Unmarshaler = &BaseOnlineDeploymentImpl{} + +func (s *BaseOnlineDeploymentImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseOnlineDeploymentImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseOnlineDeploymentImpl: %+v", err) + } + + s.AppInsightsEnabled = decoded.AppInsightsEnabled + s.CodeConfiguration = decoded.CodeConfiguration + s.Description = decoded.Description + s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType + s.EnvironmentId = decoded.EnvironmentId + s.EnvironmentVariables = decoded.EnvironmentVariables + s.InstanceType = decoded.InstanceType + s.LivenessProbe = decoded.LivenessProbe + s.Model = decoded.Model + s.ModelMountPath = decoded.ModelMountPath + s.Properties = decoded.Properties + s.ProvisioningState = decoded.ProvisioningState + s.ReadinessProbe = decoded.ReadinessProbe + s.RequestSettings = decoded.RequestSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseOnlineDeploymentImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["scaleSettings"]; ok { + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'BaseOnlineDeploymentImpl': %+v", err) + } + s.ScaleSettings = impl + } + return nil +} + +func UnmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, error) { if input == nil { return nil, nil } @@ -52,10 +124,15 @@ func unmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, er return out, nil } - out := RawOnlineDeploymentImpl{ - Type: value, - Values: temp, + var parent BaseOnlineDeploymentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOnlineDeploymentImpl: %+v", err) } - return out, nil + + return RawOnlineDeploymentImpl{ + onlineDeployment: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeploymenttrackedresource.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeploymenttrackedresource.go index 40ca1d834a4..42bc9215f53 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeploymenttrackedresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinedeploymenttrackedresource.go @@ -49,7 +49,7 @@ func (s *OnlineDeploymentTrackedResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalOnlineDeploymentImplementation(v) + impl, err := UnmarshalOnlineDeploymentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'OnlineDeploymentTrackedResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinescalesettings.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinescalesettings.go index 50bf9a5fdd4..bd1cfe7fc32 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinescalesettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_onlinescalesettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OnlineScaleSettings interface { + OnlineScaleSettings() BaseOnlineScaleSettingsImpl } -// RawOnlineScaleSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OnlineScaleSettings = BaseOnlineScaleSettingsImpl{} + +type BaseOnlineScaleSettingsImpl struct { + ScaleType ScaleType `json:"scaleType"` +} + +func (s BaseOnlineScaleSettingsImpl) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return s +} + +var _ OnlineScaleSettings = RawOnlineScaleSettingsImpl{} + +// RawOnlineScaleSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOnlineScaleSettingsImpl struct { - Type string - Values map[string]interface{} + onlineScaleSettings BaseOnlineScaleSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawOnlineScaleSettingsImpl) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return s.onlineScaleSettings } -func unmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettings, error) { +func UnmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettings, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettin return out, nil } - out := RawOnlineScaleSettingsImpl{ - Type: value, - Values: temp, + var parent BaseOnlineScaleSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOnlineScaleSettingsImpl: %+v", err) } - return out, nil + + return RawOnlineScaleSettingsImpl{ + onlineScaleSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_targetutilizationscalesettings.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_targetutilizationscalesettings.go index 4e357eade94..0dce1012760 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_targetutilizationscalesettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/model_targetutilizationscalesettings.go @@ -17,6 +17,14 @@ type TargetUtilizationScaleSettings struct { TargetUtilizationPercentage *int64 `json:"targetUtilizationPercentage,omitempty"` // Fields inherited from OnlineScaleSettings + + ScaleType ScaleType `json:"scaleType"` +} + +func (s TargetUtilizationScaleSettings) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return BaseOnlineScaleSettingsImpl{ + ScaleType: s.ScaleType, + } } var _ json.Marshaler = TargetUtilizationScaleSettings{} @@ -30,9 +38,10 @@ func (s TargetUtilizationScaleSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TargetUtilizationScaleSettings: %+v", err) } + decoded["scaleType"] = "TargetUtilization" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/version.go b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/version.go index 323742f269a..97a6591fde0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlinedeployment/version.go @@ -1,12 +1,10 @@ package onlinedeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/onlinedeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/onlinedeployment/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/README.md b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/README.md index ce00f1b42d0..dd305eb48b2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/onlineendpoint` Documentation -The `onlineendpoint` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `onlineendpoint` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/client.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/client.go index bfe50dea25a..9dfb0f561b5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/client.go @@ -15,7 +15,7 @@ type OnlineEndpointClient struct { } func NewOnlineEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*OnlineEndpointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "onlineendpoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "onlineendpoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OnlineEndpointClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_onlineendpoint.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_onlineendpoint.go index 0953363e068..7059ae3b054 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_onlineendpoint.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_onlineendpoint.go @@ -44,7 +44,7 @@ func ParseOnlineEndpointID(input string) (*OnlineEndpointId, error) { } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnlineEndpointIDInsensitively(input string) (*OnlineEndpointId, error) } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_workspace.go index daa5f35d554..252cdc13d9c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_get.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_get.go index f4df3fadd87..254cebaf565 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_get.go @@ -45,7 +45,6 @@ func (c OnlineEndpointClient) Get(ctx context.Context, id OnlineEndpointId) (res var model OnlineEndpointTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_gettoken.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_gettoken.go index 3ddda6b8f99..50eb0738bd0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_gettoken.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_gettoken.go @@ -46,7 +46,6 @@ func (c OnlineEndpointClient) GetToken(ctx context.Context, id OnlineEndpointId) var model EndpointAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_list.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_list.go index 74f48048e6f..77f9a3cfe7a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_listkeys.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_listkeys.go index 2aa5bcafd35..840db4430f9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_listkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/method_listkeys.go @@ -46,7 +46,6 @@ func (c OnlineEndpointClient) ListKeys(ctx context.Context, id OnlineEndpointId) var model EndpointAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/version.go b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/version.go index dff0f10b50f..227ea7a053c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/onlineendpoint/version.go @@ -1,12 +1,10 @@ package onlineendpoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/onlineendpoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/onlineendpoint/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/README.md b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/README.md index 3ea4c8949be..2b7895d2f4d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters` Documentation -The `operationalizationclusters` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `operationalizationclusters` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/client.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/client.go index c7db3d360c6..e140b29868a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/client.go @@ -15,7 +15,7 @@ type OperationalizationClustersClient struct { } func NewOperationalizationClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationalizationClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationalizationclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationalizationclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationalizationClustersClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_compute.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_compute.go index 07c80d054ec..7ecaa87da01 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_compute.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_compute.go @@ -44,7 +44,7 @@ func ParseComputeID(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComputeIDInsensitively(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_workspace.go index 4b38e48dcb5..d5808c41ba7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computedelete.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computedelete.go index 242131278ac..d46fe834b40 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computedelete.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computedelete.go @@ -36,6 +36,7 @@ func (o ComputeDeleteOperationOptions) ToHeaders() *client.Headers { func (o ComputeDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computeget.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computeget.go index 524f25ec91d..c0ce1ba6495 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computeget.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computeget.go @@ -45,7 +45,6 @@ func (c OperationalizationClustersClient) ComputeGet(ctx context.Context, id Com var model ComputeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelist.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelist.go index f75e45f3e01..38b0660ec9d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelist.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelist.go @@ -39,6 +39,7 @@ func (o ComputeListOperationOptions) ToHeaders() *client.Headers { func (o ComputeListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelistkeys.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelistkeys.go index 03496fa6064..c1e42e81440 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelistkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/method_computelistkeys.go @@ -16,7 +16,7 @@ import ( type ComputeListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ComputeSecrets + Model ComputeSecrets } // ComputeListKeys ... @@ -49,11 +49,11 @@ func (c OperationalizationClustersClient) ComputeListKeys(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalComputeSecretsImplementation(respObj) + model, err := UnmarshalComputeSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_aks.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_aks.go index 366a1e3d943..d9368b9a2c1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_aks.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_aks.go @@ -17,7 +17,9 @@ type AKS struct { Properties *AKSSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AKS struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AKS) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AKS) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AKS) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AKS: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_akscomputesecrets.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_akscomputesecrets.go index 993bc7e0ad7..319acdc49ad 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_akscomputesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_akscomputesecrets.go @@ -16,6 +16,14 @@ type AksComputeSecrets struct { UserKubeConfig *string `json:"userKubeConfig,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s AksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = AksComputeSecrets{} @@ -29,9 +37,10 @@ func (s AksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AksComputeSecrets: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_amlcompute.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_amlcompute.go index 6dff6bff4c8..7d90546a442 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_amlcompute.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_amlcompute.go @@ -17,7 +17,9 @@ type AmlCompute struct { Properties *AmlComputeProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AmlCompute struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AmlCompute) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AmlCompute) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AmlCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlCompute: %+v", err) } + decoded["computeType"] = "AmlCompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_compute.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_compute.go index 7bb62ac2037..2d3f6407baa 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_compute.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_compute.go @@ -10,18 +10,44 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Compute interface { + Compute() BaseComputeImpl } -// RawComputeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Compute = BaseComputeImpl{} + +type BaseComputeImpl struct { + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` + CreatedOn *string `json:"createdOn,omitempty"` + Description *string `json:"description,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"` + ModifiedOn *string `json:"modifiedOn,omitempty"` + ProvisioningErrors *[]ErrorResponse `json:"provisioningErrors,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} + +func (s BaseComputeImpl) Compute() BaseComputeImpl { + return s +} + +var _ Compute = RawComputeImpl{} + +// RawComputeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeImpl struct { - Type string - Values map[string]interface{} + compute BaseComputeImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeImpl) Compute() BaseComputeImpl { + return s.compute } -func unmarshalComputeImplementation(input []byte) (Compute, error) { +func UnmarshalComputeImplementation(input []byte) (Compute, error) { if input == nil { return nil, nil } @@ -116,10 +142,15 @@ func unmarshalComputeImplementation(input []byte) (Compute, error) { return out, nil } - out := RawComputeImpl{ - Type: value, - Values: temp, + var parent BaseComputeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeImpl: %+v", err) } - return out, nil + + return RawComputeImpl{ + compute: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeinstance.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeinstance.go index 91f0a9be988..27962037197 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeinstance.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeinstance.go @@ -17,7 +17,9 @@ type ComputeInstance struct { Properties *ComputeInstanceProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type ComputeInstance struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s ComputeInstance) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *ComputeInstance) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s ComputeInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ComputeInstance: %+v", err) } + decoded["computeType"] = "ComputeInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeresource.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeresource.go index 878f2f3e984..a736b6a197e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computeresource.go @@ -47,7 +47,7 @@ func (s *ComputeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalComputeImplementation(v) + impl, err := UnmarshalComputeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ComputeResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computesecrets.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computesecrets.go index 1cbb5ff92ce..8fe71533927 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_computesecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ComputeSecrets interface { + ComputeSecrets() BaseComputeSecretsImpl } -// RawComputeSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ComputeSecrets = BaseComputeSecretsImpl{} + +type BaseComputeSecretsImpl struct { + ComputeType ComputeType `json:"computeType"` +} + +func (s BaseComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s +} + +var _ ComputeSecrets = RawComputeSecretsImpl{} + +// RawComputeSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeSecretsImpl struct { - Type string - Values map[string]interface{} + computeSecrets BaseComputeSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s.computeSecrets } -func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { +func UnmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) return out, nil } - out := RawComputeSecretsImpl{ - Type: value, - Values: temp, + var parent BaseComputeSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeSecretsImpl: %+v", err) } - return out, nil + + return RawComputeSecretsImpl{ + computeSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databricks.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databricks.go index 7efc51f8e41..39d8cae90ae 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databricks.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databricks.go @@ -17,7 +17,9 @@ type Databricks struct { Properties *DatabricksProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Databricks struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Databricks) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Databricks) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Databricks) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Databricks: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databrickscomputesecrets.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databrickscomputesecrets.go index 3b4166be9be..94994c59bfc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databrickscomputesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_databrickscomputesecrets.go @@ -14,6 +14,14 @@ type DatabricksComputeSecrets struct { DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s DatabricksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = DatabricksComputeSecrets{} @@ -27,9 +35,10 @@ func (s DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksComputeSecrets: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datafactory.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datafactory.go index 5a10a200fdd..def0dd5a5f4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datafactory.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datafactory.go @@ -16,7 +16,9 @@ var _ Compute = DataFactory{} type DataFactory struct { // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -27,6 +29,21 @@ type DataFactory struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataFactory) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataFactory) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -62,9 +79,10 @@ func (s DataFactory) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataFactory: %+v", err) } + decoded["computeType"] = "DataFactory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datalakeanalytics.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datalakeanalytics.go index 5966a34ce57..816904cf145 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datalakeanalytics.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_datalakeanalytics.go @@ -17,7 +17,9 @@ type DataLakeAnalytics struct { Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type DataLakeAnalytics struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataLakeAnalytics) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataLakeAnalytics) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s DataLakeAnalytics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataLakeAnalytics: %+v", err) } + decoded["computeType"] = "DataLakeAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_hdinsight.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_hdinsight.go index 7ba996dbefc..28c33c4be11 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_hdinsight.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_hdinsight.go @@ -17,7 +17,9 @@ type HDInsight struct { Properties *HDInsightProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type HDInsight struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s HDInsight) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *HDInsight) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s HDInsight) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsight: %+v", err) } + decoded["computeType"] = "HDInsight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_kubernetes.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_kubernetes.go index 0850e112c47..8cabecbafdb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_kubernetes.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_kubernetes.go @@ -17,7 +17,9 @@ type Kubernetes struct { Properties *KubernetesProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Kubernetes struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Kubernetes) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Kubernetes) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Kubernetes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Kubernetes: %+v", err) } + decoded["computeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_synapsespark.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_synapsespark.go index 0675f24116d..e48bdb81c9e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_synapsespark.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_synapsespark.go @@ -17,7 +17,9 @@ type SynapseSpark struct { Properties *SynapseSparkProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type SynapseSpark struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s SynapseSpark) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *SynapseSpark) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s SynapseSpark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseSpark: %+v", err) } + decoded["computeType"] = "SynapseSpark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachine.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachine.go index 605a8cf46e0..22c21beff85 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachine.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachine.go @@ -17,7 +17,9 @@ type VirtualMachine struct { Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type VirtualMachine struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s VirtualMachine) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *VirtualMachine) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s VirtualMachine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachine: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachinesecrets.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachinesecrets.go index b131f87db43..c575b8e5d07 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachinesecrets.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/model_virtualmachinesecrets.go @@ -14,6 +14,14 @@ type VirtualMachineSecrets struct { AdministratorAccount *VirtualMachineSshCredentials `json:"administratorAccount,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s VirtualMachineSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = VirtualMachineSecrets{} @@ -27,9 +35,10 @@ func (s VirtualMachineSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineSecrets: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/version.go b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/version.go index a6c992564f1..ab8ca588479 100644 --- a/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/operationalizationclusters/version.go @@ -1,12 +1,10 @@ package operationalizationclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationalizationclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationalizationclusters/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/README.md index 79d475b8488..0214c1a9331 100644 --- a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/id_workspace.go index c1617ac44af..f32a6bef33f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go index 15839f1552e..36b14ed1653 100644 --- a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go +++ b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go @@ -46,7 +46,6 @@ func (c OutboundNetworkDependenciesEndpointsClient) WorkspacesListOutboundNetwor var model ExternalFQDNResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/version.go index 1dae449c012..5f5dd7154f0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/README.md b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/README.md index 8856bf0c8a7..54227ddc5ca 100644 --- a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/client.go b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/id_workspace.go index 45ec2f91a03..3ce8bc6ce3b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/method_list.go b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/method_list.go index aebd67aff46..7b076e7cbda 100644 --- a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id Workspace var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/version.go b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/version.go index d00cd7bcb8f..92b2452064f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/README.md b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/README.md index d0653b4f5bd..6adf98dacdf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/proxyoperations` Documentation -The `proxyoperations` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `proxyoperations` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/client.go b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/client.go index 33f9ecf1053..18542e7d1e7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/client.go @@ -15,7 +15,7 @@ type ProxyOperationsClient struct { } func NewProxyOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxyoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxyoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyOperationsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/id_workspace.go index 7066969a17f..ecdd8ab39a6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspaceslistnotebookkeys.go b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspaceslistnotebookkeys.go index 07aab6302c5..4c265812b9f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspaceslistnotebookkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspaceslistnotebookkeys.go @@ -46,7 +46,6 @@ func (c ProxyOperationsClient) WorkspacesListNotebookKeys(ctx context.Context, i var model ListNotebookKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspacesliststorageaccountkeys.go b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspacesliststorageaccountkeys.go index ee88011c0e0..34042bf4150 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspacesliststorageaccountkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/method_workspacesliststorageaccountkeys.go @@ -46,7 +46,6 @@ func (c ProxyOperationsClient) WorkspacesListStorageAccountKeys(ctx context.Cont var model ListStorageAccountKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/version.go b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/version.go index 163038144c7..759762f2d35 100644 --- a/resource-manager/machinelearningservices/2023-10-01/proxyoperations/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/proxyoperations/version.go @@ -1,12 +1,10 @@ package proxyoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxyoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxyoperations/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/README.md b/resource-manager/machinelearningservices/2023-10-01/quota/README.md index 09a6e3642e9..97f8eddee30 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/quota/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/quota` Documentation -The `quota` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `quota` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/client.go b/resource-manager/machinelearningservices/2023-10-01/quota/client.go index ef3c3c5581e..614e0b4f882 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/quota/client.go @@ -15,7 +15,7 @@ type QuotaClient struct { } func NewQuotaClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quota", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quota", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/id_location.go b/resource-manager/machinelearningservices/2023-10-01/quota/id_location.go index 387b0a18ffc..8df8656c257 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/id_location.go +++ b/resource-manager/machinelearningservices/2023-10-01/quota/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/quota/version.go b/resource-manager/machinelearningservices/2023-10-01/quota/version.go index 09fab2a2645..14d5cd9a5f4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/quota/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/quota/version.go @@ -1,12 +1,10 @@ package quota -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quota/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quota/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/README.md b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/README.md index d3f37d47a65..db3e7b03319 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/registrymanagement` Documentation -The `registrymanagement` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `registrymanagement` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/client.go b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/client.go index 424b1be68a0..b9770b7e4d2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/client.go @@ -15,7 +15,7 @@ type RegistryManagementClient struct { } func NewRegistryManagementClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistryManagementClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrymanagement", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrymanagement", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistryManagementClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/id_registry.go b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/id_registry.go index 02737626a7f..dd04fc9e5d5 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/id_registry.go +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesget.go b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesget.go index 6e6ae3a7858..497541822ad 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesget.go +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesget.go @@ -45,7 +45,6 @@ func (c RegistryManagementClient) RegistriesGet(ctx context.Context, id Registry var model RegistryTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesupdate.go b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesupdate.go index e9f72c00dd9..93ee9b6d1e4 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/method_registriesupdate.go @@ -49,7 +49,6 @@ func (c RegistryManagementClient) RegistriesUpdate(ctx context.Context, id Regis var model RegistryTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/version.go b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/version.go index f3c2cd9c138..188d79bb33b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/registrymanagement/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/registrymanagement/version.go @@ -1,12 +1,10 @@ package registrymanagement -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrymanagement/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrymanagement/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/README.md b/resource-manager/machinelearningservices/2023-10-01/schedule/README.md index 93f4a3d0ff8..b0a9fab7bb1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `schedule` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/client.go b/resource-manager/machinelearningservices/2023-10-01/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/id_schedule.go b/resource-manager/machinelearningservices/2023-10-01/schedule/id_schedule.go index 4c1f3d28d64..c20fa054ab2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/id_schedule.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/schedule/id_workspace.go index 5ce3d74236c..dc91be60508 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/method_get.go b/resource-manager/machinelearningservices/2023-10-01/schedule/method_get.go index 1ef1b82ef2b..b50dd6a7fb2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model ScheduleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/method_list.go b/resource-manager/machinelearningservices/2023-10-01/schedule/method_list.go index 978fb6364b9..f2819321b9f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_allfeatures.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_allfeatures.go index 137674a4dd1..c1fde8b5908 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_allfeatures.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_allfeatures.go @@ -13,6 +13,14 @@ var _ MonitoringFeatureFilterBase = AllFeatures{} type AllFeatures struct { // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s AllFeatures) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = AllFeatures{} @@ -26,9 +34,10 @@ func (s AllFeatures) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllFeatures: %+v", err) } + decoded["filterType"] = "AllFeatures" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_allnodes.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_allnodes.go index 316abacce1f..56e9f737e80 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_allnodes.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_allnodes.go @@ -13,6 +13,14 @@ var _ Nodes = AllNodes{} type AllNodes struct { // Fields inherited from Nodes + + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s AllNodes) Nodes() BaseNodesImpl { + return BaseNodesImpl{ + NodesValueType: s.NodesValueType, + } } var _ json.Marshaler = AllNodes{} @@ -26,9 +34,10 @@ func (s AllNodes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllNodes: %+v", err) } + decoded["nodesValueType"] = "All" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltoken.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltoken.go index ea17d79c7b2..894beaee446 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltoken.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltoken.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = AmlToken{} type AmlToken struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s AmlToken) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = AmlToken{} @@ -26,9 +34,10 @@ func (s AmlToken) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlToken: %+v", err) } + decoded["identityType"] = "AMLToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltokencomputeidentity.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltokencomputeidentity.go index 2407209efc4..297ce814499 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltokencomputeidentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_amltokencomputeidentity.go @@ -13,6 +13,14 @@ var _ MonitorComputeIdentityBase = AmlTokenComputeIdentity{} type AmlTokenComputeIdentity struct { // Fields inherited from MonitorComputeIdentityBase + + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s AmlTokenComputeIdentity) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return BaseMonitorComputeIdentityBaseImpl{ + ComputeIdentityType: s.ComputeIdentityType, + } } var _ json.Marshaler = AmlTokenComputeIdentity{} @@ -26,9 +34,10 @@ func (s AmlTokenComputeIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlTokenComputeIdentity: %+v", err) } + decoded["computeIdentityType"] = "AmlToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoforecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoforecasthorizon.go index 34b4ca41e1f..c1472390946 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoforecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoforecasthorizon.go @@ -13,6 +13,14 @@ var _ ForecastHorizon = AutoForecastHorizon{} type AutoForecastHorizon struct { // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s AutoForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoForecastHorizon{} @@ -26,9 +34,10 @@ func (s AutoForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoForecastHorizon: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_automljob.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_automljob.go index 0cf515a9a13..4304cf35152 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_automljob.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_automljob.go @@ -19,6 +19,7 @@ type AutoMLJob struct { TaskDetails AutoMLVertical `json:"taskDetails"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -26,12 +27,30 @@ type AutoMLJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s AutoMLJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = AutoMLJob{} func (s AutoMLJob) MarshalJSON() ([]byte, error) { @@ -43,9 +62,10 @@ func (s AutoMLJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoMLJob: %+v", err) } + decoded["jobType"] = "AutoML" encoded, err = json.Marshal(decoded) @@ -73,6 +93,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings s.Resources = decoded.Resources @@ -86,7 +107,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'AutoMLJob': %+v", err) } @@ -101,7 +122,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'AutoMLJob': %+v", key, err) } @@ -111,7 +132,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["taskDetails"]; ok { - impl, err := unmarshalAutoMLVerticalImplementation(v) + impl, err := UnmarshalAutoMLVerticalImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TaskDetails' for 'AutoMLJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_automlvertical.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_automlvertical.go index 5eba8eb5d6b..de5b0076642 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_automlvertical.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_automlvertical.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutoMLVertical interface { + AutoMLVertical() BaseAutoMLVerticalImpl } -// RawAutoMLVerticalImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutoMLVertical = BaseAutoMLVerticalImpl{} + +type BaseAutoMLVerticalImpl struct { + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` + TrainingData MLTableJobInput `json:"trainingData"` +} + +func (s BaseAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s +} + +var _ AutoMLVertical = RawAutoMLVerticalImpl{} + +// RawAutoMLVerticalImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutoMLVerticalImpl struct { - Type string - Values map[string]interface{} + autoMLVertical BaseAutoMLVerticalImpl + Type string + Values map[string]interface{} +} + +func (s RawAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s.autoMLVertical } -func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { +func UnmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { if input == nil { return nil, nil } @@ -116,10 +136,15 @@ func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) return out, nil } - out := RawAutoMLVerticalImpl{ - Type: value, - Values: temp, + var parent BaseAutoMLVerticalImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutoMLVerticalImpl: %+v", err) } - return out, nil + + return RawAutoMLVerticalImpl{ + autoMLVertical: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoncrossvalidations.go index 29dbfea898e..675fe5a7287 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoncrossvalidations.go @@ -13,6 +13,14 @@ var _ NCrossValidations = AutoNCrossValidations{} type AutoNCrossValidations struct { // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s AutoNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoNCrossValidations{} @@ -26,9 +34,10 @@ func (s AutoNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoNCrossValidations: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoseasonality.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoseasonality.go index d7b02195d35..1c55a12f9a7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoseasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autoseasonality.go @@ -13,6 +13,14 @@ var _ Seasonality = AutoSeasonality{} type AutoSeasonality struct { // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s AutoSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoSeasonality{} @@ -26,9 +34,10 @@ func (s AutoSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoSeasonality: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetlags.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetlags.go index 112678192da..ba78e9c6512 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetlags.go @@ -13,6 +13,14 @@ var _ TargetLags = AutoTargetLags{} type AutoTargetLags struct { // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s AutoTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetLags{} @@ -26,9 +34,10 @@ func (s AutoTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetLags: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetrollingwindowsize.go index f2691b6ee6f..60721dec678 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_autotargetrollingwindowsize.go @@ -13,6 +13,14 @@ var _ TargetRollingWindowSize = AutoTargetRollingWindowSize{} type AutoTargetRollingWindowSize struct { // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s AutoTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetRollingWindowSize{} @@ -26,9 +34,10 @@ func (s AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_banditpolicy.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_banditpolicy.go index 9d3ca26970e..31e2b60bebc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_banditpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_banditpolicy.go @@ -15,8 +15,18 @@ type BanditPolicy struct { SlackFactor *float64 `json:"slackFactor,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BanditPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = BanditPolicy{} @@ -30,9 +40,10 @@ func (s BanditPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BanditPolicy: %+v", err) } + decoded["policyType"] = "Bandit" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_bayesiansamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_bayesiansamplingalgorithm.go index d2a795b80e1..be893b96cad 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_bayesiansamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_bayesiansamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = BayesianSamplingAlgorithm{} type BayesianSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BayesianSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = BayesianSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BayesianSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Bayesian" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldatadriftmetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldatadriftmetricthreshold.go index baa52817995..0f6b9516e9d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldatadriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldatadriftmetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalDataDriftMetricThreshold struct { Metric CategoricalDataDriftMetric `json:"metric"` // Fields inherited from DataDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalDataDriftMetricThreshold) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return BaseDataDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalDataDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalDataDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldataqualitymetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldataqualitymetricthreshold.go index 7e7b1bf1991..c9f0a057e9a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldataqualitymetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricaldataqualitymetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalDataQualityMetricThreshold struct { Metric CategoricalDataQualityMetric `json:"metric"` // Fields inherited from DataQualityMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalDataQualityMetricThreshold) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return BaseDataQualityMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalDataQualityMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalDataQualityMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricalpredictiondriftmetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricalpredictiondriftmetricthreshold.go index cc93dc9f36a..64d49299a8c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricalpredictiondriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_categoricalpredictiondriftmetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalPredictionDriftMetricThreshold struct { Metric CategoricalPredictionDriftMetric `json:"metric"` // Fields inherited from PredictionDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalPredictionDriftMetricThreshold) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return BasePredictionDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalPredictionDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalPredictionDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_classification.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_classification.go index 067004475b8..ca981206cb2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_classification.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_classification.go @@ -25,11 +25,22 @@ type Classification struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Classification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Classification{} func (s Classification) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Classification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Classification: %+v", err) } + decoded["taskType"] = "Classification" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { s.PositiveLabel = decoded.PositiveLabel s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Classification': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjob.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjob.go index a271243ec0b..39a230f818f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjob.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjob.go @@ -24,6 +24,7 @@ type CommandJob struct { Resources *JobResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -31,12 +32,30 @@ type CommandJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s CommandJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = CommandJob{} func (s CommandJob) MarshalJSON() ([]byte, error) { @@ -48,9 +67,10 @@ func (s CommandJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJob: %+v", err) } + decoded["jobType"] = "Command" encoded, err = json.Marshal(decoded) @@ -80,6 +100,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Parameters = decoded.Parameters s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings @@ -94,7 +115,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'CommandJob': %+v", err) } @@ -102,7 +123,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'CommandJob': %+v", err) } @@ -117,7 +138,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CommandJob': %+v", key, err) } @@ -127,7 +148,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limits"]; ok { - impl, err := unmarshalJobLimitsImplementation(v) + impl, err := UnmarshalJobLimitsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limits' for 'CommandJob': %+v", err) } @@ -142,7 +163,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'CommandJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjoblimits.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjoblimits.go index 32fe234da34..712d95c31ad 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjoblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_commandjoblimits.go @@ -13,7 +13,16 @@ var _ JobLimits = CommandJobLimits{} type CommandJobLimits struct { // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s CommandJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = CommandJobLimits{} @@ -27,9 +36,10 @@ func (s CommandJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Command" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_createmonitoraction.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_createmonitoraction.go index f4fa4b5d530..54ff25df20b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_createmonitoraction.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_createmonitoraction.go @@ -14,6 +14,14 @@ type CreateMonitorAction struct { MonitorDefinition MonitorDefinition `json:"monitorDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s CreateMonitorAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = CreateMonitorAction{} @@ -27,9 +35,10 @@ func (s CreateMonitorAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CreateMonitorAction: %+v", err) } + decoded["actionType"] = "CreateMonitor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_crontrigger.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_crontrigger.go index 659030c870d..e056080c9e9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_crontrigger.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_crontrigger.go @@ -14,9 +14,20 @@ type CronTrigger struct { Expression string `json:"expression"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s CronTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = CronTrigger{} @@ -30,9 +41,10 @@ func (s CronTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CronTrigger: %+v", err) } + decoded["triggerType"] = "Cron" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customforecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customforecasthorizon.go index e706aff88ab..5e2042d6924 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customforecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customforecasthorizon.go @@ -14,6 +14,14 @@ type CustomForecastHorizon struct { Value int64 `json:"value"` // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s CustomForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomForecastHorizon{} @@ -27,9 +35,10 @@ func (s CustomForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomForecastHorizon: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljobinput.go index b8ffc9ce362..b8700d5b750 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljobinput.go @@ -15,7 +15,16 @@ type CustomModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s CustomModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = CustomModelJobInput{} @@ -29,9 +38,10 @@ func (s CustomModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobInput: %+v", err) } + decoded["jobInputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljoboutput.go index 80323935c41..acf90e9e949 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommodeljoboutput.go @@ -15,7 +15,16 @@ type CustomModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s CustomModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = CustomModelJobOutput{} @@ -29,9 +38,10 @@ func (s CustomModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommonitoringsignal.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommonitoringsignal.go index 628f75b7474..55234afe315 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommonitoringsignal.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_custommonitoringsignal.go @@ -17,8 +17,18 @@ type CustomMonitoringSignal struct { MetricThresholds []CustomMetricThreshold `json:"metricThresholds"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s CustomMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = CustomMonitoringSignal{} @@ -32,9 +42,10 @@ func (s CustomMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomMonitoringSignal: %+v", err) } + decoded["signalType"] = "Custom" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.MetricThresholds = decoded.MetricThresholds s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -72,7 +84,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make(map[string]MonitoringInputDataBase) for key, val := range dictionaryTemp { - impl, err := unmarshalMonitoringInputDataBaseImplementation(val) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'InputAssets' for 'CustomMonitoringSignal': %+v", key, err) } @@ -89,7 +101,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CustomMonitoringSignal': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customncrossvalidations.go index 8ff5e4388a3..e9fd5d28638 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customncrossvalidations.go @@ -14,6 +14,14 @@ type CustomNCrossValidations struct { Value int64 `json:"value"` // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s CustomNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomNCrossValidations{} @@ -27,9 +35,10 @@ func (s CustomNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomNCrossValidations: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customseasonality.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customseasonality.go index 54a5b439135..5bda357d48a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customseasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customseasonality.go @@ -14,6 +14,14 @@ type CustomSeasonality struct { Value int64 `json:"value"` // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s CustomSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomSeasonality{} @@ -27,9 +35,10 @@ func (s CustomSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomSeasonality: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetlags.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetlags.go index 0a48c672a81..546e8dd0b84 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetlags.go @@ -14,6 +14,14 @@ type CustomTargetLags struct { Values []int64 `json:"values"` // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s CustomTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetLags{} @@ -27,9 +35,10 @@ func (s CustomTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetLags: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetrollingwindowsize.go index e54b4f5a422..d224ed243de 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_customtargetrollingwindowsize.go @@ -14,6 +14,14 @@ type CustomTargetRollingWindowSize struct { Value int64 `json:"value"` // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s CustomTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetRollingWindowSize{} @@ -27,9 +35,10 @@ func (s CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmetricthresholdbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmetricthresholdbase.go index c1dbe12d67f..38b5fd932fc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataDriftMetricThresholdBase interface { + DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl } -// RawDataDriftMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataDriftMetricThresholdBase = BaseDataDriftMetricThresholdBaseImpl{} + +type BaseDataDriftMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BaseDataDriftMetricThresholdBaseImpl) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return s +} + +var _ DataDriftMetricThresholdBase = RawDataDriftMetricThresholdBaseImpl{} + +// RawDataDriftMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataDriftMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + dataDriftMetricThresholdBase BaseDataDriftMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataDriftMetricThresholdBaseImpl) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return s.dataDriftMetricThresholdBase } -func unmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDriftMetricThresholdBase, error) { +func UnmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDriftMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDrif return out, nil } - out := RawDataDriftMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataDriftMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataDriftMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawDataDriftMetricThresholdBaseImpl{ + dataDriftMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmonitoringsignal.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmonitoringsignal.go index f811e53d4aa..04cf61512e9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_datadriftmonitoringsignal.go @@ -19,8 +19,18 @@ type DataDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s DataDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = DataDriftMonitoringSignal{} @@ -34,9 +44,10 @@ func (s DataDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "DataDrift" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureImportanceSettings = decoded.FeatureImportanceSettings s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -67,7 +79,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["features"]; ok { - impl, err := unmarshalMonitoringFeatureFilterBaseImplementation(v) + impl, err := UnmarshalMonitoringFeatureFilterBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Features' for 'DataDriftMonitoringSignal': %+v", err) } @@ -82,7 +94,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]DataDriftMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalDataDriftMetricThresholdBaseImplementation(val) + impl, err := UnmarshalDataDriftMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'DataDriftMonitoringSignal': %+v", i, err) } @@ -92,7 +104,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'DataDriftMonitoringSignal': %+v", err) } @@ -100,7 +112,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'DataDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymetricthresholdbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymetricthresholdbase.go index 2e68e010ee2..cb13b209346 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataQualityMetricThresholdBase interface { + DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl } -// RawDataQualityMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataQualityMetricThresholdBase = BaseDataQualityMetricThresholdBaseImpl{} + +type BaseDataQualityMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BaseDataQualityMetricThresholdBaseImpl) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return s +} + +var _ DataQualityMetricThresholdBase = RawDataQualityMetricThresholdBaseImpl{} + +// RawDataQualityMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataQualityMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + dataQualityMetricThresholdBase BaseDataQualityMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataQualityMetricThresholdBaseImpl) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return s.dataQualityMetricThresholdBase } -func unmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQualityMetricThresholdBase, error) { +func UnmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQualityMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQu return out, nil } - out := RawDataQualityMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataQualityMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataQualityMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawDataQualityMetricThresholdBaseImpl{ + dataQualityMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymonitoringsignal.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymonitoringsignal.go index 7961ea21d50..71d3b10291e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymonitoringsignal.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_dataqualitymonitoringsignal.go @@ -19,8 +19,18 @@ type DataQualityMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s DataQualityMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = DataQualityMonitoringSignal{} @@ -34,9 +44,10 @@ func (s DataQualityMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataQualityMonitoringSignal: %+v", err) } + decoded["signalType"] = "DataQuality" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureImportanceSettings = decoded.FeatureImportanceSettings s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -67,7 +79,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["features"]; ok { - impl, err := unmarshalMonitoringFeatureFilterBaseImplementation(v) + impl, err := UnmarshalMonitoringFeatureFilterBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Features' for 'DataQualityMonitoringSignal': %+v", err) } @@ -82,7 +94,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]DataQualityMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalDataQualityMetricThresholdBaseImplementation(val) + impl, err := UnmarshalDataQualityMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'DataQualityMonitoringSignal': %+v", i, err) } @@ -92,7 +104,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'DataQualityMonitoringSignal': %+v", err) } @@ -100,7 +112,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'DataQualityMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_distributionconfiguration.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_distributionconfiguration.go index 56985f5d07e..f26ecd93b08 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_distributionconfiguration.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_distributionconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DistributionConfiguration interface { + DistributionConfiguration() BaseDistributionConfigurationImpl } -// RawDistributionConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DistributionConfiguration = BaseDistributionConfigurationImpl{} + +type BaseDistributionConfigurationImpl struct { + DistributionType DistributionType `json:"distributionType"` +} + +func (s BaseDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s +} + +var _ DistributionConfiguration = RawDistributionConfigurationImpl{} + +// RawDistributionConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDistributionConfigurationImpl struct { - Type string - Values map[string]interface{} + distributionConfiguration BaseDistributionConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s.distributionConfiguration } -func unmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { +func UnmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalDistributionConfigurationImplementation(input []byte) (Distributio return out, nil } - out := RawDistributionConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseDistributionConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDistributionConfigurationImpl: %+v", err) } - return out, nil + + return RawDistributionConfigurationImpl{ + distributionConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_earlyterminationpolicy.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_earlyterminationpolicy.go index 3414def7db5..9a1a1654451 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_earlyterminationpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_earlyterminationpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EarlyTerminationPolicy interface { + EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl } -// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EarlyTerminationPolicy = BaseEarlyTerminationPolicyImpl{} + +type BaseEarlyTerminationPolicyImpl struct { + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BaseEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s +} + +var _ EarlyTerminationPolicy = RawEarlyTerminationPolicyImpl{} + +// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEarlyTerminationPolicyImpl struct { - Type string - Values map[string]interface{} + earlyTerminationPolicy BaseEarlyTerminationPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s.earlyTerminationPolicy } -func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { +func UnmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminati return out, nil } - out := RawEarlyTerminationPolicyImpl{ - Type: value, - Values: temp, + var parent BaseEarlyTerminationPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEarlyTerminationPolicyImpl: %+v", err) } - return out, nil + + return RawEarlyTerminationPolicyImpl{ + earlyTerminationPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_endpointscheduleaction.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_endpointscheduleaction.go index ad5699caf06..a50c708e732 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_endpointscheduleaction.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_endpointscheduleaction.go @@ -14,6 +14,14 @@ type EndpointScheduleAction struct { EndpointInvocationDefinition interface{} `json:"endpointInvocationDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s EndpointScheduleAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = EndpointScheduleAction{} @@ -27,9 +35,10 @@ func (s EndpointScheduleAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EndpointScheduleAction: %+v", err) } + decoded["actionType"] = "InvokeBatchEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_featureattributiondriftmonitoringsignal.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_featureattributiondriftmonitoringsignal.go index 9ab9c7be10a..69fb08d71b2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_featureattributiondriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_featureattributiondriftmonitoringsignal.go @@ -18,8 +18,18 @@ type FeatureAttributionDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s FeatureAttributionDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = FeatureAttributionDriftMonitoringSignal{} @@ -33,9 +43,10 @@ func (s FeatureAttributionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureAttributionDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "FeatureAttributionDrift" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er s.MetricThreshold = decoded.MetricThreshold s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -74,7 +86,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er output := make([]MonitoringInputDataBase, 0) for i, val := range listTemp { - impl, err := unmarshalMonitoringInputDataBaseImplementation(val) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProductionData' for 'FeatureAttributionDriftMonitoringSignal': %+v", i, err) } @@ -84,7 +96,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'FeatureAttributionDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_featuresubset.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_featuresubset.go index 3740345dc2c..8fdb9c9d2c3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_featuresubset.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_featuresubset.go @@ -14,6 +14,14 @@ type FeatureSubset struct { Features []string `json:"features"` // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s FeatureSubset) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = FeatureSubset{} @@ -27,9 +35,10 @@ func (s FeatureSubset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureSubset: %+v", err) } + decoded["filterType"] = "FeatureSubset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_fixedinputdata.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_fixedinputdata.go index eb59ae7cb87..9c388f512ef 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_fixedinputdata.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_fixedinputdata.go @@ -13,10 +13,22 @@ var _ MonitoringInputDataBase = FixedInputData{} type FixedInputData struct { // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s FixedInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = FixedInputData{} @@ -30,9 +42,10 @@ func (s FixedInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FixedInputData: %+v", err) } + decoded["inputDataType"] = "Fixed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasthorizon.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasthorizon.go index 3c4d530ebf6..06d3a958f59 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasthorizon.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasthorizon.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForecastHorizon interface { + ForecastHorizon() BaseForecastHorizonImpl } -// RawForecastHorizonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ForecastHorizon = BaseForecastHorizonImpl{} + +type BaseForecastHorizonImpl struct { + Mode ForecastHorizonMode `json:"mode"` +} + +func (s BaseForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s +} + +var _ ForecastHorizon = RawForecastHorizonImpl{} + +// RawForecastHorizonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawForecastHorizonImpl struct { - Type string - Values map[string]interface{} + forecastHorizon BaseForecastHorizonImpl + Type string + Values map[string]interface{} +} + +func (s RawForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s.forecastHorizon } -func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { +func UnmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, erro return out, nil } - out := RawForecastHorizonImpl{ - Type: value, - Values: temp, + var parent BaseForecastHorizonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseForecastHorizonImpl: %+v", err) } - return out, nil + + return RawForecastHorizonImpl{ + forecastHorizon: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasting.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasting.go index 350cc7cfdd5..485c1dffb65 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasting.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecasting.go @@ -25,11 +25,22 @@ type Forecasting struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Forecasting) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Forecasting{} func (s Forecasting) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Forecasting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Forecasting: %+v", err) } + decoded["taskType"] = "Forecasting" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Forecasting': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecastingsettings.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecastingsettings.go index 3bfba4ec70a..41543881dcc 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecastingsettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_forecastingsettings.go @@ -49,7 +49,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["forecastHorizon"]; ok { - impl, err := unmarshalForecastHorizonImplementation(v) + impl, err := UnmarshalForecastHorizonImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ForecastHorizon' for 'ForecastingSettings': %+v", err) } @@ -57,7 +57,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["seasonality"]; ok { - impl, err := unmarshalSeasonalityImplementation(v) + impl, err := UnmarshalSeasonalityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Seasonality' for 'ForecastingSettings': %+v", err) } @@ -65,7 +65,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetLags"]; ok { - impl, err := unmarshalTargetLagsImplementation(v) + impl, err := UnmarshalTargetLagsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetLags' for 'ForecastingSettings': %+v", err) } @@ -73,7 +73,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetRollingWindowSize"]; ok { - impl, err := unmarshalTargetRollingWindowSizeImplementation(v) + impl, err := UnmarshalTargetRollingWindowSizeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetRollingWindowSize' for 'ForecastingSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_gridsamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_gridsamplingalgorithm.go index 2e777597cd2..b577ac63c96 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_gridsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_gridsamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = GridSamplingAlgorithm{} type GridSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s GridSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = GridSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GridSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Grid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_identityconfiguration.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_identityconfiguration.go index 3a8f599b164..b9ddbf0e173 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_identityconfiguration.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_identityconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IdentityConfiguration interface { + IdentityConfiguration() BaseIdentityConfigurationImpl } -// RawIdentityConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IdentityConfiguration = BaseIdentityConfigurationImpl{} + +type BaseIdentityConfigurationImpl struct { + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s BaseIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s +} + +var _ IdentityConfiguration = RawIdentityConfigurationImpl{} + +// RawIdentityConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIdentityConfigurationImpl struct { - Type string - Values map[string]interface{} + identityConfiguration BaseIdentityConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s.identityConfiguration } -func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { +func UnmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfigu return out, nil } - out := RawIdentityConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseIdentityConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIdentityConfigurationImpl: %+v", err) } - return out, nil + + return RawIdentityConfigurationImpl{ + identityConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassification.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassification.go index cbc5d319bd9..50d25482a05 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassification.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassification.go @@ -20,11 +20,22 @@ type ImageClassification struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassification{} func (s ImageClassification) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassification: %+v", err) } + decoded["taskType"] = "ImageClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassificationmultilabel.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassificationmultilabel.go index e9dbeae8e5a..315c759395b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageclassificationmultilabel.go @@ -20,11 +20,22 @@ type ImageClassificationMultilabel struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassificationMultilabel{} func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassificationMultilabel: %+v", err) } + decoded["taskType"] = "ImageClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageinstancesegmentation.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageinstancesegmentation.go index 3b2f7709c3a..678a4359ec9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageinstancesegmentation.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageinstancesegmentation.go @@ -20,11 +20,22 @@ type ImageInstanceSegmentation struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageInstanceSegmentation) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageInstanceSegmentation{} func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageInstanceSegmentation: %+v", err) } + decoded["taskType"] = "ImageInstanceSegmentation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageobjectdetection.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageobjectdetection.go index a66f39819fd..7849132338d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageobjectdetection.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imageobjectdetection.go @@ -20,11 +20,22 @@ type ImageObjectDetection struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageObjectDetection) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageObjectDetection{} func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageObjectDetection: %+v", err) } + decoded["taskType"] = "ImageObjectDetection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imagesweepsettings.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imagesweepsettings.go index bc50df60f04..86e0fdeff63 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_imagesweepsettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_imagesweepsettings.go @@ -30,7 +30,7 @@ func (s *ImageSweepSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'ImageSweepSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobbase.go index aec15f2b0b9..905224f76fa 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobbase.go @@ -10,18 +10,82 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobBase interface { + JobBase() BaseJobBaseImpl } -// RawJobBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobBase = BaseJobBaseImpl{} + +type BaseJobBaseImpl struct { + ComponentId *string `json:"componentId,omitempty"` + ComputeId *string `json:"computeId,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + ExperimentName *string `json:"experimentName,omitempty"` + Identity IdentityConfiguration `json:"identity"` + IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` + Properties *map[string]string `json:"properties,omitempty"` + Services *map[string]JobService `json:"services,omitempty"` + Status *JobStatus `json:"status,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseJobBaseImpl) JobBase() BaseJobBaseImpl { + return s +} + +var _ JobBase = RawJobBaseImpl{} + +// RawJobBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobBaseImpl struct { - Type string - Values map[string]interface{} + jobBase BaseJobBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawJobBaseImpl) JobBase() BaseJobBaseImpl { + return s.jobBase } -func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { +var _ json.Unmarshaler = &BaseJobBaseImpl{} + +func (s *BaseJobBaseImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobBaseImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) + } + + s.ComponentId = decoded.ComponentId + s.ComputeId = decoded.ComputeId + s.Description = decoded.Description + s.DisplayName = decoded.DisplayName + s.ExperimentName = decoded.ExperimentName + s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType + s.Properties = decoded.Properties + s.Services = decoded.Services + s.Status = decoded.Status + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobBaseImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["identity"]; ok { + impl, err := UnmarshalIdentityConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Identity' for 'BaseJobBaseImpl': %+v", err) + } + s.Identity = impl + } + return nil +} + +func UnmarshalJobBaseImplementation(input []byte) (JobBase, error) { if input == nil { return nil, nil } @@ -68,10 +132,15 @@ func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { return out, nil } - out := RawJobBaseImpl{ - Type: value, - Values: temp, + var parent BaseJobBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) } - return out, nil + + return RawJobBaseImpl{ + jobBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobinput.go index 8637188bb21..ac2e0fdf3d7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobinput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -92,10 +110,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_joblimits.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_joblimits.go index cd157ae6263..3f232224d69 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_joblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_joblimits.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobLimits interface { + JobLimits() BaseJobLimitsImpl } -// RawJobLimitsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobLimits = BaseJobLimitsImpl{} + +type BaseJobLimitsImpl struct { + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s BaseJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s +} + +var _ JobLimits = RawJobLimitsImpl{} + +// RawJobLimitsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobLimitsImpl struct { - Type string - Values map[string]interface{} + jobLimits BaseJobLimitsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s.jobLimits } -func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { +func UnmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { return out, nil } - out := RawJobLimitsImpl{ - Type: value, - Values: temp, + var parent BaseJobLimitsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobLimitsImpl: %+v", err) } - return out, nil + + return RawJobLimitsImpl{ + jobLimits: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_joboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_joboutput.go index 9ec6b3afb1e..7d560a60b3d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_joboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_joboutput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobscheduleaction.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobscheduleaction.go index de37d55a3ab..b0199c3a7e3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobscheduleaction.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobscheduleaction.go @@ -14,6 +14,14 @@ type JobScheduleAction struct { JobDefinition JobBase `json:"jobDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s JobScheduleAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = JobScheduleAction{} @@ -27,9 +35,10 @@ func (s JobScheduleAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobScheduleAction: %+v", err) } + decoded["actionType"] = "CreateJob" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s JobScheduleAction) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &JobScheduleAction{} func (s *JobScheduleAction) UnmarshalJSON(bytes []byte) error { + type alias JobScheduleAction + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JobScheduleAction: %+v", err) + } + + s.ActionType = decoded.ActionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *JobScheduleAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["jobDefinition"]; ok { - impl, err := unmarshalJobBaseImplementation(v) + impl, err := UnmarshalJobBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'JobDefinition' for 'JobScheduleAction': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobservice.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobservice.go index a29b9ff0f89..554c6efd339 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobservice.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_jobservice.go @@ -40,7 +40,7 @@ func (s *JobService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nodes"]; ok { - impl, err := unmarshalNodesImplementation(v) + impl, err := UnmarshalNodesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Nodes' for 'JobService': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_literaljobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_literaljobinput.go index a2937196b09..0879f3a20c7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_literaljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_literaljobinput.go @@ -14,7 +14,16 @@ type LiteralJobInput struct { Value string `json:"value"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s LiteralJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = LiteralJobInput{} @@ -28,9 +37,10 @@ func (s LiteralJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LiteralJobInput: %+v", err) } + decoded["jobInputType"] = "literal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedcomputeidentity.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedcomputeidentity.go index 23ead4bc92c..02728c026e1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedcomputeidentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedcomputeidentity.go @@ -16,6 +16,14 @@ type ManagedComputeIdentity struct { Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` // Fields inherited from MonitorComputeIdentityBase + + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s ManagedComputeIdentity) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return BaseMonitorComputeIdentityBaseImpl{ + ComputeIdentityType: s.ComputeIdentityType, + } } var _ json.Marshaler = ManagedComputeIdentity{} @@ -29,9 +37,10 @@ func (s ManagedComputeIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedComputeIdentity: %+v", err) } + decoded["computeIdentityType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedidentity.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedidentity.go index 5989d3923dc..208e7b9078d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedidentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_managedidentity.go @@ -16,6 +16,14 @@ type ManagedIdentity struct { ResourceId *string `json:"resourceId,omitempty"` // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s ManagedIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = ManagedIdentity{} @@ -29,9 +37,10 @@ func (s ManagedIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentity: %+v", err) } + decoded["identityType"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_medianstoppingpolicy.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_medianstoppingpolicy.go index f1258fd2da2..6e54080a23c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_medianstoppingpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_medianstoppingpolicy.go @@ -13,8 +13,18 @@ var _ EarlyTerminationPolicy = MedianStoppingPolicy{} type MedianStoppingPolicy struct { // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s MedianStoppingPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = MedianStoppingPolicy{} @@ -28,9 +38,10 @@ func (s MedianStoppingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MedianStoppingPolicy: %+v", err) } + decoded["policyType"] = "MedianStopping" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljobinput.go index 538f8f0a0f1..4ff9169eb7c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljobinput.go @@ -15,7 +15,16 @@ type MLFlowModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLFlowModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLFlowModelJobInput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobInput: %+v", err) } + decoded["jobInputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljoboutput.go index 8d318e6dd20..584666b570b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mlflowmodeljoboutput.go @@ -15,7 +15,16 @@ type MLFlowModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLFlowModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLFlowModelJobOutput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejobinput.go index f9a1501026c..364d527d8b1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejobinput.go @@ -15,7 +15,16 @@ type MLTableJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLTableJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLTableJobInput{} @@ -29,9 +38,10 @@ func (s MLTableJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobInput: %+v", err) } + decoded["jobInputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejoboutput.go index c4052f54cf0..6bc782d1f61 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mltablejoboutput.go @@ -15,7 +15,16 @@ type MLTableJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLTableJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLTableJobOutput{} @@ -29,9 +38,10 @@ func (s MLTableJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobOutput: %+v", err) } + decoded["jobOutputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeconfigurationbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeconfigurationbase.go index 888472da50e..f2d712cb358 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeconfigurationbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeconfigurationbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitorComputeConfigurationBase interface { + MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl } -// RawMonitorComputeConfigurationBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitorComputeConfigurationBase = BaseMonitorComputeConfigurationBaseImpl{} + +type BaseMonitorComputeConfigurationBaseImpl struct { + ComputeType MonitorComputeType `json:"computeType"` +} + +func (s BaseMonitorComputeConfigurationBaseImpl) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return s +} + +var _ MonitorComputeConfigurationBase = RawMonitorComputeConfigurationBaseImpl{} + +// RawMonitorComputeConfigurationBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitorComputeConfigurationBaseImpl struct { - Type string - Values map[string]interface{} + monitorComputeConfigurationBase BaseMonitorComputeConfigurationBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitorComputeConfigurationBaseImpl) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return s.monitorComputeConfigurationBase } -func unmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (MonitorComputeConfigurationBase, error) { +func UnmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (MonitorComputeConfigurationBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (Monit return out, nil } - out := RawMonitorComputeConfigurationBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitorComputeConfigurationBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitorComputeConfigurationBaseImpl: %+v", err) } - return out, nil + + return RawMonitorComputeConfigurationBaseImpl{ + monitorComputeConfigurationBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeidentitybase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeidentitybase.go index 8245095d2c4..ff777e97b81 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeidentitybase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorcomputeidentitybase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitorComputeIdentityBase interface { + MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl } -// RawMonitorComputeIdentityBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitorComputeIdentityBase = BaseMonitorComputeIdentityBaseImpl{} + +type BaseMonitorComputeIdentityBaseImpl struct { + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s BaseMonitorComputeIdentityBaseImpl) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return s +} + +var _ MonitorComputeIdentityBase = RawMonitorComputeIdentityBaseImpl{} + +// RawMonitorComputeIdentityBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitorComputeIdentityBaseImpl struct { - Type string - Values map[string]interface{} + monitorComputeIdentityBase BaseMonitorComputeIdentityBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitorComputeIdentityBaseImpl) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return s.monitorComputeIdentityBase } -func unmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorComputeIdentityBase, error) { +func UnmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorComputeIdentityBase, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorCom return out, nil } - out := RawMonitorComputeIdentityBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitorComputeIdentityBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitorComputeIdentityBaseImpl: %+v", err) } - return out, nil + + return RawMonitorComputeIdentityBaseImpl{ + monitorComputeIdentityBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitordefinition.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitordefinition.go index aff7fbadceb..a4aaa884f9f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitordefinition.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitordefinition.go @@ -33,7 +33,7 @@ func (s *MonitorDefinition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["computeConfiguration"]; ok { - impl, err := unmarshalMonitorComputeConfigurationBaseImplementation(v) + impl, err := UnmarshalMonitorComputeConfigurationBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ComputeConfiguration' for 'MonitorDefinition': %+v", err) } @@ -48,7 +48,7 @@ func (s *MonitorDefinition) UnmarshalJSON(bytes []byte) error { output := make(map[string]MonitoringSignalBase) for key, val := range dictionaryTemp { - impl, err := unmarshalMonitoringSignalBaseImplementation(val) + impl, err := UnmarshalMonitoringSignalBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Signals' for 'MonitorDefinition': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringfeaturefilterbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringfeaturefilterbase.go index 1604be990c4..86eb3b37297 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringfeaturefilterbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringfeaturefilterbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringFeatureFilterBase interface { + MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl } -// RawMonitoringFeatureFilterBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringFeatureFilterBase = BaseMonitoringFeatureFilterBaseImpl{} + +type BaseMonitoringFeatureFilterBaseImpl struct { + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s BaseMonitoringFeatureFilterBaseImpl) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return s +} + +var _ MonitoringFeatureFilterBase = RawMonitoringFeatureFilterBaseImpl{} + +// RawMonitoringFeatureFilterBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringFeatureFilterBaseImpl struct { - Type string - Values map[string]interface{} + monitoringFeatureFilterBase BaseMonitoringFeatureFilterBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringFeatureFilterBaseImpl) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return s.monitoringFeatureFilterBase } -func unmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (MonitoringFeatureFilterBase, error) { +func UnmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (MonitoringFeatureFilterBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (Monitorin return out, nil } - out := RawMonitoringFeatureFilterBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringFeatureFilterBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringFeatureFilterBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringFeatureFilterBaseImpl{ + monitoringFeatureFilterBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringinputdatabase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringinputdatabase.go index 5504daaa9e0..562443e6af3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringinputdatabase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringinputdatabase.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringInputDataBase interface { + MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl } -// RawMonitoringInputDataBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringInputDataBase = BaseMonitoringInputDataBaseImpl{} + +type BaseMonitoringInputDataBaseImpl struct { + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s BaseMonitoringInputDataBaseImpl) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return s +} + +var _ MonitoringInputDataBase = RawMonitoringInputDataBaseImpl{} + +// RawMonitoringInputDataBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringInputDataBaseImpl struct { - Type string - Values map[string]interface{} + monitoringInputDataBase BaseMonitoringInputDataBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringInputDataBaseImpl) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return s.monitoringInputDataBase } -func unmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInputDataBase, error) { +func UnmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInputDataBase, error) { if input == nil { return nil, nil } @@ -60,10 +81,15 @@ func unmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInp return out, nil } - out := RawMonitoringInputDataBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringInputDataBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringInputDataBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringInputDataBaseImpl{ + monitoringInputDataBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringsignalbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringsignalbase.go index 0a8821321ff..8c931adbaa9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringsignalbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitoringsignalbase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringSignalBase interface { + MonitoringSignalBase() BaseMonitoringSignalBaseImpl } -// RawMonitoringSignalBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringSignalBase = BaseMonitoringSignalBaseImpl{} + +type BaseMonitoringSignalBaseImpl struct { + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s BaseMonitoringSignalBaseImpl) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return s +} + +var _ MonitoringSignalBase = RawMonitoringSignalBaseImpl{} + +// RawMonitoringSignalBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringSignalBaseImpl struct { - Type string - Values map[string]interface{} + monitoringSignalBase BaseMonitoringSignalBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringSignalBaseImpl) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return s.monitoringSignalBase } -func unmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignalBase, error) { +func UnmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignalBase, error) { if input == nil { return nil, nil } @@ -76,10 +95,15 @@ func unmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignal return out, nil } - out := RawMonitoringSignalBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringSignalBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringSignalBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringSignalBaseImpl{ + monitoringSignalBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorserverlesssparkcompute.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorserverlesssparkcompute.go index 3b8fa1179d6..980dcce2eb2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorserverlesssparkcompute.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_monitorserverlesssparkcompute.go @@ -16,6 +16,14 @@ type MonitorServerlessSparkCompute struct { RuntimeVersion string `json:"runtimeVersion"` // Fields inherited from MonitorComputeConfigurationBase + + ComputeType MonitorComputeType `json:"computeType"` +} + +func (s MonitorServerlessSparkCompute) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return BaseMonitorComputeConfigurationBaseImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = MonitorServerlessSparkCompute{} @@ -29,9 +37,10 @@ func (s MonitorServerlessSparkCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MonitorServerlessSparkCompute: %+v", err) } + decoded["computeType"] = "ServerlessSpark" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *MonitorServerlessSparkCompute) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MonitorServerlessSparkCompute: %+v", err) } + s.ComputeType = decoded.ComputeType s.InstanceType = decoded.InstanceType s.RuntimeVersion = decoded.RuntimeVersion @@ -60,7 +70,7 @@ func (s *MonitorServerlessSparkCompute) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["computeIdentity"]; ok { - impl, err := unmarshalMonitorComputeIdentityBaseImplementation(v) + impl, err := UnmarshalMonitorComputeIdentityBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ComputeIdentity' for 'MonitorServerlessSparkCompute': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mpi.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mpi.go index a6fda61ba4c..3b85b2b619f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_mpi.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_mpi.go @@ -14,6 +14,14 @@ type Mpi struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s Mpi) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = Mpi{} @@ -27,9 +35,10 @@ func (s Mpi) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mpi: %+v", err) } + decoded["distributionType"] = "Mpi" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_ncrossvalidations.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_ncrossvalidations.go index a21efe0d50a..02250ef5679 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_ncrossvalidations.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_ncrossvalidations.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NCrossValidations interface { + NCrossValidations() BaseNCrossValidationsImpl } -// RawNCrossValidationsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NCrossValidations = BaseNCrossValidationsImpl{} + +type BaseNCrossValidationsImpl struct { + Mode NCrossValidationsMode `json:"mode"` +} + +func (s BaseNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s +} + +var _ NCrossValidations = RawNCrossValidationsImpl{} + +// RawNCrossValidationsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNCrossValidationsImpl struct { - Type string - Values map[string]interface{} + nCrossValidations BaseNCrossValidationsImpl + Type string + Values map[string]interface{} +} + +func (s RawNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s.nCrossValidations } -func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { +func UnmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, return out, nil } - out := RawNCrossValidationsImpl{ - Type: value, - Values: temp, + var parent BaseNCrossValidationsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNCrossValidationsImpl: %+v", err) } - return out, nil + + return RawNCrossValidationsImpl{ + nCrossValidations: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_nodes.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_nodes.go index b45515f069a..823122a0fbe 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_nodes.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_nodes.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Nodes interface { + Nodes() BaseNodesImpl } -// RawNodesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Nodes = BaseNodesImpl{} + +type BaseNodesImpl struct { + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s BaseNodesImpl) Nodes() BaseNodesImpl { + return s +} + +var _ Nodes = RawNodesImpl{} + +// RawNodesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNodesImpl struct { + nodes BaseNodesImpl Type string Values map[string]interface{} } -func unmarshalNodesImplementation(input []byte) (Nodes, error) { +func (s RawNodesImpl) Nodes() BaseNodesImpl { + return s.nodes +} + +func UnmarshalNodesImplementation(input []byte) (Nodes, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalNodesImplementation(input []byte) (Nodes, error) { return out, nil } - out := RawNodesImpl{ + var parent BaseNodesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNodesImpl: %+v", err) + } + + return RawNodesImpl{ + nodes: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldatadriftmetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldatadriftmetricthreshold.go index 2cd773d0188..3460ccff0a9 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldatadriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldatadriftmetricthreshold.go @@ -14,7 +14,16 @@ type NumericalDataDriftMetricThreshold struct { Metric NumericalDataDriftMetric `json:"metric"` // Fields inherited from DataDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalDataDriftMetricThreshold) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return BaseDataDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalDataDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalDataDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldataqualitymetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldataqualitymetricthreshold.go index 29d6764edc0..f1eda825312 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldataqualitymetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericaldataqualitymetricthreshold.go @@ -14,7 +14,16 @@ type NumericalDataQualityMetricThreshold struct { Metric NumericalDataQualityMetric `json:"metric"` // Fields inherited from DataQualityMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalDataQualityMetricThreshold) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return BaseDataQualityMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalDataQualityMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalDataQualityMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericalpredictiondriftmetricthreshold.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericalpredictiondriftmetricthreshold.go index fc722265760..10824f04be8 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericalpredictiondriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_numericalpredictiondriftmetricthreshold.go @@ -14,7 +14,16 @@ type NumericalPredictionDriftMetricThreshold struct { Metric NumericalPredictionDriftMetric `json:"metric"` // Fields inherited from PredictionDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalPredictionDriftMetricThreshold) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return BasePredictionDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalPredictionDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalPredictionDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_pipelinejob.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_pipelinejob.go index cbad874fe4d..4d1c19b969a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_pipelinejob.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_pipelinejob.go @@ -18,6 +18,7 @@ type PipelineJob struct { SourceJobId *string `json:"sourceJobId,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -25,12 +26,30 @@ type PipelineJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s PipelineJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = PipelineJob{} func (s PipelineJob) MarshalJSON() ([]byte, error) { @@ -42,9 +61,10 @@ func (s PipelineJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PipelineJob: %+v", err) } + decoded["jobType"] = "Pipeline" encoded, err = json.Marshal(decoded) @@ -70,6 +90,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Jobs = decoded.Jobs s.Properties = decoded.Properties s.Services = decoded.Services @@ -84,7 +105,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'PipelineJob': %+v", err) } @@ -99,7 +120,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'PipelineJob': %+v", key, err) } @@ -116,7 +137,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'PipelineJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmetricthresholdbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmetricthresholdbase.go index 2d1e7393216..53e938aca62 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PredictionDriftMetricThresholdBase interface { + PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl } -// RawPredictionDriftMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PredictionDriftMetricThresholdBase = BasePredictionDriftMetricThresholdBaseImpl{} + +type BasePredictionDriftMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BasePredictionDriftMetricThresholdBaseImpl) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return s +} + +var _ PredictionDriftMetricThresholdBase = RawPredictionDriftMetricThresholdBaseImpl{} + +// RawPredictionDriftMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPredictionDriftMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + predictionDriftMetricThresholdBase BasePredictionDriftMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawPredictionDriftMetricThresholdBaseImpl) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return s.predictionDriftMetricThresholdBase } -func unmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (PredictionDriftMetricThresholdBase, error) { +func UnmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (PredictionDriftMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (Pr return out, nil } - out := RawPredictionDriftMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BasePredictionDriftMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePredictionDriftMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawPredictionDriftMetricThresholdBaseImpl{ + predictionDriftMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmonitoringsignal.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmonitoringsignal.go index f3dbfa1a022..12345f84fca 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_predictiondriftmonitoringsignal.go @@ -17,8 +17,18 @@ type PredictionDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s PredictionDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = PredictionDriftMonitoringSignal{} @@ -32,9 +42,10 @@ func (s PredictionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PredictionDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "PredictionDrift" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureDataTypeOverride = decoded.FeatureDataTypeOverride s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -71,7 +83,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]PredictionDriftMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalPredictionDriftMetricThresholdBaseImplementation(val) + impl, err := UnmarshalPredictionDriftMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'PredictionDriftMonitoringSignal': %+v", i, err) } @@ -81,7 +93,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'PredictionDriftMonitoringSignal': %+v", err) } @@ -89,7 +101,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'PredictionDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_pytorch.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_pytorch.go index c990fc64b04..0080d383d38 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_pytorch.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_pytorch.go @@ -14,6 +14,14 @@ type PyTorch struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s PyTorch) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = PyTorch{} @@ -27,9 +35,10 @@ func (s PyTorch) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PyTorch: %+v", err) } + decoded["distributionType"] = "PyTorch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_randomsamplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_randomsamplingalgorithm.go index bc3242929de..3380183918e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_randomsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_randomsamplingalgorithm.go @@ -15,6 +15,14 @@ type RandomSamplingAlgorithm struct { Seed *int64 `json:"seed,omitempty"` // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s RandomSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = RandomSamplingAlgorithm{} @@ -28,9 +36,10 @@ func (s RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RandomSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Random" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_recurrencetrigger.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_recurrencetrigger.go index e147909539d..83476eed9d2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_recurrencetrigger.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_recurrencetrigger.go @@ -16,9 +16,20 @@ type RecurrenceTrigger struct { Schedule *RecurrenceSchedule `json:"schedule,omitempty"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s RecurrenceTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = RecurrenceTrigger{} @@ -32,9 +43,10 @@ func (s RecurrenceTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecurrenceTrigger: %+v", err) } + decoded["triggerType"] = "Recurrence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_regression.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_regression.go index 9c48adb0e0e..4488a6e470c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_regression.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_regression.go @@ -24,11 +24,22 @@ type Regression struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Regression) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Regression{} func (s Regression) MarshalJSON() ([]byte, error) { @@ -40,9 +51,10 @@ func (s Regression) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Regression: %+v", err) } + decoded["taskType"] = "Regression" encoded, err = json.Marshal(decoded) @@ -68,6 +80,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -82,7 +95,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Regression': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_rollinginputdata.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_rollinginputdata.go index eaaaafcaf84..d464aee793e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_rollinginputdata.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_rollinginputdata.go @@ -16,10 +16,22 @@ type RollingInputData struct { WindowSize string `json:"windowSize"` // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s RollingInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = RollingInputData{} @@ -33,9 +45,10 @@ func (s RollingInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RollingInputData: %+v", err) } + decoded["inputDataType"] = "Rolling" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_samplingalgorithm.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_samplingalgorithm.go index 00a99b84535..18cb37c29b6 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_samplingalgorithm.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_samplingalgorithm.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SamplingAlgorithm interface { + SamplingAlgorithm() BaseSamplingAlgorithmImpl } -// RawSamplingAlgorithmImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SamplingAlgorithm = BaseSamplingAlgorithmImpl{} + +type BaseSamplingAlgorithmImpl struct { + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BaseSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s +} + +var _ SamplingAlgorithm = RawSamplingAlgorithmImpl{} + +// RawSamplingAlgorithmImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSamplingAlgorithmImpl struct { - Type string - Values map[string]interface{} + samplingAlgorithm BaseSamplingAlgorithmImpl + Type string + Values map[string]interface{} +} + +func (s RawSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s.samplingAlgorithm } -func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { +func UnmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, return out, nil } - out := RawSamplingAlgorithmImpl{ - Type: value, - Values: temp, + var parent BaseSamplingAlgorithmImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSamplingAlgorithmImpl: %+v", err) } - return out, nil + + return RawSamplingAlgorithmImpl{ + samplingAlgorithm: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_schedule.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_schedule.go index 74117728cbb..63ae3ce2e76 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_schedule.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_schedule.go @@ -41,7 +41,7 @@ func (s *Schedule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["action"]; ok { - impl, err := unmarshalScheduleActionBaseImplementation(v) + impl, err := UnmarshalScheduleActionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Action' for 'Schedule': %+v", err) } @@ -49,7 +49,7 @@ func (s *Schedule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerBaseImplementation(v) + impl, err := UnmarshalTriggerBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'Schedule': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_scheduleactionbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_scheduleactionbase.go index b7019ad0e05..e8d7bafbf65 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_scheduleactionbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_scheduleactionbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScheduleActionBase interface { + ScheduleActionBase() BaseScheduleActionBaseImpl } -// RawScheduleActionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScheduleActionBase = BaseScheduleActionBaseImpl{} + +type BaseScheduleActionBaseImpl struct { + ActionType ScheduleActionType `json:"actionType"` +} + +func (s BaseScheduleActionBaseImpl) ScheduleActionBase() BaseScheduleActionBaseImpl { + return s +} + +var _ ScheduleActionBase = RawScheduleActionBaseImpl{} + +// RawScheduleActionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScheduleActionBaseImpl struct { - Type string - Values map[string]interface{} + scheduleActionBase BaseScheduleActionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawScheduleActionBaseImpl) ScheduleActionBase() BaseScheduleActionBaseImpl { + return s.scheduleActionBase } -func unmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase, error) { +func UnmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase return out, nil } - out := RawScheduleActionBaseImpl{ - Type: value, - Values: temp, + var parent BaseScheduleActionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScheduleActionBaseImpl: %+v", err) } - return out, nil + + return RawScheduleActionBaseImpl{ + scheduleActionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_seasonality.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_seasonality.go index ef94d040e8c..5a18fb21401 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_seasonality.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_seasonality.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Seasonality interface { + Seasonality() BaseSeasonalityImpl } -// RawSeasonalityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Seasonality = BaseSeasonalityImpl{} + +type BaseSeasonalityImpl struct { + Mode SeasonalityMode `json:"mode"` +} + +func (s BaseSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s +} + +var _ Seasonality = RawSeasonalityImpl{} + +// RawSeasonalityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSeasonalityImpl struct { - Type string - Values map[string]interface{} + seasonality BaseSeasonalityImpl + Type string + Values map[string]interface{} +} + +func (s RawSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s.seasonality } -func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { +func UnmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { return out, nil } - out := RawSeasonalityImpl{ - Type: value, - Values: temp, + var parent BaseSeasonalityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSeasonalityImpl: %+v", err) } - return out, nil + + return RawSeasonalityImpl{ + seasonality: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_staticinputdata.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_staticinputdata.go index 06272df74ee..62b8fd2eeb7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_staticinputdata.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_staticinputdata.go @@ -16,10 +16,22 @@ type StaticInputData struct { WindowStart string `json:"windowStart"` // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s StaticInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = StaticInputData{} @@ -33,9 +45,10 @@ func (s StaticInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StaticInputData: %+v", err) } + decoded["inputDataType"] = "Static" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjob.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjob.go index 159bd602462..242e955a5cf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjob.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjob.go @@ -22,6 +22,7 @@ type SweepJob struct { Trial TrialComponent `json:"trial"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -29,12 +30,30 @@ type SweepJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` Status *JobStatus `json:"status,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } +func (s SweepJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SweepJob{} func (s SweepJob) MarshalJSON() ([]byte, error) { @@ -46,9 +65,10 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJob: %+v", err) } + decoded["jobType"] = "Sweep" encoded, err = json.Marshal(decoded) @@ -74,6 +94,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Limits = decoded.Limits s.Objective = decoded.Objective s.Properties = decoded.Properties @@ -90,7 +111,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'SweepJob': %+v", err) } @@ -98,7 +119,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SweepJob': %+v", err) } @@ -113,7 +134,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SweepJob': %+v", key, err) } @@ -130,7 +151,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SweepJob': %+v", key, err) } @@ -140,7 +161,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["samplingAlgorithm"]; ok { - impl, err := unmarshalSamplingAlgorithmImplementation(v) + impl, err := UnmarshalSamplingAlgorithmImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SamplingAlgorithm' for 'SweepJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjoblimits.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjoblimits.go index 3e4d528e82f..5784a1c4cf3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjoblimits.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_sweepjoblimits.go @@ -16,7 +16,16 @@ type SweepJobLimits struct { TrialTimeout *string `json:"trialTimeout,omitempty"` // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s SweepJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = SweepJobLimits{} @@ -30,9 +39,10 @@ func (s SweepJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Sweep" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetlags.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetlags.go index 6d9d04623a6..13f6b53f8a3 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetlags.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetlags.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetLags interface { + TargetLags() BaseTargetLagsImpl } -// RawTargetLagsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetLags = BaseTargetLagsImpl{} + +type BaseTargetLagsImpl struct { + Mode TargetLagsMode `json:"mode"` +} + +func (s BaseTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s +} + +var _ TargetLags = RawTargetLagsImpl{} + +// RawTargetLagsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetLagsImpl struct { - Type string - Values map[string]interface{} + targetLags BaseTargetLagsImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s.targetLags } -func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { +func UnmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { return out, nil } - out := RawTargetLagsImpl{ - Type: value, - Values: temp, + var parent BaseTargetLagsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetLagsImpl: %+v", err) } - return out, nil + + return RawTargetLagsImpl{ + targetLags: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetrollingwindowsize.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetrollingwindowsize.go index 27d08fe3268..65123411be1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_targetrollingwindowsize.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetRollingWindowSize interface { + TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl } -// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetRollingWindowSize = BaseTargetRollingWindowSizeImpl{} + +type BaseTargetRollingWindowSizeImpl struct { + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s BaseTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s +} + +var _ TargetRollingWindowSize = RawTargetRollingWindowSizeImpl{} + +// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetRollingWindowSizeImpl struct { - Type string - Values map[string]interface{} + targetRollingWindowSize BaseTargetRollingWindowSizeImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s.targetRollingWindowSize } -func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { +func UnmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRolling return out, nil } - out := RawTargetRollingWindowSizeImpl{ - Type: value, - Values: temp, + var parent BaseTargetRollingWindowSizeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetRollingWindowSizeImpl: %+v", err) } - return out, nil + + return RawTargetRollingWindowSizeImpl{ + targetRollingWindowSize: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tensorflow.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tensorflow.go index 58472d12ff5..0aa30ef2b8d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tensorflow.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tensorflow.go @@ -15,6 +15,14 @@ type TensorFlow struct { WorkerCount *int64 `json:"workerCount,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s TensorFlow) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = TensorFlow{} @@ -28,9 +36,10 @@ func (s TensorFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TensorFlow: %+v", err) } + decoded["distributionType"] = "TensorFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassification.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassification.go index e3f1e2e14fe..2b0b698d039 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassification.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassification.go @@ -17,11 +17,22 @@ type TextClassification struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassification{} func (s TextClassification) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassification: %+v", err) } + decoded["taskType"] = "TextClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassificationmultilabel.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassificationmultilabel.go index b4dacd722ef..8b125d0d634 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textclassificationmultilabel.go @@ -17,11 +17,22 @@ type TextClassificationMultilabel struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassificationMultilabel{} func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassificationMultilabel: %+v", err) } + decoded["taskType"] = "TextClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textner.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textner.go index 65392fcd368..c28ae2fb0ab 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_textner.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_textner.go @@ -17,11 +17,22 @@ type TextNer struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextNer) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextNer{} func (s TextNer) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextNer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextNer: %+v", err) } + decoded["taskType"] = "TextNER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_topnfeaturesbyattribution.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_topnfeaturesbyattribution.go index 3cfecc0fde6..a1deedf888c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_topnfeaturesbyattribution.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_topnfeaturesbyattribution.go @@ -14,6 +14,14 @@ type TopNFeaturesByAttribution struct { Top *int64 `json:"top,omitempty"` // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s TopNFeaturesByAttribution) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = TopNFeaturesByAttribution{} @@ -27,9 +35,10 @@ func (s TopNFeaturesByAttribution) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TopNFeaturesByAttribution: %+v", err) } + decoded["filterType"] = "TopNByAttribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_trialcomponent.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_trialcomponent.go index fd60788bcab..7efc1868c61 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_trialcomponent.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_trialcomponent.go @@ -38,7 +38,7 @@ func (s *TrialComponent) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'TrialComponent': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_triggerbase.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_triggerbase.go index 56bbfd7326c..bf4adc77f22 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_triggerbase.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_triggerbase.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerBase interface { + TriggerBase() BaseTriggerBaseImpl } -// RawTriggerBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerBase = BaseTriggerBaseImpl{} + +type BaseTriggerBaseImpl struct { + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s BaseTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s +} + +var _ TriggerBase = RawTriggerBaseImpl{} + +// RawTriggerBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerBaseImpl struct { - Type string - Values map[string]interface{} + triggerBase BaseTriggerBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s.triggerBase } -func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { +func UnmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { return out, nil } - out := RawTriggerBaseImpl{ - Type: value, - Values: temp, + var parent BaseTriggerBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerBaseImpl: %+v", err) } - return out, nil + + return RawTriggerBaseImpl{ + triggerBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljobinput.go index b977b812870..8b70c4466f0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljobinput.go @@ -15,7 +15,16 @@ type TritonModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s TritonModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = TritonModelJobInput{} @@ -29,9 +38,10 @@ func (s TritonModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobInput: %+v", err) } + decoded["jobInputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljoboutput.go index 1041f9cb867..6de11b4b5e8 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_tritonmodeljoboutput.go @@ -15,7 +15,16 @@ type TritonModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s TritonModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = TritonModelJobOutput{} @@ -29,9 +38,10 @@ func (s TritonModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_truncationselectionpolicy.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_truncationselectionpolicy.go index 512062354ba..16f731bc40f 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_truncationselectionpolicy.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_truncationselectionpolicy.go @@ -14,8 +14,18 @@ type TruncationSelectionPolicy struct { TruncationPercentage *int64 `json:"truncationPercentage,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s TruncationSelectionPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = TruncationSelectionPolicy{} @@ -29,9 +39,10 @@ func (s TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TruncationSelectionPolicy: %+v", err) } + decoded["policyType"] = "TruncationSelection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejobinput.go index 2ce7430a3de..1d1a59f9468 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejobinput.go @@ -15,7 +15,16 @@ type UriFileJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFileJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFileJobInput{} @@ -29,9 +38,10 @@ func (s UriFileJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobInput: %+v", err) } + decoded["jobInputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejoboutput.go index 6895e7be379..b136431372e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifilejoboutput.go @@ -15,7 +15,16 @@ type UriFileJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFileJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFileJobOutput{} @@ -29,9 +38,10 @@ func (s UriFileJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjobinput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjobinput.go index d6c5f832dfa..a13e02468b1 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjobinput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjobinput.go @@ -15,7 +15,16 @@ type UriFolderJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFolderJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFolderJobInput{} @@ -29,9 +38,10 @@ func (s UriFolderJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobInput: %+v", err) } + decoded["jobInputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjoboutput.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjoboutput.go index f4fd2929aae..4d651c86f9e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjoboutput.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_urifolderjoboutput.go @@ -15,7 +15,16 @@ type UriFolderJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFolderJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFolderJobOutput{} @@ -29,9 +38,10 @@ func (s UriFolderJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/model_useridentity.go b/resource-manager/machinelearningservices/2023-10-01/schedule/model_useridentity.go index aa6e7c8b2f7..4871dca1b51 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/model_useridentity.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/model_useridentity.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = UserIdentity{} type UserIdentity struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s UserIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = UserIdentity{} @@ -26,9 +34,10 @@ func (s UserIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserIdentity: %+v", err) } + decoded["identityType"] = "UserIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/schedule/version.go b/resource-manager/machinelearningservices/2023-10-01/schedule/version.go index 040c0297057..65e3070cae2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/schedule/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/README.md b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/README.md index 4817525d6ca..722ede24981 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource` Documentation -The `v2workspaceconnectionresource` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `v2workspaceconnectionresource` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/client.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/client.go index 87e517da19e..0295936051a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/client.go @@ -15,7 +15,7 @@ type V2WorkspaceConnectionResourceClient struct { } func NewV2WorkspaceConnectionResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*V2WorkspaceConnectionResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "v2workspaceconnectionresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "v2workspaceconnectionresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating V2WorkspaceConnectionResourceClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_connection.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_connection.go index 1a4e532b599..342a3c6b0ff 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_connection.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_workspace.go index e3ba2bd06b8..a09c711f4ca 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go index a0abc732488..5441ad41b4b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go @@ -49,7 +49,6 @@ func (c V2WorkspaceConnectionResourceClient) WorkspaceConnectionsCreate(ctx cont var model WorkspaceConnectionPropertiesV2BasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go index fb766b3f75f..f7f1df9c9fb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go @@ -45,7 +45,6 @@ func (c V2WorkspaceConnectionResourceClient) WorkspaceConnectionsGet(ctx context var model WorkspaceConnectionPropertiesV2BasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go index 9cb93aa7e2f..eb02f9aa967 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go @@ -40,6 +40,7 @@ func (o WorkspaceConnectionsListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go index 190ee4e503e..3ee93e1a57b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go @@ -14,12 +14,24 @@ type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` Target *string `json:"target,omitempty"` Value *string `json:"value,omitempty"` ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s ManagedIdentityAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + var _ json.Marshaler = ManagedIdentityAuthTypeWorkspaceConnectionProperties{} func (s ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentityAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go index 32c1658bb02..e7b10adea7c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go @@ -13,12 +13,24 @@ var _ WorkspaceConnectionPropertiesV2 = NoneAuthTypeWorkspaceConnectionPropertie type NoneAuthTypeWorkspaceConnectionProperties struct { // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` Target *string `json:"target,omitempty"` Value *string `json:"value,omitempty"` ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s NoneAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + var _ json.Marshaler = NoneAuthTypeWorkspaceConnectionProperties{} func (s NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NoneAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "None" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go index 1f3f3eb7fcf..e93686be184 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go @@ -14,12 +14,24 @@ type PATAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` Target *string `json:"target,omitempty"` Value *string `json:"value,omitempty"` ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s PATAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + var _ json.Marshaler = PATAuthTypeWorkspaceConnectionProperties{} func (s PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PATAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "PAT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go index b3db1d4ab98..ef25677d4cb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go @@ -14,12 +14,24 @@ type SASAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionSharedAccessSignature `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` Target *string `json:"target,omitempty"` Value *string `json:"value,omitempty"` ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s SASAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + var _ json.Marshaler = SASAuthTypeWorkspaceConnectionProperties{} func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go index c80aa180af5..9a18bf83119 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go @@ -14,12 +14,24 @@ type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionUsernamePassword `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` Target *string `json:"target,omitempty"` Value *string `json:"value,omitempty"` ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s UsernamePasswordAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + var _ json.Marshaler = UsernamePasswordAuthTypeWorkspaceConnectionProperties{} func (s UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UsernamePasswordAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "UsernamePassword" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go index 593184b5948..1b8dd9339fb 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkspaceConnectionPropertiesV2 interface { + WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl } -// RawWorkspaceConnectionPropertiesV2Impl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkspaceConnectionPropertiesV2 = BaseWorkspaceConnectionPropertiesV2Impl{} + +type BaseWorkspaceConnectionPropertiesV2Impl struct { + AuthType ConnectionAuthType `json:"authType"` + Category *ConnectionCategory `json:"category,omitempty"` + Target *string `json:"target,omitempty"` + Value *string `json:"value,omitempty"` + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +func (s BaseWorkspaceConnectionPropertiesV2Impl) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return s +} + +var _ WorkspaceConnectionPropertiesV2 = RawWorkspaceConnectionPropertiesV2Impl{} + +// RawWorkspaceConnectionPropertiesV2Impl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkspaceConnectionPropertiesV2Impl struct { - Type string - Values map[string]interface{} + workspaceConnectionPropertiesV2 BaseWorkspaceConnectionPropertiesV2Impl + Type string + Values map[string]interface{} +} + +func (s RawWorkspaceConnectionPropertiesV2Impl) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return s.workspaceConnectionPropertiesV2 } -func unmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (WorkspaceConnectionPropertiesV2, error) { +func UnmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (WorkspaceConnectionPropertiesV2, error) { if input == nil { return nil, nil } @@ -76,10 +97,15 @@ func unmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (Works return out, nil } - out := RawWorkspaceConnectionPropertiesV2Impl{ - Type: value, - Values: temp, + var parent BaseWorkspaceConnectionPropertiesV2Impl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkspaceConnectionPropertiesV2Impl: %+v", err) } - return out, nil + + return RawWorkspaceConnectionPropertiesV2Impl{ + workspaceConnectionPropertiesV2: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go index f1723dd5b23..eaee9dfba80 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go @@ -38,7 +38,7 @@ func (s *WorkspaceConnectionPropertiesV2BasicResource) UnmarshalJSON(bytes []byt } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkspaceConnectionPropertiesV2Implementation(v) + impl, err := UnmarshalWorkspaceConnectionPropertiesV2Implementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkspaceConnectionPropertiesV2BasicResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/version.go b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/version.go index ebc97ef5f45..0b696e80933 100644 --- a/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/v2workspaceconnectionresource/version.go @@ -1,12 +1,10 @@ package v2workspaceconnectionresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/v2workspaceconnectionresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/v2workspaceconnectionresource/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/README.md b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/README.md index 876f2ec1da0..d4ce2e6df86 100644 --- a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/client.go b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/id_location.go b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/id_location.go index 6045c49cbeb..f03a8b98c3d 100644 --- a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/id_location.go +++ b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/method_list.go b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/method_list.go +++ b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/version.go b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/version.go index 22d9900162d..811945a80bf 100644 --- a/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/README.md b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/README.md index 027b2b77f90..1268a748f7c 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/client.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/id_privateendpointconnection.go index 969be0628ce..82eb9120595 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index afe8d5ba983..875cb76a479 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -49,7 +49,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) PrivateEndpointConnectionsCre var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go index dcfee9208ad..f7aa9bd0806 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) PrivateEndpointConnectionsGet var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/version.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/version.go index 47256e9b079..0838b840d6a 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/README.md b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/README.md index 1a99344c72a..dafb72e5f40 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/client.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/id_workspace.go index b4f59dcc94b..f4bd408e385 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go index c3573f06fd8..91299f85e41 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) PrivateLinkResourcesList(ctx contex var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/version.go b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/version.go index 61d4a5f1141..72e76cd3088 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/README.md b/resource-manager/machinelearningservices/2023-10-01/workspaces/README.md index ac74446c3d1..65483bcee41 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/README.md +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-10-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2023-10-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/client.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/client.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/id_workspace.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/id_workspace.go index a9e58042a49..e6bfb6194f2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/id_workspace.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_delete.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_delete.go index b41fca1fe8c..5297485af30 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_delete.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_get.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_get.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbyresourcegroup.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbyresourcegroup.go index f485d22dee7..dc63c4f42e7 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbysubscription.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbysubscription.go index 424d45bb49b..39d3586061e 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbysubscription.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listkeys.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listkeys.go index fa450632461..54b28298920 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listkeys.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listkeys.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) ListKeys(ctx context.Context, id WorkspaceId) (result var model ListWorkspaceKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listnotebookaccesstoken.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listnotebookaccesstoken.go index f699e11bbf4..d6f35efb8b2 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listnotebookaccesstoken.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/method_listnotebookaccesstoken.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) ListNotebookAccessToken(ctx context.Context, id Worksp var model NotebookAccessTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_fqdnoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_fqdnoutboundrule.go index 9297fe8225d..71707cd0354 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_fqdnoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_fqdnoutboundrule.go @@ -14,8 +14,18 @@ type FqdnOutboundRule struct { Destination *string `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s FqdnOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = FqdnOutboundRule{} @@ -29,9 +39,10 @@ func (s FqdnOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FqdnOutboundRule: %+v", err) } + decoded["type"] = "FQDN" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_managednetworksettings.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_managednetworksettings.go index c4476d33915..de084378da0 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_managednetworksettings.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_managednetworksettings.go @@ -41,7 +41,7 @@ func (s *ManagedNetworkSettings) UnmarshalJSON(bytes []byte) error { output := make(map[string]OutboundRule) for key, val := range dictionaryTemp { - impl, err := unmarshalOutboundRuleImplementation(val) + impl, err := UnmarshalOutboundRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'OutboundRules' for 'ManagedNetworkSettings': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_outboundrule.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_outboundrule.go index d38c04e13ac..55d78dc13ba 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_outboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_outboundrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutboundRule interface { + OutboundRule() BaseOutboundRuleImpl } -// RawOutboundRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutboundRule = BaseOutboundRuleImpl{} + +type BaseOutboundRuleImpl struct { + Category *RuleCategory `json:"category,omitempty"` + Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s BaseOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s +} + +var _ OutboundRule = RawOutboundRuleImpl{} + +// RawOutboundRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutboundRuleImpl struct { - Type string - Values map[string]interface{} + outboundRule BaseOutboundRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s.outboundRule } -func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { +func UnmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { return out, nil } - out := RawOutboundRuleImpl{ - Type: value, - Values: temp, + var parent BaseOutboundRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutboundRuleImpl: %+v", err) } - return out, nil + + return RawOutboundRuleImpl{ + outboundRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_privateendpointoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_privateendpointoutboundrule.go index a631fb0a147..6eaafd7d540 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_privateendpointoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_privateendpointoutboundrule.go @@ -14,8 +14,18 @@ type PrivateEndpointOutboundRule struct { Destination *PrivateEndpointDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s PrivateEndpointOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = PrivateEndpointOutboundRule{} @@ -29,9 +39,10 @@ func (s PrivateEndpointOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrivateEndpointOutboundRule: %+v", err) } + decoded["type"] = "PrivateEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_servicetagoutboundrule.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_servicetagoutboundrule.go index d3b6e8a1184..e036ba01463 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/model_servicetagoutboundrule.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/model_servicetagoutboundrule.go @@ -14,8 +14,18 @@ type ServiceTagOutboundRule struct { Destination *ServiceTagDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s ServiceTagOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = ServiceTagOutboundRule{} @@ -29,9 +39,10 @@ func (s ServiceTagOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceTagOutboundRule: %+v", err) } + decoded["type"] = "ServiceTag" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2023-10-01/workspaces/version.go b/resource-manager/machinelearningservices/2023-10-01/workspaces/version.go index 32b18661991..d012b950f68 100644 --- a/resource-manager/machinelearningservices/2023-10-01/workspaces/version.go +++ b/resource-manager/machinelearningservices/2023-10-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-10-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/README.md b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/README.md index d0916c50120..b6467e9c1d7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/batchdeployment` Documentation -The `batchdeployment` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `batchdeployment` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/client.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/client.go index 7dc98fd0a09..adcef61716d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/client.go @@ -15,7 +15,7 @@ type BatchDeploymentClient struct { } func NewBatchDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchDeploymentClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_batchendpoint.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_batchendpoint.go index 0da28c1f1d1..31fdbd42722 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_batchendpoint.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_batchendpoint.go @@ -44,7 +44,7 @@ func ParseBatchEndpointID(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBatchEndpointIDInsensitively(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_deployment.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_deployment.go index b8e888ae352..c5e60376be0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_deployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/id_deployment.go @@ -46,7 +46,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_get.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_get.go index 5fcf02fc12b..d1ccbe4ea9c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_get.go @@ -45,7 +45,6 @@ func (c BatchDeploymentClient) Get(ctx context.Context, id DeploymentId) (result var model BatchDeploymentTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_list.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_list.go index 507e05685a7..13f187a969e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_assetreferencebase.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_assetreferencebase.go index aca61d3adb1..e483ac07e3a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_assetreferencebase.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_assetreferencebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AssetReferenceBase interface { + AssetReferenceBase() BaseAssetReferenceBaseImpl } -// RawAssetReferenceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AssetReferenceBase = BaseAssetReferenceBaseImpl{} + +type BaseAssetReferenceBaseImpl struct { + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s BaseAssetReferenceBaseImpl) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return s +} + +var _ AssetReferenceBase = RawAssetReferenceBaseImpl{} + +// RawAssetReferenceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAssetReferenceBaseImpl struct { - Type string - Values map[string]interface{} + assetReferenceBase BaseAssetReferenceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAssetReferenceBaseImpl) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return s.assetReferenceBase } -func unmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase, error) { +func UnmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAssetReferenceBaseImplementation(input []byte) (AssetReferenceBase return out, nil } - out := RawAssetReferenceBaseImpl{ - Type: value, - Values: temp, + var parent BaseAssetReferenceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAssetReferenceBaseImpl: %+v", err) } - return out, nil + + return RawAssetReferenceBaseImpl{ + assetReferenceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeployment.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeployment.go index 2948ff6ded2..d5d596c7e83 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeployment.go @@ -59,7 +59,7 @@ func (s *BatchDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["deploymentConfiguration"]; ok { - impl, err := unmarshalBatchDeploymentConfigurationImplementation(v) + impl, err := UnmarshalBatchDeploymentConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'DeploymentConfiguration' for 'BatchDeployment': %+v", err) } @@ -67,7 +67,7 @@ func (s *BatchDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["model"]; ok { - impl, err := unmarshalAssetReferenceBaseImplementation(v) + impl, err := UnmarshalAssetReferenceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Model' for 'BatchDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeploymentconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeploymentconfiguration.go index 67ee2d3c2bd..714b9df0256 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeploymentconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchdeploymentconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BatchDeploymentConfiguration interface { + BatchDeploymentConfiguration() BaseBatchDeploymentConfigurationImpl } -// RawBatchDeploymentConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BatchDeploymentConfiguration = BaseBatchDeploymentConfigurationImpl{} + +type BaseBatchDeploymentConfigurationImpl struct { + DeploymentConfigurationType BatchDeploymentConfigurationType `json:"deploymentConfigurationType"` +} + +func (s BaseBatchDeploymentConfigurationImpl) BatchDeploymentConfiguration() BaseBatchDeploymentConfigurationImpl { + return s +} + +var _ BatchDeploymentConfiguration = RawBatchDeploymentConfigurationImpl{} + +// RawBatchDeploymentConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBatchDeploymentConfigurationImpl struct { - Type string - Values map[string]interface{} + batchDeploymentConfiguration BaseBatchDeploymentConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawBatchDeploymentConfigurationImpl) BatchDeploymentConfiguration() BaseBatchDeploymentConfigurationImpl { + return s.batchDeploymentConfiguration } -func unmarshalBatchDeploymentConfigurationImplementation(input []byte) (BatchDeploymentConfiguration, error) { +func UnmarshalBatchDeploymentConfigurationImplementation(input []byte) (BatchDeploymentConfiguration, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalBatchDeploymentConfigurationImplementation(input []byte) (BatchDep return out, nil } - out := RawBatchDeploymentConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseBatchDeploymentConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBatchDeploymentConfigurationImpl: %+v", err) } - return out, nil + + return RawBatchDeploymentConfigurationImpl{ + batchDeploymentConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchpipelinecomponentdeploymentconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchpipelinecomponentdeploymentconfiguration.go index 37ba3d40d8f..858e608e4ca 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchpipelinecomponentdeploymentconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_batchpipelinecomponentdeploymentconfiguration.go @@ -17,6 +17,14 @@ type BatchPipelineComponentDeploymentConfiguration struct { Tags *map[string]string `json:"tags,omitempty"` // Fields inherited from BatchDeploymentConfiguration + + DeploymentConfigurationType BatchDeploymentConfigurationType `json:"deploymentConfigurationType"` +} + +func (s BatchPipelineComponentDeploymentConfiguration) BatchDeploymentConfiguration() BaseBatchDeploymentConfigurationImpl { + return BaseBatchDeploymentConfigurationImpl{ + DeploymentConfigurationType: s.DeploymentConfigurationType, + } } var _ json.Marshaler = BatchPipelineComponentDeploymentConfiguration{} @@ -30,9 +38,10 @@ func (s BatchPipelineComponentDeploymentConfiguration) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BatchPipelineComponentDeploymentConfiguration: %+v", err) } + decoded["deploymentConfigurationType"] = "PipelineComponent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_datapathassetreference.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_datapathassetreference.go index e78e7d339f7..5505b2d3050 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_datapathassetreference.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_datapathassetreference.go @@ -15,6 +15,14 @@ type DataPathAssetReference struct { Path *string `json:"path,omitempty"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s DataPathAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = DataPathAssetReference{} @@ -28,9 +36,10 @@ func (s DataPathAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataPathAssetReference: %+v", err) } + decoded["referenceType"] = "DataPath" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_idassetreference.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_idassetreference.go index 6439cc45245..7b61763dd5e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_idassetreference.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_idassetreference.go @@ -14,6 +14,14 @@ type IdAssetReference struct { AssetId string `json:"assetId"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s IdAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = IdAssetReference{} @@ -27,9 +35,10 @@ func (s IdAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IdAssetReference: %+v", err) } + decoded["referenceType"] = "Id" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_outputpathassetreference.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_outputpathassetreference.go index 38e93481022..df0f556e397 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_outputpathassetreference.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/model_outputpathassetreference.go @@ -15,6 +15,14 @@ type OutputPathAssetReference struct { Path *string `json:"path,omitempty"` // Fields inherited from AssetReferenceBase + + ReferenceType ReferenceType `json:"referenceType"` +} + +func (s OutputPathAssetReference) AssetReferenceBase() BaseAssetReferenceBaseImpl { + return BaseAssetReferenceBaseImpl{ + ReferenceType: s.ReferenceType, + } } var _ json.Marshaler = OutputPathAssetReference{} @@ -28,9 +36,10 @@ func (s OutputPathAssetReference) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OutputPathAssetReference: %+v", err) } + decoded["referenceType"] = "OutputPath" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/version.go b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/version.go index 169b867bca5..450c9c0adae 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchdeployment/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchdeployment/version.go @@ -1,12 +1,10 @@ package batchdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchdeployment/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/README.md b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/README.md index e4335a09bcc..6608e05c4eb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/batchendpoint` Documentation -The `batchendpoint` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `batchendpoint` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/client.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/client.go index 67f1c49668b..936dcc31960 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/client.go @@ -15,7 +15,7 @@ type BatchEndpointClient struct { } func NewBatchEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchEndpointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "batchendpoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "batchendpoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BatchEndpointClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_batchendpoint.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_batchendpoint.go index ee5f6294762..e447f954ead 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_batchendpoint.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_batchendpoint.go @@ -44,7 +44,7 @@ func ParseBatchEndpointID(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBatchEndpointIDInsensitively(input string) (*BatchEndpointId, error) { } id := BatchEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_workspace.go index c260816b77b..acecd2c9c38 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_get.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_get.go index ccf3c4ee73c..db6700bbc75 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_get.go @@ -45,7 +45,6 @@ func (c BatchEndpointClient) Get(ctx context.Context, id BatchEndpointId) (resul var model BatchEndpointTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_list.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_list.go index 15b32a57d30..5f8626cb8bd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_listkeys.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_listkeys.go index 2cab01bb631..1a1eec8dfdf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_listkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/method_listkeys.go @@ -46,7 +46,6 @@ func (c BatchEndpointClient) ListKeys(ctx context.Context, id BatchEndpointId) ( var model EndpointAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/version.go b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/version.go index 0fdb169f605..3dfd568626f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/batchendpoint/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/batchendpoint/version.go @@ -1,12 +1,10 @@ package batchendpoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/batchendpoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/batchendpoint/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/codecontainer/README.md index 76ae60215e4..46dda69f8f7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/codecontainer` Documentation -The `codecontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `codecontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/client.go index 5d68b14c91a..757f7bbcf04 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/client.go @@ -15,7 +15,7 @@ type CodeContainerClient struct { } func NewCodeContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*CodeContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "codecontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "codecontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CodeContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_code.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_code.go index 3307bad5114..64af8efa3cf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_code.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_code.go @@ -44,7 +44,7 @@ func ParseCodeID(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCodeIDInsensitively(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registry.go index 37ecab7c1c7..1e31e52fecb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registrycode.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registrycode.go index a2956920a30..64f5bf87ee5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registrycode.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_registrycode.go @@ -44,7 +44,7 @@ func ParseRegistryCodeID(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryCodeIDInsensitively(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_workspace.go index 8db448ef4cf..bcabd159ebe 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_createorupdate.go index ae25f5755d8..a97b022f8c3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CodeContainerClient) CreateOrUpdate(ctx context.Context, id CodeId, inpu var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_get.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_get.go index b3c2922eb2b..cb25a13fbab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_get.go @@ -45,7 +45,6 @@ func (c CodeContainerClient) Get(ctx context.Context, id CodeId) (result GetOper var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_list.go index 171b99db5bc..b08f44167a0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainersget.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainersget.go index b48d3367ad3..e5b1cdadb5f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainersget.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainersget.go @@ -45,7 +45,6 @@ func (c CodeContainerClient) RegistryCodeContainersGet(ctx context.Context, id R var model CodeContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainerslist.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainerslist.go index 5ff793b2303..9e0bbbd899f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainerslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/method_registrycodecontainerslist.go @@ -39,6 +39,7 @@ func (o RegistryCodeContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryCodeContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/codecontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/codecontainer/version.go index 8db3646c43a..f23cf56d4e5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codecontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/codecontainer/version.go @@ -1,12 +1,10 @@ package codecontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/codecontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/codecontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/README.md b/resource-manager/machinelearningservices/2024-04-01/codeversion/README.md index c52abec7474..2b7315d5377 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/codeversion` Documentation -The `codeversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `codeversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/client.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/client.go index 543dd48feb1..58bcd7357a9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/client.go @@ -15,7 +15,7 @@ type CodeVersionClient struct { } func NewCodeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*CodeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "codeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "codeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CodeVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_code.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_code.go index 36821e0ecf5..48e0eaa13e2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_code.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_code.go @@ -44,7 +44,7 @@ func ParseCodeID(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCodeIDInsensitively(input string) (*CodeId, error) { } id := CodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_codeversion.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_codeversion.go index b66d87c04b7..6348d37c078 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_codeversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_codeversion.go @@ -46,7 +46,7 @@ func ParseCodeVersionID(input string) (*CodeVersionId, error) { } id := CodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCodeVersionIDInsensitively(input string) (*CodeVersionId, error) { } id := CodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycode.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycode.go index c65761304bf..ee7ca76409a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycode.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycode.go @@ -44,7 +44,7 @@ func ParseRegistryCodeID(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryCodeIDInsensitively(input string) (*RegistryCodeId, error) { } id := RegistryCodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycodeversion.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycodeversion.go index 8f7b0202b8d..871e6dfed09 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycodeversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/id_registrycodeversion.go @@ -46,7 +46,7 @@ func ParseRegistryCodeVersionID(input string) (*RegistryCodeVersionId, error) { } id := RegistryCodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryCodeVersionIDInsensitively(input string) (*RegistryCodeVersion } id := RegistryCodeVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorgetstartpendingupload.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorgetstartpendingupload.go index b27d6f20e62..ea31f5b2347 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) CreateOrGetStartPendingUpload(ctx context.Context, id var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorupdate.go index cf50c683fae..f73034d818b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) CreateOrUpdate(ctx context.Context, id CodeVersionId, var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_get.go index a4fb85d8eb2..f74a36cf935 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_get.go @@ -45,7 +45,6 @@ func (c CodeVersionClient) Get(ctx context.Context, id CodeVersionId) (result Ge var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_list.go index 3fda420f5b3..19dc59168c3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go index 7e77f5954af..19f7d46f353 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c CodeVersionClient) RegistryCodeVersionsCreateOrGetStartPendingUpload(ctx var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionsget.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionsget.go index 65f647e5767..146b07039b1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionsget.go @@ -45,7 +45,6 @@ func (c CodeVersionClient) RegistryCodeVersionsGet(ctx context.Context, id Regis var model CodeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionslist.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionslist.go index bc66ae6a1e0..c4f87bc666e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/method_registrycodeversionslist.go @@ -41,6 +41,7 @@ func (o RegistryCodeVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryCodeVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_blobreferenceforconsumptiondto.go index a736377bab9..6d933bb3864 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_pendinguploadcredentialdto.go index b138e06369f..f88859e76d0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_sascredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_sascredentialdto.go index 3876a92d93e..73cb2d470dc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/codeversion/version.go b/resource-manager/machinelearningservices/2024-04-01/codeversion/version.go index 89fdfb6b394..278c9232bc0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/codeversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/codeversion/version.go @@ -1,12 +1,10 @@ package codeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/codeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/codeversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/README.md index fe84f630d81..ee2e81d9050 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/componentcontainer` Documentation -The `componentcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `componentcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/client.go index 6f330245767..85ab562d851 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/client.go @@ -15,7 +15,7 @@ type ComponentContainerClient struct { } func NewComponentContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_component.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_component.go index 913b5f7f86f..721dba46e3f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_component.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_component.go @@ -44,7 +44,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registry.go index 2edd2ec43b3..c7a5929dceb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registrycomponent.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registrycomponent.go index ce348024fea..f6e4c910557 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registrycomponent.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_registrycomponent.go @@ -44,7 +44,7 @@ func ParseRegistryComponentID(input string) (*RegistryComponentId, error) { } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryComponentIDInsensitively(input string) (*RegistryComponentId, } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_workspace.go index 704e379a263..ad19fe7ae41 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_createorupdate.go index a22b599184e..6915bf12224 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ComponentContainerClient) CreateOrUpdate(ctx context.Context, id Compone var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_get.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_get.go index 5ebf7d116ab..f056dd9aae9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_get.go @@ -45,7 +45,6 @@ func (c ComponentContainerClient) Get(ctx context.Context, id ComponentId) (resu var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_list.go index 8d05f37df2e..90eee5390bb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainersget.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainersget.go index 10a008aa322..08eefbe5bbe 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainersget.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainersget.go @@ -45,7 +45,6 @@ func (c ComponentContainerClient) RegistryComponentContainersGet(ctx context.Con var model ComponentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainerslist.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainerslist.go index a806a3906f9..9b772c995eb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainerslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/method_registrycomponentcontainerslist.go @@ -39,6 +39,7 @@ func (o RegistryComponentContainersListOperationOptions) ToHeaders() *client.Hea func (o RegistryComponentContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/version.go index 4751ddacb5c..0e7405f01d8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentcontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentcontainer/version.go @@ -1,12 +1,10 @@ package componentcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentcontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/README.md b/resource-manager/machinelearningservices/2024-04-01/componentversion/README.md index 1ac63cdcda0..8af3ce2f793 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/componentversion` Documentation -The `componentversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `componentversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/client.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/client.go index 9a9f96c34b8..d989626c3d5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/client.go @@ -15,7 +15,7 @@ type ComponentVersionClient struct { } func NewComponentVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "componentversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "componentversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ComponentVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_component.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_component.go index 01d778cc782..dc8a80663ab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_component.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_component.go @@ -44,7 +44,7 @@ func ParseComponentID(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComponentIDInsensitively(input string) (*ComponentId, error) { } id := ComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_componentversion.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_componentversion.go index e51dda793a0..7d0d8f41995 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_componentversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_componentversion.go @@ -46,7 +46,7 @@ func ParseComponentVersionID(input string) (*ComponentVersionId, error) { } id := ComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseComponentVersionIDInsensitively(input string) (*ComponentVersionId, er } id := ComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponent.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponent.go index 6c7311c2f0c..1e545404ae7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponent.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponent.go @@ -44,7 +44,7 @@ func ParseRegistryComponentID(input string) (*RegistryComponentId, error) { } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryComponentIDInsensitively(input string) (*RegistryComponentId, } id := RegistryComponentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponentversion.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponentversion.go index b983361d750..2bcc82618a9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponentversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/id_registrycomponentversion.go @@ -46,7 +46,7 @@ func ParseRegistryComponentVersionID(input string) (*RegistryComponentVersionId, } id := RegistryComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryComponentVersionIDInsensitively(input string) (*RegistryCompon } id := RegistryComponentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_createorupdate.go index 8c81dfe37c0..40712c7f514 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ComponentVersionClient) CreateOrUpdate(ctx context.Context, id Component var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_get.go index 48a3d37a1ff..c3f8eecf2c3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_get.go @@ -45,7 +45,6 @@ func (c ComponentVersionClient) Get(ctx context.Context, id ComponentVersionId) var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_list.go index 39ff348b6f7..b1266d0a918 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionsget.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionsget.go index 165ba881879..e9f102c4401 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionsget.go @@ -45,7 +45,6 @@ func (c ComponentVersionClient) RegistryComponentVersionsGet(ctx context.Context var model ComponentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionslist.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionslist.go index 55fe1f0970a..30f0797105c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/method_registrycomponentversionslist.go @@ -41,6 +41,7 @@ func (o RegistryComponentVersionsListOperationOptions) ToHeaders() *client.Heade func (o RegistryComponentVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/componentversion/version.go b/resource-manager/machinelearningservices/2024-04-01/componentversion/version.go index b8db11e465d..6c6f8467dea 100644 --- a/resource-manager/machinelearningservices/2024-04-01/componentversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/componentversion/version.go @@ -1,12 +1,10 @@ package componentversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/componentversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/componentversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/datacontainer/README.md index 5ec7afe2148..ecf67fc87af 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/datacontainer` Documentation -The `datacontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `datacontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/client.go index 25820f2b287..978372c4414 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/client.go @@ -15,7 +15,7 @@ type DataContainerClient struct { } func NewDataContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*DataContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspace.go index d2cd0083a09..3671dc88df1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspacedata.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspacedata.go index d749d00ee3b..4d76acd8bf0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspacedata.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/id_workspacedata.go @@ -44,7 +44,7 @@ func ParseWorkspaceDataID(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceDataIDInsensitively(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_createorupdate.go index daddb656105..8d250399361 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataContainerClient) CreateOrUpdate(ctx context.Context, id WorkspaceDat var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_get.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_get.go index 67c028af17d..0d9487bf2bb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_get.go @@ -45,7 +45,6 @@ func (c DataContainerClient) Get(ctx context.Context, id WorkspaceDataId) (resul var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_list.go index 4c058c3a3ee..b809b73aca1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/datacontainer/version.go index ab4699dbefe..bca1e3e234f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainer/version.go @@ -1,12 +1,10 @@ package datacontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/README.md b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/README.md index 3c305e2353b..b25d5cc22fa 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry` Documentation -The `datacontainerregistry` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `datacontainerregistry` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/client.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/client.go index 3f0c6452200..23805424218 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/client.go @@ -15,7 +15,7 @@ type DataContainerRegistryClient struct { } func NewDataContainerRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*DataContainerRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datacontainerregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datacontainerregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataContainerRegistryClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_data.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_data.go index a38d62895ed..cff6857d39b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_data.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_data.go @@ -44,7 +44,7 @@ func ParseDataID(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataIDInsensitively(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_registry.go index 7f2d29a3583..72beb95f30d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainersget.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainersget.go index 5c59ce343cf..94a16809760 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainersget.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainersget.go @@ -45,7 +45,6 @@ func (c DataContainerRegistryClient) RegistryDataContainersGet(ctx context.Conte var model DataContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainerslist.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainerslist.go index 9f82df7b90e..11a41c5965e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainerslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/method_registrydatacontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryDataContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryDataContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/version.go b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/version.go index 0d73a11dfd0..5618ab2b537 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/datacontainerregistry/version.go @@ -1,12 +1,10 @@ package datacontainerregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datacontainerregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datacontainerregistry/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/README.md b/resource-manager/machinelearningservices/2024-04-01/datareference/README.md index 79830bf1ef2..a5afc00fa17 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/datareference` Documentation -The `datareference` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `datareference` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/client.go b/resource-manager/machinelearningservices/2024-04-01/datareference/client.go index e3d80f382dc..ad8c9e30ef4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/client.go @@ -15,7 +15,7 @@ type DataReferenceClient struct { } func NewDataReferenceClientWithBaseURI(sdkApi sdkEnv.Api) (*DataReferenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datareference", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datareference", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataReferenceClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/id_datareferenceversion.go b/resource-manager/machinelearningservices/2024-04-01/datareference/id_datareferenceversion.go index 2b3357a0be5..8ec0f09ddf6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/id_datareferenceversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/id_datareferenceversion.go @@ -46,7 +46,7 @@ func ParseDataReferenceVersionID(input string) (*DataReferenceVersionId, error) } id := DataReferenceVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataReferenceVersionIDInsensitively(input string) (*DataReferenceVersi } id := DataReferenceVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/method_registrydatareferencesgetblobreferencesas.go b/resource-manager/machinelearningservices/2024-04-01/datareference/method_registrydatareferencesgetblobreferencesas.go index de042020206..f43b79412a4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/method_registrydatareferencesgetblobreferencesas.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/method_registrydatareferencesgetblobreferencesas.go @@ -49,7 +49,6 @@ func (c DataReferenceClient) RegistryDataReferencesGetBlobReferenceSAS(ctx conte var model GetBlobReferenceSASResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_anonymousaccesscredential.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_anonymousaccesscredential.go index 18806a6484f..84df7d356c4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_anonymousaccesscredential.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_anonymousaccesscredential.go @@ -13,6 +13,14 @@ var _ DataReferenceCredential = AnonymousAccessCredential{} type AnonymousAccessCredential struct { // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s AnonymousAccessCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = AnonymousAccessCredential{} @@ -26,9 +34,10 @@ func (s AnonymousAccessCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnonymousAccessCredential: %+v", err) } + decoded["credentialType"] = "NoCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_datareferencecredential.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_datareferencecredential.go index ecde4403721..1dfaa379fd1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_datareferencecredential.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_datareferencecredential.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataReferenceCredential interface { + DataReferenceCredential() BaseDataReferenceCredentialImpl } -// RawDataReferenceCredentialImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataReferenceCredential = BaseDataReferenceCredentialImpl{} + +type BaseDataReferenceCredentialImpl struct { + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s BaseDataReferenceCredentialImpl) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return s +} + +var _ DataReferenceCredential = RawDataReferenceCredentialImpl{} + +// RawDataReferenceCredentialImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataReferenceCredentialImpl struct { - Type string - Values map[string]interface{} + dataReferenceCredential BaseDataReferenceCredentialImpl + Type string + Values map[string]interface{} +} + +func (s RawDataReferenceCredentialImpl) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return s.dataReferenceCredential } -func unmarshalDataReferenceCredentialImplementation(input []byte) (DataReferenceCredential, error) { +func UnmarshalDataReferenceCredentialImplementation(input []byte) (DataReferenceCredential, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalDataReferenceCredentialImplementation(input []byte) (DataReference return out, nil } - out := RawDataReferenceCredentialImpl{ - Type: value, - Values: temp, + var parent BaseDataReferenceCredentialImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataReferenceCredentialImpl: %+v", err) } - return out, nil + + return RawDataReferenceCredentialImpl{ + dataReferenceCredential: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_dockercredential.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_dockercredential.go index b2842e0708d..c479b6dc0f5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_dockercredential.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_dockercredential.go @@ -15,6 +15,14 @@ type DockerCredential struct { UserName *string `json:"userName,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s DockerCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = DockerCredential{} @@ -28,9 +36,10 @@ func (s DockerCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DockerCredential: %+v", err) } + decoded["credentialType"] = "DockerCredentials" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_getblobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_getblobreferenceforconsumptiondto.go index 11f99149f7d..3ff66d6aed6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_getblobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_getblobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *GetBlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalDataReferenceCredentialImplementation(v) + impl, err := UnmarshalDataReferenceCredentialImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'GetBlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_managedidentitycredential.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_managedidentitycredential.go index ca8d1da3cf5..2ecd6f3ddf8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_managedidentitycredential.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_managedidentitycredential.go @@ -18,6 +18,14 @@ type ManagedIdentityCredential struct { UserManagedIdentityTenantId *string `json:"userManagedIdentityTenantId,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s ManagedIdentityCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = ManagedIdentityCredential{} @@ -31,9 +39,10 @@ func (s ManagedIdentityCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentityCredential: %+v", err) } + decoded["credentialType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/model_sascredential.go b/resource-manager/machinelearningservices/2024-04-01/datareference/model_sascredential.go index f8613ff0e65..ebd4229087b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/model_sascredential.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/model_sascredential.go @@ -14,6 +14,14 @@ type SASCredential struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from DataReferenceCredential + + CredentialType DataReferenceCredentialType `json:"credentialType"` +} + +func (s SASCredential) DataReferenceCredential() BaseDataReferenceCredentialImpl { + return BaseDataReferenceCredentialImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredential{} @@ -27,9 +35,10 @@ func (s SASCredential) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredential: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datareference/version.go b/resource-manager/machinelearningservices/2024-04-01/datareference/version.go index 3242e834c58..4bab3ffd714 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datareference/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/datareference/version.go @@ -1,12 +1,10 @@ package datareference -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datareference/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datareference/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/README.md b/resource-manager/machinelearningservices/2024-04-01/datastore/README.md index c0cd0b20d20..2ce1e68867b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/datastore` Documentation -The `datastore` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `datastore` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/client.go b/resource-manager/machinelearningservices/2024-04-01/datastore/client.go index 82a7c3741d5..41a7b1da167 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/client.go @@ -15,7 +15,7 @@ type DatastoreClient struct { } func NewDatastoreClientWithBaseURI(sdkApi sdkEnv.Api) (*DatastoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatastoreClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/id_datastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/id_datastore.go index 2f0d863f24e..ce7fa4e2b0f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/id_datastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/id_datastore.go @@ -44,7 +44,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/datastore/id_workspace.go index c2e3e005415..fb007cd7c42 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/datastore/method_createorupdate.go index 620d9f2e091..580889f1b17 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DatastoreClient) CreateOrUpdate(ctx context.Context, id DataStoreId, inp var model DatastoreResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/method_get.go b/resource-manager/machinelearningservices/2024-04-01/datastore/method_get.go index fa2299e3fbd..b3fa29358b5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/method_get.go @@ -45,7 +45,6 @@ func (c DatastoreClient) Get(ctx context.Context, id DataStoreId) (result GetOpe var model DatastoreResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/method_list.go b/resource-manager/machinelearningservices/2024-04-01/datastore/method_list.go index 3dd905b841e..878ab24a9c3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/method_listsecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/method_listsecrets.go index c4a296dcb14..c96fe852b1c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/method_listsecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/method_listsecrets.go @@ -16,7 +16,7 @@ import ( type ListSecretsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DatastoreSecrets + Model DatastoreSecrets } // ListSecrets ... @@ -49,11 +49,11 @@ func (c DatastoreClient) ListSecrets(ctx context.Context, id DataStoreId) (resul if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDatastoreSecretsImplementation(respObj) + model, err := UnmarshalDatastoreSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastorecredentials.go index 0540b7df9a6..9e67a483305 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastorecredentials.go @@ -14,6 +14,14 @@ type AccountKeyDatastoreCredentials struct { Secrets AccountKeyDatastoreSecrets `json:"secrets"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s AccountKeyDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = AccountKeyDatastoreCredentials{} @@ -27,9 +35,10 @@ func (s AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccountKeyDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "AccountKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastoresecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastoresecrets.go index c6cba7a7cff..d20d7b0b312 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastoresecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_accountkeydatastoresecrets.go @@ -14,6 +14,14 @@ type AccountKeyDatastoreSecrets struct { Key *string `json:"key,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s AccountKeyDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = AccountKeyDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccountKeyDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "AccountKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azureblobdatastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azureblobdatastore.go index 19b0a3d0060..a904e1e93db 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azureblobdatastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azureblobdatastore.go @@ -20,11 +20,24 @@ type AzureBlobDatastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureBlobDatastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureBlobDatastore{} @@ -38,9 +51,10 @@ func (s AzureBlobDatastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBlobDatastore: %+v", err) } + decoded["datastoreType"] = "AzureBlob" encoded, err = json.Marshal(decoded) @@ -62,6 +76,7 @@ func (s *AzureBlobDatastore) UnmarshalJSON(bytes []byte) error { s.AccountName = decoded.AccountName s.ContainerName = decoded.ContainerName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.IsDefault = decoded.IsDefault @@ -78,7 +93,7 @@ func (s *AzureBlobDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureBlobDatastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen1datastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen1datastore.go index c6a99481324..9b9e288752c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen1datastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen1datastore.go @@ -17,11 +17,24 @@ type AzureDataLakeGen1Datastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureDataLakeGen1Datastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureDataLakeGen1Datastore{} @@ -35,9 +48,10 @@ func (s AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeGen1Datastore: %+v", err) } + decoded["datastoreType"] = "AzureDataLakeGen1" encoded, err = json.Marshal(decoded) @@ -57,6 +71,7 @@ func (s *AzureDataLakeGen1Datastore) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureDataLakeGen1Datastore: %+v", err) } + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.IsDefault = decoded.IsDefault s.Properties = decoded.Properties @@ -72,7 +87,7 @@ func (s *AzureDataLakeGen1Datastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureDataLakeGen1Datastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen2datastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen2datastore.go index c96083e85ad..a0fcfbdee58 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen2datastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azuredatalakegen2datastore.go @@ -20,11 +20,24 @@ type AzureDataLakeGen2Datastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureDataLakeGen2Datastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureDataLakeGen2Datastore{} @@ -38,9 +51,10 @@ func (s AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeGen2Datastore: %+v", err) } + decoded["datastoreType"] = "AzureDataLakeGen2" encoded, err = json.Marshal(decoded) @@ -61,6 +75,7 @@ func (s *AzureDataLakeGen2Datastore) UnmarshalJSON(bytes []byte) error { } s.AccountName = decoded.AccountName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.Filesystem = decoded.Filesystem @@ -78,7 +93,7 @@ func (s *AzureDataLakeGen2Datastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureDataLakeGen2Datastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azurefiledatastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azurefiledatastore.go index 1ae68d03d25..8aebfe36293 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_azurefiledatastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_azurefiledatastore.go @@ -20,11 +20,24 @@ type AzureFileDatastore struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s AzureFileDatastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = AzureFileDatastore{} @@ -38,9 +51,10 @@ func (s AzureFileDatastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileDatastore: %+v", err) } + decoded["datastoreType"] = "AzureFile" encoded, err = json.Marshal(decoded) @@ -61,6 +75,7 @@ func (s *AzureFileDatastore) UnmarshalJSON(bytes []byte) error { } s.AccountName = decoded.AccountName + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.FileShareName = decoded.FileShareName @@ -78,7 +93,7 @@ func (s *AzureFileDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'AzureFileDatastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastorecredentials.go index a0f735f5c43..1ebce41484c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastorecredentials.go @@ -19,6 +19,14 @@ type CertificateDatastoreCredentials struct { Thumbprint string `json:"thumbprint"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s CertificateDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = CertificateDatastoreCredentials{} @@ -32,9 +40,10 @@ func (s CertificateDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CertificateDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "Certificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastoresecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastoresecrets.go index d56034ae15c..46a603c5fb1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastoresecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_certificatedatastoresecrets.go @@ -14,6 +14,14 @@ type CertificateDatastoreSecrets struct { Certificate *string `json:"certificate,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s CertificateDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = CertificateDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s CertificateDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CertificateDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "Certificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastore.go index 61d64aba4c9..421ddfaff5b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastore.go @@ -10,18 +10,70 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Datastore interface { + Datastore() BaseDatastoreImpl } -// RawDatastoreImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Datastore = BaseDatastoreImpl{} + +type BaseDatastoreImpl struct { + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDatastoreImpl) Datastore() BaseDatastoreImpl { + return s +} + +var _ Datastore = RawDatastoreImpl{} + +// RawDatastoreImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreImpl struct { - Type string - Values map[string]interface{} + datastore BaseDatastoreImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreImpl) Datastore() BaseDatastoreImpl { + return s.datastore } -func unmarshalDatastoreImplementation(input []byte) (Datastore, error) { +var _ json.Unmarshaler = &BaseDatastoreImpl{} + +func (s *BaseDatastoreImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseDatastoreImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseDatastoreImpl: %+v", err) + } + + s.DatastoreType = decoded.DatastoreType + s.Description = decoded.Description + s.IsDefault = decoded.IsDefault + s.Properties = decoded.Properties + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseDatastoreImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["credentials"]; ok { + impl, err := UnmarshalDatastoreCredentialsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Credentials' for 'BaseDatastoreImpl': %+v", err) + } + s.Credentials = impl + } + return nil +} + +func UnmarshalDatastoreImplementation(input []byte) (Datastore, error) { if input == nil { return nil, nil } @@ -76,10 +128,15 @@ func unmarshalDatastoreImplementation(input []byte) (Datastore, error) { return out, nil } - out := RawDatastoreImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreImpl: %+v", err) } - return out, nil + + return RawDatastoreImpl{ + datastore: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastorecredentials.go index 06a4bb3f51b..34082f29cf5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastorecredentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatastoreCredentials interface { + DatastoreCredentials() BaseDatastoreCredentialsImpl } -// RawDatastoreCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatastoreCredentials = BaseDatastoreCredentialsImpl{} + +type BaseDatastoreCredentialsImpl struct { + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s BaseDatastoreCredentialsImpl) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return s +} + +var _ DatastoreCredentials = RawDatastoreCredentialsImpl{} + +// RawDatastoreCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreCredentialsImpl struct { - Type string - Values map[string]interface{} + datastoreCredentials BaseDatastoreCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreCredentialsImpl) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return s.datastoreCredentials } -func unmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredentials, error) { +func UnmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredentials, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalDatastoreCredentialsImplementation(input []byte) (DatastoreCredent return out, nil } - out := RawDatastoreCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreCredentialsImpl: %+v", err) } - return out, nil + + return RawDatastoreCredentialsImpl{ + datastoreCredentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoreresource.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoreresource.go index 31ea1d51fe7..b943a8249c1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoreresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoreresource.go @@ -38,7 +38,7 @@ func (s *DatastoreResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDatastoreImplementation(v) + impl, err := UnmarshalDatastoreImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DatastoreResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoresecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoresecrets.go index 117ac723e8c..0cb6053a808 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoresecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_datastoresecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DatastoreSecrets interface { + DatastoreSecrets() BaseDatastoreSecretsImpl } -// RawDatastoreSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DatastoreSecrets = BaseDatastoreSecretsImpl{} + +type BaseDatastoreSecretsImpl struct { + SecretsType SecretsType `json:"secretsType"` +} + +func (s BaseDatastoreSecretsImpl) DatastoreSecrets() BaseDatastoreSecretsImpl { + return s +} + +var _ DatastoreSecrets = RawDatastoreSecretsImpl{} + +// RawDatastoreSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDatastoreSecretsImpl struct { - Type string - Values map[string]interface{} + datastoreSecrets BaseDatastoreSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawDatastoreSecretsImpl) DatastoreSecrets() BaseDatastoreSecretsImpl { + return s.datastoreSecrets } -func unmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, error) { +func UnmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalDatastoreSecretsImplementation(input []byte) (DatastoreSecrets, er return out, nil } - out := RawDatastoreSecretsImpl{ - Type: value, - Values: temp, + var parent BaseDatastoreSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDatastoreSecretsImpl: %+v", err) } - return out, nil + + return RawDatastoreSecretsImpl{ + datastoreSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_lakehouseartifact.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_lakehouseartifact.go index a2d61278d97..63f49f8b1c1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_lakehouseartifact.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_lakehouseartifact.go @@ -13,7 +13,16 @@ var _ OneLakeArtifact = LakeHouseArtifact{} type LakeHouseArtifact struct { // Fields inherited from OneLakeArtifact - ArtifactName string `json:"artifactName"` + + ArtifactName string `json:"artifactName"` + ArtifactType OneLakeArtifactType `json:"artifactType"` +} + +func (s LakeHouseArtifact) OneLakeArtifact() BaseOneLakeArtifactImpl { + return BaseOneLakeArtifactImpl{ + ArtifactName: s.ArtifactName, + ArtifactType: s.ArtifactType, + } } var _ json.Marshaler = LakeHouseArtifact{} @@ -27,9 +36,10 @@ func (s LakeHouseArtifact) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LakeHouseArtifact: %+v", err) } + decoded["artifactType"] = "LakeHouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_nonedatastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_nonedatastorecredentials.go index 26499e05a90..91781358c66 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_nonedatastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_nonedatastorecredentials.go @@ -13,6 +13,14 @@ var _ DatastoreCredentials = NoneDatastoreCredentials{} type NoneDatastoreCredentials struct { // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s NoneDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = NoneDatastoreCredentials{} @@ -26,9 +34,10 @@ func (s NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NoneDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "None" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakeartifact.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakeartifact.go index 9d76c7a39b4..ed6262669b0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakeartifact.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakeartifact.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OneLakeArtifact interface { + OneLakeArtifact() BaseOneLakeArtifactImpl } -// RawOneLakeArtifactImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OneLakeArtifact = BaseOneLakeArtifactImpl{} + +type BaseOneLakeArtifactImpl struct { + ArtifactName string `json:"artifactName"` + ArtifactType OneLakeArtifactType `json:"artifactType"` +} + +func (s BaseOneLakeArtifactImpl) OneLakeArtifact() BaseOneLakeArtifactImpl { + return s +} + +var _ OneLakeArtifact = RawOneLakeArtifactImpl{} + +// RawOneLakeArtifactImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOneLakeArtifactImpl struct { - Type string - Values map[string]interface{} + oneLakeArtifact BaseOneLakeArtifactImpl + Type string + Values map[string]interface{} +} + +func (s RawOneLakeArtifactImpl) OneLakeArtifact() BaseOneLakeArtifactImpl { + return s.oneLakeArtifact } -func unmarshalOneLakeArtifactImplementation(input []byte) (OneLakeArtifact, error) { +func UnmarshalOneLakeArtifactImplementation(input []byte) (OneLakeArtifact, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalOneLakeArtifactImplementation(input []byte) (OneLakeArtifact, erro return out, nil } - out := RawOneLakeArtifactImpl{ - Type: value, - Values: temp, + var parent BaseOneLakeArtifactImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOneLakeArtifactImpl: %+v", err) } - return out, nil + + return RawOneLakeArtifactImpl{ + oneLakeArtifact: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakedatastore.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakedatastore.go index bd08eb54ce2..56f30aac72a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakedatastore.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_onelakedatastore.go @@ -17,11 +17,24 @@ type OneLakeDatastore struct { ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"` // Fields inherited from Datastore - Credentials DatastoreCredentials `json:"credentials"` - Description *string `json:"description,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` - Properties *map[string]string `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` + + Credentials DatastoreCredentials `json:"credentials"` + DatastoreType DatastoreType `json:"datastoreType"` + Description *string `json:"description,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s OneLakeDatastore) Datastore() BaseDatastoreImpl { + return BaseDatastoreImpl{ + Credentials: s.Credentials, + DatastoreType: s.DatastoreType, + Description: s.Description, + IsDefault: s.IsDefault, + Properties: s.Properties, + Tags: s.Tags, + } } var _ json.Marshaler = OneLakeDatastore{} @@ -35,9 +48,10 @@ func (s OneLakeDatastore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OneLakeDatastore: %+v", err) } + decoded["datastoreType"] = "OneLake" encoded, err = json.Marshal(decoded) @@ -57,6 +71,7 @@ func (s *OneLakeDatastore) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into OneLakeDatastore: %+v", err) } + s.DatastoreType = decoded.DatastoreType s.Description = decoded.Description s.Endpoint = decoded.Endpoint s.IsDefault = decoded.IsDefault @@ -71,7 +86,7 @@ func (s *OneLakeDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["artifact"]; ok { - impl, err := unmarshalOneLakeArtifactImplementation(v) + impl, err := UnmarshalOneLakeArtifactImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Artifact' for 'OneLakeDatastore': %+v", err) } @@ -79,7 +94,7 @@ func (s *OneLakeDatastore) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credentials"]; ok { - impl, err := unmarshalDatastoreCredentialsImplementation(v) + impl, err := UnmarshalDatastoreCredentialsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credentials' for 'OneLakeDatastore': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastorecredentials.go index 59e2e476fba..a2ddc25f4b7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastorecredentials.go @@ -14,6 +14,14 @@ type SasDatastoreCredentials struct { Secrets SasDatastoreSecrets `json:"secrets"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s SasDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = SasDatastoreCredentials{} @@ -27,9 +35,10 @@ func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SasDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "Sas" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastoresecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastoresecrets.go index f99c98f8371..bf5cac042a7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastoresecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_sasdatastoresecrets.go @@ -14,6 +14,14 @@ type SasDatastoreSecrets struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s SasDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = SasDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SasDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "Sas" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastorecredentials.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastorecredentials.go index 2872119cccb..1e38e43f119 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastorecredentials.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastorecredentials.go @@ -18,6 +18,14 @@ type ServicePrincipalDatastoreCredentials struct { TenantId string `json:"tenantId"` // Fields inherited from DatastoreCredentials + + CredentialsType CredentialsType `json:"credentialsType"` +} + +func (s ServicePrincipalDatastoreCredentials) DatastoreCredentials() BaseDatastoreCredentialsImpl { + return BaseDatastoreCredentialsImpl{ + CredentialsType: s.CredentialsType, + } } var _ json.Marshaler = ServicePrincipalDatastoreCredentials{} @@ -31,9 +39,10 @@ func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalDatastoreCredentials: %+v", err) } + decoded["credentialsType"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastoresecrets.go b/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastoresecrets.go index d2466b0f1da..e7767ab1806 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastoresecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/model_serviceprincipaldatastoresecrets.go @@ -14,6 +14,14 @@ type ServicePrincipalDatastoreSecrets struct { ClientSecret *string `json:"clientSecret,omitempty"` // Fields inherited from DatastoreSecrets + + SecretsType SecretsType `json:"secretsType"` +} + +func (s ServicePrincipalDatastoreSecrets) DatastoreSecrets() BaseDatastoreSecretsImpl { + return BaseDatastoreSecretsImpl{ + SecretsType: s.SecretsType, + } } var _ json.Marshaler = ServicePrincipalDatastoreSecrets{} @@ -27,9 +35,10 @@ func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalDatastoreSecrets: %+v", err) } + decoded["secretsType"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/datastore/version.go b/resource-manager/machinelearningservices/2024-04-01/datastore/version.go index 8ba0babebfa..e8fd8b49d58 100644 --- a/resource-manager/machinelearningservices/2024-04-01/datastore/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/datastore/version.go @@ -1,12 +1,10 @@ package datastore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastore/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/README.md b/resource-manager/machinelearningservices/2024-04-01/dataversion/README.md index a55525e0cfe..bf071b6549d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/dataversion` Documentation -The `dataversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `dataversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/client.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/client.go index b3272c54478..5378de1013a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/client.go @@ -15,7 +15,7 @@ type DataVersionClient struct { } func NewDataVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*DataVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/id_dataversion.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/id_dataversion.go index a83bcd0aa53..d8043e75b4c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/id_dataversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/id_dataversion.go @@ -46,7 +46,7 @@ func ParseDataVersionID(input string) (*DataVersionId, error) { } id := DataVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataVersionIDInsensitively(input string) (*DataVersionId, error) { } id := DataVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/id_workspacedata.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/id_workspacedata.go index 71c3320e631..759159d5218 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/id_workspacedata.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/id_workspacedata.go @@ -44,7 +44,7 @@ func ParseWorkspaceDataID(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkspaceDataIDInsensitively(input string) (*WorkspaceDataId, error) { } id := WorkspaceDataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_createorupdate.go index 57aeefe10c0..8cf62264d10 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataVersionClient) CreateOrUpdate(ctx context.Context, id DataVersionId, var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_get.go index 57b6b56c01c..696acdfeeb4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_get.go @@ -45,7 +45,6 @@ func (c DataVersionClient) Get(ctx context.Context, id DataVersionId) (result Ge var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_list.go index 71a60e93186..1533244b108 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbase.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbase.go index fa8d822ad29..48b2d161d99 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbase.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataVersionBase interface { + DataVersionBase() BaseDataVersionBaseImpl } -// RawDataVersionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataVersionBase = BaseDataVersionBaseImpl{} + +type BaseDataVersionBaseImpl struct { + DataType DataType `json:"dataType"` + DataUri string `json:"dataUri"` + Description *string `json:"description,omitempty"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + IsArchived *bool `json:"isArchived,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s +} + +var _ DataVersionBase = RawDataVersionBaseImpl{} + +// RawDataVersionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataVersionBaseImpl struct { - Type string - Values map[string]interface{} + dataVersionBase BaseDataVersionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s.dataVersionBase } -func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { +func UnmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, erro return out, nil } - out := RawDataVersionBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataVersionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataVersionBaseImpl: %+v", err) } - return out, nil + + return RawDataVersionBaseImpl{ + dataVersionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbaseresource.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbaseresource.go index 82c107d3d91..18288dc9bab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbaseresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_dataversionbaseresource.go @@ -38,7 +38,7 @@ func (s *DataVersionBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataVersionBaseImplementation(v) + impl, err := UnmarshalDataVersionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataVersionBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_mltabledata.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_mltabledata.go index d1e99d11fde..0e5c16ecd56 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_mltabledata.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_mltabledata.go @@ -14,6 +14,8 @@ type MLTableData struct { ReferencedUris *[]string `json:"referencedUris,omitempty"` // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -22,6 +24,18 @@ type MLTableData struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s MLTableData) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = MLTableData{} func (s MLTableData) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MLTableData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableData: %+v", err) } + decoded["dataType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifiledataversion.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifiledataversion.go index e8162aec82f..d409ed0dfa5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifiledataversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifiledataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFileDataVersion{} type UriFileDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFileDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFileDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFileDataVersion{} func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileDataVersion: %+v", err) } + decoded["dataType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifolderdataversion.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifolderdataversion.go index e0c1569d731..60dd9f4d067 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifolderdataversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/model_urifolderdataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFolderDataVersion{} type UriFolderDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFolderDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFolderDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFolderDataVersion{} func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderDataVersion: %+v", err) } + decoded["dataType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversion/version.go b/resource-manager/machinelearningservices/2024-04-01/dataversion/version.go index 08e502ae037..df30fe38ef3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversion/version.go @@ -1,12 +1,10 @@ package dataversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/README.md b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/README.md index e31810a350d..5577206e333 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/dataversionregistry` Documentation -The `dataversionregistry` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `dataversionregistry` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/client.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/client.go index c6b44d23be9..b4352712d79 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/client.go @@ -15,7 +15,7 @@ type DataVersionRegistryClient struct { } func NewDataVersionRegistryClientWithBaseURI(sdkApi sdkEnv.Api) (*DataVersionRegistryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataversionregistry", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataversionregistry", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataVersionRegistryClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_data.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_data.go index 5ddca6947d4..21cd591baf1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_data.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_data.go @@ -44,7 +44,7 @@ func ParseDataID(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataIDInsensitively(input string) (*DataId, error) { } id := DataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_version.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_version.go index cc04868472a..95b56211a6a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_version.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go index ad7c181f3ea..3bf75f7684d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c DataVersionRegistryClient) RegistryDataVersionsCreateOrGetStartPendingUp var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionsget.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionsget.go index d640885e6b5..3ab0a0c3513 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionsget.go @@ -45,7 +45,6 @@ func (c DataVersionRegistryClient) RegistryDataVersionsGet(ctx context.Context, var model DataVersionBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionslist.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionslist.go index deb795c0a18..e49f7321eb1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/method_registrydataversionslist.go @@ -43,6 +43,7 @@ func (o RegistryDataVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryDataVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_blobreferenceforconsumptiondto.go index 1079d2aa653..bb536f58a44 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbase.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbase.go index bb6285415d5..dddac0f2484 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbase.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataVersionBase interface { + DataVersionBase() BaseDataVersionBaseImpl } -// RawDataVersionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataVersionBase = BaseDataVersionBaseImpl{} + +type BaseDataVersionBaseImpl struct { + DataType DataType `json:"dataType"` + DataUri string `json:"dataUri"` + Description *string `json:"description,omitempty"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + IsArchived *bool `json:"isArchived,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s +} + +var _ DataVersionBase = RawDataVersionBaseImpl{} + +// RawDataVersionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataVersionBaseImpl struct { - Type string - Values map[string]interface{} + dataVersionBase BaseDataVersionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataVersionBaseImpl) DataVersionBase() BaseDataVersionBaseImpl { + return s.dataVersionBase } -func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { +func UnmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalDataVersionBaseImplementation(input []byte) (DataVersionBase, erro return out, nil } - out := RawDataVersionBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataVersionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataVersionBaseImpl: %+v", err) } - return out, nil + + return RawDataVersionBaseImpl{ + dataVersionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbaseresource.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbaseresource.go index 2d1c4451aa8..614ae597521 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbaseresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_dataversionbaseresource.go @@ -38,7 +38,7 @@ func (s *DataVersionBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalDataVersionBaseImplementation(v) + impl, err := UnmarshalDataVersionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'DataVersionBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_mltabledata.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_mltabledata.go index f2201a9945f..7bb306b22da 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_mltabledata.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_mltabledata.go @@ -14,6 +14,8 @@ type MLTableData struct { ReferencedUris *[]string `json:"referencedUris,omitempty"` // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -22,6 +24,18 @@ type MLTableData struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s MLTableData) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = MLTableData{} func (s MLTableData) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s MLTableData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableData: %+v", err) } + decoded["dataType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_pendinguploadcredentialdto.go index a57b6fde325..32c184dba40 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_sascredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_sascredentialdto.go index f0743579eca..8b4b52be918 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifiledataversion.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifiledataversion.go index 3c5aa2bcb23..d1b56bc10c4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifiledataversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifiledataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFileDataVersion{} type UriFileDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFileDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFileDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFileDataVersion{} func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFileDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileDataVersion: %+v", err) } + decoded["dataType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifolderdataversion.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifolderdataversion.go index 67823e91b7a..63814cf2f54 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifolderdataversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/model_urifolderdataversion.go @@ -13,6 +13,8 @@ var _ DataVersionBase = UriFolderDataVersion{} type UriFolderDataVersion struct { // Fields inherited from DataVersionBase + + DataType DataType `json:"dataType"` DataUri string `json:"dataUri"` Description *string `json:"description,omitempty"` IsAnonymous *bool `json:"isAnonymous,omitempty"` @@ -21,6 +23,18 @@ type UriFolderDataVersion struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s UriFolderDataVersion) DataVersionBase() BaseDataVersionBaseImpl { + return BaseDataVersionBaseImpl{ + DataType: s.DataType, + DataUri: s.DataUri, + Description: s.Description, + IsAnonymous: s.IsAnonymous, + IsArchived: s.IsArchived, + Properties: s.Properties, + Tags: s.Tags, + } +} + var _ json.Marshaler = UriFolderDataVersion{} func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s UriFolderDataVersion) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderDataVersion: %+v", err) } + decoded["dataType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/version.go b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/version.go index dc44beccb85..49294ae712e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/dataversionregistry/version.go @@ -1,12 +1,10 @@ package dataversionregistry -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataversionregistry/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataversionregistry/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/README.md index 076e329726f..9354399fd50 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/environmentcontainer` Documentation -The `environmentcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `environmentcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/client.go index 18f449084a5..c93ae001da9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/client.go @@ -15,7 +15,7 @@ type EnvironmentContainerClient struct { } func NewEnvironmentContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmentcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmentcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_environment.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_environment.go index c209781cb38..2df98940af3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_environment.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_environment.go @@ -44,7 +44,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registry.go index beab0d00d98..0ed9413b704 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registryenvironment.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registryenvironment.go index d00f274efed..8f9f3ec7e1f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registryenvironment.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_registryenvironment.go @@ -44,7 +44,7 @@ func ParseRegistryEnvironmentID(input string) (*RegistryEnvironmentId, error) { } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryEnvironmentIDInsensitively(input string) (*RegistryEnvironment } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_workspace.go index f3d11feb097..18e40abc6d4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_createorupdate.go index a6a2c5fe9d3..3c60b94267a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentContainerClient) CreateOrUpdate(ctx context.Context, id Envir var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_get.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_get.go index 66fbbc76cc7..d8ef1c6600c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentContainerClient) Get(ctx context.Context, id EnvironmentId) ( var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_list.go index 6356874c795..9c37a1f7173 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainersget.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainersget.go index 8b699d8f167..718666f0727 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainersget.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainersget.go @@ -45,7 +45,6 @@ func (c EnvironmentContainerClient) RegistryEnvironmentContainersGet(ctx context var model EnvironmentContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainerslist.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainerslist.go index 60bfbabcae8..16fe9c75ece 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainerslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/method_registryenvironmentcontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryEnvironmentContainersListOperationOptions) ToHeaders() *client.H func (o RegistryEnvironmentContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/version.go index a0ddc08a0df..753d8eb5c2d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentcontainer/version.go @@ -1,12 +1,10 @@ package environmentcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmentcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmentcontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/README.md b/resource-manager/machinelearningservices/2024-04-01/environmentversion/README.md index 8b8a0e52177..b194c8f2e78 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/environmentversion` Documentation -The `environmentversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `environmentversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/client.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/client.go index 29b0fc2ff6b..5d10a29049b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/client.go @@ -15,7 +15,7 @@ type EnvironmentVersionClient struct { } func NewEnvironmentVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environmentversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environmentversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environment.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environment.go index f0ff2b0246b..b2ff36a89d5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environment.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environment.go @@ -44,7 +44,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environmentversion.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environmentversion.go index 787312f7bc7..6aa242daf29 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environmentversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_environmentversion.go @@ -46,7 +46,7 @@ func ParseEnvironmentVersionID(input string) (*EnvironmentVersionId, error) { } id := EnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEnvironmentVersionIDInsensitively(input string) (*EnvironmentVersionId } id := EnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironment.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironment.go index a83cdfcdb4e..95ec102e89c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironment.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironment.go @@ -44,7 +44,7 @@ func ParseRegistryEnvironmentID(input string) (*RegistryEnvironmentId, error) { } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryEnvironmentIDInsensitively(input string) (*RegistryEnvironment } id := RegistryEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironmentversion.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironmentversion.go index 02d7833a8d6..861abe015b6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironmentversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/id_registryenvironmentversion.go @@ -46,7 +46,7 @@ func ParseRegistryEnvironmentVersionID(input string) (*RegistryEnvironmentVersio } id := RegistryEnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryEnvironmentVersionIDInsensitively(input string) (*RegistryEnvi } id := RegistryEnvironmentVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_createorupdate.go index 696c9461b3e..9d59df5e453 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EnvironmentVersionClient) CreateOrUpdate(ctx context.Context, id Environ var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_get.go index 6cf16692bb3..7563144e740 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_get.go @@ -45,7 +45,6 @@ func (c EnvironmentVersionClient) Get(ctx context.Context, id EnvironmentVersion var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_list.go index 23a839f0739..2939cc5f60f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionsget.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionsget.go index cea2d10feda..bb40fdc6ebc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionsget.go @@ -45,7 +45,6 @@ func (c EnvironmentVersionClient) RegistryEnvironmentVersionsGet(ctx context.Con var model EnvironmentVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionslist.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionslist.go index 88db4de6ca3..15d1285660a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/method_registryenvironmentversionslist.go @@ -42,6 +42,7 @@ func (o RegistryEnvironmentVersionsListOperationOptions) ToHeaders() *client.Hea func (o RegistryEnvironmentVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/environmentversion/version.go b/resource-manager/machinelearningservices/2024-04-01/environmentversion/version.go index 3f38e1f21c6..d25e8abc77d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/environmentversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/environmentversion/version.go @@ -1,12 +1,10 @@ package environmentversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environmentversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environmentversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/README.md b/resource-manager/machinelearningservices/2024-04-01/feature/README.md index 8827eae32ea..8605e3efad6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/feature/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/feature` Documentation -The `feature` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `feature` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/client.go b/resource-manager/machinelearningservices/2024-04-01/feature/client.go index ce76f0761aa..38863527c69 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/client.go @@ -15,7 +15,7 @@ type FeatureClient struct { } func NewFeatureClientWithBaseURI(sdkApi sdkEnv.Api) (*FeatureClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "feature", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "feature", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeatureClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/id_feature.go b/resource-manager/machinelearningservices/2024-04-01/feature/id_feature.go index 12fb6ad49d5..7ec7a6be0a5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/id_feature.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/id_feature.go @@ -48,7 +48,7 @@ func ParseFeatureID(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseFeatureIDInsensitively(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/id_featuresetversion.go b/resource-manager/machinelearningservices/2024-04-01/feature/id_featuresetversion.go index 5249b05e280..5b17258df0b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/id_featuresetversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/id_featuresetversion.go @@ -46,7 +46,7 @@ func ParseFeatureSetVersionID(input string) (*FeatureSetVersionId, error) { } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureSetVersionIDInsensitively(input string) (*FeatureSetVersionId, } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/method_get.go b/resource-manager/machinelearningservices/2024-04-01/feature/method_get.go index 2482f1f8e67..2a3e74ccdaf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/method_get.go @@ -45,7 +45,6 @@ func (c FeatureClient) Get(ctx context.Context, id FeatureId) (result GetOperati var model FeatureResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/method_list.go b/resource-manager/machinelearningservices/2024-04-01/feature/method_list.go index 1553b9965ad..9ba39db8672 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/feature/version.go b/resource-manager/machinelearningservices/2024-04-01/feature/version.go index c36dce91817..54906266ad4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/feature/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/feature/version.go @@ -1,12 +1,10 @@ package feature -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/feature/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/feature/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/README.md index 0b161204079..147fae31315 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer` Documentation -The `featuresetcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `featuresetcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/client.go index 0b1a8240abe..137b30b74d2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/client.go @@ -15,7 +15,7 @@ type FeaturesetContainerClient struct { } func NewFeaturesetContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesetContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featuresetcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featuresetcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturesetContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_featureset.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_featureset.go index bdf6e3f214e..db01a24228c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_featureset.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_featureset.go @@ -44,7 +44,7 @@ func ParseFeatureSetID(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureSetIDInsensitively(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_workspace.go index 18583836148..0e1bc57ea53 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_getentity.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_getentity.go index ebc6bcb34d3..8632557b0bb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_getentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_getentity.go @@ -45,7 +45,6 @@ func (c FeaturesetContainerClient) GetEntity(ctx context.Context, id FeatureSetI var model FeaturesetContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_list.go index b3fab75e9ff..c969714237f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/version.go index cc5b4d2c137..3fe404b7c70 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetcontainer/version.go @@ -1,12 +1,10 @@ package featuresetcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresetcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresetcontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/README.md b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/README.md index 73e78765784..a4bb5ef0bfd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/featuresetversion` Documentation -The `featuresetversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `featuresetversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/client.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/client.go index 5f5c0c9d5de..d7b0f6856aa 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/client.go @@ -15,7 +15,7 @@ type FeaturesetVersionClient struct { } func NewFeaturesetVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesetVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featuresetversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featuresetversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturesetVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featureset.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featureset.go index 085301d92e2..21473d93ca9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featureset.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featureset.go @@ -44,7 +44,7 @@ func ParseFeatureSetID(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureSetIDInsensitively(input string) (*FeatureSetId, error) { } id := FeatureSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featuresetversion.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featuresetversion.go index ab2aba9028c..19c3ad0cb1f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featuresetversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/id_featuresetversion.go @@ -46,7 +46,7 @@ func ParseFeatureSetVersionID(input string) (*FeatureSetVersionId, error) { } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureSetVersionIDInsensitively(input string) (*FeatureSetVersionId, } id := FeatureSetVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_get.go index da44ac47cdd..4574f92d44a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_get.go @@ -45,7 +45,6 @@ func (c FeaturesetVersionClient) Get(ctx context.Context, id FeatureSetVersionId var model FeaturesetVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_list.go index fa6692e5974..17cbb34ecbd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/method_list.go @@ -47,6 +47,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_azuredevopswebhook.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_azuredevopswebhook.go index 5e23ea37146..ae4bacabe00 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_azuredevopswebhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_azuredevopswebhook.go @@ -13,7 +13,16 @@ var _ Webhook = AzureDevOpsWebhook{} type AzureDevOpsWebhook struct { // Fields inherited from Webhook - EventType *string `json:"eventType,omitempty"` + + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s AzureDevOpsWebhook) Webhook() BaseWebhookImpl { + return BaseWebhookImpl{ + EventType: s.EventType, + WebhookType: s.WebhookType, + } } var _ json.Marshaler = AzureDevOpsWebhook{} @@ -27,9 +36,10 @@ func (s AzureDevOpsWebhook) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDevOpsWebhook: %+v", err) } + decoded["webhookType"] = "AzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_crontrigger.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_crontrigger.go index 3cf395dc64f..c4628ac394a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_crontrigger.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_crontrigger.go @@ -14,9 +14,20 @@ type CronTrigger struct { Expression string `json:"expression"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s CronTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = CronTrigger{} @@ -30,9 +41,10 @@ func (s CronTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CronTrigger: %+v", err) } + decoded["triggerType"] = "Cron" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_notificationsetting.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_notificationsetting.go index 780fbc7fa36..d2bf8b1e755 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_notificationsetting.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_notificationsetting.go @@ -39,7 +39,7 @@ func (s *NotificationSetting) UnmarshalJSON(bytes []byte) error { output := make(map[string]Webhook) for key, val := range dictionaryTemp { - impl, err := unmarshalWebhookImplementation(val) + impl, err := UnmarshalWebhookImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'WebHooks' for 'NotificationSetting': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_recurrencetrigger.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_recurrencetrigger.go index 35afd002809..64719c65aec 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_recurrencetrigger.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_recurrencetrigger.go @@ -16,9 +16,20 @@ type RecurrenceTrigger struct { Schedule *RecurrenceSchedule `json:"schedule,omitempty"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s RecurrenceTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = RecurrenceTrigger{} @@ -32,9 +43,10 @@ func (s RecurrenceTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecurrenceTrigger: %+v", err) } + decoded["triggerType"] = "Recurrence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_triggerbase.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_triggerbase.go index 039813dab28..0cd94e8bc71 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_triggerbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_triggerbase.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerBase interface { + TriggerBase() BaseTriggerBaseImpl } -// RawTriggerBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerBase = BaseTriggerBaseImpl{} + +type BaseTriggerBaseImpl struct { + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s BaseTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s +} + +var _ TriggerBase = RawTriggerBaseImpl{} + +// RawTriggerBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerBaseImpl struct { - Type string - Values map[string]interface{} + triggerBase BaseTriggerBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s.triggerBase } -func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { +func UnmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { return out, nil } - out := RawTriggerBaseImpl{ - Type: value, - Values: temp, + var parent BaseTriggerBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerBaseImpl: %+v", err) } - return out, nil + + return RawTriggerBaseImpl{ + triggerBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_webhook.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_webhook.go index 9ebe818b7a0..4866c8acace 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_webhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/model_webhook.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Webhook interface { + Webhook() BaseWebhookImpl } -// RawWebhookImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Webhook = BaseWebhookImpl{} + +type BaseWebhookImpl struct { + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s BaseWebhookImpl) Webhook() BaseWebhookImpl { + return s +} + +var _ Webhook = RawWebhookImpl{} + +// RawWebhookImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWebhookImpl struct { - Type string - Values map[string]interface{} + webhook BaseWebhookImpl + Type string + Values map[string]interface{} +} + +func (s RawWebhookImpl) Webhook() BaseWebhookImpl { + return s.webhook } -func unmarshalWebhookImplementation(input []byte) (Webhook, error) { +func UnmarshalWebhookImplementation(input []byte) (Webhook, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalWebhookImplementation(input []byte) (Webhook, error) { return out, nil } - out := RawWebhookImpl{ - Type: value, - Values: temp, + var parent BaseWebhookImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWebhookImpl: %+v", err) } - return out, nil + + return RawWebhookImpl{ + webhook: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/version.go b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/version.go index 02aeb973602..18a4cad73da 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featuresetversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/featuresetversion/version.go @@ -1,12 +1,10 @@ package featuresetversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresetversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresetversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/README.md index d11618b0ea0..936cc8dea0a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer` Documentation -The `featurestoreentitycontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `featurestoreentitycontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/client.go index 246e1fa8542..c13e2e5b12d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/client.go @@ -15,7 +15,7 @@ type FeaturestoreEntityContainerClient struct { } func NewFeaturestoreEntityContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturestoreEntityContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featurestoreentitycontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featurestoreentitycontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturestoreEntityContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_featurestoreentity.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_featurestoreentity.go index 5e65b201d0b..93652b284f4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_featurestoreentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_featurestoreentity.go @@ -44,7 +44,7 @@ func ParseFeatureStoreEntityID(input string) (*FeatureStoreEntityId, error) { } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureStoreEntityIDInsensitively(input string) (*FeatureStoreEntityId } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_workspace.go index 0d75ecb2682..0ba0c68b46d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_getentity.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_getentity.go index f3c10d02be1..20992ddf5b4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_getentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_getentity.go @@ -45,7 +45,6 @@ func (c FeaturestoreEntityContainerClient) GetEntity(ctx context.Context, id Fea var model FeaturestoreEntityContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_list.go index ff515e5fa30..9d2dfc6d7f3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/version.go index c87920b1614..d63b8b9f0dd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentitycontainer/version.go @@ -1,12 +1,10 @@ package featurestoreentitycontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featurestoreentitycontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featurestoreentitycontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/README.md b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/README.md index d84a8c7fe48..a6db7ac76a2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion` Documentation -The `featurestoreentityversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `featurestoreentityversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/client.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/client.go index e9ea6afae6d..843363442eb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/client.go @@ -15,7 +15,7 @@ type FeaturestoreEntityVersionClient struct { } func NewFeaturestoreEntityVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturestoreEntityVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "featurestoreentityversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "featurestoreentityversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturestoreEntityVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentity.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentity.go index ec95107f203..eb45ef7abc7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentity.go @@ -44,7 +44,7 @@ func ParseFeatureStoreEntityID(input string) (*FeatureStoreEntityId, error) { } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFeatureStoreEntityIDInsensitively(input string) (*FeatureStoreEntityId } id := FeatureStoreEntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentityversion.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentityversion.go index 1937f01b0f9..30f0cd59ad7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentityversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/id_featurestoreentityversion.go @@ -46,7 +46,7 @@ func ParseFeatureStoreEntityVersionID(input string) (*FeatureStoreEntityVersionI } id := FeatureStoreEntityVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseFeatureStoreEntityVersionIDInsensitively(input string) (*FeatureStoreE } id := FeatureStoreEntityVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_get.go index 5f01c8f7765..ecee1aa0872 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_get.go @@ -45,7 +45,6 @@ func (c FeaturestoreEntityVersionClient) Get(ctx context.Context, id FeatureStor var model FeaturestoreEntityVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_list.go index 96a28bcd827..6d748fbef97 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/method_list.go @@ -47,6 +47,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/version.go b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/version.go index 6b5ad20b655..052c510f7a2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/featurestoreentityversion/version.go @@ -1,12 +1,10 @@ package featurestoreentityversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featurestoreentityversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featurestoreentityversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/README.md b/resource-manager/machinelearningservices/2024-04-01/job/README.md index bc897199341..587a5a5d216 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/job/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/job` Documentation -The `job` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `job` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/job/client.go b/resource-manager/machinelearningservices/2024-04-01/job/client.go index 4736df084cf..7539b61a687 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/client.go @@ -15,7 +15,7 @@ type JobClient struct { } func NewJobClientWithBaseURI(sdkApi sdkEnv.Api) (*JobClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "job", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "job", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/id_job.go b/resource-manager/machinelearningservices/2024-04-01/job/id_job.go index 4a1fa82f413..0c434c676c2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/id_job.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/id_job.go @@ -44,7 +44,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/job/id_workspace.go index 78013e04363..b548519864c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/job/method_createorupdate.go index a8ff1f6938f..109e9ae6e10 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobClient) CreateOrUpdate(ctx context.Context, id JobId, input JobBaseRe var model JobBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/method_get.go b/resource-manager/machinelearningservices/2024-04-01/job/method_get.go index 8dd944de882..3a3d38b8bea 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/method_get.go @@ -45,7 +45,6 @@ func (c JobClient) Get(ctx context.Context, id JobId) (result GetOperationRespon var model JobBaseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/method_list.go b/resource-manager/machinelearningservices/2024-04-01/job/method_list.go index 9d12e514848..e293d4ba17d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/method_list.go @@ -43,6 +43,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_allnodes.go b/resource-manager/machinelearningservices/2024-04-01/job/model_allnodes.go index 389e0869f44..d40cabeeda6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_allnodes.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_allnodes.go @@ -13,6 +13,14 @@ var _ Nodes = AllNodes{} type AllNodes struct { // Fields inherited from Nodes + + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s AllNodes) Nodes() BaseNodesImpl { + return BaseNodesImpl{ + NodesValueType: s.NodesValueType, + } } var _ json.Marshaler = AllNodes{} @@ -26,9 +34,10 @@ func (s AllNodes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllNodes: %+v", err) } + decoded["nodesValueType"] = "All" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_amltoken.go b/resource-manager/machinelearningservices/2024-04-01/job/model_amltoken.go index 5e8a60277ee..cd60c336de5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_amltoken.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_amltoken.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = AmlToken{} type AmlToken struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s AmlToken) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = AmlToken{} @@ -26,9 +34,10 @@ func (s AmlToken) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlToken: %+v", err) } + decoded["identityType"] = "AMLToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_autoforecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/job/model_autoforecasthorizon.go index 42fcfde7e4c..a230f6b5837 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_autoforecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_autoforecasthorizon.go @@ -13,6 +13,14 @@ var _ ForecastHorizon = AutoForecastHorizon{} type AutoForecastHorizon struct { // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s AutoForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoForecastHorizon{} @@ -26,9 +34,10 @@ func (s AutoForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoForecastHorizon: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_automljob.go b/resource-manager/machinelearningservices/2024-04-01/job/model_automljob.go index 13563ecf9ba..7bcb6e14d3c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_automljob.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_automljob.go @@ -19,6 +19,7 @@ type AutoMLJob struct { TaskDetails AutoMLVertical `json:"taskDetails"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -26,6 +27,7 @@ type AutoMLJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -33,6 +35,24 @@ type AutoMLJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s AutoMLJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = AutoMLJob{} func (s AutoMLJob) MarshalJSON() ([]byte, error) { @@ -44,9 +64,10 @@ func (s AutoMLJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoMLJob: %+v", err) } + decoded["jobType"] = "AutoML" encoded, err = json.Marshal(decoded) @@ -74,6 +95,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings @@ -88,7 +110,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'AutoMLJob': %+v", err) } @@ -103,7 +125,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'AutoMLJob': %+v", key, err) } @@ -113,7 +135,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["taskDetails"]; ok { - impl, err := unmarshalAutoMLVerticalImplementation(v) + impl, err := UnmarshalAutoMLVerticalImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TaskDetails' for 'AutoMLJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_automlvertical.go b/resource-manager/machinelearningservices/2024-04-01/job/model_automlvertical.go index 2b1fa7d40c1..1365db38bf7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_automlvertical.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_automlvertical.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutoMLVertical interface { + AutoMLVertical() BaseAutoMLVerticalImpl } -// RawAutoMLVerticalImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutoMLVertical = BaseAutoMLVerticalImpl{} + +type BaseAutoMLVerticalImpl struct { + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` + TrainingData MLTableJobInput `json:"trainingData"` +} + +func (s BaseAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s +} + +var _ AutoMLVertical = RawAutoMLVerticalImpl{} + +// RawAutoMLVerticalImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutoMLVerticalImpl struct { - Type string - Values map[string]interface{} + autoMLVertical BaseAutoMLVerticalImpl + Type string + Values map[string]interface{} +} + +func (s RawAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s.autoMLVertical } -func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { +func UnmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { if input == nil { return nil, nil } @@ -116,10 +136,15 @@ func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) return out, nil } - out := RawAutoMLVerticalImpl{ - Type: value, - Values: temp, + var parent BaseAutoMLVerticalImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutoMLVerticalImpl: %+v", err) } - return out, nil + + return RawAutoMLVerticalImpl{ + autoMLVertical: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_autoncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/job/model_autoncrossvalidations.go index 51e422de7fe..bee0973267a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_autoncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_autoncrossvalidations.go @@ -13,6 +13,14 @@ var _ NCrossValidations = AutoNCrossValidations{} type AutoNCrossValidations struct { // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s AutoNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoNCrossValidations{} @@ -26,9 +34,10 @@ func (s AutoNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoNCrossValidations: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_autoseasonality.go b/resource-manager/machinelearningservices/2024-04-01/job/model_autoseasonality.go index df655afb0e0..191c715de57 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_autoseasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_autoseasonality.go @@ -13,6 +13,14 @@ var _ Seasonality = AutoSeasonality{} type AutoSeasonality struct { // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s AutoSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoSeasonality{} @@ -26,9 +34,10 @@ func (s AutoSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoSeasonality: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetlags.go b/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetlags.go index 0d578339198..0e617e2455d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetlags.go @@ -13,6 +13,14 @@ var _ TargetLags = AutoTargetLags{} type AutoTargetLags struct { // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s AutoTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetLags{} @@ -26,9 +34,10 @@ func (s AutoTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetLags: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetrollingwindowsize.go index f572cdd3e27..724a92305cf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_autotargetrollingwindowsize.go @@ -13,6 +13,14 @@ var _ TargetRollingWindowSize = AutoTargetRollingWindowSize{} type AutoTargetRollingWindowSize struct { // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s AutoTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetRollingWindowSize{} @@ -26,9 +34,10 @@ func (s AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_azuredevopswebhook.go b/resource-manager/machinelearningservices/2024-04-01/job/model_azuredevopswebhook.go index 1248d3e9c9b..9e66f4a68ee 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_azuredevopswebhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_azuredevopswebhook.go @@ -13,7 +13,16 @@ var _ Webhook = AzureDevOpsWebhook{} type AzureDevOpsWebhook struct { // Fields inherited from Webhook - EventType *string `json:"eventType,omitempty"` + + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s AzureDevOpsWebhook) Webhook() BaseWebhookImpl { + return BaseWebhookImpl{ + EventType: s.EventType, + WebhookType: s.WebhookType, + } } var _ json.Marshaler = AzureDevOpsWebhook{} @@ -27,9 +36,10 @@ func (s AzureDevOpsWebhook) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDevOpsWebhook: %+v", err) } + decoded["webhookType"] = "AzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_banditpolicy.go b/resource-manager/machinelearningservices/2024-04-01/job/model_banditpolicy.go index 60398a0220d..da5ec6d8110 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_banditpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_banditpolicy.go @@ -15,8 +15,18 @@ type BanditPolicy struct { SlackFactor *float64 `json:"slackFactor,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BanditPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = BanditPolicy{} @@ -30,9 +40,10 @@ func (s BanditPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BanditPolicy: %+v", err) } + decoded["policyType"] = "Bandit" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_bayesiansamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/job/model_bayesiansamplingalgorithm.go index f2c76b5d904..c5d265166ac 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_bayesiansamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_bayesiansamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = BayesianSamplingAlgorithm{} type BayesianSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BayesianSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = BayesianSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BayesianSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Bayesian" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_classification.go b/resource-manager/machinelearningservices/2024-04-01/job/model_classification.go index 3e955fa97c1..e0e2149bf36 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_classification.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_classification.go @@ -25,11 +25,22 @@ type Classification struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Classification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Classification{} func (s Classification) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Classification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Classification: %+v", err) } + decoded["taskType"] = "Classification" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { s.PositiveLabel = decoded.PositiveLabel s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Classification': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_commandjob.go b/resource-manager/machinelearningservices/2024-04-01/job/model_commandjob.go index 3af98f0aab1..43bbc584d2e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_commandjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_commandjob.go @@ -24,6 +24,7 @@ type CommandJob struct { Resources *JobResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -31,6 +32,7 @@ type CommandJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -38,6 +40,24 @@ type CommandJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s CommandJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = CommandJob{} func (s CommandJob) MarshalJSON() ([]byte, error) { @@ -49,9 +69,10 @@ func (s CommandJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJob: %+v", err) } + decoded["jobType"] = "Command" encoded, err = json.Marshal(decoded) @@ -81,6 +102,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Parameters = decoded.Parameters s.Properties = decoded.Properties @@ -96,7 +118,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'CommandJob': %+v", err) } @@ -104,7 +126,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'CommandJob': %+v", err) } @@ -119,7 +141,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CommandJob': %+v", key, err) } @@ -129,7 +151,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limits"]; ok { - impl, err := unmarshalJobLimitsImplementation(v) + impl, err := UnmarshalJobLimitsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limits' for 'CommandJob': %+v", err) } @@ -144,7 +166,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'CommandJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_commandjoblimits.go b/resource-manager/machinelearningservices/2024-04-01/job/model_commandjoblimits.go index 092a4ed9daf..0d2c4f89460 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_commandjoblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_commandjoblimits.go @@ -13,7 +13,16 @@ var _ JobLimits = CommandJobLimits{} type CommandJobLimits struct { // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s CommandJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = CommandJobLimits{} @@ -27,9 +36,10 @@ func (s CommandJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Command" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_customforecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/job/model_customforecasthorizon.go index 00863b88f77..e04e41308fd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_customforecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_customforecasthorizon.go @@ -14,6 +14,14 @@ type CustomForecastHorizon struct { Value int64 `json:"value"` // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s CustomForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomForecastHorizon{} @@ -27,9 +35,10 @@ func (s CustomForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomForecastHorizon: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljobinput.go index 6995e1ae6a9..beb41ad4fed 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljobinput.go @@ -15,7 +15,16 @@ type CustomModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s CustomModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = CustomModelJobInput{} @@ -29,9 +38,10 @@ func (s CustomModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobInput: %+v", err) } + decoded["jobInputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljoboutput.go index 3a2898b4634..eedce78f9d2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_custommodeljoboutput.go @@ -15,7 +15,16 @@ type CustomModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s CustomModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = CustomModelJobOutput{} @@ -29,9 +38,10 @@ func (s CustomModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_customncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/job/model_customncrossvalidations.go index 422cda3d461..730a631f5b2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_customncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_customncrossvalidations.go @@ -14,6 +14,14 @@ type CustomNCrossValidations struct { Value int64 `json:"value"` // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s CustomNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomNCrossValidations{} @@ -27,9 +35,10 @@ func (s CustomNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomNCrossValidations: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_customseasonality.go b/resource-manager/machinelearningservices/2024-04-01/job/model_customseasonality.go index 0e4230d812b..c86016bdecd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_customseasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_customseasonality.go @@ -14,6 +14,14 @@ type CustomSeasonality struct { Value int64 `json:"value"` // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s CustomSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomSeasonality{} @@ -27,9 +35,10 @@ func (s CustomSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomSeasonality: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetlags.go b/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetlags.go index 78374782850..da1661ae7d5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetlags.go @@ -14,6 +14,14 @@ type CustomTargetLags struct { Values []int64 `json:"values"` // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s CustomTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetLags{} @@ -27,9 +35,10 @@ func (s CustomTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetLags: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetrollingwindowsize.go index 9b1f435bd17..ac2fae417a6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_customtargetrollingwindowsize.go @@ -14,6 +14,14 @@ type CustomTargetRollingWindowSize struct { Value int64 `json:"value"` // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s CustomTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetRollingWindowSize{} @@ -27,9 +35,10 @@ func (s CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_distributionconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/job/model_distributionconfiguration.go index 1fffe36371e..6aa6bf41138 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_distributionconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_distributionconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DistributionConfiguration interface { + DistributionConfiguration() BaseDistributionConfigurationImpl } -// RawDistributionConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DistributionConfiguration = BaseDistributionConfigurationImpl{} + +type BaseDistributionConfigurationImpl struct { + DistributionType DistributionType `json:"distributionType"` +} + +func (s BaseDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s +} + +var _ DistributionConfiguration = RawDistributionConfigurationImpl{} + +// RawDistributionConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDistributionConfigurationImpl struct { - Type string - Values map[string]interface{} + distributionConfiguration BaseDistributionConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s.distributionConfiguration } -func unmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { +func UnmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalDistributionConfigurationImplementation(input []byte) (Distributio return out, nil } - out := RawDistributionConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseDistributionConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDistributionConfigurationImpl: %+v", err) } - return out, nil + + return RawDistributionConfigurationImpl{ + distributionConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_earlyterminationpolicy.go b/resource-manager/machinelearningservices/2024-04-01/job/model_earlyterminationpolicy.go index 9f1264447ac..85c557bc44e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_earlyterminationpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_earlyterminationpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EarlyTerminationPolicy interface { + EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl } -// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EarlyTerminationPolicy = BaseEarlyTerminationPolicyImpl{} + +type BaseEarlyTerminationPolicyImpl struct { + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BaseEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s +} + +var _ EarlyTerminationPolicy = RawEarlyTerminationPolicyImpl{} + +// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEarlyTerminationPolicyImpl struct { - Type string - Values map[string]interface{} + earlyTerminationPolicy BaseEarlyTerminationPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s.earlyTerminationPolicy } -func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { +func UnmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminati return out, nil } - out := RawEarlyTerminationPolicyImpl{ - Type: value, - Values: temp, + var parent BaseEarlyTerminationPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEarlyTerminationPolicyImpl: %+v", err) } - return out, nil + + return RawEarlyTerminationPolicyImpl{ + earlyTerminationPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_forecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/job/model_forecasthorizon.go index 814731b8727..e43938c1a0c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_forecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_forecasthorizon.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForecastHorizon interface { + ForecastHorizon() BaseForecastHorizonImpl } -// RawForecastHorizonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ForecastHorizon = BaseForecastHorizonImpl{} + +type BaseForecastHorizonImpl struct { + Mode ForecastHorizonMode `json:"mode"` +} + +func (s BaseForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s +} + +var _ ForecastHorizon = RawForecastHorizonImpl{} + +// RawForecastHorizonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawForecastHorizonImpl struct { - Type string - Values map[string]interface{} + forecastHorizon BaseForecastHorizonImpl + Type string + Values map[string]interface{} +} + +func (s RawForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s.forecastHorizon } -func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { +func UnmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, erro return out, nil } - out := RawForecastHorizonImpl{ - Type: value, - Values: temp, + var parent BaseForecastHorizonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseForecastHorizonImpl: %+v", err) } - return out, nil + + return RawForecastHorizonImpl{ + forecastHorizon: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_forecasting.go b/resource-manager/machinelearningservices/2024-04-01/job/model_forecasting.go index e8a577f3d29..0511be90eef 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_forecasting.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_forecasting.go @@ -25,11 +25,22 @@ type Forecasting struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Forecasting) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Forecasting{} func (s Forecasting) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Forecasting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Forecasting: %+v", err) } + decoded["taskType"] = "Forecasting" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Forecasting': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_forecastingsettings.go b/resource-manager/machinelearningservices/2024-04-01/job/model_forecastingsettings.go index ee51047ed33..6b67cd31a78 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_forecastingsettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_forecastingsettings.go @@ -49,7 +49,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["forecastHorizon"]; ok { - impl, err := unmarshalForecastHorizonImplementation(v) + impl, err := UnmarshalForecastHorizonImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ForecastHorizon' for 'ForecastingSettings': %+v", err) } @@ -57,7 +57,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["seasonality"]; ok { - impl, err := unmarshalSeasonalityImplementation(v) + impl, err := UnmarshalSeasonalityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Seasonality' for 'ForecastingSettings': %+v", err) } @@ -65,7 +65,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetLags"]; ok { - impl, err := unmarshalTargetLagsImplementation(v) + impl, err := UnmarshalTargetLagsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetLags' for 'ForecastingSettings': %+v", err) } @@ -73,7 +73,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetRollingWindowSize"]; ok { - impl, err := unmarshalTargetRollingWindowSizeImplementation(v) + impl, err := UnmarshalTargetRollingWindowSizeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetRollingWindowSize' for 'ForecastingSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_gridsamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/job/model_gridsamplingalgorithm.go index 818c2a8de7c..491e4b359b0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_gridsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_gridsamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = GridSamplingAlgorithm{} type GridSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s GridSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = GridSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GridSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Grid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_identityconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/job/model_identityconfiguration.go index 1a71f4f8e55..aeee58afa60 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_identityconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_identityconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IdentityConfiguration interface { + IdentityConfiguration() BaseIdentityConfigurationImpl } -// RawIdentityConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IdentityConfiguration = BaseIdentityConfigurationImpl{} + +type BaseIdentityConfigurationImpl struct { + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s BaseIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s +} + +var _ IdentityConfiguration = RawIdentityConfigurationImpl{} + +// RawIdentityConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIdentityConfigurationImpl struct { - Type string - Values map[string]interface{} + identityConfiguration BaseIdentityConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s.identityConfiguration } -func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { +func UnmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfigu return out, nil } - out := RawIdentityConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseIdentityConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIdentityConfigurationImpl: %+v", err) } - return out, nil + + return RawIdentityConfigurationImpl{ + identityConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassification.go b/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassification.go index f6a0b7acf41..fbab861e4e2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassification.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassification.go @@ -20,11 +20,22 @@ type ImageClassification struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassification{} func (s ImageClassification) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassification: %+v", err) } + decoded["taskType"] = "ImageClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassificationmultilabel.go b/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassificationmultilabel.go index ea82b509896..c40ef97601b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_imageclassificationmultilabel.go @@ -20,11 +20,22 @@ type ImageClassificationMultilabel struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassificationMultilabel{} func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassificationMultilabel: %+v", err) } + decoded["taskType"] = "ImageClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_imageinstancesegmentation.go b/resource-manager/machinelearningservices/2024-04-01/job/model_imageinstancesegmentation.go index f075acc5003..b878e99a9cb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_imageinstancesegmentation.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_imageinstancesegmentation.go @@ -20,11 +20,22 @@ type ImageInstanceSegmentation struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageInstanceSegmentation) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageInstanceSegmentation{} func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageInstanceSegmentation: %+v", err) } + decoded["taskType"] = "ImageInstanceSegmentation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_imageobjectdetection.go b/resource-manager/machinelearningservices/2024-04-01/job/model_imageobjectdetection.go index f0eb8078a46..bdec18ee6c6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_imageobjectdetection.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_imageobjectdetection.go @@ -20,11 +20,22 @@ type ImageObjectDetection struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageObjectDetection) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageObjectDetection{} func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageObjectDetection: %+v", err) } + decoded["taskType"] = "ImageObjectDetection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_imagesweepsettings.go b/resource-manager/machinelearningservices/2024-04-01/job/model_imagesweepsettings.go index 5470ecf0781..c48d91fdd36 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_imagesweepsettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_imagesweepsettings.go @@ -30,7 +30,7 @@ func (s *ImageSweepSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'ImageSweepSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_jobbase.go b/resource-manager/machinelearningservices/2024-04-01/job/model_jobbase.go index 2efab0029a7..1239289c0e0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_jobbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_jobbase.go @@ -10,18 +10,84 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobBase interface { + JobBase() BaseJobBaseImpl } -// RawJobBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobBase = BaseJobBaseImpl{} + +type BaseJobBaseImpl struct { + ComponentId *string `json:"componentId,omitempty"` + ComputeId *string `json:"computeId,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + ExperimentName *string `json:"experimentName,omitempty"` + Identity IdentityConfiguration `json:"identity"` + IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` + NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Services *map[string]JobService `json:"services,omitempty"` + Status *JobStatus `json:"status,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseJobBaseImpl) JobBase() BaseJobBaseImpl { + return s +} + +var _ JobBase = RawJobBaseImpl{} + +// RawJobBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobBaseImpl struct { - Type string - Values map[string]interface{} + jobBase BaseJobBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawJobBaseImpl) JobBase() BaseJobBaseImpl { + return s.jobBase } -func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { +var _ json.Unmarshaler = &BaseJobBaseImpl{} + +func (s *BaseJobBaseImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobBaseImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) + } + + s.ComponentId = decoded.ComponentId + s.ComputeId = decoded.ComputeId + s.Description = decoded.Description + s.DisplayName = decoded.DisplayName + s.ExperimentName = decoded.ExperimentName + s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType + s.NotificationSetting = decoded.NotificationSetting + s.Properties = decoded.Properties + s.Services = decoded.Services + s.Status = decoded.Status + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobBaseImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["identity"]; ok { + impl, err := UnmarshalIdentityConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Identity' for 'BaseJobBaseImpl': %+v", err) + } + s.Identity = impl + } + return nil +} + +func UnmarshalJobBaseImplementation(input []byte) (JobBase, error) { if input == nil { return nil, nil } @@ -76,10 +142,15 @@ func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { return out, nil } - out := RawJobBaseImpl{ - Type: value, - Values: temp, + var parent BaseJobBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) } - return out, nil + + return RawJobBaseImpl{ + jobBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_jobbaseresource.go b/resource-manager/machinelearningservices/2024-04-01/job/model_jobbaseresource.go index f5b5f4ff13d..590f3ad81fe 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_jobbaseresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_jobbaseresource.go @@ -38,7 +38,7 @@ func (s *JobBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobBaseImplementation(v) + impl, err := UnmarshalJobBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobBaseResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_jobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_jobinput.go index f525d0a0bb1..b5f153d488b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_jobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_jobinput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -92,10 +110,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_joblimits.go b/resource-manager/machinelearningservices/2024-04-01/job/model_joblimits.go index 57c02a64d7e..1e08ddb8754 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_joblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_joblimits.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobLimits interface { + JobLimits() BaseJobLimitsImpl } -// RawJobLimitsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobLimits = BaseJobLimitsImpl{} + +type BaseJobLimitsImpl struct { + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s BaseJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s +} + +var _ JobLimits = RawJobLimitsImpl{} + +// RawJobLimitsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobLimitsImpl struct { - Type string - Values map[string]interface{} + jobLimits BaseJobLimitsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s.jobLimits } -func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { +func UnmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { return out, nil } - out := RawJobLimitsImpl{ - Type: value, - Values: temp, + var parent BaseJobLimitsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobLimitsImpl: %+v", err) } - return out, nil + + return RawJobLimitsImpl{ + jobLimits: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_joboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_joboutput.go index 396d201d0b0..dbb5317c811 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_joboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_joboutput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_jobservice.go b/resource-manager/machinelearningservices/2024-04-01/job/model_jobservice.go index e0b80bfa248..81ef7f86c4e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_jobservice.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_jobservice.go @@ -40,7 +40,7 @@ func (s *JobService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nodes"]; ok { - impl, err := unmarshalNodesImplementation(v) + impl, err := UnmarshalNodesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Nodes' for 'JobService': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_literaljobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_literaljobinput.go index bd33bc88485..b5c2d162c3b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_literaljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_literaljobinput.go @@ -14,7 +14,16 @@ type LiteralJobInput struct { Value string `json:"value"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s LiteralJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = LiteralJobInput{} @@ -28,9 +37,10 @@ func (s LiteralJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LiteralJobInput: %+v", err) } + decoded["jobInputType"] = "literal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_managedidentity.go b/resource-manager/machinelearningservices/2024-04-01/job/model_managedidentity.go index 6617adbf7b4..650f80d2fe9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_managedidentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_managedidentity.go @@ -16,6 +16,14 @@ type ManagedIdentity struct { ResourceId *string `json:"resourceId,omitempty"` // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s ManagedIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = ManagedIdentity{} @@ -29,9 +37,10 @@ func (s ManagedIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentity: %+v", err) } + decoded["identityType"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_medianstoppingpolicy.go b/resource-manager/machinelearningservices/2024-04-01/job/model_medianstoppingpolicy.go index 0db9b997381..23def5e3925 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_medianstoppingpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_medianstoppingpolicy.go @@ -13,8 +13,18 @@ var _ EarlyTerminationPolicy = MedianStoppingPolicy{} type MedianStoppingPolicy struct { // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s MedianStoppingPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = MedianStoppingPolicy{} @@ -28,9 +38,10 @@ func (s MedianStoppingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MedianStoppingPolicy: %+v", err) } + decoded["policyType"] = "MedianStopping" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljobinput.go index e26b35621b9..f4e7ba81f7b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljobinput.go @@ -15,7 +15,16 @@ type MLFlowModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLFlowModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLFlowModelJobInput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobInput: %+v", err) } + decoded["jobInputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljoboutput.go index 7b924ace494..d4be436b031 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_mlflowmodeljoboutput.go @@ -15,7 +15,16 @@ type MLFlowModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLFlowModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLFlowModelJobOutput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejobinput.go index fba8ec64d57..e39b578b529 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejobinput.go @@ -15,7 +15,16 @@ type MLTableJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLTableJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLTableJobInput{} @@ -29,9 +38,10 @@ func (s MLTableJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobInput: %+v", err) } + decoded["jobInputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejoboutput.go index 8f9380251c8..470fb02d0c2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_mltablejoboutput.go @@ -15,7 +15,16 @@ type MLTableJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLTableJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLTableJobOutput{} @@ -29,9 +38,10 @@ func (s MLTableJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobOutput: %+v", err) } + decoded["jobOutputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_mpi.go b/resource-manager/machinelearningservices/2024-04-01/job/model_mpi.go index 65ed29edcd1..9eeed1b786f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_mpi.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_mpi.go @@ -14,6 +14,14 @@ type Mpi struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s Mpi) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = Mpi{} @@ -27,9 +35,10 @@ func (s Mpi) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mpi: %+v", err) } + decoded["distributionType"] = "Mpi" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_ncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/job/model_ncrossvalidations.go index 0f9afc8a6a1..1f52c3cbd8c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_ncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_ncrossvalidations.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NCrossValidations interface { + NCrossValidations() BaseNCrossValidationsImpl } -// RawNCrossValidationsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NCrossValidations = BaseNCrossValidationsImpl{} + +type BaseNCrossValidationsImpl struct { + Mode NCrossValidationsMode `json:"mode"` +} + +func (s BaseNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s +} + +var _ NCrossValidations = RawNCrossValidationsImpl{} + +// RawNCrossValidationsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNCrossValidationsImpl struct { - Type string - Values map[string]interface{} + nCrossValidations BaseNCrossValidationsImpl + Type string + Values map[string]interface{} +} + +func (s RawNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s.nCrossValidations } -func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { +func UnmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, return out, nil } - out := RawNCrossValidationsImpl{ - Type: value, - Values: temp, + var parent BaseNCrossValidationsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNCrossValidationsImpl: %+v", err) } - return out, nil + + return RawNCrossValidationsImpl{ + nCrossValidations: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_nodes.go b/resource-manager/machinelearningservices/2024-04-01/job/model_nodes.go index a9b6e4e7f61..18f8c6c46cf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_nodes.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_nodes.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Nodes interface { + Nodes() BaseNodesImpl } -// RawNodesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Nodes = BaseNodesImpl{} + +type BaseNodesImpl struct { + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s BaseNodesImpl) Nodes() BaseNodesImpl { + return s +} + +var _ Nodes = RawNodesImpl{} + +// RawNodesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNodesImpl struct { + nodes BaseNodesImpl Type string Values map[string]interface{} } -func unmarshalNodesImplementation(input []byte) (Nodes, error) { +func (s RawNodesImpl) Nodes() BaseNodesImpl { + return s.nodes +} + +func UnmarshalNodesImplementation(input []byte) (Nodes, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalNodesImplementation(input []byte) (Nodes, error) { return out, nil } - out := RawNodesImpl{ + var parent BaseNodesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNodesImpl: %+v", err) + } + + return RawNodesImpl{ + nodes: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_notificationsetting.go b/resource-manager/machinelearningservices/2024-04-01/job/model_notificationsetting.go index cd9e887100f..9cf8ab496a7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_notificationsetting.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_notificationsetting.go @@ -39,7 +39,7 @@ func (s *NotificationSetting) UnmarshalJSON(bytes []byte) error { output := make(map[string]Webhook) for key, val := range dictionaryTemp { - impl, err := unmarshalWebhookImplementation(val) + impl, err := UnmarshalWebhookImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'WebHooks' for 'NotificationSetting': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_pipelinejob.go b/resource-manager/machinelearningservices/2024-04-01/job/model_pipelinejob.go index ad8d4befee8..ea0cc43bdb1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_pipelinejob.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_pipelinejob.go @@ -18,6 +18,7 @@ type PipelineJob struct { SourceJobId *string `json:"sourceJobId,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -25,6 +26,7 @@ type PipelineJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -32,6 +34,24 @@ type PipelineJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s PipelineJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = PipelineJob{} func (s PipelineJob) MarshalJSON() ([]byte, error) { @@ -43,9 +63,10 @@ func (s PipelineJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PipelineJob: %+v", err) } + decoded["jobType"] = "Pipeline" encoded, err = json.Marshal(decoded) @@ -71,6 +92,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Jobs = decoded.Jobs s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties @@ -86,7 +108,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'PipelineJob': %+v", err) } @@ -101,7 +123,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'PipelineJob': %+v", key, err) } @@ -118,7 +140,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'PipelineJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_pytorch.go b/resource-manager/machinelearningservices/2024-04-01/job/model_pytorch.go index a56a9ad6101..13ffe867753 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_pytorch.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_pytorch.go @@ -14,6 +14,14 @@ type PyTorch struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s PyTorch) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = PyTorch{} @@ -27,9 +35,10 @@ func (s PyTorch) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PyTorch: %+v", err) } + decoded["distributionType"] = "PyTorch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_randomsamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/job/model_randomsamplingalgorithm.go index ecc7606980f..5057b869f15 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_randomsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_randomsamplingalgorithm.go @@ -15,6 +15,14 @@ type RandomSamplingAlgorithm struct { Seed *int64 `json:"seed,omitempty"` // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s RandomSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = RandomSamplingAlgorithm{} @@ -28,9 +36,10 @@ func (s RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RandomSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Random" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_regression.go b/resource-manager/machinelearningservices/2024-04-01/job/model_regression.go index c15934ab502..2a22788cfb8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_regression.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_regression.go @@ -24,11 +24,22 @@ type Regression struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Regression) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Regression{} func (s Regression) MarshalJSON() ([]byte, error) { @@ -40,9 +51,10 @@ func (s Regression) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Regression: %+v", err) } + decoded["taskType"] = "Regression" encoded, err = json.Marshal(decoded) @@ -68,6 +80,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -82,7 +95,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Regression': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_samplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/job/model_samplingalgorithm.go index dab4619b127..a8337cef1ab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_samplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_samplingalgorithm.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SamplingAlgorithm interface { + SamplingAlgorithm() BaseSamplingAlgorithmImpl } -// RawSamplingAlgorithmImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SamplingAlgorithm = BaseSamplingAlgorithmImpl{} + +type BaseSamplingAlgorithmImpl struct { + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BaseSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s +} + +var _ SamplingAlgorithm = RawSamplingAlgorithmImpl{} + +// RawSamplingAlgorithmImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSamplingAlgorithmImpl struct { - Type string - Values map[string]interface{} + samplingAlgorithm BaseSamplingAlgorithmImpl + Type string + Values map[string]interface{} +} + +func (s RawSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s.samplingAlgorithm } -func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { +func UnmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, return out, nil } - out := RawSamplingAlgorithmImpl{ - Type: value, - Values: temp, + var parent BaseSamplingAlgorithmImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSamplingAlgorithmImpl: %+v", err) } - return out, nil + + return RawSamplingAlgorithmImpl{ + samplingAlgorithm: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_seasonality.go b/resource-manager/machinelearningservices/2024-04-01/job/model_seasonality.go index 2b939f89c89..d07c166df7a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_seasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_seasonality.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Seasonality interface { + Seasonality() BaseSeasonalityImpl } -// RawSeasonalityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Seasonality = BaseSeasonalityImpl{} + +type BaseSeasonalityImpl struct { + Mode SeasonalityMode `json:"mode"` +} + +func (s BaseSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s +} + +var _ Seasonality = RawSeasonalityImpl{} + +// RawSeasonalityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSeasonalityImpl struct { - Type string - Values map[string]interface{} + seasonality BaseSeasonalityImpl + Type string + Values map[string]interface{} +} + +func (s RawSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s.seasonality } -func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { +func UnmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { return out, nil } - out := RawSeasonalityImpl{ - Type: value, - Values: temp, + var parent BaseSeasonalityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSeasonalityImpl: %+v", err) } - return out, nil + + return RawSeasonalityImpl{ + seasonality: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjob.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjob.go index 6760659afdb..448415fcda4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjob.go @@ -27,6 +27,7 @@ type SparkJob struct { Resources *SparkResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -34,6 +35,7 @@ type SparkJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -41,6 +43,24 @@ type SparkJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s SparkJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SparkJob{} func (s SparkJob) MarshalJSON() ([]byte, error) { @@ -52,9 +72,10 @@ func (s SparkJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJob: %+v", err) } + decoded["jobType"] = "Spark" encoded, err = json.Marshal(decoded) @@ -88,6 +109,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { s.Files = decoded.Files s.IsArchived = decoded.IsArchived s.Jars = decoded.Jars + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties s.PyFiles = decoded.PyFiles @@ -103,7 +125,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["entry"]; ok { - impl, err := unmarshalSparkJobEntryImplementation(v) + impl, err := UnmarshalSparkJobEntryImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Entry' for 'SparkJob': %+v", err) } @@ -111,7 +133,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SparkJob': %+v", err) } @@ -126,7 +148,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SparkJob': %+v", key, err) } @@ -143,7 +165,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SparkJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobentry.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobentry.go index 6a088dc0b08..87e7a687a29 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobentry.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SparkJobEntry interface { + SparkJobEntry() BaseSparkJobEntryImpl } -// RawSparkJobEntryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SparkJobEntry = BaseSparkJobEntryImpl{} + +type BaseSparkJobEntryImpl struct { + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s BaseSparkJobEntryImpl) SparkJobEntry() BaseSparkJobEntryImpl { + return s +} + +var _ SparkJobEntry = RawSparkJobEntryImpl{} + +// RawSparkJobEntryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSparkJobEntryImpl struct { - Type string - Values map[string]interface{} + sparkJobEntry BaseSparkJobEntryImpl + Type string + Values map[string]interface{} +} + +func (s RawSparkJobEntryImpl) SparkJobEntry() BaseSparkJobEntryImpl { + return s.sparkJobEntry } -func unmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { +func UnmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { return out, nil } - out := RawSparkJobEntryImpl{ - Type: value, - Values: temp, + var parent BaseSparkJobEntryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSparkJobEntryImpl: %+v", err) } - return out, nil + + return RawSparkJobEntryImpl{ + sparkJobEntry: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobpythonentry.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobpythonentry.go index 4de95a1b1ad..c41bed897f1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobpythonentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobpythonentry.go @@ -14,6 +14,14 @@ type SparkJobPythonEntry struct { File string `json:"file"` // Fields inherited from SparkJobEntry + + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s SparkJobPythonEntry) SparkJobEntry() BaseSparkJobEntryImpl { + return BaseSparkJobEntryImpl{ + SparkJobEntryType: s.SparkJobEntryType, + } } var _ json.Marshaler = SparkJobPythonEntry{} @@ -27,9 +35,10 @@ func (s SparkJobPythonEntry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJobPythonEntry: %+v", err) } + decoded["sparkJobEntryType"] = "SparkJobPythonEntry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobscalaentry.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobscalaentry.go index 0a5e8cc317e..8afd4c0065c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobscalaentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sparkjobscalaentry.go @@ -14,6 +14,14 @@ type SparkJobScalaEntry struct { ClassName string `json:"className"` // Fields inherited from SparkJobEntry + + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s SparkJobScalaEntry) SparkJobEntry() BaseSparkJobEntryImpl { + return BaseSparkJobEntryImpl{ + SparkJobEntryType: s.SparkJobEntryType, + } } var _ json.Marshaler = SparkJobScalaEntry{} @@ -27,9 +35,10 @@ func (s SparkJobScalaEntry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJobScalaEntry: %+v", err) } + decoded["sparkJobEntryType"] = "SparkJobScalaEntry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjob.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjob.go index 302c6e92d46..51b5e9d7726 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjob.go @@ -22,6 +22,7 @@ type SweepJob struct { Trial TrialComponent `json:"trial"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -29,6 +30,7 @@ type SweepJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -36,6 +38,24 @@ type SweepJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s SweepJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SweepJob{} func (s SweepJob) MarshalJSON() ([]byte, error) { @@ -47,9 +67,10 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJob: %+v", err) } + decoded["jobType"] = "Sweep" encoded, err = json.Marshal(decoded) @@ -75,6 +96,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Limits = decoded.Limits s.NotificationSetting = decoded.NotificationSetting s.Objective = decoded.Objective @@ -92,7 +114,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'SweepJob': %+v", err) } @@ -100,7 +122,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SweepJob': %+v", err) } @@ -115,7 +137,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SweepJob': %+v", key, err) } @@ -132,7 +154,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SweepJob': %+v", key, err) } @@ -142,7 +164,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["samplingAlgorithm"]; ok { - impl, err := unmarshalSamplingAlgorithmImplementation(v) + impl, err := UnmarshalSamplingAlgorithmImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SamplingAlgorithm' for 'SweepJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjoblimits.go b/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjoblimits.go index a73d6667657..454fac2fd83 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjoblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_sweepjoblimits.go @@ -16,7 +16,16 @@ type SweepJobLimits struct { TrialTimeout *string `json:"trialTimeout,omitempty"` // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s SweepJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = SweepJobLimits{} @@ -30,9 +39,10 @@ func (s SweepJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Sweep" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_targetlags.go b/resource-manager/machinelearningservices/2024-04-01/job/model_targetlags.go index 3f152e6b924..32c747cc057 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_targetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_targetlags.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetLags interface { + TargetLags() BaseTargetLagsImpl } -// RawTargetLagsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetLags = BaseTargetLagsImpl{} + +type BaseTargetLagsImpl struct { + Mode TargetLagsMode `json:"mode"` +} + +func (s BaseTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s +} + +var _ TargetLags = RawTargetLagsImpl{} + +// RawTargetLagsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetLagsImpl struct { - Type string - Values map[string]interface{} + targetLags BaseTargetLagsImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s.targetLags } -func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { +func UnmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { return out, nil } - out := RawTargetLagsImpl{ - Type: value, - Values: temp, + var parent BaseTargetLagsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetLagsImpl: %+v", err) } - return out, nil + + return RawTargetLagsImpl{ + targetLags: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_targetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/job/model_targetrollingwindowsize.go index 20432cc35e5..35de2cb32af 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_targetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_targetrollingwindowsize.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetRollingWindowSize interface { + TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl } -// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetRollingWindowSize = BaseTargetRollingWindowSizeImpl{} + +type BaseTargetRollingWindowSizeImpl struct { + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s BaseTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s +} + +var _ TargetRollingWindowSize = RawTargetRollingWindowSizeImpl{} + +// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetRollingWindowSizeImpl struct { - Type string - Values map[string]interface{} + targetRollingWindowSize BaseTargetRollingWindowSizeImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s.targetRollingWindowSize } -func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { +func UnmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRolling return out, nil } - out := RawTargetRollingWindowSizeImpl{ - Type: value, - Values: temp, + var parent BaseTargetRollingWindowSizeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetRollingWindowSizeImpl: %+v", err) } - return out, nil + + return RawTargetRollingWindowSizeImpl{ + targetRollingWindowSize: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_tensorflow.go b/resource-manager/machinelearningservices/2024-04-01/job/model_tensorflow.go index f312888de90..3c253e1be1f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_tensorflow.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_tensorflow.go @@ -15,6 +15,14 @@ type TensorFlow struct { WorkerCount *int64 `json:"workerCount,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s TensorFlow) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = TensorFlow{} @@ -28,9 +36,10 @@ func (s TensorFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TensorFlow: %+v", err) } + decoded["distributionType"] = "TensorFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_textclassification.go b/resource-manager/machinelearningservices/2024-04-01/job/model_textclassification.go index f53e965a2e0..2931cc4b784 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_textclassification.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_textclassification.go @@ -17,11 +17,22 @@ type TextClassification struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassification{} func (s TextClassification) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassification: %+v", err) } + decoded["taskType"] = "TextClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_textclassificationmultilabel.go b/resource-manager/machinelearningservices/2024-04-01/job/model_textclassificationmultilabel.go index 24edadae01a..a6c15773558 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_textclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_textclassificationmultilabel.go @@ -17,11 +17,22 @@ type TextClassificationMultilabel struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassificationMultilabel{} func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassificationMultilabel: %+v", err) } + decoded["taskType"] = "TextClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_textner.go b/resource-manager/machinelearningservices/2024-04-01/job/model_textner.go index bb3c702526b..481ae1e0a51 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_textner.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_textner.go @@ -17,11 +17,22 @@ type TextNer struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextNer) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextNer{} func (s TextNer) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextNer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextNer: %+v", err) } + decoded["taskType"] = "TextNER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_trialcomponent.go b/resource-manager/machinelearningservices/2024-04-01/job/model_trialcomponent.go index a12d8a20ad3..13976e9698d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_trialcomponent.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_trialcomponent.go @@ -38,7 +38,7 @@ func (s *TrialComponent) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'TrialComponent': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljobinput.go index f72ac7137e6..cb1aa8e5955 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljobinput.go @@ -15,7 +15,16 @@ type TritonModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s TritonModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = TritonModelJobInput{} @@ -29,9 +38,10 @@ func (s TritonModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobInput: %+v", err) } + decoded["jobInputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljoboutput.go index 34c7733e05b..c01b418e890 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_tritonmodeljoboutput.go @@ -15,7 +15,16 @@ type TritonModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s TritonModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = TritonModelJobOutput{} @@ -29,9 +38,10 @@ func (s TritonModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_truncationselectionpolicy.go b/resource-manager/machinelearningservices/2024-04-01/job/model_truncationselectionpolicy.go index 4bcfab514c8..6f7bdc5a76d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_truncationselectionpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_truncationselectionpolicy.go @@ -14,8 +14,18 @@ type TruncationSelectionPolicy struct { TruncationPercentage *int64 `json:"truncationPercentage,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s TruncationSelectionPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = TruncationSelectionPolicy{} @@ -29,9 +39,10 @@ func (s TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TruncationSelectionPolicy: %+v", err) } + decoded["policyType"] = "TruncationSelection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejobinput.go index 2cdc66e2ad8..da8491b514b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejobinput.go @@ -15,7 +15,16 @@ type UriFileJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFileJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFileJobInput{} @@ -29,9 +38,10 @@ func (s UriFileJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobInput: %+v", err) } + decoded["jobInputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejoboutput.go index b1b0bf9b886..2e0588a2aed 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_urifilejoboutput.go @@ -15,7 +15,16 @@ type UriFileJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFileJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFileJobOutput{} @@ -29,9 +38,10 @@ func (s UriFileJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjobinput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjobinput.go index 0326766bf1d..93d54a955c6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjobinput.go @@ -15,7 +15,16 @@ type UriFolderJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFolderJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFolderJobInput{} @@ -29,9 +38,10 @@ func (s UriFolderJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobInput: %+v", err) } + decoded["jobInputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjoboutput.go b/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjoboutput.go index 186181abef8..368d535cedd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_urifolderjoboutput.go @@ -15,7 +15,16 @@ type UriFolderJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFolderJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFolderJobOutput{} @@ -29,9 +38,10 @@ func (s UriFolderJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_useridentity.go b/resource-manager/machinelearningservices/2024-04-01/job/model_useridentity.go index 2de31367108..938c1408fc4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_useridentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_useridentity.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = UserIdentity{} type UserIdentity struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s UserIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = UserIdentity{} @@ -26,9 +34,10 @@ func (s UserIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserIdentity: %+v", err) } + decoded["identityType"] = "UserIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/job/model_webhook.go b/resource-manager/machinelearningservices/2024-04-01/job/model_webhook.go index 75cdbcc3505..57497d63088 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/model_webhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/model_webhook.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Webhook interface { + Webhook() BaseWebhookImpl } -// RawWebhookImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Webhook = BaseWebhookImpl{} + +type BaseWebhookImpl struct { + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s BaseWebhookImpl) Webhook() BaseWebhookImpl { + return s +} + +var _ Webhook = RawWebhookImpl{} + +// RawWebhookImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWebhookImpl struct { - Type string - Values map[string]interface{} + webhook BaseWebhookImpl + Type string + Values map[string]interface{} +} + +func (s RawWebhookImpl) Webhook() BaseWebhookImpl { + return s.webhook } -func unmarshalWebhookImplementation(input []byte) (Webhook, error) { +func UnmarshalWebhookImplementation(input []byte) (Webhook, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalWebhookImplementation(input []byte) (Webhook, error) { return out, nil } - out := RawWebhookImpl{ - Type: value, - Values: temp, + var parent BaseWebhookImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWebhookImpl: %+v", err) } - return out, nil + + return RawWebhookImpl{ + webhook: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/job/version.go b/resource-manager/machinelearningservices/2024-04-01/job/version.go index 8775c9058f6..e2afb6bbc1f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/job/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/job/version.go @@ -1,12 +1,10 @@ package job -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/job/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/job/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/README.md b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/README.md index eb20a5c5504..5cc65e2f0ec 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes` Documentation -The `machinelearningcomputes` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `machinelearningcomputes` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/client.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/client.go index 84356e1d8d5..7c06a2fa111 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/client.go @@ -15,7 +15,7 @@ type MachineLearningComputesClient struct { } func NewMachineLearningComputesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineLearningComputesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinelearningcomputes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinelearningcomputes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachineLearningComputesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_compute.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_compute.go index bc40b6f35c7..f80c26362ad 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_compute.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_compute.go @@ -44,7 +44,7 @@ func ParseComputeID(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComputeIDInsensitively(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_workspace.go index 3aad50eb7f3..1bfc8b917ce 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computedelete.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computedelete.go index dc6079dda52..bd200979d82 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computedelete.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computedelete.go @@ -36,6 +36,7 @@ func (o ComputeDeleteOperationOptions) ToHeaders() *client.Headers { func (o ComputeDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computeget.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computeget.go index e893e2799b4..efcd93aead0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computeget.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computeget.go @@ -45,7 +45,6 @@ func (c MachineLearningComputesClient) ComputeGet(ctx context.Context, id Comput var model ComputeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelist.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelist.go index 8641953d2f8..be727b9ad2f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelist.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelist.go @@ -39,6 +39,7 @@ func (o ComputeListOperationOptions) ToHeaders() *client.Headers { func (o ComputeListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelistkeys.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelistkeys.go index ea4b0e26f9c..0ba7e650f66 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelistkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/method_computelistkeys.go @@ -16,7 +16,7 @@ import ( type ComputeListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ComputeSecrets + Model ComputeSecrets } // ComputeListKeys ... @@ -49,11 +49,11 @@ func (c MachineLearningComputesClient) ComputeListKeys(ctx context.Context, id C if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalComputeSecretsImplementation(respObj) + model, err := UnmarshalComputeSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_aks.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_aks.go index c1e56af49ca..47e58464f4c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_aks.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_aks.go @@ -17,7 +17,9 @@ type AKS struct { Properties *AKSSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AKS struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AKS) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AKS) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AKS) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AKS: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_akscomputesecrets.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_akscomputesecrets.go index 1631eeb546f..bc1d732f866 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_akscomputesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_akscomputesecrets.go @@ -16,6 +16,14 @@ type AksComputeSecrets struct { UserKubeConfig *string `json:"userKubeConfig,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s AksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = AksComputeSecrets{} @@ -29,9 +37,10 @@ func (s AksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AksComputeSecrets: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_amlcompute.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_amlcompute.go index 3f1c2957bf4..bb3a49f8bdc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_amlcompute.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_amlcompute.go @@ -17,7 +17,9 @@ type AmlCompute struct { Properties *AmlComputeProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AmlCompute struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AmlCompute) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AmlCompute) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AmlCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlCompute: %+v", err) } + decoded["computeType"] = "AmlCompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_compute.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_compute.go index 36f9d37457d..391e85765b4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_compute.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_compute.go @@ -10,18 +10,44 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Compute interface { + Compute() BaseComputeImpl } -// RawComputeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Compute = BaseComputeImpl{} + +type BaseComputeImpl struct { + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` + CreatedOn *string `json:"createdOn,omitempty"` + Description *string `json:"description,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"` + ModifiedOn *string `json:"modifiedOn,omitempty"` + ProvisioningErrors *[]ErrorResponse `json:"provisioningErrors,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} + +func (s BaseComputeImpl) Compute() BaseComputeImpl { + return s +} + +var _ Compute = RawComputeImpl{} + +// RawComputeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeImpl struct { - Type string - Values map[string]interface{} + compute BaseComputeImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeImpl) Compute() BaseComputeImpl { + return s.compute } -func unmarshalComputeImplementation(input []byte) (Compute, error) { +func UnmarshalComputeImplementation(input []byte) (Compute, error) { if input == nil { return nil, nil } @@ -116,10 +142,15 @@ func unmarshalComputeImplementation(input []byte) (Compute, error) { return out, nil } - out := RawComputeImpl{ - Type: value, - Values: temp, + var parent BaseComputeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeImpl: %+v", err) } - return out, nil + + return RawComputeImpl{ + compute: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeinstance.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeinstance.go index 292c0c1a375..10054583862 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeinstance.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeinstance.go @@ -17,7 +17,9 @@ type ComputeInstance struct { Properties *ComputeInstanceProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type ComputeInstance struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s ComputeInstance) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *ComputeInstance) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s ComputeInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ComputeInstance: %+v", err) } + decoded["computeType"] = "ComputeInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeresource.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeresource.go index 4d4a4646b3e..ad4c3e8a20f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computeresource.go @@ -47,7 +47,7 @@ func (s *ComputeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalComputeImplementation(v) + impl, err := UnmarshalComputeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ComputeResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computesecrets.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computesecrets.go index 9df90b89da3..c63a7983007 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_computesecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ComputeSecrets interface { + ComputeSecrets() BaseComputeSecretsImpl } -// RawComputeSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ComputeSecrets = BaseComputeSecretsImpl{} + +type BaseComputeSecretsImpl struct { + ComputeType ComputeType `json:"computeType"` +} + +func (s BaseComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s +} + +var _ ComputeSecrets = RawComputeSecretsImpl{} + +// RawComputeSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeSecretsImpl struct { - Type string - Values map[string]interface{} + computeSecrets BaseComputeSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s.computeSecrets } -func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { +func UnmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) return out, nil } - out := RawComputeSecretsImpl{ - Type: value, - Values: temp, + var parent BaseComputeSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeSecretsImpl: %+v", err) } - return out, nil + + return RawComputeSecretsImpl{ + computeSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databricks.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databricks.go index 3018dda2dea..6ead8d21e03 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databricks.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databricks.go @@ -17,7 +17,9 @@ type Databricks struct { Properties *DatabricksProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Databricks struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Databricks) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Databricks) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Databricks) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Databricks: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databrickscomputesecrets.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databrickscomputesecrets.go index 8beb9215889..c076e457360 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databrickscomputesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_databrickscomputesecrets.go @@ -14,6 +14,14 @@ type DatabricksComputeSecrets struct { DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s DatabricksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = DatabricksComputeSecrets{} @@ -27,9 +35,10 @@ func (s DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksComputeSecrets: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datafactory.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datafactory.go index 25a38345b02..bd37468d428 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datafactory.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datafactory.go @@ -16,7 +16,9 @@ var _ Compute = DataFactory{} type DataFactory struct { // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -27,6 +29,21 @@ type DataFactory struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataFactory) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataFactory) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -62,9 +79,10 @@ func (s DataFactory) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataFactory: %+v", err) } + decoded["computeType"] = "DataFactory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datalakeanalytics.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datalakeanalytics.go index 346316396bd..9c304ddb04e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datalakeanalytics.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_datalakeanalytics.go @@ -17,7 +17,9 @@ type DataLakeAnalytics struct { Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type DataLakeAnalytics struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataLakeAnalytics) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataLakeAnalytics) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s DataLakeAnalytics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataLakeAnalytics: %+v", err) } + decoded["computeType"] = "DataLakeAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_hdinsight.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_hdinsight.go index d0034c74c63..4e043b808fb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_hdinsight.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_hdinsight.go @@ -17,7 +17,9 @@ type HDInsight struct { Properties *HDInsightProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type HDInsight struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s HDInsight) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *HDInsight) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s HDInsight) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsight: %+v", err) } + decoded["computeType"] = "HDInsight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_kubernetes.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_kubernetes.go index 7818fb5fdf9..f74ac98dbde 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_kubernetes.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_kubernetes.go @@ -17,7 +17,9 @@ type Kubernetes struct { Properties *KubernetesProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Kubernetes struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Kubernetes) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Kubernetes) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Kubernetes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Kubernetes: %+v", err) } + decoded["computeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_synapsespark.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_synapsespark.go index 494454096ea..54cc3af0202 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_synapsespark.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_synapsespark.go @@ -17,7 +17,9 @@ type SynapseSpark struct { Properties *SynapseSparkProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type SynapseSpark struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s SynapseSpark) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *SynapseSpark) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s SynapseSpark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseSpark: %+v", err) } + decoded["computeType"] = "SynapseSpark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachine.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachine.go index 6a07ffd4f6e..5ab5de8c18f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachine.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachine.go @@ -17,7 +17,9 @@ type VirtualMachine struct { Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type VirtualMachine struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s VirtualMachine) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *VirtualMachine) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s VirtualMachine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachine: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachinesecrets.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachinesecrets.go index 9db81884f8f..b31384b4a2e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachinesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/model_virtualmachinesecrets.go @@ -14,6 +14,14 @@ type VirtualMachineSecrets struct { AdministratorAccount *VirtualMachineSshCredentials `json:"administratorAccount,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s VirtualMachineSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = VirtualMachineSecrets{} @@ -27,9 +35,10 @@ func (s VirtualMachineSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineSecrets: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/version.go b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/version.go index 317da010a62..052dae914ae 100644 --- a/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/machinelearningcomputes/version.go @@ -1,12 +1,10 @@ package machinelearningcomputes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinelearningcomputes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinelearningcomputes/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/README.md b/resource-manager/machinelearningservices/2024-04-01/managednetwork/README.md index 6ab495a888f..59cc1b9d681 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/managednetwork` Documentation -The `managednetwork` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `managednetwork` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/client.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/client.go index 6313700a6ea..7167dbc42a4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/client.go @@ -15,7 +15,7 @@ type ManagedNetworkClient struct { } func NewManagedNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managednetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managednetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedNetworkClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_outboundrule.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_outboundrule.go index e8f379567d6..0734954dbe6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_outboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_workspace.go index cd60cc5e74a..d116c084b63 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/method_settingsruleget.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/method_settingsruleget.go index 87f7ac2e344..d9e4990d783 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/method_settingsruleget.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/method_settingsruleget.go @@ -45,7 +45,6 @@ func (c ManagedNetworkClient) SettingsRuleGet(ctx context.Context, id OutboundRu var model OutboundRuleBasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_fqdnoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_fqdnoutboundrule.go index 70921895572..c68f41f0977 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_fqdnoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_fqdnoutboundrule.go @@ -14,8 +14,18 @@ type FqdnOutboundRule struct { Destination *string `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s FqdnOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = FqdnOutboundRule{} @@ -29,9 +39,10 @@ func (s FqdnOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FqdnOutboundRule: %+v", err) } + decoded["type"] = "FQDN" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrule.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrule.go index 8e5529b02dc..ad446182da9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutboundRule interface { + OutboundRule() BaseOutboundRuleImpl } -// RawOutboundRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutboundRule = BaseOutboundRuleImpl{} + +type BaseOutboundRuleImpl struct { + Category *RuleCategory `json:"category,omitempty"` + Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s BaseOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s +} + +var _ OutboundRule = RawOutboundRuleImpl{} + +// RawOutboundRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutboundRuleImpl struct { - Type string - Values map[string]interface{} + outboundRule BaseOutboundRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s.outboundRule } -func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { +func UnmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { return out, nil } - out := RawOutboundRuleImpl{ - Type: value, - Values: temp, + var parent BaseOutboundRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutboundRuleImpl: %+v", err) } - return out, nil + + return RawOutboundRuleImpl{ + outboundRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrulebasicresource.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrulebasicresource.go index 8c333ed73f1..05517c0bf9f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrulebasicresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_outboundrulebasicresource.go @@ -38,7 +38,7 @@ func (s *OutboundRuleBasicResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalOutboundRuleImplementation(v) + impl, err := UnmarshalOutboundRuleImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'OutboundRuleBasicResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_privateendpointoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_privateendpointoutboundrule.go index da6f88ed30c..6bda20dd829 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_privateendpointoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_privateendpointoutboundrule.go @@ -14,8 +14,18 @@ type PrivateEndpointOutboundRule struct { Destination *PrivateEndpointDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s PrivateEndpointOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = PrivateEndpointOutboundRule{} @@ -29,9 +39,10 @@ func (s PrivateEndpointOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrivateEndpointOutboundRule: %+v", err) } + decoded["type"] = "PrivateEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_servicetagoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_servicetagoutboundrule.go index 2bb23ca8815..268a1b09c83 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_servicetagoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/model_servicetagoutboundrule.go @@ -14,8 +14,18 @@ type ServiceTagOutboundRule struct { Destination *ServiceTagDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s ServiceTagOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = ServiceTagOutboundRule{} @@ -29,9 +39,10 @@ func (s ServiceTagOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceTagOutboundRule: %+v", err) } + decoded["type"] = "ServiceTag" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/managednetwork/version.go b/resource-manager/machinelearningservices/2024-04-01/managednetwork/version.go index 61486bdd225..178ee734db3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/managednetwork/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/managednetwork/version.go @@ -1,12 +1,10 @@ package managednetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managednetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managednetwork/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/README.md b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/README.md index 250559a79ca..c4a8aecf116 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription` Documentation -The `marketplacesubscription` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `marketplacesubscription` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/client.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/client.go index a4d2d7eb660..87f641f00f2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/client.go @@ -15,7 +15,7 @@ type MarketplaceSubscriptionClient struct { } func NewMarketplaceSubscriptionClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplaceSubscriptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplacesubscription", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplacesubscription", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplaceSubscriptionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_marketplacesubscription.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_marketplacesubscription.go index bb5010cb332..f8d629aa994 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_marketplacesubscription.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_marketplacesubscription.go @@ -44,7 +44,7 @@ func ParseMarketplaceSubscriptionID(input string) (*MarketplaceSubscriptionId, e } id := MarketplaceSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMarketplaceSubscriptionIDInsensitively(input string) (*MarketplaceSubs } id := MarketplaceSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_workspace.go index a54cd81b56b..88e9d20738a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_get.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_get.go index 0566a37fd68..4cb6d762e69 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_get.go @@ -45,7 +45,6 @@ func (c MarketplaceSubscriptionClient) Get(ctx context.Context, id MarketplaceSu var model MarketplaceSubscriptionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_list.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_list.go index 399db017241..65cac65016e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/version.go b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/version.go index fa8fbe92f2f..e5c70ccdc06 100644 --- a/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/marketplacesubscription/version.go @@ -1,12 +1,10 @@ package marketplacesubscription -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplacesubscription/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplacesubscription/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/README.md b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/README.md index 68e1748c91d..a829160b9b2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/modelcontainer` Documentation -The `modelcontainer` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `modelcontainer` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/client.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/client.go index e5a4767f83d..3404b406aa0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/client.go @@ -15,7 +15,7 @@ type ModelContainerClient struct { } func NewModelContainerClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelContainerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "modelcontainer", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "modelcontainer", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelContainerClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_model.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_model.go index 5b7ff94b3d2..cc0922c2b9f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_model.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_model.go @@ -44,7 +44,7 @@ func ParseModelID(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModelIDInsensitively(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registry.go index a895c841c79..c97902ab652 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registrymodel.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registrymodel.go index 8144a7fad2a..3ca78e4dbc9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registrymodel.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_registrymodel.go @@ -44,7 +44,7 @@ func ParseRegistryModelID(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryModelIDInsensitively(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_workspace.go index 7d43d27798d..8ed35e0c7f8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_createorupdate.go index d0d3f9a863b..e1041569d1c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModelContainerClient) CreateOrUpdate(ctx context.Context, id ModelId, in var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_get.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_get.go index 515341b3c5b..66adb267096 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_get.go @@ -45,7 +45,6 @@ func (c ModelContainerClient) Get(ctx context.Context, id ModelId) (result GetOp var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_list.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_list.go index 84e5cb5e7bd..2eaced29d85 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainersget.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainersget.go index 230a1b45124..d8458035545 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainersget.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainersget.go @@ -45,7 +45,6 @@ func (c ModelContainerClient) RegistryModelContainersGet(ctx context.Context, id var model ModelContainerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainerslist.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainerslist.go index ea94cac36d1..d01d18bbd84 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainerslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/method_registrymodelcontainerslist.go @@ -40,6 +40,7 @@ func (o RegistryModelContainersListOperationOptions) ToHeaders() *client.Headers func (o RegistryModelContainersListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/version.go b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/version.go index 1fa95efcde3..762ea27b989 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelcontainer/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelcontainer/version.go @@ -1,12 +1,10 @@ package modelcontainer -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/modelcontainer/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/modelcontainer/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/README.md b/resource-manager/machinelearningservices/2024-04-01/modelversion/README.md index cd2d93863e8..b7406d22c24 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/modelversion` Documentation -The `modelversion` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `modelversion` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/client.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/client.go index c0da321d0e5..f2b5e5fa8c2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/client.go @@ -15,7 +15,7 @@ type ModelVersionClient struct { } func NewModelVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ModelVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "modelversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "modelversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ModelVersionClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_model.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_model.go index 3c0be9426a5..0885f3b10d1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_model.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_model.go @@ -44,7 +44,7 @@ func ParseModelID(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseModelIDInsensitively(input string) (*ModelId, error) { } id := ModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_modelversion.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_modelversion.go index 93794ec428f..23014727b4c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_modelversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_modelversion.go @@ -46,7 +46,7 @@ func ParseModelVersionID(input string) (*ModelVersionId, error) { } id := ModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModelVersionIDInsensitively(input string) (*ModelVersionId, error) { } id := ModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodel.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodel.go index 5a94130f392..4d6249dc4a2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodel.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodel.go @@ -44,7 +44,7 @@ func ParseRegistryModelID(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegistryModelIDInsensitively(input string) (*RegistryModelId, error) { } id := RegistryModelId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodelversion.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodelversion.go index a829580d0df..cfc47eb832a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodelversion.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/id_registrymodelversion.go @@ -46,7 +46,7 @@ func ParseRegistryModelVersionID(input string) (*RegistryModelVersionId, error) } id := RegistryModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRegistryModelVersionIDInsensitively(input string) (*RegistryModelVersi } id := RegistryModelVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_createorupdate.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_createorupdate.go index d51569f2055..0f6670fb5dd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_createorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ModelVersionClient) CreateOrUpdate(ctx context.Context, id ModelVersionI var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_get.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_get.go index c26f26ba2a5..4e318f7353e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_get.go @@ -45,7 +45,6 @@ func (c ModelVersionClient) Get(ctx context.Context, id ModelVersionId) (result var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_list.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_list.go index ab7c9714135..11f72b9413b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_list.go @@ -48,6 +48,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go index 2e3aab0c47a..c79401b3454 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionscreateorgetstartpendingupload.go @@ -50,7 +50,6 @@ func (c ModelVersionClient) RegistryModelVersionsCreateOrGetStartPendingUpload(c var model PendingUploadResponseDto result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionsget.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionsget.go index 23f8c162b30..e0a77444a2f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionsget.go @@ -45,7 +45,6 @@ func (c ModelVersionClient) RegistryModelVersionsGet(ctx context.Context, id Reg var model ModelVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionslist.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionslist.go index 5234afd2cdb..38d74637469 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/method_registrymodelversionslist.go @@ -46,6 +46,7 @@ func (o RegistryModelVersionsListOperationOptions) ToHeaders() *client.Headers { func (o RegistryModelVersionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_blobreferenceforconsumptiondto.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_blobreferenceforconsumptiondto.go index a810f7af00f..4eced688c3d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_blobreferenceforconsumptiondto.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_blobreferenceforconsumptiondto.go @@ -32,7 +32,7 @@ func (s *BlobReferenceForConsumptionDto) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["credential"]; ok { - impl, err := unmarshalPendingUploadCredentialDtoImplementation(v) + impl, err := UnmarshalPendingUploadCredentialDtoImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Credential' for 'BlobReferenceForConsumptionDto': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_pendinguploadcredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_pendinguploadcredentialdto.go index de22fe14dc1..14e1bc5d8a1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_pendinguploadcredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_pendinguploadcredentialdto.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PendingUploadCredentialDto interface { + PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl } -// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PendingUploadCredentialDto = BasePendingUploadCredentialDtoImpl{} + +type BasePendingUploadCredentialDtoImpl struct { + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s BasePendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s +} + +var _ PendingUploadCredentialDto = RawPendingUploadCredentialDtoImpl{} + +// RawPendingUploadCredentialDtoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPendingUploadCredentialDtoImpl struct { - Type string - Values map[string]interface{} + pendingUploadCredentialDto BasePendingUploadCredentialDtoImpl + Type string + Values map[string]interface{} +} + +func (s RawPendingUploadCredentialDtoImpl) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return s.pendingUploadCredentialDto } -func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { +func UnmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUploadCredentialDto, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalPendingUploadCredentialDtoImplementation(input []byte) (PendingUpl return out, nil } - out := RawPendingUploadCredentialDtoImpl{ - Type: value, - Values: temp, + var parent BasePendingUploadCredentialDtoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePendingUploadCredentialDtoImpl: %+v", err) } - return out, nil + + return RawPendingUploadCredentialDtoImpl{ + pendingUploadCredentialDto: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_sascredentialdto.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_sascredentialdto.go index b77ee0d3590..1c8b88412fc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/model_sascredentialdto.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/model_sascredentialdto.go @@ -14,6 +14,14 @@ type SASCredentialDto struct { SasUri *string `json:"sasUri,omitempty"` // Fields inherited from PendingUploadCredentialDto + + CredentialType PendingUploadCredentialType `json:"credentialType"` +} + +func (s SASCredentialDto) PendingUploadCredentialDto() BasePendingUploadCredentialDtoImpl { + return BasePendingUploadCredentialDtoImpl{ + CredentialType: s.CredentialType, + } } var _ json.Marshaler = SASCredentialDto{} @@ -27,9 +35,10 @@ func (s SASCredentialDto) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASCredentialDto: %+v", err) } + decoded["credentialType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/modelversion/version.go b/resource-manager/machinelearningservices/2024-04-01/modelversion/version.go index 49d0e72804b..4c9c0c53a92 100644 --- a/resource-manager/machinelearningservices/2024-04-01/modelversion/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/modelversion/version.go @@ -1,12 +1,10 @@ package modelversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/modelversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/modelversion/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/README.md b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/README.md index 451d007b9a0..e079a9956d5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/onlinedeployment` Documentation -The `onlinedeployment` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `onlinedeployment` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/client.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/client.go index 6fabd7b2eac..b89f27bf3fc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/client.go @@ -15,7 +15,7 @@ type OnlineDeploymentClient struct { } func NewOnlineDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*OnlineDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "onlinedeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "onlinedeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OnlineDeploymentClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpoint.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpoint.go index eab70ce70fb..2b7367360d7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpoint.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpoint.go @@ -44,7 +44,7 @@ func ParseOnlineEndpointID(input string) (*OnlineEndpointId, error) { } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnlineEndpointIDInsensitively(input string) (*OnlineEndpointId, error) } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpointdeployment.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpointdeployment.go index 0f6df020655..9ea7a41b649 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpointdeployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/id_onlineendpointdeployment.go @@ -46,7 +46,7 @@ func ParseOnlineEndpointDeploymentID(input string) (*OnlineEndpointDeploymentId, } id := OnlineEndpointDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOnlineEndpointDeploymentIDInsensitively(input string) (*OnlineEndpoint } id := OnlineEndpointDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_get.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_get.go index c17bbaac35b..a10bc75e646 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_get.go @@ -45,7 +45,6 @@ func (c OnlineDeploymentClient) Get(ctx context.Context, id OnlineEndpointDeploy var model OnlineDeploymentTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_getlogs.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_getlogs.go index 66a61739fab..7e9e4964bc6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_getlogs.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_getlogs.go @@ -50,7 +50,6 @@ func (c OnlineDeploymentClient) GetLogs(ctx context.Context, id OnlineEndpointDe var model DeploymentLogs result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_list.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_list.go index 774531ae70e..3b219f5d0e6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_listskus.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_listskus.go index 234177e825c..f2374db32ae 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_listskus.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/method_listskus.go @@ -40,6 +40,7 @@ func (o ListSkusOperationOptions) ToHeaders() *client.Headers { func (o ListSkusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_defaultscalesettings.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_defaultscalesettings.go index 511291a2736..6235621a9a2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_defaultscalesettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_defaultscalesettings.go @@ -13,6 +13,14 @@ var _ OnlineScaleSettings = DefaultScaleSettings{} type DefaultScaleSettings struct { // Fields inherited from OnlineScaleSettings + + ScaleType ScaleType `json:"scaleType"` +} + +func (s DefaultScaleSettings) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return BaseOnlineScaleSettingsImpl{ + ScaleType: s.ScaleType, + } } var _ json.Marshaler = DefaultScaleSettings{} @@ -26,9 +34,10 @@ func (s DefaultScaleSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultScaleSettings: %+v", err) } + decoded["scaleType"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_kubernetesonlinedeployment.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_kubernetesonlinedeployment.go index 29dda97a48d..4cfee261458 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_kubernetesonlinedeployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_kubernetesonlinedeployment.go @@ -14,11 +14,13 @@ type KubernetesOnlineDeployment struct { ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` // Fields inherited from OnlineDeployment + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` DataCollector *DataCollector `json:"dataCollector,omitempty"` Description *string `json:"description,omitempty"` EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` EnvironmentId *string `json:"environmentId,omitempty"` EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` InstanceType *string `json:"instanceType,omitempty"` @@ -32,6 +34,28 @@ type KubernetesOnlineDeployment struct { ScaleSettings OnlineScaleSettings `json:"scaleSettings"` } +func (s KubernetesOnlineDeployment) OnlineDeployment() BaseOnlineDeploymentImpl { + return BaseOnlineDeploymentImpl{ + AppInsightsEnabled: s.AppInsightsEnabled, + CodeConfiguration: s.CodeConfiguration, + DataCollector: s.DataCollector, + Description: s.Description, + EgressPublicNetworkAccess: s.EgressPublicNetworkAccess, + EndpointComputeType: s.EndpointComputeType, + EnvironmentId: s.EnvironmentId, + EnvironmentVariables: s.EnvironmentVariables, + InstanceType: s.InstanceType, + LivenessProbe: s.LivenessProbe, + Model: s.Model, + ModelMountPath: s.ModelMountPath, + Properties: s.Properties, + ProvisioningState: s.ProvisioningState, + ReadinessProbe: s.ReadinessProbe, + RequestSettings: s.RequestSettings, + ScaleSettings: s.ScaleSettings, + } +} + var _ json.Marshaler = KubernetesOnlineDeployment{} func (s KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { @@ -43,9 +67,10 @@ func (s KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KubernetesOnlineDeployment: %+v", err) } + decoded["endpointComputeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) @@ -71,6 +96,7 @@ func (s *KubernetesOnlineDeployment) UnmarshalJSON(bytes []byte) error { s.DataCollector = decoded.DataCollector s.Description = decoded.Description s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType s.EnvironmentId = decoded.EnvironmentId s.EnvironmentVariables = decoded.EnvironmentVariables s.InstanceType = decoded.InstanceType @@ -88,7 +114,7 @@ func (s *KubernetesOnlineDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scaleSettings"]; ok { - impl, err := unmarshalOnlineScaleSettingsImplementation(v) + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'KubernetesOnlineDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_managedonlinedeployment.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_managedonlinedeployment.go index 28de2da976c..b470d479560 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_managedonlinedeployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_managedonlinedeployment.go @@ -13,11 +13,13 @@ var _ OnlineDeployment = ManagedOnlineDeployment{} type ManagedOnlineDeployment struct { // Fields inherited from OnlineDeployment + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` DataCollector *DataCollector `json:"dataCollector,omitempty"` Description *string `json:"description,omitempty"` EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` EnvironmentId *string `json:"environmentId,omitempty"` EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` InstanceType *string `json:"instanceType,omitempty"` @@ -31,6 +33,28 @@ type ManagedOnlineDeployment struct { ScaleSettings OnlineScaleSettings `json:"scaleSettings"` } +func (s ManagedOnlineDeployment) OnlineDeployment() BaseOnlineDeploymentImpl { + return BaseOnlineDeploymentImpl{ + AppInsightsEnabled: s.AppInsightsEnabled, + CodeConfiguration: s.CodeConfiguration, + DataCollector: s.DataCollector, + Description: s.Description, + EgressPublicNetworkAccess: s.EgressPublicNetworkAccess, + EndpointComputeType: s.EndpointComputeType, + EnvironmentId: s.EnvironmentId, + EnvironmentVariables: s.EnvironmentVariables, + InstanceType: s.InstanceType, + LivenessProbe: s.LivenessProbe, + Model: s.Model, + ModelMountPath: s.ModelMountPath, + Properties: s.Properties, + ProvisioningState: s.ProvisioningState, + ReadinessProbe: s.ReadinessProbe, + RequestSettings: s.RequestSettings, + ScaleSettings: s.ScaleSettings, + } +} + var _ json.Marshaler = ManagedOnlineDeployment{} func (s ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { @@ -42,9 +66,10 @@ func (s ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedOnlineDeployment: %+v", err) } + decoded["endpointComputeType"] = "Managed" encoded, err = json.Marshal(decoded) @@ -69,6 +94,7 @@ func (s *ManagedOnlineDeployment) UnmarshalJSON(bytes []byte) error { s.DataCollector = decoded.DataCollector s.Description = decoded.Description s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType s.EnvironmentId = decoded.EnvironmentId s.EnvironmentVariables = decoded.EnvironmentVariables s.InstanceType = decoded.InstanceType @@ -86,7 +112,7 @@ func (s *ManagedOnlineDeployment) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scaleSettings"]; ok { - impl, err := unmarshalOnlineScaleSettingsImplementation(v) + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'ManagedOnlineDeployment': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeployment.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeployment.go index c08c6049017..da6203378d1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeployment.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeployment.go @@ -10,18 +10,92 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OnlineDeployment interface { + OnlineDeployment() BaseOnlineDeploymentImpl } -// RawOnlineDeploymentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OnlineDeployment = BaseOnlineDeploymentImpl{} + +type BaseOnlineDeploymentImpl struct { + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + DataCollector *DataCollector `json:"dataCollector,omitempty"` + Description *string `json:"description,omitempty"` + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + EndpointComputeType EndpointComputeType `json:"endpointComputeType"` + EnvironmentId *string `json:"environmentId,omitempty"` + EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` + InstanceType *string `json:"instanceType,omitempty"` + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + Model *string `json:"model,omitempty"` + ModelMountPath *string `json:"modelMountPath,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty"` + ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + ScaleSettings OnlineScaleSettings `json:"scaleSettings"` +} + +func (s BaseOnlineDeploymentImpl) OnlineDeployment() BaseOnlineDeploymentImpl { + return s +} + +var _ OnlineDeployment = RawOnlineDeploymentImpl{} + +// RawOnlineDeploymentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOnlineDeploymentImpl struct { - Type string - Values map[string]interface{} + onlineDeployment BaseOnlineDeploymentImpl + Type string + Values map[string]interface{} +} + +func (s RawOnlineDeploymentImpl) OnlineDeployment() BaseOnlineDeploymentImpl { + return s.onlineDeployment } -func unmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, error) { +var _ json.Unmarshaler = &BaseOnlineDeploymentImpl{} + +func (s *BaseOnlineDeploymentImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseOnlineDeploymentImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseOnlineDeploymentImpl: %+v", err) + } + + s.AppInsightsEnabled = decoded.AppInsightsEnabled + s.CodeConfiguration = decoded.CodeConfiguration + s.DataCollector = decoded.DataCollector + s.Description = decoded.Description + s.EgressPublicNetworkAccess = decoded.EgressPublicNetworkAccess + s.EndpointComputeType = decoded.EndpointComputeType + s.EnvironmentId = decoded.EnvironmentId + s.EnvironmentVariables = decoded.EnvironmentVariables + s.InstanceType = decoded.InstanceType + s.LivenessProbe = decoded.LivenessProbe + s.Model = decoded.Model + s.ModelMountPath = decoded.ModelMountPath + s.Properties = decoded.Properties + s.ProvisioningState = decoded.ProvisioningState + s.ReadinessProbe = decoded.ReadinessProbe + s.RequestSettings = decoded.RequestSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseOnlineDeploymentImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["scaleSettings"]; ok { + impl, err := UnmarshalOnlineScaleSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ScaleSettings' for 'BaseOnlineDeploymentImpl': %+v", err) + } + s.ScaleSettings = impl + } + return nil +} + +func UnmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, error) { if input == nil { return nil, nil } @@ -52,10 +126,15 @@ func unmarshalOnlineDeploymentImplementation(input []byte) (OnlineDeployment, er return out, nil } - out := RawOnlineDeploymentImpl{ - Type: value, - Values: temp, + var parent BaseOnlineDeploymentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOnlineDeploymentImpl: %+v", err) } - return out, nil + + return RawOnlineDeploymentImpl{ + onlineDeployment: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeploymenttrackedresource.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeploymenttrackedresource.go index 40ca1d834a4..42bc9215f53 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeploymenttrackedresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinedeploymenttrackedresource.go @@ -49,7 +49,7 @@ func (s *OnlineDeploymentTrackedResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalOnlineDeploymentImplementation(v) + impl, err := UnmarshalOnlineDeploymentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'OnlineDeploymentTrackedResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinescalesettings.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinescalesettings.go index 50bf9a5fdd4..bd1cfe7fc32 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinescalesettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_onlinescalesettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OnlineScaleSettings interface { + OnlineScaleSettings() BaseOnlineScaleSettingsImpl } -// RawOnlineScaleSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OnlineScaleSettings = BaseOnlineScaleSettingsImpl{} + +type BaseOnlineScaleSettingsImpl struct { + ScaleType ScaleType `json:"scaleType"` +} + +func (s BaseOnlineScaleSettingsImpl) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return s +} + +var _ OnlineScaleSettings = RawOnlineScaleSettingsImpl{} + +// RawOnlineScaleSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOnlineScaleSettingsImpl struct { - Type string - Values map[string]interface{} + onlineScaleSettings BaseOnlineScaleSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawOnlineScaleSettingsImpl) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return s.onlineScaleSettings } -func unmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettings, error) { +func UnmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettings, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalOnlineScaleSettingsImplementation(input []byte) (OnlineScaleSettin return out, nil } - out := RawOnlineScaleSettingsImpl{ - Type: value, - Values: temp, + var parent BaseOnlineScaleSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOnlineScaleSettingsImpl: %+v", err) } - return out, nil + + return RawOnlineScaleSettingsImpl{ + onlineScaleSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_targetutilizationscalesettings.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_targetutilizationscalesettings.go index 4e357eade94..0dce1012760 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_targetutilizationscalesettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/model_targetutilizationscalesettings.go @@ -17,6 +17,14 @@ type TargetUtilizationScaleSettings struct { TargetUtilizationPercentage *int64 `json:"targetUtilizationPercentage,omitempty"` // Fields inherited from OnlineScaleSettings + + ScaleType ScaleType `json:"scaleType"` +} + +func (s TargetUtilizationScaleSettings) OnlineScaleSettings() BaseOnlineScaleSettingsImpl { + return BaseOnlineScaleSettingsImpl{ + ScaleType: s.ScaleType, + } } var _ json.Marshaler = TargetUtilizationScaleSettings{} @@ -30,9 +38,10 @@ func (s TargetUtilizationScaleSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TargetUtilizationScaleSettings: %+v", err) } + decoded["scaleType"] = "TargetUtilization" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/version.go b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/version.go index 8a22e906cda..25fc371e035 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlinedeployment/version.go @@ -1,12 +1,10 @@ package onlinedeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/onlinedeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/onlinedeployment/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/README.md b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/README.md index 0e508584666..2f9f6dc29d6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/onlineendpoint` Documentation -The `onlineendpoint` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `onlineendpoint` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/client.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/client.go index bfe50dea25a..9dfb0f561b5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/client.go @@ -15,7 +15,7 @@ type OnlineEndpointClient struct { } func NewOnlineEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*OnlineEndpointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "onlineendpoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "onlineendpoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OnlineEndpointClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_onlineendpoint.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_onlineendpoint.go index 0953363e068..7059ae3b054 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_onlineendpoint.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_onlineendpoint.go @@ -44,7 +44,7 @@ func ParseOnlineEndpointID(input string) (*OnlineEndpointId, error) { } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnlineEndpointIDInsensitively(input string) (*OnlineEndpointId, error) } id := OnlineEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_workspace.go index daa5f35d554..252cdc13d9c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_get.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_get.go index f4df3fadd87..254cebaf565 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_get.go @@ -45,7 +45,6 @@ func (c OnlineEndpointClient) Get(ctx context.Context, id OnlineEndpointId) (res var model OnlineEndpointTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_gettoken.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_gettoken.go index 3ddda6b8f99..50eb0738bd0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_gettoken.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_gettoken.go @@ -46,7 +46,6 @@ func (c OnlineEndpointClient) GetToken(ctx context.Context, id OnlineEndpointId) var model EndpointAuthToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_list.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_list.go index 74f48048e6f..77f9a3cfe7a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_listkeys.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_listkeys.go index 2aa5bcafd35..840db4430f9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_listkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/method_listkeys.go @@ -46,7 +46,6 @@ func (c OnlineEndpointClient) ListKeys(ctx context.Context, id OnlineEndpointId) var model EndpointAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/version.go b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/version.go index 876e58a72c7..fa3a5382737 100644 --- a/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/onlineendpoint/version.go @@ -1,12 +1,10 @@ package onlineendpoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/onlineendpoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/onlineendpoint/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/README.md b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/README.md index d67eb446331..63ab89fce5b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters` Documentation -The `operationalizationclusters` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `operationalizationclusters` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/client.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/client.go index c7db3d360c6..e140b29868a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/client.go @@ -15,7 +15,7 @@ type OperationalizationClustersClient struct { } func NewOperationalizationClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationalizationClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationalizationclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationalizationclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationalizationClustersClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_compute.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_compute.go index 07c80d054ec..7ecaa87da01 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_compute.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_compute.go @@ -44,7 +44,7 @@ func ParseComputeID(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseComputeIDInsensitively(input string) (*ComputeId, error) { } id := ComputeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_workspace.go index 4b38e48dcb5..d5808c41ba7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computedelete.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computedelete.go index 242131278ac..d46fe834b40 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computedelete.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computedelete.go @@ -36,6 +36,7 @@ func (o ComputeDeleteOperationOptions) ToHeaders() *client.Headers { func (o ComputeDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computeget.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computeget.go index 524f25ec91d..c0ce1ba6495 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computeget.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computeget.go @@ -45,7 +45,6 @@ func (c OperationalizationClustersClient) ComputeGet(ctx context.Context, id Com var model ComputeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelist.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelist.go index f75e45f3e01..38b0660ec9d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelist.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelist.go @@ -39,6 +39,7 @@ func (o ComputeListOperationOptions) ToHeaders() *client.Headers { func (o ComputeListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelistkeys.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelistkeys.go index 03496fa6064..c1e42e81440 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelistkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/method_computelistkeys.go @@ -16,7 +16,7 @@ import ( type ComputeListKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ComputeSecrets + Model ComputeSecrets } // ComputeListKeys ... @@ -49,11 +49,11 @@ func (c OperationalizationClustersClient) ComputeListKeys(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalComputeSecretsImplementation(respObj) + model, err := UnmarshalComputeSecretsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_aks.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_aks.go index 366a1e3d943..d9368b9a2c1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_aks.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_aks.go @@ -17,7 +17,9 @@ type AKS struct { Properties *AKSSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AKS struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AKS) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AKS) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AKS) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AKS: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_akscomputesecrets.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_akscomputesecrets.go index 993bc7e0ad7..319acdc49ad 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_akscomputesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_akscomputesecrets.go @@ -16,6 +16,14 @@ type AksComputeSecrets struct { UserKubeConfig *string `json:"userKubeConfig,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s AksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = AksComputeSecrets{} @@ -29,9 +37,10 @@ func (s AksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AksComputeSecrets: %+v", err) } + decoded["computeType"] = "AKS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_amlcompute.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_amlcompute.go index 6dff6bff4c8..7d90546a442 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_amlcompute.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_amlcompute.go @@ -17,7 +17,9 @@ type AmlCompute struct { Properties *AmlComputeProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type AmlCompute struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s AmlCompute) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *AmlCompute) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s AmlCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlCompute: %+v", err) } + decoded["computeType"] = "AmlCompute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_compute.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_compute.go index 7bb62ac2037..2d3f6407baa 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_compute.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_compute.go @@ -10,18 +10,44 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Compute interface { + Compute() BaseComputeImpl } -// RawComputeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Compute = BaseComputeImpl{} + +type BaseComputeImpl struct { + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` + CreatedOn *string `json:"createdOn,omitempty"` + Description *string `json:"description,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"` + ModifiedOn *string `json:"modifiedOn,omitempty"` + ProvisioningErrors *[]ErrorResponse `json:"provisioningErrors,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` +} + +func (s BaseComputeImpl) Compute() BaseComputeImpl { + return s +} + +var _ Compute = RawComputeImpl{} + +// RawComputeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeImpl struct { - Type string - Values map[string]interface{} + compute BaseComputeImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeImpl) Compute() BaseComputeImpl { + return s.compute } -func unmarshalComputeImplementation(input []byte) (Compute, error) { +func UnmarshalComputeImplementation(input []byte) (Compute, error) { if input == nil { return nil, nil } @@ -116,10 +142,15 @@ func unmarshalComputeImplementation(input []byte) (Compute, error) { return out, nil } - out := RawComputeImpl{ - Type: value, - Values: temp, + var parent BaseComputeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeImpl: %+v", err) } - return out, nil + + return RawComputeImpl{ + compute: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeinstance.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeinstance.go index 91f0a9be988..27962037197 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeinstance.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeinstance.go @@ -17,7 +17,9 @@ type ComputeInstance struct { Properties *ComputeInstanceProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type ComputeInstance struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s ComputeInstance) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *ComputeInstance) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s ComputeInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ComputeInstance: %+v", err) } + decoded["computeType"] = "ComputeInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeresource.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeresource.go index 878f2f3e984..a736b6a197e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computeresource.go @@ -47,7 +47,7 @@ func (s *ComputeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalComputeImplementation(v) + impl, err := UnmarshalComputeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ComputeResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computesecrets.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computesecrets.go index 1cbb5ff92ce..8fe71533927 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_computesecrets.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ComputeSecrets interface { + ComputeSecrets() BaseComputeSecretsImpl } -// RawComputeSecretsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ComputeSecrets = BaseComputeSecretsImpl{} + +type BaseComputeSecretsImpl struct { + ComputeType ComputeType `json:"computeType"` +} + +func (s BaseComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s +} + +var _ ComputeSecrets = RawComputeSecretsImpl{} + +// RawComputeSecretsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawComputeSecretsImpl struct { - Type string - Values map[string]interface{} + computeSecrets BaseComputeSecretsImpl + Type string + Values map[string]interface{} +} + +func (s RawComputeSecretsImpl) ComputeSecrets() BaseComputeSecretsImpl { + return s.computeSecrets } -func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { +func UnmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalComputeSecretsImplementation(input []byte) (ComputeSecrets, error) return out, nil } - out := RawComputeSecretsImpl{ - Type: value, - Values: temp, + var parent BaseComputeSecretsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseComputeSecretsImpl: %+v", err) } - return out, nil + + return RawComputeSecretsImpl{ + computeSecrets: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databricks.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databricks.go index 7efc51f8e41..39d8cae90ae 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databricks.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databricks.go @@ -17,7 +17,9 @@ type Databricks struct { Properties *DatabricksProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Databricks struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Databricks) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Databricks) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Databricks) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Databricks: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databrickscomputesecrets.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databrickscomputesecrets.go index 3b4166be9be..94994c59bfc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databrickscomputesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_databrickscomputesecrets.go @@ -14,6 +14,14 @@ type DatabricksComputeSecrets struct { DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s DatabricksComputeSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = DatabricksComputeSecrets{} @@ -27,9 +35,10 @@ func (s DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DatabricksComputeSecrets: %+v", err) } + decoded["computeType"] = "Databricks" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datafactory.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datafactory.go index 5a10a200fdd..def0dd5a5f4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datafactory.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datafactory.go @@ -16,7 +16,9 @@ var _ Compute = DataFactory{} type DataFactory struct { // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -27,6 +29,21 @@ type DataFactory struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataFactory) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataFactory) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -62,9 +79,10 @@ func (s DataFactory) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataFactory: %+v", err) } + decoded["computeType"] = "DataFactory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datalakeanalytics.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datalakeanalytics.go index 5966a34ce57..816904cf145 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datalakeanalytics.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_datalakeanalytics.go @@ -17,7 +17,9 @@ type DataLakeAnalytics struct { Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type DataLakeAnalytics struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s DataLakeAnalytics) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *DataLakeAnalytics) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s DataLakeAnalytics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataLakeAnalytics: %+v", err) } + decoded["computeType"] = "DataLakeAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_hdinsight.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_hdinsight.go index 7ba996dbefc..28c33c4be11 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_hdinsight.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_hdinsight.go @@ -17,7 +17,9 @@ type HDInsight struct { Properties *HDInsightProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type HDInsight struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s HDInsight) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *HDInsight) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s HDInsight) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HDInsight: %+v", err) } + decoded["computeType"] = "HDInsight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_kubernetes.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_kubernetes.go index 0850e112c47..8cabecbafdb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_kubernetes.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_kubernetes.go @@ -17,7 +17,9 @@ type Kubernetes struct { Properties *KubernetesProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type Kubernetes struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s Kubernetes) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *Kubernetes) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s Kubernetes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Kubernetes: %+v", err) } + decoded["computeType"] = "Kubernetes" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_synapsespark.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_synapsespark.go index 0675f24116d..e48bdb81c9e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_synapsespark.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_synapsespark.go @@ -17,7 +17,9 @@ type SynapseSpark struct { Properties *SynapseSparkProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type SynapseSpark struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s SynapseSpark) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *SynapseSpark) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s SynapseSpark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SynapseSpark: %+v", err) } + decoded["computeType"] = "SynapseSpark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachine.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachine.go index 605a8cf46e0..22c21beff85 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachine.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachine.go @@ -17,7 +17,9 @@ type VirtualMachine struct { Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` // Fields inherited from Compute + ComputeLocation *string `json:"computeLocation,omitempty"` + ComputeType ComputeType `json:"computeType"` CreatedOn *string `json:"createdOn,omitempty"` Description *string `json:"description,omitempty"` DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -28,6 +30,21 @@ type VirtualMachine struct { ResourceId *string `json:"resourceId,omitempty"` } +func (s VirtualMachine) Compute() BaseComputeImpl { + return BaseComputeImpl{ + ComputeLocation: s.ComputeLocation, + ComputeType: s.ComputeType, + CreatedOn: s.CreatedOn, + Description: s.Description, + DisableLocalAuth: s.DisableLocalAuth, + IsAttachedCompute: s.IsAttachedCompute, + ModifiedOn: s.ModifiedOn, + ProvisioningErrors: s.ProvisioningErrors, + ProvisioningState: s.ProvisioningState, + ResourceId: s.ResourceId, + } +} + func (o *VirtualMachine) GetCreatedOnAsTime() (*time.Time, error) { if o.CreatedOn == nil { return nil, nil @@ -63,9 +80,10 @@ func (s VirtualMachine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachine: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachinesecrets.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachinesecrets.go index b131f87db43..c575b8e5d07 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachinesecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/model_virtualmachinesecrets.go @@ -14,6 +14,14 @@ type VirtualMachineSecrets struct { AdministratorAccount *VirtualMachineSshCredentials `json:"administratorAccount,omitempty"` // Fields inherited from ComputeSecrets + + ComputeType ComputeType `json:"computeType"` +} + +func (s VirtualMachineSecrets) ComputeSecrets() BaseComputeSecretsImpl { + return BaseComputeSecretsImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = VirtualMachineSecrets{} @@ -27,9 +35,10 @@ func (s VirtualMachineSecrets) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineSecrets: %+v", err) } + decoded["computeType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/version.go b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/version.go index f5cb50108d2..c725b4b9256 100644 --- a/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/operationalizationclusters/version.go @@ -1,12 +1,10 @@ package operationalizationclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationalizationclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationalizationclusters/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/README.md b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/README.md index d9d688fdadd..65e069c6557 100644 --- a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints` Documentation -The `outboundnetworkdependenciesendpoints` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `outboundnetworkdependenciesendpoints` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/client.go b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/client.go index d5ab391daa6..a8a36d8265e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/client.go @@ -15,7 +15,7 @@ type OutboundNetworkDependenciesEndpointsClient struct { } func NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundNetworkDependenciesEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundnetworkdependenciesendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundNetworkDependenciesEndpointsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/id_workspace.go index c1617ac44af..f32a6bef33f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go index 15839f1552e..36b14ed1653 100644 --- a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go +++ b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/method_workspaceslistoutboundnetworkdependenciesendpoints.go @@ -46,7 +46,6 @@ func (c OutboundNetworkDependenciesEndpointsClient) WorkspacesListOutboundNetwor var model ExternalFQDNResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/version.go b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/version.go index 5d25c5eebb5..1676bf156b0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/outboundnetworkdependenciesendpoints/version.go @@ -1,12 +1,10 @@ package outboundnetworkdependenciesendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundnetworkdependenciesendpoints/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/README.md b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/README.md index b7fab259d3a..d56f24d86ab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/client.go b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/id_workspace.go index 45ec2f91a03..3ce8bc6ce3b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/method_list.go b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/method_list.go index aebd67aff46..7b076e7cbda 100644 --- a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id Workspace var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/version.go b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/version.go index 22727119324..4a9dead2ecf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/README.md b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/README.md index a59e610511d..8f6fba0eb0a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/proxyoperations` Documentation -The `proxyoperations` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `proxyoperations` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/client.go b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/client.go index 33f9ecf1053..18542e7d1e7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/client.go @@ -15,7 +15,7 @@ type ProxyOperationsClient struct { } func NewProxyOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxyoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxyoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyOperationsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/id_workspace.go index 7066969a17f..ecdd8ab39a6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspaceslistnotebookkeys.go b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspaceslistnotebookkeys.go index 07aab6302c5..4c265812b9f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspaceslistnotebookkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspaceslistnotebookkeys.go @@ -46,7 +46,6 @@ func (c ProxyOperationsClient) WorkspacesListNotebookKeys(ctx context.Context, i var model ListNotebookKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspacesliststorageaccountkeys.go b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspacesliststorageaccountkeys.go index ee88011c0e0..34042bf4150 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspacesliststorageaccountkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/method_workspacesliststorageaccountkeys.go @@ -46,7 +46,6 @@ func (c ProxyOperationsClient) WorkspacesListStorageAccountKeys(ctx context.Cont var model ListStorageAccountKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/version.go b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/version.go index c082b737b17..4eb97edf98e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/proxyoperations/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/proxyoperations/version.go @@ -1,12 +1,10 @@ package proxyoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxyoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxyoperations/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/quota/README.md b/resource-manager/machinelearningservices/2024-04-01/quota/README.md index ac0bf43bac7..d32c87c9d1d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/quota/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/quota/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/quota` Documentation -The `quota` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `quota` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/quota/client.go b/resource-manager/machinelearningservices/2024-04-01/quota/client.go index ef3c3c5581e..614e0b4f882 100644 --- a/resource-manager/machinelearningservices/2024-04-01/quota/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/quota/client.go @@ -15,7 +15,7 @@ type QuotaClient struct { } func NewQuotaClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quota", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quota", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/quota/id_location.go b/resource-manager/machinelearningservices/2024-04-01/quota/id_location.go index 387b0a18ffc..8df8656c257 100644 --- a/resource-manager/machinelearningservices/2024-04-01/quota/id_location.go +++ b/resource-manager/machinelearningservices/2024-04-01/quota/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/quota/version.go b/resource-manager/machinelearningservices/2024-04-01/quota/version.go index 2cbc4ab30bf..ed4c0c0aadb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/quota/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/quota/version.go @@ -1,12 +1,10 @@ package quota -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quota/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quota/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/README.md b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/README.md index 277105f95cb..b7bd27b9ded 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/registrymanagement` Documentation -The `registrymanagement` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `registrymanagement` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/client.go b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/client.go index 424b1be68a0..b9770b7e4d2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/client.go @@ -15,7 +15,7 @@ type RegistryManagementClient struct { } func NewRegistryManagementClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistryManagementClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrymanagement", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrymanagement", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistryManagementClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/id_registry.go b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/id_registry.go index 02737626a7f..dd04fc9e5d5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/id_registry.go +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/id_registry.go @@ -42,7 +42,7 @@ func ParseRegistryID(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegistryIDInsensitively(input string) (*RegistryId, error) { } id := RegistryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesget.go b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesget.go index 6e6ae3a7858..497541822ad 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesget.go +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesget.go @@ -45,7 +45,6 @@ func (c RegistryManagementClient) RegistriesGet(ctx context.Context, id Registry var model RegistryTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesupdate.go b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesupdate.go index e9f72c00dd9..93ee9b6d1e4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/method_registriesupdate.go @@ -49,7 +49,6 @@ func (c RegistryManagementClient) RegistriesUpdate(ctx context.Context, id Regis var model RegistryTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/version.go b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/version.go index 49257ca534d..d67afc1eb93 100644 --- a/resource-manager/machinelearningservices/2024-04-01/registrymanagement/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/registrymanagement/version.go @@ -1,12 +1,10 @@ package registrymanagement -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrymanagement/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrymanagement/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/README.md b/resource-manager/machinelearningservices/2024-04-01/schedule/README.md index 663ffe75180..9404f2e80de 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/schedule` Documentation -The `schedule` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `schedule` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/client.go b/resource-manager/machinelearningservices/2024-04-01/schedule/client.go index 14f19f2e2d6..5f8bfedb043 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/client.go @@ -15,7 +15,7 @@ type ScheduleClient struct { } func NewScheduleClientWithBaseURI(sdkApi sdkEnv.Api) (*ScheduleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "schedule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "schedule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScheduleClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/id_schedule.go b/resource-manager/machinelearningservices/2024-04-01/schedule/id_schedule.go index 4c1f3d28d64..c20fa054ab2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/id_schedule.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/id_schedule.go @@ -44,7 +44,7 @@ func ParseScheduleID(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScheduleIDInsensitively(input string) (*ScheduleId, error) { } id := ScheduleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/schedule/id_workspace.go index 5ce3d74236c..dc91be60508 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/method_get.go b/resource-manager/machinelearningservices/2024-04-01/schedule/method_get.go index 1ef1b82ef2b..b50dd6a7fb2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/method_get.go @@ -45,7 +45,6 @@ func (c ScheduleClient) Get(ctx context.Context, id ScheduleId) (result GetOpera var model ScheduleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/method_list.go b/resource-manager/machinelearningservices/2024-04-01/schedule/method_list.go index 978fb6364b9..f2819321b9f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_allfeatures.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_allfeatures.go index 137674a4dd1..c1fde8b5908 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_allfeatures.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_allfeatures.go @@ -13,6 +13,14 @@ var _ MonitoringFeatureFilterBase = AllFeatures{} type AllFeatures struct { // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s AllFeatures) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = AllFeatures{} @@ -26,9 +34,10 @@ func (s AllFeatures) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllFeatures: %+v", err) } + decoded["filterType"] = "AllFeatures" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_allnodes.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_allnodes.go index 316abacce1f..56e9f737e80 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_allnodes.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_allnodes.go @@ -13,6 +13,14 @@ var _ Nodes = AllNodes{} type AllNodes struct { // Fields inherited from Nodes + + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s AllNodes) Nodes() BaseNodesImpl { + return BaseNodesImpl{ + NodesValueType: s.NodesValueType, + } } var _ json.Marshaler = AllNodes{} @@ -26,9 +34,10 @@ func (s AllNodes) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AllNodes: %+v", err) } + decoded["nodesValueType"] = "All" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltoken.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltoken.go index ea17d79c7b2..894beaee446 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltoken.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltoken.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = AmlToken{} type AmlToken struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s AmlToken) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = AmlToken{} @@ -26,9 +34,10 @@ func (s AmlToken) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlToken: %+v", err) } + decoded["identityType"] = "AMLToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltokencomputeidentity.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltokencomputeidentity.go index 2407209efc4..297ce814499 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltokencomputeidentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_amltokencomputeidentity.go @@ -13,6 +13,14 @@ var _ MonitorComputeIdentityBase = AmlTokenComputeIdentity{} type AmlTokenComputeIdentity struct { // Fields inherited from MonitorComputeIdentityBase + + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s AmlTokenComputeIdentity) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return BaseMonitorComputeIdentityBaseImpl{ + ComputeIdentityType: s.ComputeIdentityType, + } } var _ json.Marshaler = AmlTokenComputeIdentity{} @@ -26,9 +34,10 @@ func (s AmlTokenComputeIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AmlTokenComputeIdentity: %+v", err) } + decoded["computeIdentityType"] = "AmlToken" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoforecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoforecasthorizon.go index 34b4ca41e1f..c1472390946 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoforecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoforecasthorizon.go @@ -13,6 +13,14 @@ var _ ForecastHorizon = AutoForecastHorizon{} type AutoForecastHorizon struct { // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s AutoForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoForecastHorizon{} @@ -26,9 +34,10 @@ func (s AutoForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoForecastHorizon: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_automljob.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_automljob.go index 0731216d960..da6874d9ae5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_automljob.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_automljob.go @@ -19,6 +19,7 @@ type AutoMLJob struct { TaskDetails AutoMLVertical `json:"taskDetails"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -26,6 +27,7 @@ type AutoMLJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -33,6 +35,24 @@ type AutoMLJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s AutoMLJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = AutoMLJob{} func (s AutoMLJob) MarshalJSON() ([]byte, error) { @@ -44,9 +64,10 @@ func (s AutoMLJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoMLJob: %+v", err) } + decoded["jobType"] = "AutoML" encoded, err = json.Marshal(decoded) @@ -74,6 +95,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties s.QueueSettings = decoded.QueueSettings @@ -88,7 +110,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'AutoMLJob': %+v", err) } @@ -103,7 +125,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'AutoMLJob': %+v", key, err) } @@ -113,7 +135,7 @@ func (s *AutoMLJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["taskDetails"]; ok { - impl, err := unmarshalAutoMLVerticalImplementation(v) + impl, err := UnmarshalAutoMLVerticalImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TaskDetails' for 'AutoMLJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_automlvertical.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_automlvertical.go index 5eba8eb5d6b..de5b0076642 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_automlvertical.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_automlvertical.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutoMLVertical interface { + AutoMLVertical() BaseAutoMLVerticalImpl } -// RawAutoMLVerticalImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutoMLVertical = BaseAutoMLVerticalImpl{} + +type BaseAutoMLVerticalImpl struct { + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` + TrainingData MLTableJobInput `json:"trainingData"` +} + +func (s BaseAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s +} + +var _ AutoMLVertical = RawAutoMLVerticalImpl{} + +// RawAutoMLVerticalImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutoMLVerticalImpl struct { - Type string - Values map[string]interface{} + autoMLVertical BaseAutoMLVerticalImpl + Type string + Values map[string]interface{} +} + +func (s RawAutoMLVerticalImpl) AutoMLVertical() BaseAutoMLVerticalImpl { + return s.autoMLVertical } -func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { +func UnmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) { if input == nil { return nil, nil } @@ -116,10 +136,15 @@ func unmarshalAutoMLVerticalImplementation(input []byte) (AutoMLVertical, error) return out, nil } - out := RawAutoMLVerticalImpl{ - Type: value, - Values: temp, + var parent BaseAutoMLVerticalImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutoMLVerticalImpl: %+v", err) } - return out, nil + + return RawAutoMLVerticalImpl{ + autoMLVertical: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoncrossvalidations.go index 29dbfea898e..675fe5a7287 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoncrossvalidations.go @@ -13,6 +13,14 @@ var _ NCrossValidations = AutoNCrossValidations{} type AutoNCrossValidations struct { // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s AutoNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoNCrossValidations{} @@ -26,9 +34,10 @@ func (s AutoNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoNCrossValidations: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoseasonality.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoseasonality.go index d7b02195d35..1c55a12f9a7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoseasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autoseasonality.go @@ -13,6 +13,14 @@ var _ Seasonality = AutoSeasonality{} type AutoSeasonality struct { // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s AutoSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoSeasonality{} @@ -26,9 +34,10 @@ func (s AutoSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoSeasonality: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetlags.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetlags.go index 112678192da..ba78e9c6512 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetlags.go @@ -13,6 +13,14 @@ var _ TargetLags = AutoTargetLags{} type AutoTargetLags struct { // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s AutoTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetLags{} @@ -26,9 +34,10 @@ func (s AutoTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetLags: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetrollingwindowsize.go index f2691b6ee6f..60721dec678 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_autotargetrollingwindowsize.go @@ -13,6 +13,14 @@ var _ TargetRollingWindowSize = AutoTargetRollingWindowSize{} type AutoTargetRollingWindowSize struct { // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s AutoTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = AutoTargetRollingWindowSize{} @@ -26,9 +34,10 @@ func (s AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutoTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Auto" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_azuredevopswebhook.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_azuredevopswebhook.go index 593d411da0a..d6f8be1bd68 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_azuredevopswebhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_azuredevopswebhook.go @@ -13,7 +13,16 @@ var _ Webhook = AzureDevOpsWebhook{} type AzureDevOpsWebhook struct { // Fields inherited from Webhook - EventType *string `json:"eventType,omitempty"` + + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s AzureDevOpsWebhook) Webhook() BaseWebhookImpl { + return BaseWebhookImpl{ + EventType: s.EventType, + WebhookType: s.WebhookType, + } } var _ json.Marshaler = AzureDevOpsWebhook{} @@ -27,9 +36,10 @@ func (s AzureDevOpsWebhook) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDevOpsWebhook: %+v", err) } + decoded["webhookType"] = "AzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_banditpolicy.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_banditpolicy.go index 9d3ca26970e..31e2b60bebc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_banditpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_banditpolicy.go @@ -15,8 +15,18 @@ type BanditPolicy struct { SlackFactor *float64 `json:"slackFactor,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BanditPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = BanditPolicy{} @@ -30,9 +40,10 @@ func (s BanditPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BanditPolicy: %+v", err) } + decoded["policyType"] = "Bandit" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_bayesiansamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_bayesiansamplingalgorithm.go index d2a795b80e1..be893b96cad 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_bayesiansamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_bayesiansamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = BayesianSamplingAlgorithm{} type BayesianSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BayesianSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = BayesianSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BayesianSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Bayesian" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldatadriftmetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldatadriftmetricthreshold.go index baa52817995..0f6b9516e9d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldatadriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldatadriftmetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalDataDriftMetricThreshold struct { Metric CategoricalDataDriftMetric `json:"metric"` // Fields inherited from DataDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalDataDriftMetricThreshold) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return BaseDataDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalDataDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalDataDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldataqualitymetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldataqualitymetricthreshold.go index 7e7b1bf1991..c9f0a057e9a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldataqualitymetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricaldataqualitymetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalDataQualityMetricThreshold struct { Metric CategoricalDataQualityMetric `json:"metric"` // Fields inherited from DataQualityMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalDataQualityMetricThreshold) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return BaseDataQualityMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalDataQualityMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalDataQualityMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricalpredictiondriftmetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricalpredictiondriftmetricthreshold.go index cc93dc9f36a..64d49299a8c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricalpredictiondriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_categoricalpredictiondriftmetricthreshold.go @@ -14,7 +14,16 @@ type CategoricalPredictionDriftMetricThreshold struct { Metric CategoricalPredictionDriftMetric `json:"metric"` // Fields inherited from PredictionDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s CategoricalPredictionDriftMetricThreshold) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return BasePredictionDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = CategoricalPredictionDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s CategoricalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CategoricalPredictionDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Categorical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_classification.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_classification.go index 067004475b8..ca981206cb2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_classification.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_classification.go @@ -25,11 +25,22 @@ type Classification struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Classification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Classification{} func (s Classification) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Classification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Classification: %+v", err) } + decoded["taskType"] = "Classification" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { s.PositiveLabel = decoded.PositiveLabel s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Classification) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Classification': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjob.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjob.go index 5cd0a82dcaa..d2cf5c7ceb3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjob.go @@ -24,6 +24,7 @@ type CommandJob struct { Resources *JobResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -31,6 +32,7 @@ type CommandJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -38,6 +40,24 @@ type CommandJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s CommandJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = CommandJob{} func (s CommandJob) MarshalJSON() ([]byte, error) { @@ -49,9 +69,10 @@ func (s CommandJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJob: %+v", err) } + decoded["jobType"] = "Command" encoded, err = json.Marshal(decoded) @@ -81,6 +102,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { s.EnvironmentVariables = decoded.EnvironmentVariables s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Parameters = decoded.Parameters s.Properties = decoded.Properties @@ -96,7 +118,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'CommandJob': %+v", err) } @@ -104,7 +126,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'CommandJob': %+v", err) } @@ -119,7 +141,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CommandJob': %+v", key, err) } @@ -129,7 +151,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limits"]; ok { - impl, err := unmarshalJobLimitsImplementation(v) + impl, err := UnmarshalJobLimitsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limits' for 'CommandJob': %+v", err) } @@ -144,7 +166,7 @@ func (s *CommandJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'CommandJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjoblimits.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjoblimits.go index 32fe234da34..712d95c31ad 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjoblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_commandjoblimits.go @@ -13,7 +13,16 @@ var _ JobLimits = CommandJobLimits{} type CommandJobLimits struct { // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s CommandJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = CommandJobLimits{} @@ -27,9 +36,10 @@ func (s CommandJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CommandJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Command" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_createmonitoraction.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_createmonitoraction.go index f4fa4b5d530..54ff25df20b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_createmonitoraction.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_createmonitoraction.go @@ -14,6 +14,14 @@ type CreateMonitorAction struct { MonitorDefinition MonitorDefinition `json:"monitorDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s CreateMonitorAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = CreateMonitorAction{} @@ -27,9 +35,10 @@ func (s CreateMonitorAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CreateMonitorAction: %+v", err) } + decoded["actionType"] = "CreateMonitor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_crontrigger.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_crontrigger.go index 659030c870d..e056080c9e9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_crontrigger.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_crontrigger.go @@ -14,9 +14,20 @@ type CronTrigger struct { Expression string `json:"expression"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s CronTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = CronTrigger{} @@ -30,9 +41,10 @@ func (s CronTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CronTrigger: %+v", err) } + decoded["triggerType"] = "Cron" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customforecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customforecasthorizon.go index e706aff88ab..5e2042d6924 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customforecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customforecasthorizon.go @@ -14,6 +14,14 @@ type CustomForecastHorizon struct { Value int64 `json:"value"` // Fields inherited from ForecastHorizon + + Mode ForecastHorizonMode `json:"mode"` +} + +func (s CustomForecastHorizon) ForecastHorizon() BaseForecastHorizonImpl { + return BaseForecastHorizonImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomForecastHorizon{} @@ -27,9 +35,10 @@ func (s CustomForecastHorizon) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomForecastHorizon: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljobinput.go index b8ffc9ce362..b8700d5b750 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljobinput.go @@ -15,7 +15,16 @@ type CustomModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s CustomModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = CustomModelJobInput{} @@ -29,9 +38,10 @@ func (s CustomModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobInput: %+v", err) } + decoded["jobInputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljoboutput.go index 80323935c41..acf90e9e949 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommodeljoboutput.go @@ -15,7 +15,16 @@ type CustomModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s CustomModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = CustomModelJobOutput{} @@ -29,9 +38,10 @@ func (s CustomModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "custom_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommonitoringsignal.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommonitoringsignal.go index 628f75b7474..55234afe315 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommonitoringsignal.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_custommonitoringsignal.go @@ -17,8 +17,18 @@ type CustomMonitoringSignal struct { MetricThresholds []CustomMetricThreshold `json:"metricThresholds"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s CustomMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = CustomMonitoringSignal{} @@ -32,9 +42,10 @@ func (s CustomMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomMonitoringSignal: %+v", err) } + decoded["signalType"] = "Custom" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.MetricThresholds = decoded.MetricThresholds s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -72,7 +84,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make(map[string]MonitoringInputDataBase) for key, val := range dictionaryTemp { - impl, err := unmarshalMonitoringInputDataBaseImplementation(val) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'InputAssets' for 'CustomMonitoringSignal': %+v", key, err) } @@ -89,7 +101,7 @@ func (s *CustomMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'CustomMonitoringSignal': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customncrossvalidations.go index 8ff5e4388a3..e9fd5d28638 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customncrossvalidations.go @@ -14,6 +14,14 @@ type CustomNCrossValidations struct { Value int64 `json:"value"` // Fields inherited from NCrossValidations + + Mode NCrossValidationsMode `json:"mode"` +} + +func (s CustomNCrossValidations) NCrossValidations() BaseNCrossValidationsImpl { + return BaseNCrossValidationsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomNCrossValidations{} @@ -27,9 +35,10 @@ func (s CustomNCrossValidations) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomNCrossValidations: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customseasonality.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customseasonality.go index 54a5b439135..5bda357d48a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customseasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customseasonality.go @@ -14,6 +14,14 @@ type CustomSeasonality struct { Value int64 `json:"value"` // Fields inherited from Seasonality + + Mode SeasonalityMode `json:"mode"` +} + +func (s CustomSeasonality) Seasonality() BaseSeasonalityImpl { + return BaseSeasonalityImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomSeasonality{} @@ -27,9 +35,10 @@ func (s CustomSeasonality) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomSeasonality: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetlags.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetlags.go index 0a48c672a81..546e8dd0b84 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetlags.go @@ -14,6 +14,14 @@ type CustomTargetLags struct { Values []int64 `json:"values"` // Fields inherited from TargetLags + + Mode TargetLagsMode `json:"mode"` +} + +func (s CustomTargetLags) TargetLags() BaseTargetLagsImpl { + return BaseTargetLagsImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetLags{} @@ -27,9 +35,10 @@ func (s CustomTargetLags) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetLags: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetrollingwindowsize.go index e54b4f5a422..d224ed243de 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_customtargetrollingwindowsize.go @@ -14,6 +14,14 @@ type CustomTargetRollingWindowSize struct { Value int64 `json:"value"` // Fields inherited from TargetRollingWindowSize + + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s CustomTargetRollingWindowSize) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return BaseTargetRollingWindowSizeImpl{ + Mode: s.Mode, + } } var _ json.Marshaler = CustomTargetRollingWindowSize{} @@ -27,9 +35,10 @@ func (s CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomTargetRollingWindowSize: %+v", err) } + decoded["mode"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmetricthresholdbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmetricthresholdbase.go index c1dbe12d67f..38b5fd932fc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataDriftMetricThresholdBase interface { + DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl } -// RawDataDriftMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataDriftMetricThresholdBase = BaseDataDriftMetricThresholdBaseImpl{} + +type BaseDataDriftMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BaseDataDriftMetricThresholdBaseImpl) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return s +} + +var _ DataDriftMetricThresholdBase = RawDataDriftMetricThresholdBaseImpl{} + +// RawDataDriftMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataDriftMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + dataDriftMetricThresholdBase BaseDataDriftMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataDriftMetricThresholdBaseImpl) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return s.dataDriftMetricThresholdBase } -func unmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDriftMetricThresholdBase, error) { +func UnmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDriftMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDataDriftMetricThresholdBaseImplementation(input []byte) (DataDrif return out, nil } - out := RawDataDriftMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataDriftMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataDriftMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawDataDriftMetricThresholdBaseImpl{ + dataDriftMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmonitoringsignal.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmonitoringsignal.go index f811e53d4aa..04cf61512e9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_datadriftmonitoringsignal.go @@ -19,8 +19,18 @@ type DataDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s DataDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = DataDriftMonitoringSignal{} @@ -34,9 +44,10 @@ func (s DataDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "DataDrift" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureImportanceSettings = decoded.FeatureImportanceSettings s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -67,7 +79,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["features"]; ok { - impl, err := unmarshalMonitoringFeatureFilterBaseImplementation(v) + impl, err := UnmarshalMonitoringFeatureFilterBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Features' for 'DataDriftMonitoringSignal': %+v", err) } @@ -82,7 +94,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]DataDriftMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalDataDriftMetricThresholdBaseImplementation(val) + impl, err := UnmarshalDataDriftMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'DataDriftMonitoringSignal': %+v", i, err) } @@ -92,7 +104,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'DataDriftMonitoringSignal': %+v", err) } @@ -100,7 +112,7 @@ func (s *DataDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'DataDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymetricthresholdbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymetricthresholdbase.go index 2e68e010ee2..cb13b209346 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataQualityMetricThresholdBase interface { + DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl } -// RawDataQualityMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataQualityMetricThresholdBase = BaseDataQualityMetricThresholdBaseImpl{} + +type BaseDataQualityMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BaseDataQualityMetricThresholdBaseImpl) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return s +} + +var _ DataQualityMetricThresholdBase = RawDataQualityMetricThresholdBaseImpl{} + +// RawDataQualityMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataQualityMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + dataQualityMetricThresholdBase BaseDataQualityMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawDataQualityMetricThresholdBaseImpl) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return s.dataQualityMetricThresholdBase } -func unmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQualityMetricThresholdBase, error) { +func UnmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQualityMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalDataQualityMetricThresholdBaseImplementation(input []byte) (DataQu return out, nil } - out := RawDataQualityMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BaseDataQualityMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataQualityMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawDataQualityMetricThresholdBaseImpl{ + dataQualityMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymonitoringsignal.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymonitoringsignal.go index 7961ea21d50..71d3b10291e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymonitoringsignal.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_dataqualitymonitoringsignal.go @@ -19,8 +19,18 @@ type DataQualityMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s DataQualityMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = DataQualityMonitoringSignal{} @@ -34,9 +44,10 @@ func (s DataQualityMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataQualityMonitoringSignal: %+v", err) } + decoded["signalType"] = "DataQuality" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureImportanceSettings = decoded.FeatureImportanceSettings s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -67,7 +79,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["features"]; ok { - impl, err := unmarshalMonitoringFeatureFilterBaseImplementation(v) + impl, err := UnmarshalMonitoringFeatureFilterBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Features' for 'DataQualityMonitoringSignal': %+v", err) } @@ -82,7 +94,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]DataQualityMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalDataQualityMetricThresholdBaseImplementation(val) + impl, err := UnmarshalDataQualityMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'DataQualityMonitoringSignal': %+v", i, err) } @@ -92,7 +104,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'DataQualityMonitoringSignal': %+v", err) } @@ -100,7 +112,7 @@ func (s *DataQualityMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'DataQualityMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_distributionconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_distributionconfiguration.go index 56985f5d07e..f26ecd93b08 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_distributionconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_distributionconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DistributionConfiguration interface { + DistributionConfiguration() BaseDistributionConfigurationImpl } -// RawDistributionConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DistributionConfiguration = BaseDistributionConfigurationImpl{} + +type BaseDistributionConfigurationImpl struct { + DistributionType DistributionType `json:"distributionType"` +} + +func (s BaseDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s +} + +var _ DistributionConfiguration = RawDistributionConfigurationImpl{} + +// RawDistributionConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDistributionConfigurationImpl struct { - Type string - Values map[string]interface{} + distributionConfiguration BaseDistributionConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawDistributionConfigurationImpl) DistributionConfiguration() BaseDistributionConfigurationImpl { + return s.distributionConfiguration } -func unmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { +func UnmarshalDistributionConfigurationImplementation(input []byte) (DistributionConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalDistributionConfigurationImplementation(input []byte) (Distributio return out, nil } - out := RawDistributionConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseDistributionConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDistributionConfigurationImpl: %+v", err) } - return out, nil + + return RawDistributionConfigurationImpl{ + distributionConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_earlyterminationpolicy.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_earlyterminationpolicy.go index 3414def7db5..9a1a1654451 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_earlyterminationpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_earlyterminationpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EarlyTerminationPolicy interface { + EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl } -// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EarlyTerminationPolicy = BaseEarlyTerminationPolicyImpl{} + +type BaseEarlyTerminationPolicyImpl struct { + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s BaseEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s +} + +var _ EarlyTerminationPolicy = RawEarlyTerminationPolicyImpl{} + +// RawEarlyTerminationPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEarlyTerminationPolicyImpl struct { - Type string - Values map[string]interface{} + earlyTerminationPolicy BaseEarlyTerminationPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawEarlyTerminationPolicyImpl) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return s.earlyTerminationPolicy } -func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { +func UnmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminationPolicy, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalEarlyTerminationPolicyImplementation(input []byte) (EarlyTerminati return out, nil } - out := RawEarlyTerminationPolicyImpl{ - Type: value, - Values: temp, + var parent BaseEarlyTerminationPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEarlyTerminationPolicyImpl: %+v", err) } - return out, nil + + return RawEarlyTerminationPolicyImpl{ + earlyTerminationPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_endpointscheduleaction.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_endpointscheduleaction.go index ad5699caf06..a50c708e732 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_endpointscheduleaction.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_endpointscheduleaction.go @@ -14,6 +14,14 @@ type EndpointScheduleAction struct { EndpointInvocationDefinition interface{} `json:"endpointInvocationDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s EndpointScheduleAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = EndpointScheduleAction{} @@ -27,9 +35,10 @@ func (s EndpointScheduleAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EndpointScheduleAction: %+v", err) } + decoded["actionType"] = "InvokeBatchEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_featureattributiondriftmonitoringsignal.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_featureattributiondriftmonitoringsignal.go index 9ab9c7be10a..69fb08d71b2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_featureattributiondriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_featureattributiondriftmonitoringsignal.go @@ -18,8 +18,18 @@ type FeatureAttributionDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s FeatureAttributionDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = FeatureAttributionDriftMonitoringSignal{} @@ -33,9 +43,10 @@ func (s FeatureAttributionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureAttributionDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "FeatureAttributionDrift" encoded, err = json.Marshal(decoded) @@ -60,6 +71,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er s.MetricThreshold = decoded.MetricThreshold s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -74,7 +86,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er output := make([]MonitoringInputDataBase, 0) for i, val := range listTemp { - impl, err := unmarshalMonitoringInputDataBaseImplementation(val) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProductionData' for 'FeatureAttributionDriftMonitoringSignal': %+v", i, err) } @@ -84,7 +96,7 @@ func (s *FeatureAttributionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) er } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'FeatureAttributionDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_featuresubset.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_featuresubset.go index 3740345dc2c..8fdb9c9d2c3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_featuresubset.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_featuresubset.go @@ -14,6 +14,14 @@ type FeatureSubset struct { Features []string `json:"features"` // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s FeatureSubset) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = FeatureSubset{} @@ -27,9 +35,10 @@ func (s FeatureSubset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FeatureSubset: %+v", err) } + decoded["filterType"] = "FeatureSubset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_fixedinputdata.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_fixedinputdata.go index eb59ae7cb87..9c388f512ef 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_fixedinputdata.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_fixedinputdata.go @@ -13,10 +13,22 @@ var _ MonitoringInputDataBase = FixedInputData{} type FixedInputData struct { // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s FixedInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = FixedInputData{} @@ -30,9 +42,10 @@ func (s FixedInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FixedInputData: %+v", err) } + decoded["inputDataType"] = "Fixed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasthorizon.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasthorizon.go index 3c4d530ebf6..06d3a958f59 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasthorizon.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasthorizon.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ForecastHorizon interface { + ForecastHorizon() BaseForecastHorizonImpl } -// RawForecastHorizonImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ForecastHorizon = BaseForecastHorizonImpl{} + +type BaseForecastHorizonImpl struct { + Mode ForecastHorizonMode `json:"mode"` +} + +func (s BaseForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s +} + +var _ ForecastHorizon = RawForecastHorizonImpl{} + +// RawForecastHorizonImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawForecastHorizonImpl struct { - Type string - Values map[string]interface{} + forecastHorizon BaseForecastHorizonImpl + Type string + Values map[string]interface{} +} + +func (s RawForecastHorizonImpl) ForecastHorizon() BaseForecastHorizonImpl { + return s.forecastHorizon } -func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { +func UnmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalForecastHorizonImplementation(input []byte) (ForecastHorizon, erro return out, nil } - out := RawForecastHorizonImpl{ - Type: value, - Values: temp, + var parent BaseForecastHorizonImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseForecastHorizonImpl: %+v", err) } - return out, nil + + return RawForecastHorizonImpl{ + forecastHorizon: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasting.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasting.go index 350cc7cfdd5..485c1dffb65 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasting.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecasting.go @@ -25,11 +25,22 @@ type Forecasting struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Forecasting) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Forecasting{} func (s Forecasting) MarshalJSON() ([]byte, error) { @@ -41,9 +52,10 @@ func (s Forecasting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Forecasting: %+v", err) } + decoded["taskType"] = "Forecasting" encoded, err = json.Marshal(decoded) @@ -70,6 +82,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -84,7 +97,7 @@ func (s *Forecasting) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Forecasting': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecastingsettings.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecastingsettings.go index 3bfba4ec70a..41543881dcc 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecastingsettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_forecastingsettings.go @@ -49,7 +49,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["forecastHorizon"]; ok { - impl, err := unmarshalForecastHorizonImplementation(v) + impl, err := UnmarshalForecastHorizonImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ForecastHorizon' for 'ForecastingSettings': %+v", err) } @@ -57,7 +57,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["seasonality"]; ok { - impl, err := unmarshalSeasonalityImplementation(v) + impl, err := UnmarshalSeasonalityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Seasonality' for 'ForecastingSettings': %+v", err) } @@ -65,7 +65,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetLags"]; ok { - impl, err := unmarshalTargetLagsImplementation(v) + impl, err := UnmarshalTargetLagsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetLags' for 'ForecastingSettings': %+v", err) } @@ -73,7 +73,7 @@ func (s *ForecastingSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetRollingWindowSize"]; ok { - impl, err := unmarshalTargetRollingWindowSizeImplementation(v) + impl, err := UnmarshalTargetRollingWindowSizeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetRollingWindowSize' for 'ForecastingSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_gridsamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_gridsamplingalgorithm.go index 2e777597cd2..b577ac63c96 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_gridsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_gridsamplingalgorithm.go @@ -13,6 +13,14 @@ var _ SamplingAlgorithm = GridSamplingAlgorithm{} type GridSamplingAlgorithm struct { // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s GridSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = GridSamplingAlgorithm{} @@ -26,9 +34,10 @@ func (s GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GridSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Grid" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_identityconfiguration.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_identityconfiguration.go index 3a8f599b164..b9ddbf0e173 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_identityconfiguration.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_identityconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IdentityConfiguration interface { + IdentityConfiguration() BaseIdentityConfigurationImpl } -// RawIdentityConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IdentityConfiguration = BaseIdentityConfigurationImpl{} + +type BaseIdentityConfigurationImpl struct { + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s BaseIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s +} + +var _ IdentityConfiguration = RawIdentityConfigurationImpl{} + +// RawIdentityConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIdentityConfigurationImpl struct { - Type string - Values map[string]interface{} + identityConfiguration BaseIdentityConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawIdentityConfigurationImpl) IdentityConfiguration() BaseIdentityConfigurationImpl { + return s.identityConfiguration } -func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { +func UnmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalIdentityConfigurationImplementation(input []byte) (IdentityConfigu return out, nil } - out := RawIdentityConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseIdentityConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIdentityConfigurationImpl: %+v", err) } - return out, nil + + return RawIdentityConfigurationImpl{ + identityConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassification.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassification.go index cbc5d319bd9..50d25482a05 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassification.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassification.go @@ -20,11 +20,22 @@ type ImageClassification struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassification{} func (s ImageClassification) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassification: %+v", err) } + decoded["taskType"] = "ImageClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassificationmultilabel.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassificationmultilabel.go index e9dbeae8e5a..315c759395b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageclassificationmultilabel.go @@ -20,11 +20,22 @@ type ImageClassificationMultilabel struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageClassificationMultilabel{} func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageClassificationMultilabel: %+v", err) } + decoded["taskType"] = "ImageClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageinstancesegmentation.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageinstancesegmentation.go index 3b2f7709c3a..678a4359ec9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageinstancesegmentation.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageinstancesegmentation.go @@ -20,11 +20,22 @@ type ImageInstanceSegmentation struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageInstanceSegmentation) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageInstanceSegmentation{} func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageInstanceSegmentation: %+v", err) } + decoded["taskType"] = "ImageInstanceSegmentation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageobjectdetection.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageobjectdetection.go index a66f39819fd..7849132338d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageobjectdetection.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imageobjectdetection.go @@ -20,11 +20,22 @@ type ImageObjectDetection struct { ValidationDataSize *float64 `json:"validationDataSize,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s ImageObjectDetection) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = ImageObjectDetection{} func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { @@ -36,9 +47,10 @@ func (s ImageObjectDetection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageObjectDetection: %+v", err) } + decoded["taskType"] = "ImageObjectDetection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imagesweepsettings.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imagesweepsettings.go index bc50df60f04..86e0fdeff63 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_imagesweepsettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_imagesweepsettings.go @@ -30,7 +30,7 @@ func (s *ImageSweepSettings) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'ImageSweepSettings': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobbase.go index f710e48ea6e..f02fba5e00d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobbase.go @@ -10,18 +10,84 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobBase interface { + JobBase() BaseJobBaseImpl } -// RawJobBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobBase = BaseJobBaseImpl{} + +type BaseJobBaseImpl struct { + ComponentId *string `json:"componentId,omitempty"` + ComputeId *string `json:"computeId,omitempty"` + Description *string `json:"description,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + ExperimentName *string `json:"experimentName,omitempty"` + Identity IdentityConfiguration `json:"identity"` + IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` + NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + Services *map[string]JobService `json:"services,omitempty"` + Status *JobStatus `json:"status,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseJobBaseImpl) JobBase() BaseJobBaseImpl { + return s +} + +var _ JobBase = RawJobBaseImpl{} + +// RawJobBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobBaseImpl struct { - Type string - Values map[string]interface{} + jobBase BaseJobBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawJobBaseImpl) JobBase() BaseJobBaseImpl { + return s.jobBase } -func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { +var _ json.Unmarshaler = &BaseJobBaseImpl{} + +func (s *BaseJobBaseImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobBaseImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) + } + + s.ComponentId = decoded.ComponentId + s.ComputeId = decoded.ComputeId + s.Description = decoded.Description + s.DisplayName = decoded.DisplayName + s.ExperimentName = decoded.ExperimentName + s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType + s.NotificationSetting = decoded.NotificationSetting + s.Properties = decoded.Properties + s.Services = decoded.Services + s.Status = decoded.Status + s.Tags = decoded.Tags + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobBaseImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["identity"]; ok { + impl, err := UnmarshalIdentityConfigurationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Identity' for 'BaseJobBaseImpl': %+v", err) + } + s.Identity = impl + } + return nil +} + +func UnmarshalJobBaseImplementation(input []byte) (JobBase, error) { if input == nil { return nil, nil } @@ -76,10 +142,15 @@ func unmarshalJobBaseImplementation(input []byte) (JobBase, error) { return out, nil } - out := RawJobBaseImpl{ - Type: value, - Values: temp, + var parent BaseJobBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobBaseImpl: %+v", err) } - return out, nil + + return RawJobBaseImpl{ + jobBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobinput.go index 8637188bb21..ac2e0fdf3d7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobinput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -92,10 +110,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_joblimits.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_joblimits.go index cd157ae6263..3f232224d69 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_joblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_joblimits.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobLimits interface { + JobLimits() BaseJobLimitsImpl } -// RawJobLimitsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobLimits = BaseJobLimitsImpl{} + +type BaseJobLimitsImpl struct { + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s BaseJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s +} + +var _ JobLimits = RawJobLimitsImpl{} + +// RawJobLimitsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobLimitsImpl struct { - Type string - Values map[string]interface{} + jobLimits BaseJobLimitsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobLimitsImpl) JobLimits() BaseJobLimitsImpl { + return s.jobLimits } -func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { +func UnmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalJobLimitsImplementation(input []byte) (JobLimits, error) { return out, nil } - out := RawJobLimitsImpl{ - Type: value, - Values: temp, + var parent BaseJobLimitsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobLimitsImpl: %+v", err) } - return out, nil + + return RawJobLimitsImpl{ + jobLimits: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_joboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_joboutput.go index 9ec6b3afb1e..7d560a60b3d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_joboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_joboutput.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobscheduleaction.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobscheduleaction.go index de37d55a3ab..b0199c3a7e3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobscheduleaction.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobscheduleaction.go @@ -14,6 +14,14 @@ type JobScheduleAction struct { JobDefinition JobBase `json:"jobDefinition"` // Fields inherited from ScheduleActionBase + + ActionType ScheduleActionType `json:"actionType"` +} + +func (s JobScheduleAction) ScheduleActionBase() BaseScheduleActionBaseImpl { + return BaseScheduleActionBaseImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = JobScheduleAction{} @@ -27,9 +35,10 @@ func (s JobScheduleAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobScheduleAction: %+v", err) } + decoded["actionType"] = "CreateJob" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s JobScheduleAction) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &JobScheduleAction{} func (s *JobScheduleAction) UnmarshalJSON(bytes []byte) error { + type alias JobScheduleAction + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JobScheduleAction: %+v", err) + } + + s.ActionType = decoded.ActionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *JobScheduleAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["jobDefinition"]; ok { - impl, err := unmarshalJobBaseImplementation(v) + impl, err := UnmarshalJobBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'JobDefinition' for 'JobScheduleAction': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobservice.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobservice.go index a29b9ff0f89..554c6efd339 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobservice.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_jobservice.go @@ -40,7 +40,7 @@ func (s *JobService) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nodes"]; ok { - impl, err := unmarshalNodesImplementation(v) + impl, err := UnmarshalNodesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Nodes' for 'JobService': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_literaljobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_literaljobinput.go index a2937196b09..0879f3a20c7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_literaljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_literaljobinput.go @@ -14,7 +14,16 @@ type LiteralJobInput struct { Value string `json:"value"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s LiteralJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = LiteralJobInput{} @@ -28,9 +37,10 @@ func (s LiteralJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LiteralJobInput: %+v", err) } + decoded["jobInputType"] = "literal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedcomputeidentity.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedcomputeidentity.go index 23ead4bc92c..02728c026e1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedcomputeidentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedcomputeidentity.go @@ -16,6 +16,14 @@ type ManagedComputeIdentity struct { Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` // Fields inherited from MonitorComputeIdentityBase + + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s ManagedComputeIdentity) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return BaseMonitorComputeIdentityBaseImpl{ + ComputeIdentityType: s.ComputeIdentityType, + } } var _ json.Marshaler = ManagedComputeIdentity{} @@ -29,9 +37,10 @@ func (s ManagedComputeIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedComputeIdentity: %+v", err) } + decoded["computeIdentityType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedidentity.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedidentity.go index 5989d3923dc..208e7b9078d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedidentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_managedidentity.go @@ -16,6 +16,14 @@ type ManagedIdentity struct { ResourceId *string `json:"resourceId,omitempty"` // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s ManagedIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = ManagedIdentity{} @@ -29,9 +37,10 @@ func (s ManagedIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentity: %+v", err) } + decoded["identityType"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_medianstoppingpolicy.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_medianstoppingpolicy.go index f1258fd2da2..6e54080a23c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_medianstoppingpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_medianstoppingpolicy.go @@ -13,8 +13,18 @@ var _ EarlyTerminationPolicy = MedianStoppingPolicy{} type MedianStoppingPolicy struct { // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s MedianStoppingPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = MedianStoppingPolicy{} @@ -28,9 +38,10 @@ func (s MedianStoppingPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MedianStoppingPolicy: %+v", err) } + decoded["policyType"] = "MedianStopping" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljobinput.go index 538f8f0a0f1..4ff9169eb7c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljobinput.go @@ -15,7 +15,16 @@ type MLFlowModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLFlowModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLFlowModelJobInput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobInput: %+v", err) } + decoded["jobInputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljoboutput.go index 8d318e6dd20..584666b570b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mlflowmodeljoboutput.go @@ -15,7 +15,16 @@ type MLFlowModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLFlowModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLFlowModelJobOutput{} @@ -29,9 +38,10 @@ func (s MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLFlowModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "mlflow_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejobinput.go index f9a1501026c..364d527d8b1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejobinput.go @@ -15,7 +15,16 @@ type MLTableJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s MLTableJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = MLTableJobInput{} @@ -29,9 +38,10 @@ func (s MLTableJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobInput: %+v", err) } + decoded["jobInputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejoboutput.go index c4052f54cf0..6bc782d1f61 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mltablejoboutput.go @@ -15,7 +15,16 @@ type MLTableJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s MLTableJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = MLTableJobOutput{} @@ -29,9 +38,10 @@ func (s MLTableJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLTableJobOutput: %+v", err) } + decoded["jobOutputType"] = "mltable" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeconfigurationbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeconfigurationbase.go index 888472da50e..f2d712cb358 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeconfigurationbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeconfigurationbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitorComputeConfigurationBase interface { + MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl } -// RawMonitorComputeConfigurationBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitorComputeConfigurationBase = BaseMonitorComputeConfigurationBaseImpl{} + +type BaseMonitorComputeConfigurationBaseImpl struct { + ComputeType MonitorComputeType `json:"computeType"` +} + +func (s BaseMonitorComputeConfigurationBaseImpl) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return s +} + +var _ MonitorComputeConfigurationBase = RawMonitorComputeConfigurationBaseImpl{} + +// RawMonitorComputeConfigurationBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitorComputeConfigurationBaseImpl struct { - Type string - Values map[string]interface{} + monitorComputeConfigurationBase BaseMonitorComputeConfigurationBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitorComputeConfigurationBaseImpl) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return s.monitorComputeConfigurationBase } -func unmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (MonitorComputeConfigurationBase, error) { +func UnmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (MonitorComputeConfigurationBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMonitorComputeConfigurationBaseImplementation(input []byte) (Monit return out, nil } - out := RawMonitorComputeConfigurationBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitorComputeConfigurationBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitorComputeConfigurationBaseImpl: %+v", err) } - return out, nil + + return RawMonitorComputeConfigurationBaseImpl{ + monitorComputeConfigurationBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeidentitybase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeidentitybase.go index 8245095d2c4..ff777e97b81 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeidentitybase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorcomputeidentitybase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitorComputeIdentityBase interface { + MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl } -// RawMonitorComputeIdentityBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitorComputeIdentityBase = BaseMonitorComputeIdentityBaseImpl{} + +type BaseMonitorComputeIdentityBaseImpl struct { + ComputeIdentityType MonitorComputeIdentityType `json:"computeIdentityType"` +} + +func (s BaseMonitorComputeIdentityBaseImpl) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return s +} + +var _ MonitorComputeIdentityBase = RawMonitorComputeIdentityBaseImpl{} + +// RawMonitorComputeIdentityBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitorComputeIdentityBaseImpl struct { - Type string - Values map[string]interface{} + monitorComputeIdentityBase BaseMonitorComputeIdentityBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitorComputeIdentityBaseImpl) MonitorComputeIdentityBase() BaseMonitorComputeIdentityBaseImpl { + return s.monitorComputeIdentityBase } -func unmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorComputeIdentityBase, error) { +func UnmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorComputeIdentityBase, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalMonitorComputeIdentityBaseImplementation(input []byte) (MonitorCom return out, nil } - out := RawMonitorComputeIdentityBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitorComputeIdentityBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitorComputeIdentityBaseImpl: %+v", err) } - return out, nil + + return RawMonitorComputeIdentityBaseImpl{ + monitorComputeIdentityBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitordefinition.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitordefinition.go index aff7fbadceb..a4aaa884f9f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitordefinition.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitordefinition.go @@ -33,7 +33,7 @@ func (s *MonitorDefinition) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["computeConfiguration"]; ok { - impl, err := unmarshalMonitorComputeConfigurationBaseImplementation(v) + impl, err := UnmarshalMonitorComputeConfigurationBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ComputeConfiguration' for 'MonitorDefinition': %+v", err) } @@ -48,7 +48,7 @@ func (s *MonitorDefinition) UnmarshalJSON(bytes []byte) error { output := make(map[string]MonitoringSignalBase) for key, val := range dictionaryTemp { - impl, err := unmarshalMonitoringSignalBaseImplementation(val) + impl, err := UnmarshalMonitoringSignalBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Signals' for 'MonitorDefinition': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringfeaturefilterbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringfeaturefilterbase.go index 1604be990c4..86eb3b37297 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringfeaturefilterbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringfeaturefilterbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringFeatureFilterBase interface { + MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl } -// RawMonitoringFeatureFilterBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringFeatureFilterBase = BaseMonitoringFeatureFilterBaseImpl{} + +type BaseMonitoringFeatureFilterBaseImpl struct { + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s BaseMonitoringFeatureFilterBaseImpl) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return s +} + +var _ MonitoringFeatureFilterBase = RawMonitoringFeatureFilterBaseImpl{} + +// RawMonitoringFeatureFilterBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringFeatureFilterBaseImpl struct { - Type string - Values map[string]interface{} + monitoringFeatureFilterBase BaseMonitoringFeatureFilterBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringFeatureFilterBaseImpl) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return s.monitoringFeatureFilterBase } -func unmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (MonitoringFeatureFilterBase, error) { +func UnmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (MonitoringFeatureFilterBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalMonitoringFeatureFilterBaseImplementation(input []byte) (Monitorin return out, nil } - out := RawMonitoringFeatureFilterBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringFeatureFilterBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringFeatureFilterBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringFeatureFilterBaseImpl{ + monitoringFeatureFilterBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringinputdatabase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringinputdatabase.go index 5504daaa9e0..562443e6af3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringinputdatabase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringinputdatabase.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringInputDataBase interface { + MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl } -// RawMonitoringInputDataBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringInputDataBase = BaseMonitoringInputDataBaseImpl{} + +type BaseMonitoringInputDataBaseImpl struct { + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s BaseMonitoringInputDataBaseImpl) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return s +} + +var _ MonitoringInputDataBase = RawMonitoringInputDataBaseImpl{} + +// RawMonitoringInputDataBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringInputDataBaseImpl struct { - Type string - Values map[string]interface{} + monitoringInputDataBase BaseMonitoringInputDataBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringInputDataBaseImpl) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return s.monitoringInputDataBase } -func unmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInputDataBase, error) { +func UnmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInputDataBase, error) { if input == nil { return nil, nil } @@ -60,10 +81,15 @@ func unmarshalMonitoringInputDataBaseImplementation(input []byte) (MonitoringInp return out, nil } - out := RawMonitoringInputDataBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringInputDataBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringInputDataBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringInputDataBaseImpl{ + monitoringInputDataBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringsignalbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringsignalbase.go index 0a8821321ff..8c931adbaa9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringsignalbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitoringsignalbase.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MonitoringSignalBase interface { + MonitoringSignalBase() BaseMonitoringSignalBaseImpl } -// RawMonitoringSignalBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MonitoringSignalBase = BaseMonitoringSignalBaseImpl{} + +type BaseMonitoringSignalBaseImpl struct { + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` + Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s BaseMonitoringSignalBaseImpl) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return s +} + +var _ MonitoringSignalBase = RawMonitoringSignalBaseImpl{} + +// RawMonitoringSignalBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMonitoringSignalBaseImpl struct { - Type string - Values map[string]interface{} + monitoringSignalBase BaseMonitoringSignalBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawMonitoringSignalBaseImpl) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return s.monitoringSignalBase } -func unmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignalBase, error) { +func UnmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignalBase, error) { if input == nil { return nil, nil } @@ -76,10 +95,15 @@ func unmarshalMonitoringSignalBaseImplementation(input []byte) (MonitoringSignal return out, nil } - out := RawMonitoringSignalBaseImpl{ - Type: value, - Values: temp, + var parent BaseMonitoringSignalBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMonitoringSignalBaseImpl: %+v", err) } - return out, nil + + return RawMonitoringSignalBaseImpl{ + monitoringSignalBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorserverlesssparkcompute.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorserverlesssparkcompute.go index 3b8fa1179d6..980dcce2eb2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorserverlesssparkcompute.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_monitorserverlesssparkcompute.go @@ -16,6 +16,14 @@ type MonitorServerlessSparkCompute struct { RuntimeVersion string `json:"runtimeVersion"` // Fields inherited from MonitorComputeConfigurationBase + + ComputeType MonitorComputeType `json:"computeType"` +} + +func (s MonitorServerlessSparkCompute) MonitorComputeConfigurationBase() BaseMonitorComputeConfigurationBaseImpl { + return BaseMonitorComputeConfigurationBaseImpl{ + ComputeType: s.ComputeType, + } } var _ json.Marshaler = MonitorServerlessSparkCompute{} @@ -29,9 +37,10 @@ func (s MonitorServerlessSparkCompute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MonitorServerlessSparkCompute: %+v", err) } + decoded["computeType"] = "ServerlessSpark" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *MonitorServerlessSparkCompute) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MonitorServerlessSparkCompute: %+v", err) } + s.ComputeType = decoded.ComputeType s.InstanceType = decoded.InstanceType s.RuntimeVersion = decoded.RuntimeVersion @@ -60,7 +70,7 @@ func (s *MonitorServerlessSparkCompute) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["computeIdentity"]; ok { - impl, err := unmarshalMonitorComputeIdentityBaseImplementation(v) + impl, err := UnmarshalMonitorComputeIdentityBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ComputeIdentity' for 'MonitorServerlessSparkCompute': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mpi.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mpi.go index a6fda61ba4c..3b85b2b619f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_mpi.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_mpi.go @@ -14,6 +14,14 @@ type Mpi struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s Mpi) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = Mpi{} @@ -27,9 +35,10 @@ func (s Mpi) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mpi: %+v", err) } + decoded["distributionType"] = "Mpi" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_ncrossvalidations.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_ncrossvalidations.go index a21efe0d50a..02250ef5679 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_ncrossvalidations.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_ncrossvalidations.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NCrossValidations interface { + NCrossValidations() BaseNCrossValidationsImpl } -// RawNCrossValidationsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NCrossValidations = BaseNCrossValidationsImpl{} + +type BaseNCrossValidationsImpl struct { + Mode NCrossValidationsMode `json:"mode"` +} + +func (s BaseNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s +} + +var _ NCrossValidations = RawNCrossValidationsImpl{} + +// RawNCrossValidationsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNCrossValidationsImpl struct { - Type string - Values map[string]interface{} + nCrossValidations BaseNCrossValidationsImpl + Type string + Values map[string]interface{} +} + +func (s RawNCrossValidationsImpl) NCrossValidations() BaseNCrossValidationsImpl { + return s.nCrossValidations } -func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { +func UnmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalNCrossValidationsImplementation(input []byte) (NCrossValidations, return out, nil } - out := RawNCrossValidationsImpl{ - Type: value, - Values: temp, + var parent BaseNCrossValidationsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNCrossValidationsImpl: %+v", err) } - return out, nil + + return RawNCrossValidationsImpl{ + nCrossValidations: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_nodes.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_nodes.go index b45515f069a..823122a0fbe 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_nodes.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_nodes.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Nodes interface { + Nodes() BaseNodesImpl } -// RawNodesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Nodes = BaseNodesImpl{} + +type BaseNodesImpl struct { + NodesValueType NodesValueType `json:"nodesValueType"` +} + +func (s BaseNodesImpl) Nodes() BaseNodesImpl { + return s +} + +var _ Nodes = RawNodesImpl{} + +// RawNodesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNodesImpl struct { + nodes BaseNodesImpl Type string Values map[string]interface{} } -func unmarshalNodesImplementation(input []byte) (Nodes, error) { +func (s RawNodesImpl) Nodes() BaseNodesImpl { + return s.nodes +} + +func UnmarshalNodesImplementation(input []byte) (Nodes, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalNodesImplementation(input []byte) (Nodes, error) { return out, nil } - out := RawNodesImpl{ + var parent BaseNodesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNodesImpl: %+v", err) + } + + return RawNodesImpl{ + nodes: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_notificationsetting.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_notificationsetting.go index 79a2d62882e..ddc402225ba 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_notificationsetting.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_notificationsetting.go @@ -39,7 +39,7 @@ func (s *NotificationSetting) UnmarshalJSON(bytes []byte) error { output := make(map[string]Webhook) for key, val := range dictionaryTemp { - impl, err := unmarshalWebhookImplementation(val) + impl, err := UnmarshalWebhookImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'WebHooks' for 'NotificationSetting': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldatadriftmetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldatadriftmetricthreshold.go index 2cd773d0188..3460ccff0a9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldatadriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldatadriftmetricthreshold.go @@ -14,7 +14,16 @@ type NumericalDataDriftMetricThreshold struct { Metric NumericalDataDriftMetric `json:"metric"` // Fields inherited from DataDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalDataDriftMetricThreshold) DataDriftMetricThresholdBase() BaseDataDriftMetricThresholdBaseImpl { + return BaseDataDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalDataDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalDataDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalDataDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldataqualitymetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldataqualitymetricthreshold.go index 29d6764edc0..f1eda825312 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldataqualitymetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericaldataqualitymetricthreshold.go @@ -14,7 +14,16 @@ type NumericalDataQualityMetricThreshold struct { Metric NumericalDataQualityMetric `json:"metric"` // Fields inherited from DataQualityMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalDataQualityMetricThreshold) DataQualityMetricThresholdBase() BaseDataQualityMetricThresholdBaseImpl { + return BaseDataQualityMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalDataQualityMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalDataQualityMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalDataQualityMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericalpredictiondriftmetricthreshold.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericalpredictiondriftmetricthreshold.go index fc722265760..10824f04be8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericalpredictiondriftmetricthreshold.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_numericalpredictiondriftmetricthreshold.go @@ -14,7 +14,16 @@ type NumericalPredictionDriftMetricThreshold struct { Metric NumericalPredictionDriftMetric `json:"metric"` // Fields inherited from PredictionDriftMetricThresholdBase - Threshold *MonitoringThreshold `json:"threshold,omitempty"` + + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s NumericalPredictionDriftMetricThreshold) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return BasePredictionDriftMetricThresholdBaseImpl{ + DataType: s.DataType, + Threshold: s.Threshold, + } } var _ json.Marshaler = NumericalPredictionDriftMetricThreshold{} @@ -28,9 +37,10 @@ func (s NumericalPredictionDriftMetricThreshold) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NumericalPredictionDriftMetricThreshold: %+v", err) } + decoded["dataType"] = "Numerical" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_pipelinejob.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_pipelinejob.go index 72634536a8d..177591d9d7a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_pipelinejob.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_pipelinejob.go @@ -18,6 +18,7 @@ type PipelineJob struct { SourceJobId *string `json:"sourceJobId,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -25,6 +26,7 @@ type PipelineJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -32,6 +34,24 @@ type PipelineJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s PipelineJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = PipelineJob{} func (s PipelineJob) MarshalJSON() ([]byte, error) { @@ -43,9 +63,10 @@ func (s PipelineJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PipelineJob: %+v", err) } + decoded["jobType"] = "Pipeline" encoded, err = json.Marshal(decoded) @@ -71,6 +92,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Jobs = decoded.Jobs s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties @@ -86,7 +108,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'PipelineJob': %+v", err) } @@ -101,7 +123,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'PipelineJob': %+v", key, err) } @@ -118,7 +140,7 @@ func (s *PipelineJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'PipelineJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmetricthresholdbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmetricthresholdbase.go index 2d1e7393216..53e938aca62 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmetricthresholdbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmetricthresholdbase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PredictionDriftMetricThresholdBase interface { + PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl } -// RawPredictionDriftMetricThresholdBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PredictionDriftMetricThresholdBase = BasePredictionDriftMetricThresholdBaseImpl{} + +type BasePredictionDriftMetricThresholdBaseImpl struct { + DataType MonitoringFeatureDataType `json:"dataType"` + Threshold *MonitoringThreshold `json:"threshold,omitempty"` +} + +func (s BasePredictionDriftMetricThresholdBaseImpl) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return s +} + +var _ PredictionDriftMetricThresholdBase = RawPredictionDriftMetricThresholdBaseImpl{} + +// RawPredictionDriftMetricThresholdBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPredictionDriftMetricThresholdBaseImpl struct { - Type string - Values map[string]interface{} + predictionDriftMetricThresholdBase BasePredictionDriftMetricThresholdBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawPredictionDriftMetricThresholdBaseImpl) PredictionDriftMetricThresholdBase() BasePredictionDriftMetricThresholdBaseImpl { + return s.predictionDriftMetricThresholdBase } -func unmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (PredictionDriftMetricThresholdBase, error) { +func UnmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (PredictionDriftMetricThresholdBase, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalPredictionDriftMetricThresholdBaseImplementation(input []byte) (Pr return out, nil } - out := RawPredictionDriftMetricThresholdBaseImpl{ - Type: value, - Values: temp, + var parent BasePredictionDriftMetricThresholdBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePredictionDriftMetricThresholdBaseImpl: %+v", err) } - return out, nil + + return RawPredictionDriftMetricThresholdBaseImpl{ + predictionDriftMetricThresholdBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmonitoringsignal.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmonitoringsignal.go index f3dbfa1a022..12345f84fca 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmonitoringsignal.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_predictiondriftmonitoringsignal.go @@ -17,8 +17,18 @@ type PredictionDriftMonitoringSignal struct { ReferenceData MonitoringInputDataBase `json:"referenceData"` // Fields inherited from MonitoringSignalBase + NotificationTypes *[]MonitoringNotificationType `json:"notificationTypes,omitempty"` Properties *map[string]string `json:"properties,omitempty"` + SignalType MonitoringSignalType `json:"signalType"` +} + +func (s PredictionDriftMonitoringSignal) MonitoringSignalBase() BaseMonitoringSignalBaseImpl { + return BaseMonitoringSignalBaseImpl{ + NotificationTypes: s.NotificationTypes, + Properties: s.Properties, + SignalType: s.SignalType, + } } var _ json.Marshaler = PredictionDriftMonitoringSignal{} @@ -32,9 +42,10 @@ func (s PredictionDriftMonitoringSignal) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PredictionDriftMonitoringSignal: %+v", err) } + decoded["signalType"] = "PredictionDrift" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { s.FeatureDataTypeOverride = decoded.FeatureDataTypeOverride s.NotificationTypes = decoded.NotificationTypes s.Properties = decoded.Properties + s.SignalType = decoded.SignalType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -71,7 +83,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { output := make([]PredictionDriftMetricThresholdBase, 0) for i, val := range listTemp { - impl, err := unmarshalPredictionDriftMetricThresholdBaseImplementation(val) + impl, err := UnmarshalPredictionDriftMetricThresholdBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'MetricThresholds' for 'PredictionDriftMonitoringSignal': %+v", i, err) } @@ -81,7 +93,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["productionData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProductionData' for 'PredictionDriftMonitoringSignal': %+v", err) } @@ -89,7 +101,7 @@ func (s *PredictionDriftMonitoringSignal) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["referenceData"]; ok { - impl, err := unmarshalMonitoringInputDataBaseImplementation(v) + impl, err := UnmarshalMonitoringInputDataBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReferenceData' for 'PredictionDriftMonitoringSignal': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_pytorch.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_pytorch.go index c990fc64b04..0080d383d38 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_pytorch.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_pytorch.go @@ -14,6 +14,14 @@ type PyTorch struct { ProcessCountPerInstance *int64 `json:"processCountPerInstance,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s PyTorch) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = PyTorch{} @@ -27,9 +35,10 @@ func (s PyTorch) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PyTorch: %+v", err) } + decoded["distributionType"] = "PyTorch" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_randomsamplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_randomsamplingalgorithm.go index bc3242929de..3380183918e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_randomsamplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_randomsamplingalgorithm.go @@ -15,6 +15,14 @@ type RandomSamplingAlgorithm struct { Seed *int64 `json:"seed,omitempty"` // Fields inherited from SamplingAlgorithm + + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s RandomSamplingAlgorithm) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return BaseSamplingAlgorithmImpl{ + SamplingAlgorithmType: s.SamplingAlgorithmType, + } } var _ json.Marshaler = RandomSamplingAlgorithm{} @@ -28,9 +36,10 @@ func (s RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RandomSamplingAlgorithm: %+v", err) } + decoded["samplingAlgorithmType"] = "Random" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_recurrencetrigger.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_recurrencetrigger.go index e147909539d..83476eed9d2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_recurrencetrigger.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_recurrencetrigger.go @@ -16,9 +16,20 @@ type RecurrenceTrigger struct { Schedule *RecurrenceSchedule `json:"schedule,omitempty"` // Fields inherited from TriggerBase - EndTime *string `json:"endTime,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s RecurrenceTrigger) TriggerBase() BaseTriggerBaseImpl { + return BaseTriggerBaseImpl{ + EndTime: s.EndTime, + StartTime: s.StartTime, + TimeZone: s.TimeZone, + TriggerType: s.TriggerType, + } } var _ json.Marshaler = RecurrenceTrigger{} @@ -32,9 +43,10 @@ func (s RecurrenceTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecurrenceTrigger: %+v", err) } + decoded["triggerType"] = "Recurrence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_regression.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_regression.go index 9c48adb0e0e..4488a6e470c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_regression.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_regression.go @@ -24,11 +24,22 @@ type Regression struct { WeightColumnName *string `json:"weightColumnName,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s Regression) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = Regression{} func (s Regression) MarshalJSON() ([]byte, error) { @@ -40,9 +51,10 @@ func (s Regression) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Regression: %+v", err) } + decoded["taskType"] = "Regression" encoded, err = json.Marshal(decoded) @@ -68,6 +80,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { s.LogVerbosity = decoded.LogVerbosity s.PrimaryMetric = decoded.PrimaryMetric s.TargetColumnName = decoded.TargetColumnName + s.TaskType = decoded.TaskType s.TestData = decoded.TestData s.TestDataSize = decoded.TestDataSize s.TrainingData = decoded.TrainingData @@ -82,7 +95,7 @@ func (s *Regression) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["nCrossValidations"]; ok { - impl, err := unmarshalNCrossValidationsImplementation(v) + impl, err := UnmarshalNCrossValidationsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'NCrossValidations' for 'Regression': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_rollinginputdata.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_rollinginputdata.go index eaaaafcaf84..d464aee793e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_rollinginputdata.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_rollinginputdata.go @@ -16,10 +16,22 @@ type RollingInputData struct { WindowSize string `json:"windowSize"` // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s RollingInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = RollingInputData{} @@ -33,9 +45,10 @@ func (s RollingInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RollingInputData: %+v", err) } + decoded["inputDataType"] = "Rolling" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_samplingalgorithm.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_samplingalgorithm.go index 00a99b84535..18cb37c29b6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_samplingalgorithm.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_samplingalgorithm.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SamplingAlgorithm interface { + SamplingAlgorithm() BaseSamplingAlgorithmImpl } -// RawSamplingAlgorithmImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SamplingAlgorithm = BaseSamplingAlgorithmImpl{} + +type BaseSamplingAlgorithmImpl struct { + SamplingAlgorithmType SamplingAlgorithmType `json:"samplingAlgorithmType"` +} + +func (s BaseSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s +} + +var _ SamplingAlgorithm = RawSamplingAlgorithmImpl{} + +// RawSamplingAlgorithmImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSamplingAlgorithmImpl struct { - Type string - Values map[string]interface{} + samplingAlgorithm BaseSamplingAlgorithmImpl + Type string + Values map[string]interface{} +} + +func (s RawSamplingAlgorithmImpl) SamplingAlgorithm() BaseSamplingAlgorithmImpl { + return s.samplingAlgorithm } -func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { +func UnmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSamplingAlgorithmImplementation(input []byte) (SamplingAlgorithm, return out, nil } - out := RawSamplingAlgorithmImpl{ - Type: value, - Values: temp, + var parent BaseSamplingAlgorithmImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSamplingAlgorithmImpl: %+v", err) } - return out, nil + + return RawSamplingAlgorithmImpl{ + samplingAlgorithm: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_schedule.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_schedule.go index 74117728cbb..63ae3ce2e76 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_schedule.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_schedule.go @@ -41,7 +41,7 @@ func (s *Schedule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["action"]; ok { - impl, err := unmarshalScheduleActionBaseImplementation(v) + impl, err := UnmarshalScheduleActionBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Action' for 'Schedule': %+v", err) } @@ -49,7 +49,7 @@ func (s *Schedule) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["trigger"]; ok { - impl, err := unmarshalTriggerBaseImplementation(v) + impl, err := UnmarshalTriggerBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Trigger' for 'Schedule': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_scheduleactionbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_scheduleactionbase.go index b7019ad0e05..e8d7bafbf65 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_scheduleactionbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_scheduleactionbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScheduleActionBase interface { + ScheduleActionBase() BaseScheduleActionBaseImpl } -// RawScheduleActionBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScheduleActionBase = BaseScheduleActionBaseImpl{} + +type BaseScheduleActionBaseImpl struct { + ActionType ScheduleActionType `json:"actionType"` +} + +func (s BaseScheduleActionBaseImpl) ScheduleActionBase() BaseScheduleActionBaseImpl { + return s +} + +var _ ScheduleActionBase = RawScheduleActionBaseImpl{} + +// RawScheduleActionBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScheduleActionBaseImpl struct { - Type string - Values map[string]interface{} + scheduleActionBase BaseScheduleActionBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawScheduleActionBaseImpl) ScheduleActionBase() BaseScheduleActionBaseImpl { + return s.scheduleActionBase } -func unmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase, error) { +func UnmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalScheduleActionBaseImplementation(input []byte) (ScheduleActionBase return out, nil } - out := RawScheduleActionBaseImpl{ - Type: value, - Values: temp, + var parent BaseScheduleActionBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScheduleActionBaseImpl: %+v", err) } - return out, nil + + return RawScheduleActionBaseImpl{ + scheduleActionBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_seasonality.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_seasonality.go index ef94d040e8c..5a18fb21401 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_seasonality.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_seasonality.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Seasonality interface { + Seasonality() BaseSeasonalityImpl } -// RawSeasonalityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Seasonality = BaseSeasonalityImpl{} + +type BaseSeasonalityImpl struct { + Mode SeasonalityMode `json:"mode"` +} + +func (s BaseSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s +} + +var _ Seasonality = RawSeasonalityImpl{} + +// RawSeasonalityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSeasonalityImpl struct { - Type string - Values map[string]interface{} + seasonality BaseSeasonalityImpl + Type string + Values map[string]interface{} +} + +func (s RawSeasonalityImpl) Seasonality() BaseSeasonalityImpl { + return s.seasonality } -func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { +func UnmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSeasonalityImplementation(input []byte) (Seasonality, error) { return out, nil } - out := RawSeasonalityImpl{ - Type: value, - Values: temp, + var parent BaseSeasonalityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSeasonalityImpl: %+v", err) } - return out, nil + + return RawSeasonalityImpl{ + seasonality: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjob.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjob.go index 20d0a331b70..8eed3ca35ab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjob.go @@ -27,6 +27,7 @@ type SparkJob struct { Resources *SparkResourceConfiguration `json:"resources,omitempty"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -34,6 +35,7 @@ type SparkJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -41,6 +43,24 @@ type SparkJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s SparkJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SparkJob{} func (s SparkJob) MarshalJSON() ([]byte, error) { @@ -52,9 +72,10 @@ func (s SparkJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJob: %+v", err) } + decoded["jobType"] = "Spark" encoded, err = json.Marshal(decoded) @@ -88,6 +109,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { s.Files = decoded.Files s.IsArchived = decoded.IsArchived s.Jars = decoded.Jars + s.JobType = decoded.JobType s.NotificationSetting = decoded.NotificationSetting s.Properties = decoded.Properties s.PyFiles = decoded.PyFiles @@ -103,7 +125,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["entry"]; ok { - impl, err := unmarshalSparkJobEntryImplementation(v) + impl, err := UnmarshalSparkJobEntryImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Entry' for 'SparkJob': %+v", err) } @@ -111,7 +133,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SparkJob': %+v", err) } @@ -126,7 +148,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SparkJob': %+v", key, err) } @@ -143,7 +165,7 @@ func (s *SparkJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SparkJob': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobentry.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobentry.go index 7862f53c35a..d6dd2c7a1dd 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobentry.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SparkJobEntry interface { + SparkJobEntry() BaseSparkJobEntryImpl } -// RawSparkJobEntryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SparkJobEntry = BaseSparkJobEntryImpl{} + +type BaseSparkJobEntryImpl struct { + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s BaseSparkJobEntryImpl) SparkJobEntry() BaseSparkJobEntryImpl { + return s +} + +var _ SparkJobEntry = RawSparkJobEntryImpl{} + +// RawSparkJobEntryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSparkJobEntryImpl struct { - Type string - Values map[string]interface{} + sparkJobEntry BaseSparkJobEntryImpl + Type string + Values map[string]interface{} +} + +func (s RawSparkJobEntryImpl) SparkJobEntry() BaseSparkJobEntryImpl { + return s.sparkJobEntry } -func unmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { +func UnmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSparkJobEntryImplementation(input []byte) (SparkJobEntry, error) { return out, nil } - out := RawSparkJobEntryImpl{ - Type: value, - Values: temp, + var parent BaseSparkJobEntryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSparkJobEntryImpl: %+v", err) } - return out, nil + + return RawSparkJobEntryImpl{ + sparkJobEntry: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobpythonentry.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobpythonentry.go index afd049eda26..c2f27fda1d9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobpythonentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobpythonentry.go @@ -14,6 +14,14 @@ type SparkJobPythonEntry struct { File string `json:"file"` // Fields inherited from SparkJobEntry + + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s SparkJobPythonEntry) SparkJobEntry() BaseSparkJobEntryImpl { + return BaseSparkJobEntryImpl{ + SparkJobEntryType: s.SparkJobEntryType, + } } var _ json.Marshaler = SparkJobPythonEntry{} @@ -27,9 +35,10 @@ func (s SparkJobPythonEntry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJobPythonEntry: %+v", err) } + decoded["sparkJobEntryType"] = "SparkJobPythonEntry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobscalaentry.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobscalaentry.go index c610ff9c0a2..7ed587540f6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobscalaentry.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sparkjobscalaentry.go @@ -14,6 +14,14 @@ type SparkJobScalaEntry struct { ClassName string `json:"className"` // Fields inherited from SparkJobEntry + + SparkJobEntryType SparkJobEntryType `json:"sparkJobEntryType"` +} + +func (s SparkJobScalaEntry) SparkJobEntry() BaseSparkJobEntryImpl { + return BaseSparkJobEntryImpl{ + SparkJobEntryType: s.SparkJobEntryType, + } } var _ json.Marshaler = SparkJobScalaEntry{} @@ -27,9 +35,10 @@ func (s SparkJobScalaEntry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SparkJobScalaEntry: %+v", err) } + decoded["sparkJobEntryType"] = "SparkJobScalaEntry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_staticinputdata.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_staticinputdata.go index 06272df74ee..62b8fd2eeb7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_staticinputdata.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_staticinputdata.go @@ -16,10 +16,22 @@ type StaticInputData struct { WindowStart string `json:"windowStart"` // Fields inherited from MonitoringInputDataBase - Columns *map[string]string `json:"columns,omitempty"` - DataContext *string `json:"dataContext,omitempty"` - JobInputType JobInputType `json:"jobInputType"` - Uri string `json:"uri"` + + Columns *map[string]string `json:"columns,omitempty"` + DataContext *string `json:"dataContext,omitempty"` + InputDataType MonitoringInputDataType `json:"inputDataType"` + JobInputType JobInputType `json:"jobInputType"` + Uri string `json:"uri"` +} + +func (s StaticInputData) MonitoringInputDataBase() BaseMonitoringInputDataBaseImpl { + return BaseMonitoringInputDataBaseImpl{ + Columns: s.Columns, + DataContext: s.DataContext, + InputDataType: s.InputDataType, + JobInputType: s.JobInputType, + Uri: s.Uri, + } } var _ json.Marshaler = StaticInputData{} @@ -33,9 +45,10 @@ func (s StaticInputData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StaticInputData: %+v", err) } + decoded["inputDataType"] = "Static" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjob.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjob.go index 5c4646f2e34..fd951422d77 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjob.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjob.go @@ -22,6 +22,7 @@ type SweepJob struct { Trial TrialComponent `json:"trial"` // Fields inherited from JobBase + ComponentId *string `json:"componentId,omitempty"` ComputeId *string `json:"computeId,omitempty"` Description *string `json:"description,omitempty"` @@ -29,6 +30,7 @@ type SweepJob struct { ExperimentName *string `json:"experimentName,omitempty"` Identity IdentityConfiguration `json:"identity"` IsArchived *bool `json:"isArchived,omitempty"` + JobType JobType `json:"jobType"` NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` Properties *map[string]string `json:"properties,omitempty"` Services *map[string]JobService `json:"services,omitempty"` @@ -36,6 +38,24 @@ type SweepJob struct { Tags *map[string]string `json:"tags,omitempty"` } +func (s SweepJob) JobBase() BaseJobBaseImpl { + return BaseJobBaseImpl{ + ComponentId: s.ComponentId, + ComputeId: s.ComputeId, + Description: s.Description, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Properties: s.Properties, + Services: s.Services, + Status: s.Status, + Tags: s.Tags, + } +} + var _ json.Marshaler = SweepJob{} func (s SweepJob) MarshalJSON() ([]byte, error) { @@ -47,9 +67,10 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJob: %+v", err) } + decoded["jobType"] = "Sweep" encoded, err = json.Marshal(decoded) @@ -75,6 +96,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { s.DisplayName = decoded.DisplayName s.ExperimentName = decoded.ExperimentName s.IsArchived = decoded.IsArchived + s.JobType = decoded.JobType s.Limits = decoded.Limits s.NotificationSetting = decoded.NotificationSetting s.Objective = decoded.Objective @@ -92,7 +114,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["earlyTermination"]; ok { - impl, err := unmarshalEarlyTerminationPolicyImplementation(v) + impl, err := UnmarshalEarlyTerminationPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EarlyTermination' for 'SweepJob': %+v", err) } @@ -100,7 +122,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["identity"]; ok { - impl, err := unmarshalIdentityConfigurationImplementation(v) + impl, err := UnmarshalIdentityConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Identity' for 'SweepJob': %+v", err) } @@ -115,7 +137,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobInput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Inputs' for 'SweepJob': %+v", key, err) } @@ -132,7 +154,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { output := make(map[string]JobOutput) for key, val := range dictionaryTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'Outputs' for 'SweepJob': %+v", key, err) } @@ -142,7 +164,7 @@ func (s *SweepJob) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["samplingAlgorithm"]; ok { - impl, err := unmarshalSamplingAlgorithmImplementation(v) + impl, err := UnmarshalSamplingAlgorithmImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SamplingAlgorithm' for 'SweepJob': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjoblimits.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjoblimits.go index 3e4d528e82f..5784a1c4cf3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjoblimits.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_sweepjoblimits.go @@ -16,7 +16,16 @@ type SweepJobLimits struct { TrialTimeout *string `json:"trialTimeout,omitempty"` // Fields inherited from JobLimits - Timeout *string `json:"timeout,omitempty"` + + JobLimitsType JobLimitsType `json:"jobLimitsType"` + Timeout *string `json:"timeout,omitempty"` +} + +func (s SweepJobLimits) JobLimits() BaseJobLimitsImpl { + return BaseJobLimitsImpl{ + JobLimitsType: s.JobLimitsType, + Timeout: s.Timeout, + } } var _ json.Marshaler = SweepJobLimits{} @@ -30,9 +39,10 @@ func (s SweepJobLimits) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SweepJobLimits: %+v", err) } + decoded["jobLimitsType"] = "Sweep" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetlags.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetlags.go index 6d9d04623a6..13f6b53f8a3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetlags.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetlags.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetLags interface { + TargetLags() BaseTargetLagsImpl } -// RawTargetLagsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetLags = BaseTargetLagsImpl{} + +type BaseTargetLagsImpl struct { + Mode TargetLagsMode `json:"mode"` +} + +func (s BaseTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s +} + +var _ TargetLags = RawTargetLagsImpl{} + +// RawTargetLagsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetLagsImpl struct { - Type string - Values map[string]interface{} + targetLags BaseTargetLagsImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetLagsImpl) TargetLags() BaseTargetLagsImpl { + return s.targetLags } -func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { +func UnmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetLagsImplementation(input []byte) (TargetLags, error) { return out, nil } - out := RawTargetLagsImpl{ - Type: value, - Values: temp, + var parent BaseTargetLagsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetLagsImpl: %+v", err) } - return out, nil + + return RawTargetLagsImpl{ + targetLags: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetrollingwindowsize.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetrollingwindowsize.go index 27d08fe3268..65123411be1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetrollingwindowsize.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_targetrollingwindowsize.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetRollingWindowSize interface { + TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl } -// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetRollingWindowSize = BaseTargetRollingWindowSizeImpl{} + +type BaseTargetRollingWindowSizeImpl struct { + Mode TargetRollingWindowSizeMode `json:"mode"` +} + +func (s BaseTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s +} + +var _ TargetRollingWindowSize = RawTargetRollingWindowSizeImpl{} + +// RawTargetRollingWindowSizeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetRollingWindowSizeImpl struct { - Type string - Values map[string]interface{} + targetRollingWindowSize BaseTargetRollingWindowSizeImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetRollingWindowSizeImpl) TargetRollingWindowSize() BaseTargetRollingWindowSizeImpl { + return s.targetRollingWindowSize } -func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { +func UnmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRollingWindowSize, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTargetRollingWindowSizeImplementation(input []byte) (TargetRolling return out, nil } - out := RawTargetRollingWindowSizeImpl{ - Type: value, - Values: temp, + var parent BaseTargetRollingWindowSizeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetRollingWindowSizeImpl: %+v", err) } - return out, nil + + return RawTargetRollingWindowSizeImpl{ + targetRollingWindowSize: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tensorflow.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tensorflow.go index 58472d12ff5..0aa30ef2b8d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tensorflow.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tensorflow.go @@ -15,6 +15,14 @@ type TensorFlow struct { WorkerCount *int64 `json:"workerCount,omitempty"` // Fields inherited from DistributionConfiguration + + DistributionType DistributionType `json:"distributionType"` +} + +func (s TensorFlow) DistributionConfiguration() BaseDistributionConfigurationImpl { + return BaseDistributionConfigurationImpl{ + DistributionType: s.DistributionType, + } } var _ json.Marshaler = TensorFlow{} @@ -28,9 +36,10 @@ func (s TensorFlow) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TensorFlow: %+v", err) } + decoded["distributionType"] = "TensorFlow" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassification.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassification.go index e3f1e2e14fe..2b0b698d039 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassification.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassification.go @@ -17,11 +17,22 @@ type TextClassification struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassification) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassification{} func (s TextClassification) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassification) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassification: %+v", err) } + decoded["taskType"] = "TextClassification" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassificationmultilabel.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassificationmultilabel.go index b4dacd722ef..8b125d0d634 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassificationmultilabel.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textclassificationmultilabel.go @@ -17,11 +17,22 @@ type TextClassificationMultilabel struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextClassificationMultilabel) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextClassificationMultilabel{} func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextClassificationMultilabel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextClassificationMultilabel: %+v", err) } + decoded["taskType"] = "TextClassificationMultilabel" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textner.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textner.go index 65392fcd368..c28ae2fb0ab 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_textner.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_textner.go @@ -17,11 +17,22 @@ type TextNer struct { ValidationData *MLTableJobInput `json:"validationData,omitempty"` // Fields inherited from AutoMLVertical + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` TargetColumnName *string `json:"targetColumnName,omitempty"` + TaskType TaskType `json:"taskType"` TrainingData MLTableJobInput `json:"trainingData"` } +func (s TextNer) AutoMLVertical() BaseAutoMLVerticalImpl { + return BaseAutoMLVerticalImpl{ + LogVerbosity: s.LogVerbosity, + TargetColumnName: s.TargetColumnName, + TaskType: s.TaskType, + TrainingData: s.TrainingData, + } +} + var _ json.Marshaler = TextNer{} func (s TextNer) MarshalJSON() ([]byte, error) { @@ -33,9 +44,10 @@ func (s TextNer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextNer: %+v", err) } + decoded["taskType"] = "TextNER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_topnfeaturesbyattribution.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_topnfeaturesbyattribution.go index 3cfecc0fde6..a1deedf888c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_topnfeaturesbyattribution.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_topnfeaturesbyattribution.go @@ -14,6 +14,14 @@ type TopNFeaturesByAttribution struct { Top *int64 `json:"top,omitempty"` // Fields inherited from MonitoringFeatureFilterBase + + FilterType MonitoringFeatureFilterType `json:"filterType"` +} + +func (s TopNFeaturesByAttribution) MonitoringFeatureFilterBase() BaseMonitoringFeatureFilterBaseImpl { + return BaseMonitoringFeatureFilterBaseImpl{ + FilterType: s.FilterType, + } } var _ json.Marshaler = TopNFeaturesByAttribution{} @@ -27,9 +35,10 @@ func (s TopNFeaturesByAttribution) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TopNFeaturesByAttribution: %+v", err) } + decoded["filterType"] = "TopNByAttribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_trialcomponent.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_trialcomponent.go index fd60788bcab..7efc1868c61 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_trialcomponent.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_trialcomponent.go @@ -38,7 +38,7 @@ func (s *TrialComponent) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["distribution"]; ok { - impl, err := unmarshalDistributionConfigurationImplementation(v) + impl, err := UnmarshalDistributionConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Distribution' for 'TrialComponent': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_triggerbase.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_triggerbase.go index 56bbfd7326c..bf4adc77f22 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_triggerbase.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_triggerbase.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TriggerBase interface { + TriggerBase() BaseTriggerBaseImpl } -// RawTriggerBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TriggerBase = BaseTriggerBaseImpl{} + +type BaseTriggerBaseImpl struct { + EndTime *string `json:"endTime,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` + TriggerType TriggerType `json:"triggerType"` +} + +func (s BaseTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s +} + +var _ TriggerBase = RawTriggerBaseImpl{} + +// RawTriggerBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTriggerBaseImpl struct { - Type string - Values map[string]interface{} + triggerBase BaseTriggerBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTriggerBaseImpl) TriggerBase() BaseTriggerBaseImpl { + return s.triggerBase } -func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { +func UnmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalTriggerBaseImplementation(input []byte) (TriggerBase, error) { return out, nil } - out := RawTriggerBaseImpl{ - Type: value, - Values: temp, + var parent BaseTriggerBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTriggerBaseImpl: %+v", err) } - return out, nil + + return RawTriggerBaseImpl{ + triggerBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljobinput.go index b977b812870..8b70c4466f0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljobinput.go @@ -15,7 +15,16 @@ type TritonModelJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s TritonModelJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = TritonModelJobInput{} @@ -29,9 +38,10 @@ func (s TritonModelJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobInput: %+v", err) } + decoded["jobInputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljoboutput.go index 1041f9cb867..6de11b4b5e8 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_tritonmodeljoboutput.go @@ -15,7 +15,16 @@ type TritonModelJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s TritonModelJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = TritonModelJobOutput{} @@ -29,9 +38,10 @@ func (s TritonModelJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TritonModelJobOutput: %+v", err) } + decoded["jobOutputType"] = "triton_model" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_truncationselectionpolicy.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_truncationselectionpolicy.go index 512062354ba..16f731bc40f 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_truncationselectionpolicy.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_truncationselectionpolicy.go @@ -14,8 +14,18 @@ type TruncationSelectionPolicy struct { TruncationPercentage *int64 `json:"truncationPercentage,omitempty"` // Fields inherited from EarlyTerminationPolicy - DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` - EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + + DelayEvaluation *int64 `json:"delayEvaluation,omitempty"` + EvaluationInterval *int64 `json:"evaluationInterval,omitempty"` + PolicyType EarlyTerminationPolicyType `json:"policyType"` +} + +func (s TruncationSelectionPolicy) EarlyTerminationPolicy() BaseEarlyTerminationPolicyImpl { + return BaseEarlyTerminationPolicyImpl{ + DelayEvaluation: s.DelayEvaluation, + EvaluationInterval: s.EvaluationInterval, + PolicyType: s.PolicyType, + } } var _ json.Marshaler = TruncationSelectionPolicy{} @@ -29,9 +39,10 @@ func (s TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TruncationSelectionPolicy: %+v", err) } + decoded["policyType"] = "TruncationSelection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejobinput.go index 2ce7430a3de..1d1a59f9468 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejobinput.go @@ -15,7 +15,16 @@ type UriFileJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFileJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFileJobInput{} @@ -29,9 +38,10 @@ func (s UriFileJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobInput: %+v", err) } + decoded["jobInputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejoboutput.go index 6895e7be379..b136431372e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifilejoboutput.go @@ -15,7 +15,16 @@ type UriFileJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFileJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFileJobOutput{} @@ -29,9 +38,10 @@ func (s UriFileJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFileJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_file" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjobinput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjobinput.go index d6c5f832dfa..a13e02468b1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjobinput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjobinput.go @@ -15,7 +15,16 @@ type UriFolderJobInput struct { Uri string `json:"uri"` // Fields inherited from JobInput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobInputType JobInputType `json:"jobInputType"` +} + +func (s UriFolderJobInput) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + Description: s.Description, + JobInputType: s.JobInputType, + } } var _ json.Marshaler = UriFolderJobInput{} @@ -29,9 +38,10 @@ func (s UriFolderJobInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobInput: %+v", err) } + decoded["jobInputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjoboutput.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjoboutput.go index f4fd2929aae..4d651c86f9e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjoboutput.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_urifolderjoboutput.go @@ -15,7 +15,16 @@ type UriFolderJobOutput struct { Uri *string `json:"uri,omitempty"` // Fields inherited from JobOutput - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + JobOutputType JobOutputType `json:"jobOutputType"` +} + +func (s UriFolderJobOutput) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + Description: s.Description, + JobOutputType: s.JobOutputType, + } } var _ json.Marshaler = UriFolderJobOutput{} @@ -29,9 +38,10 @@ func (s UriFolderJobOutput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UriFolderJobOutput: %+v", err) } + decoded["jobOutputType"] = "uri_folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_useridentity.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_useridentity.go index aa6e7c8b2f7..4871dca1b51 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_useridentity.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_useridentity.go @@ -13,6 +13,14 @@ var _ IdentityConfiguration = UserIdentity{} type UserIdentity struct { // Fields inherited from IdentityConfiguration + + IdentityType IdentityConfigurationType `json:"identityType"` +} + +func (s UserIdentity) IdentityConfiguration() BaseIdentityConfigurationImpl { + return BaseIdentityConfigurationImpl{ + IdentityType: s.IdentityType, + } } var _ json.Marshaler = UserIdentity{} @@ -26,9 +34,10 @@ func (s UserIdentity) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserIdentity: %+v", err) } + decoded["identityType"] = "UserIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/model_webhook.go b/resource-manager/machinelearningservices/2024-04-01/schedule/model_webhook.go index 657856ae36e..9bef1e12c67 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/model_webhook.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/model_webhook.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Webhook interface { + Webhook() BaseWebhookImpl } -// RawWebhookImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Webhook = BaseWebhookImpl{} + +type BaseWebhookImpl struct { + EventType *string `json:"eventType,omitempty"` + WebhookType WebhookType `json:"webhookType"` +} + +func (s BaseWebhookImpl) Webhook() BaseWebhookImpl { + return s +} + +var _ Webhook = RawWebhookImpl{} + +// RawWebhookImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWebhookImpl struct { - Type string - Values map[string]interface{} + webhook BaseWebhookImpl + Type string + Values map[string]interface{} +} + +func (s RawWebhookImpl) Webhook() BaseWebhookImpl { + return s.webhook } -func unmarshalWebhookImplementation(input []byte) (Webhook, error) { +func UnmarshalWebhookImplementation(input []byte) (Webhook, error) { if input == nil { return nil, nil } @@ -44,10 +62,15 @@ func unmarshalWebhookImplementation(input []byte) (Webhook, error) { return out, nil } - out := RawWebhookImpl{ - Type: value, - Values: temp, + var parent BaseWebhookImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWebhookImpl: %+v", err) } - return out, nil + + return RawWebhookImpl{ + webhook: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/schedule/version.go b/resource-manager/machinelearningservices/2024-04-01/schedule/version.go index 5deafe03b41..6f6b5d6fc4d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/schedule/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/schedule/version.go @@ -1,12 +1,10 @@ package schedule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/schedule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/schedule/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/README.md b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/README.md index e2225759848..9446b6d2886 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint` Documentation -The `serverlessendpoint` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `serverlessendpoint` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/client.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/client.go index dee524abef5..0ef60316cf4 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/client.go @@ -15,7 +15,7 @@ type ServerlessEndpointClient struct { } func NewServerlessEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerlessEndpointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverlessendpoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverlessendpoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerlessEndpointClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_serverlessendpoint.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_serverlessendpoint.go index b48282e7664..e983803f7b2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_serverlessendpoint.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_serverlessendpoint.go @@ -44,7 +44,7 @@ func ParseServerlessEndpointID(input string) (*ServerlessEndpointId, error) { } id := ServerlessEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerlessEndpointIDInsensitively(input string) (*ServerlessEndpointId } id := ServerlessEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_workspace.go index 7d30368364c..a621c5e615c 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_get.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_get.go index 2271e77b3cc..cbfbe01eaa3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_get.go @@ -45,7 +45,6 @@ func (c ServerlessEndpointClient) Get(ctx context.Context, id ServerlessEndpoint var model ServerlessEndpointTrackedResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_list.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_list.go index df7f2b6ff8f..80fe546bd6e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_listkeys.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_listkeys.go index 49f4e348196..5305675ec86 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_listkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/method_listkeys.go @@ -46,7 +46,6 @@ func (c ServerlessEndpointClient) ListKeys(ctx context.Context, id ServerlessEnd var model EndpointAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/version.go b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/version.go index 1d3f75295c5..d77e124c969 100644 --- a/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint/version.go @@ -1,12 +1,10 @@ package serverlessendpoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverlessendpoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverlessendpoint/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/README.md b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/README.md index f5a01070e48..723d1c38835 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource` Documentation -The `v2workspaceconnectionresource` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `v2workspaceconnectionresource` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/client.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/client.go index 87e517da19e..0295936051a 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/client.go @@ -15,7 +15,7 @@ type V2WorkspaceConnectionResourceClient struct { } func NewV2WorkspaceConnectionResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*V2WorkspaceConnectionResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "v2workspaceconnectionresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "v2workspaceconnectionresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating V2WorkspaceConnectionResourceClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_connection.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_connection.go index 1a4e532b599..342a3c6b0ff 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_connection.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_connection.go @@ -44,7 +44,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_workspace.go index e3ba2bd06b8..a09c711f4ca 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go index a0abc732488..5441ad41b4b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionscreate.go @@ -49,7 +49,6 @@ func (c V2WorkspaceConnectionResourceClient) WorkspaceConnectionsCreate(ctx cont var model WorkspaceConnectionPropertiesV2BasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go index fb766b3f75f..f7f1df9c9fb 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionsget.go @@ -45,7 +45,6 @@ func (c V2WorkspaceConnectionResourceClient) WorkspaceConnectionsGet(ctx context var model WorkspaceConnectionPropertiesV2BasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go index 9cb93aa7e2f..eb02f9aa967 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslist.go @@ -40,6 +40,7 @@ func (o WorkspaceConnectionsListOperationOptions) ToHeaders() *client.Headers { func (o WorkspaceConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslistsecrets.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslistsecrets.go index 49c550c509a..5e15670b0b9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslistsecrets.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/method_workspaceconnectionslistsecrets.go @@ -46,7 +46,6 @@ func (c V2WorkspaceConnectionResourceClient) WorkspaceConnectionsListSecrets(ctx var model WorkspaceConnectionPropertiesV2BasicResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_aadauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_aadauthtypeworkspaceconnectionproperties.go index 2d0ec7f45a2..275a8eb73ae 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_aadauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_aadauthtypeworkspaceconnectionproperties.go @@ -16,6 +16,8 @@ var _ WorkspaceConnectionPropertiesV2 = AADAuthTypeWorkspaceConnectionProperties type AADAuthTypeWorkspaceConnectionProperties struct { // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -28,6 +30,22 @@ type AADAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s AADAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *AADAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -51,9 +69,10 @@ func (s AADAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "AAD" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accesskeyauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accesskeyauthtypeworkspaceconnectionproperties.go index dba64242352..99f3bd09761 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accesskeyauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accesskeyauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type AccessKeyAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionAccessKey `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type AccessKeyAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s AccessKeyAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *AccessKeyAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s AccessKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccessKeyAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "AccessKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accountkeyauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accountkeyauthtypeworkspaceconnectionproperties.go index 3dfb94a2287..f46bcb78187 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accountkeyauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_accountkeyauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type AccountKeyAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionAccountKey `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type AccountKeyAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s AccountKeyAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *AccountKeyAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s AccountKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccountKeyAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "AccountKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_apikeyauthworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_apikeyauthworkspaceconnectionproperties.go index 2036407b5f3..77ea15f4197 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_apikeyauthworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_apikeyauthworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type ApiKeyAuthWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionApiKey `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type ApiKeyAuthWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s ApiKeyAuthWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *ApiKeyAuthWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s ApiKeyAuthWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApiKeyAuthWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "ApiKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_customkeysworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_customkeysworkspaceconnectionproperties.go index e93bf4d68b5..9478e790770 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_customkeysworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_customkeysworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type CustomKeysWorkspaceConnectionProperties struct { Credentials *CustomKeys `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type CustomKeysWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s CustomKeysWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *CustomKeysWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s CustomKeysWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomKeysWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "CustomKeys" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go index 61ae1732909..dd807bedcb5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_managedidentityauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s ManagedIdentityAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]b } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIdentityAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "ManagedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go index 9b5d916da68..a7021260298 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_noneauthtypeworkspaceconnectionproperties.go @@ -16,6 +16,8 @@ var _ WorkspaceConnectionPropertiesV2 = NoneAuthTypeWorkspaceConnectionPropertie type NoneAuthTypeWorkspaceConnectionProperties struct { // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -28,6 +30,22 @@ type NoneAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s NoneAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *NoneAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -51,9 +69,10 @@ func (s NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NoneAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "None" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_oauth2authtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_oauth2authtypeworkspaceconnectionproperties.go index 611c78316e9..0e5bd86d733 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_oauth2authtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_oauth2authtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type OAuth2AuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionOAuth2 `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type OAuth2AuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s OAuth2AuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *OAuth2AuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s OAuth2AuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OAuth2AuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "OAuth2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go index fc9e63800a6..5bc9b19c7c7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_patauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type PATAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type PATAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s PATAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *PATAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PATAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "PAT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go index 96c8ed314bb..356bc4467e2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_sasauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type SASAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionSharedAccessSignature `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type SASAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s SASAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *SASAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SASAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "SAS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_serviceprincipalauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_serviceprincipalauthtypeworkspaceconnectionproperties.go index 8ef1f094466..02d616a82d6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_serviceprincipalauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_serviceprincipalauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionServicePrincipal `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s ServicePrincipalAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *ServicePrincipalAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s ServicePrincipalAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "ServicePrincipal" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go index 88337bedc92..86cb683ab19 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_usernamepasswordauthtypeworkspaceconnectionproperties.go @@ -17,6 +17,8 @@ type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct { Credentials *WorkspaceConnectionUsernamePassword `json:"credentials,omitempty"` // Fields inherited from WorkspaceConnectionPropertiesV2 + + AuthType ConnectionAuthType `json:"authType"` Category *ConnectionCategory `json:"category,omitempty"` CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` ExpiryTime *string `json:"expiryTime,omitempty"` @@ -29,6 +31,22 @@ type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct { ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } +func (s UsernamePasswordAuthTypeWorkspaceConnectionProperties) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return BaseWorkspaceConnectionPropertiesV2Impl{ + AuthType: s.AuthType, + Category: s.Category, + CreatedByWorkspaceArmId: s.CreatedByWorkspaceArmId, + ExpiryTime: s.ExpiryTime, + Group: s.Group, + IsSharedToAll: s.IsSharedToAll, + Metadata: s.Metadata, + SharedUserList: s.SharedUserList, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + func (o *UsernamePasswordAuthTypeWorkspaceConnectionProperties) GetExpiryTimeAsTime() (*time.Time, error) { if o.ExpiryTime == nil { return nil, nil @@ -52,9 +70,10 @@ func (s UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UsernamePasswordAuthTypeWorkspaceConnectionProperties: %+v", err) } + decoded["authType"] = "UsernamePassword" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go index 32c4ced1753..0a6d819c8e3 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2.go @@ -10,18 +10,45 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkspaceConnectionPropertiesV2 interface { + WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl } -// RawWorkspaceConnectionPropertiesV2Impl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkspaceConnectionPropertiesV2 = BaseWorkspaceConnectionPropertiesV2Impl{} + +type BaseWorkspaceConnectionPropertiesV2Impl struct { + AuthType ConnectionAuthType `json:"authType"` + Category *ConnectionCategory `json:"category,omitempty"` + CreatedByWorkspaceArmId *string `json:"createdByWorkspaceArmId,omitempty"` + ExpiryTime *string `json:"expiryTime,omitempty"` + Group *ConnectionGroup `json:"group,omitempty"` + IsSharedToAll *bool `json:"isSharedToAll,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` + SharedUserList *[]string `json:"sharedUserList,omitempty"` + Target *string `json:"target,omitempty"` + Value *string `json:"value,omitempty"` + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +func (s BaseWorkspaceConnectionPropertiesV2Impl) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return s +} + +var _ WorkspaceConnectionPropertiesV2 = RawWorkspaceConnectionPropertiesV2Impl{} + +// RawWorkspaceConnectionPropertiesV2Impl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkspaceConnectionPropertiesV2Impl struct { - Type string - Values map[string]interface{} + workspaceConnectionPropertiesV2 BaseWorkspaceConnectionPropertiesV2Impl + Type string + Values map[string]interface{} +} + +func (s RawWorkspaceConnectionPropertiesV2Impl) WorkspaceConnectionPropertiesV2() BaseWorkspaceConnectionPropertiesV2Impl { + return s.workspaceConnectionPropertiesV2 } -func unmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (WorkspaceConnectionPropertiesV2, error) { +func UnmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (WorkspaceConnectionPropertiesV2, error) { if input == nil { return nil, nil } @@ -132,10 +159,15 @@ func unmarshalWorkspaceConnectionPropertiesV2Implementation(input []byte) (Works return out, nil } - out := RawWorkspaceConnectionPropertiesV2Impl{ - Type: value, - Values: temp, + var parent BaseWorkspaceConnectionPropertiesV2Impl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkspaceConnectionPropertiesV2Impl: %+v", err) } - return out, nil + + return RawWorkspaceConnectionPropertiesV2Impl{ + workspaceConnectionPropertiesV2: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go index f1723dd5b23..eaee9dfba80 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/model_workspaceconnectionpropertiesv2basicresource.go @@ -38,7 +38,7 @@ func (s *WorkspaceConnectionPropertiesV2BasicResource) UnmarshalJSON(bytes []byt } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkspaceConnectionPropertiesV2Implementation(v) + impl, err := UnmarshalWorkspaceConnectionPropertiesV2Implementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkspaceConnectionPropertiesV2BasicResource': %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/version.go b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/version.go index 1277be9ea02..92aed47b9c6 100644 --- a/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/v2workspaceconnectionresource/version.go @@ -1,12 +1,10 @@ package v2workspaceconnectionresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/v2workspaceconnectionresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/v2workspaceconnectionresource/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/README.md b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/README.md index 0f58a87818f..b34ca7bff90 100644 --- a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes` Documentation -The `virtualmachinesizes` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `virtualmachinesizes` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/client.go b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/client.go index b752073001c..cce54e682d2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/client.go @@ -15,7 +15,7 @@ type VirtualMachineSizesClient struct { } func NewVirtualMachineSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineSizesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/id_location.go b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/id_location.go index 6045c49cbeb..f03a8b98c3d 100644 --- a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/id_location.go +++ b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/method_list.go b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/method_list.go index 8fa9b5ae1e1..15d02b46c23 100644 --- a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/method_list.go +++ b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/method_list.go @@ -46,7 +46,6 @@ func (c VirtualMachineSizesClient) List(ctx context.Context, id LocationId) (res var model VirtualMachineSizeListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/version.go b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/version.go index 11dfa7cee84..500a51554cf 100644 --- a/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/virtualmachinesizes/version.go @@ -1,12 +1,10 @@ package virtualmachinesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinesizes/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/README.md b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/README.md index 0dcf9994721..d9d18ad2162 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections` Documentation -The `workspaceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `workspaceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/client.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/client.go index 5d0dfaffa14..7f6dad6c63b 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateEndpointConnectionsClient struct { } func NewWorkspacePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/id_privateendpointconnection.go index 969be0628ce..82eb9120595 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index afe8d5ba983..875cb76a479 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -49,7 +49,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) PrivateEndpointConnectionsCre var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go index dcfee9208ad..f7aa9bd0806 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c WorkspacePrivateEndpointConnectionsClient) PrivateEndpointConnectionsGet var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/version.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/version.go index 770ba5408b6..c3505209fc1 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package workspaceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivateendpointconnections/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/README.md b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/README.md index 64675cf630c..d2dad664ebe 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources` Documentation -The `workspaceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `workspaceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/client.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/client.go index d55e8f899cf..d315e1e2908 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type WorkspacePrivateLinkResourcesClient struct { } func NewWorkspacePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/id_workspace.go index b4f59dcc94b..f4bd408e385 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go index c3573f06fd8..91299f85e41 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/method_privatelinkresourceslist.go @@ -46,7 +46,6 @@ func (c WorkspacePrivateLinkResourcesClient) PrivateLinkResourcesList(ctx contex var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/version.go b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/version.go index 49b584128ff..84f202e4aa5 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package workspaceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceprivatelinkresources/2024-04-01" } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/README.md b/resource-manager/machinelearningservices/2024-04-01/workspaces/README.md index 3b3a199388d..2bd60ba5ca9 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/README.md +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `machinelearningservices` (API Version `2024-04-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `machinelearningservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/client.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/client.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/id_workspace.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/id_workspace.go index a9e58042a49..e6bfb6194f2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/id_workspace.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_delete.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_delete.go index b41fca1fe8c..5297485af30 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_delete.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_get.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_get.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbyresourcegroup.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbyresourcegroup.go index f485d22dee7..dc63c4f42e7 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbysubscription.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbysubscription.go index 424d45bb49b..39d3586061e 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbysubscription.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listkeys.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listkeys.go index fa450632461..54b28298920 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listkeys.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listkeys.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) ListKeys(ctx context.Context, id WorkspaceId) (result var model ListWorkspaceKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listnotebookaccesstoken.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listnotebookaccesstoken.go index f699e11bbf4..d6f35efb8b2 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listnotebookaccesstoken.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/method_listnotebookaccesstoken.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) ListNotebookAccessToken(ctx context.Context, id Worksp var model NotebookAccessTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_fqdnoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_fqdnoutboundrule.go index 9297fe8225d..71707cd0354 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_fqdnoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_fqdnoutboundrule.go @@ -14,8 +14,18 @@ type FqdnOutboundRule struct { Destination *string `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s FqdnOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = FqdnOutboundRule{} @@ -29,9 +39,10 @@ func (s FqdnOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FqdnOutboundRule: %+v", err) } + decoded["type"] = "FQDN" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_managednetworksettings.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_managednetworksettings.go index c4476d33915..de084378da0 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_managednetworksettings.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_managednetworksettings.go @@ -41,7 +41,7 @@ func (s *ManagedNetworkSettings) UnmarshalJSON(bytes []byte) error { output := make(map[string]OutboundRule) for key, val := range dictionaryTemp { - impl, err := unmarshalOutboundRuleImplementation(val) + impl, err := UnmarshalOutboundRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling key %q field 'OutboundRules' for 'ManagedNetworkSettings': %+v", key, err) } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_outboundrule.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_outboundrule.go index d38c04e13ac..55d78dc13ba 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_outboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_outboundrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutboundRule interface { + OutboundRule() BaseOutboundRuleImpl } -// RawOutboundRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutboundRule = BaseOutboundRuleImpl{} + +type BaseOutboundRuleImpl struct { + Category *RuleCategory `json:"category,omitempty"` + Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s BaseOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s +} + +var _ OutboundRule = RawOutboundRuleImpl{} + +// RawOutboundRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutboundRuleImpl struct { - Type string - Values map[string]interface{} + outboundRule BaseOutboundRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawOutboundRuleImpl) OutboundRule() BaseOutboundRuleImpl { + return s.outboundRule } -func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { +func UnmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalOutboundRuleImplementation(input []byte) (OutboundRule, error) { return out, nil } - out := RawOutboundRuleImpl{ - Type: value, - Values: temp, + var parent BaseOutboundRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutboundRuleImpl: %+v", err) } - return out, nil + + return RawOutboundRuleImpl{ + outboundRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_privateendpointoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_privateendpointoutboundrule.go index a631fb0a147..6eaafd7d540 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_privateendpointoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_privateendpointoutboundrule.go @@ -14,8 +14,18 @@ type PrivateEndpointOutboundRule struct { Destination *PrivateEndpointDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s PrivateEndpointOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = PrivateEndpointOutboundRule{} @@ -29,9 +39,10 @@ func (s PrivateEndpointOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrivateEndpointOutboundRule: %+v", err) } + decoded["type"] = "PrivateEndpoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_servicetagoutboundrule.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_servicetagoutboundrule.go index d3b6e8a1184..e036ba01463 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/model_servicetagoutboundrule.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/model_servicetagoutboundrule.go @@ -14,8 +14,18 @@ type ServiceTagOutboundRule struct { Destination *ServiceTagDestination `json:"destination,omitempty"` // Fields inherited from OutboundRule + Category *RuleCategory `json:"category,omitempty"` Status *RuleStatus `json:"status,omitempty"` + Type RuleType `json:"type"` +} + +func (s ServiceTagOutboundRule) OutboundRule() BaseOutboundRuleImpl { + return BaseOutboundRuleImpl{ + Category: s.Category, + Status: s.Status, + Type: s.Type, + } } var _ json.Marshaler = ServiceTagOutboundRule{} @@ -29,9 +39,10 @@ func (s ServiceTagOutboundRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceTagOutboundRule: %+v", err) } + decoded["type"] = "ServiceTag" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/machinelearningservices/2024-04-01/workspaces/version.go b/resource-manager/machinelearningservices/2024-04-01/workspaces/version.go index 04f6dba89bf..7ddd71d6a90 100644 --- a/resource-manager/machinelearningservices/2024-04-01/workspaces/version.go +++ b/resource-manager/machinelearningservices/2024-04-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2024-04-01" } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/README.md b/resource-manager/maintenance/2023-04-01/applyupdates/README.md index 59b84f37d0f..ea9d51e9f69 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/README.md +++ b/resource-manager/maintenance/2023-04-01/applyupdates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/applyupdates` Documentation -The `applyupdates` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). +The `applyupdates` SDK allows for interaction with Azure Resource Manager `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/client.go b/resource-manager/maintenance/2023-04-01/applyupdates/client.go index d1ba86cc002..ff30ff10149 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/client.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/client.go @@ -15,7 +15,7 @@ type ApplyUpdatesClient struct { } func NewApplyUpdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplyUpdatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applyupdates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applyupdates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplyUpdatesClient: %+v", err) } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/id_scopedapplyupdate.go b/resource-manager/maintenance/2023-04-01/applyupdates/id_scopedapplyupdate.go index ef2f182daad..e9a4445e5cb 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/id_scopedapplyupdate.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/id_scopedapplyupdate.go @@ -40,7 +40,7 @@ func ParseScopedApplyUpdateID(input string) (*ScopedApplyUpdateId, error) { } id := ScopedApplyUpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedApplyUpdateIDInsensitively(input string) (*ScopedApplyUpdateId, } id := ScopedApplyUpdateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdate.go b/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdate.go index 8445b9d3577..bfb26757d74 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdate.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdate.go @@ -48,7 +48,6 @@ func (c ApplyUpdatesClient) CreateOrUpdate(ctx context.Context, id commonids.Sco var model ApplyUpdate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdateparent.go b/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdateparent.go index 6aa61ef78ce..041a2025b41 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdateparent.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/method_createorupdateparent.go @@ -48,7 +48,6 @@ func (c ApplyUpdatesClient) CreateOrUpdateParent(ctx context.Context, id commoni var model ApplyUpdate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/method_get.go b/resource-manager/maintenance/2023-04-01/applyupdates/method_get.go index 5a233aec216..7be994d224b 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/method_get.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/method_get.go @@ -45,7 +45,6 @@ func (c ApplyUpdatesClient) Get(ctx context.Context, id ScopedApplyUpdateId) (re var model ApplyUpdate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/method_getparent.go b/resource-manager/maintenance/2023-04-01/applyupdates/method_getparent.go index cd012cf3c62..220f06e78a5 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/method_getparent.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/method_getparent.go @@ -45,7 +45,6 @@ func (c ApplyUpdatesClient) GetParent(ctx context.Context, id ScopedApplyUpdateI var model ApplyUpdate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/applyupdates/version.go b/resource-manager/maintenance/2023-04-01/applyupdates/version.go index b6a0ecf1e61..f77a2177b4e 100644 --- a/resource-manager/maintenance/2023-04-01/applyupdates/version.go +++ b/resource-manager/maintenance/2023-04-01/applyupdates/version.go @@ -1,12 +1,10 @@ package applyupdates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applyupdates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applyupdates/2023-04-01" } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/README.md b/resource-manager/maintenance/2023-04-01/configurationassignments/README.md index a9af7caa3c7..76ad8bf25c8 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/README.md +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/configurationassignments` Documentation -The `configurationassignments` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). +The `configurationassignments` SDK allows for interaction with Azure Resource Manager `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/client.go b/resource-manager/maintenance/2023-04-01/configurationassignments/client.go index dbc7cab57fc..82eb1969780 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/client.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/client.go @@ -15,7 +15,7 @@ type ConfigurationAssignmentsClient struct { } func NewConfigurationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationAssignmentsClient: %+v", err) } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go b/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go index 7d58ec68f68..3f93d28771b 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/id_configurationassignment.go @@ -40,7 +40,7 @@ func ParseConfigurationAssignmentID(input string) (*ConfigurationAssignmentId, e } id := ConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseConfigurationAssignmentIDInsensitively(input string) (*ConfigurationAs } id := ConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go b/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go index 93cf5644013..895bb640a66 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/id_providerconfigurationassignment.go @@ -42,7 +42,7 @@ func ParseProviderConfigurationAssignmentID(input string) (*ProviderConfiguratio } id := ProviderConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderConfigurationAssignmentIDInsensitively(input string) (*Provide } id := ProviderConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go b/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go index 5116ef22e5c..91e93990338 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/id_scopedconfigurationassignment.go @@ -40,7 +40,7 @@ func ParseScopedConfigurationAssignmentID(input string) (*ScopedConfigurationAss } id := ScopedConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedConfigurationAssignmentIDInsensitively(input string) (*ScopedCon } id := ScopedConfigurationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go index d9d54d0b881..ef6801b0195 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationAssignmentsClient) CreateOrUpdate(ctx context.Context, id S var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go index af6255d0ab4..98b92e946c8 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_createorupdateparent.go @@ -50,7 +50,6 @@ func (c ConfigurationAssignmentsClient) CreateOrUpdateParent(ctx context.Context var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go index 4158a6dc0df..e541d4b6ec1 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_delete.go @@ -46,7 +46,6 @@ func (c ConfigurationAssignmentsClient) Delete(ctx context.Context, id ScopedCon var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go index 0d55ebaa028..62f7f745d93 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_deleteparent.go @@ -46,7 +46,6 @@ func (c ConfigurationAssignmentsClient) DeleteParent(ctx context.Context, id Sco var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go index f08bf0525dc..3d72b062e26 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupcreateorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationAssignmentsClient) ForResourceGroupCreateOrUpdate(ctx conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go index dfc16be64b0..a9edef543d3 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupdelete.go @@ -46,7 +46,6 @@ func (c ConfigurationAssignmentsClient) ForResourceGroupDelete(ctx context.Conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go index 0a50dce451e..29e7180163f 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupget.go @@ -45,7 +45,6 @@ func (c ConfigurationAssignmentsClient) ForResourceGroupGet(ctx context.Context, var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go index a652b5940e9..45c4c8244c0 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forresourcegroupupdate.go @@ -49,7 +49,6 @@ func (c ConfigurationAssignmentsClient) ForResourceGroupUpdate(ctx context.Conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go index e07190c21de..b1e1f4cf488 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionscreateorupdate.go @@ -50,7 +50,6 @@ func (c ConfigurationAssignmentsClient) ForSubscriptionsCreateOrUpdate(ctx conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go index 5b48859596f..9acc5322ac4 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsdelete.go @@ -46,7 +46,6 @@ func (c ConfigurationAssignmentsClient) ForSubscriptionsDelete(ctx context.Conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go index 5f0e88e7f11..53aac27c4d1 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsget.go @@ -45,7 +45,6 @@ func (c ConfigurationAssignmentsClient) ForSubscriptionsGet(ctx context.Context, var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go index e1bf98b854a..2899b4b5abb 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_forsubscriptionsupdate.go @@ -49,7 +49,6 @@ func (c ConfigurationAssignmentsClient) ForSubscriptionsUpdate(ctx context.Conte var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go index cb060af0383..d3f35856499 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationAssignmentsClient) Get(ctx context.Context, id ScopedConfig var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go index 961071ecc98..602c54379e3 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_getparent.go @@ -45,7 +45,6 @@ func (c ConfigurationAssignmentsClient) GetParent(ctx context.Context, id Scoped var model ConfigurationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go index 894ad2592c8..22babd01ca9 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_list.go @@ -47,7 +47,6 @@ func (c ConfigurationAssignmentsClient) List(ctx context.Context, id commonids.S var model ListConfigurationAssignmentsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go index 0a06ca63c37..bcaf5d47468 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_listparent.go @@ -47,7 +47,6 @@ func (c ConfigurationAssignmentsClient) ListParent(ctx context.Context, id commo var model ListConfigurationAssignmentsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go b/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go index ef7117fe32f..283f01c85cb 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/method_withinsubscriptionlist.go @@ -47,7 +47,6 @@ func (c ConfigurationAssignmentsClient) WithinSubscriptionList(ctx context.Conte var model ListConfigurationAssignmentsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/configurationassignments/version.go b/resource-manager/maintenance/2023-04-01/configurationassignments/version.go index ba98b64438e..910bdf78d1c 100644 --- a/resource-manager/maintenance/2023-04-01/configurationassignments/version.go +++ b/resource-manager/maintenance/2023-04-01/configurationassignments/version.go @@ -1,12 +1,10 @@ package configurationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationassignments/2023-04-01" } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md index 0ffe55c3361..ef7adf54748 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/maintenanceconfigurations` Documentation -The `maintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). +The `maintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go index 4d799de617c..bcb48de3779 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type MaintenanceConfigurationsClient struct { } func NewMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go index ce2ff107815..bfef2f5c941 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/id_maintenanceconfiguration.go @@ -42,7 +42,7 @@ func ParseMaintenanceConfigurationID(input string) (*MaintenanceConfigurationId, } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMaintenanceConfigurationIDInsensitively(input string) (*MaintenanceCon } id := MaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go index 6f8389d858d..a6e8fc75722 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go index a00ea8abc55..17f8294a585 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_delete.go @@ -46,7 +46,6 @@ func (c MaintenanceConfigurationsClient) Delete(ctx context.Context, id Maintena var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go index e2a9aedb64c..49f75ba600d 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_forresourcegrouplist.go @@ -47,7 +47,6 @@ func (c MaintenanceConfigurationsClient) ForResourceGroupList(ctx context.Contex var model ListMaintenanceConfigurationsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go index 6ea658ab6d5..3989652ca96 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c MaintenanceConfigurationsClient) Get(ctx context.Context, id Maintenance var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go index a742d808133..89717caeb57 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_list.go @@ -47,7 +47,6 @@ func (c MaintenanceConfigurationsClient) List(ctx context.Context, id commonids. var model ListMaintenanceConfigurationsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go index 61b09309274..5d72a3a8cb9 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/method_update.go @@ -49,7 +49,6 @@ func (c MaintenanceConfigurationsClient) Update(ctx context.Context, id Maintena var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go index d4881713dac..f69298d54f5 100644 --- a/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go +++ b/resource-manager/maintenance/2023-04-01/maintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package maintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenanceconfigurations/2023-04-01" } diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md index 1ec7be78d42..afe620fb0bb 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations` Documentation -The `publicmaintenanceconfigurations` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). +The `publicmaintenanceconfigurations` SDK allows for interaction with Azure Resource Manager `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go index 79ca5fc9e3c..837f142a8f7 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/client.go @@ -15,7 +15,7 @@ type PublicMaintenanceConfigurationsClient struct { } func NewPublicMaintenanceConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicMaintenanceConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicmaintenanceconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicmaintenanceconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicMaintenanceConfigurationsClient: %+v", err) } diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go index 0b827fb04c3..2fd36c1a82e 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/id_publicmaintenanceconfiguration.go @@ -40,7 +40,7 @@ func ParsePublicMaintenanceConfigurationID(input string) (*PublicMaintenanceConf } id := PublicMaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePublicMaintenanceConfigurationIDInsensitively(input string) (*PublicMa } id := PublicMaintenanceConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go index b7c2d7cd15b..3e093550a96 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c PublicMaintenanceConfigurationsClient) Get(ctx context.Context, id Publi var model MaintenanceConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go index 31af41f7b10..a97cf251825 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/method_list.go @@ -47,7 +47,6 @@ func (c PublicMaintenanceConfigurationsClient) List(ctx context.Context, id comm var model ListMaintenanceConfigurationsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go index d1378fcb011..883db235245 100644 --- a/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go +++ b/resource-manager/maintenance/2023-04-01/publicmaintenanceconfigurations/version.go @@ -1,12 +1,10 @@ package publicmaintenanceconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicmaintenanceconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicmaintenanceconfigurations/2023-04-01" } diff --git a/resource-manager/maintenance/2023-04-01/updates/README.md b/resource-manager/maintenance/2023-04-01/updates/README.md index 366ac9450fd..b989c381bc6 100644 --- a/resource-manager/maintenance/2023-04-01/updates/README.md +++ b/resource-manager/maintenance/2023-04-01/updates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maintenance/2023-04-01/updates` Documentation -The `updates` SDK allows for interaction with the Azure Resource Manager Service `maintenance` (API Version `2023-04-01`). +The `updates` SDK allows for interaction with Azure Resource Manager `maintenance` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maintenance/2023-04-01/updates/client.go b/resource-manager/maintenance/2023-04-01/updates/client.go index f8438b80656..969ceb5be5b 100644 --- a/resource-manager/maintenance/2023-04-01/updates/client.go +++ b/resource-manager/maintenance/2023-04-01/updates/client.go @@ -15,7 +15,7 @@ type UpdatesClient struct { } func NewUpdatesClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdatesClient: %+v", err) } diff --git a/resource-manager/maintenance/2023-04-01/updates/method_list.go b/resource-manager/maintenance/2023-04-01/updates/method_list.go index 697d64e4b81..9c2789e8d65 100644 --- a/resource-manager/maintenance/2023-04-01/updates/method_list.go +++ b/resource-manager/maintenance/2023-04-01/updates/method_list.go @@ -47,7 +47,6 @@ func (c UpdatesClient) List(ctx context.Context, id commonids.ScopeId) (result L var model ListUpdatesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/updates/method_listparent.go b/resource-manager/maintenance/2023-04-01/updates/method_listparent.go index e56f83158de..3d5af724553 100644 --- a/resource-manager/maintenance/2023-04-01/updates/method_listparent.go +++ b/resource-manager/maintenance/2023-04-01/updates/method_listparent.go @@ -47,7 +47,6 @@ func (c UpdatesClient) ListParent(ctx context.Context, id commonids.ScopeId) (re var model ListUpdatesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maintenance/2023-04-01/updates/version.go b/resource-manager/maintenance/2023-04-01/updates/version.go index 61c5d753038..2d909277156 100644 --- a/resource-manager/maintenance/2023-04-01/updates/version.go +++ b/resource-manager/maintenance/2023-04-01/updates/version.go @@ -1,12 +1,10 @@ package updates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updates/2023-04-01" } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/README.md b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/README.md index b1e3264d4dd..acce071b1bc 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/README.md +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2019-07-01/applicationdefinitions` Documentation -The `applicationdefinitions` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2019-07-01`). +The `applicationdefinitions` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2019-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/client.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/client.go index 9ac40e6698f..3e4ab87c48a 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/client.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/client.go @@ -15,7 +15,7 @@ type ApplicationDefinitionsClient struct { } func NewApplicationDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationDefinitionsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/id_applicationdefinition.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/id_applicationdefinition.go index e1ab7aadbd4..bcb13f0a91b 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/id_applicationdefinition.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/id_applicationdefinition.go @@ -42,7 +42,7 @@ func ParseApplicationDefinitionID(input string) (*ApplicationDefinitionId, error } id := ApplicationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationDefinitionIDInsensitively(input string) (*ApplicationDefini } id := ApplicationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_createorupdate.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_createorupdate.go index 09f8e2cdce8..be0394c9e3a 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_createorupdate.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationDefinitionsClient) CreateOrUpdate(ctx context.Context, id App var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_get.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_get.go index 53d1cbd08f1..55d5542a9fd 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_get.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationDefinitionsClient) Get(ctx context.Context, id ApplicationDef var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_update.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_update.go index 33553c4698e..0f45aafce96 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_update.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationDefinitionsClient) Update(ctx context.Context, id Application var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/version.go b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/version.go index 7479b7bea0a..5d5d089be3c 100644 --- a/resource-manager/managedapplications/2019-07-01/applicationdefinitions/version.go +++ b/resource-manager/managedapplications/2019-07-01/applicationdefinitions/version.go @@ -1,12 +1,10 @@ package applicationdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationdefinitions/2019-07-01" } diff --git a/resource-manager/managedapplications/2019-07-01/applications/README.md b/resource-manager/managedapplications/2019-07-01/applications/README.md index 4ffbc544c49..bed5a596163 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/README.md +++ b/resource-manager/managedapplications/2019-07-01/applications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2019-07-01/applications` Documentation -The `applications` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2019-07-01`). +The `applications` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2019-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2019-07-01/applications/client.go b/resource-manager/managedapplications/2019-07-01/applications/client.go index f4ad56ad4d2..01d1c5a1e05 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/client.go +++ b/resource-manager/managedapplications/2019-07-01/applications/client.go @@ -15,7 +15,7 @@ type ApplicationsClient struct { } func NewApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2019-07-01/applications/id_application.go b/resource-manager/managedapplications/2019-07-01/applications/id_application.go index cbf9a58c08a..15328378fea 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/id_application.go +++ b/resource-manager/managedapplications/2019-07-01/applications/id_application.go @@ -42,7 +42,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2019-07-01/applications/id_applicationid.go b/resource-manager/managedapplications/2019-07-01/applications/id_applicationid.go index a42b50f4fef..1a2410c6bc3 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/id_applicationid.go +++ b/resource-manager/managedapplications/2019-07-01/applications/id_applicationid.go @@ -38,7 +38,7 @@ func ParseApplicationIdID(input string) (*ApplicationIdId, error) { } id := ApplicationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseApplicationIdIDInsensitively(input string) (*ApplicationIdId, error) { } id := ApplicationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2019-07-01/applications/method_get.go b/resource-manager/managedapplications/2019-07-01/applications/method_get.go index f15c3c0bf9f..5eb8a2355be 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/method_get.go +++ b/resource-manager/managedapplications/2019-07-01/applications/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationsClient) Get(ctx context.Context, id ApplicationId) (result G var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applications/method_getbyid.go b/resource-manager/managedapplications/2019-07-01/applications/method_getbyid.go index 2400cb11fa3..2c5430ffdc3 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/method_getbyid.go +++ b/resource-manager/managedapplications/2019-07-01/applications/method_getbyid.go @@ -45,7 +45,6 @@ func (c ApplicationsClient) GetById(ctx context.Context, id ApplicationIdId) (re var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applications/method_listallowedupgradeplans.go b/resource-manager/managedapplications/2019-07-01/applications/method_listallowedupgradeplans.go index 2b3067f0874..625e3677aaf 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/method_listallowedupgradeplans.go +++ b/resource-manager/managedapplications/2019-07-01/applications/method_listallowedupgradeplans.go @@ -46,7 +46,6 @@ func (c ApplicationsClient) ListAllowedUpgradePlans(ctx context.Context, id Appl var model AllowedUpgradePlansResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applications/method_listtokens.go b/resource-manager/managedapplications/2019-07-01/applications/method_listtokens.go index 500d7fbda5c..f3ca70353f9 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/method_listtokens.go +++ b/resource-manager/managedapplications/2019-07-01/applications/method_listtokens.go @@ -50,7 +50,6 @@ func (c ApplicationsClient) ListTokens(ctx context.Context, id ApplicationId, in var model ManagedIdentityTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/applications/version.go b/resource-manager/managedapplications/2019-07-01/applications/version.go index 77aef584a81..5b97752b3f9 100644 --- a/resource-manager/managedapplications/2019-07-01/applications/version.go +++ b/resource-manager/managedapplications/2019-07-01/applications/version.go @@ -1,12 +1,10 @@ package applications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applications/2019-07-01" } diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/README.md b/resource-manager/managedapplications/2019-07-01/jitrequests/README.md index 42862545815..91bccbcaf41 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/README.md +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2019-07-01/jitrequests` Documentation -The `jitrequests` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2019-07-01`). +The `jitrequests` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2019-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/client.go b/resource-manager/managedapplications/2019-07-01/jitrequests/client.go index 4e66ddd5dd0..0ba804d8f1f 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/client.go +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/client.go @@ -15,7 +15,7 @@ type JitRequestsClient struct { } func NewJitRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*JitRequestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jitrequests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jitrequests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JitRequestsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/id_jitrequest.go b/resource-manager/managedapplications/2019-07-01/jitrequests/id_jitrequest.go index 5bb1e26f56c..e109cc735d6 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/id_jitrequest.go +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/id_jitrequest.go @@ -42,7 +42,7 @@ func ParseJitRequestID(input string) (*JitRequestId, error) { } id := JitRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJitRequestIDInsensitively(input string) (*JitRequestId, error) { } id := JitRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/method_get.go b/resource-manager/managedapplications/2019-07-01/jitrequests/method_get.go index 54a8ceaedc9..93b222a4632 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/method_get.go +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/method_get.go @@ -45,7 +45,6 @@ func (c JitRequestsClient) Get(ctx context.Context, id JitRequestId) (result Get var model JitRequestDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/method_update.go b/resource-manager/managedapplications/2019-07-01/jitrequests/method_update.go index 463a9ed924c..6c9c608e18d 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/method_update.go +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/method_update.go @@ -49,7 +49,6 @@ func (c JitRequestsClient) Update(ctx context.Context, id JitRequestId, input Ji var model JitRequestDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2019-07-01/jitrequests/version.go b/resource-manager/managedapplications/2019-07-01/jitrequests/version.go index be76d9b6314..e78a5a3aa20 100644 --- a/resource-manager/managedapplications/2019-07-01/jitrequests/version.go +++ b/resource-manager/managedapplications/2019-07-01/jitrequests/version.go @@ -1,12 +1,10 @@ package jitrequests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jitrequests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jitrequests/2019-07-01" } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/README.md b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/README.md index 98a4d423856..24508175c86 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/README.md +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applicationdefinitions` Documentation -The `applicationdefinitions` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2021-07-01`). +The `applicationdefinitions` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/client.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/client.go index 9ac40e6698f..3e4ab87c48a 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/client.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/client.go @@ -15,7 +15,7 @@ type ApplicationDefinitionsClient struct { } func NewApplicationDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationDefinitionsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go index e1ab7aadbd4..bcb13f0a91b 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/id_applicationdefinition.go @@ -42,7 +42,7 @@ func ParseApplicationDefinitionID(input string) (*ApplicationDefinitionId, error } id := ApplicationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationDefinitionIDInsensitively(input string) (*ApplicationDefini } id := ApplicationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_createorupdate.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_createorupdate.go index 09f8e2cdce8..be0394c9e3a 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_createorupdate.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ApplicationDefinitionsClient) CreateOrUpdate(ctx context.Context, id App var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_get.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_get.go index 53d1cbd08f1..55d5542a9fd 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_get.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationDefinitionsClient) Get(ctx context.Context, id ApplicationDef var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_update.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_update.go index 33553c4698e..0f45aafce96 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_update.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationDefinitionsClient) Update(ctx context.Context, id Application var model ApplicationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/version.go b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/version.go index c64033f5bba..03cafe62e17 100644 --- a/resource-manager/managedapplications/2021-07-01/applicationdefinitions/version.go +++ b/resource-manager/managedapplications/2021-07-01/applicationdefinitions/version.go @@ -1,12 +1,10 @@ package applicationdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationdefinitions/2021-07-01" } diff --git a/resource-manager/managedapplications/2021-07-01/applications/README.md b/resource-manager/managedapplications/2021-07-01/applications/README.md index 102f7fc5c40..22762cec3f3 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/README.md +++ b/resource-manager/managedapplications/2021-07-01/applications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/applications` Documentation -The `applications` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2021-07-01`). +The `applications` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2021-07-01/applications/client.go b/resource-manager/managedapplications/2021-07-01/applications/client.go index f4ad56ad4d2..01d1c5a1e05 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/client.go +++ b/resource-manager/managedapplications/2021-07-01/applications/client.go @@ -15,7 +15,7 @@ type ApplicationsClient struct { } func NewApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2021-07-01/applications/id_application.go b/resource-manager/managedapplications/2021-07-01/applications/id_application.go index cbf9a58c08a..15328378fea 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/id_application.go +++ b/resource-manager/managedapplications/2021-07-01/applications/id_application.go @@ -42,7 +42,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go b/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go index a42b50f4fef..1a2410c6bc3 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go +++ b/resource-manager/managedapplications/2021-07-01/applications/id_applicationid.go @@ -38,7 +38,7 @@ func ParseApplicationIdID(input string) (*ApplicationIdId, error) { } id := ApplicationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseApplicationIdIDInsensitively(input string) (*ApplicationIdId, error) { } id := ApplicationIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2021-07-01/applications/method_get.go b/resource-manager/managedapplications/2021-07-01/applications/method_get.go index f15c3c0bf9f..5eb8a2355be 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/method_get.go +++ b/resource-manager/managedapplications/2021-07-01/applications/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationsClient) Get(ctx context.Context, id ApplicationId) (result G var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applications/method_getbyid.go b/resource-manager/managedapplications/2021-07-01/applications/method_getbyid.go index 2400cb11fa3..2c5430ffdc3 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/method_getbyid.go +++ b/resource-manager/managedapplications/2021-07-01/applications/method_getbyid.go @@ -45,7 +45,6 @@ func (c ApplicationsClient) GetById(ctx context.Context, id ApplicationIdId) (re var model Application result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applications/method_listallowedupgradeplans.go b/resource-manager/managedapplications/2021-07-01/applications/method_listallowedupgradeplans.go index 2b3067f0874..625e3677aaf 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/method_listallowedupgradeplans.go +++ b/resource-manager/managedapplications/2021-07-01/applications/method_listallowedupgradeplans.go @@ -46,7 +46,6 @@ func (c ApplicationsClient) ListAllowedUpgradePlans(ctx context.Context, id Appl var model AllowedUpgradePlansResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applications/method_listtokens.go b/resource-manager/managedapplications/2021-07-01/applications/method_listtokens.go index 500d7fbda5c..f3ca70353f9 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/method_listtokens.go +++ b/resource-manager/managedapplications/2021-07-01/applications/method_listtokens.go @@ -50,7 +50,6 @@ func (c ApplicationsClient) ListTokens(ctx context.Context, id ApplicationId, in var model ManagedIdentityTokenResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/applications/version.go b/resource-manager/managedapplications/2021-07-01/applications/version.go index 98b1f8c38ec..a7573066519 100644 --- a/resource-manager/managedapplications/2021-07-01/applications/version.go +++ b/resource-manager/managedapplications/2021-07-01/applications/version.go @@ -1,12 +1,10 @@ package applications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applications/2021-07-01" } diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/README.md b/resource-manager/managedapplications/2021-07-01/jitrequests/README.md index f5ae05a1297..0d4eab88fb5 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/README.md +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/jitrequests` Documentation -The `jitrequests` SDK allows for interaction with the Azure Resource Manager Service `managedapplications` (API Version `2021-07-01`). +The `jitrequests` SDK allows for interaction with Azure Resource Manager `managedapplications` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/client.go b/resource-manager/managedapplications/2021-07-01/jitrequests/client.go index 4e66ddd5dd0..0ba804d8f1f 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/client.go +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/client.go @@ -15,7 +15,7 @@ type JitRequestsClient struct { } func NewJitRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*JitRequestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jitrequests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jitrequests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JitRequestsClient: %+v", err) } diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/id_jitrequest.go b/resource-manager/managedapplications/2021-07-01/jitrequests/id_jitrequest.go index 5bb1e26f56c..e109cc735d6 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/id_jitrequest.go +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/id_jitrequest.go @@ -42,7 +42,7 @@ func ParseJitRequestID(input string) (*JitRequestId, error) { } id := JitRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseJitRequestIDInsensitively(input string) (*JitRequestId, error) { } id := JitRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/method_get.go b/resource-manager/managedapplications/2021-07-01/jitrequests/method_get.go index 54a8ceaedc9..93b222a4632 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/method_get.go +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/method_get.go @@ -45,7 +45,6 @@ func (c JitRequestsClient) Get(ctx context.Context, id JitRequestId) (result Get var model JitRequestDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/method_update.go b/resource-manager/managedapplications/2021-07-01/jitrequests/method_update.go index 463a9ed924c..6c9c608e18d 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/method_update.go +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/method_update.go @@ -49,7 +49,6 @@ func (c JitRequestsClient) Update(ctx context.Context, id JitRequestId, input Ji var model JitRequestDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedapplications/2021-07-01/jitrequests/version.go b/resource-manager/managedapplications/2021-07-01/jitrequests/version.go index 789acdde08a..ef68b8294d3 100644 --- a/resource-manager/managedapplications/2021-07-01/jitrequests/version.go +++ b/resource-manager/managedapplications/2021-07-01/jitrequests/version.go @@ -1,12 +1,10 @@ package jitrequests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jitrequests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jitrequests/2021-07-01" } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/README.md b/resource-manager/managedidentity/2023-01-31/managedidentities/README.md index 1fdb33c639a..65d67ed4868 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/README.md +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedidentity/2023-01-31/managedidentities` Documentation -The `managedidentities` SDK allows for interaction with the Azure Resource Manager Service `managedidentity` (API Version `2023-01-31`). +The `managedidentities` SDK allows for interaction with Azure Resource Manager `managedidentity` (API Version `2023-01-31`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/client.go b/resource-manager/managedidentity/2023-01-31/managedidentities/client.go index 711ad433d62..d3f9d4da8d6 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/client.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/client.go @@ -15,7 +15,7 @@ type ManagedIdentitiesClient struct { } func NewManagedIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedIdentitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedidentities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedidentities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedIdentitiesClient: %+v", err) } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go b/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go index 8b0dc054cd3..d9d5e9aeb2f 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/id_federatedidentitycredential.go @@ -44,7 +44,7 @@ func ParseFederatedIdentityCredentialID(input string) (*FederatedIdentityCredent } id := FederatedIdentityCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFederatedIdentityCredentialIDInsensitively(input string) (*FederatedId } id := FederatedIdentityCredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialscreateorupdate.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialscreateorupdate.go index 26e9c7ab410..7775539a8b2 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialscreateorupdate.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialscreateorupdate.go @@ -50,7 +50,6 @@ func (c ManagedIdentitiesClient) FederatedIdentityCredentialsCreateOrUpdate(ctx var model FederatedIdentityCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialsget.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialsget.go index a8249e3357d..0fb8d1bdde0 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialsget.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialsget.go @@ -45,7 +45,6 @@ func (c ManagedIdentitiesClient) FederatedIdentityCredentialsGet(ctx context.Con var model FederatedIdentityCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialslist.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialslist.go index 5291e95c336..a4b54b9a88f 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialslist.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_federatedidentitycredentialslist.go @@ -40,6 +40,7 @@ func (o FederatedIdentityCredentialsListOperationOptions) ToHeaders() *client.He func (o FederatedIdentityCredentialsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_systemassignedidentitiesgetbyscope.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_systemassignedidentitiesgetbyscope.go index 6ad1325dc78..d9a7eb188f5 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_systemassignedidentitiesgetbyscope.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_systemassignedidentitiesgetbyscope.go @@ -47,7 +47,6 @@ func (c ManagedIdentitiesClient) SystemAssignedIdentitiesGetByScope(ctx context. var model SystemAssignedIdentity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiescreateorupdate.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiescreateorupdate.go index 576aafb9b43..7aba6559932 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiescreateorupdate.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiescreateorupdate.go @@ -51,7 +51,6 @@ func (c ManagedIdentitiesClient) UserAssignedIdentitiesCreateOrUpdate(ctx contex var model Identity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesget.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesget.go index 89de689c400..d2eba6eaaea 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesget.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesget.go @@ -46,7 +46,6 @@ func (c ManagedIdentitiesClient) UserAssignedIdentitiesGet(ctx context.Context, var model Identity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesupdate.go b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesupdate.go index d86f762dd05..ab9aa1b8a67 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesupdate.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/method_userassignedidentitiesupdate.go @@ -50,7 +50,6 @@ func (c ManagedIdentitiesClient) UserAssignedIdentitiesUpdate(ctx context.Contex var model Identity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/model_userassignedidentityproperties.go b/resource-manager/managedidentity/2023-01-31/managedidentities/model_userassignedidentityproperties.go index f55185a771b..fde6ae69886 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/model_userassignedidentityproperties.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/model_userassignedidentityproperties.go @@ -1,5 +1,10 @@ package managedidentities +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -8,3 +13,30 @@ type UserAssignedIdentityProperties struct { PrincipalId *string `json:"principalId,omitempty"` TenantId *string `json:"tenantId,omitempty"` } + +var _ json.Marshaler = UserAssignedIdentityProperties{} + +func (s UserAssignedIdentityProperties) MarshalJSON() ([]byte, error) { + type wrapper UserAssignedIdentityProperties + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UserAssignedIdentityProperties: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UserAssignedIdentityProperties: %+v", err) + } + + delete(decoded, "clientId") + delete(decoded, "principalId") + delete(decoded, "tenantId") + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UserAssignedIdentityProperties: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/managedidentity/2023-01-31/managedidentities/version.go b/resource-manager/managedidentity/2023-01-31/managedidentities/version.go index f9e3d2166ef..b948225c4cf 100644 --- a/resource-manager/managedidentity/2023-01-31/managedidentities/version.go +++ b/resource-manager/managedidentity/2023-01-31/managedidentities/version.go @@ -1,12 +1,10 @@ package managedidentities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-31" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedidentities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedidentities/2023-01-31" } diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/README.md b/resource-manager/managedservices/2019-06-01/registrationassignments/README.md index d292c36433b..1cacf233ef9 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/README.md +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments` Documentation -The `registrationassignments` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2019-06-01`). +The `registrationassignments` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/client.go b/resource-manager/managedservices/2019-06-01/registrationassignments/client.go index db67d179ee4..89f23067b5b 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/client.go +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/client.go @@ -15,7 +15,7 @@ type RegistrationAssignmentsClient struct { } func NewRegistrationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistrationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistrationAssignmentsClient: %+v", err) } diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go b/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go index 4e385982528..fec72197124 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/id_scopedregistrationassignment.go @@ -40,7 +40,7 @@ func ParseScopedRegistrationAssignmentID(input string) (*ScopedRegistrationAssig } id := ScopedRegistrationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRegistrationAssignmentIDInsensitively(input string) (*ScopedRegi } id := ScopedRegistrationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/method_get.go b/resource-manager/managedservices/2019-06-01/registrationassignments/method_get.go index 8dc482bc63d..26664244864 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/method_get.go +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RegistrationAssignmentsClient) Get(ctx context.Context, id ScopedRegistr var model RegistrationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/method_list.go b/resource-manager/managedservices/2019-06-01/registrationassignments/method_list.go index f049ca5bf7d..c693cf68476 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/method_list.go +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedservices/2019-06-01/registrationassignments/version.go b/resource-manager/managedservices/2019-06-01/registrationassignments/version.go index ff0f5886b0e..afaabef63f1 100644 --- a/resource-manager/managedservices/2019-06-01/registrationassignments/version.go +++ b/resource-manager/managedservices/2019-06-01/registrationassignments/version.go @@ -1,12 +1,10 @@ package registrationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrationassignments/2019-06-01" } diff --git a/resource-manager/managedservices/2019-06-01/registrationdefinitions/README.md b/resource-manager/managedservices/2019-06-01/registrationdefinitions/README.md index d1d8d3fa28a..5130d7f12de 100644 --- a/resource-manager/managedservices/2019-06-01/registrationdefinitions/README.md +++ b/resource-manager/managedservices/2019-06-01/registrationdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationdefinitions` Documentation -The `registrationdefinitions` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2019-06-01`). +The `registrationdefinitions` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2019-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2019-06-01/registrationdefinitions/client.go b/resource-manager/managedservices/2019-06-01/registrationdefinitions/client.go index 0297150836b..80244ce13b4 100644 --- a/resource-manager/managedservices/2019-06-01/registrationdefinitions/client.go +++ b/resource-manager/managedservices/2019-06-01/registrationdefinitions/client.go @@ -15,7 +15,7 @@ type RegistrationDefinitionsClient struct { } func NewRegistrationDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistrationDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrationdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrationdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistrationDefinitionsClient: %+v", err) } diff --git a/resource-manager/managedservices/2019-06-01/registrationdefinitions/id_scopedregistrationdefinition.go b/resource-manager/managedservices/2019-06-01/registrationdefinitions/id_scopedregistrationdefinition.go index b91ec1027b5..8552d8c519a 100644 --- a/resource-manager/managedservices/2019-06-01/registrationdefinitions/id_scopedregistrationdefinition.go +++ b/resource-manager/managedservices/2019-06-01/registrationdefinitions/id_scopedregistrationdefinition.go @@ -40,7 +40,7 @@ func ParseScopedRegistrationDefinitionID(input string) (*ScopedRegistrationDefin } id := ScopedRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRegistrationDefinitionIDInsensitively(input string) (*ScopedRegi } id := ScopedRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get.go b/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get.go index 278f77bedcb..9851ffe7104 100644 --- a/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get.go +++ b/resource-manager/managedservices/2019-06-01/registrationdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c RegistrationDefinitionsClient) Get(ctx context.Context, id ScopedRegistr var model RegistrationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2019-06-01/registrationdefinitions/version.go b/resource-manager/managedservices/2019-06-01/registrationdefinitions/version.go index 88f39d4415a..3ad6de996f6 100644 --- a/resource-manager/managedservices/2019-06-01/registrationdefinitions/version.go +++ b/resource-manager/managedservices/2019-06-01/registrationdefinitions/version.go @@ -1,12 +1,10 @@ package registrationdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrationdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrationdefinitions/2019-06-01" } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/README.md b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/README.md index cc7810de6cb..5e180dbf720 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/README.md +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions` Documentation -The `marketplaceregistrationdefinitions` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2022-10-01`). +The `marketplaceregistrationdefinitions` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/client.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/client.go index 794213089f8..04f3bcfa7bb 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/client.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/client.go @@ -15,7 +15,7 @@ type MarketplaceRegistrationDefinitionsClient struct { } func NewMarketplaceRegistrationDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MarketplaceRegistrationDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "marketplaceregistrationdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "marketplaceregistrationdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MarketplaceRegistrationDefinitionsClient: %+v", err) } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_marketplaceregistrationdefinition.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_marketplaceregistrationdefinition.go index 871c45b04d4..415179f885f 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_marketplaceregistrationdefinition.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_marketplaceregistrationdefinition.go @@ -38,7 +38,7 @@ func ParseMarketplaceRegistrationDefinitionID(input string) (*MarketplaceRegistr } id := MarketplaceRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseMarketplaceRegistrationDefinitionIDInsensitively(input string) (*Marke } id := MarketplaceRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_scopedmarketplaceregistrationdefinition.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_scopedmarketplaceregistrationdefinition.go index 4e11fb44913..6657146bd69 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_scopedmarketplaceregistrationdefinition.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/id_scopedmarketplaceregistrationdefinition.go @@ -40,7 +40,7 @@ func ParseScopedMarketplaceRegistrationDefinitionID(input string) (*ScopedMarket } id := ScopedMarketplaceRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedMarketplaceRegistrationDefinitionIDInsensitively(input string) ( } id := ScopedMarketplaceRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_get.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_get.go index d0d7c0c6059..5d4742af909 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_get.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c MarketplaceRegistrationDefinitionsClient) Get(ctx context.Context, id Sc var model MarketplaceRegistrationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_list.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_list.go index 53cdabdf9c6..69cf8539979 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_list.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopeget.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopeget.go index 01eb37eecc9..53433cb0698 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopeget.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopeget.go @@ -45,7 +45,6 @@ func (c MarketplaceRegistrationDefinitionsClient) WithoutScopeGet(ctx context.Co var model MarketplaceRegistrationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopelist.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopelist.go index 33f29544317..2cff496c905 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopelist.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/method_withoutscopelist.go @@ -39,6 +39,7 @@ func (o WithoutScopeListOperationOptions) ToHeaders() *client.Headers { func (o WithoutScopeListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/version.go b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/version.go index 0fe45937cc8..f1af1d1cff4 100644 --- a/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/version.go +++ b/resource-manager/managedservices/2022-10-01/marketplaceregistrationdefinitions/version.go @@ -1,12 +1,10 @@ package marketplaceregistrationdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/marketplaceregistrationdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/marketplaceregistrationdefinitions/2022-10-01" } diff --git a/resource-manager/managedservices/2022-10-01/operations/README.md b/resource-manager/managedservices/2022-10-01/operations/README.md index cb263e2444c..8ba7d5a7c6f 100644 --- a/resource-manager/managedservices/2022-10-01/operations/README.md +++ b/resource-manager/managedservices/2022-10-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2022-10-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2022-10-01/operations/client.go b/resource-manager/managedservices/2022-10-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/managedservices/2022-10-01/operations/client.go +++ b/resource-manager/managedservices/2022-10-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/managedservices/2022-10-01/operations/method_withscopelist.go b/resource-manager/managedservices/2022-10-01/operations/method_withscopelist.go index 33bb9873fdd..25da65538e3 100644 --- a/resource-manager/managedservices/2022-10-01/operations/method_withscopelist.go +++ b/resource-manager/managedservices/2022-10-01/operations/method_withscopelist.go @@ -47,7 +47,6 @@ func (c OperationsClient) WithScopeList(ctx context.Context, id commonids.ScopeI var model OperationList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2022-10-01/operations/version.go b/resource-manager/managedservices/2022-10-01/operations/version.go index f6c5f3c5969..3098aafacfc 100644 --- a/resource-manager/managedservices/2022-10-01/operations/version.go +++ b/resource-manager/managedservices/2022-10-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2022-10-01" } diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/README.md b/resource-manager/managedservices/2022-10-01/registrationassignments/README.md index 6818977af77..a9b8d572d85 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/README.md +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationassignments` Documentation -The `registrationassignments` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2022-10-01`). +The `registrationassignments` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/client.go b/resource-manager/managedservices/2022-10-01/registrationassignments/client.go index db67d179ee4..89f23067b5b 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/client.go +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/client.go @@ -15,7 +15,7 @@ type RegistrationAssignmentsClient struct { } func NewRegistrationAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistrationAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrationassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrationassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistrationAssignmentsClient: %+v", err) } diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/id_scopedregistrationassignment.go b/resource-manager/managedservices/2022-10-01/registrationassignments/id_scopedregistrationassignment.go index 4e385982528..fec72197124 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/id_scopedregistrationassignment.go +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/id_scopedregistrationassignment.go @@ -40,7 +40,7 @@ func ParseScopedRegistrationAssignmentID(input string) (*ScopedRegistrationAssig } id := ScopedRegistrationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRegistrationAssignmentIDInsensitively(input string) (*ScopedRegi } id := ScopedRegistrationAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/method_get.go b/resource-manager/managedservices/2022-10-01/registrationassignments/method_get.go index 8dc482bc63d..26664244864 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/method_get.go +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RegistrationAssignmentsClient) Get(ctx context.Context, id ScopedRegistr var model RegistrationAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/method_list.go b/resource-manager/managedservices/2022-10-01/registrationassignments/method_list.go index 0fb9136db35..bcb6748c244 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/method_list.go +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedservices/2022-10-01/registrationassignments/version.go b/resource-manager/managedservices/2022-10-01/registrationassignments/version.go index ebfc90d95db..ae4625e30de 100644 --- a/resource-manager/managedservices/2022-10-01/registrationassignments/version.go +++ b/resource-manager/managedservices/2022-10-01/registrationassignments/version.go @@ -1,12 +1,10 @@ package registrationassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrationassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrationassignments/2022-10-01" } diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/README.md b/resource-manager/managedservices/2022-10-01/registrationdefinitions/README.md index 5566dcfeb6e..242524dae3a 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/README.md +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions` Documentation -The `registrationdefinitions` SDK allows for interaction with the Azure Resource Manager Service `managedservices` (API Version `2022-10-01`). +The `registrationdefinitions` SDK allows for interaction with Azure Resource Manager `managedservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/client.go b/resource-manager/managedservices/2022-10-01/registrationdefinitions/client.go index 0297150836b..80244ce13b4 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/client.go +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/client.go @@ -15,7 +15,7 @@ type RegistrationDefinitionsClient struct { } func NewRegistrationDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RegistrationDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registrationdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registrationdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegistrationDefinitionsClient: %+v", err) } diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go b/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go index b91ec1027b5..8552d8c519a 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/id_scopedregistrationdefinition.go @@ -40,7 +40,7 @@ func ParseScopedRegistrationDefinitionID(input string) (*ScopedRegistrationDefin } id := ScopedRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRegistrationDefinitionIDInsensitively(input string) (*ScopedRegi } id := ScopedRegistrationDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_get.go b/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_get.go index 278f77bedcb..9851ffe7104 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_get.go +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c RegistrationDefinitionsClient) Get(ctx context.Context, id ScopedRegistr var model RegistrationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_list.go b/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_list.go index 1e14c5ceb3a..b930cec3518 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_list.go +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managedservices/2022-10-01/registrationdefinitions/version.go b/resource-manager/managedservices/2022-10-01/registrationdefinitions/version.go index 0869a675159..98f2129ff52 100644 --- a/resource-manager/managedservices/2022-10-01/registrationdefinitions/version.go +++ b/resource-manager/managedservices/2022-10-01/registrationdefinitions/version.go @@ -1,12 +1,10 @@ package registrationdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registrationdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registrationdefinitions/2022-10-01" } diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md b/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md index c88efe14970..aa97643f155 100644 --- a/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md +++ b/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2020-05-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/client.go b/resource-manager/managementgroups/2020-05-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/managementgroups/2020-05-01/checknameavailability/client.go +++ b/resource-manager/managementgroups/2020-05-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go b/resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go index b3626235f5e..e7b70a332dd 100644 --- a/resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go +++ b/resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c CheckNameAvailabilityClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/version.go b/resource-manager/managementgroups/2020-05-01/checknameavailability/version.go index 2c4e4ce08d4..43978f63223 100644 --- a/resource-manager/managementgroups/2020-05-01/checknameavailability/version.go +++ b/resource-manager/managementgroups/2020-05-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2020-05-01" } diff --git a/resource-manager/managementgroups/2020-05-01/entities/README.md b/resource-manager/managementgroups/2020-05-01/entities/README.md index 3a8fbe304ef..b08d348eb63 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/README.md +++ b/resource-manager/managementgroups/2020-05-01/entities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/entities` Documentation -The `entities` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2020-05-01`). +The `entities` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2020-05-01/entities/client.go b/resource-manager/managementgroups/2020-05-01/entities/client.go index 69f26c8d7e5..97c4963c39d 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/client.go +++ b/resource-manager/managementgroups/2020-05-01/entities/client.go @@ -15,7 +15,7 @@ type EntitiesClient struct { } func NewEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntitiesClient: %+v", err) } diff --git a/resource-manager/managementgroups/2020-05-01/entities/method_list.go b/resource-manager/managementgroups/2020-05-01/entities/method_list.go index 69efa5333a2..71a991f8f3d 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/method_list.go +++ b/resource-manager/managementgroups/2020-05-01/entities/method_list.go @@ -48,6 +48,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/entities/version.go b/resource-manager/managementgroups/2020-05-01/entities/version.go index 9ef2df22be1..94ecf685642 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/version.go +++ b/resource-manager/managementgroups/2020-05-01/entities/version.go @@ -1,12 +1,10 @@ package entities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entities/2020-05-01" } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/README.md b/resource-manager/managementgroups/2020-05-01/managementgroups/README.md index ae344feb0df..de70971b1ec 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/README.md +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups` Documentation -The `managementgroups` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2020-05-01`). +The `managementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/client.go b/resource-manager/managementgroups/2020-05-01/managementgroups/client.go index 732b46ac1a4..f8a1d13db20 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/client.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/client.go @@ -15,7 +15,7 @@ type ManagementGroupsClient struct { } func NewManagementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementGroupsClient: %+v", err) } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go b/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go index 6359734004c..39fd17b4160 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go @@ -40,7 +40,7 @@ func ParseSubscriptionID(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionIDInsensitively(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go index ca530041f6c..15ba687422c 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go index 033a72547c1..bbf2d365e0b 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go @@ -40,6 +40,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go index 87fb2a218bc..209f279215a 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c ManagementGroupsClient) Get(ctx context.Context, id commonids.Management var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go index aa6a5c14616..419d4351a1d 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go @@ -40,6 +40,7 @@ func (o GetDescendantsOperationOptions) ToHeaders() *client.Headers { func (o GetDescendantsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go index 3f1794604e5..9f0e14b9c90 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsCreateOrUpdate(ctx context.Cont var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go index bb7c557f1fe..acf0cb65d45 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsGet(ctx context.Context, id com var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go index 038617f4220..025d2eef7da 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsList(ctx context.Context, id co var model HierarchySettingsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go index 6b7e694b156..58e7d6151dc 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsUpdate(ctx context.Context, id var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go index c9660c8df44..2db3e2ef9c3 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go index 66afbb5c149..9659774715c 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go @@ -36,6 +36,7 @@ func (o SubscriptionsCreateOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsCreate(ctx context.Context, id Subs var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go index 36eb415e709..cea4c7a4fa5 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go @@ -35,6 +35,7 @@ func (o SubscriptionsDeleteOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go index ff3ac1f4ec0..092d46e9d99 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go @@ -36,6 +36,7 @@ func (o SubscriptionsGetSubscriptionOperationOptions) ToHeaders() *client.Header func (o SubscriptionsGetSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsGetSubscription(ctx context.Context var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go b/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go index f730bbb607e..26b9085a241 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go @@ -37,6 +37,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagementGroupsClient) Update(ctx context.Context, id commonids.Managem var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/version.go b/resource-manager/managementgroups/2020-05-01/managementgroups/version.go index 8446424fbd4..b1db4922862 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/version.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/version.go @@ -1,12 +1,10 @@ package managementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementgroups/2020-05-01" } diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md b/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md index c211301b5e3..05a7f4d489e 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md +++ b/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/tenantbackfill` Documentation -The `tenantbackfill` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2020-05-01`). +The `tenantbackfill` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go b/resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go index 5430023b294..b238bbc7663 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go +++ b/resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go @@ -15,7 +15,7 @@ type TenantBackfillClient struct { } func NewTenantBackfillClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantBackfillClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantbackfill", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantbackfill", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantBackfillClient: %+v", err) } diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go b/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go index 3708748d4f1..d4d1d9c8ca4 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go +++ b/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) StartTenantBackfill(ctx context.Context) (result S var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go b/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go index 0cd305103ce..21003d07049 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go +++ b/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) Status(ctx context.Context) (result StatusOperatio var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go b/resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go index 9d03b681142..ad795bfccb6 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go +++ b/resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go @@ -1,12 +1,10 @@ package tenantbackfill -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantbackfill/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantbackfill/2020-05-01" } diff --git a/resource-manager/managementgroups/2021-04-01/checknameavailability/README.md b/resource-manager/managementgroups/2021-04-01/checknameavailability/README.md index c010a1a55ef..03d8d52e976 100644 --- a/resource-manager/managementgroups/2021-04-01/checknameavailability/README.md +++ b/resource-manager/managementgroups/2021-04-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2021-04-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2021-04-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2021-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2021-04-01/checknameavailability/client.go b/resource-manager/managementgroups/2021-04-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/managementgroups/2021-04-01/checknameavailability/client.go +++ b/resource-manager/managementgroups/2021-04-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/managementgroups/2021-04-01/checknameavailability/method_checknameavailability.go b/resource-manager/managementgroups/2021-04-01/checknameavailability/method_checknameavailability.go index b3626235f5e..e7b70a332dd 100644 --- a/resource-manager/managementgroups/2021-04-01/checknameavailability/method_checknameavailability.go +++ b/resource-manager/managementgroups/2021-04-01/checknameavailability/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c CheckNameAvailabilityClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/checknameavailability/version.go b/resource-manager/managementgroups/2021-04-01/checknameavailability/version.go index f30fd826acf..24d9a407dd1 100644 --- a/resource-manager/managementgroups/2021-04-01/checknameavailability/version.go +++ b/resource-manager/managementgroups/2021-04-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2021-04-01" } diff --git a/resource-manager/managementgroups/2021-04-01/entities/README.md b/resource-manager/managementgroups/2021-04-01/entities/README.md index ba9ce4f5841..9b89a56a0b2 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/README.md +++ b/resource-manager/managementgroups/2021-04-01/entities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2021-04-01/entities` Documentation -The `entities` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2021-04-01`). +The `entities` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2021-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2021-04-01/entities/client.go b/resource-manager/managementgroups/2021-04-01/entities/client.go index 69f26c8d7e5..97c4963c39d 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/client.go +++ b/resource-manager/managementgroups/2021-04-01/entities/client.go @@ -15,7 +15,7 @@ type EntitiesClient struct { } func NewEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntitiesClient: %+v", err) } diff --git a/resource-manager/managementgroups/2021-04-01/entities/method_list.go b/resource-manager/managementgroups/2021-04-01/entities/method_list.go index 400c6987e5c..d4f964cda4b 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/method_list.go +++ b/resource-manager/managementgroups/2021-04-01/entities/method_list.go @@ -48,6 +48,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/entities/version.go b/resource-manager/managementgroups/2021-04-01/entities/version.go index f94d2a97e22..4875d6fd2a3 100644 --- a/resource-manager/managementgroups/2021-04-01/entities/version.go +++ b/resource-manager/managementgroups/2021-04-01/entities/version.go @@ -1,12 +1,10 @@ package entities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entities/2021-04-01" } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/README.md b/resource-manager/managementgroups/2021-04-01/managementgroups/README.md index 9702d30ef99..4adeaa03bad 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/README.md +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2021-04-01/managementgroups` Documentation -The `managementgroups` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2021-04-01`). +The `managementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2021-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/client.go b/resource-manager/managementgroups/2021-04-01/managementgroups/client.go index 732b46ac1a4..f8a1d13db20 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/client.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/client.go @@ -15,7 +15,7 @@ type ManagementGroupsClient struct { } func NewManagementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementGroupsClient: %+v", err) } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/id_subscription.go b/resource-manager/managementgroups/2021-04-01/managementgroups/id_subscription.go index 6359734004c..39fd17b4160 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/id_subscription.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/id_subscription.go @@ -40,7 +40,7 @@ func ParseSubscriptionID(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionIDInsensitively(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_createorupdate.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_createorupdate.go index ca530041f6c..15ba687422c 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_createorupdate.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_delete.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_delete.go index 033a72547c1..bbf2d365e0b 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_delete.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_delete.go @@ -40,6 +40,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_get.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_get.go index 3888ceab538..802d6dbb9ce 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_get.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c ManagementGroupsClient) Get(ctx context.Context, id commonids.Management var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_getdescendants.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_getdescendants.go index aa6a5c14616..419d4351a1d 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_getdescendants.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_getdescendants.go @@ -40,6 +40,7 @@ func (o GetDescendantsOperationOptions) ToHeaders() *client.Headers { func (o GetDescendantsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingscreateorupdate.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingscreateorupdate.go index 3f1794604e5..9f0e14b9c90 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingscreateorupdate.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingscreateorupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsCreateOrUpdate(ctx context.Cont var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsget.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsget.go index bb7c557f1fe..acf0cb65d45 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsget.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsget.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsGet(ctx context.Context, id com var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingslist.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingslist.go index 038617f4220..025d2eef7da 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingslist.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingslist.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsList(ctx context.Context, id co var model HierarchySettingsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsupdate.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsupdate.go index 6b7e694b156..58e7d6151dc 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsupdate.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_hierarchysettingsupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsUpdate(ctx context.Context, id var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_list.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_list.go index c9660c8df44..2db3e2ef9c3 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_list.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionscreate.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionscreate.go index 66afbb5c149..9659774715c 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionscreate.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionscreate.go @@ -36,6 +36,7 @@ func (o SubscriptionsCreateOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsCreate(ctx context.Context, id Subs var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsdelete.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsdelete.go index 36eb415e709..cea4c7a4fa5 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsdelete.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsdelete.go @@ -35,6 +35,7 @@ func (o SubscriptionsDeleteOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsgetsubscription.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsgetsubscription.go index ff3ac1f4ec0..092d46e9d99 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsgetsubscription.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_subscriptionsgetsubscription.go @@ -36,6 +36,7 @@ func (o SubscriptionsGetSubscriptionOperationOptions) ToHeaders() *client.Header func (o SubscriptionsGetSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsGetSubscription(ctx context.Context var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/method_update.go b/resource-manager/managementgroups/2021-04-01/managementgroups/method_update.go index f730bbb607e..26b9085a241 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/method_update.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/method_update.go @@ -37,6 +37,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagementGroupsClient) Update(ctx context.Context, id commonids.Managem var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/managementgroups/version.go b/resource-manager/managementgroups/2021-04-01/managementgroups/version.go index 0cae891d6f6..0bb9a08c452 100644 --- a/resource-manager/managementgroups/2021-04-01/managementgroups/version.go +++ b/resource-manager/managementgroups/2021-04-01/managementgroups/version.go @@ -1,12 +1,10 @@ package managementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementgroups/2021-04-01" } diff --git a/resource-manager/managementgroups/2021-04-01/tenantbackfill/README.md b/resource-manager/managementgroups/2021-04-01/tenantbackfill/README.md index 7b002f4e6e2..027bb6725b7 100644 --- a/resource-manager/managementgroups/2021-04-01/tenantbackfill/README.md +++ b/resource-manager/managementgroups/2021-04-01/tenantbackfill/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2021-04-01/tenantbackfill` Documentation -The `tenantbackfill` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2021-04-01`). +The `tenantbackfill` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2021-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2021-04-01/tenantbackfill/client.go b/resource-manager/managementgroups/2021-04-01/tenantbackfill/client.go index 5430023b294..b238bbc7663 100644 --- a/resource-manager/managementgroups/2021-04-01/tenantbackfill/client.go +++ b/resource-manager/managementgroups/2021-04-01/tenantbackfill/client.go @@ -15,7 +15,7 @@ type TenantBackfillClient struct { } func NewTenantBackfillClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantBackfillClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantbackfill", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantbackfill", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantBackfillClient: %+v", err) } diff --git a/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_starttenantbackfill.go b/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_starttenantbackfill.go index 3708748d4f1..d4d1d9c8ca4 100644 --- a/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_starttenantbackfill.go +++ b/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_starttenantbackfill.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) StartTenantBackfill(ctx context.Context) (result S var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_status.go b/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_status.go index 0cd305103ce..21003d07049 100644 --- a/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_status.go +++ b/resource-manager/managementgroups/2021-04-01/tenantbackfill/method_status.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) Status(ctx context.Context) (result StatusOperatio var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2021-04-01/tenantbackfill/version.go b/resource-manager/managementgroups/2021-04-01/tenantbackfill/version.go index 27252c9bdd2..e6b8b3806ad 100644 --- a/resource-manager/managementgroups/2021-04-01/tenantbackfill/version.go +++ b/resource-manager/managementgroups/2021-04-01/tenantbackfill/version.go @@ -1,12 +1,10 @@ package tenantbackfill -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantbackfill/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantbackfill/2021-04-01" } diff --git a/resource-manager/managementgroups/2023-04-01/checknameavailability/README.md b/resource-manager/managementgroups/2023-04-01/checknameavailability/README.md index d84a6622e59..b5872912c69 100644 --- a/resource-manager/managementgroups/2023-04-01/checknameavailability/README.md +++ b/resource-manager/managementgroups/2023-04-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2023-04-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2023-04-01/checknameavailability/client.go b/resource-manager/managementgroups/2023-04-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/managementgroups/2023-04-01/checknameavailability/client.go +++ b/resource-manager/managementgroups/2023-04-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/managementgroups/2023-04-01/checknameavailability/method_checknameavailability.go b/resource-manager/managementgroups/2023-04-01/checknameavailability/method_checknameavailability.go index b3626235f5e..e7b70a332dd 100644 --- a/resource-manager/managementgroups/2023-04-01/checknameavailability/method_checknameavailability.go +++ b/resource-manager/managementgroups/2023-04-01/checknameavailability/method_checknameavailability.go @@ -49,7 +49,6 @@ func (c CheckNameAvailabilityClient) CheckNameAvailability(ctx context.Context, var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/checknameavailability/version.go b/resource-manager/managementgroups/2023-04-01/checknameavailability/version.go index afd1e580d3c..7a996ea06c2 100644 --- a/resource-manager/managementgroups/2023-04-01/checknameavailability/version.go +++ b/resource-manager/managementgroups/2023-04-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2023-04-01" } diff --git a/resource-manager/managementgroups/2023-04-01/entities/README.md b/resource-manager/managementgroups/2023-04-01/entities/README.md index 200ae5f0268..f419f46f5c4 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/README.md +++ b/resource-manager/managementgroups/2023-04-01/entities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/entities` Documentation -The `entities` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2023-04-01`). +The `entities` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2023-04-01/entities/client.go b/resource-manager/managementgroups/2023-04-01/entities/client.go index 69f26c8d7e5..97c4963c39d 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/client.go +++ b/resource-manager/managementgroups/2023-04-01/entities/client.go @@ -15,7 +15,7 @@ type EntitiesClient struct { } func NewEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntitiesClient: %+v", err) } diff --git a/resource-manager/managementgroups/2023-04-01/entities/method_list.go b/resource-manager/managementgroups/2023-04-01/entities/method_list.go index 400c6987e5c..d4f964cda4b 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/method_list.go +++ b/resource-manager/managementgroups/2023-04-01/entities/method_list.go @@ -48,6 +48,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/entities/version.go b/resource-manager/managementgroups/2023-04-01/entities/version.go index b83c1c42b4d..b426b4a4a34 100644 --- a/resource-manager/managementgroups/2023-04-01/entities/version.go +++ b/resource-manager/managementgroups/2023-04-01/entities/version.go @@ -1,12 +1,10 @@ package entities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entities/2023-04-01" } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/README.md b/resource-manager/managementgroups/2023-04-01/managementgroups/README.md index 09eadcd21f8..6a05815863b 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/README.md +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managementgroups` Documentation -The `managementgroups` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2023-04-01`). +The `managementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/client.go b/resource-manager/managementgroups/2023-04-01/managementgroups/client.go index 732b46ac1a4..f8a1d13db20 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/client.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/client.go @@ -15,7 +15,7 @@ type ManagementGroupsClient struct { } func NewManagementGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementGroupsClient: %+v", err) } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/id_subscription.go b/resource-manager/managementgroups/2023-04-01/managementgroups/id_subscription.go index 6359734004c..39fd17b4160 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/id_subscription.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/id_subscription.go @@ -40,7 +40,7 @@ func ParseSubscriptionID(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionIDInsensitively(input string) (*SubscriptionId, error) { } id := SubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go index ca530041f6c..15ba687422c 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go index 033a72547c1..bbf2d365e0b 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go @@ -40,6 +40,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go index 3888ceab538..802d6dbb9ce 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go @@ -40,6 +40,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -86,7 +87,6 @@ func (c ManagementGroupsClient) Get(ctx context.Context, id commonids.Management var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go index aa6a5c14616..419d4351a1d 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go @@ -40,6 +40,7 @@ func (o GetDescendantsOperationOptions) ToHeaders() *client.Headers { func (o GetDescendantsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingscreateorupdate.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingscreateorupdate.go index 3f1794604e5..9f0e14b9c90 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingscreateorupdate.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingscreateorupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsCreateOrUpdate(ctx context.Cont var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsget.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsget.go index bb7c557f1fe..acf0cb65d45 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsget.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsget.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsGet(ctx context.Context, id com var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go index 038617f4220..025d2eef7da 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go @@ -47,7 +47,6 @@ func (c ManagementGroupsClient) HierarchySettingsList(ctx context.Context, id co var model HierarchySettingsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsupdate.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsupdate.go index 6b7e694b156..58e7d6151dc 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsupdate.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingsupdate.go @@ -51,7 +51,6 @@ func (c ManagementGroupsClient) HierarchySettingsUpdate(ctx context.Context, id var model HierarchySettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_list.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_list.go index c9660c8df44..2db3e2ef9c3 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_list.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionscreate.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionscreate.go index 66afbb5c149..9659774715c 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionscreate.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionscreate.go @@ -36,6 +36,7 @@ func (o SubscriptionsCreateOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsCreate(ctx context.Context, id Subs var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsdelete.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsdelete.go index 36eb415e709..cea4c7a4fa5 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsdelete.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsdelete.go @@ -35,6 +35,7 @@ func (o SubscriptionsDeleteOperationOptions) ToHeaders() *client.Headers { func (o SubscriptionsDeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsgetsubscription.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsgetsubscription.go index ff3ac1f4ec0..092d46e9d99 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsgetsubscription.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_subscriptionsgetsubscription.go @@ -36,6 +36,7 @@ func (o SubscriptionsGetSubscriptionOperationOptions) ToHeaders() *client.Header func (o SubscriptionsGetSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ManagementGroupsClient) SubscriptionsGetSubscription(ctx context.Context var model SubscriptionUnderManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go b/resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go index f730bbb607e..26b9085a241 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go @@ -37,6 +37,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ManagementGroupsClient) Update(ctx context.Context, id commonids.Managem var model ManagementGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/version.go b/resource-manager/managementgroups/2023-04-01/managementgroups/version.go index 2673e017c0c..4c3ba1c9ca9 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/version.go +++ b/resource-manager/managementgroups/2023-04-01/managementgroups/version.go @@ -1,12 +1,10 @@ package managementgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementgroups/2023-04-01" } diff --git a/resource-manager/managementgroups/2023-04-01/tenantbackfill/README.md b/resource-manager/managementgroups/2023-04-01/tenantbackfill/README.md index 7de2fb7d9c7..d61aea9c177 100644 --- a/resource-manager/managementgroups/2023-04-01/tenantbackfill/README.md +++ b/resource-manager/managementgroups/2023-04-01/tenantbackfill/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/tenantbackfill` Documentation -The `tenantbackfill` SDK allows for interaction with the Azure Resource Manager Service `managementgroups` (API Version `2023-04-01`). +The `tenantbackfill` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/managementgroups/2023-04-01/tenantbackfill/client.go b/resource-manager/managementgroups/2023-04-01/tenantbackfill/client.go index 5430023b294..b238bbc7663 100644 --- a/resource-manager/managementgroups/2023-04-01/tenantbackfill/client.go +++ b/resource-manager/managementgroups/2023-04-01/tenantbackfill/client.go @@ -15,7 +15,7 @@ type TenantBackfillClient struct { } func NewTenantBackfillClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantBackfillClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantbackfill", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantbackfill", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantBackfillClient: %+v", err) } diff --git a/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_starttenantbackfill.go b/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_starttenantbackfill.go index 3708748d4f1..d4d1d9c8ca4 100644 --- a/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_starttenantbackfill.go +++ b/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_starttenantbackfill.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) StartTenantBackfill(ctx context.Context) (result S var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_status.go b/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_status.go index 0cd305103ce..21003d07049 100644 --- a/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_status.go +++ b/resource-manager/managementgroups/2023-04-01/tenantbackfill/method_status.go @@ -45,7 +45,6 @@ func (c TenantBackfillClient) Status(ctx context.Context) (result StatusOperatio var model TenantBackfillStatusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/managementgroups/2023-04-01/tenantbackfill/version.go b/resource-manager/managementgroups/2023-04-01/tenantbackfill/version.go index 04033eaec89..09c917e826f 100644 --- a/resource-manager/managementgroups/2023-04-01/tenantbackfill/version.go +++ b/resource-manager/managementgroups/2023-04-01/tenantbackfill/version.go @@ -1,12 +1,10 @@ package tenantbackfill -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantbackfill/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantbackfill/2023-04-01" } diff --git a/resource-manager/maps/2021-02-01/accounts/README.md b/resource-manager/maps/2021-02-01/accounts/README.md index 5c89e560493..fb82d59e0f6 100644 --- a/resource-manager/maps/2021-02-01/accounts/README.md +++ b/resource-manager/maps/2021-02-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2021-02-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2021-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2021-02-01/accounts/client.go b/resource-manager/maps/2021-02-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/maps/2021-02-01/accounts/client.go +++ b/resource-manager/maps/2021-02-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/maps/2021-02-01/accounts/id_account.go b/resource-manager/maps/2021-02-01/accounts/id_account.go index 5c69fbc3fee..bd013499b76 100644 --- a/resource-manager/maps/2021-02-01/accounts/id_account.go +++ b/resource-manager/maps/2021-02-01/accounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2021-02-01/accounts/method_createorupdate.go b/resource-manager/maps/2021-02-01/accounts/method_createorupdate.go index ee5a72db2fb..9231ee18e97 100644 --- a/resource-manager/maps/2021-02-01/accounts/method_createorupdate.go +++ b/resource-manager/maps/2021-02-01/accounts/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AccountsClient) CreateOrUpdate(ctx context.Context, id AccountId, input var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/accounts/method_get.go b/resource-manager/maps/2021-02-01/accounts/method_get.go index 59c1fdd74c6..fc416b8a7b3 100644 --- a/resource-manager/maps/2021-02-01/accounts/method_get.go +++ b/resource-manager/maps/2021-02-01/accounts/method_get.go @@ -45,7 +45,6 @@ func (c AccountsClient) Get(ctx context.Context, id AccountId) (result GetOperat var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/accounts/method_listkeys.go b/resource-manager/maps/2021-02-01/accounts/method_listkeys.go index 532a1ed7c2d..0a4c86cafc4 100644 --- a/resource-manager/maps/2021-02-01/accounts/method_listkeys.go +++ b/resource-manager/maps/2021-02-01/accounts/method_listkeys.go @@ -46,7 +46,6 @@ func (c AccountsClient) ListKeys(ctx context.Context, id AccountId) (result List var model MapsAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys.go b/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys.go index 6917f30adac..8e0d629330a 100644 --- a/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys.go +++ b/resource-manager/maps/2021-02-01/accounts/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c AccountsClient) RegenerateKeys(ctx context.Context, id AccountId, input var model MapsAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/accounts/method_update.go b/resource-manager/maps/2021-02-01/accounts/method_update.go index 8003271bf30..e189cafbc1d 100644 --- a/resource-manager/maps/2021-02-01/accounts/method_update.go +++ b/resource-manager/maps/2021-02-01/accounts/method_update.go @@ -49,7 +49,6 @@ func (c AccountsClient) Update(ctx context.Context, id AccountId, input MapsAcco var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/accounts/version.go b/resource-manager/maps/2021-02-01/accounts/version.go index 730444235e0..5caccbc3fd5 100644 --- a/resource-manager/maps/2021-02-01/accounts/version.go +++ b/resource-manager/maps/2021-02-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2021-02-01" } diff --git a/resource-manager/maps/2021-02-01/creators/README.md b/resource-manager/maps/2021-02-01/creators/README.md index 6eb727c4cc4..c7dad93909d 100644 --- a/resource-manager/maps/2021-02-01/creators/README.md +++ b/resource-manager/maps/2021-02-01/creators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/creators` Documentation -The `creators` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2021-02-01`). +The `creators` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2021-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2021-02-01/creators/client.go b/resource-manager/maps/2021-02-01/creators/client.go index 10b61bd7c92..1f3e27d5948 100644 --- a/resource-manager/maps/2021-02-01/creators/client.go +++ b/resource-manager/maps/2021-02-01/creators/client.go @@ -15,7 +15,7 @@ type CreatorsClient struct { } func NewCreatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "creators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "creators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreatorsClient: %+v", err) } diff --git a/resource-manager/maps/2021-02-01/creators/id_account.go b/resource-manager/maps/2021-02-01/creators/id_account.go index a8362b32036..0d1098a65a1 100644 --- a/resource-manager/maps/2021-02-01/creators/id_account.go +++ b/resource-manager/maps/2021-02-01/creators/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2021-02-01/creators/id_creator.go b/resource-manager/maps/2021-02-01/creators/id_creator.go index 0695b1aab17..69074b4c61f 100644 --- a/resource-manager/maps/2021-02-01/creators/id_creator.go +++ b/resource-manager/maps/2021-02-01/creators/id_creator.go @@ -44,7 +44,7 @@ func ParseCreatorID(input string) (*CreatorId, error) { } id := CreatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCreatorIDInsensitively(input string) (*CreatorId, error) { } id := CreatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2021-02-01/creators/method_createorupdate.go b/resource-manager/maps/2021-02-01/creators/method_createorupdate.go index 0729eda8734..180f4532017 100644 --- a/resource-manager/maps/2021-02-01/creators/method_createorupdate.go +++ b/resource-manager/maps/2021-02-01/creators/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CreatorsClient) CreateOrUpdate(ctx context.Context, id CreatorId, input var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/creators/method_get.go b/resource-manager/maps/2021-02-01/creators/method_get.go index ee6d255f93b..7de33bc2c3b 100644 --- a/resource-manager/maps/2021-02-01/creators/method_get.go +++ b/resource-manager/maps/2021-02-01/creators/method_get.go @@ -45,7 +45,6 @@ func (c CreatorsClient) Get(ctx context.Context, id CreatorId) (result GetOperat var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/creators/method_update.go b/resource-manager/maps/2021-02-01/creators/method_update.go index 4715fc40d32..2385ad65b65 100644 --- a/resource-manager/maps/2021-02-01/creators/method_update.go +++ b/resource-manager/maps/2021-02-01/creators/method_update.go @@ -49,7 +49,6 @@ func (c CreatorsClient) Update(ctx context.Context, id CreatorId, input CreatorU var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2021-02-01/creators/version.go b/resource-manager/maps/2021-02-01/creators/version.go index ed4d3606e12..9afeccd4177 100644 --- a/resource-manager/maps/2021-02-01/creators/version.go +++ b/resource-manager/maps/2021-02-01/creators/version.go @@ -1,12 +1,10 @@ package creators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/creators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/creators/2021-02-01" } diff --git a/resource-manager/maps/2021-02-01/operations/README.md b/resource-manager/maps/2021-02-01/operations/README.md index 4dffac7fbf3..278a2b5ed7b 100644 --- a/resource-manager/maps/2021-02-01/operations/README.md +++ b/resource-manager/maps/2021-02-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2021-02-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2021-02-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2021-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2021-02-01/operations/client.go b/resource-manager/maps/2021-02-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/maps/2021-02-01/operations/client.go +++ b/resource-manager/maps/2021-02-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/maps/2021-02-01/operations/version.go b/resource-manager/maps/2021-02-01/operations/version.go index 51231fdf2ba..55ca5eb9b66 100644 --- a/resource-manager/maps/2021-02-01/operations/version.go +++ b/resource-manager/maps/2021-02-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2021-02-01" } diff --git a/resource-manager/maps/2023-06-01/accounts/README.md b/resource-manager/maps/2023-06-01/accounts/README.md index f2a07cf8ef6..741df81390f 100644 --- a/resource-manager/maps/2023-06-01/accounts/README.md +++ b/resource-manager/maps/2023-06-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2023-06-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2023-06-01/accounts/client.go b/resource-manager/maps/2023-06-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/maps/2023-06-01/accounts/client.go +++ b/resource-manager/maps/2023-06-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/maps/2023-06-01/accounts/id_account.go b/resource-manager/maps/2023-06-01/accounts/id_account.go index 5c69fbc3fee..bd013499b76 100644 --- a/resource-manager/maps/2023-06-01/accounts/id_account.go +++ b/resource-manager/maps/2023-06-01/accounts/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2023-06-01/accounts/method_createorupdate.go b/resource-manager/maps/2023-06-01/accounts/method_createorupdate.go index ee5a72db2fb..9231ee18e97 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_createorupdate.go +++ b/resource-manager/maps/2023-06-01/accounts/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AccountsClient) CreateOrUpdate(ctx context.Context, id AccountId, input var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/method_get.go b/resource-manager/maps/2023-06-01/accounts/method_get.go index 59c1fdd74c6..fc416b8a7b3 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_get.go +++ b/resource-manager/maps/2023-06-01/accounts/method_get.go @@ -45,7 +45,6 @@ func (c AccountsClient) Get(ctx context.Context, id AccountId) (result GetOperat var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/method_listkeys.go b/resource-manager/maps/2023-06-01/accounts/method_listkeys.go index 532a1ed7c2d..0a4c86cafc4 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_listkeys.go +++ b/resource-manager/maps/2023-06-01/accounts/method_listkeys.go @@ -46,7 +46,6 @@ func (c AccountsClient) ListKeys(ctx context.Context, id AccountId) (result List var model MapsAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/method_listsas.go b/resource-manager/maps/2023-06-01/accounts/method_listsas.go index 1ee8325de3a..f81b3b2debd 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_listsas.go +++ b/resource-manager/maps/2023-06-01/accounts/method_listsas.go @@ -50,7 +50,6 @@ func (c AccountsClient) ListSas(ctx context.Context, id AccountId, input Account var model MapsAccountSasToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/method_regeneratekeys.go b/resource-manager/maps/2023-06-01/accounts/method_regeneratekeys.go index 6917f30adac..8e0d629330a 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_regeneratekeys.go +++ b/resource-manager/maps/2023-06-01/accounts/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c AccountsClient) RegenerateKeys(ctx context.Context, id AccountId, input var model MapsAccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/method_update.go b/resource-manager/maps/2023-06-01/accounts/method_update.go index 8003271bf30..e189cafbc1d 100644 --- a/resource-manager/maps/2023-06-01/accounts/method_update.go +++ b/resource-manager/maps/2023-06-01/accounts/method_update.go @@ -49,7 +49,6 @@ func (c AccountsClient) Update(ctx context.Context, id AccountId, input MapsAcco var model MapsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/accounts/version.go b/resource-manager/maps/2023-06-01/accounts/version.go index 2208516501f..b40ea5f496f 100644 --- a/resource-manager/maps/2023-06-01/accounts/version.go +++ b/resource-manager/maps/2023-06-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2023-06-01" } diff --git a/resource-manager/maps/2023-06-01/creators/README.md b/resource-manager/maps/2023-06-01/creators/README.md index f49682ca33a..ffc6950d522 100644 --- a/resource-manager/maps/2023-06-01/creators/README.md +++ b/resource-manager/maps/2023-06-01/creators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/creators` Documentation -The `creators` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2023-06-01`). +The `creators` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2023-06-01/creators/client.go b/resource-manager/maps/2023-06-01/creators/client.go index 10b61bd7c92..1f3e27d5948 100644 --- a/resource-manager/maps/2023-06-01/creators/client.go +++ b/resource-manager/maps/2023-06-01/creators/client.go @@ -15,7 +15,7 @@ type CreatorsClient struct { } func NewCreatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "creators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "creators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CreatorsClient: %+v", err) } diff --git a/resource-manager/maps/2023-06-01/creators/id_account.go b/resource-manager/maps/2023-06-01/creators/id_account.go index a8362b32036..0d1098a65a1 100644 --- a/resource-manager/maps/2023-06-01/creators/id_account.go +++ b/resource-manager/maps/2023-06-01/creators/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2023-06-01/creators/id_creator.go b/resource-manager/maps/2023-06-01/creators/id_creator.go index 0695b1aab17..69074b4c61f 100644 --- a/resource-manager/maps/2023-06-01/creators/id_creator.go +++ b/resource-manager/maps/2023-06-01/creators/id_creator.go @@ -44,7 +44,7 @@ func ParseCreatorID(input string) (*CreatorId, error) { } id := CreatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCreatorIDInsensitively(input string) (*CreatorId, error) { } id := CreatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/maps/2023-06-01/creators/method_createorupdate.go b/resource-manager/maps/2023-06-01/creators/method_createorupdate.go index 0729eda8734..180f4532017 100644 --- a/resource-manager/maps/2023-06-01/creators/method_createorupdate.go +++ b/resource-manager/maps/2023-06-01/creators/method_createorupdate.go @@ -50,7 +50,6 @@ func (c CreatorsClient) CreateOrUpdate(ctx context.Context, id CreatorId, input var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/creators/method_get.go b/resource-manager/maps/2023-06-01/creators/method_get.go index ee6d255f93b..7de33bc2c3b 100644 --- a/resource-manager/maps/2023-06-01/creators/method_get.go +++ b/resource-manager/maps/2023-06-01/creators/method_get.go @@ -45,7 +45,6 @@ func (c CreatorsClient) Get(ctx context.Context, id CreatorId) (result GetOperat var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/creators/method_update.go b/resource-manager/maps/2023-06-01/creators/method_update.go index 4715fc40d32..2385ad65b65 100644 --- a/resource-manager/maps/2023-06-01/creators/method_update.go +++ b/resource-manager/maps/2023-06-01/creators/method_update.go @@ -49,7 +49,6 @@ func (c CreatorsClient) Update(ctx context.Context, id CreatorId, input CreatorU var model Creator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/maps/2023-06-01/creators/version.go b/resource-manager/maps/2023-06-01/creators/version.go index 4d465cade38..c95197e2b57 100644 --- a/resource-manager/maps/2023-06-01/creators/version.go +++ b/resource-manager/maps/2023-06-01/creators/version.go @@ -1,12 +1,10 @@ package creators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/creators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/creators/2023-06-01" } diff --git a/resource-manager/maps/2023-06-01/operations/README.md b/resource-manager/maps/2023-06-01/operations/README.md index 4679bfe6bff..955825dd051 100644 --- a/resource-manager/maps/2023-06-01/operations/README.md +++ b/resource-manager/maps/2023-06-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/maps/2023-06-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `maps` (API Version `2023-06-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `maps` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/maps/2023-06-01/operations/client.go b/resource-manager/maps/2023-06-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/maps/2023-06-01/operations/client.go +++ b/resource-manager/maps/2023-06-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/maps/2023-06-01/operations/version.go b/resource-manager/maps/2023-06-01/operations/version.go index f72d9cde9c2..e0dddd341c7 100644 --- a/resource-manager/maps/2023-06-01/operations/version.go +++ b/resource-manager/maps/2023-06-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-06-01" } diff --git a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/README.md b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/README.md index 34b80ff8764..0825a07222f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/client.go b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/method_execute.go b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/method_execute.go index b1c537c96c5..62fca58ecf3 100644 --- a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/method_execute.go +++ b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/version.go b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/version.go index 101df118809..a00a10a2c00 100644 --- a/resource-manager/mariadb/2018-06-01-preview/checknameavailability/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/README.md b/resource-manager/mariadb/2018-06-01-preview/configurations/README.md index 54610faf916..d1353591b0e 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/client.go b/resource-manager/mariadb/2018-06-01-preview/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/id_configuration.go b/resource-manager/mariadb/2018-06-01-preview/configurations/id_configuration.go index 54c88ae1f74..8b04362e2c4 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/id_configuration.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/id_server.go b/resource-manager/mariadb/2018-06-01-preview/configurations/id_server.go index 61a6c705a1e..b3da88865ba 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/method_get.go b/resource-manager/mariadb/2018-06-01-preview/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/method_listbyserver.go b/resource-manager/mariadb/2018-06-01-preview/configurations/method_listbyserver.go index b51c9a09a63..418fa10dd20 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (re var model ConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/configurations/version.go b/resource-manager/mariadb/2018-06-01-preview/configurations/version.go index a671fc0ce61..5ce8ecaa135 100644 --- a/resource-manager/mariadb/2018-06-01-preview/configurations/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/README.md b/resource-manager/mariadb/2018-06-01-preview/databases/README.md index d569e6af9ad..d8e41242c31 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/client.go b/resource-manager/mariadb/2018-06-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/id_database.go b/resource-manager/mariadb/2018-06-01-preview/databases/id_database.go index b19c256d09a..046178d7ecd 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/id_database.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/id_server.go b/resource-manager/mariadb/2018-06-01-preview/databases/id_server.go index 39f562ec9bd..db6ef325c36 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/method_get.go b/resource-manager/mariadb/2018-06-01-preview/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/method_listbyserver.go b/resource-manager/mariadb/2018-06-01-preview/databases/method_listbyserver.go index a4dd2fdfeed..cf9744c0c74 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/method_listbyserver.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result var model DatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/databases/version.go b/resource-manager/mariadb/2018-06-01-preview/databases/version.go index c1770068899..0879be26e01 100644 --- a/resource-manager/mariadb/2018-06-01-preview/databases/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/README.md b/resource-manager/mariadb/2018-06-01-preview/firewallrules/README.md index 74c513902ac..41cb617ea26 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/client.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_firewallrule.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_firewallrule.go index d6db872e8dc..0b10ac10e38 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_server.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_server.go index 19e9f481296..7ad1d23fc91 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_get.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_listbyserver.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_listbyserver.go index 3d8818b6fad..a3d638705b3 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/method_listbyserver.go @@ -46,7 +46,6 @@ func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (res var model FirewallRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/firewallrules/version.go b/resource-manager/mariadb/2018-06-01-preview/firewallrules/version.go index 046299dfc20..b37b48cbaaa 100644 --- a/resource-manager/mariadb/2018-06-01-preview/firewallrules/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/README.md b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/README.md index 7f313b10ba9..1cdc3c1b182 100644 --- a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier` Documentation -The `locationbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `locationbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/client.go b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/client.go index 846c4a93847..6c8dbf7da88 100644 --- a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/client.go @@ -15,7 +15,7 @@ type LocationBasedPerformanceTierClient struct { } func NewLocationBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/id_location.go b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/id_location.go index d78121a827c..48fba28b6aa 100644 --- a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/id_location.go +++ b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/method_list.go b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/method_list.go index ebc7c810809..9b138ad417e 100644 --- a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/method_list.go +++ b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c LocationBasedPerformanceTierClient) List(ctx context.Context, id Locatio var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/version.go b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/version.go index 43feb151563..58dd560496f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/locationbasedperformancetier/version.go @@ -1,12 +1,10 @@ package locationbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedperformancetier/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/logfiles/README.md b/resource-manager/mariadb/2018-06-01-preview/logfiles/README.md index 268d4396a75..2dc3074d568 100644 --- a/resource-manager/mariadb/2018-06-01-preview/logfiles/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/logfiles/client.go b/resource-manager/mariadb/2018-06-01-preview/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mariadb/2018-06-01-preview/logfiles/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/logfiles/id_server.go b/resource-manager/mariadb/2018-06-01-preview/logfiles/id_server.go index 8c4148294cb..802cce8ef0c 100644 --- a/resource-manager/mariadb/2018-06-01-preview/logfiles/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/logfiles/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/logfiles/method_listbyserver.go b/resource-manager/mariadb/2018-06-01-preview/logfiles/method_listbyserver.go index b692a2fed8a..3fb99612687 100644 --- a/resource-manager/mariadb/2018-06-01-preview/logfiles/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01-preview/logfiles/method_listbyserver.go @@ -46,7 +46,6 @@ func (c LogFilesClient) ListByServer(ctx context.Context, id ServerId) (result L var model LogFileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/logfiles/version.go b/resource-manager/mariadb/2018-06-01-preview/logfiles/version.go index c4a958b2b2c..95c2e6c0e88 100644 --- a/resource-manager/mariadb/2018-06-01-preview/logfiles/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/README.md b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/README.md index 7807455b7e2..bf4908969e9 100644 --- a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/recoverableservers` Documentation -The `recoverableservers` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `recoverableservers` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/client.go b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/client.go index f1d53f03119..d3c7ef23750 100644 --- a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/client.go @@ -15,7 +15,7 @@ type RecoverableServersClient struct { } func NewRecoverableServersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverableservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverableservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableServersClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/id_server.go b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/id_server.go index f442622e22f..863d463c7cf 100644 --- a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/method_get.go b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/method_get.go index 55a405aca8d..9301dfcf53e 100644 --- a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/method_get.go @@ -46,7 +46,6 @@ func (c RecoverableServersClient) Get(ctx context.Context, id ServerId) (result var model RecoverableServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/version.go b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/version.go index 80d7e23260b..cccf64ca764 100644 --- a/resource-manager/mariadb/2018-06-01-preview/recoverableservers/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/recoverableservers/version.go @@ -1,12 +1,10 @@ package recoverableservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverableservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverableservers/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/replicas/README.md b/resource-manager/mariadb/2018-06-01-preview/replicas/README.md index 4b6b7057a3e..fb8e13b0a92 100644 --- a/resource-manager/mariadb/2018-06-01-preview/replicas/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `replicas` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/replicas/client.go b/resource-manager/mariadb/2018-06-01-preview/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/replicas/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/replicas/id_server.go b/resource-manager/mariadb/2018-06-01-preview/replicas/id_server.go index 7fc112c0d6e..61b3487175a 100644 --- a/resource-manager/mariadb/2018-06-01-preview/replicas/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/replicas/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/replicas/method_listbyserver.go b/resource-manager/mariadb/2018-06-01-preview/replicas/method_listbyserver.go index 2908a99e4c3..a0d6916d9e0 100644 --- a/resource-manager/mariadb/2018-06-01-preview/replicas/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01-preview/replicas/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ReplicasClient) ListByServer(ctx context.Context, id ServerId) (result L var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/replicas/version.go b/resource-manager/mariadb/2018-06-01-preview/replicas/version.go index 0af7243299d..6d02510f9a3 100644 --- a/resource-manager/mariadb/2018-06-01-preview/replicas/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/README.md b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/README.md index 125ae3f59c7..a469b488cb7 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier` Documentation -The `serverbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `serverbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/client.go b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/client.go index f4cfb845cfc..285b3ba8d88 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/client.go @@ -15,7 +15,7 @@ type ServerBasedPerformanceTierClient struct { } func NewServerBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/id_server.go b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/id_server.go index a29879ae4a4..b3fdf1ccef1 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/method_list.go b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/method_list.go index 94438aeb619..57a6a043c44 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/method_list.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c ServerBasedPerformanceTierClient) List(ctx context.Context, id ServerId) var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/version.go b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/version.go index 9f7e84727bd..a08803d2488 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverbasedperformancetier/version.go @@ -1,12 +1,10 @@ package serverbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverbasedperformancetier/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverrestart/client.go b/resource-manager/mariadb/2018-06-01-preview/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverrestart/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverrestart/id_server.go b/resource-manager/mariadb/2018-06-01-preview/serverrestart/id_server.go index ba2c321a86d..838a2a14070 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverrestart/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverrestart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/serverrestart/version.go b/resource-manager/mariadb/2018-06-01-preview/serverrestart/version.go index a5d5e87f008..b06b411cf35 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serverrestart/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/README.md b/resource-manager/mariadb/2018-06-01-preview/servers/README.md index a1144fcd071..0c65a92da48 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/client.go b/resource-manager/mariadb/2018-06-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/id_server.go b/resource-manager/mariadb/2018-06-01-preview/servers/id_server.go index e7cc092462b..366e0925b72 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/method_get.go b/resource-manager/mariadb/2018-06-01-preview/servers/method_get.go index 7087cf8acac..e321c1fa288 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperatio var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/method_list.go b/resource-manager/mariadb/2018-06-01-preview/servers/method_list.go index 30b10383035..feeb051f27b 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/method_list.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/method_list.go @@ -47,7 +47,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/method_listbyresourcegroup.go b/resource-manager/mariadb/2018-06-01-preview/servers/method_listbyresourcegroup.go index 79f60c9192f..e1d052169e4 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/method_listbyresourcegroup.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverforcreate.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverforcreate.go index fd8d204648e..23b3d9de9c4 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverforcreate.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverforcreate.go @@ -34,7 +34,7 @@ func (s *ServerForCreate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServerPropertiesForCreateImplementation(v) + impl, err := UnmarshalServerPropertiesForCreateImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServerForCreate': %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforcreate.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforcreate.go index 84868e2551e..5a92482b51b 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforcreate.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforcreate.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerPropertiesForCreate interface { + ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl } -// RawServerPropertiesForCreateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServerPropertiesForCreate = BaseServerPropertiesForCreateImpl{} + +type BaseServerPropertiesForCreateImpl struct { + CreateMode CreateMode `json:"createMode"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (s BaseServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s +} + +var _ ServerPropertiesForCreate = RawServerPropertiesForCreateImpl{} + +// RawServerPropertiesForCreateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServerPropertiesForCreateImpl struct { - Type string - Values map[string]interface{} + serverPropertiesForCreate BaseServerPropertiesForCreateImpl + Type string + Values map[string]interface{} +} + +func (s RawServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s.serverPropertiesForCreate } -func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { +func UnmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPrope return out, nil } - out := RawServerPropertiesForCreateImpl{ - Type: value, - Values: temp, + var parent BaseServerPropertiesForCreateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServerPropertiesForCreateImpl: %+v", err) } - return out, nil + + return RawServerPropertiesForCreateImpl{ + serverPropertiesForCreate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesfordefaultcreate.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesfordefaultcreate.go index 1ec27566b2d..dcc80b2ef28 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesfordefaultcreate.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesfordefaultcreate.go @@ -15,12 +15,24 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLoginPassword string `json:"administratorLoginPassword"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` StorageProfile *StorageProfile `json:"storageProfile,omitempty"` Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForDefaultCreate) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForDefaultCreate{} func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForDefaultCreate: %+v", err) } + decoded["createMode"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforgeorestore.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforgeorestore.go index bd9868a7a72..f12626f00e6 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforgeorestore.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforgeorestore.go @@ -14,12 +14,24 @@ type ServerPropertiesForGeoRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` StorageProfile *StorageProfile `json:"storageProfile,omitempty"` Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForGeoRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForGeoRestore{} func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForGeoRestore: %+v", err) } + decoded["createMode"] = "GeoRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforreplica.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforreplica.go index 968c1adeb34..13a7f5db1ca 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforreplica.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforreplica.go @@ -14,12 +14,24 @@ type ServerPropertiesForReplica struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` StorageProfile *StorageProfile `json:"storageProfile,omitempty"` Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForReplica) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForReplica{} func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForReplica: %+v", err) } + decoded["createMode"] = "Replica" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforrestore.go b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforrestore.go index cdb92e3b115..25149dcf139 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforrestore.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/model_serverpropertiesforrestore.go @@ -15,12 +15,24 @@ type ServerPropertiesForRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` StorageProfile *StorageProfile `json:"storageProfile,omitempty"` Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForRestore{} func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForRestore: %+v", err) } + decoded["createMode"] = "PointInTimeRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01-preview/servers/version.go b/resource-manager/mariadb/2018-06-01-preview/servers/version.go index 73efd2dd4e0..27148dc69c6 100644 --- a/resource-manager/mariadb/2018-06-01-preview/servers/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/README.md b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/README.md index e87f10aa10c..0bf41db5f1e 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/client.go b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/id_server.go b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/id_server.go index a8c151db590..b4cdadce79e 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/method_get.go b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/method_get.go index d3786ed5879..350ddae047b 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id ServerId) var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/version.go b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/version.go index c88b941e4ed..9b2cdc735eb 100644 --- a/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/README.md b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/README.md index e5e053caad2..81bcb943aea 100644 --- a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/updateconfigurations` Documentation -The `updateconfigurations` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `updateconfigurations` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/client.go b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/client.go index 16d6241abd8..cf7cf2f46d0 100644 --- a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/client.go @@ -15,7 +15,7 @@ type UpdateConfigurationsClient struct { } func NewUpdateConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*UpdateConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "updateconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "updateconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UpdateConfigurationsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/id_server.go b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/id_server.go index 5c905f1cb59..cdace378dc0 100644 --- a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/version.go b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/version.go index 494babc776f..57d03e79408 100644 --- a/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/updateconfigurations/version.go @@ -1,12 +1,10 @@ package updateconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/updateconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/updateconfigurations/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/README.md b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/README.md index 5bb81807494..fd2486eaff8 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/README.md +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01-preview`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/client.go b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/client.go +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_server.go b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_server.go index ddf3caea502..d103e4b5990 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_server.go +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_virtualnetworkrule.go index fdb98ae1329..6f620d994c6 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/method_get.go b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/method_get.go +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/version.go b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/version.go index 0637b75955b..d6cb9cb2bdf 100644 --- a/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/version.go +++ b/resource-manager/mariadb/2018-06-01-preview/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2018-06-01-preview" } diff --git a/resource-manager/mariadb/2018-06-01/advisors/README.md b/resource-manager/mariadb/2018-06-01/advisors/README.md index 9b8573e11ab..35ad62e73a9 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/README.md +++ b/resource-manager/mariadb/2018-06-01/advisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/advisors` Documentation -The `advisors` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `advisors` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/advisors/client.go b/resource-manager/mariadb/2018-06-01/advisors/client.go index f5ca84a6de6..ab6b9d18124 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/client.go +++ b/resource-manager/mariadb/2018-06-01/advisors/client.go @@ -15,7 +15,7 @@ type AdvisorsClient struct { } func NewAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "advisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "advisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdvisorsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/advisors/id_advisor.go b/resource-manager/mariadb/2018-06-01/advisors/id_advisor.go index 6f39cd7b7d8..d94a58268c4 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/id_advisor.go +++ b/resource-manager/mariadb/2018-06-01/advisors/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/advisors/id_server.go b/resource-manager/mariadb/2018-06-01/advisors/id_server.go index 55ad058d0d9..f4801989071 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/id_server.go +++ b/resource-manager/mariadb/2018-06-01/advisors/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/advisors/method_get.go b/resource-manager/mariadb/2018-06-01/advisors/method_get.go index 2ff301df3ff..2e24af4b654 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/method_get.go +++ b/resource-manager/mariadb/2018-06-01/advisors/method_get.go @@ -45,7 +45,6 @@ func (c AdvisorsClient) Get(ctx context.Context, id AdvisorId) (result GetOperat var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/advisors/version.go b/resource-manager/mariadb/2018-06-01/advisors/version.go index f75fb3616cb..120b54d4784 100644 --- a/resource-manager/mariadb/2018-06-01/advisors/version.go +++ b/resource-manager/mariadb/2018-06-01/advisors/version.go @@ -1,12 +1,10 @@ package advisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/advisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/advisors/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/checknameavailability/README.md b/resource-manager/mariadb/2018-06-01/checknameavailability/README.md index 7edbfb01da0..a85ea3bf270 100644 --- a/resource-manager/mariadb/2018-06-01/checknameavailability/README.md +++ b/resource-manager/mariadb/2018-06-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/checknameavailability/client.go b/resource-manager/mariadb/2018-06-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mariadb/2018-06-01/checknameavailability/client.go +++ b/resource-manager/mariadb/2018-06-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/checknameavailability/method_execute.go b/resource-manager/mariadb/2018-06-01/checknameavailability/method_execute.go index b1c537c96c5..62fca58ecf3 100644 --- a/resource-manager/mariadb/2018-06-01/checknameavailability/method_execute.go +++ b/resource-manager/mariadb/2018-06-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/checknameavailability/version.go b/resource-manager/mariadb/2018-06-01/checknameavailability/version.go index 38be714350b..cc11511b851 100644 --- a/resource-manager/mariadb/2018-06-01/checknameavailability/version.go +++ b/resource-manager/mariadb/2018-06-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/configurations/README.md b/resource-manager/mariadb/2018-06-01/configurations/README.md index fa17aca6a5c..a125a050b28 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/README.md +++ b/resource-manager/mariadb/2018-06-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/configurations/client.go b/resource-manager/mariadb/2018-06-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/client.go +++ b/resource-manager/mariadb/2018-06-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go b/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go index 54c88ae1f74..8b04362e2c4 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go +++ b/resource-manager/mariadb/2018-06-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/configurations/id_server.go b/resource-manager/mariadb/2018-06-01/configurations/id_server.go index 61a6c705a1e..b3da88865ba 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/id_server.go +++ b/resource-manager/mariadb/2018-06-01/configurations/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/configurations/method_get.go b/resource-manager/mariadb/2018-06-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/method_get.go +++ b/resource-manager/mariadb/2018-06-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go index b51c9a09a63..418fa10dd20 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/configurations/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (re var model ConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/configurations/version.go b/resource-manager/mariadb/2018-06-01/configurations/version.go index b31650f6434..61bc97e0ecc 100644 --- a/resource-manager/mariadb/2018-06-01/configurations/version.go +++ b/resource-manager/mariadb/2018-06-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/configurationsupdate/README.md b/resource-manager/mariadb/2018-06-01/configurationsupdate/README.md index d8801dedb1d..12497c50d09 100644 --- a/resource-manager/mariadb/2018-06-01/configurationsupdate/README.md +++ b/resource-manager/mariadb/2018-06-01/configurationsupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/configurationsupdate` Documentation -The `configurationsupdate` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `configurationsupdate` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/configurationsupdate/client.go b/resource-manager/mariadb/2018-06-01/configurationsupdate/client.go index 6e2a965b0d0..f6ec7ee8e25 100644 --- a/resource-manager/mariadb/2018-06-01/configurationsupdate/client.go +++ b/resource-manager/mariadb/2018-06-01/configurationsupdate/client.go @@ -15,7 +15,7 @@ type ConfigurationsUpdateClient struct { } func NewConfigurationsUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationsupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationsupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsUpdateClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/configurationsupdate/id_server.go b/resource-manager/mariadb/2018-06-01/configurationsupdate/id_server.go index 88d3964a4b6..4ee3dadc246 100644 --- a/resource-manager/mariadb/2018-06-01/configurationsupdate/id_server.go +++ b/resource-manager/mariadb/2018-06-01/configurationsupdate/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/configurationsupdate/version.go b/resource-manager/mariadb/2018-06-01/configurationsupdate/version.go index c1338109b0d..65166dc890a 100644 --- a/resource-manager/mariadb/2018-06-01/configurationsupdate/version.go +++ b/resource-manager/mariadb/2018-06-01/configurationsupdate/version.go @@ -1,12 +1,10 @@ package configurationsupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationsupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationsupdate/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/databases/README.md b/resource-manager/mariadb/2018-06-01/databases/README.md index 3685fef1934..41d39c2842f 100644 --- a/resource-manager/mariadb/2018-06-01/databases/README.md +++ b/resource-manager/mariadb/2018-06-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/databases/client.go b/resource-manager/mariadb/2018-06-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mariadb/2018-06-01/databases/client.go +++ b/resource-manager/mariadb/2018-06-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/databases/id_database.go b/resource-manager/mariadb/2018-06-01/databases/id_database.go index b19c256d09a..046178d7ecd 100644 --- a/resource-manager/mariadb/2018-06-01/databases/id_database.go +++ b/resource-manager/mariadb/2018-06-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/databases/id_server.go b/resource-manager/mariadb/2018-06-01/databases/id_server.go index 39f562ec9bd..db6ef325c36 100644 --- a/resource-manager/mariadb/2018-06-01/databases/id_server.go +++ b/resource-manager/mariadb/2018-06-01/databases/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/databases/method_get.go b/resource-manager/mariadb/2018-06-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mariadb/2018-06-01/databases/method_get.go +++ b/resource-manager/mariadb/2018-06-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go index a4dd2fdfeed..cf9744c0c74 100644 --- a/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/databases/method_listbyserver.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result var model DatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/databases/version.go b/resource-manager/mariadb/2018-06-01/databases/version.go index 6edfbce43c1..4c45d335543 100644 --- a/resource-manager/mariadb/2018-06-01/databases/version.go +++ b/resource-manager/mariadb/2018-06-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/README.md b/resource-manager/mariadb/2018-06-01/firewallrules/README.md index d46a7c5402e..aa449e2df9f 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/README.md +++ b/resource-manager/mariadb/2018-06-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/client.go b/resource-manager/mariadb/2018-06-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/client.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go b/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go index d6db872e8dc..0b10ac10e38 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go b/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go index 19e9f481296..7ad1d23fc91 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go b/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go index 3d8818b6fad..a3d638705b3 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/method_listbyserver.go @@ -46,7 +46,6 @@ func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (res var model FirewallRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/firewallrules/version.go b/resource-manager/mariadb/2018-06-01/firewallrules/version.go index 50bf96272ae..d11a0ce18f9 100644 --- a/resource-manager/mariadb/2018-06-01/firewallrules/version.go +++ b/resource-manager/mariadb/2018-06-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/README.md b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/README.md index 1d290dbcb8a..118de7b98eb 100644 --- a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/README.md +++ b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/locationbasedperformancetier` Documentation -The `locationbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `locationbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/client.go b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/client.go index 846c4a93847..6c8dbf7da88 100644 --- a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/client.go +++ b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/client.go @@ -15,7 +15,7 @@ type LocationBasedPerformanceTierClient struct { } func NewLocationBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/id_location.go b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/id_location.go index d78121a827c..48fba28b6aa 100644 --- a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/id_location.go +++ b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/method_list.go b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/method_list.go index ebc7c810809..9b138ad417e 100644 --- a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/method_list.go +++ b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c LocationBasedPerformanceTierClient) List(ctx context.Context, id Locatio var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/version.go b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/version.go index 3bba6e890c6..5440e000d32 100644 --- a/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/version.go +++ b/resource-manager/mariadb/2018-06-01/locationbasedperformancetier/version.go @@ -1,12 +1,10 @@ package locationbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedperformancetier/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/logfiles/README.md b/resource-manager/mariadb/2018-06-01/logfiles/README.md index cfe07ca1609..85d62ff3317 100644 --- a/resource-manager/mariadb/2018-06-01/logfiles/README.md +++ b/resource-manager/mariadb/2018-06-01/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/logfiles/client.go b/resource-manager/mariadb/2018-06-01/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mariadb/2018-06-01/logfiles/client.go +++ b/resource-manager/mariadb/2018-06-01/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/logfiles/id_server.go b/resource-manager/mariadb/2018-06-01/logfiles/id_server.go index 8c4148294cb..802cce8ef0c 100644 --- a/resource-manager/mariadb/2018-06-01/logfiles/id_server.go +++ b/resource-manager/mariadb/2018-06-01/logfiles/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/logfiles/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/logfiles/method_listbyserver.go index b692a2fed8a..3fb99612687 100644 --- a/resource-manager/mariadb/2018-06-01/logfiles/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/logfiles/method_listbyserver.go @@ -46,7 +46,6 @@ func (c LogFilesClient) ListByServer(ctx context.Context, id ServerId) (result L var model LogFileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/logfiles/version.go b/resource-manager/mariadb/2018-06-01/logfiles/version.go index 87f6ddd1b2a..185d5529ab2 100644 --- a/resource-manager/mariadb/2018-06-01/logfiles/version.go +++ b/resource-manager/mariadb/2018-06-01/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/README.md b/resource-manager/mariadb/2018-06-01/privateendpointconnections/README.md index 731f8bfb4ee..ab779ef87c6 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/README.md +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/client.go b/resource-manager/mariadb/2018-06-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/client.go +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_privateendpointconnection.go index 33dd2884c35..5748dd2d9fa 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_server.go b/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_server.go index 6e196432922..551462363c1 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_server.go +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/method_get.go b/resource-manager/mariadb/2018-06-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/method_get.go +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/privateendpointconnections/version.go b/resource-manager/mariadb/2018-06-01/privateendpointconnections/version.go index 9b9844f0ad6..335cb41cadb 100644 --- a/resource-manager/mariadb/2018-06-01/privateendpointconnections/version.go +++ b/resource-manager/mariadb/2018-06-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/README.md b/resource-manager/mariadb/2018-06-01/privatelinkresources/README.md index d7d1722b5c8..0f3efd45f22 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/README.md +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/client.go b/resource-manager/mariadb/2018-06-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/client.go +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/mariadb/2018-06-01/privatelinkresources/id_privatelinkresource.go index 8e4c4d36bf9..5eda13233b1 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/id_server.go b/resource-manager/mariadb/2018-06-01/privatelinkresources/id_server.go index c85a4805dc0..dfafdfd6b15 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/id_server.go +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/method_get.go b/resource-manager/mariadb/2018-06-01/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/method_get.go +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/privatelinkresources/version.go b/resource-manager/mariadb/2018-06-01/privatelinkresources/version.go index d435f81e223..7d5f140a198 100644 --- a/resource-manager/mariadb/2018-06-01/privatelinkresources/version.go +++ b/resource-manager/mariadb/2018-06-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/README.md b/resource-manager/mariadb/2018-06-01/querytexts/README.md index 3ce36dabcc2..151a7b7add3 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/README.md +++ b/resource-manager/mariadb/2018-06-01/querytexts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/querytexts` Documentation -The `querytexts` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `querytexts` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/querytexts/client.go b/resource-manager/mariadb/2018-06-01/querytexts/client.go index 3edd73eb838..ecbc397b411 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/client.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/client.go @@ -15,7 +15,7 @@ type QueryTextsClient struct { } func NewQueryTextsClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryTextsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "querytexts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "querytexts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryTextsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/id_querytext.go b/resource-manager/mariadb/2018-06-01/querytexts/id_querytext.go index 6dc313cdce1..92ba1af58cc 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/id_querytext.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/id_querytext.go @@ -44,7 +44,7 @@ func ParseQueryTextID(input string) (*QueryTextId, error) { } id := QueryTextId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueryTextIDInsensitively(input string) (*QueryTextId, error) { } id := QueryTextId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/id_server.go b/resource-manager/mariadb/2018-06-01/querytexts/id_server.go index 79cbbd0826c..8c3490a067a 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/id_server.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/method_get.go b/resource-manager/mariadb/2018-06-01/querytexts/method_get.go index 51270647228..4866b6817ec 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/method_get.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/method_get.go @@ -45,7 +45,6 @@ func (c QueryTextsClient) Get(ctx context.Context, id QueryTextId) (result GetOp var model QueryText result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/querytexts/method_listbyserver.go index 776487470b9..5670c4c6557 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/method_listbyserver.go @@ -39,6 +39,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mariadb/2018-06-01/querytexts/version.go b/resource-manager/mariadb/2018-06-01/querytexts/version.go index 6574d59162a..8140eeec5c2 100644 --- a/resource-manager/mariadb/2018-06-01/querytexts/version.go +++ b/resource-manager/mariadb/2018-06-01/querytexts/version.go @@ -1,12 +1,10 @@ package querytexts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/querytexts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/querytexts/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/README.md b/resource-manager/mariadb/2018-06-01/recommendedactions/README.md index 86bfa8a90cf..8676ac78d1e 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/README.md +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/recommendedactions` Documentation -The `recommendedactions` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `recommendedactions` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/client.go b/resource-manager/mariadb/2018-06-01/recommendedactions/client.go index 3899281c222..b5c799e6063 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/client.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/client.go @@ -15,7 +15,7 @@ type RecommendedActionsClient struct { } func NewRecommendedActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendedActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recommendedactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recommendedactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecommendedActionsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/id_advisor.go b/resource-manager/mariadb/2018-06-01/recommendedactions/id_advisor.go index 5632350f2e5..bffa83c2443 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/id_advisor.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/id_recommendedaction.go b/resource-manager/mariadb/2018-06-01/recommendedactions/id_recommendedaction.go index 3a5694f7592..0316e8c52a8 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/id_recommendedaction.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/id_recommendedaction.go @@ -46,7 +46,7 @@ func ParseRecommendedActionID(input string) (*RecommendedActionId, error) { } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecommendedActionIDInsensitively(input string) (*RecommendedActionId, } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/method_get.go b/resource-manager/mariadb/2018-06-01/recommendedactions/method_get.go index b388996a5ee..4a266c3092f 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/method_get.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/method_get.go @@ -45,7 +45,6 @@ func (c RecommendedActionsClient) Get(ctx context.Context, id RecommendedActionI var model RecommendationAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/recommendedactions/method_listbyserver.go index a88c1fb0e3e..c21041e07ae 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/method_listbyserver.go @@ -39,6 +39,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactions/version.go b/resource-manager/mariadb/2018-06-01/recommendedactions/version.go index 88af274a303..c51e0f3d578 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactions/version.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactions/version.go @@ -1,12 +1,10 @@ package recommendedactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recommendedactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recommendedactions/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/client.go b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/client.go index 217b2fc73ae..71ab6df66ed 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/client.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/client.go @@ -15,7 +15,7 @@ type RecommendedActionSessionsClient struct { } func NewRecommendedActionSessionsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendedActionSessionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recommendedactionsessions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recommendedactionsessions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecommendedActionSessionsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/id_advisor.go b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/id_advisor.go index ad9b1aa63fc..6d3ae867238 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/id_advisor.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/method_createrecommendedactionsession.go b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/method_createrecommendedactionsession.go index 32be9f7aac4..c14d71779e3 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/method_createrecommendedactionsession.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/method_createrecommendedactionsession.go @@ -36,6 +36,7 @@ func (o CreateRecommendedActionSessionOperationOptions) ToHeaders() *client.Head func (o CreateRecommendedActionSessionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/version.go b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/version.go index 99e3025db94..579c7b1d93c 100644 --- a/resource-manager/mariadb/2018-06-01/recommendedactionsessions/version.go +++ b/resource-manager/mariadb/2018-06-01/recommendedactionsessions/version.go @@ -1,12 +1,10 @@ package recommendedactionsessions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recommendedactionsessions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recommendedactionsessions/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/recoverableservers/README.md b/resource-manager/mariadb/2018-06-01/recoverableservers/README.md index 4342fc2c253..e8d19a4b96d 100644 --- a/resource-manager/mariadb/2018-06-01/recoverableservers/README.md +++ b/resource-manager/mariadb/2018-06-01/recoverableservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/recoverableservers` Documentation -The `recoverableservers` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `recoverableservers` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/recoverableservers/client.go b/resource-manager/mariadb/2018-06-01/recoverableservers/client.go index f1d53f03119..d3c7ef23750 100644 --- a/resource-manager/mariadb/2018-06-01/recoverableservers/client.go +++ b/resource-manager/mariadb/2018-06-01/recoverableservers/client.go @@ -15,7 +15,7 @@ type RecoverableServersClient struct { } func NewRecoverableServersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverableservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverableservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableServersClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/recoverableservers/id_server.go b/resource-manager/mariadb/2018-06-01/recoverableservers/id_server.go index f442622e22f..863d463c7cf 100644 --- a/resource-manager/mariadb/2018-06-01/recoverableservers/id_server.go +++ b/resource-manager/mariadb/2018-06-01/recoverableservers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/recoverableservers/method_get.go b/resource-manager/mariadb/2018-06-01/recoverableservers/method_get.go index 55a405aca8d..9301dfcf53e 100644 --- a/resource-manager/mariadb/2018-06-01/recoverableservers/method_get.go +++ b/resource-manager/mariadb/2018-06-01/recoverableservers/method_get.go @@ -46,7 +46,6 @@ func (c RecoverableServersClient) Get(ctx context.Context, id ServerId) (result var model RecoverableServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/recoverableservers/version.go b/resource-manager/mariadb/2018-06-01/recoverableservers/version.go index 347cfc64bb9..7c2748787d6 100644 --- a/resource-manager/mariadb/2018-06-01/recoverableservers/version.go +++ b/resource-manager/mariadb/2018-06-01/recoverableservers/version.go @@ -1,12 +1,10 @@ package recoverableservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverableservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverableservers/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/replicas/README.md b/resource-manager/mariadb/2018-06-01/replicas/README.md index da9dbf02898..98e3245bb93 100644 --- a/resource-manager/mariadb/2018-06-01/replicas/README.md +++ b/resource-manager/mariadb/2018-06-01/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `replicas` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/replicas/client.go b/resource-manager/mariadb/2018-06-01/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/mariadb/2018-06-01/replicas/client.go +++ b/resource-manager/mariadb/2018-06-01/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/replicas/id_server.go b/resource-manager/mariadb/2018-06-01/replicas/id_server.go index 7fc112c0d6e..61b3487175a 100644 --- a/resource-manager/mariadb/2018-06-01/replicas/id_server.go +++ b/resource-manager/mariadb/2018-06-01/replicas/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/replicas/method_listbyserver.go b/resource-manager/mariadb/2018-06-01/replicas/method_listbyserver.go index 2908a99e4c3..a0d6916d9e0 100644 --- a/resource-manager/mariadb/2018-06-01/replicas/method_listbyserver.go +++ b/resource-manager/mariadb/2018-06-01/replicas/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ReplicasClient) ListByServer(ctx context.Context, id ServerId) (result L var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/replicas/version.go b/resource-manager/mariadb/2018-06-01/replicas/version.go index 6aacb028aba..16818174984 100644 --- a/resource-manager/mariadb/2018-06-01/replicas/version.go +++ b/resource-manager/mariadb/2018-06-01/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/README.md b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/README.md index 2987b74ebc8..e9547f8371b 100644 --- a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/README.md +++ b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata` Documentation -The `resetqueryperformanceinsightdata` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `resetqueryperformanceinsightdata` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/client.go b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/client.go index f6718ffb4a8..2f5b02328aa 100644 --- a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/client.go +++ b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/client.go @@ -15,7 +15,7 @@ type ResetQueryPerformanceInsightDataClient struct { } func NewResetQueryPerformanceInsightDataClientWithBaseURI(sdkApi sdkEnv.Api) (*ResetQueryPerformanceInsightDataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resetqueryperformanceinsightdata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resetqueryperformanceinsightdata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResetQueryPerformanceInsightDataClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/id_server.go b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/id_server.go index 54a69072298..539c87a54e6 100644 --- a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/id_server.go +++ b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/method_resetqueryperformanceinsightdata.go b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/method_resetqueryperformanceinsightdata.go index 137f7d2a731..d540dab40f4 100644 --- a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/method_resetqueryperformanceinsightdata.go +++ b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/method_resetqueryperformanceinsightdata.go @@ -46,7 +46,6 @@ func (c ResetQueryPerformanceInsightDataClient) ResetQueryPerformanceInsightData var model QueryPerformanceInsightResetDataResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/version.go b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/version.go index 0cf28983343..67f148d1814 100644 --- a/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/version.go +++ b/resource-manager/mariadb/2018-06-01/resetqueryperformanceinsightdata/version.go @@ -1,12 +1,10 @@ package resetqueryperformanceinsightdata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resetqueryperformanceinsightdata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resetqueryperformanceinsightdata/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/README.md b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/README.md index 6ee4bf0ae5b..93e61f32aff 100644 --- a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/README.md +++ b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/serverbasedperformancetier` Documentation -The `serverbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `serverbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/client.go b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/client.go index f4cfb845cfc..285b3ba8d88 100644 --- a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/client.go +++ b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/client.go @@ -15,7 +15,7 @@ type ServerBasedPerformanceTierClient struct { } func NewServerBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/id_server.go b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/id_server.go index a29879ae4a4..b3fdf1ccef1 100644 --- a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/id_server.go +++ b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/method_list.go b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/method_list.go index 94438aeb619..57a6a043c44 100644 --- a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/method_list.go +++ b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c ServerBasedPerformanceTierClient) List(ctx context.Context, id ServerId) var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/version.go b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/version.go index e3e71d1e086..1fe6db8ca1f 100644 --- a/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/version.go +++ b/resource-manager/mariadb/2018-06-01/serverbasedperformancetier/version.go @@ -1,12 +1,10 @@ package serverbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverbasedperformancetier/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/serverrestart/client.go b/resource-manager/mariadb/2018-06-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mariadb/2018-06-01/serverrestart/client.go +++ b/resource-manager/mariadb/2018-06-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/serverrestart/id_server.go b/resource-manager/mariadb/2018-06-01/serverrestart/id_server.go index ba2c321a86d..838a2a14070 100644 --- a/resource-manager/mariadb/2018-06-01/serverrestart/id_server.go +++ b/resource-manager/mariadb/2018-06-01/serverrestart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/serverrestart/version.go b/resource-manager/mariadb/2018-06-01/serverrestart/version.go index 466022be120..ad0a10c70bc 100644 --- a/resource-manager/mariadb/2018-06-01/serverrestart/version.go +++ b/resource-manager/mariadb/2018-06-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/servers/README.md b/resource-manager/mariadb/2018-06-01/servers/README.md index d5db8b9116b..4ea7f77b832 100644 --- a/resource-manager/mariadb/2018-06-01/servers/README.md +++ b/resource-manager/mariadb/2018-06-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/servers/client.go b/resource-manager/mariadb/2018-06-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mariadb/2018-06-01/servers/client.go +++ b/resource-manager/mariadb/2018-06-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/servers/id_server.go b/resource-manager/mariadb/2018-06-01/servers/id_server.go index e7cc092462b..366e0925b72 100644 --- a/resource-manager/mariadb/2018-06-01/servers/id_server.go +++ b/resource-manager/mariadb/2018-06-01/servers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/servers/method_get.go b/resource-manager/mariadb/2018-06-01/servers/method_get.go index 7087cf8acac..e321c1fa288 100644 --- a/resource-manager/mariadb/2018-06-01/servers/method_get.go +++ b/resource-manager/mariadb/2018-06-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperatio var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/servers/method_list.go b/resource-manager/mariadb/2018-06-01/servers/method_list.go index 30b10383035..feeb051f27b 100644 --- a/resource-manager/mariadb/2018-06-01/servers/method_list.go +++ b/resource-manager/mariadb/2018-06-01/servers/method_list.go @@ -47,7 +47,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup.go b/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup.go index 79f60c9192f..e1d052169e4 100644 --- a/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup.go +++ b/resource-manager/mariadb/2018-06-01/servers/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go b/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go index fd8d204648e..23b3d9de9c4 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverforcreate.go @@ -34,7 +34,7 @@ func (s *ServerForCreate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServerPropertiesForCreateImplementation(v) + impl, err := UnmarshalServerPropertiesForCreateImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServerForCreate': %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go index 84868e2551e..64ee7d616d0 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforcreate.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerPropertiesForCreate interface { + ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl } -// RawServerPropertiesForCreateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServerPropertiesForCreate = BaseServerPropertiesForCreateImpl{} + +type BaseServerPropertiesForCreateImpl struct { + CreateMode CreateMode `json:"createMode"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (s BaseServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s +} + +var _ ServerPropertiesForCreate = RawServerPropertiesForCreateImpl{} + +// RawServerPropertiesForCreateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServerPropertiesForCreateImpl struct { - Type string - Values map[string]interface{} + serverPropertiesForCreate BaseServerPropertiesForCreateImpl + Type string + Values map[string]interface{} +} + +func (s RawServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s.serverPropertiesForCreate } -func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { +func UnmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { if input == nil { return nil, nil } @@ -68,10 +90,15 @@ func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPrope return out, nil } - out := RawServerPropertiesForCreateImpl{ - Type: value, - Values: temp, + var parent BaseServerPropertiesForCreateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServerPropertiesForCreateImpl: %+v", err) } - return out, nil + + return RawServerPropertiesForCreateImpl{ + serverPropertiesForCreate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go index 8311c1ef672..37dc0f990e0 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesfordefaultcreate.go @@ -15,6 +15,8 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLoginPassword string `json:"administratorLoginPassword"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -22,6 +24,17 @@ type ServerPropertiesForDefaultCreate struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForDefaultCreate) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForDefaultCreate{} func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { @@ -33,9 +46,10 @@ func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForDefaultCreate: %+v", err) } + decoded["createMode"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go index b57ee038d2a..5e74366ad5f 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforgeorestore.go @@ -14,6 +14,8 @@ type ServerPropertiesForGeoRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -21,6 +23,17 @@ type ServerPropertiesForGeoRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForGeoRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForGeoRestore{} func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForGeoRestore: %+v", err) } + decoded["createMode"] = "GeoRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go index 58b5f5a7929..e30734a76ea 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforreplica.go @@ -14,6 +14,8 @@ type ServerPropertiesForReplica struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -21,6 +23,17 @@ type ServerPropertiesForReplica struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForReplica) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForReplica{} func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForReplica: %+v", err) } + decoded["createMode"] = "Replica" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go index c60b9f36802..8beee023574 100644 --- a/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go +++ b/resource-manager/mariadb/2018-06-01/servers/model_serverpropertiesforrestore.go @@ -15,6 +15,8 @@ type ServerPropertiesForRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -22,6 +24,17 @@ type ServerPropertiesForRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForRestore{} func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { @@ -33,9 +46,10 @@ func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForRestore: %+v", err) } + decoded["createMode"] = "PointInTimeRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mariadb/2018-06-01/servers/version.go b/resource-manager/mariadb/2018-06-01/servers/version.go index 2e8ea156885..a2953fb8bce 100644 --- a/resource-manager/mariadb/2018-06-01/servers/version.go +++ b/resource-manager/mariadb/2018-06-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/README.md b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/README.md index ab32ceff6e6..9962a51aa6d 100644 --- a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/README.md +++ b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/client.go b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/client.go +++ b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/id_server.go b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/id_server.go index a8c151db590..b4cdadce79e 100644 --- a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/id_server.go +++ b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/method_get.go b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/method_get.go index d3786ed5879..350ddae047b 100644 --- a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/method_get.go +++ b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id ServerId) var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/version.go b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/version.go index 81b0f2dde8a..f5994024f34 100644 --- a/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/version.go +++ b/resource-manager/mariadb/2018-06-01/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/README.md b/resource-manager/mariadb/2018-06-01/topquerystatistics/README.md index 64a878e2f6a..c74317d0171 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/README.md +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/topquerystatistics` Documentation -The `topquerystatistics` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `topquerystatistics` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/client.go b/resource-manager/mariadb/2018-06-01/topquerystatistics/client.go index 969d34d8d4c..172cf2f3e1a 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/client.go +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/client.go @@ -15,7 +15,7 @@ type TopQueryStatisticsClient struct { } func NewTopQueryStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopQueryStatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topquerystatistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topquerystatistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopQueryStatisticsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/id_server.go b/resource-manager/mariadb/2018-06-01/topquerystatistics/id_server.go index 2080d0b3bbf..de39e64bbe0 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/id_server.go +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/id_topquerystatistic.go b/resource-manager/mariadb/2018-06-01/topquerystatistics/id_topquerystatistic.go index ca4971dd119..d198e9a0c38 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/id_topquerystatistic.go +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/id_topquerystatistic.go @@ -44,7 +44,7 @@ func ParseTopQueryStatisticID(input string) (*TopQueryStatisticId, error) { } id := TopQueryStatisticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopQueryStatisticIDInsensitively(input string) (*TopQueryStatisticId, } id := TopQueryStatisticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/method_get.go b/resource-manager/mariadb/2018-06-01/topquerystatistics/method_get.go index 073601709e3..5629cacefa8 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/method_get.go +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/method_get.go @@ -45,7 +45,6 @@ func (c TopQueryStatisticsClient) Get(ctx context.Context, id TopQueryStatisticI var model QueryStatistic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/topquerystatistics/version.go b/resource-manager/mariadb/2018-06-01/topquerystatistics/version.go index 0fa9bb2861a..21f04efcadb 100644 --- a/resource-manager/mariadb/2018-06-01/topquerystatistics/version.go +++ b/resource-manager/mariadb/2018-06-01/topquerystatistics/version.go @@ -1,12 +1,10 @@ package topquerystatistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topquerystatistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topquerystatistics/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md index 9660b52a520..938fd1e7202 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go index ddf3caea502..d103e4b5990 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go index fdb98ae1329..6f620d994c6 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go index 0e53377c7b5..5b4c73cb2b1 100644 --- a/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go +++ b/resource-manager/mariadb/2018-06-01/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2018-06-01" } diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/README.md b/resource-manager/mariadb/2018-06-01/waitstatistics/README.md index 0dcc61465af..cb4f234e280 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/README.md +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mariadb/2018-06-01/waitstatistics` Documentation -The `waitstatistics` SDK allows for interaction with the Azure Resource Manager Service `mariadb` (API Version `2018-06-01`). +The `waitstatistics` SDK allows for interaction with Azure Resource Manager `mariadb` (API Version `2018-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/client.go b/resource-manager/mariadb/2018-06-01/waitstatistics/client.go index 31144cc70f1..52d8e27bf06 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/client.go +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/client.go @@ -15,7 +15,7 @@ type WaitStatisticsClient struct { } func NewWaitStatisticsClientWithBaseURI(sdkApi sdkEnv.Api) (*WaitStatisticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "waitstatistics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "waitstatistics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WaitStatisticsClient: %+v", err) } diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/id_server.go b/resource-manager/mariadb/2018-06-01/waitstatistics/id_server.go index 43cf8c247f6..2cd0dbd02c7 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/id_server.go +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/id_waitstatistic.go b/resource-manager/mariadb/2018-06-01/waitstatistics/id_waitstatistic.go index 3395465b258..38708ab5cb3 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/id_waitstatistic.go +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/id_waitstatistic.go @@ -44,7 +44,7 @@ func ParseWaitStatisticID(input string) (*WaitStatisticId, error) { } id := WaitStatisticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWaitStatisticIDInsensitively(input string) (*WaitStatisticId, error) { } id := WaitStatisticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/method_get.go b/resource-manager/mariadb/2018-06-01/waitstatistics/method_get.go index a895afe3230..f9798abba6c 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/method_get.go +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/method_get.go @@ -45,7 +45,6 @@ func (c WaitStatisticsClient) Get(ctx context.Context, id WaitStatisticId) (resu var model WaitStatistic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mariadb/2018-06-01/waitstatistics/version.go b/resource-manager/mariadb/2018-06-01/waitstatistics/version.go index bfb458419d3..8a0b8fc9d3a 100644 --- a/resource-manager/mariadb/2018-06-01/waitstatistics/version.go +++ b/resource-manager/mariadb/2018-06-01/waitstatistics/version.go @@ -1,12 +1,10 @@ package waitstatistics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/waitstatistics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/waitstatistics/2018-06-01" } diff --git a/resource-manager/mariadb/2020-01-01/serverstart/client.go b/resource-manager/mariadb/2020-01-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mariadb/2020-01-01/serverstart/client.go +++ b/resource-manager/mariadb/2020-01-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mariadb/2020-01-01/serverstart/id_server.go b/resource-manager/mariadb/2020-01-01/serverstart/id_server.go index 62b93709b81..f9e609be999 100644 --- a/resource-manager/mariadb/2020-01-01/serverstart/id_server.go +++ b/resource-manager/mariadb/2020-01-01/serverstart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2020-01-01/serverstart/version.go b/resource-manager/mariadb/2020-01-01/serverstart/version.go index 674855e4cf9..c244da5378a 100644 --- a/resource-manager/mariadb/2020-01-01/serverstart/version.go +++ b/resource-manager/mariadb/2020-01-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2020-01-01" } diff --git a/resource-manager/mariadb/2020-01-01/serverstop/client.go b/resource-manager/mariadb/2020-01-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mariadb/2020-01-01/serverstop/client.go +++ b/resource-manager/mariadb/2020-01-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mariadb/2020-01-01/serverstop/id_server.go b/resource-manager/mariadb/2020-01-01/serverstop/id_server.go index 33a1cb3d3c6..324f05b0734 100644 --- a/resource-manager/mariadb/2020-01-01/serverstop/id_server.go +++ b/resource-manager/mariadb/2020-01-01/serverstop/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mariadb/2020-01-01/serverstop/version.go b/resource-manager/mariadb/2020-01-01/serverstop/version.go index 9c1dd6c6a11..62d222ffd01 100644 --- a/resource-manager/mariadb/2020-01-01/serverstop/version.go +++ b/resource-manager/mariadb/2020-01-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2020-01-01" } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/README.md b/resource-manager/marketplaceordering/2015-06-01/agreements/README.md index 8a350ac1654..bc62ecc90dc 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/README.md +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2015-06-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `marketplaceordering` (API Version `2015-06-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `marketplaceordering` (API Version `2015-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/client.go b/resource-manager/marketplaceordering/2015-06-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/client.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go b/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go index 19335c26ba6..73f84e85da8 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/id_offerplan.go @@ -44,7 +44,7 @@ func ParseOfferPlanID(input string) (*OfferPlanId, error) { } id := OfferPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferPlanIDInsensitively(input string) (*OfferPlanId, error) { } id := OfferPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go b/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go index 726dce0fa8e..f30629fe3c9 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/id_plan.go @@ -44,7 +44,7 @@ func ParsePlanID(input string) (*PlanId, error) { } id := PlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePlanIDInsensitively(input string) (*PlanId, error) { } id := PlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscancel.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscancel.go index a829ebdc510..f38ce26b58c 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscancel.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscancel.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsCancel(ctx context.Context, id Pl var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscreate.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscreate.go index 2a8f04efa87..add53e75617 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscreate.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementscreate.go @@ -50,7 +50,6 @@ func (c AgreementsClient) MarketplaceAgreementsCreate(ctx context.Context, id Of var model AgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsget.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsget.go index 21bd037374c..9f5a9d8c212 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsget.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsget.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsGet(ctx context.Context, id Offer var model AgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsgetagreement.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsgetagreement.go index d4ae0ed4ad5..f80924f0446 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsgetagreement.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementsgetagreement.go @@ -45,7 +45,6 @@ func (c AgreementsClient) MarketplaceAgreementsGetAgreement(ctx context.Context, var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementslist.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementslist.go index ab6aa4cb9b7..54c7ecd2917 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementslist.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementslist.go @@ -47,7 +47,6 @@ func (c AgreementsClient) MarketplaceAgreementsList(ctx context.Context, id comm var model AgreementTermsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementssign.go b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementssign.go index 06d3718dd02..595c46e1db5 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementssign.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/method_marketplaceagreementssign.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsSign(ctx context.Context, id Plan var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2015-06-01/agreements/version.go b/resource-manager/marketplaceordering/2015-06-01/agreements/version.go index d17abb9aa5a..867bdeb0330 100644 --- a/resource-manager/marketplaceordering/2015-06-01/agreements/version.go +++ b/resource-manager/marketplaceordering/2015-06-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2015-06-01" } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/README.md b/resource-manager/marketplaceordering/2021-01-01/agreements/README.md index 5ae91a14f9b..e0ffa4ec745 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/README.md +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/marketplaceordering/2021-01-01/agreements` Documentation -The `agreements` SDK allows for interaction with the Azure Resource Manager Service `marketplaceordering` (API Version `2021-01-01`). +The `agreements` SDK allows for interaction with Azure Resource Manager `marketplaceordering` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/client.go b/resource-manager/marketplaceordering/2021-01-01/agreements/client.go index 970174ce306..8093cc0b5c0 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/client.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/client.go @@ -15,7 +15,7 @@ type AgreementsClient struct { } func NewAgreementsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgreementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agreements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agreements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgreementsClient: %+v", err) } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/id_offerplan.go b/resource-manager/marketplaceordering/2021-01-01/agreements/id_offerplan.go index 19335c26ba6..73f84e85da8 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/id_offerplan.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/id_offerplan.go @@ -44,7 +44,7 @@ func ParseOfferPlanID(input string) (*OfferPlanId, error) { } id := OfferPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfferPlanIDInsensitively(input string) (*OfferPlanId, error) { } id := OfferPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/id_plan.go b/resource-manager/marketplaceordering/2021-01-01/agreements/id_plan.go index 726dce0fa8e..f30629fe3c9 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/id_plan.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/id_plan.go @@ -44,7 +44,7 @@ func ParsePlanID(input string) (*PlanId, error) { } id := PlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePlanIDInsensitively(input string) (*PlanId, error) { } id := PlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscancel.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscancel.go index a829ebdc510..f38ce26b58c 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscancel.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscancel.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsCancel(ctx context.Context, id Pl var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscreate.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscreate.go index 2a8f04efa87..add53e75617 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscreate.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementscreate.go @@ -50,7 +50,6 @@ func (c AgreementsClient) MarketplaceAgreementsCreate(ctx context.Context, id Of var model AgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsget.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsget.go index 21bd037374c..9f5a9d8c212 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsget.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsget.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsGet(ctx context.Context, id Offer var model AgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsgetagreement.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsgetagreement.go index d4ae0ed4ad5..f80924f0446 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsgetagreement.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementsgetagreement.go @@ -45,7 +45,6 @@ func (c AgreementsClient) MarketplaceAgreementsGetAgreement(ctx context.Context, var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementslist.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementslist.go index 23587e6feb6..298ebf6337b 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementslist.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementslist.go @@ -47,7 +47,6 @@ func (c AgreementsClient) MarketplaceAgreementsList(ctx context.Context, id comm var model OldAgreementTermsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementssign.go b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementssign.go index 06d3718dd02..595c46e1db5 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementssign.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/method_marketplaceagreementssign.go @@ -46,7 +46,6 @@ func (c AgreementsClient) MarketplaceAgreementsSign(ctx context.Context, id Plan var model OldAgreementTerms result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/marketplaceordering/2021-01-01/agreements/version.go b/resource-manager/marketplaceordering/2021-01-01/agreements/version.go index e316779d39d..4e8079d0c4f 100644 --- a/resource-manager/marketplaceordering/2021-01-01/agreements/version.go +++ b/resource-manager/marketplaceordering/2021-01-01/agreements/version.go @@ -1,12 +1,10 @@ package agreements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agreements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agreements/2021-01-01" } diff --git a/resource-manager/media/2021-11-01/accountfilters/README.md b/resource-manager/media/2021-11-01/accountfilters/README.md index 8f4e013480d..24bc2c9b53a 100644 --- a/resource-manager/media/2021-11-01/accountfilters/README.md +++ b/resource-manager/media/2021-11-01/accountfilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accountfilters` Documentation -The `accountfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `accountfilters` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/accountfilters/client.go b/resource-manager/media/2021-11-01/accountfilters/client.go index 76262494fe6..995fe26a43f 100644 --- a/resource-manager/media/2021-11-01/accountfilters/client.go +++ b/resource-manager/media/2021-11-01/accountfilters/client.go @@ -15,7 +15,7 @@ type AccountFiltersClient struct { } func NewAccountFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountfilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accountfilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountFiltersClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go b/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go index 30d0bcfc871..5b208188952 100644 --- a/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go +++ b/resource-manager/media/2021-11-01/accountfilters/id_accountfilter.go @@ -44,7 +44,7 @@ func ParseAccountFilterID(input string) (*AccountFilterId, error) { } id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { } id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go b/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go index b5a8af8e24c..98c75873631 100644 --- a/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/accountfilters/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go b/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go index f0e49340ca0..f3006abb719 100644 --- a/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go +++ b/resource-manager/media/2021-11-01/accountfilters/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AccountFiltersClient) CreateOrUpdate(ctx context.Context, id AccountFilt var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accountfilters/method_get.go b/resource-manager/media/2021-11-01/accountfilters/method_get.go index b9639b436c1..454249d770b 100644 --- a/resource-manager/media/2021-11-01/accountfilters/method_get.go +++ b/resource-manager/media/2021-11-01/accountfilters/method_get.go @@ -45,7 +45,6 @@ func (c AccountFiltersClient) Get(ctx context.Context, id AccountFilterId) (resu var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accountfilters/method_update.go b/resource-manager/media/2021-11-01/accountfilters/method_update.go index 7e3a2abff48..d9fa9f206b2 100644 --- a/resource-manager/media/2021-11-01/accountfilters/method_update.go +++ b/resource-manager/media/2021-11-01/accountfilters/method_update.go @@ -49,7 +49,6 @@ func (c AccountFiltersClient) Update(ctx context.Context, id AccountFilterId, in var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accountfilters/version.go b/resource-manager/media/2021-11-01/accountfilters/version.go index 345a27e8e7a..58b0e73e86a 100644 --- a/resource-manager/media/2021-11-01/accountfilters/version.go +++ b/resource-manager/media/2021-11-01/accountfilters/version.go @@ -1,12 +1,10 @@ package accountfilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountfilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accountfilters/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/accounts/README.md b/resource-manager/media/2021-11-01/accounts/README.md index 99a29239330..85d00b85b39 100644 --- a/resource-manager/media/2021-11-01/accounts/README.md +++ b/resource-manager/media/2021-11-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/accounts/client.go b/resource-manager/media/2021-11-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/media/2021-11-01/accounts/client.go +++ b/resource-manager/media/2021-11-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/accounts/id_location.go b/resource-manager/media/2021-11-01/accounts/id_location.go index afba47499fe..0f76aefce09 100644 --- a/resource-manager/media/2021-11-01/accounts/id_location.go +++ b/resource-manager/media/2021-11-01/accounts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accounts/id_mediaservice.go b/resource-manager/media/2021-11-01/accounts/id_mediaservice.go index 8f26f7543d0..e0f5cbd509b 100644 --- a/resource-manager/media/2021-11-01/accounts/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/accounts/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go b/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go index a70790c378b..9abc8011eb0 100644 --- a/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go +++ b/resource-manager/media/2021-11-01/accounts/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go b/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go index b23b07659ab..99dc25b9995 100644 --- a/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go +++ b/resource-manager/media/2021-11-01/accounts/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go b/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go index 6908d26e295..392c15b2e74 100644 --- a/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go +++ b/resource-manager/media/2021-11-01/accounts/method_locationschecknameavailability.go @@ -50,7 +50,6 @@ func (c AccountsClient) LocationsCheckNameAvailability(ctx context.Context, id L var model EntityNameAvailabilityCheckOutput result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go b/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go index 23fbce7da14..f1612737beb 100644 --- a/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go +++ b/resource-manager/media/2021-11-01/accounts/method_mediaservicesget.go @@ -45,7 +45,6 @@ func (c AccountsClient) MediaservicesGet(ctx context.Context, id MediaServiceId) var model MediaService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go b/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go index 6212e43dbd5..24a7c0c1969 100644 --- a/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go +++ b/resource-manager/media/2021-11-01/accounts/method_mediaserviceslistedgepolicies.go @@ -50,7 +50,6 @@ func (c AccountsClient) MediaservicesListEdgePolicies(ctx context.Context, id Me var model EdgePolicies result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go index 88cbd35dbbe..b71af5122ac 100644 --- a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionscreateorupdate.go @@ -49,7 +49,6 @@ func (c AccountsClient) PrivateEndpointConnectionsCreateOrUpdate(ctx context.Con var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go index fddb80ecd58..89a2a051c0a 100644 --- a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go +++ b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c AccountsClient) PrivateEndpointConnectionsGet(ctx context.Context, id Pr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go index 89ddb3788da..4df3be3cc31 100644 --- a/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go +++ b/resource-manager/media/2021-11-01/accounts/method_privateendpointconnectionslist.go @@ -46,7 +46,6 @@ func (c AccountsClient) PrivateEndpointConnectionsList(ctx context.Context, id M var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go b/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go index ded606cdfeb..f76fefa28fd 100644 --- a/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go +++ b/resource-manager/media/2021-11-01/accounts/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c AccountsClient) PrivateLinkResourcesGet(ctx context.Context, id PrivateL var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go b/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go index 7f664570e7a..c36dfe33220 100644 --- a/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go +++ b/resource-manager/media/2021-11-01/accounts/method_privatelinkresourceslist.go @@ -46,7 +46,6 @@ func (c AccountsClient) PrivateLinkResourcesList(ctx context.Context, id MediaSe var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/accounts/version.go b/resource-manager/media/2021-11-01/accounts/version.go index 118154ce47b..a943f48a05b 100644 --- a/resource-manager/media/2021-11-01/accounts/version.go +++ b/resource-manager/media/2021-11-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/README.md b/resource-manager/media/2021-11-01/assetsandassetfilters/README.md index d93fecd494b..9ee14f90c02 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/README.md +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/assetsandassetfilters` Documentation -The `assetsandassetfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `assetsandassetfilters` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/client.go b/resource-manager/media/2021-11-01/assetsandassetfilters/client.go index c1a18be1bf9..f70178953bc 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/client.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/client.go @@ -15,7 +15,7 @@ type AssetsAndAssetFiltersClient struct { } func NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AssetsAndAssetFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assetsandassetfilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assetsandassetfilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssetsAndAssetFiltersClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go b/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go index 098a1cbed80..1edc2883e55 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/id_asset.go @@ -44,7 +44,7 @@ func ParseAssetID(input string) (*AssetId, error) { } id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAssetIDInsensitively(input string) (*AssetId, error) { } id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go b/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go index 3490c79c7ec..c17409ee214 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/id_assetfilter.go @@ -46,7 +46,7 @@ func ParseAssetFilterID(input string) (*AssetFilterId, error) { } id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { } id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go b/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go index 499b0bb4565..603d8dda804 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go b/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go index 68d441933c6..7d1445d37e4 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/id_track.go @@ -46,7 +46,7 @@ func ParseTrackID(input string) (*TrackId, error) { } id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTrackIDInsensitively(input string) (*TrackId, error) { } id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go index 1838e0969b3..0e96084d1d0 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfilterscreateorupdate.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersCreateOrUpdate(ctx context.Cont var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go index e7ab587e979..10142a6e674 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersGet(ctx context.Context, id Ass var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go index 2a1014b4f8f..24449c6d253 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetfiltersupdate.go @@ -49,7 +49,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersUpdate(ctx context.Context, id var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go index 89aedab7073..a59c5afc184 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetscreateorupdate.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetsCreateOrUpdate(ctx context.Context, i var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go index 0b1148a155f..aafa2aad807 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) AssetsGet(ctx context.Context, id AssetId) var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go index afbb605bfc5..8b8620b9c18 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsgetencryptionkey.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) AssetsGetEncryptionKey(ctx context.Context, var model StorageEncryptedAssetDecryptionData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go index dbcabd76de4..fed9e31d6a0 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslist.go @@ -41,6 +41,7 @@ func (o AssetsListOperationOptions) ToHeaders() *client.Headers { func (o AssetsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go index 6b260dc998e..7bd740f76cb 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetslistcontainersas.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetsListContainerSas(ctx context.Context, var model AssetContainerSas result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go index bf0a792bdd0..eb1d6952499 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsliststreaminglocators.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) AssetsListStreamingLocators(ctx context.Con var model ListStreamingLocatorsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go index 43cc39feaf7..6a27fd06173 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_assetsupdate.go @@ -49,7 +49,6 @@ func (c AssetsAndAssetFiltersClient) AssetsUpdate(ctx context.Context, id AssetI var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go index e0526916649..085c68d929d 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_tracksget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) TracksGet(ctx context.Context, id TrackId) var model AssetTrack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go b/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go index 308afb97c93..aa33c018076 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/method_trackslist.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) TracksList(ctx context.Context, id AssetId) var model AssetTrackCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go b/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go index 54fa37667d3..45042a11b83 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/model_assettrackproperties.go @@ -30,7 +30,7 @@ func (s *AssetTrackProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["track"]; ok { - impl, err := unmarshalTrackBaseImplementation(v) + impl, err := UnmarshalTrackBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Track' for 'AssetTrackProperties': %+v", err) } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go b/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go index 3f575dcca9c..36204116e07 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/model_audiotrack.go @@ -13,6 +13,14 @@ var _ TrackBase = AudioTrack{} type AudioTrack struct { // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s AudioTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioTrack{} @@ -26,9 +34,10 @@ func (s AudioTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go b/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go index 8be1279bab0..8ed7392bae5 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/model_texttrack.go @@ -18,6 +18,14 @@ type TextTrack struct { PlayerVisibility *Visibility `json:"playerVisibility,omitempty"` // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s TextTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = TextTrack{} @@ -31,9 +39,10 @@ func (s TextTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.TextTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go b/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go index 46a24e0d7cc..1729293bff5 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/model_trackbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TrackBase interface { + TrackBase() BaseTrackBaseImpl } -// RawTrackBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TrackBase = BaseTrackBaseImpl{} + +type BaseTrackBaseImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseTrackBaseImpl) TrackBase() BaseTrackBaseImpl { + return s +} + +var _ TrackBase = RawTrackBaseImpl{} + +// RawTrackBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTrackBaseImpl struct { - Type string - Values map[string]interface{} + trackBase BaseTrackBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTrackBaseImpl) TrackBase() BaseTrackBaseImpl { + return s.trackBase } -func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { +func UnmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { return out, nil } - out := RawTrackBaseImpl{ - Type: value, - Values: temp, + var parent BaseTrackBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTrackBaseImpl: %+v", err) } - return out, nil + + return RawTrackBaseImpl{ + trackBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go b/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go index c3a2548082d..abed5abd5e2 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/model_videotrack.go @@ -13,6 +13,14 @@ var _ TrackBase = VideoTrack{} type VideoTrack struct { // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s VideoTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoTrack{} @@ -26,9 +34,10 @@ func (s VideoTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/assetsandassetfilters/version.go b/resource-manager/media/2021-11-01/assetsandassetfilters/version.go index f1ff0c1438e..04f9365ce03 100644 --- a/resource-manager/media/2021-11-01/assetsandassetfilters/version.go +++ b/resource-manager/media/2021-11-01/assetsandassetfilters/version.go @@ -1,12 +1,10 @@ package assetsandassetfilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assetsandassetfilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assetsandassetfilters/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/README.md b/resource-manager/media/2021-11-01/contentkeypolicies/README.md index 6ac6842aecb..39bb2607e37 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/README.md +++ b/resource-manager/media/2021-11-01/contentkeypolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/contentkeypolicies` Documentation -The `contentkeypolicies` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `contentkeypolicies` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/client.go b/resource-manager/media/2021-11-01/contentkeypolicies/client.go index 528842e6d8a..5cac04252c5 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/client.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/client.go @@ -15,7 +15,7 @@ type ContentKeyPoliciesClient struct { } func NewContentKeyPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentKeyPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentkeypolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentkeypolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentKeyPoliciesClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go b/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go index f96b6b70608..a1401b6db14 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/id_contentkeypolicy.go @@ -44,7 +44,7 @@ func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { } id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, er } id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go b/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go index abd916a436f..9fb4b542f64 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go b/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go index 77d0e3abcde..ddb0b4da26a 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, id Content var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go b/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go index 419eb2bb9a4..520b5a17ded 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/method_get.go @@ -45,7 +45,6 @@ func (c ContentKeyPoliciesClient) Get(ctx context.Context, id ContentKeyPolicyId var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go b/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go index 2c60617e1c9..45fc044afe6 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go @@ -46,7 +46,6 @@ func (c ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Con var model ContentKeyPolicyProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go b/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go index 05399ba40fe..2a209325989 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go b/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go index d3b82b3e042..9375dd8d11e 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/method_update.go @@ -49,7 +49,6 @@ func (c ContentKeyPoliciesClient) Update(ctx context.Context, id ContentKeyPolic var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go index 9cc26cd28e8..1caef5c6268 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyConfiguration = ContentKeyPolicyClearKeyConfiguration{} type ContentKeyPolicyClearKeyConfiguration struct { // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyClearKeyConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyClearKeyConfiguration{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go index bdd6a1d2533..168bc29e7fa 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyConfiguration interface { + ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl } -// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyConfiguration = BaseContentKeyPolicyConfigurationImpl{} + +type BaseContentKeyPolicyConfigurationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyConfigurationImpl) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return s +} + +var _ ContentKeyPolicyConfiguration = RawContentKeyPolicyConfigurationImpl{} + +// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyConfigurationImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyConfiguration BaseContentKeyPolicyConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyConfigurationImpl) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return s.contentKeyPolicyConfiguration } -func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { +func UnmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (Content return out, nil } - out := RawContentKeyPolicyConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyConfigurationImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyConfigurationImpl{ + contentKeyPolicyConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go index f7983ee301a..ca758e4a29c 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go @@ -19,6 +19,14 @@ type ContentKeyPolicyFairPlayConfiguration struct { RentalDuration int64 `json:"rentalDuration"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyFairPlayConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyFairPlayConfiguration{} @@ -32,9 +40,10 @@ func (s ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go index 4a5e74404b1..bc18d18be65 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyRestriction = ContentKeyPolicyOpenRestriction{} type ContentKeyPolicyOpenRestriction struct { // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyOpenRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyOpenRestriction{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyOpenRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go index 687ed9dd6c8..3020a17f70d 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyoption.go @@ -33,7 +33,7 @@ func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["configuration"]; ok { - impl, err := unmarshalContentKeyPolicyConfigurationImplementation(v) + impl, err := UnmarshalContentKeyPolicyConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Configuration' for 'ContentKeyPolicyOption': %+v", err) } @@ -41,7 +41,7 @@ func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restriction"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionImplementation(v) + impl, err := UnmarshalContentKeyPolicyRestrictionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Restriction' for 'ContentKeyPolicyOption': %+v", err) } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go index 3f609b4a8da..9755b9dc5bb 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go @@ -15,6 +15,14 @@ type ContentKeyPolicyPlayReadyConfiguration struct { ResponseCustomData *string `json:"responseCustomData,omitempty"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyConfiguration{} @@ -28,9 +36,10 @@ func (s ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go index 1795b14bc22..53d857e4b79 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyCon type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct { // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON() ( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go index 91ed242963b..7e4edc77afb 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go @@ -14,6 +14,14 @@ type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct { KeyId string `json:"keyId"` // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go index 4966f524297..afbd312c3e8 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyPlayReadyContentKeyLocation interface { + ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl } -// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyPlayReadyContentKeyLocation = BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{} + +type BaseContentKeyPolicyPlayReadyContentKeyLocationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyPlayReadyContentKeyLocationImpl) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return s +} + +var _ ContentKeyPolicyPlayReadyContentKeyLocation = RawContentKeyPolicyPlayReadyContentKeyLocationImpl{} + +// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyPlayReadyContentKeyLocationImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyPlayReadyContentKeyLocation BaseContentKeyPolicyPlayReadyContentKeyLocationImpl + Type string + Values map[string]interface{} } -func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { +func (s RawContentKeyPolicyPlayReadyContentKeyLocationImpl) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return s.contentKeyPolicyPlayReadyContentKeyLocation +} + +func UnmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input [] return out, nil } - out := RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ + var parent BaseContentKeyPolicyPlayReadyContentKeyLocationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyPlayReadyContentKeyLocationImpl: %+v", err) + } + + return RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ + contentKeyPolicyPlayReadyContentKeyLocation: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go index db772324208..063c1d10eee 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go @@ -73,7 +73,7 @@ func (s *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["contentKeyLocation"]; ok { - impl, err := unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) + impl, err := UnmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ContentKeyLocation' for 'ContentKeyPolicyPlayReadyLicense': %+v", err) } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go index 1f3ab4d83cf..4908dc096d3 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestriction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyRestriction interface { + ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl } -// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyRestriction = BaseContentKeyPolicyRestrictionImpl{} + +type BaseContentKeyPolicyRestrictionImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyRestrictionImpl) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return s +} + +var _ ContentKeyPolicyRestriction = RawContentKeyPolicyRestrictionImpl{} + +// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyRestrictionImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyRestriction BaseContentKeyPolicyRestrictionImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyRestrictionImpl) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return s.contentKeyPolicyRestriction } -func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { +func UnmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKe return out, nil } - out := RawContentKeyPolicyRestrictionImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyRestrictionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyRestrictionImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyRestrictionImpl{ + contentKeyPolicyRestriction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go index 6d8a4e938da..5ab4af80c92 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyRestrictionTokenKey interface { + ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl } -// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyRestrictionTokenKey = BaseContentKeyPolicyRestrictionTokenKeyImpl{} + +type BaseContentKeyPolicyRestrictionTokenKeyImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyRestrictionTokenKeyImpl) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return s +} + +var _ ContentKeyPolicyRestrictionTokenKey = RawContentKeyPolicyRestrictionTokenKeyImpl{} + +// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyRestrictionTokenKeyImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyRestrictionTokenKey BaseContentKeyPolicyRestrictionTokenKeyImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyRestrictionTokenKeyImpl) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return s.contentKeyPolicyRestrictionTokenKey } -func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { +func UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (C return out, nil } - out := RawContentKeyPolicyRestrictionTokenKeyImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyRestrictionTokenKeyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyRestrictionTokenKeyImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyRestrictionTokenKeyImpl{ + contentKeyPolicyRestrictionTokenKey: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go index 75dc037576d..b6ccf62b62f 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go @@ -15,6 +15,14 @@ type ContentKeyPolicyRsaTokenKey struct { Modulus string `json:"modulus"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyRsaTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyRsaTokenKey{} @@ -28,9 +36,10 @@ func (s ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRsaTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyRsaTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go index 97eab4e535d..a9794218a5d 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go @@ -14,6 +14,14 @@ type ContentKeyPolicySymmetricTokenKey struct { KeyValue string `json:"keyValue"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicySymmetricTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicySymmetricTokenKey{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicySymmetricTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go index 6b5e417cc01..fbb81c59066 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go @@ -20,6 +20,14 @@ type ContentKeyPolicyTokenRestriction struct { RestrictionTokenType ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType"` // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyTokenRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyTokenRestriction{} @@ -33,9 +41,10 @@ func (s ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyTokenRestriction" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { s.Audience = decoded.Audience s.Issuer = decoded.Issuer + s.OdataType = decoded.OdataType s.OpenIdConnectDiscoveryDocument = decoded.OpenIdConnectDiscoveryDocument s.RequiredClaims = decoded.RequiredClaims s.RestrictionTokenType = decoded.RestrictionTokenType @@ -74,7 +84,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { output := make([]ContentKeyPolicyRestrictionTokenKey, 0) for i, val := range listTemp { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) + impl, err := UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'AlternateVerificationKeys' for 'ContentKeyPolicyTokenRestriction': %+v", i, err) } @@ -84,7 +94,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryVerificationKey"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) + impl, err := UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryVerificationKey' for 'ContentKeyPolicyTokenRestriction': %+v", err) } diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go index 9683eb34e56..0bcad5663e8 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyConfiguration = ContentKeyPolicyUnknownConfiguration{} type ContentKeyPolicyUnknownConfiguration struct { // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyUnknownConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyUnknownConfiguration{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go index a7ab64728f2..9577bc2db34 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyRestriction = ContentKeyPolicyUnknownRestriction{} type ContentKeyPolicyUnknownRestriction struct { // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyUnknownRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyUnknownRestriction{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go index 1a79d287964..206210874c4 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go @@ -14,6 +14,14 @@ type ContentKeyPolicyWidevineConfiguration struct { WidevineTemplate string `json:"widevineTemplate"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyWidevineConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyWidevineConfiguration{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyWidevineConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go index 0810b28176e..96f3700440a 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go @@ -14,6 +14,14 @@ type ContentKeyPolicyX509CertificateTokenKey struct { RawBody string `json:"rawBody"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyX509CertificateTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyX509CertificateTokenKey{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/contentkeypolicies/version.go b/resource-manager/media/2021-11-01/contentkeypolicies/version.go index 66b150140ba..c61671595c6 100644 --- a/resource-manager/media/2021-11-01/contentkeypolicies/version.go +++ b/resource-manager/media/2021-11-01/contentkeypolicies/version.go @@ -1,12 +1,10 @@ package contentkeypolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentkeypolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentkeypolicies/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/encodings/README.md b/resource-manager/media/2021-11-01/encodings/README.md index a7ac50eafbc..3e0e835eca2 100644 --- a/resource-manager/media/2021-11-01/encodings/README.md +++ b/resource-manager/media/2021-11-01/encodings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/encodings` Documentation -The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `encodings` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/encodings/client.go b/resource-manager/media/2021-11-01/encodings/client.go index d09d3ae04ed..553883f512c 100644 --- a/resource-manager/media/2021-11-01/encodings/client.go +++ b/resource-manager/media/2021-11-01/encodings/client.go @@ -15,7 +15,7 @@ type EncodingsClient struct { } func NewEncodingsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncodingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encodings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encodings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncodingsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/id_job.go b/resource-manager/media/2021-11-01/encodings/id_job.go index 5530931f0fd..8f68f873605 100644 --- a/resource-manager/media/2021-11-01/encodings/id_job.go +++ b/resource-manager/media/2021-11-01/encodings/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/encodings/id_mediaservice.go b/resource-manager/media/2021-11-01/encodings/id_mediaservice.go index 2b78d8406de..95b4ff29d2b 100644 --- a/resource-manager/media/2021-11-01/encodings/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/encodings/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/encodings/id_transform.go b/resource-manager/media/2021-11-01/encodings/id_transform.go index 21098483a3c..2930187007f 100644 --- a/resource-manager/media/2021-11-01/encodings/id_transform.go +++ b/resource-manager/media/2021-11-01/encodings/id_transform.go @@ -44,7 +44,7 @@ func ParseTransformID(input string) (*TransformId, error) { } id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTransformIDInsensitively(input string) (*TransformId, error) { } id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/encodings/method_jobscreate.go b/resource-manager/media/2021-11-01/encodings/method_jobscreate.go index 82eb14dd50e..c727f61b05a 100644 --- a/resource-manager/media/2021-11-01/encodings/method_jobscreate.go +++ b/resource-manager/media/2021-11-01/encodings/method_jobscreate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) JobsCreate(ctx context.Context, id JobId, input Job) (r var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/method_jobsget.go b/resource-manager/media/2021-11-01/encodings/method_jobsget.go index 6788a17b019..6052d512a14 100644 --- a/resource-manager/media/2021-11-01/encodings/method_jobsget.go +++ b/resource-manager/media/2021-11-01/encodings/method_jobsget.go @@ -45,7 +45,6 @@ func (c EncodingsClient) JobsGet(ctx context.Context, id JobId) (result JobsGetO var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/method_jobslist.go b/resource-manager/media/2021-11-01/encodings/method_jobslist.go index e0aea11250a..53f3ef3255c 100644 --- a/resource-manager/media/2021-11-01/encodings/method_jobslist.go +++ b/resource-manager/media/2021-11-01/encodings/method_jobslist.go @@ -40,6 +40,7 @@ func (o JobsListOperationOptions) ToHeaders() *client.Headers { func (o JobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go b/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go index c78187ef7ca..924da83d717 100644 --- a/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go +++ b/resource-manager/media/2021-11-01/encodings/method_jobsupdate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) JobsUpdate(ctx context.Context, id JobId, input Job) (r var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go b/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go index 407d4c82052..531d80e51fd 100644 --- a/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go +++ b/resource-manager/media/2021-11-01/encodings/method_transformscreateorupdate.go @@ -50,7 +50,6 @@ func (c EncodingsClient) TransformsCreateOrUpdate(ctx context.Context, id Transf var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/method_transformsget.go b/resource-manager/media/2021-11-01/encodings/method_transformsget.go index fce05d25773..eca9a64fa8a 100644 --- a/resource-manager/media/2021-11-01/encodings/method_transformsget.go +++ b/resource-manager/media/2021-11-01/encodings/method_transformsget.go @@ -45,7 +45,6 @@ func (c EncodingsClient) TransformsGet(ctx context.Context, id TransformId) (res var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/method_transformslist.go b/resource-manager/media/2021-11-01/encodings/method_transformslist.go index 46d8bd251ce..1a001f81b2e 100644 --- a/resource-manager/media/2021-11-01/encodings/method_transformslist.go +++ b/resource-manager/media/2021-11-01/encodings/method_transformslist.go @@ -40,6 +40,7 @@ func (o TransformsListOperationOptions) ToHeaders() *client.Headers { func (o TransformsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go b/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go index 05a8b19d200..2bd6e5ed10d 100644 --- a/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go +++ b/resource-manager/media/2021-11-01/encodings/method_transformsupdate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) TransformsUpdate(ctx context.Context, id TransformId, i var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/encodings/model_aacaudio.go b/resource-manager/media/2021-11-01/encodings/model_aacaudio.go index 067403385ae..d31fb0411d2 100644 --- a/resource-manager/media/2021-11-01/encodings/model_aacaudio.go +++ b/resource-manager/media/2021-11-01/encodings/model_aacaudio.go @@ -17,7 +17,16 @@ type AacAudio struct { SamplingRate *int64 `json:"samplingRate,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s AacAudio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = AacAudio{} @@ -31,9 +40,10 @@ func (s AacAudio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AacAudio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AacAudio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go b/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go index e1e8cedcd10..fa3f469dc2e 100644 --- a/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go +++ b/resource-manager/media/2021-11-01/encodings/model_absolutecliptime.go @@ -14,6 +14,14 @@ type AbsoluteClipTime struct { Time string `json:"time"` // Fields inherited from ClipTime + + OdataType string `json:"@odata.type"` +} + +func (s AbsoluteClipTime) ClipTime() BaseClipTimeImpl { + return BaseClipTimeImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AbsoluteClipTime{} @@ -27,9 +35,10 @@ func (s AbsoluteClipTime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteClipTime: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AbsoluteClipTime" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_audio.go b/resource-manager/media/2021-11-01/encodings/model_audio.go index a2007b0056c..ccf72f47d28 100644 --- a/resource-manager/media/2021-11-01/encodings/model_audio.go +++ b/resource-manager/media/2021-11-01/encodings/model_audio.go @@ -16,7 +16,16 @@ type Audio struct { SamplingRate *int64 `json:"samplingRate,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Audio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Audio{} @@ -30,9 +39,10 @@ func (s Audio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Audio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Audio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go b/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go index 45a7be9a1c1..9c018dd7706 100644 --- a/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go +++ b/resource-manager/media/2021-11-01/encodings/model_audioanalyzerpreset.go @@ -16,6 +16,14 @@ type AudioAnalyzerPreset struct { Mode *AudioAnalysisMode `json:"mode,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s AudioAnalyzerPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioAnalyzerPreset{} @@ -29,9 +37,10 @@ func (s AudioAnalyzerPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioAnalyzerPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioAnalyzerPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go b/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go index 3d21e6aeb17..ecb383cb4b7 100644 --- a/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go +++ b/resource-manager/media/2021-11-01/encodings/model_audiooverlay.go @@ -13,14 +13,28 @@ var _ Overlay = AudioOverlay{} type AudioOverlay struct { // Fields inherited from Overlay + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` End *string `json:"end,omitempty"` FadeInDuration *string `json:"fadeInDuration,omitempty"` FadeOutDuration *string `json:"fadeOutDuration,omitempty"` InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` Start *string `json:"start,omitempty"` } +func (s AudioOverlay) Overlay() BaseOverlayImpl { + return BaseOverlayImpl{ + AudioGainLevel: s.AudioGainLevel, + End: s.End, + FadeInDuration: s.FadeInDuration, + FadeOutDuration: s.FadeOutDuration, + InputLabel: s.InputLabel, + OdataType: s.OdataType, + Start: s.Start, + } +} + var _ json.Marshaler = AudioOverlay{} func (s AudioOverlay) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s AudioOverlay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioOverlay: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioOverlay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go b/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go index 81990a6d7d2..956f9fc1b20 100644 --- a/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go +++ b/resource-manager/media/2021-11-01/encodings/model_audiotrackdescriptor.go @@ -14,6 +14,14 @@ type AudioTrackDescriptor struct { ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s AudioTrackDescriptor) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioTrackDescriptor{} @@ -27,9 +35,10 @@ func (s AudioTrackDescriptor) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioTrackDescriptor: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioTrackDescriptor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go b/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go index a11bfb0f219..cf3f751f2f3 100644 --- a/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go +++ b/resource-manager/media/2021-11-01/encodings/model_builtinstandardencoderpreset.go @@ -15,6 +15,14 @@ type BuiltInStandardEncoderPreset struct { PresetName EncoderNamedPreset `json:"presetName"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s BuiltInStandardEncoderPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = BuiltInStandardEncoderPreset{} @@ -28,9 +36,10 @@ func (s BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuiltInStandardEncoderPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.BuiltInStandardEncoderPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_cliptime.go b/resource-manager/media/2021-11-01/encodings/model_cliptime.go index d57cf10337b..e963e1442ae 100644 --- a/resource-manager/media/2021-11-01/encodings/model_cliptime.go +++ b/resource-manager/media/2021-11-01/encodings/model_cliptime.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClipTime interface { + ClipTime() BaseClipTimeImpl } -// RawClipTimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClipTime = BaseClipTimeImpl{} + +type BaseClipTimeImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseClipTimeImpl) ClipTime() BaseClipTimeImpl { + return s +} + +var _ ClipTime = RawClipTimeImpl{} + +// RawClipTimeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClipTimeImpl struct { - Type string - Values map[string]interface{} + clipTime BaseClipTimeImpl + Type string + Values map[string]interface{} +} + +func (s RawClipTimeImpl) ClipTime() BaseClipTimeImpl { + return s.clipTime } -func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { +func UnmarshalClipTimeImplementation(input []byte) (ClipTime, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { return out, nil } - out := RawClipTimeImpl{ - Type: value, - Values: temp, + var parent BaseClipTimeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClipTimeImpl: %+v", err) } - return out, nil + + return RawClipTimeImpl{ + clipTime: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_codec.go b/resource-manager/media/2021-11-01/encodings/model_codec.go index 0ac7cdcc648..10db169a5ca 100644 --- a/resource-manager/media/2021-11-01/encodings/model_codec.go +++ b/resource-manager/media/2021-11-01/encodings/model_codec.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Codec interface { + Codec() BaseCodecImpl } -// RawCodecImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Codec = BaseCodecImpl{} + +type BaseCodecImpl struct { + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s BaseCodecImpl) Codec() BaseCodecImpl { + return s +} + +var _ Codec = RawCodecImpl{} + +// RawCodecImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCodecImpl struct { + codec BaseCodecImpl Type string Values map[string]interface{} } -func unmarshalCodecImplementation(input []byte) (Codec, error) { +func (s RawCodecImpl) Codec() BaseCodecImpl { + return s.codec +} + +func UnmarshalCodecImplementation(input []byte) (Codec, error) { if input == nil { return nil, nil } @@ -116,10 +134,15 @@ func unmarshalCodecImplementation(input []byte) (Codec, error) { return out, nil } - out := RawCodecImpl{ + var parent BaseCodecImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCodecImpl: %+v", err) + } + + return RawCodecImpl{ + codec: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_copyaudio.go b/resource-manager/media/2021-11-01/encodings/model_copyaudio.go index 5d1be89597e..3f38717cab7 100644 --- a/resource-manager/media/2021-11-01/encodings/model_copyaudio.go +++ b/resource-manager/media/2021-11-01/encodings/model_copyaudio.go @@ -13,7 +13,16 @@ var _ Codec = CopyAudio{} type CopyAudio struct { // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s CopyAudio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = CopyAudio{} @@ -27,9 +36,10 @@ func (s CopyAudio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyAudio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.CopyAudio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_copyvideo.go b/resource-manager/media/2021-11-01/encodings/model_copyvideo.go index 5f663b6d2bf..d9a3b78b78e 100644 --- a/resource-manager/media/2021-11-01/encodings/model_copyvideo.go +++ b/resource-manager/media/2021-11-01/encodings/model_copyvideo.go @@ -13,7 +13,16 @@ var _ Codec = CopyVideo{} type CopyVideo struct { // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s CopyVideo) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = CopyVideo{} @@ -27,9 +36,10 @@ func (s CopyVideo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyVideo: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.CopyVideo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go b/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go index b6b9b66de46..8cd3e44a11d 100644 --- a/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go +++ b/resource-manager/media/2021-11-01/encodings/model_facedetectorpreset.go @@ -17,6 +17,14 @@ type FaceDetectorPreset struct { Resolution *AnalysisResolution `json:"resolution,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s FaceDetectorPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = FaceDetectorPreset{} @@ -30,9 +38,10 @@ func (s FaceDetectorPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FaceDetectorPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FaceDetectorPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_filters.go b/resource-manager/media/2021-11-01/encodings/model_filters.go index 4e50eaa91ae..71f4f56d293 100644 --- a/resource-manager/media/2021-11-01/encodings/model_filters.go +++ b/resource-manager/media/2021-11-01/encodings/model_filters.go @@ -41,7 +41,7 @@ func (s *Filters) UnmarshalJSON(bytes []byte) error { output := make([]Overlay, 0) for i, val := range listTemp { - impl, err := unmarshalOverlayImplementation(val) + impl, err := UnmarshalOverlayImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Overlays' for 'Filters': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_format.go b/resource-manager/media/2021-11-01/encodings/model_format.go index 65f94ae3b89..fb622d84bfc 100644 --- a/resource-manager/media/2021-11-01/encodings/model_format.go +++ b/resource-manager/media/2021-11-01/encodings/model_format.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Format interface { + Format() BaseFormatImpl } -// RawFormatImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Format = BaseFormatImpl{} + +type BaseFormatImpl struct { + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s BaseFormatImpl) Format() BaseFormatImpl { + return s +} + +var _ Format = RawFormatImpl{} + +// RawFormatImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFormatImpl struct { + format BaseFormatImpl Type string Values map[string]interface{} } -func unmarshalFormatImplementation(input []byte) (Format, error) { +func (s RawFormatImpl) Format() BaseFormatImpl { + return s.format +} + +func UnmarshalFormatImplementation(input []byte) (Format, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalFormatImplementation(input []byte) (Format, error) { return out, nil } - out := RawFormatImpl{ + var parent BaseFormatImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFormatImpl: %+v", err) + } + + return RawFormatImpl{ + format: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go b/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go index c1a7d3860e4..f51c04730cb 100644 --- a/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go +++ b/resource-manager/media/2021-11-01/encodings/model_fromallinputfile.go @@ -13,7 +13,16 @@ var _ InputDefinition = FromAllInputFile{} type FromAllInputFile struct { // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s FromAllInputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = FromAllInputFile{} @@ -27,9 +36,10 @@ func (s FromAllInputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FromAllInputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FromAllInputFile" encoded, err = json.Marshal(decoded) @@ -43,6 +53,13 @@ func (s FromAllInputFile) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &FromAllInputFile{} func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { + type alias FromAllInputFile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FromAllInputFile: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +74,7 @@ func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromAllInputFile': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go b/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go index 02137a86e8a..13fae98282c 100644 --- a/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go +++ b/resource-manager/media/2021-11-01/encodings/model_fromeachinputfile.go @@ -13,7 +13,16 @@ var _ InputDefinition = FromEachInputFile{} type FromEachInputFile struct { // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s FromEachInputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = FromEachInputFile{} @@ -27,9 +36,10 @@ func (s FromEachInputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FromEachInputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FromEachInputFile" encoded, err = json.Marshal(decoded) @@ -43,6 +53,13 @@ func (s FromEachInputFile) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &FromEachInputFile{} func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { + type alias FromEachInputFile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FromEachInputFile: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +74,7 @@ func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromEachInputFile': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_h264video.go b/resource-manager/media/2021-11-01/encodings/model_h264video.go index fbcd311e539..1dcdb413c51 100644 --- a/resource-manager/media/2021-11-01/encodings/model_h264video.go +++ b/resource-manager/media/2021-11-01/encodings/model_h264video.go @@ -20,7 +20,16 @@ type H264Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s H264Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = H264Video{} @@ -34,9 +43,10 @@ func (s H264Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling H264Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.H264Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_h265video.go b/resource-manager/media/2021-11-01/encodings/model_h265video.go index 9edadac194a..0511d40828a 100644 --- a/resource-manager/media/2021-11-01/encodings/model_h265video.go +++ b/resource-manager/media/2021-11-01/encodings/model_h265video.go @@ -19,7 +19,16 @@ type H265Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s H265Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = H265Video{} @@ -33,9 +42,10 @@ func (s H265Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling H265Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.H265Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_image.go b/resource-manager/media/2021-11-01/encodings/model_image.go index 072a1a7537e..ce91ff75376 100644 --- a/resource-manager/media/2021-11-01/encodings/model_image.go +++ b/resource-manager/media/2021-11-01/encodings/model_image.go @@ -19,7 +19,16 @@ type Image struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Image) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Image{} @@ -33,9 +42,10 @@ func (s Image) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Image: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Image" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_imageformat.go b/resource-manager/media/2021-11-01/encodings/model_imageformat.go index 0e390a0c6f3..8d388bbb539 100644 --- a/resource-manager/media/2021-11-01/encodings/model_imageformat.go +++ b/resource-manager/media/2021-11-01/encodings/model_imageformat.go @@ -13,7 +13,16 @@ var _ Format = ImageFormat{} type ImageFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s ImageFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = ImageFormat{} @@ -27,9 +36,10 @@ func (s ImageFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ImageFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go b/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go index 04e0c4c26ba..1c653190a64 100644 --- a/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go +++ b/resource-manager/media/2021-11-01/encodings/model_inputdefinition.go @@ -10,18 +10,71 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputDefinition interface { + InputDefinition() BaseInputDefinitionImpl } -// RawInputDefinitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputDefinition = BaseInputDefinitionImpl{} + +type BaseInputDefinitionImpl struct { + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s BaseInputDefinitionImpl) InputDefinition() BaseInputDefinitionImpl { + return s +} + +var _ InputDefinition = RawInputDefinitionImpl{} + +// RawInputDefinitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputDefinitionImpl struct { - Type string - Values map[string]interface{} + inputDefinition BaseInputDefinitionImpl + Type string + Values map[string]interface{} } -func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { +func (s RawInputDefinitionImpl) InputDefinition() BaseInputDefinitionImpl { + return s.inputDefinition +} + +var _ json.Unmarshaler = &BaseInputDefinitionImpl{} + +func (s *BaseInputDefinitionImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputDefinitionImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputDefinitionImpl: %+v", err) + } + + s.OdataType = decoded.OdataType + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputDefinitionImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["includedTracks"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) + } + + output := make([]TrackDescriptor, 0) + for i, val := range listTemp { + impl, err := UnmarshalTrackDescriptorImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'BaseInputDefinitionImpl': %+v", i, err) + } + output = append(output, impl) + } + s.IncludedTracks = &output + } + return nil +} + +func UnmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { if input == nil { return nil, nil } @@ -60,10 +113,15 @@ func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, erro return out, nil } - out := RawInputDefinitionImpl{ - Type: value, - Values: temp, + var parent BaseInputDefinitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputDefinitionImpl: %+v", err) } - return out, nil + + return RawInputDefinitionImpl{ + inputDefinition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_inputfile.go b/resource-manager/media/2021-11-01/encodings/model_inputfile.go index 4c3f11b6d7f..9d9f62300dc 100644 --- a/resource-manager/media/2021-11-01/encodings/model_inputfile.go +++ b/resource-manager/media/2021-11-01/encodings/model_inputfile.go @@ -14,7 +14,16 @@ type InputFile struct { Filename *string `json:"filename,omitempty"` // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s InputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = InputFile{} @@ -28,9 +37,10 @@ func (s InputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.InputFile" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *InputFile) UnmarshalJSON(bytes []byte) error { } s.Filename = decoded.Filename + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *InputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'InputFile': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinput.go b/resource-manager/media/2021-11-01/encodings/model_jobinput.go index e4d997151de..3f644e15826 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinput.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go b/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go index 689f8282884..c102f79c865 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinputasset.go @@ -19,6 +19,14 @@ type JobInputAsset struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputAsset) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputAsset{} @@ -32,9 +40,10 @@ func (s JobInputAsset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputAsset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputAsset" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { s.AssetName = decoded.AssetName s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -64,7 +74,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputAsset': %+v", err) } @@ -79,7 +89,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputAsset': %+v", i, err) } @@ -89,7 +99,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputAsset': %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go b/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go index 5136c539d5b..e2ba2b21bb2 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinputclip.go @@ -18,6 +18,14 @@ type JobInputClip struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputClip) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputClip{} @@ -31,9 +39,10 @@ func (s JobInputClip) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputClip: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputClip" encoded, err = json.Marshal(decoded) @@ -55,6 +64,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -62,7 +72,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputClip': %+v", err) } @@ -77,7 +87,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputClip': %+v", i, err) } @@ -87,7 +97,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputClip': %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go b/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go index 57beddd3fde..c5d2bc866fe 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinputhttp.go @@ -19,6 +19,14 @@ type JobInputHTTP struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputHTTP) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputHTTP{} @@ -32,9 +40,10 @@ func (s JobInputHTTP) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputHTTP: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputHttp" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { s.BaseUri = decoded.BaseUri s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -64,7 +74,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputHTTP': %+v", err) } @@ -79,7 +89,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputHTTP': %+v", i, err) } @@ -89,7 +99,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputHTTP': %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinputs.go b/resource-manager/media/2021-11-01/encodings/model_jobinputs.go index b63a141b6e0..0de387ed23d 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinputs.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinputs.go @@ -14,6 +14,14 @@ type JobInputs struct { Inputs *[]JobInput `json:"inputs,omitempty"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputs) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputs{} @@ -27,9 +35,10 @@ func (s JobInputs) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputs: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputs" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s JobInputs) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &JobInputs{} func (s *JobInputs) UnmarshalJSON(bytes []byte) error { + type alias JobInputs + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JobInputs: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +73,7 @@ func (s *JobInputs) UnmarshalJSON(bytes []byte) error { output := make([]JobInput, 0) for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputs': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go b/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go index 9c85a35b730..d8b3ada5296 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobinputsequence.go @@ -14,6 +14,14 @@ type JobInputSequence struct { Inputs *[]JobInputClip `json:"inputs,omitempty"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputSequence) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputSequence{} @@ -27,9 +35,10 @@ func (s JobInputSequence) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputSequence: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputSequence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_joboutput.go b/resource-manager/media/2021-11-01/encodings/model_joboutput.go index 6135f1282f5..95d6eeeb6ea 100644 --- a/resource-manager/media/2021-11-01/encodings/model_joboutput.go +++ b/resource-manager/media/2021-11-01/encodings/model_joboutput.go @@ -10,18 +10,74 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + EndTime *string `json:"endTime,omitempty"` + Error *JobError `json:"error,omitempty"` + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` + PresetOverride Preset `json:"presetOverride"` + Progress *int64 `json:"progress,omitempty"` + StartTime *string `json:"startTime,omitempty"` + State *JobState `json:"state,omitempty"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +var _ json.Unmarshaler = &BaseJobOutputImpl{} + +func (s *BaseJobOutputImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobOutputImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) + } + + s.EndTime = decoded.EndTime + s.Error = decoded.Error + s.Label = decoded.Label + s.OdataType = decoded.OdataType + s.Progress = decoded.Progress + s.StartTime = decoded.StartTime + s.State = decoded.State + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobOutputImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["presetOverride"]; ok { + impl, err := UnmarshalPresetImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PresetOverride' for 'BaseJobOutputImpl': %+v", err) + } + s.PresetOverride = impl + } + return nil +} + +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -44,10 +100,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go b/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go index ed0aa4672cc..4bba8526ffc 100644 --- a/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go +++ b/resource-manager/media/2021-11-01/encodings/model_joboutputasset.go @@ -17,15 +17,30 @@ type JobOutputAsset struct { AssetName string `json:"assetName"` // Fields inherited from JobOutput + EndTime *string `json:"endTime,omitempty"` Error *JobError `json:"error,omitempty"` Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` PresetOverride Preset `json:"presetOverride"` Progress *int64 `json:"progress,omitempty"` StartTime *string `json:"startTime,omitempty"` State *JobState `json:"state,omitempty"` } +func (s JobOutputAsset) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + EndTime: s.EndTime, + Error: s.Error, + Label: s.Label, + OdataType: s.OdataType, + PresetOverride: s.PresetOverride, + Progress: s.Progress, + StartTime: s.StartTime, + State: s.State, + } +} + func (o *JobOutputAsset) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -61,9 +76,10 @@ func (s JobOutputAsset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobOutputAsset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobOutputAsset" encoded, err = json.Marshal(decoded) @@ -87,6 +103,7 @@ func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { s.EndTime = decoded.EndTime s.Error = decoded.Error s.Label = decoded.Label + s.OdataType = decoded.OdataType s.Progress = decoded.Progress s.StartTime = decoded.StartTime s.State = decoded.State @@ -97,7 +114,7 @@ func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["presetOverride"]; ok { - impl, err := unmarshalPresetImplementation(v) + impl, err := UnmarshalPresetImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PresetOverride' for 'JobOutputAsset': %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jobproperties.go b/resource-manager/media/2021-11-01/encodings/model_jobproperties.go index d1d9fcd58d5..7fe07be9467 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jobproperties.go +++ b/resource-manager/media/2021-11-01/encodings/model_jobproperties.go @@ -96,7 +96,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["input"]; ok { - impl, err := unmarshalJobInputImplementation(v) + impl, err := UnmarshalJobInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Input' for 'JobProperties': %+v", err) } @@ -111,7 +111,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { output := make([]JobOutput, 0) for i, val := range listTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Outputs' for 'JobProperties': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_jpgformat.go b/resource-manager/media/2021-11-01/encodings/model_jpgformat.go index de3e7aba6df..1e969fa78c3 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jpgformat.go +++ b/resource-manager/media/2021-11-01/encodings/model_jpgformat.go @@ -13,7 +13,16 @@ var _ Format = JpgFormat{} type JpgFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s JpgFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = JpgFormat{} @@ -27,9 +36,10 @@ func (s JpgFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JpgFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JpgFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_jpgimage.go b/resource-manager/media/2021-11-01/encodings/model_jpgimage.go index 6f2adffacd3..9072952b701 100644 --- a/resource-manager/media/2021-11-01/encodings/model_jpgimage.go +++ b/resource-manager/media/2021-11-01/encodings/model_jpgimage.go @@ -21,7 +21,16 @@ type JpgImage struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s JpgImage) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = JpgImage{} @@ -35,9 +44,10 @@ func (s JpgImage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JpgImage: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JpgImage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_mp4format.go b/resource-manager/media/2021-11-01/encodings/model_mp4format.go index 44e41dd9492..5294716d327 100644 --- a/resource-manager/media/2021-11-01/encodings/model_mp4format.go +++ b/resource-manager/media/2021-11-01/encodings/model_mp4format.go @@ -14,7 +14,16 @@ type Mp4Format struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s Mp4Format) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = Mp4Format{} @@ -28,9 +37,10 @@ func (s Mp4Format) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mp4Format: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Mp4Format" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go b/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go index fec53d0e680..b366aa46675 100644 --- a/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go +++ b/resource-manager/media/2021-11-01/encodings/model_multibitrateformat.go @@ -14,7 +14,16 @@ type MultiBitrateFormat struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s MultiBitrateFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = MultiBitrateFormat{} @@ -28,9 +37,10 @@ func (s MultiBitrateFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MultiBitrateFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.MultiBitrateFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_overlay.go b/resource-manager/media/2021-11-01/encodings/model_overlay.go index 160ee13ef1d..bc2b0b2725b 100644 --- a/resource-manager/media/2021-11-01/encodings/model_overlay.go +++ b/resource-manager/media/2021-11-01/encodings/model_overlay.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Overlay interface { + Overlay() BaseOverlayImpl } -// RawOverlayImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Overlay = BaseOverlayImpl{} + +type BaseOverlayImpl struct { + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` + End *string `json:"end,omitempty"` + FadeInDuration *string `json:"fadeInDuration,omitempty"` + FadeOutDuration *string `json:"fadeOutDuration,omitempty"` + InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` + Start *string `json:"start,omitempty"` +} + +func (s BaseOverlayImpl) Overlay() BaseOverlayImpl { + return s +} + +var _ Overlay = RawOverlayImpl{} + +// RawOverlayImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOverlayImpl struct { - Type string - Values map[string]interface{} + overlay BaseOverlayImpl + Type string + Values map[string]interface{} +} + +func (s RawOverlayImpl) Overlay() BaseOverlayImpl { + return s.overlay } -func unmarshalOverlayImplementation(input []byte) (Overlay, error) { +func UnmarshalOverlayImplementation(input []byte) (Overlay, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalOverlayImplementation(input []byte) (Overlay, error) { return out, nil } - out := RawOverlayImpl{ - Type: value, - Values: temp, + var parent BaseOverlayImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOverlayImpl: %+v", err) } - return out, nil + + return RawOverlayImpl{ + overlay: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_pngformat.go b/resource-manager/media/2021-11-01/encodings/model_pngformat.go index e9b5216bb86..e06f7ccbd16 100644 --- a/resource-manager/media/2021-11-01/encodings/model_pngformat.go +++ b/resource-manager/media/2021-11-01/encodings/model_pngformat.go @@ -13,7 +13,16 @@ var _ Format = PngFormat{} type PngFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s PngFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = PngFormat{} @@ -27,9 +36,10 @@ func (s PngFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PngFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.PngFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_pngimage.go b/resource-manager/media/2021-11-01/encodings/model_pngimage.go index 7209b7aba30..19df688a905 100644 --- a/resource-manager/media/2021-11-01/encodings/model_pngimage.go +++ b/resource-manager/media/2021-11-01/encodings/model_pngimage.go @@ -20,7 +20,16 @@ type PngImage struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s PngImage) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = PngImage{} @@ -34,9 +43,10 @@ func (s PngImage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PngImage: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.PngImage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_preset.go b/resource-manager/media/2021-11-01/encodings/model_preset.go index af6ef205d33..cf2116cb964 100644 --- a/resource-manager/media/2021-11-01/encodings/model_preset.go +++ b/resource-manager/media/2021-11-01/encodings/model_preset.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Preset interface { + Preset() BasePresetImpl } -// RawPresetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Preset = BasePresetImpl{} + +type BasePresetImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BasePresetImpl) Preset() BasePresetImpl { + return s +} + +var _ Preset = RawPresetImpl{} + +// RawPresetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPresetImpl struct { + preset BasePresetImpl Type string Values map[string]interface{} } -func unmarshalPresetImplementation(input []byte) (Preset, error) { +func (s RawPresetImpl) Preset() BasePresetImpl { + return s.preset +} + +func UnmarshalPresetImplementation(input []byte) (Preset, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalPresetImplementation(input []byte) (Preset, error) { return out, nil } - out := RawPresetImpl{ + var parent BasePresetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePresetImpl: %+v", err) + } + + return RawPresetImpl{ + preset: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go b/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go index ae6bafef503..c9527552714 100644 --- a/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go +++ b/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyattribute.go @@ -17,6 +17,14 @@ type SelectAudioTrackByAttribute struct { FilterValue *string `json:"filterValue,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectAudioTrackByAttribute) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectAudioTrackByAttribute{} @@ -30,9 +38,10 @@ func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectAudioTrackByAttribute: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackByAttribute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go b/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go index e9b4587be0c..41e2ce419a5 100644 --- a/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go +++ b/resource-manager/media/2021-11-01/encodings/model_selectaudiotrackbyid.go @@ -15,6 +15,14 @@ type SelectAudioTrackById struct { TrackId int64 `json:"trackId"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectAudioTrackById) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectAudioTrackById{} @@ -28,9 +36,10 @@ func (s SelectAudioTrackById) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectAudioTrackById: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackById" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go b/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go index 82305909c36..43ef68c1e83 100644 --- a/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go +++ b/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyattribute.go @@ -16,6 +16,14 @@ type SelectVideoTrackByAttribute struct { FilterValue *string `json:"filterValue,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectVideoTrackByAttribute) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectVideoTrackByAttribute{} @@ -29,9 +37,10 @@ func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectVideoTrackByAttribute: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackByAttribute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go b/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go index 4527e73336e..8134a26e83a 100644 --- a/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go +++ b/resource-manager/media/2021-11-01/encodings/model_selectvideotrackbyid.go @@ -14,6 +14,14 @@ type SelectVideoTrackById struct { TrackId int64 `json:"trackId"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectVideoTrackById) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectVideoTrackById{} @@ -27,9 +35,10 @@ func (s SelectVideoTrackById) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectVideoTrackById: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackById" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go b/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go index 35c5b09d1b4..d77f803acd3 100644 --- a/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go +++ b/resource-manager/media/2021-11-01/encodings/model_standardencoderpreset.go @@ -16,6 +16,14 @@ type StandardEncoderPreset struct { Formats []Format `json:"formats"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s StandardEncoderPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = StandardEncoderPreset{} @@ -29,9 +37,10 @@ func (s StandardEncoderPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StandardEncoderPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.StandardEncoderPreset" encoded, err = json.Marshal(decoded) @@ -52,6 +61,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { } s.Filters = decoded.Filters + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -66,7 +76,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { output := make([]Codec, 0) for i, val := range listTemp { - impl, err := unmarshalCodecImplementation(val) + impl, err := UnmarshalCodecImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Codecs' for 'StandardEncoderPreset': %+v", i, err) } @@ -83,7 +93,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { output := make([]Format, 0) for i, val := range listTemp { - impl, err := unmarshalFormatImplementation(val) + impl, err := UnmarshalFormatImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Formats' for 'StandardEncoderPreset': %+v", i, err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go b/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go index 8aa3d1a50d9..499683f3ea1 100644 --- a/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go +++ b/resource-manager/media/2021-11-01/encodings/model_trackdescriptor.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TrackDescriptor interface { + TrackDescriptor() BaseTrackDescriptorImpl } -// RawTrackDescriptorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TrackDescriptor = BaseTrackDescriptorImpl{} + +type BaseTrackDescriptorImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseTrackDescriptorImpl) TrackDescriptor() BaseTrackDescriptorImpl { + return s +} + +var _ TrackDescriptor = RawTrackDescriptorImpl{} + +// RawTrackDescriptorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTrackDescriptorImpl struct { - Type string - Values map[string]interface{} + trackDescriptor BaseTrackDescriptorImpl + Type string + Values map[string]interface{} +} + +func (s RawTrackDescriptorImpl) TrackDescriptor() BaseTrackDescriptorImpl { + return s.trackDescriptor } -func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { +func UnmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, erro return out, nil } - out := RawTrackDescriptorImpl{ - Type: value, - Values: temp, + var parent BaseTrackDescriptorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTrackDescriptorImpl: %+v", err) } - return out, nil + + return RawTrackDescriptorImpl{ + trackDescriptor: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2021-11-01/encodings/model_transformoutput.go b/resource-manager/media/2021-11-01/encodings/model_transformoutput.go index 8532442b750..ce73633e561 100644 --- a/resource-manager/media/2021-11-01/encodings/model_transformoutput.go +++ b/resource-manager/media/2021-11-01/encodings/model_transformoutput.go @@ -32,7 +32,7 @@ func (s *TransformOutput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["preset"]; ok { - impl, err := unmarshalPresetImplementation(v) + impl, err := UnmarshalPresetImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Preset' for 'TransformOutput': %+v", err) } diff --git a/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go b/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go index 5a869925fa5..19d9164b52c 100644 --- a/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go +++ b/resource-manager/media/2021-11-01/encodings/model_transportstreamformat.go @@ -14,7 +14,16 @@ type TransportStreamFormat struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s TransportStreamFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = TransportStreamFormat{} @@ -28,9 +37,10 @@ func (s TransportStreamFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TransportStreamFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.TransportStreamFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_utccliptime.go b/resource-manager/media/2021-11-01/encodings/model_utccliptime.go index 0787e406a94..ae44b538bec 100644 --- a/resource-manager/media/2021-11-01/encodings/model_utccliptime.go +++ b/resource-manager/media/2021-11-01/encodings/model_utccliptime.go @@ -14,6 +14,14 @@ type UtcClipTime struct { Time string `json:"time"` // Fields inherited from ClipTime + + OdataType string `json:"@odata.type"` +} + +func (s UtcClipTime) ClipTime() BaseClipTimeImpl { + return BaseClipTimeImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = UtcClipTime{} @@ -27,9 +35,10 @@ func (s UtcClipTime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UtcClipTime: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.UtcClipTime" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_video.go b/resource-manager/media/2021-11-01/encodings/model_video.go index 35e566481c9..ee697cb68d4 100644 --- a/resource-manager/media/2021-11-01/encodings/model_video.go +++ b/resource-manager/media/2021-11-01/encodings/model_video.go @@ -16,7 +16,16 @@ type Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Video{} @@ -30,9 +39,10 @@ func (s Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go b/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go index d98ab1914de..21ec33356fc 100644 --- a/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go +++ b/resource-manager/media/2021-11-01/encodings/model_videoanalyzerpreset.go @@ -17,6 +17,14 @@ type VideoAnalyzerPreset struct { Mode *AudioAnalysisMode `json:"mode,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s VideoAnalyzerPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoAnalyzerPreset{} @@ -30,9 +38,10 @@ func (s VideoAnalyzerPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoAnalyzerPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoAnalyzerPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_videooverlay.go b/resource-manager/media/2021-11-01/encodings/model_videooverlay.go index 27d0f028256..dceea9d3335 100644 --- a/resource-manager/media/2021-11-01/encodings/model_videooverlay.go +++ b/resource-manager/media/2021-11-01/encodings/model_videooverlay.go @@ -16,14 +16,28 @@ type VideoOverlay struct { Position *Rectangle `json:"position,omitempty"` // Fields inherited from Overlay + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` End *string `json:"end,omitempty"` FadeInDuration *string `json:"fadeInDuration,omitempty"` FadeOutDuration *string `json:"fadeOutDuration,omitempty"` InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` Start *string `json:"start,omitempty"` } +func (s VideoOverlay) Overlay() BaseOverlayImpl { + return BaseOverlayImpl{ + AudioGainLevel: s.AudioGainLevel, + End: s.End, + FadeInDuration: s.FadeInDuration, + FadeOutDuration: s.FadeOutDuration, + InputLabel: s.InputLabel, + OdataType: s.OdataType, + Start: s.Start, + } +} + var _ json.Marshaler = VideoOverlay{} func (s VideoOverlay) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s VideoOverlay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoOverlay: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoOverlay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go b/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go index ff1f690b1d0..96b8e54787a 100644 --- a/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go +++ b/resource-manager/media/2021-11-01/encodings/model_videotrackdescriptor.go @@ -13,6 +13,14 @@ var _ TrackDescriptor = VideoTrackDescriptor{} type VideoTrackDescriptor struct { // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s VideoTrackDescriptor) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoTrackDescriptor{} @@ -26,9 +34,10 @@ func (s VideoTrackDescriptor) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoTrackDescriptor: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2021-11-01/encodings/version.go b/resource-manager/media/2021-11-01/encodings/version.go index d2a74edca26..275c2f4c899 100644 --- a/resource-manager/media/2021-11-01/encodings/version.go +++ b/resource-manager/media/2021-11-01/encodings/version.go @@ -1,12 +1,10 @@ package encodings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encodings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encodings/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/liveevents/README.md b/resource-manager/media/2021-11-01/liveevents/README.md index 7e28b05adec..bf28dcf51f4 100644 --- a/resource-manager/media/2021-11-01/liveevents/README.md +++ b/resource-manager/media/2021-11-01/liveevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveevents` Documentation -The `liveevents` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `liveevents` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/liveevents/client.go b/resource-manager/media/2021-11-01/liveevents/client.go index 85dcde5c926..d90241a8ee3 100644 --- a/resource-manager/media/2021-11-01/liveevents/client.go +++ b/resource-manager/media/2021-11-01/liveevents/client.go @@ -15,7 +15,7 @@ type LiveEventsClient struct { } func NewLiveEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "liveevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LiveEventsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/liveevents/id_liveevent.go b/resource-manager/media/2021-11-01/liveevents/id_liveevent.go index d642499f51e..0f895df228f 100644 --- a/resource-manager/media/2021-11-01/liveevents/id_liveevent.go +++ b/resource-manager/media/2021-11-01/liveevents/id_liveevent.go @@ -44,7 +44,7 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go b/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go index a7d3fc2fea9..aeecdd73199 100644 --- a/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/liveevents/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/liveevents/method_create.go b/resource-manager/media/2021-11-01/liveevents/method_create.go index db743890d4a..7b7624587a1 100644 --- a/resource-manager/media/2021-11-01/liveevents/method_create.go +++ b/resource-manager/media/2021-11-01/liveevents/method_create.go @@ -37,6 +37,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/liveevents/method_get.go b/resource-manager/media/2021-11-01/liveevents/method_get.go index cdefc7b3a39..e662adc8529 100644 --- a/resource-manager/media/2021-11-01/liveevents/method_get.go +++ b/resource-manager/media/2021-11-01/liveevents/method_get.go @@ -45,7 +45,6 @@ func (c LiveEventsClient) Get(ctx context.Context, id LiveEventId) (result GetOp var model LiveEvent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/liveevents/version.go b/resource-manager/media/2021-11-01/liveevents/version.go index 98efdf9294a..9160d0975df 100644 --- a/resource-manager/media/2021-11-01/liveevents/version.go +++ b/resource-manager/media/2021-11-01/liveevents/version.go @@ -1,12 +1,10 @@ package liveevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/liveevents/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/liveoutputs/README.md b/resource-manager/media/2021-11-01/liveoutputs/README.md index 0e5f61749cc..55d8c421914 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/README.md +++ b/resource-manager/media/2021-11-01/liveoutputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/liveoutputs` Documentation -The `liveoutputs` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `liveoutputs` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/liveoutputs/client.go b/resource-manager/media/2021-11-01/liveoutputs/client.go index 49007d18eb8..68d348058ad 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/client.go +++ b/resource-manager/media/2021-11-01/liveoutputs/client.go @@ -15,7 +15,7 @@ type LiveOutputsClient struct { } func NewLiveOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveOutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveoutputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "liveoutputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LiveOutputsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go b/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go index 5b10f380efb..74b762fafd4 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go +++ b/resource-manager/media/2021-11-01/liveoutputs/id_liveevent.go @@ -44,7 +44,7 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go b/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go index 5bbae170c89..0064b0af972 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go +++ b/resource-manager/media/2021-11-01/liveoutputs/id_liveoutput.go @@ -46,7 +46,7 @@ func ParseLiveOutputID(input string) (*LiveOutputId, error) { } id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { } id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/liveoutputs/method_get.go b/resource-manager/media/2021-11-01/liveoutputs/method_get.go index 9502e806865..314514c28f0 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/method_get.go +++ b/resource-manager/media/2021-11-01/liveoutputs/method_get.go @@ -45,7 +45,6 @@ func (c LiveOutputsClient) Get(ctx context.Context, id LiveOutputId) (result Get var model LiveOutput result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/liveoutputs/version.go b/resource-manager/media/2021-11-01/liveoutputs/version.go index b230dc104df..f94224c7f4b 100644 --- a/resource-manager/media/2021-11-01/liveoutputs/version.go +++ b/resource-manager/media/2021-11-01/liveoutputs/version.go @@ -1,12 +1,10 @@ package liveoutputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveoutputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/liveoutputs/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/README.md b/resource-manager/media/2021-11-01/streamingendpoints/README.md index 1bd0157b7c3..1a964c64fe9 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/README.md +++ b/resource-manager/media/2021-11-01/streamingendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingendpoints` Documentation -The `streamingendpoints` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `streamingendpoints` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/streamingendpoints/client.go b/resource-manager/media/2021-11-01/streamingendpoints/client.go index a66794d6ca6..19ca802d4fc 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/client.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/client.go @@ -15,7 +15,7 @@ type StreamingEndpointsClient struct { } func NewStreamingEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingEndpointsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go b/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go index 243cdf6d8cf..95e862655d5 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go b/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go index 4d634f2efe1..c27821a8374 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/id_streamingendpoint.go @@ -44,7 +44,7 @@ func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { } id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, } id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/method_create.go b/resource-manager/media/2021-11-01/streamingendpoints/method_create.go index 7b9e76bac77..96afb2fd5ed 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/method_create.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/method_create.go @@ -37,6 +37,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/method_get.go b/resource-manager/media/2021-11-01/streamingendpoints/method_get.go index 8db082ce324..66bbf171239 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/method_get.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/method_get.go @@ -45,7 +45,6 @@ func (c StreamingEndpointsClient) Get(ctx context.Context, id StreamingEndpointI var model StreamingEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go b/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go index 419e72eb2fa..3e3ef853e90 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/method_skus.go @@ -46,7 +46,6 @@ func (c StreamingEndpointsClient) Skus(ctx context.Context, id StreamingEndpoint var model StreamingEndpointSkuInfoListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingendpoints/version.go b/resource-manager/media/2021-11-01/streamingendpoints/version.go index e80b097ef60..64ef7fc0540 100644 --- a/resource-manager/media/2021-11-01/streamingendpoints/version.go +++ b/resource-manager/media/2021-11-01/streamingendpoints/version.go @@ -1,12 +1,10 @@ package streamingendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingendpoints/2021-11-01" } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md index 22c24938a03..2e78b3a436b 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators` Documentation -The `streamingpoliciesandstreaminglocators` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2021-11-01`). +The `streamingpoliciesandstreaminglocators` SDK allows for interaction with Azure Resource Manager `media` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go index ad459b8507f..3012e3abc37 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/client.go @@ -15,7 +15,7 @@ type StreamingPoliciesAndStreamingLocatorsClient struct { } func NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingPoliciesAndStreamingLocatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingPoliciesAndStreamingLocatorsClient: %+v", err) } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go index a9668bf4425..19afd426c72 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go index 98c5b939dd0..18eb23c6d88 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go @@ -44,7 +44,7 @@ func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { } id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, er } id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go index 36742d553b4..1a9b642d478 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go @@ -44,7 +44,7 @@ func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { } id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, erro } id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go index b4cfe3f3a7a..2fd7215d169 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go @@ -49,7 +49,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsCreate(ctx var model StreamingLocator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go index 4f9e0139c97..2a44c8d2792 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go @@ -45,7 +45,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsGet(ctx co var model StreamingLocator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go index 9a5c60b3080..6548b1ec546 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go @@ -41,6 +41,7 @@ func (o StreamingLocatorsListOperationOptions) ToHeaders() *client.Headers { func (o StreamingLocatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go index d33f7dc9215..6bebc23f27a 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go @@ -46,7 +46,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListConten var model ListContentKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go index e23e286f575..a68169c5541 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go @@ -46,7 +46,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListPaths( var model ListPathsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go index 82fbc7d8119..f02097bf0b4 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go @@ -49,7 +49,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesCreate(ctx var model StreamingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go index 5ccc570abb9..a9ca7f4160e 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go @@ -45,7 +45,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesGet(ctx co var model StreamingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go index 3397b46a73e..89b40344316 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go @@ -41,6 +41,7 @@ func (o StreamingPoliciesListOperationOptions) ToHeaders() *client.Headers { func (o StreamingPoliciesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go index cdfd8774be6..20cd96c1c4a 100644 --- a/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go +++ b/resource-manager/media/2021-11-01/streamingpoliciesandstreaminglocators/version.go @@ -1,12 +1,10 @@ package streamingpoliciesandstreaminglocators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/2021-11-01" } diff --git a/resource-manager/media/2022-07-01/encodings/README.md b/resource-manager/media/2022-07-01/encodings/README.md index f0ad1b61e8f..249bffc4e93 100644 --- a/resource-manager/media/2022-07-01/encodings/README.md +++ b/resource-manager/media/2022-07-01/encodings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-07-01/encodings` Documentation -The `encodings` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-07-01`). +The `encodings` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-07-01/encodings/client.go b/resource-manager/media/2022-07-01/encodings/client.go index d09d3ae04ed..553883f512c 100644 --- a/resource-manager/media/2022-07-01/encodings/client.go +++ b/resource-manager/media/2022-07-01/encodings/client.go @@ -15,7 +15,7 @@ type EncodingsClient struct { } func NewEncodingsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncodingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encodings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encodings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncodingsClient: %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/id_job.go b/resource-manager/media/2022-07-01/encodings/id_job.go index 5530931f0fd..8f68f873605 100644 --- a/resource-manager/media/2022-07-01/encodings/id_job.go +++ b/resource-manager/media/2022-07-01/encodings/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-07-01/encodings/id_mediaservice.go b/resource-manager/media/2022-07-01/encodings/id_mediaservice.go index 2b78d8406de..95b4ff29d2b 100644 --- a/resource-manager/media/2022-07-01/encodings/id_mediaservice.go +++ b/resource-manager/media/2022-07-01/encodings/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-07-01/encodings/id_transform.go b/resource-manager/media/2022-07-01/encodings/id_transform.go index 21098483a3c..2930187007f 100644 --- a/resource-manager/media/2022-07-01/encodings/id_transform.go +++ b/resource-manager/media/2022-07-01/encodings/id_transform.go @@ -44,7 +44,7 @@ func ParseTransformID(input string) (*TransformId, error) { } id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTransformIDInsensitively(input string) (*TransformId, error) { } id := TransformId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-07-01/encodings/method_jobscreate.go b/resource-manager/media/2022-07-01/encodings/method_jobscreate.go index 82eb14dd50e..c727f61b05a 100644 --- a/resource-manager/media/2022-07-01/encodings/method_jobscreate.go +++ b/resource-manager/media/2022-07-01/encodings/method_jobscreate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) JobsCreate(ctx context.Context, id JobId, input Job) (r var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/method_jobsget.go b/resource-manager/media/2022-07-01/encodings/method_jobsget.go index 6788a17b019..6052d512a14 100644 --- a/resource-manager/media/2022-07-01/encodings/method_jobsget.go +++ b/resource-manager/media/2022-07-01/encodings/method_jobsget.go @@ -45,7 +45,6 @@ func (c EncodingsClient) JobsGet(ctx context.Context, id JobId) (result JobsGetO var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/method_jobslist.go b/resource-manager/media/2022-07-01/encodings/method_jobslist.go index e0aea11250a..53f3ef3255c 100644 --- a/resource-manager/media/2022-07-01/encodings/method_jobslist.go +++ b/resource-manager/media/2022-07-01/encodings/method_jobslist.go @@ -40,6 +40,7 @@ func (o JobsListOperationOptions) ToHeaders() *client.Headers { func (o JobsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go b/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go index c78187ef7ca..924da83d717 100644 --- a/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go +++ b/resource-manager/media/2022-07-01/encodings/method_jobsupdate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) JobsUpdate(ctx context.Context, id JobId, input Job) (r var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go b/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go index 407d4c82052..531d80e51fd 100644 --- a/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go +++ b/resource-manager/media/2022-07-01/encodings/method_transformscreateorupdate.go @@ -50,7 +50,6 @@ func (c EncodingsClient) TransformsCreateOrUpdate(ctx context.Context, id Transf var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/method_transformsget.go b/resource-manager/media/2022-07-01/encodings/method_transformsget.go index fce05d25773..eca9a64fa8a 100644 --- a/resource-manager/media/2022-07-01/encodings/method_transformsget.go +++ b/resource-manager/media/2022-07-01/encodings/method_transformsget.go @@ -45,7 +45,6 @@ func (c EncodingsClient) TransformsGet(ctx context.Context, id TransformId) (res var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/method_transformslist.go b/resource-manager/media/2022-07-01/encodings/method_transformslist.go index 46d8bd251ce..1a001f81b2e 100644 --- a/resource-manager/media/2022-07-01/encodings/method_transformslist.go +++ b/resource-manager/media/2022-07-01/encodings/method_transformslist.go @@ -40,6 +40,7 @@ func (o TransformsListOperationOptions) ToHeaders() *client.Headers { func (o TransformsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go b/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go index 05a8b19d200..2bd6e5ed10d 100644 --- a/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go +++ b/resource-manager/media/2022-07-01/encodings/method_transformsupdate.go @@ -49,7 +49,6 @@ func (c EncodingsClient) TransformsUpdate(ctx context.Context, id TransformId, i var model Transform result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-07-01/encodings/model_aacaudio.go b/resource-manager/media/2022-07-01/encodings/model_aacaudio.go index 067403385ae..d31fb0411d2 100644 --- a/resource-manager/media/2022-07-01/encodings/model_aacaudio.go +++ b/resource-manager/media/2022-07-01/encodings/model_aacaudio.go @@ -17,7 +17,16 @@ type AacAudio struct { SamplingRate *int64 `json:"samplingRate,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s AacAudio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = AacAudio{} @@ -31,9 +40,10 @@ func (s AacAudio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AacAudio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AacAudio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go b/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go index e1e8cedcd10..fa3f469dc2e 100644 --- a/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go +++ b/resource-manager/media/2022-07-01/encodings/model_absolutecliptime.go @@ -14,6 +14,14 @@ type AbsoluteClipTime struct { Time string `json:"time"` // Fields inherited from ClipTime + + OdataType string `json:"@odata.type"` +} + +func (s AbsoluteClipTime) ClipTime() BaseClipTimeImpl { + return BaseClipTimeImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AbsoluteClipTime{} @@ -27,9 +35,10 @@ func (s AbsoluteClipTime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AbsoluteClipTime: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AbsoluteClipTime" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_audio.go b/resource-manager/media/2022-07-01/encodings/model_audio.go index a2007b0056c..ccf72f47d28 100644 --- a/resource-manager/media/2022-07-01/encodings/model_audio.go +++ b/resource-manager/media/2022-07-01/encodings/model_audio.go @@ -16,7 +16,16 @@ type Audio struct { SamplingRate *int64 `json:"samplingRate,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Audio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Audio{} @@ -30,9 +39,10 @@ func (s Audio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Audio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Audio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go b/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go index 45a7be9a1c1..9c018dd7706 100644 --- a/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go +++ b/resource-manager/media/2022-07-01/encodings/model_audioanalyzerpreset.go @@ -16,6 +16,14 @@ type AudioAnalyzerPreset struct { Mode *AudioAnalysisMode `json:"mode,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s AudioAnalyzerPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioAnalyzerPreset{} @@ -29,9 +37,10 @@ func (s AudioAnalyzerPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioAnalyzerPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioAnalyzerPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go b/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go index 3d21e6aeb17..ecb383cb4b7 100644 --- a/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go +++ b/resource-manager/media/2022-07-01/encodings/model_audiooverlay.go @@ -13,14 +13,28 @@ var _ Overlay = AudioOverlay{} type AudioOverlay struct { // Fields inherited from Overlay + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` End *string `json:"end,omitempty"` FadeInDuration *string `json:"fadeInDuration,omitempty"` FadeOutDuration *string `json:"fadeOutDuration,omitempty"` InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` Start *string `json:"start,omitempty"` } +func (s AudioOverlay) Overlay() BaseOverlayImpl { + return BaseOverlayImpl{ + AudioGainLevel: s.AudioGainLevel, + End: s.End, + FadeInDuration: s.FadeInDuration, + FadeOutDuration: s.FadeOutDuration, + InputLabel: s.InputLabel, + OdataType: s.OdataType, + Start: s.Start, + } +} + var _ json.Marshaler = AudioOverlay{} func (s AudioOverlay) MarshalJSON() ([]byte, error) { @@ -32,9 +46,10 @@ func (s AudioOverlay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioOverlay: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioOverlay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go b/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go index 81990a6d7d2..956f9fc1b20 100644 --- a/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go +++ b/resource-manager/media/2022-07-01/encodings/model_audiotrackdescriptor.go @@ -14,6 +14,14 @@ type AudioTrackDescriptor struct { ChannelMapping *ChannelMapping `json:"channelMapping,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s AudioTrackDescriptor) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioTrackDescriptor{} @@ -27,9 +35,10 @@ func (s AudioTrackDescriptor) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioTrackDescriptor: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioTrackDescriptor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go b/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go index a11bfb0f219..cf3f751f2f3 100644 --- a/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go +++ b/resource-manager/media/2022-07-01/encodings/model_builtinstandardencoderpreset.go @@ -15,6 +15,14 @@ type BuiltInStandardEncoderPreset struct { PresetName EncoderNamedPreset `json:"presetName"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s BuiltInStandardEncoderPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = BuiltInStandardEncoderPreset{} @@ -28,9 +36,10 @@ func (s BuiltInStandardEncoderPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BuiltInStandardEncoderPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.BuiltInStandardEncoderPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_cliptime.go b/resource-manager/media/2022-07-01/encodings/model_cliptime.go index d57cf10337b..e963e1442ae 100644 --- a/resource-manager/media/2022-07-01/encodings/model_cliptime.go +++ b/resource-manager/media/2022-07-01/encodings/model_cliptime.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClipTime interface { + ClipTime() BaseClipTimeImpl } -// RawClipTimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClipTime = BaseClipTimeImpl{} + +type BaseClipTimeImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseClipTimeImpl) ClipTime() BaseClipTimeImpl { + return s +} + +var _ ClipTime = RawClipTimeImpl{} + +// RawClipTimeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClipTimeImpl struct { - Type string - Values map[string]interface{} + clipTime BaseClipTimeImpl + Type string + Values map[string]interface{} +} + +func (s RawClipTimeImpl) ClipTime() BaseClipTimeImpl { + return s.clipTime } -func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { +func UnmarshalClipTimeImplementation(input []byte) (ClipTime, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalClipTimeImplementation(input []byte) (ClipTime, error) { return out, nil } - out := RawClipTimeImpl{ - Type: value, - Values: temp, + var parent BaseClipTimeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClipTimeImpl: %+v", err) } - return out, nil + + return RawClipTimeImpl{ + clipTime: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_codec.go b/resource-manager/media/2022-07-01/encodings/model_codec.go index dac8228b1d0..1c85b86dedb 100644 --- a/resource-manager/media/2022-07-01/encodings/model_codec.go +++ b/resource-manager/media/2022-07-01/encodings/model_codec.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Codec interface { + Codec() BaseCodecImpl } -// RawCodecImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Codec = BaseCodecImpl{} + +type BaseCodecImpl struct { + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s BaseCodecImpl) Codec() BaseCodecImpl { + return s +} + +var _ Codec = RawCodecImpl{} + +// RawCodecImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCodecImpl struct { + codec BaseCodecImpl Type string Values map[string]interface{} } -func unmarshalCodecImplementation(input []byte) (Codec, error) { +func (s RawCodecImpl) Codec() BaseCodecImpl { + return s.codec +} + +func UnmarshalCodecImplementation(input []byte) (Codec, error) { if input == nil { return nil, nil } @@ -124,10 +142,15 @@ func unmarshalCodecImplementation(input []byte) (Codec, error) { return out, nil } - out := RawCodecImpl{ + var parent BaseCodecImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCodecImpl: %+v", err) + } + + return RawCodecImpl{ + codec: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_copyaudio.go b/resource-manager/media/2022-07-01/encodings/model_copyaudio.go index 5d1be89597e..3f38717cab7 100644 --- a/resource-manager/media/2022-07-01/encodings/model_copyaudio.go +++ b/resource-manager/media/2022-07-01/encodings/model_copyaudio.go @@ -13,7 +13,16 @@ var _ Codec = CopyAudio{} type CopyAudio struct { // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s CopyAudio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = CopyAudio{} @@ -27,9 +36,10 @@ func (s CopyAudio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyAudio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.CopyAudio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_copyvideo.go b/resource-manager/media/2022-07-01/encodings/model_copyvideo.go index 5f663b6d2bf..d9a3b78b78e 100644 --- a/resource-manager/media/2022-07-01/encodings/model_copyvideo.go +++ b/resource-manager/media/2022-07-01/encodings/model_copyvideo.go @@ -13,7 +13,16 @@ var _ Codec = CopyVideo{} type CopyVideo struct { // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s CopyVideo) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = CopyVideo{} @@ -27,9 +36,10 @@ func (s CopyVideo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CopyVideo: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.CopyVideo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_ddaudio.go b/resource-manager/media/2022-07-01/encodings/model_ddaudio.go index aac613abee8..d7100671d24 100644 --- a/resource-manager/media/2022-07-01/encodings/model_ddaudio.go +++ b/resource-manager/media/2022-07-01/encodings/model_ddaudio.go @@ -16,7 +16,16 @@ type DDAudio struct { SamplingRate *int64 `json:"samplingRate,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s DDAudio) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = DDAudio{} @@ -30,9 +39,10 @@ func (s DDAudio) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DDAudio: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.DDAudio" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go b/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go index b6b9b66de46..8cd3e44a11d 100644 --- a/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go +++ b/resource-manager/media/2022-07-01/encodings/model_facedetectorpreset.go @@ -17,6 +17,14 @@ type FaceDetectorPreset struct { Resolution *AnalysisResolution `json:"resolution,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s FaceDetectorPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = FaceDetectorPreset{} @@ -30,9 +38,10 @@ func (s FaceDetectorPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FaceDetectorPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FaceDetectorPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_filters.go b/resource-manager/media/2022-07-01/encodings/model_filters.go index fb55f7a8267..018ee06cac7 100644 --- a/resource-manager/media/2022-07-01/encodings/model_filters.go +++ b/resource-manager/media/2022-07-01/encodings/model_filters.go @@ -45,7 +45,7 @@ func (s *Filters) UnmarshalJSON(bytes []byte) error { output := make([]Overlay, 0) for i, val := range listTemp { - impl, err := unmarshalOverlayImplementation(val) + impl, err := UnmarshalOverlayImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Overlays' for 'Filters': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_format.go b/resource-manager/media/2022-07-01/encodings/model_format.go index 65f94ae3b89..fb622d84bfc 100644 --- a/resource-manager/media/2022-07-01/encodings/model_format.go +++ b/resource-manager/media/2022-07-01/encodings/model_format.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Format interface { + Format() BaseFormatImpl } -// RawFormatImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Format = BaseFormatImpl{} + +type BaseFormatImpl struct { + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s BaseFormatImpl) Format() BaseFormatImpl { + return s +} + +var _ Format = RawFormatImpl{} + +// RawFormatImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFormatImpl struct { + format BaseFormatImpl Type string Values map[string]interface{} } -func unmarshalFormatImplementation(input []byte) (Format, error) { +func (s RawFormatImpl) Format() BaseFormatImpl { + return s.format +} + +func UnmarshalFormatImplementation(input []byte) (Format, error) { if input == nil { return nil, nil } @@ -84,10 +102,15 @@ func unmarshalFormatImplementation(input []byte) (Format, error) { return out, nil } - out := RawFormatImpl{ + var parent BaseFormatImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFormatImpl: %+v", err) + } + + return RawFormatImpl{ + format: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go b/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go index c1a7d3860e4..f51c04730cb 100644 --- a/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go +++ b/resource-manager/media/2022-07-01/encodings/model_fromallinputfile.go @@ -13,7 +13,16 @@ var _ InputDefinition = FromAllInputFile{} type FromAllInputFile struct { // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s FromAllInputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = FromAllInputFile{} @@ -27,9 +36,10 @@ func (s FromAllInputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FromAllInputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FromAllInputFile" encoded, err = json.Marshal(decoded) @@ -43,6 +53,13 @@ func (s FromAllInputFile) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &FromAllInputFile{} func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { + type alias FromAllInputFile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FromAllInputFile: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +74,7 @@ func (s *FromAllInputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromAllInputFile': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go b/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go index 02137a86e8a..13fae98282c 100644 --- a/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go +++ b/resource-manager/media/2022-07-01/encodings/model_fromeachinputfile.go @@ -13,7 +13,16 @@ var _ InputDefinition = FromEachInputFile{} type FromEachInputFile struct { // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s FromEachInputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = FromEachInputFile{} @@ -27,9 +36,10 @@ func (s FromEachInputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FromEachInputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.FromEachInputFile" encoded, err = json.Marshal(decoded) @@ -43,6 +53,13 @@ func (s FromEachInputFile) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &FromEachInputFile{} func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { + type alias FromEachInputFile + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FromEachInputFile: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +74,7 @@ func (s *FromEachInputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'FromEachInputFile': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_h264video.go b/resource-manager/media/2022-07-01/encodings/model_h264video.go index fbcd311e539..1dcdb413c51 100644 --- a/resource-manager/media/2022-07-01/encodings/model_h264video.go +++ b/resource-manager/media/2022-07-01/encodings/model_h264video.go @@ -20,7 +20,16 @@ type H264Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s H264Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = H264Video{} @@ -34,9 +43,10 @@ func (s H264Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling H264Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.H264Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_h265video.go b/resource-manager/media/2022-07-01/encodings/model_h265video.go index 9edadac194a..0511d40828a 100644 --- a/resource-manager/media/2022-07-01/encodings/model_h265video.go +++ b/resource-manager/media/2022-07-01/encodings/model_h265video.go @@ -19,7 +19,16 @@ type H265Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s H265Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = H265Video{} @@ -33,9 +42,10 @@ func (s H265Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling H265Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.H265Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_image.go b/resource-manager/media/2022-07-01/encodings/model_image.go index 072a1a7537e..ce91ff75376 100644 --- a/resource-manager/media/2022-07-01/encodings/model_image.go +++ b/resource-manager/media/2022-07-01/encodings/model_image.go @@ -19,7 +19,16 @@ type Image struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Image) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Image{} @@ -33,9 +42,10 @@ func (s Image) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Image: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Image" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_imageformat.go b/resource-manager/media/2022-07-01/encodings/model_imageformat.go index 0e390a0c6f3..8d388bbb539 100644 --- a/resource-manager/media/2022-07-01/encodings/model_imageformat.go +++ b/resource-manager/media/2022-07-01/encodings/model_imageformat.go @@ -13,7 +13,16 @@ var _ Format = ImageFormat{} type ImageFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s ImageFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = ImageFormat{} @@ -27,9 +36,10 @@ func (s ImageFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ImageFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ImageFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go b/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go index 04e0c4c26ba..1c653190a64 100644 --- a/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go +++ b/resource-manager/media/2022-07-01/encodings/model_inputdefinition.go @@ -10,18 +10,71 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputDefinition interface { + InputDefinition() BaseInputDefinitionImpl } -// RawInputDefinitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputDefinition = BaseInputDefinitionImpl{} + +type BaseInputDefinitionImpl struct { + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s BaseInputDefinitionImpl) InputDefinition() BaseInputDefinitionImpl { + return s +} + +var _ InputDefinition = RawInputDefinitionImpl{} + +// RawInputDefinitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputDefinitionImpl struct { - Type string - Values map[string]interface{} + inputDefinition BaseInputDefinitionImpl + Type string + Values map[string]interface{} } -func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { +func (s RawInputDefinitionImpl) InputDefinition() BaseInputDefinitionImpl { + return s.inputDefinition +} + +var _ json.Unmarshaler = &BaseInputDefinitionImpl{} + +func (s *BaseInputDefinitionImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputDefinitionImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputDefinitionImpl: %+v", err) + } + + s.OdataType = decoded.OdataType + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputDefinitionImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["includedTracks"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling IncludedTracks into list []json.RawMessage: %+v", err) + } + + output := make([]TrackDescriptor, 0) + for i, val := range listTemp { + impl, err := UnmarshalTrackDescriptorImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'BaseInputDefinitionImpl': %+v", i, err) + } + output = append(output, impl) + } + s.IncludedTracks = &output + } + return nil +} + +func UnmarshalInputDefinitionImplementation(input []byte) (InputDefinition, error) { if input == nil { return nil, nil } @@ -60,10 +113,15 @@ func unmarshalInputDefinitionImplementation(input []byte) (InputDefinition, erro return out, nil } - out := RawInputDefinitionImpl{ - Type: value, - Values: temp, + var parent BaseInputDefinitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputDefinitionImpl: %+v", err) } - return out, nil + + return RawInputDefinitionImpl{ + inputDefinition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_inputfile.go b/resource-manager/media/2022-07-01/encodings/model_inputfile.go index 4c3f11b6d7f..9d9f62300dc 100644 --- a/resource-manager/media/2022-07-01/encodings/model_inputfile.go +++ b/resource-manager/media/2022-07-01/encodings/model_inputfile.go @@ -14,7 +14,16 @@ type InputFile struct { Filename *string `json:"filename,omitempty"` // Fields inherited from InputDefinition + IncludedTracks *[]TrackDescriptor `json:"includedTracks,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s InputFile) InputDefinition() BaseInputDefinitionImpl { + return BaseInputDefinitionImpl{ + IncludedTracks: s.IncludedTracks, + OdataType: s.OdataType, + } } var _ json.Marshaler = InputFile{} @@ -28,9 +37,10 @@ func (s InputFile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InputFile: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.InputFile" encoded, err = json.Marshal(decoded) @@ -51,6 +61,7 @@ func (s *InputFile) UnmarshalJSON(bytes []byte) error { } s.Filename = decoded.Filename + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +76,7 @@ func (s *InputFile) UnmarshalJSON(bytes []byte) error { output := make([]TrackDescriptor, 0) for i, val := range listTemp { - impl, err := unmarshalTrackDescriptorImplementation(val) + impl, err := UnmarshalTrackDescriptorImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'IncludedTracks' for 'InputFile': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinput.go b/resource-manager/media/2022-07-01/encodings/model_jobinput.go index e4d997151de..3f644e15826 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinput.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobInput interface { + JobInput() BaseJobInputImpl } -// RawJobInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobInput = BaseJobInputImpl{} + +type BaseJobInputImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseJobInputImpl) JobInput() BaseJobInputImpl { + return s +} + +var _ JobInput = RawJobInputImpl{} + +// RawJobInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobInputImpl struct { - Type string - Values map[string]interface{} + jobInput BaseJobInputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobInputImpl) JobInput() BaseJobInputImpl { + return s.jobInput } -func unmarshalJobInputImplementation(input []byte) (JobInput, error) { +func UnmarshalJobInputImplementation(input []byte) (JobInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalJobInputImplementation(input []byte) (JobInput, error) { return out, nil } - out := RawJobInputImpl{ - Type: value, - Values: temp, + var parent BaseJobInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobInputImpl: %+v", err) } - return out, nil + + return RawJobInputImpl{ + jobInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go b/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go index 689f8282884..c102f79c865 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinputasset.go @@ -19,6 +19,14 @@ type JobInputAsset struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputAsset) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputAsset{} @@ -32,9 +40,10 @@ func (s JobInputAsset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputAsset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputAsset" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { s.AssetName = decoded.AssetName s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -64,7 +74,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputAsset': %+v", err) } @@ -79,7 +89,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputAsset': %+v", i, err) } @@ -89,7 +99,7 @@ func (s *JobInputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputAsset': %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go b/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go index 5136c539d5b..e2ba2b21bb2 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinputclip.go @@ -18,6 +18,14 @@ type JobInputClip struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputClip) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputClip{} @@ -31,9 +39,10 @@ func (s JobInputClip) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputClip: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputClip" encoded, err = json.Marshal(decoded) @@ -55,6 +64,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -62,7 +72,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputClip': %+v", err) } @@ -77,7 +87,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputClip': %+v", i, err) } @@ -87,7 +97,7 @@ func (s *JobInputClip) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputClip': %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go b/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go index 57beddd3fde..c5d2bc866fe 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinputhttp.go @@ -19,6 +19,14 @@ type JobInputHTTP struct { Start ClipTime `json:"start"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputHTTP) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputHTTP{} @@ -32,9 +40,10 @@ func (s JobInputHTTP) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputHTTP: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputHttp" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { s.BaseUri = decoded.BaseUri s.Files = decoded.Files s.Label = decoded.Label + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -64,7 +74,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["end"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'End' for 'JobInputHTTP': %+v", err) } @@ -79,7 +89,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { output := make([]InputDefinition, 0) for i, val := range listTemp { - impl, err := unmarshalInputDefinitionImplementation(val) + impl, err := UnmarshalInputDefinitionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InputDefinitions' for 'JobInputHTTP': %+v", i, err) } @@ -89,7 +99,7 @@ func (s *JobInputHTTP) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["start"]; ok { - impl, err := unmarshalClipTimeImplementation(v) + impl, err := UnmarshalClipTimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Start' for 'JobInputHTTP': %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinputs.go b/resource-manager/media/2022-07-01/encodings/model_jobinputs.go index b63a141b6e0..0de387ed23d 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinputs.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinputs.go @@ -14,6 +14,14 @@ type JobInputs struct { Inputs *[]JobInput `json:"inputs,omitempty"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputs) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputs{} @@ -27,9 +35,10 @@ func (s JobInputs) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputs: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputs" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s JobInputs) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &JobInputs{} func (s *JobInputs) UnmarshalJSON(bytes []byte) error { + type alias JobInputs + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JobInputs: %+v", err) + } + + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -57,7 +73,7 @@ func (s *JobInputs) UnmarshalJSON(bytes []byte) error { output := make([]JobInput, 0) for i, val := range listTemp { - impl, err := unmarshalJobInputImplementation(val) + impl, err := UnmarshalJobInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Inputs' for 'JobInputs': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go b/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go index 9c85a35b730..d8b3ada5296 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobinputsequence.go @@ -14,6 +14,14 @@ type JobInputSequence struct { Inputs *[]JobInputClip `json:"inputs,omitempty"` // Fields inherited from JobInput + + OdataType string `json:"@odata.type"` +} + +func (s JobInputSequence) JobInput() BaseJobInputImpl { + return BaseJobInputImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = JobInputSequence{} @@ -27,9 +35,10 @@ func (s JobInputSequence) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobInputSequence: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobInputSequence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_joboutput.go b/resource-manager/media/2022-07-01/encodings/model_joboutput.go index 6135f1282f5..95d6eeeb6ea 100644 --- a/resource-manager/media/2022-07-01/encodings/model_joboutput.go +++ b/resource-manager/media/2022-07-01/encodings/model_joboutput.go @@ -10,18 +10,74 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobOutput interface { + JobOutput() BaseJobOutputImpl } -// RawJobOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobOutput = BaseJobOutputImpl{} + +type BaseJobOutputImpl struct { + EndTime *string `json:"endTime,omitempty"` + Error *JobError `json:"error,omitempty"` + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` + PresetOverride Preset `json:"presetOverride"` + Progress *int64 `json:"progress,omitempty"` + StartTime *string `json:"startTime,omitempty"` + State *JobState `json:"state,omitempty"` +} + +func (s BaseJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s +} + +var _ JobOutput = RawJobOutputImpl{} + +// RawJobOutputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobOutputImpl struct { - Type string - Values map[string]interface{} + jobOutput BaseJobOutputImpl + Type string + Values map[string]interface{} +} + +func (s RawJobOutputImpl) JobOutput() BaseJobOutputImpl { + return s.jobOutput } -func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { +var _ json.Unmarshaler = &BaseJobOutputImpl{} + +func (s *BaseJobOutputImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseJobOutputImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) + } + + s.EndTime = decoded.EndTime + s.Error = decoded.Error + s.Label = decoded.Label + s.OdataType = decoded.OdataType + s.Progress = decoded.Progress + s.StartTime = decoded.StartTime + s.State = decoded.State + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseJobOutputImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["presetOverride"]; ok { + impl, err := UnmarshalPresetImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PresetOverride' for 'BaseJobOutputImpl': %+v", err) + } + s.PresetOverride = impl + } + return nil +} + +func UnmarshalJobOutputImplementation(input []byte) (JobOutput, error) { if input == nil { return nil, nil } @@ -44,10 +100,15 @@ func unmarshalJobOutputImplementation(input []byte) (JobOutput, error) { return out, nil } - out := RawJobOutputImpl{ - Type: value, - Values: temp, + var parent BaseJobOutputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobOutputImpl: %+v", err) } - return out, nil + + return RawJobOutputImpl{ + jobOutput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go b/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go index ed0aa4672cc..4bba8526ffc 100644 --- a/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go +++ b/resource-manager/media/2022-07-01/encodings/model_joboutputasset.go @@ -17,15 +17,30 @@ type JobOutputAsset struct { AssetName string `json:"assetName"` // Fields inherited from JobOutput + EndTime *string `json:"endTime,omitempty"` Error *JobError `json:"error,omitempty"` Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` PresetOverride Preset `json:"presetOverride"` Progress *int64 `json:"progress,omitempty"` StartTime *string `json:"startTime,omitempty"` State *JobState `json:"state,omitempty"` } +func (s JobOutputAsset) JobOutput() BaseJobOutputImpl { + return BaseJobOutputImpl{ + EndTime: s.EndTime, + Error: s.Error, + Label: s.Label, + OdataType: s.OdataType, + PresetOverride: s.PresetOverride, + Progress: s.Progress, + StartTime: s.StartTime, + State: s.State, + } +} + func (o *JobOutputAsset) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -61,9 +76,10 @@ func (s JobOutputAsset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobOutputAsset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JobOutputAsset" encoded, err = json.Marshal(decoded) @@ -87,6 +103,7 @@ func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { s.EndTime = decoded.EndTime s.Error = decoded.Error s.Label = decoded.Label + s.OdataType = decoded.OdataType s.Progress = decoded.Progress s.StartTime = decoded.StartTime s.State = decoded.State @@ -97,7 +114,7 @@ func (s *JobOutputAsset) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["presetOverride"]; ok { - impl, err := unmarshalPresetImplementation(v) + impl, err := UnmarshalPresetImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PresetOverride' for 'JobOutputAsset': %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jobproperties.go b/resource-manager/media/2022-07-01/encodings/model_jobproperties.go index d1d9fcd58d5..7fe07be9467 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jobproperties.go +++ b/resource-manager/media/2022-07-01/encodings/model_jobproperties.go @@ -96,7 +96,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["input"]; ok { - impl, err := unmarshalJobInputImplementation(v) + impl, err := UnmarshalJobInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Input' for 'JobProperties': %+v", err) } @@ -111,7 +111,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { output := make([]JobOutput, 0) for i, val := range listTemp { - impl, err := unmarshalJobOutputImplementation(val) + impl, err := UnmarshalJobOutputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Outputs' for 'JobProperties': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_jpgformat.go b/resource-manager/media/2022-07-01/encodings/model_jpgformat.go index de3e7aba6df..1e969fa78c3 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jpgformat.go +++ b/resource-manager/media/2022-07-01/encodings/model_jpgformat.go @@ -13,7 +13,16 @@ var _ Format = JpgFormat{} type JpgFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s JpgFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = JpgFormat{} @@ -27,9 +36,10 @@ func (s JpgFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JpgFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JpgFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_jpgimage.go b/resource-manager/media/2022-07-01/encodings/model_jpgimage.go index 6f2adffacd3..9072952b701 100644 --- a/resource-manager/media/2022-07-01/encodings/model_jpgimage.go +++ b/resource-manager/media/2022-07-01/encodings/model_jpgimage.go @@ -21,7 +21,16 @@ type JpgImage struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s JpgImage) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = JpgImage{} @@ -35,9 +44,10 @@ func (s JpgImage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JpgImage: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.JpgImage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_mp4format.go b/resource-manager/media/2022-07-01/encodings/model_mp4format.go index 44e41dd9492..5294716d327 100644 --- a/resource-manager/media/2022-07-01/encodings/model_mp4format.go +++ b/resource-manager/media/2022-07-01/encodings/model_mp4format.go @@ -14,7 +14,16 @@ type Mp4Format struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s Mp4Format) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = Mp4Format{} @@ -28,9 +37,10 @@ func (s Mp4Format) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Mp4Format: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Mp4Format" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go b/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go index fec53d0e680..b366aa46675 100644 --- a/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go +++ b/resource-manager/media/2022-07-01/encodings/model_multibitrateformat.go @@ -14,7 +14,16 @@ type MultiBitrateFormat struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s MultiBitrateFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = MultiBitrateFormat{} @@ -28,9 +37,10 @@ func (s MultiBitrateFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MultiBitrateFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.MultiBitrateFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_overlay.go b/resource-manager/media/2022-07-01/encodings/model_overlay.go index 160ee13ef1d..bc2b0b2725b 100644 --- a/resource-manager/media/2022-07-01/encodings/model_overlay.go +++ b/resource-manager/media/2022-07-01/encodings/model_overlay.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Overlay interface { + Overlay() BaseOverlayImpl } -// RawOverlayImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Overlay = BaseOverlayImpl{} + +type BaseOverlayImpl struct { + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` + End *string `json:"end,omitempty"` + FadeInDuration *string `json:"fadeInDuration,omitempty"` + FadeOutDuration *string `json:"fadeOutDuration,omitempty"` + InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` + Start *string `json:"start,omitempty"` +} + +func (s BaseOverlayImpl) Overlay() BaseOverlayImpl { + return s +} + +var _ Overlay = RawOverlayImpl{} + +// RawOverlayImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOverlayImpl struct { - Type string - Values map[string]interface{} + overlay BaseOverlayImpl + Type string + Values map[string]interface{} +} + +func (s RawOverlayImpl) Overlay() BaseOverlayImpl { + return s.overlay } -func unmarshalOverlayImplementation(input []byte) (Overlay, error) { +func UnmarshalOverlayImplementation(input []byte) (Overlay, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalOverlayImplementation(input []byte) (Overlay, error) { return out, nil } - out := RawOverlayImpl{ - Type: value, - Values: temp, + var parent BaseOverlayImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOverlayImpl: %+v", err) } - return out, nil + + return RawOverlayImpl{ + overlay: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_pngformat.go b/resource-manager/media/2022-07-01/encodings/model_pngformat.go index e9b5216bb86..e06f7ccbd16 100644 --- a/resource-manager/media/2022-07-01/encodings/model_pngformat.go +++ b/resource-manager/media/2022-07-01/encodings/model_pngformat.go @@ -13,7 +13,16 @@ var _ Format = PngFormat{} type PngFormat struct { // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s PngFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = PngFormat{} @@ -27,9 +36,10 @@ func (s PngFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PngFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.PngFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_pngimage.go b/resource-manager/media/2022-07-01/encodings/model_pngimage.go index 7209b7aba30..19df688a905 100644 --- a/resource-manager/media/2022-07-01/encodings/model_pngimage.go +++ b/resource-manager/media/2022-07-01/encodings/model_pngimage.go @@ -20,7 +20,16 @@ type PngImage struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s PngImage) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = PngImage{} @@ -34,9 +43,10 @@ func (s PngImage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PngImage: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.PngImage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_preset.go b/resource-manager/media/2022-07-01/encodings/model_preset.go index af6ef205d33..cf2116cb964 100644 --- a/resource-manager/media/2022-07-01/encodings/model_preset.go +++ b/resource-manager/media/2022-07-01/encodings/model_preset.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Preset interface { + Preset() BasePresetImpl } -// RawPresetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Preset = BasePresetImpl{} + +type BasePresetImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BasePresetImpl) Preset() BasePresetImpl { + return s +} + +var _ Preset = RawPresetImpl{} + +// RawPresetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPresetImpl struct { + preset BasePresetImpl Type string Values map[string]interface{} } -func unmarshalPresetImplementation(input []byte) (Preset, error) { +func (s RawPresetImpl) Preset() BasePresetImpl { + return s.preset +} + +func UnmarshalPresetImplementation(input []byte) (Preset, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalPresetImplementation(input []byte) (Preset, error) { return out, nil } - out := RawPresetImpl{ + var parent BasePresetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePresetImpl: %+v", err) + } + + return RawPresetImpl{ + preset: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go b/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go index ae6bafef503..c9527552714 100644 --- a/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go +++ b/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyattribute.go @@ -17,6 +17,14 @@ type SelectAudioTrackByAttribute struct { FilterValue *string `json:"filterValue,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectAudioTrackByAttribute) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectAudioTrackByAttribute{} @@ -30,9 +38,10 @@ func (s SelectAudioTrackByAttribute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectAudioTrackByAttribute: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackByAttribute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go b/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go index e9b4587be0c..41e2ce419a5 100644 --- a/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go +++ b/resource-manager/media/2022-07-01/encodings/model_selectaudiotrackbyid.go @@ -15,6 +15,14 @@ type SelectAudioTrackById struct { TrackId int64 `json:"trackId"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectAudioTrackById) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectAudioTrackById{} @@ -28,9 +36,10 @@ func (s SelectAudioTrackById) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectAudioTrackById: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectAudioTrackById" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go b/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go index 82305909c36..43ef68c1e83 100644 --- a/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go +++ b/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyattribute.go @@ -16,6 +16,14 @@ type SelectVideoTrackByAttribute struct { FilterValue *string `json:"filterValue,omitempty"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectVideoTrackByAttribute) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectVideoTrackByAttribute{} @@ -29,9 +37,10 @@ func (s SelectVideoTrackByAttribute) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectVideoTrackByAttribute: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackByAttribute" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go b/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go index 4527e73336e..8134a26e83a 100644 --- a/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go +++ b/resource-manager/media/2022-07-01/encodings/model_selectvideotrackbyid.go @@ -14,6 +14,14 @@ type SelectVideoTrackById struct { TrackId int64 `json:"trackId"` // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s SelectVideoTrackById) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = SelectVideoTrackById{} @@ -27,9 +35,10 @@ func (s SelectVideoTrackById) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelectVideoTrackById: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.SelectVideoTrackById" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go b/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go index e542f813478..6a053f16918 100644 --- a/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go +++ b/resource-manager/media/2022-07-01/encodings/model_standardencoderpreset.go @@ -17,6 +17,14 @@ type StandardEncoderPreset struct { Formats []Format `json:"formats"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s StandardEncoderPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = StandardEncoderPreset{} @@ -30,9 +38,10 @@ func (s StandardEncoderPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StandardEncoderPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.StandardEncoderPreset" encoded, err = json.Marshal(decoded) @@ -54,6 +63,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { s.ExperimentalOptions = decoded.ExperimentalOptions s.Filters = decoded.Filters + s.OdataType = decoded.OdataType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -68,7 +78,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { output := make([]Codec, 0) for i, val := range listTemp { - impl, err := unmarshalCodecImplementation(val) + impl, err := UnmarshalCodecImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Codecs' for 'StandardEncoderPreset': %+v", i, err) } @@ -85,7 +95,7 @@ func (s *StandardEncoderPreset) UnmarshalJSON(bytes []byte) error { output := make([]Format, 0) for i, val := range listTemp { - impl, err := unmarshalFormatImplementation(val) + impl, err := UnmarshalFormatImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Formats' for 'StandardEncoderPreset': %+v", i, err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go b/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go index 8aa3d1a50d9..499683f3ea1 100644 --- a/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go +++ b/resource-manager/media/2022-07-01/encodings/model_trackdescriptor.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TrackDescriptor interface { + TrackDescriptor() BaseTrackDescriptorImpl } -// RawTrackDescriptorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TrackDescriptor = BaseTrackDescriptorImpl{} + +type BaseTrackDescriptorImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseTrackDescriptorImpl) TrackDescriptor() BaseTrackDescriptorImpl { + return s +} + +var _ TrackDescriptor = RawTrackDescriptorImpl{} + +// RawTrackDescriptorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTrackDescriptorImpl struct { - Type string - Values map[string]interface{} + trackDescriptor BaseTrackDescriptorImpl + Type string + Values map[string]interface{} +} + +func (s RawTrackDescriptorImpl) TrackDescriptor() BaseTrackDescriptorImpl { + return s.trackDescriptor } -func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { +func UnmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTrackDescriptorImplementation(input []byte) (TrackDescriptor, erro return out, nil } - out := RawTrackDescriptorImpl{ - Type: value, - Values: temp, + var parent BaseTrackDescriptorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTrackDescriptorImpl: %+v", err) } - return out, nil + + return RawTrackDescriptorImpl{ + trackDescriptor: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-07-01/encodings/model_transformoutput.go b/resource-manager/media/2022-07-01/encodings/model_transformoutput.go index 8532442b750..ce73633e561 100644 --- a/resource-manager/media/2022-07-01/encodings/model_transformoutput.go +++ b/resource-manager/media/2022-07-01/encodings/model_transformoutput.go @@ -32,7 +32,7 @@ func (s *TransformOutput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["preset"]; ok { - impl, err := unmarshalPresetImplementation(v) + impl, err := UnmarshalPresetImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Preset' for 'TransformOutput': %+v", err) } diff --git a/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go b/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go index 5a869925fa5..19d9164b52c 100644 --- a/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go +++ b/resource-manager/media/2022-07-01/encodings/model_transportstreamformat.go @@ -14,7 +14,16 @@ type TransportStreamFormat struct { OutputFiles *[]OutputFile `json:"outputFiles,omitempty"` // Fields inherited from Format + FilenamePattern string `json:"filenamePattern"` + OdataType string `json:"@odata.type"` +} + +func (s TransportStreamFormat) Format() BaseFormatImpl { + return BaseFormatImpl{ + FilenamePattern: s.FilenamePattern, + OdataType: s.OdataType, + } } var _ json.Marshaler = TransportStreamFormat{} @@ -28,9 +37,10 @@ func (s TransportStreamFormat) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TransportStreamFormat: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.TransportStreamFormat" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_utccliptime.go b/resource-manager/media/2022-07-01/encodings/model_utccliptime.go index 0787e406a94..ae44b538bec 100644 --- a/resource-manager/media/2022-07-01/encodings/model_utccliptime.go +++ b/resource-manager/media/2022-07-01/encodings/model_utccliptime.go @@ -14,6 +14,14 @@ type UtcClipTime struct { Time string `json:"time"` // Fields inherited from ClipTime + + OdataType string `json:"@odata.type"` +} + +func (s UtcClipTime) ClipTime() BaseClipTimeImpl { + return BaseClipTimeImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = UtcClipTime{} @@ -27,9 +35,10 @@ func (s UtcClipTime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UtcClipTime: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.UtcClipTime" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_video.go b/resource-manager/media/2022-07-01/encodings/model_video.go index 35e566481c9..ee697cb68d4 100644 --- a/resource-manager/media/2022-07-01/encodings/model_video.go +++ b/resource-manager/media/2022-07-01/encodings/model_video.go @@ -16,7 +16,16 @@ type Video struct { SyncMode *VideoSyncMode `json:"syncMode,omitempty"` // Fields inherited from Codec - Label *string `json:"label,omitempty"` + + Label *string `json:"label,omitempty"` + OdataType string `json:"@odata.type"` +} + +func (s Video) Codec() BaseCodecImpl { + return BaseCodecImpl{ + Label: s.Label, + OdataType: s.OdataType, + } } var _ json.Marshaler = Video{} @@ -30,9 +39,10 @@ func (s Video) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Video: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.Video" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go b/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go index d98ab1914de..21ec33356fc 100644 --- a/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go +++ b/resource-manager/media/2022-07-01/encodings/model_videoanalyzerpreset.go @@ -17,6 +17,14 @@ type VideoAnalyzerPreset struct { Mode *AudioAnalysisMode `json:"mode,omitempty"` // Fields inherited from Preset + + OdataType string `json:"@odata.type"` +} + +func (s VideoAnalyzerPreset) Preset() BasePresetImpl { + return BasePresetImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoAnalyzerPreset{} @@ -30,9 +38,10 @@ func (s VideoAnalyzerPreset) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoAnalyzerPreset: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoAnalyzerPreset" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_videooverlay.go b/resource-manager/media/2022-07-01/encodings/model_videooverlay.go index 27d0f028256..dceea9d3335 100644 --- a/resource-manager/media/2022-07-01/encodings/model_videooverlay.go +++ b/resource-manager/media/2022-07-01/encodings/model_videooverlay.go @@ -16,14 +16,28 @@ type VideoOverlay struct { Position *Rectangle `json:"position,omitempty"` // Fields inherited from Overlay + AudioGainLevel *float64 `json:"audioGainLevel,omitempty"` End *string `json:"end,omitempty"` FadeInDuration *string `json:"fadeInDuration,omitempty"` FadeOutDuration *string `json:"fadeOutDuration,omitempty"` InputLabel string `json:"inputLabel"` + OdataType string `json:"@odata.type"` Start *string `json:"start,omitempty"` } +func (s VideoOverlay) Overlay() BaseOverlayImpl { + return BaseOverlayImpl{ + AudioGainLevel: s.AudioGainLevel, + End: s.End, + FadeInDuration: s.FadeInDuration, + FadeOutDuration: s.FadeOutDuration, + InputLabel: s.InputLabel, + OdataType: s.OdataType, + Start: s.Start, + } +} + var _ json.Marshaler = VideoOverlay{} func (s VideoOverlay) MarshalJSON() ([]byte, error) { @@ -35,9 +49,10 @@ func (s VideoOverlay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoOverlay: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoOverlay" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go b/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go index ff1f690b1d0..96b8e54787a 100644 --- a/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go +++ b/resource-manager/media/2022-07-01/encodings/model_videotrackdescriptor.go @@ -13,6 +13,14 @@ var _ TrackDescriptor = VideoTrackDescriptor{} type VideoTrackDescriptor struct { // Fields inherited from TrackDescriptor + + OdataType string `json:"@odata.type"` +} + +func (s VideoTrackDescriptor) TrackDescriptor() BaseTrackDescriptorImpl { + return BaseTrackDescriptorImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoTrackDescriptor{} @@ -26,9 +34,10 @@ func (s VideoTrackDescriptor) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoTrackDescriptor: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoTrackDescriptor" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-07-01/encodings/version.go b/resource-manager/media/2022-07-01/encodings/version.go index 2873abea310..bbb600986eb 100644 --- a/resource-manager/media/2022-07-01/encodings/version.go +++ b/resource-manager/media/2022-07-01/encodings/version.go @@ -1,12 +1,10 @@ package encodings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encodings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encodings/2022-07-01" } diff --git a/resource-manager/media/2022-08-01/accountfilters/README.md b/resource-manager/media/2022-08-01/accountfilters/README.md index 22cec88cb02..2916fd4f977 100644 --- a/resource-manager/media/2022-08-01/accountfilters/README.md +++ b/resource-manager/media/2022-08-01/accountfilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/accountfilters` Documentation -The `accountfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `accountfilters` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/accountfilters/client.go b/resource-manager/media/2022-08-01/accountfilters/client.go index 76262494fe6..995fe26a43f 100644 --- a/resource-manager/media/2022-08-01/accountfilters/client.go +++ b/resource-manager/media/2022-08-01/accountfilters/client.go @@ -15,7 +15,7 @@ type AccountFiltersClient struct { } func NewAccountFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountfilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accountfilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountFiltersClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go b/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go index 30d0bcfc871..5b208188952 100644 --- a/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go +++ b/resource-manager/media/2022-08-01/accountfilters/id_accountfilter.go @@ -44,7 +44,7 @@ func ParseAccountFilterID(input string) (*AccountFilterId, error) { } id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccountFilterIDInsensitively(input string) (*AccountFilterId, error) { } id := AccountFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go b/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go index b5a8af8e24c..98c75873631 100644 --- a/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/accountfilters/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go b/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go index f0e49340ca0..f3006abb719 100644 --- a/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go +++ b/resource-manager/media/2022-08-01/accountfilters/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AccountFiltersClient) CreateOrUpdate(ctx context.Context, id AccountFilt var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/accountfilters/method_get.go b/resource-manager/media/2022-08-01/accountfilters/method_get.go index b9639b436c1..454249d770b 100644 --- a/resource-manager/media/2022-08-01/accountfilters/method_get.go +++ b/resource-manager/media/2022-08-01/accountfilters/method_get.go @@ -45,7 +45,6 @@ func (c AccountFiltersClient) Get(ctx context.Context, id AccountFilterId) (resu var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/accountfilters/method_update.go b/resource-manager/media/2022-08-01/accountfilters/method_update.go index 7e3a2abff48..d9fa9f206b2 100644 --- a/resource-manager/media/2022-08-01/accountfilters/method_update.go +++ b/resource-manager/media/2022-08-01/accountfilters/method_update.go @@ -49,7 +49,6 @@ func (c AccountFiltersClient) Update(ctx context.Context, id AccountFilterId, in var model AccountFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/accountfilters/version.go b/resource-manager/media/2022-08-01/accountfilters/version.go index b360b93c0a7..ac231dbacf8 100644 --- a/resource-manager/media/2022-08-01/accountfilters/version.go +++ b/resource-manager/media/2022-08-01/accountfilters/version.go @@ -1,12 +1,10 @@ package accountfilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountfilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accountfilters/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/README.md b/resource-manager/media/2022-08-01/assetsandassetfilters/README.md index ed6072c7d60..2df97b78d50 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/README.md +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/assetsandassetfilters` Documentation -The `assetsandassetfilters` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `assetsandassetfilters` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/client.go b/resource-manager/media/2022-08-01/assetsandassetfilters/client.go index c1a18be1bf9..f70178953bc 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/client.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/client.go @@ -15,7 +15,7 @@ type AssetsAndAssetFiltersClient struct { } func NewAssetsAndAssetFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*AssetsAndAssetFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assetsandassetfilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assetsandassetfilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssetsAndAssetFiltersClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go b/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go index 098a1cbed80..1edc2883e55 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/id_asset.go @@ -44,7 +44,7 @@ func ParseAssetID(input string) (*AssetId, error) { } id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAssetIDInsensitively(input string) (*AssetId, error) { } id := AssetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go b/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go index 3490c79c7ec..c17409ee214 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/id_assetfilter.go @@ -46,7 +46,7 @@ func ParseAssetFilterID(input string) (*AssetFilterId, error) { } id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAssetFilterIDInsensitively(input string) (*AssetFilterId, error) { } id := AssetFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go b/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go index 499b0bb4565..603d8dda804 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go b/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go index 68d441933c6..7d1445d37e4 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/id_track.go @@ -46,7 +46,7 @@ func ParseTrackID(input string) (*TrackId, error) { } id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTrackIDInsensitively(input string) (*TrackId, error) { } id := TrackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go index 1838e0969b3..0e96084d1d0 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfilterscreateorupdate.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersCreateOrUpdate(ctx context.Cont var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go index e7ab587e979..10142a6e674 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersGet(ctx context.Context, id Ass var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go index 2a1014b4f8f..24449c6d253 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetfiltersupdate.go @@ -49,7 +49,6 @@ func (c AssetsAndAssetFiltersClient) AssetFiltersUpdate(ctx context.Context, id var model AssetFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go index 89aedab7073..a59c5afc184 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetscreateorupdate.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetsCreateOrUpdate(ctx context.Context, i var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go index 0b1148a155f..aafa2aad807 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) AssetsGet(ctx context.Context, id AssetId) var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go index afbb605bfc5..8b8620b9c18 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsgetencryptionkey.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) AssetsGetEncryptionKey(ctx context.Context, var model StorageEncryptedAssetDecryptionData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go index dbcabd76de4..fed9e31d6a0 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslist.go @@ -41,6 +41,7 @@ func (o AssetsListOperationOptions) ToHeaders() *client.Headers { func (o AssetsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go index 6b260dc998e..7bd740f76cb 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetslistcontainersas.go @@ -50,7 +50,6 @@ func (c AssetsAndAssetFiltersClient) AssetsListContainerSas(ctx context.Context, var model AssetContainerSas result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go index bf0a792bdd0..eb1d6952499 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsliststreaminglocators.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) AssetsListStreamingLocators(ctx context.Con var model ListStreamingLocatorsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go index 43cc39feaf7..6a27fd06173 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_assetsupdate.go @@ -49,7 +49,6 @@ func (c AssetsAndAssetFiltersClient) AssetsUpdate(ctx context.Context, id AssetI var model Asset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go index e0526916649..085c68d929d 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_tracksget.go @@ -45,7 +45,6 @@ func (c AssetsAndAssetFiltersClient) TracksGet(ctx context.Context, id TrackId) var model AssetTrack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go b/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go index 308afb97c93..aa33c018076 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/method_trackslist.go @@ -46,7 +46,6 @@ func (c AssetsAndAssetFiltersClient) TracksList(ctx context.Context, id AssetId) var model AssetTrackCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go b/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go index 54fa37667d3..45042a11b83 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/model_assettrackproperties.go @@ -30,7 +30,7 @@ func (s *AssetTrackProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["track"]; ok { - impl, err := unmarshalTrackBaseImplementation(v) + impl, err := UnmarshalTrackBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Track' for 'AssetTrackProperties': %+v", err) } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go b/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go index b21ad65aefe..77b2cd94ebb 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/model_audiotrack.go @@ -20,6 +20,14 @@ type AudioTrack struct { Mpeg4TrackId *int64 `json:"mpeg4TrackId,omitempty"` // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s AudioTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = AudioTrack{} @@ -33,9 +41,10 @@ func (s AudioTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AudioTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.AudioTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go b/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go index 8be1279bab0..8ed7392bae5 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/model_texttrack.go @@ -18,6 +18,14 @@ type TextTrack struct { PlayerVisibility *Visibility `json:"playerVisibility,omitempty"` // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s TextTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = TextTrack{} @@ -31,9 +39,10 @@ func (s TextTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TextTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.TextTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go b/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go index 46a24e0d7cc..1729293bff5 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/model_trackbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TrackBase interface { + TrackBase() BaseTrackBaseImpl } -// RawTrackBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TrackBase = BaseTrackBaseImpl{} + +type BaseTrackBaseImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseTrackBaseImpl) TrackBase() BaseTrackBaseImpl { + return s +} + +var _ TrackBase = RawTrackBaseImpl{} + +// RawTrackBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTrackBaseImpl struct { - Type string - Values map[string]interface{} + trackBase BaseTrackBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTrackBaseImpl) TrackBase() BaseTrackBaseImpl { + return s.trackBase } -func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { +func UnmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalTrackBaseImplementation(input []byte) (TrackBase, error) { return out, nil } - out := RawTrackBaseImpl{ - Type: value, - Values: temp, + var parent BaseTrackBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTrackBaseImpl: %+v", err) } - return out, nil + + return RawTrackBaseImpl{ + trackBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go b/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go index c3a2548082d..abed5abd5e2 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/model_videotrack.go @@ -13,6 +13,14 @@ var _ TrackBase = VideoTrack{} type VideoTrack struct { // Fields inherited from TrackBase + + OdataType string `json:"@odata.type"` +} + +func (s VideoTrack) TrackBase() BaseTrackBaseImpl { + return BaseTrackBaseImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = VideoTrack{} @@ -26,9 +34,10 @@ func (s VideoTrack) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VideoTrack: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.VideoTrack" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/assetsandassetfilters/version.go b/resource-manager/media/2022-08-01/assetsandassetfilters/version.go index 978ce80b7ca..e9d72393b72 100644 --- a/resource-manager/media/2022-08-01/assetsandassetfilters/version.go +++ b/resource-manager/media/2022-08-01/assetsandassetfilters/version.go @@ -1,12 +1,10 @@ package assetsandassetfilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assetsandassetfilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assetsandassetfilters/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/README.md b/resource-manager/media/2022-08-01/contentkeypolicies/README.md index d83c94df091..ef0245b4ea6 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/README.md +++ b/resource-manager/media/2022-08-01/contentkeypolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/contentkeypolicies` Documentation -The `contentkeypolicies` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `contentkeypolicies` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/client.go b/resource-manager/media/2022-08-01/contentkeypolicies/client.go index 528842e6d8a..5cac04252c5 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/client.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/client.go @@ -15,7 +15,7 @@ type ContentKeyPoliciesClient struct { } func NewContentKeyPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentKeyPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentkeypolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentkeypolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentKeyPoliciesClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go b/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go index f96b6b70608..a1401b6db14 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/id_contentkeypolicy.go @@ -44,7 +44,7 @@ func ParseContentKeyPolicyID(input string) (*ContentKeyPolicyId, error) { } id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentKeyPolicyIDInsensitively(input string) (*ContentKeyPolicyId, er } id := ContentKeyPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go b/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go index abd916a436f..9fb4b542f64 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go b/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go index 77d0e3abcde..ddb0b4da26a 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ContentKeyPoliciesClient) CreateOrUpdate(ctx context.Context, id Content var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go b/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go index 419eb2bb9a4..520b5a17ded 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/method_get.go @@ -45,7 +45,6 @@ func (c ContentKeyPoliciesClient) Get(ctx context.Context, id ContentKeyPolicyId var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go b/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go index 2c60617e1c9..45fc044afe6 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/method_getpolicypropertieswithsecrets.go @@ -46,7 +46,6 @@ func (c ContentKeyPoliciesClient) GetPolicyPropertiesWithSecrets(ctx context.Con var model ContentKeyPolicyProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go b/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go index 05399ba40fe..2a209325989 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go b/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go index d3b82b3e042..9375dd8d11e 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/method_update.go @@ -49,7 +49,6 @@ func (c ContentKeyPoliciesClient) Update(ctx context.Context, id ContentKeyPolic var model ContentKeyPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go index 9cc26cd28e8..1caef5c6268 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyclearkeyconfiguration.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyConfiguration = ContentKeyPolicyClearKeyConfiguration{} type ContentKeyPolicyClearKeyConfiguration struct { // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyClearKeyConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyClearKeyConfiguration{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyClearKeyConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyClearKeyConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go index bdd6a1d2533..168bc29e7fa 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyConfiguration interface { + ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl } -// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyConfiguration = BaseContentKeyPolicyConfigurationImpl{} + +type BaseContentKeyPolicyConfigurationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyConfigurationImpl) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return s +} + +var _ ContentKeyPolicyConfiguration = RawContentKeyPolicyConfigurationImpl{} + +// RawContentKeyPolicyConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyConfigurationImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyConfiguration BaseContentKeyPolicyConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyConfigurationImpl) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return s.contentKeyPolicyConfiguration } -func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { +func UnmarshalContentKeyPolicyConfigurationImplementation(input []byte) (ContentKeyPolicyConfiguration, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalContentKeyPolicyConfigurationImplementation(input []byte) (Content return out, nil } - out := RawContentKeyPolicyConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyConfigurationImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyConfigurationImpl{ + contentKeyPolicyConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go index f7983ee301a..ca758e4a29c 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyfairplayconfiguration.go @@ -19,6 +19,14 @@ type ContentKeyPolicyFairPlayConfiguration struct { RentalDuration int64 `json:"rentalDuration"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyFairPlayConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyFairPlayConfiguration{} @@ -32,9 +40,10 @@ func (s ContentKeyPolicyFairPlayConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyFairPlayConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go index 4a5e74404b1..bc18d18be65 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyopenrestriction.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyRestriction = ContentKeyPolicyOpenRestriction{} type ContentKeyPolicyOpenRestriction struct { // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyOpenRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyOpenRestriction{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyOpenRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyOpenRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyOpenRestriction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go index 687ed9dd6c8..3020a17f70d 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyoption.go @@ -33,7 +33,7 @@ func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["configuration"]; ok { - impl, err := unmarshalContentKeyPolicyConfigurationImplementation(v) + impl, err := UnmarshalContentKeyPolicyConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Configuration' for 'ContentKeyPolicyOption': %+v", err) } @@ -41,7 +41,7 @@ func (s *ContentKeyPolicyOption) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restriction"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionImplementation(v) + impl, err := UnmarshalContentKeyPolicyRestrictionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Restriction' for 'ContentKeyPolicyOption': %+v", err) } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go index 3f609b4a8da..9755b9dc5bb 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadyconfiguration.go @@ -15,6 +15,14 @@ type ContentKeyPolicyPlayReadyConfiguration struct { ResponseCustomData *string `json:"responseCustomData,omitempty"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyConfiguration{} @@ -28,9 +36,10 @@ func (s ContentKeyPolicyPlayReadyConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go index 1795b14bc22..53d857e4b79 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromheader.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyPlayReadyContentKeyLocation = ContentKeyPolicyPlayReadyCon type ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader struct { // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader) MarshalJSON() ( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go index 91ed242963b..7e4edc77afb 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier.go @@ -14,6 +14,14 @@ type ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier struct { KeyId string `json:"keyId"` // Fields inherited from ContentKeyPolicyPlayReadyContentKeyLocation + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier) MarshalJ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go index 4966f524297..afbd312c3e8 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadycontentkeylocation.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyPlayReadyContentKeyLocation interface { + ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl } -// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyPlayReadyContentKeyLocation = BaseContentKeyPolicyPlayReadyContentKeyLocationImpl{} + +type BaseContentKeyPolicyPlayReadyContentKeyLocationImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyPlayReadyContentKeyLocationImpl) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return s +} + +var _ ContentKeyPolicyPlayReadyContentKeyLocation = RawContentKeyPolicyPlayReadyContentKeyLocationImpl{} + +// RawContentKeyPolicyPlayReadyContentKeyLocationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyPlayReadyContentKeyLocationImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyPlayReadyContentKeyLocation BaseContentKeyPolicyPlayReadyContentKeyLocationImpl + Type string + Values map[string]interface{} } -func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { +func (s RawContentKeyPolicyPlayReadyContentKeyLocationImpl) ContentKeyPolicyPlayReadyContentKeyLocation() BaseContentKeyPolicyPlayReadyContentKeyLocationImpl { + return s.contentKeyPolicyPlayReadyContentKeyLocation +} + +func UnmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input []byte) (ContentKeyPolicyPlayReadyContentKeyLocation, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(input [] return out, nil } - out := RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ + var parent BaseContentKeyPolicyPlayReadyContentKeyLocationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyPlayReadyContentKeyLocationImpl: %+v", err) + } + + return RawContentKeyPolicyPlayReadyContentKeyLocationImpl{ + contentKeyPolicyPlayReadyContentKeyLocation: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go index 119789116b2..f158d45c397 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyplayreadylicense.go @@ -75,7 +75,7 @@ func (s *ContentKeyPolicyPlayReadyLicense) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["contentKeyLocation"]; ok { - impl, err := unmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) + impl, err := UnmarshalContentKeyPolicyPlayReadyContentKeyLocationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ContentKeyLocation' for 'ContentKeyPolicyPlayReadyLicense': %+v", err) } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go index 1f3ab4d83cf..4908dc096d3 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestriction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyRestriction interface { + ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl } -// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyRestriction = BaseContentKeyPolicyRestrictionImpl{} + +type BaseContentKeyPolicyRestrictionImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyRestrictionImpl) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return s +} + +var _ ContentKeyPolicyRestriction = RawContentKeyPolicyRestrictionImpl{} + +// RawContentKeyPolicyRestrictionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyRestrictionImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyRestriction BaseContentKeyPolicyRestrictionImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyRestrictionImpl) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return s.contentKeyPolicyRestriction } -func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { +func UnmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKeyPolicyRestriction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalContentKeyPolicyRestrictionImplementation(input []byte) (ContentKe return out, nil } - out := RawContentKeyPolicyRestrictionImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyRestrictionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyRestrictionImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyRestrictionImpl{ + contentKeyPolicyRestriction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go index 6d8a4e938da..5ab4af80c92 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrestrictiontokenkey.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ContentKeyPolicyRestrictionTokenKey interface { + ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl } -// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ContentKeyPolicyRestrictionTokenKey = BaseContentKeyPolicyRestrictionTokenKeyImpl{} + +type BaseContentKeyPolicyRestrictionTokenKeyImpl struct { + OdataType string `json:"@odata.type"` +} + +func (s BaseContentKeyPolicyRestrictionTokenKeyImpl) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return s +} + +var _ ContentKeyPolicyRestrictionTokenKey = RawContentKeyPolicyRestrictionTokenKeyImpl{} + +// RawContentKeyPolicyRestrictionTokenKeyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawContentKeyPolicyRestrictionTokenKeyImpl struct { - Type string - Values map[string]interface{} + contentKeyPolicyRestrictionTokenKey BaseContentKeyPolicyRestrictionTokenKeyImpl + Type string + Values map[string]interface{} +} + +func (s RawContentKeyPolicyRestrictionTokenKeyImpl) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return s.contentKeyPolicyRestrictionTokenKey } -func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { +func UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (ContentKeyPolicyRestrictionTokenKey, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(input []byte) (C return out, nil } - out := RawContentKeyPolicyRestrictionTokenKeyImpl{ - Type: value, - Values: temp, + var parent BaseContentKeyPolicyRestrictionTokenKeyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseContentKeyPolicyRestrictionTokenKeyImpl: %+v", err) } - return out, nil + + return RawContentKeyPolicyRestrictionTokenKeyImpl{ + contentKeyPolicyRestrictionTokenKey: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go index 75dc037576d..b6ccf62b62f 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyrsatokenkey.go @@ -15,6 +15,14 @@ type ContentKeyPolicyRsaTokenKey struct { Modulus string `json:"modulus"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyRsaTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyRsaTokenKey{} @@ -28,9 +36,10 @@ func (s ContentKeyPolicyRsaTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyRsaTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyRsaTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go index 97eab4e535d..a9794218a5d 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicysymmetrictokenkey.go @@ -14,6 +14,14 @@ type ContentKeyPolicySymmetricTokenKey struct { KeyValue string `json:"keyValue"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicySymmetricTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicySymmetricTokenKey{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicySymmetricTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicySymmetricTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go index 6b5e417cc01..fbb81c59066 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicytokenrestriction.go @@ -20,6 +20,14 @@ type ContentKeyPolicyTokenRestriction struct { RestrictionTokenType ContentKeyPolicyRestrictionTokenType `json:"restrictionTokenType"` // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyTokenRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyTokenRestriction{} @@ -33,9 +41,10 @@ func (s ContentKeyPolicyTokenRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyTokenRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyTokenRestriction" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { s.Audience = decoded.Audience s.Issuer = decoded.Issuer + s.OdataType = decoded.OdataType s.OpenIdConnectDiscoveryDocument = decoded.OpenIdConnectDiscoveryDocument s.RequiredClaims = decoded.RequiredClaims s.RestrictionTokenType = decoded.RestrictionTokenType @@ -74,7 +84,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { output := make([]ContentKeyPolicyRestrictionTokenKey, 0) for i, val := range listTemp { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) + impl, err := UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'AlternateVerificationKeys' for 'ContentKeyPolicyTokenRestriction': %+v", i, err) } @@ -84,7 +94,7 @@ func (s *ContentKeyPolicyTokenRestriction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryVerificationKey"]; ok { - impl, err := unmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) + impl, err := UnmarshalContentKeyPolicyRestrictionTokenKeyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryVerificationKey' for 'ContentKeyPolicyTokenRestriction': %+v", err) } diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go index 9683eb34e56..0bcad5663e8 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownconfiguration.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyConfiguration = ContentKeyPolicyUnknownConfiguration{} type ContentKeyPolicyUnknownConfiguration struct { // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyUnknownConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyUnknownConfiguration{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyUnknownConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go index a7ab64728f2..9577bc2db34 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyunknownrestriction.go @@ -13,6 +13,14 @@ var _ ContentKeyPolicyRestriction = ContentKeyPolicyUnknownRestriction{} type ContentKeyPolicyUnknownRestriction struct { // Fields inherited from ContentKeyPolicyRestriction + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyUnknownRestriction) ContentKeyPolicyRestriction() BaseContentKeyPolicyRestrictionImpl { + return BaseContentKeyPolicyRestrictionImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyUnknownRestriction{} @@ -26,9 +34,10 @@ func (s ContentKeyPolicyUnknownRestriction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyUnknownRestriction: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyUnknownRestriction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go index 1a79d287964..206210874c4 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicywidevineconfiguration.go @@ -14,6 +14,14 @@ type ContentKeyPolicyWidevineConfiguration struct { WidevineTemplate string `json:"widevineTemplate"` // Fields inherited from ContentKeyPolicyConfiguration + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyWidevineConfiguration) ContentKeyPolicyConfiguration() BaseContentKeyPolicyConfigurationImpl { + return BaseContentKeyPolicyConfigurationImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyWidevineConfiguration{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyWidevineConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyWidevineConfiguration: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go index 0810b28176e..96f3700440a 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/model_contentkeypolicyx509certificatetokenkey.go @@ -14,6 +14,14 @@ type ContentKeyPolicyX509CertificateTokenKey struct { RawBody string `json:"rawBody"` // Fields inherited from ContentKeyPolicyRestrictionTokenKey + + OdataType string `json:"@odata.type"` +} + +func (s ContentKeyPolicyX509CertificateTokenKey) ContentKeyPolicyRestrictionTokenKey() BaseContentKeyPolicyRestrictionTokenKeyImpl { + return BaseContentKeyPolicyRestrictionTokenKeyImpl{ + OdataType: s.OdataType, + } } var _ json.Marshaler = ContentKeyPolicyX509CertificateTokenKey{} @@ -27,9 +35,10 @@ func (s ContentKeyPolicyX509CertificateTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContentKeyPolicyX509CertificateTokenKey: %+v", err) } + decoded["@odata.type"] = "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/media/2022-08-01/contentkeypolicies/version.go b/resource-manager/media/2022-08-01/contentkeypolicies/version.go index d76814aea62..cfbbe2d625f 100644 --- a/resource-manager/media/2022-08-01/contentkeypolicies/version.go +++ b/resource-manager/media/2022-08-01/contentkeypolicies/version.go @@ -1,12 +1,10 @@ package contentkeypolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentkeypolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentkeypolicies/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/liveevents/README.md b/resource-manager/media/2022-08-01/liveevents/README.md index 7eea70baad8..8cea66ed289 100644 --- a/resource-manager/media/2022-08-01/liveevents/README.md +++ b/resource-manager/media/2022-08-01/liveevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveevents` Documentation -The `liveevents` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `liveevents` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/liveevents/client.go b/resource-manager/media/2022-08-01/liveevents/client.go index 85dcde5c926..d90241a8ee3 100644 --- a/resource-manager/media/2022-08-01/liveevents/client.go +++ b/resource-manager/media/2022-08-01/liveevents/client.go @@ -15,7 +15,7 @@ type LiveEventsClient struct { } func NewLiveEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "liveevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LiveEventsClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/liveevents/id_liveevent.go b/resource-manager/media/2022-08-01/liveevents/id_liveevent.go index d642499f51e..0f895df228f 100644 --- a/resource-manager/media/2022-08-01/liveevents/id_liveevent.go +++ b/resource-manager/media/2022-08-01/liveevents/id_liveevent.go @@ -44,7 +44,7 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go b/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go index c361335f6cd..c1405e1cc9d 100644 --- a/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go +++ b/resource-manager/media/2022-08-01/liveevents/id_liveeventoperation.go @@ -44,7 +44,7 @@ func ParseLiveEventOperationID(input string) (*LiveEventOperationId, error) { } id := LiveEventOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveEventOperationIDInsensitively(input string) (*LiveEventOperationId } id := LiveEventOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go b/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go index a7d3fc2fea9..aeecdd73199 100644 --- a/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/liveevents/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go b/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go index c92b8be9e04..bdeb1ce0669 100644 --- a/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go +++ b/resource-manager/media/2022-08-01/liveevents/method_asyncoperation.go @@ -45,7 +45,6 @@ func (c LiveEventsClient) AsyncOperation(ctx context.Context, id LiveEventOperat var model AsyncOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/liveevents/method_create.go b/resource-manager/media/2022-08-01/liveevents/method_create.go index db743890d4a..7b7624587a1 100644 --- a/resource-manager/media/2022-08-01/liveevents/method_create.go +++ b/resource-manager/media/2022-08-01/liveevents/method_create.go @@ -37,6 +37,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/liveevents/method_get.go b/resource-manager/media/2022-08-01/liveevents/method_get.go index cdefc7b3a39..e662adc8529 100644 --- a/resource-manager/media/2022-08-01/liveevents/method_get.go +++ b/resource-manager/media/2022-08-01/liveevents/method_get.go @@ -45,7 +45,6 @@ func (c LiveEventsClient) Get(ctx context.Context, id LiveEventId) (result GetOp var model LiveEvent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/liveevents/version.go b/resource-manager/media/2022-08-01/liveevents/version.go index 7c906290a6b..6f0cd778574 100644 --- a/resource-manager/media/2022-08-01/liveevents/version.go +++ b/resource-manager/media/2022-08-01/liveevents/version.go @@ -1,12 +1,10 @@ package liveevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/liveevents/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/liveoutputs/README.md b/resource-manager/media/2022-08-01/liveoutputs/README.md index 3120b5e8d17..6cf00960974 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/README.md +++ b/resource-manager/media/2022-08-01/liveoutputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/liveoutputs` Documentation -The `liveoutputs` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `liveoutputs` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/liveoutputs/client.go b/resource-manager/media/2022-08-01/liveoutputs/client.go index 49007d18eb8..68d348058ad 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/client.go +++ b/resource-manager/media/2022-08-01/liveoutputs/client.go @@ -15,7 +15,7 @@ type LiveOutputsClient struct { } func NewLiveOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*LiveOutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "liveoutputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "liveoutputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LiveOutputsClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go b/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go index 5b10f380efb..74b762fafd4 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go +++ b/resource-manager/media/2022-08-01/liveoutputs/id_liveevent.go @@ -44,7 +44,7 @@ func ParseLiveEventID(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveEventIDInsensitively(input string) (*LiveEventId, error) { } id := LiveEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go b/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go index 5bbae170c89..0064b0af972 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go +++ b/resource-manager/media/2022-08-01/liveoutputs/id_liveoutput.go @@ -46,7 +46,7 @@ func ParseLiveOutputID(input string) (*LiveOutputId, error) { } id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLiveOutputIDInsensitively(input string) (*LiveOutputId, error) { } id := LiveOutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go b/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go index bc9604d0f76..b84d8017e22 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go +++ b/resource-manager/media/2022-08-01/liveoutputs/id_liveoutputoperation.go @@ -44,7 +44,7 @@ func ParseLiveOutputOperationID(input string) (*LiveOutputOperationId, error) { } id := LiveOutputOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLiveOutputOperationIDInsensitively(input string) (*LiveOutputOperation } id := LiveOutputOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go b/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go index e55613d9d61..e513ee501da 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go +++ b/resource-manager/media/2022-08-01/liveoutputs/method_asyncoperation.go @@ -45,7 +45,6 @@ func (c LiveOutputsClient) AsyncOperation(ctx context.Context, id LiveOutputOper var model AsyncOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/liveoutputs/method_get.go b/resource-manager/media/2022-08-01/liveoutputs/method_get.go index 9502e806865..314514c28f0 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/method_get.go +++ b/resource-manager/media/2022-08-01/liveoutputs/method_get.go @@ -45,7 +45,6 @@ func (c LiveOutputsClient) Get(ctx context.Context, id LiveOutputId) (result Get var model LiveOutput result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/liveoutputs/version.go b/resource-manager/media/2022-08-01/liveoutputs/version.go index fa7e62970ff..5409235f04e 100644 --- a/resource-manager/media/2022-08-01/liveoutputs/version.go +++ b/resource-manager/media/2022-08-01/liveoutputs/version.go @@ -1,12 +1,10 @@ package liveoutputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/liveoutputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/liveoutputs/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/README.md b/resource-manager/media/2022-08-01/streamingendpoints/README.md index 79856624a11..26ed728fdd0 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/README.md +++ b/resource-manager/media/2022-08-01/streamingendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingendpoints` Documentation -The `streamingendpoints` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `streamingendpoints` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/streamingendpoints/client.go b/resource-manager/media/2022-08-01/streamingendpoints/client.go index a66794d6ca6..19ca802d4fc 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/client.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/client.go @@ -15,7 +15,7 @@ type StreamingEndpointsClient struct { } func NewStreamingEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingEndpointsClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go b/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go index 243cdf6d8cf..95e862655d5 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go b/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go index 4d634f2efe1..c27821a8374 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpoint.go @@ -44,7 +44,7 @@ func ParseStreamingEndpointID(input string) (*StreamingEndpointId, error) { } id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingEndpointIDInsensitively(input string) (*StreamingEndpointId, } id := StreamingEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go b/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go index c69379aa062..00ff61249d3 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/id_streamingendpointoperation.go @@ -44,7 +44,7 @@ func ParseStreamingEndpointOperationID(input string) (*StreamingEndpointOperatio } id := StreamingEndpointOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingEndpointOperationIDInsensitively(input string) (*StreamingEnd } id := StreamingEndpointOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go b/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go index 9005e4039bb..339b22b13e9 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/method_asyncoperation.go @@ -45,7 +45,6 @@ func (c StreamingEndpointsClient) AsyncOperation(ctx context.Context, id Streami var model AsyncOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/method_create.go b/resource-manager/media/2022-08-01/streamingendpoints/method_create.go index 7b9e76bac77..96afb2fd5ed 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/method_create.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/method_create.go @@ -37,6 +37,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/method_get.go b/resource-manager/media/2022-08-01/streamingendpoints/method_get.go index 8db082ce324..66bbf171239 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/method_get.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/method_get.go @@ -45,7 +45,6 @@ func (c StreamingEndpointsClient) Get(ctx context.Context, id StreamingEndpointI var model StreamingEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go b/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go index 419e72eb2fa..3e3ef853e90 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/method_skus.go @@ -46,7 +46,6 @@ func (c StreamingEndpointsClient) Skus(ctx context.Context, id StreamingEndpoint var model StreamingEndpointSkuInfoListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingendpoints/version.go b/resource-manager/media/2022-08-01/streamingendpoints/version.go index e58637e1a26..bf9b95c9237 100644 --- a/resource-manager/media/2022-08-01/streamingendpoints/version.go +++ b/resource-manager/media/2022-08-01/streamingendpoints/version.go @@ -1,12 +1,10 @@ package streamingendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingendpoints/2022-08-01" } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md index 7d89cec65d8..0b219599809 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators` Documentation -The `streamingpoliciesandstreaminglocators` SDK allows for interaction with the Azure Resource Manager Service `media` (API Version `2022-08-01`). +The `streamingpoliciesandstreaminglocators` SDK allows for interaction with Azure Resource Manager `media` (API Version `2022-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go index ad459b8507f..3012e3abc37 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/client.go @@ -15,7 +15,7 @@ type StreamingPoliciesAndStreamingLocatorsClient struct { } func NewStreamingPoliciesAndStreamingLocatorsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingPoliciesAndStreamingLocatorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingpoliciesandstreaminglocators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingPoliciesAndStreamingLocatorsClient: %+v", err) } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go index a9668bf4425..19afd426c72 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_mediaservice.go @@ -42,7 +42,7 @@ func ParseMediaServiceID(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMediaServiceIDInsensitively(input string) (*MediaServiceId, error) { } id := MediaServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go index 98c5b939dd0..18eb23c6d88 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streaminglocator.go @@ -44,7 +44,7 @@ func ParseStreamingLocatorID(input string) (*StreamingLocatorId, error) { } id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingLocatorIDInsensitively(input string) (*StreamingLocatorId, er } id := StreamingLocatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go index 36742d553b4..1a9b642d478 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/id_streamingpolicy.go @@ -44,7 +44,7 @@ func ParseStreamingPolicyID(input string) (*StreamingPolicyId, error) { } id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStreamingPolicyIDInsensitively(input string) (*StreamingPolicyId, erro } id := StreamingPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go index b4cfe3f3a7a..2fd7215d169 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorscreate.go @@ -49,7 +49,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsCreate(ctx var model StreamingLocator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go index 4f9e0139c97..2a44c8d2792 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorsget.go @@ -45,7 +45,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsGet(ctx co var model StreamingLocator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go index 9a5c60b3080..6548b1ec546 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslist.go @@ -41,6 +41,7 @@ func (o StreamingLocatorsListOperationOptions) ToHeaders() *client.Headers { func (o StreamingLocatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go index d33f7dc9215..6bebc23f27a 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistcontentkeys.go @@ -46,7 +46,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListConten var model ListContentKeysResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go index e23e286f575..a68169c5541 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streaminglocatorslistpaths.go @@ -46,7 +46,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingLocatorsListPaths( var model ListPathsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go index 82fbc7d8119..f02097bf0b4 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciescreate.go @@ -49,7 +49,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesCreate(ctx var model StreamingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go index 5ccc570abb9..a9ca7f4160e 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpoliciesget.go @@ -45,7 +45,6 @@ func (c StreamingPoliciesAndStreamingLocatorsClient) StreamingPoliciesGet(ctx co var model StreamingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go index 3397b46a73e..89b40344316 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/method_streamingpolicieslist.go @@ -41,6 +41,7 @@ func (o StreamingPoliciesListOperationOptions) ToHeaders() *client.Headers { func (o StreamingPoliciesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go index cf48ae58f62..3f85935f3cd 100644 --- a/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go +++ b/resource-manager/media/2022-08-01/streamingpoliciesandstreaminglocators/version.go @@ -1,12 +1,10 @@ package streamingpoliciesandstreaminglocators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingpoliciesandstreaminglocators/2022-08-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/README.md b/resource-manager/migrate/2020-01-01/hypervcluster/README.md index b87805749d3..9ba0e90fbab 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/README.md +++ b/resource-manager/migrate/2020-01-01/hypervcluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervcluster` Documentation -The `hypervcluster` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervcluster` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/client.go b/resource-manager/migrate/2020-01-01/hypervcluster/client.go index 1a16f784c31..cbd10c90542 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/client.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/client.go @@ -15,7 +15,7 @@ type HyperVClusterClient struct { } func NewHyperVClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervcluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervcluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVClusterClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/id_cluster.go b/resource-manager/migrate/2020-01-01/hypervcluster/id_cluster.go index e79c95649f6..8ef5eca1104 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/id_cluster.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervcluster/id_hypervsite.go index fc5f5ba50dc..6da1465fada 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/method_getallclustersinsite.go b/resource-manager/migrate/2020-01-01/hypervcluster/method_getallclustersinsite.go index d35f18067dc..1d987bda776 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/method_getallclustersinsite.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/method_getallclustersinsite.go @@ -39,6 +39,7 @@ func (o GetAllClustersInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllClustersInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/method_getcluster.go b/resource-manager/migrate/2020-01-01/hypervcluster/method_getcluster.go index 09014bf9aba..cc8bafa8a5c 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/method_getcluster.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/method_getcluster.go @@ -45,7 +45,6 @@ func (c HyperVClusterClient) GetCluster(ctx context.Context, id ClusterId) (resu var model HyperVCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervcluster/version.go b/resource-manager/migrate/2020-01-01/hypervcluster/version.go index 904adc83f5b..52569b100a2 100644 --- a/resource-manager/migrate/2020-01-01/hypervcluster/version.go +++ b/resource-manager/migrate/2020-01-01/hypervcluster/version.go @@ -1,12 +1,10 @@ package hypervcluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervcluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervcluster/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/README.md b/resource-manager/migrate/2020-01-01/hypervhost/README.md index a789700f121..020358eb26d 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/README.md +++ b/resource-manager/migrate/2020-01-01/hypervhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervhost` Documentation -The `hypervhost` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervhost` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervhost/client.go b/resource-manager/migrate/2020-01-01/hypervhost/client.go index b61b3b34022..a5c253ed194 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/client.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/client.go @@ -15,7 +15,7 @@ type HyperVHostClient struct { } func NewHyperVHostClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVHostClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/id_host.go b/resource-manager/migrate/2020-01-01/hypervhost/id_host.go index 7056ce5182a..b18f8883329 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/id_host.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/id_host.go @@ -44,7 +44,7 @@ func ParseHostID(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervhost/id_hypervsite.go index a31fa7b0c75..ee9334ce328 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/method_getallhostsinsite.go b/resource-manager/migrate/2020-01-01/hypervhost/method_getallhostsinsite.go index a730ff97fff..28d03490384 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/method_getallhostsinsite.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/method_getallhostsinsite.go @@ -39,6 +39,7 @@ func (o GetAllHostsInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllHostsInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/method_gethost.go b/resource-manager/migrate/2020-01-01/hypervhost/method_gethost.go index 8e7e3a9edc8..3e561dde88b 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/method_gethost.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/method_gethost.go @@ -45,7 +45,6 @@ func (c HyperVHostClient) GetHost(ctx context.Context, id HostId) (result GetHos var model HyperVHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervhost/version.go b/resource-manager/migrate/2020-01-01/hypervhost/version.go index df68d529bba..7d9afc7d8b0 100644 --- a/resource-manager/migrate/2020-01-01/hypervhost/version.go +++ b/resource-manager/migrate/2020-01-01/hypervhost/version.go @@ -1,12 +1,10 @@ package hypervhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervhost/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervjobs/README.md b/resource-manager/migrate/2020-01-01/hypervjobs/README.md index 4ef373a9742..6c46a2df20e 100644 --- a/resource-manager/migrate/2020-01-01/hypervjobs/README.md +++ b/resource-manager/migrate/2020-01-01/hypervjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervjobs` Documentation -The `hypervjobs` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervjobs` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervjobs/client.go b/resource-manager/migrate/2020-01-01/hypervjobs/client.go index 3b5f99115e5..0fffb188f7e 100644 --- a/resource-manager/migrate/2020-01-01/hypervjobs/client.go +++ b/resource-manager/migrate/2020-01-01/hypervjobs/client.go @@ -15,7 +15,7 @@ type HyperVJobsClient struct { } func NewHyperVJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVJobsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervjobs/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervjobs/id_hypervsite.go index 7cbe0a5f7de..8bc5e3baf0f 100644 --- a/resource-manager/migrate/2020-01-01/hypervjobs/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervjobs/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervjobs/method_getjob.go b/resource-manager/migrate/2020-01-01/hypervjobs/method_getjob.go index 52c1d8e9a3b..e758a282f9a 100644 --- a/resource-manager/migrate/2020-01-01/hypervjobs/method_getjob.go +++ b/resource-manager/migrate/2020-01-01/hypervjobs/method_getjob.go @@ -46,7 +46,6 @@ func (c HyperVJobsClient) GetJob(ctx context.Context, id commonids.HyperVSiteJob var model HyperVJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervjobs/version.go b/resource-manager/migrate/2020-01-01/hypervjobs/version.go index eb71900a7c1..0ae7ccbb01b 100644 --- a/resource-manager/migrate/2020-01-01/hypervjobs/version.go +++ b/resource-manager/migrate/2020-01-01/hypervjobs/version.go @@ -1,12 +1,10 @@ package hypervjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervjobs/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/README.md b/resource-manager/migrate/2020-01-01/hypervmachines/README.md index 44f613ee7ad..088a24e057f 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/README.md +++ b/resource-manager/migrate/2020-01-01/hypervmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervmachines` Documentation -The `hypervmachines` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervmachines` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/client.go b/resource-manager/migrate/2020-01-01/hypervmachines/client.go index c3b8b7e308e..e5c263432e4 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/client.go +++ b/resource-manager/migrate/2020-01-01/hypervmachines/client.go @@ -15,7 +15,7 @@ type HyperVMachinesClient struct { } func NewHyperVMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVMachinesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervmachines/id_hypervsite.go index 6fa580a1f4b..3f2273d90d9 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervmachines/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/method_getallmachinesinsite.go b/resource-manager/migrate/2020-01-01/hypervmachines/method_getallmachinesinsite.go index 3395970ffdf..429a8452647 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/method_getallmachinesinsite.go +++ b/resource-manager/migrate/2020-01-01/hypervmachines/method_getallmachinesinsite.go @@ -42,6 +42,7 @@ func (o GetAllMachinesInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllMachinesInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/method_getmachine.go b/resource-manager/migrate/2020-01-01/hypervmachines/method_getmachine.go index 06fc97db9f1..010817ea819 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/method_getmachine.go +++ b/resource-manager/migrate/2020-01-01/hypervmachines/method_getmachine.go @@ -46,7 +46,6 @@ func (c HyperVMachinesClient) GetMachine(ctx context.Context, id commonids.Hyper var model HyperVMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervmachines/version.go b/resource-manager/migrate/2020-01-01/hypervmachines/version.go index 6bb6ef10752..f3b3f678aec 100644 --- a/resource-manager/migrate/2020-01-01/hypervmachines/version.go +++ b/resource-manager/migrate/2020-01-01/hypervmachines/version.go @@ -1,12 +1,10 @@ package hypervmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervmachines/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/README.md b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/README.md index f964bfb4576..f4bb9328bea 100644 --- a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/README.md +++ b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervrunasaccounts` Documentation -The `hypervrunasaccounts` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervrunasaccounts` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/client.go b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/client.go index 8db6ce10a22..50a6afcc42a 100644 --- a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/client.go +++ b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/client.go @@ -15,7 +15,7 @@ type HyperVRunAsAccountsClient struct { } func NewHyperVRunAsAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVRunAsAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervrunasaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervrunasaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVRunAsAccountsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/id_hypervsite.go index cad0ca3b506..4ab5a87cbc1 100644 --- a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/method_getrunasaccount.go b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/method_getrunasaccount.go index 4768467253e..5dc7504c38a 100644 --- a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/method_getrunasaccount.go +++ b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/method_getrunasaccount.go @@ -46,7 +46,6 @@ func (c HyperVRunAsAccountsClient) GetRunAsAccount(ctx context.Context, id commo var model HyperVRunAsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/version.go b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/version.go index 05e3b67d9fe..8f969d06885 100644 --- a/resource-manager/migrate/2020-01-01/hypervrunasaccounts/version.go +++ b/resource-manager/migrate/2020-01-01/hypervrunasaccounts/version.go @@ -1,12 +1,10 @@ package hypervrunasaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervrunasaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervrunasaccounts/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/README.md b/resource-manager/migrate/2020-01-01/hypervsites/README.md index 8832c2f7a53..da2b714c248 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/README.md +++ b/resource-manager/migrate/2020-01-01/hypervsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervsites` Documentation -The `hypervsites` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `hypervsites` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/hypervsites/client.go b/resource-manager/migrate/2020-01-01/hypervsites/client.go index 504361e6723..850f75398d3 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/client.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/client.go @@ -15,7 +15,7 @@ type HyperVSitesClient struct { } func NewHyperVSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVSitesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/id_hypervsite.go b/resource-manager/migrate/2020-01-01/hypervsites/id_hypervsite.go index 26d7011dc96..a2aa2ab4df7 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/id_hypervsite.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/method_getsite.go b/resource-manager/migrate/2020-01-01/hypervsites/method_getsite.go index 75ebe339319..81b02c66bae 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/method_getsite.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/method_getsite.go @@ -45,7 +45,6 @@ func (c HyperVSitesClient) GetSite(ctx context.Context, id HyperVSiteId) (result var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/method_getsiteusage.go b/resource-manager/migrate/2020-01-01/hypervsites/method_getsiteusage.go index e0cbe47da0f..efd23efb0d8 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/method_getsiteusage.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/method_getsiteusage.go @@ -46,7 +46,6 @@ func (c HyperVSitesClient) GetSiteUsage(ctx context.Context, id HyperVSiteId) (r var model HyperVSiteUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/method_patchsite.go b/resource-manager/migrate/2020-01-01/hypervsites/method_patchsite.go index e88ac1bf20d..c258616a2a1 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/method_patchsite.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/method_patchsite.go @@ -50,7 +50,6 @@ func (c HyperVSitesClient) PatchSite(ctx context.Context, id HyperVSiteId, input var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/method_putsite.go b/resource-manager/migrate/2020-01-01/hypervsites/method_putsite.go index fbe4a9add58..188e0c32b39 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/method_putsite.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/method_putsite.go @@ -50,7 +50,6 @@ func (c HyperVSitesClient) PutSite(ctx context.Context, id HyperVSiteId, input H var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/hypervsites/version.go b/resource-manager/migrate/2020-01-01/hypervsites/version.go index 32d9aa7579f..e8e460e38ad 100644 --- a/resource-manager/migrate/2020-01-01/hypervsites/version.go +++ b/resource-manager/migrate/2020-01-01/hypervsites/version.go @@ -1,12 +1,10 @@ package hypervsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervsites/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/jobs/README.md b/resource-manager/migrate/2020-01-01/jobs/README.md index fb898607ced..d9cfb7b1e12 100644 --- a/resource-manager/migrate/2020-01-01/jobs/README.md +++ b/resource-manager/migrate/2020-01-01/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `jobs` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/jobs/client.go b/resource-manager/migrate/2020-01-01/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/migrate/2020-01-01/jobs/client.go +++ b/resource-manager/migrate/2020-01-01/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/jobs/id_vmwaresite.go b/resource-manager/migrate/2020-01-01/jobs/id_vmwaresite.go index 798379b3513..b0c39684a88 100644 --- a/resource-manager/migrate/2020-01-01/jobs/id_vmwaresite.go +++ b/resource-manager/migrate/2020-01-01/jobs/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/jobs/method_getjob.go b/resource-manager/migrate/2020-01-01/jobs/method_getjob.go index ff84cb775c4..75c4c6d3c78 100644 --- a/resource-manager/migrate/2020-01-01/jobs/method_getjob.go +++ b/resource-manager/migrate/2020-01-01/jobs/method_getjob.go @@ -46,7 +46,6 @@ func (c JobsClient) GetJob(ctx context.Context, id commonids.VMwareSiteJobId) (r var model VMwareJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/jobs/version.go b/resource-manager/migrate/2020-01-01/jobs/version.go index 20a8797940a..ed6425d3b02 100644 --- a/resource-manager/migrate/2020-01-01/jobs/version.go +++ b/resource-manager/migrate/2020-01-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/machines/README.md b/resource-manager/migrate/2020-01-01/machines/README.md index afc3b86eaf3..fbe7bf74245 100644 --- a/resource-manager/migrate/2020-01-01/machines/README.md +++ b/resource-manager/migrate/2020-01-01/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `machines` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/machines/client.go b/resource-manager/migrate/2020-01-01/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/migrate/2020-01-01/machines/client.go +++ b/resource-manager/migrate/2020-01-01/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/machines/id_vmwaresite.go b/resource-manager/migrate/2020-01-01/machines/id_vmwaresite.go index 73de6cc1484..4d3fca40be2 100644 --- a/resource-manager/migrate/2020-01-01/machines/id_vmwaresite.go +++ b/resource-manager/migrate/2020-01-01/machines/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/machines/method_getallmachinesinsite.go b/resource-manager/migrate/2020-01-01/machines/method_getallmachinesinsite.go index 9a7e1d1b2f5..bf83c32e1c4 100644 --- a/resource-manager/migrate/2020-01-01/machines/method_getallmachinesinsite.go +++ b/resource-manager/migrate/2020-01-01/machines/method_getallmachinesinsite.go @@ -42,6 +42,7 @@ func (o GetAllMachinesInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllMachinesInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-01-01/machines/method_getmachine.go b/resource-manager/migrate/2020-01-01/machines/method_getmachine.go index 6711c170679..bd0cbda58cd 100644 --- a/resource-manager/migrate/2020-01-01/machines/method_getmachine.go +++ b/resource-manager/migrate/2020-01-01/machines/method_getmachine.go @@ -46,7 +46,6 @@ func (c MachinesClient) GetMachine(ctx context.Context, id commonids.VMwareSiteM var model VMwareMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/machines/version.go b/resource-manager/migrate/2020-01-01/machines/version.go index c0980e7be08..88cfa5b1807 100644 --- a/resource-manager/migrate/2020-01-01/machines/version.go +++ b/resource-manager/migrate/2020-01-01/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/runasaccounts/README.md b/resource-manager/migrate/2020-01-01/runasaccounts/README.md index 4546b39653e..e908cd3ada7 100644 --- a/resource-manager/migrate/2020-01-01/runasaccounts/README.md +++ b/resource-manager/migrate/2020-01-01/runasaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/runasaccounts` Documentation -The `runasaccounts` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `runasaccounts` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/runasaccounts/client.go b/resource-manager/migrate/2020-01-01/runasaccounts/client.go index eec6adbe66f..600755ddd80 100644 --- a/resource-manager/migrate/2020-01-01/runasaccounts/client.go +++ b/resource-manager/migrate/2020-01-01/runasaccounts/client.go @@ -15,7 +15,7 @@ type RunAsAccountsClient struct { } func NewRunAsAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*RunAsAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runasaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runasaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunAsAccountsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/runasaccounts/id_vmwaresite.go b/resource-manager/migrate/2020-01-01/runasaccounts/id_vmwaresite.go index 9b3844597d4..c9371c463ff 100644 --- a/resource-manager/migrate/2020-01-01/runasaccounts/id_vmwaresite.go +++ b/resource-manager/migrate/2020-01-01/runasaccounts/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/runasaccounts/method_getrunasaccount.go b/resource-manager/migrate/2020-01-01/runasaccounts/method_getrunasaccount.go index 25a8bea7509..9f46faa3ad1 100644 --- a/resource-manager/migrate/2020-01-01/runasaccounts/method_getrunasaccount.go +++ b/resource-manager/migrate/2020-01-01/runasaccounts/method_getrunasaccount.go @@ -46,7 +46,6 @@ func (c RunAsAccountsClient) GetRunAsAccount(ctx context.Context, id commonids.V var model VMwareRunAsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/runasaccounts/version.go b/resource-manager/migrate/2020-01-01/runasaccounts/version.go index 8c3c4c0c7b8..d2f74c972b8 100644 --- a/resource-manager/migrate/2020-01-01/runasaccounts/version.go +++ b/resource-manager/migrate/2020-01-01/runasaccounts/version.go @@ -1,12 +1,10 @@ package runasaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runasaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runasaccounts/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/sites/README.md b/resource-manager/migrate/2020-01-01/sites/README.md index d29120980c8..913f7ff8caa 100644 --- a/resource-manager/migrate/2020-01-01/sites/README.md +++ b/resource-manager/migrate/2020-01-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/sites/client.go b/resource-manager/migrate/2020-01-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/migrate/2020-01-01/sites/client.go +++ b/resource-manager/migrate/2020-01-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/sites/id_vmwaresite.go b/resource-manager/migrate/2020-01-01/sites/id_vmwaresite.go index 0308a8f77ce..3acae99dda6 100644 --- a/resource-manager/migrate/2020-01-01/sites/id_vmwaresite.go +++ b/resource-manager/migrate/2020-01-01/sites/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/sites/method_getsite.go b/resource-manager/migrate/2020-01-01/sites/method_getsite.go index 9f07cbac909..e31677115d2 100644 --- a/resource-manager/migrate/2020-01-01/sites/method_getsite.go +++ b/resource-manager/migrate/2020-01-01/sites/method_getsite.go @@ -45,7 +45,6 @@ func (c SitesClient) GetSite(ctx context.Context, id VMwareSiteId) (result GetSi var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/sites/method_getsiteusage.go b/resource-manager/migrate/2020-01-01/sites/method_getsiteusage.go index 4a81e8136e1..24545c5f3d5 100644 --- a/resource-manager/migrate/2020-01-01/sites/method_getsiteusage.go +++ b/resource-manager/migrate/2020-01-01/sites/method_getsiteusage.go @@ -46,7 +46,6 @@ func (c SitesClient) GetSiteUsage(ctx context.Context, id VMwareSiteId) (result var model VMwareSiteUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/sites/method_patchsite.go b/resource-manager/migrate/2020-01-01/sites/method_patchsite.go index 5a7f9b242aa..3b0e33f0767 100644 --- a/resource-manager/migrate/2020-01-01/sites/method_patchsite.go +++ b/resource-manager/migrate/2020-01-01/sites/method_patchsite.go @@ -50,7 +50,6 @@ func (c SitesClient) PatchSite(ctx context.Context, id VMwareSiteId, input VMwar var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/sites/method_putsite.go b/resource-manager/migrate/2020-01-01/sites/method_putsite.go index 7f8a3e39743..82ad5759e09 100644 --- a/resource-manager/migrate/2020-01-01/sites/method_putsite.go +++ b/resource-manager/migrate/2020-01-01/sites/method_putsite.go @@ -50,7 +50,6 @@ func (c SitesClient) PutSite(ctx context.Context, id VMwareSiteId, input VMwareS var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/sites/version.go b/resource-manager/migrate/2020-01-01/sites/version.go index fb7b18430e2..a1624889bd6 100644 --- a/resource-manager/migrate/2020-01-01/sites/version.go +++ b/resource-manager/migrate/2020-01-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2020-01-01" } diff --git a/resource-manager/migrate/2020-01-01/vcenter/README.md b/resource-manager/migrate/2020-01-01/vcenter/README.md index 30e45ac6210..71c886506d8 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/README.md +++ b/resource-manager/migrate/2020-01-01/vcenter/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/vcenter` Documentation -The `vcenter` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-01-01`). +The `vcenter` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-01-01/vcenter/client.go b/resource-manager/migrate/2020-01-01/vcenter/client.go index 8c63fa9885e..0e9c8a8bb10 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/client.go +++ b/resource-manager/migrate/2020-01-01/vcenter/client.go @@ -15,7 +15,7 @@ type VCenterClient struct { } func NewVCenterClientWithBaseURI(sdkApi sdkEnv.Api) (*VCenterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vcenter", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vcenter", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VCenterClient: %+v", err) } diff --git a/resource-manager/migrate/2020-01-01/vcenter/id_vcenter.go b/resource-manager/migrate/2020-01-01/vcenter/id_vcenter.go index 97388a609f3..39f4eebce32 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/id_vcenter.go +++ b/resource-manager/migrate/2020-01-01/vcenter/id_vcenter.go @@ -44,7 +44,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/vcenter/id_vmwaresite.go b/resource-manager/migrate/2020-01-01/vcenter/id_vmwaresite.go index 04e924c90bc..b63e7872ef1 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/id_vmwaresite.go +++ b/resource-manager/migrate/2020-01-01/vcenter/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-01-01/vcenter/method_getallvcentersinsite.go b/resource-manager/migrate/2020-01-01/vcenter/method_getallvcentersinsite.go index 2cc0b37f6dc..eb20fa359c2 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/method_getallvcentersinsite.go +++ b/resource-manager/migrate/2020-01-01/vcenter/method_getallvcentersinsite.go @@ -39,6 +39,7 @@ func (o GetAllVCentersInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllVCentersInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-01-01/vcenter/method_getvcenter.go b/resource-manager/migrate/2020-01-01/vcenter/method_getvcenter.go index 584afd0f378..cd60902a6d8 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/method_getvcenter.go +++ b/resource-manager/migrate/2020-01-01/vcenter/method_getvcenter.go @@ -45,7 +45,6 @@ func (c VCenterClient) GetVCenter(ctx context.Context, id VCenterId) (result Get var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-01-01/vcenter/version.go b/resource-manager/migrate/2020-01-01/vcenter/version.go index f9af7932d78..bd8ac8c5db7 100644 --- a/resource-manager/migrate/2020-01-01/vcenter/version.go +++ b/resource-manager/migrate/2020-01-01/vcenter/version.go @@ -1,12 +1,10 @@ package vcenter -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vcenter/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vcenter/2020-01-01" } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/README.md b/resource-manager/migrate/2020-07-07/hypervcluster/README.md index 384a6cc7cdc..c711bdbed6b 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/README.md +++ b/resource-manager/migrate/2020-07-07/hypervcluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervcluster` Documentation -The `hypervcluster` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervcluster` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/client.go b/resource-manager/migrate/2020-07-07/hypervcluster/client.go index 1a16f784c31..cbd10c90542 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/client.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/client.go @@ -15,7 +15,7 @@ type HyperVClusterClient struct { } func NewHyperVClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervcluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervcluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVClusterClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/id_cluster.go b/resource-manager/migrate/2020-07-07/hypervcluster/id_cluster.go index e79c95649f6..8ef5eca1104 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/id_cluster.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervcluster/id_hypervsite.go index fc5f5ba50dc..6da1465fada 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/method_getallclustersinsite.go b/resource-manager/migrate/2020-07-07/hypervcluster/method_getallclustersinsite.go index d35f18067dc..1d987bda776 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/method_getallclustersinsite.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/method_getallclustersinsite.go @@ -39,6 +39,7 @@ func (o GetAllClustersInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllClustersInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/method_getcluster.go b/resource-manager/migrate/2020-07-07/hypervcluster/method_getcluster.go index 09014bf9aba..cc8bafa8a5c 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/method_getcluster.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/method_getcluster.go @@ -45,7 +45,6 @@ func (c HyperVClusterClient) GetCluster(ctx context.Context, id ClusterId) (resu var model HyperVCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervcluster/version.go b/resource-manager/migrate/2020-07-07/hypervcluster/version.go index 060c06170eb..71beca702af 100644 --- a/resource-manager/migrate/2020-07-07/hypervcluster/version.go +++ b/resource-manager/migrate/2020-07-07/hypervcluster/version.go @@ -1,12 +1,10 @@ package hypervcluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervcluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervcluster/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/README.md b/resource-manager/migrate/2020-07-07/hypervhost/README.md index 50f7e2e331c..9b20065956c 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/README.md +++ b/resource-manager/migrate/2020-07-07/hypervhost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervhost` Documentation -The `hypervhost` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervhost` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervhost/client.go b/resource-manager/migrate/2020-07-07/hypervhost/client.go index b61b3b34022..a5c253ed194 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/client.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/client.go @@ -15,7 +15,7 @@ type HyperVHostClient struct { } func NewHyperVHostClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVHostClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervhost", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervhost", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVHostClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/id_host.go b/resource-manager/migrate/2020-07-07/hypervhost/id_host.go index 7056ce5182a..b18f8883329 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/id_host.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/id_host.go @@ -44,7 +44,7 @@ func ParseHostID(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostIDInsensitively(input string) (*HostId, error) { } id := HostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervhost/id_hypervsite.go index a31fa7b0c75..ee9334ce328 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/method_getallhostsinsite.go b/resource-manager/migrate/2020-07-07/hypervhost/method_getallhostsinsite.go index a730ff97fff..28d03490384 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/method_getallhostsinsite.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/method_getallhostsinsite.go @@ -39,6 +39,7 @@ func (o GetAllHostsInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllHostsInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/method_gethost.go b/resource-manager/migrate/2020-07-07/hypervhost/method_gethost.go index 8e7e3a9edc8..3e561dde88b 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/method_gethost.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/method_gethost.go @@ -45,7 +45,6 @@ func (c HyperVHostClient) GetHost(ctx context.Context, id HostId) (result GetHos var model HyperVHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervhost/version.go b/resource-manager/migrate/2020-07-07/hypervhost/version.go index 10e9c70916d..9fde966926b 100644 --- a/resource-manager/migrate/2020-07-07/hypervhost/version.go +++ b/resource-manager/migrate/2020-07-07/hypervhost/version.go @@ -1,12 +1,10 @@ package hypervhost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervhost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervhost/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/hypervjobs/README.md b/resource-manager/migrate/2020-07-07/hypervjobs/README.md index bfc78a384e5..1b2986e7753 100644 --- a/resource-manager/migrate/2020-07-07/hypervjobs/README.md +++ b/resource-manager/migrate/2020-07-07/hypervjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervjobs` Documentation -The `hypervjobs` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervjobs` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervjobs/client.go b/resource-manager/migrate/2020-07-07/hypervjobs/client.go index 3b5f99115e5..0fffb188f7e 100644 --- a/resource-manager/migrate/2020-07-07/hypervjobs/client.go +++ b/resource-manager/migrate/2020-07-07/hypervjobs/client.go @@ -15,7 +15,7 @@ type HyperVJobsClient struct { } func NewHyperVJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVJobsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervjobs/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervjobs/id_hypervsite.go index 7cbe0a5f7de..8bc5e3baf0f 100644 --- a/resource-manager/migrate/2020-07-07/hypervjobs/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervjobs/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervjobs/method_getjob.go b/resource-manager/migrate/2020-07-07/hypervjobs/method_getjob.go index 52c1d8e9a3b..e758a282f9a 100644 --- a/resource-manager/migrate/2020-07-07/hypervjobs/method_getjob.go +++ b/resource-manager/migrate/2020-07-07/hypervjobs/method_getjob.go @@ -46,7 +46,6 @@ func (c HyperVJobsClient) GetJob(ctx context.Context, id commonids.HyperVSiteJob var model HyperVJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervjobs/version.go b/resource-manager/migrate/2020-07-07/hypervjobs/version.go index 5760e195ae8..ad31f259351 100644 --- a/resource-manager/migrate/2020-07-07/hypervjobs/version.go +++ b/resource-manager/migrate/2020-07-07/hypervjobs/version.go @@ -1,12 +1,10 @@ package hypervjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervjobs/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/README.md b/resource-manager/migrate/2020-07-07/hypervmachines/README.md index d8beec0d531..4ccadd00643 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/README.md +++ b/resource-manager/migrate/2020-07-07/hypervmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervmachines` Documentation -The `hypervmachines` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervmachines` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/client.go b/resource-manager/migrate/2020-07-07/hypervmachines/client.go index c3b8b7e308e..e5c263432e4 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/client.go +++ b/resource-manager/migrate/2020-07-07/hypervmachines/client.go @@ -15,7 +15,7 @@ type HyperVMachinesClient struct { } func NewHyperVMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVMachinesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervmachines/id_hypervsite.go index 6fa580a1f4b..3f2273d90d9 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervmachines/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/method_getallmachinesinsite.go b/resource-manager/migrate/2020-07-07/hypervmachines/method_getallmachinesinsite.go index 3395970ffdf..429a8452647 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/method_getallmachinesinsite.go +++ b/resource-manager/migrate/2020-07-07/hypervmachines/method_getallmachinesinsite.go @@ -42,6 +42,7 @@ func (o GetAllMachinesInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllMachinesInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/method_getmachine.go b/resource-manager/migrate/2020-07-07/hypervmachines/method_getmachine.go index 06fc97db9f1..010817ea819 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/method_getmachine.go +++ b/resource-manager/migrate/2020-07-07/hypervmachines/method_getmachine.go @@ -46,7 +46,6 @@ func (c HyperVMachinesClient) GetMachine(ctx context.Context, id commonids.Hyper var model HyperVMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervmachines/version.go b/resource-manager/migrate/2020-07-07/hypervmachines/version.go index dcae205835d..8f0700e424d 100644 --- a/resource-manager/migrate/2020-07-07/hypervmachines/version.go +++ b/resource-manager/migrate/2020-07-07/hypervmachines/version.go @@ -1,12 +1,10 @@ package hypervmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervmachines/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/README.md b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/README.md index d8dbf1d5a3a..3a756305fc2 100644 --- a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/README.md +++ b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervrunasaccounts` Documentation -The `hypervrunasaccounts` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervrunasaccounts` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/client.go b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/client.go index 8db6ce10a22..50a6afcc42a 100644 --- a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/client.go +++ b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/client.go @@ -15,7 +15,7 @@ type HyperVRunAsAccountsClient struct { } func NewHyperVRunAsAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVRunAsAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervrunasaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervrunasaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVRunAsAccountsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/id_hypervsite.go index cad0ca3b506..4ab5a87cbc1 100644 --- a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/method_getrunasaccount.go b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/method_getrunasaccount.go index 4768467253e..5dc7504c38a 100644 --- a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/method_getrunasaccount.go +++ b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/method_getrunasaccount.go @@ -46,7 +46,6 @@ func (c HyperVRunAsAccountsClient) GetRunAsAccount(ctx context.Context, id commo var model HyperVRunAsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/version.go b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/version.go index 67221faaf28..38ac87f71db 100644 --- a/resource-manager/migrate/2020-07-07/hypervrunasaccounts/version.go +++ b/resource-manager/migrate/2020-07-07/hypervrunasaccounts/version.go @@ -1,12 +1,10 @@ package hypervrunasaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervrunasaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervrunasaccounts/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/README.md b/resource-manager/migrate/2020-07-07/hypervsites/README.md index 3b9373bffac..c14971fe5ee 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/README.md +++ b/resource-manager/migrate/2020-07-07/hypervsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervsites` Documentation -The `hypervsites` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `hypervsites` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/hypervsites/client.go b/resource-manager/migrate/2020-07-07/hypervsites/client.go index 504361e6723..850f75398d3 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/client.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/client.go @@ -15,7 +15,7 @@ type HyperVSitesClient struct { } func NewHyperVSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hypervsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hypervsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HyperVSitesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/id_hypervsite.go b/resource-manager/migrate/2020-07-07/hypervsites/id_hypervsite.go index 26d7011dc96..a2aa2ab4df7 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/id_hypervsite.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/id_hypervsite.go @@ -42,7 +42,7 @@ func ParseHyperVSiteID(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error) { } id := HyperVSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/method_getsite.go b/resource-manager/migrate/2020-07-07/hypervsites/method_getsite.go index 75ebe339319..81b02c66bae 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/method_getsite.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/method_getsite.go @@ -45,7 +45,6 @@ func (c HyperVSitesClient) GetSite(ctx context.Context, id HyperVSiteId) (result var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/method_getsiteusage.go b/resource-manager/migrate/2020-07-07/hypervsites/method_getsiteusage.go index e0cbe47da0f..efd23efb0d8 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/method_getsiteusage.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/method_getsiteusage.go @@ -46,7 +46,6 @@ func (c HyperVSitesClient) GetSiteUsage(ctx context.Context, id HyperVSiteId) (r var model HyperVSiteUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/method_patchsite.go b/resource-manager/migrate/2020-07-07/hypervsites/method_patchsite.go index e88ac1bf20d..c258616a2a1 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/method_patchsite.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/method_patchsite.go @@ -50,7 +50,6 @@ func (c HyperVSitesClient) PatchSite(ctx context.Context, id HyperVSiteId, input var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/method_putsite.go b/resource-manager/migrate/2020-07-07/hypervsites/method_putsite.go index fbe4a9add58..188e0c32b39 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/method_putsite.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/method_putsite.go @@ -50,7 +50,6 @@ func (c HyperVSitesClient) PutSite(ctx context.Context, id HyperVSiteId, input H var model HyperVSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/hypervsites/version.go b/resource-manager/migrate/2020-07-07/hypervsites/version.go index 5bf1d201bc2..93ae33c51ed 100644 --- a/resource-manager/migrate/2020-07-07/hypervsites/version.go +++ b/resource-manager/migrate/2020-07-07/hypervsites/version.go @@ -1,12 +1,10 @@ package hypervsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hypervsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hypervsites/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/jobs/README.md b/resource-manager/migrate/2020-07-07/jobs/README.md index fe38789fa18..40a02a90e99 100644 --- a/resource-manager/migrate/2020-07-07/jobs/README.md +++ b/resource-manager/migrate/2020-07-07/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `jobs` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/jobs/client.go b/resource-manager/migrate/2020-07-07/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/migrate/2020-07-07/jobs/client.go +++ b/resource-manager/migrate/2020-07-07/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/jobs/id_vmwaresite.go b/resource-manager/migrate/2020-07-07/jobs/id_vmwaresite.go index 798379b3513..b0c39684a88 100644 --- a/resource-manager/migrate/2020-07-07/jobs/id_vmwaresite.go +++ b/resource-manager/migrate/2020-07-07/jobs/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/jobs/method_getjob.go b/resource-manager/migrate/2020-07-07/jobs/method_getjob.go index ff84cb775c4..75c4c6d3c78 100644 --- a/resource-manager/migrate/2020-07-07/jobs/method_getjob.go +++ b/resource-manager/migrate/2020-07-07/jobs/method_getjob.go @@ -46,7 +46,6 @@ func (c JobsClient) GetJob(ctx context.Context, id commonids.VMwareSiteJobId) (r var model VMwareJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/jobs/version.go b/resource-manager/migrate/2020-07-07/jobs/version.go index 26a9afd5b23..38c4a55d9c5 100644 --- a/resource-manager/migrate/2020-07-07/jobs/version.go +++ b/resource-manager/migrate/2020-07-07/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/machines/README.md b/resource-manager/migrate/2020-07-07/machines/README.md index f4903ed5715..87104db7117 100644 --- a/resource-manager/migrate/2020-07-07/machines/README.md +++ b/resource-manager/migrate/2020-07-07/machines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/machines` Documentation -The `machines` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `machines` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/machines/client.go b/resource-manager/migrate/2020-07-07/machines/client.go index e0daf908061..fcd8a61002f 100644 --- a/resource-manager/migrate/2020-07-07/machines/client.go +++ b/resource-manager/migrate/2020-07-07/machines/client.go @@ -15,7 +15,7 @@ type MachinesClient struct { } func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/machines/id_vmwaresite.go b/resource-manager/migrate/2020-07-07/machines/id_vmwaresite.go index 73de6cc1484..4d3fca40be2 100644 --- a/resource-manager/migrate/2020-07-07/machines/id_vmwaresite.go +++ b/resource-manager/migrate/2020-07-07/machines/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/machines/method_getallmachinesinsite.go b/resource-manager/migrate/2020-07-07/machines/method_getallmachinesinsite.go index 9a7e1d1b2f5..bf83c32e1c4 100644 --- a/resource-manager/migrate/2020-07-07/machines/method_getallmachinesinsite.go +++ b/resource-manager/migrate/2020-07-07/machines/method_getallmachinesinsite.go @@ -42,6 +42,7 @@ func (o GetAllMachinesInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllMachinesInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-07-07/machines/method_getmachine.go b/resource-manager/migrate/2020-07-07/machines/method_getmachine.go index 6711c170679..bd0cbda58cd 100644 --- a/resource-manager/migrate/2020-07-07/machines/method_getmachine.go +++ b/resource-manager/migrate/2020-07-07/machines/method_getmachine.go @@ -46,7 +46,6 @@ func (c MachinesClient) GetMachine(ctx context.Context, id commonids.VMwareSiteM var model VMwareMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/machines/version.go b/resource-manager/migrate/2020-07-07/machines/version.go index be7410aecf2..a081557ebac 100644 --- a/resource-manager/migrate/2020-07-07/machines/version.go +++ b/resource-manager/migrate/2020-07-07/machines/version.go @@ -1,12 +1,10 @@ package machines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machines/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/mastersites/README.md b/resource-manager/migrate/2020-07-07/mastersites/README.md index 3ed6ecbfa7a..7e4294f5ca3 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/README.md +++ b/resource-manager/migrate/2020-07-07/mastersites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/mastersites` Documentation -The `mastersites` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `mastersites` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/mastersites/client.go b/resource-manager/migrate/2020-07-07/mastersites/client.go index 58d0b85b0d4..5c0538446ac 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/client.go +++ b/resource-manager/migrate/2020-07-07/mastersites/client.go @@ -15,7 +15,7 @@ type MasterSitesClient struct { } func NewMasterSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*MasterSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mastersites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mastersites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MasterSitesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/mastersites/id_mastersite.go b/resource-manager/migrate/2020-07-07/mastersites/id_mastersite.go index c0a2145f59a..0626dcdf4ce 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/id_mastersite.go +++ b/resource-manager/migrate/2020-07-07/mastersites/id_mastersite.go @@ -42,7 +42,7 @@ func ParseMasterSiteID(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMasterSiteIDInsensitively(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/mastersites/method_getsite.go b/resource-manager/migrate/2020-07-07/mastersites/method_getsite.go index 371444d0fac..a3ca8cb45f7 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/method_getsite.go +++ b/resource-manager/migrate/2020-07-07/mastersites/method_getsite.go @@ -45,7 +45,6 @@ func (c MasterSitesClient) GetSite(ctx context.Context, id MasterSiteId) (result var model MasterSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/mastersites/method_patchsite.go b/resource-manager/migrate/2020-07-07/mastersites/method_patchsite.go index 6958104592c..225ba4d2238 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/method_patchsite.go +++ b/resource-manager/migrate/2020-07-07/mastersites/method_patchsite.go @@ -50,7 +50,6 @@ func (c MasterSitesClient) PatchSite(ctx context.Context, id MasterSiteId, input var model MasterSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/mastersites/version.go b/resource-manager/migrate/2020-07-07/mastersites/version.go index e88cafc1fd9..eacd36b5ce8 100644 --- a/resource-manager/migrate/2020-07-07/mastersites/version.go +++ b/resource-manager/migrate/2020-07-07/mastersites/version.go @@ -1,12 +1,10 @@ package mastersites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mastersites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mastersites/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/migrates/README.md b/resource-manager/migrate/2020-07-07/migrates/README.md index 070227ee95f..2f9193258ea 100644 --- a/resource-manager/migrate/2020-07-07/migrates/README.md +++ b/resource-manager/migrate/2020-07-07/migrates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/migrates` Documentation -The `migrates` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `migrates` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/migrates/client.go b/resource-manager/migrate/2020-07-07/migrates/client.go index 81594ed7941..caa6e4ceceb 100644 --- a/resource-manager/migrate/2020-07-07/migrates/client.go +++ b/resource-manager/migrate/2020-07-07/migrates/client.go @@ -15,7 +15,7 @@ type MigratesClient struct { } func NewMigratesClientWithBaseURI(sdkApi sdkEnv.Api) (*MigratesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigratesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/migrates/version.go b/resource-manager/migrate/2020-07-07/migrates/version.go index 6c43926a5c6..52a4cea74eb 100644 --- a/resource-manager/migrate/2020-07-07/migrates/version.go +++ b/resource-manager/migrate/2020-07-07/migrates/version.go @@ -1,12 +1,10 @@ package migrates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrates/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/README.md b/resource-manager/migrate/2020-07-07/privateendpointconnection/README.md index fa52fa0b137..f954a3ed573 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/README.md +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/client.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/client.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/id_mastersite.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/id_mastersite.go index adcd5c49658..77d2067d517 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/id_mastersite.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/id_mastersite.go @@ -42,7 +42,7 @@ func ParseMasterSiteID(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMasterSiteIDInsensitively(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/id_privateendpointconnection.go index 00df1296b29..7e3c87d436a 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/method_getprivateendpointconnection.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/method_getprivateendpointconnection.go index f62149fdbb3..80b8ab59c60 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/method_getprivateendpointconnection.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) GetPrivateEndpointConnection(ctx contex var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/method_putprivateendpointconnection.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/method_putprivateendpointconnection.go index ea559735c97..e8a60217b46 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/method_putprivateendpointconnection.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/method_putprivateendpointconnection.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionClient) PutPrivateEndpointConnection(ctx contex var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/privateendpointconnection/version.go b/resource-manager/migrate/2020-07-07/privateendpointconnection/version.go index e4dc4553a65..7ba236cacbc 100644 --- a/resource-manager/migrate/2020-07-07/privateendpointconnection/version.go +++ b/resource-manager/migrate/2020-07-07/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/README.md b/resource-manager/migrate/2020-07-07/privatelinkresources/README.md index 4cd0102b316..e63a879451b 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/README.md +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/client.go b/resource-manager/migrate/2020-07-07/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/client.go +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/id_mastersite.go b/resource-manager/migrate/2020-07-07/privatelinkresources/id_mastersite.go index d9bae0c48a6..468792ed1e1 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/id_mastersite.go +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/id_mastersite.go @@ -42,7 +42,7 @@ func ParseMasterSiteID(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMasterSiteIDInsensitively(input string) (*MasterSiteId, error) { } id := MasterSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/id_privatelinkresource.go b/resource-manager/migrate/2020-07-07/privatelinkresources/id_privatelinkresource.go index a88a3266654..25bad6a61bd 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/method_getprivatelinkresource.go b/resource-manager/migrate/2020-07-07/privatelinkresources/method_getprivatelinkresource.go index c3cc87a8646..5d4bc2b20c9 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/method_getprivatelinkresource.go +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/method_getprivatelinkresource.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) GetPrivateLinkResource(ctx context.Context, var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/privatelinkresources/version.go b/resource-manager/migrate/2020-07-07/privatelinkresources/version.go index e5ed857b5fb..7a1e251eb32 100644 --- a/resource-manager/migrate/2020-07-07/privatelinkresources/version.go +++ b/resource-manager/migrate/2020-07-07/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/runasaccounts/README.md b/resource-manager/migrate/2020-07-07/runasaccounts/README.md index b45e8a4ea9f..d3c2c995e2a 100644 --- a/resource-manager/migrate/2020-07-07/runasaccounts/README.md +++ b/resource-manager/migrate/2020-07-07/runasaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/runasaccounts` Documentation -The `runasaccounts` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `runasaccounts` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/runasaccounts/client.go b/resource-manager/migrate/2020-07-07/runasaccounts/client.go index eec6adbe66f..600755ddd80 100644 --- a/resource-manager/migrate/2020-07-07/runasaccounts/client.go +++ b/resource-manager/migrate/2020-07-07/runasaccounts/client.go @@ -15,7 +15,7 @@ type RunAsAccountsClient struct { } func NewRunAsAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*RunAsAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "runasaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "runasaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RunAsAccountsClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/runasaccounts/id_vmwaresite.go b/resource-manager/migrate/2020-07-07/runasaccounts/id_vmwaresite.go index 9b3844597d4..c9371c463ff 100644 --- a/resource-manager/migrate/2020-07-07/runasaccounts/id_vmwaresite.go +++ b/resource-manager/migrate/2020-07-07/runasaccounts/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/runasaccounts/method_getrunasaccount.go b/resource-manager/migrate/2020-07-07/runasaccounts/method_getrunasaccount.go index 25a8bea7509..9f46faa3ad1 100644 --- a/resource-manager/migrate/2020-07-07/runasaccounts/method_getrunasaccount.go +++ b/resource-manager/migrate/2020-07-07/runasaccounts/method_getrunasaccount.go @@ -46,7 +46,6 @@ func (c RunAsAccountsClient) GetRunAsAccount(ctx context.Context, id commonids.V var model VMwareRunAsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/runasaccounts/version.go b/resource-manager/migrate/2020-07-07/runasaccounts/version.go index e60865c5cd6..ab04ca3b4f1 100644 --- a/resource-manager/migrate/2020-07-07/runasaccounts/version.go +++ b/resource-manager/migrate/2020-07-07/runasaccounts/version.go @@ -1,12 +1,10 @@ package runasaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/runasaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/runasaccounts/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/sites/README.md b/resource-manager/migrate/2020-07-07/sites/README.md index 58b52a38d57..f0c8490bddd 100644 --- a/resource-manager/migrate/2020-07-07/sites/README.md +++ b/resource-manager/migrate/2020-07-07/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `sites` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/sites/client.go b/resource-manager/migrate/2020-07-07/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/migrate/2020-07-07/sites/client.go +++ b/resource-manager/migrate/2020-07-07/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/sites/id_vmwaresite.go b/resource-manager/migrate/2020-07-07/sites/id_vmwaresite.go index 0308a8f77ce..3acae99dda6 100644 --- a/resource-manager/migrate/2020-07-07/sites/id_vmwaresite.go +++ b/resource-manager/migrate/2020-07-07/sites/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/sites/method_getsite.go b/resource-manager/migrate/2020-07-07/sites/method_getsite.go index 9f07cbac909..e31677115d2 100644 --- a/resource-manager/migrate/2020-07-07/sites/method_getsite.go +++ b/resource-manager/migrate/2020-07-07/sites/method_getsite.go @@ -45,7 +45,6 @@ func (c SitesClient) GetSite(ctx context.Context, id VMwareSiteId) (result GetSi var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/sites/method_getsiteusage.go b/resource-manager/migrate/2020-07-07/sites/method_getsiteusage.go index 4a81e8136e1..24545c5f3d5 100644 --- a/resource-manager/migrate/2020-07-07/sites/method_getsiteusage.go +++ b/resource-manager/migrate/2020-07-07/sites/method_getsiteusage.go @@ -46,7 +46,6 @@ func (c SitesClient) GetSiteUsage(ctx context.Context, id VMwareSiteId) (result var model VMwareSiteUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/sites/method_patchsite.go b/resource-manager/migrate/2020-07-07/sites/method_patchsite.go index 5a7f9b242aa..3b0e33f0767 100644 --- a/resource-manager/migrate/2020-07-07/sites/method_patchsite.go +++ b/resource-manager/migrate/2020-07-07/sites/method_patchsite.go @@ -50,7 +50,6 @@ func (c SitesClient) PatchSite(ctx context.Context, id VMwareSiteId, input VMwar var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/sites/method_putsite.go b/resource-manager/migrate/2020-07-07/sites/method_putsite.go index 7f8a3e39743..82ad5759e09 100644 --- a/resource-manager/migrate/2020-07-07/sites/method_putsite.go +++ b/resource-manager/migrate/2020-07-07/sites/method_putsite.go @@ -50,7 +50,6 @@ func (c SitesClient) PutSite(ctx context.Context, id VMwareSiteId, input VMwareS var model VMwareSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/sites/version.go b/resource-manager/migrate/2020-07-07/sites/version.go index 2596a5e712e..e76b8805341 100644 --- a/resource-manager/migrate/2020-07-07/sites/version.go +++ b/resource-manager/migrate/2020-07-07/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2020-07-07" } diff --git a/resource-manager/migrate/2020-07-07/vcenter/README.md b/resource-manager/migrate/2020-07-07/vcenter/README.md index 72feea9fdfa..49e13b17b78 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/README.md +++ b/resource-manager/migrate/2020-07-07/vcenter/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/vcenter` Documentation -The `vcenter` SDK allows for interaction with the Azure Resource Manager Service `migrate` (API Version `2020-07-07`). +The `vcenter` SDK allows for interaction with Azure Resource Manager `migrate` (API Version `2020-07-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/migrate/2020-07-07/vcenter/client.go b/resource-manager/migrate/2020-07-07/vcenter/client.go index 8c63fa9885e..0e9c8a8bb10 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/client.go +++ b/resource-manager/migrate/2020-07-07/vcenter/client.go @@ -15,7 +15,7 @@ type VCenterClient struct { } func NewVCenterClientWithBaseURI(sdkApi sdkEnv.Api) (*VCenterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vcenter", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vcenter", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VCenterClient: %+v", err) } diff --git a/resource-manager/migrate/2020-07-07/vcenter/id_vcenter.go b/resource-manager/migrate/2020-07-07/vcenter/id_vcenter.go index 97388a609f3..39f4eebce32 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/id_vcenter.go +++ b/resource-manager/migrate/2020-07-07/vcenter/id_vcenter.go @@ -44,7 +44,7 @@ func ParseVCenterID(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVCenterIDInsensitively(input string) (*VCenterId, error) { } id := VCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/vcenter/id_vmwaresite.go b/resource-manager/migrate/2020-07-07/vcenter/id_vmwaresite.go index 04e924c90bc..b63e7872ef1 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/id_vmwaresite.go +++ b/resource-manager/migrate/2020-07-07/vcenter/id_vmwaresite.go @@ -42,7 +42,7 @@ func ParseVMwareSiteID(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error) { } id := VMwareSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/migrate/2020-07-07/vcenter/method_getallvcentersinsite.go b/resource-manager/migrate/2020-07-07/vcenter/method_getallvcentersinsite.go index 2cc0b37f6dc..eb20fa359c2 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/method_getallvcentersinsite.go +++ b/resource-manager/migrate/2020-07-07/vcenter/method_getallvcentersinsite.go @@ -39,6 +39,7 @@ func (o GetAllVCentersInSiteOperationOptions) ToHeaders() *client.Headers { func (o GetAllVCentersInSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/migrate/2020-07-07/vcenter/method_getvcenter.go b/resource-manager/migrate/2020-07-07/vcenter/method_getvcenter.go index 584afd0f378..cd60902a6d8 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/method_getvcenter.go +++ b/resource-manager/migrate/2020-07-07/vcenter/method_getvcenter.go @@ -45,7 +45,6 @@ func (c VCenterClient) GetVCenter(ctx context.Context, id VCenterId) (result Get var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/migrate/2020-07-07/vcenter/version.go b/resource-manager/migrate/2020-07-07/vcenter/version.go index 095152434c3..8cf9d5a50a8 100644 --- a/resource-manager/migrate/2020-07-07/vcenter/version.go +++ b/resource-manager/migrate/2020-07-07/vcenter/version.go @@ -1,12 +1,10 @@ package vcenter -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-07-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vcenter/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vcenter/2020-07-07" } diff --git a/resource-manager/mixedreality/2021-01-01/key/README.md b/resource-manager/mixedreality/2021-01-01/key/README.md index 2d84a63556c..e9b9208c015 100644 --- a/resource-manager/mixedreality/2021-01-01/key/README.md +++ b/resource-manager/mixedreality/2021-01-01/key/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/key` Documentation -The `key` SDK allows for interaction with the Azure Resource Manager Service `mixedreality` (API Version `2021-01-01`). +The `key` SDK allows for interaction with Azure Resource Manager `mixedreality` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mixedreality/2021-01-01/key/client.go b/resource-manager/mixedreality/2021-01-01/key/client.go index 311b0370f04..3c29cfe2291 100644 --- a/resource-manager/mixedreality/2021-01-01/key/client.go +++ b/resource-manager/mixedreality/2021-01-01/key/client.go @@ -15,7 +15,7 @@ type KeyClient struct { } func NewKeyClientWithBaseURI(sdkApi sdkEnv.Api) (*KeyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "key", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "key", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KeyClient: %+v", err) } diff --git a/resource-manager/mixedreality/2021-01-01/key/id_remoterenderingaccount.go b/resource-manager/mixedreality/2021-01-01/key/id_remoterenderingaccount.go index 4d2b0cd86cb..90e69523b78 100644 --- a/resource-manager/mixedreality/2021-01-01/key/id_remoterenderingaccount.go +++ b/resource-manager/mixedreality/2021-01-01/key/id_remoterenderingaccount.go @@ -42,7 +42,7 @@ func ParseRemoteRenderingAccountID(input string) (*RemoteRenderingAccountId, err } id := RemoteRenderingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRemoteRenderingAccountIDInsensitively(input string) (*RemoteRenderingA } id := RemoteRenderingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mixedreality/2021-01-01/key/id_spatialanchorsaccount.go b/resource-manager/mixedreality/2021-01-01/key/id_spatialanchorsaccount.go index 730a33659e6..25871a93a7e 100644 --- a/resource-manager/mixedreality/2021-01-01/key/id_spatialanchorsaccount.go +++ b/resource-manager/mixedreality/2021-01-01/key/id_spatialanchorsaccount.go @@ -42,7 +42,7 @@ func ParseSpatialAnchorsAccountID(input string) (*SpatialAnchorsAccountId, error } id := SpatialAnchorsAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSpatialAnchorsAccountIDInsensitively(input string) (*SpatialAnchorsAcc } id := SpatialAnchorsAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountslistkeys.go b/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountslistkeys.go index 78bf4f6c31a..6fc308963e4 100644 --- a/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountslistkeys.go +++ b/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountslistkeys.go @@ -46,7 +46,6 @@ func (c KeyClient) RemoteRenderingAccountsListKeys(ctx context.Context, id Remot var model AccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountsregeneratekeys.go b/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountsregeneratekeys.go index 85e2a639e3e..f8d284d7099 100644 --- a/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountsregeneratekeys.go +++ b/resource-manager/mixedreality/2021-01-01/key/method_remoterenderingaccountsregeneratekeys.go @@ -50,7 +50,6 @@ func (c KeyClient) RemoteRenderingAccountsRegenerateKeys(ctx context.Context, id var model AccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountslistkeys.go b/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountslistkeys.go index 8c12d504056..d2b8f314e86 100644 --- a/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountslistkeys.go +++ b/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountslistkeys.go @@ -46,7 +46,6 @@ func (c KeyClient) SpatialAnchorsAccountsListKeys(ctx context.Context, id Spatia var model AccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountsregeneratekeys.go b/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountsregeneratekeys.go index 4955f187649..31c50d6bc6d 100644 --- a/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountsregeneratekeys.go +++ b/resource-manager/mixedreality/2021-01-01/key/method_spatialanchorsaccountsregeneratekeys.go @@ -50,7 +50,6 @@ func (c KeyClient) SpatialAnchorsAccountsRegenerateKeys(ctx context.Context, id var model AccountKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/key/version.go b/resource-manager/mixedreality/2021-01-01/key/version.go index a7abacd5d34..438e389451b 100644 --- a/resource-manager/mixedreality/2021-01-01/key/version.go +++ b/resource-manager/mixedreality/2021-01-01/key/version.go @@ -1,12 +1,10 @@ package key -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/key/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/key/2021-01-01" } diff --git a/resource-manager/mixedreality/2021-01-01/proxy/README.md b/resource-manager/mixedreality/2021-01-01/proxy/README.md index d0a569e6b7e..476fecd4e18 100644 --- a/resource-manager/mixedreality/2021-01-01/proxy/README.md +++ b/resource-manager/mixedreality/2021-01-01/proxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/proxy` Documentation -The `proxy` SDK allows for interaction with the Azure Resource Manager Service `mixedreality` (API Version `2021-01-01`). +The `proxy` SDK allows for interaction with Azure Resource Manager `mixedreality` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mixedreality/2021-01-01/proxy/client.go b/resource-manager/mixedreality/2021-01-01/proxy/client.go index 2d45a72ba89..daaef6e0be4 100644 --- a/resource-manager/mixedreality/2021-01-01/proxy/client.go +++ b/resource-manager/mixedreality/2021-01-01/proxy/client.go @@ -15,7 +15,7 @@ type ProxyClient struct { } func NewProxyClientWithBaseURI(sdkApi sdkEnv.Api) (*ProxyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "proxy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "proxy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProxyClient: %+v", err) } diff --git a/resource-manager/mixedreality/2021-01-01/proxy/id_location.go b/resource-manager/mixedreality/2021-01-01/proxy/id_location.go index 275fce066f8..4173e51264e 100644 --- a/resource-manager/mixedreality/2021-01-01/proxy/id_location.go +++ b/resource-manager/mixedreality/2021-01-01/proxy/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mixedreality/2021-01-01/proxy/method_checknameavailabilitylocal.go b/resource-manager/mixedreality/2021-01-01/proxy/method_checknameavailabilitylocal.go index ac5acdce77a..6b96e01a34e 100644 --- a/resource-manager/mixedreality/2021-01-01/proxy/method_checknameavailabilitylocal.go +++ b/resource-manager/mixedreality/2021-01-01/proxy/method_checknameavailabilitylocal.go @@ -50,7 +50,6 @@ func (c ProxyClient) CheckNameAvailabilityLocal(ctx context.Context, id Location var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/proxy/version.go b/resource-manager/mixedreality/2021-01-01/proxy/version.go index 509ffcf8c08..27eb969d9a3 100644 --- a/resource-manager/mixedreality/2021-01-01/proxy/version.go +++ b/resource-manager/mixedreality/2021-01-01/proxy/version.go @@ -1,12 +1,10 @@ package proxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/proxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/proxy/2021-01-01" } diff --git a/resource-manager/mixedreality/2021-01-01/resource/README.md b/resource-manager/mixedreality/2021-01-01/resource/README.md index 86502be1a87..214a6d6654b 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/README.md +++ b/resource-manager/mixedreality/2021-01-01/resource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mixedreality/2021-01-01/resource` Documentation -The `resource` SDK allows for interaction with the Azure Resource Manager Service `mixedreality` (API Version `2021-01-01`). +The `resource` SDK allows for interaction with Azure Resource Manager `mixedreality` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mixedreality/2021-01-01/resource/client.go b/resource-manager/mixedreality/2021-01-01/resource/client.go index 9e33b0443e6..672e189b06e 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/client.go +++ b/resource-manager/mixedreality/2021-01-01/resource/client.go @@ -15,7 +15,7 @@ type ResourceClient struct { } func NewResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceClient: %+v", err) } diff --git a/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go b/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go index ebf0d496a1b..7ecc8b4825a 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go +++ b/resource-manager/mixedreality/2021-01-01/resource/id_remoterenderingaccount.go @@ -42,7 +42,7 @@ func ParseRemoteRenderingAccountID(input string) (*RemoteRenderingAccountId, err } id := RemoteRenderingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRemoteRenderingAccountIDInsensitively(input string) (*RemoteRenderingA } id := RemoteRenderingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go b/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go index 8216301b448..91889bb1620 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go +++ b/resource-manager/mixedreality/2021-01-01/resource/id_spatialanchorsaccount.go @@ -42,7 +42,7 @@ func ParseSpatialAnchorsAccountID(input string) (*SpatialAnchorsAccountId, error } id := SpatialAnchorsAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSpatialAnchorsAccountIDInsensitively(input string) (*SpatialAnchorsAcc } id := SpatialAnchorsAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate.go b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate.go index 0898f1e57ea..570a9c1a924 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountscreate.go @@ -50,7 +50,6 @@ func (c ResourceClient) RemoteRenderingAccountsCreate(ctx context.Context, id Re var model RemoteRenderingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget.go b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget.go index 1a3b7dc6213..d60c553dd77 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsget.go @@ -45,7 +45,6 @@ func (c ResourceClient) RemoteRenderingAccountsGet(ctx context.Context, id Remot var model RemoteRenderingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate.go b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate.go index 36e816173d3..a690cc24266 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_remoterenderingaccountsupdate.go @@ -49,7 +49,6 @@ func (c ResourceClient) RemoteRenderingAccountsUpdate(ctx context.Context, id Re var model RemoteRenderingAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate.go b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate.go index 2785038534d..cef260075fa 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountscreate.go @@ -50,7 +50,6 @@ func (c ResourceClient) SpatialAnchorsAccountsCreate(ctx context.Context, id Spa var model SpatialAnchorsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget.go b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget.go index b7a5c8cecea..8c5b5c7d19d 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsget.go @@ -45,7 +45,6 @@ func (c ResourceClient) SpatialAnchorsAccountsGet(ctx context.Context, id Spatia var model SpatialAnchorsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate.go b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate.go index f966bca8418..e470cb48f54 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate.go +++ b/resource-manager/mixedreality/2021-01-01/resource/method_spatialanchorsaccountsupdate.go @@ -49,7 +49,6 @@ func (c ResourceClient) SpatialAnchorsAccountsUpdate(ctx context.Context, id Spa var model SpatialAnchorsAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mixedreality/2021-01-01/resource/version.go b/resource-manager/mixedreality/2021-01-01/resource/version.go index 3c60521cec7..824746a39fa 100644 --- a/resource-manager/mixedreality/2021-01-01/resource/version.go +++ b/resource-manager/mixedreality/2021-01-01/resource/version.go @@ -1,12 +1,10 @@ package resource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resource/2021-01-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/README.md b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/README.md index bef315a0569..35b1285e26f 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork` Documentation -The `attacheddatanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `attacheddatanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/client.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/client.go index 19812ddb299..a22c714a41a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworkClient struct { } func NewAttachedDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go index e56bbcceb35..f7592473c55 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -46,7 +46,7 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_get.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_get.go index 0ddf3e539dd..9d4a55cf001 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDataNetworkClient) Get(ctx context.Context, id AttachedDataNetwo var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_updatetags.go index 61cfb29e437..647628bf2f1 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c AttachedDataNetworkClient) UpdateTags(ctx context.Context, id AttachedDa var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/version.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/version.go index c90c7d92ad7..40042d615e5 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetwork/version.go @@ -1,12 +1,10 @@ package attacheddatanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetwork/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/README.md b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/README.md index a2843baf109..ea4955292c3 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks` Documentation -The `attacheddatanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `attacheddatanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/client.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/client.go index 27de18519a5..7d81e5c51dc 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworksClient struct { } func NewAttachedDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/id_packetcoredataplane.go index fa40b062a0e..72da1dc4d87 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/version.go b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/version.go index 980dad5caa2..50e259716ac 100644 --- a/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/attacheddatanetworks/version.go @@ -1,12 +1,10 @@ package attacheddatanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetworks/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/README.md b/resource-manager/mobilenetwork/2022-11-01/datanetwork/README.md index 2dd120bcb39..b37f279b273 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork` Documentation -The `datanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `datanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/client.go b/resource-manager/mobilenetwork/2022-11-01/datanetwork/client.go index 24738bf5e57..4f00bc2f0ba 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/client.go @@ -15,7 +15,7 @@ type DataNetworkClient struct { } func NewDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go b/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go index 0584ffc18be..45cf21c05fb 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/id_datanetwork.go @@ -44,7 +44,7 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_get.go b/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_get.go index 54ae2abcc3b..88693d49fd3 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_get.go @@ -45,7 +45,6 @@ func (c DataNetworkClient) Get(ctx context.Context, id DataNetworkId) (result Ge var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_updatetags.go index dff4c238fc8..f7ea3207970 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c DataNetworkClient) UpdateTags(ctx context.Context, id DataNetworkId, inp var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetwork/version.go b/resource-manager/mobilenetwork/2022-11-01/datanetwork/version.go index abf5d450387..333e0987dc5 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetwork/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetwork/version.go @@ -1,12 +1,10 @@ package datanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetwork/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetworks/README.md b/resource-manager/mobilenetwork/2022-11-01/datanetworks/README.md index a4ce70e6c79..4f5e23b13b9 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetworks/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/datanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetworks` Documentation -The `datanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `datanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetworks/client.go b/resource-manager/mobilenetwork/2022-11-01/datanetworks/client.go index a3e1366086d..3d1fcef1303 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetworks/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetworks/client.go @@ -15,7 +15,7 @@ type DataNetworksClient struct { } func NewDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/datanetworks/id_mobilenetwork.go index 14777643b61..5b44e7946ad 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/datanetworks/version.go b/resource-manager/mobilenetwork/2022-11-01/datanetworks/version.go index b2b36956b63..10acccbf831 100644 --- a/resource-manager/mobilenetwork/2022-11-01/datanetworks/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/datanetworks/version.go @@ -1,12 +1,10 @@ package datanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetworks/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/README.md b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/README.md index 1f275c38d07..02c901151e2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork` Documentation -The `mobilenetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `mobilenetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/client.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/client.go index f88a782b68d..98a2a62ba91 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/client.go @@ -15,7 +15,7 @@ type MobileNetworkClient struct { } func NewMobileNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go index 20e7a777239..5219ea96bea 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_get.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_get.go index b79e2d38c14..fd4563e7a5c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_get.go @@ -45,7 +45,6 @@ func (c MobileNetworkClient) Get(ctx context.Context, id MobileNetworkId) (resul var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_updatetags.go index 08a3b066d56..d30e5347175 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c MobileNetworkClient) UpdateTags(ctx context.Context, id MobileNetworkId, var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/version.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/version.go index 3908c584409..1eabd090b2c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetwork/version.go @@ -1,12 +1,10 @@ package mobilenetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetwork/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/README.md b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/README.md index fca22baff93..c142dde5987 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetworks` Documentation -The `mobilenetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `mobilenetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/client.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/client.go index 699210d14c3..3bc7c11a2a4 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/client.go @@ -15,7 +15,7 @@ type MobileNetworksClient struct { } func NewMobileNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/version.go b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/version.go index 1da8b264752..e21fa35ac50 100644 --- a/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/mobilenetworks/version.go @@ -1,12 +1,10 @@ package mobilenetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetworks/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/README.md index 34afedc81ad..40d7e4c3510 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane` Documentation -The `packetcorecontrolplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/client.go index 351920cd18e..9bd5d5e54b2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneClient struct { } func NewPacketCoreControlPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 17beafd27d8..d92d6b2a762 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_get.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_get.go index 924161ba22f..a438ec92444 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneClient) Get(ctx context.Context, id PacketCoreCont var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_updatetags.go index 794e4221c0f..161e70f3f5e 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreControlPlaneClient) UpdateTags(ctx context.Context, id PacketC var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/version.go index ef8b06defde..51dfd16057f 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplane/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplane/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/README.md index 7308343792b..b3d07a15c9c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage` Documentation -The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/client.go index d4f71ea2b81..532de4377bb 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneCollectDiagnosticsPackageClient struct { } func NewPacketCoreControlPlaneCollectDiagnosticsPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneCollectDiagnosticsPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneCollectDiagnosticsPackageClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go index 8d3d80dd4c7..2dba74cc18d 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/version.go index 5fb7e24f8e0..e55b626544a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanecollectdiagnosticspackage/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanecollectdiagnosticspackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/README.md index 9f9d808daf1..5075688f914 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall` Documentation -The `packetcorecontrolplanereinstall` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplanereinstall` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/client.go index be193471bf0..32cce04f6a0 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneReinstallClient struct { } func NewPacketCoreControlPlaneReinstallClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneReinstallClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneReinstallClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go index f8c20476681..09da463fc62 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/version.go index 1878578ab26..b6882ba18de 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanereinstall/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanereinstall -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/README.md index 96a2fa30c74..bcf3008b36a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback` Documentation -The `packetcorecontrolplanerollback` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplanerollback` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/client.go index 5535806d33e..b2ddaa43651 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneRollbackClient struct { } func NewPacketCoreControlPlaneRollbackClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneRollbackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneRollbackClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go index 9704b0e3cd4..0cb5e961e07 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/version.go index 036b740e965..95e65a5688e 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanerollback/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanerollback -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanerollback/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanerollback/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/README.md index fa0398526f4..b115c8bde4f 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes` Documentation -The `packetcorecontrolplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/client.go index c622dd3046c..0e8be1ffa17 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlanesClient struct { } func NewPacketCoreControlPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/version.go index 83071f1f091..46b61977acc 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplanes/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanes/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/README.md index 1a7b61826d9..8f96fcee816 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion` Documentation -The `packetcorecontrolplaneversion` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcorecontrolplaneversion` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/client.go index 8467e64af60..ad620a0b4aa 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneVersionClient struct { } func NewPacketCoreControlPlaneVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneVersionClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go index 3b635613407..5dc157f5bc3 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go @@ -38,7 +38,7 @@ func ParsePacketCoreControlPlaneVersionID(input string) (*PacketCoreControlPlane } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePacketCoreControlPlaneVersionIDInsensitively(input string) (*PacketCor } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/method_get.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/method_get.go index 86ea0a903b5..53680407e0e 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) Get(ctx context.Context, id PacketC var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/version.go index d0bdd4f802c..f7c4f767f9c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcorecontrolplaneversion/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplaneversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplaneversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplaneversion/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/README.md index 8c64e46a8e9..949e3020a38 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane` Documentation -The `packetcoredataplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcoredataplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/client.go index dc550d86f7a..d4703ae7e6c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlaneClient struct { } func NewPacketCoreDataPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go index 719ad90ad50..2970349814b 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_get.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_get.go index 6557c7e767d..b4b4fd385b2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreDataPlaneClient) Get(ctx context.Context, id PacketCoreDataPla var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_updatetags.go index 0f4fe0d633b..81b29718659 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreDataPlaneClient) UpdateTags(ctx context.Context, id PacketCore var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/version.go index 999484fedda..ecd597d9a1c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplane/version.go @@ -1,12 +1,10 @@ package packetcoredataplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplane/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/README.md b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/README.md index 73054ac00df..fc61df5b776 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes` Documentation -The `packetcoredataplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `packetcoredataplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/client.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/client.go index 94e7e7d1d1b..83e592850fa 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlanesClient struct { } func NewPacketCoreDataPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/id_packetcorecontrolplane.go index 5d027d57473..6d26b9e37ad 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/version.go b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/version.go index dd15483bb08..7a691c68167 100644 --- a/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/packetcoredataplanes/version.go @@ -1,12 +1,10 @@ package packetcoredataplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplanes/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/service/README.md b/resource-manager/mobilenetwork/2022-11-01/service/README.md index de4a2e78c17..7c5b28397c2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `service` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/service/client.go b/resource-manager/mobilenetwork/2022-11-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/service/id_service.go b/resource-manager/mobilenetwork/2022-11-01/service/id_service.go index cd77155d153..5e47bdaa485 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/id_service.go +++ b/resource-manager/mobilenetwork/2022-11-01/service/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/service/method_get.go b/resource-manager/mobilenetwork/2022-11-01/service/method_get.go index aa0841483b1..4bbd23711f8 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/service/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/service/method_updatetags.go index 919c2c845df..ea1ba2b6c18 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/service/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceClient) UpdateTags(ctx context.Context, id ServiceId, input TagsO var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/service/version.go b/resource-manager/mobilenetwork/2022-11-01/service/version.go index eab1ed2588f..d8a7ee36f5a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/service/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/services/README.md b/resource-manager/mobilenetwork/2022-11-01/services/README.md index 5d698d78d93..4c6e8578265 100644 --- a/resource-manager/mobilenetwork/2022-11-01/services/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `services` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/services/client.go b/resource-manager/mobilenetwork/2022-11-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/mobilenetwork/2022-11-01/services/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/services/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/services/id_mobilenetwork.go index aaa57c61499..8d716181fbd 100644 --- a/resource-manager/mobilenetwork/2022-11-01/services/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/services/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/services/version.go b/resource-manager/mobilenetwork/2022-11-01/services/version.go index d07d61af0db..2c97eb7397b 100644 --- a/resource-manager/mobilenetwork/2022-11-01/services/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/sim/README.md b/resource-manager/mobilenetwork/2022-11-01/sim/README.md index 2f041edeee0..1129688bf51 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sim/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/sim/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sim` Documentation -The `sim` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `sim` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/sim/client.go b/resource-manager/mobilenetwork/2022-11-01/sim/client.go index 8a43d650628..457692ff979 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sim/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/sim/client.go @@ -15,7 +15,7 @@ type SIMClient struct { } func NewSIMClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sim", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sim", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go b/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go index 4fb50ab65ce..5cd81cd9d0e 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go +++ b/resource-manager/mobilenetwork/2022-11-01/sim/id_sim.go @@ -44,7 +44,7 @@ func ParseSimID(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/sim/method_get.go b/resource-manager/mobilenetwork/2022-11-01/sim/method_get.go index 6b99fbc6db7..3855c3d0263 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sim/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/sim/method_get.go @@ -45,7 +45,6 @@ func (c SIMClient) Get(ctx context.Context, id SimId) (result GetOperationRespon var model Sim result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/sim/version.go b/resource-manager/mobilenetwork/2022-11-01/sim/version.go index 01dadd15fbe..5676de6ce63 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sim/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/sim/version.go @@ -1,12 +1,10 @@ package sim -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sim/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sim/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/README.md b/resource-manager/mobilenetwork/2022-11-01/simgroup/README.md index b471b0e9a6c..6b4d3718b9c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup` Documentation -The `simgroup` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `simgroup` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/client.go b/resource-manager/mobilenetwork/2022-11-01/simgroup/client.go index 246564366ab..336b11646d5 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/client.go @@ -15,7 +15,7 @@ type SIMGroupClient struct { } func NewSIMGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go b/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go index 9da4886e888..d382c0ee97c 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/method_get.go b/resource-manager/mobilenetwork/2022-11-01/simgroup/method_get.go index 6ea6342dc94..f9a5b7170a7 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/method_get.go @@ -45,7 +45,6 @@ func (c SIMGroupClient) Get(ctx context.Context, id SimGroupId) (result GetOpera var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/simgroup/method_updatetags.go index 9694a05dfc9..196612911a1 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/method_updatetags.go @@ -49,7 +49,6 @@ func (c SIMGroupClient) UpdateTags(ctx context.Context, id SimGroupId, input Tag var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroup/version.go b/resource-manager/mobilenetwork/2022-11-01/simgroup/version.go index 7ea12388d3a..e5aec838f75 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroup/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroup/version.go @@ -1,12 +1,10 @@ package simgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroup/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroups/README.md b/resource-manager/mobilenetwork/2022-11-01/simgroups/README.md index 021468784bc..8b90278bfcf 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroups/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/simgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroups` Documentation -The `simgroups` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `simgroups` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroups/client.go b/resource-manager/mobilenetwork/2022-11-01/simgroups/client.go index 3bbaf2d36ff..23c53aad636 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroups/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroups/client.go @@ -15,7 +15,7 @@ type SIMGroupsClient struct { } func NewSIMGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/simgroups/version.go b/resource-manager/mobilenetwork/2022-11-01/simgroups/version.go index 79f50f44d03..e425ac04991 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simgroups/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/simgroups/version.go @@ -1,12 +1,10 @@ package simgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroups/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicies/README.md b/resource-manager/mobilenetwork/2022-11-01/simpolicies/README.md index 074301dd875..94ead3c168d 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicies/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicies` Documentation -The `simpolicies` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `simpolicies` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicies/client.go b/resource-manager/mobilenetwork/2022-11-01/simpolicies/client.go index 44d15eac3ad..2e42bbf7665 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicies/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicies/client.go @@ -15,7 +15,7 @@ type SIMPoliciesClient struct { } func NewSIMPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPoliciesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicies/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/simpolicies/id_mobilenetwork.go index 9c9024dc846..1ac55d2c654 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicies/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicies/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicies/version.go b/resource-manager/mobilenetwork/2022-11-01/simpolicies/version.go index fcb21e90324..0a387c2e8a5 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicies/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicies/version.go @@ -1,12 +1,10 @@ package simpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicies/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/README.md b/resource-manager/mobilenetwork/2022-11-01/simpolicy/README.md index 4dd91eee79f..cae141266ec 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simpolicy` Documentation -The `simpolicy` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `simpolicy` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/client.go b/resource-manager/mobilenetwork/2022-11-01/simpolicy/client.go index b6a8741ef88..4ce44ec7ed6 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/client.go @@ -15,7 +15,7 @@ type SIMPolicyClient struct { } func NewSIMPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPolicyClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go b/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go index ffd989be75a..d9d5a34a027 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/id_simpolicy.go @@ -44,7 +44,7 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesget.go b/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesget.go index e4dcc89e2df..327e2ad7e67 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesget.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesget.go @@ -45,7 +45,6 @@ func (c SIMPolicyClient) SimPoliciesGet(ctx context.Context, id SimPolicyId) (re var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesupdatetags.go b/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesupdatetags.go index dd132c078aa..83f0a073a4a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesupdatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/method_simpoliciesupdatetags.go @@ -49,7 +49,6 @@ func (c SIMPolicyClient) SimPoliciesUpdateTags(ctx context.Context, id SimPolicy var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/simpolicy/version.go b/resource-manager/mobilenetwork/2022-11-01/simpolicy/version.go index 58f7f1c142b..4979be74a32 100644 --- a/resource-manager/mobilenetwork/2022-11-01/simpolicy/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/simpolicy/version.go @@ -1,12 +1,10 @@ package simpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicy/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/sims/README.md b/resource-manager/mobilenetwork/2022-11-01/sims/README.md index b21d3bddfd9..4634d3e0f57 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sims/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/sims/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sims` Documentation -The `sims` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `sims` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/sims/client.go b/resource-manager/mobilenetwork/2022-11-01/sims/client.go index e74a1379d26..da97ae5e79f 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sims/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/sims/client.go @@ -15,7 +15,7 @@ type SIMsClient struct { } func NewSIMsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sims", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sims", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/sims/id_simgroup.go b/resource-manager/mobilenetwork/2022-11-01/sims/id_simgroup.go index b76d96d5cfb..2c21f8a2c1a 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sims/id_simgroup.go +++ b/resource-manager/mobilenetwork/2022-11-01/sims/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/sims/version.go b/resource-manager/mobilenetwork/2022-11-01/sims/version.go index 3c65e5a365d..dea68ac7bc6 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sims/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/sims/version.go @@ -1,12 +1,10 @@ package sims -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sims/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sims/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/site/README.md b/resource-manager/mobilenetwork/2022-11-01/site/README.md index de495b51037..7b6067fdd88 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/site/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site` Documentation -The `site` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/site/client.go b/resource-manager/mobilenetwork/2022-11-01/site/client.go index 9cd860565b2..bab4d23cff8 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/site/client.go @@ -15,7 +15,7 @@ type SiteClient struct { } func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "site", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SiteClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/site/id_site.go b/resource-manager/mobilenetwork/2022-11-01/site/id_site.go index 9eddac47c82..8760d021672 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/id_site.go +++ b/resource-manager/mobilenetwork/2022-11-01/site/id_site.go @@ -44,7 +44,7 @@ func ParseSiteID(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/site/method_get.go b/resource-manager/mobilenetwork/2022-11-01/site/method_get.go index d4bac52e0fa..f6b55484e63 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/site/method_get.go @@ -45,7 +45,6 @@ func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go index 995a94bf857..d6fc0f56612 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/site/method_updatetags.go @@ -49,7 +49,6 @@ func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/site/version.go b/resource-manager/mobilenetwork/2022-11-01/site/version.go index e0176d59f87..1e248ebd2d2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/site/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/site/version.go @@ -1,12 +1,10 @@ package site -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/site/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/site/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/sites/README.md b/resource-manager/mobilenetwork/2022-11-01/sites/README.md index ecffc4ba686..e4e7889b1e6 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sites/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/sites/client.go b/resource-manager/mobilenetwork/2022-11-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sites/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/sites/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/sites/id_mobilenetwork.go index c8015f27277..a7b557bc58f 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sites/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/sites/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/sites/version.go b/resource-manager/mobilenetwork/2022-11-01/sites/version.go index 2950ccf68f0..f9d68ac348d 100644 --- a/resource-manager/mobilenetwork/2022-11-01/sites/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/README.md b/resource-manager/mobilenetwork/2022-11-01/slice/README.md index d90754b37bd..322755daeba 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/slice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice` Documentation -The `slice` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `slice` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/client.go b/resource-manager/mobilenetwork/2022-11-01/slice/client.go index 554bd7acc02..7556daa518d 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/slice/client.go @@ -15,7 +15,7 @@ type SliceClient struct { } func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SliceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go b/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go index 735c1e9f3ed..b0644547e67 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go +++ b/resource-manager/mobilenetwork/2022-11-01/slice/id_slice.go @@ -44,7 +44,7 @@ func ParseSliceID(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/method_get.go b/resource-manager/mobilenetwork/2022-11-01/slice/method_get.go index 0b43d2deb19..9a67c294cdd 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/method_get.go +++ b/resource-manager/mobilenetwork/2022-11-01/slice/method_get.go @@ -45,7 +45,6 @@ func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationRe var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/method_updatetags.go b/resource-manager/mobilenetwork/2022-11-01/slice/method_updatetags.go index faa019844ae..8f1fd42c3d6 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/method_updatetags.go +++ b/resource-manager/mobilenetwork/2022-11-01/slice/method_updatetags.go @@ -49,7 +49,6 @@ func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObjec var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2022-11-01/slice/version.go b/resource-manager/mobilenetwork/2022-11-01/slice/version.go index 0c450fcd1ef..3ded8c25013 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slice/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/slice/version.go @@ -1,12 +1,10 @@ package slice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slice/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2022-11-01/slices/README.md b/resource-manager/mobilenetwork/2022-11-01/slices/README.md index 508a3e97f08..c055a0e9fb2 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slices/README.md +++ b/resource-manager/mobilenetwork/2022-11-01/slices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slices` Documentation -The `slices` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2022-11-01`). +The `slices` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2022-11-01/slices/client.go b/resource-manager/mobilenetwork/2022-11-01/slices/client.go index 1f866fe2398..170a5cd0ab5 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slices/client.go +++ b/resource-manager/mobilenetwork/2022-11-01/slices/client.go @@ -15,7 +15,7 @@ type SlicesClient struct { } func NewSlicesClientWithBaseURI(sdkApi sdkEnv.Api) (*SlicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SlicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2022-11-01/slices/id_mobilenetwork.go b/resource-manager/mobilenetwork/2022-11-01/slices/id_mobilenetwork.go index d1c5c1d405b..d866b2a8cd1 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slices/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2022-11-01/slices/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2022-11-01/slices/version.go b/resource-manager/mobilenetwork/2022-11-01/slices/version.go index e0cfed54701..f53da8b42b6 100644 --- a/resource-manager/mobilenetwork/2022-11-01/slices/version.go +++ b/resource-manager/mobilenetwork/2022-11-01/slices/version.go @@ -1,12 +1,10 @@ package slices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slices/2022-11-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/README.md b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/README.md index e09f8a05ffb..7f07451ddf9 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork` Documentation -The `attacheddatanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `attacheddatanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/client.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/client.go index 19812ddb299..a22c714a41a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworkClient struct { } func NewAttachedDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/id_attacheddatanetwork.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/id_attacheddatanetwork.go index e56bbcceb35..f7592473c55 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -46,7 +46,7 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_get.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_get.go index 0ddf3e539dd..9d4a55cf001 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDataNetworkClient) Get(ctx context.Context, id AttachedDataNetwo var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_updatetags.go index 61cfb29e437..647628bf2f1 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c AttachedDataNetworkClient) UpdateTags(ctx context.Context, id AttachedDa var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/version.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/version.go index a1b29e374e3..cede8ec8d3f 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetwork/version.go @@ -1,12 +1,10 @@ package attacheddatanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetwork/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/README.md b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/README.md index 5676365ad10..1ba6b1a7bda 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks` Documentation -The `attacheddatanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `attacheddatanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/client.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/client.go index 27de18519a5..7d81e5c51dc 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworksClient struct { } func NewAttachedDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/id_packetcoredataplane.go index fa40b062a0e..72da1dc4d87 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/version.go b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/version.go index c2b4367e936..2f9a43cc144 100644 --- a/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/attacheddatanetworks/version.go @@ -1,12 +1,10 @@ package attacheddatanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetworks/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/README.md b/resource-manager/mobilenetwork/2023-06-01/datanetwork/README.md index 6d99c7c6064..3cd45ec6c70 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/datanetwork` Documentation -The `datanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `datanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/client.go b/resource-manager/mobilenetwork/2023-06-01/datanetwork/client.go index 24738bf5e57..4f00bc2f0ba 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/client.go @@ -15,7 +15,7 @@ type DataNetworkClient struct { } func NewDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/id_datanetwork.go b/resource-manager/mobilenetwork/2023-06-01/datanetwork/id_datanetwork.go index 0584ffc18be..45cf21c05fb 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/id_datanetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/id_datanetwork.go @@ -44,7 +44,7 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_get.go b/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_get.go index 54ae2abcc3b..88693d49fd3 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_get.go @@ -45,7 +45,6 @@ func (c DataNetworkClient) Get(ctx context.Context, id DataNetworkId) (result Ge var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_updatetags.go index dff4c238fc8..f7ea3207970 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c DataNetworkClient) UpdateTags(ctx context.Context, id DataNetworkId, inp var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetwork/version.go b/resource-manager/mobilenetwork/2023-06-01/datanetwork/version.go index 5dd004af9a4..7a5538c5029 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetwork/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetwork/version.go @@ -1,12 +1,10 @@ package datanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetwork/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetworks/README.md b/resource-manager/mobilenetwork/2023-06-01/datanetworks/README.md index 6ca63eacdb2..08b3ea0b045 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetworks/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/datanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/datanetworks` Documentation -The `datanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `datanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetworks/client.go b/resource-manager/mobilenetwork/2023-06-01/datanetworks/client.go index a3e1366086d..3d1fcef1303 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetworks/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetworks/client.go @@ -15,7 +15,7 @@ type DataNetworksClient struct { } func NewDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/datanetworks/id_mobilenetwork.go index 14777643b61..5b44e7946ad 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/datanetworks/version.go b/resource-manager/mobilenetwork/2023-06-01/datanetworks/version.go index 9c03c3ad6a6..450e92c0acd 100644 --- a/resource-manager/mobilenetwork/2023-06-01/datanetworks/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/datanetworks/version.go @@ -1,12 +1,10 @@ package datanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetworks/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/README.md b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/README.md index b4e21fc9da0..d8d62859017 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages` Documentation -The `diagnosticspackages` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `diagnosticspackages` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/client.go b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/client.go index 8769a6d4036..7ebeef71157 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/client.go @@ -15,7 +15,7 @@ type DiagnosticsPackagesClient struct { } func NewDiagnosticsPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticspackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticspackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsPackagesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_diagnosticspackage.go b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_diagnosticspackage.go index 664519d698b..e557ab49d9c 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_diagnosticspackage.go +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_diagnosticspackage.go @@ -44,7 +44,7 @@ func ParseDiagnosticsPackageID(input string) (*DiagnosticsPackageId, error) { } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticsPackageIDInsensitively(input string) (*DiagnosticsPackageId } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_packetcorecontrolplane.go index 117e98de30a..6873f257e31 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/method_get.go b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/method_get.go index 755ab1f5a11..7ca564205ec 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticsPackagesClient) Get(ctx context.Context, id DiagnosticsPackag var model DiagnosticsPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/version.go b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/version.go index 3df59d3faca..98b1766af5a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/diagnosticspackages/version.go @@ -1,12 +1,10 @@ package diagnosticspackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticspackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticspackages/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/README.md b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/README.md index 12854e1b6cf..fc6fefb51a5 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/mobilenetwork` Documentation -The `mobilenetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `mobilenetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/client.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/client.go index f88a782b68d..98a2a62ba91 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/client.go @@ -15,7 +15,7 @@ type MobileNetworkClient struct { } func NewMobileNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/id_mobilenetwork.go index 20e7a777239..5219ea96bea 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_get.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_get.go index b79e2d38c14..fd4563e7a5c 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_get.go @@ -45,7 +45,6 @@ func (c MobileNetworkClient) Get(ctx context.Context, id MobileNetworkId) (resul var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_updatetags.go index 08a3b066d56..d30e5347175 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c MobileNetworkClient) UpdateTags(ctx context.Context, id MobileNetworkId, var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/version.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/version.go index f5fdc17fb91..7d3043e38c8 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetwork/version.go @@ -1,12 +1,10 @@ package mobilenetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetwork/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/README.md b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/README.md index 538a44a5cac..e5e87a0ee51 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/mobilenetworks` Documentation -The `mobilenetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `mobilenetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/client.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/client.go index 699210d14c3..3bc7c11a2a4 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/client.go @@ -15,7 +15,7 @@ type MobileNetworksClient struct { } func NewMobileNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/version.go b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/version.go index 295f1baf718..dc440d226e5 100644 --- a/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/mobilenetworks/version.go @@ -1,12 +1,10 @@ package mobilenetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetworks/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/README.md index 3dfe6a07cab..80986444d50 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcapture.go b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcapture.go index 861325eb4b5..9bdfa692ca6 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcorecontrolplane.go index 46ab74dad44..84144dd2daa 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/method_get.go b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/method_get.go index eff0888c843..415b94efad1 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCapture result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/version.go index f3af0c455b6..7ebc7b38266 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcaptures/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/README.md index c81a2e75420..76d5d2ab279 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane` Documentation -The `packetcorecontrolplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/client.go index 351920cd18e..9bd5d5e54b2 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneClient struct { } func NewPacketCoreControlPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 17beafd27d8..d92d6b2a762 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_get.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_get.go index 924161ba22f..a438ec92444 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneClient) Get(ctx context.Context, id PacketCoreCont var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_updatetags.go index 5da4d26d562..f6a59247905 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreControlPlaneClient) UpdateTags(ctx context.Context, id PacketC var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/version.go index 3424ce8e164..e981b088e05 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplane/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplane/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/README.md index 15bac55ed58..24122d7e26f 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage` Documentation -The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/client.go index d4f71ea2b81..532de4377bb 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneCollectDiagnosticsPackageClient struct { } func NewPacketCoreControlPlaneCollectDiagnosticsPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneCollectDiagnosticsPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneCollectDiagnosticsPackageClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go index 8d3d80dd4c7..2dba74cc18d 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/version.go index ea8cd19165c..1f74c15e2c7 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanecollectdiagnosticspackage/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanecollectdiagnosticspackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/README.md index 68892bae534..6e2e618d603 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall` Documentation -The `packetcorecontrolplanereinstall` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplanereinstall` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/client.go index be193471bf0..32cce04f6a0 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneReinstallClient struct { } func NewPacketCoreControlPlaneReinstallClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneReinstallClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneReinstallClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go index f8c20476681..09da463fc62 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/version.go index be009b477ab..cd41037e814 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanereinstall/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanereinstall -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/README.md index 602e4e0952a..2f41b3e2ca4 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback` Documentation -The `packetcorecontrolplanerollback` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplanerollback` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/client.go index 5535806d33e..b2ddaa43651 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneRollbackClient struct { } func NewPacketCoreControlPlaneRollbackClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneRollbackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneRollbackClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go index 9704b0e3cd4..0cb5e961e07 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/version.go index 1772a28028d..93e5195797d 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanerollback/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanerollback -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanerollback/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanerollback/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/README.md index a9d8288aef4..cfd3ef60876 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes` Documentation -The `packetcorecontrolplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/client.go index c622dd3046c..0e8be1ffa17 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlanesClient struct { } func NewPacketCoreControlPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/version.go index 0e85fa4c433..2dc7d56eca6 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplanes/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanes/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/README.md index eaaeea20d4a..b413541b301 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion` Documentation -The `packetcorecontrolplaneversion` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcorecontrolplaneversion` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/client.go index 8467e64af60..ad620a0b4aa 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneVersionClient struct { } func NewPacketCoreControlPlaneVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneVersionClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go index 3b635613407..5dc157f5bc3 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go @@ -38,7 +38,7 @@ func ParsePacketCoreControlPlaneVersionID(input string) (*PacketCoreControlPlane } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePacketCoreControlPlaneVersionIDInsensitively(input string) (*PacketCor } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go index a377ac5e588..00b72eb312a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go @@ -40,7 +40,7 @@ func ParseProviderPacketCoreControlPlaneVersionID(input string) (*ProviderPacket } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderPacketCoreControlPlaneVersionIDInsensitively(input string) (*P } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_get.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_get.go index 86ea0a903b5..53680407e0e 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) Get(ctx context.Context, id PacketC var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_getbysubscription.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_getbysubscription.go index 164ea846640..c17b829d7ce 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_getbysubscription.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/method_getbysubscription.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) GetBySubscription(ctx context.Conte var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/version.go index 891e96da888..6579d9cfca4 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcorecontrolplaneversion/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplaneversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplaneversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplaneversion/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/README.md index f36b632e9ac..9cdeb067e41 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane` Documentation -The `packetcoredataplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcoredataplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/client.go index dc550d86f7a..d4703ae7e6c 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlaneClient struct { } func NewPacketCoreDataPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/id_packetcoredataplane.go index 719ad90ad50..2970349814b 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_get.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_get.go index 6557c7e767d..b4b4fd385b2 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreDataPlaneClient) Get(ctx context.Context, id PacketCoreDataPla var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_updatetags.go index 0f4fe0d633b..81b29718659 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreDataPlaneClient) UpdateTags(ctx context.Context, id PacketCore var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/version.go index 12ab3de01b5..353b5fd411f 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplane/version.go @@ -1,12 +1,10 @@ package packetcoredataplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplane/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/README.md b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/README.md index 05674213eae..f0499e33c16 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes` Documentation -The `packetcoredataplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `packetcoredataplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/client.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/client.go index 94e7e7d1d1b..83e592850fa 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlanesClient struct { } func NewPacketCoreDataPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/id_packetcorecontrolplane.go index 5d027d57473..6d26b9e37ad 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/version.go b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/version.go index 27e0e08ea46..3450aa9b501 100644 --- a/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/packetcoredataplanes/version.go @@ -1,12 +1,10 @@ package packetcoredataplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplanes/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/service/README.md b/resource-manager/mobilenetwork/2023-06-01/service/README.md index c866ab9df2a..d78e27fb7ae 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `service` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/service/client.go b/resource-manager/mobilenetwork/2023-06-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/service/id_service.go b/resource-manager/mobilenetwork/2023-06-01/service/id_service.go index cd77155d153..5e47bdaa485 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/id_service.go +++ b/resource-manager/mobilenetwork/2023-06-01/service/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/service/method_get.go b/resource-manager/mobilenetwork/2023-06-01/service/method_get.go index aa0841483b1..4bbd23711f8 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/service/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/service/method_updatetags.go index 919c2c845df..ea1ba2b6c18 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/service/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceClient) UpdateTags(ctx context.Context, id ServiceId, input TagsO var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/service/version.go b/resource-manager/mobilenetwork/2023-06-01/service/version.go index 482ffebb642..1bf9f48c295 100644 --- a/resource-manager/mobilenetwork/2023-06-01/service/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/services/README.md b/resource-manager/mobilenetwork/2023-06-01/services/README.md index aee2ee46499..a9068e06c53 100644 --- a/resource-manager/mobilenetwork/2023-06-01/services/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `services` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/services/client.go b/resource-manager/mobilenetwork/2023-06-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/mobilenetwork/2023-06-01/services/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/services/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/services/id_mobilenetwork.go index aaa57c61499..8d716181fbd 100644 --- a/resource-manager/mobilenetwork/2023-06-01/services/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/services/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/services/version.go b/resource-manager/mobilenetwork/2023-06-01/services/version.go index d1aca742024..d27f7c50709 100644 --- a/resource-manager/mobilenetwork/2023-06-01/services/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/sim/README.md b/resource-manager/mobilenetwork/2023-06-01/sim/README.md index 9055ba88ead..819307761d4 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sim/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/sim/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/sim` Documentation -The `sim` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `sim` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/sim/client.go b/resource-manager/mobilenetwork/2023-06-01/sim/client.go index 8a43d650628..457692ff979 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sim/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/sim/client.go @@ -15,7 +15,7 @@ type SIMClient struct { } func NewSIMClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sim", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sim", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/sim/id_sim.go b/resource-manager/mobilenetwork/2023-06-01/sim/id_sim.go index 4fb50ab65ce..5cd81cd9d0e 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sim/id_sim.go +++ b/resource-manager/mobilenetwork/2023-06-01/sim/id_sim.go @@ -44,7 +44,7 @@ func ParseSimID(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/sim/method_get.go b/resource-manager/mobilenetwork/2023-06-01/sim/method_get.go index 6b99fbc6db7..3855c3d0263 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sim/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/sim/method_get.go @@ -45,7 +45,6 @@ func (c SIMClient) Get(ctx context.Context, id SimId) (result GetOperationRespon var model Sim result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/sim/version.go b/resource-manager/mobilenetwork/2023-06-01/sim/version.go index 1bec34eed3a..04ac214fbdd 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sim/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/sim/version.go @@ -1,12 +1,10 @@ package sim -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sim/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sim/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/README.md b/resource-manager/mobilenetwork/2023-06-01/simgroup/README.md index e8867787c09..cb7b67dc24e 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/simgroup` Documentation -The `simgroup` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `simgroup` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/client.go b/resource-manager/mobilenetwork/2023-06-01/simgroup/client.go index 246564366ab..336b11646d5 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/client.go @@ -15,7 +15,7 @@ type SIMGroupClient struct { } func NewSIMGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/id_simgroup.go b/resource-manager/mobilenetwork/2023-06-01/simgroup/id_simgroup.go index 9da4886e888..d382c0ee97c 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/id_simgroup.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/method_get.go b/resource-manager/mobilenetwork/2023-06-01/simgroup/method_get.go index 6ea6342dc94..f9a5b7170a7 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/method_get.go @@ -45,7 +45,6 @@ func (c SIMGroupClient) Get(ctx context.Context, id SimGroupId) (result GetOpera var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/simgroup/method_updatetags.go index 3757c9fafb7..6908c6298ae 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/method_updatetags.go @@ -49,7 +49,6 @@ func (c SIMGroupClient) UpdateTags(ctx context.Context, id SimGroupId, input Ide var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroup/version.go b/resource-manager/mobilenetwork/2023-06-01/simgroup/version.go index 5a3930def81..1c9f7994d24 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroup/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroup/version.go @@ -1,12 +1,10 @@ package simgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroup/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroups/README.md b/resource-manager/mobilenetwork/2023-06-01/simgroups/README.md index a6e918cfb2d..b0dbcb02077 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroups/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/simgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/simgroups` Documentation -The `simgroups` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `simgroups` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroups/client.go b/resource-manager/mobilenetwork/2023-06-01/simgroups/client.go index 3bbaf2d36ff..23c53aad636 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroups/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroups/client.go @@ -15,7 +15,7 @@ type SIMGroupsClient struct { } func NewSIMGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/simgroups/version.go b/resource-manager/mobilenetwork/2023-06-01/simgroups/version.go index 355ad30a6b3..f136c6ef35b 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simgroups/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/simgroups/version.go @@ -1,12 +1,10 @@ package simgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroups/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicies/README.md b/resource-manager/mobilenetwork/2023-06-01/simpolicies/README.md index f672eaea233..f31783ed5a7 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicies/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/simpolicies` Documentation -The `simpolicies` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `simpolicies` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicies/client.go b/resource-manager/mobilenetwork/2023-06-01/simpolicies/client.go index 44d15eac3ad..2e42bbf7665 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicies/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicies/client.go @@ -15,7 +15,7 @@ type SIMPoliciesClient struct { } func NewSIMPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPoliciesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicies/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/simpolicies/id_mobilenetwork.go index 9c9024dc846..1ac55d2c654 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicies/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicies/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicies/version.go b/resource-manager/mobilenetwork/2023-06-01/simpolicies/version.go index a37c2e2496b..0a35e8ad37c 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicies/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicies/version.go @@ -1,12 +1,10 @@ package simpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicies/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/README.md b/resource-manager/mobilenetwork/2023-06-01/simpolicy/README.md index 7f1dac8baa1..1434ef65e04 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/simpolicy` Documentation -The `simpolicy` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `simpolicy` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/client.go b/resource-manager/mobilenetwork/2023-06-01/simpolicy/client.go index b6a8741ef88..4ce44ec7ed6 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/client.go @@ -15,7 +15,7 @@ type SIMPolicyClient struct { } func NewSIMPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPolicyClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/id_simpolicy.go b/resource-manager/mobilenetwork/2023-06-01/simpolicy/id_simpolicy.go index ffd989be75a..d9d5a34a027 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/id_simpolicy.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/id_simpolicy.go @@ -44,7 +44,7 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesget.go b/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesget.go index e4dcc89e2df..327e2ad7e67 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesget.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesget.go @@ -45,7 +45,6 @@ func (c SIMPolicyClient) SimPoliciesGet(ctx context.Context, id SimPolicyId) (re var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesupdatetags.go b/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesupdatetags.go index dd132c078aa..83f0a073a4a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesupdatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/method_simpoliciesupdatetags.go @@ -49,7 +49,6 @@ func (c SIMPolicyClient) SimPoliciesUpdateTags(ctx context.Context, id SimPolicy var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/simpolicy/version.go b/resource-manager/mobilenetwork/2023-06-01/simpolicy/version.go index dce105c4bef..58421b0b710 100644 --- a/resource-manager/mobilenetwork/2023-06-01/simpolicy/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/simpolicy/version.go @@ -1,12 +1,10 @@ package simpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicy/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/sims/README.md b/resource-manager/mobilenetwork/2023-06-01/sims/README.md index 68d9b9fdfbc..da0ce62318d 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sims/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/sims/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/sims` Documentation -The `sims` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `sims` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/sims/client.go b/resource-manager/mobilenetwork/2023-06-01/sims/client.go index e74a1379d26..da97ae5e79f 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sims/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/sims/client.go @@ -15,7 +15,7 @@ type SIMsClient struct { } func NewSIMsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sims", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sims", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/sims/id_simgroup.go b/resource-manager/mobilenetwork/2023-06-01/sims/id_simgroup.go index b76d96d5cfb..2c21f8a2c1a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sims/id_simgroup.go +++ b/resource-manager/mobilenetwork/2023-06-01/sims/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/sims/version.go b/resource-manager/mobilenetwork/2023-06-01/sims/version.go index a6240787c4d..2a950e4ee5b 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sims/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/sims/version.go @@ -1,12 +1,10 @@ package sims -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sims/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sims/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/site/README.md b/resource-manager/mobilenetwork/2023-06-01/site/README.md index 790b1cdbb75..4fed64eaaa0 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/site/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/site` Documentation -The `site` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/site/client.go b/resource-manager/mobilenetwork/2023-06-01/site/client.go index 9cd860565b2..bab4d23cff8 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/site/client.go @@ -15,7 +15,7 @@ type SiteClient struct { } func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "site", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SiteClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/site/id_site.go b/resource-manager/mobilenetwork/2023-06-01/site/id_site.go index 9eddac47c82..8760d021672 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/id_site.go +++ b/resource-manager/mobilenetwork/2023-06-01/site/id_site.go @@ -44,7 +44,7 @@ func ParseSiteID(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/site/method_get.go b/resource-manager/mobilenetwork/2023-06-01/site/method_get.go index d4bac52e0fa..f6b55484e63 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/site/method_get.go @@ -45,7 +45,6 @@ func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/site/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/site/method_updatetags.go index 995a94bf857..d6fc0f56612 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/site/method_updatetags.go @@ -49,7 +49,6 @@ func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/site/version.go b/resource-manager/mobilenetwork/2023-06-01/site/version.go index b1f7e615494..b16cd681c39 100644 --- a/resource-manager/mobilenetwork/2023-06-01/site/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/site/version.go @@ -1,12 +1,10 @@ package site -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/site/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/site/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/sites/README.md b/resource-manager/mobilenetwork/2023-06-01/sites/README.md index b868b54b1db..caa35b49b7e 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sites/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/sites/client.go b/resource-manager/mobilenetwork/2023-06-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sites/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/sites/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/sites/id_mobilenetwork.go index c8015f27277..a7b557bc58f 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sites/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/sites/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/sites/version.go b/resource-manager/mobilenetwork/2023-06-01/sites/version.go index 223a1da6d89..ceca0024ae8 100644 --- a/resource-manager/mobilenetwork/2023-06-01/sites/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/README.md b/resource-manager/mobilenetwork/2023-06-01/slice/README.md index 5a29fb18f63..3fb1f59a39a 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/slice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/slice` Documentation -The `slice` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `slice` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/client.go b/resource-manager/mobilenetwork/2023-06-01/slice/client.go index 554bd7acc02..7556daa518d 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/slice/client.go @@ -15,7 +15,7 @@ type SliceClient struct { } func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SliceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/id_slice.go b/resource-manager/mobilenetwork/2023-06-01/slice/id_slice.go index 735c1e9f3ed..b0644547e67 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/id_slice.go +++ b/resource-manager/mobilenetwork/2023-06-01/slice/id_slice.go @@ -44,7 +44,7 @@ func ParseSliceID(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/method_get.go b/resource-manager/mobilenetwork/2023-06-01/slice/method_get.go index 0b43d2deb19..9a67c294cdd 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/method_get.go +++ b/resource-manager/mobilenetwork/2023-06-01/slice/method_get.go @@ -45,7 +45,6 @@ func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationRe var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/method_updatetags.go b/resource-manager/mobilenetwork/2023-06-01/slice/method_updatetags.go index faa019844ae..8f1fd42c3d6 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-06-01/slice/method_updatetags.go @@ -49,7 +49,6 @@ func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObjec var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-06-01/slice/version.go b/resource-manager/mobilenetwork/2023-06-01/slice/version.go index 7f5296aeb0a..889db29c894 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slice/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/slice/version.go @@ -1,12 +1,10 @@ package slice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slice/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-06-01/slices/README.md b/resource-manager/mobilenetwork/2023-06-01/slices/README.md index 40573aa57ee..fa1d46adffa 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slices/README.md +++ b/resource-manager/mobilenetwork/2023-06-01/slices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-06-01/slices` Documentation -The `slices` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-06-01`). +The `slices` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-06-01/slices/client.go b/resource-manager/mobilenetwork/2023-06-01/slices/client.go index 1f866fe2398..170a5cd0ab5 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slices/client.go +++ b/resource-manager/mobilenetwork/2023-06-01/slices/client.go @@ -15,7 +15,7 @@ type SlicesClient struct { } func NewSlicesClientWithBaseURI(sdkApi sdkEnv.Api) (*SlicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SlicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-06-01/slices/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-06-01/slices/id_mobilenetwork.go index d1c5c1d405b..d866b2a8cd1 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slices/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-06-01/slices/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-06-01/slices/version.go b/resource-manager/mobilenetwork/2023-06-01/slices/version.go index 5f3099441c9..5840613aedc 100644 --- a/resource-manager/mobilenetwork/2023-06-01/slices/version.go +++ b/resource-manager/mobilenetwork/2023-06-01/slices/version.go @@ -1,12 +1,10 @@ package slices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slices/2023-06-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/README.md b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/README.md index 7e8bfbd5b4e..5b46977dfa3 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork` Documentation -The `attacheddatanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `attacheddatanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/client.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/client.go index 19812ddb299..a22c714a41a 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworkClient struct { } func NewAttachedDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/id_attacheddatanetwork.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/id_attacheddatanetwork.go index e56bbcceb35..f7592473c55 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -46,7 +46,7 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_get.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_get.go index 0ddf3e539dd..9d4a55cf001 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDataNetworkClient) Get(ctx context.Context, id AttachedDataNetwo var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_updatetags.go index 61cfb29e437..647628bf2f1 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c AttachedDataNetworkClient) UpdateTags(ctx context.Context, id AttachedDa var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/version.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/version.go index 8aa2a82d5bf..e230234b81f 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetwork/version.go @@ -1,12 +1,10 @@ package attacheddatanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetwork/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/README.md b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/README.md index d9dfa0e4a13..6c13547ed1b 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks` Documentation -The `attacheddatanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `attacheddatanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/client.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/client.go index 27de18519a5..7d81e5c51dc 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworksClient struct { } func NewAttachedDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/id_packetcoredataplane.go index fa40b062a0e..72da1dc4d87 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/version.go b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/version.go index 52282ae3d44..21fd86351a9 100644 --- a/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/attacheddatanetworks/version.go @@ -1,12 +1,10 @@ package attacheddatanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetworks/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/README.md b/resource-manager/mobilenetwork/2023-09-01/datanetwork/README.md index 73c2294e318..6bd37e83469 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/datanetwork` Documentation -The `datanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `datanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/client.go b/resource-manager/mobilenetwork/2023-09-01/datanetwork/client.go index 24738bf5e57..4f00bc2f0ba 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/client.go @@ -15,7 +15,7 @@ type DataNetworkClient struct { } func NewDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/id_datanetwork.go b/resource-manager/mobilenetwork/2023-09-01/datanetwork/id_datanetwork.go index 0584ffc18be..45cf21c05fb 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/id_datanetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/id_datanetwork.go @@ -44,7 +44,7 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_get.go b/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_get.go index 54ae2abcc3b..88693d49fd3 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_get.go @@ -45,7 +45,6 @@ func (c DataNetworkClient) Get(ctx context.Context, id DataNetworkId) (result Ge var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_updatetags.go index dff4c238fc8..f7ea3207970 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c DataNetworkClient) UpdateTags(ctx context.Context, id DataNetworkId, inp var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetwork/version.go b/resource-manager/mobilenetwork/2023-09-01/datanetwork/version.go index 3af8300d145..b12079cc574 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetwork/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetwork/version.go @@ -1,12 +1,10 @@ package datanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetwork/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetworks/README.md b/resource-manager/mobilenetwork/2023-09-01/datanetworks/README.md index 2dbd914b303..26aa01c7094 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetworks/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/datanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/datanetworks` Documentation -The `datanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `datanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetworks/client.go b/resource-manager/mobilenetwork/2023-09-01/datanetworks/client.go index a3e1366086d..3d1fcef1303 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetworks/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetworks/client.go @@ -15,7 +15,7 @@ type DataNetworksClient struct { } func NewDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/datanetworks/id_mobilenetwork.go index 14777643b61..5b44e7946ad 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/datanetworks/version.go b/resource-manager/mobilenetwork/2023-09-01/datanetworks/version.go index 067bf31fa39..88cf875ab66 100644 --- a/resource-manager/mobilenetwork/2023-09-01/datanetworks/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/datanetworks/version.go @@ -1,12 +1,10 @@ package datanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetworks/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/README.md b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/README.md index 4b3201627ca..eae8f9ecc17 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages` Documentation -The `diagnosticspackages` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `diagnosticspackages` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/client.go b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/client.go index 8769a6d4036..7ebeef71157 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/client.go @@ -15,7 +15,7 @@ type DiagnosticsPackagesClient struct { } func NewDiagnosticsPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticspackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticspackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsPackagesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_diagnosticspackage.go b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_diagnosticspackage.go index 664519d698b..e557ab49d9c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_diagnosticspackage.go +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_diagnosticspackage.go @@ -44,7 +44,7 @@ func ParseDiagnosticsPackageID(input string) (*DiagnosticsPackageId, error) { } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticsPackageIDInsensitively(input string) (*DiagnosticsPackageId } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_packetcorecontrolplane.go index 117e98de30a..6873f257e31 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/method_get.go b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/method_get.go index 755ab1f5a11..7ca564205ec 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticsPackagesClient) Get(ctx context.Context, id DiagnosticsPackag var model DiagnosticsPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/version.go b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/version.go index e2a7aacfa7b..c9db51893e8 100644 --- a/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/diagnosticspackages/version.go @@ -1,12 +1,10 @@ package diagnosticspackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticspackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticspackages/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/README.md b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/README.md index 905efdb9ace..baf9e31e240 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/mobilenetwork` Documentation -The `mobilenetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `mobilenetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/client.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/client.go index f88a782b68d..98a2a62ba91 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/client.go @@ -15,7 +15,7 @@ type MobileNetworkClient struct { } func NewMobileNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/id_mobilenetwork.go index 20e7a777239..5219ea96bea 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_get.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_get.go index b79e2d38c14..fd4563e7a5c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_get.go @@ -45,7 +45,6 @@ func (c MobileNetworkClient) Get(ctx context.Context, id MobileNetworkId) (resul var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_updatetags.go index 08a3b066d56..d30e5347175 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c MobileNetworkClient) UpdateTags(ctx context.Context, id MobileNetworkId, var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/version.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/version.go index 20c19bacb76..8ce0505f258 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetwork/version.go @@ -1,12 +1,10 @@ package mobilenetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetwork/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/README.md b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/README.md index e4e66b10e0e..32c88472249 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/mobilenetworks` Documentation -The `mobilenetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `mobilenetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/client.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/client.go index 699210d14c3..3bc7c11a2a4 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/client.go @@ -15,7 +15,7 @@ type MobileNetworksClient struct { } func NewMobileNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/version.go b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/version.go index ce055ff5e05..6dc75b1ebb3 100644 --- a/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/mobilenetworks/version.go @@ -1,12 +1,10 @@ package mobilenetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetworks/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/README.md index 6bce625d541..2923d8d454f 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcapture.go b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcapture.go index 861325eb4b5..9bdfa692ca6 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcorecontrolplane.go index 46ab74dad44..84144dd2daa 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/method_get.go b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/method_get.go index eff0888c843..415b94efad1 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCapture result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/version.go index 24523e08b34..a1b478e822c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcaptures/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/README.md index d0645f9074f..5f8f533dfba 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane` Documentation -The `packetcorecontrolplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/client.go index 351920cd18e..9bd5d5e54b2 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneClient struct { } func NewPacketCoreControlPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 17beafd27d8..d92d6b2a762 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_get.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_get.go index 924161ba22f..a438ec92444 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneClient) Get(ctx context.Context, id PacketCoreCont var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_updatetags.go index 5da4d26d562..f6a59247905 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreControlPlaneClient) UpdateTags(ctx context.Context, id PacketC var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/version.go index 00bb05f490a..5cf781d7207 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplane/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplane/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/README.md index 5902e789c0b..6d09aeea139 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage` Documentation -The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/client.go index d4f71ea2b81..532de4377bb 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneCollectDiagnosticsPackageClient struct { } func NewPacketCoreControlPlaneCollectDiagnosticsPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneCollectDiagnosticsPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneCollectDiagnosticsPackageClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go index 8d3d80dd4c7..2dba74cc18d 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/version.go index f64a3d059e1..bce7f693ad9 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanecollectdiagnosticspackage/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanecollectdiagnosticspackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/README.md index 7d59801a72f..14cb9552055 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall` Documentation -The `packetcorecontrolplanereinstall` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplanereinstall` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/client.go index be193471bf0..32cce04f6a0 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneReinstallClient struct { } func NewPacketCoreControlPlaneReinstallClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneReinstallClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneReinstallClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go index f8c20476681..09da463fc62 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/version.go index 7f14f2f8567..11d43fa4691 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanereinstall/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanereinstall -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/README.md index ecd9b0dfc6f..c83952fdc18 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback` Documentation -The `packetcorecontrolplanerollback` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplanerollback` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/client.go index 5535806d33e..b2ddaa43651 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneRollbackClient struct { } func NewPacketCoreControlPlaneRollbackClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneRollbackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneRollbackClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go index 9704b0e3cd4..0cb5e961e07 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/version.go index e8185c01b7d..88cc29b7700 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanerollback/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanerollback -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanerollback/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanerollback/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/README.md index 1dc0d18d9a2..db02a327037 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes` Documentation -The `packetcorecontrolplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/client.go index c622dd3046c..0e8be1ffa17 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlanesClient struct { } func NewPacketCoreControlPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/version.go index 9691bac57a2..c9e2bb60c63 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplanes/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanes/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/README.md index f0ac4f43da4..53e3e9076ae 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion` Documentation -The `packetcorecontrolplaneversion` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcorecontrolplaneversion` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/client.go index 8467e64af60..ad620a0b4aa 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneVersionClient struct { } func NewPacketCoreControlPlaneVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneVersionClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go index 3b635613407..5dc157f5bc3 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go @@ -38,7 +38,7 @@ func ParsePacketCoreControlPlaneVersionID(input string) (*PacketCoreControlPlane } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePacketCoreControlPlaneVersionIDInsensitively(input string) (*PacketCor } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go index a377ac5e588..00b72eb312a 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go @@ -40,7 +40,7 @@ func ParseProviderPacketCoreControlPlaneVersionID(input string) (*ProviderPacket } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderPacketCoreControlPlaneVersionIDInsensitively(input string) (*P } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_get.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_get.go index 86ea0a903b5..53680407e0e 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) Get(ctx context.Context, id PacketC var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_getbysubscription.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_getbysubscription.go index 164ea846640..c17b829d7ce 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_getbysubscription.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/method_getbysubscription.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) GetBySubscription(ctx context.Conte var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/version.go index 47d9885a0dd..92d49b046b8 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcorecontrolplaneversion/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplaneversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplaneversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplaneversion/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/README.md index 344b53e0f45..cd9939d9b6c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane` Documentation -The `packetcoredataplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcoredataplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/client.go index dc550d86f7a..d4703ae7e6c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlaneClient struct { } func NewPacketCoreDataPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/id_packetcoredataplane.go index 719ad90ad50..2970349814b 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_get.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_get.go index 6557c7e767d..b4b4fd385b2 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreDataPlaneClient) Get(ctx context.Context, id PacketCoreDataPla var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_updatetags.go index 0f4fe0d633b..81b29718659 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreDataPlaneClient) UpdateTags(ctx context.Context, id PacketCore var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/version.go index 3c117e391dc..d9ba7a3d614 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplane/version.go @@ -1,12 +1,10 @@ package packetcoredataplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplane/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/README.md b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/README.md index e64b0e38241..bab1283929c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes` Documentation -The `packetcoredataplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `packetcoredataplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/client.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/client.go index 94e7e7d1d1b..83e592850fa 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlanesClient struct { } func NewPacketCoreDataPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/id_packetcorecontrolplane.go index 5d027d57473..6d26b9e37ad 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/version.go b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/version.go index 46f552ca7e3..a8b0946b9e6 100644 --- a/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/packetcoredataplanes/version.go @@ -1,12 +1,10 @@ package packetcoredataplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplanes/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/service/README.md b/resource-manager/mobilenetwork/2023-09-01/service/README.md index 90800580417..c7eb7770b92 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `service` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/service/client.go b/resource-manager/mobilenetwork/2023-09-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/service/id_service.go b/resource-manager/mobilenetwork/2023-09-01/service/id_service.go index cd77155d153..5e47bdaa485 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/id_service.go +++ b/resource-manager/mobilenetwork/2023-09-01/service/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/service/method_get.go b/resource-manager/mobilenetwork/2023-09-01/service/method_get.go index aa0841483b1..4bbd23711f8 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/service/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/service/method_updatetags.go index 919c2c845df..ea1ba2b6c18 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/service/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceClient) UpdateTags(ctx context.Context, id ServiceId, input TagsO var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/service/version.go b/resource-manager/mobilenetwork/2023-09-01/service/version.go index 670b4ca08cc..e8152e8a44a 100644 --- a/resource-manager/mobilenetwork/2023-09-01/service/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/services/README.md b/resource-manager/mobilenetwork/2023-09-01/services/README.md index dc13a3948e1..66369387dbb 100644 --- a/resource-manager/mobilenetwork/2023-09-01/services/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `services` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/services/client.go b/resource-manager/mobilenetwork/2023-09-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/mobilenetwork/2023-09-01/services/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/services/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/services/id_mobilenetwork.go index aaa57c61499..8d716181fbd 100644 --- a/resource-manager/mobilenetwork/2023-09-01/services/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/services/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/services/version.go b/resource-manager/mobilenetwork/2023-09-01/services/version.go index b0c5fb8366f..337abc5fb31 100644 --- a/resource-manager/mobilenetwork/2023-09-01/services/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/sim/README.md b/resource-manager/mobilenetwork/2023-09-01/sim/README.md index 5e30c9327d7..05132cb4011 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sim/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/sim/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/sim` Documentation -The `sim` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `sim` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/sim/client.go b/resource-manager/mobilenetwork/2023-09-01/sim/client.go index 8a43d650628..457692ff979 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sim/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/sim/client.go @@ -15,7 +15,7 @@ type SIMClient struct { } func NewSIMClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sim", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sim", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/sim/id_sim.go b/resource-manager/mobilenetwork/2023-09-01/sim/id_sim.go index 4fb50ab65ce..5cd81cd9d0e 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sim/id_sim.go +++ b/resource-manager/mobilenetwork/2023-09-01/sim/id_sim.go @@ -44,7 +44,7 @@ func ParseSimID(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/sim/method_get.go b/resource-manager/mobilenetwork/2023-09-01/sim/method_get.go index 6b99fbc6db7..3855c3d0263 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sim/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/sim/method_get.go @@ -45,7 +45,6 @@ func (c SIMClient) Get(ctx context.Context, id SimId) (result GetOperationRespon var model Sim result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/sim/version.go b/resource-manager/mobilenetwork/2023-09-01/sim/version.go index b828c69058a..8cca1a0ee16 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sim/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/sim/version.go @@ -1,12 +1,10 @@ package sim -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sim/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sim/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/README.md b/resource-manager/mobilenetwork/2023-09-01/simgroup/README.md index 26a455fb02d..e018acc6673 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/simgroup` Documentation -The `simgroup` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `simgroup` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/client.go b/resource-manager/mobilenetwork/2023-09-01/simgroup/client.go index 246564366ab..336b11646d5 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/client.go @@ -15,7 +15,7 @@ type SIMGroupClient struct { } func NewSIMGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/id_simgroup.go b/resource-manager/mobilenetwork/2023-09-01/simgroup/id_simgroup.go index 9da4886e888..d382c0ee97c 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/id_simgroup.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/method_get.go b/resource-manager/mobilenetwork/2023-09-01/simgroup/method_get.go index 6ea6342dc94..f9a5b7170a7 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/method_get.go @@ -45,7 +45,6 @@ func (c SIMGroupClient) Get(ctx context.Context, id SimGroupId) (result GetOpera var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/simgroup/method_updatetags.go index 3757c9fafb7..6908c6298ae 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/method_updatetags.go @@ -49,7 +49,6 @@ func (c SIMGroupClient) UpdateTags(ctx context.Context, id SimGroupId, input Ide var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroup/version.go b/resource-manager/mobilenetwork/2023-09-01/simgroup/version.go index 35dc5dbf59f..7e62b0f2451 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroup/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroup/version.go @@ -1,12 +1,10 @@ package simgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroup/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroups/README.md b/resource-manager/mobilenetwork/2023-09-01/simgroups/README.md index f946f87d8a8..8b7fa268e55 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroups/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/simgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/simgroups` Documentation -The `simgroups` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `simgroups` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroups/client.go b/resource-manager/mobilenetwork/2023-09-01/simgroups/client.go index 3bbaf2d36ff..23c53aad636 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroups/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroups/client.go @@ -15,7 +15,7 @@ type SIMGroupsClient struct { } func NewSIMGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/simgroups/version.go b/resource-manager/mobilenetwork/2023-09-01/simgroups/version.go index 19e637bc555..1aed5e74227 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simgroups/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/simgroups/version.go @@ -1,12 +1,10 @@ package simgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroups/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicies/README.md b/resource-manager/mobilenetwork/2023-09-01/simpolicies/README.md index b2de556b68d..c261c8e54b0 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicies/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/simpolicies` Documentation -The `simpolicies` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `simpolicies` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicies/client.go b/resource-manager/mobilenetwork/2023-09-01/simpolicies/client.go index 44d15eac3ad..2e42bbf7665 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicies/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicies/client.go @@ -15,7 +15,7 @@ type SIMPoliciesClient struct { } func NewSIMPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPoliciesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicies/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/simpolicies/id_mobilenetwork.go index 9c9024dc846..1ac55d2c654 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicies/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicies/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicies/version.go b/resource-manager/mobilenetwork/2023-09-01/simpolicies/version.go index a082a644578..8935d5fc6a2 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicies/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicies/version.go @@ -1,12 +1,10 @@ package simpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicies/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/README.md b/resource-manager/mobilenetwork/2023-09-01/simpolicy/README.md index 5a2b5cb6883..023e3855a30 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/simpolicy` Documentation -The `simpolicy` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `simpolicy` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/client.go b/resource-manager/mobilenetwork/2023-09-01/simpolicy/client.go index b6a8741ef88..4ce44ec7ed6 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/client.go @@ -15,7 +15,7 @@ type SIMPolicyClient struct { } func NewSIMPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPolicyClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/id_simpolicy.go b/resource-manager/mobilenetwork/2023-09-01/simpolicy/id_simpolicy.go index ffd989be75a..d9d5a34a027 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/id_simpolicy.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/id_simpolicy.go @@ -44,7 +44,7 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesget.go b/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesget.go index e4dcc89e2df..327e2ad7e67 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesget.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesget.go @@ -45,7 +45,6 @@ func (c SIMPolicyClient) SimPoliciesGet(ctx context.Context, id SimPolicyId) (re var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesupdatetags.go b/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesupdatetags.go index dd132c078aa..83f0a073a4a 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesupdatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/method_simpoliciesupdatetags.go @@ -49,7 +49,6 @@ func (c SIMPolicyClient) SimPoliciesUpdateTags(ctx context.Context, id SimPolicy var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/simpolicy/version.go b/resource-manager/mobilenetwork/2023-09-01/simpolicy/version.go index 3481ede2b5d..ff243e50d64 100644 --- a/resource-manager/mobilenetwork/2023-09-01/simpolicy/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/simpolicy/version.go @@ -1,12 +1,10 @@ package simpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicy/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/sims/README.md b/resource-manager/mobilenetwork/2023-09-01/sims/README.md index 3adf590a71e..7d91d800e1b 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sims/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/sims/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/sims` Documentation -The `sims` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `sims` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/sims/client.go b/resource-manager/mobilenetwork/2023-09-01/sims/client.go index e74a1379d26..da97ae5e79f 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sims/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/sims/client.go @@ -15,7 +15,7 @@ type SIMsClient struct { } func NewSIMsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sims", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sims", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/sims/id_simgroup.go b/resource-manager/mobilenetwork/2023-09-01/sims/id_simgroup.go index b76d96d5cfb..2c21f8a2c1a 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sims/id_simgroup.go +++ b/resource-manager/mobilenetwork/2023-09-01/sims/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/sims/version.go b/resource-manager/mobilenetwork/2023-09-01/sims/version.go index 2ab05c400d9..45881167dd4 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sims/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/sims/version.go @@ -1,12 +1,10 @@ package sims -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sims/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sims/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/site/README.md b/resource-manager/mobilenetwork/2023-09-01/site/README.md index 2b05f230c1f..6b9fec3457f 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/site/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/site` Documentation -The `site` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/site/client.go b/resource-manager/mobilenetwork/2023-09-01/site/client.go index 9cd860565b2..bab4d23cff8 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/site/client.go @@ -15,7 +15,7 @@ type SiteClient struct { } func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "site", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SiteClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/site/id_site.go b/resource-manager/mobilenetwork/2023-09-01/site/id_site.go index 9eddac47c82..8760d021672 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/id_site.go +++ b/resource-manager/mobilenetwork/2023-09-01/site/id_site.go @@ -44,7 +44,7 @@ func ParseSiteID(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/site/method_get.go b/resource-manager/mobilenetwork/2023-09-01/site/method_get.go index d4bac52e0fa..f6b55484e63 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/site/method_get.go @@ -45,7 +45,6 @@ func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/site/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/site/method_updatetags.go index 995a94bf857..d6fc0f56612 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/site/method_updatetags.go @@ -49,7 +49,6 @@ func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/site/version.go b/resource-manager/mobilenetwork/2023-09-01/site/version.go index 95c0b1253f2..bd041dc1831 100644 --- a/resource-manager/mobilenetwork/2023-09-01/site/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/site/version.go @@ -1,12 +1,10 @@ package site -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/site/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/site/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/sites/README.md b/resource-manager/mobilenetwork/2023-09-01/sites/README.md index 2f22fb7a2e9..2d048160c42 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sites/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/sites/client.go b/resource-manager/mobilenetwork/2023-09-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sites/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/sites/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/sites/id_mobilenetwork.go index c8015f27277..a7b557bc58f 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sites/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/sites/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/sites/version.go b/resource-manager/mobilenetwork/2023-09-01/sites/version.go index ae493b1a13f..637ac8624d8 100644 --- a/resource-manager/mobilenetwork/2023-09-01/sites/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/README.md b/resource-manager/mobilenetwork/2023-09-01/slice/README.md index beb254aa5a6..0f5d7948cbe 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/slice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/slice` Documentation -The `slice` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `slice` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/client.go b/resource-manager/mobilenetwork/2023-09-01/slice/client.go index 554bd7acc02..7556daa518d 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/slice/client.go @@ -15,7 +15,7 @@ type SliceClient struct { } func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SliceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/id_slice.go b/resource-manager/mobilenetwork/2023-09-01/slice/id_slice.go index 735c1e9f3ed..b0644547e67 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/id_slice.go +++ b/resource-manager/mobilenetwork/2023-09-01/slice/id_slice.go @@ -44,7 +44,7 @@ func ParseSliceID(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/method_get.go b/resource-manager/mobilenetwork/2023-09-01/slice/method_get.go index 0b43d2deb19..9a67c294cdd 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/method_get.go +++ b/resource-manager/mobilenetwork/2023-09-01/slice/method_get.go @@ -45,7 +45,6 @@ func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationRe var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/method_updatetags.go b/resource-manager/mobilenetwork/2023-09-01/slice/method_updatetags.go index faa019844ae..8f1fd42c3d6 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/method_updatetags.go +++ b/resource-manager/mobilenetwork/2023-09-01/slice/method_updatetags.go @@ -49,7 +49,6 @@ func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObjec var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2023-09-01/slice/version.go b/resource-manager/mobilenetwork/2023-09-01/slice/version.go index f6e395cfcbe..f15e57662cf 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slice/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/slice/version.go @@ -1,12 +1,10 @@ package slice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slice/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2023-09-01/slices/README.md b/resource-manager/mobilenetwork/2023-09-01/slices/README.md index 81ed6dd7643..949fb89f189 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slices/README.md +++ b/resource-manager/mobilenetwork/2023-09-01/slices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2023-09-01/slices` Documentation -The `slices` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2023-09-01`). +The `slices` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2023-09-01/slices/client.go b/resource-manager/mobilenetwork/2023-09-01/slices/client.go index 1f866fe2398..170a5cd0ab5 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slices/client.go +++ b/resource-manager/mobilenetwork/2023-09-01/slices/client.go @@ -15,7 +15,7 @@ type SlicesClient struct { } func NewSlicesClientWithBaseURI(sdkApi sdkEnv.Api) (*SlicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SlicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2023-09-01/slices/id_mobilenetwork.go b/resource-manager/mobilenetwork/2023-09-01/slices/id_mobilenetwork.go index d1c5c1d405b..d866b2a8cd1 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slices/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2023-09-01/slices/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2023-09-01/slices/version.go b/resource-manager/mobilenetwork/2023-09-01/slices/version.go index fcc1fd76eb5..3922cedf593 100644 --- a/resource-manager/mobilenetwork/2023-09-01/slices/version.go +++ b/resource-manager/mobilenetwork/2023-09-01/slices/version.go @@ -1,12 +1,10 @@ package slices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slices/2023-09-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/README.md b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/README.md index 107f5f006e0..0ff8e731cfd 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork` Documentation -The `attacheddatanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `attacheddatanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/client.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/client.go index 19812ddb299..a22c714a41a 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworkClient struct { } func NewAttachedDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/id_attacheddatanetwork.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/id_attacheddatanetwork.go index e56bbcceb35..f7592473c55 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -46,7 +46,7 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_get.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_get.go index 0ddf3e539dd..9d4a55cf001 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDataNetworkClient) Get(ctx context.Context, id AttachedDataNetwo var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_updatetags.go index 61cfb29e437..647628bf2f1 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c AttachedDataNetworkClient) UpdateTags(ctx context.Context, id AttachedDa var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/version.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/version.go index f1c10ecc25d..cc1351a06f5 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetwork/version.go @@ -1,12 +1,10 @@ package attacheddatanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetwork/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/README.md b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/README.md index 4e7e1b1f8ad..dd94a140dd7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks` Documentation -The `attacheddatanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `attacheddatanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/client.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/client.go index 27de18519a5..7d81e5c51dc 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworksClient struct { } func NewAttachedDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/id_packetcoredataplane.go index fa40b062a0e..72da1dc4d87 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/version.go b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/version.go index 886985e7079..fe24f8017b7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/attacheddatanetworks/version.go @@ -1,12 +1,10 @@ package attacheddatanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetworks/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/README.md b/resource-manager/mobilenetwork/2024-02-01/datanetwork/README.md index 11e91a8ceb7..6fcbff58090 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/datanetwork` Documentation -The `datanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `datanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/client.go b/resource-manager/mobilenetwork/2024-02-01/datanetwork/client.go index 24738bf5e57..4f00bc2f0ba 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/client.go @@ -15,7 +15,7 @@ type DataNetworkClient struct { } func NewDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/id_datanetwork.go b/resource-manager/mobilenetwork/2024-02-01/datanetwork/id_datanetwork.go index 0584ffc18be..45cf21c05fb 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/id_datanetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/id_datanetwork.go @@ -44,7 +44,7 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_get.go b/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_get.go index 54ae2abcc3b..88693d49fd3 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_get.go @@ -45,7 +45,6 @@ func (c DataNetworkClient) Get(ctx context.Context, id DataNetworkId) (result Ge var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_updatetags.go index dff4c238fc8..f7ea3207970 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c DataNetworkClient) UpdateTags(ctx context.Context, id DataNetworkId, inp var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetwork/version.go b/resource-manager/mobilenetwork/2024-02-01/datanetwork/version.go index 068d2156436..9a9c508f0c0 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetwork/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetwork/version.go @@ -1,12 +1,10 @@ package datanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetwork/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetworks/README.md b/resource-manager/mobilenetwork/2024-02-01/datanetworks/README.md index 3b2c37157a4..df6bfe53992 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetworks/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/datanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/datanetworks` Documentation -The `datanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `datanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetworks/client.go b/resource-manager/mobilenetwork/2024-02-01/datanetworks/client.go index a3e1366086d..3d1fcef1303 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetworks/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetworks/client.go @@ -15,7 +15,7 @@ type DataNetworksClient struct { } func NewDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/datanetworks/id_mobilenetwork.go index 14777643b61..5b44e7946ad 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/datanetworks/version.go b/resource-manager/mobilenetwork/2024-02-01/datanetworks/version.go index 113e9edbf9c..8fe34e02d53 100644 --- a/resource-manager/mobilenetwork/2024-02-01/datanetworks/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/datanetworks/version.go @@ -1,12 +1,10 @@ package datanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetworks/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/README.md b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/README.md index cbcd34ffdd4..36821e592e7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages` Documentation -The `diagnosticspackages` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `diagnosticspackages` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/client.go b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/client.go index 8769a6d4036..7ebeef71157 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/client.go @@ -15,7 +15,7 @@ type DiagnosticsPackagesClient struct { } func NewDiagnosticsPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticspackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticspackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsPackagesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_diagnosticspackage.go b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_diagnosticspackage.go index 664519d698b..e557ab49d9c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_diagnosticspackage.go +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_diagnosticspackage.go @@ -44,7 +44,7 @@ func ParseDiagnosticsPackageID(input string) (*DiagnosticsPackageId, error) { } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticsPackageIDInsensitively(input string) (*DiagnosticsPackageId } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_packetcorecontrolplane.go index 117e98de30a..6873f257e31 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/method_get.go b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/method_get.go index 755ab1f5a11..7ca564205ec 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticsPackagesClient) Get(ctx context.Context, id DiagnosticsPackag var model DiagnosticsPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/version.go b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/version.go index 7095d1d3289..119265986e9 100644 --- a/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/diagnosticspackages/version.go @@ -1,12 +1,10 @@ package diagnosticspackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticspackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticspackages/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/README.md b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/README.md index df742e55b51..68dab0025bc 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/extendedueinformation` Documentation -The `extendedueinformation` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `extendedueinformation` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/client.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/client.go index fdc486a9414..00bb4b26f99 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/client.go @@ -15,7 +15,7 @@ type ExtendedUeInformationClient struct { } func NewExtendedUeInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtendedUeInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extendedueinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extendedueinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtendedUeInformationClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/id_ue.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/id_ue.go index e5974af151d..92b540c1a0c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/id_ue.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/id_ue.go @@ -44,7 +44,7 @@ func ParseUeID(input string) (*UeId, error) { } id := UeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUeIDInsensitively(input string) (*UeId, error) { } id := UeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/method_get.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/method_get.go index d396e955195..84736db04bd 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/method_get.go @@ -46,7 +46,6 @@ func (c ExtendedUeInformationClient) Get(ctx context.Context, id UeId) (result G var model ExtendedUeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfo.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfo.go index 307cff6f907..e19e160a07b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfo.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfo.go @@ -38,7 +38,7 @@ func (s *ExtendedUeInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalExtendedUeInfoPropertiesImplementation(v) + impl, err := UnmarshalExtendedUeInfoPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ExtendedUeInfo': %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfoproperties.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfoproperties.go index 50941a86ca3..961cc26a28b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfoproperties.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_extendedueinfoproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ExtendedUeInfoProperties interface { + ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl } -// RawExtendedUeInfoPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ExtendedUeInfoProperties = BaseExtendedUeInfoPropertiesImpl{} + +type BaseExtendedUeInfoPropertiesImpl struct { + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s BaseExtendedUeInfoPropertiesImpl) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return s +} + +var _ ExtendedUeInfoProperties = RawExtendedUeInfoPropertiesImpl{} + +// RawExtendedUeInfoPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawExtendedUeInfoPropertiesImpl struct { - Type string - Values map[string]interface{} + extendedUeInfoProperties BaseExtendedUeInfoPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawExtendedUeInfoPropertiesImpl) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return s.extendedUeInfoProperties } -func unmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeInfoProperties, error) { +func UnmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeInfoProperties, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeIn return out, nil } - out := RawExtendedUeInfoPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseExtendedUeInfoPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseExtendedUeInfoPropertiesImpl: %+v", err) } - return out, nil + + return RawExtendedUeInfoPropertiesImpl{ + extendedUeInfoProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo4g.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo4g.go index d5f02fdd8c0..48323ea051c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo4g.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo4g.go @@ -17,7 +17,16 @@ type UeInfo4G struct { Info UeInfo4GProperties `json:"info"` // Fields inherited from ExtendedUeInfoProperties + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s UeInfo4G) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return BaseExtendedUeInfoPropertiesImpl{ + LastReadAt: s.LastReadAt, + RatType: s.RatType, + } } func (o *UeInfo4G) GetLastReadAtAsTime() (*time.Time, error) { @@ -43,9 +52,10 @@ func (s UeInfo4G) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UeInfo4G: %+v", err) } + decoded["ratType"] = "4G" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo5g.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo5g.go index 5efb7aff4c7..ef47d212ccf 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo5g.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/model_ueinfo5g.go @@ -17,7 +17,16 @@ type UeInfo5G struct { Info UeInfo5GProperties `json:"info"` // Fields inherited from ExtendedUeInfoProperties + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s UeInfo5G) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return BaseExtendedUeInfoPropertiesImpl{ + LastReadAt: s.LastReadAt, + RatType: s.RatType, + } } func (o *UeInfo5G) GetLastReadAtAsTime() (*time.Time, error) { @@ -43,9 +52,10 @@ func (s UeInfo5G) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UeInfo5G: %+v", err) } + decoded["ratType"] = "5G" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/version.go b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/version.go index 1ef4ab9bf33..da19f68f27c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/extendedueinformation/version.go @@ -1,12 +1,10 @@ package extendedueinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extendedueinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extendedueinformation/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/README.md b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/README.md index 0696fe09f59..faf7dd5b081 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/mobilenetwork` Documentation -The `mobilenetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `mobilenetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/client.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/client.go index f88a782b68d..98a2a62ba91 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/client.go @@ -15,7 +15,7 @@ type MobileNetworkClient struct { } func NewMobileNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/id_mobilenetwork.go index 20e7a777239..5219ea96bea 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_get.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_get.go index b79e2d38c14..fd4563e7a5c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_get.go @@ -45,7 +45,6 @@ func (c MobileNetworkClient) Get(ctx context.Context, id MobileNetworkId) (resul var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_updatetags.go index 0d4e24e8d8e..c031fe28982 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c MobileNetworkClient) UpdateTags(ctx context.Context, id MobileNetworkId, var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/version.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/version.go index e7e214de284..8cef847a43e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetwork/version.go @@ -1,12 +1,10 @@ package mobilenetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetwork/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/README.md b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/README.md index 7a9556de138..ecd7ae82b76 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/mobilenetworks` Documentation -The `mobilenetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `mobilenetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/client.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/client.go index 699210d14c3..3bc7c11a2a4 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/client.go @@ -15,7 +15,7 @@ type MobileNetworksClient struct { } func NewMobileNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/version.go b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/version.go index 1cf86f203c5..1673a9878a6 100644 --- a/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/mobilenetworks/version.go @@ -1,12 +1,10 @@ package mobilenetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetworks/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/README.md index afb90b52a12..596b03f8a43 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcapture.go b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcapture.go index 861325eb4b5..9bdfa692ca6 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcorecontrolplane.go index 46ab74dad44..84144dd2daa 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/method_get.go b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/method_get.go index eff0888c843..415b94efad1 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCapture result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/version.go index e1a1a6b525f..2fe46dfd642 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcaptures/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/README.md index 126bfeabb49..a9d58c9778c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane` Documentation -The `packetcorecontrolplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/client.go index 351920cd18e..9bd5d5e54b2 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneClient struct { } func NewPacketCoreControlPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 17beafd27d8..d92d6b2a762 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_get.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_get.go index 924161ba22f..a438ec92444 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneClient) Get(ctx context.Context, id PacketCoreCont var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_updatetags.go index 5da4d26d562..f6a59247905 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreControlPlaneClient) UpdateTags(ctx context.Context, id PacketC var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/version.go index 8e1490d2b50..7800ea1c65d 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplane/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplane/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/README.md index fa67eb3bdbf..197678ea29a 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage` Documentation -The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/client.go index d4f71ea2b81..532de4377bb 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneCollectDiagnosticsPackageClient struct { } func NewPacketCoreControlPlaneCollectDiagnosticsPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneCollectDiagnosticsPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneCollectDiagnosticsPackageClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go index 8d3d80dd4c7..2dba74cc18d 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/version.go index c81f5d27e71..6a394b100d2 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanecollectdiagnosticspackage/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanecollectdiagnosticspackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/README.md index 551670ccf0f..adffe11847b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall` Documentation -The `packetcorecontrolplanereinstall` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplanereinstall` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/client.go index be193471bf0..32cce04f6a0 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneReinstallClient struct { } func NewPacketCoreControlPlaneReinstallClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneReinstallClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneReinstallClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go index f8c20476681..09da463fc62 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/version.go index 9dec53485fd..c21eebd16c8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanereinstall/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanereinstall -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/README.md index 101ba796277..797fd96fac8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback` Documentation -The `packetcorecontrolplanerollback` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplanerollback` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/client.go index 5535806d33e..b2ddaa43651 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneRollbackClient struct { } func NewPacketCoreControlPlaneRollbackClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneRollbackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneRollbackClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go index 9704b0e3cd4..0cb5e961e07 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/version.go index ce16630fd8f..105d3ee393d 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanerollback/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanerollback -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanerollback/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanerollback/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/README.md index a28f94b4bc7..feee05b93eb 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes` Documentation -The `packetcorecontrolplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/client.go index c622dd3046c..0e8be1ffa17 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlanesClient struct { } func NewPacketCoreControlPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/version.go index 02e38899952..6bc61f375f0 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplanes/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanes/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/README.md index 3a29d36084a..e765d478d37 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion` Documentation -The `packetcorecontrolplaneversion` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcorecontrolplaneversion` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/client.go index 8467e64af60..ad620a0b4aa 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneVersionClient struct { } func NewPacketCoreControlPlaneVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneVersionClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go index 3b635613407..5dc157f5bc3 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go @@ -38,7 +38,7 @@ func ParsePacketCoreControlPlaneVersionID(input string) (*PacketCoreControlPlane } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePacketCoreControlPlaneVersionIDInsensitively(input string) (*PacketCor } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go index a377ac5e588..00b72eb312a 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go @@ -40,7 +40,7 @@ func ParseProviderPacketCoreControlPlaneVersionID(input string) (*ProviderPacket } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderPacketCoreControlPlaneVersionIDInsensitively(input string) (*P } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_get.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_get.go index 86ea0a903b5..53680407e0e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) Get(ctx context.Context, id PacketC var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_getbysubscription.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_getbysubscription.go index 164ea846640..c17b829d7ce 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_getbysubscription.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/method_getbysubscription.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) GetBySubscription(ctx context.Conte var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/version.go index 89992f04d2b..530b1a04dfe 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcorecontrolplaneversion/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplaneversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplaneversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplaneversion/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/README.md index d678243d31c..eb2e2081c1e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane` Documentation -The `packetcoredataplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcoredataplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/client.go index dc550d86f7a..d4703ae7e6c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlaneClient struct { } func NewPacketCoreDataPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/id_packetcoredataplane.go index 719ad90ad50..2970349814b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_get.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_get.go index 6557c7e767d..b4b4fd385b2 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreDataPlaneClient) Get(ctx context.Context, id PacketCoreDataPla var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_updatetags.go index 0f4fe0d633b..81b29718659 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreDataPlaneClient) UpdateTags(ctx context.Context, id PacketCore var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/version.go index 352086f2fa4..80c82657a06 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplane/version.go @@ -1,12 +1,10 @@ package packetcoredataplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplane/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/README.md b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/README.md index 914585d9140..0a2e0e74903 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes` Documentation -The `packetcoredataplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `packetcoredataplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/client.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/client.go index 94e7e7d1d1b..83e592850fa 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlanesClient struct { } func NewPacketCoreDataPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/id_packetcorecontrolplane.go index 5d027d57473..6d26b9e37ad 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/version.go b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/version.go index cafb089e59a..ba8b174e786 100644 --- a/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/packetcoredataplanes/version.go @@ -1,12 +1,10 @@ package packetcoredataplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplanes/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/service/README.md b/resource-manager/mobilenetwork/2024-02-01/service/README.md index 677cec9c89a..19b3f5277ca 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `service` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/service/client.go b/resource-manager/mobilenetwork/2024-02-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/service/id_service.go b/resource-manager/mobilenetwork/2024-02-01/service/id_service.go index cd77155d153..5e47bdaa485 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/id_service.go +++ b/resource-manager/mobilenetwork/2024-02-01/service/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/service/method_get.go b/resource-manager/mobilenetwork/2024-02-01/service/method_get.go index aa0841483b1..4bbd23711f8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/service/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/service/method_updatetags.go index 919c2c845df..ea1ba2b6c18 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/service/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceClient) UpdateTags(ctx context.Context, id ServiceId, input TagsO var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/service/version.go b/resource-manager/mobilenetwork/2024-02-01/service/version.go index d99398d68b8..4114e6d1181 100644 --- a/resource-manager/mobilenetwork/2024-02-01/service/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/services/README.md b/resource-manager/mobilenetwork/2024-02-01/services/README.md index d5d799ab51b..8c00110c22b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/services/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `services` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/services/client.go b/resource-manager/mobilenetwork/2024-02-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/services/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/services/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/services/id_mobilenetwork.go index aaa57c61499..8d716181fbd 100644 --- a/resource-manager/mobilenetwork/2024-02-01/services/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/services/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/services/version.go b/resource-manager/mobilenetwork/2024-02-01/services/version.go index 8189c9b297a..b6500c6788e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/services/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/sim/README.md b/resource-manager/mobilenetwork/2024-02-01/sim/README.md index acb8b2417de..ed25c945659 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sim/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/sim/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/sim` Documentation -The `sim` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `sim` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/sim/client.go b/resource-manager/mobilenetwork/2024-02-01/sim/client.go index 8a43d650628..457692ff979 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sim/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/sim/client.go @@ -15,7 +15,7 @@ type SIMClient struct { } func NewSIMClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sim", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sim", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/sim/id_sim.go b/resource-manager/mobilenetwork/2024-02-01/sim/id_sim.go index 4fb50ab65ce..5cd81cd9d0e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sim/id_sim.go +++ b/resource-manager/mobilenetwork/2024-02-01/sim/id_sim.go @@ -44,7 +44,7 @@ func ParseSimID(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/sim/method_get.go b/resource-manager/mobilenetwork/2024-02-01/sim/method_get.go index 6b99fbc6db7..3855c3d0263 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sim/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/sim/method_get.go @@ -45,7 +45,6 @@ func (c SIMClient) Get(ctx context.Context, id SimId) (result GetOperationRespon var model Sim result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/sim/version.go b/resource-manager/mobilenetwork/2024-02-01/sim/version.go index a55097982ef..11cee38c1e6 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sim/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/sim/version.go @@ -1,12 +1,10 @@ package sim -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sim/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sim/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/README.md b/resource-manager/mobilenetwork/2024-02-01/simgroup/README.md index c4f9577ee0c..2899bfb6fde 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/simgroup` Documentation -The `simgroup` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `simgroup` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/client.go b/resource-manager/mobilenetwork/2024-02-01/simgroup/client.go index 246564366ab..336b11646d5 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/client.go @@ -15,7 +15,7 @@ type SIMGroupClient struct { } func NewSIMGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/id_simgroup.go b/resource-manager/mobilenetwork/2024-02-01/simgroup/id_simgroup.go index 9da4886e888..d382c0ee97c 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/id_simgroup.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/method_get.go b/resource-manager/mobilenetwork/2024-02-01/simgroup/method_get.go index 6ea6342dc94..f9a5b7170a7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/method_get.go @@ -45,7 +45,6 @@ func (c SIMGroupClient) Get(ctx context.Context, id SimGroupId) (result GetOpera var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/simgroup/method_updatetags.go index 3757c9fafb7..6908c6298ae 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/method_updatetags.go @@ -49,7 +49,6 @@ func (c SIMGroupClient) UpdateTags(ctx context.Context, id SimGroupId, input Ide var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroup/version.go b/resource-manager/mobilenetwork/2024-02-01/simgroup/version.go index 985eafa62c8..b4296260f00 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroup/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroup/version.go @@ -1,12 +1,10 @@ package simgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroup/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroups/README.md b/resource-manager/mobilenetwork/2024-02-01/simgroups/README.md index ee5d891921e..5628eeb525e 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroups/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/simgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/simgroups` Documentation -The `simgroups` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `simgroups` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroups/client.go b/resource-manager/mobilenetwork/2024-02-01/simgroups/client.go index 3bbaf2d36ff..23c53aad636 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroups/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroups/client.go @@ -15,7 +15,7 @@ type SIMGroupsClient struct { } func NewSIMGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/simgroups/version.go b/resource-manager/mobilenetwork/2024-02-01/simgroups/version.go index d59c685bfdc..bf8b69b5088 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simgroups/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/simgroups/version.go @@ -1,12 +1,10 @@ package simgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroups/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicies/README.md b/resource-manager/mobilenetwork/2024-02-01/simpolicies/README.md index 8c4f3162de4..70260bf982f 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicies/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/simpolicies` Documentation -The `simpolicies` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `simpolicies` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicies/client.go b/resource-manager/mobilenetwork/2024-02-01/simpolicies/client.go index 44d15eac3ad..2e42bbf7665 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicies/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicies/client.go @@ -15,7 +15,7 @@ type SIMPoliciesClient struct { } func NewSIMPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPoliciesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicies/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/simpolicies/id_mobilenetwork.go index 9c9024dc846..1ac55d2c654 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicies/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicies/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicies/version.go b/resource-manager/mobilenetwork/2024-02-01/simpolicies/version.go index a7d1fb70351..cfd0ad1a2cf 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicies/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicies/version.go @@ -1,12 +1,10 @@ package simpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicies/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/README.md b/resource-manager/mobilenetwork/2024-02-01/simpolicy/README.md index c8a9e824884..cd029549045 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/simpolicy` Documentation -The `simpolicy` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `simpolicy` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/client.go b/resource-manager/mobilenetwork/2024-02-01/simpolicy/client.go index b6a8741ef88..4ce44ec7ed6 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/client.go @@ -15,7 +15,7 @@ type SIMPolicyClient struct { } func NewSIMPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPolicyClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/id_simpolicy.go b/resource-manager/mobilenetwork/2024-02-01/simpolicy/id_simpolicy.go index ffd989be75a..d9d5a34a027 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/id_simpolicy.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/id_simpolicy.go @@ -44,7 +44,7 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesget.go b/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesget.go index e4dcc89e2df..327e2ad7e67 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesget.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesget.go @@ -45,7 +45,6 @@ func (c SIMPolicyClient) SimPoliciesGet(ctx context.Context, id SimPolicyId) (re var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesupdatetags.go b/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesupdatetags.go index dd132c078aa..83f0a073a4a 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesupdatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/method_simpoliciesupdatetags.go @@ -49,7 +49,6 @@ func (c SIMPolicyClient) SimPoliciesUpdateTags(ctx context.Context, id SimPolicy var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/simpolicy/version.go b/resource-manager/mobilenetwork/2024-02-01/simpolicy/version.go index 31e63141ad9..f654d9e04fe 100644 --- a/resource-manager/mobilenetwork/2024-02-01/simpolicy/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/simpolicy/version.go @@ -1,12 +1,10 @@ package simpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicy/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/sims/README.md b/resource-manager/mobilenetwork/2024-02-01/sims/README.md index 0f46cb49682..c0e91034937 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sims/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/sims/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/sims` Documentation -The `sims` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `sims` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/sims/client.go b/resource-manager/mobilenetwork/2024-02-01/sims/client.go index e74a1379d26..da97ae5e79f 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sims/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/sims/client.go @@ -15,7 +15,7 @@ type SIMsClient struct { } func NewSIMsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sims", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sims", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/sims/id_simgroup.go b/resource-manager/mobilenetwork/2024-02-01/sims/id_simgroup.go index b76d96d5cfb..2c21f8a2c1a 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sims/id_simgroup.go +++ b/resource-manager/mobilenetwork/2024-02-01/sims/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/sims/version.go b/resource-manager/mobilenetwork/2024-02-01/sims/version.go index 6b35bc23115..4ceb6797482 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sims/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/sims/version.go @@ -1,12 +1,10 @@ package sims -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sims/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sims/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/site/README.md b/resource-manager/mobilenetwork/2024-02-01/site/README.md index 8c4f9d77b4e..7bcff1a2cc0 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/site/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/site` Documentation -The `site` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/site/client.go b/resource-manager/mobilenetwork/2024-02-01/site/client.go index 9cd860565b2..bab4d23cff8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/site/client.go @@ -15,7 +15,7 @@ type SiteClient struct { } func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "site", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SiteClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/site/id_site.go b/resource-manager/mobilenetwork/2024-02-01/site/id_site.go index 9eddac47c82..8760d021672 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/id_site.go +++ b/resource-manager/mobilenetwork/2024-02-01/site/id_site.go @@ -44,7 +44,7 @@ func ParseSiteID(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/site/method_get.go b/resource-manager/mobilenetwork/2024-02-01/site/method_get.go index d4bac52e0fa..f6b55484e63 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/site/method_get.go @@ -45,7 +45,6 @@ func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/site/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/site/method_updatetags.go index 995a94bf857..d6fc0f56612 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/site/method_updatetags.go @@ -49,7 +49,6 @@ func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/site/version.go b/resource-manager/mobilenetwork/2024-02-01/site/version.go index ab99d671a04..57bcbdcd9e8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/site/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/site/version.go @@ -1,12 +1,10 @@ package site -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/site/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/site/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/sites/README.md b/resource-manager/mobilenetwork/2024-02-01/sites/README.md index 46d52156d58..fd66fd883cd 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sites/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/sites/client.go b/resource-manager/mobilenetwork/2024-02-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sites/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/sites/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/sites/id_mobilenetwork.go index c8015f27277..a7b557bc58f 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sites/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/sites/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/sites/version.go b/resource-manager/mobilenetwork/2024-02-01/sites/version.go index a5fc11db373..5bc26606068 100644 --- a/resource-manager/mobilenetwork/2024-02-01/sites/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/README.md b/resource-manager/mobilenetwork/2024-02-01/slice/README.md index 4e859e8cfd7..b7f456c4ac4 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/slice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/slice` Documentation -The `slice` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `slice` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/client.go b/resource-manager/mobilenetwork/2024-02-01/slice/client.go index 554bd7acc02..7556daa518d 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/slice/client.go @@ -15,7 +15,7 @@ type SliceClient struct { } func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SliceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/id_slice.go b/resource-manager/mobilenetwork/2024-02-01/slice/id_slice.go index 735c1e9f3ed..b0644547e67 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/id_slice.go +++ b/resource-manager/mobilenetwork/2024-02-01/slice/id_slice.go @@ -44,7 +44,7 @@ func ParseSliceID(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/method_get.go b/resource-manager/mobilenetwork/2024-02-01/slice/method_get.go index 0b43d2deb19..9a67c294cdd 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/method_get.go +++ b/resource-manager/mobilenetwork/2024-02-01/slice/method_get.go @@ -45,7 +45,6 @@ func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationRe var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/method_updatetags.go b/resource-manager/mobilenetwork/2024-02-01/slice/method_updatetags.go index faa019844ae..8f1fd42c3d6 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-02-01/slice/method_updatetags.go @@ -49,7 +49,6 @@ func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObjec var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-02-01/slice/version.go b/resource-manager/mobilenetwork/2024-02-01/slice/version.go index 4685a0b63ab..dac3edf89d7 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slice/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/slice/version.go @@ -1,12 +1,10 @@ package slice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slice/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/slices/README.md b/resource-manager/mobilenetwork/2024-02-01/slices/README.md index b7b4ad7209c..2ceddc83e45 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slices/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/slices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/slices` Documentation -The `slices` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `slices` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/slices/client.go b/resource-manager/mobilenetwork/2024-02-01/slices/client.go index 1f866fe2398..170a5cd0ab5 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slices/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/slices/client.go @@ -15,7 +15,7 @@ type SlicesClient struct { } func NewSlicesClientWithBaseURI(sdkApi sdkEnv.Api) (*SlicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SlicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/slices/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-02-01/slices/id_mobilenetwork.go index d1c5c1d405b..d866b2a8cd1 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slices/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-02-01/slices/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/slices/version.go b/resource-manager/mobilenetwork/2024-02-01/slices/version.go index 430824fd4c1..dee224c8f7b 100644 --- a/resource-manager/mobilenetwork/2024-02-01/slices/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/slices/version.go @@ -1,12 +1,10 @@ package slices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slices/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/README.md b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/README.md index f6e75d5e8ff..fde5e2b35d8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/README.md +++ b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/ueinformationlist` Documentation -The `ueinformationlist` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-02-01`). +The `ueinformationlist` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/client.go b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/client.go index 8e4dde0f9fd..fc56dcf9c95 100644 --- a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/client.go +++ b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/client.go @@ -15,7 +15,7 @@ type UeInformationListClient struct { } func NewUeInformationListClientWithBaseURI(sdkApi sdkEnv.Api) (*UeInformationListClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ueinformationlist", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ueinformationlist", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UeInformationListClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/id_packetcorecontrolplane.go index 9b7cb47ca7c..5ac25eea653 100644 --- a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/version.go b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/version.go index 4319301ffea..bfbde214eb8 100644 --- a/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/version.go +++ b/resource-manager/mobilenetwork/2024-02-01/ueinformationlist/version.go @@ -1,12 +1,10 @@ package ueinformationlist -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ueinformationlist/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ueinformationlist/2024-02-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/README.md b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/README.md index 0d20799d77a..70798ef3974 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork` Documentation -The `attacheddatanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `attacheddatanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/client.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/client.go index 19812ddb299..a22c714a41a 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworkClient struct { } func NewAttachedDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/id_attacheddatanetwork.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/id_attacheddatanetwork.go index e56bbcceb35..f7592473c55 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/id_attacheddatanetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/id_attacheddatanetwork.go @@ -46,7 +46,7 @@ func ParseAttachedDataNetworkID(input string) (*AttachedDataNetworkId, error) { } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAttachedDataNetworkIDInsensitively(input string) (*AttachedDataNetwork } id := AttachedDataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_get.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_get.go index 0ddf3e539dd..9d4a55cf001 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_get.go @@ -45,7 +45,6 @@ func (c AttachedDataNetworkClient) Get(ctx context.Context, id AttachedDataNetwo var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_updatetags.go index 61cfb29e437..647628bf2f1 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c AttachedDataNetworkClient) UpdateTags(ctx context.Context, id AttachedDa var model AttachedDataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/version.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/version.go index b7f3dc07121..ee880705e0e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetwork/version.go @@ -1,12 +1,10 @@ package attacheddatanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetwork/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/README.md b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/README.md index 4d50e2c05ba..da62ed47d90 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks` Documentation -The `attacheddatanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `attacheddatanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/client.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/client.go index 27de18519a5..7d81e5c51dc 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/client.go @@ -15,7 +15,7 @@ type AttachedDataNetworksClient struct { } func NewAttachedDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*AttachedDataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attacheddatanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attacheddatanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttachedDataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/id_packetcoredataplane.go index fa40b062a0e..72da1dc4d87 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/version.go b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/version.go index 91753d1693c..da81847c328 100644 --- a/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/attacheddatanetworks/version.go @@ -1,12 +1,10 @@ package attacheddatanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attacheddatanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attacheddatanetworks/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/README.md b/resource-manager/mobilenetwork/2024-04-01/datanetwork/README.md index a21f459253b..3abdbb727ff 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/datanetwork` Documentation -The `datanetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `datanetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/client.go b/resource-manager/mobilenetwork/2024-04-01/datanetwork/client.go index 24738bf5e57..4f00bc2f0ba 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/client.go @@ -15,7 +15,7 @@ type DataNetworkClient struct { } func NewDataNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/id_datanetwork.go b/resource-manager/mobilenetwork/2024-04-01/datanetwork/id_datanetwork.go index 0584ffc18be..45cf21c05fb 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/id_datanetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/id_datanetwork.go @@ -44,7 +44,7 @@ func ParseDataNetworkID(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataNetworkIDInsensitively(input string) (*DataNetworkId, error) { } id := DataNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_get.go b/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_get.go index 54ae2abcc3b..88693d49fd3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_get.go @@ -45,7 +45,6 @@ func (c DataNetworkClient) Get(ctx context.Context, id DataNetworkId) (result Ge var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_updatetags.go index dff4c238fc8..f7ea3207970 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c DataNetworkClient) UpdateTags(ctx context.Context, id DataNetworkId, inp var model DataNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetwork/version.go b/resource-manager/mobilenetwork/2024-04-01/datanetwork/version.go index d68d0d6ca07..59bf32252f9 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetwork/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetwork/version.go @@ -1,12 +1,10 @@ package datanetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetwork/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetworks/README.md b/resource-manager/mobilenetwork/2024-04-01/datanetworks/README.md index da2672807a3..daf55a8fdec 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetworks/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/datanetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/datanetworks` Documentation -The `datanetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `datanetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetworks/client.go b/resource-manager/mobilenetwork/2024-04-01/datanetworks/client.go index a3e1366086d..3d1fcef1303 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetworks/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetworks/client.go @@ -15,7 +15,7 @@ type DataNetworksClient struct { } func NewDataNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*DataNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datanetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datanetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/datanetworks/id_mobilenetwork.go index 14777643b61..5b44e7946ad 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/datanetworks/version.go b/resource-manager/mobilenetwork/2024-04-01/datanetworks/version.go index d398bb57e42..03d86f4a402 100644 --- a/resource-manager/mobilenetwork/2024-04-01/datanetworks/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/datanetworks/version.go @@ -1,12 +1,10 @@ package datanetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datanetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datanetworks/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/README.md b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/README.md index a8291332d00..c1119caed57 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages` Documentation -The `diagnosticspackages` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `diagnosticspackages` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/client.go b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/client.go index 8769a6d4036..7ebeef71157 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/client.go @@ -15,7 +15,7 @@ type DiagnosticsPackagesClient struct { } func NewDiagnosticsPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnosticspackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnosticspackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsPackagesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_diagnosticspackage.go b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_diagnosticspackage.go index 664519d698b..e557ab49d9c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_diagnosticspackage.go +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_diagnosticspackage.go @@ -44,7 +44,7 @@ func ParseDiagnosticsPackageID(input string) (*DiagnosticsPackageId, error) { } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticsPackageIDInsensitively(input string) (*DiagnosticsPackageId } id := DiagnosticsPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_packetcorecontrolplane.go index 117e98de30a..6873f257e31 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/method_get.go b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/method_get.go index 755ab1f5a11..7ca564205ec 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/method_get.go @@ -45,7 +45,6 @@ func (c DiagnosticsPackagesClient) Get(ctx context.Context, id DiagnosticsPackag var model DiagnosticsPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/version.go b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/version.go index cc63d0a25d7..03081b1333e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/diagnosticspackages/version.go @@ -1,12 +1,10 @@ package diagnosticspackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnosticspackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnosticspackages/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/README.md b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/README.md index baf34969865..73fb7a001bc 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/extendedueinformation` Documentation -The `extendedueinformation` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `extendedueinformation` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/client.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/client.go index fdc486a9414..00bb4b26f99 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/client.go @@ -15,7 +15,7 @@ type ExtendedUeInformationClient struct { } func NewExtendedUeInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*ExtendedUeInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "extendedueinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "extendedueinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExtendedUeInformationClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/id_ue.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/id_ue.go index e5974af151d..92b540c1a0c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/id_ue.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/id_ue.go @@ -44,7 +44,7 @@ func ParseUeID(input string) (*UeId, error) { } id := UeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUeIDInsensitively(input string) (*UeId, error) { } id := UeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/method_get.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/method_get.go index d396e955195..84736db04bd 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/method_get.go @@ -46,7 +46,6 @@ func (c ExtendedUeInformationClient) Get(ctx context.Context, id UeId) (result G var model ExtendedUeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfo.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfo.go index 307cff6f907..e19e160a07b 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfo.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfo.go @@ -38,7 +38,7 @@ func (s *ExtendedUeInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalExtendedUeInfoPropertiesImplementation(v) + impl, err := UnmarshalExtendedUeInfoPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ExtendedUeInfo': %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfoproperties.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfoproperties.go index 50941a86ca3..961cc26a28b 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfoproperties.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_extendedueinfoproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ExtendedUeInfoProperties interface { + ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl } -// RawExtendedUeInfoPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ExtendedUeInfoProperties = BaseExtendedUeInfoPropertiesImpl{} + +type BaseExtendedUeInfoPropertiesImpl struct { + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s BaseExtendedUeInfoPropertiesImpl) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return s +} + +var _ ExtendedUeInfoProperties = RawExtendedUeInfoPropertiesImpl{} + +// RawExtendedUeInfoPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawExtendedUeInfoPropertiesImpl struct { - Type string - Values map[string]interface{} + extendedUeInfoProperties BaseExtendedUeInfoPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawExtendedUeInfoPropertiesImpl) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return s.extendedUeInfoProperties } -func unmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeInfoProperties, error) { +func UnmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeInfoProperties, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalExtendedUeInfoPropertiesImplementation(input []byte) (ExtendedUeIn return out, nil } - out := RawExtendedUeInfoPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseExtendedUeInfoPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseExtendedUeInfoPropertiesImpl: %+v", err) } - return out, nil + + return RawExtendedUeInfoPropertiesImpl{ + extendedUeInfoProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo4g.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo4g.go index d5f02fdd8c0..48323ea051c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo4g.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo4g.go @@ -17,7 +17,16 @@ type UeInfo4G struct { Info UeInfo4GProperties `json:"info"` // Fields inherited from ExtendedUeInfoProperties + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s UeInfo4G) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return BaseExtendedUeInfoPropertiesImpl{ + LastReadAt: s.LastReadAt, + RatType: s.RatType, + } } func (o *UeInfo4G) GetLastReadAtAsTime() (*time.Time, error) { @@ -43,9 +52,10 @@ func (s UeInfo4G) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UeInfo4G: %+v", err) } + decoded["ratType"] = "4G" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo5g.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo5g.go index 5efb7aff4c7..ef47d212ccf 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo5g.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/model_ueinfo5g.go @@ -17,7 +17,16 @@ type UeInfo5G struct { Info UeInfo5GProperties `json:"info"` // Fields inherited from ExtendedUeInfoProperties + LastReadAt *string `json:"lastReadAt,omitempty"` + RatType RatType `json:"ratType"` +} + +func (s UeInfo5G) ExtendedUeInfoProperties() BaseExtendedUeInfoPropertiesImpl { + return BaseExtendedUeInfoPropertiesImpl{ + LastReadAt: s.LastReadAt, + RatType: s.RatType, + } } func (o *UeInfo5G) GetLastReadAtAsTime() (*time.Time, error) { @@ -43,9 +52,10 @@ func (s UeInfo5G) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UeInfo5G: %+v", err) } + decoded["ratType"] = "5G" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/version.go b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/version.go index 22fbee4a537..2462eeb1373 100644 --- a/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/extendedueinformation/version.go @@ -1,12 +1,10 @@ package extendedueinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/extendedueinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/extendedueinformation/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/README.md b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/README.md index 21338094dce..b4afb46bd6a 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/mobilenetwork` Documentation -The `mobilenetwork` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `mobilenetwork` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/client.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/client.go index f88a782b68d..98a2a62ba91 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/client.go @@ -15,7 +15,7 @@ type MobileNetworkClient struct { } func NewMobileNetworkClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetwork", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetwork", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworkClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/id_mobilenetwork.go index 20e7a777239..5219ea96bea 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_get.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_get.go index b79e2d38c14..fd4563e7a5c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_get.go @@ -45,7 +45,6 @@ func (c MobileNetworkClient) Get(ctx context.Context, id MobileNetworkId) (resul var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_updatetags.go index 0d4e24e8d8e..c031fe28982 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/method_updatetags.go @@ -49,7 +49,6 @@ func (c MobileNetworkClient) UpdateTags(ctx context.Context, id MobileNetworkId, var model MobileNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/version.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/version.go index 136ab1daa2d..e12084ade2f 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetwork/version.go @@ -1,12 +1,10 @@ package mobilenetwork -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetwork/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetwork/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/README.md b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/README.md index 57383b8cb8c..46f3d707e67 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/mobilenetworks` Documentation -The `mobilenetworks` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `mobilenetworks` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/client.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/client.go index 699210d14c3..3bc7c11a2a4 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/client.go @@ -15,7 +15,7 @@ type MobileNetworksClient struct { } func NewMobileNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*MobileNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mobilenetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "mobilenetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MobileNetworksClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/id_mobilenetwork.go index 0f1937975b8..97bb066286b 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/version.go b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/version.go index f3f0b75bf37..c5c5f1a5178 100644 --- a/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/mobilenetworks/version.go @@ -1,12 +1,10 @@ package mobilenetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mobilenetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/mobilenetworks/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/README.md index 5d0e6e1d1ec..8c40c6fe9dc 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcapture.go b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcapture.go index 861325eb4b5..9bdfa692ca6 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcorecontrolplane.go index 46ab74dad44..84144dd2daa 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/method_get.go b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/method_get.go index eff0888c843..415b94efad1 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCapture result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/version.go index 4a0c87a1f18..fb2dbe9e7d8 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcaptures/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/README.md index 2aaf257c643..f141fe151fc 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane` Documentation -The `packetcorecontrolplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/client.go index 351920cd18e..9bd5d5e54b2 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneClient struct { } func NewPacketCoreControlPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/id_packetcorecontrolplane.go index 17beafd27d8..d92d6b2a762 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_get.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_get.go index 924161ba22f..a438ec92444 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneClient) Get(ctx context.Context, id PacketCoreCont var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_updatetags.go index 5da4d26d562..f6a59247905 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreControlPlaneClient) UpdateTags(ctx context.Context, id PacketC var model PacketCoreControlPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/version.go index 28eed6b994d..c160569423f 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplane/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplane/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/README.md index cc2373f36ad..a32f4ceb102 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage` Documentation -The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplanecollectdiagnosticspackage` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/client.go index d4f71ea2b81..532de4377bb 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneCollectDiagnosticsPackageClient struct { } func NewPacketCoreControlPlaneCollectDiagnosticsPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneCollectDiagnosticsPackageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanecollectdiagnosticspackage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneCollectDiagnosticsPackageClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go index 8d3d80dd4c7..2dba74cc18d 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/version.go index 0b713ec34b7..e3857a5132c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanecollectdiagnosticspackage/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanecollectdiagnosticspackage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanecollectdiagnosticspackage/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/README.md index 534bf471699..0a79eea2ada 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall` Documentation -The `packetcorecontrolplanereinstall` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplanereinstall` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/client.go index be193471bf0..32cce04f6a0 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneReinstallClient struct { } func NewPacketCoreControlPlaneReinstallClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneReinstallClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanereinstall", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneReinstallClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go index f8c20476681..09da463fc62 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/version.go index 83ccc66aad7..71659103054 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanereinstall/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanereinstall -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanereinstall/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/README.md index 97283287d02..8f844de4c8b 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback` Documentation -The `packetcorecontrolplanerollback` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplanerollback` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/client.go index 5535806d33e..b2ddaa43651 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneRollbackClient struct { } func NewPacketCoreControlPlaneRollbackClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneRollbackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanerollback", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneRollbackClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go index 9704b0e3cd4..0cb5e961e07 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/version.go index 322915cb062..c56a1a4d0da 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanerollback/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanerollback -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanerollback/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanerollback/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/README.md index 606178717b2..db4e31d0187 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes` Documentation -The `packetcorecontrolplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/client.go index c622dd3046c..0e8be1ffa17 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlanesClient struct { } func NewPacketCoreControlPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/version.go index 0ab040e0a85..5924cf083b1 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplanes/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplanes/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/README.md index 79d9ee21413..6a0eb2c2d27 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion` Documentation -The `packetcorecontrolplaneversion` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcorecontrolplaneversion` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/client.go index 8467e64af60..ad620a0b4aa 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/client.go @@ -15,7 +15,7 @@ type PacketCoreControlPlaneVersionClient struct { } func NewPacketCoreControlPlaneVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreControlPlaneVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcorecontrolplaneversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreControlPlaneVersionClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go index 3b635613407..5dc157f5bc3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_packetcorecontrolplaneversion.go @@ -38,7 +38,7 @@ func ParsePacketCoreControlPlaneVersionID(input string) (*PacketCoreControlPlane } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePacketCoreControlPlaneVersionIDInsensitively(input string) (*PacketCor } id := PacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go index a377ac5e588..00b72eb312a 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/id_providerpacketcorecontrolplaneversion.go @@ -40,7 +40,7 @@ func ParseProviderPacketCoreControlPlaneVersionID(input string) (*ProviderPacket } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderPacketCoreControlPlaneVersionIDInsensitively(input string) (*P } id := ProviderPacketCoreControlPlaneVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_get.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_get.go index 86ea0a903b5..53680407e0e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) Get(ctx context.Context, id PacketC var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_getbysubscription.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_getbysubscription.go index 164ea846640..c17b829d7ce 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_getbysubscription.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/method_getbysubscription.go @@ -45,7 +45,6 @@ func (c PacketCoreControlPlaneVersionClient) GetBySubscription(ctx context.Conte var model PacketCoreControlPlaneVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/version.go index 45cb8bb758a..030dc1f2846 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcorecontrolplaneversion/version.go @@ -1,12 +1,10 @@ package packetcorecontrolplaneversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcorecontrolplaneversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcorecontrolplaneversion/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/README.md index f65edc11c15..d0e28cdb7f3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane` Documentation -The `packetcoredataplane` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcoredataplane` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/client.go index dc550d86f7a..d4703ae7e6c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlaneClient struct { } func NewPacketCoreDataPlaneClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlaneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplane", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplane", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlaneClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/id_packetcoredataplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/id_packetcoredataplane.go index 719ad90ad50..2970349814b 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/id_packetcoredataplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/id_packetcoredataplane.go @@ -44,7 +44,7 @@ func ParsePacketCoreDataPlaneID(input string) (*PacketCoreDataPlaneId, error) { } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCoreDataPlaneIDInsensitively(input string) (*PacketCoreDataPlane } id := PacketCoreDataPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_get.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_get.go index 6557c7e767d..b4b4fd385b2 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_get.go @@ -45,7 +45,6 @@ func (c PacketCoreDataPlaneClient) Get(ctx context.Context, id PacketCoreDataPla var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_updatetags.go index 0f4fe0d633b..81b29718659 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/method_updatetags.go @@ -49,7 +49,6 @@ func (c PacketCoreDataPlaneClient) UpdateTags(ctx context.Context, id PacketCore var model PacketCoreDataPlane result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/version.go index 21fd55e9eff..03801c940a6 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplane/version.go @@ -1,12 +1,10 @@ package packetcoredataplane -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplane/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplane/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/README.md b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/README.md index e10eab6b151..cc00c9c9516 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes` Documentation -The `packetcoredataplanes` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `packetcoredataplanes` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/client.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/client.go index 94e7e7d1d1b..83e592850fa 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/client.go @@ -15,7 +15,7 @@ type PacketCoreDataPlanesClient struct { } func NewPacketCoreDataPlanesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCoreDataPlanesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcoredataplanes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcoredataplanes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCoreDataPlanesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/id_packetcorecontrolplane.go index 5d027d57473..6d26b9e37ad 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/version.go b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/version.go index d49977d9341..64937e1aed4 100644 --- a/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/packetcoredataplanes/version.go @@ -1,12 +1,10 @@ package packetcoredataplanes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcoredataplanes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcoredataplanes/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/routinginfo/README.md b/resource-manager/mobilenetwork/2024-04-01/routinginfo/README.md index 4388599cf1a..87de1d4d936 100644 --- a/resource-manager/mobilenetwork/2024-04-01/routinginfo/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/routinginfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/routinginfo` Documentation -The `routinginfo` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `routinginfo` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/routinginfo/client.go b/resource-manager/mobilenetwork/2024-04-01/routinginfo/client.go index c4b4a2c705f..37c7be47d2d 100644 --- a/resource-manager/mobilenetwork/2024-04-01/routinginfo/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/routinginfo/client.go @@ -15,7 +15,7 @@ type RoutingInfoClient struct { } func NewRoutingInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutingInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routinginfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routinginfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoutingInfoClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/routinginfo/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/routinginfo/id_packetcorecontrolplane.go index 92df00c4f17..3b4c9ee4f73 100644 --- a/resource-manager/mobilenetwork/2024-04-01/routinginfo/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/routinginfo/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/routinginfo/method_get.go b/resource-manager/mobilenetwork/2024-04-01/routinginfo/method_get.go index 75927eb370d..cf0ac93e215 100644 --- a/resource-manager/mobilenetwork/2024-04-01/routinginfo/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/routinginfo/method_get.go @@ -46,7 +46,6 @@ func (c RoutingInfoClient) Get(ctx context.Context, id PacketCoreControlPlaneId) var model RoutingInfoModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/routinginfo/version.go b/resource-manager/mobilenetwork/2024-04-01/routinginfo/version.go index 42ef32f4aa1..63c92534435 100644 --- a/resource-manager/mobilenetwork/2024-04-01/routinginfo/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/routinginfo/version.go @@ -1,12 +1,10 @@ package routinginfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routinginfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routinginfo/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/service/README.md b/resource-manager/mobilenetwork/2024-04-01/service/README.md index 7256e60924e..804490dbc49 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `service` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/service/client.go b/resource-manager/mobilenetwork/2024-04-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/service/id_service.go b/resource-manager/mobilenetwork/2024-04-01/service/id_service.go index cd77155d153..5e47bdaa485 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/id_service.go +++ b/resource-manager/mobilenetwork/2024-04-01/service/id_service.go @@ -44,7 +44,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/service/method_get.go b/resource-manager/mobilenetwork/2024-04-01/service/method_get.go index aa0841483b1..4bbd23711f8 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/service/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/service/method_updatetags.go index 919c2c845df..ea1ba2b6c18 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/service/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceClient) UpdateTags(ctx context.Context, id ServiceId, input TagsO var model Service result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/service/version.go b/resource-manager/mobilenetwork/2024-04-01/service/version.go index ccc96696bd5..113b4f7dbe2 100644 --- a/resource-manager/mobilenetwork/2024-04-01/service/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/services/README.md b/resource-manager/mobilenetwork/2024-04-01/services/README.md index 71c87e6a610..807769ba2ab 100644 --- a/resource-manager/mobilenetwork/2024-04-01/services/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `services` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/services/client.go b/resource-manager/mobilenetwork/2024-04-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/services/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/services/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/services/id_mobilenetwork.go index aaa57c61499..8d716181fbd 100644 --- a/resource-manager/mobilenetwork/2024-04-01/services/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/services/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/services/version.go b/resource-manager/mobilenetwork/2024-04-01/services/version.go index a4433d1c2c1..c326c1f0be3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/services/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/sim/README.md b/resource-manager/mobilenetwork/2024-04-01/sim/README.md index 4e02763f062..5ac23ec878d 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sim/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/sim/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/sim` Documentation -The `sim` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `sim` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/sim/client.go b/resource-manager/mobilenetwork/2024-04-01/sim/client.go index 8a43d650628..457692ff979 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sim/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/sim/client.go @@ -15,7 +15,7 @@ type SIMClient struct { } func NewSIMClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sim", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sim", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/sim/id_sim.go b/resource-manager/mobilenetwork/2024-04-01/sim/id_sim.go index 4fb50ab65ce..5cd81cd9d0e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sim/id_sim.go +++ b/resource-manager/mobilenetwork/2024-04-01/sim/id_sim.go @@ -44,7 +44,7 @@ func ParseSimID(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimIDInsensitively(input string) (*SimId, error) { } id := SimId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/sim/method_get.go b/resource-manager/mobilenetwork/2024-04-01/sim/method_get.go index 6b99fbc6db7..3855c3d0263 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sim/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/sim/method_get.go @@ -45,7 +45,6 @@ func (c SIMClient) Get(ctx context.Context, id SimId) (result GetOperationRespon var model Sim result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/sim/version.go b/resource-manager/mobilenetwork/2024-04-01/sim/version.go index 6b6b3562871..9192d8fbfa3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sim/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/sim/version.go @@ -1,12 +1,10 @@ package sim -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sim/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sim/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/README.md b/resource-manager/mobilenetwork/2024-04-01/simgroup/README.md index 9bafbbd09d6..ff0e788eaa7 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/simgroup` Documentation -The `simgroup` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `simgroup` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/client.go b/resource-manager/mobilenetwork/2024-04-01/simgroup/client.go index 246564366ab..336b11646d5 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/client.go @@ -15,7 +15,7 @@ type SIMGroupClient struct { } func NewSIMGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/id_simgroup.go b/resource-manager/mobilenetwork/2024-04-01/simgroup/id_simgroup.go index 9da4886e888..d382c0ee97c 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/id_simgroup.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/method_get.go b/resource-manager/mobilenetwork/2024-04-01/simgroup/method_get.go index 6ea6342dc94..f9a5b7170a7 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/method_get.go @@ -45,7 +45,6 @@ func (c SIMGroupClient) Get(ctx context.Context, id SimGroupId) (result GetOpera var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/simgroup/method_updatetags.go index 3757c9fafb7..6908c6298ae 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/method_updatetags.go @@ -49,7 +49,6 @@ func (c SIMGroupClient) UpdateTags(ctx context.Context, id SimGroupId, input Ide var model SimGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroup/version.go b/resource-manager/mobilenetwork/2024-04-01/simgroup/version.go index ef20bf93542..af033c24e72 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroup/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroup/version.go @@ -1,12 +1,10 @@ package simgroup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroup/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroups/README.md b/resource-manager/mobilenetwork/2024-04-01/simgroups/README.md index 589bc36d26a..3008925634e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroups/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/simgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/simgroups` Documentation -The `simgroups` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `simgroups` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroups/client.go b/resource-manager/mobilenetwork/2024-04-01/simgroups/client.go index 3bbaf2d36ff..23c53aad636 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroups/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroups/client.go @@ -15,7 +15,7 @@ type SIMGroupsClient struct { } func NewSIMGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMGroupsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/simgroups/version.go b/resource-manager/mobilenetwork/2024-04-01/simgroups/version.go index a5b3187adaa..d064861bd9e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simgroups/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/simgroups/version.go @@ -1,12 +1,10 @@ package simgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simgroups/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicies/README.md b/resource-manager/mobilenetwork/2024-04-01/simpolicies/README.md index ab00e91bc8f..548855f4ced 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicies/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/simpolicies` Documentation -The `simpolicies` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `simpolicies` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicies/client.go b/resource-manager/mobilenetwork/2024-04-01/simpolicies/client.go index 44d15eac3ad..2e42bbf7665 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicies/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicies/client.go @@ -15,7 +15,7 @@ type SIMPoliciesClient struct { } func NewSIMPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPoliciesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicies/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/simpolicies/id_mobilenetwork.go index 9c9024dc846..1ac55d2c654 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicies/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicies/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicies/version.go b/resource-manager/mobilenetwork/2024-04-01/simpolicies/version.go index ac5ed0846d5..66210a5da64 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicies/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicies/version.go @@ -1,12 +1,10 @@ package simpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicies/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/README.md b/resource-manager/mobilenetwork/2024-04-01/simpolicy/README.md index 66a4c6fe224..01e41b7c425 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/simpolicy` Documentation -The `simpolicy` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `simpolicy` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/client.go b/resource-manager/mobilenetwork/2024-04-01/simpolicy/client.go index b6a8741ef88..4ce44ec7ed6 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/client.go @@ -15,7 +15,7 @@ type SIMPolicyClient struct { } func NewSIMPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "simpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "simpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMPolicyClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/id_simpolicy.go b/resource-manager/mobilenetwork/2024-04-01/simpolicy/id_simpolicy.go index ffd989be75a..d9d5a34a027 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/id_simpolicy.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/id_simpolicy.go @@ -44,7 +44,7 @@ func ParseSimPolicyID(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSimPolicyIDInsensitively(input string) (*SimPolicyId, error) { } id := SimPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesget.go b/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesget.go index e4dcc89e2df..327e2ad7e67 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesget.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesget.go @@ -45,7 +45,6 @@ func (c SIMPolicyClient) SimPoliciesGet(ctx context.Context, id SimPolicyId) (re var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesupdatetags.go b/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesupdatetags.go index dd132c078aa..83f0a073a4a 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesupdatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/method_simpoliciesupdatetags.go @@ -49,7 +49,6 @@ func (c SIMPolicyClient) SimPoliciesUpdateTags(ctx context.Context, id SimPolicy var model SimPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/simpolicy/version.go b/resource-manager/mobilenetwork/2024-04-01/simpolicy/version.go index ae00e718187..43a9de32cae 100644 --- a/resource-manager/mobilenetwork/2024-04-01/simpolicy/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/simpolicy/version.go @@ -1,12 +1,10 @@ package simpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/simpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/simpolicy/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/sims/README.md b/resource-manager/mobilenetwork/2024-04-01/sims/README.md index 2040c045198..9b45b182964 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sims/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/sims/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/sims` Documentation -The `sims` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `sims` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/sims/client.go b/resource-manager/mobilenetwork/2024-04-01/sims/client.go index e74a1379d26..da97ae5e79f 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sims/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/sims/client.go @@ -15,7 +15,7 @@ type SIMsClient struct { } func NewSIMsClientWithBaseURI(sdkApi sdkEnv.Api) (*SIMsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sims", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sims", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SIMsClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/sims/id_simgroup.go b/resource-manager/mobilenetwork/2024-04-01/sims/id_simgroup.go index b76d96d5cfb..2c21f8a2c1a 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sims/id_simgroup.go +++ b/resource-manager/mobilenetwork/2024-04-01/sims/id_simgroup.go @@ -42,7 +42,7 @@ func ParseSimGroupID(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSimGroupIDInsensitively(input string) (*SimGroupId, error) { } id := SimGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/sims/version.go b/resource-manager/mobilenetwork/2024-04-01/sims/version.go index fbb4e3a72d0..ccecd4d780e 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sims/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/sims/version.go @@ -1,12 +1,10 @@ package sims -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sims/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sims/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/site/README.md b/resource-manager/mobilenetwork/2024-04-01/site/README.md index 9419d39b367..6d2050bf354 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/site/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/site` Documentation -The `site` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `site` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/site/client.go b/resource-manager/mobilenetwork/2024-04-01/site/client.go index 9cd860565b2..bab4d23cff8 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/site/client.go @@ -15,7 +15,7 @@ type SiteClient struct { } func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "site", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "site", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SiteClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/site/id_site.go b/resource-manager/mobilenetwork/2024-04-01/site/id_site.go index 9eddac47c82..8760d021672 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/id_site.go +++ b/resource-manager/mobilenetwork/2024-04-01/site/id_site.go @@ -44,7 +44,7 @@ func ParseSiteID(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteIDInsensitively(input string) (*SiteId, error) { } id := SiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/site/method_get.go b/resource-manager/mobilenetwork/2024-04-01/site/method_get.go index d4bac52e0fa..f6b55484e63 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/site/method_get.go @@ -45,7 +45,6 @@ func (c SiteClient) Get(ctx context.Context, id SiteId) (result GetOperationResp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/site/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/site/method_updatetags.go index 995a94bf857..d6fc0f56612 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/site/method_updatetags.go @@ -49,7 +49,6 @@ func (c SiteClient) UpdateTags(ctx context.Context, id SiteId, input TagsObject) var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/site/version.go b/resource-manager/mobilenetwork/2024-04-01/site/version.go index 333dc1edea6..5aa7f8a6d93 100644 --- a/resource-manager/mobilenetwork/2024-04-01/site/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/site/version.go @@ -1,12 +1,10 @@ package site -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/site/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/site/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/sites/README.md b/resource-manager/mobilenetwork/2024-04-01/sites/README.md index ca1d438269f..09095f9eb1f 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sites/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/sites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/sites` Documentation -The `sites` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `sites` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/sites/client.go b/resource-manager/mobilenetwork/2024-04-01/sites/client.go index 3ab027d9c58..b8916d5d028 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sites/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/sites/client.go @@ -15,7 +15,7 @@ type SitesClient struct { } func NewSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*SitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SitesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/sites/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/sites/id_mobilenetwork.go index c8015f27277..a7b557bc58f 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sites/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/sites/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/sites/version.go b/resource-manager/mobilenetwork/2024-04-01/sites/version.go index 79bb76a9c5e..4b81b7400e0 100644 --- a/resource-manager/mobilenetwork/2024-04-01/sites/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/sites/version.go @@ -1,12 +1,10 @@ package sites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sites/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/README.md b/resource-manager/mobilenetwork/2024-04-01/slice/README.md index 71d9cc5dd07..9cc87e85fa2 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/slice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/slice` Documentation -The `slice` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `slice` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/client.go b/resource-manager/mobilenetwork/2024-04-01/slice/client.go index 554bd7acc02..7556daa518d 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/slice/client.go @@ -15,7 +15,7 @@ type SliceClient struct { } func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SliceClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/id_slice.go b/resource-manager/mobilenetwork/2024-04-01/slice/id_slice.go index 735c1e9f3ed..b0644547e67 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/id_slice.go +++ b/resource-manager/mobilenetwork/2024-04-01/slice/id_slice.go @@ -44,7 +44,7 @@ func ParseSliceID(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSliceIDInsensitively(input string) (*SliceId, error) { } id := SliceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/method_get.go b/resource-manager/mobilenetwork/2024-04-01/slice/method_get.go index 0b43d2deb19..9a67c294cdd 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/method_get.go +++ b/resource-manager/mobilenetwork/2024-04-01/slice/method_get.go @@ -45,7 +45,6 @@ func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationRe var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/method_updatetags.go b/resource-manager/mobilenetwork/2024-04-01/slice/method_updatetags.go index faa019844ae..8f1fd42c3d6 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/method_updatetags.go +++ b/resource-manager/mobilenetwork/2024-04-01/slice/method_updatetags.go @@ -49,7 +49,6 @@ func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObjec var model Slice result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mobilenetwork/2024-04-01/slice/version.go b/resource-manager/mobilenetwork/2024-04-01/slice/version.go index 6c12d0af4b1..774106233a0 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slice/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/slice/version.go @@ -1,12 +1,10 @@ package slice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slice/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/slices/README.md b/resource-manager/mobilenetwork/2024-04-01/slices/README.md index f77c39d279e..562bae0f805 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slices/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/slices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/slices` Documentation -The `slices` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `slices` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/slices/client.go b/resource-manager/mobilenetwork/2024-04-01/slices/client.go index 1f866fe2398..170a5cd0ab5 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slices/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/slices/client.go @@ -15,7 +15,7 @@ type SlicesClient struct { } func NewSlicesClientWithBaseURI(sdkApi sdkEnv.Api) (*SlicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "slices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "slices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SlicesClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/slices/id_mobilenetwork.go b/resource-manager/mobilenetwork/2024-04-01/slices/id_mobilenetwork.go index d1c5c1d405b..d866b2a8cd1 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slices/id_mobilenetwork.go +++ b/resource-manager/mobilenetwork/2024-04-01/slices/id_mobilenetwork.go @@ -42,7 +42,7 @@ func ParseMobileNetworkID(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMobileNetworkIDInsensitively(input string) (*MobileNetworkId, error) { } id := MobileNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/slices/version.go b/resource-manager/mobilenetwork/2024-04-01/slices/version.go index 98523561f74..33ad06308ff 100644 --- a/resource-manager/mobilenetwork/2024-04-01/slices/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/slices/version.go @@ -1,12 +1,10 @@ package slices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/slices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/slices/2024-04-01" } diff --git a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/README.md b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/README.md index 3a9638d1f59..64604182413 100644 --- a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/README.md +++ b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-04-01/ueinformationlist` Documentation -The `ueinformationlist` SDK allows for interaction with the Azure Resource Manager Service `mobilenetwork` (API Version `2024-04-01`). +The `ueinformationlist` SDK allows for interaction with Azure Resource Manager `mobilenetwork` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/client.go b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/client.go index 8e4dde0f9fd..fc56dcf9c95 100644 --- a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/client.go +++ b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/client.go @@ -15,7 +15,7 @@ type UeInformationListClient struct { } func NewUeInformationListClientWithBaseURI(sdkApi sdkEnv.Api) (*UeInformationListClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ueinformationlist", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ueinformationlist", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UeInformationListClient: %+v", err) } diff --git a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/id_packetcorecontrolplane.go b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/id_packetcorecontrolplane.go index 9b7cb47ca7c..5ac25eea653 100644 --- a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/id_packetcorecontrolplane.go +++ b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/id_packetcorecontrolplane.go @@ -42,7 +42,7 @@ func ParsePacketCoreControlPlaneID(input string) (*PacketCoreControlPlaneId, err } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePacketCoreControlPlaneIDInsensitively(input string) (*PacketCoreContro } id := PacketCoreControlPlaneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/version.go b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/version.go index 0be13eee018..8658dbc98e3 100644 --- a/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/version.go +++ b/resource-manager/mobilenetwork/2024-04-01/ueinformationlist/version.go @@ -1,12 +1,10 @@ package ueinformationlist -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ueinformationlist/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ueinformationlist/2024-04-01" } diff --git a/resource-manager/mongocluster/2024-07-01/client.go b/resource-manager/mongocluster/2024-07-01/client.go new file mode 100644 index 00000000000..14139e4cc22 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/client.go @@ -0,0 +1,64 @@ +package v2024_07_01 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/mongoclusters" + "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privatelinks" + "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/replicas" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + FirewallRules *firewallrules.FirewallRulesClient + MongoClusters *mongoclusters.MongoClustersClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinks *privatelinks.PrivateLinksClient + Replicas *replicas.ReplicasClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + firewallRulesClient, err := firewallrules.NewFirewallRulesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building FirewallRules client: %+v", err) + } + configureFunc(firewallRulesClient.Client) + + mongoClustersClient, err := mongoclusters.NewMongoClustersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building MongoClusters client: %+v", err) + } + configureFunc(mongoClustersClient.Client) + + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) + } + configureFunc(privateEndpointConnectionsClient.Client) + + privateLinksClient, err := privatelinks.NewPrivateLinksClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateLinks client: %+v", err) + } + configureFunc(privateLinksClient.Client) + + replicasClient, err := replicas.NewReplicasClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Replicas client: %+v", err) + } + configureFunc(replicasClient.Client) + + return &Client{ + FirewallRules: firewallRulesClient, + MongoClusters: mongoClustersClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinks: privateLinksClient, + Replicas: replicasClient, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/README.md b/resource-manager/mongocluster/2024-07-01/firewallrules/README.md new file mode 100644 index 00000000000..97cd4258402 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/firewallrules` Documentation + +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mongocluster` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/firewallrules" +``` + + +### Client Initialization + +```go +client := firewallrules.NewFirewallRulesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `FirewallRulesClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "firewallRuleValue") + +payload := firewallrules.FirewallRule{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `FirewallRulesClient.Delete` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "firewallRuleValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `FirewallRulesClient.Get` + +```go +ctx := context.TODO() +id := firewallrules.NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "firewallRuleValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `FirewallRulesClient.ListByMongoCluster` + +```go +ctx := context.TODO() +id := firewallrules.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +// alternatively `client.ListByMongoCluster(ctx, id)` can be used to do batched pagination +items, err := client.ListByMongoClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/client.go b/resource-manager/mongocluster/2024-07-01/firewallrules/client.go new file mode 100644 index 00000000000..5ecd222a8c7 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/client.go @@ -0,0 +1,26 @@ +package firewallrules + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRulesClient struct { + Client *resourcemanager.Client +} + +func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) + } + + return &FirewallRulesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/constants.go b/resource-manager/mongocluster/2024-07-01/firewallrules/constants.go new file mode 100644 index 00000000000..4d73490ad59 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/constants.go @@ -0,0 +1,63 @@ +package firewallrules + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDropping ProvisioningState = "Dropping" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateDropping), + string(ProvisioningStateFailed), + string(ProvisioningStateInProgress), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "dropping": ProvisioningStateDropping, + "failed": ProvisioningStateFailed, + "inprogress": ProvisioningStateInProgress, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule.go b/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule.go new file mode 100644 index 00000000000..aa627cff6ce --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule.go @@ -0,0 +1,139 @@ +package firewallrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FirewallRuleId{}) +} + +var _ resourceids.ResourceId = &FirewallRuleId{} + +// FirewallRuleId is a struct representing the Resource ID for a Firewall Rule +type FirewallRuleId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string + FirewallRuleName string +} + +// NewFirewallRuleID returns a new FirewallRuleId struct +func NewFirewallRuleID(subscriptionId string, resourceGroupName string, mongoClusterName string, firewallRuleName string) FirewallRuleId { + return FirewallRuleId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + FirewallRuleName: firewallRuleName, + } +} + +// ParseFirewallRuleID parses 'input' into a FirewallRuleId +func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&FirewallRuleId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FirewallRuleId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFirewallRuleIDInsensitively parses 'input' case-insensitively into a FirewallRuleId +// note: this method should only be used for API response data and not user input +func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { + parser := resourceids.NewParserFromResourceIdType(&FirewallRuleId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FirewallRuleId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FirewallRuleId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + if id.FirewallRuleName, ok = input.Parsed["firewallRuleName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "firewallRuleName", input) + } + + return nil +} + +// ValidateFirewallRuleID checks that 'input' can be parsed as a Firewall Rule ID +func ValidateFirewallRuleID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFirewallRuleID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Firewall Rule ID +func (id FirewallRuleId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s/firewallRules/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName, id.FirewallRuleName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Firewall Rule ID +func (id FirewallRuleId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + resourceids.StaticSegment("staticFirewallRules", "firewallRules", "firewallRules"), + resourceids.UserSpecifiedSegment("firewallRuleName", "firewallRuleValue"), + } +} + +// String returns a human-readable description of this Firewall Rule ID +func (id FirewallRuleId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + fmt.Sprintf("Firewall Rule Name: %q", id.FirewallRuleName), + } + return fmt.Sprintf("Firewall Rule (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule_test.go b/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule_test.go new file mode 100644 index 00000000000..0fed627110b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/id_firewallrule_test.go @@ -0,0 +1,327 @@ +package firewallrules + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &FirewallRuleId{} + +func TestNewFirewallRuleID(t *testing.T) { + id := NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "firewallRuleValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } + + if id.FirewallRuleName != "firewallRuleValue" { + t.Fatalf("Expected %q but got %q for Segment 'FirewallRuleName'", id.FirewallRuleName, "firewallRuleValue") + } +} + +func TestFormatFirewallRuleID(t *testing.T) { + actual := NewFirewallRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "firewallRuleValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules/firewallRuleValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseFirewallRuleID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *FirewallRuleId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules/firewallRuleValue", + Expected: &FirewallRuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + FirewallRuleName: "firewallRuleValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules/firewallRuleValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseFirewallRuleID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + if actual.FirewallRuleName != v.Expected.FirewallRuleName { + t.Fatalf("Expected %q but got %q for FirewallRuleName", v.Expected.FirewallRuleName, actual.FirewallRuleName) + } + + } +} + +func TestParseFirewallRuleIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *FirewallRuleId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/fIrEwAlLrUlEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules/firewallRuleValue", + Expected: &FirewallRuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + FirewallRuleName: "firewallRuleValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/firewallRules/firewallRuleValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/fIrEwAlLrUlEs/fIrEwAlLrUlEvAlUe", + Expected: &FirewallRuleId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + FirewallRuleName: "fIrEwAlLrUlEvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/fIrEwAlLrUlEs/fIrEwAlLrUlEvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseFirewallRuleIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + if actual.FirewallRuleName != v.Expected.FirewallRuleName { + t.Fatalf("Expected %q but got %q for FirewallRuleName", v.Expected.FirewallRuleName, actual.FirewallRuleName) + } + + } +} + +func TestSegmentsForFirewallRuleId(t *testing.T) { + segments := FirewallRuleId{}.Segments() + if len(segments) == 0 { + t.Fatalf("FirewallRuleId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster.go b/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster.go new file mode 100644 index 00000000000..36dce560b0b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster.go @@ -0,0 +1,130 @@ +package firewallrules + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MongoClusterId{}) +} + +var _ resourceids.ResourceId = &MongoClusterId{} + +// MongoClusterId is a struct representing the Resource ID for a Mongo Cluster +type MongoClusterId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string +} + +// NewMongoClusterID returns a new MongoClusterId struct +func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId { + return MongoClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + } +} + +// ParseMongoClusterID parses 'input' into a MongoClusterId +func ParseMongoClusterID(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMongoClusterIDInsensitively parses 'input' case-insensitively into a MongoClusterId +// note: this method should only be used for API response data and not user input +func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongoClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + return nil +} + +// ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID +func ValidateMongoClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMongoClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Mongo Cluster ID +func (id MongoClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID +func (id MongoClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + } +} + +// String returns a human-readable description of this Mongo Cluster ID +func (id MongoClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + } + return fmt.Sprintf("Mongo Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster_test.go b/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster_test.go new file mode 100644 index 00000000000..df275e41feb --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/id_mongocluster_test.go @@ -0,0 +1,282 @@ +package firewallrules + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MongoClusterId{} + +func TestNewMongoClusterID(t *testing.T) { + id := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } +} + +func TestFormatMongoClusterID(t *testing.T) { + actual := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseMongoClusterID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestParseMongoClusterIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestSegmentsForMongoClusterId(t *testing.T) { + segments := MongoClusterId{}.Segments() + if len(segments) == 0 { + t.Fatalf("MongoClusterId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/method_createorupdate.go b/resource-manager/mongocluster/2024-07-01/firewallrules/method_createorupdate.go new file mode 100644 index 00000000000..8a5fca1cd9f --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/method_createorupdate.go @@ -0,0 +1,76 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *FirewallRule +} + +// CreateOrUpdate ... +func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRuleId, input FirewallRule) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c FirewallRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallRuleId, input FirewallRule) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/method_delete.go b/resource-manager/mongocluster/2024-07-01/firewallrules/method_delete.go new file mode 100644 index 00000000000..4eaea8443be --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/method_delete.go @@ -0,0 +1,70 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c FirewallRulesClient) Delete(ctx context.Context, id FirewallRuleId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c FirewallRulesClient) DeleteThenPoll(ctx context.Context, id FirewallRuleId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/method_get.go b/resource-manager/mongocluster/2024-07-01/firewallrules/method_get.go new file mode 100644 index 00000000000..6b53b2919c9 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/method_get.go @@ -0,0 +1,53 @@ +package firewallrules + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *FirewallRule +} + +// Get ... +func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model FirewallRule + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/method_listbymongocluster.go b/resource-manager/mongocluster/2024-07-01/firewallrules/method_listbymongocluster.go new file mode 100644 index 00000000000..b26faa50f98 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/method_listbymongocluster.go @@ -0,0 +1,105 @@ +package firewallrules + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByMongoClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]FirewallRule +} + +type ListByMongoClusterCompleteResult struct { + LatestHttpResponse *http.Response + Items []FirewallRule +} + +type ListByMongoClusterCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByMongoClusterCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByMongoCluster ... +func (c FirewallRulesClient) ListByMongoCluster(ctx context.Context, id MongoClusterId) (result ListByMongoClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByMongoClusterCustomPager{}, + Path: fmt.Sprintf("%s/firewallRules", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]FirewallRule `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByMongoClusterComplete retrieves all the results into a single object +func (c FirewallRulesClient) ListByMongoClusterComplete(ctx context.Context, id MongoClusterId) (ListByMongoClusterCompleteResult, error) { + return c.ListByMongoClusterCompleteMatchingPredicate(ctx, id, FirewallRuleOperationPredicate{}) +} + +// ListByMongoClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c FirewallRulesClient) ListByMongoClusterCompleteMatchingPredicate(ctx context.Context, id MongoClusterId, predicate FirewallRuleOperationPredicate) (result ListByMongoClusterCompleteResult, err error) { + items := make([]FirewallRule, 0) + + resp, err := c.ListByMongoCluster(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByMongoClusterCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallrule.go b/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallrule.go new file mode 100644 index 00000000000..cf1f4b4439d --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallrule.go @@ -0,0 +1,16 @@ +package firewallrules + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *FirewallRuleProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallruleproperties.go b/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallruleproperties.go new file mode 100644 index 00000000000..ae5a1daae96 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/model_firewallruleproperties.go @@ -0,0 +1,10 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleProperties struct { + EndIPAddress string `json:"endIpAddress"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + StartIPAddress string `json:"startIpAddress"` +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/predicates.go b/resource-manager/mongocluster/2024-07-01/firewallrules/predicates.go new file mode 100644 index 00000000000..fb7011b1d3b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/predicates.go @@ -0,0 +1,27 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FirewallRuleOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p FirewallRuleOperationPredicate) Matches(input FirewallRule) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/mongocluster/2024-07-01/firewallrules/version.go b/resource-manager/mongocluster/2024-07-01/firewallrules/version.go new file mode 100644 index 00000000000..f9a09a9a1d9 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/firewallrules/version.go @@ -0,0 +1,10 @@ +package firewallrules + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/firewallrules/2024-07-01" +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/README.md b/resource-manager/mongocluster/2024-07-01/mongoclusters/README.md new file mode 100644 index 00000000000..06c0ae8e627 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/README.md @@ -0,0 +1,171 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/mongoclusters` Documentation + +The `mongoclusters` SDK allows for interaction with Azure Resource Manager `mongocluster` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/mongoclusters" +``` + + +### Client Initialization + +```go +client := mongoclusters.NewMongoClustersClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MongoClustersClient.CheckNameAvailability` + +```go +ctx := context.TODO() +id := mongoclusters.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + +payload := mongoclusters.CheckNameAvailabilityRequest{ + // ... +} + + +read, err := client.CheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MongoClustersClient.CreateOrUpdate` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +payload := mongoclusters.MongoCluster{ + // ... +} + + +if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MongoClustersClient.Delete` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `MongoClustersClient.Get` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MongoClustersClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MongoClustersClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MongoClustersClient.ListConnectionStrings` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +read, err := client.ListConnectionStrings(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MongoClustersClient.Promote` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +payload := mongoclusters.PromoteReplicaRequest{ + // ... +} + + +if err := client.PromoteThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `MongoClustersClient.Update` + +```go +ctx := context.TODO() +id := mongoclusters.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +payload := mongoclusters.MongoClusterUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/client.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/client.go new file mode 100644 index 00000000000..2d0a465d2b9 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/client.go @@ -0,0 +1,26 @@ +package mongoclusters + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClustersClient struct { + Client *resourcemanager.Client +} + +func NewMongoClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*MongoClustersClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "mongoclusters", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MongoClustersClient: %+v", err) + } + + return &MongoClustersClient{ + Client: client, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/constants.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/constants.go new file mode 100644 index 00000000000..4835148e9a5 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/constants.go @@ -0,0 +1,594 @@ +package mongoclusters + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForCheckNameAvailabilityReason() []string { + return []string{ + string(CheckNameAvailabilityReasonAlreadyExists), + string(CheckNameAvailabilityReasonInvalid), + } +} + +func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { + vals := map[string]CheckNameAvailabilityReason{ + "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, + "invalid": CheckNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityReason(input) + return &out, nil +} + +type CreateMode string + +const ( + CreateModeDefault CreateMode = "Default" + CreateModeGeoReplica CreateMode = "GeoReplica" + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + CreateModeReplica CreateMode = "Replica" +) + +func PossibleValuesForCreateMode() []string { + return []string{ + string(CreateModeDefault), + string(CreateModeGeoReplica), + string(CreateModePointInTimeRestore), + string(CreateModeReplica), + } +} + +func (s *CreateMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCreateMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCreateMode(input string) (*CreateMode, error) { + vals := map[string]CreateMode{ + "default": CreateModeDefault, + "georeplica": CreateModeGeoReplica, + "pointintimerestore": CreateModePointInTimeRestore, + "replica": CreateModeReplica, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CreateMode(input) + return &out, nil +} + +type HighAvailabilityMode string + +const ( + HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" + HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" + HighAvailabilityModeZoneRedundantPreferred HighAvailabilityMode = "ZoneRedundantPreferred" +) + +func PossibleValuesForHighAvailabilityMode() []string { + return []string{ + string(HighAvailabilityModeDisabled), + string(HighAvailabilityModeSameZone), + string(HighAvailabilityModeZoneRedundantPreferred), + } +} + +func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHighAvailabilityMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { + vals := map[string]HighAvailabilityMode{ + "disabled": HighAvailabilityModeDisabled, + "samezone": HighAvailabilityModeSameZone, + "zoneredundantpreferred": HighAvailabilityModeZoneRedundantPreferred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HighAvailabilityMode(input) + return &out, nil +} + +type MongoClusterStatus string + +const ( + MongoClusterStatusDropping MongoClusterStatus = "Dropping" + MongoClusterStatusProvisioning MongoClusterStatus = "Provisioning" + MongoClusterStatusReady MongoClusterStatus = "Ready" + MongoClusterStatusStarting MongoClusterStatus = "Starting" + MongoClusterStatusStopped MongoClusterStatus = "Stopped" + MongoClusterStatusStopping MongoClusterStatus = "Stopping" + MongoClusterStatusUpdating MongoClusterStatus = "Updating" +) + +func PossibleValuesForMongoClusterStatus() []string { + return []string{ + string(MongoClusterStatusDropping), + string(MongoClusterStatusProvisioning), + string(MongoClusterStatusReady), + string(MongoClusterStatusStarting), + string(MongoClusterStatusStopped), + string(MongoClusterStatusStopping), + string(MongoClusterStatusUpdating), + } +} + +func (s *MongoClusterStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMongoClusterStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMongoClusterStatus(input string) (*MongoClusterStatus, error) { + vals := map[string]MongoClusterStatus{ + "dropping": MongoClusterStatusDropping, + "provisioning": MongoClusterStatusProvisioning, + "ready": MongoClusterStatusReady, + "starting": MongoClusterStatusStarting, + "stopped": MongoClusterStatusStopped, + "stopping": MongoClusterStatusStopping, + "updating": MongoClusterStatusUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MongoClusterStatus(input) + return &out, nil +} + +type PreviewFeature string + +const ( + PreviewFeatureGeoReplicas PreviewFeature = "GeoReplicas" +) + +func PossibleValuesForPreviewFeature() []string { + return []string{ + string(PreviewFeatureGeoReplicas), + } +} + +func (s *PreviewFeature) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePreviewFeature(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePreviewFeature(input string) (*PreviewFeature, error) { + vals := map[string]PreviewFeature{ + "georeplicas": PreviewFeatureGeoReplicas, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PreviewFeature(input) + return &out, nil +} + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} + +type PromoteMode string + +const ( + PromoteModeSwitchover PromoteMode = "Switchover" +) + +func PossibleValuesForPromoteMode() []string { + return []string{ + string(PromoteModeSwitchover), + } +} + +func (s *PromoteMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePromoteMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePromoteMode(input string) (*PromoteMode, error) { + vals := map[string]PromoteMode{ + "switchover": PromoteModeSwitchover, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PromoteMode(input) + return &out, nil +} + +type PromoteOption string + +const ( + PromoteOptionForced PromoteOption = "Forced" +) + +func PossibleValuesForPromoteOption() []string { + return []string{ + string(PromoteOptionForced), + } +} + +func (s *PromoteOption) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePromoteOption(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePromoteOption(input string) (*PromoteOption, error) { + vals := map[string]PromoteOption{ + "forced": PromoteOptionForced, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PromoteOption(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDropping ProvisioningState = "Dropping" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateDropping), + string(ProvisioningStateFailed), + string(ProvisioningStateInProgress), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "dropping": ProvisioningStateDropping, + "failed": ProvisioningStateFailed, + "inprogress": ProvisioningStateInProgress, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +func PossibleValuesForPublicNetworkAccess() []string { + return []string{ + string(PublicNetworkAccessDisabled), + string(PublicNetworkAccessEnabled), + } +} + +func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicNetworkAccess(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { + vals := map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccessDisabled, + "enabled": PublicNetworkAccessEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccess(input) + return &out, nil +} + +type ReplicationRole string + +const ( + ReplicationRoleAsyncReplica ReplicationRole = "AsyncReplica" + ReplicationRoleGeoAsyncReplica ReplicationRole = "GeoAsyncReplica" + ReplicationRolePrimary ReplicationRole = "Primary" +) + +func PossibleValuesForReplicationRole() []string { + return []string{ + string(ReplicationRoleAsyncReplica), + string(ReplicationRoleGeoAsyncReplica), + string(ReplicationRolePrimary), + } +} + +func (s *ReplicationRole) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicationRole(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicationRole(input string) (*ReplicationRole, error) { + vals := map[string]ReplicationRole{ + "asyncreplica": ReplicationRoleAsyncReplica, + "geoasyncreplica": ReplicationRoleGeoAsyncReplica, + "primary": ReplicationRolePrimary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicationRole(input) + return &out, nil +} + +type ReplicationState string + +const ( + ReplicationStateActive ReplicationState = "Active" + ReplicationStateBroken ReplicationState = "Broken" + ReplicationStateCatchup ReplicationState = "Catchup" + ReplicationStateProvisioning ReplicationState = "Provisioning" + ReplicationStateReconfiguring ReplicationState = "Reconfiguring" + ReplicationStateUpdating ReplicationState = "Updating" +) + +func PossibleValuesForReplicationState() []string { + return []string{ + string(ReplicationStateActive), + string(ReplicationStateBroken), + string(ReplicationStateCatchup), + string(ReplicationStateProvisioning), + string(ReplicationStateReconfiguring), + string(ReplicationStateUpdating), + } +} + +func (s *ReplicationState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicationState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicationState(input string) (*ReplicationState, error) { + vals := map[string]ReplicationState{ + "active": ReplicationStateActive, + "broken": ReplicationStateBroken, + "catchup": ReplicationStateCatchup, + "provisioning": ReplicationStateProvisioning, + "reconfiguring": ReplicationStateReconfiguring, + "updating": ReplicationStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicationState(input) + return &out, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location.go new file mode 100644 index 00000000000..f4c2cf6e876 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location.go @@ -0,0 +1,121 @@ +package mongoclusters + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&LocationId{}) +} + +var _ resourceids.ResourceId = &LocationId{} + +// LocationId is a struct representing the Resource ID for a Location +type LocationId struct { + SubscriptionId string + LocationName string +} + +// NewLocationID returns a new LocationId struct +func NewLocationID(subscriptionId string, locationName string) LocationId { + return LocationId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + } +} + +// ParseLocationID parses 'input' into a LocationId +func ParseLocationID(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId +// note: this method should only be used for API response data and not user input +func ParseLocationIDInsensitively(input string) (*LocationId, error) { + parser := resourceids.NewParserFromResourceIdType(&LocationId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := LocationId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.LocationName, ok = input.Parsed["locationName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) + } + + return nil +} + +// ValidateLocationID checks that 'input' can be parsed as a Location ID +func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseLocationID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Location ID +func (id LocationId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.DocumentDB/locations/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Location ID +func (id LocationId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationValue"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location_test.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location_test.go new file mode 100644 index 00000000000..900611d9d82 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_location_test.go @@ -0,0 +1,237 @@ +package mongoclusters + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &LocationId{} + +func TestNewLocationID(t *testing.T) { + id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.LocationName != "locationValue" { + t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") + } +} + +func TestFormatLocationID(t *testing.T) { + actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations/locationValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseLocationID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations/locationValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestParseLocationIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *LocationId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/lOcAtIoNs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations/locationValue", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "locationValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DocumentDB/locations/locationValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/lOcAtIoNs/lOcAtIoNvAlUe", + Expected: &LocationId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + LocationName: "lOcAtIoNvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/lOcAtIoNs/lOcAtIoNvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseLocationIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.LocationName != v.Expected.LocationName { + t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) + } + + } +} + +func TestSegmentsForLocationId(t *testing.T) { + segments := LocationId{}.Segments() + if len(segments) == 0 { + t.Fatalf("LocationId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster.go new file mode 100644 index 00000000000..7fa92267254 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster.go @@ -0,0 +1,130 @@ +package mongoclusters + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MongoClusterId{}) +} + +var _ resourceids.ResourceId = &MongoClusterId{} + +// MongoClusterId is a struct representing the Resource ID for a Mongo Cluster +type MongoClusterId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string +} + +// NewMongoClusterID returns a new MongoClusterId struct +func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId { + return MongoClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + } +} + +// ParseMongoClusterID parses 'input' into a MongoClusterId +func ParseMongoClusterID(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMongoClusterIDInsensitively parses 'input' case-insensitively into a MongoClusterId +// note: this method should only be used for API response data and not user input +func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongoClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + return nil +} + +// ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID +func ValidateMongoClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMongoClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Mongo Cluster ID +func (id MongoClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID +func (id MongoClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + } +} + +// String returns a human-readable description of this Mongo Cluster ID +func (id MongoClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + } + return fmt.Sprintf("Mongo Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster_test.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster_test.go new file mode 100644 index 00000000000..c0a0ff675d9 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/id_mongocluster_test.go @@ -0,0 +1,282 @@ +package mongoclusters + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MongoClusterId{} + +func TestNewMongoClusterID(t *testing.T) { + id := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } +} + +func TestFormatMongoClusterID(t *testing.T) { + actual := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseMongoClusterID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestParseMongoClusterIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestSegmentsForMongoClusterId(t *testing.T) { + segments := MongoClusterId{}.Segments() + if len(segments) == 0 { + t.Fatalf("MongoClusterId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_checknameavailability.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_checknameavailability.go new file mode 100644 index 00000000000..d29c03d95ff --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_checknameavailability.go @@ -0,0 +1,58 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CheckNameAvailabilityResponse +} + +// CheckNameAvailability ... +func (c MongoClustersClient) CheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityRequest) (result CheckNameAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/checkMongoClusterNameAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model CheckNameAvailabilityResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_createorupdate.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_createorupdate.go new file mode 100644 index 00000000000..d31c486a5a7 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_createorupdate.go @@ -0,0 +1,75 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOrUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MongoCluster +} + +// CreateOrUpdate ... +func (c MongoClustersClient) CreateOrUpdate(ctx context.Context, id MongoClusterId, input MongoCluster) (result CreateOrUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed +func (c MongoClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id MongoClusterId, input MongoCluster) error { + result, err := c.CreateOrUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing CreateOrUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_delete.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_delete.go new file mode 100644 index 00000000000..f2ab5c143c4 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_delete.go @@ -0,0 +1,70 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c MongoClustersClient) Delete(ctx context.Context, id MongoClusterId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c MongoClustersClient) DeleteThenPoll(ctx context.Context, id MongoClusterId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_get.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_get.go new file mode 100644 index 00000000000..19be380881a --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_get.go @@ -0,0 +1,53 @@ +package mongoclusters + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *MongoCluster +} + +// Get ... +func (c MongoClustersClient) Get(ctx context.Context, id MongoClusterId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model MongoCluster + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_list.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_list.go new file mode 100644 index 00000000000..957796bf605 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_list.go @@ -0,0 +1,106 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]MongoCluster +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []MongoCluster +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c MongoClustersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.DocumentDB/mongoClusters", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]MongoCluster `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MongoClustersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, MongoClusterOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MongoClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MongoClusterOperationPredicate) (result ListCompleteResult, err error) { + items := make([]MongoCluster, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listbyresourcegroup.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listbyresourcegroup.go new file mode 100644 index 00000000000..87c9b782210 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]MongoCluster +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []MongoCluster +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c MongoClustersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.DocumentDB/mongoClusters", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]MongoCluster `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c MongoClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, MongoClusterOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MongoClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MongoClusterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]MongoCluster, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listconnectionstrings.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listconnectionstrings.go new file mode 100644 index 00000000000..3ac12241859 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_listconnectionstrings.go @@ -0,0 +1,54 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListConnectionStringsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ListConnectionStringsResult +} + +// ListConnectionStrings ... +func (c MongoClustersClient) ListConnectionStrings(ctx context.Context, id MongoClusterId) (result ListConnectionStringsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listConnectionStrings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model ListConnectionStringsResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_promote.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_promote.go new file mode 100644 index 00000000000..e1305fefd77 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_promote.go @@ -0,0 +1,73 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PromoteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Promote ... +func (c MongoClustersClient) Promote(ctx context.Context, id MongoClusterId, input PromoteReplicaRequest) (result PromoteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/promote", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PromoteThenPoll performs Promote then polls until it's completed +func (c MongoClustersClient) PromoteThenPoll(ctx context.Context, id MongoClusterId, input PromoteReplicaRequest) error { + result, err := c.Promote(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Promote: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Promote: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/method_update.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_update.go new file mode 100644 index 00000000000..b0971a43763 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/method_update.go @@ -0,0 +1,75 @@ +package mongoclusters + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *MongoCluster +} + +// Update ... +func (c MongoClustersClient) Update(ctx context.Context, id MongoClusterId, input MongoClusterUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c MongoClustersClient) UpdateThenPoll(ctx context.Context, id MongoClusterId, input MongoClusterUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_administratorproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_administratorproperties.go new file mode 100644 index 00000000000..0d5e695ec05 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_administratorproperties.go @@ -0,0 +1,9 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdministratorProperties struct { + Password *string `json:"password,omitempty"` + UserName *string `json:"userName,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_backupproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_backupproperties.go new file mode 100644 index 00000000000..1a78556df72 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_backupproperties.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupProperties struct { + EarliestRestoreTime *string `json:"earliestRestoreTime,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityrequest.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityrequest.go new file mode 100644 index 00000000000..b834e55f5ff --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityrequest.go @@ -0,0 +1,9 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityRequest struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityresponse.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityresponse.go new file mode 100644 index 00000000000..51db08775d6 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_checknameavailabilityresponse.go @@ -0,0 +1,10 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CheckNameAvailabilityResponse struct { + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *CheckNameAvailabilityReason `json:"reason,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_computeproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_computeproperties.go new file mode 100644 index 00000000000..750d420bf66 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_computeproperties.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ComputeProperties struct { + Tier *string `json:"tier,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_connectionstring.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_connectionstring.go new file mode 100644 index 00000000000..75c56104190 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_connectionstring.go @@ -0,0 +1,10 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConnectionString struct { + ConnectionString *string `json:"connectionString,omitempty"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_highavailabilityproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_highavailabilityproperties.go new file mode 100644 index 00000000000..7aa466fd370 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_highavailabilityproperties.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailabilityProperties struct { + TargetMode *HighAvailabilityMode `json:"targetMode,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_listconnectionstringsresult.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_listconnectionstringsresult.go new file mode 100644 index 00000000000..bab5c322924 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_listconnectionstringsresult.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListConnectionStringsResult struct { + ConnectionStrings *[]ConnectionString `json:"connectionStrings,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongocluster.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongocluster.go new file mode 100644 index 00000000000..7f6d9cb3fd5 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongocluster.go @@ -0,0 +1,18 @@ +package mongoclusters + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoCluster struct { + Id *string `json:"id,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *MongoClusterProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterproperties.go new file mode 100644 index 00000000000..6474ffeeb4f --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterproperties.go @@ -0,0 +1,25 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterProperties struct { + Administrator *AdministratorProperties `json:"administrator,omitempty"` + Backup *BackupProperties `json:"backup,omitempty"` + ClusterStatus *MongoClusterStatus `json:"clusterStatus,omitempty"` + Compute *ComputeProperties `json:"compute,omitempty"` + ConnectionString *string `json:"connectionString,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + HighAvailability *HighAvailabilityProperties `json:"highAvailability,omitempty"` + InfrastructureVersion *string `json:"infrastructureVersion,omitempty"` + PreviewFeatures *[]PreviewFeature `json:"previewFeatures,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + Replica *ReplicationProperties `json:"replica,omitempty"` + ReplicaParameters *MongoClusterReplicaParameters `json:"replicaParameters,omitempty"` + RestoreParameters *MongoClusterRestoreParameters `json:"restoreParameters,omitempty"` + ServerVersion *string `json:"serverVersion,omitempty"` + Sharding *ShardingProperties `json:"sharding,omitempty"` + Storage *StorageProperties `json:"storage,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterreplicaparameters.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterreplicaparameters.go new file mode 100644 index 00000000000..d76486d9568 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterreplicaparameters.go @@ -0,0 +1,9 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterReplicaParameters struct { + SourceLocation string `json:"sourceLocation"` + SourceResourceId string `json:"sourceResourceId"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterrestoreparameters.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterrestoreparameters.go new file mode 100644 index 00000000000..0cc10482f00 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterrestoreparameters.go @@ -0,0 +1,27 @@ +package mongoclusters + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterRestoreParameters struct { + PointInTimeUTC *string `json:"pointInTimeUTC,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (o *MongoClusterRestoreParameters) GetPointInTimeUTCAsTime() (*time.Time, error) { + if o.PointInTimeUTC == nil { + return nil, nil + } + return dates.ParseAsFormat(o.PointInTimeUTC, "2006-01-02T15:04:05Z07:00") +} + +func (o *MongoClusterRestoreParameters) SetPointInTimeUTCAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.PointInTimeUTC = &formatted +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdate.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdate.go new file mode 100644 index 00000000000..e452dd9823d --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdate.go @@ -0,0 +1,9 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterUpdate struct { + Properties *MongoClusterUpdateProperties `json:"properties,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdateproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdateproperties.go new file mode 100644 index 00000000000..ee47924c366 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_mongoclusterupdateproperties.go @@ -0,0 +1,16 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterUpdateProperties struct { + Administrator *AdministratorProperties `json:"administrator,omitempty"` + Backup *BackupProperties `json:"backup,omitempty"` + Compute *ComputeProperties `json:"compute,omitempty"` + HighAvailability *HighAvailabilityProperties `json:"highAvailability,omitempty"` + PreviewFeatures *[]PreviewFeature `json:"previewFeatures,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + ServerVersion *string `json:"serverVersion,omitempty"` + Sharding *ShardingProperties `json:"sharding,omitempty"` + Storage *StorageProperties `json:"storage,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpoint.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpoint.go new file mode 100644 index 00000000000..2250ebfa9ec --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpoint.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnection.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnection.go new file mode 100644 index 00000000000..5dafd446486 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnection.go @@ -0,0 +1,16 @@ +package mongoclusters + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnectionproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnectionproperties.go new file mode 100644 index 00000000000..d428048d9a8 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privatelinkserviceconnectionstate.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privatelinkserviceconnectionstate.go new file mode 100644 index 00000000000..c38b16c9a31 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_promotereplicarequest.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_promotereplicarequest.go new file mode 100644 index 00000000000..fc3cc927450 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_promotereplicarequest.go @@ -0,0 +1,9 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PromoteReplicaRequest struct { + Mode *PromoteMode `json:"mode,omitempty"` + PromoteOption PromoteOption `json:"promoteOption"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_replicationproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_replicationproperties.go new file mode 100644 index 00000000000..09303ead8cf --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_replicationproperties.go @@ -0,0 +1,10 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicationProperties struct { + ReplicationState *ReplicationState `json:"replicationState,omitempty"` + Role *ReplicationRole `json:"role,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_shardingproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_shardingproperties.go new file mode 100644 index 00000000000..b3769061679 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_shardingproperties.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ShardingProperties struct { + ShardCount *int64 `json:"shardCount,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/model_storageproperties.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_storageproperties.go new file mode 100644 index 00000000000..94d834c45f1 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/model_storageproperties.go @@ -0,0 +1,8 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProperties struct { + SizeGb *int64 `json:"sizeGb,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/predicates.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/predicates.go new file mode 100644 index 00000000000..2961ccc5ae0 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/predicates.go @@ -0,0 +1,32 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p MongoClusterOperationPredicate) Matches(input MongoCluster) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/mongocluster/2024-07-01/mongoclusters/version.go b/resource-manager/mongocluster/2024-07-01/mongoclusters/version.go new file mode 100644 index 00000000000..ad7a5631383 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/mongoclusters/version.go @@ -0,0 +1,10 @@ +package mongoclusters + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/mongoclusters/2024-07-01" +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/README.md b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/README.md new file mode 100644 index 00000000000..c7e9545a30e --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `mongocluster` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Create` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "privateEndpointConnectionValue") + +payload := privateendpointconnections.PrivateEndpointConnectionResource{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "privateEndpointConnectionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Get` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "privateEndpointConnectionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.ListByMongoCluster` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +// alternatively `client.ListByMongoCluster(ctx, id)` can be used to do batched pagination +items, err := client.ListByMongoClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/client.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/client.go new file mode 100644 index 00000000000..50eaf09dcce --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/client.go @@ -0,0 +1,26 @@ +package privateendpointconnections + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionsClient struct { + Client *resourcemanager.Client +} + +func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) + } + + return &PrivateEndpointConnectionsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/constants.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/constants.go new file mode 100644 index 00000000000..c5850609650 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/constants.go @@ -0,0 +1,101 @@ +package privateendpointconnections + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster.go new file mode 100644 index 00000000000..0039ea9b9fb --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster.go @@ -0,0 +1,130 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MongoClusterId{}) +} + +var _ resourceids.ResourceId = &MongoClusterId{} + +// MongoClusterId is a struct representing the Resource ID for a Mongo Cluster +type MongoClusterId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string +} + +// NewMongoClusterID returns a new MongoClusterId struct +func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId { + return MongoClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + } +} + +// ParseMongoClusterID parses 'input' into a MongoClusterId +func ParseMongoClusterID(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMongoClusterIDInsensitively parses 'input' case-insensitively into a MongoClusterId +// note: this method should only be used for API response data and not user input +func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongoClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + return nil +} + +// ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID +func ValidateMongoClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMongoClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Mongo Cluster ID +func (id MongoClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID +func (id MongoClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + } +} + +// String returns a human-readable description of this Mongo Cluster ID +func (id MongoClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + } + return fmt.Sprintf("Mongo Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster_test.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster_test.go new file mode 100644 index 00000000000..491f04a407b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_mongocluster_test.go @@ -0,0 +1,282 @@ +package privateendpointconnections + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MongoClusterId{} + +func TestNewMongoClusterID(t *testing.T) { + id := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } +} + +func TestFormatMongoClusterID(t *testing.T) { + actual := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseMongoClusterID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestParseMongoClusterIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestSegmentsForMongoClusterId(t *testing.T) { + segments := MongoClusterId{}.Segments() + if len(segments) == 0 { + t.Fatalf("MongoClusterId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection.go new file mode 100644 index 00000000000..a3f8e31ef9d --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection.go @@ -0,0 +1,139 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PrivateEndpointConnectionId{}) +} + +var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} + +// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection +type PrivateEndpointConnectionId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string + PrivateEndpointConnectionName string +} + +// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct +func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, mongoClusterName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { + return PrivateEndpointConnectionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + PrivateEndpointConnectionName: privateEndpointConnectionName, + } +} + +// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId +func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId +// note: this method should only be used for API response data and not user input +func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) + } + + return nil +} + +// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID +func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateEndpointConnectionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s/privateEndpointConnections/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName, id.PrivateEndpointConnectionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), + resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), + } +} + +// String returns a human-readable description of this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), + } + return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go new file mode 100644 index 00000000000..79291df2593 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go @@ -0,0 +1,327 @@ +package privateendpointconnections + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} + +func TestNewPrivateEndpointConnectionID(t *testing.T) { + id := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "privateEndpointConnectionValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } + + if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { + t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") + } +} + +func TestFormatPrivateEndpointConnectionID(t *testing.T) { + actual := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue", "privateEndpointConnectionValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections/privateEndpointConnectionValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParsePrivateEndpointConnectionID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections/privateEndpointConnectionValue", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + PrivateEndpointConnectionName: "privateEndpointConnectionValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections/privateEndpointConnectionValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestParsePrivateEndpointConnectionIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections/privateEndpointConnectionValue", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + PrivateEndpointConnectionName: "privateEndpointConnectionValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/privateEndpointConnections/privateEndpointConnectionValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestSegmentsForPrivateEndpointConnectionId(t *testing.T) { + segments := PrivateEndpointConnectionId{}.Segments() + if len(segments) == 0 { + t.Fatalf("PrivateEndpointConnectionId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_create.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_create.go new file mode 100644 index 00000000000..dbeff3c05bd --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_create.go @@ -0,0 +1,76 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnectionResource +} + +// Create ... +func (c PrivateEndpointConnectionsClient) Create(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnectionResource) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c PrivateEndpointConnectionsClient) CreateThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnectionResource) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_delete.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_delete.go new file mode 100644 index 00000000000..c80136ed33a --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_delete.go @@ -0,0 +1,70 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id PrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_get.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_get.go new file mode 100644 index 00000000000..3951112a6c2 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_get.go @@ -0,0 +1,53 @@ +package privateendpointconnections + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnectionResource +} + +// Get ... +func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEndpointConnectionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnectionResource + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_listbymongocluster.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_listbymongocluster.go new file mode 100644 index 00000000000..417493c0ff1 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/method_listbymongocluster.go @@ -0,0 +1,105 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByMongoClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateEndpointConnectionResource +} + +type ListByMongoClusterCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateEndpointConnectionResource +} + +type ListByMongoClusterCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByMongoClusterCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByMongoCluster ... +func (c PrivateEndpointConnectionsClient) ListByMongoCluster(ctx context.Context, id MongoClusterId) (result ListByMongoClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByMongoClusterCustomPager{}, + Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateEndpointConnectionResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByMongoClusterComplete retrieves all the results into a single object +func (c PrivateEndpointConnectionsClient) ListByMongoClusterComplete(ctx context.Context, id MongoClusterId) (ListByMongoClusterCompleteResult, error) { + return c.ListByMongoClusterCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionResourceOperationPredicate{}) +} + +// ListByMongoClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointConnectionsClient) ListByMongoClusterCompleteMatchingPredicate(ctx context.Context, id MongoClusterId, predicate PrivateEndpointConnectionResourceOperationPredicate) (result ListByMongoClusterCompleteResult, err error) { + items := make([]PrivateEndpointConnectionResource, 0) + + resp, err := c.ListByMongoCluster(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByMongoClusterCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpoint.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpoint.go new file mode 100644 index 00000000000..1bc8cf2a97c --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpoint.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go new file mode 100644 index 00000000000..fb540c904b6 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionresource.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionresource.go new file mode 100644 index 00000000000..d067baf3075 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privateendpointconnectionresource.go @@ -0,0 +1,16 @@ +package privateendpointconnections + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionResource struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go new file mode 100644 index 00000000000..ec3f7a9f24c --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/predicates.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/predicates.go new file mode 100644 index 00000000000..0e0476a3195 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/predicates.go @@ -0,0 +1,27 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p PrivateEndpointConnectionResourceOperationPredicate) Matches(input PrivateEndpointConnectionResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/mongocluster/2024-07-01/privateendpointconnections/version.go b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/version.go new file mode 100644 index 00000000000..2b664927c6c --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privateendpointconnections/version.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-07-01" +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/README.md b/resource-manager/mongocluster/2024-07-01/privatelinks/README.md new file mode 100644 index 00000000000..36fac1a5926 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privatelinks` Documentation + +The `privatelinks` SDK allows for interaction with Azure Resource Manager `mongocluster` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/privatelinks" +``` + + +### Client Initialization + +```go +client := privatelinks.NewPrivateLinksClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinksClient.ListByMongoCluster` + +```go +ctx := context.TODO() +id := privatelinks.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +// alternatively `client.ListByMongoCluster(ctx, id)` can be used to do batched pagination +items, err := client.ListByMongoClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/client.go b/resource-manager/mongocluster/2024-07-01/privatelinks/client.go new file mode 100644 index 00000000000..79023c33c76 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/client.go @@ -0,0 +1,26 @@ +package privatelinks + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinksClient struct { + Client *resourcemanager.Client +} + +func NewPrivateLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinksClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privatelinks", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateLinksClient: %+v", err) + } + + return &PrivateLinksClient{ + Client: client, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster.go b/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster.go new file mode 100644 index 00000000000..0907ceabdd8 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster.go @@ -0,0 +1,130 @@ +package privatelinks + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MongoClusterId{}) +} + +var _ resourceids.ResourceId = &MongoClusterId{} + +// MongoClusterId is a struct representing the Resource ID for a Mongo Cluster +type MongoClusterId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string +} + +// NewMongoClusterID returns a new MongoClusterId struct +func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId { + return MongoClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + } +} + +// ParseMongoClusterID parses 'input' into a MongoClusterId +func ParseMongoClusterID(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMongoClusterIDInsensitively parses 'input' case-insensitively into a MongoClusterId +// note: this method should only be used for API response data and not user input +func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongoClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + return nil +} + +// ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID +func ValidateMongoClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMongoClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Mongo Cluster ID +func (id MongoClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID +func (id MongoClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + } +} + +// String returns a human-readable description of this Mongo Cluster ID +func (id MongoClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + } + return fmt.Sprintf("Mongo Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster_test.go b/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster_test.go new file mode 100644 index 00000000000..f664f3b6e7d --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/id_mongocluster_test.go @@ -0,0 +1,282 @@ +package privatelinks + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MongoClusterId{} + +func TestNewMongoClusterID(t *testing.T) { + id := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } +} + +func TestFormatMongoClusterID(t *testing.T) { + actual := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseMongoClusterID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestParseMongoClusterIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestSegmentsForMongoClusterId(t *testing.T) { + segments := MongoClusterId{}.Segments() + if len(segments) == 0 { + t.Fatalf("MongoClusterId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/method_listbymongocluster.go b/resource-manager/mongocluster/2024-07-01/privatelinks/method_listbymongocluster.go new file mode 100644 index 00000000000..6c3ac734463 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/method_listbymongocluster.go @@ -0,0 +1,105 @@ +package privatelinks + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByMongoClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateLinkResource +} + +type ListByMongoClusterCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateLinkResource +} + +type ListByMongoClusterCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByMongoClusterCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByMongoCluster ... +func (c PrivateLinksClient) ListByMongoCluster(ctx context.Context, id MongoClusterId) (result ListByMongoClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByMongoClusterCustomPager{}, + Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]PrivateLinkResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByMongoClusterComplete retrieves all the results into a single object +func (c PrivateLinksClient) ListByMongoClusterComplete(ctx context.Context, id MongoClusterId) (ListByMongoClusterCompleteResult, error) { + return c.ListByMongoClusterCompleteMatchingPredicate(ctx, id, PrivateLinkResourceOperationPredicate{}) +} + +// ListByMongoClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateLinksClient) ListByMongoClusterCompleteMatchingPredicate(ctx context.Context, id MongoClusterId, predicate PrivateLinkResourceOperationPredicate) (result ListByMongoClusterCompleteResult, err error) { + items := make([]PrivateLinkResource, 0) + + resp, err := c.ListByMongoCluster(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByMongoClusterCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresource.go b/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresource.go new file mode 100644 index 00000000000..63ce94df72b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresource.go @@ -0,0 +1,16 @@ +package privatelinks + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResource struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresourceproperties.go b/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresourceproperties.go new file mode 100644 index 00000000000..7b583949a37 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/model_privatelinkresourceproperties.go @@ -0,0 +1,10 @@ +package privatelinks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceProperties struct { + GroupId *string `json:"groupId,omitempty"` + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/predicates.go b/resource-manager/mongocluster/2024-07-01/privatelinks/predicates.go new file mode 100644 index 00000000000..40fd722295c --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/predicates.go @@ -0,0 +1,27 @@ +package privatelinks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p PrivateLinkResourceOperationPredicate) Matches(input PrivateLinkResource) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/mongocluster/2024-07-01/privatelinks/version.go b/resource-manager/mongocluster/2024-07-01/privatelinks/version.go new file mode 100644 index 00000000000..1bf35631a73 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/privatelinks/version.go @@ -0,0 +1,10 @@ +package privatelinks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privatelinks/2024-07-01" +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/README.md b/resource-manager/mongocluster/2024-07-01/replicas/README.md new file mode 100644 index 00000000000..6819c13a62c --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/replicas` Documentation + +The `replicas` SDK allows for interaction with Azure Resource Manager `mongocluster` (API Version `2024-07-01`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mongocluster/2024-07-01/replicas" +``` + + +### Client Initialization + +```go +client := replicas.NewReplicasClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ReplicasClient.ListByParent` + +```go +ctx := context.TODO() +id := replicas.NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + +// alternatively `client.ListByParent(ctx, id)` can be used to do batched pagination +items, err := client.ListByParentComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/mongocluster/2024-07-01/replicas/client.go b/resource-manager/mongocluster/2024-07-01/replicas/client.go new file mode 100644 index 00000000000..b494c8a0a7f --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/client.go @@ -0,0 +1,26 @@ +package replicas + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicasClient struct { + Client *resourcemanager.Client +} + +func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) + } + + return &ReplicasClient{ + Client: client, + }, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/constants.go b/resource-manager/mongocluster/2024-07-01/replicas/constants.go new file mode 100644 index 00000000000..b73bfd9ea40 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/constants.go @@ -0,0 +1,477 @@ +package replicas + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateMode string + +const ( + CreateModeDefault CreateMode = "Default" + CreateModeGeoReplica CreateMode = "GeoReplica" + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + CreateModeReplica CreateMode = "Replica" +) + +func PossibleValuesForCreateMode() []string { + return []string{ + string(CreateModeDefault), + string(CreateModeGeoReplica), + string(CreateModePointInTimeRestore), + string(CreateModeReplica), + } +} + +func (s *CreateMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCreateMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCreateMode(input string) (*CreateMode, error) { + vals := map[string]CreateMode{ + "default": CreateModeDefault, + "georeplica": CreateModeGeoReplica, + "pointintimerestore": CreateModePointInTimeRestore, + "replica": CreateModeReplica, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CreateMode(input) + return &out, nil +} + +type HighAvailabilityMode string + +const ( + HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" + HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" + HighAvailabilityModeZoneRedundantPreferred HighAvailabilityMode = "ZoneRedundantPreferred" +) + +func PossibleValuesForHighAvailabilityMode() []string { + return []string{ + string(HighAvailabilityModeDisabled), + string(HighAvailabilityModeSameZone), + string(HighAvailabilityModeZoneRedundantPreferred), + } +} + +func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHighAvailabilityMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { + vals := map[string]HighAvailabilityMode{ + "disabled": HighAvailabilityModeDisabled, + "samezone": HighAvailabilityModeSameZone, + "zoneredundantpreferred": HighAvailabilityModeZoneRedundantPreferred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HighAvailabilityMode(input) + return &out, nil +} + +type MongoClusterStatus string + +const ( + MongoClusterStatusDropping MongoClusterStatus = "Dropping" + MongoClusterStatusProvisioning MongoClusterStatus = "Provisioning" + MongoClusterStatusReady MongoClusterStatus = "Ready" + MongoClusterStatusStarting MongoClusterStatus = "Starting" + MongoClusterStatusStopped MongoClusterStatus = "Stopped" + MongoClusterStatusStopping MongoClusterStatus = "Stopping" + MongoClusterStatusUpdating MongoClusterStatus = "Updating" +) + +func PossibleValuesForMongoClusterStatus() []string { + return []string{ + string(MongoClusterStatusDropping), + string(MongoClusterStatusProvisioning), + string(MongoClusterStatusReady), + string(MongoClusterStatusStarting), + string(MongoClusterStatusStopped), + string(MongoClusterStatusStopping), + string(MongoClusterStatusUpdating), + } +} + +func (s *MongoClusterStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMongoClusterStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMongoClusterStatus(input string) (*MongoClusterStatus, error) { + vals := map[string]MongoClusterStatus{ + "dropping": MongoClusterStatusDropping, + "provisioning": MongoClusterStatusProvisioning, + "ready": MongoClusterStatusReady, + "starting": MongoClusterStatusStarting, + "stopped": MongoClusterStatusStopped, + "stopping": MongoClusterStatusStopping, + "updating": MongoClusterStatusUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MongoClusterStatus(input) + return &out, nil +} + +type PreviewFeature string + +const ( + PreviewFeatureGeoReplicas PreviewFeature = "GeoReplicas" +) + +func PossibleValuesForPreviewFeature() []string { + return []string{ + string(PreviewFeatureGeoReplicas), + } +} + +func (s *PreviewFeature) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePreviewFeature(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePreviewFeature(input string) (*PreviewFeature, error) { + vals := map[string]PreviewFeature{ + "georeplicas": PreviewFeatureGeoReplicas, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PreviewFeature(input) + return &out, nil +} + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDropping ProvisioningState = "Dropping" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateDropping), + string(ProvisioningStateFailed), + string(ProvisioningStateInProgress), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "dropping": ProvisioningStateDropping, + "failed": ProvisioningStateFailed, + "inprogress": ProvisioningStateInProgress, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +func PossibleValuesForPublicNetworkAccess() []string { + return []string{ + string(PublicNetworkAccessDisabled), + string(PublicNetworkAccessEnabled), + } +} + +func (s *PublicNetworkAccess) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePublicNetworkAccess(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePublicNetworkAccess(input string) (*PublicNetworkAccess, error) { + vals := map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccessDisabled, + "enabled": PublicNetworkAccessEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PublicNetworkAccess(input) + return &out, nil +} + +type ReplicationRole string + +const ( + ReplicationRoleAsyncReplica ReplicationRole = "AsyncReplica" + ReplicationRoleGeoAsyncReplica ReplicationRole = "GeoAsyncReplica" + ReplicationRolePrimary ReplicationRole = "Primary" +) + +func PossibleValuesForReplicationRole() []string { + return []string{ + string(ReplicationRoleAsyncReplica), + string(ReplicationRoleGeoAsyncReplica), + string(ReplicationRolePrimary), + } +} + +func (s *ReplicationRole) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicationRole(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicationRole(input string) (*ReplicationRole, error) { + vals := map[string]ReplicationRole{ + "asyncreplica": ReplicationRoleAsyncReplica, + "geoasyncreplica": ReplicationRoleGeoAsyncReplica, + "primary": ReplicationRolePrimary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicationRole(input) + return &out, nil +} + +type ReplicationState string + +const ( + ReplicationStateActive ReplicationState = "Active" + ReplicationStateBroken ReplicationState = "Broken" + ReplicationStateCatchup ReplicationState = "Catchup" + ReplicationStateProvisioning ReplicationState = "Provisioning" + ReplicationStateReconfiguring ReplicationState = "Reconfiguring" + ReplicationStateUpdating ReplicationState = "Updating" +) + +func PossibleValuesForReplicationState() []string { + return []string{ + string(ReplicationStateActive), + string(ReplicationStateBroken), + string(ReplicationStateCatchup), + string(ReplicationStateProvisioning), + string(ReplicationStateReconfiguring), + string(ReplicationStateUpdating), + } +} + +func (s *ReplicationState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicationState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicationState(input string) (*ReplicationState, error) { + vals := map[string]ReplicationState{ + "active": ReplicationStateActive, + "broken": ReplicationStateBroken, + "catchup": ReplicationStateCatchup, + "provisioning": ReplicationStateProvisioning, + "reconfiguring": ReplicationStateReconfiguring, + "updating": ReplicationStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicationState(input) + return &out, nil +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster.go b/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster.go new file mode 100644 index 00000000000..72891d9145e --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster.go @@ -0,0 +1,130 @@ +package replicas + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&MongoClusterId{}) +} + +var _ resourceids.ResourceId = &MongoClusterId{} + +// MongoClusterId is a struct representing the Resource ID for a Mongo Cluster +type MongoClusterId struct { + SubscriptionId string + ResourceGroupName string + MongoClusterName string +} + +// NewMongoClusterID returns a new MongoClusterId struct +func NewMongoClusterID(subscriptionId string, resourceGroupName string, mongoClusterName string) MongoClusterId { + return MongoClusterId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + MongoClusterName: mongoClusterName, + } +} + +// ParseMongoClusterID parses 'input' into a MongoClusterId +func ParseMongoClusterID(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMongoClusterIDInsensitively parses 'input' case-insensitively into a MongoClusterId +// note: this method should only be used for API response data and not user input +func ParseMongoClusterIDInsensitively(input string) (*MongoClusterId, error) { + parser := resourceids.NewParserFromResourceIdType(&MongoClusterId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MongoClusterId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MongoClusterId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.MongoClusterName, ok = input.Parsed["mongoClusterName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "mongoClusterName", input) + } + + return nil +} + +// ValidateMongoClusterID checks that 'input' can be parsed as a Mongo Cluster ID +func ValidateMongoClusterID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMongoClusterID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Mongo Cluster ID +func (id MongoClusterId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DocumentDB/mongoClusters/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.MongoClusterName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Mongo Cluster ID +func (id MongoClusterId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDocumentDB", "Microsoft.DocumentDB", "Microsoft.DocumentDB"), + resourceids.StaticSegment("staticMongoClusters", "mongoClusters", "mongoClusters"), + resourceids.UserSpecifiedSegment("mongoClusterName", "mongoClusterValue"), + } +} + +// String returns a human-readable description of this Mongo Cluster ID +func (id MongoClusterId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Mongo Cluster Name: %q", id.MongoClusterName), + } + return fmt.Sprintf("Mongo Cluster (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster_test.go b/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster_test.go new file mode 100644 index 00000000000..bb26c044c89 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/id_mongocluster_test.go @@ -0,0 +1,282 @@ +package replicas + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &MongoClusterId{} + +func TestNewMongoClusterID(t *testing.T) { + id := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.MongoClusterName != "mongoClusterValue" { + t.Fatalf("Expected %q but got %q for Segment 'MongoClusterName'", id.MongoClusterName, "mongoClusterValue") + } +} + +func TestFormatMongoClusterID(t *testing.T) { + actual := NewMongoClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mongoClusterValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseMongoClusterID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestParseMongoClusterIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *MongoClusterId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + MongoClusterName: "mongoClusterValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DocumentDB/mongoClusters/mongoClusterValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe", + Expected: &MongoClusterId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + MongoClusterName: "mOnGoClUsTeRvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dOcUmEnTdB/mOnGoClUsTeRs/mOnGoClUsTeRvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseMongoClusterIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.MongoClusterName != v.Expected.MongoClusterName { + t.Fatalf("Expected %q but got %q for MongoClusterName", v.Expected.MongoClusterName, actual.MongoClusterName) + } + + } +} + +func TestSegmentsForMongoClusterId(t *testing.T) { + segments := MongoClusterId{}.Segments() + if len(segments) == 0 { + t.Fatalf("MongoClusterId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/method_listbyparent.go b/resource-manager/mongocluster/2024-07-01/replicas/method_listbyparent.go new file mode 100644 index 00000000000..b38b327ec46 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/method_listbyparent.go @@ -0,0 +1,105 @@ +package replicas + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByParentOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Replica +} + +type ListByParentCompleteResult struct { + LatestHttpResponse *http.Response + Items []Replica +} + +type ListByParentCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByParentCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByParent ... +func (c ReplicasClient) ListByParent(ctx context.Context, id MongoClusterId) (result ListByParentOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByParentCustomPager{}, + Path: fmt.Sprintf("%s/replicas", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Replica `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByParentComplete retrieves all the results into a single object +func (c ReplicasClient) ListByParentComplete(ctx context.Context, id MongoClusterId) (ListByParentCompleteResult, error) { + return c.ListByParentCompleteMatchingPredicate(ctx, id, ReplicaOperationPredicate{}) +} + +// ListByParentCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ReplicasClient) ListByParentCompleteMatchingPredicate(ctx context.Context, id MongoClusterId, predicate ReplicaOperationPredicate) (result ListByParentCompleteResult, err error) { + items := make([]Replica, 0) + + resp, err := c.ListByParent(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByParentCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_administratorproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_administratorproperties.go new file mode 100644 index 00000000000..95d40a26d0e --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_administratorproperties.go @@ -0,0 +1,9 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdministratorProperties struct { + Password *string `json:"password,omitempty"` + UserName *string `json:"userName,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_backupproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_backupproperties.go new file mode 100644 index 00000000000..6dac1e4d52f --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_backupproperties.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupProperties struct { + EarliestRestoreTime *string `json:"earliestRestoreTime,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_computeproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_computeproperties.go new file mode 100644 index 00000000000..2012db5ec56 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_computeproperties.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ComputeProperties struct { + Tier *string `json:"tier,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_highavailabilityproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_highavailabilityproperties.go new file mode 100644 index 00000000000..674ffe63fae --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_highavailabilityproperties.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailabilityProperties struct { + TargetMode *HighAvailabilityMode `json:"targetMode,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterproperties.go new file mode 100644 index 00000000000..fb3ba1cca11 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterproperties.go @@ -0,0 +1,25 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterProperties struct { + Administrator *AdministratorProperties `json:"administrator,omitempty"` + Backup *BackupProperties `json:"backup,omitempty"` + ClusterStatus *MongoClusterStatus `json:"clusterStatus,omitempty"` + Compute *ComputeProperties `json:"compute,omitempty"` + ConnectionString *string `json:"connectionString,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + HighAvailability *HighAvailabilityProperties `json:"highAvailability,omitempty"` + InfrastructureVersion *string `json:"infrastructureVersion,omitempty"` + PreviewFeatures *[]PreviewFeature `json:"previewFeatures,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + Replica *ReplicationProperties `json:"replica,omitempty"` + ReplicaParameters *MongoClusterReplicaParameters `json:"replicaParameters,omitempty"` + RestoreParameters *MongoClusterRestoreParameters `json:"restoreParameters,omitempty"` + ServerVersion *string `json:"serverVersion,omitempty"` + Sharding *ShardingProperties `json:"sharding,omitempty"` + Storage *StorageProperties `json:"storage,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterreplicaparameters.go b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterreplicaparameters.go new file mode 100644 index 00000000000..675f286a849 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterreplicaparameters.go @@ -0,0 +1,9 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterReplicaParameters struct { + SourceLocation string `json:"sourceLocation"` + SourceResourceId string `json:"sourceResourceId"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterrestoreparameters.go b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterrestoreparameters.go new file mode 100644 index 00000000000..7cbd10e8376 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_mongoclusterrestoreparameters.go @@ -0,0 +1,27 @@ +package replicas + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoClusterRestoreParameters struct { + PointInTimeUTC *string `json:"pointInTimeUTC,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (o *MongoClusterRestoreParameters) GetPointInTimeUTCAsTime() (*time.Time, error) { + if o.PointInTimeUTC == nil { + return nil, nil + } + return dates.ParseAsFormat(o.PointInTimeUTC, "2006-01-02T15:04:05Z07:00") +} + +func (o *MongoClusterRestoreParameters) SetPointInTimeUTCAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.PointInTimeUTC = &formatted +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpoint.go b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpoint.go new file mode 100644 index 00000000000..48ed00f3333 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpoint.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnection.go b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnection.go new file mode 100644 index 00000000000..2ff0aaed8d4 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnection.go @@ -0,0 +1,16 @@ +package replicas + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnectionproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnectionproperties.go new file mode 100644 index 00000000000..d3068b6993f --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_privatelinkserviceconnectionstate.go b/resource-manager/mongocluster/2024-07-01/replicas/model_privatelinkserviceconnectionstate.go new file mode 100644 index 00000000000..311ee4497b7 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_replica.go b/resource-manager/mongocluster/2024-07-01/replicas/model_replica.go new file mode 100644 index 00000000000..1527089f686 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_replica.go @@ -0,0 +1,16 @@ +package replicas + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Replica struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *MongoClusterProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_replicationproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_replicationproperties.go new file mode 100644 index 00000000000..29d36a9bd9b --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_replicationproperties.go @@ -0,0 +1,10 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicationProperties struct { + ReplicationState *ReplicationState `json:"replicationState,omitempty"` + Role *ReplicationRole `json:"role,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_shardingproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_shardingproperties.go new file mode 100644 index 00000000000..73de4bf60f5 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_shardingproperties.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ShardingProperties struct { + ShardCount *int64 `json:"shardCount,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/model_storageproperties.go b/resource-manager/mongocluster/2024-07-01/replicas/model_storageproperties.go new file mode 100644 index 00000000000..377bae9a096 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/model_storageproperties.go @@ -0,0 +1,8 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageProperties struct { + SizeGb *int64 `json:"sizeGb,omitempty"` +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/predicates.go b/resource-manager/mongocluster/2024-07-01/replicas/predicates.go new file mode 100644 index 00000000000..3f22701f0f2 --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/predicates.go @@ -0,0 +1,27 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ReplicaOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ReplicaOperationPredicate) Matches(input Replica) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/mongocluster/2024-07-01/replicas/version.go b/resource-manager/mongocluster/2024-07-01/replicas/version.go new file mode 100644 index 00000000000..a8d467d8a6e --- /dev/null +++ b/resource-manager/mongocluster/2024-07-01/replicas/version.go @@ -0,0 +1,10 @@ +package replicas + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/replicas/2024-07-01" +} diff --git a/resource-manager/mysql/2017-12-01/checknameavailability/README.md b/resource-manager/mysql/2017-12-01/checknameavailability/README.md index 7222c32e95d..f1c5f9f9dbb 100644 --- a/resource-manager/mysql/2017-12-01/checknameavailability/README.md +++ b/resource-manager/mysql/2017-12-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/checknameavailability/client.go b/resource-manager/mysql/2017-12-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mysql/2017-12-01/checknameavailability/client.go +++ b/resource-manager/mysql/2017-12-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/checknameavailability/method_execute.go b/resource-manager/mysql/2017-12-01/checknameavailability/method_execute.go index aa3ed338a06..e93b8555919 100644 --- a/resource-manager/mysql/2017-12-01/checknameavailability/method_execute.go +++ b/resource-manager/mysql/2017-12-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/checknameavailability/version.go b/resource-manager/mysql/2017-12-01/checknameavailability/version.go index b5b0e22c13c..575bd583eca 100644 --- a/resource-manager/mysql/2017-12-01/checknameavailability/version.go +++ b/resource-manager/mysql/2017-12-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/configurations/README.md b/resource-manager/mysql/2017-12-01/configurations/README.md index 58bd22a2f31..75f0a1c12e2 100644 --- a/resource-manager/mysql/2017-12-01/configurations/README.md +++ b/resource-manager/mysql/2017-12-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/configurations/client.go b/resource-manager/mysql/2017-12-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mysql/2017-12-01/configurations/client.go +++ b/resource-manager/mysql/2017-12-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/configurations/id_configuration.go b/resource-manager/mysql/2017-12-01/configurations/id_configuration.go index 7dbd95cb729..43f310ae453 100644 --- a/resource-manager/mysql/2017-12-01/configurations/id_configuration.go +++ b/resource-manager/mysql/2017-12-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/configurations/id_server.go b/resource-manager/mysql/2017-12-01/configurations/id_server.go index 084e3b8c8ab..3ae9fcf8c7c 100644 --- a/resource-manager/mysql/2017-12-01/configurations/id_server.go +++ b/resource-manager/mysql/2017-12-01/configurations/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/configurations/method_get.go b/resource-manager/mysql/2017-12-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mysql/2017-12-01/configurations/method_get.go +++ b/resource-manager/mysql/2017-12-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/configurations/method_listbyserver.go b/resource-manager/mysql/2017-12-01/configurations/method_listbyserver.go index b51c9a09a63..418fa10dd20 100644 --- a/resource-manager/mysql/2017-12-01/configurations/method_listbyserver.go +++ b/resource-manager/mysql/2017-12-01/configurations/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (re var model ConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/configurations/version.go b/resource-manager/mysql/2017-12-01/configurations/version.go index 14506a04060..c7dc0ca0f7f 100644 --- a/resource-manager/mysql/2017-12-01/configurations/version.go +++ b/resource-manager/mysql/2017-12-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/configurationsupdate/README.md b/resource-manager/mysql/2017-12-01/configurationsupdate/README.md index 6f508ae08b4..2fce020ccf6 100644 --- a/resource-manager/mysql/2017-12-01/configurationsupdate/README.md +++ b/resource-manager/mysql/2017-12-01/configurationsupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/configurationsupdate` Documentation -The `configurationsupdate` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `configurationsupdate` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/configurationsupdate/client.go b/resource-manager/mysql/2017-12-01/configurationsupdate/client.go index 6e2a965b0d0..f6ec7ee8e25 100644 --- a/resource-manager/mysql/2017-12-01/configurationsupdate/client.go +++ b/resource-manager/mysql/2017-12-01/configurationsupdate/client.go @@ -15,7 +15,7 @@ type ConfigurationsUpdateClient struct { } func NewConfigurationsUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationsupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationsupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsUpdateClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go b/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go index 8d97f604796..5d28f149eca 100644 --- a/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go +++ b/resource-manager/mysql/2017-12-01/configurationsupdate/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/configurationsupdate/version.go b/resource-manager/mysql/2017-12-01/configurationsupdate/version.go index 34a6f364482..5dc279a8eb4 100644 --- a/resource-manager/mysql/2017-12-01/configurationsupdate/version.go +++ b/resource-manager/mysql/2017-12-01/configurationsupdate/version.go @@ -1,12 +1,10 @@ package configurationsupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationsupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationsupdate/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/databases/README.md b/resource-manager/mysql/2017-12-01/databases/README.md index 4a9152a3067..5601947e9ad 100644 --- a/resource-manager/mysql/2017-12-01/databases/README.md +++ b/resource-manager/mysql/2017-12-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/databases/client.go b/resource-manager/mysql/2017-12-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mysql/2017-12-01/databases/client.go +++ b/resource-manager/mysql/2017-12-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/databases/id_database.go b/resource-manager/mysql/2017-12-01/databases/id_database.go index c83c82fdfb9..4262263545f 100644 --- a/resource-manager/mysql/2017-12-01/databases/id_database.go +++ b/resource-manager/mysql/2017-12-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/databases/id_server.go b/resource-manager/mysql/2017-12-01/databases/id_server.go index e135abdbeb2..48a642924aa 100644 --- a/resource-manager/mysql/2017-12-01/databases/id_server.go +++ b/resource-manager/mysql/2017-12-01/databases/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/databases/method_get.go b/resource-manager/mysql/2017-12-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mysql/2017-12-01/databases/method_get.go +++ b/resource-manager/mysql/2017-12-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/databases/method_listbyserver.go b/resource-manager/mysql/2017-12-01/databases/method_listbyserver.go index a4dd2fdfeed..cf9744c0c74 100644 --- a/resource-manager/mysql/2017-12-01/databases/method_listbyserver.go +++ b/resource-manager/mysql/2017-12-01/databases/method_listbyserver.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result var model DatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/databases/version.go b/resource-manager/mysql/2017-12-01/databases/version.go index 8d6c0a801d3..694f15eb240 100644 --- a/resource-manager/mysql/2017-12-01/databases/version.go +++ b/resource-manager/mysql/2017-12-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/README.md b/resource-manager/mysql/2017-12-01/firewallrules/README.md index 5170fe48149..023248f019a 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/README.md +++ b/resource-manager/mysql/2017-12-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/firewallrules/client.go b/resource-manager/mysql/2017-12-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/client.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go b/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go index fc6081956ff..884f7e50731 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/id_server.go b/resource-manager/mysql/2017-12-01/firewallrules/id_server.go index 5b9f32ad0f7..3d216617a70 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/id_server.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/method_get.go b/resource-manager/mysql/2017-12-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/method_get.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/method_listbyserver.go b/resource-manager/mysql/2017-12-01/firewallrules/method_listbyserver.go index 3d8818b6fad..a3d638705b3 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/method_listbyserver.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/method_listbyserver.go @@ -46,7 +46,6 @@ func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (res var model FirewallRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/firewallrules/version.go b/resource-manager/mysql/2017-12-01/firewallrules/version.go index 38c1ba53b63..5e0f91bdd34 100644 --- a/resource-manager/mysql/2017-12-01/firewallrules/version.go +++ b/resource-manager/mysql/2017-12-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/README.md b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/README.md index 3c7429023ff..ae38515c71f 100644 --- a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/README.md +++ b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/locationbasedperformancetier` Documentation -The `locationbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `locationbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/client.go b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/client.go index 846c4a93847..6c8dbf7da88 100644 --- a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/client.go +++ b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/client.go @@ -15,7 +15,7 @@ type LocationBasedPerformanceTierClient struct { } func NewLocationBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go index c2e50c2f3fe..d457a0cf973 100644 --- a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go +++ b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/method_list.go b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/method_list.go index ebc7c810809..9b138ad417e 100644 --- a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/method_list.go +++ b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c LocationBasedPerformanceTierClient) List(ctx context.Context, id Locatio var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/version.go b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/version.go index c8c4af35429..184aad3a179 100644 --- a/resource-manager/mysql/2017-12-01/locationbasedperformancetier/version.go +++ b/resource-manager/mysql/2017-12-01/locationbasedperformancetier/version.go @@ -1,12 +1,10 @@ package locationbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedperformancetier/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/logfiles/README.md b/resource-manager/mysql/2017-12-01/logfiles/README.md index 90247c24ab1..2e90b07dcee 100644 --- a/resource-manager/mysql/2017-12-01/logfiles/README.md +++ b/resource-manager/mysql/2017-12-01/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/logfiles/client.go b/resource-manager/mysql/2017-12-01/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mysql/2017-12-01/logfiles/client.go +++ b/resource-manager/mysql/2017-12-01/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/logfiles/id_server.go b/resource-manager/mysql/2017-12-01/logfiles/id_server.go index f5b9cd1ce5e..70db3b73f07 100644 --- a/resource-manager/mysql/2017-12-01/logfiles/id_server.go +++ b/resource-manager/mysql/2017-12-01/logfiles/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/logfiles/method_listbyserver.go b/resource-manager/mysql/2017-12-01/logfiles/method_listbyserver.go index b692a2fed8a..3fb99612687 100644 --- a/resource-manager/mysql/2017-12-01/logfiles/method_listbyserver.go +++ b/resource-manager/mysql/2017-12-01/logfiles/method_listbyserver.go @@ -46,7 +46,6 @@ func (c LogFilesClient) ListByServer(ctx context.Context, id ServerId) (result L var model LogFileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/logfiles/version.go b/resource-manager/mysql/2017-12-01/logfiles/version.go index 27dfc7d12ca..9e577665182 100644 --- a/resource-manager/mysql/2017-12-01/logfiles/version.go +++ b/resource-manager/mysql/2017-12-01/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/recoverableservers/README.md b/resource-manager/mysql/2017-12-01/recoverableservers/README.md index 218550a8076..26792231598 100644 --- a/resource-manager/mysql/2017-12-01/recoverableservers/README.md +++ b/resource-manager/mysql/2017-12-01/recoverableservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/recoverableservers` Documentation -The `recoverableservers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `recoverableservers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/recoverableservers/client.go b/resource-manager/mysql/2017-12-01/recoverableservers/client.go index f1d53f03119..d3c7ef23750 100644 --- a/resource-manager/mysql/2017-12-01/recoverableservers/client.go +++ b/resource-manager/mysql/2017-12-01/recoverableservers/client.go @@ -15,7 +15,7 @@ type RecoverableServersClient struct { } func NewRecoverableServersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverableservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverableservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableServersClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go b/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go index b4898b3410e..3711a92fcf8 100644 --- a/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go +++ b/resource-manager/mysql/2017-12-01/recoverableservers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/recoverableservers/method_get.go b/resource-manager/mysql/2017-12-01/recoverableservers/method_get.go index 55a405aca8d..9301dfcf53e 100644 --- a/resource-manager/mysql/2017-12-01/recoverableservers/method_get.go +++ b/resource-manager/mysql/2017-12-01/recoverableservers/method_get.go @@ -46,7 +46,6 @@ func (c RecoverableServersClient) Get(ctx context.Context, id ServerId) (result var model RecoverableServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/recoverableservers/version.go b/resource-manager/mysql/2017-12-01/recoverableservers/version.go index 83ae9b19beb..32e329e9aa5 100644 --- a/resource-manager/mysql/2017-12-01/recoverableservers/version.go +++ b/resource-manager/mysql/2017-12-01/recoverableservers/version.go @@ -1,12 +1,10 @@ package recoverableservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverableservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverableservers/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/replicas/README.md b/resource-manager/mysql/2017-12-01/replicas/README.md index 07352b5a8cb..d4748b71033 100644 --- a/resource-manager/mysql/2017-12-01/replicas/README.md +++ b/resource-manager/mysql/2017-12-01/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `replicas` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/replicas/client.go b/resource-manager/mysql/2017-12-01/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/mysql/2017-12-01/replicas/client.go +++ b/resource-manager/mysql/2017-12-01/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/replicas/id_server.go b/resource-manager/mysql/2017-12-01/replicas/id_server.go index 33e3778156b..2f2317d8162 100644 --- a/resource-manager/mysql/2017-12-01/replicas/id_server.go +++ b/resource-manager/mysql/2017-12-01/replicas/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/replicas/method_listbyserver.go b/resource-manager/mysql/2017-12-01/replicas/method_listbyserver.go index 2908a99e4c3..a0d6916d9e0 100644 --- a/resource-manager/mysql/2017-12-01/replicas/method_listbyserver.go +++ b/resource-manager/mysql/2017-12-01/replicas/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ReplicasClient) ListByServer(ctx context.Context, id ServerId) (result L var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/replicas/version.go b/resource-manager/mysql/2017-12-01/replicas/version.go index 127efac8486..c3783af89ae 100644 --- a/resource-manager/mysql/2017-12-01/replicas/version.go +++ b/resource-manager/mysql/2017-12-01/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/README.md b/resource-manager/mysql/2017-12-01/serveradministrators/README.md index 57be8644faa..e9cf48ebc16 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/README.md +++ b/resource-manager/mysql/2017-12-01/serveradministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serveradministrators` Documentation -The `serveradministrators` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `serveradministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/client.go b/resource-manager/mysql/2017-12-01/serveradministrators/client.go index de0fa892b40..4c33543f7f9 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/client.go +++ b/resource-manager/mysql/2017-12-01/serveradministrators/client.go @@ -15,7 +15,7 @@ type ServerAdministratorsClient struct { } func NewServerAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdministratorsClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go b/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go index 2fb5e8d19ae..1244ecb0ad5 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go +++ b/resource-manager/mysql/2017-12-01/serveradministrators/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/method_get.go b/resource-manager/mysql/2017-12-01/serveradministrators/method_get.go index b469795c6ca..d02b59e815d 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/method_get.go +++ b/resource-manager/mysql/2017-12-01/serveradministrators/method_get.go @@ -46,7 +46,6 @@ func (c ServerAdministratorsClient) Get(ctx context.Context, id ServerId) (resul var model ServerAdministratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/method_list.go b/resource-manager/mysql/2017-12-01/serveradministrators/method_list.go index 7149fba6562..f357647c46c 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/method_list.go +++ b/resource-manager/mysql/2017-12-01/serveradministrators/method_list.go @@ -46,7 +46,6 @@ func (c ServerAdministratorsClient) List(ctx context.Context, id ServerId) (resu var model ServerAdministratorResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/serveradministrators/version.go b/resource-manager/mysql/2017-12-01/serveradministrators/version.go index c33f7aa2ba6..44c85ad7c7d 100644 --- a/resource-manager/mysql/2017-12-01/serveradministrators/version.go +++ b/resource-manager/mysql/2017-12-01/serveradministrators/version.go @@ -1,12 +1,10 @@ package serveradministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradministrators/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/README.md b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/README.md index df95da54fe7..d18f7cdb09f 100644 --- a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/README.md +++ b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serverbasedperformancetier` Documentation -The `serverbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `serverbasedperformancetier` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/client.go b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/client.go index f4cfb845cfc..285b3ba8d88 100644 --- a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/client.go +++ b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/client.go @@ -15,7 +15,7 @@ type ServerBasedPerformanceTierClient struct { } func NewServerBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go index ba12f5c2eff..61b7a421a1a 100644 --- a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go +++ b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/method_list.go b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/method_list.go index 94438aeb619..57a6a043c44 100644 --- a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/method_list.go +++ b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c ServerBasedPerformanceTierClient) List(ctx context.Context, id ServerId) var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/version.go b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/version.go index 9f0f6bffe08..f41ed267245 100644 --- a/resource-manager/mysql/2017-12-01/serverbasedperformancetier/version.go +++ b/resource-manager/mysql/2017-12-01/serverbasedperformancetier/version.go @@ -1,12 +1,10 @@ package serverbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverbasedperformancetier/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/serverrestart/client.go b/resource-manager/mysql/2017-12-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mysql/2017-12-01/serverrestart/client.go +++ b/resource-manager/mysql/2017-12-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/serverrestart/id_server.go b/resource-manager/mysql/2017-12-01/serverrestart/id_server.go index 68621e6419a..684b8c623f1 100644 --- a/resource-manager/mysql/2017-12-01/serverrestart/id_server.go +++ b/resource-manager/mysql/2017-12-01/serverrestart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/serverrestart/version.go b/resource-manager/mysql/2017-12-01/serverrestart/version.go index 80fdf66e1aa..45d76b495b6 100644 --- a/resource-manager/mysql/2017-12-01/serverrestart/version.go +++ b/resource-manager/mysql/2017-12-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/servers/README.md b/resource-manager/mysql/2017-12-01/servers/README.md index eac56ad5476..054c3f881dc 100644 --- a/resource-manager/mysql/2017-12-01/servers/README.md +++ b/resource-manager/mysql/2017-12-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/servers/client.go b/resource-manager/mysql/2017-12-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mysql/2017-12-01/servers/client.go +++ b/resource-manager/mysql/2017-12-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/servers/id_server.go b/resource-manager/mysql/2017-12-01/servers/id_server.go index a88fcb17795..4ff67e62a9d 100644 --- a/resource-manager/mysql/2017-12-01/servers/id_server.go +++ b/resource-manager/mysql/2017-12-01/servers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/servers/method_get.go b/resource-manager/mysql/2017-12-01/servers/method_get.go index 7087cf8acac..e321c1fa288 100644 --- a/resource-manager/mysql/2017-12-01/servers/method_get.go +++ b/resource-manager/mysql/2017-12-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperatio var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/servers/method_list.go b/resource-manager/mysql/2017-12-01/servers/method_list.go index 8b994fe1af5..87327a49955 100644 --- a/resource-manager/mysql/2017-12-01/servers/method_list.go +++ b/resource-manager/mysql/2017-12-01/servers/method_list.go @@ -47,7 +47,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/servers/method_listbyresourcegroup.go b/resource-manager/mysql/2017-12-01/servers/method_listbyresourcegroup.go index 7c7ceb1d755..284daf49c83 100644 --- a/resource-manager/mysql/2017-12-01/servers/method_listbyresourcegroup.go +++ b/resource-manager/mysql/2017-12-01/servers/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverforcreate.go b/resource-manager/mysql/2017-12-01/servers/model_serverforcreate.go index 171c190411b..1df0ac16bbb 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverforcreate.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverforcreate.go @@ -38,7 +38,7 @@ func (s *ServerForCreate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServerPropertiesForCreateImplementation(v) + impl, err := UnmarshalServerPropertiesForCreateImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServerForCreate': %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforcreate.go b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforcreate.go index 84868e2551e..641f5cfbf2b 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforcreate.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforcreate.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerPropertiesForCreate interface { + ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl } -// RawServerPropertiesForCreateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServerPropertiesForCreate = BaseServerPropertiesForCreateImpl{} + +type BaseServerPropertiesForCreateImpl struct { + CreateMode CreateMode `json:"createMode"` + InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (s BaseServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s +} + +var _ ServerPropertiesForCreate = RawServerPropertiesForCreateImpl{} + +// RawServerPropertiesForCreateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServerPropertiesForCreateImpl struct { - Type string - Values map[string]interface{} + serverPropertiesForCreate BaseServerPropertiesForCreateImpl + Type string + Values map[string]interface{} +} + +func (s RawServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s.serverPropertiesForCreate } -func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { +func UnmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { if input == nil { return nil, nil } @@ -68,10 +91,15 @@ func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPrope return out, nil } - out := RawServerPropertiesForCreateImpl{ - Type: value, - Values: temp, + var parent BaseServerPropertiesForCreateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServerPropertiesForCreateImpl: %+v", err) } - return out, nil + + return RawServerPropertiesForCreateImpl{ + serverPropertiesForCreate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go index efa1824c838..59c728717e7 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go @@ -15,6 +15,8 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLoginPassword string `json:"administratorLoginPassword"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -23,6 +25,18 @@ type ServerPropertiesForDefaultCreate struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForDefaultCreate) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForDefaultCreate{} func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForDefaultCreate: %+v", err) } + decoded["createMode"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforgeorestore.go b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforgeorestore.go index f3775b48d53..0be124f4048 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforgeorestore.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforgeorestore.go @@ -14,6 +14,8 @@ type ServerPropertiesForGeoRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -22,6 +24,18 @@ type ServerPropertiesForGeoRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForGeoRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForGeoRestore{} func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForGeoRestore: %+v", err) } + decoded["createMode"] = "GeoRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforreplica.go b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforreplica.go index 9f8a64ee6e7..973fb257c23 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforreplica.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforreplica.go @@ -14,6 +14,8 @@ type ServerPropertiesForReplica struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -22,6 +24,18 @@ type ServerPropertiesForReplica struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForReplica) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForReplica{} func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForReplica: %+v", err) } + decoded["createMode"] = "Replica" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforrestore.go b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforrestore.go index 0a74bb93817..f28614737ea 100644 --- a/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforrestore.go +++ b/resource-manager/mysql/2017-12-01/servers/model_serverpropertiesforrestore.go @@ -15,6 +15,8 @@ type ServerPropertiesForRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -23,6 +25,18 @@ type ServerPropertiesForRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForRestore{} func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForRestore: %+v", err) } + decoded["createMode"] = "PointInTimeRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/mysql/2017-12-01/servers/version.go b/resource-manager/mysql/2017-12-01/servers/version.go index 80804cb0155..8a215301966 100644 --- a/resource-manager/mysql/2017-12-01/servers/version.go +++ b/resource-manager/mysql/2017-12-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/README.md b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/README.md index 1961b07d12e..a5c63b9a209 100644 --- a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/README.md +++ b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/client.go b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/client.go +++ b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go index b5719d8cd14..31093978281 100644 --- a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go +++ b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/method_get.go b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/method_get.go index d3786ed5879..350ddae047b 100644 --- a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/method_get.go +++ b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id ServerId) var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/version.go b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/version.go index f7fc4c20d1d..a8cdb3f5978 100644 --- a/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/version.go +++ b/resource-manager/mysql/2017-12-01/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2017-12-01" } diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/README.md b/resource-manager/mysql/2017-12-01/virtualnetworkrules/README.md index be4f5438373..ef5e22f30bf 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/README.md +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2017-12-01`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/client.go b/resource-manager/mysql/2017-12-01/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/client.go +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go b/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go index 1d1f9cedaa8..2285f3894c5 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go index 628aba0c326..45f2705b748 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/method_get.go b/resource-manager/mysql/2017-12-01/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/method_get.go +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2017-12-01/virtualnetworkrules/version.go b/resource-manager/mysql/2017-12-01/virtualnetworkrules/version.go index 11bd3d9075a..2f26470a34a 100644 --- a/resource-manager/mysql/2017-12-01/virtualnetworkrules/version.go +++ b/resource-manager/mysql/2017-12-01/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2017-12-01" } diff --git a/resource-manager/mysql/2020-01-01/serverkeys/README.md b/resource-manager/mysql/2020-01-01/serverkeys/README.md index 1c69991081e..a7e97a70bd5 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/README.md +++ b/resource-manager/mysql/2020-01-01/serverkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys` Documentation -The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2020-01-01`). +The `serverkeys` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2020-01-01/serverkeys/client.go b/resource-manager/mysql/2020-01-01/serverkeys/client.go index 83970b7eb35..0616b182cbb 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/client.go +++ b/resource-manager/mysql/2020-01-01/serverkeys/client.go @@ -15,7 +15,7 @@ type ServerKeysClient struct { } func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) } diff --git a/resource-manager/mysql/2020-01-01/serverkeys/id_key.go b/resource-manager/mysql/2020-01-01/serverkeys/id_key.go index e3e004f217d..e86fcf0cea1 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/id_key.go +++ b/resource-manager/mysql/2020-01-01/serverkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2020-01-01/serverkeys/id_server.go b/resource-manager/mysql/2020-01-01/serverkeys/id_server.go index c05ae4cd52f..fab8b86c0f5 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/id_server.go +++ b/resource-manager/mysql/2020-01-01/serverkeys/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2020-01-01/serverkeys/method_get.go b/resource-manager/mysql/2020-01-01/serverkeys/method_get.go index cdd81e30407..e6b4acc396a 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/method_get.go +++ b/resource-manager/mysql/2020-01-01/serverkeys/method_get.go @@ -45,7 +45,6 @@ func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperatio var model ServerKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2020-01-01/serverkeys/version.go b/resource-manager/mysql/2020-01-01/serverkeys/version.go index 0155b1ec796..4b861b9abbc 100644 --- a/resource-manager/mysql/2020-01-01/serverkeys/version.go +++ b/resource-manager/mysql/2020-01-01/serverkeys/version.go @@ -1,12 +1,10 @@ package serverkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverkeys/2020-01-01" } diff --git a/resource-manager/mysql/2020-01-01/serverstart/client.go b/resource-manager/mysql/2020-01-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mysql/2020-01-01/serverstart/client.go +++ b/resource-manager/mysql/2020-01-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mysql/2020-01-01/serverstart/id_server.go b/resource-manager/mysql/2020-01-01/serverstart/id_server.go index 771d115ac94..fd6c556ae59 100644 --- a/resource-manager/mysql/2020-01-01/serverstart/id_server.go +++ b/resource-manager/mysql/2020-01-01/serverstart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2020-01-01/serverstart/version.go b/resource-manager/mysql/2020-01-01/serverstart/version.go index 674855e4cf9..c244da5378a 100644 --- a/resource-manager/mysql/2020-01-01/serverstart/version.go +++ b/resource-manager/mysql/2020-01-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2020-01-01" } diff --git a/resource-manager/mysql/2020-01-01/serverstop/client.go b/resource-manager/mysql/2020-01-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mysql/2020-01-01/serverstop/client.go +++ b/resource-manager/mysql/2020-01-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mysql/2020-01-01/serverstop/id_server.go b/resource-manager/mysql/2020-01-01/serverstop/id_server.go index 7d9b778b20d..7a3a7cb06df 100644 --- a/resource-manager/mysql/2020-01-01/serverstop/id_server.go +++ b/resource-manager/mysql/2020-01-01/serverstop/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2020-01-01/serverstop/version.go b/resource-manager/mysql/2020-01-01/serverstop/version.go index 9c1dd6c6a11..62d222ffd01 100644 --- a/resource-manager/mysql/2020-01-01/serverstop/version.go +++ b/resource-manager/mysql/2020-01-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2020-01-01" } diff --git a/resource-manager/mysql/2020-01-01/serverupgrade/README.md b/resource-manager/mysql/2020-01-01/serverupgrade/README.md index 2b967131851..2a432001ea8 100644 --- a/resource-manager/mysql/2020-01-01/serverupgrade/README.md +++ b/resource-manager/mysql/2020-01-01/serverupgrade/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverupgrade` Documentation -The `serverupgrade` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2020-01-01`). +The `serverupgrade` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2020-01-01/serverupgrade/client.go b/resource-manager/mysql/2020-01-01/serverupgrade/client.go index 907f91bce78..3e8a2192a84 100644 --- a/resource-manager/mysql/2020-01-01/serverupgrade/client.go +++ b/resource-manager/mysql/2020-01-01/serverupgrade/client.go @@ -15,7 +15,7 @@ type ServerUpgradeClient struct { } func NewServerUpgradeClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerUpgradeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverupgrade", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverupgrade", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerUpgradeClient: %+v", err) } diff --git a/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go b/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go index 829843149ad..aec8dbe5e31 100644 --- a/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go +++ b/resource-manager/mysql/2020-01-01/serverupgrade/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2020-01-01/serverupgrade/version.go b/resource-manager/mysql/2020-01-01/serverupgrade/version.go index 8783a2fb4b9..603e15de03e 100644 --- a/resource-manager/mysql/2020-01-01/serverupgrade/version.go +++ b/resource-manager/mysql/2020-01-01/serverupgrade/version.go @@ -1,12 +1,10 @@ package serverupgrade -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverupgrade/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverupgrade/2020-01-01" } diff --git a/resource-manager/mysql/2021-05-01/backups/README.md b/resource-manager/mysql/2021-05-01/backups/README.md index 6c2bc8556d5..25e3344ca04 100644 --- a/resource-manager/mysql/2021-05-01/backups/README.md +++ b/resource-manager/mysql/2021-05-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/backups/client.go b/resource-manager/mysql/2021-05-01/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/mysql/2021-05-01/backups/client.go +++ b/resource-manager/mysql/2021-05-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/backups/id_backup.go b/resource-manager/mysql/2021-05-01/backups/id_backup.go index 32a9611ee77..8ec372b6ee6 100644 --- a/resource-manager/mysql/2021-05-01/backups/id_backup.go +++ b/resource-manager/mysql/2021-05-01/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/backups/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/backups/id_flexibleserver.go index 836342b0045..06fecd86675 100644 --- a/resource-manager/mysql/2021-05-01/backups/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/backups/method_get.go b/resource-manager/mysql/2021-05-01/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/mysql/2021-05-01/backups/method_get.go +++ b/resource-manager/mysql/2021-05-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/backups/version.go b/resource-manager/mysql/2021-05-01/backups/version.go index 650fe50c24a..ffb691e4339 100644 --- a/resource-manager/mysql/2021-05-01/backups/version.go +++ b/resource-manager/mysql/2021-05-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/README.md b/resource-manager/mysql/2021-05-01/checknameavailability/README.md index 4e94f719a33..2fc5936b050 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/README.md +++ b/resource-manager/mysql/2021-05-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/client.go b/resource-manager/mysql/2021-05-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/client.go +++ b/resource-manager/mysql/2021-05-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/id_location.go b/resource-manager/mysql/2021-05-01/checknameavailability/id_location.go index ba921812b5f..a63e638fc8d 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/id_location.go +++ b/resource-manager/mysql/2021-05-01/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/method_execute.go b/resource-manager/mysql/2021-05-01/checknameavailability/method_execute.go index 4772940faa4..b082e9475f9 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/method_execute.go +++ b/resource-manager/mysql/2021-05-01/checknameavailability/method_execute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/method_withoutlocationexecute.go b/resource-manager/mysql/2021-05-01/checknameavailability/method_withoutlocationexecute.go index db0476bd987..461304d8035 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/method_withoutlocationexecute.go +++ b/resource-manager/mysql/2021-05-01/checknameavailability/method_withoutlocationexecute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) WithoutLocationExecute(ctx context.Context, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/checknameavailability/version.go b/resource-manager/mysql/2021-05-01/checknameavailability/version.go index e8c1f33be52..457fdff3f5d 100644 --- a/resource-manager/mysql/2021-05-01/checknameavailability/version.go +++ b/resource-manager/mysql/2021-05-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/configurations/README.md b/resource-manager/mysql/2021-05-01/configurations/README.md index 79ca2623452..aac901b551f 100644 --- a/resource-manager/mysql/2021-05-01/configurations/README.md +++ b/resource-manager/mysql/2021-05-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/configurations/client.go b/resource-manager/mysql/2021-05-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mysql/2021-05-01/configurations/client.go +++ b/resource-manager/mysql/2021-05-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/configurations/id_configuration.go b/resource-manager/mysql/2021-05-01/configurations/id_configuration.go index 6bfd24e33ce..237ace80897 100644 --- a/resource-manager/mysql/2021-05-01/configurations/id_configuration.go +++ b/resource-manager/mysql/2021-05-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/configurations/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/configurations/id_flexibleserver.go index 6b0f01f20bd..00895fc6ad5 100644 --- a/resource-manager/mysql/2021-05-01/configurations/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/configurations/method_get.go b/resource-manager/mysql/2021-05-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mysql/2021-05-01/configurations/method_get.go +++ b/resource-manager/mysql/2021-05-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/configurations/version.go b/resource-manager/mysql/2021-05-01/configurations/version.go index b06cb044d76..90c325092b6 100644 --- a/resource-manager/mysql/2021-05-01/configurations/version.go +++ b/resource-manager/mysql/2021-05-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/databases/README.md b/resource-manager/mysql/2021-05-01/databases/README.md index 3b3657e76db..152b47c8182 100644 --- a/resource-manager/mysql/2021-05-01/databases/README.md +++ b/resource-manager/mysql/2021-05-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/databases/client.go b/resource-manager/mysql/2021-05-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mysql/2021-05-01/databases/client.go +++ b/resource-manager/mysql/2021-05-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/databases/id_database.go b/resource-manager/mysql/2021-05-01/databases/id_database.go index 604b409123f..0ad1db90bcc 100644 --- a/resource-manager/mysql/2021-05-01/databases/id_database.go +++ b/resource-manager/mysql/2021-05-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/databases/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/databases/id_flexibleserver.go index 8ebd1579ee9..a4ff18214cb 100644 --- a/resource-manager/mysql/2021-05-01/databases/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/databases/method_get.go b/resource-manager/mysql/2021-05-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mysql/2021-05-01/databases/method_get.go +++ b/resource-manager/mysql/2021-05-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/databases/version.go b/resource-manager/mysql/2021-05-01/databases/version.go index b1bf2c06bca..9b7d067346f 100644 --- a/resource-manager/mysql/2021-05-01/databases/version.go +++ b/resource-manager/mysql/2021-05-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/firewallrules/README.md b/resource-manager/mysql/2021-05-01/firewallrules/README.md index ae8c0ef4a45..783c2adc4de 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/README.md +++ b/resource-manager/mysql/2021-05-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/firewallrules/client.go b/resource-manager/mysql/2021-05-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/client.go +++ b/resource-manager/mysql/2021-05-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/firewallrules/id_firewallrule.go b/resource-manager/mysql/2021-05-01/firewallrules/id_firewallrule.go index c66aa731bd4..41c88887348 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/id_firewallrule.go +++ b/resource-manager/mysql/2021-05-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/firewallrules/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/firewallrules/id_flexibleserver.go index 26dc5a21b08..a17fbfa7acb 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/firewallrules/method_get.go b/resource-manager/mysql/2021-05-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/method_get.go +++ b/resource-manager/mysql/2021-05-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/firewallrules/version.go b/resource-manager/mysql/2021-05-01/firewallrules/version.go index f42dd905c1f..5bd7268ad67 100644 --- a/resource-manager/mysql/2021-05-01/firewallrules/version.go +++ b/resource-manager/mysql/2021-05-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/README.md b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/README.md index 55d3d5d889d..f5921319447 100644 --- a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/README.md +++ b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/getprivatednszonesuffix` Documentation -The `getprivatednszonesuffix` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/client.go b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/client.go +++ b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/method_execute.go b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/method_execute.go index 480e45bca94..3a476e762e5 100644 --- a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model GetPrivateDnsZoneSuffixResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/version.go b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/version.go index c6e2c966af0..18abcdb9a8d 100644 --- a/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/version.go +++ b/resource-manager/mysql/2021-05-01/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/README.md b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/README.md index 79572dad66a..6e768d9e896 100644 --- a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/README.md +++ b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/client.go b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/client.go +++ b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/id_location.go b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/id_location.go index 9b2f24ee4b1..d5b58ec298d 100644 --- a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/id_location.go +++ b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/version.go b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/version.go index 513cc3a111d..d0f73f23b67 100644 --- a/resource-manager/mysql/2021-05-01/locationbasedcapabilities/version.go +++ b/resource-manager/mysql/2021-05-01/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/serverfailover/client.go b/resource-manager/mysql/2021-05-01/serverfailover/client.go index da2795c8050..b205981fa98 100644 --- a/resource-manager/mysql/2021-05-01/serverfailover/client.go +++ b/resource-manager/mysql/2021-05-01/serverfailover/client.go @@ -15,7 +15,7 @@ type ServerFailoverClient struct { } func NewServerFailoverClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerFailoverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverfailover", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverfailover", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerFailoverClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/serverfailover/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/serverfailover/id_flexibleserver.go index 4d0ffcf6f67..a07173dc01c 100644 --- a/resource-manager/mysql/2021-05-01/serverfailover/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/serverfailover/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/serverfailover/version.go b/resource-manager/mysql/2021-05-01/serverfailover/version.go index 2fe100ead4b..0e802cc8f94 100644 --- a/resource-manager/mysql/2021-05-01/serverfailover/version.go +++ b/resource-manager/mysql/2021-05-01/serverfailover/version.go @@ -1,12 +1,10 @@ package serverfailover -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverfailover/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverfailover/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/serverrestart/README.md b/resource-manager/mysql/2021-05-01/serverrestart/README.md index 903ba8ec30b..7774c75c64f 100644 --- a/resource-manager/mysql/2021-05-01/serverrestart/README.md +++ b/resource-manager/mysql/2021-05-01/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/serverrestart/client.go b/resource-manager/mysql/2021-05-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mysql/2021-05-01/serverrestart/client.go +++ b/resource-manager/mysql/2021-05-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/serverrestart/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/serverrestart/id_flexibleserver.go index fdcf2092d55..19f5825d2ea 100644 --- a/resource-manager/mysql/2021-05-01/serverrestart/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/serverrestart/version.go b/resource-manager/mysql/2021-05-01/serverrestart/version.go index e2aa43b27de..719b363d87c 100644 --- a/resource-manager/mysql/2021-05-01/serverrestart/version.go +++ b/resource-manager/mysql/2021-05-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/servers/README.md b/resource-manager/mysql/2021-05-01/servers/README.md index 252a1b48204..83678d9a4d2 100644 --- a/resource-manager/mysql/2021-05-01/servers/README.md +++ b/resource-manager/mysql/2021-05-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-05-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-05-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-05-01/servers/client.go b/resource-manager/mysql/2021-05-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mysql/2021-05-01/servers/client.go +++ b/resource-manager/mysql/2021-05-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/servers/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/servers/id_flexibleserver.go index aaebb48280d..970e6a59820 100644 --- a/resource-manager/mysql/2021-05-01/servers/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/servers/method_get.go b/resource-manager/mysql/2021-05-01/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/mysql/2021-05-01/servers/method_get.go +++ b/resource-manager/mysql/2021-05-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-05-01/servers/version.go b/resource-manager/mysql/2021-05-01/servers/version.go index 111072603c6..23fff771e42 100644 --- a/resource-manager/mysql/2021-05-01/servers/version.go +++ b/resource-manager/mysql/2021-05-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/serverstart/client.go b/resource-manager/mysql/2021-05-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mysql/2021-05-01/serverstart/client.go +++ b/resource-manager/mysql/2021-05-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/serverstart/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/serverstart/id_flexibleserver.go index 42ff836d2e0..930edee031e 100644 --- a/resource-manager/mysql/2021-05-01/serverstart/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/serverstart/version.go b/resource-manager/mysql/2021-05-01/serverstart/version.go index c0a1cd1e96f..9e0d9e984f6 100644 --- a/resource-manager/mysql/2021-05-01/serverstart/version.go +++ b/resource-manager/mysql/2021-05-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2021-05-01" } diff --git a/resource-manager/mysql/2021-05-01/serverstop/client.go b/resource-manager/mysql/2021-05-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mysql/2021-05-01/serverstop/client.go +++ b/resource-manager/mysql/2021-05-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mysql/2021-05-01/serverstop/id_flexibleserver.go b/resource-manager/mysql/2021-05-01/serverstop/id_flexibleserver.go index 0bc6abc8f18..12d491db9d6 100644 --- a/resource-manager/mysql/2021-05-01/serverstop/id_flexibleserver.go +++ b/resource-manager/mysql/2021-05-01/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-05-01/serverstop/version.go b/resource-manager/mysql/2021-05-01/serverstop/version.go index 5ba165c24f7..690c94e84af 100644 --- a/resource-manager/mysql/2021-05-01/serverstop/version.go +++ b/resource-manager/mysql/2021-05-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2021-05-01" } diff --git a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/README.md b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/README.md index 8d309085b6e..6fdf4eeae17 100644 --- a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/README.md +++ b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/azureadadministrators` Documentation -The `azureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `azureadadministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/client.go b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/client.go index a2d0a463f32..47f79337723 100644 --- a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/client.go +++ b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/client.go @@ -15,7 +15,7 @@ type AzureADAdministratorsClient struct { } func NewAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/id_flexibleserver.go index 5c86b6ccb08..bb3d2a4d2b6 100644 --- a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/method_get.go b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/method_get.go index 0fd098fc2ad..1a645900b98 100644 --- a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/method_get.go @@ -46,7 +46,6 @@ func (c AzureADAdministratorsClient) Get(ctx context.Context, id FlexibleServerI var model AzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/version.go b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/version.go index 807ed7ec818..1ea456fb89e 100644 --- a/resource-manager/mysql/2021-12-01-preview/azureadadministrators/version.go +++ b/resource-manager/mysql/2021-12-01-preview/azureadadministrators/version.go @@ -1,12 +1,10 @@ package azureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azureadadministrators/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/README.md b/resource-manager/mysql/2021-12-01-preview/backups/README.md index b4f726c29eb..a8fe001c85e 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/README.md +++ b/resource-manager/mysql/2021-12-01-preview/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/backups/client.go b/resource-manager/mysql/2021-12-01-preview/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/client.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/id_backup.go b/resource-manager/mysql/2021-12-01-preview/backups/id_backup.go index 32a9611ee77..8ec372b6ee6 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/id_backup.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/backups/id_flexibleserver.go index 836342b0045..06fecd86675 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/method_get.go b/resource-manager/mysql/2021-12-01-preview/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/method_put.go b/resource-manager/mysql/2021-12-01-preview/backups/method_put.go index 8d43e627c17..b743c45357d 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/method_put.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/method_put.go @@ -45,7 +45,6 @@ func (c BackupsClient) Put(ctx context.Context, id BackupId) (result PutOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/backups/version.go b/resource-manager/mysql/2021-12-01-preview/backups/version.go index f9b20b0e54c..667efd2f9cf 100644 --- a/resource-manager/mysql/2021-12-01-preview/backups/version.go +++ b/resource-manager/mysql/2021-12-01-preview/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/README.md b/resource-manager/mysql/2021-12-01-preview/checknameavailability/README.md index 81dde3ff800..d2d14255e54 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/README.md +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/client.go b/resource-manager/mysql/2021-12-01-preview/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/client.go +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/id_location.go b/resource-manager/mysql/2021-12-01-preview/checknameavailability/id_location.go index ba921812b5f..a63e638fc8d 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/id_location.go +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_execute.go b/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_execute.go index 4772940faa4..b082e9475f9 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_execute.go +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_execute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_withoutlocationexecute.go b/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_withoutlocationexecute.go index db0476bd987..461304d8035 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_withoutlocationexecute.go +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/method_withoutlocationexecute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) WithoutLocationExecute(ctx context.Context, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/checknameavailability/version.go b/resource-manager/mysql/2021-12-01-preview/checknameavailability/version.go index 51e8ed8fc13..8ce0c867b44 100644 --- a/resource-manager/mysql/2021-12-01-preview/checknameavailability/version.go +++ b/resource-manager/mysql/2021-12-01-preview/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/README.md b/resource-manager/mysql/2021-12-01-preview/configurations/README.md index 2fb853d786d..80a36621cf8 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/README.md +++ b/resource-manager/mysql/2021-12-01-preview/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/client.go b/resource-manager/mysql/2021-12-01-preview/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/client.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/id_configuration.go b/resource-manager/mysql/2021-12-01-preview/configurations/id_configuration.go index 6bfd24e33ce..237ace80897 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/id_configuration.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/configurations/id_flexibleserver.go index 6b0f01f20bd..00895fc6ad5 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/method_get.go b/resource-manager/mysql/2021-12-01-preview/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/method_listbyserver.go b/resource-manager/mysql/2021-12-01-preview/configurations/method_listbyserver.go index cb3120c513f..55d29cdad43 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/method_listbyserver.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/method_listbyserver.go @@ -42,6 +42,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mysql/2021-12-01-preview/configurations/version.go b/resource-manager/mysql/2021-12-01-preview/configurations/version.go index 70e31aa5ca7..e065109f7a9 100644 --- a/resource-manager/mysql/2021-12-01-preview/configurations/version.go +++ b/resource-manager/mysql/2021-12-01-preview/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/databases/README.md b/resource-manager/mysql/2021-12-01-preview/databases/README.md index 9dd4bef724f..db3ae7ab710 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/README.md +++ b/resource-manager/mysql/2021-12-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/databases/client.go b/resource-manager/mysql/2021-12-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/client.go +++ b/resource-manager/mysql/2021-12-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/databases/id_database.go b/resource-manager/mysql/2021-12-01-preview/databases/id_database.go index 604b409123f..0ad1db90bcc 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/id_database.go +++ b/resource-manager/mysql/2021-12-01-preview/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/databases/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/databases/id_flexibleserver.go index 8ebd1579ee9..a4ff18214cb 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/databases/method_get.go b/resource-manager/mysql/2021-12-01-preview/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/databases/version.go b/resource-manager/mysql/2021-12-01-preview/databases/version.go index 541ad87b3c0..2d7fa1ff770 100644 --- a/resource-manager/mysql/2021-12-01-preview/databases/version.go +++ b/resource-manager/mysql/2021-12-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/README.md b/resource-manager/mysql/2021-12-01-preview/firewallrules/README.md index d42c659107a..bd514f10d50 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/README.md +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/client.go b/resource-manager/mysql/2021-12-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/client.go +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/id_firewallrule.go b/resource-manager/mysql/2021-12-01-preview/firewallrules/id_firewallrule.go index c66aa731bd4..41c88887348 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/firewallrules/id_flexibleserver.go index 26dc5a21b08..a17fbfa7acb 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/method_get.go b/resource-manager/mysql/2021-12-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/firewallrules/version.go b/resource-manager/mysql/2021-12-01-preview/firewallrules/version.go index 400a89ba085..53641b36ee9 100644 --- a/resource-manager/mysql/2021-12-01-preview/firewallrules/version.go +++ b/resource-manager/mysql/2021-12-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/README.md b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/README.md index f9b5de932ae..1028708e4e6 100644 --- a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/README.md +++ b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix` Documentation -The `getprivatednszonesuffix` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/client.go b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/client.go +++ b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/method_execute.go b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/method_execute.go index 480e45bca94..3a476e762e5 100644 --- a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model GetPrivateDnsZoneSuffixResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/version.go b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/version.go index f78ac076bce..8e0ee5552c4 100644 --- a/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/version.go +++ b/resource-manager/mysql/2021-12-01-preview/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/README.md b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/README.md index 8418740a844..05df3ddd985 100644 --- a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/README.md +++ b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/client.go b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/client.go +++ b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/id_location.go b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/id_location.go index 9b2f24ee4b1..d5b58ec298d 100644 --- a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/id_location.go +++ b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/version.go b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/version.go index 88a3fb48b18..44482902bad 100644 --- a/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/version.go +++ b/resource-manager/mysql/2021-12-01-preview/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/logfiles/README.md b/resource-manager/mysql/2021-12-01-preview/logfiles/README.md index 33fc82f6751..28759e8d402 100644 --- a/resource-manager/mysql/2021-12-01-preview/logfiles/README.md +++ b/resource-manager/mysql/2021-12-01-preview/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/logfiles/client.go b/resource-manager/mysql/2021-12-01-preview/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mysql/2021-12-01-preview/logfiles/client.go +++ b/resource-manager/mysql/2021-12-01-preview/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/logfiles/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/logfiles/id_flexibleserver.go index 23f598b45e1..d4fed7e78ea 100644 --- a/resource-manager/mysql/2021-12-01-preview/logfiles/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/logfiles/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/logfiles/version.go b/resource-manager/mysql/2021-12-01-preview/logfiles/version.go index 105c38c9f1b..9143f24f15a 100644 --- a/resource-manager/mysql/2021-12-01-preview/logfiles/version.go +++ b/resource-manager/mysql/2021-12-01-preview/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/serverfailover/client.go b/resource-manager/mysql/2021-12-01-preview/serverfailover/client.go index da2795c8050..b205981fa98 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverfailover/client.go +++ b/resource-manager/mysql/2021-12-01-preview/serverfailover/client.go @@ -15,7 +15,7 @@ type ServerFailoverClient struct { } func NewServerFailoverClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerFailoverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverfailover", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverfailover", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerFailoverClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/serverfailover/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/serverfailover/id_flexibleserver.go index 4d0ffcf6f67..a07173dc01c 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverfailover/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/serverfailover/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/serverfailover/version.go b/resource-manager/mysql/2021-12-01-preview/serverfailover/version.go index 9611faf9034..83b09054a40 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverfailover/version.go +++ b/resource-manager/mysql/2021-12-01-preview/serverfailover/version.go @@ -1,12 +1,10 @@ package serverfailover -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverfailover/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverfailover/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/serverrestart/README.md b/resource-manager/mysql/2021-12-01-preview/serverrestart/README.md index a40eaa14316..5c95dbbde71 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverrestart/README.md +++ b/resource-manager/mysql/2021-12-01-preview/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/serverrestart/client.go b/resource-manager/mysql/2021-12-01-preview/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverrestart/client.go +++ b/resource-manager/mysql/2021-12-01-preview/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/serverrestart/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/serverrestart/id_flexibleserver.go index fdcf2092d55..19f5825d2ea 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverrestart/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/serverrestart/version.go b/resource-manager/mysql/2021-12-01-preview/serverrestart/version.go index d6566baaa9c..62466d7035a 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverrestart/version.go +++ b/resource-manager/mysql/2021-12-01-preview/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/servers/README.md b/resource-manager/mysql/2021-12-01-preview/servers/README.md index 0b961407fc4..60c89f33a6d 100644 --- a/resource-manager/mysql/2021-12-01-preview/servers/README.md +++ b/resource-manager/mysql/2021-12-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2021-12-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2021-12-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2021-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2021-12-01-preview/servers/client.go b/resource-manager/mysql/2021-12-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mysql/2021-12-01-preview/servers/client.go +++ b/resource-manager/mysql/2021-12-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/servers/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/servers/id_flexibleserver.go index aaebb48280d..970e6a59820 100644 --- a/resource-manager/mysql/2021-12-01-preview/servers/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/servers/method_get.go b/resource-manager/mysql/2021-12-01-preview/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/mysql/2021-12-01-preview/servers/method_get.go +++ b/resource-manager/mysql/2021-12-01-preview/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2021-12-01-preview/servers/version.go b/resource-manager/mysql/2021-12-01-preview/servers/version.go index 12f68def288..a15053df124 100644 --- a/resource-manager/mysql/2021-12-01-preview/servers/version.go +++ b/resource-manager/mysql/2021-12-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstart/client.go b/resource-manager/mysql/2021-12-01-preview/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstart/client.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstart/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/serverstart/id_flexibleserver.go index 42ff836d2e0..930edee031e 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstart/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstart/version.go b/resource-manager/mysql/2021-12-01-preview/serverstart/version.go index aa17d980d95..941a64258cf 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstart/version.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2021-12-01-preview" } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstop/client.go b/resource-manager/mysql/2021-12-01-preview/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstop/client.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstop/id_flexibleserver.go b/resource-manager/mysql/2021-12-01-preview/serverstop/id_flexibleserver.go index 0bc6abc8f18..12d491db9d6 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstop/id_flexibleserver.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2021-12-01-preview/serverstop/version.go b/resource-manager/mysql/2021-12-01-preview/serverstop/version.go index 750bacdb4ef..38bae50bf49 100644 --- a/resource-manager/mysql/2021-12-01-preview/serverstop/version.go +++ b/resource-manager/mysql/2021-12-01-preview/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2021-12-01-preview" } diff --git a/resource-manager/mysql/2022-01-01/azureadadministrators/README.md b/resource-manager/mysql/2022-01-01/azureadadministrators/README.md index cba9b945344..97a0a104575 100644 --- a/resource-manager/mysql/2022-01-01/azureadadministrators/README.md +++ b/resource-manager/mysql/2022-01-01/azureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators` Documentation -The `azureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `azureadadministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/azureadadministrators/client.go b/resource-manager/mysql/2022-01-01/azureadadministrators/client.go index a2d0a463f32..47f79337723 100644 --- a/resource-manager/mysql/2022-01-01/azureadadministrators/client.go +++ b/resource-manager/mysql/2022-01-01/azureadadministrators/client.go @@ -15,7 +15,7 @@ type AzureADAdministratorsClient struct { } func NewAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go index 5c86b6ccb08..bb3d2a4d2b6 100644 --- a/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go b/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go index 0fd098fc2ad..1a645900b98 100644 --- a/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go +++ b/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go @@ -46,7 +46,6 @@ func (c AzureADAdministratorsClient) Get(ctx context.Context, id FlexibleServerI var model AzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/azureadadministrators/version.go b/resource-manager/mysql/2022-01-01/azureadadministrators/version.go index 0b6209b34a3..397f8090aa1 100644 --- a/resource-manager/mysql/2022-01-01/azureadadministrators/version.go +++ b/resource-manager/mysql/2022-01-01/azureadadministrators/version.go @@ -1,12 +1,10 @@ package azureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azureadadministrators/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/backups/README.md b/resource-manager/mysql/2022-01-01/backups/README.md index d6bc92c2acf..20772dc7920 100644 --- a/resource-manager/mysql/2022-01-01/backups/README.md +++ b/resource-manager/mysql/2022-01-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/backups/client.go b/resource-manager/mysql/2022-01-01/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/mysql/2022-01-01/backups/client.go +++ b/resource-manager/mysql/2022-01-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/backups/id_backup.go b/resource-manager/mysql/2022-01-01/backups/id_backup.go index 32a9611ee77..8ec372b6ee6 100644 --- a/resource-manager/mysql/2022-01-01/backups/id_backup.go +++ b/resource-manager/mysql/2022-01-01/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go index 836342b0045..06fecd86675 100644 --- a/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/backups/method_get.go b/resource-manager/mysql/2022-01-01/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/mysql/2022-01-01/backups/method_get.go +++ b/resource-manager/mysql/2022-01-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/backups/method_put.go b/resource-manager/mysql/2022-01-01/backups/method_put.go index 8d43e627c17..b743c45357d 100644 --- a/resource-manager/mysql/2022-01-01/backups/method_put.go +++ b/resource-manager/mysql/2022-01-01/backups/method_put.go @@ -45,7 +45,6 @@ func (c BackupsClient) Put(ctx context.Context, id BackupId) (result PutOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/backups/version.go b/resource-manager/mysql/2022-01-01/backups/version.go index 91f95dd8aeb..2ce3b030269 100644 --- a/resource-manager/mysql/2022-01-01/backups/version.go +++ b/resource-manager/mysql/2022-01-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/README.md b/resource-manager/mysql/2022-01-01/checknameavailability/README.md index b8dbe3f4fdc..c423b3fa7d6 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/README.md +++ b/resource-manager/mysql/2022-01-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/client.go b/resource-manager/mysql/2022-01-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/client.go +++ b/resource-manager/mysql/2022-01-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go b/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go index ba921812b5f..a63e638fc8d 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go +++ b/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go b/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go index 4772940faa4..b082e9475f9 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go +++ b/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go b/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go index db0476bd987..461304d8035 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go +++ b/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) WithoutLocationExecute(ctx context.Context, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/checknameavailability/version.go b/resource-manager/mysql/2022-01-01/checknameavailability/version.go index 570fa81a003..d551067987e 100644 --- a/resource-manager/mysql/2022-01-01/checknameavailability/version.go +++ b/resource-manager/mysql/2022-01-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/configurations/README.md b/resource-manager/mysql/2022-01-01/configurations/README.md index 5cf4d68f5ce..40cf4383219 100644 --- a/resource-manager/mysql/2022-01-01/configurations/README.md +++ b/resource-manager/mysql/2022-01-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/configurations/client.go b/resource-manager/mysql/2022-01-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mysql/2022-01-01/configurations/client.go +++ b/resource-manager/mysql/2022-01-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/configurations/id_configuration.go b/resource-manager/mysql/2022-01-01/configurations/id_configuration.go index 6bfd24e33ce..237ace80897 100644 --- a/resource-manager/mysql/2022-01-01/configurations/id_configuration.go +++ b/resource-manager/mysql/2022-01-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go index 6b0f01f20bd..00895fc6ad5 100644 --- a/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/configurations/method_get.go b/resource-manager/mysql/2022-01-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mysql/2022-01-01/configurations/method_get.go +++ b/resource-manager/mysql/2022-01-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go b/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go index cb3120c513f..55d29cdad43 100644 --- a/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go +++ b/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go @@ -42,6 +42,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mysql/2022-01-01/configurations/version.go b/resource-manager/mysql/2022-01-01/configurations/version.go index c91dc76206f..76611e0f07e 100644 --- a/resource-manager/mysql/2022-01-01/configurations/version.go +++ b/resource-manager/mysql/2022-01-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/databases/README.md b/resource-manager/mysql/2022-01-01/databases/README.md index d81cd68c5c4..185127c231f 100644 --- a/resource-manager/mysql/2022-01-01/databases/README.md +++ b/resource-manager/mysql/2022-01-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/databases/client.go b/resource-manager/mysql/2022-01-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mysql/2022-01-01/databases/client.go +++ b/resource-manager/mysql/2022-01-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/databases/id_database.go b/resource-manager/mysql/2022-01-01/databases/id_database.go index 604b409123f..0ad1db90bcc 100644 --- a/resource-manager/mysql/2022-01-01/databases/id_database.go +++ b/resource-manager/mysql/2022-01-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go index 8ebd1579ee9..a4ff18214cb 100644 --- a/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/databases/method_get.go b/resource-manager/mysql/2022-01-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mysql/2022-01-01/databases/method_get.go +++ b/resource-manager/mysql/2022-01-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/databases/version.go b/resource-manager/mysql/2022-01-01/databases/version.go index 925ad65c153..4db681f665c 100644 --- a/resource-manager/mysql/2022-01-01/databases/version.go +++ b/resource-manager/mysql/2022-01-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/firewallrules/README.md b/resource-manager/mysql/2022-01-01/firewallrules/README.md index c5b4f8ab7f3..890ca96e6cd 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/README.md +++ b/resource-manager/mysql/2022-01-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/firewallrules/client.go b/resource-manager/mysql/2022-01-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/client.go +++ b/resource-manager/mysql/2022-01-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go b/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go index c66aa731bd4..41c88887348 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go +++ b/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go index 26dc5a21b08..a17fbfa7acb 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/firewallrules/method_get.go b/resource-manager/mysql/2022-01-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/method_get.go +++ b/resource-manager/mysql/2022-01-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/firewallrules/version.go b/resource-manager/mysql/2022-01-01/firewallrules/version.go index c96e99a28a3..086290b4d01 100644 --- a/resource-manager/mysql/2022-01-01/firewallrules/version.go +++ b/resource-manager/mysql/2022-01-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md index a893cd14eac..ddf9c6f8379 100644 --- a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md +++ b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix` Documentation -The `getprivatednszonesuffix` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go +++ b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go index 480e45bca94..3a476e762e5 100644 --- a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model GetPrivateDnsZoneSuffixResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go index d5e2b6bda7b..d6e350b825e 100644 --- a/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go +++ b/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md index a8c4f04afa8..1868ea88297 100644 --- a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md +++ b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go +++ b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go index 9b2f24ee4b1..d5b58ec298d 100644 --- a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go +++ b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go index 2d0679772a8..3dbfeafab2e 100644 --- a/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go +++ b/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/logfiles/README.md b/resource-manager/mysql/2022-01-01/logfiles/README.md index 7f7d09c8729..31ccc1b01ad 100644 --- a/resource-manager/mysql/2022-01-01/logfiles/README.md +++ b/resource-manager/mysql/2022-01-01/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/logfiles/client.go b/resource-manager/mysql/2022-01-01/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mysql/2022-01-01/logfiles/client.go +++ b/resource-manager/mysql/2022-01-01/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go index 23f598b45e1..d4fed7e78ea 100644 --- a/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/logfiles/version.go b/resource-manager/mysql/2022-01-01/logfiles/version.go index 5f0a51699f0..f579fd4b1c6 100644 --- a/resource-manager/mysql/2022-01-01/logfiles/version.go +++ b/resource-manager/mysql/2022-01-01/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/serverfailover/client.go b/resource-manager/mysql/2022-01-01/serverfailover/client.go index da2795c8050..b205981fa98 100644 --- a/resource-manager/mysql/2022-01-01/serverfailover/client.go +++ b/resource-manager/mysql/2022-01-01/serverfailover/client.go @@ -15,7 +15,7 @@ type ServerFailoverClient struct { } func NewServerFailoverClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerFailoverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverfailover", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverfailover", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerFailoverClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go index 4d0ffcf6f67..a07173dc01c 100644 --- a/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/serverfailover/version.go b/resource-manager/mysql/2022-01-01/serverfailover/version.go index 062cc1c455a..96583d28939 100644 --- a/resource-manager/mysql/2022-01-01/serverfailover/version.go +++ b/resource-manager/mysql/2022-01-01/serverfailover/version.go @@ -1,12 +1,10 @@ package serverfailover -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverfailover/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverfailover/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/serverrestart/README.md b/resource-manager/mysql/2022-01-01/serverrestart/README.md index 927869906b0..e233596da03 100644 --- a/resource-manager/mysql/2022-01-01/serverrestart/README.md +++ b/resource-manager/mysql/2022-01-01/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/serverrestart/client.go b/resource-manager/mysql/2022-01-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mysql/2022-01-01/serverrestart/client.go +++ b/resource-manager/mysql/2022-01-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go index fdcf2092d55..19f5825d2ea 100644 --- a/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/serverrestart/version.go b/resource-manager/mysql/2022-01-01/serverrestart/version.go index 80aaca6b1f1..abea028194d 100644 --- a/resource-manager/mysql/2022-01-01/serverrestart/version.go +++ b/resource-manager/mysql/2022-01-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/servers/README.md b/resource-manager/mysql/2022-01-01/servers/README.md index f5fc13ad784..4c4b44e7bd3 100644 --- a/resource-manager/mysql/2022-01-01/servers/README.md +++ b/resource-manager/mysql/2022-01-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2022-01-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2022-01-01/servers/client.go b/resource-manager/mysql/2022-01-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mysql/2022-01-01/servers/client.go +++ b/resource-manager/mysql/2022-01-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go index aaebb48280d..970e6a59820 100644 --- a/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/servers/method_get.go b/resource-manager/mysql/2022-01-01/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/mysql/2022-01-01/servers/method_get.go +++ b/resource-manager/mysql/2022-01-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2022-01-01/servers/version.go b/resource-manager/mysql/2022-01-01/servers/version.go index ca20aadce54..47918e464a7 100644 --- a/resource-manager/mysql/2022-01-01/servers/version.go +++ b/resource-manager/mysql/2022-01-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/serverstart/client.go b/resource-manager/mysql/2022-01-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mysql/2022-01-01/serverstart/client.go +++ b/resource-manager/mysql/2022-01-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go index 42ff836d2e0..930edee031e 100644 --- a/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/serverstart/version.go b/resource-manager/mysql/2022-01-01/serverstart/version.go index 4c27bb14223..a551280f9ba 100644 --- a/resource-manager/mysql/2022-01-01/serverstart/version.go +++ b/resource-manager/mysql/2022-01-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2022-01-01" } diff --git a/resource-manager/mysql/2022-01-01/serverstop/client.go b/resource-manager/mysql/2022-01-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mysql/2022-01-01/serverstop/client.go +++ b/resource-manager/mysql/2022-01-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go b/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go index 0bc6abc8f18..12d491db9d6 100644 --- a/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go +++ b/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2022-01-01/serverstop/version.go b/resource-manager/mysql/2022-01-01/serverstop/version.go index a2f8f0dc7c7..a96f76fa23c 100644 --- a/resource-manager/mysql/2022-01-01/serverstop/version.go +++ b/resource-manager/mysql/2022-01-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2022-01-01" } diff --git a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md index 2d18223803f..8ddcf6d6025 100644 --- a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md +++ b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings` Documentation -The `advancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `advancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go index 3e9a516e71d..e7a35ff187e 100644 --- a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go +++ b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type AdvancedThreatProtectionSettingsClient struct { } func NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go index 3ef0dace973..f66598b0a03 100644 --- a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go index e262ae8f623..da0e2fc8abb 100644 --- a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go +++ b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go @@ -46,7 +46,6 @@ func (c AdvancedThreatProtectionSettingsClient) Get(ctx context.Context, id Flex var model AdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go index b6bbe621bcf..30cad3e63a8 100644 --- a/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go +++ b/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package advancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/advancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/advancedthreatprotectionsettings/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/azureadadministrators/README.md b/resource-manager/mysql/2023-12-30/azureadadministrators/README.md index d86b0b889da..e3be6a6e251 100644 --- a/resource-manager/mysql/2023-12-30/azureadadministrators/README.md +++ b/resource-manager/mysql/2023-12-30/azureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators` Documentation -The `azureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `azureadadministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/azureadadministrators/client.go b/resource-manager/mysql/2023-12-30/azureadadministrators/client.go index a2d0a463f32..47f79337723 100644 --- a/resource-manager/mysql/2023-12-30/azureadadministrators/client.go +++ b/resource-manager/mysql/2023-12-30/azureadadministrators/client.go @@ -15,7 +15,7 @@ type AzureADAdministratorsClient struct { } func NewAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go index 5c86b6ccb08..bb3d2a4d2b6 100644 --- a/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go b/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go index 0fd098fc2ad..1a645900b98 100644 --- a/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go +++ b/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go @@ -46,7 +46,6 @@ func (c AzureADAdministratorsClient) Get(ctx context.Context, id FlexibleServerI var model AzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/azureadadministrators/version.go b/resource-manager/mysql/2023-12-30/azureadadministrators/version.go index 19033ab8a04..9c660ab5389 100644 --- a/resource-manager/mysql/2023-12-30/azureadadministrators/version.go +++ b/resource-manager/mysql/2023-12-30/azureadadministrators/version.go @@ -1,12 +1,10 @@ package azureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azureadadministrators/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/README.md b/resource-manager/mysql/2023-12-30/backupandexport/README.md index d17c0240274..41b907e252f 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/README.md +++ b/resource-manager/mysql/2023-12-30/backupandexport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport` Documentation -The `backupandexport` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `backupandexport` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/backupandexport/client.go b/resource-manager/mysql/2023-12-30/backupandexport/client.go index 19961c01f9e..b05c3ad7f0f 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/client.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/client.go @@ -15,7 +15,7 @@ type BackupAndExportClient struct { } func NewBackupAndExportClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupAndExportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupandexport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupandexport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupAndExportClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go index 47a22ba2747..b724ff5fb4d 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go b/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go index 751bc200164..326579372b7 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go @@ -46,7 +46,6 @@ func (c BackupAndExportClient) ValidateBackup(ctx context.Context, id FlexibleSe var model ValidateBackupResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go b/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go index 85c74754269..ede9ee3a958 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go @@ -30,7 +30,7 @@ func (s *BackupAndExportRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetDetails"]; ok { - impl, err := unmarshalBackupStoreDetailsImplementation(v) + impl, err := UnmarshalBackupStoreDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetDetails' for 'BackupAndExportRequest': %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go b/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go index 29dc9ebc234..ddd1a770786 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go @@ -9,18 +9,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupStoreDetails interface { + BackupStoreDetails() BaseBackupStoreDetailsImpl } -// RawBackupStoreDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupStoreDetails = BaseBackupStoreDetailsImpl{} + +type BaseBackupStoreDetailsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupStoreDetailsImpl) BackupStoreDetails() BaseBackupStoreDetailsImpl { + return s +} + +var _ BackupStoreDetails = RawBackupStoreDetailsImpl{} + +// RawBackupStoreDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupStoreDetailsImpl struct { - Type string - Values map[string]interface{} + backupStoreDetails BaseBackupStoreDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupStoreDetailsImpl) BackupStoreDetails() BaseBackupStoreDetailsImpl { + return s.backupStoreDetails } -func unmarshalBackupStoreDetailsImplementation(input []byte) (BackupStoreDetails, error) { +func UnmarshalBackupStoreDetailsImplementation(input []byte) (BackupStoreDetails, error) { if input == nil { return nil, nil } @@ -35,10 +52,15 @@ func unmarshalBackupStoreDetailsImplementation(input []byte) (BackupStoreDetails return nil, nil } - out := RawBackupStoreDetailsImpl{ - Type: value, - Values: temp, + var parent BaseBackupStoreDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupStoreDetailsImpl: %+v", err) } - return out, nil + + return RawBackupStoreDetailsImpl{ + backupStoreDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/mysql/2023-12-30/backupandexport/version.go b/resource-manager/mysql/2023-12-30/backupandexport/version.go index 39d330e22e5..ec83f205948 100644 --- a/resource-manager/mysql/2023-12-30/backupandexport/version.go +++ b/resource-manager/mysql/2023-12-30/backupandexport/version.go @@ -1,12 +1,10 @@ package backupandexport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupandexport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupandexport/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/backups/README.md b/resource-manager/mysql/2023-12-30/backups/README.md index 0385f62197c..2c92027af2e 100644 --- a/resource-manager/mysql/2023-12-30/backups/README.md +++ b/resource-manager/mysql/2023-12-30/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/backups/client.go b/resource-manager/mysql/2023-12-30/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/mysql/2023-12-30/backups/client.go +++ b/resource-manager/mysql/2023-12-30/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/backups/id_backup.go b/resource-manager/mysql/2023-12-30/backups/id_backup.go index 32a9611ee77..8ec372b6ee6 100644 --- a/resource-manager/mysql/2023-12-30/backups/id_backup.go +++ b/resource-manager/mysql/2023-12-30/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go index 836342b0045..06fecd86675 100644 --- a/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/backups/method_get.go b/resource-manager/mysql/2023-12-30/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/mysql/2023-12-30/backups/method_get.go +++ b/resource-manager/mysql/2023-12-30/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/backups/method_put.go b/resource-manager/mysql/2023-12-30/backups/method_put.go index 8d43e627c17..b743c45357d 100644 --- a/resource-manager/mysql/2023-12-30/backups/method_put.go +++ b/resource-manager/mysql/2023-12-30/backups/method_put.go @@ -45,7 +45,6 @@ func (c BackupsClient) Put(ctx context.Context, id BackupId) (result PutOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/backups/version.go b/resource-manager/mysql/2023-12-30/backups/version.go index 4a825c57d2c..72e1293154b 100644 --- a/resource-manager/mysql/2023-12-30/backups/version.go +++ b/resource-manager/mysql/2023-12-30/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/backupsv2/README.md b/resource-manager/mysql/2023-12-30/backupsv2/README.md index 8f77edcd5e0..6bd21cac3f3 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/README.md +++ b/resource-manager/mysql/2023-12-30/backupsv2/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2` Documentation -The `backupsv2` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `backupsv2` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/backupsv2/client.go b/resource-manager/mysql/2023-12-30/backupsv2/client.go index 7cabc72f464..1a4eca1f6e8 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/client.go +++ b/resource-manager/mysql/2023-12-30/backupsv2/client.go @@ -15,7 +15,7 @@ type BackupsV2Client struct { } func NewBackupsV2ClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsV2Client, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupsv2", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupsv2", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsV2Client: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go b/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go index 4257cea2958..c5b79cd5afb 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go +++ b/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go @@ -44,7 +44,7 @@ func ParseBackupsV2ID(input string) (*BackupsV2Id, error) { } id := BackupsV2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupsV2IDInsensitively(input string) (*BackupsV2Id, error) { } id := BackupsV2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go index c731df40345..19a163d4e6a 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go b/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go index 652c4a1bfe1..a15e7540654 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go +++ b/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go @@ -45,7 +45,6 @@ func (c BackupsV2Client) LongRunningBackupsGet(ctx context.Context, id BackupsV2 var model ServerBackupV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/backupsv2/version.go b/resource-manager/mysql/2023-12-30/backupsv2/version.go index 5348e6a7a09..b5a24d5c5bb 100644 --- a/resource-manager/mysql/2023-12-30/backupsv2/version.go +++ b/resource-manager/mysql/2023-12-30/backupsv2/version.go @@ -1,12 +1,10 @@ package backupsv2 -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupsv2/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupsv2/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/README.md b/resource-manager/mysql/2023-12-30/checknameavailability/README.md index d175e49aad3..82a9a633ee9 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/README.md +++ b/resource-manager/mysql/2023-12-30/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/client.go b/resource-manager/mysql/2023-12-30/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/client.go +++ b/resource-manager/mysql/2023-12-30/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go b/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go index ba921812b5f..a63e638fc8d 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go +++ b/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go b/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go index 4772940faa4..b082e9475f9 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go +++ b/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go b/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go index db0476bd987..461304d8035 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go +++ b/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) WithoutLocationExecute(ctx context.Context, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/checknameavailability/version.go b/resource-manager/mysql/2023-12-30/checknameavailability/version.go index d125ea90e83..2497ca42392 100644 --- a/resource-manager/mysql/2023-12-30/checknameavailability/version.go +++ b/resource-manager/mysql/2023-12-30/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/configurations/README.md b/resource-manager/mysql/2023-12-30/configurations/README.md index 9fac0ae5458..551ad3eb2ec 100644 --- a/resource-manager/mysql/2023-12-30/configurations/README.md +++ b/resource-manager/mysql/2023-12-30/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/configurations/client.go b/resource-manager/mysql/2023-12-30/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/mysql/2023-12-30/configurations/client.go +++ b/resource-manager/mysql/2023-12-30/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/configurations/id_configuration.go b/resource-manager/mysql/2023-12-30/configurations/id_configuration.go index 6bfd24e33ce..237ace80897 100644 --- a/resource-manager/mysql/2023-12-30/configurations/id_configuration.go +++ b/resource-manager/mysql/2023-12-30/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go index 6b0f01f20bd..00895fc6ad5 100644 --- a/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/configurations/method_get.go b/resource-manager/mysql/2023-12-30/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/mysql/2023-12-30/configurations/method_get.go +++ b/resource-manager/mysql/2023-12-30/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go b/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go index cb3120c513f..55d29cdad43 100644 --- a/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go +++ b/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go @@ -42,6 +42,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/mysql/2023-12-30/configurations/version.go b/resource-manager/mysql/2023-12-30/configurations/version.go index c7ef493fccc..eb7a17ff37a 100644 --- a/resource-manager/mysql/2023-12-30/configurations/version.go +++ b/resource-manager/mysql/2023-12-30/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/databases/README.md b/resource-manager/mysql/2023-12-30/databases/README.md index 63dfb7a2a73..134b8560756 100644 --- a/resource-manager/mysql/2023-12-30/databases/README.md +++ b/resource-manager/mysql/2023-12-30/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/databases/client.go b/resource-manager/mysql/2023-12-30/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/mysql/2023-12-30/databases/client.go +++ b/resource-manager/mysql/2023-12-30/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/databases/id_database.go b/resource-manager/mysql/2023-12-30/databases/id_database.go index 604b409123f..0ad1db90bcc 100644 --- a/resource-manager/mysql/2023-12-30/databases/id_database.go +++ b/resource-manager/mysql/2023-12-30/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go index 8ebd1579ee9..a4ff18214cb 100644 --- a/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/databases/method_get.go b/resource-manager/mysql/2023-12-30/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/mysql/2023-12-30/databases/method_get.go +++ b/resource-manager/mysql/2023-12-30/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/databases/version.go b/resource-manager/mysql/2023-12-30/databases/version.go index e116929ef55..fdd580a6328 100644 --- a/resource-manager/mysql/2023-12-30/databases/version.go +++ b/resource-manager/mysql/2023-12-30/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/firewallrules/README.md b/resource-manager/mysql/2023-12-30/firewallrules/README.md index dff1e712399..c59a5812432 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/README.md +++ b/resource-manager/mysql/2023-12-30/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/firewallrules/client.go b/resource-manager/mysql/2023-12-30/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/client.go +++ b/resource-manager/mysql/2023-12-30/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go b/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go index c66aa731bd4..41c88887348 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go +++ b/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go index 26dc5a21b08..a17fbfa7acb 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/firewallrules/method_get.go b/resource-manager/mysql/2023-12-30/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/method_get.go +++ b/resource-manager/mysql/2023-12-30/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/firewallrules/version.go b/resource-manager/mysql/2023-12-30/firewallrules/version.go index 66e28b08c98..b898eef7871 100644 --- a/resource-manager/mysql/2023-12-30/firewallrules/version.go +++ b/resource-manager/mysql/2023-12-30/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md index 5b8ab830645..495df3df5f5 100644 --- a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md +++ b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix` Documentation -The `getprivatednszonesuffix` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go +++ b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go index 480e45bca94..3a476e762e5 100644 --- a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model GetPrivateDnsZoneSuffixResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go index 490c99de75c..5a77516c8f4 100644 --- a/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go +++ b/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md index e623a916b60..9b27a9abd04 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md +++ b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go index 9b2f24ee4b1..d5b58ec298d 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go index da59e37aa30..9971bc5f35f 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md b/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md index d77ba69bc09..e887e09a17a 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability` Documentation -The `locationbasedcapability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `locationbasedcapability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go b/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go index 419868b7417..09a9c2a8336 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilityClient struct { } func NewLocationBasedCapabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go b/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go index d68f3bfbbe8..808ed437ee4 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go @@ -42,7 +42,7 @@ func ParseCapabilitySetID(input string) (*CapabilitySetId, error) { } id := CapabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapabilitySetIDInsensitively(input string) (*CapabilitySetId, error) { } id := CapabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go b/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go index e89d1dcb819..10f2a909eec 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go b/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go index 3d80e8f6148..e30a08c9c43 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go @@ -45,7 +45,6 @@ func (c LocationBasedCapabilityClient) SetGet(ctx context.Context, id Capability var model Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go b/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go index c218d421027..c037ec02724 100644 --- a/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go +++ b/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go @@ -1,12 +1,10 @@ package locationbasedcapability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapability/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/logfiles/README.md b/resource-manager/mysql/2023-12-30/logfiles/README.md index 9d3977e9b7a..87b413fb1c8 100644 --- a/resource-manager/mysql/2023-12-30/logfiles/README.md +++ b/resource-manager/mysql/2023-12-30/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/logfiles/client.go b/resource-manager/mysql/2023-12-30/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/mysql/2023-12-30/logfiles/client.go +++ b/resource-manager/mysql/2023-12-30/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go index 23f598b45e1..d4fed7e78ea 100644 --- a/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/logfiles/version.go b/resource-manager/mysql/2023-12-30/logfiles/version.go index c606213b0ce..a819927acb3 100644 --- a/resource-manager/mysql/2023-12-30/logfiles/version.go +++ b/resource-manager/mysql/2023-12-30/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/maintenances/README.md b/resource-manager/mysql/2023-12-30/maintenances/README.md index 66f270bf866..5170be320ec 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/README.md +++ b/resource-manager/mysql/2023-12-30/maintenances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances` Documentation -The `maintenances` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `maintenances` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/maintenances/client.go b/resource-manager/mysql/2023-12-30/maintenances/client.go index 9c079dc110c..447a530851c 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/client.go +++ b/resource-manager/mysql/2023-12-30/maintenances/client.go @@ -15,7 +15,7 @@ type MaintenancesClient struct { } func NewMaintenancesClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenancesClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go index 88544fd25cd..3d3562ba8a9 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go b/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go index e6647d0abff..1185ae3798e 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go +++ b/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go @@ -44,7 +44,7 @@ func ParseMaintenanceID(input string) (*MaintenanceId, error) { } id := MaintenanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMaintenanceIDInsensitively(input string) (*MaintenanceId, error) { } id := MaintenanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/maintenances/method_read.go b/resource-manager/mysql/2023-12-30/maintenances/method_read.go index 1ee5f642440..25424ecdaf5 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/method_read.go +++ b/resource-manager/mysql/2023-12-30/maintenances/method_read.go @@ -45,7 +45,6 @@ func (c MaintenancesClient) Read(ctx context.Context, id MaintenanceId) (result var model Maintenance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/maintenances/version.go b/resource-manager/mysql/2023-12-30/maintenances/version.go index f68fde37d56..8543c8afc4d 100644 --- a/resource-manager/mysql/2023-12-30/maintenances/version.go +++ b/resource-manager/mysql/2023-12-30/maintenances/version.go @@ -1,12 +1,10 @@ package maintenances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenances/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/operationprogress/README.md b/resource-manager/mysql/2023-12-30/operationprogress/README.md index d40c255c014..0c6d6653d24 100644 --- a/resource-manager/mysql/2023-12-30/operationprogress/README.md +++ b/resource-manager/mysql/2023-12-30/operationprogress/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress` Documentation -The `operationprogress` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `operationprogress` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/operationprogress/client.go b/resource-manager/mysql/2023-12-30/operationprogress/client.go index 4a63748a89a..920c7279e85 100644 --- a/resource-manager/mysql/2023-12-30/operationprogress/client.go +++ b/resource-manager/mysql/2023-12-30/operationprogress/client.go @@ -15,7 +15,7 @@ type OperationProgressClient struct { } func NewOperationProgressClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationProgressClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationprogress", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationprogress", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationProgressClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go b/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go index 9ad9d944e05..35ac67bbdc6 100644 --- a/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go +++ b/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go @@ -42,7 +42,7 @@ func ParseOperationProgressID(input string) (*OperationProgressId, error) { } id := OperationProgressId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOperationProgressIDInsensitively(input string) (*OperationProgressId, } id := OperationProgressId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/operationprogress/method_get.go b/resource-manager/mysql/2023-12-30/operationprogress/method_get.go index 77dd7853da3..d9ae7079f09 100644 --- a/resource-manager/mysql/2023-12-30/operationprogress/method_get.go +++ b/resource-manager/mysql/2023-12-30/operationprogress/method_get.go @@ -45,7 +45,6 @@ func (c OperationProgressClient) Get(ctx context.Context, id OperationProgressId var model OperationProgressResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/operationprogress/version.go b/resource-manager/mysql/2023-12-30/operationprogress/version.go index 86d7e070967..047947250e8 100644 --- a/resource-manager/mysql/2023-12-30/operationprogress/version.go +++ b/resource-manager/mysql/2023-12-30/operationprogress/version.go @@ -1,12 +1,10 @@ package operationprogress -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationprogress/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationprogress/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/serverfailover/client.go b/resource-manager/mysql/2023-12-30/serverfailover/client.go index da2795c8050..b205981fa98 100644 --- a/resource-manager/mysql/2023-12-30/serverfailover/client.go +++ b/resource-manager/mysql/2023-12-30/serverfailover/client.go @@ -15,7 +15,7 @@ type ServerFailoverClient struct { } func NewServerFailoverClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerFailoverClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverfailover", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverfailover", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerFailoverClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go index 4d0ffcf6f67..a07173dc01c 100644 --- a/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/serverfailover/version.go b/resource-manager/mysql/2023-12-30/serverfailover/version.go index 83491a5957f..73b6b35ee1c 100644 --- a/resource-manager/mysql/2023-12-30/serverfailover/version.go +++ b/resource-manager/mysql/2023-12-30/serverfailover/version.go @@ -1,12 +1,10 @@ package serverfailover -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverfailover/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverfailover/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/servermigration/README.md b/resource-manager/mysql/2023-12-30/servermigration/README.md index 98ca53e736f..9101c962cd2 100644 --- a/resource-manager/mysql/2023-12-30/servermigration/README.md +++ b/resource-manager/mysql/2023-12-30/servermigration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration` Documentation -The `servermigration` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `servermigration` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/servermigration/client.go b/resource-manager/mysql/2023-12-30/servermigration/client.go index 6e47f65c4b8..9d82e58ad8b 100644 --- a/resource-manager/mysql/2023-12-30/servermigration/client.go +++ b/resource-manager/mysql/2023-12-30/servermigration/client.go @@ -15,7 +15,7 @@ type ServerMigrationClient struct { } func NewServerMigrationClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerMigrationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servermigration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servermigration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerMigrationClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go index badf5920e92..fa9d6c0a319 100644 --- a/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/servermigration/version.go b/resource-manager/mysql/2023-12-30/servermigration/version.go index 09fc3734c20..cdc300f6539 100644 --- a/resource-manager/mysql/2023-12-30/servermigration/version.go +++ b/resource-manager/mysql/2023-12-30/servermigration/version.go @@ -1,12 +1,10 @@ package servermigration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servermigration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servermigration/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/serverresetgtid/README.md b/resource-manager/mysql/2023-12-30/serverresetgtid/README.md index 88c6f5fd133..4bdb53489c2 100644 --- a/resource-manager/mysql/2023-12-30/serverresetgtid/README.md +++ b/resource-manager/mysql/2023-12-30/serverresetgtid/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid` Documentation -The `serverresetgtid` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `serverresetgtid` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/serverresetgtid/client.go b/resource-manager/mysql/2023-12-30/serverresetgtid/client.go index 0d590d7f96f..92225aea3ab 100644 --- a/resource-manager/mysql/2023-12-30/serverresetgtid/client.go +++ b/resource-manager/mysql/2023-12-30/serverresetgtid/client.go @@ -15,7 +15,7 @@ type ServerResetGtidClient struct { } func NewServerResetGtidClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerResetGtidClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverresetgtid", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverresetgtid", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerResetGtidClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go index 99375b23a8f..701074d0d22 100644 --- a/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/serverresetgtid/version.go b/resource-manager/mysql/2023-12-30/serverresetgtid/version.go index 0c3c8c2ceb3..c8f23825b37 100644 --- a/resource-manager/mysql/2023-12-30/serverresetgtid/version.go +++ b/resource-manager/mysql/2023-12-30/serverresetgtid/version.go @@ -1,12 +1,10 @@ package serverresetgtid -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverresetgtid/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverresetgtid/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/serverrestart/README.md b/resource-manager/mysql/2023-12-30/serverrestart/README.md index d5e9949f43b..66cd1c82387 100644 --- a/resource-manager/mysql/2023-12-30/serverrestart/README.md +++ b/resource-manager/mysql/2023-12-30/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/serverrestart/client.go b/resource-manager/mysql/2023-12-30/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/mysql/2023-12-30/serverrestart/client.go +++ b/resource-manager/mysql/2023-12-30/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go index fdcf2092d55..19f5825d2ea 100644 --- a/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/serverrestart/version.go b/resource-manager/mysql/2023-12-30/serverrestart/version.go index 2e31adc3f74..ee4c7518cb0 100644 --- a/resource-manager/mysql/2023-12-30/serverrestart/version.go +++ b/resource-manager/mysql/2023-12-30/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/servers/README.md b/resource-manager/mysql/2023-12-30/servers/README.md index 6d031fbac51..1919dc546e6 100644 --- a/resource-manager/mysql/2023-12-30/servers/README.md +++ b/resource-manager/mysql/2023-12-30/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/servers/client.go b/resource-manager/mysql/2023-12-30/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/mysql/2023-12-30/servers/client.go +++ b/resource-manager/mysql/2023-12-30/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go index aaebb48280d..970e6a59820 100644 --- a/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/servers/method_get.go b/resource-manager/mysql/2023-12-30/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/mysql/2023-12-30/servers/method_get.go +++ b/resource-manager/mysql/2023-12-30/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/servers/version.go b/resource-manager/mysql/2023-12-30/servers/version.go index 951ee13b3d7..5e8a3822067 100644 --- a/resource-manager/mysql/2023-12-30/servers/version.go +++ b/resource-manager/mysql/2023-12-30/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/serverstart/client.go b/resource-manager/mysql/2023-12-30/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/mysql/2023-12-30/serverstart/client.go +++ b/resource-manager/mysql/2023-12-30/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go index 42ff836d2e0..930edee031e 100644 --- a/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/serverstart/version.go b/resource-manager/mysql/2023-12-30/serverstart/version.go index 3d0e5c42281..a618c927af8 100644 --- a/resource-manager/mysql/2023-12-30/serverstart/version.go +++ b/resource-manager/mysql/2023-12-30/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/serverstop/client.go b/resource-manager/mysql/2023-12-30/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/mysql/2023-12-30/serverstop/client.go +++ b/resource-manager/mysql/2023-12-30/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go index 0bc6abc8f18..12d491db9d6 100644 --- a/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/serverstop/version.go b/resource-manager/mysql/2023-12-30/serverstop/version.go index d6f80fdcb89..116e0a57dfd 100644 --- a/resource-manager/mysql/2023-12-30/serverstop/version.go +++ b/resource-manager/mysql/2023-12-30/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2023-12-30" } diff --git a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md index dbd8671a8c5..3bb0986eaf7 100644 --- a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md +++ b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability` Documentation -The `servervalidateestimatehighavailability` SDK allows for interaction with the Azure Resource Manager Service `mysql` (API Version `2023-12-30`). +The `servervalidateestimatehighavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go index 274aa370ba6..b561a8e467d 100644 --- a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go +++ b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go @@ -15,7 +15,7 @@ type ServerValidateEstimateHighAvailabilityClient struct { } func NewServerValidateEstimateHighAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerValidateEstimateHighAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervalidateestimatehighavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervalidateestimatehighavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerValidateEstimateHighAvailabilityClient: %+v", err) } diff --git a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go index 5b41e776ce2..ccc67545c86 100644 --- a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go +++ b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go index fc9562f3b00..ba715d8cabe 100644 --- a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go +++ b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go @@ -50,7 +50,6 @@ func (c ServerValidateEstimateHighAvailabilityClient) ServersValidateEstimateHig var model HighAvailabilityValidationEstimation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go index e494f070676..4a5d6cd4143 100644 --- a/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go +++ b/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go @@ -1,12 +1,10 @@ package servervalidateestimatehighavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-30" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervalidateestimatehighavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervalidateestimatehighavailability/2023-12-30" } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/README.md b/resource-manager/netapp/2023-05-01/backuppolicy/README.md index de51010c3fe..8edaf4017b2 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/README.md +++ b/resource-manager/netapp/2023-05-01/backuppolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/backuppolicy` Documentation -The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `backuppolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/client.go b/resource-manager/netapp/2023-05-01/backuppolicy/client.go index 1db45e634e5..8b4fc07ad66 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/client.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/client.go @@ -15,7 +15,7 @@ type BackupPolicyClient struct { } func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/id_backuppolicy.go b/resource-manager/netapp/2023-05-01/backuppolicy/id_backuppolicy.go index 9f45aceef30..2093d326c71 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/id_backuppolicy.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/id_netappaccount.go b/resource-manager/netapp/2023-05-01/backuppolicy/id_netappaccount.go index d722f9a676d..5700ac965f0 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppoliciesget.go b/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppoliciesget.go index 73667d207d3..e8ecfc1fc04 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppoliciesget.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppoliciesget.go @@ -45,7 +45,6 @@ func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPoli var model BackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppolicieslist.go b/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppolicieslist.go index 7a939318453..7932d964240 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppolicieslist.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/method_backuppolicieslist.go @@ -46,7 +46,6 @@ func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAcc var model BackupPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/backuppolicy/version.go b/resource-manager/netapp/2023-05-01/backuppolicy/version.go index 39ad1528b58..7cae6c0e1ce 100644 --- a/resource-manager/netapp/2023-05-01/backuppolicy/version.go +++ b/resource-manager/netapp/2023-05-01/backuppolicy/version.go @@ -1,12 +1,10 @@ package backuppolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicy/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/capacitypools/README.md b/resource-manager/netapp/2023-05-01/capacitypools/README.md index a5e79253932..55ac401c7b4 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/README.md +++ b/resource-manager/netapp/2023-05-01/capacitypools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `capacitypools` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/capacitypools/client.go b/resource-manager/netapp/2023-05-01/capacitypools/client.go index 3de33a3dc5b..d7a8be4e076 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/client.go +++ b/resource-manager/netapp/2023-05-01/capacitypools/client.go @@ -15,7 +15,7 @@ type CapacityPoolsClient struct { } func NewCapacityPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacitypools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacitypools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityPoolsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go b/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go index 30b27305799..de2fe4626bf 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go +++ b/resource-manager/netapp/2023-05-01/capacitypools/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go b/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go index a77679932dd..0880024ed89 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go +++ b/resource-manager/netapp/2023-05-01/capacitypools/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go b/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go index d2f91e09044..f9d5fcc8531 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go +++ b/resource-manager/netapp/2023-05-01/capacitypools/method_poolsget.go @@ -45,7 +45,6 @@ func (c CapacityPoolsClient) PoolsGet(ctx context.Context, id CapacityPoolId) (r var model CapacityPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/capacitypools/version.go b/resource-manager/netapp/2023-05-01/capacitypools/version.go index b111b9e4e5f..827826ab30a 100644 --- a/resource-manager/netapp/2023-05-01/capacitypools/version.go +++ b/resource-manager/netapp/2023-05-01/capacitypools/version.go @@ -1,12 +1,10 @@ package capacitypools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacitypools/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/filelocks/README.md b/resource-manager/netapp/2023-05-01/filelocks/README.md index 209a9da489e..deeb1de6bd5 100644 --- a/resource-manager/netapp/2023-05-01/filelocks/README.md +++ b/resource-manager/netapp/2023-05-01/filelocks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/filelocks` Documentation -The `filelocks` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `filelocks` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/filelocks/client.go b/resource-manager/netapp/2023-05-01/filelocks/client.go index 7f39f5ef46b..56c8b4fc903 100644 --- a/resource-manager/netapp/2023-05-01/filelocks/client.go +++ b/resource-manager/netapp/2023-05-01/filelocks/client.go @@ -15,7 +15,7 @@ type FileLocksClient struct { } func NewFileLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*FileLocksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filelocks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filelocks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileLocksClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/filelocks/id_volume.go b/resource-manager/netapp/2023-05-01/filelocks/id_volume.go index 8f6a5960750..bd705c9fd6a 100644 --- a/resource-manager/netapp/2023-05-01/filelocks/id_volume.go +++ b/resource-manager/netapp/2023-05-01/filelocks/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/filelocks/version.go b/resource-manager/netapp/2023-05-01/filelocks/version.go index c48d0cde898..3898bcf6699 100644 --- a/resource-manager/netapp/2023-05-01/filelocks/version.go +++ b/resource-manager/netapp/2023-05-01/filelocks/version.go @@ -1,12 +1,10 @@ package filelocks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filelocks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filelocks/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/README.md b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/README.md index 2ae87aebbe3..5fb2a0226b3 100644 --- a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/README.md +++ b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/groupidlistforldapuser` Documentation -The `groupidlistforldapuser` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `groupidlistforldapuser` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/client.go b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/client.go index b954d6fe7dc..b098cba0063 100644 --- a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/client.go +++ b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/client.go @@ -15,7 +15,7 @@ type GroupIdListForLDAPUserClient struct { } func NewGroupIdListForLDAPUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupIdListForLDAPUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupIdListForLDAPUserClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/id_volume.go b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/id_volume.go index 74868cea51a..1174627e607 100644 --- a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/id_volume.go +++ b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/version.go b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/version.go index ba63e4765ee..48a6ee58d04 100644 --- a/resource-manager/netapp/2023-05-01/groupidlistforldapuser/version.go +++ b/resource-manager/netapp/2023-05-01/groupidlistforldapuser/version.go @@ -1,12 +1,10 @@ package groupidlistforldapuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupidlistforldapuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupidlistforldapuser/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/netappaccounts/README.md b/resource-manager/netapp/2023-05-01/netappaccounts/README.md index e22e3bf1619..17c4dd3f112 100644 --- a/resource-manager/netapp/2023-05-01/netappaccounts/README.md +++ b/resource-manager/netapp/2023-05-01/netappaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `netappaccounts` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/netappaccounts/client.go b/resource-manager/netapp/2023-05-01/netappaccounts/client.go index 172f1218e2c..240204954a3 100644 --- a/resource-manager/netapp/2023-05-01/netappaccounts/client.go +++ b/resource-manager/netapp/2023-05-01/netappaccounts/client.go @@ -15,7 +15,7 @@ type NetAppAccountsClient struct { } func NewNetAppAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppAccountsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go b/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go index a93e2cd2ea8..05b601e3c06 100644 --- a/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go +++ b/resource-manager/netapp/2023-05-01/netappaccounts/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go b/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go index dc67125153f..c1ec9504bf9 100644 --- a/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go +++ b/resource-manager/netapp/2023-05-01/netappaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c NetAppAccountsClient) AccountsGet(ctx context.Context, id NetAppAccountI var model NetAppAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappaccounts/version.go b/resource-manager/netapp/2023-05-01/netappaccounts/version.go index 9425f9d1373..c5c99dfeca8 100644 --- a/resource-manager/netapp/2023-05-01/netappaccounts/version.go +++ b/resource-manager/netapp/2023-05-01/netappaccounts/version.go @@ -1,12 +1,10 @@ package netappaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappaccounts/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/netappresource/README.md b/resource-manager/netapp/2023-05-01/netappresource/README.md index 26d5b294476..c5dd21097c7 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/README.md +++ b/resource-manager/netapp/2023-05-01/netappresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappresource` Documentation -The `netappresource` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `netappresource` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/netappresource/client.go b/resource-manager/netapp/2023-05-01/netappresource/client.go index e02988617d8..0bfc3f358ce 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/client.go +++ b/resource-manager/netapp/2023-05-01/netappresource/client.go @@ -15,7 +15,7 @@ type NetAppResourceClient struct { } func NewNetAppResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppResourceClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/netappresource/id_location.go b/resource-manager/netapp/2023-05-01/netappresource/id_location.go index b6b91bc802d..b9d650f4de7 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/id_location.go +++ b/resource-manager/netapp/2023-05-01/netappresource/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/netappresource/id_quotalimit.go b/resource-manager/netapp/2023-05-01/netappresource/id_quotalimit.go index 0088f16b365..51baeccd764 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/id_quotalimit.go +++ b/resource-manager/netapp/2023-05-01/netappresource/id_quotalimit.go @@ -42,7 +42,7 @@ func ParseQuotaLimitID(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQuotaLimitIDInsensitively(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_checkfilepathavailability.go b/resource-manager/netapp/2023-05-01/netappresource/method_checkfilepathavailability.go index 2710dd52807..fcd3daa5d29 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_checkfilepathavailability.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_checkfilepathavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckFilePathAvailability(ctx context.Context, id var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_checknameavailability.go b/resource-manager/netapp/2023-05-01/netappresource/method_checknameavailability.go index 3c7ac9c5704..788eb6035e5 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_checknameavailability.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckNameAvailability(ctx context.Context, id Loca var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_checkquotaavailability.go b/resource-manager/netapp/2023-05-01/netappresource/method_checkquotaavailability.go index 68f31ded84e..75b1541b588 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_checkquotaavailability.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_checkquotaavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckQuotaAvailability(ctx context.Context, id Loc var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_querynetworksiblingset.go b/resource-manager/netapp/2023-05-01/netappresource/method_querynetworksiblingset.go index 9707443382a..1777bea9e98 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_querynetworksiblingset.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_querynetworksiblingset.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) QueryNetworkSiblingSet(ctx context.Context, id Loc var model NetworkSiblingSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_queryregioninfo.go b/resource-manager/netapp/2023-05-01/netappresource/method_queryregioninfo.go index ef1715019e4..dc45f121299 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_queryregioninfo.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_queryregioninfo.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QueryRegionInfo(ctx context.Context, id LocationId var model RegionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitsget.go b/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitsget.go index 721f649f0b2..cd1492d82a8 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitsget.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitsget.go @@ -45,7 +45,6 @@ func (c NetAppResourceClient) QuotaLimitsGet(ctx context.Context, id QuotaLimitI var model SubscriptionQuotaItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitslist.go b/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitslist.go index eba38d4fa9e..81645f131b0 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitslist.go +++ b/resource-manager/netapp/2023-05-01/netappresource/method_quotalimitslist.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QuotaLimitsList(ctx context.Context, id LocationId var model SubscriptionQuotaItemList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/netappresource/version.go b/resource-manager/netapp/2023-05-01/netappresource/version.go index 9291d5668de..e3296b24809 100644 --- a/resource-manager/netapp/2023-05-01/netappresource/version.go +++ b/resource-manager/netapp/2023-05-01/netappresource/version.go @@ -1,12 +1,10 @@ package netappresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappresource/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/poolchange/README.md b/resource-manager/netapp/2023-05-01/poolchange/README.md index af13e4765ce..4265086650e 100644 --- a/resource-manager/netapp/2023-05-01/poolchange/README.md +++ b/resource-manager/netapp/2023-05-01/poolchange/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/poolchange` Documentation -The `poolchange` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `poolchange` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/poolchange/client.go b/resource-manager/netapp/2023-05-01/poolchange/client.go index 270c25028c2..a83eadc3fe1 100644 --- a/resource-manager/netapp/2023-05-01/poolchange/client.go +++ b/resource-manager/netapp/2023-05-01/poolchange/client.go @@ -15,7 +15,7 @@ type PoolChangeClient struct { } func NewPoolChangeClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolChangeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "poolchange", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "poolchange", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolChangeClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/poolchange/id_volume.go b/resource-manager/netapp/2023-05-01/poolchange/id_volume.go index 0e74fdf5585..913f22f8d49 100644 --- a/resource-manager/netapp/2023-05-01/poolchange/id_volume.go +++ b/resource-manager/netapp/2023-05-01/poolchange/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/poolchange/version.go b/resource-manager/netapp/2023-05-01/poolchange/version.go index 2c2a4294aea..7c81564d412 100644 --- a/resource-manager/netapp/2023-05-01/poolchange/version.go +++ b/resource-manager/netapp/2023-05-01/poolchange/version.go @@ -1,12 +1,10 @@ package poolchange -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/poolchange/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/poolchange/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/resetcifspassword/client.go b/resource-manager/netapp/2023-05-01/resetcifspassword/client.go index 2d17ccc3976..ba2cbb22bb0 100644 --- a/resource-manager/netapp/2023-05-01/resetcifspassword/client.go +++ b/resource-manager/netapp/2023-05-01/resetcifspassword/client.go @@ -15,7 +15,7 @@ type ResetCifsPasswordClient struct { } func NewResetCifsPasswordClientWithBaseURI(sdkApi sdkEnv.Api) (*ResetCifsPasswordClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resetcifspassword", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resetcifspassword", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResetCifsPasswordClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/resetcifspassword/id_volume.go b/resource-manager/netapp/2023-05-01/resetcifspassword/id_volume.go index b2cdcb5d95a..cc04516bb06 100644 --- a/resource-manager/netapp/2023-05-01/resetcifspassword/id_volume.go +++ b/resource-manager/netapp/2023-05-01/resetcifspassword/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/resetcifspassword/version.go b/resource-manager/netapp/2023-05-01/resetcifspassword/version.go index 117cb8a4088..4c9edd893fe 100644 --- a/resource-manager/netapp/2023-05-01/resetcifspassword/version.go +++ b/resource-manager/netapp/2023-05-01/resetcifspassword/version.go @@ -1,12 +1,10 @@ package resetcifspassword -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resetcifspassword/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resetcifspassword/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/restore/README.md b/resource-manager/netapp/2023-05-01/restore/README.md index ce324dd8bdf..828a566d44f 100644 --- a/resource-manager/netapp/2023-05-01/restore/README.md +++ b/resource-manager/netapp/2023-05-01/restore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/restore` Documentation -The `restore` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `restore` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/restore/client.go b/resource-manager/netapp/2023-05-01/restore/client.go index 97fa355d7db..1ce453be7c3 100644 --- a/resource-manager/netapp/2023-05-01/restore/client.go +++ b/resource-manager/netapp/2023-05-01/restore/client.go @@ -15,7 +15,7 @@ type RestoreClient struct { } func NewRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*RestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestoreClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/restore/id_volume.go b/resource-manager/netapp/2023-05-01/restore/id_volume.go index 64d9eacc3ac..67d5969e622 100644 --- a/resource-manager/netapp/2023-05-01/restore/id_volume.go +++ b/resource-manager/netapp/2023-05-01/restore/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/restore/method_backupsgetvolumerestorestatus.go b/resource-manager/netapp/2023-05-01/restore/method_backupsgetvolumerestorestatus.go index 0ed9ff58d70..8e69a66a063 100644 --- a/resource-manager/netapp/2023-05-01/restore/method_backupsgetvolumerestorestatus.go +++ b/resource-manager/netapp/2023-05-01/restore/method_backupsgetvolumerestorestatus.go @@ -46,7 +46,6 @@ func (c RestoreClient) BackupsGetVolumeRestoreStatus(ctx context.Context, id Vol var model RestoreStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/restore/version.go b/resource-manager/netapp/2023-05-01/restore/version.go index 90e560ae4ec..b033b884bae 100644 --- a/resource-manager/netapp/2023-05-01/restore/version.go +++ b/resource-manager/netapp/2023-05-01/restore/version.go @@ -1,12 +1,10 @@ package restore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restore/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md b/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md index 22b6030bb11..43f787df79e 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `snapshotpolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go index eebb8c7b8da..e92eedba749 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyClient struct { } func NewSnapshotPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go index 51822e9aaf3..5f87f814f94 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go index c007ae89039..4c647b0e54a 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go index f0aaa54617e..8210e2fad73 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciescreate.go @@ -50,7 +50,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesCreate(ctx context.Context, id Sna var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go index 53aa8b06361..15d2b69d7c1 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpoliciesget.go @@ -45,7 +45,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesGet(ctx context.Context, id Snapsh var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go index 50c611c5cb0..eca667d1eb4 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/method_snapshotpolicieslist.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesList(ctx context.Context, id NetAp var model SnapshotPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go b/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go index 1620c184210..4030344dfee 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicy/version.go @@ -1,12 +1,10 @@ package snapshotpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicy/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/README.md b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/README.md index 3ac3f6ebb0c..9e331715c84 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/README.md +++ b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes` Documentation -The `snapshotpolicylistvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `snapshotpolicylistvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/client.go b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/client.go index 047d79a12c3..6098b871f64 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/client.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyListVolumesClient struct { } func NewSnapshotPolicyListVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyListVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyListVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/id_snapshotpolicy.go b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/id_snapshotpolicy.go index 1b30e761faf..3c59714333d 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go index 59512dd2794..88466bae80e 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyListVolumesClient) SnapshotPoliciesListVolumes(ctx context var model SnapshotPolicyVolumeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/version.go b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/version.go index 841eb6cc176..e58519aac2f 100644 --- a/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/version.go +++ b/resource-manager/netapp/2023-05-01/snapshotpolicylistvolumes/version.go @@ -1,12 +1,10 @@ package snapshotpolicylistvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicylistvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicylistvolumes/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/snapshots/README.md b/resource-manager/netapp/2023-05-01/snapshots/README.md index 9c4217850ed..3ccf8f224cd 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/README.md +++ b/resource-manager/netapp/2023-05-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/snapshots/client.go b/resource-manager/netapp/2023-05-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/client.go +++ b/resource-manager/netapp/2023-05-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go b/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go index 1712cf99186..d01e331065a 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go +++ b/resource-manager/netapp/2023-05-01/snapshots/id_snapshot.go @@ -48,7 +48,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/snapshots/id_volume.go b/resource-manager/netapp/2023-05-01/snapshots/id_volume.go index 1d8f9e61805..40d4cc5b6b1 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/id_volume.go +++ b/resource-manager/netapp/2023-05-01/snapshots/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/snapshots/method_get.go b/resource-manager/netapp/2023-05-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/method_get.go +++ b/resource-manager/netapp/2023-05-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshots/method_list.go b/resource-manager/netapp/2023-05-01/snapshots/method_list.go index d60b22e27a9..77c6da22159 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/method_list.go +++ b/resource-manager/netapp/2023-05-01/snapshots/method_list.go @@ -46,7 +46,6 @@ func (c SnapshotsClient) List(ctx context.Context, id VolumeId) (result ListOper var model SnapshotsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/snapshots/version.go b/resource-manager/netapp/2023-05-01/snapshots/version.go index 636463b4c27..83ff2ccae96 100644 --- a/resource-manager/netapp/2023-05-01/snapshots/version.go +++ b/resource-manager/netapp/2023-05-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/subvolumes/README.md b/resource-manager/netapp/2023-05-01/subvolumes/README.md index 39705bb4f36..f2f5d22ced4 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/README.md +++ b/resource-manager/netapp/2023-05-01/subvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/subvolumes` Documentation -The `subvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `subvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/subvolumes/client.go b/resource-manager/netapp/2023-05-01/subvolumes/client.go index b675258d906..051d1e4b2ba 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/client.go +++ b/resource-manager/netapp/2023-05-01/subvolumes/client.go @@ -15,7 +15,7 @@ type SubVolumesClient struct { } func NewSubVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/subvolumes/id_subvolume.go b/resource-manager/netapp/2023-05-01/subvolumes/id_subvolume.go index 5c35777037a..dff6135cbbe 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/id_subvolume.go +++ b/resource-manager/netapp/2023-05-01/subvolumes/id_subvolume.go @@ -48,7 +48,7 @@ func ParseSubVolumeID(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSubVolumeIDInsensitively(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/subvolumes/id_volume.go b/resource-manager/netapp/2023-05-01/subvolumes/id_volume.go index 2b24cb1a31f..36a08c14c73 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/id_volume.go +++ b/resource-manager/netapp/2023-05-01/subvolumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/subvolumes/method_get.go b/resource-manager/netapp/2023-05-01/subvolumes/method_get.go index 455566fe22c..20f1ee49120 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/method_get.go +++ b/resource-manager/netapp/2023-05-01/subvolumes/method_get.go @@ -45,7 +45,6 @@ func (c SubVolumesClient) Get(ctx context.Context, id SubVolumeId) (result GetOp var model SubvolumeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/subvolumes/version.go b/resource-manager/netapp/2023-05-01/subvolumes/version.go index f77f8bc8efa..83da6c7adb5 100644 --- a/resource-manager/netapp/2023-05-01/subvolumes/version.go +++ b/resource-manager/netapp/2023-05-01/subvolumes/version.go @@ -1,12 +1,10 @@ package subvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subvolumes/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/README.md b/resource-manager/netapp/2023-05-01/volumegroups/README.md index e1c45d7bd1e..bfb9b29bca8 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/README.md +++ b/resource-manager/netapp/2023-05-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumegroups/client.go b/resource-manager/netapp/2023-05-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/client.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go b/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go index e41dc1600a0..d975b3265d2 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go b/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go index f42fe51614d..f71aadaf630 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/method_get.go b/resource-manager/netapp/2023-05-01/volumegroups/method_get.go index 981869d83d5..59130918900 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/method_get.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroupDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go b/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go index a97d0887201..29dee764979 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/method_listbynetappaccount.go @@ -46,7 +46,6 @@ func (c VolumeGroupsClient) ListByNetAppAccount(ctx context.Context, id NetAppAc var model VolumeGroupList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumegroups/version.go b/resource-manager/netapp/2023-05-01/volumegroups/version.go index 9b0ac047bbe..7c7d9784504 100644 --- a/resource-manager/netapp/2023-05-01/volumegroups/version.go +++ b/resource-manager/netapp/2023-05-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/README.md b/resource-manager/netapp/2023-05-01/volumequotarules/README.md index 05ed28b5317..fece9fbded9 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/README.md +++ b/resource-manager/netapp/2023-05-01/volumequotarules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumequotarules` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/client.go b/resource-manager/netapp/2023-05-01/volumequotarules/client.go index c6c70e112e0..b42efdd36e2 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/client.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/client.go @@ -15,7 +15,7 @@ type VolumeQuotaRulesClient struct { } func NewVolumeQuotaRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeQuotaRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumequotarules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumequotarules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeQuotaRulesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go b/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go index 6dad4e030b2..20b660aca21 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go b/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go index e61ab571acc..67093f4e3c2 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/id_volumequotarule.go @@ -48,7 +48,7 @@ func ParseVolumeQuotaRuleID(input string) (*VolumeQuotaRuleId, error) { } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVolumeQuotaRuleIDInsensitively(input string) (*VolumeQuotaRuleId, erro } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go b/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go index 88aa05a3709..0c82ebc839b 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/method_get.go @@ -45,7 +45,6 @@ func (c VolumeQuotaRulesClient) Get(ctx context.Context, id VolumeQuotaRuleId) ( var model VolumeQuotaRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go b/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go index ed643e0c5b0..87cd029de34 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/method_listbyvolume.go @@ -46,7 +46,6 @@ func (c VolumeQuotaRulesClient) ListByVolume(ctx context.Context, id VolumeId) ( var model VolumeQuotaRulesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumequotarules/version.go b/resource-manager/netapp/2023-05-01/volumequotarules/version.go index 530ef976e87..331229644b2 100644 --- a/resource-manager/netapp/2023-05-01/volumequotarules/version.go +++ b/resource-manager/netapp/2023-05-01/volumequotarules/version.go @@ -1,12 +1,10 @@ package volumequotarules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumequotarules/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumes/README.md b/resource-manager/netapp/2023-05-01/volumes/README.md index 95b0e0742a0..149f82acaa7 100644 --- a/resource-manager/netapp/2023-05-01/volumes/README.md +++ b/resource-manager/netapp/2023-05-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumes/client.go b/resource-manager/netapp/2023-05-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/netapp/2023-05-01/volumes/client.go +++ b/resource-manager/netapp/2023-05-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go b/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go index baea2acd856..f9074a3f41f 100644 --- a/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go +++ b/resource-manager/netapp/2023-05-01/volumes/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumes/id_volume.go b/resource-manager/netapp/2023-05-01/volumes/id_volume.go index 2144d7750a2..294338c0f1d 100644 --- a/resource-manager/netapp/2023-05-01/volumes/id_volume.go +++ b/resource-manager/netapp/2023-05-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumes/method_delete.go b/resource-manager/netapp/2023-05-01/volumes/method_delete.go index cf50dbfa90f..c449fa7d2b8 100644 --- a/resource-manager/netapp/2023-05-01/volumes/method_delete.go +++ b/resource-manager/netapp/2023-05-01/volumes/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2023-05-01/volumes/method_get.go b/resource-manager/netapp/2023-05-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/netapp/2023-05-01/volumes/method_get.go +++ b/resource-manager/netapp/2023-05-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumes/version.go b/resource-manager/netapp/2023-05-01/volumes/version.go index 5b33cd0a49e..f53e1e97e5e 100644 --- a/resource-manager/netapp/2023-05-01/volumes/version.go +++ b/resource-manager/netapp/2023-05-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumesrelocation/README.md b/resource-manager/netapp/2023-05-01/volumesrelocation/README.md index 95cd73ec8de..548d0eb5f14 100644 --- a/resource-manager/netapp/2023-05-01/volumesrelocation/README.md +++ b/resource-manager/netapp/2023-05-01/volumesrelocation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesrelocation` Documentation -The `volumesrelocation` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumesrelocation` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumesrelocation/client.go b/resource-manager/netapp/2023-05-01/volumesrelocation/client.go index 9170c859f6f..468673aa176 100644 --- a/resource-manager/netapp/2023-05-01/volumesrelocation/client.go +++ b/resource-manager/netapp/2023-05-01/volumesrelocation/client.go @@ -15,7 +15,7 @@ type VolumesRelocationClient struct { } func NewVolumesRelocationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRelocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrelocation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrelocation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRelocationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumesrelocation/id_volume.go b/resource-manager/netapp/2023-05-01/volumesrelocation/id_volume.go index b304817c7c8..6d1896e16fd 100644 --- a/resource-manager/netapp/2023-05-01/volumesrelocation/id_volume.go +++ b/resource-manager/netapp/2023-05-01/volumesrelocation/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumesrelocation/version.go b/resource-manager/netapp/2023-05-01/volumesrelocation/version.go index a108c12b4e3..44e4516be33 100644 --- a/resource-manager/netapp/2023-05-01/volumesrelocation/version.go +++ b/resource-manager/netapp/2023-05-01/volumesrelocation/version.go @@ -1,12 +1,10 @@ package volumesrelocation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrelocation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrelocation/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/README.md b/resource-manager/netapp/2023-05-01/volumesreplication/README.md index 7b11775bc18..2232169ec19 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/README.md +++ b/resource-manager/netapp/2023-05-01/volumesreplication/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumesreplication` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/client.go b/resource-manager/netapp/2023-05-01/volumesreplication/client.go index 278506e484e..092e04c0a0d 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/client.go +++ b/resource-manager/netapp/2023-05-01/volumesreplication/client.go @@ -15,7 +15,7 @@ type VolumesReplicationClient struct { } func NewVolumesReplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesReplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesreplication", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesreplication", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesReplicationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go b/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go index 0a7eb12df02..b2df26c0921 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go +++ b/resource-manager/netapp/2023-05-01/volumesreplication/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go b/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go index 5a7f27f7407..bed3dfeb672 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go +++ b/resource-manager/netapp/2023-05-01/volumesreplication/method_volumeslistreplications.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesListReplications(ctx context.Context, i var model ListReplications result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go b/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go index 6e7f09b9dbe..2f626c60847 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go +++ b/resource-manager/netapp/2023-05-01/volumesreplication/method_volumesreplicationstatus.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesReplicationStatus(ctx context.Context, var model ReplicationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-05-01/volumesreplication/version.go b/resource-manager/netapp/2023-05-01/volumesreplication/version.go index 258bca3f884..be1c25aec8f 100644 --- a/resource-manager/netapp/2023-05-01/volumesreplication/version.go +++ b/resource-manager/netapp/2023-05-01/volumesreplication/version.go @@ -1,12 +1,10 @@ package volumesreplication -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesreplication/2023-05-01" } diff --git a/resource-manager/netapp/2023-05-01/volumesrevert/README.md b/resource-manager/netapp/2023-05-01/volumesrevert/README.md index ef7cea4f2d6..84ae3a86057 100644 --- a/resource-manager/netapp/2023-05-01/volumesrevert/README.md +++ b/resource-manager/netapp/2023-05-01/volumesrevert/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/volumesrevert` Documentation -The `volumesrevert` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-05-01`). +The `volumesrevert` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-05-01/volumesrevert/client.go b/resource-manager/netapp/2023-05-01/volumesrevert/client.go index fa2bad78d7b..353b7571904 100644 --- a/resource-manager/netapp/2023-05-01/volumesrevert/client.go +++ b/resource-manager/netapp/2023-05-01/volumesrevert/client.go @@ -15,7 +15,7 @@ type VolumesRevertClient struct { } func NewVolumesRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRevertClient: %+v", err) } diff --git a/resource-manager/netapp/2023-05-01/volumesrevert/id_volume.go b/resource-manager/netapp/2023-05-01/volumesrevert/id_volume.go index 3b9e67d66c0..ac8b9d254be 100644 --- a/resource-manager/netapp/2023-05-01/volumesrevert/id_volume.go +++ b/resource-manager/netapp/2023-05-01/volumesrevert/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-05-01/volumesrevert/version.go b/resource-manager/netapp/2023-05-01/volumesrevert/version.go index da14b17c2c4..93f3bd5c22d 100644 --- a/resource-manager/netapp/2023-05-01/volumesrevert/version.go +++ b/resource-manager/netapp/2023-05-01/volumesrevert/version.go @@ -1,12 +1,10 @@ package volumesrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrevert/2023-05-01" } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/README.md b/resource-manager/netapp/2023-07-01/backuppolicy/README.md index d162905862c..4b52a12fcc4 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/README.md +++ b/resource-manager/netapp/2023-07-01/backuppolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/backuppolicy` Documentation -The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `backuppolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/client.go b/resource-manager/netapp/2023-07-01/backuppolicy/client.go index 1db45e634e5..8b4fc07ad66 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/client.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/client.go @@ -15,7 +15,7 @@ type BackupPolicyClient struct { } func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/id_backuppolicy.go b/resource-manager/netapp/2023-07-01/backuppolicy/id_backuppolicy.go index 9f45aceef30..2093d326c71 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/id_backuppolicy.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/id_netappaccount.go b/resource-manager/netapp/2023-07-01/backuppolicy/id_netappaccount.go index d722f9a676d..5700ac965f0 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppoliciesget.go b/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppoliciesget.go index 73667d207d3..e8ecfc1fc04 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppoliciesget.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppoliciesget.go @@ -45,7 +45,6 @@ func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPoli var model BackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppolicieslist.go b/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppolicieslist.go index 7a939318453..7932d964240 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppolicieslist.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/method_backuppolicieslist.go @@ -46,7 +46,6 @@ func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAcc var model BackupPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/backuppolicy/version.go b/resource-manager/netapp/2023-07-01/backuppolicy/version.go index 1e1e414d6c5..931b5b7519a 100644 --- a/resource-manager/netapp/2023-07-01/backuppolicy/version.go +++ b/resource-manager/netapp/2023-07-01/backuppolicy/version.go @@ -1,12 +1,10 @@ package backuppolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicy/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/capacitypools/README.md b/resource-manager/netapp/2023-07-01/capacitypools/README.md index 00853b41246..54aea5abeb2 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/README.md +++ b/resource-manager/netapp/2023-07-01/capacitypools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `capacitypools` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/capacitypools/client.go b/resource-manager/netapp/2023-07-01/capacitypools/client.go index 3de33a3dc5b..d7a8be4e076 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/client.go +++ b/resource-manager/netapp/2023-07-01/capacitypools/client.go @@ -15,7 +15,7 @@ type CapacityPoolsClient struct { } func NewCapacityPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacitypools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacitypools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityPoolsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/capacitypools/id_capacitypool.go b/resource-manager/netapp/2023-07-01/capacitypools/id_capacitypool.go index 30b27305799..de2fe4626bf 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/id_capacitypool.go +++ b/resource-manager/netapp/2023-07-01/capacitypools/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/capacitypools/id_netappaccount.go b/resource-manager/netapp/2023-07-01/capacitypools/id_netappaccount.go index a77679932dd..0880024ed89 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/id_netappaccount.go +++ b/resource-manager/netapp/2023-07-01/capacitypools/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/capacitypools/method_poolsget.go b/resource-manager/netapp/2023-07-01/capacitypools/method_poolsget.go index d2f91e09044..f9d5fcc8531 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/method_poolsget.go +++ b/resource-manager/netapp/2023-07-01/capacitypools/method_poolsget.go @@ -45,7 +45,6 @@ func (c CapacityPoolsClient) PoolsGet(ctx context.Context, id CapacityPoolId) (r var model CapacityPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/capacitypools/version.go b/resource-manager/netapp/2023-07-01/capacitypools/version.go index bc3d294ad0a..34e291d25cf 100644 --- a/resource-manager/netapp/2023-07-01/capacitypools/version.go +++ b/resource-manager/netapp/2023-07-01/capacitypools/version.go @@ -1,12 +1,10 @@ package capacitypools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacitypools/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/filelocks/README.md b/resource-manager/netapp/2023-07-01/filelocks/README.md index 7ff4b9994f2..dc7e712d619 100644 --- a/resource-manager/netapp/2023-07-01/filelocks/README.md +++ b/resource-manager/netapp/2023-07-01/filelocks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/filelocks` Documentation -The `filelocks` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `filelocks` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/filelocks/client.go b/resource-manager/netapp/2023-07-01/filelocks/client.go index 7f39f5ef46b..56c8b4fc903 100644 --- a/resource-manager/netapp/2023-07-01/filelocks/client.go +++ b/resource-manager/netapp/2023-07-01/filelocks/client.go @@ -15,7 +15,7 @@ type FileLocksClient struct { } func NewFileLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*FileLocksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filelocks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filelocks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileLocksClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/filelocks/id_volume.go b/resource-manager/netapp/2023-07-01/filelocks/id_volume.go index 8f6a5960750..bd705c9fd6a 100644 --- a/resource-manager/netapp/2023-07-01/filelocks/id_volume.go +++ b/resource-manager/netapp/2023-07-01/filelocks/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/filelocks/version.go b/resource-manager/netapp/2023-07-01/filelocks/version.go index fedb1bbfabf..9ee98d7b2fc 100644 --- a/resource-manager/netapp/2023-07-01/filelocks/version.go +++ b/resource-manager/netapp/2023-07-01/filelocks/version.go @@ -1,12 +1,10 @@ package filelocks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filelocks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filelocks/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/README.md b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/README.md index f16e406f585..02b98d80291 100644 --- a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/README.md +++ b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/groupidlistforldapuser` Documentation -The `groupidlistforldapuser` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `groupidlistforldapuser` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/client.go b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/client.go index b954d6fe7dc..b098cba0063 100644 --- a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/client.go +++ b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/client.go @@ -15,7 +15,7 @@ type GroupIdListForLDAPUserClient struct { } func NewGroupIdListForLDAPUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupIdListForLDAPUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupIdListForLDAPUserClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/id_volume.go b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/id_volume.go index 74868cea51a..1174627e607 100644 --- a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/id_volume.go +++ b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/version.go b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/version.go index d4578be254c..7fddba4cd86 100644 --- a/resource-manager/netapp/2023-07-01/groupidlistforldapuser/version.go +++ b/resource-manager/netapp/2023-07-01/groupidlistforldapuser/version.go @@ -1,12 +1,10 @@ package groupidlistforldapuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupidlistforldapuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupidlistforldapuser/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/netappaccounts/README.md b/resource-manager/netapp/2023-07-01/netappaccounts/README.md index 54f849684dc..25263398d6a 100644 --- a/resource-manager/netapp/2023-07-01/netappaccounts/README.md +++ b/resource-manager/netapp/2023-07-01/netappaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `netappaccounts` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/netappaccounts/client.go b/resource-manager/netapp/2023-07-01/netappaccounts/client.go index 172f1218e2c..240204954a3 100644 --- a/resource-manager/netapp/2023-07-01/netappaccounts/client.go +++ b/resource-manager/netapp/2023-07-01/netappaccounts/client.go @@ -15,7 +15,7 @@ type NetAppAccountsClient struct { } func NewNetAppAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppAccountsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/netappaccounts/id_netappaccount.go b/resource-manager/netapp/2023-07-01/netappaccounts/id_netappaccount.go index a93e2cd2ea8..05b601e3c06 100644 --- a/resource-manager/netapp/2023-07-01/netappaccounts/id_netappaccount.go +++ b/resource-manager/netapp/2023-07-01/netappaccounts/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/netappaccounts/method_accountsget.go b/resource-manager/netapp/2023-07-01/netappaccounts/method_accountsget.go index dc67125153f..c1ec9504bf9 100644 --- a/resource-manager/netapp/2023-07-01/netappaccounts/method_accountsget.go +++ b/resource-manager/netapp/2023-07-01/netappaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c NetAppAccountsClient) AccountsGet(ctx context.Context, id NetAppAccountI var model NetAppAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappaccounts/version.go b/resource-manager/netapp/2023-07-01/netappaccounts/version.go index 3ba1f74cbbe..1fdb9d5f071 100644 --- a/resource-manager/netapp/2023-07-01/netappaccounts/version.go +++ b/resource-manager/netapp/2023-07-01/netappaccounts/version.go @@ -1,12 +1,10 @@ package netappaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappaccounts/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/netappresource/README.md b/resource-manager/netapp/2023-07-01/netappresource/README.md index 21d35898caa..46bdf38cc52 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/README.md +++ b/resource-manager/netapp/2023-07-01/netappresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/netappresource` Documentation -The `netappresource` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `netappresource` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/netappresource/client.go b/resource-manager/netapp/2023-07-01/netappresource/client.go index e02988617d8..0bfc3f358ce 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/client.go +++ b/resource-manager/netapp/2023-07-01/netappresource/client.go @@ -15,7 +15,7 @@ type NetAppResourceClient struct { } func NewNetAppResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppResourceClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/netappresource/id_location.go b/resource-manager/netapp/2023-07-01/netappresource/id_location.go index b6b91bc802d..b9d650f4de7 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/id_location.go +++ b/resource-manager/netapp/2023-07-01/netappresource/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/netappresource/id_quotalimit.go b/resource-manager/netapp/2023-07-01/netappresource/id_quotalimit.go index 0088f16b365..51baeccd764 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/id_quotalimit.go +++ b/resource-manager/netapp/2023-07-01/netappresource/id_quotalimit.go @@ -42,7 +42,7 @@ func ParseQuotaLimitID(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQuotaLimitIDInsensitively(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_checkfilepathavailability.go b/resource-manager/netapp/2023-07-01/netappresource/method_checkfilepathavailability.go index 2710dd52807..fcd3daa5d29 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_checkfilepathavailability.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_checkfilepathavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckFilePathAvailability(ctx context.Context, id var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_checknameavailability.go b/resource-manager/netapp/2023-07-01/netappresource/method_checknameavailability.go index 3c7ac9c5704..788eb6035e5 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_checknameavailability.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckNameAvailability(ctx context.Context, id Loca var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_checkquotaavailability.go b/resource-manager/netapp/2023-07-01/netappresource/method_checkquotaavailability.go index 68f31ded84e..75b1541b588 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_checkquotaavailability.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_checkquotaavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckQuotaAvailability(ctx context.Context, id Loc var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_querynetworksiblingset.go b/resource-manager/netapp/2023-07-01/netappresource/method_querynetworksiblingset.go index 9707443382a..1777bea9e98 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_querynetworksiblingset.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_querynetworksiblingset.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) QueryNetworkSiblingSet(ctx context.Context, id Loc var model NetworkSiblingSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_queryregioninfo.go b/resource-manager/netapp/2023-07-01/netappresource/method_queryregioninfo.go index ef1715019e4..dc45f121299 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_queryregioninfo.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_queryregioninfo.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QueryRegionInfo(ctx context.Context, id LocationId var model RegionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitsget.go b/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitsget.go index 721f649f0b2..cd1492d82a8 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitsget.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitsget.go @@ -45,7 +45,6 @@ func (c NetAppResourceClient) QuotaLimitsGet(ctx context.Context, id QuotaLimitI var model SubscriptionQuotaItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitslist.go b/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitslist.go index eba38d4fa9e..81645f131b0 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitslist.go +++ b/resource-manager/netapp/2023-07-01/netappresource/method_quotalimitslist.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QuotaLimitsList(ctx context.Context, id LocationId var model SubscriptionQuotaItemList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/netappresource/version.go b/resource-manager/netapp/2023-07-01/netappresource/version.go index 4132385a9f3..e3453110788 100644 --- a/resource-manager/netapp/2023-07-01/netappresource/version.go +++ b/resource-manager/netapp/2023-07-01/netappresource/version.go @@ -1,12 +1,10 @@ package netappresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappresource/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/poolchange/README.md b/resource-manager/netapp/2023-07-01/poolchange/README.md index f66792e55df..a4878179988 100644 --- a/resource-manager/netapp/2023-07-01/poolchange/README.md +++ b/resource-manager/netapp/2023-07-01/poolchange/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/poolchange` Documentation -The `poolchange` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `poolchange` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/poolchange/client.go b/resource-manager/netapp/2023-07-01/poolchange/client.go index 270c25028c2..a83eadc3fe1 100644 --- a/resource-manager/netapp/2023-07-01/poolchange/client.go +++ b/resource-manager/netapp/2023-07-01/poolchange/client.go @@ -15,7 +15,7 @@ type PoolChangeClient struct { } func NewPoolChangeClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolChangeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "poolchange", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "poolchange", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolChangeClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/poolchange/id_volume.go b/resource-manager/netapp/2023-07-01/poolchange/id_volume.go index 0e74fdf5585..913f22f8d49 100644 --- a/resource-manager/netapp/2023-07-01/poolchange/id_volume.go +++ b/resource-manager/netapp/2023-07-01/poolchange/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/poolchange/version.go b/resource-manager/netapp/2023-07-01/poolchange/version.go index 770ce684032..3d4b13a29ac 100644 --- a/resource-manager/netapp/2023-07-01/poolchange/version.go +++ b/resource-manager/netapp/2023-07-01/poolchange/version.go @@ -1,12 +1,10 @@ package poolchange -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/poolchange/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/poolchange/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/resetcifspassword/client.go b/resource-manager/netapp/2023-07-01/resetcifspassword/client.go index 2d17ccc3976..ba2cbb22bb0 100644 --- a/resource-manager/netapp/2023-07-01/resetcifspassword/client.go +++ b/resource-manager/netapp/2023-07-01/resetcifspassword/client.go @@ -15,7 +15,7 @@ type ResetCifsPasswordClient struct { } func NewResetCifsPasswordClientWithBaseURI(sdkApi sdkEnv.Api) (*ResetCifsPasswordClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resetcifspassword", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resetcifspassword", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResetCifsPasswordClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/resetcifspassword/id_volume.go b/resource-manager/netapp/2023-07-01/resetcifspassword/id_volume.go index b2cdcb5d95a..cc04516bb06 100644 --- a/resource-manager/netapp/2023-07-01/resetcifspassword/id_volume.go +++ b/resource-manager/netapp/2023-07-01/resetcifspassword/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/resetcifspassword/version.go b/resource-manager/netapp/2023-07-01/resetcifspassword/version.go index 6ba8f734f03..e9dc34f6788 100644 --- a/resource-manager/netapp/2023-07-01/resetcifspassword/version.go +++ b/resource-manager/netapp/2023-07-01/resetcifspassword/version.go @@ -1,12 +1,10 @@ package resetcifspassword -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resetcifspassword/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resetcifspassword/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/restore/README.md b/resource-manager/netapp/2023-07-01/restore/README.md index 911c242e470..2391c3572f9 100644 --- a/resource-manager/netapp/2023-07-01/restore/README.md +++ b/resource-manager/netapp/2023-07-01/restore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/restore` Documentation -The `restore` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `restore` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/restore/client.go b/resource-manager/netapp/2023-07-01/restore/client.go index 97fa355d7db..1ce453be7c3 100644 --- a/resource-manager/netapp/2023-07-01/restore/client.go +++ b/resource-manager/netapp/2023-07-01/restore/client.go @@ -15,7 +15,7 @@ type RestoreClient struct { } func NewRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*RestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestoreClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/restore/id_volume.go b/resource-manager/netapp/2023-07-01/restore/id_volume.go index 64d9eacc3ac..67d5969e622 100644 --- a/resource-manager/netapp/2023-07-01/restore/id_volume.go +++ b/resource-manager/netapp/2023-07-01/restore/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/restore/method_backupsgetvolumerestorestatus.go b/resource-manager/netapp/2023-07-01/restore/method_backupsgetvolumerestorestatus.go index 0ed9ff58d70..8e69a66a063 100644 --- a/resource-manager/netapp/2023-07-01/restore/method_backupsgetvolumerestorestatus.go +++ b/resource-manager/netapp/2023-07-01/restore/method_backupsgetvolumerestorestatus.go @@ -46,7 +46,6 @@ func (c RestoreClient) BackupsGetVolumeRestoreStatus(ctx context.Context, id Vol var model RestoreStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/restore/version.go b/resource-manager/netapp/2023-07-01/restore/version.go index 0f4dff9a6f6..1ec0e6a5d6b 100644 --- a/resource-manager/netapp/2023-07-01/restore/version.go +++ b/resource-manager/netapp/2023-07-01/restore/version.go @@ -1,12 +1,10 @@ package restore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restore/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/README.md b/resource-manager/netapp/2023-07-01/snapshotpolicy/README.md index 99ac0ba2bab..fcd3c89032b 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/README.md +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `snapshotpolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/client.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/client.go index eebb8c7b8da..e92eedba749 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/client.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyClient struct { } func NewSnapshotPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/id_netappaccount.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/id_netappaccount.go index 51822e9aaf3..5f87f814f94 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/id_snapshotpolicy.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/id_snapshotpolicy.go index c007ae89039..4c647b0e54a 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciescreate.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciescreate.go index f0aaa54617e..8210e2fad73 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciescreate.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciescreate.go @@ -50,7 +50,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesCreate(ctx context.Context, id Sna var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciesget.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciesget.go index 53aa8b06361..15d2b69d7c1 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciesget.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpoliciesget.go @@ -45,7 +45,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesGet(ctx context.Context, id Snapsh var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpolicieslist.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpolicieslist.go index 50c611c5cb0..eca667d1eb4 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpolicieslist.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/method_snapshotpolicieslist.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesList(ctx context.Context, id NetAp var model SnapshotPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicy/version.go b/resource-manager/netapp/2023-07-01/snapshotpolicy/version.go index 9d4eb30f91c..04ee331e7f8 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicy/version.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicy/version.go @@ -1,12 +1,10 @@ package snapshotpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicy/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/README.md b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/README.md index 42df7a3cbcc..1f6e79cc084 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/README.md +++ b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes` Documentation -The `snapshotpolicylistvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `snapshotpolicylistvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/client.go b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/client.go index 047d79a12c3..6098b871f64 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/client.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyListVolumesClient struct { } func NewSnapshotPolicyListVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyListVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyListVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/id_snapshotpolicy.go b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/id_snapshotpolicy.go index 1b30e761faf..3c59714333d 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go index 59512dd2794..88466bae80e 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyListVolumesClient) SnapshotPoliciesListVolumes(ctx context var model SnapshotPolicyVolumeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/version.go b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/version.go index 41e4d7d0f36..4a2eae1757e 100644 --- a/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/version.go +++ b/resource-manager/netapp/2023-07-01/snapshotpolicylistvolumes/version.go @@ -1,12 +1,10 @@ package snapshotpolicylistvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicylistvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicylistvolumes/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/snapshots/README.md b/resource-manager/netapp/2023-07-01/snapshots/README.md index 56927590466..0c03eb9c8bd 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/README.md +++ b/resource-manager/netapp/2023-07-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/snapshots/client.go b/resource-manager/netapp/2023-07-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/client.go +++ b/resource-manager/netapp/2023-07-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/snapshots/id_snapshot.go b/resource-manager/netapp/2023-07-01/snapshots/id_snapshot.go index 1712cf99186..d01e331065a 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/id_snapshot.go +++ b/resource-manager/netapp/2023-07-01/snapshots/id_snapshot.go @@ -48,7 +48,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/snapshots/id_volume.go b/resource-manager/netapp/2023-07-01/snapshots/id_volume.go index 1d8f9e61805..40d4cc5b6b1 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/id_volume.go +++ b/resource-manager/netapp/2023-07-01/snapshots/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/snapshots/method_get.go b/resource-manager/netapp/2023-07-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/method_get.go +++ b/resource-manager/netapp/2023-07-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshots/method_list.go b/resource-manager/netapp/2023-07-01/snapshots/method_list.go index d60b22e27a9..77c6da22159 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/method_list.go +++ b/resource-manager/netapp/2023-07-01/snapshots/method_list.go @@ -46,7 +46,6 @@ func (c SnapshotsClient) List(ctx context.Context, id VolumeId) (result ListOper var model SnapshotsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/snapshots/version.go b/resource-manager/netapp/2023-07-01/snapshots/version.go index d6ebb09d463..b9128b0f7ec 100644 --- a/resource-manager/netapp/2023-07-01/snapshots/version.go +++ b/resource-manager/netapp/2023-07-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/subvolumes/README.md b/resource-manager/netapp/2023-07-01/subvolumes/README.md index 00a4cbbbe19..75253df27bb 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/README.md +++ b/resource-manager/netapp/2023-07-01/subvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/subvolumes` Documentation -The `subvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `subvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/subvolumes/client.go b/resource-manager/netapp/2023-07-01/subvolumes/client.go index b675258d906..051d1e4b2ba 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/client.go +++ b/resource-manager/netapp/2023-07-01/subvolumes/client.go @@ -15,7 +15,7 @@ type SubVolumesClient struct { } func NewSubVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/subvolumes/id_subvolume.go b/resource-manager/netapp/2023-07-01/subvolumes/id_subvolume.go index 5c35777037a..dff6135cbbe 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/id_subvolume.go +++ b/resource-manager/netapp/2023-07-01/subvolumes/id_subvolume.go @@ -48,7 +48,7 @@ func ParseSubVolumeID(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSubVolumeIDInsensitively(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/subvolumes/id_volume.go b/resource-manager/netapp/2023-07-01/subvolumes/id_volume.go index 2b24cb1a31f..36a08c14c73 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/id_volume.go +++ b/resource-manager/netapp/2023-07-01/subvolumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/subvolumes/method_get.go b/resource-manager/netapp/2023-07-01/subvolumes/method_get.go index 455566fe22c..20f1ee49120 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/method_get.go +++ b/resource-manager/netapp/2023-07-01/subvolumes/method_get.go @@ -45,7 +45,6 @@ func (c SubVolumesClient) Get(ctx context.Context, id SubVolumeId) (result GetOp var model SubvolumeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/subvolumes/version.go b/resource-manager/netapp/2023-07-01/subvolumes/version.go index 1897e5bf1c4..ea673849d3f 100644 --- a/resource-manager/netapp/2023-07-01/subvolumes/version.go +++ b/resource-manager/netapp/2023-07-01/subvolumes/version.go @@ -1,12 +1,10 @@ package subvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subvolumes/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/README.md b/resource-manager/netapp/2023-07-01/volumegroups/README.md index 844fd54028f..643bfc0442a 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/README.md +++ b/resource-manager/netapp/2023-07-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumegroups/client.go b/resource-manager/netapp/2023-07-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/client.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/id_netappaccount.go b/resource-manager/netapp/2023-07-01/volumegroups/id_netappaccount.go index e41dc1600a0..d975b3265d2 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/id_netappaccount.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/id_volumegroup.go b/resource-manager/netapp/2023-07-01/volumegroups/id_volumegroup.go index f42fe51614d..f71aadaf630 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/id_volumegroup.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/method_get.go b/resource-manager/netapp/2023-07-01/volumegroups/method_get.go index 981869d83d5..59130918900 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/method_get.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroupDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/method_listbynetappaccount.go b/resource-manager/netapp/2023-07-01/volumegroups/method_listbynetappaccount.go index a97d0887201..29dee764979 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/method_listbynetappaccount.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/method_listbynetappaccount.go @@ -46,7 +46,6 @@ func (c VolumeGroupsClient) ListByNetAppAccount(ctx context.Context, id NetAppAc var model VolumeGroupList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumegroups/version.go b/resource-manager/netapp/2023-07-01/volumegroups/version.go index 873d2e87116..20e06d54a40 100644 --- a/resource-manager/netapp/2023-07-01/volumegroups/version.go +++ b/resource-manager/netapp/2023-07-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/README.md b/resource-manager/netapp/2023-07-01/volumequotarules/README.md index cc8d95b19c5..b8a0cef591b 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/README.md +++ b/resource-manager/netapp/2023-07-01/volumequotarules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumequotarules` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/client.go b/resource-manager/netapp/2023-07-01/volumequotarules/client.go index c6c70e112e0..b42efdd36e2 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/client.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/client.go @@ -15,7 +15,7 @@ type VolumeQuotaRulesClient struct { } func NewVolumeQuotaRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeQuotaRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumequotarules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumequotarules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeQuotaRulesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/id_volume.go b/resource-manager/netapp/2023-07-01/volumequotarules/id_volume.go index 6dad4e030b2..20b660aca21 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/id_volume.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/id_volumequotarule.go b/resource-manager/netapp/2023-07-01/volumequotarules/id_volumequotarule.go index e61ab571acc..67093f4e3c2 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/id_volumequotarule.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/id_volumequotarule.go @@ -48,7 +48,7 @@ func ParseVolumeQuotaRuleID(input string) (*VolumeQuotaRuleId, error) { } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVolumeQuotaRuleIDInsensitively(input string) (*VolumeQuotaRuleId, erro } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/method_get.go b/resource-manager/netapp/2023-07-01/volumequotarules/method_get.go index 88aa05a3709..0c82ebc839b 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/method_get.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/method_get.go @@ -45,7 +45,6 @@ func (c VolumeQuotaRulesClient) Get(ctx context.Context, id VolumeQuotaRuleId) ( var model VolumeQuotaRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/method_listbyvolume.go b/resource-manager/netapp/2023-07-01/volumequotarules/method_listbyvolume.go index ed643e0c5b0..87cd029de34 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/method_listbyvolume.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/method_listbyvolume.go @@ -46,7 +46,6 @@ func (c VolumeQuotaRulesClient) ListByVolume(ctx context.Context, id VolumeId) ( var model VolumeQuotaRulesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumequotarules/version.go b/resource-manager/netapp/2023-07-01/volumequotarules/version.go index 4fb723c6549..1f03114aa2e 100644 --- a/resource-manager/netapp/2023-07-01/volumequotarules/version.go +++ b/resource-manager/netapp/2023-07-01/volumequotarules/version.go @@ -1,12 +1,10 @@ package volumequotarules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumequotarules/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumes/README.md b/resource-manager/netapp/2023-07-01/volumes/README.md index 6ecb405c40a..3b161f18105 100644 --- a/resource-manager/netapp/2023-07-01/volumes/README.md +++ b/resource-manager/netapp/2023-07-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumes/client.go b/resource-manager/netapp/2023-07-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/netapp/2023-07-01/volumes/client.go +++ b/resource-manager/netapp/2023-07-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumes/id_capacitypool.go b/resource-manager/netapp/2023-07-01/volumes/id_capacitypool.go index baea2acd856..f9074a3f41f 100644 --- a/resource-manager/netapp/2023-07-01/volumes/id_capacitypool.go +++ b/resource-manager/netapp/2023-07-01/volumes/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumes/id_volume.go b/resource-manager/netapp/2023-07-01/volumes/id_volume.go index 2144d7750a2..294338c0f1d 100644 --- a/resource-manager/netapp/2023-07-01/volumes/id_volume.go +++ b/resource-manager/netapp/2023-07-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumes/method_delete.go b/resource-manager/netapp/2023-07-01/volumes/method_delete.go index cf50dbfa90f..c449fa7d2b8 100644 --- a/resource-manager/netapp/2023-07-01/volumes/method_delete.go +++ b/resource-manager/netapp/2023-07-01/volumes/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2023-07-01/volumes/method_get.go b/resource-manager/netapp/2023-07-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/netapp/2023-07-01/volumes/method_get.go +++ b/resource-manager/netapp/2023-07-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumes/version.go b/resource-manager/netapp/2023-07-01/volumes/version.go index 6aff918da10..1d7731f2916 100644 --- a/resource-manager/netapp/2023-07-01/volumes/version.go +++ b/resource-manager/netapp/2023-07-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumesrelocation/README.md b/resource-manager/netapp/2023-07-01/volumesrelocation/README.md index 7c709dcda3d..2668454adec 100644 --- a/resource-manager/netapp/2023-07-01/volumesrelocation/README.md +++ b/resource-manager/netapp/2023-07-01/volumesrelocation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumesrelocation` Documentation -The `volumesrelocation` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumesrelocation` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumesrelocation/client.go b/resource-manager/netapp/2023-07-01/volumesrelocation/client.go index 9170c859f6f..468673aa176 100644 --- a/resource-manager/netapp/2023-07-01/volumesrelocation/client.go +++ b/resource-manager/netapp/2023-07-01/volumesrelocation/client.go @@ -15,7 +15,7 @@ type VolumesRelocationClient struct { } func NewVolumesRelocationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRelocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrelocation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrelocation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRelocationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumesrelocation/id_volume.go b/resource-manager/netapp/2023-07-01/volumesrelocation/id_volume.go index b304817c7c8..6d1896e16fd 100644 --- a/resource-manager/netapp/2023-07-01/volumesrelocation/id_volume.go +++ b/resource-manager/netapp/2023-07-01/volumesrelocation/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumesrelocation/version.go b/resource-manager/netapp/2023-07-01/volumesrelocation/version.go index 0bc42df6b70..a5fc9c4bc3c 100644 --- a/resource-manager/netapp/2023-07-01/volumesrelocation/version.go +++ b/resource-manager/netapp/2023-07-01/volumesrelocation/version.go @@ -1,12 +1,10 @@ package volumesrelocation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrelocation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrelocation/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/README.md b/resource-manager/netapp/2023-07-01/volumesreplication/README.md index 99900095bca..4f5a0283082 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/README.md +++ b/resource-manager/netapp/2023-07-01/volumesreplication/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumesreplication` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/client.go b/resource-manager/netapp/2023-07-01/volumesreplication/client.go index 278506e484e..092e04c0a0d 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/client.go +++ b/resource-manager/netapp/2023-07-01/volumesreplication/client.go @@ -15,7 +15,7 @@ type VolumesReplicationClient struct { } func NewVolumesReplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesReplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesreplication", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesreplication", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesReplicationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/id_volume.go b/resource-manager/netapp/2023-07-01/volumesreplication/id_volume.go index 0a7eb12df02..b2df26c0921 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/id_volume.go +++ b/resource-manager/netapp/2023-07-01/volumesreplication/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/method_volumeslistreplications.go b/resource-manager/netapp/2023-07-01/volumesreplication/method_volumeslistreplications.go index 5a7f27f7407..bed3dfeb672 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/method_volumeslistreplications.go +++ b/resource-manager/netapp/2023-07-01/volumesreplication/method_volumeslistreplications.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesListReplications(ctx context.Context, i var model ListReplications result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/method_volumesreplicationstatus.go b/resource-manager/netapp/2023-07-01/volumesreplication/method_volumesreplicationstatus.go index 6e7f09b9dbe..2f626c60847 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/method_volumesreplicationstatus.go +++ b/resource-manager/netapp/2023-07-01/volumesreplication/method_volumesreplicationstatus.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesReplicationStatus(ctx context.Context, var model ReplicationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-07-01/volumesreplication/version.go b/resource-manager/netapp/2023-07-01/volumesreplication/version.go index 3675f14c351..c83426497f5 100644 --- a/resource-manager/netapp/2023-07-01/volumesreplication/version.go +++ b/resource-manager/netapp/2023-07-01/volumesreplication/version.go @@ -1,12 +1,10 @@ package volumesreplication -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesreplication/2023-07-01" } diff --git a/resource-manager/netapp/2023-07-01/volumesrevert/README.md b/resource-manager/netapp/2023-07-01/volumesrevert/README.md index e7abdc7bd8d..0b37bdb6c77 100644 --- a/resource-manager/netapp/2023-07-01/volumesrevert/README.md +++ b/resource-manager/netapp/2023-07-01/volumesrevert/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-07-01/volumesrevert` Documentation -The `volumesrevert` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-07-01`). +The `volumesrevert` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-07-01/volumesrevert/client.go b/resource-manager/netapp/2023-07-01/volumesrevert/client.go index fa2bad78d7b..353b7571904 100644 --- a/resource-manager/netapp/2023-07-01/volumesrevert/client.go +++ b/resource-manager/netapp/2023-07-01/volumesrevert/client.go @@ -15,7 +15,7 @@ type VolumesRevertClient struct { } func NewVolumesRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRevertClient: %+v", err) } diff --git a/resource-manager/netapp/2023-07-01/volumesrevert/id_volume.go b/resource-manager/netapp/2023-07-01/volumesrevert/id_volume.go index 3b9e67d66c0..ac8b9d254be 100644 --- a/resource-manager/netapp/2023-07-01/volumesrevert/id_volume.go +++ b/resource-manager/netapp/2023-07-01/volumesrevert/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-07-01/volumesrevert/version.go b/resource-manager/netapp/2023-07-01/volumesrevert/version.go index 0e476fdb3e8..962c70ed754 100644 --- a/resource-manager/netapp/2023-07-01/volumesrevert/version.go +++ b/resource-manager/netapp/2023-07-01/volumesrevert/version.go @@ -1,12 +1,10 @@ package volumesrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrevert/2023-07-01" } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/README.md b/resource-manager/netapp/2023-11-01/backuppolicy/README.md index dbd31fce3f9..297c0e1f2be 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/README.md +++ b/resource-manager/netapp/2023-11-01/backuppolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backuppolicy` Documentation -The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `backuppolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/client.go b/resource-manager/netapp/2023-11-01/backuppolicy/client.go index 1db45e634e5..8b4fc07ad66 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/client.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/client.go @@ -15,7 +15,7 @@ type BackupPolicyClient struct { } func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/id_backuppolicy.go b/resource-manager/netapp/2023-11-01/backuppolicy/id_backuppolicy.go index 9f45aceef30..2093d326c71 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/id_backuppolicy.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/id_netappaccount.go b/resource-manager/netapp/2023-11-01/backuppolicy/id_netappaccount.go index d722f9a676d..5700ac965f0 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppoliciesget.go b/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppoliciesget.go index 73667d207d3..e8ecfc1fc04 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppoliciesget.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppoliciesget.go @@ -45,7 +45,6 @@ func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPoli var model BackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppolicieslist.go b/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppolicieslist.go index 7a939318453..7932d964240 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppolicieslist.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/method_backuppolicieslist.go @@ -46,7 +46,6 @@ func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAcc var model BackupPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/backuppolicy/version.go b/resource-manager/netapp/2023-11-01/backuppolicy/version.go index 241d6314ffc..bc633bfefc7 100644 --- a/resource-manager/netapp/2023-11-01/backuppolicy/version.go +++ b/resource-manager/netapp/2023-11-01/backuppolicy/version.go @@ -1,12 +1,10 @@ package backuppolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicy/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/backups/README.md b/resource-manager/netapp/2023-11-01/backups/README.md index 60098de1abb..2f54bb82a63 100644 --- a/resource-manager/netapp/2023-11-01/backups/README.md +++ b/resource-manager/netapp/2023-11-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/backups/client.go b/resource-manager/netapp/2023-11-01/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/netapp/2023-11-01/backups/client.go +++ b/resource-manager/netapp/2023-11-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/backups/id_backup.go b/resource-manager/netapp/2023-11-01/backups/id_backup.go index 4af4424ea14..c1767665ff6 100644 --- a/resource-manager/netapp/2023-11-01/backups/id_backup.go +++ b/resource-manager/netapp/2023-11-01/backups/id_backup.go @@ -46,7 +46,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backups/id_backupvault.go b/resource-manager/netapp/2023-11-01/backups/id_backupvault.go index 93042918533..3860a5a1050 100644 --- a/resource-manager/netapp/2023-11-01/backups/id_backupvault.go +++ b/resource-manager/netapp/2023-11-01/backups/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backups/id_netappaccount.go b/resource-manager/netapp/2023-11-01/backups/id_netappaccount.go index 26feaa5e8b2..2ffc4166c29 100644 --- a/resource-manager/netapp/2023-11-01/backups/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/backups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backups/id_volume.go b/resource-manager/netapp/2023-11-01/backups/id_volume.go index 839d08e459e..f3fa7ea4a05 100644 --- a/resource-manager/netapp/2023-11-01/backups/id_volume.go +++ b/resource-manager/netapp/2023-11-01/backups/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backups/method_get.go b/resource-manager/netapp/2023-11-01/backups/method_get.go index 65321ba9ef6..fe88bb84d0a 100644 --- a/resource-manager/netapp/2023-11-01/backups/method_get.go +++ b/resource-manager/netapp/2023-11-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model Backup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/backups/method_getlateststatus.go b/resource-manager/netapp/2023-11-01/backups/method_getlateststatus.go index dcd2709c74f..1668fdfcf7e 100644 --- a/resource-manager/netapp/2023-11-01/backups/method_getlateststatus.go +++ b/resource-manager/netapp/2023-11-01/backups/method_getlateststatus.go @@ -46,7 +46,6 @@ func (c BackupsClient) GetLatestStatus(ctx context.Context, id VolumeId) (result var model BackupStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/backups/method_listbyvault.go b/resource-manager/netapp/2023-11-01/backups/method_listbyvault.go index f92c1548b81..3416244ff49 100644 --- a/resource-manager/netapp/2023-11-01/backups/method_listbyvault.go +++ b/resource-manager/netapp/2023-11-01/backups/method_listbyvault.go @@ -39,6 +39,7 @@ func (o ListByVaultOperationOptions) ToHeaders() *client.Headers { func (o ListByVaultOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2023-11-01/backups/version.go b/resource-manager/netapp/2023-11-01/backups/version.go index 0c6f81b0247..19535879940 100644 --- a/resource-manager/netapp/2023-11-01/backups/version.go +++ b/resource-manager/netapp/2023-11-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/backupvaults/README.md b/resource-manager/netapp/2023-11-01/backupvaults/README.md index e06b4ae1999..3eee640e611 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/README.md +++ b/resource-manager/netapp/2023-11-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/backupvaults/client.go b/resource-manager/netapp/2023-11-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/client.go +++ b/resource-manager/netapp/2023-11-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go b/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go index de1952d7834..7120a8d90f0 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go +++ b/resource-manager/netapp/2023-11-01/backupvaults/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go b/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go index 2096ade91b3..bd83fc9ddfd 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/backupvaults/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/backupvaults/method_get.go b/resource-manager/netapp/2023-11-01/backupvaults/method_get.go index e3c1b3c6952..6cd544f7ca9 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/method_get.go +++ b/resource-manager/netapp/2023-11-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/backupvaults/version.go b/resource-manager/netapp/2023-11-01/backupvaults/version.go index 742a32aa461..5077915e9e5 100644 --- a/resource-manager/netapp/2023-11-01/backupvaults/version.go +++ b/resource-manager/netapp/2023-11-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/capacitypools/README.md b/resource-manager/netapp/2023-11-01/capacitypools/README.md index 6db036a4785..c9d72b04b62 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/README.md +++ b/resource-manager/netapp/2023-11-01/capacitypools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `capacitypools` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/capacitypools/client.go b/resource-manager/netapp/2023-11-01/capacitypools/client.go index 3de33a3dc5b..d7a8be4e076 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/client.go +++ b/resource-manager/netapp/2023-11-01/capacitypools/client.go @@ -15,7 +15,7 @@ type CapacityPoolsClient struct { } func NewCapacityPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacitypools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacitypools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityPoolsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go b/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go index 30b27305799..de2fe4626bf 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go +++ b/resource-manager/netapp/2023-11-01/capacitypools/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go b/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go index a77679932dd..0880024ed89 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/capacitypools/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go b/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go index d2f91e09044..f9d5fcc8531 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go +++ b/resource-manager/netapp/2023-11-01/capacitypools/method_poolsget.go @@ -45,7 +45,6 @@ func (c CapacityPoolsClient) PoolsGet(ctx context.Context, id CapacityPoolId) (r var model CapacityPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/capacitypools/version.go b/resource-manager/netapp/2023-11-01/capacitypools/version.go index 54c4a477f54..b3f885f3577 100644 --- a/resource-manager/netapp/2023-11-01/capacitypools/version.go +++ b/resource-manager/netapp/2023-11-01/capacitypools/version.go @@ -1,12 +1,10 @@ package capacitypools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacitypools/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/filelocks/README.md b/resource-manager/netapp/2023-11-01/filelocks/README.md index e41d3643b0f..99c248c93e9 100644 --- a/resource-manager/netapp/2023-11-01/filelocks/README.md +++ b/resource-manager/netapp/2023-11-01/filelocks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/filelocks` Documentation -The `filelocks` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `filelocks` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/filelocks/client.go b/resource-manager/netapp/2023-11-01/filelocks/client.go index 7f39f5ef46b..56c8b4fc903 100644 --- a/resource-manager/netapp/2023-11-01/filelocks/client.go +++ b/resource-manager/netapp/2023-11-01/filelocks/client.go @@ -15,7 +15,7 @@ type FileLocksClient struct { } func NewFileLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*FileLocksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filelocks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filelocks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileLocksClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/filelocks/id_volume.go b/resource-manager/netapp/2023-11-01/filelocks/id_volume.go index 8f6a5960750..bd705c9fd6a 100644 --- a/resource-manager/netapp/2023-11-01/filelocks/id_volume.go +++ b/resource-manager/netapp/2023-11-01/filelocks/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/filelocks/version.go b/resource-manager/netapp/2023-11-01/filelocks/version.go index 35d59c87af2..f6b31e87667 100644 --- a/resource-manager/netapp/2023-11-01/filelocks/version.go +++ b/resource-manager/netapp/2023-11-01/filelocks/version.go @@ -1,12 +1,10 @@ package filelocks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filelocks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filelocks/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/README.md b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/README.md index 6d06dcb8646..3cde1258fb9 100644 --- a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/README.md +++ b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/groupidlistforldapuser` Documentation -The `groupidlistforldapuser` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `groupidlistforldapuser` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/client.go b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/client.go index b954d6fe7dc..b098cba0063 100644 --- a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/client.go +++ b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/client.go @@ -15,7 +15,7 @@ type GroupIdListForLDAPUserClient struct { } func NewGroupIdListForLDAPUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupIdListForLDAPUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupIdListForLDAPUserClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/id_volume.go b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/id_volume.go index 74868cea51a..1174627e607 100644 --- a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/id_volume.go +++ b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/version.go b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/version.go index 842d4227ab9..f6ee5f33446 100644 --- a/resource-manager/netapp/2023-11-01/groupidlistforldapuser/version.go +++ b/resource-manager/netapp/2023-11-01/groupidlistforldapuser/version.go @@ -1,12 +1,10 @@ package groupidlistforldapuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupidlistforldapuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupidlistforldapuser/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/netappaccounts/README.md b/resource-manager/netapp/2023-11-01/netappaccounts/README.md index 9d541bb9ec4..48a10cbe28a 100644 --- a/resource-manager/netapp/2023-11-01/netappaccounts/README.md +++ b/resource-manager/netapp/2023-11-01/netappaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `netappaccounts` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/netappaccounts/client.go b/resource-manager/netapp/2023-11-01/netappaccounts/client.go index 172f1218e2c..240204954a3 100644 --- a/resource-manager/netapp/2023-11-01/netappaccounts/client.go +++ b/resource-manager/netapp/2023-11-01/netappaccounts/client.go @@ -15,7 +15,7 @@ type NetAppAccountsClient struct { } func NewNetAppAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppAccountsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go b/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go index a93e2cd2ea8..05b601e3c06 100644 --- a/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/netappaccounts/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go b/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go index dc67125153f..c1ec9504bf9 100644 --- a/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go +++ b/resource-manager/netapp/2023-11-01/netappaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c NetAppAccountsClient) AccountsGet(ctx context.Context, id NetAppAccountI var model NetAppAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappaccounts/version.go b/resource-manager/netapp/2023-11-01/netappaccounts/version.go index 2fb0e0d3b5b..7fe628fd823 100644 --- a/resource-manager/netapp/2023-11-01/netappaccounts/version.go +++ b/resource-manager/netapp/2023-11-01/netappaccounts/version.go @@ -1,12 +1,10 @@ package netappaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappaccounts/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/netappresource/README.md b/resource-manager/netapp/2023-11-01/netappresource/README.md index 3c06a7e8175..665a5e1246f 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/README.md +++ b/resource-manager/netapp/2023-11-01/netappresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/netappresource` Documentation -The `netappresource` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `netappresource` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/netappresource/client.go b/resource-manager/netapp/2023-11-01/netappresource/client.go index e02988617d8..0bfc3f358ce 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/client.go +++ b/resource-manager/netapp/2023-11-01/netappresource/client.go @@ -15,7 +15,7 @@ type NetAppResourceClient struct { } func NewNetAppResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppResourceClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/netappresource/id_location.go b/resource-manager/netapp/2023-11-01/netappresource/id_location.go index b6b91bc802d..b9d650f4de7 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/id_location.go +++ b/resource-manager/netapp/2023-11-01/netappresource/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/netappresource/id_quotalimit.go b/resource-manager/netapp/2023-11-01/netappresource/id_quotalimit.go index 0088f16b365..51baeccd764 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/id_quotalimit.go +++ b/resource-manager/netapp/2023-11-01/netappresource/id_quotalimit.go @@ -42,7 +42,7 @@ func ParseQuotaLimitID(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQuotaLimitIDInsensitively(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_checkfilepathavailability.go b/resource-manager/netapp/2023-11-01/netappresource/method_checkfilepathavailability.go index 2710dd52807..fcd3daa5d29 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_checkfilepathavailability.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_checkfilepathavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckFilePathAvailability(ctx context.Context, id var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_checknameavailability.go b/resource-manager/netapp/2023-11-01/netappresource/method_checknameavailability.go index 3c7ac9c5704..788eb6035e5 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_checknameavailability.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckNameAvailability(ctx context.Context, id Loca var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_checkquotaavailability.go b/resource-manager/netapp/2023-11-01/netappresource/method_checkquotaavailability.go index 68f31ded84e..75b1541b588 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_checkquotaavailability.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_checkquotaavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckQuotaAvailability(ctx context.Context, id Loc var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_querynetworksiblingset.go b/resource-manager/netapp/2023-11-01/netappresource/method_querynetworksiblingset.go index 9707443382a..1777bea9e98 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_querynetworksiblingset.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_querynetworksiblingset.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) QueryNetworkSiblingSet(ctx context.Context, id Loc var model NetworkSiblingSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_queryregioninfo.go b/resource-manager/netapp/2023-11-01/netappresource/method_queryregioninfo.go index ef1715019e4..dc45f121299 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_queryregioninfo.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_queryregioninfo.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QueryRegionInfo(ctx context.Context, id LocationId var model RegionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitsget.go b/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitsget.go index 721f649f0b2..cd1492d82a8 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitsget.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitsget.go @@ -45,7 +45,6 @@ func (c NetAppResourceClient) QuotaLimitsGet(ctx context.Context, id QuotaLimitI var model SubscriptionQuotaItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitslist.go b/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitslist.go index eba38d4fa9e..81645f131b0 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitslist.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_quotalimitslist.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QuotaLimitsList(ctx context.Context, id LocationId var model SubscriptionQuotaItemList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/method_regioninfosget.go b/resource-manager/netapp/2023-11-01/netappresource/method_regioninfosget.go index 61840d90ef2..89e4991022d 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/method_regioninfosget.go +++ b/resource-manager/netapp/2023-11-01/netappresource/method_regioninfosget.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) RegionInfosGet(ctx context.Context, id LocationId) var model RegionInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/netappresource/version.go b/resource-manager/netapp/2023-11-01/netappresource/version.go index ea201ece959..13809f6309a 100644 --- a/resource-manager/netapp/2023-11-01/netappresource/version.go +++ b/resource-manager/netapp/2023-11-01/netappresource/version.go @@ -1,12 +1,10 @@ package netappresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappresource/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/poolchange/README.md b/resource-manager/netapp/2023-11-01/poolchange/README.md index 8986eb96f00..e8658eb491d 100644 --- a/resource-manager/netapp/2023-11-01/poolchange/README.md +++ b/resource-manager/netapp/2023-11-01/poolchange/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/poolchange` Documentation -The `poolchange` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `poolchange` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/poolchange/client.go b/resource-manager/netapp/2023-11-01/poolchange/client.go index 270c25028c2..a83eadc3fe1 100644 --- a/resource-manager/netapp/2023-11-01/poolchange/client.go +++ b/resource-manager/netapp/2023-11-01/poolchange/client.go @@ -15,7 +15,7 @@ type PoolChangeClient struct { } func NewPoolChangeClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolChangeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "poolchange", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "poolchange", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolChangeClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/poolchange/id_volume.go b/resource-manager/netapp/2023-11-01/poolchange/id_volume.go index 0e74fdf5585..913f22f8d49 100644 --- a/resource-manager/netapp/2023-11-01/poolchange/id_volume.go +++ b/resource-manager/netapp/2023-11-01/poolchange/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/poolchange/version.go b/resource-manager/netapp/2023-11-01/poolchange/version.go index 36d5f212b14..fb181cae63d 100644 --- a/resource-manager/netapp/2023-11-01/poolchange/version.go +++ b/resource-manager/netapp/2023-11-01/poolchange/version.go @@ -1,12 +1,10 @@ package poolchange -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/poolchange/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/poolchange/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/resetcifspassword/client.go b/resource-manager/netapp/2023-11-01/resetcifspassword/client.go index 2d17ccc3976..ba2cbb22bb0 100644 --- a/resource-manager/netapp/2023-11-01/resetcifspassword/client.go +++ b/resource-manager/netapp/2023-11-01/resetcifspassword/client.go @@ -15,7 +15,7 @@ type ResetCifsPasswordClient struct { } func NewResetCifsPasswordClientWithBaseURI(sdkApi sdkEnv.Api) (*ResetCifsPasswordClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resetcifspassword", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resetcifspassword", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResetCifsPasswordClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/resetcifspassword/id_volume.go b/resource-manager/netapp/2023-11-01/resetcifspassword/id_volume.go index b2cdcb5d95a..cc04516bb06 100644 --- a/resource-manager/netapp/2023-11-01/resetcifspassword/id_volume.go +++ b/resource-manager/netapp/2023-11-01/resetcifspassword/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/resetcifspassword/version.go b/resource-manager/netapp/2023-11-01/resetcifspassword/version.go index 0d89a535915..cde1460f417 100644 --- a/resource-manager/netapp/2023-11-01/resetcifspassword/version.go +++ b/resource-manager/netapp/2023-11-01/resetcifspassword/version.go @@ -1,12 +1,10 @@ package resetcifspassword -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resetcifspassword/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resetcifspassword/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/restore/README.md b/resource-manager/netapp/2023-11-01/restore/README.md index 5ff5ed00bdf..a73aaf41a13 100644 --- a/resource-manager/netapp/2023-11-01/restore/README.md +++ b/resource-manager/netapp/2023-11-01/restore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/restore` Documentation -The `restore` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `restore` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/restore/client.go b/resource-manager/netapp/2023-11-01/restore/client.go index 97fa355d7db..1ce453be7c3 100644 --- a/resource-manager/netapp/2023-11-01/restore/client.go +++ b/resource-manager/netapp/2023-11-01/restore/client.go @@ -15,7 +15,7 @@ type RestoreClient struct { } func NewRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*RestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestoreClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/restore/id_volume.go b/resource-manager/netapp/2023-11-01/restore/id_volume.go index 64d9eacc3ac..67d5969e622 100644 --- a/resource-manager/netapp/2023-11-01/restore/id_volume.go +++ b/resource-manager/netapp/2023-11-01/restore/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/restore/method_backupsgetvolumelatestrestorestatus.go b/resource-manager/netapp/2023-11-01/restore/method_backupsgetvolumelatestrestorestatus.go index f8d846b552b..42b453d7f1a 100644 --- a/resource-manager/netapp/2023-11-01/restore/method_backupsgetvolumelatestrestorestatus.go +++ b/resource-manager/netapp/2023-11-01/restore/method_backupsgetvolumelatestrestorestatus.go @@ -46,7 +46,6 @@ func (c RestoreClient) BackupsGetVolumeLatestRestoreStatus(ctx context.Context, var model RestoreStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/restore/version.go b/resource-manager/netapp/2023-11-01/restore/version.go index 1fec4b0bd31..ae63f391114 100644 --- a/resource-manager/netapp/2023-11-01/restore/version.go +++ b/resource-manager/netapp/2023-11-01/restore/version.go @@ -1,12 +1,10 @@ package restore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restore/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md b/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md index e5c48c02b7e..c51cedc9192 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `snapshotpolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go index eebb8c7b8da..e92eedba749 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyClient struct { } func NewSnapshotPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go index 51822e9aaf3..5f87f814f94 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go index c007ae89039..4c647b0e54a 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go index f0aaa54617e..8210e2fad73 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciescreate.go @@ -50,7 +50,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesCreate(ctx context.Context, id Sna var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go index 53aa8b06361..15d2b69d7c1 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpoliciesget.go @@ -45,7 +45,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesGet(ctx context.Context, id Snapsh var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go index 50c611c5cb0..eca667d1eb4 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/method_snapshotpolicieslist.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesList(ctx context.Context, id NetAp var model SnapshotPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go b/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go index 4b716695a28..88e6e03fdd9 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicy/version.go @@ -1,12 +1,10 @@ package snapshotpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicy/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/README.md b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/README.md index d1f602c1bc3..73e864f3048 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/README.md +++ b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes` Documentation -The `snapshotpolicylistvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `snapshotpolicylistvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/client.go b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/client.go index 047d79a12c3..6098b871f64 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/client.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyListVolumesClient struct { } func NewSnapshotPolicyListVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyListVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyListVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/id_snapshotpolicy.go b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/id_snapshotpolicy.go index 1b30e761faf..3c59714333d 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/id_snapshotpolicy.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go index 59512dd2794..88466bae80e 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyListVolumesClient) SnapshotPoliciesListVolumes(ctx context var model SnapshotPolicyVolumeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/version.go b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/version.go index decd9b4dc87..50d53176633 100644 --- a/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/version.go +++ b/resource-manager/netapp/2023-11-01/snapshotpolicylistvolumes/version.go @@ -1,12 +1,10 @@ package snapshotpolicylistvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicylistvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicylistvolumes/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/snapshots/README.md b/resource-manager/netapp/2023-11-01/snapshots/README.md index 4a8604cc08c..aae5b9ebe7f 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/README.md +++ b/resource-manager/netapp/2023-11-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/snapshots/client.go b/resource-manager/netapp/2023-11-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/client.go +++ b/resource-manager/netapp/2023-11-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go b/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go index 1712cf99186..d01e331065a 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go +++ b/resource-manager/netapp/2023-11-01/snapshots/id_snapshot.go @@ -48,7 +48,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/snapshots/id_volume.go b/resource-manager/netapp/2023-11-01/snapshots/id_volume.go index 1d8f9e61805..40d4cc5b6b1 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/id_volume.go +++ b/resource-manager/netapp/2023-11-01/snapshots/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/snapshots/method_get.go b/resource-manager/netapp/2023-11-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/method_get.go +++ b/resource-manager/netapp/2023-11-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshots/method_list.go b/resource-manager/netapp/2023-11-01/snapshots/method_list.go index d60b22e27a9..77c6da22159 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/method_list.go +++ b/resource-manager/netapp/2023-11-01/snapshots/method_list.go @@ -46,7 +46,6 @@ func (c SnapshotsClient) List(ctx context.Context, id VolumeId) (result ListOper var model SnapshotsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/snapshots/version.go b/resource-manager/netapp/2023-11-01/snapshots/version.go index dba1cc34236..e52e0abaa0e 100644 --- a/resource-manager/netapp/2023-11-01/snapshots/version.go +++ b/resource-manager/netapp/2023-11-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/subvolumes/README.md b/resource-manager/netapp/2023-11-01/subvolumes/README.md index b2a47aa2cde..7e4ce3d42da 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/README.md +++ b/resource-manager/netapp/2023-11-01/subvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/subvolumes` Documentation -The `subvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `subvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/subvolumes/client.go b/resource-manager/netapp/2023-11-01/subvolumes/client.go index b675258d906..051d1e4b2ba 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/client.go +++ b/resource-manager/netapp/2023-11-01/subvolumes/client.go @@ -15,7 +15,7 @@ type SubVolumesClient struct { } func NewSubVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/subvolumes/id_subvolume.go b/resource-manager/netapp/2023-11-01/subvolumes/id_subvolume.go index 5c35777037a..dff6135cbbe 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/id_subvolume.go +++ b/resource-manager/netapp/2023-11-01/subvolumes/id_subvolume.go @@ -48,7 +48,7 @@ func ParseSubVolumeID(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSubVolumeIDInsensitively(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/subvolumes/id_volume.go b/resource-manager/netapp/2023-11-01/subvolumes/id_volume.go index 2b24cb1a31f..36a08c14c73 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/id_volume.go +++ b/resource-manager/netapp/2023-11-01/subvolumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/subvolumes/method_get.go b/resource-manager/netapp/2023-11-01/subvolumes/method_get.go index 455566fe22c..20f1ee49120 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/method_get.go +++ b/resource-manager/netapp/2023-11-01/subvolumes/method_get.go @@ -45,7 +45,6 @@ func (c SubVolumesClient) Get(ctx context.Context, id SubVolumeId) (result GetOp var model SubvolumeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/subvolumes/version.go b/resource-manager/netapp/2023-11-01/subvolumes/version.go index 888c5854d33..1dc8beba2b7 100644 --- a/resource-manager/netapp/2023-11-01/subvolumes/version.go +++ b/resource-manager/netapp/2023-11-01/subvolumes/version.go @@ -1,12 +1,10 @@ package subvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subvolumes/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/README.md b/resource-manager/netapp/2023-11-01/volumegroups/README.md index 1424cd706bc..4a922b241db 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/README.md +++ b/resource-manager/netapp/2023-11-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumegroups/client.go b/resource-manager/netapp/2023-11-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/client.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go b/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go index e41dc1600a0..d975b3265d2 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go b/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go index f42fe51614d..f71aadaf630 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/method_get.go b/resource-manager/netapp/2023-11-01/volumegroups/method_get.go index 981869d83d5..59130918900 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/method_get.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroupDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go b/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go index a97d0887201..29dee764979 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/method_listbynetappaccount.go @@ -46,7 +46,6 @@ func (c VolumeGroupsClient) ListByNetAppAccount(ctx context.Context, id NetAppAc var model VolumeGroupList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumegroups/version.go b/resource-manager/netapp/2023-11-01/volumegroups/version.go index e9eb0225bac..a1c17c75a9b 100644 --- a/resource-manager/netapp/2023-11-01/volumegroups/version.go +++ b/resource-manager/netapp/2023-11-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/README.md b/resource-manager/netapp/2023-11-01/volumequotarules/README.md index 9deddc0c0e0..fdcb633f968 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/README.md +++ b/resource-manager/netapp/2023-11-01/volumequotarules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumequotarules` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/client.go b/resource-manager/netapp/2023-11-01/volumequotarules/client.go index c6c70e112e0..b42efdd36e2 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/client.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/client.go @@ -15,7 +15,7 @@ type VolumeQuotaRulesClient struct { } func NewVolumeQuotaRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeQuotaRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumequotarules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumequotarules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeQuotaRulesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go b/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go index 6dad4e030b2..20b660aca21 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go b/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go index e61ab571acc..67093f4e3c2 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/id_volumequotarule.go @@ -48,7 +48,7 @@ func ParseVolumeQuotaRuleID(input string) (*VolumeQuotaRuleId, error) { } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVolumeQuotaRuleIDInsensitively(input string) (*VolumeQuotaRuleId, erro } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go b/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go index 88aa05a3709..0c82ebc839b 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/method_get.go @@ -45,7 +45,6 @@ func (c VolumeQuotaRulesClient) Get(ctx context.Context, id VolumeQuotaRuleId) ( var model VolumeQuotaRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go b/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go index ed643e0c5b0..87cd029de34 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/method_listbyvolume.go @@ -46,7 +46,6 @@ func (c VolumeQuotaRulesClient) ListByVolume(ctx context.Context, id VolumeId) ( var model VolumeQuotaRulesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumequotarules/version.go b/resource-manager/netapp/2023-11-01/volumequotarules/version.go index ee9371b563c..d035d5947ab 100644 --- a/resource-manager/netapp/2023-11-01/volumequotarules/version.go +++ b/resource-manager/netapp/2023-11-01/volumequotarules/version.go @@ -1,12 +1,10 @@ package volumequotarules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumequotarules/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumes/README.md b/resource-manager/netapp/2023-11-01/volumes/README.md index 8172e40f4fe..452f1d994e2 100644 --- a/resource-manager/netapp/2023-11-01/volumes/README.md +++ b/resource-manager/netapp/2023-11-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumes/client.go b/resource-manager/netapp/2023-11-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/netapp/2023-11-01/volumes/client.go +++ b/resource-manager/netapp/2023-11-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go b/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go index baea2acd856..f9074a3f41f 100644 --- a/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go +++ b/resource-manager/netapp/2023-11-01/volumes/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumes/id_volume.go b/resource-manager/netapp/2023-11-01/volumes/id_volume.go index 2144d7750a2..294338c0f1d 100644 --- a/resource-manager/netapp/2023-11-01/volumes/id_volume.go +++ b/resource-manager/netapp/2023-11-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumes/method_delete.go b/resource-manager/netapp/2023-11-01/volumes/method_delete.go index cf50dbfa90f..c449fa7d2b8 100644 --- a/resource-manager/netapp/2023-11-01/volumes/method_delete.go +++ b/resource-manager/netapp/2023-11-01/volumes/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2023-11-01/volumes/method_get.go b/resource-manager/netapp/2023-11-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/netapp/2023-11-01/volumes/method_get.go +++ b/resource-manager/netapp/2023-11-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumes/version.go b/resource-manager/netapp/2023-11-01/volumes/version.go index 3583fe71b16..59c936d73cd 100644 --- a/resource-manager/netapp/2023-11-01/volumes/version.go +++ b/resource-manager/netapp/2023-11-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumesrelocation/README.md b/resource-manager/netapp/2023-11-01/volumesrelocation/README.md index 273bc512b69..b2d5894f1bb 100644 --- a/resource-manager/netapp/2023-11-01/volumesrelocation/README.md +++ b/resource-manager/netapp/2023-11-01/volumesrelocation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesrelocation` Documentation -The `volumesrelocation` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumesrelocation` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumesrelocation/client.go b/resource-manager/netapp/2023-11-01/volumesrelocation/client.go index 9170c859f6f..468673aa176 100644 --- a/resource-manager/netapp/2023-11-01/volumesrelocation/client.go +++ b/resource-manager/netapp/2023-11-01/volumesrelocation/client.go @@ -15,7 +15,7 @@ type VolumesRelocationClient struct { } func NewVolumesRelocationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRelocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrelocation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrelocation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRelocationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumesrelocation/id_volume.go b/resource-manager/netapp/2023-11-01/volumesrelocation/id_volume.go index b304817c7c8..6d1896e16fd 100644 --- a/resource-manager/netapp/2023-11-01/volumesrelocation/id_volume.go +++ b/resource-manager/netapp/2023-11-01/volumesrelocation/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumesrelocation/version.go b/resource-manager/netapp/2023-11-01/volumesrelocation/version.go index e84ee4ecbb9..4c8b556d381 100644 --- a/resource-manager/netapp/2023-11-01/volumesrelocation/version.go +++ b/resource-manager/netapp/2023-11-01/volumesrelocation/version.go @@ -1,12 +1,10 @@ package volumesrelocation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrelocation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrelocation/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/README.md b/resource-manager/netapp/2023-11-01/volumesreplication/README.md index a2e754a7aca..c3065d3d8b3 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/README.md +++ b/resource-manager/netapp/2023-11-01/volumesreplication/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumesreplication` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/client.go b/resource-manager/netapp/2023-11-01/volumesreplication/client.go index 278506e484e..092e04c0a0d 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/client.go +++ b/resource-manager/netapp/2023-11-01/volumesreplication/client.go @@ -15,7 +15,7 @@ type VolumesReplicationClient struct { } func NewVolumesReplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesReplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesreplication", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesreplication", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesReplicationClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go b/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go index 0a7eb12df02..b2df26c0921 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go +++ b/resource-manager/netapp/2023-11-01/volumesreplication/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go b/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go index 5a7f27f7407..bed3dfeb672 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go +++ b/resource-manager/netapp/2023-11-01/volumesreplication/method_volumeslistreplications.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesListReplications(ctx context.Context, i var model ListReplications result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go b/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go index 6e7f09b9dbe..2f626c60847 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go +++ b/resource-manager/netapp/2023-11-01/volumesreplication/method_volumesreplicationstatus.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesReplicationStatus(ctx context.Context, var model ReplicationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2023-11-01/volumesreplication/version.go b/resource-manager/netapp/2023-11-01/volumesreplication/version.go index a9e89056628..60cab166be6 100644 --- a/resource-manager/netapp/2023-11-01/volumesreplication/version.go +++ b/resource-manager/netapp/2023-11-01/volumesreplication/version.go @@ -1,12 +1,10 @@ package volumesreplication -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesreplication/2023-11-01" } diff --git a/resource-manager/netapp/2023-11-01/volumesrevert/README.md b/resource-manager/netapp/2023-11-01/volumesrevert/README.md index 4b6d436978d..95d57a0d33e 100644 --- a/resource-manager/netapp/2023-11-01/volumesrevert/README.md +++ b/resource-manager/netapp/2023-11-01/volumesrevert/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-11-01/volumesrevert` Documentation -The `volumesrevert` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2023-11-01`). +The `volumesrevert` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2023-11-01/volumesrevert/client.go b/resource-manager/netapp/2023-11-01/volumesrevert/client.go index fa2bad78d7b..353b7571904 100644 --- a/resource-manager/netapp/2023-11-01/volumesrevert/client.go +++ b/resource-manager/netapp/2023-11-01/volumesrevert/client.go @@ -15,7 +15,7 @@ type VolumesRevertClient struct { } func NewVolumesRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRevertClient: %+v", err) } diff --git a/resource-manager/netapp/2023-11-01/volumesrevert/id_volume.go b/resource-manager/netapp/2023-11-01/volumesrevert/id_volume.go index 3b9e67d66c0..ac8b9d254be 100644 --- a/resource-manager/netapp/2023-11-01/volumesrevert/id_volume.go +++ b/resource-manager/netapp/2023-11-01/volumesrevert/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2023-11-01/volumesrevert/version.go b/resource-manager/netapp/2023-11-01/volumesrevert/version.go index d385e77c1ab..18eac677ec2 100644 --- a/resource-manager/netapp/2023-11-01/volumesrevert/version.go +++ b/resource-manager/netapp/2023-11-01/volumesrevert/version.go @@ -1,12 +1,10 @@ package volumesrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrevert/2023-11-01" } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/README.md b/resource-manager/netapp/2024-03-01/backuppolicy/README.md index 7d481812468..c44024d2d7a 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/README.md +++ b/resource-manager/netapp/2024-03-01/backuppolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backuppolicy` Documentation -The `backuppolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backuppolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/client.go b/resource-manager/netapp/2024-03-01/backuppolicy/client.go index 1db45e634e5..8b4fc07ad66 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/client.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/client.go @@ -15,7 +15,7 @@ type BackupPolicyClient struct { } func NewBackupPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuppolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuppolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go b/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go index 9f45aceef30..2093d326c71 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go b/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go index d722f9a676d..5700ac965f0 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go b/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go index 73667d207d3..e8ecfc1fc04 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppoliciesget.go @@ -45,7 +45,6 @@ func (c BackupPolicyClient) BackupPoliciesGet(ctx context.Context, id BackupPoli var model BackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go b/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go index 7a939318453..7932d964240 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/method_backuppolicieslist.go @@ -46,7 +46,6 @@ func (c BackupPolicyClient) BackupPoliciesList(ctx context.Context, id NetAppAcc var model BackupPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/backuppolicy/version.go b/resource-manager/netapp/2024-03-01/backuppolicy/version.go index e96943db05e..b6697aad0a1 100644 --- a/resource-manager/netapp/2024-03-01/backuppolicy/version.go +++ b/resource-manager/netapp/2024-03-01/backuppolicy/version.go @@ -1,12 +1,10 @@ package backuppolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicy/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/backups/README.md b/resource-manager/netapp/2024-03-01/backups/README.md index 5f247f25d5a..dbc9a0a9c5b 100644 --- a/resource-manager/netapp/2024-03-01/backups/README.md +++ b/resource-manager/netapp/2024-03-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/backups/client.go b/resource-manager/netapp/2024-03-01/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/netapp/2024-03-01/backups/client.go +++ b/resource-manager/netapp/2024-03-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/backups/id_backup.go b/resource-manager/netapp/2024-03-01/backups/id_backup.go index 4af4424ea14..c1767665ff6 100644 --- a/resource-manager/netapp/2024-03-01/backups/id_backup.go +++ b/resource-manager/netapp/2024-03-01/backups/id_backup.go @@ -46,7 +46,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backups/id_backupvault.go b/resource-manager/netapp/2024-03-01/backups/id_backupvault.go index 93042918533..3860a5a1050 100644 --- a/resource-manager/netapp/2024-03-01/backups/id_backupvault.go +++ b/resource-manager/netapp/2024-03-01/backups/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go b/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go index 26feaa5e8b2..2ffc4166c29 100644 --- a/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/backups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backups/id_volume.go b/resource-manager/netapp/2024-03-01/backups/id_volume.go index 839d08e459e..f3fa7ea4a05 100644 --- a/resource-manager/netapp/2024-03-01/backups/id_volume.go +++ b/resource-manager/netapp/2024-03-01/backups/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backups/method_get.go b/resource-manager/netapp/2024-03-01/backups/method_get.go index 65321ba9ef6..fe88bb84d0a 100644 --- a/resource-manager/netapp/2024-03-01/backups/method_get.go +++ b/resource-manager/netapp/2024-03-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model Backup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go b/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go index dcd2709c74f..1668fdfcf7e 100644 --- a/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go +++ b/resource-manager/netapp/2024-03-01/backups/method_getlateststatus.go @@ -46,7 +46,6 @@ func (c BackupsClient) GetLatestStatus(ctx context.Context, id VolumeId) (result var model BackupStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go b/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go index f92c1548b81..3416244ff49 100644 --- a/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go +++ b/resource-manager/netapp/2024-03-01/backups/method_listbyvault.go @@ -39,6 +39,7 @@ func (o ListByVaultOperationOptions) ToHeaders() *client.Headers { func (o ListByVaultOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2024-03-01/backups/version.go b/resource-manager/netapp/2024-03-01/backups/version.go index 4595bccaa3c..434265f8cb9 100644 --- a/resource-manager/netapp/2024-03-01/backups/version.go +++ b/resource-manager/netapp/2024-03-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/backupvaults/README.md b/resource-manager/netapp/2024-03-01/backupvaults/README.md index e808dcbd596..55383b6d2ca 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/README.md +++ b/resource-manager/netapp/2024-03-01/backupvaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/backupvaults` Documentation -The `backupvaults` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `backupvaults` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/backupvaults/client.go b/resource-manager/netapp/2024-03-01/backupvaults/client.go index 7a4dd932170..57d96b431b5 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/client.go +++ b/resource-manager/netapp/2024-03-01/backupvaults/client.go @@ -15,7 +15,7 @@ type BackupVaultsClient struct { } func NewBackupVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupVaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupvaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupvaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupVaultsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go b/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go index de1952d7834..7120a8d90f0 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go +++ b/resource-manager/netapp/2024-03-01/backupvaults/id_backupvault.go @@ -44,7 +44,7 @@ func ParseBackupVaultID(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupVaultIDInsensitively(input string) (*BackupVaultId, error) { } id := BackupVaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go b/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go index 2096ade91b3..bd83fc9ddfd 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/backupvaults/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/backupvaults/method_get.go b/resource-manager/netapp/2024-03-01/backupvaults/method_get.go index e3c1b3c6952..6cd544f7ca9 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/method_get.go +++ b/resource-manager/netapp/2024-03-01/backupvaults/method_get.go @@ -45,7 +45,6 @@ func (c BackupVaultsClient) Get(ctx context.Context, id BackupVaultId) (result G var model BackupVault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/backupvaults/version.go b/resource-manager/netapp/2024-03-01/backupvaults/version.go index 029ef1334e2..692bfdc1257 100644 --- a/resource-manager/netapp/2024-03-01/backupvaults/version.go +++ b/resource-manager/netapp/2024-03-01/backupvaults/version.go @@ -1,12 +1,10 @@ package backupvaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupvaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupvaults/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/capacitypools/README.md b/resource-manager/netapp/2024-03-01/capacitypools/README.md index 59cd65e46ce..0c9929adf34 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/README.md +++ b/resource-manager/netapp/2024-03-01/capacitypools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/capacitypools` Documentation -The `capacitypools` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `capacitypools` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/capacitypools/client.go b/resource-manager/netapp/2024-03-01/capacitypools/client.go index 3de33a3dc5b..d7a8be4e076 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/client.go +++ b/resource-manager/netapp/2024-03-01/capacitypools/client.go @@ -15,7 +15,7 @@ type CapacityPoolsClient struct { } func NewCapacityPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacitypools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacitypools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacityPoolsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go b/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go index 30b27305799..de2fe4626bf 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go +++ b/resource-manager/netapp/2024-03-01/capacitypools/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go b/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go index a77679932dd..0880024ed89 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/capacitypools/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go b/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go index d2f91e09044..f9d5fcc8531 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go +++ b/resource-manager/netapp/2024-03-01/capacitypools/method_poolsget.go @@ -45,7 +45,6 @@ func (c CapacityPoolsClient) PoolsGet(ctx context.Context, id CapacityPoolId) (r var model CapacityPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/capacitypools/version.go b/resource-manager/netapp/2024-03-01/capacitypools/version.go index a54b7e07c21..9dc11f4a92c 100644 --- a/resource-manager/netapp/2024-03-01/capacitypools/version.go +++ b/resource-manager/netapp/2024-03-01/capacitypools/version.go @@ -1,12 +1,10 @@ package capacitypools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacitypools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacitypools/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/filelocks/README.md b/resource-manager/netapp/2024-03-01/filelocks/README.md index b23c5f8ae96..b5eb4088164 100644 --- a/resource-manager/netapp/2024-03-01/filelocks/README.md +++ b/resource-manager/netapp/2024-03-01/filelocks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/filelocks` Documentation -The `filelocks` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `filelocks` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/filelocks/client.go b/resource-manager/netapp/2024-03-01/filelocks/client.go index 7f39f5ef46b..56c8b4fc903 100644 --- a/resource-manager/netapp/2024-03-01/filelocks/client.go +++ b/resource-manager/netapp/2024-03-01/filelocks/client.go @@ -15,7 +15,7 @@ type FileLocksClient struct { } func NewFileLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*FileLocksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filelocks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filelocks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileLocksClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/filelocks/id_volume.go b/resource-manager/netapp/2024-03-01/filelocks/id_volume.go index 8f6a5960750..bd705c9fd6a 100644 --- a/resource-manager/netapp/2024-03-01/filelocks/id_volume.go +++ b/resource-manager/netapp/2024-03-01/filelocks/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/filelocks/version.go b/resource-manager/netapp/2024-03-01/filelocks/version.go index d61af9ef54a..0a49b15f626 100644 --- a/resource-manager/netapp/2024-03-01/filelocks/version.go +++ b/resource-manager/netapp/2024-03-01/filelocks/version.go @@ -1,12 +1,10 @@ package filelocks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filelocks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filelocks/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/README.md b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/README.md index 0c5dcb7dd73..331f0f193d3 100644 --- a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/README.md +++ b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/groupidlistforldapuser` Documentation -The `groupidlistforldapuser` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `groupidlistforldapuser` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/client.go b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/client.go index b954d6fe7dc..b098cba0063 100644 --- a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/client.go +++ b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/client.go @@ -15,7 +15,7 @@ type GroupIdListForLDAPUserClient struct { } func NewGroupIdListForLDAPUserClientWithBaseURI(sdkApi sdkEnv.Api) (*GroupIdListForLDAPUserClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groupidlistforldapuser", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroupIdListForLDAPUserClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/id_volume.go b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/id_volume.go index 74868cea51a..1174627e607 100644 --- a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/id_volume.go +++ b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/version.go b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/version.go index 89615563fb9..c925248656c 100644 --- a/resource-manager/netapp/2024-03-01/groupidlistforldapuser/version.go +++ b/resource-manager/netapp/2024-03-01/groupidlistforldapuser/version.go @@ -1,12 +1,10 @@ package groupidlistforldapuser -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groupidlistforldapuser/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groupidlistforldapuser/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/netappaccounts/README.md b/resource-manager/netapp/2024-03-01/netappaccounts/README.md index 553ff9ba984..2b7ab6fc1b6 100644 --- a/resource-manager/netapp/2024-03-01/netappaccounts/README.md +++ b/resource-manager/netapp/2024-03-01/netappaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappaccounts` Documentation -The `netappaccounts` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `netappaccounts` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/netappaccounts/client.go b/resource-manager/netapp/2024-03-01/netappaccounts/client.go index 172f1218e2c..240204954a3 100644 --- a/resource-manager/netapp/2024-03-01/netappaccounts/client.go +++ b/resource-manager/netapp/2024-03-01/netappaccounts/client.go @@ -15,7 +15,7 @@ type NetAppAccountsClient struct { } func NewNetAppAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppAccountsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go b/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go index a93e2cd2ea8..05b601e3c06 100644 --- a/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/netappaccounts/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go b/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go index dc67125153f..c1ec9504bf9 100644 --- a/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go +++ b/resource-manager/netapp/2024-03-01/netappaccounts/method_accountsget.go @@ -45,7 +45,6 @@ func (c NetAppAccountsClient) AccountsGet(ctx context.Context, id NetAppAccountI var model NetAppAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappaccounts/version.go b/resource-manager/netapp/2024-03-01/netappaccounts/version.go index e549100b56a..ec5f35de42d 100644 --- a/resource-manager/netapp/2024-03-01/netappaccounts/version.go +++ b/resource-manager/netapp/2024-03-01/netappaccounts/version.go @@ -1,12 +1,10 @@ package netappaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappaccounts/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/netappresource/README.md b/resource-manager/netapp/2024-03-01/netappresource/README.md index 57b23990cc3..fd65a597b65 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/README.md +++ b/resource-manager/netapp/2024-03-01/netappresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/netappresource` Documentation -The `netappresource` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `netappresource` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/netappresource/client.go b/resource-manager/netapp/2024-03-01/netappresource/client.go index e02988617d8..0bfc3f358ce 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/client.go +++ b/resource-manager/netapp/2024-03-01/netappresource/client.go @@ -15,7 +15,7 @@ type NetAppResourceClient struct { } func NewNetAppResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*NetAppResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "netappresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "netappresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetAppResourceClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/netappresource/id_location.go b/resource-manager/netapp/2024-03-01/netappresource/id_location.go index b6b91bc802d..b9d650f4de7 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/id_location.go +++ b/resource-manager/netapp/2024-03-01/netappresource/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/netappresource/id_quotalimit.go b/resource-manager/netapp/2024-03-01/netappresource/id_quotalimit.go index 0088f16b365..51baeccd764 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/id_quotalimit.go +++ b/resource-manager/netapp/2024-03-01/netappresource/id_quotalimit.go @@ -42,7 +42,7 @@ func ParseQuotaLimitID(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQuotaLimitIDInsensitively(input string) (*QuotaLimitId, error) { } id := QuotaLimitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_checkfilepathavailability.go b/resource-manager/netapp/2024-03-01/netappresource/method_checkfilepathavailability.go index 2710dd52807..fcd3daa5d29 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_checkfilepathavailability.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_checkfilepathavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckFilePathAvailability(ctx context.Context, id var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_checknameavailability.go b/resource-manager/netapp/2024-03-01/netappresource/method_checknameavailability.go index 3c7ac9c5704..788eb6035e5 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_checknameavailability.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckNameAvailability(ctx context.Context, id Loca var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_checkquotaavailability.go b/resource-manager/netapp/2024-03-01/netappresource/method_checkquotaavailability.go index 68f31ded84e..75b1541b588 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_checkquotaavailability.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_checkquotaavailability.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) CheckQuotaAvailability(ctx context.Context, id Loc var model CheckAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_querynetworksiblingset.go b/resource-manager/netapp/2024-03-01/netappresource/method_querynetworksiblingset.go index 9707443382a..1777bea9e98 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_querynetworksiblingset.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_querynetworksiblingset.go @@ -50,7 +50,6 @@ func (c NetAppResourceClient) QueryNetworkSiblingSet(ctx context.Context, id Loc var model NetworkSiblingSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_queryregioninfo.go b/resource-manager/netapp/2024-03-01/netappresource/method_queryregioninfo.go index ef1715019e4..dc45f121299 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_queryregioninfo.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_queryregioninfo.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QueryRegionInfo(ctx context.Context, id LocationId var model RegionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitsget.go b/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitsget.go index 721f649f0b2..cd1492d82a8 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitsget.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitsget.go @@ -45,7 +45,6 @@ func (c NetAppResourceClient) QuotaLimitsGet(ctx context.Context, id QuotaLimitI var model SubscriptionQuotaItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitslist.go b/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitslist.go index eba38d4fa9e..81645f131b0 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitslist.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_quotalimitslist.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) QuotaLimitsList(ctx context.Context, id LocationId var model SubscriptionQuotaItemList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/method_regioninfosget.go b/resource-manager/netapp/2024-03-01/netappresource/method_regioninfosget.go index 61840d90ef2..89e4991022d 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/method_regioninfosget.go +++ b/resource-manager/netapp/2024-03-01/netappresource/method_regioninfosget.go @@ -46,7 +46,6 @@ func (c NetAppResourceClient) RegionInfosGet(ctx context.Context, id LocationId) var model RegionInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/netappresource/version.go b/resource-manager/netapp/2024-03-01/netappresource/version.go index 65cb7dbc3f2..e166b939240 100644 --- a/resource-manager/netapp/2024-03-01/netappresource/version.go +++ b/resource-manager/netapp/2024-03-01/netappresource/version.go @@ -1,12 +1,10 @@ package netappresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/netappresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/netappresource/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/poolchange/README.md b/resource-manager/netapp/2024-03-01/poolchange/README.md index 27bcb9a67cc..2319659fb53 100644 --- a/resource-manager/netapp/2024-03-01/poolchange/README.md +++ b/resource-manager/netapp/2024-03-01/poolchange/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/poolchange` Documentation -The `poolchange` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `poolchange` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/poolchange/client.go b/resource-manager/netapp/2024-03-01/poolchange/client.go index 270c25028c2..a83eadc3fe1 100644 --- a/resource-manager/netapp/2024-03-01/poolchange/client.go +++ b/resource-manager/netapp/2024-03-01/poolchange/client.go @@ -15,7 +15,7 @@ type PoolChangeClient struct { } func NewPoolChangeClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolChangeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "poolchange", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "poolchange", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PoolChangeClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/poolchange/id_volume.go b/resource-manager/netapp/2024-03-01/poolchange/id_volume.go index 0e74fdf5585..913f22f8d49 100644 --- a/resource-manager/netapp/2024-03-01/poolchange/id_volume.go +++ b/resource-manager/netapp/2024-03-01/poolchange/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/poolchange/version.go b/resource-manager/netapp/2024-03-01/poolchange/version.go index 8ef06636dc2..8a725147d13 100644 --- a/resource-manager/netapp/2024-03-01/poolchange/version.go +++ b/resource-manager/netapp/2024-03-01/poolchange/version.go @@ -1,12 +1,10 @@ package poolchange -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/poolchange/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/poolchange/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/resetcifspassword/client.go b/resource-manager/netapp/2024-03-01/resetcifspassword/client.go index 2d17ccc3976..ba2cbb22bb0 100644 --- a/resource-manager/netapp/2024-03-01/resetcifspassword/client.go +++ b/resource-manager/netapp/2024-03-01/resetcifspassword/client.go @@ -15,7 +15,7 @@ type ResetCifsPasswordClient struct { } func NewResetCifsPasswordClientWithBaseURI(sdkApi sdkEnv.Api) (*ResetCifsPasswordClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resetcifspassword", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resetcifspassword", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResetCifsPasswordClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/resetcifspassword/id_volume.go b/resource-manager/netapp/2024-03-01/resetcifspassword/id_volume.go index b2cdcb5d95a..cc04516bb06 100644 --- a/resource-manager/netapp/2024-03-01/resetcifspassword/id_volume.go +++ b/resource-manager/netapp/2024-03-01/resetcifspassword/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/resetcifspassword/version.go b/resource-manager/netapp/2024-03-01/resetcifspassword/version.go index 21eaccac9e0..0843435d146 100644 --- a/resource-manager/netapp/2024-03-01/resetcifspassword/version.go +++ b/resource-manager/netapp/2024-03-01/resetcifspassword/version.go @@ -1,12 +1,10 @@ package resetcifspassword -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resetcifspassword/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resetcifspassword/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/restore/README.md b/resource-manager/netapp/2024-03-01/restore/README.md index 6b18d146f6e..81eb93e7d8e 100644 --- a/resource-manager/netapp/2024-03-01/restore/README.md +++ b/resource-manager/netapp/2024-03-01/restore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/restore` Documentation -The `restore` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `restore` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/restore/client.go b/resource-manager/netapp/2024-03-01/restore/client.go index 97fa355d7db..1ce453be7c3 100644 --- a/resource-manager/netapp/2024-03-01/restore/client.go +++ b/resource-manager/netapp/2024-03-01/restore/client.go @@ -15,7 +15,7 @@ type RestoreClient struct { } func NewRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*RestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestoreClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/restore/id_volume.go b/resource-manager/netapp/2024-03-01/restore/id_volume.go index 64d9eacc3ac..67d5969e622 100644 --- a/resource-manager/netapp/2024-03-01/restore/id_volume.go +++ b/resource-manager/netapp/2024-03-01/restore/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/restore/method_backupsgetvolumelatestrestorestatus.go b/resource-manager/netapp/2024-03-01/restore/method_backupsgetvolumelatestrestorestatus.go index f8d846b552b..42b453d7f1a 100644 --- a/resource-manager/netapp/2024-03-01/restore/method_backupsgetvolumelatestrestorestatus.go +++ b/resource-manager/netapp/2024-03-01/restore/method_backupsgetvolumelatestrestorestatus.go @@ -46,7 +46,6 @@ func (c RestoreClient) BackupsGetVolumeLatestRestoreStatus(ctx context.Context, var model RestoreStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/restore/version.go b/resource-manager/netapp/2024-03-01/restore/version.go index 085dc6107a1..ab95e7a75bf 100644 --- a/resource-manager/netapp/2024-03-01/restore/version.go +++ b/resource-manager/netapp/2024-03-01/restore/version.go @@ -1,12 +1,10 @@ package restore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restore/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md b/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md index 7ada4140483..598024461bd 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicy` Documentation -The `snapshotpolicy` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `snapshotpolicy` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go index eebb8c7b8da..e92eedba749 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyClient struct { } func NewSnapshotPolicyClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicy", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicy", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go index 51822e9aaf3..5f87f814f94 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go index c007ae89039..4c647b0e54a 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go index f0aaa54617e..8210e2fad73 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciescreate.go @@ -50,7 +50,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesCreate(ctx context.Context, id Sna var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go index 53aa8b06361..15d2b69d7c1 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpoliciesget.go @@ -45,7 +45,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesGet(ctx context.Context, id Snapsh var model SnapshotPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go index 50c611c5cb0..eca667d1eb4 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/method_snapshotpolicieslist.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyClient) SnapshotPoliciesList(ctx context.Context, id NetAp var model SnapshotPoliciesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go b/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go index 53f4f1296f1..b0ad9aef745 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicy/version.go @@ -1,12 +1,10 @@ package snapshotpolicy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicy/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/README.md b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/README.md index 7926d5d0acd..ad0bbc9e48b 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/README.md +++ b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes` Documentation -The `snapshotpolicylistvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `snapshotpolicylistvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/client.go b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/client.go index 047d79a12c3..6098b871f64 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/client.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/client.go @@ -15,7 +15,7 @@ type SnapshotPolicyListVolumesClient struct { } func NewSnapshotPolicyListVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotPolicyListVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshotpolicylistvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotPolicyListVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/id_snapshotpolicy.go b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/id_snapshotpolicy.go index 1b30e761faf..3c59714333d 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/id_snapshotpolicy.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/id_snapshotpolicy.go @@ -44,7 +44,7 @@ func ParseSnapshotPolicyID(input string) (*SnapshotPolicyId, error) { } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotPolicyIDInsensitively(input string) (*SnapshotPolicyId, error) } id := SnapshotPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go index 59512dd2794..88466bae80e 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/method_snapshotpolicieslistvolumes.go @@ -46,7 +46,6 @@ func (c SnapshotPolicyListVolumesClient) SnapshotPoliciesListVolumes(ctx context var model SnapshotPolicyVolumeList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/version.go b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/version.go index 5b5b0c8eec5..4c3a7387cd0 100644 --- a/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/version.go +++ b/resource-manager/netapp/2024-03-01/snapshotpolicylistvolumes/version.go @@ -1,12 +1,10 @@ package snapshotpolicylistvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshotpolicylistvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshotpolicylistvolumes/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/snapshots/README.md b/resource-manager/netapp/2024-03-01/snapshots/README.md index 1fc94878173..eda2aa03d9a 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/README.md +++ b/resource-manager/netapp/2024-03-01/snapshots/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/snapshots` Documentation -The `snapshots` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `snapshots` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/snapshots/client.go b/resource-manager/netapp/2024-03-01/snapshots/client.go index 620b7900eab..678a64470aa 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/client.go +++ b/resource-manager/netapp/2024-03-01/snapshots/client.go @@ -15,7 +15,7 @@ type SnapshotsClient struct { } func NewSnapshotsClientWithBaseURI(sdkApi sdkEnv.Api) (*SnapshotsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "snapshots", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "snapshots", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SnapshotsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go b/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go index 1712cf99186..d01e331065a 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go +++ b/resource-manager/netapp/2024-03-01/snapshots/id_snapshot.go @@ -48,7 +48,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/snapshots/id_volume.go b/resource-manager/netapp/2024-03-01/snapshots/id_volume.go index 1d8f9e61805..40d4cc5b6b1 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/id_volume.go +++ b/resource-manager/netapp/2024-03-01/snapshots/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/snapshots/method_get.go b/resource-manager/netapp/2024-03-01/snapshots/method_get.go index d020538006a..68b676f0115 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/method_get.go +++ b/resource-manager/netapp/2024-03-01/snapshots/method_get.go @@ -45,7 +45,6 @@ func (c SnapshotsClient) Get(ctx context.Context, id SnapshotId) (result GetOper var model Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshots/method_list.go b/resource-manager/netapp/2024-03-01/snapshots/method_list.go index d60b22e27a9..77c6da22159 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/method_list.go +++ b/resource-manager/netapp/2024-03-01/snapshots/method_list.go @@ -46,7 +46,6 @@ func (c SnapshotsClient) List(ctx context.Context, id VolumeId) (result ListOper var model SnapshotsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/snapshots/version.go b/resource-manager/netapp/2024-03-01/snapshots/version.go index 2ca03be1451..8dd79283032 100644 --- a/resource-manager/netapp/2024-03-01/snapshots/version.go +++ b/resource-manager/netapp/2024-03-01/snapshots/version.go @@ -1,12 +1,10 @@ package snapshots -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/snapshots/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/snapshots/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/subvolumes/README.md b/resource-manager/netapp/2024-03-01/subvolumes/README.md index cc24bb71be2..5a88e026b47 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/README.md +++ b/resource-manager/netapp/2024-03-01/subvolumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/subvolumes` Documentation -The `subvolumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `subvolumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/subvolumes/client.go b/resource-manager/netapp/2024-03-01/subvolumes/client.go index b675258d906..051d1e4b2ba 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/client.go +++ b/resource-manager/netapp/2024-03-01/subvolumes/client.go @@ -15,7 +15,7 @@ type SubVolumesClient struct { } func NewSubVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubVolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subvolumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subvolumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubVolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/subvolumes/id_subvolume.go b/resource-manager/netapp/2024-03-01/subvolumes/id_subvolume.go index 5c35777037a..dff6135cbbe 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/id_subvolume.go +++ b/resource-manager/netapp/2024-03-01/subvolumes/id_subvolume.go @@ -48,7 +48,7 @@ func ParseSubVolumeID(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSubVolumeIDInsensitively(input string) (*SubVolumeId, error) { } id := SubVolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/subvolumes/id_volume.go b/resource-manager/netapp/2024-03-01/subvolumes/id_volume.go index 2b24cb1a31f..36a08c14c73 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/id_volume.go +++ b/resource-manager/netapp/2024-03-01/subvolumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/subvolumes/method_get.go b/resource-manager/netapp/2024-03-01/subvolumes/method_get.go index 455566fe22c..20f1ee49120 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/method_get.go +++ b/resource-manager/netapp/2024-03-01/subvolumes/method_get.go @@ -45,7 +45,6 @@ func (c SubVolumesClient) Get(ctx context.Context, id SubVolumeId) (result GetOp var model SubvolumeInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/subvolumes/version.go b/resource-manager/netapp/2024-03-01/subvolumes/version.go index 464cfe80383..f4f5fcbffcd 100644 --- a/resource-manager/netapp/2024-03-01/subvolumes/version.go +++ b/resource-manager/netapp/2024-03-01/subvolumes/version.go @@ -1,12 +1,10 @@ package subvolumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subvolumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subvolumes/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/README.md b/resource-manager/netapp/2024-03-01/volumegroups/README.md index cd133975cd8..7b14d6e923a 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/README.md +++ b/resource-manager/netapp/2024-03-01/volumegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumegroups` Documentation -The `volumegroups` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumegroups` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumegroups/client.go b/resource-manager/netapp/2024-03-01/volumegroups/client.go index a117e697f04..580e5ac9fb8 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/client.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/client.go @@ -15,7 +15,7 @@ type VolumeGroupsClient struct { } func NewVolumeGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeGroupsClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go b/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go index e41dc1600a0..d975b3265d2 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/id_netappaccount.go @@ -42,7 +42,7 @@ func ParseNetAppAccountID(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetAppAccountIDInsensitively(input string) (*NetAppAccountId, error) { } id := NetAppAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go b/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go index f42fe51614d..f71aadaf630 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/id_volumegroup.go @@ -44,7 +44,7 @@ func ParseVolumeGroupID(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVolumeGroupIDInsensitively(input string) (*VolumeGroupId, error) { } id := VolumeGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/method_get.go b/resource-manager/netapp/2024-03-01/volumegroups/method_get.go index 981869d83d5..59130918900 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/method_get.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/method_get.go @@ -45,7 +45,6 @@ func (c VolumeGroupsClient) Get(ctx context.Context, id VolumeGroupId) (result G var model VolumeGroupDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go b/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go index a97d0887201..29dee764979 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/method_listbynetappaccount.go @@ -46,7 +46,6 @@ func (c VolumeGroupsClient) ListByNetAppAccount(ctx context.Context, id NetAppAc var model VolumeGroupList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumegroups/version.go b/resource-manager/netapp/2024-03-01/volumegroups/version.go index be6400a3a2b..7267a3b9412 100644 --- a/resource-manager/netapp/2024-03-01/volumegroups/version.go +++ b/resource-manager/netapp/2024-03-01/volumegroups/version.go @@ -1,12 +1,10 @@ package volumegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumegroups/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/README.md b/resource-manager/netapp/2024-03-01/volumequotarules/README.md index b001e5b7b26..0a8038c0eb5 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/README.md +++ b/resource-manager/netapp/2024-03-01/volumequotarules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumequotarules` Documentation -The `volumequotarules` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumequotarules` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/client.go b/resource-manager/netapp/2024-03-01/volumequotarules/client.go index c6c70e112e0..b42efdd36e2 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/client.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/client.go @@ -15,7 +15,7 @@ type VolumeQuotaRulesClient struct { } func NewVolumeQuotaRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumeQuotaRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumequotarules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumequotarules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumeQuotaRulesClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go b/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go index 6dad4e030b2..20b660aca21 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go b/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go index e61ab571acc..67093f4e3c2 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/id_volumequotarule.go @@ -48,7 +48,7 @@ func ParseVolumeQuotaRuleID(input string) (*VolumeQuotaRuleId, error) { } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVolumeQuotaRuleIDInsensitively(input string) (*VolumeQuotaRuleId, erro } id := VolumeQuotaRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go b/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go index 88aa05a3709..0c82ebc839b 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/method_get.go @@ -45,7 +45,6 @@ func (c VolumeQuotaRulesClient) Get(ctx context.Context, id VolumeQuotaRuleId) ( var model VolumeQuotaRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go b/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go index ed643e0c5b0..87cd029de34 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/method_listbyvolume.go @@ -46,7 +46,6 @@ func (c VolumeQuotaRulesClient) ListByVolume(ctx context.Context, id VolumeId) ( var model VolumeQuotaRulesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumequotarules/version.go b/resource-manager/netapp/2024-03-01/volumequotarules/version.go index 7a5fa921076..078a65c7f3d 100644 --- a/resource-manager/netapp/2024-03-01/volumequotarules/version.go +++ b/resource-manager/netapp/2024-03-01/volumequotarules/version.go @@ -1,12 +1,10 @@ package volumequotarules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumequotarules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumequotarules/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumes/README.md b/resource-manager/netapp/2024-03-01/volumes/README.md index b2594356a19..95f15324c10 100644 --- a/resource-manager/netapp/2024-03-01/volumes/README.md +++ b/resource-manager/netapp/2024-03-01/volumes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumes` Documentation -The `volumes` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumes` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumes/client.go b/resource-manager/netapp/2024-03-01/volumes/client.go index 9f34fb4a6eb..6ead8cc3e7d 100644 --- a/resource-manager/netapp/2024-03-01/volumes/client.go +++ b/resource-manager/netapp/2024-03-01/volumes/client.go @@ -15,7 +15,7 @@ type VolumesClient struct { } func NewVolumesClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go b/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go index baea2acd856..f9074a3f41f 100644 --- a/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go +++ b/resource-manager/netapp/2024-03-01/volumes/id_capacitypool.go @@ -44,7 +44,7 @@ func ParseCapacityPoolID(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCapacityPoolIDInsensitively(input string) (*CapacityPoolId, error) { } id := CapacityPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumes/id_volume.go b/resource-manager/netapp/2024-03-01/volumes/id_volume.go index 2144d7750a2..294338c0f1d 100644 --- a/resource-manager/netapp/2024-03-01/volumes/id_volume.go +++ b/resource-manager/netapp/2024-03-01/volumes/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumes/method_delete.go b/resource-manager/netapp/2024-03-01/volumes/method_delete.go index cf50dbfa90f..c449fa7d2b8 100644 --- a/resource-manager/netapp/2024-03-01/volumes/method_delete.go +++ b/resource-manager/netapp/2024-03-01/volumes/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/netapp/2024-03-01/volumes/method_get.go b/resource-manager/netapp/2024-03-01/volumes/method_get.go index a62cc7f84a3..1f99d951818 100644 --- a/resource-manager/netapp/2024-03-01/volumes/method_get.go +++ b/resource-manager/netapp/2024-03-01/volumes/method_get.go @@ -45,7 +45,6 @@ func (c VolumesClient) Get(ctx context.Context, id VolumeId) (result GetOperatio var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumes/version.go b/resource-manager/netapp/2024-03-01/volumes/version.go index 6b764b88e87..76b4004cf74 100644 --- a/resource-manager/netapp/2024-03-01/volumes/version.go +++ b/resource-manager/netapp/2024-03-01/volumes/version.go @@ -1,12 +1,10 @@ package volumes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumes/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumesrelocation/README.md b/resource-manager/netapp/2024-03-01/volumesrelocation/README.md index 6d60ea49e9f..a505b30a58b 100644 --- a/resource-manager/netapp/2024-03-01/volumesrelocation/README.md +++ b/resource-manager/netapp/2024-03-01/volumesrelocation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesrelocation` Documentation -The `volumesrelocation` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumesrelocation` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumesrelocation/client.go b/resource-manager/netapp/2024-03-01/volumesrelocation/client.go index 9170c859f6f..468673aa176 100644 --- a/resource-manager/netapp/2024-03-01/volumesrelocation/client.go +++ b/resource-manager/netapp/2024-03-01/volumesrelocation/client.go @@ -15,7 +15,7 @@ type VolumesRelocationClient struct { } func NewVolumesRelocationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRelocationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrelocation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrelocation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRelocationClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumesrelocation/id_volume.go b/resource-manager/netapp/2024-03-01/volumesrelocation/id_volume.go index b304817c7c8..6d1896e16fd 100644 --- a/resource-manager/netapp/2024-03-01/volumesrelocation/id_volume.go +++ b/resource-manager/netapp/2024-03-01/volumesrelocation/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumesrelocation/version.go b/resource-manager/netapp/2024-03-01/volumesrelocation/version.go index 58247bc0594..87e72ac3409 100644 --- a/resource-manager/netapp/2024-03-01/volumesrelocation/version.go +++ b/resource-manager/netapp/2024-03-01/volumesrelocation/version.go @@ -1,12 +1,10 @@ package volumesrelocation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrelocation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrelocation/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/README.md b/resource-manager/netapp/2024-03-01/volumesreplication/README.md index 345be2df723..787bfb4f393 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/README.md +++ b/resource-manager/netapp/2024-03-01/volumesreplication/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesreplication` Documentation -The `volumesreplication` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumesreplication` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/client.go b/resource-manager/netapp/2024-03-01/volumesreplication/client.go index 278506e484e..092e04c0a0d 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/client.go +++ b/resource-manager/netapp/2024-03-01/volumesreplication/client.go @@ -15,7 +15,7 @@ type VolumesReplicationClient struct { } func NewVolumesReplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesReplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesreplication", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesreplication", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesReplicationClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go b/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go index 0a7eb12df02..b2df26c0921 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go +++ b/resource-manager/netapp/2024-03-01/volumesreplication/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go b/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go index 5a7f27f7407..bed3dfeb672 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go +++ b/resource-manager/netapp/2024-03-01/volumesreplication/method_volumeslistreplications.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesListReplications(ctx context.Context, i var model ListReplications result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go b/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go index 6e7f09b9dbe..2f626c60847 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go +++ b/resource-manager/netapp/2024-03-01/volumesreplication/method_volumesreplicationstatus.go @@ -46,7 +46,6 @@ func (c VolumesReplicationClient) VolumesReplicationStatus(ctx context.Context, var model ReplicationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/netapp/2024-03-01/volumesreplication/version.go b/resource-manager/netapp/2024-03-01/volumesreplication/version.go index 9ec37edb8f3..2ce59d52eb4 100644 --- a/resource-manager/netapp/2024-03-01/volumesreplication/version.go +++ b/resource-manager/netapp/2024-03-01/volumesreplication/version.go @@ -1,12 +1,10 @@ package volumesreplication -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesreplication/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesreplication/2024-03-01" } diff --git a/resource-manager/netapp/2024-03-01/volumesrevert/README.md b/resource-manager/netapp/2024-03-01/volumesrevert/README.md index 26cb2317d5f..1868ad1a005 100644 --- a/resource-manager/netapp/2024-03-01/volumesrevert/README.md +++ b/resource-manager/netapp/2024-03-01/volumesrevert/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2024-03-01/volumesrevert` Documentation -The `volumesrevert` SDK allows for interaction with the Azure Resource Manager Service `netapp` (API Version `2024-03-01`). +The `volumesrevert` SDK allows for interaction with Azure Resource Manager `netapp` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/netapp/2024-03-01/volumesrevert/client.go b/resource-manager/netapp/2024-03-01/volumesrevert/client.go index fa2bad78d7b..353b7571904 100644 --- a/resource-manager/netapp/2024-03-01/volumesrevert/client.go +++ b/resource-manager/netapp/2024-03-01/volumesrevert/client.go @@ -15,7 +15,7 @@ type VolumesRevertClient struct { } func NewVolumesRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*VolumesRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "volumesrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "volumesrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VolumesRevertClient: %+v", err) } diff --git a/resource-manager/netapp/2024-03-01/volumesrevert/id_volume.go b/resource-manager/netapp/2024-03-01/volumesrevert/id_volume.go index 3b9e67d66c0..ac8b9d254be 100644 --- a/resource-manager/netapp/2024-03-01/volumesrevert/id_volume.go +++ b/resource-manager/netapp/2024-03-01/volumesrevert/id_volume.go @@ -46,7 +46,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/netapp/2024-03-01/volumesrevert/version.go b/resource-manager/netapp/2024-03-01/volumesrevert/version.go index b5a23fd1150..f64ee994463 100644 --- a/resource-manager/netapp/2024-03-01/volumesrevert/version.go +++ b/resource-manager/netapp/2024-03-01/volumesrevert/version.go @@ -1,12 +1,10 @@ package volumesrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/volumesrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/volumesrevert/2024-03-01" } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/README.md b/resource-manager/network/2022-07-01/adminrulecollections/README.md index 6dde6288cea..94c92e9f72e 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/README.md +++ b/resource-manager/network/2022-07-01/adminrulecollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/adminrulecollections` Documentation -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `adminrulecollections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/adminrulecollections/client.go b/resource-manager/network/2022-07-01/adminrulecollections/client.go index adbf2674d97..a0e144b1d96 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/client.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/client.go @@ -15,7 +15,7 @@ type AdminRuleCollectionsClient struct { } func NewAdminRuleCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrulecollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrulecollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2022-07-01/adminrulecollections/id_rulecollection.go index 5c84e59671e..9e9a196b29e 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/id_rulecollection.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2022-07-01/adminrulecollections/id_securityadminconfiguration.go index b8186efef3b..d4a126ec41b 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/id_securityadminconfiguration.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2022-07-01/adminrulecollections/method_createorupdate.go index 67a6db6eb7b..00810feb46a 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleC var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/method_delete.go b/resource-manager/network/2022-07-01/adminrulecollections/method_delete.go index ec55f3fa7e6..68d0021749b 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/method_delete.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/method_get.go b/resource-manager/network/2022-07-01/adminrulecollections/method_get.go index 8beb93c5eca..1aec0f98a6a 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/method_get.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/method_get.go @@ -45,7 +45,6 @@ func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/method_list.go b/resource-manager/network/2022-07-01/adminrulecollections/method_list.go index f4b9bfcdd61..2ef5b46d0a4 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/method_list.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/adminrulecollections/version.go b/resource-manager/network/2022-07-01/adminrulecollections/version.go index 0f0b6531920..f59b334ed62 100644 --- a/resource-manager/network/2022-07-01/adminrulecollections/version.go +++ b/resource-manager/network/2022-07-01/adminrulecollections/version.go @@ -1,12 +1,10 @@ package adminrulecollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrulecollections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/adminrules/README.md b/resource-manager/network/2022-07-01/adminrules/README.md index 94ca871cecb..d9fd6ac73e9 100644 --- a/resource-manager/network/2022-07-01/adminrules/README.md +++ b/resource-manager/network/2022-07-01/adminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/adminrules` Documentation -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `adminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/adminrules/client.go b/resource-manager/network/2022-07-01/adminrules/client.go index 40da5b4d0a4..811271711b6 100644 --- a/resource-manager/network/2022-07-01/adminrules/client.go +++ b/resource-manager/network/2022-07-01/adminrules/client.go @@ -15,7 +15,7 @@ type AdminRulesClient struct { } func NewAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/adminrules/id_rule.go b/resource-manager/network/2022-07-01/adminrules/id_rule.go index 3b132449062..35d0bf9900c 100644 --- a/resource-manager/network/2022-07-01/adminrules/id_rule.go +++ b/resource-manager/network/2022-07-01/adminrules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/adminrules/id_rulecollection.go b/resource-manager/network/2022-07-01/adminrules/id_rulecollection.go index 6dd9dd5b0a8..71e436de80b 100644 --- a/resource-manager/network/2022-07-01/adminrules/id_rulecollection.go +++ b/resource-manager/network/2022-07-01/adminrules/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/adminrules/method_createorupdate.go b/resource-manager/network/2022-07-01/adminrules/method_createorupdate.go index d936a5666f1..250f646ce08 100644 --- a/resource-manager/network/2022-07-01/adminrules/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/adminrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input B if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2022-07-01/adminrules/method_delete.go b/resource-manager/network/2022-07-01/adminrules/method_delete.go index 9b07dbc4a79..c5deb3a7b1f 100644 --- a/resource-manager/network/2022-07-01/adminrules/method_delete.go +++ b/resource-manager/network/2022-07-01/adminrules/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/adminrules/method_get.go b/resource-manager/network/2022-07-01/adminrules/method_get.go index 94337a0e139..52f80e411e8 100644 --- a/resource-manager/network/2022-07-01/adminrules/method_get.go +++ b/resource-manager/network/2022-07-01/adminrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // Get ... @@ -48,11 +48,11 @@ func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2022-07-01/adminrules/method_list.go b/resource-manager/network/2022-07-01/adminrules/method_list.go index 97915114117..85aa73c80e3 100644 --- a/resource-manager/network/2022-07-01/adminrules/method_list.go +++ b/resource-manager/network/2022-07-01/adminrules/method_list.go @@ -73,7 +73,7 @@ func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result temp := make([]BaseAdminRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBaseAdminRuleImplementation(v) + val, err := UnmarshalBaseAdminRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BaseAdminRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/network/2022-07-01/adminrules/model_adminrule.go b/resource-manager/network/2022-07-01/adminrules/model_adminrule.go index 8544cf3cd71..74d9a7cd9c1 100644 --- a/resource-manager/network/2022-07-01/adminrules/model_adminrule.go +++ b/resource-manager/network/2022-07-01/adminrules/model_adminrule.go @@ -16,13 +16,26 @@ type AdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AdminRule{} func (s AdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/adminrules/model_baseadminrule.go b/resource-manager/network/2022-07-01/adminrules/model_baseadminrule.go index bbcabba727e..9b510b6b2b9 100644 --- a/resource-manager/network/2022-07-01/adminrules/model_baseadminrule.go +++ b/resource-manager/network/2022-07-01/adminrules/model_baseadminrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseAdminRule interface { + BaseAdminRule() BaseBaseAdminRuleImpl +} + +var _ BaseAdminRule = BaseBaseAdminRuleImpl{} + +type BaseBaseAdminRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s } -// RawBaseAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseAdminRule = RawBaseAdminRuleImpl{} + +// RawBaseAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseAdminRuleImpl struct { - Type string - Values map[string]interface{} + baseAdminRule BaseBaseAdminRuleImpl + Type string + Values map[string]interface{} } -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { +func (s RawBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s.baseAdminRule +} + +func UnmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { return out, nil } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseBaseAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseAdminRuleImpl: %+v", err) } - return out, nil + + return RawBaseAdminRuleImpl{ + baseAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2022-07-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2022-07-01/adminrules/model_defaultadminrule.go index 7a93ae7edc9..3695c8332dc 100644 --- a/resource-manager/network/2022-07-01/adminrules/model_defaultadminrule.go +++ b/resource-manager/network/2022-07-01/adminrules/model_defaultadminrule.go @@ -16,13 +16,26 @@ type DefaultAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s DefaultAdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = DefaultAdminRule{} func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/adminrules/version.go b/resource-manager/network/2022-07-01/adminrules/version.go index 359b0b4bbac..a8d5683aa13 100644 --- a/resource-manager/network/2022-07-01/adminrules/version.go +++ b/resource-manager/network/2022-07-01/adminrules/version.go @@ -1,12 +1,10 @@ package adminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrules/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/README.md index 02aa2db8215..69c02eeb5cb 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/README.md +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections` Documentation -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `applicationgatewayprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/client.go index 10a57c1c475..2218d4c59f1 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/client.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { } func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go index e1cb4795761..98b4f043cb9 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go index aad51fee91b..3e07c149e6e 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*Applicat } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input strin } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/method_get.go index f3f7a21ab28..dace2e6df65 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/method_get.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Cont var model ApplicationGatewayPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/version.go index eac1468c326..973c4bf0fa8 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/version.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/README.md index 8ccce3fe97d..25dfbd1efb1 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/README.md +++ b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources` Documentation -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `applicationgatewayprivatelinkresources` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/client.go index 9e064641526..81bc1b2fb1d 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/client.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { } func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/id_applicationgateway.go index f86cb06512e..06702643dd2 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/version.go index 29793a4e52f..07bf04ba902 100644 --- a/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/version.go +++ b/resource-manager/network/2022-07-01/applicationgatewayprivatelinkresources/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/applicationgateways/README.md b/resource-manager/network/2022-07-01/applicationgateways/README.md index 99f2f698292..3f0f670df53 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/README.md +++ b/resource-manager/network/2022-07-01/applicationgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgateways` Documentation -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `applicationgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/applicationgateways/client.go b/resource-manager/network/2022-07-01/applicationgateways/client.go index 9608bf47106..3cd17d71726 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/client.go +++ b/resource-manager/network/2022-07-01/applicationgateways/client.go @@ -15,7 +15,7 @@ type ApplicationGatewaysClient struct { } func NewApplicationGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go index 0611edc8513..62f5b1be065 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go +++ b/resource-manager/network/2022-07-01/applicationgateways/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go index f22e541bda3..71d5c0e0d52 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go +++ b/resource-manager/network/2022-07-01/applicationgateways/id_predefinedpolicy.go @@ -40,7 +40,7 @@ func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, er } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go index 21c25eb922c..2ab399ab3f9 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_backendhealth.go @@ -37,6 +37,7 @@ func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go index 2db3547857a..a22fd7135ce 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_backendhealthondemand.go @@ -37,6 +37,7 @@ func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_get.go b/resource-manager/network/2022-07-01/applicationgateways/method_get.go index 03000d91a47..c25227f49ca 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_get.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewa var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go index 97530703e81..d42b5d2730e 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_getsslpredefinedpolicy.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, i var model ApplicationGatewaySslPredefinedPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go index 634799c7f70..8132f0945cf 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablerequestheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go index fe99c70d2e7..89bdb636e2e 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_listavailableresponseheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go index b48bb86d765..f2a0d8c4b79 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_listavailableservervariables.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go index 386a33e5e84..f446cd3730a 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablessloptions.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, var model ApplicationGatewayAvailableSslOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go index 3df1a2db564..ee2a21477a5 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_listavailablewafrulesets.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, var model ApplicationGatewayAvailableWafRuleSetsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go b/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go index d22b3615559..875c2ce138d 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go +++ b/resource-manager/network/2022-07-01/applicationgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id Applicatio var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgateways/version.go b/resource-manager/network/2022-07-01/applicationgateways/version.go index 192eed3c6e9..c3682b441b1 100644 --- a/resource-manager/network/2022-07-01/applicationgateways/version.go +++ b/resource-manager/network/2022-07-01/applicationgateways/version.go @@ -1,12 +1,10 @@ package applicationgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/README.md index e87f13ec7c5..e2ebab97999 100644 --- a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/README.md +++ b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests` Documentation -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/client.go index 507d8e55929..c8cf9d79e64 100644 --- a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/client.go +++ b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayWafDynamicManifestsClient struct { } func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/id_location.go index 03b931e4e2f..357f91a7bb3 100644 --- a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/id_location.go +++ b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/method_defaultget.go b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/method_defaultget.go index 0a6682174de..41ec3674d2f 100644 --- a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/method_defaultget.go +++ b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/method_defaultget.go @@ -46,7 +46,6 @@ func (c ApplicationGatewayWafDynamicManifestsClient) DefaultGet(ctx context.Cont var model ApplicationGatewayWafDynamicManifestResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/version.go index 93bbbaf1409..c9b14f7bd89 100644 --- a/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/version.go +++ b/resource-manager/network/2022-07-01/applicationgatewaywafdynamicmanifests/version.go @@ -1,12 +1,10 @@ package applicationgatewaywafdynamicmanifests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/README.md b/resource-manager/network/2022-07-01/applicationsecuritygroups/README.md index 5511509a5ab..1bcaa71910d 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/README.md +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/applicationsecuritygroups` Documentation -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `applicationsecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/client.go b/resource-manager/network/2022-07-01/applicationsecuritygroups/client.go index e607d64a7d3..81de33d92a0 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/client.go +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/client.go @@ -15,7 +15,7 @@ type ApplicationSecurityGroupsClient struct { } func NewApplicationSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2022-07-01/applicationsecuritygroups/id_applicationsecuritygroup.go index a776d455c05..67f87d7b0c2 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/id_applicationsecuritygroup.go @@ -42,7 +42,7 @@ func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSec } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2022-07-01/applicationsecuritygroups/method_get.go index 5990e4033ff..88fdcf2df15 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/method_get.go +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id Application var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2022-07-01/applicationsecuritygroups/method_updatetags.go index 0343cea5693..3337e0dc239 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/method_updatetags.go +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id Appl var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/applicationsecuritygroups/version.go b/resource-manager/network/2022-07-01/applicationsecuritygroups/version.go index 71657c185b1..5e7ed8f19c9 100644 --- a/resource-manager/network/2022-07-01/applicationsecuritygroups/version.go +++ b/resource-manager/network/2022-07-01/applicationsecuritygroups/version.go @@ -1,12 +1,10 @@ package applicationsecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationsecuritygroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/availabledelegations/README.md b/resource-manager/network/2022-07-01/availabledelegations/README.md index 28a1712b12d..f04d25e8557 100644 --- a/resource-manager/network/2022-07-01/availabledelegations/README.md +++ b/resource-manager/network/2022-07-01/availabledelegations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/availabledelegations` Documentation -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `availabledelegations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/availabledelegations/client.go b/resource-manager/network/2022-07-01/availabledelegations/client.go index ff6ff754bce..2b7153e2c60 100644 --- a/resource-manager/network/2022-07-01/availabledelegations/client.go +++ b/resource-manager/network/2022-07-01/availabledelegations/client.go @@ -15,7 +15,7 @@ type AvailableDelegationsClient struct { } func NewAvailableDelegationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabledelegations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabledelegations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/availabledelegations/id_location.go b/resource-manager/network/2022-07-01/availabledelegations/id_location.go index 411da010546..be331f465d6 100644 --- a/resource-manager/network/2022-07-01/availabledelegations/id_location.go +++ b/resource-manager/network/2022-07-01/availabledelegations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2022-07-01/availabledelegations/id_providerlocation.go index 18b359986fc..238b7f2192e 100644 --- a/resource-manager/network/2022-07-01/availabledelegations/id_providerlocation.go +++ b/resource-manager/network/2022-07-01/availabledelegations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/availabledelegations/version.go b/resource-manager/network/2022-07-01/availabledelegations/version.go index e5127a97694..15f2c209470 100644 --- a/resource-manager/network/2022-07-01/availabledelegations/version.go +++ b/resource-manager/network/2022-07-01/availabledelegations/version.go @@ -1,12 +1,10 @@ package availabledelegations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabledelegations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/availableservicealiases/README.md b/resource-manager/network/2022-07-01/availableservicealiases/README.md index a34b44027b8..261f56af6fc 100644 --- a/resource-manager/network/2022-07-01/availableservicealiases/README.md +++ b/resource-manager/network/2022-07-01/availableservicealiases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/availableservicealiases` Documentation -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `availableservicealiases` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/availableservicealiases/client.go b/resource-manager/network/2022-07-01/availableservicealiases/client.go index 383e80f6061..5f9e19acaa8 100644 --- a/resource-manager/network/2022-07-01/availableservicealiases/client.go +++ b/resource-manager/network/2022-07-01/availableservicealiases/client.go @@ -15,7 +15,7 @@ type AvailableServiceAliasesClient struct { } func NewAvailableServiceAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableservicealiases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableservicealiases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/availableservicealiases/id_location.go b/resource-manager/network/2022-07-01/availableservicealiases/id_location.go index 5bff2b43759..08ab16f2f59 100644 --- a/resource-manager/network/2022-07-01/availableservicealiases/id_location.go +++ b/resource-manager/network/2022-07-01/availableservicealiases/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2022-07-01/availableservicealiases/id_providerlocation.go index 7ec8519458c..0bb4c77565c 100644 --- a/resource-manager/network/2022-07-01/availableservicealiases/id_providerlocation.go +++ b/resource-manager/network/2022-07-01/availableservicealiases/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/availableservicealiases/version.go b/resource-manager/network/2022-07-01/availableservicealiases/version.go index 69387b26026..f8c13d4b381 100644 --- a/resource-manager/network/2022-07-01/availableservicealiases/version.go +++ b/resource-manager/network/2022-07-01/availableservicealiases/version.go @@ -1,12 +1,10 @@ package availableservicealiases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableservicealiases/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/azurefirewalls/README.md b/resource-manager/network/2022-07-01/azurefirewalls/README.md index 4e70e275c5c..9e6a3a457b5 100644 --- a/resource-manager/network/2022-07-01/azurefirewalls/README.md +++ b/resource-manager/network/2022-07-01/azurefirewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/azurefirewalls` Documentation -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `azurefirewalls` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/azurefirewalls/client.go b/resource-manager/network/2022-07-01/azurefirewalls/client.go index e1119aea925..02df961b70b 100644 --- a/resource-manager/network/2022-07-01/azurefirewalls/client.go +++ b/resource-manager/network/2022-07-01/azurefirewalls/client.go @@ -15,7 +15,7 @@ type AzureFirewallsClient struct { } func NewAzureFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurefirewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurefirewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2022-07-01/azurefirewalls/id_azurefirewall.go index 20ab073f448..a3d4db3a367 100644 --- a/resource-manager/network/2022-07-01/azurefirewalls/id_azurefirewall.go +++ b/resource-manager/network/2022-07-01/azurefirewalls/id_azurefirewall.go @@ -42,7 +42,7 @@ func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/azurefirewalls/method_get.go b/resource-manager/network/2022-07-01/azurefirewalls/method_get.go index 7fa6155aa4a..e9802794921 100644 --- a/resource-manager/network/2022-07-01/azurefirewalls/method_get.go +++ b/resource-manager/network/2022-07-01/azurefirewalls/method_get.go @@ -45,7 +45,6 @@ func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (resu var model AzureFirewall result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/azurefirewalls/version.go b/resource-manager/network/2022-07-01/azurefirewalls/version.go index 755d7329546..7b08b9fc316 100644 --- a/resource-manager/network/2022-07-01/azurefirewalls/version.go +++ b/resource-manager/network/2022-07-01/azurefirewalls/version.go @@ -1,12 +1,10 @@ package azurefirewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurefirewalls/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/bastionhosts/README.md b/resource-manager/network/2022-07-01/bastionhosts/README.md index 3195e8e5895..9f2a400d003 100644 --- a/resource-manager/network/2022-07-01/bastionhosts/README.md +++ b/resource-manager/network/2022-07-01/bastionhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/bastionhosts` Documentation -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `bastionhosts` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/bastionhosts/client.go b/resource-manager/network/2022-07-01/bastionhosts/client.go index 95e06c7f523..f77ea65ff0a 100644 --- a/resource-manager/network/2022-07-01/bastionhosts/client.go +++ b/resource-manager/network/2022-07-01/bastionhosts/client.go @@ -15,7 +15,7 @@ type BastionHostsClient struct { } func NewBastionHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2022-07-01/bastionhosts/id_bastionhost.go index 66012e2eda5..f1d36f02936 100644 --- a/resource-manager/network/2022-07-01/bastionhosts/id_bastionhost.go +++ b/resource-manager/network/2022-07-01/bastionhosts/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/bastionhosts/method_get.go b/resource-manager/network/2022-07-01/bastionhosts/method_get.go index 71b1a85a45f..7d0d6c578df 100644 --- a/resource-manager/network/2022-07-01/bastionhosts/method_get.go +++ b/resource-manager/network/2022-07-01/bastionhosts/method_get.go @@ -45,7 +45,6 @@ func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result G var model BastionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/bastionhosts/version.go b/resource-manager/network/2022-07-01/bastionhosts/version.go index 7a2ce6ec368..88b4d71613b 100644 --- a/resource-manager/network/2022-07-01/bastionhosts/version.go +++ b/resource-manager/network/2022-07-01/bastionhosts/version.go @@ -1,12 +1,10 @@ package bastionhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionhosts/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/bastionshareablelink/README.md b/resource-manager/network/2022-07-01/bastionshareablelink/README.md index be27b25f14a..776f927139d 100644 --- a/resource-manager/network/2022-07-01/bastionshareablelink/README.md +++ b/resource-manager/network/2022-07-01/bastionshareablelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/bastionshareablelink` Documentation -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `bastionshareablelink` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/bastionshareablelink/client.go b/resource-manager/network/2022-07-01/bastionshareablelink/client.go index 9c49b25b52f..39fc8e4cbdd 100644 --- a/resource-manager/network/2022-07-01/bastionshareablelink/client.go +++ b/resource-manager/network/2022-07-01/bastionshareablelink/client.go @@ -15,7 +15,7 @@ type BastionShareableLinkClient struct { } func NewBastionShareableLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionshareablelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionshareablelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2022-07-01/bastionshareablelink/id_bastionhost.go index b2cc2bfc5be..0f1852a854d 100644 --- a/resource-manager/network/2022-07-01/bastionshareablelink/id_bastionhost.go +++ b/resource-manager/network/2022-07-01/bastionshareablelink/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/bastionshareablelink/version.go b/resource-manager/network/2022-07-01/bastionshareablelink/version.go index 04a77a7b715..aca2d2db4c2 100644 --- a/resource-manager/network/2022-07-01/bastionshareablelink/version.go +++ b/resource-manager/network/2022-07-01/bastionshareablelink/version.go @@ -1,12 +1,10 @@ package bastionshareablelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionshareablelink/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/bgpservicecommunities/README.md b/resource-manager/network/2022-07-01/bgpservicecommunities/README.md index 1e9112bd941..17f63d5c297 100644 --- a/resource-manager/network/2022-07-01/bgpservicecommunities/README.md +++ b/resource-manager/network/2022-07-01/bgpservicecommunities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/bgpservicecommunities` Documentation -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `bgpservicecommunities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/bgpservicecommunities/client.go b/resource-manager/network/2022-07-01/bgpservicecommunities/client.go index 07cf4f59649..0fbe7d0bd51 100644 --- a/resource-manager/network/2022-07-01/bgpservicecommunities/client.go +++ b/resource-manager/network/2022-07-01/bgpservicecommunities/client.go @@ -15,7 +15,7 @@ type BgpServiceCommunitiesClient struct { } func NewBgpServiceCommunitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bgpservicecommunities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bgpservicecommunities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/bgpservicecommunities/version.go b/resource-manager/network/2022-07-01/bgpservicecommunities/version.go index 0cef953d6c7..5596aa56fb8 100644 --- a/resource-manager/network/2022-07-01/bgpservicecommunities/version.go +++ b/resource-manager/network/2022-07-01/bgpservicecommunities/version.go @@ -1,12 +1,10 @@ package bgpservicecommunities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bgpservicecommunities/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/checkdnsavailabilities/README.md b/resource-manager/network/2022-07-01/checkdnsavailabilities/README.md index f2583ac3b08..404f73adb55 100644 --- a/resource-manager/network/2022-07-01/checkdnsavailabilities/README.md +++ b/resource-manager/network/2022-07-01/checkdnsavailabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/checkdnsavailabilities` Documentation -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `checkdnsavailabilities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/checkdnsavailabilities/client.go b/resource-manager/network/2022-07-01/checkdnsavailabilities/client.go index 14eb1a4baa0..3641ce2ee39 100644 --- a/resource-manager/network/2022-07-01/checkdnsavailabilities/client.go +++ b/resource-manager/network/2022-07-01/checkdnsavailabilities/client.go @@ -15,7 +15,7 @@ type CheckDnsAvailabilitiesClient struct { } func NewCheckDnsAvailabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2022-07-01/checkdnsavailabilities/id_location.go index 1adf8c560da..208d2c68c41 100644 --- a/resource-manager/network/2022-07-01/checkdnsavailabilities/id_location.go +++ b/resource-manager/network/2022-07-01/checkdnsavailabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2022-07-01/checkdnsavailabilities/method_checkdnsnameavailability.go index 276e19a8dd4..aa291abadeb 100644 --- a/resource-manager/network/2022-07-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ b/resource-manager/network/2022-07-01/checkdnsavailabilities/method_checkdnsnameavailability.go @@ -34,6 +34,7 @@ func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Conte var model DnsNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/checkdnsavailabilities/version.go b/resource-manager/network/2022-07-01/checkdnsavailabilities/version.go index b52ed8a5e96..dcb452c1a42 100644 --- a/resource-manager/network/2022-07-01/checkdnsavailabilities/version.go +++ b/resource-manager/network/2022-07-01/checkdnsavailabilities/version.go @@ -1,12 +1,10 @@ package checkdnsavailabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkdnsavailabilities/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/README.md index 93c1b955fdf..b9a459b7a2a 100644 --- a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/README.md +++ b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/cloudservicepublicipaddresses` Documentation -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `cloudservicepublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/client.go index 4eebc5f720f..3ffc0d7ae83 100644 --- a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/client.go +++ b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/client.go @@ -15,7 +15,7 @@ type CloudServicePublicIPAddressesClient struct { } func NewCloudServicePublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/id_providercloudservice.go index 2750d8acfa0..86cef14917e 100644 --- a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go index b3e6c192d39..dabdeb2c12e 100644 --- a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeade func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePub var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/version.go index ad6ed05b029..cad6001b02c 100644 --- a/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/version.go +++ b/resource-manager/network/2022-07-01/cloudservicepublicipaddresses/version.go @@ -1,12 +1,10 @@ package cloudservicepublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudservicepublicipaddresses/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/README.md b/resource-manager/network/2022-07-01/connectionmonitors/README.md index a0f346837d7..50bd076d84d 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/README.md +++ b/resource-manager/network/2022-07-01/connectionmonitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/connectionmonitors` Documentation -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `connectionmonitors` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/connectionmonitors/client.go b/resource-manager/network/2022-07-01/connectionmonitors/client.go index a8ff516ce50..c23a27cd53b 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/client.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/client.go @@ -15,7 +15,7 @@ type ConnectionMonitorsClient struct { } func NewConnectionMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectionmonitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectionmonitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2022-07-01/connectionmonitors/id_connectionmonitor.go index 10d851fd213..8563d9fa155 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/id_connectionmonitor.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/id_connectionmonitor.go @@ -44,7 +44,7 @@ func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2022-07-01/connectionmonitors/id_networkwatcher.go index c112368b0b7..af556752c60 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/id_networkwatcher.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2022-07-01/connectionmonitors/method_createorupdate.go index f2d252c628d..069036d65fe 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/method_get.go b/resource-manager/network/2022-07-01/connectionmonitors/method_get.go index 883ffbdfd40..8087a322df3 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/method_get.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorI var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/method_list.go b/resource-manager/network/2022-07-01/connectionmonitors/method_list.go index 40de4efcac7..46eea3af26b 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/method_list.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/method_list.go @@ -46,7 +46,6 @@ func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) var model ConnectionMonitorListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2022-07-01/connectionmonitors/method_updatetags.go index 04091a0b16c..e6e1f8be8d1 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/method_updatetags.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/method_updatetags.go @@ -49,7 +49,6 @@ func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionM var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/connectionmonitors/version.go b/resource-manager/network/2022-07-01/connectionmonitors/version.go index 183c535f8d0..f79f8ad2190 100644 --- a/resource-manager/network/2022-07-01/connectionmonitors/version.go +++ b/resource-manager/network/2022-07-01/connectionmonitors/version.go @@ -1,12 +1,10 @@ package connectionmonitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectionmonitors/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/README.md b/resource-manager/network/2022-07-01/connectivityconfigurations/README.md index 3c64ccef936..e0f03012c25 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/README.md +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/connectivityconfigurations` Documentation -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `connectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/client.go b/resource-manager/network/2022-07-01/connectivityconfigurations/client.go index 7fb783f963a..8d908853770 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/client.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/client.go @@ -15,7 +15,7 @@ type ConnectivityConfigurationsClient struct { } func NewConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2022-07-01/connectivityconfigurations/id_connectivityconfiguration.go index d00d054bd40..c969a2cf413 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/id_connectivityconfiguration.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/id_connectivityconfiguration.go @@ -44,7 +44,7 @@ func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationI } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityC } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-07-01/connectivityconfigurations/id_networkmanager.go index 1f7b8c3216b..833ef39fdb4 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2022-07-01/connectivityconfigurations/method_createorupdate.go index 3ad8680898d..e8278cdba63 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2022-07-01/connectivityconfigurations/method_delete.go index 8646fac9ed8..a1c5884b210 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/method_delete.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/method_get.go b/resource-manager/network/2022-07-01/connectivityconfigurations/method_get.go index d8769033b0a..3471bd0faf1 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/method_get.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id Connectivi var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/method_list.go b/resource-manager/network/2022-07-01/connectivityconfigurations/method_list.go index 95ba68f0bc1..6663f9e80ae 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/method_list.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/connectivityconfigurations/version.go b/resource-manager/network/2022-07-01/connectivityconfigurations/version.go index cc14e386a22..a2fb915aba4 100644 --- a/resource-manager/network/2022-07-01/connectivityconfigurations/version.go +++ b/resource-manager/network/2022-07-01/connectivityconfigurations/version.go @@ -1,12 +1,10 @@ package connectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectivityconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/customipprefixes/README.md b/resource-manager/network/2022-07-01/customipprefixes/README.md index baa2d7db847..fbed54b7781 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/README.md +++ b/resource-manager/network/2022-07-01/customipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/customipprefixes` Documentation -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `customipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/customipprefixes/client.go b/resource-manager/network/2022-07-01/customipprefixes/client.go index 1e1c6887c4a..2b241f7b0e7 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/client.go +++ b/resource-manager/network/2022-07-01/customipprefixes/client.go @@ -15,7 +15,7 @@ type CustomIPPrefixesClient struct { } func NewCustomIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2022-07-01/customipprefixes/id_customipprefix.go index d4206cbdfb5..5ea825eb6cd 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/id_customipprefix.go +++ b/resource-manager/network/2022-07-01/customipprefixes/id_customipprefix.go @@ -42,7 +42,7 @@ func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/customipprefixes/method_get.go b/resource-manager/network/2022-07-01/customipprefixes/method_get.go index 9215609651a..61164d79480 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/method_get.go +++ b/resource-manager/network/2022-07-01/customipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, op var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/customipprefixes/method_updatetags.go b/resource-manager/network/2022-07-01/customipprefixes/method_updatetags.go index c61802109c3..2962a005ed8 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/method_updatetags.go +++ b/resource-manager/network/2022-07-01/customipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefi var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/customipprefixes/version.go b/resource-manager/network/2022-07-01/customipprefixes/version.go index 6fee5d12371..bbd15776ebd 100644 --- a/resource-manager/network/2022-07-01/customipprefixes/version.go +++ b/resource-manager/network/2022-07-01/customipprefixes/version.go @@ -1,12 +1,10 @@ package customipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customipprefixes/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/README.md b/resource-manager/network/2022-07-01/ddoscustompolicies/README.md index c6ac5a2217b..334d58d5df6 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/README.md +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/ddoscustompolicies` Documentation -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `ddoscustompolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/client.go b/resource-manager/network/2022-07-01/ddoscustompolicies/client.go index e6985cefaee..93a9d3ac0d4 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/client.go +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/client.go @@ -15,7 +15,7 @@ type DdosCustomPoliciesClient struct { } func NewDdosCustomPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddoscustompolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddoscustompolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2022-07-01/ddoscustompolicies/id_ddoscustompolicy.go index 1898126aafc..5107ae00e4f 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/id_ddoscustompolicy.go +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/id_ddoscustompolicy.go @@ -42,7 +42,7 @@ func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, er } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/method_get.go b/resource-manager/network/2022-07-01/ddoscustompolicies/method_get.go index 07a8cdf6ad0..288dcc99b4a 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/method_get.go +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/method_get.go @@ -45,7 +45,6 @@ func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2022-07-01/ddoscustompolicies/method_updatetags.go index b64aa2cb519..1e74f849d0b 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/method_updatetags.go +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomP var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ddoscustompolicies/version.go b/resource-manager/network/2022-07-01/ddoscustompolicies/version.go index cbb0e680817..6b3d746b9f3 100644 --- a/resource-manager/network/2022-07-01/ddoscustompolicies/version.go +++ b/resource-manager/network/2022-07-01/ddoscustompolicies/version.go @@ -1,12 +1,10 @@ package ddoscustompolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddoscustompolicies/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/README.md b/resource-manager/network/2022-07-01/ddosprotectionplans/README.md index e191c9dd0ae..5f4425b97b6 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/README.md +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/ddosprotectionplans` Documentation -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `ddosprotectionplans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/client.go b/resource-manager/network/2022-07-01/ddosprotectionplans/client.go index de83f23ea42..e117bf49a8f 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/client.go +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/client.go @@ -15,7 +15,7 @@ type DdosProtectionPlansClient struct { } func NewDdosProtectionPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddosprotectionplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddosprotectionplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2022-07-01/ddosprotectionplans/id_ddosprotectionplan.go index 1be4cad64d9..962147e9da0 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/id_ddosprotectionplan.go +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/id_ddosprotectionplan.go @@ -42,7 +42,7 @@ func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/method_get.go b/resource-manager/network/2022-07-01/ddosprotectionplans/method_get.go index 9003f8a00c3..7a92875442e 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/method_get.go +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/method_get.go @@ -45,7 +45,6 @@ func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPla var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2022-07-01/ddosprotectionplans/method_updatetags.go index 07e469082e6..a5b91c81b71 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/method_updatetags.go +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtec var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ddosprotectionplans/version.go b/resource-manager/network/2022-07-01/ddosprotectionplans/version.go index 9d407555661..4218af2cbc2 100644 --- a/resource-manager/network/2022-07-01/ddosprotectionplans/version.go +++ b/resource-manager/network/2022-07-01/ddosprotectionplans/version.go @@ -1,12 +1,10 @@ package ddosprotectionplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddosprotectionplans/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/dscpconfiguration/README.md b/resource-manager/network/2022-07-01/dscpconfiguration/README.md index 9048ac9cce3..5313a94f2dd 100644 --- a/resource-manager/network/2022-07-01/dscpconfiguration/README.md +++ b/resource-manager/network/2022-07-01/dscpconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/dscpconfiguration` Documentation -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `dscpconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/dscpconfiguration/client.go b/resource-manager/network/2022-07-01/dscpconfiguration/client.go index ed6cfe7aa08..76ab56d4977 100644 --- a/resource-manager/network/2022-07-01/dscpconfiguration/client.go +++ b/resource-manager/network/2022-07-01/dscpconfiguration/client.go @@ -15,7 +15,7 @@ type DscpConfigurationClient struct { } func NewDscpConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2022-07-01/dscpconfiguration/id_dscpconfiguration.go index 8eb56f33d98..f4b606b48f4 100644 --- a/resource-manager/network/2022-07-01/dscpconfiguration/id_dscpconfiguration.go +++ b/resource-manager/network/2022-07-01/dscpconfiguration/id_dscpconfiguration.go @@ -42,7 +42,7 @@ func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/dscpconfiguration/method_get.go b/resource-manager/network/2022-07-01/dscpconfiguration/method_get.go index 1563a9b978b..cb94f50eba5 100644 --- a/resource-manager/network/2022-07-01/dscpconfiguration/method_get.go +++ b/resource-manager/network/2022-07-01/dscpconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId var model DscpConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/dscpconfiguration/version.go b/resource-manager/network/2022-07-01/dscpconfiguration/version.go index 9db3e6bc973..1676c86691b 100644 --- a/resource-manager/network/2022-07-01/dscpconfiguration/version.go +++ b/resource-manager/network/2022-07-01/dscpconfiguration/version.go @@ -1,12 +1,10 @@ package dscpconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfiguration/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/dscpconfigurations/README.md b/resource-manager/network/2022-07-01/dscpconfigurations/README.md index 781a8d65a97..88a38852f2f 100644 --- a/resource-manager/network/2022-07-01/dscpconfigurations/README.md +++ b/resource-manager/network/2022-07-01/dscpconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/dscpconfigurations` Documentation -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `dscpconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/dscpconfigurations/client.go b/resource-manager/network/2022-07-01/dscpconfigurations/client.go index ef38b8d0533..f8740f737f6 100644 --- a/resource-manager/network/2022-07-01/dscpconfigurations/client.go +++ b/resource-manager/network/2022-07-01/dscpconfigurations/client.go @@ -15,7 +15,7 @@ type DscpConfigurationsClient struct { } func NewDscpConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/dscpconfigurations/version.go b/resource-manager/network/2022-07-01/dscpconfigurations/version.go index d82fc410603..60f3343005c 100644 --- a/resource-manager/network/2022-07-01/dscpconfigurations/version.go +++ b/resource-manager/network/2022-07-01/dscpconfigurations/version.go @@ -1,12 +1,10 @@ package dscpconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/endpointservices/README.md b/resource-manager/network/2022-07-01/endpointservices/README.md index eebef2c0d31..93a52050785 100644 --- a/resource-manager/network/2022-07-01/endpointservices/README.md +++ b/resource-manager/network/2022-07-01/endpointservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/endpointservices` Documentation -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `endpointservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/endpointservices/client.go b/resource-manager/network/2022-07-01/endpointservices/client.go index c04faa1ffd8..44e82b37c46 100644 --- a/resource-manager/network/2022-07-01/endpointservices/client.go +++ b/resource-manager/network/2022-07-01/endpointservices/client.go @@ -15,7 +15,7 @@ type EndpointServicesClient struct { } func NewEndpointServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/endpointservices/id_location.go b/resource-manager/network/2022-07-01/endpointservices/id_location.go index b3f9df03861..bc549e11a00 100644 --- a/resource-manager/network/2022-07-01/endpointservices/id_location.go +++ b/resource-manager/network/2022-07-01/endpointservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/endpointservices/version.go b/resource-manager/network/2022-07-01/endpointservices/version.go index 67aa5f0eb0d..ab95e4fcbcf 100644 --- a/resource-manager/network/2022-07-01/endpointservices/version.go +++ b/resource-manager/network/2022-07-01/endpointservices/version.go @@ -1,12 +1,10 @@ package endpointservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointservices/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitarptable/README.md b/resource-manager/network/2022-07-01/expressroutecircuitarptable/README.md index b3e23d5a5e8..2b3e4f42bdc 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitarptable` Documentation -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitarptable/client.go b/resource-manager/network/2022-07-01/expressroutecircuitarptable/client.go index a927b3e2a41..b13a5d9774e 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitarptable/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitArpTableClient struct { } func NewExpressRouteCircuitArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2022-07-01/expressroutecircuitarptable/id_arptable.go index c01410283c1..af630a9dd1a 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitarptable/id_arptable.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitarptable/id_arptable.go @@ -46,7 +46,7 @@ func ParseArpTableID(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitarptable/version.go b/resource-manager/network/2022-07-01/expressroutecircuitarptable/version.go index f4d8aef3a29..b9ec48a7122 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitarptable/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitarptable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitarptable/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/README.md index 6e99f37aaf3..d9a5204a5ee 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitauthorizations` Documentation -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/client.go index 8060a80be1e..2d3988ae8a8 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitAuthorizationsClient struct { } func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_authorization.go index b659c5a5b8c..430deb067c3 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_authorization.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_expressroutecircuit.go index a46fa52bf5d..b80003e486f 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/method_get.go index 19e783a8675..823c3b06cfc 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id Aut var model ExpressRouteCircuitAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/version.go index 20c8f0aab45..d6bdf927fd2 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitauthorizations/version.go @@ -1,12 +1,10 @@ package expressroutecircuitauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitauthorizations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitconnections/README.md b/resource-manager/network/2022-07-01/expressroutecircuitconnections/README.md index f58e8dfa7cb..2fa81faed3c 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitconnections/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitconnections` Documentation -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitconnections/client.go b/resource-manager/network/2022-07-01/expressroutecircuitconnections/client.go index 333eff0e189..6ce57a4cb92 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitconnections/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitConnectionsClient struct { } func NewExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2022-07-01/expressroutecircuitconnections/id_peeringconnection.go index 0e2e6d6c894..c789977d4fc 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitconnections/id_peeringconnection.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitconnections/id_peeringconnection.go @@ -46,7 +46,7 @@ func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2022-07-01/expressroutecircuitconnections/method_get.go index 0a4a18dd7cc..ca510dffdd4 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Peerin var model ExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitconnections/version.go b/resource-manager/network/2022-07-01/expressroutecircuitconnections/version.go index 55ae80da518..68e706567f9 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitconnections/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package expressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/README.md index d58f971e4f6..e24d682f26f 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitpeerings` Documentation -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/client.go index 63ac4daefad..ce7c06a4f7b 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitPeeringsClient struct { } func NewExpressRouteCircuitPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/id_expressroutecircuit.go index 51f74b9a362..71e57edae8c 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/method_get.go index 0937d0e96a9..217363c38a1 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/method_get.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids var model ExpressRouteCircuitPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/version.go index a1fd1361bed..9cd100a951d 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitpeerings/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecircuitpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitpeerings/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/README.md index 396247ded30..e2b797c8e9e 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitroutestable` Documentation -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitroutestable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/client.go index 925b7f29bae..64933522e0c 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableClient struct { } func NewExpressRouteCircuitRoutesTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/id_peeringroutetable.go index 895e343bf35..e2aeb69ec6d 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/id_peeringroutetable.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/version.go index 3e6fe28ff57..848945e095c 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestable/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestable/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/README.md index 3456184252e..49300db3236 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary` Documentation -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitroutestablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/client.go index 5565926cb76..1964d42b872 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableSummaryClient struct { } func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/id_routetablessummary.go index 16c5b0c301a..23c30e2e03b 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/id_routetablessummary.go @@ -46,7 +46,7 @@ func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/version.go index 767b5098ae7..8d9f492acdb 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitroutestablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/README.md b/resource-manager/network/2022-07-01/expressroutecircuits/README.md index 6b129d4ce0e..d55dfa846ff 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuits` Documentation -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuits` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/client.go b/resource-manager/network/2022-07-01/expressroutecircuits/client.go index cd12ab163e6..e618de82828 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuits/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitsClient struct { } func NewExpressRouteCircuitsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2022-07-01/expressroutecircuits/id_expressroutecircuit.go index d48e8e429e7..cd8d55cab28 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/id_expressroutecircuit.go +++ b/resource-manager/network/2022-07-01/expressroutecircuits/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/method_get.go b/resource-manager/network/2022-07-01/expressroutecircuits/method_get.go index 2047441e60b..f44a9d7ab3d 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecircuits/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCirc var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2022-07-01/expressroutecircuits/method_updatetags.go index 8426eb683b2..2188a40d783 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/method_updatetags.go +++ b/resource-manager/network/2022-07-01/expressroutecircuits/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRo var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuits/version.go b/resource-manager/network/2022-07-01/expressroutecircuits/version.go index 9a462e93baa..5f170dee3f9 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuits/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuits/version.go @@ -1,12 +1,10 @@ package expressroutecircuits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuits/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/README.md b/resource-manager/network/2022-07-01/expressroutecircuitstats/README.md index 0621108a7ec..4fc05d82657 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/README.md +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecircuitstats` Documentation -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecircuitstats` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/client.go b/resource-manager/network/2022-07-01/expressroutecircuitstats/client.go index 43a397e1cc1..697e4ff2817 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/client.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitStatsClient struct { } func NewExpressRouteCircuitStatsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2022-07-01/expressroutecircuitstats/id_expressroutecircuit.go index cf235dfe96f..82dec662360 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/id_expressroutecircuit.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go index 5473e8458e6..14b01a4f877 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go @@ -47,7 +47,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go index 4bd3c09b58e..093f31815f0 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecircuitstats/version.go b/resource-manager/network/2022-07-01/expressroutecircuitstats/version.go index dd19dbedf71..1a009657375 100644 --- a/resource-manager/network/2022-07-01/expressroutecircuitstats/version.go +++ b/resource-manager/network/2022-07-01/expressroutecircuitstats/version.go @@ -1,12 +1,10 @@ package expressroutecircuitstats -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitstats/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/README.md b/resource-manager/network/2022-07-01/expressrouteconnections/README.md index 9944c554478..5887fac2161 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/README.md +++ b/resource-manager/network/2022-07-01/expressrouteconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteconnections` Documentation -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/client.go b/resource-manager/network/2022-07-01/expressrouteconnections/client.go index 59b056f90da..379d1d22880 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/client.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteConnectionsClient struct { } func NewExpressRouteConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2022-07-01/expressrouteconnections/id_expressrouteconnection.go index 7bba12f409b..53f6b3e5750 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/id_expressrouteconnection.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/id_expressrouteconnection.go @@ -44,7 +44,7 @@ func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, err } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConn } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2022-07-01/expressrouteconnections/id_expressroutegateway.go index 6df37b9a7d8..c5fcbe2791f 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/id_expressroutegateway.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/method_get.go b/resource-manager/network/2022-07-01/expressrouteconnections/method_get.go index ae0992fa45d..0116eaca5cf 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/method_get.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteC var model ExpressRouteConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/method_list.go b/resource-manager/network/2022-07-01/expressrouteconnections/method_list.go index e9090e1dd56..d6233e938c4 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/method_list.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/method_list.go @@ -46,7 +46,6 @@ func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRoute var model ExpressRouteConnectionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteconnections/version.go b/resource-manager/network/2022-07-01/expressrouteconnections/version.go index e74f407973f..c0c33d507b2 100644 --- a/resource-manager/network/2022-07-01/expressrouteconnections/version.go +++ b/resource-manager/network/2022-07-01/expressrouteconnections/version.go @@ -1,12 +1,10 @@ package expressrouteconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/README.md index 257ac2ba9f2..25832283882 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable` Documentation -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecrossconnectionarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/client.go index 07328f2f394..57ec192ecdb 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/client.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionArpTableClient struct { } func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/id_peeringarptable.go index a90eea8a4cb..7f32dee4270 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/id_peeringarptable.go @@ -46,7 +46,7 @@ func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, erro } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/version.go index fffea55fda1..14b812fdf09 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/version.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionarptable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/README.md index ae3704afd11..7c00b3d6027 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/README.md +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings` Documentation -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecrossconnectionpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/client.go index 90cbc899dcb..d2b06fe732d 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/client.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionPeeringsClient struct { } func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go index 626b69cff73..2099c7eab97 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_peering.go index f9e45b10c99..5b91cc2c7b0 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_peering.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/id_peering.go @@ -44,7 +44,7 @@ func ParsePeeringID(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/method_get.go index b53171627d6..4fbd73485bb 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id P var model ExpressRouteCrossConnectionPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/version.go index 24db4f8cdb2..3e294fc1d88 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/version.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/README.md index d4148689ad5..9c5f3804a87 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable` Documentation -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecrossconnectionroutetable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/client.go index 210d81d68a9..6b8b935dba0 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/client.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableClient struct { } func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go index 9a8910626cd..6067ee919b6 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go @@ -46,7 +46,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*Express } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input stri } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/version.go index 7fd9bd1ca23..d55cbddf1bb 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/version.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/README.md index 540c0f81a20..431b651173e 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary` Documentation -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/client.go index 5329fa515af..aaf83cd3840 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/client.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableSummaryClient struct { } func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go index ea69383cd3a..5dffd985897 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryI } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteT } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/version.go index 375d30493fd..e0f7d789783 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/version.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnectionroutetablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/README.md b/resource-manager/network/2022-07-01/expressroutecrossconnections/README.md index b836627f735..cff81961ee9 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/README.md +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutecrossconnections` Documentation -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutecrossconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/client.go b/resource-manager/network/2022-07-01/expressroutecrossconnections/client.go index 67aa896c58d..5df85aad3d6 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/client.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionsClient struct { } func NewExpressRouteCrossConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2022-07-01/expressroutecrossconnections/id_expressroutecrossconnection.go index 3748db0d3a2..8128cf4c67c 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2022-07-01/expressroutecrossconnections/method_get.go index 250556ca005..e68e3ddc46d 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressR var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2022-07-01/expressroutecrossconnections/method_updatetags.go index 0c627c7653a..e55953bde8f 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/method_updatetags.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id E var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutecrossconnections/version.go b/resource-manager/network/2022-07-01/expressroutecrossconnections/version.go index 1557ebcc93b..b576323f48a 100644 --- a/resource-manager/network/2022-07-01/expressroutecrossconnections/version.go +++ b/resource-manager/network/2022-07-01/expressroutecrossconnections/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/README.md b/resource-manager/network/2022-07-01/expressroutegateways/README.md index 77cb91d0458..9b64773e916 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/README.md +++ b/resource-manager/network/2022-07-01/expressroutegateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutegateways` Documentation -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutegateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutegateways/client.go b/resource-manager/network/2022-07-01/expressroutegateways/client.go index a1f21a852ef..292ef72ff7b 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/client.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/client.go @@ -15,7 +15,7 @@ type ExpressRouteGatewaysClient struct { } func NewExpressRouteGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutegateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutegateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2022-07-01/expressroutegateways/id_expressroutegateway.go index 0e06d43d298..6c356e20fd4 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/id_expressroutegateway.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/method_get.go b/resource-manager/network/2022-07-01/expressroutegateways/method_get.go index 74f38c464bb..3fe9ab488d0 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGate var model ExpressRouteGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2022-07-01/expressroutegateways/method_listbyresourcegroup.go index 4676a67757a..f76de802a39 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/method_listbyresourcegroup.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2022-07-01/expressroutegateways/method_listbysubscription.go index ba74ca537ae..840cb62145e 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/method_listbysubscription.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id c var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutegateways/version.go b/resource-manager/network/2022-07-01/expressroutegateways/version.go index 9b32ddceb21..3119e9ee248 100644 --- a/resource-manager/network/2022-07-01/expressroutegateways/version.go +++ b/resource-manager/network/2022-07-01/expressroutegateways/version.go @@ -1,12 +1,10 @@ package expressroutegateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutegateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressroutelinks/README.md b/resource-manager/network/2022-07-01/expressroutelinks/README.md index d4093bb0d57..a05a603edb0 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/README.md +++ b/resource-manager/network/2022-07-01/expressroutelinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressroutelinks` Documentation -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressroutelinks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressroutelinks/client.go b/resource-manager/network/2022-07-01/expressroutelinks/client.go index 42ba283bf4a..5b75ccca68f 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/client.go +++ b/resource-manager/network/2022-07-01/expressroutelinks/client.go @@ -15,7 +15,7 @@ type ExpressRouteLinksClient struct { } func NewExpressRouteLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutelinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutelinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2022-07-01/expressroutelinks/id_expressrouteport.go index fdf651cde65..e0aa12c1e5e 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/id_expressrouteport.go +++ b/resource-manager/network/2022-07-01/expressroutelinks/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutelinks/id_link.go b/resource-manager/network/2022-07-01/expressroutelinks/id_link.go index ff86b5a2798..b90097eb095 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/id_link.go +++ b/resource-manager/network/2022-07-01/expressroutelinks/id_link.go @@ -44,7 +44,7 @@ func ParseLinkID(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkIDInsensitively(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressroutelinks/method_get.go b/resource-manager/network/2022-07-01/expressroutelinks/method_get.go index 25857a7f294..3f132947b99 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/method_get.go +++ b/resource-manager/network/2022-07-01/expressroutelinks/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result Get var model ExpressRouteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressroutelinks/version.go b/resource-manager/network/2022-07-01/expressroutelinks/version.go index 9d534eb355c..bab93818dca 100644 --- a/resource-manager/network/2022-07-01/expressroutelinks/version.go +++ b/resource-manager/network/2022-07-01/expressroutelinks/version.go @@ -1,12 +1,10 @@ package expressroutelinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutelinks/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/README.md b/resource-manager/network/2022-07-01/expressrouteportauthorizations/README.md index f56a6db7bc4..0ad9902b26f 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/README.md +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteportauthorizations` Documentation -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteportauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/client.go b/resource-manager/network/2022-07-01/expressrouteportauthorizations/client.go index a6a1e906e85..3405a1acb86 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/client.go +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortAuthorizationsClient struct { } func NewExpressRoutePortAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteport.go index 9fffd1964c0..0c4d2182b84 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteport.go +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteportauthorization.go index 4042eea1718..ae293d47f93 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/id_expressrouteportauthorization.go @@ -44,7 +44,7 @@ func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthor } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRo } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2022-07-01/expressrouteportauthorizations/method_get.go index 0dd81644eba..c8df23b8dfd 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/method_get.go +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id Expres var model ExpressRoutePortAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteportauthorizations/version.go b/resource-manager/network/2022-07-01/expressrouteportauthorizations/version.go index d50d490e10c..09c71df560d 100644 --- a/resource-manager/network/2022-07-01/expressrouteportauthorizations/version.go +++ b/resource-manager/network/2022-07-01/expressrouteportauthorizations/version.go @@ -1,12 +1,10 @@ package expressrouteportauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportauthorizations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteports/README.md b/resource-manager/network/2022-07-01/expressrouteports/README.md index 22a2de22f0e..5b341e062ac 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/README.md +++ b/resource-manager/network/2022-07-01/expressrouteports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteports` Documentation -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteports/client.go b/resource-manager/network/2022-07-01/expressrouteports/client.go index 7b73cfca2af..82e57d5b54f 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/client.go +++ b/resource-manager/network/2022-07-01/expressrouteports/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsClient struct { } func NewExpressRoutePortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2022-07-01/expressrouteports/id_expressrouteport.go index 6ac3a3831e8..eb751415586 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/id_expressrouteport.go +++ b/resource-manager/network/2022-07-01/expressrouteports/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteports/method_generateloa.go b/resource-manager/network/2022-07-01/expressrouteports/method_generateloa.go index d0010451bf9..d5725e743a6 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/method_generateloa.go +++ b/resource-manager/network/2022-07-01/expressrouteports/method_generateloa.go @@ -50,7 +50,6 @@ func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRout var model GenerateExpressRoutePortsLOAResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteports/method_get.go b/resource-manager/network/2022-07-01/expressrouteports/method_get.go index 0f35b842ad6..dda9cada850 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/method_get.go +++ b/resource-manager/network/2022-07-01/expressrouteports/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteports/method_updatetags.go b/resource-manager/network/2022-07-01/expressrouteports/method_updatetags.go index fef0242df71..7ce98b9327b 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/method_updatetags.go +++ b/resource-manager/network/2022-07-01/expressrouteports/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoute var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteports/version.go b/resource-manager/network/2022-07-01/expressrouteports/version.go index a96bf34b07d..e6fde7276d7 100644 --- a/resource-manager/network/2022-07-01/expressrouteports/version.go +++ b/resource-manager/network/2022-07-01/expressrouteports/version.go @@ -1,12 +1,10 @@ package expressrouteports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteports/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteportslocations/README.md b/resource-manager/network/2022-07-01/expressrouteportslocations/README.md index 807d32c3d20..c283530955b 100644 --- a/resource-manager/network/2022-07-01/expressrouteportslocations/README.md +++ b/resource-manager/network/2022-07-01/expressrouteportslocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteportslocations` Documentation -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteportslocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteportslocations/client.go b/resource-manager/network/2022-07-01/expressrouteportslocations/client.go index 070961a7825..11ea98b6cb3 100644 --- a/resource-manager/network/2022-07-01/expressrouteportslocations/client.go +++ b/resource-manager/network/2022-07-01/expressrouteportslocations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsLocationsClient struct { } func NewExpressRoutePortsLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportslocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportslocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2022-07-01/expressrouteportslocations/id_expressrouteportslocation.go index 94e09ce7a77..2c3e6ea91b2 100644 --- a/resource-manager/network/2022-07-01/expressrouteportslocations/id_expressrouteportslocation.go +++ b/resource-manager/network/2022-07-01/expressrouteportslocations/id_expressrouteportslocation.go @@ -40,7 +40,7 @@ func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationI } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRouteP } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteportslocations/method_get.go b/resource-manager/network/2022-07-01/expressrouteportslocations/method_get.go index 58048a2240a..41422952079 100644 --- a/resource-manager/network/2022-07-01/expressrouteportslocations/method_get.go +++ b/resource-manager/network/2022-07-01/expressrouteportslocations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRou var model ExpressRoutePortsLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteportslocations/version.go b/resource-manager/network/2022-07-01/expressrouteportslocations/version.go index 5e70eee4a3f..d8c16c57685 100644 --- a/resource-manager/network/2022-07-01/expressrouteportslocations/version.go +++ b/resource-manager/network/2022-07-01/expressrouteportslocations/version.go @@ -1,12 +1,10 @@ package expressrouteportslocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportslocations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/README.md b/resource-manager/network/2022-07-01/expressrouteproviderports/README.md index e20b7065814..59aa7a5a695 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/README.md +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteproviderports` Documentation -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteproviderports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/client.go b/resource-manager/network/2022-07-01/expressrouteproviderports/client.go index 696d17bbfd6..dad656ec6d0 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/client.go +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/client.go @@ -15,7 +15,7 @@ type ExpressRouteProviderPortsClient struct { } func NewExpressRouteProviderPortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteproviderports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteproviderports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2022-07-01/expressrouteproviderports/id_expressrouteproviderport.go index 2e734bb82c3..b8d7c961646 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/id_expressrouteproviderport.go +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/id_expressrouteproviderport.go @@ -40,7 +40,7 @@ func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRoutePr } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2022-07-01/expressrouteproviderports/method_expressrouteproviderport.go index 95cb93096c7..c264bf3b8aa 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/method_expressrouteproviderport.go +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/method_expressrouteproviderport.go @@ -45,7 +45,6 @@ func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Co var model ExpressRouteProviderPort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2022-07-01/expressrouteproviderports/method_locationlist.go index ad8f2e59e37..93d35794cf0 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/method_locationlist.go +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/method_locationlist.go @@ -40,6 +40,7 @@ func (o LocationListOperationOptions) ToHeaders() *client.Headers { func (o LocationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/expressrouteproviderports/version.go b/resource-manager/network/2022-07-01/expressrouteproviderports/version.go index 9f46fb08ec5..a94e79ef8a6 100644 --- a/resource-manager/network/2022-07-01/expressrouteproviderports/version.go +++ b/resource-manager/network/2022-07-01/expressrouteproviderports/version.go @@ -1,12 +1,10 @@ package expressrouteproviderports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteproviderports/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/expressrouteserviceproviders/README.md b/resource-manager/network/2022-07-01/expressrouteserviceproviders/README.md index 37195d935d5..4b611dc8094 100644 --- a/resource-manager/network/2022-07-01/expressrouteserviceproviders/README.md +++ b/resource-manager/network/2022-07-01/expressrouteserviceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/expressrouteserviceproviders` Documentation -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `expressrouteserviceproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/expressrouteserviceproviders/client.go b/resource-manager/network/2022-07-01/expressrouteserviceproviders/client.go index d071b668e37..a20fad2a136 100644 --- a/resource-manager/network/2022-07-01/expressrouteserviceproviders/client.go +++ b/resource-manager/network/2022-07-01/expressrouteserviceproviders/client.go @@ -15,7 +15,7 @@ type ExpressRouteServiceProvidersClient struct { } func NewExpressRouteServiceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/expressrouteserviceproviders/version.go b/resource-manager/network/2022-07-01/expressrouteserviceproviders/version.go index e1cff019b17..56854b33fd8 100644 --- a/resource-manager/network/2022-07-01/expressrouteserviceproviders/version.go +++ b/resource-manager/network/2022-07-01/expressrouteserviceproviders/version.go @@ -1,12 +1,10 @@ package expressrouteserviceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteserviceproviders/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/README.md b/resource-manager/network/2022-07-01/firewallpolicies/README.md index 36de1ac7c7f..176e787e23c 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/README.md +++ b/resource-manager/network/2022-07-01/firewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/firewallpolicies` Documentation -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `firewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/firewallpolicies/client.go b/resource-manager/network/2022-07-01/firewallpolicies/client.go index a162ae7a1c4..fba92b74070 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/client.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/client.go @@ -15,7 +15,7 @@ type FirewallPoliciesClient struct { } func NewFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2022-07-01/firewallpolicies/id_firewallpolicy.go index b3ab374101c..c441314efdf 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/id_firewallpolicy.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go index e13bba542e4..afb4f37a3fa 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx var model SignatureOverridesFilterValuesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go index 3317a5b3046..657d39e5a74 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Con var model QueryResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go index 0a494459f55..4ff22b6ea42 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go index 0fb145a6c0c..253dc4d8073 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx co var model SignaturesOverridesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go index 99eb2fc1d38..ebb6a03296b 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx c var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go index 2b131f1a401..51a0cf8dcc5 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_get.go b/resource-manager/network/2022-07-01/firewallpolicies/method_get.go index 2eee26d038a..c57af3124f0 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_get.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, op var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2022-07-01/firewallpolicies/method_updatetags.go index 05b103ecce7..66cfb5cb6d4 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/method_updatetags.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolic var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicies/version.go b/resource-manager/network/2022-07-01/firewallpolicies/version.go index bb6abf54203..efabeae7360 100644 --- a/resource-manager/network/2022-07-01/firewallpolicies/version.go +++ b/resource-manager/network/2022-07-01/firewallpolicies/version.go @@ -1,12 +1,10 @@ package firewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicies/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/README.md index 6ac2e882147..74157412b2f 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/README.md +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups` Documentation -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `firewallpolicyrulecollectiongroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/client.go index ef562ceb4a0..2c48ff99f6d 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/client.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/client.go @@ -15,7 +15,7 @@ type FirewallPolicyRuleCollectionGroupsClient struct { } func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go index 9a3d14e2193..d2fd507040f 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go index 5af7b6ffe79..d44dae3a1f1 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/method_get.go index 9c1602d7177..2f494c21970 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/method_get.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/method_get.go @@ -45,7 +45,6 @@ func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id Ru var model FirewallPolicyRuleCollectionGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_applicationrule.go index 7986fbe7086..2e9576abaf3 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_applicationrule.go @@ -22,8 +22,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -37,9 +47,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go index 6e9762da492..dc9f5bf1ae5 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go index 114889c0540..3a831856445 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go index 5cd71ef998a..f96fbf78c6e 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go index 30f1b958dc8..95e10cb00f1 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go index e137579ac44..6dc700c7877 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go @@ -39,7 +39,7 @@ func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) } diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_natrule.go index 5354374d68c..2e80421cd23 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_networkrule.go index 7548f48a194..90231437759 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/version.go index 91578111d53..22f31971e85 100644 --- a/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/version.go +++ b/resource-manager/network/2022-07-01/firewallpolicyrulecollectiongroups/version.go @@ -1,12 +1,10 @@ package firewallpolicyrulecollectiongroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/flowlogs/README.md b/resource-manager/network/2022-07-01/flowlogs/README.md index 30cec241b90..274ec0a6a02 100644 --- a/resource-manager/network/2022-07-01/flowlogs/README.md +++ b/resource-manager/network/2022-07-01/flowlogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/flowlogs` Documentation -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `flowlogs` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/flowlogs/client.go b/resource-manager/network/2022-07-01/flowlogs/client.go index 9368055263b..6294aac5774 100644 --- a/resource-manager/network/2022-07-01/flowlogs/client.go +++ b/resource-manager/network/2022-07-01/flowlogs/client.go @@ -15,7 +15,7 @@ type FlowLogsClient struct { } func NewFlowLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flowlogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flowlogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/flowlogs/id_flowlog.go b/resource-manager/network/2022-07-01/flowlogs/id_flowlog.go index 65f0fddaf41..5a9f158bbac 100644 --- a/resource-manager/network/2022-07-01/flowlogs/id_flowlog.go +++ b/resource-manager/network/2022-07-01/flowlogs/id_flowlog.go @@ -44,7 +44,7 @@ func ParseFlowLogID(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2022-07-01/flowlogs/id_networkwatcher.go index 480aa5be344..63ae4829745 100644 --- a/resource-manager/network/2022-07-01/flowlogs/id_networkwatcher.go +++ b/resource-manager/network/2022-07-01/flowlogs/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/flowlogs/method_get.go b/resource-manager/network/2022-07-01/flowlogs/method_get.go index 91942eff6d3..8677d660354 100644 --- a/resource-manager/network/2022-07-01/flowlogs/method_get.go +++ b/resource-manager/network/2022-07-01/flowlogs/method_get.go @@ -45,7 +45,6 @@ func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperat var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/flowlogs/method_updatetags.go b/resource-manager/network/2022-07-01/flowlogs/method_updatetags.go index 7ef9682b564..1f7aec16871 100644 --- a/resource-manager/network/2022-07-01/flowlogs/method_updatetags.go +++ b/resource-manager/network/2022-07-01/flowlogs/method_updatetags.go @@ -49,7 +49,6 @@ func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input Tags var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/flowlogs/version.go b/resource-manager/network/2022-07-01/flowlogs/version.go index 651e172cedb..3bec7ca81ef 100644 --- a/resource-manager/network/2022-07-01/flowlogs/version.go +++ b/resource-manager/network/2022-07-01/flowlogs/version.go @@ -1,12 +1,10 @@ package flowlogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flowlogs/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/ipallocations/README.md b/resource-manager/network/2022-07-01/ipallocations/README.md index 097958c5035..92f673b897d 100644 --- a/resource-manager/network/2022-07-01/ipallocations/README.md +++ b/resource-manager/network/2022-07-01/ipallocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/ipallocations` Documentation -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `ipallocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/ipallocations/client.go b/resource-manager/network/2022-07-01/ipallocations/client.go index 0450bb3a685..05538bf07b7 100644 --- a/resource-manager/network/2022-07-01/ipallocations/client.go +++ b/resource-manager/network/2022-07-01/ipallocations/client.go @@ -15,7 +15,7 @@ type IPAllocationsClient struct { } func NewIPAllocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipallocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipallocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/ipallocations/id_ipallocation.go b/resource-manager/network/2022-07-01/ipallocations/id_ipallocation.go index 1f45e0c491f..1d83039e65c 100644 --- a/resource-manager/network/2022-07-01/ipallocations/id_ipallocation.go +++ b/resource-manager/network/2022-07-01/ipallocations/id_ipallocation.go @@ -42,7 +42,7 @@ func ParseIPAllocationID(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/ipallocations/method_get.go b/resource-manager/network/2022-07-01/ipallocations/method_get.go index ad7247cf495..d7ccc3afb37 100644 --- a/resource-manager/network/2022-07-01/ipallocations/method_get.go +++ b/resource-manager/network/2022-07-01/ipallocations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ipallocations/method_updatetags.go b/resource-manager/network/2022-07-01/ipallocations/method_updatetags.go index 792fe909fcb..f6fe36ff651 100644 --- a/resource-manager/network/2022-07-01/ipallocations/method_updatetags.go +++ b/resource-manager/network/2022-07-01/ipallocations/method_updatetags.go @@ -49,7 +49,6 @@ func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ipallocations/version.go b/resource-manager/network/2022-07-01/ipallocations/version.go index be15205d8ca..dc011ea59f6 100644 --- a/resource-manager/network/2022-07-01/ipallocations/version.go +++ b/resource-manager/network/2022-07-01/ipallocations/version.go @@ -1,12 +1,10 @@ package ipallocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipallocations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/ipgroups/README.md b/resource-manager/network/2022-07-01/ipgroups/README.md index c1f2dcc1de3..00ccf61479c 100644 --- a/resource-manager/network/2022-07-01/ipgroups/README.md +++ b/resource-manager/network/2022-07-01/ipgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/ipgroups` Documentation -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `ipgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/ipgroups/client.go b/resource-manager/network/2022-07-01/ipgroups/client.go index 3e21fe9f946..2e7f5ae8116 100644 --- a/resource-manager/network/2022-07-01/ipgroups/client.go +++ b/resource-manager/network/2022-07-01/ipgroups/client.go @@ -15,7 +15,7 @@ type IPGroupsClient struct { } func NewIPGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/ipgroups/id_ipgroup.go b/resource-manager/network/2022-07-01/ipgroups/id_ipgroup.go index 7b564788b08..2f64284a5bf 100644 --- a/resource-manager/network/2022-07-01/ipgroups/id_ipgroup.go +++ b/resource-manager/network/2022-07-01/ipgroups/id_ipgroup.go @@ -42,7 +42,7 @@ func ParseIPGroupID(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/ipgroups/method_get.go b/resource-manager/network/2022-07-01/ipgroups/method_get.go index b0d5717d963..8e06e373c58 100644 --- a/resource-manager/network/2022-07-01/ipgroups/method_get.go +++ b/resource-manager/network/2022-07-01/ipgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperat var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ipgroups/method_updategroups.go b/resource-manager/network/2022-07-01/ipgroups/method_updategroups.go index 67a51b18e05..bce76083d7a 100644 --- a/resource-manager/network/2022-07-01/ipgroups/method_updategroups.go +++ b/resource-manager/network/2022-07-01/ipgroups/method_updategroups.go @@ -49,7 +49,6 @@ func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input Ta var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/ipgroups/version.go b/resource-manager/network/2022-07-01/ipgroups/version.go index 02cd6fee6ce..55cf7d2e515 100644 --- a/resource-manager/network/2022-07-01/ipgroups/version.go +++ b/resource-manager/network/2022-07-01/ipgroups/version.go @@ -1,12 +1,10 @@ package ipgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipgroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/loadbalancers/README.md b/resource-manager/network/2022-07-01/loadbalancers/README.md index bcfa80fd484..d2810cc4270 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/README.md +++ b/resource-manager/network/2022-07-01/loadbalancers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/loadbalancers` Documentation -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `loadbalancers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/loadbalancers/client.go b/resource-manager/network/2022-07-01/loadbalancers/client.go index 3d84973a709..e0ea457759e 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/client.go +++ b/resource-manager/network/2022-07-01/loadbalancers/client.go @@ -15,7 +15,7 @@ type LoadBalancersClient struct { } func NewLoadBalancersClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loadbalancers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loadbalancers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2022-07-01/loadbalancers/id_backendaddresspool.go index 57be52cf337..6d0ee475d56 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_backendaddresspool.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_backendaddresspool.go @@ -44,7 +44,7 @@ func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2022-07-01/loadbalancers/id_frontendipconfiguration.go index dd3cba98217..470370f1a3e 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_frontendipconfiguration.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_frontendipconfiguration.go @@ -44,7 +44,7 @@ func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, e } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfi } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2022-07-01/loadbalancers/id_inboundnatrule.go index a460bece352..5a1995773d8 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_inboundnatrule.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_inboundnatrule.go @@ -44,7 +44,7 @@ func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancer.go index 88235454e6a..257858a11b2 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancer.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancer.go @@ -42,7 +42,7 @@ func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancerbackendaddresspool.go index d8fafa2347f..0e0b58e2743 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancerbackendaddresspool.go @@ -44,7 +44,7 @@ func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAd } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBala } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancingrule.go index 31e911e38af..e938d9a646a 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancingrule.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_loadbalancingrule.go @@ -44,7 +44,7 @@ func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_location.go b/resource-manager/network/2022-07-01/loadbalancers/id_location.go index 4a38c5ea3e7..0789e1c81cc 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_location.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2022-07-01/loadbalancers/id_outboundrule.go index 89837637300..522e0f2f502 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_outboundrule.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/id_probe.go b/resource-manager/network/2022-07-01/loadbalancers/id_probe.go index 46ab09a65c9..7eb1da345a9 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/id_probe.go +++ b/resource-manager/network/2022-07-01/loadbalancers/id_probe.go @@ -44,7 +44,7 @@ func ParseProbeID(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProbeIDInsensitively(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_get.go b/resource-manager/network/2022-07-01/loadbalancers/method_get.go index d810f9e74fb..505149d68b4 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_get.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) Get(ctx context.Context, id LoadBalancerId, options var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2022-07-01/loadbalancers/method_inboundnatrulesget.go index 92acfa0220b..d925ef58b2c 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_inboundnatrulesget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_inboundnatrulesget.go @@ -34,6 +34,7 @@ func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundN var model InboundNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go index 96451e22451..7fef83148f3 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Cont var model BackendAddressPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go index eeb2cc8b0ed..6c16550699b 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context var model FrontendIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go index 265ec20a693..76a4fc9b62f 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Conte var model LoadBalancingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalanceroutboundrulesget.go index 5e221d46329..7d54de6e71d 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalanceroutboundrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, i var model OutboundRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerprobesget.go index 2901255109e..d67e998c327 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerprobesget.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_loadbalancerprobesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id Probe var model Probe result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/method_updatetags.go b/resource-manager/network/2022-07-01/loadbalancers/method_updatetags.go index 8087a8767fc..58f905cb767 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/method_updatetags.go +++ b/resource-manager/network/2022-07-01/loadbalancers/method_updatetags.go @@ -49,7 +49,6 @@ func (c LoadBalancersClient) UpdateTags(ctx context.Context, id LoadBalancerId, var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/loadbalancers/version.go b/resource-manager/network/2022-07-01/loadbalancers/version.go index 252e8398287..c7e9625b618 100644 --- a/resource-manager/network/2022-07-01/loadbalancers/version.go +++ b/resource-manager/network/2022-07-01/loadbalancers/version.go @@ -1,12 +1,10 @@ package loadbalancers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loadbalancers/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/README.md b/resource-manager/network/2022-07-01/localnetworkgateways/README.md index 000d4265f2b..3ae2a4b408a 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/README.md +++ b/resource-manager/network/2022-07-01/localnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/localnetworkgateways` Documentation -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `localnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/client.go b/resource-manager/network/2022-07-01/localnetworkgateways/client.go index 90a3468c9f3..c821de0dcf3 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/client.go +++ b/resource-manager/network/2022-07-01/localnetworkgateways/client.go @@ -15,7 +15,7 @@ type LocalNetworkGatewaysClient struct { } func NewLocalNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2022-07-01/localnetworkgateways/id_localnetworkgateway.go index b3c0d3a0339..840400d05c6 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/id_localnetworkgateway.go +++ b/resource-manager/network/2022-07-01/localnetworkgateways/id_localnetworkgateway.go @@ -42,7 +42,7 @@ func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGateway } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/method_get.go b/resource-manager/network/2022-07-01/localnetworkgateways/method_get.go index 08da8072f93..678e40b0064 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/method_get.go +++ b/resource-manager/network/2022-07-01/localnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGate var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2022-07-01/localnetworkgateways/method_updatetags.go index c20950665de..cacff76aaeb 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/method_updatetags.go +++ b/resource-manager/network/2022-07-01/localnetworkgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetw var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/localnetworkgateways/version.go b/resource-manager/network/2022-07-01/localnetworkgateways/version.go index 052dc443844..bb8a6829bdf 100644 --- a/resource-manager/network/2022-07-01/localnetworkgateways/version.go +++ b/resource-manager/network/2022-07-01/localnetworkgateways/version.go @@ -1,12 +1,10 @@ package localnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localnetworkgateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/natgateways/README.md b/resource-manager/network/2022-07-01/natgateways/README.md index cdb2bf06e8d..8328c0a20b4 100644 --- a/resource-manager/network/2022-07-01/natgateways/README.md +++ b/resource-manager/network/2022-07-01/natgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/natgateways` Documentation -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `natgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/natgateways/client.go b/resource-manager/network/2022-07-01/natgateways/client.go index 10d7c1f9e5f..13334ca10a1 100644 --- a/resource-manager/network/2022-07-01/natgateways/client.go +++ b/resource-manager/network/2022-07-01/natgateways/client.go @@ -15,7 +15,7 @@ type NatGatewaysClient struct { } func NewNatGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "natgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "natgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/natgateways/id_natgateway.go b/resource-manager/network/2022-07-01/natgateways/id_natgateway.go index 95f33162e5e..23f06f4143e 100644 --- a/resource-manager/network/2022-07-01/natgateways/id_natgateway.go +++ b/resource-manager/network/2022-07-01/natgateways/id_natgateway.go @@ -42,7 +42,7 @@ func ParseNatGatewayID(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/natgateways/method_get.go b/resource-manager/network/2022-07-01/natgateways/method_get.go index 1360eae2873..3997df407c6 100644 --- a/resource-manager/network/2022-07-01/natgateways/method_get.go +++ b/resource-manager/network/2022-07-01/natgateways/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options Get var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/natgateways/method_updatetags.go b/resource-manager/network/2022-07-01/natgateways/method_updatetags.go index b5dbabece39..2480442d1cd 100644 --- a/resource-manager/network/2022-07-01/natgateways/method_updatetags.go +++ b/resource-manager/network/2022-07-01/natgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, inpu var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/natgateways/version.go b/resource-manager/network/2022-07-01/natgateways/version.go index 541c283ad06..ba60ff290e7 100644 --- a/resource-manager/network/2022-07-01/natgateways/version.go +++ b/resource-manager/network/2022-07-01/natgateways/version.go @@ -1,12 +1,10 @@ package natgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/natgateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkgroups/README.md b/resource-manager/network/2022-07-01/networkgroups/README.md index b12c7dc7fc0..a5d99b33e90 100644 --- a/resource-manager/network/2022-07-01/networkgroups/README.md +++ b/resource-manager/network/2022-07-01/networkgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkgroups` Documentation -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkgroups/client.go b/resource-manager/network/2022-07-01/networkgroups/client.go index 3cfe1e1eebf..89171a64b6d 100644 --- a/resource-manager/network/2022-07-01/networkgroups/client.go +++ b/resource-manager/network/2022-07-01/networkgroups/client.go @@ -15,7 +15,7 @@ type NetworkGroupsClient struct { } func NewNetworkGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkgroups/id_networkgroup.go b/resource-manager/network/2022-07-01/networkgroups/id_networkgroup.go index e92b4d5d7c0..39885410108 100644 --- a/resource-manager/network/2022-07-01/networkgroups/id_networkgroup.go +++ b/resource-manager/network/2022-07-01/networkgroups/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkgroups/id_networkmanager.go b/resource-manager/network/2022-07-01/networkgroups/id_networkmanager.go index 58b8bb2d432..c3161f2cd00 100644 --- a/resource-manager/network/2022-07-01/networkgroups/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/networkgroups/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkgroups/method_createorupdate.go b/resource-manager/network/2022-07-01/networkgroups/method_createorupdate.go index 3ab74eeca37..89e0b5c2b0c 100644 --- a/resource-manager/network/2022-07-01/networkgroups/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/networkgroups/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroup var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkgroups/method_delete.go b/resource-manager/network/2022-07-01/networkgroups/method_delete.go index 452dbab57a9..45f93907f23 100644 --- a/resource-manager/network/2022-07-01/networkgroups/method_delete.go +++ b/resource-manager/network/2022-07-01/networkgroups/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkgroups/method_get.go b/resource-manager/network/2022-07-01/networkgroups/method_get.go index 554db15d016..503719a73d9 100644 --- a/resource-manager/network/2022-07-01/networkgroups/method_get.go +++ b/resource-manager/network/2022-07-01/networkgroups/method_get.go @@ -45,7 +45,6 @@ func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkgroups/method_list.go b/resource-manager/network/2022-07-01/networkgroups/method_list.go index cff4d8b0a7a..360af82528f 100644 --- a/resource-manager/network/2022-07-01/networkgroups/method_list.go +++ b/resource-manager/network/2022-07-01/networkgroups/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkgroups/version.go b/resource-manager/network/2022-07-01/networkgroups/version.go index ed832eb02da..452feaf41be 100644 --- a/resource-manager/network/2022-07-01/networkgroups/version.go +++ b/resource-manager/network/2022-07-01/networkgroups/version.go @@ -1,12 +1,10 @@ package networkgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkgroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/README.md b/resource-manager/network/2022-07-01/networkinterfaces/README.md index 7a2ed51ae81..0025f473550 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/README.md +++ b/resource-manager/network/2022-07-01/networkinterfaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkinterfaces` Documentation -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkinterfaces` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkinterfaces/client.go b/resource-manager/network/2022-07-01/networkinterfaces/client.go index cd098aeccdf..1edd1a6838a 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/client.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/client.go @@ -15,7 +15,7 @@ type NetworkInterfacesClient struct { } func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkinterfaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2022-07-01/networkinterfaces/id_providercloudservice.go index e3a9af48f96..bc9bc8950a3 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_providercloudservice.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstance.go index 69a75e612e0..e90397ac3f3 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstance.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstance.go @@ -44,7 +44,7 @@ func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstancenetworkinterface.go index 4a96fd5d010..b34bf43f03c 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_roleinstancenetworkinterface.go @@ -46,7 +46,7 @@ func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInte } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstan } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2022-07-01/networkinterfaces/id_tapconfiguration.go index 0778222d9c9..597762fef0e 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_tapconfiguration.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_tapconfiguration.go @@ -44,7 +44,7 @@ func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, er } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachine.go index e2f2dde8684..6642a7839e6 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachine.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachinescaleset.go index e9a264c0a89..8f394f4ab5d 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachinescaleset.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_get.go b/resource-manager/network/2022-07-01/networkinterfaces/method_get.go index e1614af681d..5a73b976c2c 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_get.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkIn var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2022-07-01/networkinterfaces/method_getcloudservicenetworkinterface.go index 7f7c58c444c..be2ca6e2e39 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_getcloudservicenetworkinterface.go @@ -34,6 +34,7 @@ func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Hea func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Con var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go index 7a3d2b45272..88f82856ae8 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *c func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx co var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go index 1bef7a3da95..4bad16270ba 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() * func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx c var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2022-07-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go index a18bdaf08cf..8c1c944f6c8 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go @@ -40,6 +40,7 @@ func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go index 90e537d0982..7134fa1ab75 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go @@ -46,7 +46,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go index 868ecfb43d5..004d700dbcd 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go @@ -45,7 +45,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx contex var model NetworkInterfaceTapConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2022-07-01/networkinterfaces/method_updatetags.go index ca8e31de55a..4365d182729 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/method_updatetags.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/method_updatetags.go @@ -50,7 +50,6 @@ func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.Ne var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkinterfaces/version.go b/resource-manager/network/2022-07-01/networkinterfaces/version.go index b1019683a8f..e0808730f21 100644 --- a/resource-manager/network/2022-07-01/networkinterfaces/version.go +++ b/resource-manager/network/2022-07-01/networkinterfaces/version.go @@ -1,12 +1,10 @@ package networkinterfaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkinterfaces/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/README.md index 713c29cc75d..014e1b39f75 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/README.md +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanageractiveconfigurations` Documentation -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanageractiveconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/client.go index fd577e53f33..cc689379d3c 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/client.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConfigurationsClient struct { } func NewNetworkManagerActiveConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/id_networkmanager.go index ee0e5e5a9c8..c150737480a 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go index 0a882c8e731..a9250ed79d9 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(c var model ActiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go index c19193dfd82..4035af8f6cf 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ActiveBaseSecurityAdminRule interface { + ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl } -// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ActiveBaseSecurityAdminRule = BaseActiveBaseSecurityAdminRuleImpl{} + +type BaseActiveBaseSecurityAdminRuleImpl struct { + CommitTime *string `json:"commitTime,omitempty"` + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + Region *string `json:"region,omitempty"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s +} + +var _ ActiveBaseSecurityAdminRule = RawActiveBaseSecurityAdminRuleImpl{} + +// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + activeBaseSecurityAdminRule BaseActiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s.activeBaseSecurityAdminRule } -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { +func UnmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBas return out, nil } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseActiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawActiveBaseSecurityAdminRuleImpl{ + activeBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go index 371ee82ef8c..e708927c42d 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveDefaultSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go index 70266c6ff7c..18ae717f1d0 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go index c9007f5e0f3..aaef95bec26 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ActiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalActiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/version.go index 65be468db08..a3203239155 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/version.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/README.md index 64d87a5a659..46a89d5bc33 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/README.md +++ b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations` Documentation -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/client.go index 25282a2bad5..68760af7c25 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/client.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConnectivityConfigurationsClient struct { } func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go index 4b1919fa120..135b3993f41 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go index a4c1e51550d..023b82524c0 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnecti var model ActiveConnectivityConfigurationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/version.go index bbda20b396a..6085d68a73b 100644 --- a/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/version.go +++ b/resource-manager/network/2022-07-01/networkmanageractiveconnectivityconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconnectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/README.md b/resource-manager/network/2022-07-01/networkmanagerconnections/README.md index d4ae19e926c..015581618cc 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/README.md +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanagerconnections` Documentation -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanagerconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/client.go b/resource-manager/network/2022-07-01/networkmanagerconnections/client.go index 3cfa72a376e..809f42be879 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/client.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/client.go @@ -15,7 +15,7 @@ type NetworkManagerConnectionsClient struct { } func NewNetworkManagerConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagerconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagerconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2022-07-01/networkmanagerconnections/id_networkmanagerconnection.go index 066e316e2cb..d73f48f473a 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/id_networkmanagerconnection.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/id_networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManager } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2022-07-01/networkmanagerconnections/id_providers2networkmanagerconnection.go index 81d73abef15..4f196eba08a 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/id_providers2networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2Network } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Prov } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go index cddf4364027..116a8f3da7a 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go index 9e0447e4aea..c4f20220fbe 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go index 3e9eb347a20..d8b68e162ab 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders( func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go index 4447d41cf06..2d07c99634c 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCr var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go index 5f0b27a080c..4b89ca96feb 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGe var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go index ddf403e8a21..a08f8b1adfc 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() * func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkmanagerconnections/version.go b/resource-manager/network/2022-07-01/networkmanagerconnections/version.go index 573164dd008..1a65704de78 100644 --- a/resource-manager/network/2022-07-01/networkmanagerconnections/version.go +++ b/resource-manager/network/2022-07-01/networkmanagerconnections/version.go @@ -1,12 +1,10 @@ package networkmanagerconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagerconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/README.md index e244519b2e4..b7eda68ba51 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration` Documentation -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/client.go index 2f234ee82ef..c6449e001fe 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveConnectivityConfigurationClient struct { } func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go index d752edf32eb..64233acc195 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManag var model NetworkManagerEffectiveConnectivityConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/version.go index 738b87db371..38703ff6234 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectiveconnectivityconfiguration/version.go @@ -1,12 +1,10 @@ package networkmanagereffectiveconnectivityconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/README.md index dddea001036..a303a666d4a 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/README.md +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules` Documentation -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/client.go index c83126c132c..5685e9afd82 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/client.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveSecurityAdminRulesClient struct { } func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go index a69d081c810..50c941d8756 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffec var model NetworkManagerEffectiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go index 9ef5715f8e4..2cb1228a910 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EffectiveBaseSecurityAdminRule interface { + EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl } -// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EffectiveBaseSecurityAdminRule = BaseEffectiveBaseSecurityAdminRuleImpl{} + +type BaseEffectiveBaseSecurityAdminRuleImpl struct { + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s +} + +var _ EffectiveBaseSecurityAdminRule = RawEffectiveBaseSecurityAdminRuleImpl{} + +// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + effectiveBaseSecurityAdminRule BaseEffectiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s.effectiveBaseSecurityAdminRule } -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { +func UnmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (Effect return out, nil } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseEffectiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEffectiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawEffectiveBaseSecurityAdminRuleImpl{ + effectiveBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go index 17d5e7fdeb7..89d5f651a9f 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveDefaultSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go index ae90f9154f9..8fcf50ed898 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveSecurityAdminRule{} func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go index 941c8a93ed6..7e1ac278430 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(byte output := make([]EffectiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalEffectiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/version.go index ff20a5815e6..eda0931cd65 100644 --- a/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/version.go +++ b/resource-manager/network/2022-07-01/networkmanagereffectivesecurityadminrules/version.go @@ -1,12 +1,10 @@ package networkmanagereffectivesecurityadminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkmanagers/README.md b/resource-manager/network/2022-07-01/networkmanagers/README.md index dc124a380b8..69c0b5703be 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/README.md +++ b/resource-manager/network/2022-07-01/networkmanagers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkmanagers` Documentation -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkmanagers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkmanagers/client.go b/resource-manager/network/2022-07-01/networkmanagers/client.go index b27df28e126..64a4e799646 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/client.go +++ b/resource-manager/network/2022-07-01/networkmanagers/client.go @@ -15,7 +15,7 @@ type NetworkManagersClient struct { } func NewNetworkManagersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2022-07-01/networkmanagers/id_networkmanager.go index 63481203294..001e7f6c2a4 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/networkmanagers/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2022-07-01/networkmanagers/method_createorupdate.go index 5fb5c949cd6..cdce0892e43 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkMan var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_delete.go b/resource-manager/network/2022-07-01/networkmanagers/method_delete.go index 016216c8549..a9619efb0e2 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_delete.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_get.go b/resource-manager/network/2022-07-01/networkmanagers/method_get.go index c9f3acddeae..ed6b5d9ec82 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_get.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (re var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_list.go b/resource-manager/network/2022-07-01/networkmanagers/method_list.go index 86b71cf2d94..902c41d52b3 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_list.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2022-07-01/networkmanagers/method_listbysubscription.go index d45e89952b8..d1e8f2d72a3 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_listbysubscription.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2022-07-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go index f9a88725d0f..db1a1d144ac 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Co var model NetworkManagerDeploymentStatusListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagers/method_patch.go b/resource-manager/network/2022-07-01/networkmanagers/method_patch.go index e3810b6e4b4..4aae0d60709 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/method_patch.go +++ b/resource-manager/network/2022-07-01/networkmanagers/method_patch.go @@ -49,7 +49,6 @@ func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, i var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkmanagers/version.go b/resource-manager/network/2022-07-01/networkmanagers/version.go index 3cbf73e17c9..319ea011c88 100644 --- a/resource-manager/network/2022-07-01/networkmanagers/version.go +++ b/resource-manager/network/2022-07-01/networkmanagers/version.go @@ -1,12 +1,10 @@ package networkmanagers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagers/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkprofiles/README.md b/resource-manager/network/2022-07-01/networkprofiles/README.md index bc15cd06756..630d7c1e4ed 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/README.md +++ b/resource-manager/network/2022-07-01/networkprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkprofiles` Documentation -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkprofiles` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkprofiles/client.go b/resource-manager/network/2022-07-01/networkprofiles/client.go index 17b4bf31068..33a4e0626aa 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/client.go +++ b/resource-manager/network/2022-07-01/networkprofiles/client.go @@ -15,7 +15,7 @@ type NetworkProfilesClient struct { } func NewNetworkProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2022-07-01/networkprofiles/id_networkprofile.go index b1bbf9c9343..6e0804b6679 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/id_networkprofile.go +++ b/resource-manager/network/2022-07-01/networkprofiles/id_networkprofile.go @@ -42,7 +42,7 @@ func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2022-07-01/networkprofiles/method_createorupdate.go index 94d3a856780..24ed5940195 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/networkprofiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkPro var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkprofiles/method_get.go b/resource-manager/network/2022-07-01/networkprofiles/method_get.go index 13f98955470..a0149c188f7 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/method_get.go +++ b/resource-manager/network/2022-07-01/networkprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, opt var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkprofiles/method_updatetags.go b/resource-manager/network/2022-07-01/networkprofiles/method_updatetags.go index f0bfb2f14f7..757952def30 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/method_updatetags.go +++ b/resource-manager/network/2022-07-01/networkprofiles/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfile var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkprofiles/version.go b/resource-manager/network/2022-07-01/networkprofiles/version.go index d82658f335b..f3da80305e5 100644 --- a/resource-manager/network/2022-07-01/networkprofiles/version.go +++ b/resource-manager/network/2022-07-01/networkprofiles/version.go @@ -1,12 +1,10 @@ package networkprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkprofiles/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/README.md b/resource-manager/network/2022-07-01/networksecuritygroups/README.md index 3b823de7c41..79fe9c96a98 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/README.md +++ b/resource-manager/network/2022-07-01/networksecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networksecuritygroups` Documentation -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networksecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/client.go b/resource-manager/network/2022-07-01/networksecuritygroups/client.go index a8d26110c7c..d490fa41c78 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/client.go +++ b/resource-manager/network/2022-07-01/networksecuritygroups/client.go @@ -15,7 +15,7 @@ type NetworkSecurityGroupsClient struct { } func NewNetworkSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2022-07-01/networksecuritygroups/id_networksecuritygroup.go index 4ab431d74a9..0dbb8c9fcd5 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/id_networksecuritygroup.go +++ b/resource-manager/network/2022-07-01/networksecuritygroups/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/method_get.go b/resource-manager/network/2022-07-01/networksecuritygroups/method_get.go index 6ebe50d00e5..7728917c0ec 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/method_get.go +++ b/resource-manager/network/2022-07-01/networksecuritygroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurity var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2022-07-01/networksecuritygroups/method_updatetags.go index 362cad00c7d..6f4b2cd3ce6 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/method_updatetags.go +++ b/resource-manager/network/2022-07-01/networksecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkS var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networksecuritygroups/version.go b/resource-manager/network/2022-07-01/networksecuritygroups/version.go index 4c00f1d2196..0e0d4f5c52c 100644 --- a/resource-manager/network/2022-07-01/networksecuritygroups/version.go +++ b/resource-manager/network/2022-07-01/networksecuritygroups/version.go @@ -1,12 +1,10 @@ package networksecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecuritygroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/README.md b/resource-manager/network/2022-07-01/networkvirtualappliances/README.md index 7cd12dd91b7..e2bd05f2180 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/README.md +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkvirtualappliances` Documentation -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkvirtualappliances` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/client.go b/resource-manager/network/2022-07-01/networkvirtualappliances/client.go index cfaeae574de..ab8d70fafa5 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/client.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/client.go @@ -15,7 +15,7 @@ type NetworkVirtualAppliancesClient struct { } func NewNetworkVirtualAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkvirtualappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkvirtualappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2022-07-01/networkvirtualappliances/id_inboundsecurityrule.go index d920466b92f..375fab1ff84 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/id_inboundsecurityrule.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/id_inboundsecurityrule.go @@ -44,7 +44,7 @@ func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRule } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2022-07-01/networkvirtualappliances/id_networkvirtualappliance.go index f222e101e79..db7766b52a7 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/id_networkvirtualappliance.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/method_get.go b/resource-manager/network/2022-07-01/networkvirtualappliances/method_get.go index 36076f68749..2310883a448 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/method_get.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtu var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2022-07-01/networkvirtualappliances/method_updatetags.go index 25a5f9e94c5..a8a8391f4a4 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/method_updatetags.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id Netwo var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkvirtualappliances/version.go b/resource-manager/network/2022-07-01/networkvirtualappliances/version.go index 97667631098..80c4db3a77a 100644 --- a/resource-manager/network/2022-07-01/networkvirtualappliances/version.go +++ b/resource-manager/network/2022-07-01/networkvirtualappliances/version.go @@ -1,12 +1,10 @@ package networkvirtualappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkvirtualappliances/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/networkwatchers/README.md b/resource-manager/network/2022-07-01/networkwatchers/README.md index fca20f366df..a42df83b2d4 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/README.md +++ b/resource-manager/network/2022-07-01/networkwatchers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/networkwatchers` Documentation -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `networkwatchers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/networkwatchers/client.go b/resource-manager/network/2022-07-01/networkwatchers/client.go index 2068ab14817..b544d19c206 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/client.go +++ b/resource-manager/network/2022-07-01/networkwatchers/client.go @@ -15,7 +15,7 @@ type NetworkWatchersClient struct { } func NewNetworkWatchersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkwatchers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkwatchers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2022-07-01/networkwatchers/id_networkwatcher.go index b8bb1f7f4a6..cd247fb8659 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/id_networkwatcher.go +++ b/resource-manager/network/2022-07-01/networkwatchers/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2022-07-01/networkwatchers/method_createorupdate.go index ecb006e2007..5881c4d5c10 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWat var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_get.go b/resource-manager/network/2022-07-01/networkwatchers/method_get.go index 000ae087b18..1c429aeb42d 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_get.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (re var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_gettopology.go b/resource-manager/network/2022-07-01/networkwatchers/method_gettopology.go index 8a1c6caef60..68afb0d8206 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_gettopology.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_gettopology.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatche var model Topology result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_list.go b/resource-manager/network/2022-07-01/networkwatchers/method_list.go index 8263c7b4f93..36d57f04fef 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_list.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_list.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGr var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_listall.go b/resource-manager/network/2022-07-01/networkwatchers/method_listall.go index 845a2449946..b8bd8d8d4a6 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_listall.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_listall.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.Subscri var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/method_updatetags.go b/resource-manager/network/2022-07-01/networkwatchers/method_updatetags.go index 1ace78e7dc5..0ad45fd1f1a 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/method_updatetags.go +++ b/resource-manager/network/2022-07-01/networkwatchers/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcher var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/networkwatchers/version.go b/resource-manager/network/2022-07-01/networkwatchers/version.go index ba3be395857..bb6df1589aa 100644 --- a/resource-manager/network/2022-07-01/networkwatchers/version.go +++ b/resource-manager/network/2022-07-01/networkwatchers/version.go @@ -1,12 +1,10 @@ package networkwatchers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkwatchers/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/p2svpngateways/README.md b/resource-manager/network/2022-07-01/p2svpngateways/README.md index 4c7c57f26f7..0c9c00bfe4f 100644 --- a/resource-manager/network/2022-07-01/p2svpngateways/README.md +++ b/resource-manager/network/2022-07-01/p2svpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/p2svpngateways` Documentation -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `p2svpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/p2svpngateways/client.go b/resource-manager/network/2022-07-01/p2svpngateways/client.go index 3d458041de0..b2a2ec08b88 100644 --- a/resource-manager/network/2022-07-01/p2svpngateways/client.go +++ b/resource-manager/network/2022-07-01/p2svpngateways/client.go @@ -15,7 +15,7 @@ type P2sVpnGatewaysClient struct { } func NewP2sVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "p2svpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "p2svpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/p2svpngateways/version.go b/resource-manager/network/2022-07-01/p2svpngateways/version.go index 3101a24c2d3..e449043cd3f 100644 --- a/resource-manager/network/2022-07-01/p2svpngateways/version.go +++ b/resource-manager/network/2022-07-01/p2svpngateways/version.go @@ -1,12 +1,10 @@ package p2svpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/p2svpngateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/packetcaptures/README.md b/resource-manager/network/2022-07-01/packetcaptures/README.md index ddbbc379759..d5518b0478b 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/README.md +++ b/resource-manager/network/2022-07-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/packetcaptures/client.go b/resource-manager/network/2022-07-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/client.go +++ b/resource-manager/network/2022-07-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2022-07-01/packetcaptures/id_networkwatcher.go index d9eafa5f099..a91b97fdd2d 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/id_networkwatcher.go +++ b/resource-manager/network/2022-07-01/packetcaptures/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2022-07-01/packetcaptures/id_packetcapture.go index 8b30ad1ebd6..ad0eee13f69 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/network/2022-07-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/packetcaptures/method_get.go b/resource-manager/network/2022-07-01/packetcaptures/method_get.go index 2226c032bea..9f32b393d10 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/method_get.go +++ b/resource-manager/network/2022-07-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCaptureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/packetcaptures/method_list.go b/resource-manager/network/2022-07-01/packetcaptures/method_list.go index 49bbc661b3c..08e6f424863 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/method_list.go +++ b/resource-manager/network/2022-07-01/packetcaptures/method_list.go @@ -46,7 +46,6 @@ func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (re var model PacketCaptureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/packetcaptures/version.go b/resource-manager/network/2022-07-01/packetcaptures/version.go index 4749118a673..2a8e2c1e98d 100644 --- a/resource-manager/network/2022-07-01/packetcaptures/version.go +++ b/resource-manager/network/2022-07-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/README.md index cd66f542eb2..4c905a4f821 100644 --- a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/README.md +++ b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections` Documentation -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `peerexpressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/client.go index c0c578a280f..6f26d87afd5 100644 --- a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/client.go +++ b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type PeerExpressRouteCircuitConnectionsClient struct { } func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/id_peerconnection.go index 6bde16a10c5..3b236cf50cf 100644 --- a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/id_peerconnection.go @@ -46,7 +46,7 @@ func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/method_get.go index 844c3c67e07..554ac17ad6f 100644 --- a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Pe var model PeerExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/version.go index 5dc25f57b46..432eeee1f1e 100644 --- a/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/version.go +++ b/resource-manager/network/2022-07-01/peerexpressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package peerexpressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/README.md b/resource-manager/network/2022-07-01/privatednszonegroups/README.md index 62bb38edbec..f9a07ad5523 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/README.md +++ b/resource-manager/network/2022-07-01/privatednszonegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/privatednszonegroups` Documentation -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `privatednszonegroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/client.go b/resource-manager/network/2022-07-01/privatednszonegroups/client.go index 99ce8b6667e..58e48fe8e2e 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/client.go +++ b/resource-manager/network/2022-07-01/privatednszonegroups/client.go @@ -15,7 +15,7 @@ type PrivateDnsZoneGroupsClient struct { } func NewPrivateDnsZoneGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatednszonegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatednszonegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2022-07-01/privatednszonegroups/id_privatednszonegroup.go index 9399f9157d3..fe0858951a1 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/id_privatednszonegroup.go +++ b/resource-manager/network/2022-07-01/privatednszonegroups/id_privatednszonegroup.go @@ -44,7 +44,7 @@ func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroup } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2022-07-01/privatednszonegroups/id_privateendpoint.go index a9f6cc5dff2..48424e8ccb0 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/id_privateendpoint.go +++ b/resource-manager/network/2022-07-01/privatednszonegroups/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/method_get.go b/resource-manager/network/2022-07-01/privatednszonegroups/method_get.go index 3c25fca99b7..b0a317bbf4d 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/method_get.go +++ b/resource-manager/network/2022-07-01/privatednszonegroups/method_get.go @@ -45,7 +45,6 @@ func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGr var model PrivateDnsZoneGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/privatednszonegroups/version.go b/resource-manager/network/2022-07-01/privatednszonegroups/version.go index b95aa2c99d8..b7218534f54 100644 --- a/resource-manager/network/2022-07-01/privatednszonegroups/version.go +++ b/resource-manager/network/2022-07-01/privatednszonegroups/version.go @@ -1,12 +1,10 @@ package privatednszonegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatednszonegroups/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/privateendpoints/README.md b/resource-manager/network/2022-07-01/privateendpoints/README.md index 17fdce57327..399980c60d0 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/README.md +++ b/resource-manager/network/2022-07-01/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/privateendpoints/client.go b/resource-manager/network/2022-07-01/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/client.go +++ b/resource-manager/network/2022-07-01/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/privateendpoints/id_location.go b/resource-manager/network/2022-07-01/privateendpoints/id_location.go index 54b43b4b1f2..60987a25fc6 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/id_location.go +++ b/resource-manager/network/2022-07-01/privateendpoints/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2022-07-01/privateendpoints/id_privateendpoint.go index a104325012e..4d39c6d7e38 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/id_privateendpoint.go +++ b/resource-manager/network/2022-07-01/privateendpoints/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2022-07-01/privateendpoints/id_providerlocation.go index a70739b937d..eaf3b344f24 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/id_providerlocation.go +++ b/resource-manager/network/2022-07-01/privateendpoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privateendpoints/method_get.go b/resource-manager/network/2022-07-01/privateendpoints/method_get.go index 80cad93eef6..559e0f436c5 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/method_get.go +++ b/resource-manager/network/2022-07-01/privateendpoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, o var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/privateendpoints/version.go b/resource-manager/network/2022-07-01/privateendpoints/version.go index 67c36b59e93..c4241f251bb 100644 --- a/resource-manager/network/2022-07-01/privateendpoints/version.go +++ b/resource-manager/network/2022-07-01/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/README.md b/resource-manager/network/2022-07-01/privatelinkservices/README.md index b5a5e4b040e..4cebedf9935 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/README.md +++ b/resource-manager/network/2022-07-01/privatelinkservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/privatelinkservices` Documentation -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `privatelinkservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/privatelinkservices/client.go b/resource-manager/network/2022-07-01/privatelinkservices/client.go index 5bd46867c3e..e097e552e3f 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/client.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/client.go @@ -15,7 +15,7 @@ type PrivateLinkServicesClient struct { } func NewPrivateLinkServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/id_location.go b/resource-manager/network/2022-07-01/privatelinkservices/id_location.go index 34e4ed80520..1b7d6fc81eb 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/id_location.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2022-07-01/privatelinkservices/id_privateendpointconnection.go index 3f98898492d..ed686302aed 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/id_privateendpointconnection.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2022-07-01/privatelinkservices/id_privatelinkservice.go index d88a974cca5..331d16ea3b2 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/id_privatelinkservice.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/id_privatelinkservice.go @@ -42,7 +42,7 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2022-07-01/privatelinkservices/id_providerlocation.go index c7433defeb6..2bb416453e6 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/id_providerlocation.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/method_get.go b/resource-manager/network/2022-07-01/privatelinkservices/method_get.go index 87bddc4d4aa..3be1df5bb53 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/method_get.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServic var model PrivateLinkService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2022-07-01/privatelinkservices/method_getprivateendpointconnection.go index 032d2076254..7690b7c62af 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/method_getprivateendpointconnection.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/method_getprivateendpointconnection.go @@ -34,6 +34,7 @@ func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Header func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Cont var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2022-07-01/privatelinkservices/method_updateprivateendpointconnection.go index 90a383fd3a1..b108db06f2a 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/method_updateprivateendpointconnection.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/method_updateprivateendpointconnection.go @@ -49,7 +49,6 @@ func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.C var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/privatelinkservices/version.go b/resource-manager/network/2022-07-01/privatelinkservices/version.go index 7aa947dcc6f..586f5969d3e 100644 --- a/resource-manager/network/2022-07-01/privatelinkservices/version.go +++ b/resource-manager/network/2022-07-01/privatelinkservices/version.go @@ -1,12 +1,10 @@ package privatelinkservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkservices/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/publicipaddresses/README.md b/resource-manager/network/2022-07-01/publicipaddresses/README.md index 9b29ce66845..a0d97aa60ba 100644 --- a/resource-manager/network/2022-07-01/publicipaddresses/README.md +++ b/resource-manager/network/2022-07-01/publicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/publicipaddresses` Documentation -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `publicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/publicipaddresses/client.go b/resource-manager/network/2022-07-01/publicipaddresses/client.go index 4c28c537385..54f2b0113c7 100644 --- a/resource-manager/network/2022-07-01/publicipaddresses/client.go +++ b/resource-manager/network/2022-07-01/publicipaddresses/client.go @@ -15,7 +15,7 @@ type PublicIPAddressesClient struct { } func NewPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/publicipaddresses/method_get.go b/resource-manager/network/2022-07-01/publicipaddresses/method_get.go index 7045aad8372..2548c9b4db6 100644 --- a/resource-manager/network/2022-07-01/publicipaddresses/method_get.go +++ b/resource-manager/network/2022-07-01/publicipaddresses/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPA var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2022-07-01/publicipaddresses/method_updatetags.go index 55be79fcfce..622a0a8c202 100644 --- a/resource-manager/network/2022-07-01/publicipaddresses/method_updatetags.go +++ b/resource-manager/network/2022-07-01/publicipaddresses/method_updatetags.go @@ -50,7 +50,6 @@ func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.Pu var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/publicipaddresses/version.go b/resource-manager/network/2022-07-01/publicipaddresses/version.go index 8656a251427..45439e413c1 100644 --- a/resource-manager/network/2022-07-01/publicipaddresses/version.go +++ b/resource-manager/network/2022-07-01/publicipaddresses/version.go @@ -1,12 +1,10 @@ package publicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipaddresses/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/publicipprefixes/README.md b/resource-manager/network/2022-07-01/publicipprefixes/README.md index b47c173362e..ef51247abf9 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/README.md +++ b/resource-manager/network/2022-07-01/publicipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/publicipprefixes` Documentation -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `publicipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/publicipprefixes/client.go b/resource-manager/network/2022-07-01/publicipprefixes/client.go index 7dfe8ac9af1..78db8973387 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/client.go +++ b/resource-manager/network/2022-07-01/publicipprefixes/client.go @@ -15,7 +15,7 @@ type PublicIPPrefixesClient struct { } func NewPublicIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2022-07-01/publicipprefixes/id_publicipprefix.go index 2fe61b6d66b..b985530d0a2 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/id_publicipprefix.go +++ b/resource-manager/network/2022-07-01/publicipprefixes/id_publicipprefix.go @@ -42,7 +42,7 @@ func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/publicipprefixes/method_get.go b/resource-manager/network/2022-07-01/publicipprefixes/method_get.go index 15104f80613..4d05c32931a 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/method_get.go +++ b/resource-manager/network/2022-07-01/publicipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, op var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2022-07-01/publicipprefixes/method_updatetags.go index e5257fc9717..3111479b00a 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/method_updatetags.go +++ b/resource-manager/network/2022-07-01/publicipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefi var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/publicipprefixes/version.go b/resource-manager/network/2022-07-01/publicipprefixes/version.go index 54cc200f7ed..1eb83da5b35 100644 --- a/resource-manager/network/2022-07-01/publicipprefixes/version.go +++ b/resource-manager/network/2022-07-01/publicipprefixes/version.go @@ -1,12 +1,10 @@ package publicipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipprefixes/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/routefilterrules/README.md b/resource-manager/network/2022-07-01/routefilterrules/README.md index 3da8f39c4c8..fb914e2ecba 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/README.md +++ b/resource-manager/network/2022-07-01/routefilterrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/routefilterrules` Documentation -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `routefilterrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/routefilterrules/client.go b/resource-manager/network/2022-07-01/routefilterrules/client.go index 018917d75d9..87a6916e467 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/client.go +++ b/resource-manager/network/2022-07-01/routefilterrules/client.go @@ -15,7 +15,7 @@ type RouteFilterRulesClient struct { } func NewRouteFilterRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilterrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilterrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/routefilterrules/id_routefilter.go b/resource-manager/network/2022-07-01/routefilterrules/id_routefilter.go index fc7b97a96ea..eadf8a32c02 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/id_routefilter.go +++ b/resource-manager/network/2022-07-01/routefilterrules/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2022-07-01/routefilterrules/id_routefilterrule.go index ef13326b0c4..39bf905aaa7 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/id_routefilterrule.go +++ b/resource-manager/network/2022-07-01/routefilterrules/id_routefilterrule.go @@ -44,7 +44,7 @@ func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, erro } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routefilterrules/method_get.go b/resource-manager/network/2022-07-01/routefilterrules/method_get.go index c28ac994637..66ebdba141b 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/method_get.go +++ b/resource-manager/network/2022-07-01/routefilterrules/method_get.go @@ -45,7 +45,6 @@ func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) ( var model RouteFilterRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routefilterrules/version.go b/resource-manager/network/2022-07-01/routefilterrules/version.go index 682d9581b14..021992373ee 100644 --- a/resource-manager/network/2022-07-01/routefilterrules/version.go +++ b/resource-manager/network/2022-07-01/routefilterrules/version.go @@ -1,12 +1,10 @@ package routefilterrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilterrules/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/routefilters/README.md b/resource-manager/network/2022-07-01/routefilters/README.md index 513b72c18aa..a1de7bb281c 100644 --- a/resource-manager/network/2022-07-01/routefilters/README.md +++ b/resource-manager/network/2022-07-01/routefilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/routefilters` Documentation -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `routefilters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/routefilters/client.go b/resource-manager/network/2022-07-01/routefilters/client.go index e4faeb1d622..5bf2183b43d 100644 --- a/resource-manager/network/2022-07-01/routefilters/client.go +++ b/resource-manager/network/2022-07-01/routefilters/client.go @@ -15,7 +15,7 @@ type RouteFiltersClient struct { } func NewRouteFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/routefilters/id_routefilter.go b/resource-manager/network/2022-07-01/routefilters/id_routefilter.go index 18b55731fae..886fbf82cdd 100644 --- a/resource-manager/network/2022-07-01/routefilters/id_routefilter.go +++ b/resource-manager/network/2022-07-01/routefilters/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routefilters/method_get.go b/resource-manager/network/2022-07-01/routefilters/method_get.go index d44bd6d46b0..f57a061fb52 100644 --- a/resource-manager/network/2022-07-01/routefilters/method_get.go +++ b/resource-manager/network/2022-07-01/routefilters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options G var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routefilters/method_updatetags.go b/resource-manager/network/2022-07-01/routefilters/method_updatetags.go index 33bbd5301d9..5fe88949683 100644 --- a/resource-manager/network/2022-07-01/routefilters/method_updatetags.go +++ b/resource-manager/network/2022-07-01/routefilters/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, in var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routefilters/version.go b/resource-manager/network/2022-07-01/routefilters/version.go index 1670dc71d27..74951645eef 100644 --- a/resource-manager/network/2022-07-01/routefilters/version.go +++ b/resource-manager/network/2022-07-01/routefilters/version.go @@ -1,12 +1,10 @@ package routefilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilters/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/routes/README.md b/resource-manager/network/2022-07-01/routes/README.md index fb5f51d6303..499db7fcb09 100644 --- a/resource-manager/network/2022-07-01/routes/README.md +++ b/resource-manager/network/2022-07-01/routes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/routes` Documentation -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `routes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/routes/client.go b/resource-manager/network/2022-07-01/routes/client.go index 4372f694741..88e9f135cd1 100644 --- a/resource-manager/network/2022-07-01/routes/client.go +++ b/resource-manager/network/2022-07-01/routes/client.go @@ -15,7 +15,7 @@ type RoutesClient struct { } func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/routes/id_route.go b/resource-manager/network/2022-07-01/routes/id_route.go index c9e2c02ee1f..d306345db01 100644 --- a/resource-manager/network/2022-07-01/routes/id_route.go +++ b/resource-manager/network/2022-07-01/routes/id_route.go @@ -44,7 +44,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routes/id_routetable.go b/resource-manager/network/2022-07-01/routes/id_routetable.go index 459719bc26c..66672514db4 100644 --- a/resource-manager/network/2022-07-01/routes/id_routetable.go +++ b/resource-manager/network/2022-07-01/routes/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routes/method_get.go b/resource-manager/network/2022-07-01/routes/method_get.go index 8f641d28c5b..306c6528c39 100644 --- a/resource-manager/network/2022-07-01/routes/method_get.go +++ b/resource-manager/network/2022-07-01/routes/method_get.go @@ -45,7 +45,6 @@ func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationR var model Route result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routes/version.go b/resource-manager/network/2022-07-01/routes/version.go index 328fbdb296f..0ad84d796b0 100644 --- a/resource-manager/network/2022-07-01/routes/version.go +++ b/resource-manager/network/2022-07-01/routes/version.go @@ -1,12 +1,10 @@ package routes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routes/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/routetables/README.md b/resource-manager/network/2022-07-01/routetables/README.md index 495b372806b..09621357075 100644 --- a/resource-manager/network/2022-07-01/routetables/README.md +++ b/resource-manager/network/2022-07-01/routetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/routetables` Documentation -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `routetables` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/routetables/client.go b/resource-manager/network/2022-07-01/routetables/client.go index 26c9fb104ad..b52049cd5f7 100644 --- a/resource-manager/network/2022-07-01/routetables/client.go +++ b/resource-manager/network/2022-07-01/routetables/client.go @@ -15,7 +15,7 @@ type RouteTablesClient struct { } func NewRouteTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/routetables/id_routetable.go b/resource-manager/network/2022-07-01/routetables/id_routetable.go index 0f3c938daf7..0d24a6b252f 100644 --- a/resource-manager/network/2022-07-01/routetables/id_routetable.go +++ b/resource-manager/network/2022-07-01/routetables/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/routetables/method_get.go b/resource-manager/network/2022-07-01/routetables/method_get.go index cb19ef16deb..6a2409acbfb 100644 --- a/resource-manager/network/2022-07-01/routetables/method_get.go +++ b/resource-manager/network/2022-07-01/routetables/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options Get var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routetables/method_updatetags.go b/resource-manager/network/2022-07-01/routetables/method_updatetags.go index b2db87b8208..258335fc600 100644 --- a/resource-manager/network/2022-07-01/routetables/method_updatetags.go +++ b/resource-manager/network/2022-07-01/routetables/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, inpu var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/routetables/version.go b/resource-manager/network/2022-07-01/routetables/version.go index 3cfcbb77c86..50acddffbe8 100644 --- a/resource-manager/network/2022-07-01/routetables/version.go +++ b/resource-manager/network/2022-07-01/routetables/version.go @@ -1,12 +1,10 @@ package routetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routetables/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/scopeconnections/README.md b/resource-manager/network/2022-07-01/scopeconnections/README.md index 134ebf1fd97..c195aa18235 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/README.md +++ b/resource-manager/network/2022-07-01/scopeconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/scopeconnections` Documentation -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `scopeconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/scopeconnections/client.go b/resource-manager/network/2022-07-01/scopeconnections/client.go index aa7247e35c7..81942e9b5e9 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/client.go +++ b/resource-manager/network/2022-07-01/scopeconnections/client.go @@ -15,7 +15,7 @@ type ScopeConnectionsClient struct { } func NewScopeConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopeconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopeconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2022-07-01/scopeconnections/id_networkmanager.go index 259fe7f2afa..23c26353215 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/scopeconnections/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2022-07-01/scopeconnections/id_scopeconnection.go index dd1d78f3b94..07c786f0070 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/id_scopeconnection.go +++ b/resource-manager/network/2022-07-01/scopeconnections/id_scopeconnection.go @@ -44,7 +44,7 @@ func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, erro } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2022-07-01/scopeconnections/method_createorupdate.go index c0784b21bd5..08383ec6587 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/scopeconnections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConn var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/scopeconnections/method_get.go b/resource-manager/network/2022-07-01/scopeconnections/method_get.go index 97616b65ce8..67789a31c53 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/method_get.go +++ b/resource-manager/network/2022-07-01/scopeconnections/method_get.go @@ -45,7 +45,6 @@ func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) ( var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/scopeconnections/method_list.go b/resource-manager/network/2022-07-01/scopeconnections/method_list.go index c819623c65e..c9f73b61411 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/method_list.go +++ b/resource-manager/network/2022-07-01/scopeconnections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/scopeconnections/version.go b/resource-manager/network/2022-07-01/scopeconnections/version.go index f826434ba1d..23485d7cd73 100644 --- a/resource-manager/network/2022-07-01/scopeconnections/version.go +++ b/resource-manager/network/2022-07-01/scopeconnections/version.go @@ -1,12 +1,10 @@ package scopeconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopeconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/README.md b/resource-manager/network/2022-07-01/securityadminconfigurations/README.md index de4fead8972..55f83f6617f 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/README.md +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/securityadminconfigurations` Documentation -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `securityadminconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/client.go b/resource-manager/network/2022-07-01/securityadminconfigurations/client.go index 7629a2dcefb..c4acda9a655 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/client.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/client.go @@ -15,7 +15,7 @@ type SecurityAdminConfigurationsClient struct { } func NewSecurityAdminConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityadminconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityadminconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2022-07-01/securityadminconfigurations/id_networkmanager.go index cc45635d1cc..4e824ae225e 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/id_networkmanager.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2022-07-01/securityadminconfigurations/id_securityadminconfiguration.go index c481f6a158b..1791024e094 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/id_securityadminconfiguration.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2022-07-01/securityadminconfigurations/method_createorupdate.go index e285ab5384c..2406a218954 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, i var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2022-07-01/securityadminconfigurations/method_delete.go index 82087f7a71c..98f2658625f 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/method_delete.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/method_get.go b/resource-manager/network/2022-07-01/securityadminconfigurations/method_get.go index 6046f27ef91..65a62286882 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/method_get.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityA var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/method_list.go b/resource-manager/network/2022-07-01/securityadminconfigurations/method_list.go index 8fc4c2c91dc..a4abe4c74d3 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/method_list.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/securityadminconfigurations/version.go b/resource-manager/network/2022-07-01/securityadminconfigurations/version.go index 77d3c7c0622..c0a7f484f1d 100644 --- a/resource-manager/network/2022-07-01/securityadminconfigurations/version.go +++ b/resource-manager/network/2022-07-01/securityadminconfigurations/version.go @@ -1,12 +1,10 @@ package securityadminconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityadminconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/README.md b/resource-manager/network/2022-07-01/securitypartnerproviders/README.md index b9392b8bb7a..a4b86cb1128 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/README.md +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/securitypartnerproviders` Documentation -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `securitypartnerproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/client.go b/resource-manager/network/2022-07-01/securitypartnerproviders/client.go index e87ed7e5d0e..7752e07fcf3 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/client.go +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/client.go @@ -15,7 +15,7 @@ type SecurityPartnerProvidersClient struct { } func NewSecurityPartnerProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitypartnerproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitypartnerproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2022-07-01/securitypartnerproviders/id_securitypartnerprovider.go index 32dd3433d4a..af7579bfa45 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/id_securitypartnerprovider.go +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/id_securitypartnerprovider.go @@ -42,7 +42,7 @@ func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, e } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartner } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/method_get.go b/resource-manager/network/2022-07-01/securitypartnerproviders/method_get.go index ca56a913bc7..5b244206a3f 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/method_get.go +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/method_get.go @@ -45,7 +45,6 @@ func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPart var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2022-07-01/securitypartnerproviders/method_updatetags.go index 7cbef507221..dfd04e92e88 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/method_updatetags.go +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/method_updatetags.go @@ -49,7 +49,6 @@ func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id Secur var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securitypartnerproviders/version.go b/resource-manager/network/2022-07-01/securitypartnerproviders/version.go index 0ee95cb1c22..34383991a2a 100644 --- a/resource-manager/network/2022-07-01/securitypartnerproviders/version.go +++ b/resource-manager/network/2022-07-01/securitypartnerproviders/version.go @@ -1,12 +1,10 @@ package securitypartnerproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypartnerproviders/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/securityrules/README.md b/resource-manager/network/2022-07-01/securityrules/README.md index f1f766b246f..82f215c2066 100644 --- a/resource-manager/network/2022-07-01/securityrules/README.md +++ b/resource-manager/network/2022-07-01/securityrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/securityrules` Documentation -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `securityrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/securityrules/client.go b/resource-manager/network/2022-07-01/securityrules/client.go index 1fbf9b2c78c..fe76b456975 100644 --- a/resource-manager/network/2022-07-01/securityrules/client.go +++ b/resource-manager/network/2022-07-01/securityrules/client.go @@ -15,7 +15,7 @@ type SecurityRulesClient struct { } func NewSecurityRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2022-07-01/securityrules/id_defaultsecurityrule.go index a09823c4a35..8a42bf7697d 100644 --- a/resource-manager/network/2022-07-01/securityrules/id_defaultsecurityrule.go +++ b/resource-manager/network/2022-07-01/securityrules/id_defaultsecurityrule.go @@ -44,7 +44,7 @@ func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRule } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2022-07-01/securityrules/id_networksecuritygroup.go index 9b818e973d9..21d0af43abc 100644 --- a/resource-manager/network/2022-07-01/securityrules/id_networksecuritygroup.go +++ b/resource-manager/network/2022-07-01/securityrules/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securityrules/id_securityrule.go b/resource-manager/network/2022-07-01/securityrules/id_securityrule.go index da153b38f42..d87e04b0366 100644 --- a/resource-manager/network/2022-07-01/securityrules/id_securityrule.go +++ b/resource-manager/network/2022-07-01/securityrules/id_securityrule.go @@ -44,7 +44,7 @@ func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2022-07-01/securityrules/method_defaultsecurityrulesget.go index a672fd767b7..0d436a23706 100644 --- a/resource-manager/network/2022-07-01/securityrules/method_defaultsecurityrulesget.go +++ b/resource-manager/network/2022-07-01/securityrules/method_defaultsecurityrulesget.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id Def var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securityrules/method_get.go b/resource-manager/network/2022-07-01/securityrules/method_get.go index effcc9d3d7b..85ddb4310ff 100644 --- a/resource-manager/network/2022-07-01/securityrules/method_get.go +++ b/resource-manager/network/2022-07-01/securityrules/method_get.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/securityrules/version.go b/resource-manager/network/2022-07-01/securityrules/version.go index c6b87d6e3bb..9837e2f6123 100644 --- a/resource-manager/network/2022-07-01/securityrules/version.go +++ b/resource-manager/network/2022-07-01/securityrules/version.go @@ -1,12 +1,10 @@ package securityrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityrules/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/README.md b/resource-manager/network/2022-07-01/serviceendpointpolicies/README.md index 114f6a168aa..ad666b166d1 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/README.md +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/serviceendpointpolicies` Documentation -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `serviceendpointpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/client.go b/resource-manager/network/2022-07-01/serviceendpointpolicies/client.go index d92547bd44b..4efc8d43b2a 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/client.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPoliciesClient struct { } func NewServiceEndpointPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2022-07-01/serviceendpointpolicies/id_serviceendpointpolicy.go index 4b66cdb57fe..d922a583fba 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2022-07-01/serviceendpointpolicies/method_get.go index 8929b01c755..ce97f45af4d 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/method_get.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpoi var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2022-07-01/serviceendpointpolicies/method_updatetags.go index 92a472479ad..d260b347033 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/method_updatetags.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id Servic var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicies/version.go b/resource-manager/network/2022-07-01/serviceendpointpolicies/version.go index e663bae7d91..55b8eff986a 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicies/version.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicies/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicies/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/README.md index f674b201a11..05cfee65424 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/README.md +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions` Documentation -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `serviceendpointpolicydefinitions` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/client.go index c75845bd1b5..0b0e9163605 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/client.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPolicyDefinitionsClient struct { } func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go index 2d85c659986..b3ccc083899 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go index edee1adbeda..abc9a0e9719 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go @@ -44,7 +44,7 @@ func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolic } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*Service } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/method_get.go index e9e63e50232..8aff5f74167 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/method_get.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id Serv var model ServiceEndpointPolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/version.go index e7abe16d06d..d857e76d234 100644 --- a/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/version.go +++ b/resource-manager/network/2022-07-01/serviceendpointpolicydefinitions/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicydefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/servicetags/README.md b/resource-manager/network/2022-07-01/servicetags/README.md index 4f31f42f49a..3a4d7725a94 100644 --- a/resource-manager/network/2022-07-01/servicetags/README.md +++ b/resource-manager/network/2022-07-01/servicetags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/servicetags` Documentation -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `servicetags` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/servicetags/client.go b/resource-manager/network/2022-07-01/servicetags/client.go index 7037716c1cf..33295761773 100644 --- a/resource-manager/network/2022-07-01/servicetags/client.go +++ b/resource-manager/network/2022-07-01/servicetags/client.go @@ -15,7 +15,7 @@ type ServiceTagsClient struct { } func NewServiceTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicetags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/servicetags/id_location.go b/resource-manager/network/2022-07-01/servicetags/id_location.go index b22b2cb34d7..a68389322f8 100644 --- a/resource-manager/network/2022-07-01/servicetags/id_location.go +++ b/resource-manager/network/2022-07-01/servicetags/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2022-07-01/servicetags/method_servicetaginformationlist.go index 7c6de375541..1150809dc2b 100644 --- a/resource-manager/network/2022-07-01/servicetags/method_servicetaginformationlist.go +++ b/resource-manager/network/2022-07-01/servicetags/method_servicetaginformationlist.go @@ -40,6 +40,7 @@ func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/servicetags/method_servicetagslist.go b/resource-manager/network/2022-07-01/servicetags/method_servicetagslist.go index f83c293d79b..a25ce187253 100644 --- a/resource-manager/network/2022-07-01/servicetags/method_servicetagslist.go +++ b/resource-manager/network/2022-07-01/servicetags/method_servicetagslist.go @@ -46,7 +46,6 @@ func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) ( var model ServiceTagsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/servicetags/version.go b/resource-manager/network/2022-07-01/servicetags/version.go index 331e8ed2faa..4ba6ef4ec9e 100644 --- a/resource-manager/network/2022-07-01/servicetags/version.go +++ b/resource-manager/network/2022-07-01/servicetags/version.go @@ -1,12 +1,10 @@ package servicetags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicetags/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/staticmembers/README.md b/resource-manager/network/2022-07-01/staticmembers/README.md index 013b2751299..4d76c589346 100644 --- a/resource-manager/network/2022-07-01/staticmembers/README.md +++ b/resource-manager/network/2022-07-01/staticmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/staticmembers` Documentation -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `staticmembers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/staticmembers/client.go b/resource-manager/network/2022-07-01/staticmembers/client.go index 0bd2daa81d6..9357db6d5f3 100644 --- a/resource-manager/network/2022-07-01/staticmembers/client.go +++ b/resource-manager/network/2022-07-01/staticmembers/client.go @@ -15,7 +15,7 @@ type StaticMembersClient struct { } func NewStaticMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/staticmembers/id_networkgroup.go b/resource-manager/network/2022-07-01/staticmembers/id_networkgroup.go index cbc610731ad..6138fabd8d9 100644 --- a/resource-manager/network/2022-07-01/staticmembers/id_networkgroup.go +++ b/resource-manager/network/2022-07-01/staticmembers/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/staticmembers/id_staticmember.go b/resource-manager/network/2022-07-01/staticmembers/id_staticmember.go index e972ef7ffc2..10350a8597a 100644 --- a/resource-manager/network/2022-07-01/staticmembers/id_staticmember.go +++ b/resource-manager/network/2022-07-01/staticmembers/id_staticmember.go @@ -46,7 +46,7 @@ func ParseStaticMemberID(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/staticmembers/method_createorupdate.go b/resource-manager/network/2022-07-01/staticmembers/method_createorupdate.go index 6921f0aedf3..f4ad175116b 100644 --- a/resource-manager/network/2022-07-01/staticmembers/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/staticmembers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMember var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/staticmembers/method_get.go b/resource-manager/network/2022-07-01/staticmembers/method_get.go index 11fc970af6a..8f9d30b17ab 100644 --- a/resource-manager/network/2022-07-01/staticmembers/method_get.go +++ b/resource-manager/network/2022-07-01/staticmembers/method_get.go @@ -45,7 +45,6 @@ func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/staticmembers/method_list.go b/resource-manager/network/2022-07-01/staticmembers/method_list.go index ac0788a5a34..ef104e6865f 100644 --- a/resource-manager/network/2022-07-01/staticmembers/method_list.go +++ b/resource-manager/network/2022-07-01/staticmembers/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/staticmembers/version.go b/resource-manager/network/2022-07-01/staticmembers/version.go index 304d37c2f97..e9d0f98c1c0 100644 --- a/resource-manager/network/2022-07-01/staticmembers/version.go +++ b/resource-manager/network/2022-07-01/staticmembers/version.go @@ -1,12 +1,10 @@ package staticmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticmembers/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/subnets/README.md b/resource-manager/network/2022-07-01/subnets/README.md index 12a752f9b57..913f3cc0403 100644 --- a/resource-manager/network/2022-07-01/subnets/README.md +++ b/resource-manager/network/2022-07-01/subnets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/subnets` Documentation -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `subnets` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/subnets/client.go b/resource-manager/network/2022-07-01/subnets/client.go index b1f947b47be..d3ece632ec6 100644 --- a/resource-manager/network/2022-07-01/subnets/client.go +++ b/resource-manager/network/2022-07-01/subnets/client.go @@ -15,7 +15,7 @@ type SubnetsClient struct { } func NewSubnetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subnets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subnets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/subnets/method_get.go b/resource-manager/network/2022-07-01/subnets/method_get.go index d77795ad632..9340f66305d 100644 --- a/resource-manager/network/2022-07-01/subnets/method_get.go +++ b/resource-manager/network/2022-07-01/subnets/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options G var model Subnet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/subnets/version.go b/resource-manager/network/2022-07-01/subnets/version.go index 699ef49e870..f68e3233607 100644 --- a/resource-manager/network/2022-07-01/subnets/version.go +++ b/resource-manager/network/2022-07-01/subnets/version.go @@ -1,12 +1,10 @@ package subnets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subnets/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/trafficanalytics/README.md b/resource-manager/network/2022-07-01/trafficanalytics/README.md index 0de9ebe7015..cd8f7b73301 100644 --- a/resource-manager/network/2022-07-01/trafficanalytics/README.md +++ b/resource-manager/network/2022-07-01/trafficanalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/trafficanalytics` Documentation -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `trafficanalytics` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/trafficanalytics/client.go b/resource-manager/network/2022-07-01/trafficanalytics/client.go index 78e1d6ab331..91c746485a3 100644 --- a/resource-manager/network/2022-07-01/trafficanalytics/client.go +++ b/resource-manager/network/2022-07-01/trafficanalytics/client.go @@ -15,7 +15,7 @@ type TrafficAnalyticsClient struct { } func NewTrafficAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficanalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficanalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2022-07-01/trafficanalytics/id_networkwatcher.go index f13408f03b5..17351381303 100644 --- a/resource-manager/network/2022-07-01/trafficanalytics/id_networkwatcher.go +++ b/resource-manager/network/2022-07-01/trafficanalytics/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/trafficanalytics/version.go b/resource-manager/network/2022-07-01/trafficanalytics/version.go index ac1c80f9e9f..95fb0457cf9 100644 --- a/resource-manager/network/2022-07-01/trafficanalytics/version.go +++ b/resource-manager/network/2022-07-01/trafficanalytics/version.go @@ -1,12 +1,10 @@ package trafficanalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficanalytics/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/usages/README.md b/resource-manager/network/2022-07-01/usages/README.md index 592637267ea..4b540cf5950 100644 --- a/resource-manager/network/2022-07-01/usages/README.md +++ b/resource-manager/network/2022-07-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/usages/client.go b/resource-manager/network/2022-07-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/network/2022-07-01/usages/client.go +++ b/resource-manager/network/2022-07-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/usages/id_location.go b/resource-manager/network/2022-07-01/usages/id_location.go index 6499c99bc79..8d1a811520a 100644 --- a/resource-manager/network/2022-07-01/usages/id_location.go +++ b/resource-manager/network/2022-07-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/usages/version.go b/resource-manager/network/2022-07-01/usages/version.go index cc57fe40b34..88b02afc52f 100644 --- a/resource-manager/network/2022-07-01/usages/version.go +++ b/resource-manager/network/2022-07-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vipswap/README.md b/resource-manager/network/2022-07-01/vipswap/README.md index 4c23f24dea8..0ca422b4bb3 100644 --- a/resource-manager/network/2022-07-01/vipswap/README.md +++ b/resource-manager/network/2022-07-01/vipswap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/vipswap` Documentation -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `vipswap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/vipswap/client.go b/resource-manager/network/2022-07-01/vipswap/client.go index 2a7d8c2afe7..d573391540e 100644 --- a/resource-manager/network/2022-07-01/vipswap/client.go +++ b/resource-manager/network/2022-07-01/vipswap/client.go @@ -15,7 +15,7 @@ type VipSwapClient struct { } func NewVipSwapClientWithBaseURI(sdkApi sdkEnv.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vipswap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vipswap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vipswap/id_cloudservice.go b/resource-manager/network/2022-07-01/vipswap/id_cloudservice.go index 5801e90709d..9e7c3a0f112 100644 --- a/resource-manager/network/2022-07-01/vipswap/id_cloudservice.go +++ b/resource-manager/network/2022-07-01/vipswap/id_cloudservice.go @@ -42,7 +42,7 @@ func ParseCloudServiceID(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vipswap/method_get.go b/resource-manager/network/2022-07-01/vipswap/method_get.go index 2d61c8f37e0..598d2371676 100644 --- a/resource-manager/network/2022-07-01/vipswap/method_get.go +++ b/resource-manager/network/2022-07-01/vipswap/method_get.go @@ -46,7 +46,6 @@ func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOp var model SwapResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/vipswap/method_list.go b/resource-manager/network/2022-07-01/vipswap/method_list.go index 32407cc2c5c..35cd678f8c4 100644 --- a/resource-manager/network/2022-07-01/vipswap/method_list.go +++ b/resource-manager/network/2022-07-01/vipswap/method_list.go @@ -46,7 +46,6 @@ func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result List var model SwapResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/vipswap/version.go b/resource-manager/network/2022-07-01/vipswap/version.go index b21cc29865a..1198fc6a3e1 100644 --- a/resource-manager/network/2022-07-01/vipswap/version.go +++ b/resource-manager/network/2022-07-01/vipswap/version.go @@ -1,12 +1,10 @@ package vipswap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vipswap/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/README.md b/resource-manager/network/2022-07-01/virtualappliancesites/README.md index 35e1f1c0297..87b7f0cf0e6 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/README.md +++ b/resource-manager/network/2022-07-01/virtualappliancesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualappliancesites` Documentation -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualappliancesites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/client.go b/resource-manager/network/2022-07-01/virtualappliancesites/client.go index 415b8e6e46b..e99ff0ccd1b 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/client.go +++ b/resource-manager/network/2022-07-01/virtualappliancesites/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSitesClient struct { } func NewVirtualApplianceSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualappliancesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualappliancesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2022-07-01/virtualappliancesites/id_networkvirtualappliance.go index d414a3c2d42..6689f6908a1 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/id_networkvirtualappliance.go +++ b/resource-manager/network/2022-07-01/virtualappliancesites/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2022-07-01/virtualappliancesites/id_virtualappliancesite.go index a0500e43c74..be16c8f8b7e 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/id_virtualappliancesite.go +++ b/resource-manager/network/2022-07-01/virtualappliancesites/id_virtualappliancesite.go @@ -44,7 +44,7 @@ func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSi } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/method_get.go b/resource-manager/network/2022-07-01/virtualappliancesites/method_get.go index c78f7f1cf64..820f76d71d2 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/method_get.go +++ b/resource-manager/network/2022-07-01/virtualappliancesites/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianc var model VirtualApplianceSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualappliancesites/version.go b/resource-manager/network/2022-07-01/virtualappliancesites/version.go index 15871e6b59f..fb235f1b78d 100644 --- a/resource-manager/network/2022-07-01/virtualappliancesites/version.go +++ b/resource-manager/network/2022-07-01/virtualappliancesites/version.go @@ -1,12 +1,10 @@ package virtualappliancesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualappliancesites/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualapplianceskus/README.md b/resource-manager/network/2022-07-01/virtualapplianceskus/README.md index 6bebd8cf25b..f3ad96077a9 100644 --- a/resource-manager/network/2022-07-01/virtualapplianceskus/README.md +++ b/resource-manager/network/2022-07-01/virtualapplianceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualapplianceskus` Documentation -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualapplianceskus` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualapplianceskus/client.go b/resource-manager/network/2022-07-01/virtualapplianceskus/client.go index db6e9902bb9..90d73eb6104 100644 --- a/resource-manager/network/2022-07-01/virtualapplianceskus/client.go +++ b/resource-manager/network/2022-07-01/virtualapplianceskus/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSkusClient struct { } func NewVirtualApplianceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualapplianceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualapplianceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2022-07-01/virtualapplianceskus/id_networkvirtualappliancesku.go index a2683ac973a..3980d29645a 100644 --- a/resource-manager/network/2022-07-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ b/resource-manager/network/2022-07-01/virtualapplianceskus/id_networkvirtualappliancesku.go @@ -40,7 +40,7 @@ func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSk } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtu } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualapplianceskus/method_get.go b/resource-manager/network/2022-07-01/virtualapplianceskus/method_get.go index 87cc1eef20e..c570427c4a3 100644 --- a/resource-manager/network/2022-07-01/virtualapplianceskus/method_get.go +++ b/resource-manager/network/2022-07-01/virtualapplianceskus/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualAp var model NetworkVirtualApplianceSku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualapplianceskus/version.go b/resource-manager/network/2022-07-01/virtualapplianceskus/version.go index 2e83d358313..03ea920e839 100644 --- a/resource-manager/network/2022-07-01/virtualapplianceskus/version.go +++ b/resource-manager/network/2022-07-01/virtualapplianceskus/version.go @@ -1,12 +1,10 @@ package virtualapplianceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualapplianceskus/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/README.md index 302e8a92711..ce9be7dc725 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections` Documentation -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworkgatewayconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/client.go index f0cf4471c90..b74a1276981 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewayConnectionsClient struct { } func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/id_connection.go index 23a8c6154a7..8f674780f99 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/id_connection.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_get.go index e00568d96cb..842bab814e9 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_get.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id Conn var model VirtualNetworkGatewayConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_getsharedkey.go index bc9ecd13466..3606b2efb65 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/method_getsharedkey.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context var model ConnectionSharedKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/version.go index 694e3223d7f..2c04566cdae 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgatewayconnections/version.go @@ -1,12 +1,10 @@ package virtualnetworkgatewayconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/README.md b/resource-manager/network/2022-07-01/virtualnetworkgateways/README.md index 394746dfe9b..7bc97fa6530 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworkgateways` Documentation -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/client.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/client.go index 32ede23bc60..56907b3d1b4 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewaysClient struct { } func NewVirtualNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_connection.go index fb9191036b5..d1aefba4347 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_connection.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgateway.go index 4763c88cab1..9589eab0bf6 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgateway.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGat } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go index 41c5df8eedd..a767c52859c 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNa } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNet } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_get.go index 0f42a04cd89..403f9e12374 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_get.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getadvertisedroutes.go index d0dde50a8c6..969c71ee317 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getadvertisedroutes.go @@ -37,6 +37,7 @@ func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getbgppeerstatus.go index 5e6a04ac485..33e243af246 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_getbgppeerstatus.go @@ -37,6 +37,7 @@ func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_reset.go index 433a2126e07..fb6210d0c1e 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_reset.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_supportedvpndevices.go index c7d78912ab2..7b81cd2d32c 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_supportedvpndevices.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_supportedvpndevices.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, i var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go index 8347acb37cd..10dc0fac1a6 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx conte var model VirtualNetworkGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go index b2673932149..0dbfcf3f88f 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go @@ -50,7 +50,6 @@ func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.C var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkgateways/version.go b/resource-manager/network/2022-07-01/virtualnetworkgateways/version.go index 28946902fed..e6b1eb1528f 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkgateways/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworkgateways/version.go @@ -1,12 +1,10 @@ package virtualnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/README.md b/resource-manager/network/2022-07-01/virtualnetworkpeerings/README.md index 4074651b2dc..79f86aebe36 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworkpeerings` Documentation -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworkpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/client.go b/resource-manager/network/2022-07-01/virtualnetworkpeerings/client.go index 8eb7455514c..a8632e2ec55 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/client.go @@ -15,7 +15,7 @@ type VirtualNetworkPeeringsClient struct { } func NewVirtualNetworkPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2022-07-01/virtualnetworkpeerings/id_virtualnetworkpeering.go index a72d63bb3a5..b18a9909ca2 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_createorupdate.go index aba174940d2..950797b7302 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_get.go index 81671aa625e..8bc92358897 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_get.go +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworkpeerings/version.go b/resource-manager/network/2022-07-01/virtualnetworkpeerings/version.go index db1a3bef982..85a0b5826e2 100644 --- a/resource-manager/network/2022-07-01/virtualnetworkpeerings/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworkpeerings/version.go @@ -1,12 +1,10 @@ package virtualnetworkpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkpeerings/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/README.md b/resource-manager/network/2022-07-01/virtualnetworks/README.md index 4328cb8f625..25586521e95 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworks/client.go b/resource-manager/network/2022-07-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/method_get.go b/resource-manager/network/2022-07-01/virtualnetworks/method_get.go index 189fd2689c1..db1b8807d3e 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/method_get.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetw var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2022-07-01/virtualnetworks/method_updatetags.go index 8e2d6ea92a2..3e63f83e2a6 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/method_updatetags.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/method_updatetags.go @@ -50,7 +50,6 @@ func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.Virt var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go index 1f434189786..bcd41a4d551 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go @@ -35,6 +35,7 @@ func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() * func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx con var model IPAddressAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index d48736807d5..cfc2cb53d45 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -44,6 +44,7 @@ func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *cl func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2022-07-01/virtualnetworks/version.go b/resource-manager/network/2022-07-01/virtualnetworks/version.go index 56e2fb7db0e..1dd01a62206 100644 --- a/resource-manager/network/2022-07-01/virtualnetworks/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/README.md b/resource-manager/network/2022-07-01/virtualnetworktap/README.md index 072b5ee3493..c24193f3ab3 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworktap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworktap` Documentation -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworktap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/client.go b/resource-manager/network/2022-07-01/virtualnetworktap/client.go index 4444f3072d8..71e5a9092ba 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworktap/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapClient struct { } func NewVirtualNetworkTapClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2022-07-01/virtualnetworktap/id_virtualnetworktap.go index 5bf0638a304..7c8ef004fe6 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/id_virtualnetworktap.go +++ b/resource-manager/network/2022-07-01/virtualnetworktap/id_virtualnetworktap.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/method_get.go b/resource-manager/network/2022-07-01/virtualnetworktap/method_get.go index 7d8ef7767ee..cbeab75581a 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/method_get.go +++ b/resource-manager/network/2022-07-01/virtualnetworktap/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2022-07-01/virtualnetworktap/method_updatetags.go index 2079b8bdf80..3d2dd536791 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/method_updatetags.go +++ b/resource-manager/network/2022-07-01/virtualnetworktap/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetwo var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualnetworktap/version.go b/resource-manager/network/2022-07-01/virtualnetworktap/version.go index 13d62326aaa..e4309015f19 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktap/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworktap/version.go @@ -1,12 +1,10 @@ package virtualnetworktap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktap/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualnetworktaps/README.md b/resource-manager/network/2022-07-01/virtualnetworktaps/README.md index f069612d056..efcf596f1ae 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktaps/README.md +++ b/resource-manager/network/2022-07-01/virtualnetworktaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualnetworktaps` Documentation -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualnetworktaps` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualnetworktaps/client.go b/resource-manager/network/2022-07-01/virtualnetworktaps/client.go index 33de6824de7..072baab9143 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktaps/client.go +++ b/resource-manager/network/2022-07-01/virtualnetworktaps/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapsClient struct { } func NewVirtualNetworkTapsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualnetworktaps/version.go b/resource-manager/network/2022-07-01/virtualnetworktaps/version.go index 637567ffafc..aa1332d1b16 100644 --- a/resource-manager/network/2022-07-01/virtualnetworktaps/version.go +++ b/resource-manager/network/2022-07-01/virtualnetworktaps/version.go @@ -1,12 +1,10 @@ package virtualnetworktaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktaps/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualrouterpeerings/README.md b/resource-manager/network/2022-07-01/virtualrouterpeerings/README.md index 3887bef9f26..e1c1f665942 100644 --- a/resource-manager/network/2022-07-01/virtualrouterpeerings/README.md +++ b/resource-manager/network/2022-07-01/virtualrouterpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualrouterpeerings` Documentation -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualrouterpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualrouterpeerings/client.go b/resource-manager/network/2022-07-01/virtualrouterpeerings/client.go index 6b55e901ef5..b8bf140b1c1 100644 --- a/resource-manager/network/2022-07-01/virtualrouterpeerings/client.go +++ b/resource-manager/network/2022-07-01/virtualrouterpeerings/client.go @@ -15,7 +15,7 @@ type VirtualRouterPeeringsClient struct { } func NewVirtualRouterPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2022-07-01/virtualrouterpeerings/id_virtualrouter.go index 85fff5b9af3..d23c35f1255 100644 --- a/resource-manager/network/2022-07-01/virtualrouterpeerings/id_virtualrouter.go +++ b/resource-manager/network/2022-07-01/virtualrouterpeerings/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2022-07-01/virtualrouterpeerings/method_get.go index 684fe0cb2fc..8b9d7a1569d 100644 --- a/resource-manager/network/2022-07-01/virtualrouterpeerings/method_get.go +++ b/resource-manager/network/2022-07-01/virtualrouterpeerings/method_get.go @@ -46,7 +46,6 @@ func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.Virtu var model VirtualRouterPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualrouterpeerings/version.go b/resource-manager/network/2022-07-01/virtualrouterpeerings/version.go index 5192e68dc68..f1a10adb2ba 100644 --- a/resource-manager/network/2022-07-01/virtualrouterpeerings/version.go +++ b/resource-manager/network/2022-07-01/virtualrouterpeerings/version.go @@ -1,12 +1,10 @@ package virtualrouterpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouterpeerings/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualrouters/README.md b/resource-manager/network/2022-07-01/virtualrouters/README.md index e835a057b0c..b042484f39a 100644 --- a/resource-manager/network/2022-07-01/virtualrouters/README.md +++ b/resource-manager/network/2022-07-01/virtualrouters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualrouters` Documentation -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualrouters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualrouters/client.go b/resource-manager/network/2022-07-01/virtualrouters/client.go index 37e6baf91a8..ca9adf26c79 100644 --- a/resource-manager/network/2022-07-01/virtualrouters/client.go +++ b/resource-manager/network/2022-07-01/virtualrouters/client.go @@ -15,7 +15,7 @@ type VirtualRoutersClient struct { } func NewVirtualRoutersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2022-07-01/virtualrouters/id_virtualrouter.go index 3e9ac08d3a1..917cee82cb6 100644 --- a/resource-manager/network/2022-07-01/virtualrouters/id_virtualrouter.go +++ b/resource-manager/network/2022-07-01/virtualrouters/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualrouters/method_get.go b/resource-manager/network/2022-07-01/virtualrouters/method_get.go index 39415fad17f..4eaa68180fa 100644 --- a/resource-manager/network/2022-07-01/virtualrouters/method_get.go +++ b/resource-manager/network/2022-07-01/virtualrouters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, optio var model VirtualRouter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualrouters/version.go b/resource-manager/network/2022-07-01/virtualrouters/version.go index f21bc668f7f..f91ae5407f4 100644 --- a/resource-manager/network/2022-07-01/virtualrouters/version.go +++ b/resource-manager/network/2022-07-01/virtualrouters/version.go @@ -1,12 +1,10 @@ package virtualrouters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouters/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/virtualwans/README.md b/resource-manager/network/2022-07-01/virtualwans/README.md index 3b7fd39ede7..c8eb165dd9b 100644 --- a/resource-manager/network/2022-07-01/virtualwans/README.md +++ b/resource-manager/network/2022-07-01/virtualwans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/virtualwans` Documentation -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `virtualwans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/virtualwans/client.go b/resource-manager/network/2022-07-01/virtualwans/client.go index bf0a24c960f..0d727643072 100644 --- a/resource-manager/network/2022-07-01/virtualwans/client.go +++ b/resource-manager/network/2022-07-01/virtualwans/client.go @@ -15,7 +15,7 @@ type VirtualWANsClient struct { } func NewVirtualWANsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualwans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualwans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2022-07-01/virtualwans/id_configurationpolicygroup.go index 7ebd0347f4d..2742a567b1a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_configurationpolicygroup.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_configurationpolicygroup.go @@ -44,7 +44,7 @@ func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationP } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2022-07-01/virtualwans/id_hubroutetable.go index 46e51d4c426..7254af39e90 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_hubroutetable.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_hubroutetable.go @@ -44,7 +44,7 @@ func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2022-07-01/virtualwans/id_hubvirtualnetworkconnection.go index 92e4c4c7d5d..86b2ea6bba1 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_hubvirtualnetworkconnection.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_hubvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnect } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualN } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_natrule.go b/resource-manager/network/2022-07-01/virtualwans/id_natrule.go index f2dca44d7fa..c75b3495702 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_natrule.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_natrule.go @@ -44,7 +44,7 @@ func ParseNatRuleID(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_routemap.go b/resource-manager/network/2022-07-01/virtualwans/id_routemap.go index c95aeaafbfd..62984d50913 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_routemap.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_routemap.go @@ -44,7 +44,7 @@ func ParseRouteMapID(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_routingintent.go b/resource-manager/network/2022-07-01/virtualwans/id_routingintent.go index de16e7a3861..0a5e5b5515f 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_routingintent.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_routingintent.go @@ -44,7 +44,7 @@ func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_virtualhub.go b/resource-manager/network/2022-07-01/virtualwans/id_virtualhub.go index ec4a18686e5..a65dd47d2f2 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_virtualhub.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_virtualhub.go @@ -42,7 +42,7 @@ func ParseVirtualHubID(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2022-07-01/virtualwans/id_virtualhubroutetable.go index b2cd55910b3..2c1b73bfb18 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_virtualhubroutetable.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_virtualhubroutetable.go @@ -44,7 +44,7 @@ func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTab } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_virtualwan.go b/resource-manager/network/2022-07-01/virtualwans/id_virtualwan.go index e8489bfa13e..c465fb4ee98 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_virtualwan.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_virtualwan.go @@ -42,7 +42,7 @@ func ParseVirtualWANID(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_vpngateway.go b/resource-manager/network/2022-07-01/virtualwans/id_vpngateway.go index 6889f4d78bc..ddef4f2b705 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_vpngateway.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2022-07-01/virtualwans/id_vpnlinkconnection.go index b40c9d3b7be..9e5fb0d4b28 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_vpnlinkconnection.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2022-07-01/virtualwans/id_vpnserverconfiguration.go index 604356fc28f..96680047062 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_vpnserverconfiguration.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_vpnsite.go b/resource-manager/network/2022-07-01/virtualwans/id_vpnsite.go index 4e20baefd21..6998a9ec345 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_vpnsite.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2022-07-01/virtualwans/id_vpnsitelink.go index a0b1676b210..d77c4473996 100644 --- a/resource-manager/network/2022-07-01/virtualwans/id_vpnsitelink.go +++ b/resource-manager/network/2022-07-01/virtualwans/id_vpnsitelink.go @@ -44,7 +44,7 @@ func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2022-07-01/virtualwans/method_configurationpolicygroupsget.go index 491fc15d5b2..d8feaa4f23a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_configurationpolicygroupsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_configurationpolicygroupsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id var model VpnServerConfigurationPolicyGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2022-07-01/virtualwans/method_hubroutetablesget.go index 36dc9467d46..e714731e2bf 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_hubroutetablesget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_hubroutetablesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTab var model HubRouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2022-07-01/virtualwans/method_hubvirtualnetworkconnectionsget.go index 852857adc59..f08f465d3c1 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_hubvirtualnetworkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, var model HubVirtualNetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_natrulesget.go b/resource-manager/network/2022-07-01/virtualwans/method_natrulesget.go index 9ba7ca45bea..c81f0b6e89a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_natrulesget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_natrulesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (resul var model VpnGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2022-07-01/virtualwans/method_p2svpngatewaysget.go index 804013badcc..ec7e18c347e 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_p2svpngatewaysget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_p2svpngatewaysget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.V var model P2SVpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_routemapsget.go b/resource-manager/network/2022-07-01/virtualwans/method_routemapsget.go index 925002f31e7..c1db2c3033a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_routemapsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_routemapsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (res var model RouteMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_routingintentget.go b/resource-manager/network/2022-07-01/virtualwans/method_routingintentget.go index ae61d3b41b5..fea07e77795 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_routingintentget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_routingintentget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingInten var model RoutingIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2022-07-01/virtualwans/method_supportedsecurityproviders.go index 616d9dd0cd4..3351ee7549f 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_supportedsecurityproviders.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_supportedsecurityproviders.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id Vi var model VirtualWanSecurityProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_updatetags.go b/resource-manager/network/2022-07-01/virtualwans/method_updatetags.go index 6115890e78c..42f292d4aea 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_updatetags.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, inpu var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubbgpconnectionget.go index 525c6b3cabe..e4d4c41773a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubbgpconnectionget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubbgpconnectionget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id co var model BgpConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubipconfigurationget.go index ca3c9a88dd3..c4abe234784 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubipconfigurationget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubipconfigurationget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id var model HubIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubroutetablev2sget.go index 7c542fcfe68..0d274e1355a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubroutetablev2sget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubroutetablev2sget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id Vi var model VirtualHubRouteTableV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsget.go index 3f2e419720f..0b1bcbe8573 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsupdatetags.go index be5399a4515..23f6df52743 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsupdatetags.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualhubsupdatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id Virtual var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2022-07-01/virtualwans/method_virtualwansget.go index 41dbd00d7f2..66d801a779a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_virtualwansget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_virtualwansget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpnconnectionsget.go index 812232759b1..ca7d4d2a9b4 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpnconnectionsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpnconnectionsget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.V var model VpnConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpngatewaysget.go index bfa13a547eb..0793829ea75 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpngatewaysget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpngatewaysget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) var model VpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpnserverconfigurationsget.go index e5b009a1154..5355630843f 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpnserverconfigurationsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpnserverconfigurationsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id Vp var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinkconnectionsget.go index 088e1b48de5..b2fed5d6de1 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id Vpn var model VpnSiteLinkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinksget.go index c16e84b3691..018f1ad8f67 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinksget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitelinksget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId var model VpnSiteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitesget.go index 6494e6d6449..a250df018ce 100644 --- a/resource-manager/network/2022-07-01/virtualwans/method_vpnsitesget.go +++ b/resource-manager/network/2022-07-01/virtualwans/method_vpnsitesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (resul var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/virtualwans/version.go b/resource-manager/network/2022-07-01/virtualwans/version.go index 0a5d6970e23..284d2b55c8a 100644 --- a/resource-manager/network/2022-07-01/virtualwans/version.go +++ b/resource-manager/network/2022-07-01/virtualwans/version.go @@ -1,12 +1,10 @@ package virtualwans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualwans/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vmsspublicipaddresses/README.md b/resource-manager/network/2022-07-01/vmsspublicipaddresses/README.md index 13be8ae5e35..924eb883889 100644 --- a/resource-manager/network/2022-07-01/vmsspublicipaddresses/README.md +++ b/resource-manager/network/2022-07-01/vmsspublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/vmsspublicipaddresses` Documentation -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `vmsspublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/vmsspublicipaddresses/client.go b/resource-manager/network/2022-07-01/vmsspublicipaddresses/client.go index 3213cbf73fe..218145b65b9 100644 --- a/resource-manager/network/2022-07-01/vmsspublicipaddresses/client.go +++ b/resource-manager/network/2022-07-01/vmsspublicipaddresses/client.go @@ -15,7 +15,7 @@ type VMSSPublicIPAddressesClient struct { } func NewVMSSPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2022-07-01/vmsspublicipaddresses/id_virtualmachinescaleset.go index 6907f32662f..d2ae7bd3514 100644 --- a/resource-manager/network/2022-07-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ b/resource-manager/network/2022-07-01/vmsspublicipaddresses/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2022-07-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go index 482b018c7dc..aa1a988346a 100644 --- a/resource-manager/network/2022-07-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ b/resource-manager/network/2022-07-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOption func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetP var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/vmsspublicipaddresses/version.go b/resource-manager/network/2022-07-01/vmsspublicipaddresses/version.go index a4f0e7150ac..d821bd1a026 100644 --- a/resource-manager/network/2022-07-01/vmsspublicipaddresses/version.go +++ b/resource-manager/network/2022-07-01/vmsspublicipaddresses/version.go @@ -1,12 +1,10 @@ package vmsspublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmsspublicipaddresses/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vpngateways/README.md b/resource-manager/network/2022-07-01/vpngateways/README.md index 86737ba9c48..4b1ec2b072d 100644 --- a/resource-manager/network/2022-07-01/vpngateways/README.md +++ b/resource-manager/network/2022-07-01/vpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/vpngateways` Documentation -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `vpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/vpngateways/client.go b/resource-manager/network/2022-07-01/vpngateways/client.go index 5679554f1a5..c17671a8ad9 100644 --- a/resource-manager/network/2022-07-01/vpngateways/client.go +++ b/resource-manager/network/2022-07-01/vpngateways/client.go @@ -15,7 +15,7 @@ type VpnGatewaysClient struct { } func NewVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vpngateways/id_vpngateway.go b/resource-manager/network/2022-07-01/vpngateways/id_vpngateway.go index 4a48b9a7916..a605ffbf545 100644 --- a/resource-manager/network/2022-07-01/vpngateways/id_vpngateway.go +++ b/resource-manager/network/2022-07-01/vpngateways/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vpngateways/version.go b/resource-manager/network/2022-07-01/vpngateways/version.go index ac1a98d2a43..1ca062ff206 100644 --- a/resource-manager/network/2022-07-01/vpngateways/version.go +++ b/resource-manager/network/2022-07-01/vpngateways/version.go @@ -1,12 +1,10 @@ package vpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpngateways/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vpnlinkconnections/client.go b/resource-manager/network/2022-07-01/vpnlinkconnections/client.go index 3fbef685129..abb23ca4c39 100644 --- a/resource-manager/network/2022-07-01/vpnlinkconnections/client.go +++ b/resource-manager/network/2022-07-01/vpnlinkconnections/client.go @@ -15,7 +15,7 @@ type VpnLinkConnectionsClient struct { } func NewVpnLinkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnlinkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnlinkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2022-07-01/vpnlinkconnections/id_vpnlinkconnection.go index e1dd95afd3a..ba9d1fe1a91 100644 --- a/resource-manager/network/2022-07-01/vpnlinkconnections/id_vpnlinkconnection.go +++ b/resource-manager/network/2022-07-01/vpnlinkconnections/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vpnlinkconnections/version.go b/resource-manager/network/2022-07-01/vpnlinkconnections/version.go index b0b4c0a690c..fb9f87e4f95 100644 --- a/resource-manager/network/2022-07-01/vpnlinkconnections/version.go +++ b/resource-manager/network/2022-07-01/vpnlinkconnections/version.go @@ -1,12 +1,10 @@ package vpnlinkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnlinkconnections/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vpnserverconfigurations/README.md b/resource-manager/network/2022-07-01/vpnserverconfigurations/README.md index 5b96ff10e55..60440592114 100644 --- a/resource-manager/network/2022-07-01/vpnserverconfigurations/README.md +++ b/resource-manager/network/2022-07-01/vpnserverconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/vpnserverconfigurations` Documentation -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `vpnserverconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/vpnserverconfigurations/client.go b/resource-manager/network/2022-07-01/vpnserverconfigurations/client.go index 6209cc6af8d..661d154e519 100644 --- a/resource-manager/network/2022-07-01/vpnserverconfigurations/client.go +++ b/resource-manager/network/2022-07-01/vpnserverconfigurations/client.go @@ -15,7 +15,7 @@ type VpnServerConfigurationsClient struct { } func NewVpnServerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2022-07-01/vpnserverconfigurations/id_vpnserverconfiguration.go index 56b67386806..fd55db1bea0 100644 --- a/resource-manager/network/2022-07-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ b/resource-manager/network/2022-07-01/vpnserverconfigurations/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2022-07-01/vpnserverconfigurations/method_updatetags.go index 7a675d1584d..f9decf387a7 100644 --- a/resource-manager/network/2022-07-01/vpnserverconfigurations/method_updatetags.go +++ b/resource-manager/network/2022-07-01/vpnserverconfigurations/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnSer var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/vpnserverconfigurations/version.go b/resource-manager/network/2022-07-01/vpnserverconfigurations/version.go index 496c804f8dc..9e54e66fcb9 100644 --- a/resource-manager/network/2022-07-01/vpnserverconfigurations/version.go +++ b/resource-manager/network/2022-07-01/vpnserverconfigurations/version.go @@ -1,12 +1,10 @@ package vpnserverconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnserverconfigurations/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/vpnsites/README.md b/resource-manager/network/2022-07-01/vpnsites/README.md index bb7658947fe..15cb5a0895e 100644 --- a/resource-manager/network/2022-07-01/vpnsites/README.md +++ b/resource-manager/network/2022-07-01/vpnsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/vpnsites` Documentation -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `vpnsites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/vpnsites/client.go b/resource-manager/network/2022-07-01/vpnsites/client.go index 241eb9e94ea..2c56ae704cd 100644 --- a/resource-manager/network/2022-07-01/vpnsites/client.go +++ b/resource-manager/network/2022-07-01/vpnsites/client.go @@ -15,7 +15,7 @@ type VpnSitesClient struct { } func NewVpnSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/vpnsites/id_vpnsite.go b/resource-manager/network/2022-07-01/vpnsites/id_vpnsite.go index 4b42ecf0a1e..f4827bdd53c 100644 --- a/resource-manager/network/2022-07-01/vpnsites/id_vpnsite.go +++ b/resource-manager/network/2022-07-01/vpnsites/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/vpnsites/method_updatetags.go b/resource-manager/network/2022-07-01/vpnsites/method_updatetags.go index 08341839986..aa5af2cd330 100644 --- a/resource-manager/network/2022-07-01/vpnsites/method_updatetags.go +++ b/resource-manager/network/2022-07-01/vpnsites/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input Tags var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/vpnsites/version.go b/resource-manager/network/2022-07-01/vpnsites/version.go index a1fc993d789..c0ee5a13f6b 100644 --- a/resource-manager/network/2022-07-01/vpnsites/version.go +++ b/resource-manager/network/2022-07-01/vpnsites/version.go @@ -1,12 +1,10 @@ package vpnsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnsites/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/README.md index 7fbd395ca2e..e0ce7419e6c 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/client.go index ac148c53733..225049a7361 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/client.go +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/client.go @@ -15,7 +15,7 @@ type WebApplicationFirewallPoliciesClient struct { } func NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go index 9c48316d9e7..21335631484 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*Appli } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input st } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_createorupdate.go index a30ca59994f..556b406a3c2 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_createorupdate.go +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_get.go index 03919558699..b34138178e0 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_get.go +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/method_get.go @@ -45,7 +45,6 @@ func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id Applic var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/version.go index 5df9c2b9158..db64cce072d 100644 --- a/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/network/2022-07-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2022-07-01" } diff --git a/resource-manager/network/2022-07-01/webcategories/README.md b/resource-manager/network/2022-07-01/webcategories/README.md index b9472f2a2e3..7d9b6a0fbcd 100644 --- a/resource-manager/network/2022-07-01/webcategories/README.md +++ b/resource-manager/network/2022-07-01/webcategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-07-01/webcategories` Documentation -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-07-01`). +The `webcategories` SDK allows for interaction with Azure Resource Manager `network` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2022-07-01/webcategories/client.go b/resource-manager/network/2022-07-01/webcategories/client.go index 075aa15b06b..980ef726026 100644 --- a/resource-manager/network/2022-07-01/webcategories/client.go +++ b/resource-manager/network/2022-07-01/webcategories/client.go @@ -15,7 +15,7 @@ type WebCategoriesClient struct { } func NewWebCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webcategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webcategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) } diff --git a/resource-manager/network/2022-07-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2022-07-01/webcategories/id_azurewebcategory.go index 1417d2f6d85..a7286a7dec7 100644 --- a/resource-manager/network/2022-07-01/webcategories/id_azurewebcategory.go +++ b/resource-manager/network/2022-07-01/webcategories/id_azurewebcategory.go @@ -40,7 +40,7 @@ func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, er } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2022-07-01/webcategories/method_get.go b/resource-manager/network/2022-07-01/webcategories/method_get.go index 6150a24fbf4..bcebcf476db 100644 --- a/resource-manager/network/2022-07-01/webcategories/method_get.go +++ b/resource-manager/network/2022-07-01/webcategories/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, opt var model AzureWebCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2022-07-01/webcategories/version.go b/resource-manager/network/2022-07-01/webcategories/version.go index 93a97fdefa2..e6d8db208d1 100644 --- a/resource-manager/network/2022-07-01/webcategories/version.go +++ b/resource-manager/network/2022-07-01/webcategories/version.go @@ -1,12 +1,10 @@ package webcategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webcategories/2022-07-01" } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/README.md b/resource-manager/network/2023-09-01/adminrulecollections/README.md index ff118e94a64..57ea087b5f6 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/README.md +++ b/resource-manager/network/2023-09-01/adminrulecollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/adminrulecollections` Documentation -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `adminrulecollections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/adminrulecollections/client.go b/resource-manager/network/2023-09-01/adminrulecollections/client.go index adbf2674d97..a0e144b1d96 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/client.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/client.go @@ -15,7 +15,7 @@ type AdminRuleCollectionsClient struct { } func NewAdminRuleCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrulecollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrulecollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2023-09-01/adminrulecollections/id_rulecollection.go index 5c84e59671e..9e9a196b29e 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/id_rulecollection.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2023-09-01/adminrulecollections/id_securityadminconfiguration.go index b8186efef3b..d4a126ec41b 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/id_securityadminconfiguration.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2023-09-01/adminrulecollections/method_createorupdate.go index 67a6db6eb7b..00810feb46a 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleC var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/method_delete.go b/resource-manager/network/2023-09-01/adminrulecollections/method_delete.go index ec55f3fa7e6..68d0021749b 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/method_delete.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/method_get.go b/resource-manager/network/2023-09-01/adminrulecollections/method_get.go index 8beb93c5eca..1aec0f98a6a 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/method_get.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/method_get.go @@ -45,7 +45,6 @@ func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/method_list.go b/resource-manager/network/2023-09-01/adminrulecollections/method_list.go index f4b9bfcdd61..2ef5b46d0a4 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/method_list.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/adminrulecollections/version.go b/resource-manager/network/2023-09-01/adminrulecollections/version.go index 28a57430a1c..c2f0083d5f4 100644 --- a/resource-manager/network/2023-09-01/adminrulecollections/version.go +++ b/resource-manager/network/2023-09-01/adminrulecollections/version.go @@ -1,12 +1,10 @@ package adminrulecollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrulecollections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/adminrules/README.md b/resource-manager/network/2023-09-01/adminrules/README.md index ca77765c960..ec03ddde8a1 100644 --- a/resource-manager/network/2023-09-01/adminrules/README.md +++ b/resource-manager/network/2023-09-01/adminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/adminrules` Documentation -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `adminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/adminrules/client.go b/resource-manager/network/2023-09-01/adminrules/client.go index 40da5b4d0a4..811271711b6 100644 --- a/resource-manager/network/2023-09-01/adminrules/client.go +++ b/resource-manager/network/2023-09-01/adminrules/client.go @@ -15,7 +15,7 @@ type AdminRulesClient struct { } func NewAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/adminrules/id_rule.go b/resource-manager/network/2023-09-01/adminrules/id_rule.go index 3b132449062..35d0bf9900c 100644 --- a/resource-manager/network/2023-09-01/adminrules/id_rule.go +++ b/resource-manager/network/2023-09-01/adminrules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/adminrules/id_rulecollection.go b/resource-manager/network/2023-09-01/adminrules/id_rulecollection.go index 6dd9dd5b0a8..71e436de80b 100644 --- a/resource-manager/network/2023-09-01/adminrules/id_rulecollection.go +++ b/resource-manager/network/2023-09-01/adminrules/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/adminrules/method_createorupdate.go b/resource-manager/network/2023-09-01/adminrules/method_createorupdate.go index d936a5666f1..250f646ce08 100644 --- a/resource-manager/network/2023-09-01/adminrules/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/adminrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input B if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2023-09-01/adminrules/method_delete.go b/resource-manager/network/2023-09-01/adminrules/method_delete.go index 9b07dbc4a79..c5deb3a7b1f 100644 --- a/resource-manager/network/2023-09-01/adminrules/method_delete.go +++ b/resource-manager/network/2023-09-01/adminrules/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/adminrules/method_get.go b/resource-manager/network/2023-09-01/adminrules/method_get.go index 94337a0e139..52f80e411e8 100644 --- a/resource-manager/network/2023-09-01/adminrules/method_get.go +++ b/resource-manager/network/2023-09-01/adminrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // Get ... @@ -48,11 +48,11 @@ func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2023-09-01/adminrules/method_list.go b/resource-manager/network/2023-09-01/adminrules/method_list.go index 97915114117..85aa73c80e3 100644 --- a/resource-manager/network/2023-09-01/adminrules/method_list.go +++ b/resource-manager/network/2023-09-01/adminrules/method_list.go @@ -73,7 +73,7 @@ func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result temp := make([]BaseAdminRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBaseAdminRuleImplementation(v) + val, err := UnmarshalBaseAdminRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BaseAdminRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/network/2023-09-01/adminrules/model_adminrule.go b/resource-manager/network/2023-09-01/adminrules/model_adminrule.go index 8544cf3cd71..74d9a7cd9c1 100644 --- a/resource-manager/network/2023-09-01/adminrules/model_adminrule.go +++ b/resource-manager/network/2023-09-01/adminrules/model_adminrule.go @@ -16,13 +16,26 @@ type AdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AdminRule{} func (s AdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/adminrules/model_baseadminrule.go b/resource-manager/network/2023-09-01/adminrules/model_baseadminrule.go index bbcabba727e..9b510b6b2b9 100644 --- a/resource-manager/network/2023-09-01/adminrules/model_baseadminrule.go +++ b/resource-manager/network/2023-09-01/adminrules/model_baseadminrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseAdminRule interface { + BaseAdminRule() BaseBaseAdminRuleImpl +} + +var _ BaseAdminRule = BaseBaseAdminRuleImpl{} + +type BaseBaseAdminRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s } -// RawBaseAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseAdminRule = RawBaseAdminRuleImpl{} + +// RawBaseAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseAdminRuleImpl struct { - Type string - Values map[string]interface{} + baseAdminRule BaseBaseAdminRuleImpl + Type string + Values map[string]interface{} } -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { +func (s RawBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s.baseAdminRule +} + +func UnmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { return out, nil } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseBaseAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseAdminRuleImpl: %+v", err) } - return out, nil + + return RawBaseAdminRuleImpl{ + baseAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-09-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2023-09-01/adminrules/model_defaultadminrule.go index 7a93ae7edc9..3695c8332dc 100644 --- a/resource-manager/network/2023-09-01/adminrules/model_defaultadminrule.go +++ b/resource-manager/network/2023-09-01/adminrules/model_defaultadminrule.go @@ -16,13 +16,26 @@ type DefaultAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s DefaultAdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = DefaultAdminRule{} func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/adminrules/version.go b/resource-manager/network/2023-09-01/adminrules/version.go index 6fb0d8659a6..21712b12fd0 100644 --- a/resource-manager/network/2023-09-01/adminrules/version.go +++ b/resource-manager/network/2023-09-01/adminrules/version.go @@ -1,12 +1,10 @@ package adminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrules/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/README.md index fb55702b044..f9355db2884 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/README.md +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections` Documentation -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `applicationgatewayprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/client.go index 10a57c1c475..2218d4c59f1 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/client.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { } func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go index e1cb4795761..98b4f043cb9 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go index aad51fee91b..3e07c149e6e 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*Applicat } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input strin } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/method_get.go index f3f7a21ab28..dace2e6df65 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/method_get.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Cont var model ApplicationGatewayPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/version.go index 36f51e119fe..89329f5ccfc 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/version.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/README.md index ab388152c20..f006c66874e 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/README.md +++ b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources` Documentation -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `applicationgatewayprivatelinkresources` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/client.go index 9e064641526..81bc1b2fb1d 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/client.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { } func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go index f86cb06512e..06702643dd2 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/version.go index 263467ecf01..0cad805474c 100644 --- a/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/version.go +++ b/resource-manager/network/2023-09-01/applicationgatewayprivatelinkresources/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/applicationgateways/README.md b/resource-manager/network/2023-09-01/applicationgateways/README.md index 76a7011d769..e7a37b0063b 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/README.md +++ b/resource-manager/network/2023-09-01/applicationgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationgateways` Documentation -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `applicationgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/applicationgateways/client.go b/resource-manager/network/2023-09-01/applicationgateways/client.go index 9608bf47106..3cd17d71726 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/client.go +++ b/resource-manager/network/2023-09-01/applicationgateways/client.go @@ -15,7 +15,7 @@ type ApplicationGatewaysClient struct { } func NewApplicationGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2023-09-01/applicationgateways/id_applicationgateway.go index 0611edc8513..62f5b1be065 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/id_applicationgateway.go +++ b/resource-manager/network/2023-09-01/applicationgateways/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2023-09-01/applicationgateways/id_predefinedpolicy.go index f22e541bda3..71d5c0e0d52 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/id_predefinedpolicy.go +++ b/resource-manager/network/2023-09-01/applicationgateways/id_predefinedpolicy.go @@ -40,7 +40,7 @@ func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, er } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2023-09-01/applicationgateways/method_backendhealth.go index 21c25eb922c..2ab399ab3f9 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_backendhealth.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_backendhealth.go @@ -37,6 +37,7 @@ func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2023-09-01/applicationgateways/method_backendhealthondemand.go index 2db3547857a..a22fd7135ce 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_backendhealthondemand.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_backendhealthondemand.go @@ -37,6 +37,7 @@ func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_get.go b/resource-manager/network/2023-09-01/applicationgateways/method_get.go index 03000d91a47..c25227f49ca 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_get.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewa var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2023-09-01/applicationgateways/method_getsslpredefinedpolicy.go index 97530703e81..d42b5d2730e 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_getsslpredefinedpolicy.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_getsslpredefinedpolicy.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, i var model ApplicationGatewaySslPredefinedPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablerequestheaders.go index 634799c7f70..8132f0945cf 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablerequestheaders.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablerequestheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2023-09-01/applicationgateways/method_listavailableresponseheaders.go index fe99c70d2e7..89bdb636e2e 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_listavailableresponseheaders.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_listavailableresponseheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2023-09-01/applicationgateways/method_listavailableservervariables.go index b48bb86d765..f2a0d8c4b79 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_listavailableservervariables.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_listavailableservervariables.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablessloptions.go index 386a33e5e84..f446cd3730a 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablessloptions.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablessloptions.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, var model ApplicationGatewayAvailableSslOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablewafrulesets.go index 3df1a2db564..ee2a21477a5 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_listavailablewafrulesets.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_listavailablewafrulesets.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, var model ApplicationGatewayAvailableWafRuleSetsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/method_updatetags.go b/resource-manager/network/2023-09-01/applicationgateways/method_updatetags.go index d22b3615559..875c2ce138d 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/method_updatetags.go +++ b/resource-manager/network/2023-09-01/applicationgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id Applicatio var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgateways/version.go b/resource-manager/network/2023-09-01/applicationgateways/version.go index f78c40f39f2..81d3d732708 100644 --- a/resource-manager/network/2023-09-01/applicationgateways/version.go +++ b/resource-manager/network/2023-09-01/applicationgateways/version.go @@ -1,12 +1,10 @@ package applicationgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/README.md index eb0e4cadda4..56e428b09d7 100644 --- a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/README.md +++ b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests` Documentation -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/client.go index 507d8e55929..c8cf9d79e64 100644 --- a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/client.go +++ b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayWafDynamicManifestsClient struct { } func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/id_location.go index 03b931e4e2f..357f91a7bb3 100644 --- a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/id_location.go +++ b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/method_defaultget.go b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/method_defaultget.go index 0a6682174de..41ec3674d2f 100644 --- a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/method_defaultget.go +++ b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/method_defaultget.go @@ -46,7 +46,6 @@ func (c ApplicationGatewayWafDynamicManifestsClient) DefaultGet(ctx context.Cont var model ApplicationGatewayWafDynamicManifestResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/version.go index d26adbcfc20..34273da4edd 100644 --- a/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/version.go +++ b/resource-manager/network/2023-09-01/applicationgatewaywafdynamicmanifests/version.go @@ -1,12 +1,10 @@ package applicationgatewaywafdynamicmanifests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/README.md b/resource-manager/network/2023-09-01/applicationsecuritygroups/README.md index 522d9ae5aee..c2e50ec19c9 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/README.md +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/applicationsecuritygroups` Documentation -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `applicationsecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/client.go b/resource-manager/network/2023-09-01/applicationsecuritygroups/client.go index e607d64a7d3..81de33d92a0 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/client.go +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/client.go @@ -15,7 +15,7 @@ type ApplicationSecurityGroupsClient struct { } func NewApplicationSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2023-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go index a776d455c05..67f87d7b0c2 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go @@ -42,7 +42,7 @@ func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSec } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2023-09-01/applicationsecuritygroups/method_get.go index 5990e4033ff..88fdcf2df15 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/method_get.go +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id Application var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2023-09-01/applicationsecuritygroups/method_updatetags.go index 0343cea5693..3337e0dc239 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/method_updatetags.go +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id Appl var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/applicationsecuritygroups/version.go b/resource-manager/network/2023-09-01/applicationsecuritygroups/version.go index a5f040b06ba..a52c5184313 100644 --- a/resource-manager/network/2023-09-01/applicationsecuritygroups/version.go +++ b/resource-manager/network/2023-09-01/applicationsecuritygroups/version.go @@ -1,12 +1,10 @@ package applicationsecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationsecuritygroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/availabledelegations/README.md b/resource-manager/network/2023-09-01/availabledelegations/README.md index f005b862001..269074c75b8 100644 --- a/resource-manager/network/2023-09-01/availabledelegations/README.md +++ b/resource-manager/network/2023-09-01/availabledelegations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/availabledelegations` Documentation -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `availabledelegations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/availabledelegations/client.go b/resource-manager/network/2023-09-01/availabledelegations/client.go index ff6ff754bce..2b7153e2c60 100644 --- a/resource-manager/network/2023-09-01/availabledelegations/client.go +++ b/resource-manager/network/2023-09-01/availabledelegations/client.go @@ -15,7 +15,7 @@ type AvailableDelegationsClient struct { } func NewAvailableDelegationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabledelegations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabledelegations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/availabledelegations/id_location.go b/resource-manager/network/2023-09-01/availabledelegations/id_location.go index 411da010546..be331f465d6 100644 --- a/resource-manager/network/2023-09-01/availabledelegations/id_location.go +++ b/resource-manager/network/2023-09-01/availabledelegations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2023-09-01/availabledelegations/id_providerlocation.go index 18b359986fc..238b7f2192e 100644 --- a/resource-manager/network/2023-09-01/availabledelegations/id_providerlocation.go +++ b/resource-manager/network/2023-09-01/availabledelegations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/availabledelegations/version.go b/resource-manager/network/2023-09-01/availabledelegations/version.go index 1dbee943bdd..750f10de56d 100644 --- a/resource-manager/network/2023-09-01/availabledelegations/version.go +++ b/resource-manager/network/2023-09-01/availabledelegations/version.go @@ -1,12 +1,10 @@ package availabledelegations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabledelegations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/availableservicealiases/README.md b/resource-manager/network/2023-09-01/availableservicealiases/README.md index d1857a3d9c4..864a411c93f 100644 --- a/resource-manager/network/2023-09-01/availableservicealiases/README.md +++ b/resource-manager/network/2023-09-01/availableservicealiases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/availableservicealiases` Documentation -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `availableservicealiases` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/availableservicealiases/client.go b/resource-manager/network/2023-09-01/availableservicealiases/client.go index 383e80f6061..5f9e19acaa8 100644 --- a/resource-manager/network/2023-09-01/availableservicealiases/client.go +++ b/resource-manager/network/2023-09-01/availableservicealiases/client.go @@ -15,7 +15,7 @@ type AvailableServiceAliasesClient struct { } func NewAvailableServiceAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableservicealiases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableservicealiases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/availableservicealiases/id_location.go b/resource-manager/network/2023-09-01/availableservicealiases/id_location.go index 5bff2b43759..08ab16f2f59 100644 --- a/resource-manager/network/2023-09-01/availableservicealiases/id_location.go +++ b/resource-manager/network/2023-09-01/availableservicealiases/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2023-09-01/availableservicealiases/id_providerlocation.go index 7ec8519458c..0bb4c77565c 100644 --- a/resource-manager/network/2023-09-01/availableservicealiases/id_providerlocation.go +++ b/resource-manager/network/2023-09-01/availableservicealiases/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/availableservicealiases/version.go b/resource-manager/network/2023-09-01/availableservicealiases/version.go index 240f1346a44..d6ad2e3b60a 100644 --- a/resource-manager/network/2023-09-01/availableservicealiases/version.go +++ b/resource-manager/network/2023-09-01/availableservicealiases/version.go @@ -1,12 +1,10 @@ package availableservicealiases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableservicealiases/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/azurefirewalls/README.md b/resource-manager/network/2023-09-01/azurefirewalls/README.md index 4640488d4b5..8b765f35a57 100644 --- a/resource-manager/network/2023-09-01/azurefirewalls/README.md +++ b/resource-manager/network/2023-09-01/azurefirewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/azurefirewalls` Documentation -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `azurefirewalls` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/azurefirewalls/client.go b/resource-manager/network/2023-09-01/azurefirewalls/client.go index e1119aea925..02df961b70b 100644 --- a/resource-manager/network/2023-09-01/azurefirewalls/client.go +++ b/resource-manager/network/2023-09-01/azurefirewalls/client.go @@ -15,7 +15,7 @@ type AzureFirewallsClient struct { } func NewAzureFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurefirewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurefirewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2023-09-01/azurefirewalls/id_azurefirewall.go index 20ab073f448..a3d4db3a367 100644 --- a/resource-manager/network/2023-09-01/azurefirewalls/id_azurefirewall.go +++ b/resource-manager/network/2023-09-01/azurefirewalls/id_azurefirewall.go @@ -42,7 +42,7 @@ func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/azurefirewalls/method_get.go b/resource-manager/network/2023-09-01/azurefirewalls/method_get.go index 7fa6155aa4a..e9802794921 100644 --- a/resource-manager/network/2023-09-01/azurefirewalls/method_get.go +++ b/resource-manager/network/2023-09-01/azurefirewalls/method_get.go @@ -45,7 +45,6 @@ func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (resu var model AzureFirewall result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/azurefirewalls/version.go b/resource-manager/network/2023-09-01/azurefirewalls/version.go index 542215396ef..c3d03adbf9b 100644 --- a/resource-manager/network/2023-09-01/azurefirewalls/version.go +++ b/resource-manager/network/2023-09-01/azurefirewalls/version.go @@ -1,12 +1,10 @@ package azurefirewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurefirewalls/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/bastionhosts/README.md b/resource-manager/network/2023-09-01/bastionhosts/README.md index f54f86b3829..324daaa1409 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/README.md +++ b/resource-manager/network/2023-09-01/bastionhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/bastionhosts` Documentation -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `bastionhosts` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/bastionhosts/client.go b/resource-manager/network/2023-09-01/bastionhosts/client.go index 95e06c7f523..f77ea65ff0a 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/client.go +++ b/resource-manager/network/2023-09-01/bastionhosts/client.go @@ -15,7 +15,7 @@ type BastionHostsClient struct { } func NewBastionHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2023-09-01/bastionhosts/id_bastionhost.go index 66012e2eda5..f1d36f02936 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/id_bastionhost.go +++ b/resource-manager/network/2023-09-01/bastionhosts/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/bastionhosts/method_get.go b/resource-manager/network/2023-09-01/bastionhosts/method_get.go index 71b1a85a45f..7d0d6c578df 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/method_get.go +++ b/resource-manager/network/2023-09-01/bastionhosts/method_get.go @@ -45,7 +45,6 @@ func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result G var model BastionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/bastionhosts/version.go b/resource-manager/network/2023-09-01/bastionhosts/version.go index e7fdff294b4..2d042b960e3 100644 --- a/resource-manager/network/2023-09-01/bastionhosts/version.go +++ b/resource-manager/network/2023-09-01/bastionhosts/version.go @@ -1,12 +1,10 @@ package bastionhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionhosts/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/README.md b/resource-manager/network/2023-09-01/bastionshareablelink/README.md index fedfe877279..f504903093f 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/README.md +++ b/resource-manager/network/2023-09-01/bastionshareablelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/bastionshareablelink` Documentation -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `bastionshareablelink` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/client.go b/resource-manager/network/2023-09-01/bastionshareablelink/client.go index 9c49b25b52f..39fc8e4cbdd 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/client.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/client.go @@ -15,7 +15,7 @@ type BastionShareableLinkClient struct { } func NewBastionShareableLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionshareablelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionshareablelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2023-09-01/bastionshareablelink/id_bastionhost.go index b2cc2bfc5be..0f1852a854d 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/id_bastionhost.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/bastionshareablelink/version.go b/resource-manager/network/2023-09-01/bastionshareablelink/version.go index eeccba37a0c..9728e8436ae 100644 --- a/resource-manager/network/2023-09-01/bastionshareablelink/version.go +++ b/resource-manager/network/2023-09-01/bastionshareablelink/version.go @@ -1,12 +1,10 @@ package bastionshareablelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionshareablelink/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/bgpservicecommunities/README.md b/resource-manager/network/2023-09-01/bgpservicecommunities/README.md index 85b459a5e26..774b0c446eb 100644 --- a/resource-manager/network/2023-09-01/bgpservicecommunities/README.md +++ b/resource-manager/network/2023-09-01/bgpservicecommunities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/bgpservicecommunities` Documentation -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `bgpservicecommunities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/bgpservicecommunities/client.go b/resource-manager/network/2023-09-01/bgpservicecommunities/client.go index 07cf4f59649..0fbe7d0bd51 100644 --- a/resource-manager/network/2023-09-01/bgpservicecommunities/client.go +++ b/resource-manager/network/2023-09-01/bgpservicecommunities/client.go @@ -15,7 +15,7 @@ type BgpServiceCommunitiesClient struct { } func NewBgpServiceCommunitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bgpservicecommunities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bgpservicecommunities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/bgpservicecommunities/version.go b/resource-manager/network/2023-09-01/bgpservicecommunities/version.go index e9993d87721..5e055c915d0 100644 --- a/resource-manager/network/2023-09-01/bgpservicecommunities/version.go +++ b/resource-manager/network/2023-09-01/bgpservicecommunities/version.go @@ -1,12 +1,10 @@ package bgpservicecommunities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bgpservicecommunities/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/checkdnsavailabilities/README.md b/resource-manager/network/2023-09-01/checkdnsavailabilities/README.md index 907c663d704..f16f7a49324 100644 --- a/resource-manager/network/2023-09-01/checkdnsavailabilities/README.md +++ b/resource-manager/network/2023-09-01/checkdnsavailabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/checkdnsavailabilities` Documentation -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `checkdnsavailabilities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/checkdnsavailabilities/client.go b/resource-manager/network/2023-09-01/checkdnsavailabilities/client.go index 14eb1a4baa0..3641ce2ee39 100644 --- a/resource-manager/network/2023-09-01/checkdnsavailabilities/client.go +++ b/resource-manager/network/2023-09-01/checkdnsavailabilities/client.go @@ -15,7 +15,7 @@ type CheckDnsAvailabilitiesClient struct { } func NewCheckDnsAvailabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2023-09-01/checkdnsavailabilities/id_location.go index 1adf8c560da..208d2c68c41 100644 --- a/resource-manager/network/2023-09-01/checkdnsavailabilities/id_location.go +++ b/resource-manager/network/2023-09-01/checkdnsavailabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2023-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go index 276e19a8dd4..aa291abadeb 100644 --- a/resource-manager/network/2023-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ b/resource-manager/network/2023-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go @@ -34,6 +34,7 @@ func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Conte var model DnsNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/checkdnsavailabilities/version.go b/resource-manager/network/2023-09-01/checkdnsavailabilities/version.go index fedecb14282..899d81f2062 100644 --- a/resource-manager/network/2023-09-01/checkdnsavailabilities/version.go +++ b/resource-manager/network/2023-09-01/checkdnsavailabilities/version.go @@ -1,12 +1,10 @@ package checkdnsavailabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkdnsavailabilities/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/README.md index 698928a1faf..8f8bb8d2c7f 100644 --- a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/README.md +++ b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/cloudservicepublicipaddresses` Documentation -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `cloudservicepublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/client.go index 4eebc5f720f..3ffc0d7ae83 100644 --- a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/client.go +++ b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/client.go @@ -15,7 +15,7 @@ type CloudServicePublicIPAddressesClient struct { } func NewCloudServicePublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/id_providercloudservice.go index 2750d8acfa0..86cef14917e 100644 --- a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go index b3e6c192d39..dabdeb2c12e 100644 --- a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeade func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePub var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/version.go index 4aa88b86a66..e1857da1469 100644 --- a/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/version.go +++ b/resource-manager/network/2023-09-01/cloudservicepublicipaddresses/version.go @@ -1,12 +1,10 @@ package cloudservicepublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudservicepublicipaddresses/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/README.md b/resource-manager/network/2023-09-01/connectionmonitors/README.md index 2403f957fb1..f78be757c11 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/README.md +++ b/resource-manager/network/2023-09-01/connectionmonitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/connectionmonitors` Documentation -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `connectionmonitors` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/connectionmonitors/client.go b/resource-manager/network/2023-09-01/connectionmonitors/client.go index a8ff516ce50..c23a27cd53b 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/client.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/client.go @@ -15,7 +15,7 @@ type ConnectionMonitorsClient struct { } func NewConnectionMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectionmonitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectionmonitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2023-09-01/connectionmonitors/id_connectionmonitor.go index 10d851fd213..8563d9fa155 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/id_connectionmonitor.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/id_connectionmonitor.go @@ -44,7 +44,7 @@ func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2023-09-01/connectionmonitors/id_networkwatcher.go index c112368b0b7..af556752c60 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/id_networkwatcher.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2023-09-01/connectionmonitors/method_createorupdate.go index f2d252c628d..069036d65fe 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/method_get.go b/resource-manager/network/2023-09-01/connectionmonitors/method_get.go index 883ffbdfd40..8087a322df3 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/method_get.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorI var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/method_list.go b/resource-manager/network/2023-09-01/connectionmonitors/method_list.go index 40de4efcac7..46eea3af26b 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/method_list.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/method_list.go @@ -46,7 +46,6 @@ func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) var model ConnectionMonitorListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2023-09-01/connectionmonitors/method_updatetags.go index 04091a0b16c..e6e1f8be8d1 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/method_updatetags.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/method_updatetags.go @@ -49,7 +49,6 @@ func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionM var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/connectionmonitors/version.go b/resource-manager/network/2023-09-01/connectionmonitors/version.go index 59bdfa7222b..05054089c7e 100644 --- a/resource-manager/network/2023-09-01/connectionmonitors/version.go +++ b/resource-manager/network/2023-09-01/connectionmonitors/version.go @@ -1,12 +1,10 @@ package connectionmonitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectionmonitors/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/README.md b/resource-manager/network/2023-09-01/connectivityconfigurations/README.md index dbafd4b5910..95958ed95ae 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/README.md +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/connectivityconfigurations` Documentation -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `connectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/client.go b/resource-manager/network/2023-09-01/connectivityconfigurations/client.go index 7fb783f963a..8d908853770 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/client.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/client.go @@ -15,7 +15,7 @@ type ConnectivityConfigurationsClient struct { } func NewConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2023-09-01/connectivityconfigurations/id_connectivityconfiguration.go index d00d054bd40..c969a2cf413 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/id_connectivityconfiguration.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/id_connectivityconfiguration.go @@ -44,7 +44,7 @@ func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationI } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityC } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2023-09-01/connectivityconfigurations/id_networkmanager.go index 1f7b8c3216b..833ef39fdb4 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2023-09-01/connectivityconfigurations/method_createorupdate.go index 3ad8680898d..e8278cdba63 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2023-09-01/connectivityconfigurations/method_delete.go index 8646fac9ed8..a1c5884b210 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/method_delete.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/method_get.go b/resource-manager/network/2023-09-01/connectivityconfigurations/method_get.go index d8769033b0a..3471bd0faf1 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/method_get.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id Connectivi var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/method_list.go b/resource-manager/network/2023-09-01/connectivityconfigurations/method_list.go index 95ba68f0bc1..6663f9e80ae 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/method_list.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/connectivityconfigurations/version.go b/resource-manager/network/2023-09-01/connectivityconfigurations/version.go index 9a75098c608..95198f68542 100644 --- a/resource-manager/network/2023-09-01/connectivityconfigurations/version.go +++ b/resource-manager/network/2023-09-01/connectivityconfigurations/version.go @@ -1,12 +1,10 @@ package connectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectivityconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/customipprefixes/README.md b/resource-manager/network/2023-09-01/customipprefixes/README.md index 563f473e56d..b53c0864d01 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/README.md +++ b/resource-manager/network/2023-09-01/customipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/customipprefixes` Documentation -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `customipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/customipprefixes/client.go b/resource-manager/network/2023-09-01/customipprefixes/client.go index 1e1c6887c4a..2b241f7b0e7 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/client.go +++ b/resource-manager/network/2023-09-01/customipprefixes/client.go @@ -15,7 +15,7 @@ type CustomIPPrefixesClient struct { } func NewCustomIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2023-09-01/customipprefixes/id_customipprefix.go index d4206cbdfb5..5ea825eb6cd 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/id_customipprefix.go +++ b/resource-manager/network/2023-09-01/customipprefixes/id_customipprefix.go @@ -42,7 +42,7 @@ func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/customipprefixes/method_get.go b/resource-manager/network/2023-09-01/customipprefixes/method_get.go index 9215609651a..61164d79480 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/method_get.go +++ b/resource-manager/network/2023-09-01/customipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, op var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/customipprefixes/method_updatetags.go b/resource-manager/network/2023-09-01/customipprefixes/method_updatetags.go index c61802109c3..2962a005ed8 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/method_updatetags.go +++ b/resource-manager/network/2023-09-01/customipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefi var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/customipprefixes/version.go b/resource-manager/network/2023-09-01/customipprefixes/version.go index 93ec32c0c04..70352c2690e 100644 --- a/resource-manager/network/2023-09-01/customipprefixes/version.go +++ b/resource-manager/network/2023-09-01/customipprefixes/version.go @@ -1,12 +1,10 @@ package customipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customipprefixes/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/README.md b/resource-manager/network/2023-09-01/ddoscustompolicies/README.md index dfe2680acbd..5ba7daef413 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/README.md +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ddoscustompolicies` Documentation -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `ddoscustompolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/client.go b/resource-manager/network/2023-09-01/ddoscustompolicies/client.go index e6985cefaee..93a9d3ac0d4 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/client.go +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/client.go @@ -15,7 +15,7 @@ type DdosCustomPoliciesClient struct { } func NewDdosCustomPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddoscustompolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddoscustompolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2023-09-01/ddoscustompolicies/id_ddoscustompolicy.go index 1898126aafc..5107ae00e4f 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/id_ddoscustompolicy.go +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/id_ddoscustompolicy.go @@ -42,7 +42,7 @@ func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, er } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/method_get.go b/resource-manager/network/2023-09-01/ddoscustompolicies/method_get.go index 07a8cdf6ad0..288dcc99b4a 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/method_get.go +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/method_get.go @@ -45,7 +45,6 @@ func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2023-09-01/ddoscustompolicies/method_updatetags.go index b64aa2cb519..1e74f849d0b 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/method_updatetags.go +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomP var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ddoscustompolicies/version.go b/resource-manager/network/2023-09-01/ddoscustompolicies/version.go index 5b1322b0e08..bb03d151b79 100644 --- a/resource-manager/network/2023-09-01/ddoscustompolicies/version.go +++ b/resource-manager/network/2023-09-01/ddoscustompolicies/version.go @@ -1,12 +1,10 @@ package ddoscustompolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddoscustompolicies/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/README.md b/resource-manager/network/2023-09-01/ddosprotectionplans/README.md index 9dac8516ef6..4e90c515fe7 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/README.md +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ddosprotectionplans` Documentation -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `ddosprotectionplans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/client.go b/resource-manager/network/2023-09-01/ddosprotectionplans/client.go index de83f23ea42..e117bf49a8f 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/client.go +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/client.go @@ -15,7 +15,7 @@ type DdosProtectionPlansClient struct { } func NewDdosProtectionPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddosprotectionplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddosprotectionplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2023-09-01/ddosprotectionplans/id_ddosprotectionplan.go index 1be4cad64d9..962147e9da0 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/id_ddosprotectionplan.go +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/id_ddosprotectionplan.go @@ -42,7 +42,7 @@ func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/method_get.go b/resource-manager/network/2023-09-01/ddosprotectionplans/method_get.go index 9003f8a00c3..7a92875442e 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/method_get.go +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/method_get.go @@ -45,7 +45,6 @@ func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPla var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2023-09-01/ddosprotectionplans/method_updatetags.go index 07e469082e6..a5b91c81b71 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/method_updatetags.go +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtec var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ddosprotectionplans/version.go b/resource-manager/network/2023-09-01/ddosprotectionplans/version.go index 6c06c56468d..bf9e5eafe73 100644 --- a/resource-manager/network/2023-09-01/ddosprotectionplans/version.go +++ b/resource-manager/network/2023-09-01/ddosprotectionplans/version.go @@ -1,12 +1,10 @@ package ddosprotectionplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddosprotectionplans/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/dscpconfiguration/README.md b/resource-manager/network/2023-09-01/dscpconfiguration/README.md index 0cd851750c7..2595cf4123b 100644 --- a/resource-manager/network/2023-09-01/dscpconfiguration/README.md +++ b/resource-manager/network/2023-09-01/dscpconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/dscpconfiguration` Documentation -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `dscpconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/dscpconfiguration/client.go b/resource-manager/network/2023-09-01/dscpconfiguration/client.go index ed6cfe7aa08..76ab56d4977 100644 --- a/resource-manager/network/2023-09-01/dscpconfiguration/client.go +++ b/resource-manager/network/2023-09-01/dscpconfiguration/client.go @@ -15,7 +15,7 @@ type DscpConfigurationClient struct { } func NewDscpConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2023-09-01/dscpconfiguration/id_dscpconfiguration.go index 8eb56f33d98..f4b606b48f4 100644 --- a/resource-manager/network/2023-09-01/dscpconfiguration/id_dscpconfiguration.go +++ b/resource-manager/network/2023-09-01/dscpconfiguration/id_dscpconfiguration.go @@ -42,7 +42,7 @@ func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/dscpconfiguration/method_get.go b/resource-manager/network/2023-09-01/dscpconfiguration/method_get.go index 1563a9b978b..cb94f50eba5 100644 --- a/resource-manager/network/2023-09-01/dscpconfiguration/method_get.go +++ b/resource-manager/network/2023-09-01/dscpconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId var model DscpConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/dscpconfiguration/version.go b/resource-manager/network/2023-09-01/dscpconfiguration/version.go index 344b697c118..af5a8fec53e 100644 --- a/resource-manager/network/2023-09-01/dscpconfiguration/version.go +++ b/resource-manager/network/2023-09-01/dscpconfiguration/version.go @@ -1,12 +1,10 @@ package dscpconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfiguration/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/dscpconfigurations/README.md b/resource-manager/network/2023-09-01/dscpconfigurations/README.md index 7fe5eaad636..76864fc5b78 100644 --- a/resource-manager/network/2023-09-01/dscpconfigurations/README.md +++ b/resource-manager/network/2023-09-01/dscpconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/dscpconfigurations` Documentation -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `dscpconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/dscpconfigurations/client.go b/resource-manager/network/2023-09-01/dscpconfigurations/client.go index ef38b8d0533..f8740f737f6 100644 --- a/resource-manager/network/2023-09-01/dscpconfigurations/client.go +++ b/resource-manager/network/2023-09-01/dscpconfigurations/client.go @@ -15,7 +15,7 @@ type DscpConfigurationsClient struct { } func NewDscpConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/dscpconfigurations/version.go b/resource-manager/network/2023-09-01/dscpconfigurations/version.go index aac312f2fb4..2fa7c3943d0 100644 --- a/resource-manager/network/2023-09-01/dscpconfigurations/version.go +++ b/resource-manager/network/2023-09-01/dscpconfigurations/version.go @@ -1,12 +1,10 @@ package dscpconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/endpointservices/README.md b/resource-manager/network/2023-09-01/endpointservices/README.md index 886cb26e9f9..bb9a512013b 100644 --- a/resource-manager/network/2023-09-01/endpointservices/README.md +++ b/resource-manager/network/2023-09-01/endpointservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/endpointservices` Documentation -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `endpointservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/endpointservices/client.go b/resource-manager/network/2023-09-01/endpointservices/client.go index c04faa1ffd8..44e82b37c46 100644 --- a/resource-manager/network/2023-09-01/endpointservices/client.go +++ b/resource-manager/network/2023-09-01/endpointservices/client.go @@ -15,7 +15,7 @@ type EndpointServicesClient struct { } func NewEndpointServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/endpointservices/id_location.go b/resource-manager/network/2023-09-01/endpointservices/id_location.go index b3f9df03861..bc549e11a00 100644 --- a/resource-manager/network/2023-09-01/endpointservices/id_location.go +++ b/resource-manager/network/2023-09-01/endpointservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/endpointservices/version.go b/resource-manager/network/2023-09-01/endpointservices/version.go index c0780cbcfa6..c036278eaa5 100644 --- a/resource-manager/network/2023-09-01/endpointservices/version.go +++ b/resource-manager/network/2023-09-01/endpointservices/version.go @@ -1,12 +1,10 @@ package endpointservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointservices/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md index e6431732440..2d4758e8500 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitarptable` Documentation -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/client.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/client.go index a927b3e2a41..b13a5d9774e 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitArpTableClient struct { } func NewExpressRouteCircuitArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/id_arptable.go index c01410283c1..af630a9dd1a 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/id_arptable.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/id_arptable.go @@ -46,7 +46,7 @@ func ParseArpTableID(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitarptable/version.go b/resource-manager/network/2023-09-01/expressroutecircuitarptable/version.go index 3f9784f3103..b24193f32cf 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitarptable/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitarptable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitarptable/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/README.md index 8894a0f8a35..adba65db883 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitauthorizations` Documentation -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/client.go index 8060a80be1e..2d3988ae8a8 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitAuthorizationsClient struct { } func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_authorization.go index b659c5a5b8c..430deb067c3 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_authorization.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go index a46fa52bf5d..b80003e486f 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/method_get.go index 19e783a8675..823c3b06cfc 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id Aut var model ExpressRouteCircuitAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/version.go index 296b5b76e31..4487538fe81 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitauthorizations/version.go @@ -1,12 +1,10 @@ package expressroutecircuitauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitauthorizations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitconnections/README.md b/resource-manager/network/2023-09-01/expressroutecircuitconnections/README.md index 82af22ad433..bda40d023db 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitconnections/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitconnections` Documentation -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitconnections/client.go b/resource-manager/network/2023-09-01/expressroutecircuitconnections/client.go index 333eff0e189..6ce57a4cb92 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitconnections/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitConnectionsClient struct { } func NewExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2023-09-01/expressroutecircuitconnections/id_peeringconnection.go index 0e2e6d6c894..c789977d4fc 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitconnections/id_peeringconnection.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitconnections/id_peeringconnection.go @@ -46,7 +46,7 @@ func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2023-09-01/expressroutecircuitconnections/method_get.go index 0a4a18dd7cc..ca510dffdd4 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Peerin var model ExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitconnections/version.go b/resource-manager/network/2023-09-01/expressroutecircuitconnections/version.go index 7ddaa436c5f..4720a31e5e6 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitconnections/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package expressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/README.md index 84cf7d13ea2..00220abfa6e 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitpeerings` Documentation -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/client.go index 63ac4daefad..ce7c06a4f7b 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitPeeringsClient struct { } func NewExpressRouteCircuitPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go index 51f74b9a362..71e57edae8c 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/method_get.go index 0937d0e96a9..217363c38a1 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/method_get.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids var model ExpressRouteCircuitPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/version.go index cc3597e93e7..d02f5f8022d 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitpeerings/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecircuitpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitpeerings/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md index 3511fb573c2..579e29f0b60 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitroutestable` Documentation -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitroutestable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/client.go index 925b7f29bae..64933522e0c 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableClient struct { } func NewExpressRouteCircuitRoutesTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/id_peeringroutetable.go index 895e343bf35..e2aeb69ec6d 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/id_peeringroutetable.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/version.go index 053fdf3247c..faf5f28779d 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestable/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestable/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md index d30b56aa2bc..c4f754e513a 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary` Documentation -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitroutestablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/client.go index 5565926cb76..1964d42b872 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableSummaryClient struct { } func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go index 16c5b0c301a..23c30e2e03b 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go @@ -46,7 +46,7 @@ func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/version.go index 6b2de279810..470bd516f4c 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitroutestablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/README.md b/resource-manager/network/2023-09-01/expressroutecircuits/README.md index 17ec6bf4c74..4ae17362314 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuits` Documentation -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuits` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/client.go b/resource-manager/network/2023-09-01/expressroutecircuits/client.go index cd12ab163e6..e618de82828 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuits/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitsClient struct { } func NewExpressRouteCircuitsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2023-09-01/expressroutecircuits/id_expressroutecircuit.go index d48e8e429e7..cd8d55cab28 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/id_expressroutecircuit.go +++ b/resource-manager/network/2023-09-01/expressroutecircuits/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/method_get.go b/resource-manager/network/2023-09-01/expressroutecircuits/method_get.go index 2047441e60b..f44a9d7ab3d 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecircuits/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCirc var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2023-09-01/expressroutecircuits/method_updatetags.go index 8426eb683b2..2188a40d783 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/method_updatetags.go +++ b/resource-manager/network/2023-09-01/expressroutecircuits/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRo var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuits/version.go b/resource-manager/network/2023-09-01/expressroutecircuits/version.go index be8aa483325..b76b930299a 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuits/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuits/version.go @@ -1,12 +1,10 @@ package expressroutecircuits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuits/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/README.md b/resource-manager/network/2023-09-01/expressroutecircuitstats/README.md index dbe0302a615..69040309e07 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/README.md +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecircuitstats` Documentation -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecircuitstats` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/client.go b/resource-manager/network/2023-09-01/expressroutecircuitstats/client.go index 43a397e1cc1..697e4ff2817 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/client.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitStatsClient struct { } func NewExpressRouteCircuitStatsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2023-09-01/expressroutecircuitstats/id_expressroutecircuit.go index cf235dfe96f..82dec662360 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/id_expressroutecircuit.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go index 5473e8458e6..14b01a4f877 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go @@ -47,7 +47,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go index 4bd3c09b58e..093f31815f0 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecircuitstats/version.go b/resource-manager/network/2023-09-01/expressroutecircuitstats/version.go index 534ca0f04d1..237e4334c10 100644 --- a/resource-manager/network/2023-09-01/expressroutecircuitstats/version.go +++ b/resource-manager/network/2023-09-01/expressroutecircuitstats/version.go @@ -1,12 +1,10 @@ package expressroutecircuitstats -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitstats/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/README.md b/resource-manager/network/2023-09-01/expressrouteconnections/README.md index 2162d8a9d35..c5fcbfb0e96 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/README.md +++ b/resource-manager/network/2023-09-01/expressrouteconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteconnections` Documentation -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/client.go b/resource-manager/network/2023-09-01/expressrouteconnections/client.go index 59b056f90da..379d1d22880 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/client.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteConnectionsClient struct { } func NewExpressRouteConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2023-09-01/expressrouteconnections/id_expressrouteconnection.go index 7bba12f409b..53f6b3e5750 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/id_expressrouteconnection.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/id_expressrouteconnection.go @@ -44,7 +44,7 @@ func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, err } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConn } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2023-09-01/expressrouteconnections/id_expressroutegateway.go index 6df37b9a7d8..c5fcbe2791f 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/id_expressroutegateway.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/method_get.go b/resource-manager/network/2023-09-01/expressrouteconnections/method_get.go index ae0992fa45d..0116eaca5cf 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/method_get.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteC var model ExpressRouteConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/method_list.go b/resource-manager/network/2023-09-01/expressrouteconnections/method_list.go index e9090e1dd56..d6233e938c4 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/method_list.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/method_list.go @@ -46,7 +46,6 @@ func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRoute var model ExpressRouteConnectionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteconnections/version.go b/resource-manager/network/2023-09-01/expressrouteconnections/version.go index af15260a0f3..6b356761fcc 100644 --- a/resource-manager/network/2023-09-01/expressrouteconnections/version.go +++ b/resource-manager/network/2023-09-01/expressrouteconnections/version.go @@ -1,12 +1,10 @@ package expressrouteconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md index 3b8bad8a686..1f034aebfd9 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable` Documentation -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecrossconnectionarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/client.go index 07328f2f394..57ec192ecdb 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/client.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionArpTableClient struct { } func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go index a90eea8a4cb..7f32dee4270 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go @@ -46,7 +46,7 @@ func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, erro } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/version.go index d77816f4706..1c5540f0767 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/version.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionarptable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/README.md index db2b3ff0570..5d6ebb92e90 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings` Documentation -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecrossconnectionpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/client.go index 90cbc899dcb..d2b06fe732d 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/client.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionPeeringsClient struct { } func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go index 626b69cff73..2099c7eab97 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_peering.go index f9e45b10c99..5b91cc2c7b0 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_peering.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/id_peering.go @@ -44,7 +44,7 @@ func ParsePeeringID(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/method_get.go index b53171627d6..4fbd73485bb 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id P var model ExpressRouteCrossConnectionPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/version.go index 9ff77b0dd1d..4e75b04b4f0 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/version.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md index 1b18a5f7b3b..bfcdd9165b4 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable` Documentation -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecrossconnectionroutetable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/client.go index 210d81d68a9..6b8b935dba0 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/client.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableClient struct { } func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go index 9a8910626cd..6067ee919b6 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go @@ -46,7 +46,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*Express } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input stri } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/version.go index 811acb6b163..2462667a088 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/version.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md index ad4913f4d9e..7cd2ad3273f 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary` Documentation -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/client.go index 5329fa515af..aaf83cd3840 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/client.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableSummaryClient struct { } func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go index ea69383cd3a..5dffd985897 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryI } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteT } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/version.go index f6293882460..52e14bbbccc 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/version.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnectionroutetablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/README.md b/resource-manager/network/2023-09-01/expressroutecrossconnections/README.md index f413148c121..ef45970a881 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/README.md +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutecrossconnections` Documentation -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutecrossconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/client.go b/resource-manager/network/2023-09-01/expressroutecrossconnections/client.go index 67aa896c58d..5df85aad3d6 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/client.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionsClient struct { } func NewExpressRouteCrossConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2023-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go index 3748db0d3a2..8128cf4c67c 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2023-09-01/expressroutecrossconnections/method_get.go index 250556ca005..e68e3ddc46d 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressR var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2023-09-01/expressroutecrossconnections/method_updatetags.go index 0c627c7653a..e55953bde8f 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/method_updatetags.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id E var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutecrossconnections/version.go b/resource-manager/network/2023-09-01/expressroutecrossconnections/version.go index ab5f19c0f33..302b5ae77aa 100644 --- a/resource-manager/network/2023-09-01/expressroutecrossconnections/version.go +++ b/resource-manager/network/2023-09-01/expressroutecrossconnections/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/README.md b/resource-manager/network/2023-09-01/expressroutegateways/README.md index cbabe0c9f3a..7256d20d3ab 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/README.md +++ b/resource-manager/network/2023-09-01/expressroutegateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutegateways` Documentation -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutegateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutegateways/client.go b/resource-manager/network/2023-09-01/expressroutegateways/client.go index a1f21a852ef..292ef72ff7b 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/client.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/client.go @@ -15,7 +15,7 @@ type ExpressRouteGatewaysClient struct { } func NewExpressRouteGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutegateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutegateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2023-09-01/expressroutegateways/id_expressroutegateway.go index 0e06d43d298..6c356e20fd4 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/id_expressroutegateway.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/method_get.go b/resource-manager/network/2023-09-01/expressroutegateways/method_get.go index 74f38c464bb..3fe9ab488d0 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGate var model ExpressRouteGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2023-09-01/expressroutegateways/method_listbyresourcegroup.go index 4676a67757a..f76de802a39 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/method_listbyresourcegroup.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2023-09-01/expressroutegateways/method_listbysubscription.go index ba74ca537ae..840cb62145e 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/method_listbysubscription.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id c var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutegateways/version.go b/resource-manager/network/2023-09-01/expressroutegateways/version.go index a1f94e3da27..5f7dde765d0 100644 --- a/resource-manager/network/2023-09-01/expressroutegateways/version.go +++ b/resource-manager/network/2023-09-01/expressroutegateways/version.go @@ -1,12 +1,10 @@ package expressroutegateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutegateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressroutelinks/README.md b/resource-manager/network/2023-09-01/expressroutelinks/README.md index d01e0bedb9c..01f072bd54b 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/README.md +++ b/resource-manager/network/2023-09-01/expressroutelinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressroutelinks` Documentation -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressroutelinks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressroutelinks/client.go b/resource-manager/network/2023-09-01/expressroutelinks/client.go index 42ba283bf4a..5b75ccca68f 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/client.go +++ b/resource-manager/network/2023-09-01/expressroutelinks/client.go @@ -15,7 +15,7 @@ type ExpressRouteLinksClient struct { } func NewExpressRouteLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutelinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutelinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2023-09-01/expressroutelinks/id_expressrouteport.go index fdf651cde65..e0aa12c1e5e 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/id_expressrouteport.go +++ b/resource-manager/network/2023-09-01/expressroutelinks/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutelinks/id_link.go b/resource-manager/network/2023-09-01/expressroutelinks/id_link.go index ff86b5a2798..b90097eb095 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/id_link.go +++ b/resource-manager/network/2023-09-01/expressroutelinks/id_link.go @@ -44,7 +44,7 @@ func ParseLinkID(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkIDInsensitively(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressroutelinks/method_get.go b/resource-manager/network/2023-09-01/expressroutelinks/method_get.go index 25857a7f294..3f132947b99 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/method_get.go +++ b/resource-manager/network/2023-09-01/expressroutelinks/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result Get var model ExpressRouteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressroutelinks/version.go b/resource-manager/network/2023-09-01/expressroutelinks/version.go index cd2dcf45387..ce3a5415da9 100644 --- a/resource-manager/network/2023-09-01/expressroutelinks/version.go +++ b/resource-manager/network/2023-09-01/expressroutelinks/version.go @@ -1,12 +1,10 @@ package expressroutelinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutelinks/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/README.md b/resource-manager/network/2023-09-01/expressrouteportauthorizations/README.md index 1b490c4686b..932afe918d9 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/README.md +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteportauthorizations` Documentation -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteportauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/client.go b/resource-manager/network/2023-09-01/expressrouteportauthorizations/client.go index a6a1e906e85..3405a1acb86 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/client.go +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortAuthorizationsClient struct { } func NewExpressRoutePortAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteport.go index 9fffd1964c0..0c4d2182b84 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteport.go +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go index 4042eea1718..ae293d47f93 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go @@ -44,7 +44,7 @@ func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthor } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRo } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2023-09-01/expressrouteportauthorizations/method_get.go index 0dd81644eba..c8df23b8dfd 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/method_get.go +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id Expres var model ExpressRoutePortAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteportauthorizations/version.go b/resource-manager/network/2023-09-01/expressrouteportauthorizations/version.go index 211e23588d5..77cfb3ed7fe 100644 --- a/resource-manager/network/2023-09-01/expressrouteportauthorizations/version.go +++ b/resource-manager/network/2023-09-01/expressrouteportauthorizations/version.go @@ -1,12 +1,10 @@ package expressrouteportauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportauthorizations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteports/README.md b/resource-manager/network/2023-09-01/expressrouteports/README.md index c46f5a4b250..daf846907a9 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/README.md +++ b/resource-manager/network/2023-09-01/expressrouteports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteports` Documentation -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteports/client.go b/resource-manager/network/2023-09-01/expressrouteports/client.go index 7b73cfca2af..82e57d5b54f 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/client.go +++ b/resource-manager/network/2023-09-01/expressrouteports/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsClient struct { } func NewExpressRoutePortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2023-09-01/expressrouteports/id_expressrouteport.go index 6ac3a3831e8..eb751415586 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/id_expressrouteport.go +++ b/resource-manager/network/2023-09-01/expressrouteports/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteports/method_generateloa.go b/resource-manager/network/2023-09-01/expressrouteports/method_generateloa.go index d0010451bf9..d5725e743a6 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/method_generateloa.go +++ b/resource-manager/network/2023-09-01/expressrouteports/method_generateloa.go @@ -50,7 +50,6 @@ func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRout var model GenerateExpressRoutePortsLOAResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteports/method_get.go b/resource-manager/network/2023-09-01/expressrouteports/method_get.go index 0f35b842ad6..dda9cada850 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/method_get.go +++ b/resource-manager/network/2023-09-01/expressrouteports/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteports/method_updatetags.go b/resource-manager/network/2023-09-01/expressrouteports/method_updatetags.go index fef0242df71..7ce98b9327b 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/method_updatetags.go +++ b/resource-manager/network/2023-09-01/expressrouteports/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoute var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteports/version.go b/resource-manager/network/2023-09-01/expressrouteports/version.go index 3ac0e2e45ab..70759f25cff 100644 --- a/resource-manager/network/2023-09-01/expressrouteports/version.go +++ b/resource-manager/network/2023-09-01/expressrouteports/version.go @@ -1,12 +1,10 @@ package expressrouteports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteports/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteportslocations/README.md b/resource-manager/network/2023-09-01/expressrouteportslocations/README.md index a215cc71393..3256f57cbfc 100644 --- a/resource-manager/network/2023-09-01/expressrouteportslocations/README.md +++ b/resource-manager/network/2023-09-01/expressrouteportslocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteportslocations` Documentation -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteportslocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteportslocations/client.go b/resource-manager/network/2023-09-01/expressrouteportslocations/client.go index 070961a7825..11ea98b6cb3 100644 --- a/resource-manager/network/2023-09-01/expressrouteportslocations/client.go +++ b/resource-manager/network/2023-09-01/expressrouteportslocations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsLocationsClient struct { } func NewExpressRoutePortsLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportslocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportslocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2023-09-01/expressrouteportslocations/id_expressrouteportslocation.go index 94e09ce7a77..2c3e6ea91b2 100644 --- a/resource-manager/network/2023-09-01/expressrouteportslocations/id_expressrouteportslocation.go +++ b/resource-manager/network/2023-09-01/expressrouteportslocations/id_expressrouteportslocation.go @@ -40,7 +40,7 @@ func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationI } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRouteP } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteportslocations/method_get.go b/resource-manager/network/2023-09-01/expressrouteportslocations/method_get.go index 58048a2240a..41422952079 100644 --- a/resource-manager/network/2023-09-01/expressrouteportslocations/method_get.go +++ b/resource-manager/network/2023-09-01/expressrouteportslocations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRou var model ExpressRoutePortsLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteportslocations/version.go b/resource-manager/network/2023-09-01/expressrouteportslocations/version.go index f80e626c383..c0e1e2ec149 100644 --- a/resource-manager/network/2023-09-01/expressrouteportslocations/version.go +++ b/resource-manager/network/2023-09-01/expressrouteportslocations/version.go @@ -1,12 +1,10 @@ package expressrouteportslocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportslocations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/README.md b/resource-manager/network/2023-09-01/expressrouteproviderports/README.md index 9f875cec579..a761db9f7ef 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/README.md +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteproviderports` Documentation -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteproviderports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/client.go b/resource-manager/network/2023-09-01/expressrouteproviderports/client.go index 696d17bbfd6..dad656ec6d0 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/client.go +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/client.go @@ -15,7 +15,7 @@ type ExpressRouteProviderPortsClient struct { } func NewExpressRouteProviderPortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteproviderports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteproviderports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2023-09-01/expressrouteproviderports/id_expressrouteproviderport.go index 2e734bb82c3..b8d7c961646 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/id_expressrouteproviderport.go +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/id_expressrouteproviderport.go @@ -40,7 +40,7 @@ func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRoutePr } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2023-09-01/expressrouteproviderports/method_expressrouteproviderport.go index 95cb93096c7..c264bf3b8aa 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/method_expressrouteproviderport.go +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/method_expressrouteproviderport.go @@ -45,7 +45,6 @@ func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Co var model ExpressRouteProviderPort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2023-09-01/expressrouteproviderports/method_locationlist.go index ad8f2e59e37..93d35794cf0 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/method_locationlist.go +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/method_locationlist.go @@ -40,6 +40,7 @@ func (o LocationListOperationOptions) ToHeaders() *client.Headers { func (o LocationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/expressrouteproviderports/version.go b/resource-manager/network/2023-09-01/expressrouteproviderports/version.go index 4235b9d64f7..2c9e80350be 100644 --- a/resource-manager/network/2023-09-01/expressrouteproviderports/version.go +++ b/resource-manager/network/2023-09-01/expressrouteproviderports/version.go @@ -1,12 +1,10 @@ package expressrouteproviderports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteproviderports/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/expressrouteserviceproviders/README.md b/resource-manager/network/2023-09-01/expressrouteserviceproviders/README.md index d6d76c51352..443ef27c76e 100644 --- a/resource-manager/network/2023-09-01/expressrouteserviceproviders/README.md +++ b/resource-manager/network/2023-09-01/expressrouteserviceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/expressrouteserviceproviders` Documentation -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `expressrouteserviceproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/expressrouteserviceproviders/client.go b/resource-manager/network/2023-09-01/expressrouteserviceproviders/client.go index d071b668e37..a20fad2a136 100644 --- a/resource-manager/network/2023-09-01/expressrouteserviceproviders/client.go +++ b/resource-manager/network/2023-09-01/expressrouteserviceproviders/client.go @@ -15,7 +15,7 @@ type ExpressRouteServiceProvidersClient struct { } func NewExpressRouteServiceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/expressrouteserviceproviders/version.go b/resource-manager/network/2023-09-01/expressrouteserviceproviders/version.go index 9705c546fcb..ca51fa26515 100644 --- a/resource-manager/network/2023-09-01/expressrouteserviceproviders/version.go +++ b/resource-manager/network/2023-09-01/expressrouteserviceproviders/version.go @@ -1,12 +1,10 @@ package expressrouteserviceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteserviceproviders/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/README.md b/resource-manager/network/2023-09-01/firewallpolicies/README.md index 17556f6c196..a157a85f94d 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/README.md +++ b/resource-manager/network/2023-09-01/firewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/firewallpolicies` Documentation -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `firewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/firewallpolicies/client.go b/resource-manager/network/2023-09-01/firewallpolicies/client.go index a162ae7a1c4..fba92b74070 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/client.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/client.go @@ -15,7 +15,7 @@ type FirewallPoliciesClient struct { } func NewFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2023-09-01/firewallpolicies/id_firewallpolicy.go index b3ab374101c..c441314efdf 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/id_firewallpolicy.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go index e13bba542e4..afb4f37a3fa 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx var model SignatureOverridesFilterValuesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go index 3317a5b3046..657d39e5a74 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Con var model QueryResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go index 0a494459f55..4ff22b6ea42 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go index 0fb145a6c0c..253dc4d8073 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx co var model SignaturesOverridesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go index 99eb2fc1d38..ebb6a03296b 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx c var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go index 2b131f1a401..51a0cf8dcc5 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_get.go b/resource-manager/network/2023-09-01/firewallpolicies/method_get.go index 2eee26d038a..c57af3124f0 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_get.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, op var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2023-09-01/firewallpolicies/method_updatetags.go index 05b103ecce7..66cfb5cb6d4 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/method_updatetags.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolic var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicies/version.go b/resource-manager/network/2023-09-01/firewallpolicies/version.go index a3e5c95a0ff..e233fd60d1e 100644 --- a/resource-manager/network/2023-09-01/firewallpolicies/version.go +++ b/resource-manager/network/2023-09-01/firewallpolicies/version.go @@ -1,12 +1,10 @@ package firewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicies/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/README.md index ae97e1275a1..4ed0cecb0c3 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/README.md +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups` Documentation -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `firewallpolicyrulecollectiongroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/client.go index ef562ceb4a0..2c48ff99f6d 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/client.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/client.go @@ -15,7 +15,7 @@ type FirewallPolicyRuleCollectionGroupsClient struct { } func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go index 9a3d14e2193..d2fd507040f 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go index 5af7b6ffe79..d44dae3a1f1 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/method_get.go index 9c1602d7177..2f494c21970 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/method_get.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/method_get.go @@ -45,7 +45,6 @@ func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id Ru var model FirewallPolicyRuleCollectionGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go index 3e2815413ed..00f2de60a64 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go @@ -23,8 +23,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -38,9 +48,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go index 6e9762da492..dc9f5bf1ae5 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go index 114889c0540..3a831856445 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go index 5cd71ef998a..f96fbf78c6e 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go index 30f1b958dc8..95e10cb00f1 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go index e395e7aa41f..f06c3ac6b19 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go @@ -41,7 +41,7 @@ func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) } diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_natrule.go index 5354374d68c..2e80421cd23 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go index 7548f48a194..90231437759 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/version.go index 95e9fce8e12..4ea131d8ea4 100644 --- a/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/version.go +++ b/resource-manager/network/2023-09-01/firewallpolicyrulecollectiongroups/version.go @@ -1,12 +1,10 @@ package firewallpolicyrulecollectiongroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/flowlogs/README.md b/resource-manager/network/2023-09-01/flowlogs/README.md index 76af9cf056e..e3b31eea6df 100644 --- a/resource-manager/network/2023-09-01/flowlogs/README.md +++ b/resource-manager/network/2023-09-01/flowlogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/flowlogs` Documentation -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `flowlogs` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/flowlogs/client.go b/resource-manager/network/2023-09-01/flowlogs/client.go index 9368055263b..6294aac5774 100644 --- a/resource-manager/network/2023-09-01/flowlogs/client.go +++ b/resource-manager/network/2023-09-01/flowlogs/client.go @@ -15,7 +15,7 @@ type FlowLogsClient struct { } func NewFlowLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flowlogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flowlogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/flowlogs/id_flowlog.go b/resource-manager/network/2023-09-01/flowlogs/id_flowlog.go index 65f0fddaf41..5a9f158bbac 100644 --- a/resource-manager/network/2023-09-01/flowlogs/id_flowlog.go +++ b/resource-manager/network/2023-09-01/flowlogs/id_flowlog.go @@ -44,7 +44,7 @@ func ParseFlowLogID(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2023-09-01/flowlogs/id_networkwatcher.go index 480aa5be344..63ae4829745 100644 --- a/resource-manager/network/2023-09-01/flowlogs/id_networkwatcher.go +++ b/resource-manager/network/2023-09-01/flowlogs/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/flowlogs/method_get.go b/resource-manager/network/2023-09-01/flowlogs/method_get.go index 91942eff6d3..8677d660354 100644 --- a/resource-manager/network/2023-09-01/flowlogs/method_get.go +++ b/resource-manager/network/2023-09-01/flowlogs/method_get.go @@ -45,7 +45,6 @@ func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperat var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/flowlogs/method_updatetags.go b/resource-manager/network/2023-09-01/flowlogs/method_updatetags.go index 7ef9682b564..1f7aec16871 100644 --- a/resource-manager/network/2023-09-01/flowlogs/method_updatetags.go +++ b/resource-manager/network/2023-09-01/flowlogs/method_updatetags.go @@ -49,7 +49,6 @@ func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input Tags var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/flowlogs/version.go b/resource-manager/network/2023-09-01/flowlogs/version.go index 52fa71fb924..497698dd5fa 100644 --- a/resource-manager/network/2023-09-01/flowlogs/version.go +++ b/resource-manager/network/2023-09-01/flowlogs/version.go @@ -1,12 +1,10 @@ package flowlogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flowlogs/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/ipallocations/README.md b/resource-manager/network/2023-09-01/ipallocations/README.md index 35608da919a..55f9e8fc497 100644 --- a/resource-manager/network/2023-09-01/ipallocations/README.md +++ b/resource-manager/network/2023-09-01/ipallocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ipallocations` Documentation -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `ipallocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/ipallocations/client.go b/resource-manager/network/2023-09-01/ipallocations/client.go index 0450bb3a685..05538bf07b7 100644 --- a/resource-manager/network/2023-09-01/ipallocations/client.go +++ b/resource-manager/network/2023-09-01/ipallocations/client.go @@ -15,7 +15,7 @@ type IPAllocationsClient struct { } func NewIPAllocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipallocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipallocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/ipallocations/id_ipallocation.go b/resource-manager/network/2023-09-01/ipallocations/id_ipallocation.go index 1f45e0c491f..1d83039e65c 100644 --- a/resource-manager/network/2023-09-01/ipallocations/id_ipallocation.go +++ b/resource-manager/network/2023-09-01/ipallocations/id_ipallocation.go @@ -42,7 +42,7 @@ func ParseIPAllocationID(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/ipallocations/method_get.go b/resource-manager/network/2023-09-01/ipallocations/method_get.go index ad7247cf495..d7ccc3afb37 100644 --- a/resource-manager/network/2023-09-01/ipallocations/method_get.go +++ b/resource-manager/network/2023-09-01/ipallocations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ipallocations/method_updatetags.go b/resource-manager/network/2023-09-01/ipallocations/method_updatetags.go index 792fe909fcb..f6fe36ff651 100644 --- a/resource-manager/network/2023-09-01/ipallocations/method_updatetags.go +++ b/resource-manager/network/2023-09-01/ipallocations/method_updatetags.go @@ -49,7 +49,6 @@ func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ipallocations/version.go b/resource-manager/network/2023-09-01/ipallocations/version.go index cabf4c10632..22efef73f7f 100644 --- a/resource-manager/network/2023-09-01/ipallocations/version.go +++ b/resource-manager/network/2023-09-01/ipallocations/version.go @@ -1,12 +1,10 @@ package ipallocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipallocations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/ipgroups/README.md b/resource-manager/network/2023-09-01/ipgroups/README.md index 8e194217c8e..ae5a5341649 100644 --- a/resource-manager/network/2023-09-01/ipgroups/README.md +++ b/resource-manager/network/2023-09-01/ipgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/ipgroups` Documentation -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `ipgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/ipgroups/client.go b/resource-manager/network/2023-09-01/ipgroups/client.go index 3e21fe9f946..2e7f5ae8116 100644 --- a/resource-manager/network/2023-09-01/ipgroups/client.go +++ b/resource-manager/network/2023-09-01/ipgroups/client.go @@ -15,7 +15,7 @@ type IPGroupsClient struct { } func NewIPGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/ipgroups/id_ipgroup.go b/resource-manager/network/2023-09-01/ipgroups/id_ipgroup.go index 7b564788b08..2f64284a5bf 100644 --- a/resource-manager/network/2023-09-01/ipgroups/id_ipgroup.go +++ b/resource-manager/network/2023-09-01/ipgroups/id_ipgroup.go @@ -42,7 +42,7 @@ func ParseIPGroupID(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/ipgroups/method_get.go b/resource-manager/network/2023-09-01/ipgroups/method_get.go index b0d5717d963..8e06e373c58 100644 --- a/resource-manager/network/2023-09-01/ipgroups/method_get.go +++ b/resource-manager/network/2023-09-01/ipgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperat var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ipgroups/method_updategroups.go b/resource-manager/network/2023-09-01/ipgroups/method_updategroups.go index 67a51b18e05..bce76083d7a 100644 --- a/resource-manager/network/2023-09-01/ipgroups/method_updategroups.go +++ b/resource-manager/network/2023-09-01/ipgroups/method_updategroups.go @@ -49,7 +49,6 @@ func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input Ta var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/ipgroups/version.go b/resource-manager/network/2023-09-01/ipgroups/version.go index ea11a72a52c..7af6ad8cf95 100644 --- a/resource-manager/network/2023-09-01/ipgroups/version.go +++ b/resource-manager/network/2023-09-01/ipgroups/version.go @@ -1,12 +1,10 @@ package ipgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipgroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/loadbalancers/README.md b/resource-manager/network/2023-09-01/loadbalancers/README.md index 69b0eef136b..379a3fa351f 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/README.md +++ b/resource-manager/network/2023-09-01/loadbalancers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/loadbalancers` Documentation -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `loadbalancers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/loadbalancers/client.go b/resource-manager/network/2023-09-01/loadbalancers/client.go index 3d84973a709..e0ea457759e 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/client.go +++ b/resource-manager/network/2023-09-01/loadbalancers/client.go @@ -15,7 +15,7 @@ type LoadBalancersClient struct { } func NewLoadBalancersClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loadbalancers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loadbalancers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2023-09-01/loadbalancers/id_backendaddresspool.go index 57be52cf337..6d0ee475d56 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_backendaddresspool.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_backendaddresspool.go @@ -44,7 +44,7 @@ func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2023-09-01/loadbalancers/id_frontendipconfiguration.go index dd3cba98217..470370f1a3e 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_frontendipconfiguration.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_frontendipconfiguration.go @@ -44,7 +44,7 @@ func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, e } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfi } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2023-09-01/loadbalancers/id_inboundnatrule.go index a460bece352..5a1995773d8 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_inboundnatrule.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_inboundnatrule.go @@ -44,7 +44,7 @@ func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancer.go index 35278257e30..abc43ca5b16 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancer.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancer.go @@ -42,7 +42,7 @@ func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go index d8fafa2347f..0e0b58e2743 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go @@ -44,7 +44,7 @@ func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAd } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBala } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancingrule.go index 31e911e38af..e938d9a646a 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancingrule.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_loadbalancingrule.go @@ -44,7 +44,7 @@ func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_location.go b/resource-manager/network/2023-09-01/loadbalancers/id_location.go index 4a38c5ea3e7..0789e1c81cc 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_location.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2023-09-01/loadbalancers/id_outboundrule.go index 89837637300..522e0f2f502 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_outboundrule.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_probe.go b/resource-manager/network/2023-09-01/loadbalancers/id_probe.go index 46ab09a65c9..7eb1da345a9 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_probe.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_probe.go @@ -44,7 +44,7 @@ func ParseProbeID(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProbeIDInsensitively(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/id_providerloadbalancer.go b/resource-manager/network/2023-09-01/loadbalancers/id_providerloadbalancer.go index 88ab98c83ad..8733dbbf7de 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/id_providerloadbalancer.go +++ b/resource-manager/network/2023-09-01/loadbalancers/id_providerloadbalancer.go @@ -42,7 +42,7 @@ func ParseProviderLoadBalancerID(input string) (*ProviderLoadBalancerId, error) } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLoadBalancerIDInsensitively(input string) (*ProviderLoadBalanc } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_get.go b/resource-manager/network/2023-09-01/loadbalancers/method_get.go index 2cf9ca241b7..50fdc569bc4 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_get.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) Get(ctx context.Context, id ProviderLoadBalancerId, var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2023-09-01/loadbalancers/method_inboundnatrulesget.go index 92acfa0220b..d925ef58b2c 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_inboundnatrulesget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_inboundnatrulesget.go @@ -34,6 +34,7 @@ func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundN var model InboundNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go index 96451e22451..7fef83148f3 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Cont var model BackendAddressPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go index eeb2cc8b0ed..6c16550699b 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context var model FrontendIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go index 265ec20a693..76a4fc9b62f 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Conte var model LoadBalancingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go index 5e221d46329..7d54de6e71d 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, i var model OutboundRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerprobesget.go index 2901255109e..d67e998c327 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerprobesget.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_loadbalancerprobesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id Probe var model Probe result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_migratetoipbased.go b/resource-manager/network/2023-09-01/loadbalancers/method_migratetoipbased.go index 249adebb4a8..6474ae09f76 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_migratetoipbased.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_migratetoipbased.go @@ -50,7 +50,6 @@ func (c LoadBalancersClient) MigrateToIPBased(ctx context.Context, id LoadBalanc var model MigratedPools result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/method_updatetags.go b/resource-manager/network/2023-09-01/loadbalancers/method_updatetags.go index dd8a4561326..d3fc584efb2 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/method_updatetags.go +++ b/resource-manager/network/2023-09-01/loadbalancers/method_updatetags.go @@ -49,7 +49,6 @@ func (c LoadBalancersClient) UpdateTags(ctx context.Context, id ProviderLoadBala var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/loadbalancers/version.go b/resource-manager/network/2023-09-01/loadbalancers/version.go index c2e94a65da0..f1789e3b5a8 100644 --- a/resource-manager/network/2023-09-01/loadbalancers/version.go +++ b/resource-manager/network/2023-09-01/loadbalancers/version.go @@ -1,12 +1,10 @@ package loadbalancers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loadbalancers/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/README.md b/resource-manager/network/2023-09-01/localnetworkgateways/README.md index 62be958951c..52a80e8e724 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/README.md +++ b/resource-manager/network/2023-09-01/localnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/localnetworkgateways` Documentation -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `localnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/client.go b/resource-manager/network/2023-09-01/localnetworkgateways/client.go index 90a3468c9f3..c821de0dcf3 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/client.go +++ b/resource-manager/network/2023-09-01/localnetworkgateways/client.go @@ -15,7 +15,7 @@ type LocalNetworkGatewaysClient struct { } func NewLocalNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2023-09-01/localnetworkgateways/id_localnetworkgateway.go index b3c0d3a0339..840400d05c6 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/id_localnetworkgateway.go +++ b/resource-manager/network/2023-09-01/localnetworkgateways/id_localnetworkgateway.go @@ -42,7 +42,7 @@ func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGateway } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/method_get.go b/resource-manager/network/2023-09-01/localnetworkgateways/method_get.go index 08da8072f93..678e40b0064 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/method_get.go +++ b/resource-manager/network/2023-09-01/localnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGate var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2023-09-01/localnetworkgateways/method_updatetags.go index c20950665de..cacff76aaeb 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/method_updatetags.go +++ b/resource-manager/network/2023-09-01/localnetworkgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetw var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/localnetworkgateways/version.go b/resource-manager/network/2023-09-01/localnetworkgateways/version.go index efd04e3f917..5e806ea40d2 100644 --- a/resource-manager/network/2023-09-01/localnetworkgateways/version.go +++ b/resource-manager/network/2023-09-01/localnetworkgateways/version.go @@ -1,12 +1,10 @@ package localnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localnetworkgateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/natgateways/README.md b/resource-manager/network/2023-09-01/natgateways/README.md index 0b3813518bc..83f7034606c 100644 --- a/resource-manager/network/2023-09-01/natgateways/README.md +++ b/resource-manager/network/2023-09-01/natgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/natgateways` Documentation -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `natgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/natgateways/client.go b/resource-manager/network/2023-09-01/natgateways/client.go index 10d7c1f9e5f..13334ca10a1 100644 --- a/resource-manager/network/2023-09-01/natgateways/client.go +++ b/resource-manager/network/2023-09-01/natgateways/client.go @@ -15,7 +15,7 @@ type NatGatewaysClient struct { } func NewNatGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "natgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "natgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/natgateways/id_natgateway.go b/resource-manager/network/2023-09-01/natgateways/id_natgateway.go index 95f33162e5e..23f06f4143e 100644 --- a/resource-manager/network/2023-09-01/natgateways/id_natgateway.go +++ b/resource-manager/network/2023-09-01/natgateways/id_natgateway.go @@ -42,7 +42,7 @@ func ParseNatGatewayID(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/natgateways/method_get.go b/resource-manager/network/2023-09-01/natgateways/method_get.go index 1360eae2873..3997df407c6 100644 --- a/resource-manager/network/2023-09-01/natgateways/method_get.go +++ b/resource-manager/network/2023-09-01/natgateways/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options Get var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/natgateways/method_updatetags.go b/resource-manager/network/2023-09-01/natgateways/method_updatetags.go index b5dbabece39..2480442d1cd 100644 --- a/resource-manager/network/2023-09-01/natgateways/method_updatetags.go +++ b/resource-manager/network/2023-09-01/natgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, inpu var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/natgateways/version.go b/resource-manager/network/2023-09-01/natgateways/version.go index de67d074811..2ab6a79e202 100644 --- a/resource-manager/network/2023-09-01/natgateways/version.go +++ b/resource-manager/network/2023-09-01/natgateways/version.go @@ -1,12 +1,10 @@ package natgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/natgateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkgroups/README.md b/resource-manager/network/2023-09-01/networkgroups/README.md index 5e0a8f304e2..453f6234169 100644 --- a/resource-manager/network/2023-09-01/networkgroups/README.md +++ b/resource-manager/network/2023-09-01/networkgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkgroups` Documentation -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkgroups/client.go b/resource-manager/network/2023-09-01/networkgroups/client.go index 3cfe1e1eebf..89171a64b6d 100644 --- a/resource-manager/network/2023-09-01/networkgroups/client.go +++ b/resource-manager/network/2023-09-01/networkgroups/client.go @@ -15,7 +15,7 @@ type NetworkGroupsClient struct { } func NewNetworkGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkgroups/id_networkgroup.go b/resource-manager/network/2023-09-01/networkgroups/id_networkgroup.go index e92b4d5d7c0..39885410108 100644 --- a/resource-manager/network/2023-09-01/networkgroups/id_networkgroup.go +++ b/resource-manager/network/2023-09-01/networkgroups/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkgroups/id_networkmanager.go b/resource-manager/network/2023-09-01/networkgroups/id_networkmanager.go index 58b8bb2d432..c3161f2cd00 100644 --- a/resource-manager/network/2023-09-01/networkgroups/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/networkgroups/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkgroups/method_createorupdate.go b/resource-manager/network/2023-09-01/networkgroups/method_createorupdate.go index 3ab74eeca37..89e0b5c2b0c 100644 --- a/resource-manager/network/2023-09-01/networkgroups/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/networkgroups/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroup var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkgroups/method_delete.go b/resource-manager/network/2023-09-01/networkgroups/method_delete.go index 452dbab57a9..45f93907f23 100644 --- a/resource-manager/network/2023-09-01/networkgroups/method_delete.go +++ b/resource-manager/network/2023-09-01/networkgroups/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkgroups/method_get.go b/resource-manager/network/2023-09-01/networkgroups/method_get.go index 554db15d016..503719a73d9 100644 --- a/resource-manager/network/2023-09-01/networkgroups/method_get.go +++ b/resource-manager/network/2023-09-01/networkgroups/method_get.go @@ -45,7 +45,6 @@ func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkgroups/method_list.go b/resource-manager/network/2023-09-01/networkgroups/method_list.go index cff4d8b0a7a..360af82528f 100644 --- a/resource-manager/network/2023-09-01/networkgroups/method_list.go +++ b/resource-manager/network/2023-09-01/networkgroups/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkgroups/version.go b/resource-manager/network/2023-09-01/networkgroups/version.go index 89ed6cf522a..1022eca831a 100644 --- a/resource-manager/network/2023-09-01/networkgroups/version.go +++ b/resource-manager/network/2023-09-01/networkgroups/version.go @@ -1,12 +1,10 @@ package networkgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkgroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/README.md b/resource-manager/network/2023-09-01/networkinterfaces/README.md index dba7103c76f..12d4a157c62 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-09-01/networkinterfaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkinterfaces` Documentation -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkinterfaces` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkinterfaces/client.go b/resource-manager/network/2023-09-01/networkinterfaces/client.go index cd098aeccdf..1edd1a6838a 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/client.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/client.go @@ -15,7 +15,7 @@ type NetworkInterfacesClient struct { } func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkinterfaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2023-09-01/networkinterfaces/id_providercloudservice.go index e3a9af48f96..bc9bc8950a3 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_providercloudservice.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstance.go index 69a75e612e0..e90397ac3f3 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstance.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstance.go @@ -44,7 +44,7 @@ func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstancenetworkinterface.go index 4a96fd5d010..b34bf43f03c 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_roleinstancenetworkinterface.go @@ -46,7 +46,7 @@ func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInte } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstan } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2023-09-01/networkinterfaces/id_tapconfiguration.go index 0778222d9c9..597762fef0e 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_tapconfiguration.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_tapconfiguration.go @@ -44,7 +44,7 @@ func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, er } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachine.go index e2f2dde8684..6642a7839e6 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachine.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachinescaleset.go index e9a264c0a89..8f394f4ab5d 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachinescaleset.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_get.go b/resource-manager/network/2023-09-01/networkinterfaces/method_get.go index e1614af681d..5a73b976c2c 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_get.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkIn var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2023-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go index 7f7c58c444c..be2ca6e2e39 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go @@ -34,6 +34,7 @@ func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Hea func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Con var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go index 7a3d2b45272..88f82856ae8 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *c func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx co var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go index 1bef7a3da95..4bad16270ba 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() * func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx c var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2023-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go index a18bdaf08cf..8c1c944f6c8 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go @@ -40,6 +40,7 @@ func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go index 90e537d0982..7134fa1ab75 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go @@ -46,7 +46,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go index 868ecfb43d5..004d700dbcd 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go @@ -45,7 +45,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx contex var model NetworkInterfaceTapConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2023-09-01/networkinterfaces/method_updatetags.go index ca8e31de55a..4365d182729 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/method_updatetags.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/method_updatetags.go @@ -50,7 +50,6 @@ func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.Ne var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkinterfaces/version.go b/resource-manager/network/2023-09-01/networkinterfaces/version.go index 2085b9ffb2d..85167563468 100644 --- a/resource-manager/network/2023-09-01/networkinterfaces/version.go +++ b/resource-manager/network/2023-09-01/networkinterfaces/version.go @@ -1,12 +1,10 @@ package networkinterfaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkinterfaces/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/README.md index 3562bcbce47..bac564dd9b9 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/README.md +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanageractiveconfigurations` Documentation -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanageractiveconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/client.go index fd577e53f33..cc689379d3c 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/client.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConfigurationsClient struct { } func NewNetworkManagerActiveConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/id_networkmanager.go index ee0e5e5a9c8..c150737480a 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go index 0a882c8e731..a9250ed79d9 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(c var model ActiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go index c19193dfd82..4035af8f6cf 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ActiveBaseSecurityAdminRule interface { + ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl } -// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ActiveBaseSecurityAdminRule = BaseActiveBaseSecurityAdminRuleImpl{} + +type BaseActiveBaseSecurityAdminRuleImpl struct { + CommitTime *string `json:"commitTime,omitempty"` + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + Region *string `json:"region,omitempty"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s +} + +var _ ActiveBaseSecurityAdminRule = RawActiveBaseSecurityAdminRuleImpl{} + +// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + activeBaseSecurityAdminRule BaseActiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s.activeBaseSecurityAdminRule } -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { +func UnmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBas return out, nil } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseActiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawActiveBaseSecurityAdminRuleImpl{ + activeBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go index 371ee82ef8c..e708927c42d 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveDefaultSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go index 70266c6ff7c..18ae717f1d0 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go index c9007f5e0f3..aaef95bec26 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ActiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalActiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/version.go index fd68e8e119f..4a0e1b3df53 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/version.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/README.md index 67330e290fb..2d594de8f64 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/README.md +++ b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations` Documentation -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/client.go index 25282a2bad5..68760af7c25 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/client.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConnectivityConfigurationsClient struct { } func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go index 4b1919fa120..135b3993f41 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go index a4c1e51550d..023b82524c0 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnecti var model ActiveConnectivityConfigurationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/version.go index 57307c344ef..791e19cc6b4 100644 --- a/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/version.go +++ b/resource-manager/network/2023-09-01/networkmanageractiveconnectivityconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconnectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/README.md b/resource-manager/network/2023-09-01/networkmanagerconnections/README.md index 017e05b3480..ad05da028d2 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/README.md +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanagerconnections` Documentation -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanagerconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/client.go b/resource-manager/network/2023-09-01/networkmanagerconnections/client.go index 3cfa72a376e..809f42be879 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/client.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/client.go @@ -15,7 +15,7 @@ type NetworkManagerConnectionsClient struct { } func NewNetworkManagerConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagerconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagerconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2023-09-01/networkmanagerconnections/id_networkmanagerconnection.go index 066e316e2cb..d73f48f473a 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/id_networkmanagerconnection.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/id_networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManager } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2023-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go index 81d73abef15..4f196eba08a 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2Network } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Prov } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go index cddf4364027..116a8f3da7a 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go index 9e0447e4aea..c4f20220fbe 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go index 3e9eb347a20..d8b68e162ab 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders( func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go index 4447d41cf06..2d07c99634c 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCr var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go index 5f0b27a080c..4b89ca96feb 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGe var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go index ddf403e8a21..a08f8b1adfc 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() * func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkmanagerconnections/version.go b/resource-manager/network/2023-09-01/networkmanagerconnections/version.go index d3d72ee22a7..7f61dfbf223 100644 --- a/resource-manager/network/2023-09-01/networkmanagerconnections/version.go +++ b/resource-manager/network/2023-09-01/networkmanagerconnections/version.go @@ -1,12 +1,10 @@ package networkmanagerconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagerconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/README.md index 49f8eae122d..88a48849ad8 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration` Documentation -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/client.go index 2f234ee82ef..c6449e001fe 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveConnectivityConfigurationClient struct { } func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go index d752edf32eb..64233acc195 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManag var model NetworkManagerEffectiveConnectivityConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/version.go index cf231ed6e75..de8021d3e42 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectiveconnectivityconfiguration/version.go @@ -1,12 +1,10 @@ package networkmanagereffectiveconnectivityconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/README.md index 55b3dc9cddd..5ad7d4c0dfd 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/README.md +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules` Documentation -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/client.go index c83126c132c..5685e9afd82 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/client.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveSecurityAdminRulesClient struct { } func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go index a69d081c810..50c941d8756 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffec var model NetworkManagerEffectiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go index 9ef5715f8e4..2cb1228a910 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EffectiveBaseSecurityAdminRule interface { + EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl } -// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EffectiveBaseSecurityAdminRule = BaseEffectiveBaseSecurityAdminRuleImpl{} + +type BaseEffectiveBaseSecurityAdminRuleImpl struct { + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s +} + +var _ EffectiveBaseSecurityAdminRule = RawEffectiveBaseSecurityAdminRuleImpl{} + +// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + effectiveBaseSecurityAdminRule BaseEffectiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s.effectiveBaseSecurityAdminRule } -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { +func UnmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (Effect return out, nil } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseEffectiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEffectiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawEffectiveBaseSecurityAdminRuleImpl{ + effectiveBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go index 17d5e7fdeb7..89d5f651a9f 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveDefaultSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go index ae90f9154f9..8fcf50ed898 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveSecurityAdminRule{} func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go index 941c8a93ed6..7e1ac278430 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(byte output := make([]EffectiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalEffectiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/version.go index 755804389b7..6b36ff613c8 100644 --- a/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/version.go +++ b/resource-manager/network/2023-09-01/networkmanagereffectivesecurityadminrules/version.go @@ -1,12 +1,10 @@ package networkmanagereffectivesecurityadminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkmanagers/README.md b/resource-manager/network/2023-09-01/networkmanagers/README.md index 271635c8107..d3346f9091e 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/README.md +++ b/resource-manager/network/2023-09-01/networkmanagers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkmanagers` Documentation -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkmanagers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkmanagers/client.go b/resource-manager/network/2023-09-01/networkmanagers/client.go index b27df28e126..64a4e799646 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/client.go +++ b/resource-manager/network/2023-09-01/networkmanagers/client.go @@ -15,7 +15,7 @@ type NetworkManagersClient struct { } func NewNetworkManagersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2023-09-01/networkmanagers/id_networkmanager.go index 63481203294..001e7f6c2a4 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/networkmanagers/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2023-09-01/networkmanagers/method_createorupdate.go index 5fb5c949cd6..cdce0892e43 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkMan var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_delete.go b/resource-manager/network/2023-09-01/networkmanagers/method_delete.go index 016216c8549..a9619efb0e2 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_delete.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_get.go b/resource-manager/network/2023-09-01/networkmanagers/method_get.go index c9f3acddeae..ed6b5d9ec82 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_get.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (re var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_list.go b/resource-manager/network/2023-09-01/networkmanagers/method_list.go index 86b71cf2d94..902c41d52b3 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_list.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2023-09-01/networkmanagers/method_listbysubscription.go index d45e89952b8..d1e8f2d72a3 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_listbysubscription.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2023-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go index f9a88725d0f..db1a1d144ac 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Co var model NetworkManagerDeploymentStatusListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagers/method_patch.go b/resource-manager/network/2023-09-01/networkmanagers/method_patch.go index e3810b6e4b4..4aae0d60709 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/method_patch.go +++ b/resource-manager/network/2023-09-01/networkmanagers/method_patch.go @@ -49,7 +49,6 @@ func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, i var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkmanagers/version.go b/resource-manager/network/2023-09-01/networkmanagers/version.go index 27684a8cced..a655a7d9700 100644 --- a/resource-manager/network/2023-09-01/networkmanagers/version.go +++ b/resource-manager/network/2023-09-01/networkmanagers/version.go @@ -1,12 +1,10 @@ package networkmanagers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagers/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkprofiles/README.md b/resource-manager/network/2023-09-01/networkprofiles/README.md index 16f8d5dbdcb..906afd4bb6f 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/README.md +++ b/resource-manager/network/2023-09-01/networkprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkprofiles` Documentation -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkprofiles` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkprofiles/client.go b/resource-manager/network/2023-09-01/networkprofiles/client.go index 17b4bf31068..33a4e0626aa 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/client.go +++ b/resource-manager/network/2023-09-01/networkprofiles/client.go @@ -15,7 +15,7 @@ type NetworkProfilesClient struct { } func NewNetworkProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2023-09-01/networkprofiles/id_networkprofile.go index b1bbf9c9343..6e0804b6679 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/id_networkprofile.go +++ b/resource-manager/network/2023-09-01/networkprofiles/id_networkprofile.go @@ -42,7 +42,7 @@ func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2023-09-01/networkprofiles/method_createorupdate.go index 94d3a856780..24ed5940195 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/networkprofiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkPro var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkprofiles/method_get.go b/resource-manager/network/2023-09-01/networkprofiles/method_get.go index 13f98955470..a0149c188f7 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/method_get.go +++ b/resource-manager/network/2023-09-01/networkprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, opt var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkprofiles/method_updatetags.go b/resource-manager/network/2023-09-01/networkprofiles/method_updatetags.go index f0bfb2f14f7..757952def30 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/method_updatetags.go +++ b/resource-manager/network/2023-09-01/networkprofiles/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfile var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkprofiles/version.go b/resource-manager/network/2023-09-01/networkprofiles/version.go index 1f0dcbce6b0..1aee2f4a7e2 100644 --- a/resource-manager/network/2023-09-01/networkprofiles/version.go +++ b/resource-manager/network/2023-09-01/networkprofiles/version.go @@ -1,12 +1,10 @@ package networkprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkprofiles/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/README.md b/resource-manager/network/2023-09-01/networksecuritygroups/README.md index fdc6623cfeb..72f9b841755 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/README.md +++ b/resource-manager/network/2023-09-01/networksecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networksecuritygroups` Documentation -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networksecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/client.go b/resource-manager/network/2023-09-01/networksecuritygroups/client.go index a8d26110c7c..d490fa41c78 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/client.go +++ b/resource-manager/network/2023-09-01/networksecuritygroups/client.go @@ -15,7 +15,7 @@ type NetworkSecurityGroupsClient struct { } func NewNetworkSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2023-09-01/networksecuritygroups/id_networksecuritygroup.go index 4ab431d74a9..0dbb8c9fcd5 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/id_networksecuritygroup.go +++ b/resource-manager/network/2023-09-01/networksecuritygroups/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/method_get.go b/resource-manager/network/2023-09-01/networksecuritygroups/method_get.go index 6ebe50d00e5..7728917c0ec 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/method_get.go +++ b/resource-manager/network/2023-09-01/networksecuritygroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurity var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2023-09-01/networksecuritygroups/method_updatetags.go index 362cad00c7d..6f4b2cd3ce6 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/method_updatetags.go +++ b/resource-manager/network/2023-09-01/networksecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkS var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networksecuritygroups/version.go b/resource-manager/network/2023-09-01/networksecuritygroups/version.go index fe1a2e37c1d..db2c9a8230b 100644 --- a/resource-manager/network/2023-09-01/networksecuritygroups/version.go +++ b/resource-manager/network/2023-09-01/networksecuritygroups/version.go @@ -1,12 +1,10 @@ package networksecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecuritygroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/README.md b/resource-manager/network/2023-09-01/networkvirtualappliances/README.md index 1fec26cd144..4e040fbe4fe 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/README.md +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkvirtualappliances` Documentation -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkvirtualappliances` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/client.go b/resource-manager/network/2023-09-01/networkvirtualappliances/client.go index cfaeae574de..ab8d70fafa5 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/client.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/client.go @@ -15,7 +15,7 @@ type NetworkVirtualAppliancesClient struct { } func NewNetworkVirtualAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkvirtualappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkvirtualappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2023-09-01/networkvirtualappliances/id_inboundsecurityrule.go index d920466b92f..375fab1ff84 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/id_inboundsecurityrule.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/id_inboundsecurityrule.go @@ -44,7 +44,7 @@ func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRule } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2023-09-01/networkvirtualappliances/id_networkvirtualappliance.go index f222e101e79..db7766b52a7 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/method_get.go b/resource-manager/network/2023-09-01/networkvirtualappliances/method_get.go index 36076f68749..2310883a448 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/method_get.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtu var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2023-09-01/networkvirtualappliances/method_updatetags.go index 25a5f9e94c5..a8a8391f4a4 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/method_updatetags.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id Netwo var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkvirtualappliances/version.go b/resource-manager/network/2023-09-01/networkvirtualappliances/version.go index 83084557318..a0652eb413c 100644 --- a/resource-manager/network/2023-09-01/networkvirtualappliances/version.go +++ b/resource-manager/network/2023-09-01/networkvirtualappliances/version.go @@ -1,12 +1,10 @@ package networkvirtualappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkvirtualappliances/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/networkwatchers/README.md b/resource-manager/network/2023-09-01/networkwatchers/README.md index c47ab71512e..3fad8444efb 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/README.md +++ b/resource-manager/network/2023-09-01/networkwatchers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/networkwatchers` Documentation -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `networkwatchers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/networkwatchers/client.go b/resource-manager/network/2023-09-01/networkwatchers/client.go index 2068ab14817..b544d19c206 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/client.go +++ b/resource-manager/network/2023-09-01/networkwatchers/client.go @@ -15,7 +15,7 @@ type NetworkWatchersClient struct { } func NewNetworkWatchersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkwatchers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkwatchers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2023-09-01/networkwatchers/id_networkwatcher.go index b8bb1f7f4a6..cd247fb8659 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/id_networkwatcher.go +++ b/resource-manager/network/2023-09-01/networkwatchers/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2023-09-01/networkwatchers/method_createorupdate.go index ecb006e2007..5881c4d5c10 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWat var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_get.go b/resource-manager/network/2023-09-01/networkwatchers/method_get.go index 000ae087b18..1c429aeb42d 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_get.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (re var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_gettopology.go b/resource-manager/network/2023-09-01/networkwatchers/method_gettopology.go index 8a1c6caef60..68afb0d8206 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_gettopology.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_gettopology.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatche var model Topology result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_list.go b/resource-manager/network/2023-09-01/networkwatchers/method_list.go index 8263c7b4f93..36d57f04fef 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_list.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_list.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGr var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_listall.go b/resource-manager/network/2023-09-01/networkwatchers/method_listall.go index 845a2449946..b8bd8d8d4a6 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_listall.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_listall.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.Subscri var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/method_updatetags.go b/resource-manager/network/2023-09-01/networkwatchers/method_updatetags.go index 1ace78e7dc5..0ad45fd1f1a 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/method_updatetags.go +++ b/resource-manager/network/2023-09-01/networkwatchers/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcher var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/networkwatchers/version.go b/resource-manager/network/2023-09-01/networkwatchers/version.go index 21ca2819f1d..25b062480f4 100644 --- a/resource-manager/network/2023-09-01/networkwatchers/version.go +++ b/resource-manager/network/2023-09-01/networkwatchers/version.go @@ -1,12 +1,10 @@ package networkwatchers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkwatchers/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/p2svpngateways/README.md b/resource-manager/network/2023-09-01/p2svpngateways/README.md index 66014c887ac..bd3b95d1f71 100644 --- a/resource-manager/network/2023-09-01/p2svpngateways/README.md +++ b/resource-manager/network/2023-09-01/p2svpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/p2svpngateways` Documentation -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `p2svpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/p2svpngateways/client.go b/resource-manager/network/2023-09-01/p2svpngateways/client.go index 3d458041de0..b2a2ec08b88 100644 --- a/resource-manager/network/2023-09-01/p2svpngateways/client.go +++ b/resource-manager/network/2023-09-01/p2svpngateways/client.go @@ -15,7 +15,7 @@ type P2sVpnGatewaysClient struct { } func NewP2sVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "p2svpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "p2svpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/p2svpngateways/version.go b/resource-manager/network/2023-09-01/p2svpngateways/version.go index 40f4851df5e..825ef9fc91b 100644 --- a/resource-manager/network/2023-09-01/p2svpngateways/version.go +++ b/resource-manager/network/2023-09-01/p2svpngateways/version.go @@ -1,12 +1,10 @@ package p2svpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/p2svpngateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/packetcaptures/README.md b/resource-manager/network/2023-09-01/packetcaptures/README.md index 4a47cea5076..a022bf8a469 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/README.md +++ b/resource-manager/network/2023-09-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/packetcaptures/client.go b/resource-manager/network/2023-09-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/client.go +++ b/resource-manager/network/2023-09-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2023-09-01/packetcaptures/id_networkwatcher.go index d9eafa5f099..a91b97fdd2d 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/id_networkwatcher.go +++ b/resource-manager/network/2023-09-01/packetcaptures/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2023-09-01/packetcaptures/id_packetcapture.go index 8b30ad1ebd6..ad0eee13f69 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/network/2023-09-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/packetcaptures/method_get.go b/resource-manager/network/2023-09-01/packetcaptures/method_get.go index 2226c032bea..9f32b393d10 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/method_get.go +++ b/resource-manager/network/2023-09-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCaptureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/packetcaptures/method_list.go b/resource-manager/network/2023-09-01/packetcaptures/method_list.go index 49bbc661b3c..08e6f424863 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/method_list.go +++ b/resource-manager/network/2023-09-01/packetcaptures/method_list.go @@ -46,7 +46,6 @@ func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (re var model PacketCaptureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/packetcaptures/version.go b/resource-manager/network/2023-09-01/packetcaptures/version.go index 24523e08b34..a1b478e822c 100644 --- a/resource-manager/network/2023-09-01/packetcaptures/version.go +++ b/resource-manager/network/2023-09-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/README.md index f1c85c61728..61c8c87664e 100644 --- a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/README.md +++ b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections` Documentation -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `peerexpressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/client.go index c0c578a280f..6f26d87afd5 100644 --- a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/client.go +++ b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type PeerExpressRouteCircuitConnectionsClient struct { } func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/id_peerconnection.go index 6bde16a10c5..3b236cf50cf 100644 --- a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/id_peerconnection.go @@ -46,7 +46,7 @@ func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/method_get.go index 844c3c67e07..554ac17ad6f 100644 --- a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Pe var model PeerExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/version.go index 16c50314b35..05a80697a67 100644 --- a/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/version.go +++ b/resource-manager/network/2023-09-01/peerexpressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package peerexpressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/README.md b/resource-manager/network/2023-09-01/privatednszonegroups/README.md index 0a440a926fa..2e822dcb9f2 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/README.md +++ b/resource-manager/network/2023-09-01/privatednszonegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/privatednszonegroups` Documentation -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `privatednszonegroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/client.go b/resource-manager/network/2023-09-01/privatednszonegroups/client.go index 99ce8b6667e..58e48fe8e2e 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/client.go +++ b/resource-manager/network/2023-09-01/privatednszonegroups/client.go @@ -15,7 +15,7 @@ type PrivateDnsZoneGroupsClient struct { } func NewPrivateDnsZoneGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatednszonegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatednszonegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2023-09-01/privatednszonegroups/id_privatednszonegroup.go index 9399f9157d3..fe0858951a1 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/id_privatednszonegroup.go +++ b/resource-manager/network/2023-09-01/privatednszonegroups/id_privatednszonegroup.go @@ -44,7 +44,7 @@ func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroup } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2023-09-01/privatednszonegroups/id_privateendpoint.go index a9f6cc5dff2..48424e8ccb0 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/id_privateendpoint.go +++ b/resource-manager/network/2023-09-01/privatednszonegroups/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/method_get.go b/resource-manager/network/2023-09-01/privatednszonegroups/method_get.go index 3c25fca99b7..b0a317bbf4d 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/method_get.go +++ b/resource-manager/network/2023-09-01/privatednszonegroups/method_get.go @@ -45,7 +45,6 @@ func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGr var model PrivateDnsZoneGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/privatednszonegroups/version.go b/resource-manager/network/2023-09-01/privatednszonegroups/version.go index 382d2b195eb..b8ead5d4977 100644 --- a/resource-manager/network/2023-09-01/privatednszonegroups/version.go +++ b/resource-manager/network/2023-09-01/privatednszonegroups/version.go @@ -1,12 +1,10 @@ package privatednszonegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatednszonegroups/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/privateendpoints/README.md b/resource-manager/network/2023-09-01/privateendpoints/README.md index f5554506c89..f1c079167db 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/README.md +++ b/resource-manager/network/2023-09-01/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/privateendpoints/client.go b/resource-manager/network/2023-09-01/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/client.go +++ b/resource-manager/network/2023-09-01/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/privateendpoints/id_location.go b/resource-manager/network/2023-09-01/privateendpoints/id_location.go index 54b43b4b1f2..60987a25fc6 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/id_location.go +++ b/resource-manager/network/2023-09-01/privateendpoints/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2023-09-01/privateendpoints/id_privateendpoint.go index a104325012e..4d39c6d7e38 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/id_privateendpoint.go +++ b/resource-manager/network/2023-09-01/privateendpoints/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2023-09-01/privateendpoints/id_providerlocation.go index a70739b937d..eaf3b344f24 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/id_providerlocation.go +++ b/resource-manager/network/2023-09-01/privateendpoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privateendpoints/method_get.go b/resource-manager/network/2023-09-01/privateendpoints/method_get.go index 80cad93eef6..559e0f436c5 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/method_get.go +++ b/resource-manager/network/2023-09-01/privateendpoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, o var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/privateendpoints/version.go b/resource-manager/network/2023-09-01/privateendpoints/version.go index a655c2c6a29..232b661dfa5 100644 --- a/resource-manager/network/2023-09-01/privateendpoints/version.go +++ b/resource-manager/network/2023-09-01/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/README.md b/resource-manager/network/2023-09-01/privatelinkservices/README.md index 1d93658d2fb..d8f386f0747 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/README.md +++ b/resource-manager/network/2023-09-01/privatelinkservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/privatelinkservices` Documentation -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `privatelinkservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/privatelinkservices/client.go b/resource-manager/network/2023-09-01/privatelinkservices/client.go index 5bd46867c3e..e097e552e3f 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/client.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/client.go @@ -15,7 +15,7 @@ type PrivateLinkServicesClient struct { } func NewPrivateLinkServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/id_location.go b/resource-manager/network/2023-09-01/privatelinkservices/id_location.go index 34e4ed80520..1b7d6fc81eb 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/id_location.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2023-09-01/privatelinkservices/id_privateendpointconnection.go index 3f98898492d..ed686302aed 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/id_privateendpointconnection.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2023-09-01/privatelinkservices/id_privatelinkservice.go index d88a974cca5..331d16ea3b2 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/id_privatelinkservice.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/id_privatelinkservice.go @@ -42,7 +42,7 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2023-09-01/privatelinkservices/id_providerlocation.go index c7433defeb6..2bb416453e6 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/id_providerlocation.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/method_get.go b/resource-manager/network/2023-09-01/privatelinkservices/method_get.go index 87bddc4d4aa..3be1df5bb53 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/method_get.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServic var model PrivateLinkService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2023-09-01/privatelinkservices/method_getprivateendpointconnection.go index 032d2076254..7690b7c62af 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/method_getprivateendpointconnection.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/method_getprivateendpointconnection.go @@ -34,6 +34,7 @@ func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Header func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Cont var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2023-09-01/privatelinkservices/method_updateprivateendpointconnection.go index 90a383fd3a1..b108db06f2a 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/method_updateprivateendpointconnection.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/method_updateprivateendpointconnection.go @@ -49,7 +49,6 @@ func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.C var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/privatelinkservices/version.go b/resource-manager/network/2023-09-01/privatelinkservices/version.go index 013ce57e670..8b1a41ad5eb 100644 --- a/resource-manager/network/2023-09-01/privatelinkservices/version.go +++ b/resource-manager/network/2023-09-01/privatelinkservices/version.go @@ -1,12 +1,10 @@ package privatelinkservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkservices/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/publicipaddresses/README.md b/resource-manager/network/2023-09-01/publicipaddresses/README.md index 98849120640..a225ad4acba 100644 --- a/resource-manager/network/2023-09-01/publicipaddresses/README.md +++ b/resource-manager/network/2023-09-01/publicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/publicipaddresses` Documentation -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `publicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/publicipaddresses/client.go b/resource-manager/network/2023-09-01/publicipaddresses/client.go index 4c28c537385..54f2b0113c7 100644 --- a/resource-manager/network/2023-09-01/publicipaddresses/client.go +++ b/resource-manager/network/2023-09-01/publicipaddresses/client.go @@ -15,7 +15,7 @@ type PublicIPAddressesClient struct { } func NewPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/publicipaddresses/method_get.go b/resource-manager/network/2023-09-01/publicipaddresses/method_get.go index 7045aad8372..2548c9b4db6 100644 --- a/resource-manager/network/2023-09-01/publicipaddresses/method_get.go +++ b/resource-manager/network/2023-09-01/publicipaddresses/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPA var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2023-09-01/publicipaddresses/method_updatetags.go index 55be79fcfce..622a0a8c202 100644 --- a/resource-manager/network/2023-09-01/publicipaddresses/method_updatetags.go +++ b/resource-manager/network/2023-09-01/publicipaddresses/method_updatetags.go @@ -50,7 +50,6 @@ func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.Pu var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/publicipaddresses/version.go b/resource-manager/network/2023-09-01/publicipaddresses/version.go index 1fdb1e9d37c..aa6c2da2d1f 100644 --- a/resource-manager/network/2023-09-01/publicipaddresses/version.go +++ b/resource-manager/network/2023-09-01/publicipaddresses/version.go @@ -1,12 +1,10 @@ package publicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipaddresses/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/publicipprefixes/README.md b/resource-manager/network/2023-09-01/publicipprefixes/README.md index e0b2a74fea6..8704c3c3ca9 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/README.md +++ b/resource-manager/network/2023-09-01/publicipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/publicipprefixes` Documentation -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `publicipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/publicipprefixes/client.go b/resource-manager/network/2023-09-01/publicipprefixes/client.go index 7dfe8ac9af1..78db8973387 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/client.go +++ b/resource-manager/network/2023-09-01/publicipprefixes/client.go @@ -15,7 +15,7 @@ type PublicIPPrefixesClient struct { } func NewPublicIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2023-09-01/publicipprefixes/id_publicipprefix.go index 2fe61b6d66b..b985530d0a2 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/id_publicipprefix.go +++ b/resource-manager/network/2023-09-01/publicipprefixes/id_publicipprefix.go @@ -42,7 +42,7 @@ func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/publicipprefixes/method_get.go b/resource-manager/network/2023-09-01/publicipprefixes/method_get.go index 15104f80613..4d05c32931a 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/method_get.go +++ b/resource-manager/network/2023-09-01/publicipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, op var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2023-09-01/publicipprefixes/method_updatetags.go index e5257fc9717..3111479b00a 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/method_updatetags.go +++ b/resource-manager/network/2023-09-01/publicipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefi var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/publicipprefixes/version.go b/resource-manager/network/2023-09-01/publicipprefixes/version.go index 3a106b57ccd..aa726511b65 100644 --- a/resource-manager/network/2023-09-01/publicipprefixes/version.go +++ b/resource-manager/network/2023-09-01/publicipprefixes/version.go @@ -1,12 +1,10 @@ package publicipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipprefixes/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/routefilterrules/README.md b/resource-manager/network/2023-09-01/routefilterrules/README.md index e0a2d854143..0060e57555a 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/README.md +++ b/resource-manager/network/2023-09-01/routefilterrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/routefilterrules` Documentation -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `routefilterrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/routefilterrules/client.go b/resource-manager/network/2023-09-01/routefilterrules/client.go index 018917d75d9..87a6916e467 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/client.go +++ b/resource-manager/network/2023-09-01/routefilterrules/client.go @@ -15,7 +15,7 @@ type RouteFilterRulesClient struct { } func NewRouteFilterRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilterrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilterrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/routefilterrules/id_routefilter.go b/resource-manager/network/2023-09-01/routefilterrules/id_routefilter.go index fc7b97a96ea..eadf8a32c02 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/id_routefilter.go +++ b/resource-manager/network/2023-09-01/routefilterrules/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2023-09-01/routefilterrules/id_routefilterrule.go index ef13326b0c4..39bf905aaa7 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/id_routefilterrule.go +++ b/resource-manager/network/2023-09-01/routefilterrules/id_routefilterrule.go @@ -44,7 +44,7 @@ func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, erro } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routefilterrules/method_get.go b/resource-manager/network/2023-09-01/routefilterrules/method_get.go index c28ac994637..66ebdba141b 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/method_get.go +++ b/resource-manager/network/2023-09-01/routefilterrules/method_get.go @@ -45,7 +45,6 @@ func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) ( var model RouteFilterRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routefilterrules/version.go b/resource-manager/network/2023-09-01/routefilterrules/version.go index 472adc045c4..00cec586b81 100644 --- a/resource-manager/network/2023-09-01/routefilterrules/version.go +++ b/resource-manager/network/2023-09-01/routefilterrules/version.go @@ -1,12 +1,10 @@ package routefilterrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilterrules/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/routefilters/README.md b/resource-manager/network/2023-09-01/routefilters/README.md index 183b0b0381a..d5218028156 100644 --- a/resource-manager/network/2023-09-01/routefilters/README.md +++ b/resource-manager/network/2023-09-01/routefilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/routefilters` Documentation -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `routefilters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/routefilters/client.go b/resource-manager/network/2023-09-01/routefilters/client.go index e4faeb1d622..5bf2183b43d 100644 --- a/resource-manager/network/2023-09-01/routefilters/client.go +++ b/resource-manager/network/2023-09-01/routefilters/client.go @@ -15,7 +15,7 @@ type RouteFiltersClient struct { } func NewRouteFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/routefilters/id_routefilter.go b/resource-manager/network/2023-09-01/routefilters/id_routefilter.go index 18b55731fae..886fbf82cdd 100644 --- a/resource-manager/network/2023-09-01/routefilters/id_routefilter.go +++ b/resource-manager/network/2023-09-01/routefilters/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routefilters/method_get.go b/resource-manager/network/2023-09-01/routefilters/method_get.go index d44bd6d46b0..f57a061fb52 100644 --- a/resource-manager/network/2023-09-01/routefilters/method_get.go +++ b/resource-manager/network/2023-09-01/routefilters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options G var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routefilters/method_updatetags.go b/resource-manager/network/2023-09-01/routefilters/method_updatetags.go index 33bbd5301d9..5fe88949683 100644 --- a/resource-manager/network/2023-09-01/routefilters/method_updatetags.go +++ b/resource-manager/network/2023-09-01/routefilters/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, in var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routefilters/version.go b/resource-manager/network/2023-09-01/routefilters/version.go index 55d963153c4..cbd96665532 100644 --- a/resource-manager/network/2023-09-01/routefilters/version.go +++ b/resource-manager/network/2023-09-01/routefilters/version.go @@ -1,12 +1,10 @@ package routefilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilters/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/routes/README.md b/resource-manager/network/2023-09-01/routes/README.md index f86d866c848..f3adf24c63a 100644 --- a/resource-manager/network/2023-09-01/routes/README.md +++ b/resource-manager/network/2023-09-01/routes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/routes` Documentation -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `routes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/routes/client.go b/resource-manager/network/2023-09-01/routes/client.go index 4372f694741..88e9f135cd1 100644 --- a/resource-manager/network/2023-09-01/routes/client.go +++ b/resource-manager/network/2023-09-01/routes/client.go @@ -15,7 +15,7 @@ type RoutesClient struct { } func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/routes/id_route.go b/resource-manager/network/2023-09-01/routes/id_route.go index c9e2c02ee1f..d306345db01 100644 --- a/resource-manager/network/2023-09-01/routes/id_route.go +++ b/resource-manager/network/2023-09-01/routes/id_route.go @@ -44,7 +44,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routes/id_routetable.go b/resource-manager/network/2023-09-01/routes/id_routetable.go index 459719bc26c..66672514db4 100644 --- a/resource-manager/network/2023-09-01/routes/id_routetable.go +++ b/resource-manager/network/2023-09-01/routes/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routes/method_get.go b/resource-manager/network/2023-09-01/routes/method_get.go index 8f641d28c5b..306c6528c39 100644 --- a/resource-manager/network/2023-09-01/routes/method_get.go +++ b/resource-manager/network/2023-09-01/routes/method_get.go @@ -45,7 +45,6 @@ func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationR var model Route result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routes/version.go b/resource-manager/network/2023-09-01/routes/version.go index c4d4f86cc6f..a5f52393c91 100644 --- a/resource-manager/network/2023-09-01/routes/version.go +++ b/resource-manager/network/2023-09-01/routes/version.go @@ -1,12 +1,10 @@ package routes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routes/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/routetables/README.md b/resource-manager/network/2023-09-01/routetables/README.md index c7c7dc0b2c5..ee32395a779 100644 --- a/resource-manager/network/2023-09-01/routetables/README.md +++ b/resource-manager/network/2023-09-01/routetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/routetables` Documentation -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `routetables` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/routetables/client.go b/resource-manager/network/2023-09-01/routetables/client.go index 26c9fb104ad..b52049cd5f7 100644 --- a/resource-manager/network/2023-09-01/routetables/client.go +++ b/resource-manager/network/2023-09-01/routetables/client.go @@ -15,7 +15,7 @@ type RouteTablesClient struct { } func NewRouteTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/routetables/id_routetable.go b/resource-manager/network/2023-09-01/routetables/id_routetable.go index 0f3c938daf7..0d24a6b252f 100644 --- a/resource-manager/network/2023-09-01/routetables/id_routetable.go +++ b/resource-manager/network/2023-09-01/routetables/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/routetables/method_get.go b/resource-manager/network/2023-09-01/routetables/method_get.go index cb19ef16deb..6a2409acbfb 100644 --- a/resource-manager/network/2023-09-01/routetables/method_get.go +++ b/resource-manager/network/2023-09-01/routetables/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options Get var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routetables/method_updatetags.go b/resource-manager/network/2023-09-01/routetables/method_updatetags.go index b2db87b8208..258335fc600 100644 --- a/resource-manager/network/2023-09-01/routetables/method_updatetags.go +++ b/resource-manager/network/2023-09-01/routetables/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, inpu var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/routetables/version.go b/resource-manager/network/2023-09-01/routetables/version.go index 9921c52edb9..239a243facc 100644 --- a/resource-manager/network/2023-09-01/routetables/version.go +++ b/resource-manager/network/2023-09-01/routetables/version.go @@ -1,12 +1,10 @@ package routetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routetables/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/scopeconnections/README.md b/resource-manager/network/2023-09-01/scopeconnections/README.md index 254065ceec3..69537c72a5e 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/README.md +++ b/resource-manager/network/2023-09-01/scopeconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/scopeconnections` Documentation -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `scopeconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/scopeconnections/client.go b/resource-manager/network/2023-09-01/scopeconnections/client.go index aa7247e35c7..81942e9b5e9 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/client.go +++ b/resource-manager/network/2023-09-01/scopeconnections/client.go @@ -15,7 +15,7 @@ type ScopeConnectionsClient struct { } func NewScopeConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopeconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopeconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2023-09-01/scopeconnections/id_networkmanager.go index 259fe7f2afa..23c26353215 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/scopeconnections/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2023-09-01/scopeconnections/id_scopeconnection.go index dd1d78f3b94..07c786f0070 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/id_scopeconnection.go +++ b/resource-manager/network/2023-09-01/scopeconnections/id_scopeconnection.go @@ -44,7 +44,7 @@ func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, erro } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2023-09-01/scopeconnections/method_createorupdate.go index c0784b21bd5..08383ec6587 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/scopeconnections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConn var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/scopeconnections/method_get.go b/resource-manager/network/2023-09-01/scopeconnections/method_get.go index 97616b65ce8..67789a31c53 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/method_get.go +++ b/resource-manager/network/2023-09-01/scopeconnections/method_get.go @@ -45,7 +45,6 @@ func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) ( var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/scopeconnections/method_list.go b/resource-manager/network/2023-09-01/scopeconnections/method_list.go index c819623c65e..c9f73b61411 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/method_list.go +++ b/resource-manager/network/2023-09-01/scopeconnections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/scopeconnections/version.go b/resource-manager/network/2023-09-01/scopeconnections/version.go index b1db9c12bb8..3d71772e666 100644 --- a/resource-manager/network/2023-09-01/scopeconnections/version.go +++ b/resource-manager/network/2023-09-01/scopeconnections/version.go @@ -1,12 +1,10 @@ package scopeconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopeconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/README.md b/resource-manager/network/2023-09-01/securityadminconfigurations/README.md index b4282a6abc1..7a67375d535 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/README.md +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/securityadminconfigurations` Documentation -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `securityadminconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/client.go b/resource-manager/network/2023-09-01/securityadminconfigurations/client.go index 7629a2dcefb..c4acda9a655 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/client.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/client.go @@ -15,7 +15,7 @@ type SecurityAdminConfigurationsClient struct { } func NewSecurityAdminConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityadminconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityadminconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2023-09-01/securityadminconfigurations/id_networkmanager.go index cc45635d1cc..4e824ae225e 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2023-09-01/securityadminconfigurations/id_securityadminconfiguration.go index c481f6a158b..1791024e094 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/id_securityadminconfiguration.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2023-09-01/securityadminconfigurations/method_createorupdate.go index e285ab5384c..2406a218954 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, i var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2023-09-01/securityadminconfigurations/method_delete.go index 82087f7a71c..98f2658625f 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/method_delete.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/method_get.go b/resource-manager/network/2023-09-01/securityadminconfigurations/method_get.go index 6046f27ef91..65a62286882 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/method_get.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityA var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/method_list.go b/resource-manager/network/2023-09-01/securityadminconfigurations/method_list.go index 8fc4c2c91dc..a4abe4c74d3 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/method_list.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/securityadminconfigurations/version.go b/resource-manager/network/2023-09-01/securityadminconfigurations/version.go index cbe8130ee93..965687015c7 100644 --- a/resource-manager/network/2023-09-01/securityadminconfigurations/version.go +++ b/resource-manager/network/2023-09-01/securityadminconfigurations/version.go @@ -1,12 +1,10 @@ package securityadminconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityadminconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/README.md b/resource-manager/network/2023-09-01/securitypartnerproviders/README.md index d1dfd3708f2..76a3bb05c44 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/README.md +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/securitypartnerproviders` Documentation -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `securitypartnerproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/client.go b/resource-manager/network/2023-09-01/securitypartnerproviders/client.go index e87ed7e5d0e..7752e07fcf3 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/client.go +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/client.go @@ -15,7 +15,7 @@ type SecurityPartnerProvidersClient struct { } func NewSecurityPartnerProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitypartnerproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitypartnerproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2023-09-01/securitypartnerproviders/id_securitypartnerprovider.go index 32dd3433d4a..af7579bfa45 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/id_securitypartnerprovider.go +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/id_securitypartnerprovider.go @@ -42,7 +42,7 @@ func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, e } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartner } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/method_get.go b/resource-manager/network/2023-09-01/securitypartnerproviders/method_get.go index ca56a913bc7..5b244206a3f 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/method_get.go +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/method_get.go @@ -45,7 +45,6 @@ func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPart var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2023-09-01/securitypartnerproviders/method_updatetags.go index 7cbef507221..dfd04e92e88 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/method_updatetags.go +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/method_updatetags.go @@ -49,7 +49,6 @@ func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id Secur var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securitypartnerproviders/version.go b/resource-manager/network/2023-09-01/securitypartnerproviders/version.go index d1a4fb06472..03ddd3c6ce9 100644 --- a/resource-manager/network/2023-09-01/securitypartnerproviders/version.go +++ b/resource-manager/network/2023-09-01/securitypartnerproviders/version.go @@ -1,12 +1,10 @@ package securitypartnerproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypartnerproviders/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/securityrules/README.md b/resource-manager/network/2023-09-01/securityrules/README.md index d0186b86375..d46a7340227 100644 --- a/resource-manager/network/2023-09-01/securityrules/README.md +++ b/resource-manager/network/2023-09-01/securityrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/securityrules` Documentation -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `securityrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/securityrules/client.go b/resource-manager/network/2023-09-01/securityrules/client.go index 1fbf9b2c78c..fe76b456975 100644 --- a/resource-manager/network/2023-09-01/securityrules/client.go +++ b/resource-manager/network/2023-09-01/securityrules/client.go @@ -15,7 +15,7 @@ type SecurityRulesClient struct { } func NewSecurityRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2023-09-01/securityrules/id_defaultsecurityrule.go index a09823c4a35..8a42bf7697d 100644 --- a/resource-manager/network/2023-09-01/securityrules/id_defaultsecurityrule.go +++ b/resource-manager/network/2023-09-01/securityrules/id_defaultsecurityrule.go @@ -44,7 +44,7 @@ func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRule } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2023-09-01/securityrules/id_networksecuritygroup.go index 9b818e973d9..21d0af43abc 100644 --- a/resource-manager/network/2023-09-01/securityrules/id_networksecuritygroup.go +++ b/resource-manager/network/2023-09-01/securityrules/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securityrules/id_securityrule.go b/resource-manager/network/2023-09-01/securityrules/id_securityrule.go index da153b38f42..d87e04b0366 100644 --- a/resource-manager/network/2023-09-01/securityrules/id_securityrule.go +++ b/resource-manager/network/2023-09-01/securityrules/id_securityrule.go @@ -44,7 +44,7 @@ func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2023-09-01/securityrules/method_defaultsecurityrulesget.go index a672fd767b7..0d436a23706 100644 --- a/resource-manager/network/2023-09-01/securityrules/method_defaultsecurityrulesget.go +++ b/resource-manager/network/2023-09-01/securityrules/method_defaultsecurityrulesget.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id Def var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securityrules/method_get.go b/resource-manager/network/2023-09-01/securityrules/method_get.go index effcc9d3d7b..85ddb4310ff 100644 --- a/resource-manager/network/2023-09-01/securityrules/method_get.go +++ b/resource-manager/network/2023-09-01/securityrules/method_get.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/securityrules/version.go b/resource-manager/network/2023-09-01/securityrules/version.go index 1c872f5b371..0d39704e6e4 100644 --- a/resource-manager/network/2023-09-01/securityrules/version.go +++ b/resource-manager/network/2023-09-01/securityrules/version.go @@ -1,12 +1,10 @@ package securityrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityrules/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/README.md b/resource-manager/network/2023-09-01/serviceendpointpolicies/README.md index b82c041a4fe..988d1834c8d 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/README.md +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/serviceendpointpolicies` Documentation -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `serviceendpointpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/client.go b/resource-manager/network/2023-09-01/serviceendpointpolicies/client.go index d92547bd44b..4efc8d43b2a 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/client.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPoliciesClient struct { } func NewServiceEndpointPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2023-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go index 4b66cdb57fe..d922a583fba 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2023-09-01/serviceendpointpolicies/method_get.go index 8929b01c755..ce97f45af4d 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/method_get.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpoi var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2023-09-01/serviceendpointpolicies/method_updatetags.go index 92a472479ad..d260b347033 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/method_updatetags.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id Servic var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicies/version.go b/resource-manager/network/2023-09-01/serviceendpointpolicies/version.go index 9b274661982..533616ca3b7 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicies/version.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicies/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicies/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/README.md index c5e53b02751..ac6a52c5d35 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/README.md +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions` Documentation -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `serviceendpointpolicydefinitions` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/client.go index c75845bd1b5..0b0e9163605 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/client.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPolicyDefinitionsClient struct { } func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go index 2d85c659986..b3ccc083899 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go index edee1adbeda..abc9a0e9719 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go @@ -44,7 +44,7 @@ func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolic } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*Service } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/method_get.go index e9e63e50232..8aff5f74167 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/method_get.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id Serv var model ServiceEndpointPolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/version.go index e16bd8128ab..fd31119f4ee 100644 --- a/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/version.go +++ b/resource-manager/network/2023-09-01/serviceendpointpolicydefinitions/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicydefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/servicetags/README.md b/resource-manager/network/2023-09-01/servicetags/README.md index c5639561688..86626083968 100644 --- a/resource-manager/network/2023-09-01/servicetags/README.md +++ b/resource-manager/network/2023-09-01/servicetags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/servicetags` Documentation -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `servicetags` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/servicetags/client.go b/resource-manager/network/2023-09-01/servicetags/client.go index 7037716c1cf..33295761773 100644 --- a/resource-manager/network/2023-09-01/servicetags/client.go +++ b/resource-manager/network/2023-09-01/servicetags/client.go @@ -15,7 +15,7 @@ type ServiceTagsClient struct { } func NewServiceTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicetags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/servicetags/id_location.go b/resource-manager/network/2023-09-01/servicetags/id_location.go index b22b2cb34d7..a68389322f8 100644 --- a/resource-manager/network/2023-09-01/servicetags/id_location.go +++ b/resource-manager/network/2023-09-01/servicetags/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2023-09-01/servicetags/method_servicetaginformationlist.go index 7c6de375541..1150809dc2b 100644 --- a/resource-manager/network/2023-09-01/servicetags/method_servicetaginformationlist.go +++ b/resource-manager/network/2023-09-01/servicetags/method_servicetaginformationlist.go @@ -40,6 +40,7 @@ func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/servicetags/method_servicetagslist.go b/resource-manager/network/2023-09-01/servicetags/method_servicetagslist.go index f83c293d79b..a25ce187253 100644 --- a/resource-manager/network/2023-09-01/servicetags/method_servicetagslist.go +++ b/resource-manager/network/2023-09-01/servicetags/method_servicetagslist.go @@ -46,7 +46,6 @@ func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) ( var model ServiceTagsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/servicetags/version.go b/resource-manager/network/2023-09-01/servicetags/version.go index 4dbceb8e294..7cba112aa11 100644 --- a/resource-manager/network/2023-09-01/servicetags/version.go +++ b/resource-manager/network/2023-09-01/servicetags/version.go @@ -1,12 +1,10 @@ package servicetags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicetags/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/staticmembers/README.md b/resource-manager/network/2023-09-01/staticmembers/README.md index 891630a5e53..367c2862b1a 100644 --- a/resource-manager/network/2023-09-01/staticmembers/README.md +++ b/resource-manager/network/2023-09-01/staticmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/staticmembers` Documentation -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `staticmembers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/staticmembers/client.go b/resource-manager/network/2023-09-01/staticmembers/client.go index 0bd2daa81d6..9357db6d5f3 100644 --- a/resource-manager/network/2023-09-01/staticmembers/client.go +++ b/resource-manager/network/2023-09-01/staticmembers/client.go @@ -15,7 +15,7 @@ type StaticMembersClient struct { } func NewStaticMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/staticmembers/id_networkgroup.go b/resource-manager/network/2023-09-01/staticmembers/id_networkgroup.go index cbc610731ad..6138fabd8d9 100644 --- a/resource-manager/network/2023-09-01/staticmembers/id_networkgroup.go +++ b/resource-manager/network/2023-09-01/staticmembers/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/staticmembers/id_staticmember.go b/resource-manager/network/2023-09-01/staticmembers/id_staticmember.go index e972ef7ffc2..10350a8597a 100644 --- a/resource-manager/network/2023-09-01/staticmembers/id_staticmember.go +++ b/resource-manager/network/2023-09-01/staticmembers/id_staticmember.go @@ -46,7 +46,7 @@ func ParseStaticMemberID(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/staticmembers/method_createorupdate.go b/resource-manager/network/2023-09-01/staticmembers/method_createorupdate.go index 6921f0aedf3..f4ad175116b 100644 --- a/resource-manager/network/2023-09-01/staticmembers/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/staticmembers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMember var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/staticmembers/method_get.go b/resource-manager/network/2023-09-01/staticmembers/method_get.go index 11fc970af6a..8f9d30b17ab 100644 --- a/resource-manager/network/2023-09-01/staticmembers/method_get.go +++ b/resource-manager/network/2023-09-01/staticmembers/method_get.go @@ -45,7 +45,6 @@ func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/staticmembers/method_list.go b/resource-manager/network/2023-09-01/staticmembers/method_list.go index ac0788a5a34..ef104e6865f 100644 --- a/resource-manager/network/2023-09-01/staticmembers/method_list.go +++ b/resource-manager/network/2023-09-01/staticmembers/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/staticmembers/version.go b/resource-manager/network/2023-09-01/staticmembers/version.go index 57b02ce86fa..c79e689e08d 100644 --- a/resource-manager/network/2023-09-01/staticmembers/version.go +++ b/resource-manager/network/2023-09-01/staticmembers/version.go @@ -1,12 +1,10 @@ package staticmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticmembers/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/subnets/README.md b/resource-manager/network/2023-09-01/subnets/README.md index a8bcf49a2e3..8814f1b552d 100644 --- a/resource-manager/network/2023-09-01/subnets/README.md +++ b/resource-manager/network/2023-09-01/subnets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/subnets` Documentation -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `subnets` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/subnets/client.go b/resource-manager/network/2023-09-01/subnets/client.go index b1f947b47be..d3ece632ec6 100644 --- a/resource-manager/network/2023-09-01/subnets/client.go +++ b/resource-manager/network/2023-09-01/subnets/client.go @@ -15,7 +15,7 @@ type SubnetsClient struct { } func NewSubnetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subnets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subnets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/subnets/method_get.go b/resource-manager/network/2023-09-01/subnets/method_get.go index d77795ad632..9340f66305d 100644 --- a/resource-manager/network/2023-09-01/subnets/method_get.go +++ b/resource-manager/network/2023-09-01/subnets/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options G var model Subnet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/subnets/version.go b/resource-manager/network/2023-09-01/subnets/version.go index 983da187adc..2a982840c64 100644 --- a/resource-manager/network/2023-09-01/subnets/version.go +++ b/resource-manager/network/2023-09-01/subnets/version.go @@ -1,12 +1,10 @@ package subnets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subnets/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/trafficanalytics/README.md b/resource-manager/network/2023-09-01/trafficanalytics/README.md index d6432fee547..28c16bc5c60 100644 --- a/resource-manager/network/2023-09-01/trafficanalytics/README.md +++ b/resource-manager/network/2023-09-01/trafficanalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/trafficanalytics` Documentation -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `trafficanalytics` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/trafficanalytics/client.go b/resource-manager/network/2023-09-01/trafficanalytics/client.go index 78e1d6ab331..91c746485a3 100644 --- a/resource-manager/network/2023-09-01/trafficanalytics/client.go +++ b/resource-manager/network/2023-09-01/trafficanalytics/client.go @@ -15,7 +15,7 @@ type TrafficAnalyticsClient struct { } func NewTrafficAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficanalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficanalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2023-09-01/trafficanalytics/id_networkwatcher.go index f13408f03b5..17351381303 100644 --- a/resource-manager/network/2023-09-01/trafficanalytics/id_networkwatcher.go +++ b/resource-manager/network/2023-09-01/trafficanalytics/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/trafficanalytics/version.go b/resource-manager/network/2023-09-01/trafficanalytics/version.go index 0f5fb3c9142..fbf413cd157 100644 --- a/resource-manager/network/2023-09-01/trafficanalytics/version.go +++ b/resource-manager/network/2023-09-01/trafficanalytics/version.go @@ -1,12 +1,10 @@ package trafficanalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficanalytics/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/usages/README.md b/resource-manager/network/2023-09-01/usages/README.md index a54b43fb111..1bd30e7bc04 100644 --- a/resource-manager/network/2023-09-01/usages/README.md +++ b/resource-manager/network/2023-09-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/usages/client.go b/resource-manager/network/2023-09-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/network/2023-09-01/usages/client.go +++ b/resource-manager/network/2023-09-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/usages/id_location.go b/resource-manager/network/2023-09-01/usages/id_location.go index 6499c99bc79..8d1a811520a 100644 --- a/resource-manager/network/2023-09-01/usages/id_location.go +++ b/resource-manager/network/2023-09-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/usages/version.go b/resource-manager/network/2023-09-01/usages/version.go index a5cfa491423..488d63b25e7 100644 --- a/resource-manager/network/2023-09-01/usages/version.go +++ b/resource-manager/network/2023-09-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vipswap/README.md b/resource-manager/network/2023-09-01/vipswap/README.md index 766ffc13710..c97f4fb15f8 100644 --- a/resource-manager/network/2023-09-01/vipswap/README.md +++ b/resource-manager/network/2023-09-01/vipswap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vipswap` Documentation -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `vipswap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/vipswap/client.go b/resource-manager/network/2023-09-01/vipswap/client.go index 2a7d8c2afe7..d573391540e 100644 --- a/resource-manager/network/2023-09-01/vipswap/client.go +++ b/resource-manager/network/2023-09-01/vipswap/client.go @@ -15,7 +15,7 @@ type VipSwapClient struct { } func NewVipSwapClientWithBaseURI(sdkApi sdkEnv.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vipswap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vipswap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vipswap/id_cloudservice.go b/resource-manager/network/2023-09-01/vipswap/id_cloudservice.go index 5801e90709d..9e7c3a0f112 100644 --- a/resource-manager/network/2023-09-01/vipswap/id_cloudservice.go +++ b/resource-manager/network/2023-09-01/vipswap/id_cloudservice.go @@ -42,7 +42,7 @@ func ParseCloudServiceID(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vipswap/method_get.go b/resource-manager/network/2023-09-01/vipswap/method_get.go index 2d61c8f37e0..598d2371676 100644 --- a/resource-manager/network/2023-09-01/vipswap/method_get.go +++ b/resource-manager/network/2023-09-01/vipswap/method_get.go @@ -46,7 +46,6 @@ func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOp var model SwapResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/vipswap/method_list.go b/resource-manager/network/2023-09-01/vipswap/method_list.go index 32407cc2c5c..35cd678f8c4 100644 --- a/resource-manager/network/2023-09-01/vipswap/method_list.go +++ b/resource-manager/network/2023-09-01/vipswap/method_list.go @@ -46,7 +46,6 @@ func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result List var model SwapResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/vipswap/version.go b/resource-manager/network/2023-09-01/vipswap/version.go index fa01be5b166..2f9933efc2a 100644 --- a/resource-manager/network/2023-09-01/vipswap/version.go +++ b/resource-manager/network/2023-09-01/vipswap/version.go @@ -1,12 +1,10 @@ package vipswap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vipswap/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/README.md b/resource-manager/network/2023-09-01/virtualappliancesites/README.md index 56ec9ab6e9e..47033aef630 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/README.md +++ b/resource-manager/network/2023-09-01/virtualappliancesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualappliancesites` Documentation -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualappliancesites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/client.go b/resource-manager/network/2023-09-01/virtualappliancesites/client.go index 415b8e6e46b..e99ff0ccd1b 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/client.go +++ b/resource-manager/network/2023-09-01/virtualappliancesites/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSitesClient struct { } func NewVirtualApplianceSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualappliancesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualappliancesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2023-09-01/virtualappliancesites/id_networkvirtualappliance.go index d414a3c2d42..6689f6908a1 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-09-01/virtualappliancesites/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2023-09-01/virtualappliancesites/id_virtualappliancesite.go index a0500e43c74..be16c8f8b7e 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/id_virtualappliancesite.go +++ b/resource-manager/network/2023-09-01/virtualappliancesites/id_virtualappliancesite.go @@ -44,7 +44,7 @@ func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSi } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/method_get.go b/resource-manager/network/2023-09-01/virtualappliancesites/method_get.go index c78f7f1cf64..820f76d71d2 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/method_get.go +++ b/resource-manager/network/2023-09-01/virtualappliancesites/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianc var model VirtualApplianceSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualappliancesites/version.go b/resource-manager/network/2023-09-01/virtualappliancesites/version.go index 29b079bab1d..f86dec01788 100644 --- a/resource-manager/network/2023-09-01/virtualappliancesites/version.go +++ b/resource-manager/network/2023-09-01/virtualappliancesites/version.go @@ -1,12 +1,10 @@ package virtualappliancesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualappliancesites/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualapplianceskus/README.md b/resource-manager/network/2023-09-01/virtualapplianceskus/README.md index b91a6e16229..b310f294a97 100644 --- a/resource-manager/network/2023-09-01/virtualapplianceskus/README.md +++ b/resource-manager/network/2023-09-01/virtualapplianceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualapplianceskus` Documentation -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualapplianceskus` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualapplianceskus/client.go b/resource-manager/network/2023-09-01/virtualapplianceskus/client.go index db6e9902bb9..90d73eb6104 100644 --- a/resource-manager/network/2023-09-01/virtualapplianceskus/client.go +++ b/resource-manager/network/2023-09-01/virtualapplianceskus/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSkusClient struct { } func NewVirtualApplianceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualapplianceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualapplianceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2023-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go index a2683ac973a..3980d29645a 100644 --- a/resource-manager/network/2023-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ b/resource-manager/network/2023-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go @@ -40,7 +40,7 @@ func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSk } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtu } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualapplianceskus/method_get.go b/resource-manager/network/2023-09-01/virtualapplianceskus/method_get.go index 87cc1eef20e..c570427c4a3 100644 --- a/resource-manager/network/2023-09-01/virtualapplianceskus/method_get.go +++ b/resource-manager/network/2023-09-01/virtualapplianceskus/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualAp var model NetworkVirtualApplianceSku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualapplianceskus/version.go b/resource-manager/network/2023-09-01/virtualapplianceskus/version.go index 38157734325..c5dbc1b22fd 100644 --- a/resource-manager/network/2023-09-01/virtualapplianceskus/version.go +++ b/resource-manager/network/2023-09-01/virtualapplianceskus/version.go @@ -1,12 +1,10 @@ package virtualapplianceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualapplianceskus/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/README.md index 922646ff357..94f2426ac3f 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections` Documentation -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworkgatewayconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/client.go index f0cf4471c90..b74a1276981 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewayConnectionsClient struct { } func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/id_connection.go index 23a8c6154a7..8f674780f99 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/id_connection.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_get.go index e00568d96cb..842bab814e9 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_get.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id Conn var model VirtualNetworkGatewayConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go index bc9ecd13466..3606b2efb65 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context var model ConnectionSharedKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/version.go index 17fd10bddbd..76bd7c54d81 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgatewayconnections/version.go @@ -1,12 +1,10 @@ package virtualnetworkgatewayconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/README.md b/resource-manager/network/2023-09-01/virtualnetworkgateways/README.md index 3ad9dff5b7c..2a44b28373a 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworkgateways` Documentation -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/client.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/client.go index 32ede23bc60..56907b3d1b4 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewaysClient struct { } func NewVirtualNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_connection.go index fb9191036b5..d1aefba4347 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_connection.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go index 4763c88cab1..9589eab0bf6 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGat } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go index 41c5df8eedd..a767c52859c 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNa } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNet } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_get.go index 0f42a04cd89..403f9e12374 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_get.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getadvertisedroutes.go index d0dde50a8c6..969c71ee317 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getadvertisedroutes.go @@ -37,6 +37,7 @@ func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getbgppeerstatus.go index 5e6a04ac485..33e243af246 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_getbgppeerstatus.go @@ -37,6 +37,7 @@ func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_reset.go index 433a2126e07..fb6210d0c1e 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_reset.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_supportedvpndevices.go index c7d78912ab2..7b81cd2d32c 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_supportedvpndevices.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_supportedvpndevices.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, i var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go index 8347acb37cd..10dc0fac1a6 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx conte var model VirtualNetworkGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go index b2673932149..0dbfcf3f88f 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go @@ -50,7 +50,6 @@ func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.C var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkgateways/version.go b/resource-manager/network/2023-09-01/virtualnetworkgateways/version.go index 0843186b077..ac2e986bf87 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkgateways/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworkgateways/version.go @@ -1,12 +1,10 @@ package virtualnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/README.md b/resource-manager/network/2023-09-01/virtualnetworkpeerings/README.md index ec063ebb6f9..0b10178a8e3 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworkpeerings` Documentation -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworkpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/client.go b/resource-manager/network/2023-09-01/virtualnetworkpeerings/client.go index 8eb7455514c..a8632e2ec55 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/client.go @@ -15,7 +15,7 @@ type VirtualNetworkPeeringsClient struct { } func NewVirtualNetworkPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2023-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go index a72d63bb3a5..b18a9909ca2 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_createorupdate.go index aba174940d2..950797b7302 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_get.go index 81671aa625e..8bc92358897 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_get.go +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworkpeerings/version.go b/resource-manager/network/2023-09-01/virtualnetworkpeerings/version.go index 1d1b59dcbe1..118cc233e2b 100644 --- a/resource-manager/network/2023-09-01/virtualnetworkpeerings/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworkpeerings/version.go @@ -1,12 +1,10 @@ package virtualnetworkpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkpeerings/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/README.md b/resource-manager/network/2023-09-01/virtualnetworks/README.md index 7b2684741ae..ba234bb74bb 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworks/client.go b/resource-manager/network/2023-09-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/method_get.go b/resource-manager/network/2023-09-01/virtualnetworks/method_get.go index 189fd2689c1..db1b8807d3e 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/method_get.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetw var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2023-09-01/virtualnetworks/method_updatetags.go index 8e2d6ea92a2..3e63f83e2a6 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/method_updatetags.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/method_updatetags.go @@ -50,7 +50,6 @@ func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.Virt var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go index 1f434189786..bcd41a4d551 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go @@ -35,6 +35,7 @@ func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() * func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx con var model IPAddressAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index d48736807d5..cfc2cb53d45 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -44,6 +44,7 @@ func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *cl func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/virtualnetworks/version.go b/resource-manager/network/2023-09-01/virtualnetworks/version.go index 1e2291d881c..e809d71adbe 100644 --- a/resource-manager/network/2023-09-01/virtualnetworks/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/README.md b/resource-manager/network/2023-09-01/virtualnetworktap/README.md index 78b0c852a05..7882f02fc59 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworktap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworktap` Documentation -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworktap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/client.go b/resource-manager/network/2023-09-01/virtualnetworktap/client.go index 4444f3072d8..71e5a9092ba 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworktap/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapClient struct { } func NewVirtualNetworkTapClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2023-09-01/virtualnetworktap/id_virtualnetworktap.go index 5bf0638a304..7c8ef004fe6 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/id_virtualnetworktap.go +++ b/resource-manager/network/2023-09-01/virtualnetworktap/id_virtualnetworktap.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/method_get.go b/resource-manager/network/2023-09-01/virtualnetworktap/method_get.go index 7d8ef7767ee..cbeab75581a 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/method_get.go +++ b/resource-manager/network/2023-09-01/virtualnetworktap/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2023-09-01/virtualnetworktap/method_updatetags.go index 2079b8bdf80..3d2dd536791 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/method_updatetags.go +++ b/resource-manager/network/2023-09-01/virtualnetworktap/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetwo var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualnetworktap/version.go b/resource-manager/network/2023-09-01/virtualnetworktap/version.go index 1ba23d869b4..bf52069267c 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktap/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworktap/version.go @@ -1,12 +1,10 @@ package virtualnetworktap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktap/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualnetworktaps/README.md b/resource-manager/network/2023-09-01/virtualnetworktaps/README.md index 095f3f646a6..325fc61d959 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktaps/README.md +++ b/resource-manager/network/2023-09-01/virtualnetworktaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualnetworktaps` Documentation -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualnetworktaps` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualnetworktaps/client.go b/resource-manager/network/2023-09-01/virtualnetworktaps/client.go index 33de6824de7..072baab9143 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktaps/client.go +++ b/resource-manager/network/2023-09-01/virtualnetworktaps/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapsClient struct { } func NewVirtualNetworkTapsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualnetworktaps/version.go b/resource-manager/network/2023-09-01/virtualnetworktaps/version.go index ed593b9f6a7..babe00e0793 100644 --- a/resource-manager/network/2023-09-01/virtualnetworktaps/version.go +++ b/resource-manager/network/2023-09-01/virtualnetworktaps/version.go @@ -1,12 +1,10 @@ package virtualnetworktaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktaps/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualrouterpeerings/README.md b/resource-manager/network/2023-09-01/virtualrouterpeerings/README.md index 71dff866390..cd022d9cd86 100644 --- a/resource-manager/network/2023-09-01/virtualrouterpeerings/README.md +++ b/resource-manager/network/2023-09-01/virtualrouterpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualrouterpeerings` Documentation -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualrouterpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualrouterpeerings/client.go b/resource-manager/network/2023-09-01/virtualrouterpeerings/client.go index 6b55e901ef5..b8bf140b1c1 100644 --- a/resource-manager/network/2023-09-01/virtualrouterpeerings/client.go +++ b/resource-manager/network/2023-09-01/virtualrouterpeerings/client.go @@ -15,7 +15,7 @@ type VirtualRouterPeeringsClient struct { } func NewVirtualRouterPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2023-09-01/virtualrouterpeerings/id_virtualrouter.go index 85fff5b9af3..d23c35f1255 100644 --- a/resource-manager/network/2023-09-01/virtualrouterpeerings/id_virtualrouter.go +++ b/resource-manager/network/2023-09-01/virtualrouterpeerings/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2023-09-01/virtualrouterpeerings/method_get.go index 684fe0cb2fc..8b9d7a1569d 100644 --- a/resource-manager/network/2023-09-01/virtualrouterpeerings/method_get.go +++ b/resource-manager/network/2023-09-01/virtualrouterpeerings/method_get.go @@ -46,7 +46,6 @@ func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.Virtu var model VirtualRouterPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualrouterpeerings/version.go b/resource-manager/network/2023-09-01/virtualrouterpeerings/version.go index a35ac254ccd..385b2f01636 100644 --- a/resource-manager/network/2023-09-01/virtualrouterpeerings/version.go +++ b/resource-manager/network/2023-09-01/virtualrouterpeerings/version.go @@ -1,12 +1,10 @@ package virtualrouterpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouterpeerings/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualrouters/README.md b/resource-manager/network/2023-09-01/virtualrouters/README.md index 24f1a1f387f..0d355918745 100644 --- a/resource-manager/network/2023-09-01/virtualrouters/README.md +++ b/resource-manager/network/2023-09-01/virtualrouters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualrouters` Documentation -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualrouters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualrouters/client.go b/resource-manager/network/2023-09-01/virtualrouters/client.go index 37e6baf91a8..ca9adf26c79 100644 --- a/resource-manager/network/2023-09-01/virtualrouters/client.go +++ b/resource-manager/network/2023-09-01/virtualrouters/client.go @@ -15,7 +15,7 @@ type VirtualRoutersClient struct { } func NewVirtualRoutersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2023-09-01/virtualrouters/id_virtualrouter.go index 3e9ac08d3a1..917cee82cb6 100644 --- a/resource-manager/network/2023-09-01/virtualrouters/id_virtualrouter.go +++ b/resource-manager/network/2023-09-01/virtualrouters/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualrouters/method_get.go b/resource-manager/network/2023-09-01/virtualrouters/method_get.go index 39415fad17f..4eaa68180fa 100644 --- a/resource-manager/network/2023-09-01/virtualrouters/method_get.go +++ b/resource-manager/network/2023-09-01/virtualrouters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, optio var model VirtualRouter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualrouters/version.go b/resource-manager/network/2023-09-01/virtualrouters/version.go index d8202e5a32f..25861773a2c 100644 --- a/resource-manager/network/2023-09-01/virtualrouters/version.go +++ b/resource-manager/network/2023-09-01/virtualrouters/version.go @@ -1,12 +1,10 @@ package virtualrouters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouters/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/virtualwans/README.md b/resource-manager/network/2023-09-01/virtualwans/README.md index dc1dcb56d73..23c12a5616e 100644 --- a/resource-manager/network/2023-09-01/virtualwans/README.md +++ b/resource-manager/network/2023-09-01/virtualwans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/virtualwans` Documentation -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `virtualwans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/virtualwans/client.go b/resource-manager/network/2023-09-01/virtualwans/client.go index bf0a24c960f..0d727643072 100644 --- a/resource-manager/network/2023-09-01/virtualwans/client.go +++ b/resource-manager/network/2023-09-01/virtualwans/client.go @@ -15,7 +15,7 @@ type VirtualWANsClient struct { } func NewVirtualWANsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualwans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualwans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2023-09-01/virtualwans/id_configurationpolicygroup.go index 7ebd0347f4d..2742a567b1a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_configurationpolicygroup.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_configurationpolicygroup.go @@ -44,7 +44,7 @@ func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationP } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2023-09-01/virtualwans/id_hubroutetable.go index 46e51d4c426..7254af39e90 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_hubroutetable.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_hubroutetable.go @@ -44,7 +44,7 @@ func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2023-09-01/virtualwans/id_hubvirtualnetworkconnection.go index 92e4c4c7d5d..86b2ea6bba1 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_hubvirtualnetworkconnection.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_hubvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnect } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualN } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_natrule.go b/resource-manager/network/2023-09-01/virtualwans/id_natrule.go index f2dca44d7fa..c75b3495702 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_natrule.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_natrule.go @@ -44,7 +44,7 @@ func ParseNatRuleID(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualappliance.go b/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualappliance.go index 2dc156a927c..325fe5cbaca 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualapplianceconnection.go b/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualapplianceconnection.go index d39f2a000d0..09c7d9a52b2 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualapplianceconnection.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_networkvirtualapplianceconnection.go @@ -44,7 +44,7 @@ func ParseNetworkVirtualApplianceConnectionID(input string) (*NetworkVirtualAppl } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkVirtualApplianceConnectionIDInsensitively(input string) (*Netwo } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_routemap.go b/resource-manager/network/2023-09-01/virtualwans/id_routemap.go index c95aeaafbfd..62984d50913 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_routemap.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_routemap.go @@ -44,7 +44,7 @@ func ParseRouteMapID(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_routingintent.go b/resource-manager/network/2023-09-01/virtualwans/id_routingintent.go index de16e7a3861..0a5e5b5515f 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_routingintent.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_routingintent.go @@ -44,7 +44,7 @@ func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_virtualhub.go b/resource-manager/network/2023-09-01/virtualwans/id_virtualhub.go index ec4a18686e5..a65dd47d2f2 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_virtualhub.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_virtualhub.go @@ -42,7 +42,7 @@ func ParseVirtualHubID(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2023-09-01/virtualwans/id_virtualhubroutetable.go index b2cd55910b3..2c1b73bfb18 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_virtualhubroutetable.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_virtualhubroutetable.go @@ -44,7 +44,7 @@ func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTab } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_virtualwan.go b/resource-manager/network/2023-09-01/virtualwans/id_virtualwan.go index e8489bfa13e..c465fb4ee98 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_virtualwan.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_virtualwan.go @@ -42,7 +42,7 @@ func ParseVirtualWANID(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_vpngateway.go b/resource-manager/network/2023-09-01/virtualwans/id_vpngateway.go index 6889f4d78bc..ddef4f2b705 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_vpngateway.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2023-09-01/virtualwans/id_vpnlinkconnection.go index b40c9d3b7be..9e5fb0d4b28 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_vpnlinkconnection.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2023-09-01/virtualwans/id_vpnserverconfiguration.go index 604356fc28f..96680047062 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_vpnserverconfiguration.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_vpnsite.go b/resource-manager/network/2023-09-01/virtualwans/id_vpnsite.go index 4e20baefd21..6998a9ec345 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_vpnsite.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2023-09-01/virtualwans/id_vpnsitelink.go index a0b1676b210..d77c4473996 100644 --- a/resource-manager/network/2023-09-01/virtualwans/id_vpnsitelink.go +++ b/resource-manager/network/2023-09-01/virtualwans/id_vpnsitelink.go @@ -44,7 +44,7 @@ func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2023-09-01/virtualwans/method_configurationpolicygroupsget.go index 491fc15d5b2..d8feaa4f23a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_configurationpolicygroupsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_configurationpolicygroupsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id var model VpnServerConfigurationPolicyGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2023-09-01/virtualwans/method_hubroutetablesget.go index 36dc9467d46..e714731e2bf 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_hubroutetablesget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_hubroutetablesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTab var model HubRouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2023-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go index 852857adc59..f08f465d3c1 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, var model HubVirtualNetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_natrulesget.go b/resource-manager/network/2023-09-01/virtualwans/method_natrulesget.go index 9ba7ca45bea..c81f0b6e89a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_natrulesget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_natrulesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (resul var model VpnGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_networkvirtualapplianceconnectionsget.go b/resource-manager/network/2023-09-01/virtualwans/method_networkvirtualapplianceconnectionsget.go index ed429bdb536..783b3251a6c 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_networkvirtualapplianceconnectionsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_networkvirtualapplianceconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsGet(ctx context.Con var model NetworkVirtualApplianceConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2023-09-01/virtualwans/method_p2svpngatewaysget.go index 804013badcc..ec7e18c347e 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_p2svpngatewaysget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_p2svpngatewaysget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.V var model P2SVpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_routemapsget.go b/resource-manager/network/2023-09-01/virtualwans/method_routemapsget.go index 925002f31e7..c1db2c3033a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_routemapsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_routemapsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (res var model RouteMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_routingintentget.go b/resource-manager/network/2023-09-01/virtualwans/method_routingintentget.go index ae61d3b41b5..fea07e77795 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_routingintentget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_routingintentget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingInten var model RoutingIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2023-09-01/virtualwans/method_supportedsecurityproviders.go index 616d9dd0cd4..3351ee7549f 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_supportedsecurityproviders.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_supportedsecurityproviders.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id Vi var model VirtualWanSecurityProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_updatetags.go b/resource-manager/network/2023-09-01/virtualwans/method_updatetags.go index 6115890e78c..42f292d4aea 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_updatetags.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, inpu var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubbgpconnectionget.go index 525c6b3cabe..e4d4c41773a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubbgpconnectionget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubbgpconnectionget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id co var model BgpConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubipconfigurationget.go index ca3c9a88dd3..c4abe234784 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubipconfigurationget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubipconfigurationget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id var model HubIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubroutetablev2sget.go index 7c542fcfe68..0d274e1355a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubroutetablev2sget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubroutetablev2sget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id Vi var model VirtualHubRouteTableV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsget.go index 3f2e419720f..0b1bcbe8573 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsupdatetags.go index be5399a4515..23f6df52743 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsupdatetags.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualhubsupdatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id Virtual var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2023-09-01/virtualwans/method_virtualwansget.go index 41dbd00d7f2..66d801a779a 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_virtualwansget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_virtualwansget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpnconnectionsget.go index 812232759b1..ca7d4d2a9b4 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpnconnectionsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpnconnectionsget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.V var model VpnConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpngatewaysget.go index bfa13a547eb..0793829ea75 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpngatewaysget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpngatewaysget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) var model VpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpnserverconfigurationsget.go index e5b009a1154..5355630843f 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpnserverconfigurationsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpnserverconfigurationsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id Vp var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinkconnectionsget.go index 088e1b48de5..b2fed5d6de1 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id Vpn var model VpnSiteLinkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinksget.go index c16e84b3691..018f1ad8f67 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinksget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitelinksget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId var model VpnSiteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitesget.go index 6494e6d6449..a250df018ce 100644 --- a/resource-manager/network/2023-09-01/virtualwans/method_vpnsitesget.go +++ b/resource-manager/network/2023-09-01/virtualwans/method_vpnsitesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (resul var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/virtualwans/version.go b/resource-manager/network/2023-09-01/virtualwans/version.go index d2d134fd98a..7621db0cee6 100644 --- a/resource-manager/network/2023-09-01/virtualwans/version.go +++ b/resource-manager/network/2023-09-01/virtualwans/version.go @@ -1,12 +1,10 @@ package virtualwans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualwans/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vmsspublicipaddresses/README.md b/resource-manager/network/2023-09-01/vmsspublicipaddresses/README.md index 7fbbc21ff04..a04ff26ec02 100644 --- a/resource-manager/network/2023-09-01/vmsspublicipaddresses/README.md +++ b/resource-manager/network/2023-09-01/vmsspublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vmsspublicipaddresses` Documentation -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `vmsspublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/vmsspublicipaddresses/client.go b/resource-manager/network/2023-09-01/vmsspublicipaddresses/client.go index 3213cbf73fe..218145b65b9 100644 --- a/resource-manager/network/2023-09-01/vmsspublicipaddresses/client.go +++ b/resource-manager/network/2023-09-01/vmsspublicipaddresses/client.go @@ -15,7 +15,7 @@ type VMSSPublicIPAddressesClient struct { } func NewVMSSPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2023-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go index 6907f32662f..d2ae7bd3514 100644 --- a/resource-manager/network/2023-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ b/resource-manager/network/2023-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2023-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go index 482b018c7dc..aa1a988346a 100644 --- a/resource-manager/network/2023-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ b/resource-manager/network/2023-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOption func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetP var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/vmsspublicipaddresses/version.go b/resource-manager/network/2023-09-01/vmsspublicipaddresses/version.go index ab6e5c22e38..9cfb57f0d15 100644 --- a/resource-manager/network/2023-09-01/vmsspublicipaddresses/version.go +++ b/resource-manager/network/2023-09-01/vmsspublicipaddresses/version.go @@ -1,12 +1,10 @@ package vmsspublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmsspublicipaddresses/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vpngateways/README.md b/resource-manager/network/2023-09-01/vpngateways/README.md index 1c121035b96..cc17bf67def 100644 --- a/resource-manager/network/2023-09-01/vpngateways/README.md +++ b/resource-manager/network/2023-09-01/vpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vpngateways` Documentation -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `vpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/vpngateways/client.go b/resource-manager/network/2023-09-01/vpngateways/client.go index 5679554f1a5..c17671a8ad9 100644 --- a/resource-manager/network/2023-09-01/vpngateways/client.go +++ b/resource-manager/network/2023-09-01/vpngateways/client.go @@ -15,7 +15,7 @@ type VpnGatewaysClient struct { } func NewVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vpngateways/id_vpngateway.go b/resource-manager/network/2023-09-01/vpngateways/id_vpngateway.go index 4a48b9a7916..a605ffbf545 100644 --- a/resource-manager/network/2023-09-01/vpngateways/id_vpngateway.go +++ b/resource-manager/network/2023-09-01/vpngateways/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vpngateways/method_reset.go b/resource-manager/network/2023-09-01/vpngateways/method_reset.go index 8228267e86c..06856815c74 100644 --- a/resource-manager/network/2023-09-01/vpngateways/method_reset.go +++ b/resource-manager/network/2023-09-01/vpngateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-09-01/vpngateways/version.go b/resource-manager/network/2023-09-01/vpngateways/version.go index 0c4e23a587c..3c4c60e6a3b 100644 --- a/resource-manager/network/2023-09-01/vpngateways/version.go +++ b/resource-manager/network/2023-09-01/vpngateways/version.go @@ -1,12 +1,10 @@ package vpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpngateways/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vpnlinkconnections/client.go b/resource-manager/network/2023-09-01/vpnlinkconnections/client.go index 3fbef685129..abb23ca4c39 100644 --- a/resource-manager/network/2023-09-01/vpnlinkconnections/client.go +++ b/resource-manager/network/2023-09-01/vpnlinkconnections/client.go @@ -15,7 +15,7 @@ type VpnLinkConnectionsClient struct { } func NewVpnLinkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnlinkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnlinkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2023-09-01/vpnlinkconnections/id_vpnlinkconnection.go index e1dd95afd3a..ba9d1fe1a91 100644 --- a/resource-manager/network/2023-09-01/vpnlinkconnections/id_vpnlinkconnection.go +++ b/resource-manager/network/2023-09-01/vpnlinkconnections/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vpnlinkconnections/version.go b/resource-manager/network/2023-09-01/vpnlinkconnections/version.go index 862b45c301d..5ee9f67a52a 100644 --- a/resource-manager/network/2023-09-01/vpnlinkconnections/version.go +++ b/resource-manager/network/2023-09-01/vpnlinkconnections/version.go @@ -1,12 +1,10 @@ package vpnlinkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnlinkconnections/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vpnserverconfigurations/README.md b/resource-manager/network/2023-09-01/vpnserverconfigurations/README.md index 81b93490808..184cec5037f 100644 --- a/resource-manager/network/2023-09-01/vpnserverconfigurations/README.md +++ b/resource-manager/network/2023-09-01/vpnserverconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vpnserverconfigurations` Documentation -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `vpnserverconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/vpnserverconfigurations/client.go b/resource-manager/network/2023-09-01/vpnserverconfigurations/client.go index 6209cc6af8d..661d154e519 100644 --- a/resource-manager/network/2023-09-01/vpnserverconfigurations/client.go +++ b/resource-manager/network/2023-09-01/vpnserverconfigurations/client.go @@ -15,7 +15,7 @@ type VpnServerConfigurationsClient struct { } func NewVpnServerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2023-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go index 56b67386806..fd55db1bea0 100644 --- a/resource-manager/network/2023-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ b/resource-manager/network/2023-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2023-09-01/vpnserverconfigurations/method_updatetags.go index 7a675d1584d..f9decf387a7 100644 --- a/resource-manager/network/2023-09-01/vpnserverconfigurations/method_updatetags.go +++ b/resource-manager/network/2023-09-01/vpnserverconfigurations/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnSer var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/vpnserverconfigurations/version.go b/resource-manager/network/2023-09-01/vpnserverconfigurations/version.go index 170022daf09..b4f2dd49c51 100644 --- a/resource-manager/network/2023-09-01/vpnserverconfigurations/version.go +++ b/resource-manager/network/2023-09-01/vpnserverconfigurations/version.go @@ -1,12 +1,10 @@ package vpnserverconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnserverconfigurations/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/vpnsites/README.md b/resource-manager/network/2023-09-01/vpnsites/README.md index 554130ce87f..5105cea585d 100644 --- a/resource-manager/network/2023-09-01/vpnsites/README.md +++ b/resource-manager/network/2023-09-01/vpnsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/vpnsites` Documentation -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `vpnsites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/vpnsites/client.go b/resource-manager/network/2023-09-01/vpnsites/client.go index 241eb9e94ea..2c56ae704cd 100644 --- a/resource-manager/network/2023-09-01/vpnsites/client.go +++ b/resource-manager/network/2023-09-01/vpnsites/client.go @@ -15,7 +15,7 @@ type VpnSitesClient struct { } func NewVpnSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/vpnsites/id_vpnsite.go b/resource-manager/network/2023-09-01/vpnsites/id_vpnsite.go index 4b42ecf0a1e..f4827bdd53c 100644 --- a/resource-manager/network/2023-09-01/vpnsites/id_vpnsite.go +++ b/resource-manager/network/2023-09-01/vpnsites/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/vpnsites/method_updatetags.go b/resource-manager/network/2023-09-01/vpnsites/method_updatetags.go index 08341839986..aa5af2cd330 100644 --- a/resource-manager/network/2023-09-01/vpnsites/method_updatetags.go +++ b/resource-manager/network/2023-09-01/vpnsites/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input Tags var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/vpnsites/version.go b/resource-manager/network/2023-09-01/vpnsites/version.go index f0137d0218a..87abb87d9b4 100644 --- a/resource-manager/network/2023-09-01/vpnsites/version.go +++ b/resource-manager/network/2023-09-01/vpnsites/version.go @@ -1,12 +1,10 @@ package vpnsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnsites/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/README.md index c029a5159ea..4371d06697a 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/client.go index ac148c53733..225049a7361 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/client.go +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/client.go @@ -15,7 +15,7 @@ type WebApplicationFirewallPoliciesClient struct { } func NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go index 9c48316d9e7..21335631484 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*Appli } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input st } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_createorupdate.go index a30ca59994f..556b406a3c2 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_createorupdate.go +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_get.go index 03919558699..b34138178e0 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_get.go +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/method_get.go @@ -45,7 +45,6 @@ func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id Applic var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/version.go index 62010648f74..d9ef711eec6 100644 --- a/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/network/2023-09-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2023-09-01" } diff --git a/resource-manager/network/2023-09-01/webcategories/README.md b/resource-manager/network/2023-09-01/webcategories/README.md index 3bc5d17c497..1cec43635ee 100644 --- a/resource-manager/network/2023-09-01/webcategories/README.md +++ b/resource-manager/network/2023-09-01/webcategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/webcategories` Documentation -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-09-01`). +The `webcategories` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-09-01/webcategories/client.go b/resource-manager/network/2023-09-01/webcategories/client.go index 075aa15b06b..980ef726026 100644 --- a/resource-manager/network/2023-09-01/webcategories/client.go +++ b/resource-manager/network/2023-09-01/webcategories/client.go @@ -15,7 +15,7 @@ type WebCategoriesClient struct { } func NewWebCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webcategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webcategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) } diff --git a/resource-manager/network/2023-09-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2023-09-01/webcategories/id_azurewebcategory.go index 1417d2f6d85..a7286a7dec7 100644 --- a/resource-manager/network/2023-09-01/webcategories/id_azurewebcategory.go +++ b/resource-manager/network/2023-09-01/webcategories/id_azurewebcategory.go @@ -40,7 +40,7 @@ func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, er } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-09-01/webcategories/method_get.go b/resource-manager/network/2023-09-01/webcategories/method_get.go index 6150a24fbf4..bcebcf476db 100644 --- a/resource-manager/network/2023-09-01/webcategories/method_get.go +++ b/resource-manager/network/2023-09-01/webcategories/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, opt var model AzureWebCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-09-01/webcategories/version.go b/resource-manager/network/2023-09-01/webcategories/version.go index 7a76645f697..66f288fb075 100644 --- a/resource-manager/network/2023-09-01/webcategories/version.go +++ b/resource-manager/network/2023-09-01/webcategories/version.go @@ -1,12 +1,10 @@ package webcategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webcategories/2023-09-01" } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/README.md b/resource-manager/network/2023-11-01/adminrulecollections/README.md index 6338f82bbe1..f8c77223064 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/README.md +++ b/resource-manager/network/2023-11-01/adminrulecollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/adminrulecollections` Documentation -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `adminrulecollections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/adminrulecollections/client.go b/resource-manager/network/2023-11-01/adminrulecollections/client.go index adbf2674d97..a0e144b1d96 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/client.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/client.go @@ -15,7 +15,7 @@ type AdminRuleCollectionsClient struct { } func NewAdminRuleCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrulecollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrulecollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2023-11-01/adminrulecollections/id_rulecollection.go index 5c84e59671e..9e9a196b29e 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/id_rulecollection.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2023-11-01/adminrulecollections/id_securityadminconfiguration.go index b8186efef3b..d4a126ec41b 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/id_securityadminconfiguration.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2023-11-01/adminrulecollections/method_createorupdate.go index 67a6db6eb7b..00810feb46a 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleC var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/method_delete.go b/resource-manager/network/2023-11-01/adminrulecollections/method_delete.go index ec55f3fa7e6..68d0021749b 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/method_delete.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/method_get.go b/resource-manager/network/2023-11-01/adminrulecollections/method_get.go index 8beb93c5eca..1aec0f98a6a 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/method_get.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/method_get.go @@ -45,7 +45,6 @@ func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/method_list.go b/resource-manager/network/2023-11-01/adminrulecollections/method_list.go index f4b9bfcdd61..2ef5b46d0a4 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/method_list.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/adminrulecollections/version.go b/resource-manager/network/2023-11-01/adminrulecollections/version.go index 7f7954e366c..fc30bf71af1 100644 --- a/resource-manager/network/2023-11-01/adminrulecollections/version.go +++ b/resource-manager/network/2023-11-01/adminrulecollections/version.go @@ -1,12 +1,10 @@ package adminrulecollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrulecollections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/adminrules/README.md b/resource-manager/network/2023-11-01/adminrules/README.md index e22e4ae2163..3727172c4a2 100644 --- a/resource-manager/network/2023-11-01/adminrules/README.md +++ b/resource-manager/network/2023-11-01/adminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/adminrules` Documentation -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `adminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/adminrules/client.go b/resource-manager/network/2023-11-01/adminrules/client.go index 40da5b4d0a4..811271711b6 100644 --- a/resource-manager/network/2023-11-01/adminrules/client.go +++ b/resource-manager/network/2023-11-01/adminrules/client.go @@ -15,7 +15,7 @@ type AdminRulesClient struct { } func NewAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/adminrules/id_rule.go b/resource-manager/network/2023-11-01/adminrules/id_rule.go index 3b132449062..35d0bf9900c 100644 --- a/resource-manager/network/2023-11-01/adminrules/id_rule.go +++ b/resource-manager/network/2023-11-01/adminrules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/adminrules/id_rulecollection.go b/resource-manager/network/2023-11-01/adminrules/id_rulecollection.go index 6dd9dd5b0a8..71e436de80b 100644 --- a/resource-manager/network/2023-11-01/adminrules/id_rulecollection.go +++ b/resource-manager/network/2023-11-01/adminrules/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/adminrules/method_createorupdate.go b/resource-manager/network/2023-11-01/adminrules/method_createorupdate.go index d936a5666f1..250f646ce08 100644 --- a/resource-manager/network/2023-11-01/adminrules/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/adminrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input B if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2023-11-01/adminrules/method_delete.go b/resource-manager/network/2023-11-01/adminrules/method_delete.go index 9b07dbc4a79..c5deb3a7b1f 100644 --- a/resource-manager/network/2023-11-01/adminrules/method_delete.go +++ b/resource-manager/network/2023-11-01/adminrules/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/adminrules/method_get.go b/resource-manager/network/2023-11-01/adminrules/method_get.go index 94337a0e139..52f80e411e8 100644 --- a/resource-manager/network/2023-11-01/adminrules/method_get.go +++ b/resource-manager/network/2023-11-01/adminrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // Get ... @@ -48,11 +48,11 @@ func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2023-11-01/adminrules/method_list.go b/resource-manager/network/2023-11-01/adminrules/method_list.go index 97915114117..85aa73c80e3 100644 --- a/resource-manager/network/2023-11-01/adminrules/method_list.go +++ b/resource-manager/network/2023-11-01/adminrules/method_list.go @@ -73,7 +73,7 @@ func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result temp := make([]BaseAdminRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBaseAdminRuleImplementation(v) + val, err := UnmarshalBaseAdminRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BaseAdminRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/network/2023-11-01/adminrules/model_adminrule.go b/resource-manager/network/2023-11-01/adminrules/model_adminrule.go index 8544cf3cd71..74d9a7cd9c1 100644 --- a/resource-manager/network/2023-11-01/adminrules/model_adminrule.go +++ b/resource-manager/network/2023-11-01/adminrules/model_adminrule.go @@ -16,13 +16,26 @@ type AdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AdminRule{} func (s AdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/adminrules/model_baseadminrule.go b/resource-manager/network/2023-11-01/adminrules/model_baseadminrule.go index bbcabba727e..9b510b6b2b9 100644 --- a/resource-manager/network/2023-11-01/adminrules/model_baseadminrule.go +++ b/resource-manager/network/2023-11-01/adminrules/model_baseadminrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseAdminRule interface { + BaseAdminRule() BaseBaseAdminRuleImpl +} + +var _ BaseAdminRule = BaseBaseAdminRuleImpl{} + +type BaseBaseAdminRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s } -// RawBaseAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseAdminRule = RawBaseAdminRuleImpl{} + +// RawBaseAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseAdminRuleImpl struct { - Type string - Values map[string]interface{} + baseAdminRule BaseBaseAdminRuleImpl + Type string + Values map[string]interface{} } -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { +func (s RawBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s.baseAdminRule +} + +func UnmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { return out, nil } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseBaseAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseAdminRuleImpl: %+v", err) } - return out, nil + + return RawBaseAdminRuleImpl{ + baseAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2023-11-01/adminrules/model_defaultadminrule.go index 7a93ae7edc9..3695c8332dc 100644 --- a/resource-manager/network/2023-11-01/adminrules/model_defaultadminrule.go +++ b/resource-manager/network/2023-11-01/adminrules/model_defaultadminrule.go @@ -16,13 +16,26 @@ type DefaultAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s DefaultAdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = DefaultAdminRule{} func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/adminrules/version.go b/resource-manager/network/2023-11-01/adminrules/version.go index ac0a75782a6..1fc017e754d 100644 --- a/resource-manager/network/2023-11-01/adminrules/version.go +++ b/resource-manager/network/2023-11-01/adminrules/version.go @@ -1,12 +1,10 @@ package adminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrules/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/README.md index 2711cc919a3..c0f99eacf81 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/README.md +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections` Documentation -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `applicationgatewayprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/client.go index 10a57c1c475..2218d4c59f1 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/client.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { } func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go index e1cb4795761..98b4f043cb9 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go index aad51fee91b..3e07c149e6e 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*Applicat } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input strin } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/method_get.go index f3f7a21ab28..dace2e6df65 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/method_get.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Cont var model ApplicationGatewayPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/version.go index 1b4f66adb60..a24110f3eee 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/version.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/README.md index ae7762605e3..4a3b3112fca 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/README.md +++ b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources` Documentation -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `applicationgatewayprivatelinkresources` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/client.go index 9e064641526..81bc1b2fb1d 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/client.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { } func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go index f86cb06512e..06702643dd2 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/version.go index 91d2fb62a6e..869c6b2db40 100644 --- a/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/version.go +++ b/resource-manager/network/2023-11-01/applicationgatewayprivatelinkresources/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/applicationgateways/README.md b/resource-manager/network/2023-11-01/applicationgateways/README.md index 81e4a6fc227..b7bf0e308d2 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/README.md +++ b/resource-manager/network/2023-11-01/applicationgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgateways` Documentation -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `applicationgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/applicationgateways/client.go b/resource-manager/network/2023-11-01/applicationgateways/client.go index 9608bf47106..3cd17d71726 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/client.go +++ b/resource-manager/network/2023-11-01/applicationgateways/client.go @@ -15,7 +15,7 @@ type ApplicationGatewaysClient struct { } func NewApplicationGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2023-11-01/applicationgateways/id_applicationgateway.go index 0611edc8513..62f5b1be065 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/id_applicationgateway.go +++ b/resource-manager/network/2023-11-01/applicationgateways/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2023-11-01/applicationgateways/id_predefinedpolicy.go index f22e541bda3..71d5c0e0d52 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/id_predefinedpolicy.go +++ b/resource-manager/network/2023-11-01/applicationgateways/id_predefinedpolicy.go @@ -40,7 +40,7 @@ func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, er } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2023-11-01/applicationgateways/method_backendhealth.go index 21c25eb922c..2ab399ab3f9 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_backendhealth.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_backendhealth.go @@ -37,6 +37,7 @@ func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2023-11-01/applicationgateways/method_backendhealthondemand.go index 2db3547857a..a22fd7135ce 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_backendhealthondemand.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_backendhealthondemand.go @@ -37,6 +37,7 @@ func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_get.go b/resource-manager/network/2023-11-01/applicationgateways/method_get.go index 03000d91a47..c25227f49ca 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_get.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewa var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2023-11-01/applicationgateways/method_getsslpredefinedpolicy.go index 97530703e81..d42b5d2730e 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_getsslpredefinedpolicy.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_getsslpredefinedpolicy.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, i var model ApplicationGatewaySslPredefinedPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablerequestheaders.go index 634799c7f70..8132f0945cf 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablerequestheaders.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablerequestheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2023-11-01/applicationgateways/method_listavailableresponseheaders.go index fe99c70d2e7..89bdb636e2e 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_listavailableresponseheaders.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_listavailableresponseheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2023-11-01/applicationgateways/method_listavailableservervariables.go index b48bb86d765..f2a0d8c4b79 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_listavailableservervariables.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_listavailableservervariables.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablessloptions.go index 386a33e5e84..f446cd3730a 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablessloptions.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablessloptions.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, var model ApplicationGatewayAvailableSslOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablewafrulesets.go index 3df1a2db564..ee2a21477a5 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_listavailablewafrulesets.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_listavailablewafrulesets.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, var model ApplicationGatewayAvailableWafRuleSetsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/method_updatetags.go b/resource-manager/network/2023-11-01/applicationgateways/method_updatetags.go index d22b3615559..875c2ce138d 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/method_updatetags.go +++ b/resource-manager/network/2023-11-01/applicationgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id Applicatio var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgateways/version.go b/resource-manager/network/2023-11-01/applicationgateways/version.go index d48fcac7be0..52b278c2328 100644 --- a/resource-manager/network/2023-11-01/applicationgateways/version.go +++ b/resource-manager/network/2023-11-01/applicationgateways/version.go @@ -1,12 +1,10 @@ package applicationgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/README.md index 7f061f94ea0..0a1f3f9c454 100644 --- a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/README.md +++ b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests` Documentation -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/client.go index 507d8e55929..c8cf9d79e64 100644 --- a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/client.go +++ b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayWafDynamicManifestsClient struct { } func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/id_location.go index 03b931e4e2f..357f91a7bb3 100644 --- a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/id_location.go +++ b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/method_defaultget.go b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/method_defaultget.go index 0a6682174de..41ec3674d2f 100644 --- a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/method_defaultget.go +++ b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/method_defaultget.go @@ -46,7 +46,6 @@ func (c ApplicationGatewayWafDynamicManifestsClient) DefaultGet(ctx context.Cont var model ApplicationGatewayWafDynamicManifestResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/version.go index 83c45ed9b8f..888716ce6f2 100644 --- a/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/version.go +++ b/resource-manager/network/2023-11-01/applicationgatewaywafdynamicmanifests/version.go @@ -1,12 +1,10 @@ package applicationgatewaywafdynamicmanifests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/README.md b/resource-manager/network/2023-11-01/applicationsecuritygroups/README.md index 43e96015e39..4d6c688d26a 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/README.md +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/applicationsecuritygroups` Documentation -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `applicationsecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/client.go b/resource-manager/network/2023-11-01/applicationsecuritygroups/client.go index e607d64a7d3..81de33d92a0 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/client.go +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/client.go @@ -15,7 +15,7 @@ type ApplicationSecurityGroupsClient struct { } func NewApplicationSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2023-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go index a776d455c05..67f87d7b0c2 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go @@ -42,7 +42,7 @@ func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSec } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2023-11-01/applicationsecuritygroups/method_get.go index 5990e4033ff..88fdcf2df15 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/method_get.go +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id Application var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2023-11-01/applicationsecuritygroups/method_updatetags.go index 0343cea5693..3337e0dc239 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/method_updatetags.go +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id Appl var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/applicationsecuritygroups/version.go b/resource-manager/network/2023-11-01/applicationsecuritygroups/version.go index 1f70ba98198..ce3e93ca31c 100644 --- a/resource-manager/network/2023-11-01/applicationsecuritygroups/version.go +++ b/resource-manager/network/2023-11-01/applicationsecuritygroups/version.go @@ -1,12 +1,10 @@ package applicationsecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationsecuritygroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/availabledelegations/README.md b/resource-manager/network/2023-11-01/availabledelegations/README.md index 4ada091c5fa..f368a8f1e72 100644 --- a/resource-manager/network/2023-11-01/availabledelegations/README.md +++ b/resource-manager/network/2023-11-01/availabledelegations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/availabledelegations` Documentation -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `availabledelegations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/availabledelegations/client.go b/resource-manager/network/2023-11-01/availabledelegations/client.go index ff6ff754bce..2b7153e2c60 100644 --- a/resource-manager/network/2023-11-01/availabledelegations/client.go +++ b/resource-manager/network/2023-11-01/availabledelegations/client.go @@ -15,7 +15,7 @@ type AvailableDelegationsClient struct { } func NewAvailableDelegationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabledelegations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabledelegations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/availabledelegations/id_location.go b/resource-manager/network/2023-11-01/availabledelegations/id_location.go index 411da010546..be331f465d6 100644 --- a/resource-manager/network/2023-11-01/availabledelegations/id_location.go +++ b/resource-manager/network/2023-11-01/availabledelegations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2023-11-01/availabledelegations/id_providerlocation.go index 18b359986fc..238b7f2192e 100644 --- a/resource-manager/network/2023-11-01/availabledelegations/id_providerlocation.go +++ b/resource-manager/network/2023-11-01/availabledelegations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/availabledelegations/version.go b/resource-manager/network/2023-11-01/availabledelegations/version.go index 74dc7e268ab..d0e5dfca13d 100644 --- a/resource-manager/network/2023-11-01/availabledelegations/version.go +++ b/resource-manager/network/2023-11-01/availabledelegations/version.go @@ -1,12 +1,10 @@ package availabledelegations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabledelegations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/availableservicealiases/README.md b/resource-manager/network/2023-11-01/availableservicealiases/README.md index 23e91ec7011..daf945743fb 100644 --- a/resource-manager/network/2023-11-01/availableservicealiases/README.md +++ b/resource-manager/network/2023-11-01/availableservicealiases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/availableservicealiases` Documentation -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `availableservicealiases` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/availableservicealiases/client.go b/resource-manager/network/2023-11-01/availableservicealiases/client.go index 383e80f6061..5f9e19acaa8 100644 --- a/resource-manager/network/2023-11-01/availableservicealiases/client.go +++ b/resource-manager/network/2023-11-01/availableservicealiases/client.go @@ -15,7 +15,7 @@ type AvailableServiceAliasesClient struct { } func NewAvailableServiceAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableservicealiases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableservicealiases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/availableservicealiases/id_location.go b/resource-manager/network/2023-11-01/availableservicealiases/id_location.go index 5bff2b43759..08ab16f2f59 100644 --- a/resource-manager/network/2023-11-01/availableservicealiases/id_location.go +++ b/resource-manager/network/2023-11-01/availableservicealiases/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2023-11-01/availableservicealiases/id_providerlocation.go index 7ec8519458c..0bb4c77565c 100644 --- a/resource-manager/network/2023-11-01/availableservicealiases/id_providerlocation.go +++ b/resource-manager/network/2023-11-01/availableservicealiases/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/availableservicealiases/version.go b/resource-manager/network/2023-11-01/availableservicealiases/version.go index 4d4fe38a72e..4ee314520ba 100644 --- a/resource-manager/network/2023-11-01/availableservicealiases/version.go +++ b/resource-manager/network/2023-11-01/availableservicealiases/version.go @@ -1,12 +1,10 @@ package availableservicealiases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableservicealiases/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/azurefirewalls/README.md b/resource-manager/network/2023-11-01/azurefirewalls/README.md index ffc3961c69a..eef4fada2bf 100644 --- a/resource-manager/network/2023-11-01/azurefirewalls/README.md +++ b/resource-manager/network/2023-11-01/azurefirewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/azurefirewalls` Documentation -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `azurefirewalls` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/azurefirewalls/client.go b/resource-manager/network/2023-11-01/azurefirewalls/client.go index e1119aea925..02df961b70b 100644 --- a/resource-manager/network/2023-11-01/azurefirewalls/client.go +++ b/resource-manager/network/2023-11-01/azurefirewalls/client.go @@ -15,7 +15,7 @@ type AzureFirewallsClient struct { } func NewAzureFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurefirewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurefirewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2023-11-01/azurefirewalls/id_azurefirewall.go index 20ab073f448..a3d4db3a367 100644 --- a/resource-manager/network/2023-11-01/azurefirewalls/id_azurefirewall.go +++ b/resource-manager/network/2023-11-01/azurefirewalls/id_azurefirewall.go @@ -42,7 +42,7 @@ func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/azurefirewalls/method_get.go b/resource-manager/network/2023-11-01/azurefirewalls/method_get.go index 7fa6155aa4a..e9802794921 100644 --- a/resource-manager/network/2023-11-01/azurefirewalls/method_get.go +++ b/resource-manager/network/2023-11-01/azurefirewalls/method_get.go @@ -45,7 +45,6 @@ func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (resu var model AzureFirewall result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/azurefirewalls/version.go b/resource-manager/network/2023-11-01/azurefirewalls/version.go index d05cd1766d1..50167a781bf 100644 --- a/resource-manager/network/2023-11-01/azurefirewalls/version.go +++ b/resource-manager/network/2023-11-01/azurefirewalls/version.go @@ -1,12 +1,10 @@ package azurefirewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurefirewalls/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/bastionhosts/README.md b/resource-manager/network/2023-11-01/bastionhosts/README.md index 220cdef0313..3bb5a0db59d 100644 --- a/resource-manager/network/2023-11-01/bastionhosts/README.md +++ b/resource-manager/network/2023-11-01/bastionhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionhosts` Documentation -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `bastionhosts` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/bastionhosts/client.go b/resource-manager/network/2023-11-01/bastionhosts/client.go index 95e06c7f523..f77ea65ff0a 100644 --- a/resource-manager/network/2023-11-01/bastionhosts/client.go +++ b/resource-manager/network/2023-11-01/bastionhosts/client.go @@ -15,7 +15,7 @@ type BastionHostsClient struct { } func NewBastionHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2023-11-01/bastionhosts/id_bastionhost.go index 66012e2eda5..f1d36f02936 100644 --- a/resource-manager/network/2023-11-01/bastionhosts/id_bastionhost.go +++ b/resource-manager/network/2023-11-01/bastionhosts/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/bastionhosts/method_get.go b/resource-manager/network/2023-11-01/bastionhosts/method_get.go index 71b1a85a45f..7d0d6c578df 100644 --- a/resource-manager/network/2023-11-01/bastionhosts/method_get.go +++ b/resource-manager/network/2023-11-01/bastionhosts/method_get.go @@ -45,7 +45,6 @@ func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result G var model BastionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/bastionhosts/version.go b/resource-manager/network/2023-11-01/bastionhosts/version.go index 0083c60a863..9ba19b0d004 100644 --- a/resource-manager/network/2023-11-01/bastionhosts/version.go +++ b/resource-manager/network/2023-11-01/bastionhosts/version.go @@ -1,12 +1,10 @@ package bastionhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionhosts/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/bastionshareablelink/README.md b/resource-manager/network/2023-11-01/bastionshareablelink/README.md index 353bf352f37..bbe6c06a343 100644 --- a/resource-manager/network/2023-11-01/bastionshareablelink/README.md +++ b/resource-manager/network/2023-11-01/bastionshareablelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bastionshareablelink` Documentation -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `bastionshareablelink` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/bastionshareablelink/client.go b/resource-manager/network/2023-11-01/bastionshareablelink/client.go index 9c49b25b52f..39fc8e4cbdd 100644 --- a/resource-manager/network/2023-11-01/bastionshareablelink/client.go +++ b/resource-manager/network/2023-11-01/bastionshareablelink/client.go @@ -15,7 +15,7 @@ type BastionShareableLinkClient struct { } func NewBastionShareableLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionshareablelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionshareablelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2023-11-01/bastionshareablelink/id_bastionhost.go index b2cc2bfc5be..0f1852a854d 100644 --- a/resource-manager/network/2023-11-01/bastionshareablelink/id_bastionhost.go +++ b/resource-manager/network/2023-11-01/bastionshareablelink/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/bastionshareablelink/version.go b/resource-manager/network/2023-11-01/bastionshareablelink/version.go index c7fff050a76..85195401518 100644 --- a/resource-manager/network/2023-11-01/bastionshareablelink/version.go +++ b/resource-manager/network/2023-11-01/bastionshareablelink/version.go @@ -1,12 +1,10 @@ package bastionshareablelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionshareablelink/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/bgpservicecommunities/README.md b/resource-manager/network/2023-11-01/bgpservicecommunities/README.md index e5403e15454..19cf1d6b7cc 100644 --- a/resource-manager/network/2023-11-01/bgpservicecommunities/README.md +++ b/resource-manager/network/2023-11-01/bgpservicecommunities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/bgpservicecommunities` Documentation -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `bgpservicecommunities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/bgpservicecommunities/client.go b/resource-manager/network/2023-11-01/bgpservicecommunities/client.go index 07cf4f59649..0fbe7d0bd51 100644 --- a/resource-manager/network/2023-11-01/bgpservicecommunities/client.go +++ b/resource-manager/network/2023-11-01/bgpservicecommunities/client.go @@ -15,7 +15,7 @@ type BgpServiceCommunitiesClient struct { } func NewBgpServiceCommunitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bgpservicecommunities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bgpservicecommunities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/bgpservicecommunities/version.go b/resource-manager/network/2023-11-01/bgpservicecommunities/version.go index a8370a93d5c..90d5d499d60 100644 --- a/resource-manager/network/2023-11-01/bgpservicecommunities/version.go +++ b/resource-manager/network/2023-11-01/bgpservicecommunities/version.go @@ -1,12 +1,10 @@ package bgpservicecommunities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bgpservicecommunities/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/checkdnsavailabilities/README.md b/resource-manager/network/2023-11-01/checkdnsavailabilities/README.md index aae01bd66f3..dd046edc750 100644 --- a/resource-manager/network/2023-11-01/checkdnsavailabilities/README.md +++ b/resource-manager/network/2023-11-01/checkdnsavailabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/checkdnsavailabilities` Documentation -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `checkdnsavailabilities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/checkdnsavailabilities/client.go b/resource-manager/network/2023-11-01/checkdnsavailabilities/client.go index 14eb1a4baa0..3641ce2ee39 100644 --- a/resource-manager/network/2023-11-01/checkdnsavailabilities/client.go +++ b/resource-manager/network/2023-11-01/checkdnsavailabilities/client.go @@ -15,7 +15,7 @@ type CheckDnsAvailabilitiesClient struct { } func NewCheckDnsAvailabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2023-11-01/checkdnsavailabilities/id_location.go index 1adf8c560da..208d2c68c41 100644 --- a/resource-manager/network/2023-11-01/checkdnsavailabilities/id_location.go +++ b/resource-manager/network/2023-11-01/checkdnsavailabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2023-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go index 276e19a8dd4..aa291abadeb 100644 --- a/resource-manager/network/2023-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ b/resource-manager/network/2023-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go @@ -34,6 +34,7 @@ func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Conte var model DnsNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/checkdnsavailabilities/version.go b/resource-manager/network/2023-11-01/checkdnsavailabilities/version.go index 96c92ccdb8c..901e04955d1 100644 --- a/resource-manager/network/2023-11-01/checkdnsavailabilities/version.go +++ b/resource-manager/network/2023-11-01/checkdnsavailabilities/version.go @@ -1,12 +1,10 @@ package checkdnsavailabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkdnsavailabilities/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/README.md index 178fea12b22..999bddf93ab 100644 --- a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/README.md +++ b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/cloudservicepublicipaddresses` Documentation -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `cloudservicepublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/client.go index 4eebc5f720f..3ffc0d7ae83 100644 --- a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/client.go +++ b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/client.go @@ -15,7 +15,7 @@ type CloudServicePublicIPAddressesClient struct { } func NewCloudServicePublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/id_providercloudservice.go index 2750d8acfa0..86cef14917e 100644 --- a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go index b3e6c192d39..dabdeb2c12e 100644 --- a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeade func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePub var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/version.go index 13e8a9d4678..affd2c94cc8 100644 --- a/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/version.go +++ b/resource-manager/network/2023-11-01/cloudservicepublicipaddresses/version.go @@ -1,12 +1,10 @@ package cloudservicepublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudservicepublicipaddresses/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/README.md b/resource-manager/network/2023-11-01/connectionmonitors/README.md index c54ef6441dd..5888b3a63ca 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/README.md +++ b/resource-manager/network/2023-11-01/connectionmonitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/connectionmonitors` Documentation -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `connectionmonitors` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/connectionmonitors/client.go b/resource-manager/network/2023-11-01/connectionmonitors/client.go index a8ff516ce50..c23a27cd53b 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/client.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/client.go @@ -15,7 +15,7 @@ type ConnectionMonitorsClient struct { } func NewConnectionMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectionmonitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectionmonitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2023-11-01/connectionmonitors/id_connectionmonitor.go index 10d851fd213..8563d9fa155 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/id_connectionmonitor.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/id_connectionmonitor.go @@ -44,7 +44,7 @@ func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2023-11-01/connectionmonitors/id_networkwatcher.go index c112368b0b7..af556752c60 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/id_networkwatcher.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2023-11-01/connectionmonitors/method_createorupdate.go index f2d252c628d..069036d65fe 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/method_get.go b/resource-manager/network/2023-11-01/connectionmonitors/method_get.go index 883ffbdfd40..8087a322df3 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/method_get.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorI var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/method_list.go b/resource-manager/network/2023-11-01/connectionmonitors/method_list.go index 40de4efcac7..46eea3af26b 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/method_list.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/method_list.go @@ -46,7 +46,6 @@ func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) var model ConnectionMonitorListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2023-11-01/connectionmonitors/method_updatetags.go index 04091a0b16c..e6e1f8be8d1 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/method_updatetags.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/method_updatetags.go @@ -49,7 +49,6 @@ func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionM var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/connectionmonitors/version.go b/resource-manager/network/2023-11-01/connectionmonitors/version.go index 3ea1ebdcccb..017a7248272 100644 --- a/resource-manager/network/2023-11-01/connectionmonitors/version.go +++ b/resource-manager/network/2023-11-01/connectionmonitors/version.go @@ -1,12 +1,10 @@ package connectionmonitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectionmonitors/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/README.md b/resource-manager/network/2023-11-01/connectivityconfigurations/README.md index 85487e40647..ef0add9c950 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/README.md +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/connectivityconfigurations` Documentation -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `connectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/client.go b/resource-manager/network/2023-11-01/connectivityconfigurations/client.go index 7fb783f963a..8d908853770 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/client.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/client.go @@ -15,7 +15,7 @@ type ConnectivityConfigurationsClient struct { } func NewConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2023-11-01/connectivityconfigurations/id_connectivityconfiguration.go index d00d054bd40..c969a2cf413 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/id_connectivityconfiguration.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/id_connectivityconfiguration.go @@ -44,7 +44,7 @@ func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationI } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityC } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2023-11-01/connectivityconfigurations/id_networkmanager.go index 1f7b8c3216b..833ef39fdb4 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2023-11-01/connectivityconfigurations/method_createorupdate.go index 3ad8680898d..e8278cdba63 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2023-11-01/connectivityconfigurations/method_delete.go index 8646fac9ed8..a1c5884b210 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/method_delete.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/method_get.go b/resource-manager/network/2023-11-01/connectivityconfigurations/method_get.go index d8769033b0a..3471bd0faf1 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/method_get.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id Connectivi var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/method_list.go b/resource-manager/network/2023-11-01/connectivityconfigurations/method_list.go index 95ba68f0bc1..6663f9e80ae 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/method_list.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/connectivityconfigurations/version.go b/resource-manager/network/2023-11-01/connectivityconfigurations/version.go index 62ecf9513b1..ba474b9067d 100644 --- a/resource-manager/network/2023-11-01/connectivityconfigurations/version.go +++ b/resource-manager/network/2023-11-01/connectivityconfigurations/version.go @@ -1,12 +1,10 @@ package connectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectivityconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/customipprefixes/README.md b/resource-manager/network/2023-11-01/customipprefixes/README.md index cd0ecbad971..b11f4ed2841 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/README.md +++ b/resource-manager/network/2023-11-01/customipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/customipprefixes` Documentation -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `customipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/customipprefixes/client.go b/resource-manager/network/2023-11-01/customipprefixes/client.go index 1e1c6887c4a..2b241f7b0e7 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/client.go +++ b/resource-manager/network/2023-11-01/customipprefixes/client.go @@ -15,7 +15,7 @@ type CustomIPPrefixesClient struct { } func NewCustomIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2023-11-01/customipprefixes/id_customipprefix.go index d4206cbdfb5..5ea825eb6cd 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/id_customipprefix.go +++ b/resource-manager/network/2023-11-01/customipprefixes/id_customipprefix.go @@ -42,7 +42,7 @@ func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/customipprefixes/method_get.go b/resource-manager/network/2023-11-01/customipprefixes/method_get.go index 9215609651a..61164d79480 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/method_get.go +++ b/resource-manager/network/2023-11-01/customipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, op var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/customipprefixes/method_updatetags.go b/resource-manager/network/2023-11-01/customipprefixes/method_updatetags.go index c61802109c3..2962a005ed8 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/method_updatetags.go +++ b/resource-manager/network/2023-11-01/customipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefi var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/customipprefixes/version.go b/resource-manager/network/2023-11-01/customipprefixes/version.go index d8b18dff4cd..a23ca441147 100644 --- a/resource-manager/network/2023-11-01/customipprefixes/version.go +++ b/resource-manager/network/2023-11-01/customipprefixes/version.go @@ -1,12 +1,10 @@ package customipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customipprefixes/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/README.md b/resource-manager/network/2023-11-01/ddoscustompolicies/README.md index 37002c0710e..783027e0397 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/README.md +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ddoscustompolicies` Documentation -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `ddoscustompolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/client.go b/resource-manager/network/2023-11-01/ddoscustompolicies/client.go index e6985cefaee..93a9d3ac0d4 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/client.go +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/client.go @@ -15,7 +15,7 @@ type DdosCustomPoliciesClient struct { } func NewDdosCustomPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddoscustompolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddoscustompolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2023-11-01/ddoscustompolicies/id_ddoscustompolicy.go index 1898126aafc..5107ae00e4f 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/id_ddoscustompolicy.go +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/id_ddoscustompolicy.go @@ -42,7 +42,7 @@ func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, er } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/method_get.go b/resource-manager/network/2023-11-01/ddoscustompolicies/method_get.go index 07a8cdf6ad0..288dcc99b4a 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/method_get.go +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/method_get.go @@ -45,7 +45,6 @@ func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2023-11-01/ddoscustompolicies/method_updatetags.go index b64aa2cb519..1e74f849d0b 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/method_updatetags.go +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomP var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ddoscustompolicies/version.go b/resource-manager/network/2023-11-01/ddoscustompolicies/version.go index 9a348c9dac2..706cecc08df 100644 --- a/resource-manager/network/2023-11-01/ddoscustompolicies/version.go +++ b/resource-manager/network/2023-11-01/ddoscustompolicies/version.go @@ -1,12 +1,10 @@ package ddoscustompolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddoscustompolicies/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/README.md b/resource-manager/network/2023-11-01/ddosprotectionplans/README.md index 9af0eb86b63..9f7f59db26d 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/README.md +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ddosprotectionplans` Documentation -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `ddosprotectionplans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/client.go b/resource-manager/network/2023-11-01/ddosprotectionplans/client.go index de83f23ea42..e117bf49a8f 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/client.go +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/client.go @@ -15,7 +15,7 @@ type DdosProtectionPlansClient struct { } func NewDdosProtectionPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddosprotectionplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddosprotectionplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2023-11-01/ddosprotectionplans/id_ddosprotectionplan.go index 1be4cad64d9..962147e9da0 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/id_ddosprotectionplan.go +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/id_ddosprotectionplan.go @@ -42,7 +42,7 @@ func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/method_get.go b/resource-manager/network/2023-11-01/ddosprotectionplans/method_get.go index 9003f8a00c3..7a92875442e 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/method_get.go +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/method_get.go @@ -45,7 +45,6 @@ func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPla var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2023-11-01/ddosprotectionplans/method_updatetags.go index 07e469082e6..a5b91c81b71 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/method_updatetags.go +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtec var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ddosprotectionplans/version.go b/resource-manager/network/2023-11-01/ddosprotectionplans/version.go index dc1e04d4a4b..edb69fa969a 100644 --- a/resource-manager/network/2023-11-01/ddosprotectionplans/version.go +++ b/resource-manager/network/2023-11-01/ddosprotectionplans/version.go @@ -1,12 +1,10 @@ package ddosprotectionplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddosprotectionplans/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/dscpconfiguration/README.md b/resource-manager/network/2023-11-01/dscpconfiguration/README.md index 3f9eb004cb0..24efc420ffb 100644 --- a/resource-manager/network/2023-11-01/dscpconfiguration/README.md +++ b/resource-manager/network/2023-11-01/dscpconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/dscpconfiguration` Documentation -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `dscpconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/dscpconfiguration/client.go b/resource-manager/network/2023-11-01/dscpconfiguration/client.go index ed6cfe7aa08..76ab56d4977 100644 --- a/resource-manager/network/2023-11-01/dscpconfiguration/client.go +++ b/resource-manager/network/2023-11-01/dscpconfiguration/client.go @@ -15,7 +15,7 @@ type DscpConfigurationClient struct { } func NewDscpConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2023-11-01/dscpconfiguration/id_dscpconfiguration.go index 8eb56f33d98..f4b606b48f4 100644 --- a/resource-manager/network/2023-11-01/dscpconfiguration/id_dscpconfiguration.go +++ b/resource-manager/network/2023-11-01/dscpconfiguration/id_dscpconfiguration.go @@ -42,7 +42,7 @@ func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/dscpconfiguration/method_get.go b/resource-manager/network/2023-11-01/dscpconfiguration/method_get.go index 1563a9b978b..cb94f50eba5 100644 --- a/resource-manager/network/2023-11-01/dscpconfiguration/method_get.go +++ b/resource-manager/network/2023-11-01/dscpconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId var model DscpConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/dscpconfiguration/version.go b/resource-manager/network/2023-11-01/dscpconfiguration/version.go index 4ebfa641d8d..64f1b8056fd 100644 --- a/resource-manager/network/2023-11-01/dscpconfiguration/version.go +++ b/resource-manager/network/2023-11-01/dscpconfiguration/version.go @@ -1,12 +1,10 @@ package dscpconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfiguration/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/dscpconfigurations/README.md b/resource-manager/network/2023-11-01/dscpconfigurations/README.md index 396deb6d988..d8dd7bd8d7c 100644 --- a/resource-manager/network/2023-11-01/dscpconfigurations/README.md +++ b/resource-manager/network/2023-11-01/dscpconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/dscpconfigurations` Documentation -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `dscpconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/dscpconfigurations/client.go b/resource-manager/network/2023-11-01/dscpconfigurations/client.go index ef38b8d0533..f8740f737f6 100644 --- a/resource-manager/network/2023-11-01/dscpconfigurations/client.go +++ b/resource-manager/network/2023-11-01/dscpconfigurations/client.go @@ -15,7 +15,7 @@ type DscpConfigurationsClient struct { } func NewDscpConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/dscpconfigurations/version.go b/resource-manager/network/2023-11-01/dscpconfigurations/version.go index 0812d4daaf2..291ded8f891 100644 --- a/resource-manager/network/2023-11-01/dscpconfigurations/version.go +++ b/resource-manager/network/2023-11-01/dscpconfigurations/version.go @@ -1,12 +1,10 @@ package dscpconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/endpointservices/README.md b/resource-manager/network/2023-11-01/endpointservices/README.md index 29e4aff7f71..5f7fb1850d3 100644 --- a/resource-manager/network/2023-11-01/endpointservices/README.md +++ b/resource-manager/network/2023-11-01/endpointservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/endpointservices` Documentation -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `endpointservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/endpointservices/client.go b/resource-manager/network/2023-11-01/endpointservices/client.go index c04faa1ffd8..44e82b37c46 100644 --- a/resource-manager/network/2023-11-01/endpointservices/client.go +++ b/resource-manager/network/2023-11-01/endpointservices/client.go @@ -15,7 +15,7 @@ type EndpointServicesClient struct { } func NewEndpointServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/endpointservices/id_location.go b/resource-manager/network/2023-11-01/endpointservices/id_location.go index b3f9df03861..bc549e11a00 100644 --- a/resource-manager/network/2023-11-01/endpointservices/id_location.go +++ b/resource-manager/network/2023-11-01/endpointservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/endpointservices/version.go b/resource-manager/network/2023-11-01/endpointservices/version.go index 2e19df5c828..590185eb2a4 100644 --- a/resource-manager/network/2023-11-01/endpointservices/version.go +++ b/resource-manager/network/2023-11-01/endpointservices/version.go @@ -1,12 +1,10 @@ package endpointservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointservices/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitarptable/README.md b/resource-manager/network/2023-11-01/expressroutecircuitarptable/README.md index da599e67a92..010bc25ea38 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitarptable` Documentation -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitarptable/client.go b/resource-manager/network/2023-11-01/expressroutecircuitarptable/client.go index a927b3e2a41..b13a5d9774e 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitarptable/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitArpTableClient struct { } func NewExpressRouteCircuitArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2023-11-01/expressroutecircuitarptable/id_arptable.go index c01410283c1..af630a9dd1a 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitarptable/id_arptable.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitarptable/id_arptable.go @@ -46,7 +46,7 @@ func ParseArpTableID(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitarptable/version.go b/resource-manager/network/2023-11-01/expressroutecircuitarptable/version.go index 75b40b5db37..560b7f65355 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitarptable/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitarptable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitarptable/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/README.md index 4446f8cbb8e..a686ad80181 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitauthorizations` Documentation -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/client.go index 8060a80be1e..2d3988ae8a8 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitAuthorizationsClient struct { } func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_authorization.go index b659c5a5b8c..430deb067c3 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_authorization.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go index a46fa52bf5d..b80003e486f 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/method_get.go index 19e783a8675..823c3b06cfc 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id Aut var model ExpressRouteCircuitAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/version.go index a7d64d7839e..6a23b660d10 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitauthorizations/version.go @@ -1,12 +1,10 @@ package expressroutecircuitauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitauthorizations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitconnections/README.md b/resource-manager/network/2023-11-01/expressroutecircuitconnections/README.md index 8b1ba4916f7..c8dbc5e8264 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitconnections/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitconnections` Documentation -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitconnections/client.go b/resource-manager/network/2023-11-01/expressroutecircuitconnections/client.go index 333eff0e189..6ce57a4cb92 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitconnections/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitConnectionsClient struct { } func NewExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2023-11-01/expressroutecircuitconnections/id_peeringconnection.go index 0e2e6d6c894..c789977d4fc 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitconnections/id_peeringconnection.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitconnections/id_peeringconnection.go @@ -46,7 +46,7 @@ func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2023-11-01/expressroutecircuitconnections/method_get.go index 0a4a18dd7cc..ca510dffdd4 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Peerin var model ExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitconnections/version.go b/resource-manager/network/2023-11-01/expressroutecircuitconnections/version.go index e15f8b6a71d..d14d3ebb8de 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitconnections/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package expressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/README.md index 21b1c97b344..d8629b11172 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitpeerings` Documentation -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/client.go index 63ac4daefad..ce7c06a4f7b 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitPeeringsClient struct { } func NewExpressRouteCircuitPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go index 51f74b9a362..71e57edae8c 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/method_get.go index 0937d0e96a9..217363c38a1 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/method_get.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids var model ExpressRouteCircuitPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/version.go index 52009464de0..e1a25aedb01 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitpeerings/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecircuitpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitpeerings/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/README.md index c277fb17bb1..1efdef6ee47 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitroutestable` Documentation -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitroutestable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/client.go index 925b7f29bae..64933522e0c 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableClient struct { } func NewExpressRouteCircuitRoutesTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/id_peeringroutetable.go index 895e343bf35..e2aeb69ec6d 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/id_peeringroutetable.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/version.go index eebea9ad8c3..6b442c304e9 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestable/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestable/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/README.md index c8b52c8d445..93240bc3cee 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary` Documentation -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitroutestablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/client.go index 5565926cb76..1964d42b872 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableSummaryClient struct { } func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go index 16c5b0c301a..23c30e2e03b 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go @@ -46,7 +46,7 @@ func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/version.go index 776f82a1b93..5d76832ab82 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitroutestablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/README.md b/resource-manager/network/2023-11-01/expressroutecircuits/README.md index f7efe107b4e..734cdbf1c49 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuits` Documentation -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuits` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/client.go b/resource-manager/network/2023-11-01/expressroutecircuits/client.go index cd12ab163e6..e618de82828 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuits/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitsClient struct { } func NewExpressRouteCircuitsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2023-11-01/expressroutecircuits/id_expressroutecircuit.go index d48e8e429e7..cd8d55cab28 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/id_expressroutecircuit.go +++ b/resource-manager/network/2023-11-01/expressroutecircuits/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/method_get.go b/resource-manager/network/2023-11-01/expressroutecircuits/method_get.go index 2047441e60b..f44a9d7ab3d 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecircuits/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCirc var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2023-11-01/expressroutecircuits/method_updatetags.go index 8426eb683b2..2188a40d783 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/method_updatetags.go +++ b/resource-manager/network/2023-11-01/expressroutecircuits/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRo var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuits/version.go b/resource-manager/network/2023-11-01/expressroutecircuits/version.go index 8293ecde4f6..54e0b1e57e6 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuits/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuits/version.go @@ -1,12 +1,10 @@ package expressroutecircuits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuits/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/README.md b/resource-manager/network/2023-11-01/expressroutecircuitstats/README.md index 19e9815334a..f990aee600e 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/README.md +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecircuitstats` Documentation -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecircuitstats` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/client.go b/resource-manager/network/2023-11-01/expressroutecircuitstats/client.go index 43a397e1cc1..697e4ff2817 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/client.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitStatsClient struct { } func NewExpressRouteCircuitStatsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2023-11-01/expressroutecircuitstats/id_expressroutecircuit.go index cf235dfe96f..82dec662360 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/id_expressroutecircuit.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go index 5473e8458e6..14b01a4f877 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go @@ -47,7 +47,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go index 4bd3c09b58e..093f31815f0 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecircuitstats/version.go b/resource-manager/network/2023-11-01/expressroutecircuitstats/version.go index 3b7fa6960a8..cf7a49d347a 100644 --- a/resource-manager/network/2023-11-01/expressroutecircuitstats/version.go +++ b/resource-manager/network/2023-11-01/expressroutecircuitstats/version.go @@ -1,12 +1,10 @@ package expressroutecircuitstats -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitstats/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/README.md b/resource-manager/network/2023-11-01/expressrouteconnections/README.md index 973bd55fede..05f5c210162 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/README.md +++ b/resource-manager/network/2023-11-01/expressrouteconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteconnections` Documentation -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/client.go b/resource-manager/network/2023-11-01/expressrouteconnections/client.go index 59b056f90da..379d1d22880 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/client.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteConnectionsClient struct { } func NewExpressRouteConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2023-11-01/expressrouteconnections/id_expressrouteconnection.go index 7bba12f409b..53f6b3e5750 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/id_expressrouteconnection.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/id_expressrouteconnection.go @@ -44,7 +44,7 @@ func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, err } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConn } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2023-11-01/expressrouteconnections/id_expressroutegateway.go index 6df37b9a7d8..c5fcbe2791f 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/id_expressroutegateway.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/method_get.go b/resource-manager/network/2023-11-01/expressrouteconnections/method_get.go index ae0992fa45d..0116eaca5cf 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/method_get.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteC var model ExpressRouteConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/method_list.go b/resource-manager/network/2023-11-01/expressrouteconnections/method_list.go index e9090e1dd56..d6233e938c4 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/method_list.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/method_list.go @@ -46,7 +46,6 @@ func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRoute var model ExpressRouteConnectionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteconnections/version.go b/resource-manager/network/2023-11-01/expressrouteconnections/version.go index 12280cb6f2b..4059fb601ed 100644 --- a/resource-manager/network/2023-11-01/expressrouteconnections/version.go +++ b/resource-manager/network/2023-11-01/expressrouteconnections/version.go @@ -1,12 +1,10 @@ package expressrouteconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/README.md index 32518235978..84b9e10d04f 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable` Documentation -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecrossconnectionarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/client.go index 07328f2f394..57ec192ecdb 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/client.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionArpTableClient struct { } func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go index a90eea8a4cb..7f32dee4270 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go @@ -46,7 +46,7 @@ func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, erro } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/version.go index 455b31f5bc3..901342a916c 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/version.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionarptable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/README.md index 9ff762b5742..08e6435bd47 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/README.md +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings` Documentation -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecrossconnectionpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/client.go index 90cbc899dcb..d2b06fe732d 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/client.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionPeeringsClient struct { } func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go index 626b69cff73..2099c7eab97 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_peering.go index f9e45b10c99..5b91cc2c7b0 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_peering.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/id_peering.go @@ -44,7 +44,7 @@ func ParsePeeringID(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/method_get.go index b53171627d6..4fbd73485bb 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id P var model ExpressRouteCrossConnectionPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/version.go index 8dc794bbd10..36b0b29e07c 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/version.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/README.md index ce896e47edd..3da81c6e856 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable` Documentation -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecrossconnectionroutetable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/client.go index 210d81d68a9..6b8b935dba0 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/client.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableClient struct { } func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go index 9a8910626cd..6067ee919b6 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go @@ -46,7 +46,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*Express } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input stri } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/version.go index 75c933a3225..fc08bb11bbb 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/version.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/README.md index 8b68daff17c..3b0f868177e 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary` Documentation -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/client.go index 5329fa515af..aaf83cd3840 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/client.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableSummaryClient struct { } func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go index ea69383cd3a..5dffd985897 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryI } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteT } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/version.go index 0bf163eae3d..d57384ba64d 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/version.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnectionroutetablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/README.md b/resource-manager/network/2023-11-01/expressroutecrossconnections/README.md index 31298cb1b3e..95948a78e24 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/README.md +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutecrossconnections` Documentation -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutecrossconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/client.go b/resource-manager/network/2023-11-01/expressroutecrossconnections/client.go index 67aa896c58d..5df85aad3d6 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/client.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionsClient struct { } func NewExpressRouteCrossConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2023-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go index 3748db0d3a2..8128cf4c67c 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2023-11-01/expressroutecrossconnections/method_get.go index 250556ca005..e68e3ddc46d 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressR var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2023-11-01/expressroutecrossconnections/method_updatetags.go index 0c627c7653a..e55953bde8f 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/method_updatetags.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id E var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutecrossconnections/version.go b/resource-manager/network/2023-11-01/expressroutecrossconnections/version.go index 2079790500c..0dea6676bac 100644 --- a/resource-manager/network/2023-11-01/expressroutecrossconnections/version.go +++ b/resource-manager/network/2023-11-01/expressroutecrossconnections/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/README.md b/resource-manager/network/2023-11-01/expressroutegateways/README.md index ba46c855955..96d18d78f20 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/README.md +++ b/resource-manager/network/2023-11-01/expressroutegateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutegateways` Documentation -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutegateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutegateways/client.go b/resource-manager/network/2023-11-01/expressroutegateways/client.go index a1f21a852ef..292ef72ff7b 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/client.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/client.go @@ -15,7 +15,7 @@ type ExpressRouteGatewaysClient struct { } func NewExpressRouteGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutegateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutegateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2023-11-01/expressroutegateways/id_expressroutegateway.go index 0e06d43d298..6c356e20fd4 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/id_expressroutegateway.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/method_get.go b/resource-manager/network/2023-11-01/expressroutegateways/method_get.go index 74f38c464bb..3fe9ab488d0 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGate var model ExpressRouteGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2023-11-01/expressroutegateways/method_listbyresourcegroup.go index 4676a67757a..f76de802a39 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/method_listbyresourcegroup.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2023-11-01/expressroutegateways/method_listbysubscription.go index ba74ca537ae..840cb62145e 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/method_listbysubscription.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id c var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutegateways/version.go b/resource-manager/network/2023-11-01/expressroutegateways/version.go index 801aede386b..fbf5dd2fe2c 100644 --- a/resource-manager/network/2023-11-01/expressroutegateways/version.go +++ b/resource-manager/network/2023-11-01/expressroutegateways/version.go @@ -1,12 +1,10 @@ package expressroutegateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutegateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressroutelinks/README.md b/resource-manager/network/2023-11-01/expressroutelinks/README.md index 163e5945358..8e7024fce8c 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/README.md +++ b/resource-manager/network/2023-11-01/expressroutelinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressroutelinks` Documentation -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressroutelinks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressroutelinks/client.go b/resource-manager/network/2023-11-01/expressroutelinks/client.go index 42ba283bf4a..5b75ccca68f 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/client.go +++ b/resource-manager/network/2023-11-01/expressroutelinks/client.go @@ -15,7 +15,7 @@ type ExpressRouteLinksClient struct { } func NewExpressRouteLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutelinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutelinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2023-11-01/expressroutelinks/id_expressrouteport.go index fdf651cde65..e0aa12c1e5e 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/id_expressrouteport.go +++ b/resource-manager/network/2023-11-01/expressroutelinks/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutelinks/id_link.go b/resource-manager/network/2023-11-01/expressroutelinks/id_link.go index ff86b5a2798..b90097eb095 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/id_link.go +++ b/resource-manager/network/2023-11-01/expressroutelinks/id_link.go @@ -44,7 +44,7 @@ func ParseLinkID(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkIDInsensitively(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressroutelinks/method_get.go b/resource-manager/network/2023-11-01/expressroutelinks/method_get.go index 25857a7f294..3f132947b99 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/method_get.go +++ b/resource-manager/network/2023-11-01/expressroutelinks/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result Get var model ExpressRouteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressroutelinks/version.go b/resource-manager/network/2023-11-01/expressroutelinks/version.go index 41fc5c14777..68fe0163e3e 100644 --- a/resource-manager/network/2023-11-01/expressroutelinks/version.go +++ b/resource-manager/network/2023-11-01/expressroutelinks/version.go @@ -1,12 +1,10 @@ package expressroutelinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutelinks/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/README.md b/resource-manager/network/2023-11-01/expressrouteportauthorizations/README.md index fc86fc64408..d3abf3ba28d 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/README.md +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteportauthorizations` Documentation -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteportauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/client.go b/resource-manager/network/2023-11-01/expressrouteportauthorizations/client.go index a6a1e906e85..3405a1acb86 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/client.go +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortAuthorizationsClient struct { } func NewExpressRoutePortAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteport.go index 9fffd1964c0..0c4d2182b84 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteport.go +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go index 4042eea1718..ae293d47f93 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go @@ -44,7 +44,7 @@ func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthor } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRo } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2023-11-01/expressrouteportauthorizations/method_get.go index 0dd81644eba..c8df23b8dfd 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/method_get.go +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id Expres var model ExpressRoutePortAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteportauthorizations/version.go b/resource-manager/network/2023-11-01/expressrouteportauthorizations/version.go index 3f5f5b9a9b1..1bf60f25da3 100644 --- a/resource-manager/network/2023-11-01/expressrouteportauthorizations/version.go +++ b/resource-manager/network/2023-11-01/expressrouteportauthorizations/version.go @@ -1,12 +1,10 @@ package expressrouteportauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportauthorizations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteports/README.md b/resource-manager/network/2023-11-01/expressrouteports/README.md index a786b983d08..ad1dbabca0a 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/README.md +++ b/resource-manager/network/2023-11-01/expressrouteports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteports` Documentation -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteports/client.go b/resource-manager/network/2023-11-01/expressrouteports/client.go index 7b73cfca2af..82e57d5b54f 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/client.go +++ b/resource-manager/network/2023-11-01/expressrouteports/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsClient struct { } func NewExpressRoutePortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2023-11-01/expressrouteports/id_expressrouteport.go index 6ac3a3831e8..eb751415586 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/id_expressrouteport.go +++ b/resource-manager/network/2023-11-01/expressrouteports/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteports/method_generateloa.go b/resource-manager/network/2023-11-01/expressrouteports/method_generateloa.go index d0010451bf9..d5725e743a6 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/method_generateloa.go +++ b/resource-manager/network/2023-11-01/expressrouteports/method_generateloa.go @@ -50,7 +50,6 @@ func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRout var model GenerateExpressRoutePortsLOAResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteports/method_get.go b/resource-manager/network/2023-11-01/expressrouteports/method_get.go index 0f35b842ad6..dda9cada850 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/method_get.go +++ b/resource-manager/network/2023-11-01/expressrouteports/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteports/method_updatetags.go b/resource-manager/network/2023-11-01/expressrouteports/method_updatetags.go index fef0242df71..7ce98b9327b 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/method_updatetags.go +++ b/resource-manager/network/2023-11-01/expressrouteports/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoute var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteports/version.go b/resource-manager/network/2023-11-01/expressrouteports/version.go index 05d35e0060d..a4ed747b8bf 100644 --- a/resource-manager/network/2023-11-01/expressrouteports/version.go +++ b/resource-manager/network/2023-11-01/expressrouteports/version.go @@ -1,12 +1,10 @@ package expressrouteports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteports/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteportslocations/README.md b/resource-manager/network/2023-11-01/expressrouteportslocations/README.md index d4c9792d5a8..63d3b79d091 100644 --- a/resource-manager/network/2023-11-01/expressrouteportslocations/README.md +++ b/resource-manager/network/2023-11-01/expressrouteportslocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteportslocations` Documentation -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteportslocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteportslocations/client.go b/resource-manager/network/2023-11-01/expressrouteportslocations/client.go index 070961a7825..11ea98b6cb3 100644 --- a/resource-manager/network/2023-11-01/expressrouteportslocations/client.go +++ b/resource-manager/network/2023-11-01/expressrouteportslocations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsLocationsClient struct { } func NewExpressRoutePortsLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportslocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportslocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2023-11-01/expressrouteportslocations/id_expressrouteportslocation.go index 94e09ce7a77..2c3e6ea91b2 100644 --- a/resource-manager/network/2023-11-01/expressrouteportslocations/id_expressrouteportslocation.go +++ b/resource-manager/network/2023-11-01/expressrouteportslocations/id_expressrouteportslocation.go @@ -40,7 +40,7 @@ func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationI } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRouteP } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteportslocations/method_get.go b/resource-manager/network/2023-11-01/expressrouteportslocations/method_get.go index 58048a2240a..41422952079 100644 --- a/resource-manager/network/2023-11-01/expressrouteportslocations/method_get.go +++ b/resource-manager/network/2023-11-01/expressrouteportslocations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRou var model ExpressRoutePortsLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteportslocations/version.go b/resource-manager/network/2023-11-01/expressrouteportslocations/version.go index 7aef4850b25..bc904c8fb8e 100644 --- a/resource-manager/network/2023-11-01/expressrouteportslocations/version.go +++ b/resource-manager/network/2023-11-01/expressrouteportslocations/version.go @@ -1,12 +1,10 @@ package expressrouteportslocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportslocations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/README.md b/resource-manager/network/2023-11-01/expressrouteproviderports/README.md index cfa65a4aa10..a11a46e024f 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/README.md +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteproviderports` Documentation -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteproviderports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/client.go b/resource-manager/network/2023-11-01/expressrouteproviderports/client.go index 696d17bbfd6..dad656ec6d0 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/client.go +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/client.go @@ -15,7 +15,7 @@ type ExpressRouteProviderPortsClient struct { } func NewExpressRouteProviderPortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteproviderports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteproviderports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2023-11-01/expressrouteproviderports/id_expressrouteproviderport.go index 2e734bb82c3..b8d7c961646 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/id_expressrouteproviderport.go +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/id_expressrouteproviderport.go @@ -40,7 +40,7 @@ func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRoutePr } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2023-11-01/expressrouteproviderports/method_expressrouteproviderport.go index 95cb93096c7..c264bf3b8aa 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/method_expressrouteproviderport.go +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/method_expressrouteproviderport.go @@ -45,7 +45,6 @@ func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Co var model ExpressRouteProviderPort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2023-11-01/expressrouteproviderports/method_locationlist.go index ad8f2e59e37..93d35794cf0 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/method_locationlist.go +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/method_locationlist.go @@ -40,6 +40,7 @@ func (o LocationListOperationOptions) ToHeaders() *client.Headers { func (o LocationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/expressrouteproviderports/version.go b/resource-manager/network/2023-11-01/expressrouteproviderports/version.go index b9be3d116d5..598703ffe4f 100644 --- a/resource-manager/network/2023-11-01/expressrouteproviderports/version.go +++ b/resource-manager/network/2023-11-01/expressrouteproviderports/version.go @@ -1,12 +1,10 @@ package expressrouteproviderports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteproviderports/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/expressrouteserviceproviders/README.md b/resource-manager/network/2023-11-01/expressrouteserviceproviders/README.md index 9c47ffdcc97..d5360cbd62d 100644 --- a/resource-manager/network/2023-11-01/expressrouteserviceproviders/README.md +++ b/resource-manager/network/2023-11-01/expressrouteserviceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/expressrouteserviceproviders` Documentation -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `expressrouteserviceproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/expressrouteserviceproviders/client.go b/resource-manager/network/2023-11-01/expressrouteserviceproviders/client.go index d071b668e37..a20fad2a136 100644 --- a/resource-manager/network/2023-11-01/expressrouteserviceproviders/client.go +++ b/resource-manager/network/2023-11-01/expressrouteserviceproviders/client.go @@ -15,7 +15,7 @@ type ExpressRouteServiceProvidersClient struct { } func NewExpressRouteServiceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/expressrouteserviceproviders/version.go b/resource-manager/network/2023-11-01/expressrouteserviceproviders/version.go index ff1526ca8cd..b4db33f2c73 100644 --- a/resource-manager/network/2023-11-01/expressrouteserviceproviders/version.go +++ b/resource-manager/network/2023-11-01/expressrouteserviceproviders/version.go @@ -1,12 +1,10 @@ package expressrouteserviceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteserviceproviders/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/README.md b/resource-manager/network/2023-11-01/firewallpolicies/README.md index 1efe2a7af77..5bed9aec2ed 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/README.md +++ b/resource-manager/network/2023-11-01/firewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/firewallpolicies` Documentation -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `firewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/firewallpolicies/client.go b/resource-manager/network/2023-11-01/firewallpolicies/client.go index a162ae7a1c4..fba92b74070 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/client.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/client.go @@ -15,7 +15,7 @@ type FirewallPoliciesClient struct { } func NewFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2023-11-01/firewallpolicies/id_firewallpolicy.go index b3ab374101c..c441314efdf 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/id_firewallpolicy.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/id_rulecollectiongroup.go b/resource-manager/network/2023-11-01/firewallpolicies/id_rulecollectiongroup.go index 8e6983cfa1e..591654414d8 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/id_rulecollectiongroup.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go index 357da5c76f6..a355d78a767 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go @@ -51,7 +51,6 @@ func (c FirewallPoliciesClient) FirewallPolicyDraftsCreateOrUpdate(ctx context.C var model FirewallPolicyDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftsget.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftsget.go index 19de14230bb..804027dd952 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftsget.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicydraftsget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyDraftsGet(ctx context.Context, id var model FirewallPolicyDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go index e13bba542e4..afb4f37a3fa 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx var model SignatureOverridesFilterValuesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go index 3317a5b3046..657d39e5a74 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Con var model QueryResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go index 0a494459f55..4ff22b6ea42 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go index 0fb145a6c0c..253dc4d8073 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx co var model SignaturesOverridesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go index 99eb2fc1d38..ebb6a03296b 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx c var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go index 2b131f1a401..51a0cf8dcc5 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go index 19def263e37..168eab6a2f2 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go @@ -51,7 +51,6 @@ func (c FirewallPoliciesClient) FirewallPolicyRuleCollectionGroupDraftsCreateOrU var model FirewallPolicyRuleCollectionGroupDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go index 46a0e076225..8d2027a6a40 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyRuleCollectionGroupDraftsGet(ctx c var model FirewallPolicyRuleCollectionGroupDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_get.go b/resource-manager/network/2023-11-01/firewallpolicies/method_get.go index 2eee26d038a..c57af3124f0 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_get.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, op var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2023-11-01/firewallpolicies/method_updatetags.go index 05b103ecce7..66cfb5cb6d4 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/method_updatetags.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolic var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_applicationrule.go b/resource-manager/network/2023-11-01/firewallpolicies/model_applicationrule.go index 29202064c8a..f7d2f0c3f47 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_applicationrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_applicationrule.go @@ -23,8 +23,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -38,9 +48,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go index 53b5f41f1d3..0379a0ff5e5 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicynatrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicynatrulecollection.go index 71ddc01e8c2..4a6e1344bb4 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrule.go b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrule.go index 057fc40d54f..385badd2b65 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollection.go index 69c3d27a2bb..2c0d838efc3 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go index 376fd8c32ec..a23a09eeeaa 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go @@ -39,7 +39,7 @@ func (s *FirewallPolicyRuleCollectionGroupDraftProperties) UnmarshalJSON(bytes [ output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupDraftProperties': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_natrule.go b/resource-manager/network/2023-11-01/firewallpolicies/model_natrule.go index 0c83394fd20..29ada8c31d1 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_natrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicies/model_networkrule.go b/resource-manager/network/2023-11-01/firewallpolicies/model_networkrule.go index 95108d1b710..aa890c1a8bb 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/model_networkrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicies/version.go b/resource-manager/network/2023-11-01/firewallpolicies/version.go index c170b6ebb8f..41bfaea15e4 100644 --- a/resource-manager/network/2023-11-01/firewallpolicies/version.go +++ b/resource-manager/network/2023-11-01/firewallpolicies/version.go @@ -1,12 +1,10 @@ package firewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicies/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/README.md index 6dd0738f134..c86e9be9099 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/README.md +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups` Documentation -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `firewallpolicyrulecollectiongroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/client.go index ef562ceb4a0..2c48ff99f6d 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/client.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/client.go @@ -15,7 +15,7 @@ type FirewallPolicyRuleCollectionGroupsClient struct { } func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go index 9a3d14e2193..d2fd507040f 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go index 5af7b6ffe79..d44dae3a1f1 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/method_get.go index 9c1602d7177..2f494c21970 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/method_get.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/method_get.go @@ -45,7 +45,6 @@ func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id Ru var model FirewallPolicyRuleCollectionGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go index 3e2815413ed..00f2de60a64 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go @@ -23,8 +23,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -38,9 +48,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go index 6e9762da492..dc9f5bf1ae5 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go index 114889c0540..3a831856445 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go index 5cd71ef998a..f96fbf78c6e 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go index 30f1b958dc8..95e10cb00f1 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go index e395e7aa41f..f06c3ac6b19 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go @@ -41,7 +41,7 @@ func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_natrule.go index 5354374d68c..2e80421cd23 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go index 7548f48a194..90231437759 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/version.go index 29a8e24418e..5a0c081ae4a 100644 --- a/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/version.go +++ b/resource-manager/network/2023-11-01/firewallpolicyrulecollectiongroups/version.go @@ -1,12 +1,10 @@ package firewallpolicyrulecollectiongroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/flowlogs/README.md b/resource-manager/network/2023-11-01/flowlogs/README.md index 8dfaa0365be..fa8fa9b570d 100644 --- a/resource-manager/network/2023-11-01/flowlogs/README.md +++ b/resource-manager/network/2023-11-01/flowlogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/flowlogs` Documentation -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `flowlogs` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/flowlogs/client.go b/resource-manager/network/2023-11-01/flowlogs/client.go index 9368055263b..6294aac5774 100644 --- a/resource-manager/network/2023-11-01/flowlogs/client.go +++ b/resource-manager/network/2023-11-01/flowlogs/client.go @@ -15,7 +15,7 @@ type FlowLogsClient struct { } func NewFlowLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flowlogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flowlogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/flowlogs/id_flowlog.go b/resource-manager/network/2023-11-01/flowlogs/id_flowlog.go index 65f0fddaf41..5a9f158bbac 100644 --- a/resource-manager/network/2023-11-01/flowlogs/id_flowlog.go +++ b/resource-manager/network/2023-11-01/flowlogs/id_flowlog.go @@ -44,7 +44,7 @@ func ParseFlowLogID(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2023-11-01/flowlogs/id_networkwatcher.go index 480aa5be344..63ae4829745 100644 --- a/resource-manager/network/2023-11-01/flowlogs/id_networkwatcher.go +++ b/resource-manager/network/2023-11-01/flowlogs/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/flowlogs/method_get.go b/resource-manager/network/2023-11-01/flowlogs/method_get.go index 91942eff6d3..8677d660354 100644 --- a/resource-manager/network/2023-11-01/flowlogs/method_get.go +++ b/resource-manager/network/2023-11-01/flowlogs/method_get.go @@ -45,7 +45,6 @@ func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperat var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/flowlogs/method_updatetags.go b/resource-manager/network/2023-11-01/flowlogs/method_updatetags.go index 7ef9682b564..1f7aec16871 100644 --- a/resource-manager/network/2023-11-01/flowlogs/method_updatetags.go +++ b/resource-manager/network/2023-11-01/flowlogs/method_updatetags.go @@ -49,7 +49,6 @@ func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input Tags var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/flowlogs/version.go b/resource-manager/network/2023-11-01/flowlogs/version.go index 006db6d4a20..18b431977a5 100644 --- a/resource-manager/network/2023-11-01/flowlogs/version.go +++ b/resource-manager/network/2023-11-01/flowlogs/version.go @@ -1,12 +1,10 @@ package flowlogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flowlogs/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/ipallocations/README.md b/resource-manager/network/2023-11-01/ipallocations/README.md index 34b7eb548af..51d4a786a78 100644 --- a/resource-manager/network/2023-11-01/ipallocations/README.md +++ b/resource-manager/network/2023-11-01/ipallocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ipallocations` Documentation -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `ipallocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/ipallocations/client.go b/resource-manager/network/2023-11-01/ipallocations/client.go index 0450bb3a685..05538bf07b7 100644 --- a/resource-manager/network/2023-11-01/ipallocations/client.go +++ b/resource-manager/network/2023-11-01/ipallocations/client.go @@ -15,7 +15,7 @@ type IPAllocationsClient struct { } func NewIPAllocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipallocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipallocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/ipallocations/id_ipallocation.go b/resource-manager/network/2023-11-01/ipallocations/id_ipallocation.go index 1f45e0c491f..1d83039e65c 100644 --- a/resource-manager/network/2023-11-01/ipallocations/id_ipallocation.go +++ b/resource-manager/network/2023-11-01/ipallocations/id_ipallocation.go @@ -42,7 +42,7 @@ func ParseIPAllocationID(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/ipallocations/method_get.go b/resource-manager/network/2023-11-01/ipallocations/method_get.go index ad7247cf495..d7ccc3afb37 100644 --- a/resource-manager/network/2023-11-01/ipallocations/method_get.go +++ b/resource-manager/network/2023-11-01/ipallocations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ipallocations/method_updatetags.go b/resource-manager/network/2023-11-01/ipallocations/method_updatetags.go index 792fe909fcb..f6fe36ff651 100644 --- a/resource-manager/network/2023-11-01/ipallocations/method_updatetags.go +++ b/resource-manager/network/2023-11-01/ipallocations/method_updatetags.go @@ -49,7 +49,6 @@ func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ipallocations/version.go b/resource-manager/network/2023-11-01/ipallocations/version.go index cca291192b0..d25dcbc7ec5 100644 --- a/resource-manager/network/2023-11-01/ipallocations/version.go +++ b/resource-manager/network/2023-11-01/ipallocations/version.go @@ -1,12 +1,10 @@ package ipallocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipallocations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/ipgroups/README.md b/resource-manager/network/2023-11-01/ipgroups/README.md index 205b7498a4b..04e428bdf66 100644 --- a/resource-manager/network/2023-11-01/ipgroups/README.md +++ b/resource-manager/network/2023-11-01/ipgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/ipgroups` Documentation -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `ipgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/ipgroups/client.go b/resource-manager/network/2023-11-01/ipgroups/client.go index 3e21fe9f946..2e7f5ae8116 100644 --- a/resource-manager/network/2023-11-01/ipgroups/client.go +++ b/resource-manager/network/2023-11-01/ipgroups/client.go @@ -15,7 +15,7 @@ type IPGroupsClient struct { } func NewIPGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/ipgroups/id_ipgroup.go b/resource-manager/network/2023-11-01/ipgroups/id_ipgroup.go index 7b564788b08..2f64284a5bf 100644 --- a/resource-manager/network/2023-11-01/ipgroups/id_ipgroup.go +++ b/resource-manager/network/2023-11-01/ipgroups/id_ipgroup.go @@ -42,7 +42,7 @@ func ParseIPGroupID(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/ipgroups/method_get.go b/resource-manager/network/2023-11-01/ipgroups/method_get.go index b0d5717d963..8e06e373c58 100644 --- a/resource-manager/network/2023-11-01/ipgroups/method_get.go +++ b/resource-manager/network/2023-11-01/ipgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperat var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ipgroups/method_updategroups.go b/resource-manager/network/2023-11-01/ipgroups/method_updategroups.go index 67a51b18e05..bce76083d7a 100644 --- a/resource-manager/network/2023-11-01/ipgroups/method_updategroups.go +++ b/resource-manager/network/2023-11-01/ipgroups/method_updategroups.go @@ -49,7 +49,6 @@ func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input Ta var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/ipgroups/version.go b/resource-manager/network/2023-11-01/ipgroups/version.go index 1256d503b41..c2080311cc2 100644 --- a/resource-manager/network/2023-11-01/ipgroups/version.go +++ b/resource-manager/network/2023-11-01/ipgroups/version.go @@ -1,12 +1,10 @@ package ipgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipgroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/loadbalancers/README.md b/resource-manager/network/2023-11-01/loadbalancers/README.md index b8fe8c22ce9..80549ab60dd 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/README.md +++ b/resource-manager/network/2023-11-01/loadbalancers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/loadbalancers` Documentation -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `loadbalancers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/loadbalancers/client.go b/resource-manager/network/2023-11-01/loadbalancers/client.go index 3d84973a709..e0ea457759e 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/client.go +++ b/resource-manager/network/2023-11-01/loadbalancers/client.go @@ -15,7 +15,7 @@ type LoadBalancersClient struct { } func NewLoadBalancersClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loadbalancers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loadbalancers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2023-11-01/loadbalancers/id_backendaddresspool.go index 57be52cf337..6d0ee475d56 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_backendaddresspool.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_backendaddresspool.go @@ -44,7 +44,7 @@ func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2023-11-01/loadbalancers/id_frontendipconfiguration.go index dd3cba98217..470370f1a3e 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_frontendipconfiguration.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_frontendipconfiguration.go @@ -44,7 +44,7 @@ func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, e } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfi } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2023-11-01/loadbalancers/id_inboundnatrule.go index a460bece352..5a1995773d8 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_inboundnatrule.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_inboundnatrule.go @@ -44,7 +44,7 @@ func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancer.go index 35278257e30..abc43ca5b16 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancer.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancer.go @@ -42,7 +42,7 @@ func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go index d8fafa2347f..0e0b58e2743 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go @@ -44,7 +44,7 @@ func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAd } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBala } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancingrule.go index 31e911e38af..e938d9a646a 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancingrule.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_loadbalancingrule.go @@ -44,7 +44,7 @@ func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_location.go b/resource-manager/network/2023-11-01/loadbalancers/id_location.go index 4a38c5ea3e7..0789e1c81cc 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_location.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2023-11-01/loadbalancers/id_outboundrule.go index 89837637300..522e0f2f502 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_outboundrule.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_probe.go b/resource-manager/network/2023-11-01/loadbalancers/id_probe.go index 46ab09a65c9..7eb1da345a9 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_probe.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_probe.go @@ -44,7 +44,7 @@ func ParseProbeID(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProbeIDInsensitively(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/id_providerloadbalancer.go b/resource-manager/network/2023-11-01/loadbalancers/id_providerloadbalancer.go index 88ab98c83ad..8733dbbf7de 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/id_providerloadbalancer.go +++ b/resource-manager/network/2023-11-01/loadbalancers/id_providerloadbalancer.go @@ -42,7 +42,7 @@ func ParseProviderLoadBalancerID(input string) (*ProviderLoadBalancerId, error) } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLoadBalancerIDInsensitively(input string) (*ProviderLoadBalanc } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_get.go b/resource-manager/network/2023-11-01/loadbalancers/method_get.go index 2cf9ca241b7..50fdc569bc4 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_get.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) Get(ctx context.Context, id ProviderLoadBalancerId, var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2023-11-01/loadbalancers/method_inboundnatrulesget.go index 92acfa0220b..d925ef58b2c 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_inboundnatrulesget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_inboundnatrulesget.go @@ -34,6 +34,7 @@ func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundN var model InboundNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go index 96451e22451..7fef83148f3 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Cont var model BackendAddressPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go index eeb2cc8b0ed..6c16550699b 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context var model FrontendIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go index 265ec20a693..76a4fc9b62f 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Conte var model LoadBalancingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go index 5e221d46329..7d54de6e71d 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, i var model OutboundRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerprobesget.go index 2901255109e..d67e998c327 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerprobesget.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_loadbalancerprobesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id Probe var model Probe result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_migratetoipbased.go b/resource-manager/network/2023-11-01/loadbalancers/method_migratetoipbased.go index 249adebb4a8..6474ae09f76 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_migratetoipbased.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_migratetoipbased.go @@ -50,7 +50,6 @@ func (c LoadBalancersClient) MigrateToIPBased(ctx context.Context, id LoadBalanc var model MigratedPools result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/method_updatetags.go b/resource-manager/network/2023-11-01/loadbalancers/method_updatetags.go index dd8a4561326..d3fc584efb2 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/method_updatetags.go +++ b/resource-manager/network/2023-11-01/loadbalancers/method_updatetags.go @@ -49,7 +49,6 @@ func (c LoadBalancersClient) UpdateTags(ctx context.Context, id ProviderLoadBala var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/loadbalancers/version.go b/resource-manager/network/2023-11-01/loadbalancers/version.go index 1d95c935c8e..52931b4a027 100644 --- a/resource-manager/network/2023-11-01/loadbalancers/version.go +++ b/resource-manager/network/2023-11-01/loadbalancers/version.go @@ -1,12 +1,10 @@ package loadbalancers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loadbalancers/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/README.md b/resource-manager/network/2023-11-01/localnetworkgateways/README.md index bed3e60aac9..5f769ae7819 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/README.md +++ b/resource-manager/network/2023-11-01/localnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/localnetworkgateways` Documentation -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `localnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/client.go b/resource-manager/network/2023-11-01/localnetworkgateways/client.go index 90a3468c9f3..c821de0dcf3 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/client.go +++ b/resource-manager/network/2023-11-01/localnetworkgateways/client.go @@ -15,7 +15,7 @@ type LocalNetworkGatewaysClient struct { } func NewLocalNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2023-11-01/localnetworkgateways/id_localnetworkgateway.go index b3c0d3a0339..840400d05c6 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/id_localnetworkgateway.go +++ b/resource-manager/network/2023-11-01/localnetworkgateways/id_localnetworkgateway.go @@ -42,7 +42,7 @@ func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGateway } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/method_get.go b/resource-manager/network/2023-11-01/localnetworkgateways/method_get.go index 08da8072f93..678e40b0064 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/method_get.go +++ b/resource-manager/network/2023-11-01/localnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGate var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2023-11-01/localnetworkgateways/method_updatetags.go index c20950665de..cacff76aaeb 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/method_updatetags.go +++ b/resource-manager/network/2023-11-01/localnetworkgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetw var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/localnetworkgateways/version.go b/resource-manager/network/2023-11-01/localnetworkgateways/version.go index f1821de666a..2a6d227f767 100644 --- a/resource-manager/network/2023-11-01/localnetworkgateways/version.go +++ b/resource-manager/network/2023-11-01/localnetworkgateways/version.go @@ -1,12 +1,10 @@ package localnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localnetworkgateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/natgateways/README.md b/resource-manager/network/2023-11-01/natgateways/README.md index 1fed7e647ca..a60058d39fb 100644 --- a/resource-manager/network/2023-11-01/natgateways/README.md +++ b/resource-manager/network/2023-11-01/natgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/natgateways` Documentation -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `natgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/natgateways/client.go b/resource-manager/network/2023-11-01/natgateways/client.go index 10d7c1f9e5f..13334ca10a1 100644 --- a/resource-manager/network/2023-11-01/natgateways/client.go +++ b/resource-manager/network/2023-11-01/natgateways/client.go @@ -15,7 +15,7 @@ type NatGatewaysClient struct { } func NewNatGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "natgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "natgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/natgateways/id_natgateway.go b/resource-manager/network/2023-11-01/natgateways/id_natgateway.go index 95f33162e5e..23f06f4143e 100644 --- a/resource-manager/network/2023-11-01/natgateways/id_natgateway.go +++ b/resource-manager/network/2023-11-01/natgateways/id_natgateway.go @@ -42,7 +42,7 @@ func ParseNatGatewayID(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/natgateways/method_get.go b/resource-manager/network/2023-11-01/natgateways/method_get.go index 1360eae2873..3997df407c6 100644 --- a/resource-manager/network/2023-11-01/natgateways/method_get.go +++ b/resource-manager/network/2023-11-01/natgateways/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options Get var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/natgateways/method_updatetags.go b/resource-manager/network/2023-11-01/natgateways/method_updatetags.go index b5dbabece39..2480442d1cd 100644 --- a/resource-manager/network/2023-11-01/natgateways/method_updatetags.go +++ b/resource-manager/network/2023-11-01/natgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, inpu var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/natgateways/version.go b/resource-manager/network/2023-11-01/natgateways/version.go index f75b143874e..e81482d13fd 100644 --- a/resource-manager/network/2023-11-01/natgateways/version.go +++ b/resource-manager/network/2023-11-01/natgateways/version.go @@ -1,12 +1,10 @@ package natgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/natgateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkgroups/README.md b/resource-manager/network/2023-11-01/networkgroups/README.md index 6ba79ba2b29..1b970e04da3 100644 --- a/resource-manager/network/2023-11-01/networkgroups/README.md +++ b/resource-manager/network/2023-11-01/networkgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkgroups` Documentation -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkgroups/client.go b/resource-manager/network/2023-11-01/networkgroups/client.go index 3cfe1e1eebf..89171a64b6d 100644 --- a/resource-manager/network/2023-11-01/networkgroups/client.go +++ b/resource-manager/network/2023-11-01/networkgroups/client.go @@ -15,7 +15,7 @@ type NetworkGroupsClient struct { } func NewNetworkGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkgroups/id_networkgroup.go b/resource-manager/network/2023-11-01/networkgroups/id_networkgroup.go index e92b4d5d7c0..39885410108 100644 --- a/resource-manager/network/2023-11-01/networkgroups/id_networkgroup.go +++ b/resource-manager/network/2023-11-01/networkgroups/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkgroups/id_networkmanager.go b/resource-manager/network/2023-11-01/networkgroups/id_networkmanager.go index 58b8bb2d432..c3161f2cd00 100644 --- a/resource-manager/network/2023-11-01/networkgroups/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/networkgroups/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkgroups/method_createorupdate.go b/resource-manager/network/2023-11-01/networkgroups/method_createorupdate.go index 3ab74eeca37..89e0b5c2b0c 100644 --- a/resource-manager/network/2023-11-01/networkgroups/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/networkgroups/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroup var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkgroups/method_delete.go b/resource-manager/network/2023-11-01/networkgroups/method_delete.go index 452dbab57a9..45f93907f23 100644 --- a/resource-manager/network/2023-11-01/networkgroups/method_delete.go +++ b/resource-manager/network/2023-11-01/networkgroups/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkgroups/method_get.go b/resource-manager/network/2023-11-01/networkgroups/method_get.go index 554db15d016..503719a73d9 100644 --- a/resource-manager/network/2023-11-01/networkgroups/method_get.go +++ b/resource-manager/network/2023-11-01/networkgroups/method_get.go @@ -45,7 +45,6 @@ func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkgroups/method_list.go b/resource-manager/network/2023-11-01/networkgroups/method_list.go index cff4d8b0a7a..360af82528f 100644 --- a/resource-manager/network/2023-11-01/networkgroups/method_list.go +++ b/resource-manager/network/2023-11-01/networkgroups/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkgroups/version.go b/resource-manager/network/2023-11-01/networkgroups/version.go index 890386a2be6..fe283542274 100644 --- a/resource-manager/network/2023-11-01/networkgroups/version.go +++ b/resource-manager/network/2023-11-01/networkgroups/version.go @@ -1,12 +1,10 @@ package networkgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkgroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/README.md b/resource-manager/network/2023-11-01/networkinterfaces/README.md index 0347be3ae2f..b378fb7ec32 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/README.md +++ b/resource-manager/network/2023-11-01/networkinterfaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkinterfaces` Documentation -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkinterfaces` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkinterfaces/client.go b/resource-manager/network/2023-11-01/networkinterfaces/client.go index cd098aeccdf..1edd1a6838a 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/client.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/client.go @@ -15,7 +15,7 @@ type NetworkInterfacesClient struct { } func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkinterfaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2023-11-01/networkinterfaces/id_providercloudservice.go index e3a9af48f96..bc9bc8950a3 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_providercloudservice.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstance.go index 69a75e612e0..e90397ac3f3 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstance.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstance.go @@ -44,7 +44,7 @@ func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstancenetworkinterface.go index 4a96fd5d010..b34bf43f03c 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_roleinstancenetworkinterface.go @@ -46,7 +46,7 @@ func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInte } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstan } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2023-11-01/networkinterfaces/id_tapconfiguration.go index 0778222d9c9..597762fef0e 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_tapconfiguration.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_tapconfiguration.go @@ -44,7 +44,7 @@ func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, er } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachine.go index e2f2dde8684..6642a7839e6 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachine.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachinescaleset.go index e9a264c0a89..8f394f4ab5d 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachinescaleset.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_get.go b/resource-manager/network/2023-11-01/networkinterfaces/method_get.go index e1614af681d..5a73b976c2c 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_get.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkIn var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2023-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go index 7f7c58c444c..be2ca6e2e39 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go @@ -34,6 +34,7 @@ func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Hea func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Con var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go index 7a3d2b45272..88f82856ae8 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *c func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx co var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go index 1bef7a3da95..4bad16270ba 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() * func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx c var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2023-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go index a18bdaf08cf..8c1c944f6c8 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go @@ -40,6 +40,7 @@ func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go index 90e537d0982..7134fa1ab75 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go @@ -46,7 +46,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go index 868ecfb43d5..004d700dbcd 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go @@ -45,7 +45,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx contex var model NetworkInterfaceTapConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2023-11-01/networkinterfaces/method_updatetags.go index ca8e31de55a..4365d182729 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/method_updatetags.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/method_updatetags.go @@ -50,7 +50,6 @@ func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.Ne var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkinterfaces/version.go b/resource-manager/network/2023-11-01/networkinterfaces/version.go index c6b21b3d1c0..16d462edbd3 100644 --- a/resource-manager/network/2023-11-01/networkinterfaces/version.go +++ b/resource-manager/network/2023-11-01/networkinterfaces/version.go @@ -1,12 +1,10 @@ package networkinterfaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkinterfaces/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/README.md index 44e1ec29541..79f3e81cfe3 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/README.md +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanageractiveconfigurations` Documentation -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanageractiveconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/client.go index fd577e53f33..cc689379d3c 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/client.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConfigurationsClient struct { } func NewNetworkManagerActiveConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/id_networkmanager.go index ee0e5e5a9c8..c150737480a 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go index 0a882c8e731..a9250ed79d9 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(c var model ActiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go index c19193dfd82..4035af8f6cf 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ActiveBaseSecurityAdminRule interface { + ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl } -// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ActiveBaseSecurityAdminRule = BaseActiveBaseSecurityAdminRuleImpl{} + +type BaseActiveBaseSecurityAdminRuleImpl struct { + CommitTime *string `json:"commitTime,omitempty"` + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + Region *string `json:"region,omitempty"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s +} + +var _ ActiveBaseSecurityAdminRule = RawActiveBaseSecurityAdminRuleImpl{} + +// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + activeBaseSecurityAdminRule BaseActiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s.activeBaseSecurityAdminRule } -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { +func UnmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBas return out, nil } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseActiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawActiveBaseSecurityAdminRuleImpl{ + activeBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go index 371ee82ef8c..e708927c42d 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveDefaultSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go index 70266c6ff7c..18ae717f1d0 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go index c9007f5e0f3..aaef95bec26 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ActiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalActiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/version.go index f5bfcee6f74..70d5cea35a0 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/version.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/README.md index 82eeb8d011c..4d66ded03cb 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/README.md +++ b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations` Documentation -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/client.go index 25282a2bad5..68760af7c25 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/client.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConnectivityConfigurationsClient struct { } func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go index 4b1919fa120..135b3993f41 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go index a4c1e51550d..023b82524c0 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnecti var model ActiveConnectivityConfigurationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/version.go index 41c46b1a8b8..613c8e17ca8 100644 --- a/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/version.go +++ b/resource-manager/network/2023-11-01/networkmanageractiveconnectivityconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconnectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/README.md b/resource-manager/network/2023-11-01/networkmanagerconnections/README.md index fc17daa5dc4..879b71f8c95 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/README.md +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanagerconnections` Documentation -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanagerconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/client.go b/resource-manager/network/2023-11-01/networkmanagerconnections/client.go index 3cfa72a376e..809f42be879 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/client.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/client.go @@ -15,7 +15,7 @@ type NetworkManagerConnectionsClient struct { } func NewNetworkManagerConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagerconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagerconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2023-11-01/networkmanagerconnections/id_networkmanagerconnection.go index 066e316e2cb..d73f48f473a 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/id_networkmanagerconnection.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/id_networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManager } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2023-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go index 81d73abef15..4f196eba08a 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2Network } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Prov } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go index cddf4364027..116a8f3da7a 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go index 9e0447e4aea..c4f20220fbe 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go index 3e9eb347a20..d8b68e162ab 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders( func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go index 4447d41cf06..2d07c99634c 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCr var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go index 5f0b27a080c..4b89ca96feb 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGe var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go index ddf403e8a21..a08f8b1adfc 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() * func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkmanagerconnections/version.go b/resource-manager/network/2023-11-01/networkmanagerconnections/version.go index fc77e3e62ce..3c6374ebb17 100644 --- a/resource-manager/network/2023-11-01/networkmanagerconnections/version.go +++ b/resource-manager/network/2023-11-01/networkmanagerconnections/version.go @@ -1,12 +1,10 @@ package networkmanagerconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagerconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/README.md index 41400d3088e..5a04164f272 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration` Documentation -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/client.go index 2f234ee82ef..c6449e001fe 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveConnectivityConfigurationClient struct { } func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go index d752edf32eb..64233acc195 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManag var model NetworkManagerEffectiveConnectivityConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/version.go index 1d7fa73abde..e90fd22ef31 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectiveconnectivityconfiguration/version.go @@ -1,12 +1,10 @@ package networkmanagereffectiveconnectivityconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/README.md index e4c59e2c53c..d67ecfc4a1d 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/README.md +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules` Documentation -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/client.go index c83126c132c..5685e9afd82 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/client.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveSecurityAdminRulesClient struct { } func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go index a69d081c810..50c941d8756 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffec var model NetworkManagerEffectiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go index 9ef5715f8e4..2cb1228a910 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EffectiveBaseSecurityAdminRule interface { + EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl } -// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EffectiveBaseSecurityAdminRule = BaseEffectiveBaseSecurityAdminRuleImpl{} + +type BaseEffectiveBaseSecurityAdminRuleImpl struct { + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s +} + +var _ EffectiveBaseSecurityAdminRule = RawEffectiveBaseSecurityAdminRuleImpl{} + +// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + effectiveBaseSecurityAdminRule BaseEffectiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s.effectiveBaseSecurityAdminRule } -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { +func UnmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (Effect return out, nil } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseEffectiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEffectiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawEffectiveBaseSecurityAdminRuleImpl{ + effectiveBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go index 17d5e7fdeb7..89d5f651a9f 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveDefaultSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go index ae90f9154f9..8fcf50ed898 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveSecurityAdminRule{} func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go index 941c8a93ed6..7e1ac278430 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(byte output := make([]EffectiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalEffectiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/version.go index 2513c8fdf3e..70a1bd7d6c8 100644 --- a/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/version.go +++ b/resource-manager/network/2023-11-01/networkmanagereffectivesecurityadminrules/version.go @@ -1,12 +1,10 @@ package networkmanagereffectivesecurityadminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkmanagers/README.md b/resource-manager/network/2023-11-01/networkmanagers/README.md index c498f7f8f08..ece1ce1fb5f 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/README.md +++ b/resource-manager/network/2023-11-01/networkmanagers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkmanagers` Documentation -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkmanagers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkmanagers/client.go b/resource-manager/network/2023-11-01/networkmanagers/client.go index b27df28e126..64a4e799646 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/client.go +++ b/resource-manager/network/2023-11-01/networkmanagers/client.go @@ -15,7 +15,7 @@ type NetworkManagersClient struct { } func NewNetworkManagersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2023-11-01/networkmanagers/id_networkmanager.go index 63481203294..001e7f6c2a4 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/networkmanagers/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2023-11-01/networkmanagers/method_createorupdate.go index 5fb5c949cd6..cdce0892e43 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkMan var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_delete.go b/resource-manager/network/2023-11-01/networkmanagers/method_delete.go index 016216c8549..a9619efb0e2 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_delete.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_get.go b/resource-manager/network/2023-11-01/networkmanagers/method_get.go index c9f3acddeae..ed6b5d9ec82 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_get.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (re var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_list.go b/resource-manager/network/2023-11-01/networkmanagers/method_list.go index 86b71cf2d94..902c41d52b3 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_list.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2023-11-01/networkmanagers/method_listbysubscription.go index d45e89952b8..d1e8f2d72a3 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_listbysubscription.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2023-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go index f9a88725d0f..db1a1d144ac 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Co var model NetworkManagerDeploymentStatusListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagers/method_patch.go b/resource-manager/network/2023-11-01/networkmanagers/method_patch.go index e3810b6e4b4..4aae0d60709 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/method_patch.go +++ b/resource-manager/network/2023-11-01/networkmanagers/method_patch.go @@ -49,7 +49,6 @@ func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, i var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkmanagers/version.go b/resource-manager/network/2023-11-01/networkmanagers/version.go index 0c17120afb9..50a23912237 100644 --- a/resource-manager/network/2023-11-01/networkmanagers/version.go +++ b/resource-manager/network/2023-11-01/networkmanagers/version.go @@ -1,12 +1,10 @@ package networkmanagers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagers/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkprofiles/README.md b/resource-manager/network/2023-11-01/networkprofiles/README.md index 341b912bf06..47e86301a7e 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/README.md +++ b/resource-manager/network/2023-11-01/networkprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkprofiles` Documentation -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkprofiles` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkprofiles/client.go b/resource-manager/network/2023-11-01/networkprofiles/client.go index 17b4bf31068..33a4e0626aa 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/client.go +++ b/resource-manager/network/2023-11-01/networkprofiles/client.go @@ -15,7 +15,7 @@ type NetworkProfilesClient struct { } func NewNetworkProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2023-11-01/networkprofiles/id_networkprofile.go index b1bbf9c9343..6e0804b6679 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/id_networkprofile.go +++ b/resource-manager/network/2023-11-01/networkprofiles/id_networkprofile.go @@ -42,7 +42,7 @@ func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2023-11-01/networkprofiles/method_createorupdate.go index 94d3a856780..24ed5940195 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/networkprofiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkPro var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkprofiles/method_get.go b/resource-manager/network/2023-11-01/networkprofiles/method_get.go index 13f98955470..a0149c188f7 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/method_get.go +++ b/resource-manager/network/2023-11-01/networkprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, opt var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkprofiles/method_updatetags.go b/resource-manager/network/2023-11-01/networkprofiles/method_updatetags.go index f0bfb2f14f7..757952def30 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/method_updatetags.go +++ b/resource-manager/network/2023-11-01/networkprofiles/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfile var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkprofiles/version.go b/resource-manager/network/2023-11-01/networkprofiles/version.go index aac65a73d70..69bb459bdee 100644 --- a/resource-manager/network/2023-11-01/networkprofiles/version.go +++ b/resource-manager/network/2023-11-01/networkprofiles/version.go @@ -1,12 +1,10 @@ package networkprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkprofiles/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/README.md b/resource-manager/network/2023-11-01/networksecuritygroups/README.md index 8b2fe2c002f..c1bcb8ca7b6 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/README.md +++ b/resource-manager/network/2023-11-01/networksecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networksecuritygroups` Documentation -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networksecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/client.go b/resource-manager/network/2023-11-01/networksecuritygroups/client.go index a8d26110c7c..d490fa41c78 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/client.go +++ b/resource-manager/network/2023-11-01/networksecuritygroups/client.go @@ -15,7 +15,7 @@ type NetworkSecurityGroupsClient struct { } func NewNetworkSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2023-11-01/networksecuritygroups/id_networksecuritygroup.go index 4ab431d74a9..0dbb8c9fcd5 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/id_networksecuritygroup.go +++ b/resource-manager/network/2023-11-01/networksecuritygroups/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/method_get.go b/resource-manager/network/2023-11-01/networksecuritygroups/method_get.go index 6ebe50d00e5..7728917c0ec 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/method_get.go +++ b/resource-manager/network/2023-11-01/networksecuritygroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurity var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2023-11-01/networksecuritygroups/method_updatetags.go index 362cad00c7d..6f4b2cd3ce6 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/method_updatetags.go +++ b/resource-manager/network/2023-11-01/networksecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkS var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networksecuritygroups/version.go b/resource-manager/network/2023-11-01/networksecuritygroups/version.go index 86b34003221..de581c23f99 100644 --- a/resource-manager/network/2023-11-01/networksecuritygroups/version.go +++ b/resource-manager/network/2023-11-01/networksecuritygroups/version.go @@ -1,12 +1,10 @@ package networksecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecuritygroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/README.md b/resource-manager/network/2023-11-01/networkvirtualappliances/README.md index 0a44f1ce17c..6eedc8ee20f 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/README.md +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkvirtualappliances` Documentation -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkvirtualappliances` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/client.go b/resource-manager/network/2023-11-01/networkvirtualappliances/client.go index cfaeae574de..ab8d70fafa5 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/client.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/client.go @@ -15,7 +15,7 @@ type NetworkVirtualAppliancesClient struct { } func NewNetworkVirtualAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkvirtualappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkvirtualappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2023-11-01/networkvirtualappliances/id_inboundsecurityrule.go index d920466b92f..375fab1ff84 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/id_inboundsecurityrule.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/id_inboundsecurityrule.go @@ -44,7 +44,7 @@ func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRule } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2023-11-01/networkvirtualappliances/id_networkvirtualappliance.go index f222e101e79..db7766b52a7 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/method_get.go b/resource-manager/network/2023-11-01/networkvirtualappliances/method_get.go index 36076f68749..2310883a448 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/method_get.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtu var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2023-11-01/networkvirtualappliances/method_updatetags.go index 25a5f9e94c5..a8a8391f4a4 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/method_updatetags.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id Netwo var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkvirtualappliances/version.go b/resource-manager/network/2023-11-01/networkvirtualappliances/version.go index 65ef51ae847..a69c27b0d17 100644 --- a/resource-manager/network/2023-11-01/networkvirtualappliances/version.go +++ b/resource-manager/network/2023-11-01/networkvirtualappliances/version.go @@ -1,12 +1,10 @@ package networkvirtualappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkvirtualappliances/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/networkwatchers/README.md b/resource-manager/network/2023-11-01/networkwatchers/README.md index 27fcc011dc6..e94a890647b 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/README.md +++ b/resource-manager/network/2023-11-01/networkwatchers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/networkwatchers` Documentation -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `networkwatchers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/networkwatchers/client.go b/resource-manager/network/2023-11-01/networkwatchers/client.go index 2068ab14817..b544d19c206 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/client.go +++ b/resource-manager/network/2023-11-01/networkwatchers/client.go @@ -15,7 +15,7 @@ type NetworkWatchersClient struct { } func NewNetworkWatchersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkwatchers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkwatchers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2023-11-01/networkwatchers/id_networkwatcher.go index b8bb1f7f4a6..cd247fb8659 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/id_networkwatcher.go +++ b/resource-manager/network/2023-11-01/networkwatchers/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2023-11-01/networkwatchers/method_createorupdate.go index ecb006e2007..5881c4d5c10 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWat var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_get.go b/resource-manager/network/2023-11-01/networkwatchers/method_get.go index 000ae087b18..1c429aeb42d 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_get.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (re var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_gettopology.go b/resource-manager/network/2023-11-01/networkwatchers/method_gettopology.go index 8a1c6caef60..68afb0d8206 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_gettopology.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_gettopology.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatche var model Topology result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_list.go b/resource-manager/network/2023-11-01/networkwatchers/method_list.go index 8263c7b4f93..36d57f04fef 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_list.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_list.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGr var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_listall.go b/resource-manager/network/2023-11-01/networkwatchers/method_listall.go index 845a2449946..b8bd8d8d4a6 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_listall.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_listall.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.Subscri var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/method_updatetags.go b/resource-manager/network/2023-11-01/networkwatchers/method_updatetags.go index 1ace78e7dc5..0ad45fd1f1a 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/method_updatetags.go +++ b/resource-manager/network/2023-11-01/networkwatchers/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcher var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/networkwatchers/version.go b/resource-manager/network/2023-11-01/networkwatchers/version.go index 47118849999..24d0fce3ffe 100644 --- a/resource-manager/network/2023-11-01/networkwatchers/version.go +++ b/resource-manager/network/2023-11-01/networkwatchers/version.go @@ -1,12 +1,10 @@ package networkwatchers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkwatchers/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/p2svpngateways/README.md b/resource-manager/network/2023-11-01/p2svpngateways/README.md index 48f61b8188c..55852ba6bf2 100644 --- a/resource-manager/network/2023-11-01/p2svpngateways/README.md +++ b/resource-manager/network/2023-11-01/p2svpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/p2svpngateways` Documentation -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `p2svpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/p2svpngateways/client.go b/resource-manager/network/2023-11-01/p2svpngateways/client.go index 3d458041de0..b2a2ec08b88 100644 --- a/resource-manager/network/2023-11-01/p2svpngateways/client.go +++ b/resource-manager/network/2023-11-01/p2svpngateways/client.go @@ -15,7 +15,7 @@ type P2sVpnGatewaysClient struct { } func NewP2sVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "p2svpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "p2svpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/p2svpngateways/version.go b/resource-manager/network/2023-11-01/p2svpngateways/version.go index da9953e9996..fe9fc581b5e 100644 --- a/resource-manager/network/2023-11-01/p2svpngateways/version.go +++ b/resource-manager/network/2023-11-01/p2svpngateways/version.go @@ -1,12 +1,10 @@ package p2svpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/p2svpngateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/packetcaptures/README.md b/resource-manager/network/2023-11-01/packetcaptures/README.md index 5f50d46c9f5..c7e190cb468 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/README.md +++ b/resource-manager/network/2023-11-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/packetcaptures/client.go b/resource-manager/network/2023-11-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/client.go +++ b/resource-manager/network/2023-11-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2023-11-01/packetcaptures/id_networkwatcher.go index d9eafa5f099..a91b97fdd2d 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/id_networkwatcher.go +++ b/resource-manager/network/2023-11-01/packetcaptures/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2023-11-01/packetcaptures/id_packetcapture.go index 8b30ad1ebd6..ad0eee13f69 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/network/2023-11-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/packetcaptures/method_get.go b/resource-manager/network/2023-11-01/packetcaptures/method_get.go index 2226c032bea..9f32b393d10 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/method_get.go +++ b/resource-manager/network/2023-11-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCaptureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/packetcaptures/method_list.go b/resource-manager/network/2023-11-01/packetcaptures/method_list.go index 49bbc661b3c..08e6f424863 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/method_list.go +++ b/resource-manager/network/2023-11-01/packetcaptures/method_list.go @@ -46,7 +46,6 @@ func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (re var model PacketCaptureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/packetcaptures/version.go b/resource-manager/network/2023-11-01/packetcaptures/version.go index 969757768e0..149c536f1d4 100644 --- a/resource-manager/network/2023-11-01/packetcaptures/version.go +++ b/resource-manager/network/2023-11-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/README.md index bc13ae741d4..90ecaa2aab6 100644 --- a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/README.md +++ b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections` Documentation -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `peerexpressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/client.go index c0c578a280f..6f26d87afd5 100644 --- a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/client.go +++ b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type PeerExpressRouteCircuitConnectionsClient struct { } func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/id_peerconnection.go index 6bde16a10c5..3b236cf50cf 100644 --- a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/id_peerconnection.go @@ -46,7 +46,7 @@ func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/method_get.go index 844c3c67e07..554ac17ad6f 100644 --- a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Pe var model PeerExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/version.go index 55eda65ac21..20015a14731 100644 --- a/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/version.go +++ b/resource-manager/network/2023-11-01/peerexpressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package peerexpressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/README.md b/resource-manager/network/2023-11-01/privatednszonegroups/README.md index 13e156be9bb..b65dfccc883 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/README.md +++ b/resource-manager/network/2023-11-01/privatednszonegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/privatednszonegroups` Documentation -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `privatednszonegroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/client.go b/resource-manager/network/2023-11-01/privatednszonegroups/client.go index 99ce8b6667e..58e48fe8e2e 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/client.go +++ b/resource-manager/network/2023-11-01/privatednszonegroups/client.go @@ -15,7 +15,7 @@ type PrivateDnsZoneGroupsClient struct { } func NewPrivateDnsZoneGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatednszonegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatednszonegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2023-11-01/privatednszonegroups/id_privatednszonegroup.go index 9399f9157d3..fe0858951a1 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/id_privatednszonegroup.go +++ b/resource-manager/network/2023-11-01/privatednszonegroups/id_privatednszonegroup.go @@ -44,7 +44,7 @@ func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroup } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2023-11-01/privatednszonegroups/id_privateendpoint.go index a9f6cc5dff2..48424e8ccb0 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/id_privateendpoint.go +++ b/resource-manager/network/2023-11-01/privatednszonegroups/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/method_get.go b/resource-manager/network/2023-11-01/privatednszonegroups/method_get.go index 3c25fca99b7..b0a317bbf4d 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/method_get.go +++ b/resource-manager/network/2023-11-01/privatednszonegroups/method_get.go @@ -45,7 +45,6 @@ func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGr var model PrivateDnsZoneGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/privatednszonegroups/version.go b/resource-manager/network/2023-11-01/privatednszonegroups/version.go index 278a401ef28..6ddb0eb09e1 100644 --- a/resource-manager/network/2023-11-01/privatednszonegroups/version.go +++ b/resource-manager/network/2023-11-01/privatednszonegroups/version.go @@ -1,12 +1,10 @@ package privatednszonegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatednszonegroups/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/privateendpoints/README.md b/resource-manager/network/2023-11-01/privateendpoints/README.md index c7da88ef649..aad87ddeba6 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/README.md +++ b/resource-manager/network/2023-11-01/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/privateendpoints/client.go b/resource-manager/network/2023-11-01/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/client.go +++ b/resource-manager/network/2023-11-01/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/privateendpoints/id_location.go b/resource-manager/network/2023-11-01/privateendpoints/id_location.go index 54b43b4b1f2..60987a25fc6 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/id_location.go +++ b/resource-manager/network/2023-11-01/privateendpoints/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2023-11-01/privateendpoints/id_privateendpoint.go index a104325012e..4d39c6d7e38 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/id_privateendpoint.go +++ b/resource-manager/network/2023-11-01/privateendpoints/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2023-11-01/privateendpoints/id_providerlocation.go index a70739b937d..eaf3b344f24 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/id_providerlocation.go +++ b/resource-manager/network/2023-11-01/privateendpoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privateendpoints/method_get.go b/resource-manager/network/2023-11-01/privateendpoints/method_get.go index 80cad93eef6..559e0f436c5 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/method_get.go +++ b/resource-manager/network/2023-11-01/privateendpoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, o var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/privateendpoints/version.go b/resource-manager/network/2023-11-01/privateendpoints/version.go index d3a13cfb723..5181a4f2908 100644 --- a/resource-manager/network/2023-11-01/privateendpoints/version.go +++ b/resource-manager/network/2023-11-01/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/README.md b/resource-manager/network/2023-11-01/privatelinkservices/README.md index d8d18c0da8b..5058375efba 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/README.md +++ b/resource-manager/network/2023-11-01/privatelinkservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/privatelinkservices` Documentation -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `privatelinkservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/privatelinkservices/client.go b/resource-manager/network/2023-11-01/privatelinkservices/client.go index 5bd46867c3e..e097e552e3f 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/client.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/client.go @@ -15,7 +15,7 @@ type PrivateLinkServicesClient struct { } func NewPrivateLinkServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/id_location.go b/resource-manager/network/2023-11-01/privatelinkservices/id_location.go index 34e4ed80520..1b7d6fc81eb 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/id_location.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2023-11-01/privatelinkservices/id_privateendpointconnection.go index 3f98898492d..ed686302aed 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/id_privateendpointconnection.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2023-11-01/privatelinkservices/id_privatelinkservice.go index d88a974cca5..331d16ea3b2 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/id_privatelinkservice.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/id_privatelinkservice.go @@ -42,7 +42,7 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2023-11-01/privatelinkservices/id_providerlocation.go index c7433defeb6..2bb416453e6 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/id_providerlocation.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/method_get.go b/resource-manager/network/2023-11-01/privatelinkservices/method_get.go index 87bddc4d4aa..3be1df5bb53 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/method_get.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServic var model PrivateLinkService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2023-11-01/privatelinkservices/method_getprivateendpointconnection.go index 032d2076254..7690b7c62af 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/method_getprivateendpointconnection.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/method_getprivateendpointconnection.go @@ -34,6 +34,7 @@ func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Header func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Cont var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2023-11-01/privatelinkservices/method_updateprivateendpointconnection.go index 90a383fd3a1..b108db06f2a 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/method_updateprivateendpointconnection.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/method_updateprivateendpointconnection.go @@ -49,7 +49,6 @@ func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.C var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/privatelinkservices/version.go b/resource-manager/network/2023-11-01/privatelinkservices/version.go index ca67526be41..a06cf409f14 100644 --- a/resource-manager/network/2023-11-01/privatelinkservices/version.go +++ b/resource-manager/network/2023-11-01/privatelinkservices/version.go @@ -1,12 +1,10 @@ package privatelinkservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkservices/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/publicipaddresses/README.md b/resource-manager/network/2023-11-01/publicipaddresses/README.md index e6997f45550..f101e61188f 100644 --- a/resource-manager/network/2023-11-01/publicipaddresses/README.md +++ b/resource-manager/network/2023-11-01/publicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipaddresses` Documentation -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `publicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/publicipaddresses/client.go b/resource-manager/network/2023-11-01/publicipaddresses/client.go index 4c28c537385..54f2b0113c7 100644 --- a/resource-manager/network/2023-11-01/publicipaddresses/client.go +++ b/resource-manager/network/2023-11-01/publicipaddresses/client.go @@ -15,7 +15,7 @@ type PublicIPAddressesClient struct { } func NewPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/publicipaddresses/method_get.go b/resource-manager/network/2023-11-01/publicipaddresses/method_get.go index 7045aad8372..2548c9b4db6 100644 --- a/resource-manager/network/2023-11-01/publicipaddresses/method_get.go +++ b/resource-manager/network/2023-11-01/publicipaddresses/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPA var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2023-11-01/publicipaddresses/method_updatetags.go index 55be79fcfce..622a0a8c202 100644 --- a/resource-manager/network/2023-11-01/publicipaddresses/method_updatetags.go +++ b/resource-manager/network/2023-11-01/publicipaddresses/method_updatetags.go @@ -50,7 +50,6 @@ func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.Pu var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/publicipaddresses/version.go b/resource-manager/network/2023-11-01/publicipaddresses/version.go index 355312beb5b..52df067607a 100644 --- a/resource-manager/network/2023-11-01/publicipaddresses/version.go +++ b/resource-manager/network/2023-11-01/publicipaddresses/version.go @@ -1,12 +1,10 @@ package publicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipaddresses/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/publicipprefixes/README.md b/resource-manager/network/2023-11-01/publicipprefixes/README.md index a90506b0456..83d89a0a686 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/README.md +++ b/resource-manager/network/2023-11-01/publicipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/publicipprefixes` Documentation -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `publicipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/publicipprefixes/client.go b/resource-manager/network/2023-11-01/publicipprefixes/client.go index 7dfe8ac9af1..78db8973387 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/client.go +++ b/resource-manager/network/2023-11-01/publicipprefixes/client.go @@ -15,7 +15,7 @@ type PublicIPPrefixesClient struct { } func NewPublicIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2023-11-01/publicipprefixes/id_publicipprefix.go index 2fe61b6d66b..b985530d0a2 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/id_publicipprefix.go +++ b/resource-manager/network/2023-11-01/publicipprefixes/id_publicipprefix.go @@ -42,7 +42,7 @@ func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/publicipprefixes/method_get.go b/resource-manager/network/2023-11-01/publicipprefixes/method_get.go index 15104f80613..4d05c32931a 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/method_get.go +++ b/resource-manager/network/2023-11-01/publicipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, op var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2023-11-01/publicipprefixes/method_updatetags.go index e5257fc9717..3111479b00a 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/method_updatetags.go +++ b/resource-manager/network/2023-11-01/publicipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefi var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/publicipprefixes/version.go b/resource-manager/network/2023-11-01/publicipprefixes/version.go index bc5af520d2c..326b97b4960 100644 --- a/resource-manager/network/2023-11-01/publicipprefixes/version.go +++ b/resource-manager/network/2023-11-01/publicipprefixes/version.go @@ -1,12 +1,10 @@ package publicipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipprefixes/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/routefilterrules/README.md b/resource-manager/network/2023-11-01/routefilterrules/README.md index f5a0cc9da12..c0bf6e8c0a1 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/README.md +++ b/resource-manager/network/2023-11-01/routefilterrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/routefilterrules` Documentation -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `routefilterrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/routefilterrules/client.go b/resource-manager/network/2023-11-01/routefilterrules/client.go index 018917d75d9..87a6916e467 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/client.go +++ b/resource-manager/network/2023-11-01/routefilterrules/client.go @@ -15,7 +15,7 @@ type RouteFilterRulesClient struct { } func NewRouteFilterRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilterrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilterrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/routefilterrules/id_routefilter.go b/resource-manager/network/2023-11-01/routefilterrules/id_routefilter.go index fc7b97a96ea..eadf8a32c02 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/id_routefilter.go +++ b/resource-manager/network/2023-11-01/routefilterrules/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2023-11-01/routefilterrules/id_routefilterrule.go index ef13326b0c4..39bf905aaa7 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/id_routefilterrule.go +++ b/resource-manager/network/2023-11-01/routefilterrules/id_routefilterrule.go @@ -44,7 +44,7 @@ func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, erro } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routefilterrules/method_get.go b/resource-manager/network/2023-11-01/routefilterrules/method_get.go index c28ac994637..66ebdba141b 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/method_get.go +++ b/resource-manager/network/2023-11-01/routefilterrules/method_get.go @@ -45,7 +45,6 @@ func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) ( var model RouteFilterRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routefilterrules/version.go b/resource-manager/network/2023-11-01/routefilterrules/version.go index edc52cbc29d..af9896c7f07 100644 --- a/resource-manager/network/2023-11-01/routefilterrules/version.go +++ b/resource-manager/network/2023-11-01/routefilterrules/version.go @@ -1,12 +1,10 @@ package routefilterrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilterrules/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/routefilters/README.md b/resource-manager/network/2023-11-01/routefilters/README.md index ee63c6c6ee2..a34f33681ae 100644 --- a/resource-manager/network/2023-11-01/routefilters/README.md +++ b/resource-manager/network/2023-11-01/routefilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/routefilters` Documentation -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `routefilters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/routefilters/client.go b/resource-manager/network/2023-11-01/routefilters/client.go index e4faeb1d622..5bf2183b43d 100644 --- a/resource-manager/network/2023-11-01/routefilters/client.go +++ b/resource-manager/network/2023-11-01/routefilters/client.go @@ -15,7 +15,7 @@ type RouteFiltersClient struct { } func NewRouteFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/routefilters/id_routefilter.go b/resource-manager/network/2023-11-01/routefilters/id_routefilter.go index 18b55731fae..886fbf82cdd 100644 --- a/resource-manager/network/2023-11-01/routefilters/id_routefilter.go +++ b/resource-manager/network/2023-11-01/routefilters/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routefilters/method_get.go b/resource-manager/network/2023-11-01/routefilters/method_get.go index d44bd6d46b0..f57a061fb52 100644 --- a/resource-manager/network/2023-11-01/routefilters/method_get.go +++ b/resource-manager/network/2023-11-01/routefilters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options G var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routefilters/method_updatetags.go b/resource-manager/network/2023-11-01/routefilters/method_updatetags.go index 33bbd5301d9..5fe88949683 100644 --- a/resource-manager/network/2023-11-01/routefilters/method_updatetags.go +++ b/resource-manager/network/2023-11-01/routefilters/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, in var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routefilters/version.go b/resource-manager/network/2023-11-01/routefilters/version.go index a9b55c70849..7b396bc540e 100644 --- a/resource-manager/network/2023-11-01/routefilters/version.go +++ b/resource-manager/network/2023-11-01/routefilters/version.go @@ -1,12 +1,10 @@ package routefilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilters/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/routes/README.md b/resource-manager/network/2023-11-01/routes/README.md index b0f5eedb17b..5fc25ce8f60 100644 --- a/resource-manager/network/2023-11-01/routes/README.md +++ b/resource-manager/network/2023-11-01/routes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/routes` Documentation -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `routes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/routes/client.go b/resource-manager/network/2023-11-01/routes/client.go index 4372f694741..88e9f135cd1 100644 --- a/resource-manager/network/2023-11-01/routes/client.go +++ b/resource-manager/network/2023-11-01/routes/client.go @@ -15,7 +15,7 @@ type RoutesClient struct { } func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/routes/id_route.go b/resource-manager/network/2023-11-01/routes/id_route.go index c9e2c02ee1f..d306345db01 100644 --- a/resource-manager/network/2023-11-01/routes/id_route.go +++ b/resource-manager/network/2023-11-01/routes/id_route.go @@ -44,7 +44,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routes/id_routetable.go b/resource-manager/network/2023-11-01/routes/id_routetable.go index 459719bc26c..66672514db4 100644 --- a/resource-manager/network/2023-11-01/routes/id_routetable.go +++ b/resource-manager/network/2023-11-01/routes/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routes/method_get.go b/resource-manager/network/2023-11-01/routes/method_get.go index 8f641d28c5b..306c6528c39 100644 --- a/resource-manager/network/2023-11-01/routes/method_get.go +++ b/resource-manager/network/2023-11-01/routes/method_get.go @@ -45,7 +45,6 @@ func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationR var model Route result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routes/version.go b/resource-manager/network/2023-11-01/routes/version.go index c2f4d35fea1..b345e5186e5 100644 --- a/resource-manager/network/2023-11-01/routes/version.go +++ b/resource-manager/network/2023-11-01/routes/version.go @@ -1,12 +1,10 @@ package routes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routes/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/routetables/README.md b/resource-manager/network/2023-11-01/routetables/README.md index dc3a641ef4b..0985cbb5852 100644 --- a/resource-manager/network/2023-11-01/routetables/README.md +++ b/resource-manager/network/2023-11-01/routetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/routetables` Documentation -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `routetables` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/routetables/client.go b/resource-manager/network/2023-11-01/routetables/client.go index 26c9fb104ad..b52049cd5f7 100644 --- a/resource-manager/network/2023-11-01/routetables/client.go +++ b/resource-manager/network/2023-11-01/routetables/client.go @@ -15,7 +15,7 @@ type RouteTablesClient struct { } func NewRouteTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/routetables/id_routetable.go b/resource-manager/network/2023-11-01/routetables/id_routetable.go index 0f3c938daf7..0d24a6b252f 100644 --- a/resource-manager/network/2023-11-01/routetables/id_routetable.go +++ b/resource-manager/network/2023-11-01/routetables/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/routetables/method_get.go b/resource-manager/network/2023-11-01/routetables/method_get.go index cb19ef16deb..6a2409acbfb 100644 --- a/resource-manager/network/2023-11-01/routetables/method_get.go +++ b/resource-manager/network/2023-11-01/routetables/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options Get var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routetables/method_updatetags.go b/resource-manager/network/2023-11-01/routetables/method_updatetags.go index b2db87b8208..258335fc600 100644 --- a/resource-manager/network/2023-11-01/routetables/method_updatetags.go +++ b/resource-manager/network/2023-11-01/routetables/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, inpu var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/routetables/version.go b/resource-manager/network/2023-11-01/routetables/version.go index 0d160ec074d..bcbbea5d19b 100644 --- a/resource-manager/network/2023-11-01/routetables/version.go +++ b/resource-manager/network/2023-11-01/routetables/version.go @@ -1,12 +1,10 @@ package routetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routetables/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/scopeconnections/README.md b/resource-manager/network/2023-11-01/scopeconnections/README.md index 795b3997f96..a6803a26052 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/README.md +++ b/resource-manager/network/2023-11-01/scopeconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/scopeconnections` Documentation -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `scopeconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/scopeconnections/client.go b/resource-manager/network/2023-11-01/scopeconnections/client.go index aa7247e35c7..81942e9b5e9 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/client.go +++ b/resource-manager/network/2023-11-01/scopeconnections/client.go @@ -15,7 +15,7 @@ type ScopeConnectionsClient struct { } func NewScopeConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopeconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopeconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2023-11-01/scopeconnections/id_networkmanager.go index 259fe7f2afa..23c26353215 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/scopeconnections/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2023-11-01/scopeconnections/id_scopeconnection.go index dd1d78f3b94..07c786f0070 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/id_scopeconnection.go +++ b/resource-manager/network/2023-11-01/scopeconnections/id_scopeconnection.go @@ -44,7 +44,7 @@ func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, erro } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2023-11-01/scopeconnections/method_createorupdate.go index c0784b21bd5..08383ec6587 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/scopeconnections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConn var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/scopeconnections/method_get.go b/resource-manager/network/2023-11-01/scopeconnections/method_get.go index 97616b65ce8..67789a31c53 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/method_get.go +++ b/resource-manager/network/2023-11-01/scopeconnections/method_get.go @@ -45,7 +45,6 @@ func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) ( var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/scopeconnections/method_list.go b/resource-manager/network/2023-11-01/scopeconnections/method_list.go index c819623c65e..c9f73b61411 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/method_list.go +++ b/resource-manager/network/2023-11-01/scopeconnections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/scopeconnections/version.go b/resource-manager/network/2023-11-01/scopeconnections/version.go index a424fa20846..0d7f8f4c7f4 100644 --- a/resource-manager/network/2023-11-01/scopeconnections/version.go +++ b/resource-manager/network/2023-11-01/scopeconnections/version.go @@ -1,12 +1,10 @@ package scopeconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopeconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/README.md b/resource-manager/network/2023-11-01/securityadminconfigurations/README.md index 3d5c57cb86a..9f836dd9957 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/README.md +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/securityadminconfigurations` Documentation -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `securityadminconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/client.go b/resource-manager/network/2023-11-01/securityadminconfigurations/client.go index 7629a2dcefb..c4acda9a655 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/client.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/client.go @@ -15,7 +15,7 @@ type SecurityAdminConfigurationsClient struct { } func NewSecurityAdminConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityadminconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityadminconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2023-11-01/securityadminconfigurations/id_networkmanager.go index cc45635d1cc..4e824ae225e 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/id_networkmanager.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2023-11-01/securityadminconfigurations/id_securityadminconfiguration.go index c481f6a158b..1791024e094 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/id_securityadminconfiguration.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2023-11-01/securityadminconfigurations/method_createorupdate.go index e285ab5384c..2406a218954 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, i var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2023-11-01/securityadminconfigurations/method_delete.go index 82087f7a71c..98f2658625f 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/method_delete.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/method_get.go b/resource-manager/network/2023-11-01/securityadminconfigurations/method_get.go index 6046f27ef91..65a62286882 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/method_get.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityA var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/method_list.go b/resource-manager/network/2023-11-01/securityadminconfigurations/method_list.go index 8fc4c2c91dc..a4abe4c74d3 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/method_list.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/securityadminconfigurations/version.go b/resource-manager/network/2023-11-01/securityadminconfigurations/version.go index 2eea2ba61b0..6e069e589d3 100644 --- a/resource-manager/network/2023-11-01/securityadminconfigurations/version.go +++ b/resource-manager/network/2023-11-01/securityadminconfigurations/version.go @@ -1,12 +1,10 @@ package securityadminconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityadminconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/README.md b/resource-manager/network/2023-11-01/securitypartnerproviders/README.md index b5100f84ca1..047dfb8616d 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/README.md +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/securitypartnerproviders` Documentation -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `securitypartnerproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/client.go b/resource-manager/network/2023-11-01/securitypartnerproviders/client.go index e87ed7e5d0e..7752e07fcf3 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/client.go +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/client.go @@ -15,7 +15,7 @@ type SecurityPartnerProvidersClient struct { } func NewSecurityPartnerProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitypartnerproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitypartnerproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2023-11-01/securitypartnerproviders/id_securitypartnerprovider.go index 32dd3433d4a..af7579bfa45 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/id_securitypartnerprovider.go +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/id_securitypartnerprovider.go @@ -42,7 +42,7 @@ func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, e } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartner } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/method_get.go b/resource-manager/network/2023-11-01/securitypartnerproviders/method_get.go index ca56a913bc7..5b244206a3f 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/method_get.go +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/method_get.go @@ -45,7 +45,6 @@ func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPart var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2023-11-01/securitypartnerproviders/method_updatetags.go index 7cbef507221..dfd04e92e88 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/method_updatetags.go +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/method_updatetags.go @@ -49,7 +49,6 @@ func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id Secur var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securitypartnerproviders/version.go b/resource-manager/network/2023-11-01/securitypartnerproviders/version.go index b146cabadec..f39202b8b1b 100644 --- a/resource-manager/network/2023-11-01/securitypartnerproviders/version.go +++ b/resource-manager/network/2023-11-01/securitypartnerproviders/version.go @@ -1,12 +1,10 @@ package securitypartnerproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypartnerproviders/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/securityrules/README.md b/resource-manager/network/2023-11-01/securityrules/README.md index 14c7282f416..4348cea3742 100644 --- a/resource-manager/network/2023-11-01/securityrules/README.md +++ b/resource-manager/network/2023-11-01/securityrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/securityrules` Documentation -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `securityrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/securityrules/client.go b/resource-manager/network/2023-11-01/securityrules/client.go index 1fbf9b2c78c..fe76b456975 100644 --- a/resource-manager/network/2023-11-01/securityrules/client.go +++ b/resource-manager/network/2023-11-01/securityrules/client.go @@ -15,7 +15,7 @@ type SecurityRulesClient struct { } func NewSecurityRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2023-11-01/securityrules/id_defaultsecurityrule.go index a09823c4a35..8a42bf7697d 100644 --- a/resource-manager/network/2023-11-01/securityrules/id_defaultsecurityrule.go +++ b/resource-manager/network/2023-11-01/securityrules/id_defaultsecurityrule.go @@ -44,7 +44,7 @@ func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRule } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2023-11-01/securityrules/id_networksecuritygroup.go index 9b818e973d9..21d0af43abc 100644 --- a/resource-manager/network/2023-11-01/securityrules/id_networksecuritygroup.go +++ b/resource-manager/network/2023-11-01/securityrules/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securityrules/id_securityrule.go b/resource-manager/network/2023-11-01/securityrules/id_securityrule.go index da153b38f42..d87e04b0366 100644 --- a/resource-manager/network/2023-11-01/securityrules/id_securityrule.go +++ b/resource-manager/network/2023-11-01/securityrules/id_securityrule.go @@ -44,7 +44,7 @@ func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2023-11-01/securityrules/method_defaultsecurityrulesget.go index a672fd767b7..0d436a23706 100644 --- a/resource-manager/network/2023-11-01/securityrules/method_defaultsecurityrulesget.go +++ b/resource-manager/network/2023-11-01/securityrules/method_defaultsecurityrulesget.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id Def var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securityrules/method_get.go b/resource-manager/network/2023-11-01/securityrules/method_get.go index effcc9d3d7b..85ddb4310ff 100644 --- a/resource-manager/network/2023-11-01/securityrules/method_get.go +++ b/resource-manager/network/2023-11-01/securityrules/method_get.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/securityrules/version.go b/resource-manager/network/2023-11-01/securityrules/version.go index b5fa1aa3a32..eb8a34469b8 100644 --- a/resource-manager/network/2023-11-01/securityrules/version.go +++ b/resource-manager/network/2023-11-01/securityrules/version.go @@ -1,12 +1,10 @@ package securityrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityrules/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/README.md b/resource-manager/network/2023-11-01/serviceendpointpolicies/README.md index d0a65ce7548..c79c6e2ae41 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/README.md +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/serviceendpointpolicies` Documentation -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `serviceendpointpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/client.go b/resource-manager/network/2023-11-01/serviceendpointpolicies/client.go index d92547bd44b..4efc8d43b2a 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/client.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPoliciesClient struct { } func NewServiceEndpointPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2023-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go index 4b66cdb57fe..d922a583fba 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2023-11-01/serviceendpointpolicies/method_get.go index 8929b01c755..ce97f45af4d 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/method_get.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpoi var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2023-11-01/serviceendpointpolicies/method_updatetags.go index 92a472479ad..d260b347033 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/method_updatetags.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id Servic var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicies/version.go b/resource-manager/network/2023-11-01/serviceendpointpolicies/version.go index 19ed4f1b403..7ff17beff19 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicies/version.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicies/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicies/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/README.md index a3c2eaedd15..6569ae4d50d 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/README.md +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions` Documentation -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `serviceendpointpolicydefinitions` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/client.go index c75845bd1b5..0b0e9163605 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/client.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPolicyDefinitionsClient struct { } func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go index 2d85c659986..b3ccc083899 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go index edee1adbeda..abc9a0e9719 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go @@ -44,7 +44,7 @@ func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolic } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*Service } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/method_get.go index e9e63e50232..8aff5f74167 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/method_get.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id Serv var model ServiceEndpointPolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/version.go index f28b903be5a..4fad17904f5 100644 --- a/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/version.go +++ b/resource-manager/network/2023-11-01/serviceendpointpolicydefinitions/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicydefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/servicetags/README.md b/resource-manager/network/2023-11-01/servicetags/README.md index 898ce2e6050..192bf574166 100644 --- a/resource-manager/network/2023-11-01/servicetags/README.md +++ b/resource-manager/network/2023-11-01/servicetags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/servicetags` Documentation -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `servicetags` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/servicetags/client.go b/resource-manager/network/2023-11-01/servicetags/client.go index 7037716c1cf..33295761773 100644 --- a/resource-manager/network/2023-11-01/servicetags/client.go +++ b/resource-manager/network/2023-11-01/servicetags/client.go @@ -15,7 +15,7 @@ type ServiceTagsClient struct { } func NewServiceTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicetags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/servicetags/id_location.go b/resource-manager/network/2023-11-01/servicetags/id_location.go index b22b2cb34d7..a68389322f8 100644 --- a/resource-manager/network/2023-11-01/servicetags/id_location.go +++ b/resource-manager/network/2023-11-01/servicetags/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2023-11-01/servicetags/method_servicetaginformationlist.go index 7c6de375541..1150809dc2b 100644 --- a/resource-manager/network/2023-11-01/servicetags/method_servicetaginformationlist.go +++ b/resource-manager/network/2023-11-01/servicetags/method_servicetaginformationlist.go @@ -40,6 +40,7 @@ func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/servicetags/method_servicetagslist.go b/resource-manager/network/2023-11-01/servicetags/method_servicetagslist.go index f83c293d79b..a25ce187253 100644 --- a/resource-manager/network/2023-11-01/servicetags/method_servicetagslist.go +++ b/resource-manager/network/2023-11-01/servicetags/method_servicetagslist.go @@ -46,7 +46,6 @@ func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) ( var model ServiceTagsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/servicetags/version.go b/resource-manager/network/2023-11-01/servicetags/version.go index 55cddfd065e..bc7a69e798e 100644 --- a/resource-manager/network/2023-11-01/servicetags/version.go +++ b/resource-manager/network/2023-11-01/servicetags/version.go @@ -1,12 +1,10 @@ package servicetags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicetags/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/staticmembers/README.md b/resource-manager/network/2023-11-01/staticmembers/README.md index cc2c14809ea..7cb31bdcdd1 100644 --- a/resource-manager/network/2023-11-01/staticmembers/README.md +++ b/resource-manager/network/2023-11-01/staticmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/staticmembers` Documentation -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `staticmembers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/staticmembers/client.go b/resource-manager/network/2023-11-01/staticmembers/client.go index 0bd2daa81d6..9357db6d5f3 100644 --- a/resource-manager/network/2023-11-01/staticmembers/client.go +++ b/resource-manager/network/2023-11-01/staticmembers/client.go @@ -15,7 +15,7 @@ type StaticMembersClient struct { } func NewStaticMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/staticmembers/id_networkgroup.go b/resource-manager/network/2023-11-01/staticmembers/id_networkgroup.go index cbc610731ad..6138fabd8d9 100644 --- a/resource-manager/network/2023-11-01/staticmembers/id_networkgroup.go +++ b/resource-manager/network/2023-11-01/staticmembers/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/staticmembers/id_staticmember.go b/resource-manager/network/2023-11-01/staticmembers/id_staticmember.go index e972ef7ffc2..10350a8597a 100644 --- a/resource-manager/network/2023-11-01/staticmembers/id_staticmember.go +++ b/resource-manager/network/2023-11-01/staticmembers/id_staticmember.go @@ -46,7 +46,7 @@ func ParseStaticMemberID(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/staticmembers/method_createorupdate.go b/resource-manager/network/2023-11-01/staticmembers/method_createorupdate.go index 6921f0aedf3..f4ad175116b 100644 --- a/resource-manager/network/2023-11-01/staticmembers/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/staticmembers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMember var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/staticmembers/method_get.go b/resource-manager/network/2023-11-01/staticmembers/method_get.go index 11fc970af6a..8f9d30b17ab 100644 --- a/resource-manager/network/2023-11-01/staticmembers/method_get.go +++ b/resource-manager/network/2023-11-01/staticmembers/method_get.go @@ -45,7 +45,6 @@ func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/staticmembers/method_list.go b/resource-manager/network/2023-11-01/staticmembers/method_list.go index ac0788a5a34..ef104e6865f 100644 --- a/resource-manager/network/2023-11-01/staticmembers/method_list.go +++ b/resource-manager/network/2023-11-01/staticmembers/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/staticmembers/version.go b/resource-manager/network/2023-11-01/staticmembers/version.go index a9e0f4752be..4e136e775aa 100644 --- a/resource-manager/network/2023-11-01/staticmembers/version.go +++ b/resource-manager/network/2023-11-01/staticmembers/version.go @@ -1,12 +1,10 @@ package staticmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticmembers/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/subnets/README.md b/resource-manager/network/2023-11-01/subnets/README.md index 7e32b503cea..6469b68d2e2 100644 --- a/resource-manager/network/2023-11-01/subnets/README.md +++ b/resource-manager/network/2023-11-01/subnets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/subnets` Documentation -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `subnets` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/subnets/client.go b/resource-manager/network/2023-11-01/subnets/client.go index b1f947b47be..d3ece632ec6 100644 --- a/resource-manager/network/2023-11-01/subnets/client.go +++ b/resource-manager/network/2023-11-01/subnets/client.go @@ -15,7 +15,7 @@ type SubnetsClient struct { } func NewSubnetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subnets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subnets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/subnets/method_get.go b/resource-manager/network/2023-11-01/subnets/method_get.go index d77795ad632..9340f66305d 100644 --- a/resource-manager/network/2023-11-01/subnets/method_get.go +++ b/resource-manager/network/2023-11-01/subnets/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options G var model Subnet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/subnets/version.go b/resource-manager/network/2023-11-01/subnets/version.go index 33b5dc7fb8a..9aee27352b9 100644 --- a/resource-manager/network/2023-11-01/subnets/version.go +++ b/resource-manager/network/2023-11-01/subnets/version.go @@ -1,12 +1,10 @@ package subnets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subnets/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/trafficanalytics/README.md b/resource-manager/network/2023-11-01/trafficanalytics/README.md index 8bb79fc4b2c..7d297188ff0 100644 --- a/resource-manager/network/2023-11-01/trafficanalytics/README.md +++ b/resource-manager/network/2023-11-01/trafficanalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/trafficanalytics` Documentation -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `trafficanalytics` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/trafficanalytics/client.go b/resource-manager/network/2023-11-01/trafficanalytics/client.go index 78e1d6ab331..91c746485a3 100644 --- a/resource-manager/network/2023-11-01/trafficanalytics/client.go +++ b/resource-manager/network/2023-11-01/trafficanalytics/client.go @@ -15,7 +15,7 @@ type TrafficAnalyticsClient struct { } func NewTrafficAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficanalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficanalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2023-11-01/trafficanalytics/id_networkwatcher.go index f13408f03b5..17351381303 100644 --- a/resource-manager/network/2023-11-01/trafficanalytics/id_networkwatcher.go +++ b/resource-manager/network/2023-11-01/trafficanalytics/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/trafficanalytics/version.go b/resource-manager/network/2023-11-01/trafficanalytics/version.go index 270406057d8..ca09dc5d232 100644 --- a/resource-manager/network/2023-11-01/trafficanalytics/version.go +++ b/resource-manager/network/2023-11-01/trafficanalytics/version.go @@ -1,12 +1,10 @@ package trafficanalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficanalytics/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/usages/README.md b/resource-manager/network/2023-11-01/usages/README.md index 562f3bee5e9..d4aaf1b0abc 100644 --- a/resource-manager/network/2023-11-01/usages/README.md +++ b/resource-manager/network/2023-11-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/usages/client.go b/resource-manager/network/2023-11-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/network/2023-11-01/usages/client.go +++ b/resource-manager/network/2023-11-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/usages/id_location.go b/resource-manager/network/2023-11-01/usages/id_location.go index 6499c99bc79..8d1a811520a 100644 --- a/resource-manager/network/2023-11-01/usages/id_location.go +++ b/resource-manager/network/2023-11-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/usages/version.go b/resource-manager/network/2023-11-01/usages/version.go index 6715f1676b0..1f75d534194 100644 --- a/resource-manager/network/2023-11-01/usages/version.go +++ b/resource-manager/network/2023-11-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vipswap/README.md b/resource-manager/network/2023-11-01/vipswap/README.md index cccaf901249..e1d341debe6 100644 --- a/resource-manager/network/2023-11-01/vipswap/README.md +++ b/resource-manager/network/2023-11-01/vipswap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vipswap` Documentation -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `vipswap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/vipswap/client.go b/resource-manager/network/2023-11-01/vipswap/client.go index 2a7d8c2afe7..d573391540e 100644 --- a/resource-manager/network/2023-11-01/vipswap/client.go +++ b/resource-manager/network/2023-11-01/vipswap/client.go @@ -15,7 +15,7 @@ type VipSwapClient struct { } func NewVipSwapClientWithBaseURI(sdkApi sdkEnv.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vipswap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vipswap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vipswap/id_cloudservice.go b/resource-manager/network/2023-11-01/vipswap/id_cloudservice.go index 5801e90709d..9e7c3a0f112 100644 --- a/resource-manager/network/2023-11-01/vipswap/id_cloudservice.go +++ b/resource-manager/network/2023-11-01/vipswap/id_cloudservice.go @@ -42,7 +42,7 @@ func ParseCloudServiceID(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vipswap/method_get.go b/resource-manager/network/2023-11-01/vipswap/method_get.go index 2d61c8f37e0..598d2371676 100644 --- a/resource-manager/network/2023-11-01/vipswap/method_get.go +++ b/resource-manager/network/2023-11-01/vipswap/method_get.go @@ -46,7 +46,6 @@ func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOp var model SwapResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/vipswap/method_list.go b/resource-manager/network/2023-11-01/vipswap/method_list.go index 32407cc2c5c..35cd678f8c4 100644 --- a/resource-manager/network/2023-11-01/vipswap/method_list.go +++ b/resource-manager/network/2023-11-01/vipswap/method_list.go @@ -46,7 +46,6 @@ func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result List var model SwapResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/vipswap/version.go b/resource-manager/network/2023-11-01/vipswap/version.go index e7ec77ea960..e6db46609f4 100644 --- a/resource-manager/network/2023-11-01/vipswap/version.go +++ b/resource-manager/network/2023-11-01/vipswap/version.go @@ -1,12 +1,10 @@ package vipswap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vipswap/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/README.md b/resource-manager/network/2023-11-01/virtualappliancesites/README.md index 5bc1733befa..cb6bbb8c0c5 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/README.md +++ b/resource-manager/network/2023-11-01/virtualappliancesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualappliancesites` Documentation -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualappliancesites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/client.go b/resource-manager/network/2023-11-01/virtualappliancesites/client.go index 415b8e6e46b..e99ff0ccd1b 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/client.go +++ b/resource-manager/network/2023-11-01/virtualappliancesites/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSitesClient struct { } func NewVirtualApplianceSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualappliancesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualappliancesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2023-11-01/virtualappliancesites/id_networkvirtualappliance.go index d414a3c2d42..6689f6908a1 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-11-01/virtualappliancesites/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2023-11-01/virtualappliancesites/id_virtualappliancesite.go index a0500e43c74..be16c8f8b7e 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/id_virtualappliancesite.go +++ b/resource-manager/network/2023-11-01/virtualappliancesites/id_virtualappliancesite.go @@ -44,7 +44,7 @@ func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSi } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/method_get.go b/resource-manager/network/2023-11-01/virtualappliancesites/method_get.go index c78f7f1cf64..820f76d71d2 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/method_get.go +++ b/resource-manager/network/2023-11-01/virtualappliancesites/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianc var model VirtualApplianceSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualappliancesites/version.go b/resource-manager/network/2023-11-01/virtualappliancesites/version.go index 68c6291c89a..7138ce3a1ee 100644 --- a/resource-manager/network/2023-11-01/virtualappliancesites/version.go +++ b/resource-manager/network/2023-11-01/virtualappliancesites/version.go @@ -1,12 +1,10 @@ package virtualappliancesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualappliancesites/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualapplianceskus/README.md b/resource-manager/network/2023-11-01/virtualapplianceskus/README.md index c9adc572fa5..eb466c54b86 100644 --- a/resource-manager/network/2023-11-01/virtualapplianceskus/README.md +++ b/resource-manager/network/2023-11-01/virtualapplianceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualapplianceskus` Documentation -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualapplianceskus` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualapplianceskus/client.go b/resource-manager/network/2023-11-01/virtualapplianceskus/client.go index db6e9902bb9..90d73eb6104 100644 --- a/resource-manager/network/2023-11-01/virtualapplianceskus/client.go +++ b/resource-manager/network/2023-11-01/virtualapplianceskus/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSkusClient struct { } func NewVirtualApplianceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualapplianceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualapplianceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2023-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go index a2683ac973a..3980d29645a 100644 --- a/resource-manager/network/2023-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ b/resource-manager/network/2023-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go @@ -40,7 +40,7 @@ func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSk } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtu } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualapplianceskus/method_get.go b/resource-manager/network/2023-11-01/virtualapplianceskus/method_get.go index 87cc1eef20e..c570427c4a3 100644 --- a/resource-manager/network/2023-11-01/virtualapplianceskus/method_get.go +++ b/resource-manager/network/2023-11-01/virtualapplianceskus/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualAp var model NetworkVirtualApplianceSku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualapplianceskus/version.go b/resource-manager/network/2023-11-01/virtualapplianceskus/version.go index 4d3d92fd637..a532397fa46 100644 --- a/resource-manager/network/2023-11-01/virtualapplianceskus/version.go +++ b/resource-manager/network/2023-11-01/virtualapplianceskus/version.go @@ -1,12 +1,10 @@ package virtualapplianceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualapplianceskus/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/README.md index b5eff494cba..76dde41a592 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections` Documentation -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworkgatewayconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/client.go index f0cf4471c90..b74a1276981 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewayConnectionsClient struct { } func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/id_connection.go index 23a8c6154a7..8f674780f99 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/id_connection.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_get.go index e00568d96cb..842bab814e9 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_get.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id Conn var model VirtualNetworkGatewayConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go index bc9ecd13466..3606b2efb65 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context var model ConnectionSharedKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/version.go index ec7a647754c..5ceb4d62c8a 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgatewayconnections/version.go @@ -1,12 +1,10 @@ package virtualnetworkgatewayconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/README.md b/resource-manager/network/2023-11-01/virtualnetworkgateways/README.md index 73a96048ef1..fec92f5ca20 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworkgateways` Documentation -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/client.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/client.go index 32ede23bc60..56907b3d1b4 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewaysClient struct { } func NewVirtualNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_connection.go index fb9191036b5..d1aefba4347 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_connection.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go index 4763c88cab1..9589eab0bf6 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGat } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go index 41c5df8eedd..a767c52859c 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNa } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNet } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_get.go index 0f42a04cd89..403f9e12374 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_get.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getadvertisedroutes.go index d0dde50a8c6..969c71ee317 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getadvertisedroutes.go @@ -37,6 +37,7 @@ func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getbgppeerstatus.go index 5e6a04ac485..33e243af246 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_getbgppeerstatus.go @@ -37,6 +37,7 @@ func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_reset.go index 433a2126e07..fb6210d0c1e 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_reset.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_supportedvpndevices.go index c7d78912ab2..7b81cd2d32c 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_supportedvpndevices.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_supportedvpndevices.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, i var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go index 8347acb37cd..10dc0fac1a6 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx conte var model VirtualNetworkGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go index b2673932149..0dbfcf3f88f 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go @@ -50,7 +50,6 @@ func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.C var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkgateways/version.go b/resource-manager/network/2023-11-01/virtualnetworkgateways/version.go index 82e499633cb..135ef9d21e7 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkgateways/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworkgateways/version.go @@ -1,12 +1,10 @@ package virtualnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/README.md b/resource-manager/network/2023-11-01/virtualnetworkpeerings/README.md index 2e811185d5f..398cdcec91a 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworkpeerings` Documentation -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworkpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/client.go b/resource-manager/network/2023-11-01/virtualnetworkpeerings/client.go index 8eb7455514c..a8632e2ec55 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/client.go @@ -15,7 +15,7 @@ type VirtualNetworkPeeringsClient struct { } func NewVirtualNetworkPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2023-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go index a72d63bb3a5..b18a9909ca2 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_createorupdate.go index aba174940d2..950797b7302 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_get.go index 81671aa625e..8bc92358897 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_get.go +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworkpeerings/version.go b/resource-manager/network/2023-11-01/virtualnetworkpeerings/version.go index 3c2b16d74c6..15fd63fe325 100644 --- a/resource-manager/network/2023-11-01/virtualnetworkpeerings/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworkpeerings/version.go @@ -1,12 +1,10 @@ package virtualnetworkpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkpeerings/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/README.md b/resource-manager/network/2023-11-01/virtualnetworks/README.md index 97896ffc4f6..98f42e69451 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworks/client.go b/resource-manager/network/2023-11-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/method_get.go b/resource-manager/network/2023-11-01/virtualnetworks/method_get.go index 189fd2689c1..db1b8807d3e 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/method_get.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetw var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2023-11-01/virtualnetworks/method_updatetags.go index 8e2d6ea92a2..3e63f83e2a6 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/method_updatetags.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/method_updatetags.go @@ -50,7 +50,6 @@ func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.Virt var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go index 1f434189786..bcd41a4d551 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go @@ -35,6 +35,7 @@ func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() * func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx con var model IPAddressAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index d48736807d5..cfc2cb53d45 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -44,6 +44,7 @@ func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *cl func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/virtualnetworks/version.go b/resource-manager/network/2023-11-01/virtualnetworks/version.go index e1782e1a119..5c44fd0fa19 100644 --- a/resource-manager/network/2023-11-01/virtualnetworks/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/README.md b/resource-manager/network/2023-11-01/virtualnetworktap/README.md index d4e7e316bd8..7ec19053319 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworktap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworktap` Documentation -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworktap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/client.go b/resource-manager/network/2023-11-01/virtualnetworktap/client.go index 4444f3072d8..71e5a9092ba 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworktap/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapClient struct { } func NewVirtualNetworkTapClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2023-11-01/virtualnetworktap/id_virtualnetworktap.go index 5bf0638a304..7c8ef004fe6 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/id_virtualnetworktap.go +++ b/resource-manager/network/2023-11-01/virtualnetworktap/id_virtualnetworktap.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/method_get.go b/resource-manager/network/2023-11-01/virtualnetworktap/method_get.go index 7d8ef7767ee..cbeab75581a 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/method_get.go +++ b/resource-manager/network/2023-11-01/virtualnetworktap/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2023-11-01/virtualnetworktap/method_updatetags.go index 2079b8bdf80..3d2dd536791 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/method_updatetags.go +++ b/resource-manager/network/2023-11-01/virtualnetworktap/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetwo var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualnetworktap/version.go b/resource-manager/network/2023-11-01/virtualnetworktap/version.go index eef70525f1a..e715032dda2 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktap/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworktap/version.go @@ -1,12 +1,10 @@ package virtualnetworktap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktap/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualnetworktaps/README.md b/resource-manager/network/2023-11-01/virtualnetworktaps/README.md index c5bc1932be8..fe8923048d3 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktaps/README.md +++ b/resource-manager/network/2023-11-01/virtualnetworktaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualnetworktaps` Documentation -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualnetworktaps` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualnetworktaps/client.go b/resource-manager/network/2023-11-01/virtualnetworktaps/client.go index 33de6824de7..072baab9143 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktaps/client.go +++ b/resource-manager/network/2023-11-01/virtualnetworktaps/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapsClient struct { } func NewVirtualNetworkTapsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualnetworktaps/version.go b/resource-manager/network/2023-11-01/virtualnetworktaps/version.go index c7a131aec5f..52ec91fec73 100644 --- a/resource-manager/network/2023-11-01/virtualnetworktaps/version.go +++ b/resource-manager/network/2023-11-01/virtualnetworktaps/version.go @@ -1,12 +1,10 @@ package virtualnetworktaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktaps/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualrouterpeerings/README.md b/resource-manager/network/2023-11-01/virtualrouterpeerings/README.md index 38c48b08d54..1aac1309bfc 100644 --- a/resource-manager/network/2023-11-01/virtualrouterpeerings/README.md +++ b/resource-manager/network/2023-11-01/virtualrouterpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualrouterpeerings` Documentation -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualrouterpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualrouterpeerings/client.go b/resource-manager/network/2023-11-01/virtualrouterpeerings/client.go index 6b55e901ef5..b8bf140b1c1 100644 --- a/resource-manager/network/2023-11-01/virtualrouterpeerings/client.go +++ b/resource-manager/network/2023-11-01/virtualrouterpeerings/client.go @@ -15,7 +15,7 @@ type VirtualRouterPeeringsClient struct { } func NewVirtualRouterPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2023-11-01/virtualrouterpeerings/id_virtualrouter.go index 85fff5b9af3..d23c35f1255 100644 --- a/resource-manager/network/2023-11-01/virtualrouterpeerings/id_virtualrouter.go +++ b/resource-manager/network/2023-11-01/virtualrouterpeerings/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2023-11-01/virtualrouterpeerings/method_get.go index 684fe0cb2fc..8b9d7a1569d 100644 --- a/resource-manager/network/2023-11-01/virtualrouterpeerings/method_get.go +++ b/resource-manager/network/2023-11-01/virtualrouterpeerings/method_get.go @@ -46,7 +46,6 @@ func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.Virtu var model VirtualRouterPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualrouterpeerings/version.go b/resource-manager/network/2023-11-01/virtualrouterpeerings/version.go index 64a28f5ce6a..d166e98ed83 100644 --- a/resource-manager/network/2023-11-01/virtualrouterpeerings/version.go +++ b/resource-manager/network/2023-11-01/virtualrouterpeerings/version.go @@ -1,12 +1,10 @@ package virtualrouterpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouterpeerings/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualrouters/README.md b/resource-manager/network/2023-11-01/virtualrouters/README.md index 24c86d3abd7..61f671eaf9a 100644 --- a/resource-manager/network/2023-11-01/virtualrouters/README.md +++ b/resource-manager/network/2023-11-01/virtualrouters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualrouters` Documentation -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualrouters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualrouters/client.go b/resource-manager/network/2023-11-01/virtualrouters/client.go index 37e6baf91a8..ca9adf26c79 100644 --- a/resource-manager/network/2023-11-01/virtualrouters/client.go +++ b/resource-manager/network/2023-11-01/virtualrouters/client.go @@ -15,7 +15,7 @@ type VirtualRoutersClient struct { } func NewVirtualRoutersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2023-11-01/virtualrouters/id_virtualrouter.go index 3e9ac08d3a1..917cee82cb6 100644 --- a/resource-manager/network/2023-11-01/virtualrouters/id_virtualrouter.go +++ b/resource-manager/network/2023-11-01/virtualrouters/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualrouters/method_get.go b/resource-manager/network/2023-11-01/virtualrouters/method_get.go index 39415fad17f..4eaa68180fa 100644 --- a/resource-manager/network/2023-11-01/virtualrouters/method_get.go +++ b/resource-manager/network/2023-11-01/virtualrouters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, optio var model VirtualRouter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualrouters/version.go b/resource-manager/network/2023-11-01/virtualrouters/version.go index 2adf28e6840..7218d712615 100644 --- a/resource-manager/network/2023-11-01/virtualrouters/version.go +++ b/resource-manager/network/2023-11-01/virtualrouters/version.go @@ -1,12 +1,10 @@ package virtualrouters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouters/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/virtualwans/README.md b/resource-manager/network/2023-11-01/virtualwans/README.md index 774ddc1fbb2..c03ec8cf2f7 100644 --- a/resource-manager/network/2023-11-01/virtualwans/README.md +++ b/resource-manager/network/2023-11-01/virtualwans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/virtualwans` Documentation -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `virtualwans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/virtualwans/client.go b/resource-manager/network/2023-11-01/virtualwans/client.go index bf0a24c960f..0d727643072 100644 --- a/resource-manager/network/2023-11-01/virtualwans/client.go +++ b/resource-manager/network/2023-11-01/virtualwans/client.go @@ -15,7 +15,7 @@ type VirtualWANsClient struct { } func NewVirtualWANsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualwans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualwans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2023-11-01/virtualwans/id_configurationpolicygroup.go index 7ebd0347f4d..2742a567b1a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_configurationpolicygroup.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_configurationpolicygroup.go @@ -44,7 +44,7 @@ func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationP } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2023-11-01/virtualwans/id_hubroutetable.go index 46e51d4c426..7254af39e90 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_hubroutetable.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_hubroutetable.go @@ -44,7 +44,7 @@ func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2023-11-01/virtualwans/id_hubvirtualnetworkconnection.go index 92e4c4c7d5d..86b2ea6bba1 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_hubvirtualnetworkconnection.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_hubvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnect } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualN } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_natrule.go b/resource-manager/network/2023-11-01/virtualwans/id_natrule.go index f2dca44d7fa..c75b3495702 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_natrule.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_natrule.go @@ -44,7 +44,7 @@ func ParseNatRuleID(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualappliance.go b/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualappliance.go index 2dc156a927c..325fe5cbaca 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualappliance.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualapplianceconnection.go b/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualapplianceconnection.go index d39f2a000d0..09c7d9a52b2 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualapplianceconnection.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_networkvirtualapplianceconnection.go @@ -44,7 +44,7 @@ func ParseNetworkVirtualApplianceConnectionID(input string) (*NetworkVirtualAppl } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkVirtualApplianceConnectionIDInsensitively(input string) (*Netwo } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_routemap.go b/resource-manager/network/2023-11-01/virtualwans/id_routemap.go index c95aeaafbfd..62984d50913 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_routemap.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_routemap.go @@ -44,7 +44,7 @@ func ParseRouteMapID(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_routingintent.go b/resource-manager/network/2023-11-01/virtualwans/id_routingintent.go index de16e7a3861..0a5e5b5515f 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_routingintent.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_routingintent.go @@ -44,7 +44,7 @@ func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_virtualhub.go b/resource-manager/network/2023-11-01/virtualwans/id_virtualhub.go index ec4a18686e5..a65dd47d2f2 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_virtualhub.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_virtualhub.go @@ -42,7 +42,7 @@ func ParseVirtualHubID(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2023-11-01/virtualwans/id_virtualhubroutetable.go index b2cd55910b3..2c1b73bfb18 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_virtualhubroutetable.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_virtualhubroutetable.go @@ -44,7 +44,7 @@ func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTab } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_virtualwan.go b/resource-manager/network/2023-11-01/virtualwans/id_virtualwan.go index e8489bfa13e..c465fb4ee98 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_virtualwan.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_virtualwan.go @@ -42,7 +42,7 @@ func ParseVirtualWANID(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_vpngateway.go b/resource-manager/network/2023-11-01/virtualwans/id_vpngateway.go index 6889f4d78bc..ddef4f2b705 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_vpngateway.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2023-11-01/virtualwans/id_vpnlinkconnection.go index b40c9d3b7be..9e5fb0d4b28 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_vpnlinkconnection.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2023-11-01/virtualwans/id_vpnserverconfiguration.go index 604356fc28f..96680047062 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_vpnserverconfiguration.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_vpnsite.go b/resource-manager/network/2023-11-01/virtualwans/id_vpnsite.go index 4e20baefd21..6998a9ec345 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_vpnsite.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2023-11-01/virtualwans/id_vpnsitelink.go index a0b1676b210..d77c4473996 100644 --- a/resource-manager/network/2023-11-01/virtualwans/id_vpnsitelink.go +++ b/resource-manager/network/2023-11-01/virtualwans/id_vpnsitelink.go @@ -44,7 +44,7 @@ func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2023-11-01/virtualwans/method_configurationpolicygroupsget.go index 491fc15d5b2..d8feaa4f23a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_configurationpolicygroupsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_configurationpolicygroupsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id var model VpnServerConfigurationPolicyGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2023-11-01/virtualwans/method_hubroutetablesget.go index 36dc9467d46..e714731e2bf 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_hubroutetablesget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_hubroutetablesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTab var model HubRouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2023-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go index 852857adc59..f08f465d3c1 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, var model HubVirtualNetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_natrulesget.go b/resource-manager/network/2023-11-01/virtualwans/method_natrulesget.go index 9ba7ca45bea..c81f0b6e89a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_natrulesget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_natrulesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (resul var model VpnGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go b/resource-manager/network/2023-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go index ed429bdb536..783b3251a6c 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsGet(ctx context.Con var model NetworkVirtualApplianceConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2023-11-01/virtualwans/method_p2svpngatewaysget.go index 804013badcc..ec7e18c347e 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_p2svpngatewaysget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_p2svpngatewaysget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.V var model P2SVpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_routemapsget.go b/resource-manager/network/2023-11-01/virtualwans/method_routemapsget.go index 925002f31e7..c1db2c3033a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_routemapsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_routemapsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (res var model RouteMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_routingintentget.go b/resource-manager/network/2023-11-01/virtualwans/method_routingintentget.go index ae61d3b41b5..fea07e77795 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_routingintentget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_routingintentget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingInten var model RoutingIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2023-11-01/virtualwans/method_supportedsecurityproviders.go index 616d9dd0cd4..3351ee7549f 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_supportedsecurityproviders.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_supportedsecurityproviders.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id Vi var model VirtualWanSecurityProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_updatetags.go b/resource-manager/network/2023-11-01/virtualwans/method_updatetags.go index 6115890e78c..42f292d4aea 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_updatetags.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, inpu var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubbgpconnectionget.go index 525c6b3cabe..e4d4c41773a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubbgpconnectionget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubbgpconnectionget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id co var model BgpConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubipconfigurationget.go index ca3c9a88dd3..c4abe234784 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubipconfigurationget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubipconfigurationget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id var model HubIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubroutetablev2sget.go index 7c542fcfe68..0d274e1355a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubroutetablev2sget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubroutetablev2sget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id Vi var model VirtualHubRouteTableV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsget.go index 3f2e419720f..0b1bcbe8573 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsupdatetags.go index be5399a4515..23f6df52743 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsupdatetags.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualhubsupdatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id Virtual var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2023-11-01/virtualwans/method_virtualwansget.go index 41dbd00d7f2..66d801a779a 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_virtualwansget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_virtualwansget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpnconnectionsget.go index 812232759b1..ca7d4d2a9b4 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpnconnectionsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpnconnectionsget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.V var model VpnConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpngatewaysget.go index bfa13a547eb..0793829ea75 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpngatewaysget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpngatewaysget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) var model VpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpnserverconfigurationsget.go index e5b009a1154..5355630843f 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpnserverconfigurationsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpnserverconfigurationsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id Vp var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinkconnectionsget.go index 088e1b48de5..b2fed5d6de1 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id Vpn var model VpnSiteLinkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinksget.go index c16e84b3691..018f1ad8f67 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinksget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitelinksget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId var model VpnSiteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitesget.go index 6494e6d6449..a250df018ce 100644 --- a/resource-manager/network/2023-11-01/virtualwans/method_vpnsitesget.go +++ b/resource-manager/network/2023-11-01/virtualwans/method_vpnsitesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (resul var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/virtualwans/version.go b/resource-manager/network/2023-11-01/virtualwans/version.go index 2e144d959dc..6d77ede8bbd 100644 --- a/resource-manager/network/2023-11-01/virtualwans/version.go +++ b/resource-manager/network/2023-11-01/virtualwans/version.go @@ -1,12 +1,10 @@ package virtualwans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualwans/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vmsspublicipaddresses/README.md b/resource-manager/network/2023-11-01/vmsspublicipaddresses/README.md index a83a4757f68..0f3efc1bae7 100644 --- a/resource-manager/network/2023-11-01/vmsspublicipaddresses/README.md +++ b/resource-manager/network/2023-11-01/vmsspublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vmsspublicipaddresses` Documentation -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `vmsspublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/vmsspublicipaddresses/client.go b/resource-manager/network/2023-11-01/vmsspublicipaddresses/client.go index 3213cbf73fe..218145b65b9 100644 --- a/resource-manager/network/2023-11-01/vmsspublicipaddresses/client.go +++ b/resource-manager/network/2023-11-01/vmsspublicipaddresses/client.go @@ -15,7 +15,7 @@ type VMSSPublicIPAddressesClient struct { } func NewVMSSPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2023-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go index 6907f32662f..d2ae7bd3514 100644 --- a/resource-manager/network/2023-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ b/resource-manager/network/2023-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2023-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go index 482b018c7dc..aa1a988346a 100644 --- a/resource-manager/network/2023-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ b/resource-manager/network/2023-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOption func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetP var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/vmsspublicipaddresses/version.go b/resource-manager/network/2023-11-01/vmsspublicipaddresses/version.go index 9c53103fce2..81d29217141 100644 --- a/resource-manager/network/2023-11-01/vmsspublicipaddresses/version.go +++ b/resource-manager/network/2023-11-01/vmsspublicipaddresses/version.go @@ -1,12 +1,10 @@ package vmsspublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmsspublicipaddresses/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vpngateways/README.md b/resource-manager/network/2023-11-01/vpngateways/README.md index aa6f23fa92e..844a2765f61 100644 --- a/resource-manager/network/2023-11-01/vpngateways/README.md +++ b/resource-manager/network/2023-11-01/vpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vpngateways` Documentation -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `vpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/vpngateways/client.go b/resource-manager/network/2023-11-01/vpngateways/client.go index 5679554f1a5..c17671a8ad9 100644 --- a/resource-manager/network/2023-11-01/vpngateways/client.go +++ b/resource-manager/network/2023-11-01/vpngateways/client.go @@ -15,7 +15,7 @@ type VpnGatewaysClient struct { } func NewVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vpngateways/id_vpngateway.go b/resource-manager/network/2023-11-01/vpngateways/id_vpngateway.go index 4a48b9a7916..a605ffbf545 100644 --- a/resource-manager/network/2023-11-01/vpngateways/id_vpngateway.go +++ b/resource-manager/network/2023-11-01/vpngateways/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vpngateways/method_reset.go b/resource-manager/network/2023-11-01/vpngateways/method_reset.go index 8228267e86c..06856815c74 100644 --- a/resource-manager/network/2023-11-01/vpngateways/method_reset.go +++ b/resource-manager/network/2023-11-01/vpngateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2023-11-01/vpngateways/version.go b/resource-manager/network/2023-11-01/vpngateways/version.go index c250a759055..9bc4a65216d 100644 --- a/resource-manager/network/2023-11-01/vpngateways/version.go +++ b/resource-manager/network/2023-11-01/vpngateways/version.go @@ -1,12 +1,10 @@ package vpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpngateways/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vpnlinkconnections/client.go b/resource-manager/network/2023-11-01/vpnlinkconnections/client.go index 3fbef685129..abb23ca4c39 100644 --- a/resource-manager/network/2023-11-01/vpnlinkconnections/client.go +++ b/resource-manager/network/2023-11-01/vpnlinkconnections/client.go @@ -15,7 +15,7 @@ type VpnLinkConnectionsClient struct { } func NewVpnLinkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnlinkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnlinkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2023-11-01/vpnlinkconnections/id_vpnlinkconnection.go index e1dd95afd3a..ba9d1fe1a91 100644 --- a/resource-manager/network/2023-11-01/vpnlinkconnections/id_vpnlinkconnection.go +++ b/resource-manager/network/2023-11-01/vpnlinkconnections/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vpnlinkconnections/version.go b/resource-manager/network/2023-11-01/vpnlinkconnections/version.go index eb6ed5abcf1..836405ca770 100644 --- a/resource-manager/network/2023-11-01/vpnlinkconnections/version.go +++ b/resource-manager/network/2023-11-01/vpnlinkconnections/version.go @@ -1,12 +1,10 @@ package vpnlinkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnlinkconnections/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vpnserverconfigurations/README.md b/resource-manager/network/2023-11-01/vpnserverconfigurations/README.md index 756591e035c..68b5b5f7ddd 100644 --- a/resource-manager/network/2023-11-01/vpnserverconfigurations/README.md +++ b/resource-manager/network/2023-11-01/vpnserverconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vpnserverconfigurations` Documentation -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `vpnserverconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/vpnserverconfigurations/client.go b/resource-manager/network/2023-11-01/vpnserverconfigurations/client.go index 6209cc6af8d..661d154e519 100644 --- a/resource-manager/network/2023-11-01/vpnserverconfigurations/client.go +++ b/resource-manager/network/2023-11-01/vpnserverconfigurations/client.go @@ -15,7 +15,7 @@ type VpnServerConfigurationsClient struct { } func NewVpnServerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2023-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go index 56b67386806..fd55db1bea0 100644 --- a/resource-manager/network/2023-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ b/resource-manager/network/2023-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2023-11-01/vpnserverconfigurations/method_updatetags.go index 7a675d1584d..f9decf387a7 100644 --- a/resource-manager/network/2023-11-01/vpnserverconfigurations/method_updatetags.go +++ b/resource-manager/network/2023-11-01/vpnserverconfigurations/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnSer var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/vpnserverconfigurations/version.go b/resource-manager/network/2023-11-01/vpnserverconfigurations/version.go index 6e78c18d7b2..70a571db107 100644 --- a/resource-manager/network/2023-11-01/vpnserverconfigurations/version.go +++ b/resource-manager/network/2023-11-01/vpnserverconfigurations/version.go @@ -1,12 +1,10 @@ package vpnserverconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnserverconfigurations/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/vpnsites/README.md b/resource-manager/network/2023-11-01/vpnsites/README.md index 55bee448c21..dbbcb8026cb 100644 --- a/resource-manager/network/2023-11-01/vpnsites/README.md +++ b/resource-manager/network/2023-11-01/vpnsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/vpnsites` Documentation -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `vpnsites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/vpnsites/client.go b/resource-manager/network/2023-11-01/vpnsites/client.go index 241eb9e94ea..2c56ae704cd 100644 --- a/resource-manager/network/2023-11-01/vpnsites/client.go +++ b/resource-manager/network/2023-11-01/vpnsites/client.go @@ -15,7 +15,7 @@ type VpnSitesClient struct { } func NewVpnSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/vpnsites/id_vpnsite.go b/resource-manager/network/2023-11-01/vpnsites/id_vpnsite.go index 4b42ecf0a1e..f4827bdd53c 100644 --- a/resource-manager/network/2023-11-01/vpnsites/id_vpnsite.go +++ b/resource-manager/network/2023-11-01/vpnsites/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/vpnsites/method_updatetags.go b/resource-manager/network/2023-11-01/vpnsites/method_updatetags.go index 08341839986..aa5af2cd330 100644 --- a/resource-manager/network/2023-11-01/vpnsites/method_updatetags.go +++ b/resource-manager/network/2023-11-01/vpnsites/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input Tags var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/vpnsites/version.go b/resource-manager/network/2023-11-01/vpnsites/version.go index 272a1f742c4..df39cd94050 100644 --- a/resource-manager/network/2023-11-01/vpnsites/version.go +++ b/resource-manager/network/2023-11-01/vpnsites/version.go @@ -1,12 +1,10 @@ package vpnsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnsites/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/README.md index 6d953b40cc3..7a7f4d6eabd 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/client.go index ac148c53733..225049a7361 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/client.go +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/client.go @@ -15,7 +15,7 @@ type WebApplicationFirewallPoliciesClient struct { } func NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go index 9c48316d9e7..21335631484 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*Appli } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input st } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_createorupdate.go index a30ca59994f..556b406a3c2 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_createorupdate.go +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_get.go index 03919558699..b34138178e0 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_get.go +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/method_get.go @@ -45,7 +45,6 @@ func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id Applic var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/version.go index 1ae435f4990..1ceeadaaf63 100644 --- a/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/network/2023-11-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2023-11-01" } diff --git a/resource-manager/network/2023-11-01/webcategories/README.md b/resource-manager/network/2023-11-01/webcategories/README.md index 82b94f43789..4902527d156 100644 --- a/resource-manager/network/2023-11-01/webcategories/README.md +++ b/resource-manager/network/2023-11-01/webcategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webcategories` Documentation -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2023-11-01`). +The `webcategories` SDK allows for interaction with Azure Resource Manager `network` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2023-11-01/webcategories/client.go b/resource-manager/network/2023-11-01/webcategories/client.go index 075aa15b06b..980ef726026 100644 --- a/resource-manager/network/2023-11-01/webcategories/client.go +++ b/resource-manager/network/2023-11-01/webcategories/client.go @@ -15,7 +15,7 @@ type WebCategoriesClient struct { } func NewWebCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webcategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webcategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) } diff --git a/resource-manager/network/2023-11-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2023-11-01/webcategories/id_azurewebcategory.go index 1417d2f6d85..a7286a7dec7 100644 --- a/resource-manager/network/2023-11-01/webcategories/id_azurewebcategory.go +++ b/resource-manager/network/2023-11-01/webcategories/id_azurewebcategory.go @@ -40,7 +40,7 @@ func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, er } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2023-11-01/webcategories/method_get.go b/resource-manager/network/2023-11-01/webcategories/method_get.go index 6150a24fbf4..bcebcf476db 100644 --- a/resource-manager/network/2023-11-01/webcategories/method_get.go +++ b/resource-manager/network/2023-11-01/webcategories/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, opt var model AzureWebCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2023-11-01/webcategories/version.go b/resource-manager/network/2023-11-01/webcategories/version.go index 3eab7e1b57f..0a9df0a65b7 100644 --- a/resource-manager/network/2023-11-01/webcategories/version.go +++ b/resource-manager/network/2023-11-01/webcategories/version.go @@ -1,12 +1,10 @@ package webcategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webcategories/2023-11-01" } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/README.md b/resource-manager/network/2024-01-01/adminrulecollections/README.md index 4afed0adb34..6cf0c892763 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/README.md +++ b/resource-manager/network/2024-01-01/adminrulecollections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/adminrulecollections` Documentation -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `adminrulecollections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/adminrulecollections/client.go b/resource-manager/network/2024-01-01/adminrulecollections/client.go index adbf2674d97..a0e144b1d96 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/client.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/client.go @@ -15,7 +15,7 @@ type AdminRuleCollectionsClient struct { } func NewAdminRuleCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrulecollections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrulecollections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2024-01-01/adminrulecollections/id_rulecollection.go index 5c84e59671e..9e9a196b29e 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/id_rulecollection.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2024-01-01/adminrulecollections/id_securityadminconfiguration.go index b8186efef3b..d4a126ec41b 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/id_securityadminconfiguration.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2024-01-01/adminrulecollections/method_createorupdate.go index 67a6db6eb7b..00810feb46a 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleC var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/method_delete.go b/resource-manager/network/2024-01-01/adminrulecollections/method_delete.go index ec55f3fa7e6..68d0021749b 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/method_delete.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/method_get.go b/resource-manager/network/2024-01-01/adminrulecollections/method_get.go index 8beb93c5eca..1aec0f98a6a 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/method_get.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/method_get.go @@ -45,7 +45,6 @@ func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId var model AdminRuleCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/method_list.go b/resource-manager/network/2024-01-01/adminrulecollections/method_list.go index f4b9bfcdd61..2ef5b46d0a4 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/method_list.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/adminrulecollections/version.go b/resource-manager/network/2024-01-01/adminrulecollections/version.go index 519ff5d3655..fb4a4946788 100644 --- a/resource-manager/network/2024-01-01/adminrulecollections/version.go +++ b/resource-manager/network/2024-01-01/adminrulecollections/version.go @@ -1,12 +1,10 @@ package adminrulecollections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrulecollections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/adminrules/README.md b/resource-manager/network/2024-01-01/adminrules/README.md index aae2c387f88..6cff7713781 100644 --- a/resource-manager/network/2024-01-01/adminrules/README.md +++ b/resource-manager/network/2024-01-01/adminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/adminrules` Documentation -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `adminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/adminrules/client.go b/resource-manager/network/2024-01-01/adminrules/client.go index 40da5b4d0a4..811271711b6 100644 --- a/resource-manager/network/2024-01-01/adminrules/client.go +++ b/resource-manager/network/2024-01-01/adminrules/client.go @@ -15,7 +15,7 @@ type AdminRulesClient struct { } func NewAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/adminrules/id_rule.go b/resource-manager/network/2024-01-01/adminrules/id_rule.go index 3b132449062..35d0bf9900c 100644 --- a/resource-manager/network/2024-01-01/adminrules/id_rule.go +++ b/resource-manager/network/2024-01-01/adminrules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/adminrules/id_rulecollection.go b/resource-manager/network/2024-01-01/adminrules/id_rulecollection.go index 6dd9dd5b0a8..71e436de80b 100644 --- a/resource-manager/network/2024-01-01/adminrules/id_rulecollection.go +++ b/resource-manager/network/2024-01-01/adminrules/id_rulecollection.go @@ -46,7 +46,7 @@ func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) } id := RuleCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/adminrules/method_createorupdate.go b/resource-manager/network/2024-01-01/adminrules/method_createorupdate.go index d936a5666f1..250f646ce08 100644 --- a/resource-manager/network/2024-01-01/adminrules/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/adminrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input B if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2024-01-01/adminrules/method_delete.go b/resource-manager/network/2024-01-01/adminrules/method_delete.go index 9b07dbc4a79..c5deb3a7b1f 100644 --- a/resource-manager/network/2024-01-01/adminrules/method_delete.go +++ b/resource-manager/network/2024-01-01/adminrules/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/adminrules/method_get.go b/resource-manager/network/2024-01-01/adminrules/method_get.go index 94337a0e139..52f80e411e8 100644 --- a/resource-manager/network/2024-01-01/adminrules/method_get.go +++ b/resource-manager/network/2024-01-01/adminrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *BaseAdminRule + Model BaseAdminRule } // Get ... @@ -48,11 +48,11 @@ func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperati if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalBaseAdminRuleImplementation(respObj) + model, err := UnmarshalBaseAdminRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/network/2024-01-01/adminrules/method_list.go b/resource-manager/network/2024-01-01/adminrules/method_list.go index 97915114117..85aa73c80e3 100644 --- a/resource-manager/network/2024-01-01/adminrules/method_list.go +++ b/resource-manager/network/2024-01-01/adminrules/method_list.go @@ -73,7 +73,7 @@ func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result temp := make([]BaseAdminRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalBaseAdminRuleImplementation(v) + val, err := UnmarshalBaseAdminRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for BaseAdminRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/network/2024-01-01/adminrules/model_adminrule.go b/resource-manager/network/2024-01-01/adminrules/model_adminrule.go index 8544cf3cd71..74d9a7cd9c1 100644 --- a/resource-manager/network/2024-01-01/adminrules/model_adminrule.go +++ b/resource-manager/network/2024-01-01/adminrules/model_adminrule.go @@ -16,13 +16,26 @@ type AdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AdminRule{} func (s AdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/adminrules/model_baseadminrule.go b/resource-manager/network/2024-01-01/adminrules/model_baseadminrule.go index bbcabba727e..9b510b6b2b9 100644 --- a/resource-manager/network/2024-01-01/adminrules/model_baseadminrule.go +++ b/resource-manager/network/2024-01-01/adminrules/model_baseadminrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BaseAdminRule interface { + BaseAdminRule() BaseBaseAdminRuleImpl +} + +var _ BaseAdminRule = BaseBaseAdminRuleImpl{} + +type BaseBaseAdminRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s } -// RawBaseAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BaseAdminRule = RawBaseAdminRuleImpl{} + +// RawBaseAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBaseAdminRuleImpl struct { - Type string - Values map[string]interface{} + baseAdminRule BaseBaseAdminRuleImpl + Type string + Values map[string]interface{} } -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { +func (s RawBaseAdminRuleImpl) BaseAdminRule() BaseBaseAdminRuleImpl { + return s.baseAdminRule +} + +func UnmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { return out, nil } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseBaseAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBaseAdminRuleImpl: %+v", err) } - return out, nil + + return RawBaseAdminRuleImpl{ + baseAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2024-01-01/adminrules/model_defaultadminrule.go index 7a93ae7edc9..3695c8332dc 100644 --- a/resource-manager/network/2024-01-01/adminrules/model_defaultadminrule.go +++ b/resource-manager/network/2024-01-01/adminrules/model_defaultadminrule.go @@ -16,13 +16,26 @@ type DefaultAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from BaseAdminRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AdminRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s DefaultAdminRule) BaseAdminRule() BaseBaseAdminRuleImpl { + return BaseBaseAdminRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = DefaultAdminRule{} func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/adminrules/version.go b/resource-manager/network/2024-01-01/adminrules/version.go index b456849b640..57cbbbdee62 100644 --- a/resource-manager/network/2024-01-01/adminrules/version.go +++ b/resource-manager/network/2024-01-01/adminrules/version.go @@ -1,12 +1,10 @@ package adminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminrules/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/README.md index 4f066f7a6a2..60f2aea1de2 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/README.md +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections` Documentation -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `applicationgatewayprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/client.go index 10a57c1c475..2218d4c59f1 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/client.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { } func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go index e1cb4795761..98b4f043cb9 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go index aad51fee91b..3e07c149e6e 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*Applicat } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input strin } id := ApplicationGatewayPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/method_get.go index f3f7a21ab28..dace2e6df65 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/method_get.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Cont var model ApplicationGatewayPrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/version.go index daa7fb1a03b..eeb28712828 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/version.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/README.md index fd1f67f6892..f06bb11011a 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/README.md +++ b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources` Documentation -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `applicationgatewayprivatelinkresources` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/client.go index 9e064641526..81bc1b2fb1d 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/client.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { } func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewayprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/id_applicationgateway.go index f86cb06512e..06702643dd2 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/version.go index 11d7217b947..42e1f4d16f2 100644 --- a/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/version.go +++ b/resource-manager/network/2024-01-01/applicationgatewayprivatelinkresources/version.go @@ -1,12 +1,10 @@ package applicationgatewayprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/applicationgateways/README.md b/resource-manager/network/2024-01-01/applicationgateways/README.md index 93718314104..7ebfd59051d 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/README.md +++ b/resource-manager/network/2024-01-01/applicationgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/applicationgateways` Documentation -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `applicationgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/applicationgateways/client.go b/resource-manager/network/2024-01-01/applicationgateways/client.go index 9608bf47106..3cd17d71726 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/client.go +++ b/resource-manager/network/2024-01-01/applicationgateways/client.go @@ -15,7 +15,7 @@ type ApplicationGatewaysClient struct { } func NewApplicationGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2024-01-01/applicationgateways/id_applicationgateway.go index 0611edc8513..62f5b1be065 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/id_applicationgateway.go +++ b/resource-manager/network/2024-01-01/applicationgateways/id_applicationgateway.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId } id := ApplicationGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2024-01-01/applicationgateways/id_predefinedpolicy.go index f22e541bda3..71d5c0e0d52 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/id_predefinedpolicy.go +++ b/resource-manager/network/2024-01-01/applicationgateways/id_predefinedpolicy.go @@ -40,7 +40,7 @@ func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, er } id := PredefinedPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2024-01-01/applicationgateways/method_backendhealth.go index 21c25eb922c..2ab399ab3f9 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_backendhealth.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_backendhealth.go @@ -37,6 +37,7 @@ func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2024-01-01/applicationgateways/method_backendhealthondemand.go index 2db3547857a..a22fd7135ce 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_backendhealthondemand.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_backendhealthondemand.go @@ -37,6 +37,7 @@ func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_get.go b/resource-manager/network/2024-01-01/applicationgateways/method_get.go index 03000d91a47..c25227f49ca 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_get.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewa var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2024-01-01/applicationgateways/method_getsslpredefinedpolicy.go index 97530703e81..d42b5d2730e 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_getsslpredefinedpolicy.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_getsslpredefinedpolicy.go @@ -45,7 +45,6 @@ func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, i var model ApplicationGatewaySslPredefinedPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablerequestheaders.go index 634799c7f70..8132f0945cf 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablerequestheaders.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablerequestheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Conte var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2024-01-01/applicationgateways/method_listavailableresponseheaders.go index fe99c70d2e7..89bdb636e2e 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_listavailableresponseheaders.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_listavailableresponseheaders.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2024-01-01/applicationgateways/method_listavailableservervariables.go index b48bb86d765..f2a0d8c4b79 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_listavailableservervariables.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_listavailableservervariables.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Cont var model []string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablessloptions.go index 386a33e5e84..f446cd3730a 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablessloptions.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablessloptions.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, var model ApplicationGatewayAvailableSslOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablewafrulesets.go index 3df1a2db564..ee2a21477a5 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_listavailablewafrulesets.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_listavailablewafrulesets.go @@ -47,7 +47,6 @@ func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, var model ApplicationGatewayAvailableWafRuleSetsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/method_updatetags.go b/resource-manager/network/2024-01-01/applicationgateways/method_updatetags.go index d22b3615559..875c2ce138d 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/method_updatetags.go +++ b/resource-manager/network/2024-01-01/applicationgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id Applicatio var model ApplicationGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgateways/version.go b/resource-manager/network/2024-01-01/applicationgateways/version.go index 17a7b506485..efb36e8f2e8 100644 --- a/resource-manager/network/2024-01-01/applicationgateways/version.go +++ b/resource-manager/network/2024-01-01/applicationgateways/version.go @@ -1,12 +1,10 @@ package applicationgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/README.md index a048998d642..e514650fe6e 100644 --- a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/README.md +++ b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests` Documentation -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/client.go index 507d8e55929..c8cf9d79e64 100644 --- a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/client.go +++ b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/client.go @@ -15,7 +15,7 @@ type ApplicationGatewayWafDynamicManifestsClient struct { } func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationgatewaywafdynamicmanifests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/id_location.go index 03b931e4e2f..357f91a7bb3 100644 --- a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/id_location.go +++ b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/method_defaultget.go b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/method_defaultget.go index 0a6682174de..41ec3674d2f 100644 --- a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/method_defaultget.go +++ b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/method_defaultget.go @@ -46,7 +46,6 @@ func (c ApplicationGatewayWafDynamicManifestsClient) DefaultGet(ctx context.Cont var model ApplicationGatewayWafDynamicManifestResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/version.go index e8409c7c508..32d73add511 100644 --- a/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/version.go +++ b/resource-manager/network/2024-01-01/applicationgatewaywafdynamicmanifests/version.go @@ -1,12 +1,10 @@ package applicationgatewaywafdynamicmanifests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/README.md b/resource-manager/network/2024-01-01/applicationsecuritygroups/README.md index 8217a8fd7f9..ec525c04998 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/README.md +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/applicationsecuritygroups` Documentation -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `applicationsecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/client.go b/resource-manager/network/2024-01-01/applicationsecuritygroups/client.go index e607d64a7d3..81de33d92a0 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/client.go +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/client.go @@ -15,7 +15,7 @@ type ApplicationSecurityGroupsClient struct { } func NewApplicationSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationsecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2024-01-01/applicationsecuritygroups/id_applicationsecuritygroup.go index a776d455c05..67f87d7b0c2 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/id_applicationsecuritygroup.go @@ -42,7 +42,7 @@ func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSec } id := ApplicationSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2024-01-01/applicationsecuritygroups/method_get.go index 5990e4033ff..88fdcf2df15 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/method_get.go +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id Application var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2024-01-01/applicationsecuritygroups/method_updatetags.go index 0343cea5693..3337e0dc239 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/method_updatetags.go +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id Appl var model ApplicationSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/applicationsecuritygroups/version.go b/resource-manager/network/2024-01-01/applicationsecuritygroups/version.go index e7b435550b4..70a8d30a1da 100644 --- a/resource-manager/network/2024-01-01/applicationsecuritygroups/version.go +++ b/resource-manager/network/2024-01-01/applicationsecuritygroups/version.go @@ -1,12 +1,10 @@ package applicationsecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationsecuritygroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/availabledelegations/README.md b/resource-manager/network/2024-01-01/availabledelegations/README.md index cf6ee41af86..4267ed25043 100644 --- a/resource-manager/network/2024-01-01/availabledelegations/README.md +++ b/resource-manager/network/2024-01-01/availabledelegations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/availabledelegations` Documentation -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `availabledelegations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/availabledelegations/client.go b/resource-manager/network/2024-01-01/availabledelegations/client.go index ff6ff754bce..2b7153e2c60 100644 --- a/resource-manager/network/2024-01-01/availabledelegations/client.go +++ b/resource-manager/network/2024-01-01/availabledelegations/client.go @@ -15,7 +15,7 @@ type AvailableDelegationsClient struct { } func NewAvailableDelegationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabledelegations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabledelegations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/availabledelegations/id_location.go b/resource-manager/network/2024-01-01/availabledelegations/id_location.go index 411da010546..be331f465d6 100644 --- a/resource-manager/network/2024-01-01/availabledelegations/id_location.go +++ b/resource-manager/network/2024-01-01/availabledelegations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2024-01-01/availabledelegations/id_providerlocation.go index 18b359986fc..238b7f2192e 100644 --- a/resource-manager/network/2024-01-01/availabledelegations/id_providerlocation.go +++ b/resource-manager/network/2024-01-01/availabledelegations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/availabledelegations/version.go b/resource-manager/network/2024-01-01/availabledelegations/version.go index d6dc14522e8..ae64f22b248 100644 --- a/resource-manager/network/2024-01-01/availabledelegations/version.go +++ b/resource-manager/network/2024-01-01/availabledelegations/version.go @@ -1,12 +1,10 @@ package availabledelegations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabledelegations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/availableservicealiases/README.md b/resource-manager/network/2024-01-01/availableservicealiases/README.md index 97b60073f00..d363c34272a 100644 --- a/resource-manager/network/2024-01-01/availableservicealiases/README.md +++ b/resource-manager/network/2024-01-01/availableservicealiases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/availableservicealiases` Documentation -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `availableservicealiases` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/availableservicealiases/client.go b/resource-manager/network/2024-01-01/availableservicealiases/client.go index 383e80f6061..5f9e19acaa8 100644 --- a/resource-manager/network/2024-01-01/availableservicealiases/client.go +++ b/resource-manager/network/2024-01-01/availableservicealiases/client.go @@ -15,7 +15,7 @@ type AvailableServiceAliasesClient struct { } func NewAvailableServiceAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableservicealiases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableservicealiases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/availableservicealiases/id_location.go b/resource-manager/network/2024-01-01/availableservicealiases/id_location.go index 5bff2b43759..08ab16f2f59 100644 --- a/resource-manager/network/2024-01-01/availableservicealiases/id_location.go +++ b/resource-manager/network/2024-01-01/availableservicealiases/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2024-01-01/availableservicealiases/id_providerlocation.go index 7ec8519458c..0bb4c77565c 100644 --- a/resource-manager/network/2024-01-01/availableservicealiases/id_providerlocation.go +++ b/resource-manager/network/2024-01-01/availableservicealiases/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/availableservicealiases/version.go b/resource-manager/network/2024-01-01/availableservicealiases/version.go index 13066a6403c..8242125933d 100644 --- a/resource-manager/network/2024-01-01/availableservicealiases/version.go +++ b/resource-manager/network/2024-01-01/availableservicealiases/version.go @@ -1,12 +1,10 @@ package availableservicealiases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableservicealiases/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/azurefirewalls/README.md b/resource-manager/network/2024-01-01/azurefirewalls/README.md index 4d35f87fb73..fd8fd14b4c9 100644 --- a/resource-manager/network/2024-01-01/azurefirewalls/README.md +++ b/resource-manager/network/2024-01-01/azurefirewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/azurefirewalls` Documentation -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `azurefirewalls` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/azurefirewalls/client.go b/resource-manager/network/2024-01-01/azurefirewalls/client.go index e1119aea925..02df961b70b 100644 --- a/resource-manager/network/2024-01-01/azurefirewalls/client.go +++ b/resource-manager/network/2024-01-01/azurefirewalls/client.go @@ -15,7 +15,7 @@ type AzureFirewallsClient struct { } func NewAzureFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azurefirewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azurefirewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2024-01-01/azurefirewalls/id_azurefirewall.go index 20ab073f448..a3d4db3a367 100644 --- a/resource-manager/network/2024-01-01/azurefirewalls/id_azurefirewall.go +++ b/resource-manager/network/2024-01-01/azurefirewalls/id_azurefirewall.go @@ -42,7 +42,7 @@ func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { } id := AzureFirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/azurefirewalls/method_get.go b/resource-manager/network/2024-01-01/azurefirewalls/method_get.go index 7fa6155aa4a..e9802794921 100644 --- a/resource-manager/network/2024-01-01/azurefirewalls/method_get.go +++ b/resource-manager/network/2024-01-01/azurefirewalls/method_get.go @@ -45,7 +45,6 @@ func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (resu var model AzureFirewall result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/azurefirewalls/version.go b/resource-manager/network/2024-01-01/azurefirewalls/version.go index 692c8d229a7..96c7223fd0e 100644 --- a/resource-manager/network/2024-01-01/azurefirewalls/version.go +++ b/resource-manager/network/2024-01-01/azurefirewalls/version.go @@ -1,12 +1,10 @@ package azurefirewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azurefirewalls/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/bastionhosts/README.md b/resource-manager/network/2024-01-01/bastionhosts/README.md index 88400c89ff9..ef961aba62a 100644 --- a/resource-manager/network/2024-01-01/bastionhosts/README.md +++ b/resource-manager/network/2024-01-01/bastionhosts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionhosts` Documentation -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `bastionhosts` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/bastionhosts/client.go b/resource-manager/network/2024-01-01/bastionhosts/client.go index 95e06c7f523..f77ea65ff0a 100644 --- a/resource-manager/network/2024-01-01/bastionhosts/client.go +++ b/resource-manager/network/2024-01-01/bastionhosts/client.go @@ -15,7 +15,7 @@ type BastionHostsClient struct { } func NewBastionHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionhosts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionhosts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go index 66012e2eda5..f1d36f02936 100644 --- a/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go +++ b/resource-manager/network/2024-01-01/bastionhosts/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/bastionhosts/method_get.go b/resource-manager/network/2024-01-01/bastionhosts/method_get.go index 71b1a85a45f..7d0d6c578df 100644 --- a/resource-manager/network/2024-01-01/bastionhosts/method_get.go +++ b/resource-manager/network/2024-01-01/bastionhosts/method_get.go @@ -45,7 +45,6 @@ func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result G var model BastionHost result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/bastionhosts/version.go b/resource-manager/network/2024-01-01/bastionhosts/version.go index 34627770e6d..26d20ffa647 100644 --- a/resource-manager/network/2024-01-01/bastionhosts/version.go +++ b/resource-manager/network/2024-01-01/bastionhosts/version.go @@ -1,12 +1,10 @@ package bastionhosts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionhosts/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/bastionshareablelink/README.md b/resource-manager/network/2024-01-01/bastionshareablelink/README.md index 288f4612b1f..a8de1f6430c 100644 --- a/resource-manager/network/2024-01-01/bastionshareablelink/README.md +++ b/resource-manager/network/2024-01-01/bastionshareablelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bastionshareablelink` Documentation -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `bastionshareablelink` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/bastionshareablelink/client.go b/resource-manager/network/2024-01-01/bastionshareablelink/client.go index 9c49b25b52f..39fc8e4cbdd 100644 --- a/resource-manager/network/2024-01-01/bastionshareablelink/client.go +++ b/resource-manager/network/2024-01-01/bastionshareablelink/client.go @@ -15,7 +15,7 @@ type BastionShareableLinkClient struct { } func NewBastionShareableLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bastionshareablelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bastionshareablelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2024-01-01/bastionshareablelink/id_bastionhost.go index b2cc2bfc5be..0f1852a854d 100644 --- a/resource-manager/network/2024-01-01/bastionshareablelink/id_bastionhost.go +++ b/resource-manager/network/2024-01-01/bastionshareablelink/id_bastionhost.go @@ -42,7 +42,7 @@ func ParseBastionHostID(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { } id := BastionHostId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/bastionshareablelink/version.go b/resource-manager/network/2024-01-01/bastionshareablelink/version.go index d402ea51fb7..567bcb3a724 100644 --- a/resource-manager/network/2024-01-01/bastionshareablelink/version.go +++ b/resource-manager/network/2024-01-01/bastionshareablelink/version.go @@ -1,12 +1,10 @@ package bastionshareablelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bastionshareablelink/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/bgpservicecommunities/README.md b/resource-manager/network/2024-01-01/bgpservicecommunities/README.md index cf776ae5177..4eafb5875cd 100644 --- a/resource-manager/network/2024-01-01/bgpservicecommunities/README.md +++ b/resource-manager/network/2024-01-01/bgpservicecommunities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/bgpservicecommunities` Documentation -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `bgpservicecommunities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/bgpservicecommunities/client.go b/resource-manager/network/2024-01-01/bgpservicecommunities/client.go index 07cf4f59649..0fbe7d0bd51 100644 --- a/resource-manager/network/2024-01-01/bgpservicecommunities/client.go +++ b/resource-manager/network/2024-01-01/bgpservicecommunities/client.go @@ -15,7 +15,7 @@ type BgpServiceCommunitiesClient struct { } func NewBgpServiceCommunitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bgpservicecommunities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bgpservicecommunities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/bgpservicecommunities/version.go b/resource-manager/network/2024-01-01/bgpservicecommunities/version.go index d975057c2b0..0565e2dcfea 100644 --- a/resource-manager/network/2024-01-01/bgpservicecommunities/version.go +++ b/resource-manager/network/2024-01-01/bgpservicecommunities/version.go @@ -1,12 +1,10 @@ package bgpservicecommunities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bgpservicecommunities/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/checkdnsavailabilities/README.md b/resource-manager/network/2024-01-01/checkdnsavailabilities/README.md index 5cf6fda9ee7..c04a7cd4f08 100644 --- a/resource-manager/network/2024-01-01/checkdnsavailabilities/README.md +++ b/resource-manager/network/2024-01-01/checkdnsavailabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/checkdnsavailabilities` Documentation -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `checkdnsavailabilities` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/checkdnsavailabilities/client.go b/resource-manager/network/2024-01-01/checkdnsavailabilities/client.go index 14eb1a4baa0..3641ce2ee39 100644 --- a/resource-manager/network/2024-01-01/checkdnsavailabilities/client.go +++ b/resource-manager/network/2024-01-01/checkdnsavailabilities/client.go @@ -15,7 +15,7 @@ type CheckDnsAvailabilitiesClient struct { } func NewCheckDnsAvailabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkdnsavailabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2024-01-01/checkdnsavailabilities/id_location.go index 1adf8c560da..208d2c68c41 100644 --- a/resource-manager/network/2024-01-01/checkdnsavailabilities/id_location.go +++ b/resource-manager/network/2024-01-01/checkdnsavailabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2024-01-01/checkdnsavailabilities/method_checkdnsnameavailability.go index 276e19a8dd4..aa291abadeb 100644 --- a/resource-manager/network/2024-01-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ b/resource-manager/network/2024-01-01/checkdnsavailabilities/method_checkdnsnameavailability.go @@ -34,6 +34,7 @@ func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Conte var model DnsNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/checkdnsavailabilities/version.go b/resource-manager/network/2024-01-01/checkdnsavailabilities/version.go index 18dbe7c6909..ce1f773f953 100644 --- a/resource-manager/network/2024-01-01/checkdnsavailabilities/version.go +++ b/resource-manager/network/2024-01-01/checkdnsavailabilities/version.go @@ -1,12 +1,10 @@ package checkdnsavailabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkdnsavailabilities/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/README.md index b5e97b7d6f5..8892c3607a3 100644 --- a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/README.md +++ b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/cloudservicepublicipaddresses` Documentation -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `cloudservicepublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/client.go index 4eebc5f720f..3ffc0d7ae83 100644 --- a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/client.go +++ b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/client.go @@ -15,7 +15,7 @@ type CloudServicePublicIPAddressesClient struct { } func NewCloudServicePublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudservicepublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/id_providercloudservice.go index 2750d8acfa0..86cef14917e 100644 --- a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go index b3e6c192d39..dabdeb2c12e 100644 --- a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeade func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePub var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/version.go index 382a5160de5..7ef144f8412 100644 --- a/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/version.go +++ b/resource-manager/network/2024-01-01/cloudservicepublicipaddresses/version.go @@ -1,12 +1,10 @@ package cloudservicepublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudservicepublicipaddresses/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/README.md b/resource-manager/network/2024-01-01/connectionmonitors/README.md index 6d972545463..5f672b4b993 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/README.md +++ b/resource-manager/network/2024-01-01/connectionmonitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/connectionmonitors` Documentation -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `connectionmonitors` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/connectionmonitors/client.go b/resource-manager/network/2024-01-01/connectionmonitors/client.go index a8ff516ce50..c23a27cd53b 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/client.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/client.go @@ -15,7 +15,7 @@ type ConnectionMonitorsClient struct { } func NewConnectionMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectionmonitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectionmonitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2024-01-01/connectionmonitors/id_connectionmonitor.go index 10d851fd213..8563d9fa155 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/id_connectionmonitor.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/id_connectionmonitor.go @@ -44,7 +44,7 @@ func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, } id := ConnectionMonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2024-01-01/connectionmonitors/id_networkwatcher.go index c112368b0b7..af556752c60 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/id_networkwatcher.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2024-01-01/connectionmonitors/method_createorupdate.go index f2d252c628d..069036d65fe 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/method_get.go b/resource-manager/network/2024-01-01/connectionmonitors/method_get.go index 883ffbdfd40..8087a322df3 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/method_get.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorI var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/method_list.go b/resource-manager/network/2024-01-01/connectionmonitors/method_list.go index 40de4efcac7..46eea3af26b 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/method_list.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/method_list.go @@ -46,7 +46,6 @@ func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) var model ConnectionMonitorListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2024-01-01/connectionmonitors/method_updatetags.go index 04091a0b16c..e6e1f8be8d1 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/method_updatetags.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/method_updatetags.go @@ -49,7 +49,6 @@ func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionM var model ConnectionMonitorResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/connectionmonitors/version.go b/resource-manager/network/2024-01-01/connectionmonitors/version.go index 49b61ef46d7..b2752694abb 100644 --- a/resource-manager/network/2024-01-01/connectionmonitors/version.go +++ b/resource-manager/network/2024-01-01/connectionmonitors/version.go @@ -1,12 +1,10 @@ package connectionmonitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectionmonitors/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/README.md b/resource-manager/network/2024-01-01/connectivityconfigurations/README.md index e2744412664..6a85d80992b 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/README.md +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/connectivityconfigurations` Documentation -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `connectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/client.go b/resource-manager/network/2024-01-01/connectivityconfigurations/client.go index 7fb783f963a..8d908853770 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/client.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/client.go @@ -15,7 +15,7 @@ type ConnectivityConfigurationsClient struct { } func NewConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2024-01-01/connectivityconfigurations/id_connectivityconfiguration.go index d00d054bd40..c969a2cf413 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/id_connectivityconfiguration.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/id_connectivityconfiguration.go @@ -44,7 +44,7 @@ func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationI } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityC } id := ConnectivityConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2024-01-01/connectivityconfigurations/id_networkmanager.go index 1f7b8c3216b..833ef39fdb4 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2024-01-01/connectivityconfigurations/method_createorupdate.go index 3ad8680898d..e8278cdba63 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2024-01-01/connectivityconfigurations/method_delete.go index 8646fac9ed8..a1c5884b210 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/method_delete.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/method_get.go b/resource-manager/network/2024-01-01/connectivityconfigurations/method_get.go index d8769033b0a..3471bd0faf1 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/method_get.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id Connectivi var model ConnectivityConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/method_list.go b/resource-manager/network/2024-01-01/connectivityconfigurations/method_list.go index 95ba68f0bc1..6663f9e80ae 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/method_list.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/connectivityconfigurations/version.go b/resource-manager/network/2024-01-01/connectivityconfigurations/version.go index cef5b2ac0b6..b5cab46dbb7 100644 --- a/resource-manager/network/2024-01-01/connectivityconfigurations/version.go +++ b/resource-manager/network/2024-01-01/connectivityconfigurations/version.go @@ -1,12 +1,10 @@ package connectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectivityconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/customipprefixes/README.md b/resource-manager/network/2024-01-01/customipprefixes/README.md index 7cb046fc647..d055d4a6d15 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/README.md +++ b/resource-manager/network/2024-01-01/customipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/customipprefixes` Documentation -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `customipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/customipprefixes/client.go b/resource-manager/network/2024-01-01/customipprefixes/client.go index 1e1c6887c4a..2b241f7b0e7 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/client.go +++ b/resource-manager/network/2024-01-01/customipprefixes/client.go @@ -15,7 +15,7 @@ type CustomIPPrefixesClient struct { } func NewCustomIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2024-01-01/customipprefixes/id_customipprefix.go index d4206cbdfb5..5ea825eb6cd 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/id_customipprefix.go +++ b/resource-manager/network/2024-01-01/customipprefixes/id_customipprefix.go @@ -42,7 +42,7 @@ func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) } id := CustomIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/customipprefixes/method_get.go b/resource-manager/network/2024-01-01/customipprefixes/method_get.go index 9215609651a..61164d79480 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/method_get.go +++ b/resource-manager/network/2024-01-01/customipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, op var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/customipprefixes/method_updatetags.go b/resource-manager/network/2024-01-01/customipprefixes/method_updatetags.go index c61802109c3..2962a005ed8 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/method_updatetags.go +++ b/resource-manager/network/2024-01-01/customipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefi var model CustomIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/customipprefixes/version.go b/resource-manager/network/2024-01-01/customipprefixes/version.go index 9dcae76b72d..8f869b3f70b 100644 --- a/resource-manager/network/2024-01-01/customipprefixes/version.go +++ b/resource-manager/network/2024-01-01/customipprefixes/version.go @@ -1,12 +1,10 @@ package customipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customipprefixes/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/README.md b/resource-manager/network/2024-01-01/ddoscustompolicies/README.md index 69f6f0dd778..5002e2cb42f 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/README.md +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/ddoscustompolicies` Documentation -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `ddoscustompolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/client.go b/resource-manager/network/2024-01-01/ddoscustompolicies/client.go index e6985cefaee..93a9d3ac0d4 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/client.go +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/client.go @@ -15,7 +15,7 @@ type DdosCustomPoliciesClient struct { } func NewDdosCustomPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddoscustompolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddoscustompolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2024-01-01/ddoscustompolicies/id_ddoscustompolicy.go index 1898126aafc..5107ae00e4f 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/id_ddoscustompolicy.go +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/id_ddoscustompolicy.go @@ -42,7 +42,7 @@ func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, er } id := DdosCustomPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/method_get.go b/resource-manager/network/2024-01-01/ddoscustompolicies/method_get.go index 07a8cdf6ad0..288dcc99b4a 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/method_get.go +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/method_get.go @@ -45,7 +45,6 @@ func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2024-01-01/ddoscustompolicies/method_updatetags.go index b64aa2cb519..1e74f849d0b 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/method_updatetags.go +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomP var model DdosCustomPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ddoscustompolicies/version.go b/resource-manager/network/2024-01-01/ddoscustompolicies/version.go index 7c681b74b79..eacefcd041a 100644 --- a/resource-manager/network/2024-01-01/ddoscustompolicies/version.go +++ b/resource-manager/network/2024-01-01/ddoscustompolicies/version.go @@ -1,12 +1,10 @@ package ddoscustompolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddoscustompolicies/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/README.md b/resource-manager/network/2024-01-01/ddosprotectionplans/README.md index cd072f59f78..ba83d413b83 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/README.md +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/ddosprotectionplans` Documentation -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `ddosprotectionplans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/client.go b/resource-manager/network/2024-01-01/ddosprotectionplans/client.go index de83f23ea42..e117bf49a8f 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/client.go +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/client.go @@ -15,7 +15,7 @@ type DdosProtectionPlansClient struct { } func NewDdosProtectionPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ddosprotectionplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ddosprotectionplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2024-01-01/ddosprotectionplans/id_ddosprotectionplan.go index 1be4cad64d9..962147e9da0 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/id_ddosprotectionplan.go +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/id_ddosprotectionplan.go @@ -42,7 +42,7 @@ func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId } id := DdosProtectionPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/method_get.go b/resource-manager/network/2024-01-01/ddosprotectionplans/method_get.go index 9003f8a00c3..7a92875442e 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/method_get.go +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/method_get.go @@ -45,7 +45,6 @@ func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPla var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2024-01-01/ddosprotectionplans/method_updatetags.go index 07e469082e6..a5b91c81b71 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/method_updatetags.go +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/method_updatetags.go @@ -49,7 +49,6 @@ func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtec var model DdosProtectionPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ddosprotectionplans/version.go b/resource-manager/network/2024-01-01/ddosprotectionplans/version.go index f6498d84108..23ff3f29901 100644 --- a/resource-manager/network/2024-01-01/ddosprotectionplans/version.go +++ b/resource-manager/network/2024-01-01/ddosprotectionplans/version.go @@ -1,12 +1,10 @@ package ddosprotectionplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ddosprotectionplans/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/dscpconfiguration/README.md b/resource-manager/network/2024-01-01/dscpconfiguration/README.md index 2e4e73a5432..d178515317f 100644 --- a/resource-manager/network/2024-01-01/dscpconfiguration/README.md +++ b/resource-manager/network/2024-01-01/dscpconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/dscpconfiguration` Documentation -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `dscpconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/dscpconfiguration/client.go b/resource-manager/network/2024-01-01/dscpconfiguration/client.go index ed6cfe7aa08..76ab56d4977 100644 --- a/resource-manager/network/2024-01-01/dscpconfiguration/client.go +++ b/resource-manager/network/2024-01-01/dscpconfiguration/client.go @@ -15,7 +15,7 @@ type DscpConfigurationClient struct { } func NewDscpConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2024-01-01/dscpconfiguration/id_dscpconfiguration.go index 8eb56f33d98..f4b606b48f4 100644 --- a/resource-manager/network/2024-01-01/dscpconfiguration/id_dscpconfiguration.go +++ b/resource-manager/network/2024-01-01/dscpconfiguration/id_dscpconfiguration.go @@ -42,7 +42,7 @@ func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, } id := DscpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/dscpconfiguration/method_get.go b/resource-manager/network/2024-01-01/dscpconfiguration/method_get.go index 1563a9b978b..cb94f50eba5 100644 --- a/resource-manager/network/2024-01-01/dscpconfiguration/method_get.go +++ b/resource-manager/network/2024-01-01/dscpconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId var model DscpConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/dscpconfiguration/version.go b/resource-manager/network/2024-01-01/dscpconfiguration/version.go index a3feaa39640..c113a02556c 100644 --- a/resource-manager/network/2024-01-01/dscpconfiguration/version.go +++ b/resource-manager/network/2024-01-01/dscpconfiguration/version.go @@ -1,12 +1,10 @@ package dscpconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfiguration/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/dscpconfigurations/README.md b/resource-manager/network/2024-01-01/dscpconfigurations/README.md index e801fe9cc08..de209ef1750 100644 --- a/resource-manager/network/2024-01-01/dscpconfigurations/README.md +++ b/resource-manager/network/2024-01-01/dscpconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/dscpconfigurations` Documentation -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `dscpconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/dscpconfigurations/client.go b/resource-manager/network/2024-01-01/dscpconfigurations/client.go index ef38b8d0533..f8740f737f6 100644 --- a/resource-manager/network/2024-01-01/dscpconfigurations/client.go +++ b/resource-manager/network/2024-01-01/dscpconfigurations/client.go @@ -15,7 +15,7 @@ type DscpConfigurationsClient struct { } func NewDscpConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dscpconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dscpconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/dscpconfigurations/version.go b/resource-manager/network/2024-01-01/dscpconfigurations/version.go index 82c9311c21a..304140bf764 100644 --- a/resource-manager/network/2024-01-01/dscpconfigurations/version.go +++ b/resource-manager/network/2024-01-01/dscpconfigurations/version.go @@ -1,12 +1,10 @@ package dscpconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dscpconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/endpointservices/README.md b/resource-manager/network/2024-01-01/endpointservices/README.md index d4684934dff..f5090edb58f 100644 --- a/resource-manager/network/2024-01-01/endpointservices/README.md +++ b/resource-manager/network/2024-01-01/endpointservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/endpointservices` Documentation -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `endpointservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/endpointservices/client.go b/resource-manager/network/2024-01-01/endpointservices/client.go index c04faa1ffd8..44e82b37c46 100644 --- a/resource-manager/network/2024-01-01/endpointservices/client.go +++ b/resource-manager/network/2024-01-01/endpointservices/client.go @@ -15,7 +15,7 @@ type EndpointServicesClient struct { } func NewEndpointServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/endpointservices/id_location.go b/resource-manager/network/2024-01-01/endpointservices/id_location.go index b3f9df03861..bc549e11a00 100644 --- a/resource-manager/network/2024-01-01/endpointservices/id_location.go +++ b/resource-manager/network/2024-01-01/endpointservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/endpointservices/version.go b/resource-manager/network/2024-01-01/endpointservices/version.go index 49cbea98867..676c9f4b22e 100644 --- a/resource-manager/network/2024-01-01/endpointservices/version.go +++ b/resource-manager/network/2024-01-01/endpointservices/version.go @@ -1,12 +1,10 @@ package endpointservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointservices/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitarptable/README.md b/resource-manager/network/2024-01-01/expressroutecircuitarptable/README.md index c398c31319f..855691ec15d 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitarptable/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitarptable` Documentation -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitarptable/client.go b/resource-manager/network/2024-01-01/expressroutecircuitarptable/client.go index a927b3e2a41..b13a5d9774e 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitarptable/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitArpTableClient struct { } func NewExpressRouteCircuitArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2024-01-01/expressroutecircuitarptable/id_arptable.go index c01410283c1..af630a9dd1a 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitarptable/id_arptable.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitarptable/id_arptable.go @@ -46,7 +46,7 @@ func ParseArpTableID(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { } id := ArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitarptable/version.go b/resource-manager/network/2024-01-01/expressroutecircuitarptable/version.go index c8627ec7856..3e90d63b909 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitarptable/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitarptable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitarptable/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/README.md index 4008ebff991..507a68669ac 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitauthorizations` Documentation -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/client.go index 8060a80be1e..2d3988ae8a8 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitAuthorizationsClient struct { } func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_authorization.go index b659c5a5b8c..430deb067c3 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_authorization.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_expressroutecircuit.go index a46fa52bf5d..b80003e486f 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/method_get.go index 19e783a8675..823c3b06cfc 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id Aut var model ExpressRouteCircuitAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/version.go index a162f67150a..5ddd0a4216f 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitauthorizations/version.go @@ -1,12 +1,10 @@ package expressroutecircuitauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitauthorizations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitconnections/README.md b/resource-manager/network/2024-01-01/expressroutecircuitconnections/README.md index bb30c8dda10..7cf51ae9e85 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitconnections/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitconnections` Documentation -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitconnections/client.go b/resource-manager/network/2024-01-01/expressroutecircuitconnections/client.go index 333eff0e189..6ce57a4cb92 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitconnections/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitConnectionsClient struct { } func NewExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2024-01-01/expressroutecircuitconnections/id_peeringconnection.go index 0e2e6d6c894..c789977d4fc 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitconnections/id_peeringconnection.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitconnections/id_peeringconnection.go @@ -46,7 +46,7 @@ func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, } id := PeeringConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2024-01-01/expressroutecircuitconnections/method_get.go index 0a4a18dd7cc..ca510dffdd4 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Peerin var model ExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitconnections/version.go b/resource-manager/network/2024-01-01/expressroutecircuitconnections/version.go index 0d2415b4bdd..2dc67f4715c 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitconnections/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package expressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/README.md index 5de24b5c4d3..b9b203f03af 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitpeerings` Documentation -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/client.go index 63ac4daefad..ce7c06a4f7b 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitPeeringsClient struct { } func NewExpressRouteCircuitPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/id_expressroutecircuit.go index 51f74b9a362..71e57edae8c 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/method_get.go index 0937d0e96a9..217363c38a1 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/method_get.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids var model ExpressRouteCircuitPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/version.go index b6eca6dd69b..25259923881 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitpeerings/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecircuitpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitpeerings/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/README.md index dd36f0e9b37..c6fb9f89815 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitroutestable` Documentation -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitroutestable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/client.go index 925b7f29bae..64933522e0c 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableClient struct { } func NewExpressRouteCircuitRoutesTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/id_peeringroutetable.go index 895e343bf35..e2aeb69ec6d 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/id_peeringroutetable.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, } id := PeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/version.go index 90494bd9eb5..72a2105d5ad 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestable/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestable/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestable/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/README.md index 0a69e6e2997..448538a37d0 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary` Documentation -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitroutestablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/client.go index 5565926cb76..1964d42b872 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitRoutesTableSummaryClient struct { } func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitroutestablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/id_routetablessummary.go index 16c5b0c301a..23c30e2e03b 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/id_routetablessummary.go @@ -46,7 +46,7 @@ func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId } id := RouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/version.go index e6872b3bb34..57f486f201a 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitroutestablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecircuitroutestablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/README.md b/resource-manager/network/2024-01-01/expressroutecircuits/README.md index bf0471973b2..a55cb1c9cec 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuits/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuits` Documentation -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuits` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/client.go b/resource-manager/network/2024-01-01/expressroutecircuits/client.go index cd12ab163e6..e618de82828 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuits/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitsClient struct { } func NewExpressRouteCircuitsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuits", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuits", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2024-01-01/expressroutecircuits/id_expressroutecircuit.go index d48e8e429e7..cd8d55cab28 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/id_expressroutecircuit.go +++ b/resource-manager/network/2024-01-01/expressroutecircuits/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/method_get.go b/resource-manager/network/2024-01-01/expressroutecircuits/method_get.go index 2047441e60b..f44a9d7ab3d 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecircuits/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCirc var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2024-01-01/expressroutecircuits/method_updatetags.go index 8426eb683b2..2188a40d783 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/method_updatetags.go +++ b/resource-manager/network/2024-01-01/expressroutecircuits/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRo var model ExpressRouteCircuit result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuits/version.go b/resource-manager/network/2024-01-01/expressroutecircuits/version.go index 5a8c32488a0..015f7ce1607 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuits/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuits/version.go @@ -1,12 +1,10 @@ package expressroutecircuits -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuits/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/README.md b/resource-manager/network/2024-01-01/expressroutecircuitstats/README.md index 4b6c133697d..9ecdc63e863 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/README.md +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecircuitstats` Documentation -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecircuitstats` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/client.go b/resource-manager/network/2024-01-01/expressroutecircuitstats/client.go index 43a397e1cc1..697e4ff2817 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/client.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/client.go @@ -15,7 +15,7 @@ type ExpressRouteCircuitStatsClient struct { } func NewExpressRouteCircuitStatsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecircuitstats", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2024-01-01/expressroutecircuitstats/id_expressroutecircuit.go index cf235dfe96f..82dec662360 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/id_expressroutecircuit.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/id_expressroutecircuit.go @@ -42,7 +42,7 @@ func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuit } id := ExpressRouteCircuitId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go index 5473e8458e6..14b01a4f877 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go @@ -47,7 +47,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go index 4bd3c09b58e..093f31815f0 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go @@ -46,7 +46,6 @@ func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context var model ExpressRouteCircuitStats result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecircuitstats/version.go b/resource-manager/network/2024-01-01/expressroutecircuitstats/version.go index b543abd1a07..38ba87c545e 100644 --- a/resource-manager/network/2024-01-01/expressroutecircuitstats/version.go +++ b/resource-manager/network/2024-01-01/expressroutecircuitstats/version.go @@ -1,12 +1,10 @@ package expressroutecircuitstats -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecircuitstats/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/README.md b/resource-manager/network/2024-01-01/expressrouteconnections/README.md index 35b2b4c9187..d558a9a408c 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/README.md +++ b/resource-manager/network/2024-01-01/expressrouteconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteconnections` Documentation -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/client.go b/resource-manager/network/2024-01-01/expressrouteconnections/client.go index 59b056f90da..379d1d22880 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/client.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteConnectionsClient struct { } func NewExpressRouteConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2024-01-01/expressrouteconnections/id_expressrouteconnection.go index 7bba12f409b..53f6b3e5750 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/id_expressrouteconnection.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/id_expressrouteconnection.go @@ -44,7 +44,7 @@ func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, err } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConn } id := ExpressRouteConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2024-01-01/expressrouteconnections/id_expressroutegateway.go index 6df37b9a7d8..c5fcbe2791f 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/id_expressroutegateway.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/method_get.go b/resource-manager/network/2024-01-01/expressrouteconnections/method_get.go index ae0992fa45d..0116eaca5cf 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/method_get.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteC var model ExpressRouteConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/method_list.go b/resource-manager/network/2024-01-01/expressrouteconnections/method_list.go index e9090e1dd56..d6233e938c4 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/method_list.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/method_list.go @@ -46,7 +46,6 @@ func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRoute var model ExpressRouteConnectionList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteconnections/version.go b/resource-manager/network/2024-01-01/expressrouteconnections/version.go index 5102a68c7f8..071a5f61e53 100644 --- a/resource-manager/network/2024-01-01/expressrouteconnections/version.go +++ b/resource-manager/network/2024-01-01/expressrouteconnections/version.go @@ -1,12 +1,10 @@ package expressrouteconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/README.md index 5656b292d2b..a011f2e7d6a 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/README.md +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable` Documentation -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecrossconnectionarptable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/client.go index 07328f2f394..57ec192ecdb 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/client.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionArpTableClient struct { } func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionarptable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/id_peeringarptable.go index a90eea8a4cb..7f32dee4270 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/id_peeringarptable.go @@ -46,7 +46,7 @@ func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, erro } id := PeeringArpTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/version.go index 43cc81982a7..765b6b74a9c 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/version.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionarptable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionarptable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/README.md index b14545618ca..6ed53125328 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/README.md +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings` Documentation -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecrossconnectionpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/client.go index 90cbc899dcb..d2b06fe732d 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/client.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionPeeringsClient struct { } func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go index 626b69cff73..2099c7eab97 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_peering.go index f9e45b10c99..5b91cc2c7b0 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_peering.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/id_peering.go @@ -44,7 +44,7 @@ func ParsePeeringID(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { } id := PeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/method_get.go index b53171627d6..4fbd73485bb 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id P var model ExpressRouteCrossConnectionPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/version.go index e19616a8ad0..d5171bff2b7 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/version.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionpeerings/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/README.md index 806fbcafbc1..b97adef917e 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/README.md +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable` Documentation -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecrossconnectionroutetable` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/client.go index 210d81d68a9..6b8b935dba0 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/client.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableClient struct { } func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetable", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go index 9a8910626cd..6067ee919b6 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go @@ -46,7 +46,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*Express } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input stri } id := ExpressRouteCrossConnectionPeeringRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/version.go index 5826b5d8e31..34ddedf8635 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/version.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetable/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetable -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/README.md index dc2cb07abaa..00ffc8f7181 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/README.md +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary` Documentation -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/client.go index 5329fa515af..aaf83cd3840 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/client.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionRouteTableSummaryClient struct { } func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go index ea69383cd3a..5dffd985897 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go @@ -46,7 +46,7 @@ func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryI } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteT } id := PeeringRouteTablesSummaryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/version.go index 059137891f0..a896dd5fc95 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/version.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnectionroutetablesummary/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnectionroutetablesummary -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/README.md b/resource-manager/network/2024-01-01/expressroutecrossconnections/README.md index 34cd29a14d1..ebf3f6ded12 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/README.md +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutecrossconnections` Documentation -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutecrossconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/client.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/client.go index 67aa896c58d..5df85aad3d6 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/client.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/client.go @@ -15,7 +15,7 @@ type ExpressRouteCrossConnectionsClient struct { } func NewExpressRouteCrossConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutecrossconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/id_expressroutecrossconnection.go index 3748db0d3a2..8128cf4c67c 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/id_expressroutecrossconnection.go @@ -42,7 +42,7 @@ func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnect } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRout } id := ExpressRouteCrossConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_get.go index 250556ca005..e68e3ddc46d 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressR var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_list.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_list.go index af589ec0b8f..402193d8419 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_list.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_updatetags.go index 0c627c7653a..e55953bde8f 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/method_updatetags.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id E var model ExpressRouteCrossConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutecrossconnections/version.go b/resource-manager/network/2024-01-01/expressroutecrossconnections/version.go index 7097b6015fd..73fff6b81e4 100644 --- a/resource-manager/network/2024-01-01/expressroutecrossconnections/version.go +++ b/resource-manager/network/2024-01-01/expressroutecrossconnections/version.go @@ -1,12 +1,10 @@ package expressroutecrossconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutecrossconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/README.md b/resource-manager/network/2024-01-01/expressroutegateways/README.md index b24e536c464..311ac678467 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/README.md +++ b/resource-manager/network/2024-01-01/expressroutegateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutegateways` Documentation -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutegateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutegateways/client.go b/resource-manager/network/2024-01-01/expressroutegateways/client.go index a1f21a852ef..292ef72ff7b 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/client.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/client.go @@ -15,7 +15,7 @@ type ExpressRouteGatewaysClient struct { } func NewExpressRouteGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutegateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutegateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2024-01-01/expressroutegateways/id_expressroutegateway.go index 0e06d43d298..6c356e20fd4 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/id_expressroutegateway.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/id_expressroutegateway.go @@ -42,7 +42,7 @@ func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGateway } id := ExpressRouteGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/method_get.go b/resource-manager/network/2024-01-01/expressroutegateways/method_get.go index 74f38c464bb..3fe9ab488d0 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGate var model ExpressRouteGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2024-01-01/expressroutegateways/method_listbyresourcegroup.go index 4676a67757a..f76de802a39 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/method_listbyresourcegroup.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2024-01-01/expressroutegateways/method_listbysubscription.go index ba74ca537ae..840cb62145e 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/method_listbysubscription.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id c var model ExpressRouteGatewayList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutegateways/version.go b/resource-manager/network/2024-01-01/expressroutegateways/version.go index 06d64b5b71f..f8bdf09f7dc 100644 --- a/resource-manager/network/2024-01-01/expressroutegateways/version.go +++ b/resource-manager/network/2024-01-01/expressroutegateways/version.go @@ -1,12 +1,10 @@ package expressroutegateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutegateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressroutelinks/README.md b/resource-manager/network/2024-01-01/expressroutelinks/README.md index d2109b95c7d..d1d984518bd 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/README.md +++ b/resource-manager/network/2024-01-01/expressroutelinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressroutelinks` Documentation -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressroutelinks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressroutelinks/client.go b/resource-manager/network/2024-01-01/expressroutelinks/client.go index 42ba283bf4a..5b75ccca68f 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/client.go +++ b/resource-manager/network/2024-01-01/expressroutelinks/client.go @@ -15,7 +15,7 @@ type ExpressRouteLinksClient struct { } func NewExpressRouteLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressroutelinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressroutelinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2024-01-01/expressroutelinks/id_expressrouteport.go index fdf651cde65..e0aa12c1e5e 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/id_expressrouteport.go +++ b/resource-manager/network/2024-01-01/expressroutelinks/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutelinks/id_link.go b/resource-manager/network/2024-01-01/expressroutelinks/id_link.go index ff86b5a2798..b90097eb095 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/id_link.go +++ b/resource-manager/network/2024-01-01/expressroutelinks/id_link.go @@ -44,7 +44,7 @@ func ParseLinkID(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkIDInsensitively(input string) (*LinkId, error) { } id := LinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressroutelinks/method_get.go b/resource-manager/network/2024-01-01/expressroutelinks/method_get.go index 25857a7f294..3f132947b99 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/method_get.go +++ b/resource-manager/network/2024-01-01/expressroutelinks/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result Get var model ExpressRouteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressroutelinks/version.go b/resource-manager/network/2024-01-01/expressroutelinks/version.go index f69c6ab7ccf..771959de5df 100644 --- a/resource-manager/network/2024-01-01/expressroutelinks/version.go +++ b/resource-manager/network/2024-01-01/expressroutelinks/version.go @@ -1,12 +1,10 @@ package expressroutelinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressroutelinks/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/README.md b/resource-manager/network/2024-01-01/expressrouteportauthorizations/README.md index ff63441aca5..15950298b78 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/README.md +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteportauthorizations` Documentation -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteportauthorizations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/client.go b/resource-manager/network/2024-01-01/expressrouteportauthorizations/client.go index a6a1e906e85..3405a1acb86 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/client.go +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortAuthorizationsClient struct { } func NewExpressRoutePortAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportauthorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteport.go index 9fffd1964c0..0c4d2182b84 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteport.go +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteportauthorization.go index 4042eea1718..ae293d47f93 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/id_expressrouteportauthorization.go @@ -44,7 +44,7 @@ func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthor } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRo } id := ExpressRoutePortAuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2024-01-01/expressrouteportauthorizations/method_get.go index 0dd81644eba..c8df23b8dfd 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/method_get.go +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id Expres var model ExpressRoutePortAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteportauthorizations/version.go b/resource-manager/network/2024-01-01/expressrouteportauthorizations/version.go index 71364ed102d..674ed7efe54 100644 --- a/resource-manager/network/2024-01-01/expressrouteportauthorizations/version.go +++ b/resource-manager/network/2024-01-01/expressrouteportauthorizations/version.go @@ -1,12 +1,10 @@ package expressrouteportauthorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportauthorizations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteports/README.md b/resource-manager/network/2024-01-01/expressrouteports/README.md index 2dc01254bab..25671d5ba91 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/README.md +++ b/resource-manager/network/2024-01-01/expressrouteports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteports` Documentation -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteports/client.go b/resource-manager/network/2024-01-01/expressrouteports/client.go index 7b73cfca2af..82e57d5b54f 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/client.go +++ b/resource-manager/network/2024-01-01/expressrouteports/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsClient struct { } func NewExpressRoutePortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2024-01-01/expressrouteports/id_expressrouteport.go index 6ac3a3831e8..eb751415586 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/id_expressrouteport.go +++ b/resource-manager/network/2024-01-01/expressrouteports/id_expressrouteport.go @@ -42,7 +42,7 @@ func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, er } id := ExpressRoutePortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteports/method_generateloa.go b/resource-manager/network/2024-01-01/expressrouteports/method_generateloa.go index d0010451bf9..d5725e743a6 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/method_generateloa.go +++ b/resource-manager/network/2024-01-01/expressrouteports/method_generateloa.go @@ -50,7 +50,6 @@ func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRout var model GenerateExpressRoutePortsLOAResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteports/method_get.go b/resource-manager/network/2024-01-01/expressrouteports/method_get.go index 0f35b842ad6..dda9cada850 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/method_get.go +++ b/resource-manager/network/2024-01-01/expressrouteports/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteports/method_updatetags.go b/resource-manager/network/2024-01-01/expressrouteports/method_updatetags.go index fef0242df71..7ce98b9327b 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/method_updatetags.go +++ b/resource-manager/network/2024-01-01/expressrouteports/method_updatetags.go @@ -49,7 +49,6 @@ func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoute var model ExpressRoutePort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteports/version.go b/resource-manager/network/2024-01-01/expressrouteports/version.go index 31813ca97bb..05c77abf346 100644 --- a/resource-manager/network/2024-01-01/expressrouteports/version.go +++ b/resource-manager/network/2024-01-01/expressrouteports/version.go @@ -1,12 +1,10 @@ package expressrouteports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteports/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteportslocations/README.md b/resource-manager/network/2024-01-01/expressrouteportslocations/README.md index fc3689b53b5..82eb8ada031 100644 --- a/resource-manager/network/2024-01-01/expressrouteportslocations/README.md +++ b/resource-manager/network/2024-01-01/expressrouteportslocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteportslocations` Documentation -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteportslocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteportslocations/client.go b/resource-manager/network/2024-01-01/expressrouteportslocations/client.go index 070961a7825..11ea98b6cb3 100644 --- a/resource-manager/network/2024-01-01/expressrouteportslocations/client.go +++ b/resource-manager/network/2024-01-01/expressrouteportslocations/client.go @@ -15,7 +15,7 @@ type ExpressRoutePortsLocationsClient struct { } func NewExpressRoutePortsLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteportslocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteportslocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2024-01-01/expressrouteportslocations/id_expressrouteportslocation.go index 94e09ce7a77..2c3e6ea91b2 100644 --- a/resource-manager/network/2024-01-01/expressrouteportslocations/id_expressrouteportslocation.go +++ b/resource-manager/network/2024-01-01/expressrouteportslocations/id_expressrouteportslocation.go @@ -40,7 +40,7 @@ func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationI } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRouteP } id := ExpressRoutePortsLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteportslocations/method_get.go b/resource-manager/network/2024-01-01/expressrouteportslocations/method_get.go index 58048a2240a..41422952079 100644 --- a/resource-manager/network/2024-01-01/expressrouteportslocations/method_get.go +++ b/resource-manager/network/2024-01-01/expressrouteportslocations/method_get.go @@ -45,7 +45,6 @@ func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRou var model ExpressRoutePortsLocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteportslocations/version.go b/resource-manager/network/2024-01-01/expressrouteportslocations/version.go index e8620892046..be16ed5c6c7 100644 --- a/resource-manager/network/2024-01-01/expressrouteportslocations/version.go +++ b/resource-manager/network/2024-01-01/expressrouteportslocations/version.go @@ -1,12 +1,10 @@ package expressrouteportslocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteportslocations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/README.md b/resource-manager/network/2024-01-01/expressrouteproviderports/README.md index 81e2483a70a..b39cc0bbfdf 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/README.md +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteproviderports` Documentation -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteproviderports` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/client.go b/resource-manager/network/2024-01-01/expressrouteproviderports/client.go index 696d17bbfd6..dad656ec6d0 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/client.go +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/client.go @@ -15,7 +15,7 @@ type ExpressRouteProviderPortsClient struct { } func NewExpressRouteProviderPortsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteproviderports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteproviderports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2024-01-01/expressrouteproviderports/id_expressrouteproviderport.go index 2e734bb82c3..b8d7c961646 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/id_expressrouteproviderport.go +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/id_expressrouteproviderport.go @@ -40,7 +40,7 @@ func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRoutePr } id := ExpressRouteProviderPortId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2024-01-01/expressrouteproviderports/method_expressrouteproviderport.go index 95cb93096c7..c264bf3b8aa 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/method_expressrouteproviderport.go +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/method_expressrouteproviderport.go @@ -45,7 +45,6 @@ func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Co var model ExpressRouteProviderPort result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2024-01-01/expressrouteproviderports/method_locationlist.go index ad8f2e59e37..93d35794cf0 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/method_locationlist.go +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/method_locationlist.go @@ -40,6 +40,7 @@ func (o LocationListOperationOptions) ToHeaders() *client.Headers { func (o LocationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/expressrouteproviderports/version.go b/resource-manager/network/2024-01-01/expressrouteproviderports/version.go index 956f9fcf59c..ffc831ddb34 100644 --- a/resource-manager/network/2024-01-01/expressrouteproviderports/version.go +++ b/resource-manager/network/2024-01-01/expressrouteproviderports/version.go @@ -1,12 +1,10 @@ package expressrouteproviderports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteproviderports/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/expressrouteserviceproviders/README.md b/resource-manager/network/2024-01-01/expressrouteserviceproviders/README.md index 11e66d75bc8..fd0a05f3e9d 100644 --- a/resource-manager/network/2024-01-01/expressrouteserviceproviders/README.md +++ b/resource-manager/network/2024-01-01/expressrouteserviceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/expressrouteserviceproviders` Documentation -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `expressrouteserviceproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/expressrouteserviceproviders/client.go b/resource-manager/network/2024-01-01/expressrouteserviceproviders/client.go index d071b668e37..a20fad2a136 100644 --- a/resource-manager/network/2024-01-01/expressrouteserviceproviders/client.go +++ b/resource-manager/network/2024-01-01/expressrouteserviceproviders/client.go @@ -15,7 +15,7 @@ type ExpressRouteServiceProvidersClient struct { } func NewExpressRouteServiceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "expressrouteserviceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/expressrouteserviceproviders/version.go b/resource-manager/network/2024-01-01/expressrouteserviceproviders/version.go index 382c55b65d8..ff07801c05d 100644 --- a/resource-manager/network/2024-01-01/expressrouteserviceproviders/version.go +++ b/resource-manager/network/2024-01-01/expressrouteserviceproviders/version.go @@ -1,12 +1,10 @@ package expressrouteserviceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/expressrouteserviceproviders/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/README.md b/resource-manager/network/2024-01-01/firewallpolicies/README.md index 344800f8260..390a8cd9475 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/README.md +++ b/resource-manager/network/2024-01-01/firewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/firewallpolicies` Documentation -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `firewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/firewallpolicies/client.go b/resource-manager/network/2024-01-01/firewallpolicies/client.go index a162ae7a1c4..fba92b74070 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/client.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/client.go @@ -15,7 +15,7 @@ type FirewallPoliciesClient struct { } func NewFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2024-01-01/firewallpolicies/id_firewallpolicy.go index b3ab374101c..c441314efdf 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/id_firewallpolicy.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/id_rulecollectiongroup.go b/resource-manager/network/2024-01-01/firewallpolicies/id_rulecollectiongroup.go index 8e6983cfa1e..591654414d8 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/id_rulecollectiongroup.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go index 357da5c76f6..a355d78a767 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftscreateorupdate.go @@ -51,7 +51,6 @@ func (c FirewallPoliciesClient) FirewallPolicyDraftsCreateOrUpdate(ctx context.C var model FirewallPolicyDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftsget.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftsget.go index 19de14230bb..804027dd952 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftsget.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicydraftsget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyDraftsGet(ctx context.Context, id var model FirewallPolicyDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go index e13bba542e4..afb4f37a3fa 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx var model SignatureOverridesFilterValuesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go index 3317a5b3046..657d39e5a74 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Con var model QueryResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go index 0a494459f55..4ff22b6ea42 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go index 0fb145a6c0c..253dc4d8073 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx co var model SignaturesOverridesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go index 99eb2fc1d38..ebb6a03296b 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx c var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go index 2b131f1a401..51a0cf8dcc5 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go @@ -50,7 +50,6 @@ func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx con var model SignaturesOverrides result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go index 19def263e37..168eab6a2f2 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftscreateorupdate.go @@ -51,7 +51,6 @@ func (c FirewallPoliciesClient) FirewallPolicyRuleCollectionGroupDraftsCreateOrU var model FirewallPolicyRuleCollectionGroupDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go index 46a0e076225..8d2027a6a40 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_firewallpolicyrulecollectiongroupdraftsget.go @@ -46,7 +46,6 @@ func (c FirewallPoliciesClient) FirewallPolicyRuleCollectionGroupDraftsGet(ctx c var model FirewallPolicyRuleCollectionGroupDraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_get.go b/resource-manager/network/2024-01-01/firewallpolicies/method_get.go index 2eee26d038a..c57af3124f0 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_get.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, op var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2024-01-01/firewallpolicies/method_updatetags.go index 05b103ecce7..66cfb5cb6d4 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/method_updatetags.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolic var model FirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_applicationrule.go b/resource-manager/network/2024-01-01/firewallpolicies/model_applicationrule.go index 29202064c8a..f7d2f0c3f47 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_applicationrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_applicationrule.go @@ -23,8 +23,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -38,9 +48,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go index 53b5f41f1d3..0379a0ff5e5 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicynatrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicynatrulecollection.go index 71ddc01e8c2..4a6e1344bb4 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrule.go b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrule.go index 057fc40d54f..385badd2b65 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollection.go index 69c3d27a2bb..2c0d838efc3 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go index 376fd8c32ec..a23a09eeeaa 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_firewallpolicyrulecollectiongroupdraftproperties.go @@ -39,7 +39,7 @@ func (s *FirewallPolicyRuleCollectionGroupDraftProperties) UnmarshalJSON(bytes [ output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupDraftProperties': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_natrule.go b/resource-manager/network/2024-01-01/firewallpolicies/model_natrule.go index 0c83394fd20..29ada8c31d1 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_natrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicies/model_networkrule.go b/resource-manager/network/2024-01-01/firewallpolicies/model_networkrule.go index 95108d1b710..aa890c1a8bb 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/model_networkrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicies/version.go b/resource-manager/network/2024-01-01/firewallpolicies/version.go index 596e85e2740..c14c7f410d4 100644 --- a/resource-manager/network/2024-01-01/firewallpolicies/version.go +++ b/resource-manager/network/2024-01-01/firewallpolicies/version.go @@ -1,12 +1,10 @@ package firewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicies/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/README.md index 7e087e39958..06683014bef 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/README.md +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups` Documentation -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `firewallpolicyrulecollectiongroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/client.go index ef562ceb4a0..2c48ff99f6d 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/client.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/client.go @@ -15,7 +15,7 @@ type FirewallPolicyRuleCollectionGroupsClient struct { } func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallpolicyrulecollectiongroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go index 9a3d14e2193..d2fd507040f 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go @@ -42,7 +42,7 @@ func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) } id := FirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go index 5af7b6ffe79..d44dae3a1f1 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go @@ -44,7 +44,7 @@ func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroup } id := RuleCollectionGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/method_get.go index 9c1602d7177..2f494c21970 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/method_get.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/method_get.go @@ -45,7 +45,6 @@ func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id Ru var model FirewallPolicyRuleCollectionGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_applicationrule.go index 3e2815413ed..00f2de60a64 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_applicationrule.go @@ -23,8 +23,18 @@ type ApplicationRule struct { WebCategories *[]string `json:"webCategories,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s ApplicationRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = ApplicationRule{} @@ -38,9 +48,10 @@ func (s ApplicationRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) } + decoded["ruleType"] = "ApplicationRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go index 6e9762da492..dc9f5bf1ae5 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyFilterRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyFilterRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go index 114889c0540..3a831856445 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go @@ -15,8 +15,18 @@ type FirewallPolicyNatRuleCollection struct { Rules *[]FirewallPolicyRule `json:"rules,omitempty"` // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` + + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s FirewallPolicyNatRuleCollection) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return BaseFirewallPolicyRuleCollectionImpl{ + Name: s.Name, + Priority: s.Priority, + RuleCollectionType: s.RuleCollectionType, + } } var _ json.Marshaler = FirewallPolicyNatRuleCollection{} @@ -30,9 +40,10 @@ func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) } + decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { s.Action = decoded.Action s.Name = decoded.Name s.Priority = decoded.Priority + s.RuleCollectionType = decoded.RuleCollectionType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +81,7 @@ func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { output := make([]FirewallPolicyRule, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go index 5cd71ef998a..f96fbf78c6e 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRule interface { + FirewallPolicyRule() BaseFirewallPolicyRuleImpl } -// RawFirewallPolicyRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRule = BaseFirewallPolicyRuleImpl{} + +type BaseFirewallPolicyRuleImpl struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s BaseFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s +} + +var _ FirewallPolicyRule = RawFirewallPolicyRuleImpl{} + +// RawFirewallPolicyRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRule BaseFirewallPolicyRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleImpl) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return s.firewallPolicyRule } -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { +func UnmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { if input == nil { return nil, nil } @@ -60,10 +79,15 @@ func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule return out, nil } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleImpl{ + firewallPolicyRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go index 30f1b958dc8..95e10cb00f1 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FirewallPolicyRuleCollection interface { + FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl } -// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FirewallPolicyRuleCollection = BaseFirewallPolicyRuleCollectionImpl{} + +type BaseFirewallPolicyRuleCollectionImpl struct { + Name *string `json:"name,omitempty"` + Priority *int64 `json:"priority,omitempty"` + RuleCollectionType FirewallPolicyRuleCollectionType `json:"ruleCollectionType"` +} + +func (s BaseFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s +} + +var _ FirewallPolicyRuleCollection = RawFirewallPolicyRuleCollectionImpl{} + +// RawFirewallPolicyRuleCollectionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFirewallPolicyRuleCollectionImpl struct { - Type string - Values map[string]interface{} + firewallPolicyRuleCollection BaseFirewallPolicyRuleCollectionImpl + Type string + Values map[string]interface{} +} + +func (s RawFirewallPolicyRuleCollectionImpl) FirewallPolicyRuleCollection() BaseFirewallPolicyRuleCollectionImpl { + return s.firewallPolicyRuleCollection } -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { +func UnmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (Firewall return out, nil } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, + var parent BaseFirewallPolicyRuleCollectionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFirewallPolicyRuleCollectionImpl: %+v", err) } - return out, nil + + return RawFirewallPolicyRuleCollectionImpl{ + firewallPolicyRuleCollection: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go index e395e7aa41f..f06c3ac6b19 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go @@ -41,7 +41,7 @@ func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte output := make([]FirewallPolicyRuleCollection, 0) for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) + impl, err := UnmarshalFirewallPolicyRuleCollectionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_natrule.go index 5354374d68c..2e80421cd23 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_natrule.go @@ -21,8 +21,18 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NatRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NatRule{} @@ -36,9 +46,10 @@ func (s NatRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) } + decoded["ruleType"] = "NatRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_networkrule.go index 7548f48a194..90231437759 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/model_networkrule.go @@ -20,8 +20,18 @@ type NetworkRule struct { SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + RuleType FirewallPolicyRuleType `json:"ruleType"` +} + +func (s NetworkRule) FirewallPolicyRule() BaseFirewallPolicyRuleImpl { + return BaseFirewallPolicyRuleImpl{ + Description: s.Description, + Name: s.Name, + RuleType: s.RuleType, + } } var _ json.Marshaler = NetworkRule{} @@ -35,9 +45,10 @@ func (s NetworkRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) } + decoded["ruleType"] = "NetworkRule" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/version.go index be70c5b884d..b9d893d56ef 100644 --- a/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/version.go +++ b/resource-manager/network/2024-01-01/firewallpolicyrulecollectiongroups/version.go @@ -1,12 +1,10 @@ package firewallpolicyrulecollectiongroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/flowlogs/README.md b/resource-manager/network/2024-01-01/flowlogs/README.md index b3358728d02..1fbe32551fa 100644 --- a/resource-manager/network/2024-01-01/flowlogs/README.md +++ b/resource-manager/network/2024-01-01/flowlogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/flowlogs` Documentation -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `flowlogs` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/flowlogs/client.go b/resource-manager/network/2024-01-01/flowlogs/client.go index 9368055263b..6294aac5774 100644 --- a/resource-manager/network/2024-01-01/flowlogs/client.go +++ b/resource-manager/network/2024-01-01/flowlogs/client.go @@ -15,7 +15,7 @@ type FlowLogsClient struct { } func NewFlowLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flowlogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flowlogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/flowlogs/id_flowlog.go b/resource-manager/network/2024-01-01/flowlogs/id_flowlog.go index 65f0fddaf41..5a9f158bbac 100644 --- a/resource-manager/network/2024-01-01/flowlogs/id_flowlog.go +++ b/resource-manager/network/2024-01-01/flowlogs/id_flowlog.go @@ -44,7 +44,7 @@ func ParseFlowLogID(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { } id := FlowLogId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2024-01-01/flowlogs/id_networkwatcher.go index 480aa5be344..63ae4829745 100644 --- a/resource-manager/network/2024-01-01/flowlogs/id_networkwatcher.go +++ b/resource-manager/network/2024-01-01/flowlogs/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/flowlogs/method_get.go b/resource-manager/network/2024-01-01/flowlogs/method_get.go index 91942eff6d3..8677d660354 100644 --- a/resource-manager/network/2024-01-01/flowlogs/method_get.go +++ b/resource-manager/network/2024-01-01/flowlogs/method_get.go @@ -45,7 +45,6 @@ func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperat var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/flowlogs/method_updatetags.go b/resource-manager/network/2024-01-01/flowlogs/method_updatetags.go index 7ef9682b564..1f7aec16871 100644 --- a/resource-manager/network/2024-01-01/flowlogs/method_updatetags.go +++ b/resource-manager/network/2024-01-01/flowlogs/method_updatetags.go @@ -49,7 +49,6 @@ func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input Tags var model FlowLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/flowlogs/version.go b/resource-manager/network/2024-01-01/flowlogs/version.go index 59e62e8a995..64287d9f46d 100644 --- a/resource-manager/network/2024-01-01/flowlogs/version.go +++ b/resource-manager/network/2024-01-01/flowlogs/version.go @@ -1,12 +1,10 @@ package flowlogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flowlogs/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/ipallocations/README.md b/resource-manager/network/2024-01-01/ipallocations/README.md index 163090e6a2c..dfaab55deac 100644 --- a/resource-manager/network/2024-01-01/ipallocations/README.md +++ b/resource-manager/network/2024-01-01/ipallocations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/ipallocations` Documentation -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `ipallocations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/ipallocations/client.go b/resource-manager/network/2024-01-01/ipallocations/client.go index 0450bb3a685..05538bf07b7 100644 --- a/resource-manager/network/2024-01-01/ipallocations/client.go +++ b/resource-manager/network/2024-01-01/ipallocations/client.go @@ -15,7 +15,7 @@ type IPAllocationsClient struct { } func NewIPAllocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipallocations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipallocations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/ipallocations/id_ipallocation.go b/resource-manager/network/2024-01-01/ipallocations/id_ipallocation.go index 1f45e0c491f..1d83039e65c 100644 --- a/resource-manager/network/2024-01-01/ipallocations/id_ipallocation.go +++ b/resource-manager/network/2024-01-01/ipallocations/id_ipallocation.go @@ -42,7 +42,7 @@ func ParseIPAllocationID(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { } id := IPAllocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/ipallocations/method_get.go b/resource-manager/network/2024-01-01/ipallocations/method_get.go index ad7247cf495..d7ccc3afb37 100644 --- a/resource-manager/network/2024-01-01/ipallocations/method_get.go +++ b/resource-manager/network/2024-01-01/ipallocations/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ipallocations/method_updatetags.go b/resource-manager/network/2024-01-01/ipallocations/method_updatetags.go index 792fe909fcb..f6fe36ff651 100644 --- a/resource-manager/network/2024-01-01/ipallocations/method_updatetags.go +++ b/resource-manager/network/2024-01-01/ipallocations/method_updatetags.go @@ -49,7 +49,6 @@ func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, var model IPAllocation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ipallocations/version.go b/resource-manager/network/2024-01-01/ipallocations/version.go index d56f804b556..9f7dd2f5d26 100644 --- a/resource-manager/network/2024-01-01/ipallocations/version.go +++ b/resource-manager/network/2024-01-01/ipallocations/version.go @@ -1,12 +1,10 @@ package ipallocations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipallocations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/ipgroups/README.md b/resource-manager/network/2024-01-01/ipgroups/README.md index 2bfeffe1df2..148096537c9 100644 --- a/resource-manager/network/2024-01-01/ipgroups/README.md +++ b/resource-manager/network/2024-01-01/ipgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/ipgroups` Documentation -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `ipgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/ipgroups/client.go b/resource-manager/network/2024-01-01/ipgroups/client.go index 3e21fe9f946..2e7f5ae8116 100644 --- a/resource-manager/network/2024-01-01/ipgroups/client.go +++ b/resource-manager/network/2024-01-01/ipgroups/client.go @@ -15,7 +15,7 @@ type IPGroupsClient struct { } func NewIPGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/ipgroups/id_ipgroup.go b/resource-manager/network/2024-01-01/ipgroups/id_ipgroup.go index 7b564788b08..2f64284a5bf 100644 --- a/resource-manager/network/2024-01-01/ipgroups/id_ipgroup.go +++ b/resource-manager/network/2024-01-01/ipgroups/id_ipgroup.go @@ -42,7 +42,7 @@ func ParseIPGroupID(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { } id := IPGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/ipgroups/method_get.go b/resource-manager/network/2024-01-01/ipgroups/method_get.go index b0d5717d963..8e06e373c58 100644 --- a/resource-manager/network/2024-01-01/ipgroups/method_get.go +++ b/resource-manager/network/2024-01-01/ipgroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperat var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ipgroups/method_updategroups.go b/resource-manager/network/2024-01-01/ipgroups/method_updategroups.go index 67a51b18e05..bce76083d7a 100644 --- a/resource-manager/network/2024-01-01/ipgroups/method_updategroups.go +++ b/resource-manager/network/2024-01-01/ipgroups/method_updategroups.go @@ -49,7 +49,6 @@ func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input Ta var model IPGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/ipgroups/version.go b/resource-manager/network/2024-01-01/ipgroups/version.go index 202e7168e41..ef73e03f6d2 100644 --- a/resource-manager/network/2024-01-01/ipgroups/version.go +++ b/resource-manager/network/2024-01-01/ipgroups/version.go @@ -1,12 +1,10 @@ package ipgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipgroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/loadbalancers/README.md b/resource-manager/network/2024-01-01/loadbalancers/README.md index e50041db0cd..45d52631a95 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/README.md +++ b/resource-manager/network/2024-01-01/loadbalancers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/loadbalancers` Documentation -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `loadbalancers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/loadbalancers/client.go b/resource-manager/network/2024-01-01/loadbalancers/client.go index 3d84973a709..e0ea457759e 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/client.go +++ b/resource-manager/network/2024-01-01/loadbalancers/client.go @@ -15,7 +15,7 @@ type LoadBalancersClient struct { } func NewLoadBalancersClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "loadbalancers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "loadbalancers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2024-01-01/loadbalancers/id_backendaddresspool.go index 57be52cf337..6d0ee475d56 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_backendaddresspool.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_backendaddresspool.go @@ -44,7 +44,7 @@ func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId } id := BackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2024-01-01/loadbalancers/id_frontendipconfiguration.go index dd3cba98217..470370f1a3e 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_frontendipconfiguration.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_frontendipconfiguration.go @@ -44,7 +44,7 @@ func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, e } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfi } id := FrontendIPConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2024-01-01/loadbalancers/id_inboundnatrule.go index a460bece352..5a1995773d8 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_inboundnatrule.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_inboundnatrule.go @@ -44,7 +44,7 @@ func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) } id := InboundNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancer.go index 35278257e30..abc43ca5b16 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancer.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancer.go @@ -42,7 +42,7 @@ func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { } id := LoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancerbackendaddresspool.go index d8fafa2347f..0e0b58e2743 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancerbackendaddresspool.go @@ -44,7 +44,7 @@ func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAd } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBala } id := LoadBalancerBackendAddressPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancingrule.go index 31e911e38af..e938d9a646a 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancingrule.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_loadbalancingrule.go @@ -44,7 +44,7 @@ func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, } id := LoadBalancingRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_location.go b/resource-manager/network/2024-01-01/loadbalancers/id_location.go index 4a38c5ea3e7..0789e1c81cc 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_location.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2024-01-01/loadbalancers/id_outboundrule.go index 89837637300..522e0f2f502 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_outboundrule.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_outboundrule.go @@ -44,7 +44,7 @@ func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { } id := OutboundRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_probe.go b/resource-manager/network/2024-01-01/loadbalancers/id_probe.go index 46ab09a65c9..7eb1da345a9 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_probe.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_probe.go @@ -44,7 +44,7 @@ func ParseProbeID(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProbeIDInsensitively(input string) (*ProbeId, error) { } id := ProbeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/id_providerloadbalancer.go b/resource-manager/network/2024-01-01/loadbalancers/id_providerloadbalancer.go index 88ab98c83ad..8733dbbf7de 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/id_providerloadbalancer.go +++ b/resource-manager/network/2024-01-01/loadbalancers/id_providerloadbalancer.go @@ -42,7 +42,7 @@ func ParseProviderLoadBalancerID(input string) (*ProviderLoadBalancerId, error) } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLoadBalancerIDInsensitively(input string) (*ProviderLoadBalanc } id := ProviderLoadBalancerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_get.go b/resource-manager/network/2024-01-01/loadbalancers/method_get.go index 2cf9ca241b7..50fdc569bc4 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_get.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) Get(ctx context.Context, id ProviderLoadBalancerId, var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2024-01-01/loadbalancers/method_inboundnatrulesget.go index 92acfa0220b..d925ef58b2c 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_inboundnatrulesget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_inboundnatrulesget.go @@ -34,6 +34,7 @@ func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundN var model InboundNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go index 96451e22451..7fef83148f3 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Cont var model BackendAddressPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go index eeb2cc8b0ed..6c16550699b 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context var model FrontendIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go index 265ec20a693..76a4fc9b62f 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Conte var model LoadBalancingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalanceroutboundrulesget.go index 5e221d46329..7d54de6e71d 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalanceroutboundrulesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, i var model OutboundRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerprobesget.go index 2901255109e..d67e998c327 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerprobesget.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_loadbalancerprobesget.go @@ -45,7 +45,6 @@ func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id Probe var model Probe result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_migratetoipbased.go b/resource-manager/network/2024-01-01/loadbalancers/method_migratetoipbased.go index 249adebb4a8..6474ae09f76 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_migratetoipbased.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_migratetoipbased.go @@ -50,7 +50,6 @@ func (c LoadBalancersClient) MigrateToIPBased(ctx context.Context, id LoadBalanc var model MigratedPools result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/method_updatetags.go b/resource-manager/network/2024-01-01/loadbalancers/method_updatetags.go index dd8a4561326..d3fc584efb2 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/method_updatetags.go +++ b/resource-manager/network/2024-01-01/loadbalancers/method_updatetags.go @@ -49,7 +49,6 @@ func (c LoadBalancersClient) UpdateTags(ctx context.Context, id ProviderLoadBala var model LoadBalancer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/loadbalancers/version.go b/resource-manager/network/2024-01-01/loadbalancers/version.go index af69ffb6f53..a74ab8021d0 100644 --- a/resource-manager/network/2024-01-01/loadbalancers/version.go +++ b/resource-manager/network/2024-01-01/loadbalancers/version.go @@ -1,12 +1,10 @@ package loadbalancers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/loadbalancers/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/README.md b/resource-manager/network/2024-01-01/localnetworkgateways/README.md index bceeefe3487..1eeae80dbaa 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/README.md +++ b/resource-manager/network/2024-01-01/localnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/localnetworkgateways` Documentation -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `localnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/client.go b/resource-manager/network/2024-01-01/localnetworkgateways/client.go index 90a3468c9f3..c821de0dcf3 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/client.go +++ b/resource-manager/network/2024-01-01/localnetworkgateways/client.go @@ -15,7 +15,7 @@ type LocalNetworkGatewaysClient struct { } func NewLocalNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2024-01-01/localnetworkgateways/id_localnetworkgateway.go index b3c0d3a0339..840400d05c6 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/id_localnetworkgateway.go +++ b/resource-manager/network/2024-01-01/localnetworkgateways/id_localnetworkgateway.go @@ -42,7 +42,7 @@ func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGateway } id := LocalNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/method_get.go b/resource-manager/network/2024-01-01/localnetworkgateways/method_get.go index 08da8072f93..678e40b0064 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/method_get.go +++ b/resource-manager/network/2024-01-01/localnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGate var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2024-01-01/localnetworkgateways/method_updatetags.go index c20950665de..cacff76aaeb 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/method_updatetags.go +++ b/resource-manager/network/2024-01-01/localnetworkgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetw var model LocalNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/localnetworkgateways/version.go b/resource-manager/network/2024-01-01/localnetworkgateways/version.go index aee786514c3..70721e6f2a4 100644 --- a/resource-manager/network/2024-01-01/localnetworkgateways/version.go +++ b/resource-manager/network/2024-01-01/localnetworkgateways/version.go @@ -1,12 +1,10 @@ package localnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localnetworkgateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/natgateways/README.md b/resource-manager/network/2024-01-01/natgateways/README.md index fbd093dfe8b..d080f222ecd 100644 --- a/resource-manager/network/2024-01-01/natgateways/README.md +++ b/resource-manager/network/2024-01-01/natgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/natgateways` Documentation -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `natgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/natgateways/client.go b/resource-manager/network/2024-01-01/natgateways/client.go index 10d7c1f9e5f..13334ca10a1 100644 --- a/resource-manager/network/2024-01-01/natgateways/client.go +++ b/resource-manager/network/2024-01-01/natgateways/client.go @@ -15,7 +15,7 @@ type NatGatewaysClient struct { } func NewNatGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "natgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "natgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/natgateways/id_natgateway.go b/resource-manager/network/2024-01-01/natgateways/id_natgateway.go index 95f33162e5e..23f06f4143e 100644 --- a/resource-manager/network/2024-01-01/natgateways/id_natgateway.go +++ b/resource-manager/network/2024-01-01/natgateways/id_natgateway.go @@ -42,7 +42,7 @@ func ParseNatGatewayID(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { } id := NatGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/natgateways/method_get.go b/resource-manager/network/2024-01-01/natgateways/method_get.go index 1360eae2873..3997df407c6 100644 --- a/resource-manager/network/2024-01-01/natgateways/method_get.go +++ b/resource-manager/network/2024-01-01/natgateways/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options Get var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/natgateways/method_updatetags.go b/resource-manager/network/2024-01-01/natgateways/method_updatetags.go index b5dbabece39..2480442d1cd 100644 --- a/resource-manager/network/2024-01-01/natgateways/method_updatetags.go +++ b/resource-manager/network/2024-01-01/natgateways/method_updatetags.go @@ -49,7 +49,6 @@ func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, inpu var model NatGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/natgateways/version.go b/resource-manager/network/2024-01-01/natgateways/version.go index bc738a003fe..5d70d525be3 100644 --- a/resource-manager/network/2024-01-01/natgateways/version.go +++ b/resource-manager/network/2024-01-01/natgateways/version.go @@ -1,12 +1,10 @@ package natgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/natgateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkgroups/README.md b/resource-manager/network/2024-01-01/networkgroups/README.md index 7f1dd4d8d82..6defc252ffc 100644 --- a/resource-manager/network/2024-01-01/networkgroups/README.md +++ b/resource-manager/network/2024-01-01/networkgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkgroups` Documentation -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkgroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkgroups/client.go b/resource-manager/network/2024-01-01/networkgroups/client.go index 3cfe1e1eebf..89171a64b6d 100644 --- a/resource-manager/network/2024-01-01/networkgroups/client.go +++ b/resource-manager/network/2024-01-01/networkgroups/client.go @@ -15,7 +15,7 @@ type NetworkGroupsClient struct { } func NewNetworkGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkgroups/id_networkgroup.go b/resource-manager/network/2024-01-01/networkgroups/id_networkgroup.go index e92b4d5d7c0..39885410108 100644 --- a/resource-manager/network/2024-01-01/networkgroups/id_networkgroup.go +++ b/resource-manager/network/2024-01-01/networkgroups/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkgroups/id_networkmanager.go b/resource-manager/network/2024-01-01/networkgroups/id_networkmanager.go index 58b8bb2d432..c3161f2cd00 100644 --- a/resource-manager/network/2024-01-01/networkgroups/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/networkgroups/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkgroups/method_createorupdate.go b/resource-manager/network/2024-01-01/networkgroups/method_createorupdate.go index 3ab74eeca37..89e0b5c2b0c 100644 --- a/resource-manager/network/2024-01-01/networkgroups/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/networkgroups/method_createorupdate.go @@ -36,6 +36,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroup var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkgroups/method_delete.go b/resource-manager/network/2024-01-01/networkgroups/method_delete.go index 452dbab57a9..45f93907f23 100644 --- a/resource-manager/network/2024-01-01/networkgroups/method_delete.go +++ b/resource-manager/network/2024-01-01/networkgroups/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkgroups/method_get.go b/resource-manager/network/2024-01-01/networkgroups/method_get.go index 554db15d016..503719a73d9 100644 --- a/resource-manager/network/2024-01-01/networkgroups/method_get.go +++ b/resource-manager/network/2024-01-01/networkgroups/method_get.go @@ -45,7 +45,6 @@ func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result var model NetworkGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkgroups/method_list.go b/resource-manager/network/2024-01-01/networkgroups/method_list.go index cff4d8b0a7a..360af82528f 100644 --- a/resource-manager/network/2024-01-01/networkgroups/method_list.go +++ b/resource-manager/network/2024-01-01/networkgroups/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkgroups/version.go b/resource-manager/network/2024-01-01/networkgroups/version.go index cfd68bccd10..249ad2ed740 100644 --- a/resource-manager/network/2024-01-01/networkgroups/version.go +++ b/resource-manager/network/2024-01-01/networkgroups/version.go @@ -1,12 +1,10 @@ package networkgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkgroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/README.md b/resource-manager/network/2024-01-01/networkinterfaces/README.md index d40b0ed0e54..1d129f0ffc2 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/README.md +++ b/resource-manager/network/2024-01-01/networkinterfaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkinterfaces` Documentation -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkinterfaces` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkinterfaces/client.go b/resource-manager/network/2024-01-01/networkinterfaces/client.go index cd098aeccdf..1edd1a6838a 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/client.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/client.go @@ -15,7 +15,7 @@ type NetworkInterfacesClient struct { } func NewNetworkInterfacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkinterfaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkinterfaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2024-01-01/networkinterfaces/id_providercloudservice.go index e3a9af48f96..bc9bc8950a3 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_providercloudservice.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_providercloudservice.go @@ -42,7 +42,7 @@ func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServi } id := ProviderCloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstance.go index 69a75e612e0..e90397ac3f3 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstance.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstance.go @@ -44,7 +44,7 @@ func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { } id := RoleInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstancenetworkinterface.go index 4a96fd5d010..b34bf43f03c 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_roleinstancenetworkinterface.go @@ -46,7 +46,7 @@ func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInte } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstan } id := RoleInstanceNetworkInterfaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2024-01-01/networkinterfaces/id_tapconfiguration.go index 0778222d9c9..597762fef0e 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_tapconfiguration.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_tapconfiguration.go @@ -44,7 +44,7 @@ func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, er } id := TapConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachine.go index e2f2dde8684..6642a7839e6 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachine.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachine.go @@ -44,7 +44,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachinescaleset.go index e9a264c0a89..8f394f4ab5d 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachinescaleset.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_get.go b/resource-manager/network/2024-01-01/networkinterfaces/method_get.go index e1614af681d..5a73b976c2c 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_get.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkIn var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2024-01-01/networkinterfaces/method_getcloudservicenetworkinterface.go index 7f7c58c444c..be2ca6e2e39 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_getcloudservicenetworkinterface.go @@ -34,6 +34,7 @@ func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Hea func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Con var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go index 7a3d2b45272..88f82856ae8 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *c func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx co var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go index 1bef7a3da95..4bad16270ba 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go @@ -35,6 +35,7 @@ func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() * func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx c var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2024-01-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go index a18bdaf08cf..8c1c944f6c8 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go @@ -40,6 +40,7 @@ func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go index 90e537d0982..7134fa1ab75 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go @@ -46,7 +46,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context var model NetworkInterfaceIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go index 868ecfb43d5..004d700dbcd 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go @@ -45,7 +45,6 @@ func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx contex var model NetworkInterfaceTapConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2024-01-01/networkinterfaces/method_updatetags.go index ca8e31de55a..4365d182729 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/method_updatetags.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/method_updatetags.go @@ -50,7 +50,6 @@ func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.Ne var model NetworkInterface result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkinterfaces/version.go b/resource-manager/network/2024-01-01/networkinterfaces/version.go index 82d52844172..632f9b73d85 100644 --- a/resource-manager/network/2024-01-01/networkinterfaces/version.go +++ b/resource-manager/network/2024-01-01/networkinterfaces/version.go @@ -1,12 +1,10 @@ package networkinterfaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkinterfaces/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/README.md index 890e2a4f404..d7a10333473 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/README.md +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanageractiveconfigurations` Documentation -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanageractiveconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/client.go index fd577e53f33..cc689379d3c 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/client.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConfigurationsClient struct { } func NewNetworkManagerActiveConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/id_networkmanager.go index ee0e5e5a9c8..c150737480a 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go index 0a882c8e731..a9250ed79d9 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(c var model ActiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go index c19193dfd82..4035af8f6cf 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ActiveBaseSecurityAdminRule interface { + ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl } -// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ActiveBaseSecurityAdminRule = BaseActiveBaseSecurityAdminRuleImpl{} + +type BaseActiveBaseSecurityAdminRuleImpl struct { + CommitTime *string `json:"commitTime,omitempty"` + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + Region *string `json:"region,omitempty"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s +} + +var _ ActiveBaseSecurityAdminRule = RawActiveBaseSecurityAdminRuleImpl{} + +// RawActiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawActiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + activeBaseSecurityAdminRule BaseActiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawActiveBaseSecurityAdminRuleImpl) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return s.activeBaseSecurityAdminRule } -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { +func UnmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBas return out, nil } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseActiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseActiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawActiveBaseSecurityAdminRuleImpl{ + activeBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go index 371ee82ef8c..e708927c42d 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveDefaultSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go index 70266c6ff7c..18ae717f1d0 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go @@ -17,15 +17,30 @@ type ActiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from ActiveBaseSecurityAdminRule + CommitTime *string `json:"commitTime,omitempty"` ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` Region *string `json:"region,omitempty"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s ActiveSecurityAdminRule) ActiveBaseSecurityAdminRule() BaseActiveBaseSecurityAdminRuleImpl { + return BaseActiveBaseSecurityAdminRuleImpl{ + CommitTime: s.CommitTime, + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + Region: s.Region, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { if o.CommitTime == nil { return nil, nil @@ -49,9 +64,10 @@ func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go index c9007f5e0f3..aaef95bec26 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { output := make([]ActiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalActiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/version.go index 0e71155cac0..9ccd284fea8 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/version.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/README.md index b4875e304db..000cc39895b 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/README.md +++ b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations` Documentation -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/client.go index 25282a2bad5..68760af7c25 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/client.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkManagerActiveConnectivityConfigurationsClient struct { } func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go index 4b1919fa120..135b3993f41 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go index a4c1e51550d..023b82524c0 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go @@ -50,7 +50,6 @@ func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnecti var model ActiveConnectivityConfigurationsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/version.go index 6ea33105aba..851b50e4074 100644 --- a/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/version.go +++ b/resource-manager/network/2024-01-01/networkmanageractiveconnectivityconfigurations/version.go @@ -1,12 +1,10 @@ package networkmanageractiveconnectivityconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/README.md b/resource-manager/network/2024-01-01/networkmanagerconnections/README.md index 669baaea24e..0b88473b85c 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/README.md +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagerconnections` Documentation -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanagerconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/client.go b/resource-manager/network/2024-01-01/networkmanagerconnections/client.go index 3cfa72a376e..809f42be879 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/client.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/client.go @@ -15,7 +15,7 @@ type NetworkManagerConnectionsClient struct { } func NewNetworkManagerConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagerconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagerconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2024-01-01/networkmanagerconnections/id_networkmanagerconnection.go index 066e316e2cb..d73f48f473a 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/id_networkmanagerconnection.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/id_networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManager } id := NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2024-01-01/networkmanagerconnections/id_providers2networkmanagerconnection.go index 81d73abef15..4f196eba08a 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/id_providers2networkmanagerconnection.go @@ -40,7 +40,7 @@ func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2Network } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Prov } id := Providers2NetworkManagerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go index cddf4364027..116a8f3da7a 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go index 9e0447e4aea..c4f20220fbe 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnection var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go index 3e9eb347a20..d8b68e162ab 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders( func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go index 4447d41cf06..2d07c99634c 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCr var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go index 5f0b27a080c..4b89ca96feb 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go @@ -45,7 +45,6 @@ func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGe var model NetworkManagerConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go index ddf403e8a21..a08f8b1adfc 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go @@ -40,6 +40,7 @@ func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() * func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkmanagerconnections/version.go b/resource-manager/network/2024-01-01/networkmanagerconnections/version.go index 6cd0b6f1957..876d042ddc1 100644 --- a/resource-manager/network/2024-01-01/networkmanagerconnections/version.go +++ b/resource-manager/network/2024-01-01/networkmanagerconnections/version.go @@ -1,12 +1,10 @@ package networkmanagerconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagerconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/README.md index fa5a423da87..4f2cad15e33 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration` Documentation -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/client.go index 2f234ee82ef..c6449e001fe 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveConnectivityConfigurationClient struct { } func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go index d752edf32eb..64233acc195 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManag var model NetworkManagerEffectiveConnectivityConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/version.go index 9bd89dc5db9..fb0abfa50fc 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectiveconnectivityconfiguration/version.go @@ -1,12 +1,10 @@ package networkmanagereffectiveconnectivityconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/README.md index cc7b8bfef80..16f633eab7a 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/README.md +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules` Documentation -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/client.go index c83126c132c..5685e9afd82 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/client.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/client.go @@ -15,7 +15,7 @@ type NetworkManagerEffectiveSecurityAdminRulesClient struct { } func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagereffectivesecurityadminrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go index a69d081c810..50c941d8756 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go @@ -51,7 +51,6 @@ func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffec var model NetworkManagerEffectiveSecurityAdminRulesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go index 9ef5715f8e4..2cb1228a910 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EffectiveBaseSecurityAdminRule interface { + EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl } -// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EffectiveBaseSecurityAdminRule = BaseEffectiveBaseSecurityAdminRuleImpl{} + +type BaseEffectiveBaseSecurityAdminRuleImpl struct { + ConfigurationDescription *string `json:"configurationDescription,omitempty"` + Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` + RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` + RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` + RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` +} + +func (s BaseEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s +} + +var _ EffectiveBaseSecurityAdminRule = RawEffectiveBaseSecurityAdminRuleImpl{} + +// RawEffectiveBaseSecurityAdminRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string - Values map[string]interface{} + effectiveBaseSecurityAdminRule BaseEffectiveBaseSecurityAdminRuleImpl + Type string + Values map[string]interface{} +} + +func (s RawEffectiveBaseSecurityAdminRuleImpl) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return s.effectiveBaseSecurityAdminRule } -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { +func UnmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (Effect return out, nil } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, + var parent BaseEffectiveBaseSecurityAdminRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEffectiveBaseSecurityAdminRuleImpl: %+v", err) } - return out, nil + + return RawEffectiveBaseSecurityAdminRuleImpl{ + effectiveBaseSecurityAdminRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go index 17d5e7fdeb7..89d5f651a9f 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveDefaultSecurityAdminRule struct { Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveDefaultSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) } + decoded["kind"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go index ae90f9154f9..8fcf50ed898 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go @@ -14,13 +14,26 @@ type EffectiveSecurityAdminRule struct { Properties *AdminPropertiesFormat `json:"properties,omitempty"` // Fields inherited from EffectiveBaseSecurityAdminRule + ConfigurationDescription *string `json:"configurationDescription,omitempty"` Id *string `json:"id,omitempty"` + Kind EffectiveAdminRuleKind `json:"kind"` RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` } +func (s EffectiveSecurityAdminRule) EffectiveBaseSecurityAdminRule() BaseEffectiveBaseSecurityAdminRuleImpl { + return BaseEffectiveBaseSecurityAdminRuleImpl{ + ConfigurationDescription: s.ConfigurationDescription, + Id: s.Id, + Kind: s.Kind, + RuleCollectionAppliesToGroups: s.RuleCollectionAppliesToGroups, + RuleCollectionDescription: s.RuleCollectionDescription, + RuleGroups: s.RuleGroups, + } +} + var _ json.Marshaler = EffectiveSecurityAdminRule{} func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) } + decoded["kind"] = "Custom" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go index 941c8a93ed6..7e1ac278430 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go @@ -37,7 +37,7 @@ func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(byte output := make([]EffectiveBaseSecurityAdminRule, 0) for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) + impl, err := UnmarshalEffectiveBaseSecurityAdminRuleImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) } diff --git a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/version.go index a6c43dcdff8..4473420b464 100644 --- a/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/version.go +++ b/resource-manager/network/2024-01-01/networkmanagereffectivesecurityadminrules/version.go @@ -1,12 +1,10 @@ package networkmanagereffectivesecurityadminrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkmanagers/README.md b/resource-manager/network/2024-01-01/networkmanagers/README.md index cb2009d85e4..05c2a9b06f8 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/README.md +++ b/resource-manager/network/2024-01-01/networkmanagers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkmanagers` Documentation -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkmanagers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkmanagers/client.go b/resource-manager/network/2024-01-01/networkmanagers/client.go index b27df28e126..64a4e799646 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/client.go +++ b/resource-manager/network/2024-01-01/networkmanagers/client.go @@ -15,7 +15,7 @@ type NetworkManagersClient struct { } func NewNetworkManagersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkmanagers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkmanagers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2024-01-01/networkmanagers/id_networkmanager.go index 63481203294..001e7f6c2a4 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/networkmanagers/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2024-01-01/networkmanagers/method_createorupdate.go index 5fb5c949cd6..cdce0892e43 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkMan var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_delete.go b/resource-manager/network/2024-01-01/networkmanagers/method_delete.go index 016216c8549..a9619efb0e2 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_delete.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_get.go b/resource-manager/network/2024-01-01/networkmanagers/method_get.go index c9f3acddeae..ed6b5d9ec82 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_get.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (re var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_list.go b/resource-manager/network/2024-01-01/networkmanagers/method_list.go index 86b71cf2d94..902c41d52b3 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_list.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2024-01-01/networkmanagers/method_listbysubscription.go index d45e89952b8..d1e8f2d72a3 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_listbysubscription.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2024-01-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go index f9a88725d0f..db1a1d144ac 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go @@ -50,7 +50,6 @@ func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Co var model NetworkManagerDeploymentStatusListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagers/method_patch.go b/resource-manager/network/2024-01-01/networkmanagers/method_patch.go index e3810b6e4b4..4aae0d60709 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/method_patch.go +++ b/resource-manager/network/2024-01-01/networkmanagers/method_patch.go @@ -49,7 +49,6 @@ func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, i var model NetworkManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkmanagers/version.go b/resource-manager/network/2024-01-01/networkmanagers/version.go index b41ce9634c1..4a54446ef7d 100644 --- a/resource-manager/network/2024-01-01/networkmanagers/version.go +++ b/resource-manager/network/2024-01-01/networkmanagers/version.go @@ -1,12 +1,10 @@ package networkmanagers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkmanagers/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkprofiles/README.md b/resource-manager/network/2024-01-01/networkprofiles/README.md index 30033ffbec0..7ff70c0e311 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/README.md +++ b/resource-manager/network/2024-01-01/networkprofiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkprofiles` Documentation -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkprofiles` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkprofiles/client.go b/resource-manager/network/2024-01-01/networkprofiles/client.go index 17b4bf31068..33a4e0626aa 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/client.go +++ b/resource-manager/network/2024-01-01/networkprofiles/client.go @@ -15,7 +15,7 @@ type NetworkProfilesClient struct { } func NewNetworkProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkprofiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkprofiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2024-01-01/networkprofiles/id_networkprofile.go index b1bbf9c9343..6e0804b6679 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/id_networkprofile.go +++ b/resource-manager/network/2024-01-01/networkprofiles/id_networkprofile.go @@ -42,7 +42,7 @@ func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) } id := NetworkProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2024-01-01/networkprofiles/method_createorupdate.go index 94d3a856780..24ed5940195 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/networkprofiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkPro var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkprofiles/method_get.go b/resource-manager/network/2024-01-01/networkprofiles/method_get.go index 13f98955470..a0149c188f7 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/method_get.go +++ b/resource-manager/network/2024-01-01/networkprofiles/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, opt var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkprofiles/method_updatetags.go b/resource-manager/network/2024-01-01/networkprofiles/method_updatetags.go index f0bfb2f14f7..757952def30 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/method_updatetags.go +++ b/resource-manager/network/2024-01-01/networkprofiles/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfile var model NetworkProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkprofiles/version.go b/resource-manager/network/2024-01-01/networkprofiles/version.go index 7589fda470c..3cd87d21507 100644 --- a/resource-manager/network/2024-01-01/networkprofiles/version.go +++ b/resource-manager/network/2024-01-01/networkprofiles/version.go @@ -1,12 +1,10 @@ package networkprofiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkprofiles/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/README.md b/resource-manager/network/2024-01-01/networksecuritygroups/README.md index 6fed77450e0..c3714e7ef00 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/README.md +++ b/resource-manager/network/2024-01-01/networksecuritygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networksecuritygroups` Documentation -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networksecuritygroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/client.go b/resource-manager/network/2024-01-01/networksecuritygroups/client.go index a8d26110c7c..d490fa41c78 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/client.go +++ b/resource-manager/network/2024-01-01/networksecuritygroups/client.go @@ -15,7 +15,7 @@ type NetworkSecurityGroupsClient struct { } func NewNetworkSecurityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecuritygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecuritygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2024-01-01/networksecuritygroups/id_networksecuritygroup.go index 4ab431d74a9..0dbb8c9fcd5 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/id_networksecuritygroup.go +++ b/resource-manager/network/2024-01-01/networksecuritygroups/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/method_get.go b/resource-manager/network/2024-01-01/networksecuritygroups/method_get.go index 6ebe50d00e5..7728917c0ec 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/method_get.go +++ b/resource-manager/network/2024-01-01/networksecuritygroups/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurity var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2024-01-01/networksecuritygroups/method_updatetags.go index 362cad00c7d..6f4b2cd3ce6 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/method_updatetags.go +++ b/resource-manager/network/2024-01-01/networksecuritygroups/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkS var model NetworkSecurityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networksecuritygroups/version.go b/resource-manager/network/2024-01-01/networksecuritygroups/version.go index 4ef631a254d..01cc1529c5d 100644 --- a/resource-manager/network/2024-01-01/networksecuritygroups/version.go +++ b/resource-manager/network/2024-01-01/networksecuritygroups/version.go @@ -1,12 +1,10 @@ package networksecuritygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecuritygroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/README.md b/resource-manager/network/2024-01-01/networkvirtualappliances/README.md index 02c56e3ce80..28f7428911f 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/README.md +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkvirtualappliances` Documentation -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkvirtualappliances` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/client.go b/resource-manager/network/2024-01-01/networkvirtualappliances/client.go index cfaeae574de..ab8d70fafa5 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/client.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/client.go @@ -15,7 +15,7 @@ type NetworkVirtualAppliancesClient struct { } func NewNetworkVirtualAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkvirtualappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkvirtualappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2024-01-01/networkvirtualappliances/id_inboundsecurityrule.go index d920466b92f..375fab1ff84 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/id_inboundsecurityrule.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/id_inboundsecurityrule.go @@ -44,7 +44,7 @@ func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRule } id := InboundSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2024-01-01/networkvirtualappliances/id_networkvirtualappliance.go index f222e101e79..db7766b52a7 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/id_networkvirtualappliance.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/method_get.go b/resource-manager/network/2024-01-01/networkvirtualappliances/method_get.go index 36076f68749..2310883a448 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/method_get.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtu var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/method_inboundsecurityruleget.go b/resource-manager/network/2024-01-01/networkvirtualappliances/method_inboundsecurityruleget.go index 4d8e9aa6337..708005f5e02 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/method_inboundsecurityruleget.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/method_inboundsecurityruleget.go @@ -45,7 +45,6 @@ func (c NetworkVirtualAppliancesClient) InboundSecurityRuleGet(ctx context.Conte var model InboundSecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2024-01-01/networkvirtualappliances/method_updatetags.go index 25a5f9e94c5..a8a8391f4a4 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/method_updatetags.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id Netwo var model NetworkVirtualAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkvirtualappliances/version.go b/resource-manager/network/2024-01-01/networkvirtualappliances/version.go index b101360aad8..8f98fb5ed79 100644 --- a/resource-manager/network/2024-01-01/networkvirtualappliances/version.go +++ b/resource-manager/network/2024-01-01/networkvirtualappliances/version.go @@ -1,12 +1,10 @@ package networkvirtualappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkvirtualappliances/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/networkwatchers/README.md b/resource-manager/network/2024-01-01/networkwatchers/README.md index 9ee882dd19c..9e2f4fc4ca6 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/README.md +++ b/resource-manager/network/2024-01-01/networkwatchers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/networkwatchers` Documentation -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `networkwatchers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/networkwatchers/client.go b/resource-manager/network/2024-01-01/networkwatchers/client.go index 2068ab14817..b544d19c206 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/client.go +++ b/resource-manager/network/2024-01-01/networkwatchers/client.go @@ -15,7 +15,7 @@ type NetworkWatchersClient struct { } func NewNetworkWatchersClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkwatchers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkwatchers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2024-01-01/networkwatchers/id_networkwatcher.go index b8bb1f7f4a6..cd247fb8659 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/id_networkwatcher.go +++ b/resource-manager/network/2024-01-01/networkwatchers/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2024-01-01/networkwatchers/method_createorupdate.go index ecb006e2007..5881c4d5c10 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWat var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_get.go b/resource-manager/network/2024-01-01/networkwatchers/method_get.go index 000ae087b18..1c429aeb42d 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_get.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_get.go @@ -45,7 +45,6 @@ func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (re var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_gettopology.go b/resource-manager/network/2024-01-01/networkwatchers/method_gettopology.go index 8a1c6caef60..68afb0d8206 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_gettopology.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_gettopology.go @@ -50,7 +50,6 @@ func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatche var model Topology result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_list.go b/resource-manager/network/2024-01-01/networkwatchers/method_list.go index 8263c7b4f93..36d57f04fef 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_list.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_list.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGr var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_listall.go b/resource-manager/network/2024-01-01/networkwatchers/method_listall.go index 845a2449946..b8bd8d8d4a6 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_listall.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_listall.go @@ -47,7 +47,6 @@ func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.Subscri var model NetworkWatcherListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/method_updatetags.go b/resource-manager/network/2024-01-01/networkwatchers/method_updatetags.go index 1ace78e7dc5..0ad45fd1f1a 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/method_updatetags.go +++ b/resource-manager/network/2024-01-01/networkwatchers/method_updatetags.go @@ -49,7 +49,6 @@ func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcher var model NetworkWatcher result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/networkwatchers/version.go b/resource-manager/network/2024-01-01/networkwatchers/version.go index eb99c4c19fa..3740d3f7365 100644 --- a/resource-manager/network/2024-01-01/networkwatchers/version.go +++ b/resource-manager/network/2024-01-01/networkwatchers/version.go @@ -1,12 +1,10 @@ package networkwatchers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkwatchers/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/p2svpngateways/README.md b/resource-manager/network/2024-01-01/p2svpngateways/README.md index 104bf4a2e52..303c4b1231f 100644 --- a/resource-manager/network/2024-01-01/p2svpngateways/README.md +++ b/resource-manager/network/2024-01-01/p2svpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/p2svpngateways` Documentation -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `p2svpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/p2svpngateways/client.go b/resource-manager/network/2024-01-01/p2svpngateways/client.go index 3d458041de0..b2a2ec08b88 100644 --- a/resource-manager/network/2024-01-01/p2svpngateways/client.go +++ b/resource-manager/network/2024-01-01/p2svpngateways/client.go @@ -15,7 +15,7 @@ type P2sVpnGatewaysClient struct { } func NewP2sVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "p2svpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "p2svpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/p2svpngateways/version.go b/resource-manager/network/2024-01-01/p2svpngateways/version.go index a9df47c9137..bd2173f7058 100644 --- a/resource-manager/network/2024-01-01/p2svpngateways/version.go +++ b/resource-manager/network/2024-01-01/p2svpngateways/version.go @@ -1,12 +1,10 @@ package p2svpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/p2svpngateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/packetcaptures/README.md b/resource-manager/network/2024-01-01/packetcaptures/README.md index a201fe3d879..ea74dbf653d 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/README.md +++ b/resource-manager/network/2024-01-01/packetcaptures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/packetcaptures` Documentation -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `packetcaptures` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/packetcaptures/client.go b/resource-manager/network/2024-01-01/packetcaptures/client.go index 03aa779a5b9..9acbfd7c6f7 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/client.go +++ b/resource-manager/network/2024-01-01/packetcaptures/client.go @@ -15,7 +15,7 @@ type PacketCapturesClient struct { } func NewPacketCapturesClientWithBaseURI(sdkApi sdkEnv.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "packetcaptures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "packetcaptures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2024-01-01/packetcaptures/id_networkwatcher.go index d9eafa5f099..a91b97fdd2d 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/id_networkwatcher.go +++ b/resource-manager/network/2024-01-01/packetcaptures/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2024-01-01/packetcaptures/id_packetcapture.go index 8b30ad1ebd6..ad0eee13f69 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/id_packetcapture.go +++ b/resource-manager/network/2024-01-01/packetcaptures/id_packetcapture.go @@ -44,7 +44,7 @@ func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { } id := PacketCaptureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/packetcaptures/method_get.go b/resource-manager/network/2024-01-01/packetcaptures/method_get.go index 2226c032bea..9f32b393d10 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/method_get.go +++ b/resource-manager/network/2024-01-01/packetcaptures/method_get.go @@ -45,7 +45,6 @@ func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (resu var model PacketCaptureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/packetcaptures/method_list.go b/resource-manager/network/2024-01-01/packetcaptures/method_list.go index 49bbc661b3c..08e6f424863 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/method_list.go +++ b/resource-manager/network/2024-01-01/packetcaptures/method_list.go @@ -46,7 +46,6 @@ func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (re var model PacketCaptureListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/packetcaptures/version.go b/resource-manager/network/2024-01-01/packetcaptures/version.go index 466fa4f9a89..8480aa94d23 100644 --- a/resource-manager/network/2024-01-01/packetcaptures/version.go +++ b/resource-manager/network/2024-01-01/packetcaptures/version.go @@ -1,12 +1,10 @@ package packetcaptures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/packetcaptures/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/README.md index 099e96d625d..744215248f7 100644 --- a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/README.md +++ b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections` Documentation -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `peerexpressroutecircuitconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/client.go index c0c578a280f..6f26d87afd5 100644 --- a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/client.go +++ b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/client.go @@ -15,7 +15,7 @@ type PeerExpressRouteCircuitConnectionsClient struct { } func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "peerexpressroutecircuitconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/id_peerconnection.go index 6bde16a10c5..3b236cf50cf 100644 --- a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/id_peerconnection.go @@ -46,7 +46,7 @@ func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) } id := PeerConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/method_get.go index 844c3c67e07..554ac17ad6f 100644 --- a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/method_get.go +++ b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/method_get.go @@ -45,7 +45,6 @@ func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id Pe var model PeerExpressRouteCircuitConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/version.go index fdbd8248998..be3c2023355 100644 --- a/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/version.go +++ b/resource-manager/network/2024-01-01/peerexpressroutecircuitconnections/version.go @@ -1,12 +1,10 @@ package peerexpressroutecircuitconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/README.md b/resource-manager/network/2024-01-01/privatednszonegroups/README.md index ce2d32e0b89..c8747b18df2 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/README.md +++ b/resource-manager/network/2024-01-01/privatednszonegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/privatednszonegroups` Documentation -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `privatednszonegroups` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/client.go b/resource-manager/network/2024-01-01/privatednszonegroups/client.go index 99ce8b6667e..58e48fe8e2e 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/client.go +++ b/resource-manager/network/2024-01-01/privatednszonegroups/client.go @@ -15,7 +15,7 @@ type PrivateDnsZoneGroupsClient struct { } func NewPrivateDnsZoneGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatednszonegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatednszonegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2024-01-01/privatednszonegroups/id_privatednszonegroup.go index 9399f9157d3..fe0858951a1 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/id_privatednszonegroup.go +++ b/resource-manager/network/2024-01-01/privatednszonegroups/id_privatednszonegroup.go @@ -44,7 +44,7 @@ func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroup } id := PrivateDnsZoneGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2024-01-01/privatednszonegroups/id_privateendpoint.go index a9f6cc5dff2..48424e8ccb0 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/id_privateendpoint.go +++ b/resource-manager/network/2024-01-01/privatednszonegroups/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/method_get.go b/resource-manager/network/2024-01-01/privatednszonegroups/method_get.go index 3c25fca99b7..b0a317bbf4d 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/method_get.go +++ b/resource-manager/network/2024-01-01/privatednszonegroups/method_get.go @@ -45,7 +45,6 @@ func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGr var model PrivateDnsZoneGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/privatednszonegroups/version.go b/resource-manager/network/2024-01-01/privatednszonegroups/version.go index 5c35ae733e6..914e576b5bc 100644 --- a/resource-manager/network/2024-01-01/privatednszonegroups/version.go +++ b/resource-manager/network/2024-01-01/privatednszonegroups/version.go @@ -1,12 +1,10 @@ package privatednszonegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatednszonegroups/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/privateendpoints/README.md b/resource-manager/network/2024-01-01/privateendpoints/README.md index cadd9ae80c6..ff688130515 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/README.md +++ b/resource-manager/network/2024-01-01/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/privateendpoints/client.go b/resource-manager/network/2024-01-01/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/client.go +++ b/resource-manager/network/2024-01-01/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/privateendpoints/id_location.go b/resource-manager/network/2024-01-01/privateendpoints/id_location.go index 54b43b4b1f2..60987a25fc6 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/id_location.go +++ b/resource-manager/network/2024-01-01/privateendpoints/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2024-01-01/privateendpoints/id_privateendpoint.go index a104325012e..4d39c6d7e38 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/id_privateendpoint.go +++ b/resource-manager/network/2024-01-01/privateendpoints/id_privateendpoint.go @@ -42,7 +42,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2024-01-01/privateendpoints/id_providerlocation.go index a70739b937d..eaf3b344f24 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/id_providerlocation.go +++ b/resource-manager/network/2024-01-01/privateendpoints/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privateendpoints/method_get.go b/resource-manager/network/2024-01-01/privateendpoints/method_get.go index 80cad93eef6..559e0f436c5 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/method_get.go +++ b/resource-manager/network/2024-01-01/privateendpoints/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, o var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/privateendpoints/version.go b/resource-manager/network/2024-01-01/privateendpoints/version.go index 595da0e90a8..77388c26434 100644 --- a/resource-manager/network/2024-01-01/privateendpoints/version.go +++ b/resource-manager/network/2024-01-01/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/README.md b/resource-manager/network/2024-01-01/privatelinkservices/README.md index 905380d09b0..7cbe8493865 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/README.md +++ b/resource-manager/network/2024-01-01/privatelinkservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/privatelinkservices` Documentation -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `privatelinkservices` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/privatelinkservices/client.go b/resource-manager/network/2024-01-01/privatelinkservices/client.go index 5bd46867c3e..e097e552e3f 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/client.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/client.go @@ -15,7 +15,7 @@ type PrivateLinkServicesClient struct { } func NewPrivateLinkServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/id_location.go b/resource-manager/network/2024-01-01/privatelinkservices/id_location.go index 34e4ed80520..1b7d6fc81eb 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/id_location.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2024-01-01/privatelinkservices/id_privateendpointconnection.go index 3f98898492d..ed686302aed 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/id_privateendpointconnection.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2024-01-01/privatelinkservices/id_privatelinkservice.go index d88a974cca5..331d16ea3b2 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/id_privatelinkservice.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/id_privatelinkservice.go @@ -42,7 +42,7 @@ func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId } id := PrivateLinkServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2024-01-01/privatelinkservices/id_providerlocation.go index c7433defeb6..2bb416453e6 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/id_providerlocation.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/method_get.go b/resource-manager/network/2024-01-01/privatelinkservices/method_get.go index 87bddc4d4aa..3be1df5bb53 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/method_get.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServic var model PrivateLinkService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2024-01-01/privatelinkservices/method_getprivateendpointconnection.go index 032d2076254..7690b7c62af 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/method_getprivateendpointconnection.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/method_getprivateendpointconnection.go @@ -34,6 +34,7 @@ func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Header func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Cont var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2024-01-01/privatelinkservices/method_updateprivateendpointconnection.go index 90a383fd3a1..b108db06f2a 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/method_updateprivateendpointconnection.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/method_updateprivateendpointconnection.go @@ -49,7 +49,6 @@ func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.C var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/privatelinkservices/version.go b/resource-manager/network/2024-01-01/privatelinkservices/version.go index 17557d24d45..56cc30aeb63 100644 --- a/resource-manager/network/2024-01-01/privatelinkservices/version.go +++ b/resource-manager/network/2024-01-01/privatelinkservices/version.go @@ -1,12 +1,10 @@ package privatelinkservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkservices/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/publicipaddresses/README.md b/resource-manager/network/2024-01-01/publicipaddresses/README.md index dca882817a3..403af78526e 100644 --- a/resource-manager/network/2024-01-01/publicipaddresses/README.md +++ b/resource-manager/network/2024-01-01/publicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/publicipaddresses` Documentation -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `publicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/publicipaddresses/client.go b/resource-manager/network/2024-01-01/publicipaddresses/client.go index 4c28c537385..54f2b0113c7 100644 --- a/resource-manager/network/2024-01-01/publicipaddresses/client.go +++ b/resource-manager/network/2024-01-01/publicipaddresses/client.go @@ -15,7 +15,7 @@ type PublicIPAddressesClient struct { } func NewPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/publicipaddresses/method_get.go b/resource-manager/network/2024-01-01/publicipaddresses/method_get.go index 7045aad8372..2548c9b4db6 100644 --- a/resource-manager/network/2024-01-01/publicipaddresses/method_get.go +++ b/resource-manager/network/2024-01-01/publicipaddresses/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPA var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2024-01-01/publicipaddresses/method_updatetags.go index 55be79fcfce..622a0a8c202 100644 --- a/resource-manager/network/2024-01-01/publicipaddresses/method_updatetags.go +++ b/resource-manager/network/2024-01-01/publicipaddresses/method_updatetags.go @@ -50,7 +50,6 @@ func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.Pu var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/publicipaddresses/version.go b/resource-manager/network/2024-01-01/publicipaddresses/version.go index a201b13accd..bc9b9449142 100644 --- a/resource-manager/network/2024-01-01/publicipaddresses/version.go +++ b/resource-manager/network/2024-01-01/publicipaddresses/version.go @@ -1,12 +1,10 @@ package publicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipaddresses/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/publicipprefixes/README.md b/resource-manager/network/2024-01-01/publicipprefixes/README.md index 342f00ae818..510d1edbe62 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/README.md +++ b/resource-manager/network/2024-01-01/publicipprefixes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/publicipprefixes` Documentation -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `publicipprefixes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/publicipprefixes/client.go b/resource-manager/network/2024-01-01/publicipprefixes/client.go index 7dfe8ac9af1..78db8973387 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/client.go +++ b/resource-manager/network/2024-01-01/publicipprefixes/client.go @@ -15,7 +15,7 @@ type PublicIPPrefixesClient struct { } func NewPublicIPPrefixesClientWithBaseURI(sdkApi sdkEnv.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "publicipprefixes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "publicipprefixes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2024-01-01/publicipprefixes/id_publicipprefix.go index 2fe61b6d66b..b985530d0a2 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/id_publicipprefix.go +++ b/resource-manager/network/2024-01-01/publicipprefixes/id_publicipprefix.go @@ -42,7 +42,7 @@ func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) } id := PublicIPPrefixId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/publicipprefixes/method_get.go b/resource-manager/network/2024-01-01/publicipprefixes/method_get.go index 15104f80613..4d05c32931a 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/method_get.go +++ b/resource-manager/network/2024-01-01/publicipprefixes/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, op var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2024-01-01/publicipprefixes/method_updatetags.go index e5257fc9717..3111479b00a 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/method_updatetags.go +++ b/resource-manager/network/2024-01-01/publicipprefixes/method_updatetags.go @@ -49,7 +49,6 @@ func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefi var model PublicIPPrefix result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/publicipprefixes/version.go b/resource-manager/network/2024-01-01/publicipprefixes/version.go index e38e72be5e6..a0d372e210e 100644 --- a/resource-manager/network/2024-01-01/publicipprefixes/version.go +++ b/resource-manager/network/2024-01-01/publicipprefixes/version.go @@ -1,12 +1,10 @@ package publicipprefixes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/publicipprefixes/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/routefilterrules/README.md b/resource-manager/network/2024-01-01/routefilterrules/README.md index 60264b5a9ce..5bdbbe2b507 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/README.md +++ b/resource-manager/network/2024-01-01/routefilterrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/routefilterrules` Documentation -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `routefilterrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/routefilterrules/client.go b/resource-manager/network/2024-01-01/routefilterrules/client.go index 018917d75d9..87a6916e467 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/client.go +++ b/resource-manager/network/2024-01-01/routefilterrules/client.go @@ -15,7 +15,7 @@ type RouteFilterRulesClient struct { } func NewRouteFilterRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilterrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilterrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/routefilterrules/id_routefilter.go b/resource-manager/network/2024-01-01/routefilterrules/id_routefilter.go index fc7b97a96ea..eadf8a32c02 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/id_routefilter.go +++ b/resource-manager/network/2024-01-01/routefilterrules/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2024-01-01/routefilterrules/id_routefilterrule.go index ef13326b0c4..39bf905aaa7 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/id_routefilterrule.go +++ b/resource-manager/network/2024-01-01/routefilterrules/id_routefilterrule.go @@ -44,7 +44,7 @@ func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, erro } id := RouteFilterRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routefilterrules/method_get.go b/resource-manager/network/2024-01-01/routefilterrules/method_get.go index c28ac994637..66ebdba141b 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/method_get.go +++ b/resource-manager/network/2024-01-01/routefilterrules/method_get.go @@ -45,7 +45,6 @@ func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) ( var model RouteFilterRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routefilterrules/version.go b/resource-manager/network/2024-01-01/routefilterrules/version.go index 29b88191f83..6b85ea95e50 100644 --- a/resource-manager/network/2024-01-01/routefilterrules/version.go +++ b/resource-manager/network/2024-01-01/routefilterrules/version.go @@ -1,12 +1,10 @@ package routefilterrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilterrules/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/routefilters/README.md b/resource-manager/network/2024-01-01/routefilters/README.md index 203adcd8979..5d8724c7b06 100644 --- a/resource-manager/network/2024-01-01/routefilters/README.md +++ b/resource-manager/network/2024-01-01/routefilters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/routefilters` Documentation -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `routefilters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/routefilters/client.go b/resource-manager/network/2024-01-01/routefilters/client.go index e4faeb1d622..5bf2183b43d 100644 --- a/resource-manager/network/2024-01-01/routefilters/client.go +++ b/resource-manager/network/2024-01-01/routefilters/client.go @@ -15,7 +15,7 @@ type RouteFiltersClient struct { } func NewRouteFiltersClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routefilters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routefilters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/routefilters/id_routefilter.go b/resource-manager/network/2024-01-01/routefilters/id_routefilter.go index 18b55731fae..886fbf82cdd 100644 --- a/resource-manager/network/2024-01-01/routefilters/id_routefilter.go +++ b/resource-manager/network/2024-01-01/routefilters/id_routefilter.go @@ -42,7 +42,7 @@ func ParseRouteFilterID(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { } id := RouteFilterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routefilters/method_get.go b/resource-manager/network/2024-01-01/routefilters/method_get.go index d44bd6d46b0..f57a061fb52 100644 --- a/resource-manager/network/2024-01-01/routefilters/method_get.go +++ b/resource-manager/network/2024-01-01/routefilters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options G var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routefilters/method_updatetags.go b/resource-manager/network/2024-01-01/routefilters/method_updatetags.go index 33bbd5301d9..5fe88949683 100644 --- a/resource-manager/network/2024-01-01/routefilters/method_updatetags.go +++ b/resource-manager/network/2024-01-01/routefilters/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, in var model RouteFilter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routefilters/version.go b/resource-manager/network/2024-01-01/routefilters/version.go index 8d5f3bd95ec..4ee0117b103 100644 --- a/resource-manager/network/2024-01-01/routefilters/version.go +++ b/resource-manager/network/2024-01-01/routefilters/version.go @@ -1,12 +1,10 @@ package routefilters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routefilters/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/routes/README.md b/resource-manager/network/2024-01-01/routes/README.md index 9de653bb58d..b4e16ed658d 100644 --- a/resource-manager/network/2024-01-01/routes/README.md +++ b/resource-manager/network/2024-01-01/routes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/routes` Documentation -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `routes` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/routes/client.go b/resource-manager/network/2024-01-01/routes/client.go index 4372f694741..88e9f135cd1 100644 --- a/resource-manager/network/2024-01-01/routes/client.go +++ b/resource-manager/network/2024-01-01/routes/client.go @@ -15,7 +15,7 @@ type RoutesClient struct { } func NewRoutesClientWithBaseURI(sdkApi sdkEnv.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/routes/id_route.go b/resource-manager/network/2024-01-01/routes/id_route.go index c9e2c02ee1f..d306345db01 100644 --- a/resource-manager/network/2024-01-01/routes/id_route.go +++ b/resource-manager/network/2024-01-01/routes/id_route.go @@ -44,7 +44,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routes/id_routetable.go b/resource-manager/network/2024-01-01/routes/id_routetable.go index 459719bc26c..66672514db4 100644 --- a/resource-manager/network/2024-01-01/routes/id_routetable.go +++ b/resource-manager/network/2024-01-01/routes/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routes/method_get.go b/resource-manager/network/2024-01-01/routes/method_get.go index 8f641d28c5b..306c6528c39 100644 --- a/resource-manager/network/2024-01-01/routes/method_get.go +++ b/resource-manager/network/2024-01-01/routes/method_get.go @@ -45,7 +45,6 @@ func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationR var model Route result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routes/version.go b/resource-manager/network/2024-01-01/routes/version.go index 43a078e27f9..7598b8b8feb 100644 --- a/resource-manager/network/2024-01-01/routes/version.go +++ b/resource-manager/network/2024-01-01/routes/version.go @@ -1,12 +1,10 @@ package routes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routes/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/routetables/README.md b/resource-manager/network/2024-01-01/routetables/README.md index bff08a2b926..98dc6fa2808 100644 --- a/resource-manager/network/2024-01-01/routetables/README.md +++ b/resource-manager/network/2024-01-01/routetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/routetables` Documentation -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `routetables` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/routetables/client.go b/resource-manager/network/2024-01-01/routetables/client.go index 26c9fb104ad..b52049cd5f7 100644 --- a/resource-manager/network/2024-01-01/routetables/client.go +++ b/resource-manager/network/2024-01-01/routetables/client.go @@ -15,7 +15,7 @@ type RouteTablesClient struct { } func NewRouteTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "routetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "routetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/routetables/id_routetable.go b/resource-manager/network/2024-01-01/routetables/id_routetable.go index 0f3c938daf7..0d24a6b252f 100644 --- a/resource-manager/network/2024-01-01/routetables/id_routetable.go +++ b/resource-manager/network/2024-01-01/routetables/id_routetable.go @@ -42,7 +42,7 @@ func ParseRouteTableID(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { } id := RouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/routetables/method_get.go b/resource-manager/network/2024-01-01/routetables/method_get.go index cb19ef16deb..6a2409acbfb 100644 --- a/resource-manager/network/2024-01-01/routetables/method_get.go +++ b/resource-manager/network/2024-01-01/routetables/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options Get var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routetables/method_updatetags.go b/resource-manager/network/2024-01-01/routetables/method_updatetags.go index b2db87b8208..258335fc600 100644 --- a/resource-manager/network/2024-01-01/routetables/method_updatetags.go +++ b/resource-manager/network/2024-01-01/routetables/method_updatetags.go @@ -49,7 +49,6 @@ func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, inpu var model RouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/routetables/version.go b/resource-manager/network/2024-01-01/routetables/version.go index f57d25922e2..93c1c34d924 100644 --- a/resource-manager/network/2024-01-01/routetables/version.go +++ b/resource-manager/network/2024-01-01/routetables/version.go @@ -1,12 +1,10 @@ package routetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/routetables/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/scopeconnections/README.md b/resource-manager/network/2024-01-01/scopeconnections/README.md index 4fa34ba2e6a..75e2f1ff618 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/README.md +++ b/resource-manager/network/2024-01-01/scopeconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/scopeconnections` Documentation -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `scopeconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/scopeconnections/client.go b/resource-manager/network/2024-01-01/scopeconnections/client.go index aa7247e35c7..81942e9b5e9 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/client.go +++ b/resource-manager/network/2024-01-01/scopeconnections/client.go @@ -15,7 +15,7 @@ type ScopeConnectionsClient struct { } func NewScopeConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scopeconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scopeconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2024-01-01/scopeconnections/id_networkmanager.go index 259fe7f2afa..23c26353215 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/scopeconnections/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2024-01-01/scopeconnections/id_scopeconnection.go index dd1d78f3b94..07c786f0070 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/id_scopeconnection.go +++ b/resource-manager/network/2024-01-01/scopeconnections/id_scopeconnection.go @@ -44,7 +44,7 @@ func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, erro } id := ScopeConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2024-01-01/scopeconnections/method_createorupdate.go index c0784b21bd5..08383ec6587 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/scopeconnections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConn var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/scopeconnections/method_get.go b/resource-manager/network/2024-01-01/scopeconnections/method_get.go index 97616b65ce8..67789a31c53 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/method_get.go +++ b/resource-manager/network/2024-01-01/scopeconnections/method_get.go @@ -45,7 +45,6 @@ func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) ( var model ScopeConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/scopeconnections/method_list.go b/resource-manager/network/2024-01-01/scopeconnections/method_list.go index c819623c65e..c9f73b61411 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/method_list.go +++ b/resource-manager/network/2024-01-01/scopeconnections/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/scopeconnections/version.go b/resource-manager/network/2024-01-01/scopeconnections/version.go index 732c6294fe6..1f052efa0bd 100644 --- a/resource-manager/network/2024-01-01/scopeconnections/version.go +++ b/resource-manager/network/2024-01-01/scopeconnections/version.go @@ -1,12 +1,10 @@ package scopeconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scopeconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/README.md b/resource-manager/network/2024-01-01/securityadminconfigurations/README.md index 522c4ccbf34..1da1facef62 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/README.md +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/securityadminconfigurations` Documentation -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `securityadminconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/client.go b/resource-manager/network/2024-01-01/securityadminconfigurations/client.go index 7629a2dcefb..c4acda9a655 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/client.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/client.go @@ -15,7 +15,7 @@ type SecurityAdminConfigurationsClient struct { } func NewSecurityAdminConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityadminconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityadminconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2024-01-01/securityadminconfigurations/id_networkmanager.go index cc45635d1cc..4e824ae225e 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/id_networkmanager.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/id_networkmanager.go @@ -42,7 +42,7 @@ func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) } id := NetworkManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2024-01-01/securityadminconfigurations/id_securityadminconfiguration.go index c481f6a158b..1791024e094 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/id_securityadminconfiguration.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/id_securityadminconfiguration.go @@ -44,7 +44,7 @@ func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfiguratio } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdmi } id := SecurityAdminConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2024-01-01/securityadminconfigurations/method_createorupdate.go index e285ab5384c..2406a218954 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, i var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2024-01-01/securityadminconfigurations/method_delete.go index 82087f7a71c..98f2658625f 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/method_delete.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/method_get.go b/resource-manager/network/2024-01-01/securityadminconfigurations/method_get.go index 6046f27ef91..65a62286882 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/method_get.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityA var model SecurityAdminConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/method_list.go b/resource-manager/network/2024-01-01/securityadminconfigurations/method_list.go index 8fc4c2c91dc..a4abe4c74d3 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/method_list.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/securityadminconfigurations/version.go b/resource-manager/network/2024-01-01/securityadminconfigurations/version.go index 6ad6041d852..c4992a053f8 100644 --- a/resource-manager/network/2024-01-01/securityadminconfigurations/version.go +++ b/resource-manager/network/2024-01-01/securityadminconfigurations/version.go @@ -1,12 +1,10 @@ package securityadminconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityadminconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/README.md b/resource-manager/network/2024-01-01/securitypartnerproviders/README.md index 263da57cbc1..6d4476371b5 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/README.md +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/securitypartnerproviders` Documentation -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `securitypartnerproviders` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/client.go b/resource-manager/network/2024-01-01/securitypartnerproviders/client.go index e87ed7e5d0e..7752e07fcf3 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/client.go +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/client.go @@ -15,7 +15,7 @@ type SecurityPartnerProvidersClient struct { } func NewSecurityPartnerProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitypartnerproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitypartnerproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2024-01-01/securitypartnerproviders/id_securitypartnerprovider.go index 32dd3433d4a..af7579bfa45 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/id_securitypartnerprovider.go +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/id_securitypartnerprovider.go @@ -42,7 +42,7 @@ func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, e } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartner } id := SecurityPartnerProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/method_get.go b/resource-manager/network/2024-01-01/securitypartnerproviders/method_get.go index ca56a913bc7..5b244206a3f 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/method_get.go +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/method_get.go @@ -45,7 +45,6 @@ func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPart var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2024-01-01/securitypartnerproviders/method_updatetags.go index 7cbef507221..dfd04e92e88 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/method_updatetags.go +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/method_updatetags.go @@ -49,7 +49,6 @@ func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id Secur var model SecurityPartnerProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securitypartnerproviders/version.go b/resource-manager/network/2024-01-01/securitypartnerproviders/version.go index 31ca200c136..d9b85cbfb99 100644 --- a/resource-manager/network/2024-01-01/securitypartnerproviders/version.go +++ b/resource-manager/network/2024-01-01/securitypartnerproviders/version.go @@ -1,12 +1,10 @@ package securitypartnerproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypartnerproviders/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/securityrules/README.md b/resource-manager/network/2024-01-01/securityrules/README.md index a53439300b5..cb33e16fc0c 100644 --- a/resource-manager/network/2024-01-01/securityrules/README.md +++ b/resource-manager/network/2024-01-01/securityrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/securityrules` Documentation -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `securityrules` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/securityrules/client.go b/resource-manager/network/2024-01-01/securityrules/client.go index 1fbf9b2c78c..fe76b456975 100644 --- a/resource-manager/network/2024-01-01/securityrules/client.go +++ b/resource-manager/network/2024-01-01/securityrules/client.go @@ -15,7 +15,7 @@ type SecurityRulesClient struct { } func NewSecurityRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2024-01-01/securityrules/id_defaultsecurityrule.go index a09823c4a35..8a42bf7697d 100644 --- a/resource-manager/network/2024-01-01/securityrules/id_defaultsecurityrule.go +++ b/resource-manager/network/2024-01-01/securityrules/id_defaultsecurityrule.go @@ -44,7 +44,7 @@ func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRule } id := DefaultSecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2024-01-01/securityrules/id_networksecuritygroup.go index 9b818e973d9..21d0af43abc 100644 --- a/resource-manager/network/2024-01-01/securityrules/id_networksecuritygroup.go +++ b/resource-manager/network/2024-01-01/securityrules/id_networksecuritygroup.go @@ -42,7 +42,7 @@ func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGro } id := NetworkSecurityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securityrules/id_securityrule.go b/resource-manager/network/2024-01-01/securityrules/id_securityrule.go index da153b38f42..d87e04b0366 100644 --- a/resource-manager/network/2024-01-01/securityrules/id_securityrule.go +++ b/resource-manager/network/2024-01-01/securityrules/id_securityrule.go @@ -44,7 +44,7 @@ func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { } id := SecurityRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2024-01-01/securityrules/method_defaultsecurityrulesget.go index a672fd767b7..0d436a23706 100644 --- a/resource-manager/network/2024-01-01/securityrules/method_defaultsecurityrulesget.go +++ b/resource-manager/network/2024-01-01/securityrules/method_defaultsecurityrulesget.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id Def var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securityrules/method_get.go b/resource-manager/network/2024-01-01/securityrules/method_get.go index effcc9d3d7b..85ddb4310ff 100644 --- a/resource-manager/network/2024-01-01/securityrules/method_get.go +++ b/resource-manager/network/2024-01-01/securityrules/method_get.go @@ -45,7 +45,6 @@ func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result var model SecurityRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/securityrules/version.go b/resource-manager/network/2024-01-01/securityrules/version.go index f28290438d9..575cf51ac10 100644 --- a/resource-manager/network/2024-01-01/securityrules/version.go +++ b/resource-manager/network/2024-01-01/securityrules/version.go @@ -1,12 +1,10 @@ package securityrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityrules/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/README.md b/resource-manager/network/2024-01-01/serviceendpointpolicies/README.md index 625676f73c2..47126bea37a 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/README.md +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/serviceendpointpolicies` Documentation -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `serviceendpointpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/client.go b/resource-manager/network/2024-01-01/serviceendpointpolicies/client.go index d92547bd44b..4efc8d43b2a 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/client.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPoliciesClient struct { } func NewServiceEndpointPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2024-01-01/serviceendpointpolicies/id_serviceendpointpolicy.go index 4b66cdb57fe..d922a583fba 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2024-01-01/serviceendpointpolicies/method_get.go index 8929b01c755..ce97f45af4d 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/method_get.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpoi var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2024-01-01/serviceendpointpolicies/method_updatetags.go index 92a472479ad..d260b347033 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/method_updatetags.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id Servic var model ServiceEndpointPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicies/version.go b/resource-manager/network/2024-01-01/serviceendpointpolicies/version.go index 582a139c806..a56a55cfc06 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicies/version.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicies/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicies/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/README.md index 29dd2986e79..58713655ddc 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/README.md +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions` Documentation -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `serviceendpointpolicydefinitions` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/client.go index c75845bd1b5..0b0e9163605 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/client.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/client.go @@ -15,7 +15,7 @@ type ServiceEndpointPolicyDefinitionsClient struct { } func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serviceendpointpolicydefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go index 2d85c659986..b3ccc083899 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go @@ -42,7 +42,7 @@ func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPo } id := ServiceEndpointPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go index edee1adbeda..abc9a0e9719 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go @@ -44,7 +44,7 @@ func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolic } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*Service } id := ServiceEndpointPolicyDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/method_get.go index e9e63e50232..8aff5f74167 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/method_get.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/method_get.go @@ -45,7 +45,6 @@ func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id Serv var model ServiceEndpointPolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/version.go index f1ac0295b5d..344a703abbe 100644 --- a/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/version.go +++ b/resource-manager/network/2024-01-01/serviceendpointpolicydefinitions/version.go @@ -1,12 +1,10 @@ package serviceendpointpolicydefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/servicetags/README.md b/resource-manager/network/2024-01-01/servicetags/README.md index bd0c913b648..090c2370e11 100644 --- a/resource-manager/network/2024-01-01/servicetags/README.md +++ b/resource-manager/network/2024-01-01/servicetags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/servicetags` Documentation -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `servicetags` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/servicetags/client.go b/resource-manager/network/2024-01-01/servicetags/client.go index 7037716c1cf..33295761773 100644 --- a/resource-manager/network/2024-01-01/servicetags/client.go +++ b/resource-manager/network/2024-01-01/servicetags/client.go @@ -15,7 +15,7 @@ type ServiceTagsClient struct { } func NewServiceTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicetags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/servicetags/id_location.go b/resource-manager/network/2024-01-01/servicetags/id_location.go index b22b2cb34d7..a68389322f8 100644 --- a/resource-manager/network/2024-01-01/servicetags/id_location.go +++ b/resource-manager/network/2024-01-01/servicetags/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2024-01-01/servicetags/method_servicetaginformationlist.go index 7c6de375541..1150809dc2b 100644 --- a/resource-manager/network/2024-01-01/servicetags/method_servicetaginformationlist.go +++ b/resource-manager/network/2024-01-01/servicetags/method_servicetaginformationlist.go @@ -40,6 +40,7 @@ func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/servicetags/method_servicetagslist.go b/resource-manager/network/2024-01-01/servicetags/method_servicetagslist.go index f83c293d79b..a25ce187253 100644 --- a/resource-manager/network/2024-01-01/servicetags/method_servicetagslist.go +++ b/resource-manager/network/2024-01-01/servicetags/method_servicetagslist.go @@ -46,7 +46,6 @@ func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) ( var model ServiceTagsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/servicetags/version.go b/resource-manager/network/2024-01-01/servicetags/version.go index cfdba6b2afd..3a5891ec70f 100644 --- a/resource-manager/network/2024-01-01/servicetags/version.go +++ b/resource-manager/network/2024-01-01/servicetags/version.go @@ -1,12 +1,10 @@ package servicetags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicetags/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/staticmembers/README.md b/resource-manager/network/2024-01-01/staticmembers/README.md index 8f26a0c7cce..f4295c7e62c 100644 --- a/resource-manager/network/2024-01-01/staticmembers/README.md +++ b/resource-manager/network/2024-01-01/staticmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/staticmembers` Documentation -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `staticmembers` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/staticmembers/client.go b/resource-manager/network/2024-01-01/staticmembers/client.go index 0bd2daa81d6..9357db6d5f3 100644 --- a/resource-manager/network/2024-01-01/staticmembers/client.go +++ b/resource-manager/network/2024-01-01/staticmembers/client.go @@ -15,7 +15,7 @@ type StaticMembersClient struct { } func NewStaticMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/staticmembers/id_networkgroup.go b/resource-manager/network/2024-01-01/staticmembers/id_networkgroup.go index cbc610731ad..6138fabd8d9 100644 --- a/resource-manager/network/2024-01-01/staticmembers/id_networkgroup.go +++ b/resource-manager/network/2024-01-01/staticmembers/id_networkgroup.go @@ -44,7 +44,7 @@ func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { } id := NetworkGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/staticmembers/id_staticmember.go b/resource-manager/network/2024-01-01/staticmembers/id_staticmember.go index e972ef7ffc2..10350a8597a 100644 --- a/resource-manager/network/2024-01-01/staticmembers/id_staticmember.go +++ b/resource-manager/network/2024-01-01/staticmembers/id_staticmember.go @@ -46,7 +46,7 @@ func ParseStaticMemberID(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { } id := StaticMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/staticmembers/method_createorupdate.go b/resource-manager/network/2024-01-01/staticmembers/method_createorupdate.go index 6921f0aedf3..f4ad175116b 100644 --- a/resource-manager/network/2024-01-01/staticmembers/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/staticmembers/method_createorupdate.go @@ -50,7 +50,6 @@ func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMember var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/staticmembers/method_get.go b/resource-manager/network/2024-01-01/staticmembers/method_get.go index 11fc970af6a..8f9d30b17ab 100644 --- a/resource-manager/network/2024-01-01/staticmembers/method_get.go +++ b/resource-manager/network/2024-01-01/staticmembers/method_get.go @@ -45,7 +45,6 @@ func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result var model StaticMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/staticmembers/method_list.go b/resource-manager/network/2024-01-01/staticmembers/method_list.go index ac0788a5a34..ef104e6865f 100644 --- a/resource-manager/network/2024-01-01/staticmembers/method_list.go +++ b/resource-manager/network/2024-01-01/staticmembers/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/staticmembers/version.go b/resource-manager/network/2024-01-01/staticmembers/version.go index a5b078b5055..188e3c42695 100644 --- a/resource-manager/network/2024-01-01/staticmembers/version.go +++ b/resource-manager/network/2024-01-01/staticmembers/version.go @@ -1,12 +1,10 @@ package staticmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticmembers/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/subnets/README.md b/resource-manager/network/2024-01-01/subnets/README.md index 6a02970116d..8a6becbacfb 100644 --- a/resource-manager/network/2024-01-01/subnets/README.md +++ b/resource-manager/network/2024-01-01/subnets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/subnets` Documentation -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `subnets` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/subnets/client.go b/resource-manager/network/2024-01-01/subnets/client.go index b1f947b47be..d3ece632ec6 100644 --- a/resource-manager/network/2024-01-01/subnets/client.go +++ b/resource-manager/network/2024-01-01/subnets/client.go @@ -15,7 +15,7 @@ type SubnetsClient struct { } func NewSubnetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subnets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subnets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/subnets/method_get.go b/resource-manager/network/2024-01-01/subnets/method_get.go index d77795ad632..9340f66305d 100644 --- a/resource-manager/network/2024-01-01/subnets/method_get.go +++ b/resource-manager/network/2024-01-01/subnets/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options G var model Subnet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/subnets/version.go b/resource-manager/network/2024-01-01/subnets/version.go index dee7e7bc526..e5f984a85ce 100644 --- a/resource-manager/network/2024-01-01/subnets/version.go +++ b/resource-manager/network/2024-01-01/subnets/version.go @@ -1,12 +1,10 @@ package subnets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subnets/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/trafficanalytics/README.md b/resource-manager/network/2024-01-01/trafficanalytics/README.md index f947af5dc65..7f1870c7374 100644 --- a/resource-manager/network/2024-01-01/trafficanalytics/README.md +++ b/resource-manager/network/2024-01-01/trafficanalytics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/trafficanalytics` Documentation -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `trafficanalytics` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/trafficanalytics/client.go b/resource-manager/network/2024-01-01/trafficanalytics/client.go index 78e1d6ab331..91c746485a3 100644 --- a/resource-manager/network/2024-01-01/trafficanalytics/client.go +++ b/resource-manager/network/2024-01-01/trafficanalytics/client.go @@ -15,7 +15,7 @@ type TrafficAnalyticsClient struct { } func NewTrafficAnalyticsClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficanalytics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficanalytics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2024-01-01/trafficanalytics/id_networkwatcher.go index f13408f03b5..17351381303 100644 --- a/resource-manager/network/2024-01-01/trafficanalytics/id_networkwatcher.go +++ b/resource-manager/network/2024-01-01/trafficanalytics/id_networkwatcher.go @@ -42,7 +42,7 @@ func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) } id := NetworkWatcherId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/trafficanalytics/version.go b/resource-manager/network/2024-01-01/trafficanalytics/version.go index 0b4e4d6d39f..de4cee53c72 100644 --- a/resource-manager/network/2024-01-01/trafficanalytics/version.go +++ b/resource-manager/network/2024-01-01/trafficanalytics/version.go @@ -1,12 +1,10 @@ package trafficanalytics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficanalytics/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/usages/README.md b/resource-manager/network/2024-01-01/usages/README.md index 07f39236cb6..b01ac201620 100644 --- a/resource-manager/network/2024-01-01/usages/README.md +++ b/resource-manager/network/2024-01-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/usages/client.go b/resource-manager/network/2024-01-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/network/2024-01-01/usages/client.go +++ b/resource-manager/network/2024-01-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/usages/id_location.go b/resource-manager/network/2024-01-01/usages/id_location.go index 6499c99bc79..8d1a811520a 100644 --- a/resource-manager/network/2024-01-01/usages/id_location.go +++ b/resource-manager/network/2024-01-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/usages/version.go b/resource-manager/network/2024-01-01/usages/version.go index db9a6b86f5b..0b4c4292330 100644 --- a/resource-manager/network/2024-01-01/usages/version.go +++ b/resource-manager/network/2024-01-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vipswap/README.md b/resource-manager/network/2024-01-01/vipswap/README.md index 4a0c6489673..a11e5704bd2 100644 --- a/resource-manager/network/2024-01-01/vipswap/README.md +++ b/resource-manager/network/2024-01-01/vipswap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/vipswap` Documentation -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `vipswap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/vipswap/client.go b/resource-manager/network/2024-01-01/vipswap/client.go index 2a7d8c2afe7..d573391540e 100644 --- a/resource-manager/network/2024-01-01/vipswap/client.go +++ b/resource-manager/network/2024-01-01/vipswap/client.go @@ -15,7 +15,7 @@ type VipSwapClient struct { } func NewVipSwapClientWithBaseURI(sdkApi sdkEnv.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vipswap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vipswap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vipswap/id_cloudservice.go b/resource-manager/network/2024-01-01/vipswap/id_cloudservice.go index 5801e90709d..9e7c3a0f112 100644 --- a/resource-manager/network/2024-01-01/vipswap/id_cloudservice.go +++ b/resource-manager/network/2024-01-01/vipswap/id_cloudservice.go @@ -42,7 +42,7 @@ func ParseCloudServiceID(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { } id := CloudServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vipswap/method_get.go b/resource-manager/network/2024-01-01/vipswap/method_get.go index 2d61c8f37e0..598d2371676 100644 --- a/resource-manager/network/2024-01-01/vipswap/method_get.go +++ b/resource-manager/network/2024-01-01/vipswap/method_get.go @@ -46,7 +46,6 @@ func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOp var model SwapResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/vipswap/method_list.go b/resource-manager/network/2024-01-01/vipswap/method_list.go index 32407cc2c5c..35cd678f8c4 100644 --- a/resource-manager/network/2024-01-01/vipswap/method_list.go +++ b/resource-manager/network/2024-01-01/vipswap/method_list.go @@ -46,7 +46,6 @@ func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result List var model SwapResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/vipswap/version.go b/resource-manager/network/2024-01-01/vipswap/version.go index 006a85f3f78..ba7036d7b4d 100644 --- a/resource-manager/network/2024-01-01/vipswap/version.go +++ b/resource-manager/network/2024-01-01/vipswap/version.go @@ -1,12 +1,10 @@ package vipswap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vipswap/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/README.md b/resource-manager/network/2024-01-01/virtualappliancesites/README.md index ab9e3124862..e7d774a4cee 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/README.md +++ b/resource-manager/network/2024-01-01/virtualappliancesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualappliancesites` Documentation -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualappliancesites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/client.go b/resource-manager/network/2024-01-01/virtualappliancesites/client.go index 415b8e6e46b..e99ff0ccd1b 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/client.go +++ b/resource-manager/network/2024-01-01/virtualappliancesites/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSitesClient struct { } func NewVirtualApplianceSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualappliancesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualappliancesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2024-01-01/virtualappliancesites/id_networkvirtualappliance.go index d414a3c2d42..6689f6908a1 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/id_networkvirtualappliance.go +++ b/resource-manager/network/2024-01-01/virtualappliancesites/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2024-01-01/virtualappliancesites/id_virtualappliancesite.go index a0500e43c74..be16c8f8b7e 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/id_virtualappliancesite.go +++ b/resource-manager/network/2024-01-01/virtualappliancesites/id_virtualappliancesite.go @@ -44,7 +44,7 @@ func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSi } id := VirtualApplianceSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/method_get.go b/resource-manager/network/2024-01-01/virtualappliancesites/method_get.go index c78f7f1cf64..820f76d71d2 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/method_get.go +++ b/resource-manager/network/2024-01-01/virtualappliancesites/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianc var model VirtualApplianceSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualappliancesites/version.go b/resource-manager/network/2024-01-01/virtualappliancesites/version.go index 747e350d5c0..9fc002893ae 100644 --- a/resource-manager/network/2024-01-01/virtualappliancesites/version.go +++ b/resource-manager/network/2024-01-01/virtualappliancesites/version.go @@ -1,12 +1,10 @@ package virtualappliancesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualappliancesites/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualapplianceskus/README.md b/resource-manager/network/2024-01-01/virtualapplianceskus/README.md index 57e51b09990..b28b8608275 100644 --- a/resource-manager/network/2024-01-01/virtualapplianceskus/README.md +++ b/resource-manager/network/2024-01-01/virtualapplianceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualapplianceskus` Documentation -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualapplianceskus` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualapplianceskus/client.go b/resource-manager/network/2024-01-01/virtualapplianceskus/client.go index db6e9902bb9..90d73eb6104 100644 --- a/resource-manager/network/2024-01-01/virtualapplianceskus/client.go +++ b/resource-manager/network/2024-01-01/virtualapplianceskus/client.go @@ -15,7 +15,7 @@ type VirtualApplianceSkusClient struct { } func NewVirtualApplianceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualapplianceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualapplianceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2024-01-01/virtualapplianceskus/id_networkvirtualappliancesku.go index a2683ac973a..3980d29645a 100644 --- a/resource-manager/network/2024-01-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ b/resource-manager/network/2024-01-01/virtualapplianceskus/id_networkvirtualappliancesku.go @@ -40,7 +40,7 @@ func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSk } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtu } id := NetworkVirtualApplianceSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualapplianceskus/method_get.go b/resource-manager/network/2024-01-01/virtualapplianceskus/method_get.go index 87cc1eef20e..c570427c4a3 100644 --- a/resource-manager/network/2024-01-01/virtualapplianceskus/method_get.go +++ b/resource-manager/network/2024-01-01/virtualapplianceskus/method_get.go @@ -45,7 +45,6 @@ func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualAp var model NetworkVirtualApplianceSku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualapplianceskus/version.go b/resource-manager/network/2024-01-01/virtualapplianceskus/version.go index 8c4dfc35294..2dbee6290d2 100644 --- a/resource-manager/network/2024-01-01/virtualapplianceskus/version.go +++ b/resource-manager/network/2024-01-01/virtualapplianceskus/version.go @@ -1,12 +1,10 @@ package virtualapplianceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualapplianceskus/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/README.md index 3d27dd325ee..54a267fe8eb 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections` Documentation -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworkgatewayconnections` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/client.go index f0cf4471c90..b74a1276981 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewayConnectionsClient struct { } func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgatewayconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/id_connection.go index 23a8c6154a7..8f674780f99 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/id_connection.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_get.go index e00568d96cb..842bab814e9 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_get.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id Conn var model VirtualNetworkGatewayConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_getsharedkey.go index bc9ecd13466..3606b2efb65 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/method_getsharedkey.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context var model ConnectionSharedKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/version.go index 784a23c94ef..d5f137a7185 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgatewayconnections/version.go @@ -1,12 +1,10 @@ package virtualnetworkgatewayconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/README.md b/resource-manager/network/2024-01-01/virtualnetworkgateways/README.md index 713d088b0fa..c65ecca7bf4 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworkgateways` Documentation -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworkgateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/client.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/client.go index 32ede23bc60..56907b3d1b4 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/client.go @@ -15,7 +15,7 @@ type VirtualNetworkGatewaysClient struct { } func NewVirtualNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_connection.go index fb9191036b5..d1aefba4347 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_connection.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgateway.go index 4763c88cab1..9589eab0bf6 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgateway.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGat } id := VirtualNetworkGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go index 41c5df8eedd..a767c52859c 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNa } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNet } id := VirtualNetworkGatewayNatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_get.go index 0f42a04cd89..403f9e12374 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_get.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getadvertisedroutes.go index d0dde50a8c6..969c71ee317 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getadvertisedroutes.go @@ -37,6 +37,7 @@ func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getbgppeerstatus.go index 5e6a04ac485..33e243af246 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_getbgppeerstatus.go @@ -37,6 +37,7 @@ func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_reset.go index 433a2126e07..fb6210d0c1e 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_reset.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_supportedvpndevices.go index c7d78912ab2..7b81cd2d32c 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_supportedvpndevices.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_supportedvpndevices.go @@ -46,7 +46,6 @@ func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, i var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go index 8347acb37cd..10dc0fac1a6 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go @@ -45,7 +45,6 @@ func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx conte var model VirtualNetworkGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go index b2673932149..0dbfcf3f88f 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go @@ -50,7 +50,6 @@ func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.C var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkgateways/version.go b/resource-manager/network/2024-01-01/virtualnetworkgateways/version.go index 4d95b26b82e..8dcd206b3f7 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkgateways/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworkgateways/version.go @@ -1,12 +1,10 @@ package virtualnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkgateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/README.md b/resource-manager/network/2024-01-01/virtualnetworkpeerings/README.md index 9427eaa4b7e..8b8ae055559 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworkpeerings` Documentation -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworkpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/client.go b/resource-manager/network/2024-01-01/virtualnetworkpeerings/client.go index 8eb7455514c..a8632e2ec55 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/client.go @@ -15,7 +15,7 @@ type VirtualNetworkPeeringsClient struct { } func NewVirtualNetworkPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2024-01-01/virtualnetworkpeerings/id_virtualnetworkpeering.go index a72d63bb3a5..b18a9909ca2 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/id_virtualnetworkpeering.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPee } id := VirtualNetworkPeeringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_createorupdate.go index aba174940d2..950797b7302 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_get.go index 81671aa625e..8bc92358897 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_get.go +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetwork var model VirtualNetworkPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworkpeerings/version.go b/resource-manager/network/2024-01-01/virtualnetworkpeerings/version.go index 24dc1d501ad..87d4e03ba9e 100644 --- a/resource-manager/network/2024-01-01/virtualnetworkpeerings/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworkpeerings/version.go @@ -1,12 +1,10 @@ package virtualnetworkpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkpeerings/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/README.md b/resource-manager/network/2024-01-01/virtualnetworks/README.md index 45c8c0a7c59..d89c6448f70 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworks/client.go b/resource-manager/network/2024-01-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/method_get.go b/resource-manager/network/2024-01-01/virtualnetworks/method_get.go index 189fd2689c1..db1b8807d3e 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/method_get.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetw var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2024-01-01/virtualnetworks/method_updatetags.go index 8e2d6ea92a2..3e63f83e2a6 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/method_updatetags.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/method_updatetags.go @@ -50,7 +50,6 @@ func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.Virt var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go index 1f434189786..bcd41a4d551 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go @@ -35,6 +35,7 @@ func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() * func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx con var model IPAddressAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go index d48736807d5..cfc2cb53d45 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go @@ -44,6 +44,7 @@ func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *cl func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/virtualnetworks/version.go b/resource-manager/network/2024-01-01/virtualnetworks/version.go index d9a791b9024..8e288d9a64b 100644 --- a/resource-manager/network/2024-01-01/virtualnetworks/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/README.md b/resource-manager/network/2024-01-01/virtualnetworktap/README.md index e80ff3d2eb8..6632f9445b5 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworktap/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworktap` Documentation -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworktap` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/client.go b/resource-manager/network/2024-01-01/virtualnetworktap/client.go index 4444f3072d8..71e5a9092ba 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworktap/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapClient struct { } func NewVirtualNetworkTapClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktap", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktap", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2024-01-01/virtualnetworktap/id_virtualnetworktap.go index 5bf0638a304..7c8ef004fe6 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/id_virtualnetworktap.go +++ b/resource-manager/network/2024-01-01/virtualnetworktap/id_virtualnetworktap.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, } id := VirtualNetworkTapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/method_get.go b/resource-manager/network/2024-01-01/virtualnetworktap/method_get.go index 7d8ef7767ee..cbeab75581a 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/method_get.go +++ b/resource-manager/network/2024-01-01/virtualnetworktap/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2024-01-01/virtualnetworktap/method_updatetags.go index 2079b8bdf80..3d2dd536791 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/method_updatetags.go +++ b/resource-manager/network/2024-01-01/virtualnetworktap/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetwo var model VirtualNetworkTap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualnetworktap/version.go b/resource-manager/network/2024-01-01/virtualnetworktap/version.go index 8d4459e47b2..b14d48a1a41 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktap/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworktap/version.go @@ -1,12 +1,10 @@ package virtualnetworktap -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktap/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualnetworktaps/README.md b/resource-manager/network/2024-01-01/virtualnetworktaps/README.md index 80985f504be..c4bd409054e 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktaps/README.md +++ b/resource-manager/network/2024-01-01/virtualnetworktaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualnetworktaps` Documentation -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualnetworktaps` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualnetworktaps/client.go b/resource-manager/network/2024-01-01/virtualnetworktaps/client.go index 33de6824de7..072baab9143 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktaps/client.go +++ b/resource-manager/network/2024-01-01/virtualnetworktaps/client.go @@ -15,7 +15,7 @@ type VirtualNetworkTapsClient struct { } func NewVirtualNetworkTapsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworktaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworktaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualnetworktaps/version.go b/resource-manager/network/2024-01-01/virtualnetworktaps/version.go index fe96630abcd..d4189526403 100644 --- a/resource-manager/network/2024-01-01/virtualnetworktaps/version.go +++ b/resource-manager/network/2024-01-01/virtualnetworktaps/version.go @@ -1,12 +1,10 @@ package virtualnetworktaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworktaps/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualrouterpeerings/README.md b/resource-manager/network/2024-01-01/virtualrouterpeerings/README.md index 345a1a3eb6b..e58355102c8 100644 --- a/resource-manager/network/2024-01-01/virtualrouterpeerings/README.md +++ b/resource-manager/network/2024-01-01/virtualrouterpeerings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualrouterpeerings` Documentation -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualrouterpeerings` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualrouterpeerings/client.go b/resource-manager/network/2024-01-01/virtualrouterpeerings/client.go index 6b55e901ef5..b8bf140b1c1 100644 --- a/resource-manager/network/2024-01-01/virtualrouterpeerings/client.go +++ b/resource-manager/network/2024-01-01/virtualrouterpeerings/client.go @@ -15,7 +15,7 @@ type VirtualRouterPeeringsClient struct { } func NewVirtualRouterPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouterpeerings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2024-01-01/virtualrouterpeerings/id_virtualrouter.go index 85fff5b9af3..d23c35f1255 100644 --- a/resource-manager/network/2024-01-01/virtualrouterpeerings/id_virtualrouter.go +++ b/resource-manager/network/2024-01-01/virtualrouterpeerings/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2024-01-01/virtualrouterpeerings/method_get.go index 684fe0cb2fc..8b9d7a1569d 100644 --- a/resource-manager/network/2024-01-01/virtualrouterpeerings/method_get.go +++ b/resource-manager/network/2024-01-01/virtualrouterpeerings/method_get.go @@ -46,7 +46,6 @@ func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.Virtu var model VirtualRouterPeering result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualrouterpeerings/version.go b/resource-manager/network/2024-01-01/virtualrouterpeerings/version.go index 2e5fa1dc574..60d34c88b3e 100644 --- a/resource-manager/network/2024-01-01/virtualrouterpeerings/version.go +++ b/resource-manager/network/2024-01-01/virtualrouterpeerings/version.go @@ -1,12 +1,10 @@ package virtualrouterpeerings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouterpeerings/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualrouters/README.md b/resource-manager/network/2024-01-01/virtualrouters/README.md index a6add7ba840..534b9f3af2b 100644 --- a/resource-manager/network/2024-01-01/virtualrouters/README.md +++ b/resource-manager/network/2024-01-01/virtualrouters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualrouters` Documentation -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualrouters` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualrouters/client.go b/resource-manager/network/2024-01-01/virtualrouters/client.go index 37e6baf91a8..ca9adf26c79 100644 --- a/resource-manager/network/2024-01-01/virtualrouters/client.go +++ b/resource-manager/network/2024-01-01/virtualrouters/client.go @@ -15,7 +15,7 @@ type VirtualRoutersClient struct { } func NewVirtualRoutersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualrouters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualrouters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2024-01-01/virtualrouters/id_virtualrouter.go index 3e9ac08d3a1..917cee82cb6 100644 --- a/resource-manager/network/2024-01-01/virtualrouters/id_virtualrouter.go +++ b/resource-manager/network/2024-01-01/virtualrouters/id_virtualrouter.go @@ -42,7 +42,7 @@ func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { } id := VirtualRouterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualrouters/method_get.go b/resource-manager/network/2024-01-01/virtualrouters/method_get.go index 39415fad17f..4eaa68180fa 100644 --- a/resource-manager/network/2024-01-01/virtualrouters/method_get.go +++ b/resource-manager/network/2024-01-01/virtualrouters/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, optio var model VirtualRouter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualrouters/version.go b/resource-manager/network/2024-01-01/virtualrouters/version.go index f082e0d6275..6784011249d 100644 --- a/resource-manager/network/2024-01-01/virtualrouters/version.go +++ b/resource-manager/network/2024-01-01/virtualrouters/version.go @@ -1,12 +1,10 @@ package virtualrouters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualrouters/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/virtualwans/README.md b/resource-manager/network/2024-01-01/virtualwans/README.md index ac5aca73669..17628bbf609 100644 --- a/resource-manager/network/2024-01-01/virtualwans/README.md +++ b/resource-manager/network/2024-01-01/virtualwans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/virtualwans` Documentation -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `virtualwans` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/virtualwans/client.go b/resource-manager/network/2024-01-01/virtualwans/client.go index bf0a24c960f..0d727643072 100644 --- a/resource-manager/network/2024-01-01/virtualwans/client.go +++ b/resource-manager/network/2024-01-01/virtualwans/client.go @@ -15,7 +15,7 @@ type VirtualWANsClient struct { } func NewVirtualWANsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualwans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualwans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2024-01-01/virtualwans/id_configurationpolicygroup.go index 7ebd0347f4d..2742a567b1a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_configurationpolicygroup.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_configurationpolicygroup.go @@ -44,7 +44,7 @@ func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationP } id := ConfigurationPolicyGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2024-01-01/virtualwans/id_hubroutetable.go index 46e51d4c426..7254af39e90 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_hubroutetable.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_hubroutetable.go @@ -44,7 +44,7 @@ func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { } id := HubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2024-01-01/virtualwans/id_hubvirtualnetworkconnection.go index 92e4c4c7d5d..86b2ea6bba1 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_hubvirtualnetworkconnection.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_hubvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnect } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualN } id := HubVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_natrule.go b/resource-manager/network/2024-01-01/virtualwans/id_natrule.go index f2dca44d7fa..c75b3495702 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_natrule.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_natrule.go @@ -44,7 +44,7 @@ func ParseNatRuleID(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { } id := NatRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualappliance.go b/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualappliance.go index 2dc156a927c..325fe5cbaca 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualappliance.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualappliance.go @@ -42,7 +42,7 @@ func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, e } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualA } id := NetworkVirtualApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualapplianceconnection.go b/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualapplianceconnection.go index d39f2a000d0..09c7d9a52b2 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualapplianceconnection.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_networkvirtualapplianceconnection.go @@ -44,7 +44,7 @@ func ParseNetworkVirtualApplianceConnectionID(input string) (*NetworkVirtualAppl } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkVirtualApplianceConnectionIDInsensitively(input string) (*Netwo } id := NetworkVirtualApplianceConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_routemap.go b/resource-manager/network/2024-01-01/virtualwans/id_routemap.go index c95aeaafbfd..62984d50913 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_routemap.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_routemap.go @@ -44,7 +44,7 @@ func ParseRouteMapID(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { } id := RouteMapId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_routingintent.go b/resource-manager/network/2024-01-01/virtualwans/id_routingintent.go index de16e7a3861..0a5e5b5515f 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_routingintent.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_routingintent.go @@ -44,7 +44,7 @@ func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { } id := RoutingIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_virtualhub.go b/resource-manager/network/2024-01-01/virtualwans/id_virtualhub.go index ec4a18686e5..a65dd47d2f2 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_virtualhub.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_virtualhub.go @@ -42,7 +42,7 @@ func ParseVirtualHubID(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { } id := VirtualHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2024-01-01/virtualwans/id_virtualhubroutetable.go index b2cd55910b3..2c1b73bfb18 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_virtualhubroutetable.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_virtualhubroutetable.go @@ -44,7 +44,7 @@ func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTab } id := VirtualHubRouteTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_virtualwan.go b/resource-manager/network/2024-01-01/virtualwans/id_virtualwan.go index e8489bfa13e..c465fb4ee98 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_virtualwan.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_virtualwan.go @@ -42,7 +42,7 @@ func ParseVirtualWANID(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { } id := VirtualWANId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_vpngateway.go b/resource-manager/network/2024-01-01/virtualwans/id_vpngateway.go index 6889f4d78bc..ddef4f2b705 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_vpngateway.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2024-01-01/virtualwans/id_vpnlinkconnection.go index b40c9d3b7be..9e5fb0d4b28 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_vpnlinkconnection.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2024-01-01/virtualwans/id_vpnserverconfiguration.go index 604356fc28f..96680047062 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_vpnserverconfiguration.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_vpnsite.go b/resource-manager/network/2024-01-01/virtualwans/id_vpnsite.go index 4e20baefd21..6998a9ec345 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_vpnsite.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2024-01-01/virtualwans/id_vpnsitelink.go index a0b1676b210..d77c4473996 100644 --- a/resource-manager/network/2024-01-01/virtualwans/id_vpnsitelink.go +++ b/resource-manager/network/2024-01-01/virtualwans/id_vpnsitelink.go @@ -44,7 +44,7 @@ func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { } id := VpnSiteLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2024-01-01/virtualwans/method_configurationpolicygroupsget.go index 491fc15d5b2..d8feaa4f23a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_configurationpolicygroupsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_configurationpolicygroupsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id var model VpnServerConfigurationPolicyGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2024-01-01/virtualwans/method_hubroutetablesget.go index 36dc9467d46..e714731e2bf 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_hubroutetablesget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_hubroutetablesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTab var model HubRouteTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2024-01-01/virtualwans/method_hubvirtualnetworkconnectionsget.go index 852857adc59..f08f465d3c1 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_hubvirtualnetworkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, var model HubVirtualNetworkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_natrulesget.go b/resource-manager/network/2024-01-01/virtualwans/method_natrulesget.go index 9ba7ca45bea..c81f0b6e89a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_natrulesget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_natrulesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (resul var model VpnGatewayNatRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_networkvirtualapplianceconnectionsget.go b/resource-manager/network/2024-01-01/virtualwans/method_networkvirtualapplianceconnectionsget.go index ed429bdb536..783b3251a6c 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_networkvirtualapplianceconnectionsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_networkvirtualapplianceconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsGet(ctx context.Con var model NetworkVirtualApplianceConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2024-01-01/virtualwans/method_p2svpngatewaysget.go index 804013badcc..ec7e18c347e 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_p2svpngatewaysget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_p2svpngatewaysget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.V var model P2SVpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_routemapsget.go b/resource-manager/network/2024-01-01/virtualwans/method_routemapsget.go index 925002f31e7..c1db2c3033a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_routemapsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_routemapsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (res var model RouteMap result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_routingintentget.go b/resource-manager/network/2024-01-01/virtualwans/method_routingintentget.go index ae61d3b41b5..fea07e77795 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_routingintentget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_routingintentget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingInten var model RoutingIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2024-01-01/virtualwans/method_supportedsecurityproviders.go index 616d9dd0cd4..3351ee7549f 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_supportedsecurityproviders.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_supportedsecurityproviders.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id Vi var model VirtualWanSecurityProviders result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_updatetags.go b/resource-manager/network/2024-01-01/virtualwans/method_updatetags.go index 6115890e78c..42f292d4aea 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_updatetags.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_updatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, inpu var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubbgpconnectionget.go index 525c6b3cabe..e4d4c41773a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubbgpconnectionget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubbgpconnectionget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id co var model BgpConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubipconfigurationget.go index ca3c9a88dd3..c4abe234784 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubipconfigurationget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubipconfigurationget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id var model HubIPConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubroutetablev2sget.go index 7c542fcfe68..0d274e1355a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubroutetablev2sget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubroutetablev2sget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id Vi var model VirtualHubRouteTableV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsget.go index 3f2e419720f..0b1bcbe8573 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsupdatetags.go index be5399a4515..23f6df52743 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsupdatetags.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualhubsupdatetags.go @@ -49,7 +49,6 @@ func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id Virtual var model VirtualHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2024-01-01/virtualwans/method_virtualwansget.go index 41dbd00d7f2..66d801a779a 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_virtualwansget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_virtualwansget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) var model VirtualWAN result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpnconnectionsget.go index 812232759b1..ca7d4d2a9b4 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpnconnectionsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpnconnectionsget.go @@ -46,7 +46,6 @@ func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.V var model VpnConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpngatewaysget.go index bfa13a547eb..0793829ea75 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpngatewaysget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpngatewaysget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) var model VpnGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpnserverconfigurationsget.go index e5b009a1154..5355630843f 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpnserverconfigurationsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpnserverconfigurationsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id Vp var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinkconnectionsget.go index 088e1b48de5..b2fed5d6de1 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinkconnectionsget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id Vpn var model VpnSiteLinkConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinksget.go index c16e84b3691..018f1ad8f67 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinksget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitelinksget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId var model VpnSiteLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitesget.go index 6494e6d6449..a250df018ce 100644 --- a/resource-manager/network/2024-01-01/virtualwans/method_vpnsitesget.go +++ b/resource-manager/network/2024-01-01/virtualwans/method_vpnsitesget.go @@ -45,7 +45,6 @@ func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (resul var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/virtualwans/version.go b/resource-manager/network/2024-01-01/virtualwans/version.go index a3d80006897..8e9125fc9d4 100644 --- a/resource-manager/network/2024-01-01/virtualwans/version.go +++ b/resource-manager/network/2024-01-01/virtualwans/version.go @@ -1,12 +1,10 @@ package virtualwans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualwans/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vmsspublicipaddresses/README.md b/resource-manager/network/2024-01-01/vmsspublicipaddresses/README.md index 662d65f1d36..5582a8f9a92 100644 --- a/resource-manager/network/2024-01-01/vmsspublicipaddresses/README.md +++ b/resource-manager/network/2024-01-01/vmsspublicipaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/vmsspublicipaddresses` Documentation -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `vmsspublicipaddresses` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/vmsspublicipaddresses/client.go b/resource-manager/network/2024-01-01/vmsspublicipaddresses/client.go index 3213cbf73fe..218145b65b9 100644 --- a/resource-manager/network/2024-01-01/vmsspublicipaddresses/client.go +++ b/resource-manager/network/2024-01-01/vmsspublicipaddresses/client.go @@ -15,7 +15,7 @@ type VMSSPublicIPAddressesClient struct { } func NewVMSSPublicIPAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmsspublicipaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2024-01-01/vmsspublicipaddresses/id_virtualmachinescaleset.go index 6907f32662f..d2ae7bd3514 100644 --- a/resource-manager/network/2024-01-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ b/resource-manager/network/2024-01-01/vmsspublicipaddresses/id_virtualmachinescaleset.go @@ -42,7 +42,7 @@ func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, err } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineSc } id := VirtualMachineScaleSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2024-01-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go index 482b018c7dc..aa1a988346a 100644 --- a/resource-manager/network/2024-01-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ b/resource-manager/network/2024-01-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go @@ -35,6 +35,7 @@ func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOption func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetP var model PublicIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/vmsspublicipaddresses/version.go b/resource-manager/network/2024-01-01/vmsspublicipaddresses/version.go index 4a5290e3c90..f1bc3cf3cc7 100644 --- a/resource-manager/network/2024-01-01/vmsspublicipaddresses/version.go +++ b/resource-manager/network/2024-01-01/vmsspublicipaddresses/version.go @@ -1,12 +1,10 @@ package vmsspublicipaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmsspublicipaddresses/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vpngateways/README.md b/resource-manager/network/2024-01-01/vpngateways/README.md index 1a9a027cd39..de260061db9 100644 --- a/resource-manager/network/2024-01-01/vpngateways/README.md +++ b/resource-manager/network/2024-01-01/vpngateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/vpngateways` Documentation -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `vpngateways` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/vpngateways/client.go b/resource-manager/network/2024-01-01/vpngateways/client.go index 5679554f1a5..c17671a8ad9 100644 --- a/resource-manager/network/2024-01-01/vpngateways/client.go +++ b/resource-manager/network/2024-01-01/vpngateways/client.go @@ -15,7 +15,7 @@ type VpnGatewaysClient struct { } func NewVpnGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpngateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpngateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vpngateways/id_vpngateway.go b/resource-manager/network/2024-01-01/vpngateways/id_vpngateway.go index 4a48b9a7916..a605ffbf545 100644 --- a/resource-manager/network/2024-01-01/vpngateways/id_vpngateway.go +++ b/resource-manager/network/2024-01-01/vpngateways/id_vpngateway.go @@ -42,7 +42,7 @@ func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { } id := VpnGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vpngateways/method_reset.go b/resource-manager/network/2024-01-01/vpngateways/method_reset.go index 8228267e86c..06856815c74 100644 --- a/resource-manager/network/2024-01-01/vpngateways/method_reset.go +++ b/resource-manager/network/2024-01-01/vpngateways/method_reset.go @@ -37,6 +37,7 @@ func (o ResetOperationOptions) ToHeaders() *client.Headers { func (o ResetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/network/2024-01-01/vpngateways/version.go b/resource-manager/network/2024-01-01/vpngateways/version.go index 0b2cda557b0..603df96edb9 100644 --- a/resource-manager/network/2024-01-01/vpngateways/version.go +++ b/resource-manager/network/2024-01-01/vpngateways/version.go @@ -1,12 +1,10 @@ package vpngateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpngateways/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vpnlinkconnections/client.go b/resource-manager/network/2024-01-01/vpnlinkconnections/client.go index 3fbef685129..abb23ca4c39 100644 --- a/resource-manager/network/2024-01-01/vpnlinkconnections/client.go +++ b/resource-manager/network/2024-01-01/vpnlinkconnections/client.go @@ -15,7 +15,7 @@ type VpnLinkConnectionsClient struct { } func NewVpnLinkConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnlinkconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnlinkconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2024-01-01/vpnlinkconnections/id_vpnlinkconnection.go index e1dd95afd3a..ba9d1fe1a91 100644 --- a/resource-manager/network/2024-01-01/vpnlinkconnections/id_vpnlinkconnection.go +++ b/resource-manager/network/2024-01-01/vpnlinkconnections/id_vpnlinkconnection.go @@ -46,7 +46,7 @@ func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, } id := VpnLinkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vpnlinkconnections/version.go b/resource-manager/network/2024-01-01/vpnlinkconnections/version.go index 4576acb893d..352438e59ba 100644 --- a/resource-manager/network/2024-01-01/vpnlinkconnections/version.go +++ b/resource-manager/network/2024-01-01/vpnlinkconnections/version.go @@ -1,12 +1,10 @@ package vpnlinkconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnlinkconnections/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vpnserverconfigurations/README.md b/resource-manager/network/2024-01-01/vpnserverconfigurations/README.md index bfc3f2c04d8..49e79f79d9a 100644 --- a/resource-manager/network/2024-01-01/vpnserverconfigurations/README.md +++ b/resource-manager/network/2024-01-01/vpnserverconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/vpnserverconfigurations` Documentation -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `vpnserverconfigurations` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/vpnserverconfigurations/client.go b/resource-manager/network/2024-01-01/vpnserverconfigurations/client.go index 6209cc6af8d..661d154e519 100644 --- a/resource-manager/network/2024-01-01/vpnserverconfigurations/client.go +++ b/resource-manager/network/2024-01-01/vpnserverconfigurations/client.go @@ -15,7 +15,7 @@ type VpnServerConfigurationsClient struct { } func NewVpnServerConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnserverconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2024-01-01/vpnserverconfigurations/id_vpnserverconfiguration.go index 56b67386806..fd55db1bea0 100644 --- a/resource-manager/network/2024-01-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ b/resource-manager/network/2024-01-01/vpnserverconfigurations/id_vpnserverconfiguration.go @@ -42,7 +42,7 @@ func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, err } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigu } id := VpnServerConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2024-01-01/vpnserverconfigurations/method_updatetags.go index 7a675d1584d..f9decf387a7 100644 --- a/resource-manager/network/2024-01-01/vpnserverconfigurations/method_updatetags.go +++ b/resource-manager/network/2024-01-01/vpnserverconfigurations/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnSer var model VpnServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/vpnserverconfigurations/version.go b/resource-manager/network/2024-01-01/vpnserverconfigurations/version.go index 9d2d91dfef5..1019a21b3d7 100644 --- a/resource-manager/network/2024-01-01/vpnserverconfigurations/version.go +++ b/resource-manager/network/2024-01-01/vpnserverconfigurations/version.go @@ -1,12 +1,10 @@ package vpnserverconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnserverconfigurations/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/vpnsites/README.md b/resource-manager/network/2024-01-01/vpnsites/README.md index e6a79e8bb2f..ecf744c2d82 100644 --- a/resource-manager/network/2024-01-01/vpnsites/README.md +++ b/resource-manager/network/2024-01-01/vpnsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/vpnsites` Documentation -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `vpnsites` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/vpnsites/client.go b/resource-manager/network/2024-01-01/vpnsites/client.go index 241eb9e94ea..2c56ae704cd 100644 --- a/resource-manager/network/2024-01-01/vpnsites/client.go +++ b/resource-manager/network/2024-01-01/vpnsites/client.go @@ -15,7 +15,7 @@ type VpnSitesClient struct { } func NewVpnSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vpnsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vpnsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/vpnsites/id_vpnsite.go b/resource-manager/network/2024-01-01/vpnsites/id_vpnsite.go index 4b42ecf0a1e..f4827bdd53c 100644 --- a/resource-manager/network/2024-01-01/vpnsites/id_vpnsite.go +++ b/resource-manager/network/2024-01-01/vpnsites/id_vpnsite.go @@ -42,7 +42,7 @@ func ParseVpnSiteID(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { } id := VpnSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/vpnsites/method_updatetags.go b/resource-manager/network/2024-01-01/vpnsites/method_updatetags.go index 08341839986..aa5af2cd330 100644 --- a/resource-manager/network/2024-01-01/vpnsites/method_updatetags.go +++ b/resource-manager/network/2024-01-01/vpnsites/method_updatetags.go @@ -49,7 +49,6 @@ func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input Tags var model VpnSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/vpnsites/version.go b/resource-manager/network/2024-01-01/vpnsites/version.go index 3652c1c0185..2d7b0cc61f8 100644 --- a/resource-manager/network/2024-01-01/vpnsites/version.go +++ b/resource-manager/network/2024-01-01/vpnsites/version.go @@ -1,12 +1,10 @@ package vpnsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vpnsites/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/README.md index f1ceafd24d4..029a920e920 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/README.md +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/webapplicationfirewallpolicies` Documentation -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `webapplicationfirewallpolicies` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/client.go index ac148c53733..225049a7361 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/client.go +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/client.go @@ -15,7 +15,7 @@ type WebApplicationFirewallPoliciesClient struct { } func NewWebApplicationFirewallPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapplicationfirewallpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go index 9c48316d9e7..21335631484 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go @@ -42,7 +42,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*Appli } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input st } id := ApplicationGatewayWebApplicationFirewallPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_createorupdate.go index a30ca59994f..556b406a3c2 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_createorupdate.go +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_get.go index 03919558699..b34138178e0 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_get.go +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/method_get.go @@ -45,7 +45,6 @@ func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id Applic var model WebApplicationFirewallPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/version.go index ff8493c34a5..d39aeb83dc2 100644 --- a/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/version.go +++ b/resource-manager/network/2024-01-01/webapplicationfirewallpolicies/version.go @@ -1,12 +1,10 @@ package webapplicationfirewallpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapplicationfirewallpolicies/2024-01-01" } diff --git a/resource-manager/network/2024-01-01/webcategories/README.md b/resource-manager/network/2024-01-01/webcategories/README.md index b7710633a1d..5933339c261 100644 --- a/resource-manager/network/2024-01-01/webcategories/README.md +++ b/resource-manager/network/2024-01-01/webcategories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2024-01-01/webcategories` Documentation -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2024-01-01`). +The `webcategories` SDK allows for interaction with Azure Resource Manager `network` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/network/2024-01-01/webcategories/client.go b/resource-manager/network/2024-01-01/webcategories/client.go index 075aa15b06b..980ef726026 100644 --- a/resource-manager/network/2024-01-01/webcategories/client.go +++ b/resource-manager/network/2024-01-01/webcategories/client.go @@ -15,7 +15,7 @@ type WebCategoriesClient struct { } func NewWebCategoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webcategories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webcategories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) } diff --git a/resource-manager/network/2024-01-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2024-01-01/webcategories/id_azurewebcategory.go index 1417d2f6d85..a7286a7dec7 100644 --- a/resource-manager/network/2024-01-01/webcategories/id_azurewebcategory.go +++ b/resource-manager/network/2024-01-01/webcategories/id_azurewebcategory.go @@ -40,7 +40,7 @@ func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, er } id := AzureWebCategoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/network/2024-01-01/webcategories/method_get.go b/resource-manager/network/2024-01-01/webcategories/method_get.go index 6150a24fbf4..bcebcf476db 100644 --- a/resource-manager/network/2024-01-01/webcategories/method_get.go +++ b/resource-manager/network/2024-01-01/webcategories/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, opt var model AzureWebCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/network/2024-01-01/webcategories/version.go b/resource-manager/network/2024-01-01/webcategories/version.go index 5229aba8eb8..45e1be0530b 100644 --- a/resource-manager/network/2024-01-01/webcategories/version.go +++ b/resource-manager/network/2024-01-01/webcategories/version.go @@ -1,12 +1,10 @@ package webcategories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webcategories/2024-01-01" } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/README.md b/resource-manager/networkanalytics/2023-11-15/dataproducts/README.md index 457afc5564c..b44f8af7bd3 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/README.md +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkanalytics/2023-11-15/dataproducts` Documentation -The `dataproducts` SDK allows for interaction with the Azure Resource Manager Service `networkanalytics` (API Version `2023-11-15`). +The `dataproducts` SDK allows for interaction with Azure Resource Manager `networkanalytics` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/client.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/client.go index 387dcf72dfa..13b86fac76f 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/client.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/client.go @@ -15,7 +15,7 @@ type DataProductsClient struct { } func NewDataProductsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataProductsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataproducts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataproducts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataProductsClient: %+v", err) } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/id_dataproduct.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/id_dataproduct.go index eda77278218..1951ed821cb 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/id_dataproduct.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/id_dataproduct.go @@ -42,7 +42,7 @@ func ParseDataProductID(input string) (*DataProductId, error) { } id := DataProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataProductIDInsensitively(input string) (*DataProductId, error) { } id := DataProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_adduserrole.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_adduserrole.go index f10a15fb4c7..8ae084e20c2 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_adduserrole.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_adduserrole.go @@ -50,7 +50,6 @@ func (c DataProductsClient) AddUserRole(ctx context.Context, id DataProductId, i var model RoleAssignmentDetail result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_generatestorageaccountsastoken.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_generatestorageaccountsastoken.go index 5321c96c8ba..25987689c45 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_generatestorageaccountsastoken.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_generatestorageaccountsastoken.go @@ -50,7 +50,6 @@ func (c DataProductsClient) GenerateStorageAccountSasToken(ctx context.Context, var model AccountSasToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_get.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_get.go index f91d0cb40c2..1df6273c0c5 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_get.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_get.go @@ -45,7 +45,6 @@ func (c DataProductsClient) Get(ctx context.Context, id DataProductId) (result G var model DataProduct result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_listrolesassignments.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_listrolesassignments.go index 4d4d5cf2a5a..3183c6f3bc2 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/method_listrolesassignments.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/method_listrolesassignments.go @@ -50,7 +50,6 @@ func (c DataProductsClient) ListRolesAssignments(ctx context.Context, id DataPro var model ListRoleAssignments result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproducts/version.go b/resource-manager/networkanalytics/2023-11-15/dataproducts/version.go index 7b27ad6996c..751379f19e1 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproducts/version.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproducts/version.go @@ -1,12 +1,10 @@ package dataproducts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataproducts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataproducts/2023-11-15" } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/README.md b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/README.md index e96ed595fd5..743e4606d0f 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/README.md +++ b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs` Documentation -The `dataproductscatalogs` SDK allows for interaction with the Azure Resource Manager Service `networkanalytics` (API Version `2023-11-15`). +The `dataproductscatalogs` SDK allows for interaction with Azure Resource Manager `networkanalytics` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/client.go b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/client.go index 588c4ca3519..59fe9a38110 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/client.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/client.go @@ -15,7 +15,7 @@ type DataProductsCatalogsClient struct { } func NewDataProductsCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataProductsCatalogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataproductscatalogs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataproductscatalogs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataProductsCatalogsClient: %+v", err) } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/method_get.go b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/method_get.go index 3fa3d751462..eeaf89c63b6 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/method_get.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/method_get.go @@ -47,7 +47,6 @@ func (c DataProductsCatalogsClient) Get(ctx context.Context, id commonids.Resour var model DataProductsCatalog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/version.go b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/version.go index 47f04856ac9..f3b58c43372 100644 --- a/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/version.go +++ b/resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/version.go @@ -1,12 +1,10 @@ package dataproductscatalogs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataproductscatalogs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataproductscatalogs/2023-11-15" } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/README.md b/resource-manager/networkanalytics/2023-11-15/datatypes/README.md index e6ab52b4789..ea06ab7c4fa 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/README.md +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkanalytics/2023-11-15/datatypes` Documentation -The `datatypes` SDK allows for interaction with the Azure Resource Manager Service `networkanalytics` (API Version `2023-11-15`). +The `datatypes` SDK allows for interaction with Azure Resource Manager `networkanalytics` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/client.go b/resource-manager/networkanalytics/2023-11-15/datatypes/client.go index 3cfa3a8eb35..4d63334653e 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/client.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/client.go @@ -15,7 +15,7 @@ type DataTypesClient struct { } func NewDataTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datatypes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datatypes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataTypesClient: %+v", err) } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/id_dataproduct.go b/resource-manager/networkanalytics/2023-11-15/datatypes/id_dataproduct.go index ba9fe2b3ec4..edbbd435ce5 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/id_dataproduct.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/id_dataproduct.go @@ -42,7 +42,7 @@ func ParseDataProductID(input string) (*DataProductId, error) { } id := DataProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDataProductIDInsensitively(input string) (*DataProductId, error) { } id := DataProductId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/id_datatype.go b/resource-manager/networkanalytics/2023-11-15/datatypes/id_datatype.go index 5b64cc1f316..3f36eb39aaa 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/id_datatype.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/id_datatype.go @@ -44,7 +44,7 @@ func ParseDataTypeID(input string) (*DataTypeId, error) { } id := DataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataTypeIDInsensitively(input string) (*DataTypeId, error) { } id := DataTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/method_generatestoragecontainersastoken.go b/resource-manager/networkanalytics/2023-11-15/datatypes/method_generatestoragecontainersastoken.go index 05ec07d90cd..2c51880c85a 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/method_generatestoragecontainersastoken.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/method_generatestoragecontainersastoken.go @@ -50,7 +50,6 @@ func (c DataTypesClient) GenerateStorageContainerSasToken(ctx context.Context, i var model ContainerSasToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/method_get.go b/resource-manager/networkanalytics/2023-11-15/datatypes/method_get.go index 7f428664dd6..f5b178069ce 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/method_get.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/method_get.go @@ -45,7 +45,6 @@ func (c DataTypesClient) Get(ctx context.Context, id DataTypeId) (result GetOper var model DataType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkanalytics/2023-11-15/datatypes/version.go b/resource-manager/networkanalytics/2023-11-15/datatypes/version.go index ed3af6483d4..b2b0d5aff9a 100644 --- a/resource-manager/networkanalytics/2023-11-15/datatypes/version.go +++ b/resource-manager/networkanalytics/2023-11-15/datatypes/version.go @@ -1,12 +1,10 @@ package datatypes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datatypes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datatypes/2023-11-15" } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/README.md b/resource-manager/networkcloud/2023-07-01/networkclouds/README.md index 4fb651fab92..8a984e84936 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/README.md +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkcloud/2023-07-01/networkclouds` Documentation -The `networkclouds` SDK allows for interaction with the Azure Resource Manager Service `networkcloud` (API Version `2023-07-01`). +The `networkclouds` SDK allows for interaction with Azure Resource Manager `networkcloud` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/client.go b/resource-manager/networkcloud/2023-07-01/networkclouds/client.go index 315b21f8e62..3b942669cef 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/client.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/client.go @@ -15,7 +15,7 @@ type NetworkcloudsClient struct { } func NewNetworkcloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkcloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networkclouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networkclouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkcloudsClient: %+v", err) } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_agentpool.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_agentpool.go index c06b9b93d23..131124df26e 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_agentpool.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_agentpool.go @@ -44,7 +44,7 @@ func ParseAgentPoolID(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentPoolIDInsensitively(input string) (*AgentPoolId, error) { } id := AgentPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachine.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachine.go index cffb674309b..93959fee7ea 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachine.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachine.go @@ -42,7 +42,7 @@ func ParseBareMetalMachineID(input string) (*BareMetalMachineId, error) { } id := BareMetalMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseBareMetalMachineIDInsensitively(input string) (*BareMetalMachineId, er } id := BareMetalMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachinekeyset.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachinekeyset.go index 388242ecf3a..82fcce0a0b5 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachinekeyset.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_baremetalmachinekeyset.go @@ -44,7 +44,7 @@ func ParseBareMetalMachineKeySetID(input string) (*BareMetalMachineKeySetId, err } id := BareMetalMachineKeySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBareMetalMachineKeySetIDInsensitively(input string) (*BareMetalMachine } id := BareMetalMachineKeySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_bmckeyset.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_bmckeyset.go index 6774f9d7111..cccf46db1d2 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_bmckeyset.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_bmckeyset.go @@ -44,7 +44,7 @@ func ParseBmcKeySetID(input string) (*BmcKeySetId, error) { } id := BmcKeySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBmcKeySetIDInsensitively(input string) (*BmcKeySetId, error) { } id := BmcKeySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_cloudservicesnetwork.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_cloudservicesnetwork.go index b04bc2eaeb6..be1a63239d9 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_cloudservicesnetwork.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_cloudservicesnetwork.go @@ -42,7 +42,7 @@ func ParseCloudServicesNetworkID(input string) (*CloudServicesNetworkId, error) } id := CloudServicesNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudServicesNetworkIDInsensitively(input string) (*CloudServicesNetwo } id := CloudServicesNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_cluster.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_cluster.go index 20f8383628c..f136b5dd003 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_cluster.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_clustermanager.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_clustermanager.go index 35c8a918df6..3ceabe2d4cb 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_clustermanager.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_clustermanager.go @@ -42,7 +42,7 @@ func ParseClusterManagerID(input string) (*ClusterManagerId, error) { } id := ClusterManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterManagerIDInsensitively(input string) (*ClusterManagerId, error) } id := ClusterManagerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_console.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_console.go index 069d80b8143..60b0ed11c7b 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_console.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_console.go @@ -44,7 +44,7 @@ func ParseConsoleID(input string) (*ConsoleId, error) { } id := ConsoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConsoleIDInsensitively(input string) (*ConsoleId, error) { } id := ConsoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_kubernetescluster.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_kubernetescluster.go index c02a938e029..97f04d1c72f 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_kubernetescluster.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_kubernetescluster.go @@ -42,7 +42,7 @@ func ParseKubernetesClusterID(input string) (*KubernetesClusterId, error) { } id := KubernetesClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseKubernetesClusterIDInsensitively(input string) (*KubernetesClusterId, } id := KubernetesClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_l2network.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_l2network.go index 86874782946..6d5716fc7b4 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_l2network.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_l2network.go @@ -42,7 +42,7 @@ func ParseL2NetworkID(input string) (*L2NetworkId, error) { } id := L2NetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseL2NetworkIDInsensitively(input string) (*L2NetworkId, error) { } id := L2NetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_l3network.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_l3network.go index d8b0ca2595c..75585b54785 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_l3network.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_l3network.go @@ -42,7 +42,7 @@ func ParseL3NetworkID(input string) (*L3NetworkId, error) { } id := L3NetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseL3NetworkIDInsensitively(input string) (*L3NetworkId, error) { } id := L3NetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_metricsconfiguration.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_metricsconfiguration.go index cbb62a63dcf..33fa55c0707 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_metricsconfiguration.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_metricsconfiguration.go @@ -44,7 +44,7 @@ func ParseMetricsConfigurationID(input string) (*MetricsConfigurationId, error) } id := MetricsConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetricsConfigurationIDInsensitively(input string) (*MetricsConfigurati } id := MetricsConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_rack.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_rack.go index 33eb4e47ada..f459378411a 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_rack.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_rack.go @@ -42,7 +42,7 @@ func ParseRackID(input string) (*RackId, error) { } id := RackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRackIDInsensitively(input string) (*RackId, error) { } id := RackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_racksku.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_racksku.go index 3eda1f672da..f4d07773beb 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_racksku.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_racksku.go @@ -40,7 +40,7 @@ func ParseRackSkuID(input string) (*RackSkuId, error) { } id := RackSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRackSkuIDInsensitively(input string) (*RackSkuId, error) { } id := RackSkuId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_storageappliance.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_storageappliance.go index c02ef0a7c98..4bc2c51548c 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_storageappliance.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_storageappliance.go @@ -42,7 +42,7 @@ func ParseStorageApplianceID(input string) (*StorageApplianceId, error) { } id := StorageApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageApplianceIDInsensitively(input string) (*StorageApplianceId, er } id := StorageApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_trunkednetwork.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_trunkednetwork.go index f9d9c7092e9..f80c1d8344e 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_trunkednetwork.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_trunkednetwork.go @@ -42,7 +42,7 @@ func ParseTrunkedNetworkID(input string) (*TrunkedNetworkId, error) { } id := TrunkedNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrunkedNetworkIDInsensitively(input string) (*TrunkedNetworkId, error) } id := TrunkedNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_virtualmachine.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_virtualmachine.go index 1c8c9a5787d..ff62d334939 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_virtualmachine.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/id_volume.go b/resource-manager/networkcloud/2023-07-01/networkclouds/id_volume.go index 99e1fa56b50..41cf273369e 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/id_volume.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/id_volume.go @@ -42,7 +42,7 @@ func ParseVolumeID(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVolumeIDInsensitively(input string) (*VolumeId, error) { } id := VolumeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_agentpoolsget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_agentpoolsget.go index e894a55ae9a..a746e33c607 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_agentpoolsget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_agentpoolsget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) AgentPoolsGet(ctx context.Context, id AgentPoolId) var model AgentPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinekeysetsget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinekeysetsget.go index d4db1364ef3..ff9fe302235 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinekeysetsget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinekeysetsget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) BareMetalMachineKeySetsGet(ctx context.Context, id var model BareMetalMachineKeySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinesget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinesget.go index 627f541aa71..d080ff2b7be 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinesget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_baremetalmachinesget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) BareMetalMachinesGet(ctx context.Context, id BareMe var model BareMetalMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_bmckeysetsget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_bmckeysetsget.go index 1c6654c01ab..78cdd8c9028 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_bmckeysetsget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_bmckeysetsget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) BmcKeySetsGet(ctx context.Context, id BmcKeySetId) var model BmcKeySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_cloudservicesnetworksget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_cloudservicesnetworksget.go index 8c182ed8b0a..f13d813b1b4 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_cloudservicesnetworksget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_cloudservicesnetworksget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) CloudServicesNetworksGet(ctx context.Context, id Cl var model CloudServicesNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersget.go index 4fa39c940de..017316c2566 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) ClusterManagersGet(ctx context.Context, id ClusterM var model ClusterManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersupdate.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersupdate.go index 7447717a4bc..2b971cbbe9f 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersupdate.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustermanagersupdate.go @@ -49,7 +49,6 @@ func (c NetworkcloudsClient) ClusterManagersUpdate(ctx context.Context, id Clust var model ClusterManager result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustersget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustersget.go index 16df6cff290..8fc66fdfcd8 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustersget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_clustersget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) ClustersGet(ctx context.Context, id ClusterId) (res var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_consolesget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_consolesget.go index ad1908c8b82..35ca3b11c8e 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_consolesget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_consolesget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) ConsolesGet(ctx context.Context, id ConsoleId) (res var model Console result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_kubernetesclustersget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_kubernetesclustersget.go index 348dd8619f8..1fc37bf80b9 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_kubernetesclustersget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_kubernetesclustersget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) KubernetesClustersGet(ctx context.Context, id Kuber var model KubernetesCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksget.go index 9d23b50e46d..88f3467ff6f 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) L2NetworksGet(ctx context.Context, id L2NetworkId) var model L2Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksupdate.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksupdate.go index 02266e59501..ecc2e4ab707 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksupdate.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l2networksupdate.go @@ -49,7 +49,6 @@ func (c NetworkcloudsClient) L2NetworksUpdate(ctx context.Context, id L2NetworkI var model L2Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksget.go index 69f68ada95d..1b207f4a64a 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) L3NetworksGet(ctx context.Context, id L3NetworkId) var model L3Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksupdate.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksupdate.go index a3c1997ad0d..8d4c945367a 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksupdate.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_l3networksupdate.go @@ -49,7 +49,6 @@ func (c NetworkcloudsClient) L3NetworksUpdate(ctx context.Context, id L3NetworkI var model L3Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_metricsconfigurationsget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_metricsconfigurationsget.go index ea530d28223..74f3b8acf91 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_metricsconfigurationsget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_metricsconfigurationsget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) MetricsConfigurationsGet(ctx context.Context, id Me var model ClusterMetricsConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_racksget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_racksget.go index a6fbb6a26da..2155b30595d 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_racksget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_racksget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) RacksGet(ctx context.Context, id RackId) (result Ra var model Rack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_rackskusget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_rackskusget.go index 5e7fc887e8f..be0bc342665 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_rackskusget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_rackskusget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) RackSkusGet(ctx context.Context, id RackSkuId) (res var model RackSku result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_storageappliancesget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_storageappliancesget.go index d6722927782..6ba58bf27ec 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_storageappliancesget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_storageappliancesget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) StorageAppliancesGet(ctx context.Context, id Storag var model StorageAppliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksget.go index 20883c591f3..3f6d1fcf63c 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) TrunkedNetworksGet(ctx context.Context, id TrunkedN var model TrunkedNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksupdate.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksupdate.go index 7b66ef3a6e3..d29a1ac9138 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksupdate.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_trunkednetworksupdate.go @@ -49,7 +49,6 @@ func (c NetworkcloudsClient) TrunkedNetworksUpdate(ctx context.Context, id Trunk var model TrunkedNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_virtualmachinesget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_virtualmachinesget.go index 5eac9c08222..7e735c93520 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_virtualmachinesget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_virtualmachinesget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) VirtualMachinesGet(ctx context.Context, id VirtualM var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesget.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesget.go index af6b903c91c..61d90d38ff1 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesget.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesget.go @@ -45,7 +45,6 @@ func (c NetworkcloudsClient) VolumesGet(ctx context.Context, id VolumeId) (resul var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesupdate.go b/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesupdate.go index a5c26e32115..980fe295971 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesupdate.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/method_volumesupdate.go @@ -49,7 +49,6 @@ func (c NetworkcloudsClient) VolumesUpdate(ctx context.Context, id VolumeId, inp var model Volume result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkcloud/2023-07-01/networkclouds/version.go b/resource-manager/networkcloud/2023-07-01/networkclouds/version.go index 6087579153d..8eadd58f2a9 100644 --- a/resource-manager/networkcloud/2023-07-01/networkclouds/version.go +++ b/resource-manager/networkcloud/2023-07-01/networkclouds/version.go @@ -1,12 +1,10 @@ package networkclouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkclouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networkclouds/2023-07-01" } diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/README.md b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/README.md index 6c4d5579e23..424dffb23ca 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/README.md +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors` Documentation -The `azuretrafficcollectors` SDK allows for interaction with the Azure Resource Manager Service `networkfunction` (API Version `2022-11-01`). +The `azuretrafficcollectors` SDK allows for interaction with Azure Resource Manager `networkfunction` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/client.go b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/client.go index 872404d3f6c..2a28058026c 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/client.go +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/client.go @@ -15,7 +15,7 @@ type AzureTrafficCollectorsClient struct { } func NewAzureTrafficCollectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AzureTrafficCollectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "azuretrafficcollectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "azuretrafficcollectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AzureTrafficCollectorsClient: %+v", err) } diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go index 57e1dd83bd5..3e1bda982c6 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/id_azuretrafficcollector.go @@ -42,7 +42,7 @@ func ParseAzureTrafficCollectorID(input string) (*AzureTrafficCollectorId, error } id := AzureTrafficCollectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureTrafficCollectorIDInsensitively(input string) (*AzureTrafficColle } id := AzureTrafficCollectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_get.go b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_get.go index bec8a6575a8..af64540f0b8 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_get.go +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_get.go @@ -45,7 +45,6 @@ func (c AzureTrafficCollectorsClient) Get(ctx context.Context, id AzureTrafficCo var model AzureTrafficCollector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_updatetags.go b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_updatetags.go index 03af113864a..86c979d246d 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_updatetags.go +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/method_updatetags.go @@ -49,7 +49,6 @@ func (c AzureTrafficCollectorsClient) UpdateTags(ctx context.Context, id AzureTr var model AzureTrafficCollector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/version.go b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/version.go index 114ccc2f415..d9c2d60b87f 100644 --- a/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/version.go +++ b/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors/version.go @@ -1,12 +1,10 @@ package azuretrafficcollectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azuretrafficcollectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/azuretrafficcollectors/2022-11-01" } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/README.md b/resource-manager/networkfunction/2022-11-01/collectorpolicies/README.md index e90c27c8601..2ca4dc4f7ff 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/README.md +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies` Documentation -The `collectorpolicies` SDK allows for interaction with the Azure Resource Manager Service `networkfunction` (API Version `2022-11-01`). +The `collectorpolicies` SDK allows for interaction with Azure Resource Manager `networkfunction` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/client.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/client.go index 99cc12d89ce..bc5155dc934 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/client.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/client.go @@ -15,7 +15,7 @@ type CollectorPoliciesClient struct { } func NewCollectorPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*CollectorPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "collectorpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "collectorpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CollectorPoliciesClient: %+v", err) } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go index f0fa6304b51..90c817ad29b 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_azuretrafficcollector.go @@ -42,7 +42,7 @@ func ParseAzureTrafficCollectorID(input string) (*AzureTrafficCollectorId, error } id := AzureTrafficCollectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAzureTrafficCollectorIDInsensitively(input string) (*AzureTrafficColle } id := AzureTrafficCollectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go index d638ba3cb8e..8a99628f80d 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/id_collectorpolicy.go @@ -44,7 +44,7 @@ func ParseCollectorPolicyID(input string) (*CollectorPolicyId, error) { } id := CollectorPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCollectorPolicyIDInsensitively(input string) (*CollectorPolicyId, erro } id := CollectorPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_get.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_get.go index 80c311e88dd..f37a66f916b 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_get.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_get.go @@ -45,7 +45,6 @@ func (c CollectorPoliciesClient) Get(ctx context.Context, id CollectorPolicyId) var model CollectorPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_updatetags.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_updatetags.go index 9a0740b3af9..99eb15c634e 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_updatetags.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/method_updatetags.go @@ -49,7 +49,6 @@ func (c CollectorPoliciesClient) UpdateTags(ctx context.Context, id CollectorPol var model CollectorPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/networkfunction/2022-11-01/collectorpolicies/version.go b/resource-manager/networkfunction/2022-11-01/collectorpolicies/version.go index c160b617c34..8569bbd9254 100644 --- a/resource-manager/networkfunction/2022-11-01/collectorpolicies/version.go +++ b/resource-manager/networkfunction/2022-11-01/collectorpolicies/version.go @@ -1,12 +1,10 @@ package collectorpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/collectorpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/collectorpolicies/2022-11-01" } diff --git a/resource-manager/newrelic/2022-07-01/accounts/README.md b/resource-manager/newrelic/2022-07-01/accounts/README.md index a87359b4462..962c06d568b 100644 --- a/resource-manager/newrelic/2022-07-01/accounts/README.md +++ b/resource-manager/newrelic/2022-07-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2022-07-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2022-07-01/accounts/client.go b/resource-manager/newrelic/2022-07-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/newrelic/2022-07-01/accounts/client.go +++ b/resource-manager/newrelic/2022-07-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/newrelic/2022-07-01/accounts/method_list.go b/resource-manager/newrelic/2022-07-01/accounts/method_list.go index ec9038fe53d..a9bad84893b 100644 --- a/resource-manager/newrelic/2022-07-01/accounts/method_list.go +++ b/resource-manager/newrelic/2022-07-01/accounts/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2022-07-01/accounts/version.go b/resource-manager/newrelic/2022-07-01/accounts/version.go index 202f9b9d0e7..11adac225a0 100644 --- a/resource-manager/newrelic/2022-07-01/accounts/version.go +++ b/resource-manager/newrelic/2022-07-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2022-07-01" } diff --git a/resource-manager/newrelic/2022-07-01/monitors/README.md b/resource-manager/newrelic/2022-07-01/monitors/README.md index 92b02a7a418..b2e56cbc4dc 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/README.md +++ b/resource-manager/newrelic/2022-07-01/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2022-07-01`). +The `monitors` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2022-07-01/monitors/client.go b/resource-manager/newrelic/2022-07-01/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/client.go +++ b/resource-manager/newrelic/2022-07-01/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go b/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go index 70a84071739..929ad14a622 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go +++ b/resource-manager/newrelic/2022-07-01/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_delete.go b/resource-manager/newrelic/2022-07-01/monitors/method_delete.go index 2c8a078705e..aa13e551200 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_delete.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_get.go b/resource-manager/newrelic/2022-07-01/monitors/method_get.go index b9b5fbf6577..286a09b150b 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_get.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model NewRelicMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_getmetricrules.go b/resource-manager/newrelic/2022-07-01/monitors/method_getmetricrules.go index 40aeaa8acb7..804f2a608a8 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_getmetricrules.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_getmetricrules.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetMetricRules(ctx context.Context, id MonitorId, input var model MetricRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_getmetricstatus.go b/resource-manager/newrelic/2022-07-01/monitors/method_getmetricstatus.go index bd98fa1927c..810b07d5f83 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_getmetricstatus.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_getmetricstatus.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetMetricStatus(ctx context.Context, id MonitorId, input var model MetricsStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_switchbilling.go b/resource-manager/newrelic/2022-07-01/monitors/method_switchbilling.go index c2257067e47..97b304c06a0 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_switchbilling.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_switchbilling.go @@ -52,7 +52,6 @@ func (c MonitorsClient) SwitchBilling(ctx context.Context, id MonitorId, input S var model NewRelicMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_update.go b/resource-manager/newrelic/2022-07-01/monitors/method_update.go index 4e92eec75fa..f04008b932f 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_update.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_update.go @@ -49,7 +49,6 @@ func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input NewRelic var model NewRelicMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/method_vmhostpayload.go b/resource-manager/newrelic/2022-07-01/monitors/method_vmhostpayload.go index 1dd12f5aa1b..2ebf2c23fa8 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/method_vmhostpayload.go +++ b/resource-manager/newrelic/2022-07-01/monitors/method_vmhostpayload.go @@ -46,7 +46,6 @@ func (c MonitorsClient) VMHostPayload(ctx context.Context, id MonitorId) (result var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/monitors/version.go b/resource-manager/newrelic/2022-07-01/monitors/version.go index c3ae92aacab..bf345cdde78 100644 --- a/resource-manager/newrelic/2022-07-01/monitors/version.go +++ b/resource-manager/newrelic/2022-07-01/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2022-07-01" } diff --git a/resource-manager/newrelic/2022-07-01/organizations/README.md b/resource-manager/newrelic/2022-07-01/organizations/README.md index e3ae7832a25..9d87fffb7f6 100644 --- a/resource-manager/newrelic/2022-07-01/organizations/README.md +++ b/resource-manager/newrelic/2022-07-01/organizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/organizations` Documentation -The `organizations` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2022-07-01`). +The `organizations` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2022-07-01/organizations/client.go b/resource-manager/newrelic/2022-07-01/organizations/client.go index 29faa1565c8..913aec6c7a3 100644 --- a/resource-manager/newrelic/2022-07-01/organizations/client.go +++ b/resource-manager/newrelic/2022-07-01/organizations/client.go @@ -15,7 +15,7 @@ type OrganizationsClient struct { } func NewOrganizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OrganizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "organizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "organizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrganizationsClient: %+v", err) } diff --git a/resource-manager/newrelic/2022-07-01/organizations/method_list.go b/resource-manager/newrelic/2022-07-01/organizations/method_list.go index 37546d69ebf..294d11c38f6 100644 --- a/resource-manager/newrelic/2022-07-01/organizations/method_list.go +++ b/resource-manager/newrelic/2022-07-01/organizations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2022-07-01/organizations/version.go b/resource-manager/newrelic/2022-07-01/organizations/version.go index 848044b4e7a..88c1b9648ba 100644 --- a/resource-manager/newrelic/2022-07-01/organizations/version.go +++ b/resource-manager/newrelic/2022-07-01/organizations/version.go @@ -1,12 +1,10 @@ package organizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/organizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/organizations/2022-07-01" } diff --git a/resource-manager/newrelic/2022-07-01/plan/README.md b/resource-manager/newrelic/2022-07-01/plan/README.md index f0b192d83d7..25defa1cfd7 100644 --- a/resource-manager/newrelic/2022-07-01/plan/README.md +++ b/resource-manager/newrelic/2022-07-01/plan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/plan` Documentation -The `plan` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2022-07-01`). +The `plan` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2022-07-01/plan/client.go b/resource-manager/newrelic/2022-07-01/plan/client.go index af5318d3784..dbe0dfa42a0 100644 --- a/resource-manager/newrelic/2022-07-01/plan/client.go +++ b/resource-manager/newrelic/2022-07-01/plan/client.go @@ -15,7 +15,7 @@ type PlanClient struct { } func NewPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*PlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "plan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "plan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PlanClient: %+v", err) } diff --git a/resource-manager/newrelic/2022-07-01/plan/method_list.go b/resource-manager/newrelic/2022-07-01/plan/method_list.go index fac82eefbbd..2a9c5930e93 100644 --- a/resource-manager/newrelic/2022-07-01/plan/method_list.go +++ b/resource-manager/newrelic/2022-07-01/plan/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2022-07-01/plan/version.go b/resource-manager/newrelic/2022-07-01/plan/version.go index aefd3ca0bfc..da6a3c29252 100644 --- a/resource-manager/newrelic/2022-07-01/plan/version.go +++ b/resource-manager/newrelic/2022-07-01/plan/version.go @@ -1,12 +1,10 @@ package plan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/plan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/plan/2022-07-01" } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/README.md b/resource-manager/newrelic/2022-07-01/tagrules/README.md index 0691d3a6764..f91365abc3c 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/README.md +++ b/resource-manager/newrelic/2022-07-01/tagrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules` Documentation -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2022-07-01`). +The `tagrules` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2022-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2022-07-01/tagrules/client.go b/resource-manager/newrelic/2022-07-01/tagrules/client.go index e35a62f3116..1353e3786ef 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/client.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/client.go @@ -15,7 +15,7 @@ type TagRulesClient struct { } func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go b/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go index 182e0318537..5e6730629e7 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go b/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go index 41ce9939101..415dd43d0c8 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/method_get.go b/resource-manager/newrelic/2022-07-01/tagrules/method_get.go index 474586ae575..1e082f6ccfa 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/method_get.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/method_get.go @@ -45,7 +45,6 @@ func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperat var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/method_update.go b/resource-manager/newrelic/2022-07-01/tagrules/method_update.go index 506548949c9..2d13398b167 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/method_update.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/method_update.go @@ -49,7 +49,6 @@ func (c TagRulesClient) Update(ctx context.Context, id TagRuleId, input TagRuleU var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2022-07-01/tagrules/version.go b/resource-manager/newrelic/2022-07-01/tagrules/version.go index c7df0f2437e..f70208fb38d 100644 --- a/resource-manager/newrelic/2022-07-01/tagrules/version.go +++ b/resource-manager/newrelic/2022-07-01/tagrules/version.go @@ -1,12 +1,10 @@ package tagrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagrules/2022-07-01" } diff --git a/resource-manager/newrelic/2024-03-01/accounts/README.md b/resource-manager/newrelic/2024-03-01/accounts/README.md index af6be62f921..c4a51147f98 100644 --- a/resource-manager/newrelic/2024-03-01/accounts/README.md +++ b/resource-manager/newrelic/2024-03-01/accounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/accounts` Documentation -The `accounts` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `accounts` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/accounts/client.go b/resource-manager/newrelic/2024-03-01/accounts/client.go index 8b093f7f4c7..98743867a01 100644 --- a/resource-manager/newrelic/2024-03-01/accounts/client.go +++ b/resource-manager/newrelic/2024-03-01/accounts/client.go @@ -15,7 +15,7 @@ type AccountsClient struct { } func NewAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountsClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/accounts/method_list.go b/resource-manager/newrelic/2024-03-01/accounts/method_list.go index ec9038fe53d..a9bad84893b 100644 --- a/resource-manager/newrelic/2024-03-01/accounts/method_list.go +++ b/resource-manager/newrelic/2024-03-01/accounts/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2024-03-01/accounts/version.go b/resource-manager/newrelic/2024-03-01/accounts/version.go index 14b8464ecc7..335a4736fde 100644 --- a/resource-manager/newrelic/2024-03-01/accounts/version.go +++ b/resource-manager/newrelic/2024-03-01/accounts/version.go @@ -1,12 +1,10 @@ package accounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accounts/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/connectedresources/README.md b/resource-manager/newrelic/2024-03-01/connectedresources/README.md index 08829e0f882..c36b8700fa4 100644 --- a/resource-manager/newrelic/2024-03-01/connectedresources/README.md +++ b/resource-manager/newrelic/2024-03-01/connectedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/connectedresources` Documentation -The `connectedresources` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `connectedresources` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/connectedresources/client.go b/resource-manager/newrelic/2024-03-01/connectedresources/client.go index 8d9127d64d4..14585172530 100644 --- a/resource-manager/newrelic/2024-03-01/connectedresources/client.go +++ b/resource-manager/newrelic/2024-03-01/connectedresources/client.go @@ -15,7 +15,7 @@ type ConnectedResourcesClient struct { } func NewConnectedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectedResourcesClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/connectedresources/id_monitor.go b/resource-manager/newrelic/2024-03-01/connectedresources/id_monitor.go index abdbb161f4d..19c5ea1e313 100644 --- a/resource-manager/newrelic/2024-03-01/connectedresources/id_monitor.go +++ b/resource-manager/newrelic/2024-03-01/connectedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/connectedresources/method_billinginfoget.go b/resource-manager/newrelic/2024-03-01/connectedresources/method_billinginfoget.go index 19d2d7046e7..80f3b222b1d 100644 --- a/resource-manager/newrelic/2024-03-01/connectedresources/method_billinginfoget.go +++ b/resource-manager/newrelic/2024-03-01/connectedresources/method_billinginfoget.go @@ -46,7 +46,6 @@ func (c ConnectedResourcesClient) BillingInfoGet(ctx context.Context, id Monitor var model BillingInfoResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/connectedresources/version.go b/resource-manager/newrelic/2024-03-01/connectedresources/version.go index 5e27af42dca..3dd7d3d7a2b 100644 --- a/resource-manager/newrelic/2024-03-01/connectedresources/version.go +++ b/resource-manager/newrelic/2024-03-01/connectedresources/version.go @@ -1,12 +1,10 @@ package connectedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectedresources/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/linkedresources/README.md b/resource-manager/newrelic/2024-03-01/linkedresources/README.md index 7656579d233..303e4d65943 100644 --- a/resource-manager/newrelic/2024-03-01/linkedresources/README.md +++ b/resource-manager/newrelic/2024-03-01/linkedresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/linkedresources` Documentation -The `linkedresources` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `linkedresources` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/linkedresources/client.go b/resource-manager/newrelic/2024-03-01/linkedresources/client.go index b796d625158..3def6afad30 100644 --- a/resource-manager/newrelic/2024-03-01/linkedresources/client.go +++ b/resource-manager/newrelic/2024-03-01/linkedresources/client.go @@ -15,7 +15,7 @@ type LinkedResourcesClient struct { } func NewLinkedResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedResourcesClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/linkedresources/id_monitor.go b/resource-manager/newrelic/2024-03-01/linkedresources/id_monitor.go index a8f13876388..61356894ffb 100644 --- a/resource-manager/newrelic/2024-03-01/linkedresources/id_monitor.go +++ b/resource-manager/newrelic/2024-03-01/linkedresources/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/linkedresources/version.go b/resource-manager/newrelic/2024-03-01/linkedresources/version.go index 3937eebd58b..c281da9b4ad 100644 --- a/resource-manager/newrelic/2024-03-01/linkedresources/version.go +++ b/resource-manager/newrelic/2024-03-01/linkedresources/version.go @@ -1,12 +1,10 @@ package linkedresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedresources/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/README.md b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/README.md index 724fdcda0eb..cfcdf9a0847 100644 --- a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/README.md +++ b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitoredsubscriptions` Documentation -The `monitoredsubscriptions` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `monitoredsubscriptions` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/client.go b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/client.go index dbbccaa87dc..3e047b7e997 100644 --- a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/client.go +++ b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/client.go @@ -15,7 +15,7 @@ type MonitoredSubscriptionsClient struct { } func NewMonitoredSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitoredsubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitoredsubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitoredSubscriptionsClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/id_monitor.go b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/id_monitor.go index 0b35f661d75..4832b260660 100644 --- a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/id_monitor.go +++ b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/method_get.go b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/method_get.go index 8959b94e435..8396e57ec67 100644 --- a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/method_get.go +++ b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/method_get.go @@ -46,7 +46,6 @@ func (c MonitoredSubscriptionsClient) Get(ctx context.Context, id MonitorId) (re var model MonitoredSubscriptionProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/version.go b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/version.go index 93939307ca8..4c8d987d1b7 100644 --- a/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/version.go +++ b/resource-manager/newrelic/2024-03-01/monitoredsubscriptions/version.go @@ -1,12 +1,10 @@ package monitoredsubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitoredsubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitoredsubscriptions/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/monitors/README.md b/resource-manager/newrelic/2024-03-01/monitors/README.md index 2ddf02613a0..63bdbd61519 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/README.md +++ b/resource-manager/newrelic/2024-03-01/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `monitors` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/monitors/client.go b/resource-manager/newrelic/2024-03-01/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/client.go +++ b/resource-manager/newrelic/2024-03-01/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/monitors/id_monitor.go b/resource-manager/newrelic/2024-03-01/monitors/id_monitor.go index 70a84071739..929ad14a622 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/id_monitor.go +++ b/resource-manager/newrelic/2024-03-01/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_delete.go b/resource-manager/newrelic/2024-03-01/monitors/method_delete.go index 2c8a078705e..aa13e551200 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_delete.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_get.go b/resource-manager/newrelic/2024-03-01/monitors/method_get.go index b9b5fbf6577..286a09b150b 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_get.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model NewRelicMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_getmetricrules.go b/resource-manager/newrelic/2024-03-01/monitors/method_getmetricrules.go index 40aeaa8acb7..804f2a608a8 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_getmetricrules.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_getmetricrules.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetMetricRules(ctx context.Context, id MonitorId, input var model MetricRules result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_getmetricstatus.go b/resource-manager/newrelic/2024-03-01/monitors/method_getmetricstatus.go index bd98fa1927c..810b07d5f83 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_getmetricstatus.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_getmetricstatus.go @@ -50,7 +50,6 @@ func (c MonitorsClient) GetMetricStatus(ctx context.Context, id MonitorId, input var model MetricsStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_switchbilling.go b/resource-manager/newrelic/2024-03-01/monitors/method_switchbilling.go index c2257067e47..97b304c06a0 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_switchbilling.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_switchbilling.go @@ -52,7 +52,6 @@ func (c MonitorsClient) SwitchBilling(ctx context.Context, id MonitorId, input S var model NewRelicMonitorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitors/method_vmhostpayload.go b/resource-manager/newrelic/2024-03-01/monitors/method_vmhostpayload.go index 1dd12f5aa1b..2ebf2c23fa8 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/method_vmhostpayload.go +++ b/resource-manager/newrelic/2024-03-01/monitors/method_vmhostpayload.go @@ -46,7 +46,6 @@ func (c MonitorsClient) VMHostPayload(ctx context.Context, id MonitorId) (result var model VMExtensionPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/monitors/version.go b/resource-manager/newrelic/2024-03-01/monitors/version.go index 29cf2d63ea2..bc61e41f42d 100644 --- a/resource-manager/newrelic/2024-03-01/monitors/version.go +++ b/resource-manager/newrelic/2024-03-01/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/organizations/README.md b/resource-manager/newrelic/2024-03-01/organizations/README.md index 60b249192c4..36bb1fd43c2 100644 --- a/resource-manager/newrelic/2024-03-01/organizations/README.md +++ b/resource-manager/newrelic/2024-03-01/organizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/organizations` Documentation -The `organizations` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `organizations` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/organizations/client.go b/resource-manager/newrelic/2024-03-01/organizations/client.go index 29faa1565c8..913aec6c7a3 100644 --- a/resource-manager/newrelic/2024-03-01/organizations/client.go +++ b/resource-manager/newrelic/2024-03-01/organizations/client.go @@ -15,7 +15,7 @@ type OrganizationsClient struct { } func NewOrganizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OrganizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "organizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "organizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OrganizationsClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/organizations/method_list.go b/resource-manager/newrelic/2024-03-01/organizations/method_list.go index 37546d69ebf..294d11c38f6 100644 --- a/resource-manager/newrelic/2024-03-01/organizations/method_list.go +++ b/resource-manager/newrelic/2024-03-01/organizations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2024-03-01/organizations/version.go b/resource-manager/newrelic/2024-03-01/organizations/version.go index 5456538d967..fcf2fd8452b 100644 --- a/resource-manager/newrelic/2024-03-01/organizations/version.go +++ b/resource-manager/newrelic/2024-03-01/organizations/version.go @@ -1,12 +1,10 @@ package organizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/organizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/organizations/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/plan/README.md b/resource-manager/newrelic/2024-03-01/plan/README.md index 0a1181997b3..dbb3244407e 100644 --- a/resource-manager/newrelic/2024-03-01/plan/README.md +++ b/resource-manager/newrelic/2024-03-01/plan/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/plan` Documentation -The `plan` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `plan` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/plan/client.go b/resource-manager/newrelic/2024-03-01/plan/client.go index af5318d3784..dbe0dfa42a0 100644 --- a/resource-manager/newrelic/2024-03-01/plan/client.go +++ b/resource-manager/newrelic/2024-03-01/plan/client.go @@ -15,7 +15,7 @@ type PlanClient struct { } func NewPlanClientWithBaseURI(sdkApi sdkEnv.Api) (*PlanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "plan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "plan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PlanClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/plan/method_list.go b/resource-manager/newrelic/2024-03-01/plan/method_list.go index fac82eefbbd..2a9c5930e93 100644 --- a/resource-manager/newrelic/2024-03-01/plan/method_list.go +++ b/resource-manager/newrelic/2024-03-01/plan/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/newrelic/2024-03-01/plan/version.go b/resource-manager/newrelic/2024-03-01/plan/version.go index fe7a5775a37..a0ad8d44763 100644 --- a/resource-manager/newrelic/2024-03-01/plan/version.go +++ b/resource-manager/newrelic/2024-03-01/plan/version.go @@ -1,12 +1,10 @@ package plan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/plan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/plan/2024-03-01" } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/README.md b/resource-manager/newrelic/2024-03-01/tagrules/README.md index 0928181a4ad..b484d47ca45 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/README.md +++ b/resource-manager/newrelic/2024-03-01/tagrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/tagrules` Documentation -The `tagrules` SDK allows for interaction with the Azure Resource Manager Service `newrelic` (API Version `2024-03-01`). +The `tagrules` SDK allows for interaction with Azure Resource Manager `newrelic` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/newrelic/2024-03-01/tagrules/client.go b/resource-manager/newrelic/2024-03-01/tagrules/client.go index e35a62f3116..1353e3786ef 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/client.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/client.go @@ -15,7 +15,7 @@ type TagRulesClient struct { } func NewTagRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*TagRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tagrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tagrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagRulesClient: %+v", err) } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/id_monitor.go b/resource-manager/newrelic/2024-03-01/tagrules/id_monitor.go index 182e0318537..5e6730629e7 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/id_monitor.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/id_tagrule.go b/resource-manager/newrelic/2024-03-01/tagrules/id_tagrule.go index 41ce9939101..415dd43d0c8 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/id_tagrule.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/id_tagrule.go @@ -44,7 +44,7 @@ func ParseTagRuleID(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTagRuleIDInsensitively(input string) (*TagRuleId, error) { } id := TagRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/method_get.go b/resource-manager/newrelic/2024-03-01/tagrules/method_get.go index 474586ae575..1e082f6ccfa 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/method_get.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/method_get.go @@ -45,7 +45,6 @@ func (c TagRulesClient) Get(ctx context.Context, id TagRuleId) (result GetOperat var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/method_update.go b/resource-manager/newrelic/2024-03-01/tagrules/method_update.go index 506548949c9..2d13398b167 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/method_update.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/method_update.go @@ -49,7 +49,6 @@ func (c TagRulesClient) Update(ctx context.Context, id TagRuleId, input TagRuleU var model TagRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/newrelic/2024-03-01/tagrules/version.go b/resource-manager/newrelic/2024-03-01/tagrules/version.go index 388cbbc4d3f..71dc84942b0 100644 --- a/resource-manager/newrelic/2024-03-01/tagrules/version.go +++ b/resource-manager/newrelic/2024-03-01/tagrules/version.go @@ -1,12 +1,10 @@ package tagrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tagrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tagrules/2024-03-01" } diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/README.md b/resource-manager/nginx/2023-04-01/nginxcertificate/README.md index 6393b845702..e093a8b221a 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/README.md +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxcertificate` Documentation -The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-01`). +The `nginxcertificate` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/client.go b/resource-manager/nginx/2023-04-01/nginxcertificate/client.go index afeaf1e338a..336c79aab81 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/client.go +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/client.go @@ -15,7 +15,7 @@ type NginxCertificateClient struct { } func NewNginxCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxcertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxcertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxCertificateClient: %+v", err) } diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go b/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go index cce2197f7fd..6113a6285b0 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go b/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go index be10f98b557..683bce6c9a2 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go b/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go index 6b8832d8eb6..eda3885e158 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/method_certificatesget.go @@ -45,7 +45,6 @@ func (c NginxCertificateClient) CertificatesGet(ctx context.Context, id Certific var model NginxCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-04-01/nginxcertificate/version.go b/resource-manager/nginx/2023-04-01/nginxcertificate/version.go index fc6fb161517..a776fb810b4 100644 --- a/resource-manager/nginx/2023-04-01/nginxcertificate/version.go +++ b/resource-manager/nginx/2023-04-01/nginxcertificate/version.go @@ -1,12 +1,10 @@ package nginxcertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxcertificate/2023-04-01" } diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md b/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md index 56c1305237b..ec97b05693a 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxconfiguration` Documentation -The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-01`). +The `nginxconfiguration` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go b/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go index d845625bb59..4b271604186 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/client.go @@ -15,7 +15,7 @@ type NginxConfigurationClient struct { } func NewNginxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationClient: %+v", err) } diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go b/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go index f8a7f55611e..00bd3a3d71a 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go b/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go index 68f2adda863..1dc38ac02d2 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go b/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go index fd35b6eb8f7..581a836f57a 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/method_configurationsget.go @@ -45,7 +45,6 @@ func (c NginxConfigurationClient) ConfigurationsGet(ctx context.Context, id Conf var model NginxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go b/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go index fe259673501..fd1b03577d8 100644 --- a/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go +++ b/resource-manager/nginx/2023-04-01/nginxconfiguration/version.go @@ -1,12 +1,10 @@ package nginxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfiguration/2023-04-01" } diff --git a/resource-manager/nginx/2023-04-01/nginxdeployment/README.md b/resource-manager/nginx/2023-04-01/nginxdeployment/README.md index 860332f79bd..5f5821d0aef 100644 --- a/resource-manager/nginx/2023-04-01/nginxdeployment/README.md +++ b/resource-manager/nginx/2023-04-01/nginxdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-04-01/nginxdeployment` Documentation -The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-04-01`). +The `nginxdeployment` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-04-01/nginxdeployment/client.go b/resource-manager/nginx/2023-04-01/nginxdeployment/client.go index 7f5e031b02e..493f06f65d1 100644 --- a/resource-manager/nginx/2023-04-01/nginxdeployment/client.go +++ b/resource-manager/nginx/2023-04-01/nginxdeployment/client.go @@ -15,7 +15,7 @@ type NginxDeploymentClient struct { } func NewNginxDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxDeploymentClient: %+v", err) } diff --git a/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go b/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go index dd965d354cf..2bda314b00a 100644 --- a/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-04-01/nginxdeployment/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go b/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go index 51818e9df34..cbf98927207 100644 --- a/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go +++ b/resource-manager/nginx/2023-04-01/nginxdeployment/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c NginxDeploymentClient) DeploymentsGet(ctx context.Context, id NginxDeplo var model NginxDeployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-04-01/nginxdeployment/version.go b/resource-manager/nginx/2023-04-01/nginxdeployment/version.go index 4b45b7e413d..f501583d9b6 100644 --- a/resource-manager/nginx/2023-04-01/nginxdeployment/version.go +++ b/resource-manager/nginx/2023-04-01/nginxdeployment/version.go @@ -1,12 +1,10 @@ package nginxdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxdeployment/2023-04-01" } diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/README.md b/resource-manager/nginx/2023-09-01/nginxcertificate/README.md index 38e08253079..9269f859b21 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/README.md +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-09-01/nginxcertificate` Documentation -The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-09-01`). +The `nginxcertificate` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/client.go b/resource-manager/nginx/2023-09-01/nginxcertificate/client.go index afeaf1e338a..336c79aab81 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/client.go +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/client.go @@ -15,7 +15,7 @@ type NginxCertificateClient struct { } func NewNginxCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxcertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxcertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxCertificateClient: %+v", err) } diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/id_certificate.go b/resource-manager/nginx/2023-09-01/nginxcertificate/id_certificate.go index cce2197f7fd..6113a6285b0 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/id_certificate.go +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/id_nginxdeployment.go b/resource-manager/nginx/2023-09-01/nginxcertificate/id_nginxdeployment.go index be10f98b557..683bce6c9a2 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/method_certificatesget.go b/resource-manager/nginx/2023-09-01/nginxcertificate/method_certificatesget.go index 6b8832d8eb6..eda3885e158 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/method_certificatesget.go +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/method_certificatesget.go @@ -45,7 +45,6 @@ func (c NginxCertificateClient) CertificatesGet(ctx context.Context, id Certific var model NginxCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-09-01/nginxcertificate/version.go b/resource-manager/nginx/2023-09-01/nginxcertificate/version.go index 286fa9d8333..855bde86214 100644 --- a/resource-manager/nginx/2023-09-01/nginxcertificate/version.go +++ b/resource-manager/nginx/2023-09-01/nginxcertificate/version.go @@ -1,12 +1,10 @@ package nginxcertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxcertificate/2023-09-01" } diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/README.md b/resource-manager/nginx/2023-09-01/nginxconfiguration/README.md index 5d827d34365..59d11595e07 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/README.md +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-09-01/nginxconfiguration` Documentation -The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-09-01`). +The `nginxconfiguration` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/client.go b/resource-manager/nginx/2023-09-01/nginxconfiguration/client.go index d845625bb59..4b271604186 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/client.go +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/client.go @@ -15,7 +15,7 @@ type NginxConfigurationClient struct { } func NewNginxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationClient: %+v", err) } diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/id_configuration.go b/resource-manager/nginx/2023-09-01/nginxconfiguration/id_configuration.go index f8a7f55611e..00bd3a3d71a 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/id_configuration.go +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/id_nginxdeployment.go b/resource-manager/nginx/2023-09-01/nginxconfiguration/id_nginxdeployment.go index 68f2adda863..1dc38ac02d2 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/method_configurationsget.go b/resource-manager/nginx/2023-09-01/nginxconfiguration/method_configurationsget.go index fd35b6eb8f7..581a836f57a 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/method_configurationsget.go +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/method_configurationsget.go @@ -45,7 +45,6 @@ func (c NginxConfigurationClient) ConfigurationsGet(ctx context.Context, id Conf var model NginxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-09-01/nginxconfiguration/version.go b/resource-manager/nginx/2023-09-01/nginxconfiguration/version.go index 7a09868faf2..9086537b0ce 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfiguration/version.go +++ b/resource-manager/nginx/2023-09-01/nginxconfiguration/version.go @@ -1,12 +1,10 @@ package nginxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfiguration/2023-09-01" } diff --git a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/README.md b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/README.md index b6bab3f1b78..7c3a13c3a81 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/README.md +++ b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis` Documentation -The `nginxconfigurationanalysis` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-09-01`). +The `nginxconfigurationanalysis` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/client.go b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/client.go index c35a72f8247..f47cb464b95 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/client.go +++ b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/client.go @@ -15,7 +15,7 @@ type NginxConfigurationAnalysisClient struct { } func NewNginxConfigurationAnalysisClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationAnalysisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationAnalysisClient: %+v", err) } diff --git a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/id_configuration.go b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/id_configuration.go index 7c08c8dfa9d..50fa18e086d 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/id_configuration.go +++ b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/method_configurationsanalysis.go b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/method_configurationsanalysis.go index 2c91a12e855..9ab6de7a6c1 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/method_configurationsanalysis.go +++ b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/method_configurationsanalysis.go @@ -50,7 +50,6 @@ func (c NginxConfigurationAnalysisClient) ConfigurationsAnalysis(ctx context.Con var model AnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/version.go b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/version.go index d79d26b61f8..e303b1cf06b 100644 --- a/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/version.go +++ b/resource-manager/nginx/2023-09-01/nginxconfigurationanalysis/version.go @@ -1,12 +1,10 @@ package nginxconfigurationanalysis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfigurationanalysis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfigurationanalysis/2023-09-01" } diff --git a/resource-manager/nginx/2023-09-01/nginxdeployment/README.md b/resource-manager/nginx/2023-09-01/nginxdeployment/README.md index 4e94fa574de..4d7bb95b46e 100644 --- a/resource-manager/nginx/2023-09-01/nginxdeployment/README.md +++ b/resource-manager/nginx/2023-09-01/nginxdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2023-09-01/nginxdeployment` Documentation -The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2023-09-01`). +The `nginxdeployment` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2023-09-01/nginxdeployment/client.go b/resource-manager/nginx/2023-09-01/nginxdeployment/client.go index 7f5e031b02e..493f06f65d1 100644 --- a/resource-manager/nginx/2023-09-01/nginxdeployment/client.go +++ b/resource-manager/nginx/2023-09-01/nginxdeployment/client.go @@ -15,7 +15,7 @@ type NginxDeploymentClient struct { } func NewNginxDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxDeploymentClient: %+v", err) } diff --git a/resource-manager/nginx/2023-09-01/nginxdeployment/id_nginxdeployment.go b/resource-manager/nginx/2023-09-01/nginxdeployment/id_nginxdeployment.go index dd965d354cf..2bda314b00a 100644 --- a/resource-manager/nginx/2023-09-01/nginxdeployment/id_nginxdeployment.go +++ b/resource-manager/nginx/2023-09-01/nginxdeployment/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2023-09-01/nginxdeployment/method_deploymentsget.go b/resource-manager/nginx/2023-09-01/nginxdeployment/method_deploymentsget.go index 51818e9df34..cbf98927207 100644 --- a/resource-manager/nginx/2023-09-01/nginxdeployment/method_deploymentsget.go +++ b/resource-manager/nginx/2023-09-01/nginxdeployment/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c NginxDeploymentClient) DeploymentsGet(ctx context.Context, id NginxDeplo var model NginxDeployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2023-09-01/nginxdeployment/version.go b/resource-manager/nginx/2023-09-01/nginxdeployment/version.go index c8a04df25a5..4804f8542bc 100644 --- a/resource-manager/nginx/2023-09-01/nginxdeployment/version.go +++ b/resource-manager/nginx/2023-09-01/nginxdeployment/version.go @@ -1,12 +1,10 @@ package nginxdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxdeployment/2023-09-01" } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md index ed8eb84e85e..da7fa8e1b54 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate` Documentation -The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). +The `nginxcertificate` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go index afeaf1e338a..336c79aab81 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/client.go @@ -15,7 +15,7 @@ type NginxCertificateClient struct { } func NewNginxCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxcertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxcertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxCertificateClient: %+v", err) } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go index cce2197f7fd..6113a6285b0 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go index be10f98b557..683bce6c9a2 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go index 6b8832d8eb6..eda3885e158 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/method_certificatesget.go @@ -45,7 +45,6 @@ func (c NginxCertificateClient) CertificatesGet(ctx context.Context, id Certific var model NginxCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go index a74fdde51b5..f895fafc8ed 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxcertificate/version.go @@ -1,12 +1,10 @@ package nginxcertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxcertificate/2024-01-01-preview" } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md index 6daa7e77b40..3fc063b696a 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration` Documentation -The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). +The `nginxconfiguration` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go index d845625bb59..4b271604186 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/client.go @@ -15,7 +15,7 @@ type NginxConfigurationClient struct { } func NewNginxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationClient: %+v", err) } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go index f8a7f55611e..00bd3a3d71a 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go index 68f2adda863..1dc38ac02d2 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go index fd35b6eb8f7..581a836f57a 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/method_configurationsget.go @@ -45,7 +45,6 @@ func (c NginxConfigurationClient) ConfigurationsGet(ctx context.Context, id Conf var model NginxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go index df4fab485ba..f6aade78377 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfiguration/version.go @@ -1,12 +1,10 @@ package nginxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfiguration/2024-01-01-preview" } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md index 43108f487d6..01e5b44de2d 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis` Documentation -The `nginxconfigurationanalysis` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). +The `nginxconfigurationanalysis` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go index c35a72f8247..f47cb464b95 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/client.go @@ -15,7 +15,7 @@ type NginxConfigurationAnalysisClient struct { } func NewNginxConfigurationAnalysisClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationAnalysisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationAnalysisClient: %+v", err) } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go index 7c08c8dfa9d..50fa18e086d 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go index 2c91a12e855..9ab6de7a6c1 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go @@ -50,7 +50,6 @@ func (c NginxConfigurationAnalysisClient) ConfigurationsAnalysis(ctx context.Con var model AnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go index b9f3bc1c757..ed9b90d1ea0 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxconfigurationanalysis/version.go @@ -1,12 +1,10 @@ package nginxconfigurationanalysis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfigurationanalysis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfigurationanalysis/2024-01-01-preview" } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md index fa64f3c78e4..17ae930aabe 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md +++ b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxdeployment` Documentation -The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-01-01-preview`). +The `nginxdeployment` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go index 7f5e031b02e..493f06f65d1 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/client.go @@ -15,7 +15,7 @@ type NginxDeploymentClient struct { } func NewNginxDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxDeploymentClient: %+v", err) } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go index dd965d354cf..2bda314b00a 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go index 51818e9df34..cbf98927207 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c NginxDeploymentClient) DeploymentsGet(ctx context.Context, id NginxDeplo var model NginxDeployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go index 573a5620d75..c5d72142c15 100644 --- a/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go +++ b/resource-manager/nginx/2024-01-01-preview/nginxdeployment/version.go @@ -1,12 +1,10 @@ package nginxdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxdeployment/2024-01-01-preview" } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md index b96160dec15..2cb9757483b 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxcertificate` Documentation -The `nginxcertificate` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). +The `nginxcertificate` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go index afeaf1e338a..336c79aab81 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/client.go @@ -15,7 +15,7 @@ type NginxCertificateClient struct { } func NewNginxCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxCertificateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxcertificate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxcertificate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxCertificateClient: %+v", err) } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go index cce2197f7fd..6113a6285b0 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go index be10f98b557..683bce6c9a2 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go index 6b8832d8eb6..eda3885e158 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/method_certificatesget.go @@ -45,7 +45,6 @@ func (c NginxCertificateClient) CertificatesGet(ctx context.Context, id Certific var model NginxCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go index a7cab5e10c6..55591c430fa 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxcertificate/version.go @@ -1,12 +1,10 @@ package nginxcertificate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxcertificate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxcertificate/2024-06-01-preview" } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md index 0258d9fb5dc..2aca76435d3 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfiguration` Documentation -The `nginxconfiguration` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). +The `nginxconfiguration` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go index d845625bb59..4b271604186 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/client.go @@ -15,7 +15,7 @@ type NginxConfigurationClient struct { } func NewNginxConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationClient: %+v", err) } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go index f8a7f55611e..00bd3a3d71a 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go index 68f2adda863..1dc38ac02d2 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go index fd35b6eb8f7..581a836f57a 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/method_configurationsget.go @@ -45,7 +45,6 @@ func (c NginxConfigurationClient) ConfigurationsGet(ctx context.Context, id Conf var model NginxConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go index 3fcb4bfbc88..c2a5408e984 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfiguration/version.go @@ -1,12 +1,10 @@ package nginxconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfiguration/2024-06-01-preview" } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md index 959b80f7f26..f6bfc49c2da 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis` Documentation -The `nginxconfigurationanalysis` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). +The `nginxconfigurationanalysis` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go index c35a72f8247..f47cb464b95 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/client.go @@ -15,7 +15,7 @@ type NginxConfigurationAnalysisClient struct { } func NewNginxConfigurationAnalysisClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxConfigurationAnalysisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxconfigurationanalysis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxConfigurationAnalysisClient: %+v", err) } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go index 7c08c8dfa9d..50fa18e086d 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go index 2c91a12e855..9ab6de7a6c1 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/method_configurationsanalysis.go @@ -50,7 +50,6 @@ func (c NginxConfigurationAnalysisClient) ConfigurationsAnalysis(ctx context.Con var model AnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go index 48bdd2a99c3..ed68660d296 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxconfigurationanalysis/version.go @@ -1,12 +1,10 @@ package nginxconfigurationanalysis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxconfigurationanalysis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxconfigurationanalysis/2024-06-01-preview" } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md index 41cf55ca837..20c37639013 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md +++ b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-06-01-preview/nginxdeployment` Documentation -The `nginxdeployment` SDK allows for interaction with the Azure Resource Manager Service `nginx` (API Version `2024-06-01-preview`). +The `nginxdeployment` SDK allows for interaction with Azure Resource Manager `nginx` (API Version `2024-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go index 7f5e031b02e..493f06f65d1 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/client.go @@ -15,7 +15,7 @@ type NginxDeploymentClient struct { } func NewNginxDeploymentClientWithBaseURI(sdkApi sdkEnv.Api) (*NginxDeploymentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nginxdeployment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nginxdeployment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NginxDeploymentClient: %+v", err) } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go index dd965d354cf..2bda314b00a 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/id_nginxdeployment.go @@ -42,7 +42,7 @@ func ParseNginxDeploymentID(input string) (*NginxDeploymentId, error) { } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNginxDeploymentIDInsensitively(input string) (*NginxDeploymentId, erro } id := NginxDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go index 51818e9df34..cbf98927207 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/method_deploymentsget.go @@ -45,7 +45,6 @@ func (c NginxDeploymentClient) DeploymentsGet(ctx context.Context, id NginxDeplo var model NginxDeployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go index 821a4a635ef..c1ae933345b 100644 --- a/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go +++ b/resource-manager/nginx/2024-06-01-preview/nginxdeployment/version.go @@ -1,12 +1,10 @@ package nginxdeployment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nginxdeployment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nginxdeployment/2024-06-01-preview" } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/README.md b/resource-manager/notificationhubs/2017-04-01/namespaces/README.md index 61a45be1b63..52db10fd3a6 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/README.md +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `notificationhubs` (API Version `2017-04-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `notificationhubs` (API Version `2017-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/client.go b/resource-manager/notificationhubs/2017-04-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/client.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go b/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go index 9850cb9d1b5..8bdcc312254 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go b/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go index 93228b498b8..ea7097ec82a 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability.go index 5bcc2949329..dd55175daec 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_checkavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckAvailability(ctx context.Context, id commonids.Su var model CheckAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate.go index a3d15c4324a..35ba8c61e92 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdate(ctx context.Context, id NamespaceId, in var model NamespaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule.go index 317cd83b8b1..09f43a90f80 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_createorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, i var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_get.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_get.go index 0ec5efd9dd0..05c6f6643c1 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_get.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model NamespaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule.go index 9bf152d3604..e7943f65b71 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesClient) GetAuthorizationRule(ctx context.Context, id Authoriza var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys.go index b687f64db49..5bfec38dbcf 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_listkeys.go @@ -46,7 +46,6 @@ func (c NamespacesClient) ListKeys(ctx context.Context, id AuthorizationRuleId) var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch.go index 2a89091185f..1332a124bef 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_patch.go @@ -49,7 +49,6 @@ func (c NamespacesClient) Patch(ctx context.Context, id NamespaceId, input Names var model NamespaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys.go b/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys.go index 8d2ec8c65c0..2ee04b95b0d 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesClient) RegenerateKeys(ctx context.Context, id AuthorizationRu var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/namespaces/version.go b/resource-manager/notificationhubs/2017-04-01/namespaces/version.go index a1c5b4cbe80..ee5cd26285b 100644 --- a/resource-manager/notificationhubs/2017-04-01/namespaces/version.go +++ b/resource-manager/notificationhubs/2017-04-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2017-04-01" } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md b/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md index 1fa1f9890b1..49b7ccf45d5 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2017-04-01/notificationhubs` Documentation -The `notificationhubs` SDK allows for interaction with the Azure Resource Manager Service `notificationhubs` (API Version `2017-04-01`). +The `notificationhubs` SDK allows for interaction with Azure Resource Manager `notificationhubs` (API Version `2017-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/client.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/client.go index 20b3fc811bf..ad487e8c1a3 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/client.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/client.go @@ -15,7 +15,7 @@ type NotificationHubsClient struct { } func NewNotificationHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "notificationhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "notificationhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NotificationHubsClient: %+v", err) } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go index 12c50c7cc3b..e431f2d1bc6 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go index accd51fdaa1..c213ae0830f 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhub.go @@ -44,7 +44,7 @@ func ParseNotificationHubID(input string) (*NotificationHubId, error) { } id := NotificationHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationHubIDInsensitively(input string) (*NotificationHubId, erro } id := NotificationHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go index 11bad7c9abf..c7134776f30 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/id_notificationhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseNotificationHubAuthorizationRuleID(input string) (*NotificationHubAuth } id := NotificationHubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationHubAuthorizationRuleIDInsensitively(input string) (*Notifi } id := NotificationHubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability.go index 2997ee5bf66..a5b80580f0b 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_checknotificationhubavailability.go @@ -50,7 +50,6 @@ func (c NotificationHubsClient) CheckNotificationHubAvailability(ctx context.Con var model CheckAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate.go index 676c752ec9b..0a3c1644089 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c NotificationHubsClient) CreateOrUpdate(ctx context.Context, id Notificat var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule.go index 7f100601bb7..594f4b547af 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_createorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NotificationHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Cont var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend.go index 683fbc3dfc5..50c2389cb16 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_debugsend.go @@ -50,7 +50,6 @@ func (c NotificationHubsClient) DebugSend(ctx context.Context, id NotificationHu var model DebugSendResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get.go index 73c2edede8c..596d3961724 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_get.go @@ -45,7 +45,6 @@ func (c NotificationHubsClient) Get(ctx context.Context, id NotificationHubId) ( var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule.go index c6c946aa479..f70fb4c1996 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c NotificationHubsClient) GetAuthorizationRule(ctx context.Context, id Not var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials.go index 1e25ebf2924..d785636eab5 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_getpnscredentials.go @@ -46,7 +46,6 @@ func (c NotificationHubsClient) GetPnsCredentials(ctx context.Context, id Notifi var model PnsCredentialsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys.go index d87b28b26ab..45e45343025 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_listkeys.go @@ -46,7 +46,6 @@ func (c NotificationHubsClient) ListKeys(ctx context.Context, id NotificationHub var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch.go index 9a7fa1a7c88..5e9cdddd17e 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_patch.go @@ -49,7 +49,6 @@ func (c NotificationHubsClient) Patch(ctx context.Context, id NotificationHubId, var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys.go index 39a5ebe2825..cfc03b180f5 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c NotificationHubsClient) RegenerateKeys(ctx context.Context, id Notificat var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2017-04-01/notificationhubs/version.go b/resource-manager/notificationhubs/2017-04-01/notificationhubs/version.go index ac60580aeb7..ee52cac2880 100644 --- a/resource-manager/notificationhubs/2017-04-01/notificationhubs/version.go +++ b/resource-manager/notificationhubs/2017-04-01/notificationhubs/version.go @@ -1,12 +1,10 @@ package notificationhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/notificationhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/notificationhubs/2017-04-01" } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/README.md b/resource-manager/notificationhubs/2023-09-01/hubs/README.md index 892db6505bb..ab618a01008 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/README.md +++ b/resource-manager/notificationhubs/2023-09-01/hubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2023-09-01/hubs` Documentation -The `hubs` SDK allows for interaction with the Azure Resource Manager Service `notificationhubs` (API Version `2023-09-01`). +The `hubs` SDK allows for interaction with Azure Resource Manager `notificationhubs` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/client.go b/resource-manager/notificationhubs/2023-09-01/hubs/client.go index c5d60953536..db6c72574cc 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/client.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/client.go @@ -15,7 +15,7 @@ type HubsClient struct { } func NewHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*HubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HubsClient: %+v", err) } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/id_namespace.go b/resource-manager/notificationhubs/2023-09-01/hubs/id_namespace.go index ad31a9d6ebf..34816237c58 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/id_namespace.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhub.go b/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhub.go index d479d34200f..7671e79ed9f 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhub.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhub.go @@ -44,7 +44,7 @@ func ParseNotificationHubID(input string) (*NotificationHubId, error) { } id := NotificationHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNotificationHubIDInsensitively(input string) (*NotificationHubId, erro } id := NotificationHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhubauthorizationrule.go b/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhubauthorizationrule.go index 33dace89611..f78582ff88e 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhubauthorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/id_notificationhubauthorizationrule.go @@ -46,7 +46,7 @@ func ParseNotificationHubAuthorizationRuleID(input string) (*NotificationHubAuth } id := NotificationHubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNotificationHubAuthorizationRuleIDInsensitively(input string) (*Notifi } id := NotificationHubAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubschecknotificationhubavailability.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubschecknotificationhubavailability.go index 00a7c9acad7..0f82aaf563e 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubschecknotificationhubavailability.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubschecknotificationhubavailability.go @@ -50,7 +50,6 @@ func (c HubsClient) NotificationHubsCheckNotificationHubAvailability(ctx context var model CheckAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdate.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdate.go index 8383789b298..5829978cc1f 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdate.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdate.go @@ -50,7 +50,6 @@ func (c HubsClient) NotificationHubsCreateOrUpdate(ctx context.Context, id Notif var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdateauthorizationrule.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdateauthorizationrule.go index 973ca95f91b..05df2da5630 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdateauthorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubscreateorupdateauthorizationrule.go @@ -50,7 +50,6 @@ func (c HubsClient) NotificationHubsCreateOrUpdateAuthorizationRule(ctx context. var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsdebugsend.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsdebugsend.go index d183cb3ae16..52a6ca634f1 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsdebugsend.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsdebugsend.go @@ -46,7 +46,6 @@ func (c HubsClient) NotificationHubsDebugSend(ctx context.Context, id Notificati var model DebugSendResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsget.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsget.go index d70357899db..7e89602128a 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsget.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsget.go @@ -45,7 +45,6 @@ func (c HubsClient) NotificationHubsGet(ctx context.Context, id NotificationHubI var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetauthorizationrule.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetauthorizationrule.go index 39b2c44e9c0..169f0304a00 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetauthorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c HubsClient) NotificationHubsGetAuthorizationRule(ctx context.Context, id var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetpnscredentials.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetpnscredentials.go index 4a304d12722..06c55c03190 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetpnscredentials.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsgetpnscredentials.go @@ -46,7 +46,6 @@ func (c HubsClient) NotificationHubsGetPnsCredentials(ctx context.Context, id No var model PnsCredentialsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslist.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslist.go index 4970dba0957..c83f62873e6 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslist.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslist.go @@ -39,6 +39,7 @@ func (o NotificationHubsListOperationOptions) ToHeaders() *client.Headers { func (o NotificationHubsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslistkeys.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslistkeys.go index aa4c2ef9dd8..f83363747cf 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslistkeys.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubslistkeys.go @@ -46,7 +46,6 @@ func (c HubsClient) NotificationHubsListKeys(ctx context.Context, id Notificatio var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsregeneratekeys.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsregeneratekeys.go index 448856fba90..cafd673159f 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsregeneratekeys.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsregeneratekeys.go @@ -50,7 +50,6 @@ func (c HubsClient) NotificationHubsRegenerateKeys(ctx context.Context, id Notif var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsupdate.go b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsupdate.go index 94343e8e380..fbf96c704ba 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsupdate.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/method_notificationhubsupdate.go @@ -49,7 +49,6 @@ func (c HubsClient) NotificationHubsUpdate(ctx context.Context, id NotificationH var model NotificationHubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/hubs/version.go b/resource-manager/notificationhubs/2023-09-01/hubs/version.go index f09f2240716..c3ddb29a015 100644 --- a/resource-manager/notificationhubs/2023-09-01/hubs/version.go +++ b/resource-manager/notificationhubs/2023-09-01/hubs/version.go @@ -1,12 +1,10 @@ package hubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hubs/2023-09-01" } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/README.md b/resource-manager/notificationhubs/2023-09-01/namespaces/README.md index dc9248c2cf1..b3fa514afab 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/README.md +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2023-09-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `notificationhubs` (API Version `2023-09-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `notificationhubs` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/client.go b/resource-manager/notificationhubs/2023-09-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/client.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/id_authorizationrule.go b/resource-manager/notificationhubs/2023-09-01/namespaces/id_authorizationrule.go index 9850cb9d1b5..8bdcc312254 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/id_authorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/id_namespace.go b/resource-manager/notificationhubs/2023-09-01/namespaces/id_namespace.go index 93228b498b8..ea7097ec82a 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/id_namespace.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_checkavailability.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_checkavailability.go index 5bcc2949329..dd55175daec 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_checkavailability.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_checkavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckAvailability(ctx context.Context, id commonids.Su var model CheckAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_createorupdateauthorizationrule.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_createorupdateauthorizationrule.go index 66f97336f00..ac43735f04a 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_createorupdateauthorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_createorupdateauthorizationrule.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, i var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_get.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_get.go index 0ec5efd9dd0..05c6f6643c1 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_get.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model NamespaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_getauthorizationrule.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_getauthorizationrule.go index 9bf152d3604..e7943f65b71 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_getauthorizationrule.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesClient) GetAuthorizationRule(ctx context.Context, id Authoriza var model SharedAccessAuthorizationRuleResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_getpnscredentials.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_getpnscredentials.go index e429aaf1ccc..43b961d1ea8 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_getpnscredentials.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_getpnscredentials.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetPnsCredentials(ctx context.Context, id NamespaceId) var model PnsCredentialsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_list.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_list.go index a899e019aa0..9b173eca961 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_list.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_listall.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_listall.go index c8c956b2708..c101170074f 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_listall.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_listall.go @@ -40,6 +40,7 @@ func (o ListAllOperationOptions) ToHeaders() *client.Headers { func (o ListAllOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_listkeys.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_listkeys.go index b687f64db49..5bfec38dbcf 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_listkeys.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_listkeys.go @@ -46,7 +46,6 @@ func (c NamespacesClient) ListKeys(ctx context.Context, id AuthorizationRuleId) var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_regeneratekeys.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_regeneratekeys.go index 0065bfd2bef..7f1081cb62d 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_regeneratekeys.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesClient) RegenerateKeys(ctx context.Context, id AuthorizationRu var model ResourceListKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/method_update.go b/resource-manager/notificationhubs/2023-09-01/namespaces/method_update.go index 20b73963ab7..c33927e2b89 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/method_update.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/method_update.go @@ -49,7 +49,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input Name var model NamespaceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/namespaces/version.go b/resource-manager/notificationhubs/2023-09-01/namespaces/version.go index 4f41179bf74..3282d9f96e1 100644 --- a/resource-manager/notificationhubs/2023-09-01/namespaces/version.go +++ b/resource-manager/notificationhubs/2023-09-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2023-09-01" } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/README.md b/resource-manager/notificationhubs/2023-09-01/privatelink/README.md index 27172f4c75d..e8f5f6f2bf6 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/README.md +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/notificationhubs/2023-09-01/privatelink` Documentation -The `privatelink` SDK allows for interaction with the Azure Resource Manager Service `notificationhubs` (API Version `2023-09-01`). +The `privatelink` SDK allows for interaction with Azure Resource Manager `notificationhubs` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/client.go b/resource-manager/notificationhubs/2023-09-01/privatelink/client.go index d8e4d40206f..84b106c4ad6 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/client.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/client.go @@ -15,7 +15,7 @@ type PrivateLinkClient struct { } func NewPrivateLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkClient: %+v", err) } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/id_namespace.go b/resource-manager/notificationhubs/2023-09-01/privatelink/id_namespace.go index 141030d17f2..81e5d80e356 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/id_namespace.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/id_privateendpointconnection.go b/resource-manager/notificationhubs/2023-09-01/privatelink/id_privateendpointconnection.go index cdb65f7fc54..bcd0275c975 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/id_privateendpointconnection.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/id_privatelinkresource.go b/resource-manager/notificationhubs/2023-09-01/privatelink/id_privatelinkresource.go index 8857f912ec1..ce88190c11d 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/id_privatelinkresource.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsget.go b/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsget.go index 7f5e3a49859..29a436090cd 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsget.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGet(ctx context.Context, id var model PrivateEndpointConnectionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsgetgroupid.go b/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsgetgroupid.go index 263e79b9433..ba2f150bde0 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsgetgroupid.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/method_privateendpointconnectionsgetgroupid.go @@ -45,7 +45,6 @@ func (c PrivateLinkClient) PrivateEndpointConnectionsGetGroupId(ctx context.Cont var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/notificationhubs/2023-09-01/privatelink/version.go b/resource-manager/notificationhubs/2023-09-01/privatelink/version.go index b0b9861f72b..4410807b1a1 100644 --- a/resource-manager/notificationhubs/2023-09-01/privatelink/version.go +++ b/resource-manager/notificationhubs/2023-09-01/privatelink/version.go @@ -1,12 +1,10 @@ package privatelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelink/2023-09-01" } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/README.md b/resource-manager/operationalinsights/2019-09-01/querypackqueries/README.md index b6a4fd958a1..6de626c8585 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/README.md +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypackqueries` Documentation -The `querypackqueries` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2019-09-01`). +The `querypackqueries` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2019-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/client.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/client.go index ab93dbedc62..d858936012f 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/client.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/client.go @@ -15,7 +15,7 @@ type QueryPackQueriesClient struct { } func NewQueryPackQueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryPackQueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "querypackqueries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "querypackqueries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryPackQueriesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go index a208226e04c..748e4d9c0a9 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_query.go @@ -44,7 +44,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go index 519b4ad1aaf..75c39d8265b 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/id_querypack.go @@ -42,7 +42,7 @@ func ParseQueryPackID(input string) (*QueryPackId, error) { } id := QueryPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryPackIDInsensitively(input string) (*QueryPackId, error) { } id := QueryPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesget.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesget.go index a23ba78653a..ff8ffe93a7a 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesget.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesget.go @@ -45,7 +45,6 @@ func (c QueryPackQueriesClient) QueriesGet(ctx context.Context, id QueryId) (res var model LogAnalyticsQueryPackQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_querieslist.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_querieslist.go index 278058205db..f6173d9275c 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_querieslist.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_querieslist.go @@ -40,6 +40,7 @@ func (o QueriesListOperationOptions) ToHeaders() *client.Headers { func (o QueriesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesput.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesput.go index e3a2b66a6a9..ecf150a8195 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesput.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesput.go @@ -49,7 +49,6 @@ func (c QueryPackQueriesClient) QueriesPut(ctx context.Context, id QueryId, inpu var model LogAnalyticsQueryPackQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go index b37a40c80c9..7342fa8eeec 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriessearch.go @@ -40,6 +40,7 @@ func (o QueriesSearchOperationOptions) ToHeaders() *client.Headers { func (o QueriesSearchOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesupdate.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesupdate.go index 2d4aa8b2be8..8a547b353c8 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesupdate.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/method_queriesupdate.go @@ -49,7 +49,6 @@ func (c QueryPackQueriesClient) QueriesUpdate(ctx context.Context, id QueryId, i var model LogAnalyticsQueryPackQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypackqueries/version.go b/resource-manager/operationalinsights/2019-09-01/querypackqueries/version.go index ae64696c36c..e890aa73c6a 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypackqueries/version.go +++ b/resource-manager/operationalinsights/2019-09-01/querypackqueries/version.go @@ -1,12 +1,10 @@ package querypackqueries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/querypackqueries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/querypackqueries/2019-09-01" } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/README.md b/resource-manager/operationalinsights/2019-09-01/querypacks/README.md index 942563a1143..b47137099e5 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/README.md +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks` Documentation -The `querypacks` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2019-09-01`). +The `querypacks` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2019-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/client.go b/resource-manager/operationalinsights/2019-09-01/querypacks/client.go index 0fc8fcf5c5c..5efc5278ddd 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/client.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/client.go @@ -15,7 +15,7 @@ type QueryPacksClient struct { } func NewQueryPacksClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryPacksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "querypacks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "querypacks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryPacksClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go b/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go index 7685c22183a..917a42a4ef6 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/id_querypack.go @@ -42,7 +42,7 @@ func ParseQueryPackID(input string) (*QueryPackId, error) { } id := QueryPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryPackIDInsensitively(input string) (*QueryPackId, error) { } id := QueryPackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdate.go b/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdate.go index cc2e68937df..84a18b58e60 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdate.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c QueryPacksClient) CreateOrUpdate(ctx context.Context, id QueryPackId, in var model LogAnalyticsQueryPack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdatewithoutname.go b/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdatewithoutname.go index 2a551eb74f2..08a4740145c 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdatewithoutname.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/method_createorupdatewithoutname.go @@ -51,7 +51,6 @@ func (c QueryPacksClient) CreateOrUpdateWithoutName(ctx context.Context, id comm var model LogAnalyticsQueryPack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/method_get.go b/resource-manager/operationalinsights/2019-09-01/querypacks/method_get.go index 1de39dec4d6..019de126545 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/method_get.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/method_get.go @@ -45,7 +45,6 @@ func (c QueryPacksClient) Get(ctx context.Context, id QueryPackId) (result GetOp var model LogAnalyticsQueryPack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/method_updatetags.go b/resource-manager/operationalinsights/2019-09-01/querypacks/method_updatetags.go index d650a879525..d4f83732840 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/method_updatetags.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/method_updatetags.go @@ -49,7 +49,6 @@ func (c QueryPacksClient) UpdateTags(ctx context.Context, id QueryPackId, input var model LogAnalyticsQueryPack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2019-09-01/querypacks/version.go b/resource-manager/operationalinsights/2019-09-01/querypacks/version.go index a95b1f7465c..cadf7006727 100644 --- a/resource-manager/operationalinsights/2019-09-01/querypacks/version.go +++ b/resource-manager/operationalinsights/2019-09-01/querypacks/version.go @@ -1,12 +1,10 @@ package querypacks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/querypacks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/querypacks/2019-09-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/README.md b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/README.md index a0dd64e7dac..0e6d82bcfa3 100644 --- a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/README.md +++ b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/availableservicetiers` Documentation -The `availableservicetiers` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `availableservicetiers` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/client.go b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/client.go index e24c5fe1d93..3396efc04c9 100644 --- a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/client.go +++ b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/client.go @@ -15,7 +15,7 @@ type AvailableServiceTiersClient struct { } func NewAvailableServiceTiersClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailableServiceTiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availableservicetiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availableservicetiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailableServiceTiersClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/id_workspace.go index e5a5b867012..864a3ca5556 100644 --- a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/method_listbyworkspace.go index b183144be60..431f2b6767c 100644 --- a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c AvailableServiceTiersClient) ListByWorkspace(ctx context.Context, id Wor var model []AvailableServiceTier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/version.go b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/version.go index 9cf00e14b3b..76d27c6d91a 100644 --- a/resource-manager/operationalinsights/2020-08-01/availableservicetiers/version.go +++ b/resource-manager/operationalinsights/2020-08-01/availableservicetiers/version.go @@ -1,12 +1,10 @@ package availableservicetiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicetiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availableservicetiers/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/clusters/README.md b/resource-manager/operationalinsights/2020-08-01/clusters/README.md index 0ede8797baf..f5faa20a6d8 100644 --- a/resource-manager/operationalinsights/2020-08-01/clusters/README.md +++ b/resource-manager/operationalinsights/2020-08-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/clusters/client.go b/resource-manager/operationalinsights/2020-08-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/operationalinsights/2020-08-01/clusters/client.go +++ b/resource-manager/operationalinsights/2020-08-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go b/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go index c3194d648b6..8fa420f317f 100644 --- a/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go +++ b/resource-manager/operationalinsights/2020-08-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/clusters/method_get.go b/resource-manager/operationalinsights/2020-08-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/operationalinsights/2020-08-01/clusters/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/clusters/version.go b/resource-manager/operationalinsights/2020-08-01/clusters/version.go index bf91aa7acd9..851c7f88dba 100644 --- a/resource-manager/operationalinsights/2020-08-01/clusters/version.go +++ b/resource-manager/operationalinsights/2020-08-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/README.md b/resource-manager/operationalinsights/2020-08-01/dataexport/README.md index ef5cefbfee2..5ad8226650c 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/README.md +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/dataexport` Documentation -The `dataexport` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `dataexport` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/client.go b/resource-manager/operationalinsights/2020-08-01/dataexport/client.go index 19ed82dc0f0..5113e66d9c0 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/client.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/client.go @@ -15,7 +15,7 @@ type DataExportClient struct { } func NewDataExportClientWithBaseURI(sdkApi sdkEnv.Api) (*DataExportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataexport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataexport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataExportClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go b/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go index eb4a8ae1534..ce7a4928e07 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/id_dataexport.go @@ -44,7 +44,7 @@ func ParseDataExportID(input string) (*DataExportId, error) { } id := DataExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataExportIDInsensitively(input string) (*DataExportId, error) { } id := DataExportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go index d4d3637046f..e154fe8e6bb 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/method_createorupdate.go b/resource-manager/operationalinsights/2020-08-01/dataexport/method_createorupdate.go index 03002752607..6715bd687d9 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/method_createorupdate.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataExportClient) CreateOrUpdate(ctx context.Context, id DataExportId, i var model DataExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/method_get.go b/resource-manager/operationalinsights/2020-08-01/dataexport/method_get.go index fbad79dffd1..31181e61127 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/method_get.go @@ -45,7 +45,6 @@ func (c DataExportClient) Get(ctx context.Context, id DataExportId) (result GetO var model DataExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/dataexport/method_listbyworkspace.go index 7b067ae2549..aa783d2a041 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c DataExportClient) ListByWorkspace(ctx context.Context, id WorkspaceId) ( var model DataExportListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/dataexport/version.go b/resource-manager/operationalinsights/2020-08-01/dataexport/version.go index 9a7114faae8..453c4703369 100644 --- a/resource-manager/operationalinsights/2020-08-01/dataexport/version.go +++ b/resource-manager/operationalinsights/2020-08-01/dataexport/version.go @@ -1,12 +1,10 @@ package dataexport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataexport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataexport/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/README.md b/resource-manager/operationalinsights/2020-08-01/datasources/README.md index 11cb9b0cbff..2c23f0cc561 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/README.md +++ b/resource-manager/operationalinsights/2020-08-01/datasources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/datasources` Documentation -The `datasources` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `datasources` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/client.go b/resource-manager/operationalinsights/2020-08-01/datasources/client.go index 5c880321274..ab9ec31dddc 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/client.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/client.go @@ -15,7 +15,7 @@ type DataSourcesClient struct { } func NewDataSourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataSourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datasources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datasources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataSourcesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go b/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go index 310dd13d789..ac1d30a8218 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/id_datasource.go @@ -44,7 +44,7 @@ func ParseDataSourceID(input string) (*DataSourceId, error) { } id := DataSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataSourceIDInsensitively(input string) (*DataSourceId, error) { } id := DataSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go index e68409f6998..5b8884fdb48 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/method_createorupdate.go b/resource-manager/operationalinsights/2020-08-01/datasources/method_createorupdate.go index 23131864f91..0f409fcbaab 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/method_createorupdate.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataSourcesClient) CreateOrUpdate(ctx context.Context, id DataSourceId, var model DataSource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/method_get.go b/resource-manager/operationalinsights/2020-08-01/datasources/method_get.go index ce3217e06cc..388310f131e 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/method_get.go @@ -45,7 +45,6 @@ func (c DataSourcesClient) Get(ctx context.Context, id DataSourceId) (result Get var model DataSource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/datasources/method_listbyworkspace.go index 27abd72a59d..909910b2332 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/method_listbyworkspace.go @@ -39,6 +39,7 @@ func (o ListByWorkspaceOperationOptions) ToHeaders() *client.Headers { func (o ListByWorkspaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2020-08-01/datasources/version.go b/resource-manager/operationalinsights/2020-08-01/datasources/version.go index 3b9864f840d..eeb4b13a881 100644 --- a/resource-manager/operationalinsights/2020-08-01/datasources/version.go +++ b/resource-manager/operationalinsights/2020-08-01/datasources/version.go @@ -1,12 +1,10 @@ package datasources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datasources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datasources/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/README.md b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/README.md index 86708d9f0a7..ff1377826ab 100644 --- a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/README.md +++ b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/deletedworkspaces` Documentation -The `deletedworkspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `deletedworkspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/client.go b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/client.go index 97d6b464c6e..dfd9fe59bb7 100644 --- a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/client.go +++ b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/client.go @@ -15,7 +15,7 @@ type DeletedWorkspacesClient struct { } func NewDeletedWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_list.go b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_list.go index 3e353eead06..fdd141b3757 100644 --- a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_list.go +++ b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_list.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) List(ctx context.Context, id commonids.Subscrip var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_listbyresourcegroup.go index 0227ed968df..bc5fbefd94f 100644 --- a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) ListByResourceGroup(ctx context.Context, id com var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/version.go b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/version.go index 54bbdf82381..4cfa92cf6fc 100644 --- a/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/version.go +++ b/resource-manager/operationalinsights/2020-08-01/deletedworkspaces/version.go @@ -1,12 +1,10 @@ package deletedworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedworkspaces/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/README.md b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/README.md index bf2cffb763c..d1b91dfee5d 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/README.md +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/intelligencepacks` Documentation -The `intelligencepacks` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `intelligencepacks` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/client.go b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/client.go index 318da5dffba..518c60eaae5 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/client.go +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/client.go @@ -15,7 +15,7 @@ type IntelligencePacksClient struct { } func NewIntelligencePacksClientWithBaseURI(sdkApi sdkEnv.Api) (*IntelligencePacksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "intelligencepacks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "intelligencepacks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntelligencePacksClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_intelligencepack.go b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_intelligencepack.go index d4fd71b5cd6..b6e8e8ffb69 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_intelligencepack.go +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_intelligencepack.go @@ -44,7 +44,7 @@ func ParseIntelligencePackID(input string) (*IntelligencePackId, error) { } id := IntelligencePackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntelligencePackIDInsensitively(input string) (*IntelligencePackId, er } id := IntelligencePackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_workspace.go index 69eef172150..ea4eef134b8 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/method_list.go b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/method_list.go index f8f4b8e57c5..935b628393d 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/method_list.go +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/method_list.go @@ -46,7 +46,6 @@ func (c IntelligencePacksClient) List(ctx context.Context, id WorkspaceId) (resu var model []IntelligencePack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/version.go b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/version.go index c283d2862b6..cad278b0d0e 100644 --- a/resource-manager/operationalinsights/2020-08-01/intelligencepacks/version.go +++ b/resource-manager/operationalinsights/2020-08-01/intelligencepacks/version.go @@ -1,12 +1,10 @@ package intelligencepacks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/intelligencepacks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/intelligencepacks/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/README.md b/resource-manager/operationalinsights/2020-08-01/linkedservices/README.md index bf468527686..70ba25de4c9 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/README.md +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedservices` Documentation -The `linkedservices` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `linkedservices` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/client.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/client.go index c016c4a2bb8..3dad68f5d5e 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/client.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/client.go @@ -15,7 +15,7 @@ type LinkedServicesClient struct { } func NewLinkedServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedServicesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go index f8c09a593a9..b04c6159c38 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/id_linkedservice.go @@ -44,7 +44,7 @@ func ParseLinkedServiceID(input string) (*LinkedServiceId, error) { } id := LinkedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedServiceIDInsensitively(input string) (*LinkedServiceId, error) { } id := LinkedServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go index 4966f3d66fe..ee168244f79 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/method_get.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/method_get.go index bb490dfbf7b..f4d0d98ffdd 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/method_get.go @@ -45,7 +45,6 @@ func (c LinkedServicesClient) Get(ctx context.Context, id LinkedServiceId) (resu var model LinkedService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/method_listbyworkspace.go index 48944a1aca8..9c72f2b544d 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c LinkedServicesClient) ListByWorkspace(ctx context.Context, id WorkspaceI var model LinkedServiceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedservices/version.go b/resource-manager/operationalinsights/2020-08-01/linkedservices/version.go index bda0bc9da97..46aac81d424 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedservices/version.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedservices/version.go @@ -1,12 +1,10 @@ package linkedservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedservices/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/README.md b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/README.md index 9bf73a25928..542bfb972fd 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/README.md +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts` Documentation -The `linkedstorageaccounts` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `linkedstorageaccounts` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/client.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/client.go index 79be37a0eaa..951ac7536f6 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/client.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/client.go @@ -15,7 +15,7 @@ type LinkedStorageAccountsClient struct { } func NewLinkedStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkedStorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkedstorageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkedstorageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkedStorageAccountsClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go index 0be17e30d4b..67e80ecd9f4 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_datasourcetype.go @@ -44,7 +44,7 @@ func ParseDataSourceTypeID(input string) (*DataSourceTypeId, error) { } id := DataSourceTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataSourceTypeIDInsensitively(input string) (*DataSourceTypeId, error) } id := DataSourceTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go index fb67d5b3634..be8ba37eb80 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_createorupdate.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_createorupdate.go index 732b8f3c97b..713373c104f 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_createorupdate.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_createorupdate.go @@ -49,7 +49,6 @@ func (c LinkedStorageAccountsClient) CreateOrUpdate(ctx context.Context, id Data var model LinkedStorageAccountsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_get.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_get.go index 823a7c4ca3c..085a74b9f9a 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_get.go @@ -45,7 +45,6 @@ func (c LinkedStorageAccountsClient) Get(ctx context.Context, id DataSourceTypeI var model LinkedStorageAccountsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_listbyworkspace.go index 750a4b73ef7..2e40bd1dc6c 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c LinkedStorageAccountsClient) ListByWorkspace(ctx context.Context, id Wor var model LinkedStorageAccountsListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/version.go b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/version.go index 0ffafcf0449..4c84db8ffdd 100644 --- a/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/version.go +++ b/resource-manager/operationalinsights/2020-08-01/linkedstorageaccounts/version.go @@ -1,12 +1,10 @@ package linkedstorageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkedstorageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkedstorageaccounts/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/README.md b/resource-manager/operationalinsights/2020-08-01/savedsearches/README.md index cf05f30c1e3..e77349595aa 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/README.md +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches` Documentation -The `savedsearches` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `savedsearches` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/client.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/client.go index f96f8e1f793..feb243cf4e4 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/client.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/client.go @@ -15,7 +15,7 @@ type SavedSearchesClient struct { } func NewSavedSearchesClientWithBaseURI(sdkApi sdkEnv.Api) (*SavedSearchesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "savedsearches", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "savedsearches", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SavedSearchesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go index 940ab0b970d..a268b380aff 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/id_savedsearch.go @@ -44,7 +44,7 @@ func ParseSavedSearchID(input string) (*SavedSearchId, error) { } id := SavedSearchId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSavedSearchIDInsensitively(input string) (*SavedSearchId, error) { } id := SavedSearchId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go index a875e592288..34df518e35f 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_createorupdate.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_createorupdate.go index b5488dfdcc7..69d3a92a12d 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_createorupdate.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SavedSearchesClient) CreateOrUpdate(ctx context.Context, id SavedSearchI var model SavedSearch result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_get.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_get.go index 7071f71c730..cd5ba498ecb 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_get.go @@ -45,7 +45,6 @@ func (c SavedSearchesClient) Get(ctx context.Context, id SavedSearchId) (result var model SavedSearch result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_listbyworkspace.go index 5e27f7fc6d6..6c253f74e3a 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c SavedSearchesClient) ListByWorkspace(ctx context.Context, id WorkspaceId var model SavedSearchesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/savedsearches/version.go b/resource-manager/operationalinsights/2020-08-01/savedsearches/version.go index 333041cc823..94980d5a2c5 100644 --- a/resource-manager/operationalinsights/2020-08-01/savedsearches/version.go +++ b/resource-manager/operationalinsights/2020-08-01/savedsearches/version.go @@ -1,12 +1,10 @@ package savedsearches -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/savedsearches/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/savedsearches/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/README.md b/resource-manager/operationalinsights/2020-08-01/storageinsights/README.md index 36552c7ac44..111ff6bd775 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/README.md +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/storageinsights` Documentation -The `storageinsights` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `storageinsights` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/client.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/client.go index 45c60597475..8db4661f572 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/client.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/client.go @@ -15,7 +15,7 @@ type StorageInsightsClient struct { } func NewStorageInsightsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageInsightsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageinsights", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageinsights", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageInsightsClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go index 2c24b1d768c..c78b24d83d3 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/id_storageinsightconfig.go @@ -44,7 +44,7 @@ func ParseStorageInsightConfigID(input string) (*StorageInsightConfigId, error) } id := StorageInsightConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageInsightConfigIDInsensitively(input string) (*StorageInsightConf } id := StorageInsightConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go index 392b886c68e..83a1e667694 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigscreateorupdate.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigscreateorupdate.go index b631394509d..8f2360466e4 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigscreateorupdate.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigscreateorupdate.go @@ -50,7 +50,6 @@ func (c StorageInsightsClient) StorageInsightConfigsCreateOrUpdate(ctx context.C var model StorageInsight result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigsget.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigsget.go index 58ee9d57ebf..ec74aa1f07c 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigsget.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/method_storageinsightconfigsget.go @@ -45,7 +45,6 @@ func (c StorageInsightsClient) StorageInsightConfigsGet(ctx context.Context, id var model StorageInsight result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/storageinsights/version.go b/resource-manager/operationalinsights/2020-08-01/storageinsights/version.go index 25d748fb8dd..eaa8bd22e14 100644 --- a/resource-manager/operationalinsights/2020-08-01/storageinsights/version.go +++ b/resource-manager/operationalinsights/2020-08-01/storageinsights/version.go @@ -1,12 +1,10 @@ package storageinsights -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageinsights/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageinsights/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/README.md b/resource-manager/operationalinsights/2020-08-01/tables/README.md index 33dde92fc52..16e88bbe0ad 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/README.md +++ b/resource-manager/operationalinsights/2020-08-01/tables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/tables` Documentation -The `tables` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `tables` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/tables/client.go b/resource-manager/operationalinsights/2020-08-01/tables/client.go index 406ff177ddb..d448018bd46 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/client.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/client.go @@ -15,7 +15,7 @@ type TablesClient struct { } func NewTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*TablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TablesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/id_table.go b/resource-manager/operationalinsights/2020-08-01/tables/id_table.go index d1aba74a90f..df8a95f7745 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/id_table.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/tables/id_workspace.go index daf8916b51c..58336e25ec8 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/method_get.go b/resource-manager/operationalinsights/2020-08-01/tables/method_get.go index d442fe1f0b5..6418a17d96d 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/method_get.go @@ -45,7 +45,6 @@ func (c TablesClient) Get(ctx context.Context, id TableId) (result GetOperationR var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/method_listbyworkspace.go b/resource-manager/operationalinsights/2020-08-01/tables/method_listbyworkspace.go index b2f0592c986..a22495c0a5e 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c TablesClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (resu var model TablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/method_update.go b/resource-manager/operationalinsights/2020-08-01/tables/method_update.go index 85829906ba5..699d1586536 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/method_update.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/method_update.go @@ -49,7 +49,6 @@ func (c TablesClient) Update(ctx context.Context, id TableId, input Table) (resu var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/tables/version.go b/resource-manager/operationalinsights/2020-08-01/tables/version.go index 5f4722d7089..d3ec0f6b46a 100644 --- a/resource-manager/operationalinsights/2020-08-01/tables/version.go +++ b/resource-manager/operationalinsights/2020-08-01/tables/version.go @@ -1,12 +1,10 @@ package tables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tables/2020-08-01" } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/README.md b/resource-manager/operationalinsights/2020-08-01/workspaces/README.md index b5ec02f5190..9e01a3f26a9 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/README.md +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2020-08-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2020-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/client.go b/resource-manager/operationalinsights/2020-08-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/client.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go b/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go index acc37589b7f..a89e5aea6a6 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go b/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go index 4ea1c4be8d4..e9a2040ac66 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/id_intelligencepack.go @@ -44,7 +44,7 @@ func ParseIntelligencePackID(input string) (*IntelligencePackId, error) { } id := IntelligencePackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntelligencePackIDInsensitively(input string) (*IntelligencePackId, er } id := IntelligencePackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go b/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go index 103b2fb2e60..aa72670ba45 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/id_operation.go @@ -44,7 +44,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go b/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go index b9e04bd69f6..65a1bd6bfec 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_delete.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_delete.go index 7a3578c5108..1189ee0127e 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_delete.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_get.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_get.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_intelligencepackslist.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_intelligencepackslist.go index e6f4f354783..1e92df537ca 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_intelligencepackslist.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_intelligencepackslist.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) IntelligencePacksList(ctx context.Context, id Workspac var model []IntelligencePack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_list.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_list.go index e0b5ea8aa5c..7981337e0f0 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_list.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_list.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) List(ctx context.Context, id commonids.SubscriptionId) var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_listbyresourcegroup.go index 06a58246262..80e71d20aa0 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids. var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_managementgroupslist.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_managementgroupslist.go index df774a46e7f..596c5d1dab1 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_managementgroupslist.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_managementgroupslist.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) ManagementGroupsList(ctx context.Context, id Workspace var model WorkspaceListManagementGroupsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_schemaget.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_schemaget.go index c6d626ff127..eb7127f39af 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_schemaget.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_schemaget.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) SchemaGet(ctx context.Context, id WorkspaceId) (result var model SearchGetSchemaResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysgetsharedkeys.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysgetsharedkeys.go index 4d2c51fa343..91f8d2b6d41 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysgetsharedkeys.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysgetsharedkeys.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) SharedKeysGetSharedKeys(ctx context.Context, id Worksp var model SharedKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysregenerate.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysregenerate.go index 09bf6d4449e..df4473f5007 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysregenerate.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_sharedkeysregenerate.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) SharedKeysRegenerate(ctx context.Context, id Workspace var model SharedKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_update.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_update.go index b7cb243bd8a..cd8c04ff9c2 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_update.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_update.go @@ -49,7 +49,6 @@ func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input Work var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_usageslist.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_usageslist.go index 1f5055e6e1f..16742cf7284 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_usageslist.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_usageslist.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) UsagesList(ctx context.Context, id WorkspaceId) (resul var model WorkspaceListUsagesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgegetpurgestatus.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgegetpurgestatus.go index 7f729a335c8..223c603de91 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgegetpurgestatus.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgegetpurgestatus.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) WorkspacePurgeGetPurgeStatus(ctx context.Context, id O var model WorkspacePurgeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgepurge.go b/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgepurge.go index f3e8061b718..2899a83661e 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgepurge.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/method_workspacepurgepurge.go @@ -50,7 +50,6 @@ func (c WorkspacesClient) WorkspacePurgePurge(ctx context.Context, id WorkspaceI var model WorkspacePurgeResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2020-08-01/workspaces/version.go b/resource-manager/operationalinsights/2020-08-01/workspaces/version.go index 34a779bd000..2b227d3f58b 100644 --- a/resource-manager/operationalinsights/2020-08-01/workspaces/version.go +++ b/resource-manager/operationalinsights/2020-08-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2020-08-01" } diff --git a/resource-manager/operationalinsights/2021-06-01/clusters/README.md b/resource-manager/operationalinsights/2021-06-01/clusters/README.md index 3fe33b0eabb..c46c06bc844 100644 --- a/resource-manager/operationalinsights/2021-06-01/clusters/README.md +++ b/resource-manager/operationalinsights/2021-06-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2021-06-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2021-06-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2021-06-01/clusters/client.go b/resource-manager/operationalinsights/2021-06-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/operationalinsights/2021-06-01/clusters/client.go +++ b/resource-manager/operationalinsights/2021-06-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2021-06-01/clusters/id_cluster.go b/resource-manager/operationalinsights/2021-06-01/clusters/id_cluster.go index c3194d648b6..8fa420f317f 100644 --- a/resource-manager/operationalinsights/2021-06-01/clusters/id_cluster.go +++ b/resource-manager/operationalinsights/2021-06-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2021-06-01/clusters/method_get.go b/resource-manager/operationalinsights/2021-06-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/operationalinsights/2021-06-01/clusters/method_get.go +++ b/resource-manager/operationalinsights/2021-06-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/clusters/version.go b/resource-manager/operationalinsights/2021-06-01/clusters/version.go index 99c68bbf775..192c56cd2e5 100644 --- a/resource-manager/operationalinsights/2021-06-01/clusters/version.go +++ b/resource-manager/operationalinsights/2021-06-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2021-06-01" } diff --git a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/README.md b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/README.md index ce7e68f34f7..833ed4e15fe 100644 --- a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/README.md +++ b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2021-06-01/deletedworkspaces` Documentation -The `deletedworkspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2021-06-01`). +The `deletedworkspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/client.go b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/client.go index 97d6b464c6e..dfd9fe59bb7 100644 --- a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/client.go +++ b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/client.go @@ -15,7 +15,7 @@ type DeletedWorkspacesClient struct { } func NewDeletedWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_list.go b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_list.go index 3e353eead06..fdd141b3757 100644 --- a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_list.go +++ b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_list.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) List(ctx context.Context, id commonids.Subscrip var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_listbyresourcegroup.go index 0227ed968df..bc5fbefd94f 100644 --- a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) ListByResourceGroup(ctx context.Context, id com var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/version.go b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/version.go index c048ca2315b..6f4236fb9ff 100644 --- a/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/version.go +++ b/resource-manager/operationalinsights/2021-06-01/deletedworkspaces/version.go @@ -1,12 +1,10 @@ package deletedworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedworkspaces/2021-06-01" } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/README.md b/resource-manager/operationalinsights/2021-06-01/workspaces/README.md index cc827d17e6c..d67878aa7b7 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/README.md +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2021-06-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2021-06-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/client.go b/resource-manager/operationalinsights/2021-06-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/client.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/id_workspace.go b/resource-manager/operationalinsights/2021-06-01/workspaces/id_workspace.go index b9e04bd69f6..65a1bd6bfec 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/id_workspace.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/method_delete.go b/resource-manager/operationalinsights/2021-06-01/workspaces/method_delete.go index 7a3578c5108..1189ee0127e 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/method_delete.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/method_get.go b/resource-manager/operationalinsights/2021-06-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/method_get.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/method_list.go b/resource-manager/operationalinsights/2021-06-01/workspaces/method_list.go index e0b5ea8aa5c..7981337e0f0 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/method_list.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/method_list.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) List(ctx context.Context, id commonids.SubscriptionId) var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2021-06-01/workspaces/method_listbyresourcegroup.go index 06a58246262..80e71d20aa0 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids. var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/method_update.go b/resource-manager/operationalinsights/2021-06-01/workspaces/method_update.go index b7cb243bd8a..cd8c04ff9c2 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/method_update.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/method_update.go @@ -49,7 +49,6 @@ func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input Work var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2021-06-01/workspaces/version.go b/resource-manager/operationalinsights/2021-06-01/workspaces/version.go index c34ac6065c2..f1149dc5c13 100644 --- a/resource-manager/operationalinsights/2021-06-01/workspaces/version.go +++ b/resource-manager/operationalinsights/2021-06-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2021-06-01" } diff --git a/resource-manager/operationalinsights/2022-10-01/clusters/README.md b/resource-manager/operationalinsights/2022-10-01/clusters/README.md index 340c455082a..84b35d812bc 100644 --- a/resource-manager/operationalinsights/2022-10-01/clusters/README.md +++ b/resource-manager/operationalinsights/2022-10-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2022-10-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2022-10-01/clusters/client.go b/resource-manager/operationalinsights/2022-10-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/operationalinsights/2022-10-01/clusters/client.go +++ b/resource-manager/operationalinsights/2022-10-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2022-10-01/clusters/id_cluster.go b/resource-manager/operationalinsights/2022-10-01/clusters/id_cluster.go index c3194d648b6..8fa420f317f 100644 --- a/resource-manager/operationalinsights/2022-10-01/clusters/id_cluster.go +++ b/resource-manager/operationalinsights/2022-10-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2022-10-01/clusters/method_get.go b/resource-manager/operationalinsights/2022-10-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/operationalinsights/2022-10-01/clusters/method_get.go +++ b/resource-manager/operationalinsights/2022-10-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/clusters/version.go b/resource-manager/operationalinsights/2022-10-01/clusters/version.go index 0c41c0fec49..4d14626b679 100644 --- a/resource-manager/operationalinsights/2022-10-01/clusters/version.go +++ b/resource-manager/operationalinsights/2022-10-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2022-10-01" } diff --git a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/README.md b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/README.md index af26f4ce96e..fa31ef1d78c 100644 --- a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/README.md +++ b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/deletedworkspaces` Documentation -The `deletedworkspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2022-10-01`). +The `deletedworkspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/client.go b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/client.go index 97d6b464c6e..dfd9fe59bb7 100644 --- a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/client.go +++ b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/client.go @@ -15,7 +15,7 @@ type DeletedWorkspacesClient struct { } func NewDeletedWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_list.go b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_list.go index 3e353eead06..fdd141b3757 100644 --- a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_list.go +++ b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_list.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) List(ctx context.Context, id commonids.Subscrip var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_listbyresourcegroup.go index 0227ed968df..bc5fbefd94f 100644 --- a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) ListByResourceGroup(ctx context.Context, id com var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/version.go b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/version.go index d676d14ae07..8becb6ad0c1 100644 --- a/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/version.go +++ b/resource-manager/operationalinsights/2022-10-01/deletedworkspaces/version.go @@ -1,12 +1,10 @@ package deletedworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedworkspaces/2022-10-01" } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/README.md b/resource-manager/operationalinsights/2022-10-01/tables/README.md index cffb6cdec39..b26cc2f4242 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/README.md +++ b/resource-manager/operationalinsights/2022-10-01/tables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/tables` Documentation -The `tables` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2022-10-01`). +The `tables` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2022-10-01/tables/client.go b/resource-manager/operationalinsights/2022-10-01/tables/client.go index 406ff177ddb..d448018bd46 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/client.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/client.go @@ -15,7 +15,7 @@ type TablesClient struct { } func NewTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*TablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TablesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/id_table.go b/resource-manager/operationalinsights/2022-10-01/tables/id_table.go index d1aba74a90f..df8a95f7745 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/id_table.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/id_workspace.go b/resource-manager/operationalinsights/2022-10-01/tables/id_workspace.go index daf8916b51c..58336e25ec8 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/id_workspace.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/method_get.go b/resource-manager/operationalinsights/2022-10-01/tables/method_get.go index d442fe1f0b5..6418a17d96d 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/method_get.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/method_get.go @@ -45,7 +45,6 @@ func (c TablesClient) Get(ctx context.Context, id TableId) (result GetOperationR var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/method_listbyworkspace.go b/resource-manager/operationalinsights/2022-10-01/tables/method_listbyworkspace.go index b2f0592c986..a22495c0a5e 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/method_listbyworkspace.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c TablesClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (resu var model TablesListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/tables/version.go b/resource-manager/operationalinsights/2022-10-01/tables/version.go index 538187ee286..49d1301cf4d 100644 --- a/resource-manager/operationalinsights/2022-10-01/tables/version.go +++ b/resource-manager/operationalinsights/2022-10-01/tables/version.go @@ -1,12 +1,10 @@ package tables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tables/2022-10-01" } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/README.md b/resource-manager/operationalinsights/2022-10-01/workspaces/README.md index d32a4dead71..aaf22147aab 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/README.md +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2022-10-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2022-10-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/client.go b/resource-manager/operationalinsights/2022-10-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/client.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go b/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go index b9e04bd69f6..65a1bd6bfec 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/method_delete.go b/resource-manager/operationalinsights/2022-10-01/workspaces/method_delete.go index 7a3578c5108..1189ee0127e 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/method_delete.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/method_get.go b/resource-manager/operationalinsights/2022-10-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/method_get.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/method_list.go b/resource-manager/operationalinsights/2022-10-01/workspaces/method_list.go index e0b5ea8aa5c..7981337e0f0 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/method_list.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/method_list.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) List(ctx context.Context, id commonids.SubscriptionId) var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2022-10-01/workspaces/method_listbyresourcegroup.go index 06a58246262..80e71d20aa0 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids. var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/method_update.go b/resource-manager/operationalinsights/2022-10-01/workspaces/method_update.go index b7cb243bd8a..cd8c04ff9c2 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/method_update.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/method_update.go @@ -49,7 +49,6 @@ func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input Work var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2022-10-01/workspaces/version.go b/resource-manager/operationalinsights/2022-10-01/workspaces/version.go index 476267ce857..dfd2dd25fe8 100644 --- a/resource-manager/operationalinsights/2022-10-01/workspaces/version.go +++ b/resource-manager/operationalinsights/2022-10-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2022-10-01" } diff --git a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/README.md b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/README.md index e96ea8ad47f..8a461be17c1 100644 --- a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/README.md +++ b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2023-09-01/deletedworkspaces` Documentation -The `deletedworkspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2023-09-01`). +The `deletedworkspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/client.go b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/client.go index 97d6b464c6e..dfd9fe59bb7 100644 --- a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/client.go +++ b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/client.go @@ -15,7 +15,7 @@ type DeletedWorkspacesClient struct { } func NewDeletedWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_list.go b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_list.go index 3e353eead06..fdd141b3757 100644 --- a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_list.go +++ b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_list.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) List(ctx context.Context, id commonids.Subscrip var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_listbyresourcegroup.go index 0227ed968df..bc5fbefd94f 100644 --- a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c DeletedWorkspacesClient) ListByResourceGroup(ctx context.Context, id com var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/version.go b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/version.go index 19ea8be9704..eaee3bc7581 100644 --- a/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/version.go +++ b/resource-manager/operationalinsights/2023-09-01/deletedworkspaces/version.go @@ -1,12 +1,10 @@ package deletedworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedworkspaces/2023-09-01" } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/README.md b/resource-manager/operationalinsights/2023-09-01/workspaces/README.md index 132deaea1b2..f1952b773a5 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/README.md +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2023-09-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `operationalinsights` (API Version `2023-09-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `operationalinsights` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/client.go b/resource-manager/operationalinsights/2023-09-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/client.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/id_workspace.go b/resource-manager/operationalinsights/2023-09-01/workspaces/id_workspace.go index b9e04bd69f6..65a1bd6bfec 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/id_workspace.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/method_delete.go b/resource-manager/operationalinsights/2023-09-01/workspaces/method_delete.go index 7a3578c5108..1189ee0127e 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/method_delete.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/method_get.go b/resource-manager/operationalinsights/2023-09-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/method_get.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/method_list.go b/resource-manager/operationalinsights/2023-09-01/workspaces/method_list.go index e0b5ea8aa5c..7981337e0f0 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/method_list.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/method_list.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) List(ctx context.Context, id commonids.SubscriptionId) var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/method_listbyresourcegroup.go b/resource-manager/operationalinsights/2023-09-01/workspaces/method_listbyresourcegroup.go index 06a58246262..80e71d20aa0 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/method_listbyresourcegroup.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c WorkspacesClient) ListByResourceGroup(ctx context.Context, id commonids. var model WorkspaceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/method_update.go b/resource-manager/operationalinsights/2023-09-01/workspaces/method_update.go index b7cb243bd8a..cd8c04ff9c2 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/method_update.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/method_update.go @@ -49,7 +49,6 @@ func (c WorkspacesClient) Update(ctx context.Context, id WorkspaceId, input Work var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationalinsights/2023-09-01/workspaces/version.go b/resource-manager/operationalinsights/2023-09-01/workspaces/version.go index 7a825f9dbe1..e9efb1e0276 100644 --- a/resource-manager/operationalinsights/2023-09-01/workspaces/version.go +++ b/resource-manager/operationalinsights/2023-09-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2023-09-01" } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/README.md b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/README.md index 19b912e51f7..b37b450c279 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/README.md +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation` Documentation -The `managementassociation` SDK allows for interaction with the Azure Resource Manager Service `operationsmanagement` (API Version `2015-11-01-preview`). +The `managementassociation` SDK allows for interaction with Azure Resource Manager `operationsmanagement` (API Version `2015-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/client.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/client.go index f8eba8dce18..a15571da346 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/client.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/client.go @@ -15,7 +15,7 @@ type ManagementAssociationClient struct { } func NewManagementAssociationClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementAssociationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementassociation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementassociation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementAssociationClient: %+v", err) } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/id_scopedmanagementassociation.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/id_scopedmanagementassociation.go index 4fb2e5da54d..817b98a247d 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/id_scopedmanagementassociation.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/id_scopedmanagementassociation.go @@ -40,7 +40,7 @@ func ParseScopedManagementAssociationID(input string) (*ScopedManagementAssociat } id := ScopedManagementAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedManagementAssociationIDInsensitively(input string) (*ScopedManag } id := ScopedManagementAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_createorupdate.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_createorupdate.go index 526610ba379..568ea7b26a9 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_createorupdate.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagementAssociationClient) CreateOrUpdate(ctx context.Context, id Scop var model ManagementAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_get.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_get.go index 477a69634cb..3c22c06b605 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_get.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_get.go @@ -45,7 +45,6 @@ func (c ManagementAssociationClient) Get(ctx context.Context, id ScopedManagemen var model ManagementAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_listbysubscription.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_listbysubscription.go index 4c680f95012..b03ac987d6c 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_listbysubscription.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ManagementAssociationClient) ListBySubscription(ctx context.Context, id var model ManagementAssociationPropertiesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/version.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/version.go index accb5125421..77adc6e81e4 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/version.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementassociation/version.go @@ -1,12 +1,10 @@ package managementassociation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementassociation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementassociation/2015-11-01-preview" } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/README.md b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/README.md index 357ac9aa9c6..050cc4bf259 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/README.md +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration` Documentation -The `managementconfiguration` SDK allows for interaction with the Azure Resource Manager Service `operationsmanagement` (API Version `2015-11-01-preview`). +The `managementconfiguration` SDK allows for interaction with Azure Resource Manager `operationsmanagement` (API Version `2015-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/client.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/client.go index 1a0739f9fd1..b55b177c5b8 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/client.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/client.go @@ -15,7 +15,7 @@ type ManagementConfigurationClient struct { } func NewManagementConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementConfigurationClient: %+v", err) } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/id_managementconfiguration.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/id_managementconfiguration.go index 612159b33e7..a727e55c5bf 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/id_managementconfiguration.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/id_managementconfiguration.go @@ -42,7 +42,7 @@ func ParseManagementConfigurationID(input string) (*ManagementConfigurationId, e } id := ManagementConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagementConfigurationIDInsensitively(input string) (*ManagementConfi } id := ManagementConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_createorupdate.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_createorupdate.go index de21198e1e1..23288cbfdfa 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_createorupdate.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagementConfigurationClient) CreateOrUpdate(ctx context.Context, id Ma var model ManagementConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_get.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_get.go index 498faf469c8..6b8238c5ed1 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_get.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c ManagementConfigurationClient) Get(ctx context.Context, id ManagementCon var model ManagementConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_listbysubscription.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_listbysubscription.go index a6173248a64..8231abfd871 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_listbysubscription.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ManagementConfigurationClient) ListBySubscription(ctx context.Context, i var model ManagementConfigurationPropertiesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/version.go b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/version.go index 63ce8c17dc4..c04d583b4c7 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/version.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/managementconfiguration/version.go @@ -1,12 +1,10 @@ package managementconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementconfiguration/2015-11-01-preview" } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/README.md b/resource-manager/operationsmanagement/2015-11-01-preview/solution/README.md index d83830aa05c..b51e513cf58 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/README.md +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution` Documentation -The `solution` SDK allows for interaction with the Azure Resource Manager Service `operationsmanagement` (API Version `2015-11-01-preview`). +The `solution` SDK allows for interaction with Azure Resource Manager `operationsmanagement` (API Version `2015-11-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/client.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/client.go index be3ababf3d8..b3d069c4230 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/client.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/client.go @@ -15,7 +15,7 @@ type SolutionClient struct { } func NewSolutionClientWithBaseURI(sdkApi sdkEnv.Api) (*SolutionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "solution", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "solution", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SolutionClient: %+v", err) } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go index c69c67c2378..b3c10939237 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/id_solution.go @@ -42,7 +42,7 @@ func ParseSolutionID(input string) (*SolutionId, error) { } id := SolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSolutionIDInsensitively(input string) (*SolutionId, error) { } id := SolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_get.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_get.go index 7bcda288037..dd71c03ce24 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_get.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_get.go @@ -45,7 +45,6 @@ func (c SolutionClient) Get(ctx context.Context, id SolutionId) (result GetOpera var model Solution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbyresourcegroup.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbyresourcegroup.go index e1c2564602b..16078ac0b21 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbyresourcegroup.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c SolutionClient) ListByResourceGroup(ctx context.Context, id commonids.Re var model SolutionPropertiesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbysubscription.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbysubscription.go index b889f943e85..37ba672f690 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbysubscription.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c SolutionClient) ListBySubscription(ctx context.Context, id commonids.Sub var model SolutionPropertiesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/operationsmanagement/2015-11-01-preview/solution/version.go b/resource-manager/operationsmanagement/2015-11-01-preview/solution/version.go index cd2e9438081..f9512e1bc64 100644 --- a/resource-manager/operationsmanagement/2015-11-01-preview/solution/version.go +++ b/resource-manager/operationsmanagement/2015-11-01-preview/solution/version.go @@ -1,12 +1,10 @@ package solution -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/solution/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/solution/2015-11-01-preview" } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/README.md b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/README.md index f010f0e91de..f4d7396ff04 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/README.md +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups` Documentation -The `autonomousdatabasebackups` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `autonomousdatabasebackups` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/client.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/client.go index d28226c6c84..4ed28329666 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/client.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/client.go @@ -15,7 +15,7 @@ type AutonomousDatabaseBackupsClient struct { } func NewAutonomousDatabaseBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutonomousDatabaseBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autonomousdatabasebackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autonomousdatabasebackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutonomousDatabaseBackupsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabase.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabase.go index ac451719a55..c2d70c2a81a 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabase.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabase.go @@ -42,7 +42,7 @@ func ParseAutonomousDatabaseID(input string) (*AutonomousDatabaseId, error) { } id := AutonomousDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutonomousDatabaseIDInsensitively(input string) (*AutonomousDatabaseId } id := AutonomousDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabasebackup.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabasebackup.go index 57cf278d0d7..a89d66811d7 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabasebackup.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/id_autonomousdatabasebackup.go @@ -44,7 +44,7 @@ func ParseAutonomousDatabaseBackupID(input string) (*AutonomousDatabaseBackupId, } id := AutonomousDatabaseBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutonomousDatabaseBackupIDInsensitively(input string) (*AutonomousData } id := AutonomousDatabaseBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/method_get.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/method_get.go index ea57ba70411..57459c26d22 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/method_get.go @@ -45,7 +45,6 @@ func (c AutonomousDatabaseBackupsClient) Get(ctx context.Context, id AutonomousD var model AutonomousDatabaseBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/version.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/version.go index 3c5e45d7b47..461a301d808 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/version.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasebackups/version.go @@ -1,12 +1,10 @@ package autonomousdatabasebackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autonomousdatabasebackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autonomousdatabasebackups/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/README.md b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/README.md index ad086f941b1..b897909b004 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/README.md +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets` Documentation -The `autonomousdatabasecharactersets` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `autonomousdatabasecharactersets` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/client.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/client.go index ef4620ad838..9ce4a4fa357 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/client.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/client.go @@ -15,7 +15,7 @@ type AutonomousDatabaseCharacterSetsClient struct { } func NewAutonomousDatabaseCharacterSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutonomousDatabaseCharacterSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autonomousdatabasecharactersets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autonomousdatabasecharactersets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutonomousDatabaseCharacterSetsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_autonomousdatabasecharacterset.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_autonomousdatabasecharacterset.go index b9ac00fb4fe..64f2c657840 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_autonomousdatabasecharacterset.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_autonomousdatabasecharacterset.go @@ -42,7 +42,7 @@ func ParseAutonomousDatabaseCharacterSetID(input string) (*AutonomousDatabaseCha } id := AutonomousDatabaseCharacterSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutonomousDatabaseCharacterSetIDInsensitively(input string) (*Autonomo } id := AutonomousDatabaseCharacterSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_location.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_location.go index 54fb13304a4..ac0230494e2 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/method_get.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/method_get.go index e372685113d..a221ce4e867 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/method_get.go @@ -45,7 +45,6 @@ func (c AutonomousDatabaseCharacterSetsClient) Get(ctx context.Context, id Auton var model AutonomousDatabaseCharacterSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/version.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/version.go index 308cf174055..59b6beb7132 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/version.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasecharactersets/version.go @@ -1,12 +1,10 @@ package autonomousdatabasecharactersets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autonomousdatabasecharactersets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autonomousdatabasecharactersets/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/README.md b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/README.md index eb59131ad18..e8acb70609a 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/README.md +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets` Documentation -The `autonomousdatabasenationalcharactersets` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `autonomousdatabasenationalcharactersets` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/client.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/client.go index 0d61e0105a1..a02efac62b7 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/client.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/client.go @@ -15,7 +15,7 @@ type AutonomousDatabaseNationalCharacterSetsClient struct { } func NewAutonomousDatabaseNationalCharacterSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutonomousDatabaseNationalCharacterSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autonomousdatabasenationalcharactersets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autonomousdatabasenationalcharactersets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutonomousDatabaseNationalCharacterSetsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_autonomousdatabasenationalcharacterset.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_autonomousdatabasenationalcharacterset.go index 62990b24a8a..8a0c058ff0a 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_autonomousdatabasenationalcharacterset.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_autonomousdatabasenationalcharacterset.go @@ -42,7 +42,7 @@ func ParseAutonomousDatabaseNationalCharacterSetID(input string) (*AutonomousDat } id := AutonomousDatabaseNationalCharacterSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutonomousDatabaseNationalCharacterSetIDInsensitively(input string) (* } id := AutonomousDatabaseNationalCharacterSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_location.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_location.go index d4c5968ec0d..0a94aa6f4ce 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/method_get.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/method_get.go index f4ec84c1380..363ea0b0a5a 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/method_get.go @@ -45,7 +45,6 @@ func (c AutonomousDatabaseNationalCharacterSetsClient) Get(ctx context.Context, var model AutonomousDatabaseNationalCharacterSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/version.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/version.go index 1be761ae3ed..edda0b2b3b4 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/version.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabasenationalcharactersets/version.go @@ -1,12 +1,10 @@ package autonomousdatabasenationalcharactersets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autonomousdatabasenationalcharactersets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autonomousdatabasenationalcharactersets/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/README.md b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/README.md index 21610575ab1..c5a09b09ad4 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/README.md +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/autonomousdatabases` Documentation -The `autonomousdatabases` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `autonomousdatabases` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/client.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/client.go index d9e2e2e1096..1e8755ba76c 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/client.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/client.go @@ -15,7 +15,7 @@ type AutonomousDatabasesClient struct { } func NewAutonomousDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutonomousDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autonomousdatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autonomousdatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutonomousDatabasesClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/id_autonomousdatabase.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/id_autonomousdatabase.go index 3bc8c7eb375..38866d70b63 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/id_autonomousdatabase.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/id_autonomousdatabase.go @@ -42,7 +42,7 @@ func ParseAutonomousDatabaseID(input string) (*AutonomousDatabaseId, error) { } id := AutonomousDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutonomousDatabaseIDInsensitively(input string) (*AutonomousDatabaseId } id := AutonomousDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_generatewallet.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_generatewallet.go index 009eacf5521..0c49da12ec8 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_generatewallet.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_generatewallet.go @@ -50,7 +50,6 @@ func (c AutonomousDatabasesClient) GenerateWallet(ctx context.Context, id Autono var model AutonomousDatabaseWalletFile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_get.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_get.go index c95b6d3808a..048934eeb4e 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/method_get.go @@ -45,7 +45,6 @@ func (c AutonomousDatabasesClient) Get(ctx context.Context, id AutonomousDatabas var model AutonomousDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabase.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabase.go index b30cc01b078..b16333e065d 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabase.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabase.go @@ -42,7 +42,7 @@ func (s *AutonomousDatabase) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAutonomousDatabaseBasePropertiesImplementation(v) + impl, err := UnmarshalAutonomousDatabaseBasePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'AutonomousDatabase': %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasebaseproperties.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasebaseproperties.go index 90c25e5dff6..275e18f6ab6 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasebaseproperties.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasebaseproperties.go @@ -10,18 +10,109 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutonomousDatabaseBaseProperties interface { + AutonomousDatabaseBaseProperties() BaseAutonomousDatabaseBasePropertiesImpl } -// RawAutonomousDatabaseBasePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutonomousDatabaseBaseProperties = BaseAutonomousDatabaseBasePropertiesImpl{} + +type BaseAutonomousDatabaseBasePropertiesImpl struct { + ActualUsedDataStorageSizeInTbs *float64 `json:"actualUsedDataStorageSizeInTbs,omitempty"` + AdminPassword *string `json:"adminPassword,omitempty"` + AllocatedStorageSizeInTbs *float64 `json:"allocatedStorageSizeInTbs,omitempty"` + ApexDetails *ApexDetailsType `json:"apexDetails,omitempty"` + AutonomousDatabaseId *string `json:"autonomousDatabaseId,omitempty"` + AutonomousMaintenanceScheduleType *AutonomousMaintenanceScheduleType `json:"autonomousMaintenanceScheduleType,omitempty"` + AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` + BackupRetentionPeriodInDays *int64 `json:"backupRetentionPeriodInDays,omitempty"` + CharacterSet *string `json:"characterSet,omitempty"` + ComputeCount *float64 `json:"computeCount,omitempty"` + ComputeModel *ComputeModel `json:"computeModel,omitempty"` + ConnectionStrings *ConnectionStringType `json:"connectionStrings,omitempty"` + ConnectionUrls *ConnectionUrlType `json:"connectionUrls,omitempty"` + CpuCoreCount *int64 `json:"cpuCoreCount,omitempty"` + CustomerContacts *[]CustomerContact `json:"customerContacts,omitempty"` + DataBaseType DataBaseType `json:"dataBaseType"` + DataSafeStatus *DataSafeStatusType `json:"dataSafeStatus,omitempty"` + DataStorageSizeInGbs *int64 `json:"dataStorageSizeInGbs,omitempty"` + DataStorageSizeInTbs *int64 `json:"dataStorageSizeInTbs,omitempty"` + DatabaseEdition *DatabaseEditionType `json:"databaseEdition,omitempty"` + DbVersion *string `json:"dbVersion,omitempty"` + DbWorkload *WorkloadType `json:"dbWorkload,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + FailedDataRecoveryInSeconds *int64 `json:"failedDataRecoveryInSeconds,omitempty"` + InMemoryAreaInGbs *int64 `json:"inMemoryAreaInGbs,omitempty"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled,omitempty"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled,omitempty"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled,omitempty"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired,omitempty"` + IsPreview *bool `json:"isPreview,omitempty"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted,omitempty"` + IsRemoteDataGuardEnabled *bool `json:"isRemoteDataGuardEnabled,omitempty"` + LicenseModel *LicenseModel `json:"licenseModel,omitempty"` + LifecycleDetails *string `json:"lifecycleDetails,omitempty"` + LifecycleState *AutonomousDatabaseLifecycleState `json:"lifecycleState,omitempty"` + LocalAdgAutoFailoverMaxDataLossLimit *int64 `json:"localAdgAutoFailoverMaxDataLossLimit,omitempty"` + LocalDisasterRecoveryType *DisasterRecoveryType `json:"localDisasterRecoveryType,omitempty"` + LocalStandbyDb *AutonomousDatabaseStandbySummary `json:"localStandbyDb,omitempty"` + LongTermBackupSchedule *LongTermBackUpScheduleDetails `json:"longTermBackupSchedule,omitempty"` + MemoryPerOracleComputeUnitInGbs *int64 `json:"memoryPerOracleComputeUnitInGbs,omitempty"` + NcharacterSet *string `json:"ncharacterSet,omitempty"` + NextLongTermBackupTimeStamp *string `json:"nextLongTermBackupTimeStamp,omitempty"` + OciUrl *string `json:"ociUrl,omitempty"` + Ocid *string `json:"ocid,omitempty"` + OpenMode *OpenModeType `json:"openMode,omitempty"` + OperationsInsightsStatus *OperationsInsightsStatusType `json:"operationsInsightsStatus,omitempty"` + PeerDbId *string `json:"peerDbId,omitempty"` + PeerDbIds *[]string `json:"peerDbIds,omitempty"` + PermissionLevel *PermissionLevelType `json:"permissionLevel,omitempty"` + PrivateEndpoint *string `json:"privateEndpoint,omitempty"` + PrivateEndpointIP *string `json:"privateEndpointIp,omitempty"` + PrivateEndpointLabel *string `json:"privateEndpointLabel,omitempty"` + ProvisionableCPUs *[]int64 `json:"provisionableCpus,omitempty"` + ProvisioningState *AzureResourceProvisioningState `json:"provisioningState,omitempty"` + Role *RoleType `json:"role,omitempty"` + ScheduledOperations *ScheduledOperationsType `json:"scheduledOperations,omitempty"` + ServiceConsoleUrl *string `json:"serviceConsoleUrl,omitempty"` + SqlWebDeveloperUrl *string `json:"sqlWebDeveloperUrl,omitempty"` + SubnetId *string `json:"subnetId,omitempty"` + SupportedRegionsToCloneTo *[]string `json:"supportedRegionsToCloneTo,omitempty"` + TimeCreated *string `json:"timeCreated,omitempty"` + TimeDataGuardRoleChanged *string `json:"timeDataGuardRoleChanged,omitempty"` + TimeDeletionOfFreeAutonomousDatabase *string `json:"timeDeletionOfFreeAutonomousDatabase,omitempty"` + TimeLocalDataGuardEnabled *string `json:"timeLocalDataGuardEnabled,omitempty"` + TimeMaintenanceBegin *string `json:"timeMaintenanceBegin,omitempty"` + TimeMaintenanceEnd *string `json:"timeMaintenanceEnd,omitempty"` + TimeOfLastFailover *string `json:"timeOfLastFailover,omitempty"` + TimeOfLastRefresh *string `json:"timeOfLastRefresh,omitempty"` + TimeOfLastRefreshPoint *string `json:"timeOfLastRefreshPoint,omitempty"` + TimeOfLastSwitchover *string `json:"timeOfLastSwitchover,omitempty"` + TimeReclamationOfFreeAutonomousDatabase *string `json:"timeReclamationOfFreeAutonomousDatabase,omitempty"` + UsedDataStorageSizeInGbs *int64 `json:"usedDataStorageSizeInGbs,omitempty"` + UsedDataStorageSizeInTbs *int64 `json:"usedDataStorageSizeInTbs,omitempty"` + VnetId *string `json:"vnetId,omitempty"` + WhitelistedIPs *[]string `json:"whitelistedIps,omitempty"` +} + +func (s BaseAutonomousDatabaseBasePropertiesImpl) AutonomousDatabaseBaseProperties() BaseAutonomousDatabaseBasePropertiesImpl { + return s +} + +var _ AutonomousDatabaseBaseProperties = RawAutonomousDatabaseBasePropertiesImpl{} + +// RawAutonomousDatabaseBasePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutonomousDatabaseBasePropertiesImpl struct { - Type string - Values map[string]interface{} + autonomousDatabaseBaseProperties BaseAutonomousDatabaseBasePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawAutonomousDatabaseBasePropertiesImpl) AutonomousDatabaseBaseProperties() BaseAutonomousDatabaseBasePropertiesImpl { + return s.autonomousDatabaseBaseProperties } -func unmarshalAutonomousDatabaseBasePropertiesImplementation(input []byte) (AutonomousDatabaseBaseProperties, error) { +func UnmarshalAutonomousDatabaseBasePropertiesImplementation(input []byte) (AutonomousDatabaseBaseProperties, error) { if input == nil { return nil, nil } @@ -52,10 +143,15 @@ func unmarshalAutonomousDatabaseBasePropertiesImplementation(input []byte) (Auto return out, nil } - out := RawAutonomousDatabaseBasePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseAutonomousDatabaseBasePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutonomousDatabaseBasePropertiesImpl: %+v", err) } - return out, nil + + return RawAutonomousDatabaseBasePropertiesImpl{ + autonomousDatabaseBaseProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasecloneproperties.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasecloneproperties.go index 5b5fd9fdbe9..09c3df885cb 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasecloneproperties.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabasecloneproperties.go @@ -24,6 +24,7 @@ type AutonomousDatabaseCloneProperties struct { TimeUntilReconnectCloneEnabled *string `json:"timeUntilReconnectCloneEnabled,omitempty"` // Fields inherited from AutonomousDatabaseBaseProperties + ActualUsedDataStorageSizeInTbs *float64 `json:"actualUsedDataStorageSizeInTbs,omitempty"` AdminPassword *string `json:"adminPassword,omitempty"` AllocatedStorageSizeInTbs *float64 `json:"allocatedStorageSizeInTbs,omitempty"` @@ -39,6 +40,7 @@ type AutonomousDatabaseCloneProperties struct { ConnectionUrls *ConnectionUrlType `json:"connectionUrls,omitempty"` CpuCoreCount *int64 `json:"cpuCoreCount,omitempty"` CustomerContacts *[]CustomerContact `json:"customerContacts,omitempty"` + DataBaseType DataBaseType `json:"dataBaseType"` DataSafeStatus *DataSafeStatusType `json:"dataSafeStatus,omitempty"` DataStorageSizeInGbs *int64 `json:"dataStorageSizeInGbs,omitempty"` DataStorageSizeInTbs *int64 `json:"dataStorageSizeInTbs,omitempty"` @@ -100,6 +102,86 @@ type AutonomousDatabaseCloneProperties struct { WhitelistedIPs *[]string `json:"whitelistedIps,omitempty"` } +func (s AutonomousDatabaseCloneProperties) AutonomousDatabaseBaseProperties() BaseAutonomousDatabaseBasePropertiesImpl { + return BaseAutonomousDatabaseBasePropertiesImpl{ + ActualUsedDataStorageSizeInTbs: s.ActualUsedDataStorageSizeInTbs, + AdminPassword: s.AdminPassword, + AllocatedStorageSizeInTbs: s.AllocatedStorageSizeInTbs, + ApexDetails: s.ApexDetails, + AutonomousDatabaseId: s.AutonomousDatabaseId, + AutonomousMaintenanceScheduleType: s.AutonomousMaintenanceScheduleType, + AvailableUpgradeVersions: s.AvailableUpgradeVersions, + BackupRetentionPeriodInDays: s.BackupRetentionPeriodInDays, + CharacterSet: s.CharacterSet, + ComputeCount: s.ComputeCount, + ComputeModel: s.ComputeModel, + ConnectionStrings: s.ConnectionStrings, + ConnectionUrls: s.ConnectionUrls, + CpuCoreCount: s.CpuCoreCount, + CustomerContacts: s.CustomerContacts, + DataBaseType: s.DataBaseType, + DataSafeStatus: s.DataSafeStatus, + DataStorageSizeInGbs: s.DataStorageSizeInGbs, + DataStorageSizeInTbs: s.DataStorageSizeInTbs, + DatabaseEdition: s.DatabaseEdition, + DbVersion: s.DbVersion, + DbWorkload: s.DbWorkload, + DisplayName: s.DisplayName, + FailedDataRecoveryInSeconds: s.FailedDataRecoveryInSeconds, + InMemoryAreaInGbs: s.InMemoryAreaInGbs, + IsAutoScalingEnabled: s.IsAutoScalingEnabled, + IsAutoScalingForStorageEnabled: s.IsAutoScalingForStorageEnabled, + IsLocalDataGuardEnabled: s.IsLocalDataGuardEnabled, + IsMtlsConnectionRequired: s.IsMtlsConnectionRequired, + IsPreview: s.IsPreview, + IsPreviewVersionWithServiceTermsAccepted: s.IsPreviewVersionWithServiceTermsAccepted, + IsRemoteDataGuardEnabled: s.IsRemoteDataGuardEnabled, + LicenseModel: s.LicenseModel, + LifecycleDetails: s.LifecycleDetails, + LifecycleState: s.LifecycleState, + LocalAdgAutoFailoverMaxDataLossLimit: s.LocalAdgAutoFailoverMaxDataLossLimit, + LocalDisasterRecoveryType: s.LocalDisasterRecoveryType, + LocalStandbyDb: s.LocalStandbyDb, + LongTermBackupSchedule: s.LongTermBackupSchedule, + MemoryPerOracleComputeUnitInGbs: s.MemoryPerOracleComputeUnitInGbs, + NcharacterSet: s.NcharacterSet, + NextLongTermBackupTimeStamp: s.NextLongTermBackupTimeStamp, + OciUrl: s.OciUrl, + Ocid: s.Ocid, + OpenMode: s.OpenMode, + OperationsInsightsStatus: s.OperationsInsightsStatus, + PeerDbId: s.PeerDbId, + PeerDbIds: s.PeerDbIds, + PermissionLevel: s.PermissionLevel, + PrivateEndpoint: s.PrivateEndpoint, + PrivateEndpointIP: s.PrivateEndpointIP, + PrivateEndpointLabel: s.PrivateEndpointLabel, + ProvisionableCPUs: s.ProvisionableCPUs, + ProvisioningState: s.ProvisioningState, + Role: s.Role, + ScheduledOperations: s.ScheduledOperations, + ServiceConsoleUrl: s.ServiceConsoleUrl, + SqlWebDeveloperUrl: s.SqlWebDeveloperUrl, + SubnetId: s.SubnetId, + SupportedRegionsToCloneTo: s.SupportedRegionsToCloneTo, + TimeCreated: s.TimeCreated, + TimeDataGuardRoleChanged: s.TimeDataGuardRoleChanged, + TimeDeletionOfFreeAutonomousDatabase: s.TimeDeletionOfFreeAutonomousDatabase, + TimeLocalDataGuardEnabled: s.TimeLocalDataGuardEnabled, + TimeMaintenanceBegin: s.TimeMaintenanceBegin, + TimeMaintenanceEnd: s.TimeMaintenanceEnd, + TimeOfLastFailover: s.TimeOfLastFailover, + TimeOfLastRefresh: s.TimeOfLastRefresh, + TimeOfLastRefreshPoint: s.TimeOfLastRefreshPoint, + TimeOfLastSwitchover: s.TimeOfLastSwitchover, + TimeReclamationOfFreeAutonomousDatabase: s.TimeReclamationOfFreeAutonomousDatabase, + UsedDataStorageSizeInGbs: s.UsedDataStorageSizeInGbs, + UsedDataStorageSizeInTbs: s.UsedDataStorageSizeInTbs, + VnetId: s.VnetId, + WhitelistedIPs: s.WhitelistedIPs, + } +} + func (o *AutonomousDatabaseCloneProperties) GetNextLongTermBackupTimeStampAsTime() (*time.Time, error) { if o.NextLongTermBackupTimeStamp == nil { return nil, nil @@ -159,9 +241,10 @@ func (s AutonomousDatabaseCloneProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutonomousDatabaseCloneProperties: %+v", err) } + decoded["dataBaseType"] = "Clone" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabaseproperties.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabaseproperties.go index 9a10d4134bc..5b9491f4107 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabaseproperties.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/model_autonomousdatabaseproperties.go @@ -16,6 +16,7 @@ var _ AutonomousDatabaseBaseProperties = AutonomousDatabaseProperties{} type AutonomousDatabaseProperties struct { // Fields inherited from AutonomousDatabaseBaseProperties + ActualUsedDataStorageSizeInTbs *float64 `json:"actualUsedDataStorageSizeInTbs,omitempty"` AdminPassword *string `json:"adminPassword,omitempty"` AllocatedStorageSizeInTbs *float64 `json:"allocatedStorageSizeInTbs,omitempty"` @@ -31,6 +32,7 @@ type AutonomousDatabaseProperties struct { ConnectionUrls *ConnectionUrlType `json:"connectionUrls,omitempty"` CpuCoreCount *int64 `json:"cpuCoreCount,omitempty"` CustomerContacts *[]CustomerContact `json:"customerContacts,omitempty"` + DataBaseType DataBaseType `json:"dataBaseType"` DataSafeStatus *DataSafeStatusType `json:"dataSafeStatus,omitempty"` DataStorageSizeInGbs *int64 `json:"dataStorageSizeInGbs,omitempty"` DataStorageSizeInTbs *int64 `json:"dataStorageSizeInTbs,omitempty"` @@ -92,6 +94,86 @@ type AutonomousDatabaseProperties struct { WhitelistedIPs *[]string `json:"whitelistedIps,omitempty"` } +func (s AutonomousDatabaseProperties) AutonomousDatabaseBaseProperties() BaseAutonomousDatabaseBasePropertiesImpl { + return BaseAutonomousDatabaseBasePropertiesImpl{ + ActualUsedDataStorageSizeInTbs: s.ActualUsedDataStorageSizeInTbs, + AdminPassword: s.AdminPassword, + AllocatedStorageSizeInTbs: s.AllocatedStorageSizeInTbs, + ApexDetails: s.ApexDetails, + AutonomousDatabaseId: s.AutonomousDatabaseId, + AutonomousMaintenanceScheduleType: s.AutonomousMaintenanceScheduleType, + AvailableUpgradeVersions: s.AvailableUpgradeVersions, + BackupRetentionPeriodInDays: s.BackupRetentionPeriodInDays, + CharacterSet: s.CharacterSet, + ComputeCount: s.ComputeCount, + ComputeModel: s.ComputeModel, + ConnectionStrings: s.ConnectionStrings, + ConnectionUrls: s.ConnectionUrls, + CpuCoreCount: s.CpuCoreCount, + CustomerContacts: s.CustomerContacts, + DataBaseType: s.DataBaseType, + DataSafeStatus: s.DataSafeStatus, + DataStorageSizeInGbs: s.DataStorageSizeInGbs, + DataStorageSizeInTbs: s.DataStorageSizeInTbs, + DatabaseEdition: s.DatabaseEdition, + DbVersion: s.DbVersion, + DbWorkload: s.DbWorkload, + DisplayName: s.DisplayName, + FailedDataRecoveryInSeconds: s.FailedDataRecoveryInSeconds, + InMemoryAreaInGbs: s.InMemoryAreaInGbs, + IsAutoScalingEnabled: s.IsAutoScalingEnabled, + IsAutoScalingForStorageEnabled: s.IsAutoScalingForStorageEnabled, + IsLocalDataGuardEnabled: s.IsLocalDataGuardEnabled, + IsMtlsConnectionRequired: s.IsMtlsConnectionRequired, + IsPreview: s.IsPreview, + IsPreviewVersionWithServiceTermsAccepted: s.IsPreviewVersionWithServiceTermsAccepted, + IsRemoteDataGuardEnabled: s.IsRemoteDataGuardEnabled, + LicenseModel: s.LicenseModel, + LifecycleDetails: s.LifecycleDetails, + LifecycleState: s.LifecycleState, + LocalAdgAutoFailoverMaxDataLossLimit: s.LocalAdgAutoFailoverMaxDataLossLimit, + LocalDisasterRecoveryType: s.LocalDisasterRecoveryType, + LocalStandbyDb: s.LocalStandbyDb, + LongTermBackupSchedule: s.LongTermBackupSchedule, + MemoryPerOracleComputeUnitInGbs: s.MemoryPerOracleComputeUnitInGbs, + NcharacterSet: s.NcharacterSet, + NextLongTermBackupTimeStamp: s.NextLongTermBackupTimeStamp, + OciUrl: s.OciUrl, + Ocid: s.Ocid, + OpenMode: s.OpenMode, + OperationsInsightsStatus: s.OperationsInsightsStatus, + PeerDbId: s.PeerDbId, + PeerDbIds: s.PeerDbIds, + PermissionLevel: s.PermissionLevel, + PrivateEndpoint: s.PrivateEndpoint, + PrivateEndpointIP: s.PrivateEndpointIP, + PrivateEndpointLabel: s.PrivateEndpointLabel, + ProvisionableCPUs: s.ProvisionableCPUs, + ProvisioningState: s.ProvisioningState, + Role: s.Role, + ScheduledOperations: s.ScheduledOperations, + ServiceConsoleUrl: s.ServiceConsoleUrl, + SqlWebDeveloperUrl: s.SqlWebDeveloperUrl, + SubnetId: s.SubnetId, + SupportedRegionsToCloneTo: s.SupportedRegionsToCloneTo, + TimeCreated: s.TimeCreated, + TimeDataGuardRoleChanged: s.TimeDataGuardRoleChanged, + TimeDeletionOfFreeAutonomousDatabase: s.TimeDeletionOfFreeAutonomousDatabase, + TimeLocalDataGuardEnabled: s.TimeLocalDataGuardEnabled, + TimeMaintenanceBegin: s.TimeMaintenanceBegin, + TimeMaintenanceEnd: s.TimeMaintenanceEnd, + TimeOfLastFailover: s.TimeOfLastFailover, + TimeOfLastRefresh: s.TimeOfLastRefresh, + TimeOfLastRefreshPoint: s.TimeOfLastRefreshPoint, + TimeOfLastSwitchover: s.TimeOfLastSwitchover, + TimeReclamationOfFreeAutonomousDatabase: s.TimeReclamationOfFreeAutonomousDatabase, + UsedDataStorageSizeInGbs: s.UsedDataStorageSizeInGbs, + UsedDataStorageSizeInTbs: s.UsedDataStorageSizeInTbs, + VnetId: s.VnetId, + WhitelistedIPs: s.WhitelistedIPs, + } +} + func (o *AutonomousDatabaseProperties) GetNextLongTermBackupTimeStampAsTime() (*time.Time, error) { if o.NextLongTermBackupTimeStamp == nil { return nil, nil @@ -151,9 +233,10 @@ func (s AutonomousDatabaseProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutonomousDatabaseProperties: %+v", err) } + decoded["dataBaseType"] = "Regular" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/version.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/version.go index bb55880a3d8..d25c25aa38b 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/version.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabases/version.go @@ -1,12 +1,10 @@ package autonomousdatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autonomousdatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autonomousdatabases/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/README.md b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/README.md index 0dab6f05679..b48fe23192d 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/README.md +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions` Documentation -The `autonomousdatabaseversions` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `autonomousdatabaseversions` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/client.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/client.go index a456628fcc0..3325a3c3154 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/client.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/client.go @@ -15,7 +15,7 @@ type AutonomousDatabaseVersionsClient struct { } func NewAutonomousDatabaseVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutonomousDatabaseVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autonomousdatabaseversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autonomousdatabaseversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutonomousDatabaseVersionsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_autonomousdbversion.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_autonomousdbversion.go index ea983d4be6e..05010cb8bec 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_autonomousdbversion.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_autonomousdbversion.go @@ -42,7 +42,7 @@ func ParseAutonomousDbVersionID(input string) (*AutonomousDbVersionId, error) { } id := AutonomousDbVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutonomousDbVersionIDInsensitively(input string) (*AutonomousDbVersion } id := AutonomousDbVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_location.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_location.go index 9f10f98bb92..343511e3a93 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/method_get.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/method_get.go index 1e73740c6d8..33a2e2933ed 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/method_get.go @@ -45,7 +45,6 @@ func (c AutonomousDatabaseVersionsClient) Get(ctx context.Context, id Autonomous var model AutonomousDbVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/version.go b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/version.go index b4c1d6d8dfe..1bb60856338 100644 --- a/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/version.go +++ b/resource-manager/oracledatabase/2024-06-01/autonomousdatabaseversions/version.go @@ -1,12 +1,10 @@ package autonomousdatabaseversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autonomousdatabaseversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autonomousdatabaseversions/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/README.md b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/README.md index dcf8b7af55a..f1333526bfd 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/README.md +++ b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures` Documentation -The `cloudexadatainfrastructures` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `cloudexadatainfrastructures` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/client.go b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/client.go index 8c55d2b0aa5..b730c46ae8b 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/client.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/client.go @@ -15,7 +15,7 @@ type CloudExadataInfrastructuresClient struct { } func NewCloudExadataInfrastructuresClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudExadataInfrastructuresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudexadatainfrastructures", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudexadatainfrastructures", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudExadataInfrastructuresClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/id_cloudexadatainfrastructure.go b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/id_cloudexadatainfrastructure.go index 64edbb20ca1..35ef4d56558 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/id_cloudexadatainfrastructure.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/id_cloudexadatainfrastructure.go @@ -42,7 +42,7 @@ func ParseCloudExadataInfrastructureID(input string) (*CloudExadataInfrastructur } id := CloudExadataInfrastructureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudExadataInfrastructureIDInsensitively(input string) (*CloudExadata } id := CloudExadataInfrastructureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/method_get.go b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/method_get.go index f4c9c8b4e21..fc119da3dd9 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/method_get.go @@ -45,7 +45,6 @@ func (c CloudExadataInfrastructuresClient) Get(ctx context.Context, id CloudExad var model CloudExadataInfrastructure result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/version.go b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/version.go index 5296ca89a86..a0c5358b422 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/version.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudexadatainfrastructures/version.go @@ -1,12 +1,10 @@ package cloudexadatainfrastructures -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudexadatainfrastructures/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudexadatainfrastructures/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/README.md b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/README.md index 408b369e0f2..5a6f3500982 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/README.md +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/cloudvmclusters` Documentation -The `cloudvmclusters` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `cloudvmclusters` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/client.go b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/client.go index 7bc1de89393..8686d91ee78 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/client.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/client.go @@ -15,7 +15,7 @@ type CloudVMClustersClient struct { } func NewCloudVMClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudVMClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudvmclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudvmclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudVMClustersClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/id_cloudvmcluster.go b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/id_cloudvmcluster.go index 1398a3825d3..07aeebfaf45 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/id_cloudvmcluster.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/id_cloudvmcluster.go @@ -42,7 +42,7 @@ func ParseCloudVMClusterID(input string) (*CloudVMClusterId, error) { } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudVMClusterIDInsensitively(input string) (*CloudVMClusterId, error) } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_get.go b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_get.go index 3b1646ab44c..c12e2449311 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_get.go @@ -45,7 +45,6 @@ func (c CloudVMClustersClient) Get(ctx context.Context, id CloudVMClusterId) (re var model CloudVMCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_listprivateipaddresses.go b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_listprivateipaddresses.go index d0a7fbe2ebb..3cb61c58437 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_listprivateipaddresses.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/method_listprivateipaddresses.go @@ -50,7 +50,6 @@ func (c CloudVMClustersClient) ListPrivateIPAddresses(ctx context.Context, id Cl var model []PrivateIPAddressProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/version.go b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/version.go index 75e614772c8..22b5c23989e 100644 --- a/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/version.go +++ b/resource-manager/oracledatabase/2024-06-01/cloudvmclusters/version.go @@ -1,12 +1,10 @@ package cloudvmclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudvmclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudvmclusters/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/README.md b/resource-manager/oracledatabase/2024-06-01/dbnodes/README.md index 8969a93de41..ae61abe0603 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/README.md +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/dbnodes` Documentation -The `dbnodes` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `dbnodes` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/client.go b/resource-manager/oracledatabase/2024-06-01/dbnodes/client.go index ad2d02fbb1f..bce691a3f42 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/client.go +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/client.go @@ -15,7 +15,7 @@ type DbNodesClient struct { } func NewDbNodesClientWithBaseURI(sdkApi sdkEnv.Api) (*DbNodesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dbnodes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dbnodes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DbNodesClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/id_cloudvmcluster.go b/resource-manager/oracledatabase/2024-06-01/dbnodes/id_cloudvmcluster.go index 0b78088cce5..625efaf71ac 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/id_cloudvmcluster.go +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/id_cloudvmcluster.go @@ -42,7 +42,7 @@ func ParseCloudVMClusterID(input string) (*CloudVMClusterId, error) { } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudVMClusterIDInsensitively(input string) (*CloudVMClusterId, error) } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/id_dbnode.go b/resource-manager/oracledatabase/2024-06-01/dbnodes/id_dbnode.go index e8422bcdfc8..f3e3fba33a2 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/id_dbnode.go +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/id_dbnode.go @@ -44,7 +44,7 @@ func ParseDbNodeID(input string) (*DbNodeId, error) { } id := DbNodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDbNodeIDInsensitively(input string) (*DbNodeId, error) { } id := DbNodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/method_get.go b/resource-manager/oracledatabase/2024-06-01/dbnodes/method_get.go index 04a52627245..eeac598cb9c 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/method_get.go @@ -45,7 +45,6 @@ func (c DbNodesClient) Get(ctx context.Context, id DbNodeId) (result GetOperatio var model DbNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/dbnodes/version.go b/resource-manager/oracledatabase/2024-06-01/dbnodes/version.go index 9e4fa8962fb..499e439e019 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbnodes/version.go +++ b/resource-manager/oracledatabase/2024-06-01/dbnodes/version.go @@ -1,12 +1,10 @@ package dbnodes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dbnodes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dbnodes/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/README.md b/resource-manager/oracledatabase/2024-06-01/dbservers/README.md index d49cab85097..84cecc2d170 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/README.md +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/dbservers` Documentation -The `dbservers` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `dbservers` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/client.go b/resource-manager/oracledatabase/2024-06-01/dbservers/client.go index 76eb2495be8..29a4e148e48 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/client.go +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/client.go @@ -15,7 +15,7 @@ type DbServersClient struct { } func NewDbServersClientWithBaseURI(sdkApi sdkEnv.Api) (*DbServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dbservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dbservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DbServersClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/id_cloudexadatainfrastructure.go b/resource-manager/oracledatabase/2024-06-01/dbservers/id_cloudexadatainfrastructure.go index 3507447b71e..d73c6320bd4 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/id_cloudexadatainfrastructure.go +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/id_cloudexadatainfrastructure.go @@ -42,7 +42,7 @@ func ParseCloudExadataInfrastructureID(input string) (*CloudExadataInfrastructur } id := CloudExadataInfrastructureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudExadataInfrastructureIDInsensitively(input string) (*CloudExadata } id := CloudExadataInfrastructureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/id_dbserver.go b/resource-manager/oracledatabase/2024-06-01/dbservers/id_dbserver.go index 6fa4f9993f1..b69b9bae826 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/id_dbserver.go +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/id_dbserver.go @@ -44,7 +44,7 @@ func ParseDbServerID(input string) (*DbServerId, error) { } id := DbServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDbServerIDInsensitively(input string) (*DbServerId, error) { } id := DbServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/method_get.go b/resource-manager/oracledatabase/2024-06-01/dbservers/method_get.go index acb90a24d7e..2a0abdf7d6d 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/method_get.go @@ -45,7 +45,6 @@ func (c DbServersClient) Get(ctx context.Context, id DbServerId) (result GetOper var model DbServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/dbservers/version.go b/resource-manager/oracledatabase/2024-06-01/dbservers/version.go index f369bd54279..3bab629a73b 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbservers/version.go +++ b/resource-manager/oracledatabase/2024-06-01/dbservers/version.go @@ -1,12 +1,10 @@ package dbservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dbservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dbservers/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/README.md b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/README.md index 23f0eac9ceb..108f8a6fabd 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/README.md +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/dbsystemshapes` Documentation -The `dbsystemshapes` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `dbsystemshapes` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/client.go b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/client.go index 5b0f0522f52..82bf6b4be58 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/client.go +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/client.go @@ -15,7 +15,7 @@ type DbSystemShapesClient struct { } func NewDbSystemShapesClientWithBaseURI(sdkApi sdkEnv.Api) (*DbSystemShapesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dbsystemshapes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dbsystemshapes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DbSystemShapesClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_dbsystemshape.go b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_dbsystemshape.go index 759b456b8bb..8c382886fb4 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_dbsystemshape.go +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_dbsystemshape.go @@ -42,7 +42,7 @@ func ParseDbSystemShapeID(input string) (*DbSystemShapeId, error) { } id := DbSystemShapeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDbSystemShapeIDInsensitively(input string) (*DbSystemShapeId, error) { } id := DbSystemShapeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_location.go b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_location.go index fad455455f4..48756bf9cfa 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/method_get.go b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/method_get.go index fa82bf6c83c..3d30b9db9fc 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/method_get.go @@ -45,7 +45,6 @@ func (c DbSystemShapesClient) Get(ctx context.Context, id DbSystemShapeId) (resu var model DbSystemShape result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/version.go b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/version.go index 6fc51a3092b..9f5c5fd8545 100644 --- a/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/version.go +++ b/resource-manager/oracledatabase/2024-06-01/dbsystemshapes/version.go @@ -1,12 +1,10 @@ package dbsystemshapes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dbsystemshapes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dbsystemshapes/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/README.md b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/README.md index 36be3379489..b2781c689d0 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/README.md +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/dnsprivateviews` Documentation -The `dnsprivateviews` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `dnsprivateviews` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/client.go b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/client.go index 3c698794fc2..85e60c22dc9 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/client.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/client.go @@ -15,7 +15,7 @@ type DnsPrivateViewsClient struct { } func NewDnsPrivateViewsClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsPrivateViewsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dnsprivateviews", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dnsprivateviews", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DnsPrivateViewsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_dnsprivateview.go b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_dnsprivateview.go index 83ebdb07fc4..50823709ff4 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_dnsprivateview.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_dnsprivateview.go @@ -42,7 +42,7 @@ func ParseDnsPrivateViewID(input string) (*DnsPrivateViewId, error) { } id := DnsPrivateViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsPrivateViewIDInsensitively(input string) (*DnsPrivateViewId, error) } id := DnsPrivateViewId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_location.go b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_location.go index 15e9c47d19d..82542d0d198 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/method_get.go b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/method_get.go index 7caa55aa4b8..81ad40dd47f 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/method_get.go @@ -45,7 +45,6 @@ func (c DnsPrivateViewsClient) Get(ctx context.Context, id DnsPrivateViewId) (re var model DnsPrivateView result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/version.go b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/version.go index 6f15b75a621..59cdb15f804 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/version.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivateviews/version.go @@ -1,12 +1,10 @@ package dnsprivateviews -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dnsprivateviews/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dnsprivateviews/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/README.md b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/README.md index 26f284a66f6..493377eec79 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/README.md +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/dnsprivatezones` Documentation -The `dnsprivatezones` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `dnsprivatezones` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/client.go b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/client.go index 00a326391b3..5596628406e 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/client.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/client.go @@ -15,7 +15,7 @@ type DnsPrivateZonesClient struct { } func NewDnsPrivateZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsPrivateZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dnsprivatezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dnsprivatezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DnsPrivateZonesClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_dnsprivatezone.go b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_dnsprivatezone.go index bc16d28dc4f..5e31f23d112 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_dnsprivatezone.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_dnsprivatezone.go @@ -42,7 +42,7 @@ func ParseDnsPrivateZoneID(input string) (*DnsPrivateZoneId, error) { } id := DnsPrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDnsPrivateZoneIDInsensitively(input string) (*DnsPrivateZoneId, error) } id := DnsPrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_location.go b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_location.go index 75b18688608..69fb7570f90 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/method_get.go b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/method_get.go index 5dee2634a3d..87277d0e938 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/method_get.go @@ -45,7 +45,6 @@ func (c DnsPrivateZonesClient) Get(ctx context.Context, id DnsPrivateZoneId) (re var model DnsPrivateZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/version.go b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/version.go index c297b3ada65..0446e971c7c 100644 --- a/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/version.go +++ b/resource-manager/oracledatabase/2024-06-01/dnsprivatezones/version.go @@ -1,12 +1,10 @@ package dnsprivatezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dnsprivatezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dnsprivatezones/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/README.md b/resource-manager/oracledatabase/2024-06-01/giversions/README.md index aa7d3982745..4d6640b321f 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/README.md +++ b/resource-manager/oracledatabase/2024-06-01/giversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/giversions` Documentation -The `giversions` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `giversions` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/client.go b/resource-manager/oracledatabase/2024-06-01/giversions/client.go index 00d69beb1d9..a1da948c692 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/client.go +++ b/resource-manager/oracledatabase/2024-06-01/giversions/client.go @@ -15,7 +15,7 @@ type GiVersionsClient struct { } func NewGiVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GiVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "giversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "giversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GiVersionsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/id_giversion.go b/resource-manager/oracledatabase/2024-06-01/giversions/id_giversion.go index 50eccbc7815..22069bf633e 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/id_giversion.go +++ b/resource-manager/oracledatabase/2024-06-01/giversions/id_giversion.go @@ -42,7 +42,7 @@ func ParseGiVersionID(input string) (*GiVersionId, error) { } id := GiVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseGiVersionIDInsensitively(input string) (*GiVersionId, error) { } id := GiVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/id_location.go b/resource-manager/oracledatabase/2024-06-01/giversions/id_location.go index 610b7ef1906..5d0d831b072 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/giversions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/method_get.go b/resource-manager/oracledatabase/2024-06-01/giversions/method_get.go index 1a89493ad3d..57e20ced3e6 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/giversions/method_get.go @@ -45,7 +45,6 @@ func (c GiVersionsClient) Get(ctx context.Context, id GiVersionId) (result GetOp var model GiVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/giversions/version.go b/resource-manager/oracledatabase/2024-06-01/giversions/version.go index 36d335193b2..74b2ba1ffe0 100644 --- a/resource-manager/oracledatabase/2024-06-01/giversions/version.go +++ b/resource-manager/oracledatabase/2024-06-01/giversions/version.go @@ -1,12 +1,10 @@ package giversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/giversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/giversions/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/README.md b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/README.md index 09bef5af8ae..743f180b57a 100644 --- a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/README.md +++ b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions` Documentation -The `oraclesubscriptions` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `oraclesubscriptions` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/client.go b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/client.go index 0e7729cfc7b..d8c2438e5a2 100644 --- a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/client.go +++ b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/client.go @@ -15,7 +15,7 @@ type OracleSubscriptionsClient struct { } func NewOracleSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*OracleSubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "oraclesubscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "oraclesubscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OracleSubscriptionsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/method_get.go b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/method_get.go index 56033046138..9a0b6985637 100644 --- a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/method_get.go @@ -47,7 +47,6 @@ func (c OracleSubscriptionsClient) Get(ctx context.Context, id commonids.Subscri var model OracleSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/version.go b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/version.go index 57edceaa23b..0549bafa1ad 100644 --- a/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/version.go +++ b/resource-manager/oracledatabase/2024-06-01/oraclesubscriptions/version.go @@ -1,12 +1,10 @@ package oraclesubscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/oraclesubscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/oraclesubscriptions/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/README.md b/resource-manager/oracledatabase/2024-06-01/systemversions/README.md index ba327c9145f..b4e6c98bdbd 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/README.md +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/systemversions` Documentation -The `systemversions` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `systemversions` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/client.go b/resource-manager/oracledatabase/2024-06-01/systemversions/client.go index 964f6de60c1..d040a83694f 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/client.go +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/client.go @@ -15,7 +15,7 @@ type SystemVersionsClient struct { } func NewSystemVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SystemVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "systemversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "systemversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SystemVersionsClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/id_location.go b/resource-manager/oracledatabase/2024-06-01/systemversions/id_location.go index 522b02094c9..679d32e673d 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/id_location.go +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/id_systemversion.go b/resource-manager/oracledatabase/2024-06-01/systemversions/id_systemversion.go index 54af015e094..b08b39088d5 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/id_systemversion.go +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/id_systemversion.go @@ -42,7 +42,7 @@ func ParseSystemVersionID(input string) (*SystemVersionId, error) { } id := SystemVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSystemVersionIDInsensitively(input string) (*SystemVersionId, error) { } id := SystemVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/method_get.go b/resource-manager/oracledatabase/2024-06-01/systemversions/method_get.go index da328bb1b48..5c8b878c570 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/method_get.go @@ -45,7 +45,6 @@ func (c SystemVersionsClient) Get(ctx context.Context, id SystemVersionId) (resu var model SystemVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/systemversions/version.go b/resource-manager/oracledatabase/2024-06-01/systemversions/version.go index b0f8f194d46..7d3a2479432 100644 --- a/resource-manager/oracledatabase/2024-06-01/systemversions/version.go +++ b/resource-manager/oracledatabase/2024-06-01/systemversions/version.go @@ -1,12 +1,10 @@ package systemversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/systemversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/systemversions/2024-06-01" } diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/README.md b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/README.md index 5fd92c2eeff..e1ffeca4c54 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/README.md +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses` Documentation -The `virtualnetworkaddresses` SDK allows for interaction with the Azure Resource Manager Service `oracledatabase` (API Version `2024-06-01`). +The `virtualnetworkaddresses` SDK allows for interaction with Azure Resource Manager `oracledatabase` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/client.go b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/client.go index 6c8968525ed..9255f195dc4 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/client.go +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/client.go @@ -15,7 +15,7 @@ type VirtualNetworkAddressesClient struct { } func NewVirtualNetworkAddressesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkaddresses", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkaddresses", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkAddressesClient: %+v", err) } diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_cloudvmcluster.go b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_cloudvmcluster.go index e755134d59f..04f734957a1 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_cloudvmcluster.go +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_cloudvmcluster.go @@ -42,7 +42,7 @@ func ParseCloudVMClusterID(input string) (*CloudVMClusterId, error) { } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudVMClusterIDInsensitively(input string) (*CloudVMClusterId, error) } id := CloudVMClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_virtualnetworkaddress.go b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_virtualnetworkaddress.go index e49281decaa..f86c40afdd6 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_virtualnetworkaddress.go +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/id_virtualnetworkaddress.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkAddressID(input string) (*VirtualNetworkAddressId, error } id := VirtualNetworkAddressId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkAddressIDInsensitively(input string) (*VirtualNetworkAdd } id := VirtualNetworkAddressId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/method_get.go b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/method_get.go index 151f06223ee..7d79f265d19 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/method_get.go +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkAddressesClient) Get(ctx context.Context, id VirtualNetwor var model VirtualNetworkAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/version.go b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/version.go index 9b5dd6bad36..b0c754c2977 100644 --- a/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/version.go +++ b/resource-manager/oracledatabase/2024-06-01/virtualnetworkaddresses/version.go @@ -1,12 +1,10 @@ package virtualnetworkaddresses -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkaddresses/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkaddresses/2024-06-01" } diff --git a/resource-manager/orbital/2022-11-01/contact/README.md b/resource-manager/orbital/2022-11-01/contact/README.md index d3ae58ffa69..00afdea18ff 100644 --- a/resource-manager/orbital/2022-11-01/contact/README.md +++ b/resource-manager/orbital/2022-11-01/contact/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contact` Documentation -The `contact` SDK allows for interaction with the Azure Resource Manager Service `orbital` (API Version `2022-11-01`). +The `contact` SDK allows for interaction with Azure Resource Manager `orbital` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/orbital/2022-11-01/contact/client.go b/resource-manager/orbital/2022-11-01/contact/client.go index 06b7b8ac912..7f5630f5e97 100644 --- a/resource-manager/orbital/2022-11-01/contact/client.go +++ b/resource-manager/orbital/2022-11-01/contact/client.go @@ -15,7 +15,7 @@ type ContactClient struct { } func NewContactClientWithBaseURI(sdkApi sdkEnv.Api) (*ContactClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contact", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contact", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContactClient: %+v", err) } diff --git a/resource-manager/orbital/2022-11-01/contact/id_contact.go b/resource-manager/orbital/2022-11-01/contact/id_contact.go index 9fc5c6f4a8e..76a0d1c88f9 100644 --- a/resource-manager/orbital/2022-11-01/contact/id_contact.go +++ b/resource-manager/orbital/2022-11-01/contact/id_contact.go @@ -44,7 +44,7 @@ func ParseContactID(input string) (*ContactId, error) { } id := ContactId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContactIDInsensitively(input string) (*ContactId, error) { } id := ContactId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go b/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go index ddcc9d79f29..eb0c1aec990 100644 --- a/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go +++ b/resource-manager/orbital/2022-11-01/contact/id_spacecraft.go @@ -42,7 +42,7 @@ func ParseSpacecraftID(input string) (*SpacecraftId, error) { } id := SpacecraftId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSpacecraftIDInsensitively(input string) (*SpacecraftId, error) { } id := SpacecraftId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/orbital/2022-11-01/contact/method_get.go b/resource-manager/orbital/2022-11-01/contact/method_get.go index ca90eb24bbe..60f7237cf6d 100644 --- a/resource-manager/orbital/2022-11-01/contact/method_get.go +++ b/resource-manager/orbital/2022-11-01/contact/method_get.go @@ -45,7 +45,6 @@ func (c ContactClient) Get(ctx context.Context, id ContactId) (result GetOperati var model Contact result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/orbital/2022-11-01/contact/version.go b/resource-manager/orbital/2022-11-01/contact/version.go index ceec4d3407b..0d04fa59e92 100644 --- a/resource-manager/orbital/2022-11-01/contact/version.go +++ b/resource-manager/orbital/2022-11-01/contact/version.go @@ -1,12 +1,10 @@ package contact -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contact/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contact/2022-11-01" } diff --git a/resource-manager/orbital/2022-11-01/contactprofile/README.md b/resource-manager/orbital/2022-11-01/contactprofile/README.md index 46c157e1ef4..0c6fa9bcf7c 100644 --- a/resource-manager/orbital/2022-11-01/contactprofile/README.md +++ b/resource-manager/orbital/2022-11-01/contactprofile/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/contactprofile` Documentation -The `contactprofile` SDK allows for interaction with the Azure Resource Manager Service `orbital` (API Version `2022-11-01`). +The `contactprofile` SDK allows for interaction with Azure Resource Manager `orbital` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/orbital/2022-11-01/contactprofile/client.go b/resource-manager/orbital/2022-11-01/contactprofile/client.go index 30f4fccd005..b47d22f6fe2 100644 --- a/resource-manager/orbital/2022-11-01/contactprofile/client.go +++ b/resource-manager/orbital/2022-11-01/contactprofile/client.go @@ -15,7 +15,7 @@ type ContactProfileClient struct { } func NewContactProfileClientWithBaseURI(sdkApi sdkEnv.Api) (*ContactProfileClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contactprofile", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contactprofile", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContactProfileClient: %+v", err) } diff --git a/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go b/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go index 91276e3c483..7c13ed20e89 100644 --- a/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go +++ b/resource-manager/orbital/2022-11-01/contactprofile/id_contactprofile.go @@ -42,7 +42,7 @@ func ParseContactProfileID(input string) (*ContactProfileId, error) { } id := ContactProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseContactProfileIDInsensitively(input string) (*ContactProfileId, error) } id := ContactProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/orbital/2022-11-01/contactprofile/method_get.go b/resource-manager/orbital/2022-11-01/contactprofile/method_get.go index 7c6d60be8c7..179b3bb9d0a 100644 --- a/resource-manager/orbital/2022-11-01/contactprofile/method_get.go +++ b/resource-manager/orbital/2022-11-01/contactprofile/method_get.go @@ -45,7 +45,6 @@ func (c ContactProfileClient) Get(ctx context.Context, id ContactProfileId) (res var model ContactProfile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/orbital/2022-11-01/contactprofile/version.go b/resource-manager/orbital/2022-11-01/contactprofile/version.go index 2b4ad08b2af..d54559865a8 100644 --- a/resource-manager/orbital/2022-11-01/contactprofile/version.go +++ b/resource-manager/orbital/2022-11-01/contactprofile/version.go @@ -1,12 +1,10 @@ package contactprofile -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contactprofile/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contactprofile/2022-11-01" } diff --git a/resource-manager/orbital/2022-11-01/groundstation/README.md b/resource-manager/orbital/2022-11-01/groundstation/README.md index ef2db0e34a8..196f2f5cd2b 100644 --- a/resource-manager/orbital/2022-11-01/groundstation/README.md +++ b/resource-manager/orbital/2022-11-01/groundstation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/groundstation` Documentation -The `groundstation` SDK allows for interaction with the Azure Resource Manager Service `orbital` (API Version `2022-11-01`). +The `groundstation` SDK allows for interaction with Azure Resource Manager `orbital` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/orbital/2022-11-01/groundstation/client.go b/resource-manager/orbital/2022-11-01/groundstation/client.go index 7b8bff86d25..6aecc6ecd09 100644 --- a/resource-manager/orbital/2022-11-01/groundstation/client.go +++ b/resource-manager/orbital/2022-11-01/groundstation/client.go @@ -15,7 +15,7 @@ type GroundStationClient struct { } func NewGroundStationClientWithBaseURI(sdkApi sdkEnv.Api) (*GroundStationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "groundstation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "groundstation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GroundStationClient: %+v", err) } diff --git a/resource-manager/orbital/2022-11-01/groundstation/method_availablegroundstationslistbycapability.go b/resource-manager/orbital/2022-11-01/groundstation/method_availablegroundstationslistbycapability.go index 7844bdcbea1..57fbc592d96 100644 --- a/resource-manager/orbital/2022-11-01/groundstation/method_availablegroundstationslistbycapability.go +++ b/resource-manager/orbital/2022-11-01/groundstation/method_availablegroundstationslistbycapability.go @@ -40,6 +40,7 @@ func (o AvailableGroundStationsListByCapabilityOperationOptions) ToHeaders() *cl func (o AvailableGroundStationsListByCapabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/orbital/2022-11-01/groundstation/version.go b/resource-manager/orbital/2022-11-01/groundstation/version.go index d1ad6a03aac..b50fcb486f5 100644 --- a/resource-manager/orbital/2022-11-01/groundstation/version.go +++ b/resource-manager/orbital/2022-11-01/groundstation/version.go @@ -1,12 +1,10 @@ package groundstation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/groundstation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/groundstation/2022-11-01" } diff --git a/resource-manager/orbital/2022-11-01/spacecraft/README.md b/resource-manager/orbital/2022-11-01/spacecraft/README.md index de85d7e389d..3f6d1b9513a 100644 --- a/resource-manager/orbital/2022-11-01/spacecraft/README.md +++ b/resource-manager/orbital/2022-11-01/spacecraft/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/orbital/2022-11-01/spacecraft` Documentation -The `spacecraft` SDK allows for interaction with the Azure Resource Manager Service `orbital` (API Version `2022-11-01`). +The `spacecraft` SDK allows for interaction with Azure Resource Manager `orbital` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/orbital/2022-11-01/spacecraft/client.go b/resource-manager/orbital/2022-11-01/spacecraft/client.go index c9566da9301..a7bf26560b8 100644 --- a/resource-manager/orbital/2022-11-01/spacecraft/client.go +++ b/resource-manager/orbital/2022-11-01/spacecraft/client.go @@ -15,7 +15,7 @@ type SpacecraftClient struct { } func NewSpacecraftClientWithBaseURI(sdkApi sdkEnv.Api) (*SpacecraftClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "spacecraft", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "spacecraft", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SpacecraftClient: %+v", err) } diff --git a/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go b/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go index f85a9ea744e..234527f8a99 100644 --- a/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go +++ b/resource-manager/orbital/2022-11-01/spacecraft/id_spacecraft.go @@ -42,7 +42,7 @@ func ParseSpacecraftID(input string) (*SpacecraftId, error) { } id := SpacecraftId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSpacecraftIDInsensitively(input string) (*SpacecraftId, error) { } id := SpacecraftId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/orbital/2022-11-01/spacecraft/method_get.go b/resource-manager/orbital/2022-11-01/spacecraft/method_get.go index 93049185768..fd0f609b6dd 100644 --- a/resource-manager/orbital/2022-11-01/spacecraft/method_get.go +++ b/resource-manager/orbital/2022-11-01/spacecraft/method_get.go @@ -45,7 +45,6 @@ func (c SpacecraftClient) Get(ctx context.Context, id SpacecraftId) (result GetO var model Spacecraft result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/orbital/2022-11-01/spacecraft/version.go b/resource-manager/orbital/2022-11-01/spacecraft/version.go index e8ab09d9962..7c2916c1931 100644 --- a/resource-manager/orbital/2022-11-01/spacecraft/version.go +++ b/resource-manager/orbital/2022-11-01/spacecraft/version.go @@ -1,12 +1,10 @@ package spacecraft -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/spacecraft/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/spacecraft/2022-11-01" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/README.md index f6bc92cfbd1..7b4e22f3c02 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack` Documentation -The `certificateobjectglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `certificateobjectglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/client.go index 81daa7cb589..74bea4fa5aa 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/client.go @@ -15,7 +15,7 @@ type CertificateObjectGlobalRulestackClient struct { } func NewCertificateObjectGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateObjectGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateobjectglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateobjectglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateObjectGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go index c3cecabb6ec..79df3e25cf0 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_certificate.go @@ -40,7 +40,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go index 21da85579c2..8bc59457a2e 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/method_get.go index aa1f5111026..015062d8672 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c CertificateObjectGlobalRulestackClient) Get(ctx context.Context, id Cert var model CertificateObjectGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/version.go index 2fb0ae27c4d..95a5e969e9e 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectglobalrulestack/version.go @@ -1,12 +1,10 @@ package certificateobjectglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateobjectglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateobjectglobalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/README.md index 1b230a63a1d..737db77ba9c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack` Documentation -The `certificateobjectlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `certificateobjectlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/client.go index e799a061914..a7f1c6890ab 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/client.go @@ -15,7 +15,7 @@ type CertificateObjectLocalRulestackClient struct { } func NewCertificateObjectLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateObjectLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateobjectlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateobjectlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateObjectLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go index cc5fe21cb4f..ac506c6b8fd 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go index 598daafed06..9a13f3fadc5 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/id_localrulestackcertificate.go @@ -44,7 +44,7 @@ func ParseLocalRulestackCertificateID(input string) (*LocalRulestackCertificateI } id := LocalRulestackCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackCertificateIDInsensitively(input string) (*LocalRulestac } id := LocalRulestackCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/method_get.go index ef20db0a488..bff5b5250a1 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c CertificateObjectLocalRulestackClient) Get(ctx context.Context, id Local var model CertificateObjectLocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/version.go index 3aa7dab9042..66d222c9ef3 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/certificateobjectlocalrulestack/version.go @@ -1,12 +1,10 @@ package certificateobjectlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateobjectlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateobjectlocalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/README.md b/resource-manager/paloaltonetworks/2022-08-29/firewalls/README.md index b061469bd76..4f2a203a696 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewalls` Documentation -The `firewalls` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `firewalls` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/client.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/client.go index 5268f82e790..10331bb3c62 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/client.go @@ -15,7 +15,7 @@ type FirewallsClient struct { } func NewFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallsClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go index fbd64f7719a..912309e88d3 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/id_firewall.go @@ -42,7 +42,7 @@ func ParseFirewallID(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_get.go index 02deaeaf316..dc50e315a9c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_get.go @@ -45,7 +45,6 @@ func (c FirewallsClient) Get(ctx context.Context, id FirewallId) (result GetOper var model FirewallResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getglobalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getglobalrulestack.go index 50bceaad7d4..0269ad01255 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getglobalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getglobalrulestack.go @@ -46,7 +46,6 @@ func (c FirewallsClient) GetGlobalRulestack(ctx context.Context, id FirewallId) var model GlobalRulestackInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getlogprofile.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getlogprofile.go index 3dbe88ec58a..6c18f762889 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getlogprofile.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getlogprofile.go @@ -46,7 +46,6 @@ func (c FirewallsClient) GetLogProfile(ctx context.Context, id FirewallId) (resu var model LogSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getsupportinfo.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getsupportinfo.go index ca6cea4afef..e60a81434b8 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getsupportinfo.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_getsupportinfo.go @@ -34,6 +34,7 @@ func (o GetSupportInfoOperationOptions) ToHeaders() *client.Headers { func (o GetSupportInfoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallsClient) GetSupportInfo(ctx context.Context, id FirewallId, opti var model SupportInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_update.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_update.go index 4fc093bd9fa..3f1bdeadd16 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_update.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/method_update.go @@ -49,7 +49,6 @@ func (c FirewallsClient) Update(ctx context.Context, id FirewallId, input Firewa var model FirewallResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewalls/version.go b/resource-manager/paloaltonetworks/2022-08-29/firewalls/version.go index 40c4144d4ba..ca80ba8d2e2 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewalls/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewalls/version.go @@ -1,12 +1,10 @@ package firewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewalls/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/README.md b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/README.md index 31470b7364c..4ba01ac831d 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/firewallstatus` Documentation -The `firewallstatus` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `firewallstatus` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/client.go b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/client.go index f55eaa75b88..94bd4f9beb9 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/client.go @@ -15,7 +15,7 @@ type FirewallStatusClient struct { } func NewFirewallStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallStatusClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go index 2b6801d7749..6bfe0adb175 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/id_firewall.go @@ -42,7 +42,7 @@ func ParseFirewallID(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/method_get.go index bbbd5449ba2..bb3da66ebb5 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/method_get.go @@ -46,7 +46,6 @@ func (c FirewallStatusClient) Get(ctx context.Context, id FirewallId) (result Ge var model FirewallStatusResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/version.go b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/version.go index ee6d95e070c..b4690d033c4 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/firewallstatus/version.go @@ -1,12 +1,10 @@ package firewallstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallstatus/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/README.md index 49747218963..d420e0e5cad 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack` Documentation -The `fqdnlistglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `fqdnlistglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/client.go index 61d88a34950..2dd9d446fe6 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/client.go @@ -15,7 +15,7 @@ type FqdnListGlobalRulestackClient struct { } func NewFqdnListGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*FqdnListGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fqdnlistglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fqdnlistglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FqdnListGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go index 85757ff14af..6865a1d12d4 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_fqdnlist.go @@ -40,7 +40,7 @@ func ParseFqdnListID(input string) (*FqdnListId, error) { } id := FqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseFqdnListIDInsensitively(input string) (*FqdnListId, error) { } id := FqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go index 8e1f61c1730..64f7d722f72 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/method_get.go index 741f266e494..4a63617dbb1 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c FqdnListGlobalRulestackClient) Get(ctx context.Context, id FqdnListId) ( var model FqdnListGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/version.go index a51d13abdef..6ecec9e368f 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistglobalrulestack/version.go @@ -1,12 +1,10 @@ package fqdnlistglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fqdnlistglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fqdnlistglobalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/README.md index cbb135b1472..51ff7228626 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack` Documentation -The `fqdnlistlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `fqdnlistlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/client.go index 29b8edd66df..37f786343b4 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/client.go @@ -15,7 +15,7 @@ type FqdnListLocalRulestackClient struct { } func NewFqdnListLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*FqdnListLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fqdnlistlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fqdnlistlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FqdnListLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go index 6bf38ae28ca..cbdef89b176 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go index d3faacab3b2..79c250e86d4 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go @@ -44,7 +44,7 @@ func ParseLocalRulestackFqdnListID(input string) (*LocalRulestackFqdnListId, err } id := LocalRulestackFqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackFqdnListIDInsensitively(input string) (*LocalRulestackFq } id := LocalRulestackFqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/method_get.go index c3de4d818d5..dc0b2bf6343 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c FqdnListLocalRulestackClient) Get(ctx context.Context, id LocalRulestack var model FqdnListLocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/version.go index aa4f55b7f64..7498849960a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/fqdnlistlocalrulestack/version.go @@ -1,12 +1,10 @@ package fqdnlistlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fqdnlistlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fqdnlistlocalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md index f8603bc901e..3d15fa78e38 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/globalrulestack` Documentation -The `globalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `globalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/client.go index a5bd3e881b8..82b5f5e02bb 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/client.go @@ -15,7 +15,7 @@ type GlobalRulestackClient struct { } func NewGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go index 6c1df26a788..d14cd13e258 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_get.go index a4b332479c5..14480d0838c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c GlobalRulestackClient) Get(ctx context.Context, id GlobalRulestackId) (r var model GlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_getchangelog.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_getchangelog.go index eb8fe64fdc0..9618f3266c7 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_getchangelog.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_getchangelog.go @@ -46,7 +46,6 @@ func (c GlobalRulestackClient) GetChangeLog(ctx context.Context, id GlobalRulest var model Changelog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go index fe87d9febc3..ee15c4294d9 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listadvancedsecurityobjects.go @@ -41,6 +41,7 @@ func (o ListAdvancedSecurityObjectsOperationOptions) ToHeaders() *client.Headers func (o ListAdvancedSecurityObjectsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go index 9502e473e1c..62c2ecd94c5 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listappids.go @@ -42,6 +42,7 @@ func (o ListAppIdsOperationOptions) ToHeaders() *client.Headers { func (o ListAppIdsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go index 7500f83f242..0b6cfdc1713 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listcountries.go @@ -40,6 +40,7 @@ func (o ListCountriesOperationOptions) ToHeaders() *client.Headers { func (o ListCountriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go index 8ef7328d4d8..ceb121db5e2 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listpredefinedurlcategories.go @@ -40,6 +40,7 @@ func (o ListPredefinedUrlCategoriesOperationOptions) ToHeaders() *client.Headers func (o ListPredefinedUrlCategoriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go index d513d0a796d..e07e8c6fcb0 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_listsecurityservices.go @@ -41,6 +41,7 @@ func (o ListSecurityServicesOperationOptions) ToHeaders() *client.Headers { func (o ListSecurityServicesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_update.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_update.go index bed8cdf7449..0f30fab9ae2 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_update.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/method_update.go @@ -49,7 +49,6 @@ func (c GlobalRulestackClient) Update(ctx context.Context, id GlobalRulestackId, var model GlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/version.go index d5d83092cf8..552d8e03c89 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/globalrulestack/version.go @@ -1,12 +1,10 @@ package globalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/README.md b/resource-manager/paloaltonetworks/2022-08-29/localrules/README.md index fe9b9772bdc..3918ca50001 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrules` Documentation -The `localrules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `localrules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/client.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/client.go index 4151472ef4c..7b3a2d13134 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/client.go @@ -15,7 +15,7 @@ type LocalRulesClient struct { } func NewLocalRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go index 2160f00cda8..b03cf8c3522 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrule.go @@ -44,7 +44,7 @@ func ParseLocalRuleID(input string) (*LocalRuleId, error) { } id := LocalRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRuleIDInsensitively(input string) (*LocalRuleId, error) { } id := LocalRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go index ecc86869f5c..e43505b7767 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_get.go index 21cf89b3e79..9ecd3e5b55d 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_get.go @@ -45,7 +45,6 @@ func (c LocalRulesClient) Get(ctx context.Context, id LocalRuleId) (result GetOp var model LocalRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_getcounters.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_getcounters.go index 8667a19ac1a..4892e884329 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulesClient) GetCounters(ctx context.Context, id LocalRuleId, optio var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_refreshcounters.go index eb986a4d5a7..b17d5cd5a0f 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_resetcounters.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_resetcounters.go index 9263a03dafb..9ba286d3e41 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulesClient) ResetCounters(ctx context.Context, id LocalRuleId, opt var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrules/version.go b/resource-manager/paloaltonetworks/2022-08-29/localrules/version.go index b7d89a582c4..e04ddda323a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrules/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrules/version.go @@ -1,12 +1,10 @@ package localrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localrules/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md index 04e98f282e2..9d2cd89b045 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/localrulestacks` Documentation -The `localrulestacks` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `localrulestacks` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/client.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/client.go index 55e0d2232ed..8ab21894439 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/client.go @@ -15,7 +15,7 @@ type LocalRulestacksClient struct { } func NewLocalRulestacksClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalRulestacksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localrulestacks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localrulestacks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalRulestacksClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go index 8ea2a910928..e04eed7e538 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_get.go index fac59270128..d3ebee5513b 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_get.go @@ -45,7 +45,6 @@ func (c LocalRulestacksClient) Get(ctx context.Context, id LocalRulestackId) (re var model LocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getchangelog.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getchangelog.go index 7ae119d9fe1..7e044701491 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getchangelog.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getchangelog.go @@ -46,7 +46,6 @@ func (c LocalRulestacksClient) GetChangeLog(ctx context.Context, id LocalRulesta var model Changelog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getsupportinfo.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getsupportinfo.go index 5f4a6cce25f..dd12e9e7266 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getsupportinfo.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_getsupportinfo.go @@ -34,6 +34,7 @@ func (o GetSupportInfoOperationOptions) ToHeaders() *client.Headers { func (o GetSupportInfoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulestacksClient) GetSupportInfo(ctx context.Context, id LocalRules var model SupportInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go index 068e60af148..392e83539e2 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listadvancedsecurityobjects.go @@ -41,6 +41,7 @@ func (o ListAdvancedSecurityObjectsOperationOptions) ToHeaders() *client.Headers func (o ListAdvancedSecurityObjectsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go index 1cfaa156ca7..98637d5d442 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listappids.go @@ -42,6 +42,7 @@ func (o ListAppIdsOperationOptions) ToHeaders() *client.Headers { func (o ListAppIdsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go index 4967691f1c6..f6fb52fa709 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listcountries.go @@ -40,6 +40,7 @@ func (o ListCountriesOperationOptions) ToHeaders() *client.Headers { func (o ListCountriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go index 313cb881abd..6af1d69c3e1 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listpredefinedurlcategories.go @@ -40,6 +40,7 @@ func (o ListPredefinedUrlCategoriesOperationOptions) ToHeaders() *client.Headers func (o ListPredefinedUrlCategoriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go index 1e5b508ab74..e9171e75879 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_listsecurityservices.go @@ -41,6 +41,7 @@ func (o ListSecurityServicesOperationOptions) ToHeaders() *client.Headers { func (o ListSecurityServicesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_update.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_update.go index 4ec51f5e9f0..bc706baa98a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_update.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/method_update.go @@ -49,7 +49,6 @@ func (c LocalRulestacksClient) Update(ctx context.Context, id LocalRulestackId, var model LocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/version.go b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/version.go index 5a52a381d28..46fe943260d 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/localrulestacks/version.go @@ -1,12 +1,10 @@ package localrulestacks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localrulestacks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localrulestacks/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/README.md b/resource-manager/paloaltonetworks/2022-08-29/postrules/README.md index d2362b7482e..f7b7a640210 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/postrules` Documentation -The `postrules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `postrules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/client.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/client.go index 07fbc41a7f7..e6e3fd5998a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/client.go @@ -15,7 +15,7 @@ type PostRulesClient struct { } func NewPostRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PostRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "postrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "postrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PostRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go index 88be5958cb7..9e0d03ccf4d 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go index 681dba0ad43..93ad666042c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/id_postrule.go @@ -40,7 +40,7 @@ func ParsePostRuleID(input string) (*PostRuleId, error) { } id := PostRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePostRuleIDInsensitively(input string) (*PostRuleId, error) { } id := PostRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_get.go index f1ff32c3d50..c8fbdfab879 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_get.go @@ -45,7 +45,6 @@ func (c PostRulesClient) Get(ctx context.Context, id PostRuleId) (result GetOper var model PostRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_getcounters.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_getcounters.go index 7f5b245bdd3..5c0cefd749c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PostRulesClient) GetCounters(ctx context.Context, id PostRuleId, options var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_refreshcounters.go index 5f13d57507c..7e47a545bdb 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_resetcounters.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_resetcounters.go index 9b86dfc935b..1b81f5f4e9f 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PostRulesClient) ResetCounters(ctx context.Context, id PostRuleId, optio var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/postrules/version.go b/resource-manager/paloaltonetworks/2022-08-29/postrules/version.go index f10b492e9d0..b21b80e04cf 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/postrules/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/postrules/version.go @@ -1,12 +1,10 @@ package postrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/postrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/postrules/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/README.md index e3dc7cb7f0a..c5226693c5b 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack` Documentation -The `prefixlistglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `prefixlistglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/client.go index c4cc3cc6d10..d090009d009 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/client.go @@ -15,7 +15,7 @@ type PrefixListGlobalRulestackClient struct { } func NewPrefixListGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*PrefixListGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prefixlistglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prefixlistglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrefixListGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go index ec1e50e6f0f..bcede7dd26c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go index cff85c5781e..fd92110d014 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/id_prefixlist.go @@ -40,7 +40,7 @@ func ParsePrefixListID(input string) (*PrefixListId, error) { } id := PrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePrefixListIDInsensitively(input string) (*PrefixListId, error) { } id := PrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/method_get.go index 3460d330fe3..fb4652bea21 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c PrefixListGlobalRulestackClient) Get(ctx context.Context, id PrefixListI var model PrefixListGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/version.go index 44caa4d265f..50ea7236e1c 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistglobalrulestack/version.go @@ -1,12 +1,10 @@ package prefixlistglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prefixlistglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prefixlistglobalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/README.md b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/README.md index 319d3be490b..377f390d0bb 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack` Documentation -The `prefixlistlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `prefixlistlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/client.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/client.go index d8e3c242dcd..d19284d12ee 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/client.go @@ -15,7 +15,7 @@ type PrefixListLocalRulestackClient struct { } func NewPrefixListLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*PrefixListLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prefixlistlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prefixlistlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrefixListLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go index 1740d71baf7..71d127aafce 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go index 0854c6b9b9f..09d8633156a 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/id_localrulestackprefixlist.go @@ -44,7 +44,7 @@ func ParseLocalRulestackPrefixListID(input string) (*LocalRulestackPrefixListId, } id := LocalRulestackPrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackPrefixListIDInsensitively(input string) (*LocalRulestack } id := LocalRulestackPrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/method_get.go index 41f4c1fd78e..9afdf613578 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c PrefixListLocalRulestackClient) Get(ctx context.Context, id LocalRulesta var model PrefixListResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/version.go b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/version.go index 6849fd3d2c8..521fb8d01ec 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prefixlistlocalrulestack/version.go @@ -1,12 +1,10 @@ package prefixlistlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prefixlistlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prefixlistlocalrulestack/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/README.md b/resource-manager/paloaltonetworks/2022-08-29/prerules/README.md index c47ebda48c2..cf242d6ccf1 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/README.md +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2022-08-29/prerules` Documentation -The `prerules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2022-08-29`). +The `prerules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2022-08-29`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/client.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/client.go index cd19e016b77..4119834a636 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/client.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/client.go @@ -15,7 +15,7 @@ type PreRulesClient struct { } func NewPreRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PreRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prerules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prerules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PreRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go index 41b39568dac..1c5959ae4db 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go index 8d8821b1f2b..d76c20234e4 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/id_prerule.go @@ -40,7 +40,7 @@ func ParsePreRuleID(input string) (*PreRuleId, error) { } id := PreRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePreRuleIDInsensitively(input string) (*PreRuleId, error) { } id := PreRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_get.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_get.go index fa5856a203c..81343813cbe 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_get.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_get.go @@ -45,7 +45,6 @@ func (c PreRulesClient) Get(ctx context.Context, id PreRuleId) (result GetOperat var model PreRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_getcounters.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_getcounters.go index e11bb703e5f..3ebdad40df1 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PreRulesClient) GetCounters(ctx context.Context, id PreRuleId, options G var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_refreshcounters.go index 57b1f95568e..58abc0fac0d 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_resetcounters.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_resetcounters.go index 24728260a67..26009519969 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PreRulesClient) ResetCounters(ctx context.Context, id PreRuleId, options var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2022-08-29/prerules/version.go b/resource-manager/paloaltonetworks/2022-08-29/prerules/version.go index 262eafe6f8b..e9954689360 100644 --- a/resource-manager/paloaltonetworks/2022-08-29/prerules/version.go +++ b/resource-manager/paloaltonetworks/2022-08-29/prerules/version.go @@ -1,12 +1,10 @@ package prerules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-08-29" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prerules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prerules/2022-08-29" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/README.md index 5906559f363..15eb67d7201 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack` Documentation -The `certificateobjectglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `certificateobjectglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/client.go index 81daa7cb589..74bea4fa5aa 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/client.go @@ -15,7 +15,7 @@ type CertificateObjectGlobalRulestackClient struct { } func NewCertificateObjectGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateObjectGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateobjectglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateobjectglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateObjectGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_certificate.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_certificate.go index c3cecabb6ec..79df3e25cf0 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_certificate.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_certificate.go @@ -40,7 +40,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_globalrulestack.go index 21da85579c2..8bc59457a2e 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/method_get.go index aa1f5111026..015062d8672 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c CertificateObjectGlobalRulestackClient) Get(ctx context.Context, id Cert var model CertificateObjectGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/version.go index b0e078c670c..26452fbd82a 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectglobalrulestack/version.go @@ -1,12 +1,10 @@ package certificateobjectglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateobjectglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateobjectglobalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/README.md index 9aeaccd9ea4..edf5230b31e 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack` Documentation -The `certificateobjectlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `certificateobjectlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/client.go index e799a061914..a7f1c6890ab 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/client.go @@ -15,7 +15,7 @@ type CertificateObjectLocalRulestackClient struct { } func NewCertificateObjectLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateObjectLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateobjectlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateobjectlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateObjectLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestack.go index cc5fe21cb4f..ac506c6b8fd 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestackcertificate.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestackcertificate.go index 598daafed06..9a13f3fadc5 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestackcertificate.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/id_localrulestackcertificate.go @@ -44,7 +44,7 @@ func ParseLocalRulestackCertificateID(input string) (*LocalRulestackCertificateI } id := LocalRulestackCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackCertificateIDInsensitively(input string) (*LocalRulestac } id := LocalRulestackCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/method_get.go index ef20db0a488..bff5b5250a1 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c CertificateObjectLocalRulestackClient) Get(ctx context.Context, id Local var model CertificateObjectLocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/version.go index 6d47568b11b..5eb9185255b 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/certificateobjectlocalrulestack/version.go @@ -1,12 +1,10 @@ package certificateobjectlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateobjectlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateobjectlocalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/README.md b/resource-manager/paloaltonetworks/2023-09-01/firewalls/README.md index f9967760a5b..c53d3fbf818 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/firewalls` Documentation -The `firewalls` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `firewalls` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/client.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/client.go index 5268f82e790..10331bb3c62 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/client.go @@ -15,7 +15,7 @@ type FirewallsClient struct { } func NewFirewallsClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewalls", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewalls", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallsClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/id_firewall.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/id_firewall.go index fbd64f7719a..912309e88d3 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/id_firewall.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/id_firewall.go @@ -42,7 +42,7 @@ func ParseFirewallID(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_get.go index 02deaeaf316..dc50e315a9c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_get.go @@ -45,7 +45,6 @@ func (c FirewallsClient) Get(ctx context.Context, id FirewallId) (result GetOper var model FirewallResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getglobalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getglobalrulestack.go index 50bceaad7d4..0269ad01255 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getglobalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getglobalrulestack.go @@ -46,7 +46,6 @@ func (c FirewallsClient) GetGlobalRulestack(ctx context.Context, id FirewallId) var model GlobalRulestackInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getlogprofile.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getlogprofile.go index 3dbe88ec58a..6c18f762889 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getlogprofile.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getlogprofile.go @@ -46,7 +46,6 @@ func (c FirewallsClient) GetLogProfile(ctx context.Context, id FirewallId) (resu var model LogSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getsupportinfo.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getsupportinfo.go index ca6cea4afef..e60a81434b8 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getsupportinfo.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_getsupportinfo.go @@ -34,6 +34,7 @@ func (o GetSupportInfoOperationOptions) ToHeaders() *client.Headers { func (o GetSupportInfoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c FirewallsClient) GetSupportInfo(ctx context.Context, id FirewallId, opti var model SupportInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_update.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_update.go index 4fc093bd9fa..3f1bdeadd16 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_update.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/method_update.go @@ -49,7 +49,6 @@ func (c FirewallsClient) Update(ctx context.Context, id FirewallId, input Firewa var model FirewallResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewalls/version.go b/resource-manager/paloaltonetworks/2023-09-01/firewalls/version.go index 955e7e4bfa0..0ba52478103 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewalls/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewalls/version.go @@ -1,12 +1,10 @@ package firewalls -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewalls/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewalls/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/README.md b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/README.md index b6cc08150ff..b720326cc67 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/firewallstatus` Documentation -The `firewallstatus` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `firewallstatus` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/client.go b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/client.go index f55eaa75b88..94bd4f9beb9 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/client.go @@ -15,7 +15,7 @@ type FirewallStatusClient struct { } func NewFirewallStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallStatusClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/id_firewall.go b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/id_firewall.go index 2b6801d7749..6bfe0adb175 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/id_firewall.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/id_firewall.go @@ -42,7 +42,7 @@ func ParseFirewallID(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFirewallIDInsensitively(input string) (*FirewallId, error) { } id := FirewallId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/method_get.go index bbbd5449ba2..bb3da66ebb5 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/method_get.go @@ -46,7 +46,6 @@ func (c FirewallStatusClient) Get(ctx context.Context, id FirewallId) (result Ge var model FirewallStatusResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/version.go b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/version.go index e9b635527b5..505734e39d3 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/firewallstatus/version.go @@ -1,12 +1,10 @@ package firewallstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallstatus/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/README.md index 1a956898f13..a1c19a0e9d7 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack` Documentation -The `fqdnlistglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `fqdnlistglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/client.go index 61d88a34950..2dd9d446fe6 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/client.go @@ -15,7 +15,7 @@ type FqdnListGlobalRulestackClient struct { } func NewFqdnListGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*FqdnListGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fqdnlistglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fqdnlistglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FqdnListGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_fqdnlist.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_fqdnlist.go index 85757ff14af..6865a1d12d4 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_fqdnlist.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_fqdnlist.go @@ -40,7 +40,7 @@ func ParseFqdnListID(input string) (*FqdnListId, error) { } id := FqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseFqdnListIDInsensitively(input string) (*FqdnListId, error) { } id := FqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_globalrulestack.go index 8e1f61c1730..64f7d722f72 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/method_get.go index 741f266e494..4a63617dbb1 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c FqdnListGlobalRulestackClient) Get(ctx context.Context, id FqdnListId) ( var model FqdnListGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/version.go index 722dbf5bc5a..137c7f47cc3 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistglobalrulestack/version.go @@ -1,12 +1,10 @@ package fqdnlistglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fqdnlistglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fqdnlistglobalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/README.md index 19d1da9d57f..303154a8181 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack` Documentation -The `fqdnlistlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `fqdnlistlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/client.go index 29b8edd66df..37f786343b4 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/client.go @@ -15,7 +15,7 @@ type FqdnListLocalRulestackClient struct { } func NewFqdnListLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*FqdnListLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fqdnlistlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fqdnlistlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FqdnListLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestack.go index 6bf38ae28ca..cbdef89b176 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go index d3faacab3b2..79c250e86d4 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/id_localrulestackfqdnlist.go @@ -44,7 +44,7 @@ func ParseLocalRulestackFqdnListID(input string) (*LocalRulestackFqdnListId, err } id := LocalRulestackFqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackFqdnListIDInsensitively(input string) (*LocalRulestackFq } id := LocalRulestackFqdnListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/method_get.go index c3de4d818d5..dc0b2bf6343 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c FqdnListLocalRulestackClient) Get(ctx context.Context, id LocalRulestack var model FqdnListLocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/version.go index f444d42b42c..8705ed4cf8d 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/fqdnlistlocalrulestack/version.go @@ -1,12 +1,10 @@ package fqdnlistlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fqdnlistlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fqdnlistlocalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md index 46abea79046..8ff4bc60846 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/globalrulestack` Documentation -The `globalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `globalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/client.go index a5bd3e881b8..82b5f5e02bb 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/client.go @@ -15,7 +15,7 @@ type GlobalRulestackClient struct { } func NewGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/id_globalrulestack.go index 6c1df26a788..d14cd13e258 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_get.go index a4b332479c5..14480d0838c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c GlobalRulestackClient) Get(ctx context.Context, id GlobalRulestackId) (r var model GlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_getchangelog.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_getchangelog.go index eb8fe64fdc0..9618f3266c7 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_getchangelog.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_getchangelog.go @@ -46,7 +46,6 @@ func (c GlobalRulestackClient) GetChangeLog(ctx context.Context, id GlobalRulest var model Changelog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go index fe87d9febc3..ee15c4294d9 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listadvancedsecurityobjects.go @@ -41,6 +41,7 @@ func (o ListAdvancedSecurityObjectsOperationOptions) ToHeaders() *client.Headers func (o ListAdvancedSecurityObjectsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go index 9502e473e1c..62c2ecd94c5 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listappids.go @@ -42,6 +42,7 @@ func (o ListAppIdsOperationOptions) ToHeaders() *client.Headers { func (o ListAppIdsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go index 7500f83f242..0b6cfdc1713 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listcountries.go @@ -40,6 +40,7 @@ func (o ListCountriesOperationOptions) ToHeaders() *client.Headers { func (o ListCountriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go index 8ef7328d4d8..ceb121db5e2 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listpredefinedurlcategories.go @@ -40,6 +40,7 @@ func (o ListPredefinedUrlCategoriesOperationOptions) ToHeaders() *client.Headers func (o ListPredefinedUrlCategoriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go index d513d0a796d..e07e8c6fcb0 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_listsecurityservices.go @@ -41,6 +41,7 @@ func (o ListSecurityServicesOperationOptions) ToHeaders() *client.Headers { func (o ListSecurityServicesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_update.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_update.go index bed8cdf7449..0f30fab9ae2 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_update.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/method_update.go @@ -49,7 +49,6 @@ func (c GlobalRulestackClient) Update(ctx context.Context, id GlobalRulestackId, var model GlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/version.go index b5932dc6988..ad6ff673f03 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/globalrulestack/version.go @@ -1,12 +1,10 @@ package globalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/README.md b/resource-manager/paloaltonetworks/2023-09-01/localrules/README.md index c5caeeaf2bc..dfd0cb4665b 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/localrules` Documentation -The `localrules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `localrules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/client.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/client.go index 4151472ef4c..7b3a2d13134 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/client.go @@ -15,7 +15,7 @@ type LocalRulesClient struct { } func NewLocalRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrule.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrule.go index 2160f00cda8..b03cf8c3522 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrule.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrule.go @@ -44,7 +44,7 @@ func ParseLocalRuleID(input string) (*LocalRuleId, error) { } id := LocalRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRuleIDInsensitively(input string) (*LocalRuleId, error) { } id := LocalRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrulestack.go index ecc86869f5c..e43505b7767 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_get.go index 21cf89b3e79..9ecd3e5b55d 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_get.go @@ -45,7 +45,6 @@ func (c LocalRulesClient) Get(ctx context.Context, id LocalRuleId) (result GetOp var model LocalRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_getcounters.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_getcounters.go index 8667a19ac1a..4892e884329 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulesClient) GetCounters(ctx context.Context, id LocalRuleId, optio var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_refreshcounters.go index eb986a4d5a7..b17d5cd5a0f 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_resetcounters.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_resetcounters.go index 9263a03dafb..9ba286d3e41 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulesClient) ResetCounters(ctx context.Context, id LocalRuleId, opt var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrules/version.go b/resource-manager/paloaltonetworks/2023-09-01/localrules/version.go index 7ecbba2af42..36858031754 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrules/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrules/version.go @@ -1,12 +1,10 @@ package localrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localrules/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md index 44ee3bf0854..add52a0d02c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/localrulestacks` Documentation -The `localrulestacks` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `localrulestacks` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/client.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/client.go index 55e0d2232ed..8ab21894439 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/client.go @@ -15,7 +15,7 @@ type LocalRulestacksClient struct { } func NewLocalRulestacksClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalRulestacksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localrulestacks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localrulestacks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalRulestacksClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/id_localrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/id_localrulestack.go index 8ea2a910928..e04eed7e538 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_get.go index fac59270128..d3ebee5513b 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_get.go @@ -45,7 +45,6 @@ func (c LocalRulestacksClient) Get(ctx context.Context, id LocalRulestackId) (re var model LocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getchangelog.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getchangelog.go index 7ae119d9fe1..7e044701491 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getchangelog.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getchangelog.go @@ -46,7 +46,6 @@ func (c LocalRulestacksClient) GetChangeLog(ctx context.Context, id LocalRulesta var model Changelog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getsupportinfo.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getsupportinfo.go index 5f4a6cce25f..dd12e9e7266 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getsupportinfo.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_getsupportinfo.go @@ -34,6 +34,7 @@ func (o GetSupportInfoOperationOptions) ToHeaders() *client.Headers { func (o GetSupportInfoOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocalRulestacksClient) GetSupportInfo(ctx context.Context, id LocalRules var model SupportInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go index 068e60af148..392e83539e2 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listadvancedsecurityobjects.go @@ -41,6 +41,7 @@ func (o ListAdvancedSecurityObjectsOperationOptions) ToHeaders() *client.Headers func (o ListAdvancedSecurityObjectsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go index 1cfaa156ca7..98637d5d442 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listappids.go @@ -42,6 +42,7 @@ func (o ListAppIdsOperationOptions) ToHeaders() *client.Headers { func (o ListAppIdsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go index 4967691f1c6..f6fb52fa709 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listcountries.go @@ -40,6 +40,7 @@ func (o ListCountriesOperationOptions) ToHeaders() *client.Headers { func (o ListCountriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go index 313cb881abd..6af1d69c3e1 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listpredefinedurlcategories.go @@ -40,6 +40,7 @@ func (o ListPredefinedUrlCategoriesOperationOptions) ToHeaders() *client.Headers func (o ListPredefinedUrlCategoriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go index 1e5b508ab74..e9171e75879 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_listsecurityservices.go @@ -41,6 +41,7 @@ func (o ListSecurityServicesOperationOptions) ToHeaders() *client.Headers { func (o ListSecurityServicesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_update.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_update.go index 4ec51f5e9f0..bc706baa98a 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_update.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/method_update.go @@ -49,7 +49,6 @@ func (c LocalRulestacksClient) Update(ctx context.Context, id LocalRulestackId, var model LocalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/version.go b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/version.go index 9052e5247a5..55dcd8eff20 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/localrulestacks/version.go @@ -1,12 +1,10 @@ package localrulestacks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localrulestacks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localrulestacks/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/README.md b/resource-manager/paloaltonetworks/2023-09-01/postrules/README.md index c40d41c8414..c05cebfd764 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/postrules` Documentation -The `postrules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `postrules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/client.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/client.go index 07fbc41a7f7..e6e3fd5998a 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/client.go @@ -15,7 +15,7 @@ type PostRulesClient struct { } func NewPostRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PostRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "postrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "postrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PostRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/id_globalrulestack.go index 88be5958cb7..9e0d03ccf4d 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/id_postrule.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/id_postrule.go index 681dba0ad43..93ad666042c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/id_postrule.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/id_postrule.go @@ -40,7 +40,7 @@ func ParsePostRuleID(input string) (*PostRuleId, error) { } id := PostRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePostRuleIDInsensitively(input string) (*PostRuleId, error) { } id := PostRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_get.go index f1ff32c3d50..c8fbdfab879 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_get.go @@ -45,7 +45,6 @@ func (c PostRulesClient) Get(ctx context.Context, id PostRuleId) (result GetOper var model PostRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_getcounters.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_getcounters.go index 7f5b245bdd3..5c0cefd749c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PostRulesClient) GetCounters(ctx context.Context, id PostRuleId, options var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_refreshcounters.go index 5f13d57507c..7e47a545bdb 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_resetcounters.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_resetcounters.go index 9b86dfc935b..1b81f5f4e9f 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PostRulesClient) ResetCounters(ctx context.Context, id PostRuleId, optio var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/postrules/version.go b/resource-manager/paloaltonetworks/2023-09-01/postrules/version.go index d2d35673c72..54f1b01fdd4 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/postrules/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/postrules/version.go @@ -1,12 +1,10 @@ package postrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/postrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/postrules/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/README.md index d9e70d2bac4..e14ef1617dc 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack` Documentation -The `prefixlistglobalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `prefixlistglobalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/client.go index c4cc3cc6d10..d090009d009 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/client.go @@ -15,7 +15,7 @@ type PrefixListGlobalRulestackClient struct { } func NewPrefixListGlobalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*PrefixListGlobalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prefixlistglobalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prefixlistglobalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrefixListGlobalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_globalrulestack.go index ec1e50e6f0f..bcede7dd26c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_prefixlist.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_prefixlist.go index cff85c5781e..fd92110d014 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_prefixlist.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/id_prefixlist.go @@ -40,7 +40,7 @@ func ParsePrefixListID(input string) (*PrefixListId, error) { } id := PrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePrefixListIDInsensitively(input string) (*PrefixListId, error) { } id := PrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/method_get.go index 3460d330fe3..fb4652bea21 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c PrefixListGlobalRulestackClient) Get(ctx context.Context, id PrefixListI var model PrefixListGlobalRulestackResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/version.go index b0d8c48816d..6f2eb656493 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistglobalrulestack/version.go @@ -1,12 +1,10 @@ package prefixlistglobalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prefixlistglobalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prefixlistglobalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/README.md b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/README.md index d2dc3897119..72a3f9a52f7 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack` Documentation -The `prefixlistlocalrulestack` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `prefixlistlocalrulestack` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/client.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/client.go index d8e3c242dcd..d19284d12ee 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/client.go @@ -15,7 +15,7 @@ type PrefixListLocalRulestackClient struct { } func NewPrefixListLocalRulestackClientWithBaseURI(sdkApi sdkEnv.Api) (*PrefixListLocalRulestackClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prefixlistlocalrulestack", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prefixlistlocalrulestack", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrefixListLocalRulestackClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestack.go index 1740d71baf7..71d127aafce 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestack.go @@ -42,7 +42,7 @@ func ParseLocalRulestackID(input string) (*LocalRulestackId, error) { } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocalRulestackIDInsensitively(input string) (*LocalRulestackId, error) } id := LocalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestackprefixlist.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestackprefixlist.go index 0854c6b9b9f..09d8633156a 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestackprefixlist.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/id_localrulestackprefixlist.go @@ -44,7 +44,7 @@ func ParseLocalRulestackPrefixListID(input string) (*LocalRulestackPrefixListId, } id := LocalRulestackPrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalRulestackPrefixListIDInsensitively(input string) (*LocalRulestack } id := LocalRulestackPrefixListId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/method_get.go index 41f4c1fd78e..9afdf613578 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/method_get.go @@ -45,7 +45,6 @@ func (c PrefixListLocalRulestackClient) Get(ctx context.Context, id LocalRulesta var model PrefixListResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/version.go b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/version.go index 9f26ae1ebe4..3b0788fd4cb 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prefixlistlocalrulestack/version.go @@ -1,12 +1,10 @@ package prefixlistlocalrulestack -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prefixlistlocalrulestack/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prefixlistlocalrulestack/2023-09-01" } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/README.md b/resource-manager/paloaltonetworks/2023-09-01/prerules/README.md index c22bb572600..9b716d25d2e 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/README.md +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/paloaltonetworks/2023-09-01/prerules` Documentation -The `prerules` SDK allows for interaction with the Azure Resource Manager Service `paloaltonetworks` (API Version `2023-09-01`). +The `prerules` SDK allows for interaction with Azure Resource Manager `paloaltonetworks` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/client.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/client.go index cd19e016b77..4119834a636 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/client.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/client.go @@ -15,7 +15,7 @@ type PreRulesClient struct { } func NewPreRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PreRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "prerules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "prerules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PreRulesClient: %+v", err) } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/id_globalrulestack.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/id_globalrulestack.go index 41b39568dac..1c5959ae4db 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/id_globalrulestack.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/id_globalrulestack.go @@ -38,7 +38,7 @@ func ParseGlobalRulestackID(input string) (*GlobalRulestackId, error) { } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseGlobalRulestackIDInsensitively(input string) (*GlobalRulestackId, erro } id := GlobalRulestackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/id_prerule.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/id_prerule.go index 8d8821b1f2b..d76c20234e4 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/id_prerule.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/id_prerule.go @@ -40,7 +40,7 @@ func ParsePreRuleID(input string) (*PreRuleId, error) { } id := PreRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePreRuleIDInsensitively(input string) (*PreRuleId, error) { } id := PreRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_get.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_get.go index fa5856a203c..81343813cbe 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_get.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_get.go @@ -45,7 +45,6 @@ func (c PreRulesClient) Get(ctx context.Context, id PreRuleId) (result GetOperat var model PreRulesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_getcounters.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_getcounters.go index e11bb703e5f..3ebdad40df1 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_getcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_getcounters.go @@ -34,6 +34,7 @@ func (o GetCountersOperationOptions) ToHeaders() *client.Headers { func (o GetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PreRulesClient) GetCounters(ctx context.Context, id PreRuleId, options G var model RuleCounter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_refreshcounters.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_refreshcounters.go index 57b1f95568e..58abc0fac0d 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_refreshcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_refreshcounters.go @@ -33,6 +33,7 @@ func (o RefreshCountersOperationOptions) ToHeaders() *client.Headers { func (o RefreshCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_resetcounters.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_resetcounters.go index 24728260a67..26009519969 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/method_resetcounters.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/method_resetcounters.go @@ -34,6 +34,7 @@ func (o ResetCountersOperationOptions) ToHeaders() *client.Headers { func (o ResetCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PreRulesClient) ResetCounters(ctx context.Context, id PreRuleId, options var model RuleCounterReset result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/paloaltonetworks/2023-09-01/prerules/version.go b/resource-manager/paloaltonetworks/2023-09-01/prerules/version.go index b07607be4ac..9133be8113c 100644 --- a/resource-manager/paloaltonetworks/2023-09-01/prerules/version.go +++ b/resource-manager/paloaltonetworks/2023-09-01/prerules/version.go @@ -1,12 +1,10 @@ package prerules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/prerules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/prerules/2023-09-01" } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/README.md b/resource-manager/policyinsights/2021-10-01/remediations/README.md index 1887ba55f06..b51d8cd3319 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/README.md +++ b/resource-manager/policyinsights/2021-10-01/remediations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2021-10-01/remediations` Documentation -The `remediations` SDK allows for interaction with the Azure Resource Manager Service `policyinsights` (API Version `2021-10-01`). +The `remediations` SDK allows for interaction with Azure Resource Manager `policyinsights` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/policyinsights/2021-10-01/remediations/client.go b/resource-manager/policyinsights/2021-10-01/remediations/client.go index 7d83b9855e9..105289dfacf 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/client.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/client.go @@ -15,7 +15,7 @@ type RemediationsClient struct { } func NewRemediationsClientWithBaseURI(sdkApi sdkEnv.Api) (*RemediationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "remediations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "remediations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RemediationsClient: %+v", err) } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go index e400c27bc4e..c29d097243f 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/id_managementgroup.go @@ -38,7 +38,7 @@ func ParseManagementGroupID(input string) (*ManagementGroupId, error) { } id := ManagementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseManagementGroupIDInsensitively(input string) (*ManagementGroupId, erro } id := ManagementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go b/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go index 80e0babff88..34596f67367 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/id_providerremediation.go @@ -42,7 +42,7 @@ func ParseProviderRemediationID(input string) (*ProviderRemediationId, error) { } id := ProviderRemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderRemediationIDInsensitively(input string) (*ProviderRemediation } id := ProviderRemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go b/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go index 4c97923ff1d..73ce3757faa 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/id_providers2remediation.go @@ -40,7 +40,7 @@ func ParseProviders2RemediationID(input string) (*Providers2RemediationId, error } id := Providers2RemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2RemediationIDInsensitively(input string) (*Providers2Remedia } id := Providers2RemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go b/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go index d3230a22107..7d838234c61 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/id_remediation.go @@ -40,7 +40,7 @@ func ParseRemediationID(input string) (*RemediationId, error) { } id := RemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRemediationIDInsensitively(input string) (*RemediationId, error) { } id := RemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go b/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go index 993e8ed178a..5b3b77bccbd 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/id_scopedremediation.go @@ -40,7 +40,7 @@ func ParseScopedRemediationID(input string) (*ScopedRemediationId, error) { } id := ScopedRemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedRemediationIDInsensitively(input string) (*ScopedRemediationId, } id := ScopedRemediationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatmanagementgroup.go index e73de0eabd3..3a2e8e80114 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatmanagementgroup.go @@ -46,7 +46,6 @@ func (c RemediationsClient) CancelAtManagementGroup(ctx context.Context, id Prov var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresource.go index 31cf2c0e0dc..86de50a538f 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresource.go @@ -46,7 +46,6 @@ func (c RemediationsClient) CancelAtResource(ctx context.Context, id ScopedRemed var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresourcegroup.go index b6fda0ff305..6e93937ba87 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatresourcegroup.go @@ -46,7 +46,6 @@ func (c RemediationsClient) CancelAtResourceGroup(ctx context.Context, id Provid var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatsubscription.go index 0a2b882ff2d..f2de8e92ce4 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_cancelatsubscription.go @@ -46,7 +46,6 @@ func (c RemediationsClient) CancelAtSubscription(ctx context.Context, id Remedia var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatmanagementgroup.go index e66b58c650e..31b72969e3a 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatmanagementgroup.go @@ -50,7 +50,6 @@ func (c RemediationsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresource.go index 6be8c71ab9e..a5e980acc51 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresource.go @@ -50,7 +50,6 @@ func (c RemediationsClient) CreateOrUpdateAtResource(ctx context.Context, id Sco var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresourcegroup.go index 45e64a0f1cf..74f8807ac26 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatresourcegroup.go @@ -50,7 +50,6 @@ func (c RemediationsClient) CreateOrUpdateAtResourceGroup(ctx context.Context, i var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatsubscription.go index 3cef086f919..b5b54984856 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_createorupdateatsubscription.go @@ -50,7 +50,6 @@ func (c RemediationsClient) CreateOrUpdateAtSubscription(ctx context.Context, id var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatmanagementgroup.go index 09c19268563..6c1f56b8ed9 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatmanagementgroup.go @@ -46,7 +46,6 @@ func (c RemediationsClient) DeleteAtManagementGroup(ctx context.Context, id Prov var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresource.go index 7522c0157f3..c5ffc153041 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresource.go @@ -46,7 +46,6 @@ func (c RemediationsClient) DeleteAtResource(ctx context.Context, id ScopedRemed var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresourcegroup.go index 37d43ad1a53..f3fa20289db 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatresourcegroup.go @@ -46,7 +46,6 @@ func (c RemediationsClient) DeleteAtResourceGroup(ctx context.Context, id Provid var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatsubscription.go index 5c327d3bd5f..d2e7ffb3dd4 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_deleteatsubscription.go @@ -46,7 +46,6 @@ func (c RemediationsClient) DeleteAtSubscription(ctx context.Context, id Remedia var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_getatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_getatmanagementgroup.go index 6f6dfa735fa..0fe05dbdcb7 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_getatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_getatmanagementgroup.go @@ -45,7 +45,6 @@ func (c RemediationsClient) GetAtManagementGroup(ctx context.Context, id Provide var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_getatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_getatresource.go index b46796e63b2..2f85b9ddc19 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_getatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_getatresource.go @@ -45,7 +45,6 @@ func (c RemediationsClient) GetAtResource(ctx context.Context, id ScopedRemediat var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_getatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_getatresourcegroup.go index e4264ff7c36..1e4c0c59310 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_getatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_getatresourcegroup.go @@ -45,7 +45,6 @@ func (c RemediationsClient) GetAtResourceGroup(ctx context.Context, id ProviderR var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_getatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_getatsubscription.go index a25953c23ab..7040cf62d24 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_getatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_getatsubscription.go @@ -45,7 +45,6 @@ func (c RemediationsClient) GetAtSubscription(ctx context.Context, id Remediatio var model Remediation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go index f25cd5df359..000a1dede92 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatmanagementgroup.go @@ -39,6 +39,7 @@ func (o ListDeploymentsAtManagementGroupOperationOptions) ToHeaders() *client.He func (o ListDeploymentsAtManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go index 4f488712394..4eacc612b3f 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresource.go @@ -39,6 +39,7 @@ func (o ListDeploymentsAtResourceOperationOptions) ToHeaders() *client.Headers { func (o ListDeploymentsAtResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go index 39bdfce404d..c440965a8ad 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatresourcegroup.go @@ -39,6 +39,7 @@ func (o ListDeploymentsAtResourceGroupOperationOptions) ToHeaders() *client.Head func (o ListDeploymentsAtResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go index 01f28953a55..fa1f5512c46 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listdeploymentsatsubscription.go @@ -39,6 +39,7 @@ func (o ListDeploymentsAtSubscriptionOperationOptions) ToHeaders() *client.Heade func (o ListDeploymentsAtSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listformanagementgroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listformanagementgroup.go index 2b60f0ffcab..c4ccbdf488d 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listformanagementgroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listformanagementgroup.go @@ -40,6 +40,7 @@ func (o ListForManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listforresource.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listforresource.go index 43a70d3a5fc..220cd218684 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listforresource.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listforresourcegroup.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listforresourcegroup.go index f788d641c8c..9fe404cebab 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listforresourcegroup.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/method_listforsubscription.go b/resource-manager/policyinsights/2021-10-01/remediations/method_listforsubscription.go index a0f43f3b4e4..01493cd18b1 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/method_listforsubscription.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/method_listforsubscription.go @@ -41,6 +41,7 @@ func (o ListForSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListForSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2021-10-01/remediations/version.go b/resource-manager/policyinsights/2021-10-01/remediations/version.go index 17f0e394ae0..34a9c4d7b4e 100644 --- a/resource-manager/policyinsights/2021-10-01/remediations/version.go +++ b/resource-manager/policyinsights/2021-10-01/remediations/version.go @@ -1,12 +1,10 @@ package remediations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/remediations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/remediations/2021-10-01" } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/README.md b/resource-manager/policyinsights/2022-09-01/attestations/README.md index ebc9455fb14..efcb21d952d 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/README.md +++ b/resource-manager/policyinsights/2022-09-01/attestations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2022-09-01/attestations` Documentation -The `attestations` SDK allows for interaction with the Azure Resource Manager Service `policyinsights` (API Version `2022-09-01`). +The `attestations` SDK allows for interaction with Azure Resource Manager `policyinsights` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/policyinsights/2022-09-01/attestations/client.go b/resource-manager/policyinsights/2022-09-01/attestations/client.go index a19e805aad1..f9da7ffb8bf 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/client.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/client.go @@ -15,7 +15,7 @@ type AttestationsClient struct { } func NewAttestationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AttestationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "attestations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "attestations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AttestationsClient: %+v", err) } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/id_attestation.go b/resource-manager/policyinsights/2022-09-01/attestations/id_attestation.go index 0fefab89d5d..b93fed1c647 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/id_attestation.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/id_attestation.go @@ -40,7 +40,7 @@ func ParseAttestationID(input string) (*AttestationId, error) { } id := AttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAttestationIDInsensitively(input string) (*AttestationId, error) { } id := AttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/id_providerattestation.go b/resource-manager/policyinsights/2022-09-01/attestations/id_providerattestation.go index adf561cd1d3..f58f4f343d7 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/id_providerattestation.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/id_providerattestation.go @@ -42,7 +42,7 @@ func ParseProviderAttestationID(input string) (*ProviderAttestationId, error) { } id := ProviderAttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderAttestationIDInsensitively(input string) (*ProviderAttestation } id := ProviderAttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/id_scopedattestation.go b/resource-manager/policyinsights/2022-09-01/attestations/id_scopedattestation.go index 0272d21b2ad..880e65f42da 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/id_scopedattestation.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/id_scopedattestation.go @@ -40,7 +40,7 @@ func ParseScopedAttestationID(input string) (*ScopedAttestationId, error) { } id := ScopedAttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAttestationIDInsensitively(input string) (*ScopedAttestationId, } id := ScopedAttestationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_getatresource.go b/resource-manager/policyinsights/2022-09-01/attestations/method_getatresource.go index a94715300db..287084b0562 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_getatresource.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_getatresource.go @@ -45,7 +45,6 @@ func (c AttestationsClient) GetAtResource(ctx context.Context, id ScopedAttestat var model Attestation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_getatresourcegroup.go b/resource-manager/policyinsights/2022-09-01/attestations/method_getatresourcegroup.go index d0e4ba4d3bc..3c64ea9ee10 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_getatresourcegroup.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_getatresourcegroup.go @@ -45,7 +45,6 @@ func (c AttestationsClient) GetAtResourceGroup(ctx context.Context, id ProviderA var model Attestation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_getatsubscription.go b/resource-manager/policyinsights/2022-09-01/attestations/method_getatsubscription.go index 313d05d4450..84d3ad10d13 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_getatsubscription.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_getatsubscription.go @@ -45,7 +45,6 @@ func (c AttestationsClient) GetAtSubscription(ctx context.Context, id Attestatio var model Attestation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_listforresource.go b/resource-manager/policyinsights/2022-09-01/attestations/method_listforresource.go index e677b8e43e0..75dfb5c3db4 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_listforresource.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_listforresourcegroup.go b/resource-manager/policyinsights/2022-09-01/attestations/method_listforresourcegroup.go index 96ee450043d..ae1ec293496 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_listforresourcegroup.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/method_listforsubscription.go b/resource-manager/policyinsights/2022-09-01/attestations/method_listforsubscription.go index 36532a64e96..dac31257079 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/method_listforsubscription.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/method_listforsubscription.go @@ -41,6 +41,7 @@ func (o ListForSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListForSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/policyinsights/2022-09-01/attestations/version.go b/resource-manager/policyinsights/2022-09-01/attestations/version.go index ffb9f9ff3d5..ab5e78698e2 100644 --- a/resource-manager/policyinsights/2022-09-01/attestations/version.go +++ b/resource-manager/policyinsights/2022-09-01/attestations/version.go @@ -1,12 +1,10 @@ package attestations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/attestations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/attestations/2022-09-01" } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/README.md b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/README.md index 4c293229abe..298c7093e77 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/README.md +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions` Documentation -The `checkpolicyrestrictions` SDK allows for interaction with the Azure Resource Manager Service `policyinsights` (API Version `2023-03-01`). +The `checkpolicyrestrictions` SDK allows for interaction with Azure Resource Manager `policyinsights` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/client.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/client.go index 6641c1a1df1..37ee09e164e 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/client.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/client.go @@ -15,7 +15,7 @@ type CheckPolicyRestrictionsClient struct { } func NewCheckPolicyRestrictionsClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckPolicyRestrictionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkpolicyrestrictions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkpolicyrestrictions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckPolicyRestrictionsClient: %+v", err) } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/id_managementgroup.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/id_managementgroup.go index 70f052560e9..4548878df52 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/id_managementgroup.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/id_managementgroup.go @@ -38,7 +38,7 @@ func ParseManagementGroupID(input string) (*ManagementGroupId, error) { } id := ManagementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseManagementGroupIDInsensitively(input string) (*ManagementGroupId, erro } id := ManagementGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatmanagementgroupscope.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatmanagementgroupscope.go index 8d212ad9857..87fbc362061 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatmanagementgroupscope.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatmanagementgroupscope.go @@ -50,7 +50,6 @@ func (c CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtManagementGroupS var model CheckRestrictionsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatresourcegroupscope.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatresourcegroupscope.go index 99717c05add..0cdfae60d8f 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatresourcegroupscope.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatresourcegroupscope.go @@ -51,7 +51,6 @@ func (c CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtResourceGroupSco var model CheckRestrictionsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatsubscriptionscope.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatsubscriptionscope.go index 60559554555..e90b7f46d50 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatsubscriptionscope.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/method_policyrestrictionscheckatsubscriptionscope.go @@ -51,7 +51,6 @@ func (c CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtSubscriptionScop var model CheckRestrictionsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/version.go b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/version.go index bbdccade5da..ffe4d74f009 100644 --- a/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/version.go +++ b/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions/version.go @@ -1,12 +1,10 @@ package checkpolicyrestrictions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkpolicyrestrictions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkpolicyrestrictions/2023-03-01" } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/README.md b/resource-manager/portal/2019-01-01-preview/dashboard/README.md index 6816689468f..45d96b359c9 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/README.md +++ b/resource-manager/portal/2019-01-01-preview/dashboard/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard` Documentation -The `dashboard` SDK allows for interaction with the Azure Resource Manager Service `portal` (API Version `2019-01-01-preview`). +The `dashboard` SDK allows for interaction with Azure Resource Manager `portal` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/client.go b/resource-manager/portal/2019-01-01-preview/dashboard/client.go index 825c25c2d12..26d54af66d4 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/client.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/client.go @@ -15,7 +15,7 @@ type DashboardClient struct { } func NewDashboardClientWithBaseURI(sdkApi sdkEnv.Api) (*DashboardClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dashboard", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dashboard", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DashboardClient: %+v", err) } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go b/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go index 8e1b3e7fb86..6c4961e756c 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/id_dashboard.go @@ -42,7 +42,7 @@ func ParseDashboardID(input string) (*DashboardId, error) { } id := DashboardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDashboardIDInsensitively(input string) (*DashboardId, error) { } id := DashboardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate.go b/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate.go index 7af6f8cfede..ae539b903d4 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DashboardClient) CreateOrUpdate(ctx context.Context, id DashboardId, inp var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/method_get.go b/resource-manager/portal/2019-01-01-preview/dashboard/method_get.go index 14af2ecf7f0..0fff3ba8fdf 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/method_get.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/method_get.go @@ -45,7 +45,6 @@ func (c DashboardClient) Get(ctx context.Context, id DashboardId) (result GetOpe var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/method_update.go b/resource-manager/portal/2019-01-01-preview/dashboard/method_update.go index c4d8c1061ae..3c9f5e4be07 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/method_update.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/method_update.go @@ -49,7 +49,6 @@ func (c DashboardClient) Update(ctx context.Context, id DashboardId, input Patch var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2019-01-01-preview/dashboard/version.go b/resource-manager/portal/2019-01-01-preview/dashboard/version.go index 523ca92a281..de1d24125cd 100644 --- a/resource-manager/portal/2019-01-01-preview/dashboard/version.go +++ b/resource-manager/portal/2019-01-01-preview/dashboard/version.go @@ -1,12 +1,10 @@ package dashboard -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dashboard/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dashboard/2019-01-01-preview" } diff --git a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md index 27533d85810..be02eb789ad 100644 --- a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md +++ b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/tenantconfiguration` Documentation -The `tenantconfiguration` SDK allows for interaction with the Azure Resource Manager Service `portal` (API Version `2019-01-01-preview`). +The `tenantconfiguration` SDK allows for interaction with Azure Resource Manager `portal` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/client.go b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/client.go index 0251dfc8eb5..bd86c8dd00f 100644 --- a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/client.go +++ b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/client.go @@ -15,7 +15,7 @@ type TenantConfigurationClient struct { } func NewTenantConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationClient: %+v", err) } diff --git a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_create.go b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_create.go index 4c58e631583..bb790413439 100644 --- a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_create.go +++ b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_create.go @@ -50,7 +50,6 @@ func (c TenantConfigurationClient) Create(ctx context.Context, input Configurati var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_get.go b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_get.go index 0a6c9c314c4..e819db60f36 100644 --- a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_get.go +++ b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c TenantConfigurationClient) Get(ctx context.Context) (result GetOperation var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/version.go b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/version.go index 85b3a535a05..ffaa3ca148c 100644 --- a/resource-manager/portal/2019-01-01-preview/tenantconfiguration/version.go +++ b/resource-manager/portal/2019-01-01-preview/tenantconfiguration/version.go @@ -1,12 +1,10 @@ package tenantconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfiguration/2019-01-01-preview" } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/README.md b/resource-manager/portal/2020-09-01-preview/dashboards/README.md index 44d420c30d6..6e09a80f737 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/README.md +++ b/resource-manager/portal/2020-09-01-preview/dashboards/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/portal/2020-09-01-preview/dashboards` Documentation -The `dashboards` SDK allows for interaction with the Azure Resource Manager Service `portal` (API Version `2020-09-01-preview`). +The `dashboards` SDK allows for interaction with Azure Resource Manager `portal` (API Version `2020-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/client.go b/resource-manager/portal/2020-09-01-preview/dashboards/client.go index 4871cf5f945..f70cca7c12a 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/client.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/client.go @@ -15,7 +15,7 @@ type DashboardsClient struct { } func NewDashboardsClientWithBaseURI(sdkApi sdkEnv.Api) (*DashboardsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dashboards", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dashboards", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DashboardsClient: %+v", err) } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/id_dashboard.go b/resource-manager/portal/2020-09-01-preview/dashboards/id_dashboard.go index bb77a43566c..9f88b9714ec 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/id_dashboard.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/id_dashboard.go @@ -42,7 +42,7 @@ func ParseDashboardID(input string) (*DashboardId, error) { } id := DashboardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDashboardIDInsensitively(input string) (*DashboardId, error) { } id := DashboardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/method_createorupdate.go b/resource-manager/portal/2020-09-01-preview/dashboards/method_createorupdate.go index 238e9387815..cd9cb0b6708 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/method_createorupdate.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DashboardsClient) CreateOrUpdate(ctx context.Context, id DashboardId, in var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/method_get.go b/resource-manager/portal/2020-09-01-preview/dashboards/method_get.go index 2b127462c91..9c2a124af3b 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/method_get.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/method_get.go @@ -45,7 +45,6 @@ func (c DashboardsClient) Get(ctx context.Context, id DashboardId) (result GetOp var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/method_update.go b/resource-manager/portal/2020-09-01-preview/dashboards/method_update.go index 8cc1dae4270..f12bad77874 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/method_update.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/method_update.go @@ -49,7 +49,6 @@ func (c DashboardsClient) Update(ctx context.Context, id DashboardId, input Patc var model Dashboard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardpartmetadata.go b/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardpartmetadata.go index 38ecb069dc9..82f6d8a5ee0 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardpartmetadata.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardpartmetadata.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DashboardPartMetadata interface { + DashboardPartMetadata() BaseDashboardPartMetadataImpl } -// RawDashboardPartMetadataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DashboardPartMetadata = BaseDashboardPartMetadataImpl{} + +type BaseDashboardPartMetadataImpl struct { + Type DashboardPartMetadataType `json:"type"` +} + +func (s BaseDashboardPartMetadataImpl) DashboardPartMetadata() BaseDashboardPartMetadataImpl { + return s +} + +var _ DashboardPartMetadata = RawDashboardPartMetadataImpl{} + +// RawDashboardPartMetadataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDashboardPartMetadataImpl struct { - Type string - Values map[string]interface{} + dashboardPartMetadata BaseDashboardPartMetadataImpl + Type string + Values map[string]interface{} +} + +func (s RawDashboardPartMetadataImpl) DashboardPartMetadata() BaseDashboardPartMetadataImpl { + return s.dashboardPartMetadata } -func unmarshalDashboardPartMetadataImplementation(input []byte) (DashboardPartMetadata, error) { +func UnmarshalDashboardPartMetadataImplementation(input []byte) (DashboardPartMetadata, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDashboardPartMetadataImplementation(input []byte) (DashboardPartMe return out, nil } - out := RawDashboardPartMetadataImpl{ - Type: value, - Values: temp, + var parent BaseDashboardPartMetadataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDashboardPartMetadataImpl: %+v", err) } - return out, nil + + return RawDashboardPartMetadataImpl{ + dashboardPartMetadata: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardparts.go b/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardparts.go index 9b6209c10d6..d57c2548179 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardparts.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/model_dashboardparts.go @@ -30,7 +30,7 @@ func (s *DashboardParts) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["metadata"]; ok { - impl, err := unmarshalDashboardPartMetadataImplementation(v) + impl, err := UnmarshalDashboardPartMetadataImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Metadata' for 'DashboardParts': %+v", err) } diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/model_markdownpartmetadata.go b/resource-manager/portal/2020-09-01-preview/dashboards/model_markdownpartmetadata.go index 926e7db126d..cdb045119ab 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/model_markdownpartmetadata.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/model_markdownpartmetadata.go @@ -15,6 +15,14 @@ type MarkdownPartMetadata struct { Settings *MarkdownPartMetadataSettings `json:"settings,omitempty"` // Fields inherited from DashboardPartMetadata + + Type DashboardPartMetadataType `json:"type"` +} + +func (s MarkdownPartMetadata) DashboardPartMetadata() BaseDashboardPartMetadataImpl { + return BaseDashboardPartMetadataImpl{ + Type: s.Type, + } } var _ json.Marshaler = MarkdownPartMetadata{} @@ -28,9 +36,10 @@ func (s MarkdownPartMetadata) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MarkdownPartMetadata: %+v", err) } + decoded["type"] = "Extension/HubsExtension/PartType/MarkdownPart" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/portal/2020-09-01-preview/dashboards/version.go b/resource-manager/portal/2020-09-01-preview/dashboards/version.go index 9eee6096a5d..1eee0010af2 100644 --- a/resource-manager/portal/2020-09-01-preview/dashboards/version.go +++ b/resource-manager/portal/2020-09-01-preview/dashboards/version.go @@ -1,12 +1,10 @@ package dashboards -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dashboards/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dashboards/2020-09-01-preview" } diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/README.md b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/README.md index 7cde4b82c22..bc20869d76d 100644 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/README.md +++ b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations` Documentation -The `listtenantconfigurationviolationsoperations` SDK allows for interaction with the Azure Resource Manager Service `portal` (API Version `2020-09-01-preview`). +The `listtenantconfigurationviolationsoperations` SDK allows for interaction with Azure Resource Manager `portal` (API Version `2020-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/client.go b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/client.go index 8cf6969c076..62e17b397ab 100644 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/client.go +++ b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/client.go @@ -15,7 +15,7 @@ type ListTenantConfigurationViolationsOperationsClient struct { } func NewListTenantConfigurationViolationsOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ListTenantConfigurationViolationsOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listtenantconfigurationviolationsoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listtenantconfigurationviolationsoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListTenantConfigurationViolationsOperationsClient: %+v", err) } diff --git a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/version.go b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/version.go index 362992020b3..bdc5c9a07be 100644 --- a/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/version.go +++ b/resource-manager/portal/2020-09-01-preview/listtenantconfigurationviolationsoperations/version.go @@ -1,12 +1,10 @@ package listtenantconfigurationviolationsoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listtenantconfigurationviolationsoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listtenantconfigurationviolationsoperations/2020-09-01-preview" } diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/README.md b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/README.md index 132896737fa..8b26ffca5df 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/README.md +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/portal/2020-09-01-preview/tenantconfigurations` Documentation -The `tenantconfigurations` SDK allows for interaction with the Azure Resource Manager Service `portal` (API Version `2020-09-01-preview`). +The `tenantconfigurations` SDK allows for interaction with Azure Resource Manager `portal` (API Version `2020-09-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/client.go b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/client.go index 2f9c300b9cd..4a0ba911d26 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/client.go +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/client.go @@ -15,7 +15,7 @@ type TenantConfigurationsClient struct { } func NewTenantConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenantconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenantconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantConfigurationsClient: %+v", err) } diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/id_tenantconfiguration.go b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/id_tenantconfiguration.go index 222c25bd1e4..7022e78051b 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/id_tenantconfiguration.go +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/id_tenantconfiguration.go @@ -38,7 +38,7 @@ func ParseTenantConfigurationID(input string) (*TenantConfigurationId, error) { } id := TenantConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseTenantConfigurationIDInsensitively(input string) (*TenantConfiguration } id := TenantConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_create.go b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_create.go index 188a55fbe2d..9828c5cff22 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_create.go +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_create.go @@ -50,7 +50,6 @@ func (c TenantConfigurationsClient) Create(ctx context.Context, id TenantConfigu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_get.go b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_get.go index 322fa3bdb88..d5b18d319ca 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_get.go +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c TenantConfigurationsClient) Get(ctx context.Context, id TenantConfigurat var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/version.go b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/version.go index 3e8f275d72b..0c40c98cb5a 100644 --- a/resource-manager/portal/2020-09-01-preview/tenantconfigurations/version.go +++ b/resource-manager/portal/2020-09-01-preview/tenantconfigurations/version.go @@ -1,12 +1,10 @@ package tenantconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-09-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenantconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenantconfigurations/2020-09-01-preview" } diff --git a/resource-manager/postgresql/2017-12-01/checknameavailability/README.md b/resource-manager/postgresql/2017-12-01/checknameavailability/README.md index f01c09387f2..d845aa0ac84 100644 --- a/resource-manager/postgresql/2017-12-01/checknameavailability/README.md +++ b/resource-manager/postgresql/2017-12-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/checknameavailability/client.go b/resource-manager/postgresql/2017-12-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/postgresql/2017-12-01/checknameavailability/client.go +++ b/resource-manager/postgresql/2017-12-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/checknameavailability/method_execute.go b/resource-manager/postgresql/2017-12-01/checknameavailability/method_execute.go index 3e0dafaa034..372007a0930 100644 --- a/resource-manager/postgresql/2017-12-01/checknameavailability/method_execute.go +++ b/resource-manager/postgresql/2017-12-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/checknameavailability/version.go b/resource-manager/postgresql/2017-12-01/checknameavailability/version.go index b5b0e22c13c..575bd583eca 100644 --- a/resource-manager/postgresql/2017-12-01/checknameavailability/version.go +++ b/resource-manager/postgresql/2017-12-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/configurations/README.md b/resource-manager/postgresql/2017-12-01/configurations/README.md index 62f69b241ec..e60c9864fb3 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/README.md +++ b/resource-manager/postgresql/2017-12-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/configurations/client.go b/resource-manager/postgresql/2017-12-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/client.go +++ b/resource-manager/postgresql/2017-12-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go b/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go index ba89907cc66..0a13cf82bbb 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go +++ b/resource-manager/postgresql/2017-12-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/configurations/id_server.go b/resource-manager/postgresql/2017-12-01/configurations/id_server.go index f30c57b75b0..76930267197 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/id_server.go +++ b/resource-manager/postgresql/2017-12-01/configurations/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/configurations/method_get.go b/resource-manager/postgresql/2017-12-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/method_get.go +++ b/resource-manager/postgresql/2017-12-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver.go b/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver.go index b51c9a09a63..418fa10dd20 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver.go +++ b/resource-manager/postgresql/2017-12-01/configurations/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ConfigurationsClient) ListByServer(ctx context.Context, id ServerId) (re var model ConfigurationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/configurations/version.go b/resource-manager/postgresql/2017-12-01/configurations/version.go index 14506a04060..c7dc0ca0f7f 100644 --- a/resource-manager/postgresql/2017-12-01/configurations/version.go +++ b/resource-manager/postgresql/2017-12-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/configurationsupdate/README.md b/resource-manager/postgresql/2017-12-01/configurationsupdate/README.md index 53608bddcce..f445656b209 100644 --- a/resource-manager/postgresql/2017-12-01/configurationsupdate/README.md +++ b/resource-manager/postgresql/2017-12-01/configurationsupdate/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/configurationsupdate` Documentation -The `configurationsupdate` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `configurationsupdate` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/configurationsupdate/client.go b/resource-manager/postgresql/2017-12-01/configurationsupdate/client.go index 6e2a965b0d0..f6ec7ee8e25 100644 --- a/resource-manager/postgresql/2017-12-01/configurationsupdate/client.go +++ b/resource-manager/postgresql/2017-12-01/configurationsupdate/client.go @@ -15,7 +15,7 @@ type ConfigurationsUpdateClient struct { } func NewConfigurationsUpdateClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsUpdateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationsupdate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationsupdate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsUpdateClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/configurationsupdate/id_server.go b/resource-manager/postgresql/2017-12-01/configurationsupdate/id_server.go index 103e22a78cb..98d646ae4ad 100644 --- a/resource-manager/postgresql/2017-12-01/configurationsupdate/id_server.go +++ b/resource-manager/postgresql/2017-12-01/configurationsupdate/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/configurationsupdate/version.go b/resource-manager/postgresql/2017-12-01/configurationsupdate/version.go index 34a6f364482..5dc279a8eb4 100644 --- a/resource-manager/postgresql/2017-12-01/configurationsupdate/version.go +++ b/resource-manager/postgresql/2017-12-01/configurationsupdate/version.go @@ -1,12 +1,10 @@ package configurationsupdate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationsupdate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationsupdate/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/databases/README.md b/resource-manager/postgresql/2017-12-01/databases/README.md index 62a59cee9f3..d62c455a6f6 100644 --- a/resource-manager/postgresql/2017-12-01/databases/README.md +++ b/resource-manager/postgresql/2017-12-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/databases/client.go b/resource-manager/postgresql/2017-12-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/postgresql/2017-12-01/databases/client.go +++ b/resource-manager/postgresql/2017-12-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/databases/id_database.go b/resource-manager/postgresql/2017-12-01/databases/id_database.go index 6d0ca1df191..de5199013e5 100644 --- a/resource-manager/postgresql/2017-12-01/databases/id_database.go +++ b/resource-manager/postgresql/2017-12-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/databases/id_server.go b/resource-manager/postgresql/2017-12-01/databases/id_server.go index dc5fb2f0f8d..b2cbdae39c5 100644 --- a/resource-manager/postgresql/2017-12-01/databases/id_server.go +++ b/resource-manager/postgresql/2017-12-01/databases/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/databases/method_get.go b/resource-manager/postgresql/2017-12-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/postgresql/2017-12-01/databases/method_get.go +++ b/resource-manager/postgresql/2017-12-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/databases/method_listbyserver.go b/resource-manager/postgresql/2017-12-01/databases/method_listbyserver.go index a4dd2fdfeed..cf9744c0c74 100644 --- a/resource-manager/postgresql/2017-12-01/databases/method_listbyserver.go +++ b/resource-manager/postgresql/2017-12-01/databases/method_listbyserver.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListByServer(ctx context.Context, id ServerId) (result var model DatabaseListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/databases/version.go b/resource-manager/postgresql/2017-12-01/databases/version.go index 8d6c0a801d3..694f15eb240 100644 --- a/resource-manager/postgresql/2017-12-01/databases/version.go +++ b/resource-manager/postgresql/2017-12-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/README.md b/resource-manager/postgresql/2017-12-01/firewallrules/README.md index df11d1f28ee..99baa562606 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/README.md +++ b/resource-manager/postgresql/2017-12-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/client.go b/resource-manager/postgresql/2017-12-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/client.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go b/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go index 44619b8f595..298113002e6 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go b/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go index 52564145ec2..87818a09af9 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/method_get.go b/resource-manager/postgresql/2017-12-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/method_get.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver.go b/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver.go index 3d8818b6fad..a3d638705b3 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/method_listbyserver.go @@ -46,7 +46,6 @@ func (c FirewallRulesClient) ListByServer(ctx context.Context, id ServerId) (res var model FirewallRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/firewallrules/version.go b/resource-manager/postgresql/2017-12-01/firewallrules/version.go index 38c1ba53b63..5e0f91bdd34 100644 --- a/resource-manager/postgresql/2017-12-01/firewallrules/version.go +++ b/resource-manager/postgresql/2017-12-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/README.md b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/README.md index 69316ca0124..580931c5c69 100644 --- a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/README.md +++ b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/locationbasedperformancetier` Documentation -The `locationbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `locationbasedperformancetier` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/client.go b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/client.go index 846c4a93847..6c8dbf7da88 100644 --- a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/client.go +++ b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/client.go @@ -15,7 +15,7 @@ type LocationBasedPerformanceTierClient struct { } func NewLocationBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/id_location.go b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/id_location.go index e9e09309a03..b342ad527db 100644 --- a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/id_location.go +++ b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/method_list.go b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/method_list.go index ebc7c810809..9b138ad417e 100644 --- a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/method_list.go +++ b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c LocationBasedPerformanceTierClient) List(ctx context.Context, id Locatio var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/version.go b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/version.go index c8c4af35429..184aad3a179 100644 --- a/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/version.go +++ b/resource-manager/postgresql/2017-12-01/locationbasedperformancetier/version.go @@ -1,12 +1,10 @@ package locationbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedperformancetier/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/logfiles/README.md b/resource-manager/postgresql/2017-12-01/logfiles/README.md index cf1d118f8a7..393ac4a58f9 100644 --- a/resource-manager/postgresql/2017-12-01/logfiles/README.md +++ b/resource-manager/postgresql/2017-12-01/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/logfiles/client.go b/resource-manager/postgresql/2017-12-01/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/postgresql/2017-12-01/logfiles/client.go +++ b/resource-manager/postgresql/2017-12-01/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/logfiles/id_server.go b/resource-manager/postgresql/2017-12-01/logfiles/id_server.go index 852c433c18d..82196bab2ee 100644 --- a/resource-manager/postgresql/2017-12-01/logfiles/id_server.go +++ b/resource-manager/postgresql/2017-12-01/logfiles/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/logfiles/method_listbyserver.go b/resource-manager/postgresql/2017-12-01/logfiles/method_listbyserver.go index b692a2fed8a..3fb99612687 100644 --- a/resource-manager/postgresql/2017-12-01/logfiles/method_listbyserver.go +++ b/resource-manager/postgresql/2017-12-01/logfiles/method_listbyserver.go @@ -46,7 +46,6 @@ func (c LogFilesClient) ListByServer(ctx context.Context, id ServerId) (result L var model LogFileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/logfiles/version.go b/resource-manager/postgresql/2017-12-01/logfiles/version.go index 27dfc7d12ca..9e577665182 100644 --- a/resource-manager/postgresql/2017-12-01/logfiles/version.go +++ b/resource-manager/postgresql/2017-12-01/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/recoverableservers/README.md b/resource-manager/postgresql/2017-12-01/recoverableservers/README.md index f8ac9cef17a..01cb6f34c3d 100644 --- a/resource-manager/postgresql/2017-12-01/recoverableservers/README.md +++ b/resource-manager/postgresql/2017-12-01/recoverableservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/recoverableservers` Documentation -The `recoverableservers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `recoverableservers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/recoverableservers/client.go b/resource-manager/postgresql/2017-12-01/recoverableservers/client.go index f1d53f03119..d3c7ef23750 100644 --- a/resource-manager/postgresql/2017-12-01/recoverableservers/client.go +++ b/resource-manager/postgresql/2017-12-01/recoverableservers/client.go @@ -15,7 +15,7 @@ type RecoverableServersClient struct { } func NewRecoverableServersClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverableservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverableservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/recoverableservers/id_server.go b/resource-manager/postgresql/2017-12-01/recoverableservers/id_server.go index ee949b75dd5..cf55358d669 100644 --- a/resource-manager/postgresql/2017-12-01/recoverableservers/id_server.go +++ b/resource-manager/postgresql/2017-12-01/recoverableservers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/recoverableservers/method_get.go b/resource-manager/postgresql/2017-12-01/recoverableservers/method_get.go index 55a405aca8d..9301dfcf53e 100644 --- a/resource-manager/postgresql/2017-12-01/recoverableservers/method_get.go +++ b/resource-manager/postgresql/2017-12-01/recoverableservers/method_get.go @@ -46,7 +46,6 @@ func (c RecoverableServersClient) Get(ctx context.Context, id ServerId) (result var model RecoverableServerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/recoverableservers/version.go b/resource-manager/postgresql/2017-12-01/recoverableservers/version.go index 83ae9b19beb..32e329e9aa5 100644 --- a/resource-manager/postgresql/2017-12-01/recoverableservers/version.go +++ b/resource-manager/postgresql/2017-12-01/recoverableservers/version.go @@ -1,12 +1,10 @@ package recoverableservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverableservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverableservers/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/replicas/README.md b/resource-manager/postgresql/2017-12-01/replicas/README.md index 0867f669fea..e95ef7a3ff3 100644 --- a/resource-manager/postgresql/2017-12-01/replicas/README.md +++ b/resource-manager/postgresql/2017-12-01/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `replicas` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/replicas/client.go b/resource-manager/postgresql/2017-12-01/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/postgresql/2017-12-01/replicas/client.go +++ b/resource-manager/postgresql/2017-12-01/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/replicas/id_server.go b/resource-manager/postgresql/2017-12-01/replicas/id_server.go index 212134762fe..60f4abcaaed 100644 --- a/resource-manager/postgresql/2017-12-01/replicas/id_server.go +++ b/resource-manager/postgresql/2017-12-01/replicas/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver.go b/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver.go index 2908a99e4c3..a0d6916d9e0 100644 --- a/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver.go +++ b/resource-manager/postgresql/2017-12-01/replicas/method_listbyserver.go @@ -46,7 +46,6 @@ func (c ReplicasClient) ListByServer(ctx context.Context, id ServerId) (result L var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/replicas/version.go b/resource-manager/postgresql/2017-12-01/replicas/version.go index 127efac8486..c3783af89ae 100644 --- a/resource-manager/postgresql/2017-12-01/replicas/version.go +++ b/resource-manager/postgresql/2017-12-01/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/README.md b/resource-manager/postgresql/2017-12-01/serveradministrators/README.md index 364e18bdfa7..9fe5e25a72e 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/README.md +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serveradministrators` Documentation -The `serveradministrators` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `serveradministrators` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/client.go b/resource-manager/postgresql/2017-12-01/serveradministrators/client.go index de0fa892b40..4c33543f7f9 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/client.go +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/client.go @@ -15,7 +15,7 @@ type ServerAdministratorsClient struct { } func NewServerAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdministratorsClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go b/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go index 1c4d1b21e65..8cfd10e28f2 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/method_get.go b/resource-manager/postgresql/2017-12-01/serveradministrators/method_get.go index b469795c6ca..d02b59e815d 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/method_get.go +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/method_get.go @@ -46,7 +46,6 @@ func (c ServerAdministratorsClient) Get(ctx context.Context, id ServerId) (resul var model ServerAdministratorResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/method_list.go b/resource-manager/postgresql/2017-12-01/serveradministrators/method_list.go index 7149fba6562..f357647c46c 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/method_list.go +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/method_list.go @@ -46,7 +46,6 @@ func (c ServerAdministratorsClient) List(ctx context.Context, id ServerId) (resu var model ServerAdministratorResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/serveradministrators/version.go b/resource-manager/postgresql/2017-12-01/serveradministrators/version.go index c33f7aa2ba6..44c85ad7c7d 100644 --- a/resource-manager/postgresql/2017-12-01/serveradministrators/version.go +++ b/resource-manager/postgresql/2017-12-01/serveradministrators/version.go @@ -1,12 +1,10 @@ package serveradministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradministrators/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/README.md b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/README.md index e563b84b2a0..cf3afe2a7df 100644 --- a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/README.md +++ b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serverbasedperformancetier` Documentation -The `serverbasedperformancetier` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `serverbasedperformancetier` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/client.go b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/client.go index f4cfb845cfc..285b3ba8d88 100644 --- a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/client.go +++ b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/client.go @@ -15,7 +15,7 @@ type ServerBasedPerformanceTierClient struct { } func NewServerBasedPerformanceTierClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerBasedPerformanceTierClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverbasedperformancetier", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerBasedPerformanceTierClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/id_server.go b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/id_server.go index e1ffe364f0b..23d5b8ca8d1 100644 --- a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/id_server.go +++ b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/method_list.go b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/method_list.go index 94438aeb619..57a6a043c44 100644 --- a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/method_list.go +++ b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/method_list.go @@ -46,7 +46,6 @@ func (c ServerBasedPerformanceTierClient) List(ctx context.Context, id ServerId) var model PerformanceTierListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/version.go b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/version.go index 9f0f6bffe08..f41ed267245 100644 --- a/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/version.go +++ b/resource-manager/postgresql/2017-12-01/serverbasedperformancetier/version.go @@ -1,12 +1,10 @@ package serverbasedperformancetier -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverbasedperformancetier/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverbasedperformancetier/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/serverrestart/client.go b/resource-manager/postgresql/2017-12-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/postgresql/2017-12-01/serverrestart/client.go +++ b/resource-manager/postgresql/2017-12-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/serverrestart/id_server.go b/resource-manager/postgresql/2017-12-01/serverrestart/id_server.go index 198dc4a99da..bd241859f4d 100644 --- a/resource-manager/postgresql/2017-12-01/serverrestart/id_server.go +++ b/resource-manager/postgresql/2017-12-01/serverrestart/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/serverrestart/version.go b/resource-manager/postgresql/2017-12-01/serverrestart/version.go index 80fdf66e1aa..45d76b495b6 100644 --- a/resource-manager/postgresql/2017-12-01/serverrestart/version.go +++ b/resource-manager/postgresql/2017-12-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/servers/README.md b/resource-manager/postgresql/2017-12-01/servers/README.md index e3d583d72af..a3ffd420cdb 100644 --- a/resource-manager/postgresql/2017-12-01/servers/README.md +++ b/resource-manager/postgresql/2017-12-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/servers/client.go b/resource-manager/postgresql/2017-12-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/postgresql/2017-12-01/servers/client.go +++ b/resource-manager/postgresql/2017-12-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/servers/id_server.go b/resource-manager/postgresql/2017-12-01/servers/id_server.go index 336f02b9834..741841a5bdb 100644 --- a/resource-manager/postgresql/2017-12-01/servers/id_server.go +++ b/resource-manager/postgresql/2017-12-01/servers/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/servers/method_get.go b/resource-manager/postgresql/2017-12-01/servers/method_get.go index 7087cf8acac..e321c1fa288 100644 --- a/resource-manager/postgresql/2017-12-01/servers/method_get.go +++ b/resource-manager/postgresql/2017-12-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperatio var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/servers/method_list.go b/resource-manager/postgresql/2017-12-01/servers/method_list.go index 9c8cc466916..15fd7e1a279 100644 --- a/resource-manager/postgresql/2017-12-01/servers/method_list.go +++ b/resource-manager/postgresql/2017-12-01/servers/method_list.go @@ -47,7 +47,6 @@ func (c ServersClient) List(ctx context.Context, id commonids.SubscriptionId) (r var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup.go b/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup.go index 857cabd3efd..9b593566eca 100644 --- a/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup.go +++ b/resource-manager/postgresql/2017-12-01/servers/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ServersClient) ListByResourceGroup(ctx context.Context, id commonids.Res var model ServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverforcreate.go b/resource-manager/postgresql/2017-12-01/servers/model_serverforcreate.go index 171c190411b..1df0ac16bbb 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverforcreate.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverforcreate.go @@ -38,7 +38,7 @@ func (s *ServerForCreate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServerPropertiesForCreateImplementation(v) + impl, err := UnmarshalServerPropertiesForCreateImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServerForCreate': %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforcreate.go b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforcreate.go index 84868e2551e..641f5cfbf2b 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforcreate.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforcreate.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerPropertiesForCreate interface { + ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl } -// RawServerPropertiesForCreateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServerPropertiesForCreate = BaseServerPropertiesForCreateImpl{} + +type BaseServerPropertiesForCreateImpl struct { + CreateMode CreateMode `json:"createMode"` + InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` + MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` + PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + SslEnforcement *SslEnforcementEnum `json:"sslEnforcement,omitempty"` + StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (s BaseServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s +} + +var _ ServerPropertiesForCreate = RawServerPropertiesForCreateImpl{} + +// RawServerPropertiesForCreateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServerPropertiesForCreateImpl struct { - Type string - Values map[string]interface{} + serverPropertiesForCreate BaseServerPropertiesForCreateImpl + Type string + Values map[string]interface{} +} + +func (s RawServerPropertiesForCreateImpl) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return s.serverPropertiesForCreate } -func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { +func UnmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPropertiesForCreate, error) { if input == nil { return nil, nil } @@ -68,10 +91,15 @@ func unmarshalServerPropertiesForCreateImplementation(input []byte) (ServerPrope return out, nil } - out := RawServerPropertiesForCreateImpl{ - Type: value, - Values: temp, + var parent BaseServerPropertiesForCreateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServerPropertiesForCreateImpl: %+v", err) } - return out, nil + + return RawServerPropertiesForCreateImpl{ + serverPropertiesForCreate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go index efa1824c838..59c728717e7 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesfordefaultcreate.go @@ -15,6 +15,8 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLoginPassword string `json:"administratorLoginPassword"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -23,6 +25,18 @@ type ServerPropertiesForDefaultCreate struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForDefaultCreate) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForDefaultCreate{} func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForDefaultCreate: %+v", err) } + decoded["createMode"] = "Default" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforgeorestore.go b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforgeorestore.go index f3775b48d53..0be124f4048 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforgeorestore.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforgeorestore.go @@ -14,6 +14,8 @@ type ServerPropertiesForGeoRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -22,6 +24,18 @@ type ServerPropertiesForGeoRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForGeoRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForGeoRestore{} func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForGeoRestore: %+v", err) } + decoded["createMode"] = "GeoRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforreplica.go b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforreplica.go index 9f8a64ee6e7..973fb257c23 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforreplica.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforreplica.go @@ -14,6 +14,8 @@ type ServerPropertiesForReplica struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -22,6 +24,18 @@ type ServerPropertiesForReplica struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForReplica) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForReplica{} func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForReplica: %+v", err) } + decoded["createMode"] = "Replica" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforrestore.go b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforrestore.go index 0a74bb93817..f28614737ea 100644 --- a/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforrestore.go +++ b/resource-manager/postgresql/2017-12-01/servers/model_serverpropertiesforrestore.go @@ -15,6 +15,8 @@ type ServerPropertiesForRestore struct { SourceServerId string `json:"sourceServerId"` // Fields inherited from ServerPropertiesForCreate + + CreateMode CreateMode `json:"createMode"` InfrastructureEncryption *InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` MinimalTlsVersion *MinimalTlsVersionEnum `json:"minimalTlsVersion,omitempty"` PublicNetworkAccess *PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` @@ -23,6 +25,18 @@ type ServerPropertiesForRestore struct { Version *ServerVersion `json:"version,omitempty"` } +func (s ServerPropertiesForRestore) ServerPropertiesForCreate() BaseServerPropertiesForCreateImpl { + return BaseServerPropertiesForCreateImpl{ + CreateMode: s.CreateMode, + InfrastructureEncryption: s.InfrastructureEncryption, + MinimalTlsVersion: s.MinimalTlsVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + SslEnforcement: s.SslEnforcement, + StorageProfile: s.StorageProfile, + Version: s.Version, + } +} + var _ json.Marshaler = ServerPropertiesForRestore{} func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { @@ -34,9 +48,10 @@ func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerPropertiesForRestore: %+v", err) } + decoded["createMode"] = "PointInTimeRestore" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/postgresql/2017-12-01/servers/version.go b/resource-manager/postgresql/2017-12-01/servers/version.go index 80804cb0155..8a215301966 100644 --- a/resource-manager/postgresql/2017-12-01/servers/version.go +++ b/resource-manager/postgresql/2017-12-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/README.md b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/README.md index 3042ca18fcf..4d6434c1787 100644 --- a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/README.md +++ b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/client.go b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/client.go +++ b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go index 9acf53fc744..ca37f727b45 100644 --- a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go +++ b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get.go b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get.go index d3786ed5879..350ddae047b 100644 --- a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get.go +++ b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id ServerId) var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/version.go b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/version.go index f7fc4c20d1d..a8cdb3f5978 100644 --- a/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/version.go +++ b/resource-manager/postgresql/2017-12-01/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2017-12-01" } diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/README.md b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/README.md index 4a15410e459..f34a79e59a5 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/README.md +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2017-12-01`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2017-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/client.go b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/client.go +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go index 73430aacd79..7c7be416320 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go index 20f46b888ba..3c242d7049f 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get.go b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get.go +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/version.go b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/version.go index 11bd3d9075a..2f26470a34a 100644 --- a/resource-manager/postgresql/2017-12-01/virtualnetworkrules/version.go +++ b/resource-manager/postgresql/2017-12-01/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2017-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2017-12-01" } diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/README.md b/resource-manager/postgresql/2020-01-01/serverkeys/README.md index cfa23ca10eb..80b7f24953a 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/README.md +++ b/resource-manager/postgresql/2020-01-01/serverkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2020-01-01/serverkeys` Documentation -The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2020-01-01`). +The `serverkeys` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/client.go b/resource-manager/postgresql/2020-01-01/serverkeys/client.go index 83970b7eb35..0616b182cbb 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/client.go +++ b/resource-manager/postgresql/2020-01-01/serverkeys/client.go @@ -15,7 +15,7 @@ type ServerKeysClient struct { } func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) } diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go b/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go index aefc3826e88..f5f7fac8ec4 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go +++ b/resource-manager/postgresql/2020-01-01/serverkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go b/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go index 5969d423825..142c6c83caa 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go +++ b/resource-manager/postgresql/2020-01-01/serverkeys/id_server.go @@ -42,7 +42,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/method_get.go b/resource-manager/postgresql/2020-01-01/serverkeys/method_get.go index cdd81e30407..e6b4acc396a 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/method_get.go +++ b/resource-manager/postgresql/2020-01-01/serverkeys/method_get.go @@ -45,7 +45,6 @@ func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperatio var model ServerKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2020-01-01/serverkeys/version.go b/resource-manager/postgresql/2020-01-01/serverkeys/version.go index 0155b1ec796..4b861b9abbc 100644 --- a/resource-manager/postgresql/2020-01-01/serverkeys/version.go +++ b/resource-manager/postgresql/2020-01-01/serverkeys/version.go @@ -1,12 +1,10 @@ package serverkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverkeys/2020-01-01" } diff --git a/resource-manager/postgresql/2021-06-01/checknameavailability/README.md b/resource-manager/postgresql/2021-06-01/checknameavailability/README.md index f7221556a7d..d2f421c867f 100644 --- a/resource-manager/postgresql/2021-06-01/checknameavailability/README.md +++ b/resource-manager/postgresql/2021-06-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/checknameavailability/client.go b/resource-manager/postgresql/2021-06-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/postgresql/2021-06-01/checknameavailability/client.go +++ b/resource-manager/postgresql/2021-06-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/checknameavailability/method_execute.go b/resource-manager/postgresql/2021-06-01/checknameavailability/method_execute.go index 3e0dafaa034..372007a0930 100644 --- a/resource-manager/postgresql/2021-06-01/checknameavailability/method_execute.go +++ b/resource-manager/postgresql/2021-06-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/checknameavailability/version.go b/resource-manager/postgresql/2021-06-01/checknameavailability/version.go index 53deafe3312..282dd5e8cd0 100644 --- a/resource-manager/postgresql/2021-06-01/checknameavailability/version.go +++ b/resource-manager/postgresql/2021-06-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/configurations/README.md b/resource-manager/postgresql/2021-06-01/configurations/README.md index 4e16c306e84..3ef8576c256 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/README.md +++ b/resource-manager/postgresql/2021-06-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/configurations/client.go b/resource-manager/postgresql/2021-06-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/client.go +++ b/resource-manager/postgresql/2021-06-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go b/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go index 87bea8b781e..c3549afd419 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go +++ b/resource-manager/postgresql/2021-06-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go index 6109a87bd01..73c571ce344 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/configurations/method_get.go b/resource-manager/postgresql/2021-06-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/method_get.go +++ b/resource-manager/postgresql/2021-06-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/configurations/version.go b/resource-manager/postgresql/2021-06-01/configurations/version.go index d5ec5102c44..2e08fe82e90 100644 --- a/resource-manager/postgresql/2021-06-01/configurations/version.go +++ b/resource-manager/postgresql/2021-06-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/databases/README.md b/resource-manager/postgresql/2021-06-01/databases/README.md index e47a79a3de8..92aa563e561 100644 --- a/resource-manager/postgresql/2021-06-01/databases/README.md +++ b/resource-manager/postgresql/2021-06-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/databases/client.go b/resource-manager/postgresql/2021-06-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/postgresql/2021-06-01/databases/client.go +++ b/resource-manager/postgresql/2021-06-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/databases/id_database.go b/resource-manager/postgresql/2021-06-01/databases/id_database.go index c0b9fb64754..fe38dbeeab1 100644 --- a/resource-manager/postgresql/2021-06-01/databases/id_database.go +++ b/resource-manager/postgresql/2021-06-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/databases/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/databases/id_flexibleserver.go index 820d1eaed7d..dcfa294c403 100644 --- a/resource-manager/postgresql/2021-06-01/databases/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/databases/method_get.go b/resource-manager/postgresql/2021-06-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/postgresql/2021-06-01/databases/method_get.go +++ b/resource-manager/postgresql/2021-06-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/databases/version.go b/resource-manager/postgresql/2021-06-01/databases/version.go index 6fa6f9e9056..9a78fcd7927 100644 --- a/resource-manager/postgresql/2021-06-01/databases/version.go +++ b/resource-manager/postgresql/2021-06-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/README.md b/resource-manager/postgresql/2021-06-01/firewallrules/README.md index 0d82e361056..5fe9265da5b 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/README.md +++ b/resource-manager/postgresql/2021-06-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/client.go b/resource-manager/postgresql/2021-06-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/client.go +++ b/resource-manager/postgresql/2021-06-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/id_firewallrule.go b/resource-manager/postgresql/2021-06-01/firewallrules/id_firewallrule.go index 7e7fd2e3d41..62440415a11 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/id_firewallrule.go +++ b/resource-manager/postgresql/2021-06-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/firewallrules/id_flexibleserver.go index f5408e980f1..f4ff8a91351 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/method_get.go b/resource-manager/postgresql/2021-06-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/method_get.go +++ b/resource-manager/postgresql/2021-06-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/firewallrules/version.go b/resource-manager/postgresql/2021-06-01/firewallrules/version.go index 75a8730ee27..d2026e9e773 100644 --- a/resource-manager/postgresql/2021-06-01/firewallrules/version.go +++ b/resource-manager/postgresql/2021-06-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/client.go b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/client.go +++ b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/method_execute.go b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/method_execute.go index 790e209c4f3..f9e99478551 100644 --- a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/version.go b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/version.go index a3b2591c1e3..21e1e62f139 100644 --- a/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/version.go +++ b/resource-manager/postgresql/2021-06-01/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/README.md b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/README.md index d1159806fd7..7709c521d34 100644 --- a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/README.md +++ b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/client.go b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/client.go +++ b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/id_location.go b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/id_location.go index b8d63fe649f..5f97ceb2eae 100644 --- a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/id_location.go +++ b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/version.go b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/version.go index 1c88c5f32f6..a983c663e7c 100644 --- a/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/version.go +++ b/resource-manager/postgresql/2021-06-01/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/serverrestart/README.md b/resource-manager/postgresql/2021-06-01/serverrestart/README.md index 48b7dd87f24..78b89ebfb26 100644 --- a/resource-manager/postgresql/2021-06-01/serverrestart/README.md +++ b/resource-manager/postgresql/2021-06-01/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/serverrestart/client.go b/resource-manager/postgresql/2021-06-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/postgresql/2021-06-01/serverrestart/client.go +++ b/resource-manager/postgresql/2021-06-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go index 9a3b6af7455..6d88114486b 100644 --- a/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/serverrestart/version.go b/resource-manager/postgresql/2021-06-01/serverrestart/version.go index 34503f2369e..1cbca8a727a 100644 --- a/resource-manager/postgresql/2021-06-01/serverrestart/version.go +++ b/resource-manager/postgresql/2021-06-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/servers/README.md b/resource-manager/postgresql/2021-06-01/servers/README.md index 4451ae5ff3f..5fb0c7cf681 100644 --- a/resource-manager/postgresql/2021-06-01/servers/README.md +++ b/resource-manager/postgresql/2021-06-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2021-06-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2021-06-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2021-06-01/servers/client.go b/resource-manager/postgresql/2021-06-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/postgresql/2021-06-01/servers/client.go +++ b/resource-manager/postgresql/2021-06-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/servers/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/servers/id_flexibleserver.go index 94ec2a6bccd..092664a7b04 100644 --- a/resource-manager/postgresql/2021-06-01/servers/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/servers/method_get.go b/resource-manager/postgresql/2021-06-01/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/postgresql/2021-06-01/servers/method_get.go +++ b/resource-manager/postgresql/2021-06-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2021-06-01/servers/version.go b/resource-manager/postgresql/2021-06-01/servers/version.go index e7b3626ba2d..2f69e77c92d 100644 --- a/resource-manager/postgresql/2021-06-01/servers/version.go +++ b/resource-manager/postgresql/2021-06-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/serverstart/client.go b/resource-manager/postgresql/2021-06-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/postgresql/2021-06-01/serverstart/client.go +++ b/resource-manager/postgresql/2021-06-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/serverstart/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/serverstart/id_flexibleserver.go index cf047ba1f7b..8e7a785605f 100644 --- a/resource-manager/postgresql/2021-06-01/serverstart/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/serverstart/version.go b/resource-manager/postgresql/2021-06-01/serverstart/version.go index c0caffed224..b94baf18bd4 100644 --- a/resource-manager/postgresql/2021-06-01/serverstart/version.go +++ b/resource-manager/postgresql/2021-06-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2021-06-01" } diff --git a/resource-manager/postgresql/2021-06-01/serverstop/client.go b/resource-manager/postgresql/2021-06-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/postgresql/2021-06-01/serverstop/client.go +++ b/resource-manager/postgresql/2021-06-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/postgresql/2021-06-01/serverstop/id_flexibleserver.go b/resource-manager/postgresql/2021-06-01/serverstop/id_flexibleserver.go index a68b62f7707..962dcb2cfd5 100644 --- a/resource-manager/postgresql/2021-06-01/serverstop/id_flexibleserver.go +++ b/resource-manager/postgresql/2021-06-01/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2021-06-01/serverstop/version.go b/resource-manager/postgresql/2021-06-01/serverstop/version.go index bea9f229ac4..3a0f0d62e8c 100644 --- a/resource-manager/postgresql/2021-06-01/serverstop/version.go +++ b/resource-manager/postgresql/2021-06-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2021-06-01" } diff --git a/resource-manager/postgresql/2022-12-01/administrators/README.md b/resource-manager/postgresql/2022-12-01/administrators/README.md index 71ac11b55fb..e10e6c6c1f1 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/README.md +++ b/resource-manager/postgresql/2022-12-01/administrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/administrators` Documentation -The `administrators` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `administrators` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/administrators/client.go b/resource-manager/postgresql/2022-12-01/administrators/client.go index c1c8ddd284e..6fd32a5af24 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/client.go +++ b/resource-manager/postgresql/2022-12-01/administrators/client.go @@ -15,7 +15,7 @@ type AdministratorsClient struct { } func NewAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "administrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "administrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdministratorsClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go b/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go index 06074360c88..d70de4fbd3f 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go +++ b/resource-manager/postgresql/2022-12-01/administrators/id_administrator.go @@ -44,7 +44,7 @@ func ParseAdministratorID(input string) (*AdministratorId, error) { } id := AdministratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdministratorIDInsensitively(input string) (*AdministratorId, error) { } id := AdministratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go index eb957f984d9..fd5964179b8 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/administrators/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/administrators/method_get.go b/resource-manager/postgresql/2022-12-01/administrators/method_get.go index a3eb4fd8972..a4f50294a89 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/method_get.go +++ b/resource-manager/postgresql/2022-12-01/administrators/method_get.go @@ -45,7 +45,6 @@ func (c AdministratorsClient) Get(ctx context.Context, id AdministratorId) (resu var model ActiveDirectoryAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/administrators/version.go b/resource-manager/postgresql/2022-12-01/administrators/version.go index ebf756ae1fe..78aefc28eb7 100644 --- a/resource-manager/postgresql/2022-12-01/administrators/version.go +++ b/resource-manager/postgresql/2022-12-01/administrators/version.go @@ -1,12 +1,10 @@ package administrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/administrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/administrators/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/backups/README.md b/resource-manager/postgresql/2022-12-01/backups/README.md index ea832a1b93c..57f8d35308b 100644 --- a/resource-manager/postgresql/2022-12-01/backups/README.md +++ b/resource-manager/postgresql/2022-12-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/backups/client.go b/resource-manager/postgresql/2022-12-01/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/postgresql/2022-12-01/backups/client.go +++ b/resource-manager/postgresql/2022-12-01/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/backups/id_backup.go b/resource-manager/postgresql/2022-12-01/backups/id_backup.go index 9aa1cf46b68..cd398743823 100644 --- a/resource-manager/postgresql/2022-12-01/backups/id_backup.go +++ b/resource-manager/postgresql/2022-12-01/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/backups/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/backups/id_flexibleserver.go index d5b2bdbb7e2..08c0557dd86 100644 --- a/resource-manager/postgresql/2022-12-01/backups/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/backups/method_get.go b/resource-manager/postgresql/2022-12-01/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/postgresql/2022-12-01/backups/method_get.go +++ b/resource-manager/postgresql/2022-12-01/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/backups/version.go b/resource-manager/postgresql/2022-12-01/backups/version.go index 8fd099f3230..1f3db1bd692 100644 --- a/resource-manager/postgresql/2022-12-01/backups/version.go +++ b/resource-manager/postgresql/2022-12-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/README.md b/resource-manager/postgresql/2022-12-01/checknameavailability/README.md index 84ea7de2176..cfcb589cea3 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/README.md +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/client.go b/resource-manager/postgresql/2022-12-01/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/client.go +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/id_location.go b/resource-manager/postgresql/2022-12-01/checknameavailability/id_location.go index 1947cd16871..82d8758cc43 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/id_location.go +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/method_execute.go b/resource-manager/postgresql/2022-12-01/checknameavailability/method_execute.go index 15113a339d3..fbb208858c9 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/method_execute.go +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/method_withlocationexecute.go b/resource-manager/postgresql/2022-12-01/checknameavailability/method_withlocationexecute.go index c8f35387669..34090e99b85 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/method_withlocationexecute.go +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/method_withlocationexecute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) WithLocationExecute(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/checknameavailability/version.go b/resource-manager/postgresql/2022-12-01/checknameavailability/version.go index b657bdd71fd..162306851b8 100644 --- a/resource-manager/postgresql/2022-12-01/checknameavailability/version.go +++ b/resource-manager/postgresql/2022-12-01/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/configurations/README.md b/resource-manager/postgresql/2022-12-01/configurations/README.md index df4094f653b..6550fb64ff9 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/README.md +++ b/resource-manager/postgresql/2022-12-01/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/configurations/client.go b/resource-manager/postgresql/2022-12-01/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/client.go +++ b/resource-manager/postgresql/2022-12-01/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/configurations/id_configuration.go b/resource-manager/postgresql/2022-12-01/configurations/id_configuration.go index 87bea8b781e..c3549afd419 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/id_configuration.go +++ b/resource-manager/postgresql/2022-12-01/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/configurations/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/configurations/id_flexibleserver.go index 6109a87bd01..73c571ce344 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/configurations/method_get.go b/resource-manager/postgresql/2022-12-01/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/method_get.go +++ b/resource-manager/postgresql/2022-12-01/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/configurations/version.go b/resource-manager/postgresql/2022-12-01/configurations/version.go index e34bd3ee42b..2c41e8a63ba 100644 --- a/resource-manager/postgresql/2022-12-01/configurations/version.go +++ b/resource-manager/postgresql/2022-12-01/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/databases/README.md b/resource-manager/postgresql/2022-12-01/databases/README.md index 7787c7963e3..dfbb31d4056 100644 --- a/resource-manager/postgresql/2022-12-01/databases/README.md +++ b/resource-manager/postgresql/2022-12-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/databases/client.go b/resource-manager/postgresql/2022-12-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/postgresql/2022-12-01/databases/client.go +++ b/resource-manager/postgresql/2022-12-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/databases/id_database.go b/resource-manager/postgresql/2022-12-01/databases/id_database.go index c0b9fb64754..fe38dbeeab1 100644 --- a/resource-manager/postgresql/2022-12-01/databases/id_database.go +++ b/resource-manager/postgresql/2022-12-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go index 820d1eaed7d..dcfa294c403 100644 --- a/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/databases/method_get.go b/resource-manager/postgresql/2022-12-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/postgresql/2022-12-01/databases/method_get.go +++ b/resource-manager/postgresql/2022-12-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/databases/version.go b/resource-manager/postgresql/2022-12-01/databases/version.go index 5812c716548..dc150c80b00 100644 --- a/resource-manager/postgresql/2022-12-01/databases/version.go +++ b/resource-manager/postgresql/2022-12-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/README.md b/resource-manager/postgresql/2022-12-01/firewallrules/README.md index 9c6b89fce56..0af46e3994c 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/README.md +++ b/resource-manager/postgresql/2022-12-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/client.go b/resource-manager/postgresql/2022-12-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/client.go +++ b/resource-manager/postgresql/2022-12-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go b/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go index 7e7fd2e3d41..62440415a11 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go +++ b/resource-manager/postgresql/2022-12-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go index f5408e980f1..f4ff8a91351 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/method_get.go b/resource-manager/postgresql/2022-12-01/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/method_get.go +++ b/resource-manager/postgresql/2022-12-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/firewallrules/version.go b/resource-manager/postgresql/2022-12-01/firewallrules/version.go index 7f0b967451a..e34e91fb723 100644 --- a/resource-manager/postgresql/2022-12-01/firewallrules/version.go +++ b/resource-manager/postgresql/2022-12-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/client.go b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/client.go +++ b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/method_execute.go b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/method_execute.go index 790e209c4f3..f9e99478551 100644 --- a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/version.go b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/version.go index 7f01dd106e6..dc79f7d51c4 100644 --- a/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/version.go +++ b/resource-manager/postgresql/2022-12-01/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/README.md b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/README.md index 9136e1e7584..ec8b7e154ec 100644 --- a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/README.md +++ b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/client.go b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/client.go +++ b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/id_location.go b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/id_location.go index b8d63fe649f..5f97ceb2eae 100644 --- a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/id_location.go +++ b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/version.go b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/version.go index 1d89c8e71ec..75593f42432 100644 --- a/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/version.go +++ b/resource-manager/postgresql/2022-12-01/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/replicas/README.md b/resource-manager/postgresql/2022-12-01/replicas/README.md index e9079aad7a9..f3fe48c5765 100644 --- a/resource-manager/postgresql/2022-12-01/replicas/README.md +++ b/resource-manager/postgresql/2022-12-01/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `replicas` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/replicas/client.go b/resource-manager/postgresql/2022-12-01/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/postgresql/2022-12-01/replicas/client.go +++ b/resource-manager/postgresql/2022-12-01/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/replicas/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/replicas/id_flexibleserver.go index 0f6a08d533d..f3a6e040485 100644 --- a/resource-manager/postgresql/2022-12-01/replicas/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/replicas/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/replicas/version.go b/resource-manager/postgresql/2022-12-01/replicas/version.go index 6baec746c14..2dcda092ca3 100644 --- a/resource-manager/postgresql/2022-12-01/replicas/version.go +++ b/resource-manager/postgresql/2022-12-01/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/serverrestart/README.md b/resource-manager/postgresql/2022-12-01/serverrestart/README.md index a65f4383d00..1222ef599c9 100644 --- a/resource-manager/postgresql/2022-12-01/serverrestart/README.md +++ b/resource-manager/postgresql/2022-12-01/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/serverrestart/client.go b/resource-manager/postgresql/2022-12-01/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/postgresql/2022-12-01/serverrestart/client.go +++ b/resource-manager/postgresql/2022-12-01/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/serverrestart/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/serverrestart/id_flexibleserver.go index 9a3b6af7455..6d88114486b 100644 --- a/resource-manager/postgresql/2022-12-01/serverrestart/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/serverrestart/version.go b/resource-manager/postgresql/2022-12-01/serverrestart/version.go index 6eeffa6778b..c0ee0288c29 100644 --- a/resource-manager/postgresql/2022-12-01/serverrestart/version.go +++ b/resource-manager/postgresql/2022-12-01/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/servers/README.md b/resource-manager/postgresql/2022-12-01/servers/README.md index 22f782e7ef7..eebdca3b126 100644 --- a/resource-manager/postgresql/2022-12-01/servers/README.md +++ b/resource-manager/postgresql/2022-12-01/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2022-12-01/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2022-12-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2022-12-01/servers/client.go b/resource-manager/postgresql/2022-12-01/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/postgresql/2022-12-01/servers/client.go +++ b/resource-manager/postgresql/2022-12-01/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/servers/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/servers/id_flexibleserver.go index 94ec2a6bccd..092664a7b04 100644 --- a/resource-manager/postgresql/2022-12-01/servers/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/servers/method_get.go b/resource-manager/postgresql/2022-12-01/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/postgresql/2022-12-01/servers/method_get.go +++ b/resource-manager/postgresql/2022-12-01/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2022-12-01/servers/version.go b/resource-manager/postgresql/2022-12-01/servers/version.go index f3617dc2b18..78c437aa2d8 100644 --- a/resource-manager/postgresql/2022-12-01/servers/version.go +++ b/resource-manager/postgresql/2022-12-01/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/serverstart/client.go b/resource-manager/postgresql/2022-12-01/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/postgresql/2022-12-01/serverstart/client.go +++ b/resource-manager/postgresql/2022-12-01/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/serverstart/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/serverstart/id_flexibleserver.go index cf047ba1f7b..8e7a785605f 100644 --- a/resource-manager/postgresql/2022-12-01/serverstart/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/serverstart/version.go b/resource-manager/postgresql/2022-12-01/serverstart/version.go index 793c94564b1..72d2dc3f6f3 100644 --- a/resource-manager/postgresql/2022-12-01/serverstart/version.go +++ b/resource-manager/postgresql/2022-12-01/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2022-12-01" } diff --git a/resource-manager/postgresql/2022-12-01/serverstop/client.go b/resource-manager/postgresql/2022-12-01/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/postgresql/2022-12-01/serverstop/client.go +++ b/resource-manager/postgresql/2022-12-01/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/postgresql/2022-12-01/serverstop/id_flexibleserver.go b/resource-manager/postgresql/2022-12-01/serverstop/id_flexibleserver.go index a68b62f7707..962dcb2cfd5 100644 --- a/resource-manager/postgresql/2022-12-01/serverstop/id_flexibleserver.go +++ b/resource-manager/postgresql/2022-12-01/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2022-12-01/serverstop/version.go b/resource-manager/postgresql/2022-12-01/serverstop/version.go index ef0aa781c3a..19de6bd2a49 100644 --- a/resource-manager/postgresql/2022-12-01/serverstop/version.go +++ b/resource-manager/postgresql/2022-12-01/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2022-12-01" } diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/README.md b/resource-manager/postgresql/2023-06-01-preview/administrators/README.md index b00a60eee6d..94ff9aaf2f4 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/administrators` Documentation -The `administrators` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `administrators` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/client.go b/resource-manager/postgresql/2023-06-01-preview/administrators/client.go index c1c8ddd284e..6fd32a5af24 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/client.go @@ -15,7 +15,7 @@ type AdministratorsClient struct { } func NewAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "administrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "administrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdministratorsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/id_administrator.go b/resource-manager/postgresql/2023-06-01-preview/administrators/id_administrator.go index 06074360c88..d70de4fbd3f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/id_administrator.go +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/id_administrator.go @@ -44,7 +44,7 @@ func ParseAdministratorID(input string) (*AdministratorId, error) { } id := AdministratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdministratorIDInsensitively(input string) (*AdministratorId, error) { } id := AdministratorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/administrators/id_flexibleserver.go index eb957f984d9..fd5964179b8 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/method_get.go b/resource-manager/postgresql/2023-06-01-preview/administrators/method_get.go index a3eb4fd8972..a4f50294a89 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/method_get.go @@ -45,7 +45,6 @@ func (c AdministratorsClient) Get(ctx context.Context, id AdministratorId) (resu var model ActiveDirectoryAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/administrators/version.go b/resource-manager/postgresql/2023-06-01-preview/administrators/version.go index 23670b11360..7051f6b412a 100644 --- a/resource-manager/postgresql/2023-06-01-preview/administrators/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/administrators/version.go @@ -1,12 +1,10 @@ package administrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/administrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/administrators/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/README.md b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/README.md index 0d30f2da548..ab35b41d85b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings` Documentation -The `advancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `advancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/client.go b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/client.go index 3e9a516e71d..e7a35ff187e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type AdvancedThreatProtectionSettingsClient struct { } func NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/id_flexibleserver.go index 7aad09c1837..1fd703dcf37 100644 --- a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/method_serverthreatprotectionsettingsget.go b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/method_serverthreatprotectionsettingsget.go index 38c24c17c74..7bddb82a9c6 100644 --- a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/method_serverthreatprotectionsettingsget.go +++ b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/method_serverthreatprotectionsettingsget.go @@ -46,7 +46,6 @@ func (c AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsGe var model ServerThreatProtectionSettingsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/version.go b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/version.go index e5faaf52ab1..fb26b9714f7 100644 --- a/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package advancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/advancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/advancedthreatprotectionsettings/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/README.md b/resource-manager/postgresql/2023-06-01-preview/backups/README.md index 2e7dbe5fb54..044bcb3910f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `backups` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/client.go b/resource-manager/postgresql/2023-06-01-preview/backups/client.go index a0f81d2a6ab..6e1cc70d434 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/backups/client.go @@ -15,7 +15,7 @@ type BackupsClient struct { } func NewBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/id_backup.go b/resource-manager/postgresql/2023-06-01-preview/backups/id_backup.go index 9aa1cf46b68..cd398743823 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/id_backup.go +++ b/resource-manager/postgresql/2023-06-01-preview/backups/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/backups/id_flexibleserver.go index d5b2bdbb7e2..08c0557dd86 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/backups/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/method_get.go b/resource-manager/postgresql/2023-06-01-preview/backups/method_get.go index d3be30211ef..43a1081766a 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/backups/method_get.go @@ -45,7 +45,6 @@ func (c BackupsClient) Get(ctx context.Context, id BackupId) (result GetOperatio var model ServerBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/backups/version.go b/resource-manager/postgresql/2023-06-01-preview/backups/version.go index bb34788efdc..025daaaf0c2 100644 --- a/resource-manager/postgresql/2023-06-01-preview/backups/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/README.md b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/README.md index bb506cb2b31..c4618e185b7 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/client.go b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/client.go index 9991e58a518..777c8ea9e9f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/client.go @@ -15,7 +15,7 @@ type CheckNameAvailabilityClient struct { } func NewCheckNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckNameAvailabilityClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checknameavailability", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checknameavailability", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckNameAvailabilityClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/id_location.go b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/id_location.go index 1947cd16871..82d8758cc43 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/id_location.go +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_execute.go b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_execute.go index 15113a339d3..fbb208858c9 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_execute.go +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_execute.go @@ -51,7 +51,6 @@ func (c CheckNameAvailabilityClient) Execute(ctx context.Context, id commonids.S var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_withlocationexecute.go b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_withlocationexecute.go index c8f35387669..34090e99b85 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_withlocationexecute.go +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/method_withlocationexecute.go @@ -50,7 +50,6 @@ func (c CheckNameAvailabilityClient) WithLocationExecute(ctx context.Context, id var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/version.go b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/version.go index 42c62c89353..bd44e6033f3 100644 --- a/resource-manager/postgresql/2023-06-01-preview/checknameavailability/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/checknameavailability/version.go @@ -1,12 +1,10 @@ package checknameavailability -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checknameavailability/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checknameavailability/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/README.md b/resource-manager/postgresql/2023-06-01-preview/configurations/README.md index acc29863025..a7dc5d2e88b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `configurations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/client.go b/resource-manager/postgresql/2023-06-01-preview/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/id_configuration.go b/resource-manager/postgresql/2023-06-01-preview/configurations/id_configuration.go index 87bea8b781e..c3549afd419 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/id_configuration.go +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/configurations/id_flexibleserver.go index 6109a87bd01..73c571ce344 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/method_get.go b/resource-manager/postgresql/2023-06-01-preview/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/configurations/version.go b/resource-manager/postgresql/2023-06-01-preview/configurations/version.go index 9dcef5cfdb9..b08b6a10e8b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/configurations/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/customoperation/README.md b/resource-manager/postgresql/2023-06-01-preview/customoperation/README.md index 0ac88b3d889..2362d6e4457 100644 --- a/resource-manager/postgresql/2023-06-01-preview/customoperation/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/customoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/customoperation` Documentation -The `customoperation` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `customoperation` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/customoperation/client.go b/resource-manager/postgresql/2023-06-01-preview/customoperation/client.go index 0cfbc77b4d0..dd76465d0b7 100644 --- a/resource-manager/postgresql/2023-06-01-preview/customoperation/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/customoperation/client.go @@ -15,7 +15,7 @@ type CustomOperationClient struct { } func NewCustomOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomOperationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customoperation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customoperation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomOperationClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/customoperation/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/customoperation/id_flexibleserver.go index ed292ab4d1c..8848a4ad158 100644 --- a/resource-manager/postgresql/2023-06-01-preview/customoperation/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/customoperation/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/customoperation/method_checkmigrationnameavailability.go b/resource-manager/postgresql/2023-06-01-preview/customoperation/method_checkmigrationnameavailability.go index 7615a1d50ac..3235480326b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/customoperation/method_checkmigrationnameavailability.go +++ b/resource-manager/postgresql/2023-06-01-preview/customoperation/method_checkmigrationnameavailability.go @@ -50,7 +50,6 @@ func (c CustomOperationClient) CheckMigrationNameAvailability(ctx context.Contex var model MigrationNameAvailabilityResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/customoperation/version.go b/resource-manager/postgresql/2023-06-01-preview/customoperation/version.go index 040eefe7d42..f03d35ac258 100644 --- a/resource-manager/postgresql/2023-06-01-preview/customoperation/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/customoperation/version.go @@ -1,12 +1,10 @@ package customoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customoperation/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/README.md b/resource-manager/postgresql/2023-06-01-preview/databases/README.md index 5d663dbd133..aee80693926 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/client.go b/resource-manager/postgresql/2023-06-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/id_database.go b/resource-manager/postgresql/2023-06-01-preview/databases/id_database.go index c0b9fb64754..fe38dbeeab1 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/id_database.go +++ b/resource-manager/postgresql/2023-06-01-preview/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/databases/id_flexibleserver.go index 820d1eaed7d..dcfa294c403 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/databases/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/method_get.go b/resource-manager/postgresql/2023-06-01-preview/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/databases/version.go b/resource-manager/postgresql/2023-06-01-preview/databases/version.go index f550ef94247..22303c1292e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/databases/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/README.md b/resource-manager/postgresql/2023-06-01-preview/firewallrules/README.md index 0c05096104d..e6e25ecde0e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/client.go b/resource-manager/postgresql/2023-06-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_firewallrule.go b/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_firewallrule.go index 7e7fd2e3d41..62440415a11 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_flexibleserver.go index f5408e980f1..f4ff8a91351 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/method_get.go b/resource-manager/postgresql/2023-06-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/firewallrules/version.go b/resource-manager/postgresql/2023-06-01-preview/firewallrules/version.go index 9edac43b30d..ff1ab3bbc47 100644 --- a/resource-manager/postgresql/2023-06-01-preview/firewallrules/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/README.md b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/README.md index 3cdfd7c1034..d42d1bd9c8a 100644 --- a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities` Documentation -The `flexibleservercapabilities` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `flexibleservercapabilities` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/client.go b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/client.go index 172ddba35ae..d0fe6de3ae0 100644 --- a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/client.go @@ -15,7 +15,7 @@ type FlexibleServerCapabilitiesClient struct { } func NewFlexibleServerCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*FlexibleServerCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "flexibleservercapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "flexibleservercapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FlexibleServerCapabilitiesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/id_flexibleserver.go index fd53ff6ad96..b09f714feb1 100644 --- a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/version.go b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/version.go index 3ee9e292d12..72bd59afafd 100644 --- a/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/flexibleservercapabilities/version.go @@ -1,12 +1,10 @@ package flexibleservercapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flexibleservercapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/flexibleservercapabilities/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/client.go b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/client.go index 07714056281..cf157d284cc 100644 --- a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/client.go @@ -15,7 +15,7 @@ type GetPrivateDnsZoneSuffixClient struct { } func NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatednszonesuffix", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateDnsZoneSuffixClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/method_execute.go b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/method_execute.go index 790e209c4f3..f9e99478551 100644 --- a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/method_execute.go +++ b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/method_execute.go @@ -45,7 +45,6 @@ func (c GetPrivateDnsZoneSuffixClient) Execute(ctx context.Context) (result Exec var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/version.go b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/version.go index 65a4f1c0fb9..6855df1f997 100644 --- a/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/getprivatednszonesuffix/version.go @@ -1,12 +1,10 @@ package getprivatednszonesuffix -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatednszonesuffix/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/README.md b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/README.md index 85536176cbe..cb914f99149 100644 --- a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/client.go b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/client.go index bd581d8a3f7..e54b57a554b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/client.go @@ -15,7 +15,7 @@ type LocationBasedCapabilitiesClient struct { } func NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationBasedCapabilitiesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/id_location.go b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/id_location.go index b8d63fe649f..5f97ceb2eae 100644 --- a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/id_location.go +++ b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/version.go b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/version.go index acb7b850c43..a00ca75f655 100644 --- a/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/locationbasedcapabilities/version.go @@ -1,12 +1,10 @@ package locationbasedcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationbasedcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/logfiles/README.md b/resource-manager/postgresql/2023-06-01-preview/logfiles/README.md index aa06d523595..52ab3e3b782 100644 --- a/resource-manager/postgresql/2023-06-01-preview/logfiles/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/logfiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/logfiles` Documentation -The `logfiles` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/logfiles/client.go b/resource-manager/postgresql/2023-06-01-preview/logfiles/client.go index 8e5eb327528..7c634ed9989 100644 --- a/resource-manager/postgresql/2023-06-01-preview/logfiles/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/logfiles/client.go @@ -15,7 +15,7 @@ type LogFilesClient struct { } func NewLogFilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogFilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "logfiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "logfiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LogFilesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/logfiles/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/logfiles/id_flexibleserver.go index 3033804dbb4..fa7b9a1daf6 100644 --- a/resource-manager/postgresql/2023-06-01-preview/logfiles/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/logfiles/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/logfiles/version.go b/resource-manager/postgresql/2023-06-01-preview/logfiles/version.go index 7b557d35db6..910f253090f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/logfiles/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/logfiles/version.go @@ -1,12 +1,10 @@ package logfiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/logfiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/logfiles/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/README.md b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/README.md index 12e8459bc89..50dbbd95a13 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup` Documentation -The `longtermretentionbackup` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `longtermretentionbackup` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/client.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/client.go index 07d94fc0ce2..bf19f5b7308 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/client.go @@ -15,7 +15,7 @@ type LongTermRetentionBackupClient struct { } func NewLongTermRetentionBackupClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionBackupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionbackup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionbackup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionBackupClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_flexibleserver.go index 14cff8c9d3b..8e98264a91b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_ltrbackupoperation.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_ltrbackupoperation.go index 0433df4dac7..c490951217c 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_ltrbackupoperation.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/id_ltrbackupoperation.go @@ -44,7 +44,7 @@ func ParseLtrBackupOperationID(input string) (*LtrBackupOperationId, error) { } id := LtrBackupOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLtrBackupOperationIDInsensitively(input string) (*LtrBackupOperationId } id := LtrBackupOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_flexibleservertriggerltrprebackup.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_flexibleservertriggerltrprebackup.go index 871d2e814a7..ebd4b9bc639 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_flexibleservertriggerltrprebackup.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_flexibleservertriggerltrprebackup.go @@ -50,7 +50,6 @@ func (c LongTermRetentionBackupClient) FlexibleServerTriggerLtrPreBackup(ctx con var model LtrPreBackupResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_ltrbackupoperationsget.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_ltrbackupoperationsget.go index b44cc123121..e517bb0a254 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_ltrbackupoperationsget.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/method_ltrbackupoperationsget.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupClient) LtrBackupOperationsGet(ctx context.Contex var model LtrServerBackupOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/version.go b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/version.go index 551762b1a23..a558210fc3e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/longtermretentionbackup/version.go @@ -1,12 +1,10 @@ package longtermretentionbackup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionbackup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionbackup/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/README.md b/resource-manager/postgresql/2023-06-01-preview/migrations/README.md index 61cadc50ca7..754720d5490 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/migrations` Documentation -The `migrations` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `migrations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/client.go b/resource-manager/postgresql/2023-06-01-preview/migrations/client.go index 4f65378fbcf..14d12bc07af 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/client.go @@ -15,7 +15,7 @@ type MigrationsClient struct { } func NewMigrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/migrations/id_flexibleserver.go index 085df20be7a..1074d15ad9d 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/id_migration.go b/resource-manager/postgresql/2023-06-01-preview/migrations/id_migration.go index 4938014dd57..55bbea8b547 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/id_migration.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/id_migration.go @@ -44,7 +44,7 @@ func ParseMigrationID(input string) (*MigrationId, error) { } id := MigrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMigrationIDInsensitively(input string) (*MigrationId, error) { } id := MigrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/method_create.go b/resource-manager/postgresql/2023-06-01-preview/migrations/method_create.go index 28b32b56c82..6c3c6089dc5 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/method_create.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/method_create.go @@ -50,7 +50,6 @@ func (c MigrationsClient) Create(ctx context.Context, id MigrationId, input Migr var model MigrationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/method_get.go b/resource-manager/postgresql/2023-06-01-preview/migrations/method_get.go index 84874202311..30b1e434d7c 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/method_get.go @@ -45,7 +45,6 @@ func (c MigrationsClient) Get(ctx context.Context, id MigrationId) (result GetOp var model MigrationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/method_listbytargetserver.go b/resource-manager/postgresql/2023-06-01-preview/migrations/method_listbytargetserver.go index bb021e533a6..3f5c59ee040 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/method_listbytargetserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/method_listbytargetserver.go @@ -39,6 +39,7 @@ func (o ListByTargetServerOperationOptions) ToHeaders() *client.Headers { func (o ListByTargetServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/method_update.go b/resource-manager/postgresql/2023-06-01-preview/migrations/method_update.go index d1c5b863dbf..4c05390ae10 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/method_update.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/method_update.go @@ -49,7 +49,6 @@ func (c MigrationsClient) Update(ctx context.Context, id MigrationId, input Migr var model MigrationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/migrations/version.go b/resource-manager/postgresql/2023-06-01-preview/migrations/version.go index 24d54629e06..6af641c2323 100644 --- a/resource-manager/postgresql/2023-06-01-preview/migrations/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/migrations/version.go @@ -1,12 +1,10 @@ package migrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrations/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/post/README.md b/resource-manager/postgresql/2023-06-01-preview/post/README.md index 6009994cadc..c48f058a072 100644 --- a/resource-manager/postgresql/2023-06-01-preview/post/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/post/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/post` Documentation -The `post` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `post` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/post/client.go b/resource-manager/postgresql/2023-06-01-preview/post/client.go index 4a1b2dc3045..5a71c067caa 100644 --- a/resource-manager/postgresql/2023-06-01-preview/post/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/post/client.go @@ -15,7 +15,7 @@ type POSTClient struct { } func NewPOSTClientWithBaseURI(sdkApi sdkEnv.Api) (*POSTClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "post", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "post", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating POSTClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/post/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/post/id_flexibleserver.go index d8965ad453f..02f924ca0bc 100644 --- a/resource-manager/postgresql/2023-06-01-preview/post/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/post/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/post/method_checkmigrationnameavailability.go b/resource-manager/postgresql/2023-06-01-preview/post/method_checkmigrationnameavailability.go index a6911d9e116..21b9dbecaf8 100644 --- a/resource-manager/postgresql/2023-06-01-preview/post/method_checkmigrationnameavailability.go +++ b/resource-manager/postgresql/2023-06-01-preview/post/method_checkmigrationnameavailability.go @@ -50,7 +50,6 @@ func (c POSTClient) CheckMigrationNameAvailability(ctx context.Context, id Flexi var model MigrationNameAvailabilityResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/post/version.go b/resource-manager/postgresql/2023-06-01-preview/post/version.go index 5aab629a58c..5466ac95db3 100644 --- a/resource-manager/postgresql/2023-06-01-preview/post/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/post/version.go @@ -1,12 +1,10 @@ package post -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/post/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/post/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/README.md b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/README.md index b85823ca897..769cb742034 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/client.go b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_flexibleserver.go index 90f609ad4f9..89f08b34003 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go index 2ebe80afa7a..3dc3ba7222e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/method_get.go b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/version.go b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/version.go index e5b68d8d6ce..88b36253fd4 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/README.md b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/README.md index 61ae2af8e5f..abe83955fa1 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/client.go b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_flexibleserver.go index 0c02e5b23ae..5c699635c0b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_privatelinkresource.go index ac3657f6afc..0c1b3221870 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/method_get.go b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/version.go b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/version.go index 386ff7f8341..a86c6fc27cd 100644 --- a/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/README.md b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/README.md index efac2f06378..d2ee4d8a84a 100644 --- a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers` Documentation -The `quotausagesforflexibleservers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `quotausagesforflexibleservers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/client.go b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/client.go index 6c6bcb5137a..381036fe862 100644 --- a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/client.go @@ -15,7 +15,7 @@ type QuotaUsagesForFlexibleServersClient struct { } func NewQuotaUsagesForFlexibleServersClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaUsagesForFlexibleServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotausagesforflexibleservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotausagesforflexibleservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaUsagesForFlexibleServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/id_location.go b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/id_location.go index 70c80c6385c..ff8469650cb 100644 --- a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/id_location.go +++ b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/version.go b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/version.go index 9c2131d01d2..21898289925 100644 --- a/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/quotausagesforflexibleservers/version.go @@ -1,12 +1,10 @@ package quotausagesforflexibleservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotausagesforflexibleservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotausagesforflexibleservers/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/replicas/README.md b/resource-manager/postgresql/2023-06-01-preview/replicas/README.md index b6af43aa7e7..f9293149bdf 100644 --- a/resource-manager/postgresql/2023-06-01-preview/replicas/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/replicas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/replicas` Documentation -The `replicas` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `replicas` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/replicas/client.go b/resource-manager/postgresql/2023-06-01-preview/replicas/client.go index d971742c1bd..b494c8a0a7f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/replicas/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/replicas/client.go @@ -15,7 +15,7 @@ type ReplicasClient struct { } func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/replicas/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/replicas/id_flexibleserver.go index 0f6a08d533d..f3a6e040485 100644 --- a/resource-manager/postgresql/2023-06-01-preview/replicas/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/replicas/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/replicas/version.go b/resource-manager/postgresql/2023-06-01-preview/replicas/version.go index e637e22cbd1..8cc8335c275 100644 --- a/resource-manager/postgresql/2023-06-01-preview/replicas/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/replicas/version.go @@ -1,12 +1,10 @@ package replicas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicas/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverrestart/README.md b/resource-manager/postgresql/2023-06-01-preview/serverrestart/README.md index e02b06a7d83..0cc688f8a4c 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverrestart/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/serverrestart/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/serverrestart/client.go b/resource-manager/postgresql/2023-06-01-preview/serverrestart/client.go index 0a08b2a6820..b3cc7f2e6a7 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverrestart/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverrestart/client.go @@ -15,7 +15,7 @@ type ServerRestartClient struct { } func NewServerRestartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerRestartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverrestart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverrestart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerRestartClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverrestart/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/serverrestart/id_flexibleserver.go index 9a3b6af7455..6d88114486b 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverrestart/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverrestart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverrestart/version.go b/resource-manager/postgresql/2023-06-01-preview/serverrestart/version.go index e9921695c4b..a08f2b26f25 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverrestart/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverrestart/version.go @@ -1,12 +1,10 @@ package serverrestart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverrestart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverrestart/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/servers/README.md b/resource-manager/postgresql/2023-06-01-preview/servers/README.md index e00f2cc165d..1c283039c51 100644 --- a/resource-manager/postgresql/2023-06-01-preview/servers/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/servers/client.go b/resource-manager/postgresql/2023-06-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/postgresql/2023-06-01-preview/servers/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go index 94ec2a6bccd..092664a7b04 100644 --- a/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/servers/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/servers/method_get.go b/resource-manager/postgresql/2023-06-01-preview/servers/method_get.go index 3501739e632..fea9d5443d8 100644 --- a/resource-manager/postgresql/2023-06-01-preview/servers/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id FlexibleServerId) (result Get var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/servers/version.go b/resource-manager/postgresql/2023-06-01-preview/servers/version.go index 26b10ba6dad..2b9f0e3b8e6 100644 --- a/resource-manager/postgresql/2023-06-01-preview/servers/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstart/client.go b/resource-manager/postgresql/2023-06-01-preview/serverstart/client.go index 8522b270324..9dbb3fb1350 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstart/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstart/client.go @@ -15,7 +15,7 @@ type ServerStartClient struct { } func NewServerStartClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStartClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstart", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstart", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStartClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstart/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/serverstart/id_flexibleserver.go index cf047ba1f7b..8e7a785605f 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstart/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstart/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstart/version.go b/resource-manager/postgresql/2023-06-01-preview/serverstart/version.go index 3ac2c3365b2..3d1716abfdc 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstart/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstart/version.go @@ -1,12 +1,10 @@ package serverstart -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstart/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstart/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstop/client.go b/resource-manager/postgresql/2023-06-01-preview/serverstop/client.go index 1646d43a005..6a321e699a9 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstop/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstop/client.go @@ -15,7 +15,7 @@ type ServerStopClient struct { } func NewServerStopClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerStopClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverstop", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverstop", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerStopClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstop/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/serverstop/id_flexibleserver.go index a68b62f7707..962dcb2cfd5 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstop/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstop/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/serverstop/version.go b/resource-manager/postgresql/2023-06-01-preview/serverstop/version.go index a89fec62760..d50db933d60 100644 --- a/resource-manager/postgresql/2023-06-01-preview/serverstop/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/serverstop/version.go @@ -1,12 +1,10 @@ package serverstop -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverstop/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverstop/2023-06-01-preview" } diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/README.md b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/README.md index 831488b367c..e1e9e3f526e 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/README.md +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/virtualendpoints` Documentation -The `virtualendpoints` SDK allows for interaction with the Azure Resource Manager Service `postgresql` (API Version `2023-06-01-preview`). +The `virtualendpoints` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2023-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/client.go b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/client.go index e4f12890b9e..9a36fc79759 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/client.go +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/client.go @@ -15,7 +15,7 @@ type VirtualEndpointsClient struct { } func NewVirtualEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualEndpointsClient: %+v", err) } diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_flexibleserver.go b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_flexibleserver.go index 242239daf77..de20c2b12af 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_flexibleserver.go +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_flexibleserver.go @@ -42,7 +42,7 @@ func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) } id := FlexibleServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_virtualendpoint.go b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_virtualendpoint.go index 10a8e52f1c3..6376e5e05b2 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_virtualendpoint.go +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/id_virtualendpoint.go @@ -44,7 +44,7 @@ func ParseVirtualEndpointID(input string) (*VirtualEndpointId, error) { } id := VirtualEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualEndpointIDInsensitively(input string) (*VirtualEndpointId, erro } id := VirtualEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/method_get.go b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/method_get.go index 3d17967feac..06d9bb5fecb 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/method_get.go +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/method_get.go @@ -45,7 +45,6 @@ func (c VirtualEndpointsClient) Get(ctx context.Context, id VirtualEndpointId) ( var model VirtualEndpointResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/version.go b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/version.go index 914c7c521ea..ae8e04490b9 100644 --- a/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/version.go +++ b/resource-manager/postgresql/2023-06-01-preview/virtualendpoints/version.go @@ -1,12 +1,10 @@ package virtualendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualendpoints/2023-06-01-preview" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/client.go b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/client.go index a198fa01b64..957c789be3c 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/client.go @@ -15,7 +15,7 @@ type ClusterOperationsClient struct { } func NewClusterOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusteroperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusteroperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterOperationsClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/id_servergroupsv2.go index f1f48b534d0..288b9d6e07e 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/version.go b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/version.go index 533a54ad474..bd67a8deeb7 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusteroperations/version.go @@ -1,12 +1,10 @@ package clusteroperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusteroperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusteroperations/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/README.md b/resource-manager/postgresqlhsc/2022-11-08/clusters/README.md index a5da8c0e78f..e8e8ac5cc4d 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `clusters` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/client.go b/resource-manager/postgresqlhsc/2022-11-08/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go index cb03dedf6c0..980d4b39c62 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/method_checknameavailability.go b/resource-manager/postgresqlhsc/2022-11-08/clusters/method_checknameavailability.go index dbe4bbbabdb..19f165e0dcf 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/method_checknameavailability.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ClustersClient) CheckNameAvailability(ctx context.Context, id commonids. var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/clusters/method_get.go index 5c1f89dc451..a04c8b9102b 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ServerGroupsv2Id) (result Ge var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/clusters/version.go b/resource-manager/postgresqlhsc/2022-11-08/clusters/version.go index ba6590cb36b..1cd44b12794 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/clusters/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/README.md b/resource-manager/postgresqlhsc/2022-11-08/configurations/README.md index 3bbef98984d..0cc4781223e 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/configurations` Documentation -The `configurations` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `configurations` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/client.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/client.go index 3ced22d176b..f927d73df19 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/client.go @@ -15,7 +15,7 @@ type ConfigurationsClient struct { } func NewConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationsClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go index 2844d82efbc..d686c030f5c 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_configuration.go @@ -44,7 +44,7 @@ func ParseConfigurationID(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConfigurationIDInsensitively(input string) (*ConfigurationId, error) { } id := ConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go index 06611b130b7..d7c14d2fa52 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_coordinatorconfiguration.go @@ -44,7 +44,7 @@ func ParseCoordinatorConfigurationID(input string) (*CoordinatorConfigurationId, } id := CoordinatorConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCoordinatorConfigurationIDInsensitively(input string) (*CoordinatorCon } id := CoordinatorConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go index f1f08143f88..ae876bae729 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_nodeconfiguration.go @@ -44,7 +44,7 @@ func ParseNodeConfigurationID(input string) (*NodeConfigurationId, error) { } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeConfigurationIDInsensitively(input string) (*NodeConfigurationId, } id := NodeConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go index 9eeaf59920b..6882565c4b1 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_server.go @@ -44,7 +44,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go index cdb0334a55a..290256bdc8d 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_get.go index e9c5e825e44..4526746d05f 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_get.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) Get(ctx context.Context, id ConfigurationId) (resu var model Configuration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getcoordinator.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getcoordinator.go index 742239a776a..35ed94bca60 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getcoordinator.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getcoordinator.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) GetCoordinator(ctx context.Context, id Coordinator var model ServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getnode.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getnode.go index ca663ce41dc..173c7fd0e8a 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getnode.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/method_getnode.go @@ -45,7 +45,6 @@ func (c ConfigurationsClient) GetNode(ctx context.Context, id NodeConfigurationI var model ServerConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/configurations/version.go b/resource-manager/postgresqlhsc/2022-11-08/configurations/version.go index ff27e35293a..9806980bbc2 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/configurations/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/configurations/version.go @@ -1,12 +1,10 @@ package configurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurations/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/README.md b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/README.md index a3be5ff782b..d26aa31ba88 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/client.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go index b3f6d82bed0..f8fba2a17dd 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go index b9a83123248..2e65e83596c 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_listbycluster.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_listbycluster.go index ef51c97538e..efd2b7657c7 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_listbycluster.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/method_listbycluster.go @@ -46,7 +46,6 @@ func (c FirewallRulesClient) ListByCluster(ctx context.Context, id ServerGroupsv var model FirewallRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/version.go b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/version.go index 4cc96661cdf..b5bad1bc3fe 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/firewallrules/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/README.md b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/README.md index 10374f0adf9..4cd85187156 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/client.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_privateendpointconnection.go index ac594eb07a1..9ed72861909 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_servergroupsv2.go index ca84cb8c8da..139e0968bf2 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_listbycluster.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_listbycluster.go index 92220caedaf..d50997a1e9b 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_listbycluster.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) ListByCluster(ctx context.Context, id var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/version.go b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/version.go index 49e6356527a..203415e2c48 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/README.md b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/README.md index e872213f66b..d2982d8e5df 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/client.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_privatelinkresource.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_privatelinkresource.go index 6c956fc1766..c2df2d9c261 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_servergroupsv2.go index 26e6fa80ac6..e3dcae45825 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_listbycluster.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_listbycluster.go index eaa1c01fbf9..050d31af380 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_listbycluster.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id Server var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/version.go b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/version.go index fb43a4dc945..45580864638 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/README.md b/resource-manager/postgresqlhsc/2022-11-08/roles/README.md index 6006de0f316..c02866855a9 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/roles` Documentation -The `roles` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `roles` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/client.go b/resource-manager/postgresqlhsc/2022-11-08/roles/client.go index eddcb107e5b..fa6a9c686f1 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/client.go @@ -15,7 +15,7 @@ type RolesClient struct { } func NewRolesClientWithBaseURI(sdkApi sdkEnv.Api) (*RolesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "roles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "roles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RolesClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go b/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go index 80c5f615cb0..ab13e4b7624 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/id_role.go @@ -44,7 +44,7 @@ func ParseRoleID(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRoleIDInsensitively(input string) (*RoleId, error) { } id := RoleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go index 017258c2b4a..06ad25bdc90 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/roles/method_get.go index f102decf874..0e13fc79c1b 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/method_get.go @@ -45,7 +45,6 @@ func (c RolesClient) Get(ctx context.Context, id RoleId) (result GetOperationRes var model Role result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/method_listbycluster.go b/resource-manager/postgresqlhsc/2022-11-08/roles/method_listbycluster.go index 08cbcd98fe3..d183e67b566 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/method_listbycluster.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/method_listbycluster.go @@ -46,7 +46,6 @@ func (c RolesClient) ListByCluster(ctx context.Context, id ServerGroupsv2Id) (re var model RoleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/roles/version.go b/resource-manager/postgresqlhsc/2022-11-08/roles/version.go index 5a806411a6a..c297aac9c28 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/roles/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/roles/version.go @@ -1,12 +1,10 @@ package roles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/roles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/roles/2022-11-08" } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/README.md b/resource-manager/postgresqlhsc/2022-11-08/servers/README.md index cd951c30aa0..746f44cad8b 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/README.md +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresqlhsc/2022-11-08/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `postgresqlhsc` (API Version `2022-11-08`). +The `servers` SDK allows for interaction with Azure Resource Manager `postgresqlhsc` (API Version `2022-11-08`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/client.go b/resource-manager/postgresqlhsc/2022-11-08/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/client.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/id_server.go b/resource-manager/postgresqlhsc/2022-11-08/servers/id_server.go index af75f444e0a..5b62113f533 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/id_server.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/id_server.go @@ -44,7 +44,7 @@ func ParseServerID(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerIDInsensitively(input string) (*ServerId, error) { } id := ServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/id_servergroupsv2.go b/resource-manager/postgresqlhsc/2022-11-08/servers/id_servergroupsv2.go index d8c475b2831..84e2241fd36 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/id_servergroupsv2.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/id_servergroupsv2.go @@ -42,7 +42,7 @@ func ParseServerGroupsv2ID(input string) (*ServerGroupsv2Id, error) { } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServerGroupsv2IDInsensitively(input string) (*ServerGroupsv2Id, error) } id := ServerGroupsv2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/method_get.go b/resource-manager/postgresqlhsc/2022-11-08/servers/method_get.go index 03cde7e9a62..b156b15bf04 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/method_get.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/method_get.go @@ -45,7 +45,6 @@ func (c ServersClient) Get(ctx context.Context, id ServerId) (result GetOperatio var model ClusterServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/method_listbycluster.go b/resource-manager/postgresqlhsc/2022-11-08/servers/method_listbycluster.go index 25f4bf7fd9a..5785f59d888 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/method_listbycluster.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/method_listbycluster.go @@ -46,7 +46,6 @@ func (c ServersClient) ListByCluster(ctx context.Context, id ServerGroupsv2Id) ( var model ClusterServerListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/postgresqlhsc/2022-11-08/servers/version.go b/resource-manager/postgresqlhsc/2022-11-08/servers/version.go index 88ad7d6a803..81816a9c6f7 100644 --- a/resource-manager/postgresqlhsc/2022-11-08/servers/version.go +++ b/resource-manager/postgresqlhsc/2022-11-08/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-08" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2022-11-08" } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/README.md b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/README.md index c4b6fb399d3..72fbeae5f47 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/README.md +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/autoscalevcores` Documentation -The `autoscalevcores` SDK allows for interaction with the Azure Resource Manager Service `powerbidedicated` (API Version `2021-01-01`). +The `autoscalevcores` SDK allows for interaction with Azure Resource Manager `powerbidedicated` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/client.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/client.go index 6171d4e24d4..be9c9a8917b 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/client.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/client.go @@ -15,7 +15,7 @@ type AutoScaleVCoresClient struct { } func NewAutoScaleVCoresClientWithBaseURI(sdkApi sdkEnv.Api) (*AutoScaleVCoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "autoscalevcores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "autoscalevcores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutoScaleVCoresClient: %+v", err) } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/id_autoscalevcore.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/id_autoscalevcore.go index e32e97264d4..cb79f1d6d70 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/id_autoscalevcore.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/id_autoscalevcore.go @@ -42,7 +42,7 @@ func ParseAutoScaleVCoreID(input string) (*AutoScaleVCoreId, error) { } id := AutoScaleVCoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutoScaleVCoreIDInsensitively(input string) (*AutoScaleVCoreId, error) } id := AutoScaleVCoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_create.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_create.go index 928d74a2758..b409192f9c1 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_create.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_create.go @@ -49,7 +49,6 @@ func (c AutoScaleVCoresClient) Create(ctx context.Context, id AutoScaleVCoreId, var model AutoScaleVCore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_get.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_get.go index 02afeaaa70b..f10f2a1f62a 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_get.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_get.go @@ -45,7 +45,6 @@ func (c AutoScaleVCoresClient) Get(ctx context.Context, id AutoScaleVCoreId) (re var model AutoScaleVCore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbyresourcegroup.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbyresourcegroup.go index 8f013997290..08cd0f261fe 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbyresourcegroup.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c AutoScaleVCoresClient) ListByResourceGroup(ctx context.Context, id commo var model AutoScaleVCoreListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbysubscription.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbysubscription.go index 973dea0b8c9..3517578ea31 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbysubscription.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c AutoScaleVCoresClient) ListBySubscription(ctx context.Context, id common var model AutoScaleVCoreListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_update.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_update.go index 13a99668101..6a08d87a446 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_update.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/method_update.go @@ -49,7 +49,6 @@ func (c AutoScaleVCoresClient) Update(ctx context.Context, id AutoScaleVCoreId, var model AutoScaleVCore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/version.go b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/version.go index c7a58675f8f..db12a443eae 100644 --- a/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/version.go +++ b/resource-manager/powerbidedicated/2021-01-01/autoscalevcores/version.go @@ -1,12 +1,10 @@ package autoscalevcores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/autoscalevcores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/autoscalevcores/2021-01-01" } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/README.md b/resource-manager/powerbidedicated/2021-01-01/capacities/README.md index f21f0dbbf60..6a805a4eb79 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/README.md +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/capacities` Documentation -The `capacities` SDK allows for interaction with the Azure Resource Manager Service `powerbidedicated` (API Version `2021-01-01`). +The `capacities` SDK allows for interaction with Azure Resource Manager `powerbidedicated` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/client.go b/resource-manager/powerbidedicated/2021-01-01/capacities/client.go index d75c33d91ac..4d92d1884db 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/client.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/client.go @@ -15,7 +15,7 @@ type CapacitiesClient struct { } func NewCapacitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "capacities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "capacities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CapacitiesClient: %+v", err) } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go b/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go index 8d161996e57..6b06452c97d 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/id_capacity.go @@ -42,7 +42,7 @@ func ParseCapacityID(input string) (*CapacityId, error) { } id := CapacityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCapacityIDInsensitively(input string) (*CapacityId, error) { } id := CapacityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go b/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go index fb7055c5e8f..99a56556286 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability.go b/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability.go index 6aeaf3f30a6..85f5af679b7 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c CapacitiesClient) CheckNameAvailability(ctx context.Context, id Location var model CheckCapacityNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails.go b/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails.go index b69c6d1bfcc..6132fd574b9 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/method_getdetails.go @@ -45,7 +45,6 @@ func (c CapacitiesClient) GetDetails(ctx context.Context, id CapacityId) (result var model DedicatedCapacity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/method_list.go b/resource-manager/powerbidedicated/2021-01-01/capacities/method_list.go index 72054ffd5bf..a57bb559a3d 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/method_list.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/method_list.go @@ -47,7 +47,6 @@ func (c CapacitiesClient) List(ctx context.Context, id commonids.SubscriptionId) var model DedicatedCapacities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup.go b/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup.go index 3017e8c25bf..34c8f75526f 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c CapacitiesClient) ListByResourceGroup(ctx context.Context, id commonids. var model DedicatedCapacities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity.go b/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity.go index 7d89bae5a06..e1fbaeb07b2 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/method_listskusforcapacity.go @@ -46,7 +46,6 @@ func (c CapacitiesClient) ListSkusForCapacity(ctx context.Context, id CapacityId var model SkuEnumerationForExistingResourceResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/capacities/version.go b/resource-manager/powerbidedicated/2021-01-01/capacities/version.go index 5983f4efb73..ce6f5c54778 100644 --- a/resource-manager/powerbidedicated/2021-01-01/capacities/version.go +++ b/resource-manager/powerbidedicated/2021-01-01/capacities/version.go @@ -1,12 +1,10 @@ package capacities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/capacities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/capacities/2021-01-01" } diff --git a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/README.md b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/README.md index 7fe9c65a92f..c3f1a4eb1f5 100644 --- a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/README.md +++ b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/powerbidedicated/2021-01-01/powerbidedicated` Documentation -The `powerbidedicated` SDK allows for interaction with the Azure Resource Manager Service `powerbidedicated` (API Version `2021-01-01`). +The `powerbidedicated` SDK allows for interaction with Azure Resource Manager `powerbidedicated` (API Version `2021-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/client.go b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/client.go index 528b9dfbf3e..76bf8a01af1 100644 --- a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/client.go +++ b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/client.go @@ -15,7 +15,7 @@ type PowerBIDedicatedClient struct { } func NewPowerBIDedicatedClientWithBaseURI(sdkApi sdkEnv.Api) (*PowerBIDedicatedClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "powerbidedicated", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "powerbidedicated", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PowerBIDedicatedClient: %+v", err) } diff --git a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/method_capacitieslistskus.go b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/method_capacitieslistskus.go index 8201df2992c..8479885805f 100644 --- a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/method_capacitieslistskus.go +++ b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/method_capacitieslistskus.go @@ -47,7 +47,6 @@ func (c PowerBIDedicatedClient) CapacitiesListSkus(ctx context.Context, id commo var model SkuEnumerationForNewResourceResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/version.go b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/version.go index 3f51e21d673..1880a765ebc 100644 --- a/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/version.go +++ b/resource-manager/powerbidedicated/2021-01-01/powerbidedicated/version.go @@ -1,12 +1,10 @@ package powerbidedicated -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/powerbidedicated/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/powerbidedicated/2021-01-01" } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/README.md b/resource-manager/privatedns/2020-06-01/privatezones/README.md index bec9369751a..3926b052bf9 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/README.md +++ b/resource-manager/privatedns/2020-06-01/privatezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones` Documentation -The `privatezones` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2020-06-01`). +The `privatezones` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2020-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2020-06-01/privatezones/client.go b/resource-manager/privatedns/2020-06-01/privatezones/client.go index 3cc24a351cc..089b1b59cb6 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/client.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/client.go @@ -15,7 +15,7 @@ type PrivateZonesClient struct { } func NewPrivateZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateZonesClient: %+v", err) } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go b/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go index 803996b79bf..da8b07e8f58 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_createorupdate.go b/resource-manager/privatedns/2020-06-01/privatezones/method_createorupdate.go index e470f519e8c..1d650e0175a 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_createorupdate.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_delete.go b/resource-manager/privatedns/2020-06-01/privatezones/method_delete.go index d03a01bfb98..96925b7f069 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_delete.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_get.go b/resource-manager/privatedns/2020-06-01/privatezones/method_get.go index ed785598de2..a50b13fb22b 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_get.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_get.go @@ -45,7 +45,6 @@ func (c PrivateZonesClient) Get(ctx context.Context, id PrivateDnsZoneId) (resul var model PrivateZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_list.go b/resource-manager/privatedns/2020-06-01/privatezones/method_list.go index a97a9c885b5..6c4acbc3338 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_list.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_listbyresourcegroup.go b/resource-manager/privatedns/2020-06-01/privatezones/method_listbyresourcegroup.go index be1d3300f4e..439b0f6f20c 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_listbyresourcegroup.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/method_update.go b/resource-manager/privatedns/2020-06-01/privatezones/method_update.go index 0f4953dfc0d..b41d04ba2ad 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/method_update.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/privatezones/version.go b/resource-manager/privatedns/2020-06-01/privatezones/version.go index 70d076c9d9b..f6c16bd3d7a 100644 --- a/resource-manager/privatedns/2020-06-01/privatezones/version.go +++ b/resource-manager/privatedns/2020-06-01/privatezones/version.go @@ -1,12 +1,10 @@ package privatezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatezones/2020-06-01" } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/README.md b/resource-manager/privatedns/2020-06-01/recordsets/README.md index 37bafa2d0c2..7c400bce0c8 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/README.md +++ b/resource-manager/privatedns/2020-06-01/recordsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/recordsets` Documentation -The `recordsets` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2020-06-01`). +The `recordsets` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2020-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2020-06-01/recordsets/client.go b/resource-manager/privatedns/2020-06-01/recordsets/client.go index 18ff6ef4956..dc9e1a5c168 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/client.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/client.go @@ -15,7 +15,7 @@ type RecordSetsClient struct { } func NewRecordSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecordSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recordsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recordsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecordSetsClient: %+v", err) } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go b/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go index 65ba5903e02..9276ed353ab 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go b/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go index 2c9cd137e38..c9210143134 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/id_privatezone.go @@ -44,7 +44,7 @@ func ParsePrivateZoneID(input string) (*PrivateZoneId, error) { } id := PrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateZoneIDInsensitively(input string) (*PrivateZoneId, error) { } id := PrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go b/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go index a866a37ab87..3676c88bcaf 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/id_recordtype.go @@ -46,7 +46,7 @@ func ParseRecordTypeID(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_createorupdate.go b/resource-manager/privatedns/2020-06-01/recordsets/method_createorupdate.go index da283847699..261e33677c0 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_createorupdate.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c RecordSetsClient) CreateOrUpdate(ctx context.Context, id RecordTypeId, i var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_delete.go b/resource-manager/privatedns/2020-06-01/recordsets/method_delete.go index bac259d0f30..cd48363f800 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_delete.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_get.go b/resource-manager/privatedns/2020-06-01/recordsets/method_get.go index 4cea3370054..67d36e44a1e 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_get.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_get.go @@ -45,7 +45,6 @@ func (c RecordSetsClient) Get(ctx context.Context, id RecordTypeId) (result GetO var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_list.go b/resource-manager/privatedns/2020-06-01/recordsets/method_list.go index 9c2a2020943..a31f588612b 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_list.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_listbytype.go b/resource-manager/privatedns/2020-06-01/recordsets/method_listbytype.go index 3705ca025ec..80a3ca7351f 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_listbytype.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_listbytype.go @@ -40,6 +40,7 @@ func (o ListByTypeOperationOptions) ToHeaders() *client.Headers { func (o ListByTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/method_update.go b/resource-manager/privatedns/2020-06-01/recordsets/method_update.go index def3737e664..f5d3687ece9 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/method_update.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecordSetsClient) Update(ctx context.Context, id RecordTypeId, input Rec var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2020-06-01/recordsets/version.go b/resource-manager/privatedns/2020-06-01/recordsets/version.go index 2e4bccb4c3b..3091b2a0756 100644 --- a/resource-manager/privatedns/2020-06-01/recordsets/version.go +++ b/resource-manager/privatedns/2020-06-01/recordsets/version.go @@ -1,12 +1,10 @@ package recordsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recordsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recordsets/2020-06-01" } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/README.md b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/README.md index a5edbf771bc..7307f8b3335 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/README.md +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/virtualnetworklinks` Documentation -The `virtualnetworklinks` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2020-06-01`). +The `virtualnetworklinks` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2020-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/client.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/client.go index 69e2bb7e2f1..f81f0abd63a 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/client.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/client.go @@ -15,7 +15,7 @@ type VirtualNetworkLinksClient struct { } func NewVirtualNetworkLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworklinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworklinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkLinksClient: %+v", err) } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go index 1d07795df74..9a5c79a1d15 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go index 41ad08f463d..b4b14c10ddf 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/id_virtualnetworklink.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkLinkID(input string) (*VirtualNetworkLinkId, error) { } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkLinkIDInsensitively(input string) (*VirtualNetworkLinkId } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_createorupdate.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_createorupdate.go index c6bc6fe5517..8f62fdb509b 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_createorupdate.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_delete.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_delete.go index d170aa216a1..655a60540de 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_delete.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_get.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_get.go index 27873563faf..c3d4a23300c 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_get.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkLinksClient) Get(ctx context.Context, id VirtualNetworkLin var model VirtualNetworkLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_list.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_list.go index 096ad73c974..2dcf66fa561 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_list.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_update.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_update.go index 752ec2d4324..08fd83123c4 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_update.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/version.go b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/version.go index e531cfa895b..c2dfb866deb 100644 --- a/resource-manager/privatedns/2020-06-01/virtualnetworklinks/version.go +++ b/resource-manager/privatedns/2020-06-01/virtualnetworklinks/version.go @@ -1,12 +1,10 @@ package virtualnetworklinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworklinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworklinks/2020-06-01" } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/README.md b/resource-manager/privatedns/2024-06-01/privatezones/README.md index f2759cbb106..78b1f555a76 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/README.md +++ b/resource-manager/privatedns/2024-06-01/privatezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2024-06-01/privatezones` Documentation -The `privatezones` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2024-06-01`). +The `privatezones` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2024-06-01/privatezones/client.go b/resource-manager/privatedns/2024-06-01/privatezones/client.go index 3cc24a351cc..089b1b59cb6 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/client.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/client.go @@ -15,7 +15,7 @@ type PrivateZonesClient struct { } func NewPrivateZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateZonesClient: %+v", err) } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/id_privatednszone.go b/resource-manager/privatedns/2024-06-01/privatezones/id_privatednszone.go index 803996b79bf..da8b07e8f58 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/id_privatednszone.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_createorupdate.go b/resource-manager/privatedns/2024-06-01/privatezones/method_createorupdate.go index e470f519e8c..1d650e0175a 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_createorupdate.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_delete.go b/resource-manager/privatedns/2024-06-01/privatezones/method_delete.go index d03a01bfb98..96925b7f069 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_delete.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_get.go b/resource-manager/privatedns/2024-06-01/privatezones/method_get.go index ed785598de2..a50b13fb22b 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_get.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_get.go @@ -45,7 +45,6 @@ func (c PrivateZonesClient) Get(ctx context.Context, id PrivateDnsZoneId) (resul var model PrivateZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_list.go b/resource-manager/privatedns/2024-06-01/privatezones/method_list.go index a97a9c885b5..6c4acbc3338 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_list.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_listbyresourcegroup.go b/resource-manager/privatedns/2024-06-01/privatezones/method_listbyresourcegroup.go index be1d3300f4e..439b0f6f20c 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_listbyresourcegroup.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/method_update.go b/resource-manager/privatedns/2024-06-01/privatezones/method_update.go index 0f4953dfc0d..b41d04ba2ad 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/method_update.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/privatezones/version.go b/resource-manager/privatedns/2024-06-01/privatezones/version.go index 08a3e86da79..b1105c70edd 100644 --- a/resource-manager/privatedns/2024-06-01/privatezones/version.go +++ b/resource-manager/privatedns/2024-06-01/privatezones/version.go @@ -1,12 +1,10 @@ package privatezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatezones/2024-06-01" } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/README.md b/resource-manager/privatedns/2024-06-01/recordsets/README.md index cceea4ff4e4..f694d347442 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/README.md +++ b/resource-manager/privatedns/2024-06-01/recordsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2024-06-01/recordsets` Documentation -The `recordsets` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2024-06-01`). +The `recordsets` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2024-06-01/recordsets/client.go b/resource-manager/privatedns/2024-06-01/recordsets/client.go index 18ff6ef4956..dc9e1a5c168 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/client.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/client.go @@ -15,7 +15,7 @@ type RecordSetsClient struct { } func NewRecordSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecordSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recordsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recordsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecordSetsClient: %+v", err) } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/id_privatednszone.go b/resource-manager/privatedns/2024-06-01/recordsets/id_privatednszone.go index 65ba5903e02..9276ed353ab 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/id_privatednszone.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/id_privatezone.go b/resource-manager/privatedns/2024-06-01/recordsets/id_privatezone.go index 2c9cd137e38..c9210143134 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/id_privatezone.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/id_privatezone.go @@ -44,7 +44,7 @@ func ParsePrivateZoneID(input string) (*PrivateZoneId, error) { } id := PrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateZoneIDInsensitively(input string) (*PrivateZoneId, error) { } id := PrivateZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/id_recordtype.go b/resource-manager/privatedns/2024-06-01/recordsets/id_recordtype.go index a866a37ab87..3676c88bcaf 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/id_recordtype.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/id_recordtype.go @@ -46,7 +46,7 @@ func ParseRecordTypeID(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error) { } id := RecordTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_createorupdate.go b/resource-manager/privatedns/2024-06-01/recordsets/method_createorupdate.go index da283847699..261e33677c0 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_createorupdate.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c RecordSetsClient) CreateOrUpdate(ctx context.Context, id RecordTypeId, i var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_delete.go b/resource-manager/privatedns/2024-06-01/recordsets/method_delete.go index bac259d0f30..cd48363f800 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_delete.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_get.go b/resource-manager/privatedns/2024-06-01/recordsets/method_get.go index 4cea3370054..67d36e44a1e 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_get.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_get.go @@ -45,7 +45,6 @@ func (c RecordSetsClient) Get(ctx context.Context, id RecordTypeId) (result GetO var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_list.go b/resource-manager/privatedns/2024-06-01/recordsets/method_list.go index 9c2a2020943..a31f588612b 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_list.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_listbytype.go b/resource-manager/privatedns/2024-06-01/recordsets/method_listbytype.go index 3705ca025ec..80a3ca7351f 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_listbytype.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_listbytype.go @@ -40,6 +40,7 @@ func (o ListByTypeOperationOptions) ToHeaders() *client.Headers { func (o ListByTypeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/method_update.go b/resource-manager/privatedns/2024-06-01/recordsets/method_update.go index def3737e664..f5d3687ece9 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/method_update.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecordSetsClient) Update(ctx context.Context, id RecordTypeId, input Rec var model RecordSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2024-06-01/recordsets/version.go b/resource-manager/privatedns/2024-06-01/recordsets/version.go index d2ce93f11bb..cc37da2535c 100644 --- a/resource-manager/privatedns/2024-06-01/recordsets/version.go +++ b/resource-manager/privatedns/2024-06-01/recordsets/version.go @@ -1,12 +1,10 @@ package recordsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recordsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recordsets/2024-06-01" } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/README.md b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/README.md index fc8d018e847..016c3e9ae6d 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/README.md +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2024-06-01/virtualnetworklinks` Documentation -The `virtualnetworklinks` SDK allows for interaction with the Azure Resource Manager Service `privatedns` (API Version `2024-06-01`). +The `virtualnetworklinks` SDK allows for interaction with Azure Resource Manager `privatedns` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/client.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/client.go index 69e2bb7e2f1..f81f0abd63a 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/client.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/client.go @@ -15,7 +15,7 @@ type VirtualNetworkLinksClient struct { } func NewVirtualNetworkLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworklinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworklinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkLinksClient: %+v", err) } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_privatednszone.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_privatednszone.go index 1d07795df74..9a5c79a1d15 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_privatednszone.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_privatednszone.go @@ -42,7 +42,7 @@ func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error) { } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error) } id := PrivateDnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_virtualnetworklink.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_virtualnetworklink.go index 41ad08f463d..b4b14c10ddf 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_virtualnetworklink.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/id_virtualnetworklink.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkLinkID(input string) (*VirtualNetworkLinkId, error) { } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkLinkIDInsensitively(input string) (*VirtualNetworkLinkId } id := VirtualNetworkLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_createorupdate.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_createorupdate.go index c6bc6fe5517..8f62fdb509b 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_createorupdate.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_delete.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_delete.go index d170aa216a1..655a60540de 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_delete.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_get.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_get.go index 27873563faf..c3d4a23300c 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_get.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkLinksClient) Get(ctx context.Context, id VirtualNetworkLin var model VirtualNetworkLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_list.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_list.go index 096ad73c974..2dcf66fa561 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_list.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_update.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_update.go index 752ec2d4324..08fd83123c4 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_update.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/version.go b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/version.go index c23491db140..3c947020828 100644 --- a/resource-manager/privatedns/2024-06-01/virtualnetworklinks/version.go +++ b/resource-manager/privatedns/2024-06-01/virtualnetworklinks/version.go @@ -1,12 +1,10 @@ package virtualnetworklinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworklinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworklinks/2024-06-01" } diff --git a/resource-manager/purview/2021-07-01/account/README.md b/resource-manager/purview/2021-07-01/account/README.md index 25e125a7258..3781520f63c 100644 --- a/resource-manager/purview/2021-07-01/account/README.md +++ b/resource-manager/purview/2021-07-01/account/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account` Documentation -The `account` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-07-01`). +The `account` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-07-01/account/client.go b/resource-manager/purview/2021-07-01/account/client.go index 4bcb9151fc1..ca8361d93ef 100644 --- a/resource-manager/purview/2021-07-01/account/client.go +++ b/resource-manager/purview/2021-07-01/account/client.go @@ -15,7 +15,7 @@ type AccountClient struct { } func NewAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "account", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "account", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountClient: %+v", err) } diff --git a/resource-manager/purview/2021-07-01/account/id_account.go b/resource-manager/purview/2021-07-01/account/id_account.go index ae936ac9638..e6f7579f1b0 100644 --- a/resource-manager/purview/2021-07-01/account/id_account.go +++ b/resource-manager/purview/2021-07-01/account/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-07-01/account/method_get.go b/resource-manager/purview/2021-07-01/account/method_get.go index 6fc12dff8ca..50b88c8421d 100644 --- a/resource-manager/purview/2021-07-01/account/method_get.go +++ b/resource-manager/purview/2021-07-01/account/method_get.go @@ -45,7 +45,6 @@ func (c AccountClient) Get(ctx context.Context, id AccountId) (result GetOperati var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/account/method_listkeys.go b/resource-manager/purview/2021-07-01/account/method_listkeys.go index d7a07df1bca..845382da79b 100644 --- a/resource-manager/purview/2021-07-01/account/method_listkeys.go +++ b/resource-manager/purview/2021-07-01/account/method_listkeys.go @@ -46,7 +46,6 @@ func (c AccountClient) ListKeys(ctx context.Context, id AccountId) (result ListK var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/account/version.go b/resource-manager/purview/2021-07-01/account/version.go index e2189d2f636..559ac62f4c8 100644 --- a/resource-manager/purview/2021-07-01/account/version.go +++ b/resource-manager/purview/2021-07-01/account/version.go @@ -1,12 +1,10 @@ package account -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/account/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/account/2021-07-01" } diff --git a/resource-manager/purview/2021-07-01/defaultaccount/README.md b/resource-manager/purview/2021-07-01/defaultaccount/README.md index dc7c4c80031..46c65085a0d 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/README.md +++ b/resource-manager/purview/2021-07-01/defaultaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/defaultaccount` Documentation -The `defaultaccount` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-07-01`). +The `defaultaccount` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-07-01/defaultaccount/client.go b/resource-manager/purview/2021-07-01/defaultaccount/client.go index 9f39c70c027..b1353254168 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/client.go +++ b/resource-manager/purview/2021-07-01/defaultaccount/client.go @@ -15,7 +15,7 @@ type DefaultAccountClient struct { } func NewDefaultAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*DefaultAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "defaultaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "defaultaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DefaultAccountClient: %+v", err) } diff --git a/resource-manager/purview/2021-07-01/defaultaccount/method_get.go b/resource-manager/purview/2021-07-01/defaultaccount/method_get.go index e33492e83da..95c19903158 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/method_get.go +++ b/resource-manager/purview/2021-07-01/defaultaccount/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DefaultAccountClient) Get(ctx context.Context, options GetOperationOptio var model DefaultAccountPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/defaultaccount/method_remove.go b/resource-manager/purview/2021-07-01/defaultaccount/method_remove.go index d99e43f4955..5ddf21dd268 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/method_remove.go +++ b/resource-manager/purview/2021-07-01/defaultaccount/method_remove.go @@ -35,6 +35,7 @@ func (o RemoveOperationOptions) ToHeaders() *client.Headers { func (o RemoveOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/purview/2021-07-01/defaultaccount/method_set.go b/resource-manager/purview/2021-07-01/defaultaccount/method_set.go index 171325c89f8..bbf87ba5260 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/method_set.go +++ b/resource-manager/purview/2021-07-01/defaultaccount/method_set.go @@ -49,7 +49,6 @@ func (c DefaultAccountClient) Set(ctx context.Context, input DefaultAccountPaylo var model DefaultAccountPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/defaultaccount/version.go b/resource-manager/purview/2021-07-01/defaultaccount/version.go index 0e435e3f618..ee8753d8792 100644 --- a/resource-manager/purview/2021-07-01/defaultaccount/version.go +++ b/resource-manager/purview/2021-07-01/defaultaccount/version.go @@ -1,12 +1,10 @@ package defaultaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/defaultaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/defaultaccount/2021-07-01" } diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/README.md b/resource-manager/purview/2021-07-01/privateendpointconnection/README.md index 1cfea677cec..bd1dc875fb8 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/README.md +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-07-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/client.go b/resource-manager/purview/2021-07-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/client.go +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/id_account.go b/resource-manager/purview/2021-07-01/privateendpointconnection/id_account.go index 698ea71a509..49ca98c3862 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/id_account.go +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/purview/2021-07-01/privateendpointconnection/id_privateendpointconnection.go index 75edcd99c62..6bb4b616351 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/method_get.go b/resource-manager/purview/2021-07-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/method_get.go +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/privateendpointconnection/version.go b/resource-manager/purview/2021-07-01/privateendpointconnection/version.go index 85b4b20f080..cdb09faf4f1 100644 --- a/resource-manager/purview/2021-07-01/privateendpointconnection/version.go +++ b/resource-manager/purview/2021-07-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2021-07-01" } diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/README.md b/resource-manager/purview/2021-07-01/privatelinkresource/README.md index a5ad0e4dcfd..876bc1f0f25 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/README.md +++ b/resource-manager/purview/2021-07-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-07-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/client.go b/resource-manager/purview/2021-07-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/client.go +++ b/resource-manager/purview/2021-07-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/id_account.go b/resource-manager/purview/2021-07-01/privatelinkresource/id_account.go index 815a60abd52..0f5e658e304 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/id_account.go +++ b/resource-manager/purview/2021-07-01/privatelinkresource/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/purview/2021-07-01/privatelinkresource/id_privatelinkresource.go index e61967182dd..269120dc230 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/purview/2021-07-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/method_getbygroupid.go b/resource-manager/purview/2021-07-01/privatelinkresource/method_getbygroupid.go index 6f976feb389..f13de63b3f9 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/method_getbygroupid.go +++ b/resource-manager/purview/2021-07-01/privatelinkresource/method_getbygroupid.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) GetByGroupId(ctx context.Context, id PrivateL var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/privatelinkresource/version.go b/resource-manager/purview/2021-07-01/privatelinkresource/version.go index 5f5d75d5b8d..a698952b784 100644 --- a/resource-manager/purview/2021-07-01/privatelinkresource/version.go +++ b/resource-manager/purview/2021-07-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2021-07-01" } diff --git a/resource-manager/purview/2021-07-01/provider/README.md b/resource-manager/purview/2021-07-01/provider/README.md index cca6aa0ef2d..7c38336976e 100644 --- a/resource-manager/purview/2021-07-01/provider/README.md +++ b/resource-manager/purview/2021-07-01/provider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/provider` Documentation -The `provider` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-07-01`). +The `provider` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-07-01/provider/client.go b/resource-manager/purview/2021-07-01/provider/client.go index 2128fec9d6f..b982cfdab87 100644 --- a/resource-manager/purview/2021-07-01/provider/client.go +++ b/resource-manager/purview/2021-07-01/provider/client.go @@ -15,7 +15,7 @@ type ProviderClient struct { } func NewProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderClient: %+v", err) } diff --git a/resource-manager/purview/2021-07-01/provider/method_accountschecknameavailability.go b/resource-manager/purview/2021-07-01/provider/method_accountschecknameavailability.go index c14ad9bdf39..f919281e3b1 100644 --- a/resource-manager/purview/2021-07-01/provider/method_accountschecknameavailability.go +++ b/resource-manager/purview/2021-07-01/provider/method_accountschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProviderClient) AccountsCheckNameAvailability(ctx context.Context, id co var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-07-01/provider/version.go b/resource-manager/purview/2021-07-01/provider/version.go index 36149186641..5d6bec9a0a0 100644 --- a/resource-manager/purview/2021-07-01/provider/version.go +++ b/resource-manager/purview/2021-07-01/provider/version.go @@ -1,12 +1,10 @@ package provider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provider/2021-07-01" } diff --git a/resource-manager/purview/2021-12-01/account/README.md b/resource-manager/purview/2021-12-01/account/README.md index 7b8ee49cd77..1268fd1aad1 100644 --- a/resource-manager/purview/2021-12-01/account/README.md +++ b/resource-manager/purview/2021-12-01/account/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/account` Documentation -The `account` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `account` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/account/client.go b/resource-manager/purview/2021-12-01/account/client.go index 4bcb9151fc1..ca8361d93ef 100644 --- a/resource-manager/purview/2021-12-01/account/client.go +++ b/resource-manager/purview/2021-12-01/account/client.go @@ -15,7 +15,7 @@ type AccountClient struct { } func NewAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "account", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "account", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/account/id_account.go b/resource-manager/purview/2021-12-01/account/id_account.go index ae936ac9638..e6f7579f1b0 100644 --- a/resource-manager/purview/2021-12-01/account/id_account.go +++ b/resource-manager/purview/2021-12-01/account/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/account/method_get.go b/resource-manager/purview/2021-12-01/account/method_get.go index 6fc12dff8ca..50b88c8421d 100644 --- a/resource-manager/purview/2021-12-01/account/method_get.go +++ b/resource-manager/purview/2021-12-01/account/method_get.go @@ -45,7 +45,6 @@ func (c AccountClient) Get(ctx context.Context, id AccountId) (result GetOperati var model Account result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/account/method_listkeys.go b/resource-manager/purview/2021-12-01/account/method_listkeys.go index d7a07df1bca..845382da79b 100644 --- a/resource-manager/purview/2021-12-01/account/method_listkeys.go +++ b/resource-manager/purview/2021-12-01/account/method_listkeys.go @@ -46,7 +46,6 @@ func (c AccountClient) ListKeys(ctx context.Context, id AccountId) (result ListK var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/account/version.go b/resource-manager/purview/2021-12-01/account/version.go index 37db822df6f..01160da0e9a 100644 --- a/resource-manager/purview/2021-12-01/account/version.go +++ b/resource-manager/purview/2021-12-01/account/version.go @@ -1,12 +1,10 @@ package account -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/account/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/account/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/defaultaccount/README.md b/resource-manager/purview/2021-12-01/defaultaccount/README.md index f54eb58f1fb..e9baa98cf9f 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/README.md +++ b/resource-manager/purview/2021-12-01/defaultaccount/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/defaultaccount` Documentation -The `defaultaccount` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `defaultaccount` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/defaultaccount/client.go b/resource-manager/purview/2021-12-01/defaultaccount/client.go index 9f39c70c027..b1353254168 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/client.go +++ b/resource-manager/purview/2021-12-01/defaultaccount/client.go @@ -15,7 +15,7 @@ type DefaultAccountClient struct { } func NewDefaultAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*DefaultAccountClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "defaultaccount", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "defaultaccount", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DefaultAccountClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/defaultaccount/method_get.go b/resource-manager/purview/2021-12-01/defaultaccount/method_get.go index e33492e83da..95c19903158 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/method_get.go +++ b/resource-manager/purview/2021-12-01/defaultaccount/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DefaultAccountClient) Get(ctx context.Context, options GetOperationOptio var model DefaultAccountPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/defaultaccount/method_remove.go b/resource-manager/purview/2021-12-01/defaultaccount/method_remove.go index d99e43f4955..5ddf21dd268 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/method_remove.go +++ b/resource-manager/purview/2021-12-01/defaultaccount/method_remove.go @@ -35,6 +35,7 @@ func (o RemoveOperationOptions) ToHeaders() *client.Headers { func (o RemoveOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/purview/2021-12-01/defaultaccount/method_set.go b/resource-manager/purview/2021-12-01/defaultaccount/method_set.go index 171325c89f8..bbf87ba5260 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/method_set.go +++ b/resource-manager/purview/2021-12-01/defaultaccount/method_set.go @@ -49,7 +49,6 @@ func (c DefaultAccountClient) Set(ctx context.Context, input DefaultAccountPaylo var model DefaultAccountPayload result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/defaultaccount/version.go b/resource-manager/purview/2021-12-01/defaultaccount/version.go index 1ce4e78f75a..129f97473da 100644 --- a/resource-manager/purview/2021-12-01/defaultaccount/version.go +++ b/resource-manager/purview/2021-12-01/defaultaccount/version.go @@ -1,12 +1,10 @@ package defaultaccount -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/defaultaccount/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/defaultaccount/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/feature/README.md b/resource-manager/purview/2021-12-01/feature/README.md index 1a863d046c0..5e37f8ac10b 100644 --- a/resource-manager/purview/2021-12-01/feature/README.md +++ b/resource-manager/purview/2021-12-01/feature/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/feature` Documentation -The `feature` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `feature` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/feature/client.go b/resource-manager/purview/2021-12-01/feature/client.go index ce76f0761aa..38863527c69 100644 --- a/resource-manager/purview/2021-12-01/feature/client.go +++ b/resource-manager/purview/2021-12-01/feature/client.go @@ -15,7 +15,7 @@ type FeatureClient struct { } func NewFeatureClientWithBaseURI(sdkApi sdkEnv.Api) (*FeatureClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "feature", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "feature", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeatureClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/feature/id_account.go b/resource-manager/purview/2021-12-01/feature/id_account.go index 2041dd1955f..bdd27024caf 100644 --- a/resource-manager/purview/2021-12-01/feature/id_account.go +++ b/resource-manager/purview/2021-12-01/feature/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/feature/id_location.go b/resource-manager/purview/2021-12-01/feature/id_location.go index fdb8cc3a10c..2f80b25f988 100644 --- a/resource-manager/purview/2021-12-01/feature/id_location.go +++ b/resource-manager/purview/2021-12-01/feature/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/feature/method_accountget.go b/resource-manager/purview/2021-12-01/feature/method_accountget.go index 868e9e5ea40..afd4a9be93f 100644 --- a/resource-manager/purview/2021-12-01/feature/method_accountget.go +++ b/resource-manager/purview/2021-12-01/feature/method_accountget.go @@ -50,7 +50,6 @@ func (c FeatureClient) AccountGet(ctx context.Context, id AccountId, input Batch var model BatchFeatureStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/feature/method_subscriptionget.go b/resource-manager/purview/2021-12-01/feature/method_subscriptionget.go index bcde553bba5..00b64138de9 100644 --- a/resource-manager/purview/2021-12-01/feature/method_subscriptionget.go +++ b/resource-manager/purview/2021-12-01/feature/method_subscriptionget.go @@ -50,7 +50,6 @@ func (c FeatureClient) SubscriptionGet(ctx context.Context, id LocationId, input var model BatchFeatureStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/feature/version.go b/resource-manager/purview/2021-12-01/feature/version.go index 2c8abdfea06..129e447b0a6 100644 --- a/resource-manager/purview/2021-12-01/feature/version.go +++ b/resource-manager/purview/2021-12-01/feature/version.go @@ -1,12 +1,10 @@ package feature -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/feature/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/feature/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/README.md b/resource-manager/purview/2021-12-01/kafkaconfiguration/README.md index 55b94ca55f4..37dda0f6015 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/README.md +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/kafkaconfiguration` Documentation -The `kafkaconfiguration` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `kafkaconfiguration` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/client.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/client.go index 13f2fdeae82..96f013e27ee 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/client.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/client.go @@ -15,7 +15,7 @@ type KafkaConfigurationClient struct { } func NewKafkaConfigurationClientWithBaseURI(sdkApi sdkEnv.Api) (*KafkaConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "kafkaconfiguration", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "kafkaconfiguration", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KafkaConfigurationClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/id_account.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/id_account.go index e551c413613..c166889ab01 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/id_account.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/id_kafkaconfiguration.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/id_kafkaconfiguration.go index 2f350a9e780..83c39b4b0b3 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/id_kafkaconfiguration.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/id_kafkaconfiguration.go @@ -44,7 +44,7 @@ func ParseKafkaConfigurationID(input string) (*KafkaConfigurationId, error) { } id := KafkaConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKafkaConfigurationIDInsensitively(input string) (*KafkaConfigurationId } id := KafkaConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/method_createorupdate.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/method_createorupdate.go index eb7826a0a51..b8abbb8f7e9 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/method_createorupdate.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/method_createorupdate.go @@ -50,7 +50,6 @@ func (c KafkaConfigurationClient) CreateOrUpdate(ctx context.Context, id KafkaCo var model KafkaConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/method_get.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/method_get.go index 623b6f6cb3a..7b1de05111b 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/method_get.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/method_get.go @@ -45,7 +45,6 @@ func (c KafkaConfigurationClient) Get(ctx context.Context, id KafkaConfiguration var model KafkaConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/kafkaconfiguration/version.go b/resource-manager/purview/2021-12-01/kafkaconfiguration/version.go index b606a95aa7e..3e9c3af325d 100644 --- a/resource-manager/purview/2021-12-01/kafkaconfiguration/version.go +++ b/resource-manager/purview/2021-12-01/kafkaconfiguration/version.go @@ -1,12 +1,10 @@ package kafkaconfiguration -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/kafkaconfiguration/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/kafkaconfiguration/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/README.md b/resource-manager/purview/2021-12-01/privateendpointconnection/README.md index 36028811669..4292c465254 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/README.md +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/client.go b/resource-manager/purview/2021-12-01/privateendpointconnection/client.go index e430fae79d9..60f4edcfcfb 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/client.go +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionClient struct { } func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/id_account.go b/resource-manager/purview/2021-12-01/privateendpointconnection/id_account.go index 698ea71a509..49ca98c3862 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/id_account.go +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/purview/2021-12-01/privateendpointconnection/id_privateendpointconnection.go index 75edcd99c62..6bb4b616351 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/method_get.go b/resource-manager/purview/2021-12-01/privateendpointconnection/method_get.go index d0ba6c4f1f5..0658c39bfa5 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/method_get.go +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndp var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/privateendpointconnection/version.go b/resource-manager/purview/2021-12-01/privateendpointconnection/version.go index bf302354e78..a36a4b32f54 100644 --- a/resource-manager/purview/2021-12-01/privateendpointconnection/version.go +++ b/resource-manager/purview/2021-12-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/README.md b/resource-manager/purview/2021-12-01/privatelinkresource/README.md index 8223c1c6820..5b4342a32a9 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/README.md +++ b/resource-manager/purview/2021-12-01/privatelinkresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/privatelinkresource` Documentation -The `privatelinkresource` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/client.go b/resource-manager/purview/2021-12-01/privatelinkresource/client.go index 7ff8fa2a05f..36c07ed6dbf 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/client.go +++ b/resource-manager/purview/2021-12-01/privatelinkresource/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourceClient struct { } func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/id_account.go b/resource-manager/purview/2021-12-01/privatelinkresource/id_account.go index 815a60abd52..0f5e658e304 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/id_account.go +++ b/resource-manager/purview/2021-12-01/privatelinkresource/id_account.go @@ -42,7 +42,7 @@ func ParseAccountID(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAccountIDInsensitively(input string) (*AccountId, error) { } id := AccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/purview/2021-12-01/privatelinkresource/id_privatelinkresource.go index e61967182dd..269120dc230 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/purview/2021-12-01/privatelinkresource/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/method_getbygroupid.go b/resource-manager/purview/2021-12-01/privatelinkresource/method_getbygroupid.go index 6f976feb389..f13de63b3f9 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/method_getbygroupid.go +++ b/resource-manager/purview/2021-12-01/privatelinkresource/method_getbygroupid.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourceClient) GetByGroupId(ctx context.Context, id PrivateL var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/privatelinkresource/version.go b/resource-manager/purview/2021-12-01/privatelinkresource/version.go index be0fb43d359..06ff1ff6dcb 100644 --- a/resource-manager/purview/2021-12-01/privatelinkresource/version.go +++ b/resource-manager/purview/2021-12-01/privatelinkresource/version.go @@ -1,12 +1,10 @@ package privatelinkresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresource/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/provider/README.md b/resource-manager/purview/2021-12-01/provider/README.md index 1868434a8b5..31a2e472af1 100644 --- a/resource-manager/purview/2021-12-01/provider/README.md +++ b/resource-manager/purview/2021-12-01/provider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/provider` Documentation -The `provider` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `provider` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/provider/client.go b/resource-manager/purview/2021-12-01/provider/client.go index 2128fec9d6f..b982cfdab87 100644 --- a/resource-manager/purview/2021-12-01/provider/client.go +++ b/resource-manager/purview/2021-12-01/provider/client.go @@ -15,7 +15,7 @@ type ProviderClient struct { } func NewProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/provider/method_accountschecknameavailability.go b/resource-manager/purview/2021-12-01/provider/method_accountschecknameavailability.go index c14ad9bdf39..f919281e3b1 100644 --- a/resource-manager/purview/2021-12-01/provider/method_accountschecknameavailability.go +++ b/resource-manager/purview/2021-12-01/provider/method_accountschecknameavailability.go @@ -51,7 +51,6 @@ func (c ProviderClient) AccountsCheckNameAvailability(ctx context.Context, id co var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/purview/2021-12-01/provider/version.go b/resource-manager/purview/2021-12-01/provider/version.go index 12578d69f43..933d1536019 100644 --- a/resource-manager/purview/2021-12-01/provider/version.go +++ b/resource-manager/purview/2021-12-01/provider/version.go @@ -1,12 +1,10 @@ package provider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provider/2021-12-01" } diff --git a/resource-manager/purview/2021-12-01/usages/README.md b/resource-manager/purview/2021-12-01/usages/README.md index 1a6d4da6c06..0937c3ca845 100644 --- a/resource-manager/purview/2021-12-01/usages/README.md +++ b/resource-manager/purview/2021-12-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-12-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `purview` (API Version `2021-12-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `purview` (API Version `2021-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/purview/2021-12-01/usages/client.go b/resource-manager/purview/2021-12-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/purview/2021-12-01/usages/client.go +++ b/resource-manager/purview/2021-12-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/purview/2021-12-01/usages/id_location.go b/resource-manager/purview/2021-12-01/usages/id_location.go index f75dcec7a80..08996aadedf 100644 --- a/resource-manager/purview/2021-12-01/usages/id_location.go +++ b/resource-manager/purview/2021-12-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/purview/2021-12-01/usages/method_get.go b/resource-manager/purview/2021-12-01/usages/method_get.go index 4cd01e68db2..5eecce86974 100644 --- a/resource-manager/purview/2021-12-01/usages/method_get.go +++ b/resource-manager/purview/2021-12-01/usages/method_get.go @@ -39,6 +39,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/purview/2021-12-01/usages/version.go b/resource-manager/purview/2021-12-01/usages/version.go index 5e5d3c6e5ec..30b728b7fc9 100644 --- a/resource-manager/purview/2021-12-01/usages/version.go +++ b/resource-manager/purview/2021-12-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2021-12-01" } diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/README.md b/resource-manager/qumulostorage/2022-10-12/filesystems/README.md index e621a47ac68..ed74a54fbfc 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/README.md +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/qumulostorage/2022-10-12/filesystems` Documentation -The `filesystems` SDK allows for interaction with the Azure Resource Manager Service `qumulostorage` (API Version `2022-10-12`). +The `filesystems` SDK allows for interaction with Azure Resource Manager `qumulostorage` (API Version `2022-10-12`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/client.go b/resource-manager/qumulostorage/2022-10-12/filesystems/client.go index f97ef184323..dd73acc9a44 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/client.go +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/client.go @@ -15,7 +15,7 @@ type FileSystemsClient struct { } func NewFileSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*FileSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filesystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filesystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileSystemsClient: %+v", err) } diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/id_filesystem.go b/resource-manager/qumulostorage/2022-10-12/filesystems/id_filesystem.go index d7ec6523138..907e5244508 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/id_filesystem.go +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/id_filesystem.go @@ -42,7 +42,7 @@ func ParseFileSystemID(input string) (*FileSystemId, error) { } id := FileSystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFileSystemIDInsensitively(input string) (*FileSystemId, error) { } id := FileSystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/method_get.go b/resource-manager/qumulostorage/2022-10-12/filesystems/method_get.go index 149cf7376da..307f75ea68f 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/method_get.go +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/method_get.go @@ -45,7 +45,6 @@ func (c FileSystemsClient) Get(ctx context.Context, id FileSystemId) (result Get var model FileSystemResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/method_update.go b/resource-manager/qumulostorage/2022-10-12/filesystems/method_update.go index 6d6d8db228b..19aeccfb2da 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/method_update.go +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/method_update.go @@ -49,7 +49,6 @@ func (c FileSystemsClient) Update(ctx context.Context, id FileSystemId, input Fi var model FileSystemResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/qumulostorage/2022-10-12/filesystems/version.go b/resource-manager/qumulostorage/2022-10-12/filesystems/version.go index f4fa44811cd..3c95df0be9f 100644 --- a/resource-manager/qumulostorage/2022-10-12/filesystems/version.go +++ b/resource-manager/qumulostorage/2022-10-12/filesystems/version.go @@ -1,12 +1,10 @@ package filesystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-12" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filesystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filesystems/2022-10-12" } diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/README.md b/resource-manager/qumulostorage/2024-06-19/filesystems/README.md index 2eceaee442a..9c98439082e 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/README.md +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/qumulostorage/2024-06-19/filesystems` Documentation -The `filesystems` SDK allows for interaction with the Azure Resource Manager Service `qumulostorage` (API Version `2024-06-19`). +The `filesystems` SDK allows for interaction with Azure Resource Manager `qumulostorage` (API Version `2024-06-19`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/client.go b/resource-manager/qumulostorage/2024-06-19/filesystems/client.go index f97ef184323..dd73acc9a44 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/client.go +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/client.go @@ -15,7 +15,7 @@ type FileSystemsClient struct { } func NewFileSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*FileSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "filesystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "filesystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileSystemsClient: %+v", err) } diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go index d7ec6523138..907e5244508 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/id_filesystem.go @@ -42,7 +42,7 @@ func ParseFileSystemID(input string) (*FileSystemId, error) { } id := FileSystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFileSystemIDInsensitively(input string) (*FileSystemId, error) { } id := FileSystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go index 524061400fa..aa1d66ab217 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_get.go @@ -45,7 +45,6 @@ func (c FileSystemsClient) Get(ctx context.Context, id FileSystemId) (result Get var model LiftrBaseStorageFileSystemResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go b/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go index 0e51973429a..379fc12f6d4 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/method_update.go @@ -49,7 +49,6 @@ func (c FileSystemsClient) Update(ctx context.Context, id FileSystemId, input Li var model LiftrBaseStorageFileSystemResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/qumulostorage/2024-06-19/filesystems/version.go b/resource-manager/qumulostorage/2024-06-19/filesystems/version.go index d25d8f3799a..0fc52719273 100644 --- a/resource-manager/qumulostorage/2024-06-19/filesystems/version.go +++ b/resource-manager/qumulostorage/2024-06-19/filesystems/version.go @@ -1,12 +1,10 @@ package filesystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-19" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/filesystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/filesystems/2024-06-19" } diff --git a/resource-manager/quota/2023-02-01/quotainformation/README.md b/resource-manager/quota/2023-02-01/quotainformation/README.md index 95e2cc6722c..f41af873393 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/README.md +++ b/resource-manager/quota/2023-02-01/quotainformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/quota/2023-02-01/quotainformation` Documentation -The `quotainformation` SDK allows for interaction with the Azure Resource Manager Service `quota` (API Version `2023-02-01`). +The `quotainformation` SDK allows for interaction with Azure Resource Manager `quota` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/quota/2023-02-01/quotainformation/client.go b/resource-manager/quota/2023-02-01/quotainformation/client.go index 6e0f6474529..54e760f54cf 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/client.go +++ b/resource-manager/quota/2023-02-01/quotainformation/client.go @@ -15,7 +15,7 @@ type QuotaInformationClient struct { } func NewQuotaInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotainformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotainformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaInformationClient: %+v", err) } diff --git a/resource-manager/quota/2023-02-01/quotainformation/id_scopedquota.go b/resource-manager/quota/2023-02-01/quotainformation/id_scopedquota.go index 5d1f2a84d89..60a6469f652 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/id_scopedquota.go +++ b/resource-manager/quota/2023-02-01/quotainformation/id_scopedquota.go @@ -40,7 +40,7 @@ func ParseScopedQuotaID(input string) (*ScopedQuotaId, error) { } id := ScopedQuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedQuotaIDInsensitively(input string) (*ScopedQuotaId, error) { } id := ScopedQuotaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/quota/2023-02-01/quotainformation/method_quotaget.go b/resource-manager/quota/2023-02-01/quotainformation/method_quotaget.go index f4d7684e570..d0648912ced 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/method_quotaget.go +++ b/resource-manager/quota/2023-02-01/quotainformation/method_quotaget.go @@ -45,7 +45,6 @@ func (c QuotaInformationClient) QuotaGet(ctx context.Context, id ScopedQuotaId) var model CurrentQuotaLimitBase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/quota/2023-02-01/quotainformation/model_limitjsonobject.go b/resource-manager/quota/2023-02-01/quotainformation/model_limitjsonobject.go index f93a5d1e7bc..72392bdde44 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/model_limitjsonobject.go +++ b/resource-manager/quota/2023-02-01/quotainformation/model_limitjsonobject.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LimitJsonObject interface { + LimitJsonObject() BaseLimitJsonObjectImpl } -// RawLimitJsonObjectImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LimitJsonObject = BaseLimitJsonObjectImpl{} + +type BaseLimitJsonObjectImpl struct { + LimitObjectType LimitType `json:"limitObjectType"` +} + +func (s BaseLimitJsonObjectImpl) LimitJsonObject() BaseLimitJsonObjectImpl { + return s +} + +var _ LimitJsonObject = RawLimitJsonObjectImpl{} + +// RawLimitJsonObjectImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLimitJsonObjectImpl struct { - Type string - Values map[string]interface{} + limitJsonObject BaseLimitJsonObjectImpl + Type string + Values map[string]interface{} +} + +func (s RawLimitJsonObjectImpl) LimitJsonObject() BaseLimitJsonObjectImpl { + return s.limitJsonObject } -func unmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, error) { +func UnmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, erro return out, nil } - out := RawLimitJsonObjectImpl{ - Type: value, - Values: temp, + var parent BaseLimitJsonObjectImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLimitJsonObjectImpl: %+v", err) } - return out, nil + + return RawLimitJsonObjectImpl{ + limitJsonObject: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/quota/2023-02-01/quotainformation/model_limitobject.go b/resource-manager/quota/2023-02-01/quotainformation/model_limitobject.go index 855b237c84f..151ec263df3 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/model_limitobject.go +++ b/resource-manager/quota/2023-02-01/quotainformation/model_limitobject.go @@ -15,6 +15,14 @@ type LimitObject struct { Value int64 `json:"value"` // Fields inherited from LimitJsonObject + + LimitObjectType LimitType `json:"limitObjectType"` +} + +func (s LimitObject) LimitJsonObject() BaseLimitJsonObjectImpl { + return BaseLimitJsonObjectImpl{ + LimitObjectType: s.LimitObjectType, + } } var _ json.Marshaler = LimitObject{} @@ -28,9 +36,10 @@ func (s LimitObject) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LimitObject: %+v", err) } + decoded["limitObjectType"] = "LimitValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/quota/2023-02-01/quotainformation/model_quotaproperties.go b/resource-manager/quota/2023-02-01/quotainformation/model_quotaproperties.go index 35b4f564cf6..3e50b938f7b 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/model_quotaproperties.go +++ b/resource-manager/quota/2023-02-01/quotainformation/model_quotaproperties.go @@ -40,7 +40,7 @@ func (s *QuotaProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limit"]; ok { - impl, err := unmarshalLimitJsonObjectImplementation(v) + impl, err := UnmarshalLimitJsonObjectImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limit' for 'QuotaProperties': %+v", err) } diff --git a/resource-manager/quota/2023-02-01/quotainformation/version.go b/resource-manager/quota/2023-02-01/quotainformation/version.go index a1a45692ab3..d64dab0a4f1 100644 --- a/resource-manager/quota/2023-02-01/quotainformation/version.go +++ b/resource-manager/quota/2023-02-01/quotainformation/version.go @@ -1,12 +1,10 @@ package quotainformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotainformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotainformation/2023-02-01" } diff --git a/resource-manager/quota/2023-02-01/quotarequests/README.md b/resource-manager/quota/2023-02-01/quotarequests/README.md index a3a183c4685..285335fd721 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/README.md +++ b/resource-manager/quota/2023-02-01/quotarequests/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/quota/2023-02-01/quotarequests` Documentation -The `quotarequests` SDK allows for interaction with the Azure Resource Manager Service `quota` (API Version `2023-02-01`). +The `quotarequests` SDK allows for interaction with Azure Resource Manager `quota` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/quota/2023-02-01/quotarequests/client.go b/resource-manager/quota/2023-02-01/quotarequests/client.go index cf7d0d6922a..19cbb5ad4c2 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/client.go +++ b/resource-manager/quota/2023-02-01/quotarequests/client.go @@ -15,7 +15,7 @@ type QuotaRequestsClient struct { } func NewQuotaRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaRequestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "quotarequests", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "quotarequests", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QuotaRequestsClient: %+v", err) } diff --git a/resource-manager/quota/2023-02-01/quotarequests/id_scopedquotarequest.go b/resource-manager/quota/2023-02-01/quotarequests/id_scopedquotarequest.go index 5adba21eec4..582ee3c2468 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/id_scopedquotarequest.go +++ b/resource-manager/quota/2023-02-01/quotarequests/id_scopedquotarequest.go @@ -40,7 +40,7 @@ func ParseScopedQuotaRequestID(input string) (*ScopedQuotaRequestId, error) { } id := ScopedQuotaRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedQuotaRequestIDInsensitively(input string) (*ScopedQuotaRequestId } id := ScopedQuotaRequestId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/quota/2023-02-01/quotarequests/method_tatusget.go b/resource-manager/quota/2023-02-01/quotarequests/method_tatusget.go index 8c1e3540ce1..e83b8aeee99 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/method_tatusget.go +++ b/resource-manager/quota/2023-02-01/quotarequests/method_tatusget.go @@ -45,7 +45,6 @@ func (c QuotaRequestsClient) TatusGet(ctx context.Context, id ScopedQuotaRequest var model QuotaRequestDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/quota/2023-02-01/quotarequests/method_tatuslist.go b/resource-manager/quota/2023-02-01/quotarequests/method_tatuslist.go index c998bb42521..bb398db7b64 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/method_tatuslist.go +++ b/resource-manager/quota/2023-02-01/quotarequests/method_tatuslist.go @@ -41,6 +41,7 @@ func (o TatusListOperationOptions) ToHeaders() *client.Headers { func (o TatusListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/quota/2023-02-01/quotarequests/model_limitjsonobject.go b/resource-manager/quota/2023-02-01/quotarequests/model_limitjsonobject.go index c0747a35bb0..7d32ccfb55f 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/model_limitjsonobject.go +++ b/resource-manager/quota/2023-02-01/quotarequests/model_limitjsonobject.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LimitJsonObject interface { + LimitJsonObject() BaseLimitJsonObjectImpl } -// RawLimitJsonObjectImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LimitJsonObject = BaseLimitJsonObjectImpl{} + +type BaseLimitJsonObjectImpl struct { + LimitObjectType LimitType `json:"limitObjectType"` +} + +func (s BaseLimitJsonObjectImpl) LimitJsonObject() BaseLimitJsonObjectImpl { + return s +} + +var _ LimitJsonObject = RawLimitJsonObjectImpl{} + +// RawLimitJsonObjectImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLimitJsonObjectImpl struct { - Type string - Values map[string]interface{} + limitJsonObject BaseLimitJsonObjectImpl + Type string + Values map[string]interface{} +} + +func (s RawLimitJsonObjectImpl) LimitJsonObject() BaseLimitJsonObjectImpl { + return s.limitJsonObject } -func unmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, error) { +func UnmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, erro return out, nil } - out := RawLimitJsonObjectImpl{ - Type: value, - Values: temp, + var parent BaseLimitJsonObjectImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLimitJsonObjectImpl: %+v", err) } - return out, nil + + return RawLimitJsonObjectImpl{ + limitJsonObject: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/quota/2023-02-01/quotarequests/model_limitobject.go b/resource-manager/quota/2023-02-01/quotarequests/model_limitobject.go index be93d83b8d0..c278dd2f7c5 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/model_limitobject.go +++ b/resource-manager/quota/2023-02-01/quotarequests/model_limitobject.go @@ -15,6 +15,14 @@ type LimitObject struct { Value int64 `json:"value"` // Fields inherited from LimitJsonObject + + LimitObjectType LimitType `json:"limitObjectType"` +} + +func (s LimitObject) LimitJsonObject() BaseLimitJsonObjectImpl { + return BaseLimitJsonObjectImpl{ + LimitObjectType: s.LimitObjectType, + } } var _ json.Marshaler = LimitObject{} @@ -28,9 +36,10 @@ func (s LimitObject) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LimitObject: %+v", err) } + decoded["limitObjectType"] = "LimitValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/quota/2023-02-01/quotarequests/model_subrequest.go b/resource-manager/quota/2023-02-01/quotarequests/model_subrequest.go index eab2283e2b5..f0386a75ea6 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/model_subrequest.go +++ b/resource-manager/quota/2023-02-01/quotarequests/model_subrequest.go @@ -40,7 +40,7 @@ func (s *SubRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["limit"]; ok { - impl, err := unmarshalLimitJsonObjectImplementation(v) + impl, err := UnmarshalLimitJsonObjectImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Limit' for 'SubRequest': %+v", err) } diff --git a/resource-manager/quota/2023-02-01/quotarequests/version.go b/resource-manager/quota/2023-02-01/quotarequests/version.go index f98f17ee7e2..18c533e415b 100644 --- a/resource-manager/quota/2023-02-01/quotarequests/version.go +++ b/resource-manager/quota/2023-02-01/quotarequests/version.go @@ -1,12 +1,10 @@ package quotarequests -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/quotarequests/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/quotarequests/2023-02-01" } diff --git a/resource-manager/quota/2023-02-01/usagesinformation/README.md b/resource-manager/quota/2023-02-01/usagesinformation/README.md index c9adee41340..64a6a6a39ed 100644 --- a/resource-manager/quota/2023-02-01/usagesinformation/README.md +++ b/resource-manager/quota/2023-02-01/usagesinformation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/quota/2023-02-01/usagesinformation` Documentation -The `usagesinformation` SDK allows for interaction with the Azure Resource Manager Service `quota` (API Version `2023-02-01`). +The `usagesinformation` SDK allows for interaction with Azure Resource Manager `quota` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/quota/2023-02-01/usagesinformation/client.go b/resource-manager/quota/2023-02-01/usagesinformation/client.go index 876d30acad7..1eadace30e6 100644 --- a/resource-manager/quota/2023-02-01/usagesinformation/client.go +++ b/resource-manager/quota/2023-02-01/usagesinformation/client.go @@ -15,7 +15,7 @@ type UsagesInformationClient struct { } func NewUsagesInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesInformationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagesinformation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagesinformation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesInformationClient: %+v", err) } diff --git a/resource-manager/quota/2023-02-01/usagesinformation/id_scopedusage.go b/resource-manager/quota/2023-02-01/usagesinformation/id_scopedusage.go index 3890b57c574..a4d2a2c9d5d 100644 --- a/resource-manager/quota/2023-02-01/usagesinformation/id_scopedusage.go +++ b/resource-manager/quota/2023-02-01/usagesinformation/id_scopedusage.go @@ -40,7 +40,7 @@ func ParseScopedUsageID(input string) (*ScopedUsageId, error) { } id := ScopedUsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedUsageIDInsensitively(input string) (*ScopedUsageId, error) { } id := ScopedUsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/quota/2023-02-01/usagesinformation/method_usagesget.go b/resource-manager/quota/2023-02-01/usagesinformation/method_usagesget.go index 529239091ff..bba4502ecb6 100644 --- a/resource-manager/quota/2023-02-01/usagesinformation/method_usagesget.go +++ b/resource-manager/quota/2023-02-01/usagesinformation/method_usagesget.go @@ -45,7 +45,6 @@ func (c UsagesInformationClient) UsagesGet(ctx context.Context, id ScopedUsageId var model CurrentUsagesBase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/quota/2023-02-01/usagesinformation/version.go b/resource-manager/quota/2023-02-01/usagesinformation/version.go index e606ce3a8a3..f68f064dd24 100644 --- a/resource-manager/quota/2023-02-01/usagesinformation/version.go +++ b/resource-manager/quota/2023-02-01/usagesinformation/version.go @@ -1,12 +1,10 @@ package usagesinformation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagesinformation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagesinformation/2023-02-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/README.md b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/README.md index 1c088935cd7..4197b6a6566 100644 --- a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources` Documentation -The `getprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `getprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/client.go b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/client.go index 2c788db4e51..1257c24a86f 100644 --- a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/client.go @@ -15,7 +15,7 @@ type GetPrivateLinkResourcesClient struct { } func NewGetPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/id_privatelinkresource.go b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/id_privatelinkresource.go index 70ee568e5d3..c2a31e26257 100644 --- a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/id_privatelinkresource.go +++ b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/method_privatelinkresourcesget.go b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/method_privatelinkresourcesget.go index 8074fb34792..d9320826b8d 100644 --- a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/method_privatelinkresourcesget.go +++ b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c GetPrivateLinkResourcesClient) PrivateLinkResourcesGet(ctx context.Conte var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/version.go b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/version.go index dfbf35c3447..baee2028f4c 100644 --- a/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2022-10-01/getprivatelinkresources/version.go @@ -1,12 +1,10 @@ package getprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatelinkresources/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/README.md b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/README.md index 1e4924aee9e..759c8283d19 100644 --- a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources` Documentation -The `listprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `listprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/client.go b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/client.go index d68ed338ccc..0e4c4d9c12a 100644 --- a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ListPrivateLinkResourcesClient struct { } func NewListPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ListPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/id_vault.go b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/id_vault.go index 332d5bf97d5..a781c54881b 100644 --- a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/id_vault.go +++ b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/version.go b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/version.go index aeed26f1c8e..32f15db5865 100644 --- a/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2022-10-01/listprivatelinkresources/version.go @@ -1,12 +1,10 @@ package listprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listprivatelinkresources/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/README.md b/resource-manager/recoveryservices/2022-10-01/recoveryservices/README.md index f764143f102..cdfe34bc53e 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/README.md +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/recoveryservices` Documentation -The `recoveryservices` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `recoveryservices` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/client.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/client.go index 518088771ea..3e7dcf4ddd2 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/client.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/client.go @@ -15,7 +15,7 @@ type RecoveryServicesClient struct { } func NewRecoveryServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoveryservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoveryservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryServicesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_location.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_location.go index 1fd49c9d992..35914900c19 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_location.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_providerlocation.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_providerlocation.go index 33d3548750d..8eeefa68615 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_providerlocation.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_capabilities.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_capabilities.go index 5864d60faeb..5dd5a520fca 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_capabilities.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_capabilities.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) Capabilities(ctx context.Context, id LocationId, var model CapabilitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_checknameavailability.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_checknameavailability.go index 3512794c701..3347af0ccac 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_checknameavailability.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) CheckNameAvailability(ctx context.Context, id Pr var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/recoveryservices/version.go b/resource-manager/recoveryservices/2022-10-01/recoveryservices/version.go index baf8ee7daec..b41db7a03a3 100644 --- a/resource-manager/recoveryservices/2022-10-01/recoveryservices/version.go +++ b/resource-manager/recoveryservices/2022-10-01/recoveryservices/version.go @@ -1,12 +1,10 @@ package recoveryservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoveryservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoveryservices/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/registeredidentities/client.go b/resource-manager/recoveryservices/2022-10-01/registeredidentities/client.go index 36b4015e582..14617f2815f 100644 --- a/resource-manager/recoveryservices/2022-10-01/registeredidentities/client.go +++ b/resource-manager/recoveryservices/2022-10-01/registeredidentities/client.go @@ -15,7 +15,7 @@ type RegisteredIdentitiesClient struct { } func NewRegisteredIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredIdentitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredidentities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredidentities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredIdentitiesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/registeredidentities/id_registeredidentity.go b/resource-manager/recoveryservices/2022-10-01/registeredidentities/id_registeredidentity.go index 147a6d0d6e3..a8a4d9fc339 100644 --- a/resource-manager/recoveryservices/2022-10-01/registeredidentities/id_registeredidentity.go +++ b/resource-manager/recoveryservices/2022-10-01/registeredidentities/id_registeredidentity.go @@ -44,7 +44,7 @@ func ParseRegisteredIdentityID(input string) (*RegisteredIdentityId, error) { } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredIdentityIDInsensitively(input string) (*RegisteredIdentityId } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/registeredidentities/version.go b/resource-manager/recoveryservices/2022-10-01/registeredidentities/version.go index a6940818cae..1f775a27be1 100644 --- a/resource-manager/recoveryservices/2022-10-01/registeredidentities/version.go +++ b/resource-manager/recoveryservices/2022-10-01/registeredidentities/version.go @@ -1,12 +1,10 @@ package registeredidentities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredidentities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredidentities/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/replicationusages/README.md b/resource-manager/recoveryservices/2022-10-01/replicationusages/README.md index 60f73f6e2d3..1b968c86811 100644 --- a/resource-manager/recoveryservices/2022-10-01/replicationusages/README.md +++ b/resource-manager/recoveryservices/2022-10-01/replicationusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/replicationusages` Documentation -The `replicationusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `replicationusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/replicationusages/client.go b/resource-manager/recoveryservices/2022-10-01/replicationusages/client.go index 40ebde8ba63..42ad2679a29 100644 --- a/resource-manager/recoveryservices/2022-10-01/replicationusages/client.go +++ b/resource-manager/recoveryservices/2022-10-01/replicationusages/client.go @@ -15,7 +15,7 @@ type ReplicationUsagesClient struct { } func NewReplicationUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/replicationusages/id_vault.go b/resource-manager/recoveryservices/2022-10-01/replicationusages/id_vault.go index 338b117c7be..f831d2f96cb 100644 --- a/resource-manager/recoveryservices/2022-10-01/replicationusages/id_vault.go +++ b/resource-manager/recoveryservices/2022-10-01/replicationusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/replicationusages/method_list.go b/resource-manager/recoveryservices/2022-10-01/replicationusages/method_list.go index 67aa893023e..cbb2387c540 100644 --- a/resource-manager/recoveryservices/2022-10-01/replicationusages/method_list.go +++ b/resource-manager/recoveryservices/2022-10-01/replicationusages/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationUsagesClient) List(ctx context.Context, id VaultId) (result L var model ReplicationUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/replicationusages/version.go b/resource-manager/recoveryservices/2022-10-01/replicationusages/version.go index 3ef0cce5963..ed852b54b11 100644 --- a/resource-manager/recoveryservices/2022-10-01/replicationusages/version.go +++ b/resource-manager/recoveryservices/2022-10-01/replicationusages/version.go @@ -1,12 +1,10 @@ package replicationusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationusages/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md index 78913c5e047..df93c97589d 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultcertificates` Documentation -The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `vaultcertificates` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go index f25a5998dcc..99ba23915ba 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/client.go @@ -15,7 +15,7 @@ type VaultCertificatesClient struct { } func NewVaultCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultCertificatesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go index 1a998266e49..c32f3f71a95 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go index 1be290d4f6b..bb80ca8652b 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/method_create.go @@ -49,7 +49,6 @@ func (c VaultCertificatesClient) Create(ctx context.Context, id CertificateId, i var model VaultCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go index 59f9a303924..89867a51ee0 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandaaddetails.go @@ -23,6 +23,8 @@ type ResourceCertificateAndAadDetails struct { ServiceResourceId *string `json:"serviceResourceId,omitempty"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -33,6 +35,20 @@ type ResourceCertificateAndAadDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAadDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAadDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -68,9 +84,10 @@ func (s ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAadDetails: %+v", err) } + decoded["authType"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go index f0a2484e123..f597e1c3d9b 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificateandacsdetails.go @@ -19,6 +19,8 @@ type ResourceCertificateAndAcsDetails struct { GlobalAcsRPRealm string `json:"globalAcsRPRealm"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -29,6 +31,20 @@ type ResourceCertificateAndAcsDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAcsDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAcsDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -64,9 +80,10 @@ func (s ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAcsDetails: %+v", err) } + decoded["authType"] = "AccessControlService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go index 4057ff8ccdd..db529958690 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_resourcecertificatedetails.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResourceCertificateDetails interface { + ResourceCertificateDetails() BaseResourceCertificateDetailsImpl } -// RawResourceCertificateDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResourceCertificateDetails = BaseResourceCertificateDetailsImpl{} + +type BaseResourceCertificateDetailsImpl struct { + AuthType string `json:"authType"` + Certificate *string `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceId *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *string `json:"validFrom,omitempty"` + ValidTo *string `json:"validTo,omitempty"` +} + +func (s BaseResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s +} + +var _ ResourceCertificateDetails = RawResourceCertificateDetailsImpl{} + +// RawResourceCertificateDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResourceCertificateDetailsImpl struct { - Type string - Values map[string]interface{} + resourceCertificateDetails BaseResourceCertificateDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s.resourceCertificateDetails } -func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { +func UnmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCe return out, nil } - out := RawResourceCertificateDetailsImpl{ - Type: value, - Values: temp, + var parent BaseResourceCertificateDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourceCertificateDetailsImpl: %+v", err) } - return out, nil + + return RawResourceCertificateDetailsImpl{ + resourceCertificateDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go index f5f8f52cf03..d4b58334d49 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/model_vaultcertificateresponse.go @@ -34,7 +34,7 @@ func (s *VaultCertificateResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalResourceCertificateDetailsImplementation(v) + impl, err := UnmarshalResourceCertificateDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'VaultCertificateResponse': %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go index 3d0b3772124..a26c62a6b23 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultcertificates/version.go @@ -1,12 +1,10 @@ package vaultcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultcertificates/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/README.md b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/README.md index f3b5026a36c..3a0cc28b414 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/README.md +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo` Documentation -The `vaultextendedinfo` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `vaultextendedinfo` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/client.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/client.go index d977cd83af4..83e7308b418 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/client.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/client.go @@ -15,7 +15,7 @@ type VaultExtendedInfoClient struct { } func NewVaultExtendedInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultExtendedInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultextendedinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultextendedinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultExtendedInfoClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/id_vault.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/id_vault.go index 383129a1d1e..21f3094721c 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/id_vault.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_createorupdate.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_createorupdate.go index 46299e1c76a..2f7a0df28bc 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_createorupdate.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, id VaultId, var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_get.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_get.go index 63222675990..194e82e0c37 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_get.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_get.go @@ -46,7 +46,6 @@ func (c VaultExtendedInfoClient) Get(ctx context.Context, id VaultId) (result Ge var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_update.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_update.go index 74d9926995b..8b07cd20762 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_update.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/method_update.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) Update(ctx context.Context, id VaultId, input V var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/version.go b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/version.go index 973922f85a4..55d89c7f882 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/version.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultextendedinfo/version.go @@ -1,12 +1,10 @@ package vaultextendedinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultextendedinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultextendedinfo/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/vaults/README.md b/resource-manager/recoveryservices/2022-10-01/vaults/README.md index ae90e2661a7..c74bf2a2eab 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaults/README.md +++ b/resource-manager/recoveryservices/2022-10-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/vaults/client.go b/resource-manager/recoveryservices/2022-10-01/vaults/client.go index 1ddc5db936e..37bd7a44670 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaults/client.go +++ b/resource-manager/recoveryservices/2022-10-01/vaults/client.go @@ -15,7 +15,7 @@ type VaultsClient struct { } func NewVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultsClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go b/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go index 1cb6def7087..78a46d4ccfd 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go +++ b/resource-manager/recoveryservices/2022-10-01/vaults/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go b/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go index 181926c5390..64a64f258ff 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go +++ b/resource-manager/recoveryservices/2022-10-01/vaults/method_get.go @@ -45,7 +45,6 @@ func (c VaultsClient) Get(ctx context.Context, id VaultId) (result GetOperationR var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaults/version.go b/resource-manager/recoveryservices/2022-10-01/vaults/version.go index 3c996fb498a..e9fc9fa5952 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaults/version.go +++ b/resource-manager/recoveryservices/2022-10-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2022-10-01" } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultusages/README.md b/resource-manager/recoveryservices/2022-10-01/vaultusages/README.md index c22f49df5fc..f2efaa81a99 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultusages/README.md +++ b/resource-manager/recoveryservices/2022-10-01/vaultusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2022-10-01/vaultusages` Documentation -The `vaultusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2022-10-01`). +The `vaultusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2022-10-01/vaultusages/client.go b/resource-manager/recoveryservices/2022-10-01/vaultusages/client.go index 625eba65044..c3899c6950a 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultusages/client.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultusages/client.go @@ -15,7 +15,7 @@ type VaultUsagesClient struct { } func NewVaultUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultusages/id_vault.go b/resource-manager/recoveryservices/2022-10-01/vaultusages/id_vault.go index b455e8760a5..7ab1628540d 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultusages/id_vault.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultusages/method_usageslistbyvaults.go b/resource-manager/recoveryservices/2022-10-01/vaultusages/method_usageslistbyvaults.go index 258a5d0bb75..283b1da78f2 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultusages/method_usageslistbyvaults.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultusages/method_usageslistbyvaults.go @@ -46,7 +46,6 @@ func (c VaultUsagesClient) UsagesListByVaults(ctx context.Context, id VaultId) ( var model VaultUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2022-10-01/vaultusages/version.go b/resource-manager/recoveryservices/2022-10-01/vaultusages/version.go index 46088404f7c..bcf1850a171 100644 --- a/resource-manager/recoveryservices/2022-10-01/vaultusages/version.go +++ b/resource-manager/recoveryservices/2022-10-01/vaultusages/version.go @@ -1,12 +1,10 @@ package vaultusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultusages/2022-10-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/README.md index 1d8f7cd76a6..6df57c2df1e 100644 --- a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources` Documentation -The `getprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `getprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/client.go index 2c788db4e51..1257c24a86f 100644 --- a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/client.go @@ -15,7 +15,7 @@ type GetPrivateLinkResourcesClient struct { } func NewGetPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/id_privatelinkresource.go b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/id_privatelinkresource.go index 70ee568e5d3..c2a31e26257 100644 --- a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/id_privatelinkresource.go +++ b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/method_privatelinkresourcesget.go b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/method_privatelinkresourcesget.go index 8074fb34792..d9320826b8d 100644 --- a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/method_privatelinkresourcesget.go +++ b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c GetPrivateLinkResourcesClient) PrivateLinkResourcesGet(ctx context.Conte var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/version.go index a49f3315f07..d1b1a152b9b 100644 --- a/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-01-01/getprivatelinkresources/version.go @@ -1,12 +1,10 @@ package getprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatelinkresources/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/README.md index 78e813b3ab0..971cd537a2a 100644 --- a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources` Documentation -The `listprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `listprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/client.go index d68ed338ccc..0e4c4d9c12a 100644 --- a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ListPrivateLinkResourcesClient struct { } func NewListPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ListPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/id_vault.go b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/id_vault.go index 332d5bf97d5..a781c54881b 100644 --- a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/id_vault.go +++ b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/version.go index 24cff1017d0..b052d2713f6 100644 --- a/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-01-01/listprivatelinkresources/version.go @@ -1,12 +1,10 @@ package listprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listprivatelinkresources/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/README.md b/resource-manager/recoveryservices/2024-01-01/recoveryservices/README.md index 73f1c77b728..4363842456f 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/README.md +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/recoveryservices` Documentation -The `recoveryservices` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `recoveryservices` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/client.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/client.go index 518088771ea..3e7dcf4ddd2 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/client.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/client.go @@ -15,7 +15,7 @@ type RecoveryServicesClient struct { } func NewRecoveryServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoveryservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoveryservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryServicesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_location.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_location.go index 1fd49c9d992..35914900c19 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_location.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_providerlocation.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_providerlocation.go index 33d3548750d..8eeefa68615 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_providerlocation.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_capabilities.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_capabilities.go index 5864d60faeb..5dd5a520fca 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_capabilities.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_capabilities.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) Capabilities(ctx context.Context, id LocationId, var model CapabilitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_checknameavailability.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_checknameavailability.go index 3512794c701..3347af0ccac 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_checknameavailability.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) CheckNameAvailability(ctx context.Context, id Pr var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/recoveryservices/version.go b/resource-manager/recoveryservices/2024-01-01/recoveryservices/version.go index 03df972cae6..8ba8e003c42 100644 --- a/resource-manager/recoveryservices/2024-01-01/recoveryservices/version.go +++ b/resource-manager/recoveryservices/2024-01-01/recoveryservices/version.go @@ -1,12 +1,10 @@ package recoveryservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoveryservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoveryservices/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/registeredidentities/client.go b/resource-manager/recoveryservices/2024-01-01/registeredidentities/client.go index 36b4015e582..14617f2815f 100644 --- a/resource-manager/recoveryservices/2024-01-01/registeredidentities/client.go +++ b/resource-manager/recoveryservices/2024-01-01/registeredidentities/client.go @@ -15,7 +15,7 @@ type RegisteredIdentitiesClient struct { } func NewRegisteredIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredIdentitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredidentities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredidentities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredIdentitiesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/registeredidentities/id_registeredidentity.go b/resource-manager/recoveryservices/2024-01-01/registeredidentities/id_registeredidentity.go index 147a6d0d6e3..a8a4d9fc339 100644 --- a/resource-manager/recoveryservices/2024-01-01/registeredidentities/id_registeredidentity.go +++ b/resource-manager/recoveryservices/2024-01-01/registeredidentities/id_registeredidentity.go @@ -44,7 +44,7 @@ func ParseRegisteredIdentityID(input string) (*RegisteredIdentityId, error) { } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredIdentityIDInsensitively(input string) (*RegisteredIdentityId } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/registeredidentities/version.go b/resource-manager/recoveryservices/2024-01-01/registeredidentities/version.go index 4fb08123030..571b18014f5 100644 --- a/resource-manager/recoveryservices/2024-01-01/registeredidentities/version.go +++ b/resource-manager/recoveryservices/2024-01-01/registeredidentities/version.go @@ -1,12 +1,10 @@ package registeredidentities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredidentities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredidentities/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/replicationusages/README.md b/resource-manager/recoveryservices/2024-01-01/replicationusages/README.md index ac5838cc40e..fe6c0f8e2d5 100644 --- a/resource-manager/recoveryservices/2024-01-01/replicationusages/README.md +++ b/resource-manager/recoveryservices/2024-01-01/replicationusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/replicationusages` Documentation -The `replicationusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `replicationusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/replicationusages/client.go b/resource-manager/recoveryservices/2024-01-01/replicationusages/client.go index 40ebde8ba63..42ad2679a29 100644 --- a/resource-manager/recoveryservices/2024-01-01/replicationusages/client.go +++ b/resource-manager/recoveryservices/2024-01-01/replicationusages/client.go @@ -15,7 +15,7 @@ type ReplicationUsagesClient struct { } func NewReplicationUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/replicationusages/id_vault.go b/resource-manager/recoveryservices/2024-01-01/replicationusages/id_vault.go index 338b117c7be..f831d2f96cb 100644 --- a/resource-manager/recoveryservices/2024-01-01/replicationusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-01-01/replicationusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/replicationusages/method_list.go b/resource-manager/recoveryservices/2024-01-01/replicationusages/method_list.go index 67aa893023e..cbb2387c540 100644 --- a/resource-manager/recoveryservices/2024-01-01/replicationusages/method_list.go +++ b/resource-manager/recoveryservices/2024-01-01/replicationusages/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationUsagesClient) List(ctx context.Context, id VaultId) (result L var model ReplicationUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/replicationusages/version.go b/resource-manager/recoveryservices/2024-01-01/replicationusages/version.go index bdc93f7b6a4..b760ac946a1 100644 --- a/resource-manager/recoveryservices/2024-01-01/replicationusages/version.go +++ b/resource-manager/recoveryservices/2024-01-01/replicationusages/version.go @@ -1,12 +1,10 @@ package replicationusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationusages/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/README.md b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/README.md index b6cb2c8e630..5531c39ae49 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/README.md +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaultcertificates` Documentation -The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `vaultcertificates` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/client.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/client.go index f25a5998dcc..99ba23915ba 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/client.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/client.go @@ -15,7 +15,7 @@ type VaultCertificatesClient struct { } func NewVaultCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultCertificatesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/id_certificate.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/id_certificate.go index 1a998266e49..c32f3f71a95 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/id_certificate.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/method_create.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/method_create.go index 1be290d4f6b..bb80ca8652b 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/method_create.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/method_create.go @@ -49,7 +49,6 @@ func (c VaultCertificatesClient) Create(ctx context.Context, id CertificateId, i var model VaultCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandaaddetails.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandaaddetails.go index 59f9a303924..89867a51ee0 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandaaddetails.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandaaddetails.go @@ -23,6 +23,8 @@ type ResourceCertificateAndAadDetails struct { ServiceResourceId *string `json:"serviceResourceId,omitempty"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -33,6 +35,20 @@ type ResourceCertificateAndAadDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAadDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAadDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -68,9 +84,10 @@ func (s ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAadDetails: %+v", err) } + decoded["authType"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandacsdetails.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandacsdetails.go index f0a2484e123..f597e1c3d9b 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandacsdetails.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificateandacsdetails.go @@ -19,6 +19,8 @@ type ResourceCertificateAndAcsDetails struct { GlobalAcsRPRealm string `json:"globalAcsRPRealm"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -29,6 +31,20 @@ type ResourceCertificateAndAcsDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAcsDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAcsDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -64,9 +80,10 @@ func (s ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAcsDetails: %+v", err) } + decoded["authType"] = "AccessControlService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificatedetails.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificatedetails.go index 4057ff8ccdd..db529958690 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificatedetails.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_resourcecertificatedetails.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResourceCertificateDetails interface { + ResourceCertificateDetails() BaseResourceCertificateDetailsImpl } -// RawResourceCertificateDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResourceCertificateDetails = BaseResourceCertificateDetailsImpl{} + +type BaseResourceCertificateDetailsImpl struct { + AuthType string `json:"authType"` + Certificate *string `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceId *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *string `json:"validFrom,omitempty"` + ValidTo *string `json:"validTo,omitempty"` +} + +func (s BaseResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s +} + +var _ ResourceCertificateDetails = RawResourceCertificateDetailsImpl{} + +// RawResourceCertificateDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResourceCertificateDetailsImpl struct { - Type string - Values map[string]interface{} + resourceCertificateDetails BaseResourceCertificateDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s.resourceCertificateDetails } -func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { +func UnmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCe return out, nil } - out := RawResourceCertificateDetailsImpl{ - Type: value, - Values: temp, + var parent BaseResourceCertificateDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourceCertificateDetailsImpl: %+v", err) } - return out, nil + + return RawResourceCertificateDetailsImpl{ + resourceCertificateDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_vaultcertificateresponse.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_vaultcertificateresponse.go index f5f8f52cf03..d4b58334d49 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_vaultcertificateresponse.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/model_vaultcertificateresponse.go @@ -34,7 +34,7 @@ func (s *VaultCertificateResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalResourceCertificateDetailsImplementation(v) + impl, err := UnmarshalResourceCertificateDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'VaultCertificateResponse': %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/version.go b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/version.go index 483a004c30e..fa5371ab319 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultcertificates/version.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultcertificates/version.go @@ -1,12 +1,10 @@ package vaultcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultcertificates/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/README.md b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/README.md index ff3b32e1d67..de04fd7cc62 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/README.md +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo` Documentation -The `vaultextendedinfo` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `vaultextendedinfo` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/client.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/client.go index d977cd83af4..83e7308b418 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/client.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/client.go @@ -15,7 +15,7 @@ type VaultExtendedInfoClient struct { } func NewVaultExtendedInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultExtendedInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultextendedinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultextendedinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultExtendedInfoClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/id_vault.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/id_vault.go index 383129a1d1e..21f3094721c 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/id_vault.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_createorupdate.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_createorupdate.go index 46299e1c76a..2f7a0df28bc 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_createorupdate.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, id VaultId, var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_get.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_get.go index 63222675990..194e82e0c37 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_get.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_get.go @@ -46,7 +46,6 @@ func (c VaultExtendedInfoClient) Get(ctx context.Context, id VaultId) (result Ge var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_update.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_update.go index 74d9926995b..8b07cd20762 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_update.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/method_update.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) Update(ctx context.Context, id VaultId, input V var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/version.go b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/version.go index 6ac9797d4a8..34d950f789a 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/version.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultextendedinfo/version.go @@ -1,12 +1,10 @@ package vaultextendedinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultextendedinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultextendedinfo/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/vaults/README.md b/resource-manager/recoveryservices/2024-01-01/vaults/README.md index d9f3c5cb810..1a8243001cb 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaults/README.md +++ b/resource-manager/recoveryservices/2024-01-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/vaults/client.go b/resource-manager/recoveryservices/2024-01-01/vaults/client.go index 1ddc5db936e..37bd7a44670 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaults/client.go +++ b/resource-manager/recoveryservices/2024-01-01/vaults/client.go @@ -15,7 +15,7 @@ type VaultsClient struct { } func NewVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultsClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go b/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go index 1cb6def7087..78a46d4ccfd 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go +++ b/resource-manager/recoveryservices/2024-01-01/vaults/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go b/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go index 181926c5390..64a64f258ff 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go +++ b/resource-manager/recoveryservices/2024-01-01/vaults/method_get.go @@ -45,7 +45,6 @@ func (c VaultsClient) Get(ctx context.Context, id VaultId) (result GetOperationR var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaults/version.go b/resource-manager/recoveryservices/2024-01-01/vaults/version.go index 7341dbff3bc..8c6c51044fe 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaults/version.go +++ b/resource-manager/recoveryservices/2024-01-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultusages/README.md b/resource-manager/recoveryservices/2024-01-01/vaultusages/README.md index 7d825258780..8815d396b3a 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultusages/README.md +++ b/resource-manager/recoveryservices/2024-01-01/vaultusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-01-01/vaultusages` Documentation -The `vaultusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-01-01`). +The `vaultusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-01-01/vaultusages/client.go b/resource-manager/recoveryservices/2024-01-01/vaultusages/client.go index 625eba65044..c3899c6950a 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultusages/client.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultusages/client.go @@ -15,7 +15,7 @@ type VaultUsagesClient struct { } func NewVaultUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultusages/id_vault.go b/resource-manager/recoveryservices/2024-01-01/vaultusages/id_vault.go index b455e8760a5..7ab1628540d 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultusages/method_usageslistbyvaults.go b/resource-manager/recoveryservices/2024-01-01/vaultusages/method_usageslistbyvaults.go index 258a5d0bb75..283b1da78f2 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultusages/method_usageslistbyvaults.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultusages/method_usageslistbyvaults.go @@ -46,7 +46,6 @@ func (c VaultUsagesClient) UsagesListByVaults(ctx context.Context, id VaultId) ( var model VaultUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-01-01/vaultusages/version.go b/resource-manager/recoveryservices/2024-01-01/vaultusages/version.go index a5bffc94603..e7e2cbc9e68 100644 --- a/resource-manager/recoveryservices/2024-01-01/vaultusages/version.go +++ b/resource-manager/recoveryservices/2024-01-01/vaultusages/version.go @@ -1,12 +1,10 @@ package vaultusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultusages/2024-01-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/README.md index e32d86da670..37719bceb22 100644 --- a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources` Documentation -The `getprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `getprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/client.go index 2c788db4e51..1257c24a86f 100644 --- a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/client.go @@ -15,7 +15,7 @@ type GetPrivateLinkResourcesClient struct { } func NewGetPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/id_privatelinkresource.go b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/id_privatelinkresource.go index 70ee568e5d3..c2a31e26257 100644 --- a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/id_privatelinkresource.go +++ b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/method_privatelinkresourcesget.go b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/method_privatelinkresourcesget.go index 8074fb34792..d9320826b8d 100644 --- a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/method_privatelinkresourcesget.go +++ b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c GetPrivateLinkResourcesClient) PrivateLinkResourcesGet(ctx context.Conte var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/version.go index 31440369e02..ebfcf89a055 100644 --- a/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-02-01/getprivatelinkresources/version.go @@ -1,12 +1,10 @@ package getprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatelinkresources/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/README.md index bf123d1e369..eefbce4e21f 100644 --- a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources` Documentation -The `listprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `listprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/client.go index d68ed338ccc..0e4c4d9c12a 100644 --- a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ListPrivateLinkResourcesClient struct { } func NewListPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ListPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/id_vault.go b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/id_vault.go index 332d5bf97d5..a781c54881b 100644 --- a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/id_vault.go +++ b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/version.go index 1da3ec931a4..4518170be2a 100644 --- a/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-02-01/listprivatelinkresources/version.go @@ -1,12 +1,10 @@ package listprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listprivatelinkresources/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/README.md b/resource-manager/recoveryservices/2024-02-01/recoveryservices/README.md index 92aecab488c..078f3c67db9 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/README.md +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/recoveryservices` Documentation -The `recoveryservices` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `recoveryservices` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/client.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/client.go index 518088771ea..3e7dcf4ddd2 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/client.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/client.go @@ -15,7 +15,7 @@ type RecoveryServicesClient struct { } func NewRecoveryServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoveryservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoveryservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryServicesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_location.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_location.go index 1fd49c9d992..35914900c19 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_location.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_providerlocation.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_providerlocation.go index 33d3548750d..8eeefa68615 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_providerlocation.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_capabilities.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_capabilities.go index 5864d60faeb..5dd5a520fca 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_capabilities.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_capabilities.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) Capabilities(ctx context.Context, id LocationId, var model CapabilitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_checknameavailability.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_checknameavailability.go index 3512794c701..3347af0ccac 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_checknameavailability.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) CheckNameAvailability(ctx context.Context, id Pr var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/recoveryservices/version.go b/resource-manager/recoveryservices/2024-02-01/recoveryservices/version.go index 3bae1d1f6f6..46c838ac7d6 100644 --- a/resource-manager/recoveryservices/2024-02-01/recoveryservices/version.go +++ b/resource-manager/recoveryservices/2024-02-01/recoveryservices/version.go @@ -1,12 +1,10 @@ package recoveryservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoveryservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoveryservices/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/registeredidentities/client.go b/resource-manager/recoveryservices/2024-02-01/registeredidentities/client.go index 36b4015e582..14617f2815f 100644 --- a/resource-manager/recoveryservices/2024-02-01/registeredidentities/client.go +++ b/resource-manager/recoveryservices/2024-02-01/registeredidentities/client.go @@ -15,7 +15,7 @@ type RegisteredIdentitiesClient struct { } func NewRegisteredIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredIdentitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredidentities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredidentities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredIdentitiesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/registeredidentities/id_registeredidentity.go b/resource-manager/recoveryservices/2024-02-01/registeredidentities/id_registeredidentity.go index 147a6d0d6e3..a8a4d9fc339 100644 --- a/resource-manager/recoveryservices/2024-02-01/registeredidentities/id_registeredidentity.go +++ b/resource-manager/recoveryservices/2024-02-01/registeredidentities/id_registeredidentity.go @@ -44,7 +44,7 @@ func ParseRegisteredIdentityID(input string) (*RegisteredIdentityId, error) { } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredIdentityIDInsensitively(input string) (*RegisteredIdentityId } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/registeredidentities/version.go b/resource-manager/recoveryservices/2024-02-01/registeredidentities/version.go index 4e2386303d5..724e221cd7c 100644 --- a/resource-manager/recoveryservices/2024-02-01/registeredidentities/version.go +++ b/resource-manager/recoveryservices/2024-02-01/registeredidentities/version.go @@ -1,12 +1,10 @@ package registeredidentities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredidentities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredidentities/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/replicationusages/README.md b/resource-manager/recoveryservices/2024-02-01/replicationusages/README.md index 787874bf498..a3a47047f53 100644 --- a/resource-manager/recoveryservices/2024-02-01/replicationusages/README.md +++ b/resource-manager/recoveryservices/2024-02-01/replicationusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/replicationusages` Documentation -The `replicationusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `replicationusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/replicationusages/client.go b/resource-manager/recoveryservices/2024-02-01/replicationusages/client.go index 40ebde8ba63..42ad2679a29 100644 --- a/resource-manager/recoveryservices/2024-02-01/replicationusages/client.go +++ b/resource-manager/recoveryservices/2024-02-01/replicationusages/client.go @@ -15,7 +15,7 @@ type ReplicationUsagesClient struct { } func NewReplicationUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/replicationusages/id_vault.go b/resource-manager/recoveryservices/2024-02-01/replicationusages/id_vault.go index 338b117c7be..f831d2f96cb 100644 --- a/resource-manager/recoveryservices/2024-02-01/replicationusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-02-01/replicationusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/replicationusages/method_list.go b/resource-manager/recoveryservices/2024-02-01/replicationusages/method_list.go index 67aa893023e..cbb2387c540 100644 --- a/resource-manager/recoveryservices/2024-02-01/replicationusages/method_list.go +++ b/resource-manager/recoveryservices/2024-02-01/replicationusages/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationUsagesClient) List(ctx context.Context, id VaultId) (result L var model ReplicationUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/replicationusages/version.go b/resource-manager/recoveryservices/2024-02-01/replicationusages/version.go index 5bd3934ba9b..de25c7e02e0 100644 --- a/resource-manager/recoveryservices/2024-02-01/replicationusages/version.go +++ b/resource-manager/recoveryservices/2024-02-01/replicationusages/version.go @@ -1,12 +1,10 @@ package replicationusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationusages/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/README.md b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/README.md index e66867040e7..d5fbff0c8e6 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/README.md +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/vaultcertificates` Documentation -The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `vaultcertificates` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/client.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/client.go index f25a5998dcc..99ba23915ba 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/client.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/client.go @@ -15,7 +15,7 @@ type VaultCertificatesClient struct { } func NewVaultCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultCertificatesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/id_certificate.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/id_certificate.go index 1a998266e49..c32f3f71a95 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/id_certificate.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/method_create.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/method_create.go index 1be290d4f6b..bb80ca8652b 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/method_create.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/method_create.go @@ -49,7 +49,6 @@ func (c VaultCertificatesClient) Create(ctx context.Context, id CertificateId, i var model VaultCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandaaddetails.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandaaddetails.go index 59f9a303924..89867a51ee0 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandaaddetails.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandaaddetails.go @@ -23,6 +23,8 @@ type ResourceCertificateAndAadDetails struct { ServiceResourceId *string `json:"serviceResourceId,omitempty"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -33,6 +35,20 @@ type ResourceCertificateAndAadDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAadDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAadDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -68,9 +84,10 @@ func (s ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAadDetails: %+v", err) } + decoded["authType"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandacsdetails.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandacsdetails.go index f0a2484e123..f597e1c3d9b 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandacsdetails.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificateandacsdetails.go @@ -19,6 +19,8 @@ type ResourceCertificateAndAcsDetails struct { GlobalAcsRPRealm string `json:"globalAcsRPRealm"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -29,6 +31,20 @@ type ResourceCertificateAndAcsDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAcsDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAcsDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -64,9 +80,10 @@ func (s ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAcsDetails: %+v", err) } + decoded["authType"] = "AccessControlService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificatedetails.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificatedetails.go index 4057ff8ccdd..db529958690 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificatedetails.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_resourcecertificatedetails.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResourceCertificateDetails interface { + ResourceCertificateDetails() BaseResourceCertificateDetailsImpl } -// RawResourceCertificateDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResourceCertificateDetails = BaseResourceCertificateDetailsImpl{} + +type BaseResourceCertificateDetailsImpl struct { + AuthType string `json:"authType"` + Certificate *string `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceId *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *string `json:"validFrom,omitempty"` + ValidTo *string `json:"validTo,omitempty"` +} + +func (s BaseResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s +} + +var _ ResourceCertificateDetails = RawResourceCertificateDetailsImpl{} + +// RawResourceCertificateDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResourceCertificateDetailsImpl struct { - Type string - Values map[string]interface{} + resourceCertificateDetails BaseResourceCertificateDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s.resourceCertificateDetails } -func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { +func UnmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCe return out, nil } - out := RawResourceCertificateDetailsImpl{ - Type: value, - Values: temp, + var parent BaseResourceCertificateDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourceCertificateDetailsImpl: %+v", err) } - return out, nil + + return RawResourceCertificateDetailsImpl{ + resourceCertificateDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_vaultcertificateresponse.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_vaultcertificateresponse.go index f5f8f52cf03..d4b58334d49 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_vaultcertificateresponse.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/model_vaultcertificateresponse.go @@ -34,7 +34,7 @@ func (s *VaultCertificateResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalResourceCertificateDetailsImplementation(v) + impl, err := UnmarshalResourceCertificateDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'VaultCertificateResponse': %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/version.go b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/version.go index a136ef9fb53..adf6fd2b6a9 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultcertificates/version.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultcertificates/version.go @@ -1,12 +1,10 @@ package vaultcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultcertificates/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/README.md b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/README.md index 1c4d0573b7a..6a12a348136 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/README.md +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo` Documentation -The `vaultextendedinfo` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `vaultextendedinfo` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/client.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/client.go index d977cd83af4..83e7308b418 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/client.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/client.go @@ -15,7 +15,7 @@ type VaultExtendedInfoClient struct { } func NewVaultExtendedInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultExtendedInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultextendedinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultextendedinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultExtendedInfoClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/id_vault.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/id_vault.go index 383129a1d1e..21f3094721c 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/id_vault.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_createorupdate.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_createorupdate.go index 46299e1c76a..2f7a0df28bc 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_createorupdate.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, id VaultId, var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_get.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_get.go index 63222675990..194e82e0c37 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_get.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_get.go @@ -46,7 +46,6 @@ func (c VaultExtendedInfoClient) Get(ctx context.Context, id VaultId) (result Ge var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_update.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_update.go index 74d9926995b..8b07cd20762 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_update.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/method_update.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) Update(ctx context.Context, id VaultId, input V var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/version.go b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/version.go index 8aa1d0af6d0..b828740f4e1 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/version.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultextendedinfo/version.go @@ -1,12 +1,10 @@ package vaultextendedinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultextendedinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultextendedinfo/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/vaults/README.md b/resource-manager/recoveryservices/2024-02-01/vaults/README.md index 2303cd69af8..fbf25470c85 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaults/README.md +++ b/resource-manager/recoveryservices/2024-02-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/vaults/client.go b/resource-manager/recoveryservices/2024-02-01/vaults/client.go index 1ddc5db936e..37bd7a44670 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaults/client.go +++ b/resource-manager/recoveryservices/2024-02-01/vaults/client.go @@ -15,7 +15,7 @@ type VaultsClient struct { } func NewVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultsClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/vaults/id_vault.go b/resource-manager/recoveryservices/2024-02-01/vaults/id_vault.go index 1cb6def7087..78a46d4ccfd 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaults/id_vault.go +++ b/resource-manager/recoveryservices/2024-02-01/vaults/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/vaults/method_get.go b/resource-manager/recoveryservices/2024-02-01/vaults/method_get.go index 181926c5390..64a64f258ff 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaults/method_get.go +++ b/resource-manager/recoveryservices/2024-02-01/vaults/method_get.go @@ -45,7 +45,6 @@ func (c VaultsClient) Get(ctx context.Context, id VaultId) (result GetOperationR var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaults/version.go b/resource-manager/recoveryservices/2024-02-01/vaults/version.go index f19bd7072ed..ab4f6196129 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaults/version.go +++ b/resource-manager/recoveryservices/2024-02-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultusages/README.md b/resource-manager/recoveryservices/2024-02-01/vaultusages/README.md index 7761ec558bf..e121deb5069 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultusages/README.md +++ b/resource-manager/recoveryservices/2024-02-01/vaultusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-02-01/vaultusages` Documentation -The `vaultusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-02-01`). +The `vaultusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-02-01/vaultusages/client.go b/resource-manager/recoveryservices/2024-02-01/vaultusages/client.go index 625eba65044..c3899c6950a 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultusages/client.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultusages/client.go @@ -15,7 +15,7 @@ type VaultUsagesClient struct { } func NewVaultUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultusages/id_vault.go b/resource-manager/recoveryservices/2024-02-01/vaultusages/id_vault.go index b455e8760a5..7ab1628540d 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultusages/method_usageslistbyvaults.go b/resource-manager/recoveryservices/2024-02-01/vaultusages/method_usageslistbyvaults.go index 258a5d0bb75..283b1da78f2 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultusages/method_usageslistbyvaults.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultusages/method_usageslistbyvaults.go @@ -46,7 +46,6 @@ func (c VaultUsagesClient) UsagesListByVaults(ctx context.Context, id VaultId) ( var model VaultUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-02-01/vaultusages/version.go b/resource-manager/recoveryservices/2024-02-01/vaultusages/version.go index f2351dd1ea1..404741f676a 100644 --- a/resource-manager/recoveryservices/2024-02-01/vaultusages/version.go +++ b/resource-manager/recoveryservices/2024-02-01/vaultusages/version.go @@ -1,12 +1,10 @@ package vaultusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultusages/2024-02-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/README.md index 4b37d35c072..7f4f2a469e1 100644 --- a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources` Documentation -The `getprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `getprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/client.go index 2c788db4e51..1257c24a86f 100644 --- a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/client.go @@ -15,7 +15,7 @@ type GetPrivateLinkResourcesClient struct { } func NewGetPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*GetPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "getprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GetPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/id_privatelinkresource.go b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/id_privatelinkresource.go index 70ee568e5d3..c2a31e26257 100644 --- a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/id_privatelinkresource.go +++ b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/method_privatelinkresourcesget.go b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/method_privatelinkresourcesget.go index 8074fb34792..d9320826b8d 100644 --- a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/method_privatelinkresourcesget.go +++ b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c GetPrivateLinkResourcesClient) PrivateLinkResourcesGet(ctx context.Conte var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/version.go index a26ae783d0b..3c532a4e6fc 100644 --- a/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-04-01/getprivatelinkresources/version.go @@ -1,12 +1,10 @@ package getprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/getprivatelinkresources/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/README.md b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/README.md index 9db23692630..6a648792087 100644 --- a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/README.md +++ b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources` Documentation -The `listprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `listprivatelinkresources` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/client.go b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/client.go index d68ed338ccc..0e4c4d9c12a 100644 --- a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/client.go +++ b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ListPrivateLinkResourcesClient struct { } func NewListPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ListPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/id_vault.go b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/id_vault.go index 332d5bf97d5..a781c54881b 100644 --- a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/id_vault.go +++ b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/version.go b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/version.go index cbed2dde185..0883283267f 100644 --- a/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/version.go +++ b/resource-manager/recoveryservices/2024-04-01/listprivatelinkresources/version.go @@ -1,12 +1,10 @@ package listprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listprivatelinkresources/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/README.md b/resource-manager/recoveryservices/2024-04-01/recoveryservices/README.md index 0d3448c61bc..a5878388184 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/README.md +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/recoveryservices` Documentation -The `recoveryservices` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `recoveryservices` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/client.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/client.go index 518088771ea..3e7dcf4ddd2 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/client.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/client.go @@ -15,7 +15,7 @@ type RecoveryServicesClient struct { } func NewRecoveryServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoveryservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoveryservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryServicesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_location.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_location.go index 1fd49c9d992..35914900c19 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_location.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_providerlocation.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_providerlocation.go index 33d3548750d..8eeefa68615 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_providerlocation.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_capabilities.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_capabilities.go index 5864d60faeb..5dd5a520fca 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_capabilities.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_capabilities.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) Capabilities(ctx context.Context, id LocationId, var model CapabilitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_checknameavailability.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_checknameavailability.go index 3512794c701..3347af0ccac 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_checknameavailability.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c RecoveryServicesClient) CheckNameAvailability(ctx context.Context, id Pr var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/recoveryservices/version.go b/resource-manager/recoveryservices/2024-04-01/recoveryservices/version.go index af1f4581f5a..65e6e4ce036 100644 --- a/resource-manager/recoveryservices/2024-04-01/recoveryservices/version.go +++ b/resource-manager/recoveryservices/2024-04-01/recoveryservices/version.go @@ -1,12 +1,10 @@ package recoveryservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoveryservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoveryservices/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/registeredidentities/client.go b/resource-manager/recoveryservices/2024-04-01/registeredidentities/client.go index 36b4015e582..14617f2815f 100644 --- a/resource-manager/recoveryservices/2024-04-01/registeredidentities/client.go +++ b/resource-manager/recoveryservices/2024-04-01/registeredidentities/client.go @@ -15,7 +15,7 @@ type RegisteredIdentitiesClient struct { } func NewRegisteredIdentitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredIdentitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredidentities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredidentities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredIdentitiesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/registeredidentities/id_registeredidentity.go b/resource-manager/recoveryservices/2024-04-01/registeredidentities/id_registeredidentity.go index 147a6d0d6e3..a8a4d9fc339 100644 --- a/resource-manager/recoveryservices/2024-04-01/registeredidentities/id_registeredidentity.go +++ b/resource-manager/recoveryservices/2024-04-01/registeredidentities/id_registeredidentity.go @@ -44,7 +44,7 @@ func ParseRegisteredIdentityID(input string) (*RegisteredIdentityId, error) { } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredIdentityIDInsensitively(input string) (*RegisteredIdentityId } id := RegisteredIdentityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/registeredidentities/version.go b/resource-manager/recoveryservices/2024-04-01/registeredidentities/version.go index 9a09e3c0d27..d1cdd535eb7 100644 --- a/resource-manager/recoveryservices/2024-04-01/registeredidentities/version.go +++ b/resource-manager/recoveryservices/2024-04-01/registeredidentities/version.go @@ -1,12 +1,10 @@ package registeredidentities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredidentities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredidentities/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/replicationusages/README.md b/resource-manager/recoveryservices/2024-04-01/replicationusages/README.md index 38a19def949..e06ecf9c0c0 100644 --- a/resource-manager/recoveryservices/2024-04-01/replicationusages/README.md +++ b/resource-manager/recoveryservices/2024-04-01/replicationusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/replicationusages` Documentation -The `replicationusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `replicationusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/replicationusages/client.go b/resource-manager/recoveryservices/2024-04-01/replicationusages/client.go index 40ebde8ba63..42ad2679a29 100644 --- a/resource-manager/recoveryservices/2024-04-01/replicationusages/client.go +++ b/resource-manager/recoveryservices/2024-04-01/replicationusages/client.go @@ -15,7 +15,7 @@ type ReplicationUsagesClient struct { } func NewReplicationUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/replicationusages/id_vault.go b/resource-manager/recoveryservices/2024-04-01/replicationusages/id_vault.go index 338b117c7be..f831d2f96cb 100644 --- a/resource-manager/recoveryservices/2024-04-01/replicationusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-04-01/replicationusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/replicationusages/method_list.go b/resource-manager/recoveryservices/2024-04-01/replicationusages/method_list.go index 67aa893023e..cbb2387c540 100644 --- a/resource-manager/recoveryservices/2024-04-01/replicationusages/method_list.go +++ b/resource-manager/recoveryservices/2024-04-01/replicationusages/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationUsagesClient) List(ctx context.Context, id VaultId) (result L var model ReplicationUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/replicationusages/version.go b/resource-manager/recoveryservices/2024-04-01/replicationusages/version.go index 33e15efda72..6cf66209431 100644 --- a/resource-manager/recoveryservices/2024-04-01/replicationusages/version.go +++ b/resource-manager/recoveryservices/2024-04-01/replicationusages/version.go @@ -1,12 +1,10 @@ package replicationusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationusages/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md index ab60878eff1..03039580d5e 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultcertificates` Documentation -The `vaultcertificates` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `vaultcertificates` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go index f25a5998dcc..99ba23915ba 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/client.go @@ -15,7 +15,7 @@ type VaultCertificatesClient struct { } func NewVaultCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultCertificatesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go index 1a998266e49..c32f3f71a95 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go index 1be290d4f6b..bb80ca8652b 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/method_create.go @@ -49,7 +49,6 @@ func (c VaultCertificatesClient) Create(ctx context.Context, id CertificateId, i var model VaultCertificateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go index 59f9a303924..89867a51ee0 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandaaddetails.go @@ -23,6 +23,8 @@ type ResourceCertificateAndAadDetails struct { ServiceResourceId *string `json:"serviceResourceId,omitempty"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -33,6 +35,20 @@ type ResourceCertificateAndAadDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAadDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAadDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -68,9 +84,10 @@ func (s ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAadDetails: %+v", err) } + decoded["authType"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go index f0a2484e123..f597e1c3d9b 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificateandacsdetails.go @@ -19,6 +19,8 @@ type ResourceCertificateAndAcsDetails struct { GlobalAcsRPRealm string `json:"globalAcsRPRealm"` // Fields inherited from ResourceCertificateDetails + + AuthType string `json:"authType"` Certificate *string `json:"certificate,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` Issuer *string `json:"issuer,omitempty"` @@ -29,6 +31,20 @@ type ResourceCertificateAndAcsDetails struct { ValidTo *string `json:"validTo,omitempty"` } +func (s ResourceCertificateAndAcsDetails) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return BaseResourceCertificateDetailsImpl{ + AuthType: s.AuthType, + Certificate: s.Certificate, + FriendlyName: s.FriendlyName, + Issuer: s.Issuer, + ResourceId: s.ResourceId, + Subject: s.Subject, + Thumbprint: s.Thumbprint, + ValidFrom: s.ValidFrom, + ValidTo: s.ValidTo, + } +} + func (o *ResourceCertificateAndAcsDetails) GetValidFromAsTime() (*time.Time, error) { if o.ValidFrom == nil { return nil, nil @@ -64,9 +80,10 @@ func (s ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ResourceCertificateAndAcsDetails: %+v", err) } + decoded["authType"] = "AccessControlService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go index 4057ff8ccdd..db529958690 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_resourcecertificatedetails.go @@ -10,18 +10,43 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResourceCertificateDetails interface { + ResourceCertificateDetails() BaseResourceCertificateDetailsImpl } -// RawResourceCertificateDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResourceCertificateDetails = BaseResourceCertificateDetailsImpl{} + +type BaseResourceCertificateDetailsImpl struct { + AuthType string `json:"authType"` + Certificate *string `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceId *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *string `json:"validFrom,omitempty"` + ValidTo *string `json:"validTo,omitempty"` +} + +func (s BaseResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s +} + +var _ ResourceCertificateDetails = RawResourceCertificateDetailsImpl{} + +// RawResourceCertificateDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResourceCertificateDetailsImpl struct { - Type string - Values map[string]interface{} + resourceCertificateDetails BaseResourceCertificateDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawResourceCertificateDetailsImpl) ResourceCertificateDetails() BaseResourceCertificateDetailsImpl { + return s.resourceCertificateDetails } -func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { +func UnmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCertificateDetails, error) { if input == nil { return nil, nil } @@ -52,10 +77,15 @@ func unmarshalResourceCertificateDetailsImplementation(input []byte) (ResourceCe return out, nil } - out := RawResourceCertificateDetailsImpl{ - Type: value, - Values: temp, + var parent BaseResourceCertificateDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourceCertificateDetailsImpl: %+v", err) } - return out, nil + + return RawResourceCertificateDetailsImpl{ + resourceCertificateDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go index f5f8f52cf03..d4b58334d49 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/model_vaultcertificateresponse.go @@ -34,7 +34,7 @@ func (s *VaultCertificateResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalResourceCertificateDetailsImplementation(v) + impl, err := UnmarshalResourceCertificateDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'VaultCertificateResponse': %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go index 1b2b2c0b44b..7307525f109 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultcertificates/version.go @@ -1,12 +1,10 @@ package vaultcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultcertificates/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/README.md b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/README.md index 4c2701f1c73..3ab6f8e5ff4 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/README.md +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo` Documentation -The `vaultextendedinfo` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `vaultextendedinfo` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/client.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/client.go index d977cd83af4..83e7308b418 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/client.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/client.go @@ -15,7 +15,7 @@ type VaultExtendedInfoClient struct { } func NewVaultExtendedInfoClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultExtendedInfoClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultextendedinfo", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultextendedinfo", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultExtendedInfoClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/id_vault.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/id_vault.go index 383129a1d1e..21f3094721c 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/id_vault.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_createorupdate.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_createorupdate.go index 46299e1c76a..2f7a0df28bc 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_createorupdate.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_createorupdate.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, id VaultId, var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_get.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_get.go index 63222675990..194e82e0c37 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_get.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_get.go @@ -46,7 +46,6 @@ func (c VaultExtendedInfoClient) Get(ctx context.Context, id VaultId) (result Ge var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_update.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_update.go index 74d9926995b..8b07cd20762 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_update.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/method_update.go @@ -50,7 +50,6 @@ func (c VaultExtendedInfoClient) Update(ctx context.Context, id VaultId, input V var model VaultExtendedInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/version.go b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/version.go index 0fda634b732..45f728956e2 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/version.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultextendedinfo/version.go @@ -1,12 +1,10 @@ package vaultextendedinfo -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultextendedinfo/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultextendedinfo/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/README.md b/resource-manager/recoveryservices/2024-04-01/vaults/README.md index b9b3671f9a5..2ce374ceb34 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/README.md +++ b/resource-manager/recoveryservices/2024-04-01/vaults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaults` Documentation -The `vaults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `vaults` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/client.go b/resource-manager/recoveryservices/2024-04-01/vaults/client.go index 1ddc5db936e..37bd7a44670 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/client.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/client.go @@ -15,7 +15,7 @@ type VaultsClient struct { } func NewVaultsClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultsClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/id_vault.go b/resource-manager/recoveryservices/2024-04-01/vaults/id_vault.go index 1cb6def7087..78a46d4ccfd 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/id_vault.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/method_createorupdate.go b/resource-manager/recoveryservices/2024-04-01/vaults/method_createorupdate.go index aaf7d25d75f..f52787d1b5a 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/method_createorupdate.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/method_get.go b/resource-manager/recoveryservices/2024-04-01/vaults/method_get.go index 181926c5390..64a64f258ff 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/method_get.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/method_get.go @@ -45,7 +45,6 @@ func (c VaultsClient) Get(ctx context.Context, id VaultId) (result GetOperationR var model Vault result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/method_update.go b/resource-manager/recoveryservices/2024-04-01/vaults/method_update.go index e406c593489..fed13b914bf 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/method_update.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservices/2024-04-01/vaults/version.go b/resource-manager/recoveryservices/2024-04-01/vaults/version.go index 4c95299dd5c..e44b4b2bc18 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaults/version.go +++ b/resource-manager/recoveryservices/2024-04-01/vaults/version.go @@ -1,12 +1,10 @@ package vaults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaults/2024-04-01" } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultusages/README.md b/resource-manager/recoveryservices/2024-04-01/vaultusages/README.md index e6f3425f6c4..7d6e861736f 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultusages/README.md +++ b/resource-manager/recoveryservices/2024-04-01/vaultusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservices/2024-04-01/vaultusages` Documentation -The `vaultusages` SDK allows for interaction with the Azure Resource Manager Service `recoveryservices` (API Version `2024-04-01`). +The `vaultusages` SDK allows for interaction with Azure Resource Manager `recoveryservices` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservices/2024-04-01/vaultusages/client.go b/resource-manager/recoveryservices/2024-04-01/vaultusages/client.go index 625eba65044..c3899c6950a 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultusages/client.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultusages/client.go @@ -15,7 +15,7 @@ type VaultUsagesClient struct { } func NewVaultUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*VaultUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vaultusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vaultusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VaultUsagesClient: %+v", err) } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultusages/id_vault.go b/resource-manager/recoveryservices/2024-04-01/vaultusages/id_vault.go index b455e8760a5..7ab1628540d 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultusages/id_vault.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultusages/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultusages/method_usageslistbyvaults.go b/resource-manager/recoveryservices/2024-04-01/vaultusages/method_usageslistbyvaults.go index 258a5d0bb75..283b1da78f2 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultusages/method_usageslistbyvaults.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultusages/method_usageslistbyvaults.go @@ -46,7 +46,6 @@ func (c VaultUsagesClient) UsagesListByVaults(ctx context.Context, id VaultId) ( var model VaultUsageList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservices/2024-04-01/vaultusages/version.go b/resource-manager/recoveryservices/2024-04-01/vaultusages/version.go index 854fb2abffa..bc5c193b676 100644 --- a/resource-manager/recoveryservices/2024-04-01/vaultusages/version.go +++ b/resource-manager/recoveryservices/2024-04-01/vaultusages/version.go @@ -1,12 +1,10 @@ package vaultusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vaultusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vaultusages/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/README.md index f165170d844..0f1fc2c8bf6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/version.go index 6f049e527a1..09bb9efbd38 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/README.md index bfdb2925697..14104a3b62d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/version.go index 7cbbb41af37..46f75cfe781 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/README.md index ae2dba1bb95..0cf53305b34 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/constants.go index 16145295003..f46fabe7f11 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go index c0c6e9f2f0b..34d670811b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -54,6 +65,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -65,7 +77,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -73,7 +85,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index b120c1a48b9..1844d32b920 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_subprotectionpolicy.go index 057aa3243f7..4cb64cb09fb 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/model_subprotectionpolicy.go @@ -33,7 +33,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -41,7 +41,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/version.go index 6221289bd18..90ca1db3f48 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/README.md index 3e9bea0a90d..dfde3ad5c65 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 57722018c7d..eeef48cbb03 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index 5b7fcf0cf9a..8250ed4aab5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index 07bea2135c3..5e24c2b695a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 1925bcec415..9d87da6d303 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 83d40e757e8..1cc9a692f2e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index 7f69e4e091d..e857eea428d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index c7ed4780435..ab85410b18d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 9f094b48509..e424c25cc0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index e5818660449..a4e2bd3e14c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -21,12 +21,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/version.go index d77c2e84da2..55023e10216 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/README.md index 559f1c8c8f3..b46ec2cec95 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go index a38641e9b91..1e95f4c348e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,12 +37,36 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +102,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index bf91687241a..f045026fc45 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index f99d37d529b..452552ee286 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index cfe5fd774b2..89fa0a7068b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azuresqlprotecteditem.go index 6bb508341c4..62147a23c37 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,12 +33,36 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -73,9 +98,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 99d5f841f64..ebf8e9c6e42 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 64e6d76a3d0..97b7c6edcec 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index e772e306780..6200b0223b2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index 2cabef44454..9b150bc9d37 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 3ee9021236d..f02933559e1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_dpmprotecteditem.go index 932ddfcc5f3..5c3876a31e2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,12 +34,36 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +99,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_genericprotecteditem.go index a1b0d1dfc96..b90616eef8d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,12 +36,36 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -76,9 +101,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 967e9814114..121bae1a5a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,12 +37,36 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +102,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..fbe703451a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,52 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +174,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/version.go index dad11b072f8..a02ba809b10 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/README.md index 0f67e793fc6..9e66e04d5b0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/version.go index b57287bae76..b3781cd659a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/README.md index f90069fea9f..0e9ec546edc 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/version.go index c7c698bd514..a233792e68a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/README.md index 7a3fb4baeee..dc3400980f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/version.go index fb0529801b3..179a9902019 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md index d04dbb01251..5d772422865 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go index 0184cb1ad5d..45f3dac1aea 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/README.md index cd5b5749f92..9809bc66b8b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/version.go index 3c29b187dfd..a420664059b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backups/README.md index ea49925107d..361be545a62 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backups/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backups/version.go index 966073657e1..25189f87ff9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/README.md index 73d600a5a88..d684bdf3023 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/constants.go index 9aaf6a8c63b..fb799c58d10 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/version.go index b3f50367e7f..f9528b5c3c5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/README.md index 5cf6253b637..595f707259d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/version.go index b3d20ce1066..cf4526336d1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/README.md index d91865c652b..61ad04c6ada 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/version.go index a0c3d728327..f4228653ed8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/README.md index 16126f3bfde..e041d969ba0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/version.go index ab631f36fa6..5a9d0d86771 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/README.md index 881eb48d6dd..16f28bf5d4f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/version.go index daa2a27b63e..664a6650974 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/README.md index 59704ab313a..31d477f9b84 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/version.go index c913f2f5cfd..2b59b8c88f5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/version.go index 84b22964dc1..25295cc0615 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/README.md index 8903da4aeee..527ef784295 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/version.go index 7491853f927..5d93a1859c2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/jobs/version.go index b2ed32f52e8..6d94fa7268f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/operation/README.md index da071426845..156fba7d516 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/constants.go index fe9c03dc6bf..ed6ced90d05 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadpointintimerestorerequest.go index 4970924f286..e329c10ff88 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadrestorerequest.go index ca703e2ebf7..4dbe5acee70 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index cc8bd8f796e..2d5046a6a81 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 6cadfa70134..c6961c5ef71 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorerequest.go index fc7e9075434..53d9fcd885d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index 1e9b78ff710..a15f2238277 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 5162af74f43..17dd1b7cf0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 0885f553e36..467bf76f7f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorerequest.go index 58b60d6a325..7fd6cf5d6fd 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index afae235473a..6bac6de7293 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/operation/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/operation/version.go index b4693a785cd..2659c10315b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/README.md index d26fe304aa4..8fa82b9175f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/version.go index c62d89a5601..8e9fce70e88 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/README.md index eaf10373a7b..7d10884bbe8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/version.go index f46a0d0994f..1339b75408f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/README.md index 5ce098bf9dc..ba11c10e40c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurefileshareprotecteditem.go index 7a6b0249073..0372eadf961 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,12 +37,36 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +102,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 4a8e707f060..4ed01065fb1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 2da0d92828b..047f9e89c65 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasvmprotecteditem.go index 5985e178945..da1f195e884 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,12 +42,36 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -82,9 +107,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azuresqlprotecteditem.go index 2cca7104d77..a7f1bf8a433 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,12 +33,36 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -73,9 +98,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadprotecteditem.go index e1ed658c0cc..d7f6ef7978e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index e8826a167f9..e89c4589c98 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index 4a0ed833fcb..34243eee1e1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index bb837aa4674..d298e613dda 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index aa7d5fdd6b1..2320465766b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -29,6 +29,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -42,12 +43,36 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +108,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_dpmprotecteditem.go index 28296e18085..775309ac3ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,12 +34,36 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +99,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_genericprotecteditem.go index 912c87f8562..fa387f99713 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,12 +36,36 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -76,9 +101,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_mabfilefolderprotecteditem.go index af4963f528e..94c1541861f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,12 +37,36 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +102,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditem.go index ffceef4149c..b1cacc79c81 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditem.go @@ -10,18 +10,52 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +174,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/version.go index 0deccdcd05a..945695f05b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/README.md index 19ddfaf1a1b..3f9a308860c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/version.go index 5d75369eaaf..abf660b65f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/README.md index 677d2139d73..7928c20ca2d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/version.go index 007e4148829..ced4a4145b0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/README.md index f06383c8ca9..706bed57d94 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/constants.go index 37695869fe8..5a3edc75826 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 9b4b6abeea3..f16322df0e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -54,6 +65,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -65,7 +77,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -73,7 +85,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index abea4b36410..23f07c24cfb 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_subprotectionpolicy.go index bcf1c32ee70..c72de2298ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/model_subprotectionpolicy.go @@ -33,7 +33,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -41,7 +41,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/version.go index 9c0088c68b7..481f4df3c52 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/README.md index 6337438979c..0188b169cb0 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/version.go index ab8ec3f33fa..8c704711829 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/README.md index f951890bb42..ea15ba50b9b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_iaasvmrecoverypoint.go index d4f42a144f4..2cf3daaef4a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -33,6 +33,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -46,9 +54,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/version.go index eaaccaad2f2..8d60cbaa94a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/README.md index e5e86fb9a2f..bf0d7bcd6b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 5d61b82ee31..6de7a932ebd 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -33,6 +33,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -46,9 +54,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/version.go index 2439709477a..29eec14c410 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/README.md index 46f7ef32e38..bf823b52dc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/version.go index d4864f03caa..738b92f0939 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/README.md index bf01ad9c85d..0f05f84a2b2 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/version.go index c3087a3194e..5f464123d8c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/restores/README.md index d7601722629..cc4a90ddd3b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/constants.go index 6dcd4b901b7..e4e1a905c39 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadpointintimerestorerequest.go index f785bb6fa71..17a47b9f36a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadrestorerequest.go index 947201a5715..c8f73787da9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fad9b8987ff..0be30f315db 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 161d659d791..d1a515febd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorerequest.go index 049a667efaa..d65ba612571 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index a6e7afa8145..fc69c9f42b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index 84a7063526c..860841687fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 48f82328531..9d525e258e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorerequest.go index 19981bfa4d4..e1b48b992b6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 10ee540e49f..8254e15cb36 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/restores/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/restores/version.go index 08f07cbaa91..8d392c0ccf9 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/README.md index 95e28f34634..b4a0d7095e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/version.go index 9394589719b..a8593607585 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/README.md index 1898c79b91c..9cde8821b83 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/version.go index 9603cde79b2..a99c58ac20c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/README.md index 72f395726d0..cc28eadcbd5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-02-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/constants.go index 7585807f251..3cb1a6e5f9f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 4ca971b07b1..efe811f6e21 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadrestorerequest.go index 03a7caf817b..924747d3dec 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 454aed0c5c8..4705de4e579 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 627d89cbdfa..ea005a88bc5 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index 28f49cd4217..9f05e1c0d2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index a59f6d7238c..cfc037274ac 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index 5f05d07a5a0..d6cd27733a4 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5a578ec2383..4d9a9c2652e 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go index abf3327bfc4..c9db847d5c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 9e6db2b4ff3..6f245ac124a 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/version.go index fc4547ca58b..8dc298fe831 100644 --- a/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-02-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2023-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/README.md index 569b0c7c90c..f15cee9031e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/version.go index 115c9cd9d4c..0a9f2c7003a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/README.md index 75e06bdcf32..1afacd0aeba 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/version.go index a61263555a5..76acba32ac6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/README.md index 4ff9f30fa84..bc6dd8b983c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/constants.go index 16145295003..f46fabe7f11 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go index c0c6e9f2f0b..34d670811b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -54,6 +65,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -65,7 +77,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -73,7 +85,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index b120c1a48b9..1844d32b920 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_subprotectionpolicy.go index 057aa3243f7..4cb64cb09fb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/model_subprotectionpolicy.go @@ -33,7 +33,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -41,7 +41,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/version.go index fa68cc9b5cd..4787930e7a3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/README.md index b5f5bfc2b8d..dc61f9faae9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/version.go index b5cef892ab3..128377c69bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/README.md index 83b4bc380eb..b9b07a2566e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/version.go index aeade6c0f0f..c197fa08a1c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/README.md index 8a94fd0d501..481784c6e5d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/version.go index 9409b3b03b8..3d0ff9ffe56 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/README.md index e2be3bf9889..a81d10872eb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/version.go index 43e3839f4d0..44f36c1154f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/README.md index da4831f1354..97bcdf9fc25 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/version.go index 9aaa012a233..2c231162452 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/README.md index b0e3b5f3050..655abad75bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/version.go index f7ffe69e243..621f49248a4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/README.md index 6e33de18d5d..b32d0dc4694 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/version.go index 2f6da7b6079..d0907982b8e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backups/README.md index 4b51aa506eb..44b981d98e2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backups/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backups/version.go index ac4c0fa7d75..327d3be280e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/README.md index 1db10d6fbed..82f67b58aeb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/version.go index 298a8296e94..bb5c03426a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/README.md index 793c5b31202..42d95d1c4c7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/version.go index 06ef93110d8..0795ea00345 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/README.md index 9295d29438d..0f1ad60b959 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/version.go index 9b2305c4287..1017088e4de 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/README.md index 7349b2ecfab..507f2c704ae 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/version.go index e05d73ae853..f32c7154790 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/README.md index 645ca19257a..5299ed7fdef 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/version.go index 0248787730d..9fe031bd343 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/README.md index 01e0cbca13c..b700463d119 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/version.go index f6304bb15a7..7d8edc3d1a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/version.go index 5eefe457e98..c1a98b6c491 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/README.md index 160677ded16..881412a6317 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/version.go index e6130e99784..35c7d599e4b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/jobs/version.go index 48901f6ec52..8540f079585 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/operation/README.md index 0e0b9e1b978..5fe8dd8b334 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/constants.go index fe9c03dc6bf..ed6ced90d05 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadpointintimerestorerequest.go index 4970924f286..e329c10ff88 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadrestorerequest.go index ca703e2ebf7..4dbe5acee70 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index cc8bd8f796e..2d5046a6a81 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 6cadfa70134..c6961c5ef71 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorerequest.go index fc7e9075434..53d9fcd885d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index 1e9b78ff710..a15f2238277 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 5162af74f43..17dd1b7cf0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 0885f553e36..467bf76f7f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorerequest.go index 58b60d6a325..7fd6cf5d6fd 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index afae235473a..6bac6de7293 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/operation/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/operation/version.go index a74b9e2d74e..a488284f2fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/README.md index 691373a09b5..7a56de37509 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/version.go index 940bae35f96..eee241394af 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/README.md index f59fbc17e56..6b12cf5101b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/version.go index 2d89d4855a0..4185421ad13 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/README.md index 81cbdc34fc0..283ea711717 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/version.go index fcdf0b0847a..b800f1a8523 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/README.md index 4e1b5663e63..3ca18eedae8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/version.go index 701ecc2d5b6..3d952c45bb9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/README.md index e990f7b7635..27653d23eec 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/version.go index 8bf4551d2ca..cd4b3f5bd6d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/README.md index 03eca738ffa..a9c582de322 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/constants.go index 37695869fe8..5a3edc75826 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 9b4b6abeea3..f16322df0e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -54,6 +65,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -65,7 +77,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -73,7 +85,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index abea4b36410..23f07c24cfb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_subprotectionpolicy.go index bcf1c32ee70..c72de2298ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/model_subprotectionpolicy.go @@ -33,7 +33,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -41,7 +41,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/version.go index fd1e6d2c8ce..c8918bb54f3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/README.md index f7f33628dbd..915ed719775 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/version.go index df13ba93034..5e20e313af0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/README.md index 4546c101116..3d313084300 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/version.go index 4eaea76d285..5c4a7a7fabf 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/README.md index d8bc99d3fdf..d03a1cf4e5b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/version.go index 28ecbf682a3..bf233632030 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/README.md index f758b9703eb..c95b25a4e98 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/version.go index d0b3b48c54c..2c42cb3a3db 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/README.md index 2aa1276b137..d0ca5bdecf0 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/version.go index 7ad0ed6d650..238c9300302 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/restores/README.md index b8e03e12e96..9ccf156dfc5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/constants.go index 6dcd4b901b7..e4e1a905c39 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadpointintimerestorerequest.go index f785bb6fa71..17a47b9f36a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadrestorerequest.go index 947201a5715..c8f73787da9 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fad9b8987ff..0be30f315db 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 161d659d791..d1a515febd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorerequest.go index 049a667efaa..d65ba612571 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index a6e7afa8145..fc69c9f42b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index 84a7063526c..860841687fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 48f82328531..9d525e258e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorerequest.go index 19981bfa4d4..e1b48b992b6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 10ee540e49f..8254e15cb36 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/restores/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/restores/version.go index 6a3878c150e..0b2df70685c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/README.md index 49da0d0a908..98dc073ad6b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/version.go index 79eb04902af..78b9797f1a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/README.md index 5e8f12c1af3..30d01c2ad27 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/version.go index f1ecff1d304..5c455e0e7c1 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/README.md index cc3a607ded3..d8f4b199b8c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-04-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/constants.go index 7585807f251..3cb1a6e5f9f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 4ca971b07b1..efe811f6e21 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadrestorerequest.go index 03a7caf817b..924747d3dec 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadrestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 454aed0c5c8..4705de4e579 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 627d89cbdfa..ea005a88bc5 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -21,6 +21,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -34,9 +42,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index 28f49cd4217..9f05e1c0d2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index a59f6d7238c..cfc037274ac 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -20,6 +20,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index 5f05d07a5a0..d6cd27733a4 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5a578ec2383..4d9a9c2652e 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go index abf3327bfc4..c9db847d5c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSQLRestoreRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 9e6db2b4ff3..6f245ac124a 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { TargetVirtualMachineId *string `json:"targetVirtualMachineId,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/version.go index e3740fa6e18..ae2cb489849 100644 --- a/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-04-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2023-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/README.md index e1b2ab23d9b..3d74ba0c903 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/version.go index acbe5f793ca..b3e3220a808 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/README.md index bc1f70d9120..e76f58b09d6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/version.go index d0dc87181ea..a132be01d96 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/README.md index b7b4f20dcd5..1ede7b270e6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/constants.go index 16145295003..f46fabe7f11 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurefileshareprotectionpolicy.go index b2a087a993d..1166566da54 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index b120c1a48b9..1844d32b920 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_subprotectionpolicy.go index a60dd15ec41..a7fbb832098 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_vaultretentionpolicy.go index 7520633b946..36110270bb1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/version.go index 4ec71d6a42c..c105576a52a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/README.md index 7fd5ce38c67..e9cfa7d8806 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/version.go index 526375de7ae..c36b367fb90 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/README.md index 80b2de00405..50d8c7cebab 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/version.go index 31f1e394952..d336a083db4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/README.md index 12b03d2c9d5..d16d69a4632 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/version.go index 1dc35e8314d..f703e1386cb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/README.md index 4e38fdad19a..004a591ff53 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/version.go index 05ecd694129..79f5ad62d92 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/README.md index 667374842c8..0da4d540b6c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/version.go index 9c2564b3884..1455e922576 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/README.md index 1ae5a1ce508..f815c05f3c7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/version.go index bd30811ab45..7a158c0a45f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/README.md index 07575b1b2e1..08854e5e214 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/version.go index 0f71b082418..19c89a8a859 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backups/README.md index 4c56c7aee18..9ef63cd56e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backups/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backups/version.go index 1ff801bde64..40f38719afb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/README.md index efe79ce33d3..33b3f8808f9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/version.go index 4cede04e397..50e127208ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/README.md index 35677a3d7ee..7799b7428c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/version.go index a58f084c3f8..6b2a1a3b659 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/README.md index 3843e9bd9dc..bc77acfe125 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/version.go index a1f24f55276..49aab7fbaa3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/README.md index f41840546e6..ab297ced6a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/version.go index bfbd7493f8f..3dbd2f9cd43 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/README.md index 86116ba6da0..fd69ec6f05b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/version.go index 0853625a4d8..e1a3695d19c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/README.md index 6b94262b70c..862452f5569 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost` Documentation -The `fetchtieringcost` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `fetchtieringcost` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/constants.go index 30e1f04df9f..7dcbbbe9712 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/constants.go @@ -1,6 +1,8 @@ package fetchtieringcost -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/id_vault.go index b828fbe3a6a..cf6ef8af7fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go index 4949da0922b..4fb183b3f41 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go @@ -17,10 +17,20 @@ type FetchTieringCostInfoForRehydrationRequest struct { RehydrationPriority RehydrationPriority `json:"rehydrationPriority"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostInfoForRehydrationRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostInfoForRehydrationRequest{} func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostInfoForRehydrationRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostInfoForRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinforequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinforequest.go index 610799f0f84..91758343f15 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinforequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostinforequest.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FetchTieringCostInfoRequest interface { + FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl } -// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FetchTieringCostInfoRequest = BaseFetchTieringCostInfoRequestImpl{} + +type BaseFetchTieringCostInfoRequestImpl struct { + ObjectType string `json:"objectType"` + SourceTierType RecoveryPointTierType `json:"sourceTierType"` + TargetTierType RecoveryPointTierType `json:"targetTierType"` +} + +func (s BaseFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s +} + +var _ FetchTieringCostInfoRequest = RawFetchTieringCostInfoRequestImpl{} + +// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFetchTieringCostInfoRequestImpl struct { - Type string - Values map[string]interface{} + fetchTieringCostInfoRequest BaseFetchTieringCostInfoRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s.fetchTieringCostInfoRequest } -func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { +func UnmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTier return out, nil } - out := RawFetchTieringCostInfoRequestImpl{ - Type: value, - Values: temp, + var parent BaseFetchTieringCostInfoRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFetchTieringCostInfoRequestImpl: %+v", err) } - return out, nil + + return RawFetchTieringCostInfoRequestImpl{ + fetchTieringCostInfoRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go index a3ef8489a2c..e9c6afb7a3a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go @@ -14,10 +14,20 @@ type FetchTieringCostSavingsInfoForPolicyRequest struct { PolicyName string `json:"policyName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForPolicyRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForPolicyRequest{} func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForPolicyRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go index 6836ba25244..26bebb45e79 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go @@ -15,10 +15,20 @@ type FetchTieringCostSavingsInfoForProtectedItemRequest struct { ProtectedItemName string `json:"protectedItemName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForProtectedItemRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForProtectedItemRequest{} func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForProtectedItemRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go index bfa92fffc4e..16df6347d82 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go @@ -13,10 +13,20 @@ var _ FetchTieringCostInfoRequest = FetchTieringCostSavingsInfoForVaultRequest{} type FetchTieringCostSavingsInfoForVaultRequest struct { // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForVaultRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForVaultRequest{} func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { @@ -28,9 +38,10 @@ func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForVaultRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostinfo.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostinfo.go index 3278ffb8d57..d444a45ce09 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostinfo.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TieringCostInfo interface { + TieringCostInfo() BaseTieringCostInfoImpl } -// RawTieringCostInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TieringCostInfo = BaseTieringCostInfoImpl{} + +type BaseTieringCostInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s +} + +var _ TieringCostInfo = RawTieringCostInfoImpl{} + +// RawTieringCostInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTieringCostInfoImpl struct { - Type string - Values map[string]interface{} + tieringCostInfo BaseTieringCostInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s.tieringCostInfo } -func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { +func UnmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, erro return out, nil } - out := RawTieringCostInfoImpl{ - Type: value, - Values: temp, + var parent BaseTieringCostInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTieringCostInfoImpl: %+v", err) } - return out, nil + + return RawTieringCostInfoImpl{ + tieringCostInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostrehydrationinfo.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostrehydrationinfo.go index 7d3e00aafee..1fe2415f033 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostrehydrationinfo.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostrehydrationinfo.go @@ -15,6 +15,14 @@ type TieringCostRehydrationInfo struct { RetailRehydrationCostPerGBPerMonth float64 `json:"retailRehydrationCostPerGBPerMonth"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostRehydrationInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostRehydrationInfo{} @@ -28,9 +36,10 @@ func (s TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostRehydrationInfo: %+v", err) } + decoded["objectType"] = "TieringCostRehydrationInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostsavinginfo.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostsavinginfo.go index 45dd137725c..e9b5dbd5fc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostsavinginfo.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/model_tieringcostsavinginfo.go @@ -17,6 +17,14 @@ type TieringCostSavingInfo struct { TargetTierSizeIncreaseInBytes int64 `json:"targetTierSizeIncreaseInBytes"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostSavingInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostSavingInfo{} @@ -30,9 +38,10 @@ func (s TieringCostSavingInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostSavingInfo: %+v", err) } + decoded["objectType"] = "TieringCostSavingInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/version.go index bc615b85739..8e81d0af83f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/fetchtieringcost/version.go @@ -1,12 +1,10 @@ package fetchtieringcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchtieringcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchtieringcost/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/README.md index cd685290965..3797fcf1326 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/version.go index 098d3fbc2a2..03a7ff8aa9e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/version.go index e8e9b01b351..8141ecd1eb8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/README.md index ca1ebdc524b..a0f0d537b89 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/version.go index 21757867c4e..d92e5a69fa0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/jobs/version.go index 1bf192d9de0..23c0d8315fb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/operation/README.md index 53a0c071c36..3dbebe86303 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/constants.go index 6115c6303c6..23a685aa283 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadpointintimerestorerequest.go index b6eff20bd07..d14fa692baf 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadrestorerequest.go index 32b095a0fc2..f87482fa4b0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index c96cd65e1df..745677ca929 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index edc080d54e0..1648e5324c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorerequest.go index 65edc798c83..8dd29cf05b4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index db723203133..76abc51dbe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 8ce9cfa2870..e138cc38ada 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index c6295a99f00..de3e0ea516c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorerequest.go index 09c78408995..c979e46cc8d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index 3fad10a2732..940b484b9e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequestresource.go index 2c0371a7699..d2007792c41 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/operation/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/operation/version.go index dafaab2f9de..a0be3221f8f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/README.md index f97e12ff90c..46c454cd8c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/version.go index dea62139a88..e76eebc9377 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/README.md index 56123d32035..c2221a52cb6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/version.go index 8275a82ee71..938b69d7c7e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/README.md index 40750eecacd..1df032b4156 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/version.go index fdad5915204..66e58095531 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/README.md index d89e7fdcb39..289586adfa5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/version.go index 19052470383..64f7f925b85 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/README.md index 9276a5a5c86..7665961a726 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/version.go index b6a89c3c7fd..57ea5436475 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/README.md index 283d673b616..29968c32944 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/constants.go index 37695869fe8..5a3edc75826 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 90fb6638062..ed5609991af 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index abea4b36410..23f07c24cfb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -20,10 +20,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -35,9 +45,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -57,6 +68,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -71,7 +83,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -79,7 +91,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_subprotectionpolicy.go index f8d86c15304..c6420222281 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_vaultretentionpolicy.go index 51b77729f01..76c5b8cedb8 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/version.go index ccb1dee26af..8c560706278 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/README.md index 2734dcb7aff..b2968e86dc0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/version.go index 96658d5320e..2a4a3ada100 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/README.md index e2bdaf3c65e..170db906584 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/version.go index f985e10866a..ba5290dfaef 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/README.md index 2d1da14d51d..214ccd9eb5a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/version.go index 9bd3128ca52..89366d65d75 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/README.md index a1bb6bf3434..4e7ad3b8f35 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/version.go index 5a08a7145b0..86f55396d0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/README.md index fb98af88e4d..64132b46dbb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/version.go index ef41d12c8b6..4675afa2f27 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/restores/README.md index 571e53703b0..2b3f9fcf242 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/constants.go index 2bbf6f4139c..57a0db7b579 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadpointintimerestorerequest.go index c18b9c4669b..830ea25caa5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadrestorerequest.go index 880473a9a34..125061f2196 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fc66129d770..7c25cbaff53 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index d84d86e2f28..240f04ff8b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorerequest.go index 787926142bb..723c64b4c0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index 4e9d922264a..d8fa7b709bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index f0fd8b50bca..22fbae89800 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 3daee98175e..b1573118df4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorerequest.go index 42aeefeffe9..c274fa8d811 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 245a28b0788..f3f15e5efae 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/restores/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/restores/version.go index e0e4a3195de..4f07fb50a53 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/README.md index 9ba4fe66881..281efc83845 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/version.go index f324237dae9..deebb65485a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/README.md index 4f52a04ffb3..eab5e8a8fce 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/version.go index d0a609340d5..abe1eef031f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/README.md index d8ce72a87a3..9bb78767a2d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-06-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/constants.go index 1e9aaff03ed..cbbc4e1670c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 0b71a891f3c..648b3953a46 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadrestorerequest.go index 6e1f1ed375c..c4d26a15598 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 640f9178791..5462aa0e6a3 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 81ab4ed9c52..190b5d6787f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index bc1a6c4492c..a593380e75e 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index e5fce7d56ed..b710a342aee 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index ef69ab25b0a..a4c0047ca19 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5f50b178447..c79645666fd 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorerequest.go index 261aeb4550c..834b943a044 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 540aad383ec..202d59d28f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequestresource.go index d86e4783597..f39bcdcc37a 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/version.go index 1c8bf2ae139..1121b712160 100644 --- a/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-06-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2023-06-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/README.md index 0cc93d3bd9c..40957739ec7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/version.go index 431c465ec2f..4c110b8f1ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/README.md index 0078f55467c..ae7d545e408 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/version.go index 74dcd88f6fa..85a883c98e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/README.md index 27d9fcd4183..a47843cef2a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/constants.go index 195142cbae0..43b763cad54 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurefileshareprotectionpolicy.go index b2a087a993d..1166566da54 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index 690b63e51c6..968188fac0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_subprotectionpolicy.go index a60dd15ec41..a7fbb832098 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_vaultretentionpolicy.go index 7520633b946..36110270bb1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/version.go index c7ecf47a98c..c99da0906ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/README.md index 4a5d2f7eb6b..411cdc1e1be 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/version.go index e4921faa868..fd358d1a0e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/README.md index 1b73eeb5ed3..e894344dba4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/version.go index 2ded3c8e12b..1747d2b47ac 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/README.md index ecae2c526ac..ead82f146ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/version.go index 3d25d599f02..f2f36d1f35c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/README.md index 11c02d7a0c5..dd6621499c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/version.go index c2234fc2f53..5c46cc1ed18 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/README.md index 48f9a552cd4..cf3f03717e7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/version.go index 27185bb8f9d..967e4168f57 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/README.md index d0969861733..54f085d5c9a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/version.go index 9bc74425978..ef1e3980cf1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/README.md index a740e179e4c..5ac537a16cd 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/version.go index 67aa956ba45..0ec251b6a29 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backups/README.md index cf6f7dd5e0b..5f3a54e4191 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backups/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backups/version.go index c5dc478766b..b3c1ebe41b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/README.md index aa3eb995356..7039d73d22a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/version.go index 631ea18181f..bbf888151de 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/README.md index f2ef3bfa18d..bffa00e542b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/version.go index de829d4cfae..e7a5f26e7c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/README.md index fbfb1091923..c7b1270c102 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/version.go index 9c62809e3f0..5eb94284474 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/README.md index 432aa5edfec..660cbec2c65 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/version.go index a57f53c49de..267c3b92d5d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/README.md index 577e142c0c2..51b0583e554 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/version.go index 7ab553e95b1..68e7472d99c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/README.md index 278f49c4327..e3da32cae51 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost` Documentation -The `fetchtieringcost` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `fetchtieringcost` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/constants.go index 30e1f04df9f..7dcbbbe9712 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/constants.go @@ -1,6 +1,8 @@ package fetchtieringcost -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/id_vault.go index b828fbe3a6a..cf6ef8af7fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go index 4949da0922b..4fb183b3f41 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go @@ -17,10 +17,20 @@ type FetchTieringCostInfoForRehydrationRequest struct { RehydrationPriority RehydrationPriority `json:"rehydrationPriority"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostInfoForRehydrationRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostInfoForRehydrationRequest{} func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostInfoForRehydrationRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostInfoForRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinforequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinforequest.go index 610799f0f84..91758343f15 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinforequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostinforequest.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FetchTieringCostInfoRequest interface { + FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl } -// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FetchTieringCostInfoRequest = BaseFetchTieringCostInfoRequestImpl{} + +type BaseFetchTieringCostInfoRequestImpl struct { + ObjectType string `json:"objectType"` + SourceTierType RecoveryPointTierType `json:"sourceTierType"` + TargetTierType RecoveryPointTierType `json:"targetTierType"` +} + +func (s BaseFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s +} + +var _ FetchTieringCostInfoRequest = RawFetchTieringCostInfoRequestImpl{} + +// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFetchTieringCostInfoRequestImpl struct { - Type string - Values map[string]interface{} + fetchTieringCostInfoRequest BaseFetchTieringCostInfoRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s.fetchTieringCostInfoRequest } -func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { +func UnmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTier return out, nil } - out := RawFetchTieringCostInfoRequestImpl{ - Type: value, - Values: temp, + var parent BaseFetchTieringCostInfoRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFetchTieringCostInfoRequestImpl: %+v", err) } - return out, nil + + return RawFetchTieringCostInfoRequestImpl{ + fetchTieringCostInfoRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go index a3ef8489a2c..e9c6afb7a3a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go @@ -14,10 +14,20 @@ type FetchTieringCostSavingsInfoForPolicyRequest struct { PolicyName string `json:"policyName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForPolicyRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForPolicyRequest{} func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForPolicyRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go index 6836ba25244..26bebb45e79 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go @@ -15,10 +15,20 @@ type FetchTieringCostSavingsInfoForProtectedItemRequest struct { ProtectedItemName string `json:"protectedItemName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForProtectedItemRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForProtectedItemRequest{} func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForProtectedItemRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go index bfa92fffc4e..16df6347d82 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go @@ -13,10 +13,20 @@ var _ FetchTieringCostInfoRequest = FetchTieringCostSavingsInfoForVaultRequest{} type FetchTieringCostSavingsInfoForVaultRequest struct { // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForVaultRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForVaultRequest{} func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { @@ -28,9 +38,10 @@ func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForVaultRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostinfo.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostinfo.go index 3278ffb8d57..d444a45ce09 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostinfo.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TieringCostInfo interface { + TieringCostInfo() BaseTieringCostInfoImpl } -// RawTieringCostInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TieringCostInfo = BaseTieringCostInfoImpl{} + +type BaseTieringCostInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s +} + +var _ TieringCostInfo = RawTieringCostInfoImpl{} + +// RawTieringCostInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTieringCostInfoImpl struct { - Type string - Values map[string]interface{} + tieringCostInfo BaseTieringCostInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s.tieringCostInfo } -func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { +func UnmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, erro return out, nil } - out := RawTieringCostInfoImpl{ - Type: value, - Values: temp, + var parent BaseTieringCostInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTieringCostInfoImpl: %+v", err) } - return out, nil + + return RawTieringCostInfoImpl{ + tieringCostInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostrehydrationinfo.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostrehydrationinfo.go index 7d3e00aafee..1fe2415f033 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostrehydrationinfo.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostrehydrationinfo.go @@ -15,6 +15,14 @@ type TieringCostRehydrationInfo struct { RetailRehydrationCostPerGBPerMonth float64 `json:"retailRehydrationCostPerGBPerMonth"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostRehydrationInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostRehydrationInfo{} @@ -28,9 +36,10 @@ func (s TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostRehydrationInfo: %+v", err) } + decoded["objectType"] = "TieringCostRehydrationInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostsavinginfo.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostsavinginfo.go index 45dd137725c..e9b5dbd5fc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostsavinginfo.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/model_tieringcostsavinginfo.go @@ -17,6 +17,14 @@ type TieringCostSavingInfo struct { TargetTierSizeIncreaseInBytes int64 `json:"targetTierSizeIncreaseInBytes"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostSavingInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostSavingInfo{} @@ -30,9 +38,10 @@ func (s TieringCostSavingInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostSavingInfo: %+v", err) } + decoded["objectType"] = "TieringCostSavingInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/version.go index e1a91ea0c11..0b44561b17c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/fetchtieringcost/version.go @@ -1,12 +1,10 @@ package fetchtieringcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchtieringcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchtieringcost/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/README.md index 9f2dcf68fb6..f79f24c33f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/version.go index fd8f67d7b00..0c76352beeb 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/version.go index 87a8bb55813..d76c8abad9f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/README.md index d8a13117922..a0d662c7197 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/version.go index 279a4744d90..0bdff510b21 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/jobs/version.go index 7b87b8b32dc..07a2c2357ce 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/operation/README.md index 14eccae9cc5..b615f4d6be8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/constants.go index 6115c6303c6..23a685aa283 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadpointintimerestorerequest.go index b6eff20bd07..d14fa692baf 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadrestorerequest.go index 32b095a0fc2..f87482fa4b0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index c96cd65e1df..745677ca929 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index edc080d54e0..1648e5324c6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorerequest.go index 65edc798c83..8dd29cf05b4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index db723203133..76abc51dbe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 8ce9cfa2870..e138cc38ada 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index c6295a99f00..de3e0ea516c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorerequest.go index 09c78408995..c979e46cc8d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index 3fad10a2732..940b484b9e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequestresource.go index 2c0371a7699..d2007792c41 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/operation/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/operation/version.go index f9d2cca4f2a..15051cc33f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/README.md index 77ffa7e2b5a..aca3f097c0f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/version.go index fd162621778..6ccabcb78a0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/README.md index 240dcc4a0d8..d947dae03ee 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/version.go index 3fe0b65f8dc..0d84b9939f1 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/README.md index 255420bb033..8b85d21c5a3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/version.go index b43565fbee6..5cd75ca759f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/README.md index 62296ae3b03..56174801c64 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/version.go index e047bb6ddb3..836e830754a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/README.md index 6be3515274d..86096be76af 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/version.go index 001ad5cce93..69fdeb2ef2d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/README.md index 0dc1da2d121..72464d086cd 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/constants.go index 0b1721c13dc..d3b05f5ef64 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 90fb6638062..ed5609991af 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index cec013785db..6b1f73c9dea 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_subprotectionpolicy.go index f8d86c15304..c6420222281 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_vaultretentionpolicy.go index 51b77729f01..76c5b8cedb8 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/version.go index eb3738ea21f..e64cd7011bc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/README.md index 0e4a80d9980..706611e8e5e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/version.go index 3ec56f14aaf..a42e10fc626 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/README.md index bf9097b528b..fddcd464d3a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/version.go index cec57c6d2be..060ffe993e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/README.md index 94210c71e08..45658464224 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/version.go index eb804709b40..d5a714c955e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/README.md index f2d9bb4d444..1d5586c7eb7 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/version.go index bdf0ba60209..268c141c1ef 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/README.md index 643497f6e8e..e918e53cdad 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/version.go index e35627fe765..753f18921c3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/restores/README.md index f8b6d474d77..77d28c87035 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/constants.go index 2bbf6f4139c..57a0db7b579 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadpointintimerestorerequest.go index c18b9c4669b..830ea25caa5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadrestorerequest.go index 880473a9a34..125061f2196 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fc66129d770..7c25cbaff53 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index d84d86e2f28..240f04ff8b5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorerequest.go index 787926142bb..723c64b4c0b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index 4e9d922264a..d8fa7b709bd 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index f0fd8b50bca..22fbae89800 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 3daee98175e..b1573118df4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorerequest.go index 42aeefeffe9..c274fa8d811 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 245a28b0788..f3f15e5efae 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/restores/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/restores/version.go index 61c29e62007..0a13c73b967 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/README.md index e0f0c3ae7d2..58a41b636e9 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/version.go index 8ee254dcc97..6d18451c07a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/README.md index a239c79999b..8b056673d16 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/version.go index e893b7fd1f6..cd079608f15 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/README.md index 9201e829d18..87a7a463069 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2023-08-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/constants.go index 1e9aaff03ed..cbbc4e1670c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 0b71a891f3c..648b3953a46 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadrestorerequest.go index 6e1f1ed375c..c4d26a15598 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 640f9178791..5462aa0e6a3 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 81ab4ed9c52..190b5d6787f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index bc1a6c4492c..a593380e75e 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index e5fce7d56ed..b710a342aee 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index ef69ab25b0a..a4c0047ca19 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5f50b178447..c79645666fd 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorerequest.go index 261aeb4550c..834b943a044 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 540aad383ec..202d59d28f0 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequestresource.go index d86e4783597..f39bcdcc37a 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/version.go index 9b5f9677a82..12f610f421f 100644 --- a/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2023-08-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2023-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/README.md index c0ce4b89d34..325cdfadb47 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/version.go index 3267f8b225c..9981b43ff85 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/README.md index e974fd9d13f..478d2dc2932 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/version.go index 86ade26962c..3907504ab5a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/README.md index 42184783671..ac5e33192c3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/constants.go index 195142cbae0..43b763cad54 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurefileshareprotectionpolicy.go index b2a087a993d..1166566da54 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index 690b63e51c6..968188fac0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_subprotectionpolicy.go index a60dd15ec41..a7fbb832098 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_vaultretentionpolicy.go index 7520633b946..36110270bb1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/version.go index cc96c945291..159758dbe71 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/README.md index ddf2421ffcb..6d3fe721f3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/version.go index 8bca19435b3..2a2a822a4fd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/README.md index 2505009dfab..b6db1e6f431 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/version.go index 7b3569a2fcf..9a62f06bc3a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/README.md index 19c81b32cd2..5d08dd0734f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/version.go index c75252ee34e..f281de10c3c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/README.md index a968b7c7083..d43925e5c11 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/version.go index 16608e61cc5..595dfc14615 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/README.md index 5807a3c3286..0570cd38033 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/version.go index 0a427128e2e..ded4f33852f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md index 6c666eee43a..b7a514dfdd8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go index b230fb1e970..a75e6ed35b2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/README.md index 070ceb7c09e..6ed38f74df2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/version.go index 208f7682e41..e3dde56b1cc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backups/README.md index eed294e9fe5..ac84b151752 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backups/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backups/version.go index c74dd0ac4e4..c091236d51a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/README.md index c16e4532bef..ac69d5cb55b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/version.go index 3c480499dca..c7c165b4edd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/README.md index 0bb2bf2b043..d032cd1c685 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/version.go index a07f586fad5..1374469ab6a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/README.md index 6f1fbb4b216..f57a81f0c17 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/version.go index 6b343182402..bcdbef6d494 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/README.md index fd2117809b5..1f36832587c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/version.go index 43fbde7146b..46f007b26c2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/README.md index ee8c9fa133f..930c2c334e4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/version.go index c8bc2fee27d..27ce88ab214 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/README.md index 0b024921e60..3f09f1c5b30 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost` Documentation -The `fetchtieringcost` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `fetchtieringcost` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/constants.go index 30e1f04df9f..7dcbbbe9712 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/constants.go @@ -1,6 +1,8 @@ package fetchtieringcost -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/id_vault.go index b828fbe3a6a..cf6ef8af7fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go index 4949da0922b..4fb183b3f41 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go @@ -17,10 +17,20 @@ type FetchTieringCostInfoForRehydrationRequest struct { RehydrationPriority RehydrationPriority `json:"rehydrationPriority"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostInfoForRehydrationRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostInfoForRehydrationRequest{} func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostInfoForRehydrationRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostInfoForRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinforequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinforequest.go index 610799f0f84..91758343f15 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinforequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostinforequest.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FetchTieringCostInfoRequest interface { + FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl } -// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FetchTieringCostInfoRequest = BaseFetchTieringCostInfoRequestImpl{} + +type BaseFetchTieringCostInfoRequestImpl struct { + ObjectType string `json:"objectType"` + SourceTierType RecoveryPointTierType `json:"sourceTierType"` + TargetTierType RecoveryPointTierType `json:"targetTierType"` +} + +func (s BaseFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s +} + +var _ FetchTieringCostInfoRequest = RawFetchTieringCostInfoRequestImpl{} + +// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFetchTieringCostInfoRequestImpl struct { - Type string - Values map[string]interface{} + fetchTieringCostInfoRequest BaseFetchTieringCostInfoRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s.fetchTieringCostInfoRequest } -func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { +func UnmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTier return out, nil } - out := RawFetchTieringCostInfoRequestImpl{ - Type: value, - Values: temp, + var parent BaseFetchTieringCostInfoRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFetchTieringCostInfoRequestImpl: %+v", err) } - return out, nil + + return RawFetchTieringCostInfoRequestImpl{ + fetchTieringCostInfoRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go index a3ef8489a2c..e9c6afb7a3a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go @@ -14,10 +14,20 @@ type FetchTieringCostSavingsInfoForPolicyRequest struct { PolicyName string `json:"policyName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForPolicyRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForPolicyRequest{} func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForPolicyRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go index 6836ba25244..26bebb45e79 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go @@ -15,10 +15,20 @@ type FetchTieringCostSavingsInfoForProtectedItemRequest struct { ProtectedItemName string `json:"protectedItemName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForProtectedItemRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForProtectedItemRequest{} func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForProtectedItemRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go index bfa92fffc4e..16df6347d82 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go @@ -13,10 +13,20 @@ var _ FetchTieringCostInfoRequest = FetchTieringCostSavingsInfoForVaultRequest{} type FetchTieringCostSavingsInfoForVaultRequest struct { // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForVaultRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForVaultRequest{} func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { @@ -28,9 +38,10 @@ func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForVaultRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostinfo.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostinfo.go index 3278ffb8d57..d444a45ce09 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TieringCostInfo interface { + TieringCostInfo() BaseTieringCostInfoImpl } -// RawTieringCostInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TieringCostInfo = BaseTieringCostInfoImpl{} + +type BaseTieringCostInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s +} + +var _ TieringCostInfo = RawTieringCostInfoImpl{} + +// RawTieringCostInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTieringCostInfoImpl struct { - Type string - Values map[string]interface{} + tieringCostInfo BaseTieringCostInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s.tieringCostInfo } -func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { +func UnmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, erro return out, nil } - out := RawTieringCostInfoImpl{ - Type: value, - Values: temp, + var parent BaseTieringCostInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTieringCostInfoImpl: %+v", err) } - return out, nil + + return RawTieringCostInfoImpl{ + tieringCostInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostrehydrationinfo.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostrehydrationinfo.go index 7d3e00aafee..1fe2415f033 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostrehydrationinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostrehydrationinfo.go @@ -15,6 +15,14 @@ type TieringCostRehydrationInfo struct { RetailRehydrationCostPerGBPerMonth float64 `json:"retailRehydrationCostPerGBPerMonth"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostRehydrationInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostRehydrationInfo{} @@ -28,9 +36,10 @@ func (s TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostRehydrationInfo: %+v", err) } + decoded["objectType"] = "TieringCostRehydrationInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostsavinginfo.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostsavinginfo.go index 45dd137725c..e9b5dbd5fc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostsavinginfo.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/model_tieringcostsavinginfo.go @@ -17,6 +17,14 @@ type TieringCostSavingInfo struct { TargetTierSizeIncreaseInBytes int64 `json:"targetTierSizeIncreaseInBytes"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostSavingInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostSavingInfo{} @@ -30,9 +38,10 @@ func (s TieringCostSavingInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostSavingInfo: %+v", err) } + decoded["objectType"] = "TieringCostSavingInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/version.go index ecaaed71223..162715bc088 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/fetchtieringcost/version.go @@ -1,12 +1,10 @@ package fetchtieringcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchtieringcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchtieringcost/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/README.md index 60e9d73d4f4..82184b391fd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/version.go index 3e52952b97c..363b9f4f0f1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/version.go index e3b8001e6d2..c8c704fa63f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/README.md index f6cbdc9016f..9d5d54362fb 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/version.go index 2b84cda4c3e..c192b2b6ab9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/jobs/version.go index b1843ca285a..29f74ecae59 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/operation/README.md index 5f764913532..6fb08669125 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/constants.go index 6115c6303c6..23a685aa283 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadpointintimerestorerequest.go index b6eff20bd07..d14fa692baf 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadrestorerequest.go index 32b095a0fc2..f87482fa4b0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index c96cd65e1df..745677ca929 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index edc080d54e0..1648e5324c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorerequest.go index 65edc798c83..8dd29cf05b4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index db723203133..76abc51dbe9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 8ce9cfa2870..e138cc38ada 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index c6295a99f00..de3e0ea516c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorerequest.go index 09c78408995..c979e46cc8d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index 3fad10a2732..940b484b9e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequestresource.go index 2c0371a7699..d2007792c41 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/operation/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/operation/version.go index 86b8debb803..1135c38ec1b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/README.md index 79247e65e78..6624e5399cf 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/version.go index 369bfc8860f..f97143a7393 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/README.md index 873b1e36147..20f14dcd3a1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/version.go index de369ac9481..989dbac816b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/README.md index 63284cb44b6..3a9972abb99 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/version.go index c14a43183a3..fda199b3245 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/README.md index c48d5578e28..b53aa301476 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/version.go index b4c6d892bc9..74480f97458 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/README.md index fd015c085b8..be4f65b3991 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/version.go index 25b3888e103..2fecbdba43a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/README.md index 5de99285a56..2332fc33d20 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/constants.go index 0b1721c13dc..d3b05f5ef64 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 90fb6638062..ed5609991af 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index cec013785db..6b1f73c9dea 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_subprotectionpolicy.go index f8d86c15304..c6420222281 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_vaultretentionpolicy.go index 51b77729f01..76c5b8cedb8 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/version.go index 1ddeed8dd30..025641d33b1 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/README.md index 543edf105fe..3b565ba1d99 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/version.go index 0233dc600df..a903e909976 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/README.md index 578b8343fbb..dcfeceb11d3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/version.go index 8d0282539a2..bda2ba5a189 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/README.md index d610f9b9b18..203927a32c2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/version.go index ce6ba61f2c9..98627a0ff79 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/README.md index 2ffbaed9fe4..5e527450f5f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/version.go index 058b5dba989..45f409ebfbd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/README.md index 43040ae52ad..9ecbf9b13c2 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/version.go index ca8cc8967f4..a3afb64a050 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/restores/README.md index afca63c9c70..915e90feb6a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/constants.go index 2bbf6f4139c..57a0db7b579 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadpointintimerestorerequest.go index c18b9c4669b..830ea25caa5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadrestorerequest.go index 880473a9a34..125061f2196 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fc66129d770..7c25cbaff53 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index d84d86e2f28..240f04ff8b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorerequest.go index 787926142bb..723c64b4c0b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index 4e9d922264a..d8fa7b709bd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index f0fd8b50bca..22fbae89800 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 3daee98175e..b1573118df4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorerequest.go index 42aeefeffe9..c274fa8d811 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 245a28b0788..f3f15e5efae 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/restores/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/restores/version.go index a860b548487..299bf5e2dea 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/README.md index f944e88a0a5..b584487016c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/version.go index d801ad5546b..51dad9cf490 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/README.md index 8448641b7ca..4b61c00c1b9 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/version.go index 7789440d3fe..fec3acbc50d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/README.md index 9f2e84a61dd..9631fb5b82b 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-01-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/constants.go index 1e9aaff03ed..cbbc4e1670c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 0b71a891f3c..648b3953a46 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadrestorerequest.go index 6e1f1ed375c..c4d26a15598 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 640f9178791..5462aa0e6a3 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 81ab4ed9c52..190b5d6787f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index bc1a6c4492c..a593380e75e 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index e5fce7d56ed..b710a342aee 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index ef69ab25b0a..a4c0047ca19 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5f50b178447..c79645666fd 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorerequest.go index 261aeb4550c..834b943a044 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 540aad383ec..202d59d28f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequestresource.go index d86e4783597..f39bcdcc37a 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/version.go index 697af00df96..020965fab55 100644 --- a/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-01-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2024-01-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/README.md index 26a283830a6..c4a9158d319 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/version.go index 2787ac166cf..e6fabdc4779 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/README.md index 516dfaf28b2..69858f336fb 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/version.go index c100d7aeed0..60b475dca54 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/README.md index d29898b70b7..c0979dc5420 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/constants.go index 195142cbae0..43b763cad54 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go index b2a087a993d..1166566da54 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index 690b63e51c6..968188fac0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_subprotectionpolicy.go index a60dd15ec41..a7fbb832098 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_vaultretentionpolicy.go index 7520633b946..36110270bb1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/version.go index c900b107e67..2a4b7d206b6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/README.md index 037a5cc922e..829d4a1baa8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/version.go index 5f788e842bb..f35670c275d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/README.md index 5ed39305873..045c22b1bdc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/version.go index 6f1bc5332e9..d3d2d1b622b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/README.md index 5cf6747bffb..69fa4785c93 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/version.go index a2f2336359b..3558a10c95f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/README.md index 64f612f5b00..20ab1de2e05 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/version.go index 172e11eddce..9ed3244dfad 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/README.md index 578f8270d10..cb0d33e4a51 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/version.go index 54eef04bab7..45e2bb437d7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/README.md index c4e8429ed58..94f892d7596 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/version.go index 5b1cd77a3a4..2f69e42ac1c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/README.md index 2f0807adf8c..6ee207f9791 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/version.go index e27b047a964..d6cbd17bf07 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backups/README.md index f2380343435..a20bbc34931 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backups/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backups/version.go index d270c2059d0..11347d5e51a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/README.md index c49318240ff..29e0901f792 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/version.go index a3f6a11833a..2738f38dd3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/README.md index ac808a5db17..6be059abd10 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/version.go index bd20e1ba212..fdc21e6616d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/README.md index 06d62ae7ddd..ccccfc91a0a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/version.go index 3214f0d10b5..7503dd33fd6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/README.md index 93068ff97d3..f2ef0e63f23 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/version.go index 549b60026dd..9465b7c0bc9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/README.md index 8cf3cd4db4c..b2a85b4aead 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/version.go index 0726626a1d6..0db9de5ac36 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/README.md index 3f13b0c1fbc..cd55d89e71d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost` Documentation -The `fetchtieringcost` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `fetchtieringcost` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/constants.go index 30e1f04df9f..7dcbbbe9712 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/constants.go @@ -1,6 +1,8 @@ package fetchtieringcost -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/id_vault.go index b828fbe3a6a..cf6ef8af7fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go index 4949da0922b..4fb183b3f41 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go @@ -17,10 +17,20 @@ type FetchTieringCostInfoForRehydrationRequest struct { RehydrationPriority RehydrationPriority `json:"rehydrationPriority"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostInfoForRehydrationRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostInfoForRehydrationRequest{} func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostInfoForRehydrationRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostInfoForRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinforequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinforequest.go index 610799f0f84..91758343f15 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinforequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostinforequest.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FetchTieringCostInfoRequest interface { + FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl } -// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FetchTieringCostInfoRequest = BaseFetchTieringCostInfoRequestImpl{} + +type BaseFetchTieringCostInfoRequestImpl struct { + ObjectType string `json:"objectType"` + SourceTierType RecoveryPointTierType `json:"sourceTierType"` + TargetTierType RecoveryPointTierType `json:"targetTierType"` +} + +func (s BaseFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s +} + +var _ FetchTieringCostInfoRequest = RawFetchTieringCostInfoRequestImpl{} + +// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFetchTieringCostInfoRequestImpl struct { - Type string - Values map[string]interface{} + fetchTieringCostInfoRequest BaseFetchTieringCostInfoRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s.fetchTieringCostInfoRequest } -func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { +func UnmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTier return out, nil } - out := RawFetchTieringCostInfoRequestImpl{ - Type: value, - Values: temp, + var parent BaseFetchTieringCostInfoRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFetchTieringCostInfoRequestImpl: %+v", err) } - return out, nil + + return RawFetchTieringCostInfoRequestImpl{ + fetchTieringCostInfoRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go index a3ef8489a2c..e9c6afb7a3a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go @@ -14,10 +14,20 @@ type FetchTieringCostSavingsInfoForPolicyRequest struct { PolicyName string `json:"policyName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForPolicyRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForPolicyRequest{} func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForPolicyRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go index 6836ba25244..26bebb45e79 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go @@ -15,10 +15,20 @@ type FetchTieringCostSavingsInfoForProtectedItemRequest struct { ProtectedItemName string `json:"protectedItemName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForProtectedItemRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForProtectedItemRequest{} func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForProtectedItemRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go index bfa92fffc4e..16df6347d82 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go @@ -13,10 +13,20 @@ var _ FetchTieringCostInfoRequest = FetchTieringCostSavingsInfoForVaultRequest{} type FetchTieringCostSavingsInfoForVaultRequest struct { // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForVaultRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForVaultRequest{} func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { @@ -28,9 +38,10 @@ func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForVaultRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostinfo.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostinfo.go index 3278ffb8d57..d444a45ce09 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TieringCostInfo interface { + TieringCostInfo() BaseTieringCostInfoImpl } -// RawTieringCostInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TieringCostInfo = BaseTieringCostInfoImpl{} + +type BaseTieringCostInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s +} + +var _ TieringCostInfo = RawTieringCostInfoImpl{} + +// RawTieringCostInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTieringCostInfoImpl struct { - Type string - Values map[string]interface{} + tieringCostInfo BaseTieringCostInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s.tieringCostInfo } -func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { +func UnmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, erro return out, nil } - out := RawTieringCostInfoImpl{ - Type: value, - Values: temp, + var parent BaseTieringCostInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTieringCostInfoImpl: %+v", err) } - return out, nil + + return RawTieringCostInfoImpl{ + tieringCostInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostrehydrationinfo.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostrehydrationinfo.go index 7d3e00aafee..1fe2415f033 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostrehydrationinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostrehydrationinfo.go @@ -15,6 +15,14 @@ type TieringCostRehydrationInfo struct { RetailRehydrationCostPerGBPerMonth float64 `json:"retailRehydrationCostPerGBPerMonth"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostRehydrationInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostRehydrationInfo{} @@ -28,9 +36,10 @@ func (s TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostRehydrationInfo: %+v", err) } + decoded["objectType"] = "TieringCostRehydrationInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostsavinginfo.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostsavinginfo.go index 45dd137725c..e9b5dbd5fc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostsavinginfo.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/model_tieringcostsavinginfo.go @@ -17,6 +17,14 @@ type TieringCostSavingInfo struct { TargetTierSizeIncreaseInBytes int64 `json:"targetTierSizeIncreaseInBytes"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostSavingInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostSavingInfo{} @@ -30,9 +38,10 @@ func (s TieringCostSavingInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostSavingInfo: %+v", err) } + decoded["objectType"] = "TieringCostSavingInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/version.go index cfb4c493669..e5db269de3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/fetchtieringcost/version.go @@ -1,12 +1,10 @@ package fetchtieringcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchtieringcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchtieringcost/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/README.md index 57b287aa067..a6569032946 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/version.go index 68fbda13032..f745d97e73f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/version.go index ceda2df09ff..6ec3e97d505 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/README.md index 86b16604ad1..9a6c56906c5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/version.go index 18d90ccf74a..e49787832dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/jobs/version.go index 4fa8501df19..8605de8fb87 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/operation/README.md index 29328fb9796..75c2e893517 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/constants.go index 6115c6303c6..23a685aa283 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azurefilesharerestorerequest.go index 514f189931b..246c20a7ac8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadpointintimerestorerequest.go index b6eff20bd07..d14fa692baf 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadrestorerequest.go index 32b095a0fc2..f87482fa4b0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index c96cd65e1df..745677ca929 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index edc080d54e0..1648e5324c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorerequest.go index 65edc798c83..8dd29cf05b4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index db723203133..76abc51dbe9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 8ce9cfa2870..e138cc38ada 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index c6295a99f00..de3e0ea516c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorerequest.go index 09c78408995..c979e46cc8d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index 3fad10a2732..940b484b9e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorerequest.go index 373a26215f3..3b19493a6ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go index 88a76804099..8682b9d15b9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_restorerequest.go index 80db41827d3..64c4cfcd73e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequestresource.go index 2c0371a7699..d2007792c41 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/operation/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/operation/version.go index a177bb1853c..d73075a4cd9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/README.md index 914fe9d3031..d900b73f1c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/version.go index 018cf8e011a..c7a1f37624f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/README.md index 4cb422a6892..ddc055b57b3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/version.go index 739a8d3083a..25297bd8887 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/README.md index ba71df835ad..f8b7999eb0a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/version.go index 7c0807b4e8c..d922c6024f6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/README.md index 72688618816..da618ef0d56 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/version.go index e3dd1b2afe4..3fa802bcc24 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/README.md index 1af1272222d..18b5c1d73e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/version.go index 8e0fb6f32d8..ba4a0b1d3a6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/README.md index 86079fbc1c3..e4ce8666e2f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/constants.go index 0b1721c13dc..d3b05f5ef64 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 90fb6638062..ed5609991af 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index cec013785db..6b1f73c9dea 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_subprotectionpolicy.go index f8d86c15304..c6420222281 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_vaultretentionpolicy.go index 51b77729f01..76c5b8cedb8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/version.go index 8ed87ff851f..656cc0679ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/README.md index 0bd579e4a09..5bfedeaf57a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/version.go index 3493f1aaab6..27193127b46 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/README.md index 2c06a91a10f..91a08e9a890 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/version.go index 75142e1e3db..8fb7ab464f7 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/README.md index 9b448e54f1e..617ac23cffe 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/version.go index 956059ea9bb..f6588e476b8 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/README.md index c3a90e7c236..8b0863884b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/version.go index 81c90d70b8b..a0a0521a63f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/README.md index c954fb93d29..f128868ba7e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/version.go index bba68d5d402..296e94727ce 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/restores/README.md index 310b3157a8c..5311ec0ccc6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/constants.go index 2bbf6f4139c..57a0db7b579 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azurefilesharerestorerequest.go index 731b4adc0f3..032f448307d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadpointintimerestorerequest.go index c18b9c4669b..830ea25caa5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadrestorerequest.go index 880473a9a34..125061f2196 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index fc66129d770..7c25cbaff53 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index d84d86e2f28..240f04ff8b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorerequest.go index 787926142bb..723c64b4c0b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index 4e9d922264a..d8fa7b709bd 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index f0fd8b50bca..22fbae89800 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 3daee98175e..b1573118df4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorerequest.go index 42aeefeffe9..c274fa8d811 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index 245a28b0788..f3f15e5efae 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorerequest.go index 4480e70efa7..f2f7e7f45d4 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go index d905fc56e53..1e6937edfe5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequest.go index 099b65bab20..d54cbc43f97 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/restores/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/restores/version.go index f3c05e6a5ec..2760a0ab1b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/README.md index 24d37032bc0..5eeb5848098 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/version.go index 21824330edc..1bcd10ad10c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/README.md index ab436f86386..c263bac19ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/version.go index e2ca28b545f..16f163c8cea 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/README.md index d48dccf57d6..003cf706be2 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-02-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/constants.go index 1e9aaff03ed..cbbc4e1670c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azurefilesharerestorerequest.go index f7f995b0ccf..8880e26a65d 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,6 +19,14 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRestoreRequest{} @@ -32,9 +40,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index 0b71a891f3c..648b3953a46 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadrestorerequest.go index 6e1f1ed375c..c4d26a15598 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadrestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index 640f9178791..5462aa0e6a3 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 81ab4ed9c52..190b5d6787f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,6 +24,14 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} @@ -37,9 +45,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index bc1a6c4492c..a593380e75e 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -22,6 +22,14 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} @@ -35,9 +43,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index e5fce7d56ed..b710a342aee 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,6 +23,14 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} @@ -36,9 +44,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index ef69ab25b0a..a4c0047ca19 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 5f50b178447..c79645666fd 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,6 +27,14 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} @@ -40,9 +48,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go index 261aeb4550c..834b943a044 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -25,6 +25,14 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} @@ -38,9 +46,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 540aad383ec..202d59d28f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,6 +26,14 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} @@ -39,9 +47,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorerequest.go index b6ff82b3064..0b87f4ffd08 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,6 +38,14 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreRequest{} @@ -51,9 +59,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 6ab30430699..91195019e7f 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,6 +39,14 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} @@ -52,9 +60,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_restorerequest.go index f4c271d65e1..d5d92f9014c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_restorerequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequestresource.go index d86e4783597..f39bcdcc37a 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/version.go index 45d1c10a727..462fff143d1 100644 --- a/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-02-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2024-02-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/README.md index 7f1d3714324..9b327cccc83 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupengines` Documentation -The `backupengines` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupengines` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/constants.go index 0b1ec0205b3..0fea886304e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/constants.go @@ -1,6 +1,8 @@ package backupengines -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_backupengine.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_backupengine.go index 2ccbb34b327..3510ef89736 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_backupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_backupengine.go @@ -44,7 +44,7 @@ func ParseBackupEngineID(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupEngineIDInsensitively(input string) (*BackupEngineId, error) { } id := BackupEngineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_vault.go index 6092f91bf70..5f737ca092d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_azurebackupserverengine.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_azurebackupserverengine.go index af20b6e3719..f26cf78714f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_azurebackupserverengine.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_azurebackupserverengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = AzureBackupServerEngine{} type AzureBackupServerEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type AzureBackupServerEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s AzureBackupServerEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = AzureBackupServerEngine{} func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s AzureBackupServerEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerEngine: %+v", err) } + decoded["backupEngineType"] = "AzureBackupServerEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebase.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebase.go index d80588db3b3..d2e8d9395bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebase.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebase.go @@ -10,18 +10,47 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupEngineBase interface { + BackupEngineBase() BaseBackupEngineBaseImpl } -// RawBackupEngineBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupEngineBase = BaseBackupEngineBaseImpl{} + +type BaseBackupEngineBaseImpl struct { + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + BackupEngineId *string `json:"backupEngineId,omitempty"` + BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + DpmVersion *string `json:"dpmVersion,omitempty"` + ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s +} + +var _ BackupEngineBase = RawBackupEngineBaseImpl{} + +// RawBackupEngineBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupEngineBaseImpl struct { - Type string - Values map[string]interface{} + backupEngineBase BaseBackupEngineBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupEngineBaseImpl) BackupEngineBase() BaseBackupEngineBaseImpl { + return s.backupEngineBase } -func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { +func UnmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, error) { if input == nil { return nil, nil } @@ -52,10 +81,15 @@ func unmarshalBackupEngineBaseImplementation(input []byte) (BackupEngineBase, er return out, nil } - out := RawBackupEngineBaseImpl{ - Type: value, - Values: temp, + var parent BaseBackupEngineBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupEngineBaseImpl: %+v", err) } - return out, nil + + return RawBackupEngineBaseImpl{ + backupEngineBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebaseresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebaseresource.go index d7eac2e8d35..bcf32fd9986 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebaseresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_backupenginebaseresource.go @@ -40,7 +40,7 @@ func (s *BackupEngineBaseResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupEngineBaseImplementation(v) + impl, err := UnmarshalBackupEngineBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupEngineBaseResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_dpmbackupengine.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_dpmbackupengine.go index 5d5df373244..c2ea1c634f9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_dpmbackupengine.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/model_dpmbackupengine.go @@ -13,9 +13,11 @@ var _ BackupEngineBase = DpmBackupEngine{} type DpmBackupEngine struct { // Fields inherited from BackupEngineBase + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` BackupEngineId *string `json:"backupEngineId,omitempty"` BackupEngineState *string `json:"backupEngineState,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` CanReRegister *bool `json:"canReRegister,omitempty"` DpmVersion *string `json:"dpmVersion,omitempty"` @@ -27,6 +29,24 @@ type DpmBackupEngine struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } +func (s DpmBackupEngine) BackupEngineBase() BaseBackupEngineBaseImpl { + return BaseBackupEngineBaseImpl{ + AzureBackupAgentVersion: s.AzureBackupAgentVersion, + BackupEngineId: s.BackupEngineId, + BackupEngineState: s.BackupEngineState, + BackupEngineType: s.BackupEngineType, + BackupManagementType: s.BackupManagementType, + CanReRegister: s.CanReRegister, + DpmVersion: s.DpmVersion, + ExtendedInfo: s.ExtendedInfo, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: s.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: s.IsDpmUpgradeAvailable, + RegistrationStatus: s.RegistrationStatus, + } +} + var _ json.Marshaler = DpmBackupEngine{} func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { @@ -38,9 +58,10 @@ func (s DpmBackupEngine) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmBackupEngine: %+v", err) } + decoded["backupEngineType"] = "DpmBackupEngine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/version.go index 3e04e96caeb..758c9d2f4f5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupengines/version.go @@ -1,12 +1,10 @@ package backupengines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupengines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupengines/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/README.md index 61c025701e0..6c35a7bb84e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs` Documentation -The `backupjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/constants.go index 15209b39988..320bbc57e71 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/constants.go @@ -1,6 +1,8 @@ package backupjobs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/id_vault.go index a51564e9571..ed1889c2f33 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjob.go index 7bf1b7e0e61..332abb0f332 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjobv2.go index 8512e3d4550..fa168e3c706 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azurestoragejob.go index d0ea1e45479..bc6959e39ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureworkloadjob.go index 5432c48ce4f..27044486fd1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_dpmjob.go index ceabc044801..39f8d964bc0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_job.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_job.go index edb0e57dd4a..8302897fc7d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_jobresource.go index cb6a61ab28c..33c18b0bbdb 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_mabjob.go index d1e4eda593c..5a734c60a23 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_vaultjob.go index ac59fa1e242..725f23987e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/version.go index 8961923ef1b..b82f13d4c3a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupjobs/version.go @@ -1,12 +1,10 @@ package backupjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupjobs/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/README.md index bba46c2ff64..1d5d6fac24b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies` Documentation -The `backuppolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backuppolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/constants.go index 195142cbae0..43b763cad54 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/constants.go @@ -1,6 +1,8 @@ package backuppolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/id_vault.go index 6a0280f2aa9..86052937352 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go index b2a087a993d..1166566da54 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go index 690b63e51c6..968188fac0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azuresqlprotectionpolicy.go index 81c80d157da..ac1347381b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go index 0e318d65945..03faa82d9e8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_genericprotectionpolicy.go index 16227cb1edd..e38a579d407 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_logschedulepolicy.go index b4c2dd2d4f8..91ef6a09dba 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermretentionpolicy.go index 4f27496b945..5fac545d5fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermschedulepolicy.go index 00b2bec7ab3..27e1138014d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_mabprotectionpolicy.go index 066b0138a5c..33bc5ef9369 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicy.go index d3fdb550ef9..9ab873b28ee 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicyresource.go index 6af342ec8f9..7a6aebd1dee 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_retentionpolicy.go index 515fe95872e..5134291921b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_schedulepolicy.go index 83aeb4b2344..996e4f20f77 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleretentionpolicy.go index 6355b65c8af..165cbbda9a5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicy.go index cf047b354c2..bd4bfbb8a0b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicyv2.go index f8324d396c2..0bf77063df5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_subprotectionpolicy.go index a60dd15ec41..a7fbb832098 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_vaultretentionpolicy.go index 7520633b946..36110270bb1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/version.go index 30df912a279..27e2eac52c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backuppolicies/version.go @@ -1,12 +1,10 @@ package backuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuppolicies/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/README.md index 8be88e6581c..a2c3af19935 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems` Documentation -The `backupprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/constants.go index 4707e9072d4..f26199c385d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/constants.go @@ -1,6 +1,8 @@ package backupprotectableitems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/id_vault.go index 226b52b919b..31dc50d7660 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go index 609db8fe641..542f5632c6a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurefileshareprotectableitem.go @@ -16,12 +16,24 @@ type AzureFileShareProtectableItem struct { ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureFileShareProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureFileShareProtectableItem{} func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go index 14d4cde39da..783ca6ce6b1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaasclassiccomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSClassicComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSClassicComputeVMProtectableItem{} func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go index 13c811a243b..01d84ff8f83 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azureiaascomputevmprotectableitem.go @@ -16,12 +16,24 @@ type AzureIaaSComputeVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureIaaSComputeVMProtectableItem{} func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go index 09d4180bc8b..985a6a45b79 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectableItem{} func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectableItem: %+v", err) } + decoded["protectableItemType"] = "AzureVmWorkloadProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go index e8c296b457a..57392564a47 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsapasesystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPAseSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemProtectableItem{} func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go index cc7165679d2..62eeed455f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseProtectableItem{} func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go index 0008fcf4e42..85180e35a05 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanadbinstance.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaDBInstance struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstance) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDBInstance{} func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstance: %+v", err) } + decoded["protectableItemType"] = "SAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go index 77c1a0ac05f..946c7b496dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanahsrprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaHSRProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaHSRProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaHSRProtectableItem{} func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaHSRProtectableItem: %+v", err) } + decoded["protectableItemType"] = "HanaHSRContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go index c190e0aab39..95c289b65ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsaphanasystemprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSAPHanaSystemProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemProtectableItem{} func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go index 9e5b0a12699..24e77bff5b3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlavailabilitygroupprotectableitem.go @@ -23,12 +23,24 @@ type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { @@ -40,9 +52,10 @@ func (s AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLAvailabilityGroupProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLAvailabilityGroupContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go index 87ce15895d8..581f20e1b17 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqldatabaseprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLDatabaseProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseProtectableItem{} func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go index f963bac71b5..c166cb7f847 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_azurevmworkloadsqlinstanceprotectableitem.go @@ -22,12 +22,24 @@ type AzureVMWorkloadSQLInstanceProtectableItem struct { Subprotectableitemcount *int64 `json:"subprotectableitemcount,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceProtectableItem{} func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { @@ -39,9 +51,10 @@ func (s AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceProtectableItem: %+v", err) } + decoded["protectableItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_iaasvmprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_iaasvmprotectableitem.go index c05ab27225f..17559c25e6d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_iaasvmprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_iaasvmprotectableitem.go @@ -16,12 +16,24 @@ type IaaSVMProtectableItem struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from WorkloadProtectableItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s IaaSVMProtectableItem) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return BaseWorkloadProtectableItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectableItemType: s.ProtectableItemType, + ProtectionState: s.ProtectionState, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = IaaSVMProtectableItem{} func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMProtectableItem: %+v", err) } + decoded["protectableItemType"] = "IaaSVMProtectableItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitem.go index 91f978fc79b..63e77fdd399 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadProtectableItem interface { + WorkloadProtectableItem() BaseWorkloadProtectableItemImpl } -// RawWorkloadProtectableItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadProtectableItem = BaseWorkloadProtectableItemImpl{} + +type BaseWorkloadProtectableItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectableItemType string `json:"protectableItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s +} + +var _ WorkloadProtectableItem = RawWorkloadProtectableItemImpl{} + +// RawWorkloadProtectableItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadProtectableItemImpl struct { - Type string - Values map[string]interface{} + workloadProtectableItem BaseWorkloadProtectableItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadProtectableItemImpl) WorkloadProtectableItem() BaseWorkloadProtectableItemImpl { + return s.workloadProtectableItem } -func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { +func UnmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProtectableItem, error) { if input == nil { return nil, nil } @@ -140,10 +161,15 @@ func unmarshalWorkloadProtectableItemImplementation(input []byte) (WorkloadProte return out, nil } - out := RawWorkloadProtectableItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadProtectableItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadProtectableItemImpl: %+v", err) } - return out, nil + + return RawWorkloadProtectableItemImpl{ + workloadProtectableItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitemresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitemresource.go index 3f03589ca2d..77f0f6d255c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/model_workloadprotectableitemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadProtectableItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadProtectableItemImplementation(v) + impl, err := UnmarshalWorkloadProtectableItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadProtectableItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/version.go index c55540a252e..bab31b83d7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectableitems/version.go @@ -1,12 +1,10 @@ package backupprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectableitems/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/README.md index 35aef5d3abf..d2ec59a272a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems` Documentation -The `backupprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/constants.go index a0cadc76937..27b26f2b761 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/constants.go @@ -1,6 +1,8 @@ package backupprotecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/id_vault.go index d1d3f88fdc4..ec4f063b6a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go index c3298a1bd0c..f912c83a9d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go index 02fc57f6284..92d5a3a21a0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go index cd68214dabe..252cd77f99b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go index 1af736c9ff1..0797737c5ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azuresqlprotecteditem.go index 57afd68710c..a07c8b44ee2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go index 3a61cfb08ce..f9009af809d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index 1f562982e49..83e91d8a89f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index f5ad71c3f66..eac7abbdf01 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index a26f205aef2..b2ea4f926ff 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index df776fba105..54b765018f5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_dpmprotecteditem.go index e17a5b340fc..a6879fabc8c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_genericprotecteditem.go index 98ab0962040..3684d9f7e1d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go index 800796cc649..e6e6d98b4ca 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditem.go index c0293f0a808..8298742cb2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditemresource.go index cf1da7db76f..a4d71866156 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/version.go index 973669c5211..e099a6f4d53 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotecteditems/version.go @@ -1,12 +1,10 @@ package backupprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotecteditems/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/README.md index 9f71d5f8cb3..e06ea2680c1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers` Documentation -The `backupprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/constants.go index 80a7af4df07..72b80d244e7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/constants.go @@ -1,6 +1,8 @@ package backupprotectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/id_vault.go index 814f8fd9a8a..f1032b7c6ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go index 491a5d88bc7..5da198a1293 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go index 65ce2a73e0e..aff827df4c1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go index 2cc11651a91..cd56e5eb1bf 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 0c3557434a7..ed722014f5c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlcontainer.go index 6a6ebd42209..2bd62aa48a1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurestoragecontainer.go index 2517538ab11..efb33d58246 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 791890dda6b..6e223755784 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go index 4bd85bb2f86..e540df3877b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_dpmcontainer.go index d8f981a383a..b344dd4102f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_genericcontainer.go index 1b4450ed88f..c912d3229ef 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_iaasvmcontainer.go index 442fd35fe13..f43a63174a7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_mabcontainer.go index d9cd5599d7e..806e61770c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainer.go index a675bf0357d..6584372f8da 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainerresource.go index c112fdde08b..e1e2e74d8ec 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/version.go index 033048ef214..4e4213db530 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectioncontainers/version.go @@ -1,12 +1,10 @@ package backupprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectioncontainers/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/README.md index 3a47284db49..eb9e611b634 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent` Documentation -The `backupprotectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupprotectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/constants.go index 3329c4a8723..54a09b9ab92 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/constants.go @@ -1,6 +1,8 @@ package backupprotectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/id_vault.go index 4dc6bb96ab6..4e379713ab4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go index b977432cd8e..f3a96053fba 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureresourceprotectionintent.go index 4583889073c..89e120970bd 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go index 267e3b491a5..c1bbfceb582 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go index a8769e454d8..3210b6e43d6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go index f08a42d327c..3f18fb6d200 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintent.go index 37d03a79726..97860ffb94b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintentresource.go index 08b6ed4abda..e16684c63e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/version.go index 2162fda8021..280ef8daac1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupprotectionintent/version.go @@ -1,12 +1,10 @@ package backupprotectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupprotectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupprotectionintent/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/README.md index 9b995cb3700..a0b0ea3f33c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs` Documentation -The `backupresourceencryptionconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupresourceencryptionconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/constants.go index 0c18f2887db..29c88017b74 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourceencryptionconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/id_vault.go index 646a9d93961..d19918dbc20 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/version.go index 2303e0f4f75..e5b6ae24a02 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourceencryptionconfigs/version.go @@ -1,12 +1,10 @@ package backupresourceencryptionconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourceencryptionconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourceencryptionconfigs/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/README.md index 6c1e3390727..f7639411ad8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr` Documentation -The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupresourcestorageconfigsnoncrr` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/constants.go index 6ae51ba9c4a..401d538cf3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/constants.go @@ -1,6 +1,8 @@ package backupresourcestorageconfigsnoncrr -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/id_vault.go index a1355a4b4e3..3b238d1f751 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/version.go index 048b0ad4aa8..275d4309983 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcestorageconfigsnoncrr/version.go @@ -1,12 +1,10 @@ package backupresourcestorageconfigsnoncrr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcestorageconfigsnoncrr/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/README.md index 49a9e89c211..1a618025786 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs` Documentation -The `backupresourcevaultconfigs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupresourcevaultconfigs` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/constants.go index 3be392d6155..b3cc9f2074c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/constants.go @@ -1,6 +1,8 @@ package backupresourcevaultconfigs -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/id_vault.go index ba1ccdb6d5a..a81021e7162 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/version.go index 8b1edd7e860..7f58ffe66d2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupresourcevaultconfigs/version.go @@ -1,12 +1,10 @@ package backupresourcevaultconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupresourcevaultconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupresourcevaultconfigs/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backups/README.md index 2fcd36fbff1..1cf58a94246 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backups` Documentation -The `backups` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/constants.go index 28cae0d72b3..0e9ea57090f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/constants.go @@ -1,6 +1,8 @@ package backups -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/id_protecteditem.go index 384742b5287..abbb3f7f0ed 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azurefilesharebackuprequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azurefilesharebackuprequest.go index 99ddceed9c6..ff4e3c89e51 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azurefilesharebackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azurefilesharebackuprequest.go @@ -14,6 +14,14 @@ type AzureFileShareBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareBackupRequest{} @@ -27,9 +35,10 @@ func (s AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareBackupRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azureworkloadbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azureworkloadbackuprequest.go index dff561d8271..4571f1135be 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azureworkloadbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_azureworkloadbackuprequest.go @@ -16,6 +16,14 @@ type AzureWorkloadBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadBackupRequest{} @@ -29,9 +37,10 @@ func (s AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadBackupRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequest.go index 2f905da3c3c..dac52c54f94 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type BackupRequest interface { + BackupRequest() BaseBackupRequestImpl } -// RawBackupRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ BackupRequest = BaseBackupRequestImpl{} + +type BaseBackupRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s +} + +var _ BackupRequest = RawBackupRequestImpl{} + +// RawBackupRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawBackupRequestImpl struct { - Type string - Values map[string]interface{} + backupRequest BaseBackupRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupRequestImpl) BackupRequest() BaseBackupRequestImpl { + return s.backupRequest } -func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { +func UnmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalBackupRequestImplementation(input []byte) (BackupRequest, error) { return out, nil } - out := RawBackupRequestImpl{ - Type: value, - Values: temp, + var parent BaseBackupRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupRequestImpl: %+v", err) } - return out, nil + + return RawBackupRequestImpl{ + backupRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequestresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequestresource.go index 9f57a8a255b..0ea559bb0fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_backuprequestresource.go @@ -40,7 +40,7 @@ func (s *BackupRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalBackupRequestImplementation(v) + impl, err := UnmarshalBackupRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'BackupRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_iaasvmbackuprequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_iaasvmbackuprequest.go index d40c0c3ccf0..bffc37ffa9c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_iaasvmbackuprequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/model_iaasvmbackuprequest.go @@ -14,6 +14,14 @@ type IaasVMBackupRequest struct { RecoveryPointExpiryTimeInUTC *string `json:"recoveryPointExpiryTimeInUTC,omitempty"` // Fields inherited from BackupRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMBackupRequest) BackupRequest() BaseBackupRequestImpl { + return BaseBackupRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMBackupRequest{} @@ -27,9 +35,10 @@ func (s IaasVMBackupRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMBackupRequest: %+v", err) } + decoded["objectType"] = "IaasVMBackupRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backups/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backups/version.go index 8e400ee87e1..f877ed8eb8b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backups/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backups/version.go @@ -1,12 +1,10 @@ package backups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backups/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/README.md index 70cb8532466..49a6bc62cb3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus` Documentation -The `backupstatus` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupstatus` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/constants.go index aa16bf7cbcf..2ee8d184452 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/constants.go @@ -1,6 +1,8 @@ package backupstatus -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/id_location.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/id_location.go index aa1928c467e..d0ebf00704b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/version.go index 2e8d80d9370..45cac2422d1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupstatus/version.go @@ -1,12 +1,10 @@ package backupstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupstatus/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/README.md index 4bcd0f644ff..5b71e1ed440 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries` Documentation -The `backupusagesummaries` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupusagesummaries` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/constants.go index 397d5b32331..35bb7f168aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/constants.go @@ -1,6 +1,8 @@ package backupusagesummaries -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/id_vault.go index 389ed893fc0..db2432b2194 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/version.go index a304372eaeb..4e911b9af24 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupusagesummaries/version.go @@ -1,12 +1,10 @@ package backupusagesummaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupusagesummaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupusagesummaries/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/README.md index 5e8cb69f3df..97e516ba3cf 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems` Documentation -The `backupworkloaditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `backupworkloaditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/constants.go index 53f53e17687..04f820247b7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/constants.go @@ -1,6 +1,8 @@ package backupworkloaditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/id_protectioncontainer.go index d0642507a3e..fde2f8632b8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloaditem.go index 69068df164a..1cfdf68c3de 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadItem{} func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "AzureVmWorkloadItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go index d2b7b5b550a..36fdacb1151 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasedatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go index 1f00dd9c164..3ac63f560d8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsapasesystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPAseSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPAseSystemWorkloadItem{} func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPAseSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go index 49058e10e85..470530a883c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanadatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go index 9b7e843c0bd..41d102cc6e5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsaphanasystemworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSAPHanaSystemWorkloadItem{} func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaSystemWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SAPHanaSystem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go index d857da81c38..21f279752ad 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqldatabaseworkloaditem.go @@ -18,12 +18,24 @@ type AzureVMWorkloadSQLDatabaseWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLDatabaseWorkloadItem{} func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { @@ -35,9 +47,10 @@ func (s AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLDataBase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go index 1179d25dea3..c03f001a557 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_azurevmworkloadsqlinstanceworkloaditem.go @@ -19,12 +19,24 @@ type AzureVMWorkloadSQLInstanceWorkloadItem struct { Subinquireditemcount *int64 `json:"subinquireditemcount,omitempty"` // Fields inherited from WorkloadItem + BackupManagementType *string `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` WorkloadType *string `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLInstanceWorkloadItem) WorkloadItem() BaseWorkloadItemImpl { + return BaseWorkloadItemImpl{ + BackupManagementType: s.BackupManagementType, + FriendlyName: s.FriendlyName, + ProtectionState: s.ProtectionState, + WorkloadItemType: s.WorkloadItemType, + WorkloadType: s.WorkloadType, + } +} + var _ json.Marshaler = AzureVMWorkloadSQLInstanceWorkloadItem{} func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { @@ -36,9 +48,10 @@ func (s AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLInstanceWorkloadItem: %+v", err) } + decoded["workloadItemType"] = "SQLInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditem.go index 83019e354ef..d92ec3ea73b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditem.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadItem interface { + WorkloadItem() BaseWorkloadItemImpl } -// RawWorkloadItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadItem = BaseWorkloadItemImpl{} + +type BaseWorkloadItemImpl struct { + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + WorkloadItemType string `json:"workloadItemType"` + WorkloadType *string `json:"workloadType,omitempty"` +} + +func (s BaseWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s +} + +var _ WorkloadItem = RawWorkloadItemImpl{} + +// RawWorkloadItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadItemImpl struct { - Type string - Values map[string]interface{} + workloadItem BaseWorkloadItemImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadItemImpl) WorkloadItem() BaseWorkloadItemImpl { + return s.workloadItem } -func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { +func UnmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { if input == nil { return nil, nil } @@ -92,10 +113,15 @@ func unmarshalWorkloadItemImplementation(input []byte) (WorkloadItem, error) { return out, nil } - out := RawWorkloadItemImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadItemImpl: %+v", err) } - return out, nil + + return RawWorkloadItemImpl{ + workloadItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditemresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditemresource.go index 2c4a15f25c6..48868dc9964 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/model_workloaditemresource.go @@ -40,7 +40,7 @@ func (s *WorkloadItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadItemImplementation(v) + impl, err := UnmarshalWorkloadItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/version.go index 713207f3fb6..c9d5c713cc2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/backupworkloaditems/version.go @@ -1,12 +1,10 @@ package backupworkloaditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupworkloaditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupworkloaditems/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/README.md index 7036890c92a..f4b34b7dae8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/datamove` Documentation -The `datamove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `datamove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/constants.go index 86a3e471eea..394d00d9a0f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/constants.go @@ -1,6 +1,8 @@ package datamove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/id_vault.go index 5908a75a95d..9496ffe5c2c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/version.go index 28351feda01..9b8eab5fd8f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/datamove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/datamove/version.go @@ -1,12 +1,10 @@ package datamove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamove/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/README.md index d417a3c4170..d8b7f0217d8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport` Documentation -The `featuresupport` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `featuresupport` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/constants.go index e44ccfc6c48..de57933a730 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/constants.go @@ -1,6 +1,8 @@ package featuresupport -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/id_location.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/id_location.go index e226fb08ca7..aece7b50925 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go index 3d2bf051bd9..ecc777b3d84 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurebackupgoalfeaturesupportrequest.go @@ -13,6 +13,14 @@ var _ FeatureSupportRequest = AzureBackupGoalFeatureSupportRequest{} type AzureBackupGoalFeatureSupportRequest struct { // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureBackupGoalFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureBackupGoalFeatureSupportRequest{} @@ -26,9 +34,10 @@ func (s AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupGoalFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureBackupGoals" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go index b9e212a5b30..691dba6c83b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_azurevmresourcefeaturesupportrequest.go @@ -15,6 +15,14 @@ type AzureVMResourceFeatureSupportRequest struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from FeatureSupportRequest + + FeatureType string `json:"featureType"` +} + +func (s AzureVMResourceFeatureSupportRequest) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return BaseFeatureSupportRequestImpl{ + FeatureType: s.FeatureType, + } } var _ json.Marshaler = AzureVMResourceFeatureSupportRequest{} @@ -28,9 +36,10 @@ func (s AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMResourceFeatureSupportRequest: %+v", err) } + decoded["featureType"] = "AzureVMResourceBackup" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_featuresupportrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_featuresupportrequest.go index 470e2a01527..fb8c1691a15 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_featuresupportrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/model_featuresupportrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FeatureSupportRequest interface { + FeatureSupportRequest() BaseFeatureSupportRequestImpl } -// RawFeatureSupportRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FeatureSupportRequest = BaseFeatureSupportRequestImpl{} + +type BaseFeatureSupportRequestImpl struct { + FeatureType string `json:"featureType"` +} + +func (s BaseFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s +} + +var _ FeatureSupportRequest = RawFeatureSupportRequestImpl{} + +// RawFeatureSupportRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFeatureSupportRequestImpl struct { - Type string - Values map[string]interface{} + featureSupportRequest BaseFeatureSupportRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFeatureSupportRequestImpl) FeatureSupportRequest() BaseFeatureSupportRequestImpl { + return s.featureSupportRequest } -func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { +func UnmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFeatureSupportRequestImplementation(input []byte) (FeatureSupportR return out, nil } - out := RawFeatureSupportRequestImpl{ - Type: value, - Values: temp, + var parent BaseFeatureSupportRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFeatureSupportRequestImpl: %+v", err) } - return out, nil + + return RawFeatureSupportRequestImpl{ + featureSupportRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/version.go index bbc1cbbc990..581c5b03960 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/featuresupport/version.go @@ -1,12 +1,10 @@ package featuresupport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/featuresupport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/featuresupport/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/README.md index 05f1a58c275..fc2e6bcc2b4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost` Documentation -The `fetchtieringcost` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `fetchtieringcost` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/constants.go index 30e1f04df9f..7dcbbbe9712 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/constants.go @@ -1,6 +1,8 @@ package fetchtieringcost -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/id_vault.go index b828fbe3a6a..cf6ef8af7fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go index 4949da0922b..4fb183b3f41 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinfoforrehydrationrequest.go @@ -17,10 +17,20 @@ type FetchTieringCostInfoForRehydrationRequest struct { RehydrationPriority RehydrationPriority `json:"rehydrationPriority"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostInfoForRehydrationRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostInfoForRehydrationRequest{} func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostInfoForRehydrationRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostInfoForRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinforequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinforequest.go index 610799f0f84..91758343f15 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinforequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostinforequest.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FetchTieringCostInfoRequest interface { + FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl } -// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FetchTieringCostInfoRequest = BaseFetchTieringCostInfoRequestImpl{} + +type BaseFetchTieringCostInfoRequestImpl struct { + ObjectType string `json:"objectType"` + SourceTierType RecoveryPointTierType `json:"sourceTierType"` + TargetTierType RecoveryPointTierType `json:"targetTierType"` +} + +func (s BaseFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s +} + +var _ FetchTieringCostInfoRequest = RawFetchTieringCostInfoRequestImpl{} + +// RawFetchTieringCostInfoRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFetchTieringCostInfoRequestImpl struct { - Type string - Values map[string]interface{} + fetchTieringCostInfoRequest BaseFetchTieringCostInfoRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawFetchTieringCostInfoRequestImpl) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return s.fetchTieringCostInfoRequest } -func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { +func UnmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTieringCostInfoRequest, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalFetchTieringCostInfoRequestImplementation(input []byte) (FetchTier return out, nil } - out := RawFetchTieringCostInfoRequestImpl{ - Type: value, - Values: temp, + var parent BaseFetchTieringCostInfoRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFetchTieringCostInfoRequestImpl: %+v", err) } - return out, nil + + return RawFetchTieringCostInfoRequestImpl{ + fetchTieringCostInfoRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go index a3ef8489a2c..e9c6afb7a3a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforpolicyrequest.go @@ -14,10 +14,20 @@ type FetchTieringCostSavingsInfoForPolicyRequest struct { PolicyName string `json:"policyName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForPolicyRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForPolicyRequest{} func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForPolicyRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go index 6836ba25244..26bebb45e79 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforprotecteditemrequest.go @@ -15,10 +15,20 @@ type FetchTieringCostSavingsInfoForProtectedItemRequest struct { ProtectedItemName string `json:"protectedItemName"` // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForProtectedItemRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForProtectedItemRequest{} func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForProtectedItemRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go index bfa92fffc4e..16df6347d82 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_fetchtieringcostsavingsinfoforvaultrequest.go @@ -13,10 +13,20 @@ var _ FetchTieringCostInfoRequest = FetchTieringCostSavingsInfoForVaultRequest{} type FetchTieringCostSavingsInfoForVaultRequest struct { // Fields inherited from FetchTieringCostInfoRequest + + ObjectType string `json:"objectType"` SourceTierType RecoveryPointTierType `json:"sourceTierType"` TargetTierType RecoveryPointTierType `json:"targetTierType"` } +func (s FetchTieringCostSavingsInfoForVaultRequest) FetchTieringCostInfoRequest() BaseFetchTieringCostInfoRequestImpl { + return BaseFetchTieringCostInfoRequestImpl{ + ObjectType: s.ObjectType, + SourceTierType: s.SourceTierType, + TargetTierType: s.TargetTierType, + } +} + var _ json.Marshaler = FetchTieringCostSavingsInfoForVaultRequest{} func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { @@ -28,9 +38,10 @@ func (s FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FetchTieringCostSavingsInfoForVaultRequest: %+v", err) } + decoded["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostinfo.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostinfo.go index 3278ffb8d57..d444a45ce09 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostinfo.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TieringCostInfo interface { + TieringCostInfo() BaseTieringCostInfoImpl } -// RawTieringCostInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TieringCostInfo = BaseTieringCostInfoImpl{} + +type BaseTieringCostInfoImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s +} + +var _ TieringCostInfo = RawTieringCostInfoImpl{} + +// RawTieringCostInfoImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTieringCostInfoImpl struct { - Type string - Values map[string]interface{} + tieringCostInfo BaseTieringCostInfoImpl + Type string + Values map[string]interface{} +} + +func (s RawTieringCostInfoImpl) TieringCostInfo() BaseTieringCostInfoImpl { + return s.tieringCostInfo } -func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { +func UnmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalTieringCostInfoImplementation(input []byte) (TieringCostInfo, erro return out, nil } - out := RawTieringCostInfoImpl{ - Type: value, - Values: temp, + var parent BaseTieringCostInfoImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTieringCostInfoImpl: %+v", err) } - return out, nil + + return RawTieringCostInfoImpl{ + tieringCostInfo: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostrehydrationinfo.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostrehydrationinfo.go index 7d3e00aafee..1fe2415f033 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostrehydrationinfo.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostrehydrationinfo.go @@ -15,6 +15,14 @@ type TieringCostRehydrationInfo struct { RetailRehydrationCostPerGBPerMonth float64 `json:"retailRehydrationCostPerGBPerMonth"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostRehydrationInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostRehydrationInfo{} @@ -28,9 +36,10 @@ func (s TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostRehydrationInfo: %+v", err) } + decoded["objectType"] = "TieringCostRehydrationInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostsavinginfo.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostsavinginfo.go index 45dd137725c..e9b5dbd5fc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostsavinginfo.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/model_tieringcostsavinginfo.go @@ -17,6 +17,14 @@ type TieringCostSavingInfo struct { TargetTierSizeIncreaseInBytes int64 `json:"targetTierSizeIncreaseInBytes"` // Fields inherited from TieringCostInfo + + ObjectType string `json:"objectType"` +} + +func (s TieringCostSavingInfo) TieringCostInfo() BaseTieringCostInfoImpl { + return BaseTieringCostInfoImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = TieringCostSavingInfo{} @@ -30,9 +38,10 @@ func (s TieringCostSavingInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TieringCostSavingInfo: %+v", err) } + decoded["objectType"] = "TieringCostSavingInfo" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/version.go index 61becd5297b..fef03a8107f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/fetchtieringcost/version.go @@ -1,12 +1,10 @@ package fetchtieringcost -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fetchtieringcost/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fetchtieringcost/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/README.md index d1d8a700469..2923f36c165 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections` Documentation -The `itemlevelrecoveryconnections` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `itemlevelrecoveryconnections` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/id_recoverypoint.go index 0f971ef7db0..e1074ed2853 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go index d93f105af7a..51a2357a9dc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_azurefileshareprovisionilrrequest.go @@ -15,6 +15,14 @@ type AzureFileShareProvisionILRRequest struct { SourceResourceId *string `json:"sourceResourceId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareProvisionILRRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareProvisionILRRequest{} @@ -28,9 +36,10 @@ func (s AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProvisionILRRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareProvisionILRRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go index 87056a3101b..c2ac088fea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_iaasvmilrregistrationrequest.go @@ -17,6 +17,14 @@ type IaasVMILRRegistrationRequest struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ILRRequest + + ObjectType string `json:"objectType"` +} + +func (s IaasVMILRRegistrationRequest) ILRRequest() BaseILRRequestImpl { + return BaseILRRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMILRRegistrationRequest{} @@ -30,9 +38,10 @@ func (s IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMILRRegistrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMILRRegistrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequest.go index 06d898b4cc2..4bed7db2710 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ILRRequest interface { + ILRRequest() BaseILRRequestImpl } -// RawILRRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ILRRequest = BaseILRRequestImpl{} + +type BaseILRRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s +} + +var _ ILRRequest = RawILRRequestImpl{} + +// RawILRRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawILRRequestImpl struct { - Type string - Values map[string]interface{} + iLRRequest BaseILRRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawILRRequestImpl) ILRRequest() BaseILRRequestImpl { + return s.iLRRequest } -func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { +func UnmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalILRRequestImplementation(input []byte) (ILRRequest, error) { return out, nil } - out := RawILRRequestImpl{ - Type: value, - Values: temp, + var parent BaseILRRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseILRRequestImpl: %+v", err) } - return out, nil + + return RawILRRequestImpl{ + iLRRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go index b9b0865a658..07bcdcb1bde 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/model_ilrrequestresource.go @@ -40,7 +40,7 @@ func (s *ILRRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalILRRequestImplementation(v) + impl, err := UnmarshalILRRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ILRRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/version.go index 03885c0695f..3c92f54468f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/itemlevelrecoveryconnections/version.go @@ -1,12 +1,10 @@ package itemlevelrecoveryconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/itemlevelrecoveryconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/itemlevelrecoveryconnections/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/id_backupjob.go index a1e5b25173c..c98721a7144 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/version.go index 7f966cc1f61..6760cc82267 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobcancellations/version.go @@ -1,12 +1,10 @@ package jobcancellations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcancellations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcancellations/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/README.md index 203d0f95c80..d7792b2413e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails` Documentation -The `jobdetails` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `jobdetails` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/constants.go index a94046a0140..6a4f8d85320 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/constants.go @@ -1,6 +1,8 @@ package jobdetails -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/id_backupjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/id_backupjob.go index e7740445ca3..eddf0191ed1 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/id_backupjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/id_backupjob.go @@ -44,7 +44,7 @@ func ParseBackupJobID(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupJobIDInsensitively(input string) (*BackupJobId, error) { } id := BackupJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjob.go index fd829774cff..36c6e9749fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjob.go @@ -23,15 +23,30 @@ type AzureIaaSVMJob struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureIaaSVMJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJob: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjobv2.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjobv2.go index e1c8f8a8d74..b895bf10247 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjobv2.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureiaasvmjobv2.go @@ -22,15 +22,30 @@ type AzureIaaSVMJobV2 struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureIaaSVMJobV2) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureIaaSVMJobV2) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -66,9 +81,10 @@ func (s AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMJobV2: %+v", err) } + decoded["jobType"] = "AzureIaaSVMJobV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azurestoragejob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azurestoragejob.go index ae1214a2ed0..6ca72a178a9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azurestoragejob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azurestoragejob.go @@ -23,15 +23,30 @@ type AzureStorageJob struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureStorageJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureStorageJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s AzureStorageJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageJob: %+v", err) } + decoded["jobType"] = "AzureStorageJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureworkloadjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureworkloadjob.go index 90c833a0b9e..3626ba712ab 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureworkloadjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_azureworkloadjob.go @@ -21,15 +21,30 @@ type AzureWorkloadJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s AzureWorkloadJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *AzureWorkloadJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -65,9 +80,10 @@ func (s AzureWorkloadJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadJob: %+v", err) } + decoded["jobType"] = "AzureWorkloadJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_dpmjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_dpmjob.go index 7a18a1855d9..f4c21101cf0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_dpmjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_dpmjob.go @@ -24,15 +24,30 @@ type DpmJob struct { WorkloadType *string `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s DpmJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *DpmJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -68,9 +83,10 @@ func (s DpmJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmJob: %+v", err) } + decoded["jobType"] = "DpmJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_job.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_job.go index eb88a4b64f5..648b379f937 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_job.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_job.go @@ -10,18 +10,42 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Job interface { + Job() BaseJobImpl } -// RawJobImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Job = BaseJobImpl{} + +type BaseJobImpl struct { + ActivityId *string `json:"activityId,omitempty"` + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + EndTime *string `json:"endTime,omitempty"` + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` + Operation *string `json:"operation,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *string `json:"status,omitempty"` +} + +func (s BaseJobImpl) Job() BaseJobImpl { + return s +} + +var _ Job = RawJobImpl{} + +// RawJobImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobImpl struct { + job BaseJobImpl Type string Values map[string]interface{} } -func unmarshalJobImplementation(input []byte) (Job, error) { +func (s RawJobImpl) Job() BaseJobImpl { + return s.job +} + +func UnmarshalJobImplementation(input []byte) (Job, error) { if input == nil { return nil, nil } @@ -92,10 +116,15 @@ func unmarshalJobImplementation(input []byte) (Job, error) { return out, nil } - out := RawJobImpl{ + var parent BaseJobImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobImpl: %+v", err) + } + + return RawJobImpl{ + job: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_jobresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_jobresource.go index 5a450efbfbd..9e738a05630 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_jobresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_jobresource.go @@ -40,7 +40,7 @@ func (s *JobResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalJobImplementation(v) + impl, err := UnmarshalJobImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'JobResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_mabjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_mabjob.go index b39dc7f470f..8e1355cf4bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_mabjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_mabjob.go @@ -23,15 +23,30 @@ type MabJob struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s MabJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *MabJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -67,9 +82,10 @@ func (s MabJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabJob: %+v", err) } + decoded["jobType"] = "MabJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_vaultjob.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_vaultjob.go index e5aef51bd7b..c9d2e1b953f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_vaultjob.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/model_vaultjob.go @@ -20,15 +20,30 @@ type VaultJob struct { ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` // Fields inherited from Job + ActivityId *string `json:"activityId,omitempty"` BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` EndTime *string `json:"endTime,omitempty"` EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + JobType string `json:"jobType"` Operation *string `json:"operation,omitempty"` StartTime *string `json:"startTime,omitempty"` Status *string `json:"status,omitempty"` } +func (s VaultJob) Job() BaseJobImpl { + return BaseJobImpl{ + ActivityId: s.ActivityId, + BackupManagementType: s.BackupManagementType, + EndTime: s.EndTime, + EntityFriendlyName: s.EntityFriendlyName, + JobType: s.JobType, + Operation: s.Operation, + StartTime: s.StartTime, + Status: s.Status, + } +} + func (o *VaultJob) GetEndTimeAsTime() (*time.Time, error) { if o.EndTime == nil { return nil, nil @@ -64,9 +79,10 @@ func (s VaultJob) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VaultJob: %+v", err) } + decoded["jobType"] = "VaultJob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/version.go index 74cb19fcd0d..9e4c6f1150f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobdetails/version.go @@ -1,12 +1,10 @@ package jobdetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdetails/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobs/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobs/id_vault.go index 730fc6c8ab6..6ed60bb760a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobs/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/jobs/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/jobs/version.go index e54d9be2b4d..9fa2532fa87 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/jobs/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/operation/README.md index ab23c3aae99..0f2bb46cc85 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/operation` Documentation -The `operation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `operation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/constants.go index 6115c6303c6..23a685aa283 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/constants.go @@ -1,6 +1,8 @@ package operation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/id_vault.go index 4ae07d51d6d..5280ab1f7a8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azurefilesharerestorerequest.go index 5a514f78c69..db4906bc43b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azurefilesharerestorerequest.go @@ -19,9 +19,18 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareRestoreRequest{} func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +42,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadpointintimerestorerequest.go index 5ee35cae11d..151dbed826b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadpointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadrestorerequest.go index 585e89976c7..5fe55046185 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadrestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadRestoreRequest{} func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go index f7e6a897e54..0aab6e728c2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 112bd3a5e26..cf33fa588c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,9 +24,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -38,9 +47,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorerequest.go index 602e01fc927..94a74050cf7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go index 893d779276c..3188bc547b0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go index 5292a6a7515..ac99c3316c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index a945ba6e041..b00fdea950a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,9 +27,18 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -41,9 +50,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorerequest.go index 061204b5db9..ac2c490d397 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorerequest.go @@ -25,9 +25,18 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { @@ -39,9 +48,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go index 9397507ba54..941f53d1277 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorerequest.go index 33fe3960a39..b949f5784b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorerequest.go @@ -38,9 +38,18 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreRequest{} func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { @@ -52,9 +61,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go index c0f0ef8274c..b9a50095b8f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,9 +39,18 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -53,9 +62,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_restorerequest.go index 80db41827d3..a4d7ba6e4f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_restorerequest.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +158,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateiaasvmrestoreoperationrequest.go index 1e08498a231..e0f79309c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequest.go index 7b2def35886..41ea197d914 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequestresource.go index 2c0371a7699..d2007792c41 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validaterestoreoperationrequest.go index 5fe10835e45..65695e68e95 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/operation/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/operation/version.go index e5ca752ef35..21c41ad0276 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/operation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/operation/version.go @@ -1,12 +1,10 @@ package operation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operation/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/README.md index 906e0d4a046..573edd0c64c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection` Documentation -The `privateendpointconnection` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/constants.go index 656d9100fa4..1b184d21326 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/constants.go @@ -1,6 +1,8 @@ package privateendpointconnection -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/id_privateendpointconnection.go index 17d1dcf18e4..f120b79e7f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/version.go index c706633cdb1..74a6916a325 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/privateendpointconnection/version.go @@ -1,12 +1,10 @@ package privateendpointconnection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnection/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/README.md index 3a32e193ab3..16db6eed9ea 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers` Documentation -The `protectablecontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `protectablecontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/constants.go index 7d347c78755..0f5cac0dec3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/constants.go @@ -1,6 +1,8 @@ package protectablecontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/id_backupfabric.go index 34e69409306..e763b8a8878 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go index 138e03f203a..21518eff5f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurestorageprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureStorageProtectableContainer{} type AzureStorageProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureStorageProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureStorageProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go index ea902c91b28..10ed7c1a1fe 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_azurevmappcontainerprotectablecontainer.go @@ -13,10 +13,22 @@ var _ ProtectableContainer = AzureVMAppContainerProtectableContainer{} type AzureVMAppContainerProtectableContainer struct { // Fields inherited from ProtectableContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ContainerId *string `json:"containerId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s AzureVMAppContainerProtectableContainer) ProtectableContainer() BaseProtectableContainerImpl { + return BaseProtectableContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerId: s.ContainerId, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableContainerType: s.ProtectableContainerType, + } } var _ json.Marshaler = AzureVMAppContainerProtectableContainer{} @@ -30,9 +42,10 @@ func (s AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectableContainer: %+v", err) } + decoded["protectableContainerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainer.go index 52366aa9b98..e07fa7ea5d9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainer.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectableContainer interface { + ProtectableContainer() BaseProtectableContainerImpl } -// RawProtectableContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectableContainer = BaseProtectableContainerImpl{} + +type BaseProtectableContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerId *string `json:"containerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType"` +} + +func (s BaseProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s +} + +var _ ProtectableContainer = RawProtectableContainerImpl{} + +// RawProtectableContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectableContainerImpl struct { - Type string - Values map[string]interface{} + protectableContainer BaseProtectableContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectableContainerImpl) ProtectableContainer() BaseProtectableContainerImpl { + return s.protectableContainer } -func unmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { +func UnmarshalProtectableContainerImplementation(input []byte) (ProtectableContainer, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalProtectableContainerImplementation(input []byte) (ProtectableConta return out, nil } - out := RawProtectableContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectableContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectableContainerImpl: %+v", err) } - return out, nil + + return RawProtectableContainerImpl{ + protectableContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainerresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainerresource.go index c4d67d07b27..371bd36e915 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/model_protectablecontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectableContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectableContainerImplementation(v) + impl, err := UnmarshalProtectableContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectableContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/version.go index 3d299a2b44f..1ddfb9bc93b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectablecontainers/version.go @@ -1,12 +1,10 @@ package protectablecontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectablecontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectablecontainers/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/README.md index faacc8e4479..3b3f51112d2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems` Documentation -The `protecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `protecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/constants.go index 622b31da48b..0c22907b02d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/constants.go @@ -1,6 +1,8 @@ package protecteditems -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/id_protecteditem.go index 712e70d39b3..b240e10fbc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurefileshareprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurefileshareprotecteditem.go index 4a8bcc205f7..36b804d722b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurefileshareprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurefileshareprotecteditem.go @@ -23,6 +23,7 @@ type AzureFileshareProtectedItem struct { ProtectionStatus *string `json:"protectionStatus,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type AzureFileshareProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type AzureFileshareProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureFileshareProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureFileshareProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileshareProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureFileShareProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go index b51e15f7de7..71f9f7319c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasclassiccomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSClassicComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSClassicComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSClassicComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go index 154e875f0d8..91542143116 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaascomputevmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSComputeVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSComputeVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSComputeVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSComputeVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSComputeVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasvmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasvmprotecteditem.go index a328c909a54..950049ff22f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasvmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azureiaasvmprotecteditem.go @@ -28,6 +28,7 @@ type AzureIaaSVMProtectedItem struct { VirtualMachineId *string `json:"virtualMachineId,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -41,6 +42,7 @@ type AzureIaaSVMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -48,6 +50,30 @@ type AzureIaaSVMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureIaaSVMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureIaaSVMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -83,9 +109,10 @@ func (s AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureIaaSVMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azuresqlprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azuresqlprotecteditem.go index 1af6fd59264..3b176f0a73c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azuresqlprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azuresqlprotecteditem.go @@ -19,6 +19,7 @@ type AzureSqlProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -32,6 +33,7 @@ type AzureSqlProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -39,6 +41,30 @@ type AzureSqlProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureSqlProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureSqlProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -74,9 +100,10 @@ func (s AzureSqlProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectedItem: %+v", err) } + decoded["protectedItemType"] = "Microsoft.Sql/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadprotecteditem.go index 234b099a17b..a889509458c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go index f2756534346..65e48faa727 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsapasedatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPAseDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go index deb8fd3e6e2..12597520489 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go index b055967910f..b50285a2eb0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsaphanadbinstanceprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSAPHanaDBInstanceProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go index 8a644318f7a..a801c724049 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_azurevmworkloadsqldatabaseprotecteditem.go @@ -30,6 +30,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { ServerName *string `json:"serverName,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -43,6 +44,7 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -50,6 +52,30 @@ type AzureVMWorkloadSQLDatabaseProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s AzureVMWorkloadSQLDatabaseProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *AzureVMWorkloadSQLDatabaseProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -85,9 +111,10 @@ func (s AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadSQLDatabaseProtectedItem: %+v", err) } + decoded["protectedItemType"] = "AzureVmWorkloadSQLDatabase" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_dpmprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_dpmprotecteditem.go index eb37672a633..24530746968 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_dpmprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_dpmprotecteditem.go @@ -20,6 +20,7 @@ type DPMProtectedItem struct { ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -33,6 +34,7 @@ type DPMProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -40,6 +42,30 @@ type DPMProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s DPMProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *DPMProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -75,9 +101,10 @@ func (s DPMProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DPMProtectedItem: %+v", err) } + decoded["protectedItemType"] = "DPMProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_genericprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_genericprotecteditem.go index b3bc228cfd9..744e5f75787 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_genericprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_genericprotecteditem.go @@ -22,6 +22,7 @@ type GenericProtectedItem struct { SourceAssociations *map[string]string `json:"sourceAssociations,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -35,6 +36,7 @@ type GenericProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -42,6 +44,30 @@ type GenericProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s GenericProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *GenericProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -77,9 +103,10 @@ func (s GenericProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectedItem: %+v", err) } + decoded["protectedItemType"] = "GenericProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_mabfilefolderprotecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_mabfilefolderprotecteditem.go index 5e1cd167706..4ab12dcc9bc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_mabfilefolderprotecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_mabfilefolderprotecteditem.go @@ -23,6 +23,7 @@ type MabFileFolderProtectedItem struct { ProtectionState *string `json:"protectionState,omitempty"` // Fields inherited from ProtectedItem + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` BackupSetName *string `json:"backupSetName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -36,6 +37,7 @@ type MabFileFolderProtectedItem struct { LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` PolicyId *string `json:"policyId,omitempty"` PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` SourceResourceId *string `json:"sourceResourceId,omitempty"` @@ -43,6 +45,30 @@ type MabFileFolderProtectedItem struct { WorkloadType *DataSourceType `json:"workloadType,omitempty"` } +func (s MabFileFolderProtectedItem) ProtectedItem() BaseProtectedItemImpl { + return BaseProtectedItemImpl{ + BackupManagementType: s.BackupManagementType, + BackupSetName: s.BackupSetName, + ContainerName: s.ContainerName, + CreateMode: s.CreateMode, + DeferredDeleteTimeInUTC: s.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: s.DeferredDeleteTimeRemaining, + IsArchiveEnabled: s.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: s.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: s.IsRehydrate, + IsScheduledForDeferredDelete: s.IsScheduledForDeferredDelete, + LastRecoveryPoint: s.LastRecoveryPoint, + PolicyId: s.PolicyId, + PolicyName: s.PolicyName, + ProtectedItemType: s.ProtectedItemType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: s.SoftDeleteRetentionPeriodInDays, + SourceResourceId: s.SourceResourceId, + VaultId: s.VaultId, + WorkloadType: s.WorkloadType, + } +} + func (o *MabFileFolderProtectedItem) GetDeferredDeleteTimeInUTCAsTime() (*time.Time, error) { if o.DeferredDeleteTimeInUTC == nil { return nil, nil @@ -78,9 +104,10 @@ func (s MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabFileFolderProtectedItem: %+v", err) } + decoded["protectedItemType"] = "MabFileFolderProtectedItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditem.go index ffceef4149c..c26550bed7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditem.go @@ -10,18 +10,53 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectedItem interface { + ProtectedItem() BaseProtectedItemImpl } -// RawProtectedItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectedItem = BaseProtectedItemImpl{} + +type BaseProtectedItemImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + BackupSetName *string `json:"backupSetName,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DeferredDeleteTimeInUTC *string `json:"deferredDeleteTimeInUTC,omitempty"` + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + IsRehydrate *bool `json:"isRehydrate,omitempty"` + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + LastRecoveryPoint *string `json:"lastRecoveryPoint,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + PolicyName *string `json:"policyName,omitempty"` + ProtectedItemType string `json:"protectedItemType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` + SoftDeleteRetentionPeriodInDays *int64 `json:"softDeleteRetentionPeriodInDays,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + VaultId *string `json:"vaultId,omitempty"` + WorkloadType *DataSourceType `json:"workloadType,omitempty"` +} + +func (s BaseProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s +} + +var _ ProtectedItem = RawProtectedItemImpl{} + +// RawProtectedItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectedItemImpl struct { - Type string - Values map[string]interface{} + protectedItem BaseProtectedItemImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectedItemImpl) ProtectedItem() BaseProtectedItemImpl { + return s.protectedItem } -func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { +func UnmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { if input == nil { return nil, nil } @@ -140,10 +175,15 @@ func unmarshalProtectedItemImplementation(input []byte) (ProtectedItem, error) { return out, nil } - out := RawProtectedItemImpl{ - Type: value, - Values: temp, + var parent BaseProtectedItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectedItemImpl: %+v", err) } - return out, nil + + return RawProtectedItemImpl{ + protectedItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditemresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditemresource.go index 0541c1a67ba..d0a51570eef 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditemresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/model_protecteditemresource.go @@ -40,7 +40,7 @@ func (s *ProtectedItemResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectedItemImplementation(v) + impl, err := UnmarshalProtectedItemImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectedItemResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/version.go index bd1522b6580..bbf6040b2f0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protecteditems/version.go @@ -1,12 +1,10 @@ package protecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protecteditems/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/README.md index 53ba775f84d..08957c9919b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers` Documentation -The `protectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `protectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/constants.go index db706b5bd09..db87464f467 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/constants.go @@ -1,6 +1,8 @@ package protectioncontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_backupfabric.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_backupfabric.go index 8dc1cddbb0b..fff879c4d6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_backupfabric.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_backupfabric.go @@ -44,7 +44,7 @@ func ParseBackupFabricID(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupFabricIDInsensitively(input string) (*BackupFabricId, error) { } id := BackupFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_protectioncontainer.go index b4f359ca4f1..9280bfdac05 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/id_protectioncontainer.go @@ -46,7 +46,7 @@ func ParseProtectionContainerID(input string) (*ProtectionContainerId, error) { } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProtectionContainerIDInsensitively(input string) (*ProtectionContainer } id := ProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurebackupservercontainer.go index 1c21d8906f9..de130810d4b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go index b8a8c17717e..02f526ea4c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go index c66beff2ce0..69100565bb9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index 7e0a1ed3e94..1bcd09cb31c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlcontainer.go index cd29b673055..5b3f7a89b2f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurestoragecontainer.go index fc4de5fe940..bd5b7e940c4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go index 97d2dbf49f8..42f2ac47f42 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureworkloadcontainer.go index 79290339156..cac8bf741f8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_dpmcontainer.go index d35b9a9844d..0ba451153f2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_genericcontainer.go index 45b661347c1..df2338f2c31 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_iaasvmcontainer.go index e0a2bd35149..7d94a3c7169 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_mabcontainer.go index b2d5eb97307..d931c212b3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainer.go index 1ba03b16172..1a5f64553a2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainerresource.go index 4de75e08602..cd2e9ab9644 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/version.go index c114ff799f3..67cd8dd6768 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectioncontainers/version.go @@ -1,12 +1,10 @@ package protectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectioncontainers/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/README.md index 5e407187a06..5a3ad2eddbf 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent` Documentation -The `protectionintent` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `protectionintent` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/constants.go index 2d2e274187f..5b115e24a59 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/constants.go @@ -1,6 +1,8 @@ package protectionintent -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_backupprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_backupprotectionintent.go index d7831d6c089..9b36e80c67e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_backupprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_backupprotectionintent.go @@ -46,7 +46,7 @@ func ParseBackupProtectionIntentID(input string) (*BackupProtectionIntentId, err } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBackupProtectionIntentIDInsensitively(input string) (*BackupProtection } id := BackupProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_location.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_location.go index 2b562193f43..a4d3947bd00 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_location.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go index 06a58c50499..7d06a8fd30b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azurerecoveryservicevaultprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureRecoveryServiceVaultProtectionIntent{} type AzureRecoveryServiceVaultProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureRecoveryServiceVaultProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureRecoveryServiceVaultProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureRecoveryServiceVaultProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "RecoveryServiceVaultItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureresourceprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureresourceprotectionintent.go index 6a274d6f965..a757f8703aa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureresourceprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureresourceprotectionintent.go @@ -14,11 +14,24 @@ type AzureResourceProtectionIntent struct { FriendlyName *string `json:"friendlyName,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureResourceProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureResourceProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureResourceItem" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadautoprotectionintent.go index c3bd647eb31..013e10d9ec6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadAutoProtectionIntent{} type AzureWorkloadAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go index 392bf620c14..c26eec72d7e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadcontainerautoprotectionintent.go @@ -13,11 +13,24 @@ var _ ProtectionIntent = AzureWorkloadContainerAutoProtectionIntent{} type AzureWorkloadContainerAutoProtectionIntent struct { // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadContainerAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadContainerAutoProtectionIntent{} @@ -31,9 +44,10 @@ func (s AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainerAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadContainerAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go index c794a5ef4db..57b98ad3c99 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_azureworkloadsqlautoprotectionintent.go @@ -14,11 +14,24 @@ type AzureWorkloadSQLAutoProtectionIntent struct { WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` // Fields inherited from ProtectionIntent - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - ItemId *string `json:"itemId,omitempty"` - PolicyId *string `json:"policyId,omitempty"` - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - SourceResourceId *string `json:"sourceResourceId,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s AzureWorkloadSQLAutoProtectionIntent) ProtectionIntent() BaseProtectionIntentImpl { + return BaseProtectionIntentImpl{ + BackupManagementType: s.BackupManagementType, + ItemId: s.ItemId, + PolicyId: s.PolicyId, + ProtectionIntentItemType: s.ProtectionIntentItemType, + ProtectionState: s.ProtectionState, + SourceResourceId: s.SourceResourceId, + } } var _ json.Marshaler = AzureWorkloadSQLAutoProtectionIntent{} @@ -32,9 +45,10 @@ func (s AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLAutoProtectionIntent: %+v", err) } + decoded["protectionIntentItemType"] = "AzureWorkloadSQLAutoProtectionIntent" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintent.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintent.go index a7fa1d6491f..243b6fee672 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintent.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintent.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionIntent interface { + ProtectionIntent() BaseProtectionIntentImpl } -// RawProtectionIntentImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionIntent = BaseProtectionIntentImpl{} + +type BaseProtectionIntentImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ItemId *string `json:"itemId,omitempty"` + PolicyId *string `json:"policyId,omitempty"` + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType"` + ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +func (s BaseProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s +} + +var _ ProtectionIntent = RawProtectionIntentImpl{} + +// RawProtectionIntentImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionIntentImpl struct { - Type string - Values map[string]interface{} + protectionIntent BaseProtectionIntentImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionIntentImpl) ProtectionIntent() BaseProtectionIntentImpl { + return s.protectionIntent } -func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { +func UnmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, error) { if input == nil { return nil, nil } @@ -76,10 +98,15 @@ func unmarshalProtectionIntentImplementation(input []byte) (ProtectionIntent, er return out, nil } - out := RawProtectionIntentImpl{ - Type: value, - Values: temp, + var parent BaseProtectionIntentImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionIntentImpl: %+v", err) } - return out, nil + + return RawProtectionIntentImpl{ + protectionIntent: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintentresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintentresource.go index bff822af9f5..3d714f2ecd2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintentresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/model_protectionintentresource.go @@ -40,7 +40,7 @@ func (s *ProtectionIntentResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionIntentImplementation(v) + impl, err := UnmarshalProtectionIntentImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionIntentResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/version.go index 548d8c97f0a..ccd78eef1de 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionintent/version.go @@ -1,12 +1,10 @@ package protectionintent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionintent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionintent/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/README.md index 6602d267f38..f4ed09751c0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies` Documentation -The `protectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `protectionpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/constants.go index 0b1721c13dc..d3b05f5ef64 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/constants.go @@ -1,6 +1,8 @@ package protectionpolicies -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/id_backuppolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/id_backuppolicy.go index 5a01b232288..d5b7ff29851 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/id_backuppolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/id_backuppolicy.go @@ -44,7 +44,7 @@ func ParseBackupPolicyID(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupPolicyIDInsensitively(input string) (*BackupPolicyId, error) { } id := BackupPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go index 90fb6638062..ed5609991af 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurefileshareprotectionpolicy.go @@ -18,10 +18,20 @@ type AzureFileShareProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareProtectionPolicy{} func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -33,9 +43,10 @@ func (s AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureStorage" encoded, err = json.Marshal(decoded) @@ -55,6 +66,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureFileShareProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests s.TimeZone = decoded.TimeZone @@ -67,7 +79,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } @@ -75,7 +87,7 @@ func (s *AzureFileShareProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureFileShareProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go index cec013785db..6b1f73c9dea 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azureiaasvmprotectionpolicy.go @@ -21,10 +21,20 @@ type AzureIaaSVMProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureIaaSVMProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureIaaSVMProtectionPolicy{} func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -36,9 +46,10 @@ func (s AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSVMProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureIaasVM" encoded, err = json.Marshal(decoded) @@ -58,6 +69,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureIaaSVMProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.InstantRPDetails = decoded.InstantRPDetails s.InstantRpRetentionRangeInDays = decoded.InstantRpRetentionRangeInDays s.PolicyType = decoded.PolicyType @@ -73,7 +85,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } @@ -81,7 +93,7 @@ func (s *AzureIaaSVMProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'AzureIaaSVMProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go index 5a691310aaf..309512d31d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azuresqlprotectionpolicy.go @@ -14,10 +14,20 @@ type AzureSqlProtectionPolicy struct { RetentionPolicy RetentionPolicy `json:"retentionPolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureSqlProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureSqlProtectionPolicy{} func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -29,9 +39,10 @@ func (s AzureSqlProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureSql" encoded, err = json.Marshal(decoded) @@ -51,6 +62,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into AzureSqlProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -60,7 +72,7 @@ func (s *AzureSqlProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'AzureSqlProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go index 4ad1179dc7c..312859e45fa 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_azurevmworkloadprotectionpolicy.go @@ -17,10 +17,20 @@ type AzureVMWorkloadProtectionPolicy struct { WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureVMWorkloadProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureVMWorkloadProtectionPolicy{} func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -32,9 +42,10 @@ func (s AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMWorkloadProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "AzureWorkload" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_genericprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_genericprotectionpolicy.go index c893e4e8051..19ef2176821 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_genericprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_genericprotectionpolicy.go @@ -16,10 +16,20 @@ type GenericProtectionPolicy struct { TimeZone *string `json:"timeZone,omitempty"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s GenericProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = GenericProtectionPolicy{} func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s GenericProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "GenericProtectionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_logschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_logschedulepolicy.go index 8f2cae11901..d7be5540a0d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_logschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_logschedulepolicy.go @@ -14,6 +14,14 @@ type LogSchedulePolicy struct { ScheduleFrequencyInMins *int64 `json:"scheduleFrequencyInMins,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LogSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LogSchedulePolicy{} @@ -27,9 +35,10 @@ func (s LogSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LogSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermretentionpolicy.go index 50f80900d4e..370051cc454 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermretentionpolicy.go @@ -17,6 +17,14 @@ type LongTermRetentionPolicy struct { YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s LongTermRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = LongTermRetentionPolicy{} @@ -30,9 +38,10 @@ func (s LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "LongTermRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermschedulepolicy.go index 06d19a60ab2..0a582bff60a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_longtermschedulepolicy.go @@ -13,6 +13,14 @@ var _ SchedulePolicy = LongTermSchedulePolicy{} type LongTermSchedulePolicy struct { // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s LongTermSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = LongTermSchedulePolicy{} @@ -26,9 +34,10 @@ func (s LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LongTermSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "LongTermSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_mabprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_mabprotectionpolicy.go index 4178653c4e6..adbc5f52631 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_mabprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_mabprotectionpolicy.go @@ -15,10 +15,20 @@ type MabProtectionPolicy struct { SchedulePolicy SchedulePolicy `json:"schedulePolicy"` // Fields inherited from ProtectionPolicy + + BackupManagementType string `json:"backupManagementType"` ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s MabProtectionPolicy) ProtectionPolicy() BaseProtectionPolicyImpl { + return BaseProtectionPolicyImpl{ + BackupManagementType: s.BackupManagementType, + ProtectedItemsCount: s.ProtectedItemsCount, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = MabProtectionPolicy{} func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s MabProtectionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabProtectionPolicy: %+v", err) } + decoded["backupManagementType"] = "MAB" encoded, err = json.Marshal(decoded) @@ -52,6 +63,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into MabProtectionPolicy: %+v", err) } + s.BackupManagementType = decoded.BackupManagementType s.ProtectedItemsCount = decoded.ProtectedItemsCount s.ResourceGuardOperationRequests = decoded.ResourceGuardOperationRequests @@ -61,7 +73,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'MabProtectionPolicy': %+v", err) } @@ -69,7 +81,7 @@ func (s *MabProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'MabProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicy.go index 7d850fa25bd..424f4e1cbb4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicy.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionPolicy interface { + ProtectionPolicy() BaseProtectionPolicyImpl } -// RawProtectionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionPolicy = BaseProtectionPolicyImpl{} + +type BaseProtectionPolicyImpl struct { + BackupManagementType string `json:"backupManagementType"` + ProtectedItemsCount *int64 `json:"protectedItemsCount,omitempty"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s +} + +var _ ProtectionPolicy = RawProtectionPolicyImpl{} + +// RawProtectionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionPolicyImpl struct { - Type string - Values map[string]interface{} + protectionPolicy BaseProtectionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionPolicyImpl) ProtectionPolicy() BaseProtectionPolicyImpl { + return s.protectionPolicy } -func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { +func UnmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, error) { if input == nil { return nil, nil } @@ -84,10 +103,15 @@ func unmarshalProtectionPolicyImplementation(input []byte) (ProtectionPolicy, er return out, nil } - out := RawProtectionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseProtectionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionPolicyImpl: %+v", err) } - return out, nil + + return RawProtectionPolicyImpl{ + protectionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicyresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicyresource.go index 03bda4d0a12..4f8985b7fe9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicyresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_protectionpolicyresource.go @@ -40,7 +40,7 @@ func (s *ProtectionPolicyResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionPolicyImplementation(v) + impl, err := UnmarshalProtectionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionPolicyResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_retentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_retentionpolicy.go index fa52632f677..d878cd5c80c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_retentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_retentionpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RetentionPolicy interface { + RetentionPolicy() BaseRetentionPolicyImpl } -// RawRetentionPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RetentionPolicy = BaseRetentionPolicyImpl{} + +type BaseRetentionPolicyImpl struct { + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s BaseRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s +} + +var _ RetentionPolicy = RawRetentionPolicyImpl{} + +// RawRetentionPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRetentionPolicyImpl struct { - Type string - Values map[string]interface{} + retentionPolicy BaseRetentionPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawRetentionPolicyImpl) RetentionPolicy() BaseRetentionPolicyImpl { + return s.retentionPolicy } -func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { +func UnmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRetentionPolicyImplementation(input []byte) (RetentionPolicy, erro return out, nil } - out := RawRetentionPolicyImpl{ - Type: value, - Values: temp, + var parent BaseRetentionPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRetentionPolicyImpl: %+v", err) } - return out, nil + + return RawRetentionPolicyImpl{ + retentionPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_schedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_schedulepolicy.go index 6f395ac7fc7..ce6760700f6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_schedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_schedulepolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SchedulePolicy interface { + SchedulePolicy() BaseSchedulePolicyImpl } -// RawSchedulePolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SchedulePolicy = BaseSchedulePolicyImpl{} + +type BaseSchedulePolicyImpl struct { + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s BaseSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s +} + +var _ SchedulePolicy = RawSchedulePolicyImpl{} + +// RawSchedulePolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSchedulePolicyImpl struct { - Type string - Values map[string]interface{} + schedulePolicy BaseSchedulePolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawSchedulePolicyImpl) SchedulePolicy() BaseSchedulePolicyImpl { + return s.schedulePolicy } -func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { +func UnmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSchedulePolicyImplementation(input []byte) (SchedulePolicy, error) return out, nil } - out := RawSchedulePolicyImpl{ - Type: value, - Values: temp, + var parent BaseSchedulePolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSchedulePolicyImpl: %+v", err) } - return out, nil + + return RawSchedulePolicyImpl{ + schedulePolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleretentionpolicy.go index 37edb09a956..8481b97b705 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleretentionpolicy.go @@ -14,6 +14,14 @@ type SimpleRetentionPolicy struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` // Fields inherited from RetentionPolicy + + RetentionPolicyType string `json:"retentionPolicyType"` +} + +func (s SimpleRetentionPolicy) RetentionPolicy() BaseRetentionPolicyImpl { + return BaseRetentionPolicyImpl{ + RetentionPolicyType: s.RetentionPolicyType, + } } var _ json.Marshaler = SimpleRetentionPolicy{} @@ -27,9 +35,10 @@ func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleRetentionPolicy: %+v", err) } + decoded["retentionPolicyType"] = "SimpleRetentionPolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicy.go index 117247120b6..004acc231d5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicy.go @@ -18,6 +18,14 @@ type SimpleSchedulePolicy struct { ScheduleWeeklyFrequency *int64 `json:"scheduleWeeklyFrequency,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicy) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicy{} @@ -31,9 +39,10 @@ func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicy: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicy" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicyv2.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicyv2.go index f522d8d7184..5d4f403ffb2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicyv2.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_simpleschedulepolicyv2.go @@ -17,6 +17,14 @@ type SimpleSchedulePolicyV2 struct { WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` // Fields inherited from SchedulePolicy + + SchedulePolicyType string `json:"schedulePolicyType"` +} + +func (s SimpleSchedulePolicyV2) SchedulePolicy() BaseSchedulePolicyImpl { + return BaseSchedulePolicyImpl{ + SchedulePolicyType: s.SchedulePolicyType, + } } var _ json.Marshaler = SimpleSchedulePolicyV2{} @@ -30,9 +38,10 @@ func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SimpleSchedulePolicyV2: %+v", err) } + decoded["schedulePolicyType"] = "SimpleSchedulePolicyV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_subprotectionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_subprotectionpolicy.go index f8d86c15304..c6420222281 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_subprotectionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_subprotectionpolicy.go @@ -35,7 +35,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["retentionPolicy"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RetentionPolicy' for 'SubProtectionPolicy': %+v", err) } @@ -43,7 +43,7 @@ func (s *SubProtectionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["schedulePolicy"]; ok { - impl, err := unmarshalSchedulePolicyImplementation(v) + impl, err := UnmarshalSchedulePolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SchedulePolicy' for 'SubProtectionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_vaultretentionpolicy.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_vaultretentionpolicy.go index 51b77729f01..76c5b8cedb8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_vaultretentionpolicy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/model_vaultretentionpolicy.go @@ -30,7 +30,7 @@ func (s *VaultRetentionPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["vaultRetention"]; ok { - impl, err := unmarshalRetentionPolicyImplementation(v) + impl, err := UnmarshalRetentionPolicyImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'VaultRetention' for 'VaultRetentionPolicy': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/version.go index ab2d4c778fb..c5e2f1a1b2b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/protectionpolicies/version.go @@ -1,12 +1,10 @@ package protectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/protectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/protectionpolicies/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/README.md index 9ce342d3483..adfed25e478 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint` Documentation -The `recoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `recoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/constants.go index 90fc0ec9fcd..9c8da179e39 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/constants.go @@ -1,6 +1,8 @@ package recoverypoint -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/id_recoverypoint.go index f96affc2e8b..332c68b534d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/version.go index 6dd0d8881d3..6c623138462 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoint/version.go @@ -1,12 +1,10 @@ package recoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoint/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/README.md index bd10d813570..29233912c18 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/constants.go index fa65db6e0e8..5f51946c1d2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/constants.go @@ -1,6 +1,8 @@ package recoverypoints -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_protecteditem.go index ef1302a98e2..aa3bded3b5b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_recoverypoint.go index e180c744612..a77479833c5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azurefilesharerecoverypoint.go index 2a7c237f200..9c6d8e1fff7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go index a36ed7d5894..3dfada645a6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadrecoverypoint.go index a060d0325a6..c8130692c90 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go index ba3317831d8..f506c124c38 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go index 3cc6563ceee..923688f5266 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go index 0e54dcb88e5..f513a0708c9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go index e4c16a37cbf..d929dddcdea 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_genericrecoverypoint.go index 97d3952dc2c..c042f5d3458 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_iaasvmrecoverypoint.go index dbd1d19b002..ec166e8cd93 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypoint.go index cb819e0f9c5..56c8811cab9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypointresource.go index 8e67217424b..01ff12122b5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/version.go index 0a6ee560dd4..e58056cc4f2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/README.md index 8fce050b309..939ce777bc5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove` Documentation -The `recoverypointsrecommendedformove` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `recoverypointsrecommendedformove` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/constants.go index e2e55355df0..fb82375e57a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/constants.go @@ -1,6 +1,8 @@ package recoverypointsrecommendedformove -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/id_protecteditem.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/id_protecteditem.go index a027aaa0b71..d540ba94bf2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/id_protecteditem.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/id_protecteditem.go @@ -48,7 +48,7 @@ func ParseProtectedItemID(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProtectedItemIDInsensitively(input string) (*ProtectedItemId, error) { } id := ProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go index 3654d6b1bf1..30e5b883f9a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azurefilesharerecoverypoint.go @@ -18,6 +18,14 @@ type AzureFileShareRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureFileShareRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureFileShareRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureFileShareRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go index 4b477077a01..c03b22f00e3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadpointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go index 6c7e5f6b958..9d2d7ab7f51 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadrecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go index 801a86e29aa..9656d66df24 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanapointintimerecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go index 4ca5f3470d3..e0f1dcb3628 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsaphanarecoverypoint.go @@ -18,6 +18,14 @@ type AzureWorkloadSAPHanaRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSAPHanaRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSAPHanaRecoveryPoint{} @@ -31,9 +39,10 @@ func (s AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go index e5030f32945..0a959291b09 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlpointintimerecoverypoint.go @@ -20,6 +20,14 @@ type AzureWorkloadSQLPointInTimeRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLPointInTimeRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLPointInTimeRecoveryPoint{} @@ -33,9 +41,10 @@ func (s AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go index 0e441f79cda..007f0e44d47 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_azureworkloadsqlrecoverypoint.go @@ -19,6 +19,14 @@ type AzureWorkloadSQLRecoveryPoint struct { Type *RestorePointType `json:"type,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s AzureWorkloadSQLRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = AzureWorkloadSQLRecoveryPoint{} @@ -32,9 +40,10 @@ func (s AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRecoveryPoint: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go index 040a2cf2cc1..9d60f19a2cb 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_genericrecoverypoint.go @@ -18,6 +18,14 @@ type GenericRecoveryPoint struct { RecoveryPointType *string `json:"recoveryPointType,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s GenericRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = GenericRecoveryPoint{} @@ -31,9 +39,10 @@ func (s GenericRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericRecoveryPoint: %+v", err) } + decoded["objectType"] = "GenericRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go index 12aa7a9b66b..4bc19438a4e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_iaasvmrecoverypoint.go @@ -34,6 +34,14 @@ type IaasVMRecoveryPoint struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RecoveryPoint + + ObjectType string `json:"objectType"` +} + +func (s IaasVMRecoveryPoint) RecoveryPoint() BaseRecoveryPointImpl { + return BaseRecoveryPointImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = IaasVMRecoveryPoint{} @@ -47,9 +55,10 @@ func (s IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRecoveryPoint: %+v", err) } + decoded["objectType"] = "IaasVMRecoveryPoint" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypoint.go index 7cd17561fd8..bf4d0576a83 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPoint interface { + RecoveryPoint() BaseRecoveryPointImpl } -// RawRecoveryPointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPoint = BaseRecoveryPointImpl{} + +type BaseRecoveryPointImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s +} + +var _ RecoveryPoint = RawRecoveryPointImpl{} + +// RawRecoveryPointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPointImpl struct { - Type string - Values map[string]interface{} + recoveryPoint BaseRecoveryPointImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPointImpl) RecoveryPoint() BaseRecoveryPointImpl { + return s.recoveryPoint } -func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { +func UnmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalRecoveryPointImplementation(input []byte) (RecoveryPoint, error) { return out, nil } - out := RawRecoveryPointImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPointImpl: %+v", err) } - return out, nil + + return RawRecoveryPointImpl{ + recoveryPoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go index 26a0bbdce62..18c2e763019 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/model_recoverypointresource.go @@ -40,7 +40,7 @@ func (s *RecoveryPointResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRecoveryPointImplementation(v) + impl, err := UnmarshalRecoveryPointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RecoveryPointResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/version.go index 43d14d320b5..014836f13f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/recoverypointsrecommendedformove/version.go @@ -1,12 +1,10 @@ package recoverypointsrecommendedformove -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypointsrecommendedformove/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypointsrecommendedformove/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/README.md index d65b176c401..85890b5a73b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies` Documentation -The `resourceguardproxies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `resourceguardproxies` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/id_vault.go index 8f516c78ab1..6bc46dbb25a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/version.go index 90519540c49..45090cce2e7 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxies/version.go @@ -1,12 +1,10 @@ package resourceguardproxies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxies/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/README.md index 77735e9796d..5cfcbf51c2f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy` Documentation -The `resourceguardproxy` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `resourceguardproxy` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/id_backupresourceguardproxy.go b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/id_backupresourceguardproxy.go index 889a597614e..9e09ac32710 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/id_backupresourceguardproxy.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/id_backupresourceguardproxy.go @@ -44,7 +44,7 @@ func ParseBackupResourceGuardProxyID(input string) (*BackupResourceGuardProxyId, } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupResourceGuardProxyIDInsensitively(input string) (*BackupResource } id := BackupResourceGuardProxyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/version.go index 8a3e381c024..d1cf0b7a5c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/resourceguardproxy/version.go @@ -1,12 +1,10 @@ package resourceguardproxy -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceguardproxy/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceguardproxy/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/restores/README.md index 5e7bc04ae81..e4d45d80a57 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/restores` Documentation -The `restores` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `restores` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/constants.go index 2bbf6f4139c..57a0db7b579 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/constants.go @@ -1,6 +1,8 @@ package restores -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/id_recoverypoint.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/id_recoverypoint.go index 851a22454ae..4069853e54a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/id_recoverypoint.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azurefilesharerestorerequest.go index 40acdf5995f..26331ae6957 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azurefilesharerestorerequest.go @@ -19,9 +19,18 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareRestoreRequest{} func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +42,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadpointintimerestorerequest.go index ee85da2f449..6634b8fe275 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadpointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadrestorerequest.go index 9eba6b70c3a..cda3c7d97fb 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadrestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadRestoreRequest{} func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go index 3dbe408063d..a927f196d4f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 0a94947905f..ffe2aca7c57 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,9 +24,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -38,9 +47,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorerequest.go index 3b698e8c8ed..52a8f3e28f4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go index ed5905b7426..1eef91bb385 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go index 30372856038..aa7e8105e95 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index b90eb502474..ee708d99b3b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,9 +27,18 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -41,9 +50,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorerequest.go index 4edba1b178b..48575eca7e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorerequest.go @@ -25,9 +25,18 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { @@ -39,9 +48,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go index bb5c079ac11..209f41614eb 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorerequest.go index b5a69cd9395..40102c3cab9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorerequest.go @@ -38,9 +38,18 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreRequest{} func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { @@ -52,9 +61,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go index b9b3aa12ebd..dd6cb2158e9 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_iaasvmrestorewithrehydrationrequest.go @@ -39,9 +39,18 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -53,9 +62,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequest.go index 099b65bab20..378456a21f3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequest.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +158,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequestresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequestresource.go index 47ea43b2a9e..d6a76b130be 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/model_restorerequestresource.go @@ -40,7 +40,7 @@ func (s *RestoreRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'RestoreRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/restores/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/restores/version.go index 3ea6c5071b1..ef8a58963c6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/restores/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/restores/version.go @@ -1,12 +1,10 @@ package restores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restores/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/README.md index 09a1af9f381..dddf32fbe56 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/securitypins` Documentation -The `securitypins` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `securitypins` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/id_vault.go index 5f9d860ae82..c1d94145ea6 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/version.go index 43ad63f287d..efb029f2d5f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/securitypins/version.go @@ -1,12 +1,10 @@ package securitypins -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypins/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitypins/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/README.md index 5b5ea9bdb4d..48271396a64 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers` Documentation -The `softdeletedcontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `softdeletedcontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/constants.go index 66a7b8fc216..b5d5b80be6e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/constants.go @@ -1,6 +1,8 @@ package softdeletedcontainers -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/id_vault.go index b9506bebfc1..29cd9d45f2e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurebackupservercontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurebackupservercontainer.go index 573efc50aa1..a69df42e95d 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurebackupservercontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurebackupservercontainer.go @@ -21,11 +21,24 @@ type AzureBackupServerContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureBackupServerContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureBackupServerContainer{} @@ -39,9 +52,10 @@ func (s AzureBackupServerContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureBackupServerContainer: %+v", err) } + decoded["containerType"] = "AzureBackupServerContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go index 1ffb8ed0e0d..f71ebe1ecbc 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaasclassiccomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSClassicComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSClassicComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSClassicComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSClassicComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.ClassicCompute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go index 24481ef7aeb..b44b93046f3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureiaascomputevmcontainer.go @@ -16,11 +16,24 @@ type AzureIaaSComputeVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureIaaSComputeVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureIaaSComputeVMContainer{} @@ -34,9 +47,10 @@ func (s AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureIaaSComputeVMContainer: %+v", err) } + decoded["containerType"] = "Microsoft.Compute/virtualMachines" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go index e359f39f411..aab5648fb34 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlagworkloadcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureSQLAGWorkloadContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSQLAGWorkloadContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSQLAGWorkloadContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSQLAGWorkloadContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "SQLAGWorkLoadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlcontainer.go index e45c918f9ff..62794d1b909 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azuresqlcontainer.go @@ -13,11 +13,24 @@ var _ ProtectionContainer = AzureSqlContainer{} type AzureSqlContainer struct { // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureSqlContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureSqlContainer{} @@ -31,9 +44,10 @@ func (s AzureSqlContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlContainer: %+v", err) } + decoded["containerType"] = "AzureSqlContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurestoragecontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurestoragecontainer.go index f0c84f07fa1..db8491278c3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurestoragecontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurestoragecontainer.go @@ -18,11 +18,24 @@ type AzureStorageContainer struct { StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureStorageContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureStorageContainer{} @@ -36,9 +49,10 @@ func (s AzureStorageContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageContainer: %+v", err) } + decoded["containerType"] = "StorageContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go index 19bc1ebe0f0..8dad4ff2e28 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azurevmappcontainerprotectioncontainer.go @@ -18,11 +18,24 @@ type AzureVMAppContainerProtectionContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureVMAppContainerProtectionContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureVMAppContainerProtectionContainer{} @@ -36,9 +49,10 @@ func (s AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureVMAppContainerProtectionContainer: %+v", err) } + decoded["containerType"] = "VMAppContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureworkloadcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureworkloadcontainer.go index e89bdafedc4..9004ee18921 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureworkloadcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_azureworkloadcontainer.go @@ -18,11 +18,24 @@ type AzureWorkloadContainer struct { WorkloadType *WorkloadType `json:"workloadType,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s AzureWorkloadContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = AzureWorkloadContainer{} @@ -36,9 +49,10 @@ func (s AzureWorkloadContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadContainer: %+v", err) } + decoded["containerType"] = "AzureWorkloadContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_dpmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_dpmcontainer.go index 349969c7db5..d0c9d4884ea 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_dpmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_dpmcontainer.go @@ -21,11 +21,24 @@ type DpmContainer struct { UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s DpmContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = DpmContainer{} @@ -39,9 +52,10 @@ func (s DpmContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DpmContainer: %+v", err) } + decoded["containerType"] = "DPMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_genericcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_genericcontainer.go index c5e6d8bd349..9c4a0613590 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_genericcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_genericcontainer.go @@ -15,11 +15,24 @@ type GenericContainer struct { FabricName *string `json:"fabricName,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s GenericContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = GenericContainer{} @@ -33,9 +46,10 @@ func (s GenericContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GenericContainer: %+v", err) } + decoded["containerType"] = "GenericContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_iaasvmcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_iaasvmcontainer.go index b8f3da1ebe1..1688f64cf3f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_iaasvmcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_iaasvmcontainer.go @@ -16,11 +16,24 @@ type IaaSVMContainer struct { VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s IaaSVMContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = IaaSVMContainer{} @@ -34,9 +47,10 @@ func (s IaaSVMContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaaSVMContainer: %+v", err) } + decoded["containerType"] = "IaasVMContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_mabcontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_mabcontainer.go index 6a7fcdfdffa..df406541f1b 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_mabcontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_mabcontainer.go @@ -20,11 +20,24 @@ type MabContainer struct { ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` // Fields inherited from ProtectionContainer - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` + + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s MabContainer) ProtectionContainer() BaseProtectionContainerImpl { + return BaseProtectionContainerImpl{ + BackupManagementType: s.BackupManagementType, + ContainerType: s.ContainerType, + FriendlyName: s.FriendlyName, + HealthStatus: s.HealthStatus, + ProtectableObjectType: s.ProtectableObjectType, + RegistrationStatus: s.RegistrationStatus, + } } var _ json.Marshaler = MabContainer{} @@ -38,9 +51,10 @@ func (s MabContainer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MabContainer: %+v", err) } + decoded["containerType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainer.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainer.go index 46f032ed5da..d93a546d00a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainer.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainer.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainer interface { + ProtectionContainer() BaseProtectionContainerImpl } -// RawProtectionContainerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainer = BaseProtectionContainerImpl{} + +type BaseProtectionContainerImpl struct { + BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` + ContainerType ProtectableContainerType `json:"containerType"` + FriendlyName *string `json:"friendlyName,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ProtectableObjectType *string `json:"protectableObjectType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +func (s BaseProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s +} + +var _ ProtectionContainer = RawProtectionContainerImpl{} + +// RawProtectionContainerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerImpl struct { - Type string - Values map[string]interface{} + protectionContainer BaseProtectionContainerImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionContainerImpl) ProtectionContainer() BaseProtectionContainerImpl { + return s.protectionContainer } -func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { +func UnmarshalProtectionContainerImplementation(input []byte) (ProtectionContainer, error) { if input == nil { return nil, nil } @@ -132,10 +154,15 @@ func unmarshalProtectionContainerImplementation(input []byte) (ProtectionContain return out, nil } - out := RawProtectionContainerImpl{ - Type: value, - Values: temp, + var parent BaseProtectionContainerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerImpl: %+v", err) } - return out, nil + + return RawProtectionContainerImpl{ + protectionContainer: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainerresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainerresource.go index 2d5ed02148a..5d66d2a8fcb 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainerresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/model_protectioncontainerresource.go @@ -40,7 +40,7 @@ func (s *ProtectionContainerResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalProtectionContainerImplementation(v) + impl, err := UnmarshalProtectionContainerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ProtectionContainerResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/version.go index 1f4d2ebca30..0f945aaf091 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/softdeletedcontainers/version.go @@ -1,12 +1,10 @@ package softdeletedcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/softdeletedcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/softdeletedcontainers/2024-04-01" } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/README.md b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/README.md index 0efe9c9a59e..e3255ac9604 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/README.md +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation` Documentation -The `validateoperation` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicesbackup` (API Version `2024-04-01`). +The `validateoperation` SDK allows for interaction with Azure Resource Manager `recoveryservicesbackup` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/constants.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/constants.go index 1e9aaff03ed..cbbc4e1670c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/constants.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/constants.go @@ -1,6 +1,8 @@ package validateoperation -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/id_vault.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/id_vault.go index 68ab98ce4de..72df7e68b52 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/id_vault.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azurefilesharerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azurefilesharerestorerequest.go index 59b55a316c0..f5b6c3551e2 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azurefilesharerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azurefilesharerestorerequest.go @@ -19,9 +19,18 @@ type AzureFileShareRestoreRequest struct { TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureFileShareRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureFileShareRestoreRequest{} func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { @@ -33,9 +42,10 @@ func (s AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFileShareRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureFileShareRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go index f21d434d5ef..e495e96b4a5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadpointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadPointInTimeRestoreRequest{} func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadrestorerequest.go index 785256f71e2..d084e2d68e8 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadrestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadRestoreRequest{} func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go index f5caa5525e8..431629e9037 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorerequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go index 6075c6ac44b..fc703d110d4 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanapointintimerestorewithrehydraterequest.go @@ -24,9 +24,18 @@ type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -38,9 +47,10 @@ func (s AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON( } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go index e2bedba14ab..9a04045edc5 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorerequest.go @@ -22,9 +22,18 @@ type AzureWorkloadSAPHanaRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreRequest{} func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { @@ -36,9 +45,10 @@ func (s AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go index ae5f5d5bd38..07a81c26bcd 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsaphanarestorewithrehydraterequest.go @@ -23,9 +23,18 @@ type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -37,9 +46,10 @@ func (s AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSAPHanaRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go index 526c5a93887..5aa091ec43e 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorerequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLPointInTimeRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreRequest{} func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go index 15112f53464..cf33c6bd871 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlpointintimerestorewithrehydraterequest.go @@ -27,9 +27,18 @@ type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -41,9 +50,10 @@ func (s AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([ } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go index 60a30c6fe4d..abd5baf76e0 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorerequest.go @@ -25,9 +25,18 @@ type AzureWorkloadSQLRestoreRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreRequest{} func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { @@ -39,9 +48,10 @@ func (s AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go index 5f0ebfef74b..9624c1d0c0f 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_azureworkloadsqlrestorewithrehydraterequest.go @@ -26,9 +26,18 @@ type AzureWorkloadSQLRestoreWithRehydrateRequest struct { UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails `json:"userAssignedManagedIdentityDetails,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s AzureWorkloadSQLRestoreWithRehydrateRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = AzureWorkloadSQLRestoreWithRehydrateRequest{} func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { @@ -40,9 +49,10 @@ func (s AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureWorkloadSQLRestoreWithRehydrateRequest: %+v", err) } + decoded["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorerequest.go index 390c5d82ec8..81d88980dc3 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorerequest.go @@ -38,9 +38,18 @@ type IaasVMRestoreRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreRequest{} func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { @@ -52,9 +61,10 @@ func (s IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go index 7980f7e5e5d..b5fff836253 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_iaasvmrestorewithrehydrationrequest.go @@ -39,9 +39,18 @@ type IaasVMRestoreWithRehydrationRequest struct { Zones *zones.Schema `json:"zones,omitempty"` // Fields inherited from RestoreRequest + + ObjectType string `json:"objectType"` ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` } +func (s IaasVMRestoreWithRehydrationRequest) RestoreRequest() BaseRestoreRequestImpl { + return BaseRestoreRequestImpl{ + ObjectType: s.ObjectType, + ResourceGuardOperationRequests: s.ResourceGuardOperationRequests, + } +} + var _ json.Marshaler = IaasVMRestoreWithRehydrationRequest{} func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { @@ -53,9 +62,10 @@ func (s IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IaasVMRestoreWithRehydrationRequest: %+v", err) } + decoded["objectType"] = "IaasVMRestoreWithRehydrationRequest" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_restorerequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_restorerequest.go index f4c271d65e1..16c329dc196 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_restorerequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_restorerequest.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RestoreRequest interface { + RestoreRequest() BaseRestoreRequestImpl } -// RawRestoreRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RestoreRequest = BaseRestoreRequestImpl{} + +type BaseRestoreRequestImpl struct { + ObjectType string `json:"objectType"` + ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"` +} + +func (s BaseRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s +} + +var _ RestoreRequest = RawRestoreRequestImpl{} + +// RawRestoreRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRestoreRequestImpl struct { - Type string - Values map[string]interface{} + restoreRequest BaseRestoreRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawRestoreRequestImpl) RestoreRequest() BaseRestoreRequestImpl { + return s.restoreRequest } -func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { +func UnmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) { if input == nil { return nil, nil } @@ -140,10 +158,15 @@ func unmarshalRestoreRequestImplementation(input []byte) (RestoreRequest, error) return out, nil } - out := RawRestoreRequestImpl{ - Type: value, - Values: temp, + var parent BaseRestoreRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRestoreRequestImpl: %+v", err) } - return out, nil + + return RawRestoreRequestImpl{ + restoreRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go index 01dc3ab0f73..b94bc3dcf81 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateiaasvmrestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateIaasVMRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateIaasVMRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateIaasVMRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateIaasVMRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateIaasVMRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateIaasVMRestoreOperationRequest{} func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateIaasVMRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateIaasVMRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateIaasVMRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequest.go index 1874b1156b5..45323fd1d90 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequest.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ValidateOperationRequest interface { + ValidateOperationRequest() BaseValidateOperationRequestImpl } -// RawValidateOperationRequestImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ValidateOperationRequest = BaseValidateOperationRequestImpl{} + +type BaseValidateOperationRequestImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s +} + +var _ ValidateOperationRequest = RawValidateOperationRequestImpl{} + +// RawValidateOperationRequestImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawValidateOperationRequestImpl struct { - Type string - Values map[string]interface{} + validateOperationRequest BaseValidateOperationRequestImpl + Type string + Values map[string]interface{} +} + +func (s RawValidateOperationRequestImpl) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return s.validateOperationRequest } -func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { +func UnmarshalValidateOperationRequestImplementation(input []byte) (ValidateOperationRequest, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalValidateOperationRequestImplementation(input []byte) (ValidateOper return out, nil } - out := RawValidateOperationRequestImpl{ - Type: value, - Values: temp, + var parent BaseValidateOperationRequestImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseValidateOperationRequestImpl: %+v", err) } - return out, nil + + return RawValidateOperationRequestImpl{ + validateOperationRequest: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequestresource.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequestresource.go index d86e4783597..f39bcdcc37a 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequestresource.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validateoperationrequestresource.go @@ -30,7 +30,7 @@ func (s *ValidateOperationRequestResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalValidateOperationRequestImplementation(v) + impl, err := UnmarshalValidateOperationRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ValidateOperationRequestResource': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validaterestoreoperationrequest.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validaterestoreoperationrequest.go index 16aa0307fac..e80d39acb7c 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validaterestoreoperationrequest.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/model_validaterestoreoperationrequest.go @@ -14,6 +14,14 @@ type ValidateRestoreOperationRequest struct { RestoreRequest RestoreRequest `json:"restoreRequest"` // Fields inherited from ValidateOperationRequest + + ObjectType string `json:"objectType"` +} + +func (s ValidateRestoreOperationRequest) ValidateOperationRequest() BaseValidateOperationRequestImpl { + return BaseValidateOperationRequestImpl{ + ObjectType: s.ObjectType, + } } var _ json.Marshaler = ValidateRestoreOperationRequest{} @@ -27,9 +35,10 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValidateRestoreOperationRequest: %+v", err) } + decoded["objectType"] = "ValidateRestoreOperationRequest" encoded, err = json.Marshal(decoded) @@ -43,6 +52,13 @@ func (s ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { var _ json.Unmarshaler = &ValidateRestoreOperationRequest{} func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { + type alias ValidateRestoreOperationRequest + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ValidateRestoreOperationRequest: %+v", err) + } + + s.ObjectType = decoded.ObjectType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -50,7 +66,7 @@ func (s *ValidateRestoreOperationRequest) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["restoreRequest"]; ok { - impl, err := unmarshalRestoreRequestImplementation(v) + impl, err := UnmarshalRestoreRequestImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RestoreRequest' for 'ValidateRestoreOperationRequest': %+v", err) } diff --git a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/version.go b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/version.go index c1aab434bd3..6c8e73a5913 100644 --- a/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/version.go +++ b/resource-manager/recoveryservicesbackup/2024-04-01/validateoperation/version.go @@ -1,12 +1,10 @@ package validateoperation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validateoperation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/validateoperation/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/README.md index 8499b1263fd..8cb266c1a1c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/version.go index 3af650f2799..b0b81cc0bda 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/README.md index ead71e014eb..1d6f3d2946a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/version.go index f6c5f3c5969..3098aafacfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/README.md index dd0d15d3f48..7c7e64776d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/version.go index 70ecb3d5571..6a691a02c7a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/README.md index 99da0da2591..14beff7dad8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/version.go index 43aeaeb394c..d9278b2cb55 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/README.md index f417dc7a3fe..d16ce9aab7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/version.go index a346fcba6be..3e090a78bbd 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/README.md index 644d368d72c..55bdcdc58ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/version.go index 6f359e47d5b..a0798bf1128 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/README.md index 585f34185a2..b3465941ac7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/version.go index a3325bfa71c..1d590d24ada 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md index 1fb07e09e88..272a8ec089a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go index ddccad4b478..3d7a47f0433 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -17,6 +17,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -30,9 +38,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go index 4e112c3015e..782bd798467 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/README.md index cdf892cb056..61cd190fb3a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/version.go index c1880a523d0..cd9030a874a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/README.md index 53eee8ff248..e26f4bbc784 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/version.go index fffde714929..c7d725f3988 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/README.md index 6a771484bbb..16568dd5b06 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 4d6fe917b09..f07abbcf1d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -36,6 +36,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -49,9 +57,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index a0d5fec6f61..125a80cc656 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -14,6 +14,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index d259217e7d7..d579bced72f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -51,6 +51,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -64,9 +72,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index bb75f7e2c01..04282aa83bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -16,6 +16,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/version.go index 75db7c656ef..5a0d6e256e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md index 5e945736182..e98748e72cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go index b974dd5265a..d5668ea4d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md index b456770604c..01b95856d41 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go index 414d543ac3c..d1084d1e9ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md index 79f08863b14..39a651a63ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go index 78e2bf24135..8724dcdf43e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/README.md index cb5b55687b0..142cd8f119c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/version.go index 80b6d6b4692..546bab08500 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md index 082404d7516..887c5cb29c3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680ae..d5cf4f15e00 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -33,6 +33,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -46,9 +54,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go index 9b0fe1bfc91..be79dd727f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -68,6 +68,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -81,9 +89,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 27aaf794005..a78f7e5c9cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 9a2b95da942..3274f6b3896 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -46,6 +46,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -59,9 +67,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index 6bc556ad0bf..66472e38978 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index d26606cca5e..bf6a7350f4e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -80,6 +80,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -93,9 +101,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index cedd7a7a713..57049f7047b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 5879981c993..f4ddb8dfc23 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go index a8a497535e4..ac1ac6df2a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md index c224864ae7b..487e9777c90 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 56a78f2c528..2d08897a94e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -20,6 +20,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -33,9 +41,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go index 32f35b065ff..311793abfce 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md index d24075d47ff..7d523ccab54 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go index c815d0a7836..07308521b9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/README.md index 7537a7a3052..9d5230608cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/version.go index 83fb59c7820..02e6958f96d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md index 5cc93729729..02d6c4707e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go index 202d9b2a45d..b50ff4227dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md index 692a6b869e9..67b54e7e6f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go index 66c60ffd26a..28e9fc33dc9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/README.md index cd698ad40de..6728c955f81 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/version.go index 337610834c1..83b8c5fef5f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/README.md index 8895201a855..62725eea719 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/version.go index 2c1a15da987..73cf497f314 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/README.md index 0c88b02c76c..f409af9e7f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/version.go index 62199fcf3b1..9a5a010e9e8 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md index eb08aa758ea..6235b47c93b 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go index e0c2fda36ca..e723435606d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/README.md index 8c9f72d897d..ac25c5eb1bb 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/version.go index 2e59ced7a5f..806657ea7b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/README.md index 8c0cc42cf6a..52dd993d891 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/version.go index 1081364b6ca..817beff3535 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/README.md index 71ef617d50f..47b36550800 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2022-10-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/version.go index 7b0a74e6267..2022ea3f960 100644 --- a/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2022-10-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2022-10-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/README.md index 721a9a1e738..7dc94ae9de3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/version.go index 624feac1d3f..8e7e15104ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/README.md index f34e6ea6bbf..645c2093383 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/version.go index 7a1cc9d8501..c15f16ec9e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/README.md index 191b7297d48..b72aec2ee27 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/version.go index 3c9834e31e2..21313476747 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/README.md index ffcce093933..30ed43b4463 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/version.go index e588d334de1..5c9f19a27d4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/README.md index 579cc750af8..cb70e5ba22f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/version.go index 3d61dad810b..4aebacbf7b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/README.md index a58fba3cdc3..319cc57590f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/version.go index fd4a8440aa8..d99f557d0e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/README.md index 422d2ed8913..423a814a63d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/version.go index 062800335d9..d21a94a77ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/README.md index 64f1c92824c..9f54c110296 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabricspecificdetails.go index ddccad4b478..3d7a47f0433 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -17,6 +17,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -30,9 +38,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/version.go index 682f6bcdf6a..5886fc7ce66 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/README.md index d68a9a30c16..a18fd260e2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/version.go index 48de40bff28..65ca935b366 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/README.md index 221427ed624..43ee2501eca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/version.go index 28676055b54..b0787c92153 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/README.md index 0e8623ea368..330008edff0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 55ef94dffb5..e29a936e4f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -38,6 +38,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -51,9 +59,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index 270108c42c2..33837e94c91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -15,6 +15,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -28,9 +36,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index efc3eb35083..2c2d3439ff2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -55,6 +55,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -68,9 +76,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 78879848fb6..cc8da1f55cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -17,6 +17,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -30,9 +38,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/version.go index 6609e427f7b..84979be6818 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/README.md index e473b29918c..0e9ae8c829a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/version.go index fda0a5f5c7a..6a62e08d9c3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/README.md index dbaa0e67590..1a9c4efdc9c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/version.go index e5bd6aa81a2..ba00d392beb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/README.md index bd40a7c0b0e..9f5e88c37e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/version.go index 24392b7647a..460ec67e2ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/README.md index e7d0acb27c1..b22b8d966b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/version.go index 3b67bf8762a..a9bd975d2f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/README.md index 51f55ae1a20..6492b3cefd9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680ae..d5cf4f15e00 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -33,6 +33,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -46,9 +54,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areplicationdetails.go index 9b0fe1bfc91..be79dd727f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -68,6 +68,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -81,9 +89,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 27aaf794005..a78f7e5c9cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 9a2b95da942..3274f6b3896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -46,6 +46,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -59,9 +67,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index 6bc556ad0bf..66472e38978 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index d26606cca5e..bf6a7350f4e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -80,6 +80,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -93,9 +101,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index cedd7a7a713..57049f7047b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 5879981c993..f4ddb8dfc23 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/version.go index 29481605930..ccbb0261a9c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/README.md index 5ff98528d4a..d156c0cf90b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/version.go index 2db489a0e5b..dc0117596b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/README.md index 53ebd27dc45..daf26b70d7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/version.go index 656655d0b22..7d41f576659 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/README.md index 047c7601ae3..cc6bdc360ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/version.go index 89d0f7dced6..7c12fadbf0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/README.md index 81b32df6c93..395ae40e918 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/version.go index 1ce383ff760..75cd8f8b1ce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/README.md index bd7ee7305be..432338920c3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/version.go index 994184780ca..9942636937d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/README.md index bbbd30470ec..2e0735bcfb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/version.go index 60eba51d06b..bdde0ed9f72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/README.md index ec43c6c2e7b..7923259ed60 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/version.go index cb845bdce05..b8562d85dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/README.md index d6333bc69fd..d8045f12148 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/version.go index c6354f7cabb..d96f55545e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/README.md index 588d9f2d8f4..3c3e850ce26 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/version.go index 336a57892bf..d41bc97132c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/README.md index 6452ecddf40..0acfd1ba09b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/version.go index 356d40f702c..bce7c913441 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/README.md index a7b8ef6c812..3d4688d2707 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/version.go index d0b171916fd..ca9f15283e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/README.md index 80a59a39975..4642d973703 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-01-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/version.go index e8a09fb6e89..79f60f85c5e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-01-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2023-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/README.md index 53fb86038dd..732337668f2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/version.go index db9d41c069c..ecc641474e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/README.md index 6aa64a131d3..c31611de6ec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/version.go index f7d91f7c165..fbc95602c8a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/README.md index 25ba5944e26..d9373338643 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/version.go index eaaccaad2f2..8d60cbaa94a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/README.md index 44859283ce1..064abd6fcea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/version.go index 00198be2f3f..9c930eac03a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/README.md index 2e98a317f5b..43c62100f9c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/version.go index 22ccd0835bc..6bbea48600f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/README.md index 5e34f3fccdf..83562c081e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/version.go index b5dfb660c85..5193f81d204 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/README.md index efc8af746f2..5b32a696e8d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/version.go index 426ae6139bd..b448f09a6eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/README.md index b1b7085c331..a373cb6f136 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/version.go index f35495f1120..f47d28ed7d6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/README.md index fee75706da2..878b93882fd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/version.go index 495e005ebc9..874d799cfdc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/README.md index eb0ebfae607..4e312abc67f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/version.go index 12a69deed59..34fa3182329 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/README.md index bdc3dc8680b..7ae04ec20b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 55ef94dffb5..e29a936e4f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -38,6 +38,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -51,9 +59,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index 270108c42c2..33837e94c91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -15,6 +15,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -28,9 +36,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index efc3eb35083..2c2d3439ff2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -55,6 +55,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -68,9 +76,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 78879848fb6..cc8da1f55cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -17,6 +17,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -30,9 +38,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/version.go index 40a0916039a..4ec67dc689d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/README.md index 94855ab547c..936ee4b147a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/version.go index 3be07a93205..6a8c5036e38 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/README.md index ae001369d88..4fe72838cb9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/version.go index bb5b0a06d63..11e16281a21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/README.md index f4615a258f5..1d3e3f7fba1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/version.go index b6229466a9e..1d420efc91d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/README.md index c63ecd48387..5501f29a406 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/version.go index ff6a24fd757..f51e523bd16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/README.md index ee3d1cb0040..49cb080a2af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680ae..d5cf4f15e00 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -33,6 +33,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -46,9 +54,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areplicationdetails.go index 9b0fe1bfc91..be79dd727f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -68,6 +68,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -81,9 +89,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 27aaf794005..a78f7e5c9cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 9a2b95da942..3274f6b3896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -46,6 +46,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -59,9 +67,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index 6bc556ad0bf..66472e38978 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index d26606cca5e..bf6a7350f4e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -80,6 +80,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -93,9 +101,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index cedd7a7a713..57049f7047b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 5879981c993..f4ddb8dfc23 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/version.go index 65e17711b25..6f9e7d80dca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/README.md index 8565ee6d27c..87562b815a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/version.go index 1ca2b1fedff..f5074ea1b28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/README.md index 398fef8d36c..fb842a3d409 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/version.go index fa152412c5a..6089df553c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/README.md index 0354b1c3c24..b31c226e0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/version.go index 8f75929f9e1..5d5717d1898 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/README.md index 19db149925b..894c833505e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/version.go index 945fa21cf36..bb7eb909d31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/README.md index df53c7f975d..6974efe8112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/version.go index 7def51474cb..bee12d80cb9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/README.md index 11e8c5ad53e..5bda996bf95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/version.go index c654b019d74..588bb1e2138 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/README.md index 3586bb8ed91..10fa4d585cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/version.go index e27180422b2..a838b06297d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/README.md index f63751fc48c..0055b07d68f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/version.go index 6ef497211ea..a41509eec6a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/README.md index 6aca12bd3b6..0cc1256f0d6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/version.go index c962048a7bc..60de6e589ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/README.md index 034aade1f16..e1756c50ec2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/version.go index be38c91169a..fd45d673ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/README.md index c3494bb550b..ff5dea08249 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/version.go index ff1543e5f42..c73caad129b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/README.md index 8c740691a84..8d8392c3ae9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-02-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/version.go index be4691bfe5e..aa685c1b50f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-02-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2023-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/README.md index cc2ea786b38..44af7b6b77a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/version.go index 722c6fb1f53..1cbb9385e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/README.md index e8562351bd8..a3f1d15d4dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/version.go index 0d1fa9cdb3a..6880ba0b84c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/README.md index 96fa6c71f48..a6905d46255 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/version.go index 4eaea76d285..5c4a7a7fabf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/README.md index 7ad46b635fb..d6f7131472c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/version.go index 9487eadbd17..b55d0153c66 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/README.md index 5af013c9832..2e82217d0de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/version.go index 61cc800ef86..0a086d2969b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/README.md index 52ce9cb52b0..d85193b9a85 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/version.go index 0923004732f..35195f19652 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/README.md index 5c6da4f15b4..f85e591dabb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/version.go index 2392188a08a..0fae85a0f2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/README.md index 0665eef9c85..cad3454bf07 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/version.go index 309cf7930cf..0557324f738 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/README.md index 529d95b3cb5..36b3efc05f2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/version.go index 2b870c78f89..1b214a9f86a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/README.md index 1e8a842b2e8..5e4f96f5e11 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/version.go index 5bc8b48df60..a6e52633f9c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/README.md index c40ca685054..d9a55d10afd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 55ef94dffb5..e29a936e4f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -38,6 +38,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -51,9 +59,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index 270108c42c2..33837e94c91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -15,6 +15,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -28,9 +36,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index efc3eb35083..2c2d3439ff2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -55,6 +55,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -68,9 +76,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 78879848fb6..cc8da1f55cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -17,6 +17,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -30,9 +38,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/version.go index ffd7fedb605..2f3b5428306 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/README.md index 4e95d8adb2f..e0700e40d16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/version.go index 8be0415b00a..6164a735a6a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/README.md index b6f81a6008b..eb75c44c684 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/version.go index 2f223811c92..7f835a5892e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/README.md index 2d0ef9374d4..f3f10a833a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/version.go index bf93a5d156a..9a261df0fb4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/README.md index 375042cd2d8..6d56987a007 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/version.go index 9c7eedc93ca..9ac38618386 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/README.md index 2d1345d2573..30bfba56b89 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680ae..d5cf4f15e00 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -33,6 +33,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -46,9 +54,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areplicationdetails.go index 9b0fe1bfc91..be79dd727f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -68,6 +68,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -81,9 +89,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 27aaf794005..a78f7e5c9cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 9a2b95da942..3274f6b3896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -46,6 +46,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -59,9 +67,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index 6bc556ad0bf..66472e38978 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index d26606cca5e..bf6a7350f4e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -80,6 +80,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -93,9 +101,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index cedd7a7a713..57049f7047b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 5879981c993..f4ddb8dfc23 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -14,6 +14,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -27,9 +35,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/version.go index 24a44aa38e5..4e633ad325b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/README.md index cb7e43323c5..875a0043065 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/version.go index d239ae16961..4df2be2cbd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/README.md index f6413b2af2d..bef868c6ab8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/version.go index 5a86e411474..476bbdeab04 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/README.md index 325f901e8ce..1715dff79a4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/version.go index b53dfcbc646..100868f2851 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/README.md index dfb31ccf550..0b140b7807d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/version.go index edacdb58818..837a171aaba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/README.md index 9a18f749c60..bd5c99b0e45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/version.go index eb68f0d11b8..953ce8805a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/README.md index dbe8d53fac1..a41a9cf0c18 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/version.go index 0632cff5653..db02c0ac4cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/README.md index 5d3beebfdf3..13de5298005 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/version.go index 819345f6956..f804be81faa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/README.md index 6bcde01cd67..064be8433df 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/version.go index 6cfd72ceff6..8e36edbcf90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/README.md index dcee9b07274..731fb9cc7ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/version.go index 7a4bbc999c8..8e51fc796d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/README.md index 776bc13884d..b1e2fd28913 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/version.go index 5daea1fc611..6fc0e638a66 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/README.md index a55a08d71d4..5295b1c35ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/version.go index 86cd1c93fb3..5353d42b229 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/README.md index 1db249049ad..c728c98b9e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-04-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/version.go index 8bab6627a5f..0a802d79641 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-04-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2023-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/README.md index 1a0262146b0..d2ac01f640a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/version.go index 0de665dc27d..3f6aaca0918 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/README.md index 7fe35487d1b..dd5b4bfecbd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/version.go index f72d9cde9c2..e0dddd341c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/README.md index 8153e8a296f..8aa003ef6c9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/version.go index f985e10866a..ba5290dfaef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/README.md index 73a265ad7ed..d0ae5725674 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/version.go index 73edaec0218..1d543526aa8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/README.md index c49bb052630..4246d5bfa63 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/version.go index a7c2baa08e9..3c030a8bf2d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/README.md index 0b5e019ec57..03f1beba723 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/version.go index d0821bad06e..c727333c569 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/README.md index 88f192d88c9..32ed33bbdf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/version.go index 9e319a13797..40094c1c9fd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/README.md index 4d9828d3bbe..cdf1b29cddd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/version.go index 60f99533a58..fc86b2a38af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/README.md index b428e8d5bf8..bd7d42b5be2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/version.go index 3904709cac3..bfc0284edc3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/README.md index 604c0ea4487..9fa45de6070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/version.go index ff9f25d34d1..c13b34ebc46 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/README.md index d08d48c6976..141b3c66e3a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 55ef94dffb5..e29a936e4f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -38,6 +38,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -51,9 +59,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index 270108c42c2..33837e94c91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -15,6 +15,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -28,9 +36,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index 0a737b96c2a..cc5db559ccf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -61,6 +61,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -74,9 +82,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 78879848fb6..cc8da1f55cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -17,6 +17,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -30,9 +38,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/version.go index faef389b144..3c1402b2d52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/README.md index 535f3010194..ebd8cf0e04f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/version.go index 9c27311235a..9078f96f330 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/README.md index a6c5b60babe..ec2b2bbc005 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/version.go index c292b002878..de3453a9e64 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/README.md index 2b57fd64021..30519674086 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/version.go index bc5fdc56ea1..6cb8983a33d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/README.md index 18af415a100..40a05dc1978 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/version.go index 9a4c0115c0f..3adbe7c2383 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/README.md index a5aeb39b4c5..de6bdcd56bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aenableprotectioninput.go index bd2dc9680ae..d5cf4f15e00 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -33,6 +33,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -46,9 +54,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areplicationdetails.go index 37236e5b27e..060afcd5d50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -69,6 +69,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -82,9 +90,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 2ae80dd5540..839fa291aea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index dbc1e231e1e..803e6950a6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -47,6 +47,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -60,9 +68,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index c19155908d9..155efe538d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index da843844162..f1927aace2c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -83,6 +83,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -96,9 +104,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index ff6a69049d8..b44c5ce60d2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 1fb6ca5b171..5f99b8cb9ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/version.go index 51bb7cf9083..39e767cd49d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/README.md index 8a7d0490e9c..c271e801a9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/version.go index bc2cbacad6d..bffd9e896af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/README.md index 08b2b6f5651..7dbafc38ba1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/version.go index 7e1a6f0b5a2..78c81767838 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/README.md index ec85555bb23..7fc3eb8adc3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/version.go index 0ffb00ba827..7b959032c3f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/README.md index 71595dd50a2..0be7db798aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/version.go index 9b91888041d..9fc3c3a1983 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/README.md index 199cc27e7bc..0581e141d0f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/version.go index b3c9e473cc4..cc6400b81a1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/README.md index 1145fc309b8..f42a770e146 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/version.go index 3e08ab71b7f..9a852d161eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/README.md index d92ffa10509..86c7dea6a1a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/version.go index 3c0925a940b..54d836bdc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/README.md index a43820c1527..1d359685627 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/version.go index 6a93ba88573..595931b916c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/README.md index dc1afa30793..ff9fb17e57e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/version.go index 87f994c83ba..06762de9020 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/README.md index 3bcb7320023..87f69f321c3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/version.go index 4436c71d5d2..5ca6be4f239 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/README.md index 938b5ac2044..03868989295 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/version.go index d30e74f1e83..46ca853b4ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/README.md index 6557775db98..e69d25a11c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-06-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/version.go index ffeda6bdef6..45c4fa14a54 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-06-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2023-06-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/README.md index ec8c340e31b..f7b757c5d0f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/version.go index 79dd46d47c9..d377f31f484 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/README.md index 901dd5eaf72..51baea45803 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/version.go index 5fa26ee2a0f..633dafa934e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/README.md index ba4d3ce5e16..7f912f91f5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/version.go index cec57c6d2be..060ffe993e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/README.md index b7888eb960d..fc6eeb02a35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/version.go index df0d423577a..a3de0f8bba0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/README.md index ea15d0505b6..f70bf949836 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/version.go index afb0b783c53..773955c2344 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/README.md index 9d76d5b4538..a84f5e2cf6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/version.go index 2fb70c005eb..8db7fff1b4f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/README.md index 15d128bea59..01cb7542ae5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/version.go index 255ce715c04..aebd050a79e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/README.md index 8f7d592cd61..1009947696d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/version.go index 6fc5e00dcda..71c3ed9f357 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/README.md index 10f9fd2e5e1..b9180e6a470 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/version.go index 77eb66a25f1..3580e8c339a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/README.md index f4e0c2bcde9..48aff7e8424 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/version.go index 0be583e1363..7bc0acdaa89 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/README.md index ab039b3ca5e..adc46044a08 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index 55ef94dffb5..e29a936e4f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -38,6 +38,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -51,9 +59,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index 270108c42c2..33837e94c91 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -15,6 +15,14 @@ type VMwareCbtMigrateInput struct { PerformShutdown string `json:"performShutdown"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -28,9 +36,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index 0a737b96c2a..cc5db559ccf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -61,6 +61,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -74,9 +82,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 78879848fb6..cc8da1f55cf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -17,6 +17,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -30,9 +38,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index 3617cd1a1f2..851d01d87ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -30,6 +30,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -43,9 +51,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/version.go index 1a229dddf92..6c078fc0ea4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/README.md index 48a2bd9e22b..211541f1a4a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/version.go index 62a0cf6d8a5..71185838402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/README.md index e647b3aaa52..6327c0473c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/version.go index f9a5f238a56..50eae65c3d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/README.md index 8aa310eb5dd..b2290b45e8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/version.go index ef750735ab4..b3e1844cc68 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/README.md index 47194de1007..f7700c52cdb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/version.go index bb3e09136ff..a5223e35d9f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/README.md index 5e08a276cdc..97a971e29b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aenableprotectioninput.go index 980f1d278cb..8b6f806723f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -34,6 +34,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -47,9 +55,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areplicationdetails.go index 37236e5b27e..060afcd5d50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -69,6 +69,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -82,9 +90,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index a47bc604b1d..d693ca0bcaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index d57f1faad3e..6b8baf79f20 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -41,6 +41,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -54,9 +62,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 2ae80dd5540..839fa291aea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index dbc1e231e1e..803e6950a6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -47,6 +47,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -60,9 +68,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index c19155908d9..155efe538d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index da843844162..f1927aace2c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -83,6 +83,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -96,9 +104,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index ff6a69049d8..b44c5ce60d2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 1fb6ca5b171..5f99b8cb9ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index aaf09991d81..46a3b502a47 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -31,6 +31,14 @@ type InMageRcmEnableProtectionInput struct { TestSubnetName *string `json:"testSubnetName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -44,9 +52,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 8d8f494fcff..b1d9923dd95 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -65,6 +65,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -78,9 +86,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 428a0dc1aeb..1f52dac7dd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/version.go index 92a953b775a..e4f8c07b54b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/README.md index 704167c52a6..40b3bdef494 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/version.go index b4f8f45504d..930abdfa357 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/README.md index 803354ac411..e4d02faf3df 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/version.go index 7a12a62ad80..e821f3fb7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/README.md index 2c2f72c386b..922689f105d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/version.go index b1c18ae3429..4d5b61c4058 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/README.md index 848890f764d..a21197b7159 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/version.go index 70cd651b55c..6ce5ab8095e 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/README.md index c2a88627e04..78fae4833e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/version.go index 97913c62c2e..2d8520701e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/README.md index 4cbd15cde2a..2ff96b6341d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/version.go index 6a669cb315a..7093cbdb1d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/README.md index cfc9af0d607..4ad9f47d5ce 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/version.go index c08882652f3..ece82b30480 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/README.md index f9f0d28b491..4999cd368bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/version.go index e02726ee64e..516d6bd41be 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/README.md index 4780830ccd5..f681c2736cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/version.go index a52efa7602f..842b107b0fd 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/README.md index 63dc3205fe9..e8f1bce03e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/version.go index 2c7e2c7d0e1..042469e496f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/README.md index 2887797d00c..cebbc702b13 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/version.go index d13016ce87f..f71321acb30 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/README.md index a1901d41871..8ee763a753a 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2023-08-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/version.go index 4ef7ac7505e..1d176be2f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2023-08-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2023-08-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/README.md index 1833cd9be62..468f8e35d2a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/version.go index 64a5efa60d8..42b4f0ba25a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/README.md index 41f0c36fb8a..39579ca1842 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/version.go index c81b6513b85..b20b995c2af 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/README.md index 30924a0bc8d..6d6b9da0d38 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/version.go index 8d0282539a2..bda2ba5a189 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/README.md index b581e5e4493..82fb4422cf9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/version.go index fd40189e10e..dc6f205ec5f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/README.md index e223d2950c6..e16189e197c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/version.go index 8a8c921a083..df0a32abff9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/README.md index 1a576bf4d17..9d72ea41484 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/version.go index df1697606c4..9362c7ad19f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/README.md index 1390697ff4e..74d3826c82a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/version.go index e06c096a6ed..5ff731a2548 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/README.md index be8e071e2b1..17e4b667b7a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/version.go index a36186e69b4..f7e4ba30867 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/README.md index 261f1610cf6..5c9baafd215 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobdetails.go index 99f681b64dd..1abaa14b562 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -76,10 +94,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/version.go index 53985294b0b..69c4a713852 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/README.md index eb9e27743ba..f01ba8d3dc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/version.go index 0fa2005a41e..11412a1d6ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/README.md index 2afd3f4b511..a27e64fdd75 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index f1dbe9331a9..312133d3257 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -40,6 +40,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -53,9 +61,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index ebb80af4854..5c7c3385146 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -16,6 +16,14 @@ type VMwareCbtMigrateInput struct { PostMigrationSteps *[]ManagedRunCommandScriptInput `json:"postMigrationSteps,omitempty"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index 6d2098860c7..5e53a8342bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -62,6 +62,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -75,9 +83,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 7fae4b5a824..0ec2adcc035 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -18,6 +18,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -31,9 +39,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index fdf987570ce..3b7afac506f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -31,6 +31,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -44,9 +52,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/version.go index 01a6c8930d7..de64e33ce7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/README.md index 9402eab27e9..070dd17e5ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/version.go index 6ae65bc50ee..c1e8dc48320 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/README.md index 4cd4bb419e4..7141e348669 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/version.go index feb71100f69..0769b1abe47 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/README.md index 387dd8994df..c0c7e4852f0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/version.go index 805df7d7fac..1f00e03f001 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/README.md index 3ce9008dae7..4fd79f73ebd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/version.go index 4488b3b827e..9f0da02685c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/README.md index ccd34321ed8..cde09f6a394 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go index 980f1d278cb..8b6f806723f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -34,6 +34,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -47,9 +55,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areplicationdetails.go index 37236e5b27e..060afcd5d50 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -69,6 +69,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -82,9 +90,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index 639d67609c5..96b98783ad2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index 24d71c7008c..2046aa8c21e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -43,6 +43,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -56,9 +64,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 2ae80dd5540..839fa291aea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 059d6709997..1514aea95b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -48,6 +48,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -61,9 +69,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index c19155908d9..155efe538d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index da843844162..f1927aace2c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -83,6 +83,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -96,9 +104,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index ff6a69049d8..b44c5ce60d2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 1fb6ca5b171..5f99b8cb9ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmadddisksinput.go index f053ccd3c12..91b0bc63cf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmadddisksinput.go @@ -14,6 +14,14 @@ type InMageRcmAddDisksInput struct { Disks []InMageRcmDiskInput `json:"disks"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmAddDisksInput{} @@ -27,9 +35,10 @@ func (s InMageRcmAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmAddDisksInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index 0da00ccef40..d4c55f7104d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -38,6 +38,14 @@ type InMageRcmEnableProtectionInput struct { UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -51,9 +59,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 77dcdab47c0..16d8656d258 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -74,6 +74,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -87,9 +95,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 531bf039cf4..d15699fffec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -28,6 +28,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -41,9 +49,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/version.go index a326f59d1c9..d5d3db56780 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/README.md index 19d9ff0ca8e..32b41e13165 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/version.go index 709d036d27a..881c1bd85dd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/README.md index 60a97c33132..bf918b16bf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/version.go index 33668268086..339b36b36e6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/README.md index fa63d48ed72..9ee9d759fb2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/version.go index 1d91399414e..051900bd9ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/README.md index 3d86ad63286..276d2227bd7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/version.go index 9f547b1811c..6b5394cafae 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/README.md index 3cfd633bc39..5969a5d913f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/version.go index a852c21ed3a..3e43ce230ed 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/README.md index 1733ab3f246..75b5577fa14 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/version.go index d99622d94c9..fbf8337450f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/README.md index 5c6ba62ca1d..a01d838d6c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/version.go index 09010a0b4e2..511d0c204e6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/README.md index 6f7c09d3003..e0a018d6f66 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/version.go index a3c15bb38be..ee96ea34729 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/README.md index 34cc7a8f230..cded280ce77 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/version.go index 9c3665769a5..14417c666d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/README.md index f2450f4b632..77422e9b235 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/version.go index 683ad486149..add80f3e49a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/README.md index ac8896fdc1a..d510c0bb835 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/version.go index 25ea6087928..e61131c35a1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/README.md index 6d028275cc1..f74951bd19c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-01-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/version.go index 59efa4ec2dd..3b71fb8b9d6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-01-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2024-01-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/README.md index 1b89bc1a491..5fdaaf0130a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint` Documentation -The `clusterrecoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `clusterrecoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/client.go index e082f2cd9cd..c1b0f34229e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/client.go @@ -15,7 +15,7 @@ type ClusterRecoveryPointClient struct { } func NewClusterRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterRecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterrecoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterrecoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterRecoveryPointClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go index eb6d0f2054a..f2137105b6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go @@ -50,7 +50,7 @@ func ParseReplicationProtectionClusterRecoveryPointID(input string) (*Replicatio } id := ReplicationProtectionClusterRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseReplicationProtectionClusterRecoveryPointIDInsensitively(input string) } id := ReplicationProtectionClusterRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/method_get.go index 20c25c27f21..a7d9c730960 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c ClusterRecoveryPointClient) Get(ctx context.Context, id ReplicationProte var model ClusterRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go index a4c52d73169..db94ef72233 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go @@ -15,6 +15,14 @@ type A2AClusterRecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ClusterProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterRecoveryPointDetails) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return BaseClusterProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterRecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2AClusterRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go index 66137d33d83..e90df2ff02f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterProviderSpecificRecoveryPointDetails interface { + ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl } -// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterProviderSpecificRecoveryPointDetails = BaseClusterProviderSpecificRecoveryPointDetailsImpl{} + +type BaseClusterProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ClusterProviderSpecificRecoveryPointDetails = RawClusterProviderSpecificRecoveryPointDetailsImpl{} + +// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + clusterProviderSpecificRecoveryPointDetails BaseClusterProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { +func (s RawClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s.clusterProviderSpecificRecoveryPointDetails +} + +func UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input [] return out, nil } - out := RawClusterProviderSpecificRecoveryPointDetailsImpl{ + var parent BaseClusterProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterProviderSpecificRecoveryPointDetailsImpl: %+v", err) + } + + return RawClusterProviderSpecificRecoveryPointDetailsImpl{ + clusterProviderSpecificRecoveryPointDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go index 38a1013efd4..c202203be7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go @@ -47,7 +47,7 @@ func (s *ClusterRecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterRecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/version.go index a8372b63391..301c6ea53e6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoint/version.go @@ -1,12 +1,10 @@ package clusterrecoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterrecoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterrecoverypoint/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/README.md index 3b87742de56..37d929af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints` Documentation -The `clusterrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `clusterrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/client.go index e747bb6130e..9ffb1251268 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/client.go @@ -15,7 +15,7 @@ type ClusterRecoveryPointsClient struct { } func NewClusterRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/id_replicationprotectioncluster.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/id_replicationprotectioncluster.go index e450a3a007d..0c5a68d9240 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/id_replicationprotectioncluster.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/id_replicationprotectioncluster.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionClusterID(input string) (*ReplicationProtectionCl } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionClusterIDInsensitively(input string) (*Replicatio } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go index 616c1d7ff2b..4769a41a9ed 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go @@ -15,6 +15,14 @@ type A2AClusterRecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ClusterProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterRecoveryPointDetails) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return BaseClusterProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterRecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2AClusterRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go index c874281e66a..7acdde185f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterProviderSpecificRecoveryPointDetails interface { + ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl } -// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterProviderSpecificRecoveryPointDetails = BaseClusterProviderSpecificRecoveryPointDetailsImpl{} + +type BaseClusterProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ClusterProviderSpecificRecoveryPointDetails = RawClusterProviderSpecificRecoveryPointDetailsImpl{} + +// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + clusterProviderSpecificRecoveryPointDetails BaseClusterProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { +func (s RawClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s.clusterProviderSpecificRecoveryPointDetails +} + +func UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input [] return out, nil } - out := RawClusterProviderSpecificRecoveryPointDetailsImpl{ + var parent BaseClusterProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterProviderSpecificRecoveryPointDetailsImpl: %+v", err) + } + + return RawClusterProviderSpecificRecoveryPointDetailsImpl{ + clusterProviderSpecificRecoveryPointDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go index 3cf865dc85a..6f5627bc5ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go @@ -47,7 +47,7 @@ func (s *ClusterRecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterRecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/version.go index 8752e6b38ab..cb8feafddd9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/clusterrecoverypoints/version.go @@ -1,12 +1,10 @@ package clusterrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterrecoverypoints/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/README.md index 5b7b4e3a861..3f2bc5c8e26 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/version.go index f2c43cec105..19cdaf0b7fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/README.md index eeb44f26e48..3b21db4d3d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/version.go index 575d38c2622..1e1844f5c16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/README.md index 3dcc921d151..5abcc274fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/version.go index 75142e1e3db..8fb7ab464f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/README.md index 8b1aa1958bb..ae7993998aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/version.go index 8a9c7314f3a..c209456fbf8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/README.md index f229216347e..b9b8f8f3df4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/version.go index 8ab71ac3328..0c04b26609e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/README.md index 0b8a2defa2b..53651b7aab9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/version.go index af568b4860b..3f86530fefe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/README.md index 20119389e1e..59c2aedfdbc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/version.go index 4c314f4e527..4ae9af727f0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/README.md index c9cd14fe1c8..eb7eff45dc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/version.go index 5b49c98b90f..70593d4edd8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/README.md index 7e99a110297..5b152493de4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterfailoverjobdetails.go index a22ef7c44e1..e7e4b56cb58 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterfailoverjobdetails.go @@ -14,7 +14,16 @@ type ClusterFailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterFailoverJobDetails{} @@ -28,9 +37,10 @@ func (s ClusterFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterswitchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterswitchprotectionjobdetails.go index fe9e373c7ef..48238d85340 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterswitchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clusterswitchprotectionjobdetails.go @@ -14,7 +14,16 @@ type ClusterSwitchProtectionJobDetails struct { NewReplicationProtectionClusterId *string `json:"newReplicationProtectionClusterId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterSwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterSwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s ClusterSwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterSwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterSwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clustertestfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clustertestfailoverjobdetails.go index 6c56b8f2e5f..fd3d258a382 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clustertestfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_clustertestfailoverjobdetails.go @@ -19,7 +19,16 @@ type ClusterTestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterTestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterTestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s ClusterTestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterTestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterTestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobdetails.go index 789db9326ce..aae398ebc8b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -100,10 +118,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/version.go index 2de0d3fc9ba..bbbb5d44ca0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/README.md index fac771bd2a0..cdfa093eb25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/version.go index f5de20a70b6..2043cea7c90 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/README.md index eb4fccc0388..54a14ec327e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index f1dbe9331a9..312133d3257 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -40,6 +40,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -53,9 +61,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index ebb80af4854..5c7c3385146 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -16,6 +16,14 @@ type VMwareCbtMigrateInput struct { PostMigrationSteps *[]ManagedRunCommandScriptInput `json:"postMigrationSteps,omitempty"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index 6d2098860c7..5e53a8342bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -62,6 +62,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -75,9 +83,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 7fae4b5a824..0ec2adcc035 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -18,6 +18,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -31,9 +39,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index fdf987570ce..3b7afac506f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -31,6 +31,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -44,9 +52,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/version.go index 34cee83cd4a..3b025c72c16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/README.md index acaf242aead..cce38cde859 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/version.go index ac55421fdf0..21d66e1038f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/README.md index 5c2c84d4706..4bf61bfb6ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/version.go index 38bb60814a6..ea76ac16e46 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/README.md index 5f5b518b07a..eb99ff64035 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/version.go index f90940560d0..8bf07ac6a2f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/README.md index 761673d1a50..985aa2bbae8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/version.go index 0c1198029bc..3fa62de080f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/README.md index 4e2f90a70a1..ceb8f983982 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go index 6d6c0bf630f..90a041ca1b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -35,6 +35,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -48,9 +56,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areplicationdetails.go index 07d37bb3696..11126570f85 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -71,6 +71,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -84,9 +92,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index 639d67609c5..96b98783ad2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index 24d71c7008c..2046aa8c21e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -43,6 +43,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -56,9 +64,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 2ae80dd5540..839fa291aea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 059d6709997..1514aea95b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -48,6 +48,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -61,9 +69,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index c19155908d9..155efe538d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index da843844162..f1927aace2c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -83,6 +83,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -96,9 +104,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index ff6a69049d8..b44c5ce60d2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 1fb6ca5b171..5f99b8cb9ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmadddisksinput.go index f053ccd3c12..91b0bc63cf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmadddisksinput.go @@ -14,6 +14,14 @@ type InMageRcmAddDisksInput struct { Disks []InMageRcmDiskInput `json:"disks"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmAddDisksInput{} @@ -27,9 +35,10 @@ func (s InMageRcmAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmAddDisksInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index 0da00ccef40..d4c55f7104d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -38,6 +38,14 @@ type InMageRcmEnableProtectionInput struct { UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -51,9 +59,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 77dcdab47c0..16d8656d258 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -74,6 +74,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -87,9 +95,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 531bf039cf4..d15699fffec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -28,6 +28,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -41,9 +49,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/version.go index c1813f22dc3..222aa55a844 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/README.md index e62629d7843..c2e66745599 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters` Documentation -The `replicationprotectionclusters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotectionclusters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/client.go index ab8369ee009..0b827715b54 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionClustersClient struct { } func NewReplicationProtectionClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionClustersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncluster.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncluster.go index 2c9eaf5ff2f..31f6c393243 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncluster.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncluster.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionClusterID(input string) (*ReplicationProtectionCl } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionClusterIDInsensitively(input string) (*Replicatio } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncontainer.go index cdae5ac9ca8..089b3be4a02 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_vault.go index 4863bc09df6..bcec8f3fccc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_get.go index 0a80f4383e1..21d0209de27 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionClustersClient) Get(ctx context.Context, id Replica var model ReplicationProtectionCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_list.go index b974d3c842d..006c98e0ece 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go index fb44df954e5..d6cdb3e3030 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyClusterRecoveryPointProviderSpecificInput = A2AApplyClusterRecoveryPo type A2AApplyClusterRecoveryPointInput struct { // Fields inherited from ApplyClusterRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyClusterRecoveryPointInput) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return BaseApplyClusterRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyClusterRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyClusterRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyClusterRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go index 983aace7d3b..dc11ca955f1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go @@ -15,6 +15,14 @@ type A2AClusterTestFailoverInput struct { IndividualNodeRecoveryPoints *[]string `json:"individualNodeRecoveryPoints,omitempty"` // Fields inherited from ClusterTestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterTestFailoverInput) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return BaseClusterTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterTestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AClusterTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterTestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go index e8364f0df4f..193f06824e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AClusterUnplannedFailoverInput struct { IndividualNodeRecoveryPoints *[]string `json:"individualNodeRecoveryPoints,omitempty"` // Fields inherited from ClusterUnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterUnplannedFailoverInput) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return BaseClusterUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AClusterUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go index bab528c1103..2a04b366aca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go @@ -35,6 +35,14 @@ type A2AReplicationProtectionClusterDetails struct { RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` // Fields inherited from ReplicationClusterProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationProtectionClusterDetails) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return BaseReplicationClusterProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationProtectionClusterDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationProtectionClusterDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationProtectionClusterDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go index 3382a2c37c4..8532960ff6a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go @@ -24,6 +24,14 @@ type A2ASharedDiskReplicationDetails struct { UnprotectedDisks *[]A2AUnprotectedDiskDetails `json:"unprotectedDisks,omitempty"` // Fields inherited from SharedDiskReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ASharedDiskReplicationDetails) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return BaseSharedDiskReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASharedDiskReplicationDetails{} @@ -37,9 +45,10 @@ func (s A2ASharedDiskReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASharedDiskReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go index d7cfb36ad06..206ba39cc16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go @@ -32,7 +32,7 @@ func (s *ApplyClusterRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyClusterRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go index 790eb5d59ef..cfd819e7034 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyClusterRecoveryPointProviderSpecificInput interface { + ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl } -// RawApplyClusterRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyClusterRecoveryPointProviderSpecificInput = BaseApplyClusterRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyClusterRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyClusterRecoveryPointProviderSpecificInputImpl) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyClusterRecoveryPointProviderSpecificInput = RawApplyClusterRecoveryPointProviderSpecificInputImpl{} + +// RawApplyClusterRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyClusterRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyClusterRecoveryPointProviderSpecificInput BaseApplyClusterRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyClusterRecoveryPointProviderSpecificInput, error) { +func (s RawApplyClusterRecoveryPointProviderSpecificInputImpl) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return s.applyClusterRecoveryPointProviderSpecificInput +} + +func UnmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyClusterRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input return out, nil } - out := RawApplyClusterRecoveryPointProviderSpecificInputImpl{ + var parent BaseApplyClusterRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyClusterRecoveryPointProviderSpecificInputImpl: %+v", err) + } + + return RawApplyClusterRecoveryPointProviderSpecificInputImpl{ + applyClusterRecoveryPointProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go index 9112009354d..dff6642e963 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *ClusterTestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalClusterTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterTestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go index 6a97d27be05..c1c9e34fd0f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterTestFailoverProviderSpecificInput interface { + ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl } -// RawClusterTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterTestFailoverProviderSpecificInput = BaseClusterTestFailoverProviderSpecificInputImpl{} + +type BaseClusterTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterTestFailoverProviderSpecificInputImpl) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return s +} + +var _ ClusterTestFailoverProviderSpecificInput = RawClusterTestFailoverProviderSpecificInputImpl{} + +// RawClusterTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + clusterTestFailoverProviderSpecificInput BaseClusterTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawClusterTestFailoverProviderSpecificInputImpl) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return s.clusterTestFailoverProviderSpecificInput } -func unmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byte) (ClusterTestFailoverProviderSpecificInput, error) { +func UnmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byte) (ClusterTestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byt return out, nil } - out := RawClusterTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseClusterTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawClusterTestFailoverProviderSpecificInputImpl{ + clusterTestFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go index c06021021a2..23e260f9076 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *ClusterUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterUnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go index b20322e7125..b8fc9491cef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterUnplannedFailoverProviderSpecificInput interface { + ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl } -// RawClusterUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterUnplannedFailoverProviderSpecificInput = BaseClusterUnplannedFailoverProviderSpecificInputImpl{} + +type BaseClusterUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterUnplannedFailoverProviderSpecificInputImpl) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ ClusterUnplannedFailoverProviderSpecificInput = RawClusterUnplannedFailoverProviderSpecificInputImpl{} + +// RawClusterUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + clusterUnplannedFailoverProviderSpecificInput BaseClusterUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input []byte) (ClusterUnplannedFailoverProviderSpecificInput, error) { +func (s RawClusterUnplannedFailoverProviderSpecificInputImpl) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return s.clusterUnplannedFailoverProviderSpecificInput +} + +func UnmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input []byte) (ClusterUnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input return out, nil } - out := RawClusterUnplannedFailoverProviderSpecificInputImpl{ + var parent BaseClusterUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterUnplannedFailoverProviderSpecificInputImpl: %+v", err) + } + + return RawClusterUnplannedFailoverProviderSpecificInputImpl{ + clusterUnplannedFailoverProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go index 23fc580ae66..d108b61063e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationClusterProviderSpecificSettings interface { + ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl } -// RawReplicationClusterProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationClusterProviderSpecificSettings = BaseReplicationClusterProviderSpecificSettingsImpl{} + +type BaseReplicationClusterProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationClusterProviderSpecificSettingsImpl) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationClusterProviderSpecificSettings = RawReplicationClusterProviderSpecificSettingsImpl{} + +// RawReplicationClusterProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationClusterProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationClusterProviderSpecificSettings BaseReplicationClusterProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationClusterProviderSpecificSettingsImplementation(input []byte) (ReplicationClusterProviderSpecificSettings, error) { +func (s RawReplicationClusterProviderSpecificSettingsImpl) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return s.replicationClusterProviderSpecificSettings +} + +func UnmarshalReplicationClusterProviderSpecificSettingsImplementation(input []byte) (ReplicationClusterProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationClusterProviderSpecificSettingsImplementation(input []b return out, nil } - out := RawReplicationClusterProviderSpecificSettingsImpl{ + var parent BaseReplicationClusterProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationClusterProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationClusterProviderSpecificSettingsImpl{ + replicationClusterProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go index bac8fd366bc..375e1b710e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectionClusterProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationClusterProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationClusterProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionClusterProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go index de9ff5ce065..36e49fcb695 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go @@ -42,7 +42,7 @@ func (s *SharedDiskReplicationItemProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["sharedDiskProviderSpecificDetails"]; ok { - impl, err := unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SharedDiskProviderSpecificDetails' for 'SharedDiskReplicationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go index 0519fe8a74f..4bdda100724 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SharedDiskReplicationProviderSpecificSettings interface { + SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl } -// RawSharedDiskReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SharedDiskReplicationProviderSpecificSettings = BaseSharedDiskReplicationProviderSpecificSettingsImpl{} + +type BaseSharedDiskReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSharedDiskReplicationProviderSpecificSettingsImpl) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return s +} + +var _ SharedDiskReplicationProviderSpecificSettings = RawSharedDiskReplicationProviderSpecificSettingsImpl{} + +// RawSharedDiskReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSharedDiskReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + sharedDiskReplicationProviderSpecificSettings BaseSharedDiskReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input []byte) (SharedDiskReplicationProviderSpecificSettings, error) { +func (s RawSharedDiskReplicationProviderSpecificSettingsImpl) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return s.sharedDiskReplicationProviderSpecificSettings +} + +func UnmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input []byte) (SharedDiskReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input return out, nil } - out := RawSharedDiskReplicationProviderSpecificSettingsImpl{ + var parent BaseSharedDiskReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSharedDiskReplicationProviderSpecificSettingsImpl: %+v", err) + } + + return RawSharedDiskReplicationProviderSpecificSettingsImpl{ + sharedDiskReplicationProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/version.go index 12e3c64e736..395eb2ca8c2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionclusters/version.go @@ -1,12 +1,10 @@ package replicationprotectionclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionclusters/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/README.md index fd3e142dd18..cceb52bf5c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/version.go index 16972048e2b..687027f3bd8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/README.md index 54b2cb491d6..ecd0c5a6e73 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go index 5d52d67ba04..162f36c45b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go @@ -16,6 +16,14 @@ type A2ASwitchClusterProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from SwitchClusterProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchClusterProtectionInput) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return BaseSwitchClusterProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchClusterProtectionInput{} @@ -29,9 +37,10 @@ func (s A2ASwitchClusterProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchClusterProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go index cda13d52d7f..a544f104bf3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchClusterProtectionInputProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchClusterProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchClusterProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go index ed4680c5f83..8a09357be82 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchClusterProtectionProviderSpecificInput interface { + SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl } -// RawSwitchClusterProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchClusterProtectionProviderSpecificInput = BaseSwitchClusterProtectionProviderSpecificInputImpl{} + +type BaseSwitchClusterProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchClusterProtectionProviderSpecificInputImpl) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchClusterProtectionProviderSpecificInput = RawSwitchClusterProtectionProviderSpecificInputImpl{} + +// RawSwitchClusterProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchClusterProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchClusterProtectionProviderSpecificInput BaseSwitchClusterProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input []byte) (SwitchClusterProtectionProviderSpecificInput, error) { +func (s RawSwitchClusterProtectionProviderSpecificInputImpl) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return s.switchClusterProtectionProviderSpecificInput +} + +func UnmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input []byte) (SwitchClusterProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input [ return out, nil } - out := RawSwitchClusterProtectionProviderSpecificInputImpl{ + var parent BaseSwitchClusterProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchClusterProtectionProviderSpecificInputImpl: %+v", err) + } + + return RawSwitchClusterProtectionProviderSpecificInputImpl{ + switchClusterProtectionProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/version.go index bebd28417c3..c08c31f8873 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/README.md index 866d128a448..4bb4875e889 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/version.go index bab1b655f97..6d9d8b42659 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/README.md index 27d3c7372d5..c99df8b6fc7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/version.go index c8118ae8d74..e471701214d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/README.md index 3037ce1f01e..e115ad8cf03 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/version.go index c86f6609b90..2132bb3555c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/README.md index c0263f2fca9..373d5089fca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/version.go index 9a44b2d4dcc..1d55f1c838e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/README.md index 3119b9d4f70..e638fbcb682 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/version.go index 793b9c3b448..6faddeaab0b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/README.md index 3c763b9e1e7..896f7ea8bf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/version.go index 2fec37eb751..bef95a7e74a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/README.md index 311eb30e88a..8f35d21dcb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/version.go index c15f252a279..d8cc446712d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/README.md index 457a8422fe4..04cde62babf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/version.go index 6760b3e457d..5df4c73e08d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/README.md index a447dada983..54367548953 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/version.go index 31a57ee009f..ddfc642a886 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/README.md index 3a22501d7e6..ec33bca0c39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-02-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/version.go index a4288f2e624..15aa3b394f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-02-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2024-02-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/README.md index 1f2c7adf318..ff88a81c641 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint` Documentation -The `clusterrecoverypoint` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `clusterrecoverypoint` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/client.go index e082f2cd9cd..c1b0f34229e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/client.go @@ -15,7 +15,7 @@ type ClusterRecoveryPointClient struct { } func NewClusterRecoveryPointClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterRecoveryPointClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterrecoverypoint", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterrecoverypoint", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterRecoveryPointClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go index eb6d0f2054a..f2137105b6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/id_replicationprotectionclusterrecoverypoint.go @@ -50,7 +50,7 @@ func ParseReplicationProtectionClusterRecoveryPointID(input string) (*Replicatio } id := ReplicationProtectionClusterRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseReplicationProtectionClusterRecoveryPointIDInsensitively(input string) } id := ReplicationProtectionClusterRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/method_get.go index 20c25c27f21..a7d9c730960 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/method_get.go @@ -45,7 +45,6 @@ func (c ClusterRecoveryPointClient) Get(ctx context.Context, id ReplicationProte var model ClusterRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go index a4c52d73169..db94ef72233 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_a2aclusterrecoverypointdetails.go @@ -15,6 +15,14 @@ type A2AClusterRecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ClusterProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterRecoveryPointDetails) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return BaseClusterProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterRecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2AClusterRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go index 66137d33d83..e90df2ff02f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterproviderspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterProviderSpecificRecoveryPointDetails interface { + ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl } -// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterProviderSpecificRecoveryPointDetails = BaseClusterProviderSpecificRecoveryPointDetailsImpl{} + +type BaseClusterProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ClusterProviderSpecificRecoveryPointDetails = RawClusterProviderSpecificRecoveryPointDetailsImpl{} + +// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + clusterProviderSpecificRecoveryPointDetails BaseClusterProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { +func (s RawClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s.clusterProviderSpecificRecoveryPointDetails +} + +func UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input [] return out, nil } - out := RawClusterProviderSpecificRecoveryPointDetailsImpl{ + var parent BaseClusterProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterProviderSpecificRecoveryPointDetailsImpl: %+v", err) + } + + return RawClusterProviderSpecificRecoveryPointDetailsImpl{ + clusterProviderSpecificRecoveryPointDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go index 38a1013efd4..c202203be7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/model_clusterrecoverypointproperties.go @@ -47,7 +47,7 @@ func (s *ClusterRecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterRecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/version.go index 0b1b168a0b9..a146633a766 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoint/version.go @@ -1,12 +1,10 @@ package clusterrecoverypoint -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterrecoverypoint/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterrecoverypoint/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/README.md index 2fd57d91bbf..76748454e9b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints` Documentation -The `clusterrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `clusterrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/client.go index e747bb6130e..9ffb1251268 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/client.go @@ -15,7 +15,7 @@ type ClusterRecoveryPointsClient struct { } func NewClusterRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/id_replicationprotectioncluster.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/id_replicationprotectioncluster.go index e450a3a007d..0c5a68d9240 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/id_replicationprotectioncluster.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/id_replicationprotectioncluster.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionClusterID(input string) (*ReplicationProtectionCl } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionClusterIDInsensitively(input string) (*Replicatio } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go index 616c1d7ff2b..4769a41a9ed 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_a2aclusterrecoverypointdetails.go @@ -15,6 +15,14 @@ type A2AClusterRecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ClusterProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterRecoveryPointDetails) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return BaseClusterProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterRecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2AClusterRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go index c874281e66a..7acdde185f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterproviderspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterProviderSpecificRecoveryPointDetails interface { + ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl } -// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterProviderSpecificRecoveryPointDetails = BaseClusterProviderSpecificRecoveryPointDetailsImpl{} + +type BaseClusterProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ClusterProviderSpecificRecoveryPointDetails = RawClusterProviderSpecificRecoveryPointDetailsImpl{} + +// RawClusterProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + clusterProviderSpecificRecoveryPointDetails BaseClusterProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { +func (s RawClusterProviderSpecificRecoveryPointDetailsImpl) ClusterProviderSpecificRecoveryPointDetails() BaseClusterProviderSpecificRecoveryPointDetailsImpl { + return s.clusterProviderSpecificRecoveryPointDetails +} + +func UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ClusterProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(input [] return out, nil } - out := RawClusterProviderSpecificRecoveryPointDetailsImpl{ + var parent BaseClusterProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterProviderSpecificRecoveryPointDetailsImpl: %+v", err) + } + + return RawClusterProviderSpecificRecoveryPointDetailsImpl{ + clusterProviderSpecificRecoveryPointDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go index 3cf865dc85a..6f5627bc5ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/model_clusterrecoverypointproperties.go @@ -47,7 +47,7 @@ func (s *ClusterRecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalClusterProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterRecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/version.go index 49247cb31bc..fed709cab79 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/clusterrecoverypoints/version.go @@ -1,12 +1,10 @@ package clusterrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterrecoverypoints/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/README.md index 2110da7808f..8a4fa90027b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints` Documentation -The `migrationrecoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `migrationrecoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/client.go index cfb6fea6947..a3234bd3411 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/client.go @@ -15,7 +15,7 @@ type MigrationRecoveryPointsClient struct { } func NewMigrationRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationRecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationrecoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationRecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go index c8bd50e4eac..f410c45fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_migrationrecoverypoint.go @@ -50,7 +50,7 @@ func ParseMigrationRecoveryPointID(input string) (*MigrationRecoveryPointId, err } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseMigrationRecoveryPointIDInsensitively(input string) (*MigrationRecover } id := MigrationRecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_replicationmigrationitem.go index a4731c018fb..9600ad57790 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/method_get.go index d7508adffa4..dc4d09d6440 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c MigrationRecoveryPointsClient) Get(ctx context.Context, id MigrationReco var model MigrationRecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/version.go index 932c10edf7c..23790e9604a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/migrationrecoverypoints/version.go @@ -1,12 +1,10 @@ package migrationrecoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationrecoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationrecoverypoints/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/README.md index 125582bbe9c..ac5d6d4e18c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/version.go index 29e45d29cd0..62ec5fe77b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/README.md index f03c0532ea1..0c1fc16c6eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints` Documentation -The `recoverypoints` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `recoverypoints` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/client.go index b6a8f2dda6b..56e764beced 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/client.go @@ -15,7 +15,7 @@ type RecoveryPointsClient struct { } func NewRecoveryPointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoveryPointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverypoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverypoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoveryPointsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_recoverypoint.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_recoverypoint.go index 289edee0f5a..c15553ae889 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_recoverypoint.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_recoverypoint.go @@ -50,7 +50,7 @@ func ParseRecoveryPointID(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRecoveryPointIDInsensitively(input string) (*RecoveryPointId, error) { } id := RecoveryPointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_replicationprotecteditem.go index ae17d00cd7e..9328f63622a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/method_get.go index e6084baef63..843b463fac6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/method_get.go @@ -45,7 +45,6 @@ func (c RecoveryPointsClient) Get(ctx context.Context, id RecoveryPointId) (resu var model RecoveryPoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_a2arecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_a2arecoverypointdetails.go index 759b8fbf2b4..339b8f2d0a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_a2arecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_a2arecoverypointdetails.go @@ -15,6 +15,14 @@ type A2ARecoveryPointDetails struct { RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ARecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARecoveryPointDetails{} @@ -28,9 +36,10 @@ func (s A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go index c4f33dd48fc..d97d0651905 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmageazurev2recoverypointdetails.go @@ -14,6 +14,14 @@ type InMageAzureV2RecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2RecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2RecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2RecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go index 3dfe05eb012..f0dcc4811be 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_inmagercmrecoverypointdetails.go @@ -14,6 +14,14 @@ type InMageRcmRecoveryPointDetails struct { IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` // Fields inherited from ProviderSpecificRecoveryPointDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmRecoveryPointDetails) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return BaseProviderSpecificRecoveryPointDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmRecoveryPointDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmRecoveryPointDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go index 9ebed7769b9..22798c437e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_providerspecificrecoverypointdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificRecoveryPointDetails interface { + ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl } -// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificRecoveryPointDetails = BaseProviderSpecificRecoveryPointDetailsImpl{} + +type BaseProviderSpecificRecoveryPointDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s +} + +var _ ProviderSpecificRecoveryPointDetails = RawProviderSpecificRecoveryPointDetailsImpl{} + +// RawProviderSpecificRecoveryPointDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificRecoveryPointDetailsImpl struct { - Type string - Values map[string]interface{} + providerSpecificRecoveryPointDetails BaseProviderSpecificRecoveryPointDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificRecoveryPointDetailsImpl) ProviderSpecificRecoveryPointDetails() BaseProviderSpecificRecoveryPointDetailsImpl { + return s.providerSpecificRecoveryPointDetails } -func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { +func UnmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) (ProviderSpecificRecoveryPointDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProviderSpecificRecoveryPointDetailsImplementation(input []byte) ( return out, nil } - out := RawProviderSpecificRecoveryPointDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificRecoveryPointDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificRecoveryPointDetailsImpl: %+v", err) } - return out, nil + + return RawProviderSpecificRecoveryPointDetailsImpl{ + providerSpecificRecoveryPointDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_recoverypointproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_recoverypointproperties.go index 69ba9472ece..095fa2ce745 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_recoverypointproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/model_recoverypointproperties.go @@ -47,7 +47,7 @@ func (s *RecoveryPointProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProviderSpecificRecoveryPointDetailsImplementation(v) + impl, err := UnmarshalProviderSpecificRecoveryPointDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RecoveryPointProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/version.go index 0a6ee560dd4..e58056cc4f2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/recoverypoints/version.go @@ -1,12 +1,10 @@ package recoverypoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverypoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverypoints/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/README.md index 0a702ff0838..ada5563f25e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings` Documentation -The `replicationalertsettings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationalertsettings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/client.go index 90dfb249642..6150bc2ecfa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/client.go @@ -15,7 +15,7 @@ type ReplicationAlertSettingsClient struct { } func NewReplicationAlertSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAlertSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationalertsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationalertsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAlertSettingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_replicationalertsetting.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_replicationalertsetting.go index 054bd8dfa7d..7d5b823679f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_replicationalertsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_replicationalertsetting.go @@ -44,7 +44,7 @@ func ParseReplicationAlertSettingID(input string) (*ReplicationAlertSettingId, e } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationAlertSettingIDInsensitively(input string) (*ReplicationAler } id := ReplicationAlertSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_vault.go index 592f9fd5d1b..7c0854af6a5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_create.go index c5062a603c6..8f2a9586892 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationAlertSettingsClient) Create(ctx context.Context, id Replicati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_get.go index 2a2ebdfb807..78834c0d17f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationAlertSettingsClient) Get(ctx context.Context, id ReplicationA var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/version.go index ff017a7cb61..f42cf63c0e8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationalertsettings/version.go @@ -1,12 +1,10 @@ package replicationalertsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationalertsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationalertsettings/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/README.md index 8dc4312c424..30ea7705fd8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances` Documentation -The `replicationappliances` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationappliances` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/client.go index 1618809f0e7..6a851868099 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/client.go @@ -15,7 +15,7 @@ type ReplicationAppliancesClient struct { } func NewReplicationAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationappliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationappliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationAppliancesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/id_vault.go index 5a22c625ee1..30dbb34e56f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/method_list.go index 7bb33ca2aa9..a8a0449c5c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_appliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_appliancespecificdetails.go index 634eae68ca2..f0124ade603 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_appliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_appliancespecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplianceSpecificDetails interface { + ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl } -// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplianceSpecificDetails = BaseApplianceSpecificDetailsImpl{} + +type BaseApplianceSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s +} + +var _ ApplianceSpecificDetails = RawApplianceSpecificDetailsImpl{} + +// RawApplianceSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplianceSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + applianceSpecificDetails BaseApplianceSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawApplianceSpecificDetailsImpl) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return s.applianceSpecificDetails } -func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { +func UnmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplianceSpecificDetailsImplementation(input []byte) (ApplianceSpe return out, nil } - out := RawApplianceSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseApplianceSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplianceSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawApplianceSpecificDetailsImpl{ + applianceSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go index 063308d1671..1dc38a9db93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_inmagercmappliancespecificdetails.go @@ -14,6 +14,14 @@ type InMageRcmApplianceSpecificDetails struct { Appliances *[]InMageRcmApplianceDetails `json:"appliances,omitempty"` // Fields inherited from ApplianceSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplianceSpecificDetails) ApplianceSpecificDetails() BaseApplianceSpecificDetailsImpl { + return BaseApplianceSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplianceSpecificDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplianceSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_replicationapplianceproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_replicationapplianceproperties.go index d814f948d89..ebb53f86713 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_replicationapplianceproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/model_replicationapplianceproperties.go @@ -22,7 +22,7 @@ func (s *ReplicationApplianceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplianceSpecificDetailsImplementation(v) + impl, err := UnmarshalApplianceSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationApplianceProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/version.go index bd8c4c526f5..becbceaa1ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationappliances/version.go @@ -1,12 +1,10 @@ package replicationappliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationappliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationappliances/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/README.md index 826f02f34b9..4f780e7180f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults` Documentation -The `replicationeligibilityresults` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationeligibilityresults` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/client.go index e7c9a6e1062..329a008dd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/client.go @@ -15,7 +15,7 @@ type ReplicationEligibilityResultsClient struct { } func NewReplicationEligibilityResultsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEligibilityResultsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationeligibilityresults", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEligibilityResultsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/id_virtualmachine.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/id_virtualmachine.go index 586d3b20c23..ce3cf13d070 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/id_virtualmachine.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/id_virtualmachine.go @@ -42,7 +42,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_get.go index 11d396bb8a1..b2c86ad7756 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) Get(ctx context.Context, id Virtual var model ReplicationEligibilityResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_list.go index e7fe1f0ae4d..5547cd4b49f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/method_list.go @@ -46,7 +46,6 @@ func (c ReplicationEligibilityResultsClient) List(ctx context.Context, id Virtua var model ReplicationEligibilityResultsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/version.go index b36eb2afd04..cc16d0dbed7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationeligibilityresults/version.go @@ -1,12 +1,10 @@ package replicationeligibilityresults -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationeligibilityresults/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationeligibilityresults/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/README.md index 37e4b35a046..aa63f1edeac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents` Documentation -The `replicationevents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationevents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/client.go index dc018af65fe..65b05326a32 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/client.go @@ -15,7 +15,7 @@ type ReplicationEventsClient struct { } func NewReplicationEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationEventsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_replicationevent.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_replicationevent.go index 34f8fba3c6b..108d2c6583c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_replicationevent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_replicationevent.go @@ -44,7 +44,7 @@ func ParseReplicationEventID(input string) (*ReplicationEventId, error) { } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationEventIDInsensitively(input string) (*ReplicationEventId, er } id := ReplicationEventId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_vault.go index 3a906897ca1..41e81fa3cd6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_get.go index 2d9a95a3761..c04ce4fb4ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationEventsClient) Get(ctx context.Context, id ReplicationEventId) var model Event result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_list.go index d9b820e0cab..d53ecc1e068 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_a2aeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_a2aeventdetails.go index 367f037825d..1fdd6f86eef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_a2aeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_a2aeventdetails.go @@ -19,6 +19,14 @@ type A2AEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEventDetails{} @@ -32,9 +40,10 @@ func (s A2AEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEventDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproperties.go index 0f9a16c5443..89b94fb15d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproperties.go @@ -62,7 +62,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["eventSpecificDetails"]; ok { - impl, err := unmarshalEventSpecificDetailsImplementation(v) + impl, err := UnmarshalEventSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EventSpecificDetails' for 'EventProperties': %+v", err) } @@ -70,7 +70,7 @@ func (s *EventProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEventProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalEventProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EventProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproviderspecificdetails.go index b87f2209a77..64316ae4b0e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventProviderSpecificDetails interface { + EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl } -// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventProviderSpecificDetails = BaseEventProviderSpecificDetailsImpl{} + +type BaseEventProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s +} + +var _ EventProviderSpecificDetails = RawEventProviderSpecificDetailsImpl{} + +// RawEventProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventProviderSpecificDetails BaseEventProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventProviderSpecificDetailsImpl) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return s.eventProviderSpecificDetails } -func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { +func UnmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalEventProviderSpecificDetailsImplementation(input []byte) (EventPro return out, nil } - out := RawEventProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventProviderSpecificDetailsImpl{ + eventProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventspecificdetails.go index d1da24b3661..d568f1aa011 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_eventspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSpecificDetails interface { + EventSpecificDetails() BaseEventSpecificDetailsImpl } -// RawEventSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSpecificDetails = BaseEventSpecificDetailsImpl{} + +type BaseEventSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s +} + +var _ EventSpecificDetails = RawEventSpecificDetailsImpl{} + +// RawEventSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + eventSpecificDetails BaseEventSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSpecificDetailsImpl) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return s.eventSpecificDetails } -func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { +func UnmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventSpecificDetailsImplementation(input []byte) (EventSpecificDet return out, nil } - out := RawEventSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseEventSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawEventSpecificDetailsImpl{ + eventSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012eventdetails.go index 94a69b46715..515da58c7c4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go index 967ef27775b..9b702881f52 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplica2012r2eventdetails.go @@ -17,6 +17,14 @@ type HyperVReplica2012R2EventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplica2012R2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplica2012R2EventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplica2012R2EventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicaazureeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicaazureeventdetails.go index 6294a98f428..116628f1e3c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicaazureeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicaazureeventdetails.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureEventDetails struct { RemoteContainerName *string `json:"remoteContainerName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEventDetails{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicabaseeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicabaseeventdetails.go index 910ff1b95e8..213dc282ec0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicabaseeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_hypervreplicabaseeventdetails.go @@ -17,6 +17,14 @@ type HyperVReplicaBaseEventDetails struct { RemoteFabricName *string `json:"remoteFabricName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseEventDetails{} @@ -30,9 +38,10 @@ func (s HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseEventDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseEventDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmageazurev2eventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmageazurev2eventdetails.go index 57570a28989..983bdac1c99 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmageazurev2eventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmageazurev2eventdetails.go @@ -20,6 +20,14 @@ type InMageAzureV2EventDetails struct { Summary *string `json:"summary,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EventDetails{} @@ -33,9 +41,10 @@ func (s InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EventDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmeventdetails.go index 4e7e36ac753..6a9d920bb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmeventdetails.go @@ -21,6 +21,14 @@ type InMageRcmEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEventDetails{} @@ -34,9 +42,10 @@ func (s InMageRcmEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmfailbackeventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmfailbackeventdetails.go index 353002fa657..e8a1f913af4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmfailbackeventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_inmagercmfailbackeventdetails.go @@ -18,6 +18,14 @@ type InMageRcmFailbackEventDetails struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackEventDetails{} @@ -31,9 +39,10 @@ func (s InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackEventDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_jobstatuseventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_jobstatuseventdetails.go index 26e8104f7cd..4920df2048e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_jobstatuseventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_jobstatuseventdetails.go @@ -17,6 +17,14 @@ type JobStatusEventDetails struct { JobStatus *string `json:"jobStatus,omitempty"` // Fields inherited from EventSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobStatusEventDetails) EventSpecificDetails() BaseEventSpecificDetailsImpl { + return BaseEventSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobStatusEventDetails{} @@ -30,9 +38,10 @@ func (s JobStatusEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobStatusEventDetails: %+v", err) } + decoded["instanceType"] = "JobStatus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_vmwarecbteventdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_vmwarecbteventdetails.go index fac0b6257cd..410c87a3b1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_vmwarecbteventdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/model_vmwarecbteventdetails.go @@ -14,6 +14,14 @@ type VMwareCbtEventDetails struct { MigrationItemName *string `json:"migrationItemName,omitempty"` // Fields inherited from EventProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEventDetails) EventProviderSpecificDetails() BaseEventProviderSpecificDetailsImpl { + return BaseEventProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEventDetails{} @@ -27,9 +35,10 @@ func (s VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEventDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/version.go index 492d5c0cc31..775ea9cf924 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationevents/version.go @@ -1,12 +1,10 @@ package replicationevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationevents/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md index 4c0d2ee8798..65230facb45 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics` Documentation -The `replicationfabrics` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationfabrics` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go index 678ea71a639..70508d500a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/client.go @@ -15,7 +15,7 @@ type ReplicationFabricsClient struct { } func NewReplicationFabricsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationFabricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationfabrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationfabrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationFabricsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go index fe15a256507..78812d1d8c7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go index 2246edbb265..fc14a1f9b44 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go index b7aa7e1fc64..4ddb027258c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ReplicationFabricsClient) Get(ctx context.Context, id ReplicationFabricI var model Fabric result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go index 916dcdb0b32..738d129adb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabriccreationinput.go @@ -14,6 +14,14 @@ type AzureFabricCreationInput struct { Location *string `json:"location,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricCreationInput{} @@ -27,9 +35,10 @@ func (s AzureFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricCreationInput: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go index 367bc0a49ce..e654364c02c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_azurefabricspecificdetails.go @@ -18,6 +18,14 @@ type AzureFabricSpecificDetails struct { Zones *[]A2AZoneDetails `json:"zones,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s AzureFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureFabricSpecificDetails{} @@ -31,9 +39,10 @@ func (s AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "Azure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go index 5af8a2ed128..f7cae3139ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabriccreationinputproperties.go @@ -22,7 +22,7 @@ func (s *FabricCreationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificCreationInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreationInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricCreationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go index b0392225021..43ec1b3a055 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricproperties.go @@ -42,7 +42,7 @@ func (s *FabricProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalFabricSpecificDetailsImplementation(v) + impl, err := UnmarshalFabricSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'FabricProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go index 8dbde38163b..43e06351c80 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificcreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreationInput interface { + FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl } -// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreationInput = BaseFabricSpecificCreationInputImpl{} + +type BaseFabricSpecificCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s +} + +var _ FabricSpecificCreationInput = RawFabricSpecificCreationInputImpl{} + +// RawFabricSpecificCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreationInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreationInput BaseFabricSpecificCreationInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreationInputImpl) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return s.fabricSpecificCreationInput } -func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { +func UnmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpecificCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreationInputImplementation(input []byte) (FabricSpe return out, nil } - out := RawFabricSpecificCreationInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreationInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreationInputImpl{ + fabricSpecificCreationInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go index 2a06cf9d120..1ce163b79ee 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_fabricspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificDetails interface { + FabricSpecificDetails() BaseFabricSpecificDetailsImpl } -// RawFabricSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificDetails = BaseFabricSpecificDetailsImpl{} + +type BaseFabricSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s +} + +var _ FabricSpecificDetails = RawFabricSpecificDetailsImpl{} + +// RawFabricSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + fabricSpecificDetails BaseFabricSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificDetailsImpl) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return s.fabricSpecificDetails } -func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { +func UnmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalFabricSpecificDetailsImplementation(input []byte) (FabricSpecificD return out, nil } - out := RawFabricSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawFabricSpecificDetailsImpl{ + fabricSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go index 293057fa1f0..35716f3e90a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_hypervsitedetails.go @@ -14,6 +14,14 @@ type HyperVSiteDetails struct { HyperVHosts *[]HyperVHostDetails `json:"hyperVHosts,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVSiteDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVSiteDetails{} @@ -27,9 +35,10 @@ func (s HyperVSiteDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVSiteDetails: %+v", err) } + decoded["instanceType"] = "HyperVSite" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go index 6e169783cd2..9e072625014 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabriccreationinput.go @@ -16,6 +16,14 @@ type InMageRcmFabricCreationInput struct { VMwareSiteId string `json:"vmwareSiteId"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricCreationInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go index 6d4749c4c1c..4e138321c6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_inmagercmfabricspecificdetails.go @@ -29,6 +29,14 @@ type InMageRcmFabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFabricSpecificDetails{} @@ -42,9 +50,10 @@ func (s InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go index f96234c1306..cb33769db25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmmdetails.go @@ -13,6 +13,14 @@ var _ FabricSpecificDetails = VMmDetails{} type VMmDetails struct { // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMmDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmDetails{} @@ -26,9 +34,10 @@ func (s VMmDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmDetails: %+v", err) } + decoded["instanceType"] = "VMM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go index ff61dc7f3c5..097a880d515 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwaredetails.go @@ -46,6 +46,14 @@ type VMwareDetails struct { WebLoadStatus *string `json:"webLoadStatus,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareDetails{} @@ -59,9 +67,10 @@ func (s VMwareDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareDetails: %+v", err) } + decoded["instanceType"] = "VMware" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go index 0c0e41a8b05..16600cfb322 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabriccreationinput.go @@ -16,6 +16,14 @@ type VMwareV2FabricCreationInput struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricCreationInput) FabricSpecificCreationInput() BaseFabricSpecificCreationInputImpl { + return BaseFabricSpecificCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go index ea49db85b19..5ff33f8b551 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/model_vmwarev2fabricspecificdetails.go @@ -20,6 +20,14 @@ type VMwareV2FabricSpecificDetails struct { VMwareSiteId *string `json:"vmwareSiteId,omitempty"` // Fields inherited from FabricSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareV2FabricSpecificDetails) FabricSpecificDetails() BaseFabricSpecificDetailsImpl { + return BaseFabricSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareV2FabricSpecificDetails{} @@ -33,9 +41,10 @@ func (s VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareV2FabricSpecificDetails: %+v", err) } + decoded["instanceType"] = "VMwareV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go index c1a3c00a9de..f9f10a594b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationfabrics/version.go @@ -1,12 +1,10 @@ package replicationfabrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationfabrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationfabrics/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/README.md index d0e17e187ed..8ed38c2889a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs` Documentation -The `replicationjobs` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationjobs` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/client.go index bac1b5424c2..0fb616b34c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/client.go @@ -15,7 +15,7 @@ type ReplicationJobsClient struct { } func NewReplicationJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationJobsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_replicationjob.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_replicationjob.go index d85cd993668..8efedf8f222 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_replicationjob.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_replicationjob.go @@ -44,7 +44,7 @@ func ParseReplicationJobID(input string) (*ReplicationJobId, error) { } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationJobIDInsensitively(input string) (*ReplicationJobId, error) } id := ReplicationJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_vault.go index f48fe79d329..b84d521c5b1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_get.go index 5f996550c56..87300753784 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationJobsClient) Get(ctx context.Context, id ReplicationJobId) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_list.go index d95ff537514..2ff295118f8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrjobdetails.go index 613b2519e8b..7f4aa5f741b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrjobdetails.go @@ -13,7 +13,16 @@ var _ JobDetails = AsrJobDetails{} type AsrJobDetails struct { // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s AsrJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AsrJobDetails{} @@ -27,9 +36,10 @@ func (s AsrJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AsrJobDetails: %+v", err) } + decoded["instanceType"] = "AsrJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrtask.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrtask.go index 6837661d7bf..0b0077b7b91 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrtask.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_asrtask.go @@ -76,7 +76,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalTaskTypeDetailsImplementation(v) + impl, err := UnmarshalTaskTypeDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ASRTask': %+v", err) } @@ -84,7 +84,7 @@ func (s *ASRTask) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["groupTaskCustomDetails"]; ok { - impl, err := unmarshalGroupTaskDetailsImplementation(v) + impl, err := UnmarshalGroupTaskDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'GroupTaskCustomDetails' for 'ASRTask': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_automationrunbooktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_automationrunbooktaskdetails.go index 902491069ab..8e3ea451afe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_automationrunbooktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_automationrunbooktaskdetails.go @@ -22,6 +22,14 @@ type AutomationRunbookTaskDetails struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s AutomationRunbookTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AutomationRunbookTaskDetails{} @@ -35,9 +43,10 @@ func (s AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRunbookTaskDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterfailoverjobdetails.go index a22ef7c44e1..e7e4b56cb58 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterfailoverjobdetails.go @@ -14,7 +14,16 @@ type ClusterFailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterFailoverJobDetails{} @@ -28,9 +37,10 @@ func (s ClusterFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterswitchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterswitchprotectionjobdetails.go index fe9e373c7ef..48238d85340 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterswitchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clusterswitchprotectionjobdetails.go @@ -14,7 +14,16 @@ type ClusterSwitchProtectionJobDetails struct { NewReplicationProtectionClusterId *string `json:"newReplicationProtectionClusterId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterSwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterSwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s ClusterSwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterSwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterSwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clustertestfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clustertestfailoverjobdetails.go index 6c56b8f2e5f..fd3d258a382 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clustertestfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_clustertestfailoverjobdetails.go @@ -19,7 +19,16 @@ type ClusterTestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ClusterTestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ClusterTestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s ClusterTestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ClusterTestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "ClusterTestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_consistencychecktaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_consistencychecktaskdetails.go index 2a2ee8d055d..4e945c5c362 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_consistencychecktaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_consistencychecktaskdetails.go @@ -14,6 +14,14 @@ type ConsistencyCheckTaskDetails struct { VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ConsistencyCheckTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ConsistencyCheckTaskDetails{} @@ -27,9 +35,10 @@ func (s ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConsistencyCheckTaskDetails: %+v", err) } + decoded["instanceType"] = "ConsistencyCheckTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_exportjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_exportjobdetails.go index eb560e96f4f..4f6a728cb67 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_exportjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_exportjobdetails.go @@ -15,7 +15,16 @@ type ExportJobDetails struct { SasToken *string `json:"sasToken,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s ExportJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ExportJobDetails{} @@ -29,9 +38,10 @@ func (s ExportJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExportJobDetails: %+v", err) } + decoded["instanceType"] = "ExportJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go index 36b762f33e1..9c64ad0db35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_fabricreplicationgrouptaskdetails.go @@ -14,8 +14,15 @@ type FabricReplicationGroupTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s FabricReplicationGroupTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FabricReplicationGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FabricReplicationGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "FabricReplicationGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_failoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_failoverjobdetails.go index ef618276ce2..512eb079845 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_failoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_failoverjobdetails.go @@ -14,7 +14,16 @@ type FailoverJobDetails struct { ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s FailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = FailoverJobDetails{} @@ -28,9 +37,10 @@ func (s FailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FailoverJobDetails: %+v", err) } + decoded["instanceType"] = "FailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_grouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_grouptaskdetails.go index 5ba48b384a2..f79748a182a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_grouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_grouptaskdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GroupTaskDetails interface { + GroupTaskDetails() BaseGroupTaskDetailsImpl } -// RawGroupTaskDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GroupTaskDetails = BaseGroupTaskDetailsImpl{} + +type BaseGroupTaskDetailsImpl struct { + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s +} + +var _ GroupTaskDetails = RawGroupTaskDetailsImpl{} + +// RawGroupTaskDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGroupTaskDetailsImpl struct { - Type string - Values map[string]interface{} + groupTaskDetails BaseGroupTaskDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawGroupTaskDetailsImpl) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return s.groupTaskDetails } -func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { +func UnmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalGroupTaskDetailsImplementation(input []byte) (GroupTaskDetails, er return out, nil } - out := RawGroupTaskDetailsImpl{ - Type: value, - Values: temp, + var parent BaseGroupTaskDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGroupTaskDetailsImpl: %+v", err) } - return out, nil + + return RawGroupTaskDetailsImpl{ + groupTaskDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_inlineworkflowtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_inlineworkflowtaskdetails.go index 1f7381153e8..dc281023cd2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_inlineworkflowtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_inlineworkflowtaskdetails.go @@ -14,7 +14,16 @@ type InlineWorkflowTaskDetails struct { WorkflowIds *[]string `json:"workflowIds,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s InlineWorkflowTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InlineWorkflowTaskDetails{} @@ -28,9 +37,10 @@ func (s InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InlineWorkflowTaskDetails: %+v", err) } + decoded["instanceType"] = "InlineWorkflowTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobdetails.go index 789db9326ce..aae398ebc8b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobdetails.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type JobDetails interface { + JobDetails() BaseJobDetailsImpl } -// RawJobDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ JobDetails = BaseJobDetailsImpl{} + +type BaseJobDetailsImpl struct { + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s BaseJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s +} + +var _ JobDetails = RawJobDetailsImpl{} + +// RawJobDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawJobDetailsImpl struct { - Type string - Values map[string]interface{} + jobDetails BaseJobDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawJobDetailsImpl) JobDetails() BaseJobDetailsImpl { + return s.jobDetails } -func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { +func UnmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { if input == nil { return nil, nil } @@ -100,10 +118,15 @@ func unmarshalJobDetailsImplementation(input []byte) (JobDetails, error) { return out, nil } - out := RawJobDetailsImpl{ - Type: value, - Values: temp, + var parent BaseJobDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseJobDetailsImpl: %+v", err) } - return out, nil + + return RawJobDetailsImpl{ + jobDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobproperties.go index 8e5b41fb325..07b61f2600d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobproperties.go @@ -81,7 +81,7 @@ func (s *JobProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalJobDetailsImplementation(v) + impl, err := UnmarshalJobDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'JobProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobtaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobtaskdetails.go index 40a3d24c0d0..3ef70d2bc39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobtaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_jobtaskdetails.go @@ -14,6 +14,14 @@ type JobTaskDetails struct { JobTask *JobEntity `json:"jobTask,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s JobTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = JobTaskDetails{} @@ -27,9 +35,10 @@ func (s JobTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JobTaskDetails: %+v", err) } + decoded["instanceType"] = "JobTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_manualactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_manualactiontaskdetails.go index 9477eb93f5c..6b274494184 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_manualactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_manualactiontaskdetails.go @@ -16,6 +16,14 @@ type ManualActionTaskDetails struct { Observation *string `json:"observation,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ManualActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ManualActionTaskDetails{} @@ -29,9 +37,10 @@ func (s ManualActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManualActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ManualActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go index 5a55423d4da..6eab9e8093b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplangrouptaskdetails.go @@ -16,7 +16,16 @@ type RecoveryPlanGroupTaskDetails struct { RpGroupType *string `json:"rpGroupType,omitempty"` // Fields inherited from GroupTaskDetails - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanGroupTaskDetails{} @@ -30,9 +39,10 @@ func (s RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go index 5ce8bf8aade..cd81c6460c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_recoveryplanshutdowngrouptaskdetails.go @@ -12,10 +12,17 @@ var _ GroupTaskDetails = RecoveryPlanShutdownGroupTaskDetails{} type RecoveryPlanShutdownGroupTaskDetails struct { - // Fields inherited from RecoveryPlanGroupTaskDetails - GroupId *string `json:"groupId,omitempty"` - Name *string `json:"name,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + // Fields inherited from GroupTaskDetails + + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanShutdownGroupTaskDetails) GroupTaskDetails() BaseGroupTaskDetailsImpl { + return BaseGroupTaskDetailsImpl{ + ChildTasks: s.ChildTasks, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanShutdownGroupTaskDetails{} @@ -29,9 +36,10 @@ func (s RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanShutdownGroupTaskDetails: %+v", err) } + decoded["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_scriptactiontaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_scriptactiontaskdetails.go index cf231b16ade..0c01efcc79a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_scriptactiontaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_scriptactiontaskdetails.go @@ -17,6 +17,14 @@ type ScriptActionTaskDetails struct { Path *string `json:"path,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s ScriptActionTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ScriptActionTaskDetails{} @@ -30,9 +38,10 @@ func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptActionTaskDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_switchprotectionjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_switchprotectionjobdetails.go index 31c8d2201f6..396de18f8eb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_switchprotectionjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_switchprotectionjobdetails.go @@ -14,7 +14,16 @@ type SwitchProtectionJobDetails struct { NewReplicationProtectedItemId *string `json:"newReplicationProtectedItemId,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s SwitchProtectionJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = SwitchProtectionJobDetails{} @@ -28,9 +37,10 @@ func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SwitchProtectionJobDetails: %+v", err) } + decoded["instanceType"] = "SwitchProtectionJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_tasktypedetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_tasktypedetails.go index fe8ac86fed8..d2a857a44fc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_tasktypedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_tasktypedetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TaskTypeDetails interface { + TaskTypeDetails() BaseTaskTypeDetailsImpl } -// RawTaskTypeDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TaskTypeDetails = BaseTaskTypeDetailsImpl{} + +type BaseTaskTypeDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s +} + +var _ TaskTypeDetails = RawTaskTypeDetailsImpl{} + +// RawTaskTypeDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTaskTypeDetailsImpl struct { - Type string - Values map[string]interface{} + taskTypeDetails BaseTaskTypeDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawTaskTypeDetailsImpl) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return s.taskTypeDetails } -func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { +func UnmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalTaskTypeDetailsImplementation(input []byte) (TaskTypeDetails, erro return out, nil } - out := RawTaskTypeDetailsImpl{ - Type: value, - Values: temp, + var parent BaseTaskTypeDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTaskTypeDetailsImpl: %+v", err) } - return out, nil + + return RawTaskTypeDetailsImpl{ + taskTypeDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_testfailoverjobdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_testfailoverjobdetails.go index 63502161e0a..60e90887c9e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_testfailoverjobdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_testfailoverjobdetails.go @@ -19,7 +19,16 @@ type TestFailoverJobDetails struct { TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` // Fields inherited from JobDetails + AffectedObjectDetails *map[string]string `json:"affectedObjectDetails,omitempty"` + InstanceType string `json:"instanceType"` +} + +func (s TestFailoverJobDetails) JobDetails() BaseJobDetailsImpl { + return BaseJobDetailsImpl{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } } var _ json.Marshaler = TestFailoverJobDetails{} @@ -33,9 +42,10 @@ func (s TestFailoverJobDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TestFailoverJobDetails: %+v", err) } + decoded["instanceType"] = "TestFailoverJobDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_virtualmachinetaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_virtualmachinetaskdetails.go index 42726d08363..0bed7483e0a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_virtualmachinetaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_virtualmachinetaskdetails.go @@ -14,8 +14,15 @@ type VirtualMachineTaskDetails struct { SkippedReason *string `json:"skippedReason,omitempty"` SkippedReasonString *string `json:"skippedReasonString,omitempty"` - // Fields inherited from JobTaskDetails - JobTask *JobEntity `json:"jobTask,omitempty"` + // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VirtualMachineTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VirtualMachineTaskDetails{} @@ -29,9 +36,10 @@ func (s VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTaskDetails: %+v", err) } + decoded["instanceType"] = "VirtualMachineTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_vmnicupdatestaskdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_vmnicupdatestaskdetails.go index ea5fa8cb61a..e20168ec669 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_vmnicupdatestaskdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/model_vmnicupdatestaskdetails.go @@ -16,6 +16,14 @@ type VMNicUpdatesTaskDetails struct { VMId *string `json:"vmId,omitempty"` // Fields inherited from TaskTypeDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMNicUpdatesTaskDetails) TaskTypeDetails() BaseTaskTypeDetailsImpl { + return BaseTaskTypeDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMNicUpdatesTaskDetails{} @@ -29,9 +37,10 @@ func (s VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMNicUpdatesTaskDetails: %+v", err) } + decoded["instanceType"] = "VmNicUpdatesTaskDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/version.go index 7a549783b81..bcbac8e48bb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationjobs/version.go @@ -1,12 +1,10 @@ package replicationjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationjobs/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/README.md index 9b055252504..1f51d93268b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks` Documentation -The `replicationlogicalnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationlogicalnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/client.go index ee0248503a3..c3f18b03d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationLogicalNetworksClient struct { } func NewReplicationLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLogicalNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlogicalnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLogicalNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationfabric.go index 5ce04d1386c..d740f596228 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go index 049d603a646..eac89fd3a17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/id_replicationlogicalnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationLogicalNetworkID(input string) (*ReplicationLogicalNetworkI } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLogicalNetworkIDInsensitively(input string) (*ReplicationLo } id := ReplicationLogicalNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/method_get.go index b5f9e70b734..c6334546f1e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLogicalNetworksClient) Get(ctx context.Context, id Replicatio var model LogicalNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/version.go index 1fb2e3829f8..32ddf047965 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationlogicalnetworks/version.go @@ -1,12 +1,10 @@ package replicationlogicalnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlogicalnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlogicalnetworks/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/README.md index 4b70a50714a..433bb3be531 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems` Documentation -The `replicationmigrationitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationmigrationitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/client.go index 407c7fd8d2c..65aedf397c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/client.go @@ -15,7 +15,7 @@ type ReplicationMigrationItemsClient struct { } func NewReplicationMigrationItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationMigrationItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationmigrationitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationmigrationitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationMigrationItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationmigrationitem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationmigrationitem.go index 0fa4baea355..d2bec5f22b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationmigrationitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationmigrationitem.go @@ -48,7 +48,7 @@ func ParseReplicationMigrationItemID(input string) (*ReplicationMigrationItemId, } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationMigrationItemIDInsensitively(input string) (*ReplicationMig } id := ReplicationMigrationItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go index feb8af58ab3..1d93749e437 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_vault.go index 583f73d073f..e660297893a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_delete.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_delete.go index 5a4c9cf0e48..f156c86538f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_delete.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_get.go index 10c5ef4e383..3baac2bfc90 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationMigrationItemsClient) Get(ctx context.Context, id Replication var model MigrationItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_list.go index 133fc43de9d..ce56fbeda81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go index 11d5ad86382..c2c9399a4ab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/method_listbyreplicationprotectioncontainers.go @@ -41,6 +41,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go index 49ca92b996e..6d5a3a6f70b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationinputproperties.go @@ -30,7 +30,7 @@ func (s *EnableMigrationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableMigrationProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableMigrationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableMigrationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go index 73cd5957a66..d3317b44d15 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_enablemigrationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableMigrationProviderSpecificInput interface { + EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl } -// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableMigrationProviderSpecificInput = BaseEnableMigrationProviderSpecificInputImpl{} + +type BaseEnableMigrationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s +} + +var _ EnableMigrationProviderSpecificInput = RawEnableMigrationProviderSpecificInputImpl{} + +// RawEnableMigrationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableMigrationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableMigrationProviderSpecificInput BaseEnableMigrationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableMigrationProviderSpecificInputImpl) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return s.enableMigrationProviderSpecificInput } -func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { +func UnmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) (EnableMigrationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEnableMigrationProviderSpecificInputImplementation(input []byte) ( return out, nil } - out := RawEnableMigrationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableMigrationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableMigrationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableMigrationProviderSpecificInputImpl{ + enableMigrationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateinputproperties.go index 3b1bf018068..7935807c561 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateinputproperties.go @@ -22,7 +22,7 @@ func (s *MigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go index 73a6bcd8bc7..8341e773d72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrateProviderSpecificInput interface { + MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl } -// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrateProviderSpecificInput = BaseMigrateProviderSpecificInputImpl{} + +type BaseMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s +} + +var _ MigrateProviderSpecificInput = RawMigrateProviderSpecificInputImpl{} + +// RawMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + migrateProviderSpecificInput BaseMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrateProviderSpecificInputImpl) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return s.migrateProviderSpecificInput } -func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { +func UnmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrateProviderSpecificInputImplementation(input []byte) (MigrateP return out, nil } - out := RawMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawMigrateProviderSpecificInputImpl{ + migrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationitemproperties.go index 76e077d7bde..b5b740c9cf2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationitemproperties.go @@ -93,7 +93,7 @@ func (s *MigrationItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalMigrationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalMigrationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'MigrationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go index a6a75af2819..c1db6d5707f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_migrationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MigrationProviderSpecificSettings interface { + MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl } -// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ MigrationProviderSpecificSettings = BaseMigrationProviderSpecificSettingsImpl{} + +type BaseMigrationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s +} + +var _ MigrationProviderSpecificSettings = RawMigrationProviderSpecificSettingsImpl{} + +// RawMigrationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawMigrationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + migrationProviderSpecificSettings BaseMigrationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawMigrationProviderSpecificSettingsImpl) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return s.migrationProviderSpecificSettings } -func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { +func UnmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (MigrationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalMigrationProviderSpecificSettingsImplementation(input []byte) (Mig return out, nil } - out := RawMigrationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseMigrationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseMigrationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawMigrationProviderSpecificSettingsImpl{ + migrationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go index 2f4cf233728..f8e39e35429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationinputproperties.go @@ -22,7 +22,7 @@ func (s *ResumeReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResumeReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalResumeReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResumeReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go index d2fc33ca6a7..2a51ac5bdb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resumereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResumeReplicationProviderSpecificInput interface { + ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl } -// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResumeReplicationProviderSpecificInput = BaseResumeReplicationProviderSpecificInputImpl{} + +type BaseResumeReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s +} + +var _ ResumeReplicationProviderSpecificInput = RawResumeReplicationProviderSpecificInputImpl{} + +// RawResumeReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResumeReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resumeReplicationProviderSpecificInput BaseResumeReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResumeReplicationProviderSpecificInputImpl) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return s.resumeReplicationProviderSpecificInput } -func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { +func UnmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) (ResumeReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResumeReplicationProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawResumeReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResumeReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResumeReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResumeReplicationProviderSpecificInputImpl{ + resumeReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncinputproperties.go index a440510e3b9..9e4bc50efff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncinputproperties.go @@ -22,7 +22,7 @@ func (s *ResyncInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalResyncProviderSpecificInputImplementation(v) + impl, err := UnmarshalResyncProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ResyncInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go index e07bca951f1..b45ead7e75b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_resyncproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResyncProviderSpecificInput interface { + ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl } -// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResyncProviderSpecificInput = BaseResyncProviderSpecificInputImpl{} + +type BaseResyncProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s +} + +var _ ResyncProviderSpecificInput = RawResyncProviderSpecificInputImpl{} + +// RawResyncProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResyncProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + resyncProviderSpecificInput BaseResyncProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawResyncProviderSpecificInputImpl) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return s.resyncProviderSpecificInput } -func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { +func UnmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalResyncProviderSpecificInputImplementation(input []byte) (ResyncPro return out, nil } - out := RawResyncProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseResyncProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResyncProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawResyncProviderSpecificInputImpl{ + resyncProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateinputproperties.go index 5453572f37d..47d7883ded7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateinputproperties.go @@ -22,7 +22,7 @@ func (s *TestMigrateInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestMigrateProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestMigrateProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestMigrateInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go index 16161329aca..ada738bdbbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_testmigrateproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestMigrateProviderSpecificInput interface { + TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl } -// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestMigrateProviderSpecificInput = BaseTestMigrateProviderSpecificInputImpl{} + +type BaseTestMigrateProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s +} + +var _ TestMigrateProviderSpecificInput = RawTestMigrateProviderSpecificInputImpl{} + +// RawTestMigrateProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestMigrateProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testMigrateProviderSpecificInput BaseTestMigrateProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestMigrateProviderSpecificInputImpl) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return s.testMigrateProviderSpecificInput } -func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { +func UnmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (TestMigrateProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalTestMigrateProviderSpecificInputImplementation(input []byte) (Test return out, nil } - out := RawTestMigrateProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestMigrateProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestMigrateProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestMigrateProviderSpecificInputImpl{ + testMigrateProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go index 59b86ba8b1e..bb89c8e1585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationiteminputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateMigrationItemInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateMigrationItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go index 9cf525c155d..eca38331f6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_updatemigrationitemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateMigrationItemProviderSpecificInput interface { + UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl } -// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateMigrationItemProviderSpecificInput = BaseUpdateMigrationItemProviderSpecificInputImpl{} + +type BaseUpdateMigrationItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s +} + +var _ UpdateMigrationItemProviderSpecificInput = RawUpdateMigrationItemProviderSpecificInputImpl{} + +// RawUpdateMigrationItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateMigrationItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateMigrationItemProviderSpecificInput BaseUpdateMigrationItemProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUpdateMigrationItemProviderSpecificInputImpl) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return s.updateMigrationItemProviderSpecificInput } -func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { +func UnmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byte) (UpdateMigrationItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateMigrationItemProviderSpecificInputImplementation(input []byt return out, nil } - out := RawUpdateMigrationItemProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUpdateMigrationItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateMigrationItemProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUpdateMigrationItemProviderSpecificInputImpl{ + updateMigrationItemProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go index f1dbe9331a9..312133d3257 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtenablemigrationinput.go @@ -40,6 +40,14 @@ type VMwareCbtEnableMigrationInput struct { VMwareMachineId string `json:"vmwareMachineId"` // Fields inherited from EnableMigrationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtEnableMigrationInput) EnableMigrationProviderSpecificInput() BaseEnableMigrationProviderSpecificInputImpl { + return BaseEnableMigrationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtEnableMigrationInput{} @@ -53,9 +61,10 @@ func (s VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtEnableMigrationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go index ebb80af4854..5c7c3385146 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrateinput.go @@ -16,6 +16,14 @@ type VMwareCbtMigrateInput struct { PostMigrationSteps *[]ManagedRunCommandScriptInput `json:"postMigrationSteps,omitempty"` // Fields inherited from MigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrateInput) MigrateProviderSpecificInput() BaseMigrateProviderSpecificInputImpl { + return BaseMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrateInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go index 6d2098860c7..5e53a8342bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtmigrationdetails.go @@ -62,6 +62,14 @@ type VMwareCbtMigrationDetails struct { VMwareMachineId *string `json:"vmwareMachineId,omitempty"` // Fields inherited from MigrationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtMigrationDetails) MigrationProviderSpecificSettings() BaseMigrationProviderSpecificSettingsImpl { + return BaseMigrationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtMigrationDetails{} @@ -75,9 +83,10 @@ func (s VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtMigrationDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go index bd5bb9ebae3..1c6cf9977e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresumereplicationinput.go @@ -14,6 +14,14 @@ type VMwareCbtResumeReplicationInput struct { DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` // Fields inherited from ResumeReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResumeReplicationInput) ResumeReplicationProviderSpecificInput() BaseResumeReplicationProviderSpecificInputImpl { + return BaseResumeReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResumeReplicationInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResumeReplicationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go index 98d37a993f1..f5b5c166ad1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtresyncinput.go @@ -14,6 +14,14 @@ type VMwareCbtResyncInput struct { SkipCbtReset string `json:"skipCbtReset"` // Fields inherited from ResyncProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtResyncInput) ResyncProviderSpecificInput() BaseResyncProviderSpecificInputImpl { + return BaseResyncProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtResyncInput{} @@ -27,9 +35,10 @@ func (s VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtResyncInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go index 7fae4b5a824..0ec2adcc035 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbttestmigrateinput.go @@ -18,6 +18,14 @@ type VMwareCbtTestMigrateInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from TestMigrateProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtTestMigrateInput) TestMigrateProviderSpecificInput() BaseTestMigrateProviderSpecificInputImpl { + return BaseTestMigrateProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtTestMigrateInput{} @@ -31,9 +39,10 @@ func (s VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtTestMigrateInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go index fdf987570ce..3b7afac506f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/model_vmwarecbtupdatemigrationiteminput.go @@ -31,6 +31,14 @@ type VMwareCbtUpdateMigrationItemInput struct { VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateMigrationItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtUpdateMigrationItemInput) UpdateMigrationItemProviderSpecificInput() BaseUpdateMigrationItemProviderSpecificInputImpl { + return BaseUpdateMigrationItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtUpdateMigrationItemInput{} @@ -44,9 +52,10 @@ func (s VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtUpdateMigrationItemInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/version.go index 5846558bec6..2d00717987e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationmigrationitems/version.go @@ -1,12 +1,10 @@ package replicationmigrationitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationmigrationitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationmigrationitems/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md index c741754deab..c435a05e21d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings` Documentation -The `replicationnetworkmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationnetworkmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go index 13d44a2d8e7..abd39f3fa7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/client.go @@ -15,7 +15,7 @@ type ReplicationNetworkMappingsClient struct { } func NewReplicationNetworkMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworkMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworkmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworkMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go index 6d317ee3176..8fb89a87fb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go index ba8adb7495e..c6275c9a7af 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_replicationnetworkmapping.go @@ -48,7 +48,7 @@ func ParseReplicationNetworkMappingID(input string) (*ReplicationNetworkMappingI } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationNetworkMappingIDInsensitively(input string) (*ReplicationNe } id := ReplicationNetworkMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go index 4fbeea1c739..ddde7d20f69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go index 011940af0f2..525a5254824 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworkMappingsClient) Get(ctx context.Context, id Replicatio var model NetworkMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go index 338a69b7c24..bf9c068eb17 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurecreatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureCreateNetworkMappingInput struct { PrimaryNetworkId string `json:"primaryNetworkId"` // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureCreateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go index 82ee7d7cd78..3c54371de7d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazurenetworkmappingsettings.go @@ -15,6 +15,14 @@ type AzureToAzureNetworkMappingSettings struct { RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureNetworkMappingSettings{} @@ -28,9 +36,10 @@ func (s AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go index 3df2303a098..712bd15b869 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_azuretoazureupdatenetworkmappinginput.go @@ -14,6 +14,14 @@ type AzureToAzureUpdateNetworkMappingInput struct { PrimaryNetworkId *string `json:"primaryNetworkId,omitempty"` // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s AzureToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = AzureToAzureUpdateNetworkMappingInput{} @@ -27,9 +35,10 @@ func (s AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "AzureToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go index 43ae6995a54..62ea078b69c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_createnetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'CreateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go index 24f1403cfe7..51753c81f35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificcreatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificCreateNetworkMappingInput interface { + FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl } -// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificCreateNetworkMappingInput = BaseFabricSpecificCreateNetworkMappingInputImpl{} + +type BaseFabricSpecificCreateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificCreateNetworkMappingInput = RawFabricSpecificCreateNetworkMappingInputImpl{} + +// RawFabricSpecificCreateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificCreateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificCreateNetworkMappingInput BaseFabricSpecificCreateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificCreateNetworkMappingInputImpl) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return s.fabricSpecificCreateNetworkMappingInput } -func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { +func UnmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte) (FabricSpecificCreateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificCreateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificCreateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificCreateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificCreateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificCreateNetworkMappingInputImpl{ + fabricSpecificCreateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go index 9b00243a9b2..5d6cbfbd053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_fabricspecificupdatenetworkmappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FabricSpecificUpdateNetworkMappingInput interface { + FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl } -// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FabricSpecificUpdateNetworkMappingInput = BaseFabricSpecificUpdateNetworkMappingInputImpl{} + +type BaseFabricSpecificUpdateNetworkMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s +} + +var _ FabricSpecificUpdateNetworkMappingInput = RawFabricSpecificUpdateNetworkMappingInputImpl{} + +// RawFabricSpecificUpdateNetworkMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFabricSpecificUpdateNetworkMappingInputImpl struct { - Type string - Values map[string]interface{} + fabricSpecificUpdateNetworkMappingInput BaseFabricSpecificUpdateNetworkMappingInputImpl + Type string + Values map[string]interface{} +} + +func (s RawFabricSpecificUpdateNetworkMappingInputImpl) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return s.fabricSpecificUpdateNetworkMappingInput } -func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { +func UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte) (FabricSpecificUpdateNetworkMappingInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(input []byte return out, nil } - out := RawFabricSpecificUpdateNetworkMappingInputImpl{ - Type: value, - Values: temp, + var parent BaseFabricSpecificUpdateNetworkMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFabricSpecificUpdateNetworkMappingInputImpl: %+v", err) } - return out, nil + + return RawFabricSpecificUpdateNetworkMappingInputImpl{ + fabricSpecificUpdateNetworkMappingInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go index 21b3513bb8a..f1dfecb3c37 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingfabricspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type NetworkMappingFabricSpecificSettings interface { + NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl } -// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ NetworkMappingFabricSpecificSettings = BaseNetworkMappingFabricSpecificSettingsImpl{} + +type BaseNetworkMappingFabricSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s +} + +var _ NetworkMappingFabricSpecificSettings = RawNetworkMappingFabricSpecificSettingsImpl{} + +// RawNetworkMappingFabricSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawNetworkMappingFabricSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + networkMappingFabricSpecificSettings BaseNetworkMappingFabricSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawNetworkMappingFabricSpecificSettingsImpl) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return s.networkMappingFabricSpecificSettings } -func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { +func UnmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) (NetworkMappingFabricSpecificSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalNetworkMappingFabricSpecificSettingsImplementation(input []byte) ( return out, nil } - out := RawNetworkMappingFabricSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseNetworkMappingFabricSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseNetworkMappingFabricSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawNetworkMappingFabricSpecificSettingsImpl{ + networkMappingFabricSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go index 5f4d29ba66e..86ac3b7bd1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_networkmappingproperties.go @@ -44,7 +44,7 @@ func (s *NetworkMappingProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["fabricSpecificSettings"]; ok { - impl, err := unmarshalNetworkMappingFabricSpecificSettingsImplementation(v) + impl, err := UnmarshalNetworkMappingFabricSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificSettings' for 'NetworkMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go index 9f64360d09b..8291eb4a9dc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_updatenetworkmappinginputproperties.go @@ -32,7 +32,7 @@ func (s *UpdateNetworkMappingInputProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["fabricSpecificDetails"]; ok { - impl, err := unmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) + impl, err := UnmarshalFabricSpecificUpdateNetworkMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'FabricSpecificDetails' for 'UpdateNetworkMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go index e8a8a1a928a..5de8410f7a0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurecreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToAzureCreateNetworkMappingIn type VMmToAzureCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go index aa741d5d144..5be8c4d6c59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazurenetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToAzureNetworkMappingSettings{} type VMmToAzureNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go index b496ae4ae1f..6ed764e3a78 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtoazureupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToAzureUpdateNetworkMappingIn type VMmToAzureUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToAzureUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToAzureUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToAzureUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go index 62ecb90d0ff..3b35c972313 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmcreatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificCreateNetworkMappingInput = VMmToVMmCreateNetworkMappingInpu type VMmToVMmCreateNetworkMappingInput struct { // Fields inherited from FabricSpecificCreateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmCreateNetworkMappingInput) FabricSpecificCreateNetworkMappingInput() BaseFabricSpecificCreateNetworkMappingInputImpl { + return BaseFabricSpecificCreateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmCreateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmCreateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go index b82ddcde87f..51bb27e4687 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmnetworkmappingsettings.go @@ -13,6 +13,14 @@ var _ NetworkMappingFabricSpecificSettings = VMmToVMmNetworkMappingSettings{} type VMmToVMmNetworkMappingSettings struct { // Fields inherited from NetworkMappingFabricSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmNetworkMappingSettings) NetworkMappingFabricSpecificSettings() BaseNetworkMappingFabricSpecificSettingsImpl { + return BaseNetworkMappingFabricSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmNetworkMappingSettings{} @@ -26,9 +34,10 @@ func (s VMmToVMmNetworkMappingSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmNetworkMappingSettings: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go index c26929ad37a..11d58df40d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/model_vmmtovmmupdatenetworkmappinginput.go @@ -13,6 +13,14 @@ var _ FabricSpecificUpdateNetworkMappingInput = VMmToVMmUpdateNetworkMappingInpu type VMmToVMmUpdateNetworkMappingInput struct { // Fields inherited from FabricSpecificUpdateNetworkMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMmToVMmUpdateNetworkMappingInput) FabricSpecificUpdateNetworkMappingInput() BaseFabricSpecificUpdateNetworkMappingInputImpl { + return BaseFabricSpecificUpdateNetworkMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmToVMmUpdateNetworkMappingInput{} @@ -26,9 +34,10 @@ func (s VMmToVMmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmToVMmUpdateNetworkMappingInput: %+v", err) } + decoded["instanceType"] = "VmmToVmm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go index 279f42a5bdc..2942405c40f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworkmappings/version.go @@ -1,12 +1,10 @@ package replicationnetworkmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworkmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworkmappings/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md index 82c9138c2c9..43b330f668d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks` Documentation -The `replicationnetworks` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationnetworks` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go index f0116084b00..925990ef0d7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/client.go @@ -15,7 +15,7 @@ type ReplicationNetworksClient struct { } func NewReplicationNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationNetworksClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go index b49c19ece14..4dc0972e233 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go index b215ef2f7f7..089583710a9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_replicationnetwork.go @@ -46,7 +46,7 @@ func ParseReplicationNetworkID(input string) (*ReplicationNetworkId, error) { } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationNetworkIDInsensitively(input string) (*ReplicationNetworkId } id := ReplicationNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go index 2866404b5d0..94d2db4d9f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go index 3a6027b1efc..0c5d3fefb65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationNetworksClient) Get(ctx context.Context, id ReplicationNetwor var model Network result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go index b806179e079..181e24a17a1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationnetworks/version.go @@ -1,12 +1,10 @@ package replicationnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationnetworks/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md index 9e880d8dd05..b67e04e37d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies` Documentation -The `replicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationpolicies` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go index 0933df54f51..0ebc718b0e0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/client.go @@ -15,7 +15,7 @@ type ReplicationPoliciesClient struct { } func NewReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go index 6e0eba649bb..272e871ad1f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_replicationpolicy.go @@ -44,7 +44,7 @@ func ParseReplicationPolicyID(input string) (*ReplicationPolicyId, error) { } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationPolicyIDInsensitively(input string) (*ReplicationPolicyId, } id := ReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go index b5de92af41a..c6e283cef34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go index 3520e8b4305..711498c7141 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationPoliciesClient) Get(ctx context.Context, id ReplicationPolicy var model Policy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go index b45a259a55f..fb391222f09 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2acrossclustermigrationpolicycreationinput.go @@ -13,6 +13,14 @@ var _ PolicyProviderSpecificInput = A2ACrossClusterMigrationPolicyCreationInput{ type A2ACrossClusterMigrationPolicyCreationInput struct { // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationPolicyCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go index cbaba9db768..7e7b12aefc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicycreationinput.go @@ -17,6 +17,14 @@ type A2APolicyCreationInput struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyCreationInput{} @@ -30,9 +38,10 @@ func (s A2APolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go index 3aa1c5f9fb7..de32bcd7ca6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_a2apolicydetails.go @@ -18,6 +18,14 @@ type A2APolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2APolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2APolicyDetails{} @@ -31,9 +39,10 @@ func (s A2APolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2APolicyDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go index 6e5638e6871..0fc88387607 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_createpolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *CreatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go index 775075b8d2a..09456d1aa8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicydetails.go @@ -19,6 +19,14 @@ type HyperVReplicaAzurePolicyDetails struct { ReplicationInterval *int64 `json:"replicationInterval,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyDetails{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go index 46599f8373b..e186a0c6ca4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicaazurepolicyinput.go @@ -18,6 +18,14 @@ type HyperVReplicaAzurePolicyInput struct { StorageAccounts *[]string `json:"storageAccounts,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePolicyInput{} @@ -31,9 +39,10 @@ func (s HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go index 12bfc95a141..54e54a624bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabasepolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaBasePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBasePolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go index ea551ee41d6..2fcb7bb9422 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicydetails.go @@ -24,6 +24,14 @@ type HyperVReplicaBluePolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyDetails{} @@ -37,9 +45,10 @@ func (s HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go index be141866872..408e43857b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicabluepolicyinput.go @@ -13,17 +13,15 @@ var _ PolicyProviderSpecificInput = HyperVReplicaBluePolicyInput{} type HyperVReplicaBluePolicyInput struct { ReplicationFrequencyInSeconds *int64 `json:"replicationFrequencyInSeconds,omitempty"` - // Fields inherited from HyperVReplicaPolicyInput - AllowedAuthenticationType *int64 `json:"allowedAuthenticationType,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int64 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - RecoveryPoints *int64 `json:"recoveryPoints,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - ReplicationPort *int64 `json:"replicationPort,omitempty"` + // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBluePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBluePolicyInput{} @@ -37,9 +35,10 @@ func (s HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBluePolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go index af3773107b1..13f18ff2e19 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicydetails.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyDetails struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyDetails{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go index b8882e26d4e..100c9e1d9f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_hypervreplicapolicyinput.go @@ -23,6 +23,14 @@ type HyperVReplicaPolicyInput struct { ReplicationPort *int64 `json:"replicationPort,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaPolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaPolicyInput{} @@ -36,9 +44,10 @@ func (s HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaPolicyInput: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go index 561d2d868c5..e8c78d43db9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policydetails.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyDetails{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go index 7e42a20f0e1..1d72287fec4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmageazurev2policyinput.go @@ -18,6 +18,14 @@ type InMageAzureV2PolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2PolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2PolicyInput{} @@ -31,9 +39,10 @@ func (s InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2PolicyInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go index a9aa31dee55..cea2dc818ca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagebasepolicydetails.go @@ -17,6 +17,14 @@ type InMageBasePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageBasePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageBasePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageBasePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageBasePolicyDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go index e5eb997e2da..785e7acebcf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicydetails.go @@ -17,6 +17,14 @@ type InMagePolicyDetails struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyDetails{} @@ -30,9 +38,10 @@ func (s InMagePolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go index 6d9e7b1e90a..8e2b3d62d36 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagepolicyinput.go @@ -17,6 +17,14 @@ type InMagePolicyInput struct { RecoveryPointThresholdInMinutes *int64 `json:"recoveryPointThresholdInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMagePolicyInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMagePolicyInput{} @@ -30,9 +38,10 @@ func (s InMagePolicyInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMagePolicyInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go index 2939b3a5096..7f9d9eff596 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicycreationinput.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyCreationInput struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyCreationInput{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go index 610cd07baff..98177d4e134 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmfailbackpolicydetails.go @@ -15,6 +15,14 @@ type InMageRcmFailbackPolicyDetails struct { CrashConsistentFrequencyInMinutes *int64 `json:"crashConsistentFrequencyInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPolicyDetails{} @@ -28,9 +36,10 @@ func (s InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go index 1960d5ce36e..61e6e84a628 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicycreationinput.go @@ -17,6 +17,14 @@ type InMageRcmPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyCreationInput{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go index 6d682e3127c..589bab17807 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_inmagercmpolicydetails.go @@ -17,6 +17,14 @@ type InMageRcmPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmPolicyDetails{} @@ -30,9 +38,10 @@ func (s InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmPolicyDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go index 3f6d1fd8bfa..97c94fdb6cb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproperties.go @@ -30,7 +30,7 @@ func (s *PolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPolicyProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PolicyProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go index ce5f183fe9e..070eb394a6e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificDetails interface { + PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl } -// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificDetails = BasePolicyProviderSpecificDetailsImpl{} + +type BasePolicyProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s +} + +var _ PolicyProviderSpecificDetails = RawPolicyProviderSpecificDetailsImpl{} + +// RawPolicyProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificDetails BasePolicyProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificDetailsImpl) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return s.policyProviderSpecificDetails } -func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { +func UnmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -124,10 +141,15 @@ func unmarshalPolicyProviderSpecificDetailsImplementation(input []byte) (PolicyP return out, nil } - out := RawPolicyProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificDetailsImpl{ + policyProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go index 51288b6fcb2..5222ae3e585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_policyproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PolicyProviderSpecificInput interface { + PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl } -// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PolicyProviderSpecificInput = BasePolicyProviderSpecificInputImpl{} + +type BasePolicyProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s +} + +var _ PolicyProviderSpecificInput = RawPolicyProviderSpecificInputImpl{} + +// RawPolicyProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPolicyProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + policyProviderSpecificInput BasePolicyProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawPolicyProviderSpecificInputImpl) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return s.policyProviderSpecificInput } -func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { +func UnmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -108,10 +125,15 @@ func unmarshalPolicyProviderSpecificInputImplementation(input []byte) (PolicyPro return out, nil } - out := RawPolicyProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BasePolicyProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePolicyProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawPolicyProviderSpecificInputImpl{ + policyProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go index 59351084d98..9a364e375f3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_updatepolicyinputproperties.go @@ -22,7 +22,7 @@ func (s *UpdatePolicyInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderSettings"]; ok { - impl, err := unmarshalPolicyProviderSpecificInputImplementation(v) + impl, err := UnmarshalPolicyProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderSettings' for 'UpdatePolicyInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go index a2701bda163..eaac5dcf2e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicycreationinput.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyCreationInput struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyCreationInput) PolicyProviderSpecificInput() BasePolicyProviderSpecificInputImpl { + return BasePolicyProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyCreationInput{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go index 0541a8187bb..d1398f83ff1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/model_vmwarecbtpolicydetails.go @@ -16,6 +16,14 @@ type VMwareCbtPolicyDetails struct { RecoveryPointHistoryInMinutes *int64 `json:"recoveryPointHistoryInMinutes,omitempty"` // Fields inherited from PolicyProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtPolicyDetails) PolicyProviderSpecificDetails() BasePolicyProviderSpecificDetailsImpl { + return BasePolicyProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtPolicyDetails{} @@ -29,9 +37,10 @@ func (s VMwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtPolicyDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go index 7e33d3cfddb..b777104be6d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationpolicies/version.go @@ -1,12 +1,10 @@ package replicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationpolicies/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/README.md index 1114d7fdacc..798e833d600 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems` Documentation -The `replicationprotectableitems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotectableitems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/client.go index 20a533cfe43..0fe8f850abb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectableItemsClient struct { } func NewReplicationProtectableItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectableItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectableitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectableitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectableItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectableitem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectableitem.go index 134ffc908c6..b3575f369fe 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectableitem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectableitem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectableItemID(input string) (*ReplicationProtectableIte } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectableItemIDInsensitively(input string) (*ReplicationP } id := ReplicationProtectableItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go index ebd83bff239..4ecb8996700 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_get.go index 2c95349341b..c002604133f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectableItemsClient) Get(ctx context.Context, id Replicati var model ProtectableItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go index 3e871c362b1..156271c76d1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/method_listbyreplicationprotectioncontainers.go @@ -40,6 +40,7 @@ func (o ListByReplicationProtectionContainersOperationOptions) ToHeaders() *clie func (o ListByReplicationProtectionContainersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_configurationsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_configurationsettings.go index cd0e26b0746..320da0f6e28 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_configurationsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_configurationsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ConfigurationSettings interface { + ConfigurationSettings() BaseConfigurationSettingsImpl } -// RawConfigurationSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ConfigurationSettings = BaseConfigurationSettingsImpl{} + +type BaseConfigurationSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s +} + +var _ ConfigurationSettings = RawConfigurationSettingsImpl{} + +// RawConfigurationSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawConfigurationSettingsImpl struct { - Type string - Values map[string]interface{} + configurationSettings BaseConfigurationSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawConfigurationSettingsImpl) ConfigurationSettings() BaseConfigurationSettingsImpl { + return s.configurationSettings } -func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { +func UnmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSettings, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalConfigurationSettingsImplementation(input []byte) (ConfigurationSe return out, nil } - out := RawConfigurationSettingsImpl{ - Type: value, - Values: temp, + var parent BaseConfigurationSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseConfigurationSettingsImpl: %+v", err) } - return out, nil + + return RawConfigurationSettingsImpl{ + configurationSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go index 73a1c26e708..d9b640d45d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_hypervvirtualmachinedetails.go @@ -21,6 +21,14 @@ type HyperVVirtualMachineDetails struct { SourceItemId *string `json:"sourceItemId,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVVirtualMachineDetails{} @@ -34,9 +42,10 @@ func (s HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "HyperVVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_protectableitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_protectableitemproperties.go index 5559fc9f13c..cb157499b72 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_protectableitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_protectableitemproperties.go @@ -40,7 +40,7 @@ func (s *ProtectableItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalConfigurationSettingsImplementation(v) + impl, err := UnmarshalConfigurationSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'ProtectableItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_replicationgroupdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_replicationgroupdetails.go index 2afdac69d0e..2ba6c0e2112 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_replicationgroupdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_replicationgroupdetails.go @@ -13,6 +13,14 @@ var _ ConfigurationSettings = ReplicationGroupDetails{} type ReplicationGroupDetails struct { // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s ReplicationGroupDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = ReplicationGroupDetails{} @@ -26,9 +34,10 @@ func (s ReplicationGroupDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReplicationGroupDetails: %+v", err) } + decoded["instanceType"] = "ReplicationGroupDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go index 1ae50cf4cc7..a23bbd99d96 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmmvirtualmachinedetails.go @@ -12,15 +12,15 @@ var _ ConfigurationSettings = VMmVirtualMachineDetails{} type VMmVirtualMachineDetails struct { - // Fields inherited from HyperVVirtualMachineDetails - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` - Generation *string `json:"generation,omitempty"` - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - HyperVHostId *string `json:"hyperVHostId,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - SourceItemId *string `json:"sourceItemId,omitempty"` + // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMmVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMmVirtualMachineDetails{} @@ -34,9 +34,10 @@ func (s VMmVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMmVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VmmVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go index 8eb8ecdf063..e372e550548 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/model_vmwarevirtualmachinedetails.go @@ -23,6 +23,14 @@ type VMwareVirtualMachineDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ConfigurationSettings + + InstanceType string `json:"instanceType"` +} + +func (s VMwareVirtualMachineDetails) ConfigurationSettings() BaseConfigurationSettingsImpl { + return BaseConfigurationSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareVirtualMachineDetails{} @@ -36,9 +44,10 @@ func (s VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareVirtualMachineDetails: %+v", err) } + decoded["instanceType"] = "VMwareVirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/version.go index ec0e8200fc8..c8317e425bc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectableitems/version.go @@ -1,12 +1,10 @@ package replicationprotectableitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectableitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectableitems/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md index 62bce3fc75c..ea9630edb30 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems` Documentation -The `replicationprotecteditems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotecteditems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go index 83b59be406c..7b83bc196f5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/client.go @@ -15,7 +15,7 @@ type ReplicationProtectedItemsClient struct { } func NewReplicationProtectedItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectedItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotecteditems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotecteditems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectedItemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go index 9426c4a3459..71329f55b39 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go index fc5b34a63db..731298c2baf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go index 12b72f7f434..f9808df2de0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go index 5744bdf41bf..5d46e4204f4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectedItemsClient) Get(ctx context.Context, id Replication var model ReplicationProtectedItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go index dec0477f6ad..5fe3f745f8f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go index 814464cdc24..fee67d43e65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aadddisksinput.go @@ -15,6 +15,14 @@ type A2AAddDisksInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AAddDisksInput{} @@ -28,9 +36,10 @@ func (s A2AAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AAddDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go index c2159e729a3..b119a4a2cb1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2AApplyRecoveryPointInput{} type A2AApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go index 16ecd46bef5..208b0ec18ba 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationapplyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = A2ACrossClusterMigrationApplyRec type A2ACrossClusterMigrationApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go index c03870f7d5d..ee057b3e0c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationenableprotectioninput.go @@ -15,6 +15,14 @@ type A2ACrossClusterMigrationEnableProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationEnableProtectionInput{} @@ -28,9 +36,10 @@ func (s A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go index 7af3fda8ac7..afc9553bcd0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2acrossclustermigrationreplicationdetails.go @@ -19,6 +19,14 @@ type A2ACrossClusterMigrationReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationReplicationDetails{} @@ -32,9 +40,10 @@ func (s A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go index 6d6c0bf630f..90a041ca1b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aenableprotectioninput.go @@ -35,6 +35,14 @@ type A2AEnableProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AEnableProtectionInput{} @@ -48,9 +56,10 @@ func (s A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go index 32f05ed2728..b5f9961fdfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aremovedisksinput.go @@ -15,6 +15,14 @@ type A2ARemoveDisksInput struct { VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` // Fields inherited from RemoveDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ARemoveDisksInput) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return BaseRemoveDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ARemoveDisksInput{} @@ -28,9 +36,10 @@ func (s A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ARemoveDisksInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go index 07d37bb3696..11126570f85 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areplicationdetails.go @@ -71,6 +71,14 @@ type A2AReplicationDetails struct { VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationDetails{} @@ -84,9 +92,10 @@ func (s A2AReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go index 2695d902be3..a4d37006651 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2areprotectinput.go @@ -19,6 +19,14 @@ type A2AReprotectInput struct { VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReprotectInput{} @@ -32,9 +40,10 @@ func (s A2AReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReprotectInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go index 000fecac67e..40bfb26f8a7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2atestfailoverinput.go @@ -15,6 +15,14 @@ type A2ATestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ATestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ATestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2ATestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ATestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go index 8c21ffe9c8e..2248e7c8354 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go index f03e4a9a89a..aae1b7f832e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_a2aupdatereplicationprotectediteminput.go @@ -22,6 +22,14 @@ type A2AUpdateReplicationProtectedItemInput struct { TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateReplicationProtectedItemInput{} @@ -35,9 +43,10 @@ func (s A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go index 2613527d5d4..db2c27a3083 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksinputproperties.go @@ -22,7 +22,7 @@ func (s *AddDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalAddDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalAddDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'AddDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go index 639d67609c5..96b98783ad2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_adddisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddDisksProviderSpecificInput interface { + AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl } -// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddDisksProviderSpecificInput = BaseAddDisksProviderSpecificInputImpl{} + +type BaseAddDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s +} + +var _ AddDisksProviderSpecificInput = RawAddDisksProviderSpecificInputImpl{} + +// RawAddDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + addDisksProviderSpecificInput BaseAddDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawAddDisksProviderSpecificInputImpl) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return s.addDisksProviderSpecificInput } -func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { +func UnmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalAddDisksProviderSpecificInputImplementation(input []byte) (AddDisk return out, nil } - out := RawAddDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseAddDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawAddDisksProviderSpecificInputImpl{ + addDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go index debfef14272..31a847e9169 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointinputproperties.go @@ -30,7 +30,7 @@ func (s *ApplyRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go index 59c1321593c..e7e7a502bbb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_applyrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyRecoveryPointProviderSpecificInput interface { + ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl } -// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyRecoveryPointProviderSpecificInput = BaseApplyRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyRecoveryPointProviderSpecificInput = RawApplyRecoveryPointProviderSpecificInputImpl{} + +// RawApplyRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyRecoveryPointProviderSpecificInput BaseApplyRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawApplyRecoveryPointProviderSpecificInputImpl) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return s.applyRecoveryPointProviderSpecificInput } -func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { +func UnmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalApplyRecoveryPointProviderSpecificInputImplementation(input []byte return out, nil } - out := RawApplyRecoveryPointProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseApplyRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyRecoveryPointProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawApplyRecoveryPointProviderSpecificInputImpl{ + applyRecoveryPointProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go index bc2bea03f8b..0dbc2702962 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *DisableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["replicationProviderInput"]; ok { - impl, err := unmarshalDisableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalDisableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ReplicationProviderInput' for 'DisableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go index 72ae183f48d..5c1a4e1b909 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_disableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DisableProtectionProviderSpecificInput interface { + DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl } -// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DisableProtectionProviderSpecificInput = BaseDisableProtectionProviderSpecificInputImpl{} + +type BaseDisableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s +} + +var _ DisableProtectionProviderSpecificInput = RawDisableProtectionProviderSpecificInputImpl{} + +// RawDisableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDisableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + disableProtectionProviderSpecificInput BaseDisableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawDisableProtectionProviderSpecificInputImpl) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return s.disableProtectionProviderSpecificInput } -func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { +func UnmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) (DisableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDisableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawDisableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseDisableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDisableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawDisableProtectionProviderSpecificInputImpl{ + disableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go index dfbab8a6577..7fb23295cf4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectioninputproperties.go @@ -32,7 +32,7 @@ func (s *EnableProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalEnableProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalEnableProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'EnableProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go index c23af95ecaa..de8b8da3dea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_enableprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnableProtectionProviderSpecificInput interface { + EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl } -// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnableProtectionProviderSpecificInput = BaseEnableProtectionProviderSpecificInputImpl{} + +type BaseEnableProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s +} + +var _ EnableProtectionProviderSpecificInput = RawEnableProtectionProviderSpecificInputImpl{} + +// RawEnableProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnableProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + enableProtectionProviderSpecificInput BaseEnableProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawEnableProtectionProviderSpecificInputImpl) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return s.enableProtectionProviderSpecificInput } -func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { +func UnmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) (EnableProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalEnableProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawEnableProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseEnableProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnableProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawEnableProtectionProviderSpecificInputImpl{ + enableProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go index 630a66a8c5f..12d33abedde 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureapplyrecoverypointinput.go @@ -15,6 +15,14 @@ type HyperVReplicaAzureApplyRecoveryPointInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureApplyRecoveryPointInput{} @@ -28,9 +36,10 @@ func (s HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go index 24d71c7008c..2046aa8c21e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureenableprotectioninput.go @@ -43,6 +43,14 @@ type HyperVReplicaAzureEnableProtectionInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureEnableProtectionInput{} @@ -56,9 +64,10 @@ func (s HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go index d188fac0658..94d265f86a2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurefailbackproviderinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureFailbackProviderInput struct { RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureFailbackProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureFailbackProviderInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureFailbackProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go index 2ae80dd5540..839fa291aea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureplannedfailoverproviderinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzurePlannedFailoverProviderInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzurePlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzurePlannedFailoverProviderInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzurePlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go index 059d6709997..1514aea95b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereplicationdetails.go @@ -48,6 +48,14 @@ type HyperVReplicaAzureReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReplicationDetails{} @@ -61,9 +69,10 @@ func (s HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go index e611c351d80..9627e00f825 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazurereprotectinput.go @@ -19,6 +19,14 @@ type HyperVReplicaAzureReprotectInput struct { VirtualMachineName *string `json:"vmName,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureReprotectInput{} @@ -32,9 +40,10 @@ func (s HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureReprotectInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go index c19155908d9..155efe538d3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazuretestfailoverinput.go @@ -17,6 +17,14 @@ type HyperVReplicaAzureTestFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureTestFailoverInput{} @@ -30,9 +38,10 @@ func (s HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureTestFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go index f02c6da0c29..b0a3d75f455 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureunplannedfailoverinput.go @@ -16,6 +16,14 @@ type HyperVReplicaAzureUnplannedFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUnplannedFailoverInput{} @@ -29,9 +37,10 @@ func (s HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go index 8daafb5940f..f2deff32970 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicaazureupdatereplicationprotectediteminput.go @@ -24,6 +24,14 @@ type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaAzureUpdateReplicationProtectedItemInput{} @@ -37,9 +45,10 @@ func (s HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaAzureUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go index 3422c9c1b70..e00c68803e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabasereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBaseReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBaseReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBaseReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBaseReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplicaBaseReplicationDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go index 8eefc928b64..186d59debce 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicabluereplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaBlueReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaBlueReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaBlueReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaBlueReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012R2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go index 5fa220c4dca..979c2bca833 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_hypervreplicareplicationdetails.go @@ -20,6 +20,14 @@ type HyperVReplicaReplicationDetails struct { VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s HyperVReplicaReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = HyperVReplicaReplicationDetails{} @@ -33,9 +41,10 @@ func (s HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HyperVReplicaReplicationDetails: %+v", err) } + decoded["instanceType"] = "HyperVReplica2012" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go index 5085ebf28bf..38010ccfe0d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2applyrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyRecoveryPointProviderSpecificInput = InMageAzureV2ApplyRecoveryPointI type InMageAzureV2ApplyRecoveryPointInput struct { // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ApplyRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go index 9e64f09d6fb..d965ba09103 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2enableprotectioninput.go @@ -39,6 +39,14 @@ type InMageAzureV2EnableProtectionInput struct { TargetVMTags *map[string]string `json:"targetVmTags,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2EnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2EnableProtectionInput{} @@ -52,9 +60,10 @@ func (s InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2EnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go index da843844162..f1927aace2c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2replicationdetails.go @@ -83,6 +83,14 @@ type InMageAzureV2ReplicationDetails struct { VhdName *string `json:"vhdName,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReplicationDetails{} @@ -96,9 +104,10 @@ func (s InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go index 7acf1b58f0d..81dd163dc48 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2reprotectinput.go @@ -20,6 +20,14 @@ type InMageAzureV2ReprotectInput struct { StorageAccountId *string `json:"storageAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2ReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2ReprotectInput{} @@ -33,9 +41,10 @@ func (s InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2ReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go index 2a55685836d..15ae80129b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2switchproviderproviderinput.go @@ -16,6 +16,14 @@ type InMageAzureV2SwitchProviderProviderInput struct { TargetVaultID string `json:"targetVaultID"` // Fields inherited from SwitchProviderProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2SwitchProviderProviderInput) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return BaseSwitchProviderProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2SwitchProviderProviderInput{} @@ -29,9 +37,10 @@ func (s InMageAzureV2SwitchProviderProviderInput) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2SwitchProviderProviderInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go index ff6a69049d8..b44c5ce60d2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2testfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2TestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2TestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2TestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2TestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go index 1fb6ca5b171..5f99b8cb9ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2unplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageAzureV2UnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go index 02552cd40da..4a1f4a448d8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageazurev2updatereplicationprotectediteminput.go @@ -23,6 +23,14 @@ type InMageAzureV2UpdateReplicationProtectedItemInput struct { VMDisks *[]UpdateDiskInput `json:"vmDisks,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageAzureV2UpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageAzureV2UpdateReplicationProtectedItemInput{} @@ -36,9 +44,10 @@ func (s InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageAzureV2UpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go index 5a6d99ee2bd..9f9b8923881 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagedisableprotectionproviderspecificinput.go @@ -14,6 +14,14 @@ type InMageDisableProtectionProviderSpecificInput struct { ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` // Fields inherited from DisableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageDisableProtectionProviderSpecificInput) DisableProtectionProviderSpecificInput() BaseDisableProtectionProviderSpecificInputImpl { + return BaseDisableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageDisableProtectionProviderSpecificInput{} @@ -27,9 +35,10 @@ func (s InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageDisableProtectionProviderSpecificInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go index 846db30cbb8..ecb43d87f50 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageenableprotectioninput.go @@ -23,6 +23,14 @@ type InMageEnableProtectionInput struct { VMFriendlyName *string `json:"vmFriendlyName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageEnableProtectionInput{} @@ -36,9 +44,10 @@ func (s InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go index f053ccd3c12..91b0bc63cf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmadddisksinput.go @@ -14,6 +14,14 @@ type InMageRcmAddDisksInput struct { Disks []InMageRcmDiskInput `json:"disks"` // Fields inherited from AddDisksProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmAddDisksInput) AddDisksProviderSpecificInput() BaseAddDisksProviderSpecificInputImpl { + return BaseAddDisksProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmAddDisksInput{} @@ -27,9 +35,10 @@ func (s InMageRcmAddDisksInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmAddDisksInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go index 316da5fb056..3f18666e7c5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmapplyrecoverypointinput.go @@ -14,6 +14,14 @@ type InMageRcmApplyRecoveryPointInput struct { RecoveryPointId string `json:"recoveryPointId"` // Fields inherited from ApplyRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmApplyRecoveryPointInput) ApplyRecoveryPointProviderSpecificInput() BaseApplyRecoveryPointProviderSpecificInputImpl { + return BaseApplyRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmApplyRecoveryPointInput{} @@ -27,9 +35,10 @@ func (s InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmApplyRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go index 0da00ccef40..d4c55f7104d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmenableprotectioninput.go @@ -38,6 +38,14 @@ type InMageRcmEnableProtectionInput struct { UserSelectedOSName *string `json:"userSelectedOSName,omitempty"` // Fields inherited from EnableProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmEnableProtectionInput) EnableProtectionProviderSpecificInput() BaseEnableProtectionProviderSpecificInputImpl { + return BaseEnableProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmEnableProtectionInput{} @@ -51,9 +59,10 @@ func (s InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmEnableProtectionInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go index 4fb7cddae1e..f347a8ab887 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackplannedfailoverproviderinput.go @@ -14,6 +14,14 @@ type InMageRcmFailbackPlannedFailoverProviderInput struct { RecoveryPointType InMageRcmFailbackRecoveryPointType `json:"recoveryPointType"` // Fields inherited from PlannedFailoverProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackPlannedFailoverProviderInput) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return BasePlannedFailoverProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackPlannedFailoverProviderInput{} @@ -27,9 +35,10 @@ func (s InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackPlannedFailoverProviderInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go index 20af36d13aa..d0312afb7b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreplicationdetails.go @@ -42,6 +42,14 @@ type InMageRcmFailbackReplicationDetails struct { VMNics *[]InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReplicationDetails{} @@ -55,9 +63,10 @@ func (s InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go index 766cbb8d8f6..25a4835498d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmfailbackreprotectinput.go @@ -16,6 +16,14 @@ type InMageRcmFailbackReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmFailbackReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmFailbackReprotectInput{} @@ -29,9 +37,10 @@ func (s InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmFailbackReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go index 77dcdab47c0..16d8656d258 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreplicationdetails.go @@ -74,6 +74,14 @@ type InMageRcmReplicationDetails struct { VMNics *[]InMageRcmNicDetails `json:"vmNics,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReplicationDetails{} @@ -87,9 +95,10 @@ func (s InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go index f36bee34a6c..a8a70b3cef6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmreprotectinput.go @@ -17,6 +17,14 @@ type InMageRcmReprotectInput struct { ReprotectAgentId string `json:"reprotectAgentId"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmReprotectInput{} @@ -30,9 +38,10 @@ func (s InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmReprotectInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go index 4f3264c0859..f7af412ddc6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmtestfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmTestFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go index 688ddd4e9f1..5802d3b960e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageRcmUnplannedFailoverInput struct { RecoveryPointId *string `json:"recoveryPointId,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go index 59a0e19cd4a..c3eb7e50380 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdateapplianceforreplicationprotectediteminput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from UpdateApplianceForReplicationProtectedItemProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateApplianceForReplicationProtectedItemInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateApplianceForReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go index 531bf039cf4..d15699fffec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagercmupdatereplicationprotectediteminput.go @@ -28,6 +28,14 @@ type InMageRcmUpdateReplicationProtectedItemInput struct { VMNics *[]InMageRcmNicInput `json:"vmNics,omitempty"` // Fields inherited from UpdateReplicationProtectedItemProviderInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateReplicationProtectedItemInput) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return BaseUpdateReplicationProtectedItemProviderInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateReplicationProtectedItemInput{} @@ -41,9 +49,10 @@ func (s InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, err } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateReplicationProtectedItemInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go index b12af712d38..5bd28404fcb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereplicationdetails.go @@ -53,6 +53,14 @@ type InMageReplicationDetails struct { ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` // Fields inherited from ReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s InMageReplicationDetails) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return BaseReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReplicationDetails{} @@ -66,9 +74,10 @@ func (s InMageReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReplicationDetails: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go index 8ed97d029c8..f7f46d7e03c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagereprotectinput.go @@ -21,6 +21,14 @@ type InMageReprotectInput struct { RunAsAccountId *string `json:"runAsAccountId,omitempty"` // Fields inherited from ReverseReplicationProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageReprotectInput) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return BaseReverseReplicationProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageReprotectInput{} @@ -34,9 +42,10 @@ func (s InMageReprotectInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageReprotectInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go index 68347d06749..c2c3cb6b741 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmagetestfailoverinput.go @@ -15,6 +15,14 @@ type InMageTestFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from TestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageTestFailoverInput) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return BaseTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageTestFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageTestFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go index e03da157307..9d97383ad62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_inmageunplannedfailoverinput.go @@ -15,6 +15,14 @@ type InMageUnplannedFailoverInput struct { RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` // Fields inherited from UnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageUnplannedFailoverInput) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return BaseUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go index 4a6bb1dae0a..380628b277d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverinputproperties.go @@ -30,7 +30,7 @@ func (s *PlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) + impl, err := UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'PlannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go index 4371a17a202..6780a63a6c6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_plannedfailoverproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlannedFailoverProviderSpecificFailoverInput interface { + PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl } -// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlannedFailoverProviderSpecificFailoverInput = BasePlannedFailoverProviderSpecificFailoverInputImpl{} + +type BasePlannedFailoverProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BasePlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s +} + +var _ PlannedFailoverProviderSpecificFailoverInput = RawPlannedFailoverProviderSpecificFailoverInputImpl{} + +// RawPlannedFailoverProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlannedFailoverProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + plannedFailoverProviderSpecificFailoverInput BasePlannedFailoverProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { +func (s RawPlannedFailoverProviderSpecificFailoverInputImpl) PlannedFailoverProviderSpecificFailoverInput() BasePlannedFailoverProviderSpecificFailoverInputImpl { + return s.plannedFailoverProviderSpecificFailoverInput +} + +func UnmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input []byte) (PlannedFailoverProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPlannedFailoverProviderSpecificFailoverInputImplementation(input [ return out, nil } - out := RawPlannedFailoverProviderSpecificFailoverInputImpl{ + var parent BasePlannedFailoverProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlannedFailoverProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawPlannedFailoverProviderSpecificFailoverInputImpl{ + plannedFailoverProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go index eb805049101..69152ca2bb3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksinputproperties.go @@ -22,7 +22,7 @@ func (s *RemoveDisksInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalRemoveDisksProviderSpecificInputImplementation(v) + impl, err := UnmarshalRemoveDisksProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'RemoveDisksInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go index 73a0e3c6b4f..bcf84dd483e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_removedisksproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RemoveDisksProviderSpecificInput interface { + RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl } -// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RemoveDisksProviderSpecificInput = BaseRemoveDisksProviderSpecificInputImpl{} + +type BaseRemoveDisksProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s +} + +var _ RemoveDisksProviderSpecificInput = RawRemoveDisksProviderSpecificInputImpl{} + +// RawRemoveDisksProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRemoveDisksProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + removeDisksProviderSpecificInput BaseRemoveDisksProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRemoveDisksProviderSpecificInputImpl) RemoveDisksProviderSpecificInput() BaseRemoveDisksProviderSpecificInputImpl { + return s.removeDisksProviderSpecificInput } -func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { +func UnmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (RemoveDisksProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRemoveDisksProviderSpecificInputImplementation(input []byte) (Remo return out, nil } - out := RawRemoveDisksProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRemoveDisksProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRemoveDisksProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRemoveDisksProviderSpecificInputImpl{ + removeDisksProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go index fcf1010f232..841d9679022 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationprotecteditemproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectedItemProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectedItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go index 1e5be9a6f91..a4aeb007588 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_replicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificSettings interface { + ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl } -// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificSettings = BaseReplicationProviderSpecificSettingsImpl{} + +type BaseReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProviderSpecificSettings = RawReplicationProviderSpecificSettingsImpl{} + +// RawReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificSettings BaseReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} +} + +func (s RawReplicationProviderSpecificSettingsImpl) ReplicationProviderSpecificSettings() BaseReplicationProviderSpecificSettingsImpl { + return s.replicationProviderSpecificSettings } -func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { +func UnmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (ReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -116,10 +133,15 @@ func unmarshalReplicationProviderSpecificSettingsImplementation(input []byte) (R return out, nil } - out := RawReplicationProviderSpecificSettingsImpl{ - Type: value, - Values: temp, + var parent BaseReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificSettingsImpl: %+v", err) } - return out, nil + + return RawReplicationProviderSpecificSettingsImpl{ + replicationProviderSpecificSettings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go index 9d4d4c1da7f..d74dcf1a402 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationinputproperties.go @@ -30,7 +30,7 @@ func (s *ReverseReplicationInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReverseReplicationProviderSpecificInputImplementation(v) + impl, err := UnmarshalReverseReplicationProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReverseReplicationInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go index 551d56de914..3cebfab5c31 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_reversereplicationproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReverseReplicationProviderSpecificInput interface { + ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl } -// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReverseReplicationProviderSpecificInput = BaseReverseReplicationProviderSpecificInputImpl{} + +type BaseReverseReplicationProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s +} + +var _ ReverseReplicationProviderSpecificInput = RawReverseReplicationProviderSpecificInputImpl{} + +// RawReverseReplicationProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReverseReplicationProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + reverseReplicationProviderSpecificInput BaseReverseReplicationProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawReverseReplicationProviderSpecificInputImpl) ReverseReplicationProviderSpecificInput() BaseReverseReplicationProviderSpecificInputImpl { + return s.reverseReplicationProviderSpecificInput } -func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { +func UnmarshalReverseReplicationProviderSpecificInputImplementation(input []byte) (ReverseReplicationProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalReverseReplicationProviderSpecificInputImplementation(input []byte return out, nil } - out := RawReverseReplicationProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseReverseReplicationProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReverseReplicationProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawReverseReplicationProviderSpecificInputImpl{ + reverseReplicationProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go index 86770b49b74..62b50d540e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderinputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProviderInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProviderProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProviderProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProviderInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go index fc9fa51e0bf..b6c2d8fc600 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_switchproviderproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProviderProviderSpecificInput interface { + SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl } -// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProviderProviderSpecificInput = BaseSwitchProviderProviderSpecificInputImpl{} + +type BaseSwitchProviderProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s +} + +var _ SwitchProviderProviderSpecificInput = RawSwitchProviderProviderSpecificInputImpl{} + +// RawSwitchProviderProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProviderProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProviderProviderSpecificInput BaseSwitchProviderProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProviderProviderSpecificInputImpl) SwitchProviderProviderSpecificInput() BaseSwitchProviderProviderSpecificInputImpl { + return s.switchProviderProviderSpecificInput } -func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { +func UnmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (SwitchProviderProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProviderProviderSpecificInputImplementation(input []byte) (S return out, nil } - out := RawSwitchProviderProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProviderProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProviderProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProviderProviderSpecificInputImpl{ + switchProviderProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go index 098e800430b..be428de0001 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *TestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'TestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go index a9a345c2fa9..9ad9f4d9ff8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_testfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TestFailoverProviderSpecificInput interface { + TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl } -// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TestFailoverProviderSpecificInput = BaseTestFailoverProviderSpecificInputImpl{} + +type BaseTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s +} + +var _ TestFailoverProviderSpecificInput = RawTestFailoverProviderSpecificInputImpl{} + +// RawTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + testFailoverProviderSpecificInput BaseTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawTestFailoverProviderSpecificInputImpl) TestFailoverProviderSpecificInput() BaseTestFailoverProviderSpecificInputImpl { + return s.testFailoverProviderSpecificInput } -func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { +func UnmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (TestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalTestFailoverProviderSpecificInputImplementation(input []byte) (Tes return out, nil } - out := RawTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawTestFailoverProviderSpecificInputImpl{ + testFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go index b998698389d..a517eb9e0d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *UnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go index e1270ba432e..9cf8dd75cf6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_unplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UnplannedFailoverProviderSpecificInput interface { + UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl } -// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UnplannedFailoverProviderSpecificInput = BaseUnplannedFailoverProviderSpecificInputImpl{} + +type BaseUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ UnplannedFailoverProviderSpecificInput = RawUnplannedFailoverProviderSpecificInputImpl{} + +// RawUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + unplannedFailoverProviderSpecificInput BaseUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawUnplannedFailoverProviderSpecificInputImpl) UnplannedFailoverProviderSpecificInput() BaseUnplannedFailoverProviderSpecificInputImpl { + return s.unplannedFailoverProviderSpecificInput } -func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { +func UnmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) (UnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalUnplannedFailoverProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawUnplannedFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUnplannedFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawUnplannedFailoverProviderSpecificInputImpl{ + unplannedFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go index a1073c0228c..6a69b8d9481 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotectediteminputproperties.go @@ -30,7 +30,7 @@ func (s *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSO } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) + impl, err := UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateApplianceForReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go index 4ecaa33309c..f7592a75f55 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updateapplianceforreplicationprotecteditemproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateApplianceForReplicationProtectedItemProviderSpecificInput interface { + UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl } -// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +type BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s +} + +var _ UpdateApplianceForReplicationProtectedItemProviderSpecificInput = RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{} + +// RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + updateApplianceForReplicationProtectedItemProviderSpecificInput BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { +func (s RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl) UpdateApplianceForReplicationProtectedItemProviderSpecificInput() BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl { + return s.updateApplianceForReplicationProtectedItemProviderSpecificInput +} + +func UnmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImplementation(input []byte) (UpdateApplianceForReplicationProtectedItemProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputImp return out, nil } - out := RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + var parent BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl: %+v", err) + } + + return RawUpdateApplianceForReplicationProtectedItemProviderSpecificInputImpl{ + updateApplianceForReplicationProtectedItemProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go index ce7313ff7b9..6f27791ce24 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotectediteminputproperties.go @@ -46,7 +46,7 @@ func (s *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(bytes []by } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) + impl, err := UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'UpdateReplicationProtectedItemInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go index e890f834bde..9538d871d9a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/model_updatereplicationprotecteditemproviderinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type UpdateReplicationProtectedItemProviderInput interface { + UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl } -// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ UpdateReplicationProtectedItemProviderInput = BaseUpdateReplicationProtectedItemProviderInputImpl{} + +type BaseUpdateReplicationProtectedItemProviderInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s +} + +var _ UpdateReplicationProtectedItemProviderInput = RawUpdateReplicationProtectedItemProviderInputImpl{} + +// RawUpdateReplicationProtectedItemProviderInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawUpdateReplicationProtectedItemProviderInputImpl struct { - Type string - Values map[string]interface{} + updateReplicationProtectedItemProviderInput BaseUpdateReplicationProtectedItemProviderInputImpl + Type string + Values map[string]interface{} } -func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { +func (s RawUpdateReplicationProtectedItemProviderInputImpl) UpdateReplicationProtectedItemProviderInput() BaseUpdateReplicationProtectedItemProviderInputImpl { + return s.updateReplicationProtectedItemProviderInput +} + +func UnmarshalUpdateReplicationProtectedItemProviderInputImplementation(input []byte) (UpdateReplicationProtectedItemProviderInput, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalUpdateReplicationProtectedItemProviderInputImplementation(input [] return out, nil } - out := RawUpdateReplicationProtectedItemProviderInputImpl{ + var parent BaseUpdateReplicationProtectedItemProviderInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseUpdateReplicationProtectedItemProviderInputImpl: %+v", err) + } + + return RawUpdateReplicationProtectedItemProviderInputImpl{ + updateReplicationProtectedItemProviderInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go index bf5c397de1c..7a524b487b4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotecteditems/version.go @@ -1,12 +1,10 @@ package replicationprotecteditems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotecteditems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotecteditems/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/README.md index 74cb920577c..3a920baf904 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters` Documentation -The `replicationprotectionclusters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotectionclusters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/client.go index ab8369ee009..0b827715b54 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionClustersClient struct { } func NewReplicationProtectionClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionClustersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncluster.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncluster.go index 2c9eaf5ff2f..31f6c393243 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncluster.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncluster.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionClusterID(input string) (*ReplicationProtectionCl } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionClusterIDInsensitively(input string) (*Replicatio } id := ReplicationProtectionClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncontainer.go index cdae5ac9ca8..089b3be4a02 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_vault.go index 4863bc09df6..bcec8f3fccc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_get.go index 0a80f4383e1..21d0209de27 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionClustersClient) Get(ctx context.Context, id Replica var model ReplicationProtectionCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_list.go index b974d3c842d..006c98e0ece 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go index fb44df954e5..d6cdb3e3030 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aapplyclusterrecoverypointinput.go @@ -13,6 +13,14 @@ var _ ApplyClusterRecoveryPointProviderSpecificInput = A2AApplyClusterRecoveryPo type A2AApplyClusterRecoveryPointInput struct { // Fields inherited from ApplyClusterRecoveryPointProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AApplyClusterRecoveryPointInput) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return BaseApplyClusterRecoveryPointProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AApplyClusterRecoveryPointInput{} @@ -26,9 +34,10 @@ func (s A2AApplyClusterRecoveryPointInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AApplyClusterRecoveryPointInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go index 983aace7d3b..dc11ca955f1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclustertestfailoverinput.go @@ -15,6 +15,14 @@ type A2AClusterTestFailoverInput struct { IndividualNodeRecoveryPoints *[]string `json:"individualNodeRecoveryPoints,omitempty"` // Fields inherited from ClusterTestFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterTestFailoverInput) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return BaseClusterTestFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterTestFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AClusterTestFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterTestFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go index e8364f0df4f..193f06824e4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2aclusterunplannedfailoverinput.go @@ -15,6 +15,14 @@ type A2AClusterUnplannedFailoverInput struct { IndividualNodeRecoveryPoints *[]string `json:"individualNodeRecoveryPoints,omitempty"` // Fields inherited from ClusterUnplannedFailoverProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AClusterUnplannedFailoverInput) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return BaseClusterUnplannedFailoverProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AClusterUnplannedFailoverInput{} @@ -28,9 +36,10 @@ func (s A2AClusterUnplannedFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AClusterUnplannedFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go index bab528c1103..2a04b366aca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2areplicationprotectionclusterdetails.go @@ -35,6 +35,14 @@ type A2AReplicationProtectionClusterDetails struct { RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` // Fields inherited from ReplicationClusterProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationProtectionClusterDetails) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return BaseReplicationClusterProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationProtectionClusterDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationProtectionClusterDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationProtectionClusterDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go index 3382a2c37c4..8532960ff6a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_a2ashareddiskreplicationdetails.go @@ -24,6 +24,14 @@ type A2ASharedDiskReplicationDetails struct { UnprotectedDisks *[]A2AUnprotectedDiskDetails `json:"unprotectedDisks,omitempty"` // Fields inherited from SharedDiskReplicationProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2ASharedDiskReplicationDetails) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return BaseSharedDiskReplicationProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASharedDiskReplicationDetails{} @@ -37,9 +45,10 @@ func (s A2ASharedDiskReplicationDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASharedDiskReplicationDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go index d7cfb36ad06..206ba39cc16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointinputproperties.go @@ -32,7 +32,7 @@ func (s *ApplyClusterRecoveryPointInputProperties) UnmarshalJSON(bytes []byte) e } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(v) + impl, err := UnmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ApplyClusterRecoveryPointInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go index 790eb5d59ef..cfd819e7034 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_applyclusterrecoverypointproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ApplyClusterRecoveryPointProviderSpecificInput interface { + ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl } -// RawApplyClusterRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ApplyClusterRecoveryPointProviderSpecificInput = BaseApplyClusterRecoveryPointProviderSpecificInputImpl{} + +type BaseApplyClusterRecoveryPointProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseApplyClusterRecoveryPointProviderSpecificInputImpl) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return s +} + +var _ ApplyClusterRecoveryPointProviderSpecificInput = RawApplyClusterRecoveryPointProviderSpecificInputImpl{} + +// RawApplyClusterRecoveryPointProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawApplyClusterRecoveryPointProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + applyClusterRecoveryPointProviderSpecificInput BaseApplyClusterRecoveryPointProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyClusterRecoveryPointProviderSpecificInput, error) { +func (s RawApplyClusterRecoveryPointProviderSpecificInputImpl) ApplyClusterRecoveryPointProviderSpecificInput() BaseApplyClusterRecoveryPointProviderSpecificInputImpl { + return s.applyClusterRecoveryPointProviderSpecificInput +} + +func UnmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input []byte) (ApplyClusterRecoveryPointProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalApplyClusterRecoveryPointProviderSpecificInputImplementation(input return out, nil } - out := RawApplyClusterRecoveryPointProviderSpecificInputImpl{ + var parent BaseApplyClusterRecoveryPointProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseApplyClusterRecoveryPointProviderSpecificInputImpl: %+v", err) + } + + return RawApplyClusterRecoveryPointProviderSpecificInputImpl{ + applyClusterRecoveryPointProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go index 9112009354d..dff6642e963 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverinputproperties.go @@ -34,7 +34,7 @@ func (s *ClusterTestFailoverInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterTestFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalClusterTestFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterTestFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go index 6a97d27be05..c1c9e34fd0f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clustertestfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterTestFailoverProviderSpecificInput interface { + ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl } -// RawClusterTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterTestFailoverProviderSpecificInput = BaseClusterTestFailoverProviderSpecificInputImpl{} + +type BaseClusterTestFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterTestFailoverProviderSpecificInputImpl) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return s +} + +var _ ClusterTestFailoverProviderSpecificInput = RawClusterTestFailoverProviderSpecificInputImpl{} + +// RawClusterTestFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterTestFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + clusterTestFailoverProviderSpecificInput BaseClusterTestFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawClusterTestFailoverProviderSpecificInputImpl) ClusterTestFailoverProviderSpecificInput() BaseClusterTestFailoverProviderSpecificInputImpl { + return s.clusterTestFailoverProviderSpecificInput } -func unmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byte) (ClusterTestFailoverProviderSpecificInput, error) { +func UnmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byte) (ClusterTestFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterTestFailoverProviderSpecificInputImplementation(input []byt return out, nil } - out := RawClusterTestFailoverProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseClusterTestFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterTestFailoverProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawClusterTestFailoverProviderSpecificInputImpl{ + clusterTestFailoverProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go index c06021021a2..23e260f9076 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverinputproperties.go @@ -32,7 +32,7 @@ func (s *ClusterUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byte) er } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(v) + impl, err := UnmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ClusterUnplannedFailoverInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go index b20322e7125..b8fc9491cef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_clusterunplannedfailoverproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ClusterUnplannedFailoverProviderSpecificInput interface { + ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl } -// RawClusterUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ClusterUnplannedFailoverProviderSpecificInput = BaseClusterUnplannedFailoverProviderSpecificInputImpl{} + +type BaseClusterUnplannedFailoverProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseClusterUnplannedFailoverProviderSpecificInputImpl) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return s +} + +var _ ClusterUnplannedFailoverProviderSpecificInput = RawClusterUnplannedFailoverProviderSpecificInputImpl{} + +// RawClusterUnplannedFailoverProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawClusterUnplannedFailoverProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + clusterUnplannedFailoverProviderSpecificInput BaseClusterUnplannedFailoverProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input []byte) (ClusterUnplannedFailoverProviderSpecificInput, error) { +func (s RawClusterUnplannedFailoverProviderSpecificInputImpl) ClusterUnplannedFailoverProviderSpecificInput() BaseClusterUnplannedFailoverProviderSpecificInputImpl { + return s.clusterUnplannedFailoverProviderSpecificInput +} + +func UnmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input []byte) (ClusterUnplannedFailoverProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalClusterUnplannedFailoverProviderSpecificInputImplementation(input return out, nil } - out := RawClusterUnplannedFailoverProviderSpecificInputImpl{ + var parent BaseClusterUnplannedFailoverProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseClusterUnplannedFailoverProviderSpecificInputImpl: %+v", err) + } + + return RawClusterUnplannedFailoverProviderSpecificInputImpl{ + clusterUnplannedFailoverProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go index 23fc580ae66..d108b61063e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationclusterproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationClusterProviderSpecificSettings interface { + ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl } -// RawReplicationClusterProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationClusterProviderSpecificSettings = BaseReplicationClusterProviderSpecificSettingsImpl{} + +type BaseReplicationClusterProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationClusterProviderSpecificSettingsImpl) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationClusterProviderSpecificSettings = RawReplicationClusterProviderSpecificSettingsImpl{} + +// RawReplicationClusterProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationClusterProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationClusterProviderSpecificSettings BaseReplicationClusterProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationClusterProviderSpecificSettingsImplementation(input []byte) (ReplicationClusterProviderSpecificSettings, error) { +func (s RawReplicationClusterProviderSpecificSettingsImpl) ReplicationClusterProviderSpecificSettings() BaseReplicationClusterProviderSpecificSettingsImpl { + return s.replicationClusterProviderSpecificSettings +} + +func UnmarshalReplicationClusterProviderSpecificSettingsImplementation(input []byte) (ReplicationClusterProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationClusterProviderSpecificSettingsImplementation(input []b return out, nil } - out := RawReplicationClusterProviderSpecificSettingsImpl{ + var parent BaseReplicationClusterProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationClusterProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationClusterProviderSpecificSettingsImpl{ + replicationClusterProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go index bac8fd366bc..375e1b710e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_replicationprotectionclusterproperties.go @@ -113,7 +113,7 @@ func (s *ReplicationProtectionClusterProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationClusterProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationClusterProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionClusterProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go index de9ff5ce065..36e49fcb695 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationitemproperties.go @@ -42,7 +42,7 @@ func (s *SharedDiskReplicationItemProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["sharedDiskProviderSpecificDetails"]; ok { - impl, err := unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SharedDiskProviderSpecificDetails' for 'SharedDiskReplicationItemProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go index 0519fe8a74f..4bdda100724 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/model_shareddiskreplicationproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SharedDiskReplicationProviderSpecificSettings interface { + SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl } -// RawSharedDiskReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SharedDiskReplicationProviderSpecificSettings = BaseSharedDiskReplicationProviderSpecificSettingsImpl{} + +type BaseSharedDiskReplicationProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSharedDiskReplicationProviderSpecificSettingsImpl) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return s +} + +var _ SharedDiskReplicationProviderSpecificSettings = RawSharedDiskReplicationProviderSpecificSettingsImpl{} + +// RawSharedDiskReplicationProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSharedDiskReplicationProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + sharedDiskReplicationProviderSpecificSettings BaseSharedDiskReplicationProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input []byte) (SharedDiskReplicationProviderSpecificSettings, error) { +func (s RawSharedDiskReplicationProviderSpecificSettingsImpl) SharedDiskReplicationProviderSpecificSettings() BaseSharedDiskReplicationProviderSpecificSettingsImpl { + return s.sharedDiskReplicationProviderSpecificSettings +} + +func UnmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input []byte) (SharedDiskReplicationProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSharedDiskReplicationProviderSpecificSettingsImplementation(input return out, nil } - out := RawSharedDiskReplicationProviderSpecificSettingsImpl{ + var parent BaseSharedDiskReplicationProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSharedDiskReplicationProviderSpecificSettingsImpl: %+v", err) + } + + return RawSharedDiskReplicationProviderSpecificSettingsImpl{ + sharedDiskReplicationProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/version.go index e560b5b14bb..3b55d06604c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionclusters/version.go @@ -1,12 +1,10 @@ package replicationprotectionclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionclusters/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md index 55320a0d137..27e97def059 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings` Documentation -The `replicationprotectioncontainermappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotectioncontainermappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go index ec466904755..4fe661f7f6f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainerMappingsClient struct { } func NewReplicationProtectionContainerMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainerMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainermappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainerMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go index 084d69de65b..e69d556fd21 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go index 7c5cb580b93..9484fa228a3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_replicationprotectioncontainermapping.go @@ -48,7 +48,7 @@ func ParseReplicationProtectionContainerMappingID(input string) (*ReplicationPro } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectionContainerMappingIDInsensitively(input string) (*R } id := ReplicationProtectionContainerMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go index e488084444d..a31666e79b7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go index 0d99040f6cb..31623992dab 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, i var model ProtectionContainerMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go index f8472547d4f..520decdc12b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2acontainermappinginput.go @@ -16,6 +16,14 @@ type A2AContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go index 7d5038331df..f8d56c9abca 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aprotectioncontainermappingdetails.go @@ -18,6 +18,14 @@ type A2AProtectionContainerMappingDetails struct { ScheduleName *string `json:"scheduleName,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2AProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AProtectionContainerMappingDetails{} @@ -31,9 +39,10 @@ func (s A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go index e3734760574..7eca6e5966e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_a2aupdatecontainermappinginput.go @@ -16,6 +16,14 @@ type A2AUpdateContainerMappingInput struct { AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AUpdateContainerMappingInput{} @@ -29,9 +37,10 @@ func (s A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go index 9c1938b0fed..c6b1b6a82e2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_createprotectioncontainermappinginputproperties.go @@ -32,7 +32,7 @@ func (s *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'CreateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go index 37be76a4162..1b6791491b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmprotectioncontainermappingdetails.go @@ -14,6 +14,14 @@ type InMageRcmProtectionContainerMappingDetails struct { EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmProtectionContainerMappingDetails{} @@ -27,9 +35,10 @@ func (s InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go index 1ae5b455516..39728993aec 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_inmagercmupdatecontainermappinginput.go @@ -14,6 +14,14 @@ type InMageRcmUpdateContainerMappingInput struct { EnableAgentAutoUpgrade string `json:"enableAgentAutoUpgrade"` // Fields inherited from ReplicationProviderSpecificUpdateContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s InMageRcmUpdateContainerMappingInput) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = InMageRcmUpdateContainerMappingInput{} @@ -27,9 +35,10 @@ func (s InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InMageRcmUpdateContainerMappingInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go index 2cf9d980640..3691b3e8c73 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproperties.go @@ -48,7 +48,7 @@ func (s *ProtectionContainerMappingProperties) UnmarshalJSON(bytes []byte) error } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ProtectionContainerMappingProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go index 265a84762fb..68ac9e60feb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_protectioncontainermappingproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionContainerMappingProviderSpecificDetails interface { + ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl } -// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionContainerMappingProviderSpecificDetails = BaseProtectionContainerMappingProviderSpecificDetailsImpl{} + +type BaseProtectionContainerMappingProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s +} + +var _ ProtectionContainerMappingProviderSpecificDetails = RawProtectionContainerMappingProviderSpecificDetailsImpl{} + +// RawProtectionContainerMappingProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionContainerMappingProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + protectionContainerMappingProviderSpecificDetails BaseProtectionContainerMappingProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { +func (s RawProtectionContainerMappingProviderSpecificDetailsImpl) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return s.protectionContainerMappingProviderSpecificDetails +} + +func UnmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(input []byte) (ProtectionContainerMappingProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalProtectionContainerMappingProviderSpecificDetailsImplementation(in return out, nil } - out := RawProtectionContainerMappingProviderSpecificDetailsImpl{ + var parent BaseProtectionContainerMappingProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionContainerMappingProviderSpecificDetailsImpl: %+v", err) + } + + return RawProtectionContainerMappingProviderSpecificDetailsImpl{ + protectionContainerMappingProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go index baeb2a5e095..70151877c5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificcontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerMappingInput interface { + ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl } -// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerMappingInput = BaseReplicationProviderSpecificContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerMappingInput = RawReplicationProviderSpecificContainerMappingInputImpl{} + +// RawReplicationProviderSpecificContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerMappingInput BaseReplicationProviderSpecificContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { +func (s RawReplicationProviderSpecificContainerMappingInputImpl) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return s.replicationProviderSpecificContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificContainerMappingInputImplementation(inp return out, nil } - out := RawReplicationProviderSpecificContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerMappingInputImpl{ + replicationProviderSpecificContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go index 462294f3689..2c8d68f6f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_replicationproviderspecificupdatecontainermappinginput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificUpdateContainerMappingInput interface { + ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl } -// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificUpdateContainerMappingInput = BaseReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +type BaseReplicationProviderSpecificUpdateContainerMappingInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s +} + +var _ ReplicationProviderSpecificUpdateContainerMappingInput = RawReplicationProviderSpecificUpdateContainerMappingInputImpl{} + +// RawReplicationProviderSpecificUpdateContainerMappingInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificUpdateContainerMappingInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificUpdateContainerMappingInput BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { +func (s RawReplicationProviderSpecificUpdateContainerMappingInputImpl) ReplicationProviderSpecificUpdateContainerMappingInput() BaseReplicationProviderSpecificUpdateContainerMappingInputImpl { + return s.replicationProviderSpecificUpdateContainerMappingInput +} + +func UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(input []byte) (ReplicationProviderSpecificUpdateContainerMappingInput, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementati return out, nil } - out := RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + var parent BaseReplicationProviderSpecificUpdateContainerMappingInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificUpdateContainerMappingInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificUpdateContainerMappingInputImpl{ + replicationProviderSpecificUpdateContainerMappingInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go index e021c62ed1f..51afe602e16 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_updateprotectioncontainermappinginputproperties.go @@ -22,7 +22,7 @@ func (s *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(bytes [] } if v, ok := temp["providerSpecificInput"]; ok { - impl, err := unmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) + impl, err := UnmarshalReplicationProviderSpecificUpdateContainerMappingInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificInput' for 'UpdateProtectionContainerMappingInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go index d4711386360..a7b44d461aa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtcontainermappinginput.go @@ -19,6 +19,14 @@ type VMwareCbtContainerMappingInput struct { TargetLocation string `json:"targetLocation"` // Fields inherited from ReplicationProviderSpecificContainerMappingInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerMappingInput) ReplicationProviderSpecificContainerMappingInput() BaseReplicationProviderSpecificContainerMappingInputImpl { + return BaseReplicationProviderSpecificContainerMappingInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerMappingInput{} @@ -32,9 +40,10 @@ func (s VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerMappingInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go index 29bd438cf42..0e4716ee72b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/model_vmwarecbtprotectioncontainermappingdetails.go @@ -21,6 +21,14 @@ type VMwareCbtProtectionContainerMappingDetails struct { TargetLocation *string `json:"targetLocation,omitempty"` // Fields inherited from ProtectionContainerMappingProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtProtectionContainerMappingDetails) ProtectionContainerMappingProviderSpecificDetails() BaseProtectionContainerMappingProviderSpecificDetailsImpl { + return BaseProtectionContainerMappingProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtProtectionContainerMappingDetails{} @@ -34,9 +42,10 @@ func (s VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtProtectionContainerMappingDetails: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go index bff3e96cbcb..9bbb3ab419b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainermappings/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainermappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainermappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainermappings/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md index 0ba3feccef5..c2894203898 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers` Documentation -The `replicationprotectioncontainers` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotectioncontainers` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go index 42e87f35110..29eec428f7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionContainersClient struct { } func NewReplicationProtectionContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectioncontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionContainersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go index def9cc26045..7cacc21c341 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go index dbbd4e1775a..4b65132e969 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_replicationprotectioncontainer.go @@ -46,7 +46,7 @@ func ParseReplicationProtectionContainerID(input string) (*ReplicationProtection } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationProtectionContainerIDInsensitively(input string) (*Replicat } id := ReplicationProtectionContainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go index 53a72437764..63f60f75821 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go index 3ea4716c444..76f18d1e4d0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionContainersClient) Get(ctx context.Context, id Repli var model ProtectionContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go index 266ed59b59f..f119b15f58d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2AContainerCreationIn type A2AContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2AContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2AContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go index d5d6094ea4e..8f67cf738e5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2acrossclustermigrationcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = A2ACrossClusterMigrati type A2ACrossClusterMigrationContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ACrossClusterMigrationContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACrossClusterMigrationContainerCreationInput{} @@ -26,9 +34,10 @@ func (s A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACrossClusterMigrationContainerCreationInput: %+v", err) } + decoded["instanceType"] = "A2ACrossClusterMigration" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go index 5d52d67ba04..162f36c45b2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchclusterprotectioninput.go @@ -16,6 +16,14 @@ type A2ASwitchClusterProtectionInput struct { RecoveryContainerId *string `json:"recoveryContainerId,omitempty"` // Fields inherited from SwitchClusterProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchClusterProtectionInput) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return BaseSwitchClusterProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchClusterProtectionInput{} @@ -29,9 +37,10 @@ func (s A2ASwitchClusterProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchClusterProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go index a2d5ecbeefb..fc86ae07dcd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_a2aswitchprotectioninput.go @@ -26,6 +26,14 @@ type A2ASwitchProtectionInput struct { VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from SwitchProtectionProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s A2ASwitchProtectionInput) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return BaseSwitchProtectionProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ASwitchProtectionInput{} @@ -39,9 +47,10 @@ func (s A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ASwitchProtectionInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go index c3322f96a09..4ed77824053 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_createprotectioncontainerinputproperties.go @@ -29,7 +29,7 @@ func (s *CreateProtectionContainerInputProperties) UnmarshalJSON(bytes []byte) e output := make([]ReplicationProviderSpecificContainerCreationInput, 0) for i, val := range listTemp { - impl, err := unmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) + impl, err := UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateProtectionContainerInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go index a7fde08841d..5609356bda2 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_replicationproviderspecificcontainercreationinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProviderSpecificContainerCreationInput interface { + ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl } -// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProviderSpecificContainerCreationInput = BaseReplicationProviderSpecificContainerCreationInputImpl{} + +type BaseReplicationProviderSpecificContainerCreationInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s +} + +var _ ReplicationProviderSpecificContainerCreationInput = RawReplicationProviderSpecificContainerCreationInputImpl{} + +// RawReplicationProviderSpecificContainerCreationInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProviderSpecificContainerCreationInputImpl struct { - Type string - Values map[string]interface{} + replicationProviderSpecificContainerCreationInput BaseReplicationProviderSpecificContainerCreationInputImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { +func (s RawReplicationProviderSpecificContainerCreationInputImpl) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return s.replicationProviderSpecificContainerCreationInput +} + +func UnmarshalReplicationProviderSpecificContainerCreationInputImplementation(input []byte) (ReplicationProviderSpecificContainerCreationInput, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReplicationProviderSpecificContainerCreationInputImplementation(in return out, nil } - out := RawReplicationProviderSpecificContainerCreationInputImpl{ + var parent BaseReplicationProviderSpecificContainerCreationInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProviderSpecificContainerCreationInputImpl: %+v", err) + } + + return RawReplicationProviderSpecificContainerCreationInputImpl{ + replicationProviderSpecificContainerCreationInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go index cda13d52d7f..a544f104bf3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchClusterProtectionInputProperties) UnmarshalJSON(bytes []byte) err } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchClusterProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchClusterProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go index ed4680c5f83..8a09357be82 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchclusterprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchClusterProtectionProviderSpecificInput interface { + SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl } -// RawSwitchClusterProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchClusterProtectionProviderSpecificInput = BaseSwitchClusterProtectionProviderSpecificInputImpl{} + +type BaseSwitchClusterProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchClusterProtectionProviderSpecificInputImpl) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchClusterProtectionProviderSpecificInput = RawSwitchClusterProtectionProviderSpecificInputImpl{} + +// RawSwitchClusterProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchClusterProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchClusterProtectionProviderSpecificInput BaseSwitchClusterProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} } -func unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input []byte) (SwitchClusterProtectionProviderSpecificInput, error) { +func (s RawSwitchClusterProtectionProviderSpecificInputImpl) SwitchClusterProtectionProviderSpecificInput() BaseSwitchClusterProtectionProviderSpecificInputImpl { + return s.switchClusterProtectionProviderSpecificInput +} + +func UnmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input []byte) (SwitchClusterProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchClusterProtectionProviderSpecificInputImplementation(input [ return out, nil } - out := RawSwitchClusterProtectionProviderSpecificInputImpl{ + var parent BaseSwitchClusterProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchClusterProtectionProviderSpecificInputImpl: %+v", err) + } + + return RawSwitchClusterProtectionProviderSpecificInputImpl{ + switchClusterProtectionProviderSpecificInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go index 9ddc61f5e27..4384825d277 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectioninputproperties.go @@ -30,7 +30,7 @@ func (s *SwitchProtectionInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalSwitchProtectionProviderSpecificInputImplementation(v) + impl, err := UnmarshalSwitchProtectionProviderSpecificInputImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'SwitchProtectionInputProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go index 5d72ac382a0..4a9ca779963 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_switchprotectionproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SwitchProtectionProviderSpecificInput interface { + SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl } -// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SwitchProtectionProviderSpecificInput = BaseSwitchProtectionProviderSpecificInputImpl{} + +type BaseSwitchProtectionProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s +} + +var _ SwitchProtectionProviderSpecificInput = RawSwitchProtectionProviderSpecificInputImpl{} + +// RawSwitchProtectionProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSwitchProtectionProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + switchProtectionProviderSpecificInput BaseSwitchProtectionProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawSwitchProtectionProviderSpecificInputImpl) SwitchProtectionProviderSpecificInput() BaseSwitchProtectionProviderSpecificInputImpl { + return s.switchProtectionProviderSpecificInput } -func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { +func UnmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) (SwitchProtectionProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSwitchProtectionProviderSpecificInputImplementation(input []byte) return out, nil } - out := RawSwitchProtectionProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseSwitchProtectionProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSwitchProtectionProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawSwitchProtectionProviderSpecificInputImpl{ + switchProtectionProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go index 2db1f2ac651..bea3e3c4f93 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/model_vmwarecbtcontainercreationinput.go @@ -13,6 +13,14 @@ var _ ReplicationProviderSpecificContainerCreationInput = VMwareCbtContainerCrea type VMwareCbtContainerCreationInput struct { // Fields inherited from ReplicationProviderSpecificContainerCreationInput + + InstanceType string `json:"instanceType"` +} + +func (s VMwareCbtContainerCreationInput) ReplicationProviderSpecificContainerCreationInput() BaseReplicationProviderSpecificContainerCreationInputImpl { + return BaseReplicationProviderSpecificContainerCreationInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = VMwareCbtContainerCreationInput{} @@ -26,9 +34,10 @@ func (s VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMwareCbtContainerCreationInput: %+v", err) } + decoded["instanceType"] = "VMwareCbt" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go index 9ba5ecedd1b..5dac995793e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectioncontainers/version.go @@ -1,12 +1,10 @@ package replicationprotectioncontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectioncontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectioncontainers/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/README.md index cd507f5f6d2..65245097afd 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents` Documentation -The `replicationprotectionintents` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationprotectionintents` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/client.go index c2c414081be..188347bfd7e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/client.go @@ -15,7 +15,7 @@ type ReplicationProtectionIntentsClient struct { } func NewReplicationProtectionIntentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationProtectionIntentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationprotectionintents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationprotectionintents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationProtectionIntentsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_replicationprotectionintent.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_replicationprotectionintent.go index ce628b8d732..69a62175f88 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_replicationprotectionintent.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_replicationprotectionintent.go @@ -44,7 +44,7 @@ func ParseReplicationProtectionIntentID(input string) (*ReplicationProtectionInt } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationProtectionIntentIDInsensitively(input string) (*Replication } id := ReplicationProtectionIntentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_vault.go index 6769dde59ac..8e08c1be585 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_create.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_create.go index 95931735e3f..82af2c6bbb0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_create.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_create.go @@ -49,7 +49,6 @@ func (c ReplicationProtectionIntentsClient) Create(ctx context.Context, id Repli var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_get.go index a7cc75aa5c9..0352aeb3e5c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationProtectionIntentsClient) Get(ctx context.Context, id Replicat var model ReplicationProtectionIntent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_list.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_list.go index bbb7082780e..6948c72b429 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_list.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go index d559110e101..37fa660c7de 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2acreateprotectionintentinput.go @@ -35,6 +35,14 @@ type A2ACreateProtectionIntentInput struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from CreateProtectionIntentProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s A2ACreateProtectionIntentInput) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return BaseCreateProtectionIntentProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2ACreateProtectionIntentInput{} @@ -48,9 +56,10 @@ func (s A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2ACreateProtectionIntentInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfileCustomInput"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfileCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySetCustomInput"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySetCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroupCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2ACreateProtectionIntentInput) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetworkCustomInput"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetworkCustomInput' for 'A2ACreateProtectionIntentInput': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go index 3e73bb8e6f8..dee78c2bf42 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentdiskinputdetails.go @@ -31,7 +31,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(bytes []byte) error } if v, ok := temp["recoveryAzureStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAzureStorageAccountCustomInput' for 'A2AProtectionIntentDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go index fdc740a14fb..b89192c288d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2aprotectionintentmanageddiskinputdetails.go @@ -39,7 +39,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["primaryStagingStorageAccountCustomInput"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccountCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } @@ -47,7 +47,7 @@ func (s *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(bytes []byte) } if v, ok := temp["recoveryResourceGroupCustomInput"]; ok { - impl, err := unmarshalRecoveryResourceGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryResourceGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryResourceGroupCustomInput' for 'A2AProtectionIntentManagedDiskInputDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go index 9605642ee8d..1cacbdcba34 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_a2areplicationintentdetails.go @@ -35,6 +35,14 @@ type A2AReplicationIntentDetails struct { VMManagedDisks *[]A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` // Fields inherited from ReplicationProtectionIntentProviderSpecificSettings + + InstanceType string `json:"instanceType"` +} + +func (s A2AReplicationIntentDetails) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return BaseReplicationProtectionIntentProviderSpecificSettingsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = A2AReplicationIntentDetails{} @@ -48,9 +56,10 @@ func (s A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling A2AReplicationIntentDetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) @@ -76,6 +85,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { s.AutomationAccountAuthenticationType = decoded.AutomationAccountAuthenticationType s.DiskEncryptionInfo = decoded.DiskEncryptionInfo s.FabricObjectId = decoded.FabricObjectId + s.InstanceType = decoded.InstanceType s.MultiVMGroupId = decoded.MultiVMGroupId s.MultiVMGroupName = decoded.MultiVMGroupName s.PrimaryLocation = decoded.PrimaryLocation @@ -93,7 +103,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["primaryStagingStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PrimaryStagingStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -101,7 +111,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["protectionProfile"]; ok { - impl, err := unmarshalProtectionProfileCustomDetailsImplementation(v) + impl, err := UnmarshalProtectionProfileCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProtectionProfile' for 'A2AReplicationIntentDetails': %+v", err) } @@ -109,7 +119,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryAvailabilitySet"]; ok { - impl, err := unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryAvailabilitySet' for 'A2AReplicationIntentDetails': %+v", err) } @@ -117,7 +127,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryBootDiagStorageAccount"]; ok { - impl, err := unmarshalStorageAccountCustomDetailsImplementation(v) + impl, err := UnmarshalStorageAccountCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryBootDiagStorageAccount' for 'A2AReplicationIntentDetails': %+v", err) } @@ -125,7 +135,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryProximityPlacementGroup"]; ok { - impl, err := unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryProximityPlacementGroup' for 'A2AReplicationIntentDetails': %+v", err) } @@ -133,7 +143,7 @@ func (s *A2AReplicationIntentDetails) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["recoveryVirtualNetwork"]; ok { - impl, err := unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) + impl, err := UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'RecoveryVirtualNetwork' for 'A2AReplicationIntentDetails': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproperties.go index 82abb10ea69..846255549e1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproperties.go @@ -22,7 +22,7 @@ func (s *CreateProtectionIntentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) + impl, err := UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'CreateProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go index b54af17cb31..c3a8674eb7f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_createprotectionintentproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CreateProtectionIntentProviderSpecificDetails interface { + CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl } -// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CreateProtectionIntentProviderSpecificDetails = BaseCreateProtectionIntentProviderSpecificDetailsImpl{} + +type BaseCreateProtectionIntentProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s +} + +var _ CreateProtectionIntentProviderSpecificDetails = RawCreateProtectionIntentProviderSpecificDetailsImpl{} + +// RawCreateProtectionIntentProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCreateProtectionIntentProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + createProtectionIntentProviderSpecificDetails BaseCreateProtectionIntentProviderSpecificDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { +func (s RawCreateProtectionIntentProviderSpecificDetailsImpl) CreateProtectionIntentProviderSpecificDetails() BaseCreateProtectionIntentProviderSpecificDetailsImpl { + return s.createProtectionIntentProviderSpecificDetails +} + +func UnmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input []byte) (CreateProtectionIntentProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCreateProtectionIntentProviderSpecificDetailsImplementation(input return out, nil } - out := RawCreateProtectionIntentProviderSpecificDetailsImpl{ + var parent BaseCreateProtectionIntentProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCreateProtectionIntentProviderSpecificDetailsImpl: %+v", err) + } + + return RawCreateProtectionIntentProviderSpecificDetailsImpl{ + createProtectionIntentProviderSpecificDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingprotectionprofile.go index dbee810013d..0b216ef5a81 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingprotectionprofile.go @@ -14,6 +14,14 @@ type ExistingProtectionProfile struct { ProtectionProfileId string `json:"protectionProfileId"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingProtectionProfile{} @@ -27,9 +35,10 @@ func (s ExistingProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingProtectionProfile: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go index aa58d2d31a6..843ef1f8cb7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryavailabilityset.go @@ -14,6 +14,14 @@ type ExistingRecoveryAvailabilitySet struct { RecoveryAvailabilitySetId *string `json:"recoveryAvailabilitySetId,omitempty"` // Fields inherited from RecoveryAvailabilitySetCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryAvailabilitySet) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return BaseRecoveryAvailabilitySetCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryAvailabilitySet{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryAvailabilitySet: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go index e09469c79bc..9ce68dbc0c1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryproximityplacementgroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryProximityPlacementGroup struct { RecoveryProximityPlacementGroupId *string `json:"recoveryProximityPlacementGroupId,omitempty"` // Fields inherited from RecoveryProximityPlacementGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryProximityPlacementGroup) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return BaseRecoveryProximityPlacementGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryProximityPlacementGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryProximityPlacementGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go index 05d6e88d647..aaeb02cfaf5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryrecoveryresourcegroup.go @@ -14,6 +14,14 @@ type ExistingRecoveryRecoveryResourceGroup struct { RecoveryResourceGroupId *string `json:"recoveryResourceGroupId,omitempty"` // Fields inherited from RecoveryResourceGroupCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryRecoveryResourceGroup) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return BaseRecoveryResourceGroupCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryRecoveryResourceGroup{} @@ -27,9 +35,10 @@ func (s ExistingRecoveryRecoveryResourceGroup) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryRecoveryResourceGroup: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go index a8524773f2d..d423cd45704 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type ExistingRecoveryVirtualNetwork struct { RecoveryVirtualNetworkId string `json:"recoveryVirtualNetworkId"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingstorageaccount.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingstorageaccount.go index 4150f1c78d0..aff65dcc0b5 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingstorageaccount.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_existingstorageaccount.go @@ -14,6 +14,14 @@ type ExistingStorageAccount struct { AzureStorageAccountId string `json:"azureStorageAccountId"` // Fields inherited from StorageAccountCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s ExistingStorageAccount) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return BaseStorageAccountCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = ExistingStorageAccount{} @@ -27,9 +35,10 @@ func (s ExistingStorageAccount) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExistingStorageAccount: %+v", err) } + decoded["resourceType"] = "Existing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newprotectionprofile.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newprotectionprofile.go index 9763db731fd..024c9f7c66e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newprotectionprofile.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newprotectionprofile.go @@ -18,6 +18,14 @@ type NewProtectionProfile struct { RecoveryPointHistory *int64 `json:"recoveryPointHistory,omitempty"` // Fields inherited from ProtectionProfileCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewProtectionProfile) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return BaseProtectionProfileCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewProtectionProfile{} @@ -31,9 +39,10 @@ func (s NewProtectionProfile) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewProtectionProfile: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go index 37ff485101c..4b1609e51d9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_newrecoveryvirtualnetwork.go @@ -15,6 +15,14 @@ type NewRecoveryVirtualNetwork struct { RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` // Fields inherited from RecoveryVirtualNetworkCustomDetails + + ResourceType string `json:"resourceType"` +} + +func (s NewRecoveryVirtualNetwork) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return BaseRecoveryVirtualNetworkCustomDetailsImpl{ + ResourceType: s.ResourceType, + } } var _ json.Marshaler = NewRecoveryVirtualNetwork{} @@ -28,9 +36,10 @@ func (s NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NewRecoveryVirtualNetwork: %+v", err) } + decoded["resourceType"] = "New" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go index f7a1da7fa29..e2054ed53ad 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_protectionprofilecustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProtectionProfileCustomDetails interface { + ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl } -// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProtectionProfileCustomDetails = BaseProtectionProfileCustomDetailsImpl{} + +type BaseProtectionProfileCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s +} + +var _ ProtectionProfileCustomDetails = RawProtectionProfileCustomDetailsImpl{} + +// RawProtectionProfileCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProtectionProfileCustomDetailsImpl struct { - Type string - Values map[string]interface{} + protectionProfileCustomDetails BaseProtectionProfileCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawProtectionProfileCustomDetailsImpl) ProtectionProfileCustomDetails() BaseProtectionProfileCustomDetailsImpl { + return s.protectionProfileCustomDetails } -func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { +func UnmarshalProtectionProfileCustomDetailsImplementation(input []byte) (ProtectionProfileCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalProtectionProfileCustomDetailsImplementation(input []byte) (Protec return out, nil } - out := RawProtectionProfileCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseProtectionProfileCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProtectionProfileCustomDetailsImpl: %+v", err) } - return out, nil + + return RawProtectionProfileCustomDetailsImpl{ + protectionProfileCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go index f3e97bf0f38..a4752b02b22 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryavailabilitysetcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryAvailabilitySetCustomDetails interface { + RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl } -// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryAvailabilitySetCustomDetails = BaseRecoveryAvailabilitySetCustomDetailsImpl{} + +type BaseRecoveryAvailabilitySetCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s +} + +var _ RecoveryAvailabilitySetCustomDetails = RawRecoveryAvailabilitySetCustomDetailsImpl{} + +// RawRecoveryAvailabilitySetCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryAvailabilitySetCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryAvailabilitySetCustomDetails BaseRecoveryAvailabilitySetCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryAvailabilitySetCustomDetailsImpl) RecoveryAvailabilitySetCustomDetails() BaseRecoveryAvailabilitySetCustomDetailsImpl { + return s.recoveryAvailabilitySetCustomDetails } -func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { +func UnmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) (RecoveryAvailabilitySetCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryAvailabilitySetCustomDetailsImplementation(input []byte) ( return out, nil } - out := RawRecoveryAvailabilitySetCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryAvailabilitySetCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryAvailabilitySetCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryAvailabilitySetCustomDetailsImpl{ + recoveryAvailabilitySetCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go index a9a2ad54e69..098a6326896 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryproximityplacementgroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryProximityPlacementGroupCustomDetails interface { + RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl } -// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryProximityPlacementGroupCustomDetails = BaseRecoveryProximityPlacementGroupCustomDetailsImpl{} + +type BaseRecoveryProximityPlacementGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s +} + +var _ RecoveryProximityPlacementGroupCustomDetails = RawRecoveryProximityPlacementGroupCustomDetailsImpl{} + +// RawRecoveryProximityPlacementGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryProximityPlacementGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryProximityPlacementGroupCustomDetails BaseRecoveryProximityPlacementGroupCustomDetailsImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { +func (s RawRecoveryProximityPlacementGroupCustomDetailsImpl) RecoveryProximityPlacementGroupCustomDetails() BaseRecoveryProximityPlacementGroupCustomDetailsImpl { + return s.recoveryProximityPlacementGroupCustomDetails +} + +func UnmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input []byte) (RecoveryProximityPlacementGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryProximityPlacementGroupCustomDetailsImplementation(input [ return out, nil } - out := RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + var parent BaseRecoveryProximityPlacementGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryProximityPlacementGroupCustomDetailsImpl: %+v", err) + } + + return RawRecoveryProximityPlacementGroupCustomDetailsImpl{ + recoveryProximityPlacementGroupCustomDetails: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go index 702c573d04c..7584d08fd61 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryresourcegroupcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryResourceGroupCustomDetails interface { + RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl } -// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryResourceGroupCustomDetails = BaseRecoveryResourceGroupCustomDetailsImpl{} + +type BaseRecoveryResourceGroupCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s +} + +var _ RecoveryResourceGroupCustomDetails = RawRecoveryResourceGroupCustomDetailsImpl{} + +// RawRecoveryResourceGroupCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryResourceGroupCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryResourceGroupCustomDetails BaseRecoveryResourceGroupCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryResourceGroupCustomDetailsImpl) RecoveryResourceGroupCustomDetails() BaseRecoveryResourceGroupCustomDetailsImpl { + return s.recoveryResourceGroupCustomDetails } -func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { +func UnmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (RecoveryResourceGroupCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryResourceGroupCustomDetailsImplementation(input []byte) (Re return out, nil } - out := RawRecoveryResourceGroupCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryResourceGroupCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryResourceGroupCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryResourceGroupCustomDetailsImpl{ + recoveryResourceGroupCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go index 4649f35f1dd..bf5bfa648ef 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_recoveryvirtualnetworkcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryVirtualNetworkCustomDetails interface { + RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl } -// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryVirtualNetworkCustomDetails = BaseRecoveryVirtualNetworkCustomDetailsImpl{} + +type BaseRecoveryVirtualNetworkCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s +} + +var _ RecoveryVirtualNetworkCustomDetails = RawRecoveryVirtualNetworkCustomDetailsImpl{} + +// RawRecoveryVirtualNetworkCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryVirtualNetworkCustomDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryVirtualNetworkCustomDetails BaseRecoveryVirtualNetworkCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryVirtualNetworkCustomDetailsImpl) RecoveryVirtualNetworkCustomDetails() BaseRecoveryVirtualNetworkCustomDetailsImpl { + return s.recoveryVirtualNetworkCustomDetails } -func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { +func UnmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (RecoveryVirtualNetworkCustomDetails, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalRecoveryVirtualNetworkCustomDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryVirtualNetworkCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryVirtualNetworkCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryVirtualNetworkCustomDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryVirtualNetworkCustomDetailsImpl{ + recoveryVirtualNetworkCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go index 5e15949e0fe..4e9e4d9f935 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproperties.go @@ -38,7 +38,7 @@ func (s *ReplicationProtectionIntentProperties) UnmarshalJSON(bytes []byte) erro } if v, ok := temp["providerSpecificDetails"]; ok { - impl, err := unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) + impl, err := UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSpecificDetails' for 'ReplicationProtectionIntentProperties': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go index 899bca9364c..42a9efeae05 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_replicationprotectionintentproviderspecificsettings.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReplicationProtectionIntentProviderSpecificSettings interface { + ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl } -// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReplicationProtectionIntentProviderSpecificSettings = BaseReplicationProtectionIntentProviderSpecificSettingsImpl{} + +type BaseReplicationProtectionIntentProviderSpecificSettingsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s +} + +var _ ReplicationProtectionIntentProviderSpecificSettings = RawReplicationProtectionIntentProviderSpecificSettingsImpl{} + +// RawReplicationProtectionIntentProviderSpecificSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReplicationProtectionIntentProviderSpecificSettingsImpl struct { - Type string - Values map[string]interface{} + replicationProtectionIntentProviderSpecificSettings BaseReplicationProtectionIntentProviderSpecificSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { +func (s RawReplicationProtectionIntentProviderSpecificSettingsImpl) ReplicationProtectionIntentProviderSpecificSettings() BaseReplicationProtectionIntentProviderSpecificSettingsImpl { + return s.replicationProtectionIntentProviderSpecificSettings +} + +func UnmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation(input []byte) (ReplicationProtectionIntentProviderSpecificSettings, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalReplicationProtectionIntentProviderSpecificSettingsImplementation( return out, nil } - out := RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + var parent BaseReplicationProtectionIntentProviderSpecificSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReplicationProtectionIntentProviderSpecificSettingsImpl: %+v", err) + } + + return RawReplicationProtectionIntentProviderSpecificSettingsImpl{ + replicationProtectionIntentProviderSpecificSettings: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go index 68675a90e21..44e2d36145c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/model_storageaccountcustomdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageAccountCustomDetails interface { + StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl } -// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StorageAccountCustomDetails = BaseStorageAccountCustomDetailsImpl{} + +type BaseStorageAccountCustomDetailsImpl struct { + ResourceType string `json:"resourceType"` +} + +func (s BaseStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s +} + +var _ StorageAccountCustomDetails = RawStorageAccountCustomDetailsImpl{} + +// RawStorageAccountCustomDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStorageAccountCustomDetailsImpl struct { - Type string - Values map[string]interface{} + storageAccountCustomDetails BaseStorageAccountCustomDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawStorageAccountCustomDetailsImpl) StorageAccountCustomDetails() BaseStorageAccountCustomDetailsImpl { + return s.storageAccountCustomDetails } -func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { +func UnmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAccountCustomDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalStorageAccountCustomDetailsImplementation(input []byte) (StorageAc return out, nil } - out := RawStorageAccountCustomDetailsImpl{ - Type: value, - Values: temp, + var parent BaseStorageAccountCustomDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStorageAccountCustomDetailsImpl: %+v", err) } - return out, nil + + return RawStorageAccountCustomDetailsImpl{ + storageAccountCustomDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/version.go index 16bfe950a0f..09802e0c090 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationprotectionintents/version.go @@ -1,12 +1,10 @@ package replicationprotectionintents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationprotectionintents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationprotectionintents/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md index 60f04c9ca21..99d6dc7e757 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans` Documentation -The `replicationrecoveryplans` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationrecoveryplans` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go index 1718910fc8a..3337fa87cfc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryPlansClient struct { } func NewReplicationRecoveryPlansClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryPlansClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go index 83c461d6805..94c5c9f67c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_replicationrecoveryplan.go @@ -44,7 +44,7 @@ func ParseReplicationRecoveryPlanID(input string) (*ReplicationRecoveryPlanId, e } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationRecoveryPlanIDInsensitively(input string) (*ReplicationReco } id := ReplicationRecoveryPlanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go index a48dedbcbe4..01f2bfe2bac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go index 8ea4cd77851..3bb61627501 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryPlansClient) Get(ctx context.Context, id ReplicationR var model RecoveryPlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go index cd2989da2de..ecb22eac0c0 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_createrecoveryplaninputproperties.go @@ -43,7 +43,7 @@ func (s *CreateRecoveryPlanInputProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificInput' for 'CreateRecoveryPlanInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go index 4c00474efd5..67f3a9adf65 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2adetails.go @@ -19,6 +19,14 @@ type RecoveryPlanA2ADetails struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2ADetails) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return BaseRecoveryPlanProviderSpecificDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2ADetails{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2ADetails: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go index ed65da3bfd6..a33bb19bdc1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2afailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanA2AFailoverInput struct { RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AFailoverInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go index ff7269aea88..3768e22d457 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplana2ainput.go @@ -19,6 +19,14 @@ type RecoveryPlanA2AInput struct { RecoveryZone *string `json:"recoveryZone,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanA2AInput) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return BaseRecoveryPlanProviderSpecificInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanA2AInput{} @@ -32,9 +40,10 @@ func (s RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanA2AInput: %+v", err) } + decoded["instanceType"] = "A2A" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go index 48d149ecce5..d0dd5149d40 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanaction.go @@ -34,7 +34,7 @@ func (s *RecoveryPlanAction) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customDetails"]; ok { - impl, err := unmarshalRecoveryPlanActionDetailsImplementation(v) + impl, err := UnmarshalRecoveryPlanActionDetailsImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomDetails' for 'RecoveryPlanAction': %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go index 8743f523c01..1a65e48f1b3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanactiondetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanActionDetails interface { + RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl } -// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanActionDetails = BaseRecoveryPlanActionDetailsImpl{} + +type BaseRecoveryPlanActionDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s +} + +var _ RecoveryPlanActionDetails = RawRecoveryPlanActionDetailsImpl{} + +// RawRecoveryPlanActionDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanActionDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanActionDetails BaseRecoveryPlanActionDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanActionDetailsImpl) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return s.recoveryPlanActionDetails } -func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { +func UnmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPlanActionDetails, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalRecoveryPlanActionDetailsImplementation(input []byte) (RecoveryPla return out, nil } - out := RawRecoveryPlanActionDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanActionDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanActionDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanActionDetailsImpl{ + recoveryPlanActionDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go index 58750909e96..a1648419ce9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanautomationrunbookactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanAutomationRunbookActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanAutomationRunbookActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanAutomationRunbookActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanAutomationRunbookActionDetails: %+v", err) } + decoded["instanceType"] = "AutomationRunbookActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go index eeda143cee0..9a4b0f1b42f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailbackinput.go @@ -15,6 +15,14 @@ type RecoveryPlanHyperVReplicaAzureFailbackInput struct { RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailbackInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailbackInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailbackInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzureFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go index 5a0fe3870cc..34356511841 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanhypervreplicaazurefailoverinput.go @@ -16,6 +16,14 @@ type RecoveryPlanHyperVReplicaAzureFailoverInput struct { SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanHyperVReplicaAzureFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanHyperVReplicaAzureFailoverInput{} @@ -29,9 +37,10 @@ func (s RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanHyperVReplicaAzureFailoverInput: %+v", err) } + decoded["instanceType"] = "HyperVReplicaAzure" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go index a69c322e830..3bdbbc0769f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmageazurev2failoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageAzureV2FailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageAzureV2FailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageAzureV2FailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageAzureV2FailoverInput: %+v", err) } + decoded["instanceType"] = "InMageAzureV2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go index f9a288c0d63..bb3d2294b2b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagefailoverinput.go @@ -14,6 +14,14 @@ type RecoveryPlanInMageFailoverInput struct { RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageFailoverInput{} @@ -27,9 +35,10 @@ func (s RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageFailoverInput: %+v", err) } + decoded["instanceType"] = "InMage" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go index cf4ee99187e..f49c9de401d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailbackfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailbackFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailbackFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailbackFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailbackFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcmFailback" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go index eace4ab2d6c..04eb0d55758 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplaninmagercmfailoverinput.go @@ -15,6 +15,14 @@ type RecoveryPlanInMageRcmFailoverInput struct { UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` // Fields inherited from RecoveryPlanProviderSpecificFailoverInput + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanInMageRcmFailoverInput) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return BaseRecoveryPlanProviderSpecificFailoverInputImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanInMageRcmFailoverInput{} @@ -28,9 +36,10 @@ func (s RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanInMageRcmFailoverInput: %+v", err) } + decoded["instanceType"] = "InMageRcm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go index 09234f4e823..91503cc854c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanmanualactiondetails.go @@ -14,6 +14,14 @@ type RecoveryPlanManualActionDetails struct { Description *string `json:"description,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanManualActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanManualActionDetails{} @@ -27,9 +35,10 @@ func (s RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanManualActionDetails: %+v", err) } + decoded["instanceType"] = "ManualActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go index f4e94fedb5b..01f2526b1f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanplannedfailoverinputproperties.go @@ -37,7 +37,7 @@ func (s *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(bytes []byte) output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanPlannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go index 76d17795541..be5436530f6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproperties.go @@ -104,7 +104,7 @@ func (s *RecoveryPlanProperties) UnmarshalJSON(bytes []byte) error { output := make([]RecoveryPlanProviderSpecificDetails, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go index f3f72d62347..1e64526a9ac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificdetails.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificDetails interface { + RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl } -// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificDetails = BaseRecoveryPlanProviderSpecificDetailsImpl{} + +type BaseRecoveryPlanProviderSpecificDetailsImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s +} + +var _ RecoveryPlanProviderSpecificDetails = RawRecoveryPlanProviderSpecificDetailsImpl{} + +// RawRecoveryPlanProviderSpecificDetailsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificDetailsImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificDetails BaseRecoveryPlanProviderSpecificDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificDetailsImpl) RecoveryPlanProviderSpecificDetails() BaseRecoveryPlanProviderSpecificDetailsImpl { + return s.recoveryPlanProviderSpecificDetails } -func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { +func UnmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (RecoveryPlanProviderSpecificDetails, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificDetailsImplementation(input []byte) (R return out, nil } - out := RawRecoveryPlanProviderSpecificDetailsImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificDetailsImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificDetailsImpl{ + recoveryPlanProviderSpecificDetails: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go index 5edf059e80e..5de26d5b884 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificfailoverinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificFailoverInput interface { + RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl } -// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificFailoverInput = BaseRecoveryPlanProviderSpecificFailoverInputImpl{} + +type BaseRecoveryPlanProviderSpecificFailoverInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificFailoverInput = RawRecoveryPlanProviderSpecificFailoverInputImpl{} + +// RawRecoveryPlanProviderSpecificFailoverInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificFailoverInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificFailoverInput BaseRecoveryPlanProviderSpecificFailoverInputImpl + Type string + Values map[string]interface{} } -func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { +func (s RawRecoveryPlanProviderSpecificFailoverInputImpl) RecoveryPlanProviderSpecificFailoverInput() BaseRecoveryPlanProviderSpecificFailoverInputImpl { + return s.recoveryPlanProviderSpecificFailoverInput +} + +func UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(input []by return out, nil } - out := RawRecoveryPlanProviderSpecificFailoverInputImpl{ + var parent BaseRecoveryPlanProviderSpecificFailoverInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificFailoverInputImpl: %+v", err) + } + + return RawRecoveryPlanProviderSpecificFailoverInputImpl{ + recoveryPlanProviderSpecificFailoverInput: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go index b0870834d88..a6a076aad69 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanproviderspecificinput.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type RecoveryPlanProviderSpecificInput interface { + RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl } -// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ RecoveryPlanProviderSpecificInput = BaseRecoveryPlanProviderSpecificInputImpl{} + +type BaseRecoveryPlanProviderSpecificInputImpl struct { + InstanceType string `json:"instanceType"` +} + +func (s BaseRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s +} + +var _ RecoveryPlanProviderSpecificInput = RawRecoveryPlanProviderSpecificInputImpl{} + +// RawRecoveryPlanProviderSpecificInputImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawRecoveryPlanProviderSpecificInputImpl struct { - Type string - Values map[string]interface{} + recoveryPlanProviderSpecificInput BaseRecoveryPlanProviderSpecificInputImpl + Type string + Values map[string]interface{} +} + +func (s RawRecoveryPlanProviderSpecificInputImpl) RecoveryPlanProviderSpecificInput() BaseRecoveryPlanProviderSpecificInputImpl { + return s.recoveryPlanProviderSpecificInput } -func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { +func UnmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (RecoveryPlanProviderSpecificInput, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalRecoveryPlanProviderSpecificInputImplementation(input []byte) (Rec return out, nil } - out := RawRecoveryPlanProviderSpecificInputImpl{ - Type: value, - Values: temp, + var parent BaseRecoveryPlanProviderSpecificInputImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseRecoveryPlanProviderSpecificInputImpl: %+v", err) } - return out, nil + + return RawRecoveryPlanProviderSpecificInputImpl{ + recoveryPlanProviderSpecificInput: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go index 07855278c4f..9e44da053e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanscriptactiondetails.go @@ -16,6 +16,14 @@ type RecoveryPlanScriptActionDetails struct { Timeout *string `json:"timeout,omitempty"` // Fields inherited from RecoveryPlanActionDetails + + InstanceType string `json:"instanceType"` +} + +func (s RecoveryPlanScriptActionDetails) RecoveryPlanActionDetails() BaseRecoveryPlanActionDetailsImpl { + return BaseRecoveryPlanActionDetailsImpl{ + InstanceType: s.InstanceType, + } } var _ json.Marshaler = RecoveryPlanScriptActionDetails{} @@ -29,9 +37,10 @@ func (s RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RecoveryPlanScriptActionDetails: %+v", err) } + decoded["instanceType"] = "ScriptActionDetails" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go index 76922b79ed1..062ff20d542 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplantestfailoverinputproperties.go @@ -41,7 +41,7 @@ func (s *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(bytes []byte) er output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanTestFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go index a3337d470e6..b8b83970f51 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/model_recoveryplanunplannedfailoverinputproperties.go @@ -39,7 +39,7 @@ func (s *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(bytes []byt output := make([]RecoveryPlanProviderSpecificFailoverInput, 0) for i, val := range listTemp { - impl, err := unmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) + impl, err := UnmarshalRecoveryPlanProviderSpecificFailoverInputImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ProviderSpecificDetails' for 'RecoveryPlanUnplannedFailoverInputProperties': %+v", i, err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go index efbdb2891f0..abfd6856ada 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryplans/version.go @@ -1,12 +1,10 @@ package replicationrecoveryplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryplans/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md index f94d92fc477..829b12e789f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders` Documentation -The `replicationrecoveryservicesproviders` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationrecoveryservicesproviders` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go index 32fc26ccfb8..a6150690dac 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/client.go @@ -15,7 +15,7 @@ type ReplicationRecoveryServicesProvidersClient struct { } func NewReplicationRecoveryServicesProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationRecoveryServicesProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationrecoveryservicesproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationRecoveryServicesProvidersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go index ad19e313838..5ae236e25e7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go index 27f3f8e70d3..ada2f263ed8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_replicationrecoveryservicesprovider.go @@ -46,7 +46,7 @@ func ParseReplicationRecoveryServicesProviderID(input string) (*ReplicationRecov } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationRecoveryServicesProviderIDInsensitively(input string) (*Rep } id := ReplicationRecoveryServicesProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go index 3cd2c5281d4..ac0b8a3988b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go index 6266ba75bab..608e93729f9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, id var model RecoveryServicesProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go index e7f28ce9a5f..15ff1bdbaa7 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationrecoveryservicesproviders/version.go @@ -1,12 +1,10 @@ package replicationrecoveryservicesproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationrecoveryservicesproviders/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/README.md index 7c75cbc155e..c2f8dd2c871 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings` Documentation -The `replicationstorageclassificationmappings` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationstorageclassificationmappings` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/client.go index 2bedc378cda..a92438ccd25 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationMappingsClient struct { } func NewReplicationStorageClassificationMappingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationMappingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassificationmappings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationMappingsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go index 3a0d55ab095..b36b3291530 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go index 474b83fe132..d7d8e604e35 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_replicationstorageclassificationmapping.go @@ -48,7 +48,7 @@ func ParseReplicationStorageClassificationMappingID(input string) (*ReplicationS } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationStorageClassificationMappingIDInsensitively(input string) ( } id := ReplicationStorageClassificationMappingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_vault.go index 24096d39e25..ba801b2dd5d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/method_get.go index 8e50da85d95..dfa92e4c832 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, var model StorageClassificationMapping result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/version.go index 2e2cb352ea1..159aecf2e42 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassificationmappings/version.go @@ -1,12 +1,10 @@ package replicationstorageclassificationmappings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassificationmappings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassificationmappings/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/README.md index 11bbef70b4d..79f58800fc8 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications` Documentation -The `replicationstorageclassifications` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationstorageclassifications` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/client.go index 074e60a52aa..15f7f47cdd1 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/client.go @@ -15,7 +15,7 @@ type ReplicationStorageClassificationsClient struct { } func NewReplicationStorageClassificationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationStorageClassificationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationstorageclassifications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationStorageClassificationsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationfabric.go index 3eedbb34426..57e666f42ff 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationstorageclassification.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationstorageclassification.go index 9783849dca7..091624271bf 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationstorageclassification.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_replicationstorageclassification.go @@ -46,7 +46,7 @@ func ParseReplicationStorageClassificationID(input string) (*ReplicationStorageC } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationStorageClassificationIDInsensitively(input string) (*Replic } id := ReplicationStorageClassificationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_vault.go index 7c5582a297a..f2c106db90c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/method_get.go index 4b0b16faadf..1a516c62385 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationStorageClassificationsClient) Get(ctx context.Context, id Rep var model StorageClassification result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/version.go index b56f87d6571..269b07a9de6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationstorageclassifications/version.go @@ -1,12 +1,10 @@ package replicationstorageclassifications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationstorageclassifications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationstorageclassifications/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/README.md index b68aaebc059..5233795902a 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth` Documentation -The `replicationvaulthealth` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationvaulthealth` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/client.go index 4f2d2fd7b2f..65b02d6236f 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/client.go @@ -15,7 +15,7 @@ type ReplicationVaultHealthClient struct { } func NewReplicationVaultHealthClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultHealthClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaulthealth", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaulthealth", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultHealthClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/id_vault.go index 9d7d83f947d..858ab7be52b 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/method_get.go index 46461b8cff1..99edaf64697 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/method_get.go @@ -46,7 +46,6 @@ func (c ReplicationVaultHealthClient) Get(ctx context.Context, id VaultId) (resu var model VaultHealthDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/version.go index 2fde7d2147a..069064959ae 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaulthealth/version.go @@ -1,12 +1,10 @@ package replicationvaulthealth -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaulthealth/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaulthealth/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md index 391f90a0df0..8b17ae6684d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting` Documentation -The `replicationvaultsetting` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationvaultsetting` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go index bf3a8d86c8d..614fa0058cc 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/client.go @@ -15,7 +15,7 @@ type ReplicationVaultSettingClient struct { } func NewReplicationVaultSettingClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationVaultSettingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvaultsetting", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvaultsetting", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationVaultSettingClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go index ff052d93f83..80af0f04c87 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_replicationvaultsetting.go @@ -44,7 +44,7 @@ func ParseReplicationVaultSettingID(input string) (*ReplicationVaultSettingId, e } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationVaultSettingIDInsensitively(input string) (*ReplicationVaul } id := ReplicationVaultSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go index 4cdc6ec9eda..1a8ee01da59 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go index 3173de228a4..1780e8632e3 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationVaultSettingClient) Get(ctx context.Context, id ReplicationVa var model VaultSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go index 18032bc88e8..54b4f94f430 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvaultsetting/version.go @@ -1,12 +1,10 @@ package replicationvaultsetting -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvaultsetting/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvaultsetting/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/README.md index 9ed28ccf3bb..c17e46321fb 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters` Documentation -The `replicationvcenters` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `replicationvcenters` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/client.go index 27cc23e985f..57e9dd9ecaa 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/client.go @@ -15,7 +15,7 @@ type ReplicationvCentersClient struct { } func NewReplicationvCentersClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationvCentersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationvcenters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationvcenters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationvCentersClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationfabric.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationfabric.go index e2f6e3a8fe5..8d495f314b6 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationfabric.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationfabric.go @@ -44,7 +44,7 @@ func ParseReplicationFabricID(input string) (*ReplicationFabricId, error) { } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicationFabricIDInsensitively(input string) (*ReplicationFabricId, } id := ReplicationFabricId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationvcenter.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationvcenter.go index 4781b0c432d..e80d5c4df62 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationvcenter.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_replicationvcenter.go @@ -46,7 +46,7 @@ func ParseReplicationvCenterID(input string) (*ReplicationvCenterId, error) { } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationvCenterIDInsensitively(input string) (*ReplicationvCenterId } id := ReplicationvCenterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_vault.go index 0af362b63fc..df8325856ea 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/method_get.go index ffadfb7e2e8..624c667672c 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationvCentersClient) Get(ctx context.Context, id ReplicationvCente var model VCenter result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/version.go index 14df8439fd7..673f1488971 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/replicationvcenters/version.go @@ -1,12 +1,10 @@ package replicationvcenters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationvcenters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationvcenters/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/README.md index 15951b7ef9e..6d889889e3d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems` Documentation -The `supportedoperatingsystems` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `supportedoperatingsystems` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/client.go index 54b1bf5aae2..b895d9b8fd4 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/client.go @@ -15,7 +15,7 @@ type SupportedOperatingSystemsClient struct { } func NewSupportedOperatingSystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*SupportedOperatingSystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "supportedoperatingsystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SupportedOperatingSystemsClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/id_vault.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/id_vault.go index 230a6cf4261..d71ee4cf92d 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/id_vault.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/id_vault.go @@ -42,7 +42,7 @@ func ParseVaultID(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVaultIDInsensitively(input string) (*VaultId, error) { } id := VaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/method_get.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/method_get.go index 07d549f188e..a3839b3d736 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/method_get.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SupportedOperatingSystemsClient) Get(ctx context.Context, id VaultId, op var model SupportedOperatingSystems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/version.go index ea87f1803e1..9b04b17b649 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/supportedoperatingsystems/version.go @@ -1,12 +1,10 @@ package supportedoperatingsystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/supportedoperatingsystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/supportedoperatingsystems/2024-04-01" } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/README.md b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/README.md index 55dba2338ff..b6104e2289e 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/README.md +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes` Documentation -The `targetcomputesizes` SDK allows for interaction with the Azure Resource Manager Service `recoveryservicessiterecovery` (API Version `2024-04-01`). +The `targetcomputesizes` SDK allows for interaction with Azure Resource Manager `recoveryservicessiterecovery` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/client.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/client.go index 50f60300d6a..9e8a8315990 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/client.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/client.go @@ -15,7 +15,7 @@ type TargetComputeSizesClient struct { } func NewTargetComputeSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*TargetComputeSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "targetcomputesizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "targetcomputesizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TargetComputeSizesClient: %+v", err) } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/id_replicationprotecteditem.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/id_replicationprotecteditem.go index 3c01e3795a5..d889d45d698 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/id_replicationprotecteditem.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/id_replicationprotecteditem.go @@ -48,7 +48,7 @@ func ParseReplicationProtectedItemID(input string) (*ReplicationProtectedItemId, } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseReplicationProtectedItemIDInsensitively(input string) (*ReplicationPro } id := ReplicationProtectedItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/version.go b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/version.go index e6ef32d88dd..ea6e7f570e9 100644 --- a/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/version.go +++ b/resource-manager/recoveryservicessiterecovery/2024-04-01/targetcomputesizes/version.go @@ -1,12 +1,10 @@ package targetcomputesizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/targetcomputesizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/targetcomputesizes/2024-04-01" } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/README.md b/resource-manager/redhatopenshift/2023-09-04/machinepools/README.md index 1e555ac08c3..b48b078046f 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/machinepools` Documentation -The `machinepools` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `machinepools` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/client.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/client.go index 59ace4d9453..3a9f3611d9d 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/client.go @@ -15,7 +15,7 @@ type MachinePoolsClient struct { } func NewMachinePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinePoolsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/id_machinepool.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/id_machinepool.go index a906fabfccc..883c1989026 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/id_machinepool.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/id_machinepool.go @@ -44,7 +44,7 @@ func ParseMachinePoolID(input string) (*MachinePoolId, error) { } id := MachinePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMachinePoolIDInsensitively(input string) (*MachinePoolId, error) { } id := MachinePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/id_openshiftcluster.go index 7afd8692aad..0514fdd1f32 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_createorupdate.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_createorupdate.go index 0653a1f495c..45c6007a01e 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MachinePoolsClient) CreateOrUpdate(ctx context.Context, id MachinePoolId var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_get.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_get.go index 10c33541d4c..2d796ccba5f 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_get.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_get.go @@ -45,7 +45,6 @@ func (c MachinePoolsClient) Get(ctx context.Context, id MachinePoolId) (result G var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_update.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_update.go index dbbb821e2b1..c6d1bcebb79 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/method_update.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/method_update.go @@ -49,7 +49,6 @@ func (c MachinePoolsClient) Update(ctx context.Context, id MachinePoolId, input var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/machinepools/version.go b/resource-manager/redhatopenshift/2023-09-04/machinepools/version.go index 34caf890d99..0c2bb5d6e97 100644 --- a/resource-manager/redhatopenshift/2023-09-04/machinepools/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/machinepools/version.go @@ -1,12 +1,10 @@ package machinepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinepools/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/README.md b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/README.md index d27ca89260d..a97ae110d09 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/openshiftclusters` Documentation -The `openshiftclusters` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `openshiftclusters` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/client.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/client.go index 03e840dd62a..7384e0264da 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/client.go @@ -15,7 +15,7 @@ type OpenShiftClustersClient struct { } func NewOpenShiftClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenShiftClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openshiftclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openshiftclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenShiftClustersClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/id_provideropenshiftcluster.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/id_provideropenshiftcluster.go index 5b89d5361b0..d0aa80d13b5 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/id_provideropenshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/id_provideropenshiftcluster.go @@ -42,7 +42,7 @@ func ParseProviderOpenShiftClusterID(input string) (*ProviderOpenShiftClusterId, } id := ProviderOpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderOpenShiftClusterIDInsensitively(input string) (*ProviderOpenSh } id := ProviderOpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_get.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_get.go index 1b8c298bf7e..555267c3592 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_get.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_get.go @@ -45,7 +45,6 @@ func (c OpenShiftClustersClient) Get(ctx context.Context, id ProviderOpenShiftCl var model OpenShiftCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listadmincredentials.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listadmincredentials.go index bb1c5f62c1c..ea61c4042d1 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listadmincredentials.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listadmincredentials.go @@ -46,7 +46,6 @@ func (c OpenShiftClustersClient) ListAdminCredentials(ctx context.Context, id Pr var model OpenShiftClusterAdminKubeconfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listcredentials.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listcredentials.go index 8a7bed4444e..f15ade073eb 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listcredentials.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/method_listcredentials.go @@ -46,7 +46,6 @@ func (c OpenShiftClustersClient) ListCredentials(ctx context.Context, id Provide var model OpenShiftClusterCredentials result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/version.go b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/version.go index 07e7cdbdaf2..9d61cf3becc 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftclusters/version.go @@ -1,12 +1,10 @@ package openshiftclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openshiftclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openshiftclusters/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/README.md b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/README.md index b6333740a0b..0bfeccc68b7 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/openshiftversions` Documentation -The `openshiftversions` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `openshiftversions` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/client.go b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/client.go index 917490f892d..6e43f886947 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/client.go @@ -15,7 +15,7 @@ type OpenShiftVersionsClient struct { } func NewOpenShiftVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenShiftVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openshiftversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openshiftversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenShiftVersionsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/id_location.go b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/id_location.go index 509544f9b48..4f4ba85bbb3 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/id_location.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/version.go b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/version.go index 85757b28247..f746a8598c7 100644 --- a/resource-manager/redhatopenshift/2023-09-04/openshiftversions/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/openshiftversions/version.go @@ -1,12 +1,10 @@ package openshiftversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openshiftversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openshiftversions/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/README.md b/resource-manager/redhatopenshift/2023-09-04/secrets/README.md index de6279de071..a7111e63860 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/secrets` Documentation -The `secrets` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `secrets` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/client.go b/resource-manager/redhatopenshift/2023-09-04/secrets/client.go index c8a49ae1e6b..07a23983c45 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/client.go @@ -15,7 +15,7 @@ type SecretsClient struct { } func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "secrets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "secrets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecretsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-09-04/secrets/id_openshiftcluster.go index 16f5993367d..1ce362cf60b 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/id_secret.go b/resource-manager/redhatopenshift/2023-09-04/secrets/id_secret.go index 96d10ef4bb8..6907e361218 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/id_secret.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/id_secret.go @@ -44,7 +44,7 @@ func ParseSecretID(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecretIDInsensitively(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/method_createorupdate.go b/resource-manager/redhatopenshift/2023-09-04/secrets/method_createorupdate.go index 87d8a0c4ccb..2d5ca9c1cd7 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecretsClient) CreateOrUpdate(ctx context.Context, id SecretId, input Se var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/method_get.go b/resource-manager/redhatopenshift/2023-09-04/secrets/method_get.go index 13c1528927a..dd688babed6 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/method_get.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/method_get.go @@ -45,7 +45,6 @@ func (c SecretsClient) Get(ctx context.Context, id SecretId) (result GetOperatio var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/method_update.go b/resource-manager/redhatopenshift/2023-09-04/secrets/method_update.go index 1ae9131acfb..35d6d6910dd 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/method_update.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/method_update.go @@ -49,7 +49,6 @@ func (c SecretsClient) Update(ctx context.Context, id SecretId, input SecretUpda var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/secrets/version.go b/resource-manager/redhatopenshift/2023-09-04/secrets/version.go index c357403aae1..435f8fb75e1 100644 --- a/resource-manager/redhatopenshift/2023-09-04/secrets/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/secrets/version.go @@ -1,12 +1,10 @@ package secrets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/secrets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/secrets/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/README.md b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/README.md index 87f19213488..90cac9b2719 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders` Documentation -The `syncidentityproviders` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `syncidentityproviders` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/client.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/client.go index af9f3171ac6..eff125fdd21 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/client.go @@ -15,7 +15,7 @@ type SyncIdentityProvidersClient struct { } func NewSyncIdentityProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncIdentityProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncidentityproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncidentityproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncIdentityProvidersClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_openshiftcluster.go index 58265df498f..791a44552d0 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_syncidentityprovider.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_syncidentityprovider.go index 2e91820099a..905143863c5 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_syncidentityprovider.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/id_syncidentityprovider.go @@ -44,7 +44,7 @@ func ParseSyncIdentityProviderID(input string) (*SyncIdentityProviderId, error) } id := SyncIdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncIdentityProviderIDInsensitively(input string) (*SyncIdentityProvid } id := SyncIdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_createorupdate.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_createorupdate.go index 03da70a123f..83f1ff2d3f1 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SyncIdentityProvidersClient) CreateOrUpdate(ctx context.Context, id Sync var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_get.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_get.go index 39ef5437515..f282c9b8977 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_get.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_get.go @@ -45,7 +45,6 @@ func (c SyncIdentityProvidersClient) Get(ctx context.Context, id SyncIdentityPro var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_update.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_update.go index 27de162aaa8..b1954f68eda 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_update.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/method_update.go @@ -49,7 +49,6 @@ func (c SyncIdentityProvidersClient) Update(ctx context.Context, id SyncIdentity var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/version.go b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/version.go index df8e8918af9..8f354f529c3 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncidentityproviders/version.go @@ -1,12 +1,10 @@ package syncidentityproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncidentityproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncidentityproviders/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/README.md b/resource-manager/redhatopenshift/2023-09-04/syncsets/README.md index e0bafe220c6..e8e0e9d99d7 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/README.md +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-09-04/syncsets` Documentation -The `syncsets` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-09-04`). +The `syncsets` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-09-04`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/client.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/client.go index 770eb84f7e0..26229347954 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/client.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/client.go @@ -15,7 +15,7 @@ type SyncSetsClient struct { } func NewSyncSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncSetsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/id_openshiftcluster.go index 69d7b8996b8..53a2496a7c9 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/id_syncset.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/id_syncset.go index 4410c1c3f6f..d973b1aae79 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/id_syncset.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/id_syncset.go @@ -44,7 +44,7 @@ func ParseSyncSetID(input string) (*SyncSetId, error) { } id := SyncSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncSetIDInsensitively(input string) (*SyncSetId, error) { } id := SyncSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_createorupdate.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_createorupdate.go index 98b6679c096..5bb02848c85 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SyncSetsClient) CreateOrUpdate(ctx context.Context, id SyncSetId, input var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_get.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_get.go index 5ccb57a138c..40f416be590 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_get.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_get.go @@ -45,7 +45,6 @@ func (c SyncSetsClient) Get(ctx context.Context, id SyncSetId) (result GetOperat var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_update.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_update.go index ab45e6ed41e..375efe31a89 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/method_update.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/method_update.go @@ -49,7 +49,6 @@ func (c SyncSetsClient) Update(ctx context.Context, id SyncSetId, input SyncSetU var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-09-04/syncsets/version.go b/resource-manager/redhatopenshift/2023-09-04/syncsets/version.go index 16a75516baf..882bda261a9 100644 --- a/resource-manager/redhatopenshift/2023-09-04/syncsets/version.go +++ b/resource-manager/redhatopenshift/2023-09-04/syncsets/version.go @@ -1,12 +1,10 @@ package syncsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-04" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncsets/2023-09-04" } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/README.md b/resource-manager/redhatopenshift/2023-11-22/machinepools/README.md index 7567c11c81c..b9f84b7fc56 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/machinepools` Documentation -The `machinepools` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `machinepools` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/client.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/client.go index 59ace4d9453..3a9f3611d9d 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/client.go @@ -15,7 +15,7 @@ type MachinePoolsClient struct { } func NewMachinePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "machinepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "machinepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MachinePoolsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/id_machinepool.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/id_machinepool.go index a906fabfccc..883c1989026 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/id_machinepool.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/id_machinepool.go @@ -44,7 +44,7 @@ func ParseMachinePoolID(input string) (*MachinePoolId, error) { } id := MachinePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMachinePoolIDInsensitively(input string) (*MachinePoolId, error) { } id := MachinePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/id_openshiftcluster.go index 7afd8692aad..0514fdd1f32 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_createorupdate.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_createorupdate.go index 0653a1f495c..45c6007a01e 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_createorupdate.go @@ -50,7 +50,6 @@ func (c MachinePoolsClient) CreateOrUpdate(ctx context.Context, id MachinePoolId var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_get.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_get.go index 10c33541d4c..2d796ccba5f 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_get.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_get.go @@ -45,7 +45,6 @@ func (c MachinePoolsClient) Get(ctx context.Context, id MachinePoolId) (result G var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_update.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_update.go index dbbb821e2b1..c6d1bcebb79 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/method_update.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/method_update.go @@ -49,7 +49,6 @@ func (c MachinePoolsClient) Update(ctx context.Context, id MachinePoolId, input var model MachinePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/machinepools/version.go b/resource-manager/redhatopenshift/2023-11-22/machinepools/version.go index b7ad31ffcb7..fc5741513bb 100644 --- a/resource-manager/redhatopenshift/2023-11-22/machinepools/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/machinepools/version.go @@ -1,12 +1,10 @@ package machinepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/machinepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/machinepools/2023-11-22" } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/README.md b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/README.md index 78813a9ff5d..49cd9811953 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/openshiftclusters` Documentation -The `openshiftclusters` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `openshiftclusters` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/client.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/client.go index 03e840dd62a..7384e0264da 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/client.go @@ -15,7 +15,7 @@ type OpenShiftClustersClient struct { } func NewOpenShiftClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenShiftClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openshiftclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openshiftclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenShiftClustersClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/id_provideropenshiftcluster.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/id_provideropenshiftcluster.go index 5b89d5361b0..d0aa80d13b5 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/id_provideropenshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/id_provideropenshiftcluster.go @@ -42,7 +42,7 @@ func ParseProviderOpenShiftClusterID(input string) (*ProviderOpenShiftClusterId, } id := ProviderOpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderOpenShiftClusterIDInsensitively(input string) (*ProviderOpenSh } id := ProviderOpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_get.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_get.go index 1b8c298bf7e..555267c3592 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_get.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_get.go @@ -45,7 +45,6 @@ func (c OpenShiftClustersClient) Get(ctx context.Context, id ProviderOpenShiftCl var model OpenShiftCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listadmincredentials.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listadmincredentials.go index bb1c5f62c1c..ea61c4042d1 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listadmincredentials.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listadmincredentials.go @@ -46,7 +46,6 @@ func (c OpenShiftClustersClient) ListAdminCredentials(ctx context.Context, id Pr var model OpenShiftClusterAdminKubeconfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listcredentials.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listcredentials.go index 8a7bed4444e..f15ade073eb 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listcredentials.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/method_listcredentials.go @@ -46,7 +46,6 @@ func (c OpenShiftClustersClient) ListCredentials(ctx context.Context, id Provide var model OpenShiftClusterCredentials result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/version.go b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/version.go index 5ba421604d5..1b7eca7ac38 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftclusters/version.go @@ -1,12 +1,10 @@ package openshiftclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openshiftclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openshiftclusters/2023-11-22" } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/README.md b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/README.md index 82ebc55dd74..c853dc89929 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/openshiftversions` Documentation -The `openshiftversions` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `openshiftversions` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/client.go b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/client.go index 917490f892d..6e43f886947 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/client.go @@ -15,7 +15,7 @@ type OpenShiftVersionsClient struct { } func NewOpenShiftVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenShiftVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "openshiftversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "openshiftversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OpenShiftVersionsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/id_location.go b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/id_location.go index 509544f9b48..4f4ba85bbb3 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/id_location.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/version.go b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/version.go index f158174b6ad..170012c9700 100644 --- a/resource-manager/redhatopenshift/2023-11-22/openshiftversions/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/openshiftversions/version.go @@ -1,12 +1,10 @@ package openshiftversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/openshiftversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/openshiftversions/2023-11-22" } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/README.md b/resource-manager/redhatopenshift/2023-11-22/secrets/README.md index 0475ddac2f0..8b5139e5a15 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/secrets` Documentation -The `secrets` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `secrets` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/client.go b/resource-manager/redhatopenshift/2023-11-22/secrets/client.go index c8a49ae1e6b..07a23983c45 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/client.go @@ -15,7 +15,7 @@ type SecretsClient struct { } func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "secrets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "secrets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecretsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-11-22/secrets/id_openshiftcluster.go index 16f5993367d..1ce362cf60b 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/id_secret.go b/resource-manager/redhatopenshift/2023-11-22/secrets/id_secret.go index 96d10ef4bb8..6907e361218 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/id_secret.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/id_secret.go @@ -44,7 +44,7 @@ func ParseSecretID(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecretIDInsensitively(input string) (*SecretId, error) { } id := SecretId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/method_createorupdate.go b/resource-manager/redhatopenshift/2023-11-22/secrets/method_createorupdate.go index 87d8a0c4ccb..2d5ca9c1cd7 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecretsClient) CreateOrUpdate(ctx context.Context, id SecretId, input Se var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/method_get.go b/resource-manager/redhatopenshift/2023-11-22/secrets/method_get.go index 13c1528927a..dd688babed6 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/method_get.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/method_get.go @@ -45,7 +45,6 @@ func (c SecretsClient) Get(ctx context.Context, id SecretId) (result GetOperatio var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/method_update.go b/resource-manager/redhatopenshift/2023-11-22/secrets/method_update.go index 1ae9131acfb..35d6d6910dd 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/method_update.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/method_update.go @@ -49,7 +49,6 @@ func (c SecretsClient) Update(ctx context.Context, id SecretId, input SecretUpda var model Secret result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/secrets/version.go b/resource-manager/redhatopenshift/2023-11-22/secrets/version.go index d6a0f025ec7..d95172b6003 100644 --- a/resource-manager/redhatopenshift/2023-11-22/secrets/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/secrets/version.go @@ -1,12 +1,10 @@ package secrets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/secrets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/secrets/2023-11-22" } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/README.md b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/README.md index c31e3920630..dab7ca3c12c 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders` Documentation -The `syncidentityproviders` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `syncidentityproviders` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/client.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/client.go index af9f3171ac6..eff125fdd21 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/client.go @@ -15,7 +15,7 @@ type SyncIdentityProvidersClient struct { } func NewSyncIdentityProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncIdentityProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncidentityproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncidentityproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncIdentityProvidersClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_openshiftcluster.go index 58265df498f..791a44552d0 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_syncidentityprovider.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_syncidentityprovider.go index 2e91820099a..905143863c5 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_syncidentityprovider.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/id_syncidentityprovider.go @@ -44,7 +44,7 @@ func ParseSyncIdentityProviderID(input string) (*SyncIdentityProviderId, error) } id := SyncIdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncIdentityProviderIDInsensitively(input string) (*SyncIdentityProvid } id := SyncIdentityProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_createorupdate.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_createorupdate.go index 03da70a123f..83f1ff2d3f1 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SyncIdentityProvidersClient) CreateOrUpdate(ctx context.Context, id Sync var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_get.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_get.go index 39ef5437515..f282c9b8977 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_get.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_get.go @@ -45,7 +45,6 @@ func (c SyncIdentityProvidersClient) Get(ctx context.Context, id SyncIdentityPro var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_update.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_update.go index 27de162aaa8..b1954f68eda 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_update.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/method_update.go @@ -49,7 +49,6 @@ func (c SyncIdentityProvidersClient) Update(ctx context.Context, id SyncIdentity var model SyncIdentityProvider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/version.go b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/version.go index 25779d78b39..40cbcc7ca14 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncidentityproviders/version.go @@ -1,12 +1,10 @@ package syncidentityproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncidentityproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncidentityproviders/2023-11-22" } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/README.md b/resource-manager/redhatopenshift/2023-11-22/syncsets/README.md index 940055a3255..8b88ba1bc6b 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/README.md +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redhatopenshift/2023-11-22/syncsets` Documentation -The `syncsets` SDK allows for interaction with the Azure Resource Manager Service `redhatopenshift` (API Version `2023-11-22`). +The `syncsets` SDK allows for interaction with Azure Resource Manager `redhatopenshift` (API Version `2023-11-22`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/client.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/client.go index 770eb84f7e0..26229347954 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/client.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/client.go @@ -15,7 +15,7 @@ type SyncSetsClient struct { } func NewSyncSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncsets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncsets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncSetsClient: %+v", err) } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/id_openshiftcluster.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/id_openshiftcluster.go index 69d7b8996b8..53a2496a7c9 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/id_openshiftcluster.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/id_openshiftcluster.go @@ -42,7 +42,7 @@ func ParseOpenShiftClusterID(input string) (*OpenShiftClusterId, error) { } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOpenShiftClusterIDInsensitively(input string) (*OpenShiftClusterId, er } id := OpenShiftClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/id_syncset.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/id_syncset.go index 4410c1c3f6f..d973b1aae79 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/id_syncset.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/id_syncset.go @@ -44,7 +44,7 @@ func ParseSyncSetID(input string) (*SyncSetId, error) { } id := SyncSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncSetIDInsensitively(input string) (*SyncSetId, error) { } id := SyncSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_createorupdate.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_createorupdate.go index 98b6679c096..5bb02848c85 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_createorupdate.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SyncSetsClient) CreateOrUpdate(ctx context.Context, id SyncSetId, input var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_get.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_get.go index 5ccb57a138c..40f416be590 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_get.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_get.go @@ -45,7 +45,6 @@ func (c SyncSetsClient) Get(ctx context.Context, id SyncSetId) (result GetOperat var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_update.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_update.go index ab45e6ed41e..375efe31a89 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/method_update.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/method_update.go @@ -49,7 +49,6 @@ func (c SyncSetsClient) Update(ctx context.Context, id SyncSetId, input SyncSetU var model SyncSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redhatopenshift/2023-11-22/syncsets/version.go b/resource-manager/redhatopenshift/2023-11-22/syncsets/version.go index c66560c51c5..18aae0670cf 100644 --- a/resource-manager/redhatopenshift/2023-11-22/syncsets/version.go +++ b/resource-manager/redhatopenshift/2023-11-22/syncsets/version.go @@ -1,12 +1,10 @@ package syncsets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-22" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncsets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncsets/2023-11-22" } diff --git a/resource-manager/redis/2023-08-01/aad/README.md b/resource-manager/redis/2023-08-01/aad/README.md index 75e662f4b42..755353339c3 100644 --- a/resource-manager/redis/2023-08-01/aad/README.md +++ b/resource-manager/redis/2023-08-01/aad/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/aad` Documentation -The `aad` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `aad` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/aad/client.go b/resource-manager/redis/2023-08-01/aad/client.go index d63430798e5..748c414de87 100644 --- a/resource-manager/redis/2023-08-01/aad/client.go +++ b/resource-manager/redis/2023-08-01/aad/client.go @@ -15,7 +15,7 @@ type AADClient struct { } func NewAADClientWithBaseURI(sdkApi sdkEnv.Api) (*AADClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aad", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aad", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AADClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go b/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go index cc56194b427..139d6dbc843 100644 --- a/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go +++ b/resource-manager/redis/2023-08-01/aad/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go b/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go index 9790e690d70..a915b8c5d39 100644 --- a/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go +++ b/resource-manager/redis/2023-08-01/aad/id_accesspolicyassignment.go @@ -44,7 +44,7 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/aad/id_redi.go b/resource-manager/redis/2023-08-01/aad/id_redi.go index aa64d36093c..62e2aacfb76 100644 --- a/resource-manager/redis/2023-08-01/aad/id_redi.go +++ b/resource-manager/redis/2023-08-01/aad/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/aad/method_accesspolicyassignmentget.go b/resource-manager/redis/2023-08-01/aad/method_accesspolicyassignmentget.go index d88dea32567..3ba9dd988bf 100644 --- a/resource-manager/redis/2023-08-01/aad/method_accesspolicyassignmentget.go +++ b/resource-manager/redis/2023-08-01/aad/method_accesspolicyassignmentget.go @@ -45,7 +45,6 @@ func (c AADClient) AccessPolicyAssignmentGet(ctx context.Context, id AccessPolic var model RedisCacheAccessPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/aad/method_accesspolicyget.go b/resource-manager/redis/2023-08-01/aad/method_accesspolicyget.go index 6830bd80cea..b9889541d1d 100644 --- a/resource-manager/redis/2023-08-01/aad/method_accesspolicyget.go +++ b/resource-manager/redis/2023-08-01/aad/method_accesspolicyget.go @@ -45,7 +45,6 @@ func (c AADClient) AccessPolicyGet(ctx context.Context, id AccessPolicyId) (resu var model RedisCacheAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/aad/version.go b/resource-manager/redis/2023-08-01/aad/version.go index 6308f94f826..c0424d4d757 100644 --- a/resource-manager/redis/2023-08-01/aad/version.go +++ b/resource-manager/redis/2023-08-01/aad/version.go @@ -1,12 +1,10 @@ package aad -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aad/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aad/2023-08-01" } diff --git a/resource-manager/redis/2023-08-01/firewallrules/README.md b/resource-manager/redis/2023-08-01/firewallrules/README.md index 37db6eb3974..31286b8bdbc 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/README.md +++ b/resource-manager/redis/2023-08-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/firewallrules/client.go b/resource-manager/redis/2023-08-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/client.go +++ b/resource-manager/redis/2023-08-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go b/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go index cd9bea42f48..ac44a50213b 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go +++ b/resource-manager/redis/2023-08-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/firewallrules/id_redi.go b/resource-manager/redis/2023-08-01/firewallrules/id_redi.go index 03688a59d1a..143c4342ca0 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/id_redi.go +++ b/resource-manager/redis/2023-08-01/firewallrules/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/firewallrules/method_createorupdate.go b/resource-manager/redis/2023-08-01/firewallrules/method_createorupdate.go index 97b2197f855..a94b56e8a6f 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/method_createorupdate.go +++ b/resource-manager/redis/2023-08-01/firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/firewallrules/method_get.go b/resource-manager/redis/2023-08-01/firewallrules/method_get.go index 09ba93a14cd..4277e68f518 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/method_get.go +++ b/resource-manager/redis/2023-08-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/firewallrules/version.go b/resource-manager/redis/2023-08-01/firewallrules/version.go index 462dbea42fa..094095d713d 100644 --- a/resource-manager/redis/2023-08-01/firewallrules/version.go +++ b/resource-manager/redis/2023-08-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-08-01" } diff --git a/resource-manager/redis/2023-08-01/patchschedules/README.md b/resource-manager/redis/2023-08-01/patchschedules/README.md index e5978541e01..32ccb210636 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/README.md +++ b/resource-manager/redis/2023-08-01/patchschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules` Documentation -The `patchschedules` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `patchschedules` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/patchschedules/client.go b/resource-manager/redis/2023-08-01/patchschedules/client.go index f20211b88b5..f1b282dd523 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/client.go +++ b/resource-manager/redis/2023-08-01/patchschedules/client.go @@ -15,7 +15,7 @@ type PatchSchedulesClient struct { } func NewPatchSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PatchSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "patchschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "patchschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PatchSchedulesClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/patchschedules/id_redi.go b/resource-manager/redis/2023-08-01/patchschedules/id_redi.go index 5a62230f2a0..103855e2f31 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/id_redi.go +++ b/resource-manager/redis/2023-08-01/patchschedules/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/patchschedules/method_createorupdate.go b/resource-manager/redis/2023-08-01/patchschedules/method_createorupdate.go index c081a0874fd..1bea02fc42b 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/method_createorupdate.go +++ b/resource-manager/redis/2023-08-01/patchschedules/method_createorupdate.go @@ -51,7 +51,6 @@ func (c PatchSchedulesClient) CreateOrUpdate(ctx context.Context, id RediId, inp var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/patchschedules/method_get.go b/resource-manager/redis/2023-08-01/patchschedules/method_get.go index aaff796120c..1a1750e0025 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/method_get.go +++ b/resource-manager/redis/2023-08-01/patchschedules/method_get.go @@ -46,7 +46,6 @@ func (c PatchSchedulesClient) Get(ctx context.Context, id RediId) (result GetOpe var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/patchschedules/version.go b/resource-manager/redis/2023-08-01/patchschedules/version.go index fcc70f1e72a..7d430453d7f 100644 --- a/resource-manager/redis/2023-08-01/patchschedules/version.go +++ b/resource-manager/redis/2023-08-01/patchschedules/version.go @@ -1,12 +1,10 @@ package patchschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/patchschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/patchschedules/2023-08-01" } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/README.md b/resource-manager/redis/2023-08-01/privateendpointconnections/README.md index ba9547257b3..bde8738a80c 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/README.md +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/client.go b/resource-manager/redis/2023-08-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/client.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go index 502976663f8..76f75a1f364 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go b/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go index 32f39ecae46..7b9e08088fb 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/method_get.go b/resource-manager/redis/2023-08-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/method_get.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/method_list.go b/resource-manager/redis/2023-08-01/privateendpointconnections/method_list.go index a69fc0babc3..c9f4ff6cb71 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/method_list.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RediId) ( var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/privateendpointconnections/version.go b/resource-manager/redis/2023-08-01/privateendpointconnections/version.go index 4f6bde1fe04..2ce856a87a2 100644 --- a/resource-manager/redis/2023-08-01/privateendpointconnections/version.go +++ b/resource-manager/redis/2023-08-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-08-01" } diff --git a/resource-manager/redis/2023-08-01/privatelinkresources/README.md b/resource-manager/redis/2023-08-01/privatelinkresources/README.md index 9c4af3c5752..c0f3230975d 100644 --- a/resource-manager/redis/2023-08-01/privatelinkresources/README.md +++ b/resource-manager/redis/2023-08-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/privatelinkresources/client.go b/resource-manager/redis/2023-08-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redis/2023-08-01/privatelinkresources/client.go +++ b/resource-manager/redis/2023-08-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go b/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go index c453e1e4ce9..74df3c09e6e 100644 --- a/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go +++ b/resource-manager/redis/2023-08-01/privatelinkresources/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/privatelinkresources/method_listbyrediscache.go b/resource-manager/redis/2023-08-01/privatelinkresources/method_listbyrediscache.go index b8161914ecb..bf5b442c71d 100644 --- a/resource-manager/redis/2023-08-01/privatelinkresources/method_listbyrediscache.go +++ b/resource-manager/redis/2023-08-01/privatelinkresources/method_listbyrediscache.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByRedisCache(ctx context.Context, id Red var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/privatelinkresources/version.go b/resource-manager/redis/2023-08-01/privatelinkresources/version.go index a18b2099dd4..1b92d294a40 100644 --- a/resource-manager/redis/2023-08-01/privatelinkresources/version.go +++ b/resource-manager/redis/2023-08-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-08-01" } diff --git a/resource-manager/redis/2023-08-01/redis/README.md b/resource-manager/redis/2023-08-01/redis/README.md index 6a5b9293257..dc9c930a7d0 100644 --- a/resource-manager/redis/2023-08-01/redis/README.md +++ b/resource-manager/redis/2023-08-01/redis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/redis` Documentation -The `redis` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2023-08-01`). +The `redis` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2023-08-01/redis/client.go b/resource-manager/redis/2023-08-01/redis/client.go index 7f5011f9356..3d911581b53 100644 --- a/resource-manager/redis/2023-08-01/redis/client.go +++ b/resource-manager/redis/2023-08-01/redis/client.go @@ -15,7 +15,7 @@ type RedisClient struct { } func NewRedisClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisClient: %+v", err) } diff --git a/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go b/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go index e63b9dcf680..5e3f45233f9 100644 --- a/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go +++ b/resource-manager/redis/2023-08-01/redis/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go b/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go index c7f187f3ec5..373f294ef84 100644 --- a/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go +++ b/resource-manager/redis/2023-08-01/redis/id_accesspolicyassignment.go @@ -44,7 +44,7 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/redis/id_firewallrule.go b/resource-manager/redis/2023-08-01/redis/id_firewallrule.go index f989b6c6654..38fc54aa9bb 100644 --- a/resource-manager/redis/2023-08-01/redis/id_firewallrule.go +++ b/resource-manager/redis/2023-08-01/redis/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/redis/id_linkedserver.go b/resource-manager/redis/2023-08-01/redis/id_linkedserver.go index ca066302b71..20c8a7fd411 100644 --- a/resource-manager/redis/2023-08-01/redis/id_linkedserver.go +++ b/resource-manager/redis/2023-08-01/redis/id_linkedserver.go @@ -44,7 +44,7 @@ func ParseLinkedServerID(input string) (*LinkedServerId, error) { } id := LinkedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedServerIDInsensitively(input string) (*LinkedServerId, error) { } id := LinkedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/redis/id_redi.go b/resource-manager/redis/2023-08-01/redis/id_redi.go index cc15fb6623d..25ae15b0ce4 100644 --- a/resource-manager/redis/2023-08-01/redis/id_redi.go +++ b/resource-manager/redis/2023-08-01/redis/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2023-08-01/redis/method_accesspolicyassignmentget.go b/resource-manager/redis/2023-08-01/redis/method_accesspolicyassignmentget.go index e473570277f..4b3cb593c48 100644 --- a/resource-manager/redis/2023-08-01/redis/method_accesspolicyassignmentget.go +++ b/resource-manager/redis/2023-08-01/redis/method_accesspolicyassignmentget.go @@ -45,7 +45,6 @@ func (c RedisClient) AccessPolicyAssignmentGet(ctx context.Context, id AccessPol var model RedisCacheAccessPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_accesspolicyget.go b/resource-manager/redis/2023-08-01/redis/method_accesspolicyget.go index 363f194ed8e..03d5a35d51d 100644 --- a/resource-manager/redis/2023-08-01/redis/method_accesspolicyget.go +++ b/resource-manager/redis/2023-08-01/redis/method_accesspolicyget.go @@ -45,7 +45,6 @@ func (c RedisClient) AccessPolicyGet(ctx context.Context, id AccessPolicyId) (re var model RedisCacheAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_firewallrulescreateorupdate.go b/resource-manager/redis/2023-08-01/redis/method_firewallrulescreateorupdate.go index f89d8e6ccbe..887afabf00b 100644 --- a/resource-manager/redis/2023-08-01/redis/method_firewallrulescreateorupdate.go +++ b/resource-manager/redis/2023-08-01/redis/method_firewallrulescreateorupdate.go @@ -50,7 +50,6 @@ func (c RedisClient) FirewallRulesCreateOrUpdate(ctx context.Context, id Firewal var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_firewallrulesget.go b/resource-manager/redis/2023-08-01/redis/method_firewallrulesget.go index a07fa2bb7f8..d02bf28361c 100644 --- a/resource-manager/redis/2023-08-01/redis/method_firewallrulesget.go +++ b/resource-manager/redis/2023-08-01/redis/method_firewallrulesget.go @@ -45,7 +45,6 @@ func (c RedisClient) FirewallRulesGet(ctx context.Context, id FirewallRuleId) (r var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_forcereboot.go b/resource-manager/redis/2023-08-01/redis/method_forcereboot.go index f45768f09ff..f9bff572e69 100644 --- a/resource-manager/redis/2023-08-01/redis/method_forcereboot.go +++ b/resource-manager/redis/2023-08-01/redis/method_forcereboot.go @@ -50,7 +50,6 @@ func (c RedisClient) ForceReboot(ctx context.Context, id RediId, input RedisRebo var model RedisForceRebootResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_get.go b/resource-manager/redis/2023-08-01/redis/method_get.go index bfedd115361..1c8b7b90138 100644 --- a/resource-manager/redis/2023-08-01/redis/method_get.go +++ b/resource-manager/redis/2023-08-01/redis/method_get.go @@ -45,7 +45,6 @@ func (c RedisClient) Get(ctx context.Context, id RediId) (result GetOperationRes var model RedisResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_linkedserverget.go b/resource-manager/redis/2023-08-01/redis/method_linkedserverget.go index 659ee218f4b..9f866dbce07 100644 --- a/resource-manager/redis/2023-08-01/redis/method_linkedserverget.go +++ b/resource-manager/redis/2023-08-01/redis/method_linkedserverget.go @@ -45,7 +45,6 @@ func (c RedisClient) LinkedServerGet(ctx context.Context, id LinkedServerId) (re var model RedisLinkedServerWithProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_listkeys.go b/resource-manager/redis/2023-08-01/redis/method_listkeys.go index f7367b3a188..509bbb7de25 100644 --- a/resource-manager/redis/2023-08-01/redis/method_listkeys.go +++ b/resource-manager/redis/2023-08-01/redis/method_listkeys.go @@ -46,7 +46,6 @@ func (c RedisClient) ListKeys(ctx context.Context, id RediId) (result ListKeysOp var model RedisAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_listupgradenotifications.go b/resource-manager/redis/2023-08-01/redis/method_listupgradenotifications.go index 6f01790fccb..8ac2236d526 100644 --- a/resource-manager/redis/2023-08-01/redis/method_listupgradenotifications.go +++ b/resource-manager/redis/2023-08-01/redis/method_listupgradenotifications.go @@ -39,6 +39,7 @@ func (o ListUpgradeNotificationsOperationOptions) ToHeaders() *client.Headers { func (o ListUpgradeNotificationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/redis/2023-08-01/redis/method_patchschedulescreateorupdate.go b/resource-manager/redis/2023-08-01/redis/method_patchschedulescreateorupdate.go index 63d6cf5160b..087701d8070 100644 --- a/resource-manager/redis/2023-08-01/redis/method_patchschedulescreateorupdate.go +++ b/resource-manager/redis/2023-08-01/redis/method_patchschedulescreateorupdate.go @@ -51,7 +51,6 @@ func (c RedisClient) PatchSchedulesCreateOrUpdate(ctx context.Context, id RediId var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_patchschedulesget.go b/resource-manager/redis/2023-08-01/redis/method_patchschedulesget.go index 8962eab16ef..1856407c120 100644 --- a/resource-manager/redis/2023-08-01/redis/method_patchschedulesget.go +++ b/resource-manager/redis/2023-08-01/redis/method_patchschedulesget.go @@ -46,7 +46,6 @@ func (c RedisClient) PatchSchedulesGet(ctx context.Context, id RediId) (result P var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/method_regeneratekey.go b/resource-manager/redis/2023-08-01/redis/method_regeneratekey.go index 39915894e32..6d8bab3c02b 100644 --- a/resource-manager/redis/2023-08-01/redis/method_regeneratekey.go +++ b/resource-manager/redis/2023-08-01/redis/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c RedisClient) RegenerateKey(ctx context.Context, id RediId, input RedisRe var model RedisAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2023-08-01/redis/version.go b/resource-manager/redis/2023-08-01/redis/version.go index 4b58beff8f3..e7d1c073930 100644 --- a/resource-manager/redis/2023-08-01/redis/version.go +++ b/resource-manager/redis/2023-08-01/redis/version.go @@ -1,12 +1,10 @@ package redis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redis/2023-08-01" } diff --git a/resource-manager/redis/2024-03-01/aad/README.md b/resource-manager/redis/2024-03-01/aad/README.md index 7dd593ea26a..f2d31967bd2 100644 --- a/resource-manager/redis/2024-03-01/aad/README.md +++ b/resource-manager/redis/2024-03-01/aad/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/aad` Documentation -The `aad` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `aad` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/aad/client.go b/resource-manager/redis/2024-03-01/aad/client.go index d63430798e5..748c414de87 100644 --- a/resource-manager/redis/2024-03-01/aad/client.go +++ b/resource-manager/redis/2024-03-01/aad/client.go @@ -15,7 +15,7 @@ type AADClient struct { } func NewAADClientWithBaseURI(sdkApi sdkEnv.Api) (*AADClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "aad", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "aad", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AADClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/aad/id_accesspolicy.go b/resource-manager/redis/2024-03-01/aad/id_accesspolicy.go index cc56194b427..139d6dbc843 100644 --- a/resource-manager/redis/2024-03-01/aad/id_accesspolicy.go +++ b/resource-manager/redis/2024-03-01/aad/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/aad/id_accesspolicyassignment.go b/resource-manager/redis/2024-03-01/aad/id_accesspolicyassignment.go index 9790e690d70..a915b8c5d39 100644 --- a/resource-manager/redis/2024-03-01/aad/id_accesspolicyassignment.go +++ b/resource-manager/redis/2024-03-01/aad/id_accesspolicyassignment.go @@ -44,7 +44,7 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/aad/id_redi.go b/resource-manager/redis/2024-03-01/aad/id_redi.go index aa64d36093c..62e2aacfb76 100644 --- a/resource-manager/redis/2024-03-01/aad/id_redi.go +++ b/resource-manager/redis/2024-03-01/aad/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/aad/method_accesspolicyassignmentget.go b/resource-manager/redis/2024-03-01/aad/method_accesspolicyassignmentget.go index d88dea32567..3ba9dd988bf 100644 --- a/resource-manager/redis/2024-03-01/aad/method_accesspolicyassignmentget.go +++ b/resource-manager/redis/2024-03-01/aad/method_accesspolicyassignmentget.go @@ -45,7 +45,6 @@ func (c AADClient) AccessPolicyAssignmentGet(ctx context.Context, id AccessPolic var model RedisCacheAccessPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/aad/method_accesspolicyget.go b/resource-manager/redis/2024-03-01/aad/method_accesspolicyget.go index 6830bd80cea..b9889541d1d 100644 --- a/resource-manager/redis/2024-03-01/aad/method_accesspolicyget.go +++ b/resource-manager/redis/2024-03-01/aad/method_accesspolicyget.go @@ -45,7 +45,6 @@ func (c AADClient) AccessPolicyGet(ctx context.Context, id AccessPolicyId) (resu var model RedisCacheAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/aad/version.go b/resource-manager/redis/2024-03-01/aad/version.go index 25d1b1748be..fb1721de974 100644 --- a/resource-manager/redis/2024-03-01/aad/version.go +++ b/resource-manager/redis/2024-03-01/aad/version.go @@ -1,12 +1,10 @@ package aad -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/aad/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/aad/2024-03-01" } diff --git a/resource-manager/redis/2024-03-01/firewallrules/README.md b/resource-manager/redis/2024-03-01/firewallrules/README.md index 29255c2cc8b..728d02226b1 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/README.md +++ b/resource-manager/redis/2024-03-01/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/firewallrules/client.go b/resource-manager/redis/2024-03-01/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/client.go +++ b/resource-manager/redis/2024-03-01/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/firewallrules/id_firewallrule.go b/resource-manager/redis/2024-03-01/firewallrules/id_firewallrule.go index cd9bea42f48..ac44a50213b 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/id_firewallrule.go +++ b/resource-manager/redis/2024-03-01/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/firewallrules/id_redi.go b/resource-manager/redis/2024-03-01/firewallrules/id_redi.go index 03688a59d1a..143c4342ca0 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/id_redi.go +++ b/resource-manager/redis/2024-03-01/firewallrules/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/firewallrules/method_createorupdate.go b/resource-manager/redis/2024-03-01/firewallrules/method_createorupdate.go index 97b2197f855..a94b56e8a6f 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/method_createorupdate.go +++ b/resource-manager/redis/2024-03-01/firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/firewallrules/method_get.go b/resource-manager/redis/2024-03-01/firewallrules/method_get.go index 09ba93a14cd..4277e68f518 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/method_get.go +++ b/resource-manager/redis/2024-03-01/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/firewallrules/version.go b/resource-manager/redis/2024-03-01/firewallrules/version.go index d3c9bafd79b..719b83b86d8 100644 --- a/resource-manager/redis/2024-03-01/firewallrules/version.go +++ b/resource-manager/redis/2024-03-01/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2024-03-01" } diff --git a/resource-manager/redis/2024-03-01/patchschedules/README.md b/resource-manager/redis/2024-03-01/patchschedules/README.md index 3e8777fcc54..de296b94fa1 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/README.md +++ b/resource-manager/redis/2024-03-01/patchschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/patchschedules` Documentation -The `patchschedules` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `patchschedules` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/patchschedules/client.go b/resource-manager/redis/2024-03-01/patchschedules/client.go index f20211b88b5..f1b282dd523 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/client.go +++ b/resource-manager/redis/2024-03-01/patchschedules/client.go @@ -15,7 +15,7 @@ type PatchSchedulesClient struct { } func NewPatchSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PatchSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "patchschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "patchschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PatchSchedulesClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/patchschedules/id_redi.go b/resource-manager/redis/2024-03-01/patchschedules/id_redi.go index 5a62230f2a0..103855e2f31 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/id_redi.go +++ b/resource-manager/redis/2024-03-01/patchschedules/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/patchschedules/method_createorupdate.go b/resource-manager/redis/2024-03-01/patchschedules/method_createorupdate.go index c081a0874fd..1bea02fc42b 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/method_createorupdate.go +++ b/resource-manager/redis/2024-03-01/patchschedules/method_createorupdate.go @@ -51,7 +51,6 @@ func (c PatchSchedulesClient) CreateOrUpdate(ctx context.Context, id RediId, inp var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/patchschedules/method_get.go b/resource-manager/redis/2024-03-01/patchschedules/method_get.go index aaff796120c..1a1750e0025 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/method_get.go +++ b/resource-manager/redis/2024-03-01/patchschedules/method_get.go @@ -46,7 +46,6 @@ func (c PatchSchedulesClient) Get(ctx context.Context, id RediId) (result GetOpe var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/patchschedules/version.go b/resource-manager/redis/2024-03-01/patchschedules/version.go index e22426b3a32..f5168f6790c 100644 --- a/resource-manager/redis/2024-03-01/patchschedules/version.go +++ b/resource-manager/redis/2024-03-01/patchschedules/version.go @@ -1,12 +1,10 @@ package patchschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/patchschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/patchschedules/2024-03-01" } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/README.md b/resource-manager/redis/2024-03-01/privateendpointconnections/README.md index 1d6b5327116..7a8e83ac564 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/README.md +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/client.go b/resource-manager/redis/2024-03-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/client.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go index 502976663f8..76f75a1f364 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/id_redi.go b/resource-manager/redis/2024-03-01/privateendpointconnections/id_redi.go index 32f39ecae46..7b9e08088fb 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/id_redi.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/method_get.go b/resource-manager/redis/2024-03-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/method_get.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/method_list.go b/resource-manager/redis/2024-03-01/privateendpointconnections/method_list.go index a69fc0babc3..c9f4ff6cb71 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/method_list.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RediId) ( var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/privateendpointconnections/version.go b/resource-manager/redis/2024-03-01/privateendpointconnections/version.go index 2f993e72d67..36cdac3323b 100644 --- a/resource-manager/redis/2024-03-01/privateendpointconnections/version.go +++ b/resource-manager/redis/2024-03-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-03-01" } diff --git a/resource-manager/redis/2024-03-01/privatelinkresources/README.md b/resource-manager/redis/2024-03-01/privatelinkresources/README.md index 229261f5445..d6c02e161bb 100644 --- a/resource-manager/redis/2024-03-01/privatelinkresources/README.md +++ b/resource-manager/redis/2024-03-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/privatelinkresources/client.go b/resource-manager/redis/2024-03-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redis/2024-03-01/privatelinkresources/client.go +++ b/resource-manager/redis/2024-03-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/privatelinkresources/id_redi.go b/resource-manager/redis/2024-03-01/privatelinkresources/id_redi.go index c453e1e4ce9..74df3c09e6e 100644 --- a/resource-manager/redis/2024-03-01/privatelinkresources/id_redi.go +++ b/resource-manager/redis/2024-03-01/privatelinkresources/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/privatelinkresources/method_listbyrediscache.go b/resource-manager/redis/2024-03-01/privatelinkresources/method_listbyrediscache.go index b8161914ecb..bf5b442c71d 100644 --- a/resource-manager/redis/2024-03-01/privatelinkresources/method_listbyrediscache.go +++ b/resource-manager/redis/2024-03-01/privatelinkresources/method_listbyrediscache.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByRedisCache(ctx context.Context, id Red var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/privatelinkresources/version.go b/resource-manager/redis/2024-03-01/privatelinkresources/version.go index bcf05c009fe..c11ce4682c7 100644 --- a/resource-manager/redis/2024-03-01/privatelinkresources/version.go +++ b/resource-manager/redis/2024-03-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-03-01" } diff --git a/resource-manager/redis/2024-03-01/redis/README.md b/resource-manager/redis/2024-03-01/redis/README.md index ef52a201117..0b14cfb4dee 100644 --- a/resource-manager/redis/2024-03-01/redis/README.md +++ b/resource-manager/redis/2024-03-01/redis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redis/2024-03-01/redis` Documentation -The `redis` SDK allows for interaction with the Azure Resource Manager Service `redis` (API Version `2024-03-01`). +The `redis` SDK allows for interaction with Azure Resource Manager `redis` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redis/2024-03-01/redis/client.go b/resource-manager/redis/2024-03-01/redis/client.go index 7f5011f9356..3d911581b53 100644 --- a/resource-manager/redis/2024-03-01/redis/client.go +++ b/resource-manager/redis/2024-03-01/redis/client.go @@ -15,7 +15,7 @@ type RedisClient struct { } func NewRedisClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisClient: %+v", err) } diff --git a/resource-manager/redis/2024-03-01/redis/id_accesspolicy.go b/resource-manager/redis/2024-03-01/redis/id_accesspolicy.go index e63b9dcf680..5e3f45233f9 100644 --- a/resource-manager/redis/2024-03-01/redis/id_accesspolicy.go +++ b/resource-manager/redis/2024-03-01/redis/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/redis/id_accesspolicyassignment.go b/resource-manager/redis/2024-03-01/redis/id_accesspolicyassignment.go index c7f187f3ec5..373f294ef84 100644 --- a/resource-manager/redis/2024-03-01/redis/id_accesspolicyassignment.go +++ b/resource-manager/redis/2024-03-01/redis/id_accesspolicyassignment.go @@ -44,7 +44,7 @@ func ParseAccessPolicyAssignmentID(input string) (*AccessPolicyAssignmentId, err } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyAssignmentIDInsensitively(input string) (*AccessPolicyAssi } id := AccessPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/redis/id_firewallrule.go b/resource-manager/redis/2024-03-01/redis/id_firewallrule.go index f989b6c6654..38fc54aa9bb 100644 --- a/resource-manager/redis/2024-03-01/redis/id_firewallrule.go +++ b/resource-manager/redis/2024-03-01/redis/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/redis/id_linkedserver.go b/resource-manager/redis/2024-03-01/redis/id_linkedserver.go index ca066302b71..20c8a7fd411 100644 --- a/resource-manager/redis/2024-03-01/redis/id_linkedserver.go +++ b/resource-manager/redis/2024-03-01/redis/id_linkedserver.go @@ -44,7 +44,7 @@ func ParseLinkedServerID(input string) (*LinkedServerId, error) { } id := LinkedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedServerIDInsensitively(input string) (*LinkedServerId, error) { } id := LinkedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/redis/id_redi.go b/resource-manager/redis/2024-03-01/redis/id_redi.go index cc15fb6623d..25ae15b0ce4 100644 --- a/resource-manager/redis/2024-03-01/redis/id_redi.go +++ b/resource-manager/redis/2024-03-01/redis/id_redi.go @@ -42,7 +42,7 @@ func ParseRediID(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRediIDInsensitively(input string) (*RediId, error) { } id := RediId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redis/2024-03-01/redis/method_accesspolicyassignmentget.go b/resource-manager/redis/2024-03-01/redis/method_accesspolicyassignmentget.go index e473570277f..4b3cb593c48 100644 --- a/resource-manager/redis/2024-03-01/redis/method_accesspolicyassignmentget.go +++ b/resource-manager/redis/2024-03-01/redis/method_accesspolicyassignmentget.go @@ -45,7 +45,6 @@ func (c RedisClient) AccessPolicyAssignmentGet(ctx context.Context, id AccessPol var model RedisCacheAccessPolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_accesspolicyget.go b/resource-manager/redis/2024-03-01/redis/method_accesspolicyget.go index 363f194ed8e..03d5a35d51d 100644 --- a/resource-manager/redis/2024-03-01/redis/method_accesspolicyget.go +++ b/resource-manager/redis/2024-03-01/redis/method_accesspolicyget.go @@ -45,7 +45,6 @@ func (c RedisClient) AccessPolicyGet(ctx context.Context, id AccessPolicyId) (re var model RedisCacheAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_firewallrulescreateorupdate.go b/resource-manager/redis/2024-03-01/redis/method_firewallrulescreateorupdate.go index f89d8e6ccbe..887afabf00b 100644 --- a/resource-manager/redis/2024-03-01/redis/method_firewallrulescreateorupdate.go +++ b/resource-manager/redis/2024-03-01/redis/method_firewallrulescreateorupdate.go @@ -50,7 +50,6 @@ func (c RedisClient) FirewallRulesCreateOrUpdate(ctx context.Context, id Firewal var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_firewallrulesget.go b/resource-manager/redis/2024-03-01/redis/method_firewallrulesget.go index a07fa2bb7f8..d02bf28361c 100644 --- a/resource-manager/redis/2024-03-01/redis/method_firewallrulesget.go +++ b/resource-manager/redis/2024-03-01/redis/method_firewallrulesget.go @@ -45,7 +45,6 @@ func (c RedisClient) FirewallRulesGet(ctx context.Context, id FirewallRuleId) (r var model RedisFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_forcereboot.go b/resource-manager/redis/2024-03-01/redis/method_forcereboot.go index f45768f09ff..f9bff572e69 100644 --- a/resource-manager/redis/2024-03-01/redis/method_forcereboot.go +++ b/resource-manager/redis/2024-03-01/redis/method_forcereboot.go @@ -50,7 +50,6 @@ func (c RedisClient) ForceReboot(ctx context.Context, id RediId, input RedisRebo var model RedisForceRebootResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_get.go b/resource-manager/redis/2024-03-01/redis/method_get.go index bfedd115361..1c8b7b90138 100644 --- a/resource-manager/redis/2024-03-01/redis/method_get.go +++ b/resource-manager/redis/2024-03-01/redis/method_get.go @@ -45,7 +45,6 @@ func (c RedisClient) Get(ctx context.Context, id RediId) (result GetOperationRes var model RedisResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_linkedserverget.go b/resource-manager/redis/2024-03-01/redis/method_linkedserverget.go index 659ee218f4b..9f866dbce07 100644 --- a/resource-manager/redis/2024-03-01/redis/method_linkedserverget.go +++ b/resource-manager/redis/2024-03-01/redis/method_linkedserverget.go @@ -45,7 +45,6 @@ func (c RedisClient) LinkedServerGet(ctx context.Context, id LinkedServerId) (re var model RedisLinkedServerWithProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_listkeys.go b/resource-manager/redis/2024-03-01/redis/method_listkeys.go index f7367b3a188..509bbb7de25 100644 --- a/resource-manager/redis/2024-03-01/redis/method_listkeys.go +++ b/resource-manager/redis/2024-03-01/redis/method_listkeys.go @@ -46,7 +46,6 @@ func (c RedisClient) ListKeys(ctx context.Context, id RediId) (result ListKeysOp var model RedisAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_listupgradenotifications.go b/resource-manager/redis/2024-03-01/redis/method_listupgradenotifications.go index 6f01790fccb..8ac2236d526 100644 --- a/resource-manager/redis/2024-03-01/redis/method_listupgradenotifications.go +++ b/resource-manager/redis/2024-03-01/redis/method_listupgradenotifications.go @@ -39,6 +39,7 @@ func (o ListUpgradeNotificationsOperationOptions) ToHeaders() *client.Headers { func (o ListUpgradeNotificationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/redis/2024-03-01/redis/method_patchschedulescreateorupdate.go b/resource-manager/redis/2024-03-01/redis/method_patchschedulescreateorupdate.go index 63d6cf5160b..087701d8070 100644 --- a/resource-manager/redis/2024-03-01/redis/method_patchschedulescreateorupdate.go +++ b/resource-manager/redis/2024-03-01/redis/method_patchschedulescreateorupdate.go @@ -51,7 +51,6 @@ func (c RedisClient) PatchSchedulesCreateOrUpdate(ctx context.Context, id RediId var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_patchschedulesget.go b/resource-manager/redis/2024-03-01/redis/method_patchschedulesget.go index 8962eab16ef..1856407c120 100644 --- a/resource-manager/redis/2024-03-01/redis/method_patchschedulesget.go +++ b/resource-manager/redis/2024-03-01/redis/method_patchschedulesget.go @@ -46,7 +46,6 @@ func (c RedisClient) PatchSchedulesGet(ctx context.Context, id RediId) (result P var model RedisPatchSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/method_regeneratekey.go b/resource-manager/redis/2024-03-01/redis/method_regeneratekey.go index 39915894e32..6d8bab3c02b 100644 --- a/resource-manager/redis/2024-03-01/redis/method_regeneratekey.go +++ b/resource-manager/redis/2024-03-01/redis/method_regeneratekey.go @@ -50,7 +50,6 @@ func (c RedisClient) RegenerateKey(ctx context.Context, id RediId, input RedisRe var model RedisAccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redis/2024-03-01/redis/version.go b/resource-manager/redis/2024-03-01/redis/version.go index 09571075a13..aabb41f7e55 100644 --- a/resource-manager/redis/2024-03-01/redis/version.go +++ b/resource-manager/redis/2024-03-01/redis/version.go @@ -1,12 +1,10 @@ package redis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redis/2024-03-01" } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/README.md b/resource-manager/redisenterprise/2023-07-01/databases/README.md index 5ca218b350e..525d73e6559 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/README.md +++ b/resource-manager/redisenterprise/2023-07-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-07-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-07-01/databases/client.go b/resource-manager/redisenterprise/2023-07-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/client.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/id_database.go b/resource-manager/redisenterprise/2023-07-01/databases/id_database.go index d4745fc21fb..9e1b35ff0e3 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/id_database.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go b/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go index d8fb50d3553..4d1ef307bc0 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/method_get.go b/resource-manager/redisenterprise/2023-07-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/method_get.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/method_listkeys.go b/resource-manager/redisenterprise/2023-07-01/databases/method_listkeys.go index a844ee91ed6..147674d8dcf 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/method_listkeys.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/method_listkeys.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListKeys(ctx context.Context, id DatabaseId) (result Li var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/databases/version.go b/resource-manager/redisenterprise/2023-07-01/databases/version.go index 5f96648f509..6e95ddf1980 100644 --- a/resource-manager/redisenterprise/2023-07-01/databases/version.go +++ b/resource-manager/redisenterprise/2023-07-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-07-01" } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/README.md b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/README.md index 7434cdae070..5405fe4f403 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/README.md +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-07-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/client.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/client.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_privateendpointconnection.go index 88163f9957e..8a4632730ea 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_redisenterprise.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_redisenterprise.go index 4682a1a0838..f28143da23a 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_get.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_get.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_list.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_list.go index ba4fccf373f..fbc4f5b3c1c 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_list.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnte var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/version.go b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/version.go index 35cb9c96d6d..3216474b9d5 100644 --- a/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/version.go +++ b/resource-manager/redisenterprise/2023-07-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-07-01" } diff --git a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/README.md b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/README.md index a64aba374e2..de214139e4b 100644 --- a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/README.md +++ b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-07-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/client.go b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/client.go +++ b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/id_redisenterprise.go b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/id_redisenterprise.go index 33965565bca..416bbf890f9 100644 --- a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/method_listbycluster.go b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/method_listbycluster.go index fa9ce53709b..ab94a7b4ec4 100644 --- a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/method_listbycluster.go +++ b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisE var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/version.go b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/version.go index 1ba0006f742..7b5c2d96a3e 100644 --- a/resource-manager/redisenterprise/2023-07-01/privatelinkresources/version.go +++ b/resource-manager/redisenterprise/2023-07-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-07-01" } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/README.md b/resource-manager/redisenterprise/2023-07-01/redisenterprise/README.md index c9ebdf9cec5..0d9620e85f3 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/README.md +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-07-01/redisenterprise` Documentation -The `redisenterprise` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-07-01`). +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/client.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/client.go index 4349d6c0e32..08640dfb307 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/client.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/client.go @@ -15,7 +15,7 @@ type RedisEnterpriseClient struct { } func NewRedisEnterpriseClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisEnterpriseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redisenterprise", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redisenterprise", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisEnterpriseClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_database.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_database.go index 2cffc92f5d2..6c494474f0a 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_database.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_redisenterprise.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_redisenterprise.go index 71a8e703899..22538d11370 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databasesget.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databasesget.go index 24a7b9c1d69..f774a726917 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databasesget.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databasesget.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) DatabasesGet(ctx context.Context, id DatabaseId) var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databaseslistkeys.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databaseslistkeys.go index e707f794cf3..0232e662380 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databaseslistkeys.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_databaseslistkeys.go @@ -46,7 +46,6 @@ func (c RedisEnterpriseClient) DatabasesListKeys(ctx context.Context, id Databas var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_get.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_get.go index 9dd2f10fa26..c729b30e660 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_get.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/method_get.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) Get(ctx context.Context, id RedisEnterpriseId) (r var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-07-01/redisenterprise/version.go b/resource-manager/redisenterprise/2023-07-01/redisenterprise/version.go index c10a96d76cf..26cec3e073c 100644 --- a/resource-manager/redisenterprise/2023-07-01/redisenterprise/version.go +++ b/resource-manager/redisenterprise/2023-07-01/redisenterprise/version.go @@ -1,12 +1,10 @@ package redisenterprise -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redisenterprise/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redisenterprise/2023-07-01" } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/README.md b/resource-manager/redisenterprise/2023-10-01-preview/databases/README.md index 6b8e8d18617..06fe6053bc0 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/README.md +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-10-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/client.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/client.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/id_database.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/id_database.go index d4745fc21fb..9e1b35ff0e3 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/id_database.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/id_redisenterprise.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/id_redisenterprise.go index d8fb50d3553..4d1ef307bc0 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/method_get.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/method_get.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/method_listkeys.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/method_listkeys.go index a844ee91ed6..147674d8dcf 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/method_listkeys.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/method_listkeys.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListKeys(ctx context.Context, id DatabaseId) (result Li var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/databases/version.go b/resource-manager/redisenterprise/2023-10-01-preview/databases/version.go index d6e95fc7760..73dba59a165 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/databases/version.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-10-01-preview" } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/README.md b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/README.md index 19cd9b7e350..cc14bd390e3 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/README.md +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-10-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/client.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/client.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go index 88163f9957e..8a4632730ea 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_redisenterprise.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_redisenterprise.go index 4682a1a0838..f28143da23a 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_get.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_list.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_list.go index ba4fccf373f..fbc4f5b3c1c 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_list.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnte var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/version.go b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/version.go index 6aced303ba5..3ff61899d64 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/version.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-10-01-preview" } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/README.md b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/README.md index ba689a5ec68..281a397002c 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/README.md +++ b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-10-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/client.go b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/client.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/id_redisenterprise.go b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/id_redisenterprise.go index 33965565bca..416bbf890f9 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/method_listbycluster.go b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/method_listbycluster.go index fa9ce53709b..ab94a7b4ec4 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/method_listbycluster.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisE var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/version.go b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/version.go index 7093fcb3bc2..e9d7a8dfafc 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/version.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-10-01-preview" } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/README.md b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/README.md index c836dbd64fd..00eede1ecb6 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/README.md +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise` Documentation -The `redisenterprise` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-10-01-preview`). +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/client.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/client.go index 4349d6c0e32..08640dfb307 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/client.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/client.go @@ -15,7 +15,7 @@ type RedisEnterpriseClient struct { } func NewRedisEnterpriseClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisEnterpriseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redisenterprise", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redisenterprise", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisEnterpriseClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go index 2cffc92f5d2..6c494474f0a 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go index 71a8e703899..22538d11370 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databasesget.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databasesget.go index 24a7b9c1d69..f774a726917 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databasesget.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databasesget.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) DatabasesGet(ctx context.Context, id DatabaseId) var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databaseslistkeys.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databaseslistkeys.go index e707f794cf3..0232e662380 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databaseslistkeys.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_databaseslistkeys.go @@ -46,7 +46,6 @@ func (c RedisEnterpriseClient) DatabasesListKeys(ctx context.Context, id Databas var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_get.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_get.go index 9dd2f10fa26..c729b30e660 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_get.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/method_get.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) Get(ctx context.Context, id RedisEnterpriseId) (r var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/version.go b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/version.go index ff305059bf6..999e96aef86 100644 --- a/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/version.go +++ b/resource-manager/redisenterprise/2023-10-01-preview/redisenterprise/version.go @@ -1,12 +1,10 @@ package redisenterprise -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redisenterprise/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redisenterprise/2023-10-01-preview" } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/README.md b/resource-manager/redisenterprise/2023-11-01/databases/README.md index c68589cf967..cdecb03505b 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/README.md +++ b/resource-manager/redisenterprise/2023-11-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-11-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-11-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-11-01/databases/client.go b/resource-manager/redisenterprise/2023-11-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/client.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/id_database.go b/resource-manager/redisenterprise/2023-11-01/databases/id_database.go index d4745fc21fb..9e1b35ff0e3 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/id_database.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/id_redisenterprise.go b/resource-manager/redisenterprise/2023-11-01/databases/id_redisenterprise.go index d8fb50d3553..4d1ef307bc0 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/method_get.go b/resource-manager/redisenterprise/2023-11-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/method_get.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/method_listkeys.go b/resource-manager/redisenterprise/2023-11-01/databases/method_listkeys.go index a844ee91ed6..147674d8dcf 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/method_listkeys.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/method_listkeys.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListKeys(ctx context.Context, id DatabaseId) (result Li var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/databases/version.go b/resource-manager/redisenterprise/2023-11-01/databases/version.go index 439db67ff96..c8e6cfb3107 100644 --- a/resource-manager/redisenterprise/2023-11-01/databases/version.go +++ b/resource-manager/redisenterprise/2023-11-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-11-01" } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/README.md b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/README.md index a6e1ab41234..d34ee6ff855 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/README.md +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-11-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-11-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/client.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/client.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_privateendpointconnection.go index 88163f9957e..8a4632730ea 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_redisenterprise.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_redisenterprise.go index 4682a1a0838..f28143da23a 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_get.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_get.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_list.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_list.go index ba4fccf373f..fbc4f5b3c1c 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_list.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnte var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/version.go b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/version.go index 2548ca02c5f..1e7e0fd4741 100644 --- a/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/version.go +++ b/resource-manager/redisenterprise/2023-11-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-11-01" } diff --git a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/README.md b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/README.md index 5f85c07f8c6..1d420e4b810 100644 --- a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/README.md +++ b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-11-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-11-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/client.go b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/client.go +++ b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/id_redisenterprise.go b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/id_redisenterprise.go index 33965565bca..416bbf890f9 100644 --- a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/method_listbycluster.go b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/method_listbycluster.go index fa9ce53709b..ab94a7b4ec4 100644 --- a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/method_listbycluster.go +++ b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisE var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/version.go b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/version.go index d12469c1344..8054e325910 100644 --- a/resource-manager/redisenterprise/2023-11-01/privatelinkresources/version.go +++ b/resource-manager/redisenterprise/2023-11-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-11-01" } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/README.md b/resource-manager/redisenterprise/2023-11-01/redisenterprise/README.md index 1099eb248e6..6d038829af1 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/README.md +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2023-11-01/redisenterprise` Documentation -The `redisenterprise` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2023-11-01`). +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/client.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/client.go index 4349d6c0e32..08640dfb307 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/client.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/client.go @@ -15,7 +15,7 @@ type RedisEnterpriseClient struct { } func NewRedisEnterpriseClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisEnterpriseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redisenterprise", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redisenterprise", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisEnterpriseClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_database.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_database.go index 2cffc92f5d2..6c494474f0a 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_database.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_redisenterprise.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_redisenterprise.go index 71a8e703899..22538d11370 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databasesget.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databasesget.go index 24a7b9c1d69..f774a726917 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databasesget.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databasesget.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) DatabasesGet(ctx context.Context, id DatabaseId) var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databaseslistkeys.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databaseslistkeys.go index e707f794cf3..0232e662380 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databaseslistkeys.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_databaseslistkeys.go @@ -46,7 +46,6 @@ func (c RedisEnterpriseClient) DatabasesListKeys(ctx context.Context, id Databas var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_get.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_get.go index 9dd2f10fa26..c729b30e660 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_get.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/method_get.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) Get(ctx context.Context, id RedisEnterpriseId) (r var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2023-11-01/redisenterprise/version.go b/resource-manager/redisenterprise/2023-11-01/redisenterprise/version.go index ffca3161564..3dc2adb041b 100644 --- a/resource-manager/redisenterprise/2023-11-01/redisenterprise/version.go +++ b/resource-manager/redisenterprise/2023-11-01/redisenterprise/version.go @@ -1,12 +1,10 @@ package redisenterprise -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redisenterprise/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redisenterprise/2023-11-01" } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/README.md b/resource-manager/redisenterprise/2024-02-01/databases/README.md index 00cdd9a2c92..7483f6debff 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/README.md +++ b/resource-manager/redisenterprise/2024-02-01/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-02-01/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2024-02-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2024-02-01/databases/client.go b/resource-manager/redisenterprise/2024-02-01/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/client.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/id_database.go b/resource-manager/redisenterprise/2024-02-01/databases/id_database.go index d4745fc21fb..9e1b35ff0e3 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/id_database.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/id_redisenterprise.go b/resource-manager/redisenterprise/2024-02-01/databases/id_redisenterprise.go index d8fb50d3553..4d1ef307bc0 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/method_get.go b/resource-manager/redisenterprise/2024-02-01/databases/method_get.go index dcbfb4b8270..df1a873b818 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/method_get.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/method_get.go @@ -45,7 +45,6 @@ func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOper var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/method_listkeys.go b/resource-manager/redisenterprise/2024-02-01/databases/method_listkeys.go index a844ee91ed6..147674d8dcf 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/method_listkeys.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/method_listkeys.go @@ -46,7 +46,6 @@ func (c DatabasesClient) ListKeys(ctx context.Context, id DatabaseId) (result Li var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/databases/version.go b/resource-manager/redisenterprise/2024-02-01/databases/version.go index b581f454d6d..bc3df7143ec 100644 --- a/resource-manager/redisenterprise/2024-02-01/databases/version.go +++ b/resource-manager/redisenterprise/2024-02-01/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2024-02-01" } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/README.md b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/README.md index cae76ada2cb..80dae4ec8fb 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/README.md +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-02-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2024-02-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/client.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/client.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_privateendpointconnection.go index 88163f9957e..8a4632730ea 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_redisenterprise.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_redisenterprise.go index 4682a1a0838..f28143da23a 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_get.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_get.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_list.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_list.go index ba4fccf373f..fbc4f5b3c1c 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_list.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/method_list.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnte var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/version.go b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/version.go index 8c78ad1eb13..a865c0680ef 100644 --- a/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/version.go +++ b/resource-manager/redisenterprise/2024-02-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-02-01" } diff --git a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/README.md b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/README.md index 14475caba2b..96793f36b18 100644 --- a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/README.md +++ b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-02-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2024-02-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/client.go b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/client.go +++ b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/id_redisenterprise.go b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/id_redisenterprise.go index 33965565bca..416bbf890f9 100644 --- a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/method_listbycluster.go b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/method_listbycluster.go index fa9ce53709b..ab94a7b4ec4 100644 --- a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/method_listbycluster.go +++ b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/method_listbycluster.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisE var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/version.go b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/version.go index a97b8c55eb1..297b1664d9a 100644 --- a/resource-manager/redisenterprise/2024-02-01/privatelinkresources/version.go +++ b/resource-manager/redisenterprise/2024-02-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2024-02-01" } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/README.md b/resource-manager/redisenterprise/2024-02-01/redisenterprise/README.md index b80159c61bc..25b22598350 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/README.md +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-02-01/redisenterprise` Documentation -The `redisenterprise` SDK allows for interaction with the Azure Resource Manager Service `redisenterprise` (API Version `2024-02-01`). +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/client.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/client.go index 4349d6c0e32..08640dfb307 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/client.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/client.go @@ -15,7 +15,7 @@ type RedisEnterpriseClient struct { } func NewRedisEnterpriseClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisEnterpriseClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "redisenterprise", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "redisenterprise", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RedisEnterpriseClient: %+v", err) } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_database.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_database.go index 2cffc92f5d2..6c494474f0a 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_database.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_database.go @@ -44,7 +44,7 @@ func ParseDatabaseID(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { } id := DatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_redisenterprise.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_redisenterprise.go index 71a8e703899..22538d11370 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_redisenterprise.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/id_redisenterprise.go @@ -42,7 +42,7 @@ func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, erro } id := RedisEnterpriseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databasesget.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databasesget.go index 24a7b9c1d69..f774a726917 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databasesget.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databasesget.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) DatabasesGet(ctx context.Context, id DatabaseId) var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databaseslistkeys.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databaseslistkeys.go index e707f794cf3..0232e662380 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databaseslistkeys.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_databaseslistkeys.go @@ -46,7 +46,6 @@ func (c RedisEnterpriseClient) DatabasesListKeys(ctx context.Context, id Databas var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_get.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_get.go index 9dd2f10fa26..c729b30e660 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_get.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/method_get.go @@ -45,7 +45,6 @@ func (c RedisEnterpriseClient) Get(ctx context.Context, id RedisEnterpriseId) (r var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/redisenterprise/2024-02-01/redisenterprise/version.go b/resource-manager/redisenterprise/2024-02-01/redisenterprise/version.go index 00484f19bcc..225069eebc2 100644 --- a/resource-manager/redisenterprise/2024-02-01/redisenterprise/version.go +++ b/resource-manager/redisenterprise/2024-02-01/redisenterprise/version.go @@ -1,12 +1,10 @@ package redisenterprise -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/redisenterprise/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/redisenterprise/2024-02-01" } diff --git a/resource-manager/redisenterprise/2024-06-01-preview/client.go b/resource-manager/redisenterprise/2024-06-01-preview/client.go new file mode 100644 index 00000000000..592443357ec --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/client.go @@ -0,0 +1,55 @@ +package v2024_06_01_preview + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources" + "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + Databases *databases.DatabasesClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient + RedisEnterprise *redisenterprise.RedisEnterpriseClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + databasesClient, err := databases.NewDatabasesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Databases client: %+v", err) + } + configureFunc(databasesClient.Client) + + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) + } + configureFunc(privateEndpointConnectionsClient.Client) + + privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) + } + configureFunc(privateLinkResourcesClient.Client) + + redisEnterpriseClient, err := redisenterprise.NewRedisEnterpriseClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building RedisEnterprise client: %+v", err) + } + configureFunc(redisEnterpriseClient.Client) + + return &Client{ + Databases: databasesClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinkResources: privateLinkResourcesClient, + RedisEnterprise: redisEnterpriseClient, + }, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md b/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md new file mode 100644 index 00000000000..f01049c4859 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/README.md @@ -0,0 +1,229 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases` Documentation + +The `databases` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/databases" +``` + + +### Client Initialization + +```go +client := databases.NewDatabasesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DatabasesClient.Create` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.Database{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Delete` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Export` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.ExportClusterParameters{ + // ... +} + + +if err := client.ExportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Flush` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.FlushParameters{ + // ... +} + + +if err := client.FlushThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.ForceLinkToReplicationGroup` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.ForceLinkParameters{ + // ... +} + + +if err := client.ForceLinkToReplicationGroupThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.ForceUnlink` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.ForceUnlinkParameters{ + // ... +} + + +if err := client.ForceUnlinkThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Get` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabasesClient.Import` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.ImportClusterParameters{ + // ... +} + + +if err := client.ImportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.ListByCluster` + +```go +ctx := context.TODO() +id := databases.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +// alternatively `client.ListByCluster(ctx, id)` can be used to do batched pagination +items, err := client.ListByClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `DatabasesClient.ListKeys` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +read, err := client.ListKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DatabasesClient.RegenerateKey` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.RegenerateKeyParameters{ + // ... +} + + +if err := client.RegenerateKeyThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.Update` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := databases.DatabaseUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `DatabasesClient.UpgradeDBRedisVersion` + +```go +ctx := context.TODO() +id := databases.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +if err := client.UpgradeDBRedisVersionThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/client.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/client.go new file mode 100644 index 00000000000..87de2d4fe59 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/client.go @@ -0,0 +1,26 @@ +package databases + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesClient struct { + Client *resourcemanager.Client +} + +func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) + } + + return &DatabasesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go new file mode 100644 index 00000000000..075ec0d43cd --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/constants.go @@ -0,0 +1,498 @@ +package databases + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessKeyType string + +const ( + AccessKeyTypePrimary AccessKeyType = "Primary" + AccessKeyTypeSecondary AccessKeyType = "Secondary" +) + +func PossibleValuesForAccessKeyType() []string { + return []string{ + string(AccessKeyTypePrimary), + string(AccessKeyTypeSecondary), + } +} + +func (s *AccessKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAccessKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAccessKeyType(input string) (*AccessKeyType, error) { + vals := map[string]AccessKeyType{ + "primary": AccessKeyTypePrimary, + "secondary": AccessKeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AccessKeyType(input) + return &out, nil +} + +type AofFrequency string + +const ( + AofFrequencyAlways AofFrequency = "always" + AofFrequencyOnes AofFrequency = "1s" +) + +func PossibleValuesForAofFrequency() []string { + return []string{ + string(AofFrequencyAlways), + string(AofFrequencyOnes), + } +} + +func (s *AofFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAofFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAofFrequency(input string) (*AofFrequency, error) { + vals := map[string]AofFrequency{ + "always": AofFrequencyAlways, + "1s": AofFrequencyOnes, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AofFrequency(input) + return &out, nil +} + +type ClusteringPolicy string + +const ( + ClusteringPolicyEnterpriseCluster ClusteringPolicy = "EnterpriseCluster" + ClusteringPolicyOSSCluster ClusteringPolicy = "OSSCluster" +) + +func PossibleValuesForClusteringPolicy() []string { + return []string{ + string(ClusteringPolicyEnterpriseCluster), + string(ClusteringPolicyOSSCluster), + } +} + +func (s *ClusteringPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClusteringPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClusteringPolicy(input string) (*ClusteringPolicy, error) { + vals := map[string]ClusteringPolicy{ + "enterprisecluster": ClusteringPolicyEnterpriseCluster, + "osscluster": ClusteringPolicyOSSCluster, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClusteringPolicy(input) + return &out, nil +} + +type DeferUpgradeSetting string + +const ( + DeferUpgradeSettingDeferred DeferUpgradeSetting = "Deferred" + DeferUpgradeSettingNotDeferred DeferUpgradeSetting = "NotDeferred" +) + +func PossibleValuesForDeferUpgradeSetting() []string { + return []string{ + string(DeferUpgradeSettingDeferred), + string(DeferUpgradeSettingNotDeferred), + } +} + +func (s *DeferUpgradeSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeferUpgradeSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeferUpgradeSetting(input string) (*DeferUpgradeSetting, error) { + vals := map[string]DeferUpgradeSetting{ + "deferred": DeferUpgradeSettingDeferred, + "notdeferred": DeferUpgradeSettingNotDeferred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeferUpgradeSetting(input) + return &out, nil +} + +type EvictionPolicy string + +const ( + EvictionPolicyAllKeysLFU EvictionPolicy = "AllKeysLFU" + EvictionPolicyAllKeysLRU EvictionPolicy = "AllKeysLRU" + EvictionPolicyAllKeysRandom EvictionPolicy = "AllKeysRandom" + EvictionPolicyNoEviction EvictionPolicy = "NoEviction" + EvictionPolicyVolatileLFU EvictionPolicy = "VolatileLFU" + EvictionPolicyVolatileLRU EvictionPolicy = "VolatileLRU" + EvictionPolicyVolatileRandom EvictionPolicy = "VolatileRandom" + EvictionPolicyVolatileTTL EvictionPolicy = "VolatileTTL" +) + +func PossibleValuesForEvictionPolicy() []string { + return []string{ + string(EvictionPolicyAllKeysLFU), + string(EvictionPolicyAllKeysLRU), + string(EvictionPolicyAllKeysRandom), + string(EvictionPolicyNoEviction), + string(EvictionPolicyVolatileLFU), + string(EvictionPolicyVolatileLRU), + string(EvictionPolicyVolatileRandom), + string(EvictionPolicyVolatileTTL), + } +} + +func (s *EvictionPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEvictionPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEvictionPolicy(input string) (*EvictionPolicy, error) { + vals := map[string]EvictionPolicy{ + "allkeyslfu": EvictionPolicyAllKeysLFU, + "allkeyslru": EvictionPolicyAllKeysLRU, + "allkeysrandom": EvictionPolicyAllKeysRandom, + "noeviction": EvictionPolicyNoEviction, + "volatilelfu": EvictionPolicyVolatileLFU, + "volatilelru": EvictionPolicyVolatileLRU, + "volatilerandom": EvictionPolicyVolatileRandom, + "volatilettl": EvictionPolicyVolatileTTL, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EvictionPolicy(input) + return &out, nil +} + +type LinkState string + +const ( + LinkStateLinkFailed LinkState = "LinkFailed" + LinkStateLinked LinkState = "Linked" + LinkStateLinking LinkState = "Linking" + LinkStateUnlinkFailed LinkState = "UnlinkFailed" + LinkStateUnlinking LinkState = "Unlinking" +) + +func PossibleValuesForLinkState() []string { + return []string{ + string(LinkStateLinkFailed), + string(LinkStateLinked), + string(LinkStateLinking), + string(LinkStateUnlinkFailed), + string(LinkStateUnlinking), + } +} + +func (s *LinkState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinkState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinkState(input string) (*LinkState, error) { + vals := map[string]LinkState{ + "linkfailed": LinkStateLinkFailed, + "linked": LinkStateLinked, + "linking": LinkStateLinking, + "unlinkfailed": LinkStateUnlinkFailed, + "unlinking": LinkStateUnlinking, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinkState(input) + return &out, nil +} + +type Protocol string + +const ( + ProtocolEncrypted Protocol = "Encrypted" + ProtocolPlaintext Protocol = "Plaintext" +) + +func PossibleValuesForProtocol() []string { + return []string{ + string(ProtocolEncrypted), + string(ProtocolPlaintext), + } +} + +func (s *Protocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocol(input string) (*Protocol, error) { + vals := map[string]Protocol{ + "encrypted": ProtocolEncrypted, + "plaintext": ProtocolPlaintext, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Protocol(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type RdbFrequency string + +const ( + RdbFrequencyOneTwoh RdbFrequency = "12h" + RdbFrequencyOneh RdbFrequency = "1h" + RdbFrequencySixh RdbFrequency = "6h" +) + +func PossibleValuesForRdbFrequency() []string { + return []string{ + string(RdbFrequencyOneTwoh), + string(RdbFrequencyOneh), + string(RdbFrequencySixh), + } +} + +func (s *RdbFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRdbFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRdbFrequency(input string) (*RdbFrequency, error) { + vals := map[string]RdbFrequency{ + "12h": RdbFrequencyOneTwoh, + "1h": RdbFrequencyOneh, + "6h": RdbFrequencySixh, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RdbFrequency(input) + return &out, nil +} + +type ResourceState string + +const ( + ResourceStateCreateFailed ResourceState = "CreateFailed" + ResourceStateCreating ResourceState = "Creating" + ResourceStateDeleteFailed ResourceState = "DeleteFailed" + ResourceStateDeleting ResourceState = "Deleting" + ResourceStateDisableFailed ResourceState = "DisableFailed" + ResourceStateDisabled ResourceState = "Disabled" + ResourceStateDisabling ResourceState = "Disabling" + ResourceStateEnableFailed ResourceState = "EnableFailed" + ResourceStateEnabling ResourceState = "Enabling" + ResourceStateRunning ResourceState = "Running" + ResourceStateScaling ResourceState = "Scaling" + ResourceStateScalingFailed ResourceState = "ScalingFailed" + ResourceStateUpdateFailed ResourceState = "UpdateFailed" + ResourceStateUpdating ResourceState = "Updating" +) + +func PossibleValuesForResourceState() []string { + return []string{ + string(ResourceStateCreateFailed), + string(ResourceStateCreating), + string(ResourceStateDeleteFailed), + string(ResourceStateDeleting), + string(ResourceStateDisableFailed), + string(ResourceStateDisabled), + string(ResourceStateDisabling), + string(ResourceStateEnableFailed), + string(ResourceStateEnabling), + string(ResourceStateRunning), + string(ResourceStateScaling), + string(ResourceStateScalingFailed), + string(ResourceStateUpdateFailed), + string(ResourceStateUpdating), + } +} + +func (s *ResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceState(input string) (*ResourceState, error) { + vals := map[string]ResourceState{ + "createfailed": ResourceStateCreateFailed, + "creating": ResourceStateCreating, + "deletefailed": ResourceStateDeleteFailed, + "deleting": ResourceStateDeleting, + "disablefailed": ResourceStateDisableFailed, + "disabled": ResourceStateDisabled, + "disabling": ResourceStateDisabling, + "enablefailed": ResourceStateEnableFailed, + "enabling": ResourceStateEnabling, + "running": ResourceStateRunning, + "scaling": ResourceStateScaling, + "scalingfailed": ResourceStateScalingFailed, + "updatefailed": ResourceStateUpdateFailed, + "updating": ResourceStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceState(input) + return &out, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database.go new file mode 100644 index 00000000000..9e1b35ff0e3 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database.go @@ -0,0 +1,139 @@ +package databases + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&DatabaseId{}) +} + +var _ resourceids.ResourceId = &DatabaseId{} + +// DatabaseId is a struct representing the Resource ID for a Database +type DatabaseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string + DatabaseName string +} + +// NewDatabaseID returns a new DatabaseId struct +func NewDatabaseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string, databaseName string) DatabaseId { + return DatabaseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + DatabaseName: databaseName, + } +} + +// ParseDatabaseID parses 'input' into a DatabaseId +func ParseDatabaseID(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId +// note: this method should only be used for API response data and not user input +func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) + } + + return nil +} + +// ValidateDatabaseID checks that 'input' can be parsed as a Database ID +func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDatabaseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Database ID +func (id DatabaseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s/databases/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName, id.DatabaseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Database ID +func (id DatabaseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + resourceids.StaticSegment("staticDatabases", "databases", "databases"), + resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), + } +} + +// String returns a human-readable description of this Database ID +func (id DatabaseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + fmt.Sprintf("Database Name: %q", id.DatabaseName), + } + return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database_test.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database_test.go new file mode 100644 index 00000000000..b3d3e7387ba --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_database_test.go @@ -0,0 +1,327 @@ +package databases + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &DatabaseId{} + +func TestNewDatabaseID(t *testing.T) { + id := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } + + if id.DatabaseName != "databaseValue" { + t.Fatalf("Expected %q but got %q for Segment 'DatabaseName'", id.DatabaseName, "databaseValue") + } +} + +func TestFormatDatabaseID(t *testing.T) { + actual := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseDatabaseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + DatabaseName: "databaseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestParseDatabaseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + DatabaseName: "databaseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs/dAtAbAsEvAlUe", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + DatabaseName: "dAtAbAsEvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs/dAtAbAsEvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestSegmentsForDatabaseId(t *testing.T) { + segments := DatabaseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("DatabaseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise.go new file mode 100644 index 00000000000..4d1ef307bc0 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise.go @@ -0,0 +1,130 @@ +package databases + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise_test.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise_test.go new file mode 100644 index 00000000000..fb85be2fb70 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package databases + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_create.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_create.go new file mode 100644 index 00000000000..ef7027e79c5 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_create.go @@ -0,0 +1,75 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// Create ... +func (c DatabasesClient) Create(ctx context.Context, id DatabaseId, input Database) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c DatabasesClient) CreateThenPoll(ctx context.Context, id DatabaseId, input Database) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_delete.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_delete.go new file mode 100644 index 00000000000..dc03e526611 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_delete.go @@ -0,0 +1,71 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c DatabasesClient) Delete(ctx context.Context, id DatabaseId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c DatabasesClient) DeleteThenPoll(ctx context.Context, id DatabaseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_export.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_export.go new file mode 100644 index 00000000000..a35c1aaff53 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_export.go @@ -0,0 +1,74 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Export ... +func (c DatabasesClient) Export(ctx context.Context, id DatabaseId, input ExportClusterParameters) (result ExportOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/export", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ExportThenPoll performs Export then polls until it's completed +func (c DatabasesClient) ExportThenPoll(ctx context.Context, id DatabaseId, input ExportClusterParameters) error { + result, err := c.Export(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Export: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Export: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_flush.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_flush.go new file mode 100644 index 00000000000..aaf7666fdf0 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_flush.go @@ -0,0 +1,74 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlushOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Flush ... +func (c DatabasesClient) Flush(ctx context.Context, id DatabaseId, input FlushParameters) (result FlushOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/flush", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// FlushThenPoll performs Flush then polls until it's completed +func (c DatabasesClient) FlushThenPoll(ctx context.Context, id DatabaseId, input FlushParameters) error { + result, err := c.Flush(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Flush: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Flush: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forcelinktoreplicationgroup.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forcelinktoreplicationgroup.go new file mode 100644 index 00000000000..020c282d01d --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forcelinktoreplicationgroup.go @@ -0,0 +1,73 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkToReplicationGroupOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// ForceLinkToReplicationGroup ... +func (c DatabasesClient) ForceLinkToReplicationGroup(ctx context.Context, id DatabaseId, input ForceLinkParameters) (result ForceLinkToReplicationGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceLinkToReplicationGroup", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ForceLinkToReplicationGroupThenPoll performs ForceLinkToReplicationGroup then polls until it's completed +func (c DatabasesClient) ForceLinkToReplicationGroupThenPoll(ctx context.Context, id DatabaseId, input ForceLinkParameters) error { + result, err := c.ForceLinkToReplicationGroup(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ForceLinkToReplicationGroup: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ForceLinkToReplicationGroup: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forceunlink.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forceunlink.go new file mode 100644 index 00000000000..bc8f9b988c8 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_forceunlink.go @@ -0,0 +1,74 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceUnlinkOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// ForceUnlink ... +func (c DatabasesClient) ForceUnlink(ctx context.Context, id DatabaseId, input ForceUnlinkParameters) (result ForceUnlinkOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceUnlink", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ForceUnlinkThenPoll performs ForceUnlink then polls until it's completed +func (c DatabasesClient) ForceUnlinkThenPoll(ctx context.Context, id DatabaseId, input ForceUnlinkParameters) error { + result, err := c.ForceUnlink(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ForceUnlink: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ForceUnlink: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_get.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_get.go new file mode 100644 index 00000000000..df1a873b818 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_get.go @@ -0,0 +1,53 @@ +package databases + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// Get ... +func (c DatabasesClient) Get(ctx context.Context, id DatabaseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Database + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_import.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_import.go new file mode 100644 index 00000000000..39022d59c43 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_import.go @@ -0,0 +1,74 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImportOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Import ... +func (c DatabasesClient) Import(ctx context.Context, id DatabaseId, input ImportClusterParameters) (result ImportOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/import", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ImportThenPoll performs Import then polls until it's completed +func (c DatabasesClient) ImportThenPoll(ctx context.Context, id DatabaseId, input ImportClusterParameters) error { + result, err := c.Import(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Import: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Import: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listbycluster.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listbycluster.go new file mode 100644 index 00000000000..c98456fed45 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listbycluster.go @@ -0,0 +1,105 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Database +} + +type ListByClusterCompleteResult struct { + LatestHttpResponse *http.Response + Items []Database +} + +type ListByClusterCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByClusterCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByCluster ... +func (c DatabasesClient) ListByCluster(ctx context.Context, id RedisEnterpriseId) (result ListByClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByClusterCustomPager{}, + Path: fmt.Sprintf("%s/databases", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Database `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByClusterComplete retrieves all the results into a single object +func (c DatabasesClient) ListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (ListByClusterCompleteResult, error) { + return c.ListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) +} + +// ListByClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c DatabasesClient) ListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (result ListByClusterCompleteResult, err error) { + items := make([]Database, 0) + + resp, err := c.ListByCluster(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByClusterCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listkeys.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listkeys.go new file mode 100644 index 00000000000..147674d8dcf --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_listkeys.go @@ -0,0 +1,54 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListKeysOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AccessKeys +} + +// ListKeys ... +func (c DatabasesClient) ListKeys(ctx context.Context, id DatabaseId) (result ListKeysOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listKeys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AccessKeys + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_regeneratekey.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_regeneratekey.go new file mode 100644 index 00000000000..f745c705aba --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_regeneratekey.go @@ -0,0 +1,75 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateKeyOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AccessKeys +} + +// RegenerateKey ... +func (c DatabasesClient) RegenerateKey(ctx context.Context, id DatabaseId, input RegenerateKeyParameters) (result RegenerateKeyOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/regenerateKey", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// RegenerateKeyThenPoll performs RegenerateKey then polls until it's completed +func (c DatabasesClient) RegenerateKeyThenPoll(ctx context.Context, id DatabaseId, input RegenerateKeyParameters) error { + result, err := c.RegenerateKey(ctx, id, input) + if err != nil { + return fmt.Errorf("performing RegenerateKey: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after RegenerateKey: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_update.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_update.go new file mode 100644 index 00000000000..21a9006463c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_update.go @@ -0,0 +1,75 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// Update ... +func (c DatabasesClient) Update(ctx context.Context, id DatabaseId, input DatabaseUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c DatabasesClient) UpdateThenPoll(ctx context.Context, id DatabaseId, input DatabaseUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go new file mode 100644 index 00000000000..ad7e756b1dc --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/method_upgradedbredisversion.go @@ -0,0 +1,69 @@ +package databases + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpgradeDBRedisVersionOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// UpgradeDBRedisVersion ... +func (c DatabasesClient) UpgradeDBRedisVersion(ctx context.Context, id DatabaseId) (result UpgradeDBRedisVersionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/upgradeDBRedisVersion", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpgradeDBRedisVersionThenPoll performs UpgradeDBRedisVersion then polls until it's completed +func (c DatabasesClient) UpgradeDBRedisVersionThenPoll(ctx context.Context, id DatabaseId) error { + result, err := c.UpgradeDBRedisVersion(ctx, id) + if err != nil { + return fmt.Errorf("performing UpgradeDBRedisVersion: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UpgradeDBRedisVersion: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_accesskeys.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_accesskeys.go new file mode 100644 index 00000000000..d2c730f7d54 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_accesskeys.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessKeys struct { + PrimaryKey *string `json:"primaryKey,omitempty"` + SecondaryKey *string `json:"secondaryKey,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_database.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_database.go new file mode 100644 index 00000000000..a9880a7432b --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_database.go @@ -0,0 +1,11 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Database struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DatabaseProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go new file mode 100644 index 00000000000..09bde8edb55 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseproperties.go @@ -0,0 +1,18 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseProperties struct { + ClientProtocol *Protocol `json:"clientProtocol,omitempty"` + ClusteringPolicy *ClusteringPolicy `json:"clusteringPolicy,omitempty"` + DeferUpgrade *DeferUpgradeSetting `json:"deferUpgrade,omitempty"` + EvictionPolicy *EvictionPolicy `json:"evictionPolicy,omitempty"` + GeoReplication *DatabasePropertiesGeoReplication `json:"geoReplication,omitempty"` + Modules *[]Module `json:"modules,omitempty"` + Persistence *Persistence `json:"persistence,omitempty"` + Port *int64 `json:"port,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RedisVersion *string `json:"redisVersion,omitempty"` + ResourceState *ResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databasepropertiesgeoreplication.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databasepropertiesgeoreplication.go new file mode 100644 index 00000000000..1aa0445a637 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databasepropertiesgeoreplication.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasePropertiesGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseupdate.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseupdate.go new file mode 100644 index 00000000000..038f991ecef --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_databaseupdate.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseUpdate struct { + Properties *DatabaseProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_exportclusterparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_exportclusterparameters.go new file mode 100644 index 00000000000..35c3ad5e660 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_exportclusterparameters.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportClusterParameters struct { + SasUri string `json:"sasUri"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_flushparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_flushparameters.go new file mode 100644 index 00000000000..7ac8c6633b3 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_flushparameters.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlushParameters struct { + Ids *[]string `json:"ids,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go new file mode 100644 index 00000000000..7c8c1ecd012 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forcelinkparameters.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParameters struct { + GroupNickname string `json:"groupNickname"` + LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forceunlinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forceunlinkparameters.go new file mode 100644 index 00000000000..f3f97fbc4bf --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_forceunlinkparameters.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceUnlinkParameters struct { + Ids []string `json:"ids"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_importclusterparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_importclusterparameters.go new file mode 100644 index 00000000000..fa3be54a50f --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_importclusterparameters.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImportClusterParameters struct { + SasUris []string `json:"sasUris"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_linkeddatabase.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_linkeddatabase.go new file mode 100644 index 00000000000..215442f62da --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_linkeddatabase.go @@ -0,0 +1,9 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedDatabase struct { + Id *string `json:"id,omitempty"` + State *LinkState `json:"state,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_module.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_module.go new file mode 100644 index 00000000000..bde6a3ad4d4 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_module.go @@ -0,0 +1,10 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Module struct { + Args *string `json:"args,omitempty"` + Name string `json:"name"` + Version *string `json:"version,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_persistence.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_persistence.go new file mode 100644 index 00000000000..fd1e748a3dd --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_persistence.go @@ -0,0 +1,11 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Persistence struct { + AofEnabled *bool `json:"aofEnabled,omitempty"` + AofFrequency *AofFrequency `json:"aofFrequency,omitempty"` + RdbEnabled *bool `json:"rdbEnabled,omitempty"` + RdbFrequency *RdbFrequency `json:"rdbFrequency,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/model_regeneratekeyparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_regeneratekeyparameters.go new file mode 100644 index 00000000000..fa84cc54ad5 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/model_regeneratekeyparameters.go @@ -0,0 +1,8 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateKeyParameters struct { + KeyType AccessKeyType `json:"keyType"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/predicates.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/predicates.go new file mode 100644 index 00000000000..3d55136d0fb --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/predicates.go @@ -0,0 +1,27 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DatabaseOperationPredicate) Matches(input Database) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go b/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go new file mode 100644 index 00000000000..93eecd011fc --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/databases/version.go @@ -0,0 +1,10 @@ +package databases + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/databases/2024-06-01-preview" +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/README.md b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/README.md new file mode 100644 index 00000000000..b8d1d3c542e --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/README.md @@ -0,0 +1,81 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Delete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "privateEndpointConnectionValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Get` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "privateEndpointConnectionValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.List` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +read, err := client.List(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.Put` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "privateEndpointConnectionValue") + +payload := privateendpointconnections.PrivateEndpointConnection{ + // ... +} + + +if err := client.PutThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/client.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/client.go new file mode 100644 index 00000000000..50eaf09dcce --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/client.go @@ -0,0 +1,26 @@ +package privateendpointconnections + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionsClient struct { + Client *resourcemanager.Client +} + +func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) + } + + return &PrivateEndpointConnectionsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/constants.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/constants.go new file mode 100644 index 00000000000..c5850609650 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/constants.go @@ -0,0 +1,101 @@ +package privateendpointconnections + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection.go new file mode 100644 index 00000000000..8a4632730ea --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -0,0 +1,139 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&PrivateEndpointConnectionId{}) +} + +var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} + +// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection +type PrivateEndpointConnectionId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string + PrivateEndpointConnectionName string +} + +// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct +func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, redisEnterpriseName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { + return PrivateEndpointConnectionId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + PrivateEndpointConnectionName: privateEndpointConnectionName, + } +} + +// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId +func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId +// note: this method should only be used for API response data and not user input +func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { + parser := resourceids.NewParserFromResourceIdType(&PrivateEndpointConnectionId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := PrivateEndpointConnectionId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *PrivateEndpointConnectionId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + if id.PrivateEndpointConnectionName, ok = input.Parsed["privateEndpointConnectionName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", input) + } + + return nil +} + +// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID +func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParsePrivateEndpointConnectionID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s/privateEndpointConnections/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName, id.PrivateEndpointConnectionName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), + resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), + } +} + +// String returns a human-readable description of this Private Endpoint Connection ID +func (id PrivateEndpointConnectionId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), + } + return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection_test.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection_test.go new file mode 100644 index 00000000000..173cea56e9b --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_privateendpointconnection_test.go @@ -0,0 +1,327 @@ +package privateendpointconnections + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &PrivateEndpointConnectionId{} + +func TestNewPrivateEndpointConnectionID(t *testing.T) { + id := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "privateEndpointConnectionValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } + + if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { + t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") + } +} + +func TestFormatPrivateEndpointConnectionID(t *testing.T) { + actual := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "privateEndpointConnectionValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections/privateEndpointConnectionValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParsePrivateEndpointConnectionID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections/privateEndpointConnectionValue", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + PrivateEndpointConnectionName: "privateEndpointConnectionValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections/privateEndpointConnectionValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestParsePrivateEndpointConnectionIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *PrivateEndpointConnectionId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/pRiVaTeEnDpOiNtCoNnEcTiOnS", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections/privateEndpointConnectionValue", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + PrivateEndpointConnectionName: "privateEndpointConnectionValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/privateEndpointConnections/privateEndpointConnectionValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", + Expected: &PrivateEndpointConnectionId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParsePrivateEndpointConnectionIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { + t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) + } + + } +} + +func TestSegmentsForPrivateEndpointConnectionId(t *testing.T) { + segments := PrivateEndpointConnectionId{}.Segments() + if len(segments) == 0 { + t.Fatalf("PrivateEndpointConnectionId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise.go new file mode 100644 index 00000000000..f28143da23a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise.go @@ -0,0 +1,130 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise_test.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise_test.go new file mode 100644 index 00000000000..1c1f6558de3 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package privateendpointconnections + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_delete.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_delete.go new file mode 100644 index 00000000000..63c26e8f27f --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_delete.go @@ -0,0 +1,71 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id PrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c PrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_get.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_get.go new file mode 100644 index 00000000000..351242746d4 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_get.go @@ -0,0 +1,53 @@ +package privateendpointconnections + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnection +} + +// Get ... +func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEndpointConnectionId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnection + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_list.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_list.go new file mode 100644 index 00000000000..fbc4f5b3c1c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_list.go @@ -0,0 +1,54 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnectionListResult +} + +// List ... +func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id RedisEnterpriseId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateEndpointConnectionListResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_put.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_put.go new file mode 100644 index 00000000000..8f6e3022d15 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/method_put.go @@ -0,0 +1,74 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PutOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *PrivateEndpointConnection +} + +// Put ... +func (c PrivateEndpointConnectionsClient) Put(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result PutOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// PutThenPoll performs Put then polls until it's completed +func (c PrivateEndpointConnectionsClient) PutThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) error { + result, err := c.Put(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Put: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Put: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpoint.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpoint.go new file mode 100644 index 00000000000..1bc8cf2a97c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpoint.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnection.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnection.go new file mode 100644 index 00000000000..fde7f4db0fc --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnection.go @@ -0,0 +1,11 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionlistresult.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionlistresult.go new file mode 100644 index 00000000000..92a9ecb105a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionlistresult.go @@ -0,0 +1,8 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionListResult struct { + Value *[]PrivateEndpointConnection `json:"value,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go new file mode 100644 index 00000000000..549d255f069 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go new file mode 100644 index 00000000000..ec3f7a9f24c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/version.go b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/version.go new file mode 100644 index 00000000000..0c94b8af129 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privateendpointconnections/version.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-06-01-preview" +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/README.md b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/README.md new file mode 100644 index 00000000000..acfebe1e16c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/README.md @@ -0,0 +1,36 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources` Documentation + +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources" +``` + + +### Client Initialization + +```go +client := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkResourcesClient.ListByCluster` + +```go +ctx := context.TODO() +id := privatelinkresources.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +read, err := client.ListByCluster(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/client.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/client.go new file mode 100644 index 00000000000..28c00b21f03 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/client.go @@ -0,0 +1,26 @@ +package privatelinkresources + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourcesClient struct { + Client *resourcemanager.Client +} + +func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) + } + + return &PrivateLinkResourcesClient{ + Client: client, + }, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise.go new file mode 100644 index 00000000000..416bbf890f9 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise.go @@ -0,0 +1,130 @@ +package privatelinkresources + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise_test.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise_test.go new file mode 100644 index 00000000000..2cad177a293 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package privatelinkresources + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/method_listbycluster.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/method_listbycluster.go new file mode 100644 index 00000000000..ab94a7b4ec4 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/method_listbycluster.go @@ -0,0 +1,54 @@ +package privatelinkresources + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *PrivateLinkResourceListResult +} + +// ListByCluster ... +func (c PrivateLinkResourcesClient) ListByCluster(ctx context.Context, id RedisEnterpriseId) (result ListByClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model PrivateLinkResourceListResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresource.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresource.go new file mode 100644 index 00000000000..69e8ae0e57a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresource.go @@ -0,0 +1,11 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResource struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourcelistresult.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourcelistresult.go new file mode 100644 index 00000000000..fa950217c47 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourcelistresult.go @@ -0,0 +1,8 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceListResult struct { + Value *[]PrivateLinkResource `json:"value,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourceproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourceproperties.go new file mode 100644 index 00000000000..3c98012cdd1 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/model_privatelinkresourceproperties.go @@ -0,0 +1,10 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkResourceProperties struct { + GroupId *string `json:"groupId,omitempty"` + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/version.go b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/version.go new file mode 100644 index 00000000000..33bc8724a14 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/privatelinkresources/version.go @@ -0,0 +1,10 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privatelinkresources/2024-06-01-preview" +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md new file mode 100644 index 00000000000..ad1fc9a0232 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/README.md @@ -0,0 +1,326 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise` Documentation + +The `redisenterprise` SDK allows for interaction with Azure Resource Manager `redisenterprise` (API Version `2024-06-01-preview`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise" +``` + + +### Client Initialization + +```go +client := redisenterprise.NewRedisEnterpriseClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `RedisEnterpriseClient.Create` + +```go +ctx := context.TODO() +id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +payload := redisenterprise.Cluster{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesCreate` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.Database{ + // ... +} + + +if err := client.DatabasesCreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesDelete` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +if err := client.DatabasesDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesExport` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.ExportClusterParameters{ + // ... +} + + +if err := client.DatabasesExportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesFlush` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.FlushParameters{ + // ... +} + + +if err := client.DatabasesFlushThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesForceLinkToReplicationGroup` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.ForceLinkParameters{ + // ... +} + + +if err := client.DatabasesForceLinkToReplicationGroupThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesForceUnlink` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.ForceUnlinkParameters{ + // ... +} + + +if err := client.DatabasesForceUnlinkThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesGet` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +read, err := client.DatabasesGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesImport` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.ImportClusterParameters{ + // ... +} + + +if err := client.DatabasesImportThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesListByCluster` + +```go +ctx := context.TODO() +id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +// alternatively `client.DatabasesListByCluster(ctx, id)` can be used to do batched pagination +items, err := client.DatabasesListByClusterComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesListKeys` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +read, err := client.DatabasesListKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesRegenerateKey` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.RegenerateKeyParameters{ + // ... +} + + +if err := client.DatabasesRegenerateKeyThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesUpdate` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +payload := redisenterprise.DatabaseUpdate{ + // ... +} + + +if err := client.DatabasesUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.DatabasesUpgradeDBRedisVersion` + +```go +ctx := context.TODO() +id := redisenterprise.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + +if err := client.DatabasesUpgradeDBRedisVersionThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.Delete` + +```go +ctx := context.TODO() +id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +if err := client.DeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `RedisEnterpriseClient.Get` + +```go +ctx := context.TODO() +id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `RedisEnterpriseClient.List` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RedisEnterpriseClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `RedisEnterpriseClient.Update` + +```go +ctx := context.TODO() +id := redisenterprise.NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + +payload := redisenterprise.ClusterUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/client.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/client.go new file mode 100644 index 00000000000..08640dfb307 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/client.go @@ -0,0 +1,26 @@ +package redisenterprise + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RedisEnterpriseClient struct { + Client *resourcemanager.Client +} + +func NewRedisEnterpriseClientWithBaseURI(sdkApi sdkEnv.Api) (*RedisEnterpriseClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "redisenterprise", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating RedisEnterpriseClient: %+v", err) + } + + return &RedisEnterpriseClient{ + Client: client, + }, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go new file mode 100644 index 00000000000..79e57ef39a2 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/constants.go @@ -0,0 +1,736 @@ +package redisenterprise + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessKeyType string + +const ( + AccessKeyTypePrimary AccessKeyType = "Primary" + AccessKeyTypeSecondary AccessKeyType = "Secondary" +) + +func PossibleValuesForAccessKeyType() []string { + return []string{ + string(AccessKeyTypePrimary), + string(AccessKeyTypeSecondary), + } +} + +func (s *AccessKeyType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAccessKeyType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAccessKeyType(input string) (*AccessKeyType, error) { + vals := map[string]AccessKeyType{ + "primary": AccessKeyTypePrimary, + "secondary": AccessKeyTypeSecondary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AccessKeyType(input) + return &out, nil +} + +type AofFrequency string + +const ( + AofFrequencyAlways AofFrequency = "always" + AofFrequencyOnes AofFrequency = "1s" +) + +func PossibleValuesForAofFrequency() []string { + return []string{ + string(AofFrequencyAlways), + string(AofFrequencyOnes), + } +} + +func (s *AofFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAofFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAofFrequency(input string) (*AofFrequency, error) { + vals := map[string]AofFrequency{ + "always": AofFrequencyAlways, + "1s": AofFrequencyOnes, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AofFrequency(input) + return &out, nil +} + +type ClusteringPolicy string + +const ( + ClusteringPolicyEnterpriseCluster ClusteringPolicy = "EnterpriseCluster" + ClusteringPolicyOSSCluster ClusteringPolicy = "OSSCluster" +) + +func PossibleValuesForClusteringPolicy() []string { + return []string{ + string(ClusteringPolicyEnterpriseCluster), + string(ClusteringPolicyOSSCluster), + } +} + +func (s *ClusteringPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseClusteringPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseClusteringPolicy(input string) (*ClusteringPolicy, error) { + vals := map[string]ClusteringPolicy{ + "enterprisecluster": ClusteringPolicyEnterpriseCluster, + "osscluster": ClusteringPolicyOSSCluster, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ClusteringPolicy(input) + return &out, nil +} + +type CmkIdentityType string + +const ( + CmkIdentityTypeSystemAssignedIdentity CmkIdentityType = "systemAssignedIdentity" + CmkIdentityTypeUserAssignedIdentity CmkIdentityType = "userAssignedIdentity" +) + +func PossibleValuesForCmkIdentityType() []string { + return []string{ + string(CmkIdentityTypeSystemAssignedIdentity), + string(CmkIdentityTypeUserAssignedIdentity), + } +} + +func (s *CmkIdentityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCmkIdentityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCmkIdentityType(input string) (*CmkIdentityType, error) { + vals := map[string]CmkIdentityType{ + "systemassignedidentity": CmkIdentityTypeSystemAssignedIdentity, + "userassignedidentity": CmkIdentityTypeUserAssignedIdentity, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CmkIdentityType(input) + return &out, nil +} + +type DeferUpgradeSetting string + +const ( + DeferUpgradeSettingDeferred DeferUpgradeSetting = "Deferred" + DeferUpgradeSettingNotDeferred DeferUpgradeSetting = "NotDeferred" +) + +func PossibleValuesForDeferUpgradeSetting() []string { + return []string{ + string(DeferUpgradeSettingDeferred), + string(DeferUpgradeSettingNotDeferred), + } +} + +func (s *DeferUpgradeSetting) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDeferUpgradeSetting(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDeferUpgradeSetting(input string) (*DeferUpgradeSetting, error) { + vals := map[string]DeferUpgradeSetting{ + "deferred": DeferUpgradeSettingDeferred, + "notdeferred": DeferUpgradeSettingNotDeferred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DeferUpgradeSetting(input) + return &out, nil +} + +type EvictionPolicy string + +const ( + EvictionPolicyAllKeysLFU EvictionPolicy = "AllKeysLFU" + EvictionPolicyAllKeysLRU EvictionPolicy = "AllKeysLRU" + EvictionPolicyAllKeysRandom EvictionPolicy = "AllKeysRandom" + EvictionPolicyNoEviction EvictionPolicy = "NoEviction" + EvictionPolicyVolatileLFU EvictionPolicy = "VolatileLFU" + EvictionPolicyVolatileLRU EvictionPolicy = "VolatileLRU" + EvictionPolicyVolatileRandom EvictionPolicy = "VolatileRandom" + EvictionPolicyVolatileTTL EvictionPolicy = "VolatileTTL" +) + +func PossibleValuesForEvictionPolicy() []string { + return []string{ + string(EvictionPolicyAllKeysLFU), + string(EvictionPolicyAllKeysLRU), + string(EvictionPolicyAllKeysRandom), + string(EvictionPolicyNoEviction), + string(EvictionPolicyVolatileLFU), + string(EvictionPolicyVolatileLRU), + string(EvictionPolicyVolatileRandom), + string(EvictionPolicyVolatileTTL), + } +} + +func (s *EvictionPolicy) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEvictionPolicy(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEvictionPolicy(input string) (*EvictionPolicy, error) { + vals := map[string]EvictionPolicy{ + "allkeyslfu": EvictionPolicyAllKeysLFU, + "allkeyslru": EvictionPolicyAllKeysLRU, + "allkeysrandom": EvictionPolicyAllKeysRandom, + "noeviction": EvictionPolicyNoEviction, + "volatilelfu": EvictionPolicyVolatileLFU, + "volatilelru": EvictionPolicyVolatileLRU, + "volatilerandom": EvictionPolicyVolatileRandom, + "volatilettl": EvictionPolicyVolatileTTL, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EvictionPolicy(input) + return &out, nil +} + +type LinkState string + +const ( + LinkStateLinkFailed LinkState = "LinkFailed" + LinkStateLinked LinkState = "Linked" + LinkStateLinking LinkState = "Linking" + LinkStateUnlinkFailed LinkState = "UnlinkFailed" + LinkStateUnlinking LinkState = "Unlinking" +) + +func PossibleValuesForLinkState() []string { + return []string{ + string(LinkStateLinkFailed), + string(LinkStateLinked), + string(LinkStateLinking), + string(LinkStateUnlinkFailed), + string(LinkStateUnlinking), + } +} + +func (s *LinkState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLinkState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLinkState(input string) (*LinkState, error) { + vals := map[string]LinkState{ + "linkfailed": LinkStateLinkFailed, + "linked": LinkStateLinked, + "linking": LinkStateLinking, + "unlinkfailed": LinkStateUnlinkFailed, + "unlinking": LinkStateUnlinking, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LinkState(input) + return &out, nil +} + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} + +type Protocol string + +const ( + ProtocolEncrypted Protocol = "Encrypted" + ProtocolPlaintext Protocol = "Plaintext" +) + +func PossibleValuesForProtocol() []string { + return []string{ + string(ProtocolEncrypted), + string(ProtocolPlaintext), + } +} + +func (s *Protocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProtocol(input string) (*Protocol, error) { + vals := map[string]Protocol{ + "encrypted": ProtocolEncrypted, + "plaintext": ProtocolPlaintext, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Protocol(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + string(ProvisioningStateUpdating), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + "updating": ProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} + +type RdbFrequency string + +const ( + RdbFrequencyOneTwoh RdbFrequency = "12h" + RdbFrequencyOneh RdbFrequency = "1h" + RdbFrequencySixh RdbFrequency = "6h" +) + +func PossibleValuesForRdbFrequency() []string { + return []string{ + string(RdbFrequencyOneTwoh), + string(RdbFrequencyOneh), + string(RdbFrequencySixh), + } +} + +func (s *RdbFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRdbFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRdbFrequency(input string) (*RdbFrequency, error) { + vals := map[string]RdbFrequency{ + "12h": RdbFrequencyOneTwoh, + "1h": RdbFrequencyOneh, + "6h": RdbFrequencySixh, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RdbFrequency(input) + return &out, nil +} + +type ResourceState string + +const ( + ResourceStateCreateFailed ResourceState = "CreateFailed" + ResourceStateCreating ResourceState = "Creating" + ResourceStateDeleteFailed ResourceState = "DeleteFailed" + ResourceStateDeleting ResourceState = "Deleting" + ResourceStateDisableFailed ResourceState = "DisableFailed" + ResourceStateDisabled ResourceState = "Disabled" + ResourceStateDisabling ResourceState = "Disabling" + ResourceStateEnableFailed ResourceState = "EnableFailed" + ResourceStateEnabling ResourceState = "Enabling" + ResourceStateRunning ResourceState = "Running" + ResourceStateScaling ResourceState = "Scaling" + ResourceStateScalingFailed ResourceState = "ScalingFailed" + ResourceStateUpdateFailed ResourceState = "UpdateFailed" + ResourceStateUpdating ResourceState = "Updating" +) + +func PossibleValuesForResourceState() []string { + return []string{ + string(ResourceStateCreateFailed), + string(ResourceStateCreating), + string(ResourceStateDeleteFailed), + string(ResourceStateDeleting), + string(ResourceStateDisableFailed), + string(ResourceStateDisabled), + string(ResourceStateDisabling), + string(ResourceStateEnableFailed), + string(ResourceStateEnabling), + string(ResourceStateRunning), + string(ResourceStateScaling), + string(ResourceStateScalingFailed), + string(ResourceStateUpdateFailed), + string(ResourceStateUpdating), + } +} + +func (s *ResourceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseResourceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseResourceState(input string) (*ResourceState, error) { + vals := map[string]ResourceState{ + "createfailed": ResourceStateCreateFailed, + "creating": ResourceStateCreating, + "deletefailed": ResourceStateDeleteFailed, + "deleting": ResourceStateDeleting, + "disablefailed": ResourceStateDisableFailed, + "disabled": ResourceStateDisabled, + "disabling": ResourceStateDisabling, + "enablefailed": ResourceStateEnableFailed, + "enabling": ResourceStateEnabling, + "running": ResourceStateRunning, + "scaling": ResourceStateScaling, + "scalingfailed": ResourceStateScalingFailed, + "updatefailed": ResourceStateUpdateFailed, + "updating": ResourceStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ResourceState(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameEnterpriseEFive SkuName = "Enterprise_E5" + SkuNameEnterpriseEFiveZero SkuName = "Enterprise_E50" + SkuNameEnterpriseEOne SkuName = "Enterprise_E1" + SkuNameEnterpriseEOneHundred SkuName = "Enterprise_E100" + SkuNameEnterpriseEOneZero SkuName = "Enterprise_E10" + SkuNameEnterpriseETwoZero SkuName = "Enterprise_E20" + SkuNameEnterpriseFlashFOneFiveHundred SkuName = "EnterpriseFlash_F1500" + SkuNameEnterpriseFlashFSevenHundred SkuName = "EnterpriseFlash_F700" + SkuNameEnterpriseFlashFThreeHundred SkuName = "EnterpriseFlash_F300" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameEnterpriseEFive), + string(SkuNameEnterpriseEFiveZero), + string(SkuNameEnterpriseEOne), + string(SkuNameEnterpriseEOneHundred), + string(SkuNameEnterpriseEOneZero), + string(SkuNameEnterpriseETwoZero), + string(SkuNameEnterpriseFlashFOneFiveHundred), + string(SkuNameEnterpriseFlashFSevenHundred), + string(SkuNameEnterpriseFlashFThreeHundred), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "enterprise_e5": SkuNameEnterpriseEFive, + "enterprise_e50": SkuNameEnterpriseEFiveZero, + "enterprise_e1": SkuNameEnterpriseEOne, + "enterprise_e100": SkuNameEnterpriseEOneHundred, + "enterprise_e10": SkuNameEnterpriseEOneZero, + "enterprise_e20": SkuNameEnterpriseETwoZero, + "enterpriseflash_f1500": SkuNameEnterpriseFlashFOneFiveHundred, + "enterpriseflash_f700": SkuNameEnterpriseFlashFSevenHundred, + "enterpriseflash_f300": SkuNameEnterpriseFlashFThreeHundred, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type TlsVersion string + +const ( + TlsVersionOnePointOne TlsVersion = "1.1" + TlsVersionOnePointTwo TlsVersion = "1.2" + TlsVersionOnePointZero TlsVersion = "1.0" +) + +func PossibleValuesForTlsVersion() []string { + return []string{ + string(TlsVersionOnePointOne), + string(TlsVersionOnePointTwo), + string(TlsVersionOnePointZero), + } +} + +func (s *TlsVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTlsVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTlsVersion(input string) (*TlsVersion, error) { + vals := map[string]TlsVersion{ + "1.1": TlsVersionOnePointOne, + "1.2": TlsVersionOnePointTwo, + "1.0": TlsVersionOnePointZero, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TlsVersion(input) + return &out, nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database.go new file mode 100644 index 00000000000..6c494474f0a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database.go @@ -0,0 +1,139 @@ +package redisenterprise + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&DatabaseId{}) +} + +var _ resourceids.ResourceId = &DatabaseId{} + +// DatabaseId is a struct representing the Resource ID for a Database +type DatabaseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string + DatabaseName string +} + +// NewDatabaseID returns a new DatabaseId struct +func NewDatabaseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string, databaseName string) DatabaseId { + return DatabaseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + DatabaseName: databaseName, + } +} + +// ParseDatabaseID parses 'input' into a DatabaseId +func ParseDatabaseID(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseDatabaseIDInsensitively parses 'input' case-insensitively into a DatabaseId +// note: this method should only be used for API response data and not user input +func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error) { + parser := resourceids.NewParserFromResourceIdType(&DatabaseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := DatabaseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *DatabaseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + if id.DatabaseName, ok = input.Parsed["databaseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "databaseName", input) + } + + return nil +} + +// ValidateDatabaseID checks that 'input' can be parsed as a Database ID +func ValidateDatabaseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseDatabaseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Database ID +func (id DatabaseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s/databases/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName, id.DatabaseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Database ID +func (id DatabaseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + resourceids.StaticSegment("staticDatabases", "databases", "databases"), + resourceids.UserSpecifiedSegment("databaseName", "databaseValue"), + } +} + +// String returns a human-readable description of this Database ID +func (id DatabaseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + fmt.Sprintf("Database Name: %q", id.DatabaseName), + } + return fmt.Sprintf("Database (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database_test.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database_test.go new file mode 100644 index 00000000000..2be7fd01045 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_database_test.go @@ -0,0 +1,327 @@ +package redisenterprise + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &DatabaseId{} + +func TestNewDatabaseID(t *testing.T) { + id := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } + + if id.DatabaseName != "databaseValue" { + t.Fatalf("Expected %q but got %q for Segment 'DatabaseName'", id.DatabaseName, "databaseValue") + } +} + +func TestFormatDatabaseID(t *testing.T) { + actual := NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue", "databaseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseDatabaseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + DatabaseName: "databaseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestParseDatabaseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *DatabaseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + DatabaseName: "databaseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/databases/databaseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs/dAtAbAsEvAlUe", + Expected: &DatabaseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + DatabaseName: "dAtAbAsEvAlUe", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/dAtAbAsEs/dAtAbAsEvAlUe/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseDatabaseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + if actual.DatabaseName != v.Expected.DatabaseName { + t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) + } + + } +} + +func TestSegmentsForDatabaseId(t *testing.T) { + segments := DatabaseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("DatabaseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise.go new file mode 100644 index 00000000000..22538d11370 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise.go @@ -0,0 +1,130 @@ +package redisenterprise + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&RedisEnterpriseId{}) +} + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +// RedisEnterpriseId is a struct representing the Resource ID for a Redis Enterprise +type RedisEnterpriseId struct { + SubscriptionId string + ResourceGroupName string + RedisEnterpriseName string +} + +// NewRedisEnterpriseID returns a new RedisEnterpriseId struct +func NewRedisEnterpriseID(subscriptionId string, resourceGroupName string, redisEnterpriseName string) RedisEnterpriseId { + return RedisEnterpriseId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + RedisEnterpriseName: redisEnterpriseName, + } +} + +// ParseRedisEnterpriseID parses 'input' into a RedisEnterpriseId +func ParseRedisEnterpriseID(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseRedisEnterpriseIDInsensitively parses 'input' case-insensitively into a RedisEnterpriseId +// note: this method should only be used for API response data and not user input +func ParseRedisEnterpriseIDInsensitively(input string) (*RedisEnterpriseId, error) { + parser := resourceids.NewParserFromResourceIdType(&RedisEnterpriseId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := RedisEnterpriseId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *RedisEnterpriseId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.RedisEnterpriseName, ok = input.Parsed["redisEnterpriseName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "redisEnterpriseName", input) + } + + return nil +} + +// ValidateRedisEnterpriseID checks that 'input' can be parsed as a Redis Enterprise ID +func ValidateRedisEnterpriseID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseRedisEnterpriseID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Redis Enterprise ID +func (id RedisEnterpriseId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Cache/redisEnterprise/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RedisEnterpriseName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Redis Enterprise ID +func (id RedisEnterpriseId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftCache", "Microsoft.Cache", "Microsoft.Cache"), + resourceids.StaticSegment("staticRedisEnterprise", "redisEnterprise", "redisEnterprise"), + resourceids.UserSpecifiedSegment("redisEnterpriseName", "redisEnterpriseValue"), + } +} + +// String returns a human-readable description of this Redis Enterprise ID +func (id RedisEnterpriseId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Redis Enterprise Name: %q", id.RedisEnterpriseName), + } + return fmt.Sprintf("Redis Enterprise (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise_test.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise_test.go new file mode 100644 index 00000000000..82eb7caaedb --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/id_redisenterprise_test.go @@ -0,0 +1,282 @@ +package redisenterprise + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &RedisEnterpriseId{} + +func TestNewRedisEnterpriseID(t *testing.T) { + id := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.RedisEnterpriseName != "redisEnterpriseValue" { + t.Fatalf("Expected %q but got %q for Segment 'RedisEnterpriseName'", id.RedisEnterpriseName, "redisEnterpriseValue") + } +} + +func TestFormatRedisEnterpriseID(t *testing.T) { + actual := NewRedisEnterpriseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "redisEnterpriseValue").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseRedisEnterpriseID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestParseRedisEnterpriseIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *RedisEnterpriseId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + RedisEnterpriseName: "redisEnterpriseValue", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Cache/redisEnterprise/redisEnterpriseValue/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE", + Expected: &RedisEnterpriseId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + RedisEnterpriseName: "rEdIsEnTeRpRiSeVaLuE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cAcHe/rEdIsEnTeRpRiSe/rEdIsEnTeRpRiSeVaLuE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseRedisEnterpriseIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.RedisEnterpriseName != v.Expected.RedisEnterpriseName { + t.Fatalf("Expected %q but got %q for RedisEnterpriseName", v.Expected.RedisEnterpriseName, actual.RedisEnterpriseName) + } + + } +} + +func TestSegmentsForRedisEnterpriseId(t *testing.T) { + segments := RedisEnterpriseId{}.Segments() + if len(segments) == 0 { + t.Fatalf("RedisEnterpriseId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_create.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_create.go new file mode 100644 index 00000000000..bc1b883cbbb --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_create.go @@ -0,0 +1,75 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Cluster +} + +// Create ... +func (c RedisEnterpriseClient) Create(ctx context.Context, id RedisEnterpriseId, input Cluster) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c RedisEnterpriseClient) CreateThenPoll(ctx context.Context, id RedisEnterpriseId, input Cluster) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasescreate.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasescreate.go new file mode 100644 index 00000000000..76933e8f063 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasescreate.go @@ -0,0 +1,75 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesCreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// DatabasesCreate ... +func (c RedisEnterpriseClient) DatabasesCreate(ctx context.Context, id DatabaseId, input Database) (result DatabasesCreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesCreateThenPoll performs DatabasesCreate then polls until it's completed +func (c RedisEnterpriseClient) DatabasesCreateThenPoll(ctx context.Context, id DatabaseId, input Database) error { + result, err := c.DatabasesCreate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesCreate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesCreate: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesdelete.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesdelete.go new file mode 100644 index 00000000000..a7961442781 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesdelete.go @@ -0,0 +1,71 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesDelete ... +func (c RedisEnterpriseClient) DatabasesDelete(ctx context.Context, id DatabaseId) (result DatabasesDeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesDeleteThenPoll performs DatabasesDelete then polls until it's completed +func (c RedisEnterpriseClient) DatabasesDeleteThenPoll(ctx context.Context, id DatabaseId) error { + result, err := c.DatabasesDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing DatabasesDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesDelete: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesexport.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesexport.go new file mode 100644 index 00000000000..8ce4d87e186 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesexport.go @@ -0,0 +1,74 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesExportOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesExport ... +func (c RedisEnterpriseClient) DatabasesExport(ctx context.Context, id DatabaseId, input ExportClusterParameters) (result DatabasesExportOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/export", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesExportThenPoll performs DatabasesExport then polls until it's completed +func (c RedisEnterpriseClient) DatabasesExportThenPoll(ctx context.Context, id DatabaseId, input ExportClusterParameters) error { + result, err := c.DatabasesExport(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesExport: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesExport: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesflush.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesflush.go new file mode 100644 index 00000000000..1a2453ebee2 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesflush.go @@ -0,0 +1,74 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesFlushOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesFlush ... +func (c RedisEnterpriseClient) DatabasesFlush(ctx context.Context, id DatabaseId, input FlushParameters) (result DatabasesFlushOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/flush", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesFlushThenPoll performs DatabasesFlush then polls until it's completed +func (c RedisEnterpriseClient) DatabasesFlushThenPoll(ctx context.Context, id DatabaseId, input FlushParameters) error { + result, err := c.DatabasesFlush(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesFlush: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesFlush: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforcelinktoreplicationgroup.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforcelinktoreplicationgroup.go new file mode 100644 index 00000000000..2a6994912d6 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforcelinktoreplicationgroup.go @@ -0,0 +1,73 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesForceLinkToReplicationGroupOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesForceLinkToReplicationGroup ... +func (c RedisEnterpriseClient) DatabasesForceLinkToReplicationGroup(ctx context.Context, id DatabaseId, input ForceLinkParameters) (result DatabasesForceLinkToReplicationGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceLinkToReplicationGroup", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesForceLinkToReplicationGroupThenPoll performs DatabasesForceLinkToReplicationGroup then polls until it's completed +func (c RedisEnterpriseClient) DatabasesForceLinkToReplicationGroupThenPoll(ctx context.Context, id DatabaseId, input ForceLinkParameters) error { + result, err := c.DatabasesForceLinkToReplicationGroup(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesForceLinkToReplicationGroup: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesForceLinkToReplicationGroup: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforceunlink.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforceunlink.go new file mode 100644 index 00000000000..1fc0801e823 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesforceunlink.go @@ -0,0 +1,74 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesForceUnlinkOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesForceUnlink ... +func (c RedisEnterpriseClient) DatabasesForceUnlink(ctx context.Context, id DatabaseId, input ForceUnlinkParameters) (result DatabasesForceUnlinkOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/forceUnlink", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesForceUnlinkThenPoll performs DatabasesForceUnlink then polls until it's completed +func (c RedisEnterpriseClient) DatabasesForceUnlinkThenPoll(ctx context.Context, id DatabaseId, input ForceUnlinkParameters) error { + result, err := c.DatabasesForceUnlink(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesForceUnlink: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesForceUnlink: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesget.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesget.go new file mode 100644 index 00000000000..f774a726917 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesget.go @@ -0,0 +1,53 @@ +package redisenterprise + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// DatabasesGet ... +func (c RedisEnterpriseClient) DatabasesGet(ctx context.Context, id DatabaseId) (result DatabasesGetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Database + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesimport.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesimport.go new file mode 100644 index 00000000000..08fff384eb6 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesimport.go @@ -0,0 +1,74 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesImportOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesImport ... +func (c RedisEnterpriseClient) DatabasesImport(ctx context.Context, id DatabaseId, input ImportClusterParameters) (result DatabasesImportOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/import", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesImportThenPoll performs DatabasesImport then polls until it's completed +func (c RedisEnterpriseClient) DatabasesImportThenPoll(ctx context.Context, id DatabaseId, input ImportClusterParameters) error { + result, err := c.DatabasesImport(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesImport: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesImport: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistbycluster.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistbycluster.go new file mode 100644 index 00000000000..b8af4ecf22a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistbycluster.go @@ -0,0 +1,105 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesListByClusterOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Database +} + +type DatabasesListByClusterCompleteResult struct { + LatestHttpResponse *http.Response + Items []Database +} + +type DatabasesListByClusterCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *DatabasesListByClusterCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// DatabasesListByCluster ... +func (c RedisEnterpriseClient) DatabasesListByCluster(ctx context.Context, id RedisEnterpriseId) (result DatabasesListByClusterOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &DatabasesListByClusterCustomPager{}, + Path: fmt.Sprintf("%s/databases", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Database `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// DatabasesListByClusterComplete retrieves all the results into a single object +func (c RedisEnterpriseClient) DatabasesListByClusterComplete(ctx context.Context, id RedisEnterpriseId) (DatabasesListByClusterCompleteResult, error) { + return c.DatabasesListByClusterCompleteMatchingPredicate(ctx, id, DatabaseOperationPredicate{}) +} + +// DatabasesListByClusterCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RedisEnterpriseClient) DatabasesListByClusterCompleteMatchingPredicate(ctx context.Context, id RedisEnterpriseId, predicate DatabaseOperationPredicate) (result DatabasesListByClusterCompleteResult, err error) { + items := make([]Database, 0) + + resp, err := c.DatabasesListByCluster(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = DatabasesListByClusterCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistkeys.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistkeys.go new file mode 100644 index 00000000000..0232e662380 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databaseslistkeys.go @@ -0,0 +1,54 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesListKeysOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AccessKeys +} + +// DatabasesListKeys ... +func (c RedisEnterpriseClient) DatabasesListKeys(ctx context.Context, id DatabaseId) (result DatabasesListKeysOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listKeys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model AccessKeys + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesregeneratekey.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesregeneratekey.go new file mode 100644 index 00000000000..62dc26cf6ea --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesregeneratekey.go @@ -0,0 +1,75 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesRegenerateKeyOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AccessKeys +} + +// DatabasesRegenerateKey ... +func (c RedisEnterpriseClient) DatabasesRegenerateKey(ctx context.Context, id DatabaseId, input RegenerateKeyParameters) (result DatabasesRegenerateKeyOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/regenerateKey", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesRegenerateKeyThenPoll performs DatabasesRegenerateKey then polls until it's completed +func (c RedisEnterpriseClient) DatabasesRegenerateKeyThenPoll(ctx context.Context, id DatabaseId, input RegenerateKeyParameters) error { + result, err := c.DatabasesRegenerateKey(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesRegenerateKey: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesRegenerateKey: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupdate.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupdate.go new file mode 100644 index 00000000000..2b0e7934d93 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupdate.go @@ -0,0 +1,75 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesUpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Database +} + +// DatabasesUpdate ... +func (c RedisEnterpriseClient) DatabasesUpdate(ctx context.Context, id DatabaseId, input DatabaseUpdate) (result DatabasesUpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesUpdateThenPoll performs DatabasesUpdate then polls until it's completed +func (c RedisEnterpriseClient) DatabasesUpdateThenPoll(ctx context.Context, id DatabaseId, input DatabaseUpdate) error { + result, err := c.DatabasesUpdate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing DatabasesUpdate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesUpdate: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go new file mode 100644 index 00000000000..5c3e29659ac --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_databasesupgradedbredisversion.go @@ -0,0 +1,69 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasesUpgradeDBRedisVersionOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// DatabasesUpgradeDBRedisVersion ... +func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersion(ctx context.Context, id DatabaseId) (result DatabasesUpgradeDBRedisVersionOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/upgradeDBRedisVersion", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DatabasesUpgradeDBRedisVersionThenPoll performs DatabasesUpgradeDBRedisVersion then polls until it's completed +func (c RedisEnterpriseClient) DatabasesUpgradeDBRedisVersionThenPoll(ctx context.Context, id DatabaseId) error { + result, err := c.DatabasesUpgradeDBRedisVersion(ctx, id) + if err != nil { + return fmt.Errorf("performing DatabasesUpgradeDBRedisVersion: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after DatabasesUpgradeDBRedisVersion: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_delete.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_delete.go new file mode 100644 index 00000000000..d15634da2c0 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_delete.go @@ -0,0 +1,71 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c RedisEnterpriseClient) Delete(ctx context.Context, id RedisEnterpriseId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// DeleteThenPoll performs Delete then polls until it's completed +func (c RedisEnterpriseClient) DeleteThenPoll(ctx context.Context, id RedisEnterpriseId) error { + result, err := c.Delete(ctx, id) + if err != nil { + return fmt.Errorf("performing Delete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Delete: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_get.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_get.go new file mode 100644 index 00000000000..c729b30e660 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_get.go @@ -0,0 +1,53 @@ +package redisenterprise + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Cluster +} + +// Get ... +func (c RedisEnterpriseClient) Get(ctx context.Context, id RedisEnterpriseId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model Cluster + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_list.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_list.go new file mode 100644 index 00000000000..b3062bf1802 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_list.go @@ -0,0 +1,106 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Cluster +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []Cluster +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c RedisEnterpriseClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Cache/redisEnterprise", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Cluster `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c RedisEnterpriseClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RedisEnterpriseClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Cluster, 0) + + resp, err := c.List(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_listbyresourcegroup.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_listbyresourcegroup.go new file mode 100644 index 00000000000..181676b5089 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_listbyresourcegroup.go @@ -0,0 +1,106 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Cluster +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []Cluster +} + +type ListByResourceGroupCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// ListByResourceGroup ... +func (c RedisEnterpriseClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListByResourceGroupCustomPager{}, + Path: fmt.Sprintf("%s/providers/Microsoft.Cache/redisEnterprise", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Cluster `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c RedisEnterpriseClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c RedisEnterpriseClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]Cluster, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_update.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_update.go new file mode 100644 index 00000000000..e23cde29632 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/method_update.go @@ -0,0 +1,75 @@ +package redisenterprise + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Cluster +} + +// Update ... +func (c RedisEnterpriseClient) Update(ctx context.Context, id RedisEnterpriseId, input ClusterUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c RedisEnterpriseClient) UpdateThenPoll(ctx context.Context, id RedisEnterpriseId, input ClusterUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_accesskeys.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_accesskeys.go new file mode 100644 index 00000000000..79566de711f --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_accesskeys.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessKeys struct { + PrimaryKey *string `json:"primaryKey,omitempty"` + SecondaryKey *string `json:"secondaryKey,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_cluster.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_cluster.go new file mode 100644 index 00000000000..26b12398e06 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_cluster.go @@ -0,0 +1,21 @@ +package redisenterprise + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Cluster struct { + Id *string `json:"id,omitempty"` + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ClusterProperties `json:"properties,omitempty"` + Sku Sku `json:"sku"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterproperties.go new file mode 100644 index 00000000000..b31d8d3a387 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterproperties.go @@ -0,0 +1,14 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterProperties struct { + Encryption *ClusterPropertiesEncryption `json:"encryption,omitempty"` + HostName *string `json:"hostName,omitempty"` + MinimumTlsVersion *TlsVersion `json:"minimumTlsVersion,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RedisVersion *string `json:"redisVersion,omitempty"` + ResourceState *ResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryption.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryption.go new file mode 100644 index 00000000000..253b894977f --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryption.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterPropertiesEncryption struct { + CustomerManagedKeyEncryption *ClusterPropertiesEncryptionCustomerManagedKeyEncryption `json:"customerManagedKeyEncryption,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go new file mode 100644 index 00000000000..fb4cf04d887 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryption.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterPropertiesEncryptionCustomerManagedKeyEncryption struct { + KeyEncryptionKeyIdentity *ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyEncryptionKeyIdentity `json:"keyEncryptionKeyIdentity,omitempty"` + KeyEncryptionKeyUrl *string `json:"keyEncryptionKeyUrl,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go new file mode 100644 index 00000000000..e99632be68c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterpropertiesencryptioncustomermanagedkeyencryptionkeyencryptionkeyidentity.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyEncryptionKeyIdentity struct { + IdentityType *CmkIdentityType `json:"identityType,omitempty"` + UserAssignedIdentityResourceId *string `json:"userAssignedIdentityResourceId,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterupdate.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterupdate.go new file mode 100644 index 00000000000..b5489a543df --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_clusterupdate.go @@ -0,0 +1,15 @@ +package redisenterprise + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterUpdate struct { + Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` + Properties *ClusterProperties `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_database.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_database.go new file mode 100644 index 00000000000..dd20d0b355a --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_database.go @@ -0,0 +1,11 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Database struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *DatabaseProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go new file mode 100644 index 00000000000..2b5cfe11a8b --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseproperties.go @@ -0,0 +1,18 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseProperties struct { + ClientProtocol *Protocol `json:"clientProtocol,omitempty"` + ClusteringPolicy *ClusteringPolicy `json:"clusteringPolicy,omitempty"` + DeferUpgrade *DeferUpgradeSetting `json:"deferUpgrade,omitempty"` + EvictionPolicy *EvictionPolicy `json:"evictionPolicy,omitempty"` + GeoReplication *DatabasePropertiesGeoReplication `json:"geoReplication,omitempty"` + Modules *[]Module `json:"modules,omitempty"` + Persistence *Persistence `json:"persistence,omitempty"` + Port *int64 `json:"port,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + RedisVersion *string `json:"redisVersion,omitempty"` + ResourceState *ResourceState `json:"resourceState,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databasepropertiesgeoreplication.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databasepropertiesgeoreplication.go new file mode 100644 index 00000000000..3244185bf85 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databasepropertiesgeoreplication.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabasePropertiesGeoReplication struct { + GroupNickname *string `json:"groupNickname,omitempty"` + LinkedDatabases *[]LinkedDatabase `json:"linkedDatabases,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseupdate.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseupdate.go new file mode 100644 index 00000000000..aff0488e608 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_databaseupdate.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabaseUpdate struct { + Properties *DatabaseProperties `json:"properties,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_exportclusterparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_exportclusterparameters.go new file mode 100644 index 00000000000..d6ba54aa230 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_exportclusterparameters.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportClusterParameters struct { + SasUri string `json:"sasUri"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_flushparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_flushparameters.go new file mode 100644 index 00000000000..9d3358ea741 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_flushparameters.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlushParameters struct { + Ids *[]string `json:"ids,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go new file mode 100644 index 00000000000..32ca00618d3 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forcelinkparameters.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceLinkParameters struct { + GroupNickname string `json:"groupNickname"` + LinkedDatabases []LinkedDatabase `json:"linkedDatabases"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forceunlinkparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forceunlinkparameters.go new file mode 100644 index 00000000000..7bf82a13709 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_forceunlinkparameters.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForceUnlinkParameters struct { + Ids []string `json:"ids"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_importclusterparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_importclusterparameters.go new file mode 100644 index 00000000000..11e13cd4dc4 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_importclusterparameters.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImportClusterParameters struct { + SasUris []string `json:"sasUris"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_linkeddatabase.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_linkeddatabase.go new file mode 100644 index 00000000000..02abc0422ce --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_linkeddatabase.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedDatabase struct { + Id *string `json:"id,omitempty"` + State *LinkState `json:"state,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_module.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_module.go new file mode 100644 index 00000000000..99bd8473a0f --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_module.go @@ -0,0 +1,10 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Module struct { + Args *string `json:"args,omitempty"` + Name string `json:"name"` + Version *string `json:"version,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_persistence.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_persistence.go new file mode 100644 index 00000000000..3b7b30f2fb9 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_persistence.go @@ -0,0 +1,11 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Persistence struct { + AofEnabled *bool `json:"aofEnabled,omitempty"` + AofFrequency *AofFrequency `json:"aofFrequency,omitempty"` + RdbEnabled *bool `json:"rdbEnabled,omitempty"` + RdbFrequency *RdbFrequency `json:"rdbFrequency,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpoint.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpoint.go new file mode 100644 index 00000000000..e15699fe1d1 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpoint.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnection.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnection.go new file mode 100644 index 00000000000..5da2f77534d --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnection.go @@ -0,0 +1,11 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnectionproperties.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnectionproperties.go new file mode 100644 index 00000000000..9ebfbe2d3c2 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privateendpointconnectionproperties.go @@ -0,0 +1,10 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privatelinkserviceconnectionstate.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privatelinkserviceconnectionstate.go new file mode 100644 index 00000000000..abb658aee84 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_regeneratekeyparameters.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_regeneratekeyparameters.go new file mode 100644 index 00000000000..2d44026dd91 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_regeneratekeyparameters.go @@ -0,0 +1,8 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RegenerateKeyParameters struct { + KeyType AccessKeyType `json:"keyType"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_sku.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_sku.go new file mode 100644 index 00000000000..740c3615e0c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/model_sku.go @@ -0,0 +1,9 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Capacity *int64 `json:"capacity,omitempty"` + Name SkuName `json:"name"` +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/predicates.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/predicates.go new file mode 100644 index 00000000000..d240cbf7181 --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/predicates.go @@ -0,0 +1,55 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ClusterOperationPredicate struct { + Id *string + Location *string + Name *string + Type *string +} + +func (p ClusterOperationPredicate) Matches(input Cluster) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && *p.Location != input.Location { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} + +type DatabaseOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p DatabaseOperationPredicate) Matches(input Database) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go new file mode 100644 index 00000000000..d9e44a1872c --- /dev/null +++ b/resource-manager/redisenterprise/2024-06-01-preview/redisenterprise/version.go @@ -0,0 +1,10 @@ +package redisenterprise + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-06-01-preview" + +func userAgent() string { + return "hashicorp/go-azure-sdk/redisenterprise/2024-06-01-preview" +} diff --git a/resource-manager/relay/2021-11-01/hybridconnections/README.md b/resource-manager/relay/2021-11-01/hybridconnections/README.md index 34aeef7f3d4..62bf6b8f4f6 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/README.md +++ b/resource-manager/relay/2021-11-01/hybridconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections` Documentation -The `hybridconnections` SDK allows for interaction with the Azure Resource Manager Service `relay` (API Version `2021-11-01`). +The `hybridconnections` SDK allows for interaction with Azure Resource Manager `relay` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/relay/2021-11-01/hybridconnections/client.go b/resource-manager/relay/2021-11-01/hybridconnections/client.go index cf4c48f305e..fa855766a64 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/client.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/client.go @@ -15,7 +15,7 @@ type HybridConnectionsClient struct { } func NewHybridConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hybridconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hybridconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HybridConnectionsClient: %+v", err) } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go b/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go index 572ab83aab6..1607f53b60d 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnection.go @@ -44,7 +44,7 @@ func ParseHybridConnectionID(input string) (*HybridConnectionId, error) { } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, er } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go b/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go index 88f8b42f503..e1d90f9f50d 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/id_hybridconnectionauthorizationrule.go @@ -46,7 +46,7 @@ func ParseHybridConnectionAuthorizationRuleID(input string) (*HybridConnectionAu } id := HybridConnectionAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridConnectionAuthorizationRuleIDInsensitively(input string) (*Hybri } id := HybridConnectionAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go b/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go index ca80c5c7baa..ef3e1b21f50 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdate.go b/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdate.go index 9066f52896b..a96eb1e7459 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdate.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdate.go @@ -49,7 +49,6 @@ func (c HybridConnectionsClient) CreateOrUpdate(ctx context.Context, id HybridCo var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdateauthorizationrule.go b/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdateauthorizationrule.go index f801bca5655..26736b25e7f 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdateauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_createorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c HybridConnectionsClient) CreateOrUpdateAuthorizationRule(ctx context.Con var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_get.go b/resource-manager/relay/2021-11-01/hybridconnections/method_get.go index 83f4d44834b..8012e4df72a 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_get.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_get.go @@ -45,7 +45,6 @@ func (c HybridConnectionsClient) Get(ctx context.Context, id HybridConnectionId) var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_getauthorizationrule.go b/resource-manager/relay/2021-11-01/hybridconnections/method_getauthorizationrule.go index e205c3ac3f7..1a922429dbf 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_getauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c HybridConnectionsClient) GetAuthorizationRule(ctx context.Context, id Hy var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_listkeys.go b/resource-manager/relay/2021-11-01/hybridconnections/method_listkeys.go index 78969ae5427..7b12b1eedf0 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_listkeys.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_listkeys.go @@ -46,7 +46,6 @@ func (c HybridConnectionsClient) ListKeys(ctx context.Context, id HybridConnecti var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/method_regeneratekeys.go b/resource-manager/relay/2021-11-01/hybridconnections/method_regeneratekeys.go index 144d5849a70..2f13448332f 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/method_regeneratekeys.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c HybridConnectionsClient) RegenerateKeys(ctx context.Context, id HybridCo var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/hybridconnections/version.go b/resource-manager/relay/2021-11-01/hybridconnections/version.go index 40eef020c14..60ce9f1b2cb 100644 --- a/resource-manager/relay/2021-11-01/hybridconnections/version.go +++ b/resource-manager/relay/2021-11-01/hybridconnections/version.go @@ -1,12 +1,10 @@ package hybridconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hybridconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hybridconnections/2021-11-01" } diff --git a/resource-manager/relay/2021-11-01/namespaces/README.md b/resource-manager/relay/2021-11-01/namespaces/README.md index 9f3e21f35f7..9c0de8a6897 100644 --- a/resource-manager/relay/2021-11-01/namespaces/README.md +++ b/resource-manager/relay/2021-11-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `relay` (API Version `2021-11-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `relay` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/relay/2021-11-01/namespaces/client.go b/resource-manager/relay/2021-11-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/relay/2021-11-01/namespaces/client.go +++ b/resource-manager/relay/2021-11-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go b/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go index 5b3002acc67..f62c30a0bad 100644 --- a/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go +++ b/resource-manager/relay/2021-11-01/namespaces/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespaces/id_namespace.go b/resource-manager/relay/2021-11-01/namespaces/id_namespace.go index 174a64b13df..611c1b10b23 100644 --- a/resource-manager/relay/2021-11-01/namespaces/id_namespace.go +++ b/resource-manager/relay/2021-11-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_checknameavailability.go b/resource-manager/relay/2021-11-01/namespaces/method_checknameavailability.go index 8d956188f66..1a21e5e8668 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_checknameavailability.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_createorupdateauthorizationrule.go b/resource-manager/relay/2021-11-01/namespaces/method_createorupdateauthorizationrule.go index 5b872f08a48..3dfa9a99c88 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_createorupdateauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_createorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, i var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_createorupdatenetworkruleset.go b/resource-manager/relay/2021-11-01/namespaces/method_createorupdatenetworkruleset.go index e76e779ef82..6d1b6343858 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_createorupdatenetworkruleset.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_createorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, id N var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_get.go b/resource-manager/relay/2021-11-01/namespaces/method_get.go index 5dee9054be9..2ab88eeeea1 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_get.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model RelayNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_getauthorizationrule.go b/resource-manager/relay/2021-11-01/namespaces/method_getauthorizationrule.go index a8aa66ae405..c632970d192 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_getauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesClient) GetAuthorizationRule(ctx context.Context, id Authoriza var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_getnetworkruleset.go b/resource-manager/relay/2021-11-01/namespaces/method_getnetworkruleset.go index f6767e352f1..373b726a418 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_getnetworkruleset.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_getnetworkruleset.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetNetworkRuleSet(ctx context.Context, id NamespaceId) var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_listkeys.go b/resource-manager/relay/2021-11-01/namespaces/method_listkeys.go index 4251f7033ed..41656345734 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_listkeys.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_listkeys.go @@ -46,7 +46,6 @@ func (c NamespacesClient) ListKeys(ctx context.Context, id AuthorizationRuleId) var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_regeneratekeys.go b/resource-manager/relay/2021-11-01/namespaces/method_regeneratekeys.go index ba6dcccdcef..d71dd4c1e39 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_regeneratekeys.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesClient) RegenerateKeys(ctx context.Context, id AuthorizationRu var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/method_update.go b/resource-manager/relay/2021-11-01/namespaces/method_update.go index c894c5341c8..6808c7c3667 100644 --- a/resource-manager/relay/2021-11-01/namespaces/method_update.go +++ b/resource-manager/relay/2021-11-01/namespaces/method_update.go @@ -50,7 +50,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input Rela var model RelayNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespaces/version.go b/resource-manager/relay/2021-11-01/namespaces/version.go index e7fef9f37bd..6851872c2b7 100644 --- a/resource-manager/relay/2021-11-01/namespaces/version.go +++ b/resource-manager/relay/2021-11-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2021-11-01" } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/README.md b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/README.md index 1d908ad33c9..af2b6f4ba91 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/README.md +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `relay` (API Version `2021-11-01`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `relay` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/client.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/client.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_namespace.go index d9e45cf1f17..4accb3d7c4e 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go index e219cf9ae15..63e45cd0677 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/version.go b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/version.go index 334ca51e706..b5579ecd7a9 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/version.go +++ b/resource-manager/relay/2021-11-01/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2021-11-01" } diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/README.md b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/README.md index b9b21a54eaa..78637be5ce0 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/README.md +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `relay` (API Version `2021-11-01`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `relay` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/client.go b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/client.go +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_namespace.go b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_namespace.go index 52fbe14e678..d73e3a8b622 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_privatelinkresource.go b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_privatelinkresource.go index 8122d64cd79..5214f973fd2 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_privatelinkresource.go +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/method_privatelinkresourcesget.go b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/method_privatelinkresourcesget.go index 4cef9f3289f..7dca2c56d72 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/method_privatelinkresourcesget.go +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/method_privatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateLinkResourcesClient) PrivateLinkResourcesGet(ctx contex var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/version.go b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/version.go index 6370c521bfa..71b933e4665 100644 --- a/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/version.go +++ b/resource-manager/relay/2021-11-01/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2021-11-01" } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/README.md b/resource-manager/relay/2021-11-01/wcfrelays/README.md index f77ba4c9d7d..aa93c74e118 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/README.md +++ b/resource-manager/relay/2021-11-01/wcfrelays/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/wcfrelays` Documentation -The `wcfrelays` SDK allows for interaction with the Azure Resource Manager Service `relay` (API Version `2021-11-01`). +The `wcfrelays` SDK allows for interaction with Azure Resource Manager `relay` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/relay/2021-11-01/wcfrelays/client.go b/resource-manager/relay/2021-11-01/wcfrelays/client.go index 8df9d9f0def..4736c7cc935 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/client.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/client.go @@ -15,7 +15,7 @@ type WCFRelaysClient struct { } func NewWCFRelaysClientWithBaseURI(sdkApi sdkEnv.Api) (*WCFRelaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "wcfrelays", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "wcfrelays", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WCFRelaysClient: %+v", err) } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/id_namespace.go b/resource-manager/relay/2021-11-01/wcfrelays/id_namespace.go index 486b615ce49..61cfa17725c 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/id_namespace.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelay.go b/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelay.go index 7f51983a225..ce13ecc242f 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelay.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelay.go @@ -44,7 +44,7 @@ func ParseWcfRelayID(input string) (*WcfRelayId, error) { } id := WcfRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWcfRelayIDInsensitively(input string) (*WcfRelayId, error) { } id := WcfRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelayauthorizationrule.go b/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelayauthorizationrule.go index c9385d703dc..10e8668f8e6 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelayauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/id_wcfrelayauthorizationrule.go @@ -46,7 +46,7 @@ func ParseWcfRelayAuthorizationRuleID(input string) (*WcfRelayAuthorizationRuleI } id := WcfRelayAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWcfRelayAuthorizationRuleIDInsensitively(input string) (*WcfRelayAutho } id := WcfRelayAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdate.go b/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdate.go index 77579db7b9c..ae10a8cc76a 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdate.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdate.go @@ -49,7 +49,6 @@ func (c WCFRelaysClient) CreateOrUpdate(ctx context.Context, id WcfRelayId, inpu var model WcfRelay result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdateauthorizationrule.go b/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdateauthorizationrule.go index 8a980122a85..0deeee440bf 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdateauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_createorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c WCFRelaysClient) CreateOrUpdateAuthorizationRule(ctx context.Context, id var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_get.go b/resource-manager/relay/2021-11-01/wcfrelays/method_get.go index dc7b69bc9d0..0ba8f47902a 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_get.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_get.go @@ -46,7 +46,6 @@ func (c WCFRelaysClient) Get(ctx context.Context, id WcfRelayId) (result GetOper var model WcfRelay result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_getauthorizationrule.go b/resource-manager/relay/2021-11-01/wcfrelays/method_getauthorizationrule.go index 99c87d4d3bf..8bdcce2740b 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_getauthorizationrule.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c WCFRelaysClient) GetAuthorizationRule(ctx context.Context, id WcfRelayAu var model AuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_listkeys.go b/resource-manager/relay/2021-11-01/wcfrelays/method_listkeys.go index 375d12778ef..fe9cc064c79 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_listkeys.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_listkeys.go @@ -46,7 +46,6 @@ func (c WCFRelaysClient) ListKeys(ctx context.Context, id WcfRelayAuthorizationR var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/method_regeneratekeys.go b/resource-manager/relay/2021-11-01/wcfrelays/method_regeneratekeys.go index a550f1ec41f..d7afd8fb625 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/method_regeneratekeys.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/method_regeneratekeys.go @@ -50,7 +50,6 @@ func (c WCFRelaysClient) RegenerateKeys(ctx context.Context, id WcfRelayAuthoriz var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/relay/2021-11-01/wcfrelays/version.go b/resource-manager/relay/2021-11-01/wcfrelays/version.go index 12224c650cf..90e5d9a35f2 100644 --- a/resource-manager/relay/2021-11-01/wcfrelays/version.go +++ b/resource-manager/relay/2021-11-01/wcfrelays/version.go @@ -1,12 +1,10 @@ package wcfrelays -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/wcfrelays/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/wcfrelays/2021-11-01" } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/README.md b/resource-manager/resourceconnector/2022-10-27/appliances/README.md index ff4df4e9187..7e43c305394 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/README.md +++ b/resource-manager/resourceconnector/2022-10-27/appliances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances` Documentation -The `appliances` SDK allows for interaction with the Azure Resource Manager Service `resourceconnector` (API Version `2022-10-27`). +The `appliances` SDK allows for interaction with Azure Resource Manager `resourceconnector` (API Version `2022-10-27`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/client.go b/resource-manager/resourceconnector/2022-10-27/appliances/client.go index c909b4585ec..257bdf6605d 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/client.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/client.go @@ -15,7 +15,7 @@ type AppliancesClient struct { } func NewAppliancesClientWithBaseURI(sdkApi sdkEnv.Api) (*AppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appliances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appliances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppliancesClient: %+v", err) } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go b/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go index 105bcbd091b..fc221513059 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/id_appliance.go @@ -42,7 +42,7 @@ func ParseApplianceID(input string) (*ApplianceId, error) { } id := ApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseApplianceIDInsensitively(input string) (*ApplianceId, error) { } id := ApplianceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go b/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go index 31631a9f15b..5705ac3ed7b 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/id_upgradegraph.go @@ -44,7 +44,7 @@ func ParseUpgradeGraphID(input string) (*UpgradeGraphId, error) { } id := UpgradeGraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUpgradeGraphIDInsensitively(input string) (*UpgradeGraphId, error) { } id := UpgradeGraphId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_get.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_get.go index 29d716c971a..1d868824148 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_get.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_get.go @@ -45,7 +45,6 @@ func (c AppliancesClient) Get(ctx context.Context, id ApplianceId) (result GetOp var model Appliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_gettelemetryconfig.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_gettelemetryconfig.go index ec3e6082dca..1a9dea14355 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_gettelemetryconfig.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_gettelemetryconfig.go @@ -47,7 +47,6 @@ func (c AppliancesClient) GetTelemetryConfig(ctx context.Context, id commonids.S var model ApplianceGetTelemetryConfigResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_getupgradegraph.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_getupgradegraph.go index 5d45f1e8cf6..2630c7ad98c 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_getupgradegraph.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_getupgradegraph.go @@ -45,7 +45,6 @@ func (c AppliancesClient) GetUpgradeGraph(ctx context.Context, id UpgradeGraphId var model UpgradeGraph result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_listclusterusercredential.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_listclusterusercredential.go index c696ee10987..acfe2462094 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_listclusterusercredential.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_listclusterusercredential.go @@ -46,7 +46,6 @@ func (c AppliancesClient) ListClusterUserCredential(ctx context.Context, id Appl var model ApplianceListCredentialResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go index 17f89911fc6..106e84490bb 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_listkeys.go @@ -34,6 +34,7 @@ func (o ListKeysOperationOptions) ToHeaders() *client.Headers { func (o ListKeysOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AppliancesClient) ListKeys(ctx context.Context, id ApplianceId, options var model ApplianceListKeysResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/method_update.go b/resource-manager/resourceconnector/2022-10-27/appliances/method_update.go index f1ca158425d..d2650fd04a9 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/method_update.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/method_update.go @@ -49,7 +49,6 @@ func (c AppliancesClient) Update(ctx context.Context, id ApplianceId, input Patc var model Appliance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourceconnector/2022-10-27/appliances/version.go b/resource-manager/resourceconnector/2022-10-27/appliances/version.go index d8fc28f3da5..1491a93bb3b 100644 --- a/resource-manager/resourceconnector/2022-10-27/appliances/version.go +++ b/resource-manager/resourceconnector/2022-10-27/appliances/version.go @@ -1,12 +1,10 @@ package appliances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-27" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appliances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appliances/2022-10-27" } diff --git a/resource-manager/resourcegraph/2022-10-01/graphqueries/README.md b/resource-manager/resourcegraph/2022-10-01/graphqueries/README.md index 0037f960920..861bbd8a14f 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphqueries/README.md +++ b/resource-manager/resourcegraph/2022-10-01/graphqueries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2022-10-01/graphqueries` Documentation -The `graphqueries` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2022-10-01`). +The `graphqueries` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2022-10-01/graphqueries/client.go b/resource-manager/resourcegraph/2022-10-01/graphqueries/client.go index abb8cfe8a63..21911e607d1 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphqueries/client.go +++ b/resource-manager/resourcegraph/2022-10-01/graphqueries/client.go @@ -15,7 +15,7 @@ type GraphqueriesClient struct { } func NewGraphqueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphqueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqueries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqueries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphqueriesClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2022-10-01/graphqueries/id_query.go b/resource-manager/resourcegraph/2022-10-01/graphqueries/id_query.go index 0dddb36f499..eb6c5e5c84c 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphqueries/id_query.go +++ b/resource-manager/resourcegraph/2022-10-01/graphqueries/id_query.go @@ -42,7 +42,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourcegraph/2022-10-01/graphqueries/method_graphqueryupdate.go b/resource-manager/resourcegraph/2022-10-01/graphqueries/method_graphqueryupdate.go index 15ac73db65b..103603d9aa0 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphqueries/method_graphqueryupdate.go +++ b/resource-manager/resourcegraph/2022-10-01/graphqueries/method_graphqueryupdate.go @@ -49,7 +49,6 @@ func (c GraphqueriesClient) GraphQueryUpdate(ctx context.Context, id QueryId, in var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2022-10-01/graphqueries/version.go b/resource-manager/resourcegraph/2022-10-01/graphqueries/version.go index 86555301243..3cf450d37e0 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphqueries/version.go +++ b/resource-manager/resourcegraph/2022-10-01/graphqueries/version.go @@ -1,12 +1,10 @@ package graphqueries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqueries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqueries/2022-10-01" } diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/README.md b/resource-manager/resourcegraph/2022-10-01/graphquery/README.md index 7dd4b78dec2..293e468c7f7 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/README.md +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2022-10-01/graphquery` Documentation -The `graphquery` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2022-10-01`). +The `graphquery` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/client.go b/resource-manager/resourcegraph/2022-10-01/graphquery/client.go index e0de67d9b54..7c1a2e9befc 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/client.go +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/client.go @@ -15,7 +15,7 @@ type GraphQueryClient struct { } func NewGraphQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphquery", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphquery", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQueryClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/id_query.go b/resource-manager/resourcegraph/2022-10-01/graphquery/id_query.go index 7a92730bd20..bb3e94ab8c7 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/id_query.go +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/id_query.go @@ -42,7 +42,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/method_createorupdate.go b/resource-manager/resourcegraph/2022-10-01/graphquery/method_createorupdate.go index fc2c2ae32e0..9dee5a55da1 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/method_createorupdate.go +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GraphQueryClient) CreateOrUpdate(ctx context.Context, id QueryId, input var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/method_get.go b/resource-manager/resourcegraph/2022-10-01/graphquery/method_get.go index d44bae108f4..a02431f1245 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/method_get.go +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/method_get.go @@ -45,7 +45,6 @@ func (c GraphQueryClient) Get(ctx context.Context, id QueryId) (result GetOperat var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2022-10-01/graphquery/version.go b/resource-manager/resourcegraph/2022-10-01/graphquery/version.go index 4c5fe474853..8fa0a293748 100644 --- a/resource-manager/resourcegraph/2022-10-01/graphquery/version.go +++ b/resource-manager/resourcegraph/2022-10-01/graphquery/version.go @@ -1,12 +1,10 @@ package graphquery -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphquery/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphquery/2022-10-01" } diff --git a/resource-manager/resourcegraph/2022-10-01/resources/README.md b/resource-manager/resourcegraph/2022-10-01/resources/README.md index 61736a68055..5bb21511ac0 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/README.md +++ b/resource-manager/resourcegraph/2022-10-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2022-10-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2022-10-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2022-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2022-10-01/resources/client.go b/resource-manager/resourcegraph/2022-10-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/client.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2022-10-01/resources/method_resources.go b/resource-manager/resourcegraph/2022-10-01/resources/method_resources.go index e8aa01c33f1..ef80b667035 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/method_resources.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/method_resources.go @@ -49,7 +49,6 @@ func (c ResourcesClient) Resources(ctx context.Context, input QueryRequest) (res var model QueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2022-10-01/resources/model_facet.go b/resource-manager/resourcegraph/2022-10-01/resources/model_facet.go index 400245e6e88..1de60156520 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/model_facet.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/model_facet.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Facet interface { + Facet() BaseFacetImpl } -// RawFacetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Facet = BaseFacetImpl{} + +type BaseFacetImpl struct { + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s BaseFacetImpl) Facet() BaseFacetImpl { + return s +} + +var _ Facet = RawFacetImpl{} + +// RawFacetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFacetImpl struct { + facet BaseFacetImpl Type string Values map[string]interface{} } -func unmarshalFacetImplementation(input []byte) (Facet, error) { +func (s RawFacetImpl) Facet() BaseFacetImpl { + return s.facet +} + +func UnmarshalFacetImplementation(input []byte) (Facet, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalFacetImplementation(input []byte) (Facet, error) { return out, nil } - out := RawFacetImpl{ + var parent BaseFacetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFacetImpl: %+v", err) + } + + return RawFacetImpl{ + facet: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/resourcegraph/2022-10-01/resources/model_faceterror.go b/resource-manager/resourcegraph/2022-10-01/resources/model_faceterror.go index d42849db811..05bad62811c 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/model_faceterror.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/model_faceterror.go @@ -14,7 +14,16 @@ type FacetError struct { Errors []ErrorDetails `json:"errors"` // Fields inherited from Facet + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s FacetError) Facet() BaseFacetImpl { + return BaseFacetImpl{ + Expression: s.Expression, + ResultType: s.ResultType, + } } var _ json.Marshaler = FacetError{} @@ -28,9 +37,10 @@ func (s FacetError) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FacetError: %+v", err) } + decoded["resultType"] = "FacetError" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resourcegraph/2022-10-01/resources/model_facetresult.go b/resource-manager/resourcegraph/2022-10-01/resources/model_facetresult.go index 4d4de98136b..09fbdbb811d 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/model_facetresult.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/model_facetresult.go @@ -16,7 +16,16 @@ type FacetResult struct { TotalRecords int64 `json:"totalRecords"` // Fields inherited from Facet + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s FacetResult) Facet() BaseFacetImpl { + return BaseFacetImpl{ + Expression: s.Expression, + ResultType: s.ResultType, + } } var _ json.Marshaler = FacetResult{} @@ -30,9 +39,10 @@ func (s FacetResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FacetResult: %+v", err) } + decoded["resultType"] = "FacetResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resourcegraph/2022-10-01/resources/model_queryresponse.go b/resource-manager/resourcegraph/2022-10-01/resources/model_queryresponse.go index f4847c43b38..497821bb4be 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/model_queryresponse.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/model_queryresponse.go @@ -45,7 +45,7 @@ func (s *QueryResponse) UnmarshalJSON(bytes []byte) error { output := make([]Facet, 0) for i, val := range listTemp { - impl, err := unmarshalFacetImplementation(val) + impl, err := UnmarshalFacetImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Facets' for 'QueryResponse': %+v", i, err) } diff --git a/resource-manager/resourcegraph/2022-10-01/resources/version.go b/resource-manager/resourcegraph/2022-10-01/resources/version.go index 689203a7b63..8c6aee09e2d 100644 --- a/resource-manager/resourcegraph/2022-10-01/resources/version.go +++ b/resource-manager/resourcegraph/2022-10-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2022-10-01" } diff --git a/resource-manager/resourcegraph/2024-04-01/graphqueries/README.md b/resource-manager/resourcegraph/2024-04-01/graphqueries/README.md index 34fa9fcba77..e9e19c0b61d 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphqueries/README.md +++ b/resource-manager/resourcegraph/2024-04-01/graphqueries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2024-04-01/graphqueries` Documentation -The `graphqueries` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2024-04-01`). +The `graphqueries` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2024-04-01/graphqueries/client.go b/resource-manager/resourcegraph/2024-04-01/graphqueries/client.go index abb8cfe8a63..21911e607d1 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphqueries/client.go +++ b/resource-manager/resourcegraph/2024-04-01/graphqueries/client.go @@ -15,7 +15,7 @@ type GraphqueriesClient struct { } func NewGraphqueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphqueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphqueries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphqueries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphqueriesClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2024-04-01/graphqueries/id_query.go b/resource-manager/resourcegraph/2024-04-01/graphqueries/id_query.go index 0dddb36f499..eb6c5e5c84c 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphqueries/id_query.go +++ b/resource-manager/resourcegraph/2024-04-01/graphqueries/id_query.go @@ -42,7 +42,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourcegraph/2024-04-01/graphqueries/method_graphqueryupdate.go b/resource-manager/resourcegraph/2024-04-01/graphqueries/method_graphqueryupdate.go index 15ac73db65b..103603d9aa0 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphqueries/method_graphqueryupdate.go +++ b/resource-manager/resourcegraph/2024-04-01/graphqueries/method_graphqueryupdate.go @@ -49,7 +49,6 @@ func (c GraphqueriesClient) GraphQueryUpdate(ctx context.Context, id QueryId, in var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2024-04-01/graphqueries/version.go b/resource-manager/resourcegraph/2024-04-01/graphqueries/version.go index 85c2c5080c4..186949cd539 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphqueries/version.go +++ b/resource-manager/resourcegraph/2024-04-01/graphqueries/version.go @@ -1,12 +1,10 @@ package graphqueries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphqueries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphqueries/2024-04-01" } diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/README.md b/resource-manager/resourcegraph/2024-04-01/graphquery/README.md index 82b4e0eab9a..1778b9298a8 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/README.md +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2024-04-01/graphquery` Documentation -The `graphquery` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2024-04-01`). +The `graphquery` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/client.go b/resource-manager/resourcegraph/2024-04-01/graphquery/client.go index e0de67d9b54..7c1a2e9befc 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/client.go +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/client.go @@ -15,7 +15,7 @@ type GraphQueryClient struct { } func NewGraphQueryClientWithBaseURI(sdkApi sdkEnv.Api) (*GraphQueryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "graphquery", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "graphquery", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GraphQueryClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/id_query.go b/resource-manager/resourcegraph/2024-04-01/graphquery/id_query.go index 7a92730bd20..bb3e94ab8c7 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/id_query.go +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/id_query.go @@ -42,7 +42,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/method_createorupdate.go b/resource-manager/resourcegraph/2024-04-01/graphquery/method_createorupdate.go index fc2c2ae32e0..9dee5a55da1 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/method_createorupdate.go +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/method_createorupdate.go @@ -50,7 +50,6 @@ func (c GraphQueryClient) CreateOrUpdate(ctx context.Context, id QueryId, input var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/method_get.go b/resource-manager/resourcegraph/2024-04-01/graphquery/method_get.go index d44bae108f4..a02431f1245 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/method_get.go +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/method_get.go @@ -45,7 +45,6 @@ func (c GraphQueryClient) Get(ctx context.Context, id QueryId) (result GetOperat var model GraphQueryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2024-04-01/graphquery/version.go b/resource-manager/resourcegraph/2024-04-01/graphquery/version.go index 6ccb969e33e..52a2c036e44 100644 --- a/resource-manager/resourcegraph/2024-04-01/graphquery/version.go +++ b/resource-manager/resourcegraph/2024-04-01/graphquery/version.go @@ -1,12 +1,10 @@ package graphquery -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/graphquery/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/graphquery/2024-04-01" } diff --git a/resource-manager/resourcegraph/2024-04-01/resources/README.md b/resource-manager/resourcegraph/2024-04-01/resources/README.md index 27ad114f492..12f9fe415ce 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/README.md +++ b/resource-manager/resourcegraph/2024-04-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2024-04-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resourcegraph` (API Version `2024-04-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resourcegraph` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resourcegraph/2024-04-01/resources/client.go b/resource-manager/resourcegraph/2024-04-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/client.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resourcegraph/2024-04-01/resources/method_resources.go b/resource-manager/resourcegraph/2024-04-01/resources/method_resources.go index e8aa01c33f1..ef80b667035 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/method_resources.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/method_resources.go @@ -49,7 +49,6 @@ func (c ResourcesClient) Resources(ctx context.Context, input QueryRequest) (res var model QueryResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resourcegraph/2024-04-01/resources/model_facet.go b/resource-manager/resourcegraph/2024-04-01/resources/model_facet.go index 400245e6e88..1de60156520 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/model_facet.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/model_facet.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Facet interface { + Facet() BaseFacetImpl } -// RawFacetImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Facet = BaseFacetImpl{} + +type BaseFacetImpl struct { + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s BaseFacetImpl) Facet() BaseFacetImpl { + return s +} + +var _ Facet = RawFacetImpl{} + +// RawFacetImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFacetImpl struct { + facet BaseFacetImpl Type string Values map[string]interface{} } -func unmarshalFacetImplementation(input []byte) (Facet, error) { +func (s RawFacetImpl) Facet() BaseFacetImpl { + return s.facet +} + +func UnmarshalFacetImplementation(input []byte) (Facet, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalFacetImplementation(input []byte) (Facet, error) { return out, nil } - out := RawFacetImpl{ + var parent BaseFacetImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFacetImpl: %+v", err) + } + + return RawFacetImpl{ + facet: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/resourcegraph/2024-04-01/resources/model_faceterror.go b/resource-manager/resourcegraph/2024-04-01/resources/model_faceterror.go index d42849db811..05bad62811c 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/model_faceterror.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/model_faceterror.go @@ -14,7 +14,16 @@ type FacetError struct { Errors []ErrorDetails `json:"errors"` // Fields inherited from Facet + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s FacetError) Facet() BaseFacetImpl { + return BaseFacetImpl{ + Expression: s.Expression, + ResultType: s.ResultType, + } } var _ json.Marshaler = FacetError{} @@ -28,9 +37,10 @@ func (s FacetError) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FacetError: %+v", err) } + decoded["resultType"] = "FacetError" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resourcegraph/2024-04-01/resources/model_facetresult.go b/resource-manager/resourcegraph/2024-04-01/resources/model_facetresult.go index 4d4de98136b..09fbdbb811d 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/model_facetresult.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/model_facetresult.go @@ -16,7 +16,16 @@ type FacetResult struct { TotalRecords int64 `json:"totalRecords"` // Fields inherited from Facet + Expression string `json:"expression"` + ResultType string `json:"resultType"` +} + +func (s FacetResult) Facet() BaseFacetImpl { + return BaseFacetImpl{ + Expression: s.Expression, + ResultType: s.ResultType, + } } var _ json.Marshaler = FacetResult{} @@ -30,9 +39,10 @@ func (s FacetResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FacetResult: %+v", err) } + decoded["resultType"] = "FacetResult" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resourcegraph/2024-04-01/resources/model_queryresponse.go b/resource-manager/resourcegraph/2024-04-01/resources/model_queryresponse.go index f4847c43b38..497821bb4be 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/model_queryresponse.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/model_queryresponse.go @@ -45,7 +45,7 @@ func (s *QueryResponse) UnmarshalJSON(bytes []byte) error { output := make([]Facet, 0) for i, val := range listTemp { - impl, err := unmarshalFacetImplementation(val) + impl, err := UnmarshalFacetImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Facets' for 'QueryResponse': %+v", i, err) } diff --git a/resource-manager/resourcegraph/2024-04-01/resources/version.go b/resource-manager/resourcegraph/2024-04-01/resources/version.go index dc31fcbdf99..41c311e849e 100644 --- a/resource-manager/resourcegraph/2024-04-01/resources/version.go +++ b/resource-manager/resourcegraph/2024-04-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2024-04-01" } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/README.md b/resource-manager/resources/2015-11-01/deploymentoperations/README.md index 6f22dc0725e..c3d1a6f7672 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/README.md +++ b/resource-manager/resources/2015-11-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/client.go b/resource-manager/resources/2015-11-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/client.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2015-11-01/deploymentoperations/id_deployment.go index 1502240c295..652880c06ed 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/id_deployment.go @@ -42,7 +42,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/id_operation.go b/resource-manager/resources/2015-11-01/deploymentoperations/id_operation.go index bcc4bcce130..763604c5075 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/id_operation.go @@ -44,7 +44,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/method_get.go b/resource-manager/resources/2015-11-01/deploymentoperations/method_get.go index 2b719ca0185..495bb5e566b 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id OperationId) (re var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/method_list.go b/resource-manager/resources/2015-11-01/deploymentoperations/method_list.go index 49f39cb4b96..b047129d876 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/deploymentoperations/version.go b/resource-manager/resources/2015-11-01/deploymentoperations/version.go index 8a4eac8b834..e3af2a576e4 100644 --- a/resource-manager/resources/2015-11-01/deploymentoperations/version.go +++ b/resource-manager/resources/2015-11-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/deployments/README.md b/resource-manager/resources/2015-11-01/deployments/README.md index dad03e6e9c1..f0535cabb25 100644 --- a/resource-manager/resources/2015-11-01/deployments/README.md +++ b/resource-manager/resources/2015-11-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/deployments/client.go b/resource-manager/resources/2015-11-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2015-11-01/deployments/client.go +++ b/resource-manager/resources/2015-11-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/deployments/id_providerdeployment.go b/resource-manager/resources/2015-11-01/deployments/id_providerdeployment.go index e9f98a04a58..8d75f11f0f8 100644 --- a/resource-manager/resources/2015-11-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2015-11-01/deployments/id_providerdeployment.go @@ -42,7 +42,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2015-11-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2015-11-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2015-11-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/deployments/method_get.go b/resource-manager/resources/2015-11-01/deployments/method_get.go index ea261c3fa8c..39706b42d6a 100644 --- a/resource-manager/resources/2015-11-01/deployments/method_get.go +++ b/resource-manager/resources/2015-11-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ProviderDeploymentId) (re var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/deployments/method_list.go b/resource-manager/resources/2015-11-01/deployments/method_list.go index aba8eb8f80d..8fbb4681046 100644 --- a/resource-manager/resources/2015-11-01/deployments/method_list.go +++ b/resource-manager/resources/2015-11-01/deployments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/deployments/method_validate.go b/resource-manager/resources/2015-11-01/deployments/method_validate.go index a31aae3d827..c00be1d625e 100644 --- a/resource-manager/resources/2015-11-01/deployments/method_validate.go +++ b/resource-manager/resources/2015-11-01/deployments/method_validate.go @@ -50,7 +50,6 @@ func (c DeploymentsClient) Validate(ctx context.Context, id ProviderDeploymentId var model DeploymentValidateResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/deployments/version.go b/resource-manager/resources/2015-11-01/deployments/version.go index f9ff922f50b..a0317c0931a 100644 --- a/resource-manager/resources/2015-11-01/deployments/version.go +++ b/resource-manager/resources/2015-11-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/policyassignments/README.md b/resource-manager/resources/2015-11-01/policyassignments/README.md index 24c1713edb3..eaf08a461e1 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/README.md +++ b/resource-manager/resources/2015-11-01/policyassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/policyassignments` Documentation -The `policyassignments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `policyassignments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/policyassignments/client.go b/resource-manager/resources/2015-11-01/policyassignments/client.go index 8e17cddc4c7..402c2f10e04 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/client.go +++ b/resource-manager/resources/2015-11-01/policyassignments/client.go @@ -15,7 +15,7 @@ type PolicyAssignmentsClient struct { } func NewPolicyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyAssignmentsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/policyassignments/id_policyassignmentid.go b/resource-manager/resources/2015-11-01/policyassignments/id_policyassignmentid.go index dd4c7ddf9b7..41961cd4a8a 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/id_policyassignmentid.go +++ b/resource-manager/resources/2015-11-01/policyassignments/id_policyassignmentid.go @@ -38,7 +38,7 @@ func ParsePolicyAssignmentIdID(input string) (*PolicyAssignmentIdId, error) { } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePolicyAssignmentIdIDInsensitively(input string) (*PolicyAssignmentIdId } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/policyassignments/id_scopedpolicyassignment.go b/resource-manager/resources/2015-11-01/policyassignments/id_scopedpolicyassignment.go index 2ed810504d2..43eaa6934ca 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/id_scopedpolicyassignment.go +++ b/resource-manager/resources/2015-11-01/policyassignments/id_scopedpolicyassignment.go @@ -40,7 +40,7 @@ func ParseScopedPolicyAssignmentID(input string) (*ScopedPolicyAssignmentId, err } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPolicyAssignmentIDInsensitively(input string) (*ScopedPolicyAssi } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_create.go b/resource-manager/resources/2015-11-01/policyassignments/method_create.go index a532f7d9a19..38593afb7f2 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_create.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_create.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) Create(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_createbyid.go b/resource-manager/resources/2015-11-01/policyassignments/method_createbyid.go index 674d24a20ae..a2a99e106f7 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_createbyid.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_createbyid.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) CreateById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_delete.go b/resource-manager/resources/2015-11-01/policyassignments/method_delete.go index ffa264e8303..b0416dad3f9 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_delete.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_delete.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) Delete(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_deletebyid.go b/resource-manager/resources/2015-11-01/policyassignments/method_deletebyid.go index 04fbdc78d76..3fa6c39084f 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_deletebyid.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_deletebyid.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) DeleteById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_get.go b/resource-manager/resources/2015-11-01/policyassignments/method_get.go index 9e8e5bbce83..bf3df6719ea 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_get.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_get.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) Get(ctx context.Context, id ScopedPolicyAssignm var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_getbyid.go b/resource-manager/resources/2015-11-01/policyassignments/method_getbyid.go index 8f0a663b93d..bafd322c39f 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_getbyid.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_getbyid.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) GetById(ctx context.Context, id PolicyAssignmen var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_list.go b/resource-manager/resources/2015-11-01/policyassignments/method_list.go index 0e8b97a636f..144bc793237 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_list.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_listforresource.go b/resource-manager/resources/2015-11-01/policyassignments/method_listforresource.go index faccb99d726..62a36dd46da 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_listforresource.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_listforresource.go @@ -40,6 +40,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_listforresourcegroup.go b/resource-manager/resources/2015-11-01/policyassignments/method_listforresourcegroup.go index 449a24c12ab..e44580f1c11 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_listforresourcegroup.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_listforresourcegroup.go @@ -40,6 +40,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/policyassignments/method_listforscope.go b/resource-manager/resources/2015-11-01/policyassignments/method_listforscope.go index eb6588f4320..041841d7d93 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/method_listforscope.go +++ b/resource-manager/resources/2015-11-01/policyassignments/method_listforscope.go @@ -40,6 +40,7 @@ func (o ListForScopeOperationOptions) ToHeaders() *client.Headers { func (o ListForScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/policyassignments/version.go b/resource-manager/resources/2015-11-01/policyassignments/version.go index 97a6ec25cba..d9689ccfba6 100644 --- a/resource-manager/resources/2015-11-01/policyassignments/version.go +++ b/resource-manager/resources/2015-11-01/policyassignments/version.go @@ -1,12 +1,10 @@ package policyassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyassignments/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/policydefinitions/README.md b/resource-manager/resources/2015-11-01/policydefinitions/README.md index 3168d5f283b..c7dd85771a6 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/README.md +++ b/resource-manager/resources/2015-11-01/policydefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/policydefinitions` Documentation -The `policydefinitions` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `policydefinitions` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/policydefinitions/client.go b/resource-manager/resources/2015-11-01/policydefinitions/client.go index b17e0191782..db6c48e0517 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/client.go +++ b/resource-manager/resources/2015-11-01/policydefinitions/client.go @@ -15,7 +15,7 @@ type PolicyDefinitionsClient struct { } func NewPolicyDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policydefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policydefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyDefinitionsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/policydefinitions/id_policydefinition.go b/resource-manager/resources/2015-11-01/policydefinitions/id_policydefinition.go index 9463964bc99..e543407e10e 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/id_policydefinition.go +++ b/resource-manager/resources/2015-11-01/policydefinitions/id_policydefinition.go @@ -40,7 +40,7 @@ func ParsePolicydefinitionID(input string) (*PolicydefinitionId, error) { } id := PolicydefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePolicydefinitionIDInsensitively(input string) (*PolicydefinitionId, er } id := PolicydefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/policydefinitions/method_createorupdate.go b/resource-manager/resources/2015-11-01/policydefinitions/method_createorupdate.go index e67123f0a3a..2ac68a47af2 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/method_createorupdate.go +++ b/resource-manager/resources/2015-11-01/policydefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c PolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, id Policyde var model PolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policydefinitions/method_get.go b/resource-manager/resources/2015-11-01/policydefinitions/method_get.go index 37878c29c04..12d44060492 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/method_get.go +++ b/resource-manager/resources/2015-11-01/policydefinitions/method_get.go @@ -45,7 +45,6 @@ func (c PolicyDefinitionsClient) Get(ctx context.Context, id PolicydefinitionId) var model PolicyDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/policydefinitions/version.go b/resource-manager/resources/2015-11-01/policydefinitions/version.go index 850428aa411..cb60c4a336b 100644 --- a/resource-manager/resources/2015-11-01/policydefinitions/version.go +++ b/resource-manager/resources/2015-11-01/policydefinitions/version.go @@ -1,12 +1,10 @@ package policydefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policydefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policydefinitions/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/providers/README.md b/resource-manager/resources/2015-11-01/providers/README.md index c631f9b7255..0a4563c714f 100644 --- a/resource-manager/resources/2015-11-01/providers/README.md +++ b/resource-manager/resources/2015-11-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/providers/client.go b/resource-manager/resources/2015-11-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2015-11-01/providers/client.go +++ b/resource-manager/resources/2015-11-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/providers/id_provider.go b/resource-manager/resources/2015-11-01/providers/id_provider.go index 6a23a48f553..016f482882b 100644 --- a/resource-manager/resources/2015-11-01/providers/id_provider.go +++ b/resource-manager/resources/2015-11-01/providers/id_provider.go @@ -40,7 +40,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/providers/method_get.go b/resource-manager/resources/2015-11-01/providers/method_get.go index 74d0904b949..bcdc4e18605 100644 --- a/resource-manager/resources/2015-11-01/providers/method_get.go +++ b/resource-manager/resources/2015-11-01/providers/method_get.go @@ -45,7 +45,6 @@ func (c ProvidersClient) Get(ctx context.Context, id ProviderId) (result GetOper var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/providers/method_list.go b/resource-manager/resources/2015-11-01/providers/method_list.go index 07511068757..f5953924bb2 100644 --- a/resource-manager/resources/2015-11-01/providers/method_list.go +++ b/resource-manager/resources/2015-11-01/providers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/providers/method_register.go b/resource-manager/resources/2015-11-01/providers/method_register.go index 549db8fe36e..93447290a36 100644 --- a/resource-manager/resources/2015-11-01/providers/method_register.go +++ b/resource-manager/resources/2015-11-01/providers/method_register.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Register(ctx context.Context, id ProviderId) (result Re var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/providers/method_unregister.go b/resource-manager/resources/2015-11-01/providers/method_unregister.go index 39419b80e7c..e56245a8ca5 100644 --- a/resource-manager/resources/2015-11-01/providers/method_unregister.go +++ b/resource-manager/resources/2015-11-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id ProviderId) (result var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/providers/version.go b/resource-manager/resources/2015-11-01/providers/version.go index e91ecd68b00..84c8ece1eda 100644 --- a/resource-manager/resources/2015-11-01/providers/version.go +++ b/resource-manager/resources/2015-11-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/README.md b/resource-manager/resources/2015-11-01/resourcegroups/README.md index 905503f3d89..825f2b7d722 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/README.md +++ b/resource-manager/resources/2015-11-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/resourcegroups/client.go b/resource-manager/resources/2015-11-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/client.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2015-11-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/method_get.go b/resource-manager/resources/2015-11-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/method_list.go b/resource-manager/resources/2015-11-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/method_listresources.go b/resource-manager/resources/2015-11-01/resourcegroups/method_listresources.go index 3cfa7173112..b5243e30335 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/method_listresources.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/method_listresources.go @@ -42,6 +42,7 @@ func (o ListResourcesOperationOptions) ToHeaders() *client.Headers { func (o ListResourcesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/method_patch.go b/resource-manager/resources/2015-11-01/resourcegroups/method_patch.go index 239e2dd080a..0553fca7c0d 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/method_patch.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/method_patch.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Patch(ctx context.Context, id commonids.ResourceGr var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/resourcegroups/version.go b/resource-manager/resources/2015-11-01/resourcegroups/version.go index 4e86a5ec530..e202d30191a 100644 --- a/resource-manager/resources/2015-11-01/resourcegroups/version.go +++ b/resource-manager/resources/2015-11-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/resources/README.md b/resource-manager/resources/2015-11-01/resources/README.md index b18d3350a87..1970959566b 100644 --- a/resource-manager/resources/2015-11-01/resources/README.md +++ b/resource-manager/resources/2015-11-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/resources/client.go b/resource-manager/resources/2015-11-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2015-11-01/resources/client.go +++ b/resource-manager/resources/2015-11-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/resources/method_createorupdate.go b/resource-manager/resources/2015-11-01/resources/method_createorupdate.go index 7fab7f13872..f27e317b1e6 100644 --- a/resource-manager/resources/2015-11-01/resources/method_createorupdate.go +++ b/resource-manager/resources/2015-11-01/resources/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourcesClient) CreateOrUpdate(ctx context.Context, id commonids.ScopeI var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/resources/method_get.go b/resource-manager/resources/2015-11-01/resources/method_get.go index a8809c97b53..120fd49f2e6 100644 --- a/resource-manager/resources/2015-11-01/resources/method_get.go +++ b/resource-manager/resources/2015-11-01/resources/method_get.go @@ -47,7 +47,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/resources/method_list.go b/resource-manager/resources/2015-11-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2015-11-01/resources/method_list.go +++ b/resource-manager/resources/2015-11-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2015-11-01/resources/version.go b/resource-manager/resources/2015-11-01/resources/version.go index 8995760312c..da3663c9072 100644 --- a/resource-manager/resources/2015-11-01/resources/version.go +++ b/resource-manager/resources/2015-11-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/subscriptions/README.md b/resource-manager/resources/2015-11-01/subscriptions/README.md index 5b1d8a43be7..d8618186f16 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/README.md +++ b/resource-manager/resources/2015-11-01/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/subscriptions/client.go b/resource-manager/resources/2015-11-01/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/client.go +++ b/resource-manager/resources/2015-11-01/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/subscriptions/method_checkzonepeers.go b/resource-manager/resources/2015-11-01/subscriptions/method_checkzonepeers.go index 6d405dcc9cf..973678b5c73 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/method_checkzonepeers.go +++ b/resource-manager/resources/2015-11-01/subscriptions/method_checkzonepeers.go @@ -51,7 +51,6 @@ func (c SubscriptionsClient) CheckZonePeers(ctx context.Context, id commonids.Su var model CheckZonePeersResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/subscriptions/method_get.go b/resource-manager/resources/2015-11-01/subscriptions/method_get.go index b282b4a832f..ba4944a31ad 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/method_get.go +++ b/resource-manager/resources/2015-11-01/subscriptions/method_get.go @@ -46,7 +46,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id commonids.SubscriptionI var model Subscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/subscriptions/method_listlocations.go b/resource-manager/resources/2015-11-01/subscriptions/method_listlocations.go index fd56a2b35c9..3f2d8b07ab8 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/method_listlocations.go +++ b/resource-manager/resources/2015-11-01/subscriptions/method_listlocations.go @@ -47,7 +47,6 @@ func (c SubscriptionsClient) ListLocations(ctx context.Context, id commonids.Sub var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/subscriptions/version.go b/resource-manager/resources/2015-11-01/subscriptions/version.go index 033a247c860..75283a6d2b7 100644 --- a/resource-manager/resources/2015-11-01/subscriptions/version.go +++ b/resource-manager/resources/2015-11-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/tags/README.md b/resource-manager/resources/2015-11-01/tags/README.md index bf674c56fe1..ff350b5a877 100644 --- a/resource-manager/resources/2015-11-01/tags/README.md +++ b/resource-manager/resources/2015-11-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/tags/client.go b/resource-manager/resources/2015-11-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2015-11-01/tags/client.go +++ b/resource-manager/resources/2015-11-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/tags/id_tagname.go b/resource-manager/resources/2015-11-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2015-11-01/tags/id_tagname.go +++ b/resource-manager/resources/2015-11-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/tags/id_tagvalue.go b/resource-manager/resources/2015-11-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2015-11-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2015-11-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2015-11-01/tags/method_createorupdate.go b/resource-manager/resources/2015-11-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2015-11-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2015-11-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2015-11-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2015-11-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2015-11-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/tags/version.go b/resource-manager/resources/2015-11-01/tags/version.go index 9750331c88d..c14830782f4 100644 --- a/resource-manager/resources/2015-11-01/tags/version.go +++ b/resource-manager/resources/2015-11-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2015-11-01" } diff --git a/resource-manager/resources/2015-11-01/tenants/README.md b/resource-manager/resources/2015-11-01/tenants/README.md index 3686d62cbe4..14f0c39cf1a 100644 --- a/resource-manager/resources/2015-11-01/tenants/README.md +++ b/resource-manager/resources/2015-11-01/tenants/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/tenants` Documentation -The `tenants` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2015-11-01`). +The `tenants` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2015-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2015-11-01/tenants/client.go b/resource-manager/resources/2015-11-01/tenants/client.go index 1be7e109076..d384e59d77e 100644 --- a/resource-manager/resources/2015-11-01/tenants/client.go +++ b/resource-manager/resources/2015-11-01/tenants/client.go @@ -15,7 +15,7 @@ type TenantsClient struct { } func NewTenantsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenants", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenants", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantsClient: %+v", err) } diff --git a/resource-manager/resources/2015-11-01/tenants/method_checkresourcename.go b/resource-manager/resources/2015-11-01/tenants/method_checkresourcename.go index 8e2aa51e8f4..2cfec883352 100644 --- a/resource-manager/resources/2015-11-01/tenants/method_checkresourcename.go +++ b/resource-manager/resources/2015-11-01/tenants/method_checkresourcename.go @@ -49,7 +49,6 @@ func (c TenantsClient) CheckResourceName(ctx context.Context, input ResourceName var model CheckResourceNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2015-11-01/tenants/version.go b/resource-manager/resources/2015-11-01/tenants/version.go index 38b3401304a..38d249f65b4 100644 --- a/resource-manager/resources/2015-11-01/tenants/version.go +++ b/resource-manager/resources/2015-11-01/tenants/version.go @@ -1,12 +1,10 @@ package tenants -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2015-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenants/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenants/2015-11-01" } diff --git a/resource-manager/resources/2020-05-01/managementlocks/README.md b/resource-manager/resources/2020-05-01/managementlocks/README.md index ee78c49b886..cf6bc20c9c9 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/README.md +++ b/resource-manager/resources/2020-05-01/managementlocks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks` Documentation -The `managementlocks` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-05-01`). +The `managementlocks` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-05-01/managementlocks/client.go b/resource-manager/resources/2020-05-01/managementlocks/client.go index b15995f949c..b03d5882446 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/client.go +++ b/resource-manager/resources/2020-05-01/managementlocks/client.go @@ -15,7 +15,7 @@ type ManagementLocksClient struct { } func NewManagementLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementLocksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementlocks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementlocks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementLocksClient: %+v", err) } diff --git a/resource-manager/resources/2020-05-01/managementlocks/id_lock.go b/resource-manager/resources/2020-05-01/managementlocks/id_lock.go index e784dab04fb..6dc17188e9c 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/id_lock.go +++ b/resource-manager/resources/2020-05-01/managementlocks/id_lock.go @@ -40,7 +40,7 @@ func ParseLockID(input string) (*LockId, error) { } id := LockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLockIDInsensitively(input string) (*LockId, error) { } id := LockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go b/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go index 126e19c82a5..2c1db7470e6 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go +++ b/resource-manager/resources/2020-05-01/managementlocks/id_providerlock.go @@ -42,7 +42,7 @@ func ParseProviderLockID(input string) (*ProviderLockId, error) { } id := ProviderLockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLockIDInsensitively(input string) (*ProviderLockId, error) { } id := ProviderLockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go b/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go index 0ac61f7201d..ecd5cf5fcc0 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go +++ b/resource-manager/resources/2020-05-01/managementlocks/id_scopedlock.go @@ -40,7 +40,7 @@ func ParseScopedLockID(input string) (*ScopedLockId, error) { } id := ScopedLockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedLockIDInsensitively(input string) (*ScopedLockId, error) { } id := ScopedLockId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcegrouplevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcegrouplevel.go index 42ef63e9fe3..01a3e3a3b24 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcegrouplevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcegrouplevel.go @@ -50,7 +50,6 @@ func (c ManagementLocksClient) CreateOrUpdateAtResourceGroupLevel(ctx context.Co var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcelevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcelevel.go index 046d1ca7a37..4ed16a6aa31 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcelevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatresourcelevel.go @@ -50,7 +50,6 @@ func (c ManagementLocksClient) CreateOrUpdateAtResourceLevel(ctx context.Context var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatsubscriptionlevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatsubscriptionlevel.go index 9136094e034..fd9f0fff51f 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatsubscriptionlevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdateatsubscriptionlevel.go @@ -50,7 +50,6 @@ func (c ManagementLocksClient) CreateOrUpdateAtSubscriptionLevel(ctx context.Con var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdatebyscope.go b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdatebyscope.go index 79b8162ac55..345b6c4ee29 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_createorupdatebyscope.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_createorupdatebyscope.go @@ -50,7 +50,6 @@ func (c ManagementLocksClient) CreateOrUpdateByScope(ctx context.Context, id Sco var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcegrouplevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcegrouplevel.go index 95c3c6a16c5..0acff78551f 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcegrouplevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcegrouplevel.go @@ -45,7 +45,6 @@ func (c ManagementLocksClient) GetAtResourceGroupLevel(ctx context.Context, id P var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcelevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcelevel.go index 30f4d3cdcab..748db9bb557 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcelevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_getatresourcelevel.go @@ -45,7 +45,6 @@ func (c ManagementLocksClient) GetAtResourceLevel(ctx context.Context, id Scoped var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_getatsubscriptionlevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_getatsubscriptionlevel.go index 83ae939271f..fa64aeb2729 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_getatsubscriptionlevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_getatsubscriptionlevel.go @@ -45,7 +45,6 @@ func (c ManagementLocksClient) GetAtSubscriptionLevel(ctx context.Context, id Lo var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_getbyscope.go b/resource-manager/resources/2020-05-01/managementlocks/method_getbyscope.go index 29051405e7f..62ce9525493 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_getbyscope.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_getbyscope.go @@ -45,7 +45,6 @@ func (c ManagementLocksClient) GetByScope(ctx context.Context, id ScopedLockId) var model ManagementLockObject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcegrouplevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcegrouplevel.go index 50335bffd04..9352a7b0442 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcegrouplevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcegrouplevel.go @@ -40,6 +40,7 @@ func (o ListAtResourceGroupLevelOperationOptions) ToHeaders() *client.Headers { func (o ListAtResourceGroupLevelOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcelevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcelevel.go index a84b21caad3..76619e4b3e6 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcelevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_listatresourcelevel.go @@ -40,6 +40,7 @@ func (o ListAtResourceLevelOperationOptions) ToHeaders() *client.Headers { func (o ListAtResourceLevelOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_listatsubscriptionlevel.go b/resource-manager/resources/2020-05-01/managementlocks/method_listatsubscriptionlevel.go index 265e94565ae..39feed49458 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_listatsubscriptionlevel.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_listatsubscriptionlevel.go @@ -40,6 +40,7 @@ func (o ListAtSubscriptionLevelOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionLevelOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-05-01/managementlocks/method_listbyscope.go b/resource-manager/resources/2020-05-01/managementlocks/method_listbyscope.go index aeea3f07788..51464a0d3c6 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/method_listbyscope.go +++ b/resource-manager/resources/2020-05-01/managementlocks/method_listbyscope.go @@ -40,6 +40,7 @@ func (o ListByScopeOperationOptions) ToHeaders() *client.Headers { func (o ListByScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-05-01/managementlocks/version.go b/resource-manager/resources/2020-05-01/managementlocks/version.go index dcaf3863847..654849bde64 100644 --- a/resource-manager/resources/2020-05-01/managementlocks/version.go +++ b/resource-manager/resources/2020-05-01/managementlocks/version.go @@ -1,12 +1,10 @@ package managementlocks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementlocks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementlocks/2020-05-01" } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/README.md b/resource-manager/resources/2020-05-01/privatelinkassociation/README.md index 23893a19898..95365af12be 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/README.md +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/privatelinkassociation` Documentation -The `privatelinkassociation` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-05-01`). +The `privatelinkassociation` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/client.go b/resource-manager/resources/2020-05-01/privatelinkassociation/client.go index 7eda06e6d3d..1ae79677259 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/client.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/client.go @@ -15,7 +15,7 @@ type PrivateLinkAssociationClient struct { } func NewPrivateLinkAssociationClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkAssociationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkassociation", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkassociation", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkAssociationClient: %+v", err) } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go b/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go index 6edc99f0571..5466e07e617 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/id_privatelinkassociation.go @@ -40,7 +40,7 @@ func ParsePrivateLinkAssociationID(input string) (*PrivateLinkAssociationId, err } id := PrivateLinkAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePrivateLinkAssociationIDInsensitively(input string) (*PrivateLinkAssoc } id := PrivateLinkAssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/method_get.go b/resource-manager/resources/2020-05-01/privatelinkassociation/method_get.go index 8b4ac033e6b..5a6615da376 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/method_get.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkAssociationClient) Get(ctx context.Context, id PrivateLinkAss var model PrivateLinkAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/method_list.go b/resource-manager/resources/2020-05-01/privatelinkassociation/method_list.go index 4f7d12a18d7..eda2621c706 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/method_list.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/method_list.go @@ -47,7 +47,6 @@ func (c PrivateLinkAssociationClient) List(ctx context.Context, id commonids.Man var model PrivateLinkAssociationGetResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/method_put.go b/resource-manager/resources/2020-05-01/privatelinkassociation/method_put.go index a0df188ecf6..cfbd132f1c3 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/method_put.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/method_put.go @@ -50,7 +50,6 @@ func (c PrivateLinkAssociationClient) Put(ctx context.Context, id PrivateLinkAss var model PrivateLinkAssociation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/privatelinkassociation/version.go b/resource-manager/resources/2020-05-01/privatelinkassociation/version.go index 91aa6cdb35f..208f988d4f7 100644 --- a/resource-manager/resources/2020-05-01/privatelinkassociation/version.go +++ b/resource-manager/resources/2020-05-01/privatelinkassociation/version.go @@ -1,12 +1,10 @@ package privatelinkassociation -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkassociation/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkassociation/2020-05-01" } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/README.md b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/README.md index ee9c8fa9b4e..84aff9be05e 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/README.md +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/resourcemanagementprivatelink` Documentation -The `resourcemanagementprivatelink` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-05-01`). +The `resourcemanagementprivatelink` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/client.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/client.go index de7671f91dd..57734c32863 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/client.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/client.go @@ -15,7 +15,7 @@ type ResourceManagementPrivateLinkClient struct { } func NewResourceManagementPrivateLinkClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceManagementPrivateLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcemanagementprivatelink", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcemanagementprivatelink", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceManagementPrivateLinkClient: %+v", err) } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go index 66da4ffd055..4b871aeef2f 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/id_resourcemanagementprivatelink.go @@ -42,7 +42,7 @@ func ParseResourceManagementPrivateLinkID(input string) (*ResourceManagementPriv } id := ResourceManagementPrivateLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceManagementPrivateLinkIDInsensitively(input string) (*ResourceM } id := ResourceManagementPrivateLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_get.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_get.go index 5bfd0aa51dc..08b0235b0b5 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_get.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_get.go @@ -45,7 +45,6 @@ func (c ResourceManagementPrivateLinkClient) Get(ctx context.Context, id Resourc var model ResourceManagementPrivateLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_list.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_list.go index c4ebbcf7aeb..a4b5c18ec49 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_list.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_list.go @@ -47,7 +47,6 @@ func (c ResourceManagementPrivateLinkClient) List(ctx context.Context, id common var model ResourceManagementPrivateLinkListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_listbyresourcegroup.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_listbyresourcegroup.go index bc92a5779a2..c0614017cd0 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_listbyresourcegroup.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ResourceManagementPrivateLinkClient) ListByResourceGroup(ctx context.Con var model ResourceManagementPrivateLinkListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_put.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_put.go index 9af7cfe1ca2..06948bb02ba 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_put.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/method_put.go @@ -50,7 +50,6 @@ func (c ResourceManagementPrivateLinkClient) Put(ctx context.Context, id Resourc var model ResourceManagementPrivateLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/version.go b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/version.go index 127e1df827f..2f7cb36e7aa 100644 --- a/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/version.go +++ b/resource-manager/resources/2020-05-01/resourcemanagementprivatelink/version.go @@ -1,12 +1,10 @@ package resourcemanagementprivatelink -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcemanagementprivatelink/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcemanagementprivatelink/2020-05-01" } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/README.md b/resource-manager/resources/2020-10-01/deploymentoperations/README.md index 4f8412b074e..3504f3f806d 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/README.md +++ b/resource-manager/resources/2020-10-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/client.go b/resource-manager/resources/2020-10-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/client.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_deployment.go index 90dd79f6437..944d43c2086 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_deploymentoperation.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_deploymentoperation.go index 9816ebc4072..f81835ca86a 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_deploymentoperation.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_deploymentoperation.go @@ -42,7 +42,7 @@ func ParseDeploymentOperationID(input string) (*DeploymentOperationId, error) { } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentOperationIDInsensitively(input string) (*DeploymentOperation } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_operation.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_operation.go index 9f5f2bbbaa2..e685a25faef 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_operation.go @@ -40,7 +40,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_providerdeployment.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_providerdeployment.go index 54ded88d66c..6ebf482449a 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_providerdeployment.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deployment.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deployment.go index 5117ebdd03f..0581c5f5af9 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deployment.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deploymentoperation.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deploymentoperation.go index 2da36b32fcc..7edf297943a 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deploymentoperation.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_providers2deploymentoperation.go @@ -42,7 +42,7 @@ func ParseProviders2DeploymentOperationID(input string) (*Providers2DeploymentOp } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviders2DeploymentOperationIDInsensitively(input string) (*Providers } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeployment.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeployment.go index a54d3523215..597ddfcecfd 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeployment.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupDeploymentID(input string) (*ResourceGroupDeploymentId, e } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupDeploymentIDInsensitively(input string) (*ResourceGroupDe } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeploymentoperation.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeploymentoperation.go index 4b535c8fba9..913be3aa6d1 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeploymentoperation.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_resourcegroupdeploymentoperation.go @@ -44,7 +44,7 @@ func ParseResourceGroupDeploymentOperationID(input string) (*ResourceGroupDeploy } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceGroupDeploymentOperationIDInsensitively(input string) (*Resour } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_scopeddeployment.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_scopeddeployment.go index 6582e3e01b3..941b9aa87d4 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_scopeddeployment.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/id_scopedoperation.go b/resource-manager/resources/2020-10-01/deploymentoperations/id_scopedoperation.go index f7bf3afbbca..415ed9ea2d8 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/id_scopedoperation.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/id_scopedoperation.go @@ -42,7 +42,7 @@ func ParseScopedOperationID(input string) (*ScopedOperationId, error) { } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedOperationIDInsensitively(input string) (*ScopedOperationId, erro } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_get.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_get.go index 618c9e69440..df47d1fffdc 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id ResourceGroupDep var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatmanagementgroupscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatmanagementgroupscope.go index 73c31e4da46..fcff3ccc385 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Contex var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatscope.go index be6b8e67555..cdacd32c8ce 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtScope(ctx context.Context, id ScopedOpe var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatsubscriptionscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatsubscriptionscope.go index de0f05d1fbb..3182049acbb 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_getattenantscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_getattenantscope.go index 78eaf7864ef..be3409b87cc 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_getattenantscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtTenantScope(ctx context.Context, id Ope var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_list.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_list.go index 31da83cbd35..5f009bc0e62 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatmanagementgroupscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatmanagementgroupscope.go index 8534ab53db5..4cf1c58a63a 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatmanagementgroupscope.go @@ -39,6 +39,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatscope.go index 8840500cb91..f9b99167f0c 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatscope.go @@ -39,6 +39,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatsubscriptionscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatsubscriptionscope.go index e5af43d5147..1465515c921 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_listatsubscriptionscope.go @@ -39,6 +39,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/method_listattenantscope.go b/resource-manager/resources/2020-10-01/deploymentoperations/method_listattenantscope.go index 364b6e78860..e9a41bc9f54 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/method_listattenantscope.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deploymentoperations/version.go b/resource-manager/resources/2020-10-01/deploymentoperations/version.go index 36578ef1bff..3bd13026dc5 100644 --- a/resource-manager/resources/2020-10-01/deploymentoperations/version.go +++ b/resource-manager/resources/2020-10-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/deployments/README.md b/resource-manager/resources/2020-10-01/deployments/README.md index daafb8fd8b7..d0fbd4f595c 100644 --- a/resource-manager/resources/2020-10-01/deployments/README.md +++ b/resource-manager/resources/2020-10-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/deployments/client.go b/resource-manager/resources/2020-10-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2020-10-01/deployments/client.go +++ b/resource-manager/resources/2020-10-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/deployments/id_deployment.go b/resource-manager/resources/2020-10-01/deployments/id_deployment.go index 82731104909..f1d4bb31af3 100644 --- a/resource-manager/resources/2020-10-01/deployments/id_deployment.go +++ b/resource-manager/resources/2020-10-01/deployments/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deployments/id_providerdeployment.go b/resource-manager/resources/2020-10-01/deployments/id_providerdeployment.go index 1baff9237c1..0759c3fbf25 100644 --- a/resource-manager/resources/2020-10-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2020-10-01/deployments/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deployments/id_providers2deployment.go b/resource-manager/resources/2020-10-01/deployments/id_providers2deployment.go index 36d3dab238c..328c93cb501 100644 --- a/resource-manager/resources/2020-10-01/deployments/id_providers2deployment.go +++ b/resource-manager/resources/2020-10-01/deployments/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deployments/id_resourcegroupproviderdeployment.go b/resource-manager/resources/2020-10-01/deployments/id_resourcegroupproviderdeployment.go index c7853b848e9..757bda29f75 100644 --- a/resource-manager/resources/2020-10-01/deployments/id_resourcegroupproviderdeployment.go +++ b/resource-manager/resources/2020-10-01/deployments/id_resourcegroupproviderdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderDeploymentID(input string) (*ResourceGroupProvide } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderDeploymentIDInsensitively(input string) (*Resourc } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deployments/id_scopeddeployment.go b/resource-manager/resources/2020-10-01/deployments/id_scopeddeployment.go index ea41f878c04..330d8edb9b0 100644 --- a/resource-manager/resources/2020-10-01/deployments/id_scopeddeployment.go +++ b/resource-manager/resources/2020-10-01/deployments/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2020-10-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2020-10-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_exporttemplate.go b/resource-manager/resources/2020-10-01/deployments/method_exporttemplate.go index 159587f9deb..9cc11aa5c38 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_exporttemplate.go +++ b/resource-manager/resources/2020-10-01/deployments/method_exporttemplate.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplate(ctx context.Context, id ResourceGroupP var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatmanagementgroupscope.go b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatmanagementgroupscope.go index f2cbce2770b..f701608fff0 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatmanagementgroupscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatmanagementgroupscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Cont var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatscope.go b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatscope.go index 2472bb71773..bf51f90942f 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtScope(ctx context.Context, id ScopedD var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatsubscriptionscope.go b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatsubscriptionscope.go index 37a806dd314..d8d454634f7 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatsubscriptionscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateatsubscriptionscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateattenantscope.go b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateattenantscope.go index 34d8b508070..1f18175bf21 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_exporttemplateattenantscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_exporttemplateattenantscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtTenantScope(ctx context.Context, id D var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_get.go b/resource-manager/resources/2020-10-01/deployments/method_get.go index 1ac0d14f52a..b075492676b 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_get.go +++ b/resource-manager/resources/2020-10-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ResourceGroupProviderDepl var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_getatmanagementgroupscope.go b/resource-manager/resources/2020-10-01/deployments/method_getatmanagementgroupscope.go index bc444e82ea7..96c3414af4c 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, id Pro var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_getatscope.go b/resource-manager/resources/2020-10-01/deployments/method_getatscope.go index c0c03bb1c7a..7a084f6f7ca 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_getatscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtScope(ctx context.Context, id ScopedDeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_getatsubscriptionscope.go b/resource-manager/resources/2020-10-01/deployments/method_getatsubscriptionscope.go index b07a87e692d..92e44fbafca 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, id Provid var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_getattenantscope.go b/resource-manager/resources/2020-10-01/deployments/method_getattenantscope.go index 3e7ab4a1b41..fccae4c0dfa 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_getattenantscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtTenantScope(ctx context.Context, id DeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deployments/method_listatmanagementgroupscope.go b/resource-manager/resources/2020-10-01/deployments/method_listatmanagementgroupscope.go index d806bd04a35..c0ebef35406 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_listatmanagementgroupscope.go @@ -41,6 +41,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deployments/method_listatscope.go b/resource-manager/resources/2020-10-01/deployments/method_listatscope.go index 1f28434f5ad..40f556a4f8b 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_listatscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_listatscope.go @@ -41,6 +41,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deployments/method_listatsubscriptionscope.go b/resource-manager/resources/2020-10-01/deployments/method_listatsubscriptionscope.go index 045ecbcecdd..4962151485c 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_listatsubscriptionscope.go @@ -41,6 +41,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deployments/method_listattenantscope.go b/resource-manager/resources/2020-10-01/deployments/method_listattenantscope.go index 8527c4383f3..09d08be35ac 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_listattenantscope.go +++ b/resource-manager/resources/2020-10-01/deployments/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deployments/method_listbyresourcegroup.go b/resource-manager/resources/2020-10-01/deployments/method_listbyresourcegroup.go index 6389283885e..6c592704a15 100644 --- a/resource-manager/resources/2020-10-01/deployments/method_listbyresourcegroup.go +++ b/resource-manager/resources/2020-10-01/deployments/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/deployments/version.go b/resource-manager/resources/2020-10-01/deployments/version.go index f06d2c5deeb..2eefa51c647 100644 --- a/resource-manager/resources/2020-10-01/deployments/version.go +++ b/resource-manager/resources/2020-10-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/README.md b/resource-manager/resources/2020-10-01/deploymentscripts/README.md index 9cd5c287efe..d5851073a11 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/README.md +++ b/resource-manager/resources/2020-10-01/deploymentscripts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts` Documentation -The `deploymentscripts` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `deploymentscripts` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/client.go b/resource-manager/resources/2020-10-01/deploymentscripts/client.go index f769ada7091..909bfb813a4 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/client.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/client.go @@ -15,7 +15,7 @@ type DeploymentScriptsClient struct { } func NewDeploymentScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentScriptsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentscripts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentscripts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentScriptsClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go b/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go index cb29b3947de..d04e8056f89 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/id_deploymentscript.go @@ -42,7 +42,7 @@ func ParseDeploymentScriptID(input string) (*DeploymentScriptId, error) { } id := DeploymentScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentScriptIDInsensitively(input string) (*DeploymentScriptId, er } id := DeploymentScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_create.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_create.go index c248110b7f5..44670dd302a 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_create.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_create.go @@ -18,7 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Create ... diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_get.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_get.go index 62510f6e60f..5963268db14 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_get.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Get ... @@ -48,11 +48,11 @@ func (c DeploymentScriptsClient) Get(ctx context.Context, id DeploymentScriptId) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDeploymentScriptImplementation(respObj) + model, err := UnmarshalDeploymentScriptImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogs.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogs.go index e734be7b1c4..62d5f16bda9 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogs.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogs.go @@ -46,7 +46,6 @@ func (c DeploymentScriptsClient) GetLogs(ctx context.Context, id DeploymentScrip var model ScriptLogsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogsdefault.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogsdefault.go index 2876a3ebc28..0de9e165741 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogsdefault.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_getlogsdefault.go @@ -34,6 +34,7 @@ func (o GetLogsDefaultOperationOptions) ToHeaders() *client.Headers { func (o GetLogsDefaultOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DeploymentScriptsClient) GetLogsDefault(ctx context.Context, id Deployme var model ScriptLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go index 85bb5985bd8..3448e8f9c4d 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_listbyresourcegroup.go @@ -74,7 +74,7 @@ func (c DeploymentScriptsClient) ListByResourceGroup(ctx context.Context, id com temp := make([]DeploymentScript, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDeploymentScriptImplementation(v) + val, err := UnmarshalDeploymentScriptImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go index 854e3b342b9..669cd76547e 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_listbysubscription.go @@ -74,7 +74,7 @@ func (c DeploymentScriptsClient) ListBySubscription(ctx context.Context, id comm temp := make([]DeploymentScript, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDeploymentScriptImplementation(v) + val, err := UnmarshalDeploymentScriptImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/method_update.go b/resource-manager/resources/2020-10-01/deploymentscripts/method_update.go index 9c84c2f55cd..c905916b2bb 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/method_update.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/method_update.go @@ -15,7 +15,7 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Update ... @@ -52,11 +52,11 @@ func (c DeploymentScriptsClient) Update(ctx context.Context, id DeploymentScript if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDeploymentScriptImplementation(respObj) + model, err := UnmarshalDeploymentScriptImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/model_azurecliscript.go b/resource-manager/resources/2020-10-01/deploymentscripts/model_azurecliscript.go index dee5017e10c..d45b7f5abb9 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/model_azurecliscript.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/model_azurecliscript.go @@ -17,8 +17,10 @@ type AzureCliScript struct { Properties AzureCliScriptProperties `json:"properties"` // Fields inherited from DeploymentScript + Id *string `json:"id,omitempty"` Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` @@ -26,6 +28,19 @@ type AzureCliScript struct { Type *string `json:"type,omitempty"` } +func (s AzureCliScript) DeploymentScript() BaseDeploymentScriptImpl { + return BaseDeploymentScriptImpl{ + Id: s.Id, + Identity: s.Identity, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + SystemData: s.SystemData, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = AzureCliScript{} func (s AzureCliScript) MarshalJSON() ([]byte, error) { @@ -37,9 +52,10 @@ func (s AzureCliScript) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureCliScript: %+v", err) } + decoded["kind"] = "AzureCLI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/model_azurepowershellscript.go b/resource-manager/resources/2020-10-01/deploymentscripts/model_azurepowershellscript.go index d6847b26436..bf5062d8838 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/model_azurepowershellscript.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/model_azurepowershellscript.go @@ -17,8 +17,10 @@ type AzurePowerShellScript struct { Properties AzurePowerShellScriptProperties `json:"properties"` // Fields inherited from DeploymentScript + Id *string `json:"id,omitempty"` Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` @@ -26,6 +28,19 @@ type AzurePowerShellScript struct { Type *string `json:"type,omitempty"` } +func (s AzurePowerShellScript) DeploymentScript() BaseDeploymentScriptImpl { + return BaseDeploymentScriptImpl{ + Id: s.Id, + Identity: s.Identity, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + SystemData: s.SystemData, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = AzurePowerShellScript{} func (s AzurePowerShellScript) MarshalJSON() ([]byte, error) { @@ -37,9 +52,10 @@ func (s AzurePowerShellScript) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePowerShellScript: %+v", err) } + decoded["kind"] = "AzurePowerShell" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/model_deploymentscript.go b/resource-manager/resources/2020-10-01/deploymentscripts/model_deploymentscript.go index bb259806d61..91798772706 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/model_deploymentscript.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/model_deploymentscript.go @@ -4,24 +4,51 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeploymentScript interface { + DeploymentScript() BaseDeploymentScriptImpl +} + +var _ DeploymentScript = BaseDeploymentScriptImpl{} + +type BaseDeploymentScriptImpl struct { + Id *string `json:"id,omitempty"` + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDeploymentScriptImpl) DeploymentScript() BaseDeploymentScriptImpl { + return s } -// RawDeploymentScriptImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeploymentScript = RawDeploymentScriptImpl{} + +// RawDeploymentScriptImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeploymentScriptImpl struct { - Type string - Values map[string]interface{} + deploymentScript BaseDeploymentScriptImpl + Type string + Values map[string]interface{} } -func unmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, error) { +func (s RawDeploymentScriptImpl) DeploymentScript() BaseDeploymentScriptImpl { + return s.deploymentScript +} + +func UnmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, error) { if input == nil { return nil, nil } @@ -52,10 +79,15 @@ func unmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, er return out, nil } - out := RawDeploymentScriptImpl{ - Type: value, - Values: temp, + var parent BaseDeploymentScriptImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeploymentScriptImpl: %+v", err) } - return out, nil + + return RawDeploymentScriptImpl{ + deploymentScript: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/resources/2020-10-01/deploymentscripts/version.go b/resource-manager/resources/2020-10-01/deploymentscripts/version.go index 2a1d0814490..1e3d7977b77 100644 --- a/resource-manager/resources/2020-10-01/deploymentscripts/version.go +++ b/resource-manager/resources/2020-10-01/deploymentscripts/version.go @@ -1,12 +1,10 @@ package deploymentscripts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentscripts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentscripts/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/providers/README.md b/resource-manager/resources/2020-10-01/providers/README.md index 7c45893552e..a76c2cf16d4 100644 --- a/resource-manager/resources/2020-10-01/providers/README.md +++ b/resource-manager/resources/2020-10-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/providers/client.go b/resource-manager/resources/2020-10-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2020-10-01/providers/client.go +++ b/resource-manager/resources/2020-10-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/providers/id_provider.go b/resource-manager/resources/2020-10-01/providers/id_provider.go index bb7109d6550..2ea3db4158e 100644 --- a/resource-manager/resources/2020-10-01/providers/id_provider.go +++ b/resource-manager/resources/2020-10-01/providers/id_provider.go @@ -38,7 +38,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/providers/id_providers2.go b/resource-manager/resources/2020-10-01/providers/id_providers2.go index 7b308b2de67..34eb20ab9df 100644 --- a/resource-manager/resources/2020-10-01/providers/id_providers2.go +++ b/resource-manager/resources/2020-10-01/providers/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/providers/id_subscriptionprovider.go b/resource-manager/resources/2020-10-01/providers/id_subscriptionprovider.go index 970cffaedfa..88e92cbabc5 100644 --- a/resource-manager/resources/2020-10-01/providers/id_subscriptionprovider.go +++ b/resource-manager/resources/2020-10-01/providers/id_subscriptionprovider.go @@ -40,7 +40,7 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/providers/method_get.go b/resource-manager/resources/2020-10-01/providers/method_get.go index d9ebc641bc3..2a780770db9 100644 --- a/resource-manager/resources/2020-10-01/providers/method_get.go +++ b/resource-manager/resources/2020-10-01/providers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) Get(ctx context.Context, id SubscriptionProviderId, opt var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/providers/method_getattenantscope.go b/resource-manager/resources/2020-10-01/providers/method_getattenantscope.go index 179d43b8f06..18fae99a5b5 100644 --- a/resource-manager/resources/2020-10-01/providers/method_getattenantscope.go +++ b/resource-manager/resources/2020-10-01/providers/method_getattenantscope.go @@ -34,6 +34,7 @@ func (o GetAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o GetAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) GetAtTenantScope(ctx context.Context, id ProviderId, op var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/providers/method_list.go b/resource-manager/resources/2020-10-01/providers/method_list.go index e680c5cc23d..87fd9f879e0 100644 --- a/resource-manager/resources/2020-10-01/providers/method_list.go +++ b/resource-manager/resources/2020-10-01/providers/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/providers/method_listattenantscope.go b/resource-manager/resources/2020-10-01/providers/method_listattenantscope.go index 0868cbb09a3..5eccc938db4 100644 --- a/resource-manager/resources/2020-10-01/providers/method_listattenantscope.go +++ b/resource-manager/resources/2020-10-01/providers/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/providers/method_providerresourcetypeslist.go b/resource-manager/resources/2020-10-01/providers/method_providerresourcetypeslist.go index b19a58feb1a..f126b5fe436 100644 --- a/resource-manager/resources/2020-10-01/providers/method_providerresourcetypeslist.go +++ b/resource-manager/resources/2020-10-01/providers/method_providerresourcetypeslist.go @@ -39,6 +39,7 @@ func (o ProviderResourceTypesListOperationOptions) ToHeaders() *client.Headers { func (o ProviderResourceTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/providers/method_register.go b/resource-manager/resources/2020-10-01/providers/method_register.go index 1f2c801c93b..89a89bce325 100644 --- a/resource-manager/resources/2020-10-01/providers/method_register.go +++ b/resource-manager/resources/2020-10-01/providers/method_register.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Register(ctx context.Context, id SubscriptionProviderId var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/providers/method_unregister.go b/resource-manager/resources/2020-10-01/providers/method_unregister.go index bad323e4b60..02cd514d18a 100644 --- a/resource-manager/resources/2020-10-01/providers/method_unregister.go +++ b/resource-manager/resources/2020-10-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id SubscriptionProvider var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/providers/version.go b/resource-manager/resources/2020-10-01/providers/version.go index 414660a6f31..e34b1270d84 100644 --- a/resource-manager/resources/2020-10-01/providers/version.go +++ b/resource-manager/resources/2020-10-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/README.md b/resource-manager/resources/2020-10-01/resourcegroups/README.md index db651ce34ef..7f6f54708cc 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/README.md +++ b/resource-manager/resources/2020-10-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/resourcegroups/client.go b/resource-manager/resources/2020-10-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/client.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2020-10-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/method_get.go b/resource-manager/resources/2020-10-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/method_list.go b/resource-manager/resources/2020-10-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/method_resourceslistbyresourcegroup.go b/resource-manager/resources/2020-10-01/resourcegroups/method_resourceslistbyresourcegroup.go index e739ddc1a69..fc72e1e6ea6 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/method_resourceslistbyresourcegroup.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/method_resourceslistbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ResourcesListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o ResourcesListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/method_update.go b/resource-manager/resources/2020-10-01/resourcegroups/method_update.go index 5e386a401ab..0af23ede9e7 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/method_update.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/method_update.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Update(ctx context.Context, id commonids.ResourceG var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/resourcegroups/version.go b/resource-manager/resources/2020-10-01/resourcegroups/version.go index c7d65b67b08..a97cd8d35d8 100644 --- a/resource-manager/resources/2020-10-01/resourcegroups/version.go +++ b/resource-manager/resources/2020-10-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/resources/README.md b/resource-manager/resources/2020-10-01/resources/README.md index 04c6ae1a8bb..695ddfc82fe 100644 --- a/resource-manager/resources/2020-10-01/resources/README.md +++ b/resource-manager/resources/2020-10-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/resources/client.go b/resource-manager/resources/2020-10-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2020-10-01/resources/client.go +++ b/resource-manager/resources/2020-10-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/resources/method_get.go b/resource-manager/resources/2020-10-01/resources/method_get.go index cf2d000f0e0..d2fd91e267d 100644 --- a/resource-manager/resources/2020-10-01/resources/method_get.go +++ b/resource-manager/resources/2020-10-01/resources/method_get.go @@ -46,7 +46,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/resources/method_getbyid.go b/resource-manager/resources/2020-10-01/resources/method_getbyid.go index c872bd020b3..c544e002b57 100644 --- a/resource-manager/resources/2020-10-01/resources/method_getbyid.go +++ b/resource-manager/resources/2020-10-01/resources/method_getbyid.go @@ -46,7 +46,6 @@ func (c ResourcesClient) GetById(ctx context.Context, id commonids.ScopeId) (res var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/resources/method_list.go b/resource-manager/resources/2020-10-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2020-10-01/resources/method_list.go +++ b/resource-manager/resources/2020-10-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2020-10-01/resources/version.go b/resource-manager/resources/2020-10-01/resources/version.go index 63a382542a9..9f25b454b54 100644 --- a/resource-manager/resources/2020-10-01/resources/version.go +++ b/resource-manager/resources/2020-10-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2020-10-01" } diff --git a/resource-manager/resources/2020-10-01/tags/README.md b/resource-manager/resources/2020-10-01/tags/README.md index 9a0e1d20f3b..9c2e5a45073 100644 --- a/resource-manager/resources/2020-10-01/tags/README.md +++ b/resource-manager/resources/2020-10-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2020-10-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2020-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2020-10-01/tags/client.go b/resource-manager/resources/2020-10-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2020-10-01/tags/client.go +++ b/resource-manager/resources/2020-10-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2020-10-01/tags/id_tagname.go b/resource-manager/resources/2020-10-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2020-10-01/tags/id_tagname.go +++ b/resource-manager/resources/2020-10-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/tags/id_tagvalue.go b/resource-manager/resources/2020-10-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2020-10-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2020-10-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2020-10-01/tags/method_createorupdate.go b/resource-manager/resources/2020-10-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2020-10-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2020-10-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/tags/method_createorupdateatscope.go b/resource-manager/resources/2020-10-01/tags/method_createorupdateatscope.go index 0259c592f15..5f20cfe43fd 100644 --- a/resource-manager/resources/2020-10-01/tags/method_createorupdateatscope.go +++ b/resource-manager/resources/2020-10-01/tags/method_createorupdateatscope.go @@ -51,7 +51,6 @@ func (c TagsClient) CreateOrUpdateAtScope(ctx context.Context, id commonids.Scop var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2020-10-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2020-10-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2020-10-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/tags/method_getatscope.go b/resource-manager/resources/2020-10-01/tags/method_getatscope.go index 50af0190576..7f5afb9a8ac 100644 --- a/resource-manager/resources/2020-10-01/tags/method_getatscope.go +++ b/resource-manager/resources/2020-10-01/tags/method_getatscope.go @@ -47,7 +47,6 @@ func (c TagsClient) GetAtScope(ctx context.Context, id commonids.ScopeId) (resul var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/tags/method_updateatscope.go b/resource-manager/resources/2020-10-01/tags/method_updateatscope.go index c92d0975b92..0aa14e5880c 100644 --- a/resource-manager/resources/2020-10-01/tags/method_updateatscope.go +++ b/resource-manager/resources/2020-10-01/tags/method_updateatscope.go @@ -51,7 +51,6 @@ func (c TagsClient) UpdateAtScope(ctx context.Context, id commonids.ScopeId, inp var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2020-10-01/tags/version.go b/resource-manager/resources/2020-10-01/tags/version.go index 92cc18c4bd6..ea5a5e2ef22 100644 --- a/resource-manager/resources/2020-10-01/tags/version.go +++ b/resource-manager/resources/2020-10-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2020-10-01" } diff --git a/resource-manager/resources/2021-07-01/features/README.md b/resource-manager/resources/2021-07-01/features/README.md index eb376dd2c91..61c1b1622d6 100644 --- a/resource-manager/resources/2021-07-01/features/README.md +++ b/resource-manager/resources/2021-07-01/features/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/features` Documentation -The `features` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2021-07-01`). +The `features` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2021-07-01/features/client.go b/resource-manager/resources/2021-07-01/features/client.go index 9849a64bcf6..d59e61d7dd1 100644 --- a/resource-manager/resources/2021-07-01/features/client.go +++ b/resource-manager/resources/2021-07-01/features/client.go @@ -15,7 +15,7 @@ type FeaturesClient struct { } func NewFeaturesClientWithBaseURI(sdkApi sdkEnv.Api) (*FeaturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "features", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "features", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FeaturesClient: %+v", err) } diff --git a/resource-manager/resources/2021-07-01/features/id_feature.go b/resource-manager/resources/2021-07-01/features/id_feature.go index ecc4d1fb670..3ddf894ad7c 100644 --- a/resource-manager/resources/2021-07-01/features/id_feature.go +++ b/resource-manager/resources/2021-07-01/features/id_feature.go @@ -42,7 +42,7 @@ func ParseFeatureID(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseFeatureIDInsensitively(input string) (*FeatureId, error) { } id := FeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2021-07-01/features/id_providers2.go b/resource-manager/resources/2021-07-01/features/id_providers2.go index 4a6fe0fcd31..2d0f441e302 100644 --- a/resource-manager/resources/2021-07-01/features/id_providers2.go +++ b/resource-manager/resources/2021-07-01/features/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2021-07-01/features/method_get.go b/resource-manager/resources/2021-07-01/features/method_get.go index 525b4e934f2..4ecf9e76521 100644 --- a/resource-manager/resources/2021-07-01/features/method_get.go +++ b/resource-manager/resources/2021-07-01/features/method_get.go @@ -45,7 +45,6 @@ func (c FeaturesClient) Get(ctx context.Context, id FeatureId) (result GetOperat var model FeatureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2021-07-01/features/method_register.go b/resource-manager/resources/2021-07-01/features/method_register.go index be816c2e6e0..5d44b57ce1e 100644 --- a/resource-manager/resources/2021-07-01/features/method_register.go +++ b/resource-manager/resources/2021-07-01/features/method_register.go @@ -46,7 +46,6 @@ func (c FeaturesClient) Register(ctx context.Context, id FeatureId) (result Regi var model FeatureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2021-07-01/features/method_unregister.go b/resource-manager/resources/2021-07-01/features/method_unregister.go index 2509e094e27..766e193a6aa 100644 --- a/resource-manager/resources/2021-07-01/features/method_unregister.go +++ b/resource-manager/resources/2021-07-01/features/method_unregister.go @@ -46,7 +46,6 @@ func (c FeaturesClient) Unregister(ctx context.Context, id FeatureId) (result Un var model FeatureResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2021-07-01/features/version.go b/resource-manager/resources/2021-07-01/features/version.go index 02fe19a714c..6722505ad15 100644 --- a/resource-manager/resources/2021-07-01/features/version.go +++ b/resource-manager/resources/2021-07-01/features/version.go @@ -1,12 +1,10 @@ package features -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/features/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/features/2021-07-01" } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/README.md b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/README.md index 4b8bfbe3f91..12fcb78710a 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/README.md +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations` Documentation -The `subscriptionfeatureregistrations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2021-07-01`). +The `subscriptionfeatureregistrations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2021-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/client.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/client.go index 8e5b00322db..20601d5afd7 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/client.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/client.go @@ -15,7 +15,7 @@ type SubscriptionFeatureRegistrationsClient struct { } func NewSubscriptionFeatureRegistrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionFeatureRegistrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptionfeatureregistrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptionfeatureregistrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionFeatureRegistrationsClient: %+v", err) } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_featureprovider.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_featureprovider.go index df75db43fb1..f37a5492ec1 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_featureprovider.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_featureprovider.go @@ -40,7 +40,7 @@ func ParseFeatureProviderID(input string) (*FeatureProviderId, error) { } id := FeatureProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseFeatureProviderIDInsensitively(input string) (*FeatureProviderId, erro } id := FeatureProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_subscriptionfeatureregistration.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_subscriptionfeatureregistration.go index 5eaab297cc9..69a5d92ec1e 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_subscriptionfeatureregistration.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/id_subscriptionfeatureregistration.go @@ -42,7 +42,7 @@ func ParseSubscriptionFeatureRegistrationID(input string) (*SubscriptionFeatureR } id := SubscriptionFeatureRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSubscriptionFeatureRegistrationIDInsensitively(input string) (*Subscri } id := SubscriptionFeatureRegistrationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_createorupdate.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_createorupdate.go index 02f7a4913cf..2a38d9dc4aa 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_createorupdate.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionFeatureRegistrationsClient) CreateOrUpdate(ctx context.Conte var model SubscriptionFeatureRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_get.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_get.go index a0f7ca7e3b2..b12ed6c575c 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_get.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionFeatureRegistrationsClient) Get(ctx context.Context, id Subs var model SubscriptionFeatureRegistration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/version.go b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/version.go index 9d5a3ac4406..54171708095 100644 --- a/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/version.go +++ b/resource-manager/resources/2021-07-01/subscriptionfeatureregistrations/version.go @@ -1,12 +1,10 @@ package subscriptionfeatureregistrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptionfeatureregistrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptionfeatureregistrations/2021-07-01" } diff --git a/resource-manager/resources/2022-02-01/templatespecs/README.md b/resource-manager/resources/2022-02-01/templatespecs/README.md index 656649d91a0..531fdc79f42 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/README.md +++ b/resource-manager/resources/2022-02-01/templatespecs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecs` Documentation -The `templatespecs` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-02-01`). +The `templatespecs` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-02-01/templatespecs/client.go b/resource-manager/resources/2022-02-01/templatespecs/client.go index 205612b578d..462f7e238a3 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/client.go +++ b/resource-manager/resources/2022-02-01/templatespecs/client.go @@ -15,7 +15,7 @@ type TemplateSpecsClient struct { } func NewTemplateSpecsClientWithBaseURI(sdkApi sdkEnv.Api) (*TemplateSpecsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "templatespecs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "templatespecs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TemplateSpecsClient: %+v", err) } diff --git a/resource-manager/resources/2022-02-01/templatespecs/id_builtintemplatespec.go b/resource-manager/resources/2022-02-01/templatespecs/id_builtintemplatespec.go index 3ec27645b73..0d2c3a8f409 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/id_builtintemplatespec.go +++ b/resource-manager/resources/2022-02-01/templatespecs/id_builtintemplatespec.go @@ -38,7 +38,7 @@ func ParseBuiltInTemplateSpecID(input string) (*BuiltInTemplateSpecId, error) { } id := BuiltInTemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBuiltInTemplateSpecIDInsensitively(input string) (*BuiltInTemplateSpec } id := BuiltInTemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecs/id_templatespec.go b/resource-manager/resources/2022-02-01/templatespecs/id_templatespec.go index c8ea9c471d3..d4f17bb7ad8 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/id_templatespec.go +++ b/resource-manager/resources/2022-02-01/templatespecs/id_templatespec.go @@ -42,7 +42,7 @@ func ParseTemplateSpecID(input string) (*TemplateSpecId, error) { } id := TemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTemplateSpecIDInsensitively(input string) (*TemplateSpecId, error) { } id := TemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_createorupdate.go b/resource-manager/resources/2022-02-01/templatespecs/method_createorupdate.go index de79595c1ba..d33cb1ac7af 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_createorupdate.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TemplateSpecsClient) CreateOrUpdate(ctx context.Context, id TemplateSpec var model TemplateSpec result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_get.go b/resource-manager/resources/2022-02-01/templatespecs/method_get.go index d0a4c546006..201f249631a 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_get.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c TemplateSpecsClient) Get(ctx context.Context, id TemplateSpecId, options var model TemplateSpec result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_getbuiltin.go b/resource-manager/resources/2022-02-01/templatespecs/method_getbuiltin.go index 9b4982f8375..624862270d6 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_getbuiltin.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_getbuiltin.go @@ -34,6 +34,7 @@ func (o GetBuiltInOperationOptions) ToHeaders() *client.Headers { func (o GetBuiltInOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c TemplateSpecsClient) GetBuiltIn(ctx context.Context, id BuiltInTemplateS var model TemplateSpec result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_listbuiltins.go b/resource-manager/resources/2022-02-01/templatespecs/method_listbuiltins.go index 37e9061198d..a39ae21f6b9 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_listbuiltins.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_listbuiltins.go @@ -39,6 +39,7 @@ func (o ListBuiltInsOperationOptions) ToHeaders() *client.Headers { func (o ListBuiltInsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_listbyresourcegroup.go b/resource-manager/resources/2022-02-01/templatespecs/method_listbyresourcegroup.go index cff36f754e1..e671e25f51e 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_listbyresourcegroup.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_listbysubscription.go b/resource-manager/resources/2022-02-01/templatespecs/method_listbysubscription.go index 68416652d4a..5fdf0ec0deb 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_listbysubscription.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_listbysubscription.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-02-01/templatespecs/method_update.go b/resource-manager/resources/2022-02-01/templatespecs/method_update.go index aa7057699b9..1fa2a2d57a9 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/method_update.go +++ b/resource-manager/resources/2022-02-01/templatespecs/method_update.go @@ -49,7 +49,6 @@ func (c TemplateSpecsClient) Update(ctx context.Context, id TemplateSpecId, inpu var model TemplateSpec result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecs/version.go b/resource-manager/resources/2022-02-01/templatespecs/version.go index cef2a56e9b1..903b3d442d1 100644 --- a/resource-manager/resources/2022-02-01/templatespecs/version.go +++ b/resource-manager/resources/2022-02-01/templatespecs/version.go @@ -1,12 +1,10 @@ package templatespecs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/templatespecs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/templatespecs/2022-02-01" } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/README.md b/resource-manager/resources/2022-02-01/templatespecversions/README.md index 69139c49a84..f531afd8ba7 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/README.md +++ b/resource-manager/resources/2022-02-01/templatespecversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-02-01/templatespecversions` Documentation -The `templatespecversions` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-02-01`). +The `templatespecversions` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-02-01/templatespecversions/client.go b/resource-manager/resources/2022-02-01/templatespecversions/client.go index 7493bcc63fc..e50617573f0 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/client.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/client.go @@ -15,7 +15,7 @@ type TemplateSpecVersionsClient struct { } func NewTemplateSpecVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TemplateSpecVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "templatespecversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "templatespecversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TemplateSpecVersionsClient: %+v", err) } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go b/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go index 9dc22b1a01e..15fae67a620 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/id_builtintemplatespec.go @@ -38,7 +38,7 @@ func ParseBuiltInTemplateSpecID(input string) (*BuiltInTemplateSpecId, error) { } id := BuiltInTemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBuiltInTemplateSpecIDInsensitively(input string) (*BuiltInTemplateSpec } id := BuiltInTemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go b/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go index 480a22e71c5..dcf05bf4327 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/id_templatespec.go @@ -42,7 +42,7 @@ func ParseTemplateSpecID(input string) (*TemplateSpecId, error) { } id := TemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTemplateSpecIDInsensitively(input string) (*TemplateSpecId, error) { } id := TemplateSpecId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go b/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go index 51be51f3478..d39f377704e 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/id_templatespecversion.go @@ -44,7 +44,7 @@ func ParseTemplateSpecVersionID(input string) (*TemplateSpecVersionId, error) { } id := TemplateSpecVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTemplateSpecVersionIDInsensitively(input string) (*TemplateSpecVersion } id := TemplateSpecVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/id_version.go b/resource-manager/resources/2022-02-01/templatespecversions/id_version.go index 34736872df3..cf7065dbf29 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/id_version.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/id_version.go @@ -40,7 +40,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/method_createorupdate.go b/resource-manager/resources/2022-02-01/templatespecversions/method_createorupdate.go index 25dc172f4ff..f86e4450412 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/method_createorupdate.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c TemplateSpecVersionsClient) CreateOrUpdate(ctx context.Context, id Templ var model TemplateSpecVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/method_get.go b/resource-manager/resources/2022-02-01/templatespecversions/method_get.go index b57e439ac64..92e75b262da 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/method_get.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/method_get.go @@ -45,7 +45,6 @@ func (c TemplateSpecVersionsClient) Get(ctx context.Context, id TemplateSpecVers var model TemplateSpecVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/method_getbuiltin.go b/resource-manager/resources/2022-02-01/templatespecversions/method_getbuiltin.go index 08503c4ee95..efcb5327e7f 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/method_getbuiltin.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/method_getbuiltin.go @@ -45,7 +45,6 @@ func (c TemplateSpecVersionsClient) GetBuiltIn(ctx context.Context, id VersionId var model TemplateSpecVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/method_update.go b/resource-manager/resources/2022-02-01/templatespecversions/method_update.go index 787f67bbb74..b692b7b1e8d 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/method_update.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/method_update.go @@ -49,7 +49,6 @@ func (c TemplateSpecVersionsClient) Update(ctx context.Context, id TemplateSpecV var model TemplateSpecVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-02-01/templatespecversions/version.go b/resource-manager/resources/2022-02-01/templatespecversions/version.go index 47cb26ca227..ad318cd3e90 100644 --- a/resource-manager/resources/2022-02-01/templatespecversions/version.go +++ b/resource-manager/resources/2022-02-01/templatespecversions/version.go @@ -1,12 +1,10 @@ package templatespecversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/templatespecversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/templatespecversions/2022-02-01" } diff --git a/resource-manager/resources/2022-06-01/policyassignments/README.md b/resource-manager/resources/2022-06-01/policyassignments/README.md index 13afd4e88e7..32aa27f41a2 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/README.md +++ b/resource-manager/resources/2022-06-01/policyassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-06-01/policyassignments` Documentation -The `policyassignments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-06-01`). +The `policyassignments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-06-01/policyassignments/client.go b/resource-manager/resources/2022-06-01/policyassignments/client.go index 8e17cddc4c7..402c2f10e04 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/client.go +++ b/resource-manager/resources/2022-06-01/policyassignments/client.go @@ -15,7 +15,7 @@ type PolicyAssignmentsClient struct { } func NewPolicyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyAssignmentsClient: %+v", err) } diff --git a/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go b/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go index dd4c7ddf9b7..41961cd4a8a 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go +++ b/resource-manager/resources/2022-06-01/policyassignments/id_policyassignmentid.go @@ -38,7 +38,7 @@ func ParsePolicyAssignmentIdID(input string) (*PolicyAssignmentIdId, error) { } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePolicyAssignmentIdIDInsensitively(input string) (*PolicyAssignmentIdId } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go b/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go index 2ed810504d2..43eaa6934ca 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go +++ b/resource-manager/resources/2022-06-01/policyassignments/id_scopedpolicyassignment.go @@ -40,7 +40,7 @@ func ParseScopedPolicyAssignmentID(input string) (*ScopedPolicyAssignmentId, err } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPolicyAssignmentIDInsensitively(input string) (*ScopedPolicyAssi } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_create.go b/resource-manager/resources/2022-06-01/policyassignments/method_create.go index a532f7d9a19..38593afb7f2 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_create.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_create.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) Create(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_createbyid.go b/resource-manager/resources/2022-06-01/policyassignments/method_createbyid.go index 674d24a20ae..a2a99e106f7 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_createbyid.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_createbyid.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) CreateById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_delete.go b/resource-manager/resources/2022-06-01/policyassignments/method_delete.go index 34fe8c30441..27d5cdb250c 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_delete.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_delete.go @@ -46,7 +46,6 @@ func (c PolicyAssignmentsClient) Delete(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_deletebyid.go b/resource-manager/resources/2022-06-01/policyassignments/method_deletebyid.go index ef64fb62032..336b50d1923 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_deletebyid.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_deletebyid.go @@ -46,7 +46,6 @@ func (c PolicyAssignmentsClient) DeleteById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_get.go b/resource-manager/resources/2022-06-01/policyassignments/method_get.go index 9e8e5bbce83..bf3df6719ea 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_get.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_get.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) Get(ctx context.Context, id ScopedPolicyAssignm var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_getbyid.go b/resource-manager/resources/2022-06-01/policyassignments/method_getbyid.go index 8f0a663b93d..bafd322c39f 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_getbyid.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_getbyid.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) GetById(ctx context.Context, id PolicyAssignmen var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_list.go b/resource-manager/resources/2022-06-01/policyassignments/method_list.go index 78a0fc2e344..39f4c7c0fc9 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_list.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_listformanagementgroup.go b/resource-manager/resources/2022-06-01/policyassignments/method_listformanagementgroup.go index b32ecc0edc4..7abe2300095 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_listformanagementgroup.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_listformanagementgroup.go @@ -41,6 +41,7 @@ func (o ListForManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_listforresource.go b/resource-manager/resources/2022-06-01/policyassignments/method_listforresource.go index 39c781d143a..04e9474c95c 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_listforresource.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_listforresourcegroup.go b/resource-manager/resources/2022-06-01/policyassignments/method_listforresourcegroup.go index 963b981c132..127c89ef46e 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_listforresourcegroup.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_update.go b/resource-manager/resources/2022-06-01/policyassignments/method_update.go index 196a096f894..1f53d65281e 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_update.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_update.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) Update(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/method_updatebyid.go b/resource-manager/resources/2022-06-01/policyassignments/method_updatebyid.go index 840a25a0f98..99e8c69a457 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/method_updatebyid.go +++ b/resource-manager/resources/2022-06-01/policyassignments/method_updatebyid.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) UpdateById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-06-01/policyassignments/version.go b/resource-manager/resources/2022-06-01/policyassignments/version.go index 1b1f00e46be..42a8b90697e 100644 --- a/resource-manager/resources/2022-06-01/policyassignments/version.go +++ b/resource-manager/resources/2022-06-01/policyassignments/version.go @@ -1,12 +1,10 @@ package policyassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyassignments/2022-06-01" } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/README.md b/resource-manager/resources/2022-09-01/deploymentoperations/README.md index e4a6f6c6152..654a8d819c8 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/README.md +++ b/resource-manager/resources/2022-09-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/client.go b/resource-manager/resources/2022-09-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/client.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_deployment.go index 90dd79f6437..944d43c2086 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_deploymentoperation.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_deploymentoperation.go index 9816ebc4072..f81835ca86a 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_deploymentoperation.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_deploymentoperation.go @@ -42,7 +42,7 @@ func ParseDeploymentOperationID(input string) (*DeploymentOperationId, error) { } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentOperationIDInsensitively(input string) (*DeploymentOperation } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_operation.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_operation.go index 9f5f2bbbaa2..e685a25faef 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_operation.go @@ -40,7 +40,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_providerdeployment.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_providerdeployment.go index 54ded88d66c..6ebf482449a 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_providerdeployment.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deployment.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deployment.go index 5117ebdd03f..0581c5f5af9 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deployment.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deploymentoperation.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deploymentoperation.go index 2da36b32fcc..7edf297943a 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deploymentoperation.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_providers2deploymentoperation.go @@ -42,7 +42,7 @@ func ParseProviders2DeploymentOperationID(input string) (*Providers2DeploymentOp } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviders2DeploymentOperationIDInsensitively(input string) (*Providers } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeployment.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeployment.go index a54d3523215..597ddfcecfd 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeployment.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupDeploymentID(input string) (*ResourceGroupDeploymentId, e } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupDeploymentIDInsensitively(input string) (*ResourceGroupDe } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeploymentoperation.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeploymentoperation.go index 4b535c8fba9..913be3aa6d1 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeploymentoperation.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_resourcegroupdeploymentoperation.go @@ -44,7 +44,7 @@ func ParseResourceGroupDeploymentOperationID(input string) (*ResourceGroupDeploy } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceGroupDeploymentOperationIDInsensitively(input string) (*Resour } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_scopeddeployment.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_scopeddeployment.go index 6582e3e01b3..941b9aa87d4 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_scopeddeployment.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/id_scopedoperation.go b/resource-manager/resources/2022-09-01/deploymentoperations/id_scopedoperation.go index f7bf3afbbca..415ed9ea2d8 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/id_scopedoperation.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/id_scopedoperation.go @@ -42,7 +42,7 @@ func ParseScopedOperationID(input string) (*ScopedOperationId, error) { } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedOperationIDInsensitively(input string) (*ScopedOperationId, erro } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_get.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_get.go index 618c9e69440..df47d1fffdc 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id ResourceGroupDep var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatmanagementgroupscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatmanagementgroupscope.go index 73c31e4da46..fcff3ccc385 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Contex var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatscope.go index be6b8e67555..cdacd32c8ce 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtScope(ctx context.Context, id ScopedOpe var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatsubscriptionscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatsubscriptionscope.go index de0f05d1fbb..3182049acbb 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_getattenantscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_getattenantscope.go index 78eaf7864ef..be3409b87cc 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_getattenantscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtTenantScope(ctx context.Context, id Ope var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_list.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_list.go index 31da83cbd35..5f009bc0e62 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatmanagementgroupscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatmanagementgroupscope.go index 8534ab53db5..4cf1c58a63a 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatmanagementgroupscope.go @@ -39,6 +39,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatscope.go index 8840500cb91..f9b99167f0c 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatscope.go @@ -39,6 +39,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatsubscriptionscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatsubscriptionscope.go index e5af43d5147..1465515c921 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_listatsubscriptionscope.go @@ -39,6 +39,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/method_listattenantscope.go b/resource-manager/resources/2022-09-01/deploymentoperations/method_listattenantscope.go index 364b6e78860..e9a41bc9f54 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/method_listattenantscope.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deploymentoperations/version.go b/resource-manager/resources/2022-09-01/deploymentoperations/version.go index 1c5f1ad9504..3c768a670bb 100644 --- a/resource-manager/resources/2022-09-01/deploymentoperations/version.go +++ b/resource-manager/resources/2022-09-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2022-09-01" } diff --git a/resource-manager/resources/2022-09-01/deployments/README.md b/resource-manager/resources/2022-09-01/deployments/README.md index 2ef602442ac..650e98e37c7 100644 --- a/resource-manager/resources/2022-09-01/deployments/README.md +++ b/resource-manager/resources/2022-09-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/deployments/client.go b/resource-manager/resources/2022-09-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2022-09-01/deployments/client.go +++ b/resource-manager/resources/2022-09-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/deployments/id_deployment.go b/resource-manager/resources/2022-09-01/deployments/id_deployment.go index 82731104909..f1d4bb31af3 100644 --- a/resource-manager/resources/2022-09-01/deployments/id_deployment.go +++ b/resource-manager/resources/2022-09-01/deployments/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deployments/id_providerdeployment.go b/resource-manager/resources/2022-09-01/deployments/id_providerdeployment.go index 1baff9237c1..0759c3fbf25 100644 --- a/resource-manager/resources/2022-09-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2022-09-01/deployments/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deployments/id_providers2deployment.go b/resource-manager/resources/2022-09-01/deployments/id_providers2deployment.go index 36d3dab238c..328c93cb501 100644 --- a/resource-manager/resources/2022-09-01/deployments/id_providers2deployment.go +++ b/resource-manager/resources/2022-09-01/deployments/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deployments/id_resourcegroupproviderdeployment.go b/resource-manager/resources/2022-09-01/deployments/id_resourcegroupproviderdeployment.go index c7853b848e9..757bda29f75 100644 --- a/resource-manager/resources/2022-09-01/deployments/id_resourcegroupproviderdeployment.go +++ b/resource-manager/resources/2022-09-01/deployments/id_resourcegroupproviderdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderDeploymentID(input string) (*ResourceGroupProvide } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderDeploymentIDInsensitively(input string) (*Resourc } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deployments/id_scopeddeployment.go b/resource-manager/resources/2022-09-01/deployments/id_scopeddeployment.go index ea41f878c04..330d8edb9b0 100644 --- a/resource-manager/resources/2022-09-01/deployments/id_scopeddeployment.go +++ b/resource-manager/resources/2022-09-01/deployments/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2022-09-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2022-09-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_exporttemplate.go b/resource-manager/resources/2022-09-01/deployments/method_exporttemplate.go index 159587f9deb..9cc11aa5c38 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_exporttemplate.go +++ b/resource-manager/resources/2022-09-01/deployments/method_exporttemplate.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplate(ctx context.Context, id ResourceGroupP var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatmanagementgroupscope.go b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatmanagementgroupscope.go index f2cbce2770b..f701608fff0 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatmanagementgroupscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatmanagementgroupscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Cont var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatscope.go b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatscope.go index 2472bb71773..bf51f90942f 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtScope(ctx context.Context, id ScopedD var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatsubscriptionscope.go b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatsubscriptionscope.go index 37a806dd314..d8d454634f7 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatsubscriptionscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateatsubscriptionscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateattenantscope.go b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateattenantscope.go index 34d8b508070..1f18175bf21 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_exporttemplateattenantscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_exporttemplateattenantscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtTenantScope(ctx context.Context, id D var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_get.go b/resource-manager/resources/2022-09-01/deployments/method_get.go index 1ac0d14f52a..b075492676b 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_get.go +++ b/resource-manager/resources/2022-09-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ResourceGroupProviderDepl var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_getatmanagementgroupscope.go b/resource-manager/resources/2022-09-01/deployments/method_getatmanagementgroupscope.go index bc444e82ea7..96c3414af4c 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, id Pro var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_getatscope.go b/resource-manager/resources/2022-09-01/deployments/method_getatscope.go index c0c03bb1c7a..7a084f6f7ca 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_getatscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtScope(ctx context.Context, id ScopedDeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_getatsubscriptionscope.go b/resource-manager/resources/2022-09-01/deployments/method_getatsubscriptionscope.go index b07a87e692d..92e44fbafca 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, id Provid var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_getattenantscope.go b/resource-manager/resources/2022-09-01/deployments/method_getattenantscope.go index 3e7ab4a1b41..fccae4c0dfa 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_getattenantscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtTenantScope(ctx context.Context, id DeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/deployments/method_listatmanagementgroupscope.go b/resource-manager/resources/2022-09-01/deployments/method_listatmanagementgroupscope.go index d806bd04a35..c0ebef35406 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_listatmanagementgroupscope.go @@ -41,6 +41,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deployments/method_listatscope.go b/resource-manager/resources/2022-09-01/deployments/method_listatscope.go index 1f28434f5ad..40f556a4f8b 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_listatscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_listatscope.go @@ -41,6 +41,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deployments/method_listatsubscriptionscope.go b/resource-manager/resources/2022-09-01/deployments/method_listatsubscriptionscope.go index 045ecbcecdd..4962151485c 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_listatsubscriptionscope.go @@ -41,6 +41,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deployments/method_listattenantscope.go b/resource-manager/resources/2022-09-01/deployments/method_listattenantscope.go index 8527c4383f3..09d08be35ac 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_listattenantscope.go +++ b/resource-manager/resources/2022-09-01/deployments/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deployments/method_listbyresourcegroup.go b/resource-manager/resources/2022-09-01/deployments/method_listbyresourcegroup.go index 6389283885e..6c592704a15 100644 --- a/resource-manager/resources/2022-09-01/deployments/method_listbyresourcegroup.go +++ b/resource-manager/resources/2022-09-01/deployments/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/deployments/version.go b/resource-manager/resources/2022-09-01/deployments/version.go index 965f75be85b..106f18fe398 100644 --- a/resource-manager/resources/2022-09-01/deployments/version.go +++ b/resource-manager/resources/2022-09-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2022-09-01" } diff --git a/resource-manager/resources/2022-09-01/providers/README.md b/resource-manager/resources/2022-09-01/providers/README.md index 476bd35f9bd..f60f54439f6 100644 --- a/resource-manager/resources/2022-09-01/providers/README.md +++ b/resource-manager/resources/2022-09-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/providers/client.go b/resource-manager/resources/2022-09-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2022-09-01/providers/client.go +++ b/resource-manager/resources/2022-09-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/providers/id_provider.go b/resource-manager/resources/2022-09-01/providers/id_provider.go index bb7109d6550..2ea3db4158e 100644 --- a/resource-manager/resources/2022-09-01/providers/id_provider.go +++ b/resource-manager/resources/2022-09-01/providers/id_provider.go @@ -38,7 +38,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/providers/id_providers2.go b/resource-manager/resources/2022-09-01/providers/id_providers2.go index 7b308b2de67..34eb20ab9df 100644 --- a/resource-manager/resources/2022-09-01/providers/id_providers2.go +++ b/resource-manager/resources/2022-09-01/providers/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go b/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go index 970cffaedfa..88e92cbabc5 100644 --- a/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go +++ b/resource-manager/resources/2022-09-01/providers/id_subscriptionprovider.go @@ -40,7 +40,7 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/providers/method_get.go b/resource-manager/resources/2022-09-01/providers/method_get.go index d9ebc641bc3..2a780770db9 100644 --- a/resource-manager/resources/2022-09-01/providers/method_get.go +++ b/resource-manager/resources/2022-09-01/providers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) Get(ctx context.Context, id SubscriptionProviderId, opt var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/providers/method_getattenantscope.go b/resource-manager/resources/2022-09-01/providers/method_getattenantscope.go index 179d43b8f06..18fae99a5b5 100644 --- a/resource-manager/resources/2022-09-01/providers/method_getattenantscope.go +++ b/resource-manager/resources/2022-09-01/providers/method_getattenantscope.go @@ -34,6 +34,7 @@ func (o GetAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o GetAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) GetAtTenantScope(ctx context.Context, id ProviderId, op var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/providers/method_list.go b/resource-manager/resources/2022-09-01/providers/method_list.go index efff36573fc..d255799a080 100644 --- a/resource-manager/resources/2022-09-01/providers/method_list.go +++ b/resource-manager/resources/2022-09-01/providers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/providers/method_listattenantscope.go b/resource-manager/resources/2022-09-01/providers/method_listattenantscope.go index a89644b87b7..6f2329165f2 100644 --- a/resource-manager/resources/2022-09-01/providers/method_listattenantscope.go +++ b/resource-manager/resources/2022-09-01/providers/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/providers/method_providerresourcetypeslist.go b/resource-manager/resources/2022-09-01/providers/method_providerresourcetypeslist.go index b19a58feb1a..f126b5fe436 100644 --- a/resource-manager/resources/2022-09-01/providers/method_providerresourcetypeslist.go +++ b/resource-manager/resources/2022-09-01/providers/method_providerresourcetypeslist.go @@ -39,6 +39,7 @@ func (o ProviderResourceTypesListOperationOptions) ToHeaders() *client.Headers { func (o ProviderResourceTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/providers/method_register.go b/resource-manager/resources/2022-09-01/providers/method_register.go index 4aeee8d7b46..11d8a56a107 100644 --- a/resource-manager/resources/2022-09-01/providers/method_register.go +++ b/resource-manager/resources/2022-09-01/providers/method_register.go @@ -50,7 +50,6 @@ func (c ProvidersClient) Register(ctx context.Context, id SubscriptionProviderId var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/providers/method_unregister.go b/resource-manager/resources/2022-09-01/providers/method_unregister.go index bad323e4b60..02cd514d18a 100644 --- a/resource-manager/resources/2022-09-01/providers/method_unregister.go +++ b/resource-manager/resources/2022-09-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id SubscriptionProvider var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/providers/version.go b/resource-manager/resources/2022-09-01/providers/version.go index 4162fd2dcb6..9a60858ccd1 100644 --- a/resource-manager/resources/2022-09-01/providers/version.go +++ b/resource-manager/resources/2022-09-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2022-09-01" } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/README.md b/resource-manager/resources/2022-09-01/resourcegroups/README.md index 67c00f8ecc9..97fc11ce974 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/README.md +++ b/resource-manager/resources/2022-09-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/resourcegroups/client.go b/resource-manager/resources/2022-09-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/client.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2022-09-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_delete.go b/resource-manager/resources/2022-09-01/resourcegroups/method_delete.go index e3e6402be67..7b9b6b4ff48 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_delete.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_get.go b/resource-manager/resources/2022-09-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_list.go b/resource-manager/resources/2022-09-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_resourceslistbyresourcegroup.go b/resource-manager/resources/2022-09-01/resourcegroups/method_resourceslistbyresourcegroup.go index e739ddc1a69..fc72e1e6ea6 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_resourceslistbyresourcegroup.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_resourceslistbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ResourcesListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o ResourcesListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/method_update.go b/resource-manager/resources/2022-09-01/resourcegroups/method_update.go index 5e386a401ab..0af23ede9e7 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/method_update.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/method_update.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Update(ctx context.Context, id commonids.ResourceG var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/resourcegroups/version.go b/resource-manager/resources/2022-09-01/resourcegroups/version.go index 8d86bc51a00..402ad05a30b 100644 --- a/resource-manager/resources/2022-09-01/resourcegroups/version.go +++ b/resource-manager/resources/2022-09-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2022-09-01" } diff --git a/resource-manager/resources/2022-09-01/resources/README.md b/resource-manager/resources/2022-09-01/resources/README.md index 54ac1c69362..edf803e1b98 100644 --- a/resource-manager/resources/2022-09-01/resources/README.md +++ b/resource-manager/resources/2022-09-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/resources/client.go b/resource-manager/resources/2022-09-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2022-09-01/resources/client.go +++ b/resource-manager/resources/2022-09-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/resources/method_get.go b/resource-manager/resources/2022-09-01/resources/method_get.go index cf2d000f0e0..d2fd91e267d 100644 --- a/resource-manager/resources/2022-09-01/resources/method_get.go +++ b/resource-manager/resources/2022-09-01/resources/method_get.go @@ -46,7 +46,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/resources/method_getbyid.go b/resource-manager/resources/2022-09-01/resources/method_getbyid.go index c872bd020b3..c544e002b57 100644 --- a/resource-manager/resources/2022-09-01/resources/method_getbyid.go +++ b/resource-manager/resources/2022-09-01/resources/method_getbyid.go @@ -46,7 +46,6 @@ func (c ResourcesClient) GetById(ctx context.Context, id commonids.ScopeId) (res var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/resources/method_list.go b/resource-manager/resources/2022-09-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2022-09-01/resources/method_list.go +++ b/resource-manager/resources/2022-09-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2022-09-01/resources/version.go b/resource-manager/resources/2022-09-01/resources/version.go index 601ff0b693b..944436e9a5f 100644 --- a/resource-manager/resources/2022-09-01/resources/version.go +++ b/resource-manager/resources/2022-09-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2022-09-01" } diff --git a/resource-manager/resources/2022-09-01/tags/README.md b/resource-manager/resources/2022-09-01/tags/README.md index d22f5511aff..c0d55f23327 100644 --- a/resource-manager/resources/2022-09-01/tags/README.md +++ b/resource-manager/resources/2022-09-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-09-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-09-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-09-01/tags/client.go b/resource-manager/resources/2022-09-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2022-09-01/tags/client.go +++ b/resource-manager/resources/2022-09-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2022-09-01/tags/id_tagname.go b/resource-manager/resources/2022-09-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2022-09-01/tags/id_tagname.go +++ b/resource-manager/resources/2022-09-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/tags/id_tagvalue.go b/resource-manager/resources/2022-09-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2022-09-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2022-09-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2022-09-01/tags/method_createorupdate.go b/resource-manager/resources/2022-09-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2022-09-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2022-09-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2022-09-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2022-09-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2022-09-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/tags/method_getatscope.go b/resource-manager/resources/2022-09-01/tags/method_getatscope.go index 50af0190576..7f5afb9a8ac 100644 --- a/resource-manager/resources/2022-09-01/tags/method_getatscope.go +++ b/resource-manager/resources/2022-09-01/tags/method_getatscope.go @@ -47,7 +47,6 @@ func (c TagsClient) GetAtScope(ctx context.Context, id commonids.ScopeId) (resul var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-09-01/tags/version.go b/resource-manager/resources/2022-09-01/tags/version.go index 2ffac5a1017..73c5b6b04dd 100644 --- a/resource-manager/resources/2022-09-01/tags/version.go +++ b/resource-manager/resources/2022-09-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2022-09-01" } diff --git a/resource-manager/resources/2022-12-01/subscriptions/README.md b/resource-manager/resources/2022-12-01/subscriptions/README.md index 2ed828afea8..9794bd8a4e0 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/README.md +++ b/resource-manager/resources/2022-12-01/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-12-01/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-12-01`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-12-01/subscriptions/client.go b/resource-manager/resources/2022-12-01/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/client.go +++ b/resource-manager/resources/2022-12-01/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/resources/2022-12-01/subscriptions/method_checkzonepeers.go b/resource-manager/resources/2022-12-01/subscriptions/method_checkzonepeers.go index 6d405dcc9cf..973678b5c73 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/method_checkzonepeers.go +++ b/resource-manager/resources/2022-12-01/subscriptions/method_checkzonepeers.go @@ -51,7 +51,6 @@ func (c SubscriptionsClient) CheckZonePeers(ctx context.Context, id commonids.Su var model CheckZonePeersResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-12-01/subscriptions/method_get.go b/resource-manager/resources/2022-12-01/subscriptions/method_get.go index b282b4a832f..ba4944a31ad 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/method_get.go +++ b/resource-manager/resources/2022-12-01/subscriptions/method_get.go @@ -46,7 +46,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id commonids.SubscriptionI var model Subscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-12-01/subscriptions/method_listlocations.go b/resource-manager/resources/2022-12-01/subscriptions/method_listlocations.go index cb1dc551775..c067a6f1c73 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/method_listlocations.go +++ b/resource-manager/resources/2022-12-01/subscriptions/method_listlocations.go @@ -35,6 +35,7 @@ func (o ListLocationsOperationOptions) ToHeaders() *client.Headers { func (o ListLocationsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SubscriptionsClient) ListLocations(ctx context.Context, id commonids.Sub var model LocationListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-12-01/subscriptions/version.go b/resource-manager/resources/2022-12-01/subscriptions/version.go index fdd4fbe1e58..fa12d5aef14 100644 --- a/resource-manager/resources/2022-12-01/subscriptions/version.go +++ b/resource-manager/resources/2022-12-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2022-12-01" } diff --git a/resource-manager/resources/2022-12-01/tenants/README.md b/resource-manager/resources/2022-12-01/tenants/README.md index 72ed8cfac00..b383ee68b4e 100644 --- a/resource-manager/resources/2022-12-01/tenants/README.md +++ b/resource-manager/resources/2022-12-01/tenants/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2022-12-01/tenants` Documentation -The `tenants` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2022-12-01`). +The `tenants` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2022-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2022-12-01/tenants/client.go b/resource-manager/resources/2022-12-01/tenants/client.go index 1be7e109076..d384e59d77e 100644 --- a/resource-manager/resources/2022-12-01/tenants/client.go +++ b/resource-manager/resources/2022-12-01/tenants/client.go @@ -15,7 +15,7 @@ type TenantsClient struct { } func NewTenantsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tenants", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tenants", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TenantsClient: %+v", err) } diff --git a/resource-manager/resources/2022-12-01/tenants/method_checkresourcename.go b/resource-manager/resources/2022-12-01/tenants/method_checkresourcename.go index 8e2aa51e8f4..2cfec883352 100644 --- a/resource-manager/resources/2022-12-01/tenants/method_checkresourcename.go +++ b/resource-manager/resources/2022-12-01/tenants/method_checkresourcename.go @@ -49,7 +49,6 @@ func (c TenantsClient) CheckResourceName(ctx context.Context, input ResourceName var model CheckResourceNameResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2022-12-01/tenants/version.go b/resource-manager/resources/2022-12-01/tenants/version.go index 377c65efb4a..3e8a92648a6 100644 --- a/resource-manager/resources/2022-12-01/tenants/version.go +++ b/resource-manager/resources/2022-12-01/tenants/version.go @@ -1,12 +1,10 @@ package tenants -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tenants/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tenants/2022-12-01" } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/README.md b/resource-manager/resources/2023-07-01/deploymentoperations/README.md index c7b65f54db4..8fdd94ac2b5 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/README.md +++ b/resource-manager/resources/2023-07-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/client.go b/resource-manager/resources/2023-07-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/client.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_deployment.go index 90dd79f6437..944d43c2086 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_deploymentoperation.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_deploymentoperation.go index 9816ebc4072..f81835ca86a 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_deploymentoperation.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_deploymentoperation.go @@ -42,7 +42,7 @@ func ParseDeploymentOperationID(input string) (*DeploymentOperationId, error) { } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentOperationIDInsensitively(input string) (*DeploymentOperation } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_operation.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_operation.go index 9f5f2bbbaa2..e685a25faef 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_operation.go @@ -40,7 +40,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_providerdeployment.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_providerdeployment.go index 54ded88d66c..6ebf482449a 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_providerdeployment.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deployment.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deployment.go index 5117ebdd03f..0581c5f5af9 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deployment.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deploymentoperation.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deploymentoperation.go index 2da36b32fcc..7edf297943a 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deploymentoperation.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_providers2deploymentoperation.go @@ -42,7 +42,7 @@ func ParseProviders2DeploymentOperationID(input string) (*Providers2DeploymentOp } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviders2DeploymentOperationIDInsensitively(input string) (*Providers } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeployment.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeployment.go index a54d3523215..597ddfcecfd 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeployment.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupDeploymentID(input string) (*ResourceGroupDeploymentId, e } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupDeploymentIDInsensitively(input string) (*ResourceGroupDe } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go index 4b535c8fba9..913be3aa6d1 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go @@ -44,7 +44,7 @@ func ParseResourceGroupDeploymentOperationID(input string) (*ResourceGroupDeploy } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceGroupDeploymentOperationIDInsensitively(input string) (*Resour } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_scopeddeployment.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_scopeddeployment.go index 6582e3e01b3..941b9aa87d4 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_scopeddeployment.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/id_scopedoperation.go b/resource-manager/resources/2023-07-01/deploymentoperations/id_scopedoperation.go index f7bf3afbbca..415ed9ea2d8 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/id_scopedoperation.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/id_scopedoperation.go @@ -42,7 +42,7 @@ func ParseScopedOperationID(input string) (*ScopedOperationId, error) { } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedOperationIDInsensitively(input string) (*ScopedOperationId, erro } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_get.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_get.go index 618c9e69440..df47d1fffdc 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id ResourceGroupDep var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatmanagementgroupscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatmanagementgroupscope.go index 73c31e4da46..fcff3ccc385 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Contex var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatscope.go index be6b8e67555..cdacd32c8ce 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtScope(ctx context.Context, id ScopedOpe var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatsubscriptionscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatsubscriptionscope.go index de0f05d1fbb..3182049acbb 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_getattenantscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_getattenantscope.go index 78eaf7864ef..be3409b87cc 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_getattenantscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtTenantScope(ctx context.Context, id Ope var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_list.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_list.go index 31da83cbd35..5f009bc0e62 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatmanagementgroupscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatmanagementgroupscope.go index 8534ab53db5..4cf1c58a63a 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatmanagementgroupscope.go @@ -39,6 +39,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatscope.go index 8840500cb91..f9b99167f0c 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatscope.go @@ -39,6 +39,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatsubscriptionscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatsubscriptionscope.go index e5af43d5147..1465515c921 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_listatsubscriptionscope.go @@ -39,6 +39,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/method_listattenantscope.go b/resource-manager/resources/2023-07-01/deploymentoperations/method_listattenantscope.go index 364b6e78860..e9a41bc9f54 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/method_listattenantscope.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deploymentoperations/version.go b/resource-manager/resources/2023-07-01/deploymentoperations/version.go index 8b71287462f..cb4adf02deb 100644 --- a/resource-manager/resources/2023-07-01/deploymentoperations/version.go +++ b/resource-manager/resources/2023-07-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2023-07-01" } diff --git a/resource-manager/resources/2023-07-01/deployments/README.md b/resource-manager/resources/2023-07-01/deployments/README.md index 3c510f65202..2f04757a5e9 100644 --- a/resource-manager/resources/2023-07-01/deployments/README.md +++ b/resource-manager/resources/2023-07-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/deployments/client.go b/resource-manager/resources/2023-07-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2023-07-01/deployments/client.go +++ b/resource-manager/resources/2023-07-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/deployments/id_deployment.go b/resource-manager/resources/2023-07-01/deployments/id_deployment.go index 82731104909..f1d4bb31af3 100644 --- a/resource-manager/resources/2023-07-01/deployments/id_deployment.go +++ b/resource-manager/resources/2023-07-01/deployments/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deployments/id_providerdeployment.go b/resource-manager/resources/2023-07-01/deployments/id_providerdeployment.go index 1baff9237c1..0759c3fbf25 100644 --- a/resource-manager/resources/2023-07-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2023-07-01/deployments/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deployments/id_providers2deployment.go b/resource-manager/resources/2023-07-01/deployments/id_providers2deployment.go index 36d3dab238c..328c93cb501 100644 --- a/resource-manager/resources/2023-07-01/deployments/id_providers2deployment.go +++ b/resource-manager/resources/2023-07-01/deployments/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deployments/id_resourcegroupproviderdeployment.go b/resource-manager/resources/2023-07-01/deployments/id_resourcegroupproviderdeployment.go index c7853b848e9..757bda29f75 100644 --- a/resource-manager/resources/2023-07-01/deployments/id_resourcegroupproviderdeployment.go +++ b/resource-manager/resources/2023-07-01/deployments/id_resourcegroupproviderdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderDeploymentID(input string) (*ResourceGroupProvide } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderDeploymentIDInsensitively(input string) (*Resourc } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deployments/id_scopeddeployment.go b/resource-manager/resources/2023-07-01/deployments/id_scopeddeployment.go index ea41f878c04..330d8edb9b0 100644 --- a/resource-manager/resources/2023-07-01/deployments/id_scopeddeployment.go +++ b/resource-manager/resources/2023-07-01/deployments/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2023-07-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2023-07-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_exporttemplate.go b/resource-manager/resources/2023-07-01/deployments/method_exporttemplate.go index 159587f9deb..9cc11aa5c38 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_exporttemplate.go +++ b/resource-manager/resources/2023-07-01/deployments/method_exporttemplate.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplate(ctx context.Context, id ResourceGroupP var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatmanagementgroupscope.go b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatmanagementgroupscope.go index f2cbce2770b..f701608fff0 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatmanagementgroupscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatmanagementgroupscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Cont var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatscope.go b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatscope.go index 2472bb71773..bf51f90942f 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtScope(ctx context.Context, id ScopedD var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatsubscriptionscope.go b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatsubscriptionscope.go index 37a806dd314..d8d454634f7 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatsubscriptionscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateatsubscriptionscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateattenantscope.go b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateattenantscope.go index 34d8b508070..1f18175bf21 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_exporttemplateattenantscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_exporttemplateattenantscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtTenantScope(ctx context.Context, id D var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_get.go b/resource-manager/resources/2023-07-01/deployments/method_get.go index 1ac0d14f52a..b075492676b 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_get.go +++ b/resource-manager/resources/2023-07-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ResourceGroupProviderDepl var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_getatmanagementgroupscope.go b/resource-manager/resources/2023-07-01/deployments/method_getatmanagementgroupscope.go index bc444e82ea7..96c3414af4c 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, id Pro var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_getatscope.go b/resource-manager/resources/2023-07-01/deployments/method_getatscope.go index c0c03bb1c7a..7a084f6f7ca 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_getatscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtScope(ctx context.Context, id ScopedDeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_getatsubscriptionscope.go b/resource-manager/resources/2023-07-01/deployments/method_getatsubscriptionscope.go index b07a87e692d..92e44fbafca 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, id Provid var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_getattenantscope.go b/resource-manager/resources/2023-07-01/deployments/method_getattenantscope.go index 3e7ab4a1b41..fccae4c0dfa 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_getattenantscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtTenantScope(ctx context.Context, id DeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/deployments/method_listatmanagementgroupscope.go b/resource-manager/resources/2023-07-01/deployments/method_listatmanagementgroupscope.go index d806bd04a35..c0ebef35406 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_listatmanagementgroupscope.go @@ -41,6 +41,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deployments/method_listatscope.go b/resource-manager/resources/2023-07-01/deployments/method_listatscope.go index 1f28434f5ad..40f556a4f8b 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_listatscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_listatscope.go @@ -41,6 +41,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deployments/method_listatsubscriptionscope.go b/resource-manager/resources/2023-07-01/deployments/method_listatsubscriptionscope.go index 045ecbcecdd..4962151485c 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_listatsubscriptionscope.go @@ -41,6 +41,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deployments/method_listattenantscope.go b/resource-manager/resources/2023-07-01/deployments/method_listattenantscope.go index 8527c4383f3..09d08be35ac 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_listattenantscope.go +++ b/resource-manager/resources/2023-07-01/deployments/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deployments/method_listbyresourcegroup.go b/resource-manager/resources/2023-07-01/deployments/method_listbyresourcegroup.go index 6389283885e..6c592704a15 100644 --- a/resource-manager/resources/2023-07-01/deployments/method_listbyresourcegroup.go +++ b/resource-manager/resources/2023-07-01/deployments/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/deployments/version.go b/resource-manager/resources/2023-07-01/deployments/version.go index 5119eb53279..38d90784d13 100644 --- a/resource-manager/resources/2023-07-01/deployments/version.go +++ b/resource-manager/resources/2023-07-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2023-07-01" } diff --git a/resource-manager/resources/2023-07-01/providers/README.md b/resource-manager/resources/2023-07-01/providers/README.md index e7f3e0b32fc..337ccc5c60a 100644 --- a/resource-manager/resources/2023-07-01/providers/README.md +++ b/resource-manager/resources/2023-07-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/providers/client.go b/resource-manager/resources/2023-07-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2023-07-01/providers/client.go +++ b/resource-manager/resources/2023-07-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/providers/id_provider.go b/resource-manager/resources/2023-07-01/providers/id_provider.go index bb7109d6550..2ea3db4158e 100644 --- a/resource-manager/resources/2023-07-01/providers/id_provider.go +++ b/resource-manager/resources/2023-07-01/providers/id_provider.go @@ -38,7 +38,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/providers/id_providers2.go b/resource-manager/resources/2023-07-01/providers/id_providers2.go index 7b308b2de67..34eb20ab9df 100644 --- a/resource-manager/resources/2023-07-01/providers/id_providers2.go +++ b/resource-manager/resources/2023-07-01/providers/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/providers/id_subscriptionprovider.go b/resource-manager/resources/2023-07-01/providers/id_subscriptionprovider.go index 970cffaedfa..88e92cbabc5 100644 --- a/resource-manager/resources/2023-07-01/providers/id_subscriptionprovider.go +++ b/resource-manager/resources/2023-07-01/providers/id_subscriptionprovider.go @@ -40,7 +40,7 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/providers/method_get.go b/resource-manager/resources/2023-07-01/providers/method_get.go index d9ebc641bc3..2a780770db9 100644 --- a/resource-manager/resources/2023-07-01/providers/method_get.go +++ b/resource-manager/resources/2023-07-01/providers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) Get(ctx context.Context, id SubscriptionProviderId, opt var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/providers/method_getattenantscope.go b/resource-manager/resources/2023-07-01/providers/method_getattenantscope.go index 179d43b8f06..18fae99a5b5 100644 --- a/resource-manager/resources/2023-07-01/providers/method_getattenantscope.go +++ b/resource-manager/resources/2023-07-01/providers/method_getattenantscope.go @@ -34,6 +34,7 @@ func (o GetAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o GetAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) GetAtTenantScope(ctx context.Context, id ProviderId, op var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/providers/method_list.go b/resource-manager/resources/2023-07-01/providers/method_list.go index efff36573fc..d255799a080 100644 --- a/resource-manager/resources/2023-07-01/providers/method_list.go +++ b/resource-manager/resources/2023-07-01/providers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/providers/method_listattenantscope.go b/resource-manager/resources/2023-07-01/providers/method_listattenantscope.go index a89644b87b7..6f2329165f2 100644 --- a/resource-manager/resources/2023-07-01/providers/method_listattenantscope.go +++ b/resource-manager/resources/2023-07-01/providers/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/providers/method_providerresourcetypeslist.go b/resource-manager/resources/2023-07-01/providers/method_providerresourcetypeslist.go index b19a58feb1a..f126b5fe436 100644 --- a/resource-manager/resources/2023-07-01/providers/method_providerresourcetypeslist.go +++ b/resource-manager/resources/2023-07-01/providers/method_providerresourcetypeslist.go @@ -39,6 +39,7 @@ func (o ProviderResourceTypesListOperationOptions) ToHeaders() *client.Headers { func (o ProviderResourceTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/providers/method_register.go b/resource-manager/resources/2023-07-01/providers/method_register.go index 4aeee8d7b46..11d8a56a107 100644 --- a/resource-manager/resources/2023-07-01/providers/method_register.go +++ b/resource-manager/resources/2023-07-01/providers/method_register.go @@ -50,7 +50,6 @@ func (c ProvidersClient) Register(ctx context.Context, id SubscriptionProviderId var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/providers/method_unregister.go b/resource-manager/resources/2023-07-01/providers/method_unregister.go index bad323e4b60..02cd514d18a 100644 --- a/resource-manager/resources/2023-07-01/providers/method_unregister.go +++ b/resource-manager/resources/2023-07-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id SubscriptionProvider var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/providers/version.go b/resource-manager/resources/2023-07-01/providers/version.go index a0fd00be641..b2e3f9b9658 100644 --- a/resource-manager/resources/2023-07-01/providers/version.go +++ b/resource-manager/resources/2023-07-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2023-07-01" } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/README.md b/resource-manager/resources/2023-07-01/resourcegroups/README.md index 44f066eb561..a9ebe042f4b 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/README.md +++ b/resource-manager/resources/2023-07-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/resourcegroups/client.go b/resource-manager/resources/2023-07-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/client.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2023-07-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_delete.go b/resource-manager/resources/2023-07-01/resourcegroups/method_delete.go index e3e6402be67..7b9b6b4ff48 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_delete.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_get.go b/resource-manager/resources/2023-07-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_list.go b/resource-manager/resources/2023-07-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_resourceslistbyresourcegroup.go b/resource-manager/resources/2023-07-01/resourcegroups/method_resourceslistbyresourcegroup.go index e739ddc1a69..fc72e1e6ea6 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_resourceslistbyresourcegroup.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_resourceslistbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ResourcesListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o ResourcesListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/method_update.go b/resource-manager/resources/2023-07-01/resourcegroups/method_update.go index 5e386a401ab..0af23ede9e7 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/method_update.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/method_update.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Update(ctx context.Context, id commonids.ResourceG var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/resourcegroups/version.go b/resource-manager/resources/2023-07-01/resourcegroups/version.go index 6914f8ff0ff..868aff97ec6 100644 --- a/resource-manager/resources/2023-07-01/resourcegroups/version.go +++ b/resource-manager/resources/2023-07-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2023-07-01" } diff --git a/resource-manager/resources/2023-07-01/resources/README.md b/resource-manager/resources/2023-07-01/resources/README.md index b8dfa361f52..4c461da8761 100644 --- a/resource-manager/resources/2023-07-01/resources/README.md +++ b/resource-manager/resources/2023-07-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/resources/client.go b/resource-manager/resources/2023-07-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2023-07-01/resources/client.go +++ b/resource-manager/resources/2023-07-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/resources/method_get.go b/resource-manager/resources/2023-07-01/resources/method_get.go index cf2d000f0e0..d2fd91e267d 100644 --- a/resource-manager/resources/2023-07-01/resources/method_get.go +++ b/resource-manager/resources/2023-07-01/resources/method_get.go @@ -46,7 +46,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/resources/method_getbyid.go b/resource-manager/resources/2023-07-01/resources/method_getbyid.go index c872bd020b3..c544e002b57 100644 --- a/resource-manager/resources/2023-07-01/resources/method_getbyid.go +++ b/resource-manager/resources/2023-07-01/resources/method_getbyid.go @@ -46,7 +46,6 @@ func (c ResourcesClient) GetById(ctx context.Context, id commonids.ScopeId) (res var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/resources/method_list.go b/resource-manager/resources/2023-07-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2023-07-01/resources/method_list.go +++ b/resource-manager/resources/2023-07-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2023-07-01/resources/version.go b/resource-manager/resources/2023-07-01/resources/version.go index 21e36975549..cf2fa55153b 100644 --- a/resource-manager/resources/2023-07-01/resources/version.go +++ b/resource-manager/resources/2023-07-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2023-07-01" } diff --git a/resource-manager/resources/2023-07-01/tags/README.md b/resource-manager/resources/2023-07-01/tags/README.md index 61f365bbcab..a5cd2cd25c3 100644 --- a/resource-manager/resources/2023-07-01/tags/README.md +++ b/resource-manager/resources/2023-07-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-07-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-07-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-07-01/tags/client.go b/resource-manager/resources/2023-07-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2023-07-01/tags/client.go +++ b/resource-manager/resources/2023-07-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2023-07-01/tags/id_tagname.go b/resource-manager/resources/2023-07-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2023-07-01/tags/id_tagname.go +++ b/resource-manager/resources/2023-07-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/tags/id_tagvalue.go b/resource-manager/resources/2023-07-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2023-07-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2023-07-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-07-01/tags/method_createorupdate.go b/resource-manager/resources/2023-07-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2023-07-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2023-07-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2023-07-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2023-07-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2023-07-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/tags/method_getatscope.go b/resource-manager/resources/2023-07-01/tags/method_getatscope.go index 50af0190576..7f5afb9a8ac 100644 --- a/resource-manager/resources/2023-07-01/tags/method_getatscope.go +++ b/resource-manager/resources/2023-07-01/tags/method_getatscope.go @@ -47,7 +47,6 @@ func (c TagsClient) GetAtScope(ctx context.Context, id commonids.ScopeId) (resul var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-07-01/tags/version.go b/resource-manager/resources/2023-07-01/tags/version.go index c0dcd7cbde7..2782f2c42a2 100644 --- a/resource-manager/resources/2023-07-01/tags/version.go +++ b/resource-manager/resources/2023-07-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2023-07-01" } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/README.md b/resource-manager/resources/2023-08-01/deploymentscripts/README.md index 92e6fa2e035..b7970d6e163 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/README.md +++ b/resource-manager/resources/2023-08-01/deploymentscripts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2023-08-01/deploymentscripts` Documentation -The `deploymentscripts` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2023-08-01`). +The `deploymentscripts` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2023-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/client.go b/resource-manager/resources/2023-08-01/deploymentscripts/client.go index f769ada7091..909bfb813a4 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/client.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/client.go @@ -15,7 +15,7 @@ type DeploymentScriptsClient struct { } func NewDeploymentScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentScriptsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentscripts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentscripts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentScriptsClient: %+v", err) } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/id_deploymentscript.go b/resource-manager/resources/2023-08-01/deploymentscripts/id_deploymentscript.go index cb29b3947de..d04e8056f89 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/id_deploymentscript.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/id_deploymentscript.go @@ -42,7 +42,7 @@ func ParseDeploymentScriptID(input string) (*DeploymentScriptId, error) { } id := DeploymentScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentScriptIDInsensitively(input string) (*DeploymentScriptId, er } id := DeploymentScriptId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_create.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_create.go index c248110b7f5..44670dd302a 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_create.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_create.go @@ -18,7 +18,7 @@ type CreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Create ... diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_get.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_get.go index 62510f6e60f..5963268db14 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_get.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Get ... @@ -48,11 +48,11 @@ func (c DeploymentScriptsClient) Get(ctx context.Context, id DeploymentScriptId) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDeploymentScriptImplementation(respObj) + model, err := UnmarshalDeploymentScriptImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogs.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogs.go index e734be7b1c4..62d5f16bda9 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogs.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogs.go @@ -46,7 +46,6 @@ func (c DeploymentScriptsClient) GetLogs(ctx context.Context, id DeploymentScrip var model ScriptLogsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogsdefault.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogsdefault.go index 2876a3ebc28..0de9e165741 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogsdefault.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_getlogsdefault.go @@ -34,6 +34,7 @@ func (o GetLogsDefaultOperationOptions) ToHeaders() *client.Headers { func (o GetLogsDefaultOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c DeploymentScriptsClient) GetLogsDefault(ctx context.Context, id Deployme var model ScriptLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_listbyresourcegroup.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_listbyresourcegroup.go index 85bb5985bd8..3448e8f9c4d 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_listbyresourcegroup.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_listbyresourcegroup.go @@ -74,7 +74,7 @@ func (c DeploymentScriptsClient) ListByResourceGroup(ctx context.Context, id com temp := make([]DeploymentScript, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDeploymentScriptImplementation(v) + val, err := UnmarshalDeploymentScriptImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_listbysubscription.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_listbysubscription.go index 854e3b342b9..669cd76547e 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_listbysubscription.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_listbysubscription.go @@ -74,7 +74,7 @@ func (c DeploymentScriptsClient) ListBySubscription(ctx context.Context, id comm temp := make([]DeploymentScript, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDeploymentScriptImplementation(v) + val, err := UnmarshalDeploymentScriptImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DeploymentScript (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/method_update.go b/resource-manager/resources/2023-08-01/deploymentscripts/method_update.go index 9c84c2f55cd..c905916b2bb 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/method_update.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/method_update.go @@ -15,7 +15,7 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DeploymentScript + Model DeploymentScript } // Update ... @@ -52,11 +52,11 @@ func (c DeploymentScriptsClient) Update(ctx context.Context, id DeploymentScript if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDeploymentScriptImplementation(respObj) + model, err := UnmarshalDeploymentScriptImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/model_azurecliscript.go b/resource-manager/resources/2023-08-01/deploymentscripts/model_azurecliscript.go index dee5017e10c..d45b7f5abb9 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/model_azurecliscript.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/model_azurecliscript.go @@ -17,8 +17,10 @@ type AzureCliScript struct { Properties AzureCliScriptProperties `json:"properties"` // Fields inherited from DeploymentScript + Id *string `json:"id,omitempty"` Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` @@ -26,6 +28,19 @@ type AzureCliScript struct { Type *string `json:"type,omitempty"` } +func (s AzureCliScript) DeploymentScript() BaseDeploymentScriptImpl { + return BaseDeploymentScriptImpl{ + Id: s.Id, + Identity: s.Identity, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + SystemData: s.SystemData, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = AzureCliScript{} func (s AzureCliScript) MarshalJSON() ([]byte, error) { @@ -37,9 +52,10 @@ func (s AzureCliScript) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureCliScript: %+v", err) } + decoded["kind"] = "AzureCLI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/model_azurepowershellscript.go b/resource-manager/resources/2023-08-01/deploymentscripts/model_azurepowershellscript.go index d6847b26436..bf5062d8838 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/model_azurepowershellscript.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/model_azurepowershellscript.go @@ -17,8 +17,10 @@ type AzurePowerShellScript struct { Properties AzurePowerShellScriptProperties `json:"properties"` // Fields inherited from DeploymentScript + Id *string `json:"id,omitempty"` Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` @@ -26,6 +28,19 @@ type AzurePowerShellScript struct { Type *string `json:"type,omitempty"` } +func (s AzurePowerShellScript) DeploymentScript() BaseDeploymentScriptImpl { + return BaseDeploymentScriptImpl{ + Id: s.Id, + Identity: s.Identity, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + SystemData: s.SystemData, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = AzurePowerShellScript{} func (s AzurePowerShellScript) MarshalJSON() ([]byte, error) { @@ -37,9 +52,10 @@ func (s AzurePowerShellScript) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzurePowerShellScript: %+v", err) } + decoded["kind"] = "AzurePowerShell" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/model_deploymentscript.go b/resource-manager/resources/2023-08-01/deploymentscripts/model_deploymentscript.go index bb259806d61..91798772706 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/model_deploymentscript.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/model_deploymentscript.go @@ -4,24 +4,51 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DeploymentScript interface { + DeploymentScript() BaseDeploymentScriptImpl +} + +var _ DeploymentScript = BaseDeploymentScriptImpl{} + +type BaseDeploymentScriptImpl struct { + Id *string `json:"id,omitempty"` + Identity *identity.UserAssignedMap `json:"identity,omitempty"` + Kind ScriptType `json:"kind"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDeploymentScriptImpl) DeploymentScript() BaseDeploymentScriptImpl { + return s } -// RawDeploymentScriptImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DeploymentScript = RawDeploymentScriptImpl{} + +// RawDeploymentScriptImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDeploymentScriptImpl struct { - Type string - Values map[string]interface{} + deploymentScript BaseDeploymentScriptImpl + Type string + Values map[string]interface{} } -func unmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, error) { +func (s RawDeploymentScriptImpl) DeploymentScript() BaseDeploymentScriptImpl { + return s.deploymentScript +} + +func UnmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, error) { if input == nil { return nil, nil } @@ -52,10 +79,15 @@ func unmarshalDeploymentScriptImplementation(input []byte) (DeploymentScript, er return out, nil } - out := RawDeploymentScriptImpl{ - Type: value, - Values: temp, + var parent BaseDeploymentScriptImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDeploymentScriptImpl: %+v", err) } - return out, nil + + return RawDeploymentScriptImpl{ + deploymentScript: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/resources/2023-08-01/deploymentscripts/version.go b/resource-manager/resources/2023-08-01/deploymentscripts/version.go index 19b3db73690..1d29561c0e5 100644 --- a/resource-manager/resources/2023-08-01/deploymentscripts/version.go +++ b/resource-manager/resources/2023-08-01/deploymentscripts/version.go @@ -1,12 +1,10 @@ package deploymentscripts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentscripts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentscripts/2023-08-01" } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/README.md b/resource-manager/resources/2024-03-01/deploymentoperations/README.md index febb7505ff2..7504bd7674f 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/README.md +++ b/resource-manager/resources/2024-03-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/client.go b/resource-manager/resources/2024-03-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/client.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_deployment.go index 90dd79f6437..944d43c2086 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_deploymentoperation.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_deploymentoperation.go index 9816ebc4072..f81835ca86a 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_deploymentoperation.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_deploymentoperation.go @@ -42,7 +42,7 @@ func ParseDeploymentOperationID(input string) (*DeploymentOperationId, error) { } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentOperationIDInsensitively(input string) (*DeploymentOperation } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_operation.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_operation.go index 9f5f2bbbaa2..e685a25faef 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_operation.go @@ -40,7 +40,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_providerdeployment.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_providerdeployment.go index 54ded88d66c..6ebf482449a 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_providerdeployment.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deployment.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deployment.go index 5117ebdd03f..0581c5f5af9 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deployment.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deploymentoperation.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deploymentoperation.go index 2da36b32fcc..7edf297943a 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deploymentoperation.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_providers2deploymentoperation.go @@ -42,7 +42,7 @@ func ParseProviders2DeploymentOperationID(input string) (*Providers2DeploymentOp } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviders2DeploymentOperationIDInsensitively(input string) (*Providers } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeployment.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeployment.go index a54d3523215..597ddfcecfd 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeployment.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupDeploymentID(input string) (*ResourceGroupDeploymentId, e } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupDeploymentIDInsensitively(input string) (*ResourceGroupDe } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeploymentoperation.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeploymentoperation.go index 4b535c8fba9..913be3aa6d1 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeploymentoperation.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_resourcegroupdeploymentoperation.go @@ -44,7 +44,7 @@ func ParseResourceGroupDeploymentOperationID(input string) (*ResourceGroupDeploy } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceGroupDeploymentOperationIDInsensitively(input string) (*Resour } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_scopeddeployment.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_scopeddeployment.go index 6582e3e01b3..941b9aa87d4 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_scopeddeployment.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/id_scopedoperation.go b/resource-manager/resources/2024-03-01/deploymentoperations/id_scopedoperation.go index f7bf3afbbca..415ed9ea2d8 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/id_scopedoperation.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/id_scopedoperation.go @@ -42,7 +42,7 @@ func ParseScopedOperationID(input string) (*ScopedOperationId, error) { } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedOperationIDInsensitively(input string) (*ScopedOperationId, erro } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_get.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_get.go index 618c9e69440..df47d1fffdc 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id ResourceGroupDep var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatmanagementgroupscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatmanagementgroupscope.go index 73c31e4da46..fcff3ccc385 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Contex var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatscope.go index be6b8e67555..cdacd32c8ce 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtScope(ctx context.Context, id ScopedOpe var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatsubscriptionscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatsubscriptionscope.go index de0f05d1fbb..3182049acbb 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_getattenantscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_getattenantscope.go index 78eaf7864ef..be3409b87cc 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_getattenantscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtTenantScope(ctx context.Context, id Ope var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_list.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_list.go index 31da83cbd35..5f009bc0e62 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatmanagementgroupscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatmanagementgroupscope.go index 8534ab53db5..4cf1c58a63a 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatmanagementgroupscope.go @@ -39,6 +39,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatscope.go index 8840500cb91..f9b99167f0c 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatscope.go @@ -39,6 +39,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatsubscriptionscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatsubscriptionscope.go index e5af43d5147..1465515c921 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_listatsubscriptionscope.go @@ -39,6 +39,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/method_listattenantscope.go b/resource-manager/resources/2024-03-01/deploymentoperations/method_listattenantscope.go index 364b6e78860..e9a41bc9f54 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/method_listattenantscope.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentoperations/version.go b/resource-manager/resources/2024-03-01/deploymentoperations/version.go index cf8d2d00dc4..0c2cd50625a 100644 --- a/resource-manager/resources/2024-03-01/deploymentoperations/version.go +++ b/resource-manager/resources/2024-03-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/deployments/README.md b/resource-manager/resources/2024-03-01/deployments/README.md index fe67d6e9548..08d2693fe24 100644 --- a/resource-manager/resources/2024-03-01/deployments/README.md +++ b/resource-manager/resources/2024-03-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/deployments/client.go b/resource-manager/resources/2024-03-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2024-03-01/deployments/client.go +++ b/resource-manager/resources/2024-03-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/deployments/id_deployment.go b/resource-manager/resources/2024-03-01/deployments/id_deployment.go index 82731104909..f1d4bb31af3 100644 --- a/resource-manager/resources/2024-03-01/deployments/id_deployment.go +++ b/resource-manager/resources/2024-03-01/deployments/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deployments/id_providerdeployment.go b/resource-manager/resources/2024-03-01/deployments/id_providerdeployment.go index 1baff9237c1..0759c3fbf25 100644 --- a/resource-manager/resources/2024-03-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2024-03-01/deployments/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deployments/id_providers2deployment.go b/resource-manager/resources/2024-03-01/deployments/id_providers2deployment.go index 36d3dab238c..328c93cb501 100644 --- a/resource-manager/resources/2024-03-01/deployments/id_providers2deployment.go +++ b/resource-manager/resources/2024-03-01/deployments/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deployments/id_resourcegroupproviderdeployment.go b/resource-manager/resources/2024-03-01/deployments/id_resourcegroupproviderdeployment.go index c7853b848e9..757bda29f75 100644 --- a/resource-manager/resources/2024-03-01/deployments/id_resourcegroupproviderdeployment.go +++ b/resource-manager/resources/2024-03-01/deployments/id_resourcegroupproviderdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderDeploymentID(input string) (*ResourceGroupProvide } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderDeploymentIDInsensitively(input string) (*Resourc } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deployments/id_scopeddeployment.go b/resource-manager/resources/2024-03-01/deployments/id_scopeddeployment.go index ea41f878c04..330d8edb9b0 100644 --- a/resource-manager/resources/2024-03-01/deployments/id_scopeddeployment.go +++ b/resource-manager/resources/2024-03-01/deployments/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2024-03-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2024-03-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_exporttemplate.go b/resource-manager/resources/2024-03-01/deployments/method_exporttemplate.go index 159587f9deb..9cc11aa5c38 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_exporttemplate.go +++ b/resource-manager/resources/2024-03-01/deployments/method_exporttemplate.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplate(ctx context.Context, id ResourceGroupP var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatmanagementgroupscope.go b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatmanagementgroupscope.go index f2cbce2770b..f701608fff0 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatmanagementgroupscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatmanagementgroupscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Cont var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatscope.go b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatscope.go index 2472bb71773..bf51f90942f 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtScope(ctx context.Context, id ScopedD var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatsubscriptionscope.go b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatsubscriptionscope.go index 37a806dd314..d8d454634f7 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatsubscriptionscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateatsubscriptionscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateattenantscope.go b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateattenantscope.go index 34d8b508070..1f18175bf21 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_exporttemplateattenantscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_exporttemplateattenantscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtTenantScope(ctx context.Context, id D var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_get.go b/resource-manager/resources/2024-03-01/deployments/method_get.go index 1ac0d14f52a..b075492676b 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_get.go +++ b/resource-manager/resources/2024-03-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ResourceGroupProviderDepl var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_getatmanagementgroupscope.go b/resource-manager/resources/2024-03-01/deployments/method_getatmanagementgroupscope.go index bc444e82ea7..96c3414af4c 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, id Pro var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_getatscope.go b/resource-manager/resources/2024-03-01/deployments/method_getatscope.go index c0c03bb1c7a..7a084f6f7ca 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_getatscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtScope(ctx context.Context, id ScopedDeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_getatsubscriptionscope.go b/resource-manager/resources/2024-03-01/deployments/method_getatsubscriptionscope.go index b07a87e692d..92e44fbafca 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, id Provid var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_getattenantscope.go b/resource-manager/resources/2024-03-01/deployments/method_getattenantscope.go index 3e7ab4a1b41..fccae4c0dfa 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_getattenantscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtTenantScope(ctx context.Context, id DeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deployments/method_listatmanagementgroupscope.go b/resource-manager/resources/2024-03-01/deployments/method_listatmanagementgroupscope.go index d806bd04a35..c0ebef35406 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_listatmanagementgroupscope.go @@ -41,6 +41,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deployments/method_listatscope.go b/resource-manager/resources/2024-03-01/deployments/method_listatscope.go index 1f28434f5ad..40f556a4f8b 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_listatscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_listatscope.go @@ -41,6 +41,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deployments/method_listatsubscriptionscope.go b/resource-manager/resources/2024-03-01/deployments/method_listatsubscriptionscope.go index 045ecbcecdd..4962151485c 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_listatsubscriptionscope.go @@ -41,6 +41,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deployments/method_listattenantscope.go b/resource-manager/resources/2024-03-01/deployments/method_listattenantscope.go index 8527c4383f3..09d08be35ac 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_listattenantscope.go +++ b/resource-manager/resources/2024-03-01/deployments/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deployments/method_listbyresourcegroup.go b/resource-manager/resources/2024-03-01/deployments/method_listbyresourcegroup.go index 6389283885e..6c592704a15 100644 --- a/resource-manager/resources/2024-03-01/deployments/method_listbyresourcegroup.go +++ b/resource-manager/resources/2024-03-01/deployments/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deployments/version.go b/resource-manager/resources/2024-03-01/deployments/version.go index c12e31dd21b..2107c0ccb08 100644 --- a/resource-manager/resources/2024-03-01/deployments/version.go +++ b/resource-manager/resources/2024-03-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/README.md b/resource-manager/resources/2024-03-01/deploymentstacks/README.md index 61eb8d565d4..7a48ff1f750 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/README.md +++ b/resource-manager/resources/2024-03-01/deploymentstacks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/deploymentstacks` Documentation -The `deploymentstacks` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `deploymentstacks` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/client.go b/resource-manager/resources/2024-03-01/deploymentstacks/client.go index f5aac94a77e..a354920a51a 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/client.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/client.go @@ -15,7 +15,7 @@ type DeploymentStacksClient struct { } func NewDeploymentStacksClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentStacksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentstacks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentstacks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentStacksClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/id_deploymentstack.go b/resource-manager/resources/2024-03-01/deploymentstacks/id_deploymentstack.go index 3d6bd0b9147..7390de2d455 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/id_deploymentstack.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/id_deploymentstack.go @@ -40,7 +40,7 @@ func ParseDeploymentStackID(input string) (*DeploymentStackId, error) { } id := DeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDeploymentStackIDInsensitively(input string) (*DeploymentStackId, erro } id := DeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/id_providerdeploymentstack.go b/resource-manager/resources/2024-03-01/deploymentstacks/id_providerdeploymentstack.go index db298acdb7e..9906a8406d3 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/id_providerdeploymentstack.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/id_providerdeploymentstack.go @@ -42,7 +42,7 @@ func ParseProviderDeploymentStackID(input string) (*ProviderDeploymentStackId, e } id := ProviderDeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderDeploymentStackIDInsensitively(input string) (*ProviderDeploym } id := ProviderDeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/id_providers2deploymentstack.go b/resource-manager/resources/2024-03-01/deploymentstacks/id_providers2deploymentstack.go index 6a6d80bb80f..fd2cb2c3776 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/id_providers2deploymentstack.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/id_providers2deploymentstack.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentStackID(input string) (*Providers2DeploymentStackI } id := Providers2DeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentStackIDInsensitively(input string) (*Providers2Dep } id := Providers2DeploymentStackId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatmanagementgroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatmanagementgroup.go index bd37c42e631..ac266562f62 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatmanagementgroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatmanagementgroup.go @@ -39,6 +39,7 @@ func (o DeleteAtManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o DeleteAtManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatresourcegroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatresourcegroup.go index 3c10f3a4c80..a83fb41b882 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatresourcegroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatresourcegroup.go @@ -39,6 +39,7 @@ func (o DeleteAtResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o DeleteAtResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatsubscription.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatsubscription.go index 3b6e9f89af9..4db16a2f2c4 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatsubscription.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_deleteatsubscription.go @@ -39,6 +39,7 @@ func (o DeleteAtSubscriptionOperationOptions) ToHeaders() *client.Headers { func (o DeleteAtSubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatmanagementgroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatmanagementgroup.go index 0ec08888098..823d69568af 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatmanagementgroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatmanagementgroup.go @@ -46,7 +46,6 @@ func (c DeploymentStacksClient) ExportTemplateAtManagementGroup(ctx context.Cont var model DeploymentStackTemplateDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatresourcegroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatresourcegroup.go index 8eaa5682851..0a0ca9d5373 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatresourcegroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatresourcegroup.go @@ -46,7 +46,6 @@ func (c DeploymentStacksClient) ExportTemplateAtResourceGroup(ctx context.Contex var model DeploymentStackTemplateDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatsubscription.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatsubscription.go index 0d4d3052d5e..c6c89181e6a 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatsubscription.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_exporttemplateatsubscription.go @@ -46,7 +46,6 @@ func (c DeploymentStacksClient) ExportTemplateAtSubscription(ctx context.Context var model DeploymentStackTemplateDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatmanagementgroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatmanagementgroup.go index dad3f5a43e3..1ecee2dcd72 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatmanagementgroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatmanagementgroup.go @@ -45,7 +45,6 @@ func (c DeploymentStacksClient) GetAtManagementGroup(ctx context.Context, id Pro var model DeploymentStack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatresourcegroup.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatresourcegroup.go index ac2a6df0156..5bca5511d2a 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatresourcegroup.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatresourcegroup.go @@ -45,7 +45,6 @@ func (c DeploymentStacksClient) GetAtResourceGroup(ctx context.Context, id Provi var model DeploymentStack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatsubscription.go b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatsubscription.go index 9d3952260db..5d8bf4c6863 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/method_getatsubscription.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/method_getatsubscription.go @@ -45,7 +45,6 @@ func (c DeploymentStacksClient) GetAtSubscription(ctx context.Context, id Deploy var model DeploymentStack result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/deploymentstacks/version.go b/resource-manager/resources/2024-03-01/deploymentstacks/version.go index 094e81b693f..24a9c272948 100644 --- a/resource-manager/resources/2024-03-01/deploymentstacks/version.go +++ b/resource-manager/resources/2024-03-01/deploymentstacks/version.go @@ -1,12 +1,10 @@ package deploymentstacks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentstacks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentstacks/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/providers/README.md b/resource-manager/resources/2024-03-01/providers/README.md index c29bdf66591..53e2f5c505a 100644 --- a/resource-manager/resources/2024-03-01/providers/README.md +++ b/resource-manager/resources/2024-03-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/providers/client.go b/resource-manager/resources/2024-03-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2024-03-01/providers/client.go +++ b/resource-manager/resources/2024-03-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/providers/id_provider.go b/resource-manager/resources/2024-03-01/providers/id_provider.go index bb7109d6550..2ea3db4158e 100644 --- a/resource-manager/resources/2024-03-01/providers/id_provider.go +++ b/resource-manager/resources/2024-03-01/providers/id_provider.go @@ -38,7 +38,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/providers/id_providers2.go b/resource-manager/resources/2024-03-01/providers/id_providers2.go index 7b308b2de67..34eb20ab9df 100644 --- a/resource-manager/resources/2024-03-01/providers/id_providers2.go +++ b/resource-manager/resources/2024-03-01/providers/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/providers/id_subscriptionprovider.go b/resource-manager/resources/2024-03-01/providers/id_subscriptionprovider.go index 970cffaedfa..88e92cbabc5 100644 --- a/resource-manager/resources/2024-03-01/providers/id_subscriptionprovider.go +++ b/resource-manager/resources/2024-03-01/providers/id_subscriptionprovider.go @@ -40,7 +40,7 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/providers/method_get.go b/resource-manager/resources/2024-03-01/providers/method_get.go index d9ebc641bc3..2a780770db9 100644 --- a/resource-manager/resources/2024-03-01/providers/method_get.go +++ b/resource-manager/resources/2024-03-01/providers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) Get(ctx context.Context, id SubscriptionProviderId, opt var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/providers/method_getattenantscope.go b/resource-manager/resources/2024-03-01/providers/method_getattenantscope.go index 179d43b8f06..18fae99a5b5 100644 --- a/resource-manager/resources/2024-03-01/providers/method_getattenantscope.go +++ b/resource-manager/resources/2024-03-01/providers/method_getattenantscope.go @@ -34,6 +34,7 @@ func (o GetAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o GetAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) GetAtTenantScope(ctx context.Context, id ProviderId, op var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/providers/method_list.go b/resource-manager/resources/2024-03-01/providers/method_list.go index efff36573fc..d255799a080 100644 --- a/resource-manager/resources/2024-03-01/providers/method_list.go +++ b/resource-manager/resources/2024-03-01/providers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/providers/method_listattenantscope.go b/resource-manager/resources/2024-03-01/providers/method_listattenantscope.go index a89644b87b7..6f2329165f2 100644 --- a/resource-manager/resources/2024-03-01/providers/method_listattenantscope.go +++ b/resource-manager/resources/2024-03-01/providers/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/providers/method_providerresourcetypeslist.go b/resource-manager/resources/2024-03-01/providers/method_providerresourcetypeslist.go index b19a58feb1a..f126b5fe436 100644 --- a/resource-manager/resources/2024-03-01/providers/method_providerresourcetypeslist.go +++ b/resource-manager/resources/2024-03-01/providers/method_providerresourcetypeslist.go @@ -39,6 +39,7 @@ func (o ProviderResourceTypesListOperationOptions) ToHeaders() *client.Headers { func (o ProviderResourceTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/providers/method_register.go b/resource-manager/resources/2024-03-01/providers/method_register.go index 4aeee8d7b46..11d8a56a107 100644 --- a/resource-manager/resources/2024-03-01/providers/method_register.go +++ b/resource-manager/resources/2024-03-01/providers/method_register.go @@ -50,7 +50,6 @@ func (c ProvidersClient) Register(ctx context.Context, id SubscriptionProviderId var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/providers/method_unregister.go b/resource-manager/resources/2024-03-01/providers/method_unregister.go index bad323e4b60..02cd514d18a 100644 --- a/resource-manager/resources/2024-03-01/providers/method_unregister.go +++ b/resource-manager/resources/2024-03-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id SubscriptionProvider var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/providers/version.go b/resource-manager/resources/2024-03-01/providers/version.go index 9bd0fa926f2..8769bd827ef 100644 --- a/resource-manager/resources/2024-03-01/providers/version.go +++ b/resource-manager/resources/2024-03-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/README.md b/resource-manager/resources/2024-03-01/resourcegroups/README.md index 2723324491c..01bf0c42121 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/README.md +++ b/resource-manager/resources/2024-03-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/resourcegroups/client.go b/resource-manager/resources/2024-03-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/client.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2024-03-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_delete.go b/resource-manager/resources/2024-03-01/resourcegroups/method_delete.go index e3e6402be67..7b9b6b4ff48 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_delete.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_get.go b/resource-manager/resources/2024-03-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_list.go b/resource-manager/resources/2024-03-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_resourceslistbyresourcegroup.go b/resource-manager/resources/2024-03-01/resourcegroups/method_resourceslistbyresourcegroup.go index e739ddc1a69..fc72e1e6ea6 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_resourceslistbyresourcegroup.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_resourceslistbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ResourcesListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o ResourcesListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/method_update.go b/resource-manager/resources/2024-03-01/resourcegroups/method_update.go index 5e386a401ab..0af23ede9e7 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/method_update.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/method_update.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Update(ctx context.Context, id commonids.ResourceG var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/resourcegroups/version.go b/resource-manager/resources/2024-03-01/resourcegroups/version.go index cb025a0ec7d..637a6621445 100644 --- a/resource-manager/resources/2024-03-01/resourcegroups/version.go +++ b/resource-manager/resources/2024-03-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/resources/README.md b/resource-manager/resources/2024-03-01/resources/README.md index 658cf143e74..b46a87be390 100644 --- a/resource-manager/resources/2024-03-01/resources/README.md +++ b/resource-manager/resources/2024-03-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/resources/client.go b/resource-manager/resources/2024-03-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2024-03-01/resources/client.go +++ b/resource-manager/resources/2024-03-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/resources/method_get.go b/resource-manager/resources/2024-03-01/resources/method_get.go index cf2d000f0e0..d2fd91e267d 100644 --- a/resource-manager/resources/2024-03-01/resources/method_get.go +++ b/resource-manager/resources/2024-03-01/resources/method_get.go @@ -46,7 +46,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/resources/method_getbyid.go b/resource-manager/resources/2024-03-01/resources/method_getbyid.go index c872bd020b3..c544e002b57 100644 --- a/resource-manager/resources/2024-03-01/resources/method_getbyid.go +++ b/resource-manager/resources/2024-03-01/resources/method_getbyid.go @@ -46,7 +46,6 @@ func (c ResourcesClient) GetById(ctx context.Context, id commonids.ScopeId) (res var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/resources/method_list.go b/resource-manager/resources/2024-03-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2024-03-01/resources/method_list.go +++ b/resource-manager/resources/2024-03-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-03-01/resources/version.go b/resource-manager/resources/2024-03-01/resources/version.go index e8552deb20b..0723d3c01bb 100644 --- a/resource-manager/resources/2024-03-01/resources/version.go +++ b/resource-manager/resources/2024-03-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2024-03-01" } diff --git a/resource-manager/resources/2024-03-01/tags/README.md b/resource-manager/resources/2024-03-01/tags/README.md index 88e4c08d3cd..f44545b7510 100644 --- a/resource-manager/resources/2024-03-01/tags/README.md +++ b/resource-manager/resources/2024-03-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-03-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-03-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-03-01/tags/client.go b/resource-manager/resources/2024-03-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2024-03-01/tags/client.go +++ b/resource-manager/resources/2024-03-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2024-03-01/tags/id_tagname.go b/resource-manager/resources/2024-03-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2024-03-01/tags/id_tagname.go +++ b/resource-manager/resources/2024-03-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/tags/id_tagvalue.go b/resource-manager/resources/2024-03-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2024-03-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2024-03-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-03-01/tags/method_createorupdate.go b/resource-manager/resources/2024-03-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2024-03-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2024-03-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2024-03-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2024-03-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2024-03-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/tags/method_getatscope.go b/resource-manager/resources/2024-03-01/tags/method_getatscope.go index 50af0190576..7f5afb9a8ac 100644 --- a/resource-manager/resources/2024-03-01/tags/method_getatscope.go +++ b/resource-manager/resources/2024-03-01/tags/method_getatscope.go @@ -47,7 +47,6 @@ func (c TagsClient) GetAtScope(ctx context.Context, id commonids.ScopeId) (resul var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-03-01/tags/version.go b/resource-manager/resources/2024-03-01/tags/version.go index 241fbd1478a..fddfb688c0f 100644 --- a/resource-manager/resources/2024-03-01/tags/version.go +++ b/resource-manager/resources/2024-03-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2024-03-01" } diff --git a/resource-manager/resources/2024-04-01/policyassignments/README.md b/resource-manager/resources/2024-04-01/policyassignments/README.md index 032bcec408e..52863d269a7 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/README.md +++ b/resource-manager/resources/2024-04-01/policyassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-04-01/policyassignments` Documentation -The `policyassignments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-04-01`). +The `policyassignments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-04-01/policyassignments/client.go b/resource-manager/resources/2024-04-01/policyassignments/client.go index 8e17cddc4c7..402c2f10e04 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/client.go +++ b/resource-manager/resources/2024-04-01/policyassignments/client.go @@ -15,7 +15,7 @@ type PolicyAssignmentsClient struct { } func NewPolicyAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "policyassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "policyassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PolicyAssignmentsClient: %+v", err) } diff --git a/resource-manager/resources/2024-04-01/policyassignments/id_policyassignmentid.go b/resource-manager/resources/2024-04-01/policyassignments/id_policyassignmentid.go index dd4c7ddf9b7..41961cd4a8a 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/id_policyassignmentid.go +++ b/resource-manager/resources/2024-04-01/policyassignments/id_policyassignmentid.go @@ -38,7 +38,7 @@ func ParsePolicyAssignmentIdID(input string) (*PolicyAssignmentIdId, error) { } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParsePolicyAssignmentIdIDInsensitively(input string) (*PolicyAssignmentIdId } id := PolicyAssignmentIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-04-01/policyassignments/id_scopedpolicyassignment.go b/resource-manager/resources/2024-04-01/policyassignments/id_scopedpolicyassignment.go index 2ed810504d2..43eaa6934ca 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/id_scopedpolicyassignment.go +++ b/resource-manager/resources/2024-04-01/policyassignments/id_scopedpolicyassignment.go @@ -40,7 +40,7 @@ func ParseScopedPolicyAssignmentID(input string) (*ScopedPolicyAssignmentId, err } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedPolicyAssignmentIDInsensitively(input string) (*ScopedPolicyAssi } id := ScopedPolicyAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_create.go b/resource-manager/resources/2024-04-01/policyassignments/method_create.go index a532f7d9a19..38593afb7f2 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_create.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_create.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) Create(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_createbyid.go b/resource-manager/resources/2024-04-01/policyassignments/method_createbyid.go index 674d24a20ae..a2a99e106f7 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_createbyid.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_createbyid.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) CreateById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_delete.go b/resource-manager/resources/2024-04-01/policyassignments/method_delete.go index 34fe8c30441..27d5cdb250c 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_delete.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_delete.go @@ -46,7 +46,6 @@ func (c PolicyAssignmentsClient) Delete(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_deletebyid.go b/resource-manager/resources/2024-04-01/policyassignments/method_deletebyid.go index ef64fb62032..336b50d1923 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_deletebyid.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_deletebyid.go @@ -46,7 +46,6 @@ func (c PolicyAssignmentsClient) DeleteById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_get.go b/resource-manager/resources/2024-04-01/policyassignments/method_get.go index 9e8e5bbce83..bf3df6719ea 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_get.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_get.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) Get(ctx context.Context, id ScopedPolicyAssignm var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_getbyid.go b/resource-manager/resources/2024-04-01/policyassignments/method_getbyid.go index 8f0a663b93d..bafd322c39f 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_getbyid.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_getbyid.go @@ -45,7 +45,6 @@ func (c PolicyAssignmentsClient) GetById(ctx context.Context, id PolicyAssignmen var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_list.go b/resource-manager/resources/2024-04-01/policyassignments/method_list.go index 78a0fc2e344..39f4c7c0fc9 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_list.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_listformanagementgroup.go b/resource-manager/resources/2024-04-01/policyassignments/method_listformanagementgroup.go index b32ecc0edc4..7abe2300095 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_listformanagementgroup.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_listformanagementgroup.go @@ -41,6 +41,7 @@ func (o ListForManagementGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForManagementGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_listforresource.go b/resource-manager/resources/2024-04-01/policyassignments/method_listforresource.go index 39c781d143a..04e9474c95c 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_listforresource.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_listforresource.go @@ -41,6 +41,7 @@ func (o ListForResourceOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_listforresourcegroup.go b/resource-manager/resources/2024-04-01/policyassignments/method_listforresourcegroup.go index 963b981c132..127c89ef46e 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_listforresourcegroup.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_listforresourcegroup.go @@ -41,6 +41,7 @@ func (o ListForResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListForResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_update.go b/resource-manager/resources/2024-04-01/policyassignments/method_update.go index 196a096f894..1f53d65281e 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_update.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_update.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) Update(ctx context.Context, id ScopedPolicyAssi var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/method_updatebyid.go b/resource-manager/resources/2024-04-01/policyassignments/method_updatebyid.go index 840a25a0f98..99e8c69a457 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/method_updatebyid.go +++ b/resource-manager/resources/2024-04-01/policyassignments/method_updatebyid.go @@ -49,7 +49,6 @@ func (c PolicyAssignmentsClient) UpdateById(ctx context.Context, id PolicyAssign var model PolicyAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-04-01/policyassignments/version.go b/resource-manager/resources/2024-04-01/policyassignments/version.go index 063ed4111da..ebf1c7184a9 100644 --- a/resource-manager/resources/2024-04-01/policyassignments/version.go +++ b/resource-manager/resources/2024-04-01/policyassignments/version.go @@ -1,12 +1,10 @@ package policyassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/policyassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/policyassignments/2024-04-01" } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/README.md b/resource-manager/resources/2024-07-01/deploymentoperations/README.md index e8acd2357a0..42735022b6b 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/README.md +++ b/resource-manager/resources/2024-07-01/deploymentoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/deploymentoperations` Documentation -The `deploymentoperations` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `deploymentoperations` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/client.go b/resource-manager/resources/2024-07-01/deploymentoperations/client.go index c31a3e02609..3943f7aa725 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/client.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/client.go @@ -15,7 +15,7 @@ type DeploymentOperationsClient struct { } func NewDeploymentOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deploymentoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deploymentoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentOperationsClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_deployment.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_deployment.go index 90dd79f6437..944d43c2086 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_deployment.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_deploymentoperation.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_deploymentoperation.go index 9816ebc4072..f81835ca86a 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_deploymentoperation.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_deploymentoperation.go @@ -42,7 +42,7 @@ func ParseDeploymentOperationID(input string) (*DeploymentOperationId, error) { } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeploymentOperationIDInsensitively(input string) (*DeploymentOperation } id := DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_operation.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_operation.go index 9f5f2bbbaa2..e685a25faef 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_operation.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_operation.go @@ -40,7 +40,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_providerdeployment.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_providerdeployment.go index 54ded88d66c..6ebf482449a 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_providerdeployment.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deployment.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deployment.go index 5117ebdd03f..0581c5f5af9 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deployment.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deploymentoperation.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deploymentoperation.go index 2da36b32fcc..7edf297943a 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deploymentoperation.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_providers2deploymentoperation.go @@ -42,7 +42,7 @@ func ParseProviders2DeploymentOperationID(input string) (*Providers2DeploymentOp } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviders2DeploymentOperationIDInsensitively(input string) (*Providers } id := Providers2DeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeployment.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeployment.go index a54d3523215..597ddfcecfd 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeployment.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupDeploymentID(input string) (*ResourceGroupDeploymentId, e } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupDeploymentIDInsensitively(input string) (*ResourceGroupDe } id := ResourceGroupDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go index 4b535c8fba9..913be3aa6d1 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_resourcegroupdeploymentoperation.go @@ -44,7 +44,7 @@ func ParseResourceGroupDeploymentOperationID(input string) (*ResourceGroupDeploy } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseResourceGroupDeploymentOperationIDInsensitively(input string) (*Resour } id := ResourceGroupDeploymentOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_scopeddeployment.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_scopeddeployment.go index 6582e3e01b3..941b9aa87d4 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_scopeddeployment.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/id_scopedoperation.go b/resource-manager/resources/2024-07-01/deploymentoperations/id_scopedoperation.go index f7bf3afbbca..415ed9ea2d8 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/id_scopedoperation.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/id_scopedoperation.go @@ -42,7 +42,7 @@ func ParseScopedOperationID(input string) (*ScopedOperationId, error) { } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedOperationIDInsensitively(input string) (*ScopedOperationId, erro } id := ScopedOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_get.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_get.go index 618c9e69440..df47d1fffdc 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_get.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) Get(ctx context.Context, id ResourceGroupDep var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatmanagementgroupscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatmanagementgroupscope.go index 73c31e4da46..fcff3ccc385 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Contex var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatscope.go index be6b8e67555..cdacd32c8ce 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtScope(ctx context.Context, id ScopedOpe var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatsubscriptionscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatsubscriptionscope.go index de0f05d1fbb..3182049acbb 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_getattenantscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_getattenantscope.go index 78eaf7864ef..be3409b87cc 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_getattenantscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentOperationsClient) GetAtTenantScope(ctx context.Context, id Ope var model DeploymentOperation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_list.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_list.go index 31da83cbd35..5f009bc0e62 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_list.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatmanagementgroupscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatmanagementgroupscope.go index 8534ab53db5..4cf1c58a63a 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatmanagementgroupscope.go @@ -39,6 +39,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatscope.go index 8840500cb91..f9b99167f0c 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatscope.go @@ -39,6 +39,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatsubscriptionscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatsubscriptionscope.go index e5af43d5147..1465515c921 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_listatsubscriptionscope.go @@ -39,6 +39,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/method_listattenantscope.go b/resource-manager/resources/2024-07-01/deploymentoperations/method_listattenantscope.go index 364b6e78860..e9a41bc9f54 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/method_listattenantscope.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deploymentoperations/version.go b/resource-manager/resources/2024-07-01/deploymentoperations/version.go index 3b44b48a5b0..a443c237dbd 100644 --- a/resource-manager/resources/2024-07-01/deploymentoperations/version.go +++ b/resource-manager/resources/2024-07-01/deploymentoperations/version.go @@ -1,12 +1,10 @@ package deploymentoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deploymentoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deploymentoperations/2024-07-01" } diff --git a/resource-manager/resources/2024-07-01/deployments/README.md b/resource-manager/resources/2024-07-01/deployments/README.md index 549d08d1208..e328491a663 100644 --- a/resource-manager/resources/2024-07-01/deployments/README.md +++ b/resource-manager/resources/2024-07-01/deployments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/deployments` Documentation -The `deployments` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `deployments` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/deployments/client.go b/resource-manager/resources/2024-07-01/deployments/client.go index 50a604559bd..a0f7b24cdd0 100644 --- a/resource-manager/resources/2024-07-01/deployments/client.go +++ b/resource-manager/resources/2024-07-01/deployments/client.go @@ -15,7 +15,7 @@ type DeploymentsClient struct { } func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deployments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deployments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeploymentsClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/deployments/id_deployment.go b/resource-manager/resources/2024-07-01/deployments/id_deployment.go index 82731104909..f1d4bb31af3 100644 --- a/resource-manager/resources/2024-07-01/deployments/id_deployment.go +++ b/resource-manager/resources/2024-07-01/deployments/id_deployment.go @@ -38,7 +38,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deployments/id_providerdeployment.go b/resource-manager/resources/2024-07-01/deployments/id_providerdeployment.go index 1baff9237c1..0759c3fbf25 100644 --- a/resource-manager/resources/2024-07-01/deployments/id_providerdeployment.go +++ b/resource-manager/resources/2024-07-01/deployments/id_providerdeployment.go @@ -40,7 +40,7 @@ func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error) { } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId } id := ProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deployments/id_providers2deployment.go b/resource-manager/resources/2024-07-01/deployments/id_providers2deployment.go index 36d3dab238c..328c93cb501 100644 --- a/resource-manager/resources/2024-07-01/deployments/id_providers2deployment.go +++ b/resource-manager/resources/2024-07-01/deployments/id_providers2deployment.go @@ -40,7 +40,7 @@ func ParseProviders2DeploymentID(input string) (*Providers2DeploymentId, error) } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2DeploymentIDInsensitively(input string) (*Providers2Deployme } id := Providers2DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deployments/id_resourcegroupproviderdeployment.go b/resource-manager/resources/2024-07-01/deployments/id_resourcegroupproviderdeployment.go index c7853b848e9..757bda29f75 100644 --- a/resource-manager/resources/2024-07-01/deployments/id_resourcegroupproviderdeployment.go +++ b/resource-manager/resources/2024-07-01/deployments/id_resourcegroupproviderdeployment.go @@ -42,7 +42,7 @@ func ParseResourceGroupProviderDeploymentID(input string) (*ResourceGroupProvide } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseResourceGroupProviderDeploymentIDInsensitively(input string) (*Resourc } id := ResourceGroupProviderDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deployments/id_scopeddeployment.go b/resource-manager/resources/2024-07-01/deployments/id_scopeddeployment.go index ea41f878c04..330d8edb9b0 100644 --- a/resource-manager/resources/2024-07-01/deployments/id_scopeddeployment.go +++ b/resource-manager/resources/2024-07-01/deployments/id_scopeddeployment.go @@ -40,7 +40,7 @@ func ParseScopedDeploymentID(input string) (*ScopedDeploymentId, error) { } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDeploymentIDInsensitively(input string) (*ScopedDeploymentId, er } id := ScopedDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/deployments/method_calculatetemplatehash.go b/resource-manager/resources/2024-07-01/deployments/method_calculatetemplatehash.go index 3f692d3f3f8..f3c114f9dbc 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_calculatetemplatehash.go +++ b/resource-manager/resources/2024-07-01/deployments/method_calculatetemplatehash.go @@ -49,7 +49,6 @@ func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input inte var model TemplateHashResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_exporttemplate.go b/resource-manager/resources/2024-07-01/deployments/method_exporttemplate.go index 159587f9deb..9cc11aa5c38 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_exporttemplate.go +++ b/resource-manager/resources/2024-07-01/deployments/method_exporttemplate.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplate(ctx context.Context, id ResourceGroupP var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatmanagementgroupscope.go b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatmanagementgroupscope.go index f2cbce2770b..f701608fff0 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatmanagementgroupscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatmanagementgroupscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Cont var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatscope.go b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatscope.go index 2472bb71773..bf51f90942f 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtScope(ctx context.Context, id ScopedD var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatsubscriptionscope.go b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatsubscriptionscope.go index 37a806dd314..d8d454634f7 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatsubscriptionscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateatsubscriptionscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateattenantscope.go b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateattenantscope.go index 34d8b508070..1f18175bf21 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_exporttemplateattenantscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_exporttemplateattenantscope.go @@ -46,7 +46,6 @@ func (c DeploymentsClient) ExportTemplateAtTenantScope(ctx context.Context, id D var model DeploymentExportResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_get.go b/resource-manager/resources/2024-07-01/deployments/method_get.go index 1ac0d14f52a..b075492676b 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_get.go +++ b/resource-manager/resources/2024-07-01/deployments/method_get.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) Get(ctx context.Context, id ResourceGroupProviderDepl var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_getatmanagementgroupscope.go b/resource-manager/resources/2024-07-01/deployments/method_getatmanagementgroupscope.go index bc444e82ea7..96c3414af4c 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_getatmanagementgroupscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_getatmanagementgroupscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, id Pro var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_getatscope.go b/resource-manager/resources/2024-07-01/deployments/method_getatscope.go index c0c03bb1c7a..7a084f6f7ca 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_getatscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_getatscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtScope(ctx context.Context, id ScopedDeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_getatsubscriptionscope.go b/resource-manager/resources/2024-07-01/deployments/method_getatsubscriptionscope.go index b07a87e692d..92e44fbafca 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_getatsubscriptionscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_getatsubscriptionscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, id Provid var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_getattenantscope.go b/resource-manager/resources/2024-07-01/deployments/method_getattenantscope.go index 3e7ab4a1b41..fccae4c0dfa 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_getattenantscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_getattenantscope.go @@ -45,7 +45,6 @@ func (c DeploymentsClient) GetAtTenantScope(ctx context.Context, id DeploymentId var model DeploymentExtended result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/deployments/method_listatmanagementgroupscope.go b/resource-manager/resources/2024-07-01/deployments/method_listatmanagementgroupscope.go index d806bd04a35..c0ebef35406 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_listatmanagementgroupscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_listatmanagementgroupscope.go @@ -41,6 +41,7 @@ func (o ListAtManagementGroupScopeOperationOptions) ToHeaders() *client.Headers func (o ListAtManagementGroupScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deployments/method_listatscope.go b/resource-manager/resources/2024-07-01/deployments/method_listatscope.go index 1f28434f5ad..40f556a4f8b 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_listatscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_listatscope.go @@ -41,6 +41,7 @@ func (o ListAtScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deployments/method_listatsubscriptionscope.go b/resource-manager/resources/2024-07-01/deployments/method_listatsubscriptionscope.go index 045ecbcecdd..4962151485c 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_listatsubscriptionscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_listatsubscriptionscope.go @@ -41,6 +41,7 @@ func (o ListAtSubscriptionScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtSubscriptionScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deployments/method_listattenantscope.go b/resource-manager/resources/2024-07-01/deployments/method_listattenantscope.go index 8527c4383f3..09d08be35ac 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_listattenantscope.go +++ b/resource-manager/resources/2024-07-01/deployments/method_listattenantscope.go @@ -40,6 +40,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deployments/method_listbyresourcegroup.go b/resource-manager/resources/2024-07-01/deployments/method_listbyresourcegroup.go index 6389283885e..6c592704a15 100644 --- a/resource-manager/resources/2024-07-01/deployments/method_listbyresourcegroup.go +++ b/resource-manager/resources/2024-07-01/deployments/method_listbyresourcegroup.go @@ -41,6 +41,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/deployments/version.go b/resource-manager/resources/2024-07-01/deployments/version.go index b988c3434cc..9a48fdbb814 100644 --- a/resource-manager/resources/2024-07-01/deployments/version.go +++ b/resource-manager/resources/2024-07-01/deployments/version.go @@ -1,12 +1,10 @@ package deployments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deployments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deployments/2024-07-01" } diff --git a/resource-manager/resources/2024-07-01/providers/README.md b/resource-manager/resources/2024-07-01/providers/README.md index fa2be70bdc8..9058a7ac621 100644 --- a/resource-manager/resources/2024-07-01/providers/README.md +++ b/resource-manager/resources/2024-07-01/providers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/providers` Documentation -The `providers` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `providers` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/providers/client.go b/resource-manager/resources/2024-07-01/providers/client.go index d7c2b0e499d..34b98302c9d 100644 --- a/resource-manager/resources/2024-07-01/providers/client.go +++ b/resource-manager/resources/2024-07-01/providers/client.go @@ -15,7 +15,7 @@ type ProvidersClient struct { } func NewProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProvidersClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/providers/id_provider.go b/resource-manager/resources/2024-07-01/providers/id_provider.go index bb7109d6550..2ea3db4158e 100644 --- a/resource-manager/resources/2024-07-01/providers/id_provider.go +++ b/resource-manager/resources/2024-07-01/providers/id_provider.go @@ -38,7 +38,7 @@ func ParseProviderID(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderIDInsensitively(input string) (*ProviderId, error) { } id := ProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/providers/id_providers2.go b/resource-manager/resources/2024-07-01/providers/id_providers2.go index 7b308b2de67..34eb20ab9df 100644 --- a/resource-manager/resources/2024-07-01/providers/id_providers2.go +++ b/resource-manager/resources/2024-07-01/providers/id_providers2.go @@ -40,7 +40,7 @@ func ParseProviders2ID(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviders2IDInsensitively(input string) (*Providers2Id, error) { } id := Providers2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/providers/id_subscriptionprovider.go b/resource-manager/resources/2024-07-01/providers/id_subscriptionprovider.go index 970cffaedfa..88e92cbabc5 100644 --- a/resource-manager/resources/2024-07-01/providers/id_subscriptionprovider.go +++ b/resource-manager/resources/2024-07-01/providers/id_subscriptionprovider.go @@ -40,7 +40,7 @@ func ParseSubscriptionProviderID(input string) (*SubscriptionProviderId, error) } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSubscriptionProviderIDInsensitively(input string) (*SubscriptionProvid } id := SubscriptionProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/providers/method_get.go b/resource-manager/resources/2024-07-01/providers/method_get.go index d9ebc641bc3..2a780770db9 100644 --- a/resource-manager/resources/2024-07-01/providers/method_get.go +++ b/resource-manager/resources/2024-07-01/providers/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) Get(ctx context.Context, id SubscriptionProviderId, opt var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/providers/method_getattenantscope.go b/resource-manager/resources/2024-07-01/providers/method_getattenantscope.go index 179d43b8f06..18fae99a5b5 100644 --- a/resource-manager/resources/2024-07-01/providers/method_getattenantscope.go +++ b/resource-manager/resources/2024-07-01/providers/method_getattenantscope.go @@ -34,6 +34,7 @@ func (o GetAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o GetAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ProvidersClient) GetAtTenantScope(ctx context.Context, id ProviderId, op var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/providers/method_list.go b/resource-manager/resources/2024-07-01/providers/method_list.go index efff36573fc..d255799a080 100644 --- a/resource-manager/resources/2024-07-01/providers/method_list.go +++ b/resource-manager/resources/2024-07-01/providers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/providers/method_listattenantscope.go b/resource-manager/resources/2024-07-01/providers/method_listattenantscope.go index a89644b87b7..6f2329165f2 100644 --- a/resource-manager/resources/2024-07-01/providers/method_listattenantscope.go +++ b/resource-manager/resources/2024-07-01/providers/method_listattenantscope.go @@ -39,6 +39,7 @@ func (o ListAtTenantScopeOperationOptions) ToHeaders() *client.Headers { func (o ListAtTenantScopeOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/providers/method_providerresourcetypeslist.go b/resource-manager/resources/2024-07-01/providers/method_providerresourcetypeslist.go index b19a58feb1a..f126b5fe436 100644 --- a/resource-manager/resources/2024-07-01/providers/method_providerresourcetypeslist.go +++ b/resource-manager/resources/2024-07-01/providers/method_providerresourcetypeslist.go @@ -39,6 +39,7 @@ func (o ProviderResourceTypesListOperationOptions) ToHeaders() *client.Headers { func (o ProviderResourceTypesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/providers/method_register.go b/resource-manager/resources/2024-07-01/providers/method_register.go index 4aeee8d7b46..11d8a56a107 100644 --- a/resource-manager/resources/2024-07-01/providers/method_register.go +++ b/resource-manager/resources/2024-07-01/providers/method_register.go @@ -50,7 +50,6 @@ func (c ProvidersClient) Register(ctx context.Context, id SubscriptionProviderId var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/providers/method_unregister.go b/resource-manager/resources/2024-07-01/providers/method_unregister.go index bad323e4b60..02cd514d18a 100644 --- a/resource-manager/resources/2024-07-01/providers/method_unregister.go +++ b/resource-manager/resources/2024-07-01/providers/method_unregister.go @@ -46,7 +46,6 @@ func (c ProvidersClient) Unregister(ctx context.Context, id SubscriptionProvider var model Provider result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/providers/version.go b/resource-manager/resources/2024-07-01/providers/version.go index 609179e2419..bc0d4413036 100644 --- a/resource-manager/resources/2024-07-01/providers/version.go +++ b/resource-manager/resources/2024-07-01/providers/version.go @@ -1,12 +1,10 @@ package providers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providers/2024-07-01" } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/README.md b/resource-manager/resources/2024-07-01/resourcegroups/README.md index fff249291ea..76870f04f92 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/README.md +++ b/resource-manager/resources/2024-07-01/resourcegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/resourcegroups` Documentation -The `resourcegroups` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `resourcegroups` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/resourcegroups/client.go b/resource-manager/resources/2024-07-01/resourcegroups/client.go index 1f154d80422..770fb5d71d9 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/client.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/client.go @@ -15,7 +15,7 @@ type ResourceGroupsClient struct { } func NewResourceGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceGroupsClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_createorupdate.go b/resource-manager/resources/2024-07-01/resourcegroups/method_createorupdate.go index a0c7a8a2ada..6b7f26d9e02 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_createorupdate.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ResourceGroupsClient) CreateOrUpdate(ctx context.Context, id commonids.R var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_delete.go b/resource-manager/resources/2024-07-01/resourcegroups/method_delete.go index e3e6402be67..7b9b6b4ff48 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_delete.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_get.go b/resource-manager/resources/2024-07-01/resourcegroups/method_get.go index a75549521ac..0a805dd40e2 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_get.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_get.go @@ -46,7 +46,6 @@ func (c ResourceGroupsClient) Get(ctx context.Context, id commonids.ResourceGrou var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_list.go b/resource-manager/resources/2024-07-01/resourcegroups/method_list.go index 43e82e042ce..d78f8e8818d 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_list.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_resourceslistbyresourcegroup.go b/resource-manager/resources/2024-07-01/resourcegroups/method_resourceslistbyresourcegroup.go index e739ddc1a69..fc72e1e6ea6 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_resourceslistbyresourcegroup.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_resourceslistbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ResourcesListByResourceGroupOperationOptions) ToHeaders() *client.Header func (o ResourcesListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/method_update.go b/resource-manager/resources/2024-07-01/resourcegroups/method_update.go index 5e386a401ab..0af23ede9e7 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/method_update.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/method_update.go @@ -50,7 +50,6 @@ func (c ResourceGroupsClient) Update(ctx context.Context, id commonids.ResourceG var model ResourceGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/resourcegroups/version.go b/resource-manager/resources/2024-07-01/resourcegroups/version.go index 57c05aab519..64b64309add 100644 --- a/resource-manager/resources/2024-07-01/resourcegroups/version.go +++ b/resource-manager/resources/2024-07-01/resourcegroups/version.go @@ -1,12 +1,10 @@ package resourcegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcegroups/2024-07-01" } diff --git a/resource-manager/resources/2024-07-01/resources/README.md b/resource-manager/resources/2024-07-01/resources/README.md index 28e792803d1..82c18b7f7f3 100644 --- a/resource-manager/resources/2024-07-01/resources/README.md +++ b/resource-manager/resources/2024-07-01/resources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/resources` Documentation -The `resources` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `resources` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/resources/client.go b/resource-manager/resources/2024-07-01/resources/client.go index 3b409247557..6e71db435da 100644 --- a/resource-manager/resources/2024-07-01/resources/client.go +++ b/resource-manager/resources/2024-07-01/resources/client.go @@ -15,7 +15,7 @@ type ResourcesClient struct { } func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourcesClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/resources/method_get.go b/resource-manager/resources/2024-07-01/resources/method_get.go index cf2d000f0e0..d2fd91e267d 100644 --- a/resource-manager/resources/2024-07-01/resources/method_get.go +++ b/resource-manager/resources/2024-07-01/resources/method_get.go @@ -46,7 +46,6 @@ func (c ResourcesClient) Get(ctx context.Context, id commonids.ScopeId) (result var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/resources/method_getbyid.go b/resource-manager/resources/2024-07-01/resources/method_getbyid.go index c872bd020b3..c544e002b57 100644 --- a/resource-manager/resources/2024-07-01/resources/method_getbyid.go +++ b/resource-manager/resources/2024-07-01/resources/method_getbyid.go @@ -46,7 +46,6 @@ func (c ResourcesClient) GetById(ctx context.Context, id commonids.ScopeId) (res var model GenericResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/resources/method_list.go b/resource-manager/resources/2024-07-01/resources/method_list.go index 3a348699f1a..210382a2f38 100644 --- a/resource-manager/resources/2024-07-01/resources/method_list.go +++ b/resource-manager/resources/2024-07-01/resources/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/resources/2024-07-01/resources/version.go b/resource-manager/resources/2024-07-01/resources/version.go index b0eae245f49..d7ed5c0c505 100644 --- a/resource-manager/resources/2024-07-01/resources/version.go +++ b/resource-manager/resources/2024-07-01/resources/version.go @@ -1,12 +1,10 @@ package resources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resources/2024-07-01" } diff --git a/resource-manager/resources/2024-07-01/tags/README.md b/resource-manager/resources/2024-07-01/tags/README.md index 9e47d468f76..bcb8c907c65 100644 --- a/resource-manager/resources/2024-07-01/tags/README.md +++ b/resource-manager/resources/2024-07-01/tags/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-07-01/tags` Documentation -The `tags` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-07-01`). +The `tags` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-07-01/tags/client.go b/resource-manager/resources/2024-07-01/tags/client.go index 8ef9b9a30b4..1b337a567b0 100644 --- a/resource-manager/resources/2024-07-01/tags/client.go +++ b/resource-manager/resources/2024-07-01/tags/client.go @@ -15,7 +15,7 @@ type TagsClient struct { } func NewTagsClientWithBaseURI(sdkApi sdkEnv.Api) (*TagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tags", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tags", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TagsClient: %+v", err) } diff --git a/resource-manager/resources/2024-07-01/tags/id_tagname.go b/resource-manager/resources/2024-07-01/tags/id_tagname.go index 44322e58a52..f7878d94b66 100644 --- a/resource-manager/resources/2024-07-01/tags/id_tagname.go +++ b/resource-manager/resources/2024-07-01/tags/id_tagname.go @@ -40,7 +40,7 @@ func ParseTagNameID(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTagNameIDInsensitively(input string) (*TagNameId, error) { } id := TagNameId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/tags/id_tagvalue.go b/resource-manager/resources/2024-07-01/tags/id_tagvalue.go index b7c8bfa6265..5cd6c8fc4e3 100644 --- a/resource-manager/resources/2024-07-01/tags/id_tagvalue.go +++ b/resource-manager/resources/2024-07-01/tags/id_tagvalue.go @@ -42,7 +42,7 @@ func ParseTagValueID(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTagValueIDInsensitively(input string) (*TagValueId, error) { } id := TagValueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/resources/2024-07-01/tags/method_createorupdate.go b/resource-manager/resources/2024-07-01/tags/method_createorupdate.go index 1ecb632da6d..117a6bb5ba7 100644 --- a/resource-manager/resources/2024-07-01/tags/method_createorupdate.go +++ b/resource-manager/resources/2024-07-01/tags/method_createorupdate.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdate(ctx context.Context, id TagNameId) (result Cr var model TagDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/tags/method_createorupdatevalue.go b/resource-manager/resources/2024-07-01/tags/method_createorupdatevalue.go index af5cdd0624b..f5e9476bcb5 100644 --- a/resource-manager/resources/2024-07-01/tags/method_createorupdatevalue.go +++ b/resource-manager/resources/2024-07-01/tags/method_createorupdatevalue.go @@ -46,7 +46,6 @@ func (c TagsClient) CreateOrUpdateValue(ctx context.Context, id TagValueId) (res var model TagValue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/tags/method_getatscope.go b/resource-manager/resources/2024-07-01/tags/method_getatscope.go index 50af0190576..7f5afb9a8ac 100644 --- a/resource-manager/resources/2024-07-01/tags/method_getatscope.go +++ b/resource-manager/resources/2024-07-01/tags/method_getatscope.go @@ -47,7 +47,6 @@ func (c TagsClient) GetAtScope(ctx context.Context, id commonids.ScopeId) (resul var model TagsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-07-01/tags/version.go b/resource-manager/resources/2024-07-01/tags/version.go index 14f29a9ec2c..bcb5a99bb0f 100644 --- a/resource-manager/resources/2024-07-01/tags/version.go +++ b/resource-manager/resources/2024-07-01/tags/version.go @@ -1,12 +1,10 @@ package tags -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tags/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tags/2024-07-01" } diff --git a/resource-manager/resources/2024-08-01/databoundaries/README.md b/resource-manager/resources/2024-08-01/databoundaries/README.md index 9c3aadad4f6..53d9a90b755 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/README.md +++ b/resource-manager/resources/2024-08-01/databoundaries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/resources/2024-08-01/databoundaries` Documentation -The `databoundaries` SDK allows for interaction with the Azure Resource Manager Service `resources` (API Version `2024-08-01`). +The `databoundaries` SDK allows for interaction with Azure Resource Manager `resources` (API Version `2024-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/resources/2024-08-01/databoundaries/client.go b/resource-manager/resources/2024-08-01/databoundaries/client.go index a32a5b2cfd9..1e9964a41e4 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/client.go +++ b/resource-manager/resources/2024-08-01/databoundaries/client.go @@ -15,7 +15,7 @@ type DataBoundariesClient struct { } func NewDataBoundariesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataBoundariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databoundaries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databoundaries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataBoundariesClient: %+v", err) } diff --git a/resource-manager/resources/2024-08-01/databoundaries/method_getscope.go b/resource-manager/resources/2024-08-01/databoundaries/method_getscope.go index 7b6ac9fef78..5552ec71b5a 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/method_getscope.go +++ b/resource-manager/resources/2024-08-01/databoundaries/method_getscope.go @@ -47,7 +47,6 @@ func (c DataBoundariesClient) GetScope(ctx context.Context, id commonids.ScopeId var model DataBoundaryDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-08-01/databoundaries/method_gettenant.go b/resource-manager/resources/2024-08-01/databoundaries/method_gettenant.go index aea81cc8544..ad82245bced 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/method_gettenant.go +++ b/resource-manager/resources/2024-08-01/databoundaries/method_gettenant.go @@ -45,7 +45,6 @@ func (c DataBoundariesClient) GetTenant(ctx context.Context) (result GetTenantOp var model DataBoundaryDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-08-01/databoundaries/method_put.go b/resource-manager/resources/2024-08-01/databoundaries/method_put.go index 32c0e6e7860..aa3c0c7aca9 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/method_put.go +++ b/resource-manager/resources/2024-08-01/databoundaries/method_put.go @@ -50,7 +50,6 @@ func (c DataBoundariesClient) Put(ctx context.Context, input DataBoundaryDefinit var model DataBoundaryDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/resources/2024-08-01/databoundaries/version.go b/resource-manager/resources/2024-08-01/databoundaries/version.go index 41b4f86e47a..23870df7ca5 100644 --- a/resource-manager/resources/2024-08-01/databoundaries/version.go +++ b/resource-manager/resources/2024-08-01/databoundaries/version.go @@ -1,12 +1,10 @@ package databoundaries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databoundaries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databoundaries/2024-08-01" } diff --git a/resource-manager/search/2022-09-01/adminkeys/README.md b/resource-manager/search/2022-09-01/adminkeys/README.md index 7d166d68d18..262b503d9aa 100644 --- a/resource-manager/search/2022-09-01/adminkeys/README.md +++ b/resource-manager/search/2022-09-01/adminkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/adminkeys` Documentation -The `adminkeys` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `adminkeys` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/adminkeys/client.go b/resource-manager/search/2022-09-01/adminkeys/client.go index 1d53a97f2d4..9107624f0f1 100644 --- a/resource-manager/search/2022-09-01/adminkeys/client.go +++ b/resource-manager/search/2022-09-01/adminkeys/client.go @@ -15,7 +15,7 @@ type AdminKeysClient struct { } func NewAdminKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminKeysClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/adminkeys/id_keykind.go b/resource-manager/search/2022-09-01/adminkeys/id_keykind.go index f266d00aa2e..ba9005b005b 100644 --- a/resource-manager/search/2022-09-01/adminkeys/id_keykind.go +++ b/resource-manager/search/2022-09-01/adminkeys/id_keykind.go @@ -44,7 +44,7 @@ func ParseKeyKindID(input string) (*KeyKindId, error) { } id := KeyKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyKindIDInsensitively(input string) (*KeyKindId, error) { } id := KeyKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/adminkeys/id_searchservice.go b/resource-manager/search/2022-09-01/adminkeys/id_searchservice.go index f6d34defe16..31bbb237c28 100644 --- a/resource-manager/search/2022-09-01/adminkeys/id_searchservice.go +++ b/resource-manager/search/2022-09-01/adminkeys/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/adminkeys/method_get.go b/resource-manager/search/2022-09-01/adminkeys/method_get.go index 9ba02fb5b04..fde80779fd5 100644 --- a/resource-manager/search/2022-09-01/adminkeys/method_get.go +++ b/resource-manager/search/2022-09-01/adminkeys/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AdminKeysClient) Get(ctx context.Context, id SearchServiceId, options Ge var model AdminKeyResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/adminkeys/method_regenerate.go b/resource-manager/search/2022-09-01/adminkeys/method_regenerate.go index 43b7d2531dc..9dc7bd60009 100644 --- a/resource-manager/search/2022-09-01/adminkeys/method_regenerate.go +++ b/resource-manager/search/2022-09-01/adminkeys/method_regenerate.go @@ -36,6 +36,7 @@ func (o RegenerateOperationOptions) ToHeaders() *client.Headers { func (o RegenerateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AdminKeysClient) Regenerate(ctx context.Context, id KeyKindId, options R var model AdminKeyResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/adminkeys/version.go b/resource-manager/search/2022-09-01/adminkeys/version.go index 9cb08058831..5c0de464832 100644 --- a/resource-manager/search/2022-09-01/adminkeys/version.go +++ b/resource-manager/search/2022-09-01/adminkeys/version.go @@ -1,12 +1,10 @@ package adminkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminkeys/2022-09-01" } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/README.md b/resource-manager/search/2022-09-01/privateendpointconnections/README.md index a9341a0bebb..d292cd44062 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/README.md +++ b/resource-manager/search/2022-09-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/client.go b/resource-manager/search/2022-09-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/client.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/search/2022-09-01/privateendpointconnections/id_privateendpointconnection.go index 80728085183..da1584a3999 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/id_searchservice.go b/resource-manager/search/2022-09-01/privateendpointconnections/id_searchservice.go index 349161fcd6f..a2e692128c2 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/id_searchservice.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/method_delete.go b/resource-manager/search/2022-09-01/privateendpointconnections/method_delete.go index dd64b703720..f9336461111 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/method_delete.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/method_get.go b/resource-manager/search/2022-09-01/privateendpointconnections/method_get.go index d181fe1e1ba..a1dba5099b0 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/method_get.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/method_listbyservice.go b/resource-manager/search/2022-09-01/privateendpointconnections/method_listbyservice.go index c3ce1bd81b7..141beda1427 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/method_update.go b/resource-manager/search/2022-09-01/privateendpointconnections/method_update.go index fb1de1d7b86..26bcf2eb73c 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/method_update.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/privateendpointconnections/version.go b/resource-manager/search/2022-09-01/privateendpointconnections/version.go index 3e577291d0e..9e664bb38ba 100644 --- a/resource-manager/search/2022-09-01/privateendpointconnections/version.go +++ b/resource-manager/search/2022-09-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-09-01" } diff --git a/resource-manager/search/2022-09-01/privatelinkresources/README.md b/resource-manager/search/2022-09-01/privatelinkresources/README.md index 25860b1fd8e..65ae904874d 100644 --- a/resource-manager/search/2022-09-01/privatelinkresources/README.md +++ b/resource-manager/search/2022-09-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/privatelinkresources/client.go b/resource-manager/search/2022-09-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/search/2022-09-01/privatelinkresources/client.go +++ b/resource-manager/search/2022-09-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/privatelinkresources/id_searchservice.go b/resource-manager/search/2022-09-01/privatelinkresources/id_searchservice.go index 07325e65719..a9156fd8599 100644 --- a/resource-manager/search/2022-09-01/privatelinkresources/id_searchservice.go +++ b/resource-manager/search/2022-09-01/privatelinkresources/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/privatelinkresources/method_listsupported.go b/resource-manager/search/2022-09-01/privatelinkresources/method_listsupported.go index 7d1c79c4aa8..51995458025 100644 --- a/resource-manager/search/2022-09-01/privatelinkresources/method_listsupported.go +++ b/resource-manager/search/2022-09-01/privatelinkresources/method_listsupported.go @@ -36,6 +36,7 @@ func (o ListSupportedOperationOptions) ToHeaders() *client.Headers { func (o ListSupportedOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkResourcesClient) ListSupported(ctx context.Context, id Search var model PrivateLinkResourcesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/privatelinkresources/version.go b/resource-manager/search/2022-09-01/privatelinkresources/version.go index 2c078a4dcad..181070b53b5 100644 --- a/resource-manager/search/2022-09-01/privatelinkresources/version.go +++ b/resource-manager/search/2022-09-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-09-01" } diff --git a/resource-manager/search/2022-09-01/querykeys/README.md b/resource-manager/search/2022-09-01/querykeys/README.md index 8acc3ff161d..e05242cc3d0 100644 --- a/resource-manager/search/2022-09-01/querykeys/README.md +++ b/resource-manager/search/2022-09-01/querykeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/querykeys` Documentation -The `querykeys` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `querykeys` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/querykeys/client.go b/resource-manager/search/2022-09-01/querykeys/client.go index 9b5b3fb9098..225c811f3d8 100644 --- a/resource-manager/search/2022-09-01/querykeys/client.go +++ b/resource-manager/search/2022-09-01/querykeys/client.go @@ -15,7 +15,7 @@ type QueryKeysClient struct { } func NewQueryKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "querykeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "querykeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryKeysClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/querykeys/id_createquerykey.go b/resource-manager/search/2022-09-01/querykeys/id_createquerykey.go index 36498e8e74a..2d2770b1f88 100644 --- a/resource-manager/search/2022-09-01/querykeys/id_createquerykey.go +++ b/resource-manager/search/2022-09-01/querykeys/id_createquerykey.go @@ -44,7 +44,7 @@ func ParseCreateQueryKeyID(input string) (*CreateQueryKeyId, error) { } id := CreateQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCreateQueryKeyIDInsensitively(input string) (*CreateQueryKeyId, error) } id := CreateQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/querykeys/id_deletequerykey.go b/resource-manager/search/2022-09-01/querykeys/id_deletequerykey.go index 5b87d2a81f3..4db176e4d8c 100644 --- a/resource-manager/search/2022-09-01/querykeys/id_deletequerykey.go +++ b/resource-manager/search/2022-09-01/querykeys/id_deletequerykey.go @@ -44,7 +44,7 @@ func ParseDeleteQueryKeyID(input string) (*DeleteQueryKeyId, error) { } id := DeleteQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteQueryKeyIDInsensitively(input string) (*DeleteQueryKeyId, error) } id := DeleteQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/querykeys/id_searchservice.go b/resource-manager/search/2022-09-01/querykeys/id_searchservice.go index a253bf2f396..4804574df37 100644 --- a/resource-manager/search/2022-09-01/querykeys/id_searchservice.go +++ b/resource-manager/search/2022-09-01/querykeys/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/querykeys/method_create.go b/resource-manager/search/2022-09-01/querykeys/method_create.go index ce1d4d37167..017b1da6e06 100644 --- a/resource-manager/search/2022-09-01/querykeys/method_create.go +++ b/resource-manager/search/2022-09-01/querykeys/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c QueryKeysClient) Create(ctx context.Context, id CreateQueryKeyId, option var model QueryKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/querykeys/method_delete.go b/resource-manager/search/2022-09-01/querykeys/method_delete.go index 99139d86e22..6b83eb0df5d 100644 --- a/resource-manager/search/2022-09-01/querykeys/method_delete.go +++ b/resource-manager/search/2022-09-01/querykeys/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go b/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go index 190b78f9fd8..7419a6cdd95 100644 --- a/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go +++ b/resource-manager/search/2022-09-01/querykeys/method_listbysearchservice.go @@ -41,6 +41,7 @@ func (o ListBySearchServiceOperationOptions) ToHeaders() *client.Headers { func (o ListBySearchServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/querykeys/version.go b/resource-manager/search/2022-09-01/querykeys/version.go index 6d50c34b3a8..f369f6059a1 100644 --- a/resource-manager/search/2022-09-01/querykeys/version.go +++ b/resource-manager/search/2022-09-01/querykeys/version.go @@ -1,12 +1,10 @@ package querykeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/querykeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/querykeys/2022-09-01" } diff --git a/resource-manager/search/2022-09-01/services/README.md b/resource-manager/search/2022-09-01/services/README.md index e9cc82f8c78..332b73f852a 100644 --- a/resource-manager/search/2022-09-01/services/README.md +++ b/resource-manager/search/2022-09-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `services` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/services/client.go b/resource-manager/search/2022-09-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/search/2022-09-01/services/client.go +++ b/resource-manager/search/2022-09-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/services/id_searchservice.go b/resource-manager/search/2022-09-01/services/id_searchservice.go index b5227afb74e..784c4aab2bc 100644 --- a/resource-manager/search/2022-09-01/services/id_searchservice.go +++ b/resource-manager/search/2022-09-01/services/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/services/method_checknameavailability.go b/resource-manager/search/2022-09-01/services/method_checknameavailability.go index 4c5fb7d1b14..fc2d16f5577 100644 --- a/resource-manager/search/2022-09-01/services/method_checknameavailability.go +++ b/resource-manager/search/2022-09-01/services/method_checknameavailability.go @@ -37,6 +37,7 @@ func (o CheckNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ServicesClient) CheckNameAvailability(ctx context.Context, id commonids. var model CheckNameAvailabilityOutput result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/services/method_createorupdate.go b/resource-manager/search/2022-09-01/services/method_createorupdate.go index f9dd8790aee..eb913bcdc6b 100644 --- a/resource-manager/search/2022-09-01/services/method_createorupdate.go +++ b/resource-manager/search/2022-09-01/services/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/services/method_delete.go b/resource-manager/search/2022-09-01/services/method_delete.go index eb63a71a350..da3e636b27e 100644 --- a/resource-manager/search/2022-09-01/services/method_delete.go +++ b/resource-manager/search/2022-09-01/services/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/services/method_get.go b/resource-manager/search/2022-09-01/services/method_get.go index 2c4d1b4d214..7d3bc50da98 100644 --- a/resource-manager/search/2022-09-01/services/method_get.go +++ b/resource-manager/search/2022-09-01/services/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServicesClient) Get(ctx context.Context, id SearchServiceId, options Get var model SearchService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/services/method_listbyresourcegroup.go b/resource-manager/search/2022-09-01/services/method_listbyresourcegroup.go index 97b07d6c5af..e27921b39d4 100644 --- a/resource-manager/search/2022-09-01/services/method_listbyresourcegroup.go +++ b/resource-manager/search/2022-09-01/services/method_listbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/services/method_listbysubscription.go b/resource-manager/search/2022-09-01/services/method_listbysubscription.go index 2285f7c8236..c72273bc4d8 100644 --- a/resource-manager/search/2022-09-01/services/method_listbysubscription.go +++ b/resource-manager/search/2022-09-01/services/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/services/method_update.go b/resource-manager/search/2022-09-01/services/method_update.go index 89dca2cf67b..2fcfddaf54e 100644 --- a/resource-manager/search/2022-09-01/services/method_update.go +++ b/resource-manager/search/2022-09-01/services/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ServicesClient) Update(ctx context.Context, id SearchServiceId, input Se var model SearchService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/services/version.go b/resource-manager/search/2022-09-01/services/version.go index a89e916feea..a9afc35316d 100644 --- a/resource-manager/search/2022-09-01/services/version.go +++ b/resource-manager/search/2022-09-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2022-09-01" } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/README.md b/resource-manager/search/2022-09-01/sharedprivatelinkresources/README.md index 2cdc5bca547..b693f630d73 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/README.md +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2022-09-01/sharedprivatelinkresources` Documentation -The `sharedprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2022-09-01`). +The `sharedprivatelinkresources` SDK allows for interaction with Azure Resource Manager `search` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/client.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/client.go index bf6da206749..4e06c2f4a5d 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/client.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/client.go @@ -15,7 +15,7 @@ type SharedPrivateLinkResourcesClient struct { } func NewSharedPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_searchservice.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_searchservice.go index ebcf6cc6d71..bd5c713f655 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_searchservice.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go index 0b15c9a166c..a35a766de2e 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_createorupdate.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_createorupdate.go index becf8dbf0f8..502bb307fd4 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_createorupdate.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_delete.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_delete.go index 2300c5dbc1d..8d405761166 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_delete.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_get.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_get.go index e025dc81e80..aefab346f1d 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_get.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SharedPrivateLinkResourcesClient) Get(ctx context.Context, id SharedPriv var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_listbyservice.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_listbyservice.go index 61cd17de8d3..989aebe9b50 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_listbyservice.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2022-09-01/sharedprivatelinkresources/version.go b/resource-manager/search/2022-09-01/sharedprivatelinkresources/version.go index fbd27e9859f..4cdc9fe8bcb 100644 --- a/resource-manager/search/2022-09-01/sharedprivatelinkresources/version.go +++ b/resource-manager/search/2022-09-01/sharedprivatelinkresources/version.go @@ -1,12 +1,10 @@ package sharedprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedprivatelinkresources/2022-09-01" } diff --git a/resource-manager/search/2023-11-01/adminkeys/README.md b/resource-manager/search/2023-11-01/adminkeys/README.md index c0bb2425c55..06c5da7f548 100644 --- a/resource-manager/search/2023-11-01/adminkeys/README.md +++ b/resource-manager/search/2023-11-01/adminkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/adminkeys` Documentation -The `adminkeys` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `adminkeys` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/adminkeys/client.go b/resource-manager/search/2023-11-01/adminkeys/client.go index 1d53a97f2d4..9107624f0f1 100644 --- a/resource-manager/search/2023-11-01/adminkeys/client.go +++ b/resource-manager/search/2023-11-01/adminkeys/client.go @@ -15,7 +15,7 @@ type AdminKeysClient struct { } func NewAdminKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "adminkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "adminkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AdminKeysClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/adminkeys/id_keykind.go b/resource-manager/search/2023-11-01/adminkeys/id_keykind.go index f266d00aa2e..ba9005b005b 100644 --- a/resource-manager/search/2023-11-01/adminkeys/id_keykind.go +++ b/resource-manager/search/2023-11-01/adminkeys/id_keykind.go @@ -44,7 +44,7 @@ func ParseKeyKindID(input string) (*KeyKindId, error) { } id := KeyKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyKindIDInsensitively(input string) (*KeyKindId, error) { } id := KeyKindId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go b/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go index f6d34defe16..31bbb237c28 100644 --- a/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go +++ b/resource-manager/search/2023-11-01/adminkeys/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/adminkeys/method_get.go b/resource-manager/search/2023-11-01/adminkeys/method_get.go index 9ba02fb5b04..fde80779fd5 100644 --- a/resource-manager/search/2023-11-01/adminkeys/method_get.go +++ b/resource-manager/search/2023-11-01/adminkeys/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AdminKeysClient) Get(ctx context.Context, id SearchServiceId, options Ge var model AdminKeyResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/adminkeys/method_regenerate.go b/resource-manager/search/2023-11-01/adminkeys/method_regenerate.go index 43b7d2531dc..9dc7bd60009 100644 --- a/resource-manager/search/2023-11-01/adminkeys/method_regenerate.go +++ b/resource-manager/search/2023-11-01/adminkeys/method_regenerate.go @@ -36,6 +36,7 @@ func (o RegenerateOperationOptions) ToHeaders() *client.Headers { func (o RegenerateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AdminKeysClient) Regenerate(ctx context.Context, id KeyKindId, options R var model AdminKeyResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/adminkeys/version.go b/resource-manager/search/2023-11-01/adminkeys/version.go index a6708cd1feb..3611d975f09 100644 --- a/resource-manager/search/2023-11-01/adminkeys/version.go +++ b/resource-manager/search/2023-11-01/adminkeys/version.go @@ -1,12 +1,10 @@ package adminkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/adminkeys/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/README.md b/resource-manager/search/2023-11-01/privateendpointconnections/README.md index 668dfdbfda9..13f9331786a 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/README.md +++ b/resource-manager/search/2023-11-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/client.go b/resource-manager/search/2023-11-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/client.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/search/2023-11-01/privateendpointconnections/id_privateendpointconnection.go index 80728085183..da1584a3999 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/id_searchservice.go b/resource-manager/search/2023-11-01/privateendpointconnections/id_searchservice.go index 349161fcd6f..a2e692128c2 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/id_searchservice.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/method_delete.go b/resource-manager/search/2023-11-01/privateendpointconnections/method_delete.go index dd64b703720..f9336461111 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/method_delete.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointConnectionsClient) Delete(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/method_get.go b/resource-manager/search/2023-11-01/privateendpointconnections/method_get.go index d181fe1e1ba..a1dba5099b0 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/method_get.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/method_listbyservice.go b/resource-manager/search/2023-11-01/privateendpointconnections/method_listbyservice.go index c3ce1bd81b7..141beda1427 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/method_listbyservice.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/method_update.go b/resource-manager/search/2023-11-01/privateendpointconnections/method_update.go index fb1de1d7b86..26bcf2eb73c 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/method_update.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c PrivateEndpointConnectionsClient) Update(ctx context.Context, id Private var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/privateendpointconnections/version.go b/resource-manager/search/2023-11-01/privateendpointconnections/version.go index 2548ca02c5f..1e7e0fd4741 100644 --- a/resource-manager/search/2023-11-01/privateendpointconnections/version.go +++ b/resource-manager/search/2023-11-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/privatelinkresources/README.md b/resource-manager/search/2023-11-01/privatelinkresources/README.md index fa5b08c7ce5..66ce55c409d 100644 --- a/resource-manager/search/2023-11-01/privatelinkresources/README.md +++ b/resource-manager/search/2023-11-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/privatelinkresources/client.go b/resource-manager/search/2023-11-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/search/2023-11-01/privatelinkresources/client.go +++ b/resource-manager/search/2023-11-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/privatelinkresources/id_searchservice.go b/resource-manager/search/2023-11-01/privatelinkresources/id_searchservice.go index 07325e65719..a9156fd8599 100644 --- a/resource-manager/search/2023-11-01/privatelinkresources/id_searchservice.go +++ b/resource-manager/search/2023-11-01/privatelinkresources/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/privatelinkresources/method_listsupported.go b/resource-manager/search/2023-11-01/privatelinkresources/method_listsupported.go index 7d1c79c4aa8..51995458025 100644 --- a/resource-manager/search/2023-11-01/privatelinkresources/method_listsupported.go +++ b/resource-manager/search/2023-11-01/privatelinkresources/method_listsupported.go @@ -36,6 +36,7 @@ func (o ListSupportedOperationOptions) ToHeaders() *client.Headers { func (o ListSupportedOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PrivateLinkResourcesClient) ListSupported(ctx context.Context, id Search var model PrivateLinkResourcesResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/privatelinkresources/version.go b/resource-manager/search/2023-11-01/privatelinkresources/version.go index d12469c1344..8054e325910 100644 --- a/resource-manager/search/2023-11-01/privatelinkresources/version.go +++ b/resource-manager/search/2023-11-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/querykeys/README.md b/resource-manager/search/2023-11-01/querykeys/README.md index b8f6b5e6eae..9116866e1ee 100644 --- a/resource-manager/search/2023-11-01/querykeys/README.md +++ b/resource-manager/search/2023-11-01/querykeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/querykeys` Documentation -The `querykeys` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `querykeys` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/querykeys/client.go b/resource-manager/search/2023-11-01/querykeys/client.go index 9b5b3fb9098..225c811f3d8 100644 --- a/resource-manager/search/2023-11-01/querykeys/client.go +++ b/resource-manager/search/2023-11-01/querykeys/client.go @@ -15,7 +15,7 @@ type QueryKeysClient struct { } func NewQueryKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "querykeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "querykeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueryKeysClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go b/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go index 36498e8e74a..2d2770b1f88 100644 --- a/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go +++ b/resource-manager/search/2023-11-01/querykeys/id_createquerykey.go @@ -44,7 +44,7 @@ func ParseCreateQueryKeyID(input string) (*CreateQueryKeyId, error) { } id := CreateQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCreateQueryKeyIDInsensitively(input string) (*CreateQueryKeyId, error) } id := CreateQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go b/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go index 5b87d2a81f3..4db176e4d8c 100644 --- a/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go +++ b/resource-manager/search/2023-11-01/querykeys/id_deletequerykey.go @@ -44,7 +44,7 @@ func ParseDeleteQueryKeyID(input string) (*DeleteQueryKeyId, error) { } id := DeleteQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeleteQueryKeyIDInsensitively(input string) (*DeleteQueryKeyId, error) } id := DeleteQueryKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/querykeys/id_searchservice.go b/resource-manager/search/2023-11-01/querykeys/id_searchservice.go index a253bf2f396..4804574df37 100644 --- a/resource-manager/search/2023-11-01/querykeys/id_searchservice.go +++ b/resource-manager/search/2023-11-01/querykeys/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/querykeys/method_create.go b/resource-manager/search/2023-11-01/querykeys/method_create.go index ce1d4d37167..017b1da6e06 100644 --- a/resource-manager/search/2023-11-01/querykeys/method_create.go +++ b/resource-manager/search/2023-11-01/querykeys/method_create.go @@ -36,6 +36,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c QueryKeysClient) Create(ctx context.Context, id CreateQueryKeyId, option var model QueryKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/querykeys/method_delete.go b/resource-manager/search/2023-11-01/querykeys/method_delete.go index 99139d86e22..6b83eb0df5d 100644 --- a/resource-manager/search/2023-11-01/querykeys/method_delete.go +++ b/resource-manager/search/2023-11-01/querykeys/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go b/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go index 190b78f9fd8..7419a6cdd95 100644 --- a/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go +++ b/resource-manager/search/2023-11-01/querykeys/method_listbysearchservice.go @@ -41,6 +41,7 @@ func (o ListBySearchServiceOperationOptions) ToHeaders() *client.Headers { func (o ListBySearchServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/querykeys/version.go b/resource-manager/search/2023-11-01/querykeys/version.go index 43e07423719..45098cf520c 100644 --- a/resource-manager/search/2023-11-01/querykeys/version.go +++ b/resource-manager/search/2023-11-01/querykeys/version.go @@ -1,12 +1,10 @@ package querykeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/querykeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/querykeys/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/services/README.md b/resource-manager/search/2023-11-01/services/README.md index f08ea3116e2..a884f68f589 100644 --- a/resource-manager/search/2023-11-01/services/README.md +++ b/resource-manager/search/2023-11-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `services` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/services/client.go b/resource-manager/search/2023-11-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/search/2023-11-01/services/client.go +++ b/resource-manager/search/2023-11-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/services/id_searchservice.go b/resource-manager/search/2023-11-01/services/id_searchservice.go index b5227afb74e..784c4aab2bc 100644 --- a/resource-manager/search/2023-11-01/services/id_searchservice.go +++ b/resource-manager/search/2023-11-01/services/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/services/method_checknameavailability.go b/resource-manager/search/2023-11-01/services/method_checknameavailability.go index 4c5fb7d1b14..fc2d16f5577 100644 --- a/resource-manager/search/2023-11-01/services/method_checknameavailability.go +++ b/resource-manager/search/2023-11-01/services/method_checknameavailability.go @@ -37,6 +37,7 @@ func (o CheckNameAvailabilityOperationOptions) ToHeaders() *client.Headers { func (o CheckNameAvailabilityOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ServicesClient) CheckNameAvailability(ctx context.Context, id commonids. var model CheckNameAvailabilityOutput result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/services/method_createorupdate.go b/resource-manager/search/2023-11-01/services/method_createorupdate.go index f9dd8790aee..eb913bcdc6b 100644 --- a/resource-manager/search/2023-11-01/services/method_createorupdate.go +++ b/resource-manager/search/2023-11-01/services/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/services/method_delete.go b/resource-manager/search/2023-11-01/services/method_delete.go index eb63a71a350..da3e636b27e 100644 --- a/resource-manager/search/2023-11-01/services/method_delete.go +++ b/resource-manager/search/2023-11-01/services/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/services/method_get.go b/resource-manager/search/2023-11-01/services/method_get.go index 2c4d1b4d214..7d3bc50da98 100644 --- a/resource-manager/search/2023-11-01/services/method_get.go +++ b/resource-manager/search/2023-11-01/services/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c ServicesClient) Get(ctx context.Context, id SearchServiceId, options Get var model SearchService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/services/method_listbyresourcegroup.go b/resource-manager/search/2023-11-01/services/method_listbyresourcegroup.go index 97b07d6c5af..e27921b39d4 100644 --- a/resource-manager/search/2023-11-01/services/method_listbyresourcegroup.go +++ b/resource-manager/search/2023-11-01/services/method_listbyresourcegroup.go @@ -42,6 +42,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/services/method_listbysubscription.go b/resource-manager/search/2023-11-01/services/method_listbysubscription.go index 2285f7c8236..c72273bc4d8 100644 --- a/resource-manager/search/2023-11-01/services/method_listbysubscription.go +++ b/resource-manager/search/2023-11-01/services/method_listbysubscription.go @@ -42,6 +42,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/services/method_update.go b/resource-manager/search/2023-11-01/services/method_update.go index 89dca2cf67b..2fcfddaf54e 100644 --- a/resource-manager/search/2023-11-01/services/method_update.go +++ b/resource-manager/search/2023-11-01/services/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c ServicesClient) Update(ctx context.Context, id SearchServiceId, input Se var model SearchService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/services/version.go b/resource-manager/search/2023-11-01/services/version.go index e24bd8634df..ee94c26885e 100644 --- a/resource-manager/search/2023-11-01/services/version.go +++ b/resource-manager/search/2023-11-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/README.md b/resource-manager/search/2023-11-01/sharedprivatelinkresources/README.md index 6ec17da804c..bfe13fd3e4a 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/README.md +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/sharedprivatelinkresources` Documentation -The `sharedprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `sharedprivatelinkresources` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/client.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/client.go index bf6da206749..4e06c2f4a5d 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/client.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/client.go @@ -15,7 +15,7 @@ type SharedPrivateLinkResourcesClient struct { } func NewSharedPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharedPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sharedprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sharedprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SharedPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go index ebcf6cc6d71..bd5c713f655 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_searchservice.go @@ -42,7 +42,7 @@ func ParseSearchServiceID(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSearchServiceIDInsensitively(input string) (*SearchServiceId, error) { } id := SearchServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go index 0b15c9a166c..a35a766de2e 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_createorupdate.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_createorupdate.go index becf8dbf0f8..502bb307fd4 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_createorupdate.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_createorupdate.go @@ -39,6 +39,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_delete.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_delete.go index 2300c5dbc1d..8d405761166 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_delete.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_get.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_get.go index e025dc81e80..aefab346f1d 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_get.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SharedPrivateLinkResourcesClient) Get(ctx context.Context, id SharedPriv var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_listbyservice.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_listbyservice.go index 61cd17de8d3..989aebe9b50 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_listbyservice.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/method_listbyservice.go @@ -41,6 +41,7 @@ func (o ListByServiceOperationOptions) ToHeaders() *client.Headers { func (o ListByServiceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/sharedprivatelinkresources/version.go b/resource-manager/search/2023-11-01/sharedprivatelinkresources/version.go index 4cfe13fd8a2..31339f9fed0 100644 --- a/resource-manager/search/2023-11-01/sharedprivatelinkresources/version.go +++ b/resource-manager/search/2023-11-01/sharedprivatelinkresources/version.go @@ -1,12 +1,10 @@ package sharedprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sharedprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sharedprivatelinkresources/2023-11-01" } diff --git a/resource-manager/search/2023-11-01/usages/README.md b/resource-manager/search/2023-11-01/usages/README.md index c6088e8700f..1c251eb83b5 100644 --- a/resource-manager/search/2023-11-01/usages/README.md +++ b/resource-manager/search/2023-11-01/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `search` (API Version `2023-11-01`). +The `usages` SDK allows for interaction with Azure Resource Manager `search` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/search/2023-11-01/usages/client.go b/resource-manager/search/2023-11-01/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/search/2023-11-01/usages/client.go +++ b/resource-manager/search/2023-11-01/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/search/2023-11-01/usages/id_location.go b/resource-manager/search/2023-11-01/usages/id_location.go index 0c3b58eb95c..da998dad3b2 100644 --- a/resource-manager/search/2023-11-01/usages/id_location.go +++ b/resource-manager/search/2023-11-01/usages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/usages/id_usage.go b/resource-manager/search/2023-11-01/usages/id_usage.go index 5d89d1570ad..f9db29ef1bc 100644 --- a/resource-manager/search/2023-11-01/usages/id_usage.go +++ b/resource-manager/search/2023-11-01/usages/id_usage.go @@ -42,7 +42,7 @@ func ParseUsageID(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseUsageIDInsensitively(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/search/2023-11-01/usages/method_listbysubscription.go b/resource-manager/search/2023-11-01/usages/method_listbysubscription.go index 11d993cac8c..086c77f98e8 100644 --- a/resource-manager/search/2023-11-01/usages/method_listbysubscription.go +++ b/resource-manager/search/2023-11-01/usages/method_listbysubscription.go @@ -41,6 +41,7 @@ func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/search/2023-11-01/usages/method_usagebysubscriptionsku.go b/resource-manager/search/2023-11-01/usages/method_usagebysubscriptionsku.go index 8c2647a4dff..cad37446749 100644 --- a/resource-manager/search/2023-11-01/usages/method_usagebysubscriptionsku.go +++ b/resource-manager/search/2023-11-01/usages/method_usagebysubscriptionsku.go @@ -36,6 +36,7 @@ func (o UsageBySubscriptionSkuOperationOptions) ToHeaders() *client.Headers { func (o UsageBySubscriptionSkuOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c UsagesClient) UsageBySubscriptionSku(ctx context.Context, id UsageId, op var model QuotaUsageResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/search/2023-11-01/usages/version.go b/resource-manager/search/2023-11-01/usages/version.go index 6715f1676b0..1f75d534194 100644 --- a/resource-manager/search/2023-11-01/usages/version.go +++ b/resource-manager/search/2023-11-01/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-11-01" } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/README.md b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/README.md index 3c1da8f8fa1..36b61576f64 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/README.md +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/alertssuppressionrules` Documentation -The `alertssuppressionrules` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `alertssuppressionrules` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/client.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/client.go index e6d3e63bcb6..69ccb2dc58c 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/client.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/client.go @@ -15,7 +15,7 @@ type AlertsSuppressionRulesClient struct { } func NewAlertsSuppressionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsSuppressionRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertssuppressionrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertssuppressionrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsSuppressionRulesClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/id_alertssuppressionrule.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/id_alertssuppressionrule.go index cb21081961b..857f5756a47 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/id_alertssuppressionrule.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/id_alertssuppressionrule.go @@ -40,7 +40,7 @@ func ParseAlertsSuppressionRuleID(input string) (*AlertsSuppressionRuleId, error } id := AlertsSuppressionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseAlertsSuppressionRuleIDInsensitively(input string) (*AlertsSuppression } id := AlertsSuppressionRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_get.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_get.go index cf32a832e8c..579b90dd03a 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_get.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_get.go @@ -45,7 +45,6 @@ func (c AlertsSuppressionRulesClient) Get(ctx context.Context, id AlertsSuppress var model AlertsSuppressionRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_list.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_list.go index 9fab431b1a9..70a8a7e48bf 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_list.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_update.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_update.go index b57a6df0d66..783507fd14c 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_update.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/method_update.go @@ -49,7 +49,6 @@ func (c AlertsSuppressionRulesClient) Update(ctx context.Context, id AlertsSuppr var model AlertsSuppressionRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/version.go b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/version.go index d5c38eb9728..dadc297a53f 100644 --- a/resource-manager/security/2019-01-01-preview/alertssuppressionrules/version.go +++ b/resource-manager/security/2019-01-01-preview/alertssuppressionrules/version.go @@ -1,12 +1,10 @@ package alertssuppressionrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertssuppressionrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertssuppressionrules/2019-01-01-preview" } diff --git a/resource-manager/security/2019-01-01-preview/assessments/README.md b/resource-manager/security/2019-01-01-preview/assessments/README.md index e6d15b9be9c..f94bd1c1434 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/README.md +++ b/resource-manager/security/2019-01-01-preview/assessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/assessments` Documentation -The `assessments` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `assessments` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/assessments/client.go b/resource-manager/security/2019-01-01-preview/assessments/client.go index 3dd1ebe697d..e6e700fbd0b 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/client.go +++ b/resource-manager/security/2019-01-01-preview/assessments/client.go @@ -15,7 +15,7 @@ type AssessmentsClient struct { } func NewAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/assessments/id_scopedassessment.go b/resource-manager/security/2019-01-01-preview/assessments/id_scopedassessment.go index 852a3c6762e..427b8b315b9 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/id_scopedassessment.go +++ b/resource-manager/security/2019-01-01-preview/assessments/id_scopedassessment.go @@ -40,7 +40,7 @@ func ParseScopedAssessmentID(input string) (*ScopedAssessmentId, error) { } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAssessmentIDInsensitively(input string) (*ScopedAssessmentId, er } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/assessments/method_createorupdate.go b/resource-manager/security/2019-01-01-preview/assessments/method_createorupdate.go index aefa1bae299..1c8090bc864 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/method_createorupdate.go +++ b/resource-manager/security/2019-01-01-preview/assessments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AssessmentsClient) CreateOrUpdate(ctx context.Context, id ScopedAssessme var model SecurityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/assessments/method_get.go b/resource-manager/security/2019-01-01-preview/assessments/method_get.go index 1c120631bd5..f0b69b19e57 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/method_get.go +++ b/resource-manager/security/2019-01-01-preview/assessments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AssessmentsClient) Get(ctx context.Context, id ScopedAssessmentId, optio var model SecurityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/assessments/version.go b/resource-manager/security/2019-01-01-preview/assessments/version.go index 3182832b798..fe073ec3d79 100644 --- a/resource-manager/security/2019-01-01-preview/assessments/version.go +++ b/resource-manager/security/2019-01-01-preview/assessments/version.go @@ -1,12 +1,10 @@ package assessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessments/2019-01-01-preview" } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/README.md b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/README.md index 466fe377f44..c750f689ca8 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/README.md +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/assessmentsmetadata` Documentation -The `assessmentsmetadata` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `assessmentsmetadata` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/client.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/client.go index 538aeb656d5..16c8d15e226 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/client.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/client.go @@ -15,7 +15,7 @@ type AssessmentsMetadataClient struct { } func NewAssessmentsMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessmentsmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessmentsmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsMetadataClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_assessmentmetadata.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_assessmentmetadata.go index e45ffb62cb3..597aa0a1fc5 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_assessmentmetadata.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_assessmentmetadata.go @@ -38,7 +38,7 @@ func ParseAssessmentMetadataID(input string) (*AssessmentMetadataId, error) { } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseAssessmentMetadataIDInsensitively(input string) (*AssessmentMetadataId } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_providerassessmentmetadata.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_providerassessmentmetadata.go index 0c0835cc272..9d8385ca4ba 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_providerassessmentmetadata.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/id_providerassessmentmetadata.go @@ -40,7 +40,7 @@ func ParseProviderAssessmentMetadataID(input string) (*ProviderAssessmentMetadat } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderAssessmentMetadataIDInsensitively(input string) (*ProviderAsse } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_get.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_get.go index d384799ebe4..9c0d532b9af 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_get.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_get.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) Get(ctx context.Context, id AssessmentMetadat var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptioncreate.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptioncreate.go index 43393ee51d1..863e420b75b 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptioncreate.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptioncreate.go @@ -49,7 +49,6 @@ func (c AssessmentsMetadataClient) SubscriptionCreate(ctx context.Context, id Pr var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptionget.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptionget.go index 7a146406103..1c3fd3a8ca1 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptionget.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/method_subscriptionget.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) SubscriptionGet(ctx context.Context, id Provi var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/version.go b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/version.go index ef5f209efd8..6d22873de03 100644 --- a/resource-manager/security/2019-01-01-preview/assessmentsmetadata/version.go +++ b/resource-manager/security/2019-01-01-preview/assessmentsmetadata/version.go @@ -1,12 +1,10 @@ package assessmentsmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessmentsmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessmentsmetadata/2019-01-01-preview" } diff --git a/resource-manager/security/2019-01-01-preview/automations/README.md b/resource-manager/security/2019-01-01-preview/automations/README.md index a7a2c827f6e..5963c473ed9 100644 --- a/resource-manager/security/2019-01-01-preview/automations/README.md +++ b/resource-manager/security/2019-01-01-preview/automations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/automations` Documentation -The `automations` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `automations` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/automations/client.go b/resource-manager/security/2019-01-01-preview/automations/client.go index 96c013baa3d..f31c62c7a8d 100644 --- a/resource-manager/security/2019-01-01-preview/automations/client.go +++ b/resource-manager/security/2019-01-01-preview/automations/client.go @@ -15,7 +15,7 @@ type AutomationsClient struct { } func NewAutomationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationsClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/automations/id_automation.go b/resource-manager/security/2019-01-01-preview/automations/id_automation.go index a4a55e15177..885a85d8305 100644 --- a/resource-manager/security/2019-01-01-preview/automations/id_automation.go +++ b/resource-manager/security/2019-01-01-preview/automations/id_automation.go @@ -42,7 +42,7 @@ func ParseAutomationID(input string) (*AutomationId, error) { } id := AutomationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAutomationIDInsensitively(input string) (*AutomationId, error) { } id := AutomationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/automations/method_createorupdate.go b/resource-manager/security/2019-01-01-preview/automations/method_createorupdate.go index cd3cde6e688..c38a74b77e3 100644 --- a/resource-manager/security/2019-01-01-preview/automations/method_createorupdate.go +++ b/resource-manager/security/2019-01-01-preview/automations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationsClient) CreateOrUpdate(ctx context.Context, id AutomationId, var model Automation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/automations/method_get.go b/resource-manager/security/2019-01-01-preview/automations/method_get.go index 3624696e16a..369fd5cf804 100644 --- a/resource-manager/security/2019-01-01-preview/automations/method_get.go +++ b/resource-manager/security/2019-01-01-preview/automations/method_get.go @@ -45,7 +45,6 @@ func (c AutomationsClient) Get(ctx context.Context, id AutomationId) (result Get var model Automation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/automations/method_validate.go b/resource-manager/security/2019-01-01-preview/automations/method_validate.go index 7315953962d..b15742c200b 100644 --- a/resource-manager/security/2019-01-01-preview/automations/method_validate.go +++ b/resource-manager/security/2019-01-01-preview/automations/method_validate.go @@ -50,7 +50,6 @@ func (c AutomationsClient) Validate(ctx context.Context, id AutomationId, input var model AutomationValidationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/automations/model_automationaction.go b/resource-manager/security/2019-01-01-preview/automations/model_automationaction.go index 27c4b29c654..9538b5a0124 100644 --- a/resource-manager/security/2019-01-01-preview/automations/model_automationaction.go +++ b/resource-manager/security/2019-01-01-preview/automations/model_automationaction.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationAction interface { + AutomationAction() BaseAutomationActionImpl } -// RawAutomationActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationAction = BaseAutomationActionImpl{} + +type BaseAutomationActionImpl struct { + ActionType ActionType `json:"actionType"` +} + +func (s BaseAutomationActionImpl) AutomationAction() BaseAutomationActionImpl { + return s +} + +var _ AutomationAction = RawAutomationActionImpl{} + +// RawAutomationActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationActionImpl struct { - Type string - Values map[string]interface{} + automationAction BaseAutomationActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationActionImpl) AutomationAction() BaseAutomationActionImpl { + return s.automationAction } -func unmarshalAutomationActionImplementation(input []byte) (AutomationAction, error) { +func UnmarshalAutomationActionImplementation(input []byte) (AutomationAction, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAutomationActionImplementation(input []byte) (AutomationAction, er return out, nil } - out := RawAutomationActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationActionImpl: %+v", err) } - return out, nil + + return RawAutomationActionImpl{ + automationAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2019-01-01-preview/automations/model_automationactioneventhub.go b/resource-manager/security/2019-01-01-preview/automations/model_automationactioneventhub.go index 55af2e0a1ee..680012103bf 100644 --- a/resource-manager/security/2019-01-01-preview/automations/model_automationactioneventhub.go +++ b/resource-manager/security/2019-01-01-preview/automations/model_automationactioneventhub.go @@ -16,6 +16,14 @@ type AutomationActionEventHub struct { SasPolicyName *string `json:"sasPolicyName,omitempty"` // Fields inherited from AutomationAction + + ActionType ActionType `json:"actionType"` +} + +func (s AutomationActionEventHub) AutomationAction() BaseAutomationActionImpl { + return BaseAutomationActionImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = AutomationActionEventHub{} @@ -29,9 +37,10 @@ func (s AutomationActionEventHub) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationActionEventHub: %+v", err) } + decoded["actionType"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/automations/model_automationactionlogicapp.go b/resource-manager/security/2019-01-01-preview/automations/model_automationactionlogicapp.go index ccbfaaeacfe..d445c890790 100644 --- a/resource-manager/security/2019-01-01-preview/automations/model_automationactionlogicapp.go +++ b/resource-manager/security/2019-01-01-preview/automations/model_automationactionlogicapp.go @@ -15,6 +15,14 @@ type AutomationActionLogicApp struct { Uri *string `json:"uri,omitempty"` // Fields inherited from AutomationAction + + ActionType ActionType `json:"actionType"` +} + +func (s AutomationActionLogicApp) AutomationAction() BaseAutomationActionImpl { + return BaseAutomationActionImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = AutomationActionLogicApp{} @@ -28,9 +36,10 @@ func (s AutomationActionLogicApp) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationActionLogicApp: %+v", err) } + decoded["actionType"] = "LogicApp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/automations/model_automationactionworkspace.go b/resource-manager/security/2019-01-01-preview/automations/model_automationactionworkspace.go index 88341552f67..4f77085612b 100644 --- a/resource-manager/security/2019-01-01-preview/automations/model_automationactionworkspace.go +++ b/resource-manager/security/2019-01-01-preview/automations/model_automationactionworkspace.go @@ -14,6 +14,14 @@ type AutomationActionWorkspace struct { WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` // Fields inherited from AutomationAction + + ActionType ActionType `json:"actionType"` +} + +func (s AutomationActionWorkspace) AutomationAction() BaseAutomationActionImpl { + return BaseAutomationActionImpl{ + ActionType: s.ActionType, + } } var _ json.Marshaler = AutomationActionWorkspace{} @@ -27,9 +35,10 @@ func (s AutomationActionWorkspace) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationActionWorkspace: %+v", err) } + decoded["actionType"] = "Workspace" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/automations/model_automationproperties.go b/resource-manager/security/2019-01-01-preview/automations/model_automationproperties.go index 4003c49465a..fcc90430481 100644 --- a/resource-manager/security/2019-01-01-preview/automations/model_automationproperties.go +++ b/resource-manager/security/2019-01-01-preview/automations/model_automationproperties.go @@ -43,7 +43,7 @@ func (s *AutomationProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationActionImplementation(val) + impl, err := UnmarshalAutomationActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationProperties': %+v", i, err) } diff --git a/resource-manager/security/2019-01-01-preview/automations/version.go b/resource-manager/security/2019-01-01-preview/automations/version.go index 9cf92e72877..07cf85edb78 100644 --- a/resource-manager/security/2019-01-01-preview/automations/version.go +++ b/resource-manager/security/2019-01-01-preview/automations/version.go @@ -1,12 +1,10 @@ package automations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automations/2019-01-01-preview" } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/README.md b/resource-manager/security/2019-01-01-preview/regulatorycompliance/README.md index 9f879b41cb0..838aaf1dee0 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/README.md +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/regulatorycompliance` Documentation -The `regulatorycompliance` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `regulatorycompliance` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/client.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/client.go index d69308216de..07bfd01d041 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/client.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/client.go @@ -15,7 +15,7 @@ type RegulatoryComplianceClient struct { } func NewRegulatoryComplianceClientWithBaseURI(sdkApi sdkEnv.Api) (*RegulatoryComplianceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "regulatorycompliance", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "regulatorycompliance", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegulatoryComplianceClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycomplianceassessment.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycomplianceassessment.go index 4fc7307af22..793d84d6a79 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycomplianceassessment.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycomplianceassessment.go @@ -44,7 +44,7 @@ func ParseRegulatoryComplianceAssessmentID(input string) (*RegulatoryComplianceA } id := RegulatoryComplianceAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegulatoryComplianceAssessmentIDInsensitively(input string) (*Regulato } id := RegulatoryComplianceAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancecontrol.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancecontrol.go index 45fbf6794bc..b9137e84d0a 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancecontrol.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancecontrol.go @@ -42,7 +42,7 @@ func ParseRegulatoryComplianceControlID(input string) (*RegulatoryComplianceCont } id := RegulatoryComplianceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseRegulatoryComplianceControlIDInsensitively(input string) (*RegulatoryC } id := RegulatoryComplianceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancestandard.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancestandard.go index d48cae24cdf..ed5c88877a3 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancestandard.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/id_regulatorycompliancestandard.go @@ -40,7 +40,7 @@ func ParseRegulatoryComplianceStandardID(input string) (*RegulatoryComplianceSta } id := RegulatoryComplianceStandardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRegulatoryComplianceStandardIDInsensitively(input string) (*Regulatory } id := RegulatoryComplianceStandardId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentsget.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentsget.go index 085395c81ec..70e066c16de 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentsget.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentsget.go @@ -45,7 +45,6 @@ func (c RegulatoryComplianceClient) AssessmentsGet(ctx context.Context, id Regul var model RegulatoryComplianceAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentslist.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentslist.go index f12b405de59..de8caf8161a 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentslist.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_assessmentslist.go @@ -39,6 +39,7 @@ func (o AssessmentsListOperationOptions) ToHeaders() *client.Headers { func (o AssessmentsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlsget.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlsget.go index 64a468c9877..678b1274aaf 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlsget.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlsget.go @@ -45,7 +45,6 @@ func (c RegulatoryComplianceClient) ControlsGet(ctx context.Context, id Regulato var model RegulatoryComplianceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlslist.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlslist.go index 49762bd44a2..6fc69110e9c 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlslist.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_controlslist.go @@ -39,6 +39,7 @@ func (o ControlsListOperationOptions) ToHeaders() *client.Headers { func (o ControlsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardsget.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardsget.go index fe3a4827100..935496e2cb7 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardsget.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardsget.go @@ -45,7 +45,6 @@ func (c RegulatoryComplianceClient) StandardsGet(ctx context.Context, id Regulat var model RegulatoryComplianceStandard result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardslist.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardslist.go index a9d7128e3f5..a276e8f917f 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardslist.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/method_standardslist.go @@ -40,6 +40,7 @@ func (o StandardsListOperationOptions) ToHeaders() *client.Headers { func (o StandardsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2019-01-01-preview/regulatorycompliance/version.go b/resource-manager/security/2019-01-01-preview/regulatorycompliance/version.go index 9b936edda9f..8941da30c78 100644 --- a/resource-manager/security/2019-01-01-preview/regulatorycompliance/version.go +++ b/resource-manager/security/2019-01-01-preview/regulatorycompliance/version.go @@ -1,12 +1,10 @@ package regulatorycompliance -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/regulatorycompliance/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/regulatorycompliance/2019-01-01-preview" } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/README.md b/resource-manager/security/2019-01-01-preview/subassessments/README.md index 74d70392cdd..edcd6a38347 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/README.md +++ b/resource-manager/security/2019-01-01-preview/subassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/subassessments` Documentation -The `subassessments` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2019-01-01-preview`). +The `subassessments` SDK allows for interaction with Azure Resource Manager `security` (API Version `2019-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2019-01-01-preview/subassessments/client.go b/resource-manager/security/2019-01-01-preview/subassessments/client.go index 5a050fdb1dc..120c9422269 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/client.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/client.go @@ -15,7 +15,7 @@ type SubAssessmentsClient struct { } func NewSubAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubAssessmentsClient: %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/id_scopedassessment.go b/resource-manager/security/2019-01-01-preview/subassessments/id_scopedassessment.go index bbfdd98a724..16caa4da33b 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/id_scopedassessment.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/id_scopedassessment.go @@ -40,7 +40,7 @@ func ParseScopedAssessmentID(input string) (*ScopedAssessmentId, error) { } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAssessmentIDInsensitively(input string) (*ScopedAssessmentId, er } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/id_scopedsubassessment.go b/resource-manager/security/2019-01-01-preview/subassessments/id_scopedsubassessment.go index 79396945d9c..a4b04378b90 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/id_scopedsubassessment.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/id_scopedsubassessment.go @@ -42,7 +42,7 @@ func ParseScopedSubAssessmentID(input string) (*ScopedSubAssessmentId, error) { } id := ScopedSubAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseScopedSubAssessmentIDInsensitively(input string) (*ScopedSubAssessment } id := ScopedSubAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/method_get.go b/resource-manager/security/2019-01-01-preview/subassessments/method_get.go index ff87d551967..fb940c22909 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/method_get.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/method_get.go @@ -45,7 +45,6 @@ func (c SubAssessmentsClient) Get(ctx context.Context, id ScopedSubAssessmentId) var model SecuritySubAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/model_additionaldata.go b/resource-manager/security/2019-01-01-preview/subassessments/model_additionaldata.go index db58aadb1e9..591c0b2ce53 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/model_additionaldata.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/model_additionaldata.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AdditionalData interface { + AdditionalData() BaseAdditionalDataImpl } -// RawAdditionalDataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AdditionalData = BaseAdditionalDataImpl{} + +type BaseAdditionalDataImpl struct { + AssessedResourceType AssessedResourceType `json:"assessedResourceType"` +} + +func (s BaseAdditionalDataImpl) AdditionalData() BaseAdditionalDataImpl { + return s +} + +var _ AdditionalData = RawAdditionalDataImpl{} + +// RawAdditionalDataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAdditionalDataImpl struct { - Type string - Values map[string]interface{} + additionalData BaseAdditionalDataImpl + Type string + Values map[string]interface{} +} + +func (s RawAdditionalDataImpl) AdditionalData() BaseAdditionalDataImpl { + return s.additionalData } -func unmarshalAdditionalDataImplementation(input []byte) (AdditionalData, error) { +func UnmarshalAdditionalDataImplementation(input []byte) (AdditionalData, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAdditionalDataImplementation(input []byte) (AdditionalData, error) return out, nil } - out := RawAdditionalDataImpl{ - Type: value, - Values: temp, + var parent BaseAdditionalDataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAdditionalDataImpl: %+v", err) } - return out, nil + + return RawAdditionalDataImpl{ + additionalData: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/model_containerregistryvulnerabilityproperties.go b/resource-manager/security/2019-01-01-preview/subassessments/model_containerregistryvulnerabilityproperties.go index eaa0cb99425..41c7717ddd7 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/model_containerregistryvulnerabilityproperties.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/model_containerregistryvulnerabilityproperties.go @@ -21,6 +21,14 @@ type ContainerRegistryVulnerabilityProperties struct { VendorReferences *[]VendorReference `json:"vendorReferences,omitempty"` // Fields inherited from AdditionalData + + AssessedResourceType AssessedResourceType `json:"assessedResourceType"` +} + +func (s ContainerRegistryVulnerabilityProperties) AdditionalData() BaseAdditionalDataImpl { + return BaseAdditionalDataImpl{ + AssessedResourceType: s.AssessedResourceType, + } } var _ json.Marshaler = ContainerRegistryVulnerabilityProperties{} @@ -34,9 +42,10 @@ func (s ContainerRegistryVulnerabilityProperties) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ContainerRegistryVulnerabilityProperties: %+v", err) } + decoded["assessedResourceType"] = "ContainerRegistryVulnerability" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/subassessments/model_securitysubassessmentproperties.go b/resource-manager/security/2019-01-01-preview/subassessments/model_securitysubassessmentproperties.go index b5f4674abcd..082c9031900 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/model_securitysubassessmentproperties.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/model_securitysubassessmentproperties.go @@ -61,7 +61,7 @@ func (s *SecuritySubAssessmentProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["additionalData"]; ok { - impl, err := unmarshalAdditionalDataImplementation(v) + impl, err := UnmarshalAdditionalDataImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AdditionalData' for 'SecuritySubAssessmentProperties': %+v", err) } diff --git a/resource-manager/security/2019-01-01-preview/subassessments/model_servervulnerabilityproperties.go b/resource-manager/security/2019-01-01-preview/subassessments/model_servervulnerabilityproperties.go index 69a6b8f269c..9d4eef14940 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/model_servervulnerabilityproperties.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/model_servervulnerabilityproperties.go @@ -20,6 +20,14 @@ type ServerVulnerabilityProperties struct { VendorReferences *[]VendorReference `json:"vendorReferences,omitempty"` // Fields inherited from AdditionalData + + AssessedResourceType AssessedResourceType `json:"assessedResourceType"` +} + +func (s ServerVulnerabilityProperties) AdditionalData() BaseAdditionalDataImpl { + return BaseAdditionalDataImpl{ + AssessedResourceType: s.AssessedResourceType, + } } var _ json.Marshaler = ServerVulnerabilityProperties{} @@ -33,9 +41,10 @@ func (s ServerVulnerabilityProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServerVulnerabilityProperties: %+v", err) } + decoded["assessedResourceType"] = "ServerVulnerabilityAssessment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/subassessments/model_sqlservervulnerabilityproperties.go b/resource-manager/security/2019-01-01-preview/subassessments/model_sqlservervulnerabilityproperties.go index 8cba2031c90..4cf4d9b483c 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/model_sqlservervulnerabilityproperties.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/model_sqlservervulnerabilityproperties.go @@ -15,6 +15,14 @@ type SqlServerVulnerabilityProperties struct { Type *string `json:"type,omitempty"` // Fields inherited from AdditionalData + + AssessedResourceType AssessedResourceType `json:"assessedResourceType"` +} + +func (s SqlServerVulnerabilityProperties) AdditionalData() BaseAdditionalDataImpl { + return BaseAdditionalDataImpl{ + AssessedResourceType: s.AssessedResourceType, + } } var _ json.Marshaler = SqlServerVulnerabilityProperties{} @@ -28,9 +36,10 @@ func (s SqlServerVulnerabilityProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SqlServerVulnerabilityProperties: %+v", err) } + decoded["assessedResourceType"] = "SqlServerVulnerability" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2019-01-01-preview/subassessments/version.go b/resource-manager/security/2019-01-01-preview/subassessments/version.go index 1d2a6b8d6e5..5e06b307dc2 100644 --- a/resource-manager/security/2019-01-01-preview/subassessments/version.go +++ b/resource-manager/security/2019-01-01-preview/subassessments/version.go @@ -1,12 +1,10 @@ package subassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2019-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subassessments/2019-01-01-preview" } diff --git a/resource-manager/security/2020-01-01/alerts/README.md b/resource-manager/security/2020-01-01/alerts/README.md index 21bc9714a90..25acd1e4ce0 100644 --- a/resource-manager/security/2020-01-01/alerts/README.md +++ b/resource-manager/security/2020-01-01/alerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/alerts` Documentation -The `alerts` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `alerts` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/alerts/client.go b/resource-manager/security/2020-01-01/alerts/client.go index a0f2e8f132f..366aad42e95 100644 --- a/resource-manager/security/2020-01-01/alerts/client.go +++ b/resource-manager/security/2020-01-01/alerts/client.go @@ -15,7 +15,7 @@ type AlertsClient struct { } func NewAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/alerts/id_alert.go b/resource-manager/security/2020-01-01/alerts/id_alert.go index 2f82cadcc33..2aba8fbcfe8 100644 --- a/resource-manager/security/2020-01-01/alerts/id_alert.go +++ b/resource-manager/security/2020-01-01/alerts/id_alert.go @@ -42,7 +42,7 @@ func ParseAlertID(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAlertIDInsensitively(input string) (*AlertId, error) { } id := AlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/alerts/id_location.go b/resource-manager/security/2020-01-01/alerts/id_location.go index ad32a70cafa..8c21a7f56dc 100644 --- a/resource-manager/security/2020-01-01/alerts/id_location.go +++ b/resource-manager/security/2020-01-01/alerts/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/alerts/id_locationalert.go b/resource-manager/security/2020-01-01/alerts/id_locationalert.go index b6073e7e813..d7d3c8bbbb8 100644 --- a/resource-manager/security/2020-01-01/alerts/id_locationalert.go +++ b/resource-manager/security/2020-01-01/alerts/id_locationalert.go @@ -44,7 +44,7 @@ func ParseLocationAlertID(input string) (*LocationAlertId, error) { } id := LocationAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationAlertIDInsensitively(input string) (*LocationAlertId, error) { } id := LocationAlertId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/alerts/id_providerlocation.go b/resource-manager/security/2020-01-01/alerts/id_providerlocation.go index 923f3e580eb..2cd81647073 100644 --- a/resource-manager/security/2020-01-01/alerts/id_providerlocation.go +++ b/resource-manager/security/2020-01-01/alerts/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/alerts/method_getresourcegrouplevelalerts.go b/resource-manager/security/2020-01-01/alerts/method_getresourcegrouplevelalerts.go index a8f261a601c..aa86557033a 100644 --- a/resource-manager/security/2020-01-01/alerts/method_getresourcegrouplevelalerts.go +++ b/resource-manager/security/2020-01-01/alerts/method_getresourcegrouplevelalerts.go @@ -45,7 +45,6 @@ func (c AlertsClient) GetResourceGroupLevelAlerts(ctx context.Context, id Locati var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/alerts/method_getsubscriptionlevelalert.go b/resource-manager/security/2020-01-01/alerts/method_getsubscriptionlevelalert.go index 454c354494d..7596d8513b7 100644 --- a/resource-manager/security/2020-01-01/alerts/method_getsubscriptionlevelalert.go +++ b/resource-manager/security/2020-01-01/alerts/method_getsubscriptionlevelalert.go @@ -45,7 +45,6 @@ func (c AlertsClient) GetSubscriptionLevelAlert(ctx context.Context, id AlertId) var model Alert result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/alerts/model_alertproperties.go b/resource-manager/security/2020-01-01/alerts/model_alertproperties.go index 9c51dce2bdd..e6956740743 100644 --- a/resource-manager/security/2020-01-01/alerts/model_alertproperties.go +++ b/resource-manager/security/2020-01-01/alerts/model_alertproperties.go @@ -130,7 +130,7 @@ func (s *AlertProperties) UnmarshalJSON(bytes []byte) error { output := make([]ResourceIdentifier, 0) for i, val := range listTemp { - impl, err := unmarshalResourceIdentifierImplementation(val) + impl, err := UnmarshalResourceIdentifierImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ResourceIdentifiers' for 'AlertProperties': %+v", i, err) } diff --git a/resource-manager/security/2020-01-01/alerts/model_azureresourceidentifier.go b/resource-manager/security/2020-01-01/alerts/model_azureresourceidentifier.go index 860fe835e99..51d87b79573 100644 --- a/resource-manager/security/2020-01-01/alerts/model_azureresourceidentifier.go +++ b/resource-manager/security/2020-01-01/alerts/model_azureresourceidentifier.go @@ -14,6 +14,14 @@ type AzureResourceIdentifier struct { AzureResourceId *string `json:"azureResourceId,omitempty"` // Fields inherited from ResourceIdentifier + + Type ResourceIdentifierType `json:"type"` +} + +func (s AzureResourceIdentifier) ResourceIdentifier() BaseResourceIdentifierImpl { + return BaseResourceIdentifierImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResourceIdentifier{} @@ -27,9 +35,10 @@ func (s AzureResourceIdentifier) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResourceIdentifier: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2020-01-01/alerts/model_loganalyticsidentifier.go b/resource-manager/security/2020-01-01/alerts/model_loganalyticsidentifier.go index 040f5c4db75..1d1faf7b98f 100644 --- a/resource-manager/security/2020-01-01/alerts/model_loganalyticsidentifier.go +++ b/resource-manager/security/2020-01-01/alerts/model_loganalyticsidentifier.go @@ -17,6 +17,14 @@ type LogAnalyticsIdentifier struct { WorkspaceSubscriptionId *string `json:"workspaceSubscriptionId,omitempty"` // Fields inherited from ResourceIdentifier + + Type ResourceIdentifierType `json:"type"` +} + +func (s LogAnalyticsIdentifier) ResourceIdentifier() BaseResourceIdentifierImpl { + return BaseResourceIdentifierImpl{ + Type: s.Type, + } } var _ json.Marshaler = LogAnalyticsIdentifier{} @@ -30,9 +38,10 @@ func (s LogAnalyticsIdentifier) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LogAnalyticsIdentifier: %+v", err) } + decoded["type"] = "LogAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2020-01-01/alerts/model_resourceidentifier.go b/resource-manager/security/2020-01-01/alerts/model_resourceidentifier.go index 8bfbf76c3df..235407d281a 100644 --- a/resource-manager/security/2020-01-01/alerts/model_resourceidentifier.go +++ b/resource-manager/security/2020-01-01/alerts/model_resourceidentifier.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ResourceIdentifier interface { + ResourceIdentifier() BaseResourceIdentifierImpl } -// RawResourceIdentifierImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ResourceIdentifier = BaseResourceIdentifierImpl{} + +type BaseResourceIdentifierImpl struct { + Type ResourceIdentifierType `json:"type"` +} + +func (s BaseResourceIdentifierImpl) ResourceIdentifier() BaseResourceIdentifierImpl { + return s +} + +var _ ResourceIdentifier = RawResourceIdentifierImpl{} + +// RawResourceIdentifierImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawResourceIdentifierImpl struct { - Type string - Values map[string]interface{} + resourceIdentifier BaseResourceIdentifierImpl + Type string + Values map[string]interface{} +} + +func (s RawResourceIdentifierImpl) ResourceIdentifier() BaseResourceIdentifierImpl { + return s.resourceIdentifier } -func unmarshalResourceIdentifierImplementation(input []byte) (ResourceIdentifier, error) { +func UnmarshalResourceIdentifierImplementation(input []byte) (ResourceIdentifier, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalResourceIdentifierImplementation(input []byte) (ResourceIdentifier return out, nil } - out := RawResourceIdentifierImpl{ - Type: value, - Values: temp, + var parent BaseResourceIdentifierImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseResourceIdentifierImpl: %+v", err) } - return out, nil + + return RawResourceIdentifierImpl{ + resourceIdentifier: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2020-01-01/alerts/version.go b/resource-manager/security/2020-01-01/alerts/version.go index 4cd062ed9b0..3c1aa74b503 100644 --- a/resource-manager/security/2020-01-01/alerts/version.go +++ b/resource-manager/security/2020-01-01/alerts/version.go @@ -1,12 +1,10 @@ package alerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alerts/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/allowedconnections/README.md b/resource-manager/security/2020-01-01/allowedconnections/README.md index f6ee1cee604..f90c951ea0d 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/README.md +++ b/resource-manager/security/2020-01-01/allowedconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/allowedconnections` Documentation -The `allowedconnections` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `allowedconnections` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/allowedconnections/client.go b/resource-manager/security/2020-01-01/allowedconnections/client.go index 19c5af75948..da0664bbc1b 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/client.go +++ b/resource-manager/security/2020-01-01/allowedconnections/client.go @@ -15,7 +15,7 @@ type AllowedConnectionsClient struct { } func NewAllowedConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AllowedConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "allowedconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "allowedconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AllowedConnectionsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/allowedconnections/id_connectiontype.go b/resource-manager/security/2020-01-01/allowedconnections/id_connectiontype.go index 6c8f9270e14..3410ca83d19 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/id_connectiontype.go +++ b/resource-manager/security/2020-01-01/allowedconnections/id_connectiontype.go @@ -44,7 +44,7 @@ func ParseConnectionTypeID(input string) (*ConnectionTypeId, error) { } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionTypeIDInsensitively(input string) (*ConnectionTypeId, error) } id := ConnectionTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/allowedconnections/id_location.go b/resource-manager/security/2020-01-01/allowedconnections/id_location.go index f81223f8244..eb6760cdc8f 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/id_location.go +++ b/resource-manager/security/2020-01-01/allowedconnections/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/allowedconnections/method_get.go b/resource-manager/security/2020-01-01/allowedconnections/method_get.go index 49b9ea60181..54370890ff4 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/method_get.go +++ b/resource-manager/security/2020-01-01/allowedconnections/method_get.go @@ -45,7 +45,6 @@ func (c AllowedConnectionsClient) Get(ctx context.Context, id ConnectionTypeId) var model AllowedConnectionsResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/allowedconnections/version.go b/resource-manager/security/2020-01-01/allowedconnections/version.go index b20cd593065..1d773156d2e 100644 --- a/resource-manager/security/2020-01-01/allowedconnections/version.go +++ b/resource-manager/security/2020-01-01/allowedconnections/version.go @@ -1,12 +1,10 @@ package allowedconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/allowedconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/allowedconnections/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/assessments/README.md b/resource-manager/security/2020-01-01/assessments/README.md index 7dfbfc0a215..9e23332bf87 100644 --- a/resource-manager/security/2020-01-01/assessments/README.md +++ b/resource-manager/security/2020-01-01/assessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/assessments` Documentation -The `assessments` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `assessments` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/assessments/client.go b/resource-manager/security/2020-01-01/assessments/client.go index 3dd1ebe697d..e6e700fbd0b 100644 --- a/resource-manager/security/2020-01-01/assessments/client.go +++ b/resource-manager/security/2020-01-01/assessments/client.go @@ -15,7 +15,7 @@ type AssessmentsClient struct { } func NewAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/assessments/id_scopedassessment.go b/resource-manager/security/2020-01-01/assessments/id_scopedassessment.go index 852a3c6762e..427b8b315b9 100644 --- a/resource-manager/security/2020-01-01/assessments/id_scopedassessment.go +++ b/resource-manager/security/2020-01-01/assessments/id_scopedassessment.go @@ -40,7 +40,7 @@ func ParseScopedAssessmentID(input string) (*ScopedAssessmentId, error) { } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAssessmentIDInsensitively(input string) (*ScopedAssessmentId, er } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/assessments/method_createorupdate.go b/resource-manager/security/2020-01-01/assessments/method_createorupdate.go index aefa1bae299..1c8090bc864 100644 --- a/resource-manager/security/2020-01-01/assessments/method_createorupdate.go +++ b/resource-manager/security/2020-01-01/assessments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AssessmentsClient) CreateOrUpdate(ctx context.Context, id ScopedAssessme var model SecurityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/assessments/method_get.go b/resource-manager/security/2020-01-01/assessments/method_get.go index 1c120631bd5..f0b69b19e57 100644 --- a/resource-manager/security/2020-01-01/assessments/method_get.go +++ b/resource-manager/security/2020-01-01/assessments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AssessmentsClient) Get(ctx context.Context, id ScopedAssessmentId, optio var model SecurityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/assessments/version.go b/resource-manager/security/2020-01-01/assessments/version.go index 4336cbd6262..aab457f68e7 100644 --- a/resource-manager/security/2020-01-01/assessments/version.go +++ b/resource-manager/security/2020-01-01/assessments/version.go @@ -1,12 +1,10 @@ package assessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessments/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/README.md b/resource-manager/security/2020-01-01/assessmentsmetadata/README.md index 4abe5908db0..0569b90ce54 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/README.md +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/assessmentsmetadata` Documentation -The `assessmentsmetadata` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `assessmentsmetadata` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/client.go b/resource-manager/security/2020-01-01/assessmentsmetadata/client.go index 538aeb656d5..16c8d15e226 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/client.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/client.go @@ -15,7 +15,7 @@ type AssessmentsMetadataClient struct { } func NewAssessmentsMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessmentsmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessmentsmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsMetadataClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/id_assessmentmetadata.go b/resource-manager/security/2020-01-01/assessmentsmetadata/id_assessmentmetadata.go index e45ffb62cb3..597aa0a1fc5 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/id_assessmentmetadata.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/id_assessmentmetadata.go @@ -38,7 +38,7 @@ func ParseAssessmentMetadataID(input string) (*AssessmentMetadataId, error) { } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseAssessmentMetadataIDInsensitively(input string) (*AssessmentMetadataId } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/id_providerassessmentmetadata.go b/resource-manager/security/2020-01-01/assessmentsmetadata/id_providerassessmentmetadata.go index 0c0835cc272..9d8385ca4ba 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/id_providerassessmentmetadata.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/id_providerassessmentmetadata.go @@ -40,7 +40,7 @@ func ParseProviderAssessmentMetadataID(input string) (*ProviderAssessmentMetadat } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderAssessmentMetadataIDInsensitively(input string) (*ProviderAsse } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/method_createinsubscription.go b/resource-manager/security/2020-01-01/assessmentsmetadata/method_createinsubscription.go index 14c536740b6..068ae447c1d 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/method_createinsubscription.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/method_createinsubscription.go @@ -49,7 +49,6 @@ func (c AssessmentsMetadataClient) CreateInSubscription(ctx context.Context, id var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/method_get.go b/resource-manager/security/2020-01-01/assessmentsmetadata/method_get.go index d384799ebe4..9c0d532b9af 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/method_get.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/method_get.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) Get(ctx context.Context, id AssessmentMetadat var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/method_getinsubscription.go b/resource-manager/security/2020-01-01/assessmentsmetadata/method_getinsubscription.go index 4daf0f733f0..d3b0e5ebaaa 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/method_getinsubscription.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/method_getinsubscription.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) GetInSubscription(ctx context.Context, id Pro var model SecurityAssessmentMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/assessmentsmetadata/version.go b/resource-manager/security/2020-01-01/assessmentsmetadata/version.go index 685f4219b25..3b33402ebf4 100644 --- a/resource-manager/security/2020-01-01/assessmentsmetadata/version.go +++ b/resource-manager/security/2020-01-01/assessmentsmetadata/version.go @@ -1,12 +1,10 @@ package assessmentsmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessmentsmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessmentsmetadata/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/README.md b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/README.md index aa2c98254d2..568fa80259b 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/README.md +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/discoveredsecuritysolutions` Documentation -The `discoveredsecuritysolutions` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `discoveredsecuritysolutions` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/client.go b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/client.go index a256fcce066..44545a948fc 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/client.go +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/client.go @@ -15,7 +15,7 @@ type DiscoveredSecuritySolutionsClient struct { } func NewDiscoveredSecuritySolutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiscoveredSecuritySolutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "discoveredsecuritysolutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "discoveredsecuritysolutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiscoveredSecuritySolutionsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_discoveredsecuritysolution.go b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_discoveredsecuritysolution.go index 6eca1e3c6f9..760001a6b5d 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_discoveredsecuritysolution.go +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_discoveredsecuritysolution.go @@ -44,7 +44,7 @@ func ParseDiscoveredSecuritySolutionID(input string) (*DiscoveredSecuritySolutio } id := DiscoveredSecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiscoveredSecuritySolutionIDInsensitively(input string) (*DiscoveredSe } id := DiscoveredSecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_location.go b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_location.go index 19e9c447e13..acce10f0b63 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_location.go +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/method_get.go b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/method_get.go index f452e5cbb65..2b898155615 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/method_get.go +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/method_get.go @@ -45,7 +45,6 @@ func (c DiscoveredSecuritySolutionsClient) Get(ctx context.Context, id Discovere var model DiscoveredSecuritySolution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/version.go b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/version.go index 7cef599ce6b..9fb96d594b2 100644 --- a/resource-manager/security/2020-01-01/discoveredsecuritysolutions/version.go +++ b/resource-manager/security/2020-01-01/discoveredsecuritysolutions/version.go @@ -1,12 +1,10 @@ package discoveredsecuritysolutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/discoveredsecuritysolutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/discoveredsecuritysolutions/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/README.md b/resource-manager/security/2020-01-01/externalsecuritysolutions/README.md index 105679dd459..85aee83d4dc 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/README.md +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/externalsecuritysolutions` Documentation -The `externalsecuritysolutions` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `externalsecuritysolutions` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/client.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/client.go index 51f92a9797a..e8e0fd77dea 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/client.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/client.go @@ -15,7 +15,7 @@ type ExternalSecuritySolutionsClient struct { } func NewExternalSecuritySolutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ExternalSecuritySolutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "externalsecuritysolutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "externalsecuritysolutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ExternalSecuritySolutionsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/id_externalsecuritysolution.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/id_externalsecuritysolution.go index fccb814c472..9fc5f342ed6 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/id_externalsecuritysolution.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/id_externalsecuritysolution.go @@ -44,7 +44,7 @@ func ParseExternalSecuritySolutionID(input string) (*ExternalSecuritySolutionId, } id := ExternalSecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseExternalSecuritySolutionIDInsensitively(input string) (*ExternalSecuri } id := ExternalSecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/id_location.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/id_location.go index 901f3724333..1eccc80f51a 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/id_location.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_get.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_get.go index 1835cbdfb62..0e34c7ed114 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_get.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ExternalSecuritySolution + Model ExternalSecuritySolution } // Get ... @@ -48,11 +48,11 @@ func (c ExternalSecuritySolutionsClient) Get(ctx context.Context, id ExternalSec if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalExternalSecuritySolutionImplementation(respObj) + model, err := UnmarshalExternalSecuritySolutionImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_list.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_list.go index f412f7b98b6..920d271b480 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_list.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_list.go @@ -74,7 +74,7 @@ func (c ExternalSecuritySolutionsClient) List(ctx context.Context, id commonids. temp := make([]ExternalSecuritySolution, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalExternalSecuritySolutionImplementation(v) + val, err := UnmarshalExternalSecuritySolutionImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ExternalSecuritySolution (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_listbyhomeregion.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_listbyhomeregion.go index 4ea085b50dc..39d596893d9 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/method_listbyhomeregion.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/method_listbyhomeregion.go @@ -73,7 +73,7 @@ func (c ExternalSecuritySolutionsClient) ListByHomeRegion(ctx context.Context, i temp := make([]ExternalSecuritySolution, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalExternalSecuritySolutionImplementation(v) + val, err := UnmarshalExternalSecuritySolutionImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ExternalSecuritySolution (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_aadexternalsecuritysolution.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_aadexternalsecuritysolution.go index 16826b77644..8d1bc4695d8 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_aadexternalsecuritysolution.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_aadexternalsecuritysolution.go @@ -14,10 +14,22 @@ type AadExternalSecuritySolution struct { Properties *AadSolutionProperties `json:"properties,omitempty"` // Fields inherited from ExternalSecuritySolution - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AadExternalSecuritySolution) ExternalSecuritySolution() BaseExternalSecuritySolutionImpl { + return BaseExternalSecuritySolutionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = AadExternalSecuritySolution{} @@ -31,9 +43,10 @@ func (s AadExternalSecuritySolution) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AadExternalSecuritySolution: %+v", err) } + decoded["kind"] = "AAD" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_ataexternalsecuritysolution.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_ataexternalsecuritysolution.go index 0e48ae5ac24..a1ed614712a 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_ataexternalsecuritysolution.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_ataexternalsecuritysolution.go @@ -14,10 +14,22 @@ type AtaExternalSecuritySolution struct { Properties *AtaSolutionProperties `json:"properties,omitempty"` // Fields inherited from ExternalSecuritySolution - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AtaExternalSecuritySolution) ExternalSecuritySolution() BaseExternalSecuritySolutionImpl { + return BaseExternalSecuritySolutionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = AtaExternalSecuritySolution{} @@ -31,9 +43,10 @@ func (s AtaExternalSecuritySolution) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AtaExternalSecuritySolution: %+v", err) } + decoded["kind"] = "ATA" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_cefexternalsecuritysolution.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_cefexternalsecuritysolution.go index 73e5fa1d04c..1bf60ea42a8 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_cefexternalsecuritysolution.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_cefexternalsecuritysolution.go @@ -14,10 +14,22 @@ type CefExternalSecuritySolution struct { Properties *CefSolutionProperties `json:"properties,omitempty"` // Fields inherited from ExternalSecuritySolution - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s CefExternalSecuritySolution) ExternalSecuritySolution() BaseExternalSecuritySolutionImpl { + return BaseExternalSecuritySolutionImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = CefExternalSecuritySolution{} @@ -31,9 +43,10 @@ func (s CefExternalSecuritySolution) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CefExternalSecuritySolution: %+v", err) } + decoded["kind"] = "CEF" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_externalsecuritysolution.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_externalsecuritysolution.go index 3492256705e..9c188d3697c 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/model_externalsecuritysolution.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/model_externalsecuritysolution.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ExternalSecuritySolution interface { + ExternalSecuritySolution() BaseExternalSecuritySolutionImpl } -// RawExternalSecuritySolutionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ExternalSecuritySolution = BaseExternalSecuritySolutionImpl{} + +type BaseExternalSecuritySolutionImpl struct { + Id *string `json:"id,omitempty"` + Kind *ExternalSecuritySolutionKind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseExternalSecuritySolutionImpl) ExternalSecuritySolution() BaseExternalSecuritySolutionImpl { + return s +} + +var _ ExternalSecuritySolution = RawExternalSecuritySolutionImpl{} + +// RawExternalSecuritySolutionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawExternalSecuritySolutionImpl struct { - Type string - Values map[string]interface{} + externalSecuritySolution BaseExternalSecuritySolutionImpl + Type string + Values map[string]interface{} +} + +func (s RawExternalSecuritySolutionImpl) ExternalSecuritySolution() BaseExternalSecuritySolutionImpl { + return s.externalSecuritySolution } -func unmarshalExternalSecuritySolutionImplementation(input []byte) (ExternalSecuritySolution, error) { +func UnmarshalExternalSecuritySolutionImplementation(input []byte) (ExternalSecuritySolution, error) { if input == nil { return nil, nil } @@ -60,10 +81,15 @@ func unmarshalExternalSecuritySolutionImplementation(input []byte) (ExternalSecu return out, nil } - out := RawExternalSecuritySolutionImpl{ - Type: value, - Values: temp, + var parent BaseExternalSecuritySolutionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseExternalSecuritySolutionImpl: %+v", err) } - return out, nil + + return RawExternalSecuritySolutionImpl{ + externalSecuritySolution: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2020-01-01/externalsecuritysolutions/version.go b/resource-manager/security/2020-01-01/externalsecuritysolutions/version.go index 37905afab1e..1320b18476b 100644 --- a/resource-manager/security/2020-01-01/externalsecuritysolutions/version.go +++ b/resource-manager/security/2020-01-01/externalsecuritysolutions/version.go @@ -1,12 +1,10 @@ package externalsecuritysolutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/externalsecuritysolutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/externalsecuritysolutions/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/README.md b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/README.md index b901f188d58..37199cfb327 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/README.md +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/jitnetworkaccesspolicies` Documentation -The `jitnetworkaccesspolicies` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `jitnetworkaccesspolicies` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/client.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/client.go index e796672b28c..4b7a7a174bb 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/client.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/client.go @@ -15,7 +15,7 @@ type JitNetworkAccessPoliciesClient struct { } func NewJitNetworkAccessPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*JitNetworkAccessPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jitnetworkaccesspolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jitnetworkaccesspolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JitNetworkAccessPoliciesClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_jitnetworkaccesspolicy.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_jitnetworkaccesspolicy.go index e554e412dca..991776f6019 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_jitnetworkaccesspolicy.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_jitnetworkaccesspolicy.go @@ -44,7 +44,7 @@ func ParseJitNetworkAccessPolicyID(input string) (*JitNetworkAccessPolicyId, err } id := JitNetworkAccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJitNetworkAccessPolicyIDInsensitively(input string) (*JitNetworkAccess } id := JitNetworkAccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_location.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_location.go index a8c80e8f509..01a49c5bd8b 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_location.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_providerlocation.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_providerlocation.go index f0510fc82cb..ed54b54031d 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_providerlocation.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_createorupdate.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_createorupdate.go index dbeb0a442cc..e53733eb529 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_createorupdate.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c JitNetworkAccessPoliciesClient) CreateOrUpdate(ctx context.Context, id J var model JitNetworkAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_get.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_get.go index 9bace50bd21..61472b8b7ad 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_get.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_get.go @@ -45,7 +45,6 @@ func (c JitNetworkAccessPoliciesClient) Get(ctx context.Context, id JitNetworkAc var model JitNetworkAccessPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_initiate.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_initiate.go index 6d664ed3921..4939c01da34 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_initiate.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/method_initiate.go @@ -50,7 +50,6 @@ func (c JitNetworkAccessPoliciesClient) Initiate(ctx context.Context, id JitNetw var model JitNetworkAccessRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/version.go b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/version.go index eba65fca3b5..0d5c6387d67 100644 --- a/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/version.go +++ b/resource-manager/security/2020-01-01/jitnetworkaccesspolicies/version.go @@ -1,12 +1,10 @@ package jitnetworkaccesspolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jitnetworkaccesspolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jitnetworkaccesspolicies/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/securescore/README.md b/resource-manager/security/2020-01-01/securescore/README.md index cbd9cd7e64f..1e942f69f6c 100644 --- a/resource-manager/security/2020-01-01/securescore/README.md +++ b/resource-manager/security/2020-01-01/securescore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securescore` Documentation -The `securescore` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `securescore` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/securescore/client.go b/resource-manager/security/2020-01-01/securescore/client.go index 461301610b1..43f341ff7c1 100644 --- a/resource-manager/security/2020-01-01/securescore/client.go +++ b/resource-manager/security/2020-01-01/securescore/client.go @@ -15,7 +15,7 @@ type SecureScoreClient struct { } func NewSecureScoreClientWithBaseURI(sdkApi sdkEnv.Api) (*SecureScoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securescore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securescore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecureScoreClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/securescore/id_securescore.go b/resource-manager/security/2020-01-01/securescore/id_securescore.go index f7ac3c15088..25b33301ed6 100644 --- a/resource-manager/security/2020-01-01/securescore/id_securescore.go +++ b/resource-manager/security/2020-01-01/securescore/id_securescore.go @@ -40,7 +40,7 @@ func ParseSecureScoreID(input string) (*SecureScoreId, error) { } id := SecureScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSecureScoreIDInsensitively(input string) (*SecureScoreId, error) { } id := SecureScoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/securescore/method_controlslistbysecurescore.go b/resource-manager/security/2020-01-01/securescore/method_controlslistbysecurescore.go index d3e540c73bb..343df70903b 100644 --- a/resource-manager/security/2020-01-01/securescore/method_controlslistbysecurescore.go +++ b/resource-manager/security/2020-01-01/securescore/method_controlslistbysecurescore.go @@ -39,6 +39,7 @@ func (o ControlsListBySecureScoreOperationOptions) ToHeaders() *client.Headers { func (o ControlsListBySecureScoreOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2020-01-01/securescore/method_get.go b/resource-manager/security/2020-01-01/securescore/method_get.go index 523a5b6c11e..d3e01ed895a 100644 --- a/resource-manager/security/2020-01-01/securescore/method_get.go +++ b/resource-manager/security/2020-01-01/securescore/method_get.go @@ -45,7 +45,6 @@ func (c SecureScoreClient) Get(ctx context.Context, id SecureScoreId) (result Ge var model SecureScoreItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/securescore/version.go b/resource-manager/security/2020-01-01/securescore/version.go index fe36645fd5c..45bf3395506 100644 --- a/resource-manager/security/2020-01-01/securescore/version.go +++ b/resource-manager/security/2020-01-01/securescore/version.go @@ -1,12 +1,10 @@ package securescore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securescore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securescore/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/securescorecontroldefinitions/README.md b/resource-manager/security/2020-01-01/securescorecontroldefinitions/README.md index 8fea7d1e61c..652b4c3e341 100644 --- a/resource-manager/security/2020-01-01/securescorecontroldefinitions/README.md +++ b/resource-manager/security/2020-01-01/securescorecontroldefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securescorecontroldefinitions` Documentation -The `securescorecontroldefinitions` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `securescorecontroldefinitions` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/securescorecontroldefinitions/client.go b/resource-manager/security/2020-01-01/securescorecontroldefinitions/client.go index 3f287c7b86e..03bf8d843e8 100644 --- a/resource-manager/security/2020-01-01/securescorecontroldefinitions/client.go +++ b/resource-manager/security/2020-01-01/securescorecontroldefinitions/client.go @@ -15,7 +15,7 @@ type SecureScoreControlDefinitionsClient struct { } func NewSecureScoreControlDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecureScoreControlDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securescorecontroldefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securescorecontroldefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecureScoreControlDefinitionsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/securescorecontroldefinitions/version.go b/resource-manager/security/2020-01-01/securescorecontroldefinitions/version.go index 9814e9ae8bb..e19ca138060 100644 --- a/resource-manager/security/2020-01-01/securescorecontroldefinitions/version.go +++ b/resource-manager/security/2020-01-01/securescorecontroldefinitions/version.go @@ -1,12 +1,10 @@ package securescorecontroldefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securescorecontroldefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securescorecontroldefinitions/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/securescorecontrols/README.md b/resource-manager/security/2020-01-01/securescorecontrols/README.md index c0c5bbe3d69..5459b13e136 100644 --- a/resource-manager/security/2020-01-01/securescorecontrols/README.md +++ b/resource-manager/security/2020-01-01/securescorecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securescorecontrols` Documentation -The `securescorecontrols` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `securescorecontrols` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/securescorecontrols/client.go b/resource-manager/security/2020-01-01/securescorecontrols/client.go index fccf359e61c..4ca6a330892 100644 --- a/resource-manager/security/2020-01-01/securescorecontrols/client.go +++ b/resource-manager/security/2020-01-01/securescorecontrols/client.go @@ -15,7 +15,7 @@ type SecureScoreControlsClient struct { } func NewSecureScoreControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecureScoreControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securescorecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securescorecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecureScoreControlsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/securescorecontrols/method_list.go b/resource-manager/security/2020-01-01/securescorecontrols/method_list.go index 6614912c60c..a536dde8085 100644 --- a/resource-manager/security/2020-01-01/securescorecontrols/method_list.go +++ b/resource-manager/security/2020-01-01/securescorecontrols/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/security/2020-01-01/securescorecontrols/version.go b/resource-manager/security/2020-01-01/securescorecontrols/version.go index 4ed2eebbad7..da0ee80cb29 100644 --- a/resource-manager/security/2020-01-01/securescorecontrols/version.go +++ b/resource-manager/security/2020-01-01/securescorecontrols/version.go @@ -1,12 +1,10 @@ package securescorecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securescorecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securescorecontrols/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/securitysolutions/README.md b/resource-manager/security/2020-01-01/securitysolutions/README.md index cf9bd897b57..5f3d8659209 100644 --- a/resource-manager/security/2020-01-01/securitysolutions/README.md +++ b/resource-manager/security/2020-01-01/securitysolutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securitysolutions` Documentation -The `securitysolutions` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `securitysolutions` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/securitysolutions/client.go b/resource-manager/security/2020-01-01/securitysolutions/client.go index 55671747b36..0216afabe13 100644 --- a/resource-manager/security/2020-01-01/securitysolutions/client.go +++ b/resource-manager/security/2020-01-01/securitysolutions/client.go @@ -15,7 +15,7 @@ type SecuritySolutionsClient struct { } func NewSecuritySolutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecuritySolutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitysolutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitysolutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecuritySolutionsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/securitysolutions/id_securitysolution.go b/resource-manager/security/2020-01-01/securitysolutions/id_securitysolution.go index 005a3bf1603..5c571a442ee 100644 --- a/resource-manager/security/2020-01-01/securitysolutions/id_securitysolution.go +++ b/resource-manager/security/2020-01-01/securitysolutions/id_securitysolution.go @@ -44,7 +44,7 @@ func ParseSecuritySolutionID(input string) (*SecuritySolutionId, error) { } id := SecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecuritySolutionIDInsensitively(input string) (*SecuritySolutionId, er } id := SecuritySolutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/securitysolutions/method_get.go b/resource-manager/security/2020-01-01/securitysolutions/method_get.go index 0cfa98c98e3..93fc9f273bd 100644 --- a/resource-manager/security/2020-01-01/securitysolutions/method_get.go +++ b/resource-manager/security/2020-01-01/securitysolutions/method_get.go @@ -45,7 +45,6 @@ func (c SecuritySolutionsClient) Get(ctx context.Context, id SecuritySolutionId) var model SecuritySolution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/securitysolutions/version.go b/resource-manager/security/2020-01-01/securitysolutions/version.go index e1accb4d571..96771d8eadc 100644 --- a/resource-manager/security/2020-01-01/securitysolutions/version.go +++ b/resource-manager/security/2020-01-01/securitysolutions/version.go @@ -1,12 +1,10 @@ package securitysolutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitysolutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitysolutions/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/README.md b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/README.md index 9bd49d4261c..69e9be75014 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/README.md +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/securitysolutionsreferencedata` Documentation -The `securitysolutionsreferencedata` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `securitysolutionsreferencedata` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/client.go b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/client.go index d83beff7d81..362021f03b0 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/client.go +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/client.go @@ -15,7 +15,7 @@ type SecuritySolutionsReferenceDataClient struct { } func NewSecuritySolutionsReferenceDataClientWithBaseURI(sdkApi sdkEnv.Api) (*SecuritySolutionsReferenceDataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitysolutionsreferencedata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitysolutionsreferencedata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecuritySolutionsReferenceDataClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/id_location.go b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/id_location.go index 5f0cacc877e..acfad412262 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/id_location.go +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_list.go b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_list.go index 944d7b58740..c8869f0a1d4 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_list.go +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_list.go @@ -47,7 +47,6 @@ func (c SecuritySolutionsReferenceDataClient) List(ctx context.Context, id commo var model SecuritySolutionsReferenceDataList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_listbyhomeregion.go b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_listbyhomeregion.go index 2b202da7e64..5d02333005d 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_listbyhomeregion.go +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/method_listbyhomeregion.go @@ -46,7 +46,6 @@ func (c SecuritySolutionsReferenceDataClient) ListByHomeRegion(ctx context.Conte var model SecuritySolutionsReferenceDataList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/version.go b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/version.go index 69b2e41c938..9bcaba394a3 100644 --- a/resource-manager/security/2020-01-01/securitysolutionsreferencedata/version.go +++ b/resource-manager/security/2020-01-01/securitysolutionsreferencedata/version.go @@ -1,12 +1,10 @@ package securitysolutionsreferencedata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitysolutionsreferencedata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitysolutionsreferencedata/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessment/README.md b/resource-manager/security/2020-01-01/servervulnerabilityassessment/README.md index cc3660c89e7..d0902ebe3a3 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessment/README.md +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/servervulnerabilityassessment` Documentation -The `servervulnerabilityassessment` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `servervulnerabilityassessment` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessment/client.go b/resource-manager/security/2020-01-01/servervulnerabilityassessment/client.go index d965b625bdf..c5fbb1033fe 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessment/client.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessment/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentClient struct { } func NewServerVulnerabilityAssessmentClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessment/method_createorupdate.go b/resource-manager/security/2020-01-01/servervulnerabilityassessment/method_createorupdate.go index 14d8c054bcc..0e033e690a3 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessment/method_createorupdate.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessment/method_createorupdate.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentClient) CreateOrUpdate(ctx context.Context, var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessment/version.go b/resource-manager/security/2020-01-01/servervulnerabilityassessment/version.go index 045319ccd7d..f4cab295e94 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessment/version.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessment/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessment/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessments/README.md b/resource-manager/security/2020-01-01/servervulnerabilityassessments/README.md index b11e67bc41f..c9c4b1cb510 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessments/README.md +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/servervulnerabilityassessments` Documentation -The `servervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `servervulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessments/client.go b/resource-manager/security/2020-01-01/servervulnerabilityassessments/client.go index 5ab28ece52e..e7d2ead0545 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessments/client.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentsClient struct { } func NewServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentget.go b/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentget.go index 001e9171ca1..82cb930cbc5 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentget.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentget.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentsClient) ServerVulnerabilityAssessmentGet(c var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentlistbyextendedresource.go b/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentlistbyextendedresource.go index 18c87b9ba03..cbe4f39407c 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentlistbyextendedresource.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessments/method_servervulnerabilityassessmentlistbyextendedresource.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentsClient) ServerVulnerabilityAssessmentListB var model ServerVulnerabilityAssessmentsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/servervulnerabilityassessments/version.go b/resource-manager/security/2020-01-01/servervulnerabilityassessments/version.go index 781f5116b59..998a7966b5e 100644 --- a/resource-manager/security/2020-01-01/servervulnerabilityassessments/version.go +++ b/resource-manager/security/2020-01-01/servervulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessments/2020-01-01" } diff --git a/resource-manager/security/2020-01-01/topology/README.md b/resource-manager/security/2020-01-01/topology/README.md index 0ca9aefc0ca..07b1479d5d4 100644 --- a/resource-manager/security/2020-01-01/topology/README.md +++ b/resource-manager/security/2020-01-01/topology/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/topology` Documentation -The `topology` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2020-01-01`). +The `topology` SDK allows for interaction with Azure Resource Manager `security` (API Version `2020-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2020-01-01/topology/client.go b/resource-manager/security/2020-01-01/topology/client.go index 0f0338fe7e1..6869a58fd96 100644 --- a/resource-manager/security/2020-01-01/topology/client.go +++ b/resource-manager/security/2020-01-01/topology/client.go @@ -15,7 +15,7 @@ type TopologyClient struct { } func NewTopologyClientWithBaseURI(sdkApi sdkEnv.Api) (*TopologyClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topology", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topology", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopologyClient: %+v", err) } diff --git a/resource-manager/security/2020-01-01/topology/id_location.go b/resource-manager/security/2020-01-01/topology/id_location.go index 2bc5cec7c2f..85d3266fe2c 100644 --- a/resource-manager/security/2020-01-01/topology/id_location.go +++ b/resource-manager/security/2020-01-01/topology/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/topology/id_topology.go b/resource-manager/security/2020-01-01/topology/id_topology.go index 1a09d89d32f..182bdbafe1a 100644 --- a/resource-manager/security/2020-01-01/topology/id_topology.go +++ b/resource-manager/security/2020-01-01/topology/id_topology.go @@ -44,7 +44,7 @@ func ParseTopologyID(input string) (*TopologyId, error) { } id := TopologyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopologyIDInsensitively(input string) (*TopologyId, error) { } id := TopologyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2020-01-01/topology/method_get.go b/resource-manager/security/2020-01-01/topology/method_get.go index 7feb9664daa..05a2dba3b92 100644 --- a/resource-manager/security/2020-01-01/topology/method_get.go +++ b/resource-manager/security/2020-01-01/topology/method_get.go @@ -45,7 +45,6 @@ func (c TopologyClient) Get(ctx context.Context, id TopologyId) (result GetOpera var model TopologyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2020-01-01/topology/version.go b/resource-manager/security/2020-01-01/topology/version.go index 3dc7f97b415..5eec984de97 100644 --- a/resource-manager/security/2020-01-01/topology/version.go +++ b/resource-manager/security/2020-01-01/topology/version.go @@ -1,12 +1,10 @@ package topology -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topology/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topology/2020-01-01" } diff --git a/resource-manager/security/2021-06-01/assessments/README.md b/resource-manager/security/2021-06-01/assessments/README.md index b84bac74e63..d308e3f6fe7 100644 --- a/resource-manager/security/2021-06-01/assessments/README.md +++ b/resource-manager/security/2021-06-01/assessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessments` Documentation -The `assessments` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2021-06-01`). +The `assessments` SDK allows for interaction with Azure Resource Manager `security` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2021-06-01/assessments/client.go b/resource-manager/security/2021-06-01/assessments/client.go index 3dd1ebe697d..e6e700fbd0b 100644 --- a/resource-manager/security/2021-06-01/assessments/client.go +++ b/resource-manager/security/2021-06-01/assessments/client.go @@ -15,7 +15,7 @@ type AssessmentsClient struct { } func NewAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsClient: %+v", err) } diff --git a/resource-manager/security/2021-06-01/assessments/id_scopedassessment.go b/resource-manager/security/2021-06-01/assessments/id_scopedassessment.go index 852a3c6762e..427b8b315b9 100644 --- a/resource-manager/security/2021-06-01/assessments/id_scopedassessment.go +++ b/resource-manager/security/2021-06-01/assessments/id_scopedassessment.go @@ -40,7 +40,7 @@ func ParseScopedAssessmentID(input string) (*ScopedAssessmentId, error) { } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedAssessmentIDInsensitively(input string) (*ScopedAssessmentId, er } id := ScopedAssessmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2021-06-01/assessments/method_createorupdate.go b/resource-manager/security/2021-06-01/assessments/method_createorupdate.go index 7cc7e240f3c..0afba415ec5 100644 --- a/resource-manager/security/2021-06-01/assessments/method_createorupdate.go +++ b/resource-manager/security/2021-06-01/assessments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AssessmentsClient) CreateOrUpdate(ctx context.Context, id ScopedAssessme var model SecurityAssessmentResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2021-06-01/assessments/method_get.go b/resource-manager/security/2021-06-01/assessments/method_get.go index ffade3030f9..99bfbea8b8b 100644 --- a/resource-manager/security/2021-06-01/assessments/method_get.go +++ b/resource-manager/security/2021-06-01/assessments/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AssessmentsClient) Get(ctx context.Context, id ScopedAssessmentId, optio var model SecurityAssessmentResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2021-06-01/assessments/version.go b/resource-manager/security/2021-06-01/assessments/version.go index 4a3bd721836..ad66df01420 100644 --- a/resource-manager/security/2021-06-01/assessments/version.go +++ b/resource-manager/security/2021-06-01/assessments/version.go @@ -1,12 +1,10 @@ package assessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessments/2021-06-01" } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/README.md b/resource-manager/security/2021-06-01/assessmentsmetadata/README.md index f3ce63933c6..82c08b400e2 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/README.md +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/assessmentsmetadata` Documentation -The `assessmentsmetadata` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2021-06-01`). +The `assessmentsmetadata` SDK allows for interaction with Azure Resource Manager `security` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/client.go b/resource-manager/security/2021-06-01/assessmentsmetadata/client.go index 538aeb656d5..16c8d15e226 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/client.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/client.go @@ -15,7 +15,7 @@ type AssessmentsMetadataClient struct { } func NewAssessmentsMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*AssessmentsMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "assessmentsmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "assessmentsmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssessmentsMetadataClient: %+v", err) } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go b/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go index e45ffb62cb3..597aa0a1fc5 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/id_assessmentmetadata.go @@ -38,7 +38,7 @@ func ParseAssessmentMetadataID(input string) (*AssessmentMetadataId, error) { } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseAssessmentMetadataIDInsensitively(input string) (*AssessmentMetadataId } id := AssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go b/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go index 0c0835cc272..9d8385ca4ba 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/id_providerassessmentmetadata.go @@ -40,7 +40,7 @@ func ParseProviderAssessmentMetadataID(input string) (*ProviderAssessmentMetadat } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderAssessmentMetadataIDInsensitively(input string) (*ProviderAsse } id := ProviderAssessmentMetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/method_createinsubscription.go b/resource-manager/security/2021-06-01/assessmentsmetadata/method_createinsubscription.go index a81501a924b..b1f54887a39 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/method_createinsubscription.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/method_createinsubscription.go @@ -49,7 +49,6 @@ func (c AssessmentsMetadataClient) CreateInSubscription(ctx context.Context, id var model SecurityAssessmentMetadataResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/method_get.go b/resource-manager/security/2021-06-01/assessmentsmetadata/method_get.go index 414b57d87c6..bbbc5c18ff0 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/method_get.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/method_get.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) Get(ctx context.Context, id AssessmentMetadat var model SecurityAssessmentMetadataResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/method_getinsubscription.go b/resource-manager/security/2021-06-01/assessmentsmetadata/method_getinsubscription.go index 1e38e35abec..6def0b270c6 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/method_getinsubscription.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/method_getinsubscription.go @@ -45,7 +45,6 @@ func (c AssessmentsMetadataClient) GetInSubscription(ctx context.Context, id Pro var model SecurityAssessmentMetadataResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2021-06-01/assessmentsmetadata/version.go b/resource-manager/security/2021-06-01/assessmentsmetadata/version.go index 5c96708bc7c..a911f458e39 100644 --- a/resource-manager/security/2021-06-01/assessmentsmetadata/version.go +++ b/resource-manager/security/2021-06-01/assessmentsmetadata/version.go @@ -1,12 +1,10 @@ package assessmentsmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/assessmentsmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/assessmentsmetadata/2021-06-01" } diff --git a/resource-manager/security/2021-06-01/settings/README.md b/resource-manager/security/2021-06-01/settings/README.md index 215fe327395..ed4a3f0cfe0 100644 --- a/resource-manager/security/2021-06-01/settings/README.md +++ b/resource-manager/security/2021-06-01/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2021-06-01/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2021-06-01`). +The `settings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2021-06-01/settings/client.go b/resource-manager/security/2021-06-01/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/security/2021-06-01/settings/client.go +++ b/resource-manager/security/2021-06-01/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/security/2021-06-01/settings/id_setting.go b/resource-manager/security/2021-06-01/settings/id_setting.go index bb7aff42014..ec6ca94f882 100644 --- a/resource-manager/security/2021-06-01/settings/id_setting.go +++ b/resource-manager/security/2021-06-01/settings/id_setting.go @@ -40,7 +40,7 @@ func ParseSettingID(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSettingIDInsensitively(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2021-06-01/settings/method_get.go b/resource-manager/security/2021-06-01/settings/method_get.go index 0ff21eba040..d256d272215 100644 --- a/resource-manager/security/2021-06-01/settings/method_get.go +++ b/resource-manager/security/2021-06-01/settings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // Get ... @@ -48,11 +48,11 @@ func (c SettingsClient) Get(ctx context.Context, id SettingId) (result GetOperat if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2021-06-01/settings/method_list.go b/resource-manager/security/2021-06-01/settings/method_list.go index fd56235e0d6..1f2b35c3654 100644 --- a/resource-manager/security/2021-06-01/settings/method_list.go +++ b/resource-manager/security/2021-06-01/settings/method_list.go @@ -74,7 +74,7 @@ func (c SettingsClient) List(ctx context.Context, id commonids.SubscriptionId) ( temp := make([]Setting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSettingImplementation(v) + val, err := UnmarshalSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Setting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/security/2021-06-01/settings/method_update.go b/resource-manager/security/2021-06-01/settings/method_update.go index 283f4df6177..e860fcad79a 100644 --- a/resource-manager/security/2021-06-01/settings/method_update.go +++ b/resource-manager/security/2021-06-01/settings/method_update.go @@ -15,7 +15,7 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // Update ... @@ -52,11 +52,11 @@ func (c SettingsClient) Update(ctx context.Context, id SettingId, input Setting) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2021-06-01/settings/model_alertsyncsettings.go b/resource-manager/security/2021-06-01/settings/model_alertsyncsettings.go index 091aee964d8..513438d812d 100644 --- a/resource-manager/security/2021-06-01/settings/model_alertsyncsettings.go +++ b/resource-manager/security/2021-06-01/settings/model_alertsyncsettings.go @@ -14,9 +14,20 @@ type AlertSyncSettings struct { Properties *AlertSyncSettingProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AlertSyncSettings) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = AlertSyncSettings{} @@ -30,9 +41,10 @@ func (s AlertSyncSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AlertSyncSettings: %+v", err) } + decoded["kind"] = "AlertSyncSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2021-06-01/settings/model_dataexportsettings.go b/resource-manager/security/2021-06-01/settings/model_dataexportsettings.go index fb1b53b7839..852f6d87d62 100644 --- a/resource-manager/security/2021-06-01/settings/model_dataexportsettings.go +++ b/resource-manager/security/2021-06-01/settings/model_dataexportsettings.go @@ -14,9 +14,20 @@ type DataExportSettings struct { Properties *DataExportSettingProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s DataExportSettings) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DataExportSettings{} @@ -30,9 +41,10 @@ func (s DataExportSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataExportSettings: %+v", err) } + decoded["kind"] = "DataExportSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2021-06-01/settings/model_setting.go b/resource-manager/security/2021-06-01/settings/model_setting.go index 8605c342c59..45cd0750706 100644 --- a/resource-manager/security/2021-06-01/settings/model_setting.go +++ b/resource-manager/security/2021-06-01/settings/model_setting.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Setting interface { + Setting() BaseSettingImpl } -// RawSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Setting = BaseSettingImpl{} + +type BaseSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSettingImpl) Setting() BaseSettingImpl { + return s +} + +var _ Setting = RawSettingImpl{} + +// RawSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSettingImpl struct { - Type string - Values map[string]interface{} + setting BaseSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSettingImpl) Setting() BaseSettingImpl { + return s.setting } -func unmarshalSettingImplementation(input []byte) (Setting, error) { +func UnmarshalSettingImplementation(input []byte) (Setting, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalSettingImplementation(input []byte) (Setting, error) { return out, nil } - out := RawSettingImpl{ - Type: value, - Values: temp, + var parent BaseSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSettingImpl: %+v", err) } - return out, nil + + return RawSettingImpl{ + setting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2021-06-01/settings/version.go b/resource-manager/security/2021-06-01/settings/version.go index fbf6483e3ce..13ab3f08457 100644 --- a/resource-manager/security/2021-06-01/settings/version.go +++ b/resource-manager/security/2021-06-01/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2021-06-01" } diff --git a/resource-manager/security/2022-03-01/pricings/README.md b/resource-manager/security/2022-03-01/pricings/README.md index 9607e261007..7321e414b58 100644 --- a/resource-manager/security/2022-03-01/pricings/README.md +++ b/resource-manager/security/2022-03-01/pricings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2022-03-01/pricings` Documentation -The `pricings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2022-03-01`). +The `pricings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2022-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2022-03-01/pricings/client.go b/resource-manager/security/2022-03-01/pricings/client.go index 7d9c16fd7af..20a0e6c340e 100644 --- a/resource-manager/security/2022-03-01/pricings/client.go +++ b/resource-manager/security/2022-03-01/pricings/client.go @@ -15,7 +15,7 @@ type PricingsClient struct { } func NewPricingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PricingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PricingsClient: %+v", err) } diff --git a/resource-manager/security/2022-03-01/pricings/id_pricing.go b/resource-manager/security/2022-03-01/pricings/id_pricing.go index 3a6e71ebd07..9662d957c3c 100644 --- a/resource-manager/security/2022-03-01/pricings/id_pricing.go +++ b/resource-manager/security/2022-03-01/pricings/id_pricing.go @@ -40,7 +40,7 @@ func ParsePricingID(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePricingIDInsensitively(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2022-03-01/pricings/method_get.go b/resource-manager/security/2022-03-01/pricings/method_get.go index 36f6a556ae2..81e767bd096 100644 --- a/resource-manager/security/2022-03-01/pricings/method_get.go +++ b/resource-manager/security/2022-03-01/pricings/method_get.go @@ -45,7 +45,6 @@ func (c PricingsClient) Get(ctx context.Context, id PricingId) (result GetOperat var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2022-03-01/pricings/method_list.go b/resource-manager/security/2022-03-01/pricings/method_list.go index ad645d5d868..0d3d8b4d9f9 100644 --- a/resource-manager/security/2022-03-01/pricings/method_list.go +++ b/resource-manager/security/2022-03-01/pricings/method_list.go @@ -47,7 +47,6 @@ func (c PricingsClient) List(ctx context.Context, id commonids.SubscriptionId) ( var model PricingList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2022-03-01/pricings/method_update.go b/resource-manager/security/2022-03-01/pricings/method_update.go index 07420ccd794..129c522649e 100644 --- a/resource-manager/security/2022-03-01/pricings/method_update.go +++ b/resource-manager/security/2022-03-01/pricings/method_update.go @@ -49,7 +49,6 @@ func (c PricingsClient) Update(ctx context.Context, id PricingId, input Pricing) var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2022-03-01/pricings/version.go b/resource-manager/security/2022-03-01/pricings/version.go index 7cfa9951701..8af90bf6abb 100644 --- a/resource-manager/security/2022-03-01/pricings/version.go +++ b/resource-manager/security/2022-03-01/pricings/version.go @@ -1,12 +1,10 @@ package pricings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricings/2022-03-01" } diff --git a/resource-manager/security/2022-05-01/settings/README.md b/resource-manager/security/2022-05-01/settings/README.md index b4f91326ce5..abc5be7bad4 100644 --- a/resource-manager/security/2022-05-01/settings/README.md +++ b/resource-manager/security/2022-05-01/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2022-05-01/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2022-05-01`). +The `settings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2022-05-01/settings/client.go b/resource-manager/security/2022-05-01/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/security/2022-05-01/settings/client.go +++ b/resource-manager/security/2022-05-01/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/security/2022-05-01/settings/id_setting.go b/resource-manager/security/2022-05-01/settings/id_setting.go index bb7aff42014..ec6ca94f882 100644 --- a/resource-manager/security/2022-05-01/settings/id_setting.go +++ b/resource-manager/security/2022-05-01/settings/id_setting.go @@ -40,7 +40,7 @@ func ParseSettingID(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseSettingIDInsensitively(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2022-05-01/settings/method_get.go b/resource-manager/security/2022-05-01/settings/method_get.go index 0ff21eba040..d256d272215 100644 --- a/resource-manager/security/2022-05-01/settings/method_get.go +++ b/resource-manager/security/2022-05-01/settings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // Get ... @@ -48,11 +48,11 @@ func (c SettingsClient) Get(ctx context.Context, id SettingId) (result GetOperat if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2022-05-01/settings/method_list.go b/resource-manager/security/2022-05-01/settings/method_list.go index fd56235e0d6..1f2b35c3654 100644 --- a/resource-manager/security/2022-05-01/settings/method_list.go +++ b/resource-manager/security/2022-05-01/settings/method_list.go @@ -74,7 +74,7 @@ func (c SettingsClient) List(ctx context.Context, id commonids.SubscriptionId) ( temp := make([]Setting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSettingImplementation(v) + val, err := UnmarshalSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for Setting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/security/2022-05-01/settings/method_update.go b/resource-manager/security/2022-05-01/settings/method_update.go index 283f4df6177..e860fcad79a 100644 --- a/resource-manager/security/2022-05-01/settings/method_update.go +++ b/resource-manager/security/2022-05-01/settings/method_update.go @@ -15,7 +15,7 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Setting + Model Setting } // Update ... @@ -52,11 +52,11 @@ func (c SettingsClient) Update(ctx context.Context, id SettingId, input Setting) if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingImplementation(respObj) + model, err := UnmarshalSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2022-05-01/settings/model_alertsyncsettings.go b/resource-manager/security/2022-05-01/settings/model_alertsyncsettings.go index 091aee964d8..513438d812d 100644 --- a/resource-manager/security/2022-05-01/settings/model_alertsyncsettings.go +++ b/resource-manager/security/2022-05-01/settings/model_alertsyncsettings.go @@ -14,9 +14,20 @@ type AlertSyncSettings struct { Properties *AlertSyncSettingProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AlertSyncSettings) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = AlertSyncSettings{} @@ -30,9 +41,10 @@ func (s AlertSyncSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AlertSyncSettings: %+v", err) } + decoded["kind"] = "AlertSyncSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2022-05-01/settings/model_dataexportsettings.go b/resource-manager/security/2022-05-01/settings/model_dataexportsettings.go index fb1b53b7839..852f6d87d62 100644 --- a/resource-manager/security/2022-05-01/settings/model_dataexportsettings.go +++ b/resource-manager/security/2022-05-01/settings/model_dataexportsettings.go @@ -14,9 +14,20 @@ type DataExportSettings struct { Properties *DataExportSettingProperties `json:"properties,omitempty"` // Fields inherited from Setting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s DataExportSettings) Setting() BaseSettingImpl { + return BaseSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = DataExportSettings{} @@ -30,9 +41,10 @@ func (s DataExportSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DataExportSettings: %+v", err) } + decoded["kind"] = "DataExportSettings" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2022-05-01/settings/model_setting.go b/resource-manager/security/2022-05-01/settings/model_setting.go index 8605c342c59..45cd0750706 100644 --- a/resource-manager/security/2022-05-01/settings/model_setting.go +++ b/resource-manager/security/2022-05-01/settings/model_setting.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Setting interface { + Setting() BaseSettingImpl } -// RawSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Setting = BaseSettingImpl{} + +type BaseSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSettingImpl) Setting() BaseSettingImpl { + return s +} + +var _ Setting = RawSettingImpl{} + +// RawSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSettingImpl struct { - Type string - Values map[string]interface{} + setting BaseSettingImpl + Type string + Values map[string]interface{} +} + +func (s RawSettingImpl) Setting() BaseSettingImpl { + return s.setting } -func unmarshalSettingImplementation(input []byte) (Setting, error) { +func UnmarshalSettingImplementation(input []byte) (Setting, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalSettingImplementation(input []byte) (Setting, error) { return out, nil } - out := RawSettingImpl{ - Type: value, - Values: temp, + var parent BaseSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSettingImpl: %+v", err) } - return out, nil + + return RawSettingImpl{ + setting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2022-05-01/settings/version.go b/resource-manager/security/2022-05-01/settings/version.go index 64976e84b7b..ec6499a37e0 100644 --- a/resource-manager/security/2022-05-01/settings/version.go +++ b/resource-manager/security/2022-05-01/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2022-05-01" } diff --git a/resource-manager/security/2022-12-01-preview/defenderforstorage/README.md b/resource-manager/security/2022-12-01-preview/defenderforstorage/README.md index b72ec1bbdc2..f2e0a79d4d4 100644 --- a/resource-manager/security/2022-12-01-preview/defenderforstorage/README.md +++ b/resource-manager/security/2022-12-01-preview/defenderforstorage/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2022-12-01-preview/defenderforstorage` Documentation -The `defenderforstorage` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2022-12-01-preview`). +The `defenderforstorage` SDK allows for interaction with Azure Resource Manager `security` (API Version `2022-12-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2022-12-01-preview/defenderforstorage/client.go b/resource-manager/security/2022-12-01-preview/defenderforstorage/client.go index cb1db4530c8..5c920d30f53 100644 --- a/resource-manager/security/2022-12-01-preview/defenderforstorage/client.go +++ b/resource-manager/security/2022-12-01-preview/defenderforstorage/client.go @@ -15,7 +15,7 @@ type DefenderForStorageClient struct { } func NewDefenderForStorageClientWithBaseURI(sdkApi sdkEnv.Api) (*DefenderForStorageClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "defenderforstorage", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "defenderforstorage", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DefenderForStorageClient: %+v", err) } diff --git a/resource-manager/security/2022-12-01-preview/defenderforstorage/method_create.go b/resource-manager/security/2022-12-01-preview/defenderforstorage/method_create.go index bc33b57be16..606f30f7368 100644 --- a/resource-manager/security/2022-12-01-preview/defenderforstorage/method_create.go +++ b/resource-manager/security/2022-12-01-preview/defenderforstorage/method_create.go @@ -52,7 +52,6 @@ func (c DefenderForStorageClient) Create(ctx context.Context, id commonids.Scope var model DefenderForStorageSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2022-12-01-preview/defenderforstorage/method_get.go b/resource-manager/security/2022-12-01-preview/defenderforstorage/method_get.go index a1f44e098ac..5645bd41e44 100644 --- a/resource-manager/security/2022-12-01-preview/defenderforstorage/method_get.go +++ b/resource-manager/security/2022-12-01-preview/defenderforstorage/method_get.go @@ -47,7 +47,6 @@ func (c DefenderForStorageClient) Get(ctx context.Context, id commonids.ScopeId) var model DefenderForStorageSetting result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2022-12-01-preview/defenderforstorage/version.go b/resource-manager/security/2022-12-01-preview/defenderforstorage/version.go index 4992e9b255c..9be66c42aa2 100644 --- a/resource-manager/security/2022-12-01-preview/defenderforstorage/version.go +++ b/resource-manager/security/2022-12-01-preview/defenderforstorage/version.go @@ -1,12 +1,10 @@ package defenderforstorage -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-12-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/defenderforstorage/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/defenderforstorage/2022-12-01-preview" } diff --git a/resource-manager/security/2023-01-01/pricings/README.md b/resource-manager/security/2023-01-01/pricings/README.md index 387e330bac4..cbbec137b61 100644 --- a/resource-manager/security/2023-01-01/pricings/README.md +++ b/resource-manager/security/2023-01-01/pricings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-01-01/pricings` Documentation -The `pricings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-01-01`). +The `pricings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-01-01/pricings/client.go b/resource-manager/security/2023-01-01/pricings/client.go index 7d9c16fd7af..20a0e6c340e 100644 --- a/resource-manager/security/2023-01-01/pricings/client.go +++ b/resource-manager/security/2023-01-01/pricings/client.go @@ -15,7 +15,7 @@ type PricingsClient struct { } func NewPricingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PricingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PricingsClient: %+v", err) } diff --git a/resource-manager/security/2023-01-01/pricings/id_pricing.go b/resource-manager/security/2023-01-01/pricings/id_pricing.go index 3a6e71ebd07..9662d957c3c 100644 --- a/resource-manager/security/2023-01-01/pricings/id_pricing.go +++ b/resource-manager/security/2023-01-01/pricings/id_pricing.go @@ -40,7 +40,7 @@ func ParsePricingID(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePricingIDInsensitively(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-01-01/pricings/method_get.go b/resource-manager/security/2023-01-01/pricings/method_get.go index 36f6a556ae2..81e767bd096 100644 --- a/resource-manager/security/2023-01-01/pricings/method_get.go +++ b/resource-manager/security/2023-01-01/pricings/method_get.go @@ -45,7 +45,6 @@ func (c PricingsClient) Get(ctx context.Context, id PricingId) (result GetOperat var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-01-01/pricings/method_list.go b/resource-manager/security/2023-01-01/pricings/method_list.go index ad645d5d868..0d3d8b4d9f9 100644 --- a/resource-manager/security/2023-01-01/pricings/method_list.go +++ b/resource-manager/security/2023-01-01/pricings/method_list.go @@ -47,7 +47,6 @@ func (c PricingsClient) List(ctx context.Context, id commonids.SubscriptionId) ( var model PricingList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-01-01/pricings/method_update.go b/resource-manager/security/2023-01-01/pricings/method_update.go index 07420ccd794..129c522649e 100644 --- a/resource-manager/security/2023-01-01/pricings/method_update.go +++ b/resource-manager/security/2023-01-01/pricings/method_update.go @@ -49,7 +49,6 @@ func (c PricingsClient) Update(ctx context.Context, id PricingId, input Pricing) var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-01-01/pricings/version.go b/resource-manager/security/2023-01-01/pricings/version.go index 9e0081a5b99..c00899a8f5e 100644 --- a/resource-manager/security/2023-01-01/pricings/version.go +++ b/resource-manager/security/2023-01-01/pricings/version.go @@ -1,12 +1,10 @@ package pricings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricings/2023-01-01" } diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/README.md b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/README.md index 463e4732e09..2877ea40795 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/README.md +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings` Documentation -The `servervulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-05-01`). +The `servervulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/client.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/client.go index 6f2ce3fb325..f6be76011ae 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/client.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentsSettingsClient struct { } func NewServerVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_createorupdate.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_createorupdate.go index 0d2d06907da..60480b642d0 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_createorupdate.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_createorupdate.go @@ -17,7 +17,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ServerVulnerabilityAssessmentsSetting + Model ServerVulnerabilityAssessmentsSetting } // CreateOrUpdate ... @@ -55,11 +55,11 @@ func (c ServerVulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalServerVulnerabilityAssessmentsSettingImplementation(respObj) + model, err := UnmarshalServerVulnerabilityAssessmentsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_get.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_get.go index ca1ec434b0a..ec4e4692791 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_get.go @@ -17,7 +17,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ServerVulnerabilityAssessmentsSetting + Model ServerVulnerabilityAssessmentsSetting } // Get ... @@ -50,11 +50,11 @@ func (c ServerVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalServerVulnerabilityAssessmentsSettingImplementation(respObj) + model, err := UnmarshalServerVulnerabilityAssessmentsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_listbysubscription.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_listbysubscription.go index 593672e8c31..689b1378765 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_listbysubscription.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/method_listbysubscription.go @@ -74,7 +74,7 @@ func (c ServerVulnerabilityAssessmentsSettingsClient) ListBySubscription(ctx con temp := make([]ServerVulnerabilityAssessmentsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalServerVulnerabilityAssessmentsSettingImplementation(v) + val, err := UnmarshalServerVulnerabilityAssessmentsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ServerVulnerabilityAssessmentsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_azureserverssetting.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_azureserverssetting.go index 5dddb739adf..ab1c44b3c37 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_azureserverssetting.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_azureserverssetting.go @@ -16,10 +16,22 @@ type AzureServersSetting struct { Properties *ServerVulnerabilityAssessmentsAzureSettingProperties `json:"properties,omitempty"` // Fields inherited from ServerVulnerabilityAssessmentsSetting - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind ServerVulnerabilityAssessmentsSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AzureServersSetting) ServerVulnerabilityAssessmentsSetting() BaseServerVulnerabilityAssessmentsSettingImpl { + return BaseServerVulnerabilityAssessmentsSettingImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AzureServersSetting{} @@ -33,9 +45,10 @@ func (s AzureServersSetting) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureServersSetting: %+v", err) } + decoded["kind"] = "AzureServersSetting" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_servervulnerabilityassessmentssetting.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_servervulnerabilityassessmentssetting.go index fce0f0509da..9300c7e1119 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_servervulnerabilityassessmentssetting.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/model_servervulnerabilityassessmentssetting.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerVulnerabilityAssessmentsSetting interface { + ServerVulnerabilityAssessmentsSetting() BaseServerVulnerabilityAssessmentsSettingImpl +} + +var _ ServerVulnerabilityAssessmentsSetting = BaseServerVulnerabilityAssessmentsSettingImpl{} + +type BaseServerVulnerabilityAssessmentsSettingImpl struct { + Id *string `json:"id,omitempty"` + Kind ServerVulnerabilityAssessmentsSettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseServerVulnerabilityAssessmentsSettingImpl) ServerVulnerabilityAssessmentsSetting() BaseServerVulnerabilityAssessmentsSettingImpl { + return s } -// RawServerVulnerabilityAssessmentsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServerVulnerabilityAssessmentsSetting = RawServerVulnerabilityAssessmentsSettingImpl{} + +// RawServerVulnerabilityAssessmentsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServerVulnerabilityAssessmentsSettingImpl struct { - Type string - Values map[string]interface{} + serverVulnerabilityAssessmentsSetting BaseServerVulnerabilityAssessmentsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalServerVulnerabilityAssessmentsSettingImplementation(input []byte) (ServerVulnerabilityAssessmentsSetting, error) { +func (s RawServerVulnerabilityAssessmentsSettingImpl) ServerVulnerabilityAssessmentsSetting() BaseServerVulnerabilityAssessmentsSettingImpl { + return s.serverVulnerabilityAssessmentsSetting +} + +func UnmarshalServerVulnerabilityAssessmentsSettingImplementation(input []byte) (ServerVulnerabilityAssessmentsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +67,15 @@ func unmarshalServerVulnerabilityAssessmentsSettingImplementation(input []byte) return out, nil } - out := RawServerVulnerabilityAssessmentsSettingImpl{ - Type: value, - Values: temp, + var parent BaseServerVulnerabilityAssessmentsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServerVulnerabilityAssessmentsSettingImpl: %+v", err) } - return out, nil + + return RawServerVulnerabilityAssessmentsSettingImpl{ + serverVulnerabilityAssessmentsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/version.go b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/version.go index 3a55f7185ff..658c3df9d6a 100644 --- a/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/version.go +++ b/resource-manager/security/2023-05-01/servervulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessmentssettings/2023-05-01" } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/README.md b/resource-manager/security/2023-10-01-preview/securityconnectors/README.md index 154e75e7774..fdf75d970f0 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/README.md +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-10-01-preview/securityconnectors` Documentation -The `securityconnectors` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-10-01-preview`). +The `securityconnectors` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/client.go b/resource-manager/security/2023-10-01-preview/securityconnectors/client.go index 65cc71b13be..5869d12af9a 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/client.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/client.go @@ -15,7 +15,7 @@ type SecurityConnectorsClient struct { } func NewSecurityConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securityconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securityconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityConnectorsClient: %+v", err) } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/id_securityconnector.go b/resource-manager/security/2023-10-01-preview/securityconnectors/id_securityconnector.go index 4d72c2abf52..aa9920ccebd 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/id_securityconnector.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/id_securityconnector.go @@ -42,7 +42,7 @@ func ParseSecurityConnectorID(input string) (*SecurityConnectorId, error) { } id := SecurityConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityConnectorIDInsensitively(input string) (*SecurityConnectorId, } id := SecurityConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/method_createorupdate.go b/resource-manager/security/2023-10-01-preview/securityconnectors/method_createorupdate.go index c3c494ec14c..79e28b9b54b 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/method_createorupdate.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/method_createorupdate.go @@ -50,7 +50,6 @@ func (c SecurityConnectorsClient) CreateOrUpdate(ctx context.Context, id Securit var model SecurityConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/method_get.go b/resource-manager/security/2023-10-01-preview/securityconnectors/method_get.go index 8fafc934b5b..437efa9772e 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/method_get.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/method_get.go @@ -45,7 +45,6 @@ func (c SecurityConnectorsClient) Get(ctx context.Context, id SecurityConnectorI var model SecurityConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/method_update.go b/resource-manager/security/2023-10-01-preview/securityconnectors/method_update.go index 3aacba38a99..8ac6e413d34 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/method_update.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/method_update.go @@ -49,7 +49,6 @@ func (c SecurityConnectorsClient) Update(ctx context.Context, id SecurityConnect var model SecurityConnector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsenvironmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsenvironmentdata.go index fb9c1581b40..fa9eefd0f8b 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsenvironmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsenvironmentdata.go @@ -17,6 +17,14 @@ type AwsEnvironmentData struct { ScanInterval *int64 `json:"scanInterval,omitempty"` // Fields inherited from EnvironmentData + + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s AwsEnvironmentData) EnvironmentData() BaseEnvironmentDataImpl { + return BaseEnvironmentDataImpl{ + EnvironmentType: s.EnvironmentType, + } } var _ json.Marshaler = AwsEnvironmentData{} @@ -30,9 +38,10 @@ func (s AwsEnvironmentData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsEnvironmentData: %+v", err) } + decoded["environmentType"] = "AwsAccount" encoded, err = json.Marshal(decoded) @@ -53,6 +62,7 @@ func (s *AwsEnvironmentData) UnmarshalJSON(bytes []byte) error { } s.AccountName = decoded.AccountName + s.EnvironmentType = decoded.EnvironmentType s.Regions = decoded.Regions s.ScanInterval = decoded.ScanInterval @@ -62,7 +72,7 @@ func (s *AwsEnvironmentData) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["organizationalData"]; ok { - impl, err := unmarshalAwsOrganizationalDataImplementation(v) + impl, err := UnmarshalAwsOrganizationalDataImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'OrganizationalData' for 'AwsEnvironmentData': %+v", err) } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldata.go index 401de913209..3827d1b669a 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldata.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsOrganizationalData interface { + AwsOrganizationalData() BaseAwsOrganizationalDataImpl } -// RawAwsOrganizationalDataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AwsOrganizationalData = BaseAwsOrganizationalDataImpl{} + +type BaseAwsOrganizationalDataImpl struct { + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s BaseAwsOrganizationalDataImpl) AwsOrganizationalData() BaseAwsOrganizationalDataImpl { + return s +} + +var _ AwsOrganizationalData = RawAwsOrganizationalDataImpl{} + +// RawAwsOrganizationalDataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAwsOrganizationalDataImpl struct { - Type string - Values map[string]interface{} + awsOrganizationalData BaseAwsOrganizationalDataImpl + Type string + Values map[string]interface{} +} + +func (s RawAwsOrganizationalDataImpl) AwsOrganizationalData() BaseAwsOrganizationalDataImpl { + return s.awsOrganizationalData } -func unmarshalAwsOrganizationalDataImplementation(input []byte) (AwsOrganizationalData, error) { +func UnmarshalAwsOrganizationalDataImplementation(input []byte) (AwsOrganizationalData, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalAwsOrganizationalDataImplementation(input []byte) (AwsOrganization return out, nil } - out := RawAwsOrganizationalDataImpl{ - Type: value, - Values: temp, + var parent BaseAwsOrganizationalDataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAwsOrganizationalDataImpl: %+v", err) } - return out, nil + + return RawAwsOrganizationalDataImpl{ + awsOrganizationalData: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamaster.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamaster.go index 6655b0ca031..8a0f687a248 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamaster.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamaster.go @@ -15,6 +15,14 @@ type AwsOrganizationalDataMaster struct { StacksetName *string `json:"stacksetName,omitempty"` // Fields inherited from AwsOrganizationalData + + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s AwsOrganizationalDataMaster) AwsOrganizationalData() BaseAwsOrganizationalDataImpl { + return BaseAwsOrganizationalDataImpl{ + OrganizationMembershipType: s.OrganizationMembershipType, + } } var _ json.Marshaler = AwsOrganizationalDataMaster{} @@ -28,9 +36,10 @@ func (s AwsOrganizationalDataMaster) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsOrganizationalDataMaster: %+v", err) } + decoded["organizationMembershipType"] = "Organization" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamember.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamember.go index 64976de7084..ff853e1ae0c 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamember.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_awsorganizationaldatamember.go @@ -14,6 +14,14 @@ type AwsOrganizationalDataMember struct { ParentHierarchyId *string `json:"parentHierarchyId,omitempty"` // Fields inherited from AwsOrganizationalData + + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s AwsOrganizationalDataMember) AwsOrganizationalData() BaseAwsOrganizationalDataImpl { + return BaseAwsOrganizationalDataImpl{ + OrganizationMembershipType: s.OrganizationMembershipType, + } } var _ json.Marshaler = AwsOrganizationalDataMember{} @@ -27,9 +35,10 @@ func (s AwsOrganizationalDataMember) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsOrganizationalDataMember: %+v", err) } + decoded["organizationMembershipType"] = "Member" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_azuredevopsscopeenvironmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_azuredevopsscopeenvironmentdata.go index 4fb7ae4a128..032ba40ec05 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_azuredevopsscopeenvironmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_azuredevopsscopeenvironmentdata.go @@ -13,6 +13,14 @@ var _ EnvironmentData = AzureDevOpsScopeEnvironmentData{} type AzureDevOpsScopeEnvironmentData struct { // Fields inherited from EnvironmentData + + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s AzureDevOpsScopeEnvironmentData) EnvironmentData() BaseEnvironmentDataImpl { + return BaseEnvironmentDataImpl{ + EnvironmentType: s.EnvironmentType, + } } var _ json.Marshaler = AzureDevOpsScopeEnvironmentData{} @@ -26,9 +34,10 @@ func (s AzureDevOpsScopeEnvironmentData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDevOpsScopeEnvironmentData: %+v", err) } + decoded["environmentType"] = "AzureDevOpsScope" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cloudoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cloudoffering.go index 41c40200a01..5b2b32d4a4c 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cloudoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cloudoffering.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CloudOffering interface { + CloudOffering() BaseCloudOfferingImpl } -// RawCloudOfferingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CloudOffering = BaseCloudOfferingImpl{} + +type BaseCloudOfferingImpl struct { + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s BaseCloudOfferingImpl) CloudOffering() BaseCloudOfferingImpl { + return s +} + +var _ CloudOffering = RawCloudOfferingImpl{} + +// RawCloudOfferingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCloudOfferingImpl struct { - Type string - Values map[string]interface{} + cloudOffering BaseCloudOfferingImpl + Type string + Values map[string]interface{} +} + +func (s RawCloudOfferingImpl) CloudOffering() BaseCloudOfferingImpl { + return s.cloudOffering } -func unmarshalCloudOfferingImplementation(input []byte) (CloudOffering, error) { +func UnmarshalCloudOfferingImplementation(input []byte) (CloudOffering, error) { if input == nil { return nil, nil } @@ -172,10 +190,15 @@ func unmarshalCloudOfferingImplementation(input []byte) (CloudOffering, error) { return out, nil } - out := RawCloudOfferingImpl{ - Type: value, - Values: temp, + var parent BaseCloudOfferingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCloudOfferingImpl: %+v", err) } - return out, nil + + return RawCloudOfferingImpl{ + cloudOffering: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorawsoffering.go index 56c1fe1ccb5..c04212615c2 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorawsoffering.go @@ -14,7 +14,16 @@ type CspmMonitorAwsOffering struct { NativeCloudConnection *CspmMonitorAwsOfferingNativeCloudConnection `json:"nativeCloudConnection,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s CspmMonitorAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = CspmMonitorAwsOffering{} @@ -28,9 +37,10 @@ func (s CspmMonitorAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CspmMonitorAwsOffering: %+v", err) } + decoded["offeringType"] = "CspmMonitorAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorazuredevopsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorazuredevopsoffering.go index be82e80589f..aeadd24d0b3 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorazuredevopsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorazuredevopsoffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = CspmMonitorAzureDevOpsOffering{} type CspmMonitorAzureDevOpsOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s CspmMonitorAzureDevOpsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = CspmMonitorAzureDevOpsOffering{} @@ -27,9 +36,10 @@ func (s CspmMonitorAzureDevOpsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CspmMonitorAzureDevOpsOffering: %+v", err) } + decoded["offeringType"] = "CspmMonitorAzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgcpoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgcpoffering.go index 10dc3064e08..ee7966db78e 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgcpoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgcpoffering.go @@ -14,7 +14,16 @@ type CspmMonitorGcpOffering struct { NativeCloudConnection *CspmMonitorGcpOfferingNativeCloudConnection `json:"nativeCloudConnection,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s CspmMonitorGcpOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = CspmMonitorGcpOffering{} @@ -28,9 +37,10 @@ func (s CspmMonitorGcpOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CspmMonitorGcpOffering: %+v", err) } + decoded["offeringType"] = "CspmMonitorGcp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgithuboffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgithuboffering.go index a76c0be63a6..8e2cf2e9f0d 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgithuboffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgithuboffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = CspmMonitorGithubOffering{} type CspmMonitorGithubOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s CspmMonitorGithubOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = CspmMonitorGithubOffering{} @@ -27,9 +36,10 @@ func (s CspmMonitorGithubOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CspmMonitorGithubOffering: %+v", err) } + decoded["offeringType"] = "CspmMonitorGithub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgitlaboffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgitlaboffering.go index bcdb90193d7..ea3f2aa272a 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgitlaboffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_cspmmonitorgitlaboffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = CspmMonitorGitLabOffering{} type CspmMonitorGitLabOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s CspmMonitorGitLabOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = CspmMonitorGitLabOffering{} @@ -27,9 +36,10 @@ func (s CspmMonitorGitLabOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CspmMonitorGitLabOffering: %+v", err) } + decoded["offeringType"] = "CspmMonitorGitLab" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmawsoffering.go index d79978b8780..17985f6403f 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmawsoffering.go @@ -19,7 +19,16 @@ type DefenderCspmAwsOffering struct { VMScanners *DefenderCspmAwsOfferingVMScanners `json:"vmScanners,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderCspmAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderCspmAwsOffering{} @@ -33,9 +42,10 @@ func (s DefenderCspmAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderCspmAwsOffering: %+v", err) } + decoded["offeringType"] = "DefenderCspmAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmgcpoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmgcpoffering.go index c4ade2b2674..47931d811df 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmgcpoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defendercspmgcpoffering.go @@ -18,7 +18,16 @@ type DefenderCspmGcpOffering struct { VMScanners *DefenderCspmGcpOfferingVMScanners `json:"vmScanners,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderCspmGcpOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderCspmGcpOffering{} @@ -32,9 +41,10 @@ func (s DefenderCspmGcpOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderCspmGcpOffering: %+v", err) } + decoded["offeringType"] = "DefenderCspmGcp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfodatabasesawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfodatabasesawsoffering.go index 8c13c1c5fd1..6b4d7401ec3 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfodatabasesawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfodatabasesawsoffering.go @@ -16,7 +16,16 @@ type DefenderFoDatabasesAwsOffering struct { Rds *DefenderFoDatabasesAwsOfferingRds `json:"rds,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderFoDatabasesAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderFoDatabasesAwsOffering{} @@ -30,9 +39,10 @@ func (s DefenderFoDatabasesAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderFoDatabasesAwsOffering: %+v", err) } + decoded["offeringType"] = "DefenderForDatabasesAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersawsoffering.go index 90fa8e79d6f..49354670f58 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersawsoffering.go @@ -25,7 +25,16 @@ type DefenderForContainersAwsOffering struct { ScubaExternalId *string `json:"scubaExternalId,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForContainersAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForContainersAwsOffering{} @@ -39,9 +48,10 @@ func (s DefenderForContainersAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForContainersAwsOffering: %+v", err) } + decoded["offeringType"] = "DefenderForContainersAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersgcpoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersgcpoffering.go index ec1070bfa9a..9dd71f09c0b 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersgcpoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforcontainersgcpoffering.go @@ -20,7 +20,16 @@ type DefenderForContainersGcpOffering struct { PolicyAgentAutoProvisioningFlag *bool `json:"policyAgentAutoProvisioningFlag,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForContainersGcpOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForContainersGcpOffering{} @@ -34,9 +43,10 @@ func (s DefenderForContainersGcpOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForContainersGcpOffering: %+v", err) } + decoded["offeringType"] = "DefenderForContainersGcp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordatabasesgcpoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordatabasesgcpoffering.go index eef826a0be9..c63a56adea2 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordatabasesgcpoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordatabasesgcpoffering.go @@ -15,7 +15,16 @@ type DefenderForDatabasesGcpOffering struct { DefenderForDatabasesArcAutoProvisioning *DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning `json:"defenderForDatabasesArcAutoProvisioning,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForDatabasesGcpOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForDatabasesGcpOffering{} @@ -29,9 +38,10 @@ func (s DefenderForDatabasesGcpOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForDatabasesGcpOffering: %+v", err) } + decoded["offeringType"] = "DefenderForDatabasesGcp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsazuredevopsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsazuredevopsoffering.go index e6a7ca49a05..58c0612616d 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsazuredevopsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsazuredevopsoffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = DefenderForDevOpsAzureDevOpsOffering{} type DefenderForDevOpsAzureDevOpsOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForDevOpsAzureDevOpsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForDevOpsAzureDevOpsOffering{} @@ -27,9 +36,10 @@ func (s DefenderForDevOpsAzureDevOpsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForDevOpsAzureDevOpsOffering: %+v", err) } + decoded["offeringType"] = "DefenderForDevOpsAzureDevOps" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgithuboffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgithuboffering.go index 33f831ef7d0..d2aa2648a90 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgithuboffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgithuboffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = DefenderForDevOpsGithubOffering{} type DefenderForDevOpsGithubOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForDevOpsGithubOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForDevOpsGithubOffering{} @@ -27,9 +36,10 @@ func (s DefenderForDevOpsGithubOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForDevOpsGithubOffering: %+v", err) } + decoded["offeringType"] = "DefenderForDevOpsGithub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgitlaboffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgitlaboffering.go index cc89160af8b..b3a7fd3a569 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgitlaboffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderfordevopsgitlaboffering.go @@ -13,7 +13,16 @@ var _ CloudOffering = DefenderForDevOpsGitLabOffering{} type DefenderForDevOpsGitLabOffering struct { // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForDevOpsGitLabOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForDevOpsGitLabOffering{} @@ -27,9 +36,10 @@ func (s DefenderForDevOpsGitLabOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForDevOpsGitLabOffering: %+v", err) } + decoded["offeringType"] = "DefenderForDevOpsGitLab" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversawsoffering.go index 9059e777504..ecf8bb10665 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversawsoffering.go @@ -19,7 +19,16 @@ type DefenderForServersAwsOffering struct { VaAutoProvisioning *DefenderForServersAwsOfferingVaAutoProvisioning `json:"vaAutoProvisioning,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForServersAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForServersAwsOffering{} @@ -33,9 +42,10 @@ func (s DefenderForServersAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForServersAwsOffering: %+v", err) } + decoded["offeringType"] = "DefenderForServersAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversgcpoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversgcpoffering.go index e4a6e588c53..698b05d905e 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversgcpoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_defenderforserversgcpoffering.go @@ -19,7 +19,16 @@ type DefenderForServersGcpOffering struct { VaAutoProvisioning *DefenderForServersGcpOfferingVaAutoProvisioning `json:"vaAutoProvisioning,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s DefenderForServersGcpOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = DefenderForServersGcpOffering{} @@ -33,9 +42,10 @@ func (s DefenderForServersGcpOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DefenderForServersGcpOffering: %+v", err) } + decoded["offeringType"] = "DefenderForServersGcp" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_environmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_environmentdata.go index 91ab918477d..8575d336f75 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_environmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_environmentdata.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnvironmentData interface { + EnvironmentData() BaseEnvironmentDataImpl } -// RawEnvironmentDataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnvironmentData = BaseEnvironmentDataImpl{} + +type BaseEnvironmentDataImpl struct { + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s BaseEnvironmentDataImpl) EnvironmentData() BaseEnvironmentDataImpl { + return s +} + +var _ EnvironmentData = RawEnvironmentDataImpl{} + +// RawEnvironmentDataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnvironmentDataImpl struct { - Type string - Values map[string]interface{} + environmentData BaseEnvironmentDataImpl + Type string + Values map[string]interface{} +} + +func (s RawEnvironmentDataImpl) EnvironmentData() BaseEnvironmentDataImpl { + return s.environmentData } -func unmarshalEnvironmentDataImplementation(input []byte) (EnvironmentData, error) { +func UnmarshalEnvironmentDataImplementation(input []byte) (EnvironmentData, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalEnvironmentDataImplementation(input []byte) (EnvironmentData, erro return out, nil } - out := RawEnvironmentDataImpl{ - Type: value, - Values: temp, + var parent BaseEnvironmentDataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnvironmentDataImpl: %+v", err) } - return out, nil + + return RawEnvironmentDataImpl{ + environmentData: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldata.go index 8f349767e5b..a770273c541 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldata.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type GcpOrganizationalData interface { + GcpOrganizationalData() BaseGcpOrganizationalDataImpl } -// RawGcpOrganizationalDataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ GcpOrganizationalData = BaseGcpOrganizationalDataImpl{} + +type BaseGcpOrganizationalDataImpl struct { + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s BaseGcpOrganizationalDataImpl) GcpOrganizationalData() BaseGcpOrganizationalDataImpl { + return s +} + +var _ GcpOrganizationalData = RawGcpOrganizationalDataImpl{} + +// RawGcpOrganizationalDataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawGcpOrganizationalDataImpl struct { - Type string - Values map[string]interface{} + gcpOrganizationalData BaseGcpOrganizationalDataImpl + Type string + Values map[string]interface{} +} + +func (s RawGcpOrganizationalDataImpl) GcpOrganizationalData() BaseGcpOrganizationalDataImpl { + return s.gcpOrganizationalData } -func unmarshalGcpOrganizationalDataImplementation(input []byte) (GcpOrganizationalData, error) { +func UnmarshalGcpOrganizationalDataImplementation(input []byte) (GcpOrganizationalData, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalGcpOrganizationalDataImplementation(input []byte) (GcpOrganization return out, nil } - out := RawGcpOrganizationalDataImpl{ - Type: value, - Values: temp, + var parent BaseGcpOrganizationalDataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseGcpOrganizationalDataImpl: %+v", err) } - return out, nil + + return RawGcpOrganizationalDataImpl{ + gcpOrganizationalData: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldatamember.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldatamember.go index 8826aa63ba9..285a3253e28 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldatamember.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldatamember.go @@ -15,6 +15,14 @@ type GcpOrganizationalDataMember struct { ParentHierarchyId *string `json:"parentHierarchyId,omitempty"` // Fields inherited from GcpOrganizationalData + + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s GcpOrganizationalDataMember) GcpOrganizationalData() BaseGcpOrganizationalDataImpl { + return BaseGcpOrganizationalDataImpl{ + OrganizationMembershipType: s.OrganizationMembershipType, + } } var _ json.Marshaler = GcpOrganizationalDataMember{} @@ -28,9 +36,10 @@ func (s GcpOrganizationalDataMember) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GcpOrganizationalDataMember: %+v", err) } + decoded["organizationMembershipType"] = "Member" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldataorganization.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldataorganization.go index b7851af46f8..cf750253b5a 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldataorganization.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcporganizationaldataorganization.go @@ -17,6 +17,14 @@ type GcpOrganizationalDataOrganization struct { WorkloadIdentityProviderId *string `json:"workloadIdentityProviderId,omitempty"` // Fields inherited from GcpOrganizationalData + + OrganizationMembershipType OrganizationMembershipType `json:"organizationMembershipType"` +} + +func (s GcpOrganizationalDataOrganization) GcpOrganizationalData() BaseGcpOrganizationalDataImpl { + return BaseGcpOrganizationalDataImpl{ + OrganizationMembershipType: s.OrganizationMembershipType, + } } var _ json.Marshaler = GcpOrganizationalDataOrganization{} @@ -30,9 +38,10 @@ func (s GcpOrganizationalDataOrganization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GcpOrganizationalDataOrganization: %+v", err) } + decoded["organizationMembershipType"] = "Organization" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcpprojectenvironmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcpprojectenvironmentdata.go index 68db66a0dd6..3e07d99b64b 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcpprojectenvironmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gcpprojectenvironmentdata.go @@ -16,6 +16,14 @@ type GcpProjectEnvironmentData struct { ScanInterval *int64 `json:"scanInterval,omitempty"` // Fields inherited from EnvironmentData + + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s GcpProjectEnvironmentData) EnvironmentData() BaseEnvironmentDataImpl { + return BaseEnvironmentDataImpl{ + EnvironmentType: s.EnvironmentType, + } } var _ json.Marshaler = GcpProjectEnvironmentData{} @@ -29,9 +37,10 @@ func (s GcpProjectEnvironmentData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GcpProjectEnvironmentData: %+v", err) } + decoded["environmentType"] = "GcpProject" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *GcpProjectEnvironmentData) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into GcpProjectEnvironmentData: %+v", err) } + s.EnvironmentType = decoded.EnvironmentType s.ProjectDetails = decoded.ProjectDetails s.ScanInterval = decoded.ScanInterval @@ -60,7 +70,7 @@ func (s *GcpProjectEnvironmentData) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["organizationalData"]; ok { - impl, err := unmarshalGcpOrganizationalDataImplementation(v) + impl, err := UnmarshalGcpOrganizationalDataImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'OrganizationalData' for 'GcpProjectEnvironmentData': %+v", err) } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_githubscopeenvironmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_githubscopeenvironmentdata.go index 1230eb67f06..40fa9e1be73 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_githubscopeenvironmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_githubscopeenvironmentdata.go @@ -13,6 +13,14 @@ var _ EnvironmentData = GithubScopeEnvironmentData{} type GithubScopeEnvironmentData struct { // Fields inherited from EnvironmentData + + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s GithubScopeEnvironmentData) EnvironmentData() BaseEnvironmentDataImpl { + return BaseEnvironmentDataImpl{ + EnvironmentType: s.EnvironmentType, + } } var _ json.Marshaler = GithubScopeEnvironmentData{} @@ -26,9 +34,10 @@ func (s GithubScopeEnvironmentData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GithubScopeEnvironmentData: %+v", err) } + decoded["environmentType"] = "GithubScope" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gitlabscopeenvironmentdata.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gitlabscopeenvironmentdata.go index 3018b65e878..d0a89f80e86 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_gitlabscopeenvironmentdata.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_gitlabscopeenvironmentdata.go @@ -13,6 +13,14 @@ var _ EnvironmentData = GitlabScopeEnvironmentData{} type GitlabScopeEnvironmentData struct { // Fields inherited from EnvironmentData + + EnvironmentType EnvironmentType `json:"environmentType"` +} + +func (s GitlabScopeEnvironmentData) EnvironmentData() BaseEnvironmentDataImpl { + return BaseEnvironmentDataImpl{ + EnvironmentType: s.EnvironmentType, + } } var _ json.Marshaler = GitlabScopeEnvironmentData{} @@ -26,9 +34,10 @@ func (s GitlabScopeEnvironmentData) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GitlabScopeEnvironmentData: %+v", err) } + decoded["environmentType"] = "GitlabScope" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_informationprotectionawsoffering.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_informationprotectionawsoffering.go index ced9bc8e216..c3c6f994190 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_informationprotectionawsoffering.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_informationprotectionawsoffering.go @@ -14,7 +14,16 @@ type InformationProtectionAwsOffering struct { InformationProtection *InformationProtectionAwsOfferingInformationProtection `json:"informationProtection,omitempty"` // Fields inherited from CloudOffering - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + OfferingType OfferingType `json:"offeringType"` +} + +func (s InformationProtectionAwsOffering) CloudOffering() BaseCloudOfferingImpl { + return BaseCloudOfferingImpl{ + Description: s.Description, + OfferingType: s.OfferingType, + } } var _ json.Marshaler = InformationProtectionAwsOffering{} @@ -28,9 +37,10 @@ func (s InformationProtectionAwsOffering) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InformationProtectionAwsOffering: %+v", err) } + decoded["offeringType"] = "InformationProtectionAws" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/model_securityconnectorproperties.go b/resource-manager/security/2023-10-01-preview/securityconnectors/model_securityconnectorproperties.go index 5f71938d1db..8642b94f96b 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/model_securityconnectorproperties.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/model_securityconnectorproperties.go @@ -50,7 +50,7 @@ func (s *SecurityConnectorProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["environmentData"]; ok { - impl, err := unmarshalEnvironmentDataImplementation(v) + impl, err := UnmarshalEnvironmentDataImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'EnvironmentData' for 'SecurityConnectorProperties': %+v", err) } @@ -65,7 +65,7 @@ func (s *SecurityConnectorProperties) UnmarshalJSON(bytes []byte) error { output := make([]CloudOffering, 0) for i, val := range listTemp { - impl, err := unmarshalCloudOfferingImplementation(val) + impl, err := UnmarshalCloudOfferingImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Offerings' for 'SecurityConnectorProperties': %+v", i, err) } diff --git a/resource-manager/security/2023-10-01-preview/securityconnectors/version.go b/resource-manager/security/2023-10-01-preview/securityconnectors/version.go index 3f8ede1aea3..372bb897c9c 100644 --- a/resource-manager/security/2023-10-01-preview/securityconnectors/version.go +++ b/resource-manager/security/2023-10-01-preview/securityconnectors/version.go @@ -1,12 +1,10 @@ package securityconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securityconnectors/2023-10-01-preview" } diff --git a/resource-manager/security/2023-11-15/apimconfig/README.md b/resource-manager/security/2023-11-15/apimconfig/README.md index 09627d6d9cc..1ca7272d4f2 100644 --- a/resource-manager/security/2023-11-15/apimconfig/README.md +++ b/resource-manager/security/2023-11-15/apimconfig/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-11-15/apimconfig` Documentation -The `apimconfig` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-11-15`). +The `apimconfig` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-11-15/apimconfig/client.go b/resource-manager/security/2023-11-15/apimconfig/client.go index 21f4abe0ac0..a93aad79dea 100644 --- a/resource-manager/security/2023-11-15/apimconfig/client.go +++ b/resource-manager/security/2023-11-15/apimconfig/client.go @@ -15,7 +15,7 @@ type APIMConfigClient struct { } func NewAPIMConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*APIMConfigClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "apimconfig", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "apimconfig", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating APIMConfigClient: %+v", err) } diff --git a/resource-manager/security/2023-11-15/apimconfig/id_apicollection.go b/resource-manager/security/2023-11-15/apimconfig/id_apicollection.go index 0a04502fb01..9b4d74211ff 100644 --- a/resource-manager/security/2023-11-15/apimconfig/id_apicollection.go +++ b/resource-manager/security/2023-11-15/apimconfig/id_apicollection.go @@ -44,7 +44,7 @@ func ParseApiCollectionID(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiCollectionIDInsensitively(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/apimconfig/id_service.go b/resource-manager/security/2023-11-15/apimconfig/id_service.go index 1e30af048a1..5a0960efed3 100644 --- a/resource-manager/security/2023-11-15/apimconfig/id_service.go +++ b/resource-manager/security/2023-11-15/apimconfig/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/apimconfig/method_apicollectionsgetbyazureapimanagementservice.go b/resource-manager/security/2023-11-15/apimconfig/method_apicollectionsgetbyazureapimanagementservice.go index 1cae0dd7a8c..fb5eec1f968 100644 --- a/resource-manager/security/2023-11-15/apimconfig/method_apicollectionsgetbyazureapimanagementservice.go +++ b/resource-manager/security/2023-11-15/apimconfig/method_apicollectionsgetbyazureapimanagementservice.go @@ -45,7 +45,6 @@ func (c APIMConfigClient) APICollectionsGetByAzureApiManagementService(ctx conte var model ApiCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-11-15/apimconfig/version.go b/resource-manager/security/2023-11-15/apimconfig/version.go index 71ea4d1c945..43180bb18cc 100644 --- a/resource-manager/security/2023-11-15/apimconfig/version.go +++ b/resource-manager/security/2023-11-15/apimconfig/version.go @@ -1,12 +1,10 @@ package apimconfig -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/apimconfig/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/apimconfig/2023-11-15" } diff --git a/resource-manager/security/2023-11-15/d4apicollection/README.md b/resource-manager/security/2023-11-15/d4apicollection/README.md index 5adb61446e5..e50944c2971 100644 --- a/resource-manager/security/2023-11-15/d4apicollection/README.md +++ b/resource-manager/security/2023-11-15/d4apicollection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-11-15/d4apicollection` Documentation -The `d4apicollection` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-11-15`). +The `d4apicollection` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-11-15/d4apicollection/client.go b/resource-manager/security/2023-11-15/d4apicollection/client.go index 26f9d611de7..a4438b97c42 100644 --- a/resource-manager/security/2023-11-15/d4apicollection/client.go +++ b/resource-manager/security/2023-11-15/d4apicollection/client.go @@ -15,7 +15,7 @@ type D4APICollectionClient struct { } func NewD4APICollectionClientWithBaseURI(sdkApi sdkEnv.Api) (*D4APICollectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "d4apicollection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "d4apicollection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating D4APICollectionClient: %+v", err) } diff --git a/resource-manager/security/2023-11-15/d4apicollection/id_apicollection.go b/resource-manager/security/2023-11-15/d4apicollection/id_apicollection.go index 983316c25c9..79a6253bfe2 100644 --- a/resource-manager/security/2023-11-15/d4apicollection/id_apicollection.go +++ b/resource-manager/security/2023-11-15/d4apicollection/id_apicollection.go @@ -44,7 +44,7 @@ func ParseApiCollectionID(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiCollectionIDInsensitively(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/d4apicollection/method_apicollectionsgetbyazureapimanagementservice.go b/resource-manager/security/2023-11-15/d4apicollection/method_apicollectionsgetbyazureapimanagementservice.go index 36d413a798b..310d50e9a61 100644 --- a/resource-manager/security/2023-11-15/d4apicollection/method_apicollectionsgetbyazureapimanagementservice.go +++ b/resource-manager/security/2023-11-15/d4apicollection/method_apicollectionsgetbyazureapimanagementservice.go @@ -45,7 +45,6 @@ func (c D4APICollectionClient) APICollectionsGetByAzureApiManagementService(ctx var model ApiCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2023-11-15/d4apicollection/version.go b/resource-manager/security/2023-11-15/d4apicollection/version.go index 1b209731c2c..70b9da57d74 100644 --- a/resource-manager/security/2023-11-15/d4apicollection/version.go +++ b/resource-manager/security/2023-11-15/d4apicollection/version.go @@ -1,12 +1,10 @@ package d4apicollection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/d4apicollection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/d4apicollection/2023-11-15" } diff --git a/resource-manager/security/2023-11-15/d4apicollectionlist/README.md b/resource-manager/security/2023-11-15/d4apicollectionlist/README.md index e74801a65fb..8e556863478 100644 --- a/resource-manager/security/2023-11-15/d4apicollectionlist/README.md +++ b/resource-manager/security/2023-11-15/d4apicollectionlist/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-11-15/d4apicollectionlist` Documentation -The `d4apicollectionlist` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-11-15`). +The `d4apicollectionlist` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-11-15/d4apicollectionlist/client.go b/resource-manager/security/2023-11-15/d4apicollectionlist/client.go index bcb2cd3b703..68c7b411a9c 100644 --- a/resource-manager/security/2023-11-15/d4apicollectionlist/client.go +++ b/resource-manager/security/2023-11-15/d4apicollectionlist/client.go @@ -15,7 +15,7 @@ type D4APICollectionListClient struct { } func NewD4APICollectionListClientWithBaseURI(sdkApi sdkEnv.Api) (*D4APICollectionListClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "d4apicollectionlist", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "d4apicollectionlist", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating D4APICollectionListClient: %+v", err) } diff --git a/resource-manager/security/2023-11-15/d4apicollectionlist/id_service.go b/resource-manager/security/2023-11-15/d4apicollectionlist/id_service.go index 4ac5370a7a7..2bbc9484169 100644 --- a/resource-manager/security/2023-11-15/d4apicollectionlist/id_service.go +++ b/resource-manager/security/2023-11-15/d4apicollectionlist/id_service.go @@ -42,7 +42,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/d4apicollectionlist/version.go b/resource-manager/security/2023-11-15/d4apicollectionlist/version.go index e71e3585576..073bb02ef62 100644 --- a/resource-manager/security/2023-11-15/d4apicollectionlist/version.go +++ b/resource-manager/security/2023-11-15/d4apicollectionlist/version.go @@ -1,12 +1,10 @@ package d4apicollectionlist -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/d4apicollectionlist/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/d4apicollectionlist/2023-11-15" } diff --git a/resource-manager/security/2023-11-15/offboardfromd4api/client.go b/resource-manager/security/2023-11-15/offboardfromd4api/client.go index 8b05890f2af..e9ff4402e22 100644 --- a/resource-manager/security/2023-11-15/offboardfromd4api/client.go +++ b/resource-manager/security/2023-11-15/offboardfromd4api/client.go @@ -15,7 +15,7 @@ type OffboardFromD4APIClient struct { } func NewOffboardFromD4APIClientWithBaseURI(sdkApi sdkEnv.Api) (*OffboardFromD4APIClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "offboardfromd4api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "offboardfromd4api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OffboardFromD4APIClient: %+v", err) } diff --git a/resource-manager/security/2023-11-15/offboardfromd4api/id_apicollection.go b/resource-manager/security/2023-11-15/offboardfromd4api/id_apicollection.go index 599cab45f4a..32a17fc1d73 100644 --- a/resource-manager/security/2023-11-15/offboardfromd4api/id_apicollection.go +++ b/resource-manager/security/2023-11-15/offboardfromd4api/id_apicollection.go @@ -44,7 +44,7 @@ func ParseApiCollectionID(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiCollectionIDInsensitively(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/offboardfromd4api/version.go b/resource-manager/security/2023-11-15/offboardfromd4api/version.go index 3bc058e3ea4..fb1f517530d 100644 --- a/resource-manager/security/2023-11-15/offboardfromd4api/version.go +++ b/resource-manager/security/2023-11-15/offboardfromd4api/version.go @@ -1,12 +1,10 @@ package offboardfromd4api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/offboardfromd4api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/offboardfromd4api/2023-11-15" } diff --git a/resource-manager/security/2023-11-15/onboardtod4api/README.md b/resource-manager/security/2023-11-15/onboardtod4api/README.md index 255491d8668..5e1d1e6e7ac 100644 --- a/resource-manager/security/2023-11-15/onboardtod4api/README.md +++ b/resource-manager/security/2023-11-15/onboardtod4api/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2023-11-15/onboardtod4api` Documentation -The `onboardtod4api` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2023-11-15`). +The `onboardtod4api` SDK allows for interaction with Azure Resource Manager `security` (API Version `2023-11-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2023-11-15/onboardtod4api/client.go b/resource-manager/security/2023-11-15/onboardtod4api/client.go index b4d38e94432..1d6921ef750 100644 --- a/resource-manager/security/2023-11-15/onboardtod4api/client.go +++ b/resource-manager/security/2023-11-15/onboardtod4api/client.go @@ -15,7 +15,7 @@ type OnboardToD4APIClient struct { } func NewOnboardToD4APIClientWithBaseURI(sdkApi sdkEnv.Api) (*OnboardToD4APIClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "onboardtod4api", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "onboardtod4api", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OnboardToD4APIClient: %+v", err) } diff --git a/resource-manager/security/2023-11-15/onboardtod4api/id_apicollection.go b/resource-manager/security/2023-11-15/onboardtod4api/id_apicollection.go index 35e5a744b63..550df9b1a75 100644 --- a/resource-manager/security/2023-11-15/onboardtod4api/id_apicollection.go +++ b/resource-manager/security/2023-11-15/onboardtod4api/id_apicollection.go @@ -44,7 +44,7 @@ func ParseApiCollectionID(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApiCollectionIDInsensitively(input string) (*ApiCollectionId, error) { } id := ApiCollectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2023-11-15/onboardtod4api/version.go b/resource-manager/security/2023-11-15/onboardtod4api/version.go index 1f615eae3ee..d7e51d66ca2 100644 --- a/resource-manager/security/2023-11-15/onboardtod4api/version.go +++ b/resource-manager/security/2023-11-15/onboardtod4api/version.go @@ -1,12 +1,10 @@ package onboardtod4api -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/onboardtod4api/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/onboardtod4api/2023-11-15" } diff --git a/resource-manager/security/2024-01-01/pricings/README.md b/resource-manager/security/2024-01-01/pricings/README.md index 4d8d97cd36c..7b626b2dcbb 100644 --- a/resource-manager/security/2024-01-01/pricings/README.md +++ b/resource-manager/security/2024-01-01/pricings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-01-01/pricings` Documentation -The `pricings` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2024-01-01`). +The `pricings` SDK allows for interaction with Azure Resource Manager `security` (API Version `2024-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2024-01-01/pricings/client.go b/resource-manager/security/2024-01-01/pricings/client.go index 7d9c16fd7af..20a0e6c340e 100644 --- a/resource-manager/security/2024-01-01/pricings/client.go +++ b/resource-manager/security/2024-01-01/pricings/client.go @@ -15,7 +15,7 @@ type PricingsClient struct { } func NewPricingsClientWithBaseURI(sdkApi sdkEnv.Api) (*PricingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "pricings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "pricings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PricingsClient: %+v", err) } diff --git a/resource-manager/security/2024-01-01/pricings/id_pricing.go b/resource-manager/security/2024-01-01/pricings/id_pricing.go index c05e90a25a8..309248975e6 100644 --- a/resource-manager/security/2024-01-01/pricings/id_pricing.go +++ b/resource-manager/security/2024-01-01/pricings/id_pricing.go @@ -40,7 +40,7 @@ func ParsePricingID(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParsePricingIDInsensitively(input string) (*PricingId, error) { } id := PricingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-01-01/pricings/id_scopeid.go b/resource-manager/security/2024-01-01/pricings/id_scopeid.go index c0b61886130..0e059968f91 100644 --- a/resource-manager/security/2024-01-01/pricings/id_scopeid.go +++ b/resource-manager/security/2024-01-01/pricings/id_scopeid.go @@ -38,7 +38,7 @@ func ParseScopeIdID(input string) (*ScopeIdId, error) { } id := ScopeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseScopeIdIDInsensitively(input string) (*ScopeIdId, error) { } id := ScopeIdId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-01-01/pricings/method_get.go b/resource-manager/security/2024-01-01/pricings/method_get.go index 36f6a556ae2..81e767bd096 100644 --- a/resource-manager/security/2024-01-01/pricings/method_get.go +++ b/resource-manager/security/2024-01-01/pricings/method_get.go @@ -45,7 +45,6 @@ func (c PricingsClient) Get(ctx context.Context, id PricingId) (result GetOperat var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-01-01/pricings/method_list.go b/resource-manager/security/2024-01-01/pricings/method_list.go index 1c481840113..b679d5aa6d7 100644 --- a/resource-manager/security/2024-01-01/pricings/method_list.go +++ b/resource-manager/security/2024-01-01/pricings/method_list.go @@ -34,6 +34,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c PricingsClient) List(ctx context.Context, id ScopeIdId, options ListOper var model PricingList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-01-01/pricings/method_update.go b/resource-manager/security/2024-01-01/pricings/method_update.go index 4297ab95e96..4febef43945 100644 --- a/resource-manager/security/2024-01-01/pricings/method_update.go +++ b/resource-manager/security/2024-01-01/pricings/method_update.go @@ -50,7 +50,6 @@ func (c PricingsClient) Update(ctx context.Context, id PricingId, input Pricing) var model Pricing result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-01-01/pricings/version.go b/resource-manager/security/2024-01-01/pricings/version.go index 39ab5780dae..fd5da613a80 100644 --- a/resource-manager/security/2024-01-01/pricings/version.go +++ b/resource-manager/security/2024-01-01/pricings/version.go @@ -1,12 +1,10 @@ package pricings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/pricings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/pricings/2024-01-01" } diff --git a/resource-manager/security/2024-04-01/devops/README.md b/resource-manager/security/2024-04-01/devops/README.md index 82eb1bd2313..0628f368617 100644 --- a/resource-manager/security/2024-04-01/devops/README.md +++ b/resource-manager/security/2024-04-01/devops/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-04-01/devops` Documentation -The `devops` SDK allows for interaction with the Azure Resource Manager Service `security` (API Version `2024-04-01`). +The `devops` SDK allows for interaction with Azure Resource Manager `security` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/security/2024-04-01/devops/client.go b/resource-manager/security/2024-04-01/devops/client.go index 7f400b7b989..b11afd9878c 100644 --- a/resource-manager/security/2024-04-01/devops/client.go +++ b/resource-manager/security/2024-04-01/devops/client.go @@ -15,7 +15,7 @@ type DevOpsClient struct { } func NewDevOpsClientWithBaseURI(sdkApi sdkEnv.Api) (*DevOpsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "devops", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "devops", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DevOpsClient: %+v", err) } diff --git a/resource-manager/security/2024-04-01/devops/id_azuredevopsorg.go b/resource-manager/security/2024-04-01/devops/id_azuredevopsorg.go index 9ef18392f0b..c4b1b2012f7 100644 --- a/resource-manager/security/2024-04-01/devops/id_azuredevopsorg.go +++ b/resource-manager/security/2024-04-01/devops/id_azuredevopsorg.go @@ -44,7 +44,7 @@ func ParseAzureDevOpsOrgID(input string) (*AzureDevOpsOrgId, error) { } id := AzureDevOpsOrgId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAzureDevOpsOrgIDInsensitively(input string) (*AzureDevOpsOrgId, error) } id := AzureDevOpsOrgId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_githubowner.go b/resource-manager/security/2024-04-01/devops/id_githubowner.go index c6fb00cf453..0de39c94775 100644 --- a/resource-manager/security/2024-04-01/devops/id_githubowner.go +++ b/resource-manager/security/2024-04-01/devops/id_githubowner.go @@ -44,7 +44,7 @@ func ParseGitHubOwnerID(input string) (*GitHubOwnerId, error) { } id := GitHubOwnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGitHubOwnerIDInsensitively(input string) (*GitHubOwnerId, error) { } id := GitHubOwnerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_gitlabgroup.go b/resource-manager/security/2024-04-01/devops/id_gitlabgroup.go index 64516e696dc..5b047626da7 100644 --- a/resource-manager/security/2024-04-01/devops/id_gitlabgroup.go +++ b/resource-manager/security/2024-04-01/devops/id_gitlabgroup.go @@ -44,7 +44,7 @@ func ParseGitLabGroupID(input string) (*GitLabGroupId, error) { } id := GitLabGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGitLabGroupIDInsensitively(input string) (*GitLabGroupId, error) { } id := GitLabGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_gitlabgroupproject.go b/resource-manager/security/2024-04-01/devops/id_gitlabgroupproject.go index 7934d4d2109..71f76cb8521 100644 --- a/resource-manager/security/2024-04-01/devops/id_gitlabgroupproject.go +++ b/resource-manager/security/2024-04-01/devops/id_gitlabgroupproject.go @@ -46,7 +46,7 @@ func ParseGitLabGroupProjectID(input string) (*GitLabGroupProjectId, error) { } id := GitLabGroupProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGitLabGroupProjectIDInsensitively(input string) (*GitLabGroupProjectId } id := GitLabGroupProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_project.go b/resource-manager/security/2024-04-01/devops/id_project.go index c855c36fe50..62f8db6ee5f 100644 --- a/resource-manager/security/2024-04-01/devops/id_project.go +++ b/resource-manager/security/2024-04-01/devops/id_project.go @@ -46,7 +46,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_projectrepo.go b/resource-manager/security/2024-04-01/devops/id_projectrepo.go index 29a81a917b6..08485b50505 100644 --- a/resource-manager/security/2024-04-01/devops/id_projectrepo.go +++ b/resource-manager/security/2024-04-01/devops/id_projectrepo.go @@ -48,7 +48,7 @@ func ParseProjectRepoID(input string) (*ProjectRepoId, error) { } id := ProjectRepoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProjectRepoIDInsensitively(input string) (*ProjectRepoId, error) { } id := ProjectRepoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_repo.go b/resource-manager/security/2024-04-01/devops/id_repo.go index 727d0801c3b..c91a381eb42 100644 --- a/resource-manager/security/2024-04-01/devops/id_repo.go +++ b/resource-manager/security/2024-04-01/devops/id_repo.go @@ -46,7 +46,7 @@ func ParseRepoID(input string) (*RepoId, error) { } id := RepoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRepoIDInsensitively(input string) (*RepoId, error) { } id := RepoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/id_securityconnector.go b/resource-manager/security/2024-04-01/devops/id_securityconnector.go index e8f70ae0e33..4d29473911c 100644 --- a/resource-manager/security/2024-04-01/devops/id_securityconnector.go +++ b/resource-manager/security/2024-04-01/devops/id_securityconnector.go @@ -42,7 +42,7 @@ func ParseSecurityConnectorID(input string) (*SecurityConnectorId, error) { } id := SecurityConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSecurityConnectorIDInsensitively(input string) (*SecurityConnectorId, } id := SecurityConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/security/2024-04-01/devops/method_azuredevopsorgsget.go b/resource-manager/security/2024-04-01/devops/method_azuredevopsorgsget.go index 3f9265976b1..cd42d99b01a 100644 --- a/resource-manager/security/2024-04-01/devops/method_azuredevopsorgsget.go +++ b/resource-manager/security/2024-04-01/devops/method_azuredevopsorgsget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) AzureDevOpsOrgsGet(ctx context.Context, id AzureDevOpsOrgI var model AzureDevOpsOrg result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_azuredevopsprojectsget.go b/resource-manager/security/2024-04-01/devops/method_azuredevopsprojectsget.go index c63d3ad35ba..b489603ee99 100644 --- a/resource-manager/security/2024-04-01/devops/method_azuredevopsprojectsget.go +++ b/resource-manager/security/2024-04-01/devops/method_azuredevopsprojectsget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) AzureDevOpsProjectsGet(ctx context.Context, id ProjectId) var model AzureDevOpsProject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_azuredevopsreposget.go b/resource-manager/security/2024-04-01/devops/method_azuredevopsreposget.go index 89bcede162d..c7751b7998f 100644 --- a/resource-manager/security/2024-04-01/devops/method_azuredevopsreposget.go +++ b/resource-manager/security/2024-04-01/devops/method_azuredevopsreposget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) AzureDevOpsReposGet(ctx context.Context, id ProjectRepoId) var model AzureDevOpsRepository result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_configurationsget.go b/resource-manager/security/2024-04-01/devops/method_configurationsget.go index d24ae699cf5..d254942456a 100644 --- a/resource-manager/security/2024-04-01/devops/method_configurationsget.go +++ b/resource-manager/security/2024-04-01/devops/method_configurationsget.go @@ -46,7 +46,6 @@ func (c DevOpsClient) ConfigurationsGet(ctx context.Context, id SecurityConnecto var model DevOpsConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_githubownersget.go b/resource-manager/security/2024-04-01/devops/method_githubownersget.go index deb03e85085..f0bbd39251d 100644 --- a/resource-manager/security/2024-04-01/devops/method_githubownersget.go +++ b/resource-manager/security/2024-04-01/devops/method_githubownersget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) GitHubOwnersGet(ctx context.Context, id GitHubOwnerId) (re var model GitHubOwner result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_githubreposget.go b/resource-manager/security/2024-04-01/devops/method_githubreposget.go index bfa21fb6376..7a7fe0fefd5 100644 --- a/resource-manager/security/2024-04-01/devops/method_githubreposget.go +++ b/resource-manager/security/2024-04-01/devops/method_githubreposget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) GitHubReposGet(ctx context.Context, id RepoId) (result Git var model GitHubRepository result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_gitlabgroupsget.go b/resource-manager/security/2024-04-01/devops/method_gitlabgroupsget.go index 7335866006f..df70933e691 100644 --- a/resource-manager/security/2024-04-01/devops/method_gitlabgroupsget.go +++ b/resource-manager/security/2024-04-01/devops/method_gitlabgroupsget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) GitLabGroupsGet(ctx context.Context, id GitLabGroupId) (re var model GitLabGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/method_gitlabprojectsget.go b/resource-manager/security/2024-04-01/devops/method_gitlabprojectsget.go index 85391a1a31b..2959105569c 100644 --- a/resource-manager/security/2024-04-01/devops/method_gitlabprojectsget.go +++ b/resource-manager/security/2024-04-01/devops/method_gitlabprojectsget.go @@ -45,7 +45,6 @@ func (c DevOpsClient) GitLabProjectsGet(ctx context.Context, id GitLabGroupProje var model GitLabProject result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/security/2024-04-01/devops/version.go b/resource-manager/security/2024-04-01/devops/version.go index be088264326..e20b2b5369f 100644 --- a/resource-manager/security/2024-04-01/devops/version.go +++ b/resource-manager/security/2024-04-01/devops/version.go @@ -1,12 +1,10 @@ package devops -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/devops/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/devops/2024-04-01" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/README.md b/resource-manager/securityinsights/2022-10-01-preview/actions/README.md index 4898a693f97..6446b334737 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `actions` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/client.go b/resource-manager/securityinsights/2022-10-01-preview/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/id_action.go b/resource-manager/securityinsights/2022-10-01-preview/actions/id_action.go index aeefc14d3f8..9e28a9229f4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/id_action.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/id_alertrule.go b/resource-manager/securityinsights/2022-10-01-preview/actions/id_alertrule.go index 731f6439ae3..e92dcf5f421 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/id_alertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/actions/method_createorupdate.go index e84c5bebbd7..739b455eff0 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ActionsClient) CreateOrUpdate(ctx context.Context, id ActionId, input Ac var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/actions/method_get.go index 9d5aad5dc58..38ddf8d93d2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/method_get.go @@ -45,7 +45,6 @@ func (c ActionsClient) Get(ctx context.Context, id ActionId) (result GetOperatio var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/actions/version.go b/resource-manager/securityinsights/2022-10-01-preview/actions/version.go index 5474dcfd3e7..ca2cbb83e22 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/actions/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/README.md b/resource-manager/securityinsights/2022-10-01-preview/alertrules/README.md index 81a1e2123cc..711a575d3bc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/client.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go index 818f124e5ef..941d129e5a3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go index 005b7fc90a7..0ae4ab3dfc2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_createorupdate.go index f77c7558d09..13548ddf46e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_get.go index 945c07bfad1..f6b552d75c7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // Get ... @@ -48,11 +48,11 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_list.go index 191ccd545bb..55fff58c861 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/method_list.go @@ -73,7 +73,7 @@ func (c AlertRulesClient) List(ctx context.Context, id WorkspaceId) (result List temp := make([]AlertRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleImplementation(v) + val, err := UnmarshalAlertRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_alertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_alertrule.go index 7bb4d493656..a6dc8c957d4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_alertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_alertrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRule interface { + AlertRule() BaseAlertRuleImpl +} + +var _ AlertRule = BaseAlertRuleImpl{} + +type BaseAlertRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s } -// RawAlertRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRule = RawAlertRuleImpl{} + +// RawAlertRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleImpl struct { - Type string - Values map[string]interface{} + alertRule BaseAlertRuleImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { +func (s RawAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s.alertRule +} + +func UnmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { if input == nil { return nil, nil } @@ -84,10 +108,15 @@ func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { return out, nil } - out := RawAlertRuleImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleImpl: %+v", err) } - return out, nil + + return RawAlertRuleImpl{ + alertRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_fusionalertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_fusionalertrule.go index c4ed17f4319..f9ebd649bd9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_fusionalertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_fusionalertrule.go @@ -16,13 +16,26 @@ type FusionAlertRule struct { Properties *FusionAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRule{} func (s FusionAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s FusionAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRule: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_microsoftsecurityincidentcreationalertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_microsoftsecurityincidentcreationalertrule.go index 4fa227e3728..ccf5f8899d4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_microsoftsecurityincidentcreationalertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_microsoftsecurityincidentcreationalertrule.go @@ -16,13 +16,26 @@ type MicrosoftSecurityIncidentCreationAlertRule struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRule{} func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRule: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_mlbehavioranalyticsalertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_mlbehavioranalyticsalertrule.go index e49aa4ea1f0..f5c3da24cd1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_mlbehavioranalyticsalertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_mlbehavioranalyticsalertrule.go @@ -16,13 +16,26 @@ type MLBehaviorAnalyticsAlertRule struct { Properties *MLBehaviorAnalyticsAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MLBehaviorAnalyticsAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MLBehaviorAnalyticsAlertRule{} func (s MLBehaviorAnalyticsAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MLBehaviorAnalyticsAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLBehaviorAnalyticsAlertRule: %+v", err) } + decoded["kind"] = "MLBehaviorAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_nrtalertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_nrtalertrule.go index d0d096cbfc5..4cb451bbb75 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_nrtalertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_nrtalertrule.go @@ -16,13 +16,26 @@ type NrtAlertRule struct { Properties *NrtAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s NrtAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = NrtAlertRule{} func (s NrtAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s NrtAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NrtAlertRule: %+v", err) } + decoded["kind"] = "NRT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_scheduledalertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_scheduledalertrule.go index cf91bcec4f2..6dc6c221e54 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_scheduledalertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_scheduledalertrule.go @@ -16,13 +16,26 @@ type ScheduledAlertRule struct { Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRule{} func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRule: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_threatintelligencealertrule.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_threatintelligencealertrule.go index fe9fc75c2e6..ea1acdbd17c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_threatintelligencealertrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/model_threatintelligencealertrule.go @@ -16,13 +16,26 @@ type ThreatIntelligenceAlertRule struct { Properties *ThreatIntelligenceAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ThreatIntelligenceAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ThreatIntelligenceAlertRule{} func (s ThreatIntelligenceAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ThreatIntelligenceAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceAlertRule: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertrules/version.go b/resource-manager/securityinsights/2022-10-01-preview/alertrules/version.go index 0eed78e43ce..ee7f550859f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertrules/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/README.md b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/README.md index 22b7ade443f..f41408e75b0 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates` Documentation -The `alertruletemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `alertruletemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/client.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/client.go index 2932bf14a55..5726cbd8954 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/client.go @@ -15,7 +15,7 @@ type AlertRuleTemplatesClient struct { } func NewAlertRuleTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruletemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruletemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_alertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_alertruletemplate.go index 6a82de7688f..e294dbc3335 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_alertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_alertruletemplate.go @@ -44,7 +44,7 @@ func ParseAlertRuleTemplateID(input string) (*AlertRuleTemplateId, error) { } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleTemplateIDInsensitively(input string) (*AlertRuleTemplateId, } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_workspace.go index 184371fb5dc..757188dcdde 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_get.go index 861712be66a..c8efafa0807 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRuleTemplate + Model AlertRuleTemplate } // Get ... @@ -48,11 +48,11 @@ func (c AlertRuleTemplatesClient) Get(ctx context.Context, id AlertRuleTemplateI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleTemplateImplementation(respObj) + model, err := UnmarshalAlertRuleTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_list.go index 7b8fd97d59e..11a83746296 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/method_list.go @@ -73,7 +73,7 @@ func (c AlertRuleTemplatesClient) List(ctx context.Context, id WorkspaceId) (res temp := make([]AlertRuleTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleTemplateImplementation(v) + val, err := UnmarshalAlertRuleTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRuleTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_alertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_alertruletemplate.go index 262a4d668bc..179da5414da 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_alertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_alertruletemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRuleTemplate interface { + AlertRuleTemplate() BaseAlertRuleTemplateImpl +} + +var _ AlertRuleTemplate = BaseAlertRuleTemplateImpl{} + +type BaseAlertRuleTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s } -// RawAlertRuleTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRuleTemplate = RawAlertRuleTemplateImpl{} + +// RawAlertRuleTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleTemplateImpl struct { - Type string - Values map[string]interface{} + alertRuleTemplate BaseAlertRuleTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { +func (s RawAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s.alertRuleTemplate +} + +func UnmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { if input == nil { return nil, nil } @@ -84,10 +107,15 @@ func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, return out, nil } - out := RawAlertRuleTemplateImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleTemplateImpl: %+v", err) } - return out, nil + + return RawAlertRuleTemplateImpl{ + alertRuleTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_fusionalertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_fusionalertruletemplate.go index c2b4d8c3077..ea4edef0f1e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_fusionalertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_fusionalertruletemplate.go @@ -16,12 +16,24 @@ type FusionAlertRuleTemplate struct { Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRuleTemplate{} func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go index 515a47767b2..c526da831d8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go @@ -16,12 +16,24 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRuleTemplate{} func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_mlbehavioranalyticsalertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_mlbehavioranalyticsalertruletemplate.go index 51e12f5562f..e60eb90fb8b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_mlbehavioranalyticsalertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_mlbehavioranalyticsalertruletemplate.go @@ -16,12 +16,24 @@ type MLBehaviorAnalyticsAlertRuleTemplate struct { Properties *MLBehaviorAnalyticsAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MLBehaviorAnalyticsAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MLBehaviorAnalyticsAlertRuleTemplate{} func (s MLBehaviorAnalyticsAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MLBehaviorAnalyticsAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MLBehaviorAnalyticsAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MLBehaviorAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_nrtalertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_nrtalertruletemplate.go index 9f13bfa8160..57af0cf9574 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_nrtalertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_nrtalertruletemplate.go @@ -16,12 +16,24 @@ type NrtAlertRuleTemplate struct { Properties *NrtAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s NrtAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = NrtAlertRuleTemplate{} func (s NrtAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s NrtAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NrtAlertRuleTemplate: %+v", err) } + decoded["kind"] = "NRT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_scheduledalertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_scheduledalertruletemplate.go index c3428ada14d..bb44ecf53bb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_scheduledalertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_scheduledalertruletemplate.go @@ -16,12 +16,24 @@ type ScheduledAlertRuleTemplate struct { Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRuleTemplate{} func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_threatintelligencealertruletemplate.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_threatintelligencealertruletemplate.go index 1f39f219a07..60015825fd4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_threatintelligencealertruletemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/model_threatintelligencealertruletemplate.go @@ -16,12 +16,24 @@ type ThreatIntelligenceAlertRuleTemplate struct { Properties *ThreatIntelligenceAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ThreatIntelligenceAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ThreatIntelligenceAlertRuleTemplate{} func (s ThreatIntelligenceAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ThreatIntelligenceAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceAlertRuleTemplate: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/version.go b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/version.go index ab861cf950c..c4deb63e2b7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/alertruletemplates/version.go @@ -1,12 +1,10 @@ package alertruletemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruletemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruletemplates/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/README.md b/resource-manager/securityinsights/2022-10-01-preview/automationrules/README.md index f076c49abe0..24197170615 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/automationrules` Documentation -The `automationrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `automationrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/client.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/client.go index 18fafea1496..75f33724768 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/client.go @@ -15,7 +15,7 @@ type AutomationRulesClient struct { } func NewAutomationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go index 00c7db776a3..8c99ce6f94c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_automationrule.go @@ -44,7 +44,7 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go index 72d00c87771..719da4c9ff6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_createorupdate.go index 6ab8b05e0fb..9f70d87aab4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationRulesClient) CreateOrUpdate(ctx context.Context, id Automation var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_delete.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_delete.go index c32a7e886ad..5915b112d22 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_delete.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_delete.go @@ -46,7 +46,6 @@ func (c AutomationRulesClient) Delete(ctx context.Context, id AutomationRuleId) var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_get.go index b5c7ce72e30..e180fc005e4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/method_get.go @@ -45,7 +45,6 @@ func (c AutomationRulesClient) Get(ctx context.Context, id AutomationRuleId) (re var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleaction.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleaction.go index 77887bb8adf..eebf2db629d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleaction.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleaction.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleAction interface { + AutomationRuleAction() BaseAutomationRuleActionImpl } -// RawAutomationRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleAction = BaseAutomationRuleActionImpl{} + +type BaseAutomationRuleActionImpl struct { + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s BaseAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s +} + +var _ AutomationRuleAction = RawAutomationRuleActionImpl{} + +// RawAutomationRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleActionImpl struct { - Type string - Values map[string]interface{} + automationRuleAction BaseAutomationRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s.automationRuleAction } -func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { +func UnmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAc return out, nil } - out := RawAutomationRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleActionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleActionImpl{ + automationRuleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulebooleancondition.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulebooleancondition.go index b73d49b1554..ee63bf063bd 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulebooleancondition.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulebooleancondition.go @@ -37,7 +37,7 @@ func (s *AutomationRuleBooleanCondition) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InnerConditions' for 'AutomationRuleBooleanCondition': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulecondition.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulecondition.go index 6e9c0bf07a8..135592d8d8b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulecondition.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulecondition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleCondition interface { + AutomationRuleCondition() BaseAutomationRuleConditionImpl } -// RawAutomationRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleCondition = BaseAutomationRuleConditionImpl{} + +type BaseAutomationRuleConditionImpl struct { + ConditionType ConditionType `json:"conditionType"` +} + +func (s BaseAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s +} + +var _ AutomationRuleCondition = RawAutomationRuleConditionImpl{} + +// RawAutomationRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleConditionImpl struct { - Type string - Values map[string]interface{} + automationRuleCondition BaseAutomationRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s.automationRuleCondition } -func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { +func UnmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRul return out, nil } - out := RawAutomationRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleConditionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleConditionImpl{ + automationRuleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulemodifypropertiesaction.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulemodifypropertiesaction.go index 98eb39b6a9b..59b10e5bc34 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulemodifypropertiesaction.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulemodifypropertiesaction.go @@ -14,7 +14,16 @@ type AutomationRuleModifyPropertiesAction struct { ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleModifyPropertiesAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleModifyPropertiesAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleModifyPropertiesAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleModifyPropertiesAction: %+v", err) } + decoded["actionType"] = "ModifyProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleproperties.go index 5460f9b5fba..4499996f6a2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruleproperties.go @@ -76,7 +76,7 @@ func (s *AutomationRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleActionImplementation(val) + impl, err := UnmarshalAutomationRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationRuleProperties': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulepropertyarrayvaluescondition.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulepropertyarrayvaluescondition.go index 5d2faa180e5..c5fbb9aa596 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulepropertyarrayvaluescondition.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulepropertyarrayvaluescondition.go @@ -39,7 +39,7 @@ func (s *AutomationRulePropertyArrayValuesCondition) UnmarshalJSON(bytes []byte) output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ItemConditions' for 'AutomationRulePropertyArrayValuesCondition': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulerunplaybookaction.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulerunplaybookaction.go index c3e139aacf7..eba12a31777 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulerunplaybookaction.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationrulerunplaybookaction.go @@ -14,7 +14,16 @@ type AutomationRuleRunPlaybookAction struct { ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleRunPlaybookAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleRunPlaybookAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleRunPlaybookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleRunPlaybookAction: %+v", err) } + decoded["actionType"] = "RunPlaybook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruletriggeringlogic.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruletriggeringlogic.go index 2f4592c4269..0fac09e2443 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruletriggeringlogic.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_automationruletriggeringlogic.go @@ -58,7 +58,7 @@ func (s *AutomationRuleTriggeringLogic) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'AutomationRuleTriggeringLogic': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_booleanconditionproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_booleanconditionproperties.go index 41e5695b030..3fa5b52a620 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_booleanconditionproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_booleanconditionproperties.go @@ -14,6 +14,14 @@ type BooleanConditionProperties struct { ConditionProperties *AutomationRuleBooleanCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s BooleanConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = BooleanConditionProperties{} @@ -27,9 +35,10 @@ func (s BooleanConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BooleanConditionProperties: %+v", err) } + decoded["conditionType"] = "Boolean" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarraychangedconditionproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarraychangedconditionproperties.go index 9abf0187ac4..07c0eb5acce 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarraychangedconditionproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarraychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArrayChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarrayconditionproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarrayconditionproperties.go index 9e700cb4a8c..9db5d4f3702 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarrayconditionproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyarrayconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArray" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertychangedconditionproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertychangedconditionproperties.go index b72736f49a2..960f23ee56e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertychangedconditionproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyconditionproperties.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyconditionproperties.go index 6e77d74c58c..92672dc4e8c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyconditionproperties.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/model_propertyconditionproperties.go @@ -14,6 +14,14 @@ type PropertyConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyConditionProperties: %+v", err) } + decoded["conditionType"] = "Property" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/automationrules/version.go b/resource-manager/securityinsights/2022-10-01-preview/automationrules/version.go index ef670d00851..00fec497e56 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/automationrules/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/automationrules/version.go @@ -1,12 +1,10 @@ package automationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationrules/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmark/README.md b/resource-manager/securityinsights/2022-10-01-preview/bookmark/README.md index ca5eada0835..b4a08241b4d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmark/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmark/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/bookmark` Documentation -The `bookmark` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `bookmark` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmark/client.go b/resource-manager/securityinsights/2022-10-01-preview/bookmark/client.go index f20b4939301..a2e408e735f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmark/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmark/client.go @@ -15,7 +15,7 @@ type BookmarkClient struct { } func NewBookmarkClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmark", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmark", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarkClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmark/id_bookmark.go b/resource-manager/securityinsights/2022-10-01-preview/bookmark/id_bookmark.go index 37ded815f59..601773107ba 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmark/id_bookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmark/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmark/method_expand.go b/resource-manager/securityinsights/2022-10-01-preview/bookmark/method_expand.go index c3d30a1e86e..32d9ca17af8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmark/method_expand.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmark/method_expand.go @@ -50,7 +50,6 @@ func (c BookmarkClient) Expand(ctx context.Context, id BookmarkId, input Bookmar var model BookmarkExpandResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmark/version.go b/resource-manager/securityinsights/2022-10-01-preview/bookmark/version.go index 1748231fe69..09ecd2b4d6c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmark/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmark/version.go @@ -1,12 +1,10 @@ package bookmark -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmark/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmark/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/README.md b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/README.md index bba755f460d..e6bc8b8539e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations` Documentation -The `bookmarkrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `bookmarkrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/client.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/client.go index 7b2f113e83b..216957124b1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/client.go @@ -15,7 +15,7 @@ type BookmarkRelationsClient struct { } func NewBookmarkRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarkRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarkrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarkrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarkRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmark.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmark.go index b435d465a74..a99e15bcf9b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmarkrelation.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmarkrelation.go index 7eb043f12dd..91f19bf6206 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmarkrelation.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/id_bookmarkrelation.go @@ -46,7 +46,7 @@ func ParseBookmarkRelationID(input string) (*BookmarkRelationId, error) { } id := BookmarkRelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBookmarkRelationIDInsensitively(input string) (*BookmarkRelationId, er } id := BookmarkRelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_createorupdate.go index 1673e53e3d3..94758c9d4f9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarkRelationsClient) CreateOrUpdate(ctx context.Context, id Bookmark var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_get.go index 368649d1413..2b6125311a3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_get.go @@ -45,7 +45,6 @@ func (c BookmarkRelationsClient) Get(ctx context.Context, id BookmarkRelationId) var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_list.go index d200b588c80..f548593d881 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/version.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/version.go index d2576db1a3c..60949878698 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarkrelations/version.go @@ -1,12 +1,10 @@ package bookmarkrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarkrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarkrelations/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/README.md b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/README.md index 720d79a078c..e1e12e826d0 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/bookmarks` Documentation -The `bookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `bookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/client.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/client.go index 22469155649..4a7e564bcaf 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/client.go @@ -15,7 +15,7 @@ type BookmarksClient struct { } func NewBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_bookmark.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_bookmark.go index 5317bd28514..97039a3361a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_bookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_workspace.go index 96d5c1221cf..7f2924971ec 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_createorupdate.go index 2e61ab3ee74..9d2c71d828b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, inpu var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_get.go index 36c8d7fcc43..ec1d9306eec 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/method_get.go @@ -45,7 +45,6 @@ func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOper var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/version.go b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/version.go index 0025bf3d629..a833fa3c66f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/bookmarks/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/bookmarks/version.go @@ -1,12 +1,10 @@ package bookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarks/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/README.md b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/README.md index 1068a9eb0d9..3643d30faf2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements` Documentation -The `checkdataconnectorrequirements` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `checkdataconnectorrequirements` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/client.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/client.go index c01575bd213..9f81e69017c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/client.go @@ -15,7 +15,7 @@ type CheckDataConnectorRequirementsClient struct { } func NewCheckDataConnectorRequirementsClientWithBaseURI(sdkApi sdkEnv.Api) (*CheckDataConnectorRequirementsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "checkdataconnectorrequirements", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "checkdataconnectorrequirements", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CheckDataConnectorRequirementsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/id_workspace.go index b25e14b058a..7029812aa18 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/method_dataconnectorscheckrequirementspost.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/method_dataconnectorscheckrequirementspost.go index 592338190a2..61012019bf5 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/method_dataconnectorscheckrequirementspost.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/method_dataconnectorscheckrequirementspost.go @@ -50,7 +50,6 @@ func (c CheckDataConnectorRequirementsClient) DataConnectorsCheckRequirementsPos var model DataConnectorRequirementsState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aadcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aadcheckrequirements.go index ff65fa7b99c..20c25106e10 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aadcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aadcheckrequirements.go @@ -14,6 +14,14 @@ type AADCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s AADCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AADCheckRequirements{} @@ -27,9 +35,10 @@ func (s AADCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADCheckRequirements: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aatpcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aatpcheckrequirements.go index 3e9bd0286a6..150d2b99fa7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aatpcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_aatpcheckrequirements.go @@ -14,6 +14,14 @@ type AATPCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s AATPCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AATPCheckRequirements{} @@ -27,9 +35,10 @@ func (s AATPCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPCheckRequirements: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_asccheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_asccheckrequirements.go index 540d0578fb0..16a3bca7bd6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_asccheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_asccheckrequirements.go @@ -14,6 +14,14 @@ type ASCCheckRequirements struct { Properties *ASCCheckRequirementsProperties `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s ASCCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = ASCCheckRequirements{} @@ -27,9 +35,10 @@ func (s ASCCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCCheckRequirements: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awscloudtrailcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awscloudtrailcheckrequirements.go index 30f8e23168f..f0bc3525a4e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awscloudtrailcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awscloudtrailcheckrequirements.go @@ -13,6 +13,14 @@ var _ DataConnectorsCheckRequirements = AwsCloudTrailCheckRequirements{} type AwsCloudTrailCheckRequirements struct { // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s AwsCloudTrailCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AwsCloudTrailCheckRequirements{} @@ -26,9 +34,10 @@ func (s AwsCloudTrailCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailCheckRequirements: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awss3checkrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awss3checkrequirements.go index 7a8ef502e8d..412dcbe6006 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awss3checkrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_awss3checkrequirements.go @@ -13,6 +13,14 @@ var _ DataConnectorsCheckRequirements = AwsS3CheckRequirements{} type AwsS3CheckRequirements struct { // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s AwsS3CheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AwsS3CheckRequirements{} @@ -26,9 +34,10 @@ func (s AwsS3CheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsS3CheckRequirements: %+v", err) } + decoded["kind"] = "AmazonWebServicesS3" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dataconnectorscheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dataconnectorscheckrequirements.go index 108ee7f1467..a044ce6b963 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dataconnectorscheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dataconnectorscheckrequirements.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnectorsCheckRequirements interface { + DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl } -// RawDataConnectorsCheckRequirementsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnectorsCheckRequirements = BaseDataConnectorsCheckRequirementsImpl{} + +type BaseDataConnectorsCheckRequirementsImpl struct { + Kind DataConnectorKind `json:"kind"` +} + +func (s BaseDataConnectorsCheckRequirementsImpl) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return s +} + +var _ DataConnectorsCheckRequirements = RawDataConnectorsCheckRequirementsImpl{} + +// RawDataConnectorsCheckRequirementsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorsCheckRequirementsImpl struct { - Type string - Values map[string]interface{} + dataConnectorsCheckRequirements BaseDataConnectorsCheckRequirementsImpl + Type string + Values map[string]interface{} +} + +func (s RawDataConnectorsCheckRequirementsImpl) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return s.dataConnectorsCheckRequirements } -func unmarshalDataConnectorsCheckRequirementsImplementation(input []byte) (DataConnectorsCheckRequirements, error) { +func UnmarshalDataConnectorsCheckRequirementsImplementation(input []byte) (DataConnectorsCheckRequirements, error) { if input == nil { return nil, nil } @@ -172,10 +189,15 @@ func unmarshalDataConnectorsCheckRequirementsImplementation(input []byte) (DataC return out, nil } - out := RawDataConnectorsCheckRequirementsImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorsCheckRequirementsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorsCheckRequirementsImpl: %+v", err) } - return out, nil + + return RawDataConnectorsCheckRequirementsImpl{ + dataConnectorsCheckRequirements: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dynamics365checkrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dynamics365checkrequirements.go index 91327c1f028..bd9d8c29d42 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dynamics365checkrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_dynamics365checkrequirements.go @@ -14,6 +14,14 @@ type Dynamics365CheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s Dynamics365CheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = Dynamics365CheckRequirements{} @@ -27,9 +35,10 @@ func (s Dynamics365CheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Dynamics365CheckRequirements: %+v", err) } + decoded["kind"] = "Dynamics365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_iotcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_iotcheckrequirements.go index 7d929ad555f..df35a62f0b7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_iotcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_iotcheckrequirements.go @@ -14,6 +14,14 @@ type IoTCheckRequirements struct { Properties *IoTCheckRequirementsProperties `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s IoTCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = IoTCheckRequirements{} @@ -27,9 +35,10 @@ func (s IoTCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTCheckRequirements: %+v", err) } + decoded["kind"] = "IOT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mcascheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mcascheckrequirements.go index 98755f8e96e..d35bf384f77 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mcascheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mcascheckrequirements.go @@ -14,6 +14,14 @@ type MCASCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s MCASCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = MCASCheckRequirements{} @@ -27,9 +35,10 @@ func (s MCASCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASCheckRequirements: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mdatpcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mdatpcheckrequirements.go index 452c3359f5d..3544ca83ee8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mdatpcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mdatpcheckrequirements.go @@ -14,6 +14,14 @@ type MDATPCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s MDATPCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = MDATPCheckRequirements{} @@ -27,9 +35,10 @@ func (s MDATPCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPCheckRequirements: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_msticheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_msticheckrequirements.go index c9b2e2de45c..ff6ed384f11 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_msticheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_msticheckrequirements.go @@ -14,6 +14,14 @@ type MSTICheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s MSTICheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = MSTICheckRequirements{} @@ -27,9 +35,10 @@ func (s MSTICheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MSTICheckRequirements: %+v", err) } + decoded["kind"] = "MicrosoftThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mtpcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mtpcheckrequirements.go index 70a71b1b3c8..65dfb06ed1c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mtpcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_mtpcheckrequirements.go @@ -14,6 +14,14 @@ type MtpCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s MtpCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = MtpCheckRequirements{} @@ -27,9 +35,10 @@ func (s MtpCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MtpCheckRequirements: %+v", err) } + decoded["kind"] = "MicrosoftThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_office365projectcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_office365projectcheckrequirements.go index 2cee1cca12d..5508eaaefa4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_office365projectcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_office365projectcheckrequirements.go @@ -14,6 +14,14 @@ type Office365ProjectCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s Office365ProjectCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = Office365ProjectCheckRequirements{} @@ -27,9 +35,10 @@ func (s Office365ProjectCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Office365ProjectCheckRequirements: %+v", err) } + decoded["kind"] = "Office365Project" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeatpcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeatpcheckrequirements.go index 2ffb2d3ea00..f7cc38936c7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeatpcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeatpcheckrequirements.go @@ -14,6 +14,14 @@ type OfficeATPCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s OfficeATPCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = OfficeATPCheckRequirements{} @@ -27,9 +35,10 @@ func (s OfficeATPCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeATPCheckRequirements: %+v", err) } + decoded["kind"] = "OfficeATP" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeirmcheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeirmcheckrequirements.go index 83a9ab02643..424e7d56381 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeirmcheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officeirmcheckrequirements.go @@ -14,6 +14,14 @@ type OfficeIRMCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s OfficeIRMCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = OfficeIRMCheckRequirements{} @@ -27,9 +35,10 @@ func (s OfficeIRMCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeIRMCheckRequirements: %+v", err) } + decoded["kind"] = "OfficeIRM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officepowerbicheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officepowerbicheckrequirements.go index 68e0635aefe..87e5991cb65 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officepowerbicheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_officepowerbicheckrequirements.go @@ -14,6 +14,14 @@ type OfficePowerBICheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s OfficePowerBICheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = OfficePowerBICheckRequirements{} @@ -27,9 +35,10 @@ func (s OfficePowerBICheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficePowerBICheckRequirements: %+v", err) } + decoded["kind"] = "OfficePowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_ticheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_ticheckrequirements.go index ca83636b3d9..39defe0e925 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_ticheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_ticheckrequirements.go @@ -14,6 +14,14 @@ type TICheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s TICheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = TICheckRequirements{} @@ -27,9 +35,10 @@ func (s TICheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TICheckRequirements: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_titaxiicheckrequirements.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_titaxiicheckrequirements.go index cbc2eb9ec40..5174e41e5ea 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_titaxiicheckrequirements.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/model_titaxiicheckrequirements.go @@ -14,6 +14,14 @@ type TiTaxiiCheckRequirements struct { Properties *DataConnectorTenantId `json:"properties,omitempty"` // Fields inherited from DataConnectorsCheckRequirements + + Kind DataConnectorKind `json:"kind"` +} + +func (s TiTaxiiCheckRequirements) DataConnectorsCheckRequirements() BaseDataConnectorsCheckRequirementsImpl { + return BaseDataConnectorsCheckRequirementsImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = TiTaxiiCheckRequirements{} @@ -27,9 +35,10 @@ func (s TiTaxiiCheckRequirements) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TiTaxiiCheckRequirements: %+v", err) } + decoded["kind"] = "ThreatIntelligenceTaxii" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/version.go b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/version.go index aec6aaf6d7a..47401d8e5b7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/checkdataconnectorrequirements/version.go @@ -1,12 +1,10 @@ package checkdataconnectorrequirements -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdataconnectorrequirements/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/checkdataconnectorrequirements/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/README.md b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/README.md index 6dc8e3948aa..104ed8e0998 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/dataconnectors` Documentation -The `dataconnectors` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `dataconnectors` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/client.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/client.go index 8ed0120c79a..0a9e9bbb924 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/client.go @@ -15,7 +15,7 @@ type DataConnectorsClient struct { } func NewDataConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_dataconnector.go index b55667aa923..c6cc24bc274 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_workspace.go index 60237fcce07..64796e96412 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_createorupdate.go index c5f6e5d1503..111c7e46a6c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c DataConnectorsClient) CreateOrUpdate(ctx context.Context, id DataConnect if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_get.go index 3511ba85477..5b79c298c01 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectorsClient) Get(ctx context.Context, id DataConnectorId) (resu if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_list.go index b000eaba869..2b4d19a4d0f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/method_list.go @@ -73,7 +73,7 @@ func (c DataConnectorsClient) List(ctx context.Context, id WorkspaceId) (result temp := make([]DataConnector, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataConnectorImplementation(v) + val, err := UnmarshalDataConnectorImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataConnector (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aaddataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aaddataconnector.go index dd0ca1af664..141187a8802 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aaddataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aaddataconnector.go @@ -16,13 +16,26 @@ type AADDataConnector struct { Properties *AADDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AADDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AADDataConnector{} func (s AADDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AADDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADDataConnector: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aatpdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aatpdataconnector.go index e1cd013bbd7..798b7a40456 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aatpdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_aatpdataconnector.go @@ -16,13 +16,26 @@ type AATPDataConnector struct { Properties *AATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AATPDataConnector{} func (s AATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPDataConnector: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_ascdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_ascdataconnector.go index 3af09c2ff8b..dcc8457279a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_ascdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_ascdataconnector.go @@ -16,13 +16,26 @@ type ASCDataConnector struct { Properties *ASCDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ASCDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ASCDataConnector{} func (s ASCDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ASCDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCDataConnector: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awscloudtraildataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awscloudtraildataconnector.go index b0ef7fdd285..42a1639082a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awscloudtraildataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awscloudtraildataconnector.go @@ -16,13 +16,26 @@ type AwsCloudTrailDataConnector struct { Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsCloudTrailDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsCloudTrailDataConnector{} func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailDataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awss3dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awss3dataconnector.go index 35e5dc2aa8b..4163b0fd979 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awss3dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_awss3dataconnector.go @@ -16,13 +16,26 @@ type AwsS3DataConnector struct { Properties *AwsS3DataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsS3DataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsS3DataConnector{} func (s AwsS3DataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsS3DataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsS3DataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesS3" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessapipollingdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessapipollingdataconnector.go index 3f6e413fc6e..c1251e5dffe 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessapipollingdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessapipollingdataconnector.go @@ -16,13 +16,26 @@ type CodelessApiPollingDataConnector struct { Properties *ApiPollingParameters `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s CodelessApiPollingDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = CodelessApiPollingDataConnector{} func (s CodelessApiPollingDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s CodelessApiPollingDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CodelessApiPollingDataConnector: %+v", err) } + decoded["kind"] = "APIPolling" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessuidataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessuidataconnector.go index 4a43012e878..38837beaf46 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessuidataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_codelessuidataconnector.go @@ -16,13 +16,26 @@ type CodelessUiDataConnector struct { Properties *CodelessParameters `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s CodelessUiDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = CodelessUiDataConnector{} func (s CodelessUiDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s CodelessUiDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CodelessUiDataConnector: %+v", err) } + decoded["kind"] = "GenericUI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dataconnector.go index 4150bccd62d..c5e76631337 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dataconnector.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnector interface { + DataConnector() BaseDataConnectorImpl +} + +var _ DataConnector = BaseDataConnectorImpl{} + +type BaseDataConnectorImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s } -// RawDataConnectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnector = RawDataConnectorImpl{} + +// RawDataConnectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorImpl struct { - Type string - Values map[string]interface{} + dataConnector BaseDataConnectorImpl + Type string + Values map[string]interface{} } -func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { +func (s RawDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s.dataConnector +} + +func UnmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { if input == nil { return nil, nil } @@ -196,10 +220,15 @@ func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { return out, nil } - out := RawDataConnectorImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorImpl: %+v", err) } - return out, nil + + return RawDataConnectorImpl{ + dataConnector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dynamics365dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dynamics365dataconnector.go index b740152afaa..658d644ae3b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dynamics365dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_dynamics365dataconnector.go @@ -16,13 +16,26 @@ type Dynamics365DataConnector struct { Properties *Dynamics365DataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s Dynamics365DataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = Dynamics365DataConnector{} func (s Dynamics365DataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s Dynamics365DataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Dynamics365DataConnector: %+v", err) } + decoded["kind"] = "Dynamics365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_iotdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_iotdataconnector.go index 35737b5b0db..e2967434c05 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_iotdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_iotdataconnector.go @@ -16,13 +16,26 @@ type IoTDataConnector struct { Properties *IoTDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = IoTDataConnector{} func (s IoTDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s IoTDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTDataConnector: %+v", err) } + decoded["kind"] = "IOT" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mcasdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mcasdataconnector.go index 6a0c9aebea0..efa33558eaf 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mcasdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mcasdataconnector.go @@ -16,13 +16,26 @@ type MCASDataConnector struct { Properties *MCASDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MCASDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MCASDataConnector{} func (s MCASDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MCASDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mdatpdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mdatpdataconnector.go index 1a6bcbcb7bf..02c3188f668 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mdatpdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mdatpdataconnector.go @@ -16,13 +16,26 @@ type MDATPDataConnector struct { Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MDATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MDATPDataConnector{} func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mstidataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mstidataconnector.go index 471a195af16..71cc09a2ce4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mstidataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mstidataconnector.go @@ -16,13 +16,26 @@ type MSTIDataConnector struct { Properties *MSTIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MSTIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MSTIDataConnector{} func (s MSTIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MSTIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MSTIDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mtpdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mtpdataconnector.go index 080b901963a..041e36ef979 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mtpdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_mtpdataconnector.go @@ -16,13 +16,26 @@ type MTPDataConnector struct { Properties *MTPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MTPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MTPDataConnector{} func (s MTPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MTPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MTPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_office365projectdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_office365projectdataconnector.go index 85feb1633f3..a0baec6dd82 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_office365projectdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_office365projectdataconnector.go @@ -16,13 +16,26 @@ type Office365ProjectDataConnector struct { Properties *Office365ProjectDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s Office365ProjectDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = Office365ProjectDataConnector{} func (s Office365ProjectDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s Office365ProjectDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Office365ProjectDataConnector: %+v", err) } + decoded["kind"] = "Office365Project" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeatpdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeatpdataconnector.go index 40b24a90da2..171f60a34c3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeatpdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeatpdataconnector.go @@ -16,13 +16,26 @@ type OfficeATPDataConnector struct { Properties *OfficeATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeATPDataConnector{} func (s OfficeATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeATPDataConnector: %+v", err) } + decoded["kind"] = "OfficeATP" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officedataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officedataconnector.go index 25b5a25e44d..4b2bee1390e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officedataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officedataconnector.go @@ -16,13 +16,26 @@ type OfficeDataConnector struct { Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeDataConnector{} func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeDataConnector: %+v", err) } + decoded["kind"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeirmdataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeirmdataconnector.go index 437b746ebb4..57ec174672c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeirmdataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officeirmdataconnector.go @@ -16,13 +16,26 @@ type OfficeIRMDataConnector struct { Properties *OfficeIRMDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeIRMDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeIRMDataConnector{} func (s OfficeIRMDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeIRMDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeIRMDataConnector: %+v", err) } + decoded["kind"] = "OfficeIRM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officepowerbidataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officepowerbidataconnector.go index 9846e2026f4..bd2f56fd843 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officepowerbidataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_officepowerbidataconnector.go @@ -16,13 +16,26 @@ type OfficePowerBIDataConnector struct { Properties *OfficePowerBIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficePowerBIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficePowerBIDataConnector{} func (s OfficePowerBIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficePowerBIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficePowerBIDataConnector: %+v", err) } + decoded["kind"] = "OfficePowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_tidataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_tidataconnector.go index 208513ef9aa..c1a8de64c5f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_tidataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_tidataconnector.go @@ -16,13 +16,26 @@ type TIDataConnector struct { Properties *TIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TIDataConnector{} func (s TIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TIDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_titaxiidataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_titaxiidataconnector.go index 1fa870a4d34..ed814a38600 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_titaxiidataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/model_titaxiidataconnector.go @@ -16,13 +16,26 @@ type TiTaxiiDataConnector struct { Properties *TiTaxiiDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TiTaxiiDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TiTaxiiDataConnector{} func (s TiTaxiiDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TiTaxiiDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TiTaxiiDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligenceTaxii" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/version.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/version.go index 6ad0c6faecf..7ca0a9ee75b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectors/version.go @@ -1,12 +1,10 @@ package dataconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectors/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/README.md b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/README.md index 9e4ca476e2f..49ebce99e2b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect` Documentation -The `dataconnectorsconnect` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `dataconnectorsconnect` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/client.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/client.go index f4ed6b1fb50..992f39e8f6b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/client.go @@ -15,7 +15,7 @@ type DataConnectorsConnectClient struct { } func NewDataConnectorsConnectClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsConnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectorsconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectorsconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsConnectClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/id_dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/id_dataconnector.go index 391c5b0f0a4..07c6c83823b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/id_dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/version.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/version.go index cb1e317a074..15be4fe06bd 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsconnect/version.go @@ -1,12 +1,10 @@ package dataconnectorsconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectorsconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectorsconnect/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/client.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/client.go index 57ec64abb3c..ff8373dee7a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/client.go @@ -15,7 +15,7 @@ type DataConnectorsDisconnectClient struct { } func NewDataConnectorsDisconnectClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsDisconnectClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectorsdisconnect", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectorsdisconnect", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsDisconnectClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/id_dataconnector.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/id_dataconnector.go index 90646640e53..75bd3baf743 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/id_dataconnector.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/version.go b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/version.go index a8bc6b10e1f..399e5bfb281 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/dataconnectorsdisconnect/version.go @@ -1,12 +1,10 @@ package dataconnectorsdisconnect -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectorsdisconnect/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectorsdisconnect/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/enrichment/README.md b/resource-manager/securityinsights/2022-10-01-preview/enrichment/README.md index 7b18d385fa4..60ffee15002 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/enrichment/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/enrichment/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/enrichment` Documentation -The `enrichment` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `enrichment` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/enrichment/client.go b/resource-manager/securityinsights/2022-10-01-preview/enrichment/client.go index f60a3bef882..32a5499c8d5 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/enrichment/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/enrichment/client.go @@ -15,7 +15,7 @@ type EnrichmentClient struct { } func NewEnrichmentClientWithBaseURI(sdkApi sdkEnv.Api) (*EnrichmentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "enrichment", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "enrichment", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnrichmentClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_domainwhoisget.go b/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_domainwhoisget.go index ba62db4ca3a..9674c255325 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_domainwhoisget.go +++ b/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_domainwhoisget.go @@ -35,6 +35,7 @@ func (o DomainWhoisGetOperationOptions) ToHeaders() *client.Headers { func (o DomainWhoisGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c EnrichmentClient) DomainWhoisGet(ctx context.Context, id commonids.Resou var model EnrichmentDomainWhois result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_ipgeodataget.go b/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_ipgeodataget.go index 433fafa4049..60a23cac20c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_ipgeodataget.go +++ b/resource-manager/securityinsights/2022-10-01-preview/enrichment/method_ipgeodataget.go @@ -35,6 +35,7 @@ func (o IPGeodataGetOperationOptions) ToHeaders() *client.Headers { func (o IPGeodataGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c EnrichmentClient) IPGeodataGet(ctx context.Context, id commonids.Resourc var model EnrichmentIPGeodata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/enrichment/version.go b/resource-manager/securityinsights/2022-10-01-preview/enrichment/version.go index 8b547ce72f4..147cb769c99 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/enrichment/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/enrichment/version.go @@ -1,12 +1,10 @@ package enrichment -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/enrichment/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/enrichment/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/README.md b/resource-manager/securityinsights/2022-10-01-preview/entities/README.md index 16cbe4ee2cc..4cf9ec549b3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entities` Documentation -The `entities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `entities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/client.go b/resource-manager/securityinsights/2022-10-01-preview/entities/client.go index 69f26c8d7e5..97c4963c39d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/client.go @@ -15,7 +15,7 @@ type EntitiesClient struct { } func NewEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/id_entity.go b/resource-manager/securityinsights/2022-10-01-preview/entities/id_entity.go index 37774558d12..d3a8bf176b3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/id_entity.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/id_entity.go @@ -44,7 +44,7 @@ func ParseEntityID(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEntityIDInsensitively(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/entities/id_workspace.go index 14cfb6f0408..20dac3d26ba 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/method_expand.go b/resource-manager/securityinsights/2022-10-01-preview/entities/method_expand.go index b9244ea2dea..c644eb351d7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/method_expand.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/method_expand.go @@ -50,7 +50,6 @@ func (c EntitiesClient) Expand(ctx context.Context, id EntityId, input EntityExp var model EntityExpandResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/entities/method_get.go index 85c2b0055fe..9bdedc5ab43 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/method_get.go @@ -45,7 +45,6 @@ func (c EntitiesClient) Get(ctx context.Context, id EntityId) (result GetOperati var model Entity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/method_getinsights.go b/resource-manager/securityinsights/2022-10-01-preview/entities/method_getinsights.go index f61b67c98e7..459eab3e72b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/method_getinsights.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/method_getinsights.go @@ -50,7 +50,6 @@ func (c EntitiesClient) GetInsights(ctx context.Context, id EntityId, input Enti var model EntityGetInsightsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/method_gettimelinelist.go b/resource-manager/securityinsights/2022-10-01-preview/entities/method_gettimelinelist.go index 0a51b72c68f..9641d6a2939 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/method_gettimelinelist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/method_gettimelinelist.go @@ -50,7 +50,6 @@ func (c EntitiesClient) GetTimelinelist(ctx context.Context, id EntityId, input var model EntityTimelineResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/method_queries.go b/resource-manager/securityinsights/2022-10-01-preview/entities/method_queries.go index bb1c962fa29..881a1c95412 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/method_queries.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/method_queries.go @@ -34,6 +34,7 @@ func (o QueriesOperationOptions) ToHeaders() *client.Headers { func (o QueriesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c EntitiesClient) Queries(ctx context.Context, id EntityId, options Querie var model GetQueriesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_activitytimelineitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_activitytimelineitem.go index da589276f6d..415fba5a9ac 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_activitytimelineitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_activitytimelineitem.go @@ -20,6 +20,14 @@ type ActivityTimelineItem struct { Title string `json:"title"` // Fields inherited from EntityTimelineItem + + Kind EntityTimelineKind `json:"kind"` +} + +func (s ActivityTimelineItem) EntityTimelineItem() BaseEntityTimelineItemImpl { + return BaseEntityTimelineItemImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = ActivityTimelineItem{} @@ -33,9 +41,10 @@ func (s ActivityTimelineItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActivityTimelineItem: %+v", err) } + decoded["kind"] = "Activity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_anomalytimelineitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_anomalytimelineitem.go index ccc03779948..d250da6d2d6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_anomalytimelineitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_anomalytimelineitem.go @@ -24,6 +24,14 @@ type AnomalyTimelineItem struct { Vendor *string `json:"vendor,omitempty"` // Fields inherited from EntityTimelineItem + + Kind EntityTimelineKind `json:"kind"` +} + +func (s AnomalyTimelineItem) EntityTimelineItem() BaseEntityTimelineItemImpl { + return BaseEntityTimelineItemImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AnomalyTimelineItem{} @@ -37,9 +45,10 @@ func (s AnomalyTimelineItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalyTimelineItem: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_bookmarktimelineitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_bookmarktimelineitem.go index 5aad9bf124f..5b6c2cf4c62 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_bookmarktimelineitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_bookmarktimelineitem.go @@ -21,6 +21,14 @@ type BookmarkTimelineItem struct { StartTimeUtc *string `json:"startTimeUtc,omitempty"` // Fields inherited from EntityTimelineItem + + Kind EntityTimelineKind `json:"kind"` +} + +func (s BookmarkTimelineItem) EntityTimelineItem() BaseEntityTimelineItemImpl { + return BaseEntityTimelineItemImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = BookmarkTimelineItem{} @@ -34,9 +42,10 @@ func (s BookmarkTimelineItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BookmarkTimelineItem: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entityqueryitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entityqueryitem.go index c9b67487365..bb10baffba8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entityqueryitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entityqueryitem.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EntityQueryItem interface { + EntityQueryItem() BaseEntityQueryItemImpl } -// RawEntityQueryItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EntityQueryItem = BaseEntityQueryItemImpl{} + +type BaseEntityQueryItemImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityQueryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityQueryItemImpl) EntityQueryItem() BaseEntityQueryItemImpl { + return s +} + +var _ EntityQueryItem = RawEntityQueryItemImpl{} + +// RawEntityQueryItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityQueryItemImpl struct { - Type string - Values map[string]interface{} + entityQueryItem BaseEntityQueryItemImpl + Type string + Values map[string]interface{} +} + +func (s RawEntityQueryItemImpl) EntityQueryItem() BaseEntityQueryItemImpl { + return s.entityQueryItem } -func unmarshalEntityQueryItemImplementation(input []byte) (EntityQueryItem, error) { +func UnmarshalEntityQueryItemImplementation(input []byte) (EntityQueryItem, error) { if input == nil { return nil, nil } @@ -44,10 +64,15 @@ func unmarshalEntityQueryItemImplementation(input []byte) (EntityQueryItem, erro return out, nil } - out := RawEntityQueryItemImpl{ - Type: value, - Values: temp, + var parent BaseEntityQueryItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityQueryItemImpl: %+v", err) } - return out, nil + + return RawEntityQueryItemImpl{ + entityQueryItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineitem.go index ce1cd5ac2cc..5303805bd4f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineitem.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EntityTimelineItem interface { + EntityTimelineItem() BaseEntityTimelineItemImpl } -// RawEntityTimelineItemImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EntityTimelineItem = BaseEntityTimelineItemImpl{} + +type BaseEntityTimelineItemImpl struct { + Kind EntityTimelineKind `json:"kind"` +} + +func (s BaseEntityTimelineItemImpl) EntityTimelineItem() BaseEntityTimelineItemImpl { + return s +} + +var _ EntityTimelineItem = RawEntityTimelineItemImpl{} + +// RawEntityTimelineItemImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityTimelineItemImpl struct { - Type string - Values map[string]interface{} + entityTimelineItem BaseEntityTimelineItemImpl + Type string + Values map[string]interface{} +} + +func (s RawEntityTimelineItemImpl) EntityTimelineItem() BaseEntityTimelineItemImpl { + return s.entityTimelineItem } -func unmarshalEntityTimelineItemImplementation(input []byte) (EntityTimelineItem, error) { +func UnmarshalEntityTimelineItemImplementation(input []byte) (EntityTimelineItem, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalEntityTimelineItemImplementation(input []byte) (EntityTimelineItem return out, nil } - out := RawEntityTimelineItemImpl{ - Type: value, - Values: temp, + var parent BaseEntityTimelineItemImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityTimelineItemImpl: %+v", err) } - return out, nil + + return RawEntityTimelineItemImpl{ + entityTimelineItem: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineresponse.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineresponse.go index 87dd76dbc06..f793927c267 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineresponse.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_entitytimelineresponse.go @@ -37,7 +37,7 @@ func (s *EntityTimelineResponse) UnmarshalJSON(bytes []byte) error { output := make([]EntityTimelineItem, 0) for i, val := range listTemp { - impl, err := unmarshalEntityTimelineItemImplementation(val) + impl, err := UnmarshalEntityTimelineItemImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'EntityTimelineResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_getqueriesresponse.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_getqueriesresponse.go index 7e420fdfade..8de491c13b4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_getqueriesresponse.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_getqueriesresponse.go @@ -29,7 +29,7 @@ func (s *GetQueriesResponse) UnmarshalJSON(bytes []byte) error { output := make([]EntityQueryItem, 0) for i, val := range listTemp { - impl, err := unmarshalEntityQueryItemImplementation(val) + impl, err := UnmarshalEntityQueryItemImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'GetQueriesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_insightqueryitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_insightqueryitem.go index 6581578a204..bbddd30d0db 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_insightqueryitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_insightqueryitem.go @@ -14,9 +14,20 @@ type InsightQueryItem struct { Properties *InsightQueryItemProperties `json:"properties,omitempty"` // Fields inherited from EntityQueryItem - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind EntityQueryKind `json:"kind"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s InsightQueryItem) EntityQueryItem() BaseEntityQueryItemImpl { + return BaseEntityQueryItemImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = InsightQueryItem{} @@ -30,9 +41,10 @@ func (s InsightQueryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling InsightQueryItem: %+v", err) } + decoded["kind"] = "Insight" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/model_securityalerttimelineitem.go b/resource-manager/securityinsights/2022-10-01-preview/entities/model_securityalerttimelineitem.go index c92c9d43317..a6785122140 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/model_securityalerttimelineitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/model_securityalerttimelineitem.go @@ -24,6 +24,14 @@ type SecurityAlertTimelineItem struct { TimeGenerated string `json:"timeGenerated"` // Fields inherited from EntityTimelineItem + + Kind EntityTimelineKind `json:"kind"` +} + +func (s SecurityAlertTimelineItem) EntityTimelineItem() BaseEntityTimelineItemImpl { + return BaseEntityTimelineItemImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = SecurityAlertTimelineItem{} @@ -37,9 +45,10 @@ func (s SecurityAlertTimelineItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlertTimelineItem: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entities/version.go b/resource-manager/securityinsights/2022-10-01-preview/entities/version.go index aa679264001..0d30e3b6b2b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entities/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entities/version.go @@ -1,12 +1,10 @@ package entities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entities/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/README.md b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/README.md index a1d162ea094..05740fe0f31 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entityqueries` Documentation -The `entityqueries` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `entityqueries` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/client.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/client.go index 4a7620bff39..31777b7c67a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/client.go @@ -15,7 +15,7 @@ type EntityQueriesClient struct { } func NewEntityQueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityQueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entityqueries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entityqueries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntityQueriesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquery.go index f3b1d80e716..f74d13fc9e1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquery.go @@ -44,7 +44,7 @@ func ParseEntityQueryID(input string) (*EntityQueryId, error) { } id := EntityQueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEntityQueryIDInsensitively(input string) (*EntityQueryId, error) { } id := EntityQueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquerytemplate.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquerytemplate.go index cdc4a09121e..e13aae01baf 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquerytemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_entityquerytemplate.go @@ -44,7 +44,7 @@ func ParseEntityQueryTemplateID(input string) (*EntityQueryTemplateId, error) { } id := EntityQueryTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEntityQueryTemplateIDInsensitively(input string) (*EntityQueryTemplate } id := EntityQueryTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_workspace.go index ff2d84cb927..0987a725456 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_createorupdate.go index b9ecc82c257..d67bbd56c49 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EntityQuery + Model EntityQuery } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c EntityQueriesClient) CreateOrUpdate(ctx context.Context, id EntityQueryI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEntityQueryImplementation(respObj) + model, err := UnmarshalEntityQueryImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplatesget.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplatesget.go index 2e55614c8f0..6d281a62aa8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplatesget.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplatesget.go @@ -15,7 +15,7 @@ import ( type EntityQueryTemplatesGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EntityQueryTemplate + Model EntityQueryTemplate } // EntityQueryTemplatesGet ... @@ -48,11 +48,11 @@ func (c EntityQueriesClient) EntityQueryTemplatesGet(ctx context.Context, id Ent if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEntityQueryTemplateImplementation(respObj) + model, err := UnmarshalEntityQueryTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplateslist.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplateslist.go index d6fa3e5eed0..67f72c2bc26 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplateslist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_entityquerytemplateslist.go @@ -40,6 +40,7 @@ func (o EntityQueryTemplatesListOperationOptions) ToHeaders() *client.Headers { func (o EntityQueryTemplatesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -101,7 +102,7 @@ func (c EntityQueriesClient) EntityQueryTemplatesList(ctx context.Context, id Wo temp := make([]EntityQueryTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalEntityQueryTemplateImplementation(v) + val, err := UnmarshalEntityQueryTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for EntityQueryTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_get.go index 4a7022fa713..cfc8360d57c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EntityQuery + Model EntityQuery } // Get ... @@ -48,11 +48,11 @@ func (c EntityQueriesClient) Get(ctx context.Context, id EntityQueryId) (result if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEntityQueryImplementation(respObj) + model, err := UnmarshalEntityQueryImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_list.go index 9f672603dbd..e38842338e2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -101,7 +102,7 @@ func (c EntityQueriesClient) List(ctx context.Context, id WorkspaceId, options L temp := make([]EntityQuery, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalEntityQueryImplementation(v) + val, err := UnmarshalEntityQueryImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for EntityQuery (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activitycustomentityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activitycustomentityquery.go index 0cfe2c18623..d6deffe9a75 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activitycustomentityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activitycustomentityquery.go @@ -16,13 +16,26 @@ type ActivityCustomEntityQuery struct { Properties *ActivityEntityQueriesProperties `json:"properties,omitempty"` // Fields inherited from CustomEntityQuery + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind CustomEntityQueryKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ActivityCustomEntityQuery) CustomEntityQuery() BaseCustomEntityQueryImpl { + return BaseCustomEntityQueryImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ActivityCustomEntityQuery{} func (s ActivityCustomEntityQuery) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ActivityCustomEntityQuery) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActivityCustomEntityQuery: %+v", err) } + decoded["kind"] = "Activity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquery.go index bfdfa3bdbd5..84848cce3c4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquery.go @@ -16,13 +16,26 @@ type ActivityEntityQuery struct { Properties *ActivityEntityQueriesProperties `json:"properties,omitempty"` // Fields inherited from EntityQuery + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind EntityQueryKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ActivityEntityQuery) EntityQuery() BaseEntityQueryImpl { + return BaseEntityQueryImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ActivityEntityQuery{} func (s ActivityEntityQuery) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ActivityEntityQuery) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActivityEntityQuery: %+v", err) } + decoded["kind"] = "Activity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquerytemplate.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquerytemplate.go index bdbd16666a9..c7d60bb36b8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquerytemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_activityentityquerytemplate.go @@ -16,10 +16,22 @@ type ActivityEntityQueryTemplate struct { Properties *ActivityEntityQueryTemplateProperties `json:"properties,omitempty"` // Fields inherited from EntityQueryTemplate - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Id *string `json:"id,omitempty"` + Kind EntityQueryTemplateKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ActivityEntityQueryTemplate) EntityQueryTemplate() BaseEntityQueryTemplateImpl { + return BaseEntityQueryTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ActivityEntityQueryTemplate{} @@ -33,9 +45,10 @@ func (s ActivityEntityQueryTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ActivityEntityQueryTemplate: %+v", err) } + decoded["kind"] = "Activity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_customentityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_customentityquery.go index 75460cc6795..9c7fda194fb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_customentityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_customentityquery.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomEntityQuery interface { + CustomEntityQuery() BaseCustomEntityQueryImpl +} + +var _ CustomEntityQuery = BaseCustomEntityQueryImpl{} + +type BaseCustomEntityQueryImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind CustomEntityQueryKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseCustomEntityQueryImpl) CustomEntityQuery() BaseCustomEntityQueryImpl { + return s } -// RawCustomEntityQueryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomEntityQuery = RawCustomEntityQueryImpl{} + +// RawCustomEntityQueryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomEntityQueryImpl struct { - Type string - Values map[string]interface{} + customEntityQuery BaseCustomEntityQueryImpl + Type string + Values map[string]interface{} } -func unmarshalCustomEntityQueryImplementation(input []byte) (CustomEntityQuery, error) { +func (s RawCustomEntityQueryImpl) CustomEntityQuery() BaseCustomEntityQueryImpl { + return s.customEntityQuery +} + +func UnmarshalCustomEntityQueryImplementation(input []byte) (CustomEntityQuery, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalCustomEntityQueryImplementation(input []byte) (CustomEntityQuery, return out, nil } - out := RawCustomEntityQueryImpl{ - Type: value, - Values: temp, + var parent BaseCustomEntityQueryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomEntityQueryImpl: %+v", err) } - return out, nil + + return RawCustomEntityQueryImpl{ + customEntityQuery: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquery.go index bfec2a4f7a4..e82e1726560 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquery.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EntityQuery interface { + EntityQuery() BaseEntityQueryImpl +} + +var _ EntityQuery = BaseEntityQueryImpl{} + +type BaseEntityQueryImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind EntityQueryKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityQueryImpl) EntityQuery() BaseEntityQueryImpl { + return s } -// RawEntityQueryImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EntityQuery = RawEntityQueryImpl{} + +// RawEntityQueryImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityQueryImpl struct { - Type string - Values map[string]interface{} + entityQuery BaseEntityQueryImpl + Type string + Values map[string]interface{} } -func unmarshalEntityQueryImplementation(input []byte) (EntityQuery, error) { +func (s RawEntityQueryImpl) EntityQuery() BaseEntityQueryImpl { + return s.entityQuery +} + +func UnmarshalEntityQueryImplementation(input []byte) (EntityQuery, error) { if input == nil { return nil, nil } @@ -52,10 +76,15 @@ func unmarshalEntityQueryImplementation(input []byte) (EntityQuery, error) { return out, nil } - out := RawEntityQueryImpl{ - Type: value, - Values: temp, + var parent BaseEntityQueryImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityQueryImpl: %+v", err) } - return out, nil + + return RawEntityQueryImpl{ + entityQuery: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquerytemplate.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquerytemplate.go index 5734f996be9..cc163f86fcc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquerytemplate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_entityquerytemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EntityQueryTemplate interface { + EntityQueryTemplate() BaseEntityQueryTemplateImpl +} + +var _ EntityQueryTemplate = BaseEntityQueryTemplateImpl{} + +type BaseEntityQueryTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityQueryTemplateKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityQueryTemplateImpl) EntityQueryTemplate() BaseEntityQueryTemplateImpl { + return s } -// RawEntityQueryTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EntityQueryTemplate = RawEntityQueryTemplateImpl{} + +// RawEntityQueryTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityQueryTemplateImpl struct { - Type string - Values map[string]interface{} + entityQueryTemplate BaseEntityQueryTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalEntityQueryTemplateImplementation(input []byte) (EntityQueryTemplate, error) { +func (s RawEntityQueryTemplateImpl) EntityQueryTemplate() BaseEntityQueryTemplateImpl { + return s.entityQueryTemplate +} + +func UnmarshalEntityQueryTemplateImplementation(input []byte) (EntityQueryTemplate, error) { if input == nil { return nil, nil } @@ -44,10 +67,15 @@ func unmarshalEntityQueryTemplateImplementation(input []byte) (EntityQueryTempla return out, nil } - out := RawEntityQueryTemplateImpl{ - Type: value, - Values: temp, + var parent BaseEntityQueryTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityQueryTemplateImpl: %+v", err) } - return out, nil + + return RawEntityQueryTemplateImpl{ + entityQueryTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_expansionentityquery.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_expansionentityquery.go index bcc5a7e9b2e..6d1ba4e9fed 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_expansionentityquery.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/model_expansionentityquery.go @@ -16,13 +16,26 @@ type ExpansionEntityQuery struct { Properties *ExpansionEntityQueriesProperties `json:"properties,omitempty"` // Fields inherited from EntityQuery + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind EntityQueryKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ExpansionEntityQuery) EntityQuery() BaseEntityQueryImpl { + return BaseEntityQueryImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ExpansionEntityQuery{} func (s ExpansionEntityQuery) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ExpansionEntityQuery) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExpansionEntityQuery: %+v", err) } + decoded["kind"] = "Expansion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/version.go b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/version.go index 089af3a7a02..0d62e063b68 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityqueries/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityqueries/version.go @@ -1,12 +1,10 @@ package entityqueries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entityqueries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entityqueries/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/README.md b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/README.md index bfc3d4adff6..3cb5773e580 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entityrelations` Documentation -The `entityrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `entityrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/client.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/client.go index 85b6978e574..ccf389c31ab 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/client.go @@ -15,7 +15,7 @@ type EntityRelationsClient struct { } func NewEntityRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entityrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "entityrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EntityRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_entity.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_entity.go index 0f62b4a66b1..9523a4b405a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_entity.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_entity.go @@ -44,7 +44,7 @@ func ParseEntityID(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEntityIDInsensitively(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_relation.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_relation.go index 7c6b140220b..195d4429154 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_relation.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/id_relation.go @@ -46,7 +46,7 @@ func ParseRelationID(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelationIDInsensitively(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_entitiesrelationslist.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_entitiesrelationslist.go index 7b278dd2c33..205f24eacea 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_entitiesrelationslist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_entitiesrelationslist.go @@ -41,6 +41,7 @@ func (o EntitiesRelationsListOperationOptions) ToHeaders() *client.Headers { func (o EntitiesRelationsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_getrelation.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_getrelation.go index 21bd52b6efe..efffd81e466 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_getrelation.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/method_getrelation.go @@ -45,7 +45,6 @@ func (c EntityRelationsClient) GetRelation(ctx context.Context, id RelationId) ( var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/version.go b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/version.go index daa93cc5c36..f94ddca729d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/entityrelations/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/entityrelations/version.go @@ -1,12 +1,10 @@ package entityrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entityrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/entityrelations/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/README.md b/resource-manager/securityinsights/2022-10-01-preview/fileimports/README.md index 06ad89bf040..17ca4bb2595 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/fileimports` Documentation -The `fileimports` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `fileimports` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/client.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/client.go index 84e12ee17a6..3463512057e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/client.go @@ -15,7 +15,7 @@ type FileImportsClient struct { } func NewFileImportsClientWithBaseURI(sdkApi sdkEnv.Api) (*FileImportsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileimports", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileimports", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileImportsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_fileimport.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_fileimport.go index b3cb6c4dae2..77c2af56ae9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_fileimport.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_fileimport.go @@ -44,7 +44,7 @@ func ParseFileImportID(input string) (*FileImportId, error) { } id := FileImportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFileImportIDInsensitively(input string) (*FileImportId, error) { } id := FileImportId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_workspace.go index 11cfbb2be42..6da3aca331d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_create.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_create.go index 89e1618e012..078e8d4d873 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_create.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_create.go @@ -49,7 +49,6 @@ func (c FileImportsClient) Create(ctx context.Context, id FileImportId, input Fi var model FileImport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_get.go index 7cc25dccfe6..d505d8dec45 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_get.go @@ -45,7 +45,6 @@ func (c FileImportsClient) Get(ctx context.Context, id FileImportId) (result Get var model FileImport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_list.go index cb5128f257c..a07f7bd2d81 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/fileimports/version.go b/resource-manager/securityinsights/2022-10-01-preview/fileimports/version.go index d92816f9604..1e9b861c15c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/fileimports/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/fileimports/version.go @@ -1,12 +1,10 @@ package fileimports -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileimports/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileimports/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/README.md index 4e5e76bbb6f..de0745cf077 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentalerts` Documentation -The `incidentalerts` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidentalerts` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/client.go index 53dc2b4cd4e..eb74a60490e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/client.go @@ -15,7 +15,7 @@ type IncidentAlertsClient struct { } func NewIncidentAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentAlertsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/id_incident.go index 0ab926f846f..f64480aacc4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/method_incidentslistalerts.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/method_incidentslistalerts.go index a6b61790e56..62e926363cb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/method_incidentslistalerts.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/method_incidentslistalerts.go @@ -46,7 +46,6 @@ func (c IncidentAlertsClient) IncidentsListAlerts(ctx context.Context, id Incide var model IncidentAlertList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_entity.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_entity.go index 8a6c7ffef8e..aa97ce98bfd 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_entity.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_huntingbookmark.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_huntingbookmark.go index 827ded08f6d..7f1b2b25a20 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_securityalert.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_securityalert.go index 3935326a1d2..a6cf61e0f26 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_securityalert.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/version.go index 861372e93a2..ebdacf5a5e4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentalerts/version.go @@ -1,12 +1,10 @@ package incidentalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentalerts/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/README.md index a3fc0facf17..6808a322801 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks` Documentation -The `incidentbookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidentbookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/client.go index e6a60ede52d..8207d4048bc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/client.go @@ -15,7 +15,7 @@ type IncidentBookmarksClient struct { } func NewIncidentBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentBookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentbookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentbookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentBookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/id_incident.go index fde40d40514..556531335b4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/method_incidentslistbookmarks.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/method_incidentslistbookmarks.go index ea658d25e66..f067fc2e94e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/method_incidentslistbookmarks.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/method_incidentslistbookmarks.go @@ -46,7 +46,6 @@ func (c IncidentBookmarksClient) IncidentsListBookmarks(ctx context.Context, id var model IncidentBookmarkList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_entity.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_entity.go index ac882c04383..e16138838b9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_entity.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_huntingbookmark.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_huntingbookmark.go index 1e9bfbf488f..e1a57f616fc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_securityalert.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_securityalert.go index a86152f3c69..d40877b6cf6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_securityalert.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/version.go index 2b65d0c1c7b..4aa5b14b518 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks/version.go @@ -1,12 +1,10 @@ package incidentbookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentbookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentbookmarks/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/README.md index 564f75155e3..df76d7c7aa2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentcomments` Documentation -The `incidentcomments` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidentcomments` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/client.go index 981e6f75216..a31f83a2df1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/client.go @@ -15,7 +15,7 @@ type IncidentCommentsClient struct { } func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentcomments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentcomments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentCommentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_comment.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_comment.go index 1c431622bbe..7493d91020f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_comment.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_comment.go @@ -46,7 +46,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_incident.go index d2940c0215e..401b7fef818 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_createorupdate.go index 6ea7a1ed4dc..a4e39abbb71 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_get.go index 1942042dbea..f89f94e9882 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_get.go @@ -45,7 +45,6 @@ func (c IncidentCommentsClient) Get(ctx context.Context, id CommentId) (result G var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_list.go index d7901e9ffbe..86596f39c17 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/version.go index f0dc2f6c5a2..cd2f437fa8d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentcomments/version.go @@ -1,12 +1,10 @@ package incidentcomments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentcomments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentcomments/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidententities/README.md index a264dd522b3..cf714e140cc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidententities` Documentation -The `incidententities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidententities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/client.go index 740e7b81755..43ea52910a4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/client.go @@ -15,7 +15,7 @@ type IncidentEntitiesClient struct { } func NewIncidentEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentEntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidententities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidententities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentEntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/id_incident.go index b50dad94732..6c521100609 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/method_incidentslistentities.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/method_incidentslistentities.go index 2723b2f44a9..89451a71065 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/method_incidentslistentities.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/method_incidentslistentities.go @@ -46,7 +46,6 @@ func (c IncidentEntitiesClient) IncidentsListEntities(ctx context.Context, id In var model IncidentEntitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_entity.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_entity.go index 43a9a64c0bf..34b0ef1cbe9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_entity.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_huntingbookmark.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_huntingbookmark.go index f001f6b783a..d31646345dc 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_incidententitiesresponse.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_incidententitiesresponse.go index ab896895768..1ff0045f9ff 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_incidententitiesresponse.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_incidententitiesresponse.go @@ -37,7 +37,7 @@ func (s *IncidentEntitiesResponse) UnmarshalJSON(bytes []byte) error { output := make([]Entity, 0) for i, val := range listTemp { - impl, err := unmarshalEntityImplementation(val) + impl, err := UnmarshalEntityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Entities' for 'IncidentEntitiesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_securityalert.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_securityalert.go index 9d570306524..0997286467f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_securityalert.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidententities/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidententities/version.go index aa9bef4f830..f52ef15fd26 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidententities/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidententities/version.go @@ -1,12 +1,10 @@ package incidententities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidententities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidententities/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/README.md index 485fa29414d..f06c2e4edec 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentrelations` Documentation -The `incidentrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidentrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/client.go index 4e8fbfeb71d..e3e4d587b2a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/client.go @@ -15,7 +15,7 @@ type IncidentRelationsClient struct { } func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incident.go index 41d012358a0..bd4fa5b6110 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incidentrelation.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incidentrelation.go index 81731639476..30d171d6393 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incidentrelation.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/id_incidentrelation.go @@ -46,7 +46,7 @@ func ParseIncidentRelationID(input string) (*IncidentRelationId, error) { } id := IncidentRelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseIncidentRelationIDInsensitively(input string) (*IncidentRelationId, er } id := IncidentRelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_createorupdate.go index ced0d3d360e..5675b6f19f6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentRelationsClient) CreateOrUpdate(ctx context.Context, id Incident var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_get.go index a96d8672089..9c057a1463b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_get.go @@ -45,7 +45,6 @@ func (c IncidentRelationsClient) Get(ctx context.Context, id IncidentRelationId) var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_list.go index 9605942dce1..956f692f05b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/version.go index 9a8b4671b66..1cb35178c34 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentrelations/version.go @@ -1,12 +1,10 @@ package incidentrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentrelations/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidents/README.md index 9f3ed554a5a..9a6b9042304 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidents` Documentation -The `incidents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/client.go index aaf38071c39..5936eb290c5 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/client.go @@ -15,7 +15,7 @@ type IncidentsClient struct { } func NewIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/id_incident.go index d6e96822028..f955d4254ef 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/id_workspace.go index 9667e33b904..ceec20de097 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_createorupdate.go index fc09e8a1cba..0a23b31f8bb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentsClient) CreateOrUpdate(ctx context.Context, id IncidentId, inpu var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_get.go index c67e0bb22b8..ab5dc27a5e6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_get.go @@ -45,7 +45,6 @@ func (c IncidentsClient) Get(ctx context.Context, id IncidentId) (result GetOper var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_list.go index be48080a496..0a1ec15b8d8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidents/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidents/version.go index e8f346d9e1f..727fa0d6009 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidents/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidents/version.go @@ -1,12 +1,10 @@ package incidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidents/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/README.md b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/README.md index 5be960f92dd..aa384390c00 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentteam` Documentation -The `incidentteam` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `incidentteam` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/client.go b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/client.go index 75ab2cfb3b1..10d2dd58ce9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/client.go @@ -15,7 +15,7 @@ type IncidentTeamClient struct { } func NewIncidentTeamClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentTeamClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentteam", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentteam", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentTeamClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/id_incident.go index f2530f99226..daa5750a725 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/method_incidentscreateteam.go b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/method_incidentscreateteam.go index 25a784d4ab9..2778593694a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/method_incidentscreateteam.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/method_incidentscreateteam.go @@ -50,7 +50,6 @@ func (c IncidentTeamClient) IncidentsCreateTeam(ctx context.Context, id Incident var model TeamInformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/version.go b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/version.go index 9f8889fc206..793b1108cf4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/incidentteam/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/incidentteam/version.go @@ -1,12 +1,10 @@ package incidentteam -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentteam/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentteam/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/README.md b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/README.md index f41112bd789..0d7594958f4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/manualtrigger` Documentation -The `manualtrigger` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `manualtrigger` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/client.go b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/client.go index da5817ede95..fd31693bd51 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/client.go @@ -15,7 +15,7 @@ type ManualTriggerClient struct { } func NewManualTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*ManualTriggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manualtrigger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manualtrigger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManualTriggerClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/id_incident.go b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/id_incident.go index 82ca3cb00a1..744eaedd53e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/id_incident.go +++ b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/method_incidentsrunplaybook.go b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/method_incidentsrunplaybook.go index d6c3d165db6..3bc4689861b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/method_incidentsrunplaybook.go +++ b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/method_incidentsrunplaybook.go @@ -50,7 +50,6 @@ func (c ManualTriggerClient) IncidentsRunPlaybook(ctx context.Context, id Incide var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/version.go b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/version.go index 6604d466035..2c71d44bde8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/manualtrigger/version.go @@ -1,12 +1,10 @@ package manualtrigger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manualtrigger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manualtrigger/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/README.md b/resource-manager/securityinsights/2022-10-01-preview/metadata/README.md index 9fd09e95e92..211a903b338 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `metadata` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/client.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go index 5d97d463191..f117ec19858 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/id_metadata.go @@ -44,7 +44,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go index 6248b4d13cc..ed12f8f45bb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_create.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_create.go index fd4a74a030a..72fc34ee83b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_create.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_create.go @@ -50,7 +50,6 @@ func (c MetadataClient) Create(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_get.go index 68228f0b583..6e0fd8a6701 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_get.go @@ -45,7 +45,6 @@ func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOpera var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_list.go index 398be67d7f3..d02ed234668 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_update.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_update.go index e6911fcbc1d..3b55664e813 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/method_update.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/method_update.go @@ -49,7 +49,6 @@ func (c MetadataClient) Update(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/metadata/version.go b/resource-manager/securityinsights/2022-10-01-preview/metadata/version.go index 3a614451da1..e98f389e130 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/metadata/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/README.md b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/README.md index 7de8a9715bd..dad98f55fed 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/officeconsents` Documentation -The `officeconsents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `officeconsents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/client.go b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/client.go index 2c2efc37d3d..4b60eee5c49 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/client.go @@ -15,7 +15,7 @@ type OfficeConsentsClient struct { } func NewOfficeConsentsClientWithBaseURI(sdkApi sdkEnv.Api) (*OfficeConsentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "officeconsents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "officeconsents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OfficeConsentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_officeconsent.go b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_officeconsent.go index 6112f6e7da8..111095f587e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_officeconsent.go +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_officeconsent.go @@ -44,7 +44,7 @@ func ParseOfficeConsentID(input string) (*OfficeConsentId, error) { } id := OfficeConsentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOfficeConsentIDInsensitively(input string) (*OfficeConsentId, error) { } id := OfficeConsentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_workspace.go index 44c5f84d447..74de0038fa9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/method_get.go index eb59e32eadb..c7eed6c5170 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/method_get.go @@ -45,7 +45,6 @@ func (c OfficeConsentsClient) Get(ctx context.Context, id OfficeConsentId) (resu var model OfficeConsent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/version.go b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/version.go index 2b668b469d5..aa65938aff1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/officeconsents/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/officeconsents/version.go @@ -1,12 +1,10 @@ package officeconsents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/officeconsents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/officeconsents/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/README.md b/resource-manager/securityinsights/2022-10-01-preview/repositories/README.md index 52ff1e91145..9e0bdc6848a 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/repositories` Documentation -The `repositories` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `repositories` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/client.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/client.go index 62b7be88387..47f8a158fd0 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/client.go @@ -15,7 +15,7 @@ type RepositoriesClient struct { } func NewRepositoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RepositoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "repositories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "repositories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RepositoriesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/id_workspace.go index d7e4ec6c5c6..27d7ac3cb13 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/repositories/version.go b/resource-manager/securityinsights/2022-10-01-preview/repositories/version.go index 9bab86fac20..c3e88891a00 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/repositories/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/repositories/version.go @@ -1,12 +1,10 @@ package repositories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/repositories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/repositories/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/README.md b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/README.md index 44abe1b29ed..d37bd673fee 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings` Documentation -The `securitymlanalyticssettings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `securitymlanalyticssettings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/client.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/client.go index 65b248a41f5..bb7dd6eae34 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/client.go @@ -15,7 +15,7 @@ type SecurityMLAnalyticsSettingsClient struct { } func NewSecurityMLAnalyticsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityMLAnalyticsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityMLAnalyticsSettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_securitymlanalyticssetting.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_securitymlanalyticssetting.go index 31b3fe0787d..0b8b71149ab 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_securitymlanalyticssetting.go @@ -44,7 +44,7 @@ func ParseSecurityMLAnalyticsSettingID(input string) (*SecurityMLAnalyticsSettin } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityMLAnalyticsSettingIDInsensitively(input string) (*SecurityMLAn } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_workspace.go index 07bf58f2dc1..9158938cd5f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_createorupdate.go index f08267b7fac..76bbda93ad2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_get.go index 9be89fdf974..678f1c490cb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // Get ... @@ -48,11 +48,11 @@ func (c SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, id SecurityM if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_list.go index 693e699ced1..23097e84286 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/method_list.go @@ -73,7 +73,7 @@ func (c SecurityMLAnalyticsSettingsClient) List(ctx context.Context, id Workspac temp := make([]SecurityMLAnalyticsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSecurityMLAnalyticsSettingImplementation(v) + val, err := UnmarshalSecurityMLAnalyticsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SecurityMLAnalyticsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go index 488f0b735f1..7f60dfacc57 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go @@ -16,11 +16,24 @@ type AnomalySecurityMLAnalyticsSettings struct { Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` // Fields inherited from SecurityMLAnalyticsSetting - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AnomalySecurityMLAnalyticsSettings) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return BaseSecurityMLAnalyticsSettingImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AnomalySecurityMLAnalyticsSettings{} @@ -34,9 +47,10 @@ func (s AnomalySecurityMLAnalyticsSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalySecurityMLAnalyticsSettings: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_securitymlanalyticssetting.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_securitymlanalyticssetting.go index 85a395baf6a..b08aec35208 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/model_securitymlanalyticssetting.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecurityMLAnalyticsSetting interface { + SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl +} + +var _ SecurityMLAnalyticsSetting = BaseSecurityMLAnalyticsSettingImpl{} + +type BaseSecurityMLAnalyticsSettingImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s } -// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecurityMLAnalyticsSetting = RawSecurityMLAnalyticsSettingImpl{} + +// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecurityMLAnalyticsSettingImpl struct { - Type string - Values map[string]interface{} + securityMLAnalyticsSetting BaseSecurityMLAnalyticsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { +func (s RawSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s.securityMLAnalyticsSetting +} + +func UnmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityML return out, nil } - out := RawSecurityMLAnalyticsSettingImpl{ - Type: value, - Values: temp, + var parent BaseSecurityMLAnalyticsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityMLAnalyticsSettingImpl: %+v", err) } - return out, nil + + return RawSecurityMLAnalyticsSettingImpl{ + securityMLAnalyticsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/version.go b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/version.go index 92a0b9208a2..f86d32cb053 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/securitymlanalyticssettings/version.go @@ -1,12 +1,10 @@ package securitymlanalyticssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitymlanalyticssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitymlanalyticssettings/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/README.md b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/README.md index b96433c5605..8928fcd1711 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates` Documentation -The `sentinelonboardingstates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `sentinelonboardingstates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/client.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/client.go index 94701ed853a..cfbcc6f5419 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/client.go @@ -15,7 +15,7 @@ type SentinelOnboardingStatesClient struct { } func NewSentinelOnboardingStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*SentinelOnboardingStatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SentinelOnboardingStatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_onboardingstate.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_onboardingstate.go index a0b15d704d4..18e7013bdba 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_onboardingstate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_onboardingstate.go @@ -44,7 +44,7 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_workspace.go index 25f0d18c095..b5a31015a23 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_create.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_create.go index be0336fbcee..8049e43d14c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_create.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_create.go @@ -50,7 +50,6 @@ func (c SentinelOnboardingStatesClient) Create(ctx context.Context, id Onboardin var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_get.go index e7b2c2cb86b..ff9b62feece 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_get.go @@ -45,7 +45,6 @@ func (c SentinelOnboardingStatesClient) Get(ctx context.Context, id OnboardingSt var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_list.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_list.go index d53893d7842..81a5556ad1e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_list.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/method_list.go @@ -46,7 +46,6 @@ func (c SentinelOnboardingStatesClient) List(ctx context.Context, id WorkspaceId var model SentinelOnboardingStatesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/version.go b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/version.go index 69992bd3f10..636763effc5 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sentinelonboardingstates/version.go @@ -1,12 +1,10 @@ package sentinelonboardingstates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sentinelonboardingstates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sentinelonboardingstates/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/README.md b/resource-manager/securityinsights/2022-10-01-preview/settings/README.md index 4fb0a42c795..cb8be7ee74c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/settings` Documentation -The `settings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `settings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/client.go b/resource-manager/securityinsights/2022-10-01-preview/settings/client.go index 7a9bd9ec8a1..a111b1f00a7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/client.go @@ -15,7 +15,7 @@ type SettingsClient struct { } func NewSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "settings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "settings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/id_setting.go b/resource-manager/securityinsights/2022-10-01-preview/settings/id_setting.go index 90889b749de..588d39bf4c7 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/id_setting.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/id_setting.go @@ -44,7 +44,7 @@ func ParseSettingID(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSettingIDInsensitively(input string) (*SettingId, error) { } id := SettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/settings/id_workspace.go index e001d01ad15..6304d800918 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsget.go b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsget.go index 3d546bae766..059ec999ba1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsget.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsget.go @@ -15,7 +15,7 @@ import ( type ProductSettingsGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Settings + Model Settings } // ProductSettingsGet ... @@ -48,11 +48,11 @@ func (c SettingsClient) ProductSettingsGet(ctx context.Context, id SettingId) (r if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingsImplementation(respObj) + model, err := UnmarshalSettingsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingslist.go b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingslist.go index 8c3a8350b7a..a9a11423248 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingslist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingslist.go @@ -46,7 +46,6 @@ func (c SettingsClient) ProductSettingsList(ctx context.Context, id WorkspaceId) var model SettingList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsupdate.go b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsupdate.go index 1f33013bb47..9cda6c76d2c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/method_productsettingsupdate.go @@ -15,7 +15,7 @@ import ( type ProductSettingsUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *Settings + Model Settings } // ProductSettingsUpdate ... @@ -52,11 +52,11 @@ func (c SettingsClient) ProductSettingsUpdate(ctx context.Context, id SettingId, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSettingsImplementation(respObj) + model, err := UnmarshalSettingsImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_anomalies.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_anomalies.go index 625b817d33e..64504a4e651 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_anomalies.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_anomalies.go @@ -16,13 +16,26 @@ type Anomalies struct { Properties *AnomaliesSettingsProperties `json:"properties,omitempty"` // Fields inherited from Settings + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s Anomalies) Settings() BaseSettingsImpl { + return BaseSettingsImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = Anomalies{} func (s Anomalies) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s Anomalies) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Anomalies: %+v", err) } + decoded["kind"] = "Anomalies" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_entityanalytics.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_entityanalytics.go index 1ce4b746aba..5a3cfaebc7d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_entityanalytics.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_entityanalytics.go @@ -16,13 +16,26 @@ type EntityAnalytics struct { Properties *EntityAnalyticsProperties `json:"properties,omitempty"` // Fields inherited from Settings + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s EntityAnalytics) Settings() BaseSettingsImpl { + return BaseSettingsImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = EntityAnalytics{} func (s EntityAnalytics) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s EntityAnalytics) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EntityAnalytics: %+v", err) } + decoded["kind"] = "EntityAnalytics" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_eyeson.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_eyeson.go index e392345fefe..1c5dffe9a87 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_eyeson.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_eyeson.go @@ -16,13 +16,26 @@ type EyesOn struct { Properties *EyesOnSettingsProperties `json:"properties,omitempty"` // Fields inherited from Settings + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s EyesOn) Settings() BaseSettingsImpl { + return BaseSettingsImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = EyesOn{} func (s EyesOn) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s EyesOn) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EyesOn: %+v", err) } + decoded["kind"] = "EyesOn" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_settinglist.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_settinglist.go index f5eb0f61e00..7660da5fd91 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_settinglist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_settinglist.go @@ -29,7 +29,7 @@ func (s *SettingList) UnmarshalJSON(bytes []byte) error { output := make([]Settings, 0) for i, val := range listTemp { - impl, err := unmarshalSettingsImplementation(val) + impl, err := UnmarshalSettingsImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'SettingList': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_settings.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_settings.go index f091da772d6..795ae55a7f8 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_settings.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_settings.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Settings interface { + Settings() BaseSettingsImpl +} + +var _ Settings = BaseSettingsImpl{} + +type BaseSettingsImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSettingsImpl) Settings() BaseSettingsImpl { + return s } -// RawSettingsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Settings = RawSettingsImpl{} + +// RawSettingsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSettingsImpl struct { - Type string - Values map[string]interface{} + settings BaseSettingsImpl + Type string + Values map[string]interface{} } -func unmarshalSettingsImplementation(input []byte) (Settings, error) { +func (s RawSettingsImpl) Settings() BaseSettingsImpl { + return s.settings +} + +func UnmarshalSettingsImplementation(input []byte) (Settings, error) { if input == nil { return nil, nil } @@ -68,10 +92,15 @@ func unmarshalSettingsImplementation(input []byte) (Settings, error) { return out, nil } - out := RawSettingsImpl{ - Type: value, - Values: temp, + var parent BaseSettingsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSettingsImpl: %+v", err) } - return out, nil + + return RawSettingsImpl{ + settings: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/model_ueba.go b/resource-manager/securityinsights/2022-10-01-preview/settings/model_ueba.go index 2c897343bb4..8f9062946bd 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/model_ueba.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/model_ueba.go @@ -16,13 +16,26 @@ type Ueba struct { Properties *UebaProperties `json:"properties,omitempty"` // Fields inherited from Settings + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind SettingKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s Ueba) Settings() BaseSettingsImpl { + return BaseSettingsImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = Ueba{} func (s Ueba) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s Ueba) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Ueba: %+v", err) } + decoded["kind"] = "Ueba" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/settings/version.go b/resource-manager/securityinsights/2022-10-01-preview/settings/version.go index adf1e440cbc..0f14cd23378 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/settings/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/settings/version.go @@ -1,12 +1,10 @@ package settings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/settings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/settings/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/README.md b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/README.md index a5c2e6d3521..417f7073a1d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols` Documentation -The `sourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `sourcecontrols` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/client.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/client.go index 9bfd651a63a..dbdb0796c4e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/client.go @@ -15,7 +15,7 @@ type SourceControlsClient struct { } func NewSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_sourcecontrol.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_sourcecontrol.go index e31a40901b7..0ad1c5d85d2 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_sourcecontrol.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_workspace.go index ebdc1ecef81..ad137251327 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_create.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_create.go index 5df3dad0407..46b404add12 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_create.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_create.go @@ -50,7 +50,6 @@ func (c SourceControlsClient) Create(ctx context.Context, id SourceControlId, in var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_get.go index dccc280d648..46bab9be734 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlsClient) Get(ctx context.Context, id SourceControlId) (resu var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/version.go b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/version.go index 86327d3c9a1..c3970c16762 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/sourcecontrols/version.go @@ -1,12 +1,10 @@ package sourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrols/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/README.md b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/README.md index 976ec3a02e4..dd6e4c363cd 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/threatintelligence` Documentation -The `threatintelligence` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `threatintelligence` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/client.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/client.go index edf96c3143f..59e58da3228 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/client.go @@ -15,7 +15,7 @@ type ThreatIntelligenceClient struct { } func NewThreatIntelligenceClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreatIntelligenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "threatintelligence", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "threatintelligence", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ThreatIntelligenceClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_indicator.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_indicator.go index 73373ce2134..3c473e1919e 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_indicator.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_indicator.go @@ -44,7 +44,7 @@ func ParseIndicatorID(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIndicatorIDInsensitively(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_workspace.go index 2265507abcf..d96d7676ab4 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreate.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreate.go index 3cee598931c..af7a84f3880 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreate.go @@ -15,7 +15,7 @@ import ( type IndicatorCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreate ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreate(ctx context.Context, id Indica if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreateindicator.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreateindicator.go index 0f3ab94c4f5..05059855207 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreateindicator.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorcreateindicator.go @@ -16,7 +16,7 @@ import ( type IndicatorCreateIndicatorOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreateIndicator ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreateIndicator(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorget.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorget.go index 3358363f139..085ea71bf94 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorget.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorget.go @@ -15,7 +15,7 @@ import ( type IndicatorGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorGet ... @@ -48,11 +48,11 @@ func (c ThreatIntelligenceClient) IndicatorGet(ctx context.Context, id Indicator if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatormetricslist.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatormetricslist.go index f692c803e50..e2bea464351 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatormetricslist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatormetricslist.go @@ -46,7 +46,6 @@ func (c ThreatIntelligenceClient) IndicatorMetricsList(ctx context.Context, id W var model ThreatIntelligenceMetricsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go index 27c6ce2648f..e2fdfa1225c 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorqueryindicators.go @@ -73,7 +73,7 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorreplacetags.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorreplacetags.go index 052bbe7b66a..873faa376b3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorreplacetags.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorreplacetags.go @@ -16,7 +16,7 @@ import ( type IndicatorReplaceTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorReplaceTags ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorReplaceTags(ctx context.Context, id I if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorslist.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorslist.go index 1757c99fda7..18256ce90e1 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorslist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/method_indicatorslist.go @@ -42,6 +42,7 @@ func (o IndicatorsListOperationOptions) ToHeaders() *client.Headers { func (o IndicatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,7 @@ func (c ThreatIntelligenceClient) IndicatorsList(ctx context.Context, id Workspa temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceindicatormodel.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceindicatormodel.go index 9ee1b5778ed..025db766b3d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceindicatormodel.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceindicatormodel.go @@ -16,11 +16,24 @@ type ThreatIntelligenceIndicatorModel struct { Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` // Fields inherited from ThreatIntelligenceInformation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ThreatIntelligenceIndicatorModel) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return BaseThreatIntelligenceInformationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ThreatIntelligenceIndicatorModel{} @@ -34,9 +47,10 @@ func (s ThreatIntelligenceIndicatorModel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceIndicatorModel: %+v", err) } + decoded["kind"] = "indicator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformation.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformation.go index d036b649d26..f074904e9c9 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformation.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/model_threatintelligenceinformation.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreatIntelligenceInformation interface { + ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl +} + +var _ ThreatIntelligenceInformation = BaseThreatIntelligenceInformationImpl{} + +type BaseThreatIntelligenceInformationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s } -// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreatIntelligenceInformation = RawThreatIntelligenceInformationImpl{} + +// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreatIntelligenceInformationImpl struct { - Type string - Values map[string]interface{} + threatIntelligenceInformation BaseThreatIntelligenceInformationImpl + Type string + Values map[string]interface{} } -func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { +func (s RawThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s.threatIntelligenceInformation +} + +func UnmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatI return out, nil } - out := RawThreatIntelligenceInformationImpl{ - Type: value, - Values: temp, + var parent BaseThreatIntelligenceInformationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreatIntelligenceInformationImpl: %+v", err) } - return out, nil + + return RawThreatIntelligenceInformationImpl{ + threatIntelligenceInformation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/version.go b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/version.go index b0bd916738f..bba8ac71458 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/threatintelligence/version.go @@ -1,12 +1,10 @@ package threatintelligence -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/threatintelligence/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/threatintelligence/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/README.md b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/README.md index bf17eaddb3d..449de99380b 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/watchlistitems` Documentation -The `watchlistitems` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `watchlistitems` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/client.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/client.go index d3193694a48..f5126a4483d 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/client.go @@ -15,7 +15,7 @@ type WatchlistItemsClient struct { } func NewWatchlistItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlistitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlistitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistItemsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlist.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlist.go index 7df2e8c2562..398316c372f 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlistitem.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlistitem.go index 95aa9b8f56d..3a971d74b12 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlistitem.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/id_watchlistitem.go @@ -46,7 +46,7 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_createorupdate.go index 68142e971a8..1e71da4f4ef 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistItemsClient) CreateOrUpdate(ctx context.Context, id WatchlistIt var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_get.go index 1973c679f9e..6f2b74513da 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistItemsClient) Get(ctx context.Context, id WatchlistItemId) (resu var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/version.go b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/version.go index 59834364b30..8e572e7ec54 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlistitems/version.go @@ -1,12 +1,10 @@ package watchlistitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlistitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlistitems/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/README.md b/resource-manager/securityinsights/2022-10-01-preview/watchlists/README.md index a1ae8407d74..04575ca0e72 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/README.md +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/watchlists` Documentation -The `watchlists` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). +The `watchlists` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/client.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/client.go index 45211175054..22f5472a0ad 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/client.go @@ -15,7 +15,7 @@ type WatchlistsClient struct { } func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_watchlist.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_watchlist.go index e5b47b1456e..ac459a108e6 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_watchlist.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_workspace.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_workspace.go index d8e6bddfee7..6b8f7d79efb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_workspace.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_createorupdate.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_createorupdate.go index eb0b4f9396d..219b2a467eb 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, in var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_get.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_get.go index 7aac16c3975..2b6dcd7e6da 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_get.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistsClient) Get(ctx context.Context, id WatchlistId) (result GetOp var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-10-01-preview/watchlists/version.go b/resource-manager/securityinsights/2022-10-01-preview/watchlists/version.go index 5f1b962d597..4f736f4d2aa 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/watchlists/version.go +++ b/resource-manager/securityinsights/2022-10-01-preview/watchlists/version.go @@ -1,12 +1,10 @@ package watchlists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlists/2022-10-01-preview" } diff --git a/resource-manager/securityinsights/2022-11-01/actions/README.md b/resource-manager/securityinsights/2022-11-01/actions/README.md index 71748a84e11..fe639c8ea57 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/README.md +++ b/resource-manager/securityinsights/2022-11-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/actions/client.go b/resource-manager/securityinsights/2022-11-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/client.go +++ b/resource-manager/securityinsights/2022-11-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/actions/id_action.go b/resource-manager/securityinsights/2022-11-01/actions/id_action.go index aeefc14d3f8..9e28a9229f4 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/id_action.go +++ b/resource-manager/securityinsights/2022-11-01/actions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/actions/id_alertrule.go b/resource-manager/securityinsights/2022-11-01/actions/id_alertrule.go index 731f6439ae3..e92dcf5f421 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/id_alertrule.go +++ b/resource-manager/securityinsights/2022-11-01/actions/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/actions/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/actions/method_createorupdate.go index e84c5bebbd7..739b455eff0 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/actions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ActionsClient) CreateOrUpdate(ctx context.Context, id ActionId, input Ac var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/actions/method_get.go b/resource-manager/securityinsights/2022-11-01/actions/method_get.go index 9d5aad5dc58..38ddf8d93d2 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/actions/method_get.go @@ -45,7 +45,6 @@ func (c ActionsClient) Get(ctx context.Context, id ActionId) (result GetOperatio var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/actions/version.go b/resource-manager/securityinsights/2022-11-01/actions/version.go index 6cd82704418..e44ca4893d5 100644 --- a/resource-manager/securityinsights/2022-11-01/actions/version.go +++ b/resource-manager/securityinsights/2022-11-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/README.md b/resource-manager/securityinsights/2022-11-01/alertrules/README.md index 3ce76e45de3..045cee14183 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/README.md +++ b/resource-manager/securityinsights/2022-11-01/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/client.go b/resource-manager/securityinsights/2022-11-01/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/client.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/id_alertrule.go b/resource-manager/securityinsights/2022-11-01/alertrules/id_alertrule.go index 818f124e5ef..941d129e5a3 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/id_alertrule.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/id_workspace.go b/resource-manager/securityinsights/2022-11-01/alertrules/id_workspace.go index 005b7fc90a7..0ae4ab3dfc2 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/alertrules/method_createorupdate.go index f77c7558d09..13548ddf46e 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/method_get.go b/resource-manager/securityinsights/2022-11-01/alertrules/method_get.go index 945c07bfad1..f6b552d75c7 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // Get ... @@ -48,11 +48,11 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/method_list.go b/resource-manager/securityinsights/2022-11-01/alertrules/method_list.go index 191ccd545bb..55fff58c861 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/method_list.go @@ -73,7 +73,7 @@ func (c AlertRulesClient) List(ctx context.Context, id WorkspaceId) (result List temp := make([]AlertRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleImplementation(v) + val, err := UnmarshalAlertRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/model_alertrule.go b/resource-manager/securityinsights/2022-11-01/alertrules/model_alertrule.go index 0a8eb3e2ad3..3b089e227ff 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/model_alertrule.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/model_alertrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRule interface { + AlertRule() BaseAlertRuleImpl +} + +var _ AlertRule = BaseAlertRuleImpl{} + +type BaseAlertRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s } -// RawAlertRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRule = RawAlertRuleImpl{} + +// RawAlertRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleImpl struct { - Type string - Values map[string]interface{} + alertRule BaseAlertRuleImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { +func (s RawAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s.alertRule +} + +func UnmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { if input == nil { return nil, nil } @@ -60,10 +84,15 @@ func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { return out, nil } - out := RawAlertRuleImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleImpl: %+v", err) } - return out, nil + + return RawAlertRuleImpl{ + alertRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/model_fusionalertrule.go b/resource-manager/securityinsights/2022-11-01/alertrules/model_fusionalertrule.go index c4ed17f4319..f9ebd649bd9 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/model_fusionalertrule.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/model_fusionalertrule.go @@ -16,13 +16,26 @@ type FusionAlertRule struct { Properties *FusionAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRule{} func (s FusionAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s FusionAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRule: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go b/resource-manager/securityinsights/2022-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go index 4fa227e3728..ccf5f8899d4 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go @@ -16,13 +16,26 @@ type MicrosoftSecurityIncidentCreationAlertRule struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRule{} func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRule: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/model_scheduledalertrule.go b/resource-manager/securityinsights/2022-11-01/alertrules/model_scheduledalertrule.go index cf91bcec4f2..6dc6c221e54 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/model_scheduledalertrule.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/model_scheduledalertrule.go @@ -16,13 +16,26 @@ type ScheduledAlertRule struct { Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRule{} func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRule: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertrules/version.go b/resource-manager/securityinsights/2022-11-01/alertrules/version.go index fc81d50660c..2207ba4c7c4 100644 --- a/resource-manager/securityinsights/2022-11-01/alertrules/version.go +++ b/resource-manager/securityinsights/2022-11-01/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/README.md b/resource-manager/securityinsights/2022-11-01/alertruletemplates/README.md index 03d5fe7cdf2..6abe32f8166 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/README.md +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/alertruletemplates` Documentation -The `alertruletemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `alertruletemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/client.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/client.go index 2932bf14a55..5726cbd8954 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/client.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/client.go @@ -15,7 +15,7 @@ type AlertRuleTemplatesClient struct { } func NewAlertRuleTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruletemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruletemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_alertruletemplate.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_alertruletemplate.go index 6a82de7688f..e294dbc3335 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_alertruletemplate.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_alertruletemplate.go @@ -44,7 +44,7 @@ func ParseAlertRuleTemplateID(input string) (*AlertRuleTemplateId, error) { } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleTemplateIDInsensitively(input string) (*AlertRuleTemplateId, } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_workspace.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_workspace.go index 184371fb5dc..757188dcdde 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_get.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_get.go index 861712be66a..c8efafa0807 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRuleTemplate + Model AlertRuleTemplate } // Get ... @@ -48,11 +48,11 @@ func (c AlertRuleTemplatesClient) Get(ctx context.Context, id AlertRuleTemplateI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleTemplateImplementation(respObj) + model, err := UnmarshalAlertRuleTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_list.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_list.go index 7b8fd97d59e..11a83746296 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/method_list.go @@ -73,7 +73,7 @@ func (c AlertRuleTemplatesClient) List(ctx context.Context, id WorkspaceId) (res temp := make([]AlertRuleTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleTemplateImplementation(v) + val, err := UnmarshalAlertRuleTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRuleTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_alertruletemplate.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_alertruletemplate.go index 6000fbb4b2c..0f3bb1bd9cf 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_alertruletemplate.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_alertruletemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRuleTemplate interface { + AlertRuleTemplate() BaseAlertRuleTemplateImpl +} + +var _ AlertRuleTemplate = BaseAlertRuleTemplateImpl{} + +type BaseAlertRuleTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s } -// RawAlertRuleTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRuleTemplate = RawAlertRuleTemplateImpl{} + +// RawAlertRuleTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleTemplateImpl struct { - Type string - Values map[string]interface{} + alertRuleTemplate BaseAlertRuleTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { +func (s RawAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s.alertRuleTemplate +} + +func UnmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, return out, nil } - out := RawAlertRuleTemplateImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleTemplateImpl: %+v", err) } - return out, nil + + return RawAlertRuleTemplateImpl{ + alertRuleTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_fusionalertruletemplate.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_fusionalertruletemplate.go index c2b4d8c3077..ea4edef0f1e 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_fusionalertruletemplate.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_fusionalertruletemplate.go @@ -16,12 +16,24 @@ type FusionAlertRuleTemplate struct { Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRuleTemplate{} func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go index 515a47767b2..c526da831d8 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go @@ -16,12 +16,24 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRuleTemplate{} func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_scheduledalertruletemplate.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_scheduledalertruletemplate.go index c3428ada14d..bb44ecf53bb 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_scheduledalertruletemplate.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/model_scheduledalertruletemplate.go @@ -16,12 +16,24 @@ type ScheduledAlertRuleTemplate struct { Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRuleTemplate{} func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/alertruletemplates/version.go b/resource-manager/securityinsights/2022-11-01/alertruletemplates/version.go index eacdd52074a..3856ef9d606 100644 --- a/resource-manager/securityinsights/2022-11-01/alertruletemplates/version.go +++ b/resource-manager/securityinsights/2022-11-01/alertruletemplates/version.go @@ -1,12 +1,10 @@ package alertruletemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruletemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruletemplates/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/README.md b/resource-manager/securityinsights/2022-11-01/automationrules/README.md index 029c0b7c1b3..cfb739956c6 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/README.md +++ b/resource-manager/securityinsights/2022-11-01/automationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/automationrules` Documentation -The `automationrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `automationrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/client.go b/resource-manager/securityinsights/2022-11-01/automationrules/client.go index 18fafea1496..75f33724768 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/client.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/client.go @@ -15,7 +15,7 @@ type AutomationRulesClient struct { } func NewAutomationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/id_automationrule.go b/resource-manager/securityinsights/2022-11-01/automationrules/id_automationrule.go index 00c7db776a3..8c99ce6f94c 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/id_automationrule.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/id_automationrule.go @@ -44,7 +44,7 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/id_workspace.go b/resource-manager/securityinsights/2022-11-01/automationrules/id_workspace.go index 72d00c87771..719da4c9ff6 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/automationrules/method_createorupdate.go index 6ab8b05e0fb..9f70d87aab4 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationRulesClient) CreateOrUpdate(ctx context.Context, id Automation var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/method_delete.go b/resource-manager/securityinsights/2022-11-01/automationrules/method_delete.go index c32a7e886ad..5915b112d22 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/method_delete.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/method_delete.go @@ -46,7 +46,6 @@ func (c AutomationRulesClient) Delete(ctx context.Context, id AutomationRuleId) var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/method_get.go b/resource-manager/securityinsights/2022-11-01/automationrules/method_get.go index b5c7ce72e30..e180fc005e4 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/method_get.go @@ -45,7 +45,6 @@ func (c AutomationRulesClient) Get(ctx context.Context, id AutomationRuleId) (re var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleaction.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleaction.go index 77887bb8adf..eebf2db629d 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleaction.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleaction.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleAction interface { + AutomationRuleAction() BaseAutomationRuleActionImpl } -// RawAutomationRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleAction = BaseAutomationRuleActionImpl{} + +type BaseAutomationRuleActionImpl struct { + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s BaseAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s +} + +var _ AutomationRuleAction = RawAutomationRuleActionImpl{} + +// RawAutomationRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleActionImpl struct { - Type string - Values map[string]interface{} + automationRuleAction BaseAutomationRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s.automationRuleAction } -func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { +func UnmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAc return out, nil } - out := RawAutomationRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleActionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleActionImpl{ + automationRuleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulecondition.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulecondition.go index 81938bfb589..ef0081a537e 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulecondition.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulecondition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleCondition interface { + AutomationRuleCondition() BaseAutomationRuleConditionImpl } -// RawAutomationRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleCondition = BaseAutomationRuleConditionImpl{} + +type BaseAutomationRuleConditionImpl struct { + ConditionType ConditionType `json:"conditionType"` +} + +func (s BaseAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s +} + +var _ AutomationRuleCondition = RawAutomationRuleConditionImpl{} + +// RawAutomationRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleConditionImpl struct { - Type string - Values map[string]interface{} + automationRuleCondition BaseAutomationRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s.automationRuleCondition } -func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { +func UnmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRul return out, nil } - out := RawAutomationRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleConditionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleConditionImpl{ + automationRuleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulemodifypropertiesaction.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulemodifypropertiesaction.go index 98eb39b6a9b..59b10e5bc34 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulemodifypropertiesaction.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulemodifypropertiesaction.go @@ -14,7 +14,16 @@ type AutomationRuleModifyPropertiesAction struct { ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleModifyPropertiesAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleModifyPropertiesAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleModifyPropertiesAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleModifyPropertiesAction: %+v", err) } + decoded["actionType"] = "ModifyProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleproperties.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleproperties.go index 5460f9b5fba..4499996f6a2 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleproperties.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruleproperties.go @@ -76,7 +76,7 @@ func (s *AutomationRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleActionImplementation(val) + impl, err := UnmarshalAutomationRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationRuleProperties': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulerunplaybookaction.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulerunplaybookaction.go index c3e139aacf7..eba12a31777 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulerunplaybookaction.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationrulerunplaybookaction.go @@ -14,7 +14,16 @@ type AutomationRuleRunPlaybookAction struct { ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleRunPlaybookAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleRunPlaybookAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleRunPlaybookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleRunPlaybookAction: %+v", err) } + decoded["actionType"] = "RunPlaybook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruletriggeringlogic.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruletriggeringlogic.go index 2f4592c4269..0fac09e2443 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruletriggeringlogic.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_automationruletriggeringlogic.go @@ -58,7 +58,7 @@ func (s *AutomationRuleTriggeringLogic) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'AutomationRuleTriggeringLogic': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyarraychangedconditionproperties.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyarraychangedconditionproperties.go index 9abf0187ac4..07c0eb5acce 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyarraychangedconditionproperties.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyarraychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArrayChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertychangedconditionproperties.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertychangedconditionproperties.go index b72736f49a2..960f23ee56e 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertychangedconditionproperties.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyconditionproperties.go b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyconditionproperties.go index 6e77d74c58c..92672dc4e8c 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyconditionproperties.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/model_propertyconditionproperties.go @@ -14,6 +14,14 @@ type PropertyConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyConditionProperties: %+v", err) } + decoded["conditionType"] = "Property" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/automationrules/version.go b/resource-manager/securityinsights/2022-11-01/automationrules/version.go index 4e57d7f63bb..4740b5993e4 100644 --- a/resource-manager/securityinsights/2022-11-01/automationrules/version.go +++ b/resource-manager/securityinsights/2022-11-01/automationrules/version.go @@ -1,12 +1,10 @@ package automationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationrules/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/README.md b/resource-manager/securityinsights/2022-11-01/bookmarks/README.md index 0d6d19f7e9c..8ffd4a20a08 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/README.md +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/bookmarks` Documentation -The `bookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `bookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/client.go b/resource-manager/securityinsights/2022-11-01/bookmarks/client.go index 22469155649..4a7e564bcaf 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/client.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/client.go @@ -15,7 +15,7 @@ type BookmarksClient struct { } func NewBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/id_bookmark.go b/resource-manager/securityinsights/2022-11-01/bookmarks/id_bookmark.go index 5317bd28514..97039a3361a 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/id_bookmark.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/id_workspace.go b/resource-manager/securityinsights/2022-11-01/bookmarks/id_workspace.go index 96d5c1221cf..7f2924971ec 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/bookmarks/method_createorupdate.go index 2e61ab3ee74..9d2c71d828b 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, inpu var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/method_get.go b/resource-manager/securityinsights/2022-11-01/bookmarks/method_get.go index 36c8d7fcc43..ec1d9306eec 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/method_get.go @@ -45,7 +45,6 @@ func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOper var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/bookmarks/version.go b/resource-manager/securityinsights/2022-11-01/bookmarks/version.go index 38ca4b4bce9..3e2f790e378 100644 --- a/resource-manager/securityinsights/2022-11-01/bookmarks/version.go +++ b/resource-manager/securityinsights/2022-11-01/bookmarks/version.go @@ -1,12 +1,10 @@ package bookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarks/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/README.md b/resource-manager/securityinsights/2022-11-01/dataconnectors/README.md index 38338ad04c8..8996d49fb3c 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/README.md +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/dataconnectors` Documentation -The `dataconnectors` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `dataconnectors` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/client.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/client.go index 8ed0120c79a..0a9e9bbb924 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/client.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/client.go @@ -15,7 +15,7 @@ type DataConnectorsClient struct { } func NewDataConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/id_dataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/id_dataconnector.go index b55667aa923..c6cc24bc274 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/id_dataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/id_workspace.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/id_workspace.go index 60237fcce07..64796e96412 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_createorupdate.go index c5f6e5d1503..111c7e46a6c 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c DataConnectorsClient) CreateOrUpdate(ctx context.Context, id DataConnect if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_get.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_get.go index 3511ba85477..5b79c298c01 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectorsClient) Get(ctx context.Context, id DataConnectorId) (resu if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_list.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_list.go index b000eaba869..2b4d19a4d0f 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/method_list.go @@ -73,7 +73,7 @@ func (c DataConnectorsClient) List(ctx context.Context, id WorkspaceId) (result temp := make([]DataConnector, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataConnectorImplementation(v) + val, err := UnmarshalDataConnectorImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataConnector (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aaddataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aaddataconnector.go index dd0ca1af664..141187a8802 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aaddataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aaddataconnector.go @@ -16,13 +16,26 @@ type AADDataConnector struct { Properties *AADDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AADDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AADDataConnector{} func (s AADDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AADDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADDataConnector: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aatpdataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aatpdataconnector.go index e1cd013bbd7..798b7a40456 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aatpdataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_aatpdataconnector.go @@ -16,13 +16,26 @@ type AATPDataConnector struct { Properties *AATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AATPDataConnector{} func (s AATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPDataConnector: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_ascdataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_ascdataconnector.go index 3af09c2ff8b..dcc8457279a 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_ascdataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_ascdataconnector.go @@ -16,13 +16,26 @@ type ASCDataConnector struct { Properties *ASCDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ASCDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ASCDataConnector{} func (s ASCDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ASCDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCDataConnector: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_awscloudtraildataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_awscloudtraildataconnector.go index b0ef7fdd285..42a1639082a 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_awscloudtraildataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_awscloudtraildataconnector.go @@ -16,13 +16,26 @@ type AwsCloudTrailDataConnector struct { Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsCloudTrailDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsCloudTrailDataConnector{} func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailDataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_dataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_dataconnector.go index 66368d66fb7..70a7f42baaa 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_dataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_dataconnector.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnector interface { + DataConnector() BaseDataConnectorImpl +} + +var _ DataConnector = BaseDataConnectorImpl{} + +type BaseDataConnectorImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s } -// RawDataConnectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnector = RawDataConnectorImpl{} + +// RawDataConnectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorImpl struct { - Type string - Values map[string]interface{} + dataConnector BaseDataConnectorImpl + Type string + Values map[string]interface{} } -func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { +func (s RawDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s.dataConnector +} + +func UnmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { if input == nil { return nil, nil } @@ -100,10 +124,15 @@ func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { return out, nil } - out := RawDataConnectorImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorImpl: %+v", err) } - return out, nil + + return RawDataConnectorImpl{ + dataConnector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mcasdataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mcasdataconnector.go index 6a0c9aebea0..efa33558eaf 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mcasdataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mcasdataconnector.go @@ -16,13 +16,26 @@ type MCASDataConnector struct { Properties *MCASDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MCASDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MCASDataConnector{} func (s MCASDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MCASDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mdatpdataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mdatpdataconnector.go index 1a6bcbcb7bf..02c3188f668 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mdatpdataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_mdatpdataconnector.go @@ -16,13 +16,26 @@ type MDATPDataConnector struct { Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MDATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MDATPDataConnector{} func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_officedataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_officedataconnector.go index 25b5a25e44d..4b2bee1390e 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_officedataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_officedataconnector.go @@ -16,13 +16,26 @@ type OfficeDataConnector struct { Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeDataConnector{} func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeDataConnector: %+v", err) } + decoded["kind"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_tidataconnector.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_tidataconnector.go index 208513ef9aa..c1a8de64c5f 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/model_tidataconnector.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/model_tidataconnector.go @@ -16,13 +16,26 @@ type TIDataConnector struct { Properties *TIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TIDataConnector{} func (s TIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TIDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/dataconnectors/version.go b/resource-manager/securityinsights/2022-11-01/dataconnectors/version.go index b6fde46b21c..75acffc3d4d 100644 --- a/resource-manager/securityinsights/2022-11-01/dataconnectors/version.go +++ b/resource-manager/securityinsights/2022-11-01/dataconnectors/version.go @@ -1,12 +1,10 @@ package dataconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectors/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/README.md b/resource-manager/securityinsights/2022-11-01/incidentalerts/README.md index c202d863813..c1dcf90576b 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentalerts` Documentation -The `incidentalerts` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidentalerts` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/client.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/client.go index 53dc2b4cd4e..eb74a60490e 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/client.go @@ -15,7 +15,7 @@ type IncidentAlertsClient struct { } func NewIncidentAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentAlertsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/id_incident.go index 6145c7882c4..29e38698c28 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/method_incidentslistalerts.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/method_incidentslistalerts.go index a6b61790e56..62e926363cb 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/method_incidentslistalerts.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/method_incidentslistalerts.go @@ -46,7 +46,6 @@ func (c IncidentAlertsClient) IncidentsListAlerts(ctx context.Context, id Incide var model IncidentAlertList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_entity.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_entity.go index 8a6c7ffef8e..6276e2fe91a 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_entity.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_huntingbookmark.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_huntingbookmark.go index 827ded08f6d..4bc98105f79 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_securityalert.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_securityalert.go index 3935326a1d2..bf6de905783 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/model_securityalert.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidentalerts/version.go b/resource-manager/securityinsights/2022-11-01/incidentalerts/version.go index 0d02b99fc99..dc957348361 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentalerts/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidentalerts/version.go @@ -1,12 +1,10 @@ package incidentalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentalerts/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/README.md b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/README.md index b26f3a1d5d2..bf3465659d4 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentbookmarks` Documentation -The `incidentbookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidentbookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/client.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/client.go index e6a60ede52d..8207d4048bc 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/client.go @@ -15,7 +15,7 @@ type IncidentBookmarksClient struct { } func NewIncidentBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentBookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentbookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentbookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentBookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/id_incident.go index f2bd006b056..7de4edf33f9 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/method_incidentslistbookmarks.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/method_incidentslistbookmarks.go index ea658d25e66..f067fc2e94e 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/method_incidentslistbookmarks.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/method_incidentslistbookmarks.go @@ -46,7 +46,6 @@ func (c IncidentBookmarksClient) IncidentsListBookmarks(ctx context.Context, id var model IncidentBookmarkList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_entity.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_entity.go index ac882c04383..dac6295bd01 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_entity.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_huntingbookmark.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_huntingbookmark.go index 1e9bfbf488f..10730d12eaa 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_securityalert.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_securityalert.go index a86152f3c69..0ffa9096236 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_securityalert.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/version.go b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/version.go index 62cbda1f208..d2275efb143 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentbookmarks/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidentbookmarks/version.go @@ -1,12 +1,10 @@ package incidentbookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentbookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentbookmarks/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/README.md b/resource-manager/securityinsights/2022-11-01/incidentcomments/README.md index 608adbcd984..e15baf840c6 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentcomments` Documentation -The `incidentcomments` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidentcomments` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/client.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/client.go index 981e6f75216..a31f83a2df1 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/client.go @@ -15,7 +15,7 @@ type IncidentCommentsClient struct { } func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentcomments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentcomments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentCommentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/id_comment.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/id_comment.go index 1c431622bbe..7493d91020f 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/id_comment.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/id_comment.go @@ -46,7 +46,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/id_incident.go index 94bb1fcdd3c..eafc62fd68d 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_createorupdate.go index 6ea7a1ed4dc..a4e39abbb71 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_get.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_get.go index 1942042dbea..f89f94e9882 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_get.go @@ -45,7 +45,6 @@ func (c IncidentCommentsClient) Get(ctx context.Context, id CommentId) (result G var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_list.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_list.go index d7901e9ffbe..86596f39c17 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-11-01/incidentcomments/version.go b/resource-manager/securityinsights/2022-11-01/incidentcomments/version.go index 8b4e871d2bc..54bcb4ea471 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentcomments/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidentcomments/version.go @@ -1,12 +1,10 @@ package incidentcomments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentcomments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentcomments/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/README.md b/resource-manager/securityinsights/2022-11-01/incidententities/README.md index 06bdaece61d..7211c7c1247 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidententities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidententities` Documentation -The `incidententities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidententities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/client.go b/resource-manager/securityinsights/2022-11-01/incidententities/client.go index 740e7b81755..43ea52910a4 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/client.go @@ -15,7 +15,7 @@ type IncidentEntitiesClient struct { } func NewIncidentEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentEntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidententities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidententities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentEntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidententities/id_incident.go index c5a5ad1f7ba..b4cde49714f 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/method_incidentslistentities.go b/resource-manager/securityinsights/2022-11-01/incidententities/method_incidentslistentities.go index 2723b2f44a9..89451a71065 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/method_incidentslistentities.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/method_incidentslistentities.go @@ -46,7 +46,6 @@ func (c IncidentEntitiesClient) IncidentsListEntities(ctx context.Context, id In var model IncidentEntitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/model_entity.go b/resource-manager/securityinsights/2022-11-01/incidententities/model_entity.go index 43a9a64c0bf..78b4d77ecf7 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/model_entity.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/model_huntingbookmark.go b/resource-manager/securityinsights/2022-11-01/incidententities/model_huntingbookmark.go index f001f6b783a..7c44dc5ae38 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/model_incidententitiesresponse.go b/resource-manager/securityinsights/2022-11-01/incidententities/model_incidententitiesresponse.go index ab896895768..1ff0045f9ff 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/model_incidententitiesresponse.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/model_incidententitiesresponse.go @@ -37,7 +37,7 @@ func (s *IncidentEntitiesResponse) UnmarshalJSON(bytes []byte) error { output := make([]Entity, 0) for i, val := range listTemp { - impl, err := unmarshalEntityImplementation(val) + impl, err := UnmarshalEntityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Entities' for 'IncidentEntitiesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/model_securityalert.go b/resource-manager/securityinsights/2022-11-01/incidententities/model_securityalert.go index 9d570306524..77f4d3ce1d7 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/model_securityalert.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/incidententities/version.go b/resource-manager/securityinsights/2022-11-01/incidententities/version.go index 1e711c8bfef..a4bf29c1c7f 100644 --- a/resource-manager/securityinsights/2022-11-01/incidententities/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidententities/version.go @@ -1,12 +1,10 @@ package incidententities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidententities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidententities/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/README.md b/resource-manager/securityinsights/2022-11-01/incidentrelations/README.md index c906b7b3d1c..4ab229100bc 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentrelations` Documentation -The `incidentrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidentrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/client.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/client.go index 4e8fbfeb71d..e3e4d587b2a 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/client.go @@ -15,7 +15,7 @@ type IncidentRelationsClient struct { } func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/id_incident.go index 5fd6ef03d73..f50d1d3ad21 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/id_relation.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/id_relation.go index e268009b90c..a8d5c47a374 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/id_relation.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/id_relation.go @@ -46,7 +46,7 @@ func ParseRelationID(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelationIDInsensitively(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_createorupdate.go index 30fcaa14a14..a7bd11f7093 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentRelationsClient) CreateOrUpdate(ctx context.Context, id Relation var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_get.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_get.go index 70bd3924ffc..2633653c6c3 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_get.go @@ -45,7 +45,6 @@ func (c IncidentRelationsClient) Get(ctx context.Context, id RelationId) (result var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_list.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_list.go index 9605942dce1..956f692f05b 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-11-01/incidentrelations/version.go b/resource-manager/securityinsights/2022-11-01/incidentrelations/version.go index 88d4f601835..c96c6dcb9b3 100644 --- a/resource-manager/securityinsights/2022-11-01/incidentrelations/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidentrelations/version.go @@ -1,12 +1,10 @@ package incidentrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentrelations/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/README.md b/resource-manager/securityinsights/2022-11-01/incidents/README.md index 1c6b63d278e..17e52268d61 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/README.md +++ b/resource-manager/securityinsights/2022-11-01/incidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidents` Documentation -The `incidents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `incidents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/incidents/client.go b/resource-manager/securityinsights/2022-11-01/incidents/client.go index aaf38071c39..5936eb290c5 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/client.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/client.go @@ -15,7 +15,7 @@ type IncidentsClient struct { } func NewIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/id_incident.go b/resource-manager/securityinsights/2022-11-01/incidents/id_incident.go index d2a0fefd3dd..c79ff71335f 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/id_incident.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/id_workspace.go b/resource-manager/securityinsights/2022-11-01/incidents/id_workspace.go index 9667e33b904..ceec20de097 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/incidents/method_createorupdate.go index fc09e8a1cba..0a23b31f8bb 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentsClient) CreateOrUpdate(ctx context.Context, id IncidentId, inpu var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/method_get.go b/resource-manager/securityinsights/2022-11-01/incidents/method_get.go index c67e0bb22b8..ab5dc27a5e6 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/method_get.go @@ -45,7 +45,6 @@ func (c IncidentsClient) Get(ctx context.Context, id IncidentId) (result GetOper var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/method_list.go b/resource-manager/securityinsights/2022-11-01/incidents/method_list.go index be48080a496..0a1ec15b8d8 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2022-11-01/incidents/version.go b/resource-manager/securityinsights/2022-11-01/incidents/version.go index adaa4af8ee3..2132ea85f00 100644 --- a/resource-manager/securityinsights/2022-11-01/incidents/version.go +++ b/resource-manager/securityinsights/2022-11-01/incidents/version.go @@ -1,12 +1,10 @@ package incidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidents/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/README.md b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/README.md index 60219b44954..f7c88f633b6 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/README.md +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings` Documentation -The `securitymlanalyticssettings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `securitymlanalyticssettings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/client.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/client.go index 65b248a41f5..bb7dd6eae34 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/client.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/client.go @@ -15,7 +15,7 @@ type SecurityMLAnalyticsSettingsClient struct { } func NewSecurityMLAnalyticsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityMLAnalyticsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityMLAnalyticsSettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go index 31b3fe0787d..0b8b71149ab 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go @@ -44,7 +44,7 @@ func ParseSecurityMLAnalyticsSettingID(input string) (*SecurityMLAnalyticsSettin } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityMLAnalyticsSettingIDInsensitively(input string) (*SecurityMLAn } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_workspace.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_workspace.go index 07bf58f2dc1..9158938cd5f 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_createorupdate.go index f08267b7fac..76bbda93ad2 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_get.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_get.go index 9be89fdf974..678f1c490cb 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // Get ... @@ -48,11 +48,11 @@ func (c SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, id SecurityM if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_list.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_list.go index 693e699ced1..23097e84286 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/method_list.go @@ -73,7 +73,7 @@ func (c SecurityMLAnalyticsSettingsClient) List(ctx context.Context, id Workspac temp := make([]SecurityMLAnalyticsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSecurityMLAnalyticsSettingImplementation(v) + val, err := UnmarshalSecurityMLAnalyticsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SecurityMLAnalyticsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go index 488f0b735f1..7f60dfacc57 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go @@ -16,11 +16,24 @@ type AnomalySecurityMLAnalyticsSettings struct { Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` // Fields inherited from SecurityMLAnalyticsSetting - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AnomalySecurityMLAnalyticsSettings) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return BaseSecurityMLAnalyticsSettingImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AnomalySecurityMLAnalyticsSettings{} @@ -34,9 +47,10 @@ func (s AnomalySecurityMLAnalyticsSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalySecurityMLAnalyticsSettings: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go index 85a395baf6a..b08aec35208 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecurityMLAnalyticsSetting interface { + SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl +} + +var _ SecurityMLAnalyticsSetting = BaseSecurityMLAnalyticsSettingImpl{} + +type BaseSecurityMLAnalyticsSettingImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s } -// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecurityMLAnalyticsSetting = RawSecurityMLAnalyticsSettingImpl{} + +// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecurityMLAnalyticsSettingImpl struct { - Type string - Values map[string]interface{} + securityMLAnalyticsSetting BaseSecurityMLAnalyticsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { +func (s RawSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s.securityMLAnalyticsSetting +} + +func UnmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityML return out, nil } - out := RawSecurityMLAnalyticsSettingImpl{ - Type: value, - Values: temp, + var parent BaseSecurityMLAnalyticsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityMLAnalyticsSettingImpl: %+v", err) } - return out, nil + + return RawSecurityMLAnalyticsSettingImpl{ + securityMLAnalyticsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/version.go b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/version.go index 48725fb8f8a..5624004ef49 100644 --- a/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/version.go +++ b/resource-manager/securityinsights/2022-11-01/securitymlanalyticssettings/version.go @@ -1,12 +1,10 @@ package securitymlanalyticssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitymlanalyticssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitymlanalyticssettings/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/README.md b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/README.md index 6b4ebf64ca1..bc5a8868ef3 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/README.md +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates` Documentation -The `sentinelonboardingstates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `sentinelonboardingstates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/client.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/client.go index 94701ed853a..cfbcc6f5419 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/client.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/client.go @@ -15,7 +15,7 @@ type SentinelOnboardingStatesClient struct { } func NewSentinelOnboardingStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*SentinelOnboardingStatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SentinelOnboardingStatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go index a0b15d704d4..18e7013bdba 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_onboardingstate.go @@ -44,7 +44,7 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go index 25f0d18c095..b5a31015a23 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_create.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_create.go index be0336fbcee..8049e43d14c 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_create.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_create.go @@ -50,7 +50,6 @@ func (c SentinelOnboardingStatesClient) Create(ctx context.Context, id Onboardin var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_get.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_get.go index e7b2c2cb86b..ff9b62feece 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_get.go @@ -45,7 +45,6 @@ func (c SentinelOnboardingStatesClient) Get(ctx context.Context, id OnboardingSt var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_list.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_list.go index d53893d7842..81a5556ad1e 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_list.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/method_list.go @@ -46,7 +46,6 @@ func (c SentinelOnboardingStatesClient) List(ctx context.Context, id WorkspaceId var model SentinelOnboardingStatesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/version.go b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/version.go index 640d5d66c5c..25f841b720c 100644 --- a/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/version.go +++ b/resource-manager/securityinsights/2022-11-01/sentinelonboardingstates/version.go @@ -1,12 +1,10 @@ package sentinelonboardingstates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sentinelonboardingstates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sentinelonboardingstates/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/README.md b/resource-manager/securityinsights/2022-11-01/threatintelligence/README.md index c5818431888..927b714fc4c 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/README.md +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/threatintelligence` Documentation -The `threatintelligence` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `threatintelligence` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/client.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/client.go index edf96c3143f..59e58da3228 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/client.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/client.go @@ -15,7 +15,7 @@ type ThreatIntelligenceClient struct { } func NewThreatIntelligenceClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreatIntelligenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "threatintelligence", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "threatintelligence", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ThreatIntelligenceClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/id_indicator.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/id_indicator.go index 73373ce2134..3c473e1919e 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/id_indicator.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/id_indicator.go @@ -44,7 +44,7 @@ func ParseIndicatorID(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIndicatorIDInsensitively(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/id_workspace.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/id_workspace.go index 2265507abcf..d96d7676ab4 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreate.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreate.go index 3cee598931c..af7a84f3880 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreate.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreate.go @@ -15,7 +15,7 @@ import ( type IndicatorCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreate ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreate(ctx context.Context, id Indica if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreateindicator.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreateindicator.go index 0f3ab94c4f5..05059855207 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreateindicator.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorcreateindicator.go @@ -16,7 +16,7 @@ import ( type IndicatorCreateIndicatorOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreateIndicator ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreateIndicator(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorget.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorget.go index 3358363f139..085ea71bf94 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorget.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorget.go @@ -15,7 +15,7 @@ import ( type IndicatorGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorGet ... @@ -48,11 +48,11 @@ func (c ThreatIntelligenceClient) IndicatorGet(ctx context.Context, id Indicator if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatormetricslist.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatormetricslist.go index f692c803e50..e2bea464351 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatormetricslist.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatormetricslist.go @@ -46,7 +46,6 @@ func (c ThreatIntelligenceClient) IndicatorMetricsList(ctx context.Context, id W var model ThreatIntelligenceMetricsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go index 27c6ce2648f..e2fdfa1225c 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorqueryindicators.go @@ -73,7 +73,7 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorreplacetags.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorreplacetags.go index 052bbe7b66a..873faa376b3 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorreplacetags.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorreplacetags.go @@ -16,7 +16,7 @@ import ( type IndicatorReplaceTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorReplaceTags ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorReplaceTags(ctx context.Context, id I if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorslist.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorslist.go index 1757c99fda7..18256ce90e1 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorslist.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/method_indicatorslist.go @@ -42,6 +42,7 @@ func (o IndicatorsListOperationOptions) ToHeaders() *client.Headers { func (o IndicatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,7 @@ func (c ThreatIntelligenceClient) IndicatorsList(ctx context.Context, id Workspa temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceindicatormodel.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceindicatormodel.go index 9ee1b5778ed..3f036f4cadc 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceindicatormodel.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceindicatormodel.go @@ -16,11 +16,24 @@ type ThreatIntelligenceIndicatorModel struct { Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` // Fields inherited from ThreatIntelligenceInformation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ThreatIntelligenceIndicatorModel) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return BaseThreatIntelligenceInformationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ThreatIntelligenceIndicatorModel{} @@ -34,9 +47,10 @@ func (s ThreatIntelligenceIndicatorModel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceIndicatorModel: %+v", err) } + decoded["kind"] = "indicator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformation.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformation.go index d036b649d26..4fc4734df84 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformation.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/model_threatintelligenceinformation.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreatIntelligenceInformation interface { + ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl +} + +var _ ThreatIntelligenceInformation = BaseThreatIntelligenceInformationImpl{} + +type BaseThreatIntelligenceInformationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s } -// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreatIntelligenceInformation = RawThreatIntelligenceInformationImpl{} + +// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreatIntelligenceInformationImpl struct { - Type string - Values map[string]interface{} + threatIntelligenceInformation BaseThreatIntelligenceInformationImpl + Type string + Values map[string]interface{} } -func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { +func (s RawThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s.threatIntelligenceInformation +} + +func UnmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatI return out, nil } - out := RawThreatIntelligenceInformationImpl{ - Type: value, - Values: temp, + var parent BaseThreatIntelligenceInformationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreatIntelligenceInformationImpl: %+v", err) } - return out, nil + + return RawThreatIntelligenceInformationImpl{ + threatIntelligenceInformation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2022-11-01/threatintelligence/version.go b/resource-manager/securityinsights/2022-11-01/threatintelligence/version.go index 07547975f9c..f5026a54fcc 100644 --- a/resource-manager/securityinsights/2022-11-01/threatintelligence/version.go +++ b/resource-manager/securityinsights/2022-11-01/threatintelligence/version.go @@ -1,12 +1,10 @@ package threatintelligence -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/threatintelligence/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/threatintelligence/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/README.md b/resource-manager/securityinsights/2022-11-01/watchlistitems/README.md index 0c691ae868e..d7c562e616b 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/README.md +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlistitems` Documentation -The `watchlistitems` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `watchlistitems` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/client.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/client.go index d3193694a48..f5126a4483d 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/client.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/client.go @@ -15,7 +15,7 @@ type WatchlistItemsClient struct { } func NewWatchlistItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlistitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlistitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistItemsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go index 7df2e8c2562..398316c372f 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go index 95aa9b8f56d..3a971d74b12 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/id_watchlistitem.go @@ -46,7 +46,7 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/method_createorupdate.go index 68142e971a8..1e71da4f4ef 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistItemsClient) CreateOrUpdate(ctx context.Context, id WatchlistIt var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/method_get.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/method_get.go index 1973c679f9e..6f2b74513da 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistItemsClient) Get(ctx context.Context, id WatchlistItemId) (resu var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/watchlistitems/version.go b/resource-manager/securityinsights/2022-11-01/watchlistitems/version.go index ec616dc4097..1a93ccf421c 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlistitems/version.go +++ b/resource-manager/securityinsights/2022-11-01/watchlistitems/version.go @@ -1,12 +1,10 @@ package watchlistitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlistitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlistitems/2022-11-01" } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/README.md b/resource-manager/securityinsights/2022-11-01/watchlists/README.md index 3ba89e2e84b..bb4fe7ebac2 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/README.md +++ b/resource-manager/securityinsights/2022-11-01/watchlists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/watchlists` Documentation -The `watchlists` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). +The `watchlists` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2022-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/client.go b/resource-manager/securityinsights/2022-11-01/watchlists/client.go index 45211175054..22f5472a0ad 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/client.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/client.go @@ -15,7 +15,7 @@ type WatchlistsClient struct { } func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go b/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go index e5b47b1456e..ac459a108e6 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go b/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go index d8e6bddfee7..6b8f7d79efb 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/method_createorupdate.go b/resource-manager/securityinsights/2022-11-01/watchlists/method_createorupdate.go index eb0b4f9396d..219b2a467eb 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/method_createorupdate.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, in var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/method_get.go b/resource-manager/securityinsights/2022-11-01/watchlists/method_get.go index 7aac16c3975..2b6dcd7e6da 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/method_get.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistsClient) Get(ctx context.Context, id WatchlistId) (result GetOp var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2022-11-01/watchlists/version.go b/resource-manager/securityinsights/2022-11-01/watchlists/version.go index 788356a761d..431c5b210b6 100644 --- a/resource-manager/securityinsights/2022-11-01/watchlists/version.go +++ b/resource-manager/securityinsights/2022-11-01/watchlists/version.go @@ -1,12 +1,10 @@ package watchlists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlists/2022-11-01" } diff --git a/resource-manager/securityinsights/2023-02-01/actions/README.md b/resource-manager/securityinsights/2023-02-01/actions/README.md index fd155c83ccf..13777d1a3f3 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/README.md +++ b/resource-manager/securityinsights/2023-02-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/actions/client.go b/resource-manager/securityinsights/2023-02-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/client.go +++ b/resource-manager/securityinsights/2023-02-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/actions/id_action.go b/resource-manager/securityinsights/2023-02-01/actions/id_action.go index aeefc14d3f8..9e28a9229f4 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/id_action.go +++ b/resource-manager/securityinsights/2023-02-01/actions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/actions/id_alertrule.go b/resource-manager/securityinsights/2023-02-01/actions/id_alertrule.go index 731f6439ae3..e92dcf5f421 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/id_alertrule.go +++ b/resource-manager/securityinsights/2023-02-01/actions/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/actions/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/actions/method_createorupdate.go index e84c5bebbd7..739b455eff0 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/actions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ActionsClient) CreateOrUpdate(ctx context.Context, id ActionId, input Ac var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/actions/method_get.go b/resource-manager/securityinsights/2023-02-01/actions/method_get.go index 9d5aad5dc58..38ddf8d93d2 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/actions/method_get.go @@ -45,7 +45,6 @@ func (c ActionsClient) Get(ctx context.Context, id ActionId) (result GetOperatio var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/actions/version.go b/resource-manager/securityinsights/2023-02-01/actions/version.go index cac17b5866e..d984022a995 100644 --- a/resource-manager/securityinsights/2023-02-01/actions/version.go +++ b/resource-manager/securityinsights/2023-02-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/README.md b/resource-manager/securityinsights/2023-02-01/alertrules/README.md index de961e7242d..919e6fce230 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/README.md +++ b/resource-manager/securityinsights/2023-02-01/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/client.go b/resource-manager/securityinsights/2023-02-01/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/client.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/id_alertrule.go b/resource-manager/securityinsights/2023-02-01/alertrules/id_alertrule.go index 818f124e5ef..941d129e5a3 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/id_alertrule.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/id_workspace.go b/resource-manager/securityinsights/2023-02-01/alertrules/id_workspace.go index 005b7fc90a7..0ae4ab3dfc2 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/alertrules/method_createorupdate.go index f77c7558d09..13548ddf46e 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/method_get.go b/resource-manager/securityinsights/2023-02-01/alertrules/method_get.go index 945c07bfad1..f6b552d75c7 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // Get ... @@ -48,11 +48,11 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/method_list.go b/resource-manager/securityinsights/2023-02-01/alertrules/method_list.go index 191ccd545bb..55fff58c861 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/method_list.go @@ -73,7 +73,7 @@ func (c AlertRulesClient) List(ctx context.Context, id WorkspaceId) (result List temp := make([]AlertRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleImplementation(v) + val, err := UnmarshalAlertRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/model_alertrule.go b/resource-manager/securityinsights/2023-02-01/alertrules/model_alertrule.go index 0a8eb3e2ad3..3b089e227ff 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/model_alertrule.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/model_alertrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRule interface { + AlertRule() BaseAlertRuleImpl +} + +var _ AlertRule = BaseAlertRuleImpl{} + +type BaseAlertRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s } -// RawAlertRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRule = RawAlertRuleImpl{} + +// RawAlertRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleImpl struct { - Type string - Values map[string]interface{} + alertRule BaseAlertRuleImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { +func (s RawAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s.alertRule +} + +func UnmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { if input == nil { return nil, nil } @@ -60,10 +84,15 @@ func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { return out, nil } - out := RawAlertRuleImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleImpl: %+v", err) } - return out, nil + + return RawAlertRuleImpl{ + alertRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/model_fusionalertrule.go b/resource-manager/securityinsights/2023-02-01/alertrules/model_fusionalertrule.go index c4ed17f4319..f9ebd649bd9 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/model_fusionalertrule.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/model_fusionalertrule.go @@ -16,13 +16,26 @@ type FusionAlertRule struct { Properties *FusionAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRule{} func (s FusionAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s FusionAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRule: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go b/resource-manager/securityinsights/2023-02-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go index 4fa227e3728..ccf5f8899d4 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go @@ -16,13 +16,26 @@ type MicrosoftSecurityIncidentCreationAlertRule struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRule{} func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRule: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/model_scheduledalertrule.go b/resource-manager/securityinsights/2023-02-01/alertrules/model_scheduledalertrule.go index cf91bcec4f2..6dc6c221e54 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/model_scheduledalertrule.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/model_scheduledalertrule.go @@ -16,13 +16,26 @@ type ScheduledAlertRule struct { Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRule{} func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRule: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertrules/version.go b/resource-manager/securityinsights/2023-02-01/alertrules/version.go index 667165b8eaa..26bbe58c8e3 100644 --- a/resource-manager/securityinsights/2023-02-01/alertrules/version.go +++ b/resource-manager/securityinsights/2023-02-01/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/README.md b/resource-manager/securityinsights/2023-02-01/alertruletemplates/README.md index 6cc05604ca3..376784245a0 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/README.md +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/alertruletemplates` Documentation -The `alertruletemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `alertruletemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/client.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/client.go index 2932bf14a55..5726cbd8954 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/client.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/client.go @@ -15,7 +15,7 @@ type AlertRuleTemplatesClient struct { } func NewAlertRuleTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruletemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruletemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_alertruletemplate.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_alertruletemplate.go index 6a82de7688f..e294dbc3335 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_alertruletemplate.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_alertruletemplate.go @@ -44,7 +44,7 @@ func ParseAlertRuleTemplateID(input string) (*AlertRuleTemplateId, error) { } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleTemplateIDInsensitively(input string) (*AlertRuleTemplateId, } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_workspace.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_workspace.go index 184371fb5dc..757188dcdde 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_get.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_get.go index 861712be66a..c8efafa0807 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRuleTemplate + Model AlertRuleTemplate } // Get ... @@ -48,11 +48,11 @@ func (c AlertRuleTemplatesClient) Get(ctx context.Context, id AlertRuleTemplateI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleTemplateImplementation(respObj) + model, err := UnmarshalAlertRuleTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_list.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_list.go index 7b8fd97d59e..11a83746296 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/method_list.go @@ -73,7 +73,7 @@ func (c AlertRuleTemplatesClient) List(ctx context.Context, id WorkspaceId) (res temp := make([]AlertRuleTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleTemplateImplementation(v) + val, err := UnmarshalAlertRuleTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRuleTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_alertruletemplate.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_alertruletemplate.go index 6000fbb4b2c..0f3bb1bd9cf 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_alertruletemplate.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_alertruletemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRuleTemplate interface { + AlertRuleTemplate() BaseAlertRuleTemplateImpl +} + +var _ AlertRuleTemplate = BaseAlertRuleTemplateImpl{} + +type BaseAlertRuleTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s } -// RawAlertRuleTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRuleTemplate = RawAlertRuleTemplateImpl{} + +// RawAlertRuleTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleTemplateImpl struct { - Type string - Values map[string]interface{} + alertRuleTemplate BaseAlertRuleTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { +func (s RawAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s.alertRuleTemplate +} + +func UnmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, return out, nil } - out := RawAlertRuleTemplateImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleTemplateImpl: %+v", err) } - return out, nil + + return RawAlertRuleTemplateImpl{ + alertRuleTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_fusionalertruletemplate.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_fusionalertruletemplate.go index c2b4d8c3077..ea4edef0f1e 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_fusionalertruletemplate.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_fusionalertruletemplate.go @@ -16,12 +16,24 @@ type FusionAlertRuleTemplate struct { Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRuleTemplate{} func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go index 515a47767b2..c526da831d8 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go @@ -16,12 +16,24 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRuleTemplate{} func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_scheduledalertruletemplate.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_scheduledalertruletemplate.go index c3428ada14d..bb44ecf53bb 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_scheduledalertruletemplate.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/model_scheduledalertruletemplate.go @@ -16,12 +16,24 @@ type ScheduledAlertRuleTemplate struct { Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRuleTemplate{} func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/alertruletemplates/version.go b/resource-manager/securityinsights/2023-02-01/alertruletemplates/version.go index 81bc806c572..3f3e585fe6e 100644 --- a/resource-manager/securityinsights/2023-02-01/alertruletemplates/version.go +++ b/resource-manager/securityinsights/2023-02-01/alertruletemplates/version.go @@ -1,12 +1,10 @@ package alertruletemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruletemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruletemplates/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/README.md b/resource-manager/securityinsights/2023-02-01/automationrules/README.md index 5552f7a6986..c7472090eb4 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/README.md +++ b/resource-manager/securityinsights/2023-02-01/automationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/automationrules` Documentation -The `automationrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `automationrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/client.go b/resource-manager/securityinsights/2023-02-01/automationrules/client.go index 18fafea1496..75f33724768 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/client.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/client.go @@ -15,7 +15,7 @@ type AutomationRulesClient struct { } func NewAutomationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/id_automationrule.go b/resource-manager/securityinsights/2023-02-01/automationrules/id_automationrule.go index 00c7db776a3..8c99ce6f94c 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/id_automationrule.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/id_automationrule.go @@ -44,7 +44,7 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/id_workspace.go b/resource-manager/securityinsights/2023-02-01/automationrules/id_workspace.go index 72d00c87771..719da4c9ff6 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/automationrules/method_createorupdate.go index 6ab8b05e0fb..9f70d87aab4 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationRulesClient) CreateOrUpdate(ctx context.Context, id Automation var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/method_delete.go b/resource-manager/securityinsights/2023-02-01/automationrules/method_delete.go index c32a7e886ad..5915b112d22 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/method_delete.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/method_delete.go @@ -46,7 +46,6 @@ func (c AutomationRulesClient) Delete(ctx context.Context, id AutomationRuleId) var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/method_get.go b/resource-manager/securityinsights/2023-02-01/automationrules/method_get.go index b5c7ce72e30..e180fc005e4 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/method_get.go @@ -45,7 +45,6 @@ func (c AutomationRulesClient) Get(ctx context.Context, id AutomationRuleId) (re var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleaction.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleaction.go index 77887bb8adf..eebf2db629d 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleaction.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleaction.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleAction interface { + AutomationRuleAction() BaseAutomationRuleActionImpl } -// RawAutomationRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleAction = BaseAutomationRuleActionImpl{} + +type BaseAutomationRuleActionImpl struct { + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s BaseAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s +} + +var _ AutomationRuleAction = RawAutomationRuleActionImpl{} + +// RawAutomationRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleActionImpl struct { - Type string - Values map[string]interface{} + automationRuleAction BaseAutomationRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s.automationRuleAction } -func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { +func UnmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAc return out, nil } - out := RawAutomationRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleActionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleActionImpl{ + automationRuleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulecondition.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulecondition.go index 81938bfb589..ef0081a537e 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulecondition.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulecondition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleCondition interface { + AutomationRuleCondition() BaseAutomationRuleConditionImpl } -// RawAutomationRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleCondition = BaseAutomationRuleConditionImpl{} + +type BaseAutomationRuleConditionImpl struct { + ConditionType ConditionType `json:"conditionType"` +} + +func (s BaseAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s +} + +var _ AutomationRuleCondition = RawAutomationRuleConditionImpl{} + +// RawAutomationRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleConditionImpl struct { - Type string - Values map[string]interface{} + automationRuleCondition BaseAutomationRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s.automationRuleCondition } -func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { +func UnmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRul return out, nil } - out := RawAutomationRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleConditionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleConditionImpl{ + automationRuleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulemodifypropertiesaction.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulemodifypropertiesaction.go index 98eb39b6a9b..59b10e5bc34 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulemodifypropertiesaction.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulemodifypropertiesaction.go @@ -14,7 +14,16 @@ type AutomationRuleModifyPropertiesAction struct { ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleModifyPropertiesAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleModifyPropertiesAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleModifyPropertiesAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleModifyPropertiesAction: %+v", err) } + decoded["actionType"] = "ModifyProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleproperties.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleproperties.go index 5460f9b5fba..4499996f6a2 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleproperties.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruleproperties.go @@ -76,7 +76,7 @@ func (s *AutomationRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleActionImplementation(val) + impl, err := UnmarshalAutomationRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationRuleProperties': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulerunplaybookaction.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulerunplaybookaction.go index c3e139aacf7..eba12a31777 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulerunplaybookaction.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationrulerunplaybookaction.go @@ -14,7 +14,16 @@ type AutomationRuleRunPlaybookAction struct { ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleRunPlaybookAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleRunPlaybookAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleRunPlaybookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleRunPlaybookAction: %+v", err) } + decoded["actionType"] = "RunPlaybook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruletriggeringlogic.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruletriggeringlogic.go index 2f4592c4269..0fac09e2443 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruletriggeringlogic.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_automationruletriggeringlogic.go @@ -58,7 +58,7 @@ func (s *AutomationRuleTriggeringLogic) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'AutomationRuleTriggeringLogic': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyarraychangedconditionproperties.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyarraychangedconditionproperties.go index 9abf0187ac4..07c0eb5acce 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyarraychangedconditionproperties.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyarraychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArrayChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertychangedconditionproperties.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertychangedconditionproperties.go index b72736f49a2..960f23ee56e 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertychangedconditionproperties.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyconditionproperties.go b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyconditionproperties.go index 6e77d74c58c..92672dc4e8c 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyconditionproperties.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/model_propertyconditionproperties.go @@ -14,6 +14,14 @@ type PropertyConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyConditionProperties: %+v", err) } + decoded["conditionType"] = "Property" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/automationrules/version.go b/resource-manager/securityinsights/2023-02-01/automationrules/version.go index 8748fcbcfeb..2e8e89616ad 100644 --- a/resource-manager/securityinsights/2023-02-01/automationrules/version.go +++ b/resource-manager/securityinsights/2023-02-01/automationrules/version.go @@ -1,12 +1,10 @@ package automationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationrules/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/README.md b/resource-manager/securityinsights/2023-02-01/bookmarks/README.md index 178205f216d..5407d8fcd5b 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/README.md +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/bookmarks` Documentation -The `bookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `bookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/client.go b/resource-manager/securityinsights/2023-02-01/bookmarks/client.go index 22469155649..4a7e564bcaf 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/client.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/client.go @@ -15,7 +15,7 @@ type BookmarksClient struct { } func NewBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/id_bookmark.go b/resource-manager/securityinsights/2023-02-01/bookmarks/id_bookmark.go index 5317bd28514..97039a3361a 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/id_bookmark.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/id_workspace.go b/resource-manager/securityinsights/2023-02-01/bookmarks/id_workspace.go index 96d5c1221cf..7f2924971ec 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/bookmarks/method_createorupdate.go index 2e61ab3ee74..9d2c71d828b 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, inpu var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/method_get.go b/resource-manager/securityinsights/2023-02-01/bookmarks/method_get.go index 36c8d7fcc43..ec1d9306eec 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/method_get.go @@ -45,7 +45,6 @@ func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOper var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/bookmarks/version.go b/resource-manager/securityinsights/2023-02-01/bookmarks/version.go index ea06217b961..2ea3783e93a 100644 --- a/resource-manager/securityinsights/2023-02-01/bookmarks/version.go +++ b/resource-manager/securityinsights/2023-02-01/bookmarks/version.go @@ -1,12 +1,10 @@ package bookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarks/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/README.md b/resource-manager/securityinsights/2023-02-01/dataconnectors/README.md index 21bf47142c9..18ad6335065 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/README.md +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/dataconnectors` Documentation -The `dataconnectors` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `dataconnectors` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/client.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/client.go index 8ed0120c79a..0a9e9bbb924 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/client.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/client.go @@ -15,7 +15,7 @@ type DataConnectorsClient struct { } func NewDataConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/id_dataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/id_dataconnector.go index b55667aa923..c6cc24bc274 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/id_dataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/id_workspace.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/id_workspace.go index 60237fcce07..64796e96412 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_createorupdate.go index c5f6e5d1503..111c7e46a6c 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c DataConnectorsClient) CreateOrUpdate(ctx context.Context, id DataConnect if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_get.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_get.go index 3511ba85477..5b79c298c01 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectorsClient) Get(ctx context.Context, id DataConnectorId) (resu if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_list.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_list.go index b000eaba869..2b4d19a4d0f 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/method_list.go @@ -73,7 +73,7 @@ func (c DataConnectorsClient) List(ctx context.Context, id WorkspaceId) (result temp := make([]DataConnector, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataConnectorImplementation(v) + val, err := UnmarshalDataConnectorImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataConnector (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aaddataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aaddataconnector.go index dd0ca1af664..141187a8802 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aaddataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aaddataconnector.go @@ -16,13 +16,26 @@ type AADDataConnector struct { Properties *AADDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AADDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AADDataConnector{} func (s AADDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AADDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADDataConnector: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aatpdataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aatpdataconnector.go index e1cd013bbd7..798b7a40456 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aatpdataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_aatpdataconnector.go @@ -16,13 +16,26 @@ type AATPDataConnector struct { Properties *AATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AATPDataConnector{} func (s AATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPDataConnector: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_ascdataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_ascdataconnector.go index 3af09c2ff8b..dcc8457279a 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_ascdataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_ascdataconnector.go @@ -16,13 +16,26 @@ type ASCDataConnector struct { Properties *ASCDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ASCDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ASCDataConnector{} func (s ASCDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ASCDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCDataConnector: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_awscloudtraildataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_awscloudtraildataconnector.go index b0ef7fdd285..42a1639082a 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_awscloudtraildataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_awscloudtraildataconnector.go @@ -16,13 +16,26 @@ type AwsCloudTrailDataConnector struct { Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsCloudTrailDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsCloudTrailDataConnector{} func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailDataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_dataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_dataconnector.go index 66368d66fb7..70a7f42baaa 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_dataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_dataconnector.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnector interface { + DataConnector() BaseDataConnectorImpl +} + +var _ DataConnector = BaseDataConnectorImpl{} + +type BaseDataConnectorImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s } -// RawDataConnectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnector = RawDataConnectorImpl{} + +// RawDataConnectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorImpl struct { - Type string - Values map[string]interface{} + dataConnector BaseDataConnectorImpl + Type string + Values map[string]interface{} } -func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { +func (s RawDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s.dataConnector +} + +func UnmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { if input == nil { return nil, nil } @@ -100,10 +124,15 @@ func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { return out, nil } - out := RawDataConnectorImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorImpl: %+v", err) } - return out, nil + + return RawDataConnectorImpl{ + dataConnector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mcasdataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mcasdataconnector.go index 6a0c9aebea0..efa33558eaf 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mcasdataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mcasdataconnector.go @@ -16,13 +16,26 @@ type MCASDataConnector struct { Properties *MCASDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MCASDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MCASDataConnector{} func (s MCASDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MCASDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mdatpdataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mdatpdataconnector.go index 1a6bcbcb7bf..02c3188f668 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mdatpdataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_mdatpdataconnector.go @@ -16,13 +16,26 @@ type MDATPDataConnector struct { Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MDATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MDATPDataConnector{} func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_officedataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_officedataconnector.go index 25b5a25e44d..4b2bee1390e 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_officedataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_officedataconnector.go @@ -16,13 +16,26 @@ type OfficeDataConnector struct { Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeDataConnector{} func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeDataConnector: %+v", err) } + decoded["kind"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_tidataconnector.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_tidataconnector.go index 208513ef9aa..c1a8de64c5f 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/model_tidataconnector.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/model_tidataconnector.go @@ -16,13 +16,26 @@ type TIDataConnector struct { Properties *TIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TIDataConnector{} func (s TIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TIDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/dataconnectors/version.go b/resource-manager/securityinsights/2023-02-01/dataconnectors/version.go index a0ffd9ab2d5..3a0972ef981 100644 --- a/resource-manager/securityinsights/2023-02-01/dataconnectors/version.go +++ b/resource-manager/securityinsights/2023-02-01/dataconnectors/version.go @@ -1,12 +1,10 @@ package dataconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectors/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/README.md b/resource-manager/securityinsights/2023-02-01/incidentalerts/README.md index 09b829a4b43..7310f65adf0 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentalerts` Documentation -The `incidentalerts` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidentalerts` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/client.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/client.go index 53dc2b4cd4e..eb74a60490e 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/client.go @@ -15,7 +15,7 @@ type IncidentAlertsClient struct { } func NewIncidentAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentAlertsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/id_incident.go index 6145c7882c4..29e38698c28 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/method_incidentslistalerts.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/method_incidentslistalerts.go index a6b61790e56..62e926363cb 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/method_incidentslistalerts.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/method_incidentslistalerts.go @@ -46,7 +46,6 @@ func (c IncidentAlertsClient) IncidentsListAlerts(ctx context.Context, id Incide var model IncidentAlertList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_entity.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_entity.go index 8a6c7ffef8e..6276e2fe91a 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_entity.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_huntingbookmark.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_huntingbookmark.go index 827ded08f6d..4bc98105f79 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_securityalert.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_securityalert.go index 3935326a1d2..bf6de905783 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/model_securityalert.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidentalerts/version.go b/resource-manager/securityinsights/2023-02-01/incidentalerts/version.go index 6bc4f2f6f9b..d6df2440bb8 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentalerts/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidentalerts/version.go @@ -1,12 +1,10 @@ package incidentalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentalerts/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/README.md b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/README.md index 8cd44386e21..78f81472e6f 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentbookmarks` Documentation -The `incidentbookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidentbookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/client.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/client.go index e6a60ede52d..8207d4048bc 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/client.go @@ -15,7 +15,7 @@ type IncidentBookmarksClient struct { } func NewIncidentBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentBookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentbookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentbookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentBookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/id_incident.go index f2bd006b056..7de4edf33f9 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/method_incidentslistbookmarks.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/method_incidentslistbookmarks.go index ea658d25e66..f067fc2e94e 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/method_incidentslistbookmarks.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/method_incidentslistbookmarks.go @@ -46,7 +46,6 @@ func (c IncidentBookmarksClient) IncidentsListBookmarks(ctx context.Context, id var model IncidentBookmarkList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_entity.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_entity.go index ac882c04383..dac6295bd01 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_entity.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_huntingbookmark.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_huntingbookmark.go index 1e9bfbf488f..10730d12eaa 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_securityalert.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_securityalert.go index a86152f3c69..0ffa9096236 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_securityalert.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/version.go b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/version.go index daae157c046..103cc5da70b 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentbookmarks/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidentbookmarks/version.go @@ -1,12 +1,10 @@ package incidentbookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentbookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentbookmarks/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/README.md b/resource-manager/securityinsights/2023-02-01/incidentcomments/README.md index a69ed4bddbf..df0f12c36cf 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentcomments` Documentation -The `incidentcomments` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidentcomments` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/client.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/client.go index 981e6f75216..a31f83a2df1 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/client.go @@ -15,7 +15,7 @@ type IncidentCommentsClient struct { } func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentcomments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentcomments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentCommentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/id_comment.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/id_comment.go index 1c431622bbe..7493d91020f 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/id_comment.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/id_comment.go @@ -46,7 +46,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/id_incident.go index 94bb1fcdd3c..eafc62fd68d 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_createorupdate.go index 6ea7a1ed4dc..a4e39abbb71 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_get.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_get.go index 1942042dbea..f89f94e9882 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_get.go @@ -45,7 +45,6 @@ func (c IncidentCommentsClient) Get(ctx context.Context, id CommentId) (result G var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_list.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_list.go index d7901e9ffbe..86596f39c17 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-02-01/incidentcomments/version.go b/resource-manager/securityinsights/2023-02-01/incidentcomments/version.go index db7db6db673..c7bed144745 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentcomments/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidentcomments/version.go @@ -1,12 +1,10 @@ package incidentcomments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentcomments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentcomments/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/README.md b/resource-manager/securityinsights/2023-02-01/incidententities/README.md index f1fb7a64091..fa105ed1be0 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidententities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidententities` Documentation -The `incidententities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidententities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/client.go b/resource-manager/securityinsights/2023-02-01/incidententities/client.go index 740e7b81755..43ea52910a4 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/client.go @@ -15,7 +15,7 @@ type IncidentEntitiesClient struct { } func NewIncidentEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentEntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidententities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidententities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentEntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidententities/id_incident.go index c5a5ad1f7ba..b4cde49714f 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/method_incidentslistentities.go b/resource-manager/securityinsights/2023-02-01/incidententities/method_incidentslistentities.go index 2723b2f44a9..89451a71065 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/method_incidentslistentities.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/method_incidentslistentities.go @@ -46,7 +46,6 @@ func (c IncidentEntitiesClient) IncidentsListEntities(ctx context.Context, id In var model IncidentEntitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/model_entity.go b/resource-manager/securityinsights/2023-02-01/incidententities/model_entity.go index 43a9a64c0bf..78b4d77ecf7 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/model_entity.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/model_huntingbookmark.go b/resource-manager/securityinsights/2023-02-01/incidententities/model_huntingbookmark.go index f001f6b783a..7c44dc5ae38 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/model_incidententitiesresponse.go b/resource-manager/securityinsights/2023-02-01/incidententities/model_incidententitiesresponse.go index ab896895768..1ff0045f9ff 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/model_incidententitiesresponse.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/model_incidententitiesresponse.go @@ -37,7 +37,7 @@ func (s *IncidentEntitiesResponse) UnmarshalJSON(bytes []byte) error { output := make([]Entity, 0) for i, val := range listTemp { - impl, err := unmarshalEntityImplementation(val) + impl, err := UnmarshalEntityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Entities' for 'IncidentEntitiesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/model_securityalert.go b/resource-manager/securityinsights/2023-02-01/incidententities/model_securityalert.go index 9d570306524..77f4d3ce1d7 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/model_securityalert.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/incidententities/version.go b/resource-manager/securityinsights/2023-02-01/incidententities/version.go index 6dc2f53129b..af0aeb0ce6e 100644 --- a/resource-manager/securityinsights/2023-02-01/incidententities/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidententities/version.go @@ -1,12 +1,10 @@ package incidententities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidententities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidententities/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/README.md b/resource-manager/securityinsights/2023-02-01/incidentrelations/README.md index e06a6fdb586..a37be072dd9 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentrelations` Documentation -The `incidentrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidentrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/client.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/client.go index 4e8fbfeb71d..e3e4d587b2a 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/client.go @@ -15,7 +15,7 @@ type IncidentRelationsClient struct { } func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/id_incident.go index 5fd6ef03d73..f50d1d3ad21 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/id_relation.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/id_relation.go index e268009b90c..a8d5c47a374 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/id_relation.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/id_relation.go @@ -46,7 +46,7 @@ func ParseRelationID(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelationIDInsensitively(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_createorupdate.go index 30fcaa14a14..a7bd11f7093 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentRelationsClient) CreateOrUpdate(ctx context.Context, id Relation var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_get.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_get.go index 70bd3924ffc..2633653c6c3 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_get.go @@ -45,7 +45,6 @@ func (c IncidentRelationsClient) Get(ctx context.Context, id RelationId) (result var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_list.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_list.go index 9605942dce1..956f692f05b 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-02-01/incidentrelations/version.go b/resource-manager/securityinsights/2023-02-01/incidentrelations/version.go index 36b6f338183..e8c5f955dae 100644 --- a/resource-manager/securityinsights/2023-02-01/incidentrelations/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidentrelations/version.go @@ -1,12 +1,10 @@ package incidentrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentrelations/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/README.md b/resource-manager/securityinsights/2023-02-01/incidents/README.md index eab7e7990e6..ad912efe97e 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/README.md +++ b/resource-manager/securityinsights/2023-02-01/incidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidents` Documentation -The `incidents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `incidents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/incidents/client.go b/resource-manager/securityinsights/2023-02-01/incidents/client.go index aaf38071c39..5936eb290c5 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/client.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/client.go @@ -15,7 +15,7 @@ type IncidentsClient struct { } func NewIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/id_incident.go b/resource-manager/securityinsights/2023-02-01/incidents/id_incident.go index d2a0fefd3dd..c79ff71335f 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/id_incident.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/id_workspace.go b/resource-manager/securityinsights/2023-02-01/incidents/id_workspace.go index 9667e33b904..ceec20de097 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/incidents/method_createorupdate.go index fc09e8a1cba..0a23b31f8bb 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentsClient) CreateOrUpdate(ctx context.Context, id IncidentId, inpu var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/method_get.go b/resource-manager/securityinsights/2023-02-01/incidents/method_get.go index c67e0bb22b8..ab5dc27a5e6 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/method_get.go @@ -45,7 +45,6 @@ func (c IncidentsClient) Get(ctx context.Context, id IncidentId) (result GetOper var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/method_list.go b/resource-manager/securityinsights/2023-02-01/incidents/method_list.go index be48080a496..0a1ec15b8d8 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-02-01/incidents/version.go b/resource-manager/securityinsights/2023-02-01/incidents/version.go index 1a03d1d8ff2..12e1ec297b4 100644 --- a/resource-manager/securityinsights/2023-02-01/incidents/version.go +++ b/resource-manager/securityinsights/2023-02-01/incidents/version.go @@ -1,12 +1,10 @@ package incidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidents/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/README.md b/resource-manager/securityinsights/2023-02-01/metadata/README.md index 01ad73357cd..2068ad9ad87 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/README.md +++ b/resource-manager/securityinsights/2023-02-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/metadata/client.go b/resource-manager/securityinsights/2023-02-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/client.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/id_metadata.go b/resource-manager/securityinsights/2023-02-01/metadata/id_metadata.go index 5d97d463191..f117ec19858 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/id_metadata.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/id_metadata.go @@ -44,7 +44,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/id_workspace.go b/resource-manager/securityinsights/2023-02-01/metadata/id_workspace.go index 6248b4d13cc..ed12f8f45bb 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/method_create.go b/resource-manager/securityinsights/2023-02-01/metadata/method_create.go index fd4a74a030a..72fc34ee83b 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/method_create.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/method_create.go @@ -50,7 +50,6 @@ func (c MetadataClient) Create(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/method_get.go b/resource-manager/securityinsights/2023-02-01/metadata/method_get.go index 68228f0b583..6e0fd8a6701 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/method_get.go @@ -45,7 +45,6 @@ func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOpera var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/method_list.go b/resource-manager/securityinsights/2023-02-01/metadata/method_list.go index 398be67d7f3..d02ed234668 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/method_update.go b/resource-manager/securityinsights/2023-02-01/metadata/method_update.go index e6911fcbc1d..3b55664e813 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/method_update.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/method_update.go @@ -49,7 +49,6 @@ func (c MetadataClient) Update(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/metadata/version.go b/resource-manager/securityinsights/2023-02-01/metadata/version.go index 844b3e663ce..c05d3bfc572 100644 --- a/resource-manager/securityinsights/2023-02-01/metadata/version.go +++ b/resource-manager/securityinsights/2023-02-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/README.md b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/README.md index 6a4fb1c228a..1c946097728 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/README.md +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings` Documentation -The `securitymlanalyticssettings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `securitymlanalyticssettings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/client.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/client.go index 65b248a41f5..bb7dd6eae34 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/client.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/client.go @@ -15,7 +15,7 @@ type SecurityMLAnalyticsSettingsClient struct { } func NewSecurityMLAnalyticsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityMLAnalyticsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityMLAnalyticsSettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go index 31b3fe0787d..0b8b71149ab 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go @@ -44,7 +44,7 @@ func ParseSecurityMLAnalyticsSettingID(input string) (*SecurityMLAnalyticsSettin } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityMLAnalyticsSettingIDInsensitively(input string) (*SecurityMLAn } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_workspace.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_workspace.go index 07bf58f2dc1..9158938cd5f 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_createorupdate.go index f08267b7fac..76bbda93ad2 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_get.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_get.go index 9be89fdf974..678f1c490cb 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // Get ... @@ -48,11 +48,11 @@ func (c SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, id SecurityM if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_list.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_list.go index 693e699ced1..23097e84286 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/method_list.go @@ -73,7 +73,7 @@ func (c SecurityMLAnalyticsSettingsClient) List(ctx context.Context, id Workspac temp := make([]SecurityMLAnalyticsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSecurityMLAnalyticsSettingImplementation(v) + val, err := UnmarshalSecurityMLAnalyticsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SecurityMLAnalyticsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go index 488f0b735f1..7f60dfacc57 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go @@ -16,11 +16,24 @@ type AnomalySecurityMLAnalyticsSettings struct { Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` // Fields inherited from SecurityMLAnalyticsSetting - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AnomalySecurityMLAnalyticsSettings) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return BaseSecurityMLAnalyticsSettingImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AnomalySecurityMLAnalyticsSettings{} @@ -34,9 +47,10 @@ func (s AnomalySecurityMLAnalyticsSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalySecurityMLAnalyticsSettings: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go index 85a395baf6a..b08aec35208 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecurityMLAnalyticsSetting interface { + SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl +} + +var _ SecurityMLAnalyticsSetting = BaseSecurityMLAnalyticsSettingImpl{} + +type BaseSecurityMLAnalyticsSettingImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s } -// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecurityMLAnalyticsSetting = RawSecurityMLAnalyticsSettingImpl{} + +// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecurityMLAnalyticsSettingImpl struct { - Type string - Values map[string]interface{} + securityMLAnalyticsSetting BaseSecurityMLAnalyticsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { +func (s RawSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s.securityMLAnalyticsSetting +} + +func UnmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityML return out, nil } - out := RawSecurityMLAnalyticsSettingImpl{ - Type: value, - Values: temp, + var parent BaseSecurityMLAnalyticsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityMLAnalyticsSettingImpl: %+v", err) } - return out, nil + + return RawSecurityMLAnalyticsSettingImpl{ + securityMLAnalyticsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/version.go b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/version.go index 19e07bcadab..4c3e505219b 100644 --- a/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/version.go +++ b/resource-manager/securityinsights/2023-02-01/securitymlanalyticssettings/version.go @@ -1,12 +1,10 @@ package securitymlanalyticssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitymlanalyticssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitymlanalyticssettings/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/README.md b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/README.md index b76b587a19c..19932e310f0 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/README.md +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates` Documentation -The `sentinelonboardingstates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `sentinelonboardingstates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/client.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/client.go index 94701ed853a..cfbcc6f5419 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/client.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/client.go @@ -15,7 +15,7 @@ type SentinelOnboardingStatesClient struct { } func NewSentinelOnboardingStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*SentinelOnboardingStatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SentinelOnboardingStatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_onboardingstate.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_onboardingstate.go index a0b15d704d4..18e7013bdba 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_onboardingstate.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_onboardingstate.go @@ -44,7 +44,7 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_workspace.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_workspace.go index 25f0d18c095..b5a31015a23 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_create.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_create.go index be0336fbcee..8049e43d14c 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_create.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_create.go @@ -50,7 +50,6 @@ func (c SentinelOnboardingStatesClient) Create(ctx context.Context, id Onboardin var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_get.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_get.go index e7b2c2cb86b..ff9b62feece 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_get.go @@ -45,7 +45,6 @@ func (c SentinelOnboardingStatesClient) Get(ctx context.Context, id OnboardingSt var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_list.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_list.go index d53893d7842..81a5556ad1e 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_list.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/method_list.go @@ -46,7 +46,6 @@ func (c SentinelOnboardingStatesClient) List(ctx context.Context, id WorkspaceId var model SentinelOnboardingStatesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/version.go b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/version.go index 02be78533a0..4a09151a80d 100644 --- a/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/version.go +++ b/resource-manager/securityinsights/2023-02-01/sentinelonboardingstates/version.go @@ -1,12 +1,10 @@ package sentinelonboardingstates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sentinelonboardingstates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sentinelonboardingstates/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/README.md b/resource-manager/securityinsights/2023-02-01/threatintelligence/README.md index ce9913067d5..566a4b9b635 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/README.md +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/threatintelligence` Documentation -The `threatintelligence` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `threatintelligence` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/client.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/client.go index edf96c3143f..59e58da3228 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/client.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/client.go @@ -15,7 +15,7 @@ type ThreatIntelligenceClient struct { } func NewThreatIntelligenceClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreatIntelligenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "threatintelligence", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "threatintelligence", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ThreatIntelligenceClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/id_indicator.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/id_indicator.go index 73373ce2134..3c473e1919e 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/id_indicator.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/id_indicator.go @@ -44,7 +44,7 @@ func ParseIndicatorID(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIndicatorIDInsensitively(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/id_workspace.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/id_workspace.go index 2265507abcf..d96d7676ab4 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreate.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreate.go index 3cee598931c..af7a84f3880 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreate.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreate.go @@ -15,7 +15,7 @@ import ( type IndicatorCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreate ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreate(ctx context.Context, id Indica if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreateindicator.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreateindicator.go index 0f3ab94c4f5..05059855207 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreateindicator.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorcreateindicator.go @@ -16,7 +16,7 @@ import ( type IndicatorCreateIndicatorOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreateIndicator ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreateIndicator(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorget.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorget.go index 3358363f139..085ea71bf94 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorget.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorget.go @@ -15,7 +15,7 @@ import ( type IndicatorGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorGet ... @@ -48,11 +48,11 @@ func (c ThreatIntelligenceClient) IndicatorGet(ctx context.Context, id Indicator if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatormetricslist.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatormetricslist.go index f692c803e50..e2bea464351 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatormetricslist.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatormetricslist.go @@ -46,7 +46,6 @@ func (c ThreatIntelligenceClient) IndicatorMetricsList(ctx context.Context, id W var model ThreatIntelligenceMetricsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go index 27c6ce2648f..e2fdfa1225c 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorqueryindicators.go @@ -73,7 +73,7 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorreplacetags.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorreplacetags.go index 052bbe7b66a..873faa376b3 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorreplacetags.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorreplacetags.go @@ -16,7 +16,7 @@ import ( type IndicatorReplaceTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorReplaceTags ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorReplaceTags(ctx context.Context, id I if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorslist.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorslist.go index 1757c99fda7..18256ce90e1 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorslist.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/method_indicatorslist.go @@ -42,6 +42,7 @@ func (o IndicatorsListOperationOptions) ToHeaders() *client.Headers { func (o IndicatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,7 @@ func (c ThreatIntelligenceClient) IndicatorsList(ctx context.Context, id Workspa temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceindicatormodel.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceindicatormodel.go index 9ee1b5778ed..3f036f4cadc 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceindicatormodel.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceindicatormodel.go @@ -16,11 +16,24 @@ type ThreatIntelligenceIndicatorModel struct { Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` // Fields inherited from ThreatIntelligenceInformation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ThreatIntelligenceIndicatorModel) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return BaseThreatIntelligenceInformationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ThreatIntelligenceIndicatorModel{} @@ -34,9 +47,10 @@ func (s ThreatIntelligenceIndicatorModel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceIndicatorModel: %+v", err) } + decoded["kind"] = "indicator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformation.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformation.go index d036b649d26..4fc4734df84 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformation.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/model_threatintelligenceinformation.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreatIntelligenceInformation interface { + ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl +} + +var _ ThreatIntelligenceInformation = BaseThreatIntelligenceInformationImpl{} + +type BaseThreatIntelligenceInformationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s } -// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreatIntelligenceInformation = RawThreatIntelligenceInformationImpl{} + +// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreatIntelligenceInformationImpl struct { - Type string - Values map[string]interface{} + threatIntelligenceInformation BaseThreatIntelligenceInformationImpl + Type string + Values map[string]interface{} } -func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { +func (s RawThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s.threatIntelligenceInformation +} + +func UnmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatI return out, nil } - out := RawThreatIntelligenceInformationImpl{ - Type: value, - Values: temp, + var parent BaseThreatIntelligenceInformationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreatIntelligenceInformationImpl: %+v", err) } - return out, nil + + return RawThreatIntelligenceInformationImpl{ + threatIntelligenceInformation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-02-01/threatintelligence/version.go b/resource-manager/securityinsights/2023-02-01/threatintelligence/version.go index 4ee85485036..28ddf5324e8 100644 --- a/resource-manager/securityinsights/2023-02-01/threatintelligence/version.go +++ b/resource-manager/securityinsights/2023-02-01/threatintelligence/version.go @@ -1,12 +1,10 @@ package threatintelligence -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/threatintelligence/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/threatintelligence/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/README.md b/resource-manager/securityinsights/2023-02-01/watchlistitems/README.md index b0157371084..a3ce77c8488 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/README.md +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/watchlistitems` Documentation -The `watchlistitems` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `watchlistitems` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/client.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/client.go index d3193694a48..f5126a4483d 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/client.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/client.go @@ -15,7 +15,7 @@ type WatchlistItemsClient struct { } func NewWatchlistItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlistitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlistitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistItemsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlist.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlist.go index 7df2e8c2562..398316c372f 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlist.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlistitem.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlistitem.go index 95aa9b8f56d..3a971d74b12 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlistitem.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/id_watchlistitem.go @@ -46,7 +46,7 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/method_createorupdate.go index 68142e971a8..1e71da4f4ef 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistItemsClient) CreateOrUpdate(ctx context.Context, id WatchlistIt var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/method_get.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/method_get.go index 1973c679f9e..6f2b74513da 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistItemsClient) Get(ctx context.Context, id WatchlistItemId) (resu var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/watchlistitems/version.go b/resource-manager/securityinsights/2023-02-01/watchlistitems/version.go index 2501551765c..a2583344dd1 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlistitems/version.go +++ b/resource-manager/securityinsights/2023-02-01/watchlistitems/version.go @@ -1,12 +1,10 @@ package watchlistitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlistitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlistitems/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/README.md b/resource-manager/securityinsights/2023-02-01/watchlists/README.md index c4f395d3b51..b573c732d4b 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/README.md +++ b/resource-manager/securityinsights/2023-02-01/watchlists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/watchlists` Documentation -The `watchlists` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). +The `watchlists` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/client.go b/resource-manager/securityinsights/2023-02-01/watchlists/client.go index 45211175054..22f5472a0ad 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/client.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/client.go @@ -15,7 +15,7 @@ type WatchlistsClient struct { } func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/id_watchlist.go b/resource-manager/securityinsights/2023-02-01/watchlists/id_watchlist.go index e5b47b1456e..ac459a108e6 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/id_watchlist.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/id_workspace.go b/resource-manager/securityinsights/2023-02-01/watchlists/id_workspace.go index d8e6bddfee7..6b8f7d79efb 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/id_workspace.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/method_createorupdate.go b/resource-manager/securityinsights/2023-02-01/watchlists/method_createorupdate.go index eb0b4f9396d..219b2a467eb 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, in var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/method_get.go b/resource-manager/securityinsights/2023-02-01/watchlists/method_get.go index 7aac16c3975..2b6dcd7e6da 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/method_get.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistsClient) Get(ctx context.Context, id WatchlistId) (result GetOp var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-02-01/watchlists/version.go b/resource-manager/securityinsights/2023-02-01/watchlists/version.go index 84485728975..a679c25b294 100644 --- a/resource-manager/securityinsights/2023-02-01/watchlists/version.go +++ b/resource-manager/securityinsights/2023-02-01/watchlists/version.go @@ -1,12 +1,10 @@ package watchlists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlists/2023-02-01" } diff --git a/resource-manager/securityinsights/2023-11-01/actions/README.md b/resource-manager/securityinsights/2023-11-01/actions/README.md index 036461f9792..05f4ef7d00c 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/README.md +++ b/resource-manager/securityinsights/2023-11-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/actions/client.go b/resource-manager/securityinsights/2023-11-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/client.go +++ b/resource-manager/securityinsights/2023-11-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/actions/id_action.go b/resource-manager/securityinsights/2023-11-01/actions/id_action.go index aeefc14d3f8..9e28a9229f4 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/id_action.go +++ b/resource-manager/securityinsights/2023-11-01/actions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/actions/id_alertrule.go b/resource-manager/securityinsights/2023-11-01/actions/id_alertrule.go index 731f6439ae3..e92dcf5f421 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/id_alertrule.go +++ b/resource-manager/securityinsights/2023-11-01/actions/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/actions/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/actions/method_createorupdate.go index e84c5bebbd7..739b455eff0 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/actions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ActionsClient) CreateOrUpdate(ctx context.Context, id ActionId, input Ac var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/actions/method_get.go b/resource-manager/securityinsights/2023-11-01/actions/method_get.go index 9d5aad5dc58..38ddf8d93d2 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/actions/method_get.go @@ -45,7 +45,6 @@ func (c ActionsClient) Get(ctx context.Context, id ActionId) (result GetOperatio var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/actions/version.go b/resource-manager/securityinsights/2023-11-01/actions/version.go index ec565e624fe..22ab62edda0 100644 --- a/resource-manager/securityinsights/2023-11-01/actions/version.go +++ b/resource-manager/securityinsights/2023-11-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/README.md b/resource-manager/securityinsights/2023-11-01/alertrules/README.md index fc38a8ea87a..4650644d605 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/README.md +++ b/resource-manager/securityinsights/2023-11-01/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/client.go b/resource-manager/securityinsights/2023-11-01/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/client.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/id_alertrule.go b/resource-manager/securityinsights/2023-11-01/alertrules/id_alertrule.go index 818f124e5ef..941d129e5a3 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/id_alertrule.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/id_workspace.go b/resource-manager/securityinsights/2023-11-01/alertrules/id_workspace.go index 005b7fc90a7..0ae4ab3dfc2 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/alertrules/method_createorupdate.go index f77c7558d09..13548ddf46e 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/method_get.go b/resource-manager/securityinsights/2023-11-01/alertrules/method_get.go index 945c07bfad1..f6b552d75c7 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // Get ... @@ -48,11 +48,11 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/method_list.go b/resource-manager/securityinsights/2023-11-01/alertrules/method_list.go index 191ccd545bb..55fff58c861 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/method_list.go @@ -73,7 +73,7 @@ func (c AlertRulesClient) List(ctx context.Context, id WorkspaceId) (result List temp := make([]AlertRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleImplementation(v) + val, err := UnmarshalAlertRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/model_alertrule.go b/resource-manager/securityinsights/2023-11-01/alertrules/model_alertrule.go index 0a8eb3e2ad3..3b089e227ff 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/model_alertrule.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/model_alertrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRule interface { + AlertRule() BaseAlertRuleImpl +} + +var _ AlertRule = BaseAlertRuleImpl{} + +type BaseAlertRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s } -// RawAlertRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRule = RawAlertRuleImpl{} + +// RawAlertRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleImpl struct { - Type string - Values map[string]interface{} + alertRule BaseAlertRuleImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { +func (s RawAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s.alertRule +} + +func UnmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { if input == nil { return nil, nil } @@ -60,10 +84,15 @@ func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { return out, nil } - out := RawAlertRuleImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleImpl: %+v", err) } - return out, nil + + return RawAlertRuleImpl{ + alertRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/model_fusionalertrule.go b/resource-manager/securityinsights/2023-11-01/alertrules/model_fusionalertrule.go index c4ed17f4319..f9ebd649bd9 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/model_fusionalertrule.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/model_fusionalertrule.go @@ -16,13 +16,26 @@ type FusionAlertRule struct { Properties *FusionAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRule{} func (s FusionAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s FusionAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRule: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go b/resource-manager/securityinsights/2023-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go index 4fa227e3728..ccf5f8899d4 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go @@ -16,13 +16,26 @@ type MicrosoftSecurityIncidentCreationAlertRule struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRule{} func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRule: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/model_scheduledalertrule.go b/resource-manager/securityinsights/2023-11-01/alertrules/model_scheduledalertrule.go index cf91bcec4f2..6dc6c221e54 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/model_scheduledalertrule.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/model_scheduledalertrule.go @@ -16,13 +16,26 @@ type ScheduledAlertRule struct { Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRule{} func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRule: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertrules/version.go b/resource-manager/securityinsights/2023-11-01/alertrules/version.go index 34ffe75e9b4..faaeea7f250 100644 --- a/resource-manager/securityinsights/2023-11-01/alertrules/version.go +++ b/resource-manager/securityinsights/2023-11-01/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/README.md b/resource-manager/securityinsights/2023-11-01/alertruletemplates/README.md index 1398918a188..6b0b2fd9f07 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/README.md +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/alertruletemplates` Documentation -The `alertruletemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `alertruletemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/client.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/client.go index 2932bf14a55..5726cbd8954 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/client.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/client.go @@ -15,7 +15,7 @@ type AlertRuleTemplatesClient struct { } func NewAlertRuleTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruletemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruletemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_alertruletemplate.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_alertruletemplate.go index 6a82de7688f..e294dbc3335 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_alertruletemplate.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_alertruletemplate.go @@ -44,7 +44,7 @@ func ParseAlertRuleTemplateID(input string) (*AlertRuleTemplateId, error) { } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleTemplateIDInsensitively(input string) (*AlertRuleTemplateId, } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_workspace.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_workspace.go index 184371fb5dc..757188dcdde 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_get.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_get.go index 861712be66a..c8efafa0807 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRuleTemplate + Model AlertRuleTemplate } // Get ... @@ -48,11 +48,11 @@ func (c AlertRuleTemplatesClient) Get(ctx context.Context, id AlertRuleTemplateI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleTemplateImplementation(respObj) + model, err := UnmarshalAlertRuleTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_list.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_list.go index 7b8fd97d59e..11a83746296 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/method_list.go @@ -73,7 +73,7 @@ func (c AlertRuleTemplatesClient) List(ctx context.Context, id WorkspaceId) (res temp := make([]AlertRuleTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleTemplateImplementation(v) + val, err := UnmarshalAlertRuleTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRuleTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_alertruletemplate.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_alertruletemplate.go index 6000fbb4b2c..0f3bb1bd9cf 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_alertruletemplate.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_alertruletemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRuleTemplate interface { + AlertRuleTemplate() BaseAlertRuleTemplateImpl +} + +var _ AlertRuleTemplate = BaseAlertRuleTemplateImpl{} + +type BaseAlertRuleTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s } -// RawAlertRuleTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRuleTemplate = RawAlertRuleTemplateImpl{} + +// RawAlertRuleTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleTemplateImpl struct { - Type string - Values map[string]interface{} + alertRuleTemplate BaseAlertRuleTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { +func (s RawAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s.alertRuleTemplate +} + +func UnmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, return out, nil } - out := RawAlertRuleTemplateImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleTemplateImpl: %+v", err) } - return out, nil + + return RawAlertRuleTemplateImpl{ + alertRuleTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_fusionalertruletemplate.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_fusionalertruletemplate.go index c2b4d8c3077..ea4edef0f1e 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_fusionalertruletemplate.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_fusionalertruletemplate.go @@ -16,12 +16,24 @@ type FusionAlertRuleTemplate struct { Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRuleTemplate{} func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go index 515a47767b2..c526da831d8 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go @@ -16,12 +16,24 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRuleTemplate{} func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_scheduledalertruletemplate.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_scheduledalertruletemplate.go index c3428ada14d..bb44ecf53bb 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_scheduledalertruletemplate.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/model_scheduledalertruletemplate.go @@ -16,12 +16,24 @@ type ScheduledAlertRuleTemplate struct { Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRuleTemplate{} func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/alertruletemplates/version.go b/resource-manager/securityinsights/2023-11-01/alertruletemplates/version.go index 5bb37c848dd..dde00de0451 100644 --- a/resource-manager/securityinsights/2023-11-01/alertruletemplates/version.go +++ b/resource-manager/securityinsights/2023-11-01/alertruletemplates/version.go @@ -1,12 +1,10 @@ package alertruletemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruletemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruletemplates/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/README.md b/resource-manager/securityinsights/2023-11-01/automationrules/README.md index 8de1910edf8..53c4acc03ff 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/README.md +++ b/resource-manager/securityinsights/2023-11-01/automationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/automationrules` Documentation -The `automationrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `automationrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/client.go b/resource-manager/securityinsights/2023-11-01/automationrules/client.go index 18fafea1496..75f33724768 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/client.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/client.go @@ -15,7 +15,7 @@ type AutomationRulesClient struct { } func NewAutomationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/id_automationrule.go b/resource-manager/securityinsights/2023-11-01/automationrules/id_automationrule.go index 00c7db776a3..8c99ce6f94c 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/id_automationrule.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/id_automationrule.go @@ -44,7 +44,7 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/id_workspace.go b/resource-manager/securityinsights/2023-11-01/automationrules/id_workspace.go index 72d00c87771..719da4c9ff6 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/automationrules/method_createorupdate.go index 6ab8b05e0fb..9f70d87aab4 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationRulesClient) CreateOrUpdate(ctx context.Context, id Automation var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/method_delete.go b/resource-manager/securityinsights/2023-11-01/automationrules/method_delete.go index c32a7e886ad..5915b112d22 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/method_delete.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/method_delete.go @@ -46,7 +46,6 @@ func (c AutomationRulesClient) Delete(ctx context.Context, id AutomationRuleId) var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/method_get.go b/resource-manager/securityinsights/2023-11-01/automationrules/method_get.go index b5c7ce72e30..e180fc005e4 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/method_get.go @@ -45,7 +45,6 @@ func (c AutomationRulesClient) Get(ctx context.Context, id AutomationRuleId) (re var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleaction.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleaction.go index 77887bb8adf..eebf2db629d 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleaction.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleaction.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleAction interface { + AutomationRuleAction() BaseAutomationRuleActionImpl } -// RawAutomationRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleAction = BaseAutomationRuleActionImpl{} + +type BaseAutomationRuleActionImpl struct { + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s BaseAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s +} + +var _ AutomationRuleAction = RawAutomationRuleActionImpl{} + +// RawAutomationRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleActionImpl struct { - Type string - Values map[string]interface{} + automationRuleAction BaseAutomationRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s.automationRuleAction } -func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { +func UnmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAc return out, nil } - out := RawAutomationRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleActionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleActionImpl{ + automationRuleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulecondition.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulecondition.go index 81938bfb589..ef0081a537e 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulecondition.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulecondition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleCondition interface { + AutomationRuleCondition() BaseAutomationRuleConditionImpl } -// RawAutomationRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleCondition = BaseAutomationRuleConditionImpl{} + +type BaseAutomationRuleConditionImpl struct { + ConditionType ConditionType `json:"conditionType"` +} + +func (s BaseAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s +} + +var _ AutomationRuleCondition = RawAutomationRuleConditionImpl{} + +// RawAutomationRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleConditionImpl struct { - Type string - Values map[string]interface{} + automationRuleCondition BaseAutomationRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s.automationRuleCondition } -func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { +func UnmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRul return out, nil } - out := RawAutomationRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleConditionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleConditionImpl{ + automationRuleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulemodifypropertiesaction.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulemodifypropertiesaction.go index 98eb39b6a9b..59b10e5bc34 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulemodifypropertiesaction.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulemodifypropertiesaction.go @@ -14,7 +14,16 @@ type AutomationRuleModifyPropertiesAction struct { ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleModifyPropertiesAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleModifyPropertiesAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleModifyPropertiesAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleModifyPropertiesAction: %+v", err) } + decoded["actionType"] = "ModifyProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleproperties.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleproperties.go index 5460f9b5fba..4499996f6a2 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleproperties.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruleproperties.go @@ -76,7 +76,7 @@ func (s *AutomationRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleActionImplementation(val) + impl, err := UnmarshalAutomationRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationRuleProperties': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulerunplaybookaction.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulerunplaybookaction.go index c3e139aacf7..eba12a31777 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulerunplaybookaction.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationrulerunplaybookaction.go @@ -14,7 +14,16 @@ type AutomationRuleRunPlaybookAction struct { ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleRunPlaybookAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleRunPlaybookAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleRunPlaybookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleRunPlaybookAction: %+v", err) } + decoded["actionType"] = "RunPlaybook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruletriggeringlogic.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruletriggeringlogic.go index 2f4592c4269..0fac09e2443 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruletriggeringlogic.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_automationruletriggeringlogic.go @@ -58,7 +58,7 @@ func (s *AutomationRuleTriggeringLogic) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'AutomationRuleTriggeringLogic': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyarraychangedconditionproperties.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyarraychangedconditionproperties.go index 9abf0187ac4..07c0eb5acce 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyarraychangedconditionproperties.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyarraychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArrayChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertychangedconditionproperties.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertychangedconditionproperties.go index b72736f49a2..960f23ee56e 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertychangedconditionproperties.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyconditionproperties.go b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyconditionproperties.go index 6e77d74c58c..92672dc4e8c 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyconditionproperties.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/model_propertyconditionproperties.go @@ -14,6 +14,14 @@ type PropertyConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyConditionProperties: %+v", err) } + decoded["conditionType"] = "Property" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/automationrules/version.go b/resource-manager/securityinsights/2023-11-01/automationrules/version.go index f1f7aba37e4..d464546e80e 100644 --- a/resource-manager/securityinsights/2023-11-01/automationrules/version.go +++ b/resource-manager/securityinsights/2023-11-01/automationrules/version.go @@ -1,12 +1,10 @@ package automationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationrules/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/README.md b/resource-manager/securityinsights/2023-11-01/bookmarks/README.md index dae6a539cb6..d0951b86f8a 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/README.md +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/bookmarks` Documentation -The `bookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `bookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/client.go b/resource-manager/securityinsights/2023-11-01/bookmarks/client.go index 22469155649..4a7e564bcaf 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/client.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/client.go @@ -15,7 +15,7 @@ type BookmarksClient struct { } func NewBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/id_bookmark.go b/resource-manager/securityinsights/2023-11-01/bookmarks/id_bookmark.go index 5317bd28514..97039a3361a 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/id_bookmark.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/id_workspace.go b/resource-manager/securityinsights/2023-11-01/bookmarks/id_workspace.go index 96d5c1221cf..7f2924971ec 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/bookmarks/method_createorupdate.go index 2e61ab3ee74..9d2c71d828b 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, inpu var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/method_get.go b/resource-manager/securityinsights/2023-11-01/bookmarks/method_get.go index 36c8d7fcc43..ec1d9306eec 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/method_get.go @@ -45,7 +45,6 @@ func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOper var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/bookmarks/version.go b/resource-manager/securityinsights/2023-11-01/bookmarks/version.go index 64b13c9cb62..221217e67b9 100644 --- a/resource-manager/securityinsights/2023-11-01/bookmarks/version.go +++ b/resource-manager/securityinsights/2023-11-01/bookmarks/version.go @@ -1,12 +1,10 @@ package bookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarks/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/README.md b/resource-manager/securityinsights/2023-11-01/contentpackages/README.md index 4e2db182f96..01ed61efe19 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/README.md +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contentpackages` Documentation -The `contentpackages` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `contentpackages` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/client.go b/resource-manager/securityinsights/2023-11-01/contentpackages/client.go index 50bba58e93a..b9686fcbc74 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/client.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/client.go @@ -15,7 +15,7 @@ type ContentPackagesClient struct { } func NewContentPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentPackagesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/id_contentpackage.go b/resource-manager/securityinsights/2023-11-01/contentpackages/id_contentpackage.go index a56a8fbaab5..0054dc7959e 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/id_contentpackage.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/id_contentpackage.go @@ -44,7 +44,7 @@ func ParseContentPackageID(input string) (*ContentPackageId, error) { } id := ContentPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentPackageIDInsensitively(input string) (*ContentPackageId, error) } id := ContentPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/id_workspace.go b/resource-manager/securityinsights/2023-11-01/contentpackages/id_workspace.go index 193b22a051a..8a071e1bf90 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/method_contentpackageinstall.go b/resource-manager/securityinsights/2023-11-01/contentpackages/method_contentpackageinstall.go index 433bf1bcf33..e01d04aaa13 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/method_contentpackageinstall.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/method_contentpackageinstall.go @@ -50,7 +50,6 @@ func (c ContentPackagesClient) ContentPackageInstall(ctx context.Context, id Con var model PackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/method_get.go b/resource-manager/securityinsights/2023-11-01/contentpackages/method_get.go index 5f05a99cf4c..22be4c1d4c1 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/method_get.go @@ -45,7 +45,6 @@ func (c ContentPackagesClient) Get(ctx context.Context, id ContentPackageId) (re var model PackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/method_list.go b/resource-manager/securityinsights/2023-11-01/contentpackages/method_list.go index e576e2a8e86..c3b2c784a7b 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/contentpackages/version.go b/resource-manager/securityinsights/2023-11-01/contentpackages/version.go index 6798dc34725..02635696505 100644 --- a/resource-manager/securityinsights/2023-11-01/contentpackages/version.go +++ b/resource-manager/securityinsights/2023-11-01/contentpackages/version.go @@ -1,12 +1,10 @@ package contentpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentpackages/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/README.md b/resource-manager/securityinsights/2023-11-01/contentproductpackages/README.md index ad38871f4c2..1a03090095f 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/README.md +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contentproductpackages` Documentation -The `contentproductpackages` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `contentproductpackages` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/client.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/client.go index b8bf58ba78d..fcf0e811b5a 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/client.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/client.go @@ -15,7 +15,7 @@ type ContentProductPackagesClient struct { } func NewContentProductPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentProductPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentproductpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentproductpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentProductPackagesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_contentproductpackage.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_contentproductpackage.go index 6e1f084e79c..5494d05234e 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_contentproductpackage.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_contentproductpackage.go @@ -44,7 +44,7 @@ func ParseContentProductPackageID(input string) (*ContentProductPackageId, error } id := ContentProductPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentProductPackageIDInsensitively(input string) (*ContentProductPac } id := ContentProductPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_workspace.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_workspace.go index d22e27d14c6..0606b86fa26 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageget.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageget.go index b21b0045e8d..2dda33465ef 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageget.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageget.go @@ -45,7 +45,6 @@ func (c ContentProductPackagesClient) ProductPackageGet(ctx context.Context, id var model ProductPackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageslist.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageslist.go index 12065b3e3f5..90a7faa83bb 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageslist.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/method_productpackageslist.go @@ -41,6 +41,7 @@ func (o ProductPackagesListOperationOptions) ToHeaders() *client.Headers { func (o ProductPackagesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/contentproductpackages/version.go b/resource-manager/securityinsights/2023-11-01/contentproductpackages/version.go index 490eeda35b0..5c442cf2961 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproductpackages/version.go +++ b/resource-manager/securityinsights/2023-11-01/contentproductpackages/version.go @@ -1,12 +1,10 @@ package contentproductpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentproductpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentproductpackages/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/README.md b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/README.md index 43ea9f1d966..5a9449a6ede 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/README.md +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contentproducttemplates` Documentation -The `contentproducttemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `contentproducttemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/client.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/client.go index 26a626b34ce..e15b875b673 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/client.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/client.go @@ -15,7 +15,7 @@ type ContentProductTemplatesClient struct { } func NewContentProductTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentProductTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentproducttemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentproducttemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentProductTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_contentproducttemplate.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_contentproducttemplate.go index ea635cb2a5b..aa27e83fa09 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_contentproducttemplate.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_contentproducttemplate.go @@ -44,7 +44,7 @@ func ParseContentProductTemplateID(input string) (*ContentProductTemplateId, err } id := ContentProductTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentProductTemplateIDInsensitively(input string) (*ContentProductTe } id := ContentProductTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_workspace.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_workspace.go index a820aa94457..e9ab1ead241 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateget.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateget.go index 53700d70476..c3c2a4ea6b4 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateget.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateget.go @@ -45,7 +45,6 @@ func (c ContentProductTemplatesClient) ProductTemplateGet(ctx context.Context, i var model ProductTemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateslist.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateslist.go index cd0b411dec2..51beb22cc8a 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateslist.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/method_producttemplateslist.go @@ -44,6 +44,7 @@ func (o ProductTemplatesListOperationOptions) ToHeaders() *client.Headers { func (o ProductTemplatesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/version.go b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/version.go index 6bcbabd1467..cdaf8c3f994 100644 --- a/resource-manager/securityinsights/2023-11-01/contentproducttemplates/version.go +++ b/resource-manager/securityinsights/2023-11-01/contentproducttemplates/version.go @@ -1,12 +1,10 @@ package contentproducttemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentproducttemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentproducttemplates/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/README.md b/resource-manager/securityinsights/2023-11-01/contenttemplates/README.md index d11d1b4a47e..22753a084f2 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/README.md +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contenttemplates` Documentation -The `contenttemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `contenttemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/client.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/client.go index fde41e740cd..246b1514717 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/client.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/client.go @@ -15,7 +15,7 @@ type ContentTemplatesClient struct { } func NewContentTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/id_contenttemplate.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/id_contenttemplate.go index 23e6f77c91a..c8904ffc78b 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/id_contenttemplate.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/id_contenttemplate.go @@ -44,7 +44,7 @@ func ParseContentTemplateID(input string) (*ContentTemplateId, error) { } id := ContentTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTemplateIDInsensitively(input string) (*ContentTemplateId, erro } id := ContentTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/id_workspace.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/id_workspace.go index 0f18d483664..10892ceb906 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateget.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateget.go index 6c8365fa57b..39754dbb6a4 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateget.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateget.go @@ -45,7 +45,6 @@ func (c ContentTemplatesClient) ContentTemplateGet(ctx context.Context, id Conte var model TemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateinstall.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateinstall.go index 8479804c9e7..97ab8dcb520 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateinstall.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_contenttemplateinstall.go @@ -50,7 +50,6 @@ func (c ContentTemplatesClient) ContentTemplateInstall(ctx context.Context, id C var model TemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_list.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_list.go index 14844429fe6..274404e744d 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/contenttemplates/version.go b/resource-manager/securityinsights/2023-11-01/contenttemplates/version.go index 1c1874406ff..96e8928c970 100644 --- a/resource-manager/securityinsights/2023-11-01/contenttemplates/version.go +++ b/resource-manager/securityinsights/2023-11-01/contenttemplates/version.go @@ -1,12 +1,10 @@ package contenttemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttemplates/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/README.md b/resource-manager/securityinsights/2023-11-01/dataconnectors/README.md index 2bce6e17a38..7269a8b4c69 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/README.md +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/dataconnectors` Documentation -The `dataconnectors` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `dataconnectors` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/client.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/client.go index 8ed0120c79a..0a9e9bbb924 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/client.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/client.go @@ -15,7 +15,7 @@ type DataConnectorsClient struct { } func NewDataConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/id_dataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/id_dataconnector.go index b55667aa923..c6cc24bc274 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/id_dataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/id_workspace.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/id_workspace.go index 60237fcce07..64796e96412 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_createorupdate.go index c5f6e5d1503..111c7e46a6c 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c DataConnectorsClient) CreateOrUpdate(ctx context.Context, id DataConnect if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_get.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_get.go index 3511ba85477..5b79c298c01 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectorsClient) Get(ctx context.Context, id DataConnectorId) (resu if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_list.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_list.go index b000eaba869..2b4d19a4d0f 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/method_list.go @@ -73,7 +73,7 @@ func (c DataConnectorsClient) List(ctx context.Context, id WorkspaceId) (result temp := make([]DataConnector, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataConnectorImplementation(v) + val, err := UnmarshalDataConnectorImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataConnector (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aaddataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aaddataconnector.go index dd0ca1af664..141187a8802 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aaddataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aaddataconnector.go @@ -16,13 +16,26 @@ type AADDataConnector struct { Properties *AADDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AADDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AADDataConnector{} func (s AADDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AADDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADDataConnector: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aatpdataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aatpdataconnector.go index e1cd013bbd7..798b7a40456 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aatpdataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_aatpdataconnector.go @@ -16,13 +16,26 @@ type AATPDataConnector struct { Properties *AATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AATPDataConnector{} func (s AATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPDataConnector: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_ascdataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_ascdataconnector.go index 3af09c2ff8b..dcc8457279a 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_ascdataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_ascdataconnector.go @@ -16,13 +16,26 @@ type ASCDataConnector struct { Properties *ASCDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ASCDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ASCDataConnector{} func (s ASCDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ASCDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCDataConnector: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_awscloudtraildataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_awscloudtraildataconnector.go index b0ef7fdd285..42a1639082a 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_awscloudtraildataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_awscloudtraildataconnector.go @@ -16,13 +16,26 @@ type AwsCloudTrailDataConnector struct { Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsCloudTrailDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsCloudTrailDataConnector{} func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailDataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_dataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_dataconnector.go index 66368d66fb7..70a7f42baaa 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_dataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_dataconnector.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnector interface { + DataConnector() BaseDataConnectorImpl +} + +var _ DataConnector = BaseDataConnectorImpl{} + +type BaseDataConnectorImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s } -// RawDataConnectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnector = RawDataConnectorImpl{} + +// RawDataConnectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorImpl struct { - Type string - Values map[string]interface{} + dataConnector BaseDataConnectorImpl + Type string + Values map[string]interface{} } -func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { +func (s RawDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s.dataConnector +} + +func UnmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { if input == nil { return nil, nil } @@ -100,10 +124,15 @@ func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { return out, nil } - out := RawDataConnectorImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorImpl: %+v", err) } - return out, nil + + return RawDataConnectorImpl{ + dataConnector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mcasdataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mcasdataconnector.go index 6a0c9aebea0..efa33558eaf 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mcasdataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mcasdataconnector.go @@ -16,13 +16,26 @@ type MCASDataConnector struct { Properties *MCASDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MCASDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MCASDataConnector{} func (s MCASDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MCASDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mdatpdataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mdatpdataconnector.go index 1a6bcbcb7bf..02c3188f668 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mdatpdataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_mdatpdataconnector.go @@ -16,13 +16,26 @@ type MDATPDataConnector struct { Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MDATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MDATPDataConnector{} func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_officedataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_officedataconnector.go index 25b5a25e44d..4b2bee1390e 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_officedataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_officedataconnector.go @@ -16,13 +16,26 @@ type OfficeDataConnector struct { Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeDataConnector{} func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeDataConnector: %+v", err) } + decoded["kind"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_tidataconnector.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_tidataconnector.go index 208513ef9aa..c1a8de64c5f 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/model_tidataconnector.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/model_tidataconnector.go @@ -16,13 +16,26 @@ type TIDataConnector struct { Properties *TIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TIDataConnector{} func (s TIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TIDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/dataconnectors/version.go b/resource-manager/securityinsights/2023-11-01/dataconnectors/version.go index 5613c94e8e2..4a2af8ea8ca 100644 --- a/resource-manager/securityinsights/2023-11-01/dataconnectors/version.go +++ b/resource-manager/securityinsights/2023-11-01/dataconnectors/version.go @@ -1,12 +1,10 @@ package dataconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectors/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/README.md b/resource-manager/securityinsights/2023-11-01/incidentalerts/README.md index f6cb8d2c16c..1304b7b5ce5 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentalerts` Documentation -The `incidentalerts` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidentalerts` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/client.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/client.go index 53dc2b4cd4e..eb74a60490e 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/client.go @@ -15,7 +15,7 @@ type IncidentAlertsClient struct { } func NewIncidentAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentAlertsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/id_incident.go index 6145c7882c4..29e38698c28 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/method_incidentslistalerts.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/method_incidentslistalerts.go index a6b61790e56..62e926363cb 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/method_incidentslistalerts.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/method_incidentslistalerts.go @@ -46,7 +46,6 @@ func (c IncidentAlertsClient) IncidentsListAlerts(ctx context.Context, id Incide var model IncidentAlertList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_entity.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_entity.go index 8a6c7ffef8e..6276e2fe91a 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_entity.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_huntingbookmark.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_huntingbookmark.go index 827ded08f6d..4bc98105f79 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_securityalert.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_securityalert.go index 3935326a1d2..bf6de905783 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/model_securityalert.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidentalerts/version.go b/resource-manager/securityinsights/2023-11-01/incidentalerts/version.go index f5e36b65e01..596cd3623f6 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentalerts/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidentalerts/version.go @@ -1,12 +1,10 @@ package incidentalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentalerts/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/README.md b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/README.md index eb71643ce10..794e1a508b3 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentbookmarks` Documentation -The `incidentbookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidentbookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/client.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/client.go index e6a60ede52d..8207d4048bc 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/client.go @@ -15,7 +15,7 @@ type IncidentBookmarksClient struct { } func NewIncidentBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentBookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentbookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentbookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentBookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/id_incident.go index f2bd006b056..7de4edf33f9 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/method_incidentslistbookmarks.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/method_incidentslistbookmarks.go index ea658d25e66..f067fc2e94e 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/method_incidentslistbookmarks.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/method_incidentslistbookmarks.go @@ -46,7 +46,6 @@ func (c IncidentBookmarksClient) IncidentsListBookmarks(ctx context.Context, id var model IncidentBookmarkList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_entity.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_entity.go index ac882c04383..dac6295bd01 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_entity.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_huntingbookmark.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_huntingbookmark.go index 1e9bfbf488f..10730d12eaa 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_securityalert.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_securityalert.go index a86152f3c69..0ffa9096236 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_securityalert.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/version.go b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/version.go index d544efd6138..15e95ba2822 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentbookmarks/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidentbookmarks/version.go @@ -1,12 +1,10 @@ package incidentbookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentbookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentbookmarks/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/README.md b/resource-manager/securityinsights/2023-11-01/incidentcomments/README.md index 1764f96f7c1..133e6ef6b14 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentcomments` Documentation -The `incidentcomments` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidentcomments` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/client.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/client.go index 981e6f75216..a31f83a2df1 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/client.go @@ -15,7 +15,7 @@ type IncidentCommentsClient struct { } func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentcomments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentcomments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentCommentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/id_comment.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/id_comment.go index 1c431622bbe..7493d91020f 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/id_comment.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/id_comment.go @@ -46,7 +46,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/id_incident.go index 94bb1fcdd3c..eafc62fd68d 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_createorupdate.go index 6ea7a1ed4dc..a4e39abbb71 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_get.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_get.go index 1942042dbea..f89f94e9882 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_get.go @@ -45,7 +45,6 @@ func (c IncidentCommentsClient) Get(ctx context.Context, id CommentId) (result G var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_list.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_list.go index d7901e9ffbe..86596f39c17 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/incidentcomments/version.go b/resource-manager/securityinsights/2023-11-01/incidentcomments/version.go index c0d670f5d22..b4a37e6c002 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentcomments/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidentcomments/version.go @@ -1,12 +1,10 @@ package incidentcomments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentcomments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentcomments/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/README.md b/resource-manager/securityinsights/2023-11-01/incidententities/README.md index f50799d63fb..20fe47110e2 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidententities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidententities` Documentation -The `incidententities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidententities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/client.go b/resource-manager/securityinsights/2023-11-01/incidententities/client.go index 740e7b81755..43ea52910a4 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/client.go @@ -15,7 +15,7 @@ type IncidentEntitiesClient struct { } func NewIncidentEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentEntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidententities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidententities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentEntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidententities/id_incident.go index c5a5ad1f7ba..b4cde49714f 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/method_incidentslistentities.go b/resource-manager/securityinsights/2023-11-01/incidententities/method_incidentslistentities.go index 2723b2f44a9..89451a71065 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/method_incidentslistentities.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/method_incidentslistentities.go @@ -46,7 +46,6 @@ func (c IncidentEntitiesClient) IncidentsListEntities(ctx context.Context, id In var model IncidentEntitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/model_entity.go b/resource-manager/securityinsights/2023-11-01/incidententities/model_entity.go index 43a9a64c0bf..78b4d77ecf7 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/model_entity.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/model_huntingbookmark.go b/resource-manager/securityinsights/2023-11-01/incidententities/model_huntingbookmark.go index f001f6b783a..7c44dc5ae38 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/model_incidententitiesresponse.go b/resource-manager/securityinsights/2023-11-01/incidententities/model_incidententitiesresponse.go index ab896895768..1ff0045f9ff 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/model_incidententitiesresponse.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/model_incidententitiesresponse.go @@ -37,7 +37,7 @@ func (s *IncidentEntitiesResponse) UnmarshalJSON(bytes []byte) error { output := make([]Entity, 0) for i, val := range listTemp { - impl, err := unmarshalEntityImplementation(val) + impl, err := UnmarshalEntityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Entities' for 'IncidentEntitiesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/model_securityalert.go b/resource-manager/securityinsights/2023-11-01/incidententities/model_securityalert.go index 9d570306524..77f4d3ce1d7 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/model_securityalert.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/incidententities/version.go b/resource-manager/securityinsights/2023-11-01/incidententities/version.go index e3adbc55dd0..e397bd74ac0 100644 --- a/resource-manager/securityinsights/2023-11-01/incidententities/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidententities/version.go @@ -1,12 +1,10 @@ package incidententities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidententities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidententities/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/README.md b/resource-manager/securityinsights/2023-11-01/incidentrelations/README.md index f30f228def9..5758cd9b785 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentrelations` Documentation -The `incidentrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidentrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/client.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/client.go index 4e8fbfeb71d..e3e4d587b2a 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/client.go @@ -15,7 +15,7 @@ type IncidentRelationsClient struct { } func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/id_incident.go index 5fd6ef03d73..f50d1d3ad21 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/id_relation.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/id_relation.go index e268009b90c..a8d5c47a374 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/id_relation.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/id_relation.go @@ -46,7 +46,7 @@ func ParseRelationID(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelationIDInsensitively(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_createorupdate.go index 30fcaa14a14..a7bd11f7093 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentRelationsClient) CreateOrUpdate(ctx context.Context, id Relation var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_get.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_get.go index 70bd3924ffc..2633653c6c3 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_get.go @@ -45,7 +45,6 @@ func (c IncidentRelationsClient) Get(ctx context.Context, id RelationId) (result var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_list.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_list.go index 9605942dce1..956f692f05b 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/incidentrelations/version.go b/resource-manager/securityinsights/2023-11-01/incidentrelations/version.go index 605eaf62d86..2cd313a34e5 100644 --- a/resource-manager/securityinsights/2023-11-01/incidentrelations/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidentrelations/version.go @@ -1,12 +1,10 @@ package incidentrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentrelations/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/README.md b/resource-manager/securityinsights/2023-11-01/incidents/README.md index b06b66c9957..830e7093ebd 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/README.md +++ b/resource-manager/securityinsights/2023-11-01/incidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidents` Documentation -The `incidents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `incidents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/incidents/client.go b/resource-manager/securityinsights/2023-11-01/incidents/client.go index aaf38071c39..5936eb290c5 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/client.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/client.go @@ -15,7 +15,7 @@ type IncidentsClient struct { } func NewIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/id_incident.go b/resource-manager/securityinsights/2023-11-01/incidents/id_incident.go index d2a0fefd3dd..c79ff71335f 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/id_incident.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/id_workspace.go b/resource-manager/securityinsights/2023-11-01/incidents/id_workspace.go index 9667e33b904..ceec20de097 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/incidents/method_createorupdate.go index fc09e8a1cba..0a23b31f8bb 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentsClient) CreateOrUpdate(ctx context.Context, id IncidentId, inpu var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/method_get.go b/resource-manager/securityinsights/2023-11-01/incidents/method_get.go index c67e0bb22b8..ab5dc27a5e6 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/method_get.go @@ -45,7 +45,6 @@ func (c IncidentsClient) Get(ctx context.Context, id IncidentId) (result GetOper var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/method_list.go b/resource-manager/securityinsights/2023-11-01/incidents/method_list.go index be48080a496..0a1ec15b8d8 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/incidents/version.go b/resource-manager/securityinsights/2023-11-01/incidents/version.go index d738fb2aef9..1120517b383 100644 --- a/resource-manager/securityinsights/2023-11-01/incidents/version.go +++ b/resource-manager/securityinsights/2023-11-01/incidents/version.go @@ -1,12 +1,10 @@ package incidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidents/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/README.md b/resource-manager/securityinsights/2023-11-01/metadata/README.md index 8db974ba21f..e7051347ba6 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/README.md +++ b/resource-manager/securityinsights/2023-11-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/metadata/client.go b/resource-manager/securityinsights/2023-11-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/client.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/id_metadata.go b/resource-manager/securityinsights/2023-11-01/metadata/id_metadata.go index 5d97d463191..f117ec19858 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/id_metadata.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/id_metadata.go @@ -44,7 +44,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/id_workspace.go b/resource-manager/securityinsights/2023-11-01/metadata/id_workspace.go index 6248b4d13cc..ed12f8f45bb 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/method_create.go b/resource-manager/securityinsights/2023-11-01/metadata/method_create.go index fd4a74a030a..72fc34ee83b 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/method_create.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/method_create.go @@ -50,7 +50,6 @@ func (c MetadataClient) Create(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/method_get.go b/resource-manager/securityinsights/2023-11-01/metadata/method_get.go index 68228f0b583..6e0fd8a6701 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/method_get.go @@ -45,7 +45,6 @@ func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOpera var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/method_list.go b/resource-manager/securityinsights/2023-11-01/metadata/method_list.go index 398be67d7f3..d02ed234668 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/method_update.go b/resource-manager/securityinsights/2023-11-01/metadata/method_update.go index e6911fcbc1d..3b55664e813 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/method_update.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/method_update.go @@ -49,7 +49,6 @@ func (c MetadataClient) Update(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/metadata/version.go b/resource-manager/securityinsights/2023-11-01/metadata/version.go index fae5228cc07..cac78ca2141 100644 --- a/resource-manager/securityinsights/2023-11-01/metadata/version.go +++ b/resource-manager/securityinsights/2023-11-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/repositories/README.md b/resource-manager/securityinsights/2023-11-01/repositories/README.md index 7a8d976881c..88468afe491 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/README.md +++ b/resource-manager/securityinsights/2023-11-01/repositories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/repositories` Documentation -The `repositories` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `repositories` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/repositories/client.go b/resource-manager/securityinsights/2023-11-01/repositories/client.go index 62b7be88387..47f8a158fd0 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/client.go +++ b/resource-manager/securityinsights/2023-11-01/repositories/client.go @@ -15,7 +15,7 @@ type RepositoriesClient struct { } func NewRepositoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RepositoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "repositories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "repositories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RepositoriesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/repositories/id_workspace.go b/resource-manager/securityinsights/2023-11-01/repositories/id_workspace.go index d7e4ec6c5c6..27d7ac3cb13 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/repositories/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/repositories/version.go b/resource-manager/securityinsights/2023-11-01/repositories/version.go index 267c1231366..a7d57e28825 100644 --- a/resource-manager/securityinsights/2023-11-01/repositories/version.go +++ b/resource-manager/securityinsights/2023-11-01/repositories/version.go @@ -1,12 +1,10 @@ package repositories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/repositories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/repositories/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/README.md b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/README.md index 9abbe073a9a..72a43b65ed9 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/README.md +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings` Documentation -The `securitymlanalyticssettings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `securitymlanalyticssettings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/client.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/client.go index 65b248a41f5..bb7dd6eae34 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/client.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/client.go @@ -15,7 +15,7 @@ type SecurityMLAnalyticsSettingsClient struct { } func NewSecurityMLAnalyticsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityMLAnalyticsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityMLAnalyticsSettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go index 31b3fe0787d..0b8b71149ab 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go @@ -44,7 +44,7 @@ func ParseSecurityMLAnalyticsSettingID(input string) (*SecurityMLAnalyticsSettin } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityMLAnalyticsSettingIDInsensitively(input string) (*SecurityMLAn } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_workspace.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_workspace.go index 07bf58f2dc1..9158938cd5f 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_createorupdate.go index f08267b7fac..76bbda93ad2 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_get.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_get.go index 9be89fdf974..678f1c490cb 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // Get ... @@ -48,11 +48,11 @@ func (c SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, id SecurityM if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_list.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_list.go index 693e699ced1..23097e84286 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/method_list.go @@ -73,7 +73,7 @@ func (c SecurityMLAnalyticsSettingsClient) List(ctx context.Context, id Workspac temp := make([]SecurityMLAnalyticsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSecurityMLAnalyticsSettingImplementation(v) + val, err := UnmarshalSecurityMLAnalyticsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SecurityMLAnalyticsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go index 488f0b735f1..7f60dfacc57 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go @@ -16,11 +16,24 @@ type AnomalySecurityMLAnalyticsSettings struct { Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` // Fields inherited from SecurityMLAnalyticsSetting - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AnomalySecurityMLAnalyticsSettings) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return BaseSecurityMLAnalyticsSettingImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AnomalySecurityMLAnalyticsSettings{} @@ -34,9 +47,10 @@ func (s AnomalySecurityMLAnalyticsSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalySecurityMLAnalyticsSettings: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go index 85a395baf6a..b08aec35208 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecurityMLAnalyticsSetting interface { + SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl +} + +var _ SecurityMLAnalyticsSetting = BaseSecurityMLAnalyticsSettingImpl{} + +type BaseSecurityMLAnalyticsSettingImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s } -// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecurityMLAnalyticsSetting = RawSecurityMLAnalyticsSettingImpl{} + +// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecurityMLAnalyticsSettingImpl struct { - Type string - Values map[string]interface{} + securityMLAnalyticsSetting BaseSecurityMLAnalyticsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { +func (s RawSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s.securityMLAnalyticsSetting +} + +func UnmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityML return out, nil } - out := RawSecurityMLAnalyticsSettingImpl{ - Type: value, - Values: temp, + var parent BaseSecurityMLAnalyticsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityMLAnalyticsSettingImpl: %+v", err) } - return out, nil + + return RawSecurityMLAnalyticsSettingImpl{ + securityMLAnalyticsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/version.go b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/version.go index 5b70e735749..d99c202c22d 100644 --- a/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/version.go +++ b/resource-manager/securityinsights/2023-11-01/securitymlanalyticssettings/version.go @@ -1,12 +1,10 @@ package securitymlanalyticssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitymlanalyticssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitymlanalyticssettings/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/README.md b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/README.md index 4774e849077..9732d1536e6 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/README.md +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates` Documentation -The `sentinelonboardingstates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `sentinelonboardingstates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/client.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/client.go index 94701ed853a..cfbcc6f5419 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/client.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/client.go @@ -15,7 +15,7 @@ type SentinelOnboardingStatesClient struct { } func NewSentinelOnboardingStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*SentinelOnboardingStatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SentinelOnboardingStatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_onboardingstate.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_onboardingstate.go index a0b15d704d4..18e7013bdba 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_onboardingstate.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_onboardingstate.go @@ -44,7 +44,7 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_workspace.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_workspace.go index 25f0d18c095..b5a31015a23 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_create.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_create.go index be0336fbcee..8049e43d14c 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_create.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_create.go @@ -50,7 +50,6 @@ func (c SentinelOnboardingStatesClient) Create(ctx context.Context, id Onboardin var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_get.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_get.go index e7b2c2cb86b..ff9b62feece 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_get.go @@ -45,7 +45,6 @@ func (c SentinelOnboardingStatesClient) Get(ctx context.Context, id OnboardingSt var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_list.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_list.go index d53893d7842..81a5556ad1e 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_list.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/method_list.go @@ -46,7 +46,6 @@ func (c SentinelOnboardingStatesClient) List(ctx context.Context, id WorkspaceId var model SentinelOnboardingStatesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/version.go b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/version.go index c94c67cac93..c4f9de81adf 100644 --- a/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/version.go +++ b/resource-manager/securityinsights/2023-11-01/sentinelonboardingstates/version.go @@ -1,12 +1,10 @@ package sentinelonboardingstates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sentinelonboardingstates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sentinelonboardingstates/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/README.md b/resource-manager/securityinsights/2023-11-01/sourcecontrols/README.md index f774e3108fc..07e8d43d0e9 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/README.md +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/sourcecontrols` Documentation -The `sourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `sourcecontrols` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/client.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/client.go index 9bfd651a63a..dbdb0796c4e 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/client.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/client.go @@ -15,7 +15,7 @@ type SourceControlsClient struct { } func NewSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_sourcecontrol.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_sourcecontrol.go index e31a40901b7..0ad1c5d85d2 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_sourcecontrol.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_workspace.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_workspace.go index ebdc1ecef81..ad137251327 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_create.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_create.go index 5df3dad0407..46b404add12 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_create.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_create.go @@ -50,7 +50,6 @@ func (c SourceControlsClient) Create(ctx context.Context, id SourceControlId, in var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_delete.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_delete.go index 6595db63a3a..8f874685aa7 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_delete.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_delete.go @@ -50,7 +50,6 @@ func (c SourceControlsClient) Delete(ctx context.Context, id SourceControlId, in var model Warning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_get.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_get.go index dccc280d648..46bab9be734 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlsClient) Get(ctx context.Context, id SourceControlId) (resu var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/sourcecontrols/version.go b/resource-manager/securityinsights/2023-11-01/sourcecontrols/version.go index 0c40f165740..50fe5453789 100644 --- a/resource-manager/securityinsights/2023-11-01/sourcecontrols/version.go +++ b/resource-manager/securityinsights/2023-11-01/sourcecontrols/version.go @@ -1,12 +1,10 @@ package sourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrols/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/README.md b/resource-manager/securityinsights/2023-11-01/threatintelligence/README.md index d6177a2ece0..27f516d1b9d 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/README.md +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/threatintelligence` Documentation -The `threatintelligence` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `threatintelligence` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/client.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/client.go index edf96c3143f..59e58da3228 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/client.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/client.go @@ -15,7 +15,7 @@ type ThreatIntelligenceClient struct { } func NewThreatIntelligenceClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreatIntelligenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "threatintelligence", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "threatintelligence", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ThreatIntelligenceClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/id_indicator.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/id_indicator.go index 73373ce2134..3c473e1919e 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/id_indicator.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/id_indicator.go @@ -44,7 +44,7 @@ func ParseIndicatorID(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIndicatorIDInsensitively(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/id_workspace.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/id_workspace.go index 2265507abcf..d96d7676ab4 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreate.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreate.go index 3cee598931c..af7a84f3880 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreate.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreate.go @@ -15,7 +15,7 @@ import ( type IndicatorCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreate ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreate(ctx context.Context, id Indica if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreateindicator.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreateindicator.go index 0f3ab94c4f5..05059855207 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreateindicator.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorcreateindicator.go @@ -16,7 +16,7 @@ import ( type IndicatorCreateIndicatorOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreateIndicator ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreateIndicator(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorget.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorget.go index 3358363f139..085ea71bf94 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorget.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorget.go @@ -15,7 +15,7 @@ import ( type IndicatorGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorGet ... @@ -48,11 +48,11 @@ func (c ThreatIntelligenceClient) IndicatorGet(ctx context.Context, id Indicator if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatormetricslist.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatormetricslist.go index f692c803e50..e2bea464351 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatormetricslist.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatormetricslist.go @@ -46,7 +46,6 @@ func (c ThreatIntelligenceClient) IndicatorMetricsList(ctx context.Context, id W var model ThreatIntelligenceMetricsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go index 27c6ce2648f..e2fdfa1225c 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorqueryindicators.go @@ -73,7 +73,7 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorreplacetags.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorreplacetags.go index 052bbe7b66a..873faa376b3 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorreplacetags.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorreplacetags.go @@ -16,7 +16,7 @@ import ( type IndicatorReplaceTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorReplaceTags ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorReplaceTags(ctx context.Context, id I if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorslist.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorslist.go index 1757c99fda7..18256ce90e1 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorslist.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/method_indicatorslist.go @@ -42,6 +42,7 @@ func (o IndicatorsListOperationOptions) ToHeaders() *client.Headers { func (o IndicatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,7 @@ func (c ThreatIntelligenceClient) IndicatorsList(ctx context.Context, id Workspa temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceindicatormodel.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceindicatormodel.go index 9ee1b5778ed..3f036f4cadc 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceindicatormodel.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceindicatormodel.go @@ -16,11 +16,24 @@ type ThreatIntelligenceIndicatorModel struct { Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` // Fields inherited from ThreatIntelligenceInformation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ThreatIntelligenceIndicatorModel) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return BaseThreatIntelligenceInformationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ThreatIntelligenceIndicatorModel{} @@ -34,9 +47,10 @@ func (s ThreatIntelligenceIndicatorModel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceIndicatorModel: %+v", err) } + decoded["kind"] = "indicator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformation.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformation.go index d036b649d26..4fc4734df84 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformation.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/model_threatintelligenceinformation.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreatIntelligenceInformation interface { + ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl +} + +var _ ThreatIntelligenceInformation = BaseThreatIntelligenceInformationImpl{} + +type BaseThreatIntelligenceInformationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s } -// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreatIntelligenceInformation = RawThreatIntelligenceInformationImpl{} + +// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreatIntelligenceInformationImpl struct { - Type string - Values map[string]interface{} + threatIntelligenceInformation BaseThreatIntelligenceInformationImpl + Type string + Values map[string]interface{} } -func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { +func (s RawThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s.threatIntelligenceInformation +} + +func UnmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatI return out, nil } - out := RawThreatIntelligenceInformationImpl{ - Type: value, - Values: temp, + var parent BaseThreatIntelligenceInformationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreatIntelligenceInformationImpl: %+v", err) } - return out, nil + + return RawThreatIntelligenceInformationImpl{ + threatIntelligenceInformation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2023-11-01/threatintelligence/version.go b/resource-manager/securityinsights/2023-11-01/threatintelligence/version.go index 74f958ab7eb..829ef9fabe4 100644 --- a/resource-manager/securityinsights/2023-11-01/threatintelligence/version.go +++ b/resource-manager/securityinsights/2023-11-01/threatintelligence/version.go @@ -1,12 +1,10 @@ package threatintelligence -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/threatintelligence/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/threatintelligence/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/README.md b/resource-manager/securityinsights/2023-11-01/watchlistitems/README.md index 5e4084696fa..86ce1ec8613 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/README.md +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/watchlistitems` Documentation -The `watchlistitems` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `watchlistitems` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/client.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/client.go index d3193694a48..f5126a4483d 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/client.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/client.go @@ -15,7 +15,7 @@ type WatchlistItemsClient struct { } func NewWatchlistItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlistitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlistitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistItemsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlist.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlist.go index 7df2e8c2562..398316c372f 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlist.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlistitem.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlistitem.go index 95aa9b8f56d..3a971d74b12 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlistitem.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/id_watchlistitem.go @@ -46,7 +46,7 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/method_createorupdate.go index 68142e971a8..1e71da4f4ef 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistItemsClient) CreateOrUpdate(ctx context.Context, id WatchlistIt var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/method_get.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/method_get.go index 1973c679f9e..6f2b74513da 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistItemsClient) Get(ctx context.Context, id WatchlistItemId) (resu var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/watchlistitems/version.go b/resource-manager/securityinsights/2023-11-01/watchlistitems/version.go index c861ca546f4..b378846445e 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlistitems/version.go +++ b/resource-manager/securityinsights/2023-11-01/watchlistitems/version.go @@ -1,12 +1,10 @@ package watchlistitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlistitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlistitems/2023-11-01" } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/README.md b/resource-manager/securityinsights/2023-11-01/watchlists/README.md index 9646dff2a5c..0427a1250f2 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/README.md +++ b/resource-manager/securityinsights/2023-11-01/watchlists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/watchlists` Documentation -The `watchlists` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). +The `watchlists` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/client.go b/resource-manager/securityinsights/2023-11-01/watchlists/client.go index 45211175054..22f5472a0ad 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/client.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/client.go @@ -15,7 +15,7 @@ type WatchlistsClient struct { } func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/id_watchlist.go b/resource-manager/securityinsights/2023-11-01/watchlists/id_watchlist.go index e5b47b1456e..ac459a108e6 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/id_watchlist.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/id_workspace.go b/resource-manager/securityinsights/2023-11-01/watchlists/id_workspace.go index d8e6bddfee7..6b8f7d79efb 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/id_workspace.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/method_createorupdate.go b/resource-manager/securityinsights/2023-11-01/watchlists/method_createorupdate.go index eb0b4f9396d..219b2a467eb 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/method_createorupdate.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, in var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/method_get.go b/resource-manager/securityinsights/2023-11-01/watchlists/method_get.go index 7aac16c3975..2b6dcd7e6da 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/method_get.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistsClient) Get(ctx context.Context, id WatchlistId) (result GetOp var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2023-11-01/watchlists/version.go b/resource-manager/securityinsights/2023-11-01/watchlists/version.go index a47a57e655f..a204a727129 100644 --- a/resource-manager/securityinsights/2023-11-01/watchlists/version.go +++ b/resource-manager/securityinsights/2023-11-01/watchlists/version.go @@ -1,12 +1,10 @@ package watchlists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlists/2023-11-01" } diff --git a/resource-manager/securityinsights/2024-03-01/actions/README.md b/resource-manager/securityinsights/2024-03-01/actions/README.md index e0fd6975c11..2cb835937c5 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/README.md +++ b/resource-manager/securityinsights/2024-03-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/actions/client.go b/resource-manager/securityinsights/2024-03-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/client.go +++ b/resource-manager/securityinsights/2024-03-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/actions/id_action.go b/resource-manager/securityinsights/2024-03-01/actions/id_action.go index aeefc14d3f8..9e28a9229f4 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/id_action.go +++ b/resource-manager/securityinsights/2024-03-01/actions/id_action.go @@ -46,7 +46,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/actions/id_alertrule.go b/resource-manager/securityinsights/2024-03-01/actions/id_alertrule.go index 731f6439ae3..e92dcf5f421 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/id_alertrule.go +++ b/resource-manager/securityinsights/2024-03-01/actions/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/actions/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/actions/method_createorupdate.go index e84c5bebbd7..739b455eff0 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/actions/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ActionsClient) CreateOrUpdate(ctx context.Context, id ActionId, input Ac var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/actions/method_get.go b/resource-manager/securityinsights/2024-03-01/actions/method_get.go index 9d5aad5dc58..38ddf8d93d2 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/actions/method_get.go @@ -45,7 +45,6 @@ func (c ActionsClient) Get(ctx context.Context, id ActionId) (result GetOperatio var model ActionResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/actions/version.go b/resource-manager/securityinsights/2024-03-01/actions/version.go index f5dbfe96bb5..03d004c01f3 100644 --- a/resource-manager/securityinsights/2024-03-01/actions/version.go +++ b/resource-manager/securityinsights/2024-03-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/README.md b/resource-manager/securityinsights/2024-03-01/alertrules/README.md index caa856eb21f..c9229db33d3 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/README.md +++ b/resource-manager/securityinsights/2024-03-01/alertrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/alertrules` Documentation -The `alertrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `alertrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/client.go b/resource-manager/securityinsights/2024-03-01/alertrules/client.go index e6ca04af9da..20e26334cc4 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/client.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/client.go @@ -15,7 +15,7 @@ type AlertRulesClient struct { } func NewAlertRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/id_alertrule.go b/resource-manager/securityinsights/2024-03-01/alertrules/id_alertrule.go index 818f124e5ef..941d129e5a3 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/id_alertrule.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/id_alertrule.go @@ -44,7 +44,7 @@ func ParseAlertRuleID(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleIDInsensitively(input string) (*AlertRuleId, error) { } id := AlertRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/id_workspace.go b/resource-manager/securityinsights/2024-03-01/alertrules/id_workspace.go index 005b7fc90a7..0ae4ab3dfc2 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/alertrules/method_createorupdate.go index f77c7558d09..13548ddf46e 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c AlertRulesClient) CreateOrUpdate(ctx context.Context, id AlertRuleId, in if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/method_get.go b/resource-manager/securityinsights/2024-03-01/alertrules/method_get.go index 945c07bfad1..f6b552d75c7 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRule + Model AlertRule } // Get ... @@ -48,11 +48,11 @@ func (c AlertRulesClient) Get(ctx context.Context, id AlertRuleId) (result GetOp if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleImplementation(respObj) + model, err := UnmarshalAlertRuleImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/method_list.go b/resource-manager/securityinsights/2024-03-01/alertrules/method_list.go index 191ccd545bb..55fff58c861 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/method_list.go @@ -73,7 +73,7 @@ func (c AlertRulesClient) List(ctx context.Context, id WorkspaceId) (result List temp := make([]AlertRule, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleImplementation(v) + val, err := UnmarshalAlertRuleImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRule (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/model_alertrule.go b/resource-manager/securityinsights/2024-03-01/alertrules/model_alertrule.go index 0a8eb3e2ad3..3b089e227ff 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/model_alertrule.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/model_alertrule.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRule interface { + AlertRule() BaseAlertRuleImpl +} + +var _ AlertRule = BaseAlertRuleImpl{} + +type BaseAlertRuleImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s } -// RawAlertRuleImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRule = RawAlertRuleImpl{} + +// RawAlertRuleImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleImpl struct { - Type string - Values map[string]interface{} + alertRule BaseAlertRuleImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { +func (s RawAlertRuleImpl) AlertRule() BaseAlertRuleImpl { + return s.alertRule +} + +func UnmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { if input == nil { return nil, nil } @@ -60,10 +84,15 @@ func unmarshalAlertRuleImplementation(input []byte) (AlertRule, error) { return out, nil } - out := RawAlertRuleImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleImpl: %+v", err) } - return out, nil + + return RawAlertRuleImpl{ + alertRule: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/model_fusionalertrule.go b/resource-manager/securityinsights/2024-03-01/alertrules/model_fusionalertrule.go index c4ed17f4319..f9ebd649bd9 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/model_fusionalertrule.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/model_fusionalertrule.go @@ -16,13 +16,26 @@ type FusionAlertRule struct { Properties *FusionAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRule{} func (s FusionAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s FusionAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRule: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go b/resource-manager/securityinsights/2024-03-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go index 4fa227e3728..ccf5f8899d4 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/model_microsoftsecurityincidentcreationalertrule.go @@ -16,13 +16,26 @@ type MicrosoftSecurityIncidentCreationAlertRule struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRule{} func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRule) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRule: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/model_scheduledalertrule.go b/resource-manager/securityinsights/2024-03-01/alertrules/model_scheduledalertrule.go index cf91bcec4f2..6dc6c221e54 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/model_scheduledalertrule.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/model_scheduledalertrule.go @@ -16,13 +16,26 @@ type ScheduledAlertRule struct { Properties *ScheduledAlertRuleProperties `json:"properties,omitempty"` // Fields inherited from AlertRule + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRule) AlertRule() BaseAlertRuleImpl { + return BaseAlertRuleImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRule{} func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ScheduledAlertRule) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRule: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertrules/version.go b/resource-manager/securityinsights/2024-03-01/alertrules/version.go index 0e6c7c7090f..8f81a5ce25c 100644 --- a/resource-manager/securityinsights/2024-03-01/alertrules/version.go +++ b/resource-manager/securityinsights/2024-03-01/alertrules/version.go @@ -1,12 +1,10 @@ package alertrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertrules/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/README.md b/resource-manager/securityinsights/2024-03-01/alertruletemplates/README.md index 928b67e95cc..c2b0e527180 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/README.md +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/alertruletemplates` Documentation -The `alertruletemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `alertruletemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/client.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/client.go index 2932bf14a55..5726cbd8954 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/client.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/client.go @@ -15,7 +15,7 @@ type AlertRuleTemplatesClient struct { } func NewAlertRuleTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertRuleTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "alertruletemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "alertruletemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AlertRuleTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_alertruletemplate.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_alertruletemplate.go index 6a82de7688f..e294dbc3335 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_alertruletemplate.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_alertruletemplate.go @@ -44,7 +44,7 @@ func ParseAlertRuleTemplateID(input string) (*AlertRuleTemplateId, error) { } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAlertRuleTemplateIDInsensitively(input string) (*AlertRuleTemplateId, } id := AlertRuleTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_workspace.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_workspace.go index 184371fb5dc..757188dcdde 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_get.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_get.go index 861712be66a..c8efafa0807 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *AlertRuleTemplate + Model AlertRuleTemplate } // Get ... @@ -48,11 +48,11 @@ func (c AlertRuleTemplatesClient) Get(ctx context.Context, id AlertRuleTemplateI if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalAlertRuleTemplateImplementation(respObj) + model, err := UnmarshalAlertRuleTemplateImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_list.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_list.go index 7b8fd97d59e..11a83746296 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/method_list.go @@ -73,7 +73,7 @@ func (c AlertRuleTemplatesClient) List(ctx context.Context, id WorkspaceId) (res temp := make([]AlertRuleTemplate, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalAlertRuleTemplateImplementation(v) + val, err := UnmarshalAlertRuleTemplateImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for AlertRuleTemplate (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_alertruletemplate.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_alertruletemplate.go index 6000fbb4b2c..0f3bb1bd9cf 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_alertruletemplate.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_alertruletemplate.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertRuleTemplate interface { + AlertRuleTemplate() BaseAlertRuleTemplateImpl +} + +var _ AlertRuleTemplate = BaseAlertRuleTemplateImpl{} + +type BaseAlertRuleTemplateImpl struct { + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s } -// RawAlertRuleTemplateImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AlertRuleTemplate = RawAlertRuleTemplateImpl{} + +// RawAlertRuleTemplateImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAlertRuleTemplateImpl struct { - Type string - Values map[string]interface{} + alertRuleTemplate BaseAlertRuleTemplateImpl + Type string + Values map[string]interface{} } -func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { +func (s RawAlertRuleTemplateImpl) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return s.alertRuleTemplate +} + +func UnmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, error) { if input == nil { return nil, nil } @@ -60,10 +83,15 @@ func unmarshalAlertRuleTemplateImplementation(input []byte) (AlertRuleTemplate, return out, nil } - out := RawAlertRuleTemplateImpl{ - Type: value, - Values: temp, + var parent BaseAlertRuleTemplateImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAlertRuleTemplateImpl: %+v", err) } - return out, nil + + return RawAlertRuleTemplateImpl{ + alertRuleTemplate: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_fusionalertruletemplate.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_fusionalertruletemplate.go index c2b4d8c3077..ea4edef0f1e 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_fusionalertruletemplate.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_fusionalertruletemplate.go @@ -16,12 +16,24 @@ type FusionAlertRuleTemplate struct { Properties *FusionAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s FusionAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = FusionAlertRuleTemplate{} func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s FusionAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FusionAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Fusion" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go index 515a47767b2..c526da831d8 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_microsoftsecurityincidentcreationalertruletemplate.go @@ -16,12 +16,24 @@ type MicrosoftSecurityIncidentCreationAlertRuleTemplate struct { Properties *MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MicrosoftSecurityIncidentCreationAlertRuleTemplate{} func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s MicrosoftSecurityIncidentCreationAlertRuleTemplate) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MicrosoftSecurityIncidentCreationAlertRuleTemplate: %+v", err) } + decoded["kind"] = "MicrosoftSecurityIncidentCreation" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_scheduledalertruletemplate.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_scheduledalertruletemplate.go index c3428ada14d..bb44ecf53bb 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_scheduledalertruletemplate.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/model_scheduledalertruletemplate.go @@ -16,12 +16,24 @@ type ScheduledAlertRuleTemplate struct { Properties *ScheduledAlertRuleTemplateProperties `json:"properties,omitempty"` // Fields inherited from AlertRuleTemplate + Id *string `json:"id,omitempty"` + Kind AlertRuleKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ScheduledAlertRuleTemplate) AlertRuleTemplate() BaseAlertRuleTemplateImpl { + return BaseAlertRuleTemplateImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ScheduledAlertRuleTemplate{} func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s ScheduledAlertRuleTemplate) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScheduledAlertRuleTemplate: %+v", err) } + decoded["kind"] = "Scheduled" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/alertruletemplates/version.go b/resource-manager/securityinsights/2024-03-01/alertruletemplates/version.go index 6bc10a30839..b863d649739 100644 --- a/resource-manager/securityinsights/2024-03-01/alertruletemplates/version.go +++ b/resource-manager/securityinsights/2024-03-01/alertruletemplates/version.go @@ -1,12 +1,10 @@ package alertruletemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/alertruletemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/alertruletemplates/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/README.md b/resource-manager/securityinsights/2024-03-01/automationrules/README.md index 909e037bc68..4c3a4d8f490 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/README.md +++ b/resource-manager/securityinsights/2024-03-01/automationrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/automationrules` Documentation -The `automationrules` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `automationrules` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/client.go b/resource-manager/securityinsights/2024-03-01/automationrules/client.go index 18fafea1496..75f33724768 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/client.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/client.go @@ -15,7 +15,7 @@ type AutomationRulesClient struct { } func NewAutomationRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AutomationRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "automationrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "automationrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AutomationRulesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/id_automationrule.go b/resource-manager/securityinsights/2024-03-01/automationrules/id_automationrule.go index 00c7db776a3..8c99ce6f94c 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/id_automationrule.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/id_automationrule.go @@ -44,7 +44,7 @@ func ParseAutomationRuleID(input string) (*AutomationRuleId, error) { } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAutomationRuleIDInsensitively(input string) (*AutomationRuleId, error) } id := AutomationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/id_workspace.go b/resource-manager/securityinsights/2024-03-01/automationrules/id_workspace.go index 72d00c87771..719da4c9ff6 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/automationrules/method_createorupdate.go index 6ab8b05e0fb..9f70d87aab4 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AutomationRulesClient) CreateOrUpdate(ctx context.Context, id Automation var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/method_delete.go b/resource-manager/securityinsights/2024-03-01/automationrules/method_delete.go index c32a7e886ad..5915b112d22 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/method_delete.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/method_delete.go @@ -46,7 +46,6 @@ func (c AutomationRulesClient) Delete(ctx context.Context, id AutomationRuleId) var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/method_get.go b/resource-manager/securityinsights/2024-03-01/automationrules/method_get.go index b5c7ce72e30..e180fc005e4 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/method_get.go @@ -45,7 +45,6 @@ func (c AutomationRulesClient) Get(ctx context.Context, id AutomationRuleId) (re var model AutomationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaction.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaction.go index 6ed3ef867c5..87f684fa86a 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaction.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaction.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleAction interface { + AutomationRuleAction() BaseAutomationRuleActionImpl } -// RawAutomationRuleActionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleAction = BaseAutomationRuleActionImpl{} + +type BaseAutomationRuleActionImpl struct { + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s BaseAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s +} + +var _ AutomationRuleAction = RawAutomationRuleActionImpl{} + +// RawAutomationRuleActionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleActionImpl struct { - Type string - Values map[string]interface{} + automationRuleAction BaseAutomationRuleActionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleActionImpl) AutomationRuleAction() BaseAutomationRuleActionImpl { + return s.automationRuleAction } -func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { +func UnmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAction, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalAutomationRuleActionImplementation(input []byte) (AutomationRuleAc return out, nil } - out := RawAutomationRuleActionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleActionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleActionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleActionImpl{ + automationRuleAction: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaddincidenttaskaction.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaddincidenttaskaction.go index 81b5fb43469..6622cd88893 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaddincidenttaskaction.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleaddincidenttaskaction.go @@ -14,7 +14,16 @@ type AutomationRuleAddIncidentTaskAction struct { ActionConfiguration *AddIncidentTaskActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleAddIncidentTaskAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleAddIncidentTaskAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleAddIncidentTaskAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleAddIncidentTaskAction: %+v", err) } + decoded["actionType"] = "AddIncidentTask" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulebooleancondition.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulebooleancondition.go index b73d49b1554..ee63bf063bd 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulebooleancondition.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulebooleancondition.go @@ -37,7 +37,7 @@ func (s *AutomationRuleBooleanCondition) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'InnerConditions' for 'AutomationRuleBooleanCondition': %+v", i, err) } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulecondition.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulecondition.go index 6e9c0bf07a8..135592d8d8b 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulecondition.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulecondition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AutomationRuleCondition interface { + AutomationRuleCondition() BaseAutomationRuleConditionImpl } -// RawAutomationRuleConditionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AutomationRuleCondition = BaseAutomationRuleConditionImpl{} + +type BaseAutomationRuleConditionImpl struct { + ConditionType ConditionType `json:"conditionType"` +} + +func (s BaseAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s +} + +var _ AutomationRuleCondition = RawAutomationRuleConditionImpl{} + +// RawAutomationRuleConditionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAutomationRuleConditionImpl struct { - Type string - Values map[string]interface{} + automationRuleCondition BaseAutomationRuleConditionImpl + Type string + Values map[string]interface{} +} + +func (s RawAutomationRuleConditionImpl) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return s.automationRuleCondition } -func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { +func UnmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRuleCondition, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalAutomationRuleConditionImplementation(input []byte) (AutomationRul return out, nil } - out := RawAutomationRuleConditionImpl{ - Type: value, - Values: temp, + var parent BaseAutomationRuleConditionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAutomationRuleConditionImpl: %+v", err) } - return out, nil + + return RawAutomationRuleConditionImpl{ + automationRuleCondition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulemodifypropertiesaction.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulemodifypropertiesaction.go index 98eb39b6a9b..59b10e5bc34 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulemodifypropertiesaction.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulemodifypropertiesaction.go @@ -14,7 +14,16 @@ type AutomationRuleModifyPropertiesAction struct { ActionConfiguration *IncidentPropertiesAction `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleModifyPropertiesAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleModifyPropertiesAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleModifyPropertiesAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleModifyPropertiesAction: %+v", err) } + decoded["actionType"] = "ModifyProperties" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleproperties.go index 5460f9b5fba..4499996f6a2 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruleproperties.go @@ -76,7 +76,7 @@ func (s *AutomationRuleProperties) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleAction, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleActionImplementation(val) + impl, err := UnmarshalAutomationRuleActionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Actions' for 'AutomationRuleProperties': %+v", i, err) } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulepropertyarrayvaluescondition.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulepropertyarrayvaluescondition.go index 5d2faa180e5..c5fbb9aa596 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulepropertyarrayvaluescondition.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulepropertyarrayvaluescondition.go @@ -39,7 +39,7 @@ func (s *AutomationRulePropertyArrayValuesCondition) UnmarshalJSON(bytes []byte) output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ItemConditions' for 'AutomationRulePropertyArrayValuesCondition': %+v", i, err) } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulerunplaybookaction.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulerunplaybookaction.go index c3e139aacf7..eba12a31777 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulerunplaybookaction.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationrulerunplaybookaction.go @@ -14,7 +14,16 @@ type AutomationRuleRunPlaybookAction struct { ActionConfiguration *PlaybookActionProperties `json:"actionConfiguration,omitempty"` // Fields inherited from AutomationRuleAction - Order int64 `json:"order"` + + ActionType ActionType `json:"actionType"` + Order int64 `json:"order"` +} + +func (s AutomationRuleRunPlaybookAction) AutomationRuleAction() BaseAutomationRuleActionImpl { + return BaseAutomationRuleActionImpl{ + ActionType: s.ActionType, + Order: s.Order, + } } var _ json.Marshaler = AutomationRuleRunPlaybookAction{} @@ -28,9 +37,10 @@ func (s AutomationRuleRunPlaybookAction) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AutomationRuleRunPlaybookAction: %+v", err) } + decoded["actionType"] = "RunPlaybook" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruletriggeringlogic.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruletriggeringlogic.go index 2f4592c4269..0fac09e2443 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruletriggeringlogic.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_automationruletriggeringlogic.go @@ -58,7 +58,7 @@ func (s *AutomationRuleTriggeringLogic) UnmarshalJSON(bytes []byte) error { output := make([]AutomationRuleCondition, 0) for i, val := range listTemp { - impl, err := unmarshalAutomationRuleConditionImplementation(val) + impl, err := UnmarshalAutomationRuleConditionImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Conditions' for 'AutomationRuleTriggeringLogic': %+v", i, err) } diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_booleanconditionproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_booleanconditionproperties.go index 41e5695b030..3fa5b52a620 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_booleanconditionproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_booleanconditionproperties.go @@ -14,6 +14,14 @@ type BooleanConditionProperties struct { ConditionProperties *AutomationRuleBooleanCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s BooleanConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = BooleanConditionProperties{} @@ -27,9 +35,10 @@ func (s BooleanConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BooleanConditionProperties: %+v", err) } + decoded["conditionType"] = "Boolean" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarraychangedconditionproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarraychangedconditionproperties.go index 9abf0187ac4..07c0eb5acce 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarraychangedconditionproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarraychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayChangedValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArrayChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarrayconditionproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarrayconditionproperties.go index 9e700cb4a8c..9db5d4f3702 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarrayconditionproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyarrayconditionproperties.go @@ -14,6 +14,14 @@ type PropertyArrayConditionProperties struct { ConditionProperties *AutomationRulePropertyArrayValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyArrayConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyArrayConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyArrayConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyArrayConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyArray" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertychangedconditionproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertychangedconditionproperties.go index b72736f49a2..960f23ee56e 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertychangedconditionproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertychangedconditionproperties.go @@ -14,6 +14,14 @@ type PropertyChangedConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesChangedCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyChangedConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyChangedConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyChangedConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyChangedConditionProperties: %+v", err) } + decoded["conditionType"] = "PropertyChanged" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyconditionproperties.go b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyconditionproperties.go index 6e77d74c58c..92672dc4e8c 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyconditionproperties.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/model_propertyconditionproperties.go @@ -14,6 +14,14 @@ type PropertyConditionProperties struct { ConditionProperties *AutomationRulePropertyValuesCondition `json:"conditionProperties,omitempty"` // Fields inherited from AutomationRuleCondition + + ConditionType ConditionType `json:"conditionType"` +} + +func (s PropertyConditionProperties) AutomationRuleCondition() BaseAutomationRuleConditionImpl { + return BaseAutomationRuleConditionImpl{ + ConditionType: s.ConditionType, + } } var _ json.Marshaler = PropertyConditionProperties{} @@ -27,9 +35,10 @@ func (s PropertyConditionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PropertyConditionProperties: %+v", err) } + decoded["conditionType"] = "Property" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/automationrules/version.go b/resource-manager/securityinsights/2024-03-01/automationrules/version.go index d31232076a4..04c1ecfffe1 100644 --- a/resource-manager/securityinsights/2024-03-01/automationrules/version.go +++ b/resource-manager/securityinsights/2024-03-01/automationrules/version.go @@ -1,12 +1,10 @@ package automationrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/automationrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/automationrules/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/README.md b/resource-manager/securityinsights/2024-03-01/bookmarks/README.md index cc2133a1389..a9df8be7c3f 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/README.md +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/bookmarks` Documentation -The `bookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `bookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/client.go b/resource-manager/securityinsights/2024-03-01/bookmarks/client.go index 22469155649..4a7e564bcaf 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/client.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/client.go @@ -15,7 +15,7 @@ type BookmarksClient struct { } func NewBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*BookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/id_bookmark.go b/resource-manager/securityinsights/2024-03-01/bookmarks/id_bookmark.go index 5317bd28514..97039a3361a 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/id_bookmark.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/id_bookmark.go @@ -44,7 +44,7 @@ func ParseBookmarkID(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error) { } id := BookmarkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/id_workspace.go b/resource-manager/securityinsights/2024-03-01/bookmarks/id_workspace.go index 96d5c1221cf..7f2924971ec 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/bookmarks/method_createorupdate.go index 2e61ab3ee74..9d2c71d828b 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, inpu var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/method_get.go b/resource-manager/securityinsights/2024-03-01/bookmarks/method_get.go index 36c8d7fcc43..ec1d9306eec 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/method_get.go @@ -45,7 +45,6 @@ func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOper var model Bookmark result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/bookmarks/version.go b/resource-manager/securityinsights/2024-03-01/bookmarks/version.go index 4439137b86e..ece8d14a9b4 100644 --- a/resource-manager/securityinsights/2024-03-01/bookmarks/version.go +++ b/resource-manager/securityinsights/2024-03-01/bookmarks/version.go @@ -1,12 +1,10 @@ package bookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bookmarks/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/README.md b/resource-manager/securityinsights/2024-03-01/contentpackages/README.md index 62f85c67930..c2c735eacd5 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/README.md +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contentpackages` Documentation -The `contentpackages` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `contentpackages` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/client.go b/resource-manager/securityinsights/2024-03-01/contentpackages/client.go index 50bba58e93a..b9686fcbc74 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/client.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/client.go @@ -15,7 +15,7 @@ type ContentPackagesClient struct { } func NewContentPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentPackagesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/id_contentpackage.go b/resource-manager/securityinsights/2024-03-01/contentpackages/id_contentpackage.go index a56a8fbaab5..0054dc7959e 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/id_contentpackage.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/id_contentpackage.go @@ -44,7 +44,7 @@ func ParseContentPackageID(input string) (*ContentPackageId, error) { } id := ContentPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentPackageIDInsensitively(input string) (*ContentPackageId, error) } id := ContentPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/id_workspace.go b/resource-manager/securityinsights/2024-03-01/contentpackages/id_workspace.go index 193b22a051a..8a071e1bf90 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/method_contentpackageinstall.go b/resource-manager/securityinsights/2024-03-01/contentpackages/method_contentpackageinstall.go index 433bf1bcf33..e01d04aaa13 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/method_contentpackageinstall.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/method_contentpackageinstall.go @@ -50,7 +50,6 @@ func (c ContentPackagesClient) ContentPackageInstall(ctx context.Context, id Con var model PackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/method_get.go b/resource-manager/securityinsights/2024-03-01/contentpackages/method_get.go index 5f05a99cf4c..22be4c1d4c1 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/method_get.go @@ -45,7 +45,6 @@ func (c ContentPackagesClient) Get(ctx context.Context, id ContentPackageId) (re var model PackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/method_list.go b/resource-manager/securityinsights/2024-03-01/contentpackages/method_list.go index e576e2a8e86..c3b2c784a7b 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/method_list.go @@ -44,6 +44,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/contentpackages/version.go b/resource-manager/securityinsights/2024-03-01/contentpackages/version.go index cfb30e45e2a..138d661ac1b 100644 --- a/resource-manager/securityinsights/2024-03-01/contentpackages/version.go +++ b/resource-manager/securityinsights/2024-03-01/contentpackages/version.go @@ -1,12 +1,10 @@ package contentpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentpackages/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/README.md b/resource-manager/securityinsights/2024-03-01/contentproductpackages/README.md index fe939c12f46..2a88daedeae 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/README.md +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contentproductpackages` Documentation -The `contentproductpackages` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `contentproductpackages` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/client.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/client.go index b8bf58ba78d..fcf0e811b5a 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/client.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/client.go @@ -15,7 +15,7 @@ type ContentProductPackagesClient struct { } func NewContentProductPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentProductPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentproductpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentproductpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentProductPackagesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_contentproductpackage.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_contentproductpackage.go index 6e1f084e79c..5494d05234e 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_contentproductpackage.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_contentproductpackage.go @@ -44,7 +44,7 @@ func ParseContentProductPackageID(input string) (*ContentProductPackageId, error } id := ContentProductPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentProductPackageIDInsensitively(input string) (*ContentProductPac } id := ContentProductPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_workspace.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_workspace.go index d22e27d14c6..0606b86fa26 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageget.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageget.go index b21b0045e8d..2dda33465ef 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageget.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageget.go @@ -45,7 +45,6 @@ func (c ContentProductPackagesClient) ProductPackageGet(ctx context.Context, id var model ProductPackageModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageslist.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageslist.go index 12065b3e3f5..90a7faa83bb 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageslist.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/method_productpackageslist.go @@ -41,6 +41,7 @@ func (o ProductPackagesListOperationOptions) ToHeaders() *client.Headers { func (o ProductPackagesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/contentproductpackages/version.go b/resource-manager/securityinsights/2024-03-01/contentproductpackages/version.go index 9fbc571d0b0..16a3096fb13 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproductpackages/version.go +++ b/resource-manager/securityinsights/2024-03-01/contentproductpackages/version.go @@ -1,12 +1,10 @@ package contentproductpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentproductpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentproductpackages/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/README.md b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/README.md index bef4432ffda..cdfee0c0e7c 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/README.md +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contentproducttemplates` Documentation -The `contentproducttemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `contentproducttemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/client.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/client.go index 26a626b34ce..e15b875b673 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/client.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/client.go @@ -15,7 +15,7 @@ type ContentProductTemplatesClient struct { } func NewContentProductTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentProductTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contentproducttemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contentproducttemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentProductTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_contentproducttemplate.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_contentproducttemplate.go index ea635cb2a5b..aa27e83fa09 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_contentproducttemplate.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_contentproducttemplate.go @@ -44,7 +44,7 @@ func ParseContentProductTemplateID(input string) (*ContentProductTemplateId, err } id := ContentProductTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentProductTemplateIDInsensitively(input string) (*ContentProductTe } id := ContentProductTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_workspace.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_workspace.go index a820aa94457..e9ab1ead241 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateget.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateget.go index 53700d70476..c3c2a4ea6b4 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateget.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateget.go @@ -45,7 +45,6 @@ func (c ContentProductTemplatesClient) ProductTemplateGet(ctx context.Context, i var model ProductTemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateslist.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateslist.go index cd0b411dec2..51beb22cc8a 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateslist.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/method_producttemplateslist.go @@ -44,6 +44,7 @@ func (o ProductTemplatesListOperationOptions) ToHeaders() *client.Headers { func (o ProductTemplatesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/version.go b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/version.go index 1fff386a3ac..61ea833ccff 100644 --- a/resource-manager/securityinsights/2024-03-01/contentproducttemplates/version.go +++ b/resource-manager/securityinsights/2024-03-01/contentproducttemplates/version.go @@ -1,12 +1,10 @@ package contentproducttemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contentproducttemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contentproducttemplates/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/README.md b/resource-manager/securityinsights/2024-03-01/contenttemplates/README.md index 95f94fa69a7..579b1f37300 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/README.md +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contenttemplates` Documentation -The `contenttemplates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `contenttemplates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/client.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/client.go index fde41e740cd..246b1514717 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/client.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/client.go @@ -15,7 +15,7 @@ type ContentTemplatesClient struct { } func NewContentTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ContentTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "contenttemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "contenttemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContentTemplatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/id_contenttemplate.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/id_contenttemplate.go index 23e6f77c91a..c8904ffc78b 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/id_contenttemplate.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/id_contenttemplate.go @@ -44,7 +44,7 @@ func ParseContentTemplateID(input string) (*ContentTemplateId, error) { } id := ContentTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContentTemplateIDInsensitively(input string) (*ContentTemplateId, erro } id := ContentTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/id_workspace.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/id_workspace.go index 0f18d483664..10892ceb906 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateget.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateget.go index 6c8365fa57b..39754dbb6a4 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateget.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateget.go @@ -45,7 +45,6 @@ func (c ContentTemplatesClient) ContentTemplateGet(ctx context.Context, id Conte var model TemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateinstall.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateinstall.go index 8479804c9e7..97ab8dcb520 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateinstall.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_contenttemplateinstall.go @@ -50,7 +50,6 @@ func (c ContentTemplatesClient) ContentTemplateInstall(ctx context.Context, id C var model TemplateModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_list.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_list.go index 14844429fe6..274404e744d 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/method_list.go @@ -45,6 +45,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/contenttemplates/version.go b/resource-manager/securityinsights/2024-03-01/contenttemplates/version.go index 6064952c451..1e10c6ee2df 100644 --- a/resource-manager/securityinsights/2024-03-01/contenttemplates/version.go +++ b/resource-manager/securityinsights/2024-03-01/contenttemplates/version.go @@ -1,12 +1,10 @@ package contenttemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/contenttemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/contenttemplates/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/README.md b/resource-manager/securityinsights/2024-03-01/dataconnectors/README.md index 0423fd527ac..8fda56954bf 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/README.md +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/dataconnectors` Documentation -The `dataconnectors` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `dataconnectors` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/client.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/client.go index 8ed0120c79a..0a9e9bbb924 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/client.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/client.go @@ -15,7 +15,7 @@ type DataConnectorsClient struct { } func NewDataConnectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataConnectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "dataconnectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "dataconnectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataConnectorsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/id_dataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/id_dataconnector.go index b55667aa923..c6cc24bc274 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/id_dataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/id_dataconnector.go @@ -44,7 +44,7 @@ func ParseDataConnectorID(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDataConnectorIDInsensitively(input string) (*DataConnectorId, error) { } id := DataConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/id_workspace.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/id_workspace.go index 60237fcce07..64796e96412 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_createorupdate.go index c5f6e5d1503..111c7e46a6c 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c DataConnectorsClient) CreateOrUpdate(ctx context.Context, id DataConnect if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_get.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_get.go index 3511ba85477..5b79c298c01 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *DataConnector + Model DataConnector } // Get ... @@ -48,11 +48,11 @@ func (c DataConnectorsClient) Get(ctx context.Context, id DataConnectorId) (resu if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalDataConnectorImplementation(respObj) + model, err := UnmarshalDataConnectorImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_list.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_list.go index b000eaba869..2b4d19a4d0f 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/method_list.go @@ -73,7 +73,7 @@ func (c DataConnectorsClient) List(ctx context.Context, id WorkspaceId) (result temp := make([]DataConnector, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalDataConnectorImplementation(v) + val, err := UnmarshalDataConnectorImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for DataConnector (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aaddataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aaddataconnector.go index dd0ca1af664..141187a8802 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aaddataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aaddataconnector.go @@ -16,13 +16,26 @@ type AADDataConnector struct { Properties *AADDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AADDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AADDataConnector{} func (s AADDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AADDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AADDataConnector: %+v", err) } + decoded["kind"] = "AzureActiveDirectory" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aatpdataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aatpdataconnector.go index e1cd013bbd7..798b7a40456 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aatpdataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_aatpdataconnector.go @@ -16,13 +16,26 @@ type AATPDataConnector struct { Properties *AATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AATPDataConnector{} func (s AATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AATPDataConnector: %+v", err) } + decoded["kind"] = "AzureAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_ascdataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_ascdataconnector.go index 3af09c2ff8b..dcc8457279a 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_ascdataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_ascdataconnector.go @@ -16,13 +16,26 @@ type ASCDataConnector struct { Properties *ASCDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s ASCDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = ASCDataConnector{} func (s ASCDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s ASCDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ASCDataConnector: %+v", err) } + decoded["kind"] = "AzureSecurityCenter" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_awscloudtraildataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_awscloudtraildataconnector.go index b0ef7fdd285..42a1639082a 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_awscloudtraildataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_awscloudtraildataconnector.go @@ -16,13 +16,26 @@ type AwsCloudTrailDataConnector struct { Properties *AwsCloudTrailDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s AwsCloudTrailDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = AwsCloudTrailDataConnector{} func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s AwsCloudTrailDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AwsCloudTrailDataConnector: %+v", err) } + decoded["kind"] = "AmazonWebServicesCloudTrail" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_dataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_dataconnector.go index 66368d66fb7..70a7f42baaa 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_dataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_dataconnector.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnector interface { + DataConnector() BaseDataConnectorImpl +} + +var _ DataConnector = BaseDataConnectorImpl{} + +type BaseDataConnectorImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s } -// RawDataConnectorImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DataConnector = RawDataConnectorImpl{} + +// RawDataConnectorImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDataConnectorImpl struct { - Type string - Values map[string]interface{} + dataConnector BaseDataConnectorImpl + Type string + Values map[string]interface{} } -func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { +func (s RawDataConnectorImpl) DataConnector() BaseDataConnectorImpl { + return s.dataConnector +} + +func UnmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { if input == nil { return nil, nil } @@ -100,10 +124,15 @@ func unmarshalDataConnectorImplementation(input []byte) (DataConnector, error) { return out, nil } - out := RawDataConnectorImpl{ - Type: value, - Values: temp, + var parent BaseDataConnectorImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDataConnectorImpl: %+v", err) } - return out, nil + + return RawDataConnectorImpl{ + dataConnector: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mcasdataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mcasdataconnector.go index 6a0c9aebea0..efa33558eaf 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mcasdataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mcasdataconnector.go @@ -16,13 +16,26 @@ type MCASDataConnector struct { Properties *MCASDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MCASDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MCASDataConnector{} func (s MCASDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MCASDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MCASDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftCloudAppSecurity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mdatpdataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mdatpdataconnector.go index 1a6bcbcb7bf..02c3188f668 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mdatpdataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_mdatpdataconnector.go @@ -16,13 +16,26 @@ type MDATPDataConnector struct { Properties *MDATPDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s MDATPDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = MDATPDataConnector{} func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s MDATPDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MDATPDataConnector: %+v", err) } + decoded["kind"] = "MicrosoftDefenderAdvancedThreatProtection" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_officedataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_officedataconnector.go index 25b5a25e44d..4b2bee1390e 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_officedataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_officedataconnector.go @@ -16,13 +16,26 @@ type OfficeDataConnector struct { Properties *OfficeDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s OfficeDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = OfficeDataConnector{} func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s OfficeDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling OfficeDataConnector: %+v", err) } + decoded["kind"] = "Office365" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_tidataconnector.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_tidataconnector.go index 208513ef9aa..c1a8de64c5f 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/model_tidataconnector.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/model_tidataconnector.go @@ -16,13 +16,26 @@ type TIDataConnector struct { Properties *TIDataConnectorProperties `json:"properties,omitempty"` // Fields inherited from DataConnector + Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` + Kind DataConnectorKind `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s TIDataConnector) DataConnector() BaseDataConnectorImpl { + return BaseDataConnectorImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = TIDataConnector{} func (s TIDataConnector) MarshalJSON() ([]byte, error) { @@ -34,9 +47,10 @@ func (s TIDataConnector) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling TIDataConnector: %+v", err) } + decoded["kind"] = "ThreatIntelligence" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/dataconnectors/version.go b/resource-manager/securityinsights/2024-03-01/dataconnectors/version.go index d857fb06a11..92fcf710566 100644 --- a/resource-manager/securityinsights/2024-03-01/dataconnectors/version.go +++ b/resource-manager/securityinsights/2024-03-01/dataconnectors/version.go @@ -1,12 +1,10 @@ package dataconnectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dataconnectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/dataconnectors/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/README.md b/resource-manager/securityinsights/2024-03-01/incidentalerts/README.md index 35d17059d65..a8fab36350b 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentalerts` Documentation -The `incidentalerts` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidentalerts` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/client.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/client.go index 53dc2b4cd4e..eb74a60490e 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/client.go @@ -15,7 +15,7 @@ type IncidentAlertsClient struct { } func NewIncidentAlertsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentAlertsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentalerts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentalerts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentAlertsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/id_incident.go index 0ab926f846f..f64480aacc4 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/method_incidentslistalerts.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/method_incidentslistalerts.go index a6b61790e56..62e926363cb 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/method_incidentslistalerts.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/method_incidentslistalerts.go @@ -46,7 +46,6 @@ func (c IncidentAlertsClient) IncidentsListAlerts(ctx context.Context, id Incide var model IncidentAlertList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_entity.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_entity.go index 8a6c7ffef8e..6276e2fe91a 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_entity.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_huntingbookmark.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_huntingbookmark.go index 827ded08f6d..4bc98105f79 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_securityalert.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_securityalert.go index 3935326a1d2..bf6de905783 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/model_securityalert.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidentalerts/version.go b/resource-manager/securityinsights/2024-03-01/incidentalerts/version.go index 6274cd10844..bce1355b6c4 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentalerts/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidentalerts/version.go @@ -1,12 +1,10 @@ package incidentalerts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentalerts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentalerts/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/README.md b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/README.md index db94c8be041..f35349175ad 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentbookmarks` Documentation -The `incidentbookmarks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidentbookmarks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/client.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/client.go index e6a60ede52d..8207d4048bc 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/client.go @@ -15,7 +15,7 @@ type IncidentBookmarksClient struct { } func NewIncidentBookmarksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentBookmarksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentbookmarks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentbookmarks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentBookmarksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/id_incident.go index fde40d40514..556531335b4 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/method_incidentslistbookmarks.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/method_incidentslistbookmarks.go index ea658d25e66..f067fc2e94e 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/method_incidentslistbookmarks.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/method_incidentslistbookmarks.go @@ -46,7 +46,6 @@ func (c IncidentBookmarksClient) IncidentsListBookmarks(ctx context.Context, id var model IncidentBookmarkList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_entity.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_entity.go index ac882c04383..dac6295bd01 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_entity.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_huntingbookmark.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_huntingbookmark.go index 1e9bfbf488f..10730d12eaa 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_securityalert.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_securityalert.go index a86152f3c69..0ffa9096236 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_securityalert.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/version.go b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/version.go index f847daadef8..a1f1cc02e61 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentbookmarks/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidentbookmarks/version.go @@ -1,12 +1,10 @@ package incidentbookmarks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentbookmarks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentbookmarks/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/README.md b/resource-manager/securityinsights/2024-03-01/incidentcomments/README.md index ae9fb4bde0a..6928bcddc05 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentcomments` Documentation -The `incidentcomments` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidentcomments` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/client.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/client.go index 981e6f75216..a31f83a2df1 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/client.go @@ -15,7 +15,7 @@ type IncidentCommentsClient struct { } func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentcomments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentcomments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentCommentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/id_comment.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/id_comment.go index 1c431622bbe..7493d91020f 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/id_comment.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/id_comment.go @@ -46,7 +46,7 @@ func ParseCommentID(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCommentIDInsensitively(input string) (*CommentId, error) { } id := CommentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/id_incident.go index d2940c0215e..401b7fef818 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_createorupdate.go index 6ea7a1ed4dc..a4e39abbb71 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentCommentsClient) CreateOrUpdate(ctx context.Context, id CommentId var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_get.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_get.go index 1942042dbea..f89f94e9882 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_get.go @@ -45,7 +45,6 @@ func (c IncidentCommentsClient) Get(ctx context.Context, id CommentId) (result G var model IncidentComment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_list.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_list.go index d7901e9ffbe..86596f39c17 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/incidentcomments/version.go b/resource-manager/securityinsights/2024-03-01/incidentcomments/version.go index 5a56db225c2..c17360b5868 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentcomments/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidentcomments/version.go @@ -1,12 +1,10 @@ package incidentcomments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentcomments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentcomments/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/README.md b/resource-manager/securityinsights/2024-03-01/incidententities/README.md index a9c93d394f6..92fdb8e2b7c 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidententities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidententities` Documentation -The `incidententities` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidententities` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/client.go b/resource-manager/securityinsights/2024-03-01/incidententities/client.go index 740e7b81755..43ea52910a4 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/client.go @@ -15,7 +15,7 @@ type IncidentEntitiesClient struct { } func NewIncidentEntitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentEntitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidententities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidententities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentEntitiesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidententities/id_incident.go index b50dad94732..6c521100609 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/method_incidentslistentities.go b/resource-manager/securityinsights/2024-03-01/incidententities/method_incidentslistentities.go index 2723b2f44a9..89451a71065 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/method_incidentslistentities.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/method_incidentslistentities.go @@ -46,7 +46,6 @@ func (c IncidentEntitiesClient) IncidentsListEntities(ctx context.Context, id In var model IncidentEntitiesResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/model_entity.go b/resource-manager/securityinsights/2024-03-01/incidententities/model_entity.go index 43a9a64c0bf..78b4d77ecf7 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/model_entity.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/model_entity.go @@ -4,24 +4,47 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Entity interface { + Entity() BaseEntityImpl +} + +var _ Entity = BaseEntityImpl{} + +type BaseEntityImpl struct { + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEntityImpl) Entity() BaseEntityImpl { + return s } -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Entity = RawEntityImpl{} + +// RawEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEntityImpl struct { + entity BaseEntityImpl Type string Values map[string]interface{} } -func unmarshalEntityImplementation(input []byte) (Entity, error) { +func (s RawEntityImpl) Entity() BaseEntityImpl { + return s.entity +} + +func UnmarshalEntityImplementation(input []byte) (Entity, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEntityImplementation(input []byte) (Entity, error) { return out, nil } - out := RawEntityImpl{ + var parent BaseEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEntityImpl: %+v", err) + } + + return RawEntityImpl{ + entity: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/model_huntingbookmark.go b/resource-manager/securityinsights/2024-03-01/incidententities/model_huntingbookmark.go index f001f6b783a..7c44dc5ae38 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/model_huntingbookmark.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/model_huntingbookmark.go @@ -16,12 +16,24 @@ type HuntingBookmark struct { Properties *HuntingBookmarkProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s HuntingBookmark) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = HuntingBookmark{} func (s HuntingBookmark) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s HuntingBookmark) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) } + decoded["kind"] = "Bookmark" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/model_incidententitiesresponse.go b/resource-manager/securityinsights/2024-03-01/incidententities/model_incidententitiesresponse.go index ab896895768..1ff0045f9ff 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/model_incidententitiesresponse.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/model_incidententitiesresponse.go @@ -37,7 +37,7 @@ func (s *IncidentEntitiesResponse) UnmarshalJSON(bytes []byte) error { output := make([]Entity, 0) for i, val := range listTemp { - impl, err := unmarshalEntityImplementation(val) + impl, err := UnmarshalEntityImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Entities' for 'IncidentEntitiesResponse': %+v", i, err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/model_securityalert.go b/resource-manager/securityinsights/2024-03-01/incidententities/model_securityalert.go index 9d570306524..77f4d3ce1d7 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/model_securityalert.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/model_securityalert.go @@ -16,12 +16,24 @@ type SecurityAlert struct { Properties *SecurityAlertProperties `json:"properties,omitempty"` // Fields inherited from Entity + Id *string `json:"id,omitempty"` + Kind EntityKindEnum `json:"kind"` Name *string `json:"name,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` } +func (s SecurityAlert) Entity() BaseEntityImpl { + return BaseEntityImpl{ + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } +} + var _ json.Marshaler = SecurityAlert{} func (s SecurityAlert) MarshalJSON() ([]byte, error) { @@ -33,9 +45,10 @@ func (s SecurityAlert) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) } + decoded["kind"] = "SecurityAlert" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/incidententities/version.go b/resource-manager/securityinsights/2024-03-01/incidententities/version.go index 903d3153e4e..0f1db917e5e 100644 --- a/resource-manager/securityinsights/2024-03-01/incidententities/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidententities/version.go @@ -1,12 +1,10 @@ package incidententities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidententities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidententities/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/README.md b/resource-manager/securityinsights/2024-03-01/incidentrelations/README.md index 4912a35f723..210d2f56dfe 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentrelations` Documentation -The `incidentrelations` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidentrelations` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/client.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/client.go index 4e8fbfeb71d..e3e4d587b2a 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/client.go @@ -15,7 +15,7 @@ type IncidentRelationsClient struct { } func NewIncidentRelationsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentRelationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidentrelations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidentrelations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentRelationsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/id_incident.go index 41d012358a0..bd4fa5b6110 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/id_relation.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/id_relation.go index e268009b90c..a8d5c47a374 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/id_relation.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/id_relation.go @@ -46,7 +46,7 @@ func ParseRelationID(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelationIDInsensitively(input string) (*RelationId, error) { } id := RelationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_createorupdate.go index 30fcaa14a14..a7bd11f7093 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentRelationsClient) CreateOrUpdate(ctx context.Context, id Relation var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_get.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_get.go index 70bd3924ffc..2633653c6c3 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_get.go @@ -45,7 +45,6 @@ func (c IncidentRelationsClient) Get(ctx context.Context, id RelationId) (result var model Relation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_list.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_list.go index 9605942dce1..956f692f05b 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/incidentrelations/version.go b/resource-manager/securityinsights/2024-03-01/incidentrelations/version.go index b84fa530ac9..b972b47a0fc 100644 --- a/resource-manager/securityinsights/2024-03-01/incidentrelations/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidentrelations/version.go @@ -1,12 +1,10 @@ package incidentrelations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidentrelations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidentrelations/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/README.md b/resource-manager/securityinsights/2024-03-01/incidents/README.md index 893d8895868..d975f1b2c4d 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidents` Documentation -The `incidents` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidents` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidents/client.go b/resource-manager/securityinsights/2024-03-01/incidents/client.go index aaf38071c39..5936eb290c5 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/client.go @@ -15,7 +15,7 @@ type IncidentsClient struct { } func NewIncidentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidents/id_incident.go index d6e96822028..f955d4254ef 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/id_workspace.go b/resource-manager/securityinsights/2024-03-01/incidents/id_workspace.go index 9667e33b904..ceec20de097 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/incidents/method_createorupdate.go index fc09e8a1cba..0a23b31f8bb 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentsClient) CreateOrUpdate(ctx context.Context, id IncidentId, inpu var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/method_get.go b/resource-manager/securityinsights/2024-03-01/incidents/method_get.go index c67e0bb22b8..ab5dc27a5e6 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/method_get.go @@ -45,7 +45,6 @@ func (c IncidentsClient) Get(ctx context.Context, id IncidentId) (result GetOper var model Incident result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/method_list.go b/resource-manager/securityinsights/2024-03-01/incidents/method_list.go index be48080a496..0a1ec15b8d8 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/incidents/version.go b/resource-manager/securityinsights/2024-03-01/incidents/version.go index cc9e11f2a41..3e00be88b66 100644 --- a/resource-manager/securityinsights/2024-03-01/incidents/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidents/version.go @@ -1,12 +1,10 @@ package incidents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidents/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/README.md b/resource-manager/securityinsights/2024-03-01/incidenttasks/README.md index e81af7e49b1..bed7725e400 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/README.md +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidenttasks` Documentation -The `incidenttasks` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `incidenttasks` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/client.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/client.go index 5d73a37a15b..ea48d965a55 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/client.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/client.go @@ -15,7 +15,7 @@ type IncidentTasksClient struct { } func NewIncidentTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "incidenttasks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "incidenttasks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IncidentTasksClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/id_incident.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/id_incident.go index dd4b529317f..d664a1852c4 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/id_task.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/id_task.go index 73f43e05cf5..53e990b3ded 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/id_task.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/id_task.go @@ -46,7 +46,7 @@ func ParseTaskID(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTaskIDInsensitively(input string) (*TaskId, error) { } id := TaskId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/method_createorupdate.go index f89ad53c5a3..183911e91ac 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IncidentTasksClient) CreateOrUpdate(ctx context.Context, id TaskId, inpu var model IncidentTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/method_get.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/method_get.go index 5b2f8ba083c..9207c01472f 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/method_get.go @@ -45,7 +45,6 @@ func (c IncidentTasksClient) Get(ctx context.Context, id TaskId) (result GetOper var model IncidentTask result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/incidenttasks/version.go b/resource-manager/securityinsights/2024-03-01/incidenttasks/version.go index 32a0d8277f2..4d872085c26 100644 --- a/resource-manager/securityinsights/2024-03-01/incidenttasks/version.go +++ b/resource-manager/securityinsights/2024-03-01/incidenttasks/version.go @@ -1,12 +1,10 @@ package incidenttasks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/incidenttasks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/incidenttasks/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/manualtrigger/README.md b/resource-manager/securityinsights/2024-03-01/manualtrigger/README.md index 8df4f76476f..603cb851057 100644 --- a/resource-manager/securityinsights/2024-03-01/manualtrigger/README.md +++ b/resource-manager/securityinsights/2024-03-01/manualtrigger/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/manualtrigger` Documentation -The `manualtrigger` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `manualtrigger` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/manualtrigger/client.go b/resource-manager/securityinsights/2024-03-01/manualtrigger/client.go index da5817ede95..fd31693bd51 100644 --- a/resource-manager/securityinsights/2024-03-01/manualtrigger/client.go +++ b/resource-manager/securityinsights/2024-03-01/manualtrigger/client.go @@ -15,7 +15,7 @@ type ManualTriggerClient struct { } func NewManualTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*ManualTriggerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manualtrigger", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manualtrigger", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManualTriggerClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/manualtrigger/id_entity.go b/resource-manager/securityinsights/2024-03-01/manualtrigger/id_entity.go index e5113388f49..a5061517b2e 100644 --- a/resource-manager/securityinsights/2024-03-01/manualtrigger/id_entity.go +++ b/resource-manager/securityinsights/2024-03-01/manualtrigger/id_entity.go @@ -44,7 +44,7 @@ func ParseEntityID(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEntityIDInsensitively(input string) (*EntityId, error) { } id := EntityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/manualtrigger/id_incident.go b/resource-manager/securityinsights/2024-03-01/manualtrigger/id_incident.go index 82ca3cb00a1..744eaedd53e 100644 --- a/resource-manager/securityinsights/2024-03-01/manualtrigger/id_incident.go +++ b/resource-manager/securityinsights/2024-03-01/manualtrigger/id_incident.go @@ -44,7 +44,7 @@ func ParseIncidentID(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIncidentIDInsensitively(input string) (*IncidentId, error) { } id := IncidentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/manualtrigger/version.go b/resource-manager/securityinsights/2024-03-01/manualtrigger/version.go index 9197a5daa6d..d104be6a341 100644 --- a/resource-manager/securityinsights/2024-03-01/manualtrigger/version.go +++ b/resource-manager/securityinsights/2024-03-01/manualtrigger/version.go @@ -1,12 +1,10 @@ package manualtrigger -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manualtrigger/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manualtrigger/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/README.md b/resource-manager/securityinsights/2024-03-01/metadata/README.md index 231c6443978..d9387975993 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/README.md +++ b/resource-manager/securityinsights/2024-03-01/metadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/metadata` Documentation -The `metadata` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `metadata` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/metadata/client.go b/resource-manager/securityinsights/2024-03-01/metadata/client.go index 59e4192159f..2f569e1f755 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/client.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/client.go @@ -15,7 +15,7 @@ type MetadataClient struct { } func NewMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*MetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "metadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "metadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MetadataClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/id_metadata.go b/resource-manager/securityinsights/2024-03-01/metadata/id_metadata.go index 5d97d463191..f117ec19858 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/id_metadata.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/id_metadata.go @@ -44,7 +44,7 @@ func ParseMetadataID(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseMetadataIDInsensitively(input string) (*MetadataId, error) { } id := MetadataId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/id_workspace.go b/resource-manager/securityinsights/2024-03-01/metadata/id_workspace.go index 6248b4d13cc..ed12f8f45bb 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/method_create.go b/resource-manager/securityinsights/2024-03-01/metadata/method_create.go index fd4a74a030a..72fc34ee83b 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/method_create.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/method_create.go @@ -50,7 +50,6 @@ func (c MetadataClient) Create(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/method_get.go b/resource-manager/securityinsights/2024-03-01/metadata/method_get.go index 68228f0b583..6e0fd8a6701 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/method_get.go @@ -45,7 +45,6 @@ func (c MetadataClient) Get(ctx context.Context, id MetadataId) (result GetOpera var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/method_list.go b/resource-manager/securityinsights/2024-03-01/metadata/method_list.go index 398be67d7f3..d02ed234668 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/method_update.go b/resource-manager/securityinsights/2024-03-01/metadata/method_update.go index e6911fcbc1d..3b55664e813 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/method_update.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/method_update.go @@ -49,7 +49,6 @@ func (c MetadataClient) Update(ctx context.Context, id MetadataId, input Metadat var model MetadataModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/metadata/version.go b/resource-manager/securityinsights/2024-03-01/metadata/version.go index f5ccbc22037..03842579978 100644 --- a/resource-manager/securityinsights/2024-03-01/metadata/version.go +++ b/resource-manager/securityinsights/2024-03-01/metadata/version.go @@ -1,12 +1,10 @@ package metadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/metadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/metadata/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/repositories/README.md b/resource-manager/securityinsights/2024-03-01/repositories/README.md index daacc3b4529..49b09a419d8 100644 --- a/resource-manager/securityinsights/2024-03-01/repositories/README.md +++ b/resource-manager/securityinsights/2024-03-01/repositories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/repositories` Documentation -The `repositories` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `repositories` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/repositories/client.go b/resource-manager/securityinsights/2024-03-01/repositories/client.go index 62b7be88387..47f8a158fd0 100644 --- a/resource-manager/securityinsights/2024-03-01/repositories/client.go +++ b/resource-manager/securityinsights/2024-03-01/repositories/client.go @@ -15,7 +15,7 @@ type RepositoriesClient struct { } func NewRepositoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*RepositoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "repositories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "repositories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RepositoriesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/repositories/id_workspace.go b/resource-manager/securityinsights/2024-03-01/repositories/id_workspace.go index d7e4ec6c5c6..27d7ac3cb13 100644 --- a/resource-manager/securityinsights/2024-03-01/repositories/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/repositories/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/repositories/version.go b/resource-manager/securityinsights/2024-03-01/repositories/version.go index 44e6fcb079c..2d9ed8ff9d1 100644 --- a/resource-manager/securityinsights/2024-03-01/repositories/version.go +++ b/resource-manager/securityinsights/2024-03-01/repositories/version.go @@ -1,12 +1,10 @@ package repositories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/repositories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/repositories/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/README.md b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/README.md index 3547c0cc0a6..822f308fc2e 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/README.md +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings` Documentation -The `securitymlanalyticssettings` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `securitymlanalyticssettings` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/client.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/client.go index 65b248a41f5..bb7dd6eae34 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/client.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/client.go @@ -15,7 +15,7 @@ type SecurityMLAnalyticsSettingsClient struct { } func NewSecurityMLAnalyticsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityMLAnalyticsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "securitymlanalyticssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SecurityMLAnalyticsSettingsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go index 31b3fe0787d..0b8b71149ab 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_securitymlanalyticssetting.go @@ -44,7 +44,7 @@ func ParseSecurityMLAnalyticsSettingID(input string) (*SecurityMLAnalyticsSettin } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSecurityMLAnalyticsSettingIDInsensitively(input string) (*SecurityMLAn } id := SecurityMLAnalyticsSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_workspace.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_workspace.go index 07bf58f2dc1..9158938cd5f 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_createorupdate.go index f08267b7fac..76bbda93ad2 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c SecurityMLAnalyticsSettingsClient) CreateOrUpdate(ctx context.Context, i if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_get.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_get.go index 9be89fdf974..678f1c490cb 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SecurityMLAnalyticsSetting + Model SecurityMLAnalyticsSetting } // Get ... @@ -48,11 +48,11 @@ func (c SecurityMLAnalyticsSettingsClient) Get(ctx context.Context, id SecurityM if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSecurityMLAnalyticsSettingImplementation(respObj) + model, err := UnmarshalSecurityMLAnalyticsSettingImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_list.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_list.go index 693e699ced1..23097e84286 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/method_list.go @@ -73,7 +73,7 @@ func (c SecurityMLAnalyticsSettingsClient) List(ctx context.Context, id Workspac temp := make([]SecurityMLAnalyticsSetting, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSecurityMLAnalyticsSettingImplementation(v) + val, err := UnmarshalSecurityMLAnalyticsSettingImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SecurityMLAnalyticsSetting (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go index 488f0b735f1..7f60dfacc57 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_anomalysecuritymlanalyticssettings.go @@ -16,11 +16,24 @@ type AnomalySecurityMLAnalyticsSettings struct { Properties *AnomalySecurityMLAnalyticsSettingsProperties `json:"properties,omitempty"` // Fields inherited from SecurityMLAnalyticsSetting - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s AnomalySecurityMLAnalyticsSettings) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return BaseSecurityMLAnalyticsSettingImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = AnomalySecurityMLAnalyticsSettings{} @@ -34,9 +47,10 @@ func (s AnomalySecurityMLAnalyticsSettings) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AnomalySecurityMLAnalyticsSettings: %+v", err) } + decoded["kind"] = "Anomaly" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go index 85a395baf6a..b08aec35208 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/model_securitymlanalyticssetting.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecurityMLAnalyticsSetting interface { + SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl +} + +var _ SecurityMLAnalyticsSetting = BaseSecurityMLAnalyticsSettingImpl{} + +type BaseSecurityMLAnalyticsSettingImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind SecurityMLAnalyticsSettingsKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s } -// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecurityMLAnalyticsSetting = RawSecurityMLAnalyticsSettingImpl{} + +// RawSecurityMLAnalyticsSettingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecurityMLAnalyticsSettingImpl struct { - Type string - Values map[string]interface{} + securityMLAnalyticsSetting BaseSecurityMLAnalyticsSettingImpl + Type string + Values map[string]interface{} } -func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { +func (s RawSecurityMLAnalyticsSettingImpl) SecurityMLAnalyticsSetting() BaseSecurityMLAnalyticsSettingImpl { + return s.securityMLAnalyticsSetting +} + +func UnmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityMLAnalyticsSetting, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalSecurityMLAnalyticsSettingImplementation(input []byte) (SecurityML return out, nil } - out := RawSecurityMLAnalyticsSettingImpl{ - Type: value, - Values: temp, + var parent BaseSecurityMLAnalyticsSettingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecurityMLAnalyticsSettingImpl: %+v", err) } - return out, nil + + return RawSecurityMLAnalyticsSettingImpl{ + securityMLAnalyticsSetting: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/version.go b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/version.go index 2da0023175f..f9dab497bba 100644 --- a/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/version.go +++ b/resource-manager/securityinsights/2024-03-01/securitymlanalyticssettings/version.go @@ -1,12 +1,10 @@ package securitymlanalyticssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitymlanalyticssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/securitymlanalyticssettings/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/README.md b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/README.md index 83f73d83dd3..9aa9720af16 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/README.md +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates` Documentation -The `sentinelonboardingstates` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `sentinelonboardingstates` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/client.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/client.go index 94701ed853a..cfbcc6f5419 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/client.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/client.go @@ -15,7 +15,7 @@ type SentinelOnboardingStatesClient struct { } func NewSentinelOnboardingStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*SentinelOnboardingStatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sentinelonboardingstates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SentinelOnboardingStatesClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_onboardingstate.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_onboardingstate.go index a0b15d704d4..18e7013bdba 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_onboardingstate.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_onboardingstate.go @@ -44,7 +44,7 @@ func ParseOnboardingStateID(input string) (*OnboardingStateId, error) { } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOnboardingStateIDInsensitively(input string) (*OnboardingStateId, erro } id := OnboardingStateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_workspace.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_workspace.go index 25f0d18c095..b5a31015a23 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_create.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_create.go index be0336fbcee..8049e43d14c 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_create.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_create.go @@ -50,7 +50,6 @@ func (c SentinelOnboardingStatesClient) Create(ctx context.Context, id Onboardin var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_get.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_get.go index e7b2c2cb86b..ff9b62feece 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_get.go @@ -45,7 +45,6 @@ func (c SentinelOnboardingStatesClient) Get(ctx context.Context, id OnboardingSt var model SentinelOnboardingState result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_list.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_list.go index d53893d7842..81a5556ad1e 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_list.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/method_list.go @@ -46,7 +46,6 @@ func (c SentinelOnboardingStatesClient) List(ctx context.Context, id WorkspaceId var model SentinelOnboardingStatesList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/version.go b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/version.go index 7d993036909..98b91b96929 100644 --- a/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/version.go +++ b/resource-manager/securityinsights/2024-03-01/sentinelonboardingstates/version.go @@ -1,12 +1,10 @@ package sentinelonboardingstates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sentinelonboardingstates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sentinelonboardingstates/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/README.md b/resource-manager/securityinsights/2024-03-01/sourcecontrols/README.md index 78011912b05..beacf092aef 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/README.md +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/sourcecontrols` Documentation -The `sourcecontrols` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `sourcecontrols` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/client.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/client.go index 9bfd651a63a..dbdb0796c4e 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/client.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/client.go @@ -15,7 +15,7 @@ type SourceControlsClient struct { } func NewSourceControlsClientWithBaseURI(sdkApi sdkEnv.Api) (*SourceControlsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sourcecontrols", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sourcecontrols", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SourceControlsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_sourcecontrol.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_sourcecontrol.go index e31a40901b7..0ad1c5d85d2 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_sourcecontrol.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_sourcecontrol.go @@ -44,7 +44,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_workspace.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_workspace.go index ebdc1ecef81..ad137251327 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_create.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_create.go index 5df3dad0407..46b404add12 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_create.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_create.go @@ -50,7 +50,6 @@ func (c SourceControlsClient) Create(ctx context.Context, id SourceControlId, in var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_delete.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_delete.go index 6595db63a3a..8f874685aa7 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_delete.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_delete.go @@ -50,7 +50,6 @@ func (c SourceControlsClient) Delete(ctx context.Context, id SourceControlId, in var model Warning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_get.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_get.go index dccc280d648..46bab9be734 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/method_get.go @@ -45,7 +45,6 @@ func (c SourceControlsClient) Get(ctx context.Context, id SourceControlId) (resu var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/sourcecontrols/version.go b/resource-manager/securityinsights/2024-03-01/sourcecontrols/version.go index 0cbffda719e..501a7f5435e 100644 --- a/resource-manager/securityinsights/2024-03-01/sourcecontrols/version.go +++ b/resource-manager/securityinsights/2024-03-01/sourcecontrols/version.go @@ -1,12 +1,10 @@ package sourcecontrols -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sourcecontrols/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sourcecontrols/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/README.md b/resource-manager/securityinsights/2024-03-01/threatintelligence/README.md index 4ffb7e51dda..b3a5d72c388 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/README.md +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/threatintelligence` Documentation -The `threatintelligence` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `threatintelligence` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/client.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/client.go index edf96c3143f..59e58da3228 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/client.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/client.go @@ -15,7 +15,7 @@ type ThreatIntelligenceClient struct { } func NewThreatIntelligenceClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreatIntelligenceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "threatintelligence", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "threatintelligence", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ThreatIntelligenceClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/id_indicator.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/id_indicator.go index 73373ce2134..3c473e1919e 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/id_indicator.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/id_indicator.go @@ -44,7 +44,7 @@ func ParseIndicatorID(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIndicatorIDInsensitively(input string) (*IndicatorId, error) { } id := IndicatorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/id_workspace.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/id_workspace.go index 2265507abcf..d96d7676ab4 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreate.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreate.go index 3cee598931c..af7a84f3880 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreate.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreate.go @@ -15,7 +15,7 @@ import ( type IndicatorCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreate ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreate(ctx context.Context, id Indica if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreateindicator.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreateindicator.go index 0f3ab94c4f5..05059855207 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreateindicator.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorcreateindicator.go @@ -16,7 +16,7 @@ import ( type IndicatorCreateIndicatorOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorCreateIndicator ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorCreateIndicator(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorget.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorget.go index 3358363f139..085ea71bf94 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorget.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorget.go @@ -15,7 +15,7 @@ import ( type IndicatorGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorGet ... @@ -48,11 +48,11 @@ func (c ThreatIntelligenceClient) IndicatorGet(ctx context.Context, id Indicator if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatormetricslist.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatormetricslist.go index f692c803e50..e2bea464351 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatormetricslist.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatormetricslist.go @@ -46,7 +46,6 @@ func (c ThreatIntelligenceClient) IndicatorMetricsList(ctx context.Context, id W var model ThreatIntelligenceMetricsList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorqueryindicators.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorqueryindicators.go index 27c6ce2648f..e2fdfa1225c 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorqueryindicators.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorqueryindicators.go @@ -73,7 +73,7 @@ func (c ThreatIntelligenceClient) IndicatorQueryIndicators(ctx context.Context, temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorreplacetags.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorreplacetags.go index 052bbe7b66a..873faa376b3 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorreplacetags.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorreplacetags.go @@ -16,7 +16,7 @@ import ( type IndicatorReplaceTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *ThreatIntelligenceInformation + Model ThreatIntelligenceInformation } // IndicatorReplaceTags ... @@ -53,11 +53,11 @@ func (c ThreatIntelligenceClient) IndicatorReplaceTags(ctx context.Context, id I if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalThreatIntelligenceInformationImplementation(respObj) + model, err := UnmarshalThreatIntelligenceInformationImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorslist.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorslist.go index 1757c99fda7..18256ce90e1 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorslist.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/method_indicatorslist.go @@ -42,6 +42,7 @@ func (o IndicatorsListOperationOptions) ToHeaders() *client.Headers { func (o IndicatorsListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -109,7 +110,7 @@ func (c ThreatIntelligenceClient) IndicatorsList(ctx context.Context, id Workspa temp := make([]ThreatIntelligenceInformation, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalThreatIntelligenceInformationImplementation(v) + val, err := UnmarshalThreatIntelligenceInformationImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for ThreatIntelligenceInformation (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceindicatormodel.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceindicatormodel.go index 9ee1b5778ed..3f036f4cadc 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceindicatormodel.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceindicatormodel.go @@ -16,11 +16,24 @@ type ThreatIntelligenceIndicatorModel struct { Properties *ThreatIntelligenceIndicatorProperties `json:"properties,omitempty"` // Fields inherited from ThreatIntelligenceInformation - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` + + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s ThreatIntelligenceIndicatorModel) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return BaseThreatIntelligenceInformationImpl{ + Etag: s.Etag, + Id: s.Id, + Kind: s.Kind, + Name: s.Name, + SystemData: s.SystemData, + Type: s.Type, + } } var _ json.Marshaler = ThreatIntelligenceIndicatorModel{} @@ -34,9 +47,10 @@ func (s ThreatIntelligenceIndicatorModel) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreatIntelligenceIndicatorModel: %+v", err) } + decoded["kind"] = "indicator" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceinformation.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceinformation.go index d036b649d26..4fc4734df84 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceinformation.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/model_threatintelligenceinformation.go @@ -4,24 +4,48 @@ import ( "encoding/json" "fmt" "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreatIntelligenceInformation interface { + ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl +} + +var _ ThreatIntelligenceInformation = BaseThreatIntelligenceInformationImpl{} + +type BaseThreatIntelligenceInformationImpl struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind ThreatIntelligenceResourceInnerKind `json:"kind"` + Name *string `json:"name,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s } -// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreatIntelligenceInformation = RawThreatIntelligenceInformationImpl{} + +// RawThreatIntelligenceInformationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreatIntelligenceInformationImpl struct { - Type string - Values map[string]interface{} + threatIntelligenceInformation BaseThreatIntelligenceInformationImpl + Type string + Values map[string]interface{} } -func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { +func (s RawThreatIntelligenceInformationImpl) ThreatIntelligenceInformation() BaseThreatIntelligenceInformationImpl { + return s.threatIntelligenceInformation +} + +func UnmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatIntelligenceInformation, error) { if input == nil { return nil, nil } @@ -44,10 +68,15 @@ func unmarshalThreatIntelligenceInformationImplementation(input []byte) (ThreatI return out, nil } - out := RawThreatIntelligenceInformationImpl{ - Type: value, - Values: temp, + var parent BaseThreatIntelligenceInformationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreatIntelligenceInformationImpl: %+v", err) } - return out, nil + + return RawThreatIntelligenceInformationImpl{ + threatIntelligenceInformation: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/securityinsights/2024-03-01/threatintelligence/version.go b/resource-manager/securityinsights/2024-03-01/threatintelligence/version.go index c5e0a19ce34..95d711d9399 100644 --- a/resource-manager/securityinsights/2024-03-01/threatintelligence/version.go +++ b/resource-manager/securityinsights/2024-03-01/threatintelligence/version.go @@ -1,12 +1,10 @@ package threatintelligence -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/threatintelligence/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/threatintelligence/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/README.md b/resource-manager/securityinsights/2024-03-01/watchlistitems/README.md index 639b083f0b4..c72315decfc 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/README.md +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/watchlistitems` Documentation -The `watchlistitems` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `watchlistitems` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/client.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/client.go index d3193694a48..f5126a4483d 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/client.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/client.go @@ -15,7 +15,7 @@ type WatchlistItemsClient struct { } func NewWatchlistItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlistitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlistitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistItemsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlist.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlist.go index 7df2e8c2562..398316c372f 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlist.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlistitem.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlistitem.go index 95aa9b8f56d..3a971d74b12 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlistitem.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/id_watchlistitem.go @@ -46,7 +46,7 @@ func ParseWatchlistItemID(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWatchlistItemIDInsensitively(input string) (*WatchlistItemId, error) { } id := WatchlistItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/method_createorupdate.go index 68142e971a8..1e71da4f4ef 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistItemsClient) CreateOrUpdate(ctx context.Context, id WatchlistIt var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/method_get.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/method_get.go index 1973c679f9e..6f2b74513da 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistItemsClient) Get(ctx context.Context, id WatchlistItemId) (resu var model WatchlistItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/watchlistitems/version.go b/resource-manager/securityinsights/2024-03-01/watchlistitems/version.go index 5111d6e7745..1144de0eb7b 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlistitems/version.go +++ b/resource-manager/securityinsights/2024-03-01/watchlistitems/version.go @@ -1,12 +1,10 @@ package watchlistitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlistitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlistitems/2024-03-01" } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/README.md b/resource-manager/securityinsights/2024-03-01/watchlists/README.md index ccb75842120..e6f646ef760 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/README.md +++ b/resource-manager/securityinsights/2024-03-01/watchlists/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/watchlists` Documentation -The `watchlists` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). +The `watchlists` SDK allows for interaction with Azure Resource Manager `securityinsights` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/client.go b/resource-manager/securityinsights/2024-03-01/watchlists/client.go index 45211175054..22f5472a0ad 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/client.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/client.go @@ -15,7 +15,7 @@ type WatchlistsClient struct { } func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "watchlists", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "watchlists", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WatchlistsClient: %+v", err) } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/id_watchlist.go b/resource-manager/securityinsights/2024-03-01/watchlists/id_watchlist.go index e5b47b1456e..ac459a108e6 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/id_watchlist.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/id_watchlist.go @@ -44,7 +44,7 @@ func ParseWatchlistID(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error) { } id := WatchlistId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/id_workspace.go b/resource-manager/securityinsights/2024-03-01/watchlists/id_workspace.go index d8e6bddfee7..6b8f7d79efb 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/id_workspace.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/method_createorupdate.go b/resource-manager/securityinsights/2024-03-01/watchlists/method_createorupdate.go index eb0b4f9396d..219b2a467eb 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/method_createorupdate.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/method_createorupdate.go @@ -50,7 +50,6 @@ func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, in var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/method_get.go b/resource-manager/securityinsights/2024-03-01/watchlists/method_get.go index 7aac16c3975..2b6dcd7e6da 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/method_get.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/method_get.go @@ -45,7 +45,6 @@ func (c WatchlistsClient) Get(ctx context.Context, id WatchlistId) (result GetOp var model Watchlist result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/securityinsights/2024-03-01/watchlists/version.go b/resource-manager/securityinsights/2024-03-01/watchlists/version.go index f6202dc7401..dbeb0c5d678 100644 --- a/resource-manager/securityinsights/2024-03-01/watchlists/version.go +++ b/resource-manager/securityinsights/2024-03-01/watchlists/version.go @@ -1,12 +1,10 @@ package watchlists -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/watchlists/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/watchlists/2024-03-01" } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/README.md b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/README.md index dff33503067..36f429efc9d 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/client.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index d78686c63d6..b0ba49d34a7 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 80f09c5d9de..c0f6c2ae3b9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go index d822b2f45ad..1cd3b121652 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability.go index e261ea340a0..b3426ed4357 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CheckNameAvailability(ctx context.Context var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go index 91215fd5302..9549eb3d609 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys.go index 220c9679815..ac1aae7ffae 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/method_listkeys.go @@ -46,7 +46,6 @@ func (c DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, id Disaster var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/version.go b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/version.go index 36f568cd68c..ea9eaee2d77 100644 --- a/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/README.md b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/README.md index 6c46f47222e..32ce9e0cc56 100644 --- a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/migrationconfigs` Documentation -The `migrationconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `migrationconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/client.go b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/client.go index 82acee82123..a57c43dd446 100644 --- a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/client.go @@ -15,7 +15,7 @@ type MigrationConfigsClient struct { } func NewMigrationConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/id_namespace.go index daa2f74622b..922ccd60bf3 100644 --- a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/method_get.go b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/method_get.go index 2aaf39c88f0..a2960aa1923 100644 --- a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/method_get.go @@ -46,7 +46,6 @@ func (c MigrationConfigsClient) Get(ctx context.Context, id NamespaceId) (result var model MigrationConfigProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/version.go b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/version.go index b9ecdc2a9e6..109b5d900d8 100644 --- a/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/migrationconfigs/version.go @@ -1,12 +1,10 @@ package migrationconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationconfigs/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/README.md b/resource-manager/servicebus/2021-06-01-preview/namespaces/README.md index fcca3b9adb4..20064a1d6a5 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/client.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/id_namespace.go index 4fe92d0f563..986f1a77493 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability.go index a9ae6f754a9..2870fd8d1f2 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset.go index e76e779ef82..6d1b6343858 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_createorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, id N var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get.go index d53457bd0f0..05fd5a0d22a 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset.go index f6767e352f1..373b726a418 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_getnetworkruleset.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetNetworkRuleSet(ctx context.Context, id NamespaceId) var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update.go index 10e3dd89ba6..98ca51285e1 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input SBNa var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespaces/version.go b/resource-manager/servicebus/2021-06-01-preview/namespaces/version.go index 90d6cc83354..b50bc2ff11e 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespaces/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/README.md b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/README.md index d0b6b63a623..4bd66be1922 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule` Documentation -The `namespacesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `namespacesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/client.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/client.go index a0c6e352d8c..809a1c20d92 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/client.go @@ -15,7 +15,7 @@ type NamespacesAuthorizationRuleClient struct { } func NewNamespacesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go index 763e3f9b652..b916f87d4a2 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go index fa39a9f46dc..b6e7bf7adf3 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go index 920a3777a5c..8241f93fca0 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesCreateOrUpdateAuthorization var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go index 7269769d225..51230fc9440 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesGetAuthorizationRule(ctx co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go index d298427cba4..6a93a6302fb 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesListKeys(ctx context.Contex var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go index 7de4cfbcda5..6ef65dd596e 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesRegenerateKeys(ctx context. var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/version.go b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/version.go index 885c529038e..b6b64c586e4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesauthorizationrule/version.go @@ -1,12 +1,10 @@ package namespacesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesauthorizationrule/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/README.md b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/README.md index 7075a413761..f45fab3a05e 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/client.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_namespace.go index 538949b9b25..46c5ee1c1d4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go index 2a5cc235e63..814f8e92a38 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index b1d36a16331..b5500f41aa6 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -50,7 +50,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/version.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/version.go index 68e335c3f05..f2a9d4fe638 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/README.md b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/README.md index db221c624c2..dbee3e6a4ed 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/client.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/id_namespace.go index f7727da7b1c..db91b794f92 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/version.go b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/version.go index 04b1f95c3e1..647a72353d1 100644 --- a/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/README.md b/resource-manager/servicebus/2021-06-01-preview/queues/README.md index 0e4e9288f7e..ff8eae7cc74 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/queues/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queues` Documentation -The `queues` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `queues` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/client.go b/resource-manager/servicebus/2021-06-01-preview/queues/client.go index fae8d74b48b..8abe908aa3a 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/client.go @@ -15,7 +15,7 @@ type QueuesClient struct { } func NewQueuesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queues", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queues", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go index 0e88b5e37fe..1e705baa94b 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go b/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go index 6518d2d350f..04a9edc35f4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate.go b/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate.go index eee33052bb5..35b83f53d1a 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/method_createorupdate.go @@ -49,7 +49,6 @@ func (c QueuesClient) CreateOrUpdate(ctx context.Context, id QueueId, input SBQu var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/method_get.go b/resource-manager/servicebus/2021-06-01-preview/queues/method_get.go index 4191a084c1d..3a6cb9046fe 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/method_get.go @@ -45,7 +45,6 @@ func (c QueuesClient) Get(ctx context.Context, id QueueId) (result GetOperationR var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace.go b/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace.go index 8c8839829fc..4c886c7a3d9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-06-01-preview/queues/version.go b/resource-manager/servicebus/2021-06-01-preview/queues/version.go index 49e5f391bc3..e19ddad1867 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queues/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/queues/version.go @@ -1,12 +1,10 @@ package queues -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queues/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queues/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/README.md b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/README.md index 5f09a842c30..65e50c970e9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule` Documentation -The `queuesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `queuesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/client.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/client.go index 3814c23f148..b16150ebb11 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/client.go @@ -15,7 +15,7 @@ type QueuesAuthorizationRuleClient struct { } func NewQueuesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go index 3f3a95c2ee2..0c280f49584 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go index 426c3a1273b..6f9d794c358 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go @@ -46,7 +46,7 @@ func ParseQueueAuthorizationRuleID(input string) (*QueueAuthorizationRuleId, err } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueueAuthorizationRuleIDInsensitively(input string) (*QueueAuthorizati } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go index bbd4c457fae..7d466204157 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c QueuesAuthorizationRuleClient) QueuesCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go index 39fc51065f0..29040ba18df 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c QueuesAuthorizationRuleClient) QueuesGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys.go index 0e46e6b16b5..a4f8ada9af5 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queueslistkeys.go @@ -46,7 +46,6 @@ func (c QueuesAuthorizationRuleClient) QueuesListKeys(ctx context.Context, id Qu var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go index b023ca0643a..76179d4340b 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go @@ -50,7 +50,6 @@ func (c QueuesAuthorizationRuleClient) QueuesRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/version.go b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/version.go index 65270c408ff..2faf90a0a1d 100644 --- a/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/queuesauthorizationrule/version.go @@ -1,12 +1,10 @@ package queuesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queuesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queuesauthorizationrule/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/README.md b/resource-manager/servicebus/2021-06-01-preview/rules/README.md index 80162617b4f..533aa3f9651 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `rules` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/client.go b/resource-manager/servicebus/2021-06-01-preview/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go b/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go index 17dbace32bb..905a758a827 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go b/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go index e757ae49a58..732ecec0e77 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate.go b/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate.go index 5276c2803f3..d44e0313dfd 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input Rule) var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions.go b/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions.go index 8c82af50502..c053b0d1bc4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/method_listbysubscriptions.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionsOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-06-01-preview/rules/version.go b/resource-manager/servicebus/2021-06-01-preview/rules/version.go index e9a07c4c058..f796c2e5099 100644 --- a/resource-manager/servicebus/2021-06-01-preview/rules/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/README.md b/resource-manager/servicebus/2021-06-01-preview/subscriptions/README.md index 08287c5e5dc..08e0c14ee11 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/client.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go index 852a424d8c1..58e246f506e 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go index c95ceb04121..cbf1b7da559 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go index 7967b7a7b80..8179f0743ca 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate.go index 901d06c89a2..748ff319e3d 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionsClient) CreateOrUpdate(ctx context.Context, id Subscription var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get.go index 6ea6dc0ce0b..e2a1ae18ad9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id Subscriptions2Id) (resu var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic.go index c4544d08fa8..381c0752335 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_listbytopic.go @@ -40,6 +40,7 @@ func (o ListByTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget.go index 5e64ad1526a..e0312e3b0f8 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/method_rulesget.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) RulesGet(ctx context.Context, id RuleId) (result Ru var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/subscriptions/version.go b/resource-manager/servicebus/2021-06-01-preview/subscriptions/version.go index 0ee9e9513ad..c5588cf2a18 100644 --- a/resource-manager/servicebus/2021-06-01-preview/subscriptions/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/README.md b/resource-manager/servicebus/2021-06-01-preview/topics/README.md index bff215cc2cc..e0a852f74ca 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `topics` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/client.go b/resource-manager/servicebus/2021-06-01-preview/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go b/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go index da652f14c17..9ebce0d3b5f 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go b/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go index 1d0c26757b8..1091dfa43da 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate.go b/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate.go index 6101e6f4579..f5b592cb521 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TopicsClient) CreateOrUpdate(ctx context.Context, id TopicId, input SBTo var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/method_get.go b/resource-manager/servicebus/2021-06-01-preview/topics/method_get.go index d58747892e9..5ca20491fb6 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/method_get.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace.go b/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace.go index 2c16062a76f..fa2869f8fb4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-06-01-preview/topics/version.go b/resource-manager/servicebus/2021-06-01-preview/topics/version.go index f30136ef355..13e5cd66919 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topics/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/README.md b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/README.md index 9f43c536d69..6aab1835ee0 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule` Documentation -The `topicsauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-06-01-preview`). +The `topicsauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-06-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/client.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/client.go index ccb288f2301..f8a239cc2b6 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/client.go @@ -15,7 +15,7 @@ type TopicsAuthorizationRuleClient struct { } func NewTopicsAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go index 63d2bdeaa5b..f3f05bd0f05 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go index e2abae1a862..61bcf8ff7c9 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go @@ -46,7 +46,7 @@ func ParseTopicAuthorizationRuleID(input string) (*TopicAuthorizationRuleId, err } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicAuthorizationRuleIDInsensitively(input string) (*TopicAuthorizati } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go index a2f8efa55c4..6e07fe35ad1 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c TopicsAuthorizationRuleClient) TopicsCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go index fd9be427a57..4fd3c49a451 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c TopicsAuthorizationRuleClient) TopicsGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys.go index 2d2cf65d77f..2085ad5457d 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicslistkeys.go @@ -46,7 +46,6 @@ func (c TopicsAuthorizationRuleClient) TopicsListKeys(ctx context.Context, id To var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go index 5bb9a92bbc3..39e981eddd5 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go @@ -50,7 +50,6 @@ func (c TopicsAuthorizationRuleClient) TopicsRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/version.go b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/version.go index 744b13fb7f3..7556d52bbd4 100644 --- a/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-06-01-preview/topicsauthorizationrule/version.go @@ -1,12 +1,10 @@ package topicsauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topicsauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topicsauthorizationrule/2021-06-01-preview" } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/README.md b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/README.md index d1008b37d89..71441f0b48c 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/README.md +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/client.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/client.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index d78686c63d6..b0ba49d34a7 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 80f09c5d9de..c0f6c2ae3b9 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_namespace.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_namespace.go index d822b2f45ad..1cd3b121652 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_checknameavailability.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_checknameavailability.go index e261ea340a0..b3426ed4357 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_checknameavailability.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CheckNameAvailability(ctx context.Context var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_get.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_getauthorizationrule.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_getauthorizationrule.go index 91215fd5302..9549eb3d609 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_getauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_listkeys.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_listkeys.go index 220c9679815..ac1aae7ffae 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_listkeys.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/method_listkeys.go @@ -46,7 +46,6 @@ func (c DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, id Disaster var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/version.go b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/version.go index fc3d33fb5be..5c56282b391 100644 --- a/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/version.go +++ b/resource-manager/servicebus/2021-11-01/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/migrationconfigs/README.md b/resource-manager/servicebus/2021-11-01/migrationconfigs/README.md index 1874f91d155..b30b3d3f3e3 100644 --- a/resource-manager/servicebus/2021-11-01/migrationconfigs/README.md +++ b/resource-manager/servicebus/2021-11-01/migrationconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/migrationconfigs` Documentation -The `migrationconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `migrationconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/migrationconfigs/client.go b/resource-manager/servicebus/2021-11-01/migrationconfigs/client.go index 82acee82123..a57c43dd446 100644 --- a/resource-manager/servicebus/2021-11-01/migrationconfigs/client.go +++ b/resource-manager/servicebus/2021-11-01/migrationconfigs/client.go @@ -15,7 +15,7 @@ type MigrationConfigsClient struct { } func NewMigrationConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/migrationconfigs/id_namespace.go b/resource-manager/servicebus/2021-11-01/migrationconfigs/id_namespace.go index daa2f74622b..922ccd60bf3 100644 --- a/resource-manager/servicebus/2021-11-01/migrationconfigs/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/migrationconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/migrationconfigs/method_get.go b/resource-manager/servicebus/2021-11-01/migrationconfigs/method_get.go index 2aaf39c88f0..a2960aa1923 100644 --- a/resource-manager/servicebus/2021-11-01/migrationconfigs/method_get.go +++ b/resource-manager/servicebus/2021-11-01/migrationconfigs/method_get.go @@ -46,7 +46,6 @@ func (c MigrationConfigsClient) Get(ctx context.Context, id NamespaceId) (result var model MigrationConfigProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/migrationconfigs/version.go b/resource-manager/servicebus/2021-11-01/migrationconfigs/version.go index 93a2f2ae6be..e0d1d0ff12a 100644 --- a/resource-manager/servicebus/2021-11-01/migrationconfigs/version.go +++ b/resource-manager/servicebus/2021-11-01/migrationconfigs/version.go @@ -1,12 +1,10 @@ package migrationconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationconfigs/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/README.md b/resource-manager/servicebus/2021-11-01/namespaces/README.md index ac61ea84879..7ef59f601c7 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/README.md +++ b/resource-manager/servicebus/2021-11-01/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/namespaces/client.go b/resource-manager/servicebus/2021-11-01/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/client.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/id_namespace.go b/resource-manager/servicebus/2021-11-01/namespaces/id_namespace.go index 4fe92d0f563..986f1a77493 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/method_checknameavailability.go b/resource-manager/servicebus/2021-11-01/namespaces/method_checknameavailability.go index a9ae6f754a9..2870fd8d1f2 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/method_checknameavailability.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/method_createorupdatenetworkruleset.go b/resource-manager/servicebus/2021-11-01/namespaces/method_createorupdatenetworkruleset.go index e76e779ef82..6d1b6343858 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/method_createorupdatenetworkruleset.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/method_createorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, id N var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/method_get.go b/resource-manager/servicebus/2021-11-01/namespaces/method_get.go index d53457bd0f0..05fd5a0d22a 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/method_get.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/method_getnetworkruleset.go b/resource-manager/servicebus/2021-11-01/namespaces/method_getnetworkruleset.go index f6767e352f1..373b726a418 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/method_getnetworkruleset.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/method_getnetworkruleset.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetNetworkRuleSet(ctx context.Context, id NamespaceId) var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/method_update.go b/resource-manager/servicebus/2021-11-01/namespaces/method_update.go index 10e3dd89ba6..98ca51285e1 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/method_update.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input SBNa var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespaces/version.go b/resource-manager/servicebus/2021-11-01/namespaces/version.go index e7fef9f37bd..6851872c2b7 100644 --- a/resource-manager/servicebus/2021-11-01/namespaces/version.go +++ b/resource-manager/servicebus/2021-11-01/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/README.md b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/README.md index 3b54a0a6be1..a3ac1f24c73 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule` Documentation -The `namespacesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `namespacesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/client.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/client.go index a0c6e352d8c..809a1c20d92 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/client.go @@ -15,7 +15,7 @@ type NamespacesAuthorizationRuleClient struct { } func NewNamespacesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_authorizationrule.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_authorizationrule.go index 763e3f9b652..b916f87d4a2 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_authorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_namespace.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_namespace.go index fa39a9f46dc..b6e7bf7adf3 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go index 920a3777a5c..8241f93fca0 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesCreateOrUpdateAuthorization var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go index 7269769d225..51230fc9440 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesGetAuthorizationRule(ctx co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespaceslistkeys.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespaceslistkeys.go index d298427cba4..6a93a6302fb 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespaceslistkeys.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesListKeys(ctx context.Contex var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesregeneratekeys.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesregeneratekeys.go index 7de4cfbcda5..6ef65dd596e 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesregeneratekeys.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesRegenerateKeys(ctx context. var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/version.go b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/version.go index 4e59b3d1c31..c0f1a05ad61 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule/version.go @@ -1,12 +1,10 @@ package namespacesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesauthorizationrule/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/README.md b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/README.md index caa2bc3e5ee..f17afab90a8 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/README.md +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/client.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/client.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_namespace.go index 538949b9b25..46c5ee1c1d4 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go index 2a5cc235e63..814f8e92a38 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/version.go b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/version.go index 334ca51e706..b5579ecd7a9 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/version.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/README.md b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/README.md index b8f38780b84..c0f1ebd4e6f 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/README.md +++ b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/client.go b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/client.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/id_namespace.go b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/id_namespace.go index f7727da7b1c..db91b794f92 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/version.go b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/version.go index 6370c521bfa..71b933e4665 100644 --- a/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/version.go +++ b/resource-manager/servicebus/2021-11-01/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/queues/README.md b/resource-manager/servicebus/2021-11-01/queues/README.md index d26dde2fec8..d9caa951454 100644 --- a/resource-manager/servicebus/2021-11-01/queues/README.md +++ b/resource-manager/servicebus/2021-11-01/queues/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/queues` Documentation -The `queues` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `queues` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/queues/client.go b/resource-manager/servicebus/2021-11-01/queues/client.go index fae8d74b48b..8abe908aa3a 100644 --- a/resource-manager/servicebus/2021-11-01/queues/client.go +++ b/resource-manager/servicebus/2021-11-01/queues/client.go @@ -15,7 +15,7 @@ type QueuesClient struct { } func NewQueuesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queues", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queues", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/queues/id_namespace.go b/resource-manager/servicebus/2021-11-01/queues/id_namespace.go index 0e88b5e37fe..1e705baa94b 100644 --- a/resource-manager/servicebus/2021-11-01/queues/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/queues/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/queues/id_queue.go b/resource-manager/servicebus/2021-11-01/queues/id_queue.go index 6518d2d350f..04a9edc35f4 100644 --- a/resource-manager/servicebus/2021-11-01/queues/id_queue.go +++ b/resource-manager/servicebus/2021-11-01/queues/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/queues/method_createorupdate.go b/resource-manager/servicebus/2021-11-01/queues/method_createorupdate.go index eee33052bb5..35b83f53d1a 100644 --- a/resource-manager/servicebus/2021-11-01/queues/method_createorupdate.go +++ b/resource-manager/servicebus/2021-11-01/queues/method_createorupdate.go @@ -49,7 +49,6 @@ func (c QueuesClient) CreateOrUpdate(ctx context.Context, id QueueId, input SBQu var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queues/method_get.go b/resource-manager/servicebus/2021-11-01/queues/method_get.go index 4191a084c1d..3a6cb9046fe 100644 --- a/resource-manager/servicebus/2021-11-01/queues/method_get.go +++ b/resource-manager/servicebus/2021-11-01/queues/method_get.go @@ -45,7 +45,6 @@ func (c QueuesClient) Get(ctx context.Context, id QueueId) (result GetOperationR var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queues/method_listbynamespace.go b/resource-manager/servicebus/2021-11-01/queues/method_listbynamespace.go index 8c8839829fc..4c886c7a3d9 100644 --- a/resource-manager/servicebus/2021-11-01/queues/method_listbynamespace.go +++ b/resource-manager/servicebus/2021-11-01/queues/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-11-01/queues/version.go b/resource-manager/servicebus/2021-11-01/queues/version.go index 2fc7d9d2fdb..edae403ef6b 100644 --- a/resource-manager/servicebus/2021-11-01/queues/version.go +++ b/resource-manager/servicebus/2021-11-01/queues/version.go @@ -1,12 +1,10 @@ package queues -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queues/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queues/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/README.md b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/README.md index 699126a3f49..405256c6083 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/queuesauthorizationrule` Documentation -The `queuesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `queuesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/client.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/client.go index 3814c23f148..b16150ebb11 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/client.go @@ -15,7 +15,7 @@ type QueuesAuthorizationRuleClient struct { } func NewQueuesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queue.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queue.go index 3f3a95c2ee2..0c280f49584 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queue.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queueauthorizationrule.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queueauthorizationrule.go index 426c3a1273b..6f9d794c358 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queueauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/id_queueauthorizationrule.go @@ -46,7 +46,7 @@ func ParseQueueAuthorizationRuleID(input string) (*QueueAuthorizationRuleId, err } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueueAuthorizationRuleIDInsensitively(input string) (*QueueAuthorizati } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go index bbd4c457fae..7d466204157 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c QueuesAuthorizationRuleClient) QueuesCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesgetauthorizationrule.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesgetauthorizationrule.go index 39fc51065f0..29040ba18df 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c QueuesAuthorizationRuleClient) QueuesGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queueslistkeys.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queueslistkeys.go index 0e46e6b16b5..a4f8ada9af5 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queueslistkeys.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queueslistkeys.go @@ -46,7 +46,6 @@ func (c QueuesAuthorizationRuleClient) QueuesListKeys(ctx context.Context, id Qu var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesregeneratekeys.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesregeneratekeys.go index b023ca0643a..76179d4340b 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesregeneratekeys.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/method_queuesregeneratekeys.go @@ -50,7 +50,6 @@ func (c QueuesAuthorizationRuleClient) QueuesRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/version.go b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/version.go index 79d45be1cd8..190d8333f12 100644 --- a/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-11-01/queuesauthorizationrule/version.go @@ -1,12 +1,10 @@ package queuesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queuesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queuesauthorizationrule/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/rules/README.md b/resource-manager/servicebus/2021-11-01/rules/README.md index 1cd785437df..8001172b41f 100644 --- a/resource-manager/servicebus/2021-11-01/rules/README.md +++ b/resource-manager/servicebus/2021-11-01/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `rules` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/rules/client.go b/resource-manager/servicebus/2021-11-01/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/servicebus/2021-11-01/rules/client.go +++ b/resource-manager/servicebus/2021-11-01/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/rules/id_rule.go b/resource-manager/servicebus/2021-11-01/rules/id_rule.go index 17dbace32bb..905a758a827 100644 --- a/resource-manager/servicebus/2021-11-01/rules/id_rule.go +++ b/resource-manager/servicebus/2021-11-01/rules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/rules/id_subscriptions2.go b/resource-manager/servicebus/2021-11-01/rules/id_subscriptions2.go index e757ae49a58..732ecec0e77 100644 --- a/resource-manager/servicebus/2021-11-01/rules/id_subscriptions2.go +++ b/resource-manager/servicebus/2021-11-01/rules/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/rules/method_createorupdate.go b/resource-manager/servicebus/2021-11-01/rules/method_createorupdate.go index 5276c2803f3..d44e0313dfd 100644 --- a/resource-manager/servicebus/2021-11-01/rules/method_createorupdate.go +++ b/resource-manager/servicebus/2021-11-01/rules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input Rule) var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/rules/method_listbysubscriptions.go b/resource-manager/servicebus/2021-11-01/rules/method_listbysubscriptions.go index 8c82af50502..c053b0d1bc4 100644 --- a/resource-manager/servicebus/2021-11-01/rules/method_listbysubscriptions.go +++ b/resource-manager/servicebus/2021-11-01/rules/method_listbysubscriptions.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionsOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-11-01/rules/version.go b/resource-manager/servicebus/2021-11-01/rules/version.go index f9b815fd152..b08c91fd9a5 100644 --- a/resource-manager/servicebus/2021-11-01/rules/version.go +++ b/resource-manager/servicebus/2021-11-01/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/README.md b/resource-manager/servicebus/2021-11-01/subscriptions/README.md index c6b4435ca1a..55422e62b84 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/README.md +++ b/resource-manager/servicebus/2021-11-01/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/client.go b/resource-manager/servicebus/2021-11-01/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/client.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/id_rule.go b/resource-manager/servicebus/2021-11-01/subscriptions/id_rule.go index 852a424d8c1..58e246f506e 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/id_rule.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/id_subscriptions2.go b/resource-manager/servicebus/2021-11-01/subscriptions/id_subscriptions2.go index c95ceb04121..cbf1b7da559 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/id_subscriptions2.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/id_topic.go b/resource-manager/servicebus/2021-11-01/subscriptions/id_topic.go index 7967b7a7b80..8179f0743ca 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/id_topic.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/method_createorupdate.go b/resource-manager/servicebus/2021-11-01/subscriptions/method_createorupdate.go index 901d06c89a2..748ff319e3d 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/method_createorupdate.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionsClient) CreateOrUpdate(ctx context.Context, id Subscription var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/method_get.go b/resource-manager/servicebus/2021-11-01/subscriptions/method_get.go index 6ea6dc0ce0b..e2a1ae18ad9 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/method_get.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id Subscriptions2Id) (resu var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/method_listbytopic.go b/resource-manager/servicebus/2021-11-01/subscriptions/method_listbytopic.go index c4544d08fa8..381c0752335 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/method_listbytopic.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/method_listbytopic.go @@ -40,6 +40,7 @@ func (o ListByTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/method_rulesget.go b/resource-manager/servicebus/2021-11-01/subscriptions/method_rulesget.go index 5e64ad1526a..e0312e3b0f8 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/method_rulesget.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/method_rulesget.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) RulesGet(ctx context.Context, id RuleId) (result Ru var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/subscriptions/version.go b/resource-manager/servicebus/2021-11-01/subscriptions/version.go index 6476d8295f2..dcd7d8e69a1 100644 --- a/resource-manager/servicebus/2021-11-01/subscriptions/version.go +++ b/resource-manager/servicebus/2021-11-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/topics/README.md b/resource-manager/servicebus/2021-11-01/topics/README.md index a582dac4b8f..8f7182901f2 100644 --- a/resource-manager/servicebus/2021-11-01/topics/README.md +++ b/resource-manager/servicebus/2021-11-01/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `topics` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/topics/client.go b/resource-manager/servicebus/2021-11-01/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/servicebus/2021-11-01/topics/client.go +++ b/resource-manager/servicebus/2021-11-01/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/topics/id_namespace.go b/resource-manager/servicebus/2021-11-01/topics/id_namespace.go index da652f14c17..9ebce0d3b5f 100644 --- a/resource-manager/servicebus/2021-11-01/topics/id_namespace.go +++ b/resource-manager/servicebus/2021-11-01/topics/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/topics/id_topic.go b/resource-manager/servicebus/2021-11-01/topics/id_topic.go index 1d0c26757b8..1091dfa43da 100644 --- a/resource-manager/servicebus/2021-11-01/topics/id_topic.go +++ b/resource-manager/servicebus/2021-11-01/topics/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/topics/method_createorupdate.go b/resource-manager/servicebus/2021-11-01/topics/method_createorupdate.go index 6101e6f4579..f5b592cb521 100644 --- a/resource-manager/servicebus/2021-11-01/topics/method_createorupdate.go +++ b/resource-manager/servicebus/2021-11-01/topics/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TopicsClient) CreateOrUpdate(ctx context.Context, id TopicId, input SBTo var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topics/method_get.go b/resource-manager/servicebus/2021-11-01/topics/method_get.go index d58747892e9..5ca20491fb6 100644 --- a/resource-manager/servicebus/2021-11-01/topics/method_get.go +++ b/resource-manager/servicebus/2021-11-01/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topics/method_listbynamespace.go b/resource-manager/servicebus/2021-11-01/topics/method_listbynamespace.go index 2c16062a76f..fa2869f8fb4 100644 --- a/resource-manager/servicebus/2021-11-01/topics/method_listbynamespace.go +++ b/resource-manager/servicebus/2021-11-01/topics/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2021-11-01/topics/version.go b/resource-manager/servicebus/2021-11-01/topics/version.go index d66d94e0b2b..52446321e7b 100644 --- a/resource-manager/servicebus/2021-11-01/topics/version.go +++ b/resource-manager/servicebus/2021-11-01/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2021-11-01" } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/README.md b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/README.md index 351e7523fbd..0faca187178 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/README.md +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/topicsauthorizationrule` Documentation -The `topicsauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2021-11-01`). +The `topicsauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2021-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/client.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/client.go index ccb288f2301..f8a239cc2b6 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/client.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/client.go @@ -15,7 +15,7 @@ type TopicsAuthorizationRuleClient struct { } func NewTopicsAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topic.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topic.go index 63d2bdeaa5b..f3f05bd0f05 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topic.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topicauthorizationrule.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topicauthorizationrule.go index e2abae1a862..61bcf8ff7c9 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topicauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/id_topicauthorizationrule.go @@ -46,7 +46,7 @@ func ParseTopicAuthorizationRuleID(input string) (*TopicAuthorizationRuleId, err } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicAuthorizationRuleIDInsensitively(input string) (*TopicAuthorizati } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go index a2f8efa55c4..6e07fe35ad1 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c TopicsAuthorizationRuleClient) TopicsCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsgetauthorizationrule.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsgetauthorizationrule.go index fd9be427a57..4fd3c49a451 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsgetauthorizationrule.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c TopicsAuthorizationRuleClient) TopicsGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicslistkeys.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicslistkeys.go index 2d2cf65d77f..2085ad5457d 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicslistkeys.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicslistkeys.go @@ -46,7 +46,6 @@ func (c TopicsAuthorizationRuleClient) TopicsListKeys(ctx context.Context, id To var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsregeneratekeys.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsregeneratekeys.go index 5bb9a92bbc3..39e981eddd5 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsregeneratekeys.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/method_topicsregeneratekeys.go @@ -50,7 +50,6 @@ func (c TopicsAuthorizationRuleClient) TopicsRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/version.go b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/version.go index 5740adcd595..61a1a0f573d 100644 --- a/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/version.go +++ b/resource-manager/servicebus/2021-11-01/topicsauthorizationrule/version.go @@ -1,12 +1,10 @@ package topicsauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topicsauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topicsauthorizationrule/2021-11-01" } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/README.md b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/README.md index f265439053b..b6dff1d9d75 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/client.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index d78686c63d6..b0ba49d34a7 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 80f09c5d9de..c0f6c2ae3b9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go index d822b2f45ad..1cd3b121652 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_checknameavailability.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_checknameavailability.go index e261ea340a0..b3426ed4357 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_checknameavailability.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CheckNameAvailability(ctx context.Context var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_get.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go index 91215fd5302..9549eb3d609 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_listkeys.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_listkeys.go index 220c9679815..ac1aae7ffae 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_listkeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/method_listkeys.go @@ -46,7 +46,6 @@ func (c DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, id Disaster var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/version.go b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/version.go index c5b9ab66d5a..aa68c9d847f 100644 --- a/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/README.md b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/README.md index fec9e151c37..dcc049fa8bd 100644 --- a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/migrationconfigs` Documentation -The `migrationconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `migrationconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/client.go b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/client.go index 82acee82123..a57c43dd446 100644 --- a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/client.go @@ -15,7 +15,7 @@ type MigrationConfigsClient struct { } func NewMigrationConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/id_namespace.go index daa2f74622b..922ccd60bf3 100644 --- a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/method_get.go b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/method_get.go index 2aaf39c88f0..a2960aa1923 100644 --- a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/method_get.go @@ -46,7 +46,6 @@ func (c MigrationConfigsClient) Get(ctx context.Context, id NamespaceId) (result var model MigrationConfigProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/version.go b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/version.go index 2215f661c58..a1890d69064 100644 --- a/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/migrationconfigs/version.go @@ -1,12 +1,10 @@ package migrationconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationconfigs/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/README.md b/resource-manager/servicebus/2022-01-01-preview/namespaces/README.md index 1b6d50704bb..b17355dc69d 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/client.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go index 4fe92d0f563..986f1a77493 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_checknameavailability.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_checknameavailability.go index a9ae6f754a9..2870fd8d1f2 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_checknameavailability.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_createorupdatenetworkruleset.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_createorupdatenetworkruleset.go index e76e779ef82..6d1b6343858 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_createorupdatenetworkruleset.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_createorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, id N var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_get.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_get.go index d53457bd0f0..05fd5a0d22a 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_getnetworkruleset.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_getnetworkruleset.go index f6767e352f1..373b726a418 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_getnetworkruleset.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_getnetworkruleset.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetNetworkRuleSet(ctx context.Context, id NamespaceId) var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_update.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_update.go index 10e3dd89ba6..98ca51285e1 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/method_update.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input SBNa var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespaces/version.go b/resource-manager/servicebus/2022-01-01-preview/namespaces/version.go index c7efc2b68fa..9fd656eff15 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespaces/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/README.md b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/README.md index ab657c6a022..a2a3412b8c5 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule` Documentation -The `namespacesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `namespacesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/client.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/client.go index a0c6e352d8c..809a1c20d92 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/client.go @@ -15,7 +15,7 @@ type NamespacesAuthorizationRuleClient struct { } func NewNamespacesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_authorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_authorizationrule.go index 763e3f9b652..b916f87d4a2 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_authorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_namespace.go index fa39a9f46dc..b6e7bf7adf3 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go index 920a3777a5c..8241f93fca0 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesCreateOrUpdateAuthorization var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go index 7269769d225..51230fc9440 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesGetAuthorizationRule(ctx co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go index d298427cba4..6a93a6302fb 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesListKeys(ctx context.Contex var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go index 7de4cfbcda5..6ef65dd596e 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesRegenerateKeys(ctx context. var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/version.go b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/version.go index 273baaf2d42..4fe0457df27 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesauthorizationrule/version.go @@ -1,12 +1,10 @@ package namespacesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesauthorizationrule/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/README.md b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/README.md index 8683ba01a75..397929171e3 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/client.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go index 538949b9b25..46c5ee1c1d4 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go index 2a5cc235e63..814f8e92a38 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/version.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/version.go index a5edb0291ad..009c372bdf9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/README.md b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/README.md index 58b7e86e415..9e58f0a5615 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/client.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go index f7727da7b1c..db91b794f92 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/version.go b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/version.go index 54548774e74..ba601d2f644 100644 --- a/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/README.md b/resource-manager/servicebus/2022-01-01-preview/queues/README.md index fbbf4052290..9fa9a45d2e2 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/queues/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/queues` Documentation -The `queues` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `queues` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/client.go b/resource-manager/servicebus/2022-01-01-preview/queues/client.go index fae8d74b48b..8abe908aa3a 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/client.go @@ -15,7 +15,7 @@ type QueuesClient struct { } func NewQueuesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queues", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queues", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/queues/id_namespace.go index 0e88b5e37fe..1e705baa94b 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/id_queue.go b/resource-manager/servicebus/2022-01-01-preview/queues/id_queue.go index 6518d2d350f..04a9edc35f4 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/id_queue.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/method_createorupdate.go b/resource-manager/servicebus/2022-01-01-preview/queues/method_createorupdate.go index eee33052bb5..35b83f53d1a 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/method_createorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/method_createorupdate.go @@ -49,7 +49,6 @@ func (c QueuesClient) CreateOrUpdate(ctx context.Context, id QueueId, input SBQu var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/method_get.go b/resource-manager/servicebus/2022-01-01-preview/queues/method_get.go index 4191a084c1d..3a6cb9046fe 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/method_get.go @@ -45,7 +45,6 @@ func (c QueuesClient) Get(ctx context.Context, id QueueId) (result GetOperationR var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/method_listbynamespace.go b/resource-manager/servicebus/2022-01-01-preview/queues/method_listbynamespace.go index 8c8839829fc..4c886c7a3d9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/method_listbynamespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-01-01-preview/queues/version.go b/resource-manager/servicebus/2022-01-01-preview/queues/version.go index b986856fe98..c3b64fc00bf 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queues/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/queues/version.go @@ -1,12 +1,10 @@ package queues -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queues/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queues/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/README.md b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/README.md index 4fe8dc4b7d4..97de43adb74 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule` Documentation -The `queuesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `queuesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/client.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/client.go index 3814c23f148..b16150ebb11 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/client.go @@ -15,7 +15,7 @@ type QueuesAuthorizationRuleClient struct { } func NewQueuesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queue.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queue.go index 3f3a95c2ee2..0c280f49584 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queue.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go index 426c3a1273b..6f9d794c358 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go @@ -46,7 +46,7 @@ func ParseQueueAuthorizationRuleID(input string) (*QueueAuthorizationRuleId, err } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueueAuthorizationRuleIDInsensitively(input string) (*QueueAuthorizati } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go index bbd4c457fae..7d466204157 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c QueuesAuthorizationRuleClient) QueuesCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go index 39fc51065f0..29040ba18df 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c QueuesAuthorizationRuleClient) QueuesGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queueslistkeys.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queueslistkeys.go index 0e46e6b16b5..a4f8ada9af5 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queueslistkeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queueslistkeys.go @@ -46,7 +46,6 @@ func (c QueuesAuthorizationRuleClient) QueuesListKeys(ctx context.Context, id Qu var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go index b023ca0643a..76179d4340b 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go @@ -50,7 +50,6 @@ func (c QueuesAuthorizationRuleClient) QueuesRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/version.go b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/version.go index a707f817664..e41cfe89c0a 100644 --- a/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/queuesauthorizationrule/version.go @@ -1,12 +1,10 @@ package queuesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queuesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queuesauthorizationrule/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/README.md b/resource-manager/servicebus/2022-01-01-preview/rules/README.md index 60d79bd624b..120819451c0 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `rules` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/client.go b/resource-manager/servicebus/2022-01-01-preview/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/id_rule.go b/resource-manager/servicebus/2022-01-01-preview/rules/id_rule.go index 17dbace32bb..905a758a827 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/id_rule.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/id_subscriptions2.go b/resource-manager/servicebus/2022-01-01-preview/rules/id_subscriptions2.go index e757ae49a58..732ecec0e77 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/id_subscriptions2.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/method_createorupdate.go b/resource-manager/servicebus/2022-01-01-preview/rules/method_createorupdate.go index 5276c2803f3..d44e0313dfd 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/method_createorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input Rule) var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/method_listbysubscriptions.go b/resource-manager/servicebus/2022-01-01-preview/rules/method_listbysubscriptions.go index 8c82af50502..c053b0d1bc4 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/method_listbysubscriptions.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/method_listbysubscriptions.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionsOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-01-01-preview/rules/version.go b/resource-manager/servicebus/2022-01-01-preview/rules/version.go index 4337dda144c..872f93144ac 100644 --- a/resource-manager/servicebus/2022-01-01-preview/rules/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/README.md b/resource-manager/servicebus/2022-01-01-preview/subscriptions/README.md index 9e1accee77b..4a8799bbc30 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/client.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_rule.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_rule.go index 852a424d8c1..58e246f506e 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_rule.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_subscriptions2.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_subscriptions2.go index c95ceb04121..cbf1b7da559 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_subscriptions2.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_topic.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_topic.go index 7967b7a7b80..8179f0743ca 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_topic.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_createorupdate.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_createorupdate.go index 901d06c89a2..748ff319e3d 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_createorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionsClient) CreateOrUpdate(ctx context.Context, id Subscription var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_get.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_get.go index 6ea6dc0ce0b..e2a1ae18ad9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id Subscriptions2Id) (resu var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_listbytopic.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_listbytopic.go index c4544d08fa8..381c0752335 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_listbytopic.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_listbytopic.go @@ -40,6 +40,7 @@ func (o ListByTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_rulesget.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_rulesget.go index 5e64ad1526a..e0312e3b0f8 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_rulesget.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/method_rulesget.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) RulesGet(ctx context.Context, id RuleId) (result Ru var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/subscriptions/version.go b/resource-manager/servicebus/2022-01-01-preview/subscriptions/version.go index 4d6ef4cd0b7..e314e8eb51f 100644 --- a/resource-manager/servicebus/2022-01-01-preview/subscriptions/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/README.md b/resource-manager/servicebus/2022-01-01-preview/topics/README.md index 360a0764aa8..aee9a923111 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `topics` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/client.go b/resource-manager/servicebus/2022-01-01-preview/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/id_namespace.go b/resource-manager/servicebus/2022-01-01-preview/topics/id_namespace.go index da652f14c17..9ebce0d3b5f 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/id_namespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/id_topic.go b/resource-manager/servicebus/2022-01-01-preview/topics/id_topic.go index 1d0c26757b8..1091dfa43da 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/id_topic.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/method_createorupdate.go b/resource-manager/servicebus/2022-01-01-preview/topics/method_createorupdate.go index 6101e6f4579..f5b592cb521 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/method_createorupdate.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TopicsClient) CreateOrUpdate(ctx context.Context, id TopicId, input SBTo var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/method_get.go b/resource-manager/servicebus/2022-01-01-preview/topics/method_get.go index d58747892e9..5ca20491fb6 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/method_get.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/method_listbynamespace.go b/resource-manager/servicebus/2022-01-01-preview/topics/method_listbynamespace.go index 2c16062a76f..fa2869f8fb4 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/method_listbynamespace.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-01-01-preview/topics/version.go b/resource-manager/servicebus/2022-01-01-preview/topics/version.go index 594b41a7b77..dfcc33a95e0 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topics/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/README.md b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/README.md index a303a02ae64..4b11aabba24 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule` Documentation -The `topicsauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-01-01-preview`). +The `topicsauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-01-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/client.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/client.go index ccb288f2301..f8a239cc2b6 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/client.go @@ -15,7 +15,7 @@ type TopicsAuthorizationRuleClient struct { } func NewTopicsAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topic.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topic.go index 63d2bdeaa5b..f3f05bd0f05 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topic.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go index e2abae1a862..61bcf8ff7c9 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go @@ -46,7 +46,7 @@ func ParseTopicAuthorizationRuleID(input string) (*TopicAuthorizationRuleId, err } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicAuthorizationRuleIDInsensitively(input string) (*TopicAuthorizati } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go index a2f8efa55c4..6e07fe35ad1 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c TopicsAuthorizationRuleClient) TopicsCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go index fd9be427a57..4fd3c49a451 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c TopicsAuthorizationRuleClient) TopicsGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicslistkeys.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicslistkeys.go index 2d2cf65d77f..2085ad5457d 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicslistkeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicslistkeys.go @@ -46,7 +46,6 @@ func (c TopicsAuthorizationRuleClient) TopicsListKeys(ctx context.Context, id To var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go index 5bb9a92bbc3..39e981eddd5 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go @@ -50,7 +50,6 @@ func (c TopicsAuthorizationRuleClient) TopicsRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/version.go b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/version.go index dff62a903b2..407c0fa036d 100644 --- a/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-01-01-preview/topicsauthorizationrule/version.go @@ -1,12 +1,10 @@ package topicsauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topicsauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topicsauthorizationrule/2022-01-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/README.md b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/README.md index 38157286142..923f43cf7ac 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs` Documentation -The `disasterrecoveryconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `disasterrecoveryconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/client.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/client.go index d3041d193c2..90cf91aa796 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/client.go @@ -15,7 +15,7 @@ type DisasterRecoveryConfigsClient struct { } func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "disasterrecoveryconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DisasterRecoveryConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go index d78686c63d6..b0ba49d34a7 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfig.go @@ -44,7 +44,7 @@ func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, err } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecovery } id := DisasterRecoveryConfigId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go index 80f09c5d9de..c0f6c2ae3b9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_disasterrecoveryconfigauthorizationrule.go @@ -46,7 +46,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterReco } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) ( } id := DisasterRecoveryConfigAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_namespace.go index d822b2f45ad..1cd3b121652 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_checknameavailability.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_checknameavailability.go index e261ea340a0..b3426ed4357 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_checknameavailability.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CheckNameAvailability(ctx context.Context var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_createorupdate.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_createorupdate.go index c3af61b7142..e1eee1022db 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_createorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, id Di var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_get.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_get.go index 2f089dba476..70681ee4902 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_get.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) Get(ctx context.Context, id DisasterRecov var model ArmDisasterRecovery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go index 91215fd5302..9549eb3d609 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_getauthorizationrule.go @@ -45,7 +45,6 @@ func (c DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_listkeys.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_listkeys.go index 220c9679815..ac1aae7ffae 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_listkeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/method_listkeys.go @@ -46,7 +46,6 @@ func (c DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, id Disaster var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/version.go b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/version.go index 87b26537654..dececb1931a 100644 --- a/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/disasterrecoveryconfigs/version.go @@ -1,12 +1,10 @@ package disasterrecoveryconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/disasterrecoveryconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/disasterrecoveryconfigs/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/README.md b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/README.md index 32360389b62..59eb5eda26c 100644 --- a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/migrationconfigs` Documentation -The `migrationconfigs` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `migrationconfigs` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/client.go b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/client.go index 82acee82123..a57c43dd446 100644 --- a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/client.go @@ -15,7 +15,7 @@ type MigrationConfigsClient struct { } func NewMigrationConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrationConfigsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrationconfigs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "migrationconfigs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MigrationConfigsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/id_namespace.go index daa2f74622b..922ccd60bf3 100644 --- a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/method_get.go b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/method_get.go index 2aaf39c88f0..a2960aa1923 100644 --- a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/method_get.go @@ -46,7 +46,6 @@ func (c MigrationConfigsClient) Get(ctx context.Context, id NamespaceId) (result var model MigrationConfigProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/version.go b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/version.go index 35ec7fb3c89..82efeba334d 100644 --- a/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/migrationconfigs/version.go @@ -1,12 +1,10 @@ package migrationconfigs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrationconfigs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/migrationconfigs/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/README.md b/resource-manager/servicebus/2022-10-01-preview/namespaces/README.md index 2858d698d86..f1bb92e72d1 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/namespaces` Documentation -The `namespaces` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `namespaces` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/client.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/client.go index c0bca4870e1..6a91c8e7de9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/client.go @@ -15,7 +15,7 @@ type NamespacesClient struct { } func NewNamespacesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/id_namespace.go index 4fe92d0f563..986f1a77493 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_checknameavailability.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_checknameavailability.go index a9ae6f754a9..2870fd8d1f2 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_checknameavailability.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c NamespacesClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_createorupdatenetworkruleset.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_createorupdatenetworkruleset.go index e76e779ef82..6d1b6343858 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_createorupdatenetworkruleset.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_createorupdatenetworkruleset.go @@ -50,7 +50,6 @@ func (c NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, id N var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_get.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_get.go index d53457bd0f0..05fd5a0d22a 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_get.go @@ -45,7 +45,6 @@ func (c NamespacesClient) Get(ctx context.Context, id NamespaceId) (result GetOp var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_getnetworkruleset.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_getnetworkruleset.go index f6767e352f1..373b726a418 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_getnetworkruleset.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_getnetworkruleset.go @@ -46,7 +46,6 @@ func (c NamespacesClient) GetNetworkRuleSet(ctx context.Context, id NamespaceId) var model NetworkRuleSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_update.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_update.go index 10e3dd89ba6..98ca51285e1 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/method_update.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/method_update.go @@ -51,7 +51,6 @@ func (c NamespacesClient) Update(ctx context.Context, id NamespaceId, input SBNa var model SBNamespace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespaces/version.go b/resource-manager/servicebus/2022-10-01-preview/namespaces/version.go index 2ed3f103ad1..7a4ba7a7a66 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespaces/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespaces/version.go @@ -1,12 +1,10 @@ package namespaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespaces/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/README.md b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/README.md index 8472369d197..13aa76b0f59 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule` Documentation -The `namespacesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `namespacesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/client.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/client.go index a0c6e352d8c..809a1c20d92 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/client.go @@ -15,7 +15,7 @@ type NamespacesAuthorizationRuleClient struct { } func NewNamespacesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_authorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_authorizationrule.go index 763e3f9b652..b916f87d4a2 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_authorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_authorizationrule.go @@ -44,7 +44,7 @@ func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error) { } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, } id := AuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_namespace.go index fa39a9f46dc..b6e7bf7adf3 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go index 920a3777a5c..8241f93fca0 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesCreateOrUpdateAuthorization var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go index 7269769d225..51230fc9440 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesGetAuthorizationRule(ctx co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go index d298427cba4..6a93a6302fb 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespaceslistkeys.go @@ -46,7 +46,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesListKeys(ctx context.Contex var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go index 7de4cfbcda5..6ef65dd596e 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/method_namespacesregeneratekeys.go @@ -50,7 +50,6 @@ func (c NamespacesAuthorizationRuleClient) NamespacesRegenerateKeys(ctx context. var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/version.go b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/version.go index 7bd436bc457..20bffe17950 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesauthorizationrule/version.go @@ -1,12 +1,10 @@ package namespacesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesauthorizationrule/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/README.md b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/README.md index ae329e6a51a..232b7bf2cac 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections` Documentation -The `namespacesprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `namespacesprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/client.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/client.go index 2c25eef7587..90808abe66a 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateEndpointConnectionsClient struct { } func NewNamespacesPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_namespace.go index 538949b9b25..46c5ee1c1d4 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go index 2a5cc235e63..814f8e92a38 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go index 0f6360ffa5d..9964c124dc7 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionscreateorupdate.go @@ -51,7 +51,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsCr var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go index c085d7b737f..ebc4ea09fcd 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c NamespacesPrivateEndpointConnectionsClient) PrivateEndpointConnectionsGe var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/version.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/version.go index 5b71ab0ba2b..9256c243ac0 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package namespacesprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivateendpointconnections/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/README.md b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/README.md index e94067263a9..971e4d62e40 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources` Documentation -The `namespacesprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `namespacesprivatelinkresources` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/client.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/client.go index 2163cd8fab5..8a02b37aac0 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/client.go @@ -15,7 +15,7 @@ type NamespacesPrivateLinkResourcesClient struct { } func NewNamespacesPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*NamespacesPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "namespacesprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NamespacesPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/id_namespace.go index f7727da7b1c..db91b794f92 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/version.go b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/version.go index d8ca25ff1f9..183e9eb0ae0 100644 --- a/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/namespacesprivatelinkresources/version.go @@ -1,12 +1,10 @@ package namespacesprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/namespacesprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/namespacesprivatelinkresources/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/README.md b/resource-manager/servicebus/2022-10-01-preview/queues/README.md index 4393dfdb07e..19fa8006610 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/queues/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/queues` Documentation -The `queues` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `queues` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/client.go b/resource-manager/servicebus/2022-10-01-preview/queues/client.go index fae8d74b48b..8abe908aa3a 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/client.go @@ -15,7 +15,7 @@ type QueuesClient struct { } func NewQueuesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queues", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queues", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/queues/id_namespace.go index 0e88b5e37fe..1e705baa94b 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/id_queue.go b/resource-manager/servicebus/2022-10-01-preview/queues/id_queue.go index 6518d2d350f..04a9edc35f4 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/id_queue.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/method_createorupdate.go b/resource-manager/servicebus/2022-10-01-preview/queues/method_createorupdate.go index eee33052bb5..35b83f53d1a 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/method_createorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/method_createorupdate.go @@ -49,7 +49,6 @@ func (c QueuesClient) CreateOrUpdate(ctx context.Context, id QueueId, input SBQu var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/method_get.go b/resource-manager/servicebus/2022-10-01-preview/queues/method_get.go index 4191a084c1d..3a6cb9046fe 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/method_get.go @@ -45,7 +45,6 @@ func (c QueuesClient) Get(ctx context.Context, id QueueId) (result GetOperationR var model SBQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/method_listbynamespace.go b/resource-manager/servicebus/2022-10-01-preview/queues/method_listbynamespace.go index 8c8839829fc..4c886c7a3d9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/method_listbynamespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-10-01-preview/queues/version.go b/resource-manager/servicebus/2022-10-01-preview/queues/version.go index ba76c8e5edb..dfbe229b976 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queues/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/queues/version.go @@ -1,12 +1,10 @@ package queues -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queues/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queues/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/README.md b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/README.md index b4918b70fc0..d237c7cb4e6 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule` Documentation -The `queuesauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `queuesauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/client.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/client.go index 3814c23f148..b16150ebb11 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/client.go @@ -15,7 +15,7 @@ type QueuesAuthorizationRuleClient struct { } func NewQueuesAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queuesauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueuesAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queue.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queue.go index 3f3a95c2ee2..0c280f49584 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queue.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go index 426c3a1273b..6f9d794c358 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/id_queueauthorizationrule.go @@ -46,7 +46,7 @@ func ParseQueueAuthorizationRuleID(input string) (*QueueAuthorizationRuleId, err } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueueAuthorizationRuleIDInsensitively(input string) (*QueueAuthorizati } id := QueueAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go index bbd4c457fae..7d466204157 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuescreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c QueuesAuthorizationRuleClient) QueuesCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go index 39fc51065f0..29040ba18df 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c QueuesAuthorizationRuleClient) QueuesGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queueslistkeys.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queueslistkeys.go index 0e46e6b16b5..a4f8ada9af5 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queueslistkeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queueslistkeys.go @@ -46,7 +46,6 @@ func (c QueuesAuthorizationRuleClient) QueuesListKeys(ctx context.Context, id Qu var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go index b023ca0643a..76179d4340b 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/method_queuesregeneratekeys.go @@ -50,7 +50,6 @@ func (c QueuesAuthorizationRuleClient) QueuesRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/version.go b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/version.go index 242a6467656..71b959bb9df 100644 --- a/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/queuesauthorizationrule/version.go @@ -1,12 +1,10 @@ package queuesauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queuesauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queuesauthorizationrule/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/README.md b/resource-manager/servicebus/2022-10-01-preview/rules/README.md index 0d33342d731..5528b30bce3 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/rules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/rules` Documentation -The `rules` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `rules` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/client.go b/resource-manager/servicebus/2022-10-01-preview/rules/client.go index d145cf8c38a..ee5a5154cef 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/client.go @@ -15,7 +15,7 @@ type RulesClient struct { } func NewRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*RulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "rules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "rules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RulesClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/id_rule.go b/resource-manager/servicebus/2022-10-01-preview/rules/id_rule.go index 17dbace32bb..905a758a827 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/id_rule.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/id_subscriptions2.go b/resource-manager/servicebus/2022-10-01-preview/rules/id_subscriptions2.go index e757ae49a58..732ecec0e77 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/id_subscriptions2.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/method_createorupdate.go b/resource-manager/servicebus/2022-10-01-preview/rules/method_createorupdate.go index 5276c2803f3..d44e0313dfd 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/method_createorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/method_createorupdate.go @@ -49,7 +49,6 @@ func (c RulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input Rule) var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/method_listbysubscriptions.go b/resource-manager/servicebus/2022-10-01-preview/rules/method_listbysubscriptions.go index 8c82af50502..c053b0d1bc4 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/method_listbysubscriptions.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/method_listbysubscriptions.go @@ -40,6 +40,7 @@ func (o ListBySubscriptionsOperationOptions) ToHeaders() *client.Headers { func (o ListBySubscriptionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-10-01-preview/rules/version.go b/resource-manager/servicebus/2022-10-01-preview/rules/version.go index 3ab4f3839e7..867776f8432 100644 --- a/resource-manager/servicebus/2022-10-01-preview/rules/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/rules/version.go @@ -1,12 +1,10 @@ package rules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/rules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/rules/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/README.md b/resource-manager/servicebus/2022-10-01-preview/subscriptions/README.md index ac1302132c0..df5ecf182b3 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/client.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_rule.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_rule.go index 852a424d8c1..58e246f506e 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_rule.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_rule.go @@ -48,7 +48,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_subscriptions2.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_subscriptions2.go index c95ceb04121..cbf1b7da559 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_subscriptions2.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_subscriptions2.go @@ -46,7 +46,7 @@ func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error) { } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error) } id := Subscriptions2Id{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_topic.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_topic.go index 7967b7a7b80..8179f0743ca 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_topic.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_createorupdate.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_createorupdate.go index 901d06c89a2..748ff319e3d 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_createorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c SubscriptionsClient) CreateOrUpdate(ctx context.Context, id Subscription var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_get.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_get.go index 6ea6dc0ce0b..e2a1ae18ad9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) Get(ctx context.Context, id Subscriptions2Id) (resu var model SBSubscription result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_listbytopic.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_listbytopic.go index c4544d08fa8..381c0752335 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_listbytopic.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_listbytopic.go @@ -40,6 +40,7 @@ func (o ListByTopicOperationOptions) ToHeaders() *client.Headers { func (o ListByTopicOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_rulesget.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_rulesget.go index 5e64ad1526a..e0312e3b0f8 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_rulesget.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/method_rulesget.go @@ -45,7 +45,6 @@ func (c SubscriptionsClient) RulesGet(ctx context.Context, id RuleId) (result Ru var model Rule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/subscriptions/version.go b/resource-manager/servicebus/2022-10-01-preview/subscriptions/version.go index ea07c273786..aa3b01ae570 100644 --- a/resource-manager/servicebus/2022-10-01-preview/subscriptions/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/README.md b/resource-manager/servicebus/2022-10-01-preview/topics/README.md index 933f75e53ed..870d297c7b1 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/topics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/topics` Documentation -The `topics` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `topics` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/client.go b/resource-manager/servicebus/2022-10-01-preview/topics/client.go index 0e7b8385566..f2c8eb0e68f 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/client.go @@ -15,7 +15,7 @@ type TopicsClient struct { } func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/id_namespace.go b/resource-manager/servicebus/2022-10-01-preview/topics/id_namespace.go index da652f14c17..9ebce0d3b5f 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/id_namespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/id_namespace.go @@ -42,7 +42,7 @@ func ParseNamespaceID(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error) { } id := NamespaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/id_topic.go b/resource-manager/servicebus/2022-10-01-preview/topics/id_topic.go index 1d0c26757b8..1091dfa43da 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/id_topic.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/method_createorupdate.go b/resource-manager/servicebus/2022-10-01-preview/topics/method_createorupdate.go index 6101e6f4579..f5b592cb521 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/method_createorupdate.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/method_createorupdate.go @@ -49,7 +49,6 @@ func (c TopicsClient) CreateOrUpdate(ctx context.Context, id TopicId, input SBTo var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/method_get.go b/resource-manager/servicebus/2022-10-01-preview/topics/method_get.go index d58747892e9..5ca20491fb6 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/method_get.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/method_get.go @@ -45,7 +45,6 @@ func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationR var model SBTopic result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/method_listbynamespace.go b/resource-manager/servicebus/2022-10-01-preview/topics/method_listbynamespace.go index 2c16062a76f..fa2869f8fb4 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/method_listbynamespace.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/method_listbynamespace.go @@ -40,6 +40,7 @@ func (o ListByNamespaceOperationOptions) ToHeaders() *client.Headers { func (o ListByNamespaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicebus/2022-10-01-preview/topics/version.go b/resource-manager/servicebus/2022-10-01-preview/topics/version.go index 763c62a6041..a01824855c9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topics/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/topics/version.go @@ -1,12 +1,10 @@ package topics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topics/2022-10-01-preview" } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/README.md b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/README.md index 3922543adbd..1bfb3b25172 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/README.md +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule` Documentation -The `topicsauthorizationrule` SDK allows for interaction with the Azure Resource Manager Service `servicebus` (API Version `2022-10-01-preview`). +The `topicsauthorizationrule` SDK allows for interaction with Azure Resource Manager `servicebus` (API Version `2022-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/client.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/client.go index ccb288f2301..f8a239cc2b6 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/client.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/client.go @@ -15,7 +15,7 @@ type TopicsAuthorizationRuleClient struct { } func NewTopicsAuthorizationRuleClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsAuthorizationRuleClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topicsauthorizationrule", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopicsAuthorizationRuleClient: %+v", err) } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topic.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topic.go index 63d2bdeaa5b..f3f05bd0f05 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topic.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topic.go @@ -44,7 +44,7 @@ func ParseTopicID(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTopicIDInsensitively(input string) (*TopicId, error) { } id := TopicId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go index e2abae1a862..61bcf8ff7c9 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/id_topicauthorizationrule.go @@ -46,7 +46,7 @@ func ParseTopicAuthorizationRuleID(input string) (*TopicAuthorizationRuleId, err } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTopicAuthorizationRuleIDInsensitively(input string) (*TopicAuthorizati } id := TopicAuthorizationRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go index a2f8efa55c4..6e07fe35ad1 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicscreateorupdateauthorizationrule.go @@ -49,7 +49,6 @@ func (c TopicsAuthorizationRuleClient) TopicsCreateOrUpdateAuthorizationRule(ctx var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go index fd9be427a57..4fd3c49a451 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsgetauthorizationrule.go @@ -45,7 +45,6 @@ func (c TopicsAuthorizationRuleClient) TopicsGetAuthorizationRule(ctx context.Co var model SBAuthorizationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicslistkeys.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicslistkeys.go index 2d2cf65d77f..2085ad5457d 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicslistkeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicslistkeys.go @@ -46,7 +46,6 @@ func (c TopicsAuthorizationRuleClient) TopicsListKeys(ctx context.Context, id To var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go index 5bb9a92bbc3..39e981eddd5 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/method_topicsregeneratekeys.go @@ -50,7 +50,6 @@ func (c TopicsAuthorizationRuleClient) TopicsRegenerateKeys(ctx context.Context, var model AccessKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/version.go b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/version.go index 6d696222f53..95789b276e3 100644 --- a/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/version.go +++ b/resource-manager/servicebus/2022-10-01-preview/topicsauthorizationrule/version.go @@ -1,12 +1,10 @@ package topicsauthorizationrule -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topicsauthorizationrule/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topicsauthorizationrule/2022-10-01-preview" } diff --git a/resource-manager/servicefabric/2021-06-01/application/README.md b/resource-manager/servicefabric/2021-06-01/application/README.md index 80053d3a7a2..d72a39f8d80 100644 --- a/resource-manager/servicefabric/2021-06-01/application/README.md +++ b/resource-manager/servicefabric/2021-06-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `application` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/application/client.go b/resource-manager/servicefabric/2021-06-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/servicefabric/2021-06-01/application/client.go +++ b/resource-manager/servicefabric/2021-06-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/application/id_application.go b/resource-manager/servicefabric/2021-06-01/application/id_application.go index 333be18be2b..2494c65889e 100644 --- a/resource-manager/servicefabric/2021-06-01/application/id_application.go +++ b/resource-manager/servicefabric/2021-06-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/application/id_cluster.go b/resource-manager/servicefabric/2021-06-01/application/id_cluster.go index c956ae45d1c..d17c0650411 100644 --- a/resource-manager/servicefabric/2021-06-01/application/id_cluster.go +++ b/resource-manager/servicefabric/2021-06-01/application/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/application/method_get.go b/resource-manager/servicefabric/2021-06-01/application/method_get.go index 6c37d8d5c58..88060f68bdc 100644 --- a/resource-manager/servicefabric/2021-06-01/application/method_get.go +++ b/resource-manager/servicefabric/2021-06-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/application/version.go b/resource-manager/servicefabric/2021-06-01/application/version.go index 91f0180f497..97204b02736 100644 --- a/resource-manager/servicefabric/2021-06-01/application/version.go +++ b/resource-manager/servicefabric/2021-06-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/README.md b/resource-manager/servicefabric/2021-06-01/applicationtype/README.md index 78358f546ab..b8dca7bbc24 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/README.md +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/applicationtype` Documentation -The `applicationtype` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `applicationtype` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/client.go b/resource-manager/servicefabric/2021-06-01/applicationtype/client.go index 08cc08e353a..175ade98a9c 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/client.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/client.go @@ -15,7 +15,7 @@ type ApplicationTypeClient struct { } func NewApplicationTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/id_applicationtype.go b/resource-manager/servicefabric/2021-06-01/applicationtype/id_applicationtype.go index 144d71b3472..1c4dd8e43a3 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/id_applicationtype.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/id_cluster.go b/resource-manager/servicefabric/2021-06-01/applicationtype/id_cluster.go index 9b65b04db10..44a840b1323 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/id_cluster.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/method_createorupdate.go b/resource-manager/servicefabric/2021-06-01/applicationtype/method_createorupdate.go index 3c3f226984c..e2dd6eee5e1 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/method_createorupdate.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) CreateOrUpdate(ctx context.Context, id Applicatio var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/method_get.go b/resource-manager/servicefabric/2021-06-01/applicationtype/method_get.go index 38112e40e44..631abb85b9f 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/method_get.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeClient) Get(ctx context.Context, id ApplicationTypeId) (r var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtype/version.go b/resource-manager/servicefabric/2021-06-01/applicationtype/version.go index 3d1547fa721..8ed7ce69e53 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtype/version.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtype/version.go @@ -1,12 +1,10 @@ package applicationtype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtype/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/README.md b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/README.md index e700efdd3e6..f81f3f426cc 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/README.md +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/applicationtypeversion` Documentation -The `applicationtypeversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `applicationtypeversion` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/client.go b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/client.go index fbfd96f6ea3..336e70571a3 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/client.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/client.go @@ -15,7 +15,7 @@ type ApplicationTypeVersionClient struct { } func NewApplicationTypeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtypeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtypeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeVersionClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_applicationtype.go b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_applicationtype.go index 149df029352..61a7ab7420d 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_applicationtype.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_version.go b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_version.go index 9cba9237cec..00733d7b1de 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_version.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/method_get.go b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/method_get.go index 94794cf4274..903417cddac 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/method_get.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeVersionClient) Get(ctx context.Context, id VersionId) (re var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/version.go b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/version.go index bff8d80d33a..07f7d572b8b 100644 --- a/resource-manager/servicefabric/2021-06-01/applicationtypeversion/version.go +++ b/resource-manager/servicefabric/2021-06-01/applicationtypeversion/version.go @@ -1,12 +1,10 @@ package applicationtypeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtypeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtypeversion/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/cluster/README.md b/resource-manager/servicefabric/2021-06-01/cluster/README.md index 04c87dd2753..976d9d9fbfa 100644 --- a/resource-manager/servicefabric/2021-06-01/cluster/README.md +++ b/resource-manager/servicefabric/2021-06-01/cluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/cluster` Documentation -The `cluster` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `cluster` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/cluster/client.go b/resource-manager/servicefabric/2021-06-01/cluster/client.go index 2a0e60ffb2b..dfc40b75394 100644 --- a/resource-manager/servicefabric/2021-06-01/cluster/client.go +++ b/resource-manager/servicefabric/2021-06-01/cluster/client.go @@ -15,7 +15,7 @@ type ClusterClient struct { } func NewClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go b/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go index 8a2c96a108b..45ce647976d 100644 --- a/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go +++ b/resource-manager/servicefabric/2021-06-01/cluster/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/cluster/method_get.go b/resource-manager/servicefabric/2021-06-01/cluster/method_get.go index 2b89d15b18f..8c04188eb0c 100644 --- a/resource-manager/servicefabric/2021-06-01/cluster/method_get.go +++ b/resource-manager/servicefabric/2021-06-01/cluster/method_get.go @@ -45,7 +45,6 @@ func (c ClusterClient) Get(ctx context.Context, id ClusterId) (result GetOperati var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/cluster/version.go b/resource-manager/servicefabric/2021-06-01/cluster/version.go index 06f520be686..5a3face9162 100644 --- a/resource-manager/servicefabric/2021-06-01/cluster/version.go +++ b/resource-manager/servicefabric/2021-06-01/cluster/version.go @@ -1,12 +1,10 @@ package cluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cluster/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/README.md b/resource-manager/servicefabric/2021-06-01/clusterversion/README.md index b3efa8ac6fe..651992a8d53 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/README.md +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/clusterversion` Documentation -The `clusterversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `clusterversion` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/client.go b/resource-manager/servicefabric/2021-06-01/clusterversion/client.go index 276b4fc5cc7..964343cbf9d 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/client.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/client.go @@ -15,7 +15,7 @@ type ClusterVersionClient struct { } func NewClusterVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusterversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusterversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterVersionClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/id_clusterversion.go b/resource-manager/servicefabric/2021-06-01/clusterversion/id_clusterversion.go index 1060098ff5b..bfb0f2c1d0e 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/id_clusterversion.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/id_clusterversion.go @@ -42,7 +42,7 @@ func ParseClusterVersionID(input string) (*ClusterVersionId, error) { } id := ClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterVersionIDInsensitively(input string) (*ClusterVersionId, error) } id := ClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/id_environment.go b/resource-manager/servicefabric/2021-06-01/clusterversion/id_environment.go index 8b8dc3aaa97..ee68cf12227 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/id_environment.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/id_environment.go @@ -42,7 +42,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/id_environmentclusterversion.go b/resource-manager/servicefabric/2021-06-01/clusterversion/id_environmentclusterversion.go index 97ecec55c98..744b673f711 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/id_environmentclusterversion.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/id_environmentclusterversion.go @@ -44,7 +44,7 @@ func ParseEnvironmentClusterVersionID(input string) (*EnvironmentClusterVersionI } id := EnvironmentClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEnvironmentClusterVersionIDInsensitively(input string) (*EnvironmentCl } id := EnvironmentClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/id_location.go b/resource-manager/servicefabric/2021-06-01/clusterversion/id_location.go index 92906763cc6..44a4c9a7f82 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/id_location.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/clusterversion/version.go b/resource-manager/servicefabric/2021-06-01/clusterversion/version.go index ea7f8e25bee..fa059c37d7b 100644 --- a/resource-manager/servicefabric/2021-06-01/clusterversion/version.go +++ b/resource-manager/servicefabric/2021-06-01/clusterversion/version.go @@ -1,12 +1,10 @@ package clusterversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusterversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusterversion/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/listupgradableversions/README.md b/resource-manager/servicefabric/2021-06-01/listupgradableversions/README.md index 7129f5acd35..d7879953703 100644 --- a/resource-manager/servicefabric/2021-06-01/listupgradableversions/README.md +++ b/resource-manager/servicefabric/2021-06-01/listupgradableversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/listupgradableversions` Documentation -The `listupgradableversions` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `listupgradableversions` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/listupgradableversions/client.go b/resource-manager/servicefabric/2021-06-01/listupgradableversions/client.go index 96a670cf50a..f404cf2fa01 100644 --- a/resource-manager/servicefabric/2021-06-01/listupgradableversions/client.go +++ b/resource-manager/servicefabric/2021-06-01/listupgradableversions/client.go @@ -15,7 +15,7 @@ type ListUpgradableVersionsClient struct { } func NewListUpgradableVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ListUpgradableVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "listupgradableversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "listupgradableversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ListUpgradableVersionsClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/listupgradableversions/id_cluster.go b/resource-manager/servicefabric/2021-06-01/listupgradableversions/id_cluster.go index a8e6801e263..08e821b1bf9 100644 --- a/resource-manager/servicefabric/2021-06-01/listupgradableversions/id_cluster.go +++ b/resource-manager/servicefabric/2021-06-01/listupgradableversions/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/listupgradableversions/method_clusterslistupgradableversions.go b/resource-manager/servicefabric/2021-06-01/listupgradableversions/method_clusterslistupgradableversions.go index f8032711756..2d920cd6f6e 100644 --- a/resource-manager/servicefabric/2021-06-01/listupgradableversions/method_clusterslistupgradableversions.go +++ b/resource-manager/servicefabric/2021-06-01/listupgradableversions/method_clusterslistupgradableversions.go @@ -50,7 +50,6 @@ func (c ListUpgradableVersionsClient) ClustersListUpgradableVersions(ctx context var model UpgradableVersionPathResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/listupgradableversions/version.go b/resource-manager/servicefabric/2021-06-01/listupgradableversions/version.go index d42019c51c5..dc68219b8cb 100644 --- a/resource-manager/servicefabric/2021-06-01/listupgradableversions/version.go +++ b/resource-manager/servicefabric/2021-06-01/listupgradableversions/version.go @@ -1,12 +1,10 @@ package listupgradableversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/listupgradableversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/listupgradableversions/2021-06-01" } diff --git a/resource-manager/servicefabric/2021-06-01/service/README.md b/resource-manager/servicefabric/2021-06-01/service/README.md index cc00cd2fe4c..188d3068859 100644 --- a/resource-manager/servicefabric/2021-06-01/service/README.md +++ b/resource-manager/servicefabric/2021-06-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabric/2021-06-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `servicefabric` (API Version `2021-06-01`). +The `service` SDK allows for interaction with Azure Resource Manager `servicefabric` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabric/2021-06-01/service/client.go b/resource-manager/servicefabric/2021-06-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/servicefabric/2021-06-01/service/client.go +++ b/resource-manager/servicefabric/2021-06-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/service/id_application.go b/resource-manager/servicefabric/2021-06-01/service/id_application.go index 87cce463a0b..3db7ca3726a 100644 --- a/resource-manager/servicefabric/2021-06-01/service/id_application.go +++ b/resource-manager/servicefabric/2021-06-01/service/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/service/id_service.go b/resource-manager/servicefabric/2021-06-01/service/id_service.go index 9c3b09c8577..eb35ed20491 100644 --- a/resource-manager/servicefabric/2021-06-01/service/id_service.go +++ b/resource-manager/servicefabric/2021-06-01/service/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabric/2021-06-01/service/method_get.go b/resource-manager/servicefabric/2021-06-01/service/method_get.go index c1b6af71b21..2828047b923 100644 --- a/resource-manager/servicefabric/2021-06-01/service/method_get.go +++ b/resource-manager/servicefabric/2021-06-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_namedpartitionschemedescription.go b/resource-manager/servicefabric/2021-06-01/service/model_namedpartitionschemedescription.go index 0de4e2c17fa..3200254a813 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_namedpartitionschemedescription.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_namedpartitionschemedescription.go @@ -15,6 +15,14 @@ type NamedPartitionSchemeDescription struct { Names []string `json:"names"` // Fields inherited from PartitionSchemeDescription + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionSchemeDescription) PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl { + return BasePartitionSchemeDescriptionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionSchemeDescription{} @@ -28,9 +36,10 @@ func (s NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionSchemeDescription: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabric/2021-06-01/service/model_partitionschemedescription.go b/resource-manager/servicefabric/2021-06-01/service/model_partitionschemedescription.go index fb03f13f53b..93f698bf0cf 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_partitionschemedescription.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_partitionschemedescription.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PartitionSchemeDescription interface { + PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl } -// RawPartitionSchemeDescriptionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PartitionSchemeDescription = BasePartitionSchemeDescriptionImpl{} + +type BasePartitionSchemeDescriptionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionSchemeDescriptionImpl) PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl { + return s +} + +var _ PartitionSchemeDescription = RawPartitionSchemeDescriptionImpl{} + +// RawPartitionSchemeDescriptionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionSchemeDescriptionImpl struct { - Type string - Values map[string]interface{} + partitionSchemeDescription BasePartitionSchemeDescriptionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionSchemeDescriptionImpl) PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl { + return s.partitionSchemeDescription } -func unmarshalPartitionSchemeDescriptionImplementation(input []byte) (PartitionSchemeDescription, error) { +func UnmarshalPartitionSchemeDescriptionImplementation(input []byte) (PartitionSchemeDescription, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionSchemeDescriptionImplementation(input []byte) (PartitionS return out, nil } - out := RawPartitionSchemeDescriptionImpl{ - Type: value, - Values: temp, + var parent BasePartitionSchemeDescriptionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionSchemeDescriptionImpl: %+v", err) } - return out, nil + + return RawPartitionSchemeDescriptionImpl{ + partitionSchemeDescription: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_serviceresource.go b/resource-manager/servicefabric/2021-06-01/service/model_serviceresource.go index 960dc76ec23..99ea438b588 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_serviceresource.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_serviceresource.go @@ -42,7 +42,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceproperties.go index 7af97b98078..194692c29c6 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceproperties.go @@ -10,18 +10,80 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription PartitionSchemeDescription `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ArmServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName *string `json:"serviceTypeName,omitempty"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServicePlacementPolicies = decoded.ServicePlacementPolicies + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionSchemeDescriptionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + return nil +} + +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +114,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdate.go b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdate.go index 635cc478651..8d9a904afed 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdate.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdate.go @@ -42,7 +42,7 @@ func (s *ServiceResourceUpdate) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourceUpdatePropertiesImplementation(v) + impl, err := UnmarshalServiceResourceUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResourceUpdate': %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdateproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdateproperties.go index 10fa17a9972..071477e1d54 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdateproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_serviceresourceupdateproperties.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceUpdateProperties interface { + ServiceResourceUpdateProperties() BaseServiceResourceUpdatePropertiesImpl } -// RawServiceResourceUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceUpdateProperties = BaseServiceResourceUpdatePropertiesImpl{} + +type BaseServiceResourceUpdatePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` +} + +func (s BaseServiceResourceUpdatePropertiesImpl) ServiceResourceUpdateProperties() BaseServiceResourceUpdatePropertiesImpl { + return s +} + +var _ ServiceResourceUpdateProperties = RawServiceResourceUpdatePropertiesImpl{} + +// RawServiceResourceUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourceUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceUpdateProperties BaseServiceResourceUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourceUpdatePropertiesImpl) ServiceResourceUpdateProperties() BaseServiceResourceUpdatePropertiesImpl { + return s.serviceResourceUpdateProperties } -func unmarshalServiceResourceUpdatePropertiesImplementation(input []byte) (ServiceResourceUpdateProperties, error) { +func UnmarshalServiceResourceUpdatePropertiesImplementation(input []byte) (ServiceResourceUpdateProperties, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalServiceResourceUpdatePropertiesImplementation(input []byte) (Servi return out, nil } - out := RawServiceResourceUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourceUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourceUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourceUpdatePropertiesImpl{ + serviceResourceUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_singletonpartitionschemedescription.go b/resource-manager/servicefabric/2021-06-01/service/model_singletonpartitionschemedescription.go index 8f3eb5a99c7..bf75a054533 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_singletonpartitionschemedescription.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_singletonpartitionschemedescription.go @@ -13,6 +13,14 @@ var _ PartitionSchemeDescription = SingletonPartitionSchemeDescription{} type SingletonPartitionSchemeDescription struct { // Fields inherited from PartitionSchemeDescription + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionSchemeDescription) PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl { + return BasePartitionSchemeDescriptionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionSchemeDescription{} @@ -26,9 +34,10 @@ func (s SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionSchemeDescription: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceproperties.go index b35b7616bd6..52380b30d01 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceproperties.go @@ -19,18 +19,36 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription PartitionSchemeDescription `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ArmServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` ServiceTypeName *string `json:"serviceTypeName,omitempty"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -42,9 +60,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -73,6 +92,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.QuorumLossWaitDuration = decoded.QuorumLossWaitDuration s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementPolicies = decoded.ServicePlacementPolicies @@ -86,7 +106,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionSchemeDescriptionImplementation(v) + impl, err := UnmarshalPartitionSchemeDescriptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceupdateproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceupdateproperties.go index 0e84f2435d6..d62ce88a001 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceupdateproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_statefulserviceupdateproperties.go @@ -18,13 +18,26 @@ type StatefulServiceUpdateProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceUpdateProperties + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PlacementConstraints *string `json:"placementConstraints,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` } +func (s StatefulServiceUpdateProperties) ServiceResourceUpdateProperties() BaseServiceResourceUpdatePropertiesImpl { + return BaseServiceResourceUpdatePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PlacementConstraints: s.PlacementConstraints, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePlacementPolicies: s.ServicePlacementPolicies, + } +} + var _ json.Marshaler = StatefulServiceUpdateProperties{} func (s StatefulServiceUpdateProperties) MarshalJSON() ([]byte, error) { @@ -36,9 +49,10 @@ func (s StatefulServiceUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceUpdateProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceproperties.go index 80cf6a794bc..a0b5285ee8c 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceproperties.go @@ -15,18 +15,36 @@ type StatelessServiceProperties struct { InstanceCount *int64 `json:"instanceCount,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription PartitionSchemeDescription `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ArmServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` ServiceTypeName *string `json:"serviceTypeName,omitempty"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -38,9 +56,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -67,6 +86,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.PlacementConstraints = decoded.PlacementConstraints s.ProvisioningState = decoded.ProvisioningState s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementPolicies = decoded.ServicePlacementPolicies @@ -78,7 +98,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionSchemeDescriptionImplementation(v) + impl, err := UnmarshalPartitionSchemeDescriptionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } diff --git a/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceupdateproperties.go b/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceupdateproperties.go index 02b8a487003..c2914993658 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceupdateproperties.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_statelessserviceupdateproperties.go @@ -15,13 +15,26 @@ type StatelessServiceUpdateProperties struct { InstanceCount *int64 `json:"instanceCount,omitempty"` // Fields inherited from ServiceResourceUpdateProperties + CorrelationScheme *[]ServiceCorrelationDescription `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PlacementConstraints *string `json:"placementConstraints,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"serviceLoadMetrics,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicyDescription `json:"servicePlacementPolicies,omitempty"` } +func (s StatelessServiceUpdateProperties) ServiceResourceUpdateProperties() BaseServiceResourceUpdatePropertiesImpl { + return BaseServiceResourceUpdatePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PlacementConstraints: s.PlacementConstraints, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePlacementPolicies: s.ServicePlacementPolicies, + } +} + var _ json.Marshaler = StatelessServiceUpdateProperties{} func (s StatelessServiceUpdateProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +46,10 @@ func (s StatelessServiceUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceUpdateProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabric/2021-06-01/service/model_uniformint64rangepartitionschemedescription.go b/resource-manager/servicefabric/2021-06-01/service/model_uniformint64rangepartitionschemedescription.go index 3ed99239380..24636bb6f62 100644 --- a/resource-manager/servicefabric/2021-06-01/service/model_uniformint64rangepartitionschemedescription.go +++ b/resource-manager/servicefabric/2021-06-01/service/model_uniformint64rangepartitionschemedescription.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionSchemeDescription struct { LowKey string `json:"lowKey"` // Fields inherited from PartitionSchemeDescription + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionSchemeDescription) PartitionSchemeDescription() BasePartitionSchemeDescriptionImpl { + return BasePartitionSchemeDescriptionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionSchemeDescription{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionSchemeDescription) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionSchemeDescription: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabric/2021-06-01/service/version.go b/resource-manager/servicefabric/2021-06-01/service/version.go index e3de9dd944d..971bee39fd5 100644 --- a/resource-manager/servicefabric/2021-06-01/service/version.go +++ b/resource-manager/servicefabric/2021-06-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2021-06-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/README.md index e655b433950..f1c373222f1 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `application` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_application.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_application.go index b7564fa70e1..53de28c6c51 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_managedcluster.go index b36cc1b41c6..4d06563a70f 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_get.go index 6c37d8d5c58..88060f68bdc 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_update.go index 290a1d5f26f..728febcf61d 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/version.go index 5a5478f9faa..24103ebac99 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/application/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/README.md index d0052475c25..6ea9d22c2cc 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype` Documentation -The `applicationtype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `applicationtype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/client.go index 08cc08e353a..175ade98a9c 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/client.go @@ -15,7 +15,7 @@ type ApplicationTypeClient struct { } func NewApplicationTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_applicationtype.go index 6b53a94684c..434a50890bf 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_managedcluster.go index a654b81e564..60b63a4e22b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_createorupdate.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_createorupdate.go index 3c3f226984c..e2dd6eee5e1 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_createorupdate.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) CreateOrUpdate(ctx context.Context, id Applicatio var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_get.go index 38112e40e44..631abb85b9f 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeClient) Get(ctx context.Context, id ApplicationTypeId) (r var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_update.go index 657c46f68a9..9581ef12a52 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) Update(ctx context.Context, id ApplicationTypeId, var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/version.go index 77b4044da71..b5c87f2214b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtype/version.go @@ -1,12 +1,10 @@ package applicationtype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtype/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/README.md index de5ba07a7c9..0ddbbcd51a4 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion` Documentation -The `applicationtypeversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `applicationtypeversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/client.go index fbfd96f6ea3..336e70571a3 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/client.go @@ -15,7 +15,7 @@ type ApplicationTypeVersionClient struct { } func NewApplicationTypeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtypeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtypeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_applicationtype.go index 9ed6c9b5f69..c992a1efa64 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_version.go index f66f60d87f9..cc05b9419a6 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_get.go index 94794cf4274..903417cddac 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeVersionClient) Get(ctx context.Context, id VersionId) (re var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_update.go index 9d6b032e644..83eee8c820e 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeVersionClient) Update(ctx context.Context, id VersionId, var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/version.go index 3b36f78ceb9..7231ec64a28 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/applicationtypeversion/version.go @@ -1,12 +1,10 @@ package applicationtypeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtypeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtypeversion/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md index 93cd824ff2a..bcbf90890f9 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster` Documentation -The `managedcluster` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `managedcluster` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/client.go index 14c21d22764..2fc4e18bbbf 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/client.go @@ -15,7 +15,7 @@ type ManagedClusterClient struct { } func NewManagedClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go index ff8dcd9645d..432cd1f8eec 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get.go index f7c939b1bfe..1bb7c311f59 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterClient) Get(ctx context.Context, id ManagedClusterId) (res var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update.go index 7b34690f35e..cf624f79925 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/method_update.go @@ -49,7 +49,6 @@ func (c ManagedClusterClient) Update(ctx context.Context, id ManagedClusterId, i var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/version.go index 795d386419d..ac50183570b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedcluster/version.go @@ -1,12 +1,10 @@ package managedcluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcluster/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/README.md index 549e3c5e1f2..1f59cef7133 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion` Documentation -The `managedclusterversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `managedclusterversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/client.go index 4221e0cb422..0e83c493cb7 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/client.go @@ -15,7 +15,7 @@ type ManagedClusterVersionClient struct { } func NewManagedClusterVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusterversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusterversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_environmentmanagedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_environmentmanagedclusterversion.go index 2b18952e624..136a2b12ab5 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_environmentmanagedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_environmentmanagedclusterversion.go @@ -42,7 +42,7 @@ func ParseEnvironmentManagedClusterVersionID(input string) (*EnvironmentManagedC } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentManagedClusterVersionIDInsensitively(input string) (*Enviro } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_location.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_location.go index 7255c7f6544..b0d7f2d46ff 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_location.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_managedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_managedclusterversion.go index 8f0ba72ae5a..03863cfde30 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_managedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/id_managedclusterversion.go @@ -42,7 +42,7 @@ func ParseManagedClusterVersionID(input string) (*ManagedClusterVersionId, error } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterVersionIDInsensitively(input string) (*ManagedClusterVer } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_get.go index 219e7a78f57..13fce844840 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) Get(ctx context.Context, id ManagedClusterV var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_getbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_getbyenvironment.go index a22533b1b11..9bb6ec62c2c 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_getbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_getbyenvironment.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) GetByEnvironment(ctx context.Context, id En var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_list.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_list.go index 2074f6b62e2..0aa181cc759 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_list.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_list.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) List(ctx context.Context, id LocationId) (r var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_listbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_listbyenvironment.go index 116e3b58591..c19dc4c360a 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_listbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) ListByEnvironment(ctx context.Context, id L var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/version.go index 6499ec220f9..41e18c1109a 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/managedclusterversion/version.go @@ -1,12 +1,10 @@ package managedclusterversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusterversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusterversion/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md index 26b58580e56..c8d383d43eb 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype` Documentation -The `nodetype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `nodetype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/client.go index ae6880601d4..8ee7d2c73ea 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/client.go @@ -15,7 +15,7 @@ type NodeTypeClient struct { } func NewNodeTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodetype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodetype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go index 045b223bc19..93934c450bc 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go index b6155dff9ad..f342570f8ce 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/id_nodetype.go @@ -44,7 +44,7 @@ func ParseNodeTypeID(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeTypeIDInsensitively(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get.go index ce7c44fb0e1..aa9a394de9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_get.go @@ -45,7 +45,6 @@ func (c NodeTypeClient) Get(ctx context.Context, id NodeTypeId) (result GetOpera var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update.go index 0b922d8e9e0..561e3dc1067 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/method_update.go @@ -49,7 +49,6 @@ func (c NodeTypeClient) Update(ctx context.Context, id NodeTypeId, input NodeTyp var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/version.go index fe315c18281..4e97d1afbe2 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/nodetype/version.go @@ -1,12 +1,10 @@ package nodetype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodetype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodetype/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/README.md index 69f8356df30..d79f1910c7a 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `service` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_application.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_application.go index fdd8e3d27de..14a9e9d6b0f 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_service.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_service.go index 511ab65f576..65b988aa99b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/method_get.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/method_get.go index c1b6af71b21..2828047b923 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go index 05d633cb2d4..a6178ef9f06 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averagepartitionloadscalingtrigger.go index 772f397c500..135a84653be 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averageserviceloadscalingtrigger.go index e811f2a7ca6..825d9a0ada0 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_namedpartitionscheme.go index f8190557f3d..3a77f00a98c 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partition.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partition.go index 4ef9596a357..ee46ba1bf9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partitioninstancecountscalemechanism.go index 9b9ddde17bf..20bd6366848 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingmechanism.go index 19b84f9e2f3..d5d208ed050 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingpolicy.go index c507f71e65c..4863900fa25 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingtrigger.go index 84a29169ef3..44a9b69ee82 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementinvaliddomainpolicy.go index ed256b68ab2..5c5b4bdea86 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go index fd6ecbc222c..6404d0d3c49 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpolicy.go index 0b0d9c8732e..7fa6f1db9c2 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpreferprimarydomainpolicy.go index 6df5a2f8689..b7311619302 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequireddomainpolicy.go index d7acb1a7bbc..1463783983f 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequiredomaindistributionpolicy.go index dbef3589507..2d75f36f69d 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresource.go index aaa2eacfa68..303f0c27161 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresourceproperties.go index 7af97b98078..e658119b346 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_serviceresourceproperties.go @@ -10,18 +10,96 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +130,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_singletonpartitionscheme.go index 733fa123a97..e96275a2521 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statefulserviceproperties.go index 7c1157ddab9..03b638c6cb6 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statefulserviceproperties.go @@ -20,18 +20,36 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -43,9 +61,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -74,6 +93,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.QuorumLossWaitDuration = decoded.QuorumLossWaitDuration s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -87,7 +107,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -102,7 +122,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statelessserviceproperties.go index e2354eb7450..595e4a97cf2 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_statelessserviceproperties.go @@ -16,18 +16,36 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -39,9 +57,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -69,6 +88,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.PlacementConstraints = decoded.PlacementConstraints s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -79,7 +99,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -94,7 +114,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_uniformint64rangepartitionscheme.go index 7dc8a57063d..99977392f11 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/version.go index 5e7623d83ea..9492e88d4e9 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/service/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/README.md b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/README.md index 8ce967aec47..1960e193a05 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/README.md +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2021-05-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2021-05-01`). +The `services` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2021-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/client.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/client.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/id_service.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/id_service.go index 880fd20f767..8f23211ef1a 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/method_update.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/method_update.go index 6568dd496b4..819f50befc6 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/method_update.go @@ -49,7 +49,6 @@ func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceU var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go index 1f1338f342e..14bcbc805ec 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averagepartitionloadscalingtrigger.go index 723b0ba3d81..5f003b45da2 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averageserviceloadscalingtrigger.go index 4600d2f3f69..725f21558dd 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_namedpartitionscheme.go index a915dbaa91e..305fa1b782a 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partition.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partition.go index 364ee85f2ec..dc9d7719167 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partitioninstancecountscalemechanism.go index 53db82dd0b3..baad18a4d98 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingmechanism.go index 5b2b35b971b..8a10e8b60cd 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingpolicy.go index 801d6b13753..ee96054f4a8 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingtrigger.go index c555bee6d53..fc16de4a4fd 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementinvaliddomainpolicy.go index cbe686c0670..f45b7ff0e3d 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go index 5f377149c98..465c8012076 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpolicy.go index 819b7ae2dbc..5714ac019ab 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpreferprimarydomainpolicy.go index c1036554340..3eb8fa14fb2 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequireddomainpolicy.go index 30f269c6387..c8d09e23a63 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequiredomaindistributionpolicy.go index 43ea090c44e..acd6cec3511 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresource.go index fdc4df6adfb..d1acb83b967 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresourceproperties.go index f26311c14ee..5922385aed7 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_serviceresourceproperties.go @@ -10,18 +10,96 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +130,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_singletonpartitionscheme.go index 4f463746341..b0537f21ddf 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statefulserviceproperties.go index 7e03810cc50..db55a1790a7 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statefulserviceproperties.go @@ -20,18 +20,36 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -43,9 +61,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -74,6 +93,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.QuorumLossWaitDuration = decoded.QuorumLossWaitDuration s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -87,7 +107,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -102,7 +122,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statelessserviceproperties.go index a879ada6b2c..f1740ffa2ae 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_statelessserviceproperties.go @@ -16,18 +16,36 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -39,9 +57,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -69,6 +88,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.PlacementConstraints = decoded.PlacementConstraints s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -79,7 +99,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -94,7 +114,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_uniformint64rangepartitionscheme.go index 573d905f9be..f59603e978b 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/version.go b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/version.go index 57b5480b408..0a1ba1af2cd 100644 --- a/resource-manager/servicefabricmanagedcluster/2021-05-01/services/version.go +++ b/resource-manager/servicefabricmanagedcluster/2021-05-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2021-05-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/README.md index 500e318e8b7..744745bbaed 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `application` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_application.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_application.go index b7564fa70e1..53de28c6c51 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_managedcluster.go index b36cc1b41c6..4d06563a70f 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_get.go index 6c37d8d5c58..88060f68bdc 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_update.go index 290a1d5f26f..728febcf61d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/version.go index e6a7ea3aa94..78fd7bad970 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/application/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/README.md index bc38f806ef6..b10c2460d61 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype` Documentation -The `applicationtype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `applicationtype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/client.go index 08cc08e353a..175ade98a9c 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/client.go @@ -15,7 +15,7 @@ type ApplicationTypeClient struct { } func NewApplicationTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_applicationtype.go index 6b53a94684c..434a50890bf 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_managedcluster.go index a654b81e564..60b63a4e22b 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_createorupdate.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_createorupdate.go index 3c3f226984c..e2dd6eee5e1 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_createorupdate.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) CreateOrUpdate(ctx context.Context, id Applicatio var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_get.go index 38112e40e44..631abb85b9f 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeClient) Get(ctx context.Context, id ApplicationTypeId) (r var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_update.go index 657c46f68a9..9581ef12a52 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) Update(ctx context.Context, id ApplicationTypeId, var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/version.go index c557bcd553a..1a4e7d174c9 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtype/version.go @@ -1,12 +1,10 @@ package applicationtype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtype/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/README.md index 927992a6ead..a66564a9fcc 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion` Documentation -The `applicationtypeversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `applicationtypeversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/client.go index fbfd96f6ea3..336e70571a3 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/client.go @@ -15,7 +15,7 @@ type ApplicationTypeVersionClient struct { } func NewApplicationTypeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtypeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtypeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_applicationtype.go index 9ed6c9b5f69..c992a1efa64 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_version.go index f66f60d87f9..cc05b9419a6 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_get.go index 94794cf4274..903417cddac 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeVersionClient) Get(ctx context.Context, id VersionId) (re var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_update.go index 9d6b032e644..83eee8c820e 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeVersionClient) Update(ctx context.Context, id VersionId, var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/version.go index 0410be64750..54b8b182f72 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/applicationtypeversion/version.go @@ -1,12 +1,10 @@ package applicationtypeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtypeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtypeversion/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/README.md index f1f2abe1b40..2bbbab7064a 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster` Documentation -The `managedcluster` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `managedcluster` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/client.go index 14c21d22764..2fc4e18bbbf 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/client.go @@ -15,7 +15,7 @@ type ManagedClusterClient struct { } func NewManagedClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/id_managedcluster.go index ff8dcd9645d..432cd1f8eec 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_get.go index f7c939b1bfe..1bb7c311f59 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterClient) Get(ctx context.Context, id ManagedClusterId) (res var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_update.go index 7b34690f35e..cf624f79925 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/method_update.go @@ -49,7 +49,6 @@ func (c ManagedClusterClient) Update(ctx context.Context, id ManagedClusterId, i var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/version.go index e605d81ef3c..9770c8cc9ca 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedcluster/version.go @@ -1,12 +1,10 @@ package managedcluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcluster/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/README.md index b19f2f9a792..39f8c5275d6 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion` Documentation -The `managedclusterversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `managedclusterversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/client.go index 4221e0cb422..0e83c493cb7 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/client.go @@ -15,7 +15,7 @@ type ManagedClusterVersionClient struct { } func NewManagedClusterVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusterversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusterversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_environmentmanagedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_environmentmanagedclusterversion.go index 2b18952e624..136a2b12ab5 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_environmentmanagedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_environmentmanagedclusterversion.go @@ -42,7 +42,7 @@ func ParseEnvironmentManagedClusterVersionID(input string) (*EnvironmentManagedC } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentManagedClusterVersionIDInsensitively(input string) (*Enviro } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_location.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_location.go index 7255c7f6544..b0d7f2d46ff 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_location.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_managedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_managedclusterversion.go index 8f0ba72ae5a..03863cfde30 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_managedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/id_managedclusterversion.go @@ -42,7 +42,7 @@ func ParseManagedClusterVersionID(input string) (*ManagedClusterVersionId, error } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterVersionIDInsensitively(input string) (*ManagedClusterVer } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_get.go index 219e7a78f57..13fce844840 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) Get(ctx context.Context, id ManagedClusterV var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_getbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_getbyenvironment.go index a22533b1b11..9bb6ec62c2c 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_getbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_getbyenvironment.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) GetByEnvironment(ctx context.Context, id En var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_list.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_list.go index 2074f6b62e2..0aa181cc759 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_list.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_list.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) List(ctx context.Context, id LocationId) (r var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_listbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_listbyenvironment.go index 116e3b58591..c19dc4c360a 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_listbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) ListByEnvironment(ctx context.Context, id L var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/version.go index 0e493292f0c..8cced554a02 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedclusterversion/version.go @@ -1,12 +1,10 @@ package managedclusterversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusterversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusterversion/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/README.md index a629679a642..0764b522258 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes` Documentation -The `managedvmsizes` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `managedvmsizes` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/client.go index 49278b9f927..a1f61481e28 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/client.go @@ -15,7 +15,7 @@ type ManagedVMSizesClient struct { } func NewManagedVMSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedVMSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedvmsizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedvmsizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedVMSizesClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_location.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_location.go index 8be5965da8d..c9dfa300c16 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_location.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_managedunsupportedvmsize.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_managedunsupportedvmsize.go index c37db404db7..1b0e39c9431 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_managedunsupportedvmsize.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/id_managedunsupportedvmsize.go @@ -42,7 +42,7 @@ func ParseManagedUnsupportedVMSizeID(input string) (*ManagedUnsupportedVMSizeId, } id := ManagedUnsupportedVMSizeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedUnsupportedVMSizeIDInsensitively(input string) (*ManagedUnsuppo } id := ManagedUnsupportedVMSizeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/method_managedunsupportedvmsizesget.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/method_managedunsupportedvmsizesget.go index 8247d9a7856..aee5db68322 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/method_managedunsupportedvmsizesget.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/method_managedunsupportedvmsizesget.go @@ -45,7 +45,6 @@ func (c ManagedVMSizesClient) ManagedUnsupportedVMSizesGet(ctx context.Context, var model ManagedVMSize result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/version.go index a3449b21e51..0fedadfc357 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/managedvmsizes/version.go @@ -1,12 +1,10 @@ package managedvmsizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedvmsizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedvmsizes/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/README.md index 15fb27cd5c8..2c6d4232da7 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype` Documentation -The `nodetype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `nodetype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/client.go index ae6880601d4..8ee7d2c73ea 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/client.go @@ -15,7 +15,7 @@ type NodeTypeClient struct { } func NewNodeTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodetype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodetype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_managedcluster.go index 045b223bc19..93934c450bc 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_nodetype.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_nodetype.go index b6155dff9ad..f342570f8ce 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_nodetype.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/id_nodetype.go @@ -44,7 +44,7 @@ func ParseNodeTypeID(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeTypeIDInsensitively(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_get.go index ce7c44fb0e1..aa9a394de9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_get.go @@ -45,7 +45,6 @@ func (c NodeTypeClient) Get(ctx context.Context, id NodeTypeId) (result GetOpera var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_update.go index 0b922d8e9e0..561e3dc1067 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/method_update.go @@ -49,7 +49,6 @@ func (c NodeTypeClient) Update(ctx context.Context, id NodeTypeId, input NodeTyp var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/version.go index 6000f8863ca..9c5c3660398 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/nodetype/version.go @@ -1,12 +1,10 @@ package nodetype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodetype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodetype/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/README.md index b5e5f1183ef..0c6649a076d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `service` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_application.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_application.go index fdd8e3d27de..14a9e9d6b0f 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_service.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_service.go index 511ab65f576..65b988aa99b 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/method_get.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/method_get.go index c1b6af71b21..2828047b923 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go index 05d633cb2d4..a6178ef9f06 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averagepartitionloadscalingtrigger.go index 772f397c500..135a84653be 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averageserviceloadscalingtrigger.go index e811f2a7ca6..825d9a0ada0 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_namedpartitionscheme.go index f8190557f3d..3a77f00a98c 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partition.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partition.go index 4ef9596a357..ee46ba1bf9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partitioninstancecountscalemechanism.go index 9b9ddde17bf..20bd6366848 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingmechanism.go index 19b84f9e2f3..d5d208ed050 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingpolicy.go index c507f71e65c..4863900fa25 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingtrigger.go index 84a29169ef3..44a9b69ee82 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementinvaliddomainpolicy.go index ed256b68ab2..5c5b4bdea86 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go index fd6ecbc222c..6404d0d3c49 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpolicy.go index 0b0d9c8732e..7fa6f1db9c2 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpreferprimarydomainpolicy.go index 6df5a2f8689..b7311619302 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequireddomainpolicy.go index d7acb1a7bbc..1463783983f 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequiredomaindistributionpolicy.go index dbef3589507..2d75f36f69d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresource.go index aaa2eacfa68..303f0c27161 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresourceproperties.go index 7af97b98078..e658119b346 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_serviceresourceproperties.go @@ -10,18 +10,96 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +130,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_singletonpartitionscheme.go index 733fa123a97..e96275a2521 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statefulserviceproperties.go index 7c1157ddab9..03b638c6cb6 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statefulserviceproperties.go @@ -20,18 +20,36 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -43,9 +61,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -74,6 +93,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.QuorumLossWaitDuration = decoded.QuorumLossWaitDuration s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -87,7 +107,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -102,7 +122,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statelessserviceproperties.go index e2354eb7450..595e4a97cf2 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_statelessserviceproperties.go @@ -16,18 +16,36 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -39,9 +57,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -69,6 +88,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.PlacementConstraints = decoded.PlacementConstraints s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -79,7 +99,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -94,7 +114,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_uniformint64rangepartitionscheme.go index 7dc8a57063d..99977392f11 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/version.go index a2cfd076266..32669c104c9 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/service/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/README.md b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/README.md index 0d682399549..fc1843a5f1e 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/README.md +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2022-01-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2022-01-01`). +The `services` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2022-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/client.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/client.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/id_service.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/id_service.go index 880fd20f767..8f23211ef1a 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/method_update.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/method_update.go index 6568dd496b4..819f50befc6 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/method_update.go @@ -49,7 +49,6 @@ func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceU var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go index 1f1338f342e..14bcbc805ec 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averagepartitionloadscalingtrigger.go index 723b0ba3d81..5f003b45da2 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averageserviceloadscalingtrigger.go index 4600d2f3f69..725f21558dd 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_namedpartitionscheme.go index a915dbaa91e..305fa1b782a 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partition.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partition.go index 364ee85f2ec..dc9d7719167 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partitioninstancecountscalemechanism.go index 53db82dd0b3..baad18a4d98 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingmechanism.go index 5b2b35b971b..8a10e8b60cd 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingpolicy.go index 801d6b13753..ee96054f4a8 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingtrigger.go index c555bee6d53..fc16de4a4fd 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementinvaliddomainpolicy.go index cbe686c0670..f45b7ff0e3d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go index 5f377149c98..465c8012076 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpolicy.go index 819b7ae2dbc..5714ac019ab 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpreferprimarydomainpolicy.go index c1036554340..3eb8fa14fb2 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequireddomainpolicy.go index 30f269c6387..c8d09e23a63 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequiredomaindistributionpolicy.go index 43ea090c44e..acd6cec3511 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresource.go index fdc4df6adfb..d1acb83b967 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresourceproperties.go index f26311c14ee..5922385aed7 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_serviceresourceproperties.go @@ -10,18 +10,96 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +130,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_singletonpartitionscheme.go index 4f463746341..b0537f21ddf 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statefulserviceproperties.go index 7e03810cc50..db55a1790a7 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statefulserviceproperties.go @@ -20,18 +20,36 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -43,9 +61,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -74,6 +93,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.QuorumLossWaitDuration = decoded.QuorumLossWaitDuration s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -87,7 +107,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -102,7 +122,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statelessserviceproperties.go index a879ada6b2c..f1740ffa2ae 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_statelessserviceproperties.go @@ -16,18 +16,36 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` PlacementConstraints *string `json:"placementConstraints,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -39,9 +57,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -69,6 +88,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.PlacementConstraints = decoded.PlacementConstraints s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -79,7 +99,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -94,7 +114,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_uniformint64rangepartitionscheme.go index 573d905f9be..f59603e978b 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/version.go b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/version.go index 27c410333cc..1d057aa645d 100644 --- a/resource-manager/servicefabricmanagedcluster/2022-01-01/services/version.go +++ b/resource-manager/servicefabricmanagedcluster/2022-01-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2022-01-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/README.md index 002a3b01539..162e7975fac 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/application` Documentation -The `application` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `application` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/client.go index c87320630e0..552cea9994d 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/client.go @@ -15,7 +15,7 @@ type ApplicationClient struct { } func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "application", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_application.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_application.go index b7564fa70e1..53de28c6c51 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_managedcluster.go index b36cc1b41c6..4d06563a70f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_get.go index 6c37d8d5c58..88060f68bdc 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result Ge var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_update.go index 290a1d5f26f..728febcf61d 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input A var model ApplicationResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/version.go index 957da3a5986..774bc6a5093 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/application/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/application/version.go @@ -1,12 +1,10 @@ package application -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/application/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/application/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/README.md index 7f801e9f4d5..52255f2b723 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype` Documentation -The `applicationtype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `applicationtype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/client.go index 08cc08e353a..175ade98a9c 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/client.go @@ -15,7 +15,7 @@ type ApplicationTypeClient struct { } func NewApplicationTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_applicationtype.go index 6b53a94684c..434a50890bf 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_managedcluster.go index a654b81e564..60b63a4e22b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_createorupdate.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_createorupdate.go index 3c3f226984c..e2dd6eee5e1 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_createorupdate.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) CreateOrUpdate(ctx context.Context, id Applicatio var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_get.go index 38112e40e44..631abb85b9f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeClient) Get(ctx context.Context, id ApplicationTypeId) (r var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_update.go index 657c46f68a9..9581ef12a52 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeClient) Update(ctx context.Context, id ApplicationTypeId, var model ApplicationTypeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/version.go index b0782349b7b..e963417d219 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtype/version.go @@ -1,12 +1,10 @@ package applicationtype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtype/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/README.md index f631c30f355..5ee2f5b227a 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion` Documentation -The `applicationtypeversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `applicationtypeversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/client.go index fbfd96f6ea3..336e70571a3 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/client.go @@ -15,7 +15,7 @@ type ApplicationTypeVersionClient struct { } func NewApplicationTypeVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationTypeVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "applicationtypeversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "applicationtypeversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ApplicationTypeVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_applicationtype.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_applicationtype.go index 9ed6c9b5f69..c992a1efa64 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_applicationtype.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_applicationtype.go @@ -44,7 +44,7 @@ func ParseApplicationTypeID(input string) (*ApplicationTypeId, error) { } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationTypeIDInsensitively(input string) (*ApplicationTypeId, erro } id := ApplicationTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_version.go index f66f60d87f9..cc05b9419a6 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_get.go index 94794cf4274..903417cddac 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_get.go @@ -45,7 +45,6 @@ func (c ApplicationTypeVersionClient) Get(ctx context.Context, id VersionId) (re var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_update.go index 9d6b032e644..83eee8c820e 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/method_update.go @@ -49,7 +49,6 @@ func (c ApplicationTypeVersionClient) Update(ctx context.Context, id VersionId, var model ApplicationTypeVersionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/version.go index 7aaccc764b7..8beb77e4b6d 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/applicationtypeversion/version.go @@ -1,12 +1,10 @@ package applicationtypeversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationtypeversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/applicationtypeversion/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/client.go index e4d56cec321..5b18462d7e1 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/client.go @@ -15,7 +15,7 @@ type ManagedApplyMaintenanceWindowClient struct { } func NewManagedApplyMaintenanceWindowClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedApplyMaintenanceWindowClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedapplymaintenancewindow", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedapplymaintenancewindow", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedApplyMaintenanceWindowClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/id_managedcluster.go index 3e111ef23a3..50478e5d24a 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/version.go index 5584c5eeed5..a73fb48d973 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedapplymaintenancewindow/version.go @@ -1,12 +1,10 @@ package managedapplymaintenancewindow -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedapplymaintenancewindow/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedapplymaintenancewindow/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/README.md index 77e9d35cd50..32113b4eaa6 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus` Documentation -The `managedazresiliencystatus` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `managedazresiliencystatus` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/client.go index b24d135f910..fe9e27d6cd7 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/client.go @@ -15,7 +15,7 @@ type ManagedAzResiliencyStatusClient struct { } func NewManagedAzResiliencyStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedAzResiliencyStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedazresiliencystatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedazresiliencystatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedAzResiliencyStatusClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/id_managedcluster.go index e7f04b5eeec..7b53f54b80c 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/method_get.go index 62fe3999bee..8465ff179c9 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/method_get.go @@ -46,7 +46,6 @@ func (c ManagedAzResiliencyStatusClient) Get(ctx context.Context, id ManagedClus var model ManagedAzResiliencyStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/version.go index 0f60a1fb5b1..b43db6243b1 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedazresiliencystatus/version.go @@ -1,12 +1,10 @@ package managedazresiliencystatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedazresiliencystatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedazresiliencystatus/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/README.md index afbf63a1181..042c9392f2b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster` Documentation -The `managedcluster` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `managedcluster` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/client.go index 14c21d22764..2fc4e18bbbf 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/client.go @@ -15,7 +15,7 @@ type ManagedClusterClient struct { } func NewManagedClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedcluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedcluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/id_managedcluster.go index ff8dcd9645d..432cd1f8eec 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_get.go index f7c939b1bfe..1bb7c311f59 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterClient) Get(ctx context.Context, id ManagedClusterId) (res var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_update.go index 7b34690f35e..cf624f79925 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/method_update.go @@ -49,7 +49,6 @@ func (c ManagedClusterClient) Update(ctx context.Context, id ManagedClusterId, i var model ManagedCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/version.go index 103baccfc03..994076e2289 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedcluster/version.go @@ -1,12 +1,10 @@ package managedcluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedcluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedcluster/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/README.md index b0389bf7e43..7561e7b04ea 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion` Documentation -The `managedclusterversion` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `managedclusterversion` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/client.go index 4221e0cb422..0e83c493cb7 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/client.go @@ -15,7 +15,7 @@ type ManagedClusterVersionClient struct { } func NewManagedClusterVersionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedClusterVersionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedclusterversion", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedclusterversion", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedClusterVersionClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_environmentmanagedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_environmentmanagedclusterversion.go index 2b18952e624..136a2b12ab5 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_environmentmanagedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_environmentmanagedclusterversion.go @@ -42,7 +42,7 @@ func ParseEnvironmentManagedClusterVersionID(input string) (*EnvironmentManagedC } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentManagedClusterVersionIDInsensitively(input string) (*Enviro } id := EnvironmentManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_location.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_location.go index 7255c7f6544..b0d7f2d46ff 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_location.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_managedclusterversion.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_managedclusterversion.go index 8f0ba72ae5a..03863cfde30 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_managedclusterversion.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/id_managedclusterversion.go @@ -42,7 +42,7 @@ func ParseManagedClusterVersionID(input string) (*ManagedClusterVersionId, error } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterVersionIDInsensitively(input string) (*ManagedClusterVer } id := ManagedClusterVersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_get.go index 219e7a78f57..13fce844840 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_get.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) Get(ctx context.Context, id ManagedClusterV var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_getbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_getbyenvironment.go index a22533b1b11..9bb6ec62c2c 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_getbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_getbyenvironment.go @@ -45,7 +45,6 @@ func (c ManagedClusterVersionClient) GetByEnvironment(ctx context.Context, id En var model ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_list.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_list.go index 2074f6b62e2..0aa181cc759 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_list.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_list.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) List(ctx context.Context, id LocationId) (r var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_listbyenvironment.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_listbyenvironment.go index 116e3b58591..c19dc4c360a 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_listbyenvironment.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c ManagedClusterVersionClient) ListByEnvironment(ctx context.Context, id L var model []ManagedClusterCodeVersionResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/version.go index 1de6921e5c8..39a8691fa70 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedclusterversion/version.go @@ -1,12 +1,10 @@ package managedclusterversion -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedclusterversion/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedclusterversion/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/README.md index 73d09bf47b4..4d6499dab2f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus` Documentation -The `managedmaintenancewindowstatus` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `managedmaintenancewindowstatus` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/client.go index 1a6ccbd8141..ac5a51955ec 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/client.go @@ -15,7 +15,7 @@ type ManagedMaintenanceWindowStatusClient struct { } func NewManagedMaintenanceWindowStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedMaintenanceWindowStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedmaintenancewindowstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedmaintenancewindowstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedMaintenanceWindowStatusClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/id_managedcluster.go index 71faea8a8fa..dddc297ebe0 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/method_get.go index 7148c16d6e5..5559031336f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/method_get.go @@ -46,7 +46,6 @@ func (c ManagedMaintenanceWindowStatusClient) Get(ctx context.Context, id Manage var model ManagedMaintenanceWindowStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/version.go index 78c93995013..aafa6a579b4 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedmaintenancewindowstatus/version.go @@ -1,12 +1,10 @@ package managedmaintenancewindowstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedmaintenancewindowstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedmaintenancewindowstatus/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/README.md index 361c7014c0b..ce47c534944 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes` Documentation -The `managedvmsizes` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `managedvmsizes` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/client.go index 49278b9f927..a1f61481e28 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/client.go @@ -15,7 +15,7 @@ type ManagedVMSizesClient struct { } func NewManagedVMSizesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedVMSizesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedvmsizes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedvmsizes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedVMSizesClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_location.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_location.go index 8be5965da8d..c9dfa300c16 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_location.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_managedunsupportedvmsize.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_managedunsupportedvmsize.go index c37db404db7..1b0e39c9431 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_managedunsupportedvmsize.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/id_managedunsupportedvmsize.go @@ -42,7 +42,7 @@ func ParseManagedUnsupportedVMSizeID(input string) (*ManagedUnsupportedVMSizeId, } id := ManagedUnsupportedVMSizeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedUnsupportedVMSizeIDInsensitively(input string) (*ManagedUnsuppo } id := ManagedUnsupportedVMSizeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/method_managedunsupportedvmsizesget.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/method_managedunsupportedvmsizesget.go index 8247d9a7856..aee5db68322 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/method_managedunsupportedvmsizesget.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/method_managedunsupportedvmsizesget.go @@ -45,7 +45,6 @@ func (c ManagedVMSizesClient) ManagedUnsupportedVMSizesGet(ctx context.Context, var model ManagedVMSize result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/version.go index 02ff1f5d20c..e96622be8e4 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/managedvmsizes/version.go @@ -1,12 +1,10 @@ package managedvmsizes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedvmsizes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedvmsizes/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/README.md index d37f333946d..7b11bee89d2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype` Documentation -The `nodetype` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `nodetype` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/client.go index ae6880601d4..8ee7d2c73ea 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/client.go @@ -15,7 +15,7 @@ type NodeTypeClient struct { } func NewNodeTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*NodeTypeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "nodetype", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "nodetype", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NodeTypeClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_managedcluster.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_managedcluster.go index 045b223bc19..93934c450bc 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_managedcluster.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_managedcluster.go @@ -42,7 +42,7 @@ func ParseManagedClusterID(input string) (*ManagedClusterId, error) { } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedClusterIDInsensitively(input string) (*ManagedClusterId, error) } id := ManagedClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_nodetype.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_nodetype.go index b6155dff9ad..f342570f8ce 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_nodetype.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/id_nodetype.go @@ -44,7 +44,7 @@ func ParseNodeTypeID(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNodeTypeIDInsensitively(input string) (*NodeTypeId, error) { } id := NodeTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_get.go index ce7c44fb0e1..aa9a394de9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_get.go @@ -45,7 +45,6 @@ func (c NodeTypeClient) Get(ctx context.Context, id NodeTypeId) (result GetOpera var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_update.go index 0b922d8e9e0..561e3dc1067 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/method_update.go @@ -49,7 +49,6 @@ func (c NodeTypeClient) Update(ctx context.Context, id NodeTypeId, input NodeTyp var model NodeType result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/version.go index 93ad3206f3d..7d8b7fb344e 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/nodetype/version.go @@ -1,12 +1,10 @@ package nodetype -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/nodetype/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/nodetype/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/README.md index f06a248596f..e16b1386bc2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/service` Documentation -The `service` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `service` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/client.go index d0e66ae6f3f..a8e0275e257 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/client.go @@ -15,7 +15,7 @@ type ServiceClient struct { } func NewServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "service", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "service", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_application.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_application.go index fdd8e3d27de..14a9e9d6b0f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_application.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_application.go @@ -44,7 +44,7 @@ func ParseApplicationID(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationIDInsensitively(input string) (*ApplicationId, error) { } id := ApplicationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_service.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_service.go index 511ab65f576..65b988aa99b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/method_get.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/method_get.go index c1b6af71b21..2828047b923 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/method_get.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/method_get.go @@ -45,7 +45,6 @@ func (c ServiceClient) Get(ctx context.Context, id ServiceId) (result GetOperati var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go index 05d633cb2d4..a6178ef9f06 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averagepartitionloadscalingtrigger.go index 772f397c500..135a84653be 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averageserviceloadscalingtrigger.go index e811f2a7ca6..825d9a0ada0 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_namedpartitionscheme.go index f8190557f3d..3a77f00a98c 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partition.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partition.go index 4ef9596a357..ee46ba1bf9b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partitioninstancecountscalemechanism.go index 9b9ddde17bf..20bd6366848 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingmechanism.go index 19b84f9e2f3..d5d208ed050 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingpolicy.go index c507f71e65c..4863900fa25 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingtrigger.go index 84a29169ef3..44a9b69ee82 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementinvaliddomainpolicy.go index ed256b68ab2..5c5b4bdea86 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go index fd6ecbc222c..6404d0d3c49 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpolicy.go index 0b0d9c8732e..7fa6f1db9c2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpreferprimarydomainpolicy.go index 6df5a2f8689..b7311619302 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequireddomainpolicy.go index d7acb1a7bbc..1463783983f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequiredomaindistributionpolicy.go index dbef3589507..2d75f36f69d 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresource.go index aaa2eacfa68..303f0c27161 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresourceproperties.go index 7af97b98078..c6d6fa05139 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_serviceresourceproperties.go @@ -10,18 +10,98 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +132,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_singletonpartitionscheme.go index 733fa123a97..e96275a2521 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statefulserviceproperties.go index 8103ee306eb..def12fa77d6 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statefulserviceproperties.go @@ -20,6 +20,7 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` @@ -27,12 +28,30 @@ type StatefulServiceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -44,9 +63,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -76,6 +96,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -89,7 +110,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -104,7 +125,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statelessserviceproperties.go index 498aa637547..df5f390ced1 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_statelessserviceproperties.go @@ -16,6 +16,7 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` @@ -23,12 +24,30 @@ type StatelessServiceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -40,9 +59,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -71,6 +91,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -81,7 +102,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -96,7 +117,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_uniformint64rangepartitionscheme.go index 7dc8a57063d..99977392f11 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/version.go index ccc96696bd5..113b4f7dbe2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/service/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/service/version.go @@ -1,12 +1,10 @@ package service -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/service/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/service/2024-04-01" } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/README.md b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/README.md index bc200bd0e52..62ee4190080 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/README.md +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicefabricmanagedcluster/2024-04-01/services` Documentation -The `services` SDK allows for interaction with the Azure Resource Manager Service `servicefabricmanagedcluster` (API Version `2024-04-01`). +The `services` SDK allows for interaction with Azure Resource Manager `servicefabricmanagedcluster` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/client.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/client.go index dc4a72c1ff4..24dd876692e 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/client.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/client.go @@ -15,7 +15,7 @@ type ServicesClient struct { } func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "services", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "services", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServicesClient: %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/id_service.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/id_service.go index 880fd20f767..8f23211ef1a 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/id_service.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/id_service.go @@ -46,7 +46,7 @@ func ParseServiceID(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServiceIDInsensitively(input string) (*ServiceId, error) { } id := ServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/method_update.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/method_update.go index 6568dd496b4..819f50befc6 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/method_update.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/method_update.go @@ -49,7 +49,6 @@ func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceU var model ServiceResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go index 1f1338f342e..14bcbc805ec 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_addremoveincrementalnamedpartitionscalingmechanism.go @@ -16,6 +16,14 @@ type AddRemoveIncrementalNamedPartitionScalingMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s AddRemoveIncrementalNamedPartitionScalingMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AddRemoveIncrementalNamedPartitionScalingMechanism{} @@ -29,9 +37,10 @@ func (s AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byt } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddRemoveIncrementalNamedPartitionScalingMechanism: %+v", err) } + decoded["kind"] = "AddRemoveIncrementalNamedPartition" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averagepartitionloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averagepartitionloadscalingtrigger.go index 723b0ba3d81..5f003b45da2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averagepartitionloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averagepartitionloadscalingtrigger.go @@ -17,6 +17,14 @@ type AveragePartitionLoadScalingTrigger struct { UpperLoadThreshold float64 `json:"upperLoadThreshold"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AveragePartitionLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AveragePartitionLoadScalingTrigger{} @@ -30,9 +38,10 @@ func (s AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AveragePartitionLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AveragePartitionLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averageserviceloadscalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averageserviceloadscalingtrigger.go index 4600d2f3f69..725f21558dd 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averageserviceloadscalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_averageserviceloadscalingtrigger.go @@ -18,6 +18,14 @@ type AverageServiceLoadScalingTrigger struct { UseOnlyPrimaryLoad bool `json:"useOnlyPrimaryLoad"` // Fields inherited from ScalingTrigger + + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s AverageServiceLoadScalingTrigger) ScalingTrigger() BaseScalingTriggerImpl { + return BaseScalingTriggerImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = AverageServiceLoadScalingTrigger{} @@ -31,9 +39,10 @@ func (s AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AverageServiceLoadScalingTrigger: %+v", err) } + decoded["kind"] = "AverageServiceLoadTrigger" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_namedpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_namedpartitionscheme.go index a915dbaa91e..305fa1b782a 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_namedpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_namedpartitionscheme.go @@ -14,6 +14,14 @@ type NamedPartitionScheme struct { Names []string `json:"names"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s NamedPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = NamedPartitionScheme{} @@ -27,9 +35,10 @@ func (s NamedPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NamedPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Named" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partition.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partition.go index 364ee85f2ec..dc9d7719167 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partition.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partition.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Partition interface { + Partition() BasePartitionImpl } -// RawPartitionImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Partition = BasePartitionImpl{} + +type BasePartitionImpl struct { + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s BasePartitionImpl) Partition() BasePartitionImpl { + return s +} + +var _ Partition = RawPartitionImpl{} + +// RawPartitionImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPartitionImpl struct { - Type string - Values map[string]interface{} + partition BasePartitionImpl + Type string + Values map[string]interface{} +} + +func (s RawPartitionImpl) Partition() BasePartitionImpl { + return s.partition } -func unmarshalPartitionImplementation(input []byte) (Partition, error) { +func UnmarshalPartitionImplementation(input []byte) (Partition, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalPartitionImplementation(input []byte) (Partition, error) { return out, nil } - out := RawPartitionImpl{ - Type: value, - Values: temp, + var parent BasePartitionImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePartitionImpl: %+v", err) } - return out, nil + + return RawPartitionImpl{ + partition: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partitioninstancecountscalemechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partitioninstancecountscalemechanism.go index 53db82dd0b3..baad18a4d98 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partitioninstancecountscalemechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_partitioninstancecountscalemechanism.go @@ -16,6 +16,14 @@ type PartitionInstanceCountScaleMechanism struct { ScaleIncrement int64 `json:"scaleIncrement"` // Fields inherited from ScalingMechanism + + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s PartitionInstanceCountScaleMechanism) ScalingMechanism() BaseScalingMechanismImpl { + return BaseScalingMechanismImpl{ + Kind: s.Kind, + } } var _ json.Marshaler = PartitionInstanceCountScaleMechanism{} @@ -29,9 +37,10 @@ func (s PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PartitionInstanceCountScaleMechanism: %+v", err) } + decoded["kind"] = "ScalePartitionInstanceCount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingmechanism.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingmechanism.go index 5b2b35b971b..8a10e8b60cd 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingmechanism.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingmechanism.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingMechanism interface { + ScalingMechanism() BaseScalingMechanismImpl } -// RawScalingMechanismImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingMechanism = BaseScalingMechanismImpl{} + +type BaseScalingMechanismImpl struct { + Kind ServiceScalingMechanismKind `json:"kind"` +} + +func (s BaseScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s +} + +var _ ScalingMechanism = RawScalingMechanismImpl{} + +// RawScalingMechanismImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingMechanismImpl struct { - Type string - Values map[string]interface{} + scalingMechanism BaseScalingMechanismImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingMechanismImpl) ScalingMechanism() BaseScalingMechanismImpl { + return s.scalingMechanism } -func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { +func UnmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingMechanismImplementation(input []byte) (ScalingMechanism, er return out, nil } - out := RawScalingMechanismImpl{ - Type: value, - Values: temp, + var parent BaseScalingMechanismImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingMechanismImpl: %+v", err) } - return out, nil + + return RawScalingMechanismImpl{ + scalingMechanism: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingpolicy.go index 801d6b13753..ee96054f4a8 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingpolicy.go @@ -23,7 +23,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingMechanism"]; ok { - impl, err := unmarshalScalingMechanismImplementation(v) + impl, err := UnmarshalScalingMechanismImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingMechanism' for 'ScalingPolicy': %+v", err) } @@ -31,7 +31,7 @@ func (s *ScalingPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["scalingTrigger"]; ok { - impl, err := unmarshalScalingTriggerImplementation(v) + impl, err := UnmarshalScalingTriggerImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ScalingTrigger' for 'ScalingPolicy': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingtrigger.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingtrigger.go index c555bee6d53..fc16de4a4fd 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingtrigger.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_scalingtrigger.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScalingTrigger interface { + ScalingTrigger() BaseScalingTriggerImpl } -// RawScalingTriggerImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScalingTrigger = BaseScalingTriggerImpl{} + +type BaseScalingTriggerImpl struct { + Kind ServiceScalingTriggerKind `json:"kind"` +} + +func (s BaseScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s +} + +var _ ScalingTrigger = RawScalingTriggerImpl{} + +// RawScalingTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScalingTriggerImpl struct { - Type string - Values map[string]interface{} + scalingTrigger BaseScalingTriggerImpl + Type string + Values map[string]interface{} +} + +func (s RawScalingTriggerImpl) ScalingTrigger() BaseScalingTriggerImpl { + return s.scalingTrigger } -func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { +func UnmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalScalingTriggerImplementation(input []byte) (ScalingTrigger, error) return out, nil } - out := RawScalingTriggerImpl{ - Type: value, - Values: temp, + var parent BaseScalingTriggerImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScalingTriggerImpl: %+v", err) } - return out, nil + + return RawScalingTriggerImpl{ + scalingTrigger: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementinvaliddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementinvaliddomainpolicy.go index cbe686c0670..f45b7ff0e3d 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementinvaliddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementinvaliddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementInvalidDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementInvalidDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementInvalidDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementInvalidDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementInvalidDomainPolicy: %+v", err) } + decoded["type"] = "InvalidDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go index 5f377149c98..465c8012076 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementnonpartiallyplaceservicepolicy.go @@ -13,6 +13,14 @@ var _ ServicePlacementPolicy = ServicePlacementNonPartiallyPlaceServicePolicy{} type ServicePlacementNonPartiallyPlaceServicePolicy struct { // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementNonPartiallyPlaceServicePolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementNonPartiallyPlaceServicePolicy{} @@ -26,9 +34,10 @@ func (s ServicePlacementNonPartiallyPlaceServicePolicy) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementNonPartiallyPlaceServicePolicy: %+v", err) } + decoded["type"] = "NonPartiallyPlaceService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpolicy.go index 819b7ae2dbc..5714ac019ab 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpolicy.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServicePlacementPolicy interface { + ServicePlacementPolicy() BaseServicePlacementPolicyImpl } -// RawServicePlacementPolicyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServicePlacementPolicy = BaseServicePlacementPolicyImpl{} + +type BaseServicePlacementPolicyImpl struct { + Type ServicePlacementPolicyType `json:"type"` +} + +func (s BaseServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s +} + +var _ ServicePlacementPolicy = RawServicePlacementPolicyImpl{} + +// RawServicePlacementPolicyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServicePlacementPolicyImpl struct { - Type string - Values map[string]interface{} + servicePlacementPolicy BaseServicePlacementPolicyImpl + Type string + Values map[string]interface{} +} + +func (s RawServicePlacementPolicyImpl) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return s.servicePlacementPolicy } -func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { +func UnmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlacementPolicy, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalServicePlacementPolicyImplementation(input []byte) (ServicePlaceme return out, nil } - out := RawServicePlacementPolicyImpl{ - Type: value, - Values: temp, + var parent BaseServicePlacementPolicyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServicePlacementPolicyImpl: %+v", err) } - return out, nil + + return RawServicePlacementPolicyImpl{ + servicePlacementPolicy: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpreferprimarydomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpreferprimarydomainpolicy.go index c1036554340..3eb8fa14fb2 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpreferprimarydomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementpreferprimarydomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementPreferPrimaryDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementPreferPrimaryDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementPreferPrimaryDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementPreferPrimaryDomainPolicy) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementPreferPrimaryDomainPolicy: %+v", err) } + decoded["type"] = "PreferredPrimaryDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequireddomainpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequireddomainpolicy.go index 30f269c6387..c8d09e23a63 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequireddomainpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequireddomainpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequiredDomainPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequiredDomainPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequiredDomainPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequiredDomainPolicy) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequiredDomainPolicy: %+v", err) } + decoded["type"] = "RequiredDomain" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequiredomaindistributionpolicy.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequiredomaindistributionpolicy.go index 43ea090c44e..acd6cec3511 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequiredomaindistributionpolicy.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceplacementrequiredomaindistributionpolicy.go @@ -14,6 +14,14 @@ type ServicePlacementRequireDomainDistributionPolicy struct { DomainName string `json:"domainName"` // Fields inherited from ServicePlacementPolicy + + Type ServicePlacementPolicyType `json:"type"` +} + +func (s ServicePlacementRequireDomainDistributionPolicy) ServicePlacementPolicy() BaseServicePlacementPolicyImpl { + return BaseServicePlacementPolicyImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServicePlacementRequireDomainDistributionPolicy{} @@ -27,9 +35,10 @@ func (s ServicePlacementRequireDomainDistributionPolicy) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePlacementRequireDomainDistributionPolicy: %+v", err) } + decoded["type"] = "RequiredDomainDistribution" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresource.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresource.go index fdc4df6adfb..d1acb83b967 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresource.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresource.go @@ -40,7 +40,7 @@ func (s *ServiceResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalServiceResourcePropertiesImplementation(v) + impl, err := UnmarshalServiceResourcePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'ServiceResource': %+v", err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresourceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresourceproperties.go index f26311c14ee..fa19bdc205f 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresourceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_serviceresourceproperties.go @@ -10,18 +10,98 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServiceResourceProperties interface { + ServiceResourceProperties() BaseServiceResourcePropertiesImpl } -// RawServiceResourcePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ServiceResourceProperties = BaseServiceResourcePropertiesImpl{} + +type BaseServiceResourcePropertiesImpl struct { + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` + DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` + PartitionDescription Partition `json:"partitionDescription"` + PlacementConstraints *string `json:"placementConstraints,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` + ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` + ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` + ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` + ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` + ServiceTypeName string `json:"serviceTypeName"` +} + +func (s BaseServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s +} + +var _ ServiceResourceProperties = RawServiceResourcePropertiesImpl{} + +// RawServiceResourcePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawServiceResourcePropertiesImpl struct { - Type string - Values map[string]interface{} + serviceResourceProperties BaseServiceResourcePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawServiceResourcePropertiesImpl) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return s.serviceResourceProperties +} + +var _ json.Unmarshaler = &BaseServiceResourcePropertiesImpl{} + +func (s *BaseServiceResourcePropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseServiceResourcePropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) + } + + s.CorrelationScheme = decoded.CorrelationScheme + s.DefaultMoveCost = decoded.DefaultMoveCost + s.PlacementConstraints = decoded.PlacementConstraints + s.ProvisioningState = decoded.ProvisioningState + s.ScalingPolicies = decoded.ScalingPolicies + s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind + s.ServiceLoadMetrics = decoded.ServiceLoadMetrics + s.ServicePackageActivationMode = decoded.ServicePackageActivationMode + s.ServiceTypeName = decoded.ServiceTypeName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseServiceResourcePropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["partitionDescription"]; ok { + impl, err := UnmarshalPartitionImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'BaseServiceResourcePropertiesImpl': %+v", err) + } + s.PartitionDescription = impl + } + + if v, ok := temp["servicePlacementPolicies"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ServicePlacementPolicies into list []json.RawMessage: %+v", err) + } + + output := make([]ServicePlacementPolicy, 0) + for i, val := range listTemp { + impl, err := UnmarshalServicePlacementPolicyImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'BaseServiceResourcePropertiesImpl': %+v", i, err) + } + output = append(output, impl) + } + s.ServicePlacementPolicies = &output + } + return nil } -func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { +func UnmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceResourceProperties, error) { if input == nil { return nil, nil } @@ -52,10 +132,15 @@ func unmarshalServiceResourcePropertiesImplementation(input []byte) (ServiceReso return out, nil } - out := RawServiceResourcePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseServiceResourcePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseServiceResourcePropertiesImpl: %+v", err) } - return out, nil + + return RawServiceResourcePropertiesImpl{ + serviceResourceProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_singletonpartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_singletonpartitionscheme.go index 4f463746341..b0537f21ddf 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_singletonpartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_singletonpartitionscheme.go @@ -13,6 +13,14 @@ var _ Partition = SingletonPartitionScheme{} type SingletonPartitionScheme struct { // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s SingletonPartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = SingletonPartitionScheme{} @@ -26,9 +34,10 @@ func (s SingletonPartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingletonPartitionScheme: %+v", err) } + decoded["partitionScheme"] = "Singleton" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statefulserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statefulserviceproperties.go index 29565f55c24..1df1264be72 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statefulserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statefulserviceproperties.go @@ -20,6 +20,7 @@ type StatefulServiceProperties struct { TargetReplicaSetSize *int64 `json:"targetReplicaSetSize,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` @@ -27,12 +28,30 @@ type StatefulServiceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatefulServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatefulServiceProperties{} func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { @@ -44,9 +63,10 @@ func (s StatefulServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatefulServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateful" encoded, err = json.Marshal(decoded) @@ -76,6 +96,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { s.ReplicaRestartWaitDuration = decoded.ReplicaRestartWaitDuration s.ScalingPolicies = decoded.ScalingPolicies s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServicePlacementTimeLimit = decoded.ServicePlacementTimeLimit @@ -89,7 +110,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatefulServiceProperties': %+v", err) } @@ -104,7 +125,7 @@ func (s *StatefulServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatefulServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statelessserviceproperties.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statelessserviceproperties.go index ee4c4700a7b..843d6e31f0e 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statelessserviceproperties.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_statelessserviceproperties.go @@ -16,6 +16,7 @@ type StatelessServiceProperties struct { MinInstancePercentage *int64 `json:"minInstancePercentage,omitempty"` // Fields inherited from ServiceResourceProperties + CorrelationScheme *[]ServiceCorrelation `json:"correlationScheme,omitempty"` DefaultMoveCost *MoveCost `json:"defaultMoveCost,omitempty"` PartitionDescription Partition `json:"partitionDescription"` @@ -23,12 +24,30 @@ type StatelessServiceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` ScalingPolicies *[]ScalingPolicy `json:"scalingPolicies,omitempty"` ServiceDnsName *string `json:"serviceDnsName,omitempty"` + ServiceKind ServiceKind `json:"serviceKind"` ServiceLoadMetrics *[]ServiceLoadMetric `json:"serviceLoadMetrics,omitempty"` ServicePackageActivationMode *ServicePackageActivationMode `json:"servicePackageActivationMode,omitempty"` ServicePlacementPolicies *[]ServicePlacementPolicy `json:"servicePlacementPolicies,omitempty"` ServiceTypeName string `json:"serviceTypeName"` } +func (s StatelessServiceProperties) ServiceResourceProperties() BaseServiceResourcePropertiesImpl { + return BaseServiceResourcePropertiesImpl{ + CorrelationScheme: s.CorrelationScheme, + DefaultMoveCost: s.DefaultMoveCost, + PartitionDescription: s.PartitionDescription, + PlacementConstraints: s.PlacementConstraints, + ProvisioningState: s.ProvisioningState, + ScalingPolicies: s.ScalingPolicies, + ServiceDnsName: s.ServiceDnsName, + ServiceKind: s.ServiceKind, + ServiceLoadMetrics: s.ServiceLoadMetrics, + ServicePackageActivationMode: s.ServicePackageActivationMode, + ServicePlacementPolicies: s.ServicePlacementPolicies, + ServiceTypeName: s.ServiceTypeName, + } +} + var _ json.Marshaler = StatelessServiceProperties{} func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { @@ -40,9 +59,10 @@ func (s StatelessServiceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StatelessServiceProperties: %+v", err) } + decoded["serviceKind"] = "Stateless" encoded, err = json.Marshal(decoded) @@ -71,6 +91,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { s.ProvisioningState = decoded.ProvisioningState s.ScalingPolicies = decoded.ScalingPolicies s.ServiceDnsName = decoded.ServiceDnsName + s.ServiceKind = decoded.ServiceKind s.ServiceLoadMetrics = decoded.ServiceLoadMetrics s.ServicePackageActivationMode = decoded.ServicePackageActivationMode s.ServiceTypeName = decoded.ServiceTypeName @@ -81,7 +102,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["partitionDescription"]; ok { - impl, err := unmarshalPartitionImplementation(v) + impl, err := UnmarshalPartitionImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'PartitionDescription' for 'StatelessServiceProperties': %+v", err) } @@ -96,7 +117,7 @@ func (s *StatelessServiceProperties) UnmarshalJSON(bytes []byte) error { output := make([]ServicePlacementPolicy, 0) for i, val := range listTemp { - impl, err := unmarshalServicePlacementPolicyImplementation(val) + impl, err := UnmarshalServicePlacementPolicyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ServicePlacementPolicies' for 'StatelessServiceProperties': %+v", i, err) } diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_uniformint64rangepartitionscheme.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_uniformint64rangepartitionscheme.go index 573d905f9be..f59603e978b 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_uniformint64rangepartitionscheme.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/model_uniformint64rangepartitionscheme.go @@ -16,6 +16,14 @@ type UniformInt64RangePartitionScheme struct { LowKey int64 `json:"lowKey"` // Fields inherited from Partition + + PartitionScheme PartitionScheme `json:"partitionScheme"` +} + +func (s UniformInt64RangePartitionScheme) Partition() BasePartitionImpl { + return BasePartitionImpl{ + PartitionScheme: s.PartitionScheme, + } } var _ json.Marshaler = UniformInt64RangePartitionScheme{} @@ -29,9 +37,10 @@ func (s UniformInt64RangePartitionScheme) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UniformInt64RangePartitionScheme: %+v", err) } + decoded["partitionScheme"] = "UniformInt64Range" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/version.go b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/version.go index a4433d1c2c1..c326c1f0be3 100644 --- a/resource-manager/servicefabricmanagedcluster/2024-04-01/services/version.go +++ b/resource-manager/servicefabricmanagedcluster/2024-04-01/services/version.go @@ -1,12 +1,10 @@ package services -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/services/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/services/2024-04-01" } diff --git a/resource-manager/servicelinker/2022-05-01/links/README.md b/resource-manager/servicelinker/2022-05-01/links/README.md index 7026a61d69f..a615ae42020 100644 --- a/resource-manager/servicelinker/2022-05-01/links/README.md +++ b/resource-manager/servicelinker/2022-05-01/links/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/links` Documentation -The `links` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2022-05-01`). +The `links` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2022-05-01/links/client.go b/resource-manager/servicelinker/2022-05-01/links/client.go index 8dc9ce345ce..2ab333ac564 100644 --- a/resource-manager/servicelinker/2022-05-01/links/client.go +++ b/resource-manager/servicelinker/2022-05-01/links/client.go @@ -15,7 +15,7 @@ type LinksClient struct { } func NewLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*LinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "links", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "links", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinksClient: %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go b/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go index 2f3b7e05624..a74b4562334 100644 --- a/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go +++ b/resource-manager/servicelinker/2022-05-01/links/id_scopedlinker.go @@ -40,7 +40,7 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2022-05-01/links/method_linkerlistconfigurations.go b/resource-manager/servicelinker/2022-05-01/links/method_linkerlistconfigurations.go index be301d72344..69a7eb454cb 100644 --- a/resource-manager/servicelinker/2022-05-01/links/method_linkerlistconfigurations.go +++ b/resource-manager/servicelinker/2022-05-01/links/method_linkerlistconfigurations.go @@ -46,7 +46,6 @@ func (c LinksClient) LinkerListConfigurations(ctx context.Context, id ScopedLink var model SourceConfigurationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_authinfobase.go b/resource-manager/servicelinker/2022-05-01/links/model_authinfobase.go index 69f8da16ba9..7dc59f564a9 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_authinfobase.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_authinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthInfoBase interface { + AuthInfoBase() BaseAuthInfoBaseImpl } -// RawAuthInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthInfoBase = BaseAuthInfoBaseImpl{} + +type BaseAuthInfoBaseImpl struct { + AuthType AuthType `json:"authType"` +} + +func (s BaseAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s +} + +var _ AuthInfoBase = RawAuthInfoBaseImpl{} + +// RawAuthInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthInfoBaseImpl struct { - Type string - Values map[string]interface{} + authInfoBase BaseAuthInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s.authInfoBase } -func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { +func UnmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { return out, nil } - out := RawAuthInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthInfoBaseImpl: %+v", err) } - return out, nil + + return RawAuthInfoBaseImpl{ + authInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_azurekeyvaultproperties.go b/resource-manager/servicelinker/2022-05-01/links/model_azurekeyvaultproperties.go index e38862e57ae..fbbeaf99224 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_azurekeyvaultproperties.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_azurekeyvaultproperties.go @@ -14,6 +14,14 @@ type AzureKeyVaultProperties struct { ConnectAsKubernetesCsiDriver *bool `json:"connectAsKubernetesCsiDriver,omitempty"` // Fields inherited from AzureResourcePropertiesBase + + Type AzureResourceType `json:"type"` +} + +func (s AzureKeyVaultProperties) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return BaseAzureResourcePropertiesBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultProperties{} @@ -27,9 +35,10 @@ func (s AzureKeyVaultProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultProperties: %+v", err) } + decoded["type"] = "KeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_azureresource.go b/resource-manager/servicelinker/2022-05-01/links/model_azureresource.go index 56c8436bc7b..c0ecc4085a8 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_azureresource.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_azureresource.go @@ -15,6 +15,14 @@ type AzureResource struct { ResourceProperties AzureResourcePropertiesBase `json:"resourceProperties"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s AzureResource) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResource{} @@ -28,9 +36,10 @@ func (s AzureResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResource: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } s.Id = decoded.Id + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalAzureResourcePropertiesBaseImplementation(v) + impl, err := UnmarshalAzureResourcePropertiesBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'AzureResource': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_azureresourcepropertiesbase.go b/resource-manager/servicelinker/2022-05-01/links/model_azureresourcepropertiesbase.go index d7d98345d68..697b29d5a6b 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_azureresourcepropertiesbase.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_azureresourcepropertiesbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureResourcePropertiesBase interface { + AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl } -// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureResourcePropertiesBase = BaseAzureResourcePropertiesBaseImpl{} + +type BaseAzureResourcePropertiesBaseImpl struct { + Type AzureResourceType `json:"type"` +} + +func (s BaseAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s +} + +var _ AzureResourcePropertiesBase = RawAzureResourcePropertiesBaseImpl{} + +// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureResourcePropertiesBaseImpl struct { - Type string - Values map[string]interface{} + azureResourcePropertiesBase BaseAzureResourcePropertiesBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s.azureResourcePropertiesBase } -func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { +func UnmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureReso return out, nil } - out := RawAzureResourcePropertiesBaseImpl{ - Type: value, - Values: temp, + var parent BaseAzureResourcePropertiesBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureResourcePropertiesBaseImpl: %+v", err) } - return out, nil + + return RawAzureResourcePropertiesBaseImpl{ + azureResourcePropertiesBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_confluentbootstrapserver.go b/resource-manager/servicelinker/2022-05-01/links/model_confluentbootstrapserver.go index e826d3a1569..36cdbcc0ce1 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_confluentbootstrapserver.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_confluentbootstrapserver.go @@ -14,6 +14,14 @@ type ConfluentBootstrapServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentBootstrapServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentBootstrapServer{} @@ -27,9 +35,10 @@ func (s ConfluentBootstrapServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentBootstrapServer: %+v", err) } + decoded["type"] = "ConfluentBootstrapServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_confluentschemaregistry.go b/resource-manager/servicelinker/2022-05-01/links/model_confluentschemaregistry.go index 3bbf94f748a..a58c12b824d 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_confluentschemaregistry.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_confluentschemaregistry.go @@ -14,6 +14,14 @@ type ConfluentSchemaRegistry struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentSchemaRegistry) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentSchemaRegistry{} @@ -27,9 +35,10 @@ func (s ConfluentSchemaRegistry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentSchemaRegistry: %+v", err) } + decoded["type"] = "ConfluentSchemaRegistry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecretreferencesecretinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecretreferencesecretinfo.go index 97fd87695b0..84d5a5c6f79 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecretreferencesecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecretreferencesecretinfo.go @@ -15,6 +15,14 @@ type KeyVaultSecretReferenceSecretInfo struct { Version *string `json:"version,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretReferenceSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretReferenceSecretInfo{} @@ -28,9 +36,10 @@ func (s KeyVaultSecretReferenceSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretReferenceSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecreturisecretinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecreturisecretinfo.go index abd8430f65b..da7eca86507 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecreturisecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_keyvaultsecreturisecretinfo.go @@ -14,6 +14,14 @@ type KeyVaultSecretUriSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretUriSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretUriSecretInfo{} @@ -27,9 +35,10 @@ func (s KeyVaultSecretUriSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretUriSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretUri" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_linkerproperties.go b/resource-manager/servicelinker/2022-05-01/links/model_linkerproperties.go index c3e24a527db..6f51a3e8877 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_linkerproperties.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_linkerproperties.go @@ -39,7 +39,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'LinkerProperties': %+v", err) } @@ -47,7 +47,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'LinkerProperties': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_secretauthinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_secretauthinfo.go index 315fc2b1e9a..05ea59484c4 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_secretauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_secretauthinfo.go @@ -15,6 +15,14 @@ type SecretAuthInfo struct { SecretInfo SecretInfoBase `json:"secretInfo"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s SecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = SecretAuthInfo{} @@ -28,9 +36,10 @@ func (s SecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretAuthInfo: %+v", err) } + decoded["authType"] = "secret" encoded, err = json.Marshal(decoded) @@ -50,6 +59,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into SecretAuthInfo: %+v", err) } + s.AuthType = decoded.AuthType s.Name = decoded.Name var temp map[string]json.RawMessage @@ -58,7 +68,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["secretInfo"]; ok { - impl, err := unmarshalSecretInfoBaseImplementation(v) + impl, err := UnmarshalSecretInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretInfo' for 'SecretAuthInfo': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_secretinfobase.go b/resource-manager/servicelinker/2022-05-01/links/model_secretinfobase.go index e9869b2628b..d3886432f7e 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_secretinfobase.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_secretinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretInfoBase interface { + SecretInfoBase() BaseSecretInfoBaseImpl } -// RawSecretInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretInfoBase = BaseSecretInfoBaseImpl{} + +type BaseSecretInfoBaseImpl struct { + SecretType SecretType `json:"secretType"` +} + +func (s BaseSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s +} + +var _ SecretInfoBase = RawSecretInfoBaseImpl{} + +// RawSecretInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretInfoBaseImpl struct { - Type string - Values map[string]interface{} + secretInfoBase BaseSecretInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s.secretInfoBase } -func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { +func UnmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) return out, nil } - out := RawSecretInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretInfoBaseImpl: %+v", err) } - return out, nil + + return RawSecretInfoBaseImpl{ + secretInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalcertificateauthinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalcertificateauthinfo.go index 874e93d5feb..ef25bbce438 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalcertificateauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalcertificateauthinfo.go @@ -16,6 +16,14 @@ type ServicePrincipalCertificateAuthInfo struct { PrincipalId string `json:"principalId"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalCertificateAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalCertificateAuthInfo{} @@ -29,9 +37,10 @@ func (s ServicePrincipalCertificateAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCertificateAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalsecretauthinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalsecretauthinfo.go index 68b5a00ccf0..127eece4582 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalsecretauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_serviceprincipalsecretauthinfo.go @@ -16,6 +16,14 @@ type ServicePrincipalSecretAuthInfo struct { Secret string `json:"secret"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalSecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalSecretAuthInfo{} @@ -29,9 +37,10 @@ func (s ServicePrincipalSecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalSecretAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_systemassignedidentityauthinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_systemassignedidentityauthinfo.go index 607b05fdfe4..b9ed3e38690 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_systemassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_systemassignedidentityauthinfo.go @@ -13,6 +13,14 @@ var _ AuthInfoBase = SystemAssignedIdentityAuthInfo{} type SystemAssignedIdentityAuthInfo struct { // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s SystemAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = SystemAssignedIdentityAuthInfo{} @@ -26,9 +34,10 @@ func (s SystemAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SystemAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "systemAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_targetservicebase.go b/resource-manager/servicelinker/2022-05-01/links/model_targetservicebase.go index 226cec33e16..2cd0fa9243d 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_targetservicebase.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_targetservicebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetServiceBase interface { + TargetServiceBase() BaseTargetServiceBaseImpl } -// RawTargetServiceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetServiceBase = BaseTargetServiceBaseImpl{} + +type BaseTargetServiceBaseImpl struct { + Type TargetServiceType `json:"type"` +} + +func (s BaseTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s +} + +var _ TargetServiceBase = RawTargetServiceBaseImpl{} + +// RawTargetServiceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetServiceBaseImpl struct { - Type string - Values map[string]interface{} + targetServiceBase BaseTargetServiceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s.targetServiceBase } -func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { +func UnmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, return out, nil } - out := RawTargetServiceBaseImpl{ - Type: value, - Values: temp, + var parent BaseTargetServiceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetServiceBaseImpl: %+v", err) } - return out, nil + + return RawTargetServiceBaseImpl{ + targetServiceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/links/model_userassignedidentityauthinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_userassignedidentityauthinfo.go index 2202d649867..94709ce88c1 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_userassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_userassignedidentityauthinfo.go @@ -15,6 +15,14 @@ type UserAssignedIdentityAuthInfo struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s UserAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAssignedIdentityAuthInfo{} @@ -28,9 +36,10 @@ func (s UserAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "userAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/model_valuesecretinfo.go b/resource-manager/servicelinker/2022-05-01/links/model_valuesecretinfo.go index a10b8af9126..b74d7736989 100644 --- a/resource-manager/servicelinker/2022-05-01/links/model_valuesecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/links/model_valuesecretinfo.go @@ -14,6 +14,14 @@ type ValueSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s ValueSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = ValueSecretInfo{} @@ -27,9 +35,10 @@ func (s ValueSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValueSecretInfo: %+v", err) } + decoded["secretType"] = "rawValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/links/version.go b/resource-manager/servicelinker/2022-05-01/links/version.go index b0046c85418..4af28a6800b 100644 --- a/resource-manager/servicelinker/2022-05-01/links/version.go +++ b/resource-manager/servicelinker/2022-05-01/links/version.go @@ -1,12 +1,10 @@ package links -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/links/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/links/2022-05-01" } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/README.md b/resource-manager/servicelinker/2022-05-01/servicelinker/README.md index b5c91c7931f..cb09e846624 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/README.md +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2022-05-01/servicelinker` Documentation -The `servicelinker` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2022-05-01`). +The `servicelinker` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/client.go b/resource-manager/servicelinker/2022-05-01/servicelinker/client.go index b55ab79fe84..bce1af86af4 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/client.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/client.go @@ -15,7 +15,7 @@ type ServiceLinkerClient struct { } func NewServiceLinkerClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceLinkerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicelinker", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicelinker", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceLinkerClient: %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go b/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go index 5673d740501..3f620a73ed1 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/id_scopedlinker.go @@ -40,7 +40,7 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/method_linkerget.go b/resource-manager/servicelinker/2022-05-01/servicelinker/method_linkerget.go index baa9bec3496..61f8cc1a830 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/method_linkerget.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/method_linkerget.go @@ -45,7 +45,6 @@ func (c ServiceLinkerClient) LinkerGet(ctx context.Context, id ScopedLinkerId) ( var model LinkerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_authinfobase.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_authinfobase.go index f4db87ec23e..050eb1816f1 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_authinfobase.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_authinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthInfoBase interface { + AuthInfoBase() BaseAuthInfoBaseImpl } -// RawAuthInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthInfoBase = BaseAuthInfoBaseImpl{} + +type BaseAuthInfoBaseImpl struct { + AuthType AuthType `json:"authType"` +} + +func (s BaseAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s +} + +var _ AuthInfoBase = RawAuthInfoBaseImpl{} + +// RawAuthInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthInfoBaseImpl struct { - Type string - Values map[string]interface{} + authInfoBase BaseAuthInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s.authInfoBase } -func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { +func UnmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { return out, nil } - out := RawAuthInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthInfoBaseImpl: %+v", err) } - return out, nil + + return RawAuthInfoBaseImpl{ + authInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azurekeyvaultproperties.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azurekeyvaultproperties.go index 68ba606d216..6330e655cd2 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azurekeyvaultproperties.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azurekeyvaultproperties.go @@ -14,6 +14,14 @@ type AzureKeyVaultProperties struct { ConnectAsKubernetesCsiDriver *bool `json:"connectAsKubernetesCsiDriver,omitempty"` // Fields inherited from AzureResourcePropertiesBase + + Type AzureResourceType `json:"type"` +} + +func (s AzureKeyVaultProperties) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return BaseAzureResourcePropertiesBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultProperties{} @@ -27,9 +35,10 @@ func (s AzureKeyVaultProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultProperties: %+v", err) } + decoded["type"] = "KeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresource.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresource.go index ce0dcb00a30..c2bf02b18c6 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresource.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresource.go @@ -15,6 +15,14 @@ type AzureResource struct { ResourceProperties AzureResourcePropertiesBase `json:"resourceProperties"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s AzureResource) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResource{} @@ -28,9 +36,10 @@ func (s AzureResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResource: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } s.Id = decoded.Id + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalAzureResourcePropertiesBaseImplementation(v) + impl, err := UnmarshalAzureResourcePropertiesBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'AzureResource': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresourcepropertiesbase.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresourcepropertiesbase.go index 8770e9d89a1..4e721cb2b29 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresourcepropertiesbase.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_azureresourcepropertiesbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureResourcePropertiesBase interface { + AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl } -// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureResourcePropertiesBase = BaseAzureResourcePropertiesBaseImpl{} + +type BaseAzureResourcePropertiesBaseImpl struct { + Type AzureResourceType `json:"type"` +} + +func (s BaseAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s +} + +var _ AzureResourcePropertiesBase = RawAzureResourcePropertiesBaseImpl{} + +// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureResourcePropertiesBaseImpl struct { - Type string - Values map[string]interface{} + azureResourcePropertiesBase BaseAzureResourcePropertiesBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s.azureResourcePropertiesBase } -func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { +func UnmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureReso return out, nil } - out := RawAzureResourcePropertiesBaseImpl{ - Type: value, - Values: temp, + var parent BaseAzureResourcePropertiesBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureResourcePropertiesBaseImpl: %+v", err) } - return out, nil + + return RawAzureResourcePropertiesBaseImpl{ + azureResourcePropertiesBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentbootstrapserver.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentbootstrapserver.go index f35c8799a1f..44e86fdb4e3 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentbootstrapserver.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentbootstrapserver.go @@ -14,6 +14,14 @@ type ConfluentBootstrapServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentBootstrapServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentBootstrapServer{} @@ -27,9 +35,10 @@ func (s ConfluentBootstrapServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentBootstrapServer: %+v", err) } + decoded["type"] = "ConfluentBootstrapServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentschemaregistry.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentschemaregistry.go index 5d5bfe99668..5344db21f62 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentschemaregistry.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_confluentschemaregistry.go @@ -14,6 +14,14 @@ type ConfluentSchemaRegistry struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentSchemaRegistry) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentSchemaRegistry{} @@ -27,9 +35,10 @@ func (s ConfluentSchemaRegistry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentSchemaRegistry: %+v", err) } + decoded["type"] = "ConfluentSchemaRegistry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go index ba11cd6c536..fbe7039ab55 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go @@ -15,6 +15,14 @@ type KeyVaultSecretReferenceSecretInfo struct { Version *string `json:"version,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretReferenceSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretReferenceSecretInfo{} @@ -28,9 +36,10 @@ func (s KeyVaultSecretReferenceSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretReferenceSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecreturisecretinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecreturisecretinfo.go index 31c102db91c..73f67f23d0d 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecreturisecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_keyvaultsecreturisecretinfo.go @@ -14,6 +14,14 @@ type KeyVaultSecretUriSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretUriSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretUriSecretInfo{} @@ -27,9 +35,10 @@ func (s KeyVaultSecretUriSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretUriSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretUri" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_linkerproperties.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_linkerproperties.go index 7a9d4236387..fc337ba75c0 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_linkerproperties.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_linkerproperties.go @@ -39,7 +39,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'LinkerProperties': %+v", err) } @@ -47,7 +47,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'LinkerProperties': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretauthinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretauthinfo.go index f5989cbb006..a006485dbd0 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretauthinfo.go @@ -15,6 +15,14 @@ type SecretAuthInfo struct { SecretInfo SecretInfoBase `json:"secretInfo"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s SecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = SecretAuthInfo{} @@ -28,9 +36,10 @@ func (s SecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretAuthInfo: %+v", err) } + decoded["authType"] = "secret" encoded, err = json.Marshal(decoded) @@ -50,6 +59,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into SecretAuthInfo: %+v", err) } + s.AuthType = decoded.AuthType s.Name = decoded.Name var temp map[string]json.RawMessage @@ -58,7 +68,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["secretInfo"]; ok { - impl, err := unmarshalSecretInfoBaseImplementation(v) + impl, err := UnmarshalSecretInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretInfo' for 'SecretAuthInfo': %+v", err) } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretinfobase.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretinfobase.go index 2f256c61e4a..5b3d7b1aa7d 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretinfobase.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_secretinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretInfoBase interface { + SecretInfoBase() BaseSecretInfoBaseImpl } -// RawSecretInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretInfoBase = BaseSecretInfoBaseImpl{} + +type BaseSecretInfoBaseImpl struct { + SecretType SecretType `json:"secretType"` +} + +func (s BaseSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s +} + +var _ SecretInfoBase = RawSecretInfoBaseImpl{} + +// RawSecretInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretInfoBaseImpl struct { - Type string - Values map[string]interface{} + secretInfoBase BaseSecretInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s.secretInfoBase } -func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { +func UnmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) return out, nil } - out := RawSecretInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretInfoBaseImpl: %+v", err) } - return out, nil + + return RawSecretInfoBaseImpl{ + secretInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalcertificateauthinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalcertificateauthinfo.go index e84cd944fb3..0593f87ea74 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalcertificateauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalcertificateauthinfo.go @@ -16,6 +16,14 @@ type ServicePrincipalCertificateAuthInfo struct { PrincipalId string `json:"principalId"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalCertificateAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalCertificateAuthInfo{} @@ -29,9 +37,10 @@ func (s ServicePrincipalCertificateAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCertificateAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalsecretauthinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalsecretauthinfo.go index 4c3e2d12858..474f1692940 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalsecretauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_serviceprincipalsecretauthinfo.go @@ -16,6 +16,14 @@ type ServicePrincipalSecretAuthInfo struct { Secret string `json:"secret"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalSecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalSecretAuthInfo{} @@ -29,9 +37,10 @@ func (s ServicePrincipalSecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalSecretAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_systemassignedidentityauthinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_systemassignedidentityauthinfo.go index 1fa2c1ae039..61342f0b25b 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_systemassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_systemassignedidentityauthinfo.go @@ -13,6 +13,14 @@ var _ AuthInfoBase = SystemAssignedIdentityAuthInfo{} type SystemAssignedIdentityAuthInfo struct { // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s SystemAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = SystemAssignedIdentityAuthInfo{} @@ -26,9 +34,10 @@ func (s SystemAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SystemAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "systemAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_targetservicebase.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_targetservicebase.go index 5f8718ac05a..3e4e8086d53 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_targetservicebase.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_targetservicebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetServiceBase interface { + TargetServiceBase() BaseTargetServiceBaseImpl } -// RawTargetServiceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetServiceBase = BaseTargetServiceBaseImpl{} + +type BaseTargetServiceBaseImpl struct { + Type TargetServiceType `json:"type"` +} + +func (s BaseTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s +} + +var _ TargetServiceBase = RawTargetServiceBaseImpl{} + +// RawTargetServiceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetServiceBaseImpl struct { - Type string - Values map[string]interface{} + targetServiceBase BaseTargetServiceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s.targetServiceBase } -func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { +func UnmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, return out, nil } - out := RawTargetServiceBaseImpl{ - Type: value, - Values: temp, + var parent BaseTargetServiceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetServiceBaseImpl: %+v", err) } - return out, nil + + return RawTargetServiceBaseImpl{ + targetServiceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_userassignedidentityauthinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_userassignedidentityauthinfo.go index 5e140e1662f..740655432b5 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_userassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_userassignedidentityauthinfo.go @@ -15,6 +15,14 @@ type UserAssignedIdentityAuthInfo struct { SubscriptionId *string `json:"subscriptionId,omitempty"` // Fields inherited from AuthInfoBase + + AuthType AuthType `json:"authType"` +} + +func (s UserAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAssignedIdentityAuthInfo{} @@ -28,9 +36,10 @@ func (s UserAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "userAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/model_valuesecretinfo.go b/resource-manager/servicelinker/2022-05-01/servicelinker/model_valuesecretinfo.go index 3c638a82a47..c6f3d5e30f2 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/model_valuesecretinfo.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/model_valuesecretinfo.go @@ -14,6 +14,14 @@ type ValueSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s ValueSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = ValueSecretInfo{} @@ -27,9 +35,10 @@ func (s ValueSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValueSecretInfo: %+v", err) } + decoded["secretType"] = "rawValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2022-05-01/servicelinker/version.go b/resource-manager/servicelinker/2022-05-01/servicelinker/version.go index 19cc38ddcb8..260c2387134 100644 --- a/resource-manager/servicelinker/2022-05-01/servicelinker/version.go +++ b/resource-manager/servicelinker/2022-05-01/servicelinker/version.go @@ -1,12 +1,10 @@ package servicelinker -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicelinker/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicelinker/2022-05-01" } diff --git a/resource-manager/servicelinker/2024-04-01/configurationnames/README.md b/resource-manager/servicelinker/2024-04-01/configurationnames/README.md index 65479d061b9..95fd99089bd 100644 --- a/resource-manager/servicelinker/2024-04-01/configurationnames/README.md +++ b/resource-manager/servicelinker/2024-04-01/configurationnames/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2024-04-01/configurationnames` Documentation -The `configurationnames` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2024-04-01`). +The `configurationnames` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2024-04-01/configurationnames/client.go b/resource-manager/servicelinker/2024-04-01/configurationnames/client.go index d0235d81656..38413e369b9 100644 --- a/resource-manager/servicelinker/2024-04-01/configurationnames/client.go +++ b/resource-manager/servicelinker/2024-04-01/configurationnames/client.go @@ -15,7 +15,7 @@ type ConfigurationNamesClient struct { } func NewConfigurationNamesClientWithBaseURI(sdkApi sdkEnv.Api) (*ConfigurationNamesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "configurationnames", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "configurationnames", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConfigurationNamesClient: %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/configurationnames/method_list.go b/resource-manager/servicelinker/2024-04-01/configurationnames/method_list.go index 29597c2ac2d..33ee869d485 100644 --- a/resource-manager/servicelinker/2024-04-01/configurationnames/method_list.go +++ b/resource-manager/servicelinker/2024-04-01/configurationnames/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/servicelinker/2024-04-01/configurationnames/version.go b/resource-manager/servicelinker/2024-04-01/configurationnames/version.go index 1ecf9eb4103..85c726917f6 100644 --- a/resource-manager/servicelinker/2024-04-01/configurationnames/version.go +++ b/resource-manager/servicelinker/2024-04-01/configurationnames/version.go @@ -1,12 +1,10 @@ package configurationnames -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/configurationnames/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/configurationnames/2024-04-01" } diff --git a/resource-manager/servicelinker/2024-04-01/connector/README.md b/resource-manager/servicelinker/2024-04-01/connector/README.md index bb0c0ddb239..dbceaba9d46 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/README.md +++ b/resource-manager/servicelinker/2024-04-01/connector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2024-04-01/connector` Documentation -The `connector` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2024-04-01`). +The `connector` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2024-04-01/connector/client.go b/resource-manager/servicelinker/2024-04-01/connector/client.go index 46fef5c9d62..64a5a6e06a7 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/client.go +++ b/resource-manager/servicelinker/2024-04-01/connector/client.go @@ -15,7 +15,7 @@ type ConnectorClient struct { } func NewConnectorClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectorClient: %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/id_connector.go b/resource-manager/servicelinker/2024-04-01/connector/id_connector.go index 0d8322106b4..ab35e69998d 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/id_connector.go +++ b/resource-manager/servicelinker/2024-04-01/connector/id_connector.go @@ -44,7 +44,7 @@ func ParseConnectorID(input string) (*ConnectorId, error) { } id := ConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectorIDInsensitively(input string) (*ConnectorId, error) { } id := ConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/connector/id_dryrun.go b/resource-manager/servicelinker/2024-04-01/connector/id_dryrun.go index 2f0eef9f7c7..6ef6b9d135a 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/id_dryrun.go +++ b/resource-manager/servicelinker/2024-04-01/connector/id_dryrun.go @@ -44,7 +44,7 @@ func ParseDryrunID(input string) (*DryrunId, error) { } id := DryrunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDryrunIDInsensitively(input string) (*DryrunId, error) { } id := DryrunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/connector/id_location.go b/resource-manager/servicelinker/2024-04-01/connector/id_location.go index 5a8b4fb8a05..ec78580c3de 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/id_location.go +++ b/resource-manager/servicelinker/2024-04-01/connector/id_location.go @@ -42,7 +42,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/connector/method_generateconfigurations.go b/resource-manager/servicelinker/2024-04-01/connector/method_generateconfigurations.go index fce671d2e28..3ac2a86d921 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/method_generateconfigurations.go +++ b/resource-manager/servicelinker/2024-04-01/connector/method_generateconfigurations.go @@ -50,7 +50,6 @@ func (c ConnectorClient) GenerateConfigurations(ctx context.Context, id Connecto var model ConfigurationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/connector/method_getdryrun.go b/resource-manager/servicelinker/2024-04-01/connector/method_getdryrun.go index ece9801d1d3..5efc23d9876 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/method_getdryrun.go +++ b/resource-manager/servicelinker/2024-04-01/connector/method_getdryrun.go @@ -45,7 +45,6 @@ func (c ConnectorClient) GetDryrun(ctx context.Context, id DryrunId) (result Get var model DryrunResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_accesskeyinfobase.go b/resource-manager/servicelinker/2024-04-01/connector/model_accesskeyinfobase.go index 23105db41a8..7876d38e2b8 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_accesskeyinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_accesskeyinfobase.go @@ -14,7 +14,16 @@ type AccessKeyInfoBase struct { Permissions *[]AccessKeyPermissions `json:"permissions,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s AccessKeyInfoBase) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = AccessKeyInfoBase{} @@ -28,9 +37,10 @@ func (s AccessKeyInfoBase) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccessKeyInfoBase: %+v", err) } + decoded["authType"] = "accessKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_authinfobase.go b/resource-manager/servicelinker/2024-04-01/connector/model_authinfobase.go index de93f698857..5588c8f32dd 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_authinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_authinfobase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthInfoBase interface { + AuthInfoBase() BaseAuthInfoBaseImpl } -// RawAuthInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthInfoBase = BaseAuthInfoBaseImpl{} + +type BaseAuthInfoBaseImpl struct { + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s BaseAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s +} + +var _ AuthInfoBase = RawAuthInfoBaseImpl{} + +// RawAuthInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthInfoBaseImpl struct { - Type string - Values map[string]interface{} + authInfoBase BaseAuthInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s.authInfoBase } -func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { +func UnmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { if input == nil { return nil, nil } @@ -100,10 +118,15 @@ func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { return out, nil } - out := RawAuthInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthInfoBaseImpl: %+v", err) } - return out, nil + + return RawAuthInfoBaseImpl{ + authInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_azurekeyvaultproperties.go b/resource-manager/servicelinker/2024-04-01/connector/model_azurekeyvaultproperties.go index 552f5b25f94..1b5d29748f7 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_azurekeyvaultproperties.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_azurekeyvaultproperties.go @@ -14,6 +14,14 @@ type AzureKeyVaultProperties struct { ConnectAsKubernetesCsiDriver *bool `json:"connectAsKubernetesCsiDriver,omitempty"` // Fields inherited from AzureResourcePropertiesBase + + Type AzureResourceType `json:"type"` +} + +func (s AzureKeyVaultProperties) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return BaseAzureResourcePropertiesBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultProperties{} @@ -27,9 +35,10 @@ func (s AzureKeyVaultProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultProperties: %+v", err) } + decoded["type"] = "KeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_azureresource.go b/resource-manager/servicelinker/2024-04-01/connector/model_azureresource.go index fa4b48f94aa..f8b5b164272 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_azureresource.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_azureresource.go @@ -15,6 +15,14 @@ type AzureResource struct { ResourceProperties AzureResourcePropertiesBase `json:"resourceProperties"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s AzureResource) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResource{} @@ -28,9 +36,10 @@ func (s AzureResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResource: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } s.Id = decoded.Id + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalAzureResourcePropertiesBaseImplementation(v) + impl, err := UnmarshalAzureResourcePropertiesBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'AzureResource': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_azureresourcepropertiesbase.go b/resource-manager/servicelinker/2024-04-01/connector/model_azureresourcepropertiesbase.go index fc016ed33e5..b9feb5af740 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_azureresourcepropertiesbase.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_azureresourcepropertiesbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureResourcePropertiesBase interface { + AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl } -// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureResourcePropertiesBase = BaseAzureResourcePropertiesBaseImpl{} + +type BaseAzureResourcePropertiesBaseImpl struct { + Type AzureResourceType `json:"type"` +} + +func (s BaseAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s +} + +var _ AzureResourcePropertiesBase = RawAzureResourcePropertiesBaseImpl{} + +// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureResourcePropertiesBaseImpl struct { - Type string - Values map[string]interface{} + azureResourcePropertiesBase BaseAzureResourcePropertiesBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s.azureResourcePropertiesBase } -func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { +func UnmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureReso return out, nil } - out := RawAzureResourcePropertiesBaseImpl{ - Type: value, - Values: temp, + var parent BaseAzureResourcePropertiesBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureResourcePropertiesBaseImpl: %+v", err) } - return out, nil + + return RawAzureResourcePropertiesBaseImpl{ + azureResourcePropertiesBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_basicerrordryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/connector/model_basicerrordryrunprerequisiteresult.go index 1ddca7dea03..895aed833a7 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_basicerrordryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_basicerrordryrunprerequisiteresult.go @@ -15,6 +15,14 @@ type BasicErrorDryrunPrerequisiteResult struct { Message *string `json:"message,omitempty"` // Fields inherited from DryrunPrerequisiteResult + + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s BasicErrorDryrunPrerequisiteResult) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return BaseDryrunPrerequisiteResultImpl{ + Type: s.Type, + } } var _ json.Marshaler = BasicErrorDryrunPrerequisiteResult{} @@ -28,9 +36,10 @@ func (s BasicErrorDryrunPrerequisiteResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BasicErrorDryrunPrerequisiteResult: %+v", err) } + decoded["type"] = "basicError" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_confluentbootstrapserver.go b/resource-manager/servicelinker/2024-04-01/connector/model_confluentbootstrapserver.go index 061d7381ed5..9f86e24852d 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_confluentbootstrapserver.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_confluentbootstrapserver.go @@ -14,6 +14,14 @@ type ConfluentBootstrapServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentBootstrapServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentBootstrapServer{} @@ -27,9 +35,10 @@ func (s ConfluentBootstrapServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentBootstrapServer: %+v", err) } + decoded["type"] = "ConfluentBootstrapServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_confluentschemaregistry.go b/resource-manager/servicelinker/2024-04-01/connector/model_confluentschemaregistry.go index b336a4b378a..21789f3a5d1 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_confluentschemaregistry.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_confluentschemaregistry.go @@ -14,6 +14,14 @@ type ConfluentSchemaRegistry struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentSchemaRegistry) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentSchemaRegistry{} @@ -27,9 +35,10 @@ func (s ConfluentSchemaRegistry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentSchemaRegistry: %+v", err) } + decoded["type"] = "ConfluentSchemaRegistry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_createorupdatedryrunparameters.go b/resource-manager/servicelinker/2024-04-01/connector/model_createorupdatedryrunparameters.go index 0dc7d608af7..7a10ba394c3 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_createorupdatedryrunparameters.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_createorupdatedryrunparameters.go @@ -22,6 +22,14 @@ type CreateOrUpdateDryrunParameters struct { VNetSolution *VNetSolution `json:"vNetSolution,omitempty"` // Fields inherited from DryrunParameters + + ActionName DryrunActionName `json:"actionName"` +} + +func (s CreateOrUpdateDryrunParameters) DryrunParameters() BaseDryrunParametersImpl { + return BaseDryrunParametersImpl{ + ActionName: s.ActionName, + } } var _ json.Marshaler = CreateOrUpdateDryrunParameters{} @@ -35,9 +43,10 @@ func (s CreateOrUpdateDryrunParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CreateOrUpdateDryrunParameters: %+v", err) } + decoded["actionName"] = "createOrUpdate" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into CreateOrUpdateDryrunParameters: %+v", err) } + s.ActionName = decoded.ActionName s.ClientType = decoded.ClientType s.ConfigurationInfo = decoded.ConfigurationInfo s.ProvisioningState = decoded.ProvisioningState @@ -71,7 +81,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'CreateOrUpdateDryrunParameters': %+v", err) } @@ -79,7 +89,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'CreateOrUpdateDryrunParameters': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunparameters.go b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunparameters.go index c16a398b64f..7224f04da52 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunparameters.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DryrunParameters interface { + DryrunParameters() BaseDryrunParametersImpl } -// RawDryrunParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DryrunParameters = BaseDryrunParametersImpl{} + +type BaseDryrunParametersImpl struct { + ActionName DryrunActionName `json:"actionName"` +} + +func (s BaseDryrunParametersImpl) DryrunParameters() BaseDryrunParametersImpl { + return s +} + +var _ DryrunParameters = RawDryrunParametersImpl{} + +// RawDryrunParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDryrunParametersImpl struct { - Type string - Values map[string]interface{} + dryrunParameters BaseDryrunParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDryrunParametersImpl) DryrunParameters() BaseDryrunParametersImpl { + return s.dryrunParameters } -func unmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, error) { +func UnmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, er return out, nil } - out := RawDryrunParametersImpl{ - Type: value, - Values: temp, + var parent BaseDryrunParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDryrunParametersImpl: %+v", err) } - return out, nil + + return RawDryrunParametersImpl{ + dryrunParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunprerequisiteresult.go index 7fbc37d5d4e..88d4dd91ba1 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunprerequisiteresult.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DryrunPrerequisiteResult interface { + DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl } -// RawDryrunPrerequisiteResultImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DryrunPrerequisiteResult = BaseDryrunPrerequisiteResultImpl{} + +type BaseDryrunPrerequisiteResultImpl struct { + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s BaseDryrunPrerequisiteResultImpl) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return s +} + +var _ DryrunPrerequisiteResult = RawDryrunPrerequisiteResultImpl{} + +// RawDryrunPrerequisiteResultImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDryrunPrerequisiteResultImpl struct { - Type string - Values map[string]interface{} + dryrunPrerequisiteResult BaseDryrunPrerequisiteResultImpl + Type string + Values map[string]interface{} +} + +func (s RawDryrunPrerequisiteResultImpl) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return s.dryrunPrerequisiteResult } -func unmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrerequisiteResult, error) { +func UnmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrerequisiteResult, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrereq return out, nil } - out := RawDryrunPrerequisiteResultImpl{ - Type: value, - Values: temp, + var parent BaseDryrunPrerequisiteResultImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDryrunPrerequisiteResultImpl: %+v", err) } - return out, nil + + return RawDryrunPrerequisiteResultImpl{ + dryrunPrerequisiteResult: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunproperties.go b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunproperties.go index 29f18a80650..b72cf1af308 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_dryrunproperties.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_dryrunproperties.go @@ -33,7 +33,7 @@ func (s *DryrunProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["parameters"]; ok { - impl, err := unmarshalDryrunParametersImplementation(v) + impl, err := UnmarshalDryrunParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Parameters' for 'DryrunProperties': %+v", err) } @@ -48,7 +48,7 @@ func (s *DryrunProperties) UnmarshalJSON(bytes []byte) error { output := make([]DryrunPrerequisiteResult, 0) for i, val := range listTemp { - impl, err := unmarshalDryrunPrerequisiteResultImplementation(val) + impl, err := UnmarshalDryrunPrerequisiteResultImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PrerequisiteResults' for 'DryrunProperties': %+v", i, err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_easyauthmicrosoftentraidauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_easyauthmicrosoftentraidauthinfo.go index c09a0433f1d..8f41c4291a2 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_easyauthmicrosoftentraidauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_easyauthmicrosoftentraidauthinfo.go @@ -16,7 +16,16 @@ type EasyAuthMicrosoftEntraIDAuthInfo struct { Secret *string `json:"secret,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s EasyAuthMicrosoftEntraIDAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = EasyAuthMicrosoftEntraIDAuthInfo{} @@ -30,9 +39,10 @@ func (s EasyAuthMicrosoftEntraIDAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EasyAuthMicrosoftEntraIDAuthInfo: %+v", err) } + decoded["authType"] = "easyAuthMicrosoftEntraID" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecretreferencesecretinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecretreferencesecretinfo.go index f3b0ece9cf7..49881319b2e 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecretreferencesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecretreferencesecretinfo.go @@ -15,6 +15,14 @@ type KeyVaultSecretReferenceSecretInfo struct { Version *string `json:"version,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretReferenceSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretReferenceSecretInfo{} @@ -28,9 +36,10 @@ func (s KeyVaultSecretReferenceSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretReferenceSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecreturisecretinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecreturisecretinfo.go index f2019f720a8..54c89bb30e1 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecreturisecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_keyvaultsecreturisecretinfo.go @@ -14,6 +14,14 @@ type KeyVaultSecretUriSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretUriSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretUriSecretInfo{} @@ -27,9 +35,10 @@ func (s KeyVaultSecretUriSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretUriSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretUri" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_linkerproperties.go b/resource-manager/servicelinker/2024-04-01/connector/model_linkerproperties.go index b107d575bff..8b488778594 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_linkerproperties.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_linkerproperties.go @@ -43,7 +43,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'LinkerProperties': %+v", err) } @@ -51,7 +51,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'LinkerProperties': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_permissionsmissingdryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/connector/model_permissionsmissingdryrunprerequisiteresult.go index 43036c436ca..996a2257292 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_permissionsmissingdryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_permissionsmissingdryrunprerequisiteresult.go @@ -16,6 +16,14 @@ type PermissionsMissingDryrunPrerequisiteResult struct { Scope *string `json:"scope,omitempty"` // Fields inherited from DryrunPrerequisiteResult + + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s PermissionsMissingDryrunPrerequisiteResult) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return BaseDryrunPrerequisiteResultImpl{ + Type: s.Type, + } } var _ json.Marshaler = PermissionsMissingDryrunPrerequisiteResult{} @@ -29,9 +37,10 @@ func (s PermissionsMissingDryrunPrerequisiteResult) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PermissionsMissingDryrunPrerequisiteResult: %+v", err) } + decoded["type"] = "permissionsMissing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_secretauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_secretauthinfo.go index 9e8570016b2..831bbd60592 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_secretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_secretauthinfo.go @@ -15,7 +15,16 @@ type SecretAuthInfo struct { SecretInfo SecretInfoBase `json:"secretInfo"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SecretAuthInfo{} @@ -29,9 +38,10 @@ func (s SecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretAuthInfo: %+v", err) } + decoded["authType"] = "secret" encoded, err = json.Marshal(decoded) @@ -52,6 +62,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } s.AuthMode = decoded.AuthMode + s.AuthType = decoded.AuthType s.Name = decoded.Name var temp map[string]json.RawMessage @@ -60,7 +71,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["secretInfo"]; ok { - impl, err := unmarshalSecretInfoBaseImplementation(v) + impl, err := UnmarshalSecretInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretInfo' for 'SecretAuthInfo': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_secretinfobase.go b/resource-manager/servicelinker/2024-04-01/connector/model_secretinfobase.go index 48f3aed6980..912b44f49f5 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_secretinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_secretinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretInfoBase interface { + SecretInfoBase() BaseSecretInfoBaseImpl } -// RawSecretInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretInfoBase = BaseSecretInfoBaseImpl{} + +type BaseSecretInfoBaseImpl struct { + SecretType SecretType `json:"secretType"` +} + +func (s BaseSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s +} + +var _ SecretInfoBase = RawSecretInfoBaseImpl{} + +// RawSecretInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretInfoBaseImpl struct { - Type string - Values map[string]interface{} + secretInfoBase BaseSecretInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s.secretInfoBase } -func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { +func UnmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) return out, nil } - out := RawSecretInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretInfoBaseImpl: %+v", err) } - return out, nil + + return RawSecretInfoBaseImpl{ + secretInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_selfhostedserver.go b/resource-manager/servicelinker/2024-04-01/connector/model_selfhostedserver.go index cf9607e8557..49d080d03d7 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_selfhostedserver.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_selfhostedserver.go @@ -14,6 +14,14 @@ type SelfHostedServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s SelfHostedServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SelfHostedServer{} @@ -27,9 +35,10 @@ func (s SelfHostedServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedServer: %+v", err) } + decoded["type"] = "SelfHostedServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalcertificateauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalcertificateauthinfo.go index fb95e670d4c..ee8cb39a8ff 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalcertificateauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalcertificateauthinfo.go @@ -18,7 +18,16 @@ type ServicePrincipalCertificateAuthInfo struct { Roles *[]string `json:"roles,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalCertificateAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalCertificateAuthInfo{} @@ -32,9 +41,10 @@ func (s ServicePrincipalCertificateAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCertificateAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalsecretauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalsecretauthinfo.go index 271e90a9b96..24f29769dc2 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalsecretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_serviceprincipalsecretauthinfo.go @@ -19,7 +19,16 @@ type ServicePrincipalSecretAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalSecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalSecretAuthInfo{} @@ -33,9 +42,10 @@ func (s ServicePrincipalSecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalSecretAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_systemassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_systemassignedidentityauthinfo.go index 97375748ae5..bee051934d2 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_systemassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_systemassignedidentityauthinfo.go @@ -16,7 +16,16 @@ type SystemAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SystemAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SystemAssignedIdentityAuthInfo{} @@ -30,9 +39,10 @@ func (s SystemAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SystemAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "systemAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_targetservicebase.go b/resource-manager/servicelinker/2024-04-01/connector/model_targetservicebase.go index 782c57ade76..ded29bc0b1b 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_targetservicebase.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_targetservicebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetServiceBase interface { + TargetServiceBase() BaseTargetServiceBaseImpl } -// RawTargetServiceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetServiceBase = BaseTargetServiceBaseImpl{} + +type BaseTargetServiceBaseImpl struct { + Type TargetServiceType `json:"type"` +} + +func (s BaseTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s +} + +var _ TargetServiceBase = RawTargetServiceBaseImpl{} + +// RawTargetServiceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetServiceBaseImpl struct { - Type string - Values map[string]interface{} + targetServiceBase BaseTargetServiceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s.targetServiceBase } -func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { +func UnmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, return out, nil } - out := RawTargetServiceBaseImpl{ - Type: value, - Values: temp, + var parent BaseTargetServiceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetServiceBaseImpl: %+v", err) } - return out, nil + + return RawTargetServiceBaseImpl{ + targetServiceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_useraccountauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_useraccountauthinfo.go index 1c9fba0c5d6..c6e911175b8 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_useraccountauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_useraccountauthinfo.go @@ -17,7 +17,16 @@ type UserAccountAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAccountAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAccountAuthInfo{} @@ -31,9 +40,10 @@ func (s UserAccountAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAccountAuthInfo: %+v", err) } + decoded["authType"] = "userAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_userassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_userassignedidentityauthinfo.go index 81322535b81..2719a089705 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_userassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_userassignedidentityauthinfo.go @@ -18,7 +18,16 @@ type UserAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAssignedIdentityAuthInfo{} @@ -32,9 +41,10 @@ func (s UserAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "userAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/model_valuesecretinfo.go b/resource-manager/servicelinker/2024-04-01/connector/model_valuesecretinfo.go index 6876796009a..c6a82c5985e 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/model_valuesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/connector/model_valuesecretinfo.go @@ -14,6 +14,14 @@ type ValueSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s ValueSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = ValueSecretInfo{} @@ -27,9 +35,10 @@ func (s ValueSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValueSecretInfo: %+v", err) } + decoded["secretType"] = "rawValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/connector/version.go b/resource-manager/servicelinker/2024-04-01/connector/version.go index eafdf2a6cd8..4dcb859e6e6 100644 --- a/resource-manager/servicelinker/2024-04-01/connector/version.go +++ b/resource-manager/servicelinker/2024-04-01/connector/version.go @@ -1,12 +1,10 @@ package connector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connector/2024-04-01" } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/README.md b/resource-manager/servicelinker/2024-04-01/linkers/README.md index 8fcf8a3cb53..3b89edb4602 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/README.md +++ b/resource-manager/servicelinker/2024-04-01/linkers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2024-04-01/linkers` Documentation -The `linkers` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2024-04-01`). +The `linkers` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2024-04-01/linkers/client.go b/resource-manager/servicelinker/2024-04-01/linkers/client.go index 7b26d020191..ed31f69ebfa 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/client.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/client.go @@ -15,7 +15,7 @@ type LinkersClient struct { } func NewLinkersClientWithBaseURI(sdkApi sdkEnv.Api) (*LinkersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "linkers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "linkers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LinkersClient: %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/id_scopeddryrun.go b/resource-manager/servicelinker/2024-04-01/linkers/id_scopeddryrun.go index 3e2639adbbb..239d856ac85 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/id_scopeddryrun.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/id_scopeddryrun.go @@ -40,7 +40,7 @@ func ParseScopedDryrunID(input string) (*ScopedDryrunId, error) { } id := ScopedDryrunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedDryrunIDInsensitively(input string) (*ScopedDryrunId, error) { } id := ScopedDryrunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/id_scopedlinker.go b/resource-manager/servicelinker/2024-04-01/linkers/id_scopedlinker.go index 70a4ac274f6..18f5bc9848f 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/id_scopedlinker.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/id_scopedlinker.go @@ -40,7 +40,7 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/method_generateconfigurations.go b/resource-manager/servicelinker/2024-04-01/linkers/method_generateconfigurations.go index d100662f7da..fd4668ace26 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/method_generateconfigurations.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/method_generateconfigurations.go @@ -50,7 +50,6 @@ func (c LinkersClient) GenerateConfigurations(ctx context.Context, id ScopedLink var model ConfigurationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/method_getdryrun.go b/resource-manager/servicelinker/2024-04-01/linkers/method_getdryrun.go index d4eed7dc6af..e6b52a5c28e 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/method_getdryrun.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/method_getdryrun.go @@ -45,7 +45,6 @@ func (c LinkersClient) GetDryrun(ctx context.Context, id ScopedDryrunId) (result var model DryrunResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/method_linkerlistconfigurations.go b/resource-manager/servicelinker/2024-04-01/linkers/method_linkerlistconfigurations.go index 3c124850ae0..a116ac02667 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/method_linkerlistconfigurations.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/method_linkerlistconfigurations.go @@ -46,7 +46,6 @@ func (c LinkersClient) LinkerListConfigurations(ctx context.Context, id ScopedLi var model ConfigurationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_accesskeyinfobase.go b/resource-manager/servicelinker/2024-04-01/linkers/model_accesskeyinfobase.go index 1f9a63579a9..afb13474e0a 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_accesskeyinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_accesskeyinfobase.go @@ -14,7 +14,16 @@ type AccessKeyInfoBase struct { Permissions *[]AccessKeyPermissions `json:"permissions,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s AccessKeyInfoBase) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = AccessKeyInfoBase{} @@ -28,9 +37,10 @@ func (s AccessKeyInfoBase) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccessKeyInfoBase: %+v", err) } + decoded["authType"] = "accessKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_authinfobase.go b/resource-manager/servicelinker/2024-04-01/linkers/model_authinfobase.go index 40d4436d738..5e9a17bc625 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_authinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_authinfobase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthInfoBase interface { + AuthInfoBase() BaseAuthInfoBaseImpl } -// RawAuthInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthInfoBase = BaseAuthInfoBaseImpl{} + +type BaseAuthInfoBaseImpl struct { + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s BaseAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s +} + +var _ AuthInfoBase = RawAuthInfoBaseImpl{} + +// RawAuthInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthInfoBaseImpl struct { - Type string - Values map[string]interface{} + authInfoBase BaseAuthInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s.authInfoBase } -func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { +func UnmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { if input == nil { return nil, nil } @@ -100,10 +118,15 @@ func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { return out, nil } - out := RawAuthInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthInfoBaseImpl: %+v", err) } - return out, nil + + return RawAuthInfoBaseImpl{ + authInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_azurekeyvaultproperties.go b/resource-manager/servicelinker/2024-04-01/linkers/model_azurekeyvaultproperties.go index b2d84a1a7fe..f40712eee68 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_azurekeyvaultproperties.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_azurekeyvaultproperties.go @@ -14,6 +14,14 @@ type AzureKeyVaultProperties struct { ConnectAsKubernetesCsiDriver *bool `json:"connectAsKubernetesCsiDriver,omitempty"` // Fields inherited from AzureResourcePropertiesBase + + Type AzureResourceType `json:"type"` +} + +func (s AzureKeyVaultProperties) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return BaseAzureResourcePropertiesBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultProperties{} @@ -27,9 +35,10 @@ func (s AzureKeyVaultProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultProperties: %+v", err) } + decoded["type"] = "KeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_azureresource.go b/resource-manager/servicelinker/2024-04-01/linkers/model_azureresource.go index 9f472784a0d..06d218f69a3 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_azureresource.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_azureresource.go @@ -15,6 +15,14 @@ type AzureResource struct { ResourceProperties AzureResourcePropertiesBase `json:"resourceProperties"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s AzureResource) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResource{} @@ -28,9 +36,10 @@ func (s AzureResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResource: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } s.Id = decoded.Id + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalAzureResourcePropertiesBaseImplementation(v) + impl, err := UnmarshalAzureResourcePropertiesBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'AzureResource': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_azureresourcepropertiesbase.go b/resource-manager/servicelinker/2024-04-01/linkers/model_azureresourcepropertiesbase.go index 8b8a5de3ecf..4e3eb736abd 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_azureresourcepropertiesbase.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_azureresourcepropertiesbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureResourcePropertiesBase interface { + AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl } -// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureResourcePropertiesBase = BaseAzureResourcePropertiesBaseImpl{} + +type BaseAzureResourcePropertiesBaseImpl struct { + Type AzureResourceType `json:"type"` +} + +func (s BaseAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s +} + +var _ AzureResourcePropertiesBase = RawAzureResourcePropertiesBaseImpl{} + +// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureResourcePropertiesBaseImpl struct { - Type string - Values map[string]interface{} + azureResourcePropertiesBase BaseAzureResourcePropertiesBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s.azureResourcePropertiesBase } -func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { +func UnmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureReso return out, nil } - out := RawAzureResourcePropertiesBaseImpl{ - Type: value, - Values: temp, + var parent BaseAzureResourcePropertiesBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureResourcePropertiesBaseImpl: %+v", err) } - return out, nil + + return RawAzureResourcePropertiesBaseImpl{ + azureResourcePropertiesBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_basicerrordryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/linkers/model_basicerrordryrunprerequisiteresult.go index c8ea47354f6..4cb026a7ab2 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_basicerrordryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_basicerrordryrunprerequisiteresult.go @@ -15,6 +15,14 @@ type BasicErrorDryrunPrerequisiteResult struct { Message *string `json:"message,omitempty"` // Fields inherited from DryrunPrerequisiteResult + + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s BasicErrorDryrunPrerequisiteResult) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return BaseDryrunPrerequisiteResultImpl{ + Type: s.Type, + } } var _ json.Marshaler = BasicErrorDryrunPrerequisiteResult{} @@ -28,9 +36,10 @@ func (s BasicErrorDryrunPrerequisiteResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BasicErrorDryrunPrerequisiteResult: %+v", err) } + decoded["type"] = "basicError" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_confluentbootstrapserver.go b/resource-manager/servicelinker/2024-04-01/linkers/model_confluentbootstrapserver.go index b4c01175747..1962fccf906 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_confluentbootstrapserver.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_confluentbootstrapserver.go @@ -14,6 +14,14 @@ type ConfluentBootstrapServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentBootstrapServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentBootstrapServer{} @@ -27,9 +35,10 @@ func (s ConfluentBootstrapServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentBootstrapServer: %+v", err) } + decoded["type"] = "ConfluentBootstrapServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_confluentschemaregistry.go b/resource-manager/servicelinker/2024-04-01/linkers/model_confluentschemaregistry.go index 9da899bd3f2..322ab85fb3e 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_confluentschemaregistry.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_confluentschemaregistry.go @@ -14,6 +14,14 @@ type ConfluentSchemaRegistry struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentSchemaRegistry) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentSchemaRegistry{} @@ -27,9 +35,10 @@ func (s ConfluentSchemaRegistry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentSchemaRegistry: %+v", err) } + decoded["type"] = "ConfluentSchemaRegistry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_createorupdatedryrunparameters.go b/resource-manager/servicelinker/2024-04-01/linkers/model_createorupdatedryrunparameters.go index e8e805a9dde..256520a166d 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_createorupdatedryrunparameters.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_createorupdatedryrunparameters.go @@ -22,6 +22,14 @@ type CreateOrUpdateDryrunParameters struct { VNetSolution *VNetSolution `json:"vNetSolution,omitempty"` // Fields inherited from DryrunParameters + + ActionName DryrunActionName `json:"actionName"` +} + +func (s CreateOrUpdateDryrunParameters) DryrunParameters() BaseDryrunParametersImpl { + return BaseDryrunParametersImpl{ + ActionName: s.ActionName, + } } var _ json.Marshaler = CreateOrUpdateDryrunParameters{} @@ -35,9 +43,10 @@ func (s CreateOrUpdateDryrunParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CreateOrUpdateDryrunParameters: %+v", err) } + decoded["actionName"] = "createOrUpdate" encoded, err = json.Marshal(decoded) @@ -57,6 +66,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { return fmt.Errorf("unmarshaling into CreateOrUpdateDryrunParameters: %+v", err) } + s.ActionName = decoded.ActionName s.ClientType = decoded.ClientType s.ConfigurationInfo = decoded.ConfigurationInfo s.ProvisioningState = decoded.ProvisioningState @@ -71,7 +81,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'CreateOrUpdateDryrunParameters': %+v", err) } @@ -79,7 +89,7 @@ func (s *CreateOrUpdateDryrunParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'CreateOrUpdateDryrunParameters': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunparameters.go b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunparameters.go index 12a482dd366..cb32978366c 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunparameters.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DryrunParameters interface { + DryrunParameters() BaseDryrunParametersImpl } -// RawDryrunParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DryrunParameters = BaseDryrunParametersImpl{} + +type BaseDryrunParametersImpl struct { + ActionName DryrunActionName `json:"actionName"` +} + +func (s BaseDryrunParametersImpl) DryrunParameters() BaseDryrunParametersImpl { + return s +} + +var _ DryrunParameters = RawDryrunParametersImpl{} + +// RawDryrunParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDryrunParametersImpl struct { - Type string - Values map[string]interface{} + dryrunParameters BaseDryrunParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawDryrunParametersImpl) DryrunParameters() BaseDryrunParametersImpl { + return s.dryrunParameters } -func unmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, error) { +func UnmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalDryrunParametersImplementation(input []byte) (DryrunParameters, er return out, nil } - out := RawDryrunParametersImpl{ - Type: value, - Values: temp, + var parent BaseDryrunParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDryrunParametersImpl: %+v", err) } - return out, nil + + return RawDryrunParametersImpl{ + dryrunParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunprerequisiteresult.go index 9f9ed6af4cb..55eec73d3c0 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunprerequisiteresult.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DryrunPrerequisiteResult interface { + DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl } -// RawDryrunPrerequisiteResultImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ DryrunPrerequisiteResult = BaseDryrunPrerequisiteResultImpl{} + +type BaseDryrunPrerequisiteResultImpl struct { + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s BaseDryrunPrerequisiteResultImpl) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return s +} + +var _ DryrunPrerequisiteResult = RawDryrunPrerequisiteResultImpl{} + +// RawDryrunPrerequisiteResultImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawDryrunPrerequisiteResultImpl struct { - Type string - Values map[string]interface{} + dryrunPrerequisiteResult BaseDryrunPrerequisiteResultImpl + Type string + Values map[string]interface{} +} + +func (s RawDryrunPrerequisiteResultImpl) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return s.dryrunPrerequisiteResult } -func unmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrerequisiteResult, error) { +func UnmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrerequisiteResult, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalDryrunPrerequisiteResultImplementation(input []byte) (DryrunPrereq return out, nil } - out := RawDryrunPrerequisiteResultImpl{ - Type: value, - Values: temp, + var parent BaseDryrunPrerequisiteResultImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseDryrunPrerequisiteResultImpl: %+v", err) } - return out, nil + + return RawDryrunPrerequisiteResultImpl{ + dryrunPrerequisiteResult: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunproperties.go b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunproperties.go index 47084ec7e58..88570fdc033 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunproperties.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_dryrunproperties.go @@ -33,7 +33,7 @@ func (s *DryrunProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["parameters"]; ok { - impl, err := unmarshalDryrunParametersImplementation(v) + impl, err := UnmarshalDryrunParametersImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Parameters' for 'DryrunProperties': %+v", err) } @@ -48,7 +48,7 @@ func (s *DryrunProperties) UnmarshalJSON(bytes []byte) error { output := make([]DryrunPrerequisiteResult, 0) for i, val := range listTemp { - impl, err := unmarshalDryrunPrerequisiteResultImplementation(val) + impl, err := UnmarshalDryrunPrerequisiteResultImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'PrerequisiteResults' for 'DryrunProperties': %+v", i, err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_easyauthmicrosoftentraidauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_easyauthmicrosoftentraidauthinfo.go index 77c6b20c620..7e53accfc23 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_easyauthmicrosoftentraidauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_easyauthmicrosoftentraidauthinfo.go @@ -16,7 +16,16 @@ type EasyAuthMicrosoftEntraIDAuthInfo struct { Secret *string `json:"secret,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s EasyAuthMicrosoftEntraIDAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = EasyAuthMicrosoftEntraIDAuthInfo{} @@ -30,9 +39,10 @@ func (s EasyAuthMicrosoftEntraIDAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EasyAuthMicrosoftEntraIDAuthInfo: %+v", err) } + decoded["authType"] = "easyAuthMicrosoftEntraID" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecretreferencesecretinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecretreferencesecretinfo.go index c2e45eab366..ddd82dd1503 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecretreferencesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecretreferencesecretinfo.go @@ -15,6 +15,14 @@ type KeyVaultSecretReferenceSecretInfo struct { Version *string `json:"version,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretReferenceSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretReferenceSecretInfo{} @@ -28,9 +36,10 @@ func (s KeyVaultSecretReferenceSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretReferenceSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecreturisecretinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecreturisecretinfo.go index d6a3c634078..83815e46e35 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecreturisecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_keyvaultsecreturisecretinfo.go @@ -14,6 +14,14 @@ type KeyVaultSecretUriSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretUriSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretUriSecretInfo{} @@ -27,9 +35,10 @@ func (s KeyVaultSecretUriSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretUriSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretUri" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_linkerproperties.go b/resource-manager/servicelinker/2024-04-01/linkers/model_linkerproperties.go index 5c9eacdc59c..1bfbcbaa7f2 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_linkerproperties.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_linkerproperties.go @@ -43,7 +43,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'LinkerProperties': %+v", err) } @@ -51,7 +51,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'LinkerProperties': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_permissionsmissingdryrunprerequisiteresult.go b/resource-manager/servicelinker/2024-04-01/linkers/model_permissionsmissingdryrunprerequisiteresult.go index c759b00e46e..701b5b0f7f5 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_permissionsmissingdryrunprerequisiteresult.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_permissionsmissingdryrunprerequisiteresult.go @@ -16,6 +16,14 @@ type PermissionsMissingDryrunPrerequisiteResult struct { Scope *string `json:"scope,omitempty"` // Fields inherited from DryrunPrerequisiteResult + + Type DryrunPrerequisiteResultType `json:"type"` +} + +func (s PermissionsMissingDryrunPrerequisiteResult) DryrunPrerequisiteResult() BaseDryrunPrerequisiteResultImpl { + return BaseDryrunPrerequisiteResultImpl{ + Type: s.Type, + } } var _ json.Marshaler = PermissionsMissingDryrunPrerequisiteResult{} @@ -29,9 +37,10 @@ func (s PermissionsMissingDryrunPrerequisiteResult) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PermissionsMissingDryrunPrerequisiteResult: %+v", err) } + decoded["type"] = "permissionsMissing" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_secretauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_secretauthinfo.go index b9dd5c479b2..aaa6405931c 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_secretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_secretauthinfo.go @@ -15,7 +15,16 @@ type SecretAuthInfo struct { SecretInfo SecretInfoBase `json:"secretInfo"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SecretAuthInfo{} @@ -29,9 +38,10 @@ func (s SecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretAuthInfo: %+v", err) } + decoded["authType"] = "secret" encoded, err = json.Marshal(decoded) @@ -52,6 +62,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } s.AuthMode = decoded.AuthMode + s.AuthType = decoded.AuthType s.Name = decoded.Name var temp map[string]json.RawMessage @@ -60,7 +71,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["secretInfo"]; ok { - impl, err := unmarshalSecretInfoBaseImplementation(v) + impl, err := UnmarshalSecretInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretInfo' for 'SecretAuthInfo': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_secretinfobase.go b/resource-manager/servicelinker/2024-04-01/linkers/model_secretinfobase.go index 8f12e6ac352..5841c0dc28d 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_secretinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_secretinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretInfoBase interface { + SecretInfoBase() BaseSecretInfoBaseImpl } -// RawSecretInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretInfoBase = BaseSecretInfoBaseImpl{} + +type BaseSecretInfoBaseImpl struct { + SecretType SecretType `json:"secretType"` +} + +func (s BaseSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s +} + +var _ SecretInfoBase = RawSecretInfoBaseImpl{} + +// RawSecretInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretInfoBaseImpl struct { - Type string - Values map[string]interface{} + secretInfoBase BaseSecretInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s.secretInfoBase } -func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { +func UnmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) return out, nil } - out := RawSecretInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretInfoBaseImpl: %+v", err) } - return out, nil + + return RawSecretInfoBaseImpl{ + secretInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_selfhostedserver.go b/resource-manager/servicelinker/2024-04-01/linkers/model_selfhostedserver.go index 6b777420ab4..1fbb2f8b5ba 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_selfhostedserver.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_selfhostedserver.go @@ -14,6 +14,14 @@ type SelfHostedServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s SelfHostedServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SelfHostedServer{} @@ -27,9 +35,10 @@ func (s SelfHostedServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedServer: %+v", err) } + decoded["type"] = "SelfHostedServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalcertificateauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalcertificateauthinfo.go index e9ff21ec1f2..84a871d1f92 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalcertificateauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalcertificateauthinfo.go @@ -18,7 +18,16 @@ type ServicePrincipalCertificateAuthInfo struct { Roles *[]string `json:"roles,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalCertificateAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalCertificateAuthInfo{} @@ -32,9 +41,10 @@ func (s ServicePrincipalCertificateAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCertificateAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalsecretauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalsecretauthinfo.go index d753a843dfc..6145e5f4fc3 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalsecretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_serviceprincipalsecretauthinfo.go @@ -19,7 +19,16 @@ type ServicePrincipalSecretAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalSecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalSecretAuthInfo{} @@ -33,9 +42,10 @@ func (s ServicePrincipalSecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalSecretAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_systemassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_systemassignedidentityauthinfo.go index 22745b58c64..4c897dd4f8d 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_systemassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_systemassignedidentityauthinfo.go @@ -16,7 +16,16 @@ type SystemAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SystemAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SystemAssignedIdentityAuthInfo{} @@ -30,9 +39,10 @@ func (s SystemAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SystemAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "systemAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_targetservicebase.go b/resource-manager/servicelinker/2024-04-01/linkers/model_targetservicebase.go index edbe91dfa5b..bf56c2b9c5a 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_targetservicebase.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_targetservicebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetServiceBase interface { + TargetServiceBase() BaseTargetServiceBaseImpl } -// RawTargetServiceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetServiceBase = BaseTargetServiceBaseImpl{} + +type BaseTargetServiceBaseImpl struct { + Type TargetServiceType `json:"type"` +} + +func (s BaseTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s +} + +var _ TargetServiceBase = RawTargetServiceBaseImpl{} + +// RawTargetServiceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetServiceBaseImpl struct { - Type string - Values map[string]interface{} + targetServiceBase BaseTargetServiceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s.targetServiceBase } -func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { +func UnmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, return out, nil } - out := RawTargetServiceBaseImpl{ - Type: value, - Values: temp, + var parent BaseTargetServiceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetServiceBaseImpl: %+v", err) } - return out, nil + + return RawTargetServiceBaseImpl{ + targetServiceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_useraccountauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_useraccountauthinfo.go index 45d3557252f..e0a3371cb72 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_useraccountauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_useraccountauthinfo.go @@ -17,7 +17,16 @@ type UserAccountAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAccountAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAccountAuthInfo{} @@ -31,9 +40,10 @@ func (s UserAccountAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAccountAuthInfo: %+v", err) } + decoded["authType"] = "userAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_userassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_userassignedidentityauthinfo.go index e734a835269..893b0ce9135 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_userassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_userassignedidentityauthinfo.go @@ -18,7 +18,16 @@ type UserAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAssignedIdentityAuthInfo{} @@ -32,9 +41,10 @@ func (s UserAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "userAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/model_valuesecretinfo.go b/resource-manager/servicelinker/2024-04-01/linkers/model_valuesecretinfo.go index 2047f80b645..446928851d0 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/model_valuesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/model_valuesecretinfo.go @@ -14,6 +14,14 @@ type ValueSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s ValueSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = ValueSecretInfo{} @@ -27,9 +35,10 @@ func (s ValueSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValueSecretInfo: %+v", err) } + decoded["secretType"] = "rawValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/linkers/version.go b/resource-manager/servicelinker/2024-04-01/linkers/version.go index b42063c835b..4bf48a1f940 100644 --- a/resource-manager/servicelinker/2024-04-01/linkers/version.go +++ b/resource-manager/servicelinker/2024-04-01/linkers/version.go @@ -1,12 +1,10 @@ package linkers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/linkers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/linkers/2024-04-01" } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/README.md b/resource-manager/servicelinker/2024-04-01/servicelinker/README.md index fa140a90ca6..90bb7172fb8 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/README.md +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicelinker/2024-04-01/servicelinker` Documentation -The `servicelinker` SDK allows for interaction with the Azure Resource Manager Service `servicelinker` (API Version `2024-04-01`). +The `servicelinker` SDK allows for interaction with Azure Resource Manager `servicelinker` (API Version `2024-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/client.go b/resource-manager/servicelinker/2024-04-01/servicelinker/client.go index b55ab79fe84..bce1af86af4 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/client.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/client.go @@ -15,7 +15,7 @@ type ServiceLinkerClient struct { } func NewServiceLinkerClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceLinkerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicelinker", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servicelinker", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServiceLinkerClient: %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/id_connector.go b/resource-manager/servicelinker/2024-04-01/servicelinker/id_connector.go index cf482b00b85..5a1803016fc 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/id_connector.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/id_connector.go @@ -44,7 +44,7 @@ func ParseConnectorID(input string) (*ConnectorId, error) { } id := ConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectorIDInsensitively(input string) (*ConnectorId, error) { } id := ConnectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/id_location.go b/resource-manager/servicelinker/2024-04-01/servicelinker/id_location.go index 93f09da17cd..89b5d479aac 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/id_location.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/id_location.go @@ -42,7 +42,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/id_scopedlinker.go b/resource-manager/servicelinker/2024-04-01/servicelinker/id_scopedlinker.go index 5673d740501..3f620a73ed1 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/id_scopedlinker.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/id_scopedlinker.go @@ -40,7 +40,7 @@ func ParseScopedLinkerID(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseScopedLinkerIDInsensitively(input string) (*ScopedLinkerId, error) { } id := ScopedLinkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/method_connectorget.go b/resource-manager/servicelinker/2024-04-01/servicelinker/method_connectorget.go index a38d945229a..563973d103c 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/method_connectorget.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/method_connectorget.go @@ -45,7 +45,6 @@ func (c ServiceLinkerClient) ConnectorGet(ctx context.Context, id ConnectorId) ( var model LinkerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/method_linkerget.go b/resource-manager/servicelinker/2024-04-01/servicelinker/method_linkerget.go index baa9bec3496..61f8cc1a830 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/method_linkerget.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/method_linkerget.go @@ -45,7 +45,6 @@ func (c ServiceLinkerClient) LinkerGet(ctx context.Context, id ScopedLinkerId) ( var model LinkerResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_accesskeyinfobase.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_accesskeyinfobase.go index 91d2ed71ebc..2eb0e204a2b 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_accesskeyinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_accesskeyinfobase.go @@ -14,7 +14,16 @@ type AccessKeyInfoBase struct { Permissions *[]AccessKeyPermissions `json:"permissions,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s AccessKeyInfoBase) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = AccessKeyInfoBase{} @@ -28,9 +37,10 @@ func (s AccessKeyInfoBase) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AccessKeyInfoBase: %+v", err) } + decoded["authType"] = "accessKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_authinfobase.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_authinfobase.go index 7dd53251e68..dbe73184da4 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_authinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_authinfobase.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthInfoBase interface { + AuthInfoBase() BaseAuthInfoBaseImpl } -// RawAuthInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthInfoBase = BaseAuthInfoBaseImpl{} + +type BaseAuthInfoBaseImpl struct { + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s BaseAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s +} + +var _ AuthInfoBase = RawAuthInfoBaseImpl{} + +// RawAuthInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthInfoBaseImpl struct { - Type string - Values map[string]interface{} + authInfoBase BaseAuthInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthInfoBaseImpl) AuthInfoBase() BaseAuthInfoBaseImpl { + return s.authInfoBase } -func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { +func UnmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { if input == nil { return nil, nil } @@ -100,10 +118,15 @@ func unmarshalAuthInfoBaseImplementation(input []byte) (AuthInfoBase, error) { return out, nil } - out := RawAuthInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthInfoBaseImpl: %+v", err) } - return out, nil + + return RawAuthInfoBaseImpl{ + authInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azurekeyvaultproperties.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azurekeyvaultproperties.go index 68ba606d216..6330e655cd2 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azurekeyvaultproperties.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azurekeyvaultproperties.go @@ -14,6 +14,14 @@ type AzureKeyVaultProperties struct { ConnectAsKubernetesCsiDriver *bool `json:"connectAsKubernetesCsiDriver,omitempty"` // Fields inherited from AzureResourcePropertiesBase + + Type AzureResourceType `json:"type"` +} + +func (s AzureKeyVaultProperties) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return BaseAzureResourcePropertiesBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultProperties{} @@ -27,9 +35,10 @@ func (s AzureKeyVaultProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultProperties: %+v", err) } + decoded["type"] = "KeyVault" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresource.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresource.go index ce0dcb00a30..c2bf02b18c6 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresource.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresource.go @@ -15,6 +15,14 @@ type AzureResource struct { ResourceProperties AzureResourcePropertiesBase `json:"resourceProperties"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s AzureResource) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureResource{} @@ -28,9 +36,10 @@ func (s AzureResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureResource: %+v", err) } + decoded["type"] = "AzureResource" encoded, err = json.Marshal(decoded) @@ -51,6 +60,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } s.Id = decoded.Id + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -58,7 +68,7 @@ func (s *AzureResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["resourceProperties"]; ok { - impl, err := unmarshalAzureResourcePropertiesBaseImplementation(v) + impl, err := UnmarshalAzureResourcePropertiesBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ResourceProperties' for 'AzureResource': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresourcepropertiesbase.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresourcepropertiesbase.go index 8770e9d89a1..4e721cb2b29 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresourcepropertiesbase.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_azureresourcepropertiesbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AzureResourcePropertiesBase interface { + AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl } -// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AzureResourcePropertiesBase = BaseAzureResourcePropertiesBaseImpl{} + +type BaseAzureResourcePropertiesBaseImpl struct { + Type AzureResourceType `json:"type"` +} + +func (s BaseAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s +} + +var _ AzureResourcePropertiesBase = RawAzureResourcePropertiesBaseImpl{} + +// RawAzureResourcePropertiesBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAzureResourcePropertiesBaseImpl struct { - Type string - Values map[string]interface{} + azureResourcePropertiesBase BaseAzureResourcePropertiesBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAzureResourcePropertiesBaseImpl) AzureResourcePropertiesBase() BaseAzureResourcePropertiesBaseImpl { + return s.azureResourcePropertiesBase } -func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { +func UnmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureResourcePropertiesBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAzureResourcePropertiesBaseImplementation(input []byte) (AzureReso return out, nil } - out := RawAzureResourcePropertiesBaseImpl{ - Type: value, - Values: temp, + var parent BaseAzureResourcePropertiesBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAzureResourcePropertiesBaseImpl: %+v", err) } - return out, nil + + return RawAzureResourcePropertiesBaseImpl{ + azureResourcePropertiesBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentbootstrapserver.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentbootstrapserver.go index f35c8799a1f..44e86fdb4e3 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentbootstrapserver.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentbootstrapserver.go @@ -14,6 +14,14 @@ type ConfluentBootstrapServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentBootstrapServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentBootstrapServer{} @@ -27,9 +35,10 @@ func (s ConfluentBootstrapServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentBootstrapServer: %+v", err) } + decoded["type"] = "ConfluentBootstrapServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentschemaregistry.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentschemaregistry.go index 5d5bfe99668..5344db21f62 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentschemaregistry.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_confluentschemaregistry.go @@ -14,6 +14,14 @@ type ConfluentSchemaRegistry struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s ConfluentSchemaRegistry) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = ConfluentSchemaRegistry{} @@ -27,9 +35,10 @@ func (s ConfluentSchemaRegistry) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ConfluentSchemaRegistry: %+v", err) } + decoded["type"] = "ConfluentSchemaRegistry" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_easyauthmicrosoftentraidauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_easyauthmicrosoftentraidauthinfo.go index dd37c2831c4..7ce75fff72d 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_easyauthmicrosoftentraidauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_easyauthmicrosoftentraidauthinfo.go @@ -16,7 +16,16 @@ type EasyAuthMicrosoftEntraIDAuthInfo struct { Secret *string `json:"secret,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s EasyAuthMicrosoftEntraIDAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = EasyAuthMicrosoftEntraIDAuthInfo{} @@ -30,9 +39,10 @@ func (s EasyAuthMicrosoftEntraIDAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EasyAuthMicrosoftEntraIDAuthInfo: %+v", err) } + decoded["authType"] = "easyAuthMicrosoftEntraID" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go index ba11cd6c536..fbe7039ab55 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecretreferencesecretinfo.go @@ -15,6 +15,14 @@ type KeyVaultSecretReferenceSecretInfo struct { Version *string `json:"version,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretReferenceSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretReferenceSecretInfo{} @@ -28,9 +36,10 @@ func (s KeyVaultSecretReferenceSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretReferenceSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretReference" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecreturisecretinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecreturisecretinfo.go index 31c102db91c..73f67f23d0d 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecreturisecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_keyvaultsecreturisecretinfo.go @@ -14,6 +14,14 @@ type KeyVaultSecretUriSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s KeyVaultSecretUriSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = KeyVaultSecretUriSecretInfo{} @@ -27,9 +35,10 @@ func (s KeyVaultSecretUriSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling KeyVaultSecretUriSecretInfo: %+v", err) } + decoded["secretType"] = "keyVaultSecretUri" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_linkerproperties.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_linkerproperties.go index add34de01cd..646703333d5 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_linkerproperties.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_linkerproperties.go @@ -43,7 +43,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authInfo"]; ok { - impl, err := unmarshalAuthInfoBaseImplementation(v) + impl, err := UnmarshalAuthInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'AuthInfo' for 'LinkerProperties': %+v", err) } @@ -51,7 +51,7 @@ func (s *LinkerProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["targetService"]; ok { - impl, err := unmarshalTargetServiceBaseImplementation(v) + impl, err := UnmarshalTargetServiceBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TargetService' for 'LinkerProperties': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretauthinfo.go index 9e56a8f74eb..a1bfbf11bf6 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretauthinfo.go @@ -15,7 +15,16 @@ type SecretAuthInfo struct { SecretInfo SecretInfoBase `json:"secretInfo"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SecretAuthInfo{} @@ -29,9 +38,10 @@ func (s SecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecretAuthInfo: %+v", err) } + decoded["authType"] = "secret" encoded, err = json.Marshal(decoded) @@ -52,6 +62,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } s.AuthMode = decoded.AuthMode + s.AuthType = decoded.AuthType s.Name = decoded.Name var temp map[string]json.RawMessage @@ -60,7 +71,7 @@ func (s *SecretAuthInfo) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["secretInfo"]; ok { - impl, err := unmarshalSecretInfoBaseImplementation(v) + impl, err := UnmarshalSecretInfoBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SecretInfo' for 'SecretAuthInfo': %+v", err) } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretinfobase.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretinfobase.go index 2f256c61e4a..5b3d7b1aa7d 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretinfobase.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_secretinfobase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretInfoBase interface { + SecretInfoBase() BaseSecretInfoBaseImpl } -// RawSecretInfoBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretInfoBase = BaseSecretInfoBaseImpl{} + +type BaseSecretInfoBaseImpl struct { + SecretType SecretType `json:"secretType"` +} + +func (s BaseSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s +} + +var _ SecretInfoBase = RawSecretInfoBaseImpl{} + +// RawSecretInfoBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretInfoBaseImpl struct { - Type string - Values map[string]interface{} + secretInfoBase BaseSecretInfoBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretInfoBaseImpl) SecretInfoBase() BaseSecretInfoBaseImpl { + return s.secretInfoBase } -func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { +func UnmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSecretInfoBaseImplementation(input []byte) (SecretInfoBase, error) return out, nil } - out := RawSecretInfoBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretInfoBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretInfoBaseImpl: %+v", err) } - return out, nil + + return RawSecretInfoBaseImpl{ + secretInfoBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_selfhostedserver.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_selfhostedserver.go index d4e9856e1b1..2c37e868571 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_selfhostedserver.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_selfhostedserver.go @@ -14,6 +14,14 @@ type SelfHostedServer struct { Endpoint *string `json:"endpoint,omitempty"` // Fields inherited from TargetServiceBase + + Type TargetServiceType `json:"type"` +} + +func (s SelfHostedServer) TargetServiceBase() BaseTargetServiceBaseImpl { + return BaseTargetServiceBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SelfHostedServer{} @@ -27,9 +35,10 @@ func (s SelfHostedServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedServer: %+v", err) } + decoded["type"] = "SelfHostedServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalcertificateauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalcertificateauthinfo.go index 3301f2965c2..98ff83b797e 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalcertificateauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalcertificateauthinfo.go @@ -18,7 +18,16 @@ type ServicePrincipalCertificateAuthInfo struct { Roles *[]string `json:"roles,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalCertificateAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalCertificateAuthInfo{} @@ -32,9 +41,10 @@ func (s ServicePrincipalCertificateAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalCertificateAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalCertificate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalsecretauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalsecretauthinfo.go index e8761f65dd4..6bd6617c6eb 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalsecretauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_serviceprincipalsecretauthinfo.go @@ -19,7 +19,16 @@ type ServicePrincipalSecretAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s ServicePrincipalSecretAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = ServicePrincipalSecretAuthInfo{} @@ -33,9 +42,10 @@ func (s ServicePrincipalSecretAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServicePrincipalSecretAuthInfo: %+v", err) } + decoded["authType"] = "servicePrincipalSecret" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_systemassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_systemassignedidentityauthinfo.go index c50f751bd8e..451a99507a2 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_systemassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_systemassignedidentityauthinfo.go @@ -16,7 +16,16 @@ type SystemAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s SystemAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = SystemAssignedIdentityAuthInfo{} @@ -30,9 +39,10 @@ func (s SystemAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SystemAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "systemAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_targetservicebase.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_targetservicebase.go index 7a5efdef9e5..5ea1e53429a 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_targetservicebase.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_targetservicebase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TargetServiceBase interface { + TargetServiceBase() BaseTargetServiceBaseImpl } -// RawTargetServiceBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TargetServiceBase = BaseTargetServiceBaseImpl{} + +type BaseTargetServiceBaseImpl struct { + Type TargetServiceType `json:"type"` +} + +func (s BaseTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s +} + +var _ TargetServiceBase = RawTargetServiceBaseImpl{} + +// RawTargetServiceBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTargetServiceBaseImpl struct { - Type string - Values map[string]interface{} + targetServiceBase BaseTargetServiceBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawTargetServiceBaseImpl) TargetServiceBase() BaseTargetServiceBaseImpl { + return s.targetServiceBase } -func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { +func UnmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalTargetServiceBaseImplementation(input []byte) (TargetServiceBase, return out, nil } - out := RawTargetServiceBaseImpl{ - Type: value, - Values: temp, + var parent BaseTargetServiceBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTargetServiceBaseImpl: %+v", err) } - return out, nil + + return RawTargetServiceBaseImpl{ + targetServiceBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_useraccountauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_useraccountauthinfo.go index ca69829596e..5afc13a96fd 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_useraccountauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_useraccountauthinfo.go @@ -17,7 +17,16 @@ type UserAccountAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAccountAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAccountAuthInfo{} @@ -31,9 +40,10 @@ func (s UserAccountAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAccountAuthInfo: %+v", err) } + decoded["authType"] = "userAccount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_userassignedidentityauthinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_userassignedidentityauthinfo.go index ac394061c66..f47d06c3b3d 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_userassignedidentityauthinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_userassignedidentityauthinfo.go @@ -18,7 +18,16 @@ type UserAssignedIdentityAuthInfo struct { UserName *string `json:"userName,omitempty"` // Fields inherited from AuthInfoBase + AuthMode *AuthMode `json:"authMode,omitempty"` + AuthType AuthType `json:"authType"` +} + +func (s UserAssignedIdentityAuthInfo) AuthInfoBase() BaseAuthInfoBaseImpl { + return BaseAuthInfoBaseImpl{ + AuthMode: s.AuthMode, + AuthType: s.AuthType, + } } var _ json.Marshaler = UserAssignedIdentityAuthInfo{} @@ -32,9 +41,10 @@ func (s UserAssignedIdentityAuthInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling UserAssignedIdentityAuthInfo: %+v", err) } + decoded["authType"] = "userAssignedIdentity" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/model_valuesecretinfo.go b/resource-manager/servicelinker/2024-04-01/servicelinker/model_valuesecretinfo.go index 3c638a82a47..c6f3d5e30f2 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/model_valuesecretinfo.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/model_valuesecretinfo.go @@ -14,6 +14,14 @@ type ValueSecretInfo struct { Value *string `json:"value,omitempty"` // Fields inherited from SecretInfoBase + + SecretType SecretType `json:"secretType"` +} + +func (s ValueSecretInfo) SecretInfoBase() BaseSecretInfoBaseImpl { + return BaseSecretInfoBaseImpl{ + SecretType: s.SecretType, + } } var _ json.Marshaler = ValueSecretInfo{} @@ -27,9 +35,10 @@ func (s ValueSecretInfo) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ValueSecretInfo: %+v", err) } + decoded["secretType"] = "rawValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/servicelinker/2024-04-01/servicelinker/version.go b/resource-manager/servicelinker/2024-04-01/servicelinker/version.go index 64e6feca9c1..f4b01fe09f3 100644 --- a/resource-manager/servicelinker/2024-04-01/servicelinker/version.go +++ b/resource-manager/servicelinker/2024-04-01/servicelinker/version.go @@ -1,12 +1,10 @@ package servicelinker -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicelinker/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servicelinker/2024-04-01" } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/README.md b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/README.md index 77929bc8ba1..548823a658b 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/README.md +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface` Documentation -The `associationsinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-05-01-preview`). +The `associationsinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/client.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/client.go index 3a72a214473..56041630036 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/client.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/client.go @@ -15,7 +15,7 @@ type AssociationsInterfaceClient struct { } func NewAssociationsInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociationsInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "associationsinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "associationsinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssociationsInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go index 6bc9a61764d..3fd882f7991 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_association.go @@ -44,7 +44,7 @@ func ParseAssociationID(input string) (*AssociationId, error) { } id := AssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAssociationIDInsensitively(input string) (*AssociationId, error) { } id := AssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go index 38f10cc0402..2bbea647474 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_get.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_get.go index 93fa5a358c2..4ba57d2c856 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_get.go @@ -45,7 +45,6 @@ func (c AssociationsInterfaceClient) Get(ctx context.Context, id AssociationId) var model Association result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_update.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_update.go index 6836c655a0a..dab57f9779f 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/method_update.go @@ -49,7 +49,6 @@ func (c AssociationsInterfaceClient) Update(ctx context.Context, id AssociationI var model Association result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/version.go b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/version.go index 5c44c4d24ac..c2877eec096 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/version.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/associationsinterface/version.go @@ -1,12 +1,10 @@ package associationsinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/associationsinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/associationsinterface/2023-05-01-preview" } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/README.md b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/README.md index 6ccd3f6a323..e04afae206a 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/README.md +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface` Documentation -The `frontendsinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-05-01-preview`). +The `frontendsinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/client.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/client.go index ced20e82fea..77cd97766d3 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/client.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/client.go @@ -15,7 +15,7 @@ type FrontendsInterfaceClient struct { } func NewFrontendsInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*FrontendsInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "frontendsinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "frontendsinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FrontendsInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go index 58376b02e14..512df0e5a98 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_frontend.go @@ -44,7 +44,7 @@ func ParseFrontendID(input string) (*FrontendId, error) { } id := FrontendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIDInsensitively(input string) (*FrontendId, error) { } id := FrontendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go index 2d8a198688b..a1406067423 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_get.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_get.go index b3cc78b78d6..983aac9a874 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_get.go @@ -45,7 +45,6 @@ func (c FrontendsInterfaceClient) Get(ctx context.Context, id FrontendId) (resul var model Frontend result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_update.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_update.go index 10e722a3212..a4c8148292c 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/method_update.go @@ -49,7 +49,6 @@ func (c FrontendsInterfaceClient) Update(ctx context.Context, id FrontendId, inp var model Frontend result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/version.go b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/version.go index aa810fa0916..1dcd8531efb 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/version.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/frontendsinterface/version.go @@ -1,12 +1,10 @@ package frontendsinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/frontendsinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/frontendsinterface/2023-05-01-preview" } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/README.md b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/README.md index 1aa475d6c4d..244b7598ade 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/README.md +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface` Documentation -The `trafficcontrollerinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-05-01-preview`). +The `trafficcontrollerinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/client.go b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/client.go index 4396983ea36..2cf5ce13358 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/client.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/client.go @@ -15,7 +15,7 @@ type TrafficControllerInterfaceClient struct { } func NewTrafficControllerInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficControllerInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficcontrollerinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficcontrollerinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficControllerInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go index 18a50663371..3b2e730ed35 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_get.go b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_get.go index 4a01f242f3a..076825ace84 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_get.go @@ -45,7 +45,6 @@ func (c TrafficControllerInterfaceClient) Get(ctx context.Context, id TrafficCon var model TrafficController result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_update.go b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_update.go index d5e058059cd..45a38d199f6 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/method_update.go @@ -49,7 +49,6 @@ func (c TrafficControllerInterfaceClient) Update(ctx context.Context, id Traffic var model TrafficController result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/version.go b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/version.go index 64814557fda..9440897b13d 100644 --- a/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/version.go +++ b/resource-manager/servicenetworking/2023-05-01-preview/trafficcontrollerinterface/version.go @@ -1,12 +1,10 @@ package trafficcontrollerinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficcontrollerinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficcontrollerinterface/2023-05-01-preview" } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/README.md b/resource-manager/servicenetworking/2023-11-01/associationsinterface/README.md index f3a0d073708..9f2b96ec58e 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/README.md +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/associationsinterface` Documentation -The `associationsinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-11-01`). +The `associationsinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/client.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/client.go index 3a72a214473..56041630036 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/client.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/client.go @@ -15,7 +15,7 @@ type AssociationsInterfaceClient struct { } func NewAssociationsInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*AssociationsInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "associationsinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "associationsinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AssociationsInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_association.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_association.go index 6bc9a61764d..3fd882f7991 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_association.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_association.go @@ -44,7 +44,7 @@ func ParseAssociationID(input string) (*AssociationId, error) { } id := AssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAssociationIDInsensitively(input string) (*AssociationId, error) { } id := AssociationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_trafficcontroller.go index 38f10cc0402..2bbea647474 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_get.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_get.go index 93fa5a358c2..4ba57d2c856 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_get.go @@ -45,7 +45,6 @@ func (c AssociationsInterfaceClient) Get(ctx context.Context, id AssociationId) var model Association result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_update.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_update.go index 6836c655a0a..dab57f9779f 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/method_update.go @@ -49,7 +49,6 @@ func (c AssociationsInterfaceClient) Update(ctx context.Context, id AssociationI var model Association result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/associationsinterface/version.go b/resource-manager/servicenetworking/2023-11-01/associationsinterface/version.go index e61866e435f..f907fe63e16 100644 --- a/resource-manager/servicenetworking/2023-11-01/associationsinterface/version.go +++ b/resource-manager/servicenetworking/2023-11-01/associationsinterface/version.go @@ -1,12 +1,10 @@ package associationsinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/associationsinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/associationsinterface/2023-11-01" } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/README.md b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/README.md index ab186331d63..be9bfaaa78c 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/README.md +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/frontendsinterface` Documentation -The `frontendsinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-11-01`). +The `frontendsinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/client.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/client.go index ced20e82fea..77cd97766d3 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/client.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/client.go @@ -15,7 +15,7 @@ type FrontendsInterfaceClient struct { } func NewFrontendsInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*FrontendsInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "frontendsinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "frontendsinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FrontendsInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_frontend.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_frontend.go index 58376b02e14..512df0e5a98 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_frontend.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_frontend.go @@ -44,7 +44,7 @@ func ParseFrontendID(input string) (*FrontendId, error) { } id := FrontendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFrontendIDInsensitively(input string) (*FrontendId, error) { } id := FrontendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_trafficcontroller.go index 2d8a198688b..a1406067423 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_get.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_get.go index b3cc78b78d6..983aac9a874 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_get.go @@ -45,7 +45,6 @@ func (c FrontendsInterfaceClient) Get(ctx context.Context, id FrontendId) (resul var model Frontend result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_update.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_update.go index 10e722a3212..a4c8148292c 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/method_update.go @@ -49,7 +49,6 @@ func (c FrontendsInterfaceClient) Update(ctx context.Context, id FrontendId, inp var model Frontend result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/version.go b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/version.go index db233385e8e..7ddf1e63b06 100644 --- a/resource-manager/servicenetworking/2023-11-01/frontendsinterface/version.go +++ b/resource-manager/servicenetworking/2023-11-01/frontendsinterface/version.go @@ -1,12 +1,10 @@ package frontendsinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/frontendsinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/frontendsinterface/2023-11-01" } diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/README.md b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/README.md index c85867edcbf..689357dba13 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/README.md +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface` Documentation -The `trafficcontrollerinterface` SDK allows for interaction with the Azure Resource Manager Service `servicenetworking` (API Version `2023-11-01`). +The `trafficcontrollerinterface` SDK allows for interaction with Azure Resource Manager `servicenetworking` (API Version `2023-11-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/client.go b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/client.go index 4396983ea36..2cf5ce13358 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/client.go +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/client.go @@ -15,7 +15,7 @@ type TrafficControllerInterfaceClient struct { } func NewTrafficControllerInterfaceClientWithBaseURI(sdkApi sdkEnv.Api) (*TrafficControllerInterfaceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "trafficcontrollerinterface", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "trafficcontrollerinterface", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TrafficControllerInterfaceClient: %+v", err) } diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/id_trafficcontroller.go b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/id_trafficcontroller.go index 18a50663371..3b2e730ed35 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/id_trafficcontroller.go +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/id_trafficcontroller.go @@ -42,7 +42,7 @@ func ParseTrafficControllerID(input string) (*TrafficControllerId, error) { } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficControllerIDInsensitively(input string) (*TrafficControllerId, } id := TrafficControllerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_get.go b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_get.go index 4a01f242f3a..076825ace84 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_get.go +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_get.go @@ -45,7 +45,6 @@ func (c TrafficControllerInterfaceClient) Get(ctx context.Context, id TrafficCon var model TrafficController result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_update.go b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_update.go index d5e058059cd..45a38d199f6 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_update.go +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/method_update.go @@ -49,7 +49,6 @@ func (c TrafficControllerInterfaceClient) Update(ctx context.Context, id Traffic var model TrafficController result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/version.go b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/version.go index ca9d4837ab4..46ca202f168 100644 --- a/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/version.go +++ b/resource-manager/servicenetworking/2023-11-01/trafficcontrollerinterface/version.go @@ -1,12 +1,10 @@ package trafficcontrollerinterface -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-11-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficcontrollerinterface/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/trafficcontrollerinterface/2023-11-01" } diff --git a/resource-manager/signalr/2023-02-01/signalr/README.md b/resource-manager/signalr/2023-02-01/signalr/README.md index 1d2fac260ef..ac1300a95d9 100644 --- a/resource-manager/signalr/2023-02-01/signalr/README.md +++ b/resource-manager/signalr/2023-02-01/signalr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2023-02-01/signalr` Documentation -The `signalr` SDK allows for interaction with the Azure Resource Manager Service `signalr` (API Version `2023-02-01`). +The `signalr` SDK allows for interaction with Azure Resource Manager `signalr` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/signalr/2023-02-01/signalr/client.go b/resource-manager/signalr/2023-02-01/signalr/client.go index 1ffbc8a319b..4717d8b7d70 100644 --- a/resource-manager/signalr/2023-02-01/signalr/client.go +++ b/resource-manager/signalr/2023-02-01/signalr/client.go @@ -15,7 +15,7 @@ type SignalRClient struct { } func NewSignalRClientWithBaseURI(sdkApi sdkEnv.Api) (*SignalRClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signalr", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signalr", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignalRClient: %+v", err) } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go b/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go index 82841ff421f..2f5a8b63ef2 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_customcertificate.go @@ -44,7 +44,7 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go b/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go index a96bdc49a7f..ea8cc935a42 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_location.go b/resource-manager/signalr/2023-02-01/signalr/id_location.go index 03b35c694c8..eeb824b59c9 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_location.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go b/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go index 3ae4e64f3d3..0baa79a487c 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go b/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go index 6fce0e78e3e..305e9ec8f80 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/id_signalr.go b/resource-manager/signalr/2023-02-01/signalr/id_signalr.go index 3c2909478d7..04aeaba6fb5 100644 --- a/resource-manager/signalr/2023-02-01/signalr/id_signalr.go +++ b/resource-manager/signalr/2023-02-01/signalr/id_signalr.go @@ -42,7 +42,7 @@ func ParseSignalRID(input string) (*SignalRId, error) { } id := SignalRId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSignalRIDInsensitively(input string) (*SignalRId, error) { } id := SignalRId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_checknameavailability.go b/resource-manager/signalr/2023-02-01/signalr/method_checknameavailability.go index bcd49e5f1c1..5270d0bce11 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_checknameavailability.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c SignalRClient) CheckNameAvailability(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_customcertificatesget.go b/resource-manager/signalr/2023-02-01/signalr/method_customcertificatesget.go index d578f431c41..2d1423b5b36 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_customcertificatesget.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_customcertificatesget.go @@ -45,7 +45,6 @@ func (c SignalRClient) CustomCertificatesGet(ctx context.Context, id CustomCerti var model CustomCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_customdomainsget.go b/resource-manager/signalr/2023-02-01/signalr/method_customdomainsget.go index 0d2b6dbe7df..1d8f4054958 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_customdomainsget.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c SignalRClient) CustomDomainsGet(ctx context.Context, id CustomDomainId) var model CustomDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_get.go b/resource-manager/signalr/2023-02-01/signalr/method_get.go index 21bba97c916..9df02c247e0 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_get.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_get.go @@ -45,7 +45,6 @@ func (c SignalRClient) Get(ctx context.Context, id SignalRId) (result GetOperati var model SignalRResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_listkeys.go b/resource-manager/signalr/2023-02-01/signalr/method_listkeys.go index d64c1522a2b..91940f90381 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_listkeys.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_listkeys.go @@ -46,7 +46,6 @@ func (c SignalRClient) ListKeys(ctx context.Context, id SignalRId) (result ListK var model SignalRKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsget.go b/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsget.go index 7db6c53904f..5e67b601f93 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsget.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c SignalRClient) PrivateEndpointConnectionsGet(ctx context.Context, id Pri var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsupdate.go b/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsupdate.go index 08598a73e3a..021e46afe76 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsupdate.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_privateendpointconnectionsupdate.go @@ -49,7 +49,6 @@ func (c SignalRClient) PrivateEndpointConnectionsUpdate(ctx context.Context, id var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/method_sharedprivatelinkresourcesget.go b/resource-manager/signalr/2023-02-01/signalr/method_sharedprivatelinkresourcesget.go index d0b8ac5ccc9..b12ea2d7fc6 100644 --- a/resource-manager/signalr/2023-02-01/signalr/method_sharedprivatelinkresourcesget.go +++ b/resource-manager/signalr/2023-02-01/signalr/method_sharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c SignalRClient) SharedPrivateLinkResourcesGet(ctx context.Context, id Sha var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2023-02-01/signalr/version.go b/resource-manager/signalr/2023-02-01/signalr/version.go index 33187b558db..38adde581b6 100644 --- a/resource-manager/signalr/2023-02-01/signalr/version.go +++ b/resource-manager/signalr/2023-02-01/signalr/version.go @@ -1,12 +1,10 @@ package signalr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signalr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signalr/2023-02-01" } diff --git a/resource-manager/signalr/2024-03-01/signalr/README.md b/resource-manager/signalr/2024-03-01/signalr/README.md index 7e3fa979011..cbe89473277 100644 --- a/resource-manager/signalr/2024-03-01/signalr/README.md +++ b/resource-manager/signalr/2024-03-01/signalr/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/signalr/2024-03-01/signalr` Documentation -The `signalr` SDK allows for interaction with the Azure Resource Manager Service `signalr` (API Version `2024-03-01`). +The `signalr` SDK allows for interaction with Azure Resource Manager `signalr` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/signalr/2024-03-01/signalr/client.go b/resource-manager/signalr/2024-03-01/signalr/client.go index 1ffbc8a319b..4717d8b7d70 100644 --- a/resource-manager/signalr/2024-03-01/signalr/client.go +++ b/resource-manager/signalr/2024-03-01/signalr/client.go @@ -15,7 +15,7 @@ type SignalRClient struct { } func NewSignalRClientWithBaseURI(sdkApi sdkEnv.Api) (*SignalRClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "signalr", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "signalr", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SignalRClient: %+v", err) } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_customcertificate.go b/resource-manager/signalr/2024-03-01/signalr/id_customcertificate.go index 82841ff421f..2f5a8b63ef2 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_customcertificate.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_customcertificate.go @@ -44,7 +44,7 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_customdomain.go b/resource-manager/signalr/2024-03-01/signalr/id_customdomain.go index a96bdc49a7f..ea8cc935a42 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_customdomain.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_location.go b/resource-manager/signalr/2024-03-01/signalr/id_location.go index 03b35c694c8..eeb824b59c9 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_location.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_privateendpointconnection.go b/resource-manager/signalr/2024-03-01/signalr/id_privateendpointconnection.go index 3ae4e64f3d3..0baa79a487c 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_privateendpointconnection.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_replica.go b/resource-manager/signalr/2024-03-01/signalr/id_replica.go index 6063260a202..5a07cc29809 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_replica.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_replica.go @@ -44,7 +44,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_replicasharedprivatelinkresource.go b/resource-manager/signalr/2024-03-01/signalr/id_replicasharedprivatelinkresource.go index d00fd80f162..e6f680c93ec 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_replicasharedprivatelinkresource.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_replicasharedprivatelinkresource.go @@ -46,7 +46,7 @@ func ParseReplicaSharedPrivateLinkResourceID(input string) (*ReplicaSharedPrivat } id := ReplicaSharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicaSharedPrivateLinkResourceIDInsensitively(input string) (*Replic } id := ReplicaSharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_sharedprivatelinkresource.go b/resource-manager/signalr/2024-03-01/signalr/id_sharedprivatelinkresource.go index 6fce0e78e3e..305e9ec8f80 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_sharedprivatelinkresource.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/id_signalr.go b/resource-manager/signalr/2024-03-01/signalr/id_signalr.go index 3c2909478d7..04aeaba6fb5 100644 --- a/resource-manager/signalr/2024-03-01/signalr/id_signalr.go +++ b/resource-manager/signalr/2024-03-01/signalr/id_signalr.go @@ -42,7 +42,7 @@ func ParseSignalRID(input string) (*SignalRId, error) { } id := SignalRId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSignalRIDInsensitively(input string) (*SignalRId, error) { } id := SignalRId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_checknameavailability.go b/resource-manager/signalr/2024-03-01/signalr/method_checknameavailability.go index bcd49e5f1c1..5270d0bce11 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_checknameavailability.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c SignalRClient) CheckNameAvailability(ctx context.Context, id LocationId, var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_customcertificatesget.go b/resource-manager/signalr/2024-03-01/signalr/method_customcertificatesget.go index d578f431c41..2d1423b5b36 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_customcertificatesget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_customcertificatesget.go @@ -45,7 +45,6 @@ func (c SignalRClient) CustomCertificatesGet(ctx context.Context, id CustomCerti var model CustomCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_customdomainsget.go b/resource-manager/signalr/2024-03-01/signalr/method_customdomainsget.go index 0d2b6dbe7df..1d8f4054958 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_customdomainsget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c SignalRClient) CustomDomainsGet(ctx context.Context, id CustomDomainId) var model CustomDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_get.go b/resource-manager/signalr/2024-03-01/signalr/method_get.go index 21bba97c916..9df02c247e0 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_get.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_get.go @@ -45,7 +45,6 @@ func (c SignalRClient) Get(ctx context.Context, id SignalRId) (result GetOperati var model SignalRResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_listkeys.go b/resource-manager/signalr/2024-03-01/signalr/method_listkeys.go index d64c1522a2b..91940f90381 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_listkeys.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_listkeys.go @@ -46,7 +46,6 @@ func (c SignalRClient) ListKeys(ctx context.Context, id SignalRId) (result ListK var model SignalRKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsget.go b/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsget.go index 7db6c53904f..5e67b601f93 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c SignalRClient) PrivateEndpointConnectionsGet(ctx context.Context, id Pri var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsupdate.go b/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsupdate.go index 08598a73e3a..021e46afe76 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsupdate.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_privateendpointconnectionsupdate.go @@ -49,7 +49,6 @@ func (c SignalRClient) PrivateEndpointConnectionsUpdate(ctx context.Context, id var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_replicasget.go b/resource-manager/signalr/2024-03-01/signalr/method_replicasget.go index c46dd5749cd..d4419f8ce18 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_replicasget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_replicasget.go @@ -45,7 +45,6 @@ func (c SignalRClient) ReplicasGet(ctx context.Context, id ReplicaId) (result Re var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_replicasharedprivatelinkresourcesget.go b/resource-manager/signalr/2024-03-01/signalr/method_replicasharedprivatelinkresourcesget.go index 9ff412a394b..a73de45c182 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_replicasharedprivatelinkresourcesget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_replicasharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c SignalRClient) ReplicaSharedPrivateLinkResourcesGet(ctx context.Context, var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/method_sharedprivatelinkresourcesget.go b/resource-manager/signalr/2024-03-01/signalr/method_sharedprivatelinkresourcesget.go index d0b8ac5ccc9..b12ea2d7fc6 100644 --- a/resource-manager/signalr/2024-03-01/signalr/method_sharedprivatelinkresourcesget.go +++ b/resource-manager/signalr/2024-03-01/signalr/method_sharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c SignalRClient) SharedPrivateLinkResourcesGet(ctx context.Context, id Sha var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/signalr/2024-03-01/signalr/version.go b/resource-manager/signalr/2024-03-01/signalr/version.go index fcd7f47d8cf..4d0ae26afcc 100644 --- a/resource-manager/signalr/2024-03-01/signalr/version.go +++ b/resource-manager/signalr/2024-03-01/signalr/version.go @@ -1,12 +1,10 @@ package signalr -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/signalr/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/signalr/2024-03-01" } diff --git a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md index 9e984f38753..fbf1ad1b5cf 100644 --- a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies` Documentation -The `backupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `backupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go index b01ca3b95ed..d77d7e4b208 100644 --- a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type BackupShortTermRetentionPoliciesClient struct { } func NewBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go index f44a938b3f8..0a7a2b75778 100644 --- a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, id comm var model BackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go index 5f0cc2c932f..63ca1c9582f 100644 --- a/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/backupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package backupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupshorttermretentionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/README.md b/resource-manager/sql/2023-02-01-preview/blobauditing/README.md index 4ac179a29b8..d4635b92b32 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/README.md +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/blobauditing` Documentation -The `blobauditing` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `blobauditing` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/client.go b/resource-manager/sql/2023-02-01-preview/blobauditing/client.go index d8c96733d85..d77ae84974a 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/client.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/client.go @@ -15,7 +15,7 @@ type BlobAuditingClient struct { } func NewBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobAuditingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobauditing", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobauditing", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobAuditingClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go index 589911c6f42..69f704a405e 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesCreateOrUpdate(ctx conte var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go index fc66178ed6e..fbc605bc326 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesGet(ctx context.Context, var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go index 03952a4b896..1296c38402d 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(c var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go index 3e29e0f05f0..68921db640e 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesGet(ctx context. var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go index c0e81b5a0db..f23d1799caf 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesGet(ctx context.Co var model ExtendedServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/method_serverblobauditingpoliciesget.go b/resource-manager/sql/2023-02-01-preview/blobauditing/method_serverblobauditingpoliciesget.go index 75e49afd4f9..bf9a8ef1b2f 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/method_serverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/method_serverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ServerBlobAuditingPoliciesGet(ctx context.Context, i var model ServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/blobauditing/version.go b/resource-manager/sql/2023-02-01-preview/blobauditing/version.go index 2825489b379..2bd1986a151 100644 --- a/resource-manager/sql/2023-02-01-preview/blobauditing/version.go +++ b/resource-manager/sql/2023-02-01-preview/blobauditing/version.go @@ -1,12 +1,10 @@ package blobauditing -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobauditing/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobauditing/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/README.md index faa01e61d61..83b94571fad 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings` Documentation -The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/client.go index 853faf57d20..6d648a65168 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type DatabaseAdvancedThreatProtectionSettingsClient struct { } func NewDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go index 86442b1035b..81db81d16c9 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx conte var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_get.go index c42a4c4fc7b..ef215bd4c97 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/version.go index 8918e4a0231..0f47b94439a 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package databaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/README.md b/resource-manager/sql/2023-02-01-preview/databaseadvisors/README.md index 805bebf48f7..9d31398dc05 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseadvisors` Documentation -The `databaseadvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseadvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/client.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/client.go index 44010e301ae..fce41427034 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/client.go @@ -15,7 +15,7 @@ type DatabaseAdvisorsClient struct { } func NewDatabaseAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/id_databaseadvisor.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/id_databaseadvisor.go index 3958ebfc87e..4238504a482 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/id_databaseadvisor.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_get.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_get.go index a42614c2904..8d6b2625ec0 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseAdvisorsClient) Get(ctx context.Context, id DatabaseAdvisorId) ( var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_listbydatabase.go index 514e3d2f332..3f50cebdcfc 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_listbydatabase.go @@ -35,6 +35,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, id commonids var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_update.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_update.go index e16bd4d4206..305e480233e 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_update.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseAdvisorsClient) Update(ctx context.Context, id DatabaseAdvisorId var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseadvisors/version.go b/resource-manager/sql/2023-02-01-preview/databaseadvisors/version.go index 9e935b534a3..0af0704768f 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseadvisors/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseadvisors/version.go @@ -1,12 +1,10 @@ package databaseadvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvisors/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/README.md b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/README.md index 91098f62c04..b7477739f98 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseautomatictuning` Documentation -The `databaseautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/client.go b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/client.go index c1ffd5220bb..64e97a4f9b8 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/client.go @@ -15,7 +15,7 @@ type DatabaseAutomaticTuningClient struct { } func NewDatabaseAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_get.go b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_get.go index b7b69ce9ea2..e39c0ed3a61 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAutomaticTuningClient) Get(ctx context.Context, id commonids.Sql var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_update.go b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_update.go index 18d13757916..e98f662fd44 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_update.go +++ b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c DatabaseAutomaticTuningClient) Update(ctx context.Context, id commonids. var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/version.go b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/version.go index 779c5da0c6a..51d15347ac9 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseautomatictuning/version.go @@ -1,12 +1,10 @@ package databaseautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseautomatictuning/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/README.md b/resource-manager/sql/2023-02-01-preview/databasecolumns/README.md index dbddf41a666..857dabf5941 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasecolumns` Documentation -The `databasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/client.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/client.go index f59e201824d..bb6e0d151c9 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/client.go @@ -15,7 +15,7 @@ type DatabaseColumnsClient struct { } func NewDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/id_column.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/id_column.go index b3af8a0f9d4..7c6b826f36c 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/id_column.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/id_table.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/id_table.go index 3b8c7d1c356..5ac8168a4b7 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/id_table.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_get.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_get.go index 64777b1f6d4..7df54396dde 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseColumnsClient) Get(ctx context.Context, id ColumnId) (result Get var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbydatabase.go index 95a591eec19..44b8ccd8618 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbytable.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbytable.go index e58a820a57b..16a76702308 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/databasecolumns/version.go b/resource-manager/sql/2023-02-01-preview/databasecolumns/version.go index ad5ec206642..4c18be22ed2 100644 --- a/resource-manager/sql/2023-02-01-preview/databasecolumns/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasecolumns/version.go @@ -1,12 +1,10 @@ package databasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasecolumns/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/client.go b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/client.go index b5952975e34..64b1de4d53d 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevalidateClient struct { } func NewDatabaseEncryptionProtectorRevalidateClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevalidateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevalidateClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/version.go b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/version.go index d4c69e5cd4f..a27f457f528 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevalidate/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevalidate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/client.go b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/client.go index ad1878977d2..68eea1ecd3e 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevertClient struct { } func NewDatabaseEncryptionProtectorRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevertClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/version.go b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/version.go index 518256c67f0..f3fe9c9fa35 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseencryptionprotectorrevert/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseextensions/README.md b/resource-manager/sql/2023-02-01-preview/databaseextensions/README.md index 6c68cfdf035..df137964f6b 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseextensions/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseextensions` Documentation -The `databaseextensions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseextensions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseextensions/client.go b/resource-manager/sql/2023-02-01-preview/databaseextensions/client.go index 295d1a579b8..329371849d4 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseextensions/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseextensions/client.go @@ -15,7 +15,7 @@ type DatabaseExtensionsClient struct { } func NewDatabaseExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseExtensionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseextensions/id_extension.go b/resource-manager/sql/2023-02-01-preview/databaseextensions/id_extension.go index 8c726d30fe1..e9cd5142eb7 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseextensions/id_extension.go +++ b/resource-manager/sql/2023-02-01-preview/databaseextensions/id_extension.go @@ -46,7 +46,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databaseextensions/version.go b/resource-manager/sql/2023-02-01-preview/databaseextensions/version.go index 557cdd88631..5c3dd508f55 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseextensions/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseextensions/version.go @@ -1,12 +1,10 @@ package databaseextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseextensions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseoperations/README.md b/resource-manager/sql/2023-02-01-preview/databaseoperations/README.md index a7fa8d9b7bd..8b752d8e652 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseoperations/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseoperations` Documentation -The `databaseoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseoperations/client.go b/resource-manager/sql/2023-02-01-preview/databaseoperations/client.go index 3b9304375b8..65137fba58a 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseoperations/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseoperations/client.go @@ -15,7 +15,7 @@ type DatabaseOperationsClient struct { } func NewDatabaseOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseoperations/version.go b/resource-manager/sql/2023-02-01-preview/databaseoperations/version.go index e5e8a6fdab3..31c3bb67e3b 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseoperations/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseoperations/version.go @@ -1,12 +1,10 @@ package databaseoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseoperations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/README.md b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/README.md index 1ac82f314d3..4ab56d3e2cb 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaserecommendedactions` Documentation -The `databaserecommendedactions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaserecommendedactions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/client.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/client.go index 9d75f11e0cf..02420960308 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/client.go @@ -15,7 +15,7 @@ type DatabaseRecommendedActionsClient struct { } func NewDatabaseRecommendedActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseRecommendedActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaserecommendedactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaserecommendedactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseRecommendedActionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_databaseadvisor.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_databaseadvisor.go index d80ad523b41..e15a0ffcfa5 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_databaseadvisor.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_recommendedaction.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_recommendedaction.go index cc4f1fc0a7a..2bac7220ef5 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_recommendedaction.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/id_recommendedaction.go @@ -48,7 +48,7 @@ func ParseRecommendedActionID(input string) (*RecommendedActionId, error) { } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRecommendedActionIDInsensitively(input string) (*RecommendedActionId, } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_get.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_get.go index d405a420d4e..746442a33bd 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseRecommendedActionsClient) Get(ctx context.Context, id Recommende var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go index ce818410590..7ee295f95c4 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go @@ -46,7 +46,6 @@ func (c DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Cont var model []RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_update.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_update.go index 7f6b808baab..f2b6314e21d 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_update.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseRecommendedActionsClient) Update(ctx context.Context, id Recomme var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/version.go b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/version.go index 888280f2182..98ee006b583 100644 --- a/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaserecommendedactions/version.go @@ -1,12 +1,10 @@ package databaserecommendedactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaserecommendedactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaserecommendedactions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databases/README.md b/resource-manager/sql/2023-02-01-preview/databases/README.md index 4c95f4f615a..72771827eb5 100644 --- a/resource-manager/sql/2023-02-01-preview/databases/README.md +++ b/resource-manager/sql/2023-02-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databases/client.go b/resource-manager/sql/2023-02-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/sql/2023-02-01-preview/databases/client.go +++ b/resource-manager/sql/2023-02-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databases/method_failover.go b/resource-manager/sql/2023-02-01-preview/databases/method_failover.go index 7afbab02040..8de72667a50 100644 --- a/resource-manager/sql/2023-02-01-preview/databases/method_failover.go +++ b/resource-manager/sql/2023-02-01-preview/databases/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/databases/method_get.go b/resource-manager/sql/2023-02-01-preview/databases/method_get.go index a9f44b0b589..1009685d61e 100644 --- a/resource-manager/sql/2023-02-01-preview/databases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databases/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DatabasesClient) Get(ctx context.Context, id commonids.SqlDatabaseId, op var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databases/version.go b/resource-manager/sql/2023-02-01-preview/databases/version.go index 938f6af7f2d..1251e5bc00d 100644 --- a/resource-manager/sql/2023-02-01-preview/databases/version.go +++ b/resource-manager/sql/2023-02-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/README.md b/resource-manager/sql/2023-02-01-preview/databaseschemas/README.md index a9516048d3f..f7bcdd19742 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseschemas` Documentation -The `databaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/client.go b/resource-manager/sql/2023-02-01-preview/databaseschemas/client.go index f7c5607f104..9b66a11cbc9 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/client.go @@ -15,7 +15,7 @@ type DatabaseSchemasClient struct { } func NewDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/id_schema.go b/resource-manager/sql/2023-02-01-preview/databaseschemas/id_schema.go index bfd9fca74e3..07c56131d6b 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/id_schema.go +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/method_get.go b/resource-manager/sql/2023-02-01-preview/databaseschemas/method_get.go index b0263b0abc8..27c1d7d7b3d 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSchemasClient) Get(ctx context.Context, id SchemaId) (result Get var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/databaseschemas/method_listbydatabase.go index c67b2be2776..e3ff05c63bb 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/databaseschemas/version.go b/resource-manager/sql/2023-02-01-preview/databaseschemas/version.go index 8b1c417b331..7b6c4d6793d 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseschemas/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseschemas/version.go @@ -1,12 +1,10 @@ package databaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseschemas/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md index f3146b2d25f..14ce2f4419e 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies` Documentation -The `databasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go index ede593698c7..5dc5a476ce2 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type DatabaseSecurityAlertPoliciesClient struct { } func NewDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go index 793251a9458..0752c0334f8 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go index f2e3ec9cf18..ad2feedc3e7 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id commoni var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go index 234cfc8c21d..0945bbbfbfb 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package databasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesecurityalertpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md index aa6f41be032..d6f59ce52bf 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines` Documentation -The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go index 4a029e35e35..197aac9464b 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go index 598eb5cd411..aab3068bda5 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go index b18a885e2c2..f3afb88df0d 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) Get(ctx context.Conte var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go index 84e38ea4a22..22127a76ae3 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentbaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go index 5246db793c6..505fdee6215 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentExecuteScanClient struct { } func NewDatabaseSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go index 93ace73feab..25e0b423d3b 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md index 677def5b4a0..816494e2ba7 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines` Documentation -The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go index d12af9b1446..617524c8b4b 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go index 99d4e7b9384..2d8c59a0783 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go @@ -46,7 +46,7 @@ func ParseBaselineRuleID(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBaselineRuleIDInsensitively(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go index 7d4ee197cf2..8d6e076da5c 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ct var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go index 84ad5045ae6..bb85540e3c6 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.C var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go index 81000ff7658..975f0080b02 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md index fb29bf2f556..9c165a2ebab 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult` Documentation -The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go index 92b651cb9fe..5b2f1d85b93 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScanResultClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go index 6a7319aa3b6..b708ee23e5d 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go @@ -48,7 +48,7 @@ func ParseScanScanResultID(input string) (*ScanScanResultId, error) { } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseScanScanResultIDInsensitively(input string) (*ScanScanResultId, error) } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index c66d39b0f73..896f447d3a0 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go index 6b0354fa840..b51d6882b18 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Cont var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go index c9518d76146..164ebeab818 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/README.md index 0865f3f77a2..4cab3c03c59 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans` Documentation -The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/client.go index ebf00746280..d170cc753df 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScansClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index a4455526058..fb6396f8bb4 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go index 6d507769fef..52aec5920e3 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/version.go index e3e443b8f41..04e98d57f3d 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/README.md index ac381a36dcf..300de0b41e8 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings` Documentation -The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/client.go index 4c3aefb163c..e0602c99331 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentsSettingsClient struct { } func NewDatabaseSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go index 283fc11d5f8..16e3cee1c42 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Conte var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/version.go index a66723fe491..bb0ccf8d3b2 100644 --- a/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasesqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/README.md b/resource-manager/sql/2023-02-01-preview/databasetables/README.md index f7d46e497db..c27abc189fc 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasetables` Documentation -The `databasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/client.go b/resource-manager/sql/2023-02-01-preview/databasetables/client.go index ae2db3cc1b3..3e10e7dcbee 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/client.go @@ -15,7 +15,7 @@ type DatabaseTablesClient struct { } func NewDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/id_schema.go b/resource-manager/sql/2023-02-01-preview/databasetables/id_schema.go index 4f1651b4008..95e2801e256 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/id_schema.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/id_table.go b/resource-manager/sql/2023-02-01-preview/databasetables/id_table.go index 9418bcd018e..0677aa6c988 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/id_table.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/method_get.go b/resource-manager/sql/2023-02-01-preview/databasetables/method_get.go index c00e399f016..00d41f2f7a5 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseTablesClient) Get(ctx context.Context, id TableId) (result GetOp var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/method_listbyschema.go b/resource-manager/sql/2023-02-01-preview/databasetables/method_listbyschema.go index f2ce40497ad..27cef7ab7cc 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/databasetables/version.go b/resource-manager/sql/2023-02-01-preview/databasetables/version.go index 886e142cf62..d333851aaa0 100644 --- a/resource-manager/sql/2023-02-01-preview/databasetables/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasetables/version.go @@ -1,12 +1,10 @@ package databasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasetables/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databaseusages/README.md b/resource-manager/sql/2023-02-01-preview/databaseusages/README.md index 7e93fb4b116..3ced6303d60 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseusages/README.md +++ b/resource-manager/sql/2023-02-01-preview/databaseusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databaseusages` Documentation -The `databaseusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databaseusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databaseusages/client.go b/resource-manager/sql/2023-02-01-preview/databaseusages/client.go index 2c2ee15772a..d79c504a7f5 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseusages/client.go +++ b/resource-manager/sql/2023-02-01-preview/databaseusages/client.go @@ -15,7 +15,7 @@ type DatabaseUsagesClient struct { } func NewDatabaseUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databaseusages/version.go b/resource-manager/sql/2023-02-01-preview/databaseusages/version.go index d085451732a..ab4040105c6 100644 --- a/resource-manager/sql/2023-02-01-preview/databaseusages/version.go +++ b/resource-manager/sql/2023-02-01-preview/databaseusages/version.go @@ -1,12 +1,10 @@ package databaseusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseusages/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/README.md index 7fde4373177..b9c3b6b3bc9 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines` Documentation -The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/client.go index 799c20cce65..9d705cb0169 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go index afee2c5691a..74f52b3bd08 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go index 2fc65238eb3..e0a57bf0eef 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx c var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go index 53027872e33..554e6664a47 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Cont var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/version.go index 3c42b645f9f..b0e31fa1cfd 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/README.md b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/README.md index 102e49cad28..0360dc7c3af 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments` Documentation -The `databasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/client.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/client.go index 8802de5ec6c..038b962a146 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentsClient struct { } func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_createorupdate.go index 5995d251fc6..cd059d04950 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Conte var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_get.go index c807027bb1d..45ee4c29235 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, id comm var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/version.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/version.go index a5403f87195..b361f62a473 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessments/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/README.md index 41110b1b58d..f077c800a44 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans` Documentation -The `databasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `databasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/client.go index 6d494cbab65..7060f30a177 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentScansClient struct { } func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go index a90d293b749..ae5ef46a672 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentScanID(input string) (*VulnerabilityAssessmentS } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentScanIDInsensitively(input string) (*Vulnerabili } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_export.go index 0decd7c3417..6990e393834 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_get.go index 4b42b912639..c692ed8bc59 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, id var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/version.go index 477db43d5e2..507ddd6bc56 100644 --- a/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-02-01-preview/databasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/README.md b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/README.md index ae0c4bae2e6..b2facf4486a 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/datamaskingpolicies` Documentation -The `datamaskingpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `datamaskingpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/client.go b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/client.go index 5247008b095..b9fc98390b7 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/client.go @@ -15,7 +15,7 @@ type DataMaskingPoliciesClient struct { } func NewDataMaskingPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_createorupdate.go index 7a94c14f63f..40914de8f15 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, id common var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_get.go index cb657685fed..a1fc156a99f 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DataMaskingPoliciesClient) Get(ctx context.Context, id commonids.SqlData var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/version.go b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/version.go index 1809e7c9fc0..5cf04a61145 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingpolicies/version.go @@ -1,12 +1,10 @@ package datamaskingpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingrules/README.md b/resource-manager/sql/2023-02-01-preview/datamaskingrules/README.md index e5f63b7fde6..0249dc1e83a 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingrules/README.md +++ b/resource-manager/sql/2023-02-01-preview/datamaskingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/datamaskingrules` Documentation -The `datamaskingrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `datamaskingrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingrules/client.go b/resource-manager/sql/2023-02-01-preview/datamaskingrules/client.go index 24c99a14922..e9a838cb776 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingrules/client.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingrules/client.go @@ -15,7 +15,7 @@ type DataMaskingRulesClient struct { } func NewDataMaskingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingrules/id_datamaskingpolicyrule.go b/resource-manager/sql/2023-02-01-preview/datamaskingrules/id_datamaskingpolicyrule.go index 9e9000d84cc..cc7040052fe 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingrules/id_datamaskingpolicyrule.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingrules/id_datamaskingpolicyrule.go @@ -46,7 +46,7 @@ func ParseDataMaskingPolicyRuleID(input string) (*DataMaskingPolicyRuleId, error } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataMaskingPolicyRuleIDInsensitively(input string) (*DataMaskingPolicy } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingrules/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/datamaskingrules/method_createorupdate.go index d9a11638222..5665741a0d2 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingrules/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, id DataMaski var model DataMaskingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/datamaskingrules/version.go b/resource-manager/sql/2023-02-01-preview/datamaskingrules/version.go index ab77c5cf3d0..43bf793f4e8 100644 --- a/resource-manager/sql/2023-02-01-preview/datamaskingrules/version.go +++ b/resource-manager/sql/2023-02-01-preview/datamaskingrules/version.go @@ -1,12 +1,10 @@ package datamaskingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingrules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/README.md b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/README.md index b7af36aeac9..5a448b130e4 100644 --- a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/README.md +++ b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities` Documentation -The `datawarehouseuseractivities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `datawarehouseuseractivities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/client.go b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/client.go index 8e4a0c988a9..98e15f11f1c 100644 --- a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/client.go +++ b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/client.go @@ -15,7 +15,7 @@ type DataWarehouseUserActivitiesClient struct { } func NewDataWarehouseUserActivitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataWarehouseUserActivitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataWarehouseUserActivitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/method_get.go b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/method_get.go index d9a8d7e8736..2d7d9d01bb7 100644 --- a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/method_get.go @@ -47,7 +47,6 @@ func (c DataWarehouseUserActivitiesClient) Get(ctx context.Context, id commonids var model DataWarehouseUserActivities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/version.go b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/version.go index eb30e6809de..89fcac9a8bb 100644 --- a/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/version.go +++ b/resource-manager/sql/2023-02-01-preview/datawarehouseuseractivities/version.go @@ -1,12 +1,10 @@ package datawarehouseuseractivities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datawarehouseuseractivities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datawarehouseuseractivities/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/README.md b/resource-manager/sql/2023-02-01-preview/deletedservers/README.md index 517c1e1035e..701577844e1 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/README.md +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/deletedservers` Documentation -The `deletedservers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `deletedservers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/client.go b/resource-manager/sql/2023-02-01-preview/deletedservers/client.go index da406faf779..6679ead4a59 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/client.go +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/client.go @@ -15,7 +15,7 @@ type DeletedServersClient struct { } func NewDeletedServersClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/id_deletedserver.go b/resource-manager/sql/2023-02-01-preview/deletedservers/id_deletedserver.go index f85db77184a..926acac3291 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/id_deletedserver.go +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/id_deletedserver.go @@ -42,7 +42,7 @@ func ParseDeletedServerID(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServerIDInsensitively(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/id_location.go b/resource-manager/sql/2023-02-01-preview/deletedservers/id_location.go index ed2547876bf..611b5dbd842 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/method_get.go b/resource-manager/sql/2023-02-01-preview/deletedservers/method_get.go index 25162a744c8..7f7f83241ae 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/method_get.go @@ -45,7 +45,6 @@ func (c DeletedServersClient) Get(ctx context.Context, id DeletedServerId) (resu var model DeletedServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/deletedservers/version.go b/resource-manager/sql/2023-02-01-preview/deletedservers/version.go index d8a526df9d5..598b5409e6c 100644 --- a/resource-manager/sql/2023-02-01-preview/deletedservers/version.go +++ b/resource-manager/sql/2023-02-01-preview/deletedservers/version.go @@ -1,12 +1,10 @@ package deletedservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservers/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/README.md b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/README.md index 10d41a7abd3..9e407b8dde5 100644 --- a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups` Documentation -The `distributedavailabilitygroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `distributedavailabilitygroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/client.go b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/client.go index 770627d26fb..f9d46b7aa4b 100644 --- a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/client.go @@ -15,7 +15,7 @@ type DistributedAvailabilityGroupsClient struct { } func NewDistributedAvailabilityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DistributedAvailabilityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DistributedAvailabilityGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go index a1abbaa89b3..371a12d6563 100644 --- a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go +++ b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go @@ -44,7 +44,7 @@ func ParseDistributedAvailabilityGroupID(input string) (*DistributedAvailability } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDistributedAvailabilityGroupIDInsensitively(input string) (*Distribute } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/method_get.go b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/method_get.go index 60b15807eb5..d60cf4fdf20 100644 --- a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/method_get.go @@ -45,7 +45,6 @@ func (c DistributedAvailabilityGroupsClient) Get(ctx context.Context, id Distrib var model DistributedAvailabilityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/version.go b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/version.go index 1a8312d7235..31bfcafd47e 100644 --- a/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/distributedavailabilitygroups/version.go @@ -1,12 +1,10 @@ package distributedavailabilitygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/distributedavailabilitygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/distributedavailabilitygroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/README.md b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/README.md index 4a590598bcd..fbe207d1204 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/README.md +++ b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpooloperations` Documentation -The `elasticpooloperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `elasticpooloperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/client.go b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/client.go index 594f5bcc3e4..fbaee40df4b 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/client.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/client.go @@ -15,7 +15,7 @@ type ElasticPoolOperationsClient struct { } func NewElasticPoolOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpooloperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpooloperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/id_operation.go b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/id_operation.go index e5e330ca72b..50733e73bef 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/id_operation.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/version.go b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/version.go index 211ddd77aca..8a190eb9aab 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpooloperations/version.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpooloperations/version.go @@ -1,12 +1,10 @@ package elasticpooloperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpooloperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpooloperations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpools/README.md b/resource-manager/sql/2023-02-01-preview/elasticpools/README.md index 2c36ef933c9..e4d001a98ae 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpools/README.md +++ b/resource-manager/sql/2023-02-01-preview/elasticpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/elasticpools` Documentation -The `elasticpools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `elasticpools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/elasticpools/client.go b/resource-manager/sql/2023-02-01-preview/elasticpools/client.go index 2fbd56d5c0d..d6335179470 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpools/client.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpools/client.go @@ -15,7 +15,7 @@ type ElasticPoolsClient struct { } func NewElasticPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go b/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go index f311ee6c3f9..8cad14ea50b 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpools/method_get.go @@ -46,7 +46,6 @@ func (c ElasticPoolsClient) Get(ctx context.Context, id commonids.SqlElasticPool var model ElasticPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go b/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go index 6d3b53d468b..62ae75c61d6 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpools/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/elasticpools/version.go b/resource-manager/sql/2023-02-01-preview/elasticpools/version.go index f26ae902547..5286a743021 100644 --- a/resource-manager/sql/2023-02-01-preview/elasticpools/version.go +++ b/resource-manager/sql/2023-02-01-preview/elasticpools/version.go @@ -1,12 +1,10 @@ package elasticpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpools/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/README.md b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/README.md index b5d3a419e29..241a54ba38d 100644 --- a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/README.md +++ b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/encryptionprotectors` Documentation -The `encryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `encryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/client.go b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/client.go index 0213a8a383d..f72697edceb 100644 --- a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/client.go +++ b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/client.go @@ -15,7 +15,7 @@ type EncryptionProtectorsClient struct { } func NewEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/method_get.go b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/method_get.go index 659214dd4e9..f1b561315dc 100644 --- a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c EncryptionProtectorsClient) Get(ctx context.Context, id commonids.SqlSer var model EncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/version.go b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/version.go index efaa72e8532..85c45e99fa3 100644 --- a/resource-manager/sql/2023-02-01-preview/encryptionprotectors/version.go +++ b/resource-manager/sql/2023-02-01-preview/encryptionprotectors/version.go @@ -1,12 +1,10 @@ package encryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionprotectors/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/endpointcertificates/README.md b/resource-manager/sql/2023-02-01-preview/endpointcertificates/README.md index 002735de7aa..3933143eee1 100644 --- a/resource-manager/sql/2023-02-01-preview/endpointcertificates/README.md +++ b/resource-manager/sql/2023-02-01-preview/endpointcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/endpointcertificates` Documentation -The `endpointcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `endpointcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/endpointcertificates/client.go b/resource-manager/sql/2023-02-01-preview/endpointcertificates/client.go index d10853ad816..d3524ab4566 100644 --- a/resource-manager/sql/2023-02-01-preview/endpointcertificates/client.go +++ b/resource-manager/sql/2023-02-01-preview/endpointcertificates/client.go @@ -15,7 +15,7 @@ type EndpointCertificatesClient struct { } func NewEndpointCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/endpointcertificates/id_endpointcertificate.go b/resource-manager/sql/2023-02-01-preview/endpointcertificates/id_endpointcertificate.go index 26d04f447fb..3835fcdf65e 100644 --- a/resource-manager/sql/2023-02-01-preview/endpointcertificates/id_endpointcertificate.go +++ b/resource-manager/sql/2023-02-01-preview/endpointcertificates/id_endpointcertificate.go @@ -44,7 +44,7 @@ func ParseEndpointCertificateID(input string) (*EndpointCertificateId, error) { } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointCertificateIDInsensitively(input string) (*EndpointCertificate } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/endpointcertificates/method_get.go b/resource-manager/sql/2023-02-01-preview/endpointcertificates/method_get.go index b7a356deab9..dfe976af079 100644 --- a/resource-manager/sql/2023-02-01-preview/endpointcertificates/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/endpointcertificates/method_get.go @@ -45,7 +45,6 @@ func (c EndpointCertificatesClient) Get(ctx context.Context, id EndpointCertific var model EndpointCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/endpointcertificates/version.go b/resource-manager/sql/2023-02-01-preview/endpointcertificates/version.go index 3c0fb3c88d3..fad98398986 100644 --- a/resource-manager/sql/2023-02-01-preview/endpointcertificates/version.go +++ b/resource-manager/sql/2023-02-01-preview/endpointcertificates/version.go @@ -1,12 +1,10 @@ package endpointcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointcertificates/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/failovergroups/README.md b/resource-manager/sql/2023-02-01-preview/failovergroups/README.md index d37a4adcd7e..bdf015124ff 100644 --- a/resource-manager/sql/2023-02-01-preview/failovergroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/failovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/failovergroups` Documentation -The `failovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `failovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/failovergroups/client.go b/resource-manager/sql/2023-02-01-preview/failovergroups/client.go index edf4434acee..2ea4965a0c0 100644 --- a/resource-manager/sql/2023-02-01-preview/failovergroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/failovergroups/client.go @@ -15,7 +15,7 @@ type FailoverGroupsClient struct { } func NewFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "failovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "failovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/failovergroups/id_failovergroup.go b/resource-manager/sql/2023-02-01-preview/failovergroups/id_failovergroup.go index b27ee1d2961..3a16eb69b5d 100644 --- a/resource-manager/sql/2023-02-01-preview/failovergroups/id_failovergroup.go +++ b/resource-manager/sql/2023-02-01-preview/failovergroups/id_failovergroup.go @@ -44,7 +44,7 @@ func ParseFailoverGroupID(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFailoverGroupIDInsensitively(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/failovergroups/method_get.go b/resource-manager/sql/2023-02-01-preview/failovergroups/method_get.go index ab2386fa0a5..61d249dd805 100644 --- a/resource-manager/sql/2023-02-01-preview/failovergroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/failovergroups/method_get.go @@ -45,7 +45,6 @@ func (c FailoverGroupsClient) Get(ctx context.Context, id FailoverGroupId) (resu var model FailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/failovergroups/version.go b/resource-manager/sql/2023-02-01-preview/failovergroups/version.go index a0cb029b813..c521396f91c 100644 --- a/resource-manager/sql/2023-02-01-preview/failovergroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/failovergroups/version.go @@ -1,12 +1,10 @@ package failovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/failovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/failovergroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/README.md b/resource-manager/sql/2023-02-01-preview/firewallrules/README.md index 5a2d8d1ebc0..65f49242a01 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/README.md +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/client.go b/resource-manager/sql/2023-02-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/client.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/id_firewallrule.go b/resource-manager/sql/2023-02-01-preview/firewallrules/id_firewallrule.go index 36610c932a0..ad5d1b2e0b0 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/firewallrules/method_createorupdate.go index 20251b56b61..a122b14e4d9 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/method_get.go b/resource-manager/sql/2023-02-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/method_replace.go b/resource-manager/sql/2023-02-01-preview/firewallrules/method_replace.go index 5541e3df8a2..97cafcd2e7a 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/method_replace.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/method_replace.go @@ -52,7 +52,6 @@ func (c FirewallRulesClient) Replace(ctx context.Context, id commonids.SqlServer var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/firewallrules/version.go b/resource-manager/sql/2023-02-01-preview/firewallrules/version.go index 28dc663764d..671130ed50d 100644 --- a/resource-manager/sql/2023-02-01-preview/firewallrules/version.go +++ b/resource-manager/sql/2023-02-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md index a47f21b56f7..7c3a71baffc 100644 --- a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/geobackuppolicies` Documentation -The `geobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `geobackuppolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go index dbc369d4a8a..bef6b615722 100644 --- a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/client.go @@ -15,7 +15,7 @@ type GeoBackupPoliciesClient struct { } func NewGeoBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*GeoBackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "geobackuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "geobackuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GeoBackupPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go index 0df4cf0ab5d..d329ea74a15 100644 --- a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, id commonid var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go index 7927b9f10a6..8a37d55fda5 100644 --- a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/method_get.go @@ -47,7 +47,6 @@ func (c GeoBackupPoliciesClient) Get(ctx context.Context, id commonids.SqlDataba var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go index 2ec88f0334c..d3d0d7ad6e7 100644 --- a/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/geobackuppolicies/version.go @@ -1,12 +1,10 @@ package geobackuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geobackuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/geobackuppolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/README.md b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/README.md index ebdae1ccea6..fe1cc64fc2e 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/instancefailovergroups` Documentation -The `instancefailovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `instancefailovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/client.go b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/client.go index 77237fd2c0a..32dba8d6339 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/client.go @@ -15,7 +15,7 @@ type InstanceFailoverGroupsClient struct { } func NewInstanceFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstanceFailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancefailovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancefailovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstanceFailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_instancefailovergroup.go b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_instancefailovergroup.go index 56d3645eed9..478205f6ec3 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_instancefailovergroup.go +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_instancefailovergroup.go @@ -44,7 +44,7 @@ func ParseInstanceFailoverGroupID(input string) (*InstanceFailoverGroupId, error } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceFailoverGroupIDInsensitively(input string) (*InstanceFailoverG } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_providerlocation.go b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_providerlocation.go index 43354417237..4a8e272c043 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_providerlocation.go +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/method_get.go b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/method_get.go index 1254e8ce94b..97fdea7143e 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/method_get.go @@ -45,7 +45,6 @@ func (c InstanceFailoverGroupsClient) Get(ctx context.Context, id InstanceFailov var model InstanceFailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/version.go b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/version.go index 36330dfdb5f..9705b2505d1 100644 --- a/resource-manager/sql/2023-02-01-preview/instancefailovergroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/instancefailovergroups/version.go @@ -1,12 +1,10 @@ package instancefailovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancefailovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancefailovergroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/instancepools/README.md b/resource-manager/sql/2023-02-01-preview/instancepools/README.md index e16dae5639d..ac7ff9e289c 100644 --- a/resource-manager/sql/2023-02-01-preview/instancepools/README.md +++ b/resource-manager/sql/2023-02-01-preview/instancepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/instancepools` Documentation -The `instancepools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `instancepools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/instancepools/client.go b/resource-manager/sql/2023-02-01-preview/instancepools/client.go index 4454bc0d353..a637ecc1205 100644 --- a/resource-manager/sql/2023-02-01-preview/instancepools/client.go +++ b/resource-manager/sql/2023-02-01-preview/instancepools/client.go @@ -15,7 +15,7 @@ type InstancePoolsClient struct { } func NewInstancePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstancePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstancePoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/instancepools/id_instancepool.go b/resource-manager/sql/2023-02-01-preview/instancepools/id_instancepool.go index 7edfa1a28aa..ed208898430 100644 --- a/resource-manager/sql/2023-02-01-preview/instancepools/id_instancepool.go +++ b/resource-manager/sql/2023-02-01-preview/instancepools/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/instancepools/method_get.go b/resource-manager/sql/2023-02-01-preview/instancepools/method_get.go index b33774f4fc8..b953e524138 100644 --- a/resource-manager/sql/2023-02-01-preview/instancepools/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/instancepools/method_get.go @@ -45,7 +45,6 @@ func (c InstancePoolsClient) Get(ctx context.Context, id InstancePoolId) (result var model InstancePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/instancepools/version.go b/resource-manager/sql/2023-02-01-preview/instancepools/version.go index 9ef3cd59176..c040e7af586 100644 --- a/resource-manager/sql/2023-02-01-preview/instancepools/version.go +++ b/resource-manager/sql/2023-02-01-preview/instancepools/version.go @@ -1,12 +1,10 @@ package instancepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancepools/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/README.md b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/README.md index f61a59cc180..851d9ba5fe5 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/README.md +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/ipv6firewallrules` Documentation -The `ipv6firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `ipv6firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/client.go b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/client.go index be0b08e1bdb..59b1646ba2d 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/client.go +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/client.go @@ -15,7 +15,7 @@ type IPv6FirewallRulesClient struct { } func NewIPv6FirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*IPv6FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipv6firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipv6firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPv6FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/id_ipv6firewallrule.go b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/id_ipv6firewallrule.go index 8ff72cf837d..eb3a1d11bf8 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/id_ipv6firewallrule.go +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/id_ipv6firewallrule.go @@ -44,7 +44,7 @@ func ParseIPv6FirewallRuleID(input string) (*IPv6FirewallRuleId, error) { } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIPv6FirewallRuleIDInsensitively(input string) (*IPv6FirewallRuleId, er } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_createorupdate.go index 011a037dba9..51a11453d62 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, id IPv6Fire var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_get.go b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_get.go index fcacb9b30c6..7eec857c439 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c IPv6FirewallRulesClient) Get(ctx context.Context, id IPv6FirewallRuleId) var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/version.go b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/version.go index ed3cf74bd07..3c88021015a 100644 --- a/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/version.go +++ b/resource-manager/sql/2023-02-01-preview/ipv6firewallrules/version.go @@ -1,12 +1,10 @@ package ipv6firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipv6firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipv6firewallrules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobagents/README.md b/resource-manager/sql/2023-02-01-preview/jobagents/README.md index 5b179aa685e..e5485a6d87a 100644 --- a/resource-manager/sql/2023-02-01-preview/jobagents/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobagents` Documentation -The `jobagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobagents/client.go b/resource-manager/sql/2023-02-01-preview/jobagents/client.go index ab27e52d87a..12ff1946c03 100644 --- a/resource-manager/sql/2023-02-01-preview/jobagents/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobagents/client.go @@ -15,7 +15,7 @@ type JobAgentsClient struct { } func NewJobAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobagents/id_jobagent.go b/resource-manager/sql/2023-02-01-preview/jobagents/id_jobagent.go index 35f4497a3da..fb9135ac062 100644 --- a/resource-manager/sql/2023-02-01-preview/jobagents/id_jobagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobagents/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobagents/method_get.go b/resource-manager/sql/2023-02-01-preview/jobagents/method_get.go index 433d5a1b380..ee85f1b86c7 100644 --- a/resource-manager/sql/2023-02-01-preview/jobagents/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobagents/method_get.go @@ -45,7 +45,6 @@ func (c JobAgentsClient) Get(ctx context.Context, id JobAgentId) (result GetOper var model JobAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobagents/version.go b/resource-manager/sql/2023-02-01-preview/jobagents/version.go index 5931c46abcb..d1478d51588 100644 --- a/resource-manager/sql/2023-02-01-preview/jobagents/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobagents/version.go @@ -1,12 +1,10 @@ package jobagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobagents/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/README.md b/resource-manager/sql/2023-02-01-preview/jobcredentials/README.md index f356224e5d1..998d87f4893 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobcredentials` Documentation -The `jobcredentials` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobcredentials` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/client.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/client.go index 0977cf3d384..9bc1ca997fe 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/client.go @@ -15,7 +15,7 @@ type JobCredentialsClient struct { } func NewJobCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobCredentialsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/id_credential.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/id_credential.go index 6b7ea0b08a1..159c1c26ed9 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/id_credential.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/id_credential.go @@ -46,7 +46,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/id_jobagent.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/id_jobagent.go index 94291d1711b..9efd8aaeb2a 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/id_jobagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/method_createorupdate.go index 3f021789ab4..9cd18192efa 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialI var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/method_get.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/method_get.go index 27cbbfe3550..c9c5e2020d9 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/method_get.go @@ -45,7 +45,6 @@ func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobcredentials/version.go b/resource-manager/sql/2023-02-01-preview/jobcredentials/version.go index ee1a5925a13..3fc3151cb7d 100644 --- a/resource-manager/sql/2023-02-01-preview/jobcredentials/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobcredentials/version.go @@ -1,12 +1,10 @@ package jobcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcredentials/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/README.md b/resource-manager/sql/2023-02-01-preview/jobexecutions/README.md index 0fbd2ca2b8c..a5322dbf577 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobexecutions` Documentation -The `jobexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/client.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/client.go index b52787a2a5b..cad4ae0b98f 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/client.go @@ -15,7 +15,7 @@ type JobExecutionsClient struct { } func NewJobExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_execution.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_execution.go index 9892ee270be..7613e0b20d9 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_execution.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_job.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_job.go index 487e172c701..b5991da3410 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_job.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_jobagent.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_jobagent.go index dc929e76456..9df1db2dc84 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/id_jobagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_get.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_get.go index d8d69abc245..9c693797e4c 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobExecutionsClient) Get(ctx context.Context, id ExecutionId) (result Ge var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyagent.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyagent.go index 102e1c0c866..3a05ff3fcb6 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyagent.go @@ -45,6 +45,7 @@ func (o ListByAgentOperationOptions) ToHeaders() *client.Headers { func (o ListByAgentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyjob.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyjob.go index f20a5ddb75a..e757e5359ff 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyjob.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/method_listbyjob.go @@ -45,6 +45,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/jobexecutions/version.go b/resource-manager/sql/2023-02-01-preview/jobexecutions/version.go index 4bfc9d57d2e..bddcdfe4d53 100644 --- a/resource-manager/sql/2023-02-01-preview/jobexecutions/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobexecutions/version.go @@ -1,12 +1,10 @@ package jobexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobexecutions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/README.md b/resource-manager/sql/2023-02-01-preview/jobs/README.md index 26d369ff85b..4fd22ea844d 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobs/client.go b/resource-manager/sql/2023-02-01-preview/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/id_job.go b/resource-manager/sql/2023-02-01-preview/jobs/id_job.go index 74e38cf42db..94b94f22d2c 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/id_job.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/id_jobagent.go b/resource-manager/sql/2023-02-01-preview/jobs/id_jobagent.go index d8c462a952d..38ae229c3f9 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/id_jobagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/jobs/method_createorupdate.go index 769a43e93f0..f3c623fcd53 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobsClient) CreateOrUpdate(ctx context.Context, id JobId, input Job) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/method_get.go b/resource-manager/sql/2023-02-01-preview/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobs/version.go b/resource-manager/sql/2023-02-01-preview/jobs/version.go index 59e7ee2f03a..f3afe903a68 100644 --- a/resource-manager/sql/2023-02-01-preview/jobs/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/README.md b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/README.md index c88b7bf1199..d423cb8d596 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobstepexecutions` Documentation -The `jobstepexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobstepexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/client.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/client.go index 505fab937cf..097a54ba533 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/client.go @@ -15,7 +15,7 @@ type JobStepExecutionsClient struct { } func NewJobStepExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstepexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstepexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_execution.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_execution.go index dc6ed7bfaa6..1ce8d1ea19f 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_execution.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_executionstep.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_executionstep.go index b114b1d0236..489ca126e41 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_get.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_get.go index a0551816208..0eb160b968b 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobStepExecutionsClient) Get(ctx context.Context, id ExecutionStepId) (r var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_listbyjobexecution.go index e7c228c0e49..b3a448d3137 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/version.go b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/version.go index 7e3a66b4d58..3b4f8d7da5f 100644 --- a/resource-manager/sql/2023-02-01-preview/jobstepexecutions/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobstepexecutions/version.go @@ -1,12 +1,10 @@ package jobstepexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstepexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstepexecutions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/README.md b/resource-manager/sql/2023-02-01-preview/jobsteps/README.md index 035f646827f..2f2c84f4228 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobsteps` Documentation -The `jobsteps` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobsteps` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/client.go b/resource-manager/sql/2023-02-01-preview/jobsteps/client.go index cc5801243a3..51ed069463b 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/client.go @@ -15,7 +15,7 @@ type JobStepsClient struct { } func NewJobStepsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobsteps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobsteps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/id_job.go b/resource-manager/sql/2023-02-01-preview/jobsteps/id_job.go index b30a6d1461e..5f349b17d55 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/id_job.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/id_step.go b/resource-manager/sql/2023-02-01-preview/jobsteps/id_step.go index 32c798fcf61..3d1c88df21a 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/id_step.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/id_step.go @@ -48,7 +48,7 @@ func ParseStepID(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStepIDInsensitively(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/id_version.go b/resource-manager/sql/2023-02-01-preview/jobsteps/id_version.go index b2fd57d5973..424c7d21890 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/id_version.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/id_versionstep.go b/resource-manager/sql/2023-02-01-preview/jobsteps/id_versionstep.go index 2342ceeb2eb..217ac00cda3 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/id_versionstep.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/id_versionstep.go @@ -50,7 +50,7 @@ func ParseVersionStepID(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseVersionStepIDInsensitively(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/jobsteps/method_createorupdate.go index 6d1f3f7f052..20835ec1bf8 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobStepsClient) CreateOrUpdate(ctx context.Context, id StepId, input Job var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/method_get.go b/resource-manager/sql/2023-02-01-preview/jobsteps/method_get.go index fe4c2266990..9fe63607acd 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/method_get.go @@ -45,7 +45,6 @@ func (c JobStepsClient) Get(ctx context.Context, id StepId) (result GetOperation var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/method_getbyversion.go b/resource-manager/sql/2023-02-01-preview/jobsteps/method_getbyversion.go index bf925aec949..61fe0bd36ef 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/method_getbyversion.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/method_getbyversion.go @@ -45,7 +45,6 @@ func (c JobStepsClient) GetByVersion(ctx context.Context, id VersionStepId) (res var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobsteps/version.go b/resource-manager/sql/2023-02-01-preview/jobsteps/version.go index c8c2717bc16..fb52dbec5c0 100644 --- a/resource-manager/sql/2023-02-01-preview/jobsteps/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobsteps/version.go @@ -1,12 +1,10 @@ package jobsteps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobsteps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobsteps/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/README.md b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/README.md index 356814a01ee..667705f1e99 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobtargetexecutions` Documentation -The `jobtargetexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobtargetexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/client.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/client.go index c0a9a88da76..5e5c95f15ea 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/client.go @@ -15,7 +15,7 @@ type JobTargetExecutionsClient struct { } func NewJobTargetExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_execution.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_execution.go index 8e04cde0125..eba1458a90e 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_execution.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_executionstep.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_executionstep.go index 4d5f8c51f1e..3909011262d 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_target.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_target.go index 992dd7f26e5..4f79d9c93b9 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_target.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/id_target.go @@ -52,7 +52,7 @@ func ParseTargetID(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseTargetIDInsensitively(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_get.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_get.go index 34bd9867542..5f1676b9a64 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetExecutionsClient) Get(ctx context.Context, id TargetId) (result var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbyjobexecution.go index 1a171760d34..a98a024e117 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbystep.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbystep.go index e3bfb49f5a4..9f647e1f496 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbystep.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/method_listbystep.go @@ -45,6 +45,7 @@ func (o ListByStepOperationOptions) ToHeaders() *client.Headers { func (o ListByStepOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/version.go b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/version.go index 2f5272ca078..583fa655772 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetexecutions/version.go @@ -1,12 +1,10 @@ package jobtargetexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetexecutions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/README.md b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/README.md index dd1244330df..30f3f659046 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobtargetgroups` Documentation -The `jobtargetgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobtargetgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/client.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/client.go index e797ddd9702..0b3a0245e33 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/client.go @@ -15,7 +15,7 @@ type JobTargetGroupsClient struct { } func NewJobTargetGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_jobagent.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_jobagent.go index 58ffd117c50..ab68b6a0cd7 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_jobagent.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_targetgroup.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_targetgroup.go index b756f36265f..ce03b2e09f0 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_targetgroup.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/id_targetgroup.go @@ -46,7 +46,7 @@ func ParseTargetGroupID(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTargetGroupIDInsensitively(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_createorupdate.go index b3e95b511bb..a4c7de8d4fb 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, id TargetGrou var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_get.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_get.go index 88762b5b420..bf1e5978670 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetGroupsClient) Get(ctx context.Context, id TargetGroupId) (resul var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/version.go b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/version.go index c66a8781788..8cc5d6bc6ff 100644 --- a/resource-manager/sql/2023-02-01-preview/jobtargetgroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobtargetgroups/version.go @@ -1,12 +1,10 @@ package jobtargetgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetgroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/README.md b/resource-manager/sql/2023-02-01-preview/jobversions/README.md index 4a380ca997c..11db663c865 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/README.md +++ b/resource-manager/sql/2023-02-01-preview/jobversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobversions` Documentation -The `jobversions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `jobversions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/client.go b/resource-manager/sql/2023-02-01-preview/jobversions/client.go index 6fad5b76da0..34b9c35d823 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/client.go +++ b/resource-manager/sql/2023-02-01-preview/jobversions/client.go @@ -15,7 +15,7 @@ type JobVersionsClient struct { } func NewJobVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobVersionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/id_job.go b/resource-manager/sql/2023-02-01-preview/jobversions/id_job.go index 403aeebc0a1..92c98eb09fb 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/id_job.go +++ b/resource-manager/sql/2023-02-01-preview/jobversions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/id_version.go b/resource-manager/sql/2023-02-01-preview/jobversions/id_version.go index 3c7270ed145..1977931b046 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/id_version.go +++ b/resource-manager/sql/2023-02-01-preview/jobversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/method_get.go b/resource-manager/sql/2023-02-01-preview/jobversions/method_get.go index 0b960bfccf8..02d5d8e4621 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/jobversions/method_get.go @@ -45,7 +45,6 @@ func (c JobVersionsClient) Get(ctx context.Context, id VersionId) (result GetOpe var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/jobversions/version.go b/resource-manager/sql/2023-02-01-preview/jobversions/version.go index 2264ed32fdc..4e7aaead2bc 100644 --- a/resource-manager/sql/2023-02-01-preview/jobversions/version.go +++ b/resource-manager/sql/2023-02-01-preview/jobversions/version.go @@ -1,12 +1,10 @@ package jobversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobversions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/README.md b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/README.md index 97a90d82e5f..0c557986cdd 100644 --- a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads` Documentation -The `ledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `ledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/client.go b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/client.go index ce01a3f7d58..db269c39127 100644 --- a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type LedgerDigestUploadsClient struct { } func NewLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*LedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/method_get.go b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/method_get.go index ebf59affd70..33176ebdcbe 100644 --- a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c LedgerDigestUploadsClient) Get(ctx context.Context, id commonids.SqlData var model LedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/version.go b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/version.go index 942528fc70e..adc560f57aa 100644 --- a/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-02-01-preview/ledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package ledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ledgerdigestuploads/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/locationcapabilities/README.md b/resource-manager/sql/2023-02-01-preview/locationcapabilities/README.md index 2ee4fa7469e..772c2eb623e 100644 --- a/resource-manager/sql/2023-02-01-preview/locationcapabilities/README.md +++ b/resource-manager/sql/2023-02-01-preview/locationcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/locationcapabilities` Documentation -The `locationcapabilities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `locationcapabilities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/locationcapabilities/client.go b/resource-manager/sql/2023-02-01-preview/locationcapabilities/client.go index a1b9199a3ec..4b3add57b3b 100644 --- a/resource-manager/sql/2023-02-01-preview/locationcapabilities/client.go +++ b/resource-manager/sql/2023-02-01-preview/locationcapabilities/client.go @@ -15,7 +15,7 @@ type LocationCapabilitiesClient struct { } func NewLocationCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationCapabilitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/locationcapabilities/id_location.go b/resource-manager/sql/2023-02-01-preview/locationcapabilities/id_location.go index facea6d6858..ab6f98bdf2d 100644 --- a/resource-manager/sql/2023-02-01-preview/locationcapabilities/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/locationcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/locationcapabilities/method_capabilitieslistbylocation.go b/resource-manager/sql/2023-02-01-preview/locationcapabilities/method_capabilitieslistbylocation.go index f5e8ce02a3f..1b60f18f5fd 100644 --- a/resource-manager/sql/2023-02-01-preview/locationcapabilities/method_capabilitieslistbylocation.go +++ b/resource-manager/sql/2023-02-01-preview/locationcapabilities/method_capabilitieslistbylocation.go @@ -34,6 +34,7 @@ func (o CapabilitiesListByLocationOperationOptions) ToHeaders() *client.Headers func (o CapabilitiesListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocationCapabilitiesClient) CapabilitiesListByLocation(ctx context.Conte var model LocationCapabilities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/locationcapabilities/version.go b/resource-manager/sql/2023-02-01-preview/locationcapabilities/version.go index 44d08664538..f8ccad15005 100644 --- a/resource-manager/sql/2023-02-01-preview/locationcapabilities/version.go +++ b/resource-manager/sql/2023-02-01-preview/locationcapabilities/version.go @@ -1,12 +1,10 @@ package locationcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationcapabilities/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/README.md b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/README.md index 02ea0fecc54..e2517e62632 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/README.md +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionbackups` Documentation -The `longtermretentionbackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `longtermretentionbackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/client.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/client.go index ca539fe3462..9e4e155a0b4 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/client.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionBackupsClient struct { } func NewLongTermRetentionBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionbackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionbackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_location.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_location.go index df7cbed6823..4f731d61589 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go index dd8495a4805..8cb3eeaca3f 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionServerID(input string) (*LocationLongTermRete } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionServerIDInsensitively(input string) (*Locatio } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go index 249bf4b8d11..7018d094888 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseID(input strin } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseIDInsensitivel } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionbackup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionbackup.go index 6c6cbacc89a..a374cf4d95c 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionbackup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionbackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionBackupID(input string) (*LongTermRetentionBackupId, e } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionBackupIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go index 5097a9b5051..0b0b67bfb76 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupID(input string) (*Lon } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupIDInsensitively(input } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserver.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserver.go index 9614c230220..8aa280c8870 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserver.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserver.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionServerID(input string) (*LongTermRetentionServerId, e } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionServerIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go index 791b09f3625..a4220eb045c 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseID(input string) (*Lon } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseIDInsensitively(input } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_providerlocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_providerlocation.go index b6c17d78354..4102db32a09 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_providerlocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_get.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_get.go index 83e457e6b63..280c8df487d 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) Get(ctx context.Context, id LongTermRete var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_getbyresourcegroup.go index 57ed68a3bb1..22cd05eceda 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbydatabase.go index ebed5c50c8d..7405e8c77cb 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbylocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbylocation.go index 06dc3b458b7..31449bbc121 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbylocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go index d6f15b72a9b..7daf1b2ca94 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go index abdb9a9701e..576995f4a18 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go index 75e7eb7fb92..26fc8480b23 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupServerOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyserver.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyserver.go index 62fdc0efc10..cbc1d3dea3e 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyserver.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/version.go b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/version.go index cb602601a65..ba266e47411 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/version.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionbackups/version.go @@ -1,12 +1,10 @@ package longtermretentionbackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionbackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionbackups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/README.md b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/README.md index 2ef7fc3be0b..5e16235657f 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/README.md +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups` Documentation -The `longtermretentionmanagedinstancebackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `longtermretentionmanagedinstancebackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/client.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/client.go index 6a32ed2cc3d..c760d7410d6 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/client.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionManagedInstanceBackupsClient struct { } func NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionManagedInstanceBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionManagedInstanceBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_location.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_location.go index 76aca04c642..688972876c3 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go index 4cd0105b5a5..f83052eb802 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionManagedInstanceID(input string) (*LocationLon } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionManagedInstanceIDInsensitively(input string) } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go index acd36dc0106..2f2a7a512ca 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionDatabaseID(input string) (*LongTermRetentionDatabaseI } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionDatabaseIDInsensitively(input string) (*LongTermReten } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go index 03694cb1e88..a30394c2312 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupID(inpu } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupIDInsen } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go index 1c25962cb70..5e208b12a7a 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionManagedInstanceID(input string) (*LongTermRetentionMa } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionManagedInstanceIDInsensitively(input string) (*LongTe } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go index ffc4b70b6e0..cf4522057fb 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceBackupID(input string) (*LongTermReten } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceBackupIDInsensitively(input string) (* } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go index 3c8e12e6554..89cd3acb4b6 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseID(input stri } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseIDInsensitive } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go index c0e83746fc2..628ce0b4457 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_get.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_get.go index e303ce4c680..52afb6a0447 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go index 15a359e9eb0..b3da83c7539 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx co var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go index 15551674f0e..ffe527054b7 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go index 846cb7d2c45..ee445c5bb99 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go index 0eee092e272..8c69f35dd91 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go index 50e36859a1c..630b3198164 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go index c596e6dc4a1..f0c0bf40d7d 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupInstanceOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go index fb6b8093e64..f0fe94a3107 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/version.go b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/version.go index 36e959e3907..87aa77fc359 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/version.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionmanagedinstancebackups/version.go @@ -1,12 +1,10 @@ package longtermretentionmanagedinstancebackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md index 96dd098437a..d6c8494b06a 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies` Documentation -The `longtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `longtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go index 04222fc512a..6cb0156b421 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type LongTermRetentionPoliciesClient struct { } func NewLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go index db0dc3527df..094e02d9471 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c LongTermRetentionPoliciesClient) Get(ctx context.Context, id commonids.S var model LongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go index cc40a438b23..df269606acf 100644 --- a/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/longtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package longtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/README.md b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/README.md index 471d2c35845..74793546ea3 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/README.md +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions` Documentation -The `maintenancewindowoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `maintenancewindowoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/client.go b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/client.go index 1a71a222784..48e61cf6a23 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/client.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowOptionsClient struct { } func NewMaintenanceWindowOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/method_get.go b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/method_get.go index 8df35ad865e..9070bdecbc9 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowOptionsClient) Get(ctx context.Context, id commonids.Sq var model MaintenanceWindowOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/version.go b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/version.go index d9630a2a5c6..f3a2bd8ddbb 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/version.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindowoptions/version.go @@ -1,12 +1,10 @@ package maintenancewindowoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindowoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindowoptions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindows/README.md b/resource-manager/sql/2023-02-01-preview/maintenancewindows/README.md index fe8370092c6..f6d6f3e299a 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindows/README.md +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/maintenancewindows` Documentation -The `maintenancewindows` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `maintenancewindows` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindows/client.go b/resource-manager/sql/2023-02-01-preview/maintenancewindows/client.go index 0cefd568fde..ea7db39e0d7 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindows/client.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindows/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowsClient struct { } func NewMaintenanceWindowsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_createorupdate.go index d5b61f30d78..2bc30cada7d 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_get.go b/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_get.go index 2358566ed8e..e8b85a9a880 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindows/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowsClient) Get(ctx context.Context, id commonids.SqlDatab var model MaintenanceWindows result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/maintenancewindows/version.go b/resource-manager/sql/2023-02-01-preview/maintenancewindows/version.go index e5fa0e0f00e..0e0e6027768 100644 --- a/resource-manager/sql/2023-02-01-preview/maintenancewindows/version.go +++ b/resource-manager/sql/2023-02-01-preview/maintenancewindows/version.go @@ -1,12 +1,10 @@ package maintenancewindows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindows/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/README.md index 0f3d277ce75..6892dbbe080 100644 --- a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies` Documentation -The `managedbackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedbackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/client.go index d012d8b6e32..ded8568660a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedBackupShortTermRetentionPoliciesClient struct { } func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/method_get.go index 1c274cb2a2b..e79878dc564 100644 --- a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/version.go index 27291a105ec..89f64554a9b 100644 --- a/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedbackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedbackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md index 80a7a0ce00d..26323c836ff 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings` Documentation -The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go index 796b673c011..41a8c523116 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseAdvancedThreatProtectionSettingsClient struct { } func NewManagedDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go index a8bf22cc47f..3b9adb2f117 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ct var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go index d2bc6f2ad68..4bcb6059d45 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go index ecda43ef374..6f1c0ce4687 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package manageddatabaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/README.md index 1d3d6234f64..ba7858c8b65 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns` Documentation -The `manageddatabasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/client.go index f2f48f3c0b0..6fdc391a24c 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseColumnsClient struct { } func NewManagedDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_schematable.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_schematable.go index e9152ed4b57..94a2d1ca52a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_schematable.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_tablecolumn.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_tablecolumn.go index fc1b5a96046..d13f10399e9 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_tablecolumn.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_get.go index 225de841e2c..1e2e25f1994 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseColumnsClient) Get(ctx context.Context, id TableColumnId) var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbydatabase.go index 8f9d739806f..2620f38e1cc 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbytable.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbytable.go index 1223cbbe5af..d8d08906955 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/version.go index ff6e5a10285..882c216a51a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasecolumns/version.go @@ -1,12 +1,10 @@ package manageddatabasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasecolumns/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/README.md index 33124a5ce8f..3671b164b56 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations` Documentation -The `manageddatabasemoveoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasemoveoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/client.go index fe178068f70..b92d919387d 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseMoveOperationsClient struct { } func NewManagedDatabaseMoveOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseMoveOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseMoveOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/id_providerlocation.go b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/id_providerlocation.go index f5b30dde23d..50dd10980e5 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/id_providerlocation.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/method_listbylocation.go b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/method_listbylocation.go index d154d5af320..658e4700de9 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/method_listbylocation.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/version.go index e5bb8946c31..cf5472983c9 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasemoveoperations/version.go @@ -1,12 +1,10 @@ package manageddatabasemoveoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasemoveoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasemoveoperations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/README.md index b36aa28becf..866507b8159 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasequeries` Documentation -The `manageddatabasequeries` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasequeries` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/client.go index 9c0de435452..02f2d413407 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseQueriesClient struct { } func NewManagedDatabaseQueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseQueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasequeries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasequeries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseQueriesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/id_query.go b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/id_query.go index e3aab1ce4b6..19c59b04f5f 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/id_query.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/id_query.go @@ -46,7 +46,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_get.go index 99fb027a263..22ceda6679a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseQueriesClient) Get(ctx context.Context, id QueryId) (resu var model ManagedInstanceQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_listbyquery.go b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_listbyquery.go index e0e521010a7..9e1b714038e 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_listbyquery.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/method_listbyquery.go @@ -41,6 +41,7 @@ func (o ListByQueryOperationOptions) ToHeaders() *client.Headers { func (o ListByQueryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/version.go index 9c942e09112..c5ed3671380 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasequeries/version.go @@ -1,12 +1,10 @@ package manageddatabasequeries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasequeries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasequeries/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/README.md index cb131189a47..9f0813830c6 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails` Documentation -The `manageddatabaserestoredetails` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabaserestoredetails` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/client.go index d1f42caae83..27cf405d0b9 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseRestoreDetailsClient struct { } func NewManagedDatabaseRestoreDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseRestoreDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseRestoreDetailsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/method_get.go index dce02c891b8..c20a048d179 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, id commoni var model ManagedDatabaseRestoreDetailsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/version.go index 0b9b02da9f6..d2f81029861 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaserestoredetails/version.go @@ -1,12 +1,10 @@ package manageddatabaserestoredetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaserestoredetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaserestoredetails/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabases/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabases/README.md index e5e9803804e..7ff1d2887b2 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabases/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabases` Documentation -The `manageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabases/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabases/client.go index d7286c73b10..ba3a6da68af 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabases/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabases/client.go @@ -15,7 +15,7 @@ type ManagedDatabasesClient struct { } func NewManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabases/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabases/method_get.go index d04774f62a4..66605aa1097 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabases/method_get.go @@ -46,7 +46,6 @@ func (c ManagedDatabasesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabases/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabases/version.go index c3b65683a99..a0ed7603c45 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabases/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabases/version.go @@ -1,12 +1,10 @@ package manageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/README.md index f03899eff25..8a824cded45 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas` Documentation -The `manageddatabaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/client.go index b06ead3a626..85abf3277a7 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSchemasClient struct { } func NewManagedDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/id_databaseschema.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/id_databaseschema.go index 44f17647870..c65b1f99ec7 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/id_databaseschema.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_get.go index de00813d029..078bf701b38 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSchemasClient) Get(ctx context.Context, id DatabaseSchema var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_listbydatabase.go index 1e9c1d82bec..abc663abef3 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/version.go index 1f9e0aebb45..8252224a6dd 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabaseschemas/version.go @@ -1,12 +1,10 @@ package manageddatabaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseschemas/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/README.md index 345c2b157c7..e9bd014c329 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies` Documentation -The `manageddatabasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/client.go index dd99d94d57a..39ea31e3f4d 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityAlertPoliciesClient struct { } func NewManagedDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go index e6d916c439c..242c1898286 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.C var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_get.go index 86cc6d16699..edb0bda0d9f 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/version.go index b46861109a3..24ad514b1c4 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/README.md index 01f325b5e24..df2044deff5 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents` Documentation -The `manageddatabasesecurityevents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasesecurityevents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/client.go index 75a993c8838..1f36e33d9ac 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityEventsClient struct { } func NewManagedDatabaseSecurityEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityEventsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/method_listbydatabase.go index e65ae036286..97e4318326e 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/method_listbydatabase.go @@ -42,6 +42,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/version.go index 8f2eb536dbd..4cbfa039bf0 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesecurityevents/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityevents/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/README.md index 37b917a5ce9..b8e758012ea 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels` Documentation -The `manageddatabasesensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasesensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/client.go index b19840e9433..5f1ce307e35 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSensitivityLabelsClient struct { } func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go index afd25fa75f3..75e9d7b91bf 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSensitivityLabelSourceID(input string) (*SensitivityLa } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSensitivityLabelSourceIDInsensitively(input string) (* } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go index e0a35c17c19..7cf497ad34a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go index b2aab8c20f0..9cbc8f10e77 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Conte var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_get.go index 62d197105f0..1fd0579b104 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, id Sens var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go index fe2c0337ad5..b1519531487 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go index 103ca96f4ff..5dd91867ecc 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go index 912989aa100..43c4c7959b5 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/version.go index c00c89e4570..9629bb904e6 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasesensitivitylabels/version.go @@ -1,12 +1,10 @@ package manageddatabasesensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/README.md index ed2a6077c95..60ffe1b2fc8 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasetables` Documentation -The `manageddatabasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/client.go index f594505d94c..96587bb312b 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTablesClient struct { } func NewManagedDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_databaseschema.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_databaseschema.go index 7e496fb806a..8a5db7ce72a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_databaseschema.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_schematable.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_schematable.go index 423679d2c00..de0cd4c9907 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_schematable.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_get.go index 2c93261aa97..02d4e056c9d 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseTablesClient) Get(ctx context.Context, id SchemaTableId) var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_listbyschema.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_listbyschema.go index acd107e0eb0..257f3642fc0 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/version.go index 5270bf357b3..948ea5bc31f 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetables/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetables/version.go @@ -1,12 +1,10 @@ package manageddatabasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetables/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/README.md index 1e302e49590..5633e5175d8 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption` Documentation -The `manageddatabasetransparentdataencryption` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasetransparentdataencryption` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/client.go index 52d7ec6aa01..31ad96ae97b 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTransparentDataEncryptionClient struct { } func NewManagedDatabaseTransparentDataEncryptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTransparentDataEncryptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTransparentDataEncryptionClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go index 57b03fdf08b..60b433a559a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx conte var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_get.go index 76731f636b3..b404946cca2 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/version.go index a950155aca4..56ccdb85ddd 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasetransparentdataencryption/version.go @@ -1,12 +1,10 @@ package manageddatabasetransparentdataencryption -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md index 4c2f536deda..6a921a84d6a 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines` Documentation -The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go index 87a86d15ad1..8868cfd2b70 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go index 08d6e69117d..7f724f5f81c 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go @@ -48,7 +48,7 @@ func ParseBaselineBaselineID(input string) (*BaselineBaselineId, error) { } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineBaselineIDInsensitively(input string) (*BaselineBaselineId, er } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go index a7941a7cfe7..699b0560bb2 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdat var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go index 70f240cd6b1..de5a6f52a37 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx conte var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go index 406b1fa5bb6..bde50e3db9b 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/README.md index 0e43edaa041..089f8b5ec00 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments` Documentation -The `manageddatabasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/client.go index fecb266d1ec..5b498f34f62 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentsClient struct { } func NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go index 3edff16afcb..62d505f7a76 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_get.go index 1245ed42e37..d3c051996fa 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/version.go index 28898a05b52..a716a23a41c 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/README.md index c133111d594..f97ce65801e 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans` Documentation -The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/client.go index 321e4c03318..95d6cefb6bf 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentScansClient struct { } func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go index e05b6860c17..f72161ceaa4 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) (*V } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(inpu } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go index 72012d8a05d..c8fef962b10 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Co var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go index d40c91b98dc..4de075471df 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Conte var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/version.go index c12827df8f5..1d0cdf9b17d 100644 --- a/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-02-01-preview/manageddatabasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/README.md index e55b8a95b52..bf4d0ce2966 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators` Documentation -The `managedinstanceadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/client.go index 3f7e77dcf0f..a7a2aabd80b 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdministratorsClient struct { } func NewManagedInstanceAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/method_get.go index 471776e28e8..c4397fcdc5d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdministratorsClient) Get(ctx context.Context, id commoni var model ManagedInstanceAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/version.go index 1fde4b7a01b..c7cc229d7e2 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadministrators/version.go @@ -1,12 +1,10 @@ package managedinstanceadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadministrators/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md index c09bd9bcbf7..477c681a32d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings` Documentation -The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go index e853dabe68f..6d5512300a2 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdvancedThreatProtectionSettingsClient struct { } func NewManagedInstanceAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go index 14ef4ffd22a..fc9c442e4b6 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedInstanceAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go index 694ed552089..20871e493af 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package managedinstanceadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/README.md index 7eed9c4d704..3d392f08811 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications` Documentation -The `managedinstanceazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/client.go index 75cbb0831fd..b6f667aa0f1 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAzureADOnlyAuthenticationsClient struct { } func NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/method_get.go index ad7d02117cc..5b42ddb7ce2 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context var model ManagedInstanceAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/version.go index f0243e7d1a9..aa36f9a0bb6 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package managedinstanceazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/README.md b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/README.md index 795317d3d91..2331075cc6d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstancedtcs` Documentation -The `managedinstancedtcs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstancedtcs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/client.go b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/client.go index 5acfb8501a5..4fba23c94a4 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/client.go @@ -15,7 +15,7 @@ type ManagedInstanceDtcsClient struct { } func NewManagedInstanceDtcsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceDtcsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancedtcs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancedtcs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceDtcsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/method_get.go index aa3f960f289..39f964596b4 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceDtcsClient) Get(ctx context.Context, id commonids.SqlMana var model ManagedInstanceDtc result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/version.go b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/version.go index cc5f4dc1c16..6747700134a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancedtcs/version.go @@ -1,12 +1,10 @@ package managedinstancedtcs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancedtcs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancedtcs/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/README.md index 9efce150139..affe82bba72 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors` Documentation -The `managedinstanceencryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceencryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/client.go index 3688e97050c..37d9140cc63 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/client.go @@ -15,7 +15,7 @@ type ManagedInstanceEncryptionProtectorsClient struct { } func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceEncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceEncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/method_get.go index 067629deb84..d999fb817fd 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, id c var model ManagedInstanceEncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/version.go index dfba764cc91..11272122546 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceencryptionprotectors/version.go @@ -1,12 +1,10 @@ package managedinstanceencryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/README.md b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/README.md index cc674336bcf..01299d5791a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstancekeys` Documentation -The `managedinstancekeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstancekeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/client.go b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/client.go index 06797198c4d..10eda0b8020 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/client.go @@ -15,7 +15,7 @@ type ManagedInstanceKeysClient struct { } func NewManagedInstanceKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancekeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancekeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/id_managedinstancekey.go b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/id_managedinstancekey.go index 3636ab872d7..9d052c7a56f 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/id_managedinstancekey.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/id_managedinstancekey.go @@ -44,7 +44,7 @@ func ParseManagedInstanceKeyID(input string) (*ManagedInstanceKeyId, error) { } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceKeyIDInsensitively(input string) (*ManagedInstanceKeyId } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_get.go index c7d5ce953d0..a7b6c034e21 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstanceKeysClient) Get(ctx context.Context, id ManagedInstanceKe var model ManagedInstanceKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_listbyinstance.go b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_listbyinstance.go index 140196d0475..ccdcd5aba24 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_listbyinstance.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/version.go b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/version.go index 8135246c053..f2c9195c771 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancekeys/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancekeys/version.go @@ -1,12 +1,10 @@ package managedinstancekeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancekeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancekeys/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/README.md index 2e25b9d5fa2..fc1b0150cd3 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies` Documentation -The `managedinstancelongtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstancelongtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/client.go index d86d5f1cb6d..ed08dffdc43 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedInstanceLongTermRetentionPoliciesClient struct { } func NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceLongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceLongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/method_get.go index 5d063142151..17bc6f25917 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/version.go index fe9800c4bfa..b6e90a6533a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancelongtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedinstancelongtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/README.md index 1a62ebbd5cd..fad7a4751e1 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceoperations` Documentation -The `managedinstanceoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/client.go index e948591d548..8ae66bef970 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/client.go @@ -15,7 +15,7 @@ type ManagedInstanceOperationsClient struct { } func NewManagedInstanceOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/version.go index 3b48e549765..85383f91800 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceoperations/version.go @@ -1,12 +1,10 @@ package managedinstanceoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceoperations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/README.md index 4474ebe08a8..c6b98ef7109 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections` Documentation -The `managedinstanceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/client.go index 7ae7f20f3fc..b52a5ea4cf4 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateEndpointConnectionsClient struct { } func NewManagedInstancePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go index cb946939c3a..c3a42d71d8f 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateEndpointConnectionID(input string) (*ManagedInst } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateEndpointConnectionIDInsensitively(input string) } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/method_get.go index 938c6671e7a..8de7930b31b 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context var model ManagedInstancePrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/version.go index fb3eef6f8d7..0d4d7aa6d75 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package managedinstanceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/README.md b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/README.md index 0722738e837..8c83bbd8a77 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources` Documentation -The `managedinstanceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstanceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/client.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/client.go index d894f68b99c..baa13de3973 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateLinkResourcesClient struct { } func NewManagedInstancePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go index 5f39126e8b7..4529dc63628 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateLinkResourceID(input string) (*ManagedInstancePr } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateLinkResourceIDInsensitively(input string) (*Mana } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/method_get.go index 5cb364c9b70..0bfbfeddc21 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, id M var model ManagedInstancePrivateLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/version.go b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/version.go index e31f518ce01..ecd9a782b60 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstanceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package managedinstanceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/README.md b/resource-manager/sql/2023-02-01-preview/managedinstances/README.md index f30ee42d9d0..f8a898d8167 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstances` Documentation -The `managedinstances` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstances` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/client.go b/resource-manager/sql/2023-02-01-preview/managedinstances/client.go index 0618c7ec8de..e894127c1fa 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/client.go @@ -15,7 +15,7 @@ type ManagedInstancesClient struct { } func NewManagedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/id_instancepool.go b/resource-manager/sql/2023-02-01-preview/managedinstances/id_instancepool.go index c4d1f83519f..31548eb6532 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/id_instancepool.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_failover.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_failover.go index 6a09e24ad41..d4650489f17 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_failover.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_get.go index 2c318ce242d..21e7a5561c7 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedInstancesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_list.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_list.go index 55f688b91ac..685fc7f9a70 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_list.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyinstancepool.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyinstancepool.go index f98c7ba2901..8ff253cace4 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbymanagedinstance.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbymanagedinstance.go index 8a7c6f76675..61e9c8e3192 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbymanagedinstance.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbymanagedinstance.go @@ -46,6 +46,7 @@ func (o ListByManagedInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByManagedInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyresourcegroup.go b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyresourcegroup.go index 0a8a15041c2..adbecb68c73 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstances/version.go b/resource-manager/sql/2023-02-01-preview/managedinstances/version.go index 6cd1e988f40..d2b1dcd8310 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstances/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstances/version.go @@ -1,12 +1,10 @@ package managedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstances/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/README.md b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/README.md index dd38550bc1a..da5a811197a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates` Documentation -The `managedinstancetdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstancetdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/client.go b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/client.go index 0172abf1626..6dcfb8c143a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/client.go @@ -15,7 +15,7 @@ type ManagedInstanceTdeCertificatesClient struct { } func NewManagedInstanceTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceTdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceTdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/version.go b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/version.go index 71847e26bb6..2ce7666c724 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancetdecertificates/version.go @@ -1,12 +1,10 @@ package managedinstancetdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancetdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancetdecertificates/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/README.md b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/README.md index 7b9732d35ce..adfcd11b9b9 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments` Documentation -The `managedinstancevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedinstancevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/client.go b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/client.go index 9b83141b5c6..3caaad8212d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedInstanceVulnerabilityAssessmentsClient struct { } func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go index eee4d2c4318..e99b5bc3559 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_get.go index d5735bb6e64..cf558597025 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/version.go b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/version.go index 8e46ed592bb..60024b45a7a 100644 --- a/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedinstancevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package managedinstancevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/README.md b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/README.md index 6f565d47ce5..93783eb2ba9 100644 --- a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads` Documentation -The `managedledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/client.go b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/client.go index d4a7d55ccaa..06b0ada5f1e 100644 --- a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type ManagedLedgerDigestUploadsClient struct { } func NewManagedLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedLedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedLedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/method_get.go b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/method_get.go index 6b801615073..e244cc479e9 100644 --- a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c ManagedLedgerDigestUploadsClient) Get(ctx context.Context, id commonids. var model ManagedLedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/version.go b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/version.go index 774f95f697e..4e6993d99b8 100644 --- a/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package managedledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedledgerdigestuploads/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md index d2785d1ba09..5b04b74badf 100644 --- a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies` Documentation -The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go index 7f408f7e72e..4d3926b2444 100644 --- a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient stru } func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go index e6d2dafdce3..ec3180f3c8d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go index 45d81e6d799..658ba4e5f1d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go index bf8435c8283..4afdc8d8f28 100644 --- a/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedrestorabledroppeddatabasebackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/README.md b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/README.md index 51f1e76a219..24ebff65a95 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases` Documentation -The `managedserverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedserverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/client.go b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/client.go index 1004c3cff20..bbb095b5022 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/client.go @@ -15,7 +15,7 @@ type ManagedServerDnsAliasesClient struct { } func NewManagedServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go index 5c1939bd9f3..2bafc3faf2d 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go +++ b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go @@ -44,7 +44,7 @@ func ParseManagedInstanceDnsAliasID(input string) (*ManagedInstanceDnsAliasId, e } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceDnsAliasIDInsensitively(input string) (*ManagedInstance } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/method_get.go b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/method_get.go index 50d39da3459..6d08e132028 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ManagedServerDnsAliasesClient) Get(ctx context.Context, id ManagedInstan var model ManagedServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/version.go b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/version.go index fbceb1f5a40..2149b33126b 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedserverdnsaliases/version.go @@ -1,12 +1,10 @@ package managedserverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserverdnsaliases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/README.md b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/README.md index 6b639148974..2027ca4c62c 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies` Documentation -The `managedserversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `managedserversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/client.go b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/client.go index 9c1b65773ae..96e6a83b8ad 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedServerSecurityAlertPoliciesClient struct { } func NewManagedServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/method_get.go index fb823b52041..5e927a5ac66 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, id co var model ManagedServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/version.go b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/version.go index 3f56a8924ac..7d8267f40b5 100644 --- a/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/managedserversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package managedserversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserversecurityalertpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/README.md b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/README.md index 0e5e35adc22..540fd4ac9b7 100644 --- a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/README.md +++ b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations` Documentation -The `networksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `networksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/client.go b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/client.go index d5d36bae265..20530b9e06a 100644 --- a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/client.go +++ b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterConfigurationsClient struct { } func NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index 6b2bec05bbc..48cb9dd9673 100644 --- a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/method_get.go b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/method_get.go index 812efe32b5d..ff7885e0a3d 100644 --- a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, i var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/version.go b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/version.go index cea4d3f9056..6a5ec51d9b8 100644 --- a/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/version.go +++ b/resource-manager/sql/2023-02-01-preview/networksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package networksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/README.md b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/README.md index f47c36a23a2..9e38aa124c5 100644 --- a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/README.md +++ b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/outboundfirewallrules` Documentation -The `outboundfirewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `outboundfirewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/client.go b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/client.go index 785040374ca..da90d0a7fa0 100644 --- a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/client.go +++ b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/client.go @@ -15,7 +15,7 @@ type OutboundFirewallRulesClient struct { } func NewOutboundFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundFirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundfirewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundfirewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundFirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/id_outboundfirewallrule.go b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/id_outboundfirewallrule.go index 98acb0e9aa7..5eb4a5c35c0 100644 --- a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/id_outboundfirewallrule.go +++ b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/id_outboundfirewallrule.go @@ -44,7 +44,7 @@ func ParseOutboundFirewallRuleID(input string) (*OutboundFirewallRuleId, error) } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundFirewallRuleIDInsensitively(input string) (*OutboundFirewallRu } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/method_get.go b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/method_get.go index beb1537e220..13c62b7ab15 100644 --- a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/method_get.go @@ -45,7 +45,6 @@ func (c OutboundFirewallRulesClient) Get(ctx context.Context, id OutboundFirewal var model OutboundFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/version.go b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/version.go index f2dec85be3e..f7381a51100 100644 --- a/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/version.go +++ b/resource-manager/sql/2023-02-01-preview/outboundfirewallrules/version.go @@ -1,12 +1,10 @@ package outboundfirewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundfirewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundfirewallrules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/README.md b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/README.md index b80fc353e82..7f605ab1d7a 100644 --- a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/README.md +++ b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/client.go b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/client.go +++ b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/id_privateendpointconnection.go index 3012f48f358..8300705f772 100644 --- a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/method_get.go b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/version.go b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/version.go index 3dc6c194643..36305ef8746 100644 --- a/resource-manager/sql/2023-02-01-preview/privateendpointconnections/version.go +++ b/resource-manager/sql/2023-02-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/privatelinkresources/README.md b/resource-manager/sql/2023-02-01-preview/privatelinkresources/README.md index 3e0a25185c7..2417acceda0 100644 --- a/resource-manager/sql/2023-02-01-preview/privatelinkresources/README.md +++ b/resource-manager/sql/2023-02-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/privatelinkresources/client.go b/resource-manager/sql/2023-02-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/sql/2023-02-01-preview/privatelinkresources/client.go +++ b/resource-manager/sql/2023-02-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/sql/2023-02-01-preview/privatelinkresources/id_privatelinkresource.go index 84686616386..ab4bd9a4dea 100644 --- a/resource-manager/sql/2023-02-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/sql/2023-02-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/privatelinkresources/method_get.go b/resource-manager/sql/2023-02-01-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/sql/2023-02-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/privatelinkresources/version.go b/resource-manager/sql/2023-02-01-preview/privatelinkresources/version.go index da7839ba765..91e6ed1519f 100644 --- a/resource-manager/sql/2023-02-01-preview/privatelinkresources/version.go +++ b/resource-manager/sql/2023-02-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/README.md b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/README.md index 17a42a16994..78231553a6d 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/README.md +++ b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/recoverabledatabases` Documentation -The `recoverabledatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `recoverabledatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/client.go b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/client.go index 7642bb32d16..80982a3b14c 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/client.go +++ b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/client.go @@ -15,7 +15,7 @@ type RecoverableDatabasesClient struct { } func NewRecoverableDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverabledatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverabledatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/id_recoverabledatabase.go b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/id_recoverabledatabase.go index bcdf9b88566..e32ba686d9b 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/id_recoverabledatabase.go +++ b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/id_recoverabledatabase.go @@ -44,7 +44,7 @@ func ParseRecoverableDatabaseID(input string) (*RecoverableDatabaseId, error) { } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRecoverableDatabaseIDInsensitively(input string) (*RecoverableDatabase } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/method_get.go b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/method_get.go index f1d18340b68..2d9eda80b4d 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecoverableDatabasesClient) Get(ctx context.Context, id RecoverableDatab var model RecoverableDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/version.go b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/version.go index 9020f1b64e1..c177861b28c 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverabledatabases/version.go +++ b/resource-manager/sql/2023-02-01-preview/recoverabledatabases/version.go @@ -1,12 +1,10 @@ package recoverabledatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverabledatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverabledatabases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/README.md b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/README.md index e51b28057f6..c30a443dc28 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/README.md +++ b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases` Documentation -The `recoverablemanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `recoverablemanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/client.go b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/client.go index f1ddf2d8929..62ff80d8685 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/client.go +++ b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/client.go @@ -15,7 +15,7 @@ type RecoverableManagedDatabasesClient struct { } func NewRecoverableManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go index 16e8e534478..9d703a5f285 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go +++ b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRecoverableDatabaseID(input string) (*ManagedInstanceRe } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRecoverableDatabaseIDInsensitively(input string) (*Mana } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/method_get.go b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/method_get.go index 195ef17cd06..4a358c3509a 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RecoverableManagedDatabasesClient) Get(ctx context.Context, id ManagedIn var model RecoverableManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/version.go b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/version.go index 2ab74b8afcb..6910cc93e35 100644 --- a/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/version.go +++ b/resource-manager/sql/2023-02-01-preview/recoverablemanageddatabases/version.go @@ -1,12 +1,10 @@ package recoverablemanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverablemanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverablemanageddatabases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md b/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md index b5f3494b2dd..4890af4c9f5 100644 --- a/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md +++ b/resource-manager/sql/2023-02-01-preview/replicationlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/replicationlinks` Documentation -The `replicationlinks` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `replicationlinks` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go b/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go index e250a69e9a9..3b6d95b1729 100644 --- a/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go +++ b/resource-manager/sql/2023-02-01-preview/replicationlinks/client.go @@ -15,7 +15,7 @@ type ReplicationLinksClient struct { } func NewReplicationLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLinksClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go b/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go index 2875766d6b9..ef00cbf2388 100644 --- a/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go +++ b/resource-manager/sql/2023-02-01-preview/replicationlinks/id_replicationlink.go @@ -46,7 +46,7 @@ func ParseReplicationLinkID(input string) (*ReplicationLinkId, error) { } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, erro } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go b/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go index ed216d10173..640a612f108 100644 --- a/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/replicationlinks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLinksClient) Get(ctx context.Context, id ReplicationLinkId) ( var model ReplicationLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go b/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go index a0ea11787b5..0956e436579 100644 --- a/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go +++ b/resource-manager/sql/2023-02-01-preview/replicationlinks/version.go @@ -1,12 +1,10 @@ package replicationlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlinks/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md index 2c8324300a7..84db94e77f9 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases` Documentation -The `restorabledroppeddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `restorabledroppeddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go index f6cc9d16ce0..b005e027e5e 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedDatabasesClient struct { } func NewRestorableDroppedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go index c354a8d7d77..580ea286a65 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseRestorableDroppedDatabaseID(input string) (*RestorableDroppedDatabaseI } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorableDroppedDatabaseIDInsensitively(input string) (*RestorableDro } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go index 03d3fe22529..7327393e747 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorableDroppedDatabasesClient) Get(ctx context.Context, id Restorable var model RestorableDroppedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go index 1a7095dc360..5bea675676c 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppeddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppeddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppeddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppeddatabases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/README.md b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/README.md index 457d3185b7b..bb465a91c3f 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/README.md +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases` Documentation -The `restorabledroppedmanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `restorabledroppedmanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/client.go b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/client.go index f6ddeb790f3..3e9c9bd3617 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/client.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedManagedDatabasesClient struct { } func NewRestorableDroppedManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go index d540997446a..f274ef8ca18 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/method_get.go b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/method_get.go index ab1378426fd..7e520c5f8f6 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, id Man var model RestorableDroppedManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/version.go b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/version.go index ba0a40e0ccf..ea97a3d024d 100644 --- a/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/version.go +++ b/resource-manager/sql/2023-02-01-preview/restorabledroppedmanageddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppedmanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/restorepoints/README.md b/resource-manager/sql/2023-02-01-preview/restorepoints/README.md index 949be7718e1..ba9c1db09f7 100644 --- a/resource-manager/sql/2023-02-01-preview/restorepoints/README.md +++ b/resource-manager/sql/2023-02-01-preview/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/restorepoints/client.go b/resource-manager/sql/2023-02-01-preview/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/sql/2023-02-01-preview/restorepoints/client.go +++ b/resource-manager/sql/2023-02-01-preview/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/restorepoints/id_restorepoint.go b/resource-manager/sql/2023-02-01-preview/restorepoints/id_restorepoint.go index 0f855efd93d..5f80e22dbd6 100644 --- a/resource-manager/sql/2023-02-01-preview/restorepoints/id_restorepoint.go +++ b/resource-manager/sql/2023-02-01-preview/restorepoints/id_restorepoint.go @@ -46,7 +46,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/restorepoints/method_get.go b/resource-manager/sql/2023-02-01-preview/restorepoints/method_get.go index 957e733ed23..b3641545843 100644 --- a/resource-manager/sql/2023-02-01-preview/restorepoints/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/restorepoints/method_get.go @@ -45,7 +45,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId) (result var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/restorepoints/version.go b/resource-manager/sql/2023-02-01-preview/restorepoints/version.go index 561041b3d25..a2c38a3221b 100644 --- a/resource-manager/sql/2023-02-01-preview/restorepoints/version.go +++ b/resource-manager/sql/2023-02-01-preview/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/README.md b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/README.md index 21c6a2f9d0d..4ea9a16d76b 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/README.md +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sensitivitylabels` Documentation -The `sensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/client.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/client.go index b4f48c1b8f8..e5c16bac54c 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/client.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/client.go @@ -15,7 +15,7 @@ type SensitivityLabelsClient struct { } func NewSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*SensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_column.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_column.go index a7c5385a6d0..a91c35c47e9 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_column.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_sensitivitylabelsource.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_sensitivitylabelsource.go index b6c36f36f47..03310875a6a 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_sensitivitylabelsource.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/id_sensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSourceID(input string) (*SensitivityLabelSourceId, err } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSourceIDInsensitively(input string) (*SensitivityLabel } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_createorupdate.go index 8dbc9e733ca..5f894e78280 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, id ColumnId var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_get.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_get.go index d13e4b237b0..88bde8c3384 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c SensitivityLabelsClient) Get(ctx context.Context, id SensitivityLabelSou var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listbydatabase.go index 6f57eee31d4..661b362c83e 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listcurrentbydatabase.go index 73a615c88fa..b689585e559 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go index 2e9d85df880..ecaac2fad9f 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/version.go b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/version.go index 2bffb719e92..0ec85effad2 100644 --- a/resource-manager/sql/2023-02-01-preview/sensitivitylabels/version.go +++ b/resource-manager/sql/2023-02-01-preview/sensitivitylabels/version.go @@ -1,12 +1,10 @@ package sensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sensitivitylabels/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/README.md index 97d149ee56f..13dfd8823d6 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings` Documentation -The `serveradvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serveradvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/client.go index 0e98ea070f7..0d676922ffb 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ServerAdvancedThreatProtectionSettingsClient struct { } func NewServerAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/method_get.go index 54f89c7c6f8..acc2ff53f99 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, i var model ServerAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/version.go index c5f3c9b9d1b..ed004751f80 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package serveradvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/README.md b/resource-manager/sql/2023-02-01-preview/serveradvisors/README.md index cc4b2fbf431..62dadd9a8eb 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/README.md +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serveradvisors` Documentation -The `serveradvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serveradvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/client.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/client.go index 2eae0c06a2b..3933667d1fe 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/client.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/client.go @@ -15,7 +15,7 @@ type ServerAdvisorsClient struct { } func NewServerAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/id_advisor.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/id_advisor.go index 3b88efe407d..93527e7f54d 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/id_advisor.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_get.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_get.go index 7e374d14539..027a2dd784b 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_get.go @@ -45,7 +45,6 @@ func (c ServerAdvisorsClient) Get(ctx context.Context, id AdvisorId) (result Get var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_listbyserver.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_listbyserver.go index 0ab13d2757c..88ed4156027 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_listbyserver.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_listbyserver.go @@ -35,6 +35,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServerAdvisorsClient) ListByServer(ctx context.Context, id commonids.Sql var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_update.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_update.go index 6150d7053af..26eae2eb675 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/method_update.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/method_update.go @@ -49,7 +49,6 @@ func (c ServerAdvisorsClient) Update(ctx context.Context, id AdvisorId, input Ad var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serveradvisors/version.go b/resource-manager/sql/2023-02-01-preview/serveradvisors/version.go index 32ebaa1ed66..966eb93a845 100644 --- a/resource-manager/sql/2023-02-01-preview/serveradvisors/version.go +++ b/resource-manager/sql/2023-02-01-preview/serveradvisors/version.go @@ -1,12 +1,10 @@ package serveradvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvisors/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/README.md b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/README.md index afa40d61d2b..57740ea031e 100644 --- a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverautomatictuning` Documentation -The `serverautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/client.go b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/client.go index ec9f1bed0c9..2730beb5fc5 100644 --- a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/client.go @@ -15,7 +15,7 @@ type ServerAutomaticTuningClient struct { } func NewServerAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_get.go b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_get.go index 35f930c01d5..f33223e7cb8 100644 --- a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c ServerAutomaticTuningClient) Get(ctx context.Context, id commonids.SqlSe var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_update.go b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_update.go index a12ff98cb3b..7be0bdc82e9 100644 --- a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_update.go +++ b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c ServerAutomaticTuningClient) Update(ctx context.Context, id commonids.Sq var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/version.go b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/version.go index d1f20b50b81..db7d89e29a2 100644 --- a/resource-manager/sql/2023-02-01-preview/serverautomatictuning/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverautomatictuning/version.go @@ -1,12 +1,10 @@ package serverautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverautomatictuning/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md index 14f5b104fa5..c18c0eeb797 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadadministrators` Documentation -The `serverazureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverazureadadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go index f50b24e55ac..47d3cf27389 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/client.go @@ -15,7 +15,7 @@ type ServerAzureADAdministratorsClient struct { } func NewServerAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go index f0fcd511e04..98ead18b09a 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADAdministratorsClient) Get(ctx context.Context, id commonids var model ServerAzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go index 513beae11c2..35944640118 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadadministrators/version.go @@ -1,12 +1,10 @@ package serverazureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadadministrators/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md index b26883de887..8c86c3b64bf 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications` Documentation -The `serverazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go index 21c08da1953..14d36937a75 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ServerAzureADOnlyAuthenticationsClient struct { } func NewServerAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go index f254750271a..937c73a5697 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, id comm var model ServerAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go index bb17b896c46..8eeec6eb664 100644 --- a/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package serverazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadonlyauthentications/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/README.md b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/README.md index ce58116f33e..c4016ee3cfe 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions` Documentation -The `serverconfigurationoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverconfigurationoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/client.go b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/client.go index aa3c24cb9a6..18fdd2d4b4c 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/client.go @@ -15,7 +15,7 @@ type ServerConfigurationOptionsClient struct { } func NewServerConfigurationOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConfigurationOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConfigurationOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/method_get.go b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/method_get.go index 062acb8b40d..6ed76291506 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/method_get.go @@ -47,7 +47,6 @@ func (c ServerConfigurationOptionsClient) Get(ctx context.Context, id commonids. var model ServerConfigurationOption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/version.go b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/version.go index 26f9843a686..0642b443556 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverconfigurationoptions/version.go @@ -1,12 +1,10 @@ package serverconfigurationoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconfigurationoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconfigurationoptions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md index d98df9ef36f..e9258b96266 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies` Documentation -The `serverconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverconnectionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go index 15991ddbd85..a4b5aa95d54 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/client.go @@ -15,7 +15,7 @@ type ServerConnectionPoliciesClient struct { } func NewServerConnectionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConnectionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConnectionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go index afcb959ee65..48f33b38281 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerConnectionPoliciesClient) Get(ctx context.Context, id commonids.Sq var model ServerConnectionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go index 96bc34509bd..cfc50a69ce8 100644 --- a/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverconnectionpolicies/version.go @@ -1,12 +1,10 @@ package serverconnectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconnectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconnectionpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/README.md b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/README.md index 05d566077d7..d0a6202b553 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverdevopsaudit` Documentation -The `serverdevopsaudit` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverdevopsaudit` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/client.go b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/client.go index 535c6daec99..5e560080c0c 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/client.go @@ -15,7 +15,7 @@ type ServerDevOpsAuditClient struct { } func NewServerDevOpsAuditClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDevOpsAuditClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdevopsaudit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdevopsaudit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDevOpsAuditClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/method_settingsget.go b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/method_settingsget.go index 47e850924e2..6f6c514f848 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/method_settingsget.go +++ b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/method_settingsget.go @@ -47,7 +47,6 @@ func (c ServerDevOpsAuditClient) SettingsGet(ctx context.Context, id commonids.S var model ServerDevOpsAuditingSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/version.go b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/version.go index b62e826575b..5238ad29b23 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverdevopsaudit/version.go @@ -1,12 +1,10 @@ package serverdevopsaudit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdevopsaudit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdevopsaudit/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/README.md b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/README.md index 551aef2ca8c..2d919d5c74f 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverdnsaliases` Documentation -The `serverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/client.go b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/client.go index f8e554ac6f0..7f03630ea40 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/client.go @@ -15,7 +15,7 @@ type ServerDnsAliasesClient struct { } func NewServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/id_dnsalias.go b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/id_dnsalias.go index 89703b594cd..e0fad2f17cc 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/id_dnsalias.go +++ b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/id_dnsalias.go @@ -44,7 +44,7 @@ func ParseDnsAliasID(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsAliasIDInsensitively(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/method_get.go b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/method_get.go index 103cdf86db1..7c3666bd13e 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ServerDnsAliasesClient) Get(ctx context.Context, id DnsAliasId) (result var model ServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/version.go b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/version.go index e099a89dfee..5724d733c63 100644 --- a/resource-manager/sql/2023-02-01-preview/serverdnsaliases/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverdnsaliases/version.go @@ -1,12 +1,10 @@ package serverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdnsaliases/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverkeys/README.md b/resource-manager/sql/2023-02-01-preview/serverkeys/README.md index 2a812dff7ff..9516524620b 100644 --- a/resource-manager/sql/2023-02-01-preview/serverkeys/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverkeys` Documentation -The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverkeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverkeys/client.go b/resource-manager/sql/2023-02-01-preview/serverkeys/client.go index 83970b7eb35..0616b182cbb 100644 --- a/resource-manager/sql/2023-02-01-preview/serverkeys/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverkeys/client.go @@ -15,7 +15,7 @@ type ServerKeysClient struct { } func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverkeys/id_key.go b/resource-manager/sql/2023-02-01-preview/serverkeys/id_key.go index a6d8137a5d3..ee1d13f85a3 100644 --- a/resource-manager/sql/2023-02-01-preview/serverkeys/id_key.go +++ b/resource-manager/sql/2023-02-01-preview/serverkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/serverkeys/method_get.go b/resource-manager/sql/2023-02-01-preview/serverkeys/method_get.go index cdd81e30407..e6b4acc396a 100644 --- a/resource-manager/sql/2023-02-01-preview/serverkeys/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serverkeys/method_get.go @@ -45,7 +45,6 @@ func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperatio var model ServerKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serverkeys/version.go b/resource-manager/sql/2023-02-01-preview/serverkeys/version.go index ed234391bc9..86c54882e94 100644 --- a/resource-manager/sql/2023-02-01-preview/serverkeys/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverkeys/version.go @@ -1,12 +1,10 @@ package serverkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverkeys/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serveroperations/README.md b/resource-manager/sql/2023-02-01-preview/serveroperations/README.md index 6c20ba9b1c3..7fe05d4b1ca 100644 --- a/resource-manager/sql/2023-02-01-preview/serveroperations/README.md +++ b/resource-manager/sql/2023-02-01-preview/serveroperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serveroperations` Documentation -The `serveroperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serveroperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serveroperations/client.go b/resource-manager/sql/2023-02-01-preview/serveroperations/client.go index 315bd12ffac..52624fb5f18 100644 --- a/resource-manager/sql/2023-02-01-preview/serveroperations/client.go +++ b/resource-manager/sql/2023-02-01-preview/serveroperations/client.go @@ -15,7 +15,7 @@ type ServerOperationsClient struct { } func NewServerOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveroperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveroperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serveroperations/version.go b/resource-manager/sql/2023-02-01-preview/serveroperations/version.go index d05dbc8392e..e4ada288f84 100644 --- a/resource-manager/sql/2023-02-01-preview/serveroperations/version.go +++ b/resource-manager/sql/2023-02-01-preview/serveroperations/version.go @@ -1,12 +1,10 @@ package serveroperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveroperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveroperations/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/servers/README.md b/resource-manager/sql/2023-02-01-preview/servers/README.md index 5fa077033a2..d278499a91b 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/README.md +++ b/resource-manager/sql/2023-02-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/servers/client.go b/resource-manager/sql/2023-02-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/client.go +++ b/resource-manager/sql/2023-02-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go b/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go index 33491559bac..d4dc423607a 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go +++ b/resource-manager/sql/2023-02-01-preview/servers/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ServersClient) CheckNameAvailability(ctx context.Context, id commonids.S var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servers/method_get.go b/resource-manager/sql/2023-02-01-preview/servers/method_get.go index 9fa3523f482..186e44d6c15 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/servers/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServersClient) Get(ctx context.Context, id commonids.SqlServerId, option var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servers/method_list.go b/resource-manager/sql/2023-02-01-preview/servers/method_list.go index 0ce97ea8572..7c8dc454f0d 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/method_list.go +++ b/resource-manager/sql/2023-02-01-preview/servers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go b/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go index eb7122c8a0a..9ded1776fd1 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-02-01-preview/servers/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/servers/version.go b/resource-manager/sql/2023-02-01-preview/servers/version.go index 5af2cdb615b..a41f85283fb 100644 --- a/resource-manager/sql/2023-02-01-preview/servers/version.go +++ b/resource-manager/sql/2023-02-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md index 0f505cd6039..f866db760f3 100644 --- a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go index 52a7b24a5a4..b7f63c8bb22 100644 --- a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id commonids var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go index a3c4df0a365..c4033a5c44d 100644 --- a/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-02-01-preview/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/README.md b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/README.md index b611cd5ed5a..5155257241c 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/README.md +++ b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servertrustcertificates` Documentation -The `servertrustcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `servertrustcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/client.go b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/client.go index a6f3aa41b81..1754d2f466c 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/client.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/client.go @@ -15,7 +15,7 @@ type ServerTrustCertificatesClient struct { } func NewServerTrustCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/id_servertrustcertificate.go b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/id_servertrustcertificate.go index 79b3d450d55..89e8c0be6a6 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/id_servertrustcertificate.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/id_servertrustcertificate.go @@ -44,7 +44,7 @@ func ParseServerTrustCertificateID(input string) (*ServerTrustCertificateId, err } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustCertificateIDInsensitively(input string) (*ServerTrustCerti } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/method_get.go b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/method_get.go index d1820468f58..26bfaa5dde5 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustCertificatesClient) Get(ctx context.Context, id ServerTrustCe var model ServerTrustCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/version.go b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/version.go index e4f31c66a73..db47f8246a8 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustcertificates/version.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustcertificates/version.go @@ -1,12 +1,10 @@ package servertrustcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustcertificates/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/README.md b/resource-manager/sql/2023-02-01-preview/servertrustgroups/README.md index 6dab2bce372..6de02897504 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servertrustgroups` Documentation -The `servertrustgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `servertrustgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/client.go b/resource-manager/sql/2023-02-01-preview/servertrustgroups/client.go index ff26515db72..175c668a349 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/client.go @@ -15,7 +15,7 @@ type ServerTrustGroupsClient struct { } func NewServerTrustGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_providerlocation.go b/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_providerlocation.go index 77965206097..920204a1e73 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_providerlocation.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_servertrustgroup.go b/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_servertrustgroup.go index 6d354529645..8faafc4eb0e 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_servertrustgroup.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/id_servertrustgroup.go @@ -44,7 +44,7 @@ func ParseServerTrustGroupID(input string) (*ServerTrustGroupId, error) { } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustGroupIDInsensitively(input string) (*ServerTrustGroupId, er } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/method_get.go b/resource-manager/sql/2023-02-01-preview/servertrustgroups/method_get.go index b93f6843bd2..b9d7d3201ae 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustGroupsClient) Get(ctx context.Context, id ServerTrustGroupId) var model ServerTrustGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servertrustgroups/version.go b/resource-manager/sql/2023-02-01-preview/servertrustgroups/version.go index 1c411cb8002..328bec7a5fe 100644 --- a/resource-manager/sql/2023-02-01-preview/servertrustgroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/servertrustgroups/version.go @@ -1,12 +1,10 @@ package servertrustgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustgroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/serverusages/README.md b/resource-manager/sql/2023-02-01-preview/serverusages/README.md index 89628ebe73e..c2882e7c22a 100644 --- a/resource-manager/sql/2023-02-01-preview/serverusages/README.md +++ b/resource-manager/sql/2023-02-01-preview/serverusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/serverusages` Documentation -The `serverusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `serverusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/serverusages/client.go b/resource-manager/sql/2023-02-01-preview/serverusages/client.go index a506285038a..16666bee036 100644 --- a/resource-manager/sql/2023-02-01-preview/serverusages/client.go +++ b/resource-manager/sql/2023-02-01-preview/serverusages/client.go @@ -15,7 +15,7 @@ type ServerUsagesClient struct { } func NewServerUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/serverusages/version.go b/resource-manager/sql/2023-02-01-preview/serverusages/version.go index 6b60ab84b4c..3ec59f0f89a 100644 --- a/resource-manager/sql/2023-02-01-preview/serverusages/version.go +++ b/resource-manager/sql/2023-02-01-preview/serverusages/version.go @@ -1,12 +1,10 @@ package serverusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverusages/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/README.md b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/README.md index d931d6ba101..68a03df1c72 100644 --- a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments` Documentation -The `servervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `servervulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/client.go b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/client.go index 5ab28ece52e..e7d2ead0545 100644 --- a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentsClient struct { } func NewServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_createorupdate.go index 6833023e5f8..9b468796ec2 100644 --- a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_get.go b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_get.go index 84e9a7c3243..09f63e48019 100644 --- a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, id common var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/version.go b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/version.go index a9a7b39a679..a07ccf28694 100644 --- a/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-02-01-preview/servervulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessments/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlagent/README.md b/resource-manager/sql/2023-02-01-preview/sqlagent/README.md index 954a31b46aa..9b02774c177 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlagent/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlagent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlagent` Documentation -The `sqlagent` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlagent` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlagent/client.go b/resource-manager/sql/2023-02-01-preview/sqlagent/client.go index e6b69cf376c..27e9195f8bc 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlagent/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlagent/client.go @@ -15,7 +15,7 @@ type SqlAgentClient struct { } func NewSqlAgentClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlAgentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlagent", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlagent", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlAgentClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlagent/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/sqlagent/method_createorupdate.go index d5f7f099d8d..cd83669aefa 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlagent/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/sqlagent/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SqlAgentClient) CreateOrUpdate(ctx context.Context, id commonids.SqlMana var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlagent/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlagent/method_get.go index 8bbf9211506..eb20d2e2e4b 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlagent/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlagent/method_get.go @@ -47,7 +47,6 @@ func (c SqlAgentClient) Get(ctx context.Context, id commonids.SqlManagedInstance var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlagent/version.go b/resource-manager/sql/2023-02-01-preview/sqlagent/version.go index bfc81677536..67219612368 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlagent/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlagent/version.go @@ -1,12 +1,10 @@ package sqlagent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlagent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlagent/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/README.md b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/README.md index cb11aa1d722..a8bc75a99be 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline` Documentation -The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/client.go index 505a54fc965..1e818dc798f 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentBaselineClient struct { } func NewSqlVulnerabilityAssessmentBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go index f287d50ecef..5134e7ba381 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go @@ -35,6 +35,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) CreateOrUpdate(ctx context.Con var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go index 1742364c396..d3dc6e72e80 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) Get(ctx context.Context, id co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go index caec9ab9821..c66768fe7e8 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToHeaders() *client.He func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/version.go index d1d12eef16d..150f952c889 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentbaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentbaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/client.go index acbe2d3fb42..7630b387bae 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentExecuteScanClient struct { } func NewSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go index 201fdbca8ea..3c6a1925406 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go @@ -37,6 +37,7 @@ func (o ExecuteOperationOptions) ToHeaders() *client.Headers { func (o ExecuteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/version.go index 44cf2462843..dfbd4e033a6 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md index e27f24ed6b1..9e9627c56f3 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline` Documentation -The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go index a5233c9899c..fc8f0110ab3 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentRuleBaselineClient struct { } func NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentRuleBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentRuleBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go index 914c9cfe438..38d7b22e0f4 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go @@ -44,7 +44,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go index fb8a7288f91..183bef4b1c9 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate(ctx context var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go index df062390726..59cc6704c63 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go index b587ac02d42..cf61914333c 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) Get(ctx context.Context, i var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go index 2ba72cbdd7d..3a74f8a6c2e 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go @@ -40,6 +40,7 @@ func (o ListByBaselineOperationOptions) ToHeaders() *client.Headers { func (o ListByBaselineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go index 7534948c576..c63ae98dced 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentrulebaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/README.md index ab3604cc154..6877310c24e 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult` Documentation -The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/client.go index 7a139273cb5..f0907cdc0c0 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScanResultClient struct { } func NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go index ef5ca4b33db..c1f6768aee9 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go index ec281bd8b3c..42414e4b89a 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go @@ -46,7 +46,7 @@ func ParseScanResultID(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanResultIDInsensitively(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go index ef0c57e5f1f..082625df697 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Context, id var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go index 24c4bf34932..c893fd92bda 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go @@ -39,6 +39,7 @@ func (o ListByScanOperationOptions) ToHeaders() *client.Headers { func (o ListByScanOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/version.go index e55e6283fa7..74c70d3fcca 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/README.md index 17ecd967e47..b0714fab78b 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans` Documentation -The `sqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/client.go index 222991f7da9..6022bf8ed93 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScansClient struct { } func NewSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/id_scan.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/id_scan.go index 7f816ab7219..cb958675069 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/id_scan.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_get.go index 8c977afd356..111ac936214 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, id ScanI var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go index bc384217394..1aee57eba1e 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToHeaders() *client.H func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/version.go index 2fea301951a..484b9813f3b 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/README.md index 250668e3b27..e5a333ae35c 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings` Documentation -The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/client.go index 94dbf773e0e..bcda5c6d744 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentsSettingsClient struct { } func NewSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go index 6b98f0be879..f8794b7a57a 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context.Co var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_get.go index 9f511302d11..53e3c99ed3a 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, id c var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/version.go index 4b30b4f5383..1e6f5011a5a 100644 --- a/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-02-01-preview/sqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/README.md b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/README.md index 3bae838e575..41d0b200d13 100644 --- a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/README.md +++ b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules` Documentation -The `startstopmanagedinstanceschedules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `startstopmanagedinstanceschedules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/client.go b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/client.go index 9cdebf7233c..aa4c62fed82 100644 --- a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/client.go +++ b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/client.go @@ -15,7 +15,7 @@ type StartStopManagedInstanceSchedulesClient struct { } func NewStartStopManagedInstanceSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*StartStopManagedInstanceSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartStopManagedInstanceSchedulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go index bf962be1799..641d1d37389 100644 --- a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go +++ b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go @@ -52,7 +52,6 @@ func (c StartStopManagedInstanceSchedulesClient) CreateOrUpdate(ctx context.Cont var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_get.go b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_get.go index d65fa6f15d6..bc3bc1326f9 100644 --- a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/method_get.go @@ -47,7 +47,6 @@ func (c StartStopManagedInstanceSchedulesClient) Get(ctx context.Context, id com var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/version.go b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/version.go index c32bb2db6b3..991534a3600 100644 --- a/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/version.go +++ b/resource-manager/sql/2023-02-01-preview/startstopmanagedinstanceschedules/version.go @@ -1,12 +1,10 @@ package startstopmanagedinstanceschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/README.md b/resource-manager/sql/2023-02-01-preview/subscriptionusages/README.md index f62990d22a7..43dfa75893f 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/README.md +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/subscriptionusages` Documentation -The `subscriptionusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `subscriptionusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/client.go b/resource-manager/sql/2023-02-01-preview/subscriptionusages/client.go index 6bd351c6169..5829a9a22b0 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/client.go +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/client.go @@ -15,7 +15,7 @@ type SubscriptionUsagesClient struct { } func NewSubscriptionUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptionusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptionusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_location.go b/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_location.go index f064d059ffb..881d5b22478 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_usage.go b/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_usage.go index a4897a668a9..7f61d25a349 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_usage.go +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/id_usage.go @@ -42,7 +42,7 @@ func ParseUsageID(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseUsageIDInsensitively(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/method_get.go b/resource-manager/sql/2023-02-01-preview/subscriptionusages/method_get.go index 5b938744f0c..41027938a77 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionUsagesClient) Get(ctx context.Context, id UsageId) (result G var model SubscriptionUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/subscriptionusages/version.go b/resource-manager/sql/2023-02-01-preview/subscriptionusages/version.go index 5f7862ea178..a23d5d1e571 100644 --- a/resource-manager/sql/2023-02-01-preview/subscriptionusages/version.go +++ b/resource-manager/sql/2023-02-01-preview/subscriptionusages/version.go @@ -1,12 +1,10 @@ package subscriptionusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptionusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptionusages/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/README.md b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/README.md index d0e37c665e9..9abc38b0674 100644 --- a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/README.md +++ b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces` Documentation -The `synapselinkworkspaces` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `synapselinkworkspaces` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/client.go b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/client.go index 969d0394690..cedd10aa1e4 100644 --- a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/client.go +++ b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/client.go @@ -15,7 +15,7 @@ type SynapseLinkWorkspacesClient struct { } func NewSynapseLinkWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*SynapseLinkWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SynapseLinkWorkspacesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/version.go b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/version.go index e0c1f07c0c1..381c8d6fb1d 100644 --- a/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/version.go +++ b/resource-manager/sql/2023-02-01-preview/synapselinkworkspaces/version.go @@ -1,12 +1,10 @@ package synapselinkworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/synapselinkworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/synapselinkworkspaces/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/README.md b/resource-manager/sql/2023-02-01-preview/syncagents/README.md index bc01cdb5439..4dc1fffbf12 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/README.md +++ b/resource-manager/sql/2023-02-01-preview/syncagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/syncagents` Documentation -The `syncagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `syncagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/client.go b/resource-manager/sql/2023-02-01-preview/syncagents/client.go index ddc6758b233..8f3af4b9f9c 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/client.go +++ b/resource-manager/sql/2023-02-01-preview/syncagents/client.go @@ -15,7 +15,7 @@ type SyncAgentsClient struct { } func NewSyncAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/id_syncagent.go b/resource-manager/sql/2023-02-01-preview/syncagents/id_syncagent.go index 8d76e6c99f2..fa0a3705563 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/id_syncagent.go +++ b/resource-manager/sql/2023-02-01-preview/syncagents/id_syncagent.go @@ -44,7 +44,7 @@ func ParseSyncAgentID(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncAgentIDInsensitively(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/method_generatekey.go b/resource-manager/sql/2023-02-01-preview/syncagents/method_generatekey.go index 42a446203af..3d8fd5b7f4c 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/method_generatekey.go +++ b/resource-manager/sql/2023-02-01-preview/syncagents/method_generatekey.go @@ -46,7 +46,6 @@ func (c SyncAgentsClient) GenerateKey(ctx context.Context, id SyncAgentId) (resu var model SyncAgentKeyProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/method_get.go b/resource-manager/sql/2023-02-01-preview/syncagents/method_get.go index b2278d3ec85..82b14cbc685 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/syncagents/method_get.go @@ -45,7 +45,6 @@ func (c SyncAgentsClient) Get(ctx context.Context, id SyncAgentId) (result GetOp var model SyncAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/syncagents/version.go b/resource-manager/sql/2023-02-01-preview/syncagents/version.go index db7ec89b205..8deab85d296 100644 --- a/resource-manager/sql/2023-02-01-preview/syncagents/version.go +++ b/resource-manager/sql/2023-02-01-preview/syncagents/version.go @@ -1,12 +1,10 @@ package syncagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncagents/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/README.md b/resource-manager/sql/2023-02-01-preview/syncgroups/README.md index 91974af945e..14c5337beee 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/syncgroups` Documentation -The `syncgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `syncgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/client.go b/resource-manager/sql/2023-02-01-preview/syncgroups/client.go index 4319d456755..5cd4df963fb 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/client.go @@ -15,7 +15,7 @@ type SyncGroupsClient struct { } func NewSyncGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/id_location.go b/resource-manager/sql/2023-02-01-preview/syncgroups/id_location.go index 263b38238dc..1877c3ba830 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/id_syncgroup.go b/resource-manager/sql/2023-02-01-preview/syncgroups/id_syncgroup.go index 58a45ff7503..7f26217fc95 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/id_syncgroup.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/method_get.go b/resource-manager/sql/2023-02-01-preview/syncgroups/method_get.go index 1d0bfbaff2b..192ba337ba7 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/method_get.go @@ -45,7 +45,6 @@ func (c SyncGroupsClient) Get(ctx context.Context, id SyncGroupId) (result GetOp var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/method_listlogs.go b/resource-manager/sql/2023-02-01-preview/syncgroups/method_listlogs.go index 5f0554775a2..0b12f7bb05e 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/method_listlogs.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/method_listlogs.go @@ -42,6 +42,7 @@ func (o ListLogsOperationOptions) ToHeaders() *client.Headers { func (o ListLogsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/syncgroups/version.go b/resource-manager/sql/2023-02-01-preview/syncgroups/version.go index 49700272853..f5bec82b566 100644 --- a/resource-manager/sql/2023-02-01-preview/syncgroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/syncgroups/version.go @@ -1,12 +1,10 @@ package syncgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncgroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/README.md b/resource-manager/sql/2023-02-01-preview/syncmembers/README.md index ebcc7fb008d..44113d7aef5 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/README.md +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/syncmembers` Documentation -The `syncmembers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `syncmembers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/client.go b/resource-manager/sql/2023-02-01-preview/syncmembers/client.go index a8d9678c21e..002a3b5df66 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/client.go +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/client.go @@ -15,7 +15,7 @@ type SyncMembersClient struct { } func NewSyncMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncMembersClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncgroup.go b/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncgroup.go index 69fdd86cfbf..06a5789f4f7 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncgroup.go +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncmember.go b/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncmember.go index d62d31988a3..8a431b5c6cb 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncmember.go +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/id_syncmember.go @@ -48,7 +48,7 @@ func ParseSyncMemberID(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSyncMemberIDInsensitively(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/method_get.go b/resource-manager/sql/2023-02-01-preview/syncmembers/method_get.go index c2cfc32c6db..34f5fca6a2c 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/method_get.go @@ -45,7 +45,6 @@ func (c SyncMembersClient) Get(ctx context.Context, id SyncMemberId) (result Get var model SyncMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/syncmembers/version.go b/resource-manager/sql/2023-02-01-preview/syncmembers/version.go index 637f2e805ac..585c472ec41 100644 --- a/resource-manager/sql/2023-02-01-preview/syncmembers/version.go +++ b/resource-manager/sql/2023-02-01-preview/syncmembers/version.go @@ -1,12 +1,10 @@ package syncmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncmembers/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/tdecertificates/README.md b/resource-manager/sql/2023-02-01-preview/tdecertificates/README.md index 41e1c738053..652a7677676 100644 --- a/resource-manager/sql/2023-02-01-preview/tdecertificates/README.md +++ b/resource-manager/sql/2023-02-01-preview/tdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/tdecertificates` Documentation -The `tdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `tdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/tdecertificates/client.go b/resource-manager/sql/2023-02-01-preview/tdecertificates/client.go index 960ac6f7b2e..7409af2c03e 100644 --- a/resource-manager/sql/2023-02-01-preview/tdecertificates/client.go +++ b/resource-manager/sql/2023-02-01-preview/tdecertificates/client.go @@ -15,7 +15,7 @@ type TdeCertificatesClient struct { } func NewTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*TdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/tdecertificates/version.go b/resource-manager/sql/2023-02-01-preview/tdecertificates/version.go index e003f98f909..e033c13442d 100644 --- a/resource-manager/sql/2023-02-01-preview/tdecertificates/version.go +++ b/resource-manager/sql/2023-02-01-preview/tdecertificates/version.go @@ -1,12 +1,10 @@ package tdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tdecertificates/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/timezones/README.md b/resource-manager/sql/2023-02-01-preview/timezones/README.md index 2d756a1e483..5af8113ef83 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/README.md +++ b/resource-manager/sql/2023-02-01-preview/timezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/timezones` Documentation -The `timezones` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `timezones` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/timezones/client.go b/resource-manager/sql/2023-02-01-preview/timezones/client.go index b70fa82f34a..278433b66e0 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/client.go +++ b/resource-manager/sql/2023-02-01-preview/timezones/client.go @@ -15,7 +15,7 @@ type TimeZonesClient struct { } func NewTimeZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*TimeZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "timezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "timezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TimeZonesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/timezones/id_location.go b/resource-manager/sql/2023-02-01-preview/timezones/id_location.go index 6303eaf6b92..ed12387a1b8 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/id_location.go +++ b/resource-manager/sql/2023-02-01-preview/timezones/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/timezones/id_timezone.go b/resource-manager/sql/2023-02-01-preview/timezones/id_timezone.go index 95f83aefb79..e0f97b4d2cb 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/id_timezone.go +++ b/resource-manager/sql/2023-02-01-preview/timezones/id_timezone.go @@ -42,7 +42,7 @@ func ParseTimeZoneID(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTimeZoneIDInsensitively(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/timezones/method_get.go b/resource-manager/sql/2023-02-01-preview/timezones/method_get.go index e9be6c666b6..bf02c6ffb19 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/timezones/method_get.go @@ -45,7 +45,6 @@ func (c TimeZonesClient) Get(ctx context.Context, id TimeZoneId) (result GetOper var model TimeZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/timezones/version.go b/resource-manager/sql/2023-02-01-preview/timezones/version.go index a1a29469205..a3ea3c12d61 100644 --- a/resource-manager/sql/2023-02-01-preview/timezones/version.go +++ b/resource-manager/sql/2023-02-01-preview/timezones/version.go @@ -1,12 +1,10 @@ package timezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/timezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/timezones/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md index 75a154ca176..50211321e2c 100644 --- a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md +++ b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/transparentdataencryptions` Documentation -The `transparentdataencryptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `transparentdataencryptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go index 405c2a9c03a..023e8247a47 100644 --- a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go +++ b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/client.go @@ -15,7 +15,7 @@ type TransparentDataEncryptionsClient struct { } func NewTransparentDataEncryptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransparentDataEncryptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transparentdataencryptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transparentdataencryptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransparentDataEncryptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go index 30de417b32a..607b29fc4f0 100644 --- a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/method_get.go @@ -47,7 +47,6 @@ func (c TransparentDataEncryptionsClient) Get(ctx context.Context, id commonids. var model LogicalDatabaseTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go index 20757f54dd6..dfe24ed478e 100644 --- a/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go +++ b/resource-manager/sql/2023-02-01-preview/transparentdataencryptions/version.go @@ -1,12 +1,10 @@ package transparentdataencryptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transparentdataencryptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transparentdataencryptions/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/usages/README.md b/resource-manager/sql/2023-02-01-preview/usages/README.md index d710d76d47f..7003859f510 100644 --- a/resource-manager/sql/2023-02-01-preview/usages/README.md +++ b/resource-manager/sql/2023-02-01-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/usages/client.go b/resource-manager/sql/2023-02-01-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/sql/2023-02-01-preview/usages/client.go +++ b/resource-manager/sql/2023-02-01-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/usages/id_instancepool.go b/resource-manager/sql/2023-02-01-preview/usages/id_instancepool.go index 5414d2b8bec..6c1828d36b4 100644 --- a/resource-manager/sql/2023-02-01-preview/usages/id_instancepool.go +++ b/resource-manager/sql/2023-02-01-preview/usages/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/usages/method_listbyinstancepool.go b/resource-manager/sql/2023-02-01-preview/usages/method_listbyinstancepool.go index 1c0d9617748..dfe481817a1 100644 --- a/resource-manager/sql/2023-02-01-preview/usages/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-02-01-preview/usages/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-02-01-preview/usages/version.go b/resource-manager/sql/2023-02-01-preview/usages/version.go index ed8efb3e68b..5b59e9061a0 100644 --- a/resource-manager/sql/2023-02-01-preview/usages/version.go +++ b/resource-manager/sql/2023-02-01-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/virtualclusters/README.md b/resource-manager/sql/2023-02-01-preview/virtualclusters/README.md index 1f489e6beef..b5f5ca8253b 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualclusters/README.md +++ b/resource-manager/sql/2023-02-01-preview/virtualclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/virtualclusters` Documentation -The `virtualclusters` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `virtualclusters` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/virtualclusters/client.go b/resource-manager/sql/2023-02-01-preview/virtualclusters/client.go index 2b0084ba56a..fcc501326a1 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualclusters/client.go +++ b/resource-manager/sql/2023-02-01-preview/virtualclusters/client.go @@ -15,7 +15,7 @@ type VirtualClustersClient struct { } func NewVirtualClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualClustersClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/virtualclusters/id_virtualcluster.go b/resource-manager/sql/2023-02-01-preview/virtualclusters/id_virtualcluster.go index 3e868342489..f1a818ac99d 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualclusters/id_virtualcluster.go +++ b/resource-manager/sql/2023-02-01-preview/virtualclusters/id_virtualcluster.go @@ -42,7 +42,7 @@ func ParseVirtualClusterID(input string) (*VirtualClusterId, error) { } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualClusterIDInsensitively(input string) (*VirtualClusterId, error) } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/virtualclusters/method_get.go b/resource-manager/sql/2023-02-01-preview/virtualclusters/method_get.go index 963d777394f..3705c4dd85f 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualclusters/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/virtualclusters/method_get.go @@ -45,7 +45,6 @@ func (c VirtualClustersClient) Get(ctx context.Context, id VirtualClusterId) (re var model VirtualCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/virtualclusters/version.go b/resource-manager/sql/2023-02-01-preview/virtualclusters/version.go index ea3c1e8d49e..78ea3c77fca 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualclusters/version.go +++ b/resource-manager/sql/2023-02-01-preview/virtualclusters/version.go @@ -1,12 +1,10 @@ package virtualclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualclusters/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/README.md b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/README.md index 63b9aa2056a..456002cbffa 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/README.md +++ b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/client.go b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/client.go +++ b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/id_virtualnetworkrule.go index cda6be2068f..23478a0b90d 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/method_get.go b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/version.go b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/version.go index a6171fb84bb..21b547f0642 100644 --- a/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/version.go +++ b/resource-manager/sql/2023-02-01-preview/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/README.md b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/README.md index 1017140d643..d63e6f9c918 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/README.md +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/workloadclassifiers` Documentation -The `workloadclassifiers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `workloadclassifiers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/client.go b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/client.go index 8a4bda3b5df..2817cd7d47d 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/client.go +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/client.go @@ -15,7 +15,7 @@ type WorkloadClassifiersClient struct { } func NewWorkloadClassifiersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadClassifiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadclassifiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadclassifiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadClassifiersClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadclassifier.go b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadclassifier.go index 341ebda0737..7a69196cb75 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadclassifier.go +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadclassifier.go @@ -48,7 +48,7 @@ func ParseWorkloadClassifierID(input string) (*WorkloadClassifierId, error) { } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkloadClassifierIDInsensitively(input string) (*WorkloadClassifierId } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadgroup.go b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadgroup.go index 78d6718d686..e3c9c82be54 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadgroup.go +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/method_get.go b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/method_get.go index 4fb345bfa00..b53892d20ec 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadClassifiersClient) Get(ctx context.Context, id WorkloadClassifie var model WorkloadClassifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/version.go b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/version.go index 7c28ea175e4..4cc56c7024a 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadclassifiers/version.go +++ b/resource-manager/sql/2023-02-01-preview/workloadclassifiers/version.go @@ -1,12 +1,10 @@ package workloadclassifiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadclassifiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadclassifiers/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-02-01-preview/workloadgroups/README.md b/resource-manager/sql/2023-02-01-preview/workloadgroups/README.md index 924b3b4465f..3835450a8a1 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadgroups/README.md +++ b/resource-manager/sql/2023-02-01-preview/workloadgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/workloadgroups` Documentation -The `workloadgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-02-01-preview`). +The `workloadgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-02-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-02-01-preview/workloadgroups/client.go b/resource-manager/sql/2023-02-01-preview/workloadgroups/client.go index ea02247d06f..6c31a01f6ab 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadgroups/client.go +++ b/resource-manager/sql/2023-02-01-preview/workloadgroups/client.go @@ -15,7 +15,7 @@ type WorkloadGroupsClient struct { } func NewWorkloadGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-02-01-preview/workloadgroups/id_workloadgroup.go b/resource-manager/sql/2023-02-01-preview/workloadgroups/id_workloadgroup.go index de674487f45..eb1341955eb 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadgroups/id_workloadgroup.go +++ b/resource-manager/sql/2023-02-01-preview/workloadgroups/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-02-01-preview/workloadgroups/method_get.go b/resource-manager/sql/2023-02-01-preview/workloadgroups/method_get.go index 7d018b12e1c..5b64cb7617a 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadgroups/method_get.go +++ b/resource-manager/sql/2023-02-01-preview/workloadgroups/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadGroupsClient) Get(ctx context.Context, id WorkloadGroupId) (resu var model WorkloadGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-02-01-preview/workloadgroups/version.go b/resource-manager/sql/2023-02-01-preview/workloadgroups/version.go index 37ea1e0b6db..c1556bcd1b6 100644 --- a/resource-manager/sql/2023-02-01-preview/workloadgroups/version.go +++ b/resource-manager/sql/2023-02-01-preview/workloadgroups/version.go @@ -1,12 +1,10 @@ package workloadgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadgroups/2023-02-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/README.md index 2354aff0942..769c9d2907c 100644 --- a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies` Documentation -The `backupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `backupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/client.go index b01ca3b95ed..d77d7e4b208 100644 --- a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type BackupShortTermRetentionPoliciesClient struct { } func NewBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/method_get.go index f44a938b3f8..0a7a2b75778 100644 --- a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, id comm var model BackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/version.go index 33aa0e7ab26..277393f5b9a 100644 --- a/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/backupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package backupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupshorttermretentionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/README.md b/resource-manager/sql/2023-05-01-preview/blobauditing/README.md index 9315c5b4db2..8b89f8297ce 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/README.md +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/blobauditing` Documentation -The `blobauditing` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `blobauditing` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/client.go b/resource-manager/sql/2023-05-01-preview/blobauditing/client.go index d8c96733d85..d77ae84974a 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/client.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/client.go @@ -15,7 +15,7 @@ type BlobAuditingClient struct { } func NewBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobAuditingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobauditing", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobauditing", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobAuditingClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go index 589911c6f42..69f704a405e 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesCreateOrUpdate(ctx conte var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go index fc66178ed6e..fbc605bc326 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesGet(ctx context.Context, var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go index 03952a4b896..1296c38402d 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(c var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go index 3e29e0f05f0..68921db640e 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesGet(ctx context. var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go index c0e81b5a0db..f23d1799caf 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesGet(ctx context.Co var model ExtendedServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/method_serverblobauditingpoliciesget.go b/resource-manager/sql/2023-05-01-preview/blobauditing/method_serverblobauditingpoliciesget.go index 75e49afd4f9..bf9a8ef1b2f 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/method_serverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/method_serverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ServerBlobAuditingPoliciesGet(ctx context.Context, i var model ServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/blobauditing/version.go b/resource-manager/sql/2023-05-01-preview/blobauditing/version.go index 1f7a4312a15..51beb607fea 100644 --- a/resource-manager/sql/2023-05-01-preview/blobauditing/version.go +++ b/resource-manager/sql/2023-05-01-preview/blobauditing/version.go @@ -1,12 +1,10 @@ package blobauditing -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobauditing/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobauditing/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/README.md index a7b971216a9..04fdccdd630 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings` Documentation -The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/client.go index 853faf57d20..6d648a65168 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type DatabaseAdvancedThreatProtectionSettingsClient struct { } func NewDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go index 86442b1035b..81db81d16c9 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx conte var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_get.go index c42a4c4fc7b..ef215bd4c97 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/version.go index 6379354b0e1..c015a6c7202 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package databaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/README.md b/resource-manager/sql/2023-05-01-preview/databaseadvisors/README.md index 5d777488a27..e9a4a21533d 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseadvisors` Documentation -The `databaseadvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseadvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/client.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/client.go index 44010e301ae..fce41427034 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/client.go @@ -15,7 +15,7 @@ type DatabaseAdvisorsClient struct { } func NewDatabaseAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/id_databaseadvisor.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/id_databaseadvisor.go index 3958ebfc87e..4238504a482 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/id_databaseadvisor.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_get.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_get.go index a42614c2904..8d6b2625ec0 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseAdvisorsClient) Get(ctx context.Context, id DatabaseAdvisorId) ( var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_listbydatabase.go index 514e3d2f332..3f50cebdcfc 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_listbydatabase.go @@ -35,6 +35,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, id commonids var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_update.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_update.go index e16bd4d4206..305e480233e 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_update.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseAdvisorsClient) Update(ctx context.Context, id DatabaseAdvisorId var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseadvisors/version.go b/resource-manager/sql/2023-05-01-preview/databaseadvisors/version.go index b68423b15c6..5a270fab071 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseadvisors/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseadvisors/version.go @@ -1,12 +1,10 @@ package databaseadvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvisors/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/README.md b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/README.md index 606064db226..0308aa17155 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseautomatictuning` Documentation -The `databaseautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/client.go b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/client.go index c1ffd5220bb..64e97a4f9b8 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/client.go @@ -15,7 +15,7 @@ type DatabaseAutomaticTuningClient struct { } func NewDatabaseAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_get.go b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_get.go index b7b69ce9ea2..e39c0ed3a61 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAutomaticTuningClient) Get(ctx context.Context, id commonids.Sql var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_update.go b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_update.go index 18d13757916..e98f662fd44 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_update.go +++ b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c DatabaseAutomaticTuningClient) Update(ctx context.Context, id commonids. var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/version.go b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/version.go index 1fa1a27e7af..c16da3d66ba 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseautomatictuning/version.go @@ -1,12 +1,10 @@ package databaseautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseautomatictuning/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/README.md b/resource-manager/sql/2023-05-01-preview/databasecolumns/README.md index fb5d01eafae..d83a9bde1cf 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasecolumns` Documentation -The `databasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/client.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/client.go index f59e201824d..bb6e0d151c9 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/client.go @@ -15,7 +15,7 @@ type DatabaseColumnsClient struct { } func NewDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/id_column.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/id_column.go index b3af8a0f9d4..7c6b826f36c 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/id_column.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/id_table.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/id_table.go index 3b8c7d1c356..5ac8168a4b7 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/id_table.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_get.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_get.go index 64777b1f6d4..7df54396dde 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseColumnsClient) Get(ctx context.Context, id ColumnId) (result Get var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbydatabase.go index 95a591eec19..44b8ccd8618 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbytable.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbytable.go index e58a820a57b..16a76702308 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/databasecolumns/version.go b/resource-manager/sql/2023-05-01-preview/databasecolumns/version.go index ae8ff45a253..14c1212bc38 100644 --- a/resource-manager/sql/2023-05-01-preview/databasecolumns/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasecolumns/version.go @@ -1,12 +1,10 @@ package databasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasecolumns/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/client.go b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/client.go index b5952975e34..64b1de4d53d 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevalidateClient struct { } func NewDatabaseEncryptionProtectorRevalidateClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevalidateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevalidateClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/version.go b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/version.go index 267c877c4e5..17076b699ff 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevalidate/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevalidate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/client.go b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/client.go index ad1878977d2..68eea1ecd3e 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevertClient struct { } func NewDatabaseEncryptionProtectorRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevertClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/version.go b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/version.go index b3c64cf3d38..3a24b44914e 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseencryptionprotectorrevert/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseextensions/README.md b/resource-manager/sql/2023-05-01-preview/databaseextensions/README.md index 1b1ed1a58e2..87c94624329 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseextensions/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseextensions` Documentation -The `databaseextensions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseextensions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseextensions/client.go b/resource-manager/sql/2023-05-01-preview/databaseextensions/client.go index 295d1a579b8..329371849d4 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseextensions/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseextensions/client.go @@ -15,7 +15,7 @@ type DatabaseExtensionsClient struct { } func NewDatabaseExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseExtensionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseextensions/id_extension.go b/resource-manager/sql/2023-05-01-preview/databaseextensions/id_extension.go index 8c726d30fe1..e9cd5142eb7 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseextensions/id_extension.go +++ b/resource-manager/sql/2023-05-01-preview/databaseextensions/id_extension.go @@ -46,7 +46,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databaseextensions/version.go b/resource-manager/sql/2023-05-01-preview/databaseextensions/version.go index fee39500c86..c20016abd42 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseextensions/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseextensions/version.go @@ -1,12 +1,10 @@ package databaseextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseextensions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseoperations/README.md b/resource-manager/sql/2023-05-01-preview/databaseoperations/README.md index 4dfa5a46b41..b607dbbe47e 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseoperations/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseoperations` Documentation -The `databaseoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseoperations/client.go b/resource-manager/sql/2023-05-01-preview/databaseoperations/client.go index 3b9304375b8..65137fba58a 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseoperations/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseoperations/client.go @@ -15,7 +15,7 @@ type DatabaseOperationsClient struct { } func NewDatabaseOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseoperations/version.go b/resource-manager/sql/2023-05-01-preview/databaseoperations/version.go index b686fdba9c9..94f90b83a4f 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseoperations/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseoperations/version.go @@ -1,12 +1,10 @@ package databaseoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseoperations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/README.md b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/README.md index 4aec1f18a18..bd6d5a1f749 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaserecommendedactions` Documentation -The `databaserecommendedactions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaserecommendedactions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/client.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/client.go index 9d75f11e0cf..02420960308 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/client.go @@ -15,7 +15,7 @@ type DatabaseRecommendedActionsClient struct { } func NewDatabaseRecommendedActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseRecommendedActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaserecommendedactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaserecommendedactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseRecommendedActionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_databaseadvisor.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_databaseadvisor.go index d80ad523b41..e15a0ffcfa5 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_databaseadvisor.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_recommendedaction.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_recommendedaction.go index cc4f1fc0a7a..2bac7220ef5 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_recommendedaction.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/id_recommendedaction.go @@ -48,7 +48,7 @@ func ParseRecommendedActionID(input string) (*RecommendedActionId, error) { } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRecommendedActionIDInsensitively(input string) (*RecommendedActionId, } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_get.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_get.go index d405a420d4e..746442a33bd 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseRecommendedActionsClient) Get(ctx context.Context, id Recommende var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go index ce818410590..7ee295f95c4 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go @@ -46,7 +46,6 @@ func (c DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Cont var model []RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_update.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_update.go index 7f6b808baab..f2b6314e21d 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_update.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseRecommendedActionsClient) Update(ctx context.Context, id Recomme var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/version.go b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/version.go index 83b8859f95a..2a5ee538ca7 100644 --- a/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaserecommendedactions/version.go @@ -1,12 +1,10 @@ package databaserecommendedactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaserecommendedactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaserecommendedactions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databases/README.md b/resource-manager/sql/2023-05-01-preview/databases/README.md index c8e1e5f4c59..0f9a0a11645 100644 --- a/resource-manager/sql/2023-05-01-preview/databases/README.md +++ b/resource-manager/sql/2023-05-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databases/client.go b/resource-manager/sql/2023-05-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/sql/2023-05-01-preview/databases/client.go +++ b/resource-manager/sql/2023-05-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databases/method_failover.go b/resource-manager/sql/2023-05-01-preview/databases/method_failover.go index 7afbab02040..8de72667a50 100644 --- a/resource-manager/sql/2023-05-01-preview/databases/method_failover.go +++ b/resource-manager/sql/2023-05-01-preview/databases/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/databases/method_get.go b/resource-manager/sql/2023-05-01-preview/databases/method_get.go index a9f44b0b589..1009685d61e 100644 --- a/resource-manager/sql/2023-05-01-preview/databases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databases/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DatabasesClient) Get(ctx context.Context, id commonids.SqlDatabaseId, op var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databases/version.go b/resource-manager/sql/2023-05-01-preview/databases/version.go index ef01054df6f..9d01e46d06f 100644 --- a/resource-manager/sql/2023-05-01-preview/databases/version.go +++ b/resource-manager/sql/2023-05-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/README.md b/resource-manager/sql/2023-05-01-preview/databaseschemas/README.md index 0b1212be34c..71ff93794e6 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseschemas` Documentation -The `databaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/client.go b/resource-manager/sql/2023-05-01-preview/databaseschemas/client.go index f7c5607f104..9b66a11cbc9 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/client.go @@ -15,7 +15,7 @@ type DatabaseSchemasClient struct { } func NewDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/id_schema.go b/resource-manager/sql/2023-05-01-preview/databaseschemas/id_schema.go index bfd9fca74e3..07c56131d6b 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/id_schema.go +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/method_get.go b/resource-manager/sql/2023-05-01-preview/databaseschemas/method_get.go index b0263b0abc8..27c1d7d7b3d 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSchemasClient) Get(ctx context.Context, id SchemaId) (result Get var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/databaseschemas/method_listbydatabase.go index c67b2be2776..e3ff05c63bb 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/databaseschemas/version.go b/resource-manager/sql/2023-05-01-preview/databaseschemas/version.go index 634eac80fa8..529ce51afc9 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseschemas/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseschemas/version.go @@ -1,12 +1,10 @@ package databaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseschemas/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/README.md b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/README.md index 9ceabf7358f..ab154f19880 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies` Documentation -The `databasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/client.go b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/client.go index ede593698c7..5dc5a476ce2 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type DatabaseSecurityAlertPoliciesClient struct { } func NewDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_createorupdate.go index 793251a9458..0752c0334f8 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_get.go index f2e3ec9cf18..ad2feedc3e7 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id commoni var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/version.go b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/version.go index 72ce0e74fa1..cd7ab3e52ec 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package databasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesecurityalertpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md index b19113fe388..990637c4e14 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines` Documentation -The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go index 4a029e35e35..197aac9464b 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go index 598eb5cd411..aab3068bda5 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go index b18a885e2c2..f3afb88df0d 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) Get(ctx context.Conte var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go index f29b5873c22..e3ed7acefc0 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentbaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go index 5246db793c6..505fdee6215 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentExecuteScanClient struct { } func NewDatabaseSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go index a7725738a3c..6235d27c580 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md index f9de6de8d57..6b4e37d3cd4 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines` Documentation -The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go index d12af9b1446..617524c8b4b 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go index 99d4e7b9384..2d8c59a0783 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go @@ -46,7 +46,7 @@ func ParseBaselineRuleID(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBaselineRuleIDInsensitively(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go index 7d4ee197cf2..8d6e076da5c 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ct var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go index 84ad5045ae6..bb85540e3c6 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.C var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go index 50bcde3a9df..f78c5be246d 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md index 3109956880e..6c891f6d77d 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult` Documentation -The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go index 92b651cb9fe..5b2f1d85b93 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScanResultClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go index 6a7319aa3b6..b708ee23e5d 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go @@ -48,7 +48,7 @@ func ParseScanScanResultID(input string) (*ScanScanResultId, error) { } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseScanScanResultIDInsensitively(input string) (*ScanScanResultId, error) } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index c66d39b0f73..896f447d3a0 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go index 6b0354fa840..b51d6882b18 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Cont var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go index 75dfd46591c..be55f6b1674 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/README.md index 5d2726a7af3..0a1f601fecc 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans` Documentation -The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/client.go index ebf00746280..d170cc753df 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScansClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index a4455526058..fb6396f8bb4 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go index 6d507769fef..52aec5920e3 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/version.go index 080c875db80..449437402a1 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/README.md index c246dc471eb..16d52553bf6 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings` Documentation -The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/client.go index 4c3aefb163c..e0602c99331 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentsSettingsClient struct { } func NewDatabaseSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go index 283fc11d5f8..16e3cee1c42 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Conte var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/version.go index 091705b83fb..789112b8512 100644 --- a/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasesqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/README.md b/resource-manager/sql/2023-05-01-preview/databasetables/README.md index a840f43c702..a912f4ad758 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasetables` Documentation -The `databasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/client.go b/resource-manager/sql/2023-05-01-preview/databasetables/client.go index ae2db3cc1b3..3e10e7dcbee 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/client.go @@ -15,7 +15,7 @@ type DatabaseTablesClient struct { } func NewDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/id_schema.go b/resource-manager/sql/2023-05-01-preview/databasetables/id_schema.go index 4f1651b4008..95e2801e256 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/id_schema.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/id_table.go b/resource-manager/sql/2023-05-01-preview/databasetables/id_table.go index 9418bcd018e..0677aa6c988 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/id_table.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/method_get.go b/resource-manager/sql/2023-05-01-preview/databasetables/method_get.go index c00e399f016..00d41f2f7a5 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseTablesClient) Get(ctx context.Context, id TableId) (result GetOp var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/method_listbyschema.go b/resource-manager/sql/2023-05-01-preview/databasetables/method_listbyschema.go index f2ce40497ad..27cef7ab7cc 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/databasetables/version.go b/resource-manager/sql/2023-05-01-preview/databasetables/version.go index 97fbf97db88..f5d78a38e23 100644 --- a/resource-manager/sql/2023-05-01-preview/databasetables/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasetables/version.go @@ -1,12 +1,10 @@ package databasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasetables/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databaseusages/README.md b/resource-manager/sql/2023-05-01-preview/databaseusages/README.md index 337c30a4173..a71b70ce194 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseusages/README.md +++ b/resource-manager/sql/2023-05-01-preview/databaseusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databaseusages` Documentation -The `databaseusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databaseusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databaseusages/client.go b/resource-manager/sql/2023-05-01-preview/databaseusages/client.go index 2c2ee15772a..d79c504a7f5 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseusages/client.go +++ b/resource-manager/sql/2023-05-01-preview/databaseusages/client.go @@ -15,7 +15,7 @@ type DatabaseUsagesClient struct { } func NewDatabaseUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databaseusages/version.go b/resource-manager/sql/2023-05-01-preview/databaseusages/version.go index c4b67a00069..cde3c515a76 100644 --- a/resource-manager/sql/2023-05-01-preview/databaseusages/version.go +++ b/resource-manager/sql/2023-05-01-preview/databaseusages/version.go @@ -1,12 +1,10 @@ package databaseusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseusages/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/README.md index 323ca5a4e90..80c539ff575 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines` Documentation -The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/client.go index 799c20cce65..9d705cb0169 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go index afee2c5691a..74f52b3bd08 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go index 2fc65238eb3..e0a57bf0eef 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx c var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go index 53027872e33..554e6664a47 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Cont var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/version.go index c0538916134..1173628c0c0 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/README.md b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/README.md index d6a1a8ec3d9..8ef1d380b59 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments` Documentation -The `databasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/client.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/client.go index 8802de5ec6c..038b962a146 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentsClient struct { } func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_createorupdate.go index 5995d251fc6..cd059d04950 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Conte var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_get.go index c807027bb1d..45ee4c29235 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, id comm var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/version.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/version.go index fa81f759077..2fe51a0a029 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessments/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/README.md index 28d014eb018..10f1f8e969b 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans` Documentation -The `databasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `databasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/client.go index 6d494cbab65..7060f30a177 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentScansClient struct { } func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go index a90d293b749..ae5ef46a672 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentScanID(input string) (*VulnerabilityAssessmentS } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentScanIDInsensitively(input string) (*Vulnerabili } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_export.go index 0decd7c3417..6990e393834 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_get.go index 4b42b912639..c692ed8bc59 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, id var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/version.go index d564410b9c4..3e9b85c886b 100644 --- a/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-05-01-preview/databasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/README.md b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/README.md index fd1f14827e8..a073c29c132 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/datamaskingpolicies` Documentation -The `datamaskingpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `datamaskingpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/client.go b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/client.go index 5247008b095..b9fc98390b7 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/client.go @@ -15,7 +15,7 @@ type DataMaskingPoliciesClient struct { } func NewDataMaskingPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_createorupdate.go index 7a94c14f63f..40914de8f15 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, id common var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_get.go index cb657685fed..a1fc156a99f 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DataMaskingPoliciesClient) Get(ctx context.Context, id commonids.SqlData var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/version.go b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/version.go index 252de32cb0d..84c3ca99215 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingpolicies/version.go @@ -1,12 +1,10 @@ package datamaskingpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingrules/README.md b/resource-manager/sql/2023-05-01-preview/datamaskingrules/README.md index 7f8a693dd2a..6790e4fdc9d 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingrules/README.md +++ b/resource-manager/sql/2023-05-01-preview/datamaskingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/datamaskingrules` Documentation -The `datamaskingrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `datamaskingrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingrules/client.go b/resource-manager/sql/2023-05-01-preview/datamaskingrules/client.go index 24c99a14922..e9a838cb776 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingrules/client.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingrules/client.go @@ -15,7 +15,7 @@ type DataMaskingRulesClient struct { } func NewDataMaskingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingrules/id_datamaskingpolicyrule.go b/resource-manager/sql/2023-05-01-preview/datamaskingrules/id_datamaskingpolicyrule.go index 9e9000d84cc..cc7040052fe 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingrules/id_datamaskingpolicyrule.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingrules/id_datamaskingpolicyrule.go @@ -46,7 +46,7 @@ func ParseDataMaskingPolicyRuleID(input string) (*DataMaskingPolicyRuleId, error } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataMaskingPolicyRuleIDInsensitively(input string) (*DataMaskingPolicy } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingrules/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/datamaskingrules/method_createorupdate.go index d9a11638222..5665741a0d2 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingrules/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, id DataMaski var model DataMaskingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/datamaskingrules/version.go b/resource-manager/sql/2023-05-01-preview/datamaskingrules/version.go index 8a4e686065c..13ad2f4717e 100644 --- a/resource-manager/sql/2023-05-01-preview/datamaskingrules/version.go +++ b/resource-manager/sql/2023-05-01-preview/datamaskingrules/version.go @@ -1,12 +1,10 @@ package datamaskingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingrules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/README.md b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/README.md index f59a1667b67..7d8a9abeeb7 100644 --- a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/README.md +++ b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities` Documentation -The `datawarehouseuseractivities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `datawarehouseuseractivities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/client.go b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/client.go index 8e4a0c988a9..98e15f11f1c 100644 --- a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/client.go +++ b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/client.go @@ -15,7 +15,7 @@ type DataWarehouseUserActivitiesClient struct { } func NewDataWarehouseUserActivitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataWarehouseUserActivitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataWarehouseUserActivitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/method_get.go b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/method_get.go index d9a8d7e8736..2d7d9d01bb7 100644 --- a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/method_get.go @@ -47,7 +47,6 @@ func (c DataWarehouseUserActivitiesClient) Get(ctx context.Context, id commonids var model DataWarehouseUserActivities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/version.go b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/version.go index f9e65bf4413..6932a4d5aa9 100644 --- a/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/version.go +++ b/resource-manager/sql/2023-05-01-preview/datawarehouseuseractivities/version.go @@ -1,12 +1,10 @@ package datawarehouseuseractivities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datawarehouseuseractivities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datawarehouseuseractivities/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/README.md b/resource-manager/sql/2023-05-01-preview/deletedservers/README.md index 63fc2e3246a..102183cae55 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/README.md +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/deletedservers` Documentation -The `deletedservers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `deletedservers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/client.go b/resource-manager/sql/2023-05-01-preview/deletedservers/client.go index da406faf779..6679ead4a59 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/client.go +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/client.go @@ -15,7 +15,7 @@ type DeletedServersClient struct { } func NewDeletedServersClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/id_deletedserver.go b/resource-manager/sql/2023-05-01-preview/deletedservers/id_deletedserver.go index f85db77184a..926acac3291 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/id_deletedserver.go +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/id_deletedserver.go @@ -42,7 +42,7 @@ func ParseDeletedServerID(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServerIDInsensitively(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/id_location.go b/resource-manager/sql/2023-05-01-preview/deletedservers/id_location.go index ed2547876bf..611b5dbd842 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/method_get.go b/resource-manager/sql/2023-05-01-preview/deletedservers/method_get.go index 25162a744c8..7f7f83241ae 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/method_get.go @@ -45,7 +45,6 @@ func (c DeletedServersClient) Get(ctx context.Context, id DeletedServerId) (resu var model DeletedServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/deletedservers/version.go b/resource-manager/sql/2023-05-01-preview/deletedservers/version.go index 8560cb72d30..2145438a853 100644 --- a/resource-manager/sql/2023-05-01-preview/deletedservers/version.go +++ b/resource-manager/sql/2023-05-01-preview/deletedservers/version.go @@ -1,12 +1,10 @@ package deletedservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservers/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/README.md b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/README.md index 4b2216ae5af..81a1aaa3628 100644 --- a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups` Documentation -The `distributedavailabilitygroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `distributedavailabilitygroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/client.go b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/client.go index 770627d26fb..f9d46b7aa4b 100644 --- a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/client.go @@ -15,7 +15,7 @@ type DistributedAvailabilityGroupsClient struct { } func NewDistributedAvailabilityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DistributedAvailabilityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DistributedAvailabilityGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go index a1abbaa89b3..371a12d6563 100644 --- a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go +++ b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go @@ -44,7 +44,7 @@ func ParseDistributedAvailabilityGroupID(input string) (*DistributedAvailability } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDistributedAvailabilityGroupIDInsensitively(input string) (*Distribute } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/method_get.go b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/method_get.go index 60b15807eb5..d60cf4fdf20 100644 --- a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/method_get.go @@ -45,7 +45,6 @@ func (c DistributedAvailabilityGroupsClient) Get(ctx context.Context, id Distrib var model DistributedAvailabilityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/version.go b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/version.go index 911f492b5bb..691e2500493 100644 --- a/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/distributedavailabilitygroups/version.go @@ -1,12 +1,10 @@ package distributedavailabilitygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/distributedavailabilitygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/distributedavailabilitygroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/README.md b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/README.md index 759befed219..91bc6c3223a 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/README.md +++ b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/elasticpooloperations` Documentation -The `elasticpooloperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `elasticpooloperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/client.go b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/client.go index 594f5bcc3e4..fbaee40df4b 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/client.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/client.go @@ -15,7 +15,7 @@ type ElasticPoolOperationsClient struct { } func NewElasticPoolOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpooloperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpooloperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/id_operation.go b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/id_operation.go index e5e330ca72b..50733e73bef 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/id_operation.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/version.go b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/version.go index 3fc5bf7bab7..12dab77fb77 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpooloperations/version.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpooloperations/version.go @@ -1,12 +1,10 @@ package elasticpooloperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpooloperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpooloperations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpools/README.md b/resource-manager/sql/2023-05-01-preview/elasticpools/README.md index 0d0f414a35f..7b4aebe9166 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpools/README.md +++ b/resource-manager/sql/2023-05-01-preview/elasticpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/elasticpools` Documentation -The `elasticpools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `elasticpools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/elasticpools/client.go b/resource-manager/sql/2023-05-01-preview/elasticpools/client.go index 2fbd56d5c0d..d6335179470 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpools/client.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpools/client.go @@ -15,7 +15,7 @@ type ElasticPoolsClient struct { } func NewElasticPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpools/method_get.go b/resource-manager/sql/2023-05-01-preview/elasticpools/method_get.go index f311ee6c3f9..8cad14ea50b 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpools/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpools/method_get.go @@ -46,7 +46,6 @@ func (c ElasticPoolsClient) Get(ctx context.Context, id commonids.SqlElasticPool var model ElasticPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpools/method_listbyserver.go b/resource-manager/sql/2023-05-01-preview/elasticpools/method_listbyserver.go index 6d3b53d468b..62ae75c61d6 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpools/method_listbyserver.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpools/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/elasticpools/version.go b/resource-manager/sql/2023-05-01-preview/elasticpools/version.go index de83237bd16..8701b35e27e 100644 --- a/resource-manager/sql/2023-05-01-preview/elasticpools/version.go +++ b/resource-manager/sql/2023-05-01-preview/elasticpools/version.go @@ -1,12 +1,10 @@ package elasticpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpools/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/README.md b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/README.md index 2d41ce625c5..2403a451114 100644 --- a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/README.md +++ b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/encryptionprotectors` Documentation -The `encryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `encryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/client.go b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/client.go index 0213a8a383d..f72697edceb 100644 --- a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/client.go +++ b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/client.go @@ -15,7 +15,7 @@ type EncryptionProtectorsClient struct { } func NewEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/method_get.go b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/method_get.go index 659214dd4e9..f1b561315dc 100644 --- a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c EncryptionProtectorsClient) Get(ctx context.Context, id commonids.SqlSer var model EncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/version.go b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/version.go index 45c1d773724..e4ee3d06b1a 100644 --- a/resource-manager/sql/2023-05-01-preview/encryptionprotectors/version.go +++ b/resource-manager/sql/2023-05-01-preview/encryptionprotectors/version.go @@ -1,12 +1,10 @@ package encryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionprotectors/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/endpointcertificates/README.md b/resource-manager/sql/2023-05-01-preview/endpointcertificates/README.md index c17a0af1ef0..8e373ebbeba 100644 --- a/resource-manager/sql/2023-05-01-preview/endpointcertificates/README.md +++ b/resource-manager/sql/2023-05-01-preview/endpointcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/endpointcertificates` Documentation -The `endpointcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `endpointcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/endpointcertificates/client.go b/resource-manager/sql/2023-05-01-preview/endpointcertificates/client.go index d10853ad816..d3524ab4566 100644 --- a/resource-manager/sql/2023-05-01-preview/endpointcertificates/client.go +++ b/resource-manager/sql/2023-05-01-preview/endpointcertificates/client.go @@ -15,7 +15,7 @@ type EndpointCertificatesClient struct { } func NewEndpointCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/endpointcertificates/id_endpointcertificate.go b/resource-manager/sql/2023-05-01-preview/endpointcertificates/id_endpointcertificate.go index 26d04f447fb..3835fcdf65e 100644 --- a/resource-manager/sql/2023-05-01-preview/endpointcertificates/id_endpointcertificate.go +++ b/resource-manager/sql/2023-05-01-preview/endpointcertificates/id_endpointcertificate.go @@ -44,7 +44,7 @@ func ParseEndpointCertificateID(input string) (*EndpointCertificateId, error) { } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointCertificateIDInsensitively(input string) (*EndpointCertificate } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/endpointcertificates/method_get.go b/resource-manager/sql/2023-05-01-preview/endpointcertificates/method_get.go index b7a356deab9..dfe976af079 100644 --- a/resource-manager/sql/2023-05-01-preview/endpointcertificates/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/endpointcertificates/method_get.go @@ -45,7 +45,6 @@ func (c EndpointCertificatesClient) Get(ctx context.Context, id EndpointCertific var model EndpointCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/endpointcertificates/version.go b/resource-manager/sql/2023-05-01-preview/endpointcertificates/version.go index 26ca40cff6c..484851c6d16 100644 --- a/resource-manager/sql/2023-05-01-preview/endpointcertificates/version.go +++ b/resource-manager/sql/2023-05-01-preview/endpointcertificates/version.go @@ -1,12 +1,10 @@ package endpointcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointcertificates/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/failovergroups/README.md b/resource-manager/sql/2023-05-01-preview/failovergroups/README.md index 81b0e3e63f1..a18bfaedde2 100644 --- a/resource-manager/sql/2023-05-01-preview/failovergroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/failovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/failovergroups` Documentation -The `failovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `failovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/failovergroups/client.go b/resource-manager/sql/2023-05-01-preview/failovergroups/client.go index edf4434acee..2ea4965a0c0 100644 --- a/resource-manager/sql/2023-05-01-preview/failovergroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/failovergroups/client.go @@ -15,7 +15,7 @@ type FailoverGroupsClient struct { } func NewFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "failovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "failovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/failovergroups/id_failovergroup.go b/resource-manager/sql/2023-05-01-preview/failovergroups/id_failovergroup.go index b27ee1d2961..3a16eb69b5d 100644 --- a/resource-manager/sql/2023-05-01-preview/failovergroups/id_failovergroup.go +++ b/resource-manager/sql/2023-05-01-preview/failovergroups/id_failovergroup.go @@ -44,7 +44,7 @@ func ParseFailoverGroupID(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFailoverGroupIDInsensitively(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/failovergroups/method_get.go b/resource-manager/sql/2023-05-01-preview/failovergroups/method_get.go index ab2386fa0a5..61d249dd805 100644 --- a/resource-manager/sql/2023-05-01-preview/failovergroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/failovergroups/method_get.go @@ -45,7 +45,6 @@ func (c FailoverGroupsClient) Get(ctx context.Context, id FailoverGroupId) (resu var model FailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/failovergroups/version.go b/resource-manager/sql/2023-05-01-preview/failovergroups/version.go index 1c0edf92255..8d5590ac783 100644 --- a/resource-manager/sql/2023-05-01-preview/failovergroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/failovergroups/version.go @@ -1,12 +1,10 @@ package failovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/failovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/failovergroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/README.md b/resource-manager/sql/2023-05-01-preview/firewallrules/README.md index ed35ee0e90e..4f53b445507 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/README.md +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/client.go b/resource-manager/sql/2023-05-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/client.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/id_firewallrule.go b/resource-manager/sql/2023-05-01-preview/firewallrules/id_firewallrule.go index 36610c932a0..ad5d1b2e0b0 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/firewallrules/method_createorupdate.go index 20251b56b61..a122b14e4d9 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/method_get.go b/resource-manager/sql/2023-05-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/method_replace.go b/resource-manager/sql/2023-05-01-preview/firewallrules/method_replace.go index 5541e3df8a2..97cafcd2e7a 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/method_replace.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/method_replace.go @@ -52,7 +52,6 @@ func (c FirewallRulesClient) Replace(ctx context.Context, id commonids.SqlServer var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/firewallrules/version.go b/resource-manager/sql/2023-05-01-preview/firewallrules/version.go index ff41ad34b49..d86f71ba3cb 100644 --- a/resource-manager/sql/2023-05-01-preview/firewallrules/version.go +++ b/resource-manager/sql/2023-05-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/README.md b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/README.md index b7f46e86bb6..f9054104d2d 100644 --- a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/geobackuppolicies` Documentation -The `geobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `geobackuppolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/client.go b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/client.go index dbc369d4a8a..bef6b615722 100644 --- a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/client.go @@ -15,7 +15,7 @@ type GeoBackupPoliciesClient struct { } func NewGeoBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*GeoBackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "geobackuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "geobackuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GeoBackupPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_createorupdate.go index 0df4cf0ab5d..d329ea74a15 100644 --- a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, id commonid var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_get.go index 7927b9f10a6..8a37d55fda5 100644 --- a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/method_get.go @@ -47,7 +47,6 @@ func (c GeoBackupPoliciesClient) Get(ctx context.Context, id commonids.SqlDataba var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/version.go b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/version.go index 5a0711fb1f7..4e6c3266164 100644 --- a/resource-manager/sql/2023-05-01-preview/geobackuppolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/geobackuppolicies/version.go @@ -1,12 +1,10 @@ package geobackuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geobackuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/geobackuppolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/README.md b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/README.md index fb35c080561..ace17331412 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/instancefailovergroups` Documentation -The `instancefailovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `instancefailovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/client.go b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/client.go index 77237fd2c0a..32dba8d6339 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/client.go @@ -15,7 +15,7 @@ type InstanceFailoverGroupsClient struct { } func NewInstanceFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstanceFailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancefailovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancefailovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstanceFailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_instancefailovergroup.go b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_instancefailovergroup.go index 56d3645eed9..478205f6ec3 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_instancefailovergroup.go +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_instancefailovergroup.go @@ -44,7 +44,7 @@ func ParseInstanceFailoverGroupID(input string) (*InstanceFailoverGroupId, error } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceFailoverGroupIDInsensitively(input string) (*InstanceFailoverG } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_providerlocation.go b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_providerlocation.go index 43354417237..4a8e272c043 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_providerlocation.go +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/method_get.go b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/method_get.go index 1254e8ce94b..97fdea7143e 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/method_get.go @@ -45,7 +45,6 @@ func (c InstanceFailoverGroupsClient) Get(ctx context.Context, id InstanceFailov var model InstanceFailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/version.go b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/version.go index eac0e2cb9fe..b12686b93ae 100644 --- a/resource-manager/sql/2023-05-01-preview/instancefailovergroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/instancefailovergroups/version.go @@ -1,12 +1,10 @@ package instancefailovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancefailovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancefailovergroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/instancepools/README.md b/resource-manager/sql/2023-05-01-preview/instancepools/README.md index b2b7e42e8e7..d1ca01c6882 100644 --- a/resource-manager/sql/2023-05-01-preview/instancepools/README.md +++ b/resource-manager/sql/2023-05-01-preview/instancepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/instancepools` Documentation -The `instancepools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `instancepools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/instancepools/client.go b/resource-manager/sql/2023-05-01-preview/instancepools/client.go index 4454bc0d353..a637ecc1205 100644 --- a/resource-manager/sql/2023-05-01-preview/instancepools/client.go +++ b/resource-manager/sql/2023-05-01-preview/instancepools/client.go @@ -15,7 +15,7 @@ type InstancePoolsClient struct { } func NewInstancePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstancePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstancePoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/instancepools/id_instancepool.go b/resource-manager/sql/2023-05-01-preview/instancepools/id_instancepool.go index 7edfa1a28aa..ed208898430 100644 --- a/resource-manager/sql/2023-05-01-preview/instancepools/id_instancepool.go +++ b/resource-manager/sql/2023-05-01-preview/instancepools/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/instancepools/method_get.go b/resource-manager/sql/2023-05-01-preview/instancepools/method_get.go index b33774f4fc8..b953e524138 100644 --- a/resource-manager/sql/2023-05-01-preview/instancepools/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/instancepools/method_get.go @@ -45,7 +45,6 @@ func (c InstancePoolsClient) Get(ctx context.Context, id InstancePoolId) (result var model InstancePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/instancepools/version.go b/resource-manager/sql/2023-05-01-preview/instancepools/version.go index 685c2e397dd..e4b8cfb6278 100644 --- a/resource-manager/sql/2023-05-01-preview/instancepools/version.go +++ b/resource-manager/sql/2023-05-01-preview/instancepools/version.go @@ -1,12 +1,10 @@ package instancepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancepools/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/README.md b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/README.md index 1562e9dae16..c5fbcb94c5c 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/README.md +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/ipv6firewallrules` Documentation -The `ipv6firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `ipv6firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/client.go b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/client.go index be0b08e1bdb..59b1646ba2d 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/client.go +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/client.go @@ -15,7 +15,7 @@ type IPv6FirewallRulesClient struct { } func NewIPv6FirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*IPv6FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipv6firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipv6firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPv6FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/id_ipv6firewallrule.go b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/id_ipv6firewallrule.go index 8ff72cf837d..eb3a1d11bf8 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/id_ipv6firewallrule.go +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/id_ipv6firewallrule.go @@ -44,7 +44,7 @@ func ParseIPv6FirewallRuleID(input string) (*IPv6FirewallRuleId, error) { } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIPv6FirewallRuleIDInsensitively(input string) (*IPv6FirewallRuleId, er } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_createorupdate.go index 011a037dba9..51a11453d62 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, id IPv6Fire var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_get.go b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_get.go index fcacb9b30c6..7eec857c439 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c IPv6FirewallRulesClient) Get(ctx context.Context, id IPv6FirewallRuleId) var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/version.go b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/version.go index 7645ab6923d..f75c984716f 100644 --- a/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/version.go +++ b/resource-manager/sql/2023-05-01-preview/ipv6firewallrules/version.go @@ -1,12 +1,10 @@ package ipv6firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipv6firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipv6firewallrules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobagents/README.md b/resource-manager/sql/2023-05-01-preview/jobagents/README.md index ed42827a9c9..b3813dc1b1f 100644 --- a/resource-manager/sql/2023-05-01-preview/jobagents/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobagents` Documentation -The `jobagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobagents/client.go b/resource-manager/sql/2023-05-01-preview/jobagents/client.go index ab27e52d87a..12ff1946c03 100644 --- a/resource-manager/sql/2023-05-01-preview/jobagents/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobagents/client.go @@ -15,7 +15,7 @@ type JobAgentsClient struct { } func NewJobAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobagents/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobagents/id_jobagent.go index 35f4497a3da..fb9135ac062 100644 --- a/resource-manager/sql/2023-05-01-preview/jobagents/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobagents/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobagents/method_get.go b/resource-manager/sql/2023-05-01-preview/jobagents/method_get.go index 433d5a1b380..ee85f1b86c7 100644 --- a/resource-manager/sql/2023-05-01-preview/jobagents/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobagents/method_get.go @@ -45,7 +45,6 @@ func (c JobAgentsClient) Get(ctx context.Context, id JobAgentId) (result GetOper var model JobAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobagents/version.go b/resource-manager/sql/2023-05-01-preview/jobagents/version.go index 42adee8be7e..68d25307ce5 100644 --- a/resource-manager/sql/2023-05-01-preview/jobagents/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobagents/version.go @@ -1,12 +1,10 @@ package jobagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobagents/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/README.md b/resource-manager/sql/2023-05-01-preview/jobcredentials/README.md index f4147c19321..fd443ba9fa6 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobcredentials` Documentation -The `jobcredentials` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobcredentials` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/client.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/client.go index 0977cf3d384..9bc1ca997fe 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/client.go @@ -15,7 +15,7 @@ type JobCredentialsClient struct { } func NewJobCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobCredentialsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/id_credential.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/id_credential.go index 6b7ea0b08a1..159c1c26ed9 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/id_credential.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/id_credential.go @@ -46,7 +46,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/id_jobagent.go index 94291d1711b..9efd8aaeb2a 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/method_createorupdate.go index 3f021789ab4..9cd18192efa 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialI var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/method_get.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/method_get.go index 27cbbfe3550..c9c5e2020d9 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/method_get.go @@ -45,7 +45,6 @@ func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobcredentials/version.go b/resource-manager/sql/2023-05-01-preview/jobcredentials/version.go index 01558a07ee4..37d344370df 100644 --- a/resource-manager/sql/2023-05-01-preview/jobcredentials/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobcredentials/version.go @@ -1,12 +1,10 @@ package jobcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcredentials/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/README.md b/resource-manager/sql/2023-05-01-preview/jobexecutions/README.md index 08d01ebcde6..5a4f4525479 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobexecutions` Documentation -The `jobexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/client.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/client.go index b52787a2a5b..cad4ae0b98f 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/client.go @@ -15,7 +15,7 @@ type JobExecutionsClient struct { } func NewJobExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_execution.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_execution.go index 9892ee270be..7613e0b20d9 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_execution.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_job.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_job.go index 487e172c701..b5991da3410 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_job.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_jobagent.go index dc929e76456..9df1db2dc84 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_get.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_get.go index d8d69abc245..9c693797e4c 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobExecutionsClient) Get(ctx context.Context, id ExecutionId) (result Ge var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyagent.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyagent.go index 102e1c0c866..3a05ff3fcb6 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyagent.go @@ -45,6 +45,7 @@ func (o ListByAgentOperationOptions) ToHeaders() *client.Headers { func (o ListByAgentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyjob.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyjob.go index f20a5ddb75a..e757e5359ff 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyjob.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/method_listbyjob.go @@ -45,6 +45,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/jobexecutions/version.go b/resource-manager/sql/2023-05-01-preview/jobexecutions/version.go index 95f411fb47d..5c7835c1b10 100644 --- a/resource-manager/sql/2023-05-01-preview/jobexecutions/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobexecutions/version.go @@ -1,12 +1,10 @@ package jobexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobexecutions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/README.md b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/README.md index 20f57ac7ebd..e48faa949db 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobprivateendpoints` Documentation -The `jobprivateendpoints` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobprivateendpoints` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/client.go b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/client.go index f8e9fe6b48c..dafe168f98e 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/client.go @@ -15,7 +15,7 @@ type JobPrivateEndpointsClient struct { } func NewJobPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobPrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobprivateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobprivateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobPrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_jobagent.go index ec86d370193..868a6e17c76 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_privateendpoint.go b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_privateendpoint.go index b0c35bf809e..77eec226344 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_privateendpoint.go +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/id_privateendpoint.go @@ -46,7 +46,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/method_get.go b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/method_get.go index 4d46cb9f263..02f75d07cc3 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/method_get.go @@ -45,7 +45,6 @@ func (c JobPrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId var model JobPrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/version.go b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/version.go index fd6a37ab345..3c925aa9e89 100644 --- a/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobprivateendpoints/version.go @@ -1,12 +1,10 @@ package jobprivateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobprivateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobprivateendpoints/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/README.md b/resource-manager/sql/2023-05-01-preview/jobs/README.md index ae46738c88a..961feca267c 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobs/client.go b/resource-manager/sql/2023-05-01-preview/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/id_job.go b/resource-manager/sql/2023-05-01-preview/jobs/id_job.go index 74e38cf42db..94b94f22d2c 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/id_job.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobs/id_jobagent.go index d8c462a952d..38ae229c3f9 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/jobs/method_createorupdate.go index 769a43e93f0..f3c623fcd53 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobsClient) CreateOrUpdate(ctx context.Context, id JobId, input Job) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/method_get.go b/resource-manager/sql/2023-05-01-preview/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobs/version.go b/resource-manager/sql/2023-05-01-preview/jobs/version.go index d93c2e565d9..d1fd4f7e229 100644 --- a/resource-manager/sql/2023-05-01-preview/jobs/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/README.md b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/README.md index 8fd70213496..40409b8c534 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobstepexecutions` Documentation -The `jobstepexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobstepexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/client.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/client.go index 505fab937cf..097a54ba533 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/client.go @@ -15,7 +15,7 @@ type JobStepExecutionsClient struct { } func NewJobStepExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstepexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstepexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_execution.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_execution.go index dc6ed7bfaa6..1ce8d1ea19f 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_execution.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_executionstep.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_executionstep.go index b114b1d0236..489ca126e41 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_get.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_get.go index a0551816208..0eb160b968b 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobStepExecutionsClient) Get(ctx context.Context, id ExecutionStepId) (r var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_listbyjobexecution.go index e7c228c0e49..b3a448d3137 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/version.go b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/version.go index 58222d92aa0..426689d5dfb 100644 --- a/resource-manager/sql/2023-05-01-preview/jobstepexecutions/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobstepexecutions/version.go @@ -1,12 +1,10 @@ package jobstepexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstepexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstepexecutions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/README.md b/resource-manager/sql/2023-05-01-preview/jobsteps/README.md index 9f4c0d58c23..e519c966ad2 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobsteps` Documentation -The `jobsteps` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobsteps` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/client.go b/resource-manager/sql/2023-05-01-preview/jobsteps/client.go index cc5801243a3..51ed069463b 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/client.go @@ -15,7 +15,7 @@ type JobStepsClient struct { } func NewJobStepsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobsteps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobsteps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/id_job.go b/resource-manager/sql/2023-05-01-preview/jobsteps/id_job.go index b30a6d1461e..5f349b17d55 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/id_job.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/id_step.go b/resource-manager/sql/2023-05-01-preview/jobsteps/id_step.go index 32c798fcf61..3d1c88df21a 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/id_step.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/id_step.go @@ -48,7 +48,7 @@ func ParseStepID(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStepIDInsensitively(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/id_version.go b/resource-manager/sql/2023-05-01-preview/jobsteps/id_version.go index b2fd57d5973..424c7d21890 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/id_version.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/id_versionstep.go b/resource-manager/sql/2023-05-01-preview/jobsteps/id_versionstep.go index 2342ceeb2eb..217ac00cda3 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/id_versionstep.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/id_versionstep.go @@ -50,7 +50,7 @@ func ParseVersionStepID(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseVersionStepIDInsensitively(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/jobsteps/method_createorupdate.go index 6d1f3f7f052..20835ec1bf8 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobStepsClient) CreateOrUpdate(ctx context.Context, id StepId, input Job var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/method_get.go b/resource-manager/sql/2023-05-01-preview/jobsteps/method_get.go index fe4c2266990..9fe63607acd 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/method_get.go @@ -45,7 +45,6 @@ func (c JobStepsClient) Get(ctx context.Context, id StepId) (result GetOperation var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/method_getbyversion.go b/resource-manager/sql/2023-05-01-preview/jobsteps/method_getbyversion.go index bf925aec949..61fe0bd36ef 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/method_getbyversion.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/method_getbyversion.go @@ -45,7 +45,6 @@ func (c JobStepsClient) GetByVersion(ctx context.Context, id VersionStepId) (res var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobsteps/version.go b/resource-manager/sql/2023-05-01-preview/jobsteps/version.go index 7cdd2f5da32..2a74d933a11 100644 --- a/resource-manager/sql/2023-05-01-preview/jobsteps/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobsteps/version.go @@ -1,12 +1,10 @@ package jobsteps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobsteps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobsteps/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/README.md b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/README.md index 2b002ecdfc6..2f0d63611f0 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobtargetexecutions` Documentation -The `jobtargetexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobtargetexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/client.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/client.go index c0a9a88da76..5e5c95f15ea 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/client.go @@ -15,7 +15,7 @@ type JobTargetExecutionsClient struct { } func NewJobTargetExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_execution.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_execution.go index 8e04cde0125..eba1458a90e 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_execution.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_executionstep.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_executionstep.go index 4d5f8c51f1e..3909011262d 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_target.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_target.go index 992dd7f26e5..4f79d9c93b9 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_target.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/id_target.go @@ -52,7 +52,7 @@ func ParseTargetID(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseTargetIDInsensitively(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_get.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_get.go index 34bd9867542..5f1676b9a64 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetExecutionsClient) Get(ctx context.Context, id TargetId) (result var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbyjobexecution.go index 1a171760d34..a98a024e117 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbystep.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbystep.go index e3bfb49f5a4..9f647e1f496 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbystep.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/method_listbystep.go @@ -45,6 +45,7 @@ func (o ListByStepOperationOptions) ToHeaders() *client.Headers { func (o ListByStepOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/version.go b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/version.go index 3b089092ce8..56ebb0fb9ec 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetexecutions/version.go @@ -1,12 +1,10 @@ package jobtargetexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetexecutions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/README.md b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/README.md index 9454aa99070..e2c99d6ad97 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobtargetgroups` Documentation -The `jobtargetgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobtargetgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/client.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/client.go index e797ddd9702..0b3a0245e33 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/client.go @@ -15,7 +15,7 @@ type JobTargetGroupsClient struct { } func NewJobTargetGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_jobagent.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_jobagent.go index 58ffd117c50..ab68b6a0cd7 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_jobagent.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_targetgroup.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_targetgroup.go index b756f36265f..ce03b2e09f0 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_targetgroup.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/id_targetgroup.go @@ -46,7 +46,7 @@ func ParseTargetGroupID(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTargetGroupIDInsensitively(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_createorupdate.go index b3e95b511bb..a4c7de8d4fb 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, id TargetGrou var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_get.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_get.go index 88762b5b420..bf1e5978670 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetGroupsClient) Get(ctx context.Context, id TargetGroupId) (resul var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/version.go b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/version.go index c204cf943ab..8a67574a595 100644 --- a/resource-manager/sql/2023-05-01-preview/jobtargetgroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobtargetgroups/version.go @@ -1,12 +1,10 @@ package jobtargetgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetgroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/README.md b/resource-manager/sql/2023-05-01-preview/jobversions/README.md index ecbc0a52069..771a1ca7e5c 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/README.md +++ b/resource-manager/sql/2023-05-01-preview/jobversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/jobversions` Documentation -The `jobversions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `jobversions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/client.go b/resource-manager/sql/2023-05-01-preview/jobversions/client.go index 6fad5b76da0..34b9c35d823 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/client.go +++ b/resource-manager/sql/2023-05-01-preview/jobversions/client.go @@ -15,7 +15,7 @@ type JobVersionsClient struct { } func NewJobVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobVersionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/id_job.go b/resource-manager/sql/2023-05-01-preview/jobversions/id_job.go index 403aeebc0a1..92c98eb09fb 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/id_job.go +++ b/resource-manager/sql/2023-05-01-preview/jobversions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/id_version.go b/resource-manager/sql/2023-05-01-preview/jobversions/id_version.go index 3c7270ed145..1977931b046 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/id_version.go +++ b/resource-manager/sql/2023-05-01-preview/jobversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/method_get.go b/resource-manager/sql/2023-05-01-preview/jobversions/method_get.go index 0b960bfccf8..02d5d8e4621 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/jobversions/method_get.go @@ -45,7 +45,6 @@ func (c JobVersionsClient) Get(ctx context.Context, id VersionId) (result GetOpe var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/jobversions/version.go b/resource-manager/sql/2023-05-01-preview/jobversions/version.go index fc0b6d23c90..a3861be8ab0 100644 --- a/resource-manager/sql/2023-05-01-preview/jobversions/version.go +++ b/resource-manager/sql/2023-05-01-preview/jobversions/version.go @@ -1,12 +1,10 @@ package jobversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobversions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/README.md b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/README.md index 56933d57d5e..aa0cd5f1c4d 100644 --- a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads` Documentation -The `ledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `ledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/client.go b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/client.go index ce01a3f7d58..db269c39127 100644 --- a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type LedgerDigestUploadsClient struct { } func NewLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*LedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/method_get.go b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/method_get.go index ebf59affd70..33176ebdcbe 100644 --- a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c LedgerDigestUploadsClient) Get(ctx context.Context, id commonids.SqlData var model LedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/version.go b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/version.go index de513597ef3..b7144668c74 100644 --- a/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-05-01-preview/ledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package ledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ledgerdigestuploads/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/locationcapabilities/README.md b/resource-manager/sql/2023-05-01-preview/locationcapabilities/README.md index 7e7592d8b14..9ecca2f54bc 100644 --- a/resource-manager/sql/2023-05-01-preview/locationcapabilities/README.md +++ b/resource-manager/sql/2023-05-01-preview/locationcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/locationcapabilities` Documentation -The `locationcapabilities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `locationcapabilities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/locationcapabilities/client.go b/resource-manager/sql/2023-05-01-preview/locationcapabilities/client.go index a1b9199a3ec..4b3add57b3b 100644 --- a/resource-manager/sql/2023-05-01-preview/locationcapabilities/client.go +++ b/resource-manager/sql/2023-05-01-preview/locationcapabilities/client.go @@ -15,7 +15,7 @@ type LocationCapabilitiesClient struct { } func NewLocationCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationCapabilitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/locationcapabilities/id_location.go b/resource-manager/sql/2023-05-01-preview/locationcapabilities/id_location.go index facea6d6858..ab6f98bdf2d 100644 --- a/resource-manager/sql/2023-05-01-preview/locationcapabilities/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/locationcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/locationcapabilities/method_capabilitieslistbylocation.go b/resource-manager/sql/2023-05-01-preview/locationcapabilities/method_capabilitieslistbylocation.go index f5e8ce02a3f..1b60f18f5fd 100644 --- a/resource-manager/sql/2023-05-01-preview/locationcapabilities/method_capabilitieslistbylocation.go +++ b/resource-manager/sql/2023-05-01-preview/locationcapabilities/method_capabilitieslistbylocation.go @@ -34,6 +34,7 @@ func (o CapabilitiesListByLocationOperationOptions) ToHeaders() *client.Headers func (o CapabilitiesListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocationCapabilitiesClient) CapabilitiesListByLocation(ctx context.Conte var model LocationCapabilities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/locationcapabilities/version.go b/resource-manager/sql/2023-05-01-preview/locationcapabilities/version.go index 8e1d89c8e18..e07b24e501b 100644 --- a/resource-manager/sql/2023-05-01-preview/locationcapabilities/version.go +++ b/resource-manager/sql/2023-05-01-preview/locationcapabilities/version.go @@ -1,12 +1,10 @@ package locationcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationcapabilities/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/README.md b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/README.md index cb5cb0eb5f9..ed1f0d413f2 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/README.md +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/longtermretentionbackups` Documentation -The `longtermretentionbackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `longtermretentionbackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/client.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/client.go index ca539fe3462..9e4e155a0b4 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/client.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionBackupsClient struct { } func NewLongTermRetentionBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionbackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionbackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_location.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_location.go index df7cbed6823..4f731d61589 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go index dd8495a4805..8cb3eeaca3f 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionServerID(input string) (*LocationLongTermRete } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionServerIDInsensitively(input string) (*Locatio } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go index 249bf4b8d11..7018d094888 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseID(input strin } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseIDInsensitivel } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionbackup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionbackup.go index 6c6cbacc89a..a374cf4d95c 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionbackup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionbackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionBackupID(input string) (*LongTermRetentionBackupId, e } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionBackupIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go index 5097a9b5051..0b0b67bfb76 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupID(input string) (*Lon } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupIDInsensitively(input } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserver.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserver.go index 9614c230220..8aa280c8870 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserver.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserver.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionServerID(input string) (*LongTermRetentionServerId, e } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionServerIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go index 791b09f3625..a4220eb045c 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseID(input string) (*Lon } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseIDInsensitively(input } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_providerlocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_providerlocation.go index b6c17d78354..4102db32a09 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_providerlocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_get.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_get.go index 83e457e6b63..280c8df487d 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) Get(ctx context.Context, id LongTermRete var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_getbyresourcegroup.go index 57ed68a3bb1..22cd05eceda 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbydatabase.go index ebed5c50c8d..7405e8c77cb 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbylocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbylocation.go index 06dc3b458b7..31449bbc121 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbylocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go index d6f15b72a9b..7daf1b2ca94 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go index abdb9a9701e..576995f4a18 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go index 75e7eb7fb92..26fc8480b23 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupServerOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyserver.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyserver.go index 62fdc0efc10..cbc1d3dea3e 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyserver.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/version.go b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/version.go index be899ce6fa1..3302dfea07f 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/version.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionbackups/version.go @@ -1,12 +1,10 @@ package longtermretentionbackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionbackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionbackups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/README.md b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/README.md index a43dcd147a4..4135ed906ae 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/README.md +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups` Documentation -The `longtermretentionmanagedinstancebackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `longtermretentionmanagedinstancebackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/client.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/client.go index 6a32ed2cc3d..c760d7410d6 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/client.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionManagedInstanceBackupsClient struct { } func NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionManagedInstanceBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionManagedInstanceBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_location.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_location.go index 76aca04c642..688972876c3 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go index 4cd0105b5a5..f83052eb802 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionManagedInstanceID(input string) (*LocationLon } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionManagedInstanceIDInsensitively(input string) } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go index acd36dc0106..2f2a7a512ca 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionDatabaseID(input string) (*LongTermRetentionDatabaseI } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionDatabaseIDInsensitively(input string) (*LongTermReten } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go index 03694cb1e88..a30394c2312 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupID(inpu } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupIDInsen } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go index 1c25962cb70..5e208b12a7a 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionManagedInstanceID(input string) (*LongTermRetentionMa } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionManagedInstanceIDInsensitively(input string) (*LongTe } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go index ffc4b70b6e0..cf4522057fb 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceBackupID(input string) (*LongTermReten } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceBackupIDInsensitively(input string) (* } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go index 3c8e12e6554..89cd3acb4b6 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseID(input stri } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseIDInsensitive } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go index c0e83746fc2..628ce0b4457 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_get.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_get.go index e303ce4c680..52afb6a0447 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go index 15a359e9eb0..b3da83c7539 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx co var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go index 15551674f0e..ffe527054b7 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go index 846cb7d2c45..ee445c5bb99 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go index c94f12c6d5a..bb957a98e53 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go @@ -43,6 +43,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go index 50e36859a1c..630b3198164 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go index c596e6dc4a1..f0c0bf40d7d 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupInstanceOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go index 88b355da8fc..24092396c63 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go @@ -43,6 +43,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/version.go b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/version.go index 1e56d123255..210688b1539 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/version.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionmanagedinstancebackups/version.go @@ -1,12 +1,10 @@ package longtermretentionmanagedinstancebackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/README.md index bd638814b53..ba831c98fc4 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies` Documentation -The `longtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `longtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/client.go index 04222fc512a..6cb0156b421 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type LongTermRetentionPoliciesClient struct { } func NewLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/method_get.go index db0dc3527df..094e02d9471 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c LongTermRetentionPoliciesClient) Get(ctx context.Context, id commonids.S var model LongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/version.go index b49572a1546..9f34804bc50 100644 --- a/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/longtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package longtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/README.md b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/README.md index ebcb5e6818a..12d3fbf0bcd 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/README.md +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions` Documentation -The `maintenancewindowoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `maintenancewindowoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/client.go b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/client.go index 1a71a222784..48e61cf6a23 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/client.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowOptionsClient struct { } func NewMaintenanceWindowOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/method_get.go b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/method_get.go index 8df35ad865e..9070bdecbc9 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowOptionsClient) Get(ctx context.Context, id commonids.Sq var model MaintenanceWindowOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/version.go b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/version.go index bb36e02e94e..a78cbccd8a8 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/version.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindowoptions/version.go @@ -1,12 +1,10 @@ package maintenancewindowoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindowoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindowoptions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindows/README.md b/resource-manager/sql/2023-05-01-preview/maintenancewindows/README.md index b64e6cc4af5..f274869389b 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindows/README.md +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/maintenancewindows` Documentation -The `maintenancewindows` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `maintenancewindows` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindows/client.go b/resource-manager/sql/2023-05-01-preview/maintenancewindows/client.go index 0cefd568fde..ea7db39e0d7 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindows/client.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindows/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowsClient struct { } func NewMaintenanceWindowsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_createorupdate.go index d5b61f30d78..2bc30cada7d 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_get.go b/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_get.go index 2358566ed8e..e8b85a9a880 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindows/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowsClient) Get(ctx context.Context, id commonids.SqlDatab var model MaintenanceWindows result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/maintenancewindows/version.go b/resource-manager/sql/2023-05-01-preview/maintenancewindows/version.go index 8c5d1a78e79..09939625ca5 100644 --- a/resource-manager/sql/2023-05-01-preview/maintenancewindows/version.go +++ b/resource-manager/sql/2023-05-01-preview/maintenancewindows/version.go @@ -1,12 +1,10 @@ package maintenancewindows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindows/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/README.md index 497a8f3d50e..78b79c9aa9a 100644 --- a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies` Documentation -The `managedbackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedbackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/client.go index d012d8b6e32..ded8568660a 100644 --- a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedBackupShortTermRetentionPoliciesClient struct { } func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/method_get.go index 1c274cb2a2b..e79878dc564 100644 --- a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/version.go index 28e7f40265c..8fb339c9efd 100644 --- a/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedbackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedbackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md index 372bffd08d3..281f848e922 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings` Documentation -The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go index 796b673c011..41a8c523116 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseAdvancedThreatProtectionSettingsClient struct { } func NewManagedDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go index a8bf22cc47f..3b9adb2f117 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ct var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go index d2bc6f2ad68..4bcb6059d45 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go index 78cf584f02e..1507c3b6b82 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package manageddatabaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/README.md index 969f21859df..abfefe00d25 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns` Documentation -The `manageddatabasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/client.go index f2f48f3c0b0..6fdc391a24c 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseColumnsClient struct { } func NewManagedDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_schematable.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_schematable.go index e9152ed4b57..94a2d1ca52a 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_schematable.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_tablecolumn.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_tablecolumn.go index fc1b5a96046..d13f10399e9 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_tablecolumn.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_get.go index 225de841e2c..1e2e25f1994 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseColumnsClient) Get(ctx context.Context, id TableColumnId) var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbydatabase.go index 8f9d739806f..2620f38e1cc 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbytable.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbytable.go index 1223cbbe5af..d8d08906955 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/version.go index 6e4f1391f09..a749a572a80 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasecolumns/version.go @@ -1,12 +1,10 @@ package manageddatabasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasecolumns/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/README.md index 24551a4ae97..ad413c14a87 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations` Documentation -The `manageddatabasemoveoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasemoveoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/client.go index fe178068f70..b92d919387d 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseMoveOperationsClient struct { } func NewManagedDatabaseMoveOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseMoveOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseMoveOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/id_providerlocation.go b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/id_providerlocation.go index f5b30dde23d..50dd10980e5 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/id_providerlocation.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/method_listbylocation.go b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/method_listbylocation.go index d154d5af320..658e4700de9 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/method_listbylocation.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/version.go index 9f12b2ef270..c8450cbb5b8 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasemoveoperations/version.go @@ -1,12 +1,10 @@ package manageddatabasemoveoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasemoveoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasemoveoperations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/README.md index 5b5ddc79027..06356f6a03f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasequeries` Documentation -The `manageddatabasequeries` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasequeries` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/client.go index 9c0de435452..02f2d413407 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseQueriesClient struct { } func NewManagedDatabaseQueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseQueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasequeries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasequeries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseQueriesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/id_query.go b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/id_query.go index e3aab1ce4b6..19c59b04f5f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/id_query.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/id_query.go @@ -46,7 +46,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_get.go index 99fb027a263..22ceda6679a 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseQueriesClient) Get(ctx context.Context, id QueryId) (resu var model ManagedInstanceQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_listbyquery.go b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_listbyquery.go index e0e521010a7..9e1b714038e 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_listbyquery.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/method_listbyquery.go @@ -41,6 +41,7 @@ func (o ListByQueryOperationOptions) ToHeaders() *client.Headers { func (o ListByQueryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/version.go index 9d2645d1b41..20ee9dcf49f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasequeries/version.go @@ -1,12 +1,10 @@ package manageddatabasequeries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasequeries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasequeries/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/README.md index 8fdfff1652d..f4534ba0adc 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails` Documentation -The `manageddatabaserestoredetails` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabaserestoredetails` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/client.go index d1f42caae83..27cf405d0b9 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseRestoreDetailsClient struct { } func NewManagedDatabaseRestoreDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseRestoreDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseRestoreDetailsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/method_get.go index dce02c891b8..c20a048d179 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, id commoni var model ManagedDatabaseRestoreDetailsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/version.go index 1aa888cdcb2..c2c61cd54b7 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaserestoredetails/version.go @@ -1,12 +1,10 @@ package manageddatabaserestoredetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaserestoredetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaserestoredetails/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabases/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabases/README.md index 1093d7b2fc0..69acca79336 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabases/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabases` Documentation -The `manageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabases/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabases/client.go index d7286c73b10..ba3a6da68af 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabases/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabases/client.go @@ -15,7 +15,7 @@ type ManagedDatabasesClient struct { } func NewManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabases/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabases/method_get.go index d04774f62a4..66605aa1097 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabases/method_get.go @@ -46,7 +46,6 @@ func (c ManagedDatabasesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabases/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabases/version.go index 5333e09f360..b06162c9371 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabases/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabases/version.go @@ -1,12 +1,10 @@ package manageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/README.md index 3fbe4861a29..9678ac926d1 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas` Documentation -The `manageddatabaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/client.go index b06ead3a626..85abf3277a7 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSchemasClient struct { } func NewManagedDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/id_databaseschema.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/id_databaseschema.go index 44f17647870..c65b1f99ec7 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/id_databaseschema.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_get.go index de00813d029..078bf701b38 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSchemasClient) Get(ctx context.Context, id DatabaseSchema var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_listbydatabase.go index 1e9c1d82bec..abc663abef3 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/version.go index 055af55e135..3c3461aa129 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabaseschemas/version.go @@ -1,12 +1,10 @@ package manageddatabaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseschemas/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/README.md index 696c8ab48de..ea93647b643 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies` Documentation -The `manageddatabasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/client.go index dd99d94d57a..39ea31e3f4d 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityAlertPoliciesClient struct { } func NewManagedDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go index e6d916c439c..242c1898286 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.C var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_get.go index 86cc6d16699..edb0bda0d9f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/version.go index eb0b5fc5d3b..3258c795881 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/README.md index 61064f5b8fc..060f0529478 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents` Documentation -The `manageddatabasesecurityevents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasesecurityevents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/client.go index 75a993c8838..1f36e33d9ac 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityEventsClient struct { } func NewManagedDatabaseSecurityEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityEventsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/method_listbydatabase.go index e65ae036286..97e4318326e 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/method_listbydatabase.go @@ -42,6 +42,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/version.go index cb3e7c2c0c1..c820a595b52 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesecurityevents/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityevents/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/README.md index dc94bdbac51..6e87c3da957 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels` Documentation -The `manageddatabasesensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasesensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/client.go index b19840e9433..5f1ce307e35 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSensitivityLabelsClient struct { } func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go index afd25fa75f3..75e9d7b91bf 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSensitivityLabelSourceID(input string) (*SensitivityLa } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSensitivityLabelSourceIDInsensitively(input string) (* } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go index e0a35c17c19..7cf497ad34a 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go index b2aab8c20f0..9cbc8f10e77 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Conte var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_get.go index 62d197105f0..1fd0579b104 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, id Sens var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go index fe2c0337ad5..b1519531487 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go index 103ca96f4ff..5dd91867ecc 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go index 912989aa100..43c4c7959b5 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/version.go index 0c7565e5444..2abb527dfd1 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasesensitivitylabels/version.go @@ -1,12 +1,10 @@ package manageddatabasesensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/README.md index bf413a9257d..2c9e1d031a4 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasetables` Documentation -The `manageddatabasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/client.go index f594505d94c..96587bb312b 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTablesClient struct { } func NewManagedDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_databaseschema.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_databaseschema.go index 7e496fb806a..8a5db7ce72a 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_databaseschema.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_schematable.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_schematable.go index 423679d2c00..de0cd4c9907 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_schematable.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_get.go index 2c93261aa97..02d4e056c9d 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseTablesClient) Get(ctx context.Context, id SchemaTableId) var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_listbyschema.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_listbyschema.go index acd107e0eb0..257f3642fc0 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/version.go index 08c4ed6cdba..5af8a7ea20f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetables/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetables/version.go @@ -1,12 +1,10 @@ package manageddatabasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetables/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/README.md index eb5318384c4..139f37ac988 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption` Documentation -The `manageddatabasetransparentdataencryption` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasetransparentdataencryption` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/client.go index 52d7ec6aa01..31ad96ae97b 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTransparentDataEncryptionClient struct { } func NewManagedDatabaseTransparentDataEncryptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTransparentDataEncryptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTransparentDataEncryptionClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go index 57b03fdf08b..60b433a559a 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx conte var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_get.go index 76731f636b3..b404946cca2 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/version.go index db95d5b203e..ec0676c82a1 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasetransparentdataencryption/version.go @@ -1,12 +1,10 @@ package manageddatabasetransparentdataencryption -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md index 9a829c74c24..148cb0cd0fd 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines` Documentation -The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go index 87a86d15ad1..8868cfd2b70 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go index 08d6e69117d..7f724f5f81c 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go @@ -48,7 +48,7 @@ func ParseBaselineBaselineID(input string) (*BaselineBaselineId, error) { } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineBaselineIDInsensitively(input string) (*BaselineBaselineId, er } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go index a7941a7cfe7..699b0560bb2 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdat var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go index 70f240cd6b1..de5a6f52a37 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx conte var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go index 674794fed37..1556ee90bce 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/README.md index 940ba0a4702..4424979b8ab 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments` Documentation -The `manageddatabasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/client.go index fecb266d1ec..5b498f34f62 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentsClient struct { } func NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go index 3edff16afcb..62d505f7a76 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_get.go index 1245ed42e37..d3c051996fa 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/version.go index 54d2a8595cd..f2c0451291f 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/README.md index 54108fa6863..07dfea1c10c 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans` Documentation -The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/client.go index 321e4c03318..95d6cefb6bf 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentScansClient struct { } func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go index e05b6860c17..f72161ceaa4 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) (*V } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(inpu } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go index 72012d8a05d..c8fef962b10 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Co var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go index d40c91b98dc..4de075471df 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Conte var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/version.go index 568131ee53a..5d10f3c9b90 100644 --- a/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-05-01-preview/manageddatabasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/README.md index 5f42784d960..92d0c681544 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators` Documentation -The `managedinstanceadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/client.go index 3f7e77dcf0f..a7a2aabd80b 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdministratorsClient struct { } func NewManagedInstanceAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/method_get.go index 471776e28e8..c4397fcdc5d 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdministratorsClient) Get(ctx context.Context, id commoni var model ManagedInstanceAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/version.go index 19a3627f7ab..0277a4847ea 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadministrators/version.go @@ -1,12 +1,10 @@ package managedinstanceadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadministrators/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md index 524ae188871..9f1e4f33856 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings` Documentation -The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go index e853dabe68f..6d5512300a2 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdvancedThreatProtectionSettingsClient struct { } func NewManagedInstanceAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go index 14ef4ffd22a..fc9c442e4b6 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedInstanceAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go index 55c854be3b1..226a55bb4d0 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package managedinstanceadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/README.md index 921a5563fff..2f49e69adb7 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications` Documentation -The `managedinstanceazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/client.go index 75cbb0831fd..b6f667aa0f1 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAzureADOnlyAuthenticationsClient struct { } func NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/method_get.go index ad7d02117cc..5b42ddb7ce2 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context var model ManagedInstanceAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/version.go index adc8543eb7d..bac3ed468e9 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package managedinstanceazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/README.md b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/README.md index 1b1d3a843de..5782611ba25 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstancedtcs` Documentation -The `managedinstancedtcs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstancedtcs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/client.go b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/client.go index 5acfb8501a5..4fba23c94a4 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/client.go @@ -15,7 +15,7 @@ type ManagedInstanceDtcsClient struct { } func NewManagedInstanceDtcsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceDtcsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancedtcs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancedtcs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceDtcsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/method_get.go index aa3f960f289..39f964596b4 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceDtcsClient) Get(ctx context.Context, id commonids.SqlMana var model ManagedInstanceDtc result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/version.go b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/version.go index fff59d1dce8..8c93920484f 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancedtcs/version.go @@ -1,12 +1,10 @@ package managedinstancedtcs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancedtcs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancedtcs/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/README.md index 04f282e246f..8f7e77b2f63 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors` Documentation -The `managedinstanceencryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceencryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/client.go index 3688e97050c..37d9140cc63 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/client.go @@ -15,7 +15,7 @@ type ManagedInstanceEncryptionProtectorsClient struct { } func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceEncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceEncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/method_get.go index 067629deb84..d999fb817fd 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, id c var model ManagedInstanceEncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/version.go index 08ce8b5621d..faa9ff67f73 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceencryptionprotectors/version.go @@ -1,12 +1,10 @@ package managedinstanceencryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/README.md b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/README.md index bd790bfc051..8bd25cef0fd 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstancekeys` Documentation -The `managedinstancekeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstancekeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/client.go b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/client.go index 06797198c4d..10eda0b8020 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/client.go @@ -15,7 +15,7 @@ type ManagedInstanceKeysClient struct { } func NewManagedInstanceKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancekeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancekeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/id_managedinstancekey.go b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/id_managedinstancekey.go index 3636ab872d7..9d052c7a56f 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/id_managedinstancekey.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/id_managedinstancekey.go @@ -44,7 +44,7 @@ func ParseManagedInstanceKeyID(input string) (*ManagedInstanceKeyId, error) { } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceKeyIDInsensitively(input string) (*ManagedInstanceKeyId } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_get.go index c7d5ce953d0..a7b6c034e21 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstanceKeysClient) Get(ctx context.Context, id ManagedInstanceKe var model ManagedInstanceKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_listbyinstance.go b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_listbyinstance.go index 140196d0475..ccdcd5aba24 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_listbyinstance.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/version.go b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/version.go index b7b45406472..3cc2c0366c6 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancekeys/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancekeys/version.go @@ -1,12 +1,10 @@ package managedinstancekeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancekeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancekeys/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/README.md index c1d558166e8..0e4975c7838 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies` Documentation -The `managedinstancelongtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstancelongtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/client.go index d86d5f1cb6d..ed08dffdc43 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedInstanceLongTermRetentionPoliciesClient struct { } func NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceLongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceLongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/method_get.go index 5d063142151..17bc6f25917 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/version.go index 6321d57e613..4d461927cfb 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancelongtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedinstancelongtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/README.md index 68f2a178684..1c26e08b3ca 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceoperations` Documentation -The `managedinstanceoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/client.go index e948591d548..8ae66bef970 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/client.go @@ -15,7 +15,7 @@ type ManagedInstanceOperationsClient struct { } func NewManagedInstanceOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/version.go index 24a0f706471..83e32913904 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceoperations/version.go @@ -1,12 +1,10 @@ package managedinstanceoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceoperations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/README.md index 44b1dd53dad..99f0ac19fe4 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections` Documentation -The `managedinstanceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/client.go index 7ae7f20f3fc..b52a5ea4cf4 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateEndpointConnectionsClient struct { } func NewManagedInstancePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go index cb946939c3a..c3a42d71d8f 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateEndpointConnectionID(input string) (*ManagedInst } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateEndpointConnectionIDInsensitively(input string) } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/method_get.go index 938c6671e7a..8de7930b31b 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context var model ManagedInstancePrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/version.go index 6d07eb4d6b4..6eb7654f2d9 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package managedinstanceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/README.md b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/README.md index 07c089f4605..49c9b10c262 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources` Documentation -The `managedinstanceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstanceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/client.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/client.go index d894f68b99c..baa13de3973 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateLinkResourcesClient struct { } func NewManagedInstancePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go index 5f39126e8b7..4529dc63628 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateLinkResourceID(input string) (*ManagedInstancePr } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateLinkResourceIDInsensitively(input string) (*Mana } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/method_get.go index 5cb364c9b70..0bfbfeddc21 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, id M var model ManagedInstancePrivateLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/version.go b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/version.go index f661176e551..63dcd002c59 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstanceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package managedinstanceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/README.md b/resource-manager/sql/2023-05-01-preview/managedinstances/README.md index 2cb7aeef5ea..d9053e52a34 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstances` Documentation -The `managedinstances` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstances` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/client.go b/resource-manager/sql/2023-05-01-preview/managedinstances/client.go index 0618c7ec8de..e894127c1fa 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/client.go @@ -15,7 +15,7 @@ type ManagedInstancesClient struct { } func NewManagedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/id_instancepool.go b/resource-manager/sql/2023-05-01-preview/managedinstances/id_instancepool.go index c4d1f83519f..31548eb6532 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/id_instancepool.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_failover.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_failover.go index 6a09e24ad41..d4650489f17 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_failover.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_get.go index 2c318ce242d..21e7a5561c7 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedInstancesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_list.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_list.go index 55f688b91ac..685fc7f9a70 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_list.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyinstancepool.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyinstancepool.go index f98c7ba2901..8ff253cace4 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbymanagedinstance.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbymanagedinstance.go index 8a7c6f76675..61e9c8e3192 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbymanagedinstance.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbymanagedinstance.go @@ -46,6 +46,7 @@ func (o ListByManagedInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByManagedInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyresourcegroup.go b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyresourcegroup.go index 0a8a15041c2..adbecb68c73 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstances/version.go b/resource-manager/sql/2023-05-01-preview/managedinstances/version.go index 69e122b3511..11f6022e1b0 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstances/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstances/version.go @@ -1,12 +1,10 @@ package managedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstances/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/README.md b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/README.md index 25e33150399..6870b73c630 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates` Documentation -The `managedinstancetdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstancetdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/client.go b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/client.go index 0172abf1626..6dcfb8c143a 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/client.go @@ -15,7 +15,7 @@ type ManagedInstanceTdeCertificatesClient struct { } func NewManagedInstanceTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceTdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceTdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/version.go b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/version.go index 3168b95f95c..0f1d59ab408 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancetdecertificates/version.go @@ -1,12 +1,10 @@ package managedinstancetdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancetdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancetdecertificates/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/README.md b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/README.md index c48a828fb71..364d737b379 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments` Documentation -The `managedinstancevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedinstancevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/client.go b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/client.go index 9b83141b5c6..3caaad8212d 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedInstanceVulnerabilityAssessmentsClient struct { } func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go index eee4d2c4318..e99b5bc3559 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_get.go index d5735bb6e64..cf558597025 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/version.go b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/version.go index 45eee3fed05..165c89362fb 100644 --- a/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedinstancevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package managedinstancevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/README.md b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/README.md index 540c762a57f..507099a2caf 100644 --- a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads` Documentation -The `managedledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/client.go b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/client.go index d4a7d55ccaa..06b0ada5f1e 100644 --- a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type ManagedLedgerDigestUploadsClient struct { } func NewManagedLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedLedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedLedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/method_get.go b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/method_get.go index 6b801615073..e244cc479e9 100644 --- a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c ManagedLedgerDigestUploadsClient) Get(ctx context.Context, id commonids. var model ManagedLedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/version.go b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/version.go index 08a4ddb3a32..e1193c808cd 100644 --- a/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package managedledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedledgerdigestuploads/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md index 5113fbac6ca..27eed384e44 100644 --- a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies` Documentation -The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go index 7f408f7e72e..4d3926b2444 100644 --- a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient stru } func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go index e6d2dafdce3..ec3180f3c8d 100644 --- a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go index 45d81e6d799..658ba4e5f1d 100644 --- a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go index b4e5fccb59e..a94b87c21dd 100644 --- a/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedrestorabledroppeddatabasebackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/README.md b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/README.md index 91b83acfd7c..20befd73ac6 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases` Documentation -The `managedserverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedserverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/client.go b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/client.go index 1004c3cff20..bbb095b5022 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/client.go @@ -15,7 +15,7 @@ type ManagedServerDnsAliasesClient struct { } func NewManagedServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go index 5c1939bd9f3..2bafc3faf2d 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go +++ b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go @@ -44,7 +44,7 @@ func ParseManagedInstanceDnsAliasID(input string) (*ManagedInstanceDnsAliasId, e } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceDnsAliasIDInsensitively(input string) (*ManagedInstance } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/method_get.go b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/method_get.go index 50d39da3459..6d08e132028 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ManagedServerDnsAliasesClient) Get(ctx context.Context, id ManagedInstan var model ManagedServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/version.go b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/version.go index 3399b0dbe93..14b61f23a9c 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedserverdnsaliases/version.go @@ -1,12 +1,10 @@ package managedserverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserverdnsaliases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/README.md b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/README.md index aa4a9c2ce8a..f6fedac49cf 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies` Documentation -The `managedserversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `managedserversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/client.go b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/client.go index 9c1b65773ae..96e6a83b8ad 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedServerSecurityAlertPoliciesClient struct { } func NewManagedServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/method_get.go index fb823b52041..5e927a5ac66 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, id co var model ManagedServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/version.go b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/version.go index 2b7f9f63e20..21b100cf7f0 100644 --- a/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/managedserversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package managedserversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserversecurityalertpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/README.md b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/README.md index 0c929dfc995..64bc14d2dda 100644 --- a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/README.md +++ b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations` Documentation -The `networksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `networksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/client.go b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/client.go index d5d36bae265..20530b9e06a 100644 --- a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/client.go +++ b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterConfigurationsClient struct { } func NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index 6b2bec05bbc..48cb9dd9673 100644 --- a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/method_get.go b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/method_get.go index 812efe32b5d..ff7885e0a3d 100644 --- a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, i var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/version.go b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/version.go index a78bd2010ab..102047d8804 100644 --- a/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/version.go +++ b/resource-manager/sql/2023-05-01-preview/networksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package networksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/README.md b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/README.md index 4957ac0750d..261d19cb6ae 100644 --- a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/README.md +++ b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/outboundfirewallrules` Documentation -The `outboundfirewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `outboundfirewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/client.go b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/client.go index 785040374ca..da90d0a7fa0 100644 --- a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/client.go +++ b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/client.go @@ -15,7 +15,7 @@ type OutboundFirewallRulesClient struct { } func NewOutboundFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundFirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundfirewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundfirewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundFirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/id_outboundfirewallrule.go b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/id_outboundfirewallrule.go index 98acb0e9aa7..5eb4a5c35c0 100644 --- a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/id_outboundfirewallrule.go +++ b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/id_outboundfirewallrule.go @@ -44,7 +44,7 @@ func ParseOutboundFirewallRuleID(input string) (*OutboundFirewallRuleId, error) } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundFirewallRuleIDInsensitively(input string) (*OutboundFirewallRu } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/method_get.go b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/method_get.go index beb1537e220..13c62b7ab15 100644 --- a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/method_get.go @@ -45,7 +45,6 @@ func (c OutboundFirewallRulesClient) Get(ctx context.Context, id OutboundFirewal var model OutboundFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/version.go b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/version.go index fc3d9e7634c..4eceaad1711 100644 --- a/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/version.go +++ b/resource-manager/sql/2023-05-01-preview/outboundfirewallrules/version.go @@ -1,12 +1,10 @@ package outboundfirewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundfirewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundfirewallrules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/README.md b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/README.md index cf4909aeb09..1f0b9b72bbe 100644 --- a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/README.md +++ b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/client.go b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/client.go +++ b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go index 3012f48f358..8300705f772 100644 --- a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/method_get.go b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/version.go b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/version.go index 1d6f53e6787..92f22444c56 100644 --- a/resource-manager/sql/2023-05-01-preview/privateendpointconnections/version.go +++ b/resource-manager/sql/2023-05-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/privatelinkresources/README.md b/resource-manager/sql/2023-05-01-preview/privatelinkresources/README.md index 3d9668dae56..05c383ee7de 100644 --- a/resource-manager/sql/2023-05-01-preview/privatelinkresources/README.md +++ b/resource-manager/sql/2023-05-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/privatelinkresources/client.go b/resource-manager/sql/2023-05-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/sql/2023-05-01-preview/privatelinkresources/client.go +++ b/resource-manager/sql/2023-05-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/sql/2023-05-01-preview/privatelinkresources/id_privatelinkresource.go index 84686616386..ab4bd9a4dea 100644 --- a/resource-manager/sql/2023-05-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/sql/2023-05-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/privatelinkresources/method_get.go b/resource-manager/sql/2023-05-01-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/sql/2023-05-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/privatelinkresources/version.go b/resource-manager/sql/2023-05-01-preview/privatelinkresources/version.go index aa2790ecded..697b2ff4134 100644 --- a/resource-manager/sql/2023-05-01-preview/privatelinkresources/version.go +++ b/resource-manager/sql/2023-05-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/README.md b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/README.md index 8c93f71aae3..83b1e307fb7 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/README.md +++ b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/recoverabledatabases` Documentation -The `recoverabledatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `recoverabledatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/client.go b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/client.go index 7642bb32d16..80982a3b14c 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/client.go +++ b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/client.go @@ -15,7 +15,7 @@ type RecoverableDatabasesClient struct { } func NewRecoverableDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverabledatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverabledatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/id_recoverabledatabase.go b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/id_recoverabledatabase.go index bcdf9b88566..e32ba686d9b 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/id_recoverabledatabase.go +++ b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/id_recoverabledatabase.go @@ -44,7 +44,7 @@ func ParseRecoverableDatabaseID(input string) (*RecoverableDatabaseId, error) { } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRecoverableDatabaseIDInsensitively(input string) (*RecoverableDatabase } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/method_get.go b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/method_get.go index f1d18340b68..2d9eda80b4d 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecoverableDatabasesClient) Get(ctx context.Context, id RecoverableDatab var model RecoverableDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/version.go b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/version.go index cd580a8fb95..6ac8a644b25 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverabledatabases/version.go +++ b/resource-manager/sql/2023-05-01-preview/recoverabledatabases/version.go @@ -1,12 +1,10 @@ package recoverabledatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverabledatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverabledatabases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/README.md b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/README.md index 2a5b9c7d57f..8c6aa611748 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/README.md +++ b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases` Documentation -The `recoverablemanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `recoverablemanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/client.go b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/client.go index f1ddf2d8929..62ff80d8685 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/client.go +++ b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/client.go @@ -15,7 +15,7 @@ type RecoverableManagedDatabasesClient struct { } func NewRecoverableManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go index 16e8e534478..9d703a5f285 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go +++ b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRecoverableDatabaseID(input string) (*ManagedInstanceRe } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRecoverableDatabaseIDInsensitively(input string) (*Mana } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/method_get.go b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/method_get.go index 195ef17cd06..4a358c3509a 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RecoverableManagedDatabasesClient) Get(ctx context.Context, id ManagedIn var model RecoverableManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/version.go b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/version.go index 1287323a342..ce0bb14d7b9 100644 --- a/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/version.go +++ b/resource-manager/sql/2023-05-01-preview/recoverablemanageddatabases/version.go @@ -1,12 +1,10 @@ package recoverablemanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverablemanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverablemanageddatabases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/replicationlinks/README.md b/resource-manager/sql/2023-05-01-preview/replicationlinks/README.md index 31097e1c233..5b40d5bebb0 100644 --- a/resource-manager/sql/2023-05-01-preview/replicationlinks/README.md +++ b/resource-manager/sql/2023-05-01-preview/replicationlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/replicationlinks` Documentation -The `replicationlinks` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `replicationlinks` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/replicationlinks/client.go b/resource-manager/sql/2023-05-01-preview/replicationlinks/client.go index e250a69e9a9..3b6d95b1729 100644 --- a/resource-manager/sql/2023-05-01-preview/replicationlinks/client.go +++ b/resource-manager/sql/2023-05-01-preview/replicationlinks/client.go @@ -15,7 +15,7 @@ type ReplicationLinksClient struct { } func NewReplicationLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLinksClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/replicationlinks/id_replicationlink.go b/resource-manager/sql/2023-05-01-preview/replicationlinks/id_replicationlink.go index 2875766d6b9..ef00cbf2388 100644 --- a/resource-manager/sql/2023-05-01-preview/replicationlinks/id_replicationlink.go +++ b/resource-manager/sql/2023-05-01-preview/replicationlinks/id_replicationlink.go @@ -46,7 +46,7 @@ func ParseReplicationLinkID(input string) (*ReplicationLinkId, error) { } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, erro } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/replicationlinks/method_get.go b/resource-manager/sql/2023-05-01-preview/replicationlinks/method_get.go index ed216d10173..640a612f108 100644 --- a/resource-manager/sql/2023-05-01-preview/replicationlinks/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/replicationlinks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLinksClient) Get(ctx context.Context, id ReplicationLinkId) ( var model ReplicationLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/replicationlinks/version.go b/resource-manager/sql/2023-05-01-preview/replicationlinks/version.go index 80c3a0c7017..c667da59ab9 100644 --- a/resource-manager/sql/2023-05-01-preview/replicationlinks/version.go +++ b/resource-manager/sql/2023-05-01-preview/replicationlinks/version.go @@ -1,12 +1,10 @@ package replicationlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlinks/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/README.md b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/README.md index bec04801c17..cbe3aeec02b 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/README.md +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases` Documentation -The `restorabledroppeddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `restorabledroppeddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/client.go b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/client.go index f6cc9d16ce0..b005e027e5e 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/client.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedDatabasesClient struct { } func NewRestorableDroppedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go index c354a8d7d77..580ea286a65 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseRestorableDroppedDatabaseID(input string) (*RestorableDroppedDatabaseI } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorableDroppedDatabaseIDInsensitively(input string) (*RestorableDro } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/method_get.go b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/method_get.go index 03d3fe22529..7327393e747 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorableDroppedDatabasesClient) Get(ctx context.Context, id Restorable var model RestorableDroppedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/version.go b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/version.go index 8e17c703e1a..6e44cbfb996 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/version.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppeddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppeddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppeddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppeddatabases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/README.md b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/README.md index 936bc90dbc6..5639b193087 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/README.md +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases` Documentation -The `restorabledroppedmanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `restorabledroppedmanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/client.go b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/client.go index f6ddeb790f3..3e9c9bd3617 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/client.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedManagedDatabasesClient struct { } func NewRestorableDroppedManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go index d540997446a..f274ef8ca18 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/method_get.go b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/method_get.go index ab1378426fd..7e520c5f8f6 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, id Man var model RestorableDroppedManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/version.go b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/version.go index 4351fa29e90..b21d9e64875 100644 --- a/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/version.go +++ b/resource-manager/sql/2023-05-01-preview/restorabledroppedmanageddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppedmanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/restorepoints/README.md b/resource-manager/sql/2023-05-01-preview/restorepoints/README.md index 2693d09c529..92d4a5300a7 100644 --- a/resource-manager/sql/2023-05-01-preview/restorepoints/README.md +++ b/resource-manager/sql/2023-05-01-preview/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/restorepoints/client.go b/resource-manager/sql/2023-05-01-preview/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/sql/2023-05-01-preview/restorepoints/client.go +++ b/resource-manager/sql/2023-05-01-preview/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/restorepoints/id_restorepoint.go b/resource-manager/sql/2023-05-01-preview/restorepoints/id_restorepoint.go index 0f855efd93d..5f80e22dbd6 100644 --- a/resource-manager/sql/2023-05-01-preview/restorepoints/id_restorepoint.go +++ b/resource-manager/sql/2023-05-01-preview/restorepoints/id_restorepoint.go @@ -46,7 +46,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/restorepoints/method_get.go b/resource-manager/sql/2023-05-01-preview/restorepoints/method_get.go index 957e733ed23..b3641545843 100644 --- a/resource-manager/sql/2023-05-01-preview/restorepoints/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/restorepoints/method_get.go @@ -45,7 +45,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId) (result var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/restorepoints/version.go b/resource-manager/sql/2023-05-01-preview/restorepoints/version.go index f403a3bb0fe..41005c6ecba 100644 --- a/resource-manager/sql/2023-05-01-preview/restorepoints/version.go +++ b/resource-manager/sql/2023-05-01-preview/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/README.md b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/README.md index f801f84f96a..450d64ae785 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/README.md +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sensitivitylabels` Documentation -The `sensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/client.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/client.go index b4f48c1b8f8..e5c16bac54c 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/client.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/client.go @@ -15,7 +15,7 @@ type SensitivityLabelsClient struct { } func NewSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*SensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_column.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_column.go index a7c5385a6d0..a91c35c47e9 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_column.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_sensitivitylabelsource.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_sensitivitylabelsource.go index b6c36f36f47..03310875a6a 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_sensitivitylabelsource.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/id_sensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSourceID(input string) (*SensitivityLabelSourceId, err } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSourceIDInsensitively(input string) (*SensitivityLabel } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_createorupdate.go index 8dbc9e733ca..5f894e78280 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, id ColumnId var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_get.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_get.go index d13e4b237b0..88bde8c3384 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c SensitivityLabelsClient) Get(ctx context.Context, id SensitivityLabelSou var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listbydatabase.go index 6f57eee31d4..661b362c83e 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listcurrentbydatabase.go index 73a615c88fa..b689585e559 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go index 2e9d85df880..ecaac2fad9f 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/version.go b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/version.go index 5a1013341f1..3df9d5ce102 100644 --- a/resource-manager/sql/2023-05-01-preview/sensitivitylabels/version.go +++ b/resource-manager/sql/2023-05-01-preview/sensitivitylabels/version.go @@ -1,12 +1,10 @@ package sensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sensitivitylabels/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/README.md index 59a2853fd14..0ac367b71c4 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings` Documentation -The `serveradvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serveradvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/client.go index 0e98ea070f7..0d676922ffb 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ServerAdvancedThreatProtectionSettingsClient struct { } func NewServerAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/method_get.go index 54f89c7c6f8..acc2ff53f99 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, i var model ServerAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/version.go index 291287e77bc..504bb7e0075 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package serveradvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/README.md b/resource-manager/sql/2023-05-01-preview/serveradvisors/README.md index cd1d9a1683c..18fc8bacfa9 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/README.md +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serveradvisors` Documentation -The `serveradvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serveradvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/client.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/client.go index 2eae0c06a2b..3933667d1fe 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/client.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/client.go @@ -15,7 +15,7 @@ type ServerAdvisorsClient struct { } func NewServerAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/id_advisor.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/id_advisor.go index 3b88efe407d..93527e7f54d 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/id_advisor.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_get.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_get.go index 7e374d14539..027a2dd784b 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_get.go @@ -45,7 +45,6 @@ func (c ServerAdvisorsClient) Get(ctx context.Context, id AdvisorId) (result Get var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_listbyserver.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_listbyserver.go index 0ab13d2757c..88ed4156027 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_listbyserver.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_listbyserver.go @@ -35,6 +35,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServerAdvisorsClient) ListByServer(ctx context.Context, id commonids.Sql var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_update.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_update.go index 6150d7053af..26eae2eb675 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/method_update.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/method_update.go @@ -49,7 +49,6 @@ func (c ServerAdvisorsClient) Update(ctx context.Context, id AdvisorId, input Ad var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serveradvisors/version.go b/resource-manager/sql/2023-05-01-preview/serveradvisors/version.go index 917025a52a9..220213ce3a5 100644 --- a/resource-manager/sql/2023-05-01-preview/serveradvisors/version.go +++ b/resource-manager/sql/2023-05-01-preview/serveradvisors/version.go @@ -1,12 +1,10 @@ package serveradvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvisors/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/README.md b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/README.md index dc8e88ad394..8df3a114a4e 100644 --- a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverautomatictuning` Documentation -The `serverautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/client.go b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/client.go index ec9f1bed0c9..2730beb5fc5 100644 --- a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/client.go @@ -15,7 +15,7 @@ type ServerAutomaticTuningClient struct { } func NewServerAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_get.go b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_get.go index 35f930c01d5..f33223e7cb8 100644 --- a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c ServerAutomaticTuningClient) Get(ctx context.Context, id commonids.SqlSe var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_update.go b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_update.go index a12ff98cb3b..7be0bdc82e9 100644 --- a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_update.go +++ b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c ServerAutomaticTuningClient) Update(ctx context.Context, id commonids.Sq var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/version.go b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/version.go index ff8a38724ef..5267a1b8622 100644 --- a/resource-manager/sql/2023-05-01-preview/serverautomatictuning/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverautomatictuning/version.go @@ -1,12 +1,10 @@ package serverautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverautomatictuning/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/README.md b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/README.md index 622f600f28b..ae2965d3ab7 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverazureadadministrators` Documentation -The `serverazureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverazureadadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/client.go b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/client.go index f50b24e55ac..47d3cf27389 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/client.go @@ -15,7 +15,7 @@ type ServerAzureADAdministratorsClient struct { } func NewServerAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/method_get.go b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/method_get.go index f0fcd511e04..98ead18b09a 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADAdministratorsClient) Get(ctx context.Context, id commonids var model ServerAzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/version.go b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/version.go index 4ca4ab875e2..ab722511322 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadadministrators/version.go @@ -1,12 +1,10 @@ package serverazureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadadministrators/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/README.md b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/README.md index 4b81e7e32b5..bbae06a8ec9 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications` Documentation -The `serverazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/client.go b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/client.go index 21c08da1953..14d36937a75 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ServerAzureADOnlyAuthenticationsClient struct { } func NewServerAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/method_get.go index f254750271a..937c73a5697 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, id comm var model ServerAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/version.go b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/version.go index 693f7870d77..57ee5278fcb 100644 --- a/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package serverazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadonlyauthentications/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/README.md b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/README.md index 4d390d7234c..a41ae22ff41 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions` Documentation -The `serverconfigurationoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverconfigurationoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/client.go b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/client.go index aa3c24cb9a6..18fdd2d4b4c 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/client.go @@ -15,7 +15,7 @@ type ServerConfigurationOptionsClient struct { } func NewServerConfigurationOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConfigurationOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConfigurationOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/method_get.go b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/method_get.go index 062acb8b40d..6ed76291506 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/method_get.go @@ -47,7 +47,6 @@ func (c ServerConfigurationOptionsClient) Get(ctx context.Context, id commonids. var model ServerConfigurationOption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/version.go b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/version.go index 815d5be613e..ea61ddb2c22 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverconfigurationoptions/version.go @@ -1,12 +1,10 @@ package serverconfigurationoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconfigurationoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconfigurationoptions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/README.md b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/README.md index d7211b18d48..8072befae00 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies` Documentation -The `serverconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverconnectionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/client.go b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/client.go index 15991ddbd85..a4b5aa95d54 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/client.go @@ -15,7 +15,7 @@ type ServerConnectionPoliciesClient struct { } func NewServerConnectionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConnectionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConnectionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/method_get.go index afcb959ee65..48f33b38281 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerConnectionPoliciesClient) Get(ctx context.Context, id commonids.Sq var model ServerConnectionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/version.go b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/version.go index 9ef6036b311..58ec51e599e 100644 --- a/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverconnectionpolicies/version.go @@ -1,12 +1,10 @@ package serverconnectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconnectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconnectionpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/README.md b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/README.md index c84d7388841..97596bf5c0c 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverdevopsaudit` Documentation -The `serverdevopsaudit` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverdevopsaudit` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/client.go b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/client.go index 535c6daec99..5e560080c0c 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/client.go @@ -15,7 +15,7 @@ type ServerDevOpsAuditClient struct { } func NewServerDevOpsAuditClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDevOpsAuditClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdevopsaudit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdevopsaudit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDevOpsAuditClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/method_settingsget.go b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/method_settingsget.go index 47e850924e2..6f6c514f848 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/method_settingsget.go +++ b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/method_settingsget.go @@ -47,7 +47,6 @@ func (c ServerDevOpsAuditClient) SettingsGet(ctx context.Context, id commonids.S var model ServerDevOpsAuditingSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/version.go b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/version.go index 493edcee099..ef564c1ca8b 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverdevopsaudit/version.go @@ -1,12 +1,10 @@ package serverdevopsaudit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdevopsaudit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdevopsaudit/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/README.md b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/README.md index 568dad714d3..193d367644d 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverdnsaliases` Documentation -The `serverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/client.go b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/client.go index f8e554ac6f0..7f03630ea40 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/client.go @@ -15,7 +15,7 @@ type ServerDnsAliasesClient struct { } func NewServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/id_dnsalias.go b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/id_dnsalias.go index 89703b594cd..e0fad2f17cc 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/id_dnsalias.go +++ b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/id_dnsalias.go @@ -44,7 +44,7 @@ func ParseDnsAliasID(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsAliasIDInsensitively(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/method_get.go b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/method_get.go index 103cdf86db1..7c3666bd13e 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ServerDnsAliasesClient) Get(ctx context.Context, id DnsAliasId) (result var model ServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/version.go b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/version.go index 74369423a3b..cc5d2d3e30b 100644 --- a/resource-manager/sql/2023-05-01-preview/serverdnsaliases/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverdnsaliases/version.go @@ -1,12 +1,10 @@ package serverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdnsaliases/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverkeys/README.md b/resource-manager/sql/2023-05-01-preview/serverkeys/README.md index 2ba9485bf59..49e03f207a9 100644 --- a/resource-manager/sql/2023-05-01-preview/serverkeys/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverkeys` Documentation -The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverkeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverkeys/client.go b/resource-manager/sql/2023-05-01-preview/serverkeys/client.go index 83970b7eb35..0616b182cbb 100644 --- a/resource-manager/sql/2023-05-01-preview/serverkeys/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverkeys/client.go @@ -15,7 +15,7 @@ type ServerKeysClient struct { } func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverkeys/id_key.go b/resource-manager/sql/2023-05-01-preview/serverkeys/id_key.go index a6d8137a5d3..ee1d13f85a3 100644 --- a/resource-manager/sql/2023-05-01-preview/serverkeys/id_key.go +++ b/resource-manager/sql/2023-05-01-preview/serverkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/serverkeys/method_get.go b/resource-manager/sql/2023-05-01-preview/serverkeys/method_get.go index cdd81e30407..e6b4acc396a 100644 --- a/resource-manager/sql/2023-05-01-preview/serverkeys/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serverkeys/method_get.go @@ -45,7 +45,6 @@ func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperatio var model ServerKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serverkeys/version.go b/resource-manager/sql/2023-05-01-preview/serverkeys/version.go index d740a40c8e3..eaa47aeaca9 100644 --- a/resource-manager/sql/2023-05-01-preview/serverkeys/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverkeys/version.go @@ -1,12 +1,10 @@ package serverkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverkeys/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serveroperations/README.md b/resource-manager/sql/2023-05-01-preview/serveroperations/README.md index 8b1ba481576..2f256ab9d78 100644 --- a/resource-manager/sql/2023-05-01-preview/serveroperations/README.md +++ b/resource-manager/sql/2023-05-01-preview/serveroperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serveroperations` Documentation -The `serveroperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serveroperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serveroperations/client.go b/resource-manager/sql/2023-05-01-preview/serveroperations/client.go index 315bd12ffac..52624fb5f18 100644 --- a/resource-manager/sql/2023-05-01-preview/serveroperations/client.go +++ b/resource-manager/sql/2023-05-01-preview/serveroperations/client.go @@ -15,7 +15,7 @@ type ServerOperationsClient struct { } func NewServerOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveroperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveroperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serveroperations/version.go b/resource-manager/sql/2023-05-01-preview/serveroperations/version.go index 65236569949..419727616aa 100644 --- a/resource-manager/sql/2023-05-01-preview/serveroperations/version.go +++ b/resource-manager/sql/2023-05-01-preview/serveroperations/version.go @@ -1,12 +1,10 @@ package serveroperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveroperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveroperations/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/servers/README.md b/resource-manager/sql/2023-05-01-preview/servers/README.md index 0aae1f8fd1b..1e193112d7d 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/README.md +++ b/resource-manager/sql/2023-05-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/servers/client.go b/resource-manager/sql/2023-05-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/client.go +++ b/resource-manager/sql/2023-05-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/servers/method_checknameavailability.go b/resource-manager/sql/2023-05-01-preview/servers/method_checknameavailability.go index 33491559bac..d4dc423607a 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/method_checknameavailability.go +++ b/resource-manager/sql/2023-05-01-preview/servers/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ServersClient) CheckNameAvailability(ctx context.Context, id commonids.S var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servers/method_get.go b/resource-manager/sql/2023-05-01-preview/servers/method_get.go index 9fa3523f482..186e44d6c15 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/servers/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServersClient) Get(ctx context.Context, id commonids.SqlServerId, option var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servers/method_list.go b/resource-manager/sql/2023-05-01-preview/servers/method_list.go index 0ce97ea8572..7c8dc454f0d 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/method_list.go +++ b/resource-manager/sql/2023-05-01-preview/servers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/servers/method_listbyresourcegroup.go b/resource-manager/sql/2023-05-01-preview/servers/method_listbyresourcegroup.go index eb7122c8a0a..9ded1776fd1 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-05-01-preview/servers/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/servers/version.go b/resource-manager/sql/2023-05-01-preview/servers/version.go index 231944cd4c3..bb3a15a936f 100644 --- a/resource-manager/sql/2023-05-01-preview/servers/version.go +++ b/resource-manager/sql/2023-05-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/README.md b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/README.md index e3df8193344..df19feba0d9 100644 --- a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/client.go b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/method_get.go index 52a7b24a5a4..b7f63c8bb22 100644 --- a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id commonids var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/version.go b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/version.go index 0a8abaaf081..57d813e2ce7 100644 --- a/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-05-01-preview/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/README.md b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/README.md index 83a52f7832b..47a1e5211f4 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/README.md +++ b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servertrustcertificates` Documentation -The `servertrustcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `servertrustcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/client.go b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/client.go index a6f3aa41b81..1754d2f466c 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/client.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/client.go @@ -15,7 +15,7 @@ type ServerTrustCertificatesClient struct { } func NewServerTrustCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/id_servertrustcertificate.go b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/id_servertrustcertificate.go index 79b3d450d55..89e8c0be6a6 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/id_servertrustcertificate.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/id_servertrustcertificate.go @@ -44,7 +44,7 @@ func ParseServerTrustCertificateID(input string) (*ServerTrustCertificateId, err } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustCertificateIDInsensitively(input string) (*ServerTrustCerti } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/method_get.go b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/method_get.go index d1820468f58..26bfaa5dde5 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustCertificatesClient) Get(ctx context.Context, id ServerTrustCe var model ServerTrustCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/version.go b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/version.go index e442dd97592..a7564d1c038 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustcertificates/version.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustcertificates/version.go @@ -1,12 +1,10 @@ package servertrustcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustcertificates/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/README.md b/resource-manager/sql/2023-05-01-preview/servertrustgroups/README.md index 5cfbeeed0f3..0c1336c241f 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servertrustgroups` Documentation -The `servertrustgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `servertrustgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/client.go b/resource-manager/sql/2023-05-01-preview/servertrustgroups/client.go index ff26515db72..175c668a349 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/client.go @@ -15,7 +15,7 @@ type ServerTrustGroupsClient struct { } func NewServerTrustGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_providerlocation.go b/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_providerlocation.go index 77965206097..920204a1e73 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_providerlocation.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_servertrustgroup.go b/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_servertrustgroup.go index 6d354529645..8faafc4eb0e 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_servertrustgroup.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/id_servertrustgroup.go @@ -44,7 +44,7 @@ func ParseServerTrustGroupID(input string) (*ServerTrustGroupId, error) { } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustGroupIDInsensitively(input string) (*ServerTrustGroupId, er } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/method_get.go b/resource-manager/sql/2023-05-01-preview/servertrustgroups/method_get.go index b93f6843bd2..b9d7d3201ae 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustGroupsClient) Get(ctx context.Context, id ServerTrustGroupId) var model ServerTrustGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servertrustgroups/version.go b/resource-manager/sql/2023-05-01-preview/servertrustgroups/version.go index 28aba3225d5..5319d02905a 100644 --- a/resource-manager/sql/2023-05-01-preview/servertrustgroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/servertrustgroups/version.go @@ -1,12 +1,10 @@ package servertrustgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustgroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/serverusages/README.md b/resource-manager/sql/2023-05-01-preview/serverusages/README.md index 8eb73e57e3e..e7128ac0140 100644 --- a/resource-manager/sql/2023-05-01-preview/serverusages/README.md +++ b/resource-manager/sql/2023-05-01-preview/serverusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/serverusages` Documentation -The `serverusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `serverusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/serverusages/client.go b/resource-manager/sql/2023-05-01-preview/serverusages/client.go index a506285038a..16666bee036 100644 --- a/resource-manager/sql/2023-05-01-preview/serverusages/client.go +++ b/resource-manager/sql/2023-05-01-preview/serverusages/client.go @@ -15,7 +15,7 @@ type ServerUsagesClient struct { } func NewServerUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/serverusages/version.go b/resource-manager/sql/2023-05-01-preview/serverusages/version.go index f5afb1ee98a..54f93244fac 100644 --- a/resource-manager/sql/2023-05-01-preview/serverusages/version.go +++ b/resource-manager/sql/2023-05-01-preview/serverusages/version.go @@ -1,12 +1,10 @@ package serverusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverusages/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/README.md b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/README.md index dec011d1d91..f9b6822b70c 100644 --- a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments` Documentation -The `servervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `servervulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/client.go b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/client.go index 5ab28ece52e..e7d2ead0545 100644 --- a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentsClient struct { } func NewServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_createorupdate.go index 6833023e5f8..9b468796ec2 100644 --- a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_get.go b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_get.go index 84e9a7c3243..09f63e48019 100644 --- a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, id common var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/version.go b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/version.go index a021118610a..3c955be3462 100644 --- a/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-05-01-preview/servervulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessments/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlagent/README.md b/resource-manager/sql/2023-05-01-preview/sqlagent/README.md index 67411102752..f3daf3182bf 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlagent/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlagent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlagent` Documentation -The `sqlagent` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlagent` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlagent/client.go b/resource-manager/sql/2023-05-01-preview/sqlagent/client.go index e6b69cf376c..27e9195f8bc 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlagent/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlagent/client.go @@ -15,7 +15,7 @@ type SqlAgentClient struct { } func NewSqlAgentClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlAgentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlagent", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlagent", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlAgentClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlagent/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/sqlagent/method_createorupdate.go index d5f7f099d8d..cd83669aefa 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlagent/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/sqlagent/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SqlAgentClient) CreateOrUpdate(ctx context.Context, id commonids.SqlMana var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlagent/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlagent/method_get.go index 8bbf9211506..eb20d2e2e4b 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlagent/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlagent/method_get.go @@ -47,7 +47,6 @@ func (c SqlAgentClient) Get(ctx context.Context, id commonids.SqlManagedInstance var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlagent/version.go b/resource-manager/sql/2023-05-01-preview/sqlagent/version.go index 096703b6d0f..5d2bb17b8e6 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlagent/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlagent/version.go @@ -1,12 +1,10 @@ package sqlagent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlagent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlagent/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/README.md b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/README.md index f221558b418..531c32fc7f1 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline` Documentation -The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/client.go index 505a54fc965..1e818dc798f 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentBaselineClient struct { } func NewSqlVulnerabilityAssessmentBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go index f287d50ecef..5134e7ba381 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go @@ -35,6 +35,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) CreateOrUpdate(ctx context.Con var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go index 1742364c396..d3dc6e72e80 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) Get(ctx context.Context, id co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go index caec9ab9821..c66768fe7e8 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToHeaders() *client.He func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/version.go index bbc91f8541f..783e567a991 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentbaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentbaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/client.go index acbe2d3fb42..7630b387bae 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentExecuteScanClient struct { } func NewSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go index 201fdbca8ea..3c6a1925406 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go @@ -37,6 +37,7 @@ func (o ExecuteOperationOptions) ToHeaders() *client.Headers { func (o ExecuteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/version.go index f0d92c7e210..e0c27341226 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md index 2207afee906..ba75f757b63 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline` Documentation -The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go index a5233c9899c..fc8f0110ab3 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentRuleBaselineClient struct { } func NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentRuleBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentRuleBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go index 914c9cfe438..38d7b22e0f4 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go @@ -44,7 +44,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go index fb8a7288f91..183bef4b1c9 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate(ctx context var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go index df062390726..59cc6704c63 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go index b587ac02d42..cf61914333c 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) Get(ctx context.Context, i var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go index 2ba72cbdd7d..3a74f8a6c2e 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go @@ -40,6 +40,7 @@ func (o ListByBaselineOperationOptions) ToHeaders() *client.Headers { func (o ListByBaselineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go index b4beadd6197..c6160b3bce6 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentrulebaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/README.md index 4da06be60ac..69c8518da9e 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult` Documentation -The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/client.go index 7a139273cb5..f0907cdc0c0 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScanResultClient struct { } func NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go index ef5ca4b33db..c1f6768aee9 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go index ec281bd8b3c..42414e4b89a 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go @@ -46,7 +46,7 @@ func ParseScanResultID(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanResultIDInsensitively(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go index ef0c57e5f1f..082625df697 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Context, id var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go index 24c4bf34932..c893fd92bda 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go @@ -39,6 +39,7 @@ func (o ListByScanOperationOptions) ToHeaders() *client.Headers { func (o ListByScanOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/version.go index 907d87a28b8..d2b989f394b 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/README.md index 7afefacdb45..9b6468930e0 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans` Documentation -The `sqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/client.go index 222991f7da9..6022bf8ed93 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScansClient struct { } func NewSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/id_scan.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/id_scan.go index 7f816ab7219..cb958675069 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/id_scan.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_get.go index 8c977afd356..111ac936214 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, id ScanI var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go index bc384217394..1aee57eba1e 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToHeaders() *client.H func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/version.go index 084cd6d7e5b..db5a2b4fc13 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/README.md index 189f93f837a..c2efc75e65e 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings` Documentation -The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/client.go index 94dbf773e0e..bcda5c6d744 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentsSettingsClient struct { } func NewSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go index 6b98f0be879..f8794b7a57a 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context.Co var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_get.go index 9f511302d11..53e3c99ed3a 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, id c var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/version.go index d3eba551c74..ad48072d270 100644 --- a/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-05-01-preview/sqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/README.md b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/README.md index d0701ad2e25..017e74b7b25 100644 --- a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/README.md +++ b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules` Documentation -The `startstopmanagedinstanceschedules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `startstopmanagedinstanceschedules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/client.go b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/client.go index 9cdebf7233c..aa4c62fed82 100644 --- a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/client.go +++ b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/client.go @@ -15,7 +15,7 @@ type StartStopManagedInstanceSchedulesClient struct { } func NewStartStopManagedInstanceSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*StartStopManagedInstanceSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartStopManagedInstanceSchedulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go index bf962be1799..641d1d37389 100644 --- a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go +++ b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go @@ -52,7 +52,6 @@ func (c StartStopManagedInstanceSchedulesClient) CreateOrUpdate(ctx context.Cont var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_get.go b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_get.go index d65fa6f15d6..bc3bc1326f9 100644 --- a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/method_get.go @@ -47,7 +47,6 @@ func (c StartStopManagedInstanceSchedulesClient) Get(ctx context.Context, id com var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/version.go b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/version.go index fe2402b3177..b16570634c4 100644 --- a/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/version.go +++ b/resource-manager/sql/2023-05-01-preview/startstopmanagedinstanceschedules/version.go @@ -1,12 +1,10 @@ package startstopmanagedinstanceschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/README.md b/resource-manager/sql/2023-05-01-preview/subscriptionusages/README.md index 4a1f0e97c74..48faa82aadf 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/README.md +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/subscriptionusages` Documentation -The `subscriptionusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `subscriptionusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/client.go b/resource-manager/sql/2023-05-01-preview/subscriptionusages/client.go index 6bd351c6169..5829a9a22b0 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/client.go +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/client.go @@ -15,7 +15,7 @@ type SubscriptionUsagesClient struct { } func NewSubscriptionUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptionusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptionusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_location.go b/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_location.go index f064d059ffb..881d5b22478 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_usage.go b/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_usage.go index a4897a668a9..7f61d25a349 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_usage.go +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/id_usage.go @@ -42,7 +42,7 @@ func ParseUsageID(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseUsageIDInsensitively(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/method_get.go b/resource-manager/sql/2023-05-01-preview/subscriptionusages/method_get.go index 5b938744f0c..41027938a77 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionUsagesClient) Get(ctx context.Context, id UsageId) (result G var model SubscriptionUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/subscriptionusages/version.go b/resource-manager/sql/2023-05-01-preview/subscriptionusages/version.go index a4ead4f7ccf..67e61f0d42e 100644 --- a/resource-manager/sql/2023-05-01-preview/subscriptionusages/version.go +++ b/resource-manager/sql/2023-05-01-preview/subscriptionusages/version.go @@ -1,12 +1,10 @@ package subscriptionusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptionusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptionusages/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/README.md b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/README.md index 2fdb6f37378..4d5c8a9b67b 100644 --- a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/README.md +++ b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces` Documentation -The `synapselinkworkspaces` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `synapselinkworkspaces` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/client.go b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/client.go index 969d0394690..cedd10aa1e4 100644 --- a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/client.go +++ b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/client.go @@ -15,7 +15,7 @@ type SynapseLinkWorkspacesClient struct { } func NewSynapseLinkWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*SynapseLinkWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SynapseLinkWorkspacesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/version.go b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/version.go index 0c07a303332..739aec43240 100644 --- a/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/version.go +++ b/resource-manager/sql/2023-05-01-preview/synapselinkworkspaces/version.go @@ -1,12 +1,10 @@ package synapselinkworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/synapselinkworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/synapselinkworkspaces/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/README.md b/resource-manager/sql/2023-05-01-preview/syncagents/README.md index 935f5886fe0..df284ba7e05 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/README.md +++ b/resource-manager/sql/2023-05-01-preview/syncagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/syncagents` Documentation -The `syncagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `syncagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/client.go b/resource-manager/sql/2023-05-01-preview/syncagents/client.go index ddc6758b233..8f3af4b9f9c 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/client.go +++ b/resource-manager/sql/2023-05-01-preview/syncagents/client.go @@ -15,7 +15,7 @@ type SyncAgentsClient struct { } func NewSyncAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/id_syncagent.go b/resource-manager/sql/2023-05-01-preview/syncagents/id_syncagent.go index 8d76e6c99f2..fa0a3705563 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/id_syncagent.go +++ b/resource-manager/sql/2023-05-01-preview/syncagents/id_syncagent.go @@ -44,7 +44,7 @@ func ParseSyncAgentID(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncAgentIDInsensitively(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/method_generatekey.go b/resource-manager/sql/2023-05-01-preview/syncagents/method_generatekey.go index 42a446203af..3d8fd5b7f4c 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/method_generatekey.go +++ b/resource-manager/sql/2023-05-01-preview/syncagents/method_generatekey.go @@ -46,7 +46,6 @@ func (c SyncAgentsClient) GenerateKey(ctx context.Context, id SyncAgentId) (resu var model SyncAgentKeyProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/method_get.go b/resource-manager/sql/2023-05-01-preview/syncagents/method_get.go index b2278d3ec85..82b14cbc685 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/syncagents/method_get.go @@ -45,7 +45,6 @@ func (c SyncAgentsClient) Get(ctx context.Context, id SyncAgentId) (result GetOp var model SyncAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/syncagents/version.go b/resource-manager/sql/2023-05-01-preview/syncagents/version.go index dc59e672c33..70d2d603bf9 100644 --- a/resource-manager/sql/2023-05-01-preview/syncagents/version.go +++ b/resource-manager/sql/2023-05-01-preview/syncagents/version.go @@ -1,12 +1,10 @@ package syncagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncagents/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/README.md b/resource-manager/sql/2023-05-01-preview/syncgroups/README.md index 50fdf49d5e1..9e5afb4cb6c 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/syncgroups` Documentation -The `syncgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `syncgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/client.go b/resource-manager/sql/2023-05-01-preview/syncgroups/client.go index 4319d456755..5cd4df963fb 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/client.go @@ -15,7 +15,7 @@ type SyncGroupsClient struct { } func NewSyncGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/id_location.go b/resource-manager/sql/2023-05-01-preview/syncgroups/id_location.go index 263b38238dc..1877c3ba830 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/id_syncgroup.go b/resource-manager/sql/2023-05-01-preview/syncgroups/id_syncgroup.go index 58a45ff7503..7f26217fc95 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/id_syncgroup.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/method_get.go b/resource-manager/sql/2023-05-01-preview/syncgroups/method_get.go index 1d0bfbaff2b..192ba337ba7 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/method_get.go @@ -45,7 +45,6 @@ func (c SyncGroupsClient) Get(ctx context.Context, id SyncGroupId) (result GetOp var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/method_listlogs.go b/resource-manager/sql/2023-05-01-preview/syncgroups/method_listlogs.go index 5f0554775a2..0b12f7bb05e 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/method_listlogs.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/method_listlogs.go @@ -42,6 +42,7 @@ func (o ListLogsOperationOptions) ToHeaders() *client.Headers { func (o ListLogsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/syncgroups/version.go b/resource-manager/sql/2023-05-01-preview/syncgroups/version.go index d3dd0eab435..b28dd91607d 100644 --- a/resource-manager/sql/2023-05-01-preview/syncgroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/syncgroups/version.go @@ -1,12 +1,10 @@ package syncgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncgroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/README.md b/resource-manager/sql/2023-05-01-preview/syncmembers/README.md index 1e4b2857261..ca7f6c45f59 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/README.md +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/syncmembers` Documentation -The `syncmembers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `syncmembers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/client.go b/resource-manager/sql/2023-05-01-preview/syncmembers/client.go index a8d9678c21e..002a3b5df66 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/client.go +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/client.go @@ -15,7 +15,7 @@ type SyncMembersClient struct { } func NewSyncMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncMembersClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncgroup.go b/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncgroup.go index 69fdd86cfbf..06a5789f4f7 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncgroup.go +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncmember.go b/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncmember.go index d62d31988a3..8a431b5c6cb 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncmember.go +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/id_syncmember.go @@ -48,7 +48,7 @@ func ParseSyncMemberID(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSyncMemberIDInsensitively(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/method_get.go b/resource-manager/sql/2023-05-01-preview/syncmembers/method_get.go index c2cfc32c6db..34f5fca6a2c 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/method_get.go @@ -45,7 +45,6 @@ func (c SyncMembersClient) Get(ctx context.Context, id SyncMemberId) (result Get var model SyncMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/syncmembers/version.go b/resource-manager/sql/2023-05-01-preview/syncmembers/version.go index 410ef5b0cf4..4460a0cb8c7 100644 --- a/resource-manager/sql/2023-05-01-preview/syncmembers/version.go +++ b/resource-manager/sql/2023-05-01-preview/syncmembers/version.go @@ -1,12 +1,10 @@ package syncmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncmembers/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/tdecertificates/README.md b/resource-manager/sql/2023-05-01-preview/tdecertificates/README.md index 2e0a093ee46..06fd271bf9c 100644 --- a/resource-manager/sql/2023-05-01-preview/tdecertificates/README.md +++ b/resource-manager/sql/2023-05-01-preview/tdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/tdecertificates` Documentation -The `tdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `tdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/tdecertificates/client.go b/resource-manager/sql/2023-05-01-preview/tdecertificates/client.go index 960ac6f7b2e..7409af2c03e 100644 --- a/resource-manager/sql/2023-05-01-preview/tdecertificates/client.go +++ b/resource-manager/sql/2023-05-01-preview/tdecertificates/client.go @@ -15,7 +15,7 @@ type TdeCertificatesClient struct { } func NewTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*TdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/tdecertificates/version.go b/resource-manager/sql/2023-05-01-preview/tdecertificates/version.go index e6124c38918..58214b7fa73 100644 --- a/resource-manager/sql/2023-05-01-preview/tdecertificates/version.go +++ b/resource-manager/sql/2023-05-01-preview/tdecertificates/version.go @@ -1,12 +1,10 @@ package tdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tdecertificates/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/timezones/README.md b/resource-manager/sql/2023-05-01-preview/timezones/README.md index 4b1c070afe3..e8b27bdf46e 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/README.md +++ b/resource-manager/sql/2023-05-01-preview/timezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/timezones` Documentation -The `timezones` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `timezones` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/timezones/client.go b/resource-manager/sql/2023-05-01-preview/timezones/client.go index b70fa82f34a..278433b66e0 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/client.go +++ b/resource-manager/sql/2023-05-01-preview/timezones/client.go @@ -15,7 +15,7 @@ type TimeZonesClient struct { } func NewTimeZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*TimeZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "timezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "timezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TimeZonesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/timezones/id_location.go b/resource-manager/sql/2023-05-01-preview/timezones/id_location.go index 6303eaf6b92..ed12387a1b8 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/id_location.go +++ b/resource-manager/sql/2023-05-01-preview/timezones/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/timezones/id_timezone.go b/resource-manager/sql/2023-05-01-preview/timezones/id_timezone.go index 95f83aefb79..e0f97b4d2cb 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/id_timezone.go +++ b/resource-manager/sql/2023-05-01-preview/timezones/id_timezone.go @@ -42,7 +42,7 @@ func ParseTimeZoneID(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTimeZoneIDInsensitively(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/timezones/method_get.go b/resource-manager/sql/2023-05-01-preview/timezones/method_get.go index e9be6c666b6..bf02c6ffb19 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/timezones/method_get.go @@ -45,7 +45,6 @@ func (c TimeZonesClient) Get(ctx context.Context, id TimeZoneId) (result GetOper var model TimeZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/timezones/version.go b/resource-manager/sql/2023-05-01-preview/timezones/version.go index 7de80af5903..aa879d9aa49 100644 --- a/resource-manager/sql/2023-05-01-preview/timezones/version.go +++ b/resource-manager/sql/2023-05-01-preview/timezones/version.go @@ -1,12 +1,10 @@ package timezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/timezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/timezones/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/README.md b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/README.md index b60d327a7a5..b0ea23942c6 100644 --- a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/README.md +++ b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/transparentdataencryptions` Documentation -The `transparentdataencryptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `transparentdataencryptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/client.go b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/client.go index 405c2a9c03a..023e8247a47 100644 --- a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/client.go +++ b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/client.go @@ -15,7 +15,7 @@ type TransparentDataEncryptionsClient struct { } func NewTransparentDataEncryptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransparentDataEncryptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transparentdataencryptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transparentdataencryptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransparentDataEncryptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/method_get.go b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/method_get.go index 30de417b32a..607b29fc4f0 100644 --- a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/method_get.go @@ -47,7 +47,6 @@ func (c TransparentDataEncryptionsClient) Get(ctx context.Context, id commonids. var model LogicalDatabaseTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/version.go b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/version.go index cf65423e65f..42f3443ffa6 100644 --- a/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/version.go +++ b/resource-manager/sql/2023-05-01-preview/transparentdataencryptions/version.go @@ -1,12 +1,10 @@ package transparentdataencryptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transparentdataencryptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transparentdataencryptions/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/usages/README.md b/resource-manager/sql/2023-05-01-preview/usages/README.md index b40eee9af09..8c565df9040 100644 --- a/resource-manager/sql/2023-05-01-preview/usages/README.md +++ b/resource-manager/sql/2023-05-01-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/usages/client.go b/resource-manager/sql/2023-05-01-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/sql/2023-05-01-preview/usages/client.go +++ b/resource-manager/sql/2023-05-01-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/usages/id_instancepool.go b/resource-manager/sql/2023-05-01-preview/usages/id_instancepool.go index 5414d2b8bec..6c1828d36b4 100644 --- a/resource-manager/sql/2023-05-01-preview/usages/id_instancepool.go +++ b/resource-manager/sql/2023-05-01-preview/usages/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/usages/method_listbyinstancepool.go b/resource-manager/sql/2023-05-01-preview/usages/method_listbyinstancepool.go index 1c0d9617748..dfe481817a1 100644 --- a/resource-manager/sql/2023-05-01-preview/usages/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-05-01-preview/usages/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-05-01-preview/usages/version.go b/resource-manager/sql/2023-05-01-preview/usages/version.go index 071119c3f28..620757b3d58 100644 --- a/resource-manager/sql/2023-05-01-preview/usages/version.go +++ b/resource-manager/sql/2023-05-01-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/virtualclusters/README.md b/resource-manager/sql/2023-05-01-preview/virtualclusters/README.md index 3fca40e7aea..cfbb57b2b11 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualclusters/README.md +++ b/resource-manager/sql/2023-05-01-preview/virtualclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/virtualclusters` Documentation -The `virtualclusters` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `virtualclusters` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/virtualclusters/client.go b/resource-manager/sql/2023-05-01-preview/virtualclusters/client.go index 2b0084ba56a..fcc501326a1 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualclusters/client.go +++ b/resource-manager/sql/2023-05-01-preview/virtualclusters/client.go @@ -15,7 +15,7 @@ type VirtualClustersClient struct { } func NewVirtualClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualClustersClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/virtualclusters/id_virtualcluster.go b/resource-manager/sql/2023-05-01-preview/virtualclusters/id_virtualcluster.go index 3e868342489..f1a818ac99d 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualclusters/id_virtualcluster.go +++ b/resource-manager/sql/2023-05-01-preview/virtualclusters/id_virtualcluster.go @@ -42,7 +42,7 @@ func ParseVirtualClusterID(input string) (*VirtualClusterId, error) { } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualClusterIDInsensitively(input string) (*VirtualClusterId, error) } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/virtualclusters/method_get.go b/resource-manager/sql/2023-05-01-preview/virtualclusters/method_get.go index 963d777394f..3705c4dd85f 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualclusters/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/virtualclusters/method_get.go @@ -45,7 +45,6 @@ func (c VirtualClustersClient) Get(ctx context.Context, id VirtualClusterId) (re var model VirtualCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/virtualclusters/version.go b/resource-manager/sql/2023-05-01-preview/virtualclusters/version.go index afbccc7138b..b36c6b6b94a 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualclusters/version.go +++ b/resource-manager/sql/2023-05-01-preview/virtualclusters/version.go @@ -1,12 +1,10 @@ package virtualclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualclusters/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/README.md b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/README.md index b1486ce18e2..aa1a8bb54af 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/README.md +++ b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/client.go b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/client.go +++ b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/id_virtualnetworkrule.go index cda6be2068f..23478a0b90d 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/method_get.go b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/version.go b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/version.go index 2928d8f15cf..9f434ada8c6 100644 --- a/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/version.go +++ b/resource-manager/sql/2023-05-01-preview/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/README.md b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/README.md index 6491d648583..45b56ecf116 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/README.md +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/workloadclassifiers` Documentation -The `workloadclassifiers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `workloadclassifiers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/client.go b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/client.go index 8a4bda3b5df..2817cd7d47d 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/client.go +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/client.go @@ -15,7 +15,7 @@ type WorkloadClassifiersClient struct { } func NewWorkloadClassifiersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadClassifiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadclassifiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadclassifiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadClassifiersClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadclassifier.go b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadclassifier.go index 341ebda0737..7a69196cb75 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadclassifier.go +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadclassifier.go @@ -48,7 +48,7 @@ func ParseWorkloadClassifierID(input string) (*WorkloadClassifierId, error) { } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkloadClassifierIDInsensitively(input string) (*WorkloadClassifierId } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadgroup.go b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadgroup.go index 78d6718d686..e3c9c82be54 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadgroup.go +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/method_get.go b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/method_get.go index 4fb345bfa00..b53892d20ec 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadClassifiersClient) Get(ctx context.Context, id WorkloadClassifie var model WorkloadClassifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/version.go b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/version.go index 1bab37ed019..f623a9c8b64 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadclassifiers/version.go +++ b/resource-manager/sql/2023-05-01-preview/workloadclassifiers/version.go @@ -1,12 +1,10 @@ package workloadclassifiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadclassifiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadclassifiers/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-05-01-preview/workloadgroups/README.md b/resource-manager/sql/2023-05-01-preview/workloadgroups/README.md index 6918cfc564f..a59a24c7a50 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadgroups/README.md +++ b/resource-manager/sql/2023-05-01-preview/workloadgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/workloadgroups` Documentation -The `workloadgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-05-01-preview`). +The `workloadgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-05-01-preview/workloadgroups/client.go b/resource-manager/sql/2023-05-01-preview/workloadgroups/client.go index ea02247d06f..6c31a01f6ab 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadgroups/client.go +++ b/resource-manager/sql/2023-05-01-preview/workloadgroups/client.go @@ -15,7 +15,7 @@ type WorkloadGroupsClient struct { } func NewWorkloadGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-05-01-preview/workloadgroups/id_workloadgroup.go b/resource-manager/sql/2023-05-01-preview/workloadgroups/id_workloadgroup.go index de674487f45..eb1341955eb 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadgroups/id_workloadgroup.go +++ b/resource-manager/sql/2023-05-01-preview/workloadgroups/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-05-01-preview/workloadgroups/method_get.go b/resource-manager/sql/2023-05-01-preview/workloadgroups/method_get.go index 7d018b12e1c..5b64cb7617a 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadgroups/method_get.go +++ b/resource-manager/sql/2023-05-01-preview/workloadgroups/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadGroupsClient) Get(ctx context.Context, id WorkloadGroupId) (resu var model WorkloadGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-05-01-preview/workloadgroups/version.go b/resource-manager/sql/2023-05-01-preview/workloadgroups/version.go index dd804044426..30c7f059452 100644 --- a/resource-manager/sql/2023-05-01-preview/workloadgroups/version.go +++ b/resource-manager/sql/2023-05-01-preview/workloadgroups/version.go @@ -1,12 +1,10 @@ package workloadgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadgroups/2023-05-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md index bdfe198c3a3..92710da5fb5 100644 --- a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies` Documentation -The `backupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `backupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go index b01ca3b95ed..d77d7e4b208 100644 --- a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type BackupShortTermRetentionPoliciesClient struct { } func NewBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go index f44a938b3f8..0a7a2b75778 100644 --- a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, id comm var model BackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go index 1b4189b9f65..c2ee86d945a 100644 --- a/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/backupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package backupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backupshorttermretentionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/README.md b/resource-manager/sql/2023-08-01-preview/blobauditing/README.md index be11f97b56d..d6aa8e41a34 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/README.md +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/blobauditing` Documentation -The `blobauditing` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `blobauditing` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/client.go b/resource-manager/sql/2023-08-01-preview/blobauditing/client.go index d8c96733d85..d77ae84974a 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/client.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/client.go @@ -15,7 +15,7 @@ type BlobAuditingClient struct { } func NewBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobAuditingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobauditing", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobauditing", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobAuditingClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go index 589911c6f42..69f704a405e 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesCreateOrUpdate(ctx conte var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go index fc66178ed6e..fbc605bc326 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_databaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) DatabaseBlobAuditingPoliciesGet(ctx context.Context, var model DatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go index 03952a4b896..1296c38402d 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciescreateorupdate.go @@ -52,7 +52,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdate(c var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go index 3e29e0f05f0..68921db640e 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendeddatabaseblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedDatabaseBlobAuditingPoliciesGet(ctx context. var model ExtendedDatabaseBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go index c0e81b5a0db..f23d1799caf 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_extendedserverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ExtendedServerBlobAuditingPoliciesGet(ctx context.Co var model ExtendedServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go b/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go index 75e49afd4f9..bf9a8ef1b2f 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/method_serverblobauditingpoliciesget.go @@ -47,7 +47,6 @@ func (c BlobAuditingClient) ServerBlobAuditingPoliciesGet(ctx context.Context, i var model ServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/blobauditing/version.go b/resource-manager/sql/2023-08-01-preview/blobauditing/version.go index 16a0414802e..372e3941d42 100644 --- a/resource-manager/sql/2023-08-01-preview/blobauditing/version.go +++ b/resource-manager/sql/2023-08-01-preview/blobauditing/version.go @@ -1,12 +1,10 @@ package blobauditing -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobauditing/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobauditing/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/README.md index 8e847f3f50e..44fa83e5ffd 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings` Documentation -The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/client.go index 853faf57d20..6d648a65168 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type DatabaseAdvancedThreatProtectionSettingsClient struct { } func NewDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go index 86442b1035b..81db81d16c9 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx conte var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_get.go index c42a4c4fc7b..ef215bd4c97 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, var model DatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/version.go index 8ebaf624ee2..c5a521c7709 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package databaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvancedthreatprotectionsettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/README.md b/resource-manager/sql/2023-08-01-preview/databaseadvisors/README.md index 762dd00226a..d390e9427db 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseadvisors` Documentation -The `databaseadvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseadvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/client.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/client.go index 44010e301ae..fce41427034 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/client.go @@ -15,7 +15,7 @@ type DatabaseAdvisorsClient struct { } func NewDatabaseAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseadvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseadvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/id_databaseadvisor.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/id_databaseadvisor.go index 3958ebfc87e..4238504a482 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/id_databaseadvisor.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_get.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_get.go index a42614c2904..8d6b2625ec0 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseAdvisorsClient) Get(ctx context.Context, id DatabaseAdvisorId) ( var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_listbydatabase.go index 514e3d2f332..3f50cebdcfc 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_listbydatabase.go @@ -35,6 +35,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, id commonids var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_update.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_update.go index e16bd4d4206..305e480233e 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_update.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseAdvisorsClient) Update(ctx context.Context, id DatabaseAdvisorId var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseadvisors/version.go b/resource-manager/sql/2023-08-01-preview/databaseadvisors/version.go index ad4b16f6f5f..02fb5d812ad 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseadvisors/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseadvisors/version.go @@ -1,12 +1,10 @@ package databaseadvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseadvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseadvisors/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/README.md b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/README.md index 70de31fb60c..2edef395ae0 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseautomatictuning` Documentation -The `databaseautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/client.go b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/client.go index c1ffd5220bb..64e97a4f9b8 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/client.go @@ -15,7 +15,7 @@ type DatabaseAutomaticTuningClient struct { } func NewDatabaseAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_get.go b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_get.go index b7b69ce9ea2..e39c0ed3a61 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseAutomaticTuningClient) Get(ctx context.Context, id commonids.Sql var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_update.go b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_update.go index 18d13757916..e98f662fd44 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_update.go +++ b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c DatabaseAutomaticTuningClient) Update(ctx context.Context, id commonids. var model DatabaseAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/version.go b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/version.go index b3db3e3e2a7..932cb879165 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseautomatictuning/version.go @@ -1,12 +1,10 @@ package databaseautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseautomatictuning/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/README.md b/resource-manager/sql/2023-08-01-preview/databasecolumns/README.md index 2fb9d0f16d9..e119df66411 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasecolumns` Documentation -The `databasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/client.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/client.go index f59e201824d..bb6e0d151c9 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/client.go @@ -15,7 +15,7 @@ type DatabaseColumnsClient struct { } func NewDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/id_column.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/id_column.go index b3af8a0f9d4..7c6b826f36c 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/id_column.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/id_table.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/id_table.go index 3b8c7d1c356..5ac8168a4b7 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/id_table.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_get.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_get.go index 64777b1f6d4..7df54396dde 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseColumnsClient) Get(ctx context.Context, id ColumnId) (result Get var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbydatabase.go index 95a591eec19..44b8ccd8618 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbytable.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbytable.go index e58a820a57b..16a76702308 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/databasecolumns/version.go b/resource-manager/sql/2023-08-01-preview/databasecolumns/version.go index 10854f99c43..4c3f0478e45 100644 --- a/resource-manager/sql/2023-08-01-preview/databasecolumns/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasecolumns/version.go @@ -1,12 +1,10 @@ package databasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasecolumns/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/client.go b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/client.go index b5952975e34..64b1de4d53d 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevalidateClient struct { } func NewDatabaseEncryptionProtectorRevalidateClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevalidateClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevalidate", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevalidateClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/version.go b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/version.go index b499c97b15c..265cc318deb 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevalidate/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevalidate -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevalidate/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/client.go b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/client.go index ad1878977d2..68eea1ecd3e 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/client.go @@ -15,7 +15,7 @@ type DatabaseEncryptionProtectorRevertClient struct { } func NewDatabaseEncryptionProtectorRevertClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseEncryptionProtectorRevertClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseencryptionprotectorrevert", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseEncryptionProtectorRevertClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/version.go b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/version.go index 9ddbfc9749e..bddba4ab829 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseencryptionprotectorrevert/version.go @@ -1,12 +1,10 @@ package databaseencryptionprotectorrevert -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseencryptionprotectorrevert/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseextensions/README.md b/resource-manager/sql/2023-08-01-preview/databaseextensions/README.md index ed5f05449e6..a12acdebe2b 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseextensions/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseextensions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseextensions` Documentation -The `databaseextensions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseextensions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseextensions/client.go b/resource-manager/sql/2023-08-01-preview/databaseextensions/client.go index 295d1a579b8..329371849d4 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseextensions/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseextensions/client.go @@ -15,7 +15,7 @@ type DatabaseExtensionsClient struct { } func NewDatabaseExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseExtensionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseextensions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseextensions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseExtensionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseextensions/id_extension.go b/resource-manager/sql/2023-08-01-preview/databaseextensions/id_extension.go index 8c726d30fe1..e9cd5142eb7 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseextensions/id_extension.go +++ b/resource-manager/sql/2023-08-01-preview/databaseextensions/id_extension.go @@ -46,7 +46,7 @@ func ParseExtensionID(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseExtensionIDInsensitively(input string) (*ExtensionId, error) { } id := ExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databaseextensions/version.go b/resource-manager/sql/2023-08-01-preview/databaseextensions/version.go index f2e4c9b883b..41164e76a61 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseextensions/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseextensions/version.go @@ -1,12 +1,10 @@ package databaseextensions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseextensions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseextensions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseoperations/README.md b/resource-manager/sql/2023-08-01-preview/databaseoperations/README.md index 7ea36c997f8..2469d602cb8 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseoperations/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseoperations` Documentation -The `databaseoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseoperations/client.go b/resource-manager/sql/2023-08-01-preview/databaseoperations/client.go index 3b9304375b8..65137fba58a 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseoperations/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseoperations/client.go @@ -15,7 +15,7 @@ type DatabaseOperationsClient struct { } func NewDatabaseOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseoperations/version.go b/resource-manager/sql/2023-08-01-preview/databaseoperations/version.go index c8f944cf37a..c344b2e10ca 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseoperations/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseoperations/version.go @@ -1,12 +1,10 @@ package databaseoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseoperations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/README.md b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/README.md index a0572c4883e..2e59cc65c67 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaserecommendedactions` Documentation -The `databaserecommendedactions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaserecommendedactions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/client.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/client.go index 9d75f11e0cf..02420960308 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/client.go @@ -15,7 +15,7 @@ type DatabaseRecommendedActionsClient struct { } func NewDatabaseRecommendedActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseRecommendedActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaserecommendedactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaserecommendedactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseRecommendedActionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_databaseadvisor.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_databaseadvisor.go index d80ad523b41..e15a0ffcfa5 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_databaseadvisor.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_databaseadvisor.go @@ -46,7 +46,7 @@ func ParseDatabaseAdvisorID(input string) (*DatabaseAdvisorId, error) { } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseAdvisorIDInsensitively(input string) (*DatabaseAdvisorId, erro } id := DatabaseAdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_recommendedaction.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_recommendedaction.go index cc4f1fc0a7a..2bac7220ef5 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_recommendedaction.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/id_recommendedaction.go @@ -48,7 +48,7 @@ func ParseRecommendedActionID(input string) (*RecommendedActionId, error) { } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseRecommendedActionIDInsensitively(input string) (*RecommendedActionId, } id := RecommendedActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_get.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_get.go index d405a420d4e..746442a33bd 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseRecommendedActionsClient) Get(ctx context.Context, id Recommende var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go index ce818410590..7ee295f95c4 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_listbydatabaseadvisor.go @@ -46,7 +46,6 @@ func (c DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Cont var model []RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_update.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_update.go index 7f6b808baab..f2b6314e21d 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_update.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/method_update.go @@ -49,7 +49,6 @@ func (c DatabaseRecommendedActionsClient) Update(ctx context.Context, id Recomme var model RecommendedAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/version.go b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/version.go index f0c8c64412c..8fa5878fe90 100644 --- a/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaserecommendedactions/version.go @@ -1,12 +1,10 @@ package databaserecommendedactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaserecommendedactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaserecommendedactions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databases/README.md b/resource-manager/sql/2023-08-01-preview/databases/README.md index 9bf83cd16d2..8f0bf7d9dee 100644 --- a/resource-manager/sql/2023-08-01-preview/databases/README.md +++ b/resource-manager/sql/2023-08-01-preview/databases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databases` Documentation -The `databases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databases/client.go b/resource-manager/sql/2023-08-01-preview/databases/client.go index 11c4bb68fa0..87de2d4fe59 100644 --- a/resource-manager/sql/2023-08-01-preview/databases/client.go +++ b/resource-manager/sql/2023-08-01-preview/databases/client.go @@ -15,7 +15,7 @@ type DatabasesClient struct { } func NewDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databases/method_failover.go b/resource-manager/sql/2023-08-01-preview/databases/method_failover.go index 7afbab02040..8de72667a50 100644 --- a/resource-manager/sql/2023-08-01-preview/databases/method_failover.go +++ b/resource-manager/sql/2023-08-01-preview/databases/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/databases/method_get.go b/resource-manager/sql/2023-08-01-preview/databases/method_get.go index a9f44b0b589..1009685d61e 100644 --- a/resource-manager/sql/2023-08-01-preview/databases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databases/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c DatabasesClient) Get(ctx context.Context, id commonids.SqlDatabaseId, op var model Database result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databases/version.go b/resource-manager/sql/2023-08-01-preview/databases/version.go index 56916000b26..49766108c07 100644 --- a/resource-manager/sql/2023-08-01-preview/databases/version.go +++ b/resource-manager/sql/2023-08-01-preview/databases/version.go @@ -1,12 +1,10 @@ package databases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/README.md b/resource-manager/sql/2023-08-01-preview/databaseschemas/README.md index 532b319b509..ccef2fed307 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseschemas` Documentation -The `databaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/client.go b/resource-manager/sql/2023-08-01-preview/databaseschemas/client.go index f7c5607f104..9b66a11cbc9 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/client.go @@ -15,7 +15,7 @@ type DatabaseSchemasClient struct { } func NewDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/id_schema.go b/resource-manager/sql/2023-08-01-preview/databaseschemas/id_schema.go index bfd9fca74e3..07c56131d6b 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/id_schema.go +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/method_get.go b/resource-manager/sql/2023-08-01-preview/databaseschemas/method_get.go index b0263b0abc8..27c1d7d7b3d 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSchemasClient) Get(ctx context.Context, id SchemaId) (result Get var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/databaseschemas/method_listbydatabase.go index c67b2be2776..e3ff05c63bb 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/databaseschemas/version.go b/resource-manager/sql/2023-08-01-preview/databaseschemas/version.go index 33714dc68f3..0d3c8d5324a 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseschemas/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseschemas/version.go @@ -1,12 +1,10 @@ package databaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseschemas/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md index f3d9234056f..e6c7dd1f84d 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies` Documentation -The `databasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go index ede593698c7..5dc5a476ce2 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type DatabaseSecurityAlertPoliciesClient struct { } func NewDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go index 793251a9458..0752c0334f8 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go index f2e3ec9cf18..ad2feedc3e7 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id commoni var model DatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go index 211964d8708..437709ad574 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package databasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesecurityalertpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md index 0aadbced90d..d73f738c553 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines` Documentation -The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesqlvulnerabilityassessmentbaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go index 4a029e35e35..197aac9464b 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentbaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go index 598eb5cd411..aab3068bda5 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_createorupdate.go @@ -51,7 +51,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go index b18a885e2c2..f3afb88df0d 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentBaselinesClient) Get(ctx context.Conte var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go index 992547f75cf..88934f7ebd3 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentbaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentbaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentbaselines/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go index 5246db793c6..505fdee6215 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentExecuteScanClient struct { } func NewDatabaseSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go index ef1b288bd76..4e2483dba69 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentexecutescan/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md index 91077c81d36..c0daf2ace82 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines` Documentation -The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesqlvulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go index d12af9b1446..617524c8b4b 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseSqlVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go index 99d4e7b9384..2d8c59a0783 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/id_baselinerule.go @@ -46,7 +46,7 @@ func ParseBaselineRuleID(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBaselineRuleIDInsensitively(input string) (*BaselineRuleId, error) { } id := BaselineRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go index 7d4ee197cf2..8d6e076da5c 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ct var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go index 84ad5045ae6..bb85540e3c6 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.C var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go index 5d990ec54ab..40f97cd4ee7 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentrulebaselines/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md index 9db1bb4346a..56d88beca60 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult` Documentation -The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go index 92b651cb9fe..5b2f1d85b93 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScanResultClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go index 6a7319aa3b6..b708ee23e5d 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_scanscanresult.go @@ -48,7 +48,7 @@ func ParseScanScanResultID(input string) (*ScanScanResultId, error) { } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseScanScanResultIDInsensitively(input string) (*ScanScanResultId, error) } id := ScanScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index c66d39b0f73..896f447d3a0 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go index 6b0354fa840..b51d6882b18 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Cont var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go index 0c2c8894582..cdf745ded46 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscanresult/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/README.md index 84120839902..2d046f4bbdc 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans` Documentation -The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/client.go index ebf00746280..d170cc753df 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentScansClient struct { } func NewDatabaseSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go index a4455526058..fb6396f8bb4 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/id_sqlvulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSqlVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(i } id := SqlVulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go index 6d507769fef..52aec5920e3 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseSqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/version.go index a3b9474dd6c..b8008fce8d2 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentscans/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/README.md index 8092da4d73f..9598875c535 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings` Documentation -The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasesqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/client.go index 4c3aefb163c..e0602c99331 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type DatabaseSqlVulnerabilityAssessmentsSettingsClient struct { } func NewDatabaseSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseSqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasesqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseSqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go index 283fc11d5f8..16e3cee1c42 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseSqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Conte var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/version.go index 04ef8476b55..fb9c5da76b3 100644 --- a/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasesqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package databasesqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasesqlvulnerabilityassessmentssettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/README.md b/resource-manager/sql/2023-08-01-preview/databasetables/README.md index a70d345e1fa..b61f2987816 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasetables` Documentation -The `databasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/client.go b/resource-manager/sql/2023-08-01-preview/databasetables/client.go index ae2db3cc1b3..3e10e7dcbee 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/client.go @@ -15,7 +15,7 @@ type DatabaseTablesClient struct { } func NewDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/id_schema.go b/resource-manager/sql/2023-08-01-preview/databasetables/id_schema.go index 4f1651b4008..95e2801e256 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/id_schema.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/id_table.go b/resource-manager/sql/2023-08-01-preview/databasetables/id_table.go index 9418bcd018e..0677aa6c988 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/id_table.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/method_get.go b/resource-manager/sql/2023-08-01-preview/databasetables/method_get.go index c00e399f016..00d41f2f7a5 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseTablesClient) Get(ctx context.Context, id TableId) (result GetOp var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/method_listbyschema.go b/resource-manager/sql/2023-08-01-preview/databasetables/method_listbyschema.go index f2ce40497ad..27cef7ab7cc 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/databasetables/version.go b/resource-manager/sql/2023-08-01-preview/databasetables/version.go index 8e96e6fc9f0..3223b0373a3 100644 --- a/resource-manager/sql/2023-08-01-preview/databasetables/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasetables/version.go @@ -1,12 +1,10 @@ package databasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasetables/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databaseusages/README.md b/resource-manager/sql/2023-08-01-preview/databaseusages/README.md index e03357ba272..c18e51f5d8c 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseusages/README.md +++ b/resource-manager/sql/2023-08-01-preview/databaseusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseusages` Documentation -The `databaseusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databaseusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databaseusages/client.go b/resource-manager/sql/2023-08-01-preview/databaseusages/client.go index 2c2ee15772a..d79c504a7f5 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseusages/client.go +++ b/resource-manager/sql/2023-08-01-preview/databaseusages/client.go @@ -15,7 +15,7 @@ type DatabaseUsagesClient struct { } func NewDatabaseUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databaseusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databaseusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databaseusages/version.go b/resource-manager/sql/2023-08-01-preview/databaseusages/version.go index 3ba4a898050..fcdfa302b23 100644 --- a/resource-manager/sql/2023-08-01-preview/databaseusages/version.go +++ b/resource-manager/sql/2023-08-01-preview/databaseusages/version.go @@ -1,12 +1,10 @@ package databaseusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databaseusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databaseusages/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md index daef0b49640..793e1137a74 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines` Documentation -The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go index 799c20cce65..9d705cb0169 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go index afee2c5691a..74f52b3bd08 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go index 2fc65238eb3..e0a57bf0eef 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx c var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go index 53027872e33..554e6664a47 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Cont var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go index 593a3c8bfc8..cbafc5034a1 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentrulebaselines/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/README.md b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/README.md index 11a70f016da..eec7094e7a4 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments` Documentation -The `databasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/client.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/client.go index 8802de5ec6c..038b962a146 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentsClient struct { } func NewDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_createorupdate.go index 5995d251fc6..cd059d04950 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Conte var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_get.go index c807027bb1d..45ee4c29235 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, id comm var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/version.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/version.go index 1cf6fa0f083..a622a0bd30f 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessments/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/README.md index 3b89934d5db..079f502ec52 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans` Documentation -The `databasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `databasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/client.go index 6d494cbab65..7060f30a177 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssessmentScansClient struct { } func NewDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go index a90d293b749..ae5ef46a672 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/id_vulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentScanID(input string) (*VulnerabilityAssessmentS } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentScanIDInsensitively(input string) (*Vulnerabili } id := VulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_export.go index 0decd7c3417..6990e393834 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_get.go index 4b42b912639..c692ed8bc59 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, id var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/version.go index 9a4f4b33c0e..0ded1f02fd6 100644 --- a/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-08-01-preview/databasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassessmentscans/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/README.md b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/README.md index afdb78fbcd4..19eaf8c5767 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/datamaskingpolicies` Documentation -The `datamaskingpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `datamaskingpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/client.go b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/client.go index 5247008b095..b9fc98390b7 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/client.go @@ -15,7 +15,7 @@ type DataMaskingPoliciesClient struct { } func NewDataMaskingPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_createorupdate.go index 7a94c14f63f..40914de8f15 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, id common var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_get.go index cb657685fed..a1fc156a99f 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/method_get.go @@ -47,7 +47,6 @@ func (c DataMaskingPoliciesClient) Get(ctx context.Context, id commonids.SqlData var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/version.go b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/version.go index fe320f13e30..60d8748cf97 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingpolicies/version.go @@ -1,12 +1,10 @@ package datamaskingpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingrules/README.md b/resource-manager/sql/2023-08-01-preview/datamaskingrules/README.md index 70e744186f5..3c0c0f550ab 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingrules/README.md +++ b/resource-manager/sql/2023-08-01-preview/datamaskingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/datamaskingrules` Documentation -The `datamaskingrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `datamaskingrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingrules/client.go b/resource-manager/sql/2023-08-01-preview/datamaskingrules/client.go index 24c99a14922..e9a838cb776 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingrules/client.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingrules/client.go @@ -15,7 +15,7 @@ type DataMaskingRulesClient struct { } func NewDataMaskingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataMaskingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datamaskingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datamaskingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataMaskingRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingrules/id_datamaskingpolicyrule.go b/resource-manager/sql/2023-08-01-preview/datamaskingrules/id_datamaskingpolicyrule.go index 9e9000d84cc..cc7040052fe 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingrules/id_datamaskingpolicyrule.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingrules/id_datamaskingpolicyrule.go @@ -46,7 +46,7 @@ func ParseDataMaskingPolicyRuleID(input string) (*DataMaskingPolicyRuleId, error } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataMaskingPolicyRuleIDInsensitively(input string) (*DataMaskingPolicy } id := DataMaskingPolicyRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingrules/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/datamaskingrules/method_createorupdate.go index d9a11638222..5665741a0d2 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingrules/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, id DataMaski var model DataMaskingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/datamaskingrules/version.go b/resource-manager/sql/2023-08-01-preview/datamaskingrules/version.go index 321e6411039..09c8f7b24d2 100644 --- a/resource-manager/sql/2023-08-01-preview/datamaskingrules/version.go +++ b/resource-manager/sql/2023-08-01-preview/datamaskingrules/version.go @@ -1,12 +1,10 @@ package datamaskingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datamaskingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datamaskingrules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/README.md b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/README.md index 5f524296dcc..ebb02a157bf 100644 --- a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/README.md +++ b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities` Documentation -The `datawarehouseuseractivities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `datawarehouseuseractivities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/client.go b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/client.go index 8e4a0c988a9..98e15f11f1c 100644 --- a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/client.go +++ b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/client.go @@ -15,7 +15,7 @@ type DataWarehouseUserActivitiesClient struct { } func NewDataWarehouseUserActivitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataWarehouseUserActivitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datawarehouseuseractivities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataWarehouseUserActivitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/method_get.go b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/method_get.go index d9a8d7e8736..2d7d9d01bb7 100644 --- a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/method_get.go @@ -47,7 +47,6 @@ func (c DataWarehouseUserActivitiesClient) Get(ctx context.Context, id commonids var model DataWarehouseUserActivities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/version.go b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/version.go index 5312692edcb..985eab17fc3 100644 --- a/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/version.go +++ b/resource-manager/sql/2023-08-01-preview/datawarehouseuseractivities/version.go @@ -1,12 +1,10 @@ package datawarehouseuseractivities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datawarehouseuseractivities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datawarehouseuseractivities/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/README.md b/resource-manager/sql/2023-08-01-preview/deletedservers/README.md index 513807b1114..ae12135f832 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/README.md +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/deletedservers` Documentation -The `deletedservers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `deletedservers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/client.go b/resource-manager/sql/2023-08-01-preview/deletedservers/client.go index da406faf779..6679ead4a59 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/client.go +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/client.go @@ -15,7 +15,7 @@ type DeletedServersClient struct { } func NewDeletedServersClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/id_deletedserver.go b/resource-manager/sql/2023-08-01-preview/deletedservers/id_deletedserver.go index f85db77184a..926acac3291 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/id_deletedserver.go +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/id_deletedserver.go @@ -42,7 +42,7 @@ func ParseDeletedServerID(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedServerIDInsensitively(input string) (*DeletedServerId, error) { } id := DeletedServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/id_location.go b/resource-manager/sql/2023-08-01-preview/deletedservers/id_location.go index ed2547876bf..611b5dbd842 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/method_get.go b/resource-manager/sql/2023-08-01-preview/deletedservers/method_get.go index 25162a744c8..7f7f83241ae 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/method_get.go @@ -45,7 +45,6 @@ func (c DeletedServersClient) Get(ctx context.Context, id DeletedServerId) (resu var model DeletedServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/deletedservers/version.go b/resource-manager/sql/2023-08-01-preview/deletedservers/version.go index fceb26f1cb6..3a8a860b73d 100644 --- a/resource-manager/sql/2023-08-01-preview/deletedservers/version.go +++ b/resource-manager/sql/2023-08-01-preview/deletedservers/version.go @@ -1,12 +1,10 @@ package deletedservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedservers/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/README.md b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/README.md index 29c1ad7805a..61d474f0a18 100644 --- a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups` Documentation -The `distributedavailabilitygroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `distributedavailabilitygroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/client.go b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/client.go index 770627d26fb..f9d46b7aa4b 100644 --- a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/client.go @@ -15,7 +15,7 @@ type DistributedAvailabilityGroupsClient struct { } func NewDistributedAvailabilityGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*DistributedAvailabilityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "distributedavailabilitygroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DistributedAvailabilityGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go index a1abbaa89b3..371a12d6563 100644 --- a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go +++ b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/id_distributedavailabilitygroup.go @@ -44,7 +44,7 @@ func ParseDistributedAvailabilityGroupID(input string) (*DistributedAvailability } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDistributedAvailabilityGroupIDInsensitively(input string) (*Distribute } id := DistributedAvailabilityGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/method_get.go b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/method_get.go index 60b15807eb5..d60cf4fdf20 100644 --- a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/method_get.go @@ -45,7 +45,6 @@ func (c DistributedAvailabilityGroupsClient) Get(ctx context.Context, id Distrib var model DistributedAvailabilityGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/version.go b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/version.go index dadd92d1c83..11bc17ef63d 100644 --- a/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/distributedavailabilitygroups/version.go @@ -1,12 +1,10 @@ package distributedavailabilitygroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/distributedavailabilitygroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/distributedavailabilitygroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/README.md b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/README.md index 592a9f244fe..6ce98dfcdce 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/README.md +++ b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpooloperations` Documentation -The `elasticpooloperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `elasticpooloperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/client.go b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/client.go index 594f5bcc3e4..fbaee40df4b 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/client.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/client.go @@ -15,7 +15,7 @@ type ElasticPoolOperationsClient struct { } func NewElasticPoolOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpooloperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpooloperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/id_operation.go b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/id_operation.go index e5e330ca72b..50733e73bef 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/id_operation.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/id_operation.go @@ -46,7 +46,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/version.go b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/version.go index eddfca11333..c13bf8f130b 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpooloperations/version.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpooloperations/version.go @@ -1,12 +1,10 @@ package elasticpooloperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpooloperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpooloperations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpools/README.md b/resource-manager/sql/2023-08-01-preview/elasticpools/README.md index ea689a198d6..063ea9fd342 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpools/README.md +++ b/resource-manager/sql/2023-08-01-preview/elasticpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/elasticpools` Documentation -The `elasticpools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `elasticpools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/elasticpools/client.go b/resource-manager/sql/2023-08-01-preview/elasticpools/client.go index 2fbd56d5c0d..d6335179470 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpools/client.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpools/client.go @@ -15,7 +15,7 @@ type ElasticPoolsClient struct { } func NewElasticPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*ElasticPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "elasticpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "elasticpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ElasticPoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go b/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go index f311ee6c3f9..8cad14ea50b 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpools/method_get.go @@ -46,7 +46,6 @@ func (c ElasticPoolsClient) Get(ctx context.Context, id commonids.SqlElasticPool var model ElasticPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go b/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go index 6d3b53d468b..62ae75c61d6 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpools/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/elasticpools/version.go b/resource-manager/sql/2023-08-01-preview/elasticpools/version.go index 677c093d4fe..0237bdee258 100644 --- a/resource-manager/sql/2023-08-01-preview/elasticpools/version.go +++ b/resource-manager/sql/2023-08-01-preview/elasticpools/version.go @@ -1,12 +1,10 @@ package elasticpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/elasticpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/elasticpools/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md index 4ca4fcd9365..3e983ccbf32 100644 --- a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md +++ b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/encryptionprotectors` Documentation -The `encryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `encryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go index 0213a8a383d..f72697edceb 100644 --- a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go +++ b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/client.go @@ -15,7 +15,7 @@ type EncryptionProtectorsClient struct { } func NewEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go index 659214dd4e9..f1b561315dc 100644 --- a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c EncryptionProtectorsClient) Get(ctx context.Context, id commonids.SqlSer var model EncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go index 849019339de..83ac31ef979 100644 --- a/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go +++ b/resource-manager/sql/2023-08-01-preview/encryptionprotectors/version.go @@ -1,12 +1,10 @@ package encryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionprotectors/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/endpointcertificates/README.md b/resource-manager/sql/2023-08-01-preview/endpointcertificates/README.md index db68b1c2aac..486aa693a51 100644 --- a/resource-manager/sql/2023-08-01-preview/endpointcertificates/README.md +++ b/resource-manager/sql/2023-08-01-preview/endpointcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/endpointcertificates` Documentation -The `endpointcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `endpointcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/endpointcertificates/client.go b/resource-manager/sql/2023-08-01-preview/endpointcertificates/client.go index d10853ad816..d3524ab4566 100644 --- a/resource-manager/sql/2023-08-01-preview/endpointcertificates/client.go +++ b/resource-manager/sql/2023-08-01-preview/endpointcertificates/client.go @@ -15,7 +15,7 @@ type EndpointCertificatesClient struct { } func NewEndpointCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpointcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpointcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/endpointcertificates/id_endpointcertificate.go b/resource-manager/sql/2023-08-01-preview/endpointcertificates/id_endpointcertificate.go index 26d04f447fb..3835fcdf65e 100644 --- a/resource-manager/sql/2023-08-01-preview/endpointcertificates/id_endpointcertificate.go +++ b/resource-manager/sql/2023-08-01-preview/endpointcertificates/id_endpointcertificate.go @@ -44,7 +44,7 @@ func ParseEndpointCertificateID(input string) (*EndpointCertificateId, error) { } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointCertificateIDInsensitively(input string) (*EndpointCertificate } id := EndpointCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/endpointcertificates/method_get.go b/resource-manager/sql/2023-08-01-preview/endpointcertificates/method_get.go index b7a356deab9..dfe976af079 100644 --- a/resource-manager/sql/2023-08-01-preview/endpointcertificates/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/endpointcertificates/method_get.go @@ -45,7 +45,6 @@ func (c EndpointCertificatesClient) Get(ctx context.Context, id EndpointCertific var model EndpointCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/endpointcertificates/version.go b/resource-manager/sql/2023-08-01-preview/endpointcertificates/version.go index a4e30f42843..55b3253a880 100644 --- a/resource-manager/sql/2023-08-01-preview/endpointcertificates/version.go +++ b/resource-manager/sql/2023-08-01-preview/endpointcertificates/version.go @@ -1,12 +1,10 @@ package endpointcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpointcertificates/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/failovergroups/README.md b/resource-manager/sql/2023-08-01-preview/failovergroups/README.md index 3ab4ba5ac3b..33494d627c9 100644 --- a/resource-manager/sql/2023-08-01-preview/failovergroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/failovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/failovergroups` Documentation -The `failovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `failovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/failovergroups/client.go b/resource-manager/sql/2023-08-01-preview/failovergroups/client.go index edf4434acee..2ea4965a0c0 100644 --- a/resource-manager/sql/2023-08-01-preview/failovergroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/failovergroups/client.go @@ -15,7 +15,7 @@ type FailoverGroupsClient struct { } func NewFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*FailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "failovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "failovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go b/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go index b27ee1d2961..3a16eb69b5d 100644 --- a/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go +++ b/resource-manager/sql/2023-08-01-preview/failovergroups/id_failovergroup.go @@ -44,7 +44,7 @@ func ParseFailoverGroupID(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFailoverGroupIDInsensitively(input string) (*FailoverGroupId, error) { } id := FailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go b/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go index ab2386fa0a5..61d249dd805 100644 --- a/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/failovergroups/method_get.go @@ -45,7 +45,6 @@ func (c FailoverGroupsClient) Get(ctx context.Context, id FailoverGroupId) (resu var model FailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/failovergroups/version.go b/resource-manager/sql/2023-08-01-preview/failovergroups/version.go index 47594b7e93d..9b466ab7cf7 100644 --- a/resource-manager/sql/2023-08-01-preview/failovergroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/failovergroups/version.go @@ -1,12 +1,10 @@ package failovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/failovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/failovergroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/README.md b/resource-manager/sql/2023-08-01-preview/firewallrules/README.md index 1df2c1177a0..7928c06e60a 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/README.md +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/client.go b/resource-manager/sql/2023-08-01-preview/firewallrules/client.go index ca183214bd2..5ecd222a8c7 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/client.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/client.go @@ -15,7 +15,7 @@ type FirewallRulesClient struct { } func NewFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go b/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go index 36610c932a0..ad5d1b2e0b0 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go index 20251b56b61..a122b14e4d9 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c FirewallRulesClient) CreateOrUpdate(ctx context.Context, id FirewallRule var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go b/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go index 37bca7c40d8..6b53b2919c9 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c FirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (result var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go b/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go index 5541e3df8a2..97cafcd2e7a 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/method_replace.go @@ -52,7 +52,6 @@ func (c FirewallRulesClient) Replace(ctx context.Context, id commonids.SqlServer var model FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/firewallrules/version.go b/resource-manager/sql/2023-08-01-preview/firewallrules/version.go index 19e5d1fde3b..3d23e65959e 100644 --- a/resource-manager/sql/2023-08-01-preview/firewallrules/version.go +++ b/resource-manager/sql/2023-08-01-preview/firewallrules/version.go @@ -1,12 +1,10 @@ package firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/firewallrules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md index e0a7a086963..9aa81383a42 100644 --- a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/geobackuppolicies` Documentation -The `geobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `geobackuppolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go index dbc369d4a8a..bef6b615722 100644 --- a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/client.go @@ -15,7 +15,7 @@ type GeoBackupPoliciesClient struct { } func NewGeoBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*GeoBackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "geobackuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "geobackuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GeoBackupPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go index 0df4cf0ab5d..d329ea74a15 100644 --- a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, id commonid var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go index 7927b9f10a6..8a37d55fda5 100644 --- a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/method_get.go @@ -47,7 +47,6 @@ func (c GeoBackupPoliciesClient) Get(ctx context.Context, id commonids.SqlDataba var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go index 098c56ed02d..f4390568082 100644 --- a/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/geobackuppolicies/version.go @@ -1,12 +1,10 @@ package geobackuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geobackuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/geobackuppolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md index 4f66bd83dfa..717903cdf86 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancefailovergroups` Documentation -The `instancefailovergroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `instancefailovergroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go index 77237fd2c0a..32dba8d6339 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/client.go @@ -15,7 +15,7 @@ type InstanceFailoverGroupsClient struct { } func NewInstanceFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstanceFailoverGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancefailovergroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancefailovergroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstanceFailoverGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go index 56d3645eed9..478205f6ec3 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_instancefailovergroup.go @@ -44,7 +44,7 @@ func ParseInstanceFailoverGroupID(input string) (*InstanceFailoverGroupId, error } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceFailoverGroupIDInsensitively(input string) (*InstanceFailoverG } id := InstanceFailoverGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go index 43354417237..4a8e272c043 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go index 1254e8ce94b..97fdea7143e 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/method_get.go @@ -45,7 +45,6 @@ func (c InstanceFailoverGroupsClient) Get(ctx context.Context, id InstanceFailov var model InstanceFailoverGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go index ea6b1f62688..d68238eb49c 100644 --- a/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/instancefailovergroups/version.go @@ -1,12 +1,10 @@ package instancefailovergroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancefailovergroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancefailovergroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/instancepools/README.md b/resource-manager/sql/2023-08-01-preview/instancepools/README.md index c834e759554..bf51f161ee3 100644 --- a/resource-manager/sql/2023-08-01-preview/instancepools/README.md +++ b/resource-manager/sql/2023-08-01-preview/instancepools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/instancepools` Documentation -The `instancepools` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `instancepools` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/instancepools/client.go b/resource-manager/sql/2023-08-01-preview/instancepools/client.go index 4454bc0d353..a637ecc1205 100644 --- a/resource-manager/sql/2023-08-01-preview/instancepools/client.go +++ b/resource-manager/sql/2023-08-01-preview/instancepools/client.go @@ -15,7 +15,7 @@ type InstancePoolsClient struct { } func NewInstancePoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstancePoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "instancepools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "instancepools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InstancePoolsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/instancepools/id_instancepool.go b/resource-manager/sql/2023-08-01-preview/instancepools/id_instancepool.go index 7edfa1a28aa..ed208898430 100644 --- a/resource-manager/sql/2023-08-01-preview/instancepools/id_instancepool.go +++ b/resource-manager/sql/2023-08-01-preview/instancepools/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/instancepools/method_get.go b/resource-manager/sql/2023-08-01-preview/instancepools/method_get.go index b33774f4fc8..b953e524138 100644 --- a/resource-manager/sql/2023-08-01-preview/instancepools/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/instancepools/method_get.go @@ -45,7 +45,6 @@ func (c InstancePoolsClient) Get(ctx context.Context, id InstancePoolId) (result var model InstancePool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/instancepools/version.go b/resource-manager/sql/2023-08-01-preview/instancepools/version.go index d0998ff61ca..fe5be5913fa 100644 --- a/resource-manager/sql/2023-08-01-preview/instancepools/version.go +++ b/resource-manager/sql/2023-08-01-preview/instancepools/version.go @@ -1,12 +1,10 @@ package instancepools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/instancepools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/instancepools/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/README.md b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/README.md index 23d5037d10a..973e9a6611f 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/README.md +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/ipv6firewallrules` Documentation -The `ipv6firewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `ipv6firewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/client.go b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/client.go index be0b08e1bdb..59b1646ba2d 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/client.go +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/client.go @@ -15,7 +15,7 @@ type IPv6FirewallRulesClient struct { } func NewIPv6FirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*IPv6FirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipv6firewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipv6firewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPv6FirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/id_ipv6firewallrule.go b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/id_ipv6firewallrule.go index 8ff72cf837d..eb3a1d11bf8 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/id_ipv6firewallrule.go +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/id_ipv6firewallrule.go @@ -44,7 +44,7 @@ func ParseIPv6FirewallRuleID(input string) (*IPv6FirewallRuleId, error) { } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIPv6FirewallRuleIDInsensitively(input string) (*IPv6FirewallRuleId, er } id := IPv6FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_createorupdate.go index 011a037dba9..51a11453d62 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, id IPv6Fire var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_get.go b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_get.go index fcacb9b30c6..7eec857c439 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/method_get.go @@ -45,7 +45,6 @@ func (c IPv6FirewallRulesClient) Get(ctx context.Context, id IPv6FirewallRuleId) var model IPv6FirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/version.go b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/version.go index 7426e7b4406..c5caa8578d1 100644 --- a/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/version.go +++ b/resource-manager/sql/2023-08-01-preview/ipv6firewallrules/version.go @@ -1,12 +1,10 @@ package ipv6firewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipv6firewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipv6firewallrules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobagents/README.md b/resource-manager/sql/2023-08-01-preview/jobagents/README.md index cefec31899f..6a338c3f683 100644 --- a/resource-manager/sql/2023-08-01-preview/jobagents/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents` Documentation -The `jobagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobagents/client.go b/resource-manager/sql/2023-08-01-preview/jobagents/client.go index ab27e52d87a..12ff1946c03 100644 --- a/resource-manager/sql/2023-08-01-preview/jobagents/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobagents/client.go @@ -15,7 +15,7 @@ type JobAgentsClient struct { } func NewJobAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go index 35f4497a3da..fb9135ac062 100644 --- a/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobagents/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go b/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go index 433d5a1b380..ee85f1b86c7 100644 --- a/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobagents/method_get.go @@ -45,7 +45,6 @@ func (c JobAgentsClient) Get(ctx context.Context, id JobAgentId) (result GetOper var model JobAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobagents/version.go b/resource-manager/sql/2023-08-01-preview/jobagents/version.go index f543d9d576c..f2368f31c80 100644 --- a/resource-manager/sql/2023-08-01-preview/jobagents/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobagents/version.go @@ -1,12 +1,10 @@ package jobagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobagents/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md b/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md index 2c830e23f4d..e09d8fa22e5 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobcredentials` Documentation -The `jobcredentials` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobcredentials` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go index 0977cf3d384..9bc1ca997fe 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/client.go @@ -15,7 +15,7 @@ type JobCredentialsClient struct { } func NewJobCredentialsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobCredentialsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobcredentials", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobcredentials", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobCredentialsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go index 6b7ea0b08a1..159c1c26ed9 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/id_credential.go @@ -46,7 +46,7 @@ func ParseCredentialID(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCredentialIDInsensitively(input string) (*CredentialId, error) { } id := CredentialId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go index 94291d1711b..9efd8aaeb2a 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go index 3f021789ab4..9cd18192efa 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobCredentialsClient) CreateOrUpdate(ctx context.Context, id CredentialI var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go index 27cbbfe3550..c9c5e2020d9 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/method_get.go @@ -45,7 +45,6 @@ func (c JobCredentialsClient) Get(ctx context.Context, id CredentialId) (result var model JobCredential result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go b/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go index 554efe5721d..df716508da5 100644 --- a/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobcredentials/version.go @@ -1,12 +1,10 @@ package jobcredentials -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobcredentials/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobcredentials/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/README.md b/resource-manager/sql/2023-08-01-preview/jobexecutions/README.md index 01c1dc107f2..b47a3c45660 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobexecutions` Documentation -The `jobexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/client.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/client.go index b52787a2a5b..cad4ae0b98f 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/client.go @@ -15,7 +15,7 @@ type JobExecutionsClient struct { } func NewJobExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_execution.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_execution.go index 9892ee270be..7613e0b20d9 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_execution.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_job.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_job.go index 487e172c701..b5991da3410 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_job.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_jobagent.go index dc929e76456..9df1db2dc84 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_get.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_get.go index d8d69abc245..9c693797e4c 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobExecutionsClient) Get(ctx context.Context, id ExecutionId) (result Ge var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyagent.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyagent.go index 102e1c0c866..3a05ff3fcb6 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyagent.go @@ -45,6 +45,7 @@ func (o ListByAgentOperationOptions) ToHeaders() *client.Headers { func (o ListByAgentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyjob.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyjob.go index f20a5ddb75a..e757e5359ff 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyjob.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/method_listbyjob.go @@ -45,6 +45,7 @@ func (o ListByJobOperationOptions) ToHeaders() *client.Headers { func (o ListByJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/jobexecutions/version.go b/resource-manager/sql/2023-08-01-preview/jobexecutions/version.go index ff94fec37f9..da855600d0e 100644 --- a/resource-manager/sql/2023-08-01-preview/jobexecutions/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobexecutions/version.go @@ -1,12 +1,10 @@ package jobexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobexecutions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/README.md b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/README.md index 170b5fd85db..9a913a34199 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobprivateendpoints` Documentation -The `jobprivateendpoints` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobprivateendpoints` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/client.go b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/client.go index f8e9fe6b48c..dafe168f98e 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/client.go @@ -15,7 +15,7 @@ type JobPrivateEndpointsClient struct { } func NewJobPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobPrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobprivateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobprivateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobPrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_jobagent.go index ec86d370193..868a6e17c76 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_privateendpoint.go b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_privateendpoint.go index b0c35bf809e..77eec226344 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_privateendpoint.go +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/id_privateendpoint.go @@ -46,7 +46,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/method_get.go b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/method_get.go index 4d46cb9f263..02f75d07cc3 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/method_get.go @@ -45,7 +45,6 @@ func (c JobPrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId var model JobPrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/version.go b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/version.go index 57e1d934e3c..e514406c8bf 100644 --- a/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobprivateendpoints/version.go @@ -1,12 +1,10 @@ package jobprivateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobprivateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobprivateendpoints/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/README.md b/resource-manager/sql/2023-08-01-preview/jobs/README.md index 7f5d667753c..8456ffb66a1 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobs` Documentation -The `jobs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobs/client.go b/resource-manager/sql/2023-08-01-preview/jobs/client.go index f89b0c72db7..762c577e9e1 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/client.go @@ -15,7 +15,7 @@ type JobsClient struct { } func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/id_job.go b/resource-manager/sql/2023-08-01-preview/jobs/id_job.go index 74e38cf42db..94b94f22d2c 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/id_job.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobs/id_jobagent.go index d8c462a952d..38ae229c3f9 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/jobs/method_createorupdate.go index 769a43e93f0..f3c623fcd53 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobsClient) CreateOrUpdate(ctx context.Context, id JobId, input Job) (re var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/method_get.go b/resource-manager/sql/2023-08-01-preview/jobs/method_get.go index 3e21435af33..92dd9e2cf39 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/method_get.go @@ -45,7 +45,6 @@ func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationRespo var model Job result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobs/version.go b/resource-manager/sql/2023-08-01-preview/jobs/version.go index 591a6b40ad8..ce6ca6ed5fb 100644 --- a/resource-manager/sql/2023-08-01-preview/jobs/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobs/version.go @@ -1,12 +1,10 @@ package jobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobs/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/README.md b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/README.md index 1551c269527..1574f750faa 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobstepexecutions` Documentation -The `jobstepexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobstepexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/client.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/client.go index 505fab937cf..097a54ba533 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/client.go @@ -15,7 +15,7 @@ type JobStepExecutionsClient struct { } func NewJobStepExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobstepexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobstepexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_execution.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_execution.go index dc6ed7bfaa6..1ce8d1ea19f 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_execution.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_executionstep.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_executionstep.go index b114b1d0236..489ca126e41 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_get.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_get.go index a0551816208..0eb160b968b 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobStepExecutionsClient) Get(ctx context.Context, id ExecutionStepId) (r var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_listbyjobexecution.go index e7c228c0e49..b3a448d3137 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/version.go b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/version.go index 1311df38173..060bcb66337 100644 --- a/resource-manager/sql/2023-08-01-preview/jobstepexecutions/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobstepexecutions/version.go @@ -1,12 +1,10 @@ package jobstepexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobstepexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobstepexecutions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/README.md b/resource-manager/sql/2023-08-01-preview/jobsteps/README.md index a67430d3c44..17ae206f64e 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobsteps` Documentation -The `jobsteps` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobsteps` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/client.go b/resource-manager/sql/2023-08-01-preview/jobsteps/client.go index cc5801243a3..51ed069463b 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/client.go @@ -15,7 +15,7 @@ type JobStepsClient struct { } func NewJobStepsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobsteps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobsteps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobStepsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/id_job.go b/resource-manager/sql/2023-08-01-preview/jobsteps/id_job.go index b30a6d1461e..5f349b17d55 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/id_job.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/id_step.go b/resource-manager/sql/2023-08-01-preview/jobsteps/id_step.go index 32c798fcf61..3d1c88df21a 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/id_step.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/id_step.go @@ -48,7 +48,7 @@ func ParseStepID(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseStepIDInsensitively(input string) (*StepId, error) { } id := StepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/id_version.go b/resource-manager/sql/2023-08-01-preview/jobsteps/id_version.go index b2fd57d5973..424c7d21890 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/id_version.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/id_versionstep.go b/resource-manager/sql/2023-08-01-preview/jobsteps/id_versionstep.go index 2342ceeb2eb..217ac00cda3 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/id_versionstep.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/id_versionstep.go @@ -50,7 +50,7 @@ func ParseVersionStepID(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseVersionStepIDInsensitively(input string) (*VersionStepId, error) { } id := VersionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/jobsteps/method_createorupdate.go index 6d1f3f7f052..20835ec1bf8 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobStepsClient) CreateOrUpdate(ctx context.Context, id StepId, input Job var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/method_get.go b/resource-manager/sql/2023-08-01-preview/jobsteps/method_get.go index fe4c2266990..9fe63607acd 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/method_get.go @@ -45,7 +45,6 @@ func (c JobStepsClient) Get(ctx context.Context, id StepId) (result GetOperation var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/method_getbyversion.go b/resource-manager/sql/2023-08-01-preview/jobsteps/method_getbyversion.go index bf925aec949..61fe0bd36ef 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/method_getbyversion.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/method_getbyversion.go @@ -45,7 +45,6 @@ func (c JobStepsClient) GetByVersion(ctx context.Context, id VersionStepId) (res var model JobStep result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobsteps/version.go b/resource-manager/sql/2023-08-01-preview/jobsteps/version.go index c9c92a6c6af..800c25fe923 100644 --- a/resource-manager/sql/2023-08-01-preview/jobsteps/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobsteps/version.go @@ -1,12 +1,10 @@ package jobsteps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobsteps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobsteps/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/README.md b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/README.md index 89dd8e95cce..ce35a5c3246 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobtargetexecutions` Documentation -The `jobtargetexecutions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobtargetexecutions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/client.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/client.go index c0a9a88da76..5e5c95f15ea 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/client.go @@ -15,7 +15,7 @@ type JobTargetExecutionsClient struct { } func NewJobTargetExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetExecutionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_execution.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_execution.go index 8e04cde0125..eba1458a90e 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_execution.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_execution.go @@ -48,7 +48,7 @@ func ParseExecutionID(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseExecutionIDInsensitively(input string) (*ExecutionId, error) { } id := ExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_executionstep.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_executionstep.go index 4d5f8c51f1e..3909011262d 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_executionstep.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_executionstep.go @@ -50,7 +50,7 @@ func ParseExecutionStepID(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseExecutionStepIDInsensitively(input string) (*ExecutionStepId, error) { } id := ExecutionStepId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_target.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_target.go index 992dd7f26e5..4f79d9c93b9 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_target.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/id_target.go @@ -52,7 +52,7 @@ func ParseTargetID(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseTargetIDInsensitively(input string) (*TargetId, error) { } id := TargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_get.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_get.go index 34bd9867542..5f1676b9a64 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetExecutionsClient) Get(ctx context.Context, id TargetId) (result var model JobExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbyjobexecution.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbyjobexecution.go index 1a171760d34..a98a024e117 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbyjobexecution.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbyjobexecution.go @@ -45,6 +45,7 @@ func (o ListByJobExecutionOperationOptions) ToHeaders() *client.Headers { func (o ListByJobExecutionOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbystep.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbystep.go index e3bfb49f5a4..9f647e1f496 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbystep.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/method_listbystep.go @@ -45,6 +45,7 @@ func (o ListByStepOperationOptions) ToHeaders() *client.Headers { func (o ListByStepOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/version.go b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/version.go index e7a4f88f81f..d4f58241d82 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetexecutions/version.go @@ -1,12 +1,10 @@ package jobtargetexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetexecutions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/README.md b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/README.md index 68ecac1686b..75ca19bb01c 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobtargetgroups` Documentation -The `jobtargetgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobtargetgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/client.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/client.go index e797ddd9702..0b3a0245e33 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/client.go @@ -15,7 +15,7 @@ type JobTargetGroupsClient struct { } func NewJobTargetGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobTargetGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobtargetgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobtargetgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobTargetGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_jobagent.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_jobagent.go index 58ffd117c50..ab68b6a0cd7 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_jobagent.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_jobagent.go @@ -44,7 +44,7 @@ func ParseJobAgentID(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error) { } id := JobAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_targetgroup.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_targetgroup.go index b756f36265f..ce03b2e09f0 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_targetgroup.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/id_targetgroup.go @@ -46,7 +46,7 @@ func ParseTargetGroupID(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTargetGroupIDInsensitively(input string) (*TargetGroupId, error) { } id := TargetGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_createorupdate.go index b3e95b511bb..a4c7de8d4fb 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_createorupdate.go @@ -50,7 +50,6 @@ func (c JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, id TargetGrou var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_get.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_get.go index 88762b5b420..bf1e5978670 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/method_get.go @@ -45,7 +45,6 @@ func (c JobTargetGroupsClient) Get(ctx context.Context, id TargetGroupId) (resul var model JobTargetGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/version.go b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/version.go index 507b9a18964..966cb2127fd 100644 --- a/resource-manager/sql/2023-08-01-preview/jobtargetgroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobtargetgroups/version.go @@ -1,12 +1,10 @@ package jobtargetgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobtargetgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobtargetgroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/README.md b/resource-manager/sql/2023-08-01-preview/jobversions/README.md index e23139c09f7..ac1184c8aa7 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/README.md +++ b/resource-manager/sql/2023-08-01-preview/jobversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobversions` Documentation -The `jobversions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `jobversions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/client.go b/resource-manager/sql/2023-08-01-preview/jobversions/client.go index 6fad5b76da0..34b9c35d823 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/client.go +++ b/resource-manager/sql/2023-08-01-preview/jobversions/client.go @@ -15,7 +15,7 @@ type JobVersionsClient struct { } func NewJobVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobVersionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/id_job.go b/resource-manager/sql/2023-08-01-preview/jobversions/id_job.go index 403aeebc0a1..92c98eb09fb 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/id_job.go +++ b/resource-manager/sql/2023-08-01-preview/jobversions/id_job.go @@ -46,7 +46,7 @@ func ParseJobID(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobIDInsensitively(input string) (*JobId, error) { } id := JobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/id_version.go b/resource-manager/sql/2023-08-01-preview/jobversions/id_version.go index 3c7270ed145..1977931b046 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/id_version.go +++ b/resource-manager/sql/2023-08-01-preview/jobversions/id_version.go @@ -48,7 +48,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/method_get.go b/resource-manager/sql/2023-08-01-preview/jobversions/method_get.go index 0b960bfccf8..02d5d8e4621 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/jobversions/method_get.go @@ -45,7 +45,6 @@ func (c JobVersionsClient) Get(ctx context.Context, id VersionId) (result GetOpe var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/jobversions/version.go b/resource-manager/sql/2023-08-01-preview/jobversions/version.go index b298e81840e..d1829be3ddb 100644 --- a/resource-manager/sql/2023-08-01-preview/jobversions/version.go +++ b/resource-manager/sql/2023-08-01-preview/jobversions/version.go @@ -1,12 +1,10 @@ package jobversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobversions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/README.md b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/README.md index 43acca25855..950aa6e1273 100644 --- a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads` Documentation -The `ledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `ledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/client.go b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/client.go index ce01a3f7d58..db269c39127 100644 --- a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type LedgerDigestUploadsClient struct { } func NewLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*LedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/method_get.go b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/method_get.go index ebf59affd70..33176ebdcbe 100644 --- a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c LedgerDigestUploadsClient) Get(ctx context.Context, id commonids.SqlData var model LedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/version.go b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/version.go index 642a226130a..8e8d6871bf3 100644 --- a/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-08-01-preview/ledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package ledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ledgerdigestuploads/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/locationcapabilities/README.md b/resource-manager/sql/2023-08-01-preview/locationcapabilities/README.md index 12086ecc8ee..c1d886cf8d3 100644 --- a/resource-manager/sql/2023-08-01-preview/locationcapabilities/README.md +++ b/resource-manager/sql/2023-08-01-preview/locationcapabilities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/locationcapabilities` Documentation -The `locationcapabilities` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `locationcapabilities` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/locationcapabilities/client.go b/resource-manager/sql/2023-08-01-preview/locationcapabilities/client.go index a1b9199a3ec..4b3add57b3b 100644 --- a/resource-manager/sql/2023-08-01-preview/locationcapabilities/client.go +++ b/resource-manager/sql/2023-08-01-preview/locationcapabilities/client.go @@ -15,7 +15,7 @@ type LocationCapabilitiesClient struct { } func NewLocationCapabilitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationCapabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locationcapabilities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locationcapabilities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationCapabilitiesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/locationcapabilities/id_location.go b/resource-manager/sql/2023-08-01-preview/locationcapabilities/id_location.go index facea6d6858..ab6f98bdf2d 100644 --- a/resource-manager/sql/2023-08-01-preview/locationcapabilities/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/locationcapabilities/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/locationcapabilities/method_capabilitieslistbylocation.go b/resource-manager/sql/2023-08-01-preview/locationcapabilities/method_capabilitieslistbylocation.go index f5e8ce02a3f..1b60f18f5fd 100644 --- a/resource-manager/sql/2023-08-01-preview/locationcapabilities/method_capabilitieslistbylocation.go +++ b/resource-manager/sql/2023-08-01-preview/locationcapabilities/method_capabilitieslistbylocation.go @@ -34,6 +34,7 @@ func (o CapabilitiesListByLocationOperationOptions) ToHeaders() *client.Headers func (o CapabilitiesListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c LocationCapabilitiesClient) CapabilitiesListByLocation(ctx context.Conte var model LocationCapabilities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/locationcapabilities/version.go b/resource-manager/sql/2023-08-01-preview/locationcapabilities/version.go index 93898b93253..6f2131c6e18 100644 --- a/resource-manager/sql/2023-08-01-preview/locationcapabilities/version.go +++ b/resource-manager/sql/2023-08-01-preview/locationcapabilities/version.go @@ -1,12 +1,10 @@ package locationcapabilities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locationcapabilities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locationcapabilities/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/README.md b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/README.md index 5597f9ac68c..4e7ead659ac 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/README.md +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionbackups` Documentation -The `longtermretentionbackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `longtermretentionbackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/client.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/client.go index ca539fe3462..9e4e155a0b4 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/client.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionBackupsClient struct { } func NewLongTermRetentionBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionbackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionbackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_location.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_location.go index df7cbed6823..4f731d61589 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go index dd8495a4805..8cb3eeaca3f 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserver.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionServerID(input string) (*LocationLongTermRete } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionServerIDInsensitively(input string) (*Locatio } id := LocationLongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go index 249bf4b8d11..7018d094888 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_locationlongtermretentionserverlongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseID(input strin } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLocationLongTermRetentionServerLongTermRetentionDatabaseIDInsensitivel } id := LocationLongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionbackup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionbackup.go index 6c6cbacc89a..a374cf4d95c 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionbackup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionbackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionBackupID(input string) (*LongTermRetentionBackupId, e } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionBackupIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go index 5097a9b5051..0b0b67bfb76 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentiondatabaselongtermretentionbackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupID(input string) (*Lon } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionBackupIDInsensitively(input } id := LongTermRetentionDatabaseLongTermRetentionBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserver.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserver.go index 9614c230220..8aa280c8870 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserver.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserver.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionServerID(input string) (*LongTermRetentionServerId, e } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionServerIDInsensitively(input string) (*LongTermRetenti } id := LongTermRetentionServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go index 791b09f3625..a4220eb045c 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_longtermretentionserverlongtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseID(input string) (*Lon } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionServerLongTermRetentionDatabaseIDInsensitively(input } id := LongTermRetentionServerLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_providerlocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_providerlocation.go index b6c17d78354..4102db32a09 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_providerlocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_get.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_get.go index 83e457e6b63..280c8df487d 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) Get(ctx context.Context, id LongTermRete var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_getbyresourcegroup.go index 57ed68a3bb1..22cd05eceda 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, var model LongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbydatabase.go index ebed5c50c8d..7405e8c77cb 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbylocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbylocation.go index 06dc3b458b7..31449bbc121 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbylocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go index d6f15b72a9b..7daf1b2ca94 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go index abdb9a9701e..576995f4a18 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegrouplocation.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go index 75e7eb7fb92..26fc8480b23 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyresourcegroupserver.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupServerOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyserver.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyserver.go index 62fdc0efc10..cbc1d3dea3e 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyserver.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/method_listbyserver.go @@ -40,6 +40,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/version.go b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/version.go index 9f004543d97..b69b0723fe4 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/version.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionbackups/version.go @@ -1,12 +1,10 @@ package longtermretentionbackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionbackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionbackups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/README.md b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/README.md index 599db6d9609..f152e40bb89 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/README.md +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups` Documentation -The `longtermretentionmanagedinstancebackups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `longtermretentionmanagedinstancebackups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/client.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/client.go index 6a32ed2cc3d..c760d7410d6 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/client.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/client.go @@ -15,7 +15,7 @@ type LongTermRetentionManagedInstanceBackupsClient struct { } func NewLongTermRetentionManagedInstanceBackupsClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionManagedInstanceBackupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionmanagedinstancebackups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionManagedInstanceBackupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_location.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_location.go index 76aca04c642..688972876c3 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go index 4cd0105b5a5..f83052eb802 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_locationlongtermretentionmanagedinstance.go @@ -44,7 +44,7 @@ func ParseLocationLongTermRetentionManagedInstanceID(input string) (*LocationLon } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocationLongTermRetentionManagedInstanceIDInsensitively(input string) } id := LocationLongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go index acd36dc0106..2f2a7a512ca 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabase.go @@ -44,7 +44,7 @@ func ParseLongTermRetentionDatabaseID(input string) (*LongTermRetentionDatabaseI } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLongTermRetentionDatabaseIDInsensitively(input string) (*LongTermReten } id := LongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go index 03694cb1e88..a30394c2312 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentiondatabaselongtermretentionmanagedinstancebackup.go @@ -48,7 +48,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupID(inpu } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseLongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupIDInsen } id := LongTermRetentionDatabaseLongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go index 1c25962cb70..5e208b12a7a 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstance.go @@ -42,7 +42,7 @@ func ParseLongTermRetentionManagedInstanceID(input string) (*LongTermRetentionMa } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLongTermRetentionManagedInstanceIDInsensitively(input string) (*LongTe } id := LongTermRetentionManagedInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go index ffc4b70b6e0..cf4522057fb 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancebackup.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceBackupID(input string) (*LongTermReten } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceBackupIDInsensitively(input string) (* } id := LongTermRetentionManagedInstanceBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go index 3c8e12e6554..89cd3acb4b6 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_longtermretentionmanagedinstancelongtermretentiondatabase.go @@ -46,7 +46,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseID(input stri } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseLongTermRetentionManagedInstanceLongTermRetentionDatabaseIDInsensitive } id := LongTermRetentionManagedInstanceLongTermRetentionDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go index c0e83746fc2..628ce0b4457 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_get.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_get.go index e303ce4c680..52afb6a0447 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_get.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go index 15a359e9eb0..b3da83c7539 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_getbyresourcegroup.go @@ -45,7 +45,6 @@ func (c LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx co var model ManagedInstanceLongTermRetentionBackup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go index 15551674f0e..ffe527054b7 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go index 846cb7d2c45..ee445c5bb99 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go index c94f12c6d5a..bb957a98e53 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbylocation.go @@ -43,6 +43,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go index 50e36859a1c..630b3198164 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupdatabase.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupDatabaseOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go index c596e6dc4a1..f0c0bf40d7d 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegroupinstance.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupInstanceOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go index 88b355da8fc..24092396c63 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/method_listbyresourcegrouplocation.go @@ -43,6 +43,7 @@ func (o ListByResourceGroupLocationOperationOptions) ToHeaders() *client.Headers func (o ListByResourceGroupLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/version.go b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/version.go index ca1c5e8d6b9..290b3bf1760 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/version.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionmanagedinstancebackups/version.go @@ -1,12 +1,10 @@ package longtermretentionmanagedinstancebackups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionmanagedinstancebackups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md index 530c5a1db79..5e674246bbc 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies` Documentation -The `longtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `longtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go index 04222fc512a..6cb0156b421 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type LongTermRetentionPoliciesClient struct { } func NewLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*LongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "longtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go index db0dc3527df..094e02d9471 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c LongTermRetentionPoliciesClient) Get(ctx context.Context, id commonids.S var model LongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go index 9de8f7f0595..f69b4b9a897 100644 --- a/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/longtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package longtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/longtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/longtermretentionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/README.md b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/README.md index 908eeba0453..ad18df8d61d 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/README.md +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions` Documentation -The `maintenancewindowoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `maintenancewindowoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/client.go b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/client.go index 1a71a222784..48e61cf6a23 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/client.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowOptionsClient struct { } func NewMaintenanceWindowOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindowoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/method_get.go b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/method_get.go index 8df35ad865e..9070bdecbc9 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowOptionsClient) Get(ctx context.Context, id commonids.Sq var model MaintenanceWindowOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/version.go b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/version.go index 4c1b9804df3..ca0cf2b3395 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/version.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindowoptions/version.go @@ -1,12 +1,10 @@ package maintenancewindowoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindowoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindowoptions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindows/README.md b/resource-manager/sql/2023-08-01-preview/maintenancewindows/README.md index cc8f151ca0b..518492daad7 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindows/README.md +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/maintenancewindows` Documentation -The `maintenancewindows` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `maintenancewindows` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindows/client.go b/resource-manager/sql/2023-08-01-preview/maintenancewindows/client.go index 0cefd568fde..ea7db39e0d7 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindows/client.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindows/client.go @@ -15,7 +15,7 @@ type MaintenanceWindowsClient struct { } func NewMaintenanceWindowsClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenanceWindowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "maintenancewindows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "maintenancewindows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MaintenanceWindowsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_createorupdate.go index d5b61f30d78..2bc30cada7d 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_get.go b/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_get.go index 2358566ed8e..e8b85a9a880 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindows/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c MaintenanceWindowsClient) Get(ctx context.Context, id commonids.SqlDatab var model MaintenanceWindows result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/maintenancewindows/version.go b/resource-manager/sql/2023-08-01-preview/maintenancewindows/version.go index 8d2b59a0adc..2839a42664f 100644 --- a/resource-manager/sql/2023-08-01-preview/maintenancewindows/version.go +++ b/resource-manager/sql/2023-08-01-preview/maintenancewindows/version.go @@ -1,12 +1,10 @@ package maintenancewindows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/maintenancewindows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/maintenancewindows/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md index 3c87388b7c0..4317ceb5b4b 100644 --- a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies` Documentation -The `managedbackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedbackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go index d012d8b6e32..ded8568660a 100644 --- a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedBackupShortTermRetentionPoliciesClient struct { } func NewManagedBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedbackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go index 1c274cb2a2b..e79878dc564 100644 --- a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go index 14b1ba13855..32357dc7a56 100644 --- a/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedbackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedbackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedbackupshorttermretentionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md index 379839dc456..ab446852a59 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings` Documentation -The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabaseadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go index 796b673c011..41a8c523116 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseAdvancedThreatProtectionSettingsClient struct { } func NewManagedDatabaseAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go index a8bf22cc47f..3b9adb2f117 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ct var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go index d2bc6f2ad68..4bcb6059d45 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedDatabaseAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go index 5b54448cf6f..319e921a691 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package manageddatabaseadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseadvancedthreatprotectionsettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/README.md index 446c2c67989..ef0f630a1c9 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns` Documentation -The `manageddatabasecolumns` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasecolumns` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/client.go index f2f48f3c0b0..6fdc391a24c 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseColumnsClient struct { } func NewManagedDatabaseColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasecolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseColumnsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_schematable.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_schematable.go index e9152ed4b57..94a2d1ca52a 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_schematable.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_tablecolumn.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_tablecolumn.go index fc1b5a96046..d13f10399e9 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_tablecolumn.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_get.go index 225de841e2c..1e2e25f1994 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseColumnsClient) Get(ctx context.Context, id TableColumnId) var model DatabaseColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbydatabase.go index 8f9d739806f..2620f38e1cc 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbydatabase.go @@ -43,6 +43,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbytable.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbytable.go index 1223cbbe5af..d8d08906955 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbytable.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/method_listbytable.go @@ -39,6 +39,7 @@ func (o ListByTableOperationOptions) ToHeaders() *client.Headers { func (o ListByTableOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/version.go index 30ad92d51ba..19460b47ea8 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasecolumns/version.go @@ -1,12 +1,10 @@ package manageddatabasecolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasecolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasecolumns/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/README.md index 3a3bbe08e14..49e17833dd7 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations` Documentation -The `manageddatabasemoveoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasemoveoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/client.go index fe178068f70..b92d919387d 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseMoveOperationsClient struct { } func NewManagedDatabaseMoveOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseMoveOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasemoveoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseMoveOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/id_providerlocation.go b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/id_providerlocation.go index f5b30dde23d..50dd10980e5 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/id_providerlocation.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/method_listbylocation.go b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/method_listbylocation.go index d154d5af320..658e4700de9 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/method_listbylocation.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/method_listbylocation.go @@ -40,6 +40,7 @@ func (o ListByLocationOperationOptions) ToHeaders() *client.Headers { func (o ListByLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/version.go index 5b2867648ae..af4e893c372 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasemoveoperations/version.go @@ -1,12 +1,10 @@ package manageddatabasemoveoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasemoveoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasemoveoperations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/README.md index ec71ccff780..6a7f1f6234d 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasequeries` Documentation -The `manageddatabasequeries` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasequeries` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/client.go index 9c0de435452..02f2d413407 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseQueriesClient struct { } func NewManagedDatabaseQueriesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseQueriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasequeries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasequeries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseQueriesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/id_query.go b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/id_query.go index e3aab1ce4b6..19c59b04f5f 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/id_query.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/id_query.go @@ -46,7 +46,7 @@ func ParseQueryID(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseQueryIDInsensitively(input string) (*QueryId, error) { } id := QueryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_get.go index 99fb027a263..22ceda6679a 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseQueriesClient) Get(ctx context.Context, id QueryId) (resu var model ManagedInstanceQuery result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_listbyquery.go b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_listbyquery.go index e0e521010a7..9e1b714038e 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_listbyquery.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/method_listbyquery.go @@ -41,6 +41,7 @@ func (o ListByQueryOperationOptions) ToHeaders() *client.Headers { func (o ListByQueryOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/version.go index 5c4913d3805..9678e389eb0 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasequeries/version.go @@ -1,12 +1,10 @@ package manageddatabasequeries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasequeries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasequeries/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/README.md index b16f3079b7d..6695c0f99fd 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails` Documentation -The `manageddatabaserestoredetails` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabaserestoredetails` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/client.go index d1f42caae83..27cf405d0b9 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseRestoreDetailsClient struct { } func NewManagedDatabaseRestoreDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseRestoreDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaserestoredetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseRestoreDetailsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/method_get.go index dce02c891b8..c20a048d179 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, id commoni var model ManagedDatabaseRestoreDetailsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/version.go index c2ec73511e5..c4ea877673d 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaserestoredetails/version.go @@ -1,12 +1,10 @@ package manageddatabaserestoredetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaserestoredetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaserestoredetails/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md index ff8a9366c9b..97b27459a17 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabases` Documentation -The `manageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go index d7286c73b10..ba3a6da68af 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabases/client.go @@ -15,7 +15,7 @@ type ManagedDatabasesClient struct { } func NewManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go index d04774f62a4..66605aa1097 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabases/method_get.go @@ -46,7 +46,6 @@ func (c ManagedDatabasesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go index d965dc2294e..67859485257 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabases/version.go @@ -1,12 +1,10 @@ package manageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/README.md index a8c17b2f55f..402e08c8dbb 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas` Documentation -The `manageddatabaseschemas` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabaseschemas` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/client.go index b06ead3a626..85abf3277a7 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSchemasClient struct { } func NewManagedDatabaseSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabaseschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSchemasClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/id_databaseschema.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/id_databaseschema.go index 44f17647870..c65b1f99ec7 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/id_databaseschema.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_get.go index de00813d029..078bf701b38 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSchemasClient) Get(ctx context.Context, id DatabaseSchema var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_listbydatabase.go index 1e9c1d82bec..abc663abef3 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/version.go index 3ec7bcb344c..61315fa0c8b 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabaseschemas/version.go @@ -1,12 +1,10 @@ package manageddatabaseschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabaseschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabaseschemas/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/README.md index 9edbf2a5de9..739bd374b8f 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies` Documentation -The `manageddatabasesecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasesecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/client.go index dd99d94d57a..39ea31e3f4d 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityAlertPoliciesClient struct { } func NewManagedDatabaseSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go index e6d916c439c..242c1898286 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.C var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_get.go index 86cc6d16699..edb0bda0d9f 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, id var model ManagedDatabaseSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/version.go index 93b990778b1..1fcb03f63a3 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityalertpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/README.md index 8377522d4f1..731296073ba 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents` Documentation -The `manageddatabasesecurityevents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasesecurityevents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/client.go index 75a993c8838..1f36e33d9ac 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSecurityEventsClient struct { } func NewManagedDatabaseSecurityEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSecurityEventsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesecurityevents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSecurityEventsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/method_listbydatabase.go index e65ae036286..97e4318326e 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/method_listbydatabase.go @@ -42,6 +42,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/version.go index 4d34d82696a..c3e5a0397e8 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesecurityevents/version.go @@ -1,12 +1,10 @@ package manageddatabasesecurityevents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesecurityevents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesecurityevents/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/README.md index e0ad16e9c70..b938c280982 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels` Documentation -The `manageddatabasesensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasesensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/client.go index b19840e9433..5f1ce307e35 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseSensitivityLabelsClient struct { } func NewManagedDatabaseSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseSensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasesensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseSensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go index afd25fa75f3..75e9d7b91bf 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_sensitivitylabelsensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSensitivityLabelSourceID(input string) (*SensitivityLa } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSensitivityLabelSourceIDInsensitively(input string) (* } id := SensitivityLabelSensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go index e0a35c17c19..7cf497ad34a 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/id_tablecolumn.go @@ -50,7 +50,7 @@ func ParseTableColumnID(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseTableColumnIDInsensitively(input string) (*TableColumnId, error) { } id := TableColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go index b2aab8c20f0..9cbc8f10e77 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Conte var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_get.go index 62d197105f0..1fd0579b104 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, id Sens var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go index fe2c0337ad5..b1519531487 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go index 103ca96f4ff..5dd91867ecc 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go index 912989aa100..43c4c7959b5 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/version.go index 849607d3543..d565172c213 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasesensitivitylabels/version.go @@ -1,12 +1,10 @@ package manageddatabasesensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasesensitivitylabels/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/README.md index 089935e3cd5..7adddc049b6 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasetables` Documentation -The `manageddatabasetables` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasetables` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/client.go index f594505d94c..96587bb312b 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTablesClient struct { } func NewManagedDatabaseTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTablesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_databaseschema.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_databaseschema.go index 7e496fb806a..8a5db7ce72a 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_databaseschema.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_databaseschema.go @@ -46,7 +46,7 @@ func ParseDatabaseSchemaID(input string) (*DatabaseSchemaId, error) { } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDatabaseSchemaIDInsensitively(input string) (*DatabaseSchemaId, error) } id := DatabaseSchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_schematable.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_schematable.go index 423679d2c00..de0cd4c9907 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_schematable.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/id_schematable.go @@ -48,7 +48,7 @@ func ParseSchemaTableID(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSchemaTableIDInsensitively(input string) (*SchemaTableId, error) { } id := SchemaTableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_get.go index 2c93261aa97..02d4e056c9d 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseTablesClient) Get(ctx context.Context, id SchemaTableId) var model DatabaseTable result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_listbyschema.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_listbyschema.go index acd107e0eb0..257f3642fc0 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_listbyschema.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/method_listbyschema.go @@ -39,6 +39,7 @@ func (o ListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o ListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/version.go index af0a11cfb66..250b7dcc0bc 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetables/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetables/version.go @@ -1,12 +1,10 @@ package manageddatabasetables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetables/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/README.md index 76f4a1c4102..62eaeb2b296 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption` Documentation -The `manageddatabasetransparentdataencryption` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasetransparentdataencryption` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/client.go index 52d7ec6aa01..31ad96ae97b 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseTransparentDataEncryptionClient struct { } func NewManagedDatabaseTransparentDataEncryptionClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseTransparentDataEncryptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasetransparentdataencryption", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseTransparentDataEncryptionClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go index 57b03fdf08b..60b433a559a 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx conte var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_get.go index 76731f636b3..b404946cca2 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, var model ManagedTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/version.go index ce028e8d4f2..f60f9e61326 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasetransparentdataencryption/version.go @@ -1,12 +1,10 @@ package manageddatabasetransparentdataencryption -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasetransparentdataencryption/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md index d4782d1c909..19eb39288d6 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines` Documentation -The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasevulnerabilityassessmentrulebaselines` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go index 87a86d15ad1..8868cfd2b70 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient struct { } func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go index 08d6e69117d..7f724f5f81c 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/id_baselinebaseline.go @@ -48,7 +48,7 @@ func ParseBaselineBaselineID(input string) (*BaselineBaselineId, error) { } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineBaselineIDInsensitively(input string) (*BaselineBaselineId, er } id := BaselineBaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go index a7941a7cfe7..699b0560bb2 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdat var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go index 70f240cd6b1..de5a6f52a37 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx conte var model DatabaseVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go index a33c4dc0322..797b863e654 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentrulebaselines/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentrulebaselines/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/README.md index bf3b563533a..d6e23c576f7 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments` Documentation -The `manageddatabasevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/client.go index fecb266d1ec..5b498f34f62 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentsClient struct { } func NewManagedDatabaseVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go index 3edff16afcb..62d505f7a76 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_get.go index 1245ed42e37..d3c051996fa 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, var model DatabaseVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/version.go index 21ae0259b50..50d50b7e191 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessments/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/README.md index cad1bdc0971..658041d3c16 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans` Documentation -The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `manageddatabasevulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/client.go index 321e4c03318..95d6cefb6bf 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type ManagedDatabaseVulnerabilityAssessmentScansClient struct { } func NewManagedDatabaseVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "manageddatabasevulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedDatabaseVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go index e05b6860c17..f72161ceaa4 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/id_vulnerabilityassessmentvulnerabilityassessmentscan.go @@ -46,7 +46,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanID(input string) (*V } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVulnerabilityAssessmentVulnerabilityAssessmentScanIDInsensitively(inpu } id := VulnerabilityAssessmentVulnerabilityAssessmentScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go index 72012d8a05d..c8fef962b10 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_export.go @@ -46,7 +46,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Co var model DatabaseVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go index d40c91b98dc..4de075471df 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/method_get.go @@ -45,7 +45,6 @@ func (c ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Conte var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/version.go index 8f22dff5ca3..d9a9cd97a47 100644 --- a/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-08-01-preview/manageddatabasevulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package manageddatabasevulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/manageddatabasevulnerabilityassessmentscans/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md index a11f5967300..2eb11555a2a 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators` Documentation -The `managedinstanceadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go index 3f7e77dcf0f..a7a2aabd80b 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdministratorsClient struct { } func NewManagedInstanceAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go index 471776e28e8..c4397fcdc5d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdministratorsClient) Get(ctx context.Context, id commoni var model ManagedInstanceAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go index 47b4d51e30e..10c279affb7 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadministrators/version.go @@ -1,12 +1,10 @@ package managedinstanceadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadministrators/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md index 594450dddce..7eb20b5109e 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings` Documentation -The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceadvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go index e853dabe68f..6d5512300a2 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAdvancedThreatProtectionSettingsClient struct { } func NewManagedInstanceAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceadvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go index 14ef4ffd22a..fc9c442e4b6 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAdvancedThreatProtectionSettingsClient) Get(ctx context.C var model ManagedInstanceAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go index e5a97244b9c..471ea7df402 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceadvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package managedinstanceadvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceadvancedthreatprotectionsettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md index dbdaadcfa03..eb686bdcd61 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications` Documentation -The `managedinstanceazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go index 75cbb0831fd..b6f667aa0f1 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ManagedInstanceAzureADOnlyAuthenticationsClient struct { } func NewManagedInstanceAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go index ad7d02117cc..5b42ddb7ce2 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context var model ManagedInstanceAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go index c15dbd25db9..8867f78c12d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package managedinstanceazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceazureadonlyauthentications/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/README.md b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/README.md index 134bd16729b..9d3f2db2686 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancedtcs` Documentation -The `managedinstancedtcs` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstancedtcs` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/client.go b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/client.go index 5acfb8501a5..4fba23c94a4 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/client.go @@ -15,7 +15,7 @@ type ManagedInstanceDtcsClient struct { } func NewManagedInstanceDtcsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceDtcsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancedtcs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancedtcs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceDtcsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/method_get.go index aa3f960f289..39f964596b4 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceDtcsClient) Get(ctx context.Context, id commonids.SqlMana var model ManagedInstanceDtc result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/version.go b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/version.go index 64c74555ad2..cc6fe188f49 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancedtcs/version.go @@ -1,12 +1,10 @@ package managedinstancedtcs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancedtcs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancedtcs/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md index c4f23676c31..3705aa5c3f0 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors` Documentation -The `managedinstanceencryptionprotectors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceencryptionprotectors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go index 3688e97050c..37d9140cc63 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/client.go @@ -15,7 +15,7 @@ type ManagedInstanceEncryptionProtectorsClient struct { } func NewManagedInstanceEncryptionProtectorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceEncryptionProtectorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceencryptionprotectors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceEncryptionProtectorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go index 067629deb84..d999fb817fd 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, id c var model ManagedInstanceEncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go index aa0f51f26d5..e9ae380f25c 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceencryptionprotectors/version.go @@ -1,12 +1,10 @@ package managedinstanceencryptionprotectors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceencryptionprotectors/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md index fff5fc692cc..8380503cc58 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancekeys` Documentation -The `managedinstancekeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstancekeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go index 06797198c4d..10eda0b8020 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/client.go @@ -15,7 +15,7 @@ type ManagedInstanceKeysClient struct { } func NewManagedInstanceKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancekeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancekeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go index 3636ab872d7..9d052c7a56f 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/id_managedinstancekey.go @@ -44,7 +44,7 @@ func ParseManagedInstanceKeyID(input string) (*ManagedInstanceKeyId, error) { } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceKeyIDInsensitively(input string) (*ManagedInstanceKeyId } id := ManagedInstanceKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go index c7d5ce953d0..a7b6c034e21 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstanceKeysClient) Get(ctx context.Context, id ManagedInstanceKe var model ManagedInstanceKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go index 140196d0475..ccdcd5aba24 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/method_listbyinstance.go @@ -40,6 +40,7 @@ func (o ListByInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go index 843a1f45c7e..3dc0010bee6 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancekeys/version.go @@ -1,12 +1,10 @@ package managedinstancekeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancekeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancekeys/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md index dbe2eb4a02b..d7d88bd0de0 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies` Documentation -The `managedinstancelongtermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstancelongtermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go index d86d5f1cb6d..ed08dffdc43 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedInstanceLongTermRetentionPoliciesClient struct { } func NewManagedInstanceLongTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceLongTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancelongtermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceLongTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go index 5d063142151..17bc6f25917 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, var model ManagedInstanceLongTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go index f5e1a98083c..4b55c3e6c49 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancelongtermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedinstancelongtermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancelongtermretentionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/README.md index 7178127f77d..d9329ad6a68 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceoperations` Documentation -The `managedinstanceoperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceoperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/client.go index e948591d548..8ae66bef970 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/client.go @@ -15,7 +15,7 @@ type ManagedInstanceOperationsClient struct { } func NewManagedInstanceOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/version.go index 2b8e23f5ebe..38d96881fb4 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceoperations/version.go @@ -1,12 +1,10 @@ package managedinstanceoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceoperations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/README.md index bbfa314ea85..a8a1bb7a169 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections` Documentation -The `managedinstanceprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceprivateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/client.go index 7ae7f20f3fc..b52a5ea4cf4 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateEndpointConnectionsClient struct { } func NewManagedInstancePrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go index cb946939c3a..c3a42d71d8f 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/id_managedinstanceprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateEndpointConnectionID(input string) (*ManagedInst } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateEndpointConnectionIDInsensitively(input string) } id := ManagedInstancePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/method_get.go index 938c6671e7a..8de7930b31b 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context var model ManagedInstancePrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/version.go index a2e1935624b..ddf6f3d89ed 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivateendpointconnections/version.go @@ -1,12 +1,10 @@ package managedinstanceprivateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivateendpointconnections/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/README.md b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/README.md index 3577ea70869..d215a61c73f 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources` Documentation -The `managedinstanceprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstanceprivatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/client.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/client.go index d894f68b99c..baa13de3973 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/client.go @@ -15,7 +15,7 @@ type ManagedInstancePrivateLinkResourcesClient struct { } func NewManagedInstancePrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancePrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstanceprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancePrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go index 5f39126e8b7..4529dc63628 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/id_managedinstanceprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseManagedInstancePrivateLinkResourceID(input string) (*ManagedInstancePr } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstancePrivateLinkResourceIDInsensitively(input string) (*Mana } id := ManagedInstancePrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/method_get.go index 5cb364c9b70..0bfbfeddc21 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, id M var model ManagedInstancePrivateLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/version.go b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/version.go index fc85912bedc..c66d4c8a156 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstanceprivatelinkresources/version.go @@ -1,12 +1,10 @@ package managedinstanceprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstanceprivatelinkresources/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/README.md b/resource-manager/sql/2023-08-01-preview/managedinstances/README.md index 7204ccc35e7..605f4c5620b 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances` Documentation -The `managedinstances` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstances` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/client.go b/resource-manager/sql/2023-08-01-preview/managedinstances/client.go index 0618c7ec8de..e894127c1fa 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/client.go @@ -15,7 +15,7 @@ type ManagedInstancesClient struct { } func NewManagedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstancesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go b/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go index c4d1f83519f..31548eb6532 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go index 6a09e24ad41..d4650489f17 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go index 2c318ce242d..21e7a5561c7 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ManagedInstancesClient) Get(ctx context.Context, id commonids.SqlManaged var model ManagedInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go index 55f688b91ac..685fc7f9a70 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go index f98c7ba2901..8ff253cace4 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go index 8a7c6f76675..61e9c8e3192 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbymanagedinstance.go @@ -46,6 +46,7 @@ func (o ListByManagedInstanceOperationOptions) ToHeaders() *client.Headers { func (o ListByManagedInstanceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go index 0a8a15041c2..adbecb68c73 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstances/version.go b/resource-manager/sql/2023-08-01-preview/managedinstances/version.go index 7867a271c1c..928a6bcd3e2 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstances/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstances/version.go @@ -1,12 +1,10 @@ package managedinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstances/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/README.md b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/README.md index 44c641733b4..e04c06a9d6b 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates` Documentation -The `managedinstancetdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstancetdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/client.go b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/client.go index 0172abf1626..6dcfb8c143a 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/client.go @@ -15,7 +15,7 @@ type ManagedInstanceTdeCertificatesClient struct { } func NewManagedInstanceTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceTdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancetdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceTdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/version.go b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/version.go index c3f772345a6..381deacdc6e 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancetdecertificates/version.go @@ -1,12 +1,10 @@ package managedinstancetdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancetdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancetdecertificates/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md index 93a00ceadf0..6d883fb5056 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments` Documentation -The `managedinstancevulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedinstancevulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go index 9b83141b5c6..3caaad8212d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ManagedInstanceVulnerabilityAssessmentsClient struct { } func NewManagedInstanceVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstanceVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedinstancevulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedInstanceVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go index eee4d2c4318..e99b5bc3559 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx contex var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go index d5735bb6e64..cf558597025 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, var model ManagedInstanceVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go index 889c9475c59..b236f6271ba 100644 --- a/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedinstancevulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package managedinstancevulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedinstancevulnerabilityassessments/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/README.md b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/README.md index c8c07cc064d..d5a15d31b59 100644 --- a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads` Documentation -The `managedledgerdigestuploads` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedledgerdigestuploads` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/client.go b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/client.go index d4a7d55ccaa..06b0ada5f1e 100644 --- a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/client.go @@ -15,7 +15,7 @@ type ManagedLedgerDigestUploadsClient struct { } func NewManagedLedgerDigestUploadsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedLedgerDigestUploadsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedledgerdigestuploads", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedLedgerDigestUploadsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/method_get.go b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/method_get.go index 6b801615073..e244cc479e9 100644 --- a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/method_get.go @@ -47,7 +47,6 @@ func (c ManagedLedgerDigestUploadsClient) Get(ctx context.Context, id commonids. var model ManagedLedgerDigestUploads result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/version.go b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/version.go index a83fbfd797a..f8a1d59a87c 100644 --- a/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedledgerdigestuploads/version.go @@ -1,12 +1,10 @@ package managedledgerdigestuploads -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedledgerdigestuploads/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedledgerdigestuploads/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md index e7f4ae65ce7..ddb9c3fa6e2 100644 --- a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies` Documentation -The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedrestorabledroppeddatabasebackupshorttermretentionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go index 7f408f7e72e..4d3926b2444 100644 --- a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/client.go @@ -15,7 +15,7 @@ type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient stru } func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedrestorabledroppeddatabasebackupshorttermretentionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go index e6d2dafdce3..ec3180f3c8d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go index 45d81e6d799..658ba4e5f1d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/method_get.go @@ -46,7 +46,6 @@ func (c ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) var model ManagedBackupShortTermRetentionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go index 476a7c956e4..f3e4fbda321 100644 --- a/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/version.go @@ -1,12 +1,10 @@ package managedrestorabledroppeddatabasebackupshorttermretentionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedrestorabledroppeddatabasebackupshorttermretentionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/README.md b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/README.md index 84967941fb3..471bef55d37 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases` Documentation -The `managedserverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedserverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/client.go b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/client.go index 1004c3cff20..bbb095b5022 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/client.go @@ -15,7 +15,7 @@ type ManagedServerDnsAliasesClient struct { } func NewManagedServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go index 5c1939bd9f3..2bafc3faf2d 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go +++ b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/id_managedinstancednsalias.go @@ -44,7 +44,7 @@ func ParseManagedInstanceDnsAliasID(input string) (*ManagedInstanceDnsAliasId, e } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceDnsAliasIDInsensitively(input string) (*ManagedInstance } id := ManagedInstanceDnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/method_get.go b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/method_get.go index 50d39da3459..6d08e132028 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ManagedServerDnsAliasesClient) Get(ctx context.Context, id ManagedInstan var model ManagedServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/version.go b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/version.go index cee12b4dac7..3cdfdbf1b51 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedserverdnsaliases/version.go @@ -1,12 +1,10 @@ package managedserverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserverdnsaliases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md index 746017e0615..39a9e1784ae 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies` Documentation -The `managedserversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `managedserversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go index 9c1b65773ae..96e6a83b8ad 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ManagedServerSecurityAlertPoliciesClient struct { } func NewManagedServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedserversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go index fb823b52041..5e927a5ac66 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, id co var model ManagedServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go index 56787f9ddb9..f9bf5e6842a 100644 --- a/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/managedserversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package managedserversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedserversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedserversecurityalertpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/README.md b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/README.md index 187bf641921..918cc9c1949 100644 --- a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/README.md +++ b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations` Documentation -The `networksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `networksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/client.go b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/client.go index d5d36bae265..20530b9e06a 100644 --- a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/client.go +++ b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type NetworkSecurityPerimeterConfigurationsClient struct { } func NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index 6b2bec05bbc..48cb9dd9673 100644 --- a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/method_get.go b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/method_get.go index 812efe32b5d..ff7885e0a3d 100644 --- a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/method_get.go @@ -45,7 +45,6 @@ func (c NetworkSecurityPerimeterConfigurationsClient) Get(ctx context.Context, i var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/version.go b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/version.go index 9b4df8c8418..a4713935af2 100644 --- a/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/version.go +++ b/resource-manager/sql/2023-08-01-preview/networksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package networksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md index cd56841830f..5e55bef8005 100644 --- a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md +++ b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/outboundfirewallrules` Documentation -The `outboundfirewallrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `outboundfirewallrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go index 785040374ca..da90d0a7fa0 100644 --- a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go +++ b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/client.go @@ -15,7 +15,7 @@ type OutboundFirewallRulesClient struct { } func NewOutboundFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*OutboundFirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outboundfirewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outboundfirewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutboundFirewallRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go index 98acb0e9aa7..5eb4a5c35c0 100644 --- a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go +++ b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/id_outboundfirewallrule.go @@ -44,7 +44,7 @@ func ParseOutboundFirewallRuleID(input string) (*OutboundFirewallRuleId, error) } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutboundFirewallRuleIDInsensitively(input string) (*OutboundFirewallRu } id := OutboundFirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go index beb1537e220..13c62b7ab15 100644 --- a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/method_get.go @@ -45,7 +45,6 @@ func (c OutboundFirewallRulesClient) Get(ctx context.Context, id OutboundFirewal var model OutboundFirewallRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go index 5947ff5151e..a1b2db54ce1 100644 --- a/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go +++ b/resource-manager/sql/2023-08-01-preview/outboundfirewallrules/version.go @@ -1,12 +1,10 @@ package outboundfirewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outboundfirewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outboundfirewallrules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/README.md b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/README.md index 0ec622b623d..2a8e7dd6436 100644 --- a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/README.md +++ b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/client.go b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/client.go +++ b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/id_privateendpointconnection.go index 3012f48f358..8300705f772 100644 --- a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/method_get.go b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/version.go b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/version.go index 2ac8ac70f15..83e35561429 100644 --- a/resource-manager/sql/2023-08-01-preview/privateendpointconnections/version.go +++ b/resource-manager/sql/2023-08-01-preview/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/privatelinkresources/README.md b/resource-manager/sql/2023-08-01-preview/privatelinkresources/README.md index 11b24df79f8..26a7dd3b28e 100644 --- a/resource-manager/sql/2023-08-01-preview/privatelinkresources/README.md +++ b/resource-manager/sql/2023-08-01-preview/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/privatelinkresources/client.go b/resource-manager/sql/2023-08-01-preview/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/sql/2023-08-01-preview/privatelinkresources/client.go +++ b/resource-manager/sql/2023-08-01-preview/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/privatelinkresources/id_privatelinkresource.go b/resource-manager/sql/2023-08-01-preview/privatelinkresources/id_privatelinkresource.go index 84686616386..ab4bd9a4dea 100644 --- a/resource-manager/sql/2023-08-01-preview/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/sql/2023-08-01-preview/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/privatelinkresources/method_get.go b/resource-manager/sql/2023-08-01-preview/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/sql/2023-08-01-preview/privatelinkresources/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/privatelinkresources/version.go b/resource-manager/sql/2023-08-01-preview/privatelinkresources/version.go index e3d9a1cf35d..5b4318461c4 100644 --- a/resource-manager/sql/2023-08-01-preview/privatelinkresources/version.go +++ b/resource-manager/sql/2023-08-01-preview/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/README.md b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/README.md index f0b3dc9483a..ee677d16592 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/README.md +++ b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/recoverabledatabases` Documentation -The `recoverabledatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `recoverabledatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/client.go b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/client.go index 7642bb32d16..80982a3b14c 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/client.go +++ b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/client.go @@ -15,7 +15,7 @@ type RecoverableDatabasesClient struct { } func NewRecoverableDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverabledatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverabledatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/id_recoverabledatabase.go b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/id_recoverabledatabase.go index bcdf9b88566..e32ba686d9b 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/id_recoverabledatabase.go +++ b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/id_recoverabledatabase.go @@ -44,7 +44,7 @@ func ParseRecoverableDatabaseID(input string) (*RecoverableDatabaseId, error) { } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRecoverableDatabaseIDInsensitively(input string) (*RecoverableDatabase } id := RecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/method_get.go b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/method_get.go index f1d18340b68..2d9eda80b4d 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecoverableDatabasesClient) Get(ctx context.Context, id RecoverableDatab var model RecoverableDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/version.go b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/version.go index 484a6cbfaa4..1ad15a440a5 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverabledatabases/version.go +++ b/resource-manager/sql/2023-08-01-preview/recoverabledatabases/version.go @@ -1,12 +1,10 @@ package recoverabledatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverabledatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverabledatabases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/README.md b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/README.md index ac5b6c8b089..1219bf42787 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/README.md +++ b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases` Documentation -The `recoverablemanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `recoverablemanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/client.go b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/client.go index f1ddf2d8929..62ff80d8685 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/client.go +++ b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/client.go @@ -15,7 +15,7 @@ type RecoverableManagedDatabasesClient struct { } func NewRecoverableManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverablemanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go index 16e8e534478..9d703a5f285 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go +++ b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/id_managedinstancerecoverabledatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRecoverableDatabaseID(input string) (*ManagedInstanceRe } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRecoverableDatabaseIDInsensitively(input string) (*Mana } id := ManagedInstanceRecoverableDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/method_get.go b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/method_get.go index 195ef17cd06..4a358c3509a 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RecoverableManagedDatabasesClient) Get(ctx context.Context, id ManagedIn var model RecoverableManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/version.go b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/version.go index 0503fc1fecc..65d96db1f20 100644 --- a/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/version.go +++ b/resource-manager/sql/2023-08-01-preview/recoverablemanageddatabases/version.go @@ -1,12 +1,10 @@ package recoverablemanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverablemanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverablemanageddatabases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md b/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md index f53e6b1061d..7e1147e994c 100644 --- a/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md +++ b/resource-manager/sql/2023-08-01-preview/replicationlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/replicationlinks` Documentation -The `replicationlinks` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `replicationlinks` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go b/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go index e250a69e9a9..3b6d95b1729 100644 --- a/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go +++ b/resource-manager/sql/2023-08-01-preview/replicationlinks/client.go @@ -15,7 +15,7 @@ type ReplicationLinksClient struct { } func NewReplicationLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "replicationlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "replicationlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReplicationLinksClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go b/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go index 2875766d6b9..ef00cbf2388 100644 --- a/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go +++ b/resource-manager/sql/2023-08-01-preview/replicationlinks/id_replicationlink.go @@ -46,7 +46,7 @@ func ParseReplicationLinkID(input string) (*ReplicationLinkId, error) { } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, erro } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go b/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go index ed216d10173..640a612f108 100644 --- a/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/replicationlinks/method_get.go @@ -45,7 +45,6 @@ func (c ReplicationLinksClient) Get(ctx context.Context, id ReplicationLinkId) ( var model ReplicationLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go b/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go index d88b66b9426..6b593b9df98 100644 --- a/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go +++ b/resource-manager/sql/2023-08-01-preview/replicationlinks/version.go @@ -1,12 +1,10 @@ package replicationlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/replicationlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/replicationlinks/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md index 2928bac0a38..f2e54f8394d 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases` Documentation -The `restorabledroppeddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `restorabledroppeddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go index f6cc9d16ce0..b005e027e5e 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedDatabasesClient struct { } func NewRestorableDroppedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppeddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go index c354a8d7d77..580ea286a65 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/id_restorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseRestorableDroppedDatabaseID(input string) (*RestorableDroppedDatabaseI } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorableDroppedDatabaseIDInsensitively(input string) (*RestorableDro } id := RestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go index 03d3fe22529..7327393e747 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RestorableDroppedDatabasesClient) Get(ctx context.Context, id Restorable var model RestorableDroppedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go index 64c066a6041..106fd4d8582 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppeddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppeddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppeddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppeddatabases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/README.md b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/README.md index 084890d91c8..49ba94cb8b0 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/README.md +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases` Documentation -The `restorabledroppedmanageddatabases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `restorabledroppedmanageddatabases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/client.go b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/client.go index f6ddeb790f3..3e9c9bd3617 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/client.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/client.go @@ -15,7 +15,7 @@ type RestorableDroppedManagedDatabasesClient struct { } func NewRestorableDroppedManagedDatabasesClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedManagedDatabasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppedmanageddatabases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedManagedDatabasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go index d540997446a..f274ef8ca18 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/id_managedinstancerestorabledroppeddatabase.go @@ -44,7 +44,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseID(input string) (*ManagedInst } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagedInstanceRestorableDroppedDatabaseIDInsensitively(input string) } id := ManagedInstanceRestorableDroppedDatabaseId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/method_get.go b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/method_get.go index ab1378426fd..7e520c5f8f6 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/method_get.go @@ -45,7 +45,6 @@ func (c RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, id Man var model RestorableDroppedManagedDatabase result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/version.go b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/version.go index b18ae44cbe0..3bd72753af9 100644 --- a/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/version.go +++ b/resource-manager/sql/2023-08-01-preview/restorabledroppedmanageddatabases/version.go @@ -1,12 +1,10 @@ package restorabledroppedmanageddatabases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppedmanageddatabases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/restorepoints/README.md b/resource-manager/sql/2023-08-01-preview/restorepoints/README.md index 6cd66b62bbd..58d19026503 100644 --- a/resource-manager/sql/2023-08-01-preview/restorepoints/README.md +++ b/resource-manager/sql/2023-08-01-preview/restorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/restorepoints` Documentation -The `restorepoints` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `restorepoints` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/restorepoints/client.go b/resource-manager/sql/2023-08-01-preview/restorepoints/client.go index d655ff0350d..febed9d42f1 100644 --- a/resource-manager/sql/2023-08-01-preview/restorepoints/client.go +++ b/resource-manager/sql/2023-08-01-preview/restorepoints/client.go @@ -15,7 +15,7 @@ type RestorePointsClient struct { } func NewRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorePointsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/restorepoints/id_restorepoint.go b/resource-manager/sql/2023-08-01-preview/restorepoints/id_restorepoint.go index 0f855efd93d..5f80e22dbd6 100644 --- a/resource-manager/sql/2023-08-01-preview/restorepoints/id_restorepoint.go +++ b/resource-manager/sql/2023-08-01-preview/restorepoints/id_restorepoint.go @@ -46,7 +46,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/restorepoints/method_get.go b/resource-manager/sql/2023-08-01-preview/restorepoints/method_get.go index 957e733ed23..b3641545843 100644 --- a/resource-manager/sql/2023-08-01-preview/restorepoints/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/restorepoints/method_get.go @@ -45,7 +45,6 @@ func (c RestorePointsClient) Get(ctx context.Context, id RestorePointId) (result var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/restorepoints/version.go b/resource-manager/sql/2023-08-01-preview/restorepoints/version.go index 4cb28aac841..def539fb720 100644 --- a/resource-manager/sql/2023-08-01-preview/restorepoints/version.go +++ b/resource-manager/sql/2023-08-01-preview/restorepoints/version.go @@ -1,12 +1,10 @@ package restorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorepoints/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/README.md b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/README.md index ee3a3384858..eabd1597e26 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/README.md +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sensitivitylabels` Documentation -The `sensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sensitivitylabels` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/client.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/client.go index b4f48c1b8f8..e5c16bac54c 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/client.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/client.go @@ -15,7 +15,7 @@ type SensitivityLabelsClient struct { } func NewSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*SensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_column.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_column.go index a7c5385a6d0..a91c35c47e9 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_column.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_sensitivitylabelsource.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_sensitivitylabelsource.go index b6c36f36f47..03310875a6a 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_sensitivitylabelsource.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/id_sensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSourceID(input string) (*SensitivityLabelSourceId, err } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSourceIDInsensitively(input string) (*SensitivityLabel } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_createorupdate.go index 8dbc9e733ca..5f894e78280 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, id ColumnId var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_get.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_get.go index d13e4b237b0..88bde8c3384 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_get.go @@ -45,7 +45,6 @@ func (c SensitivityLabelsClient) Get(ctx context.Context, id SensitivityLabelSou var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listbydatabase.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listbydatabase.go index 6f57eee31d4..661b362c83e 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listbydatabase.go @@ -40,6 +40,7 @@ func (o ListByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listcurrentbydatabase.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listcurrentbydatabase.go index 73a615c88fa..b689585e559 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listcurrentbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listcurrentbydatabase.go @@ -41,6 +41,7 @@ func (o ListCurrentByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListCurrentByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go index 2e9d85df880..ecaac2fad9f 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/method_listrecommendedbydatabase.go @@ -41,6 +41,7 @@ func (o ListRecommendedByDatabaseOperationOptions) ToHeaders() *client.Headers { func (o ListRecommendedByDatabaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/version.go b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/version.go index 00b659d9b3d..f101853f620 100644 --- a/resource-manager/sql/2023-08-01-preview/sensitivitylabels/version.go +++ b/resource-manager/sql/2023-08-01-preview/sensitivitylabels/version.go @@ -1,12 +1,10 @@ package sensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sensitivitylabels/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/README.md b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/README.md index 65bed0fe83a..923ff28d38c 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings` Documentation -The `serveradvancedthreatprotectionsettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serveradvancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/client.go b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/client.go index 0e98ea070f7..0d676922ffb 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/client.go @@ -15,7 +15,7 @@ type ServerAdvancedThreatProtectionSettingsClient struct { } func NewServerAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvancedthreatprotectionsettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvancedThreatProtectionSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/method_get.go b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/method_get.go index 54f89c7c6f8..acc2ff53f99 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/method_get.go @@ -47,7 +47,6 @@ func (c ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, i var model ServerAdvancedThreatProtection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/version.go b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/version.go index 5200b597314..a313834f4ab 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvancedthreatprotectionsettings/version.go @@ -1,12 +1,10 @@ package serveradvancedthreatprotectionsettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvancedthreatprotectionsettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/README.md b/resource-manager/sql/2023-08-01-preview/serveradvisors/README.md index 619f362e5f4..8229a779dab 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/README.md +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serveradvisors` Documentation -The `serveradvisors` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serveradvisors` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/client.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/client.go index 2eae0c06a2b..3933667d1fe 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/client.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/client.go @@ -15,7 +15,7 @@ type ServerAdvisorsClient struct { } func NewServerAdvisorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAdvisorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveradvisors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveradvisors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAdvisorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/id_advisor.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/id_advisor.go index 3b88efe407d..93527e7f54d 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/id_advisor.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/id_advisor.go @@ -44,7 +44,7 @@ func ParseAdvisorID(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAdvisorIDInsensitively(input string) (*AdvisorId, error) { } id := AdvisorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_get.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_get.go index 7e374d14539..027a2dd784b 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_get.go @@ -45,7 +45,6 @@ func (c ServerAdvisorsClient) Get(ctx context.Context, id AdvisorId) (result Get var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_listbyserver.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_listbyserver.go index 0ab13d2757c..88ed4156027 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_listbyserver.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_listbyserver.go @@ -35,6 +35,7 @@ func (o ListByServerOperationOptions) ToHeaders() *client.Headers { func (o ListByServerOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServerAdvisorsClient) ListByServer(ctx context.Context, id commonids.Sql var model []Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_update.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_update.go index 6150d7053af..26eae2eb675 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/method_update.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/method_update.go @@ -49,7 +49,6 @@ func (c ServerAdvisorsClient) Update(ctx context.Context, id AdvisorId, input Ad var model Advisor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serveradvisors/version.go b/resource-manager/sql/2023-08-01-preview/serveradvisors/version.go index 6b2d7adca53..f6aa5cb318e 100644 --- a/resource-manager/sql/2023-08-01-preview/serveradvisors/version.go +++ b/resource-manager/sql/2023-08-01-preview/serveradvisors/version.go @@ -1,12 +1,10 @@ package serveradvisors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveradvisors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveradvisors/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/README.md b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/README.md index c3ac297b9ed..7e0049d3406 100644 --- a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverautomatictuning` Documentation -The `serverautomatictuning` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverautomatictuning` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/client.go b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/client.go index ec9f1bed0c9..2730beb5fc5 100644 --- a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/client.go @@ -15,7 +15,7 @@ type ServerAutomaticTuningClient struct { } func NewServerAutomaticTuningClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAutomaticTuningClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverautomatictuning", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverautomatictuning", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAutomaticTuningClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_get.go b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_get.go index 35f930c01d5..f33223e7cb8 100644 --- a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_get.go @@ -47,7 +47,6 @@ func (c ServerAutomaticTuningClient) Get(ctx context.Context, id commonids.SqlSe var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_update.go b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_update.go index a12ff98cb3b..7be0bdc82e9 100644 --- a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_update.go +++ b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/method_update.go @@ -51,7 +51,6 @@ func (c ServerAutomaticTuningClient) Update(ctx context.Context, id commonids.Sq var model ServerAutomaticTuning result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/version.go b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/version.go index 7557e71d51c..1eab6278a28 100644 --- a/resource-manager/sql/2023-08-01-preview/serverautomatictuning/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverautomatictuning/version.go @@ -1,12 +1,10 @@ package serverautomatictuning -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverautomatictuning/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverautomatictuning/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md index b8b42cd81e8..a69c1d8a102 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadadministrators` Documentation -The `serverazureadadministrators` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverazureadadministrators` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go index f50b24e55ac..47d3cf27389 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/client.go @@ -15,7 +15,7 @@ type ServerAzureADAdministratorsClient struct { } func NewServerAzureADAdministratorsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADAdministratorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadadministrators", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadadministrators", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADAdministratorsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go index f0fcd511e04..98ead18b09a 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADAdministratorsClient) Get(ctx context.Context, id commonids var model ServerAzureADAdministrator result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go index fb1d3ff2173..696a267e9d4 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadadministrators/version.go @@ -1,12 +1,10 @@ package serverazureadadministrators -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadadministrators/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadadministrators/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md index aee7e7b0575..0b50e47c9bd 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications` Documentation -The `serverazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go index 21c08da1953..14d36937a75 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type ServerAzureADOnlyAuthenticationsClient struct { } func NewServerAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go index f254750271a..937c73a5697 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/method_get.go @@ -47,7 +47,6 @@ func (c ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, id comm var model ServerAzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go index a8c41d733c2..545fe91466e 100644 --- a/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package serverazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverazureadonlyauthentications/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/README.md b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/README.md index 3b52bb7d47b..9d985415e9b 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions` Documentation -The `serverconfigurationoptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverconfigurationoptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/client.go b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/client.go index aa3c24cb9a6..18fdd2d4b4c 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/client.go @@ -15,7 +15,7 @@ type ServerConfigurationOptionsClient struct { } func NewServerConfigurationOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConfigurationOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconfigurationoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConfigurationOptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/method_get.go b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/method_get.go index 062acb8b40d..6ed76291506 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/method_get.go @@ -47,7 +47,6 @@ func (c ServerConfigurationOptionsClient) Get(ctx context.Context, id commonids. var model ServerConfigurationOption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/version.go b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/version.go index 6364aca2c0b..27af502ecfb 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverconfigurationoptions/version.go @@ -1,12 +1,10 @@ package serverconfigurationoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconfigurationoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconfigurationoptions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md index 82d13df82b0..fda7f4cffc5 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies` Documentation -The `serverconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverconnectionpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go index 15991ddbd85..a4b5aa95d54 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/client.go @@ -15,7 +15,7 @@ type ServerConnectionPoliciesClient struct { } func NewServerConnectionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerConnectionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverconnectionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerConnectionPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go index afcb959ee65..48f33b38281 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerConnectionPoliciesClient) Get(ctx context.Context, id commonids.Sq var model ServerConnectionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go index 74fe1fd9014..ce9697bf704 100644 --- a/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverconnectionpolicies/version.go @@ -1,12 +1,10 @@ package serverconnectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverconnectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverconnectionpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md index 741937c83ad..e8d164fb2f4 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdevopsaudit` Documentation -The `serverdevopsaudit` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverdevopsaudit` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go index 535c6daec99..5e560080c0c 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/client.go @@ -15,7 +15,7 @@ type ServerDevOpsAuditClient struct { } func NewServerDevOpsAuditClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDevOpsAuditClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdevopsaudit", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdevopsaudit", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDevOpsAuditClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go index 47e850924e2..6f6c514f848 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go +++ b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/method_settingsget.go @@ -47,7 +47,6 @@ func (c ServerDevOpsAuditClient) SettingsGet(ctx context.Context, id commonids.S var model ServerDevOpsAuditingSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go index bd0493f4a08..d27b397981b 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverdevopsaudit/version.go @@ -1,12 +1,10 @@ package serverdevopsaudit -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdevopsaudit/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdevopsaudit/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md index c16ab0ca894..c7723730c2a 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverdnsaliases` Documentation -The `serverdnsaliases` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverdnsaliases` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go index f8e554ac6f0..7f03630ea40 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/client.go @@ -15,7 +15,7 @@ type ServerDnsAliasesClient struct { } func NewServerDnsAliasesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerDnsAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverdnsaliases", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverdnsaliases", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerDnsAliasesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go index 89703b594cd..e0fad2f17cc 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go +++ b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/id_dnsalias.go @@ -44,7 +44,7 @@ func ParseDnsAliasID(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsAliasIDInsensitively(input string) (*DnsAliasId, error) { } id := DnsAliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go index 103cdf86db1..7c3666bd13e 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/method_get.go @@ -45,7 +45,6 @@ func (c ServerDnsAliasesClient) Get(ctx context.Context, id DnsAliasId) (result var model ServerDnsAlias result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go index 2bfa15bbd05..efa619eaa5f 100644 --- a/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverdnsaliases/version.go @@ -1,12 +1,10 @@ package serverdnsaliases -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverdnsaliases/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverdnsaliases/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverkeys/README.md b/resource-manager/sql/2023-08-01-preview/serverkeys/README.md index 6bafb740132..76fd204ae40 100644 --- a/resource-manager/sql/2023-08-01-preview/serverkeys/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverkeys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverkeys` Documentation -The `serverkeys` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverkeys` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverkeys/client.go b/resource-manager/sql/2023-08-01-preview/serverkeys/client.go index 83970b7eb35..0616b182cbb 100644 --- a/resource-manager/sql/2023-08-01-preview/serverkeys/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverkeys/client.go @@ -15,7 +15,7 @@ type ServerKeysClient struct { } func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverkeys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverkeys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerKeysClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go b/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go index a6d8137a5d3..ee1d13f85a3 100644 --- a/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go +++ b/resource-manager/sql/2023-08-01-preview/serverkeys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go b/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go index cdd81e30407..e6b4acc396a 100644 --- a/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serverkeys/method_get.go @@ -45,7 +45,6 @@ func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperatio var model ServerKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serverkeys/version.go b/resource-manager/sql/2023-08-01-preview/serverkeys/version.go index 5f90937a4f8..bb5611da730 100644 --- a/resource-manager/sql/2023-08-01-preview/serverkeys/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverkeys/version.go @@ -1,12 +1,10 @@ package serverkeys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverkeys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverkeys/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serveroperations/README.md b/resource-manager/sql/2023-08-01-preview/serveroperations/README.md index ac78073a657..0772c5a1b27 100644 --- a/resource-manager/sql/2023-08-01-preview/serveroperations/README.md +++ b/resource-manager/sql/2023-08-01-preview/serveroperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serveroperations` Documentation -The `serveroperations` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serveroperations` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serveroperations/client.go b/resource-manager/sql/2023-08-01-preview/serveroperations/client.go index 315bd12ffac..52624fb5f18 100644 --- a/resource-manager/sql/2023-08-01-preview/serveroperations/client.go +++ b/resource-manager/sql/2023-08-01-preview/serveroperations/client.go @@ -15,7 +15,7 @@ type ServerOperationsClient struct { } func NewServerOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serveroperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serveroperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerOperationsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serveroperations/version.go b/resource-manager/sql/2023-08-01-preview/serveroperations/version.go index 2a84bca09b3..43492c60457 100644 --- a/resource-manager/sql/2023-08-01-preview/serveroperations/version.go +++ b/resource-manager/sql/2023-08-01-preview/serveroperations/version.go @@ -1,12 +1,10 @@ package serveroperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serveroperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serveroperations/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/servers/README.md b/resource-manager/sql/2023-08-01-preview/servers/README.md index 97dcfdfb44f..54e584dc28e 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/README.md +++ b/resource-manager/sql/2023-08-01-preview/servers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servers` Documentation -The `servers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `servers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/servers/client.go b/resource-manager/sql/2023-08-01-preview/servers/client.go index 64c1b8daeb3..806c9525000 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/client.go +++ b/resource-manager/sql/2023-08-01-preview/servers/client.go @@ -15,7 +15,7 @@ type ServersClient struct { } func NewServersClientWithBaseURI(sdkApi sdkEnv.Api) (*ServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServersClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go b/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go index 33491559bac..d4dc423607a 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go +++ b/resource-manager/sql/2023-08-01-preview/servers/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ServersClient) CheckNameAvailability(ctx context.Context, id commonids.S var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servers/method_get.go b/resource-manager/sql/2023-08-01-preview/servers/method_get.go index 9fa3523f482..186e44d6c15 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/servers/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c ServersClient) Get(ctx context.Context, id commonids.SqlServerId, option var model Server result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servers/method_list.go b/resource-manager/sql/2023-08-01-preview/servers/method_list.go index 0ce97ea8572..7c8dc454f0d 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/method_list.go +++ b/resource-manager/sql/2023-08-01-preview/servers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go b/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go index eb7122c8a0a..9ded1776fd1 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go +++ b/resource-manager/sql/2023-08-01-preview/servers/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/servers/version.go b/resource-manager/sql/2023-08-01-preview/servers/version.go index 45695708a26..2a627d7ede7 100644 --- a/resource-manager/sql/2023-08-01-preview/servers/version.go +++ b/resource-manager/sql/2023-08-01-preview/servers/version.go @@ -1,12 +1,10 @@ package servers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servers/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md index bc488ab47a2..12c6748ea9b 100644 --- a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md +++ b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies` Documentation -The `serversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go index d3b8f5dac1b..cb80188b500 100644 --- a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go +++ b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type ServerSecurityAlertPoliciesClient struct { } func NewServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go index 52a7b24a5a4..b7f63c8bb22 100644 --- a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ServerSecurityAlertPoliciesClient) Get(ctx context.Context, id commonids var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go index d84cac2cff1..35f67de8e6a 100644 --- a/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go +++ b/resource-manager/sql/2023-08-01-preview/serversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package serversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serversecurityalertpolicies/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/README.md b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/README.md index 393bd2f401c..69928bbcdd6 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/README.md +++ b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servertrustcertificates` Documentation -The `servertrustcertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `servertrustcertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/client.go b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/client.go index a6f3aa41b81..1754d2f466c 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/client.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/client.go @@ -15,7 +15,7 @@ type ServerTrustCertificatesClient struct { } func NewServerTrustCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustcertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustcertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/id_servertrustcertificate.go b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/id_servertrustcertificate.go index 79b3d450d55..89e8c0be6a6 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/id_servertrustcertificate.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/id_servertrustcertificate.go @@ -44,7 +44,7 @@ func ParseServerTrustCertificateID(input string) (*ServerTrustCertificateId, err } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustCertificateIDInsensitively(input string) (*ServerTrustCerti } id := ServerTrustCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/method_get.go b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/method_get.go index d1820468f58..26bfaa5dde5 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustCertificatesClient) Get(ctx context.Context, id ServerTrustCe var model ServerTrustCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/version.go b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/version.go index ad2e121d423..356224e0f45 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustcertificates/version.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustcertificates/version.go @@ -1,12 +1,10 @@ package servertrustcertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustcertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustcertificates/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/README.md b/resource-manager/sql/2023-08-01-preview/servertrustgroups/README.md index b4d25a456e0..b5be872ff55 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servertrustgroups` Documentation -The `servertrustgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `servertrustgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/client.go b/resource-manager/sql/2023-08-01-preview/servertrustgroups/client.go index ff26515db72..175c668a349 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/client.go @@ -15,7 +15,7 @@ type ServerTrustGroupsClient struct { } func NewServerTrustGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servertrustgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servertrustgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerTrustGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_providerlocation.go b/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_providerlocation.go index 77965206097..920204a1e73 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_providerlocation.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_providerlocation.go @@ -42,7 +42,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_servertrustgroup.go b/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_servertrustgroup.go index 6d354529645..8faafc4eb0e 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_servertrustgroup.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/id_servertrustgroup.go @@ -44,7 +44,7 @@ func ParseServerTrustGroupID(input string) (*ServerTrustGroupId, error) { } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerTrustGroupIDInsensitively(input string) (*ServerTrustGroupId, er } id := ServerTrustGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/method_get.go b/resource-manager/sql/2023-08-01-preview/servertrustgroups/method_get.go index b93f6843bd2..b9d7d3201ae 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/method_get.go @@ -45,7 +45,6 @@ func (c ServerTrustGroupsClient) Get(ctx context.Context, id ServerTrustGroupId) var model ServerTrustGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servertrustgroups/version.go b/resource-manager/sql/2023-08-01-preview/servertrustgroups/version.go index ecc70ca15c4..e8260293023 100644 --- a/resource-manager/sql/2023-08-01-preview/servertrustgroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/servertrustgroups/version.go @@ -1,12 +1,10 @@ package servertrustgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servertrustgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servertrustgroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/serverusages/README.md b/resource-manager/sql/2023-08-01-preview/serverusages/README.md index e5042c55265..8bea72ab447 100644 --- a/resource-manager/sql/2023-08-01-preview/serverusages/README.md +++ b/resource-manager/sql/2023-08-01-preview/serverusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/serverusages` Documentation -The `serverusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `serverusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/serverusages/client.go b/resource-manager/sql/2023-08-01-preview/serverusages/client.go index a506285038a..16666bee036 100644 --- a/resource-manager/sql/2023-08-01-preview/serverusages/client.go +++ b/resource-manager/sql/2023-08-01-preview/serverusages/client.go @@ -15,7 +15,7 @@ type ServerUsagesClient struct { } func NewServerUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/serverusages/version.go b/resource-manager/sql/2023-08-01-preview/serverusages/version.go index 3280147bdd1..ab3348b0833 100644 --- a/resource-manager/sql/2023-08-01-preview/serverusages/version.go +++ b/resource-manager/sql/2023-08-01-preview/serverusages/version.go @@ -1,12 +1,10 @@ package serverusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverusages/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md index 9495a712316..8361371bef8 100644 --- a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md +++ b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments` Documentation -The `servervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `servervulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go index 5ab28ece52e..e7d2ead0545 100644 --- a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go +++ b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type ServerVulnerabilityAssessmentsClient struct { } func NewServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "servervulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go index 6833023e5f8..9b468796ec2 100644 --- a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_createorupdate.go @@ -52,7 +52,6 @@ func (c ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go index 84e9a7c3243..09f63e48019 100644 --- a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/method_get.go @@ -47,7 +47,6 @@ func (c ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, id common var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go index 1eb69497946..426bcfcbc87 100644 --- a/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go +++ b/resource-manager/sql/2023-08-01-preview/servervulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package servervulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servervulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/servervulnerabilityassessments/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlagent/README.md b/resource-manager/sql/2023-08-01-preview/sqlagent/README.md index dabc0af96dc..48b396b374e 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlagent/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlagent/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlagent` Documentation -The `sqlagent` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlagent` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlagent/client.go b/resource-manager/sql/2023-08-01-preview/sqlagent/client.go index e6b69cf376c..27e9195f8bc 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlagent/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlagent/client.go @@ -15,7 +15,7 @@ type SqlAgentClient struct { } func NewSqlAgentClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlAgentClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlagent", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlagent", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlAgentClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlagent/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/sqlagent/method_createorupdate.go index d5f7f099d8d..cd83669aefa 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlagent/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/sqlagent/method_createorupdate.go @@ -51,7 +51,6 @@ func (c SqlAgentClient) CreateOrUpdate(ctx context.Context, id commonids.SqlMana var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlagent/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlagent/method_get.go index 8bbf9211506..eb20d2e2e4b 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlagent/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlagent/method_get.go @@ -47,7 +47,6 @@ func (c SqlAgentClient) Get(ctx context.Context, id commonids.SqlManagedInstance var model SqlAgentConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlagent/version.go b/resource-manager/sql/2023-08-01-preview/sqlagent/version.go index f875dfffc6d..33747783461 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlagent/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlagent/version.go @@ -1,12 +1,10 @@ package sqlagent -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlagent/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlagent/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/README.md b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/README.md index 733d4728952..fd04d8ccef0 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline` Documentation -The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlvulnerabilityassessmentbaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/client.go index 505a54fc965..1e818dc798f 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentBaselineClient struct { } func NewSqlVulnerabilityAssessmentBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentbaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go index f287d50ecef..5134e7ba381 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_createorupdate.go @@ -35,6 +35,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) CreateOrUpdate(ctx context.Con var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go index 1742364c396..d3dc6e72e80 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_get.go @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c SqlVulnerabilityAssessmentBaselineClient) Get(ctx context.Context, id co var model DatabaseSqlVulnerabilityAssessmentBaselineSet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go index caec9ab9821..c66768fe7e8 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/method_listbysqlvulnerabilityassessment.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToHeaders() *client.He func (o ListBySqlVulnerabilityAssessmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/version.go index 64778beca92..1039d884350 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentbaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentbaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentbaseline/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/client.go index acbe2d3fb42..7630b387bae 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentExecuteScanClient struct { } func NewSqlVulnerabilityAssessmentExecuteScanClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentExecuteScanClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentexecutescan", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentExecuteScanClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go index 201fdbca8ea..3c6a1925406 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/method_execute.go @@ -37,6 +37,7 @@ func (o ExecuteOperationOptions) ToHeaders() *client.Headers { func (o ExecuteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/version.go index c0fd01d190a..5829ecc413b 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentexecutescan/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentexecutescan -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentexecutescan/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md index 3324e422ef1..788a3d09ee2 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline` Documentation -The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlvulnerabilityassessmentrulebaseline` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go index a5233c9899c..fc8f0110ab3 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentRuleBaselineClient struct { } func NewSqlVulnerabilityAssessmentRuleBaselineClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentRuleBaselineClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentrulebaseline", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentRuleBaselineClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go index 914c9cfe438..38d7b22e0f4 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/id_rule.go @@ -44,7 +44,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go index fb8a7288f91..183bef4b1c9 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_createorupdate.go @@ -34,6 +34,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate(ctx context var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go index df062390726..59cc6704c63 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go index b587ac02d42..cf61914333c 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentRuleBaselineClient) Get(ctx context.Context, i var model DatabaseSqlVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go index 2ba72cbdd7d..3a74f8a6c2e 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/method_listbybaseline.go @@ -40,6 +40,7 @@ func (o ListByBaselineOperationOptions) ToHeaders() *client.Headers { func (o ListByBaselineOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go index 4474dd2fc14..966e61ce000 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentrulebaseline/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentrulebaseline -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentrulebaseline/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/README.md b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/README.md index d11832b6e45..8f89cfb74e9 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult` Documentation -The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlvulnerabilityassessmentscanresult` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/client.go index 7a139273cb5..f0907cdc0c0 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScanResultClient struct { } func NewSqlVulnerabilityAssessmentScanResultClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScanResultClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscanresult", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScanResultClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go index ef5ca4b33db..c1f6768aee9 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go index ec281bd8b3c..42414e4b89a 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/id_scanresult.go @@ -46,7 +46,7 @@ func ParseScanResultID(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanResultIDInsensitively(input string) (*ScanResultId, error) { } id := ScanResultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go index ef0c57e5f1f..082625df697 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScanResultClient) Get(ctx context.Context, id var model SqlVulnerabilityAssessmentScanResults result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go index 24c4bf34932..c893fd92bda 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/method_listbyscan.go @@ -39,6 +39,7 @@ func (o ListByScanOperationOptions) ToHeaders() *client.Headers { func (o ListByScanOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/version.go index 2304897d09d..520391ef8b8 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscanresult/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscanresult -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscanresult/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/README.md b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/README.md index 5d6eec03ea8..cd5917a6852 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans` Documentation -The `sqlvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/client.go index 222991f7da9..6022bf8ed93 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentScansClient struct { } func NewSqlVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/id_scan.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/id_scan.go index 7f816ab7219..cb958675069 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/id_scan.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/id_scan.go @@ -44,7 +44,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_get.go index 8c977afd356..111ac936214 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVulnerabilityAssessmentScansClient) Get(ctx context.Context, id ScanI var model SqlVulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go index bc384217394..1aee57eba1e 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/method_listbysqlvulnerabilityassessments.go @@ -40,6 +40,7 @@ func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToHeaders() *client.H func (o ListBySqlVulnerabilityAssessmentsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/version.go index 8535ce4bcc4..c0e0dadb167 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentscans/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/README.md b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/README.md index 877b9f2a934..ea204ea9276 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/README.md +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings` Documentation -The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `sqlvulnerabilityassessmentssettings` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/client.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/client.go index 94dbf773e0e..bcda5c6d744 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/client.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/client.go @@ -15,7 +15,7 @@ type SqlVulnerabilityAssessmentsSettingsClient struct { } func NewSqlVulnerabilityAssessmentsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVulnerabilityAssessmentsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvulnerabilityassessmentssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVulnerabilityAssessmentsSettingsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go index 6b98f0be879..f8794b7a57a 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_createorupdate.go @@ -52,7 +52,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context.Co var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_get.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_get.go index 9f511302d11..53e3c99ed3a 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/method_get.go @@ -47,7 +47,6 @@ func (c SqlVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, id c var model SqlVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/version.go b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/version.go index 8e6eb94d989..20810de8aba 100644 --- a/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/version.go +++ b/resource-manager/sql/2023-08-01-preview/sqlvulnerabilityassessmentssettings/version.go @@ -1,12 +1,10 @@ package sqlvulnerabilityassessmentssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvulnerabilityassessmentssettings/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/README.md b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/README.md index 64bbdd65985..2877fe5fc19 100644 --- a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/README.md +++ b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules` Documentation -The `startstopmanagedinstanceschedules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `startstopmanagedinstanceschedules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/client.go b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/client.go index 9cdebf7233c..aa4c62fed82 100644 --- a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/client.go +++ b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/client.go @@ -15,7 +15,7 @@ type StartStopManagedInstanceSchedulesClient struct { } func NewStartStopManagedInstanceSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*StartStopManagedInstanceSchedulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "startstopmanagedinstanceschedules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StartStopManagedInstanceSchedulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go index bf962be1799..641d1d37389 100644 --- a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go +++ b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_createorupdate.go @@ -52,7 +52,6 @@ func (c StartStopManagedInstanceSchedulesClient) CreateOrUpdate(ctx context.Cont var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_get.go b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_get.go index d65fa6f15d6..bc3bc1326f9 100644 --- a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/method_get.go @@ -47,7 +47,6 @@ func (c StartStopManagedInstanceSchedulesClient) Get(ctx context.Context, id com var model StartStopManagedInstanceSchedule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/version.go b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/version.go index 8a56f9fed93..971ededeb71 100644 --- a/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/version.go +++ b/resource-manager/sql/2023-08-01-preview/startstopmanagedinstanceschedules/version.go @@ -1,12 +1,10 @@ package startstopmanagedinstanceschedules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/startstopmanagedinstanceschedules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/README.md b/resource-manager/sql/2023-08-01-preview/subscriptionusages/README.md index 8530065954c..723dc2570bd 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/README.md +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/subscriptionusages` Documentation -The `subscriptionusages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `subscriptionusages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/client.go b/resource-manager/sql/2023-08-01-preview/subscriptionusages/client.go index 6bd351c6169..5829a9a22b0 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/client.go +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/client.go @@ -15,7 +15,7 @@ type SubscriptionUsagesClient struct { } func NewSubscriptionUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptionusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptionusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionUsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_location.go b/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_location.go index f064d059ffb..881d5b22478 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_usage.go b/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_usage.go index a4897a668a9..7f61d25a349 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_usage.go +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/id_usage.go @@ -42,7 +42,7 @@ func ParseUsageID(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseUsageIDInsensitively(input string) (*UsageId, error) { } id := UsageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/method_get.go b/resource-manager/sql/2023-08-01-preview/subscriptionusages/method_get.go index 5b938744f0c..41027938a77 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/method_get.go @@ -45,7 +45,6 @@ func (c SubscriptionUsagesClient) Get(ctx context.Context, id UsageId) (result G var model SubscriptionUsage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/subscriptionusages/version.go b/resource-manager/sql/2023-08-01-preview/subscriptionusages/version.go index dcf88478719..c9ca0dcfab7 100644 --- a/resource-manager/sql/2023-08-01-preview/subscriptionusages/version.go +++ b/resource-manager/sql/2023-08-01-preview/subscriptionusages/version.go @@ -1,12 +1,10 @@ package subscriptionusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptionusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptionusages/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/README.md b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/README.md index 6f88cb3c4cf..e0c861ac783 100644 --- a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/README.md +++ b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces` Documentation -The `synapselinkworkspaces` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `synapselinkworkspaces` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/client.go b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/client.go index 969d0394690..cedd10aa1e4 100644 --- a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/client.go +++ b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/client.go @@ -15,7 +15,7 @@ type SynapseLinkWorkspacesClient struct { } func NewSynapseLinkWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*SynapseLinkWorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "synapselinkworkspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SynapseLinkWorkspacesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/version.go b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/version.go index d4072354756..3a425a1b534 100644 --- a/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/version.go +++ b/resource-manager/sql/2023-08-01-preview/synapselinkworkspaces/version.go @@ -1,12 +1,10 @@ package synapselinkworkspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/synapselinkworkspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/synapselinkworkspaces/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/README.md b/resource-manager/sql/2023-08-01-preview/syncagents/README.md index c322edd9ff8..a0bd56b1cba 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/README.md +++ b/resource-manager/sql/2023-08-01-preview/syncagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/syncagents` Documentation -The `syncagents` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `syncagents` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/client.go b/resource-manager/sql/2023-08-01-preview/syncagents/client.go index ddc6758b233..8f3af4b9f9c 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/client.go +++ b/resource-manager/sql/2023-08-01-preview/syncagents/client.go @@ -15,7 +15,7 @@ type SyncAgentsClient struct { } func NewSyncAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncAgentsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/id_syncagent.go b/resource-manager/sql/2023-08-01-preview/syncagents/id_syncagent.go index 8d76e6c99f2..fa0a3705563 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/id_syncagent.go +++ b/resource-manager/sql/2023-08-01-preview/syncagents/id_syncagent.go @@ -44,7 +44,7 @@ func ParseSyncAgentID(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncAgentIDInsensitively(input string) (*SyncAgentId, error) { } id := SyncAgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/method_generatekey.go b/resource-manager/sql/2023-08-01-preview/syncagents/method_generatekey.go index 42a446203af..3d8fd5b7f4c 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/method_generatekey.go +++ b/resource-manager/sql/2023-08-01-preview/syncagents/method_generatekey.go @@ -46,7 +46,6 @@ func (c SyncAgentsClient) GenerateKey(ctx context.Context, id SyncAgentId) (resu var model SyncAgentKeyProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/method_get.go b/resource-manager/sql/2023-08-01-preview/syncagents/method_get.go index b2278d3ec85..82b14cbc685 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/syncagents/method_get.go @@ -45,7 +45,6 @@ func (c SyncAgentsClient) Get(ctx context.Context, id SyncAgentId) (result GetOp var model SyncAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/syncagents/version.go b/resource-manager/sql/2023-08-01-preview/syncagents/version.go index 2426543c74f..84443b56bee 100644 --- a/resource-manager/sql/2023-08-01-preview/syncagents/version.go +++ b/resource-manager/sql/2023-08-01-preview/syncagents/version.go @@ -1,12 +1,10 @@ package syncagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncagents/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/README.md b/resource-manager/sql/2023-08-01-preview/syncgroups/README.md index 06f9417fc98..3f24ee4d3b7 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/syncgroups` Documentation -The `syncgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `syncgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/client.go b/resource-manager/sql/2023-08-01-preview/syncgroups/client.go index 4319d456755..5cd4df963fb 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/client.go @@ -15,7 +15,7 @@ type SyncGroupsClient struct { } func NewSyncGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/id_location.go b/resource-manager/sql/2023-08-01-preview/syncgroups/id_location.go index 263b38238dc..1877c3ba830 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/id_syncgroup.go b/resource-manager/sql/2023-08-01-preview/syncgroups/id_syncgroup.go index 58a45ff7503..7f26217fc95 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/id_syncgroup.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/method_get.go b/resource-manager/sql/2023-08-01-preview/syncgroups/method_get.go index 1d0bfbaff2b..192ba337ba7 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/method_get.go @@ -45,7 +45,6 @@ func (c SyncGroupsClient) Get(ctx context.Context, id SyncGroupId) (result GetOp var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/method_listlogs.go b/resource-manager/sql/2023-08-01-preview/syncgroups/method_listlogs.go index 5f0554775a2..0b12f7bb05e 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/method_listlogs.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/method_listlogs.go @@ -42,6 +42,7 @@ func (o ListLogsOperationOptions) ToHeaders() *client.Headers { func (o ListLogsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/syncgroups/version.go b/resource-manager/sql/2023-08-01-preview/syncgroups/version.go index dce8612fa07..01f38ffe181 100644 --- a/resource-manager/sql/2023-08-01-preview/syncgroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/syncgroups/version.go @@ -1,12 +1,10 @@ package syncgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncgroups/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/README.md b/resource-manager/sql/2023-08-01-preview/syncmembers/README.md index c820bbed4d5..57d9554005b 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/README.md +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/syncmembers` Documentation -The `syncmembers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `syncmembers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/client.go b/resource-manager/sql/2023-08-01-preview/syncmembers/client.go index a8d9678c21e..002a3b5df66 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/client.go +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/client.go @@ -15,7 +15,7 @@ type SyncMembersClient struct { } func NewSyncMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncmembers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncmembers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncMembersClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncgroup.go b/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncgroup.go index 69fdd86cfbf..06a5789f4f7 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncgroup.go +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncgroup.go @@ -46,7 +46,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncmember.go b/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncmember.go index d62d31988a3..8a431b5c6cb 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncmember.go +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/id_syncmember.go @@ -48,7 +48,7 @@ func ParseSyncMemberID(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSyncMemberIDInsensitively(input string) (*SyncMemberId, error) { } id := SyncMemberId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/method_get.go b/resource-manager/sql/2023-08-01-preview/syncmembers/method_get.go index c2cfc32c6db..34f5fca6a2c 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/method_get.go @@ -45,7 +45,6 @@ func (c SyncMembersClient) Get(ctx context.Context, id SyncMemberId) (result Get var model SyncMember result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/syncmembers/version.go b/resource-manager/sql/2023-08-01-preview/syncmembers/version.go index eb752b94d23..77f541aab8e 100644 --- a/resource-manager/sql/2023-08-01-preview/syncmembers/version.go +++ b/resource-manager/sql/2023-08-01-preview/syncmembers/version.go @@ -1,12 +1,10 @@ package syncmembers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncmembers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncmembers/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/tdecertificates/README.md b/resource-manager/sql/2023-08-01-preview/tdecertificates/README.md index 3cf7d5085a1..a35853a7214 100644 --- a/resource-manager/sql/2023-08-01-preview/tdecertificates/README.md +++ b/resource-manager/sql/2023-08-01-preview/tdecertificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/tdecertificates` Documentation -The `tdecertificates` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `tdecertificates` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/tdecertificates/client.go b/resource-manager/sql/2023-08-01-preview/tdecertificates/client.go index 960ac6f7b2e..7409af2c03e 100644 --- a/resource-manager/sql/2023-08-01-preview/tdecertificates/client.go +++ b/resource-manager/sql/2023-08-01-preview/tdecertificates/client.go @@ -15,7 +15,7 @@ type TdeCertificatesClient struct { } func NewTdeCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*TdeCertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tdecertificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tdecertificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TdeCertificatesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/tdecertificates/version.go b/resource-manager/sql/2023-08-01-preview/tdecertificates/version.go index 7f009721a2e..b3660516c41 100644 --- a/resource-manager/sql/2023-08-01-preview/tdecertificates/version.go +++ b/resource-manager/sql/2023-08-01-preview/tdecertificates/version.go @@ -1,12 +1,10 @@ package tdecertificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tdecertificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tdecertificates/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/timezones/README.md b/resource-manager/sql/2023-08-01-preview/timezones/README.md index e3515dcbb23..3a7867df1be 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/README.md +++ b/resource-manager/sql/2023-08-01-preview/timezones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/timezones` Documentation -The `timezones` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `timezones` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/timezones/client.go b/resource-manager/sql/2023-08-01-preview/timezones/client.go index b70fa82f34a..278433b66e0 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/client.go +++ b/resource-manager/sql/2023-08-01-preview/timezones/client.go @@ -15,7 +15,7 @@ type TimeZonesClient struct { } func NewTimeZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*TimeZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "timezones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "timezones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TimeZonesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/timezones/id_location.go b/resource-manager/sql/2023-08-01-preview/timezones/id_location.go index 6303eaf6b92..ed12387a1b8 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/id_location.go +++ b/resource-manager/sql/2023-08-01-preview/timezones/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/timezones/id_timezone.go b/resource-manager/sql/2023-08-01-preview/timezones/id_timezone.go index 95f83aefb79..e0f97b4d2cb 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/id_timezone.go +++ b/resource-manager/sql/2023-08-01-preview/timezones/id_timezone.go @@ -42,7 +42,7 @@ func ParseTimeZoneID(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTimeZoneIDInsensitively(input string) (*TimeZoneId, error) { } id := TimeZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/timezones/method_get.go b/resource-manager/sql/2023-08-01-preview/timezones/method_get.go index e9be6c666b6..bf02c6ffb19 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/timezones/method_get.go @@ -45,7 +45,6 @@ func (c TimeZonesClient) Get(ctx context.Context, id TimeZoneId) (result GetOper var model TimeZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/timezones/version.go b/resource-manager/sql/2023-08-01-preview/timezones/version.go index a478fffb889..dc476721b36 100644 --- a/resource-manager/sql/2023-08-01-preview/timezones/version.go +++ b/resource-manager/sql/2023-08-01-preview/timezones/version.go @@ -1,12 +1,10 @@ package timezones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/timezones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/timezones/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md index 12678b2e7d5..032e7cc6351 100644 --- a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md +++ b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/transparentdataencryptions` Documentation -The `transparentdataencryptions` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `transparentdataencryptions` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go index 405c2a9c03a..023e8247a47 100644 --- a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go +++ b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/client.go @@ -15,7 +15,7 @@ type TransparentDataEncryptionsClient struct { } func NewTransparentDataEncryptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransparentDataEncryptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transparentdataencryptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transparentdataencryptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransparentDataEncryptionsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go index 30de417b32a..607b29fc4f0 100644 --- a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/method_get.go @@ -47,7 +47,6 @@ func (c TransparentDataEncryptionsClient) Get(ctx context.Context, id commonids. var model LogicalDatabaseTransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go index d8e1d4b5a10..b7a3a5c6850 100644 --- a/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go +++ b/resource-manager/sql/2023-08-01-preview/transparentdataencryptions/version.go @@ -1,12 +1,10 @@ package transparentdataencryptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transparentdataencryptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transparentdataencryptions/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/usages/README.md b/resource-manager/sql/2023-08-01-preview/usages/README.md index c81248823f2..5f5e26f43d0 100644 --- a/resource-manager/sql/2023-08-01-preview/usages/README.md +++ b/resource-manager/sql/2023-08-01-preview/usages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/usages` Documentation -The `usages` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `usages` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/usages/client.go b/resource-manager/sql/2023-08-01-preview/usages/client.go index 772d6a5be35..5b6ce18413b 100644 --- a/resource-manager/sql/2023-08-01-preview/usages/client.go +++ b/resource-manager/sql/2023-08-01-preview/usages/client.go @@ -15,7 +15,7 @@ type UsagesClient struct { } func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/usages/id_instancepool.go b/resource-manager/sql/2023-08-01-preview/usages/id_instancepool.go index 5414d2b8bec..6c1828d36b4 100644 --- a/resource-manager/sql/2023-08-01-preview/usages/id_instancepool.go +++ b/resource-manager/sql/2023-08-01-preview/usages/id_instancepool.go @@ -42,7 +42,7 @@ func ParseInstancePoolID(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error) { } id := InstancePoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/usages/method_listbyinstancepool.go b/resource-manager/sql/2023-08-01-preview/usages/method_listbyinstancepool.go index 1c0d9617748..dfe481817a1 100644 --- a/resource-manager/sql/2023-08-01-preview/usages/method_listbyinstancepool.go +++ b/resource-manager/sql/2023-08-01-preview/usages/method_listbyinstancepool.go @@ -39,6 +39,7 @@ func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers { func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/sql/2023-08-01-preview/usages/version.go b/resource-manager/sql/2023-08-01-preview/usages/version.go index b5009201b71..b2b623abaa7 100644 --- a/resource-manager/sql/2023-08-01-preview/usages/version.go +++ b/resource-manager/sql/2023-08-01-preview/usages/version.go @@ -1,12 +1,10 @@ package usages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usages/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/virtualclusters/README.md b/resource-manager/sql/2023-08-01-preview/virtualclusters/README.md index 5c4745f80c0..ac6b8e1fee3 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualclusters/README.md +++ b/resource-manager/sql/2023-08-01-preview/virtualclusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualclusters` Documentation -The `virtualclusters` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `virtualclusters` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/virtualclusters/client.go b/resource-manager/sql/2023-08-01-preview/virtualclusters/client.go index 2b0084ba56a..fcc501326a1 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualclusters/client.go +++ b/resource-manager/sql/2023-08-01-preview/virtualclusters/client.go @@ -15,7 +15,7 @@ type VirtualClustersClient struct { } func NewVirtualClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualclusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualclusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualClustersClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/virtualclusters/id_virtualcluster.go b/resource-manager/sql/2023-08-01-preview/virtualclusters/id_virtualcluster.go index 3e868342489..f1a818ac99d 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualclusters/id_virtualcluster.go +++ b/resource-manager/sql/2023-08-01-preview/virtualclusters/id_virtualcluster.go @@ -42,7 +42,7 @@ func ParseVirtualClusterID(input string) (*VirtualClusterId, error) { } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualClusterIDInsensitively(input string) (*VirtualClusterId, error) } id := VirtualClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/virtualclusters/method_get.go b/resource-manager/sql/2023-08-01-preview/virtualclusters/method_get.go index 963d777394f..3705c4dd85f 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualclusters/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/virtualclusters/method_get.go @@ -45,7 +45,6 @@ func (c VirtualClustersClient) Get(ctx context.Context, id VirtualClusterId) (re var model VirtualCluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/virtualclusters/version.go b/resource-manager/sql/2023-08-01-preview/virtualclusters/version.go index 05d42394e5f..42af3bf3d77 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualclusters/version.go +++ b/resource-manager/sql/2023-08-01-preview/virtualclusters/version.go @@ -1,12 +1,10 @@ package virtualclusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualclusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualclusters/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md index 460f9322cf3..16224a3ce2c 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md +++ b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/virtualnetworkrules` Documentation -The `virtualnetworkrules` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `virtualnetworkrules` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go index 1395850f955..05336264e4f 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go +++ b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/client.go @@ -15,7 +15,7 @@ type VirtualNetworkRulesClient struct { } func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworkrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworkrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworkRulesClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go index cda6be2068f..23478a0b90d 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go +++ b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/id_virtualnetworkrule.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error) { } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId } id := VirtualNetworkRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go index 5a63376cc38..ffe91c54117 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworkRulesClient) Get(ctx context.Context, id VirtualNetworkRul var model VirtualNetworkRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go index 53db2f31acf..ba428e6123a 100644 --- a/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go +++ b/resource-manager/sql/2023-08-01-preview/virtualnetworkrules/version.go @@ -1,12 +1,10 @@ package virtualnetworkrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworkrules/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/README.md b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/README.md index 8eeee681cd6..849e8b973fb 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/README.md +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/workloadclassifiers` Documentation -The `workloadclassifiers` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `workloadclassifiers` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/client.go b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/client.go index 8a4bda3b5df..2817cd7d47d 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/client.go +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/client.go @@ -15,7 +15,7 @@ type WorkloadClassifiersClient struct { } func NewWorkloadClassifiersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadClassifiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadclassifiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadclassifiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadClassifiersClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadclassifier.go b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadclassifier.go index 341ebda0737..7a69196cb75 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadclassifier.go +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadclassifier.go @@ -48,7 +48,7 @@ func ParseWorkloadClassifierID(input string) (*WorkloadClassifierId, error) { } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkloadClassifierIDInsensitively(input string) (*WorkloadClassifierId } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadgroup.go b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadgroup.go index 78d6718d686..e3c9c82be54 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadgroup.go +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/method_get.go b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/method_get.go index 4fb345bfa00..b53892d20ec 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadClassifiersClient) Get(ctx context.Context, id WorkloadClassifie var model WorkloadClassifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/version.go b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/version.go index c68b07deb2d..6e452a172b9 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadclassifiers/version.go +++ b/resource-manager/sql/2023-08-01-preview/workloadclassifiers/version.go @@ -1,12 +1,10 @@ package workloadclassifiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadclassifiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadclassifiers/2023-08-01-preview" } diff --git a/resource-manager/sql/2023-08-01-preview/workloadgroups/README.md b/resource-manager/sql/2023-08-01-preview/workloadgroups/README.md index 8c6d08ae204..c8c1ec6ebc8 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadgroups/README.md +++ b/resource-manager/sql/2023-08-01-preview/workloadgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/workloadgroups` Documentation -The `workloadgroups` SDK allows for interaction with the Azure Resource Manager Service `sql` (API Version `2023-08-01-preview`). +The `workloadgroups` SDK allows for interaction with Azure Resource Manager `sql` (API Version `2023-08-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sql/2023-08-01-preview/workloadgroups/client.go b/resource-manager/sql/2023-08-01-preview/workloadgroups/client.go index ea02247d06f..6c31a01f6ab 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadgroups/client.go +++ b/resource-manager/sql/2023-08-01-preview/workloadgroups/client.go @@ -15,7 +15,7 @@ type WorkloadGroupsClient struct { } func NewWorkloadGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadGroupsClient: %+v", err) } diff --git a/resource-manager/sql/2023-08-01-preview/workloadgroups/id_workloadgroup.go b/resource-manager/sql/2023-08-01-preview/workloadgroups/id_workloadgroup.go index de674487f45..eb1341955eb 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadgroups/id_workloadgroup.go +++ b/resource-manager/sql/2023-08-01-preview/workloadgroups/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sql/2023-08-01-preview/workloadgroups/method_get.go b/resource-manager/sql/2023-08-01-preview/workloadgroups/method_get.go index 7d018b12e1c..5b64cb7617a 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadgroups/method_get.go +++ b/resource-manager/sql/2023-08-01-preview/workloadgroups/method_get.go @@ -45,7 +45,6 @@ func (c WorkloadGroupsClient) Get(ctx context.Context, id WorkloadGroupId) (resu var model WorkloadGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sql/2023-08-01-preview/workloadgroups/version.go b/resource-manager/sql/2023-08-01-preview/workloadgroups/version.go index 71fc628e776..89b288bdee0 100644 --- a/resource-manager/sql/2023-08-01-preview/workloadgroups/version.go +++ b/resource-manager/sql/2023-08-01-preview/workloadgroups/version.go @@ -1,12 +1,10 @@ package workloadgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-08-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadgroups/2023-08-01-preview" } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/README.md b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/README.md index 85aca2fdb1c..7b6dc16d46c 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/README.md +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners` Documentation -The `availabilitygrouplisteners` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2022-02-01`). +The `availabilitygrouplisteners` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2022-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/client.go b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/client.go index dd5ea297a04..a13c1d45cf5 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/client.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/client.go @@ -15,7 +15,7 @@ type AvailabilityGroupListenersClient struct { } func NewAvailabilityGroupListenersClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilityGroupListenersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitygrouplisteners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitygrouplisteners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilityGroupListenersClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go index a98aa636876..4bfc959cbcc 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_availabilitygrouplistener.go @@ -44,7 +44,7 @@ func ParseAvailabilityGroupListenerID(input string) (*AvailabilityGroupListenerI } id := AvailabilityGroupListenerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAvailabilityGroupListenerIDInsensitively(input string) (*AvailabilityG } id := AvailabilityGroupListenerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go index d8653552093..676961e0a93 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/method_get.go b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/method_get.go index 926cc90bed3..e61caf01429 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/method_get.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AvailabilityGroupListenersClient) Get(ctx context.Context, id Availabili var model AvailabilityGroupListener result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/version.go b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/version.go index 8b36ad330a9..8e538c09b1f 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/version.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/availabilitygrouplisteners/version.go @@ -1,12 +1,10 @@ package availabilitygrouplisteners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitygrouplisteners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitygrouplisteners/2022-02-01" } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/README.md b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/README.md index 4216463055c..d6888ea67f2 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/README.md +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups` Documentation -The `sqlvirtualmachinegroups` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2022-02-01`). +The `sqlvirtualmachinegroups` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2022-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/client.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/client.go index 1bf6a0b88a7..eb31f314e0b 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/client.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/client.go @@ -15,7 +15,7 @@ type SqlVirtualMachineGroupsClient struct { } func NewSqlVirtualMachineGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVirtualMachineGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvirtualmachinegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvirtualmachinegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVirtualMachineGroupsClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go index ad826656b97..1cc7dbf082d 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/method_get.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/method_get.go index 211cb57a905..17849af621f 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/method_get.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/method_get.go @@ -45,7 +45,6 @@ func (c SqlVirtualMachineGroupsClient) Get(ctx context.Context, id SqlVirtualMac var model SqlVirtualMachineGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/version.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/version.go index 65994d7d733..3e060244fed 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/version.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachinegroups/version.go @@ -1,12 +1,10 @@ package sqlvirtualmachinegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvirtualmachinegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvirtualmachinegroups/2022-02-01" } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md index 513cc23177a..d9410eac0d5 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines` Documentation -The `sqlvirtualmachines` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2022-02-01`). +The `sqlvirtualmachines` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2022-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/client.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/client.go index d3578ee4c55..706440aad78 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/client.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/client.go @@ -15,7 +15,7 @@ type SqlVirtualMachinesClient struct { } func NewSqlVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvirtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvirtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVirtualMachinesClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go index 67c55ddda18..49e03afd9b7 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachine.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineID(input string) (*SqlVirtualMachineId, error) { } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineIDInsensitively(input string) (*SqlVirtualMachineId, } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go index 5949af3d82c..8bfa451c769 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get.go index 0fffbe8a99b..9b663ace099 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVirtualMachinesClient) Get(ctx context.Context, id SqlVirtualMachineI var model SqlVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/version.go b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/version.go index 88a926cafa3..6bd9fe158b9 100644 --- a/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/version.go +++ b/resource-manager/sqlvirtualmachine/2022-02-01/sqlvirtualmachines/version.go @@ -1,12 +1,10 @@ package sqlvirtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvirtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvirtualmachines/2022-02-01" } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/README.md b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/README.md index 7fdf992168d..83de81c8a87 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/README.md +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners` Documentation -The `availabilitygrouplisteners` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2023-10-01`). +The `availabilitygrouplisteners` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/client.go b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/client.go index dd5ea297a04..a13c1d45cf5 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/client.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/client.go @@ -15,7 +15,7 @@ type AvailabilityGroupListenersClient struct { } func NewAvailabilityGroupListenersClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilityGroupListenersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitygrouplisteners", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitygrouplisteners", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilityGroupListenersClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_availabilitygrouplistener.go b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_availabilitygrouplistener.go index a98aa636876..4bfc959cbcc 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_availabilitygrouplistener.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_availabilitygrouplistener.go @@ -44,7 +44,7 @@ func ParseAvailabilityGroupListenerID(input string) (*AvailabilityGroupListenerI } id := AvailabilityGroupListenerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAvailabilityGroupListenerIDInsensitively(input string) (*AvailabilityG } id := AvailabilityGroupListenerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go index d8653552093..676961e0a93 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/method_get.go b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/method_get.go index 926cc90bed3..e61caf01429 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/method_get.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c AvailabilityGroupListenersClient) Get(ctx context.Context, id Availabili var model AvailabilityGroupListener result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/version.go b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/version.go index c237d268700..d6ade3d09cf 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/version.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/availabilitygrouplisteners/version.go @@ -1,12 +1,10 @@ package availabilitygrouplisteners -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitygrouplisteners/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitygrouplisteners/2023-10-01" } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/README.md b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/README.md index b1a6248c5d7..8f5b7a277e6 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/README.md +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups` Documentation -The `sqlvirtualmachinegroups` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2023-10-01`). +The `sqlvirtualmachinegroups` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/client.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/client.go index 1bf6a0b88a7..eb31f314e0b 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/client.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/client.go @@ -15,7 +15,7 @@ type SqlVirtualMachineGroupsClient struct { } func NewSqlVirtualMachineGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVirtualMachineGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvirtualmachinegroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvirtualmachinegroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVirtualMachineGroupsClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go index ad826656b97..1cc7dbf082d 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/method_get.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/method_get.go index 211cb57a905..17849af621f 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/method_get.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/method_get.go @@ -45,7 +45,6 @@ func (c SqlVirtualMachineGroupsClient) Get(ctx context.Context, id SqlVirtualMac var model SqlVirtualMachineGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/version.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/version.go index ae2caae5adf..bfc86a23e56 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/version.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinegroups/version.go @@ -1,12 +1,10 @@ package sqlvirtualmachinegroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvirtualmachinegroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvirtualmachinegroups/2023-10-01" } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/README.md b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/README.md index 4b92ac3cf14..bff2754780d 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/README.md +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines` Documentation -The `sqlvirtualmachines` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2023-10-01`). +The `sqlvirtualmachines` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/client.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/client.go index d3578ee4c55..706440aad78 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/client.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/client.go @@ -15,7 +15,7 @@ type SqlVirtualMachinesClient struct { } func NewSqlVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvirtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvirtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVirtualMachinesClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachine.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachine.go index 67c55ddda18..49e03afd9b7 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachine.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachine.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineID(input string) (*SqlVirtualMachineId, error) { } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineIDInsensitively(input string) (*SqlVirtualMachineId, } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go index 5949af3d82c..8bfa451c769 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/id_sqlvirtualmachinegroup.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineGroupID(input string) (*SqlVirtualMachineGroupId, err } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineGroupIDInsensitively(input string) (*SqlVirtualMachin } id := SqlVirtualMachineGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/method_get.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/method_get.go index 0fffbe8a99b..9b663ace099 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/method_get.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlVirtualMachinesClient) Get(ctx context.Context, id SqlVirtualMachineI var model SqlVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/version.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/version.go index 2c8d7fb3ad3..a68cf6d077a 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/version.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachines/version.go @@ -1,12 +1,10 @@ package sqlvirtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvirtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvirtualmachines/2023-10-01" } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/README.md b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/README.md index e5620d91de0..d2049456f6d 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/README.md +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot` Documentation -The `sqlvirtualmachinetroubleshoot` SDK allows for interaction with the Azure Resource Manager Service `sqlvirtualmachine` (API Version `2023-10-01`). +The `sqlvirtualmachinetroubleshoot` SDK allows for interaction with Azure Resource Manager `sqlvirtualmachine` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/client.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/client.go index 419352a64df..8ca5cc75a29 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/client.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/client.go @@ -15,7 +15,7 @@ type SqlVirtualMachineTroubleshootClient struct { } func NewSqlVirtualMachineTroubleshootClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlVirtualMachineTroubleshootClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlvirtualmachinetroubleshoot", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlvirtualmachinetroubleshoot", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlVirtualMachineTroubleshootClient: %+v", err) } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/id_sqlvirtualmachine.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/id_sqlvirtualmachine.go index bc28c1a860a..091d34dbd32 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/id_sqlvirtualmachine.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/id_sqlvirtualmachine.go @@ -42,7 +42,7 @@ func ParseSqlVirtualMachineID(input string) (*SqlVirtualMachineId, error) { } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSqlVirtualMachineIDInsensitively(input string) (*SqlVirtualMachineId, } id := SqlVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/version.go b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/version.go index 4c7bff87b59..042a5d220bb 100644 --- a/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/version.go +++ b/resource-manager/sqlvirtualmachine/2023-10-01/sqlvirtualmachinetroubleshoot/version.go @@ -1,12 +1,10 @@ package sqlvirtualmachinetroubleshoot -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlvirtualmachinetroubleshoot/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlvirtualmachinetroubleshoot/2023-10-01" } diff --git a/resource-manager/storage/2023-01-01/accountmigrations/README.md b/resource-manager/storage/2023-01-01/accountmigrations/README.md index 7e01ae7f0d6..7a5b8e1fd92 100644 --- a/resource-manager/storage/2023-01-01/accountmigrations/README.md +++ b/resource-manager/storage/2023-01-01/accountmigrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/accountmigrations` Documentation -The `accountmigrations` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `accountmigrations` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/accountmigrations/client.go b/resource-manager/storage/2023-01-01/accountmigrations/client.go index 076c5aff6a0..ea647418770 100644 --- a/resource-manager/storage/2023-01-01/accountmigrations/client.go +++ b/resource-manager/storage/2023-01-01/accountmigrations/client.go @@ -15,7 +15,7 @@ type AccountMigrationsClient struct { } func NewAccountMigrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountMigrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountmigrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accountmigrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountMigrationsClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go b/resource-manager/storage/2023-01-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go index a39987ec8f5..4e4a8102905 100644 --- a/resource-manager/storage/2023-01-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go +++ b/resource-manager/storage/2023-01-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go @@ -47,7 +47,6 @@ func (c AccountMigrationsClient) StorageAccountsGetCustomerInitiatedMigration(ct var model StorageAccountMigration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/accountmigrations/version.go b/resource-manager/storage/2023-01-01/accountmigrations/version.go index 2829a585b89..b8cec88a956 100644 --- a/resource-manager/storage/2023-01-01/accountmigrations/version.go +++ b/resource-manager/storage/2023-01-01/accountmigrations/version.go @@ -1,12 +1,10 @@ package accountmigrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountmigrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accountmigrations/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/README.md b/resource-manager/storage/2023-01-01/blobcontainers/README.md index d8001ed8b49..33a4631d132 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/README.md +++ b/resource-manager/storage/2023-01-01/blobcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/blobcontainers` Documentation -The `blobcontainers` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `blobcontainers` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/blobcontainers/client.go b/resource-manager/storage/2023-01-01/blobcontainers/client.go index d6fb5931612..f8c4f005474 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/client.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/client.go @@ -15,7 +15,7 @@ type BlobContainersClient struct { } func NewBlobContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobcontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobcontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobContainersClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_clearlegalhold.go b/resource-manager/storage/2023-01-01/blobcontainers/method_clearlegalhold.go index 160259634e5..ff43462d451 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_clearlegalhold.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_clearlegalhold.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) ClearLegalHold(ctx context.Context, id commonids.S var model LegalHold result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_create.go b/resource-manager/storage/2023-01-01/blobcontainers/method_create.go index 652075bc456..8a507c13c08 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_create.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_create.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) Create(ctx context.Context, id commonids.StorageCo var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_createorupdateimmutabilitypolicy.go b/resource-manager/storage/2023-01-01/blobcontainers/method_createorupdateimmutabilitypolicy.go index d5d71851073..c683f139c1d 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_createorupdateimmutabilitypolicy.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_createorupdateimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateImmutabilityPolicyOperationOptions) ToHeaders() *client.He func (o CreateOrUpdateImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Conte var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_deleteimmutabilitypolicy.go b/resource-manager/storage/2023-01-01/blobcontainers/method_deleteimmutabilitypolicy.go index 71dcef6dd82..a24507c4578 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_deleteimmutabilitypolicy.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_deleteimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o DeleteImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o DeleteImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, id c var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_extendimmutabilitypolicy.go b/resource-manager/storage/2023-01-01/blobcontainers/method_extendimmutabilitypolicy.go index e2b3562b6e6..4e18a4334d3 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_extendimmutabilitypolicy.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_extendimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o ExtendImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o ExtendImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, id c var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_get.go b/resource-manager/storage/2023-01-01/blobcontainers/method_get.go index 18793964e8c..b0a980a8e54 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_get.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_get.go @@ -46,7 +46,6 @@ func (c BlobContainersClient) Get(ctx context.Context, id commonids.StorageConta var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_getimmutabilitypolicy.go b/resource-manager/storage/2023-01-01/blobcontainers/method_getimmutabilitypolicy.go index a86d0abab3f..a2100e1a1cd 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_getimmutabilitypolicy.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_getimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o GetImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o GetImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, id comm var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_lease.go b/resource-manager/storage/2023-01-01/blobcontainers/method_lease.go index deead4db335..10eca29be96 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_lease.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_lease.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) Lease(ctx context.Context, id commonids.StorageCon var model LeaseContainerResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_list.go b/resource-manager/storage/2023-01-01/blobcontainers/method_list.go index 7e4f85cf9f4..59584641806 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_list.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_lockimmutabilitypolicy.go b/resource-manager/storage/2023-01-01/blobcontainers/method_lockimmutabilitypolicy.go index 613d1a91b0f..772bf3c0fe6 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_lockimmutabilitypolicy.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_lockimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o LockImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o LockImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, id com var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_setlegalhold.go b/resource-manager/storage/2023-01-01/blobcontainers/method_setlegalhold.go index 0a4e957fc3a..66c886c244f 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_setlegalhold.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_setlegalhold.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) SetLegalHold(ctx context.Context, id commonids.Sto var model LegalHold result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/method_update.go b/resource-manager/storage/2023-01-01/blobcontainers/method_update.go index ddaf5078f6a..9924675791b 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/method_update.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/method_update.go @@ -50,7 +50,6 @@ func (c BlobContainersClient) Update(ctx context.Context, id commonids.StorageCo var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobcontainers/version.go b/resource-manager/storage/2023-01-01/blobcontainers/version.go index f3e041e8af9..1e0608dcca4 100644 --- a/resource-manager/storage/2023-01-01/blobcontainers/version.go +++ b/resource-manager/storage/2023-01-01/blobcontainers/version.go @@ -1,12 +1,10 @@ package blobcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobcontainers/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/README.md b/resource-manager/storage/2023-01-01/blobinventorypolicies/README.md index 311fa2bf884..dfcb67de85f 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/README.md +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/blobinventorypolicies` Documentation -The `blobinventorypolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `blobinventorypolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/client.go b/resource-manager/storage/2023-01-01/blobinventorypolicies/client.go index 64177c4faea..ead543ae1ea 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/client.go +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/client.go @@ -15,7 +15,7 @@ type BlobInventoryPoliciesClient struct { } func NewBlobInventoryPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobInventoryPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobinventorypolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobinventorypolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobInventoryPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_createorupdate.go b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_createorupdate.go index 4ec3e51d549..d9aa7bb2ce5 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_createorupdate.go @@ -51,7 +51,6 @@ func (c BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, id comm var model BlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_get.go b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_get.go index 592d8485606..f6596807e4a 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_get.go +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_get.go @@ -47,7 +47,6 @@ func (c BlobInventoryPoliciesClient) Get(ctx context.Context, id commonids.Stora var model BlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_list.go b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_list.go index 4c0c8b99566..6dd03a8e79f 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/method_list.go +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/method_list.go @@ -47,7 +47,6 @@ func (c BlobInventoryPoliciesClient) List(ctx context.Context, id commonids.Stor var model ListBlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobinventorypolicies/version.go b/resource-manager/storage/2023-01-01/blobinventorypolicies/version.go index 3132be05167..28da557ea73 100644 --- a/resource-manager/storage/2023-01-01/blobinventorypolicies/version.go +++ b/resource-manager/storage/2023-01-01/blobinventorypolicies/version.go @@ -1,12 +1,10 @@ package blobinventorypolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobinventorypolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobinventorypolicies/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/blobservice/README.md b/resource-manager/storage/2023-01-01/blobservice/README.md index 9ebdcbc742b..f189350732b 100644 --- a/resource-manager/storage/2023-01-01/blobservice/README.md +++ b/resource-manager/storage/2023-01-01/blobservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/blobservice` Documentation -The `blobservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `blobservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/blobservice/client.go b/resource-manager/storage/2023-01-01/blobservice/client.go index f67861e99f3..8e7d9478e1e 100644 --- a/resource-manager/storage/2023-01-01/blobservice/client.go +++ b/resource-manager/storage/2023-01-01/blobservice/client.go @@ -15,7 +15,7 @@ type BlobServiceClient struct { } func NewBlobServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/blobservice/method_getserviceproperties.go b/resource-manager/storage/2023-01-01/blobservice/method_getserviceproperties.go index 3ad4b249f57..e576638e636 100644 --- a/resource-manager/storage/2023-01-01/blobservice/method_getserviceproperties.go +++ b/resource-manager/storage/2023-01-01/blobservice/method_getserviceproperties.go @@ -47,7 +47,6 @@ func (c BlobServiceClient) GetServiceProperties(ctx context.Context, id commonid var model BlobServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobservice/method_list.go b/resource-manager/storage/2023-01-01/blobservice/method_list.go index 0663b1a875b..16076d2e6ea 100644 --- a/resource-manager/storage/2023-01-01/blobservice/method_list.go +++ b/resource-manager/storage/2023-01-01/blobservice/method_list.go @@ -47,7 +47,6 @@ func (c BlobServiceClient) List(ctx context.Context, id commonids.StorageAccount var model BlobServiceItems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobservice/method_setserviceproperties.go b/resource-manager/storage/2023-01-01/blobservice/method_setserviceproperties.go index 7f23880f2e1..48c8c11a18d 100644 --- a/resource-manager/storage/2023-01-01/blobservice/method_setserviceproperties.go +++ b/resource-manager/storage/2023-01-01/blobservice/method_setserviceproperties.go @@ -51,7 +51,6 @@ func (c BlobServiceClient) SetServiceProperties(ctx context.Context, id commonid var model BlobServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/blobservice/version.go b/resource-manager/storage/2023-01-01/blobservice/version.go index 536b992fec4..7bc1aca3b39 100644 --- a/resource-manager/storage/2023-01-01/blobservice/version.go +++ b/resource-manager/storage/2023-01-01/blobservice/version.go @@ -1,12 +1,10 @@ package blobservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobservice/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/deletedaccounts/README.md b/resource-manager/storage/2023-01-01/deletedaccounts/README.md index 93c899a08fc..cf500e211de 100644 --- a/resource-manager/storage/2023-01-01/deletedaccounts/README.md +++ b/resource-manager/storage/2023-01-01/deletedaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/deletedaccounts` Documentation -The `deletedaccounts` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `deletedaccounts` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/deletedaccounts/client.go b/resource-manager/storage/2023-01-01/deletedaccounts/client.go index 63277691ee3..126cde4e75f 100644 --- a/resource-manager/storage/2023-01-01/deletedaccounts/client.go +++ b/resource-manager/storage/2023-01-01/deletedaccounts/client.go @@ -15,7 +15,7 @@ type DeletedAccountsClient struct { } func NewDeletedAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedAccountsClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go b/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go index 966f6c88de3..b81b8bece5b 100644 --- a/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go +++ b/resource-manager/storage/2023-01-01/deletedaccounts/id_deletedaccount.go @@ -42,7 +42,7 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/deletedaccounts/method_get.go b/resource-manager/storage/2023-01-01/deletedaccounts/method_get.go index d8f0b6dec40..226604e9e7d 100644 --- a/resource-manager/storage/2023-01-01/deletedaccounts/method_get.go +++ b/resource-manager/storage/2023-01-01/deletedaccounts/method_get.go @@ -45,7 +45,6 @@ func (c DeletedAccountsClient) Get(ctx context.Context, id DeletedAccountId) (re var model DeletedAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/deletedaccounts/version.go b/resource-manager/storage/2023-01-01/deletedaccounts/version.go index 8d76b97cfa3..64e95debfbe 100644 --- a/resource-manager/storage/2023-01-01/deletedaccounts/version.go +++ b/resource-manager/storage/2023-01-01/deletedaccounts/version.go @@ -1,12 +1,10 @@ package deletedaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedaccounts/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/README.md b/resource-manager/storage/2023-01-01/encryptionscopes/README.md index dfd329a3bdb..8b629d4f4f6 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/README.md +++ b/resource-manager/storage/2023-01-01/encryptionscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/encryptionscopes` Documentation -The `encryptionscopes` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `encryptionscopes` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/client.go b/resource-manager/storage/2023-01-01/encryptionscopes/client.go index cece7665062..b91c7fbf3ce 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/client.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/client.go @@ -15,7 +15,7 @@ type EncryptionScopesClient struct { } func NewEncryptionScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionScopesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go b/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go index b9ea58e8e9f..b18cf01c57b 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/id_encryptionscope.go @@ -44,7 +44,7 @@ func ParseEncryptionScopeID(input string) (*EncryptionScopeId, error) { } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEncryptionScopeIDInsensitively(input string) (*EncryptionScopeId, erro } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/method_get.go b/resource-manager/storage/2023-01-01/encryptionscopes/method_get.go index f3d244a9d4a..9804f1d3dcd 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/method_get.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/method_get.go @@ -45,7 +45,6 @@ func (c EncryptionScopesClient) Get(ctx context.Context, id EncryptionScopeId) ( var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/method_list.go b/resource-manager/storage/2023-01-01/encryptionscopes/method_list.go index 270b8f24cf7..a918ca41ced 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/method_list.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/method_patch.go b/resource-manager/storage/2023-01-01/encryptionscopes/method_patch.go index 5eb446f9e7a..f078a793f31 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/method_patch.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/method_patch.go @@ -49,7 +49,6 @@ func (c EncryptionScopesClient) Patch(ctx context.Context, id EncryptionScopeId, var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/method_put.go b/resource-manager/storage/2023-01-01/encryptionscopes/method_put.go index 6a6f5484c54..a44ea7672df 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/method_put.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/method_put.go @@ -50,7 +50,6 @@ func (c EncryptionScopesClient) Put(ctx context.Context, id EncryptionScopeId, i var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/encryptionscopes/version.go b/resource-manager/storage/2023-01-01/encryptionscopes/version.go index 2b111f0a4a9..6b66090f6b4 100644 --- a/resource-manager/storage/2023-01-01/encryptionscopes/version.go +++ b/resource-manager/storage/2023-01-01/encryptionscopes/version.go @@ -1,12 +1,10 @@ package encryptionscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionscopes/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/fileservice/README.md b/resource-manager/storage/2023-01-01/fileservice/README.md index 8e915ef9e70..33f2784f863 100644 --- a/resource-manager/storage/2023-01-01/fileservice/README.md +++ b/resource-manager/storage/2023-01-01/fileservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileservice` Documentation -The `fileservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `fileservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/fileservice/client.go b/resource-manager/storage/2023-01-01/fileservice/client.go index 3da62522778..cca02704795 100644 --- a/resource-manager/storage/2023-01-01/fileservice/client.go +++ b/resource-manager/storage/2023-01-01/fileservice/client.go @@ -15,7 +15,7 @@ type FileServiceClient struct { } func NewFileServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*FileServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/fileservice/method_getserviceproperties.go b/resource-manager/storage/2023-01-01/fileservice/method_getserviceproperties.go index eaece7b8b98..ca53fe20909 100644 --- a/resource-manager/storage/2023-01-01/fileservice/method_getserviceproperties.go +++ b/resource-manager/storage/2023-01-01/fileservice/method_getserviceproperties.go @@ -47,7 +47,6 @@ func (c FileServiceClient) GetServiceProperties(ctx context.Context, id commonid var model FileServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileservice/method_list.go b/resource-manager/storage/2023-01-01/fileservice/method_list.go index 222e614bfa4..981e8f7a751 100644 --- a/resource-manager/storage/2023-01-01/fileservice/method_list.go +++ b/resource-manager/storage/2023-01-01/fileservice/method_list.go @@ -47,7 +47,6 @@ func (c FileServiceClient) List(ctx context.Context, id commonids.StorageAccount var model FileServiceItems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileservice/method_setserviceproperties.go b/resource-manager/storage/2023-01-01/fileservice/method_setserviceproperties.go index 72f930f1818..71205c1011a 100644 --- a/resource-manager/storage/2023-01-01/fileservice/method_setserviceproperties.go +++ b/resource-manager/storage/2023-01-01/fileservice/method_setserviceproperties.go @@ -51,7 +51,6 @@ func (c FileServiceClient) SetServiceProperties(ctx context.Context, id commonid var model FileServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileservice/version.go b/resource-manager/storage/2023-01-01/fileservice/version.go index 28e2e8a133f..d104500778b 100644 --- a/resource-manager/storage/2023-01-01/fileservice/version.go +++ b/resource-manager/storage/2023-01-01/fileservice/version.go @@ -1,12 +1,10 @@ package fileservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileservice/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/fileshares/README.md b/resource-manager/storage/2023-01-01/fileshares/README.md index 33903a18a8b..ccc855d7231 100644 --- a/resource-manager/storage/2023-01-01/fileshares/README.md +++ b/resource-manager/storage/2023-01-01/fileshares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/fileshares` Documentation -The `fileshares` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `fileshares` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/fileshares/client.go b/resource-manager/storage/2023-01-01/fileshares/client.go index 716a45d91ac..168c9b6dd91 100644 --- a/resource-manager/storage/2023-01-01/fileshares/client.go +++ b/resource-manager/storage/2023-01-01/fileshares/client.go @@ -15,7 +15,7 @@ type FileSharesClient struct { } func NewFileSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*FileSharesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileshares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileshares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileSharesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/fileshares/id_share.go b/resource-manager/storage/2023-01-01/fileshares/id_share.go index f2712c47ee9..41810fa16f5 100644 --- a/resource-manager/storage/2023-01-01/fileshares/id_share.go +++ b/resource-manager/storage/2023-01-01/fileshares/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_create.go b/resource-manager/storage/2023-01-01/fileshares/method_create.go index 3f1b71f5e91..a70229ca472 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_create.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_create.go @@ -34,6 +34,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c FileSharesClient) Create(ctx context.Context, id ShareId, input FileShar var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_delete.go b/resource-manager/storage/2023-01-01/fileshares/method_delete.go index 5149309d141..b8b6c1131bc 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_delete.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_get.go b/resource-manager/storage/2023-01-01/fileshares/method_get.go index b20b8f157e0..c76778a7da8 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_get.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_get.go @@ -37,6 +37,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -77,7 +78,6 @@ func (c FileSharesClient) Get(ctx context.Context, id ShareId, options GetOperat var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_lease.go b/resource-manager/storage/2023-01-01/fileshares/method_lease.go index 45f4fab799b..4f96787c84f 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_lease.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_lease.go @@ -36,6 +36,7 @@ func (o LeaseOperationOptions) ToHeaders() *client.Headers { func (o LeaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c FileSharesClient) Lease(ctx context.Context, id ShareId, input LeaseShar var model LeaseShareResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_list.go b/resource-manager/storage/2023-01-01/fileshares/method_list.go index 6c096ded1b0..90f4e9bad07 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_list.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/fileshares/method_update.go b/resource-manager/storage/2023-01-01/fileshares/method_update.go index 3b4a9855c68..4df6495f034 100644 --- a/resource-manager/storage/2023-01-01/fileshares/method_update.go +++ b/resource-manager/storage/2023-01-01/fileshares/method_update.go @@ -49,7 +49,6 @@ func (c FileSharesClient) Update(ctx context.Context, id ShareId, input FileShar var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/fileshares/version.go b/resource-manager/storage/2023-01-01/fileshares/version.go index f2474f502f9..a51f5384d04 100644 --- a/resource-manager/storage/2023-01-01/fileshares/version.go +++ b/resource-manager/storage/2023-01-01/fileshares/version.go @@ -1,12 +1,10 @@ package fileshares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileshares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileshares/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/localusers/README.md b/resource-manager/storage/2023-01-01/localusers/README.md index d8d0f5948cc..dced2a1e262 100644 --- a/resource-manager/storage/2023-01-01/localusers/README.md +++ b/resource-manager/storage/2023-01-01/localusers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/localusers` Documentation -The `localusers` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `localusers` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/localusers/client.go b/resource-manager/storage/2023-01-01/localusers/client.go index ab85d2cf8f7..75f6ec63bc9 100644 --- a/resource-manager/storage/2023-01-01/localusers/client.go +++ b/resource-manager/storage/2023-01-01/localusers/client.go @@ -15,7 +15,7 @@ type LocalUsersClient struct { } func NewLocalUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalUsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localusers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localusers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalUsersClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/localusers/id_localuser.go b/resource-manager/storage/2023-01-01/localusers/id_localuser.go index 00f822aadb5..fc7e70823c1 100644 --- a/resource-manager/storage/2023-01-01/localusers/id_localuser.go +++ b/resource-manager/storage/2023-01-01/localusers/id_localuser.go @@ -44,7 +44,7 @@ func ParseLocalUserID(input string) (*LocalUserId, error) { } id := LocalUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalUserIDInsensitively(input string) (*LocalUserId, error) { } id := LocalUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/localusers/method_createorupdate.go b/resource-manager/storage/2023-01-01/localusers/method_createorupdate.go index 6350d0cbb40..a4f5dae589a 100644 --- a/resource-manager/storage/2023-01-01/localusers/method_createorupdate.go +++ b/resource-manager/storage/2023-01-01/localusers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c LocalUsersClient) CreateOrUpdate(ctx context.Context, id LocalUserId, in var model LocalUser result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/localusers/method_get.go b/resource-manager/storage/2023-01-01/localusers/method_get.go index d9fe1a2ab29..a1b7d29ccf5 100644 --- a/resource-manager/storage/2023-01-01/localusers/method_get.go +++ b/resource-manager/storage/2023-01-01/localusers/method_get.go @@ -45,7 +45,6 @@ func (c LocalUsersClient) Get(ctx context.Context, id LocalUserId) (result GetOp var model LocalUser result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/localusers/method_list.go b/resource-manager/storage/2023-01-01/localusers/method_list.go index f63b295e61e..81d69009a7c 100644 --- a/resource-manager/storage/2023-01-01/localusers/method_list.go +++ b/resource-manager/storage/2023-01-01/localusers/method_list.go @@ -47,7 +47,6 @@ func (c LocalUsersClient) List(ctx context.Context, id commonids.StorageAccountI var model LocalUsers result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/localusers/method_listkeys.go b/resource-manager/storage/2023-01-01/localusers/method_listkeys.go index bc45754e287..18c79940bfd 100644 --- a/resource-manager/storage/2023-01-01/localusers/method_listkeys.go +++ b/resource-manager/storage/2023-01-01/localusers/method_listkeys.go @@ -46,7 +46,6 @@ func (c LocalUsersClient) ListKeys(ctx context.Context, id LocalUserId) (result var model LocalUserKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/localusers/method_regeneratepassword.go b/resource-manager/storage/2023-01-01/localusers/method_regeneratepassword.go index e7bc7e44e6e..db714c7bbf9 100644 --- a/resource-manager/storage/2023-01-01/localusers/method_regeneratepassword.go +++ b/resource-manager/storage/2023-01-01/localusers/method_regeneratepassword.go @@ -46,7 +46,6 @@ func (c LocalUsersClient) RegeneratePassword(ctx context.Context, id LocalUserId var model LocalUserRegeneratePasswordResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/localusers/version.go b/resource-manager/storage/2023-01-01/localusers/version.go index 8ee926256e7..6e50a1f7bac 100644 --- a/resource-manager/storage/2023-01-01/localusers/version.go +++ b/resource-manager/storage/2023-01-01/localusers/version.go @@ -1,12 +1,10 @@ package localusers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localusers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localusers/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/managementpolicies/README.md b/resource-manager/storage/2023-01-01/managementpolicies/README.md index 83cdc3e510b..e5e06aaaf6a 100644 --- a/resource-manager/storage/2023-01-01/managementpolicies/README.md +++ b/resource-manager/storage/2023-01-01/managementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/managementpolicies` Documentation -The `managementpolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `managementpolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/managementpolicies/client.go b/resource-manager/storage/2023-01-01/managementpolicies/client.go index c3647dcfd90..3c6c8bfbeab 100644 --- a/resource-manager/storage/2023-01-01/managementpolicies/client.go +++ b/resource-manager/storage/2023-01-01/managementpolicies/client.go @@ -15,7 +15,7 @@ type ManagementPoliciesClient struct { } func NewManagementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/managementpolicies/method_createorupdate.go b/resource-manager/storage/2023-01-01/managementpolicies/method_createorupdate.go index ac866e17759..581da6420d5 100644 --- a/resource-manager/storage/2023-01-01/managementpolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-01-01/managementpolicies/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, id commoni var model ManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/managementpolicies/method_get.go b/resource-manager/storage/2023-01-01/managementpolicies/method_get.go index 7265da724b9..d7d0d106757 100644 --- a/resource-manager/storage/2023-01-01/managementpolicies/method_get.go +++ b/resource-manager/storage/2023-01-01/managementpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagementPoliciesClient) Get(ctx context.Context, id commonids.StorageA var model ManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/managementpolicies/version.go b/resource-manager/storage/2023-01-01/managementpolicies/version.go index f598d6ab4b9..fbffb9ccd3d 100644 --- a/resource-manager/storage/2023-01-01/managementpolicies/version.go +++ b/resource-manager/storage/2023-01-01/managementpolicies/version.go @@ -1,12 +1,10 @@ package managementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementpolicies/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/README.md b/resource-manager/storage/2023-01-01/objectreplicationpolicies/README.md index 382b7712eb7..6d43199a46f 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/README.md +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/objectreplicationpolicies` Documentation -The `objectreplicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `objectreplicationpolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/client.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/client.go index 1a6ea0f15c3..0a716659257 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/client.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/client.go @@ -15,7 +15,7 @@ type ObjectReplicationPoliciesClient struct { } func NewObjectReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectreplicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectreplicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go index 8e0a9404f7f..412e5c7b740 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/id_objectreplicationpolicy.go @@ -44,7 +44,7 @@ func ParseObjectReplicationPolicyID(input string) (*ObjectReplicationPolicyId, e } id := ObjectReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectReplicationPolicyIDInsensitively(input string) (*ObjectReplicati } id := ObjectReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_createorupdate.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_createorupdate.go index 35caabe9bd6..986601726d9 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, id var model ObjectReplicationPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_get.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_get.go index cf2e59b413d..bebd8d8cdd2 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_get.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ObjectReplicationPoliciesClient) Get(ctx context.Context, id ObjectRepli var model ObjectReplicationPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_list.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_list.go index 234ecd924ec..ee3fc07bcbe 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_list.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/method_list.go @@ -47,7 +47,6 @@ func (c ObjectReplicationPoliciesClient) List(ctx context.Context, id commonids. var model ObjectReplicationPolicies result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/objectreplicationpolicies/version.go b/resource-manager/storage/2023-01-01/objectreplicationpolicies/version.go index 00c3bbb6a6a..8d2345bc4e5 100644 --- a/resource-manager/storage/2023-01-01/objectreplicationpolicies/version.go +++ b/resource-manager/storage/2023-01-01/objectreplicationpolicies/version.go @@ -1,12 +1,10 @@ package objectreplicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectreplicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectreplicationpolicies/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/README.md b/resource-manager/storage/2023-01-01/privateendpointconnections/README.md index 35f8cbaed28..1163ea96b26 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/README.md +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/client.go b/resource-manager/storage/2023-01-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/client.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go index d90e3c0365b..eafbcfc3e35 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/method_get.go b/resource-manager/storage/2023-01-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/method_get.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/method_list.go b/resource-manager/storage/2023-01-01/privateendpointconnections/method_list.go index 8917977fc4e..d17e2e90a97 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/method_list.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/method_put.go b/resource-manager/storage/2023-01-01/privateendpointconnections/method_put.go index c3eb19aec49..4e3b24e9ce0 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/method_put.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/method_put.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Put(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/privateendpointconnections/version.go b/resource-manager/storage/2023-01-01/privateendpointconnections/version.go index 9e2a36fc350..5963c7d52f2 100644 --- a/resource-manager/storage/2023-01-01/privateendpointconnections/version.go +++ b/resource-manager/storage/2023-01-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/privatelinkresources/README.md b/resource-manager/storage/2023-01-01/privatelinkresources/README.md index e6119768bc9..8d0e08f5956 100644 --- a/resource-manager/storage/2023-01-01/privatelinkresources/README.md +++ b/resource-manager/storage/2023-01-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/privatelinkresources/client.go b/resource-manager/storage/2023-01-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/storage/2023-01-01/privatelinkresources/client.go +++ b/resource-manager/storage/2023-01-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/privatelinkresources/method_listbystorageaccount.go b/resource-manager/storage/2023-01-01/privatelinkresources/method_listbystorageaccount.go index 91a6e88551a..c824d249e2f 100644 --- a/resource-manager/storage/2023-01-01/privatelinkresources/method_listbystorageaccount.go +++ b/resource-manager/storage/2023-01-01/privatelinkresources/method_listbystorageaccount.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, id var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/privatelinkresources/version.go b/resource-manager/storage/2023-01-01/privatelinkresources/version.go index d020bb9e164..80e78c9dced 100644 --- a/resource-manager/storage/2023-01-01/privatelinkresources/version.go +++ b/resource-manager/storage/2023-01-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/queueservice/README.md b/resource-manager/storage/2023-01-01/queueservice/README.md index d326c7b157a..97254b2b695 100644 --- a/resource-manager/storage/2023-01-01/queueservice/README.md +++ b/resource-manager/storage/2023-01-01/queueservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueservice` Documentation -The `queueservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `queueservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/queueservice/client.go b/resource-manager/storage/2023-01-01/queueservice/client.go index 66324e7dadf..2c8a13a7cbf 100644 --- a/resource-manager/storage/2023-01-01/queueservice/client.go +++ b/resource-manager/storage/2023-01-01/queueservice/client.go @@ -15,7 +15,7 @@ type QueueServiceClient struct { } func NewQueueServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*QueueServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queueservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queueservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueueServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/queueservice/id_queue.go b/resource-manager/storage/2023-01-01/queueservice/id_queue.go index 068439f287e..4b9322b5377 100644 --- a/resource-manager/storage/2023-01-01/queueservice/id_queue.go +++ b/resource-manager/storage/2023-01-01/queueservice/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/queueservice/method_queuecreate.go b/resource-manager/storage/2023-01-01/queueservice/method_queuecreate.go index 88bdb6a519c..98fe87a46ee 100644 --- a/resource-manager/storage/2023-01-01/queueservice/method_queuecreate.go +++ b/resource-manager/storage/2023-01-01/queueservice/method_queuecreate.go @@ -49,7 +49,6 @@ func (c QueueServiceClient) QueueCreate(ctx context.Context, id QueueId, input S var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueservice/method_queueget.go b/resource-manager/storage/2023-01-01/queueservice/method_queueget.go index 6368b8bfeec..92a46418f56 100644 --- a/resource-manager/storage/2023-01-01/queueservice/method_queueget.go +++ b/resource-manager/storage/2023-01-01/queueservice/method_queueget.go @@ -45,7 +45,6 @@ func (c QueueServiceClient) QueueGet(ctx context.Context, id QueueId) (result Qu var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueservice/method_queuelist.go b/resource-manager/storage/2023-01-01/queueservice/method_queuelist.go index 318e140f7d5..32f4154907a 100644 --- a/resource-manager/storage/2023-01-01/queueservice/method_queuelist.go +++ b/resource-manager/storage/2023-01-01/queueservice/method_queuelist.go @@ -41,6 +41,7 @@ func (o QueueListOperationOptions) ToHeaders() *client.Headers { func (o QueueListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/queueservice/method_queueupdate.go b/resource-manager/storage/2023-01-01/queueservice/method_queueupdate.go index 2e75cd7f518..1683fdf8d92 100644 --- a/resource-manager/storage/2023-01-01/queueservice/method_queueupdate.go +++ b/resource-manager/storage/2023-01-01/queueservice/method_queueupdate.go @@ -49,7 +49,6 @@ func (c QueueServiceClient) QueueUpdate(ctx context.Context, id QueueId, input S var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueservice/version.go b/resource-manager/storage/2023-01-01/queueservice/version.go index ceec8132103..8aa13905316 100644 --- a/resource-manager/storage/2023-01-01/queueservice/version.go +++ b/resource-manager/storage/2023-01-01/queueservice/version.go @@ -1,12 +1,10 @@ package queueservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queueservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queueservice/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/README.md b/resource-manager/storage/2023-01-01/queueserviceproperties/README.md index 296ea37b88b..cf6f55b8211 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/README.md +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/queueserviceproperties` Documentation -The `queueserviceproperties` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `queueserviceproperties` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/client.go b/resource-manager/storage/2023-01-01/queueserviceproperties/client.go index 03af2c66f43..561ee9327f8 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/client.go +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/client.go @@ -15,7 +15,7 @@ type QueueServicePropertiesClient struct { } func NewQueueServicePropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueueServicePropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queueserviceproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queueserviceproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueueServicePropertiesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicesgetserviceproperties.go b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicesgetserviceproperties.go index 63387911616..f78f2a984e8 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicesgetserviceproperties.go +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicesgetserviceproperties.go @@ -47,7 +47,6 @@ func (c QueueServicePropertiesClient) QueueServicesGetServiceProperties(ctx cont var model QueueServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueserviceslist.go b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueserviceslist.go index c6efdced89c..4838af6a610 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueserviceslist.go +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueserviceslist.go @@ -47,7 +47,6 @@ func (c QueueServicePropertiesClient) QueueServicesList(ctx context.Context, id var model ListQueueServices result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicessetserviceproperties.go b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicessetserviceproperties.go index adcb748bcea..2d8525c0af1 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicessetserviceproperties.go +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/method_queueservicessetserviceproperties.go @@ -51,7 +51,6 @@ func (c QueueServicePropertiesClient) QueueServicesSetServiceProperties(ctx cont var model QueueServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/queueserviceproperties/version.go b/resource-manager/storage/2023-01-01/queueserviceproperties/version.go index 06d03ca1ee0..25f47e29580 100644 --- a/resource-manager/storage/2023-01-01/queueserviceproperties/version.go +++ b/resource-manager/storage/2023-01-01/queueserviceproperties/version.go @@ -1,12 +1,10 @@ package queueserviceproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queueserviceproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queueserviceproperties/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/skus/README.md b/resource-manager/storage/2023-01-01/skus/README.md index 6e20ff6578c..0c0b835ea6b 100644 --- a/resource-manager/storage/2023-01-01/skus/README.md +++ b/resource-manager/storage/2023-01-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/skus/client.go b/resource-manager/storage/2023-01-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/storage/2023-01-01/skus/client.go +++ b/resource-manager/storage/2023-01-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/skus/method_list.go b/resource-manager/storage/2023-01-01/skus/method_list.go index fef91f385c7..a8f7100a248 100644 --- a/resource-manager/storage/2023-01-01/skus/method_list.go +++ b/resource-manager/storage/2023-01-01/skus/method_list.go @@ -47,7 +47,6 @@ func (c SkusClient) List(ctx context.Context, id commonids.SubscriptionId) (resu var model StorageSkuListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/skus/version.go b/resource-manager/storage/2023-01-01/skus/version.go index 72603d4eebe..467edf994fa 100644 --- a/resource-manager/storage/2023-01-01/skus/version.go +++ b/resource-manager/storage/2023-01-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/README.md b/resource-manager/storage/2023-01-01/storageaccounts/README.md index af72ad8400e..0bf64246ec6 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/README.md +++ b/resource-manager/storage/2023-01-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/storageaccounts/client.go b/resource-manager/storage/2023-01-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/client.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_checknameavailability.go b/resource-manager/storage/2023-01-01/storageaccounts/method_checknameavailability.go index e843f48137c..c26dc168508 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_checknameavailability.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) CheckNameAvailability(ctx context.Context, id com var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_failover.go b/resource-manager/storage/2023-01-01/storageaccounts/method_failover.go index 232206ae331..2dacce2190a 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_failover.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_getproperties.go b/resource-manager/storage/2023-01-01/storageaccounts/method_getproperties.go index 0670e27212f..889e7b6b811 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_getproperties.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_getproperties.go @@ -35,6 +35,7 @@ func (o GetPropertiesOperationOptions) ToHeaders() *client.Headers { func (o GetPropertiesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c StorageAccountsClient) GetProperties(ctx context.Context, id commonids.S var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_hierarchicalnamespacemigration.go b/resource-manager/storage/2023-01-01/storageaccounts/method_hierarchicalnamespacemigration.go index aacd24aa153..645a7ebf72a 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_hierarchicalnamespacemigration.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_hierarchicalnamespacemigration.go @@ -37,6 +37,7 @@ func (o HierarchicalNamespaceMigrationOperationOptions) ToHeaders() *client.Head func (o HierarchicalNamespaceMigrationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_listaccountsas.go b/resource-manager/storage/2023-01-01/storageaccounts/method_listaccountsas.go index 97c0b14e799..8e8d8524427 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_listaccountsas.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_listaccountsas.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) ListAccountSAS(ctx context.Context, id commonids. var model ListAccountSasResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_listkeys.go b/resource-manager/storage/2023-01-01/storageaccounts/method_listkeys.go index 2d73921315f..0c1536ce92e 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_listkeys.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_listkeys.go @@ -35,6 +35,7 @@ func (o ListKeysOperationOptions) ToHeaders() *client.Headers { func (o ListKeysOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c StorageAccountsClient) ListKeys(ctx context.Context, id commonids.Storag var model StorageAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_listservicesas.go b/resource-manager/storage/2023-01-01/storageaccounts/method_listservicesas.go index 4ac7ad0b3af..1381cbd5c33 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_listservicesas.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_listservicesas.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) ListServiceSAS(ctx context.Context, id commonids. var model ListServiceSasResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_regeneratekey.go b/resource-manager/storage/2023-01-01/storageaccounts/method_regeneratekey.go index 7a2b6a97798..fed50b96990 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_regeneratekey.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_regeneratekey.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) RegenerateKey(ctx context.Context, id commonids.S var model StorageAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/method_update.go b/resource-manager/storage/2023-01-01/storageaccounts/method_update.go index 0d35afd28b2..7878fcc1eeb 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/method_update.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/method_update.go @@ -50,7 +50,6 @@ func (c StorageAccountsClient) Update(ctx context.Context, id commonids.StorageA var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/storageaccounts/version.go b/resource-manager/storage/2023-01-01/storageaccounts/version.go index a06af287f63..996a046b1ce 100644 --- a/resource-manager/storage/2023-01-01/storageaccounts/version.go +++ b/resource-manager/storage/2023-01-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/tableservice/README.md b/resource-manager/storage/2023-01-01/tableservice/README.md index c791fc9fe76..9cf8fd6e9be 100644 --- a/resource-manager/storage/2023-01-01/tableservice/README.md +++ b/resource-manager/storage/2023-01-01/tableservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableservice` Documentation -The `tableservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `tableservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/tableservice/client.go b/resource-manager/storage/2023-01-01/tableservice/client.go index 03b4e028e98..953b6a4b29e 100644 --- a/resource-manager/storage/2023-01-01/tableservice/client.go +++ b/resource-manager/storage/2023-01-01/tableservice/client.go @@ -15,7 +15,7 @@ type TableServiceClient struct { } func NewTableServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*TableServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tableservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tableservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TableServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/tableservice/id_table.go b/resource-manager/storage/2023-01-01/tableservice/id_table.go index 4603ffec8ff..a8659d94f34 100644 --- a/resource-manager/storage/2023-01-01/tableservice/id_table.go +++ b/resource-manager/storage/2023-01-01/tableservice/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-01-01/tableservice/method_tablecreate.go b/resource-manager/storage/2023-01-01/tableservice/method_tablecreate.go index 9c014b5de22..f2970fc65ab 100644 --- a/resource-manager/storage/2023-01-01/tableservice/method_tablecreate.go +++ b/resource-manager/storage/2023-01-01/tableservice/method_tablecreate.go @@ -49,7 +49,6 @@ func (c TableServiceClient) TableCreate(ctx context.Context, id TableId, input T var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableservice/method_tableget.go b/resource-manager/storage/2023-01-01/tableservice/method_tableget.go index 4db47fcbf28..aef020e4c88 100644 --- a/resource-manager/storage/2023-01-01/tableservice/method_tableget.go +++ b/resource-manager/storage/2023-01-01/tableservice/method_tableget.go @@ -45,7 +45,6 @@ func (c TableServiceClient) TableGet(ctx context.Context, id TableId) (result Ta var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableservice/method_tableupdate.go b/resource-manager/storage/2023-01-01/tableservice/method_tableupdate.go index c92604b27e0..2508510e571 100644 --- a/resource-manager/storage/2023-01-01/tableservice/method_tableupdate.go +++ b/resource-manager/storage/2023-01-01/tableservice/method_tableupdate.go @@ -49,7 +49,6 @@ func (c TableServiceClient) TableUpdate(ctx context.Context, id TableId, input T var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableservice/version.go b/resource-manager/storage/2023-01-01/tableservice/version.go index 1e5bddb8405..ad59eb788ff 100644 --- a/resource-manager/storage/2023-01-01/tableservice/version.go +++ b/resource-manager/storage/2023-01-01/tableservice/version.go @@ -1,12 +1,10 @@ package tableservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tableservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tableservice/2023-01-01" } diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/README.md b/resource-manager/storage/2023-01-01/tableserviceproperties/README.md index 3c2f010bd7d..afa9fb0ce4e 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/README.md +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-01-01/tableserviceproperties` Documentation -The `tableserviceproperties` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-01-01`). +The `tableserviceproperties` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/client.go b/resource-manager/storage/2023-01-01/tableserviceproperties/client.go index ae0b242ba7c..dcb7653dd46 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/client.go +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/client.go @@ -15,7 +15,7 @@ type TableServicePropertiesClient struct { } func NewTableServicePropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*TableServicePropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tableserviceproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tableserviceproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TableServicePropertiesClient: %+v", err) } diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicesgetserviceproperties.go b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicesgetserviceproperties.go index 4293264696e..e1a99055459 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicesgetserviceproperties.go +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicesgetserviceproperties.go @@ -47,7 +47,6 @@ func (c TableServicePropertiesClient) TableServicesGetServiceProperties(ctx cont var model TableServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableserviceslist.go b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableserviceslist.go index 138c39b2ca2..613a663b456 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableserviceslist.go +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableserviceslist.go @@ -47,7 +47,6 @@ func (c TableServicePropertiesClient) TableServicesList(ctx context.Context, id var model ListTableServices result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicessetserviceproperties.go b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicessetserviceproperties.go index 4ce4a5db53d..e9e9f143a09 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicessetserviceproperties.go +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/method_tableservicessetserviceproperties.go @@ -51,7 +51,6 @@ func (c TableServicePropertiesClient) TableServicesSetServiceProperties(ctx cont var model TableServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-01-01/tableserviceproperties/version.go b/resource-manager/storage/2023-01-01/tableserviceproperties/version.go index c59a531d81e..5fb548b94b4 100644 --- a/resource-manager/storage/2023-01-01/tableserviceproperties/version.go +++ b/resource-manager/storage/2023-01-01/tableserviceproperties/version.go @@ -1,12 +1,10 @@ package tableserviceproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tableserviceproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tableserviceproperties/2023-01-01" } diff --git a/resource-manager/storage/2023-05-01/accountmigrations/README.md b/resource-manager/storage/2023-05-01/accountmigrations/README.md index eec58c46be0..ea13685da6e 100644 --- a/resource-manager/storage/2023-05-01/accountmigrations/README.md +++ b/resource-manager/storage/2023-05-01/accountmigrations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/accountmigrations` Documentation -The `accountmigrations` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `accountmigrations` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/accountmigrations/client.go b/resource-manager/storage/2023-05-01/accountmigrations/client.go index 076c5aff6a0..ea647418770 100644 --- a/resource-manager/storage/2023-05-01/accountmigrations/client.go +++ b/resource-manager/storage/2023-05-01/accountmigrations/client.go @@ -15,7 +15,7 @@ type AccountMigrationsClient struct { } func NewAccountMigrationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AccountMigrationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accountmigrations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accountmigrations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccountMigrationsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go b/resource-manager/storage/2023-05-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go index a39987ec8f5..4e4a8102905 100644 --- a/resource-manager/storage/2023-05-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go +++ b/resource-manager/storage/2023-05-01/accountmigrations/method_storageaccountsgetcustomerinitiatedmigration.go @@ -47,7 +47,6 @@ func (c AccountMigrationsClient) StorageAccountsGetCustomerInitiatedMigration(ct var model StorageAccountMigration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/accountmigrations/version.go b/resource-manager/storage/2023-05-01/accountmigrations/version.go index a0286bde2ad..b089905b232 100644 --- a/resource-manager/storage/2023-05-01/accountmigrations/version.go +++ b/resource-manager/storage/2023-05-01/accountmigrations/version.go @@ -1,12 +1,10 @@ package accountmigrations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accountmigrations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accountmigrations/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/README.md b/resource-manager/storage/2023-05-01/blobcontainers/README.md index 1a384666f64..e25c136b50e 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/README.md +++ b/resource-manager/storage/2023-05-01/blobcontainers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/blobcontainers` Documentation -The `blobcontainers` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `blobcontainers` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/blobcontainers/client.go b/resource-manager/storage/2023-05-01/blobcontainers/client.go index d6fb5931612..f8c4f005474 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/client.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/client.go @@ -15,7 +15,7 @@ type BlobContainersClient struct { } func NewBlobContainersClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobContainersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobcontainers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobcontainers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobContainersClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_clearlegalhold.go b/resource-manager/storage/2023-05-01/blobcontainers/method_clearlegalhold.go index 160259634e5..ff43462d451 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_clearlegalhold.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_clearlegalhold.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) ClearLegalHold(ctx context.Context, id commonids.S var model LegalHold result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_create.go b/resource-manager/storage/2023-05-01/blobcontainers/method_create.go index 652075bc456..8a507c13c08 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_create.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_create.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) Create(ctx context.Context, id commonids.StorageCo var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_createorupdateimmutabilitypolicy.go b/resource-manager/storage/2023-05-01/blobcontainers/method_createorupdateimmutabilitypolicy.go index d5d71851073..c683f139c1d 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_createorupdateimmutabilitypolicy.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_createorupdateimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateImmutabilityPolicyOperationOptions) ToHeaders() *client.He func (o CreateOrUpdateImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context.Conte var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_deleteimmutabilitypolicy.go b/resource-manager/storage/2023-05-01/blobcontainers/method_deleteimmutabilitypolicy.go index 71dcef6dd82..a24507c4578 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_deleteimmutabilitypolicy.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_deleteimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o DeleteImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o DeleteImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) DeleteImmutabilityPolicy(ctx context.Context, id c var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_extendimmutabilitypolicy.go b/resource-manager/storage/2023-05-01/blobcontainers/method_extendimmutabilitypolicy.go index e2b3562b6e6..4e18a4334d3 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_extendimmutabilitypolicy.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_extendimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o ExtendImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o ExtendImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, id c var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_get.go b/resource-manager/storage/2023-05-01/blobcontainers/method_get.go index 18793964e8c..b0a980a8e54 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_get.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_get.go @@ -46,7 +46,6 @@ func (c BlobContainersClient) Get(ctx context.Context, id commonids.StorageConta var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_getimmutabilitypolicy.go b/resource-manager/storage/2023-05-01/blobcontainers/method_getimmutabilitypolicy.go index a86d0abab3f..a2100e1a1cd 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_getimmutabilitypolicy.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_getimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o GetImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o GetImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) GetImmutabilityPolicy(ctx context.Context, id comm var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_lease.go b/resource-manager/storage/2023-05-01/blobcontainers/method_lease.go index deead4db335..10eca29be96 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_lease.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_lease.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) Lease(ctx context.Context, id commonids.StorageCon var model LeaseContainerResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_list.go b/resource-manager/storage/2023-05-01/blobcontainers/method_list.go index 7e4f85cf9f4..59584641806 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_list.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_lockimmutabilitypolicy.go b/resource-manager/storage/2023-05-01/blobcontainers/method_lockimmutabilitypolicy.go index 613d1a91b0f..772bf3c0fe6 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_lockimmutabilitypolicy.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_lockimmutabilitypolicy.go @@ -37,6 +37,7 @@ func (o LockImmutabilityPolicyOperationOptions) ToHeaders() *client.Headers { func (o LockImmutabilityPolicyOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c BlobContainersClient) LockImmutabilityPolicy(ctx context.Context, id com var model ImmutabilityPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_setlegalhold.go b/resource-manager/storage/2023-05-01/blobcontainers/method_setlegalhold.go index 0a4e957fc3a..66c886c244f 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_setlegalhold.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_setlegalhold.go @@ -51,7 +51,6 @@ func (c BlobContainersClient) SetLegalHold(ctx context.Context, id commonids.Sto var model LegalHold result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/method_update.go b/resource-manager/storage/2023-05-01/blobcontainers/method_update.go index ddaf5078f6a..9924675791b 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/method_update.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/method_update.go @@ -50,7 +50,6 @@ func (c BlobContainersClient) Update(ctx context.Context, id commonids.StorageCo var model BlobContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobcontainers/version.go b/resource-manager/storage/2023-05-01/blobcontainers/version.go index 993bdd3ed4c..9f869e63465 100644 --- a/resource-manager/storage/2023-05-01/blobcontainers/version.go +++ b/resource-manager/storage/2023-05-01/blobcontainers/version.go @@ -1,12 +1,10 @@ package blobcontainers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobcontainers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobcontainers/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/README.md b/resource-manager/storage/2023-05-01/blobinventorypolicies/README.md index 83bdbdcb54e..344f5da5b31 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/README.md +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/blobinventorypolicies` Documentation -The `blobinventorypolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `blobinventorypolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/client.go b/resource-manager/storage/2023-05-01/blobinventorypolicies/client.go index 64177c4faea..ead543ae1ea 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/client.go +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/client.go @@ -15,7 +15,7 @@ type BlobInventoryPoliciesClient struct { } func NewBlobInventoryPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobInventoryPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobinventorypolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobinventorypolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobInventoryPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_createorupdate.go b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_createorupdate.go index 4ec3e51d549..d9aa7bb2ce5 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_createorupdate.go @@ -51,7 +51,6 @@ func (c BlobInventoryPoliciesClient) CreateOrUpdate(ctx context.Context, id comm var model BlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_get.go b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_get.go index 592d8485606..f6596807e4a 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_get.go +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_get.go @@ -47,7 +47,6 @@ func (c BlobInventoryPoliciesClient) Get(ctx context.Context, id commonids.Stora var model BlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_list.go b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_list.go index 4c0c8b99566..6dd03a8e79f 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/method_list.go +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/method_list.go @@ -47,7 +47,6 @@ func (c BlobInventoryPoliciesClient) List(ctx context.Context, id commonids.Stor var model ListBlobInventoryPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobinventorypolicies/version.go b/resource-manager/storage/2023-05-01/blobinventorypolicies/version.go index 7755f9d78dc..2de048cb862 100644 --- a/resource-manager/storage/2023-05-01/blobinventorypolicies/version.go +++ b/resource-manager/storage/2023-05-01/blobinventorypolicies/version.go @@ -1,12 +1,10 @@ package blobinventorypolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobinventorypolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobinventorypolicies/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/blobservice/README.md b/resource-manager/storage/2023-05-01/blobservice/README.md index b4cc65c12c7..d5f30cc3c85 100644 --- a/resource-manager/storage/2023-05-01/blobservice/README.md +++ b/resource-manager/storage/2023-05-01/blobservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/blobservice` Documentation -The `blobservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `blobservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/blobservice/client.go b/resource-manager/storage/2023-05-01/blobservice/client.go index f67861e99f3..8e7d9478e1e 100644 --- a/resource-manager/storage/2023-05-01/blobservice/client.go +++ b/resource-manager/storage/2023-05-01/blobservice/client.go @@ -15,7 +15,7 @@ type BlobServiceClient struct { } func NewBlobServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*BlobServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "blobservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "blobservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BlobServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/blobservice/method_getserviceproperties.go b/resource-manager/storage/2023-05-01/blobservice/method_getserviceproperties.go index 3ad4b249f57..e576638e636 100644 --- a/resource-manager/storage/2023-05-01/blobservice/method_getserviceproperties.go +++ b/resource-manager/storage/2023-05-01/blobservice/method_getserviceproperties.go @@ -47,7 +47,6 @@ func (c BlobServiceClient) GetServiceProperties(ctx context.Context, id commonid var model BlobServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobservice/method_list.go b/resource-manager/storage/2023-05-01/blobservice/method_list.go index 0663b1a875b..16076d2e6ea 100644 --- a/resource-manager/storage/2023-05-01/blobservice/method_list.go +++ b/resource-manager/storage/2023-05-01/blobservice/method_list.go @@ -47,7 +47,6 @@ func (c BlobServiceClient) List(ctx context.Context, id commonids.StorageAccount var model BlobServiceItems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobservice/method_setserviceproperties.go b/resource-manager/storage/2023-05-01/blobservice/method_setserviceproperties.go index 7f23880f2e1..48c8c11a18d 100644 --- a/resource-manager/storage/2023-05-01/blobservice/method_setserviceproperties.go +++ b/resource-manager/storage/2023-05-01/blobservice/method_setserviceproperties.go @@ -51,7 +51,6 @@ func (c BlobServiceClient) SetServiceProperties(ctx context.Context, id commonid var model BlobServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/blobservice/version.go b/resource-manager/storage/2023-05-01/blobservice/version.go index 47407311d0c..62b58e9aa8f 100644 --- a/resource-manager/storage/2023-05-01/blobservice/version.go +++ b/resource-manager/storage/2023-05-01/blobservice/version.go @@ -1,12 +1,10 @@ package blobservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/blobservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/blobservice/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/deletedaccounts/README.md b/resource-manager/storage/2023-05-01/deletedaccounts/README.md index 565de66f057..4652d6ba8c2 100644 --- a/resource-manager/storage/2023-05-01/deletedaccounts/README.md +++ b/resource-manager/storage/2023-05-01/deletedaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/deletedaccounts` Documentation -The `deletedaccounts` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `deletedaccounts` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/deletedaccounts/client.go b/resource-manager/storage/2023-05-01/deletedaccounts/client.go index 63277691ee3..126cde4e75f 100644 --- a/resource-manager/storage/2023-05-01/deletedaccounts/client.go +++ b/resource-manager/storage/2023-05-01/deletedaccounts/client.go @@ -15,7 +15,7 @@ type DeletedAccountsClient struct { } func NewDeletedAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedAccountsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/deletedaccounts/id_deletedaccount.go b/resource-manager/storage/2023-05-01/deletedaccounts/id_deletedaccount.go index 966f6c88de3..b81b8bece5b 100644 --- a/resource-manager/storage/2023-05-01/deletedaccounts/id_deletedaccount.go +++ b/resource-manager/storage/2023-05-01/deletedaccounts/id_deletedaccount.go @@ -42,7 +42,7 @@ func ParseDeletedAccountID(input string) (*DeletedAccountId, error) { } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDeletedAccountIDInsensitively(input string) (*DeletedAccountId, error) } id := DeletedAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/deletedaccounts/method_get.go b/resource-manager/storage/2023-05-01/deletedaccounts/method_get.go index d8f0b6dec40..226604e9e7d 100644 --- a/resource-manager/storage/2023-05-01/deletedaccounts/method_get.go +++ b/resource-manager/storage/2023-05-01/deletedaccounts/method_get.go @@ -45,7 +45,6 @@ func (c DeletedAccountsClient) Get(ctx context.Context, id DeletedAccountId) (re var model DeletedAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/deletedaccounts/version.go b/resource-manager/storage/2023-05-01/deletedaccounts/version.go index fa6451b18ce..54aeb5a7012 100644 --- a/resource-manager/storage/2023-05-01/deletedaccounts/version.go +++ b/resource-manager/storage/2023-05-01/deletedaccounts/version.go @@ -1,12 +1,10 @@ package deletedaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedaccounts/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/README.md b/resource-manager/storage/2023-05-01/encryptionscopes/README.md index 2ec9cf53ed4..eb940a9efe5 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/README.md +++ b/resource-manager/storage/2023-05-01/encryptionscopes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/encryptionscopes` Documentation -The `encryptionscopes` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `encryptionscopes` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/client.go b/resource-manager/storage/2023-05-01/encryptionscopes/client.go index cece7665062..b91c7fbf3ce 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/client.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/client.go @@ -15,7 +15,7 @@ type EncryptionScopesClient struct { } func NewEncryptionScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionScopesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "encryptionscopes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "encryptionscopes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EncryptionScopesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/id_encryptionscope.go b/resource-manager/storage/2023-05-01/encryptionscopes/id_encryptionscope.go index b9ea58e8e9f..b18cf01c57b 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/id_encryptionscope.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/id_encryptionscope.go @@ -44,7 +44,7 @@ func ParseEncryptionScopeID(input string) (*EncryptionScopeId, error) { } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEncryptionScopeIDInsensitively(input string) (*EncryptionScopeId, erro } id := EncryptionScopeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/method_get.go b/resource-manager/storage/2023-05-01/encryptionscopes/method_get.go index f3d244a9d4a..9804f1d3dcd 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/method_get.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/method_get.go @@ -45,7 +45,6 @@ func (c EncryptionScopesClient) Get(ctx context.Context, id EncryptionScopeId) ( var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/method_list.go b/resource-manager/storage/2023-05-01/encryptionscopes/method_list.go index 270b8f24cf7..a918ca41ced 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/method_list.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/method_patch.go b/resource-manager/storage/2023-05-01/encryptionscopes/method_patch.go index 5eb446f9e7a..f078a793f31 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/method_patch.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/method_patch.go @@ -49,7 +49,6 @@ func (c EncryptionScopesClient) Patch(ctx context.Context, id EncryptionScopeId, var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/method_put.go b/resource-manager/storage/2023-05-01/encryptionscopes/method_put.go index 6a6f5484c54..a44ea7672df 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/method_put.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/method_put.go @@ -50,7 +50,6 @@ func (c EncryptionScopesClient) Put(ctx context.Context, id EncryptionScopeId, i var model EncryptionScope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/encryptionscopes/version.go b/resource-manager/storage/2023-05-01/encryptionscopes/version.go index 09937e8bb74..1c3733015a4 100644 --- a/resource-manager/storage/2023-05-01/encryptionscopes/version.go +++ b/resource-manager/storage/2023-05-01/encryptionscopes/version.go @@ -1,12 +1,10 @@ package encryptionscopes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/encryptionscopes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/encryptionscopes/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/fileservice/README.md b/resource-manager/storage/2023-05-01/fileservice/README.md index 6921f5017df..ef7f0931515 100644 --- a/resource-manager/storage/2023-05-01/fileservice/README.md +++ b/resource-manager/storage/2023-05-01/fileservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/fileservice` Documentation -The `fileservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `fileservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/fileservice/client.go b/resource-manager/storage/2023-05-01/fileservice/client.go index 3da62522778..cca02704795 100644 --- a/resource-manager/storage/2023-05-01/fileservice/client.go +++ b/resource-manager/storage/2023-05-01/fileservice/client.go @@ -15,7 +15,7 @@ type FileServiceClient struct { } func NewFileServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*FileServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/fileservice/method_getserviceproperties.go b/resource-manager/storage/2023-05-01/fileservice/method_getserviceproperties.go index eaece7b8b98..ca53fe20909 100644 --- a/resource-manager/storage/2023-05-01/fileservice/method_getserviceproperties.go +++ b/resource-manager/storage/2023-05-01/fileservice/method_getserviceproperties.go @@ -47,7 +47,6 @@ func (c FileServiceClient) GetServiceProperties(ctx context.Context, id commonid var model FileServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileservice/method_list.go b/resource-manager/storage/2023-05-01/fileservice/method_list.go index 222e614bfa4..981e8f7a751 100644 --- a/resource-manager/storage/2023-05-01/fileservice/method_list.go +++ b/resource-manager/storage/2023-05-01/fileservice/method_list.go @@ -47,7 +47,6 @@ func (c FileServiceClient) List(ctx context.Context, id commonids.StorageAccount var model FileServiceItems result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileservice/method_setserviceproperties.go b/resource-manager/storage/2023-05-01/fileservice/method_setserviceproperties.go index 72f930f1818..71205c1011a 100644 --- a/resource-manager/storage/2023-05-01/fileservice/method_setserviceproperties.go +++ b/resource-manager/storage/2023-05-01/fileservice/method_setserviceproperties.go @@ -51,7 +51,6 @@ func (c FileServiceClient) SetServiceProperties(ctx context.Context, id commonid var model FileServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileservice/version.go b/resource-manager/storage/2023-05-01/fileservice/version.go index c05c0bbb87a..d43e334a682 100644 --- a/resource-manager/storage/2023-05-01/fileservice/version.go +++ b/resource-manager/storage/2023-05-01/fileservice/version.go @@ -1,12 +1,10 @@ package fileservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileservice/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/fileshares/README.md b/resource-manager/storage/2023-05-01/fileshares/README.md index 43134dadc66..c616bedf8f0 100644 --- a/resource-manager/storage/2023-05-01/fileshares/README.md +++ b/resource-manager/storage/2023-05-01/fileshares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/fileshares` Documentation -The `fileshares` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `fileshares` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/fileshares/client.go b/resource-manager/storage/2023-05-01/fileshares/client.go index 716a45d91ac..168c9b6dd91 100644 --- a/resource-manager/storage/2023-05-01/fileshares/client.go +++ b/resource-manager/storage/2023-05-01/fileshares/client.go @@ -15,7 +15,7 @@ type FileSharesClient struct { } func NewFileSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*FileSharesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "fileshares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "fileshares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FileSharesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/fileshares/id_share.go b/resource-manager/storage/2023-05-01/fileshares/id_share.go index f2712c47ee9..41810fa16f5 100644 --- a/resource-manager/storage/2023-05-01/fileshares/id_share.go +++ b/resource-manager/storage/2023-05-01/fileshares/id_share.go @@ -44,7 +44,7 @@ func ParseShareID(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseShareIDInsensitively(input string) (*ShareId, error) { } id := ShareId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_create.go b/resource-manager/storage/2023-05-01/fileshares/method_create.go index 3f1b71f5e91..a70229ca472 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_create.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_create.go @@ -34,6 +34,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c FileSharesClient) Create(ctx context.Context, id ShareId, input FileShar var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_delete.go b/resource-manager/storage/2023-05-01/fileshares/method_delete.go index 5149309d141..b8b6c1131bc 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_delete.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_get.go b/resource-manager/storage/2023-05-01/fileshares/method_get.go index b20b8f157e0..c76778a7da8 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_get.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_get.go @@ -37,6 +37,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -77,7 +78,6 @@ func (c FileSharesClient) Get(ctx context.Context, id ShareId, options GetOperat var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_lease.go b/resource-manager/storage/2023-05-01/fileshares/method_lease.go index 45f4fab799b..4f96787c84f 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_lease.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_lease.go @@ -36,6 +36,7 @@ func (o LeaseOperationOptions) ToHeaders() *client.Headers { func (o LeaseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c FileSharesClient) Lease(ctx context.Context, id ShareId, input LeaseShar var model LeaseShareResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_list.go b/resource-manager/storage/2023-05-01/fileshares/method_list.go index 6c096ded1b0..90f4e9bad07 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_list.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/fileshares/method_update.go b/resource-manager/storage/2023-05-01/fileshares/method_update.go index 3b4a9855c68..4df6495f034 100644 --- a/resource-manager/storage/2023-05-01/fileshares/method_update.go +++ b/resource-manager/storage/2023-05-01/fileshares/method_update.go @@ -49,7 +49,6 @@ func (c FileSharesClient) Update(ctx context.Context, id ShareId, input FileShar var model FileShare result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/fileshares/version.go b/resource-manager/storage/2023-05-01/fileshares/version.go index 765971208e9..d60e69ba43a 100644 --- a/resource-manager/storage/2023-05-01/fileshares/version.go +++ b/resource-manager/storage/2023-05-01/fileshares/version.go @@ -1,12 +1,10 @@ package fileshares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/fileshares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/fileshares/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/localusers/README.md b/resource-manager/storage/2023-05-01/localusers/README.md index 455e32ccbd7..8a35bffcb9b 100644 --- a/resource-manager/storage/2023-05-01/localusers/README.md +++ b/resource-manager/storage/2023-05-01/localusers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/localusers` Documentation -The `localusers` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `localusers` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/localusers/client.go b/resource-manager/storage/2023-05-01/localusers/client.go index ab85d2cf8f7..75f6ec63bc9 100644 --- a/resource-manager/storage/2023-05-01/localusers/client.go +++ b/resource-manager/storage/2023-05-01/localusers/client.go @@ -15,7 +15,7 @@ type LocalUsersClient struct { } func NewLocalUsersClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalUsersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "localusers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "localusers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocalUsersClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/localusers/id_localuser.go b/resource-manager/storage/2023-05-01/localusers/id_localuser.go index 00f822aadb5..fc7e70823c1 100644 --- a/resource-manager/storage/2023-05-01/localusers/id_localuser.go +++ b/resource-manager/storage/2023-05-01/localusers/id_localuser.go @@ -44,7 +44,7 @@ func ParseLocalUserID(input string) (*LocalUserId, error) { } id := LocalUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLocalUserIDInsensitively(input string) (*LocalUserId, error) { } id := LocalUserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/localusers/method_createorupdate.go b/resource-manager/storage/2023-05-01/localusers/method_createorupdate.go index 6350d0cbb40..a4f5dae589a 100644 --- a/resource-manager/storage/2023-05-01/localusers/method_createorupdate.go +++ b/resource-manager/storage/2023-05-01/localusers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c LocalUsersClient) CreateOrUpdate(ctx context.Context, id LocalUserId, in var model LocalUser result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/localusers/method_get.go b/resource-manager/storage/2023-05-01/localusers/method_get.go index d9fe1a2ab29..a1b7d29ccf5 100644 --- a/resource-manager/storage/2023-05-01/localusers/method_get.go +++ b/resource-manager/storage/2023-05-01/localusers/method_get.go @@ -45,7 +45,6 @@ func (c LocalUsersClient) Get(ctx context.Context, id LocalUserId) (result GetOp var model LocalUser result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/localusers/method_list.go b/resource-manager/storage/2023-05-01/localusers/method_list.go index f95895afe80..4a6b34f765b 100644 --- a/resource-manager/storage/2023-05-01/localusers/method_list.go +++ b/resource-manager/storage/2023-05-01/localusers/method_list.go @@ -42,6 +42,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/localusers/method_listkeys.go b/resource-manager/storage/2023-05-01/localusers/method_listkeys.go index bc45754e287..18c79940bfd 100644 --- a/resource-manager/storage/2023-05-01/localusers/method_listkeys.go +++ b/resource-manager/storage/2023-05-01/localusers/method_listkeys.go @@ -46,7 +46,6 @@ func (c LocalUsersClient) ListKeys(ctx context.Context, id LocalUserId) (result var model LocalUserKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/localusers/method_regeneratepassword.go b/resource-manager/storage/2023-05-01/localusers/method_regeneratepassword.go index e7bc7e44e6e..db714c7bbf9 100644 --- a/resource-manager/storage/2023-05-01/localusers/method_regeneratepassword.go +++ b/resource-manager/storage/2023-05-01/localusers/method_regeneratepassword.go @@ -46,7 +46,6 @@ func (c LocalUsersClient) RegeneratePassword(ctx context.Context, id LocalUserId var model LocalUserRegeneratePasswordResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/localusers/version.go b/resource-manager/storage/2023-05-01/localusers/version.go index 2ff5adeff97..46551deffdb 100644 --- a/resource-manager/storage/2023-05-01/localusers/version.go +++ b/resource-manager/storage/2023-05-01/localusers/version.go @@ -1,12 +1,10 @@ package localusers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localusers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/localusers/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/managementpolicies/README.md b/resource-manager/storage/2023-05-01/managementpolicies/README.md index 775be9d2f2d..3f56127caf1 100644 --- a/resource-manager/storage/2023-05-01/managementpolicies/README.md +++ b/resource-manager/storage/2023-05-01/managementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/managementpolicies` Documentation -The `managementpolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `managementpolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/managementpolicies/client.go b/resource-manager/storage/2023-05-01/managementpolicies/client.go index c3647dcfd90..3c6c8bfbeab 100644 --- a/resource-manager/storage/2023-05-01/managementpolicies/client.go +++ b/resource-manager/storage/2023-05-01/managementpolicies/client.go @@ -15,7 +15,7 @@ type ManagementPoliciesClient struct { } func NewManagementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagementPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/managementpolicies/method_createorupdate.go b/resource-manager/storage/2023-05-01/managementpolicies/method_createorupdate.go index ac866e17759..581da6420d5 100644 --- a/resource-manager/storage/2023-05-01/managementpolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-05-01/managementpolicies/method_createorupdate.go @@ -51,7 +51,6 @@ func (c ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, id commoni var model ManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/managementpolicies/method_get.go b/resource-manager/storage/2023-05-01/managementpolicies/method_get.go index 7265da724b9..d7d0d106757 100644 --- a/resource-manager/storage/2023-05-01/managementpolicies/method_get.go +++ b/resource-manager/storage/2023-05-01/managementpolicies/method_get.go @@ -47,7 +47,6 @@ func (c ManagementPoliciesClient) Get(ctx context.Context, id commonids.StorageA var model ManagementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/managementpolicies/version.go b/resource-manager/storage/2023-05-01/managementpolicies/version.go index 37953acac7e..0a392c83102 100644 --- a/resource-manager/storage/2023-05-01/managementpolicies/version.go +++ b/resource-manager/storage/2023-05-01/managementpolicies/version.go @@ -1,12 +1,10 @@ package managementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managementpolicies/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/README.md b/resource-manager/storage/2023-05-01/objectreplicationpolicies/README.md index cea1784657f..0d463e6cc50 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/README.md +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/objectreplicationpolicies` Documentation -The `objectreplicationpolicies` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `objectreplicationpolicies` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/client.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/client.go index 1a6ea0f15c3..0a716659257 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/client.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/client.go @@ -15,7 +15,7 @@ type ObjectReplicationPoliciesClient struct { } func NewObjectReplicationPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ObjectReplicationPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "objectreplicationpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "objectreplicationpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ObjectReplicationPoliciesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/id_objectreplicationpolicy.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/id_objectreplicationpolicy.go index 8e0a9404f7f..412e5c7b740 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/id_objectreplicationpolicy.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/id_objectreplicationpolicy.go @@ -44,7 +44,7 @@ func ParseObjectReplicationPolicyID(input string) (*ObjectReplicationPolicyId, e } id := ObjectReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseObjectReplicationPolicyIDInsensitively(input string) (*ObjectReplicati } id := ObjectReplicationPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_createorupdate.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_createorupdate.go index 35caabe9bd6..986601726d9 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_createorupdate.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, id var model ObjectReplicationPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_get.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_get.go index cf2e59b413d..bebd8d8cdd2 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_get.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_get.go @@ -45,7 +45,6 @@ func (c ObjectReplicationPoliciesClient) Get(ctx context.Context, id ObjectRepli var model ObjectReplicationPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_list.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_list.go index 234ecd924ec..ee3fc07bcbe 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_list.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/method_list.go @@ -47,7 +47,6 @@ func (c ObjectReplicationPoliciesClient) List(ctx context.Context, id commonids. var model ObjectReplicationPolicies result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/objectreplicationpolicies/version.go b/resource-manager/storage/2023-05-01/objectreplicationpolicies/version.go index 90ddf0bf9d7..bfcbf018bc2 100644 --- a/resource-manager/storage/2023-05-01/objectreplicationpolicies/version.go +++ b/resource-manager/storage/2023-05-01/objectreplicationpolicies/version.go @@ -1,12 +1,10 @@ package objectreplicationpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/objectreplicationpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/objectreplicationpolicies/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/README.md b/resource-manager/storage/2023-05-01/privateendpointconnections/README.md index 0368bc6bbd8..e2fd71a44ba 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/README.md +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/client.go b/resource-manager/storage/2023-05-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/client.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/storage/2023-05-01/privateendpointconnections/id_privateendpointconnection.go index d90e3c0365b..eafbcfc3e35 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/method_get.go b/resource-manager/storage/2023-05-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/method_get.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/method_list.go b/resource-manager/storage/2023-05-01/privateendpointconnections/method_list.go index 8917977fc4e..d17e2e90a97 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/method_list.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/method_list.go @@ -47,7 +47,6 @@ func (c PrivateEndpointConnectionsClient) List(ctx context.Context, id commonids var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/method_put.go b/resource-manager/storage/2023-05-01/privateendpointconnections/method_put.go index c3eb19aec49..4e3b24e9ce0 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/method_put.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/method_put.go @@ -49,7 +49,6 @@ func (c PrivateEndpointConnectionsClient) Put(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/privateendpointconnections/version.go b/resource-manager/storage/2023-05-01/privateendpointconnections/version.go index c66466113e9..73acafaf02b 100644 --- a/resource-manager/storage/2023-05-01/privateendpointconnections/version.go +++ b/resource-manager/storage/2023-05-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/privatelinkresources/README.md b/resource-manager/storage/2023-05-01/privatelinkresources/README.md index 7f804b8eaf0..813f92b19b3 100644 --- a/resource-manager/storage/2023-05-01/privatelinkresources/README.md +++ b/resource-manager/storage/2023-05-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/privatelinkresources/client.go b/resource-manager/storage/2023-05-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/storage/2023-05-01/privatelinkresources/client.go +++ b/resource-manager/storage/2023-05-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/privatelinkresources/method_listbystorageaccount.go b/resource-manager/storage/2023-05-01/privatelinkresources/method_listbystorageaccount.go index 91a6e88551a..c824d249e2f 100644 --- a/resource-manager/storage/2023-05-01/privatelinkresources/method_listbystorageaccount.go +++ b/resource-manager/storage/2023-05-01/privatelinkresources/method_listbystorageaccount.go @@ -47,7 +47,6 @@ func (c PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, id var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/privatelinkresources/version.go b/resource-manager/storage/2023-05-01/privatelinkresources/version.go index 924e9f36dbd..7b880f640b8 100644 --- a/resource-manager/storage/2023-05-01/privatelinkresources/version.go +++ b/resource-manager/storage/2023-05-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/queueservice/README.md b/resource-manager/storage/2023-05-01/queueservice/README.md index ffd8e97bc43..e6bbbcd0606 100644 --- a/resource-manager/storage/2023-05-01/queueservice/README.md +++ b/resource-manager/storage/2023-05-01/queueservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/queueservice` Documentation -The `queueservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `queueservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/queueservice/client.go b/resource-manager/storage/2023-05-01/queueservice/client.go index 66324e7dadf..2c8a13a7cbf 100644 --- a/resource-manager/storage/2023-05-01/queueservice/client.go +++ b/resource-manager/storage/2023-05-01/queueservice/client.go @@ -15,7 +15,7 @@ type QueueServiceClient struct { } func NewQueueServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*QueueServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queueservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queueservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueueServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/queueservice/id_queue.go b/resource-manager/storage/2023-05-01/queueservice/id_queue.go index 068439f287e..4b9322b5377 100644 --- a/resource-manager/storage/2023-05-01/queueservice/id_queue.go +++ b/resource-manager/storage/2023-05-01/queueservice/id_queue.go @@ -44,7 +44,7 @@ func ParseQueueID(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseQueueIDInsensitively(input string) (*QueueId, error) { } id := QueueId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/queueservice/method_queuecreate.go b/resource-manager/storage/2023-05-01/queueservice/method_queuecreate.go index 88bdb6a519c..98fe87a46ee 100644 --- a/resource-manager/storage/2023-05-01/queueservice/method_queuecreate.go +++ b/resource-manager/storage/2023-05-01/queueservice/method_queuecreate.go @@ -49,7 +49,6 @@ func (c QueueServiceClient) QueueCreate(ctx context.Context, id QueueId, input S var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueservice/method_queueget.go b/resource-manager/storage/2023-05-01/queueservice/method_queueget.go index 6368b8bfeec..92a46418f56 100644 --- a/resource-manager/storage/2023-05-01/queueservice/method_queueget.go +++ b/resource-manager/storage/2023-05-01/queueservice/method_queueget.go @@ -45,7 +45,6 @@ func (c QueueServiceClient) QueueGet(ctx context.Context, id QueueId) (result Qu var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueservice/method_queuelist.go b/resource-manager/storage/2023-05-01/queueservice/method_queuelist.go index 318e140f7d5..32f4154907a 100644 --- a/resource-manager/storage/2023-05-01/queueservice/method_queuelist.go +++ b/resource-manager/storage/2023-05-01/queueservice/method_queuelist.go @@ -41,6 +41,7 @@ func (o QueueListOperationOptions) ToHeaders() *client.Headers { func (o QueueListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/queueservice/method_queueupdate.go b/resource-manager/storage/2023-05-01/queueservice/method_queueupdate.go index 2e75cd7f518..1683fdf8d92 100644 --- a/resource-manager/storage/2023-05-01/queueservice/method_queueupdate.go +++ b/resource-manager/storage/2023-05-01/queueservice/method_queueupdate.go @@ -49,7 +49,6 @@ func (c QueueServiceClient) QueueUpdate(ctx context.Context, id QueueId, input S var model StorageQueue result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueservice/version.go b/resource-manager/storage/2023-05-01/queueservice/version.go index 0930e0633ea..eefa1f6439b 100644 --- a/resource-manager/storage/2023-05-01/queueservice/version.go +++ b/resource-manager/storage/2023-05-01/queueservice/version.go @@ -1,12 +1,10 @@ package queueservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queueservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queueservice/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/README.md b/resource-manager/storage/2023-05-01/queueserviceproperties/README.md index d0ea98cdaf0..61151e02d78 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/README.md +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/queueserviceproperties` Documentation -The `queueserviceproperties` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `queueserviceproperties` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/client.go b/resource-manager/storage/2023-05-01/queueserviceproperties/client.go index 03af2c66f43..561ee9327f8 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/client.go +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/client.go @@ -15,7 +15,7 @@ type QueueServicePropertiesClient struct { } func NewQueueServicePropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueueServicePropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "queueserviceproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "queueserviceproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating QueueServicePropertiesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicesgetserviceproperties.go b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicesgetserviceproperties.go index 63387911616..f78f2a984e8 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicesgetserviceproperties.go +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicesgetserviceproperties.go @@ -47,7 +47,6 @@ func (c QueueServicePropertiesClient) QueueServicesGetServiceProperties(ctx cont var model QueueServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueserviceslist.go b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueserviceslist.go index c6efdced89c..4838af6a610 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueserviceslist.go +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueserviceslist.go @@ -47,7 +47,6 @@ func (c QueueServicePropertiesClient) QueueServicesList(ctx context.Context, id var model ListQueueServices result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicessetserviceproperties.go b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicessetserviceproperties.go index adcb748bcea..2d8525c0af1 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicessetserviceproperties.go +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/method_queueservicessetserviceproperties.go @@ -51,7 +51,6 @@ func (c QueueServicePropertiesClient) QueueServicesSetServiceProperties(ctx cont var model QueueServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/queueserviceproperties/version.go b/resource-manager/storage/2023-05-01/queueserviceproperties/version.go index e8a2afd34c6..cbc4dbc8ec8 100644 --- a/resource-manager/storage/2023-05-01/queueserviceproperties/version.go +++ b/resource-manager/storage/2023-05-01/queueserviceproperties/version.go @@ -1,12 +1,10 @@ package queueserviceproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/queueserviceproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/queueserviceproperties/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/skus/README.md b/resource-manager/storage/2023-05-01/skus/README.md index f9effba15e9..ad0598c25a6 100644 --- a/resource-manager/storage/2023-05-01/skus/README.md +++ b/resource-manager/storage/2023-05-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/skus/client.go b/resource-manager/storage/2023-05-01/skus/client.go index 90cd04245b3..8db41721863 100644 --- a/resource-manager/storage/2023-05-01/skus/client.go +++ b/resource-manager/storage/2023-05-01/skus/client.go @@ -15,7 +15,7 @@ type SkusClient struct { } func NewSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*SkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SkusClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/skus/method_list.go b/resource-manager/storage/2023-05-01/skus/method_list.go index fef91f385c7..a8f7100a248 100644 --- a/resource-manager/storage/2023-05-01/skus/method_list.go +++ b/resource-manager/storage/2023-05-01/skus/method_list.go @@ -47,7 +47,6 @@ func (c SkusClient) List(ctx context.Context, id commonids.SubscriptionId) (resu var model StorageSkuListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/skus/version.go b/resource-manager/storage/2023-05-01/skus/version.go index a773105fcac..fbf7e498613 100644 --- a/resource-manager/storage/2023-05-01/skus/version.go +++ b/resource-manager/storage/2023-05-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/README.md b/resource-manager/storage/2023-05-01/storageaccounts/README.md index bf093ac4e68..45f27ea26ab 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/README.md +++ b/resource-manager/storage/2023-05-01/storageaccounts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccounts` Documentation -The `storageaccounts` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `storageaccounts` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/storageaccounts/client.go b/resource-manager/storage/2023-05-01/storageaccounts/client.go index ea316d84f83..8fad6eedb7e 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/client.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/client.go @@ -15,7 +15,7 @@ type StorageAccountsClient struct { } func NewStorageAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccounts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccounts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_checknameavailability.go b/resource-manager/storage/2023-05-01/storageaccounts/method_checknameavailability.go index e843f48137c..c26dc168508 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_checknameavailability.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) CheckNameAvailability(ctx context.Context, id com var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_failover.go b/resource-manager/storage/2023-05-01/storageaccounts/method_failover.go index 232206ae331..2dacce2190a 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_failover.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_failover.go @@ -37,6 +37,7 @@ func (o FailoverOperationOptions) ToHeaders() *client.Headers { func (o FailoverOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_getproperties.go b/resource-manager/storage/2023-05-01/storageaccounts/method_getproperties.go index 0670e27212f..889e7b6b811 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_getproperties.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_getproperties.go @@ -35,6 +35,7 @@ func (o GetPropertiesOperationOptions) ToHeaders() *client.Headers { func (o GetPropertiesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c StorageAccountsClient) GetProperties(ctx context.Context, id commonids.S var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_hierarchicalnamespacemigration.go b/resource-manager/storage/2023-05-01/storageaccounts/method_hierarchicalnamespacemigration.go index aacd24aa153..645a7ebf72a 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_hierarchicalnamespacemigration.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_hierarchicalnamespacemigration.go @@ -37,6 +37,7 @@ func (o HierarchicalNamespaceMigrationOperationOptions) ToHeaders() *client.Head func (o HierarchicalNamespaceMigrationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_listaccountsas.go b/resource-manager/storage/2023-05-01/storageaccounts/method_listaccountsas.go index 97c0b14e799..8e8d8524427 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_listaccountsas.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_listaccountsas.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) ListAccountSAS(ctx context.Context, id commonids. var model ListAccountSasResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_listkeys.go b/resource-manager/storage/2023-05-01/storageaccounts/method_listkeys.go index 2d73921315f..0c1536ce92e 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_listkeys.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_listkeys.go @@ -35,6 +35,7 @@ func (o ListKeysOperationOptions) ToHeaders() *client.Headers { func (o ListKeysOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c StorageAccountsClient) ListKeys(ctx context.Context, id commonids.Storag var model StorageAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_listservicesas.go b/resource-manager/storage/2023-05-01/storageaccounts/method_listservicesas.go index 4ac7ad0b3af..1381cbd5c33 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_listservicesas.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_listservicesas.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) ListServiceSAS(ctx context.Context, id commonids. var model ListServiceSasResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_regeneratekey.go b/resource-manager/storage/2023-05-01/storageaccounts/method_regeneratekey.go index 7a2b6a97798..fed50b96990 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_regeneratekey.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_regeneratekey.go @@ -51,7 +51,6 @@ func (c StorageAccountsClient) RegenerateKey(ctx context.Context, id commonids.S var model StorageAccountListKeysResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/method_update.go b/resource-manager/storage/2023-05-01/storageaccounts/method_update.go index 0d35afd28b2..7878fcc1eeb 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/method_update.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/method_update.go @@ -50,7 +50,6 @@ func (c StorageAccountsClient) Update(ctx context.Context, id commonids.StorageA var model StorageAccount result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccounts/version.go b/resource-manager/storage/2023-05-01/storageaccounts/version.go index 34d25108e1c..4ee85de82b8 100644 --- a/resource-manager/storage/2023-05-01/storageaccounts/version.go +++ b/resource-manager/storage/2023-05-01/storageaccounts/version.go @@ -1,12 +1,10 @@ package storageaccounts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccounts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccounts/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/README.md b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/README.md index 0ba9be432d1..5842842979f 100644 --- a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/README.md +++ b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations` Documentation -The `storageaccountsnetworksecurityperimeterconfigurations` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `storageaccountsnetworksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/client.go b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/client.go index e57f311010d..e9467bf4876 100644 --- a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/client.go +++ b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/client.go @@ -15,7 +15,7 @@ type StorageAccountsNetworkSecurityPerimeterConfigurationsClient struct { } func NewStorageAccountsNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageAccountsNetworkSecurityPerimeterConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storageaccountsnetworksecurityperimeterconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storageaccountsnetworksecurityperimeterconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageAccountsNetworkSecurityPerimeterConfigurationsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index 51cd42abd99..0f2527708d8 100644 --- a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -44,7 +44,7 @@ func ParseNetworkSecurityPerimeterConfigurationID(input string) (*NetworkSecurit } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkSecurityPerimeterConfigurationIDInsensitively(input string) (*N } id := NetworkSecurityPerimeterConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationsget.go b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationsget.go index 0ad8307a6b8..fba52b3ccab 100644 --- a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationsget.go +++ b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/method_networksecurityperimeterconfigurationsget.go @@ -45,7 +45,6 @@ func (c StorageAccountsNetworkSecurityPerimeterConfigurationsClient) NetworkSecu var model NetworkSecurityPerimeterConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/version.go b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/version.go index 64e053af847..1b4dc137e30 100644 --- a/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/version.go +++ b/resource-manager/storage/2023-05-01/storageaccountsnetworksecurityperimeterconfigurations/version.go @@ -1,12 +1,10 @@ package storageaccountsnetworksecurityperimeterconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storageaccountsnetworksecurityperimeterconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storageaccountsnetworksecurityperimeterconfigurations/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/README.md b/resource-manager/storage/2023-05-01/storagetaskassignments/README.md index d9248f7b7a9..7b3a39816d0 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/README.md +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/storagetaskassignments` Documentation -The `storagetaskassignments` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `storagetaskassignments` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/client.go b/resource-manager/storage/2023-05-01/storagetaskassignments/client.go index 7f948b40560..c67b53ac99e 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/client.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/client.go @@ -15,7 +15,7 @@ type StorageTaskAssignmentsClient struct { } func NewStorageTaskAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageTaskAssignmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagetaskassignments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagetaskassignments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageTaskAssignmentsClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/id_storagetaskassignment.go b/resource-manager/storage/2023-05-01/storagetaskassignments/id_storagetaskassignment.go index 4bada27dd8f..155f757b270 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/id_storagetaskassignment.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/id_storagetaskassignment.go @@ -44,7 +44,7 @@ func ParseStorageTaskAssignmentID(input string) (*StorageTaskAssignmentId, error } id := StorageTaskAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageTaskAssignmentIDInsensitively(input string) (*StorageTaskAssign } id := StorageTaskAssignmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/method_get.go b/resource-manager/storage/2023-05-01/storagetaskassignments/method_get.go index 8b468e65e6b..d9d4d369551 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/method_get.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/method_get.go @@ -45,7 +45,6 @@ func (c StorageTaskAssignmentsClient) Get(ctx context.Context, id StorageTaskAss var model StorageTaskAssignment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/method_instancesreportlist.go b/resource-manager/storage/2023-05-01/storagetaskassignments/method_instancesreportlist.go index 30b6702fcd6..d616d5e00f4 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/method_instancesreportlist.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/method_instancesreportlist.go @@ -41,6 +41,7 @@ func (o InstancesReportListOperationOptions) ToHeaders() *client.Headers { func (o InstancesReportListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/method_list.go b/resource-manager/storage/2023-05-01/storagetaskassignments/method_list.go index cd5eaa88f19..03e4965c86e 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/method_list.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/method_storagetaskassignmentinstancesreportlist.go b/resource-manager/storage/2023-05-01/storagetaskassignments/method_storagetaskassignmentinstancesreportlist.go index aa19a466da9..d14e9911cbe 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/method_storagetaskassignmentinstancesreportlist.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/method_storagetaskassignmentinstancesreportlist.go @@ -40,6 +40,7 @@ func (o StorageTaskAssignmentInstancesReportListOperationOptions) ToHeaders() *c func (o StorageTaskAssignmentInstancesReportListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storage/2023-05-01/storagetaskassignments/version.go b/resource-manager/storage/2023-05-01/storagetaskassignments/version.go index ec88254f46d..e247d0dcf75 100644 --- a/resource-manager/storage/2023-05-01/storagetaskassignments/version.go +++ b/resource-manager/storage/2023-05-01/storagetaskassignments/version.go @@ -1,12 +1,10 @@ package storagetaskassignments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagetaskassignments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagetaskassignments/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/tableservice/README.md b/resource-manager/storage/2023-05-01/tableservice/README.md index b9e18a2179a..9e4dc2b4728 100644 --- a/resource-manager/storage/2023-05-01/tableservice/README.md +++ b/resource-manager/storage/2023-05-01/tableservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/tableservice` Documentation -The `tableservice` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `tableservice` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/tableservice/client.go b/resource-manager/storage/2023-05-01/tableservice/client.go index 03b4e028e98..953b6a4b29e 100644 --- a/resource-manager/storage/2023-05-01/tableservice/client.go +++ b/resource-manager/storage/2023-05-01/tableservice/client.go @@ -15,7 +15,7 @@ type TableServiceClient struct { } func NewTableServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*TableServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tableservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tableservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TableServiceClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/tableservice/id_table.go b/resource-manager/storage/2023-05-01/tableservice/id_table.go index 4603ffec8ff..a8659d94f34 100644 --- a/resource-manager/storage/2023-05-01/tableservice/id_table.go +++ b/resource-manager/storage/2023-05-01/tableservice/id_table.go @@ -44,7 +44,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storage/2023-05-01/tableservice/method_tablecreate.go b/resource-manager/storage/2023-05-01/tableservice/method_tablecreate.go index 9c014b5de22..f2970fc65ab 100644 --- a/resource-manager/storage/2023-05-01/tableservice/method_tablecreate.go +++ b/resource-manager/storage/2023-05-01/tableservice/method_tablecreate.go @@ -49,7 +49,6 @@ func (c TableServiceClient) TableCreate(ctx context.Context, id TableId, input T var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableservice/method_tableget.go b/resource-manager/storage/2023-05-01/tableservice/method_tableget.go index 4db47fcbf28..aef020e4c88 100644 --- a/resource-manager/storage/2023-05-01/tableservice/method_tableget.go +++ b/resource-manager/storage/2023-05-01/tableservice/method_tableget.go @@ -45,7 +45,6 @@ func (c TableServiceClient) TableGet(ctx context.Context, id TableId) (result Ta var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableservice/method_tableupdate.go b/resource-manager/storage/2023-05-01/tableservice/method_tableupdate.go index c92604b27e0..2508510e571 100644 --- a/resource-manager/storage/2023-05-01/tableservice/method_tableupdate.go +++ b/resource-manager/storage/2023-05-01/tableservice/method_tableupdate.go @@ -49,7 +49,6 @@ func (c TableServiceClient) TableUpdate(ctx context.Context, id TableId, input T var model Table result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableservice/version.go b/resource-manager/storage/2023-05-01/tableservice/version.go index 478dfd96335..5127f86d56a 100644 --- a/resource-manager/storage/2023-05-01/tableservice/version.go +++ b/resource-manager/storage/2023-05-01/tableservice/version.go @@ -1,12 +1,10 @@ package tableservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tableservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tableservice/2023-05-01" } diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/README.md b/resource-manager/storage/2023-05-01/tableserviceproperties/README.md index 1d15a99d227..0b9aa9d060c 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/README.md +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storage/2023-05-01/tableserviceproperties` Documentation -The `tableserviceproperties` SDK allows for interaction with the Azure Resource Manager Service `storage` (API Version `2023-05-01`). +The `tableserviceproperties` SDK allows for interaction with Azure Resource Manager `storage` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/client.go b/resource-manager/storage/2023-05-01/tableserviceproperties/client.go index ae0b242ba7c..dcb7653dd46 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/client.go +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/client.go @@ -15,7 +15,7 @@ type TableServicePropertiesClient struct { } func NewTableServicePropertiesClientWithBaseURI(sdkApi sdkEnv.Api) (*TableServicePropertiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tableserviceproperties", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "tableserviceproperties", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TableServicePropertiesClient: %+v", err) } diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicesgetserviceproperties.go b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicesgetserviceproperties.go index 4293264696e..e1a99055459 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicesgetserviceproperties.go +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicesgetserviceproperties.go @@ -47,7 +47,6 @@ func (c TableServicePropertiesClient) TableServicesGetServiceProperties(ctx cont var model TableServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableserviceslist.go b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableserviceslist.go index 138c39b2ca2..613a663b456 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableserviceslist.go +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableserviceslist.go @@ -47,7 +47,6 @@ func (c TableServicePropertiesClient) TableServicesList(ctx context.Context, id var model ListTableServices result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicessetserviceproperties.go b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicessetserviceproperties.go index 4ce4a5db53d..e9e9f143a09 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicessetserviceproperties.go +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/method_tableservicessetserviceproperties.go @@ -51,7 +51,6 @@ func (c TableServicePropertiesClient) TableServicesSetServiceProperties(ctx cont var model TableServiceProperties result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storage/2023-05-01/tableserviceproperties/version.go b/resource-manager/storage/2023-05-01/tableserviceproperties/version.go index b51210667c0..677e31bbb49 100644 --- a/resource-manager/storage/2023-05-01/tableserviceproperties/version.go +++ b/resource-manager/storage/2023-05-01/tableserviceproperties/version.go @@ -1,12 +1,10 @@ package tableserviceproperties -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tableserviceproperties/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/tableserviceproperties/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/README.md b/resource-manager/storagecache/2023-05-01/amlfilesystems/README.md index f65f94c1f1b..8656526773f 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/README.md +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/amlfilesystems` Documentation -The `amlfilesystems` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `amlfilesystems` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/client.go b/resource-manager/storagecache/2023-05-01/amlfilesystems/client.go index a9967587cb4..be5c37e9f25 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/client.go +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/client.go @@ -15,7 +15,7 @@ type AmlFilesystemsClient struct { } func NewAmlFilesystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*AmlFilesystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "amlfilesystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "amlfilesystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AmlFilesystemsClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go b/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go index 79bc2d6e34a..aee8cf1959c 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/id_amlfilesystem.go @@ -42,7 +42,7 @@ func ParseAmlFilesystemID(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAmlFilesystemIDInsensitively(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/method_get.go b/resource-manager/storagecache/2023-05-01/amlfilesystems/method_get.go index 345b54c274b..043972d89b6 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/method_get.go +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/method_get.go @@ -45,7 +45,6 @@ func (c AmlFilesystemsClient) Get(ctx context.Context, id AmlFilesystemId) (resu var model AmlFilesystem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/method_getrequiredamlfssubnetssize.go b/resource-manager/storagecache/2023-05-01/amlfilesystems/method_getrequiredamlfssubnetssize.go index c9447ea07a4..6a0580a6ae9 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/method_getrequiredamlfssubnetssize.go +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/method_getrequiredamlfssubnetssize.go @@ -51,7 +51,6 @@ func (c AmlFilesystemsClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, i var model RequiredAmlFilesystemSubnetsSize result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2023-05-01/amlfilesystems/version.go b/resource-manager/storagecache/2023-05-01/amlfilesystems/version.go index 365cdbd59bc..b2e514a3017 100644 --- a/resource-manager/storagecache/2023-05-01/amlfilesystems/version.go +++ b/resource-manager/storagecache/2023-05-01/amlfilesystems/version.go @@ -1,12 +1,10 @@ package amlfilesystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/amlfilesystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/amlfilesystems/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/ascusages/README.md b/resource-manager/storagecache/2023-05-01/ascusages/README.md index 3084bd163f5..8fa4d0d8712 100644 --- a/resource-manager/storagecache/2023-05-01/ascusages/README.md +++ b/resource-manager/storagecache/2023-05-01/ascusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/ascusages` Documentation -The `ascusages` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `ascusages` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/ascusages/client.go b/resource-manager/storagecache/2023-05-01/ascusages/client.go index b1d28a89834..110522a8bbf 100644 --- a/resource-manager/storagecache/2023-05-01/ascusages/client.go +++ b/resource-manager/storagecache/2023-05-01/ascusages/client.go @@ -15,7 +15,7 @@ type AscUsagesClient struct { } func NewAscUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*AscUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ascusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ascusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AscUsagesClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/ascusages/id_location.go b/resource-manager/storagecache/2023-05-01/ascusages/id_location.go index 96db2d03aee..3c00148ae08 100644 --- a/resource-manager/storagecache/2023-05-01/ascusages/id_location.go +++ b/resource-manager/storagecache/2023-05-01/ascusages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2023-05-01/ascusages/version.go b/resource-manager/storagecache/2023-05-01/ascusages/version.go index 09de6bfd1c7..7e8df087e10 100644 --- a/resource-manager/storagecache/2023-05-01/ascusages/version.go +++ b/resource-manager/storagecache/2023-05-01/ascusages/version.go @@ -1,12 +1,10 @@ package ascusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ascusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ascusages/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/caches/README.md b/resource-manager/storagecache/2023-05-01/caches/README.md index 95e060eed94..3ee7ed48dee 100644 --- a/resource-manager/storagecache/2023-05-01/caches/README.md +++ b/resource-manager/storagecache/2023-05-01/caches/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/caches` Documentation -The `caches` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `caches` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/caches/client.go b/resource-manager/storagecache/2023-05-01/caches/client.go index 0502f89bac3..76c49d24efe 100644 --- a/resource-manager/storagecache/2023-05-01/caches/client.go +++ b/resource-manager/storagecache/2023-05-01/caches/client.go @@ -15,7 +15,7 @@ type CachesClient struct { } func NewCachesClientWithBaseURI(sdkApi sdkEnv.Api) (*CachesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "caches", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "caches", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CachesClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/caches/id_cache.go b/resource-manager/storagecache/2023-05-01/caches/id_cache.go index 0ded0974f33..9ecd1540aa3 100644 --- a/resource-manager/storagecache/2023-05-01/caches/id_cache.go +++ b/resource-manager/storagecache/2023-05-01/caches/id_cache.go @@ -42,7 +42,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2023-05-01/caches/method_get.go b/resource-manager/storagecache/2023-05-01/caches/method_get.go index 189a309780c..ad6f21bc8c9 100644 --- a/resource-manager/storagecache/2023-05-01/caches/method_get.go +++ b/resource-manager/storagecache/2023-05-01/caches/method_get.go @@ -45,7 +45,6 @@ func (c CachesClient) Get(ctx context.Context, id CacheId) (result GetOperationR var model Cache result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2023-05-01/caches/version.go b/resource-manager/storagecache/2023-05-01/caches/version.go index 624dbabb7ba..38fb691955a 100644 --- a/resource-manager/storagecache/2023-05-01/caches/version.go +++ b/resource-manager/storagecache/2023-05-01/caches/version.go @@ -1,12 +1,10 @@ package caches -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/caches/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/caches/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/skus/README.md b/resource-manager/storagecache/2023-05-01/skus/README.md index 83f7399336f..cb34530f001 100644 --- a/resource-manager/storagecache/2023-05-01/skus/README.md +++ b/resource-manager/storagecache/2023-05-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/skus/client.go b/resource-manager/storagecache/2023-05-01/skus/client.go index d2fbc1d3af0..0a133f4bbca 100644 --- a/resource-manager/storagecache/2023-05-01/skus/client.go +++ b/resource-manager/storagecache/2023-05-01/skus/client.go @@ -15,7 +15,7 @@ type SKUsClient struct { } func NewSKUsClientWithBaseURI(sdkApi sdkEnv.Api) (*SKUsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SKUsClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/skus/version.go b/resource-manager/storagecache/2023-05-01/skus/version.go index a773105fcac..fbf7e498613 100644 --- a/resource-manager/storagecache/2023-05-01/skus/version.go +++ b/resource-manager/storagecache/2023-05-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/README.md b/resource-manager/storagecache/2023-05-01/storagetargets/README.md index 21f4d78cc31..4d77109ad6d 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/README.md +++ b/resource-manager/storagecache/2023-05-01/storagetargets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/storagetargets` Documentation -The `storagetargets` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `storagetargets` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/client.go b/resource-manager/storagecache/2023-05-01/storagetargets/client.go index 06219399bc4..256f84013a8 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/client.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/client.go @@ -15,7 +15,7 @@ type StorageTargetsClient struct { } func NewStorageTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageTargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagetargets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagetargets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageTargetsClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go b/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go index 58ed3d8eda6..d66d17f7315 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/id_cache.go @@ -42,7 +42,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go b/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go index a7fa0e89afc..240921ff9d0 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/id_storagetarget.go @@ -44,7 +44,7 @@ func ParseStorageTargetID(input string) (*StorageTargetId, error) { } id := StorageTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageTargetIDInsensitively(input string) (*StorageTargetId, error) { } id := StorageTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/method_delete.go b/resource-manager/storagecache/2023-05-01/storagetargets/method_delete.go index efd1a49d34b..987aa8114eb 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/method_delete.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/method_get.go b/resource-manager/storagecache/2023-05-01/storagetargets/method_get.go index c96eec97823..492cfcf6923 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/method_get.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/method_get.go @@ -45,7 +45,6 @@ func (c StorageTargetsClient) Get(ctx context.Context, id StorageTargetId) (resu var model StorageTarget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2023-05-01/storagetargets/version.go b/resource-manager/storagecache/2023-05-01/storagetargets/version.go index fc23780879f..11fdd8ec909 100644 --- a/resource-manager/storagecache/2023-05-01/storagetargets/version.go +++ b/resource-manager/storagecache/2023-05-01/storagetargets/version.go @@ -1,12 +1,10 @@ package storagetargets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagetargets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagetargets/2023-05-01" } diff --git a/resource-manager/storagecache/2023-05-01/usagemodels/README.md b/resource-manager/storagecache/2023-05-01/usagemodels/README.md index 282e0524289..83bc7b75280 100644 --- a/resource-manager/storagecache/2023-05-01/usagemodels/README.md +++ b/resource-manager/storagecache/2023-05-01/usagemodels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2023-05-01/usagemodels` Documentation -The `usagemodels` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2023-05-01`). +The `usagemodels` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2023-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2023-05-01/usagemodels/client.go b/resource-manager/storagecache/2023-05-01/usagemodels/client.go index 1755ed55724..2954bb3a6a3 100644 --- a/resource-manager/storagecache/2023-05-01/usagemodels/client.go +++ b/resource-manager/storagecache/2023-05-01/usagemodels/client.go @@ -15,7 +15,7 @@ type UsageModelsClient struct { } func NewUsageModelsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageModelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagemodels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagemodels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageModelsClient: %+v", err) } diff --git a/resource-manager/storagecache/2023-05-01/usagemodels/version.go b/resource-manager/storagecache/2023-05-01/usagemodels/version.go index 609fb98d587..118ac7751c1 100644 --- a/resource-manager/storagecache/2023-05-01/usagemodels/version.go +++ b/resource-manager/storagecache/2023-05-01/usagemodels/version.go @@ -1,12 +1,10 @@ package usagemodels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagemodels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagemodels/2023-05-01" } diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/README.md b/resource-manager/storagecache/2024-03-01/amlfilesystems/README.md index ed8c16446be..c119d05e57e 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/README.md +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/amlfilesystems` Documentation -The `amlfilesystems` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `amlfilesystems` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/client.go b/resource-manager/storagecache/2024-03-01/amlfilesystems/client.go index a9967587cb4..be5c37e9f25 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/client.go +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/client.go @@ -15,7 +15,7 @@ type AmlFilesystemsClient struct { } func NewAmlFilesystemsClientWithBaseURI(sdkApi sdkEnv.Api) (*AmlFilesystemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "amlfilesystems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "amlfilesystems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AmlFilesystemsClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/id_amlfilesystem.go b/resource-manager/storagecache/2024-03-01/amlfilesystems/id_amlfilesystem.go index 79bc2d6e34a..aee8cf1959c 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/id_amlfilesystem.go +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/id_amlfilesystem.go @@ -42,7 +42,7 @@ func ParseAmlFilesystemID(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAmlFilesystemIDInsensitively(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/method_get.go b/resource-manager/storagecache/2024-03-01/amlfilesystems/method_get.go index 345b54c274b..043972d89b6 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/method_get.go +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/method_get.go @@ -45,7 +45,6 @@ func (c AmlFilesystemsClient) Get(ctx context.Context, id AmlFilesystemId) (resu var model AmlFilesystem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/method_getrequiredamlfssubnetssize.go b/resource-manager/storagecache/2024-03-01/amlfilesystems/method_getrequiredamlfssubnetssize.go index c9447ea07a4..6a0580a6ae9 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/method_getrequiredamlfssubnetssize.go +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/method_getrequiredamlfssubnetssize.go @@ -51,7 +51,6 @@ func (c AmlFilesystemsClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, i var model RequiredAmlFilesystemSubnetsSize result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2024-03-01/amlfilesystems/version.go b/resource-manager/storagecache/2024-03-01/amlfilesystems/version.go index 29fcec0d9a0..045b758f02f 100644 --- a/resource-manager/storagecache/2024-03-01/amlfilesystems/version.go +++ b/resource-manager/storagecache/2024-03-01/amlfilesystems/version.go @@ -1,12 +1,10 @@ package amlfilesystems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/amlfilesystems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/amlfilesystems/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/ascusages/README.md b/resource-manager/storagecache/2024-03-01/ascusages/README.md index 16a3838c444..403f61cb13c 100644 --- a/resource-manager/storagecache/2024-03-01/ascusages/README.md +++ b/resource-manager/storagecache/2024-03-01/ascusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/ascusages` Documentation -The `ascusages` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `ascusages` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/ascusages/client.go b/resource-manager/storagecache/2024-03-01/ascusages/client.go index b1d28a89834..110522a8bbf 100644 --- a/resource-manager/storagecache/2024-03-01/ascusages/client.go +++ b/resource-manager/storagecache/2024-03-01/ascusages/client.go @@ -15,7 +15,7 @@ type AscUsagesClient struct { } func NewAscUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*AscUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ascusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ascusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AscUsagesClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/ascusages/id_location.go b/resource-manager/storagecache/2024-03-01/ascusages/id_location.go index 96db2d03aee..3c00148ae08 100644 --- a/resource-manager/storagecache/2024-03-01/ascusages/id_location.go +++ b/resource-manager/storagecache/2024-03-01/ascusages/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/ascusages/version.go b/resource-manager/storagecache/2024-03-01/ascusages/version.go index 5e1e0c3f539..b8046c54e52 100644 --- a/resource-manager/storagecache/2024-03-01/ascusages/version.go +++ b/resource-manager/storagecache/2024-03-01/ascusages/version.go @@ -1,12 +1,10 @@ package ascusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ascusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ascusages/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/caches/README.md b/resource-manager/storagecache/2024-03-01/caches/README.md index 8778e845bf5..f1eb2b7a73d 100644 --- a/resource-manager/storagecache/2024-03-01/caches/README.md +++ b/resource-manager/storagecache/2024-03-01/caches/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/caches` Documentation -The `caches` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `caches` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/caches/client.go b/resource-manager/storagecache/2024-03-01/caches/client.go index 0502f89bac3..76c49d24efe 100644 --- a/resource-manager/storagecache/2024-03-01/caches/client.go +++ b/resource-manager/storagecache/2024-03-01/caches/client.go @@ -15,7 +15,7 @@ type CachesClient struct { } func NewCachesClientWithBaseURI(sdkApi sdkEnv.Api) (*CachesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "caches", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "caches", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CachesClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/caches/id_cache.go b/resource-manager/storagecache/2024-03-01/caches/id_cache.go index 0ded0974f33..9ecd1540aa3 100644 --- a/resource-manager/storagecache/2024-03-01/caches/id_cache.go +++ b/resource-manager/storagecache/2024-03-01/caches/id_cache.go @@ -42,7 +42,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/caches/method_get.go b/resource-manager/storagecache/2024-03-01/caches/method_get.go index 189a309780c..ad6f21bc8c9 100644 --- a/resource-manager/storagecache/2024-03-01/caches/method_get.go +++ b/resource-manager/storagecache/2024-03-01/caches/method_get.go @@ -45,7 +45,6 @@ func (c CachesClient) Get(ctx context.Context, id CacheId) (result GetOperationR var model Cache result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2024-03-01/caches/version.go b/resource-manager/storagecache/2024-03-01/caches/version.go index 89c8ed97b46..4c46614e298 100644 --- a/resource-manager/storagecache/2024-03-01/caches/version.go +++ b/resource-manager/storagecache/2024-03-01/caches/version.go @@ -1,12 +1,10 @@ package caches -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/caches/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/caches/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/importjobs/README.md b/resource-manager/storagecache/2024-03-01/importjobs/README.md index 1e6198a71d2..90ea6ad0916 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/README.md +++ b/resource-manager/storagecache/2024-03-01/importjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/importjobs` Documentation -The `importjobs` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `importjobs` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/importjobs/client.go b/resource-manager/storagecache/2024-03-01/importjobs/client.go index 9cb987076a1..d3fdac2c434 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/client.go +++ b/resource-manager/storagecache/2024-03-01/importjobs/client.go @@ -15,7 +15,7 @@ type ImportJobsClient struct { } func NewImportJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImportJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "importjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "importjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ImportJobsClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/importjobs/id_amlfilesystem.go b/resource-manager/storagecache/2024-03-01/importjobs/id_amlfilesystem.go index 6be9e672b8a..22695b9577a 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/id_amlfilesystem.go +++ b/resource-manager/storagecache/2024-03-01/importjobs/id_amlfilesystem.go @@ -42,7 +42,7 @@ func ParseAmlFilesystemID(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAmlFilesystemIDInsensitively(input string) (*AmlFilesystemId, error) { } id := AmlFilesystemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/importjobs/id_importjob.go b/resource-manager/storagecache/2024-03-01/importjobs/id_importjob.go index 7f3d3576a73..b17280ee7a7 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/id_importjob.go +++ b/resource-manager/storagecache/2024-03-01/importjobs/id_importjob.go @@ -44,7 +44,7 @@ func ParseImportJobID(input string) (*ImportJobId, error) { } id := ImportJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseImportJobIDInsensitively(input string) (*ImportJobId, error) { } id := ImportJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/importjobs/method_get.go b/resource-manager/storagecache/2024-03-01/importjobs/method_get.go index e6a200b98cf..0fbcd09e7a6 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/method_get.go +++ b/resource-manager/storagecache/2024-03-01/importjobs/method_get.go @@ -45,7 +45,6 @@ func (c ImportJobsClient) Get(ctx context.Context, id ImportJobId) (result GetOp var model ImportJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2024-03-01/importjobs/version.go b/resource-manager/storagecache/2024-03-01/importjobs/version.go index c8e4e5eb790..f68c0258a40 100644 --- a/resource-manager/storagecache/2024-03-01/importjobs/version.go +++ b/resource-manager/storagecache/2024-03-01/importjobs/version.go @@ -1,12 +1,10 @@ package importjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/importjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/importjobs/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/skus/README.md b/resource-manager/storagecache/2024-03-01/skus/README.md index 9dcc6dad053..9ba257f55a4 100644 --- a/resource-manager/storagecache/2024-03-01/skus/README.md +++ b/resource-manager/storagecache/2024-03-01/skus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/skus` Documentation -The `skus` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `skus` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/skus/client.go b/resource-manager/storagecache/2024-03-01/skus/client.go index d2fbc1d3af0..0a133f4bbca 100644 --- a/resource-manager/storagecache/2024-03-01/skus/client.go +++ b/resource-manager/storagecache/2024-03-01/skus/client.go @@ -15,7 +15,7 @@ type SKUsClient struct { } func NewSKUsClientWithBaseURI(sdkApi sdkEnv.Api) (*SKUsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "skus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "skus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SKUsClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/skus/version.go b/resource-manager/storagecache/2024-03-01/skus/version.go index 6e61f75cb9f..191099ee9c4 100644 --- a/resource-manager/storagecache/2024-03-01/skus/version.go +++ b/resource-manager/storagecache/2024-03-01/skus/version.go @@ -1,12 +1,10 @@ package skus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/skus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/skus/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/README.md b/resource-manager/storagecache/2024-03-01/storagetargets/README.md index 306567f45af..bcec574b0d3 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/README.md +++ b/resource-manager/storagecache/2024-03-01/storagetargets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/storagetargets` Documentation -The `storagetargets` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `storagetargets` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/client.go b/resource-manager/storagecache/2024-03-01/storagetargets/client.go index 06219399bc4..256f84013a8 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/client.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/client.go @@ -15,7 +15,7 @@ type StorageTargetsClient struct { } func NewStorageTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageTargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagetargets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagetargets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageTargetsClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/id_cache.go b/resource-manager/storagecache/2024-03-01/storagetargets/id_cache.go index 58ed3d8eda6..d66d17f7315 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/id_cache.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/id_cache.go @@ -42,7 +42,7 @@ func ParseCacheID(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCacheIDInsensitively(input string) (*CacheId, error) { } id := CacheId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/id_storagetarget.go b/resource-manager/storagecache/2024-03-01/storagetargets/id_storagetarget.go index a7fa0e89afc..240921ff9d0 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/id_storagetarget.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/id_storagetarget.go @@ -44,7 +44,7 @@ func ParseStorageTargetID(input string) (*StorageTargetId, error) { } id := StorageTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStorageTargetIDInsensitively(input string) (*StorageTargetId, error) { } id := StorageTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/method_delete.go b/resource-manager/storagecache/2024-03-01/storagetargets/method_delete.go index efd1a49d34b..987aa8114eb 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/method_delete.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/method_get.go b/resource-manager/storagecache/2024-03-01/storagetargets/method_get.go index c96eec97823..492cfcf6923 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/method_get.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/method_get.go @@ -45,7 +45,6 @@ func (c StorageTargetsClient) Get(ctx context.Context, id StorageTargetId) (resu var model StorageTarget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagecache/2024-03-01/storagetargets/version.go b/resource-manager/storagecache/2024-03-01/storagetargets/version.go index 370c39c735b..5d5852bf993 100644 --- a/resource-manager/storagecache/2024-03-01/storagetargets/version.go +++ b/resource-manager/storagecache/2024-03-01/storagetargets/version.go @@ -1,12 +1,10 @@ package storagetargets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagetargets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagetargets/2024-03-01" } diff --git a/resource-manager/storagecache/2024-03-01/usagemodels/README.md b/resource-manager/storagecache/2024-03-01/usagemodels/README.md index a262760b1f9..793f3653eeb 100644 --- a/resource-manager/storagecache/2024-03-01/usagemodels/README.md +++ b/resource-manager/storagecache/2024-03-01/usagemodels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/usagemodels` Documentation -The `usagemodels` SDK allows for interaction with the Azure Resource Manager Service `storagecache` (API Version `2024-03-01`). +The `usagemodels` SDK allows for interaction with Azure Resource Manager `storagecache` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagecache/2024-03-01/usagemodels/client.go b/resource-manager/storagecache/2024-03-01/usagemodels/client.go index 1755ed55724..2954bb3a6a3 100644 --- a/resource-manager/storagecache/2024-03-01/usagemodels/client.go +++ b/resource-manager/storagecache/2024-03-01/usagemodels/client.go @@ -15,7 +15,7 @@ type UsageModelsClient struct { } func NewUsageModelsClientWithBaseURI(sdkApi sdkEnv.Api) (*UsageModelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "usagemodels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "usagemodels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating UsageModelsClient: %+v", err) } diff --git a/resource-manager/storagecache/2024-03-01/usagemodels/version.go b/resource-manager/storagecache/2024-03-01/usagemodels/version.go index 77bb1b4a5a3..541eb06daa4 100644 --- a/resource-manager/storagecache/2024-03-01/usagemodels/version.go +++ b/resource-manager/storagecache/2024-03-01/usagemodels/version.go @@ -1,12 +1,10 @@ package usagemodels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usagemodels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/usagemodels/2024-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/agents/README.md b/resource-manager/storagemover/2023-03-01/agents/README.md index cd62e7c1955..9fdafd02623 100644 --- a/resource-manager/storagemover/2023-03-01/agents/README.md +++ b/resource-manager/storagemover/2023-03-01/agents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/agents` Documentation -The `agents` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `agents` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/agents/client.go b/resource-manager/storagemover/2023-03-01/agents/client.go index 254beaaa1f0..a61cb38143c 100644 --- a/resource-manager/storagemover/2023-03-01/agents/client.go +++ b/resource-manager/storagemover/2023-03-01/agents/client.go @@ -15,7 +15,7 @@ type AgentsClient struct { } func NewAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/agents/id_agent.go b/resource-manager/storagemover/2023-03-01/agents/id_agent.go index 14d3ecd63f6..e7e0c256747 100644 --- a/resource-manager/storagemover/2023-03-01/agents/id_agent.go +++ b/resource-manager/storagemover/2023-03-01/agents/id_agent.go @@ -44,7 +44,7 @@ func ParseAgentID(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentIDInsensitively(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go b/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go index ee1fcd76358..81a14bae6af 100644 --- a/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go +++ b/resource-manager/storagemover/2023-03-01/agents/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/agents/method_createorupdate.go b/resource-manager/storagemover/2023-03-01/agents/method_createorupdate.go index 478a1373c45..445cf73d597 100644 --- a/resource-manager/storagemover/2023-03-01/agents/method_createorupdate.go +++ b/resource-manager/storagemover/2023-03-01/agents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c AgentsClient) CreateOrUpdate(ctx context.Context, id AgentId, input Agen var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/agents/method_get.go b/resource-manager/storagemover/2023-03-01/agents/method_get.go index afbf184b539..36caeb9d18e 100644 --- a/resource-manager/storagemover/2023-03-01/agents/method_get.go +++ b/resource-manager/storagemover/2023-03-01/agents/method_get.go @@ -45,7 +45,6 @@ func (c AgentsClient) Get(ctx context.Context, id AgentId) (result GetOperationR var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/agents/method_update.go b/resource-manager/storagemover/2023-03-01/agents/method_update.go index f55ad6d3678..89368848db1 100644 --- a/resource-manager/storagemover/2023-03-01/agents/method_update.go +++ b/resource-manager/storagemover/2023-03-01/agents/method_update.go @@ -49,7 +49,6 @@ func (c AgentsClient) Update(ctx context.Context, id AgentId, input AgentUpdateP var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/agents/version.go b/resource-manager/storagemover/2023-03-01/agents/version.go index 9181413d185..63a287f4e08 100644 --- a/resource-manager/storagemover/2023-03-01/agents/version.go +++ b/resource-manager/storagemover/2023-03-01/agents/version.go @@ -1,12 +1,10 @@ package agents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agents/2023-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/README.md b/resource-manager/storagemover/2023-03-01/endpoints/README.md index 50f43b91e98..6c3ef900a3e 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/README.md +++ b/resource-manager/storagemover/2023-03-01/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/endpoints/client.go b/resource-manager/storagemover/2023-03-01/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/client.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go b/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go index 22e0301b989..c1a59532bff 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/id_endpoint.go @@ -44,7 +44,7 @@ func ParseEndpointID(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go b/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go index a873b8a0122..c0bc7440c08 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/method_createorupdate.go b/resource-manager/storagemover/2023-03-01/endpoints/method_createorupdate.go index a1f0e15bfe7..92fc7fede17 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/method_createorupdate.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointId, inpu var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/method_get.go b/resource-manager/storagemover/2023-03-01/endpoints/method_get.go index d0d322403d0..b81e42bd7da 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/method_get.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/method_get.go @@ -45,7 +45,6 @@ func (c EndpointsClient) Get(ctx context.Context, id EndpointId) (result GetOper var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/method_update.go b/resource-manager/storagemover/2023-03-01/endpoints/method_update.go index 4cf1d8184f8..6d19a26f790 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/method_update.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/method_update.go @@ -49,7 +49,6 @@ func (c EndpointsClient) Update(ctx context.Context, id EndpointId, input Endpoi var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/model_azurestorageblobcontainerendpointproperties.go b/resource-manager/storagemover/2023-03-01/endpoints/model_azurestorageblobcontainerendpointproperties.go index 3a655d2725d..57295e3ee83 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/model_azurestorageblobcontainerendpointproperties.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/model_azurestorageblobcontainerendpointproperties.go @@ -15,10 +15,20 @@ type AzureStorageBlobContainerEndpointProperties struct { StorageAccountResourceId string `json:"storageAccountResourceId"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s AzureStorageBlobContainerEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureStorageBlobContainerEndpointProperties{} func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageBlobContainerEndpointProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageBlobContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-03-01/endpoints/model_endpoint.go b/resource-manager/storagemover/2023-03-01/endpoints/model_endpoint.go index 5f30fb5dd53..85d4ebdc6d8 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/model_endpoint.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/model_endpoint.go @@ -38,7 +38,7 @@ func (s *Endpoint) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalEndpointBasePropertiesImplementation(v) + impl, err := UnmarshalEndpointBasePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Endpoint': %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/model_endpointbaseproperties.go b/resource-manager/storagemover/2023-03-01/endpoints/model_endpointbaseproperties.go index 211401ab815..0622b22d05d 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/model_endpointbaseproperties.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/model_endpointbaseproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointBaseProperties interface { + EndpointBaseProperties() BaseEndpointBasePropertiesImpl } -// RawEndpointBasePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EndpointBaseProperties = BaseEndpointBasePropertiesImpl{} + +type BaseEndpointBasePropertiesImpl struct { + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s +} + +var _ EndpointBaseProperties = RawEndpointBasePropertiesImpl{} + +// RawEndpointBasePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEndpointBasePropertiesImpl struct { - Type string - Values map[string]interface{} + endpointBaseProperties BaseEndpointBasePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s.endpointBaseProperties } -func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { +func UnmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBasePr return out, nil } - out := RawEndpointBasePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseEndpointBasePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEndpointBasePropertiesImpl: %+v", err) } - return out, nil + + return RawEndpointBasePropertiesImpl{ + endpointBaseProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2023-03-01/endpoints/model_nfsmountendpointproperties.go b/resource-manager/storagemover/2023-03-01/endpoints/model_nfsmountendpointproperties.go index d8631f3caf2..8f95e9503d6 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/model_nfsmountendpointproperties.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/model_nfsmountendpointproperties.go @@ -16,10 +16,20 @@ type NfsMountEndpointProperties struct { NfsVersion *NfsVersion `json:"nfsVersion,omitempty"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s NfsMountEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = NfsMountEndpointProperties{} func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NfsMountEndpointProperties: %+v", err) } + decoded["endpointType"] = "NfsMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-03-01/endpoints/version.go b/resource-manager/storagemover/2023-03-01/endpoints/version.go index 4a86d747ef8..c425ac8bce1 100644 --- a/resource-manager/storagemover/2023-03-01/endpoints/version.go +++ b/resource-manager/storagemover/2023-03-01/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2023-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/README.md b/resource-manager/storagemover/2023-03-01/jobdefinitions/README.md index 533f765ce8f..b76ef6507ec 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/README.md +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobdefinitions` Documentation -The `jobdefinitions` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `jobdefinitions` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/client.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/client.go index 4e6d06c8433..8c25cd5af60 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/client.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/client.go @@ -15,7 +15,7 @@ type JobDefinitionsClient struct { } func NewJobDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobDefinitionsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go index d5625dff2dc..f09e1cc28e3 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go index 8726b737c47..ca8afd1a89f 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_createorupdate.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_createorupdate.go index dde487ce89d..90bd643a87b 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_createorupdate.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) CreateOrUpdate(ctx context.Context, id JobDefiniti var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_get.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_get.go index 0327bb98aa0..2a727ebb205 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_get.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c JobDefinitionsClient) Get(ctx context.Context, id JobDefinitionId) (resu var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_startjob.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_startjob.go index 9a565e0fb4e..26fa7ef42d2 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_startjob.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_startjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StartJob(ctx context.Context, id JobDefinitionId) var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_stopjob.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_stopjob.go index 73dcd00fa61..635ea650d96 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_stopjob.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_stopjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StopJob(ctx context.Context, id JobDefinitionId) ( var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_update.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_update.go index 387e8a2e770..67633d28211 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/method_update.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/method_update.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) Update(ctx context.Context, id JobDefinitionId, in var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobdefinitions/version.go b/resource-manager/storagemover/2023-03-01/jobdefinitions/version.go index b631aa2d405..05d5ed5835c 100644 --- a/resource-manager/storagemover/2023-03-01/jobdefinitions/version.go +++ b/resource-manager/storagemover/2023-03-01/jobdefinitions/version.go @@ -1,12 +1,10 @@ package jobdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdefinitions/2023-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/jobruns/README.md b/resource-manager/storagemover/2023-03-01/jobruns/README.md index 532d6b4ab3c..d191d1c7cc0 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/README.md +++ b/resource-manager/storagemover/2023-03-01/jobruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobruns` Documentation -The `jobruns` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `jobruns` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/jobruns/client.go b/resource-manager/storagemover/2023-03-01/jobruns/client.go index 7362d9fa5ee..5734dfbaaa0 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/client.go +++ b/resource-manager/storagemover/2023-03-01/jobruns/client.go @@ -15,7 +15,7 @@ type JobRunsClient struct { } func NewJobRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobRunsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/jobruns/id_jobdefinition.go b/resource-manager/storagemover/2023-03-01/jobruns/id_jobdefinition.go index fc3ccd5eb2c..ac698b0c94d 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/id_jobdefinition.go +++ b/resource-manager/storagemover/2023-03-01/jobruns/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/jobruns/id_jobrun.go b/resource-manager/storagemover/2023-03-01/jobruns/id_jobrun.go index 5a77c416e88..2a404838f3c 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/id_jobrun.go +++ b/resource-manager/storagemover/2023-03-01/jobruns/id_jobrun.go @@ -48,7 +48,7 @@ func ParseJobRunID(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseJobRunIDInsensitively(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/jobruns/method_get.go b/resource-manager/storagemover/2023-03-01/jobruns/method_get.go index f5162c1963c..1535611541a 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/method_get.go +++ b/resource-manager/storagemover/2023-03-01/jobruns/method_get.go @@ -45,7 +45,6 @@ func (c JobRunsClient) Get(ctx context.Context, id JobRunId) (result GetOperatio var model JobRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/jobruns/version.go b/resource-manager/storagemover/2023-03-01/jobruns/version.go index 8c8a8292c11..24e2cd63a5c 100644 --- a/resource-manager/storagemover/2023-03-01/jobruns/version.go +++ b/resource-manager/storagemover/2023-03-01/jobruns/version.go @@ -1,12 +1,10 @@ package jobruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobruns/2023-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/projects/README.md b/resource-manager/storagemover/2023-03-01/projects/README.md index 3e28ba82de0..8a14d9aa63c 100644 --- a/resource-manager/storagemover/2023-03-01/projects/README.md +++ b/resource-manager/storagemover/2023-03-01/projects/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/projects` Documentation -The `projects` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `projects` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/projects/client.go b/resource-manager/storagemover/2023-03-01/projects/client.go index f862a93697c..78ad23b0856 100644 --- a/resource-manager/storagemover/2023-03-01/projects/client.go +++ b/resource-manager/storagemover/2023-03-01/projects/client.go @@ -15,7 +15,7 @@ type ProjectsClient struct { } func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projects", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projects", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/projects/id_project.go b/resource-manager/storagemover/2023-03-01/projects/id_project.go index 49bb0c8603b..5e0e4c532b3 100644 --- a/resource-manager/storagemover/2023-03-01/projects/id_project.go +++ b/resource-manager/storagemover/2023-03-01/projects/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go b/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go index ed115952d8c..9c876b57ef5 100644 --- a/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go +++ b/resource-manager/storagemover/2023-03-01/projects/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/projects/method_createorupdate.go b/resource-manager/storagemover/2023-03-01/projects/method_createorupdate.go index c763c860037..0aee10b7109 100644 --- a/resource-manager/storagemover/2023-03-01/projects/method_createorupdate.go +++ b/resource-manager/storagemover/2023-03-01/projects/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ProjectsClient) CreateOrUpdate(ctx context.Context, id ProjectId, input var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/projects/method_get.go b/resource-manager/storagemover/2023-03-01/projects/method_get.go index b37e667ef3d..98e1f02f188 100644 --- a/resource-manager/storagemover/2023-03-01/projects/method_get.go +++ b/resource-manager/storagemover/2023-03-01/projects/method_get.go @@ -45,7 +45,6 @@ func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperat var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/projects/method_update.go b/resource-manager/storagemover/2023-03-01/projects/method_update.go index a1f2fd6ad09..b99452439f2 100644 --- a/resource-manager/storagemover/2023-03-01/projects/method_update.go +++ b/resource-manager/storagemover/2023-03-01/projects/method_update.go @@ -49,7 +49,6 @@ func (c ProjectsClient) Update(ctx context.Context, id ProjectId, input ProjectU var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/projects/version.go b/resource-manager/storagemover/2023-03-01/projects/version.go index e56f0693d3e..4da5fa6b1ba 100644 --- a/resource-manager/storagemover/2023-03-01/projects/version.go +++ b/resource-manager/storagemover/2023-03-01/projects/version.go @@ -1,12 +1,10 @@ package projects -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projects/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projects/2023-03-01" } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/README.md b/resource-manager/storagemover/2023-03-01/storagemovers/README.md index 9dfd009614d..621d0f66e43 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/README.md +++ b/resource-manager/storagemover/2023-03-01/storagemovers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/storagemovers` Documentation -The `storagemovers` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-03-01`). +The `storagemovers` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/client.go b/resource-manager/storagemover/2023-03-01/storagemovers/client.go index 6dcabe53e93..74f29bdf07b 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/client.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/client.go @@ -15,7 +15,7 @@ type StorageMoversClient struct { } func NewStorageMoversClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageMoversClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagemovers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagemovers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageMoversClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go b/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go index f8397bed89a..7683b65ac5a 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/method_createorupdate.go b/resource-manager/storagemover/2023-03-01/storagemovers/method_createorupdate.go index 0dc3b557a9d..5677fa57e8d 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/method_createorupdate.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) CreateOrUpdate(ctx context.Context, id StorageMover var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/method_get.go b/resource-manager/storagemover/2023-03-01/storagemovers/method_get.go index a0277aad7ff..deb7aec635f 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/method_get.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/method_get.go @@ -45,7 +45,6 @@ func (c StorageMoversClient) Get(ctx context.Context, id StorageMoverId) (result var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/method_update.go b/resource-manager/storagemover/2023-03-01/storagemovers/method_update.go index 849c8b7148e..673f20f52f7 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/method_update.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/method_update.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) Update(ctx context.Context, id StorageMoverId, inpu var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-03-01/storagemovers/version.go b/resource-manager/storagemover/2023-03-01/storagemovers/version.go index c8a8ab7d2ae..621be8f606c 100644 --- a/resource-manager/storagemover/2023-03-01/storagemovers/version.go +++ b/resource-manager/storagemover/2023-03-01/storagemovers/version.go @@ -1,12 +1,10 @@ package storagemovers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagemovers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagemovers/2023-03-01" } diff --git a/resource-manager/storagemover/2023-10-01/agents/README.md b/resource-manager/storagemover/2023-10-01/agents/README.md index 72cec799796..47f17bf7826 100644 --- a/resource-manager/storagemover/2023-10-01/agents/README.md +++ b/resource-manager/storagemover/2023-10-01/agents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/agents` Documentation -The `agents` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `agents` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/agents/client.go b/resource-manager/storagemover/2023-10-01/agents/client.go index 254beaaa1f0..a61cb38143c 100644 --- a/resource-manager/storagemover/2023-10-01/agents/client.go +++ b/resource-manager/storagemover/2023-10-01/agents/client.go @@ -15,7 +15,7 @@ type AgentsClient struct { } func NewAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/agents/id_agent.go b/resource-manager/storagemover/2023-10-01/agents/id_agent.go index 14d3ecd63f6..e7e0c256747 100644 --- a/resource-manager/storagemover/2023-10-01/agents/id_agent.go +++ b/resource-manager/storagemover/2023-10-01/agents/id_agent.go @@ -44,7 +44,7 @@ func ParseAgentID(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentIDInsensitively(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/agents/id_storagemover.go b/resource-manager/storagemover/2023-10-01/agents/id_storagemover.go index ee1fcd76358..81a14bae6af 100644 --- a/resource-manager/storagemover/2023-10-01/agents/id_storagemover.go +++ b/resource-manager/storagemover/2023-10-01/agents/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/agents/method_createorupdate.go b/resource-manager/storagemover/2023-10-01/agents/method_createorupdate.go index 478a1373c45..445cf73d597 100644 --- a/resource-manager/storagemover/2023-10-01/agents/method_createorupdate.go +++ b/resource-manager/storagemover/2023-10-01/agents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c AgentsClient) CreateOrUpdate(ctx context.Context, id AgentId, input Agen var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/agents/method_get.go b/resource-manager/storagemover/2023-10-01/agents/method_get.go index afbf184b539..36caeb9d18e 100644 --- a/resource-manager/storagemover/2023-10-01/agents/method_get.go +++ b/resource-manager/storagemover/2023-10-01/agents/method_get.go @@ -45,7 +45,6 @@ func (c AgentsClient) Get(ctx context.Context, id AgentId) (result GetOperationR var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/agents/method_update.go b/resource-manager/storagemover/2023-10-01/agents/method_update.go index f55ad6d3678..89368848db1 100644 --- a/resource-manager/storagemover/2023-10-01/agents/method_update.go +++ b/resource-manager/storagemover/2023-10-01/agents/method_update.go @@ -49,7 +49,6 @@ func (c AgentsClient) Update(ctx context.Context, id AgentId, input AgentUpdateP var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/agents/version.go b/resource-manager/storagemover/2023-10-01/agents/version.go index dbc31d41916..f357356c1dd 100644 --- a/resource-manager/storagemover/2023-10-01/agents/version.go +++ b/resource-manager/storagemover/2023-10-01/agents/version.go @@ -1,12 +1,10 @@ package agents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agents/2023-10-01" } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/README.md b/resource-manager/storagemover/2023-10-01/endpoints/README.md index a2b666c1683..4447008f1b4 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/README.md +++ b/resource-manager/storagemover/2023-10-01/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/endpoints/client.go b/resource-manager/storagemover/2023-10-01/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/client.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/id_endpoint.go b/resource-manager/storagemover/2023-10-01/endpoints/id_endpoint.go index 22e0301b989..c1a59532bff 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/id_endpoint.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/id_endpoint.go @@ -44,7 +44,7 @@ func ParseEndpointID(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/id_storagemover.go b/resource-manager/storagemover/2023-10-01/endpoints/id_storagemover.go index a873b8a0122..c0bc7440c08 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/id_storagemover.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/method_createorupdate.go b/resource-manager/storagemover/2023-10-01/endpoints/method_createorupdate.go index a1f0e15bfe7..92fc7fede17 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/method_createorupdate.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointId, inpu var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/method_get.go b/resource-manager/storagemover/2023-10-01/endpoints/method_get.go index d0d322403d0..b81e42bd7da 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/method_get.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/method_get.go @@ -45,7 +45,6 @@ func (c EndpointsClient) Get(ctx context.Context, id EndpointId) (result GetOper var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/method_update.go b/resource-manager/storagemover/2023-10-01/endpoints/method_update.go index 4cf1d8184f8..6d19a26f790 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/method_update.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/method_update.go @@ -49,7 +49,6 @@ func (c EndpointsClient) Update(ctx context.Context, id EndpointId, input Endpoi var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_azurekeyvaultsmbcredentials.go b/resource-manager/storagemover/2023-10-01/endpoints/model_azurekeyvaultsmbcredentials.go index 8822469edeb..6e0f689497c 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_azurekeyvaultsmbcredentials.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_azurekeyvaultsmbcredentials.go @@ -15,6 +15,14 @@ type AzureKeyVaultSmbCredentials struct { UsernameUri *string `json:"usernameUri,omitempty"` // Fields inherited from Credentials + + Type CredentialType `json:"type"` +} + +func (s AzureKeyVaultSmbCredentials) Credentials() BaseCredentialsImpl { + return BaseCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultSmbCredentials{} @@ -28,9 +36,10 @@ func (s AzureKeyVaultSmbCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultSmbCredentials: %+v", err) } + decoded["type"] = "AzureKeyVaultSmb" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointproperties.go index 3a655d2725d..57295e3ee83 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointproperties.go @@ -15,10 +15,20 @@ type AzureStorageBlobContainerEndpointProperties struct { StorageAccountResourceId string `json:"storageAccountResourceId"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s AzureStorageBlobContainerEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureStorageBlobContainerEndpointProperties{} func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageBlobContainerEndpointProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageBlobContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go index 3186c009606..875fe3a26ac 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = AzureStorageBlobContainerEndpointUpdateProp type AzureStorageBlobContainerEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureStorageBlobContainerEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureStorageBlobContainerEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageBlobContainerEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageBlobContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go index dd90521b904..7b9b5b4647f 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go @@ -15,10 +15,20 @@ type AzureStorageSmbFileShareEndpointProperties struct { StorageAccountResourceId string `json:"storageAccountResourceId"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s AzureStorageSmbFileShareEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureStorageSmbFileShareEndpointProperties{} func (s AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageSmbFileShareEndpointProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageSmbFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go index f6e7e8fed51..080cfe31043 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = AzureStorageSmbFileShareEndpointUpdatePrope type AzureStorageSmbFileShareEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureStorageSmbFileShareEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureStorageSmbFileShareEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageSmbFileShareEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageSmbFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_credentials.go b/resource-manager/storagemover/2023-10-01/endpoints/model_credentials.go index 781fd73bda1..41429bd1c1f 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_credentials.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_credentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Credentials interface { + Credentials() BaseCredentialsImpl } -// RawCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Credentials = BaseCredentialsImpl{} + +type BaseCredentialsImpl struct { + Type CredentialType `json:"type"` +} + +func (s BaseCredentialsImpl) Credentials() BaseCredentialsImpl { + return s +} + +var _ Credentials = RawCredentialsImpl{} + +// RawCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCredentialsImpl struct { - Type string - Values map[string]interface{} + credentials BaseCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawCredentialsImpl) Credentials() BaseCredentialsImpl { + return s.credentials } -func unmarshalCredentialsImplementation(input []byte) (Credentials, error) { +func UnmarshalCredentialsImplementation(input []byte) (Credentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCredentialsImplementation(input []byte) (Credentials, error) { return out, nil } - out := RawCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCredentialsImpl: %+v", err) } - return out, nil + + return RawCredentialsImpl{ + credentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_endpoint.go b/resource-manager/storagemover/2023-10-01/endpoints/model_endpoint.go index 5f30fb5dd53..85d4ebdc6d8 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_endpoint.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_endpoint.go @@ -38,7 +38,7 @@ func (s *Endpoint) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalEndpointBasePropertiesImplementation(v) + impl, err := UnmarshalEndpointBasePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Endpoint': %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseproperties.go index 48ece33570f..5d8bc20c669 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointBaseProperties interface { + EndpointBaseProperties() BaseEndpointBasePropertiesImpl } -// RawEndpointBasePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EndpointBaseProperties = BaseEndpointBasePropertiesImpl{} + +type BaseEndpointBasePropertiesImpl struct { + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s +} + +var _ EndpointBaseProperties = RawEndpointBasePropertiesImpl{} + +// RawEndpointBasePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEndpointBasePropertiesImpl struct { - Type string - Values map[string]interface{} + endpointBaseProperties BaseEndpointBasePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s.endpointBaseProperties } -func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { +func UnmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBasePr return out, nil } - out := RawEndpointBasePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseEndpointBasePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEndpointBasePropertiesImpl: %+v", err) } - return out, nil + + return RawEndpointBasePropertiesImpl{ + endpointBaseProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateparameters.go b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateparameters.go index 6fb6b334ae8..15b6881eee0 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateparameters.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateparameters.go @@ -22,7 +22,7 @@ func (s *EndpointBaseUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalEndpointBaseUpdatePropertiesImplementation(v) + impl, err := UnmarshalEndpointBaseUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'EndpointBaseUpdateParameters': %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateproperties.go index a3137cbb2d5..e6678a3611d 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_endpointbaseupdateproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointBaseUpdateProperties interface { + EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl } -// RawEndpointBaseUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EndpointBaseUpdateProperties = BaseEndpointBaseUpdatePropertiesImpl{} + +type BaseEndpointBaseUpdatePropertiesImpl struct { + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s BaseEndpointBaseUpdatePropertiesImpl) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return s +} + +var _ EndpointBaseUpdateProperties = RawEndpointBaseUpdatePropertiesImpl{} + +// RawEndpointBaseUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEndpointBaseUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + endpointBaseUpdateProperties BaseEndpointBaseUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawEndpointBaseUpdatePropertiesImpl) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return s.endpointBaseUpdateProperties } -func unmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (EndpointBaseUpdateProperties, error) { +func UnmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (EndpointBaseUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +86,15 @@ func unmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (Endpoint return out, nil } - out := RawEndpointBaseUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseEndpointBaseUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEndpointBaseUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawEndpointBaseUpdatePropertiesImpl{ + endpointBaseUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointproperties.go index d8631f3caf2..8f95e9503d6 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointproperties.go @@ -16,10 +16,20 @@ type NfsMountEndpointProperties struct { NfsVersion *NfsVersion `json:"nfsVersion,omitempty"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s NfsMountEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = NfsMountEndpointProperties{} func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NfsMountEndpointProperties: %+v", err) } + decoded["endpointType"] = "NfsMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointupdateproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointupdateproperties.go index 7360fb7b937..09682ecf505 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointupdateproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_nfsmountendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = NfsMountEndpointUpdateProperties{} type NfsMountEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s NfsMountEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = NfsMountEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s NfsMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NfsMountEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "NfsMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointproperties.go index ffa3d3051b1..d99c37add91 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointproperties.go @@ -16,10 +16,20 @@ type SmbMountEndpointProperties struct { ShareName string `json:"shareName"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s SmbMountEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SmbMountEndpointProperties{} func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmbMountEndpointProperties: %+v", err) } + decoded["endpointType"] = "SmbMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointupdateproperties.go b/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointupdateproperties.go index b6718147468..e79372d21ac 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointupdateproperties.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/model_smbmountendpointupdateproperties.go @@ -14,7 +14,16 @@ type SmbMountEndpointUpdateProperties struct { Credentials *AzureKeyVaultSmbCredentials `json:"credentials,omitempty"` // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s SmbMountEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = SmbMountEndpointUpdateProperties{} @@ -28,9 +37,10 @@ func (s SmbMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmbMountEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "SmbMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2023-10-01/endpoints/version.go b/resource-manager/storagemover/2023-10-01/endpoints/version.go index 641f7ce2b55..03ad72b6fb1 100644 --- a/resource-manager/storagemover/2023-10-01/endpoints/version.go +++ b/resource-manager/storagemover/2023-10-01/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2023-10-01" } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/README.md b/resource-manager/storagemover/2023-10-01/jobdefinitions/README.md index 575c83d7d49..a5f0236e503 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/README.md +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/jobdefinitions` Documentation -The `jobdefinitions` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `jobdefinitions` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/client.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/client.go index 4e6d06c8433..8c25cd5af60 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/client.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/client.go @@ -15,7 +15,7 @@ type JobDefinitionsClient struct { } func NewJobDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobDefinitionsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/id_jobdefinition.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/id_jobdefinition.go index d5625dff2dc..f09e1cc28e3 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/id_jobdefinition.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/id_project.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/id_project.go index 8726b737c47..ca8afd1a89f 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/id_project.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_createorupdate.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_createorupdate.go index dde487ce89d..90bd643a87b 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_createorupdate.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) CreateOrUpdate(ctx context.Context, id JobDefiniti var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_get.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_get.go index 0327bb98aa0..2a727ebb205 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_get.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c JobDefinitionsClient) Get(ctx context.Context, id JobDefinitionId) (resu var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_startjob.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_startjob.go index 9a565e0fb4e..26fa7ef42d2 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_startjob.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_startjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StartJob(ctx context.Context, id JobDefinitionId) var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_stopjob.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_stopjob.go index 73dcd00fa61..635ea650d96 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_stopjob.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_stopjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StopJob(ctx context.Context, id JobDefinitionId) ( var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_update.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_update.go index 387e8a2e770..67633d28211 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/method_update.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/method_update.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) Update(ctx context.Context, id JobDefinitionId, in var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobdefinitions/version.go b/resource-manager/storagemover/2023-10-01/jobdefinitions/version.go index 846297e9dd5..9ca2a25726c 100644 --- a/resource-manager/storagemover/2023-10-01/jobdefinitions/version.go +++ b/resource-manager/storagemover/2023-10-01/jobdefinitions/version.go @@ -1,12 +1,10 @@ package jobdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdefinitions/2023-10-01" } diff --git a/resource-manager/storagemover/2023-10-01/jobruns/README.md b/resource-manager/storagemover/2023-10-01/jobruns/README.md index 5847b800bdd..f0c9657620f 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/README.md +++ b/resource-manager/storagemover/2023-10-01/jobruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/jobruns` Documentation -The `jobruns` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `jobruns` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/jobruns/client.go b/resource-manager/storagemover/2023-10-01/jobruns/client.go index 7362d9fa5ee..5734dfbaaa0 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/client.go +++ b/resource-manager/storagemover/2023-10-01/jobruns/client.go @@ -15,7 +15,7 @@ type JobRunsClient struct { } func NewJobRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobRunsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/jobruns/id_jobdefinition.go b/resource-manager/storagemover/2023-10-01/jobruns/id_jobdefinition.go index fc3ccd5eb2c..ac698b0c94d 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/id_jobdefinition.go +++ b/resource-manager/storagemover/2023-10-01/jobruns/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/jobruns/id_jobrun.go b/resource-manager/storagemover/2023-10-01/jobruns/id_jobrun.go index 5a77c416e88..2a404838f3c 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/id_jobrun.go +++ b/resource-manager/storagemover/2023-10-01/jobruns/id_jobrun.go @@ -48,7 +48,7 @@ func ParseJobRunID(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseJobRunIDInsensitively(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/jobruns/method_get.go b/resource-manager/storagemover/2023-10-01/jobruns/method_get.go index f5162c1963c..1535611541a 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/method_get.go +++ b/resource-manager/storagemover/2023-10-01/jobruns/method_get.go @@ -45,7 +45,6 @@ func (c JobRunsClient) Get(ctx context.Context, id JobRunId) (result GetOperatio var model JobRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/jobruns/version.go b/resource-manager/storagemover/2023-10-01/jobruns/version.go index 99439c90ea6..4d658d860c9 100644 --- a/resource-manager/storagemover/2023-10-01/jobruns/version.go +++ b/resource-manager/storagemover/2023-10-01/jobruns/version.go @@ -1,12 +1,10 @@ package jobruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobruns/2023-10-01" } diff --git a/resource-manager/storagemover/2023-10-01/projects/README.md b/resource-manager/storagemover/2023-10-01/projects/README.md index 20226c89754..91de22b9be7 100644 --- a/resource-manager/storagemover/2023-10-01/projects/README.md +++ b/resource-manager/storagemover/2023-10-01/projects/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/projects` Documentation -The `projects` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `projects` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/projects/client.go b/resource-manager/storagemover/2023-10-01/projects/client.go index f862a93697c..78ad23b0856 100644 --- a/resource-manager/storagemover/2023-10-01/projects/client.go +++ b/resource-manager/storagemover/2023-10-01/projects/client.go @@ -15,7 +15,7 @@ type ProjectsClient struct { } func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projects", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projects", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectsClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/projects/id_project.go b/resource-manager/storagemover/2023-10-01/projects/id_project.go index 49bb0c8603b..5e0e4c532b3 100644 --- a/resource-manager/storagemover/2023-10-01/projects/id_project.go +++ b/resource-manager/storagemover/2023-10-01/projects/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/projects/id_storagemover.go b/resource-manager/storagemover/2023-10-01/projects/id_storagemover.go index ed115952d8c..9c876b57ef5 100644 --- a/resource-manager/storagemover/2023-10-01/projects/id_storagemover.go +++ b/resource-manager/storagemover/2023-10-01/projects/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/projects/method_createorupdate.go b/resource-manager/storagemover/2023-10-01/projects/method_createorupdate.go index c763c860037..0aee10b7109 100644 --- a/resource-manager/storagemover/2023-10-01/projects/method_createorupdate.go +++ b/resource-manager/storagemover/2023-10-01/projects/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ProjectsClient) CreateOrUpdate(ctx context.Context, id ProjectId, input var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/projects/method_get.go b/resource-manager/storagemover/2023-10-01/projects/method_get.go index b37e667ef3d..98e1f02f188 100644 --- a/resource-manager/storagemover/2023-10-01/projects/method_get.go +++ b/resource-manager/storagemover/2023-10-01/projects/method_get.go @@ -45,7 +45,6 @@ func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperat var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/projects/method_update.go b/resource-manager/storagemover/2023-10-01/projects/method_update.go index a1f2fd6ad09..b99452439f2 100644 --- a/resource-manager/storagemover/2023-10-01/projects/method_update.go +++ b/resource-manager/storagemover/2023-10-01/projects/method_update.go @@ -49,7 +49,6 @@ func (c ProjectsClient) Update(ctx context.Context, id ProjectId, input ProjectU var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/projects/version.go b/resource-manager/storagemover/2023-10-01/projects/version.go index 71db1995ecd..6dc5f133a9a 100644 --- a/resource-manager/storagemover/2023-10-01/projects/version.go +++ b/resource-manager/storagemover/2023-10-01/projects/version.go @@ -1,12 +1,10 @@ package projects -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projects/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projects/2023-10-01" } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/README.md b/resource-manager/storagemover/2023-10-01/storagemovers/README.md index b03fc8835b5..c7e561f714f 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/README.md +++ b/resource-manager/storagemover/2023-10-01/storagemovers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/storagemovers` Documentation -The `storagemovers` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2023-10-01`). +The `storagemovers` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2023-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/client.go b/resource-manager/storagemover/2023-10-01/storagemovers/client.go index 6dcabe53e93..74f29bdf07b 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/client.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/client.go @@ -15,7 +15,7 @@ type StorageMoversClient struct { } func NewStorageMoversClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageMoversClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagemovers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagemovers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageMoversClient: %+v", err) } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/id_storagemover.go b/resource-manager/storagemover/2023-10-01/storagemovers/id_storagemover.go index f8397bed89a..7683b65ac5a 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/id_storagemover.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/method_createorupdate.go b/resource-manager/storagemover/2023-10-01/storagemovers/method_createorupdate.go index 0dc3b557a9d..5677fa57e8d 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/method_createorupdate.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) CreateOrUpdate(ctx context.Context, id StorageMover var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/method_get.go b/resource-manager/storagemover/2023-10-01/storagemovers/method_get.go index a0277aad7ff..deb7aec635f 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/method_get.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/method_get.go @@ -45,7 +45,6 @@ func (c StorageMoversClient) Get(ctx context.Context, id StorageMoverId) (result var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/method_update.go b/resource-manager/storagemover/2023-10-01/storagemovers/method_update.go index 849c8b7148e..673f20f52f7 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/method_update.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/method_update.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) Update(ctx context.Context, id StorageMoverId, inpu var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2023-10-01/storagemovers/version.go b/resource-manager/storagemover/2023-10-01/storagemovers/version.go index 61168b6f2a2..f80bcd4a0d0 100644 --- a/resource-manager/storagemover/2023-10-01/storagemovers/version.go +++ b/resource-manager/storagemover/2023-10-01/storagemovers/version.go @@ -1,12 +1,10 @@ package storagemovers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagemovers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagemovers/2023-10-01" } diff --git a/resource-manager/storagemover/2024-07-01/agents/README.md b/resource-manager/storagemover/2024-07-01/agents/README.md index 39dbc0143dd..bb672fc2db3 100644 --- a/resource-manager/storagemover/2024-07-01/agents/README.md +++ b/resource-manager/storagemover/2024-07-01/agents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/agents` Documentation -The `agents` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `agents` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/agents/client.go b/resource-manager/storagemover/2024-07-01/agents/client.go index 254beaaa1f0..a61cb38143c 100644 --- a/resource-manager/storagemover/2024-07-01/agents/client.go +++ b/resource-manager/storagemover/2024-07-01/agents/client.go @@ -15,7 +15,7 @@ type AgentsClient struct { } func NewAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "agents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "agents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AgentsClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/agents/id_agent.go b/resource-manager/storagemover/2024-07-01/agents/id_agent.go index 14d3ecd63f6..e7e0c256747 100644 --- a/resource-manager/storagemover/2024-07-01/agents/id_agent.go +++ b/resource-manager/storagemover/2024-07-01/agents/id_agent.go @@ -44,7 +44,7 @@ func ParseAgentID(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAgentIDInsensitively(input string) (*AgentId, error) { } id := AgentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/agents/id_storagemover.go b/resource-manager/storagemover/2024-07-01/agents/id_storagemover.go index ee1fcd76358..81a14bae6af 100644 --- a/resource-manager/storagemover/2024-07-01/agents/id_storagemover.go +++ b/resource-manager/storagemover/2024-07-01/agents/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/agents/method_createorupdate.go b/resource-manager/storagemover/2024-07-01/agents/method_createorupdate.go index 478a1373c45..445cf73d597 100644 --- a/resource-manager/storagemover/2024-07-01/agents/method_createorupdate.go +++ b/resource-manager/storagemover/2024-07-01/agents/method_createorupdate.go @@ -49,7 +49,6 @@ func (c AgentsClient) CreateOrUpdate(ctx context.Context, id AgentId, input Agen var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/agents/method_get.go b/resource-manager/storagemover/2024-07-01/agents/method_get.go index afbf184b539..36caeb9d18e 100644 --- a/resource-manager/storagemover/2024-07-01/agents/method_get.go +++ b/resource-manager/storagemover/2024-07-01/agents/method_get.go @@ -45,7 +45,6 @@ func (c AgentsClient) Get(ctx context.Context, id AgentId) (result GetOperationR var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/agents/method_update.go b/resource-manager/storagemover/2024-07-01/agents/method_update.go index f55ad6d3678..89368848db1 100644 --- a/resource-manager/storagemover/2024-07-01/agents/method_update.go +++ b/resource-manager/storagemover/2024-07-01/agents/method_update.go @@ -49,7 +49,6 @@ func (c AgentsClient) Update(ctx context.Context, id AgentId, input AgentUpdateP var model Agent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/agents/version.go b/resource-manager/storagemover/2024-07-01/agents/version.go index 891ce595aa8..45fb9d20a7b 100644 --- a/resource-manager/storagemover/2024-07-01/agents/version.go +++ b/resource-manager/storagemover/2024-07-01/agents/version.go @@ -1,12 +1,10 @@ package agents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/agents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/agents/2024-07-01" } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/README.md b/resource-manager/storagemover/2024-07-01/endpoints/README.md index 4097b58d7f5..e666d628dbe 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/README.md +++ b/resource-manager/storagemover/2024-07-01/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/endpoints/client.go b/resource-manager/storagemover/2024-07-01/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/client.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/id_endpoint.go b/resource-manager/storagemover/2024-07-01/endpoints/id_endpoint.go index 22e0301b989..c1a59532bff 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/id_endpoint.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/id_endpoint.go @@ -44,7 +44,7 @@ func ParseEndpointID(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEndpointIDInsensitively(input string) (*EndpointId, error) { } id := EndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/id_storagemover.go b/resource-manager/storagemover/2024-07-01/endpoints/id_storagemover.go index a873b8a0122..c0bc7440c08 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/id_storagemover.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/method_createorupdate.go b/resource-manager/storagemover/2024-07-01/endpoints/method_createorupdate.go index a1f0e15bfe7..92fc7fede17 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/method_createorupdate.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/method_createorupdate.go @@ -49,7 +49,6 @@ func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointId, inpu var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/method_get.go b/resource-manager/storagemover/2024-07-01/endpoints/method_get.go index d0d322403d0..b81e42bd7da 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/method_get.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/method_get.go @@ -45,7 +45,6 @@ func (c EndpointsClient) Get(ctx context.Context, id EndpointId) (result GetOper var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/method_update.go b/resource-manager/storagemover/2024-07-01/endpoints/method_update.go index 4cf1d8184f8..6d19a26f790 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/method_update.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/method_update.go @@ -49,7 +49,6 @@ func (c EndpointsClient) Update(ctx context.Context, id EndpointId, input Endpoi var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_azurekeyvaultsmbcredentials.go b/resource-manager/storagemover/2024-07-01/endpoints/model_azurekeyvaultsmbcredentials.go index 8822469edeb..6e0f689497c 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_azurekeyvaultsmbcredentials.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_azurekeyvaultsmbcredentials.go @@ -15,6 +15,14 @@ type AzureKeyVaultSmbCredentials struct { UsernameUri *string `json:"usernameUri,omitempty"` // Fields inherited from Credentials + + Type CredentialType `json:"type"` +} + +func (s AzureKeyVaultSmbCredentials) Credentials() BaseCredentialsImpl { + return BaseCredentialsImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureKeyVaultSmbCredentials{} @@ -28,9 +36,10 @@ func (s AzureKeyVaultSmbCredentials) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureKeyVaultSmbCredentials: %+v", err) } + decoded["type"] = "AzureKeyVaultSmb" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointproperties.go index 3a655d2725d..57295e3ee83 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointproperties.go @@ -15,10 +15,20 @@ type AzureStorageBlobContainerEndpointProperties struct { StorageAccountResourceId string `json:"storageAccountResourceId"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s AzureStorageBlobContainerEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureStorageBlobContainerEndpointProperties{} func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageBlobContainerEndpointProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageBlobContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go index 3186c009606..875fe3a26ac 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestorageblobcontainerendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = AzureStorageBlobContainerEndpointUpdateProp type AzureStorageBlobContainerEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureStorageBlobContainerEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureStorageBlobContainerEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageBlobContainerEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageBlobContainer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go index dd90521b904..7b9b5b4647f 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointproperties.go @@ -15,10 +15,20 @@ type AzureStorageSmbFileShareEndpointProperties struct { StorageAccountResourceId string `json:"storageAccountResourceId"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s AzureStorageSmbFileShareEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AzureStorageSmbFileShareEndpointProperties{} func (s AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error) { @@ -30,9 +40,10 @@ func (s AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageSmbFileShareEndpointProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageSmbFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go index f6e7e8fed51..080cfe31043 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_azurestoragesmbfileshareendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = AzureStorageSmbFileShareEndpointUpdatePrope type AzureStorageSmbFileShareEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s AzureStorageSmbFileShareEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = AzureStorageSmbFileShareEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON() ([]byte, } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureStorageSmbFileShareEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "AzureStorageSmbFileShare" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_credentials.go b/resource-manager/storagemover/2024-07-01/endpoints/model_credentials.go index 781fd73bda1..41429bd1c1f 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_credentials.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_credentials.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Credentials interface { + Credentials() BaseCredentialsImpl } -// RawCredentialsImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Credentials = BaseCredentialsImpl{} + +type BaseCredentialsImpl struct { + Type CredentialType `json:"type"` +} + +func (s BaseCredentialsImpl) Credentials() BaseCredentialsImpl { + return s +} + +var _ Credentials = RawCredentialsImpl{} + +// RawCredentialsImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCredentialsImpl struct { - Type string - Values map[string]interface{} + credentials BaseCredentialsImpl + Type string + Values map[string]interface{} +} + +func (s RawCredentialsImpl) Credentials() BaseCredentialsImpl { + return s.credentials } -func unmarshalCredentialsImplementation(input []byte) (Credentials, error) { +func UnmarshalCredentialsImplementation(input []byte) (Credentials, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalCredentialsImplementation(input []byte) (Credentials, error) { return out, nil } - out := RawCredentialsImpl{ - Type: value, - Values: temp, + var parent BaseCredentialsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCredentialsImpl: %+v", err) } - return out, nil + + return RawCredentialsImpl{ + credentials: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_endpoint.go b/resource-manager/storagemover/2024-07-01/endpoints/model_endpoint.go index 5f30fb5dd53..85d4ebdc6d8 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_endpoint.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_endpoint.go @@ -38,7 +38,7 @@ func (s *Endpoint) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalEndpointBasePropertiesImplementation(v) + impl, err := UnmarshalEndpointBasePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Endpoint': %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseproperties.go index 48ece33570f..5d8bc20c669 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointBaseProperties interface { + EndpointBaseProperties() BaseEndpointBasePropertiesImpl } -// RawEndpointBasePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EndpointBaseProperties = BaseEndpointBasePropertiesImpl{} + +type BaseEndpointBasePropertiesImpl struct { + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s +} + +var _ EndpointBaseProperties = RawEndpointBasePropertiesImpl{} + +// RawEndpointBasePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEndpointBasePropertiesImpl struct { - Type string - Values map[string]interface{} + endpointBaseProperties BaseEndpointBasePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawEndpointBasePropertiesImpl) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return s.endpointBaseProperties } -func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { +func UnmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBaseProperties, error) { if input == nil { return nil, nil } @@ -68,10 +87,15 @@ func unmarshalEndpointBasePropertiesImplementation(input []byte) (EndpointBasePr return out, nil } - out := RawEndpointBasePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseEndpointBasePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEndpointBasePropertiesImpl: %+v", err) } - return out, nil + + return RawEndpointBasePropertiesImpl{ + endpointBaseProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateparameters.go b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateparameters.go index 6fb6b334ae8..15b6881eee0 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateparameters.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateparameters.go @@ -22,7 +22,7 @@ func (s *EndpointBaseUpdateParameters) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalEndpointBaseUpdatePropertiesImplementation(v) + impl, err := UnmarshalEndpointBaseUpdatePropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'EndpointBaseUpdateParameters': %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateproperties.go index a3137cbb2d5..e6678a3611d 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_endpointbaseupdateproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EndpointBaseUpdateProperties interface { + EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl } -// RawEndpointBaseUpdatePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EndpointBaseUpdateProperties = BaseEndpointBaseUpdatePropertiesImpl{} + +type BaseEndpointBaseUpdatePropertiesImpl struct { + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s BaseEndpointBaseUpdatePropertiesImpl) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return s +} + +var _ EndpointBaseUpdateProperties = RawEndpointBaseUpdatePropertiesImpl{} + +// RawEndpointBaseUpdatePropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEndpointBaseUpdatePropertiesImpl struct { - Type string - Values map[string]interface{} + endpointBaseUpdateProperties BaseEndpointBaseUpdatePropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawEndpointBaseUpdatePropertiesImpl) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return s.endpointBaseUpdateProperties } -func unmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (EndpointBaseUpdateProperties, error) { +func UnmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (EndpointBaseUpdateProperties, error) { if input == nil { return nil, nil } @@ -68,10 +86,15 @@ func unmarshalEndpointBaseUpdatePropertiesImplementation(input []byte) (Endpoint return out, nil } - out := RawEndpointBaseUpdatePropertiesImpl{ - Type: value, - Values: temp, + var parent BaseEndpointBaseUpdatePropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEndpointBaseUpdatePropertiesImpl: %+v", err) } - return out, nil + + return RawEndpointBaseUpdatePropertiesImpl{ + endpointBaseUpdateProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointproperties.go index d8631f3caf2..8f95e9503d6 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointproperties.go @@ -16,10 +16,20 @@ type NfsMountEndpointProperties struct { NfsVersion *NfsVersion `json:"nfsVersion,omitempty"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s NfsMountEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = NfsMountEndpointProperties{} func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NfsMountEndpointProperties: %+v", err) } + decoded["endpointType"] = "NfsMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointupdateproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointupdateproperties.go index 7360fb7b937..09682ecf505 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointupdateproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_nfsmountendpointupdateproperties.go @@ -13,7 +13,16 @@ var _ EndpointBaseUpdateProperties = NfsMountEndpointUpdateProperties{} type NfsMountEndpointUpdateProperties struct { // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s NfsMountEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = NfsMountEndpointUpdateProperties{} @@ -27,9 +36,10 @@ func (s NfsMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling NfsMountEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "NfsMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointproperties.go index ffa3d3051b1..d99c37add91 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointproperties.go @@ -16,10 +16,20 @@ type SmbMountEndpointProperties struct { ShareName string `json:"shareName"` // Fields inherited from EndpointBaseProperties + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` } +func (s SmbMountEndpointProperties) EndpointBaseProperties() BaseEndpointBasePropertiesImpl { + return BaseEndpointBasePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = SmbMountEndpointProperties{} func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { @@ -31,9 +41,10 @@ func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmbMountEndpointProperties: %+v", err) } + decoded["endpointType"] = "SmbMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointupdateproperties.go b/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointupdateproperties.go index b6718147468..e79372d21ac 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointupdateproperties.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/model_smbmountendpointupdateproperties.go @@ -14,7 +14,16 @@ type SmbMountEndpointUpdateProperties struct { Credentials *AzureKeyVaultSmbCredentials `json:"credentials,omitempty"` // Fields inherited from EndpointBaseUpdateProperties - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + EndpointType EndpointType `json:"endpointType"` +} + +func (s SmbMountEndpointUpdateProperties) EndpointBaseUpdateProperties() BaseEndpointBaseUpdatePropertiesImpl { + return BaseEndpointBaseUpdatePropertiesImpl{ + Description: s.Description, + EndpointType: s.EndpointType, + } } var _ json.Marshaler = SmbMountEndpointUpdateProperties{} @@ -28,9 +37,10 @@ func (s SmbMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SmbMountEndpointUpdateProperties: %+v", err) } + decoded["endpointType"] = "SmbMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/storagemover/2024-07-01/endpoints/version.go b/resource-manager/storagemover/2024-07-01/endpoints/version.go index 2cc8e5da67b..6ee1c8ddba5 100644 --- a/resource-manager/storagemover/2024-07-01/endpoints/version.go +++ b/resource-manager/storagemover/2024-07-01/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2024-07-01" } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/README.md b/resource-manager/storagemover/2024-07-01/jobdefinitions/README.md index ec30f34ea45..f77d9636817 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/README.md +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/jobdefinitions` Documentation -The `jobdefinitions` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `jobdefinitions` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/client.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/client.go index 4e6d06c8433..8c25cd5af60 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/client.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/client.go @@ -15,7 +15,7 @@ type JobDefinitionsClient struct { } func NewJobDefinitionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobdefinitions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobdefinitions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobDefinitionsClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/id_jobdefinition.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/id_jobdefinition.go index d5625dff2dc..f09e1cc28e3 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/id_jobdefinition.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/id_project.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/id_project.go index 8726b737c47..ca8afd1a89f 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/id_project.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_createorupdate.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_createorupdate.go index dde487ce89d..90bd643a87b 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_createorupdate.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_createorupdate.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) CreateOrUpdate(ctx context.Context, id JobDefiniti var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_get.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_get.go index 0327bb98aa0..2a727ebb205 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_get.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_get.go @@ -45,7 +45,6 @@ func (c JobDefinitionsClient) Get(ctx context.Context, id JobDefinitionId) (resu var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_startjob.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_startjob.go index 9a565e0fb4e..26fa7ef42d2 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_startjob.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_startjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StartJob(ctx context.Context, id JobDefinitionId) var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_stopjob.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_stopjob.go index 73dcd00fa61..635ea650d96 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_stopjob.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_stopjob.go @@ -46,7 +46,6 @@ func (c JobDefinitionsClient) StopJob(ctx context.Context, id JobDefinitionId) ( var model JobRunResourceId result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_update.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_update.go index 387e8a2e770..67633d28211 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/method_update.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/method_update.go @@ -49,7 +49,6 @@ func (c JobDefinitionsClient) Update(ctx context.Context, id JobDefinitionId, in var model JobDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobdefinitions/version.go b/resource-manager/storagemover/2024-07-01/jobdefinitions/version.go index 8f5064c1259..7fdd59884b9 100644 --- a/resource-manager/storagemover/2024-07-01/jobdefinitions/version.go +++ b/resource-manager/storagemover/2024-07-01/jobdefinitions/version.go @@ -1,12 +1,10 @@ package jobdefinitions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobdefinitions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobdefinitions/2024-07-01" } diff --git a/resource-manager/storagemover/2024-07-01/jobruns/README.md b/resource-manager/storagemover/2024-07-01/jobruns/README.md index 67d56501fe4..649d36e178b 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/README.md +++ b/resource-manager/storagemover/2024-07-01/jobruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/jobruns` Documentation -The `jobruns` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `jobruns` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/jobruns/client.go b/resource-manager/storagemover/2024-07-01/jobruns/client.go index 7362d9fa5ee..5734dfbaaa0 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/client.go +++ b/resource-manager/storagemover/2024-07-01/jobruns/client.go @@ -15,7 +15,7 @@ type JobRunsClient struct { } func NewJobRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "jobruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "jobruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating JobRunsClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/jobruns/id_jobdefinition.go b/resource-manager/storagemover/2024-07-01/jobruns/id_jobdefinition.go index fc3ccd5eb2c..ac698b0c94d 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/id_jobdefinition.go +++ b/resource-manager/storagemover/2024-07-01/jobruns/id_jobdefinition.go @@ -46,7 +46,7 @@ func ParseJobDefinitionID(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error) { } id := JobDefinitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/jobruns/id_jobrun.go b/resource-manager/storagemover/2024-07-01/jobruns/id_jobrun.go index 5a77c416e88..2a404838f3c 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/id_jobrun.go +++ b/resource-manager/storagemover/2024-07-01/jobruns/id_jobrun.go @@ -48,7 +48,7 @@ func ParseJobRunID(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseJobRunIDInsensitively(input string) (*JobRunId, error) { } id := JobRunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/jobruns/method_get.go b/resource-manager/storagemover/2024-07-01/jobruns/method_get.go index f5162c1963c..1535611541a 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/method_get.go +++ b/resource-manager/storagemover/2024-07-01/jobruns/method_get.go @@ -45,7 +45,6 @@ func (c JobRunsClient) Get(ctx context.Context, id JobRunId) (result GetOperatio var model JobRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/jobruns/version.go b/resource-manager/storagemover/2024-07-01/jobruns/version.go index 0080def64fb..6e78fa2c337 100644 --- a/resource-manager/storagemover/2024-07-01/jobruns/version.go +++ b/resource-manager/storagemover/2024-07-01/jobruns/version.go @@ -1,12 +1,10 @@ package jobruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/jobruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/jobruns/2024-07-01" } diff --git a/resource-manager/storagemover/2024-07-01/projects/README.md b/resource-manager/storagemover/2024-07-01/projects/README.md index 6b3e8d533fb..3eb96eddfc4 100644 --- a/resource-manager/storagemover/2024-07-01/projects/README.md +++ b/resource-manager/storagemover/2024-07-01/projects/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/projects` Documentation -The `projects` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `projects` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/projects/client.go b/resource-manager/storagemover/2024-07-01/projects/client.go index f862a93697c..78ad23b0856 100644 --- a/resource-manager/storagemover/2024-07-01/projects/client.go +++ b/resource-manager/storagemover/2024-07-01/projects/client.go @@ -15,7 +15,7 @@ type ProjectsClient struct { } func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "projects", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "projects", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProjectsClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/projects/id_project.go b/resource-manager/storagemover/2024-07-01/projects/id_project.go index 49bb0c8603b..5e0e4c532b3 100644 --- a/resource-manager/storagemover/2024-07-01/projects/id_project.go +++ b/resource-manager/storagemover/2024-07-01/projects/id_project.go @@ -44,7 +44,7 @@ func ParseProjectID(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProjectIDInsensitively(input string) (*ProjectId, error) { } id := ProjectId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/projects/id_storagemover.go b/resource-manager/storagemover/2024-07-01/projects/id_storagemover.go index ed115952d8c..9c876b57ef5 100644 --- a/resource-manager/storagemover/2024-07-01/projects/id_storagemover.go +++ b/resource-manager/storagemover/2024-07-01/projects/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/projects/method_createorupdate.go b/resource-manager/storagemover/2024-07-01/projects/method_createorupdate.go index c763c860037..0aee10b7109 100644 --- a/resource-manager/storagemover/2024-07-01/projects/method_createorupdate.go +++ b/resource-manager/storagemover/2024-07-01/projects/method_createorupdate.go @@ -49,7 +49,6 @@ func (c ProjectsClient) CreateOrUpdate(ctx context.Context, id ProjectId, input var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/projects/method_get.go b/resource-manager/storagemover/2024-07-01/projects/method_get.go index b37e667ef3d..98e1f02f188 100644 --- a/resource-manager/storagemover/2024-07-01/projects/method_get.go +++ b/resource-manager/storagemover/2024-07-01/projects/method_get.go @@ -45,7 +45,6 @@ func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperat var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/projects/method_update.go b/resource-manager/storagemover/2024-07-01/projects/method_update.go index a1f2fd6ad09..b99452439f2 100644 --- a/resource-manager/storagemover/2024-07-01/projects/method_update.go +++ b/resource-manager/storagemover/2024-07-01/projects/method_update.go @@ -49,7 +49,6 @@ func (c ProjectsClient) Update(ctx context.Context, id ProjectId, input ProjectU var model Project result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/projects/version.go b/resource-manager/storagemover/2024-07-01/projects/version.go index 294937497ae..a3ea209b45d 100644 --- a/resource-manager/storagemover/2024-07-01/projects/version.go +++ b/resource-manager/storagemover/2024-07-01/projects/version.go @@ -1,12 +1,10 @@ package projects -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/projects/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/projects/2024-07-01" } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/README.md b/resource-manager/storagemover/2024-07-01/storagemovers/README.md index 02967bfa9b3..0444b77f5d2 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/README.md +++ b/resource-manager/storagemover/2024-07-01/storagemovers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2024-07-01/storagemovers` Documentation -The `storagemovers` SDK allows for interaction with the Azure Resource Manager Service `storagemover` (API Version `2024-07-01`). +The `storagemovers` SDK allows for interaction with Azure Resource Manager `storagemover` (API Version `2024-07-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/client.go b/resource-manager/storagemover/2024-07-01/storagemovers/client.go index 6dcabe53e93..74f29bdf07b 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/client.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/client.go @@ -15,7 +15,7 @@ type StorageMoversClient struct { } func NewStorageMoversClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageMoversClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagemovers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagemovers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageMoversClient: %+v", err) } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/id_storagemover.go b/resource-manager/storagemover/2024-07-01/storagemovers/id_storagemover.go index f8397bed89a..7683b65ac5a 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/id_storagemover.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/id_storagemover.go @@ -42,7 +42,7 @@ func ParseStorageMoverID(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error) { } id := StorageMoverId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/method_createorupdate.go b/resource-manager/storagemover/2024-07-01/storagemovers/method_createorupdate.go index 0dc3b557a9d..5677fa57e8d 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/method_createorupdate.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/method_createorupdate.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) CreateOrUpdate(ctx context.Context, id StorageMover var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/method_get.go b/resource-manager/storagemover/2024-07-01/storagemovers/method_get.go index a0277aad7ff..deb7aec635f 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/method_get.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/method_get.go @@ -45,7 +45,6 @@ func (c StorageMoversClient) Get(ctx context.Context, id StorageMoverId) (result var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/method_update.go b/resource-manager/storagemover/2024-07-01/storagemovers/method_update.go index 849c8b7148e..673f20f52f7 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/method_update.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/method_update.go @@ -49,7 +49,6 @@ func (c StorageMoversClient) Update(ctx context.Context, id StorageMoverId, inpu var model StorageMover result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagemover/2024-07-01/storagemovers/version.go b/resource-manager/storagemover/2024-07-01/storagemovers/version.go index 6434502cadc..af16d599720 100644 --- a/resource-manager/storagemover/2024-07-01/storagemovers/version.go +++ b/resource-manager/storagemover/2024-07-01/storagemovers/version.go @@ -1,12 +1,10 @@ package storagemovers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-07-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagemovers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagemovers/2024-07-01" } diff --git a/resource-manager/storagepool/2021-08-01/diskpools/README.md b/resource-manager/storagepool/2021-08-01/diskpools/README.md index 482a7455ef7..c0eb91ea23e 100644 --- a/resource-manager/storagepool/2021-08-01/diskpools/README.md +++ b/resource-manager/storagepool/2021-08-01/diskpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpools` Documentation -The `diskpools` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). +The `diskpools` SDK allows for interaction with Azure Resource Manager `storagepool` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagepool/2021-08-01/diskpools/client.go b/resource-manager/storagepool/2021-08-01/diskpools/client.go index 866df7dc356..de172d1043b 100644 --- a/resource-manager/storagepool/2021-08-01/diskpools/client.go +++ b/resource-manager/storagepool/2021-08-01/diskpools/client.go @@ -15,7 +15,7 @@ type DiskPoolsClient struct { } func NewDiskPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskPoolsClient: %+v", err) } diff --git a/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go b/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go index 0357ba2d53a..4a49542ec3a 100644 --- a/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go +++ b/resource-manager/storagepool/2021-08-01/diskpools/id_diskpool.go @@ -42,7 +42,7 @@ func ParseDiskPoolID(input string) (*DiskPoolId, error) { } id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { } id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagepool/2021-08-01/diskpools/method_get.go b/resource-manager/storagepool/2021-08-01/diskpools/method_get.go index bc125321b45..f7be92d9fdd 100644 --- a/resource-manager/storagepool/2021-08-01/diskpools/method_get.go +++ b/resource-manager/storagepool/2021-08-01/diskpools/method_get.go @@ -45,7 +45,6 @@ func (c DiskPoolsClient) Get(ctx context.Context, id DiskPoolId) (result GetOper var model DiskPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagepool/2021-08-01/diskpools/version.go b/resource-manager/storagepool/2021-08-01/diskpools/version.go index 8686ee1654b..69b6a133dd3 100644 --- a/resource-manager/storagepool/2021-08-01/diskpools/version.go +++ b/resource-manager/storagepool/2021-08-01/diskpools/version.go @@ -1,12 +1,10 @@ package diskpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskpools/2021-08-01" } diff --git a/resource-manager/storagepool/2021-08-01/diskpoolzones/README.md b/resource-manager/storagepool/2021-08-01/diskpoolzones/README.md index 240957a9901..9fb937bc77f 100644 --- a/resource-manager/storagepool/2021-08-01/diskpoolzones/README.md +++ b/resource-manager/storagepool/2021-08-01/diskpoolzones/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/diskpoolzones` Documentation -The `diskpoolzones` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). +The `diskpoolzones` SDK allows for interaction with Azure Resource Manager `storagepool` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagepool/2021-08-01/diskpoolzones/client.go b/resource-manager/storagepool/2021-08-01/diskpoolzones/client.go index fa5b912a84f..44c3fe1eced 100644 --- a/resource-manager/storagepool/2021-08-01/diskpoolzones/client.go +++ b/resource-manager/storagepool/2021-08-01/diskpoolzones/client.go @@ -15,7 +15,7 @@ type DiskPoolZonesClient struct { } func NewDiskPoolZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskPoolZonesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diskpoolzones", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diskpoolzones", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiskPoolZonesClient: %+v", err) } diff --git a/resource-manager/storagepool/2021-08-01/diskpoolzones/id_location.go b/resource-manager/storagepool/2021-08-01/diskpoolzones/id_location.go index bf8980e51e1..c49ab3c21f9 100644 --- a/resource-manager/storagepool/2021-08-01/diskpoolzones/id_location.go +++ b/resource-manager/storagepool/2021-08-01/diskpoolzones/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagepool/2021-08-01/diskpoolzones/version.go b/resource-manager/storagepool/2021-08-01/diskpoolzones/version.go index 2a67e91bf44..279e04ab142 100644 --- a/resource-manager/storagepool/2021-08-01/diskpoolzones/version.go +++ b/resource-manager/storagepool/2021-08-01/diskpoolzones/version.go @@ -1,12 +1,10 @@ package diskpoolzones -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diskpoolzones/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diskpoolzones/2021-08-01" } diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/README.md b/resource-manager/storagepool/2021-08-01/iscsitargets/README.md index c652387625a..bb9f3a88aa5 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/README.md +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/iscsitargets` Documentation -The `iscsitargets` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). +The `iscsitargets` SDK allows for interaction with Azure Resource Manager `storagepool` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/client.go b/resource-manager/storagepool/2021-08-01/iscsitargets/client.go index fce7ac504d4..4852c5ba49e 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/client.go +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/client.go @@ -15,7 +15,7 @@ type IscsiTargetsClient struct { } func NewIscsiTargetsClientWithBaseURI(sdkApi sdkEnv.Api) (*IscsiTargetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iscsitargets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iscsitargets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IscsiTargetsClient: %+v", err) } diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go b/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go index 8d9389d31f3..9ddd6659161 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/id_diskpool.go @@ -42,7 +42,7 @@ func ParseDiskPoolID(input string) (*DiskPoolId, error) { } id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDiskPoolIDInsensitively(input string) (*DiskPoolId, error) { } id := DiskPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go b/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go index 5e041793dee..d0824447970 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/id_iscsitarget.go @@ -44,7 +44,7 @@ func ParseIscsiTargetID(input string) (*IscsiTargetId, error) { } id := IscsiTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIscsiTargetIDInsensitively(input string) (*IscsiTargetId, error) { } id := IscsiTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go b/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go index 1a4eff6b70e..0677bc34a39 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/method_get.go @@ -45,7 +45,6 @@ func (c IscsiTargetsClient) Get(ctx context.Context, id IscsiTargetId) (result G var model IscsiTarget result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagepool/2021-08-01/iscsitargets/version.go b/resource-manager/storagepool/2021-08-01/iscsitargets/version.go index 61f14016ec9..a52b66a5544 100644 --- a/resource-manager/storagepool/2021-08-01/iscsitargets/version.go +++ b/resource-manager/storagepool/2021-08-01/iscsitargets/version.go @@ -1,12 +1,10 @@ package iscsitargets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iscsitargets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iscsitargets/2021-08-01" } diff --git a/resource-manager/storagepool/2021-08-01/resourceskus/README.md b/resource-manager/storagepool/2021-08-01/resourceskus/README.md index 40adfe16295..be3813f1b35 100644 --- a/resource-manager/storagepool/2021-08-01/resourceskus/README.md +++ b/resource-manager/storagepool/2021-08-01/resourceskus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagepool/2021-08-01/resourceskus` Documentation -The `resourceskus` SDK allows for interaction with the Azure Resource Manager Service `storagepool` (API Version `2021-08-01`). +The `resourceskus` SDK allows for interaction with Azure Resource Manager `storagepool` (API Version `2021-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagepool/2021-08-01/resourceskus/client.go b/resource-manager/storagepool/2021-08-01/resourceskus/client.go index 6aee5803d1a..f15e24340f1 100644 --- a/resource-manager/storagepool/2021-08-01/resourceskus/client.go +++ b/resource-manager/storagepool/2021-08-01/resourceskus/client.go @@ -15,7 +15,7 @@ type ResourceSkusClient struct { } func NewResourceSkusClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceskus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceskus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceSkusClient: %+v", err) } diff --git a/resource-manager/storagepool/2021-08-01/resourceskus/id_location.go b/resource-manager/storagepool/2021-08-01/resourceskus/id_location.go index 174c7f0ce27..3c8dff5d73c 100644 --- a/resource-manager/storagepool/2021-08-01/resourceskus/id_location.go +++ b/resource-manager/storagepool/2021-08-01/resourceskus/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagepool/2021-08-01/resourceskus/version.go b/resource-manager/storagepool/2021-08-01/resourceskus/version.go index bde773f7238..d570aa9077b 100644 --- a/resource-manager/storagepool/2021-08-01/resourceskus/version.go +++ b/resource-manager/storagepool/2021-08-01/resourceskus/version.go @@ -1,12 +1,10 @@ package resourceskus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceskus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceskus/2021-08-01" } diff --git a/resource-manager/storagesync/2020-03-01/actions/README.md b/resource-manager/storagesync/2020-03-01/actions/README.md index 1ee1e444953..03b26926290 100644 --- a/resource-manager/storagesync/2020-03-01/actions/README.md +++ b/resource-manager/storagesync/2020-03-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/actions/client.go b/resource-manager/storagesync/2020-03-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/storagesync/2020-03-01/actions/client.go +++ b/resource-manager/storagesync/2020-03-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/actions/id_cloudendpoint.go b/resource-manager/storagesync/2020-03-01/actions/id_cloudendpoint.go index 4a8b0a07d98..bf700950ade 100644 --- a/resource-manager/storagesync/2020-03-01/actions/id_cloudendpoint.go +++ b/resource-manager/storagesync/2020-03-01/actions/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/actions/id_registeredserver.go b/resource-manager/storagesync/2020-03-01/actions/id_registeredserver.go index 4893ff628a5..cc77b77b99f 100644 --- a/resource-manager/storagesync/2020-03-01/actions/id_registeredserver.go +++ b/resource-manager/storagesync/2020-03-01/actions/id_registeredserver.go @@ -44,7 +44,7 @@ func ParseRegisteredServerID(input string) (*RegisteredServerId, error) { } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredServerIDInsensitively(input string) (*RegisteredServerId, er } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/actions/id_serverendpoint.go b/resource-manager/storagesync/2020-03-01/actions/id_serverendpoint.go index 33bdbda2b50..395a0249bf6 100644 --- a/resource-manager/storagesync/2020-03-01/actions/id_serverendpoint.go +++ b/resource-manager/storagesync/2020-03-01/actions/id_serverendpoint.go @@ -46,7 +46,7 @@ func ParseServerEndpointID(input string) (*ServerEndpointId, error) { } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServerEndpointIDInsensitively(input string) (*ServerEndpointId, error) } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/actions/id_workflow.go b/resource-manager/storagesync/2020-03-01/actions/id_workflow.go index 0d84a0e06d2..45721804bae 100644 --- a/resource-manager/storagesync/2020-03-01/actions/id_workflow.go +++ b/resource-manager/storagesync/2020-03-01/actions/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/actions/version.go b/resource-manager/storagesync/2020-03-01/actions/version.go index 2ea54306ab7..649bc057c98 100644 --- a/resource-manager/storagesync/2020-03-01/actions/version.go +++ b/resource-manager/storagesync/2020-03-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/backuprestore/README.md b/resource-manager/storagesync/2020-03-01/backuprestore/README.md index fd27e71d191..7b4da7004c1 100644 --- a/resource-manager/storagesync/2020-03-01/backuprestore/README.md +++ b/resource-manager/storagesync/2020-03-01/backuprestore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/backuprestore` Documentation -The `backuprestore` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `backuprestore` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/backuprestore/client.go b/resource-manager/storagesync/2020-03-01/backuprestore/client.go index 596612e9763..e678b431519 100644 --- a/resource-manager/storagesync/2020-03-01/backuprestore/client.go +++ b/resource-manager/storagesync/2020-03-01/backuprestore/client.go @@ -15,7 +15,7 @@ type BackupRestoreClient struct { } func NewBackupRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupRestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuprestore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuprestore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupRestoreClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/backuprestore/id_cloudendpoint.go b/resource-manager/storagesync/2020-03-01/backuprestore/id_cloudendpoint.go index 224e55a8a61..6bd385ab67e 100644 --- a/resource-manager/storagesync/2020-03-01/backuprestore/id_cloudendpoint.go +++ b/resource-manager/storagesync/2020-03-01/backuprestore/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/backuprestore/version.go b/resource-manager/storagesync/2020-03-01/backuprestore/version.go index ec7108eb940..48a97d67479 100644 --- a/resource-manager/storagesync/2020-03-01/backuprestore/version.go +++ b/resource-manager/storagesync/2020-03-01/backuprestore/version.go @@ -1,12 +1,10 @@ package backuprestore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuprestore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuprestore/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/changedetection/README.md b/resource-manager/storagesync/2020-03-01/changedetection/README.md index 8286b837481..11e0212cf7f 100644 --- a/resource-manager/storagesync/2020-03-01/changedetection/README.md +++ b/resource-manager/storagesync/2020-03-01/changedetection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/changedetection` Documentation -The `changedetection` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `changedetection` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/changedetection/client.go b/resource-manager/storagesync/2020-03-01/changedetection/client.go index 856bf2581c6..058ce5cb9ed 100644 --- a/resource-manager/storagesync/2020-03-01/changedetection/client.go +++ b/resource-manager/storagesync/2020-03-01/changedetection/client.go @@ -15,7 +15,7 @@ type ChangeDetectionClient struct { } func NewChangeDetectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ChangeDetectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "changedetection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "changedetection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChangeDetectionClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/changedetection/id_cloudendpoint.go b/resource-manager/storagesync/2020-03-01/changedetection/id_cloudendpoint.go index 2c97a8c1a2d..01bde3c77aa 100644 --- a/resource-manager/storagesync/2020-03-01/changedetection/id_cloudendpoint.go +++ b/resource-manager/storagesync/2020-03-01/changedetection/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/changedetection/version.go b/resource-manager/storagesync/2020-03-01/changedetection/version.go index 28e5de9e6ab..2bf3be6c670 100644 --- a/resource-manager/storagesync/2020-03-01/changedetection/version.go +++ b/resource-manager/storagesync/2020-03-01/changedetection/version.go @@ -1,12 +1,10 @@ package changedetection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/changedetection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/changedetection/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/README.md b/resource-manager/storagesync/2020-03-01/cloudendpointresource/README.md index 7e69db3614f..766c8e9d3c8 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/README.md +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/cloudendpointresource` Documentation -The `cloudendpointresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `cloudendpointresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/client.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/client.go index 0610ae1640c..0628efbfddd 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/client.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/client.go @@ -15,7 +15,7 @@ type CloudEndpointResourceClient struct { } func NewCloudEndpointResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudEndpointResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudendpointresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudendpointresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudEndpointResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go index ec2056edd2f..276b24503e2 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go index 74148b8e914..669a8902e11 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointsget.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointsget.go index b2d28386599..c5155a907d4 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointsget.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointsget.go @@ -45,7 +45,6 @@ func (c CloudEndpointResourceClient) CloudEndpointsGet(ctx context.Context, id C var model CloudEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go index dd0200cc4f0..103c2802ea3 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go @@ -46,7 +46,6 @@ func (c CloudEndpointResourceClient) CloudEndpointsListBySyncGroup(ctx context.C var model CloudEndpointArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/cloudendpointresource/version.go b/resource-manager/storagesync/2020-03-01/cloudendpointresource/version.go index ed42dc8dadf..763147890bc 100644 --- a/resource-manager/storagesync/2020-03-01/cloudendpointresource/version.go +++ b/resource-manager/storagesync/2020-03-01/cloudendpointresource/version.go @@ -1,12 +1,10 @@ package cloudendpointresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudendpointresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudendpointresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/operationstatus/README.md b/resource-manager/storagesync/2020-03-01/operationstatus/README.md index d5cdc6d9953..93c4e398d53 100644 --- a/resource-manager/storagesync/2020-03-01/operationstatus/README.md +++ b/resource-manager/storagesync/2020-03-01/operationstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/operationstatus` Documentation -The `operationstatus` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `operationstatus` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/operationstatus/client.go b/resource-manager/storagesync/2020-03-01/operationstatus/client.go index 8ac4250831a..9d0c38ebca8 100644 --- a/resource-manager/storagesync/2020-03-01/operationstatus/client.go +++ b/resource-manager/storagesync/2020-03-01/operationstatus/client.go @@ -15,7 +15,7 @@ type OperationStatusClient struct { } func NewOperationStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationStatusClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/operationstatus/id_operation.go b/resource-manager/storagesync/2020-03-01/operationstatus/id_operation.go index 7f285af8de9..74444e4c844 100644 --- a/resource-manager/storagesync/2020-03-01/operationstatus/id_operation.go +++ b/resource-manager/storagesync/2020-03-01/operationstatus/id_operation.go @@ -42,7 +42,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/operationstatus/method_locationoperationstatus.go b/resource-manager/storagesync/2020-03-01/operationstatus/method_locationoperationstatus.go index b1eafe45d3f..7300896d8e2 100644 --- a/resource-manager/storagesync/2020-03-01/operationstatus/method_locationoperationstatus.go +++ b/resource-manager/storagesync/2020-03-01/operationstatus/method_locationoperationstatus.go @@ -45,7 +45,6 @@ func (c OperationStatusClient) LocationOperationStatus(ctx context.Context, id O var model LocationOperationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/operationstatus/version.go b/resource-manager/storagesync/2020-03-01/operationstatus/version.go index 15e2bcaa21d..da042a42146 100644 --- a/resource-manager/storagesync/2020-03-01/operationstatus/version.go +++ b/resource-manager/storagesync/2020-03-01/operationstatus/version.go @@ -1,12 +1,10 @@ package operationstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationstatus/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/README.md b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/README.md index 94eb401385d..4cd25ac3f6f 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/README.md +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource` Documentation -The `privateendpointconnectionresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `privateendpointconnectionresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/client.go b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/client.go index ed2f3c69ee7..58aa7eebc12 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/client.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionResourceClient struct { } func NewPrivateEndpointConnectionResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnectionresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnectionresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/id_storagesyncservice.go index 65f52ff48ce..a738e527c88 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go index 3724a5a0d25..36bd293c76c 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionResourceClient) PrivateEndpointConnectionsListB var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/version.go b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/version.go index 12c5680d7f2..b1b7af02f92 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/version.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnectionresource/version.go @@ -1,12 +1,10 @@ package privateendpointconnectionresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnectionresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnectionresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnections/README.md b/resource-manager/storagesync/2020-03-01/privateendpointconnections/README.md index 5818529c33f..debbd73aff8 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnections/README.md +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnections/client.go b/resource-manager/storagesync/2020-03-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnections/client.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/storagesync/2020-03-01/privateendpointconnections/id_privateendpointconnection.go index ec1bd533d5e..fc22944c347 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnections/method_get.go b/resource-manager/storagesync/2020-03-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnections/method_get.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/privateendpointconnections/version.go b/resource-manager/storagesync/2020-03-01/privateendpointconnections/version.go index 1d09203662a..4a5d1928532 100644 --- a/resource-manager/storagesync/2020-03-01/privateendpointconnections/version.go +++ b/resource-manager/storagesync/2020-03-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/privatelinkresources/README.md b/resource-manager/storagesync/2020-03-01/privatelinkresources/README.md index c430ef5c82c..5f490f52c5c 100644 --- a/resource-manager/storagesync/2020-03-01/privatelinkresources/README.md +++ b/resource-manager/storagesync/2020-03-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/privatelinkresources/client.go b/resource-manager/storagesync/2020-03-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/storagesync/2020-03-01/privatelinkresources/client.go +++ b/resource-manager/storagesync/2020-03-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/privatelinkresources/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/privatelinkresources/id_storagesyncservice.go index 13eb6cd1897..7230a099496 100644 --- a/resource-manager/storagesync/2020-03-01/privatelinkresources/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/privatelinkresources/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/privatelinkresources/method_listbystoragesyncservice.go b/resource-manager/storagesync/2020-03-01/privatelinkresources/method_listbystoragesyncservice.go index 03df811995b..52354f01af4 100644 --- a/resource-manager/storagesync/2020-03-01/privatelinkresources/method_listbystoragesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/privatelinkresources/method_listbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByStorageSyncService(ctx context.Context var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/privatelinkresources/version.go b/resource-manager/storagesync/2020-03-01/privatelinkresources/version.go index cb1a19e038e..237041ddfe8 100644 --- a/resource-manager/storagesync/2020-03-01/privatelinkresources/version.go +++ b/resource-manager/storagesync/2020-03-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/README.md b/resource-manager/storagesync/2020-03-01/registeredserverresource/README.md index 8d34e481816..0053a1bfdaf 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/README.md +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/registeredserverresource` Documentation -The `registeredserverresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `registeredserverresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/client.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/client.go index b1ee6e2a565..cba938bf266 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/client.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/client.go @@ -15,7 +15,7 @@ type RegisteredServerResourceClient struct { } func NewRegisteredServerResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredServerResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredserverresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredserverresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredServerResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/id_registeredserver.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/id_registeredserver.go index 0db72c025d2..6d9397778c2 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/id_registeredserver.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/id_registeredserver.go @@ -44,7 +44,7 @@ func ParseRegisteredServerID(input string) (*RegisteredServerId, error) { } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredServerIDInsensitively(input string) (*RegisteredServerId, er } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/id_storagesyncservice.go index f671ced549f..acf80398495 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserversget.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserversget.go index 76075f446eb..e2fd904133f 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserversget.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserversget.go @@ -45,7 +45,6 @@ func (c RegisteredServerResourceClient) RegisteredServersGet(ctx context.Context var model RegisteredServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go index 4c3c2388c13..c8b3c7f6704 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c RegisteredServerResourceClient) RegisteredServersListByStorageSyncServic var model RegisteredServerArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/registeredserverresource/version.go b/resource-manager/storagesync/2020-03-01/registeredserverresource/version.go index aa095fcb8b6..53d9d6625b6 100644 --- a/resource-manager/storagesync/2020-03-01/registeredserverresource/version.go +++ b/resource-manager/storagesync/2020-03-01/registeredserverresource/version.go @@ -1,12 +1,10 @@ package registeredserverresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredserverresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredserverresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/README.md b/resource-manager/storagesync/2020-03-01/serverendpointresource/README.md index 5a119896d27..e18ededddd9 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/README.md +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/serverendpointresource` Documentation -The `serverendpointresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `serverendpointresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/client.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/client.go index f271fb80cdd..6bc241fe18f 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/client.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/client.go @@ -15,7 +15,7 @@ type ServerEndpointResourceClient struct { } func NewServerEndpointResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerEndpointResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverendpointresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverendpointresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerEndpointResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/id_serverendpoint.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/id_serverendpoint.go index bb3127c0aa0..1acaa6de4a0 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/id_serverendpoint.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/id_serverendpoint.go @@ -46,7 +46,7 @@ func ParseServerEndpointID(input string) (*ServerEndpointId, error) { } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServerEndpointIDInsensitively(input string) (*ServerEndpointId, error) } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/id_syncgroup.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/id_syncgroup.go index da829c13661..bc433b9e449 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/id_syncgroup.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointsget.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointsget.go index c223fad2ab5..fde4b957eee 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointsget.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointsget.go @@ -45,7 +45,6 @@ func (c ServerEndpointResourceClient) ServerEndpointsGet(ctx context.Context, id var model ServerEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointslistbysyncgroup.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointslistbysyncgroup.go index fe8bae2b91a..70aa4b357d2 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointslistbysyncgroup.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/method_serverendpointslistbysyncgroup.go @@ -46,7 +46,6 @@ func (c ServerEndpointResourceClient) ServerEndpointsListBySyncGroup(ctx context var model ServerEndpointArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/serverendpointresource/version.go b/resource-manager/storagesync/2020-03-01/serverendpointresource/version.go index 9103e1e958d..83ac559eb40 100644 --- a/resource-manager/storagesync/2020-03-01/serverendpointresource/version.go +++ b/resource-manager/storagesync/2020-03-01/serverendpointresource/version.go @@ -1,12 +1,10 @@ package serverendpointresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverendpointresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverendpointresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservice/README.md b/resource-manager/storagesync/2020-03-01/storagesyncservice/README.md index dedc2c9b0a2..14f62a84d6a 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservice/README.md +++ b/resource-manager/storagesync/2020-03-01/storagesyncservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservice` Documentation -The `storagesyncservice` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `storagesyncservice` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservice/client.go b/resource-manager/storagesync/2020-03-01/storagesyncservice/client.go index 2329f18fbfe..977b55870c8 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservice/client.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservice/client.go @@ -15,7 +15,7 @@ type StorageSyncServiceClient struct { } func NewStorageSyncServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageSyncServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagesyncservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagesyncservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageSyncServiceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservice/id_location.go b/resource-manager/storagesync/2020-03-01/storagesyncservice/id_location.go index 1819b11b7c0..7abee6a629a 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservice/id_location.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservice/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservice/method_checknameavailability.go b/resource-manager/storagesync/2020-03-01/storagesyncservice/method_checknameavailability.go index 6a838d664b8..296235fb8e4 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservice/method_checknameavailability.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservice/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c StorageSyncServiceClient) CheckNameAvailability(ctx context.Context, id var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservice/version.go b/resource-manager/storagesync/2020-03-01/storagesyncservice/version.go index 87dfc6a63c5..d49c5e9c37e 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservice/version.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservice/version.go @@ -1,12 +1,10 @@ package storagesyncservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagesyncservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagesyncservice/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/README.md b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/README.md index 08fd015b732..2fd64f6b26c 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/README.md +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/storagesyncservicesresource` Documentation -The `storagesyncservicesresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `storagesyncservicesresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/client.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/client.go index 78afa44b3dc..2729e72c5ce 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/client.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/client.go @@ -15,7 +15,7 @@ type StorageSyncServicesResourceClient struct { } func NewStorageSyncServicesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageSyncServicesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagesyncservicesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagesyncservicesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageSyncServicesResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go index 5b3599a5704..c0c2e5731be 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncservicesget.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncservicesget.go index 836c09f8300..25776788fd2 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncservicesget.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncservicesget.go @@ -45,7 +45,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesGet(ctx context.Co var model StorageSyncService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go index b8d2d65efb1..f3bd22328f3 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesListByResourceGrou var model StorageSyncServiceArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go index 0d83e1c8733..9bb41f89b64 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go @@ -47,7 +47,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesListBySubscription var model StorageSyncServiceArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/version.go b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/version.go index 37c902ac613..4a1e09892e7 100644 --- a/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/version.go +++ b/resource-manager/storagesync/2020-03-01/storagesyncservicesresource/version.go @@ -1,12 +1,10 @@ package storagesyncservicesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagesyncservicesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagesyncservicesresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/README.md b/resource-manager/storagesync/2020-03-01/syncgroupresource/README.md index ab51ced3163..24fa98831c4 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/README.md +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/syncgroupresource` Documentation -The `syncgroupresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `syncgroupresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/client.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/client.go index 867de974cc6..d9f2719c2b8 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/client.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/client.go @@ -15,7 +15,7 @@ type SyncGroupResourceClient struct { } func NewSyncGroupResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncGroupResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncgroupresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncgroupresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncGroupResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go index de79c3af310..66842f6fc43 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go index 107f7b35265..caa2eb9bdd8 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupscreate.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupscreate.go index ac2d7378844..0bd9e3623bb 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupscreate.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupscreate.go @@ -49,7 +49,6 @@ func (c SyncGroupResourceClient) SyncGroupsCreate(ctx context.Context, id SyncGr var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupsget.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupsget.go index 1fcde3f8202..859e169adb6 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupsget.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupsget.go @@ -45,7 +45,6 @@ func (c SyncGroupResourceClient) SyncGroupsGet(ctx context.Context, id SyncGroup var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go index da1c49eb341..7651ad30901 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c SyncGroupResourceClient) SyncGroupsListByStorageSyncService(ctx context. var model SyncGroupArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/syncgroupresource/version.go b/resource-manager/storagesync/2020-03-01/syncgroupresource/version.go index be3d8ef4ddb..6e628e0223d 100644 --- a/resource-manager/storagesync/2020-03-01/syncgroupresource/version.go +++ b/resource-manager/storagesync/2020-03-01/syncgroupresource/version.go @@ -1,12 +1,10 @@ package syncgroupresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncgroupresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncgroupresource/2020-03-01" } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/README.md b/resource-manager/storagesync/2020-03-01/workflowresource/README.md index 34a20c94df3..dc00345e8ab 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/README.md +++ b/resource-manager/storagesync/2020-03-01/workflowresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2020-03-01/workflowresource` Documentation -The `workflowresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2020-03-01`). +The `workflowresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/client.go b/resource-manager/storagesync/2020-03-01/workflowresource/client.go index 135ac6fdbd9..2ee50ac918e 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/client.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/client.go @@ -15,7 +15,7 @@ type WorkflowResourceClient struct { } func NewWorkflowResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/id_storagesyncservice.go b/resource-manager/storagesync/2020-03-01/workflowresource/id_storagesyncservice.go index f8fbc1ed691..c8740d103f1 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/id_workflow.go b/resource-manager/storagesync/2020-03-01/workflowresource/id_workflow.go index 9a6c4413ff8..e564a27857a 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/id_workflow.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowsget.go b/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowsget.go index b0d87c52d27..969cdbb4375 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowsget.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowsget.go @@ -45,7 +45,6 @@ func (c WorkflowResourceClient) WorkflowsGet(ctx context.Context, id WorkflowId) var model Workflow result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowslistbystoragesyncservice.go b/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowslistbystoragesyncservice.go index fd94e858b95..8ee71839bf5 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/method_workflowslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c WorkflowResourceClient) WorkflowsListByStorageSyncService(ctx context.Co var model WorkflowArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2020-03-01/workflowresource/version.go b/resource-manager/storagesync/2020-03-01/workflowresource/version.go index 8b100d2d6db..98f1905ae1b 100644 --- a/resource-manager/storagesync/2020-03-01/workflowresource/version.go +++ b/resource-manager/storagesync/2020-03-01/workflowresource/version.go @@ -1,12 +1,10 @@ package workflowresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowresource/2020-03-01" } diff --git a/resource-manager/storagesync/2022-09-01/actions/README.md b/resource-manager/storagesync/2022-09-01/actions/README.md index e187f491157..641484a593e 100644 --- a/resource-manager/storagesync/2022-09-01/actions/README.md +++ b/resource-manager/storagesync/2022-09-01/actions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/actions` Documentation -The `actions` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `actions` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/actions/client.go b/resource-manager/storagesync/2022-09-01/actions/client.go index a2b7d01bfe1..e48ea898fd0 100644 --- a/resource-manager/storagesync/2022-09-01/actions/client.go +++ b/resource-manager/storagesync/2022-09-01/actions/client.go @@ -15,7 +15,7 @@ type ActionsClient struct { } func NewActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "actions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "actions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ActionsClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/actions/id_cloudendpoint.go b/resource-manager/storagesync/2022-09-01/actions/id_cloudendpoint.go index 4a8b0a07d98..bf700950ade 100644 --- a/resource-manager/storagesync/2022-09-01/actions/id_cloudendpoint.go +++ b/resource-manager/storagesync/2022-09-01/actions/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/actions/id_registeredserver.go b/resource-manager/storagesync/2022-09-01/actions/id_registeredserver.go index 4893ff628a5..cc77b77b99f 100644 --- a/resource-manager/storagesync/2022-09-01/actions/id_registeredserver.go +++ b/resource-manager/storagesync/2022-09-01/actions/id_registeredserver.go @@ -44,7 +44,7 @@ func ParseRegisteredServerID(input string) (*RegisteredServerId, error) { } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredServerIDInsensitively(input string) (*RegisteredServerId, er } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/actions/id_serverendpoint.go b/resource-manager/storagesync/2022-09-01/actions/id_serverendpoint.go index 33bdbda2b50..395a0249bf6 100644 --- a/resource-manager/storagesync/2022-09-01/actions/id_serverendpoint.go +++ b/resource-manager/storagesync/2022-09-01/actions/id_serverendpoint.go @@ -46,7 +46,7 @@ func ParseServerEndpointID(input string) (*ServerEndpointId, error) { } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServerEndpointIDInsensitively(input string) (*ServerEndpointId, error) } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/actions/id_workflow.go b/resource-manager/storagesync/2022-09-01/actions/id_workflow.go index 0d84a0e06d2..45721804bae 100644 --- a/resource-manager/storagesync/2022-09-01/actions/id_workflow.go +++ b/resource-manager/storagesync/2022-09-01/actions/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/actions/method_cloudendpointsafssharemetadatacertificatepublickeys.go b/resource-manager/storagesync/2022-09-01/actions/method_cloudendpointsafssharemetadatacertificatepublickeys.go index 7413747d460..0e5d3f190fa 100644 --- a/resource-manager/storagesync/2022-09-01/actions/method_cloudendpointsafssharemetadatacertificatepublickeys.go +++ b/resource-manager/storagesync/2022-09-01/actions/method_cloudendpointsafssharemetadatacertificatepublickeys.go @@ -46,7 +46,6 @@ func (c ActionsClient) CloudEndpointsAfsShareMetadataCertificatePublicKeys(ctx c var model CloudEndpointAfsShareMetadataCertificatePublicKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/actions/version.go b/resource-manager/storagesync/2022-09-01/actions/version.go index 35267c76561..1b294a6a4e2 100644 --- a/resource-manager/storagesync/2022-09-01/actions/version.go +++ b/resource-manager/storagesync/2022-09-01/actions/version.go @@ -1,12 +1,10 @@ package actions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/actions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/actions/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/backuprestore/README.md b/resource-manager/storagesync/2022-09-01/backuprestore/README.md index 6bcb81b218d..044f31943dd 100644 --- a/resource-manager/storagesync/2022-09-01/backuprestore/README.md +++ b/resource-manager/storagesync/2022-09-01/backuprestore/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/backuprestore` Documentation -The `backuprestore` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `backuprestore` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/backuprestore/client.go b/resource-manager/storagesync/2022-09-01/backuprestore/client.go index 596612e9763..e678b431519 100644 --- a/resource-manager/storagesync/2022-09-01/backuprestore/client.go +++ b/resource-manager/storagesync/2022-09-01/backuprestore/client.go @@ -15,7 +15,7 @@ type BackupRestoreClient struct { } func NewBackupRestoreClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupRestoreClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "backuprestore", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "backuprestore", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BackupRestoreClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/backuprestore/id_cloudendpoint.go b/resource-manager/storagesync/2022-09-01/backuprestore/id_cloudendpoint.go index 224e55a8a61..6bd385ab67e 100644 --- a/resource-manager/storagesync/2022-09-01/backuprestore/id_cloudendpoint.go +++ b/resource-manager/storagesync/2022-09-01/backuprestore/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/backuprestore/method_cloudendpointsafssharemetadatacertificatepublickeys.go b/resource-manager/storagesync/2022-09-01/backuprestore/method_cloudendpointsafssharemetadatacertificatepublickeys.go index d69d9ad7166..2b351231a15 100644 --- a/resource-manager/storagesync/2022-09-01/backuprestore/method_cloudendpointsafssharemetadatacertificatepublickeys.go +++ b/resource-manager/storagesync/2022-09-01/backuprestore/method_cloudendpointsafssharemetadatacertificatepublickeys.go @@ -46,7 +46,6 @@ func (c BackupRestoreClient) CloudEndpointsAfsShareMetadataCertificatePublicKeys var model CloudEndpointAfsShareMetadataCertificatePublicKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/backuprestore/version.go b/resource-manager/storagesync/2022-09-01/backuprestore/version.go index ea26d24fcd1..6bb41f3009d 100644 --- a/resource-manager/storagesync/2022-09-01/backuprestore/version.go +++ b/resource-manager/storagesync/2022-09-01/backuprestore/version.go @@ -1,12 +1,10 @@ package backuprestore -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/backuprestore/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/backuprestore/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/changedetection/README.md b/resource-manager/storagesync/2022-09-01/changedetection/README.md index ae52c70daf2..e1234e46ef6 100644 --- a/resource-manager/storagesync/2022-09-01/changedetection/README.md +++ b/resource-manager/storagesync/2022-09-01/changedetection/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/changedetection` Documentation -The `changedetection` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `changedetection` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/changedetection/client.go b/resource-manager/storagesync/2022-09-01/changedetection/client.go index 856bf2581c6..058ce5cb9ed 100644 --- a/resource-manager/storagesync/2022-09-01/changedetection/client.go +++ b/resource-manager/storagesync/2022-09-01/changedetection/client.go @@ -15,7 +15,7 @@ type ChangeDetectionClient struct { } func NewChangeDetectionClientWithBaseURI(sdkApi sdkEnv.Api) (*ChangeDetectionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "changedetection", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "changedetection", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ChangeDetectionClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/changedetection/id_cloudendpoint.go b/resource-manager/storagesync/2022-09-01/changedetection/id_cloudendpoint.go index 2c97a8c1a2d..01bde3c77aa 100644 --- a/resource-manager/storagesync/2022-09-01/changedetection/id_cloudendpoint.go +++ b/resource-manager/storagesync/2022-09-01/changedetection/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/changedetection/version.go b/resource-manager/storagesync/2022-09-01/changedetection/version.go index dbb2c560ede..91cdbf6cbad 100644 --- a/resource-manager/storagesync/2022-09-01/changedetection/version.go +++ b/resource-manager/storagesync/2022-09-01/changedetection/version.go @@ -1,12 +1,10 @@ package changedetection -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/changedetection/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/changedetection/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/README.md b/resource-manager/storagesync/2022-09-01/cloudendpointresource/README.md index dabafb42362..7e5547e87ac 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/README.md +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/cloudendpointresource` Documentation -The `cloudendpointresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `cloudendpointresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/client.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/client.go index 0610ae1640c..0628efbfddd 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/client.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/client.go @@ -15,7 +15,7 @@ type CloudEndpointResourceClient struct { } func NewCloudEndpointResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudEndpointResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudendpointresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudendpointresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudEndpointResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_cloudendpoint.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_cloudendpoint.go index ec2056edd2f..276b24503e2 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_cloudendpoint.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_cloudendpoint.go @@ -46,7 +46,7 @@ func ParseCloudEndpointID(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseCloudEndpointIDInsensitively(input string) (*CloudEndpointId, error) { } id := CloudEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_syncgroup.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_syncgroup.go index 74148b8e914..669a8902e11 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_syncgroup.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsafssharemetadatacertificatepublickeys.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsafssharemetadatacertificatepublickeys.go index 0b5043b84ea..59aa058d752 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsafssharemetadatacertificatepublickeys.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsafssharemetadatacertificatepublickeys.go @@ -46,7 +46,6 @@ func (c CloudEndpointResourceClient) CloudEndpointsAfsShareMetadataCertificatePu var model CloudEndpointAfsShareMetadataCertificatePublicKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsget.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsget.go index b2d28386599..c5155a907d4 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsget.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointsget.go @@ -45,7 +45,6 @@ func (c CloudEndpointResourceClient) CloudEndpointsGet(ctx context.Context, id C var model CloudEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go index dd0200cc4f0..103c2802ea3 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/method_cloudendpointslistbysyncgroup.go @@ -46,7 +46,6 @@ func (c CloudEndpointResourceClient) CloudEndpointsListBySyncGroup(ctx context.C var model CloudEndpointArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/cloudendpointresource/version.go b/resource-manager/storagesync/2022-09-01/cloudendpointresource/version.go index 6f6277074f4..dadf9dde0ae 100644 --- a/resource-manager/storagesync/2022-09-01/cloudendpointresource/version.go +++ b/resource-manager/storagesync/2022-09-01/cloudendpointresource/version.go @@ -1,12 +1,10 @@ package cloudendpointresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudendpointresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudendpointresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/operationstatus/README.md b/resource-manager/storagesync/2022-09-01/operationstatus/README.md index d63a1c127a3..a4c0aa8278a 100644 --- a/resource-manager/storagesync/2022-09-01/operationstatus/README.md +++ b/resource-manager/storagesync/2022-09-01/operationstatus/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/operationstatus` Documentation -The `operationstatus` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `operationstatus` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/operationstatus/client.go b/resource-manager/storagesync/2022-09-01/operationstatus/client.go index 8ac4250831a..9d0c38ebca8 100644 --- a/resource-manager/storagesync/2022-09-01/operationstatus/client.go +++ b/resource-manager/storagesync/2022-09-01/operationstatus/client.go @@ -15,7 +15,7 @@ type OperationStatusClient struct { } func NewOperationStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationStatusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operationstatus", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operationstatus", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationStatusClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/operationstatus/id_operation.go b/resource-manager/storagesync/2022-09-01/operationstatus/id_operation.go index 7f285af8de9..74444e4c844 100644 --- a/resource-manager/storagesync/2022-09-01/operationstatus/id_operation.go +++ b/resource-manager/storagesync/2022-09-01/operationstatus/id_operation.go @@ -42,7 +42,7 @@ func ParseOperationID(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseOperationIDInsensitively(input string) (*OperationId, error) { } id := OperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/operationstatus/method_locationoperationstatus.go b/resource-manager/storagesync/2022-09-01/operationstatus/method_locationoperationstatus.go index b1eafe45d3f..7300896d8e2 100644 --- a/resource-manager/storagesync/2022-09-01/operationstatus/method_locationoperationstatus.go +++ b/resource-manager/storagesync/2022-09-01/operationstatus/method_locationoperationstatus.go @@ -45,7 +45,6 @@ func (c OperationStatusClient) LocationOperationStatus(ctx context.Context, id O var model LocationOperationStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/operationstatus/version.go b/resource-manager/storagesync/2022-09-01/operationstatus/version.go index ec7b61eb5ca..863cad98430 100644 --- a/resource-manager/storagesync/2022-09-01/operationstatus/version.go +++ b/resource-manager/storagesync/2022-09-01/operationstatus/version.go @@ -1,12 +1,10 @@ package operationstatus -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operationstatus/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operationstatus/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/README.md b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/README.md index aeef1f23693..de78df0e2fb 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/README.md +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource` Documentation -The `privateendpointconnectionresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `privateendpointconnectionresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/client.go b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/client.go index ed2f3c69ee7..58aa7eebc12 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/client.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionResourceClient struct { } func NewPrivateEndpointConnectionResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnectionresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnectionresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/id_storagesyncservice.go index 65f52ff48ce..a738e527c88 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go index 3724a5a0d25..36bd293c76c 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/method_privateendpointconnectionslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c PrivateEndpointConnectionResourceClient) PrivateEndpointConnectionsListB var model PrivateEndpointConnectionListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/version.go b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/version.go index aaa85f61a54..72311de22c7 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/version.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnectionresource/version.go @@ -1,12 +1,10 @@ package privateendpointconnectionresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnectionresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnectionresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnections/README.md b/resource-manager/storagesync/2022-09-01/privateendpointconnections/README.md index 89fde9921a9..8dcbef74868 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnections/README.md +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnections/client.go b/resource-manager/storagesync/2022-09-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnections/client.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/storagesync/2022-09-01/privateendpointconnections/id_privateendpointconnection.go index ec1bd533d5e..fc22944c347 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnections/method_get.go b/resource-manager/storagesync/2022-09-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnections/method_get.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/privateendpointconnections/version.go b/resource-manager/storagesync/2022-09-01/privateendpointconnections/version.go index 3e577291d0e..9e664bb38ba 100644 --- a/resource-manager/storagesync/2022-09-01/privateendpointconnections/version.go +++ b/resource-manager/storagesync/2022-09-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/privatelinkresources/README.md b/resource-manager/storagesync/2022-09-01/privatelinkresources/README.md index a27345b89a8..480180e79cc 100644 --- a/resource-manager/storagesync/2022-09-01/privatelinkresources/README.md +++ b/resource-manager/storagesync/2022-09-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/privatelinkresources/client.go b/resource-manager/storagesync/2022-09-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/storagesync/2022-09-01/privatelinkresources/client.go +++ b/resource-manager/storagesync/2022-09-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/privatelinkresources/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/privatelinkresources/id_storagesyncservice.go index 13eb6cd1897..7230a099496 100644 --- a/resource-manager/storagesync/2022-09-01/privatelinkresources/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/privatelinkresources/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/privatelinkresources/method_listbystoragesyncservice.go b/resource-manager/storagesync/2022-09-01/privatelinkresources/method_listbystoragesyncservice.go index 03df811995b..52354f01af4 100644 --- a/resource-manager/storagesync/2022-09-01/privatelinkresources/method_listbystoragesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/privatelinkresources/method_listbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c PrivateLinkResourcesClient) ListByStorageSyncService(ctx context.Context var model PrivateLinkResourceListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/privatelinkresources/version.go b/resource-manager/storagesync/2022-09-01/privatelinkresources/version.go index 2c078a4dcad..181070b53b5 100644 --- a/resource-manager/storagesync/2022-09-01/privatelinkresources/version.go +++ b/resource-manager/storagesync/2022-09-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/README.md b/resource-manager/storagesync/2022-09-01/registeredserverresource/README.md index 3778b335775..db542345701 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/README.md +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/registeredserverresource` Documentation -The `registeredserverresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `registeredserverresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/client.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/client.go index b1ee6e2a565..cba938bf266 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/client.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/client.go @@ -15,7 +15,7 @@ type RegisteredServerResourceClient struct { } func NewRegisteredServerResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*RegisteredServerResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "registeredserverresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "registeredserverresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RegisteredServerResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/id_registeredserver.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/id_registeredserver.go index 0db72c025d2..6d9397778c2 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/id_registeredserver.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/id_registeredserver.go @@ -44,7 +44,7 @@ func ParseRegisteredServerID(input string) (*RegisteredServerId, error) { } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRegisteredServerIDInsensitively(input string) (*RegisteredServerId, er } id := RegisteredServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/id_storagesyncservice.go index f671ced549f..acf80398495 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserversget.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserversget.go index 76075f446eb..e2fd904133f 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserversget.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserversget.go @@ -45,7 +45,6 @@ func (c RegisteredServerResourceClient) RegisteredServersGet(ctx context.Context var model RegisteredServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go index 4c3c2388c13..c8b3c7f6704 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/method_registeredserverslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c RegisteredServerResourceClient) RegisteredServersListByStorageSyncServic var model RegisteredServerArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/registeredserverresource/version.go b/resource-manager/storagesync/2022-09-01/registeredserverresource/version.go index 924e3688736..584cfb4695a 100644 --- a/resource-manager/storagesync/2022-09-01/registeredserverresource/version.go +++ b/resource-manager/storagesync/2022-09-01/registeredserverresource/version.go @@ -1,12 +1,10 @@ package registeredserverresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/registeredserverresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/registeredserverresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/README.md b/resource-manager/storagesync/2022-09-01/serverendpointresource/README.md index 1a36eff0c27..31caf084b77 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/README.md +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/serverendpointresource` Documentation -The `serverendpointresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `serverendpointresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/client.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/client.go index f271fb80cdd..6bc241fe18f 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/client.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/client.go @@ -15,7 +15,7 @@ type ServerEndpointResourceClient struct { } func NewServerEndpointResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerEndpointResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "serverendpointresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "serverendpointresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ServerEndpointResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/id_serverendpoint.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/id_serverendpoint.go index bb3127c0aa0..1acaa6de4a0 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/id_serverendpoint.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/id_serverendpoint.go @@ -46,7 +46,7 @@ func ParseServerEndpointID(input string) (*ServerEndpointId, error) { } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseServerEndpointIDInsensitively(input string) (*ServerEndpointId, error) } id := ServerEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/id_syncgroup.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/id_syncgroup.go index da829c13661..bc433b9e449 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/id_syncgroup.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointsget.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointsget.go index c223fad2ab5..fde4b957eee 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointsget.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointsget.go @@ -45,7 +45,6 @@ func (c ServerEndpointResourceClient) ServerEndpointsGet(ctx context.Context, id var model ServerEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointslistbysyncgroup.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointslistbysyncgroup.go index fe8bae2b91a..70aa4b357d2 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointslistbysyncgroup.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/method_serverendpointslistbysyncgroup.go @@ -46,7 +46,6 @@ func (c ServerEndpointResourceClient) ServerEndpointsListBySyncGroup(ctx context var model ServerEndpointArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/serverendpointresource/version.go b/resource-manager/storagesync/2022-09-01/serverendpointresource/version.go index d696730d256..90b89f32da5 100644 --- a/resource-manager/storagesync/2022-09-01/serverendpointresource/version.go +++ b/resource-manager/storagesync/2022-09-01/serverendpointresource/version.go @@ -1,12 +1,10 @@ package serverendpointresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serverendpointresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/serverendpointresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservice/README.md b/resource-manager/storagesync/2022-09-01/storagesyncservice/README.md index 557c3cc2e64..c5b4bd44459 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservice/README.md +++ b/resource-manager/storagesync/2022-09-01/storagesyncservice/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/storagesyncservice` Documentation -The `storagesyncservice` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `storagesyncservice` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservice/client.go b/resource-manager/storagesync/2022-09-01/storagesyncservice/client.go index 2329f18fbfe..977b55870c8 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservice/client.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservice/client.go @@ -15,7 +15,7 @@ type StorageSyncServiceClient struct { } func NewStorageSyncServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageSyncServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagesyncservice", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagesyncservice", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageSyncServiceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservice/id_location.go b/resource-manager/storagesync/2022-09-01/storagesyncservice/id_location.go index 1819b11b7c0..7abee6a629a 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservice/id_location.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservice/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservice/method_checknameavailability.go b/resource-manager/storagesync/2022-09-01/storagesyncservice/method_checknameavailability.go index 6a838d664b8..296235fb8e4 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservice/method_checknameavailability.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservice/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c StorageSyncServiceClient) CheckNameAvailability(ctx context.Context, id var model CheckNameAvailabilityResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservice/version.go b/resource-manager/storagesync/2022-09-01/storagesyncservice/version.go index aea914ff0bd..619d5afcaa1 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservice/version.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservice/version.go @@ -1,12 +1,10 @@ package storagesyncservice -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagesyncservice/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagesyncservice/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/README.md b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/README.md index 27d25d9d2f6..f96b9c73d7a 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/README.md +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/storagesyncservicesresource` Documentation -The `storagesyncservicesresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `storagesyncservicesresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/client.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/client.go index 78afa44b3dc..2729e72c5ce 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/client.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/client.go @@ -15,7 +15,7 @@ type StorageSyncServicesResourceClient struct { } func NewStorageSyncServicesResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*StorageSyncServicesResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "storagesyncservicesresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "storagesyncservicesresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StorageSyncServicesResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/id_storagesyncservice.go index 5b3599a5704..c0c2e5731be 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncservicesget.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncservicesget.go index 836c09f8300..25776788fd2 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncservicesget.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncservicesget.go @@ -45,7 +45,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesGet(ctx context.Co var model StorageSyncService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go index b8d2d65efb1..f3bd22328f3 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesListByResourceGrou var model StorageSyncServiceArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go index 0d83e1c8733..9bb41f89b64 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/method_storagesyncserviceslistbysubscription.go @@ -47,7 +47,6 @@ func (c StorageSyncServicesResourceClient) StorageSyncServicesListBySubscription var model StorageSyncServiceArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/version.go b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/version.go index 452e8e38f77..0ccb0b9a632 100644 --- a/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/version.go +++ b/resource-manager/storagesync/2022-09-01/storagesyncservicesresource/version.go @@ -1,12 +1,10 @@ package storagesyncservicesresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/storagesyncservicesresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/storagesyncservicesresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/README.md b/resource-manager/storagesync/2022-09-01/syncgroupresource/README.md index ec7f7b58def..2462e6f2e23 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/README.md +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/syncgroupresource` Documentation -The `syncgroupresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `syncgroupresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/client.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/client.go index 867de974cc6..d9f2719c2b8 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/client.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/client.go @@ -15,7 +15,7 @@ type SyncGroupResourceClient struct { } func NewSyncGroupResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncGroupResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "syncgroupresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "syncgroupresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SyncGroupResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/id_storagesyncservice.go index de79c3af310..66842f6fc43 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/id_syncgroup.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/id_syncgroup.go index 107f7b35265..caa2eb9bdd8 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/id_syncgroup.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/id_syncgroup.go @@ -44,7 +44,7 @@ func ParseSyncGroupID(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error) { } id := SyncGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupscreate.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupscreate.go index ac2d7378844..0bd9e3623bb 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupscreate.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupscreate.go @@ -49,7 +49,6 @@ func (c SyncGroupResourceClient) SyncGroupsCreate(ctx context.Context, id SyncGr var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupsget.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupsget.go index 1fcde3f8202..859e169adb6 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupsget.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupsget.go @@ -45,7 +45,6 @@ func (c SyncGroupResourceClient) SyncGroupsGet(ctx context.Context, id SyncGroup var model SyncGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go index da1c49eb341..7651ad30901 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/method_syncgroupslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c SyncGroupResourceClient) SyncGroupsListByStorageSyncService(ctx context. var model SyncGroupArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/syncgroupresource/version.go b/resource-manager/storagesync/2022-09-01/syncgroupresource/version.go index 419e4e40fd9..7add555f298 100644 --- a/resource-manager/storagesync/2022-09-01/syncgroupresource/version.go +++ b/resource-manager/storagesync/2022-09-01/syncgroupresource/version.go @@ -1,12 +1,10 @@ package syncgroupresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/syncgroupresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/syncgroupresource/2022-09-01" } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/README.md b/resource-manager/storagesync/2022-09-01/workflowresource/README.md index dac3fc9b157..f2c21f9e0c0 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/README.md +++ b/resource-manager/storagesync/2022-09-01/workflowresource/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/storagesync/2022-09-01/workflowresource` Documentation -The `workflowresource` SDK allows for interaction with the Azure Resource Manager Service `storagesync` (API Version `2022-09-01`). +The `workflowresource` SDK allows for interaction with Azure Resource Manager `storagesync` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/client.go b/resource-manager/storagesync/2022-09-01/workflowresource/client.go index 135ac6fdbd9..2ee50ac918e 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/client.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/client.go @@ -15,7 +15,7 @@ type WorkflowResourceClient struct { } func NewWorkflowResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowResourceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowresource", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowresource", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowResourceClient: %+v", err) } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/id_storagesyncservice.go b/resource-manager/storagesync/2022-09-01/workflowresource/id_storagesyncservice.go index f8fbc1ed691..c8740d103f1 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/id_storagesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/id_storagesyncservice.go @@ -42,7 +42,7 @@ func ParseStorageSyncServiceID(input string) (*StorageSyncServiceId, error) { } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStorageSyncServiceIDInsensitively(input string) (*StorageSyncServiceId } id := StorageSyncServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/id_workflow.go b/resource-manager/storagesync/2022-09-01/workflowresource/id_workflow.go index 9a6c4413ff8..e564a27857a 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/id_workflow.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowsget.go b/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowsget.go index b0d87c52d27..969cdbb4375 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowsget.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowsget.go @@ -45,7 +45,6 @@ func (c WorkflowResourceClient) WorkflowsGet(ctx context.Context, id WorkflowId) var model Workflow result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowslistbystoragesyncservice.go b/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowslistbystoragesyncservice.go index fd94e858b95..8ee71839bf5 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowslistbystoragesyncservice.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/method_workflowslistbystoragesyncservice.go @@ -46,7 +46,6 @@ func (c WorkflowResourceClient) WorkflowsListByStorageSyncService(ctx context.Co var model WorkflowArray result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/storagesync/2022-09-01/workflowresource/version.go b/resource-manager/storagesync/2022-09-01/workflowresource/version.go index 48cdbfe4234..a18d33733ad 100644 --- a/resource-manager/storagesync/2022-09-01/workflowresource/version.go +++ b/resource-manager/storagesync/2022-09-01/workflowresource/version.go @@ -1,12 +1,10 @@ package workflowresource -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowresource/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowresource/2022-09-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/README.md b/resource-manager/streamanalytics/2020-03-01/clusters/README.md index 6c1638f9038..c8eaf0900cf 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/README.md +++ b/resource-manager/streamanalytics/2020-03-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/client.go b/resource-manager/streamanalytics/2020-03-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/client.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go b/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go index 4bde7444265..53f2cb294c3 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/method_createorupdate.go b/resource-manager/streamanalytics/2020-03-01/clusters/method_createorupdate.go index 9e8ad9f9868..8c2205e3393 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/method_createorupdate.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/method_createorupdate.go @@ -43,6 +43,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/method_get.go b/resource-manager/streamanalytics/2020-03-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/method_update.go b/resource-manager/streamanalytics/2020-03-01/clusters/method_update.go index 0f74f78f1a7..1f52c36a7bc 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/method_update.go @@ -39,6 +39,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/clusters/version.go b/resource-manager/streamanalytics/2020-03-01/clusters/version.go index f0185755767..a186170b036 100644 --- a/resource-manager/streamanalytics/2020-03-01/clusters/version.go +++ b/resource-manager/streamanalytics/2020-03-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/README.md b/resource-manager/streamanalytics/2020-03-01/functions/README.md index 16d63841ae6..fcb094f7c4b 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/README.md +++ b/resource-manager/streamanalytics/2020-03-01/functions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/functions` Documentation -The `functions` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `functions` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/functions/client.go b/resource-manager/streamanalytics/2020-03-01/functions/client.go index 07fdb1da32c..342ebf01c86 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/client.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/client.go @@ -15,7 +15,7 @@ type FunctionsClient struct { } func NewFunctionsClientWithBaseURI(sdkApi sdkEnv.Api) (*FunctionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "functions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "functions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FunctionsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/id_function.go b/resource-manager/streamanalytics/2020-03-01/functions/id_function.go index 073641028bb..829c51c51de 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/id_function.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/id_function.go @@ -44,7 +44,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go b/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go index 08227ba2a58..f23d60b4e99 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/method_createorreplace.go b/resource-manager/streamanalytics/2020-03-01/functions/method_createorreplace.go index 7dea7554153..ed1f138eed4 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/method_createorreplace.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c FunctionsClient) CreateOrReplace(ctx context.Context, id FunctionId, inp var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/method_get.go b/resource-manager/streamanalytics/2020-03-01/functions/method_get.go index 670c49fd02c..960145e94e9 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/method_get.go @@ -45,7 +45,6 @@ func (c FunctionsClient) Get(ctx context.Context, id FunctionId) (result GetOper var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/method_listbystreamingjob.go b/resource-manager/streamanalytics/2020-03-01/functions/method_listbystreamingjob.go index e468719df51..f05c6d46876 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/method_retrievedefaultdefinition.go b/resource-manager/streamanalytics/2020-03-01/functions/method_retrievedefaultdefinition.go index 1cc7018cdce..0150693121d 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/method_retrievedefaultdefinition.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/method_retrievedefaultdefinition.go @@ -50,7 +50,6 @@ func (c FunctionsClient) RetrieveDefaultDefinition(ctx context.Context, id Funct var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/method_update.go b/resource-manager/streamanalytics/2020-03-01/functions/method_update.go index 9a6b1d2d294..152c2a26f66 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c FunctionsClient) Update(ctx context.Context, id FunctionId, input Functi var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_aggregatefunctionproperties.go b/resource-manager/streamanalytics/2020-03-01/functions/model_aggregatefunctionproperties.go index 86a1998c8f9..200a416aac5 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_aggregatefunctionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_aggregatefunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = AggregateFunctionProperties{} type AggregateFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s AggregateFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = AggregateFunctionProperties{} @@ -28,9 +38,10 @@ func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) } + decoded["type"] = "Aggregate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionbinding.go b/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionbinding.go index 8581f5be64c..0be6d76df8f 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningWebServiceFunctionBinding struct { Properties *AzureMachineLearningWebServiceFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningWebServiceFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningWebServiceFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningWebServiceFunctionBinding) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningWebServiceFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionretrievedefaultdefinitionparameters.go index f64e7b2570b..d54c7a4aea6 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_azuremachinelearningwebservicefunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters s BindingRetrievalProperties *AzureMachineLearningWebServiceFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameter } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_function.go b/resource-manager/streamanalytics/2020-03-01/functions/model_function.go index 2abf7cfc9d3..c6d328714f8 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_function.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_function.go @@ -34,7 +34,7 @@ func (s *Function) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalFunctionPropertiesImplementation(v) + impl, err := UnmarshalFunctionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_functionbinding.go b/resource-manager/streamanalytics/2020-03-01/functions/model_functionbinding.go index b1a7c39083a..b15fc0a750a 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_functionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_functionbinding.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionBinding interface { + FunctionBinding() BaseFunctionBindingImpl } -// RawFunctionBindingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionBinding = BaseFunctionBindingImpl{} + +type BaseFunctionBindingImpl struct { + Type string `json:"type"` +} + +func (s BaseFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s +} + +var _ FunctionBinding = RawFunctionBindingImpl{} + +// RawFunctionBindingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionBindingImpl struct { - Type string - Values map[string]interface{} + functionBinding BaseFunctionBindingImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s.functionBinding } -func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { +func UnmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, erro return out, nil } - out := RawFunctionBindingImpl{ - Type: value, - Values: temp, + var parent BaseFunctionBindingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionBindingImpl: %+v", err) } - return out, nil + + return RawFunctionBindingImpl{ + functionBinding: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_functionconfiguration.go b/resource-manager/streamanalytics/2020-03-01/functions/model_functionconfiguration.go index d6bfb45f522..4eaccec2ade 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_functionconfiguration.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_functionconfiguration.go @@ -32,7 +32,7 @@ func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["binding"]; ok { - impl, err := unmarshalFunctionBindingImplementation(v) + impl, err := UnmarshalFunctionBindingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_functionproperties.go b/resource-manager/streamanalytics/2020-03-01/functions/model_functionproperties.go index 181c74ee5c0..7b82d7e2d25 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_functionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_functionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionProperties interface { + FunctionProperties() BaseFunctionPropertiesImpl } -// RawFunctionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionProperties = BaseFunctionPropertiesImpl{} + +type BaseFunctionPropertiesImpl struct { + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s BaseFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s +} + +var _ FunctionProperties = RawFunctionPropertiesImpl{} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionPropertiesImpl struct { - Type string - Values map[string]interface{} + functionProperties BaseFunctionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s.functionProperties } -func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { +func UnmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties return out, nil } - out := RawFunctionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseFunctionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionPropertiesImpl: %+v", err) } - return out, nil + + return RawFunctionPropertiesImpl{ + functionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_functionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2020-03-01/functions/model_functionretrievedefaultdefinitionparameters.go index 8a0a51f4aba..d2d35759e19 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_functionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_functionretrievedefaultdefinitionparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionRetrieveDefaultDefinitionParameters interface { + FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl } -// RawFunctionRetrieveDefaultDefinitionParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionRetrieveDefaultDefinitionParameters = BaseFunctionRetrieveDefaultDefinitionParametersImpl{} + +type BaseFunctionRetrieveDefaultDefinitionParametersImpl struct { + BindingType string `json:"bindingType"` +} + +func (s BaseFunctionRetrieveDefaultDefinitionParametersImpl) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return s +} + +var _ FunctionRetrieveDefaultDefinitionParameters = RawFunctionRetrieveDefaultDefinitionParametersImpl{} + +// RawFunctionRetrieveDefaultDefinitionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionRetrieveDefaultDefinitionParametersImpl struct { - Type string - Values map[string]interface{} + functionRetrieveDefaultDefinitionParameters BaseFunctionRetrieveDefaultDefinitionParametersImpl + Type string + Values map[string]interface{} } -func unmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input []byte) (FunctionRetrieveDefaultDefinitionParameters, error) { +func (s RawFunctionRetrieveDefaultDefinitionParametersImpl) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return s.functionRetrieveDefaultDefinitionParameters +} + +func UnmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input []byte) (FunctionRetrieveDefaultDefinitionParameters, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input [] return out, nil } - out := RawFunctionRetrieveDefaultDefinitionParametersImpl{ + var parent BaseFunctionRetrieveDefaultDefinitionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionRetrieveDefaultDefinitionParametersImpl: %+v", err) + } + + return RawFunctionRetrieveDefaultDefinitionParametersImpl{ + functionRetrieveDefaultDefinitionParameters: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionbinding.go b/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionbinding.go index 8ba9643dac7..58ce1399594 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionbinding.go @@ -14,6 +14,14 @@ type JavaScriptFunctionBinding struct { Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s JavaScriptFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = JavaScriptFunctionBinding{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go index e1c65cb6e12..25c79127f41 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type JavaScriptFunctionRetrieveDefaultDefinitionParameters struct { BindingRetrievalProperties *JavaScriptFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s JavaScriptFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = JavaScriptFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/model_scalarfunctionproperties.go b/resource-manager/streamanalytics/2020-03-01/functions/model_scalarfunctionproperties.go index bf0d985730b..64480a5e899 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/model_scalarfunctionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/model_scalarfunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = ScalarFunctionProperties{} type ScalarFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s ScalarFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = ScalarFunctionProperties{} @@ -28,9 +38,10 @@ func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) } + decoded["type"] = "Scalar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/functions/version.go b/resource-manager/streamanalytics/2020-03-01/functions/version.go index 072d1a764e5..90ebd366a3e 100644 --- a/resource-manager/streamanalytics/2020-03-01/functions/version.go +++ b/resource-manager/streamanalytics/2020-03-01/functions/version.go @@ -1,12 +1,10 @@ package functions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/functions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/functions/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/README.md b/resource-manager/streamanalytics/2020-03-01/inputs/README.md index 2e3a97aca69..50ce97941e4 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/README.md +++ b/resource-manager/streamanalytics/2020-03-01/inputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/inputs` Documentation -The `inputs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `inputs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/client.go b/resource-manager/streamanalytics/2020-03-01/inputs/client.go index fa5493aa37f..38ee7cad2f1 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/client.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/client.go @@ -15,7 +15,7 @@ type InputsClient struct { } func NewInputsClientWithBaseURI(sdkApi sdkEnv.Api) (*InputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InputsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go b/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go index d83a6e6c49c..d44642ebb58 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/id_input.go @@ -44,7 +44,7 @@ func ParseInputID(input string) (*InputId, error) { } id := InputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInputIDInsensitively(input string) (*InputId, error) { } id := InputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go b/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go index 9067b3fd8c6..c83d1912e00 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/method_createorreplace.go b/resource-manager/streamanalytics/2020-03-01/inputs/method_createorreplace.go index e42ec1acffd..76dbf541344 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c InputsClient) CreateOrReplace(ctx context.Context, id InputId, input Inp var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/method_get.go b/resource-manager/streamanalytics/2020-03-01/inputs/method_get.go index 3d03a3a34cf..60ab0f4b1d5 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/method_get.go @@ -45,7 +45,6 @@ func (c InputsClient) Get(ctx context.Context, id InputId) (result GetOperationR var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/method_listbystreamingjob.go b/resource-manager/streamanalytics/2020-03-01/inputs/method_listbystreamingjob.go index 4e682830afc..4aba162645f 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/method_update.go b/resource-manager/streamanalytics/2020-03-01/inputs/method_update.go index 0291f7c2025..b2b905bfcf8 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c InputsClient) Update(ctx context.Context, id InputId, input Input, optio var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_avroserialization.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_avroserialization.go index 9b5e4003b9b..f3486db5718 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_azuresqlreferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_azuresqlreferenceinputdatasource.go index a79836d1069..2cdc9b8ddb6 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_azuresqlreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_azuresqlreferenceinputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlReferenceInputDataSource struct { Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_blobreferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_blobreferenceinputdatasource.go index 274d914fba8..ff45e4f18c9 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_blobreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_blobreferenceinputdatasource.go @@ -14,6 +14,14 @@ type BlobReferenceInputDataSource struct { Properties *BlobDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s BlobReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_blobstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_blobstreaminputdatasource.go index c619735bae5..4a87f069f74 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_blobstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_blobstreaminputdatasource.go @@ -14,6 +14,14 @@ type BlobStreamInputDataSource struct { Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s BlobStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_csvserialization.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_csvserialization.go index a1712b42d98..793ed106b3c 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubstreaminputdatasource.go index da4a5db6550..e27807610f5 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubStreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubv2streaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubv2streaminputdatasource.go index 1344f077e5a..4a715d2a6a6 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubv2streaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_eventhubv2streaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2StreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2StreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2StreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_filereferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_filereferenceinputdatasource.go index bca612a4940..ba205742246 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_filereferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_filereferenceinputdatasource.go @@ -14,6 +14,14 @@ type FileReferenceInputDataSource struct { Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s FileReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = FileReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) } + decoded["type"] = "File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_gatewaymessagebusstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_gatewaymessagebusstreaminputdatasource.go index 4f16a09b403..20263bdfe43 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_gatewaymessagebusstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_gatewaymessagebusstreaminputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusStreamInputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_input.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_input.go index 450ad8eb738..72b9519e169 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_input.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_input.go @@ -34,7 +34,7 @@ func (s *Input) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInputPropertiesImplementation(v) + impl, err := UnmarshalInputPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_inputproperties.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_inputproperties.go index cbc3c04c4cf..4c0d815897f 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_inputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_inputproperties.go @@ -10,18 +10,70 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputProperties interface { + InputProperties() BaseInputPropertiesImpl } -// RawInputPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputProperties = BaseInputPropertiesImpl{} + +type BaseInputPropertiesImpl struct { + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s BaseInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s +} + +var _ InputProperties = RawInputPropertiesImpl{} + +// RawInputPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputPropertiesImpl struct { - Type string - Values map[string]interface{} + inputProperties BaseInputPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s.inputProperties } -func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { +var _ json.Unmarshaler = &BaseInputPropertiesImpl{} + +func (s *BaseInputPropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputPropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputPropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["serialization"]; ok { + impl, err := UnmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'BaseInputPropertiesImpl': %+v", err) + } + s.Serialization = impl + } + return nil +} + +func UnmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { if input == nil { return nil, nil } @@ -52,10 +104,15 @@ func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, erro return out, nil } - out := RawInputPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInputPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) } - return out, nil + + return RawInputPropertiesImpl{ + inputProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_iothubstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_iothubstreaminputdatasource.go index 392aaf849dd..7c8198d81aa 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_iothubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_iothubstreaminputdatasource.go @@ -14,6 +14,14 @@ type IoTHubStreamInputDataSource struct { Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s IoTHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IoTHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Devices/IotHubs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_jsonserialization.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_jsonserialization.go index a6e3035718c..fa85d38c390 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_parquetserialization.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_parquetserialization.go index 35fb8ddf4d5..376752302cf 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputdatasource.go index 8db1d637041..00e974b607e 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReferenceInputDataSource interface { + ReferenceInputDataSource() BaseReferenceInputDataSourceImpl } -// RawReferenceInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReferenceInputDataSource = BaseReferenceInputDataSourceImpl{} + +type BaseReferenceInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s +} + +var _ ReferenceInputDataSource = RawReferenceInputDataSourceImpl{} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceInputDataSourceImpl struct { - Type string - Values map[string]interface{} + referenceInputDataSource BaseReferenceInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s.referenceInputDataSource } -func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { +func UnmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInp return out, nil } - out := RawReferenceInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceInputDataSourceImpl: %+v", err) } - return out, nil + + return RawReferenceInputDataSourceImpl{ + referenceInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputproperties.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputproperties.go index d7e8ae7b225..f2a7fae4dcf 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_referenceinputproperties.go @@ -14,11 +14,24 @@ type ReferenceInputProperties struct { Datasource ReferenceInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s ReferenceInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + } } var _ json.Marshaler = ReferenceInputProperties{} @@ -32,9 +45,10 @@ func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) } + decoded["type"] = "Reference" encoded, err = json.Marshal(decoded) @@ -58,6 +72,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +80,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalReferenceInputDataSourceImplementation(v) + impl, err := UnmarshalReferenceInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) } @@ -73,7 +88,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_serialization.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_serialization.go index f7ae1268551..79b02138276 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_serialization.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputdatasource.go index f57f014f124..5ed79e1568b 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StreamInputDataSource interface { + StreamInputDataSource() BaseStreamInputDataSourceImpl } -// RawStreamInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StreamInputDataSource = BaseStreamInputDataSourceImpl{} + +type BaseStreamInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s +} + +var _ StreamInputDataSource = RawStreamInputDataSourceImpl{} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStreamInputDataSourceImpl struct { - Type string - Values map[string]interface{} + streamInputDataSource BaseStreamInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s.streamInputDataSource } -func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { +func UnmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputData return out, nil } - out := RawStreamInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseStreamInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStreamInputDataSourceImpl: %+v", err) } - return out, nil + + return RawStreamInputDataSourceImpl{ + streamInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputproperties.go b/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputproperties.go index cd1a278a50c..1ff2ed854da 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/model_streaminputproperties.go @@ -14,11 +14,24 @@ type StreamInputProperties struct { Datasource StreamInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s StreamInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + } } var _ json.Marshaler = StreamInputProperties{} @@ -32,9 +45,10 @@ func (s StreamInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) } + decoded["type"] = "Stream" encoded, err = json.Marshal(decoded) @@ -58,6 +72,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +80,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalStreamInputDataSourceImplementation(v) + impl, err := UnmarshalStreamInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) } @@ -73,7 +88,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/inputs/version.go b/resource-manager/streamanalytics/2020-03-01/inputs/version.go index 7553750ba9f..e75bd8c72a3 100644 --- a/resource-manager/streamanalytics/2020-03-01/inputs/version.go +++ b/resource-manager/streamanalytics/2020-03-01/inputs/version.go @@ -1,12 +1,10 @@ package inputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inputs/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/README.md b/resource-manager/streamanalytics/2020-03-01/outputs/README.md index 1609c309cbd..b756f2a4980 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/README.md +++ b/resource-manager/streamanalytics/2020-03-01/outputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/outputs` Documentation -The `outputs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `outputs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/client.go b/resource-manager/streamanalytics/2020-03-01/outputs/client.go index a14d848cb27..21e2ca99199 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/client.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/client.go @@ -15,7 +15,7 @@ type OutputsClient struct { } func NewOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutputsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/id_output.go b/resource-manager/streamanalytics/2020-03-01/outputs/id_output.go index c3e4d5e08aa..a06b16d23b7 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/id_output.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/id_output.go @@ -44,7 +44,7 @@ func ParseOutputID(input string) (*OutputId, error) { } id := OutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutputIDInsensitively(input string) (*OutputId, error) { } id := OutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/id_streamingjob.go b/resource-manager/streamanalytics/2020-03-01/outputs/id_streamingjob.go index 75e26f2788b..a45f63ab7f6 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/method_createorreplace.go b/resource-manager/streamanalytics/2020-03-01/outputs/method_createorreplace.go index 8160d215384..ec6c9a7438e 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c OutputsClient) CreateOrReplace(ctx context.Context, id OutputId, input O var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/method_get.go b/resource-manager/streamanalytics/2020-03-01/outputs/method_get.go index 64025aebeea..8374e2fbfb6 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/method_get.go @@ -45,7 +45,6 @@ func (c OutputsClient) Get(ctx context.Context, id OutputId) (result GetOperatio var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/method_listbystreamingjob.go b/resource-manager/streamanalytics/2020-03-01/outputs/method_listbystreamingjob.go index f404f99b2d9..0f112a3ba35 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/method_update.go b/resource-manager/streamanalytics/2020-03-01/outputs/method_update.go index ab568fb27d8..10b0e211b03 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OutputsClient) Update(ctx context.Context, id OutputId, input Output, op var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_avroserialization.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_avroserialization.go index 8f3a707a598..b1a977f07e7 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuredatalakestoreoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuredatalakestoreoutputdatasource.go index 58cad18e4d1..d9559889e4c 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuredatalakestoreoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuredatalakestoreoutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataLakeStoreOutputDataSource struct { Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataLakeStoreOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DataLake/Accounts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_azurefunctionoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_azurefunctionoutputdatasource.go index c1092f20307..76f06e3fbf5 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_azurefunctionoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_azurefunctionoutputdatasource.go @@ -14,6 +14,14 @@ type AzureFunctionOutputDataSource struct { Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureFunctionOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureFunctionOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresqldatabaseoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresqldatabaseoutputdatasource.go index 4918aa547ee..1bef09ae929 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresqldatabaseoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresqldatabaseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlDatabaseOutputDataSource struct { Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlDatabaseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresynapseoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresynapseoutputdatasource.go index 857db7d0481..18cc9cebcf1 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresynapseoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuresynapseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSynapseOutputDataSource struct { Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSynapseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSynapseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuretableoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuretableoutputdatasource.go index 865e2512bb6..e17cbd32f63 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_azuretableoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_azuretableoutputdatasource.go @@ -14,6 +14,14 @@ type AzureTableOutputDataSource struct { Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureTableOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureTableOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_bloboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_bloboutputdatasource.go index 73ede46ee3e..32618ad4bda 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_bloboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_bloboutputdatasource.go @@ -14,6 +14,14 @@ type BlobOutputDataSource struct { Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s BlobOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobOutputDataSource{} @@ -27,9 +35,10 @@ func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_csvserialization.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_csvserialization.go index 8bd09587b21..fe53c348d55 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_documentdboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_documentdboutputdatasource.go index bb4868131b1..9ea2d03756c 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_documentdboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_documentdboutputdatasource.go @@ -14,6 +14,14 @@ type DocumentDbOutputDataSource struct { Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s DocumentDbOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = DocumentDbOutputDataSource{} @@ -27,9 +35,10 @@ func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/DocumentDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhuboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhuboutputdatasource.go index 08bce058c23..7f102578958 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhuboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhuboutputdatasource.go @@ -14,6 +14,14 @@ type EventHubOutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubOutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhubv2outputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhubv2outputdatasource.go index 4f2a3a8e7fc..0077789a517 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhubv2outputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_eventhubv2outputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2OutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2OutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2OutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_gatewaymessagebusoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_gatewaymessagebusoutputdatasource.go index 25ab3665728..3806b51c8e8 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_gatewaymessagebusoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_gatewaymessagebusoutputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusOutputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusOutputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_jsonserialization.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_jsonserialization.go index 6c7efa499b3..acbd2d0a8dc 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_outputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_outputdatasource.go index 99a8e7f36bc..4384871aa93 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_outputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_outputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutputDataSource interface { + OutputDataSource() BaseOutputDataSourceImpl } -// RawOutputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutputDataSource = BaseOutputDataSourceImpl{} + +type BaseOutputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s +} + +var _ OutputDataSource = RawOutputDataSourceImpl{} + +// RawOutputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutputDataSourceImpl struct { - Type string - Values map[string]interface{} + outputDataSource BaseOutputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s.outputDataSource } -func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { +func UnmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, er return out, nil } - out := RawOutputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseOutputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutputDataSourceImpl: %+v", err) } - return out, nil + + return RawOutputDataSourceImpl{ + outputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_outputproperties.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_outputproperties.go index 90ef2eaa6fa..b203916b70f 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_outputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_outputproperties.go @@ -37,7 +37,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalOutputDataSourceImplementation(v) + impl, err := UnmarshalOutputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_parquetserialization.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_parquetserialization.go index 00891b61aa7..fa8e76537bf 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_powerbioutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_powerbioutputdatasource.go index adcbb6fe8a0..df433accb2a 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_powerbioutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_powerbioutputdatasource.go @@ -14,6 +14,14 @@ type PowerBIOutputDataSource struct { Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PowerBIOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PowerBIOutputDataSource{} @@ -27,9 +35,10 @@ func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) } + decoded["type"] = "PowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_serialization.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_serialization.go index 3bf1a7b5dd1..a245e0e42cc 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_serialization.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebusqueueoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebusqueueoutputdatasource.go index ce896a40023..8572808e2e5 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebusqueueoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebusqueueoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusQueueOutputDataSource struct { Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusQueueOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusQueueOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Queue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebustopicoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebustopicoutputdatasource.go index 6d62ab02c18..c1a1cc1e1e1 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebustopicoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/model_servicebustopicoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusTopicOutputDataSource struct { Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusTopicOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusTopicOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Topic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/outputs/version.go b/resource-manager/streamanalytics/2020-03-01/outputs/version.go index aab5a67daef..25885887a1b 100644 --- a/resource-manager/streamanalytics/2020-03-01/outputs/version.go +++ b/resource-manager/streamanalytics/2020-03-01/outputs/version.go @@ -1,12 +1,10 @@ package outputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outputs/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/README.md b/resource-manager/streamanalytics/2020-03-01/privateendpoints/README.md index e82d7839b47..96306291a74 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/README.md +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/privateendpoints` Documentation -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `privateendpoints` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/client.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/client.go index 149437b1334..d03b3dc1800 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/client.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/client.go @@ -15,7 +15,7 @@ type PrivateEndpointsClient struct { } func NewPrivateEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go index b638921110a..8a5c016841e 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_cluster.go @@ -42,7 +42,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go index 05c08eb64db..017bee155cc 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/id_privateendpoint.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, erro } id := PrivateEndpointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_createorupdate.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_createorupdate.go index 0e1edc5918b..8fd87fbbfc8 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_createorupdate.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_createorupdate.go @@ -40,6 +40,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEn var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_get.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_get.go index 491939808ff..31c16059894 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId) ( var model PrivateEndpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/privateendpoints/version.go b/resource-manager/streamanalytics/2020-03-01/privateendpoints/version.go index 86fff8201db..f18781f5ee0 100644 --- a/resource-manager/streamanalytics/2020-03-01/privateendpoints/version.go +++ b/resource-manager/streamanalytics/2020-03-01/privateendpoints/version.go @@ -1,12 +1,10 @@ package privateendpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpoints/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/README.md b/resource-manager/streamanalytics/2020-03-01/streamingjobs/README.md index ba812db6b5c..c4a59919120 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/README.md +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/streamingjobs` Documentation -The `streamingjobs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `streamingjobs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/client.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/client.go index 2e04ee218cc..1dc6a0feb18 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/client.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/client.go @@ -15,7 +15,7 @@ type StreamingJobsClient struct { } func NewStreamingJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingJobsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go index 8bea001a487..34f1b0ca3c0 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_createorreplace.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_createorreplace.go index f332e84e344..127b33a2879 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_createorreplace.go @@ -43,6 +43,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_get.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_get.go index dde10e46823..f8ecfcfacf9 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StreamingJobsClient) Get(ctx context.Context, id StreamingJobId, options var model StreamingJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_list.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_list.go index eb50ec400db..a62fb38713d 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_list.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_listbyresourcegroup.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_listbyresourcegroup.go index c3baa38df09..9c902872a6d 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_listbyresourcegroup.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_update.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_update.go index ce4cea0f55b..72dc1482bff 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c StreamingJobsClient) Update(ctx context.Context, id StreamingJobId, inpu var model StreamingJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_aggregatefunctionproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_aggregatefunctionproperties.go index 0c646de6aa7..b1ec5ac8925 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_aggregatefunctionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_aggregatefunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = AggregateFunctionProperties{} type AggregateFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s AggregateFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = AggregateFunctionProperties{} @@ -28,9 +38,10 @@ func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) } + decoded["type"] = "Aggregate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_avroserialization.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_avroserialization.go index 2ee800b1446..e7180c3a0e8 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuredatalakestoreoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuredatalakestoreoutputdatasource.go index b4972c83a44..7dfd77186f9 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuredatalakestoreoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuredatalakestoreoutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataLakeStoreOutputDataSource struct { Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataLakeStoreOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DataLake/Accounts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azurefunctionoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azurefunctionoutputdatasource.go index 659bcd759a4..d8840e20cb3 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azurefunctionoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azurefunctionoutputdatasource.go @@ -14,6 +14,14 @@ type AzureFunctionOutputDataSource struct { Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureFunctionOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureFunctionOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuremachinelearningwebservicefunctionbinding.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuremachinelearningwebservicefunctionbinding.go index 0da4fea551e..388051836b1 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuremachinelearningwebservicefunctionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuremachinelearningwebservicefunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningWebServiceFunctionBinding struct { Properties *AzureMachineLearningWebServiceFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningWebServiceFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningWebServiceFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningWebServiceFunctionBinding) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningWebServiceFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqldatabaseoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqldatabaseoutputdatasource.go index 586193d027a..59882ee39ff 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqldatabaseoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqldatabaseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlDatabaseOutputDataSource struct { Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlDatabaseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqlreferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqlreferenceinputdatasource.go index e0ced0b7207..db2b8bdd676 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqlreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresqlreferenceinputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlReferenceInputDataSource struct { Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresynapseoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresynapseoutputdatasource.go index 903fb203215..f620ebf4386 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresynapseoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuresynapseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSynapseOutputDataSource struct { Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSynapseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSynapseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuretableoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuretableoutputdatasource.go index 6fbde873ddc..ab7d9c21afc 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuretableoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_azuretableoutputdatasource.go @@ -14,6 +14,14 @@ type AzureTableOutputDataSource struct { Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureTableOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureTableOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_bloboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_bloboutputdatasource.go index 97864687f91..f9426c0f759 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_bloboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_bloboutputdatasource.go @@ -14,6 +14,14 @@ type BlobOutputDataSource struct { Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s BlobOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobOutputDataSource{} @@ -27,9 +35,10 @@ func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobreferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobreferenceinputdatasource.go index 24afd52e61f..3315df3ab08 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobreferenceinputdatasource.go @@ -14,6 +14,14 @@ type BlobReferenceInputDataSource struct { Properties *BlobDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s BlobReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobstreaminputdatasource.go index 38e280e54b6..8b3cc61c5a3 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_blobstreaminputdatasource.go @@ -14,6 +14,14 @@ type BlobStreamInputDataSource struct { Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s BlobStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_csvserialization.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_csvserialization.go index ca3eacfc071..285542b7c8e 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_documentdboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_documentdboutputdatasource.go index 15079a002be..750b5dc29bb 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_documentdboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_documentdboutputdatasource.go @@ -14,6 +14,14 @@ type DocumentDbOutputDataSource struct { Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s DocumentDbOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = DocumentDbOutputDataSource{} @@ -27,9 +35,10 @@ func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/DocumentDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhuboutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhuboutputdatasource.go index 29185724882..cd4d99fc22d 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhuboutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhuboutputdatasource.go @@ -14,6 +14,14 @@ type EventHubOutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubOutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubstreaminputdatasource.go index cacc6f7ee78..16d6ab54534 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubStreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2outputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2outputdatasource.go index eb9c2affe6e..3c05a251991 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2outputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2outputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2OutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2OutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2OutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2streaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2streaminputdatasource.go index 9236cbf7ed4..e5231c5e043 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2streaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_eventhubv2streaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2StreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2StreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2StreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_filereferenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_filereferenceinputdatasource.go index 1d09bf0cc6f..e43a91cc246 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_filereferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_filereferenceinputdatasource.go @@ -14,6 +14,14 @@ type FileReferenceInputDataSource struct { Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s FileReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = FileReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) } + decoded["type"] = "File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_function.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_function.go index c7a271194d0..9d429ee6f14 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_function.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_function.go @@ -34,7 +34,7 @@ func (s *Function) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalFunctionPropertiesImplementation(v) + impl, err := UnmarshalFunctionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionbinding.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionbinding.go index e34e1d5d032..dd0f14a356c 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionbinding.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionBinding interface { + FunctionBinding() BaseFunctionBindingImpl } -// RawFunctionBindingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionBinding = BaseFunctionBindingImpl{} + +type BaseFunctionBindingImpl struct { + Type string `json:"type"` +} + +func (s BaseFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s +} + +var _ FunctionBinding = RawFunctionBindingImpl{} + +// RawFunctionBindingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionBindingImpl struct { - Type string - Values map[string]interface{} + functionBinding BaseFunctionBindingImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s.functionBinding } -func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { +func UnmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, erro return out, nil } - out := RawFunctionBindingImpl{ - Type: value, - Values: temp, + var parent BaseFunctionBindingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionBindingImpl: %+v", err) } - return out, nil + + return RawFunctionBindingImpl{ + functionBinding: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionconfiguration.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionconfiguration.go index 5216fe6262a..0182d308b5c 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionconfiguration.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionconfiguration.go @@ -32,7 +32,7 @@ func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["binding"]; ok { - impl, err := unmarshalFunctionBindingImplementation(v) + impl, err := UnmarshalFunctionBindingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionproperties.go index 797d9ff5120..dc327dab6eb 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_functionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionProperties interface { + FunctionProperties() BaseFunctionPropertiesImpl } -// RawFunctionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionProperties = BaseFunctionPropertiesImpl{} + +type BaseFunctionPropertiesImpl struct { + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s BaseFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s +} + +var _ FunctionProperties = RawFunctionPropertiesImpl{} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionPropertiesImpl struct { - Type string - Values map[string]interface{} + functionProperties BaseFunctionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s.functionProperties } -func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { +func UnmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties return out, nil } - out := RawFunctionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseFunctionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionPropertiesImpl: %+v", err) } - return out, nil + + return RawFunctionPropertiesImpl{ + functionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusoutputdatasource.go index 9f157cca931..77f838075a4 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusoutputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusOutputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusOutputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go index 5f9bcf69fca..a30b85e0324 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusStreamInputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_input.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_input.go index a68319e701f..6542a60c96b 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_input.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_input.go @@ -34,7 +34,7 @@ func (s *Input) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInputPropertiesImplementation(v) + impl, err := UnmarshalInputPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_inputproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_inputproperties.go index 20140f3aa71..0b0c86dd48a 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_inputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_inputproperties.go @@ -10,18 +10,70 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputProperties interface { + InputProperties() BaseInputPropertiesImpl } -// RawInputPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputProperties = BaseInputPropertiesImpl{} + +type BaseInputPropertiesImpl struct { + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s BaseInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s +} + +var _ InputProperties = RawInputPropertiesImpl{} + +// RawInputPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputPropertiesImpl struct { - Type string - Values map[string]interface{} + inputProperties BaseInputPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s.inputProperties } -func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { +var _ json.Unmarshaler = &BaseInputPropertiesImpl{} + +func (s *BaseInputPropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputPropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputPropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["serialization"]; ok { + impl, err := UnmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'BaseInputPropertiesImpl': %+v", err) + } + s.Serialization = impl + } + return nil +} + +func UnmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { if input == nil { return nil, nil } @@ -52,10 +104,15 @@ func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, erro return out, nil } - out := RawInputPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInputPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) } - return out, nil + + return RawInputPropertiesImpl{ + inputProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_iothubstreaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_iothubstreaminputdatasource.go index dd9c76103f2..fee7c13dedd 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_iothubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_iothubstreaminputdatasource.go @@ -14,6 +14,14 @@ type IoTHubStreamInputDataSource struct { Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s IoTHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IoTHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Devices/IotHubs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_javascriptfunctionbinding.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_javascriptfunctionbinding.go index 72a1c06fd0a..14c2ef6aa38 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_javascriptfunctionbinding.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_javascriptfunctionbinding.go @@ -14,6 +14,14 @@ type JavaScriptFunctionBinding struct { Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s JavaScriptFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = JavaScriptFunctionBinding{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_jsonserialization.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_jsonserialization.go index e1e25c3058e..74e086f11f9 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputdatasource.go index 854d1d7e9b7..6f16b97ed17 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutputDataSource interface { + OutputDataSource() BaseOutputDataSourceImpl } -// RawOutputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutputDataSource = BaseOutputDataSourceImpl{} + +type BaseOutputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s +} + +var _ OutputDataSource = RawOutputDataSourceImpl{} + +// RawOutputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutputDataSourceImpl struct { - Type string - Values map[string]interface{} + outputDataSource BaseOutputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s.outputDataSource } -func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { +func UnmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { if input == nil { return nil, nil } @@ -140,10 +157,15 @@ func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, er return out, nil } - out := RawOutputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseOutputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutputDataSourceImpl: %+v", err) } - return out, nil + + return RawOutputDataSourceImpl{ + outputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputproperties.go index 800588a04c3..90017acd5bd 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_outputproperties.go @@ -37,7 +37,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalOutputDataSourceImplementation(v) + impl, err := UnmarshalOutputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) } @@ -45,7 +45,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_parquetserialization.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_parquetserialization.go index 2e44cd8b909..188fa4a1065 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_powerbioutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_powerbioutputdatasource.go index 2a64ef14547..613553a4de5 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_powerbioutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_powerbioutputdatasource.go @@ -14,6 +14,14 @@ type PowerBIOutputDataSource struct { Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PowerBIOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PowerBIOutputDataSource{} @@ -27,9 +35,10 @@ func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) } + decoded["type"] = "PowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputdatasource.go index 56c7d1cfd63..b02f8f64d47 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReferenceInputDataSource interface { + ReferenceInputDataSource() BaseReferenceInputDataSourceImpl } -// RawReferenceInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReferenceInputDataSource = BaseReferenceInputDataSourceImpl{} + +type BaseReferenceInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s +} + +var _ ReferenceInputDataSource = RawReferenceInputDataSourceImpl{} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceInputDataSourceImpl struct { - Type string - Values map[string]interface{} + referenceInputDataSource BaseReferenceInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s.referenceInputDataSource } -func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { +func UnmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInp return out, nil } - out := RawReferenceInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceInputDataSourceImpl: %+v", err) } - return out, nil + + return RawReferenceInputDataSourceImpl{ + referenceInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputproperties.go index 97fac7b527c..fb3e2e89886 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_referenceinputproperties.go @@ -14,11 +14,24 @@ type ReferenceInputProperties struct { Datasource ReferenceInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s ReferenceInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + } } var _ json.Marshaler = ReferenceInputProperties{} @@ -32,9 +45,10 @@ func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) } + decoded["type"] = "Reference" encoded, err = json.Marshal(decoded) @@ -58,6 +72,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +80,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalReferenceInputDataSourceImplementation(v) + impl, err := UnmarshalReferenceInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) } @@ -73,7 +88,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_scalarfunctionproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_scalarfunctionproperties.go index 5804ccf9bcd..7ab85680dc6 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_scalarfunctionproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_scalarfunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = ScalarFunctionProperties{} type ScalarFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s ScalarFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = ScalarFunctionProperties{} @@ -28,9 +38,10 @@ func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) } + decoded["type"] = "Scalar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_serialization.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_serialization.go index 19476ba2e7a..bf88e310419 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_serialization.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebusqueueoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebusqueueoutputdatasource.go index 790e58f461b..016710ab2d9 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebusqueueoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebusqueueoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusQueueOutputDataSource struct { Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusQueueOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusQueueOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Queue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebustopicoutputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebustopicoutputdatasource.go index 57f1938b5ee..41e64a1c5a4 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebustopicoutputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_servicebustopicoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusTopicOutputDataSource struct { Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusTopicOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusTopicOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Topic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputdatasource.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputdatasource.go index 412a7fa9166..b5b3df1b9e6 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputdatasource.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StreamInputDataSource interface { + StreamInputDataSource() BaseStreamInputDataSourceImpl } -// RawStreamInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StreamInputDataSource = BaseStreamInputDataSourceImpl{} + +type BaseStreamInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s +} + +var _ StreamInputDataSource = RawStreamInputDataSourceImpl{} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStreamInputDataSourceImpl struct { - Type string - Values map[string]interface{} + streamInputDataSource BaseStreamInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s.streamInputDataSource } -func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { +func UnmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { if input == nil { return nil, nil } @@ -76,10 +93,15 @@ func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputData return out, nil } - out := RawStreamInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseStreamInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStreamInputDataSourceImpl: %+v", err) } - return out, nil + + return RawStreamInputDataSourceImpl{ + streamInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputproperties.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputproperties.go index 5b50b35b40b..0851e7acd95 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputproperties.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/model_streaminputproperties.go @@ -14,11 +14,24 @@ type StreamInputProperties struct { Datasource StreamInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` +} + +func (s StreamInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + } } var _ json.Marshaler = StreamInputProperties{} @@ -32,9 +45,10 @@ func (s StreamInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) } + decoded["type"] = "Stream" encoded, err = json.Marshal(decoded) @@ -58,6 +72,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -65,7 +80,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalStreamInputDataSourceImplementation(v) + impl, err := UnmarshalStreamInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) } @@ -73,7 +88,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/streamingjobs/version.go b/resource-manager/streamanalytics/2020-03-01/streamingjobs/version.go index 2fcd3509c28..c7cefa53e3d 100644 --- a/resource-manager/streamanalytics/2020-03-01/streamingjobs/version.go +++ b/resource-manager/streamanalytics/2020-03-01/streamingjobs/version.go @@ -1,12 +1,10 @@ package streamingjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingjobs/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/subscriptions/README.md b/resource-manager/streamanalytics/2020-03-01/subscriptions/README.md index 478d5b457b1..48744921b5a 100644 --- a/resource-manager/streamanalytics/2020-03-01/subscriptions/README.md +++ b/resource-manager/streamanalytics/2020-03-01/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/subscriptions/client.go b/resource-manager/streamanalytics/2020-03-01/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/streamanalytics/2020-03-01/subscriptions/client.go +++ b/resource-manager/streamanalytics/2020-03-01/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/subscriptions/id_location.go b/resource-manager/streamanalytics/2020-03-01/subscriptions/id_location.go index ef47201b399..04163e5282c 100644 --- a/resource-manager/streamanalytics/2020-03-01/subscriptions/id_location.go +++ b/resource-manager/streamanalytics/2020-03-01/subscriptions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/subscriptions/method_listquotas.go b/resource-manager/streamanalytics/2020-03-01/subscriptions/method_listquotas.go index 49664b643d1..41636dbeaf0 100644 --- a/resource-manager/streamanalytics/2020-03-01/subscriptions/method_listquotas.go +++ b/resource-manager/streamanalytics/2020-03-01/subscriptions/method_listquotas.go @@ -46,7 +46,6 @@ func (c SubscriptionsClient) ListQuotas(ctx context.Context, id LocationId) (res var model SubscriptionQuotasListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/subscriptions/version.go b/resource-manager/streamanalytics/2020-03-01/subscriptions/version.go index 8a77b31e296..09774fd4b77 100644 --- a/resource-manager/streamanalytics/2020-03-01/subscriptions/version.go +++ b/resource-manager/streamanalytics/2020-03-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2020-03-01" } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/README.md b/resource-manager/streamanalytics/2020-03-01/transformations/README.md index 9b58d4bb98e..3584481503a 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/README.md +++ b/resource-manager/streamanalytics/2020-03-01/transformations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/transformations` Documentation -The `transformations` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2020-03-01`). +The `transformations` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2020-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/client.go b/resource-manager/streamanalytics/2020-03-01/transformations/client.go index 6808261e8bd..ae072e48b57 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/client.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/client.go @@ -15,7 +15,7 @@ type TransformationsClient struct { } func NewTransformationsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransformationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transformations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transformations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransformationsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go b/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go index e8e3f89f4a0..27004968953 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/id_transformation.go @@ -44,7 +44,7 @@ func ParseTransformationID(input string) (*TransformationId, error) { } id := TransformationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTransformationIDInsensitively(input string) (*TransformationId, error) } id := TransformationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/method_createorreplace.go b/resource-manager/streamanalytics/2020-03-01/transformations/method_createorreplace.go index 5cc1cd2494b..2fce97a2b0a 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/method_createorreplace.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c TransformationsClient) CreateOrReplace(ctx context.Context, id Transform var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/method_get.go b/resource-manager/streamanalytics/2020-03-01/transformations/method_get.go index 1fe3f2dc8c4..94e0ed17148 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/method_get.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/method_get.go @@ -45,7 +45,6 @@ func (c TransformationsClient) Get(ctx context.Context, id TransformationId) (re var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/method_update.go b/resource-manager/streamanalytics/2020-03-01/transformations/method_update.go index 274e46212d4..a8a7f02c752 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/method_update.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TransformationsClient) Update(ctx context.Context, id TransformationId, var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2020-03-01/transformations/version.go b/resource-manager/streamanalytics/2020-03-01/transformations/version.go index fc341f6862f..cb17ffd16fc 100644 --- a/resource-manager/streamanalytics/2020-03-01/transformations/version.go +++ b/resource-manager/streamanalytics/2020-03-01/transformations/version.go @@ -1,12 +1,10 @@ package transformations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transformations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transformations/2020-03-01" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/README.md b/resource-manager/streamanalytics/2021-10-01-preview/functions/README.md index e2084b3abfb..2b38b86cb72 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/functions` Documentation -The `functions` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `functions` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/client.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/client.go index 07fdb1da32c..342ebf01c86 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/client.go @@ -15,7 +15,7 @@ type FunctionsClient struct { } func NewFunctionsClientWithBaseURI(sdkApi sdkEnv.Api) (*FunctionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "functions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "functions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating FunctionsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/id_function.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/id_function.go index 073641028bb..829c51c51de 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/id_function.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/id_function.go @@ -44,7 +44,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/id_streamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/id_streamingjob.go index 08227ba2a58..f23d60b4e99 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/id_streamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_createorreplace.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_createorreplace.go index 7dea7554153..ed1f138eed4 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_createorreplace.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c FunctionsClient) CreateOrReplace(ctx context.Context, id FunctionId, inp var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_get.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_get.go index 670c49fd02c..960145e94e9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_get.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_get.go @@ -45,7 +45,6 @@ func (c FunctionsClient) Get(ctx context.Context, id FunctionId) (result GetOper var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_listbystreamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_listbystreamingjob.go index e468719df51..f05c6d46876 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_retrievedefaultdefinition.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_retrievedefaultdefinition.go index 1cc7018cdce..0150693121d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_retrievedefaultdefinition.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_retrievedefaultdefinition.go @@ -50,7 +50,6 @@ func (c FunctionsClient) RetrieveDefaultDefinition(ctx context.Context, id Funct var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_update.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_update.go index 9a6b1d2d294..152c2a26f66 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/method_update.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c FunctionsClient) Update(ctx context.Context, id FunctionId, input Functi var model Function result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_aggregatefunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_aggregatefunctionproperties.go index 86a1998c8f9..200a416aac5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_aggregatefunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_aggregatefunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = AggregateFunctionProperties{} type AggregateFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s AggregateFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = AggregateFunctionProperties{} @@ -28,9 +38,10 @@ func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) } + decoded["type"] = "Aggregate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionbinding.go index c097197cfb9..32b976c714f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningServiceFunctionBinding struct { Properties *AzureMachineLearningServiceFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningServiceFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningServiceFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningServiceFunctionBinding) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningServiceFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearningServices" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionretrievedefaultdefinitionparameters.go index 73069d97582..caa570ac72d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningservicefunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters stru BindingRetrievalProperties *AzureMachineLearningServiceFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.MachineLearningServices" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionbinding.go index bfc9539fb69..3d9199c01a7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningStudioFunctionBinding struct { Properties *AzureMachineLearningStudioFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningStudioFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningStudioFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningStudioFunctionBinding) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningStudioFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionretrievedefaultdefinitionparameters.go index 4e7a9369195..4ded62f7211 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_azuremachinelearningstudiofunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters struc BindingRetrievalProperties *AzureMachineLearningStudioFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters) M } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionbinding.go index d15e32eca5d..4d4d2d6082a 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionbinding.go @@ -14,6 +14,14 @@ type CSharpFunctionBinding struct { Properties *CSharpFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s CSharpFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = CSharpFunctionBinding{} @@ -27,9 +35,10 @@ func (s CSharpFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CSharpFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/CLRUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionretrievedefaultdefinitionparameters.go index 1da3e21a870..c3d4e30423c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_csharpfunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type CSharpFunctionRetrieveDefaultDefinitionParameters struct { BindingRetrievalProperties *CSharpFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s CSharpFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = CSharpFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s CSharpFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([]byte } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CSharpFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.StreamAnalytics/CLRUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_function.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_function.go index 2abf7cfc9d3..c6d328714f8 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_function.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_function.go @@ -34,7 +34,7 @@ func (s *Function) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalFunctionPropertiesImplementation(v) + impl, err := UnmarshalFunctionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionbinding.go index 3e12d41871d..d9d8cc2e287 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionbinding.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionBinding interface { + FunctionBinding() BaseFunctionBindingImpl } -// RawFunctionBindingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionBinding = BaseFunctionBindingImpl{} + +type BaseFunctionBindingImpl struct { + Type string `json:"type"` +} + +func (s BaseFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s +} + +var _ FunctionBinding = RawFunctionBindingImpl{} + +// RawFunctionBindingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionBindingImpl struct { - Type string - Values map[string]interface{} + functionBinding BaseFunctionBindingImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s.functionBinding } -func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { +func UnmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, erro return out, nil } - out := RawFunctionBindingImpl{ - Type: value, - Values: temp, + var parent BaseFunctionBindingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionBindingImpl: %+v", err) } - return out, nil + + return RawFunctionBindingImpl{ + functionBinding: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionconfiguration.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionconfiguration.go index d6bfb45f522..4eaccec2ade 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionconfiguration.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionconfiguration.go @@ -32,7 +32,7 @@ func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["binding"]; ok { - impl, err := unmarshalFunctionBindingImplementation(v) + impl, err := UnmarshalFunctionBindingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionproperties.go index 181c74ee5c0..7b82d7e2d25 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionProperties interface { + FunctionProperties() BaseFunctionPropertiesImpl } -// RawFunctionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionProperties = BaseFunctionPropertiesImpl{} + +type BaseFunctionPropertiesImpl struct { + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s BaseFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s +} + +var _ FunctionProperties = RawFunctionPropertiesImpl{} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionPropertiesImpl struct { - Type string - Values map[string]interface{} + functionProperties BaseFunctionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s.functionProperties } -func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { +func UnmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties return out, nil } - out := RawFunctionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseFunctionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionPropertiesImpl: %+v", err) } - return out, nil + + return RawFunctionPropertiesImpl{ + functionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionretrievedefaultdefinitionparameters.go index c3a7e0b8d48..22186594e5f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_functionretrievedefaultdefinitionparameters.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionRetrieveDefaultDefinitionParameters interface { + FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl } -// RawFunctionRetrieveDefaultDefinitionParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionRetrieveDefaultDefinitionParameters = BaseFunctionRetrieveDefaultDefinitionParametersImpl{} + +type BaseFunctionRetrieveDefaultDefinitionParametersImpl struct { + BindingType string `json:"bindingType"` +} + +func (s BaseFunctionRetrieveDefaultDefinitionParametersImpl) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return s +} + +var _ FunctionRetrieveDefaultDefinitionParameters = RawFunctionRetrieveDefaultDefinitionParametersImpl{} + +// RawFunctionRetrieveDefaultDefinitionParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionRetrieveDefaultDefinitionParametersImpl struct { - Type string - Values map[string]interface{} + functionRetrieveDefaultDefinitionParameters BaseFunctionRetrieveDefaultDefinitionParametersImpl + Type string + Values map[string]interface{} } -func unmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input []byte) (FunctionRetrieveDefaultDefinitionParameters, error) { +func (s RawFunctionRetrieveDefaultDefinitionParametersImpl) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return s.functionRetrieveDefaultDefinitionParameters +} + +func UnmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input []byte) (FunctionRetrieveDefaultDefinitionParameters, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalFunctionRetrieveDefaultDefinitionParametersImplementation(input [] return out, nil } - out := RawFunctionRetrieveDefaultDefinitionParametersImpl{ + var parent BaseFunctionRetrieveDefaultDefinitionParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionRetrieveDefaultDefinitionParametersImpl: %+v", err) + } + + return RawFunctionRetrieveDefaultDefinitionParametersImpl{ + functionRetrieveDefaultDefinitionParameters: parent, Type: value, Values: temp, - } - return out, nil + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionbinding.go index 8ba9643dac7..58ce1399594 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionbinding.go @@ -14,6 +14,14 @@ type JavaScriptFunctionBinding struct { Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s JavaScriptFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = JavaScriptFunctionBinding{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go index e1c65cb6e12..25c79127f41 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_javascriptfunctionretrievedefaultdefinitionparameters.go @@ -14,6 +14,14 @@ type JavaScriptFunctionRetrieveDefaultDefinitionParameters struct { BindingRetrievalProperties *JavaScriptFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` // Fields inherited from FunctionRetrieveDefaultDefinitionParameters + + BindingType string `json:"bindingType"` +} + +func (s JavaScriptFunctionRetrieveDefaultDefinitionParameters) FunctionRetrieveDefaultDefinitionParameters() BaseFunctionRetrieveDefaultDefinitionParametersImpl { + return BaseFunctionRetrieveDefaultDefinitionParametersImpl{ + BindingType: s.BindingType, + } } var _ json.Marshaler = JavaScriptFunctionRetrieveDefaultDefinitionParameters{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([] } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionRetrieveDefaultDefinitionParameters: %+v", err) } + decoded["bindingType"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_scalarfunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_scalarfunctionproperties.go index bf0d985730b..64480a5e899 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/model_scalarfunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/model_scalarfunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = ScalarFunctionProperties{} type ScalarFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s ScalarFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = ScalarFunctionProperties{} @@ -28,9 +38,10 @@ func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) } + decoded["type"] = "Scalar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/functions/version.go b/resource-manager/streamanalytics/2021-10-01-preview/functions/version.go index 12cec844070..8b1a8f898e9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/functions/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/functions/version.go @@ -1,12 +1,10 @@ package functions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/functions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/functions/2021-10-01-preview" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/README.md b/resource-manager/streamanalytics/2021-10-01-preview/inputs/README.md index 2b7631b324b..7278b685e1a 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/inputs` Documentation -The `inputs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `inputs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/client.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/client.go index fa5493aa37f..38ee7cad2f1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/client.go @@ -15,7 +15,7 @@ type InputsClient struct { } func NewInputsClientWithBaseURI(sdkApi sdkEnv.Api) (*InputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InputsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_input.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_input.go index d83a6e6c49c..d44642ebb58 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_input.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_input.go @@ -44,7 +44,7 @@ func ParseInputID(input string) (*InputId, error) { } id := InputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInputIDInsensitively(input string) (*InputId, error) { } id := InputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_streamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_streamingjob.go index 9067b3fd8c6..c83d1912e00 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_createorreplace.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_createorreplace.go index e42ec1acffd..76dbf541344 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c InputsClient) CreateOrReplace(ctx context.Context, id InputId, input Inp var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_get.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_get.go index 3d03a3a34cf..60ab0f4b1d5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_get.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_get.go @@ -45,7 +45,6 @@ func (c InputsClient) Get(ctx context.Context, id InputId) (result GetOperationR var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_listbystreamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_listbystreamingjob.go index 4e682830afc..4aba162645f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_update.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_update.go index 0291f7c2025..b2b905bfcf8 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_update.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c InputsClient) Update(ctx context.Context, id InputId, input Input, optio var model Input result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_avroserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_avroserialization.go index 9b5e4003b9b..f3486db5718 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_azuresqlreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_azuresqlreferenceinputdatasource.go index a79836d1069..2cdc9b8ddb6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_azuresqlreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_azuresqlreferenceinputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlReferenceInputDataSource struct { Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobreferenceinputdatasource.go index 7fbb9d9a9e1..dc025eff352 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobreferenceinputdatasource.go @@ -14,6 +14,14 @@ type BlobReferenceInputDataSource struct { Properties *BlobReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s BlobReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobstreaminputdatasource.go index c619735bae5..4a87f069f74 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_blobstreaminputdatasource.go @@ -14,6 +14,14 @@ type BlobStreamInputDataSource struct { Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s BlobStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_csvserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_csvserialization.go index a1712b42d98..793ed106b3c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_customclrserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_customclrserialization.go index 2b69dac8700..147997594ff 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_customclrserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_customclrserialization.go @@ -14,6 +14,14 @@ type CustomClrSerialization struct { Properties *CustomClrSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CustomClrSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CustomClrSerialization{} @@ -27,9 +35,10 @@ func (s CustomClrSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomClrSerialization: %+v", err) } + decoded["type"] = "CustomClr" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_deltaserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_deltaserialization.go index f81647106cd..fde61ce2137 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_deltaserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_deltaserialization.go @@ -14,6 +14,14 @@ type DeltaSerialization struct { Properties *DeltaSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s DeltaSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = DeltaSerialization{} @@ -27,9 +35,10 @@ func (s DeltaSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeltaSerialization: %+v", err) } + decoded["type"] = "Delta" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventgridstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventgridstreaminputdatasource.go index ffebdaab932..088b093a1bd 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventgridstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventgridstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventGridStreamInputDataSource struct { Properties *EventGridStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventGridStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventGridStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventGridStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventGridStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventGrid/EventSubscriptions" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubstreaminputdatasource.go index da4a5db6550..e27807610f5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubStreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubv2streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubv2streaminputdatasource.go index 1344f077e5a..4a715d2a6a6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubv2streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_eventhubv2streaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2StreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2StreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2StreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_filereferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_filereferenceinputdatasource.go index bca612a4940..ba205742246 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_filereferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_filereferenceinputdatasource.go @@ -14,6 +14,14 @@ type FileReferenceInputDataSource struct { Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s FileReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = FileReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) } + decoded["type"] = "File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_gatewaymessagebusstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_gatewaymessagebusstreaminputdatasource.go index 4f16a09b403..20263bdfe43 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_gatewaymessagebusstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_gatewaymessagebusstreaminputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusStreamInputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_input.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_input.go index 450ad8eb738..72b9519e169 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_input.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_input.go @@ -34,7 +34,7 @@ func (s *Input) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInputPropertiesImplementation(v) + impl, err := UnmarshalInputPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_inputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_inputproperties.go index cbc3c04c4cf..d518796b83f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_inputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_inputproperties.go @@ -10,18 +10,72 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputProperties interface { + InputProperties() BaseInputPropertiesImpl } -// RawInputPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputProperties = BaseInputPropertiesImpl{} + +type BaseInputPropertiesImpl struct { + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + Type string `json:"type"` + WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +func (s BaseInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s +} + +var _ InputProperties = RawInputPropertiesImpl{} + +// RawInputPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputPropertiesImpl struct { - Type string - Values map[string]interface{} + inputProperties BaseInputPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s.inputProperties } -func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { +var _ json.Unmarshaler = &BaseInputPropertiesImpl{} + +func (s *BaseInputPropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputPropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputPropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["serialization"]; ok { + impl, err := UnmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'BaseInputPropertiesImpl': %+v", err) + } + s.Serialization = impl + } + return nil +} + +func UnmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { if input == nil { return nil, nil } @@ -52,10 +106,15 @@ func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, erro return out, nil } - out := RawInputPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInputPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) } - return out, nil + + return RawInputPropertiesImpl{ + inputProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_iothubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_iothubstreaminputdatasource.go index 392aaf849dd..7c8198d81aa 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_iothubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_iothubstreaminputdatasource.go @@ -14,6 +14,14 @@ type IoTHubStreamInputDataSource struct { Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s IoTHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IoTHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Devices/IotHubs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_jsonserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_jsonserialization.go index a6e3035718c..fa85d38c390 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_parquetserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_parquetserialization.go index 35fb8ddf4d5..376752302cf 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawreferenceinputdatasource.go index edd4ace120d..2f445b71722 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawreferenceinputdatasource.go @@ -14,6 +14,14 @@ type RawReferenceInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s RawReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s RawReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawReferenceInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawstreaminputdatasource.go index 89d157827a3..93d4fecaeb4 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_rawstreaminputdatasource.go @@ -14,6 +14,14 @@ type RawStreamInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s RawStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s RawStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawStreamInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputdatasource.go index 4c1e9e446c5..d6ea1f56a6d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReferenceInputDataSource interface { + ReferenceInputDataSource() BaseReferenceInputDataSourceImpl } -// RawReferenceInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReferenceInputDataSource = BaseReferenceInputDataSourceImpl{} + +type BaseReferenceInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s +} + +var _ ReferenceInputDataSource = RawReferenceInputDataSourceImpl{} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceInputDataSourceImpl struct { - Type string - Values map[string]interface{} + referenceInputDataSource BaseReferenceInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s.referenceInputDataSource } -func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { +func UnmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInp return out, nil } - out := RawReferenceInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceInputDataSourceImpl: %+v", err) } - return out, nil + + return RawReferenceInputDataSourceImpl{ + referenceInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputproperties.go index eaa40637a83..9c924016678 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_referenceinputproperties.go @@ -14,14 +14,28 @@ type ReferenceInputProperties struct { Datasource ReferenceInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s ReferenceInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = ReferenceInputProperties{} func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) } + decoded["type"] = "Reference" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalReferenceInputDataSourceImplementation(v) + impl, err := UnmarshalReferenceInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_serialization.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_serialization.go index 996a1ce1db4..247858ee26c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_serialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputdatasource.go index 8220785a65d..cff6e5d194d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StreamInputDataSource interface { + StreamInputDataSource() BaseStreamInputDataSourceImpl } -// RawStreamInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StreamInputDataSource = BaseStreamInputDataSourceImpl{} + +type BaseStreamInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s +} + +var _ StreamInputDataSource = RawStreamInputDataSourceImpl{} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStreamInputDataSourceImpl struct { - Type string - Values map[string]interface{} + streamInputDataSource BaseStreamInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s.streamInputDataSource } -func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { +func UnmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputData return out, nil } - out := RawStreamInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseStreamInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStreamInputDataSourceImpl: %+v", err) } - return out, nil + + return RawStreamInputDataSourceImpl{ + streamInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputproperties.go index 49426009ee8..d01c5d3debc 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/model_streaminputproperties.go @@ -14,14 +14,28 @@ type StreamInputProperties struct { Datasource StreamInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s StreamInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = StreamInputProperties{} func (s StreamInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s StreamInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) } + decoded["type"] = "Stream" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalStreamInputDataSourceImplementation(v) + impl, err := UnmarshalStreamInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/inputs/version.go b/resource-manager/streamanalytics/2021-10-01-preview/inputs/version.go index b760452eb91..7b01cd93dd5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/inputs/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/inputs/version.go @@ -1,12 +1,10 @@ package inputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inputs/2021-10-01-preview" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/README.md b/resource-manager/streamanalytics/2021-10-01-preview/outputs/README.md index 884128cf55a..db51e3213e4 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/outputs` Documentation -The `outputs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `outputs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/client.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/client.go index a14d848cb27..21e2ca99199 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/client.go @@ -15,7 +15,7 @@ type OutputsClient struct { } func NewOutputsClientWithBaseURI(sdkApi sdkEnv.Api) (*OutputsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "outputs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "outputs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OutputsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go index c3e4d5e08aa..a06b16d23b7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_output.go @@ -44,7 +44,7 @@ func ParseOutputID(input string) (*OutputId, error) { } id := OutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseOutputIDInsensitively(input string) (*OutputId, error) { } id := OutputId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go index 75e26f2788b..a45f63ab7f6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_createorreplace.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_createorreplace.go index 8160d215384..ec6c9a7438e 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c OutputsClient) CreateOrReplace(ctx context.Context, id OutputId, input O var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_get.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_get.go index 64025aebeea..8374e2fbfb6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_get.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_get.go @@ -45,7 +45,6 @@ func (c OutputsClient) Get(ctx context.Context, id OutputId) (result GetOperatio var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_listbystreamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_listbystreamingjob.go index f404f99b2d9..0f112a3ba35 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_listbystreamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_listbystreamingjob.go @@ -39,6 +39,7 @@ func (o ListByStreamingJobOperationOptions) ToHeaders() *client.Headers { func (o ListByStreamingJobOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_update.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_update.go index ab568fb27d8..10b0e211b03 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_update.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c OutputsClient) Update(ctx context.Context, id OutputId, input Output, op var model Output result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_avroserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_avroserialization.go index 8f3a707a598..b1a977f07e7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredataexploreroutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredataexploreroutputdatasource.go index d6186f74365..ca26586d09f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredataexploreroutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredataexploreroutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataExplorerOutputDataSource struct { Properties *AzureDataExplorerOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataExplorerOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataExplorerOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataExplorerOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Kusto/clusters/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredatalakestoreoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredatalakestoreoutputdatasource.go index 58cad18e4d1..d9559889e4c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredatalakestoreoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuredatalakestoreoutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataLakeStoreOutputDataSource struct { Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataLakeStoreOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DataLake/Accounts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azurefunctionoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azurefunctionoutputdatasource.go index c1092f20307..76f06e3fbf5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azurefunctionoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azurefunctionoutputdatasource.go @@ -14,6 +14,14 @@ type AzureFunctionOutputDataSource struct { Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureFunctionOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureFunctionOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresqldatabaseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresqldatabaseoutputdatasource.go index 4918aa547ee..1bef09ae929 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresqldatabaseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresqldatabaseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlDatabaseOutputDataSource struct { Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlDatabaseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresynapseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresynapseoutputdatasource.go index 857db7d0481..18cc9cebcf1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresynapseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuresynapseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSynapseOutputDataSource struct { Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSynapseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSynapseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuretableoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuretableoutputdatasource.go index 865e2512bb6..e17cbd32f63 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuretableoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_azuretableoutputdatasource.go @@ -14,6 +14,14 @@ type AzureTableOutputDataSource struct { Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureTableOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureTableOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_bloboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_bloboutputdatasource.go index 73ede46ee3e..32618ad4bda 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_bloboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_bloboutputdatasource.go @@ -14,6 +14,14 @@ type BlobOutputDataSource struct { Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s BlobOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobOutputDataSource{} @@ -27,9 +35,10 @@ func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_csvserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_csvserialization.go index 8bd09587b21..fe53c348d55 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_customclrserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_customclrserialization.go index 99094f5ff00..84c232bf63b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_customclrserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_customclrserialization.go @@ -14,6 +14,14 @@ type CustomClrSerialization struct { Properties *CustomClrSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CustomClrSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CustomClrSerialization{} @@ -27,9 +35,10 @@ func (s CustomClrSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomClrSerialization: %+v", err) } + decoded["type"] = "CustomClr" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_deltaserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_deltaserialization.go index b28b6022b2a..04e17309662 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_deltaserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_deltaserialization.go @@ -14,6 +14,14 @@ type DeltaSerialization struct { Properties *DeltaSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s DeltaSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = DeltaSerialization{} @@ -27,9 +35,10 @@ func (s DeltaSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeltaSerialization: %+v", err) } + decoded["type"] = "Delta" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_documentdboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_documentdboutputdatasource.go index bb4868131b1..9ea2d03756c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_documentdboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_documentdboutputdatasource.go @@ -14,6 +14,14 @@ type DocumentDbOutputDataSource struct { Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s DocumentDbOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = DocumentDbOutputDataSource{} @@ -27,9 +35,10 @@ func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/DocumentDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhuboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhuboutputdatasource.go index 08bce058c23..7f102578958 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhuboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhuboutputdatasource.go @@ -14,6 +14,14 @@ type EventHubOutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubOutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhubv2outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhubv2outputdatasource.go index 4f2a3a8e7fc..0077789a517 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhubv2outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_eventhubv2outputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2OutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2OutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2OutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_gatewaymessagebusoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_gatewaymessagebusoutputdatasource.go index 25ab3665728..3806b51c8e8 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_gatewaymessagebusoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_gatewaymessagebusoutputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusOutputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusOutputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_jsonserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_jsonserialization.go index 6c7efa499b3..acbd2d0a8dc 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputdatasource.go index 07f934765ec..b054836d1af 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutputDataSource interface { + OutputDataSource() BaseOutputDataSourceImpl } -// RawOutputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutputDataSource = BaseOutputDataSourceImpl{} + +type BaseOutputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s +} + +var _ OutputDataSource = RawOutputDataSourceImpl{} + +// RawOutputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutputDataSourceImpl struct { - Type string - Values map[string]interface{} + outputDataSource BaseOutputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s.outputDataSource } -func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { +func UnmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { if input == nil { return nil, nil } @@ -164,10 +181,15 @@ func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, er return out, nil } - out := RawOutputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseOutputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutputDataSourceImpl: %+v", err) } - return out, nil + + return RawOutputDataSourceImpl{ + outputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputproperties.go index b61db1605b3..51372a381b6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_outputproperties.go @@ -41,7 +41,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalOutputDataSourceImplementation(v) + impl, err := UnmarshalOutputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_parquetserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_parquetserialization.go index 00891b61aa7..fa8e76537bf 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_postgresqloutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_postgresqloutputdatasource.go index 476e5ed56a9..c8b50a4339d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_postgresqloutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_postgresqloutputdatasource.go @@ -14,6 +14,14 @@ type PostgreSQLOutputDataSource struct { Properties *PostgreSQLDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PostgreSQLOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PostgreSQLOutputDataSource{} @@ -27,9 +35,10 @@ func (s PostgreSQLOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSQLOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DBForPostgreSQL/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_powerbioutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_powerbioutputdatasource.go index adcbb6fe8a0..df433accb2a 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_powerbioutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_powerbioutputdatasource.go @@ -14,6 +14,14 @@ type PowerBIOutputDataSource struct { Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PowerBIOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PowerBIOutputDataSource{} @@ -27,9 +35,10 @@ func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) } + decoded["type"] = "PowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_rawoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_rawoutputdatasource.go index dd59de6210c..af42563ce03 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_rawoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_rawoutputdatasource.go @@ -14,6 +14,14 @@ type RawOutputDatasource struct { Properties *RawOutputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s RawOutputDatasource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawOutputDatasource{} @@ -27,9 +35,10 @@ func (s RawOutputDatasource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawOutputDatasource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_serialization.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_serialization.go index dd7efbb86a3..81bbb423413 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_serialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebusqueueoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebusqueueoutputdatasource.go index ce896a40023..8572808e2e5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebusqueueoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebusqueueoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusQueueOutputDataSource struct { Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusQueueOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusQueueOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Queue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebustopicoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebustopicoutputdatasource.go index 6d62ab02c18..c1a1cc1e1e1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebustopicoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/model_servicebustopicoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusTopicOutputDataSource struct { Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusTopicOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusTopicOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Topic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/outputs/version.go b/resource-manager/streamanalytics/2021-10-01-preview/outputs/version.go index ea964723b8c..4a11c030659 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/outputs/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/outputs/version.go @@ -1,12 +1,10 @@ package outputs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/outputs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/outputs/2021-10-01-preview" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md index 704553497c4..c6e24c12f43 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs` Documentation -The `streamingjobs` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `streamingjobs` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go index 2e04ee218cc..1dc6a0feb18 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/client.go @@ -15,7 +15,7 @@ type StreamingJobsClient struct { } func NewStreamingJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*StreamingJobsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "streamingjobs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "streamingjobs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StreamingJobsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go index 8bea001a487..34f1b0ca3c0 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/id_streamingjob.go @@ -42,7 +42,7 @@ func ParseStreamingJobID(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStreamingJobIDInsensitively(input string) (*StreamingJobId, error) { } id := StreamingJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace.go index f332e84e344..127b33a2879 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_createorreplace.go @@ -43,6 +43,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get.go index dde10e46823..f8ecfcfacf9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_get.go @@ -34,6 +34,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c StreamingJobsClient) Get(ctx context.Context, id StreamingJobId, options var model StreamingJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list.go index eb50ec400db..a62fb38713d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup.go index c3baa38df09..9c902872a6d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update.go index ce4cea0f55b..72dc1482bff 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c StreamingJobsClient) Update(ctx context.Context, id StreamingJobId, inpu var model StreamingJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go index 0c646de6aa7..b1ec5ac8925 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_aggregatefunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = AggregateFunctionProperties{} type AggregateFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s AggregateFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = AggregateFunctionProperties{} @@ -28,9 +38,10 @@ func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) } + decoded["type"] = "Aggregate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go index 2ee800b1446..e7180c3a0e8 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go index 616c546f1eb..f2e96b253ac 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredataexploreroutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataExplorerOutputDataSource struct { Properties *AzureDataExplorerOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataExplorerOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataExplorerOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataExplorerOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Kusto/clusters/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go index b4972c83a44..7dfd77186f9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuredatalakestoreoutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataLakeStoreOutputDataSource struct { Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataLakeStoreOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DataLake/Accounts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go index 659bcd759a4..d8840e20cb3 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azurefunctionoutputdatasource.go @@ -14,6 +14,14 @@ type AzureFunctionOutputDataSource struct { Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureFunctionOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureFunctionOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go index 20c14be3296..4d6bbf6d6ba 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningservicefunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningServiceFunctionBinding struct { Properties *AzureMachineLearningServiceFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningServiceFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningServiceFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningServiceFunctionBinding) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningServiceFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearningServices" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go index 96f7218eb5a..333340482f5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuremachinelearningstudiofunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningStudioFunctionBinding struct { Properties *AzureMachineLearningStudioFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningStudioFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningStudioFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningStudioFunctionBinding) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningStudioFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go index 586193d027a..59882ee39ff 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqldatabaseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlDatabaseOutputDataSource struct { Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlDatabaseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go index e0ced0b7207..db2b8bdd676 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresqlreferenceinputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlReferenceInputDataSource struct { Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go index 903fb203215..f620ebf4386 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuresynapseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSynapseOutputDataSource struct { Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSynapseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSynapseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go index 6fbde873ddc..ab7d9c21afc 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_azuretableoutputdatasource.go @@ -14,6 +14,14 @@ type AzureTableOutputDataSource struct { Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureTableOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureTableOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go index 97864687f91..f9426c0f759 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_bloboutputdatasource.go @@ -14,6 +14,14 @@ type BlobOutputDataSource struct { Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s BlobOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobOutputDataSource{} @@ -27,9 +35,10 @@ func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go index 3398a3d79ad..fdbc664d00d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobreferenceinputdatasource.go @@ -14,6 +14,14 @@ type BlobReferenceInputDataSource struct { Properties *BlobReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s BlobReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go index 38e280e54b6..8b3cc61c5a3 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_blobstreaminputdatasource.go @@ -14,6 +14,14 @@ type BlobStreamInputDataSource struct { Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s BlobStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go index 3eec60380d4..f98582898c9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csharpfunctionbinding.go @@ -14,6 +14,14 @@ type CSharpFunctionBinding struct { Properties *CSharpFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s CSharpFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = CSharpFunctionBinding{} @@ -27,9 +35,10 @@ func (s CSharpFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CSharpFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/CLRUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go index ca3eacfc071..285542b7c8e 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go index 75a5f6c1659..24ccae24167 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_customclrserialization.go @@ -14,6 +14,14 @@ type CustomClrSerialization struct { Properties *CustomClrSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CustomClrSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CustomClrSerialization{} @@ -27,9 +35,10 @@ func (s CustomClrSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomClrSerialization: %+v", err) } + decoded["type"] = "CustomClr" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go index ce3d6058373..e4d02967c63 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_deltaserialization.go @@ -14,6 +14,14 @@ type DeltaSerialization struct { Properties *DeltaSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s DeltaSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = DeltaSerialization{} @@ -27,9 +35,10 @@ func (s DeltaSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeltaSerialization: %+v", err) } + decoded["type"] = "Delta" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go index 15079a002be..750b5dc29bb 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_documentdboutputdatasource.go @@ -14,6 +14,14 @@ type DocumentDbOutputDataSource struct { Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s DocumentDbOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = DocumentDbOutputDataSource{} @@ -27,9 +35,10 @@ func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/DocumentDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go index 03e52710544..57a8295771c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventgridstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventGridStreamInputDataSource struct { Properties *EventGridStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventGridStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventGridStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventGridStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventGridStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventGrid/EventSubscriptions" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go index 29185724882..cd4d99fc22d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhuboutputdatasource.go @@ -14,6 +14,14 @@ type EventHubOutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubOutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go index cacc6f7ee78..16d6ab54534 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubStreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go index eb9c2affe6e..3c05a251991 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2outputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2OutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2OutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2OutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go index 9236cbf7ed4..e5231c5e043 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_eventhubv2streaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2StreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2StreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2StreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go index 1d09bf0cc6f..e43a91cc246 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_filereferenceinputdatasource.go @@ -14,6 +14,14 @@ type FileReferenceInputDataSource struct { Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s FileReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = FileReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) } + decoded["type"] = "File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go index c7a271194d0..9d429ee6f14 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_function.go @@ -34,7 +34,7 @@ func (s *Function) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalFunctionPropertiesImplementation(v) + impl, err := UnmarshalFunctionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go index acae995c54d..d251205c550 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionbinding.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionBinding interface { + FunctionBinding() BaseFunctionBindingImpl } -// RawFunctionBindingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionBinding = BaseFunctionBindingImpl{} + +type BaseFunctionBindingImpl struct { + Type string `json:"type"` +} + +func (s BaseFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s +} + +var _ FunctionBinding = RawFunctionBindingImpl{} + +// RawFunctionBindingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionBindingImpl struct { - Type string - Values map[string]interface{} + functionBinding BaseFunctionBindingImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s.functionBinding } -func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { +func UnmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, erro return out, nil } - out := RawFunctionBindingImpl{ - Type: value, - Values: temp, + var parent BaseFunctionBindingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionBindingImpl: %+v", err) } - return out, nil + + return RawFunctionBindingImpl{ + functionBinding: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go index 5216fe6262a..0182d308b5c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionconfiguration.go @@ -32,7 +32,7 @@ func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["binding"]; ok { - impl, err := unmarshalFunctionBindingImplementation(v) + impl, err := UnmarshalFunctionBindingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go index 797d9ff5120..dc327dab6eb 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_functionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionProperties interface { + FunctionProperties() BaseFunctionPropertiesImpl } -// RawFunctionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionProperties = BaseFunctionPropertiesImpl{} + +type BaseFunctionPropertiesImpl struct { + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s BaseFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s +} + +var _ FunctionProperties = RawFunctionPropertiesImpl{} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionPropertiesImpl struct { - Type string - Values map[string]interface{} + functionProperties BaseFunctionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s.functionProperties } -func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { +func UnmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties return out, nil } - out := RawFunctionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseFunctionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionPropertiesImpl: %+v", err) } - return out, nil + + return RawFunctionPropertiesImpl{ + functionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go index 9f157cca931..77f838075a4 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusoutputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusOutputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusOutputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go index 5f9bcf69fca..a30b85e0324 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_gatewaymessagebusstreaminputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusStreamInputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go index a68319e701f..6542a60c96b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_input.go @@ -34,7 +34,7 @@ func (s *Input) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInputPropertiesImplementation(v) + impl, err := UnmarshalInputPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go index 20140f3aa71..4fbebabf831 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_inputproperties.go @@ -10,18 +10,72 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputProperties interface { + InputProperties() BaseInputPropertiesImpl } -// RawInputPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputProperties = BaseInputPropertiesImpl{} + +type BaseInputPropertiesImpl struct { + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + Type string `json:"type"` + WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +func (s BaseInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s +} + +var _ InputProperties = RawInputPropertiesImpl{} + +// RawInputPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputPropertiesImpl struct { - Type string - Values map[string]interface{} + inputProperties BaseInputPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s.inputProperties } -func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { +var _ json.Unmarshaler = &BaseInputPropertiesImpl{} + +func (s *BaseInputPropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputPropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputPropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["serialization"]; ok { + impl, err := UnmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'BaseInputPropertiesImpl': %+v", err) + } + s.Serialization = impl + } + return nil +} + +func UnmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { if input == nil { return nil, nil } @@ -52,10 +106,15 @@ func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, erro return out, nil } - out := RawInputPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInputPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) } - return out, nil + + return RawInputPropertiesImpl{ + inputProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go index dd9c76103f2..fee7c13dedd 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_iothubstreaminputdatasource.go @@ -14,6 +14,14 @@ type IoTHubStreamInputDataSource struct { Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s IoTHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IoTHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Devices/IotHubs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go index 72a1c06fd0a..14c2ef6aa38 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_javascriptfunctionbinding.go @@ -14,6 +14,14 @@ type JavaScriptFunctionBinding struct { Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s JavaScriptFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = JavaScriptFunctionBinding{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go index e1e25c3058e..74e086f11f9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go index c9123b7ea1c..52b32c99be6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutputDataSource interface { + OutputDataSource() BaseOutputDataSourceImpl } -// RawOutputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutputDataSource = BaseOutputDataSourceImpl{} + +type BaseOutputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s +} + +var _ OutputDataSource = RawOutputDataSourceImpl{} + +// RawOutputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutputDataSourceImpl struct { - Type string - Values map[string]interface{} + outputDataSource BaseOutputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s.outputDataSource } -func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { +func UnmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { if input == nil { return nil, nil } @@ -164,10 +181,15 @@ func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, er return out, nil } - out := RawOutputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseOutputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutputDataSourceImpl: %+v", err) } - return out, nil + + return RawOutputDataSourceImpl{ + outputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go index 8bb9c913fae..fba5b30f154 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_outputproperties.go @@ -41,7 +41,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalOutputDataSourceImplementation(v) + impl, err := UnmarshalOutputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go index 2e44cd8b909..188fa4a1065 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go index 89ad0177e33..ad78c46d36b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_postgresqloutputdatasource.go @@ -14,6 +14,14 @@ type PostgreSQLOutputDataSource struct { Properties *PostgreSQLDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PostgreSQLOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PostgreSQLOutputDataSource{} @@ -27,9 +35,10 @@ func (s PostgreSQLOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSQLOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DBForPostgreSQL/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go index 2a64ef14547..613553a4de5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_powerbioutputdatasource.go @@ -14,6 +14,14 @@ type PowerBIOutputDataSource struct { Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PowerBIOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PowerBIOutputDataSource{} @@ -27,9 +35,10 @@ func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) } + decoded["type"] = "PowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go index 968e57d81cc..d5b73220932 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawoutputdatasource.go @@ -14,6 +14,14 @@ type RawOutputDatasource struct { Properties *RawOutputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s RawOutputDatasource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawOutputDatasource{} @@ -27,9 +35,10 @@ func (s RawOutputDatasource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawOutputDatasource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go index 734f2b5c47c..a837e7fc028 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawreferenceinputdatasource.go @@ -14,6 +14,14 @@ type RawReferenceInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s RawReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s RawReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawReferenceInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go index 91aa55a3a0b..e26990e048f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_rawstreaminputdatasource.go @@ -14,6 +14,14 @@ type RawStreamInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s RawStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s RawStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawStreamInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go index 5f55cc7f000..0ddef3ea2c1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReferenceInputDataSource interface { + ReferenceInputDataSource() BaseReferenceInputDataSourceImpl } -// RawReferenceInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReferenceInputDataSource = BaseReferenceInputDataSourceImpl{} + +type BaseReferenceInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s +} + +var _ ReferenceInputDataSource = RawReferenceInputDataSourceImpl{} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceInputDataSourceImpl struct { - Type string - Values map[string]interface{} + referenceInputDataSource BaseReferenceInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s.referenceInputDataSource } -func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { +func UnmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInp return out, nil } - out := RawReferenceInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceInputDataSourceImpl: %+v", err) } - return out, nil + + return RawReferenceInputDataSourceImpl{ + referenceInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go index cf2f24a3aef..cf2d99f4be7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_referenceinputproperties.go @@ -14,14 +14,28 @@ type ReferenceInputProperties struct { Datasource ReferenceInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s ReferenceInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = ReferenceInputProperties{} func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) } + decoded["type"] = "Reference" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalReferenceInputDataSourceImplementation(v) + impl, err := UnmarshalReferenceInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go index 5804ccf9bcd..7ab85680dc6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_scalarfunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = ScalarFunctionProperties{} type ScalarFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s ScalarFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = ScalarFunctionProperties{} @@ -28,9 +38,10 @@ func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) } + decoded["type"] = "Scalar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go index c83d8c218c9..3cd8bf2356b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go index 790e58f461b..016710ab2d9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebusqueueoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusQueueOutputDataSource struct { Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusQueueOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusQueueOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Queue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go index 57f1938b5ee..41e64a1c5a4 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_servicebustopicoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusTopicOutputDataSource struct { Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusTopicOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusTopicOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Topic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go index 64c686c2bad..4731d9a00a7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StreamInputDataSource interface { + StreamInputDataSource() BaseStreamInputDataSourceImpl } -// RawStreamInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StreamInputDataSource = BaseStreamInputDataSourceImpl{} + +type BaseStreamInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s +} + +var _ StreamInputDataSource = RawStreamInputDataSourceImpl{} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStreamInputDataSourceImpl struct { - Type string - Values map[string]interface{} + streamInputDataSource BaseStreamInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s.streamInputDataSource } -func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { +func UnmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputData return out, nil } - out := RawStreamInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseStreamInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStreamInputDataSourceImpl: %+v", err) } - return out, nil + + return RawStreamInputDataSourceImpl{ + streamInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go index f59fa0ddb25..22bd124ab0a 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/model_streaminputproperties.go @@ -14,14 +14,28 @@ type StreamInputProperties struct { Datasource StreamInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s StreamInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = StreamInputProperties{} func (s StreamInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s StreamInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) } + decoded["type"] = "Stream" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalStreamInputDataSourceImplementation(v) + impl, err := UnmarshalStreamInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go index 113aae30cab..5b17829f4d2 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/streamingjobs/version.go @@ -1,12 +1,10 @@ package streamingjobs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/streamingjobs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/streamingjobs/2021-10-01-preview" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/README.md b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/README.md index 825f2bde06d..d99ef47778b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/client.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/client.go index 09be7cb1cfb..84c92b4fb13 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/client.go @@ -15,7 +15,7 @@ type SubscriptionsClient struct { } func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "subscriptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "subscriptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SubscriptionsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/id_location.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/id_location.go index ef47201b399..04163e5282c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/id_location.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_compilequery.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_compilequery.go index 4fe93da9c09..6c946b3b692 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_compilequery.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_compilequery.go @@ -50,7 +50,6 @@ func (c SubscriptionsClient) CompileQuery(ctx context.Context, id LocationId, in var model QueryCompilationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_listquotas.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_listquotas.go index 49664b643d1..41636dbeaf0 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_listquotas.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/method_listquotas.go @@ -46,7 +46,6 @@ func (c SubscriptionsClient) ListQuotas(ctx context.Context, id LocationId) (res var model SubscriptionQuotasListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_aggregatefunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_aggregatefunctionproperties.go index 7da4149f0c4..23611bb19d9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_aggregatefunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_aggregatefunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = AggregateFunctionProperties{} type AggregateFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s AggregateFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = AggregateFunctionProperties{} @@ -28,9 +38,10 @@ func (s AggregateFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AggregateFunctionProperties: %+v", err) } + decoded["type"] = "Aggregate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_avroserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_avroserialization.go index 9daea039984..ed050257e6d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_avroserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_avroserialization.go @@ -14,6 +14,14 @@ type AvroSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s AvroSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = AvroSerialization{} @@ -27,9 +35,10 @@ func (s AvroSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AvroSerialization: %+v", err) } + decoded["type"] = "Avro" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredataexploreroutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredataexploreroutputdatasource.go index 7fec01e3469..5dc187597ed 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredataexploreroutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredataexploreroutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataExplorerOutputDataSource struct { Properties *AzureDataExplorerOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataExplorerOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataExplorerOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataExplorerOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataExplorerOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Kusto/clusters/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredatalakestoreoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredatalakestoreoutputdatasource.go index a7e46957ef8..17283606921 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredatalakestoreoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuredatalakestoreoutputdatasource.go @@ -14,6 +14,14 @@ type AzureDataLakeStoreOutputDataSource struct { Properties *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureDataLakeStoreOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureDataLakeStoreOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DataLake/Accounts" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azurefunctionoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azurefunctionoutputdatasource.go index d145e75dc9d..d08ef98928b 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azurefunctionoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azurefunctionoutputdatasource.go @@ -14,6 +14,14 @@ type AzureFunctionOutputDataSource struct { Properties *AzureFunctionOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureFunctionOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureFunctionOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureFunctionOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureFunctionOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.AzureFunction" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningservicefunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningservicefunctionbinding.go index dfcd6d064e8..d760f1e7560 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningservicefunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningservicefunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningServiceFunctionBinding struct { Properties *AzureMachineLearningServiceFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningServiceFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningServiceFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningServiceFunctionBinding) MarshalJSON() ([]byte, error } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningServiceFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearningServices" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningstudiofunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningstudiofunctionbinding.go index 80e0eed949a..43fe74abccd 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningstudiofunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuremachinelearningstudiofunctionbinding.go @@ -14,6 +14,14 @@ type AzureMachineLearningStudioFunctionBinding struct { Properties *AzureMachineLearningStudioFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s AzureMachineLearningStudioFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureMachineLearningStudioFunctionBinding{} @@ -27,9 +35,10 @@ func (s AzureMachineLearningStudioFunctionBinding) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureMachineLearningStudioFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.MachineLearning/WebService" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqldatabaseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqldatabaseoutputdatasource.go index 8c5ad7c8af9..b418c20dd66 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqldatabaseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqldatabaseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlDatabaseOutputDataSource struct { Properties *AzureSqlDatabaseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlDatabaseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlDatabaseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqlreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqlreferenceinputdatasource.go index ca2a512f6b4..69943053bd7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqlreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresqlreferenceinputdatasource.go @@ -14,6 +14,14 @@ type AzureSqlReferenceInputDataSource struct { Properties *AzureSqlReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s AzureSqlReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSqlReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSqlReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSqlReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/Database" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresynapseoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresynapseoutputdatasource.go index 5c5019babe5..1e6169f7837 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresynapseoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuresynapseoutputdatasource.go @@ -14,6 +14,14 @@ type AzureSynapseOutputDataSource struct { Properties *AzureSynapseDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureSynapseOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureSynapseOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureSynapseOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureSynapseOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Sql/Server/DataWarehouse" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuretableoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuretableoutputdatasource.go index b044b7ae65d..da1cf627b50 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuretableoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_azuretableoutputdatasource.go @@ -14,6 +14,14 @@ type AzureTableOutputDataSource struct { Properties *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s AzureTableOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = AzureTableOutputDataSource{} @@ -27,9 +35,10 @@ func (s AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AzureTableOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Table" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_bloboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_bloboutputdatasource.go index f2379c2c706..0c769743181 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_bloboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_bloboutputdatasource.go @@ -14,6 +14,14 @@ type BlobOutputDataSource struct { Properties *BlobOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s BlobOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobOutputDataSource{} @@ -27,9 +35,10 @@ func (s BlobOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobreferenceinputdatasource.go index 53cd2e208a4..0257ba8be46 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobreferenceinputdatasource.go @@ -14,6 +14,14 @@ type BlobReferenceInputDataSource struct { Properties *BlobReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s BlobReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobReferenceInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobstreaminputdatasource.go index 89e31360a57..bff360a3a0e 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_blobstreaminputdatasource.go @@ -14,6 +14,14 @@ type BlobStreamInputDataSource struct { Properties *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s BlobStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = BlobStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling BlobStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/Blob" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csharpfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csharpfunctionbinding.go index 3f7d9854d8f..8b0c4db8e15 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csharpfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csharpfunctionbinding.go @@ -14,6 +14,14 @@ type CSharpFunctionBinding struct { Properties *CSharpFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s CSharpFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = CSharpFunctionBinding{} @@ -27,9 +35,10 @@ func (s CSharpFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CSharpFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/CLRUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csvserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csvserialization.go index 7e696013683..646552573d7 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csvserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_csvserialization.go @@ -14,6 +14,14 @@ type CsvSerialization struct { Properties *CsvSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CsvSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CsvSerialization{} @@ -27,9 +35,10 @@ func (s CsvSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CsvSerialization: %+v", err) } + decoded["type"] = "Csv" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_customclrserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_customclrserialization.go index 94ba66df97d..93bd1ac1d1e 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_customclrserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_customclrserialization.go @@ -14,6 +14,14 @@ type CustomClrSerialization struct { Properties *CustomClrSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s CustomClrSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = CustomClrSerialization{} @@ -27,9 +35,10 @@ func (s CustomClrSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CustomClrSerialization: %+v", err) } + decoded["type"] = "CustomClr" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_deltaserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_deltaserialization.go index d8bbcf4cb35..70bf33a6188 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_deltaserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_deltaserialization.go @@ -14,6 +14,14 @@ type DeltaSerialization struct { Properties *DeltaSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s DeltaSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = DeltaSerialization{} @@ -27,9 +35,10 @@ func (s DeltaSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeltaSerialization: %+v", err) } + decoded["type"] = "Delta" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_documentdboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_documentdboutputdatasource.go index 4cf7777a90b..10aa8e14795 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_documentdboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_documentdboutputdatasource.go @@ -14,6 +14,14 @@ type DocumentDbOutputDataSource struct { Properties *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s DocumentDbOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = DocumentDbOutputDataSource{} @@ -27,9 +35,10 @@ func (s DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DocumentDbOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Storage/DocumentDB" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventgridstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventgridstreaminputdatasource.go index b28b8afad11..4df091fefe1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventgridstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventgridstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventGridStreamInputDataSource struct { Properties *EventGridStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventGridStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventGridStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventGridStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventGridStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventGrid/EventSubscriptions" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhuboutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhuboutputdatasource.go index 8b02476aec8..6f1ed091b38 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhuboutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhuboutputdatasource.go @@ -14,6 +14,14 @@ type EventHubOutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubOutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubstreaminputdatasource.go index 998337910d1..3c49818f2b6 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubstreaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubStreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2outputdatasource.go index 03279e7d5e2..e3d3fa963a1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2outputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2OutputDataSource struct { Properties *EventHubOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2OutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2OutputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2OutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2OutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2streaminputdatasource.go index 992c4012dac..0bac9e254d0 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_eventhubv2streaminputdatasource.go @@ -14,6 +14,14 @@ type EventHubV2StreamInputDataSource struct { Properties *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s EventHubV2StreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubV2StreamInputDataSource{} @@ -27,9 +35,10 @@ func (s EventHubV2StreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubV2StreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.EventHub/EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_filereferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_filereferenceinputdatasource.go index 3674e72d8ad..cb3ea681abf 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_filereferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_filereferenceinputdatasource.go @@ -14,6 +14,14 @@ type FileReferenceInputDataSource struct { Properties *FileReferenceInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s FileReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = FileReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s FileReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling FileReferenceInputDataSource: %+v", err) } + decoded["type"] = "File" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_function.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_function.go index e20f685f4d4..0e2e13324e3 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_function.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_function.go @@ -34,7 +34,7 @@ func (s *Function) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalFunctionPropertiesImplementation(v) + impl, err := UnmarshalFunctionPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Function': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionbinding.go index fb5b6612ac1..97acba1e9b5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionbinding.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionBinding interface { + FunctionBinding() BaseFunctionBindingImpl } -// RawFunctionBindingImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionBinding = BaseFunctionBindingImpl{} + +type BaseFunctionBindingImpl struct { + Type string `json:"type"` +} + +func (s BaseFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s +} + +var _ FunctionBinding = RawFunctionBindingImpl{} + +// RawFunctionBindingImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionBindingImpl struct { - Type string - Values map[string]interface{} + functionBinding BaseFunctionBindingImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionBindingImpl) FunctionBinding() BaseFunctionBindingImpl { + return s.functionBinding } -func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { +func UnmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalFunctionBindingImplementation(input []byte) (FunctionBinding, erro return out, nil } - out := RawFunctionBindingImpl{ - Type: value, - Values: temp, + var parent BaseFunctionBindingImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionBindingImpl: %+v", err) } - return out, nil + + return RawFunctionBindingImpl{ + functionBinding: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionconfiguration.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionconfiguration.go index 1a03136da37..b5ef0f2d0d2 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionconfiguration.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionconfiguration.go @@ -32,7 +32,7 @@ func (s *FunctionConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["binding"]; ok { - impl, err := unmarshalFunctionBindingImplementation(v) + impl, err := UnmarshalFunctionBindingImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Binding' for 'FunctionConfiguration': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionproperties.go index 41a24fee646..ad708613d14 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_functionproperties.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FunctionProperties interface { + FunctionProperties() BaseFunctionPropertiesImpl } -// RawFunctionPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FunctionProperties = BaseFunctionPropertiesImpl{} + +type BaseFunctionPropertiesImpl struct { + Etag *string `json:"etag,omitempty"` + Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s BaseFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s +} + +var _ FunctionProperties = RawFunctionPropertiesImpl{} + +// RawFunctionPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFunctionPropertiesImpl struct { - Type string - Values map[string]interface{} + functionProperties BaseFunctionPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawFunctionPropertiesImpl) FunctionProperties() BaseFunctionPropertiesImpl { + return s.functionProperties } -func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { +func UnmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalFunctionPropertiesImplementation(input []byte) (FunctionProperties return out, nil } - out := RawFunctionPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseFunctionPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFunctionPropertiesImpl: %+v", err) } - return out, nil + + return RawFunctionPropertiesImpl{ + functionProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusoutputdatasource.go index 914650ccc4b..90af8c27bec 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusoutputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusOutputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusOutputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusOutputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusstreaminputdatasource.go index 665b5d15138..c06a8cfeaae 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_gatewaymessagebusstreaminputdatasource.go @@ -14,6 +14,14 @@ type GatewayMessageBusStreamInputDataSource struct { Properties *GatewayMessageBusSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s GatewayMessageBusStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = GatewayMessageBusStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s GatewayMessageBusStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling GatewayMessageBusStreamInputDataSource: %+v", err) } + decoded["type"] = "GatewayMessageBus" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_input.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_input.go index 25865c76295..d413b9725fb 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_input.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_input.go @@ -34,7 +34,7 @@ func (s *Input) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInputPropertiesImplementation(v) + impl, err := UnmarshalInputPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Input': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_inputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_inputproperties.go index 92223239f4a..879f252c9ce 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_inputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_inputproperties.go @@ -10,18 +10,72 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InputProperties interface { + InputProperties() BaseInputPropertiesImpl } -// RawInputPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InputProperties = BaseInputPropertiesImpl{} + +type BaseInputPropertiesImpl struct { + Compression *Compression `json:"compression,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + PartitionKey *string `json:"partitionKey,omitempty"` + Serialization Serialization `json:"serialization"` + Type string `json:"type"` + WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` +} + +func (s BaseInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s +} + +var _ InputProperties = RawInputPropertiesImpl{} + +// RawInputPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInputPropertiesImpl struct { - Type string - Values map[string]interface{} + inputProperties BaseInputPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInputPropertiesImpl) InputProperties() BaseInputPropertiesImpl { + return s.inputProperties } -func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { +var _ json.Unmarshaler = &BaseInputPropertiesImpl{} + +func (s *BaseInputPropertiesImpl) UnmarshalJSON(bytes []byte) error { + type alias BaseInputPropertiesImpl + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) + } + + s.Compression = decoded.Compression + s.Diagnostics = decoded.Diagnostics + s.Etag = decoded.Etag + s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type + s.WatermarkSettings = decoded.WatermarkSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BaseInputPropertiesImpl into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["serialization"]; ok { + impl, err := UnmarshalSerializationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Serialization' for 'BaseInputPropertiesImpl': %+v", err) + } + s.Serialization = impl + } + return nil +} + +func UnmarshalInputPropertiesImplementation(input []byte) (InputProperties, error) { if input == nil { return nil, nil } @@ -52,10 +106,15 @@ func unmarshalInputPropertiesImplementation(input []byte) (InputProperties, erro return out, nil } - out := RawInputPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInputPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInputPropertiesImpl: %+v", err) } - return out, nil + + return RawInputPropertiesImpl{ + inputProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_iothubstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_iothubstreaminputdatasource.go index fbe219f8d39..d09e6732c9c 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_iothubstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_iothubstreaminputdatasource.go @@ -14,6 +14,14 @@ type IoTHubStreamInputDataSource struct { Properties *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s IoTHubStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = IoTHubStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubStreamInputDataSource: %+v", err) } + decoded["type"] = "Microsoft.Devices/IotHubs" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_javascriptfunctionbinding.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_javascriptfunctionbinding.go index 9ef5373a87e..ce99129c0e5 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_javascriptfunctionbinding.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_javascriptfunctionbinding.go @@ -14,6 +14,14 @@ type JavaScriptFunctionBinding struct { Properties *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` // Fields inherited from FunctionBinding + + Type string `json:"type"` +} + +func (s JavaScriptFunctionBinding) FunctionBinding() BaseFunctionBindingImpl { + return BaseFunctionBindingImpl{ + Type: s.Type, + } } var _ json.Marshaler = JavaScriptFunctionBinding{} @@ -27,9 +35,10 @@ func (s JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JavaScriptFunctionBinding: %+v", err) } + decoded["type"] = "Microsoft.StreamAnalytics/JavascriptUdf" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_jsonserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_jsonserialization.go index 292a370319f..370dd1148bf 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_jsonserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_jsonserialization.go @@ -14,6 +14,14 @@ type JsonSerialization struct { Properties *JsonSerializationProperties `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s JsonSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = JsonSerialization{} @@ -27,9 +35,10 @@ func (s JsonSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JsonSerialization: %+v", err) } + decoded["type"] = "Json" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputdatasource.go index f6908730c00..18f8ec012fc 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OutputDataSource interface { + OutputDataSource() BaseOutputDataSourceImpl } -// RawOutputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OutputDataSource = BaseOutputDataSourceImpl{} + +type BaseOutputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s +} + +var _ OutputDataSource = RawOutputDataSourceImpl{} + +// RawOutputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOutputDataSourceImpl struct { - Type string - Values map[string]interface{} + outputDataSource BaseOutputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawOutputDataSourceImpl) OutputDataSource() BaseOutputDataSourceImpl { + return s.outputDataSource } -func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { +func UnmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, error) { if input == nil { return nil, nil } @@ -164,10 +181,15 @@ func unmarshalOutputDataSourceImplementation(input []byte) (OutputDataSource, er return out, nil } - out := RawOutputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseOutputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOutputDataSourceImpl: %+v", err) } - return out, nil + + return RawOutputDataSourceImpl{ + outputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputproperties.go index 74f91bf5480..7caf9517a05 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_outputproperties.go @@ -41,7 +41,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalOutputDataSourceImplementation(v) + impl, err := UnmarshalOutputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'OutputProperties': %+v", err) } @@ -49,7 +49,7 @@ func (s *OutputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'OutputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_parquetserialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_parquetserialization.go index 8b78f9b38a9..faab770d52f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_parquetserialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_parquetserialization.go @@ -14,6 +14,14 @@ type ParquetSerialization struct { Properties *interface{} `json:"properties,omitempty"` // Fields inherited from Serialization + + Type EventSerializationType `json:"type"` +} + +func (s ParquetSerialization) Serialization() BaseSerializationImpl { + return BaseSerializationImpl{ + Type: s.Type, + } } var _ json.Marshaler = ParquetSerialization{} @@ -27,9 +35,10 @@ func (s ParquetSerialization) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ParquetSerialization: %+v", err) } + decoded["type"] = "Parquet" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_postgresqloutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_postgresqloutputdatasource.go index d6c504687c2..5631ba16d20 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_postgresqloutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_postgresqloutputdatasource.go @@ -14,6 +14,14 @@ type PostgreSQLOutputDataSource struct { Properties *PostgreSQLDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PostgreSQLOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PostgreSQLOutputDataSource{} @@ -27,9 +35,10 @@ func (s PostgreSQLOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PostgreSQLOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.DBForPostgreSQL/servers/databases" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_powerbioutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_powerbioutputdatasource.go index 5540ba0b7ce..626bf640e14 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_powerbioutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_powerbioutputdatasource.go @@ -14,6 +14,14 @@ type PowerBIOutputDataSource struct { Properties *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s PowerBIOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = PowerBIOutputDataSource{} @@ -27,9 +35,10 @@ func (s PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PowerBIOutputDataSource: %+v", err) } + decoded["type"] = "PowerBI" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawoutputdatasource.go index a104cd6a11e..83af4b69ca9 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawoutputdatasource.go @@ -14,6 +14,14 @@ type RawOutputDatasource struct { Properties *RawOutputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s RawOutputDatasource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawOutputDatasource{} @@ -27,9 +35,10 @@ func (s RawOutputDatasource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawOutputDatasource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawreferenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawreferenceinputdatasource.go index c69cc1ee5a6..9116b1eb7df 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawreferenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawreferenceinputdatasource.go @@ -14,6 +14,14 @@ type RawReferenceInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from ReferenceInputDataSource + + Type string `json:"type"` +} + +func (s RawReferenceInputDataSource) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return BaseReferenceInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawReferenceInputDataSource{} @@ -27,9 +35,10 @@ func (s RawReferenceInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawReferenceInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawstreaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawstreaminputdatasource.go index be8765bdde7..fc9eb1424e0 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawstreaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_rawstreaminputdatasource.go @@ -14,6 +14,14 @@ type RawStreamInputDataSource struct { Properties *RawInputDatasourceProperties `json:"properties,omitempty"` // Fields inherited from StreamInputDataSource + + Type string `json:"type"` +} + +func (s RawStreamInputDataSource) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return BaseStreamInputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = RawStreamInputDataSource{} @@ -27,9 +35,10 @@ func (s RawStreamInputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RawStreamInputDataSource: %+v", err) } + decoded["type"] = "Raw" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputdatasource.go index 23c27e04dd4..c87a0351769 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ReferenceInputDataSource interface { + ReferenceInputDataSource() BaseReferenceInputDataSourceImpl } -// RawReferenceInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ReferenceInputDataSource = BaseReferenceInputDataSourceImpl{} + +type BaseReferenceInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s +} + +var _ ReferenceInputDataSource = RawReferenceInputDataSourceImpl{} + +// RawReferenceInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawReferenceInputDataSourceImpl struct { - Type string - Values map[string]interface{} + referenceInputDataSource BaseReferenceInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawReferenceInputDataSourceImpl) ReferenceInputDataSource() BaseReferenceInputDataSourceImpl { + return s.referenceInputDataSource } -func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { +func UnmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInputDataSource, error) { if input == nil { return nil, nil } @@ -68,10 +85,15 @@ func unmarshalReferenceInputDataSourceImplementation(input []byte) (ReferenceInp return out, nil } - out := RawReferenceInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseReferenceInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseReferenceInputDataSourceImpl: %+v", err) } - return out, nil + + return RawReferenceInputDataSourceImpl{ + referenceInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputproperties.go index b6f146009f9..4700b223b11 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_referenceinputproperties.go @@ -14,14 +14,28 @@ type ReferenceInputProperties struct { Datasource ReferenceInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s ReferenceInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = ReferenceInputProperties{} func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s ReferenceInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ReferenceInputProperties: %+v", err) } + decoded["type"] = "Reference" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalReferenceInputDataSourceImplementation(v) + impl, err := UnmarshalReferenceInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'ReferenceInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *ReferenceInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'ReferenceInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_scalarfunctionproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_scalarfunctionproperties.go index f6fb9bb9c3f..c2b05081ee8 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_scalarfunctionproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_scalarfunctionproperties.go @@ -13,8 +13,18 @@ var _ FunctionProperties = ScalarFunctionProperties{} type ScalarFunctionProperties struct { // Fields inherited from FunctionProperties + Etag *string `json:"etag,omitempty"` Properties *FunctionConfiguration `json:"properties,omitempty"` + Type string `json:"type"` +} + +func (s ScalarFunctionProperties) FunctionProperties() BaseFunctionPropertiesImpl { + return BaseFunctionPropertiesImpl{ + Etag: s.Etag, + Properties: s.Properties, + Type: s.Type, + } } var _ json.Marshaler = ScalarFunctionProperties{} @@ -28,9 +38,10 @@ func (s ScalarFunctionProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScalarFunctionProperties: %+v", err) } + decoded["type"] = "Scalar" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_serialization.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_serialization.go index c0efc2d2071..debb78f11f1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_serialization.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_serialization.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Serialization interface { + Serialization() BaseSerializationImpl } -// RawSerializationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ Serialization = BaseSerializationImpl{} + +type BaseSerializationImpl struct { + Type EventSerializationType `json:"type"` +} + +func (s BaseSerializationImpl) Serialization() BaseSerializationImpl { + return s +} + +var _ Serialization = RawSerializationImpl{} + +// RawSerializationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSerializationImpl struct { - Type string - Values map[string]interface{} + serialization BaseSerializationImpl + Type string + Values map[string]interface{} +} + +func (s RawSerializationImpl) Serialization() BaseSerializationImpl { + return s.serialization } -func unmarshalSerializationImplementation(input []byte) (Serialization, error) { +func UnmarshalSerializationImplementation(input []byte) (Serialization, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalSerializationImplementation(input []byte) (Serialization, error) { return out, nil } - out := RawSerializationImpl{ - Type: value, - Values: temp, + var parent BaseSerializationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSerializationImpl: %+v", err) } - return out, nil + + return RawSerializationImpl{ + serialization: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebusqueueoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebusqueueoutputdatasource.go index 50af1d41e06..03e7f00bd94 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebusqueueoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebusqueueoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusQueueOutputDataSource struct { Properties *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusQueueOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusQueueOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusQueueOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Queue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebustopicoutputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebustopicoutputdatasource.go index 01cdb01c288..abd80ce61c1 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebustopicoutputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_servicebustopicoutputdatasource.go @@ -14,6 +14,14 @@ type ServiceBusTopicOutputDataSource struct { Properties *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` // Fields inherited from OutputDataSource + + Type string `json:"type"` +} + +func (s ServiceBusTopicOutputDataSource) OutputDataSource() BaseOutputDataSourceImpl { + return BaseOutputDataSourceImpl{ + Type: s.Type, + } } var _ json.Marshaler = ServiceBusTopicOutputDataSource{} @@ -27,9 +35,10 @@ func (s ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceBusTopicOutputDataSource: %+v", err) } + decoded["type"] = "Microsoft.ServiceBus/Topic" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputdatasource.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputdatasource.go index 5ccffef5435..66513bef06f 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputdatasource.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputdatasource.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StreamInputDataSource interface { + StreamInputDataSource() BaseStreamInputDataSourceImpl } -// RawStreamInputDataSourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ StreamInputDataSource = BaseStreamInputDataSourceImpl{} + +type BaseStreamInputDataSourceImpl struct { + Type string `json:"type"` +} + +func (s BaseStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s +} + +var _ StreamInputDataSource = RawStreamInputDataSourceImpl{} + +// RawStreamInputDataSourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawStreamInputDataSourceImpl struct { - Type string - Values map[string]interface{} + streamInputDataSource BaseStreamInputDataSourceImpl + Type string + Values map[string]interface{} +} + +func (s RawStreamInputDataSourceImpl) StreamInputDataSource() BaseStreamInputDataSourceImpl { + return s.streamInputDataSource } -func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { +func UnmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputDataSource, error) { if input == nil { return nil, nil } @@ -92,10 +109,15 @@ func unmarshalStreamInputDataSourceImplementation(input []byte) (StreamInputData return out, nil } - out := RawStreamInputDataSourceImpl{ - Type: value, - Values: temp, + var parent BaseStreamInputDataSourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseStreamInputDataSourceImpl: %+v", err) } - return out, nil + + return RawStreamInputDataSourceImpl{ + streamInputDataSource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputproperties.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputproperties.go index e68061fe7b8..f699c9048df 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputproperties.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/model_streaminputproperties.go @@ -14,14 +14,28 @@ type StreamInputProperties struct { Datasource StreamInputDataSource `json:"datasource"` // Fields inherited from InputProperties + Compression *Compression `json:"compression,omitempty"` Diagnostics *Diagnostics `json:"diagnostics,omitempty"` Etag *string `json:"etag,omitempty"` PartitionKey *string `json:"partitionKey,omitempty"` Serialization Serialization `json:"serialization"` + Type string `json:"type"` WatermarkSettings *InputWatermarkProperties `json:"watermarkSettings,omitempty"` } +func (s StreamInputProperties) InputProperties() BaseInputPropertiesImpl { + return BaseInputPropertiesImpl{ + Compression: s.Compression, + Diagnostics: s.Diagnostics, + Etag: s.Etag, + PartitionKey: s.PartitionKey, + Serialization: s.Serialization, + Type: s.Type, + WatermarkSettings: s.WatermarkSettings, + } +} + var _ json.Marshaler = StreamInputProperties{} func (s StreamInputProperties) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s StreamInputProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling StreamInputProperties: %+v", err) } + decoded["type"] = "Stream" encoded, err = json.Marshal(decoded) @@ -59,6 +74,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { s.Diagnostics = decoded.Diagnostics s.Etag = decoded.Etag s.PartitionKey = decoded.PartitionKey + s.Type = decoded.Type s.WatermarkSettings = decoded.WatermarkSettings var temp map[string]json.RawMessage @@ -67,7 +83,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["datasource"]; ok { - impl, err := unmarshalStreamInputDataSourceImplementation(v) + impl, err := UnmarshalStreamInputDataSourceImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Datasource' for 'StreamInputProperties': %+v", err) } @@ -75,7 +91,7 @@ func (s *StreamInputProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["serialization"]; ok { - impl, err := unmarshalSerializationImplementation(v) + impl, err := UnmarshalSerializationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Serialization' for 'StreamInputProperties': %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/version.go b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/version.go index c08ae893f03..661346b975d 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2021-10-01-preview" } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/README.md b/resource-manager/streamanalytics/2021-10-01-preview/transformations/README.md index 700e0f09209..5a5de469e09 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/README.md +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2021-10-01-preview/transformations` Documentation -The `transformations` SDK allows for interaction with the Azure Resource Manager Service `streamanalytics` (API Version `2021-10-01-preview`). +The `transformations` SDK allows for interaction with Azure Resource Manager `streamanalytics` (API Version `2021-10-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/client.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/client.go index 6808261e8bd..ae072e48b57 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/client.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/client.go @@ -15,7 +15,7 @@ type TransformationsClient struct { } func NewTransformationsClientWithBaseURI(sdkApi sdkEnv.Api) (*TransformationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "transformations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "transformations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TransformationsClient: %+v", err) } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/id_transformation.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/id_transformation.go index e8e3f89f4a0..27004968953 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/id_transformation.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/id_transformation.go @@ -44,7 +44,7 @@ func ParseTransformationID(input string) (*TransformationId, error) { } id := TransformationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTransformationIDInsensitively(input string) (*TransformationId, error) } id := TransformationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_createorreplace.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_createorreplace.go index 5cc1cd2494b..2fce97a2b0a 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_createorreplace.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_createorreplace.go @@ -40,6 +40,7 @@ func (o CreateOrReplaceOperationOptions) ToHeaders() *client.Headers { func (o CreateOrReplaceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c TransformationsClient) CreateOrReplace(ctx context.Context, id Transform var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_get.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_get.go index 1fe3f2dc8c4..94e0ed17148 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_get.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_get.go @@ -45,7 +45,6 @@ func (c TransformationsClient) Get(ctx context.Context, id TransformationId) (re var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_update.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_update.go index 274e46212d4..a8a7f02c752 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_update.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/method_update.go @@ -36,6 +36,7 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { func (o UpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c TransformationsClient) Update(ctx context.Context, id TransformationId, var model Transformation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/streamanalytics/2021-10-01-preview/transformations/version.go b/resource-manager/streamanalytics/2021-10-01-preview/transformations/version.go index 1d869d8bb63..dbdb150da19 100644 --- a/resource-manager/streamanalytics/2021-10-01-preview/transformations/version.go +++ b/resource-manager/streamanalytics/2021-10-01-preview/transformations/version.go @@ -1,12 +1,10 @@ package transformations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/transformations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/transformations/2021-10-01-preview" } diff --git a/resource-manager/subscription/2021-10-01/subscriptions/README.md b/resource-manager/subscription/2021-10-01/subscriptions/README.md index 843827a5495..f7b448e895f 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/README.md +++ b/resource-manager/subscription/2021-10-01/subscriptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/subscription/2021-10-01/subscriptions` Documentation -The `subscriptions` SDK allows for interaction with the Azure Resource Manager Service `subscription` (API Version `2021-10-01`). +The `subscriptions` SDK allows for interaction with Azure Resource Manager `subscription` (API Version `2021-10-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/subscription/2021-10-01/subscriptions/constants.go b/resource-manager/subscription/2021-10-01/subscriptions/constants.go index 974b7d49a4a..0c5c11f7472 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/constants.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/constants.go @@ -1,6 +1,8 @@ package subscriptions -import "strings" +import ( + "strings" +) // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go b/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go index b2248a11085..25043d0b66b 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/id_alias.go @@ -38,7 +38,7 @@ func ParseAliasID(input string) (*AliasId, error) { } id := AliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseAliasIDInsensitively(input string) (*AliasId, error) { } id := AliasId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go b/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go index 607ef194fff..11397f661ee 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/id_billingaccount.go @@ -38,7 +38,7 @@ func ParseBillingAccountID(input string) (*BillingAccountId, error) { } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error) } id := BillingAccountId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go b/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go index a1c001a1a31..5acaa2c874b 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/id_providersubscription.go @@ -38,7 +38,7 @@ func ParseProviderSubscriptionID(input string) (*ProviderSubscriptionId, error) } id := ProviderSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseProviderSubscriptionIDInsensitively(input string) (*ProviderSubscripti } id := ProviderSubscriptionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go b/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go index b9ff6aa718f..2d86b2fe2d2 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/id_subscriptionoperation.go @@ -38,7 +38,7 @@ func ParseSubscriptionOperationID(input string) (*SubscriptionOperationId, error } id := SubscriptionOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSubscriptionOperationIDInsensitively(input string) (*SubscriptionOpera } id := SubscriptionOperationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/subscription/2021-10-01/subscriptions/version.go b/resource-manager/subscription/2021-10-01/subscriptions/version.go index 8ade52d831d..82cf8e0dd89 100644 --- a/resource-manager/subscription/2021-10-01/subscriptions/version.go +++ b/resource-manager/subscription/2021-10-01/subscriptions/version.go @@ -1,12 +1,10 @@ package subscriptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-10-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subscriptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/subscriptions/2021-10-01" } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/README.md b/resource-manager/synapse/2021-06-01/bigdatapools/README.md index 706e14f7eb2..62f3d8b5f2a 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/README.md +++ b/resource-manager/synapse/2021-06-01/bigdatapools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/bigdatapools` Documentation -The `bigdatapools` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `bigdatapools` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/client.go b/resource-manager/synapse/2021-06-01/bigdatapools/client.go index 30e5e16fff7..7b2ac4f70d2 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/client.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/client.go @@ -15,7 +15,7 @@ type BigDataPoolsClient struct { } func NewBigDataPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*BigDataPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "bigdatapools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "bigdatapools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating BigDataPoolsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/id_bigdatapool.go b/resource-manager/synapse/2021-06-01/bigdatapools/id_bigdatapool.go index cd9b9957ff4..ad807b3b81e 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/id_bigdatapool.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/id_bigdatapool.go @@ -44,7 +44,7 @@ func ParseBigDataPoolID(input string) (*BigDataPoolId, error) { } id := BigDataPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBigDataPoolIDInsensitively(input string) (*BigDataPoolId, error) { } id := BigDataPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/id_workspace.go b/resource-manager/synapse/2021-06-01/bigdatapools/id_workspace.go index acaa0e91850..e2b045da3ed 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/method_createorupdate.go b/resource-manager/synapse/2021-06-01/bigdatapools/method_createorupdate.go index 97d807960b0..184e5bf6a4d 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/method_createorupdate.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/method_createorupdate.go @@ -37,6 +37,7 @@ func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/method_get.go b/resource-manager/synapse/2021-06-01/bigdatapools/method_get.go index 007b98bad72..6db977ea783 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/method_get.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/method_get.go @@ -45,7 +45,6 @@ func (c BigDataPoolsClient) Get(ctx context.Context, id BigDataPoolId) (result G var model BigDataPoolResourceInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/method_update.go b/resource-manager/synapse/2021-06-01/bigdatapools/method_update.go index 71bf1f05b67..4f1c4a74589 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/method_update.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/method_update.go @@ -49,7 +49,6 @@ func (c BigDataPoolsClient) Update(ctx context.Context, id BigDataPoolId, input var model BigDataPoolResourceInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/bigdatapools/version.go b/resource-manager/synapse/2021-06-01/bigdatapools/version.go index 77b7fbc7f8d..06b6be47969 100644 --- a/resource-manager/synapse/2021-06-01/bigdatapools/version.go +++ b/resource-manager/synapse/2021-06-01/bigdatapools/version.go @@ -1,12 +1,10 @@ package bigdatapools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bigdatapools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/bigdatapools/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/client.go b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/client.go index 05615ad96fc..c21b1e9ee32 100644 --- a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/client.go +++ b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/client.go @@ -15,7 +15,7 @@ type DatabaseVulnerabilityAssesmentRuleBaselinesClient struct { } func NewDatabaseVulnerabilityAssesmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseVulnerabilityAssesmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "databasevulnerabilityassesmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "databasevulnerabilityassesmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DatabaseVulnerabilityAssesmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/id_baseline.go b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/id_baseline.go index b9aeed8b85c..6109654b32a 100644 --- a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/id_baseline.go +++ b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/version.go b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/version.go index 6710afae0fd..88854106b0d 100644 --- a/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/version.go +++ b/resource-manager/synapse/2021-06-01/databasevulnerabilityassesmentrulebaselines/version.go @@ -1,12 +1,10 @@ package databasevulnerabilityassesmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/databasevulnerabilityassesmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/databasevulnerabilityassesmentrulebaselines/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/README.md b/resource-manager/synapse/2021-06-01/integrationruntime/README.md index eb10672b7d5..fac6304d9f5 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/README.md +++ b/resource-manager/synapse/2021-06-01/integrationruntime/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/integrationruntime` Documentation -The `integrationruntime` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `integrationruntime` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/client.go b/resource-manager/synapse/2021-06-01/integrationruntime/client.go index e1933852c17..55e491b8a10 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/client.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/client.go @@ -15,7 +15,7 @@ type IntegrationRuntimeClient struct { } func NewIntegrationRuntimeClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationRuntimeClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationruntime", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationruntime", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationRuntimeClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/id_integrationruntime.go b/resource-manager/synapse/2021-06-01/integrationruntime/id_integrationruntime.go index 6c839c41d57..a929fcc2d17 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/id_integrationruntime.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/id_integrationruntime.go @@ -44,7 +44,7 @@ func ParseIntegrationRuntimeID(input string) (*IntegrationRuntimeId, error) { } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntegrationRuntimeIDInsensitively(input string) (*IntegrationRuntimeId } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/id_node.go b/resource-manager/synapse/2021-06-01/integrationruntime/id_node.go index b4b87a8dc7a..ebd4e3cebf0 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/id_node.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/id_node.go @@ -46,7 +46,7 @@ func ParseNodeID(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseNodeIDInsensitively(input string) (*NodeId, error) { } id := NodeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/id_workspace.go b/resource-manager/synapse/2021-06-01/integrationruntime/id_workspace.go index 3bc45dae55c..74f7aff27e7 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeyslist.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeyslist.go index 51b410522e0..fe3556beb34 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeyslist.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeyslist.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeClient) AuthKeysList(ctx context.Context, id Integrati var model IntegrationRuntimeAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeysregenerate.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeysregenerate.go index c59c8078a0b..005fa862c56 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeysregenerate.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_authkeysregenerate.go @@ -50,7 +50,6 @@ func (c IntegrationRuntimeClient) AuthKeysRegenerate(ctx context.Context, id Int var model IntegrationRuntimeAuthKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_connectioninfosget.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_connectioninfosget.go index 21a98904383..89c43ead395 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_connectioninfosget.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_connectioninfosget.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeClient) ConnectionInfosGet(ctx context.Context, id Int var model IntegrationRuntimeConnectionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_create.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_create.go index 01fb2d2514c..ccfbd475910 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_create.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_create.go @@ -39,6 +39,7 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { func (o CreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_get.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_get.go index d92912f8795..cbf95c44744 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_get.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_get.go @@ -36,6 +36,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c IntegrationRuntimeClient) Get(ctx context.Context, id IntegrationRuntime var model IntegrationRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_monitoringdatalist.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_monitoringdatalist.go index b3ac0bdb000..f165bd2d726 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_monitoringdatalist.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_monitoringdatalist.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeClient) MonitoringDataList(ctx context.Context, id Int var model IntegrationRuntimeMonitoringData result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodeipaddressget.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodeipaddressget.go index 3ff9f42b689..1ca09854d47 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodeipaddressget.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodeipaddressget.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeClient) NodeIPAddressGet(ctx context.Context, id NodeI var model IntegrationRuntimeNodeIPAddress result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesget.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesget.go index c06942f6815..34b16695662 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesget.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesget.go @@ -45,7 +45,6 @@ func (c IntegrationRuntimeClient) NodesGet(ctx context.Context, id NodeId) (resu var model SelfHostedIntegrationRuntimeNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesupdate.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesupdate.go index 14b6e221d75..73be4036496 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesupdate.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_nodesupdate.go @@ -49,7 +49,6 @@ func (c IntegrationRuntimeClient) NodesUpdate(ctx context.Context, id NodeId, in var model SelfHostedIntegrationRuntimeNode result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go index 64c399ef327..e7e5f47ccc6 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_objectmetadatalist.go @@ -73,7 +73,7 @@ func (c IntegrationRuntimeClient) ObjectMetadataList(ctx context.Context, id Int temp := make([]SsisObjectMetadata, 0) if values.Values != nil { for i, v := range *values.Values { - val, err := unmarshalSsisObjectMetadataImplementation(v) + val, err := UnmarshalSsisObjectMetadataImplementation(v) if err != nil { err = fmt.Errorf("unmarshalling item %d for SsisObjectMetadata (%q): %+v", i, v, err) return result, err diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_statusget.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_statusget.go index 153db3d9c7c..cca1ec11992 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_statusget.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_statusget.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimeClient) StatusGet(ctx context.Context, id IntegrationR var model IntegrationRuntimeStatusResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/method_update.go b/resource-manager/synapse/2021-06-01/integrationruntime/method_update.go index 2fa5aa98107..45689f99d72 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/method_update.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/method_update.go @@ -49,7 +49,6 @@ func (c IntegrationRuntimeClient) Update(ctx context.Context, id IntegrationRunt var model IntegrationRuntimeResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_customsetupbase.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_customsetupbase.go index cec879ceed9..f4c7a254392 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_customsetupbase.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_customsetupbase.go @@ -9,18 +9,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CustomSetupBase interface { + CustomSetupBase() BaseCustomSetupBaseImpl } -// RawCustomSetupBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ CustomSetupBase = BaseCustomSetupBaseImpl{} + +type BaseCustomSetupBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseCustomSetupBaseImpl) CustomSetupBase() BaseCustomSetupBaseImpl { + return s +} + +var _ CustomSetupBase = RawCustomSetupBaseImpl{} + +// RawCustomSetupBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawCustomSetupBaseImpl struct { - Type string - Values map[string]interface{} + customSetupBase BaseCustomSetupBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawCustomSetupBaseImpl) CustomSetupBase() BaseCustomSetupBaseImpl { + return s.customSetupBase } -func unmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, error) { +func UnmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, error) { if input == nil { return nil, nil } @@ -35,10 +52,15 @@ func unmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, erro return nil, nil } - out := RawCustomSetupBaseImpl{ - Type: value, - Values: temp, + var parent BaseCustomSetupBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseCustomSetupBaseImpl: %+v", err) } - return out, nil + + return RawCustomSetupBaseImpl{ + customSetupBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntime.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntime.go index b04368281f7..53c8d5aee40 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntime.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntime.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IntegrationRuntime interface { + IntegrationRuntime() BaseIntegrationRuntimeImpl } -// RawIntegrationRuntimeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IntegrationRuntime = BaseIntegrationRuntimeImpl{} + +type BaseIntegrationRuntimeImpl struct { + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s BaseIntegrationRuntimeImpl) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return s +} + +var _ IntegrationRuntime = RawIntegrationRuntimeImpl{} + +// RawIntegrationRuntimeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIntegrationRuntimeImpl struct { - Type string - Values map[string]interface{} + integrationRuntime BaseIntegrationRuntimeImpl + Type string + Values map[string]interface{} +} + +func (s RawIntegrationRuntimeImpl) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return s.integrationRuntime } -func unmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime, error) { +func UnmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime return out, nil } - out := RawIntegrationRuntimeImpl{ - Type: value, - Values: temp, + var parent BaseIntegrationRuntimeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIntegrationRuntimeImpl: %+v", err) } - return out, nil + + return RawIntegrationRuntimeImpl{ + integrationRuntime: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimeresource.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimeresource.go index b7486579d2a..5f87cb137d6 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimeresource.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimeresource.go @@ -36,7 +36,7 @@ func (s *IntegrationRuntimeResource) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalIntegrationRuntimeImplementation(v) + impl, err := UnmarshalIntegrationRuntimeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeResource': %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimessisproperties.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimessisproperties.go index d5a5bd33cca..0ec5aca411a 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimessisproperties.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimessisproperties.go @@ -45,7 +45,7 @@ func (s *IntegrationRuntimeSsisProperties) UnmarshalJSON(bytes []byte) error { output := make([]CustomSetupBase, 0) for i, val := range listTemp { - impl, err := unmarshalCustomSetupBaseImplementation(val) + impl, err := UnmarshalCustomSetupBaseImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'ExpressCustomSetupProperties' for 'IntegrationRuntimeSsisProperties': %+v", i, err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatus.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatus.go index 83ee92c148f..484052d3a73 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatus.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatus.go @@ -10,18 +10,37 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IntegrationRuntimeStatus interface { + IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl } -// RawIntegrationRuntimeStatusImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ IntegrationRuntimeStatus = BaseIntegrationRuntimeStatusImpl{} + +type BaseIntegrationRuntimeStatusImpl struct { + DataFactoryName *string `json:"dataFactoryName,omitempty"` + State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s BaseIntegrationRuntimeStatusImpl) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return s +} + +var _ IntegrationRuntimeStatus = RawIntegrationRuntimeStatusImpl{} + +// RawIntegrationRuntimeStatusImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawIntegrationRuntimeStatusImpl struct { - Type string - Values map[string]interface{} + integrationRuntimeStatus BaseIntegrationRuntimeStatusImpl + Type string + Values map[string]interface{} +} + +func (s RawIntegrationRuntimeStatusImpl) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return s.integrationRuntimeStatus } -func unmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationRuntimeStatus, error) { +func UnmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationRuntimeStatus, error) { if input == nil { return nil, nil } @@ -52,10 +71,15 @@ func unmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationR return out, nil } - out := RawIntegrationRuntimeStatusImpl{ - Type: value, - Values: temp, + var parent BaseIntegrationRuntimeStatusImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseIntegrationRuntimeStatusImpl: %+v", err) } - return out, nil + + return RawIntegrationRuntimeStatusImpl{ + integrationRuntimeStatus: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatusresponse.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatusresponse.go index 6c744524a66..9aa8e13da2e 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatusresponse.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_integrationruntimestatusresponse.go @@ -30,7 +30,7 @@ func (s *IntegrationRuntimeStatusResponse) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalIntegrationRuntimeStatusImplementation(v) + impl, err := UnmarshalIntegrationRuntimeStatusImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeStatusResponse': %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimekeyauthorization.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimekeyauthorization.go index a2162dd5384..a381d56fc44 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimekeyauthorization.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimekeyauthorization.go @@ -14,6 +14,14 @@ type LinkedIntegrationRuntimeKeyAuthorization struct { Key SecureString `json:"key"` // Fields inherited from LinkedIntegrationRuntimeType + + AuthorizationType string `json:"authorizationType"` +} + +func (s LinkedIntegrationRuntimeKeyAuthorization) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return BaseLinkedIntegrationRuntimeTypeImpl{ + AuthorizationType: s.AuthorizationType, + } } var _ json.Marshaler = LinkedIntegrationRuntimeKeyAuthorization{} @@ -27,9 +35,10 @@ func (s LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeKeyAuthorization: %+v", err) } + decoded["authorizationType"] = "Key" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimerbacauthorization.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimerbacauthorization.go index 24f4556c25c..e44b16a9447 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimerbacauthorization.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimerbacauthorization.go @@ -14,6 +14,14 @@ type LinkedIntegrationRuntimeRbacAuthorization struct { ResourceId string `json:"resourceId"` // Fields inherited from LinkedIntegrationRuntimeType + + AuthorizationType string `json:"authorizationType"` +} + +func (s LinkedIntegrationRuntimeRbacAuthorization) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return BaseLinkedIntegrationRuntimeTypeImpl{ + AuthorizationType: s.AuthorizationType, + } } var _ json.Marshaler = LinkedIntegrationRuntimeRbacAuthorization{} @@ -27,9 +35,10 @@ func (s LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeRbacAuthorization: %+v", err) } + decoded["authorizationType"] = "RBAC" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimetype.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimetype.go index 14c717a16f9..5ab609adc77 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimetype.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_linkedintegrationruntimetype.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type LinkedIntegrationRuntimeType interface { + LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl } -// RawLinkedIntegrationRuntimeTypeImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ LinkedIntegrationRuntimeType = BaseLinkedIntegrationRuntimeTypeImpl{} + +type BaseLinkedIntegrationRuntimeTypeImpl struct { + AuthorizationType string `json:"authorizationType"` +} + +func (s BaseLinkedIntegrationRuntimeTypeImpl) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return s +} + +var _ LinkedIntegrationRuntimeType = RawLinkedIntegrationRuntimeTypeImpl{} + +// RawLinkedIntegrationRuntimeTypeImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawLinkedIntegrationRuntimeTypeImpl struct { - Type string - Values map[string]interface{} + linkedIntegrationRuntimeType BaseLinkedIntegrationRuntimeTypeImpl + Type string + Values map[string]interface{} +} + +func (s RawLinkedIntegrationRuntimeTypeImpl) LinkedIntegrationRuntimeType() BaseLinkedIntegrationRuntimeTypeImpl { + return s.linkedIntegrationRuntimeType } -func unmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIntegrationRuntimeType, error) { +func UnmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIntegrationRuntimeType, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIn return out, nil } - out := RawLinkedIntegrationRuntimeTypeImpl{ - Type: value, - Values: temp, + var parent BaseLinkedIntegrationRuntimeTypeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseLinkedIntegrationRuntimeTypeImpl: %+v", err) } - return out, nil + + return RawLinkedIntegrationRuntimeTypeImpl{ + linkedIntegrationRuntimeType: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntime.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntime.go index 33fe359800b..b7d025fcd40 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntime.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntime.go @@ -16,7 +16,16 @@ type ManagedIntegrationRuntime struct { TypeProperties ManagedIntegrationRuntimeTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntime - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s ManagedIntegrationRuntime) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return BaseIntegrationRuntimeImpl{ + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = ManagedIntegrationRuntime{} @@ -30,9 +39,10 @@ func (s ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntime: %+v", err) } + decoded["type"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntimestatus.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntimestatus.go index aa8211e062b..412e3f3407d 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntimestatus.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_managedintegrationruntimestatus.go @@ -14,8 +14,18 @@ type ManagedIntegrationRuntimeStatus struct { TypeProperties ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s ManagedIntegrationRuntimeStatus) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return BaseIntegrationRuntimeStatusImpl{ + DataFactoryName: s.DataFactoryName, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = ManagedIntegrationRuntimeStatus{} @@ -29,9 +39,10 @@ func (s ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntimeStatus: %+v", err) } + decoded["type"] = "Managed" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_secretbase.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_secretbase.go index b8624a50397..1fe6af1e845 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_secretbase.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_secretbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SecretBase interface { + SecretBase() BaseSecretBaseImpl } -// RawSecretBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SecretBase = BaseSecretBaseImpl{} + +type BaseSecretBaseImpl struct { + Type string `json:"type"` +} + +func (s BaseSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s +} + +var _ SecretBase = RawSecretBaseImpl{} + +// RawSecretBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSecretBaseImpl struct { - Type string - Values map[string]interface{} + secretBase BaseSecretBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawSecretBaseImpl) SecretBase() BaseSecretBaseImpl { + return s.secretBase } -func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { +func UnmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { return out, nil } - out := RawSecretBaseImpl{ - Type: value, - Values: temp, + var parent BaseSecretBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSecretBaseImpl: %+v", err) } - return out, nil + + return RawSecretBaseImpl{ + secretBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_securestring.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_securestring.go index 7104f18183a..42624c0672e 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_securestring.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_securestring.go @@ -14,6 +14,14 @@ type SecureString struct { Value string `json:"value"` // Fields inherited from SecretBase + + Type string `json:"type"` +} + +func (s SecureString) SecretBase() BaseSecretBaseImpl { + return BaseSecretBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = SecureString{} @@ -27,9 +35,10 @@ func (s SecureString) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SecureString: %+v", err) } + decoded["type"] = "SecureString" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntime.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntime.go index ba60d843a88..801ec2d9293 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntime.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntime.go @@ -14,7 +14,16 @@ type SelfHostedIntegrationRuntime struct { TypeProperties *SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` // Fields inherited from IntegrationRuntime - Description *string `json:"description,omitempty"` + + Description *string `json:"description,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s SelfHostedIntegrationRuntime) IntegrationRuntime() BaseIntegrationRuntimeImpl { + return BaseIntegrationRuntimeImpl{ + Description: s.Description, + Type: s.Type, + } } var _ json.Marshaler = SelfHostedIntegrationRuntime{} @@ -28,9 +37,10 @@ func (s SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntime: %+v", err) } + decoded["type"] = "SelfHosted" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimestatus.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimestatus.go index 38991a65add..652044dddb4 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimestatus.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimestatus.go @@ -14,8 +14,18 @@ type SelfHostedIntegrationRuntimeStatus struct { TypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` State *IntegrationRuntimeState `json:"state,omitempty"` + Type IntegrationRuntimeType `json:"type"` +} + +func (s SelfHostedIntegrationRuntimeStatus) IntegrationRuntimeStatus() BaseIntegrationRuntimeStatusImpl { + return BaseIntegrationRuntimeStatusImpl{ + DataFactoryName: s.DataFactoryName, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = SelfHostedIntegrationRuntimeStatus{} @@ -29,9 +39,10 @@ func (s SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntimeStatus: %+v", err) } + decoded["type"] = "SelfHosted" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimetypeproperties.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimetypeproperties.go index 439c4c0a1c1..51c02065c20 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimetypeproperties.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_selfhostedintegrationruntimetypeproperties.go @@ -22,7 +22,7 @@ func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(bytes []byte) } if v, ok := temp["linkedInfo"]; ok { - impl, err := unmarshalLinkedIntegrationRuntimeTypeImplementation(v) + impl, err := UnmarshalLinkedIntegrationRuntimeTypeImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'LinkedInfo' for 'SelfHostedIntegrationRuntimeTypeProperties': %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisenvironment.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisenvironment.go index c0210e822a0..81055210ce1 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisenvironment.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisenvironment.go @@ -15,9 +15,20 @@ type SsisEnvironment struct { Variables *[]SsisVariable `json:"variables,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisEnvironment) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisEnvironment{} @@ -31,9 +42,10 @@ func (s SsisEnvironment) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisEnvironment: %+v", err) } + decoded["type"] = "Environment" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisfolder.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisfolder.go index 4c2f2a79782..b6192d3ceaa 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisfolder.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisfolder.go @@ -13,9 +13,20 @@ var _ SsisObjectMetadata = SsisFolder{} type SsisFolder struct { // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisFolder) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisFolder{} @@ -29,9 +40,10 @@ func (s SsisFolder) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisFolder: %+v", err) } + decoded["type"] = "Folder" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadata.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadata.go index 8baf9c075c3..a185f962954 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadata.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisobjectmetadata.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SsisObjectMetadata interface { + SsisObjectMetadata() BaseSsisObjectMetadataImpl } -// RawSsisObjectMetadataImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SsisObjectMetadata = BaseSsisObjectMetadataImpl{} + +type BaseSsisObjectMetadataImpl struct { + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s BaseSsisObjectMetadataImpl) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return s +} + +var _ SsisObjectMetadata = RawSsisObjectMetadataImpl{} + +// RawSsisObjectMetadataImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSsisObjectMetadataImpl struct { - Type string - Values map[string]interface{} + ssisObjectMetadata BaseSsisObjectMetadataImpl + Type string + Values map[string]interface{} +} + +func (s RawSsisObjectMetadataImpl) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return s.ssisObjectMetadata } -func unmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata, error) { +func UnmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata, error) { if input == nil { return nil, nil } @@ -68,10 +88,15 @@ func unmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata return out, nil } - out := RawSsisObjectMetadataImpl{ - Type: value, - Values: temp, + var parent BaseSsisObjectMetadataImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSsisObjectMetadataImpl: %+v", err) } - return out, nil + + return RawSsisObjectMetadataImpl{ + ssisObjectMetadata: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssispackage.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssispackage.go index d33b545a74a..10c458d0155 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssispackage.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssispackage.go @@ -17,9 +17,20 @@ type SsisPackage struct { ProjectVersion *int64 `json:"projectVersion,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisPackage) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisPackage{} @@ -33,9 +44,10 @@ func (s SsisPackage) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisPackage: %+v", err) } + decoded["type"] = "Package" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisproject.go b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisproject.go index c44eeb39dae..6bdc27cba78 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisproject.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/model_ssisproject.go @@ -17,9 +17,20 @@ type SsisProject struct { Version *int64 `json:"version,omitempty"` // Fields inherited from SsisObjectMetadata - Description *string `json:"description,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type SsisObjectMetadataType `json:"type"` +} + +func (s SsisProject) SsisObjectMetadata() BaseSsisObjectMetadataImpl { + return BaseSsisObjectMetadataImpl{ + Description: s.Description, + Id: s.Id, + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = SsisProject{} @@ -33,9 +44,10 @@ func (s SsisProject) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SsisProject: %+v", err) } + decoded["type"] = "Project" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/synapse/2021-06-01/integrationruntime/version.go b/resource-manager/synapse/2021-06-01/integrationruntime/version.go index 81eb0b72cca..3c6412bca9e 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntime/version.go +++ b/resource-manager/synapse/2021-06-01/integrationruntime/version.go @@ -1,12 +1,10 @@ package integrationruntime -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationruntime/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationruntime/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/integrationruntimes/README.md b/resource-manager/synapse/2021-06-01/integrationruntimes/README.md index 9b7e278d3f2..7b8b6dccf13 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntimes/README.md +++ b/resource-manager/synapse/2021-06-01/integrationruntimes/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/integrationruntimes` Documentation -The `integrationruntimes` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `integrationruntimes` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/integrationruntimes/client.go b/resource-manager/synapse/2021-06-01/integrationruntimes/client.go index a2601dc5e85..f94eefeabde 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntimes/client.go +++ b/resource-manager/synapse/2021-06-01/integrationruntimes/client.go @@ -15,7 +15,7 @@ type IntegrationRuntimesClient struct { } func NewIntegrationRuntimesClientWithBaseURI(sdkApi sdkEnv.Api) (*IntegrationRuntimesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "integrationruntimes", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "integrationruntimes", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IntegrationRuntimesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/integrationruntimes/id_integrationruntime.go b/resource-manager/synapse/2021-06-01/integrationruntimes/id_integrationruntime.go index 7e588352f2a..a5311297eb0 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntimes/id_integrationruntime.go +++ b/resource-manager/synapse/2021-06-01/integrationruntimes/id_integrationruntime.go @@ -44,7 +44,7 @@ func ParseIntegrationRuntimeID(input string) (*IntegrationRuntimeId, error) { } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseIntegrationRuntimeIDInsensitively(input string) (*IntegrationRuntimeId } id := IntegrationRuntimeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go b/resource-manager/synapse/2021-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go index 7311ab42ab1..2bef1952ab9 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go +++ b/resource-manager/synapse/2021-06-01/integrationruntimes/method_listoutboundnetworkdependenciesendpoints.go @@ -46,7 +46,6 @@ func (c IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpoints(ctx var model IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/integrationruntimes/version.go b/resource-manager/synapse/2021-06-01/integrationruntimes/version.go index 3a9f3288e9d..5032211c3a7 100644 --- a/resource-manager/synapse/2021-06-01/integrationruntimes/version.go +++ b/resource-manager/synapse/2021-06-01/integrationruntimes/version.go @@ -1,12 +1,10 @@ package integrationruntimes -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/integrationruntimes/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/integrationruntimes/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/README.md b/resource-manager/synapse/2021-06-01/ipfirewallrules/README.md index bda60a6d63d..4a2ed099cc5 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/README.md +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/ipfirewallrules` Documentation -The `ipfirewallrules` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `ipfirewallrules` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/client.go b/resource-manager/synapse/2021-06-01/ipfirewallrules/client.go index ef006a6dae3..409db13eb5b 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/client.go +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/client.go @@ -15,7 +15,7 @@ type IPFirewallRulesClient struct { } func NewIPFirewallRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*IPFirewallRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "ipfirewallrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "ipfirewallrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IPFirewallRulesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/id_firewallrule.go b/resource-manager/synapse/2021-06-01/ipfirewallrules/id_firewallrule.go index a1a95cf44fa..b784ee915b0 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/id_firewallrule.go +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/id_firewallrule.go @@ -44,7 +44,7 @@ func ParseFirewallRuleID(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFirewallRuleIDInsensitively(input string) (*FirewallRuleId, error) { } id := FirewallRuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/id_workspace.go b/resource-manager/synapse/2021-06-01/ipfirewallrules/id_workspace.go index ab9c95dbbea..12b8c13e7f7 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/method_get.go b/resource-manager/synapse/2021-06-01/ipfirewallrules/method_get.go index 6d8ddd630ae..51196f3698f 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/method_get.go +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/method_get.go @@ -45,7 +45,6 @@ func (c IPFirewallRulesClient) Get(ctx context.Context, id FirewallRuleId) (resu var model IPFirewallRuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/ipfirewallrules/version.go b/resource-manager/synapse/2021-06-01/ipfirewallrules/version.go index c9d807787ca..2bb78be80a3 100644 --- a/resource-manager/synapse/2021-06-01/ipfirewallrules/version.go +++ b/resource-manager/synapse/2021-06-01/ipfirewallrules/version.go @@ -1,12 +1,10 @@ package ipfirewallrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipfirewallrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/ipfirewallrules/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/keys/README.md b/resource-manager/synapse/2021-06-01/keys/README.md index 38af64aafc7..897ff492cf3 100644 --- a/resource-manager/synapse/2021-06-01/keys/README.md +++ b/resource-manager/synapse/2021-06-01/keys/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/keys` Documentation -The `keys` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `keys` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/keys/client.go b/resource-manager/synapse/2021-06-01/keys/client.go index 91e56411c78..36c97638e22 100644 --- a/resource-manager/synapse/2021-06-01/keys/client.go +++ b/resource-manager/synapse/2021-06-01/keys/client.go @@ -15,7 +15,7 @@ type KeysClient struct { } func NewKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*KeysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "keys", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "keys", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KeysClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/keys/id_key.go b/resource-manager/synapse/2021-06-01/keys/id_key.go index 73273f71072..993d798ed07 100644 --- a/resource-manager/synapse/2021-06-01/keys/id_key.go +++ b/resource-manager/synapse/2021-06-01/keys/id_key.go @@ -44,7 +44,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/keys/id_workspace.go b/resource-manager/synapse/2021-06-01/keys/id_workspace.go index eaf42ae0e43..c834a2b6c4b 100644 --- a/resource-manager/synapse/2021-06-01/keys/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/keys/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/keys/method_createorupdate.go b/resource-manager/synapse/2021-06-01/keys/method_createorupdate.go index db5bab98b23..6d88b41f10f 100644 --- a/resource-manager/synapse/2021-06-01/keys/method_createorupdate.go +++ b/resource-manager/synapse/2021-06-01/keys/method_createorupdate.go @@ -49,7 +49,6 @@ func (c KeysClient) CreateOrUpdate(ctx context.Context, id KeyId, input Key) (re var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/keys/method_delete.go b/resource-manager/synapse/2021-06-01/keys/method_delete.go index 49362c23ebd..602a8029774 100644 --- a/resource-manager/synapse/2021-06-01/keys/method_delete.go +++ b/resource-manager/synapse/2021-06-01/keys/method_delete.go @@ -46,7 +46,6 @@ func (c KeysClient) Delete(ctx context.Context, id KeyId) (result DeleteOperatio var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/keys/method_get.go b/resource-manager/synapse/2021-06-01/keys/method_get.go index 51c59f836ba..5940e7368a2 100644 --- a/resource-manager/synapse/2021-06-01/keys/method_get.go +++ b/resource-manager/synapse/2021-06-01/keys/method_get.go @@ -45,7 +45,6 @@ func (c KeysClient) Get(ctx context.Context, id KeyId) (result GetOperationRespo var model Key result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/keys/version.go b/resource-manager/synapse/2021-06-01/keys/version.go index 1f5038d3fb2..8f8cd95ed9b 100644 --- a/resource-manager/synapse/2021-06-01/keys/version.go +++ b/resource-manager/synapse/2021-06-01/keys/version.go @@ -1,12 +1,10 @@ package keys -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/keys/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/keys/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/libraries/README.md b/resource-manager/synapse/2021-06-01/libraries/README.md index 69c2f46ad11..71f80dc03a2 100644 --- a/resource-manager/synapse/2021-06-01/libraries/README.md +++ b/resource-manager/synapse/2021-06-01/libraries/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/libraries` Documentation -The `libraries` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `libraries` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/libraries/client.go b/resource-manager/synapse/2021-06-01/libraries/client.go index a165bcc5ff2..dc71badb9cd 100644 --- a/resource-manager/synapse/2021-06-01/libraries/client.go +++ b/resource-manager/synapse/2021-06-01/libraries/client.go @@ -15,7 +15,7 @@ type LibrariesClient struct { } func NewLibrariesClientWithBaseURI(sdkApi sdkEnv.Api) (*LibrariesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "libraries", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "libraries", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LibrariesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/libraries/id_library.go b/resource-manager/synapse/2021-06-01/libraries/id_library.go index 7a0e5eb9a1c..67c2ced0cdf 100644 --- a/resource-manager/synapse/2021-06-01/libraries/id_library.go +++ b/resource-manager/synapse/2021-06-01/libraries/id_library.go @@ -44,7 +44,7 @@ func ParseLibraryID(input string) (*LibraryId, error) { } id := LibraryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLibraryIDInsensitively(input string) (*LibraryId, error) { } id := LibraryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/libraries/id_workspace.go b/resource-manager/synapse/2021-06-01/libraries/id_workspace.go index 30c5a6757e9..c1c2f20bd99 100644 --- a/resource-manager/synapse/2021-06-01/libraries/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/libraries/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/libraries/method_libraryget.go b/resource-manager/synapse/2021-06-01/libraries/method_libraryget.go index a7a69dfedb1..cb3a2ef8c3b 100644 --- a/resource-manager/synapse/2021-06-01/libraries/method_libraryget.go +++ b/resource-manager/synapse/2021-06-01/libraries/method_libraryget.go @@ -45,7 +45,6 @@ func (c LibrariesClient) LibraryGet(ctx context.Context, id LibraryId) (result L var model LibraryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/libraries/version.go b/resource-manager/synapse/2021-06-01/libraries/version.go index b89cd42b093..ba9b3edb6be 100644 --- a/resource-manager/synapse/2021-06-01/libraries/version.go +++ b/resource-manager/synapse/2021-06-01/libraries/version.go @@ -1,12 +1,10 @@ package libraries -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/libraries/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/libraries/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/operations/README.md b/resource-manager/synapse/2021-06-01/operations/README.md index 3e750b3dfa7..ad2c4dcef7a 100644 --- a/resource-manager/synapse/2021-06-01/operations/README.md +++ b/resource-manager/synapse/2021-06-01/operations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/operations` Documentation -The `operations` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `operations` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/operations/client.go b/resource-manager/synapse/2021-06-01/operations/client.go index 304a17c8d48..5afee8af6f7 100644 --- a/resource-manager/synapse/2021-06-01/operations/client.go +++ b/resource-manager/synapse/2021-06-01/operations/client.go @@ -15,7 +15,7 @@ type OperationsClient struct { } func NewOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "operations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "operations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating OperationsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/operations/method_checknameavailability.go b/resource-manager/synapse/2021-06-01/operations/method_checknameavailability.go index 20dac845f74..f9a92917dac 100644 --- a/resource-manager/synapse/2021-06-01/operations/method_checknameavailability.go +++ b/resource-manager/synapse/2021-06-01/operations/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c OperationsClient) CheckNameAvailability(ctx context.Context, id commonid var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/operations/version.go b/resource-manager/synapse/2021-06-01/operations/version.go index ce0cb6ca13d..0ef8e65ad48 100644 --- a/resource-manager/synapse/2021-06-01/operations/version.go +++ b/resource-manager/synapse/2021-06-01/operations/version.go @@ -1,12 +1,10 @@ package operations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/operations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/operations/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/README.md b/resource-manager/synapse/2021-06-01/privateendpointconnections/README.md index 37e35b1da94..324897517f2 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/README.md +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/privateendpointconnections` Documentation -The `privateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/client.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/client.go index 3bf7a6afe1f..50eaf09dcce 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/client.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/client.go @@ -15,7 +15,7 @@ type PrivateEndpointConnectionsClient struct { } func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateendpointconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privateendpointconnection.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privateendpointconnection.go index 1b9c2c83902..ac69e28a66b 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privateendpointconnection.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhub.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhub.go index a4326a472aa..8fbe462dba3 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhub.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhub.go @@ -42,7 +42,7 @@ func ParsePrivateLinkHubID(input string) (*PrivateLinkHubId, error) { } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkHubIDInsensitively(input string) (*PrivateLinkHubId, error) } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhubprivateendpointconnection.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhubprivateendpointconnection.go index 5fbe7870d03..23cc3ee6603 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhubprivateendpointconnection.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_privatelinkhubprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateLinkHubPrivateEndpointConnectionID(input string) (*PrivateLinkH } id := PrivateLinkHubPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkHubPrivateEndpointConnectionIDInsensitively(input string) ( } id := PrivateLinkHubPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_workspace.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_workspace.go index 40b812dd1c7..939e9d6924b 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/method_get.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/method_get.go index 8dc28d7ff7a..351242746d4 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/method_get.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/method_get.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) Get(ctx context.Context, id PrivateEnd var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/method_privatelinkhubget.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/method_privatelinkhubget.go index 6490d0988a8..a5ee95812da 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/method_privatelinkhubget.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/method_privatelinkhubget.go @@ -45,7 +45,6 @@ func (c PrivateEndpointConnectionsClient) PrivateLinkHubGet(ctx context.Context, var model PrivateEndpointConnectionForPrivateLinkHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privateendpointconnections/version.go b/resource-manager/synapse/2021-06-01/privateendpointconnections/version.go index 0d17055f179..84f32b5d3b0 100644 --- a/resource-manager/synapse/2021-06-01/privateendpointconnections/version.go +++ b/resource-manager/synapse/2021-06-01/privateendpointconnections/version.go @@ -1,12 +1,10 @@ package privateendpointconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpointconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateendpointconnections/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/README.md b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/README.md index 70cb3443f27..f18b63f1163 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/README.md +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources` Documentation -The `privatelinkhubprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `privatelinkhubprivatelinkresources` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/client.go b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/client.go index 0f87cbcaaf0..4abc4d86a91 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/client.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkHubPrivateLinkResourcesClient struct { } func NewPrivateLinkHubPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkHubPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkhubprivatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkhubprivatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkHubPrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhub.go b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhub.go index 61a77164fdf..81066a0c7e4 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhub.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhub.go @@ -42,7 +42,7 @@ func ParsePrivateLinkHubID(input string) (*PrivateLinkHubId, error) { } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkHubIDInsensitively(input string) (*PrivateLinkHubId, error) } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhubprivatelinkresource.go b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhubprivatelinkresource.go index 8fd91cf27c7..51a90212c88 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhubprivatelinkresource.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/id_privatelinkhubprivatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkHubPrivateLinkResourceID(input string) (*PrivateLinkHubPriv } id := PrivateLinkHubPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkHubPrivateLinkResourceIDInsensitively(input string) (*Priva } id := PrivateLinkHubPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/method_get.go b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/method_get.go index d277fc530c6..d3f27462eee 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/method_get.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkHubPrivateLinkResourcesClient) Get(ctx context.Context, id Pr var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/version.go b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/version.go index 889483cf24b..0244d9d1416 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/version.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubprivatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkhubprivatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkhubprivatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkhubprivatelinkresources/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/README.md b/resource-manager/synapse/2021-06-01/privatelinkhubs/README.md index 9b637298414..efb38d40b53 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/README.md +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/privatelinkhubs` Documentation -The `privatelinkhubs` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `privatelinkhubs` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/client.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/client.go index ae4439c026e..6f9a4bc0754 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/client.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/client.go @@ -15,7 +15,7 @@ type PrivateLinkHubsClient struct { } func NewPrivateLinkHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkHubsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkhubs", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkhubs", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkHubsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhub.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhub.go index 875e616c9e9..a499525d8aa 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhub.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhub.go @@ -42,7 +42,7 @@ func ParsePrivateLinkHubID(input string) (*PrivateLinkHubId, error) { } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateLinkHubIDInsensitively(input string) (*PrivateLinkHubId, error) } id := PrivateLinkHubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhubprivateendpointconnection.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhubprivateendpointconnection.go index 6fbd716b0f3..d4f29ed00e4 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhubprivateendpointconnection.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/id_privatelinkhubprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateLinkHubPrivateEndpointConnectionID(input string) (*PrivateLinkH } id := PrivateLinkHubPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkHubPrivateEndpointConnectionIDInsensitively(input string) ( } id := PrivateLinkHubPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_createorupdate.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_createorupdate.go index 175bb771dd2..8b4320e8f56 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_createorupdate.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_createorupdate.go @@ -50,7 +50,6 @@ func (c PrivateLinkHubsClient) CreateOrUpdate(ctx context.Context, id PrivateLin var model PrivateLinkHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_get.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_get.go index 089f50b1a79..f0b6c15580d 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_get.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkHubsClient) Get(ctx context.Context, id PrivateLinkHubId) (re var model PrivateLinkHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_privateendpointconnectionsprivatelinkhubget.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_privateendpointconnectionsprivatelinkhubget.go index ec913456971..0a45f752fbc 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_privateendpointconnectionsprivatelinkhubget.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_privateendpointconnectionsprivatelinkhubget.go @@ -45,7 +45,6 @@ func (c PrivateLinkHubsClient) PrivateEndpointConnectionsPrivateLinkHubGet(ctx c var model PrivateEndpointConnectionForPrivateLinkHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_update.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_update.go index 26410841448..307292dba46 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/method_update.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/method_update.go @@ -50,7 +50,6 @@ func (c PrivateLinkHubsClient) Update(ctx context.Context, id PrivateLinkHubId, var model PrivateLinkHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkhubs/version.go b/resource-manager/synapse/2021-06-01/privatelinkhubs/version.go index 9e7bbd29ff1..1d2d25b5f42 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkhubs/version.go +++ b/resource-manager/synapse/2021-06-01/privatelinkhubs/version.go @@ -1,12 +1,10 @@ package privatelinkhubs -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkhubs/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkhubs/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/README.md b/resource-manager/synapse/2021-06-01/privatelinkresources/README.md index a8d6ad30d67..69ee9a95173 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/README.md +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/privatelinkresources` Documentation -The `privatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/client.go b/resource-manager/synapse/2021-06-01/privatelinkresources/client.go index e6e22caa746..28c00b21f03 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/client.go +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/client.go @@ -15,7 +15,7 @@ type PrivateLinkResourcesClient struct { } func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privatelinkresources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/id_privatelinkresource.go b/resource-manager/synapse/2021-06-01/privatelinkresources/id_privatelinkresource.go index e2eca34c0c4..2b6d6037a14 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/id_privatelinkresource.go +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/id_privatelinkresource.go @@ -44,7 +44,7 @@ func ParsePrivateLinkResourceID(input string) (*PrivateLinkResourceId, error) { } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateLinkResourceIDInsensitively(input string) (*PrivateLinkResource } id := PrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/id_workspace.go b/resource-manager/synapse/2021-06-01/privatelinkresources/id_workspace.go index d8d45cf623a..0ec86a42c14 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/method_get.go b/resource-manager/synapse/2021-06-01/privatelinkresources/method_get.go index f265d7c640a..4fe26146181 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/method_get.go +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/method_get.go @@ -45,7 +45,6 @@ func (c PrivateLinkResourcesClient) Get(ctx context.Context, id PrivateLinkResou var model PrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/privatelinkresources/version.go b/resource-manager/synapse/2021-06-01/privatelinkresources/version.go index 4ee29f52669..cb4b4960d6e 100644 --- a/resource-manager/synapse/2021-06-01/privatelinkresources/version.go +++ b/resource-manager/synapse/2021-06-01/privatelinkresources/version.go @@ -1,12 +1,10 @@ package privatelinkresources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkresources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privatelinkresources/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/README.md b/resource-manager/synapse/2021-06-01/recoverablesqlpools/README.md index 2b930b39be4..0078752df1a 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/README.md +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/recoverablesqlpools` Documentation -The `recoverablesqlpools` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `recoverablesqlpools` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/client.go b/resource-manager/synapse/2021-06-01/recoverablesqlpools/client.go index 51c4725df89..46d0a45ef12 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/client.go +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/client.go @@ -15,7 +15,7 @@ type RecoverableSqlPoolsClient struct { } func NewRecoverableSqlPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecoverableSqlPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recoverablesqlpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recoverablesqlpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecoverableSqlPoolsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_recoverablesqlpool.go b/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_recoverablesqlpool.go index 8b71b60988b..b88bb62ccf1 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_recoverablesqlpool.go +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_recoverablesqlpool.go @@ -44,7 +44,7 @@ func ParseRecoverableSqlPoolID(input string) (*RecoverableSqlPoolId, error) { } id := RecoverableSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRecoverableSqlPoolIDInsensitively(input string) (*RecoverableSqlPoolId } id := RecoverableSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_workspace.go b/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_workspace.go index db1d0536d2c..f7b43bb83c8 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/method_workspacemanagedsqlserverrecoverablesqlpoolsget.go b/resource-manager/synapse/2021-06-01/recoverablesqlpools/method_workspacemanagedsqlserverrecoverablesqlpoolsget.go index 38a9c56a4c5..a4cf9a97a1a 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/method_workspacemanagedsqlserverrecoverablesqlpoolsget.go +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/method_workspacemanagedsqlserverrecoverablesqlpoolsget.go @@ -45,7 +45,6 @@ func (c RecoverableSqlPoolsClient) WorkspaceManagedSqlServerRecoverableSqlPoolsG var model RecoverableSqlPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/recoverablesqlpools/version.go b/resource-manager/synapse/2021-06-01/recoverablesqlpools/version.go index 39235cf8b4e..24a5b2b0ca6 100644 --- a/resource-manager/synapse/2021-06-01/recoverablesqlpools/version.go +++ b/resource-manager/synapse/2021-06-01/recoverablesqlpools/version.go @@ -1,12 +1,10 @@ package recoverablesqlpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recoverablesqlpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recoverablesqlpools/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/README.md b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/README.md index 599e9ca09d5..d44c178940e 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/README.md +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools` Documentation -The `restorabledroppedsqlpools` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `restorabledroppedsqlpools` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/client.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/client.go index 80489b66b37..e9227ff52c0 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/client.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/client.go @@ -15,7 +15,7 @@ type RestorableDroppedSqlPoolsClient struct { } func NewRestorableDroppedSqlPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*RestorableDroppedSqlPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "restorabledroppedsqlpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "restorabledroppedsqlpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RestorableDroppedSqlPoolsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_restorabledroppedsqlpool.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_restorabledroppedsqlpool.go index 2c8c54e7372..c7ec19bca13 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_restorabledroppedsqlpool.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_restorabledroppedsqlpool.go @@ -44,7 +44,7 @@ func ParseRestorableDroppedSqlPoolID(input string) (*RestorableDroppedSqlPoolId, } id := RestorableDroppedSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRestorableDroppedSqlPoolIDInsensitively(input string) (*RestorableDrop } id := RestorableDroppedSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_workspace.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_workspace.go index 2fb4f932241..5c8b0b96e8f 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_get.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_get.go index 86af62e8ebe..b37e9e69975 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_get.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_get.go @@ -45,7 +45,6 @@ func (c RestorableDroppedSqlPoolsClient) Get(ctx context.Context, id RestorableD var model RestorableDroppedSqlPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_listbyworkspace.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_listbyworkspace.go index 34032fcc69b..9dc558a9e9b 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_listbyworkspace.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/method_listbyworkspace.go @@ -46,7 +46,6 @@ func (c RestorableDroppedSqlPoolsClient) ListByWorkspace(ctx context.Context, id var model RestorableDroppedSqlPoolListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/version.go b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/version.go index f9cc6b02a06..e20e10875ad 100644 --- a/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/version.go +++ b/resource-manager/synapse/2021-06-01/restorabledroppedsqlpools/version.go @@ -1,12 +1,10 @@ package restorabledroppedsqlpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/restorabledroppedsqlpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/restorabledroppedsqlpools/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sensitivitylabels/client.go b/resource-manager/synapse/2021-06-01/sensitivitylabels/client.go index b4f48c1b8f8..e5c16bac54c 100644 --- a/resource-manager/synapse/2021-06-01/sensitivitylabels/client.go +++ b/resource-manager/synapse/2021-06-01/sensitivitylabels/client.go @@ -15,7 +15,7 @@ type SensitivityLabelsClient struct { } func NewSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*SensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sensitivitylabels/id_column.go b/resource-manager/synapse/2021-06-01/sensitivitylabels/id_column.go index 74415c1ef45..97e6197ffba 100644 --- a/resource-manager/synapse/2021-06-01/sensitivitylabels/id_column.go +++ b/resource-manager/synapse/2021-06-01/sensitivitylabels/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sensitivitylabels/version.go b/resource-manager/synapse/2021-06-01/sensitivitylabels/version.go index 7cbeb72994c..5e2f144789b 100644 --- a/resource-manager/synapse/2021-06-01/sensitivitylabels/version.go +++ b/resource-manager/synapse/2021-06-01/sensitivitylabels/version.go @@ -1,12 +1,10 @@ package sensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sensitivitylabels/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/README.md b/resource-manager/synapse/2021-06-01/sqlpools/README.md index e8cb6e72882..bd031459fce 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpools/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpools` Documentation -The `sqlpools` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpools` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpools/client.go b/resource-manager/synapse/2021-06-01/sqlpools/client.go index 3dda53d9532..6f00a8c566e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/client.go @@ -15,7 +15,7 @@ type SqlPoolsClient struct { } func NewSqlPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpools", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpools", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpools/id_sqlpool.go index 44c5f98bcc3..82e2242ffd9 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/id_workspace.go b/resource-manager/synapse/2021-06-01/sqlpools/id_workspace.go index b9bb6da7358..dac331868c2 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/method_get.go b/resource-manager/synapse/2021-06-01/sqlpools/method_get.go index 4bcbbdc403e..d9ee86a3791 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/method_get.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/method_get.go @@ -45,7 +45,6 @@ func (c SqlPoolsClient) Get(ctx context.Context, id SqlPoolId) (result GetOperat var model SqlPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go index 5c66d2a0c88..aae39903246 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go @@ -50,7 +50,6 @@ func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsCreate(ctx context.Context, id var model MetadataSyncConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go index 318c810de6f..2a283bce81b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go @@ -46,7 +46,6 @@ func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsGet(ctx context.Context, id Sq var model MetadataSyncConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/version.go b/resource-manager/synapse/2021-06-01/sqlpools/version.go index e587a19b45f..5f5f1c7fe19 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpools/version.go @@ -1,12 +1,10 @@ package sqlpools -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpools/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpools/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/README.md index eb9a88df2c2..ddb141a2e1b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsbackup` Documentation -The `sqlpoolsbackup` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsbackup` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/client.go index aa32ca34338..75486c4028c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/client.go @@ -15,7 +15,7 @@ type SqlPoolsBackupClient struct { } func NewSqlPoolsBackupClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsBackupClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsbackup", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsbackup", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsBackupClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/id_sqlpool.go index 30c96c028b2..677320fa224 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/version.go index 0c5cc4bb6df..65d8ba02c30 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsbackup/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsbackup/version.go @@ -1,12 +1,10 @@ package sqlpoolsbackup -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsbackup/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsbackup/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/README.md index 247dd83306d..c1cd0afc301 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing` Documentation -The `sqlpoolsblobauditing` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsblobauditing` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/client.go index ba0872a7420..c12d1ad4c27 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/client.go @@ -15,7 +15,7 @@ type SqlPoolsBlobAuditingClient struct { } func NewSqlPoolsBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsBlobAuditingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsblobauditing", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsblobauditing", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsBlobAuditingClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/id_sqlpool.go index 7e1a7c7047b..ac755933bc3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/version.go index dd59d0f9d19..cc66a6d2183 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsblobauditing/version.go @@ -1,12 +1,10 @@ package sqlpoolsblobauditing -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsblobauditing/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsblobauditing/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/README.md index 161da8c823a..05d067e79d3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies` Documentation -The `sqlpoolsconnectionpolicies` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsconnectionpolicies` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/client.go index a4b41beb503..addf97fc351 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/client.go @@ -15,7 +15,7 @@ type SqlPoolsConnectionPoliciesClient struct { } func NewSqlPoolsConnectionPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsConnectionPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsconnectionpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsconnectionpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsConnectionPoliciesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/id_sqlpool.go index 2bdbe1479ac..ebe75d20920 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/method_sqlpoolconnectionpoliciesget.go b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/method_sqlpoolconnectionpoliciesget.go index 65e5d9ace74..c4e329d6119 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/method_sqlpoolconnectionpoliciesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/method_sqlpoolconnectionpoliciesget.go @@ -46,7 +46,6 @@ func (c SqlPoolsConnectionPoliciesClient) SqlPoolConnectionPoliciesGet(ctx conte var model SqlPoolConnectionPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/version.go index ea63b388c87..3287c626c32 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsconnectionpolicies/version.go @@ -1,12 +1,10 @@ package sqlpoolsconnectionpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsconnectionpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsconnectionpolicies/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/README.md index 4695e619821..56dd214ef8f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines` Documentation -The `sqlpoolsdatabasevulnerabilityassesmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsdatabasevulnerabilityassesmentrulebaselines` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/client.go index b39fc44fff2..67ac5fc713b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/client.go @@ -15,7 +15,7 @@ type SqlPoolsDatabaseVulnerabilityAssesmentRuleBaselinesClient struct { } func NewSqlPoolsDatabaseVulnerabilityAssesmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsDatabaseVulnerabilityAssesmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsdatabasevulnerabilityassesmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsdatabasevulnerabilityassesmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsDatabaseVulnerabilityAssesmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/id_baseline.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/id_baseline.go index 15d60e82c9d..5f71adb9d85 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/id_baseline.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinescreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinescreateorupdate.go index 2bcc568378a..bdfecca52a3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinescreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinescreateorupdate.go @@ -49,7 +49,6 @@ func (c SqlPoolsDatabaseVulnerabilityAssesmentRuleBaselinesClient) SqlPoolVulner var model SqlPoolVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/version.go index ce619a75b5d..402789f6b2c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/version.go @@ -1,12 +1,10 @@ package sqlpoolsdatabasevulnerabilityassesmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsdatabasevulnerabilityassesmentrulebaselines/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/README.md index 12a8d918927..8bdf74903df 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies` Documentation -The `sqlpoolsdatamaskingpolicies` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsdatamaskingpolicies` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/client.go index 401fccc9306..afc7255bee5 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/client.go @@ -15,7 +15,7 @@ type SqlPoolsDataMaskingPoliciesClient struct { } func NewSqlPoolsDataMaskingPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsDataMaskingPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsdatamaskingpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsdatamaskingpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsDataMaskingPoliciesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/id_sqlpool.go index f2638e872b3..f48d8f711a5 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciescreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciescreateorupdate.go index b1ff17fb2c1..54b4c3bd0f1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciescreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciescreateorupdate.go @@ -50,7 +50,6 @@ func (c SqlPoolsDataMaskingPoliciesClient) DataMaskingPoliciesCreateOrUpdate(ctx var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciesget.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciesget.go index 09dd9436527..2d54f5a43c7 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/method_datamaskingpoliciesget.go @@ -46,7 +46,6 @@ func (c SqlPoolsDataMaskingPoliciesClient) DataMaskingPoliciesGet(ctx context.Co var model DataMaskingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/version.go index 5fd0f742d32..080eab6191b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingpolicies/version.go @@ -1,12 +1,10 @@ package sqlpoolsdatamaskingpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsdatamaskingpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsdatamaskingpolicies/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/README.md index 16327ec35e4..114364ed03f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules` Documentation -The `sqlpoolsdatamaskingrules` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsdatamaskingrules` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/client.go index d28cee23733..e2822671ed6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/client.go @@ -15,7 +15,7 @@ type SqlPoolsDataMaskingRulesClient struct { } func NewSqlPoolsDataMaskingRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsDataMaskingRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsdatamaskingrules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsdatamaskingrules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsDataMaskingRulesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_rule.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_rule.go index b7f4f08b6d7..e1e805cf707 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_rule.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_rule.go @@ -46,7 +46,7 @@ func ParseRuleID(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRuleIDInsensitively(input string) (*RuleId, error) { } id := RuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_sqlpool.go index 07e68f0c70b..cf935716393 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulescreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulescreateorupdate.go index c34cb099b2d..c0d77cb27a5 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulescreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulescreateorupdate.go @@ -50,7 +50,6 @@ func (c SqlPoolsDataMaskingRulesClient) DataMaskingRulesCreateOrUpdate(ctx conte var model DataMaskingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulesget.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulesget.go index 2aaf33e8451..838d8aa5544 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingrulesget.go @@ -45,7 +45,6 @@ func (c SqlPoolsDataMaskingRulesClient) DataMaskingRulesGet(ctx context.Context, var model DataMaskingRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingruleslistbysqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingruleslistbysqlpool.go index fce47e6731f..c42fee6476a 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingruleslistbysqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/method_datamaskingruleslistbysqlpool.go @@ -46,7 +46,6 @@ func (c SqlPoolsDataMaskingRulesClient) DataMaskingRulesListBySqlPool(ctx contex var model DataMaskingRuleListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/version.go index 01b10aa93c9..c60abad4023 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsdatamaskingrules/version.go @@ -1,12 +1,10 @@ package sqlpoolsdatamaskingrules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsdatamaskingrules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsdatamaskingrules/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/README.md index 18b597ad891..b77384512bd 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies` Documentation -The `sqlpoolsgeobackuppolicies` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsgeobackuppolicies` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/client.go index 498ccf26bfe..2b15ce3116e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/client.go @@ -15,7 +15,7 @@ type SqlPoolsGeoBackupPoliciesClient struct { } func NewSqlPoolsGeoBackupPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsGeoBackupPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsgeobackuppolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsgeobackuppolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsGeoBackupPoliciesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/id_sqlpool.go index ca2260c3b33..07d6042c0a0 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciescreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciescreateorupdate.go index dfc8e690d66..b75d01ab6f7 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciescreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciescreateorupdate.go @@ -51,7 +51,6 @@ func (c SqlPoolsGeoBackupPoliciesClient) SqlPoolGeoBackupPoliciesCreateOrUpdate( var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciesget.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciesget.go index 5c2f63b372a..a311e833cfa 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppoliciesget.go @@ -46,7 +46,6 @@ func (c SqlPoolsGeoBackupPoliciesClient) SqlPoolGeoBackupPoliciesGet(ctx context var model GeoBackupPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppolicieslist.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppolicieslist.go index 4631a50ad25..fdfbf3fa319 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppolicieslist.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/method_sqlpoolgeobackuppolicieslist.go @@ -46,7 +46,6 @@ func (c SqlPoolsGeoBackupPoliciesClient) SqlPoolGeoBackupPoliciesList(ctx contex var model GeoBackupPolicyListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/version.go index 47e970ce16a..fc941974c73 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsgeobackuppolicies/version.go @@ -1,12 +1,10 @@ package sqlpoolsgeobackuppolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsgeobackuppolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsgeobackuppolicies/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/README.md index 00f69a7fb01..5433d1873d3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions` Documentation -The `sqlpoolsmaintenancewindowoptions` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsmaintenancewindowoptions` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/client.go index 7fe7f7f7bf5..132014784f7 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/client.go @@ -15,7 +15,7 @@ type SqlPoolsMaintenanceWindowOptionsClient struct { } func NewSqlPoolsMaintenanceWindowOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsMaintenanceWindowOptionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsmaintenancewindowoptions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsmaintenancewindowoptions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsMaintenanceWindowOptionsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/id_sqlpool.go index 105cadaa603..1c425c7af99 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/method_sqlpoolmaintenancewindowoptionsget.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/method_sqlpoolmaintenancewindowoptionsget.go index 19f3edb15d1..85ae26dc4b0 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/method_sqlpoolmaintenancewindowoptionsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/method_sqlpoolmaintenancewindowoptionsget.go @@ -34,6 +34,7 @@ func (o SqlPoolMaintenanceWindowOptionsGetOperationOptions) ToHeaders() *client. func (o SqlPoolMaintenanceWindowOptionsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlPoolsMaintenanceWindowOptionsClient) SqlPoolMaintenanceWindowOptionsG var model MaintenanceWindowOptions result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/version.go index d55ebbc4e76..4e5b6de4b19 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindowoptions/version.go @@ -1,12 +1,10 @@ package sqlpoolsmaintenancewindowoptions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsmaintenancewindowoptions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsmaintenancewindowoptions/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/README.md index 024bf8448ec..a729b2e0d4b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows` Documentation -The `sqlpoolsmaintenancewindows` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsmaintenancewindows` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/client.go index c4a76cbe3a3..de3f38a7c6c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/client.go @@ -15,7 +15,7 @@ type SqlPoolsMaintenanceWindowsClient struct { } func NewSqlPoolsMaintenanceWindowsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsMaintenanceWindowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsmaintenancewindows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsmaintenancewindows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsMaintenanceWindowsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/id_sqlpool.go index f74190f71c4..fad105aa0cc 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowscreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowscreateorupdate.go index b587ad10898..206d4d44a60 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowscreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowscreateorupdate.go @@ -33,6 +33,7 @@ func (o SqlPoolMaintenanceWindowsCreateOrUpdateOperationOptions) ToHeaders() *cl func (o SqlPoolMaintenanceWindowsCreateOrUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowsget.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowsget.go index ceb9c0efd21..a8dc8af9d1c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/method_sqlpoolmaintenancewindowsget.go @@ -34,6 +34,7 @@ func (o SqlPoolMaintenanceWindowsGetOperationOptions) ToHeaders() *client.Header func (o SqlPoolMaintenanceWindowsGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c SqlPoolsMaintenanceWindowsClient) SqlPoolMaintenanceWindowsGet(ctx conte var model MaintenanceWindows result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/version.go index e9e76c62876..ad5de25f5d8 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsmaintenancewindows/version.go @@ -1,12 +1,10 @@ package sqlpoolsmaintenancewindows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsmaintenancewindows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsmaintenancewindows/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/README.md index a519c44338e..ec2c32dc578 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsoperations` Documentation -The `sqlpoolsoperations` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsoperations` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/client.go index 59d8d91e0f1..0e2ecd5325c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/client.go @@ -15,7 +15,7 @@ type SqlPoolsOperationsClient struct { } func NewSqlPoolsOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsOperationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsoperations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsoperations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsOperationsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/id_sqlpool.go index a85471f8f94..295fa4b2552 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/version.go index ce8581f5cb5..eebf4bb691a 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsoperations/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsoperations/version.go @@ -1,12 +1,10 @@ package sqlpoolsoperations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsoperations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsoperations/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/README.md index c6f3c5709d6..562aee86c65 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks` Documentation -The `sqlpoolsreplicationlinks` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsreplicationlinks` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/client.go index 1036717b75b..c3938469c5b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/client.go @@ -15,7 +15,7 @@ type SqlPoolsReplicationLinksClient struct { } func NewSqlPoolsReplicationLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsReplicationLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsreplicationlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsreplicationlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsReplicationLinksClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_replicationlink.go b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_replicationlink.go index 702cfa1894d..fad92d0602d 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_replicationlink.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_replicationlink.go @@ -46,7 +46,7 @@ func ParseReplicationLinkID(input string) (*ReplicationLinkId, error) { } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, erro } id := ReplicationLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_sqlpool.go index 2b723b23c06..2baa641cd80 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/method_sqlpoolreplicationlinksgetbyname.go b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/method_sqlpoolreplicationlinksgetbyname.go index 84e5e5310a5..9190bf82064 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/method_sqlpoolreplicationlinksgetbyname.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/method_sqlpoolreplicationlinksgetbyname.go @@ -45,7 +45,6 @@ func (c SqlPoolsReplicationLinksClient) SqlPoolReplicationLinksGetByName(ctx con var model ReplicationLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/version.go index 3228637639c..5d73046b3c7 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsreplicationlinks/version.go @@ -1,12 +1,10 @@ package sqlpoolsreplicationlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsreplicationlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsreplicationlinks/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/README.md index 4297f7d5469..51e365a14a4 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints` Documentation -The `sqlpoolsrestorepoints` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsrestorepoints` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/client.go index e13bb88959a..37273307748 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/client.go @@ -15,7 +15,7 @@ type SqlPoolsRestorePointsClient struct { } func NewSqlPoolsRestorePointsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsRestorePointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsrestorepoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsrestorepoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsRestorePointsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_restorepoint.go b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_restorepoint.go index 36a59d86798..ccce09dea00 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_restorepoint.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_restorepoint.go @@ -46,7 +46,7 @@ func ParseRestorePointID(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRestorePointIDInsensitively(input string) (*RestorePointId, error) { } id := RestorePointId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_sqlpool.go index 7550d79b4ef..9f0a081a676 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/method_sqlpoolrestorepointsget.go b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/method_sqlpoolrestorepointsget.go index e18726e247e..58260aeb93c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/method_sqlpoolrestorepointsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/method_sqlpoolrestorepointsget.go @@ -45,7 +45,6 @@ func (c SqlPoolsRestorePointsClient) SqlPoolRestorePointsGet(ctx context.Context var model RestorePoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/version.go index 2f7c9b49e2f..396508498df 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsrestorepoints/version.go @@ -1,12 +1,10 @@ package sqlpoolsrestorepoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsrestorepoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsrestorepoints/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/README.md index 289a9eb192a..ccd06eac6c1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsschemas` Documentation -The `sqlpoolsschemas` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsschemas` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/client.go index f87d75231a6..b9c79dabfe3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/client.go @@ -15,7 +15,7 @@ type SqlPoolsSchemasClient struct { } func NewSqlPoolsSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSchemasClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/id_sqlpool.go index 7f8e59eb8e5..d03c0062d9c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/method_sqlpoolschemaslist.go b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/method_sqlpoolschemaslist.go index cca6cb82fba..d35ab2ddd2a 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/method_sqlpoolschemaslist.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/method_sqlpoolschemaslist.go @@ -39,6 +39,7 @@ func (o SqlPoolSchemasListOperationOptions) ToHeaders() *client.Headers { func (o SqlPoolSchemasListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/version.go index 1e65628cce0..7093edd0b4d 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsschemas/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsschemas/version.go @@ -1,12 +1,10 @@ package sqlpoolsschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsschemas/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/README.md index efd62e2eb7e..11dfe0f2487 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies` Documentation -The `sqlpoolssecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/client.go index 5a40772b124..465d28e7599 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type SqlPoolsSecurityAlertPoliciesClient struct { } func NewSqlPoolsSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/id_sqlpool.go index 9bee8f823f4..a1b83dee09f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciescreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciescreateorupdate.go index 3c0394407b7..ace971198ff 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciescreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciescreateorupdate.go @@ -51,7 +51,6 @@ func (c SqlPoolsSecurityAlertPoliciesClient) SqlPoolSecurityAlertPoliciesCreateO var model SqlPoolSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciesget.go b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciesget.go index 8333c3bf32d..9c6d5f4dec9 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/method_sqlpoolsecurityalertpoliciesget.go @@ -46,7 +46,6 @@ func (c SqlPoolsSecurityAlertPoliciesClient) SqlPoolSecurityAlertPoliciesGet(ctx var model SqlPoolSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/version.go index 3f92aceccd7..2926b09e07e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package sqlpoolssecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssecurityalertpolicies/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/README.md index 8d7a79e9de8..82ade4dbb33 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels` Documentation -The `sqlpoolssensitivitylabels` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssensitivitylabels` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/client.go index de6d3b3341b..c23558de6b8 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/client.go @@ -15,7 +15,7 @@ type SqlPoolsSensitivityLabelsClient struct { } func NewSqlPoolsSensitivityLabelsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSensitivityLabelsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssensitivitylabels", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssensitivitylabels", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSensitivityLabelsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_column.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_column.go index 3ae56bc63b6..1452dea5b05 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_column.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sensitivitylabelsource.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sensitivitylabelsource.go index 1e6fc78741d..10f1b403d76 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sensitivitylabelsource.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sensitivitylabelsource.go @@ -52,7 +52,7 @@ func ParseSensitivityLabelSourceID(input string) (*SensitivityLabelSourceId, err } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseSensitivityLabelSourceIDInsensitively(input string) (*SensitivityLabel } id := SensitivityLabelSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sqlpool.go index 5b532563de0..681fabf23e3 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelscreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelscreateorupdate.go index d3777e6207f..e5a8f46a285 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelscreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelscreateorupdate.go @@ -51,7 +51,6 @@ func (c SqlPoolsSensitivityLabelsClient) SqlPoolSensitivityLabelsCreateOrUpdate( var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelsget.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelsget.go index 710420ae811..e3f213a8c17 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelsget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSensitivityLabelsClient) SqlPoolSensitivityLabelsGet(ctx context var model SensitivityLabel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistcurrent.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistcurrent.go index bbd76922fa1..006ac8a59de 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistcurrent.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistcurrent.go @@ -39,6 +39,7 @@ func (o SqlPoolSensitivityLabelsListCurrentOperationOptions) ToHeaders() *client func (o SqlPoolSensitivityLabelsListCurrentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistrecommended.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistrecommended.go index 02c76176f74..58c0b346e2c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistrecommended.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/method_sqlpoolsensitivitylabelslistrecommended.go @@ -40,6 +40,7 @@ func (o SqlPoolSensitivityLabelsListRecommendedOperationOptions) ToHeaders() *cl func (o SqlPoolSensitivityLabelsListRecommendedOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/version.go index 319e7bca98c..48ff86af8cb 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssensitivitylabels/version.go @@ -1,12 +1,10 @@ package sqlpoolssensitivitylabels -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssensitivitylabels/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssensitivitylabels/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/README.md index 31894455ca1..51c42e23f77 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns` Documentation -The `sqlpoolssqlpoolcolumns` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpoolcolumns` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/client.go index d7109a7495a..17cedbff9c8 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolColumnsClient struct { } func NewSqlPoolsSqlPoolColumnsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolColumnsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpoolcolumns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpoolcolumns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolColumnsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/id_column.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/id_column.go index 9b50e3d11a4..53ec6ec1bda 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/id_column.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/id_column.go @@ -50,7 +50,7 @@ func ParseColumnID(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseColumnIDInsensitively(input string) (*ColumnId, error) { } id := ColumnId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/method_sqlpoolcolumnsget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/method_sqlpoolcolumnsget.go index c64d0462c7c..267fa9958c6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/method_sqlpoolcolumnsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/method_sqlpoolcolumnsget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSqlPoolColumnsClient) SqlPoolColumnsGet(ctx context.Context, id var model SqlPoolColumn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/version.go index b99ad24df14..8aca48cc724 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolcolumns/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpoolcolumns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpoolcolumns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpoolcolumns/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/README.md index f8eda2223a3..67f5a20508d 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas` Documentation -The `sqlpoolssqlpoolschemas` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpoolschemas` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/client.go index 564a1146a69..b7ddca3b055 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolSchemasClient struct { } func NewSqlPoolsSqlPoolSchemasClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolSchemasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpoolschemas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpoolschemas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolSchemasClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/id_schema.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/id_schema.go index ef7a2097fe7..f02be6891b6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/id_schema.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/method_sqlpoolschemasget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/method_sqlpoolschemasget.go index d749f48e9d9..90379319bb1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/method_sqlpoolschemasget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/method_sqlpoolschemasget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSqlPoolSchemasClient) SqlPoolSchemasGet(ctx context.Context, id var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/version.go index 2e2a54329a9..9e24116f6d6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolschemas/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpoolschemas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpoolschemas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpoolschemas/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/README.md index 7ee26ac16c6..a0e0778401c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables` Documentation -The `sqlpoolssqlpooltables` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpooltables` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/client.go index 8801c7801cc..0277b4c256b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolTablesClient struct { } func NewSqlPoolsSqlPoolTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpooltables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpooltables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolTablesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/id_table.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/id_table.go index c15ec5f9f8f..c15f9748cae 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/id_table.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/method_sqlpooltablesget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/method_sqlpooltablesget.go index 844f995141c..e5b272746e0 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/method_sqlpooltablesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/method_sqlpooltablesget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSqlPoolTablesClient) SqlPoolTablesGet(ctx context.Context, id Ta var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/version.go index afd66a62595..7318aacaa96 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooltables/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpooltables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpooltables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpooltables/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/README.md index c0ce598a5e7..a0baa7df96c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities` Documentation -The `sqlpoolssqlpooluseractivities` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpooluseractivities` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/client.go index bcef6bf0b93..2c9902640d0 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolUserActivitiesClient struct { } func NewSqlPoolsSqlPoolUserActivitiesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolUserActivitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpooluseractivities", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpooluseractivities", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolUserActivitiesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/id_sqlpool.go index 735ae276212..f7839aef6e9 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/method_sqlpooldatawarehouseuseractivitiesget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/method_sqlpooldatawarehouseuseractivitiesget.go index 21573b95f04..ce07584f140 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/method_sqlpooldatawarehouseuseractivitiesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/method_sqlpooldatawarehouseuseractivitiesget.go @@ -46,7 +46,6 @@ func (c SqlPoolsSqlPoolUserActivitiesClient) SqlPoolDataWarehouseUserActivitiesG var model DataWarehouseUserActivities result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/version.go index 99687f5392c..d4311690270 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpooluseractivities/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpooluseractivities -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpooluseractivities/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpooluseractivities/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/README.md index 6939a2128a1..28ebc06f6f6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines` Documentation -The `sqlpoolssqlpoolvulnerabilityassesmentrulebaselines` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpoolvulnerabilityassesmentrulebaselines` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/client.go index e64c44ab2b5..0856197c355 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolVulnerabilityAssesmentRuleBaselinesClient struct { } func NewSqlPoolsSqlPoolVulnerabilityAssesmentRuleBaselinesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolVulnerabilityAssesmentRuleBaselinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpoolvulnerabilityassesmentrulebaselines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpoolvulnerabilityassesmentrulebaselines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolVulnerabilityAssesmentRuleBaselinesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/id_baseline.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/id_baseline.go index b4dcb175924..540e7d8b7fd 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/id_baseline.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/id_baseline.go @@ -48,7 +48,7 @@ func ParseBaselineID(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseBaselineIDInsensitively(input string) (*BaselineId, error) { } id := BaselineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinesget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinesget.go index a1b8c1c76ef..3e6ff9ae16b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinesget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/method_sqlpoolvulnerabilityassessmentrulebaselinesget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSqlPoolVulnerabilityAssesmentRuleBaselinesClient) SqlPoolVulnera var model SqlPoolVulnerabilityAssessmentRuleBaseline result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/version.go index 0507b4a42fd..4d815310571 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpoolvulnerabilityassesmentrulebaselines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpoolvulnerabilityassesmentrulebaselines/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/README.md b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/README.md index e1221e916b6..6e31e0b86da 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans` Documentation -The `sqlpoolssqlpoolvulnerabilityassessmentscans` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolssqlpoolvulnerabilityassessmentscans` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/client.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/client.go index 4c9daed9338..e418cd4c443 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/client.go @@ -15,7 +15,7 @@ type SqlPoolsSqlPoolVulnerabilityAssessmentScansClient struct { } func NewSqlPoolsSqlPoolVulnerabilityAssessmentScansClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsSqlPoolVulnerabilityAssessmentScansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolssqlpoolvulnerabilityassessmentscans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolssqlpoolvulnerabilityassessmentscans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsSqlPoolVulnerabilityAssessmentScansClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/id_scan.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/id_scan.go index 7bb9cbaa6ff..5f51cf8579e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/id_scan.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/id_scan.go @@ -46,7 +46,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/method_sqlpoolvulnerabilityassessmentscansget.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/method_sqlpoolvulnerabilityassessmentscansget.go index c1c8ca734a3..f5114e7547f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/method_sqlpoolvulnerabilityassessmentscansget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/method_sqlpoolvulnerabilityassessmentscansget.go @@ -45,7 +45,6 @@ func (c SqlPoolsSqlPoolVulnerabilityAssessmentScansClient) SqlPoolVulnerabilityA var model VulnerabilityAssessmentScanRecord result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/version.go b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/version.go index 9f183896ef4..239a0ec1a3c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolssqlpoolvulnerabilityassessmentscans/version.go @@ -1,12 +1,10 @@ package sqlpoolssqlpoolvulnerabilityassessmentscans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolssqlpoolvulnerabilityassessmentscans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolssqlpoolvulnerabilityassessmentscans/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/README.md b/resource-manager/synapse/2021-06-01/sqlpoolstables/README.md index b37b4af6e30..0c7ea40c69c 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolstables` Documentation -The `sqlpoolstables` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolstables` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/client.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/client.go index b7d0f6e66b3..85062cda116 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/client.go @@ -15,7 +15,7 @@ type SqlPoolsTablesClient struct { } func NewSqlPoolsTablesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolstables", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolstables", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsTablesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/id_schema.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/id_schema.go index cb2af33032d..28c34fa8a71 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/id_schema.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/id_schema.go @@ -46,7 +46,7 @@ func ParseSchemaID(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSchemaIDInsensitively(input string) (*SchemaId, error) { } id := SchemaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/id_table.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/id_table.go index 32ed04ba7e3..fb9713d9c99 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/id_table.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/id_table.go @@ -48,7 +48,7 @@ func ParseTableID(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTableIDInsensitively(input string) (*TableId, error) { } id := TableId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltablecolumnslistbytablename.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltablecolumnslistbytablename.go index 1b846bc63e8..20370fec24f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltablecolumnslistbytablename.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltablecolumnslistbytablename.go @@ -39,6 +39,7 @@ func (o SqlPoolTableColumnsListByTableNameOperationOptions) ToHeaders() *client. func (o SqlPoolTableColumnsListByTableNameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltableslistbyschema.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltableslistbyschema.go index b8a38915dc6..41193bc76be 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltableslistbyschema.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/method_sqlpooltableslistbyschema.go @@ -39,6 +39,7 @@ func (o SqlPoolTablesListBySchemaOperationOptions) ToHeaders() *client.Headers { func (o SqlPoolTablesListBySchemaOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstables/version.go b/resource-manager/synapse/2021-06-01/sqlpoolstables/version.go index ee1bad8c33e..ca3afb28f9b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstables/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstables/version.go @@ -1,12 +1,10 @@ package sqlpoolstables -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolstables/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolstables/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/README.md b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/README.md index cea15f3bfb0..0dcbbe97536 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption` Documentation -The `sqlpoolstransparentdataencryption` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolstransparentdataencryption` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/client.go b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/client.go index 621cb502331..257dbd06c31 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/client.go @@ -15,7 +15,7 @@ type SqlPoolsTransparentDataEncryptionClient struct { } func NewSqlPoolsTransparentDataEncryptionClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsTransparentDataEncryptionClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolstransparentdataencryption", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolstransparentdataencryption", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsTransparentDataEncryptionClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/id_sqlpool.go index 6c28fa6e731..5553218589e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionscreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionscreateorupdate.go index 18147db1eee..46845b1ec85 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionscreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionscreateorupdate.go @@ -51,7 +51,6 @@ func (c SqlPoolsTransparentDataEncryptionClient) SqlPoolTransparentDataEncryptio var model TransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionsget.go b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionsget.go index 8a2c168dfdd..255481bf3cf 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/method_sqlpooltransparentdataencryptionsget.go @@ -46,7 +46,6 @@ func (c SqlPoolsTransparentDataEncryptionClient) SqlPoolTransparentDataEncryptio var model TransparentDataEncryption result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/version.go b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/version.go index c6467b52bab..93edc2f98d8 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolstransparentdataencryption/version.go @@ -1,12 +1,10 @@ package sqlpoolstransparentdataencryption -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolstransparentdataencryption/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolstransparentdataencryption/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsusages/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsusages/README.md index c9d0664eb10..efba3d1e6b5 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsusages/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsusages` Documentation -The `sqlpoolsusages` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsusages` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsusages/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsusages/client.go index 2020415984e..145d5ad574f 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsusages/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsusages/client.go @@ -15,7 +15,7 @@ type SqlPoolsUsagesClient struct { } func NewSqlPoolsUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsUsagesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsusages/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsusages/id_sqlpool.go index e79d77dfe56..e4dce0270af 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsusages/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsusages/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsusages/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsusages/version.go index 1000c1b52f9..a93c1702edb 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsusages/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsusages/version.go @@ -1,12 +1,10 @@ package sqlpoolsusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsusages/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/README.md index 21ed118b8a7..12a2a293e0b 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments` Documentation -The `sqlpoolsvulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsvulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/client.go index ccf91d0f682..e481740e69d 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type SqlPoolsVulnerabilityAssessmentsClient struct { } func NewSqlPoolsVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsvulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsvulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/id_sqlpool.go index f76465382b0..7cd4b2704da 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentscreateorupdate.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentscreateorupdate.go index c6df3aab536..3a954dfcdae 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentscreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentscreateorupdate.go @@ -51,7 +51,6 @@ func (c SqlPoolsVulnerabilityAssessmentsClient) SqlPoolVulnerabilityAssessmentsC var model SqlPoolVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentsget.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentsget.go index e3a16b7ccc9..6f723544770 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentsget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/method_sqlpoolvulnerabilityassessmentsget.go @@ -46,7 +46,6 @@ func (c SqlPoolsVulnerabilityAssessmentsClient) SqlPoolVulnerabilityAssessmentsG var model SqlPoolVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/version.go index f42e71b1929..a8f1cbf64a9 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package sqlpoolsvulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessments/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/client.go index e402e0ef8ee..a23734af8e1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/client.go @@ -15,7 +15,7 @@ type SqlPoolsVulnerabilityAssessmentScansExecuteClient struct { } func NewSqlPoolsVulnerabilityAssessmentScansExecuteClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsVulnerabilityAssessmentScansExecuteClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsvulnerabilityassessmentscansexecute", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsvulnerabilityassessmentscansexecute", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsVulnerabilityAssessmentScansExecuteClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/id_scan.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/id_scan.go index d4becb80562..fea9bf29144 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/id_scan.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/id_scan.go @@ -46,7 +46,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/version.go index 023f84c2c82..a6e364834d6 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexecute/version.go @@ -1,12 +1,10 @@ package sqlpoolsvulnerabilityassessmentscansexecute -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessmentscansexecute/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessmentscansexecute/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/README.md index bd71a0240ae..c58a6b206df 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport` Documentation -The `sqlpoolsvulnerabilityassessmentscansexport` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsvulnerabilityassessmentscansexport` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/client.go index 2c37c8fe526..b74b80ddebc 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/client.go @@ -15,7 +15,7 @@ type SqlPoolsVulnerabilityAssessmentScansExportClient struct { } func NewSqlPoolsVulnerabilityAssessmentScansExportClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsVulnerabilityAssessmentScansExportClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsvulnerabilityassessmentscansexport", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsvulnerabilityassessmentscansexport", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsVulnerabilityAssessmentScansExportClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/id_scan.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/id_scan.go index 00fe483a950..6cc98b0b875 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/id_scan.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/id_scan.go @@ -46,7 +46,7 @@ func ParseScanID(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScanIDInsensitively(input string) (*ScanId, error) { } id := ScanId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/method_sqlpoolvulnerabilityassessmentscansexport.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/method_sqlpoolvulnerabilityassessmentscansexport.go index 39c6a6fbd1b..f0292e09f86 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/method_sqlpoolvulnerabilityassessmentscansexport.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/method_sqlpoolvulnerabilityassessmentscansexport.go @@ -46,7 +46,6 @@ func (c SqlPoolsVulnerabilityAssessmentScansExportClient) SqlPoolVulnerabilityAs var model SqlPoolVulnerabilityAssessmentScansExport result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/version.go index 513c620822e..a2c7cfdb48a 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsvulnerabilityassessmentscansexport/version.go @@ -1,12 +1,10 @@ package sqlpoolsvulnerabilityassessmentscansexport -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessmentscansexport/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsvulnerabilityassessmentscansexport/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/README.md index 8d85c9c81b3..31494fb8d8e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers` Documentation -The `sqlpoolsworkloadclassifiers` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsworkloadclassifiers` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/client.go index d2a3948ee2e..87e73139edd 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/client.go @@ -15,7 +15,7 @@ type SqlPoolsWorkloadClassifiersClient struct { } func NewSqlPoolsWorkloadClassifiersClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsWorkloadClassifiersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsworkloadclassifiers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsworkloadclassifiers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsWorkloadClassifiersClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadclassifier.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadclassifier.go index b3ed17a5216..e4d689b9e49 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadclassifier.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadclassifier.go @@ -48,7 +48,7 @@ func ParseWorkloadClassifierID(input string) (*WorkloadClassifierId, error) { } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseWorkloadClassifierIDInsensitively(input string) (*WorkloadClassifierId } id := WorkloadClassifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadgroup.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadgroup.go index 40366d15ef1..5a4c077a193 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadgroup.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/method_sqlpoolworkloadclassifierget.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/method_sqlpoolworkloadclassifierget.go index 66c924ef08c..7963fd8f09e 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/method_sqlpoolworkloadclassifierget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/method_sqlpoolworkloadclassifierget.go @@ -45,7 +45,6 @@ func (c SqlPoolsWorkloadClassifiersClient) SqlPoolWorkloadClassifierGet(ctx cont var model WorkloadClassifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/version.go index 8f5e6480847..c2438b65e39 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadclassifiers/version.go @@ -1,12 +1,10 @@ package sqlpoolsworkloadclassifiers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsworkloadclassifiers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsworkloadclassifiers/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/README.md b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/README.md index 5d44c77acc5..30cef04cbc0 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups` Documentation -The `sqlpoolsworkloadgroups` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `sqlpoolsworkloadgroups` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/client.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/client.go index 62d97be546e..ef6961b7fa7 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/client.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/client.go @@ -15,7 +15,7 @@ type SqlPoolsWorkloadGroupsClient struct { } func NewSqlPoolsWorkloadGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*SqlPoolsWorkloadGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sqlpoolsworkloadgroups", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sqlpoolsworkloadgroups", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SqlPoolsWorkloadGroupsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_sqlpool.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_sqlpool.go index 9a8bd5a4227..f07f42d831d 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_sqlpool.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_sqlpool.go @@ -44,7 +44,7 @@ func ParseSqlPoolID(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSqlPoolIDInsensitively(input string) (*SqlPoolId, error) { } id := SqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_workloadgroup.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_workloadgroup.go index 78e65060e62..00123fb01b1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_workloadgroup.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/id_workloadgroup.go @@ -46,7 +46,7 @@ func ParseWorkloadGroupID(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkloadGroupIDInsensitively(input string) (*WorkloadGroupId, error) { } id := WorkloadGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/method_sqlpoolworkloadgroupget.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/method_sqlpoolworkloadgroupget.go index c4fa588619b..a1718f82ce1 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/method_sqlpoolworkloadgroupget.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/method_sqlpoolworkloadgroupget.go @@ -45,7 +45,6 @@ func (c SqlPoolsWorkloadGroupsClient) SqlPoolWorkloadGroupGet(ctx context.Contex var model WorkloadGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/version.go b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/version.go index 47f44c18bc3..3aec49c7457 100644 --- a/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/version.go +++ b/resource-manager/synapse/2021-06-01/sqlpoolsworkloadgroups/version.go @@ -1,12 +1,10 @@ package sqlpoolsworkloadgroups -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sqlpoolsworkloadgroups/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sqlpoolsworkloadgroups/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/README.md b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/README.md index ec38d992523..c2a7523e0d5 100644 --- a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/README.md +++ b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications` Documentation -The `workspaceazureadonlyauthentications` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspaceazureadonlyauthentications` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/client.go b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/client.go index 2e07d07884d..7f8a68b2ac3 100644 --- a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/client.go +++ b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/client.go @@ -15,7 +15,7 @@ type WorkspaceAzureADOnlyAuthenticationsClient struct { } func NewWorkspaceAzureADOnlyAuthenticationsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceAzureADOnlyAuthenticationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaceazureadonlyauthentications", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaceazureadonlyauthentications", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceAzureADOnlyAuthenticationsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/id_workspace.go b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/id_workspace.go index 47b2497ea2e..d6b41dd2e40 100644 --- a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/method_azureadonlyauthenticationsget.go b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/method_azureadonlyauthenticationsget.go index 1f952d17708..0968c57c05e 100644 --- a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/method_azureadonlyauthenticationsget.go +++ b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/method_azureadonlyauthenticationsget.go @@ -46,7 +46,6 @@ func (c WorkspaceAzureADOnlyAuthenticationsClient) AzureADOnlyAuthenticationsGet var model AzureADOnlyAuthentication result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/version.go b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/version.go index 7a551f6b06f..11a774963f3 100644 --- a/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/version.go +++ b/resource-manager/synapse/2021-06-01/workspaceazureadonlyauthentications/version.go @@ -1,12 +1,10 @@ package workspaceazureadonlyauthentications -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaceazureadonlyauthentications/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaceazureadonlyauthentications/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/README.md index 70f30e0d1c3..bd6a4e045a3 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver` Documentation -The `workspacemanagedsqlserver` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserver` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/client.go index 8af9e101a72..2046897f9cf 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerClient struct { } func NewWorkspaceManagedSqlServerClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserver", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserver", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_recoverablesqlpool.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_recoverablesqlpool.go index 0f8aaa96f0e..d85ab5c6795 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_recoverablesqlpool.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_recoverablesqlpool.go @@ -44,7 +44,7 @@ func ParseRecoverableSqlPoolID(input string) (*RecoverableSqlPoolId, error) { } id := RecoverableSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRecoverableSqlPoolIDInsensitively(input string) (*RecoverableSqlPoolId } id := RecoverableSqlPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_workspace.go index 234fc94f65c..d036d0b54e3 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/method_recoverablesqlpoolsget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/method_recoverablesqlpoolsget.go index f99e0c6db12..9345288d322 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/method_recoverablesqlpoolsget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/method_recoverablesqlpoolsget.go @@ -45,7 +45,6 @@ func (c WorkspaceManagedSqlServerClient) RecoverableSqlPoolsGet(ctx context.Cont var model RecoverableSqlPool result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/version.go index 3f3d5f36fdb..4d043b77766 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserver/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserver -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserver/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserver/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/README.md index 8286bac255b..4bf5fd544d8 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing` Documentation -The `workspacemanagedsqlserverblobauditing` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserverblobauditing` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/client.go index c6b3ddff3d1..e19c4ec651c 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerBlobAuditingClient struct { } func NewWorkspaceManagedSqlServerBlobAuditingClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerBlobAuditingClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserverblobauditing", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserverblobauditing", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerBlobAuditingClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/id_workspace.go index 7f1758b953b..a54149050a3 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverblobauditingpoliciesget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverblobauditingpoliciesget.go index 7ced155c35e..086fd96120a 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverblobauditingpoliciesget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverblobauditingpoliciesget.go @@ -46,7 +46,6 @@ func (c WorkspaceManagedSqlServerBlobAuditingClient) WorkspaceManagedSqlServerBl var model ServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverextendedblobauditingpoliciesget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverextendedblobauditingpoliciesget.go index e4c20b33b13..0e10c712316 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverextendedblobauditingpoliciesget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/method_workspacemanagedsqlserverextendedblobauditingpoliciesget.go @@ -46,7 +46,6 @@ func (c WorkspaceManagedSqlServerBlobAuditingClient) WorkspaceManagedSqlServerEx var model ExtendedServerBlobAuditingPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/version.go index be48e786dc0..daff057a059 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverblobauditing/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserverblobauditing -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserverblobauditing/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserverblobauditing/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/README.md index 5cc82b6a42d..744e4233e9b 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings` Documentation -The `workspacemanagedsqlserverdedicatedsqlminimaltlssettings` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserverdedicatedsqlminimaltlssettings` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/client.go index 2162f7dd54e..04c0503987a 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerDedicatedSQLminimalTlsSettingsClient struct { } func NewWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerDedicatedSQLminimalTlsSettingsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserverdedicatedsqlminimaltlssettings", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserverdedicatedsqlminimaltlssettings", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerDedicatedSQLminimalTlsSettingsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_dedicatedsqlminimaltlssetting.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_dedicatedsqlminimaltlssetting.go index 790dc922a43..9d0348bab1e 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_dedicatedsqlminimaltlssetting.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_dedicatedsqlminimaltlssetting.go @@ -44,7 +44,7 @@ func ParseDedicatedSQLMinimalTLSSettingID(input string) (*DedicatedSQLMinimalTLS } id := DedicatedSQLMinimalTLSSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDedicatedSQLMinimalTLSSettingIDInsensitively(input string) (*Dedicated } id := DedicatedSQLMinimalTLSSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_workspace.go index c26ef7e671b..5aa6fd21c4c 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/method_get.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/method_get.go index 17cf7559d72..9ac51fb9ab5 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/method_get.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/method_get.go @@ -45,7 +45,6 @@ func (c WorkspaceManagedSqlServerDedicatedSQLminimalTlsSettingsClient) Get(ctx c var model DedicatedSQLMinimalTLSSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/version.go index 9ea0aefe80d..a4b6fbd3e43 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserverdedicatedsqlminimaltlssettings -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserverdedicatedsqlminimaltlssettings/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/README.md index 2a64fe66368..67a72238f6c 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies` Documentation -The `workspacemanagedsqlserversecurityalertpolicies` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserversecurityalertpolicies` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/client.go index 7c22d3ccc87..839466ead31 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerSecurityAlertPoliciesClient struct { } func NewWorkspaceManagedSqlServerSecurityAlertPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerSecurityAlertPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserversecurityalertpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserversecurityalertpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerSecurityAlertPoliciesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/id_workspace.go index 88f72f865ec..17e598b90dc 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/method_workspacemanagedsqlserversecurityalertpolicyget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/method_workspacemanagedsqlserversecurityalertpolicyget.go index ad1c6f57cd5..38fe53e5de9 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/method_workspacemanagedsqlserversecurityalertpolicyget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/method_workspacemanagedsqlserversecurityalertpolicyget.go @@ -46,7 +46,6 @@ func (c WorkspaceManagedSqlServerSecurityAlertPoliciesClient) WorkspaceManagedSq var model ServerSecurityAlertPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/version.go index d2e943002a7..51250464c79 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversecurityalertpolicies/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserversecurityalertpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserversecurityalertpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserversecurityalertpolicies/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/README.md index bfc0d186db1..abfcc35b6c9 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector` Documentation -The `workspacemanagedsqlserverserverencryptionprotector` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserverserverencryptionprotector` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/client.go index 308160de19b..e2020fac5e0 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerServerEncryptionProtectorClient struct { } func NewWorkspaceManagedSqlServerServerEncryptionProtectorClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerServerEncryptionProtectorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserverserverencryptionprotector", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserverserverencryptionprotector", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerServerEncryptionProtectorClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/id_workspace.go index cc305f7a47f..8bd57533f1d 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/method_workspacemanagedsqlserverencryptionprotectorget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/method_workspacemanagedsqlserverencryptionprotectorget.go index da6a28b5a83..73d59e1fb23 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/method_workspacemanagedsqlserverencryptionprotectorget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/method_workspacemanagedsqlserverencryptionprotectorget.go @@ -46,7 +46,6 @@ func (c WorkspaceManagedSqlServerServerEncryptionProtectorClient) WorkspaceManag var model EncryptionProtector result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/version.go index b7bb2cfb085..c5ac50abe1a 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverserverencryptionprotector/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserverserverencryptionprotector -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserverserverencryptionprotector/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserverserverencryptionprotector/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/README.md index 6552d2eed70..b993c45bc0c 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments` Documentation -The `workspacemanagedsqlserverservervulnerabilityassessments` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserverservervulnerabilityassessments` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/client.go index 79b8e8b285a..83fefb7a26e 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerServerVulnerabilityAssessmentsClient struct { } func NewWorkspaceManagedSqlServerServerVulnerabilityAssessmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerServerVulnerabilityAssessmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserverservervulnerabilityassessments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserverservervulnerabilityassessments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerServerVulnerabilityAssessmentsClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/id_workspace.go index 52dccf0c3ac..af0f1c79159 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentscreateorupdate.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentscreateorupdate.go index b64d3cad845..61b3733201e 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentscreateorupdate.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentscreateorupdate.go @@ -51,7 +51,6 @@ func (c WorkspaceManagedSqlServerServerVulnerabilityAssessmentsClient) Workspace var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentsget.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentsget.go index 8740352ab5f..ce597ecc34e 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentsget.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/method_workspacemanagedsqlservervulnerabilityassessmentsget.go @@ -46,7 +46,6 @@ func (c WorkspaceManagedSqlServerServerVulnerabilityAssessmentsClient) Workspace var model ServerVulnerabilityAssessment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/version.go index da16c776f57..61e2843e100 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserverservervulnerabilityassessments/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserverservervulnerabilityassessments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserverservervulnerabilityassessments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserverservervulnerabilityassessments/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/README.md b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/README.md index 2d7d19ad5e9..af1074d77e9 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/README.md +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages` Documentation -The `workspacemanagedsqlserversqlusages` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspacemanagedsqlserversqlusages` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/client.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/client.go index 942304efcee..35a242e271a 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/client.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/client.go @@ -15,7 +15,7 @@ type WorkspaceManagedSqlServerSqlUsagesClient struct { } func NewWorkspaceManagedSqlServerSqlUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagedSqlServerSqlUsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspacemanagedsqlserversqlusages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspacemanagedsqlserversqlusages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspaceManagedSqlServerSqlUsagesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/id_workspace.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/id_workspace.go index 7cdd412ca45..589426b7d1c 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/version.go b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/version.go index c7d6d0bbfc3..296798c1542 100644 --- a/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/version.go +++ b/resource-manager/synapse/2021-06-01/workspacemanagedsqlserversqlusages/version.go @@ -1,12 +1,10 @@ package workspacemanagedsqlserversqlusages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspacemanagedsqlserversqlusages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspacemanagedsqlserversqlusages/2021-06-01" } diff --git a/resource-manager/synapse/2021-06-01/workspaces/README.md b/resource-manager/synapse/2021-06-01/workspaces/README.md index a629a6f1c4c..ad6bc82894f 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/README.md +++ b/resource-manager/synapse/2021-06-01/workspaces/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/workspaces` Documentation -The `workspaces` SDK allows for interaction with the Azure Resource Manager Service `synapse` (API Version `2021-06-01`). +The `workspaces` SDK allows for interaction with Azure Resource Manager `synapse` (API Version `2021-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/synapse/2021-06-01/workspaces/client.go b/resource-manager/synapse/2021-06-01/workspaces/client.go index d599252c05c..c6ef3485d22 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/client.go +++ b/resource-manager/synapse/2021-06-01/workspaces/client.go @@ -15,7 +15,7 @@ type WorkspacesClient struct { } func NewWorkspacesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workspaces", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workspaces", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkspacesClient: %+v", err) } diff --git a/resource-manager/synapse/2021-06-01/workspaces/id_workspace.go b/resource-manager/synapse/2021-06-01/workspaces/id_workspace.go index 9b7a22938bc..3e79df29672 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/id_workspace.go +++ b/resource-manager/synapse/2021-06-01/workspaces/id_workspace.go @@ -42,7 +42,7 @@ func ParseWorkspaceID(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error) { } id := WorkspaceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/synapse/2021-06-01/workspaces/method_get.go b/resource-manager/synapse/2021-06-01/workspaces/method_get.go index d4a1a279a97..532c4ea30f7 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/method_get.go +++ b/resource-manager/synapse/2021-06-01/workspaces/method_get.go @@ -45,7 +45,6 @@ func (c WorkspacesClient) Get(ctx context.Context, id WorkspaceId) (result GetOp var model Workspace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspaces/method_qlaadadminsget.go b/resource-manager/synapse/2021-06-01/workspaces/method_qlaadadminsget.go index 65e2487a078..163939a0097 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/method_qlaadadminsget.go +++ b/resource-manager/synapse/2021-06-01/workspaces/method_qlaadadminsget.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) QlAadAdminsGet(ctx context.Context, id WorkspaceId) (r var model WorkspaceAadAdminInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspaces/method_workspaceaadadminsget.go b/resource-manager/synapse/2021-06-01/workspaces/method_workspaceaadadminsget.go index c0d997f736e..38d06666df9 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/method_workspaceaadadminsget.go +++ b/resource-manager/synapse/2021-06-01/workspaces/method_workspaceaadadminsget.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) WorkspaceAadAdminsGet(ctx context.Context, id Workspac var model WorkspaceAadAdminInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspaces/method_workspacemanagedidentitysqlcontrolsettingsget.go b/resource-manager/synapse/2021-06-01/workspaces/method_workspacemanagedidentitysqlcontrolsettingsget.go index 05c9870cd1f..d50326e557b 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/method_workspacemanagedidentitysqlcontrolsettingsget.go +++ b/resource-manager/synapse/2021-06-01/workspaces/method_workspacemanagedidentitysqlcontrolsettingsget.go @@ -46,7 +46,6 @@ func (c WorkspacesClient) WorkspaceManagedIdentitySqlControlSettingsGet(ctx cont var model ManagedIdentitySqlControlSettingsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/synapse/2021-06-01/workspaces/version.go b/resource-manager/synapse/2021-06-01/workspaces/version.go index c34ac6065c2..f1149dc5c13 100644 --- a/resource-manager/synapse/2021-06-01/workspaces/version.go +++ b/resource-manager/synapse/2021-06-01/workspaces/version.go @@ -1,12 +1,10 @@ package workspaces -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workspaces/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workspaces/2021-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/README.md index 29412f67321..97a7ab53d74 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/id_availabilityset.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/id_availabilityset.go index 234e7b69b02..a1dd0c8566d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/id_availabilityset.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/id_availabilityset.go @@ -42,7 +42,7 @@ func ParseAvailabilitySetID(input string) (*AvailabilitySetId, error) { } id := AvailabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAvailabilitySetIDInsensitively(input string) (*AvailabilitySetId, erro } id := AvailabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_delete.go index 1152b836a8f..999b3553353 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_get.go index b64927d0b03..3e6d190e600 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/method_get.go @@ -45,7 +45,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id AvailabilitySetId) ( var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/version.go index b5ddd1201cc..28b4e87c65c 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/README.md index e773def393d..deb74ad2142 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds` Documentation -The `clouds` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `clouds` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/client.go index 9720d371598..b75679206d0 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/client.go @@ -15,7 +15,7 @@ type CloudsClient struct { } func NewCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/id_cloud.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/id_cloud.go index 1547a210605..be48ba12831 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/id_cloud.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/id_cloud.go @@ -42,7 +42,7 @@ func ParseCloudID(input string) (*CloudId, error) { } id := CloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudIDInsensitively(input string) (*CloudId, error) { } id := CloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_delete.go index 9d69f8fae92..7aa5083b8f8 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_get.go index d0b156616ab..3e2a13ee4b7 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/method_get.go @@ -45,7 +45,6 @@ func (c CloudsClient) Get(ctx context.Context, id CloudId) (result GetOperationR var model Cloud result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/version.go index 1935d3db100..11c357762dd 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/clouds/version.go @@ -1,12 +1,10 @@ package clouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clouds/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/README.md index 7ed86a9f49b..b42f959dc23 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents` Documentation -The `guestagents` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `guestagents` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/client.go index 8b3899fa940..8bafe6eb1b9 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/client.go @@ -15,7 +15,7 @@ type GuestAgentsClient struct { } func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestAgentsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/method_get.go index cd77b3a95bb..5947acaf004 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/method_get.go @@ -47,7 +47,6 @@ func (c GuestAgentsClient) Get(ctx context.Context, id commonids.ScopeId) (resul var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/version.go index 7019786d6d9..08482d3bc81 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/guestagents/version.go @@ -1,12 +1,10 @@ package guestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestagents/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/README.md index 3588d88600d..ce64452a8e0 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems` Documentation -The `inventoryitems` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `inventoryitems` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/client.go index fbe00f649cc..d0909622b9a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/client.go @@ -15,7 +15,7 @@ type InventoryItemsClient struct { } func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inventoryitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inventoryitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InventoryItemsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_inventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_inventoryitem.go index 6619efc6e3f..21ee2fa7d0e 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_inventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_inventoryitem.go @@ -44,7 +44,7 @@ func ParseInventoryItemID(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_vmmserver.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_vmmserver.go index 154cf1910d9..3de3cd4d640 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_vmmserver.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/id_vmmserver.go @@ -42,7 +42,7 @@ func ParseVMmServerID(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMmServerIDInsensitively(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_create.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_create.go index 4cec8e38325..988b0058456 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_create.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_create.go @@ -50,7 +50,6 @@ func (c InventoryItemsClient) Create(ctx context.Context, id InventoryItemId, in var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_get.go index 4df52d77cdc..c143a4f83ea 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/method_get.go @@ -45,7 +45,6 @@ func (c InventoryItemsClient) Get(ctx context.Context, id InventoryItemId) (resu var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_cloudinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_cloudinventoryitem.go index b8d67d2a4b2..e8ff0ca938f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_cloudinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_cloudinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = CloudInventoryItem{} type CloudInventoryItem struct { // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s CloudInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = CloudInventoryItem{} func (s CloudInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s CloudInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CloudInventoryItem: %+v", err) } + decoded["inventoryType"] = "Cloud" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitem.go index 92f80c1062d..c941ca67a24 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitem.go @@ -40,7 +40,7 @@ func (s *InventoryItem) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInventoryItemPropertiesImplementation(v) + impl, err := UnmarshalInventoryItemPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'InventoryItem': %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitemproperties.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitemproperties.go index 897fb127207..00069c71fe6 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitemproperties.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_inventoryitemproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InventoryItemProperties interface { + InventoryItemProperties() BaseInventoryItemPropertiesImpl } -// RawInventoryItemPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InventoryItemProperties = BaseInventoryItemPropertiesImpl{} + +type BaseInventoryItemPropertiesImpl struct { + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Uuid *string `json:"uuid,omitempty"` +} + +func (s BaseInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s +} + +var _ InventoryItemProperties = RawInventoryItemPropertiesImpl{} + +// RawInventoryItemPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInventoryItemPropertiesImpl struct { - Type string - Values map[string]interface{} + inventoryItemProperties BaseInventoryItemPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s.inventoryItemProperties } -func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { +func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItem return out, nil } - out := RawInventoryItemPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInventoryItemPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInventoryItemPropertiesImpl: %+v", err) } - return out, nil + + return RawInventoryItemPropertiesImpl{ + inventoryItemProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachineinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachineinventoryitem.go index 8feb3388a14..66a9d54de1e 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachineinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachineinventoryitem.go @@ -21,12 +21,24 @@ type VirtualMachineInventoryItem struct { PowerState *string `json:"powerState,omitempty"` // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualMachineInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualMachineInventoryItem{} func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachinetemplateinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachinetemplateinventoryitem.go index d039273b749..f6adc162e46 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachinetemplateinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualmachinetemplateinventoryitem.go @@ -17,12 +17,24 @@ type VirtualMachineTemplateInventoryItem struct { OsType *OsType `json:"osType,omitempty"` // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualMachineTemplateInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualMachineTemplateInventoryItem{} func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { @@ -34,9 +46,10 @@ func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTemplateInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachineTemplate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualnetworkinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualnetworkinventoryitem.go index 23e698f13a8..17c2229d32b 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualnetworkinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/model_virtualnetworkinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = VirtualNetworkInventoryItem{} type VirtualNetworkInventoryItem struct { // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualNetworkInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualNetworkInventoryItem{} func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualNetworkInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualNetwork" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/version.go index 9aa6fde2110..ec59321ee89 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/inventoryitems/version.go @@ -1,12 +1,10 @@ package inventoryitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inventoryitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inventoryitems/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/README.md index 3f27f82a2ab..b9c505f5921 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances` Documentation -The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `virtualmachineinstances` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/client.go index e40ddc4adf5..18d28a8f009 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/client.go @@ -15,7 +15,7 @@ type VirtualMachineInstancesClient struct { } func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_delete.go index ca2a8334505..e5dab7b5518 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_get.go index 7a724ebe139..589384c0dd0 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/method_get.go @@ -47,7 +47,6 @@ func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.Sco var model VirtualMachineInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/version.go index ff7feb15274..8fb479a6e2d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachineinstances/version.go @@ -1,12 +1,10 @@ package virtualmachineinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineinstances/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/README.md index f2ef7dcbf0f..ec03a5428d6 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates` Documentation -The `virtualmachinetemplates` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `virtualmachinetemplates` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/client.go index 12c5314c789..fc11bf98a1a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/client.go @@ -15,7 +15,7 @@ type VirtualMachineTemplatesClient struct { } func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineTemplatesClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/id_virtualmachinetemplate.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/id_virtualmachinetemplate.go index 96686b25600..db03dadbb0d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/id_virtualmachinetemplate.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/id_virtualmachinetemplate.go @@ -42,7 +42,7 @@ func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, err } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTe } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_delete.go index 6073a8906f8..fad5c872392 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_get.go index 9792aa1db2b..379f0f21ea4 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineTemplatesClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/version.go index 719a261728d..7e0c8a82b87 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualmachinetemplates/version.go @@ -1,12 +1,10 @@ package virtualmachinetemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinetemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinetemplates/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/README.md index 5894f24d79f..7e9e504f461 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/id_virtualnetwork.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/id_virtualnetwork.go index 53a98d78d1a..af8ed2f3324 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_delete.go index fc9f19e84de..386eba98bea 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_get.go index a27c17c1604..273f0922d91 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (re var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/version.go index da76573b44d..6f05936e91b 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/README.md index 9f5219f9a46..aa97a388571 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas` Documentation -The `vminstancehybrididentitymetadatas` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `vminstancehybrididentitymetadatas` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/client.go index 630e0e87624..540c9c37362 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/client.go @@ -15,7 +15,7 @@ type VMInstanceHybridIdentityMetadatasClient struct { } func NewVMInstanceHybridIdentityMetadatasClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceHybridIdentityMetadatasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstancehybrididentitymetadatas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstancehybrididentitymetadatas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceHybridIdentityMetadatasClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/method_get.go index 03a7dc100c8..e04df297f6f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceHybridIdentityMetadatasClient) Get(ctx context.Context, id com var model VMInstanceHybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/version.go index 91264845439..d97ddd0341f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vminstancehybrididentitymetadatas/version.go @@ -1,12 +1,10 @@ package vminstancehybrididentitymetadatas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstancehybrididentitymetadatas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstancehybrididentitymetadatas/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/README.md b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/README.md index 3e61fe49d3f..c597ec929cb 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers` Documentation -The `vmmservers` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2023-10-07`). +The `vmmservers` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2023-10-07`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/client.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/client.go index ff1fc1061d5..e15231a5d8f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/client.go @@ -15,7 +15,7 @@ type VMmServersClient struct { } func NewVMmServersClientWithBaseURI(sdkApi sdkEnv.Api) (*VMmServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmmservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmmservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMmServersClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/id_vmmserver.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/id_vmmserver.go index db7494a57f0..1d6b36d83ca 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/id_vmmserver.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/id_vmmserver.go @@ -42,7 +42,7 @@ func ParseVMmServerID(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMmServerIDInsensitively(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_delete.go index a07f7d70d6a..63fd1d56572 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_get.go index e777876dede..7a413c435e4 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/method_get.go @@ -45,7 +45,6 @@ func (c VMmServersClient) Get(ctx context.Context, id VMmServerId) (result GetOp var model VMmServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/version.go b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/version.go index 42b3cbefc9f..31271ac13fc 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2023-10-07/vmmservers/version.go @@ -1,12 +1,10 @@ package vmmservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-10-07" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmmservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmmservers/2023-10-07" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/README.md index 4400e8b2cee..8ae26a3a41d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets` Documentation -The `availabilitysets` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `availabilitysets` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/client.go index 54ef249b4a8..8bc85925a49 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/client.go @@ -15,7 +15,7 @@ type AvailabilitySetsClient struct { } func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "availabilitysets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "availabilitysets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AvailabilitySetsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/id_availabilityset.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/id_availabilityset.go index 234e7b69b02..a1dd0c8566d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/id_availabilityset.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/id_availabilityset.go @@ -42,7 +42,7 @@ func ParseAvailabilitySetID(input string) (*AvailabilitySetId, error) { } id := AvailabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseAvailabilitySetIDInsensitively(input string) (*AvailabilitySetId, erro } id := AvailabilitySetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_delete.go index 1152b836a8f..999b3553353 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_get.go index b64927d0b03..3e6d190e600 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/method_get.go @@ -45,7 +45,6 @@ func (c AvailabilitySetsClient) Get(ctx context.Context, id AvailabilitySetId) ( var model AvailabilitySet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/version.go index 1857f032362..cc875fe99e6 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets/version.go @@ -1,12 +1,10 @@ package availabilitysets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabilitysets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/availabilitysets/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/README.md index b4bbd41ceb0..a83239a86f5 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds` Documentation -The `clouds` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `clouds` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/client.go index 9720d371598..b75679206d0 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/client.go @@ -15,7 +15,7 @@ type CloudsClient struct { } func NewCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/id_cloud.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/id_cloud.go index 1547a210605..be48ba12831 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/id_cloud.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/id_cloud.go @@ -42,7 +42,7 @@ func ParseCloudID(input string) (*CloudId, error) { } id := CloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCloudIDInsensitively(input string) (*CloudId, error) { } id := CloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_delete.go index 9d69f8fae92..7aa5083b8f8 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_get.go index d0b156616ab..3e2a13ee4b7 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/method_get.go @@ -45,7 +45,6 @@ func (c CloudsClient) Get(ctx context.Context, id CloudId) (result GetOperationR var model Cloud result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/version.go index 5f392810e6f..98d4ee538d6 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/clouds/version.go @@ -1,12 +1,10 @@ package clouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clouds/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/README.md index e5589721fc0..d20667b2030 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents` Documentation -The `guestagents` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `guestagents` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/client.go index 8b3899fa940..8bafe6eb1b9 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/client.go @@ -15,7 +15,7 @@ type GuestAgentsClient struct { } func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "guestagents", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "guestagents", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GuestAgentsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/method_get.go index cd77b3a95bb..5947acaf004 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/method_get.go @@ -47,7 +47,6 @@ func (c GuestAgentsClient) Get(ctx context.Context, id commonids.ScopeId) (resul var model GuestAgent result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/version.go index 32216d5d8b9..fcb3268fbec 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/guestagents/version.go @@ -1,12 +1,10 @@ package guestagents -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/guestagents/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/guestagents/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/README.md index 566399f7fc0..a3376cb6930 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems` Documentation -The `inventoryitems` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `inventoryitems` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/client.go index fbe00f649cc..d0909622b9a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/client.go @@ -15,7 +15,7 @@ type InventoryItemsClient struct { } func NewInventoryItemsClientWithBaseURI(sdkApi sdkEnv.Api) (*InventoryItemsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "inventoryitems", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "inventoryitems", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating InventoryItemsClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_inventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_inventoryitem.go index 6619efc6e3f..21ee2fa7d0e 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_inventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_inventoryitem.go @@ -44,7 +44,7 @@ func ParseInventoryItemID(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInventoryItemIDInsensitively(input string) (*InventoryItemId, error) { } id := InventoryItemId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_vmmserver.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_vmmserver.go index 154cf1910d9..3de3cd4d640 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_vmmserver.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/id_vmmserver.go @@ -42,7 +42,7 @@ func ParseVMmServerID(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMmServerIDInsensitively(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_create.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_create.go index 4cec8e38325..988b0058456 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_create.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_create.go @@ -50,7 +50,6 @@ func (c InventoryItemsClient) Create(ctx context.Context, id InventoryItemId, in var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_get.go index 4df52d77cdc..c143a4f83ea 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/method_get.go @@ -45,7 +45,6 @@ func (c InventoryItemsClient) Get(ctx context.Context, id InventoryItemId) (resu var model InventoryItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_cloudinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_cloudinventoryitem.go index b8d67d2a4b2..e8ff0ca938f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_cloudinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_cloudinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = CloudInventoryItem{} type CloudInventoryItem struct { // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s CloudInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = CloudInventoryItem{} func (s CloudInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s CloudInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CloudInventoryItem: %+v", err) } + decoded["inventoryType"] = "Cloud" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitem.go index 92f80c1062d..c941ca67a24 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitem.go @@ -40,7 +40,7 @@ func (s *InventoryItem) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalInventoryItemPropertiesImplementation(v) + impl, err := UnmarshalInventoryItemPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'InventoryItem': %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitemproperties.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitemproperties.go index 897fb127207..00069c71fe6 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitemproperties.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_inventoryitemproperties.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InventoryItemProperties interface { + InventoryItemProperties() BaseInventoryItemPropertiesImpl } -// RawInventoryItemPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InventoryItemProperties = BaseInventoryItemPropertiesImpl{} + +type BaseInventoryItemPropertiesImpl struct { + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` + ManagedResourceId *string `json:"managedResourceId,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Uuid *string `json:"uuid,omitempty"` +} + +func (s BaseInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s +} + +var _ InventoryItemProperties = RawInventoryItemPropertiesImpl{} + +// RawInventoryItemPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInventoryItemPropertiesImpl struct { - Type string - Values map[string]interface{} + inventoryItemProperties BaseInventoryItemPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawInventoryItemPropertiesImpl) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return s.inventoryItemProperties } -func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { +func UnmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItemProperties, error) { if input == nil { return nil, nil } @@ -68,10 +89,15 @@ func unmarshalInventoryItemPropertiesImplementation(input []byte) (InventoryItem return out, nil } - out := RawInventoryItemPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseInventoryItemPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInventoryItemPropertiesImpl: %+v", err) } - return out, nil + + return RawInventoryItemPropertiesImpl{ + inventoryItemProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachineinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachineinventoryitem.go index 8feb3388a14..66a9d54de1e 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachineinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachineinventoryitem.go @@ -21,12 +21,24 @@ type VirtualMachineInventoryItem struct { PowerState *string `json:"powerState,omitempty"` // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualMachineInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualMachineInventoryItem{} func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { @@ -38,9 +50,10 @@ func (s VirtualMachineInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachine" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go index d039273b749..f6adc162e46 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualmachinetemplateinventoryitem.go @@ -17,12 +17,24 @@ type VirtualMachineTemplateInventoryItem struct { OsType *OsType `json:"osType,omitempty"` // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualMachineTemplateInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualMachineTemplateInventoryItem{} func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { @@ -34,9 +46,10 @@ func (s VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualMachineTemplateInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualMachineTemplate" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualnetworkinventoryitem.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualnetworkinventoryitem.go index 23e698f13a8..17c2229d32b 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualnetworkinventoryitem.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/model_virtualnetworkinventoryitem.go @@ -13,12 +13,24 @@ var _ InventoryItemProperties = VirtualNetworkInventoryItem{} type VirtualNetworkInventoryItem struct { // Fields inherited from InventoryItemProperties + InventoryItemName *string `json:"inventoryItemName,omitempty"` + InventoryType InventoryType `json:"inventoryType"` ManagedResourceId *string `json:"managedResourceId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Uuid *string `json:"uuid,omitempty"` } +func (s VirtualNetworkInventoryItem) InventoryItemProperties() BaseInventoryItemPropertiesImpl { + return BaseInventoryItemPropertiesImpl{ + InventoryItemName: s.InventoryItemName, + InventoryType: s.InventoryType, + ManagedResourceId: s.ManagedResourceId, + ProvisioningState: s.ProvisioningState, + Uuid: s.Uuid, + } +} + var _ json.Marshaler = VirtualNetworkInventoryItem{} func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { @@ -30,9 +42,10 @@ func (s VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VirtualNetworkInventoryItem: %+v", err) } + decoded["inventoryType"] = "VirtualNetwork" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/version.go index a0d25feaba1..8709e2ca36b 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/inventoryitems/version.go @@ -1,12 +1,10 @@ package inventoryitems -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/inventoryitems/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/inventoryitems/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/README.md index 851c4ed8673..4559ddfd471 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances` Documentation -The `virtualmachineinstances` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `virtualmachineinstances` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/client.go index e40ddc4adf5..18d28a8f009 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/client.go @@ -15,7 +15,7 @@ type VirtualMachineInstancesClient struct { } func NewVirtualMachineInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachineinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachineinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineInstancesClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_delete.go index ca2a8334505..e5dab7b5518 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_delete.go @@ -38,6 +38,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_get.go index 7a724ebe139..589384c0dd0 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/method_get.go @@ -47,7 +47,6 @@ func (c VirtualMachineInstancesClient) Get(ctx context.Context, id commonids.Sco var model VirtualMachineInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/version.go index 7ef234f228b..cbe950be302 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachineinstances/version.go @@ -1,12 +1,10 @@ package virtualmachineinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachineinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachineinstances/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/README.md index f3280cbe697..0440938385a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates` Documentation -The `virtualmachinetemplates` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `virtualmachinetemplates` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/client.go index 12c5314c789..fc11bf98a1a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/client.go @@ -15,7 +15,7 @@ type VirtualMachineTemplatesClient struct { } func NewVirtualMachineTemplatesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineTemplatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachinetemplates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachineTemplatesClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/id_virtualmachinetemplate.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/id_virtualmachinetemplate.go index 96686b25600..db03dadbb0d 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/id_virtualmachinetemplate.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/id_virtualmachinetemplate.go @@ -42,7 +42,7 @@ func ParseVirtualMachineTemplateID(input string) (*VirtualMachineTemplateId, err } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualMachineTemplateIDInsensitively(input string) (*VirtualMachineTe } id := VirtualMachineTemplateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_delete.go index 6073a8906f8..fad5c872392 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_get.go index 9792aa1db2b..379f0f21ea4 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachineTemplatesClient) Get(ctx context.Context, id VirtualMachin var model VirtualMachineTemplate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/version.go index 8296e42df94..ab6422780f7 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualmachinetemplates/version.go @@ -1,12 +1,10 @@ package virtualmachinetemplates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachinetemplates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachinetemplates/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/README.md index 6695be6f11e..ad84a80750a 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks` Documentation -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `virtualnetworks` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/client.go index 15c346279f6..9acbb6c1027 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/client.go @@ -15,7 +15,7 @@ type VirtualNetworksClient struct { } func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/id_virtualnetwork.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/id_virtualnetwork.go index 53a98d78d1a..af8ed2f3324 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/id_virtualnetwork.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/id_virtualnetwork.go @@ -42,7 +42,7 @@ func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error) { } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error) } id := VirtualNetworkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_delete.go index fc9f19e84de..386eba98bea 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_get.go index a27c17c1604..273f0922d91 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/method_get.go @@ -45,7 +45,6 @@ func (c VirtualNetworksClient) Get(ctx context.Context, id VirtualNetworkId) (re var model VirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/version.go index 4fce04d2ced..d67471e7f9b 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/virtualnetworks/version.go @@ -1,12 +1,10 @@ package virtualnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualnetworks/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/README.md index 4c5b443c66f..54da6f4ae9e 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas` Documentation -The `vminstancehybrididentitymetadatas` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `vminstancehybrididentitymetadatas` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/client.go index 630e0e87624..540c9c37362 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/client.go @@ -15,7 +15,7 @@ type VMInstanceHybridIdentityMetadatasClient struct { } func NewVMInstanceHybridIdentityMetadatasClientWithBaseURI(sdkApi sdkEnv.Api) (*VMInstanceHybridIdentityMetadatasClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vminstancehybrididentitymetadatas", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vminstancehybrididentitymetadatas", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMInstanceHybridIdentityMetadatasClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/method_get.go index 03a7dc100c8..e04df297f6f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/method_get.go @@ -47,7 +47,6 @@ func (c VMInstanceHybridIdentityMetadatasClient) Get(ctx context.Context, id com var model VMInstanceHybridIdentityMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/version.go index 05caa72af56..9f3a29e6539 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vminstancehybrididentitymetadatas/version.go @@ -1,12 +1,10 @@ package vminstancehybrididentitymetadatas -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vminstancehybrididentitymetadatas/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vminstancehybrididentitymetadatas/2024-06-01" } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/README.md b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/README.md index 11f9a6e99a0..fdacc08a8e3 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/README.md +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers` Documentation -The `vmmservers` SDK allows for interaction with the Azure Resource Manager Service `systemcentervirtualmachinemanager` (API Version `2024-06-01`). +The `vmmservers` SDK allows for interaction with Azure Resource Manager `systemcentervirtualmachinemanager` (API Version `2024-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/client.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/client.go index ff1fc1061d5..e15231a5d8f 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/client.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/client.go @@ -15,7 +15,7 @@ type VMmServersClient struct { } func NewVMmServersClientWithBaseURI(sdkApi sdkEnv.Api) (*VMmServersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmmservers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmmservers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMmServersClient: %+v", err) } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/id_vmmserver.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/id_vmmserver.go index db7494a57f0..1d6b36d83ca 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/id_vmmserver.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/id_vmmserver.go @@ -42,7 +42,7 @@ func ParseVMmServerID(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVMmServerIDInsensitively(input string) (*VMmServerId, error) { } id := VMmServerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_delete.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_delete.go index a07f7d70d6a..63fd1d56572 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_delete.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_delete.go @@ -36,6 +36,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_get.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_get.go index e777876dede..7a413c435e4 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_get.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/method_get.go @@ -45,7 +45,6 @@ func (c VMmServersClient) Get(ctx context.Context, id VMmServerId) (result GetOp var model VMmServer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/version.go b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/version.go index d901daf08a3..25faf761e14 100644 --- a/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/version.go +++ b/resource-manager/systemcentervirtualmachinemanager/2024-06-01/vmmservers/version.go @@ -1,12 +1,10 @@ package vmmservers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmmservers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmmservers/2024-06-01" } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/README.md b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/README.md index 9e8ce863a03..425f9463618 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/README.md +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/accesspolicies` Documentation -The `accesspolicies` SDK allows for interaction with the Azure Resource Manager Service `timeseriesinsights` (API Version `2020-05-15`). +The `accesspolicies` SDK allows for interaction with Azure Resource Manager `timeseriesinsights` (API Version `2020-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/client.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/client.go index a5663c54233..e1258ae4cfd 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/client.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/client.go @@ -15,7 +15,7 @@ type AccessPoliciesClient struct { } func NewAccessPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*AccessPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "accesspolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "accesspolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AccessPoliciesClient: %+v", err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go index 7f883c561a3..e39d6a54eb9 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go index 7debdb4751b..3158047d71a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/id_environment.go @@ -42,7 +42,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_createorupdate.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_createorupdate.go index efa160c16c3..084619a58f6 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_createorupdate.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_createorupdate.go @@ -50,7 +50,6 @@ func (c AccessPoliciesClient) CreateOrUpdate(ctx context.Context, id AccessPolic var model AccessPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_get.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_get.go index d5bc91b5ea8..3a06d2c0853 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_get.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_get.go @@ -45,7 +45,6 @@ func (c AccessPoliciesClient) Get(ctx context.Context, id AccessPolicyId) (resul var model AccessPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_listbyenvironment.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_listbyenvironment.go index a80bb955420..915d0a04a56 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_listbyenvironment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c AccessPoliciesClient) ListByEnvironment(ctx context.Context, id Environm var model AccessPolicyListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_update.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_update.go index 9c0b8a7b990..1013cae0cb6 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_update.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/method_update.go @@ -49,7 +49,6 @@ func (c AccessPoliciesClient) Update(ctx context.Context, id AccessPolicyId, inp var model AccessPolicyResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/version.go b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/version.go index 136289d1362..182d1a8ca06 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/version.go +++ b/resource-manager/timeseriesinsights/2020-05-15/accesspolicies/version.go @@ -1,12 +1,10 @@ package accesspolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/accesspolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/accesspolicies/2020-05-15" } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/README.md b/resource-manager/timeseriesinsights/2020-05-15/environments/README.md index 871fa2d28a8..9f15afca8aa 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/README.md +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/environments` Documentation -The `environments` SDK allows for interaction with the Azure Resource Manager Service `timeseriesinsights` (API Version `2020-05-15`). +The `environments` SDK allows for interaction with Azure Resource Manager `timeseriesinsights` (API Version `2020-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/client.go b/resource-manager/timeseriesinsights/2020-05-15/environments/client.go index 89a5b84aa90..eafef1a1e95 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/client.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/client.go @@ -15,7 +15,7 @@ type EnvironmentsClient struct { } func NewEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "environments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "environments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EnvironmentsClient: %+v", err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go b/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go index 52dec1c2c16..519cb2d635d 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/id_environment.go @@ -42,7 +42,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/method_createorupdate.go b/resource-manager/timeseriesinsights/2020-05-15/environments/method_createorupdate.go index e30c8813903..8e1d45faca8 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/method_createorupdate.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/method_createorupdate.go @@ -18,7 +18,7 @@ type CreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EnvironmentResource + Model EnvironmentResource } // CreateOrUpdate ... diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/method_get.go b/resource-manager/timeseriesinsights/2020-05-15/environments/method_get.go index 152a6439940..e81beb2df65 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/method_get.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/method_get.go @@ -16,7 +16,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EnvironmentResource + Model EnvironmentResource } type GetOperationOptions struct { @@ -35,6 +35,7 @@ func (o GetOperationOptions) ToHeaders() *client.Headers { func (o GetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -77,11 +78,11 @@ func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId, options G if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEnvironmentResourceImplementation(respObj) + model, err := UnmarshalEnvironmentResourceImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbyresourcegroup.go b/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbyresourcegroup.go index f391ef03d2f..2e211c5b85d 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbyresourcegroup.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c EnvironmentsClient) ListByResourceGroup(ctx context.Context, id commonid var model EnvironmentListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbysubscription.go b/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbysubscription.go index e0b92099063..2fb9091ad18 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbysubscription.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c EnvironmentsClient) ListBySubscription(ctx context.Context, id commonids var model EnvironmentListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/method_update.go b/resource-manager/timeseriesinsights/2020-05-15/environments/method_update.go index 4bba6d416c0..870cff980e0 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/method_update.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/method_update.go @@ -18,7 +18,7 @@ type UpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData - Model *EnvironmentResource + Model EnvironmentResource } // Update ... diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentcreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentcreateorupdateparameters.go index cd3944bf509..f8a5bcd6eb5 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentcreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentcreateorupdateparameters.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnvironmentCreateOrUpdateParameters interface { + EnvironmentCreateOrUpdateParameters() BaseEnvironmentCreateOrUpdateParametersImpl } -// RawEnvironmentCreateOrUpdateParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnvironmentCreateOrUpdateParameters = BaseEnvironmentCreateOrUpdateParametersImpl{} + +type BaseEnvironmentCreateOrUpdateParametersImpl struct { + Kind EnvironmentKind `json:"kind"` + Location string `json:"location"` + Sku Sku `json:"sku"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseEnvironmentCreateOrUpdateParametersImpl) EnvironmentCreateOrUpdateParameters() BaseEnvironmentCreateOrUpdateParametersImpl { + return s +} + +var _ EnvironmentCreateOrUpdateParameters = RawEnvironmentCreateOrUpdateParametersImpl{} + +// RawEnvironmentCreateOrUpdateParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnvironmentCreateOrUpdateParametersImpl struct { - Type string - Values map[string]interface{} + environmentCreateOrUpdateParameters BaseEnvironmentCreateOrUpdateParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawEnvironmentCreateOrUpdateParametersImpl) EnvironmentCreateOrUpdateParameters() BaseEnvironmentCreateOrUpdateParametersImpl { + return s.environmentCreateOrUpdateParameters } -func unmarshalEnvironmentCreateOrUpdateParametersImplementation(input []byte) (EnvironmentCreateOrUpdateParameters, error) { +func UnmarshalEnvironmentCreateOrUpdateParametersImplementation(input []byte) (EnvironmentCreateOrUpdateParameters, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalEnvironmentCreateOrUpdateParametersImplementation(input []byte) (E return out, nil } - out := RawEnvironmentCreateOrUpdateParametersImpl{ - Type: value, - Values: temp, + var parent BaseEnvironmentCreateOrUpdateParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnvironmentCreateOrUpdateParametersImpl: %+v", err) } - return out, nil + + return RawEnvironmentCreateOrUpdateParametersImpl{ + environmentCreateOrUpdateParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentlistresponse.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentlistresponse.go index a6af0c398db..53fda32b9f8 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentlistresponse.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentlistresponse.go @@ -29,7 +29,7 @@ func (s *EnvironmentListResponse) UnmarshalJSON(bytes []byte) error { output := make([]EnvironmentResource, 0) for i, val := range listTemp { - impl, err := unmarshalEnvironmentResourceImplementation(val) + impl, err := UnmarshalEnvironmentResourceImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'EnvironmentListResponse': %+v", i, err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentresource.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentresource.go index 0dcbd247229..3c878e8e9fa 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentresource.go @@ -10,18 +10,41 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnvironmentResource interface { + EnvironmentResource() BaseEnvironmentResourceImpl } -// RawEnvironmentResourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnvironmentResource = BaseEnvironmentResourceImpl{} + +type BaseEnvironmentResourceImpl struct { + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Sku Sku `json:"sku"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEnvironmentResourceImpl) EnvironmentResource() BaseEnvironmentResourceImpl { + return s +} + +var _ EnvironmentResource = RawEnvironmentResourceImpl{} + +// RawEnvironmentResourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnvironmentResourceImpl struct { - Type string - Values map[string]interface{} + environmentResource BaseEnvironmentResourceImpl + Type string + Values map[string]interface{} +} + +func (s RawEnvironmentResourceImpl) EnvironmentResource() BaseEnvironmentResourceImpl { + return s.environmentResource } -func unmarshalEnvironmentResourceImplementation(input []byte) (EnvironmentResource, error) { +func UnmarshalEnvironmentResourceImplementation(input []byte) (EnvironmentResource, error) { if input == nil { return nil, nil } @@ -52,10 +75,15 @@ func unmarshalEnvironmentResourceImplementation(input []byte) (EnvironmentResour return out, nil } - out := RawEnvironmentResourceImpl{ - Type: value, - Values: temp, + var parent BaseEnvironmentResourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnvironmentResourceImpl: %+v", err) } - return out, nil + + return RawEnvironmentResourceImpl{ + environmentResource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentupdateparameters.go index 7acd0488a03..9de225a7295 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_environmentupdateparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EnvironmentUpdateParameters interface { + EnvironmentUpdateParameters() BaseEnvironmentUpdateParametersImpl } -// RawEnvironmentUpdateParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EnvironmentUpdateParameters = BaseEnvironmentUpdateParametersImpl{} + +type BaseEnvironmentUpdateParametersImpl struct { + Kind EnvironmentKind `json:"kind"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseEnvironmentUpdateParametersImpl) EnvironmentUpdateParameters() BaseEnvironmentUpdateParametersImpl { + return s +} + +var _ EnvironmentUpdateParameters = RawEnvironmentUpdateParametersImpl{} + +// RawEnvironmentUpdateParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEnvironmentUpdateParametersImpl struct { - Type string - Values map[string]interface{} + environmentUpdateParameters BaseEnvironmentUpdateParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawEnvironmentUpdateParametersImpl) EnvironmentUpdateParameters() BaseEnvironmentUpdateParametersImpl { + return s.environmentUpdateParameters } -func unmarshalEnvironmentUpdateParametersImplementation(input []byte) (EnvironmentUpdateParameters, error) { +func UnmarshalEnvironmentUpdateParametersImplementation(input []byte) (EnvironmentUpdateParameters, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalEnvironmentUpdateParametersImplementation(input []byte) (Environme return out, nil } - out := RawEnvironmentUpdateParametersImpl{ - Type: value, - Values: temp, + var parent BaseEnvironmentUpdateParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEnvironmentUpdateParametersImpl: %+v", err) } - return out, nil + + return RawEnvironmentUpdateParametersImpl{ + environmentUpdateParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentcreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentcreateorupdateparameters.go index e58a944e77c..da6de08e0d0 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentcreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentcreateorupdateparameters.go @@ -14,11 +14,22 @@ type Gen1EnvironmentCreateOrUpdateParameters struct { Properties Gen1EnvironmentCreationProperties `json:"properties"` // Fields inherited from EnvironmentCreateOrUpdateParameters + + Kind EnvironmentKind `json:"kind"` Location string `json:"location"` Sku Sku `json:"sku"` Tags *map[string]string `json:"tags,omitempty"` } +func (s Gen1EnvironmentCreateOrUpdateParameters) EnvironmentCreateOrUpdateParameters() BaseEnvironmentCreateOrUpdateParametersImpl { + return BaseEnvironmentCreateOrUpdateParametersImpl{ + Kind: s.Kind, + Location: s.Location, + Sku: s.Sku, + Tags: s.Tags, + } +} + var _ json.Marshaler = Gen1EnvironmentCreateOrUpdateParameters{} func (s Gen1EnvironmentCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s Gen1EnvironmentCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen1EnvironmentCreateOrUpdateParameters: %+v", err) } + decoded["kind"] = "Gen1" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentresource.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentresource.go index 854a7a3af0b..e9d0fc7377f 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentresource.go @@ -14,7 +14,9 @@ type Gen1EnvironmentResource struct { Properties Gen1EnvironmentResourceProperties `json:"properties"` // Fields inherited from EnvironmentResource + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` Sku Sku `json:"sku"` @@ -22,6 +24,18 @@ type Gen1EnvironmentResource struct { Type *string `json:"type,omitempty"` } +func (s Gen1EnvironmentResource) EnvironmentResource() BaseEnvironmentResourceImpl { + return BaseEnvironmentResourceImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = Gen1EnvironmentResource{} func (s Gen1EnvironmentResource) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s Gen1EnvironmentResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen1EnvironmentResource: %+v", err) } + decoded["kind"] = "Gen1" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentupdateparameters.go index 76f5bf48491..a01a3b24452 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen1environmentupdateparameters.go @@ -15,9 +15,18 @@ type Gen1EnvironmentUpdateParameters struct { Sku *Sku `json:"sku,omitempty"` // Fields inherited from EnvironmentUpdateParameters + + Kind EnvironmentKind `json:"kind"` Tags *map[string]string `json:"tags,omitempty"` } +func (s Gen1EnvironmentUpdateParameters) EnvironmentUpdateParameters() BaseEnvironmentUpdateParametersImpl { + return BaseEnvironmentUpdateParametersImpl{ + Kind: s.Kind, + Tags: s.Tags, + } +} + var _ json.Marshaler = Gen1EnvironmentUpdateParameters{} func (s Gen1EnvironmentUpdateParameters) MarshalJSON() ([]byte, error) { @@ -29,9 +38,10 @@ func (s Gen1EnvironmentUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen1EnvironmentUpdateParameters: %+v", err) } + decoded["kind"] = "Gen1" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentcreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentcreateorupdateparameters.go index 8c5c45370d0..726e21f672a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentcreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentcreateorupdateparameters.go @@ -14,11 +14,22 @@ type Gen2EnvironmentCreateOrUpdateParameters struct { Properties Gen2EnvironmentCreationProperties `json:"properties"` // Fields inherited from EnvironmentCreateOrUpdateParameters + + Kind EnvironmentKind `json:"kind"` Location string `json:"location"` Sku Sku `json:"sku"` Tags *map[string]string `json:"tags,omitempty"` } +func (s Gen2EnvironmentCreateOrUpdateParameters) EnvironmentCreateOrUpdateParameters() BaseEnvironmentCreateOrUpdateParametersImpl { + return BaseEnvironmentCreateOrUpdateParametersImpl{ + Kind: s.Kind, + Location: s.Location, + Sku: s.Sku, + Tags: s.Tags, + } +} + var _ json.Marshaler = Gen2EnvironmentCreateOrUpdateParameters{} func (s Gen2EnvironmentCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s Gen2EnvironmentCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen2EnvironmentCreateOrUpdateParameters: %+v", err) } + decoded["kind"] = "Gen2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentresource.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentresource.go index 2602c514c10..34683a718f6 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentresource.go @@ -14,7 +14,9 @@ type Gen2EnvironmentResource struct { Properties Gen2EnvironmentResourceProperties `json:"properties"` // Fields inherited from EnvironmentResource + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` Sku Sku `json:"sku"` @@ -22,6 +24,18 @@ type Gen2EnvironmentResource struct { Type *string `json:"type,omitempty"` } +func (s Gen2EnvironmentResource) EnvironmentResource() BaseEnvironmentResourceImpl { + return BaseEnvironmentResourceImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Sku: s.Sku, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = Gen2EnvironmentResource{} func (s Gen2EnvironmentResource) MarshalJSON() ([]byte, error) { @@ -33,9 +47,10 @@ func (s Gen2EnvironmentResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen2EnvironmentResource: %+v", err) } + decoded["kind"] = "Gen2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentupdateparameters.go index ff65fad0dc1..0b80537c97c 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/model_gen2environmentupdateparameters.go @@ -14,9 +14,18 @@ type Gen2EnvironmentUpdateParameters struct { Properties *Gen2EnvironmentMutableProperties `json:"properties,omitempty"` // Fields inherited from EnvironmentUpdateParameters + + Kind EnvironmentKind `json:"kind"` Tags *map[string]string `json:"tags,omitempty"` } +func (s Gen2EnvironmentUpdateParameters) EnvironmentUpdateParameters() BaseEnvironmentUpdateParametersImpl { + return BaseEnvironmentUpdateParametersImpl{ + Kind: s.Kind, + Tags: s.Tags, + } +} + var _ json.Marshaler = Gen2EnvironmentUpdateParameters{} func (s Gen2EnvironmentUpdateParameters) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s Gen2EnvironmentUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling Gen2EnvironmentUpdateParameters: %+v", err) } + decoded["kind"] = "Gen2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/environments/version.go b/resource-manager/timeseriesinsights/2020-05-15/environments/version.go index ee4e0a90f3f..425c3f2df3a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/environments/version.go +++ b/resource-manager/timeseriesinsights/2020-05-15/environments/version.go @@ -1,12 +1,10 @@ package environments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/environments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/environments/2020-05-15" } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/README.md b/resource-manager/timeseriesinsights/2020-05-15/eventsources/README.md index 17e4d1d6e11..255824a93d0 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/README.md +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/eventsources` Documentation -The `eventsources` SDK allows for interaction with the Azure Resource Manager Service `timeseriesinsights` (API Version `2020-05-15`). +The `eventsources` SDK allows for interaction with Azure Resource Manager `timeseriesinsights` (API Version `2020-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/client.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/client.go index 9115a1afa1f..a2ea8ad1887 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/client.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/client.go @@ -15,7 +15,7 @@ type EventSourcesClient struct { } func NewEventSourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*EventSourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "eventsources", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "eventsources", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EventSourcesClient: %+v", err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go index 88d44a68003..8cc25b39b0e 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_environment.go @@ -42,7 +42,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go index 0830986ee30..04dc275af7a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/id_eventsource.go @@ -44,7 +44,7 @@ func ParseEventSourceID(input string) (*EventSourceId, error) { } id := EventSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEventSourceIDInsensitively(input string) (*EventSourceId, error) { } id := EventSourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_createorupdate.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_createorupdate.go index 52708c62e14..fcf42b48c78 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_createorupdate.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_createorupdate.go @@ -15,7 +15,7 @@ import ( type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EventSourceResource + Model EventSourceResource } // CreateOrUpdate ... @@ -53,11 +53,11 @@ func (c EventSourcesClient) CreateOrUpdate(ctx context.Context, id EventSourceId if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEventSourceResourceImplementation(respObj) + model, err := UnmarshalEventSourceResourceImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_get.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_get.go index 6e12958d3da..e29a3b2cc90 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_get.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_get.go @@ -15,7 +15,7 @@ import ( type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EventSourceResource + Model EventSourceResource } // Get ... @@ -48,11 +48,11 @@ func (c EventSourcesClient) Get(ctx context.Context, id EventSourceId) (result G if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEventSourceResourceImplementation(respObj) + model, err := UnmarshalEventSourceResourceImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_listbyenvironment.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_listbyenvironment.go index a71132e6a37..aef50f6c23a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_listbyenvironment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c EventSourcesClient) ListByEnvironment(ctx context.Context, id Environmen var model EventSourceListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_update.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_update.go index 00742a8b934..df06d0c805b 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_update.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/method_update.go @@ -15,7 +15,7 @@ import ( type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *EventSourceResource + Model EventSourceResource } // Update ... @@ -52,11 +52,11 @@ func (c EventSourcesClient) Update(ctx context.Context, id EventSourceId, input if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalEventSourceResourceImplementation(respObj) + model, err := UnmarshalEventSourceResourceImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourcecreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourcecreateorupdateparameters.go index be176eb17dc..660f242a891 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourcecreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourcecreateorupdateparameters.go @@ -14,11 +14,22 @@ type EventHubEventSourceCreateOrUpdateParameters struct { Properties EventHubEventSourceCreationProperties `json:"properties"` // Fields inherited from EventSourceCreateOrUpdateParameters + + Kind EventSourceKind `json:"kind"` LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` Location string `json:"location"` Tags *map[string]string `json:"tags,omitempty"` } +func (s EventHubEventSourceCreateOrUpdateParameters) EventSourceCreateOrUpdateParameters() BaseEventSourceCreateOrUpdateParametersImpl { + return BaseEventSourceCreateOrUpdateParametersImpl{ + Kind: s.Kind, + LocalTimestamp: s.LocalTimestamp, + Location: s.Location, + Tags: s.Tags, + } +} + var _ json.Marshaler = EventHubEventSourceCreateOrUpdateParameters{} func (s EventHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s EventHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte, erro } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEventSourceCreateOrUpdateParameters: %+v", err) } + decoded["kind"] = "Microsoft.EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceresource.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceresource.go index 33a1c112f1c..045f0392a2e 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceresource.go @@ -14,13 +14,26 @@ type EventHubEventSourceResource struct { Properties EventHubEventSourceCommonProperties `json:"properties"` // Fields inherited from EventSourceResource + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } +func (s EventHubEventSourceResource) EventSourceResource() BaseEventSourceResourceImpl { + return BaseEventSourceResourceImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = EventHubEventSourceResource{} func (s EventHubEventSourceResource) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s EventHubEventSourceResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEventSourceResource: %+v", err) } + decoded["kind"] = "Microsoft.EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceupdateparameters.go index bfbb5cc98b6..79425a3afc2 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventhubeventsourceupdateparameters.go @@ -14,9 +14,18 @@ type EventHubEventSourceUpdateParameters struct { Properties *EventHubEventSourceMutableProperties `json:"properties,omitempty"` // Fields inherited from EventSourceUpdateParameters + + Kind EventSourceKind `json:"kind"` Tags *map[string]string `json:"tags,omitempty"` } +func (s EventHubEventSourceUpdateParameters) EventSourceUpdateParameters() BaseEventSourceUpdateParametersImpl { + return BaseEventSourceUpdateParametersImpl{ + Kind: s.Kind, + Tags: s.Tags, + } +} + var _ json.Marshaler = EventHubEventSourceUpdateParameters{} func (s EventHubEventSourceUpdateParameters) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s EventHubEventSourceUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEventSourceUpdateParameters: %+v", err) } + decoded["kind"] = "Microsoft.EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcecreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcecreateorupdateparameters.go index f49c6c71648..70aca86b56a 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcecreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcecreateorupdateparameters.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSourceCreateOrUpdateParameters interface { + EventSourceCreateOrUpdateParameters() BaseEventSourceCreateOrUpdateParametersImpl } -// RawEventSourceCreateOrUpdateParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSourceCreateOrUpdateParameters = BaseEventSourceCreateOrUpdateParametersImpl{} + +type BaseEventSourceCreateOrUpdateParametersImpl struct { + Kind EventSourceKind `json:"kind"` + LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` + Location string `json:"location"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseEventSourceCreateOrUpdateParametersImpl) EventSourceCreateOrUpdateParameters() BaseEventSourceCreateOrUpdateParametersImpl { + return s +} + +var _ EventSourceCreateOrUpdateParameters = RawEventSourceCreateOrUpdateParametersImpl{} + +// RawEventSourceCreateOrUpdateParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSourceCreateOrUpdateParametersImpl struct { - Type string - Values map[string]interface{} + eventSourceCreateOrUpdateParameters BaseEventSourceCreateOrUpdateParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSourceCreateOrUpdateParametersImpl) EventSourceCreateOrUpdateParameters() BaseEventSourceCreateOrUpdateParametersImpl { + return s.eventSourceCreateOrUpdateParameters } -func unmarshalEventSourceCreateOrUpdateParametersImplementation(input []byte) (EventSourceCreateOrUpdateParameters, error) { +func UnmarshalEventSourceCreateOrUpdateParametersImplementation(input []byte) (EventSourceCreateOrUpdateParameters, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalEventSourceCreateOrUpdateParametersImplementation(input []byte) (E return out, nil } - out := RawEventSourceCreateOrUpdateParametersImpl{ - Type: value, - Values: temp, + var parent BaseEventSourceCreateOrUpdateParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSourceCreateOrUpdateParametersImpl: %+v", err) } - return out, nil + + return RawEventSourceCreateOrUpdateParametersImpl{ + eventSourceCreateOrUpdateParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcelistresponse.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcelistresponse.go index 88d1a726681..49c5d924e53 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcelistresponse.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourcelistresponse.go @@ -29,7 +29,7 @@ func (s *EventSourceListResponse) UnmarshalJSON(bytes []byte) error { output := make([]EventSourceResource, 0) for i, val := range listTemp { - impl, err := unmarshalEventSourceResourceImplementation(val) + impl, err := UnmarshalEventSourceResourceImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Value' for 'EventSourceListResponse': %+v", i, err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceresource.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceresource.go index fb8ace14b52..85017e0e347 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceresource.go @@ -10,18 +10,40 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSourceResource interface { + EventSourceResource() BaseEventSourceResourceImpl } -// RawEventSourceResourceImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSourceResource = BaseEventSourceResourceImpl{} + +type BaseEventSourceResourceImpl struct { + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (s BaseEventSourceResourceImpl) EventSourceResource() BaseEventSourceResourceImpl { + return s +} + +var _ EventSourceResource = RawEventSourceResourceImpl{} + +// RawEventSourceResourceImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSourceResourceImpl struct { - Type string - Values map[string]interface{} + eventSourceResource BaseEventSourceResourceImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSourceResourceImpl) EventSourceResource() BaseEventSourceResourceImpl { + return s.eventSourceResource } -func unmarshalEventSourceResourceImplementation(input []byte) (EventSourceResource, error) { +func UnmarshalEventSourceResourceImplementation(input []byte) (EventSourceResource, error) { if input == nil { return nil, nil } @@ -52,10 +74,15 @@ func unmarshalEventSourceResourceImplementation(input []byte) (EventSourceResour return out, nil } - out := RawEventSourceResourceImpl{ - Type: value, - Values: temp, + var parent BaseEventSourceResourceImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSourceResourceImpl: %+v", err) } - return out, nil + + return RawEventSourceResourceImpl{ + eventSourceResource: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceupdateparameters.go index 269cdb0d05a..a3f37c88530 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_eventsourceupdateparameters.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventSourceUpdateParameters interface { + EventSourceUpdateParameters() BaseEventSourceUpdateParametersImpl } -// RawEventSourceUpdateParametersImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventSourceUpdateParameters = BaseEventSourceUpdateParametersImpl{} + +type BaseEventSourceUpdateParametersImpl struct { + Kind EventSourceKind `json:"kind"` + Tags *map[string]string `json:"tags,omitempty"` +} + +func (s BaseEventSourceUpdateParametersImpl) EventSourceUpdateParameters() BaseEventSourceUpdateParametersImpl { + return s +} + +var _ EventSourceUpdateParameters = RawEventSourceUpdateParametersImpl{} + +// RawEventSourceUpdateParametersImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventSourceUpdateParametersImpl struct { - Type string - Values map[string]interface{} + eventSourceUpdateParameters BaseEventSourceUpdateParametersImpl + Type string + Values map[string]interface{} +} + +func (s RawEventSourceUpdateParametersImpl) EventSourceUpdateParameters() BaseEventSourceUpdateParametersImpl { + return s.eventSourceUpdateParameters } -func unmarshalEventSourceUpdateParametersImplementation(input []byte) (EventSourceUpdateParameters, error) { +func UnmarshalEventSourceUpdateParametersImplementation(input []byte) (EventSourceUpdateParameters, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalEventSourceUpdateParametersImplementation(input []byte) (EventSour return out, nil } - out := RawEventSourceUpdateParametersImpl{ - Type: value, - Values: temp, + var parent BaseEventSourceUpdateParametersImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventSourceUpdateParametersImpl: %+v", err) } - return out, nil + + return RawEventSourceUpdateParametersImpl{ + eventSourceUpdateParameters: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourcecreateorupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourcecreateorupdateparameters.go index 6f19ccdc1b9..a123ff7a68e 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourcecreateorupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourcecreateorupdateparameters.go @@ -14,11 +14,22 @@ type IoTHubEventSourceCreateOrUpdateParameters struct { Properties IoTHubEventSourceCreationProperties `json:"properties"` // Fields inherited from EventSourceCreateOrUpdateParameters + + Kind EventSourceKind `json:"kind"` LocalTimestamp *LocalTimestamp `json:"localTimestamp,omitempty"` Location string `json:"location"` Tags *map[string]string `json:"tags,omitempty"` } +func (s IoTHubEventSourceCreateOrUpdateParameters) EventSourceCreateOrUpdateParameters() BaseEventSourceCreateOrUpdateParametersImpl { + return BaseEventSourceCreateOrUpdateParametersImpl{ + Kind: s.Kind, + LocalTimestamp: s.LocalTimestamp, + Location: s.Location, + Tags: s.Tags, + } +} + var _ json.Marshaler = IoTHubEventSourceCreateOrUpdateParameters{} func (s IoTHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { @@ -30,9 +41,10 @@ func (s IoTHubEventSourceCreateOrUpdateParameters) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubEventSourceCreateOrUpdateParameters: %+v", err) } + decoded["kind"] = "Microsoft.IoTHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceresource.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceresource.go index 150c997f656..d34e73db68b 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceresource.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceresource.go @@ -14,13 +14,26 @@ type IoTHubEventSourceResource struct { Properties IoTHubEventSourceCommonProperties `json:"properties"` // Fields inherited from EventSourceResource + Id *string `json:"id,omitempty"` + Kind Kind `json:"kind"` Location string `json:"location"` Name *string `json:"name,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } +func (s IoTHubEventSourceResource) EventSourceResource() BaseEventSourceResourceImpl { + return BaseEventSourceResourceImpl{ + Id: s.Id, + Kind: s.Kind, + Location: s.Location, + Name: s.Name, + Tags: s.Tags, + Type: s.Type, + } +} + var _ json.Marshaler = IoTHubEventSourceResource{} func (s IoTHubEventSourceResource) MarshalJSON() ([]byte, error) { @@ -32,9 +45,10 @@ func (s IoTHubEventSourceResource) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubEventSourceResource: %+v", err) } + decoded["kind"] = "Microsoft.IoTHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceupdateparameters.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceupdateparameters.go index 7230dabda4a..849888e1f87 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceupdateparameters.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/model_iothubeventsourceupdateparameters.go @@ -14,9 +14,18 @@ type IoTHubEventSourceUpdateParameters struct { Properties *IoTHubEventSourceMutableProperties `json:"properties,omitempty"` // Fields inherited from EventSourceUpdateParameters + + Kind EventSourceKind `json:"kind"` Tags *map[string]string `json:"tags,omitempty"` } +func (s IoTHubEventSourceUpdateParameters) EventSourceUpdateParameters() BaseEventSourceUpdateParametersImpl { + return BaseEventSourceUpdateParametersImpl{ + Kind: s.Kind, + Tags: s.Tags, + } +} + var _ json.Marshaler = IoTHubEventSourceUpdateParameters{} func (s IoTHubEventSourceUpdateParameters) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s IoTHubEventSourceUpdateParameters) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling IoTHubEventSourceUpdateParameters: %+v", err) } + decoded["kind"] = "Microsoft.IoTHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/timeseriesinsights/2020-05-15/eventsources/version.go b/resource-manager/timeseriesinsights/2020-05-15/eventsources/version.go index 988bf83f53b..f02a4728829 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/eventsources/version.go +++ b/resource-manager/timeseriesinsights/2020-05-15/eventsources/version.go @@ -1,12 +1,10 @@ package eventsources -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/eventsources/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/eventsources/2020-05-15" } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/README.md b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/README.md index 6ddf0d09376..19206c06a7c 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/README.md +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/timeseriesinsights/2020-05-15/referencedatasets` Documentation -The `referencedatasets` SDK allows for interaction with the Azure Resource Manager Service `timeseriesinsights` (API Version `2020-05-15`). +The `referencedatasets` SDK allows for interaction with Azure Resource Manager `timeseriesinsights` (API Version `2020-05-15`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/client.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/client.go index 2220494882d..e04cddd9414 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/client.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/client.go @@ -15,7 +15,7 @@ type ReferenceDataSetsClient struct { } func NewReferenceDataSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReferenceDataSetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "referencedatasets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "referencedatasets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ReferenceDataSetsClient: %+v", err) } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go index f1ed0961104..ffb6150ae43 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_environment.go @@ -42,7 +42,7 @@ func ParseEnvironmentID(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error) { } id := EnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go index 8d7ecdfb80d..b271e7171cf 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/id_referencedataset.go @@ -44,7 +44,7 @@ func ParseReferenceDataSetID(input string) (*ReferenceDataSetId, error) { } id := ReferenceDataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReferenceDataSetIDInsensitively(input string) (*ReferenceDataSetId, er } id := ReferenceDataSetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_createorupdate.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_createorupdate.go index 09825f9dcb8..fd6a974ef05 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_createorupdate.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ReferenceDataSetsClient) CreateOrUpdate(ctx context.Context, id Referenc var model ReferenceDataSetResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_get.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_get.go index fc1275b639b..2ac2f9f1102 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_get.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_get.go @@ -45,7 +45,6 @@ func (c ReferenceDataSetsClient) Get(ctx context.Context, id ReferenceDataSetId) var model ReferenceDataSetResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_listbyenvironment.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_listbyenvironment.go index 0cc639c99c0..031c9f3b211 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_listbyenvironment.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_listbyenvironment.go @@ -46,7 +46,6 @@ func (c ReferenceDataSetsClient) ListByEnvironment(ctx context.Context, id Envir var model ReferenceDataSetListResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_update.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_update.go index ad5ec8588ad..2da3963ce43 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_update.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/method_update.go @@ -49,7 +49,6 @@ func (c ReferenceDataSetsClient) Update(ctx context.Context, id ReferenceDataSet var model ReferenceDataSetResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/version.go b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/version.go index f27d87a17e3..e56e69cb6be 100644 --- a/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/version.go +++ b/resource-manager/timeseriesinsights/2020-05-15/referencedatasets/version.go @@ -1,12 +1,10 @@ package referencedatasets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2020-05-15" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/referencedatasets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/referencedatasets/2020-05-15" } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/README.md b/resource-manager/trafficmanager/2018-08-01/endpoints/README.md index 0387d8e453d..f844854b2c1 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/README.md +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2018-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/client.go b/resource-manager/trafficmanager/2018-08-01/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/client.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go b/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go index 41fe48c6336..1045b3c0e19 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/id_endpointtype.go @@ -46,7 +46,7 @@ func ParseEndpointTypeID(input string) (*EndpointTypeId, error) { } id := EndpointTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEndpointTypeIDInsensitively(input string) (*EndpointTypeId, error) { } id := EndpointTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go b/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go index d62f7e2858a..5db4941ad29 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointTypeId, var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go b/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go index 763d128fca2..81722ed4647 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/method_delete.go @@ -46,7 +46,6 @@ func (c EndpointsClient) Delete(ctx context.Context, id EndpointTypeId) (result var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go b/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go index 4bf03a6c1c0..6c1bad85940 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/method_get.go @@ -45,7 +45,6 @@ func (c EndpointsClient) Get(ctx context.Context, id EndpointTypeId) (result Get var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go b/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go index fa19d815ad6..f7f3bdfc014 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/method_update.go @@ -49,7 +49,6 @@ func (c EndpointsClient) Update(ctx context.Context, id EndpointTypeId, input En var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/endpoints/version.go b/resource-manager/trafficmanager/2018-08-01/endpoints/version.go index a53308e8ea0..ffff2100e1b 100644 --- a/resource-manager/trafficmanager/2018-08-01/endpoints/version.go +++ b/resource-manager/trafficmanager/2018-08-01/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2018-08-01" } diff --git a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md index b222e2e2618..1bcb8f1df2d 100644 --- a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md +++ b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/geographichierarchies` Documentation -The `geographichierarchies` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `geographichierarchies` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2018-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go index f2da2c82738..aba82e56b5a 100644 --- a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go +++ b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/client.go @@ -15,7 +15,7 @@ type GeographicHierarchiesClient struct { } func NewGeographicHierarchiesClientWithBaseURI(sdkApi sdkEnv.Api) (*GeographicHierarchiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "geographichierarchies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "geographichierarchies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GeographicHierarchiesClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go index 3e00109c9ce..b1360a23e03 100644 --- a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go +++ b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/method_getdefault.go @@ -45,7 +45,6 @@ func (c GeographicHierarchiesClient) GetDefault(ctx context.Context) (result Get var model TrafficManagerGeographicHierarchy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go index d29c4332a4e..86cad267414 100644 --- a/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go +++ b/resource-manager/trafficmanager/2018-08-01/geographichierarchies/version.go @@ -1,12 +1,10 @@ package geographichierarchies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geographichierarchies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/geographichierarchies/2018-08-01" } diff --git a/resource-manager/trafficmanager/2018-08-01/heatmaps/README.md b/resource-manager/trafficmanager/2018-08-01/heatmaps/README.md index ef7dfe370d4..c199ad02818 100644 --- a/resource-manager/trafficmanager/2018-08-01/heatmaps/README.md +++ b/resource-manager/trafficmanager/2018-08-01/heatmaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/heatmaps` Documentation -The `heatmaps` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `heatmaps` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2018-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2018-08-01/heatmaps/client.go b/resource-manager/trafficmanager/2018-08-01/heatmaps/client.go index 30506d06ab9..8b9e4092d05 100644 --- a/resource-manager/trafficmanager/2018-08-01/heatmaps/client.go +++ b/resource-manager/trafficmanager/2018-08-01/heatmaps/client.go @@ -15,7 +15,7 @@ type HeatMapsClient struct { } func NewHeatMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*HeatMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "heatmaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "heatmaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HeatMapsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2018-08-01/heatmaps/id_trafficmanagerprofile.go b/resource-manager/trafficmanager/2018-08-01/heatmaps/id_trafficmanagerprofile.go index 6a3ae8991cf..c4666e0c0a7 100644 --- a/resource-manager/trafficmanager/2018-08-01/heatmaps/id_trafficmanagerprofile.go +++ b/resource-manager/trafficmanager/2018-08-01/heatmaps/id_trafficmanagerprofile.go @@ -42,7 +42,7 @@ func ParseTrafficManagerProfileID(input string) (*TrafficManagerProfileId, error } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficManagerProfileIDInsensitively(input string) (*TrafficManagerPro } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2018-08-01/heatmaps/method_heatmapget.go b/resource-manager/trafficmanager/2018-08-01/heatmaps/method_heatmapget.go index 4579935200c..440324feb44 100644 --- a/resource-manager/trafficmanager/2018-08-01/heatmaps/method_heatmapget.go +++ b/resource-manager/trafficmanager/2018-08-01/heatmaps/method_heatmapget.go @@ -35,6 +35,7 @@ func (o HeatMapGetOperationOptions) ToHeaders() *client.Headers { func (o HeatMapGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c HeatMapsClient) HeatMapGet(ctx context.Context, id TrafficManagerProfile var model HeatMapModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/heatmaps/version.go b/resource-manager/trafficmanager/2018-08-01/heatmaps/version.go index a9ef7cdb553..c7e1f9e4ff4 100644 --- a/resource-manager/trafficmanager/2018-08-01/heatmaps/version.go +++ b/resource-manager/trafficmanager/2018-08-01/heatmaps/version.go @@ -1,12 +1,10 @@ package heatmaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/heatmaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/heatmaps/2018-08-01" } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/README.md b/resource-manager/trafficmanager/2018-08-01/profiles/README.md index a3c7091ba4f..13740fe76f0 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/README.md +++ b/resource-manager/trafficmanager/2018-08-01/profiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/profiles` Documentation -The `profiles` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `profiles` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2018-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/client.go b/resource-manager/trafficmanager/2018-08-01/profiles/client.go index 72048226618..16eaef71194 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/client.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/client.go @@ -15,7 +15,7 @@ type ProfilesClient struct { } func NewProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "profiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "profiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProfilesClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go b/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go index d8ac0c80fc6..cdfaa2358eb 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/id_trafficmanagerprofile.go @@ -42,7 +42,7 @@ func ParseTrafficManagerProfileID(input string) (*TrafficManagerProfileId, error } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficManagerProfileIDInsensitively(input string) (*TrafficManagerPro } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go index e1e2d6d85ac..965a7054066 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go @@ -49,7 +49,6 @@ func (c ProfilesClient) CheckTrafficManagerRelativeDnsNameAvailability(ctx conte var model TrafficManagerNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go index d41788ffb38..07577b9f325 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProfilesClient) CreateOrUpdate(ctx context.Context, id TrafficManagerPro var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go index 8c126789eb0..a5170cef630 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_delete.go @@ -46,7 +46,6 @@ func (c ProfilesClient) Delete(ctx context.Context, id TrafficManagerProfileId) var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go index 1bb0ddf0d3e..84fa23ddb7a 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_get.go @@ -45,7 +45,6 @@ func (c ProfilesClient) Get(ctx context.Context, id TrafficManagerProfileId) (re var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go index 039431f6000..eaff3fb761b 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ProfilesClient) ListByResourceGroup(ctx context.Context, id commonids.Re var model ProfileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go index 110f5d5e4f7..5e725899a61 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ProfilesClient) ListBySubscription(ctx context.Context, id commonids.Sub var model ProfileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go b/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go index 91e72c94333..38fc16bc334 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/method_update.go @@ -49,7 +49,6 @@ func (c ProfilesClient) Update(ctx context.Context, id TrafficManagerProfileId, var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/profiles/version.go b/resource-manager/trafficmanager/2018-08-01/profiles/version.go index 660e41e5df6..c7e9abd1f04 100644 --- a/resource-manager/trafficmanager/2018-08-01/profiles/version.go +++ b/resource-manager/trafficmanager/2018-08-01/profiles/version.go @@ -1,12 +1,10 @@ package profiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/profiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/profiles/2018-08-01" } diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/README.md b/resource-manager/trafficmanager/2018-08-01/realusermetrics/README.md index d03004c7ecb..b2ef2f23518 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/README.md +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2018-08-01/realusermetrics` Documentation -The `realusermetrics` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2018-08-01`). +The `realusermetrics` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2018-08-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/client.go b/resource-manager/trafficmanager/2018-08-01/realusermetrics/client.go index 59eaff8fc95..1dbc1500a0d 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/client.go +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/client.go @@ -15,7 +15,7 @@ type RealUserMetricsClient struct { } func NewRealUserMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*RealUserMetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "realusermetrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "realusermetrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RealUserMetricsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go index 9123ddbd647..fed28d66436 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysCreateOrUpdate(ctx c var model UserMetricsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go index 555c884fdaa..310530512fc 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysDelete(ctx context.C var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysget.go b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysget.go index 1ecfc48e737..513fad378a9 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysget.go +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/method_trafficmanagerusermetricskeysget.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysGet(ctx context.Cont var model UserMetricsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2018-08-01/realusermetrics/version.go b/resource-manager/trafficmanager/2018-08-01/realusermetrics/version.go index 07122e18caf..bc98fe16140 100644 --- a/resource-manager/trafficmanager/2018-08-01/realusermetrics/version.go +++ b/resource-manager/trafficmanager/2018-08-01/realusermetrics/version.go @@ -1,12 +1,10 @@ package realusermetrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2018-08-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/realusermetrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/realusermetrics/2018-08-01" } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/README.md b/resource-manager/trafficmanager/2022-04-01/endpoints/README.md index 2b4e1205811..3d11a0cb7e8 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/README.md +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/endpoints` Documentation -The `endpoints` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). +The `endpoints` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/client.go b/resource-manager/trafficmanager/2022-04-01/endpoints/client.go index 5f6c4ea9ece..754a364cd33 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/client.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/client.go @@ -15,7 +15,7 @@ type EndpointsClient struct { } func NewEndpointsClientWithBaseURI(sdkApi sdkEnv.Api) (*EndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "endpoints", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "endpoints", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EndpointsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go b/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go index 41fe48c6336..1045b3c0e19 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/id_endpointtype.go @@ -46,7 +46,7 @@ func ParseEndpointTypeID(input string) (*EndpointTypeId, error) { } id := EndpointTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseEndpointTypeIDInsensitively(input string) (*EndpointTypeId, error) { } id := EndpointTypeId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go b/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go index d62f7e2858a..5db4941ad29 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EndpointsClient) CreateOrUpdate(ctx context.Context, id EndpointTypeId, var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go b/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go index 763d128fca2..81722ed4647 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/method_delete.go @@ -46,7 +46,6 @@ func (c EndpointsClient) Delete(ctx context.Context, id EndpointTypeId) (result var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go b/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go index 4bf03a6c1c0..6c1bad85940 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/method_get.go @@ -45,7 +45,6 @@ func (c EndpointsClient) Get(ctx context.Context, id EndpointTypeId) (result Get var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go b/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go index fa19d815ad6..f7f3bdfc014 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/method_update.go @@ -49,7 +49,6 @@ func (c EndpointsClient) Update(ctx context.Context, id EndpointTypeId, input En var model Endpoint result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/endpoints/version.go b/resource-manager/trafficmanager/2022-04-01/endpoints/version.go index d7f6d1db354..d6c5d484fd1 100644 --- a/resource-manager/trafficmanager/2022-04-01/endpoints/version.go +++ b/resource-manager/trafficmanager/2022-04-01/endpoints/version.go @@ -1,12 +1,10 @@ package endpoints -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpoints/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/endpoints/2022-04-01" } diff --git a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md index 50903ee9800..153743c8a07 100644 --- a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md +++ b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/geographichierarchies` Documentation -The `geographichierarchies` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). +The `geographichierarchies` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go index f2da2c82738..aba82e56b5a 100644 --- a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go +++ b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/client.go @@ -15,7 +15,7 @@ type GeographicHierarchiesClient struct { } func NewGeographicHierarchiesClientWithBaseURI(sdkApi sdkEnv.Api) (*GeographicHierarchiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "geographichierarchies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "geographichierarchies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GeographicHierarchiesClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go index 3e00109c9ce..b1360a23e03 100644 --- a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go +++ b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/method_getdefault.go @@ -45,7 +45,6 @@ func (c GeographicHierarchiesClient) GetDefault(ctx context.Context) (result Get var model TrafficManagerGeographicHierarchy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go index 44d8950b7ce..2298b53f0c2 100644 --- a/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go +++ b/resource-manager/trafficmanager/2022-04-01/geographichierarchies/version.go @@ -1,12 +1,10 @@ package geographichierarchies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/geographichierarchies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/geographichierarchies/2022-04-01" } diff --git a/resource-manager/trafficmanager/2022-04-01/heatmaps/README.md b/resource-manager/trafficmanager/2022-04-01/heatmaps/README.md index bbed8f8cdfa..8ac52828d3e 100644 --- a/resource-manager/trafficmanager/2022-04-01/heatmaps/README.md +++ b/resource-manager/trafficmanager/2022-04-01/heatmaps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/heatmaps` Documentation -The `heatmaps` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). +The `heatmaps` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2022-04-01/heatmaps/client.go b/resource-manager/trafficmanager/2022-04-01/heatmaps/client.go index 30506d06ab9..8b9e4092d05 100644 --- a/resource-manager/trafficmanager/2022-04-01/heatmaps/client.go +++ b/resource-manager/trafficmanager/2022-04-01/heatmaps/client.go @@ -15,7 +15,7 @@ type HeatMapsClient struct { } func NewHeatMapsClientWithBaseURI(sdkApi sdkEnv.Api) (*HeatMapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "heatmaps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "heatmaps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HeatMapsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2022-04-01/heatmaps/id_trafficmanagerprofile.go b/resource-manager/trafficmanager/2022-04-01/heatmaps/id_trafficmanagerprofile.go index 6a3ae8991cf..c4666e0c0a7 100644 --- a/resource-manager/trafficmanager/2022-04-01/heatmaps/id_trafficmanagerprofile.go +++ b/resource-manager/trafficmanager/2022-04-01/heatmaps/id_trafficmanagerprofile.go @@ -42,7 +42,7 @@ func ParseTrafficManagerProfileID(input string) (*TrafficManagerProfileId, error } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficManagerProfileIDInsensitively(input string) (*TrafficManagerPro } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2022-04-01/heatmaps/method_heatmapget.go b/resource-manager/trafficmanager/2022-04-01/heatmaps/method_heatmapget.go index 4579935200c..440324feb44 100644 --- a/resource-manager/trafficmanager/2022-04-01/heatmaps/method_heatmapget.go +++ b/resource-manager/trafficmanager/2022-04-01/heatmaps/method_heatmapget.go @@ -35,6 +35,7 @@ func (o HeatMapGetOperationOptions) ToHeaders() *client.Headers { func (o HeatMapGetOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c HeatMapsClient) HeatMapGet(ctx context.Context, id TrafficManagerProfile var model HeatMapModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/heatmaps/version.go b/resource-manager/trafficmanager/2022-04-01/heatmaps/version.go index 9675c5fd16d..428fb5c03f3 100644 --- a/resource-manager/trafficmanager/2022-04-01/heatmaps/version.go +++ b/resource-manager/trafficmanager/2022-04-01/heatmaps/version.go @@ -1,12 +1,10 @@ package heatmaps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/heatmaps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/heatmaps/2022-04-01" } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/README.md b/resource-manager/trafficmanager/2022-04-01/profiles/README.md index 87bb1747848..dcc10978b34 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/README.md +++ b/resource-manager/trafficmanager/2022-04-01/profiles/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/profiles` Documentation -The `profiles` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). +The `profiles` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/client.go b/resource-manager/trafficmanager/2022-04-01/profiles/client.go index 72048226618..16eaef71194 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/client.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/client.go @@ -15,7 +15,7 @@ type ProfilesClient struct { } func NewProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "profiles", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "profiles", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProfilesClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go b/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go index d8ac0c80fc6..cdfaa2358eb 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/id_trafficmanagerprofile.go @@ -42,7 +42,7 @@ func ParseTrafficManagerProfileID(input string) (*TrafficManagerProfileId, error } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseTrafficManagerProfileIDInsensitively(input string) (*TrafficManagerPro } id := TrafficManagerProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go index f87e57f4050..d39f25c4db1 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagernameavailabilityv2.go @@ -51,7 +51,6 @@ func (c ProfilesClient) CheckTrafficManagerNameAvailabilityV2(ctx context.Contex var model TrafficManagerNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go index e1e2d6d85ac..965a7054066 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_checktrafficmanagerrelativednsnameavailability.go @@ -49,7 +49,6 @@ func (c ProfilesClient) CheckTrafficManagerRelativeDnsNameAvailability(ctx conte var model TrafficManagerNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go index d41788ffb38..07577b9f325 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ProfilesClient) CreateOrUpdate(ctx context.Context, id TrafficManagerPro var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go index 8c126789eb0..a5170cef630 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_delete.go @@ -46,7 +46,6 @@ func (c ProfilesClient) Delete(ctx context.Context, id TrafficManagerProfileId) var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go index 1bb0ddf0d3e..84fa23ddb7a 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_get.go @@ -45,7 +45,6 @@ func (c ProfilesClient) Get(ctx context.Context, id TrafficManagerProfileId) (re var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go index 039431f6000..eaff3fb761b 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_listbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ProfilesClient) ListByResourceGroup(ctx context.Context, id commonids.Re var model ProfileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go index 110f5d5e4f7..5e725899a61 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_listbysubscription.go @@ -47,7 +47,6 @@ func (c ProfilesClient) ListBySubscription(ctx context.Context, id commonids.Sub var model ProfileListResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go b/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go index 91e72c94333..38fc16bc334 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/method_update.go @@ -49,7 +49,6 @@ func (c ProfilesClient) Update(ctx context.Context, id TrafficManagerProfileId, var model Profile result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/profiles/version.go b/resource-manager/trafficmanager/2022-04-01/profiles/version.go index e4b4487d822..bffbcd56baa 100644 --- a/resource-manager/trafficmanager/2022-04-01/profiles/version.go +++ b/resource-manager/trafficmanager/2022-04-01/profiles/version.go @@ -1,12 +1,10 @@ package profiles -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/profiles/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/profiles/2022-04-01" } diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/README.md b/resource-manager/trafficmanager/2022-04-01/realusermetrics/README.md index f522a1f80ef..0267be52201 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/README.md +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/trafficmanager/2022-04-01/realusermetrics` Documentation -The `realusermetrics` SDK allows for interaction with the Azure Resource Manager Service `trafficmanager` (API Version `2022-04-01`). +The `realusermetrics` SDK allows for interaction with Azure Resource Manager `trafficmanager` (API Version `2022-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/client.go b/resource-manager/trafficmanager/2022-04-01/realusermetrics/client.go index 59eaff8fc95..1dbc1500a0d 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/client.go +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/client.go @@ -15,7 +15,7 @@ type RealUserMetricsClient struct { } func NewRealUserMetricsClientWithBaseURI(sdkApi sdkEnv.Api) (*RealUserMetricsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "realusermetrics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "realusermetrics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RealUserMetricsClient: %+v", err) } diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go index 9123ddbd647..fed28d66436 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeyscreateorupdate.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysCreateOrUpdate(ctx c var model UserMetricsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go index 555c884fdaa..310530512fc 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysdelete.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysDelete(ctx context.C var model DeleteOperationResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysget.go b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysget.go index 1ecfc48e737..513fad378a9 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysget.go +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/method_trafficmanagerusermetricskeysget.go @@ -47,7 +47,6 @@ func (c RealUserMetricsClient) TrafficManagerUserMetricsKeysGet(ctx context.Cont var model UserMetricsModel result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/trafficmanager/2022-04-01/realusermetrics/version.go b/resource-manager/trafficmanager/2022-04-01/realusermetrics/version.go index 2259c269a9d..e06d8f69333 100644 --- a/resource-manager/trafficmanager/2022-04-01/realusermetrics/version.go +++ b/resource-manager/trafficmanager/2022-04-01/realusermetrics/version.go @@ -1,12 +1,10 @@ package realusermetrics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/realusermetrics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/realusermetrics/2022-04-01" } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md index f2675f92507..a35eecb6d02 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules` Documentation -The `edgemodules` SDK allows for interaction with the Azure Resource Manager Service `videoanalyzer` (API Version `2021-05-01-preview`). +The `edgemodules` SDK allows for interaction with Azure Resource Manager `videoanalyzer` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go index 87405273a85..db53492c2b7 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/client.go @@ -15,7 +15,7 @@ type EdgeModulesClient struct { } func NewEdgeModulesClientWithBaseURI(sdkApi sdkEnv.Api) (*EdgeModulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "edgemodules", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "edgemodules", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating EdgeModulesClient: %+v", err) } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go index bbe31c30122..580c875fb1a 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_edgemodule.go @@ -44,7 +44,7 @@ func ParseEdgeModuleID(input string) (*EdgeModuleId, error) { } id := EdgeModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseEdgeModuleIDInsensitively(input string) (*EdgeModuleId, error) { } id := EdgeModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go index 3b95e75e7fb..880fbcbf0e5 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/id_videoanalyzer.go @@ -42,7 +42,7 @@ func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go index 76e45332fb3..82255e17bd4 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_createorupdate.go @@ -50,7 +50,6 @@ func (c EdgeModulesClient) CreateOrUpdate(ctx context.Context, id EdgeModuleId, var model EdgeModuleEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go index 426c166398b..0674f360762 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_get.go @@ -45,7 +45,6 @@ func (c EdgeModulesClient) Get(ctx context.Context, id EdgeModuleId) (result Get var model EdgeModuleEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go index fa58a247932..ccf4606b493 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go index 121378bbcc8..d600dbefc86 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/method_listprovisioningtoken.go @@ -50,7 +50,6 @@ func (c EdgeModulesClient) ListProvisioningToken(ctx context.Context, id EdgeMod var model EdgeModuleProvisioningToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go index 037c0dfcd38..3d7af0ff5f7 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/edgemodules/version.go @@ -1,12 +1,10 @@ package edgemodules -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/edgemodules/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/edgemodules/2021-05-01-preview" } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md index ee7261b7dbf..872678bc517 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers` Documentation -The `videoanalyzers` SDK allows for interaction with the Azure Resource Manager Service `videoanalyzer` (API Version `2021-05-01-preview`). +The `videoanalyzers` SDK allows for interaction with Azure Resource Manager `videoanalyzer` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go index eb501d36bdf..e00009f4944 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/client.go @@ -15,7 +15,7 @@ type VideoAnalyzersClient struct { } func NewVideoAnalyzersClientWithBaseURI(sdkApi sdkEnv.Api) (*VideoAnalyzersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "videoanalyzers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "videoanalyzers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VideoAnalyzersClient: %+v", err) } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go index 1a4d8cc23df..bbd38002c42 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go index b7a89b47507..921343f3619 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/id_videoanalyzer.go @@ -42,7 +42,7 @@ func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go index 82f7fe624e5..478ec54c9b0 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_locationschecknameavailability.go @@ -50,7 +50,6 @@ func (c VideoAnalyzersClient) LocationsCheckNameAvailability(ctx context.Context var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go index a13667a0a4c..cf9c732a8d9 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerscreateorupdate.go @@ -50,7 +50,6 @@ func (c VideoAnalyzersClient) VideoAnalyzersCreateOrUpdate(ctx context.Context, var model VideoAnalyzer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go index 52b181f2bb1..dde47a8ddcc 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersget.go @@ -45,7 +45,6 @@ func (c VideoAnalyzersClient) VideoAnalyzersGet(ctx context.Context, id VideoAna var model VideoAnalyzer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go index 8cd06f9f802..c6dd7920459 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslist.go @@ -47,7 +47,6 @@ func (c VideoAnalyzersClient) VideoAnalyzersList(ctx context.Context, id commoni var model VideoAnalyzerCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go index 09fdac0d374..a7476c4df19 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzerslistbysubscription.go @@ -47,7 +47,6 @@ func (c VideoAnalyzersClient) VideoAnalyzersListBySubscription(ctx context.Conte var model VideoAnalyzerCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go index 24cea9da913..6ef729fc106 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/method_videoanalyzersupdate.go @@ -49,7 +49,6 @@ func (c VideoAnalyzersClient) VideoAnalyzersUpdate(ctx context.Context, id Video var model VideoAnalyzer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go index 275b8e34c2e..edadb975892 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videoanalyzers/version.go @@ -1,12 +1,10 @@ package videoanalyzers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/videoanalyzers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/videoanalyzers/2021-05-01-preview" } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/README.md b/resource-manager/videoanalyzer/2021-05-01-preview/videos/README.md index 8fe99c329d0..3fbe0b361f7 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/README.md +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/videoanalyzer/2021-05-01-preview/videos` Documentation -The `videos` SDK allows for interaction with the Azure Resource Manager Service `videoanalyzer` (API Version `2021-05-01-preview`). +The `videos` SDK allows for interaction with Azure Resource Manager `videoanalyzer` (API Version `2021-05-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/client.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/client.go index d4addcb19ad..76fbe4aa4fa 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/client.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/client.go @@ -15,7 +15,7 @@ type VideosClient struct { } func NewVideosClientWithBaseURI(sdkApi sdkEnv.Api) (*VideosClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "videos", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "videos", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VideosClient: %+v", err) } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_accesspolicy.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_accesspolicy.go index 15d87f1257f..6f2dc6a8ce7 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_accesspolicy.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_accesspolicy.go @@ -44,7 +44,7 @@ func ParseAccessPolicyID(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAccessPolicyIDInsensitively(input string) (*AccessPolicyId, error) { } id := AccessPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_video.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_video.go index 8b92098c6e4..1950d6f35d9 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_video.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_video.go @@ -44,7 +44,7 @@ func ParseVideoID(input string) (*VideoId, error) { } id := VideoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVideoIDInsensitively(input string) (*VideoId, error) { } id := VideoId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_videoanalyzer.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_videoanalyzer.go index d1a3dd4e8f2..8ed1f04a5a7 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_videoanalyzer.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/id_videoanalyzer.go @@ -42,7 +42,7 @@ func ParseVideoAnalyzerID(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseVideoAnalyzerIDInsensitively(input string) (*VideoAnalyzerId, error) { } id := VideoAnalyzerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciescreateorupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciescreateorupdate.go index 0db1d96b6fe..4274d1f0813 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciescreateorupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciescreateorupdate.go @@ -50,7 +50,6 @@ func (c VideosClient) AccessPoliciesCreateOrUpdate(ctx context.Context, id Acces var model AccessPolicyEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesget.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesget.go index 6965a7eea60..1c7be3e4872 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesget.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesget.go @@ -45,7 +45,6 @@ func (c VideosClient) AccessPoliciesGet(ctx context.Context, id AccessPolicyId) var model AccessPolicyEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspolicieslist.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspolicieslist.go index 753c14b726d..234f363a10c 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspolicieslist.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspolicieslist.go @@ -39,6 +39,7 @@ func (o AccessPoliciesListOperationOptions) ToHeaders() *client.Headers { func (o AccessPoliciesListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesupdate.go index 39d0060178e..1209238aed5 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_accesspoliciesupdate.go @@ -49,7 +49,6 @@ func (c VideosClient) AccessPoliciesUpdate(ctx context.Context, id AccessPolicyI var model AccessPolicyEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoscreateorupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoscreateorupdate.go index 904f64dc380..9609a899989 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoscreateorupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoscreateorupdate.go @@ -50,7 +50,6 @@ func (c VideosClient) VideosCreateOrUpdate(ctx context.Context, id VideoId, inpu var model VideoEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosget.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosget.go index 4bc145b935b..fe28a4cb1a4 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosget.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosget.go @@ -45,7 +45,6 @@ func (c VideosClient) VideosGet(ctx context.Context, id VideoId) (result VideosG var model VideoEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoslist.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoslist.go index cd362857a80..2b1d291dfac 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoslist.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videoslist.go @@ -39,6 +39,7 @@ func (o VideosListOperationOptions) ToHeaders() *client.Headers { func (o VideosListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosliststreamingtoken.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosliststreamingtoken.go index a2ba2477929..6d1a409531a 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosliststreamingtoken.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosliststreamingtoken.go @@ -46,7 +46,6 @@ func (c VideosClient) VideosListStreamingToken(ctx context.Context, id VideoId) var model VideoStreamingToken result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosupdate.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosupdate.go index 5cf8a7e82bd..735a1366878 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosupdate.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/method_videosupdate.go @@ -49,7 +49,6 @@ func (c VideosClient) VideosUpdate(ctx context.Context, id VideoId, input VideoE var model VideoEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_accesspolicyproperties.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_accesspolicyproperties.go index 7e61d8ae293..206dda29812 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_accesspolicyproperties.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_accesspolicyproperties.go @@ -30,7 +30,7 @@ func (s *AccessPolicyProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["authentication"]; ok { - impl, err := unmarshalAuthenticationBaseImplementation(v) + impl, err := UnmarshalAuthenticationBaseImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Authentication' for 'AccessPolicyProperties': %+v", err) } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_authenticationbase.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_authenticationbase.go index 20488a8ad6e..b2311b2cd41 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_authenticationbase.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_authenticationbase.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AuthenticationBase interface { + AuthenticationBase() BaseAuthenticationBaseImpl } -// RawAuthenticationBaseImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AuthenticationBase = BaseAuthenticationBaseImpl{} + +type BaseAuthenticationBaseImpl struct { + Type string `json:"@type"` +} + +func (s BaseAuthenticationBaseImpl) AuthenticationBase() BaseAuthenticationBaseImpl { + return s +} + +var _ AuthenticationBase = RawAuthenticationBaseImpl{} + +// RawAuthenticationBaseImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAuthenticationBaseImpl struct { - Type string - Values map[string]interface{} + authenticationBase BaseAuthenticationBaseImpl + Type string + Values map[string]interface{} +} + +func (s RawAuthenticationBaseImpl) AuthenticationBase() BaseAuthenticationBaseImpl { + return s.authenticationBase } -func unmarshalAuthenticationBaseImplementation(input []byte) (AuthenticationBase, error) { +func UnmarshalAuthenticationBaseImplementation(input []byte) (AuthenticationBase, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalAuthenticationBaseImplementation(input []byte) (AuthenticationBase return out, nil } - out := RawAuthenticationBaseImpl{ - Type: value, - Values: temp, + var parent BaseAuthenticationBaseImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAuthenticationBaseImpl: %+v", err) } - return out, nil + + return RawAuthenticationBaseImpl{ + authenticationBase: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_ecctokenkey.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_ecctokenkey.go index f90d8ce62cb..712a72b3cdf 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_ecctokenkey.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_ecctokenkey.go @@ -16,7 +16,16 @@ type EccTokenKey struct { Y string `json:"y"` // Fields inherited from TokenKey - Kid string `json:"kid"` + + Kid string `json:"kid"` + Type string `json:"@type"` +} + +func (s EccTokenKey) TokenKey() BaseTokenKeyImpl { + return BaseTokenKeyImpl{ + Kid: s.Kid, + Type: s.Type, + } } var _ json.Marshaler = EccTokenKey{} @@ -30,9 +39,10 @@ func (s EccTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EccTokenKey: %+v", err) } + decoded["@type"] = "#Microsoft.VideoAnalyzer.EccTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_jwtauthentication.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_jwtauthentication.go index a1e4188082c..c321395cfc8 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_jwtauthentication.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_jwtauthentication.go @@ -17,6 +17,14 @@ type JwtAuthentication struct { Keys *[]TokenKey `json:"keys,omitempty"` // Fields inherited from AuthenticationBase + + Type string `json:"@type"` +} + +func (s JwtAuthentication) AuthenticationBase() BaseAuthenticationBaseImpl { + return BaseAuthenticationBaseImpl{ + Type: s.Type, + } } var _ json.Marshaler = JwtAuthentication{} @@ -30,9 +38,10 @@ func (s JwtAuthentication) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling JwtAuthentication: %+v", err) } + decoded["@type"] = "#Microsoft.VideoAnalyzer.JwtAuthentication" encoded, err = json.Marshal(decoded) @@ -55,6 +64,7 @@ func (s *JwtAuthentication) UnmarshalJSON(bytes []byte) error { s.Audiences = decoded.Audiences s.Claims = decoded.Claims s.Issuers = decoded.Issuers + s.Type = decoded.Type var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -69,7 +79,7 @@ func (s *JwtAuthentication) UnmarshalJSON(bytes []byte) error { output := make([]TokenKey, 0) for i, val := range listTemp { - impl, err := unmarshalTokenKeyImplementation(val) + impl, err := UnmarshalTokenKeyImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Keys' for 'JwtAuthentication': %+v", i, err) } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_rsatokenkey.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_rsatokenkey.go index 75c710bf3ac..c73025d9bc1 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_rsatokenkey.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_rsatokenkey.go @@ -16,7 +16,16 @@ type RsaTokenKey struct { N string `json:"n"` // Fields inherited from TokenKey - Kid string `json:"kid"` + + Kid string `json:"kid"` + Type string `json:"@type"` +} + +func (s RsaTokenKey) TokenKey() BaseTokenKeyImpl { + return BaseTokenKeyImpl{ + Kid: s.Kid, + Type: s.Type, + } } var _ json.Marshaler = RsaTokenKey{} @@ -30,9 +39,10 @@ func (s RsaTokenKey) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling RsaTokenKey: %+v", err) } + decoded["@type"] = "#Microsoft.VideoAnalyzer.RsaTokenKey" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_tokenkey.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_tokenkey.go index 88682fa8514..d4cc9cc997b 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_tokenkey.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/model_tokenkey.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TokenKey interface { + TokenKey() BaseTokenKeyImpl } -// RawTokenKeyImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ TokenKey = BaseTokenKeyImpl{} + +type BaseTokenKeyImpl struct { + Kid string `json:"kid"` + Type string `json:"@type"` +} + +func (s BaseTokenKeyImpl) TokenKey() BaseTokenKeyImpl { + return s +} + +var _ TokenKey = RawTokenKeyImpl{} + +// RawTokenKeyImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawTokenKeyImpl struct { - Type string - Values map[string]interface{} + tokenKey BaseTokenKeyImpl + Type string + Values map[string]interface{} +} + +func (s RawTokenKeyImpl) TokenKey() BaseTokenKeyImpl { + return s.tokenKey } -func unmarshalTokenKeyImplementation(input []byte) (TokenKey, error) { +func UnmarshalTokenKeyImplementation(input []byte) (TokenKey, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalTokenKeyImplementation(input []byte) (TokenKey, error) { return out, nil } - out := RawTokenKeyImpl{ - Type: value, - Values: temp, + var parent BaseTokenKeyImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseTokenKeyImpl: %+v", err) } - return out, nil + + return RawTokenKeyImpl{ + tokenKey: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/videoanalyzer/2021-05-01-preview/videos/version.go b/resource-manager/videoanalyzer/2021-05-01-preview/videos/version.go index 3653dce06e2..a75ef2b2979 100644 --- a/resource-manager/videoanalyzer/2021-05-01-preview/videos/version.go +++ b/resource-manager/videoanalyzer/2021-05-01-preview/videos/version.go @@ -1,12 +1,10 @@ package videos -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2021-05-01-preview" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/videos/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/videos/2021-05-01-preview" } diff --git a/resource-manager/vmware/2022-05-01/addons/README.md b/resource-manager/vmware/2022-05-01/addons/README.md index 00d630bfe0e..dc3b0e5f5cc 100644 --- a/resource-manager/vmware/2022-05-01/addons/README.md +++ b/resource-manager/vmware/2022-05-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/addons/client.go b/resource-manager/vmware/2022-05-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/vmware/2022-05-01/addons/client.go +++ b/resource-manager/vmware/2022-05-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/addons/id_addon.go b/resource-manager/vmware/2022-05-01/addons/id_addon.go index d677ac096b0..e910059ff68 100644 --- a/resource-manager/vmware/2022-05-01/addons/id_addon.go +++ b/resource-manager/vmware/2022-05-01/addons/id_addon.go @@ -44,7 +44,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/addons/id_privatecloud.go b/resource-manager/vmware/2022-05-01/addons/id_privatecloud.go index f798b48647c..38bac9a28c3 100644 --- a/resource-manager/vmware/2022-05-01/addons/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/addons/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/addons/method_get.go b/resource-manager/vmware/2022-05-01/addons/method_get.go index a9a36357935..f1aced6a637 100644 --- a/resource-manager/vmware/2022-05-01/addons/method_get.go +++ b/resource-manager/vmware/2022-05-01/addons/method_get.go @@ -45,7 +45,6 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR var model Addon result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/addons/model_addon.go b/resource-manager/vmware/2022-05-01/addons/model_addon.go index b09855c9550..cd7f7f322a9 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addon.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addon.go @@ -34,7 +34,7 @@ func (s *Addon) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAddonPropertiesImplementation(v) + impl, err := UnmarshalAddonPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Addon': %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/addons/model_addonarcproperties.go b/resource-manager/vmware/2022-05-01/addons/model_addonarcproperties.go index 3067d4ac170..b508ee63ea5 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addonarcproperties.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addonarcproperties.go @@ -14,9 +14,18 @@ type AddonArcProperties struct { VCenter *string `json:"vCenter,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonArcProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonArcProperties{} func (s AddonArcProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonArcProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonArcProperties: %+v", err) } + decoded["addonType"] = "Arc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/addons/model_addonhcxproperties.go b/resource-manager/vmware/2022-05-01/addons/model_addonhcxproperties.go index a31858b1887..2baf17e5e87 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addonhcxproperties.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addonhcxproperties.go @@ -14,9 +14,18 @@ type AddonHcxProperties struct { Offer string `json:"offer"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonHcxProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonHcxProperties{} func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonHcxProperties: %+v", err) } + decoded["addonType"] = "HCX" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/addons/model_addonproperties.go b/resource-manager/vmware/2022-05-01/addons/model_addonproperties.go index cc9b498f212..734fe3fc139 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addonproperties.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addonproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddonProperties interface { + AddonProperties() BaseAddonPropertiesImpl } -// RawAddonPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddonProperties = BaseAddonPropertiesImpl{} + +type BaseAddonPropertiesImpl struct { + AddonType AddonType `json:"addonType"` + ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s +} + +var _ AddonProperties = RawAddonPropertiesImpl{} + +// RawAddonPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonPropertiesImpl struct { - Type string - Values map[string]interface{} + addonProperties BaseAddonPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s.addonProperties } -func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { +func UnmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { if input == nil { return nil, nil } @@ -68,10 +86,15 @@ func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, erro return out, nil } - out := RawAddonPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseAddonPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonPropertiesImpl: %+v", err) } - return out, nil + + return RawAddonPropertiesImpl{ + addonProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2022-05-01/addons/model_addonsrmproperties.go b/resource-manager/vmware/2022-05-01/addons/model_addonsrmproperties.go index 65f29909d3f..ba406dcc8cb 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addonsrmproperties.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addonsrmproperties.go @@ -14,9 +14,18 @@ type AddonSrmProperties struct { LicenseKey *string `json:"licenseKey,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonSrmProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonSrmProperties{} func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonSrmProperties: %+v", err) } + decoded["addonType"] = "SRM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/addons/model_addonvrproperties.go b/resource-manager/vmware/2022-05-01/addons/model_addonvrproperties.go index 2eb66a36285..89ea1d60e64 100644 --- a/resource-manager/vmware/2022-05-01/addons/model_addonvrproperties.go +++ b/resource-manager/vmware/2022-05-01/addons/model_addonvrproperties.go @@ -14,9 +14,18 @@ type AddonVrProperties struct { VrsCount int64 `json:"vrsCount"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonVrProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonVrProperties{} func (s AddonVrProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonVrProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonVrProperties: %+v", err) } + decoded["addonType"] = "VR" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/addons/version.go b/resource-manager/vmware/2022-05-01/addons/version.go index 8ae1eb2e257..6ed8a4e56ea 100644 --- a/resource-manager/vmware/2022-05-01/addons/version.go +++ b/resource-manager/vmware/2022-05-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/authorizations/README.md b/resource-manager/vmware/2022-05-01/authorizations/README.md index c94c92c4449..30bd07d986a 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/README.md +++ b/resource-manager/vmware/2022-05-01/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/authorizations/client.go b/resource-manager/vmware/2022-05-01/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/client.go +++ b/resource-manager/vmware/2022-05-01/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go b/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go index 75ef4f231db..3faa46b67aa 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go +++ b/resource-manager/vmware/2022-05-01/authorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go b/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go index a3c777162b9..ff8bbde6d4d 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/authorizations/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/authorizations/method_get.go b/resource-manager/vmware/2022-05-01/authorizations/method_get.go index e87d153ae04..4bc9d8ca240 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/method_get.go +++ b/resource-manager/vmware/2022-05-01/authorizations/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationsClient) Get(ctx context.Context, id AuthorizationId) (resu var model ExpressRouteAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/authorizations/version.go b/resource-manager/vmware/2022-05-01/authorizations/version.go index f7b5290c4a9..3ac2b58b9e8 100644 --- a/resource-manager/vmware/2022-05-01/authorizations/version.go +++ b/resource-manager/vmware/2022-05-01/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/README.md b/resource-manager/vmware/2022-05-01/cloudlinks/README.md index bea6486d51f..d640e3a32ac 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/README.md +++ b/resource-manager/vmware/2022-05-01/cloudlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/cloudlinks` Documentation -The `cloudlinks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `cloudlinks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/client.go b/resource-manager/vmware/2022-05-01/cloudlinks/client.go index e39385c28cb..b7bf5d6f417 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/client.go +++ b/resource-manager/vmware/2022-05-01/cloudlinks/client.go @@ -15,7 +15,7 @@ type CloudLinksClient struct { } func NewCloudLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudLinksClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/id_cloudlink.go b/resource-manager/vmware/2022-05-01/cloudlinks/id_cloudlink.go index 0e99632f979..5f0ce369dc0 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/id_cloudlink.go +++ b/resource-manager/vmware/2022-05-01/cloudlinks/id_cloudlink.go @@ -44,7 +44,7 @@ func ParseCloudLinkID(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCloudLinkIDInsensitively(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/id_privatecloud.go b/resource-manager/vmware/2022-05-01/cloudlinks/id_privatecloud.go index e6d18d81ff9..02c7175e8c9 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/cloudlinks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/method_get.go b/resource-manager/vmware/2022-05-01/cloudlinks/method_get.go index 335e9d0c2de..79d50f59a2b 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/method_get.go +++ b/resource-manager/vmware/2022-05-01/cloudlinks/method_get.go @@ -45,7 +45,6 @@ func (c CloudLinksClient) Get(ctx context.Context, id CloudLinkId) (result GetOp var model CloudLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/cloudlinks/version.go b/resource-manager/vmware/2022-05-01/cloudlinks/version.go index b445aaad8ec..8b24c6645aa 100644 --- a/resource-manager/vmware/2022-05-01/cloudlinks/version.go +++ b/resource-manager/vmware/2022-05-01/cloudlinks/version.go @@ -1,12 +1,10 @@ package cloudlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudlinks/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/cluster/README.md b/resource-manager/vmware/2022-05-01/cluster/README.md index 5388a573894..dddc9886925 100644 --- a/resource-manager/vmware/2022-05-01/cluster/README.md +++ b/resource-manager/vmware/2022-05-01/cluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/cluster` Documentation -The `cluster` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `cluster` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/cluster/client.go b/resource-manager/vmware/2022-05-01/cluster/client.go index 2a0e60ffb2b..dfc40b75394 100644 --- a/resource-manager/vmware/2022-05-01/cluster/client.go +++ b/resource-manager/vmware/2022-05-01/cluster/client.go @@ -15,7 +15,7 @@ type ClusterClient struct { } func NewClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/cluster/id_cluster.go b/resource-manager/vmware/2022-05-01/cluster/id_cluster.go index ee1febb96a0..28f11514e71 100644 --- a/resource-manager/vmware/2022-05-01/cluster/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/cluster/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/cluster/method_listzones.go b/resource-manager/vmware/2022-05-01/cluster/method_listzones.go index 3642aca0a90..0c253b7a499 100644 --- a/resource-manager/vmware/2022-05-01/cluster/method_listzones.go +++ b/resource-manager/vmware/2022-05-01/cluster/method_listzones.go @@ -46,7 +46,6 @@ func (c ClusterClient) ListZones(ctx context.Context, id ClusterId) (result List var model ClusterZoneList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/cluster/version.go b/resource-manager/vmware/2022-05-01/cluster/version.go index 7c79681267e..c9b0dac6d74 100644 --- a/resource-manager/vmware/2022-05-01/cluster/version.go +++ b/resource-manager/vmware/2022-05-01/cluster/version.go @@ -1,12 +1,10 @@ package cluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cluster/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/clusters/README.md b/resource-manager/vmware/2022-05-01/clusters/README.md index dc321bc37ae..0ed7c0d70f4 100644 --- a/resource-manager/vmware/2022-05-01/clusters/README.md +++ b/resource-manager/vmware/2022-05-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/clusters/client.go b/resource-manager/vmware/2022-05-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/vmware/2022-05-01/clusters/client.go +++ b/resource-manager/vmware/2022-05-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/clusters/id_cluster.go b/resource-manager/vmware/2022-05-01/clusters/id_cluster.go index e6090e86f8c..1b6178dbe70 100644 --- a/resource-manager/vmware/2022-05-01/clusters/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/clusters/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go b/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go index 3d7e9c19d02..1564735e072 100644 --- a/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/clusters/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/clusters/method_get.go b/resource-manager/vmware/2022-05-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/vmware/2022-05-01/clusters/method_get.go +++ b/resource-manager/vmware/2022-05-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/clusters/version.go b/resource-manager/vmware/2022-05-01/clusters/version.go index eb7c3e76e0a..cb2b4f72a2d 100644 --- a/resource-manager/vmware/2022-05-01/clusters/version.go +++ b/resource-manager/vmware/2022-05-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/datastores/README.md b/resource-manager/vmware/2022-05-01/datastores/README.md index ababa55e7ee..b3d6179f02b 100644 --- a/resource-manager/vmware/2022-05-01/datastores/README.md +++ b/resource-manager/vmware/2022-05-01/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `datastores` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/datastores/client.go b/resource-manager/vmware/2022-05-01/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/vmware/2022-05-01/datastores/client.go +++ b/resource-manager/vmware/2022-05-01/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/datastores/id_cluster.go b/resource-manager/vmware/2022-05-01/datastores/id_cluster.go index 147c507bd14..0c4054b1cf2 100644 --- a/resource-manager/vmware/2022-05-01/datastores/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/datastores/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/datastores/id_datastore.go b/resource-manager/vmware/2022-05-01/datastores/id_datastore.go index c4986961643..6f081b3d1fe 100644 --- a/resource-manager/vmware/2022-05-01/datastores/id_datastore.go +++ b/resource-manager/vmware/2022-05-01/datastores/id_datastore.go @@ -46,7 +46,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/datastores/method_get.go b/resource-manager/vmware/2022-05-01/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/vmware/2022-05-01/datastores/method_get.go +++ b/resource-manager/vmware/2022-05-01/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/datastores/version.go b/resource-manager/vmware/2022-05-01/datastores/version.go index 0c329ca8cc5..fd6a64f9568 100644 --- a/resource-manager/vmware/2022-05-01/datastores/version.go +++ b/resource-manager/vmware/2022-05-01/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/README.md b/resource-manager/vmware/2022-05-01/globalreachconnections/README.md index 13108c7a178..674f6e12b16 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/README.md +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/globalreachconnections` Documentation -The `globalreachconnections` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `globalreachconnections` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/client.go b/resource-manager/vmware/2022-05-01/globalreachconnections/client.go index a8a16b0e7fb..425e0d66528 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/client.go +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/client.go @@ -15,7 +15,7 @@ type GlobalReachConnectionsClient struct { } func NewGlobalReachConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalReachConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalreachconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalreachconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalReachConnectionsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/id_globalreachconnection.go b/resource-manager/vmware/2022-05-01/globalreachconnections/id_globalreachconnection.go index 07b31044b01..bf7812a9856 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/id_globalreachconnection.go +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/id_globalreachconnection.go @@ -44,7 +44,7 @@ func ParseGlobalReachConnectionID(input string) (*GlobalReachConnectionId, error } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGlobalReachConnectionIDInsensitively(input string) (*GlobalReachConnec } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/id_privatecloud.go b/resource-manager/vmware/2022-05-01/globalreachconnections/id_privatecloud.go index 052977121d7..2a51e7765a5 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/method_get.go b/resource-manager/vmware/2022-05-01/globalreachconnections/method_get.go index 5c2581a3794..eb2c4519d12 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/method_get.go +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/method_get.go @@ -45,7 +45,6 @@ func (c GlobalReachConnectionsClient) Get(ctx context.Context, id GlobalReachCon var model GlobalReachConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/globalreachconnections/version.go b/resource-manager/vmware/2022-05-01/globalreachconnections/version.go index ad822526053..070572d793d 100644 --- a/resource-manager/vmware/2022-05-01/globalreachconnections/version.go +++ b/resource-manager/vmware/2022-05-01/globalreachconnections/version.go @@ -1,12 +1,10 @@ package globalreachconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalreachconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalreachconnections/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/README.md b/resource-manager/vmware/2022-05-01/hcxenterprisesites/README.md index 9f1c8105037..056b2419c2b 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/README.md +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/hcxenterprisesites` Documentation -The `hcxenterprisesites` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `hcxenterprisesites` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/client.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/client.go index d710a7ca347..c765176b8d3 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/client.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/client.go @@ -15,7 +15,7 @@ type HcxEnterpriseSitesClient struct { } func NewHcxEnterpriseSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HcxEnterpriseSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hcxenterprisesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hcxenterprisesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HcxEnterpriseSitesClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_hcxenterprisesite.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_hcxenterprisesite.go index f00cae82d5a..a8b62beb9c4 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_hcxenterprisesite.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_hcxenterprisesite.go @@ -44,7 +44,7 @@ func ParseHcxEnterpriseSiteID(input string) (*HcxEnterpriseSiteId, error) { } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHcxEnterpriseSiteIDInsensitively(input string) (*HcxEnterpriseSiteId, } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_privatecloud.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_privatecloud.go index e4fb064beb9..96919ac7c07 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_createorupdate.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_createorupdate.go index eea78ab7268..a10de033534 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_createorupdate.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, id HcxEnte var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_get.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_get.go index df7bb8f9596..4e4bfd70efa 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_get.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/method_get.go @@ -45,7 +45,6 @@ func (c HcxEnterpriseSitesClient) Get(ctx context.Context, id HcxEnterpriseSiteI var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/hcxenterprisesites/version.go b/resource-manager/vmware/2022-05-01/hcxenterprisesites/version.go index eec05bed85d..610561d07a3 100644 --- a/resource-manager/vmware/2022-05-01/hcxenterprisesites/version.go +++ b/resource-manager/vmware/2022-05-01/hcxenterprisesites/version.go @@ -1,12 +1,10 @@ package hcxenterprisesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hcxenterprisesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hcxenterprisesites/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/locations/README.md b/resource-manager/vmware/2022-05-01/locations/README.md index 3340751e45d..ddf04e24274 100644 --- a/resource-manager/vmware/2022-05-01/locations/README.md +++ b/resource-manager/vmware/2022-05-01/locations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/locations` Documentation -The `locations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `locations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/locations/client.go b/resource-manager/vmware/2022-05-01/locations/client.go index a9a14613b89..57102dca10e 100644 --- a/resource-manager/vmware/2022-05-01/locations/client.go +++ b/resource-manager/vmware/2022-05-01/locations/client.go @@ -15,7 +15,7 @@ type LocationsClient struct { } func NewLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/locations/id_location.go b/resource-manager/vmware/2022-05-01/locations/id_location.go index c08afd589d2..6a83cff80fc 100644 --- a/resource-manager/vmware/2022-05-01/locations/id_location.go +++ b/resource-manager/vmware/2022-05-01/locations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/locations/method_checkquotaavailability.go b/resource-manager/vmware/2022-05-01/locations/method_checkquotaavailability.go index 9bbb8b9d5ba..6f12d1ff069 100644 --- a/resource-manager/vmware/2022-05-01/locations/method_checkquotaavailability.go +++ b/resource-manager/vmware/2022-05-01/locations/method_checkquotaavailability.go @@ -46,7 +46,6 @@ func (c LocationsClient) CheckQuotaAvailability(ctx context.Context, id Location var model Quota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/locations/method_checktrialavailability.go b/resource-manager/vmware/2022-05-01/locations/method_checktrialavailability.go index d92e12141b9..272a34a6b64 100644 --- a/resource-manager/vmware/2022-05-01/locations/method_checktrialavailability.go +++ b/resource-manager/vmware/2022-05-01/locations/method_checktrialavailability.go @@ -50,7 +50,6 @@ func (c LocationsClient) CheckTrialAvailability(ctx context.Context, id Location var model Trial result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/locations/version.go b/resource-manager/vmware/2022-05-01/locations/version.go index 060b999c1d2..123dd232a63 100644 --- a/resource-manager/vmware/2022-05-01/locations/version.go +++ b/resource-manager/vmware/2022-05-01/locations/version.go @@ -1,12 +1,10 @@ package locations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locations/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/README.md b/resource-manager/vmware/2022-05-01/placementpolicies/README.md index 113fca90b97..2b36cf01131 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/README.md +++ b/resource-manager/vmware/2022-05-01/placementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/placementpolicies` Documentation -The `placementpolicies` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `placementpolicies` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/client.go b/resource-manager/vmware/2022-05-01/placementpolicies/client.go index d2826398ee4..e0f20f1e124 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/client.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/client.go @@ -15,7 +15,7 @@ type PlacementPoliciesClient struct { } func NewPlacementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PlacementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "placementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "placementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PlacementPoliciesClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/id_cluster.go b/resource-manager/vmware/2022-05-01/placementpolicies/id_cluster.go index 3c0f057192d..ec243be999e 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/id_placementpolicy.go b/resource-manager/vmware/2022-05-01/placementpolicies/id_placementpolicy.go index b5fdf601f13..9d59cac38bf 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/id_placementpolicy.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/id_placementpolicy.go @@ -46,7 +46,7 @@ func ParsePlacementPolicyID(input string) (*PlacementPolicyId, error) { } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePlacementPolicyIDInsensitively(input string) (*PlacementPolicyId, erro } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/id_virtualmachine.go b/resource-manager/vmware/2022-05-01/placementpolicies/id_virtualmachine.go index efb660d3d8c..a299f069a31 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/id_virtualmachine.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/id_virtualmachine.go @@ -46,7 +46,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/method_get.go b/resource-manager/vmware/2022-05-01/placementpolicies/method_get.go index c12796352fb..62e0654504d 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/method_get.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/method_get.go @@ -45,7 +45,6 @@ func (c PlacementPoliciesClient) Get(ctx context.Context, id PlacementPolicyId) var model PlacementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicy.go b/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicy.go index d625935c742..e56b071c92e 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicy.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicy.go @@ -34,7 +34,7 @@ func (s *PlacementPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalPlacementPolicyPropertiesImplementation(v) + impl, err := UnmarshalPlacementPolicyPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'PlacementPolicy': %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicyproperties.go b/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicyproperties.go index 24caae385b0..b749b6965cd 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicyproperties.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/model_placementpolicyproperties.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlacementPolicyProperties interface { + PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl } -// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlacementPolicyProperties = BasePlacementPolicyPropertiesImpl{} + +type BasePlacementPolicyPropertiesImpl struct { + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` + State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s BasePlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s +} + +var _ PlacementPolicyProperties = RawPlacementPolicyPropertiesImpl{} + +// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlacementPolicyPropertiesImpl struct { - Type string - Values map[string]interface{} + placementPolicyProperties BasePlacementPolicyPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawPlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s.placementPolicyProperties } -func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { +func UnmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPo return out, nil } - out := RawPlacementPolicyPropertiesImpl{ - Type: value, - Values: temp, + var parent BasePlacementPolicyPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlacementPolicyPropertiesImpl: %+v", err) } - return out, nil + + return RawPlacementPolicyPropertiesImpl{ + placementPolicyProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/model_vmhostplacementpolicyproperties.go b/resource-manager/vmware/2022-05-01/placementpolicies/model_vmhostplacementpolicyproperties.go index 8d639d51812..0dcff67bdb2 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/model_vmhostplacementpolicyproperties.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/model_vmhostplacementpolicyproperties.go @@ -18,9 +18,20 @@ type VMHostPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMHostPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMHostPlacementPolicyProperties{} @@ -34,9 +45,10 @@ func (s VMHostPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMHostPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmHost" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/model_vmvmplacementpolicyproperties.go b/resource-manager/vmware/2022-05-01/placementpolicies/model_vmvmplacementpolicyproperties.go index 6dfa270ce79..a0978a0be18 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/model_vmvmplacementpolicyproperties.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/model_vmvmplacementpolicyproperties.go @@ -15,9 +15,20 @@ type VMVMPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMVMPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMVMPlacementPolicyProperties{} @@ -31,9 +42,10 @@ func (s VMVMPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMVMPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmVm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/placementpolicies/version.go b/resource-manager/vmware/2022-05-01/placementpolicies/version.go index 142d3455f9e..bc87f700002 100644 --- a/resource-manager/vmware/2022-05-01/placementpolicies/version.go +++ b/resource-manager/vmware/2022-05-01/placementpolicies/version.go @@ -1,12 +1,10 @@ package placementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/placementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/placementpolicies/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/privateclouds/README.md b/resource-manager/vmware/2022-05-01/privateclouds/README.md index 3e4879d4dba..ec515470742 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/README.md +++ b/resource-manager/vmware/2022-05-01/privateclouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/privateclouds` Documentation -The `privateclouds` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `privateclouds` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/privateclouds/client.go b/resource-manager/vmware/2022-05-01/privateclouds/client.go index bb7f3721d68..2b558abf0f0 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/client.go +++ b/resource-manager/vmware/2022-05-01/privateclouds/client.go @@ -15,7 +15,7 @@ type PrivateCloudsClient struct { } func NewPrivateCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateCloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateclouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateclouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateCloudsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go b/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go index d9efed3220d..020de5e6b67 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/privateclouds/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/privateclouds/method_get.go b/resource-manager/vmware/2022-05-01/privateclouds/method_get.go index 7bfc93ae86b..32e6f21c120 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/method_get.go +++ b/resource-manager/vmware/2022-05-01/privateclouds/method_get.go @@ -45,7 +45,6 @@ func (c PrivateCloudsClient) Get(ctx context.Context, id PrivateCloudId) (result var model PrivateCloud result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/privateclouds/method_listadmincredentials.go b/resource-manager/vmware/2022-05-01/privateclouds/method_listadmincredentials.go index 7c7a8adb980..64073981caa 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/method_listadmincredentials.go +++ b/resource-manager/vmware/2022-05-01/privateclouds/method_listadmincredentials.go @@ -46,7 +46,6 @@ func (c PrivateCloudsClient) ListAdminCredentials(ctx context.Context, id Privat var model AdminCredentials result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/privateclouds/version.go b/resource-manager/vmware/2022-05-01/privateclouds/version.go index f8490901030..ce49c5dbd17 100644 --- a/resource-manager/vmware/2022-05-01/privateclouds/version.go +++ b/resource-manager/vmware/2022-05-01/privateclouds/version.go @@ -1,12 +1,10 @@ package privateclouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateclouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateclouds/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/scripts/README.md b/resource-manager/vmware/2022-05-01/scripts/README.md index 2e511b9f887..faef095c5ff 100644 --- a/resource-manager/vmware/2022-05-01/scripts/README.md +++ b/resource-manager/vmware/2022-05-01/scripts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/scripts` Documentation -The `scripts` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `scripts` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/scripts/client.go b/resource-manager/vmware/2022-05-01/scripts/client.go index a4b2e43918a..6ef58a49ba4 100644 --- a/resource-manager/vmware/2022-05-01/scripts/client.go +++ b/resource-manager/vmware/2022-05-01/scripts/client.go @@ -15,7 +15,7 @@ type ScriptsClient struct { } func NewScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scripts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scripts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptsClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/scripts/id_privatecloud.go b/resource-manager/vmware/2022-05-01/scripts/id_privatecloud.go index 7f9b6e039ca..5c4e4acf9b2 100644 --- a/resource-manager/vmware/2022-05-01/scripts/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/scripts/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/scripts/id_scriptcmdlet.go b/resource-manager/vmware/2022-05-01/scripts/id_scriptcmdlet.go index d2959345b4e..1d7e4e5d22d 100644 --- a/resource-manager/vmware/2022-05-01/scripts/id_scriptcmdlet.go +++ b/resource-manager/vmware/2022-05-01/scripts/id_scriptcmdlet.go @@ -46,7 +46,7 @@ func ParseScriptCmdletID(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScriptCmdletIDInsensitively(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/scripts/id_scriptexecution.go b/resource-manager/vmware/2022-05-01/scripts/id_scriptexecution.go index e4bab886afc..30ccab3093e 100644 --- a/resource-manager/vmware/2022-05-01/scripts/id_scriptexecution.go +++ b/resource-manager/vmware/2022-05-01/scripts/id_scriptexecution.go @@ -44,7 +44,7 @@ func ParseScriptExecutionID(input string) (*ScriptExecutionId, error) { } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptExecutionIDInsensitively(input string) (*ScriptExecutionId, erro } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/scripts/id_scriptpackage.go b/resource-manager/vmware/2022-05-01/scripts/id_scriptpackage.go index 607f9ea01bc..a18a06b22d8 100644 --- a/resource-manager/vmware/2022-05-01/scripts/id_scriptpackage.go +++ b/resource-manager/vmware/2022-05-01/scripts/id_scriptpackage.go @@ -44,7 +44,7 @@ func ParseScriptPackageID(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptPackageIDInsensitively(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/scripts/method_scriptcmdletsget.go b/resource-manager/vmware/2022-05-01/scripts/method_scriptcmdletsget.go index ac1d3ca1856..07ed7a4439c 100644 --- a/resource-manager/vmware/2022-05-01/scripts/method_scriptcmdletsget.go +++ b/resource-manager/vmware/2022-05-01/scripts/method_scriptcmdletsget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptCmdletsGet(ctx context.Context, id ScriptCmdletId) var model ScriptCmdlet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsget.go b/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsget.go index c3fc58c83ae..7bcf19268aa 100644 --- a/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsget.go +++ b/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptExecutionsGet(ctx context.Context, id ScriptExecuti var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsgetexecutionlogs.go b/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsgetexecutionlogs.go index 3303233a585..49e2cf26e33 100644 --- a/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsgetexecutionlogs.go +++ b/resource-manager/vmware/2022-05-01/scripts/method_scriptexecutionsgetexecutionlogs.go @@ -50,7 +50,6 @@ func (c ScriptsClient) ScriptExecutionsGetExecutionLogs(ctx context.Context, id var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/scripts/method_scriptpackagesget.go b/resource-manager/vmware/2022-05-01/scripts/method_scriptpackagesget.go index bcd1e653e41..129265d6861 100644 --- a/resource-manager/vmware/2022-05-01/scripts/method_scriptpackagesget.go +++ b/resource-manager/vmware/2022-05-01/scripts/method_scriptpackagesget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptPackagesGet(ctx context.Context, id ScriptPackageId var model ScriptPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/scripts/model_pscredentialexecutionparameter.go b/resource-manager/vmware/2022-05-01/scripts/model_pscredentialexecutionparameter.go index 49c25319088..fe9129991c1 100644 --- a/resource-manager/vmware/2022-05-01/scripts/model_pscredentialexecutionparameter.go +++ b/resource-manager/vmware/2022-05-01/scripts/model_pscredentialexecutionparameter.go @@ -15,7 +15,16 @@ type PSCredentialExecutionParameter struct { Username *string `json:"username,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s PSCredentialExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = PSCredentialExecutionParameter{} @@ -29,9 +38,10 @@ func (s PSCredentialExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PSCredentialExecutionParameter: %+v", err) } + decoded["type"] = "Credential" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionparameter.go b/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionparameter.go index 90cd5975e65..28b82ea12c6 100644 --- a/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionparameter.go +++ b/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionparameter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScriptExecutionParameter interface { + ScriptExecutionParameter() BaseScriptExecutionParameterImpl } -// RawScriptExecutionParameterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScriptExecutionParameter = BaseScriptExecutionParameterImpl{} + +type BaseScriptExecutionParameterImpl struct { + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s BaseScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s +} + +var _ ScriptExecutionParameter = RawScriptExecutionParameterImpl{} + +// RawScriptExecutionParameterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScriptExecutionParameterImpl struct { - Type string - Values map[string]interface{} + scriptExecutionParameter BaseScriptExecutionParameterImpl + Type string + Values map[string]interface{} +} + +func (s RawScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s.scriptExecutionParameter } -func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { +func UnmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecut return out, nil } - out := RawScriptExecutionParameterImpl{ - Type: value, - Values: temp, + var parent BaseScriptExecutionParameterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScriptExecutionParameterImpl: %+v", err) } - return out, nil + + return RawScriptExecutionParameterImpl{ + scriptExecutionParameter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionproperties.go b/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionproperties.go index 7ddaa854d3e..e137e14db30 100644 --- a/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionproperties.go +++ b/resource-manager/vmware/2022-05-01/scripts/model_scriptexecutionproperties.go @@ -101,7 +101,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'HiddenParameters' for 'ScriptExecutionProperties': %+v", i, err) } @@ -118,7 +118,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Parameters' for 'ScriptExecutionProperties': %+v", i, err) } diff --git a/resource-manager/vmware/2022-05-01/scripts/model_scriptsecurestringexecutionparameter.go b/resource-manager/vmware/2022-05-01/scripts/model_scriptsecurestringexecutionparameter.go index e79ed46e990..5f60caf08d8 100644 --- a/resource-manager/vmware/2022-05-01/scripts/model_scriptsecurestringexecutionparameter.go +++ b/resource-manager/vmware/2022-05-01/scripts/model_scriptsecurestringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptSecureStringExecutionParameter struct { SecureValue *string `json:"secureValue,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptSecureStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptSecureStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptSecureStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptSecureStringExecutionParameter: %+v", err) } + decoded["type"] = "SecureValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/scripts/model_scriptstringexecutionparameter.go b/resource-manager/vmware/2022-05-01/scripts/model_scriptstringexecutionparameter.go index cee89771541..f2bd1e9dd01 100644 --- a/resource-manager/vmware/2022-05-01/scripts/model_scriptstringexecutionparameter.go +++ b/resource-manager/vmware/2022-05-01/scripts/model_scriptstringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptStringExecutionParameter struct { Value *string `json:"value,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptStringExecutionParameter: %+v", err) } + decoded["type"] = "Value" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/scripts/version.go b/resource-manager/vmware/2022-05-01/scripts/version.go index 4b7476209b8..49070b782ee 100644 --- a/resource-manager/vmware/2022-05-01/scripts/version.go +++ b/resource-manager/vmware/2022-05-01/scripts/version.go @@ -1,12 +1,10 @@ package scripts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scripts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scripts/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/README.md b/resource-manager/vmware/2022-05-01/virtualmachines/README.md index c5abec25100..2f87812f4c1 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/README.md +++ b/resource-manager/vmware/2022-05-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/client.go b/resource-manager/vmware/2022-05-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/client.go +++ b/resource-manager/vmware/2022-05-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/id_cluster.go b/resource-manager/vmware/2022-05-01/virtualmachines/id_cluster.go index 4cf29916510..4bdec5f3a03 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/virtualmachines/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/id_virtualmachine.go b/resource-manager/vmware/2022-05-01/virtualmachines/id_virtualmachine.go index b0fe35cad57..cfa14a3ac61 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/vmware/2022-05-01/virtualmachines/id_virtualmachine.go @@ -46,7 +46,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/method_get.go b/resource-manager/vmware/2022-05-01/virtualmachines/method_get.go index 05c63620238..b3c70a159d8 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/method_get.go +++ b/resource-manager/vmware/2022-05-01/virtualmachines/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId) (re var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/virtualmachines/version.go b/resource-manager/vmware/2022-05-01/virtualmachines/version.go index be9894a76a6..6aed58416c1 100644 --- a/resource-manager/vmware/2022-05-01/virtualmachines/version.go +++ b/resource-manager/vmware/2022-05-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/README.md b/resource-manager/vmware/2022-05-01/workloadnetworks/README.md index 681e2390b29..ca6348ecfb9 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/README.md +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/workloadnetworks` Documentation -The `workloadnetworks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `workloadnetworks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/client.go b/resource-manager/vmware/2022-05-01/workloadnetworks/client.go index 53d7aea2f37..ac5d4da4073 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/client.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/client.go @@ -15,7 +15,7 @@ type WorkloadNetworksClient struct { } func NewWorkloadNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworksClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_defaultvirtualmachine.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_defaultvirtualmachine.go index 6df42b64ea8..4cad783e6cc 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_defaultvirtualmachine.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_defaultvirtualmachine.go @@ -44,7 +44,7 @@ func ParseDefaultVirtualMachineID(input string) (*DefaultVirtualMachineId, error } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultVirtualMachineIDInsensitively(input string) (*DefaultVirtualMac } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dhcpconfiguration.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dhcpconfiguration.go index f67e766e601..bd1219d4c38 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dhcpconfiguration.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dhcpconfiguration.go @@ -44,7 +44,7 @@ func ParseDhcpConfigurationID(input string) (*DhcpConfigurationId, error) { } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDhcpConfigurationIDInsensitively(input string) (*DhcpConfigurationId, } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnsservice.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnsservice.go index feaab34563a..603e73d42b8 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnsservice.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnsservice.go @@ -44,7 +44,7 @@ func ParseDnsServiceID(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsServiceIDInsensitively(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnszone.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnszone.go index d2e4474663b..824007ab016 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnszone.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_dnszone.go @@ -44,7 +44,7 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_gateway.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_gateway.go index b7cbf3f2826..a78fc2a15a1 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_gateway.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_portmirroringprofile.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_portmirroringprofile.go index 96bd3500d8f..c1d13be496f 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_portmirroringprofile.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_portmirroringprofile.go @@ -44,7 +44,7 @@ func ParsePortMirroringProfileID(input string) (*PortMirroringProfileId, error) } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortMirroringProfileIDInsensitively(input string) (*PortMirroringProfi } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_privatecloud.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_privatecloud.go index 7da3d9aab95..b120b7f87e2 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_privatecloud.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_publicip.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_publicip.go index f17f54bd120..11e964ab8b9 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_publicip.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_publicip.go @@ -44,7 +44,7 @@ func ParsePublicIPID(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicIPIDInsensitively(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_segment.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_segment.go index 2550e56b98e..f17d758e62d 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_segment.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_segment.go @@ -44,7 +44,7 @@ func ParseSegmentID(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSegmentIDInsensitively(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/id_vmgroup.go b/resource-manager/vmware/2022-05-01/workloadnetworks/id_vmgroup.go index ab62d168572..482b80e8186 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/id_vmgroup.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/id_vmgroup.go @@ -44,7 +44,7 @@ func ParseVMGroupID(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVMGroupIDInsensitively(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_get.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_get.go index 4a64ba9193f..1ff369f60db 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_get.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_get.go @@ -46,7 +46,6 @@ func (c WorkloadNetworksClient) Get(ctx context.Context, id PrivateCloudId) (res var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdhcp.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdhcp.go index 78bb2a4d18a..5ac374a0b9f 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdhcp.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdhcp.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDhcp(ctx context.Context, id DhcpConfiguratio var model WorkloadNetworkDhcp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnsservice.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnsservice.go index de0801057d7..ad42e6ea11d 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnsservice.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnsservice.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDnsService(ctx context.Context, id DnsService var model WorkloadNetworkDnsService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnszone.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnszone.go index d649ffe650e..4875f34adb0 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnszone.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getdnszone.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDnsZone(ctx context.Context, id DnsZoneId) (r var model WorkloadNetworkDnsZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getgateway.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getgateway.go index 4afc8831e8b..e2f992631d2 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getgateway.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getgateway.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetGateway(ctx context.Context, id GatewayId) (r var model WorkloadNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getportmirroring.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getportmirroring.go index 2fd7d5de4c4..4134c545e92 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getportmirroring.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getportmirroring.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetPortMirroring(ctx context.Context, id PortMir var model WorkloadNetworkPortMirroring result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getpublicip.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getpublicip.go index fb28dc5041f..64bafd88893 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getpublicip.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getpublicip.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetPublicIP(ctx context.Context, id PublicIPId) var model WorkloadNetworkPublicIP result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getsegment.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getsegment.go index eba7e41adfa..094e0e1d78d 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getsegment.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getsegment.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetSegment(ctx context.Context, id SegmentId) (r var model WorkloadNetworkSegment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvirtualmachine.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvirtualmachine.go index 25bd901f1c5..9c158060f2a 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvirtualmachine.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvirtualmachine.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetVirtualMachine(ctx context.Context, id Defaul var model WorkloadNetworkVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvmgroup.go b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvmgroup.go index 7a1d8d645ff..8e4b4de7a16 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvmgroup.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/method_getvmgroup.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetVMGroup(ctx context.Context, id VMGroupId) (r var model WorkloadNetworkVMGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcp.go b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcp.go index 40a95862e4d..19897f277a6 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcp.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcp.go @@ -34,7 +34,7 @@ func (s *WorkloadNetworkDhcp) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadNetworkDhcpEntityImplementation(v) + impl, err := UnmarshalWorkloadNetworkDhcpEntityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadNetworkDhcp': %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpentity.go b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpentity.go index a0f66ff60f7..1f3e98356fe 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpentity.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpentity.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadNetworkDhcpEntity interface { + WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl } -// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadNetworkDhcpEntity = BaseWorkloadNetworkDhcpEntityImpl{} + +type BaseWorkloadNetworkDhcpEntityImpl struct { + DhcpType DhcpTypeEnum `json:"dhcpType"` + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` + Revision *int64 `json:"revision,omitempty"` + Segments *[]string `json:"segments,omitempty"` +} + +func (s BaseWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s +} + +var _ WorkloadNetworkDhcpEntity = RawWorkloadNetworkDhcpEntityImpl{} + +// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadNetworkDhcpEntityImpl struct { - Type string - Values map[string]interface{} + workloadNetworkDhcpEntity BaseWorkloadNetworkDhcpEntityImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s.workloadNetworkDhcpEntity } -func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { +func UnmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNet return out, nil } - out := RawWorkloadNetworkDhcpEntityImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadNetworkDhcpEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadNetworkDhcpEntityImpl: %+v", err) } - return out, nil + + return RawWorkloadNetworkDhcpEntityImpl{ + workloadNetworkDhcpEntity: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcprelay.go b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcprelay.go index 41530820829..9597a0aad80 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcprelay.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcprelay.go @@ -14,12 +14,24 @@ type WorkloadNetworkDhcpRelay struct { ServerAddresses *[]string `json:"serverAddresses,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpRelay) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpRelay{} func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpRelay: %+v", err) } + decoded["dhcpType"] = "RELAY" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpserver.go b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpserver.go index 721ad81a03b..0df0cee1b23 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpserver.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/model_workloadnetworkdhcpserver.go @@ -15,12 +15,24 @@ type WorkloadNetworkDhcpServer struct { ServerAddress *string `json:"serverAddress,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpServer) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpServer{} func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpServer: %+v", err) } + decoded["dhcpType"] = "SERVER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2022-05-01/workloadnetworks/version.go b/resource-manager/vmware/2022-05-01/workloadnetworks/version.go index a83cfbd96d0..cf46f57e0b0 100644 --- a/resource-manager/vmware/2022-05-01/workloadnetworks/version.go +++ b/resource-manager/vmware/2022-05-01/workloadnetworks/version.go @@ -1,12 +1,10 @@ package workloadnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworks/2022-05-01" } diff --git a/resource-manager/vmware/2022-05-01/zone/README.md b/resource-manager/vmware/2022-05-01/zone/README.md index bdf82537c05..9e8fba1061c 100644 --- a/resource-manager/vmware/2022-05-01/zone/README.md +++ b/resource-manager/vmware/2022-05-01/zone/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/zone` Documentation -The `zone` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2022-05-01`). +The `zone` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2022-05-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2022-05-01/zone/client.go b/resource-manager/vmware/2022-05-01/zone/client.go index 2e73d611adc..27345e16e5b 100644 --- a/resource-manager/vmware/2022-05-01/zone/client.go +++ b/resource-manager/vmware/2022-05-01/zone/client.go @@ -15,7 +15,7 @@ type ZoneClient struct { } func NewZoneClientWithBaseURI(sdkApi sdkEnv.Api) (*ZoneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "zone", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "zone", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ZoneClient: %+v", err) } diff --git a/resource-manager/vmware/2022-05-01/zone/id_cluster.go b/resource-manager/vmware/2022-05-01/zone/id_cluster.go index 188f791e623..ebfd86818ae 100644 --- a/resource-manager/vmware/2022-05-01/zone/id_cluster.go +++ b/resource-manager/vmware/2022-05-01/zone/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2022-05-01/zone/method_clusterslistzones.go b/resource-manager/vmware/2022-05-01/zone/method_clusterslistzones.go index 0d018ba13fa..5e9cd21cb71 100644 --- a/resource-manager/vmware/2022-05-01/zone/method_clusterslistzones.go +++ b/resource-manager/vmware/2022-05-01/zone/method_clusterslistzones.go @@ -46,7 +46,6 @@ func (c ZoneClient) ClustersListZones(ctx context.Context, id ClusterId) (result var model ClusterZoneList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2022-05-01/zone/version.go b/resource-manager/vmware/2022-05-01/zone/version.go index 4a21178b518..b2e973d4382 100644 --- a/resource-manager/vmware/2022-05-01/zone/version.go +++ b/resource-manager/vmware/2022-05-01/zone/version.go @@ -1,12 +1,10 @@ package zone -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-05-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/zone/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/zone/2022-05-01" } diff --git a/resource-manager/vmware/2023-03-01/addons/README.md b/resource-manager/vmware/2023-03-01/addons/README.md index dec8e384c8f..193352a50d9 100644 --- a/resource-manager/vmware/2023-03-01/addons/README.md +++ b/resource-manager/vmware/2023-03-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/addons/client.go b/resource-manager/vmware/2023-03-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/vmware/2023-03-01/addons/client.go +++ b/resource-manager/vmware/2023-03-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/addons/id_addon.go b/resource-manager/vmware/2023-03-01/addons/id_addon.go index d677ac096b0..e910059ff68 100644 --- a/resource-manager/vmware/2023-03-01/addons/id_addon.go +++ b/resource-manager/vmware/2023-03-01/addons/id_addon.go @@ -44,7 +44,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/addons/id_privatecloud.go b/resource-manager/vmware/2023-03-01/addons/id_privatecloud.go index f798b48647c..38bac9a28c3 100644 --- a/resource-manager/vmware/2023-03-01/addons/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/addons/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/addons/method_get.go b/resource-manager/vmware/2023-03-01/addons/method_get.go index a9a36357935..f1aced6a637 100644 --- a/resource-manager/vmware/2023-03-01/addons/method_get.go +++ b/resource-manager/vmware/2023-03-01/addons/method_get.go @@ -45,7 +45,6 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR var model Addon result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/addons/model_addon.go b/resource-manager/vmware/2023-03-01/addons/model_addon.go index b09855c9550..cd7f7f322a9 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addon.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addon.go @@ -34,7 +34,7 @@ func (s *Addon) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAddonPropertiesImplementation(v) + impl, err := UnmarshalAddonPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Addon': %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/addons/model_addonarcproperties.go b/resource-manager/vmware/2023-03-01/addons/model_addonarcproperties.go index 3067d4ac170..b508ee63ea5 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addonarcproperties.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addonarcproperties.go @@ -14,9 +14,18 @@ type AddonArcProperties struct { VCenter *string `json:"vCenter,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonArcProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonArcProperties{} func (s AddonArcProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonArcProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonArcProperties: %+v", err) } + decoded["addonType"] = "Arc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/addons/model_addonhcxproperties.go b/resource-manager/vmware/2023-03-01/addons/model_addonhcxproperties.go index a31858b1887..2baf17e5e87 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addonhcxproperties.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addonhcxproperties.go @@ -14,9 +14,18 @@ type AddonHcxProperties struct { Offer string `json:"offer"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonHcxProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonHcxProperties{} func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonHcxProperties: %+v", err) } + decoded["addonType"] = "HCX" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/addons/model_addonproperties.go b/resource-manager/vmware/2023-03-01/addons/model_addonproperties.go index cc9b498f212..734fe3fc139 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addonproperties.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addonproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddonProperties interface { + AddonProperties() BaseAddonPropertiesImpl } -// RawAddonPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddonProperties = BaseAddonPropertiesImpl{} + +type BaseAddonPropertiesImpl struct { + AddonType AddonType `json:"addonType"` + ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s +} + +var _ AddonProperties = RawAddonPropertiesImpl{} + +// RawAddonPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonPropertiesImpl struct { - Type string - Values map[string]interface{} + addonProperties BaseAddonPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s.addonProperties } -func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { +func UnmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { if input == nil { return nil, nil } @@ -68,10 +86,15 @@ func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, erro return out, nil } - out := RawAddonPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseAddonPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonPropertiesImpl: %+v", err) } - return out, nil + + return RawAddonPropertiesImpl{ + addonProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-03-01/addons/model_addonsrmproperties.go b/resource-manager/vmware/2023-03-01/addons/model_addonsrmproperties.go index 65f29909d3f..ba406dcc8cb 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addonsrmproperties.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addonsrmproperties.go @@ -14,9 +14,18 @@ type AddonSrmProperties struct { LicenseKey *string `json:"licenseKey,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonSrmProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonSrmProperties{} func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonSrmProperties: %+v", err) } + decoded["addonType"] = "SRM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/addons/model_addonvrproperties.go b/resource-manager/vmware/2023-03-01/addons/model_addonvrproperties.go index 2eb66a36285..89ea1d60e64 100644 --- a/resource-manager/vmware/2023-03-01/addons/model_addonvrproperties.go +++ b/resource-manager/vmware/2023-03-01/addons/model_addonvrproperties.go @@ -14,9 +14,18 @@ type AddonVrProperties struct { VrsCount int64 `json:"vrsCount"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonVrProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonVrProperties{} func (s AddonVrProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonVrProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonVrProperties: %+v", err) } + decoded["addonType"] = "VR" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/addons/version.go b/resource-manager/vmware/2023-03-01/addons/version.go index 53df7e1574a..b1a7ae6b5c9 100644 --- a/resource-manager/vmware/2023-03-01/addons/version.go +++ b/resource-manager/vmware/2023-03-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/authorizations/README.md b/resource-manager/vmware/2023-03-01/authorizations/README.md index 4268553ffdb..c7a73d6067e 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/README.md +++ b/resource-manager/vmware/2023-03-01/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/authorizations/client.go b/resource-manager/vmware/2023-03-01/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/client.go +++ b/resource-manager/vmware/2023-03-01/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/authorizations/id_authorization.go b/resource-manager/vmware/2023-03-01/authorizations/id_authorization.go index 75ef4f231db..3faa46b67aa 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/id_authorization.go +++ b/resource-manager/vmware/2023-03-01/authorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/authorizations/id_privatecloud.go b/resource-manager/vmware/2023-03-01/authorizations/id_privatecloud.go index a3c777162b9..ff8bbde6d4d 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/authorizations/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/authorizations/method_get.go b/resource-manager/vmware/2023-03-01/authorizations/method_get.go index e87d153ae04..4bc9d8ca240 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/method_get.go +++ b/resource-manager/vmware/2023-03-01/authorizations/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationsClient) Get(ctx context.Context, id AuthorizationId) (resu var model ExpressRouteAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/authorizations/version.go b/resource-manager/vmware/2023-03-01/authorizations/version.go index b0aee34cf3c..5a3775898ec 100644 --- a/resource-manager/vmware/2023-03-01/authorizations/version.go +++ b/resource-manager/vmware/2023-03-01/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/README.md b/resource-manager/vmware/2023-03-01/cloudlinks/README.md index 5cf8592dbfb..0e9407dfac9 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/README.md +++ b/resource-manager/vmware/2023-03-01/cloudlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/cloudlinks` Documentation -The `cloudlinks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `cloudlinks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/client.go b/resource-manager/vmware/2023-03-01/cloudlinks/client.go index e39385c28cb..b7bf5d6f417 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/client.go +++ b/resource-manager/vmware/2023-03-01/cloudlinks/client.go @@ -15,7 +15,7 @@ type CloudLinksClient struct { } func NewCloudLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudLinksClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/id_cloudlink.go b/resource-manager/vmware/2023-03-01/cloudlinks/id_cloudlink.go index 0e99632f979..5f0ce369dc0 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/id_cloudlink.go +++ b/resource-manager/vmware/2023-03-01/cloudlinks/id_cloudlink.go @@ -44,7 +44,7 @@ func ParseCloudLinkID(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCloudLinkIDInsensitively(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/id_privatecloud.go b/resource-manager/vmware/2023-03-01/cloudlinks/id_privatecloud.go index e6d18d81ff9..02c7175e8c9 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/cloudlinks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/method_get.go b/resource-manager/vmware/2023-03-01/cloudlinks/method_get.go index 335e9d0c2de..79d50f59a2b 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/method_get.go +++ b/resource-manager/vmware/2023-03-01/cloudlinks/method_get.go @@ -45,7 +45,6 @@ func (c CloudLinksClient) Get(ctx context.Context, id CloudLinkId) (result GetOp var model CloudLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/cloudlinks/version.go b/resource-manager/vmware/2023-03-01/cloudlinks/version.go index 502cb4b4d7f..d2ba6378635 100644 --- a/resource-manager/vmware/2023-03-01/cloudlinks/version.go +++ b/resource-manager/vmware/2023-03-01/cloudlinks/version.go @@ -1,12 +1,10 @@ package cloudlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudlinks/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/cluster/README.md b/resource-manager/vmware/2023-03-01/cluster/README.md index 1e7da361e45..b490fe81a75 100644 --- a/resource-manager/vmware/2023-03-01/cluster/README.md +++ b/resource-manager/vmware/2023-03-01/cluster/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/cluster` Documentation -The `cluster` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `cluster` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/cluster/client.go b/resource-manager/vmware/2023-03-01/cluster/client.go index 2a0e60ffb2b..dfc40b75394 100644 --- a/resource-manager/vmware/2023-03-01/cluster/client.go +++ b/resource-manager/vmware/2023-03-01/cluster/client.go @@ -15,7 +15,7 @@ type ClusterClient struct { } func NewClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*ClusterClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cluster", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cluster", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClusterClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/cluster/id_cluster.go b/resource-manager/vmware/2023-03-01/cluster/id_cluster.go index ee1febb96a0..28f11514e71 100644 --- a/resource-manager/vmware/2023-03-01/cluster/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/cluster/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/cluster/method_listzones.go b/resource-manager/vmware/2023-03-01/cluster/method_listzones.go index 3642aca0a90..0c253b7a499 100644 --- a/resource-manager/vmware/2023-03-01/cluster/method_listzones.go +++ b/resource-manager/vmware/2023-03-01/cluster/method_listzones.go @@ -46,7 +46,6 @@ func (c ClusterClient) ListZones(ctx context.Context, id ClusterId) (result List var model ClusterZoneList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/cluster/version.go b/resource-manager/vmware/2023-03-01/cluster/version.go index 2fb90cd0ae4..b5bf2501806 100644 --- a/resource-manager/vmware/2023-03-01/cluster/version.go +++ b/resource-manager/vmware/2023-03-01/cluster/version.go @@ -1,12 +1,10 @@ package cluster -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cluster/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cluster/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/clusters/README.md b/resource-manager/vmware/2023-03-01/clusters/README.md index 2cca709c5bd..7ee491fc4a7 100644 --- a/resource-manager/vmware/2023-03-01/clusters/README.md +++ b/resource-manager/vmware/2023-03-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/clusters/client.go b/resource-manager/vmware/2023-03-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/vmware/2023-03-01/clusters/client.go +++ b/resource-manager/vmware/2023-03-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/clusters/id_cluster.go b/resource-manager/vmware/2023-03-01/clusters/id_cluster.go index e6090e86f8c..1b6178dbe70 100644 --- a/resource-manager/vmware/2023-03-01/clusters/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/clusters/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/clusters/id_privatecloud.go b/resource-manager/vmware/2023-03-01/clusters/id_privatecloud.go index 3d7e9c19d02..1564735e072 100644 --- a/resource-manager/vmware/2023-03-01/clusters/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/clusters/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/clusters/method_get.go b/resource-manager/vmware/2023-03-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/vmware/2023-03-01/clusters/method_get.go +++ b/resource-manager/vmware/2023-03-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/clusters/version.go b/resource-manager/vmware/2023-03-01/clusters/version.go index d4cffd53a1e..2a200630154 100644 --- a/resource-manager/vmware/2023-03-01/clusters/version.go +++ b/resource-manager/vmware/2023-03-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/datastores/README.md b/resource-manager/vmware/2023-03-01/datastores/README.md index 4ee8a5f655d..8c3ae5fad2a 100644 --- a/resource-manager/vmware/2023-03-01/datastores/README.md +++ b/resource-manager/vmware/2023-03-01/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `datastores` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/datastores/client.go b/resource-manager/vmware/2023-03-01/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/vmware/2023-03-01/datastores/client.go +++ b/resource-manager/vmware/2023-03-01/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/datastores/id_cluster.go b/resource-manager/vmware/2023-03-01/datastores/id_cluster.go index 147c507bd14..0c4054b1cf2 100644 --- a/resource-manager/vmware/2023-03-01/datastores/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/datastores/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/datastores/id_datastore.go b/resource-manager/vmware/2023-03-01/datastores/id_datastore.go index c4986961643..6f081b3d1fe 100644 --- a/resource-manager/vmware/2023-03-01/datastores/id_datastore.go +++ b/resource-manager/vmware/2023-03-01/datastores/id_datastore.go @@ -46,7 +46,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/datastores/method_get.go b/resource-manager/vmware/2023-03-01/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/vmware/2023-03-01/datastores/method_get.go +++ b/resource-manager/vmware/2023-03-01/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/datastores/version.go b/resource-manager/vmware/2023-03-01/datastores/version.go index 52de7cbb0aa..621ab42a76f 100644 --- a/resource-manager/vmware/2023-03-01/datastores/version.go +++ b/resource-manager/vmware/2023-03-01/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/README.md b/resource-manager/vmware/2023-03-01/globalreachconnections/README.md index 5af777d4a4a..050363ae70b 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/README.md +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/globalreachconnections` Documentation -The `globalreachconnections` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `globalreachconnections` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/client.go b/resource-manager/vmware/2023-03-01/globalreachconnections/client.go index a8a16b0e7fb..425e0d66528 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/client.go +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/client.go @@ -15,7 +15,7 @@ type GlobalReachConnectionsClient struct { } func NewGlobalReachConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalReachConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalreachconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalreachconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalReachConnectionsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/id_globalreachconnection.go b/resource-manager/vmware/2023-03-01/globalreachconnections/id_globalreachconnection.go index 07b31044b01..bf7812a9856 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/id_globalreachconnection.go +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/id_globalreachconnection.go @@ -44,7 +44,7 @@ func ParseGlobalReachConnectionID(input string) (*GlobalReachConnectionId, error } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGlobalReachConnectionIDInsensitively(input string) (*GlobalReachConnec } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/id_privatecloud.go b/resource-manager/vmware/2023-03-01/globalreachconnections/id_privatecloud.go index 052977121d7..2a51e7765a5 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/method_get.go b/resource-manager/vmware/2023-03-01/globalreachconnections/method_get.go index 5c2581a3794..eb2c4519d12 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/method_get.go +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/method_get.go @@ -45,7 +45,6 @@ func (c GlobalReachConnectionsClient) Get(ctx context.Context, id GlobalReachCon var model GlobalReachConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/globalreachconnections/version.go b/resource-manager/vmware/2023-03-01/globalreachconnections/version.go index 29042ec0f35..748bcead261 100644 --- a/resource-manager/vmware/2023-03-01/globalreachconnections/version.go +++ b/resource-manager/vmware/2023-03-01/globalreachconnections/version.go @@ -1,12 +1,10 @@ package globalreachconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalreachconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalreachconnections/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/README.md b/resource-manager/vmware/2023-03-01/hcxenterprisesites/README.md index 9537c8dae33..3f62ca17f31 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/README.md +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/hcxenterprisesites` Documentation -The `hcxenterprisesites` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `hcxenterprisesites` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/client.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/client.go index d710a7ca347..c765176b8d3 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/client.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/client.go @@ -15,7 +15,7 @@ type HcxEnterpriseSitesClient struct { } func NewHcxEnterpriseSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HcxEnterpriseSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hcxenterprisesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hcxenterprisesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HcxEnterpriseSitesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_hcxenterprisesite.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_hcxenterprisesite.go index f00cae82d5a..a8b62beb9c4 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_hcxenterprisesite.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_hcxenterprisesite.go @@ -44,7 +44,7 @@ func ParseHcxEnterpriseSiteID(input string) (*HcxEnterpriseSiteId, error) { } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHcxEnterpriseSiteIDInsensitively(input string) (*HcxEnterpriseSiteId, } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_privatecloud.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_privatecloud.go index e4fb064beb9..96919ac7c07 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_createorupdate.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_createorupdate.go index eea78ab7268..a10de033534 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_createorupdate.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, id HcxEnte var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_get.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_get.go index df7bb8f9596..4e4bfd70efa 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_get.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/method_get.go @@ -45,7 +45,6 @@ func (c HcxEnterpriseSitesClient) Get(ctx context.Context, id HcxEnterpriseSiteI var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/hcxenterprisesites/version.go b/resource-manager/vmware/2023-03-01/hcxenterprisesites/version.go index c70faa482e5..f0fd38b97b6 100644 --- a/resource-manager/vmware/2023-03-01/hcxenterprisesites/version.go +++ b/resource-manager/vmware/2023-03-01/hcxenterprisesites/version.go @@ -1,12 +1,10 @@ package hcxenterprisesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hcxenterprisesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hcxenterprisesites/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/locations/README.md b/resource-manager/vmware/2023-03-01/locations/README.md index 65b9dca75fe..9422d074602 100644 --- a/resource-manager/vmware/2023-03-01/locations/README.md +++ b/resource-manager/vmware/2023-03-01/locations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/locations` Documentation -The `locations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `locations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/locations/client.go b/resource-manager/vmware/2023-03-01/locations/client.go index a9a14613b89..57102dca10e 100644 --- a/resource-manager/vmware/2023-03-01/locations/client.go +++ b/resource-manager/vmware/2023-03-01/locations/client.go @@ -15,7 +15,7 @@ type LocationsClient struct { } func NewLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/locations/id_location.go b/resource-manager/vmware/2023-03-01/locations/id_location.go index c08afd589d2..6a83cff80fc 100644 --- a/resource-manager/vmware/2023-03-01/locations/id_location.go +++ b/resource-manager/vmware/2023-03-01/locations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/locations/method_checkquotaavailability.go b/resource-manager/vmware/2023-03-01/locations/method_checkquotaavailability.go index 9bbb8b9d5ba..6f12d1ff069 100644 --- a/resource-manager/vmware/2023-03-01/locations/method_checkquotaavailability.go +++ b/resource-manager/vmware/2023-03-01/locations/method_checkquotaavailability.go @@ -46,7 +46,6 @@ func (c LocationsClient) CheckQuotaAvailability(ctx context.Context, id Location var model Quota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/locations/method_checktrialavailability.go b/resource-manager/vmware/2023-03-01/locations/method_checktrialavailability.go index d92e12141b9..272a34a6b64 100644 --- a/resource-manager/vmware/2023-03-01/locations/method_checktrialavailability.go +++ b/resource-manager/vmware/2023-03-01/locations/method_checktrialavailability.go @@ -50,7 +50,6 @@ func (c LocationsClient) CheckTrialAvailability(ctx context.Context, id Location var model Trial result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/locations/version.go b/resource-manager/vmware/2023-03-01/locations/version.go index b16962a431a..ef8232a595f 100644 --- a/resource-manager/vmware/2023-03-01/locations/version.go +++ b/resource-manager/vmware/2023-03-01/locations/version.go @@ -1,12 +1,10 @@ package locations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locations/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/README.md b/resource-manager/vmware/2023-03-01/placementpolicies/README.md index 6e0dffe95fb..a1156fa7d52 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/README.md +++ b/resource-manager/vmware/2023-03-01/placementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/placementpolicies` Documentation -The `placementpolicies` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `placementpolicies` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/client.go b/resource-manager/vmware/2023-03-01/placementpolicies/client.go index d2826398ee4..e0f20f1e124 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/client.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/client.go @@ -15,7 +15,7 @@ type PlacementPoliciesClient struct { } func NewPlacementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PlacementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "placementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "placementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PlacementPoliciesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/id_cluster.go b/resource-manager/vmware/2023-03-01/placementpolicies/id_cluster.go index 3c0f057192d..ec243be999e 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/id_placementpolicy.go b/resource-manager/vmware/2023-03-01/placementpolicies/id_placementpolicy.go index b5fdf601f13..9d59cac38bf 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/id_placementpolicy.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/id_placementpolicy.go @@ -46,7 +46,7 @@ func ParsePlacementPolicyID(input string) (*PlacementPolicyId, error) { } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePlacementPolicyIDInsensitively(input string) (*PlacementPolicyId, erro } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/id_virtualmachine.go b/resource-manager/vmware/2023-03-01/placementpolicies/id_virtualmachine.go index efb660d3d8c..a299f069a31 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/id_virtualmachine.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/id_virtualmachine.go @@ -46,7 +46,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/method_get.go b/resource-manager/vmware/2023-03-01/placementpolicies/method_get.go index c12796352fb..62e0654504d 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/method_get.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/method_get.go @@ -45,7 +45,6 @@ func (c PlacementPoliciesClient) Get(ctx context.Context, id PlacementPolicyId) var model PlacementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicy.go b/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicy.go index d625935c742..e56b071c92e 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicy.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicy.go @@ -34,7 +34,7 @@ func (s *PlacementPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalPlacementPolicyPropertiesImplementation(v) + impl, err := UnmarshalPlacementPolicyPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'PlacementPolicy': %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicyproperties.go b/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicyproperties.go index 24caae385b0..b749b6965cd 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicyproperties.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/model_placementpolicyproperties.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlacementPolicyProperties interface { + PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl } -// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlacementPolicyProperties = BasePlacementPolicyPropertiesImpl{} + +type BasePlacementPolicyPropertiesImpl struct { + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` + State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s BasePlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s +} + +var _ PlacementPolicyProperties = RawPlacementPolicyPropertiesImpl{} + +// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlacementPolicyPropertiesImpl struct { - Type string - Values map[string]interface{} + placementPolicyProperties BasePlacementPolicyPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawPlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s.placementPolicyProperties } -func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { +func UnmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPo return out, nil } - out := RawPlacementPolicyPropertiesImpl{ - Type: value, - Values: temp, + var parent BasePlacementPolicyPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlacementPolicyPropertiesImpl: %+v", err) } - return out, nil + + return RawPlacementPolicyPropertiesImpl{ + placementPolicyProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/model_vmhostplacementpolicyproperties.go b/resource-manager/vmware/2023-03-01/placementpolicies/model_vmhostplacementpolicyproperties.go index 8d639d51812..0dcff67bdb2 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/model_vmhostplacementpolicyproperties.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/model_vmhostplacementpolicyproperties.go @@ -18,9 +18,20 @@ type VMHostPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMHostPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMHostPlacementPolicyProperties{} @@ -34,9 +45,10 @@ func (s VMHostPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMHostPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmHost" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/model_vmvmplacementpolicyproperties.go b/resource-manager/vmware/2023-03-01/placementpolicies/model_vmvmplacementpolicyproperties.go index 6dfa270ce79..a0978a0be18 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/model_vmvmplacementpolicyproperties.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/model_vmvmplacementpolicyproperties.go @@ -15,9 +15,20 @@ type VMVMPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMVMPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMVMPlacementPolicyProperties{} @@ -31,9 +42,10 @@ func (s VMVMPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMVMPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmVm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/placementpolicies/version.go b/resource-manager/vmware/2023-03-01/placementpolicies/version.go index 14fcc8f29af..0033a02fa68 100644 --- a/resource-manager/vmware/2023-03-01/placementpolicies/version.go +++ b/resource-manager/vmware/2023-03-01/placementpolicies/version.go @@ -1,12 +1,10 @@ package placementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/placementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/placementpolicies/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/privateclouds/README.md b/resource-manager/vmware/2023-03-01/privateclouds/README.md index 331cf5c7cb3..468047e075e 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/README.md +++ b/resource-manager/vmware/2023-03-01/privateclouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/privateclouds` Documentation -The `privateclouds` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `privateclouds` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/privateclouds/client.go b/resource-manager/vmware/2023-03-01/privateclouds/client.go index bb7f3721d68..2b558abf0f0 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/client.go +++ b/resource-manager/vmware/2023-03-01/privateclouds/client.go @@ -15,7 +15,7 @@ type PrivateCloudsClient struct { } func NewPrivateCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateCloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateclouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateclouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateCloudsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/privateclouds/id_privatecloud.go b/resource-manager/vmware/2023-03-01/privateclouds/id_privatecloud.go index d9efed3220d..020de5e6b67 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/privateclouds/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/privateclouds/method_get.go b/resource-manager/vmware/2023-03-01/privateclouds/method_get.go index 7bfc93ae86b..32e6f21c120 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/method_get.go +++ b/resource-manager/vmware/2023-03-01/privateclouds/method_get.go @@ -45,7 +45,6 @@ func (c PrivateCloudsClient) Get(ctx context.Context, id PrivateCloudId) (result var model PrivateCloud result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/privateclouds/method_listadmincredentials.go b/resource-manager/vmware/2023-03-01/privateclouds/method_listadmincredentials.go index 7c7a8adb980..64073981caa 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/method_listadmincredentials.go +++ b/resource-manager/vmware/2023-03-01/privateclouds/method_listadmincredentials.go @@ -46,7 +46,6 @@ func (c PrivateCloudsClient) ListAdminCredentials(ctx context.Context, id Privat var model AdminCredentials result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/privateclouds/version.go b/resource-manager/vmware/2023-03-01/privateclouds/version.go index 91bc5886dda..cefbc6614e7 100644 --- a/resource-manager/vmware/2023-03-01/privateclouds/version.go +++ b/resource-manager/vmware/2023-03-01/privateclouds/version.go @@ -1,12 +1,10 @@ package privateclouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateclouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateclouds/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/scripts/README.md b/resource-manager/vmware/2023-03-01/scripts/README.md index d60b8b93efc..ad34ff063a3 100644 --- a/resource-manager/vmware/2023-03-01/scripts/README.md +++ b/resource-manager/vmware/2023-03-01/scripts/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/scripts` Documentation -The `scripts` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `scripts` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/scripts/client.go b/resource-manager/vmware/2023-03-01/scripts/client.go index a4b2e43918a..6ef58a49ba4 100644 --- a/resource-manager/vmware/2023-03-01/scripts/client.go +++ b/resource-manager/vmware/2023-03-01/scripts/client.go @@ -15,7 +15,7 @@ type ScriptsClient struct { } func NewScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scripts", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scripts", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/scripts/id_privatecloud.go b/resource-manager/vmware/2023-03-01/scripts/id_privatecloud.go index 7f9b6e039ca..5c4e4acf9b2 100644 --- a/resource-manager/vmware/2023-03-01/scripts/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/scripts/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/scripts/id_scriptcmdlet.go b/resource-manager/vmware/2023-03-01/scripts/id_scriptcmdlet.go index d2959345b4e..1d7e4e5d22d 100644 --- a/resource-manager/vmware/2023-03-01/scripts/id_scriptcmdlet.go +++ b/resource-manager/vmware/2023-03-01/scripts/id_scriptcmdlet.go @@ -46,7 +46,7 @@ func ParseScriptCmdletID(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScriptCmdletIDInsensitively(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/scripts/id_scriptexecution.go b/resource-manager/vmware/2023-03-01/scripts/id_scriptexecution.go index e4bab886afc..30ccab3093e 100644 --- a/resource-manager/vmware/2023-03-01/scripts/id_scriptexecution.go +++ b/resource-manager/vmware/2023-03-01/scripts/id_scriptexecution.go @@ -44,7 +44,7 @@ func ParseScriptExecutionID(input string) (*ScriptExecutionId, error) { } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptExecutionIDInsensitively(input string) (*ScriptExecutionId, erro } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/scripts/id_scriptpackage.go b/resource-manager/vmware/2023-03-01/scripts/id_scriptpackage.go index 607f9ea01bc..a18a06b22d8 100644 --- a/resource-manager/vmware/2023-03-01/scripts/id_scriptpackage.go +++ b/resource-manager/vmware/2023-03-01/scripts/id_scriptpackage.go @@ -44,7 +44,7 @@ func ParseScriptPackageID(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptPackageIDInsensitively(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/scripts/method_scriptcmdletsget.go b/resource-manager/vmware/2023-03-01/scripts/method_scriptcmdletsget.go index ac1d3ca1856..07ed7a4439c 100644 --- a/resource-manager/vmware/2023-03-01/scripts/method_scriptcmdletsget.go +++ b/resource-manager/vmware/2023-03-01/scripts/method_scriptcmdletsget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptCmdletsGet(ctx context.Context, id ScriptCmdletId) var model ScriptCmdlet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsget.go b/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsget.go index c3fc58c83ae..7bcf19268aa 100644 --- a/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsget.go +++ b/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptExecutionsGet(ctx context.Context, id ScriptExecuti var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsgetexecutionlogs.go b/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsgetexecutionlogs.go index 3303233a585..49e2cf26e33 100644 --- a/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsgetexecutionlogs.go +++ b/resource-manager/vmware/2023-03-01/scripts/method_scriptexecutionsgetexecutionlogs.go @@ -50,7 +50,6 @@ func (c ScriptsClient) ScriptExecutionsGetExecutionLogs(ctx context.Context, id var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/scripts/method_scriptpackagesget.go b/resource-manager/vmware/2023-03-01/scripts/method_scriptpackagesget.go index bcd1e653e41..129265d6861 100644 --- a/resource-manager/vmware/2023-03-01/scripts/method_scriptpackagesget.go +++ b/resource-manager/vmware/2023-03-01/scripts/method_scriptpackagesget.go @@ -45,7 +45,6 @@ func (c ScriptsClient) ScriptPackagesGet(ctx context.Context, id ScriptPackageId var model ScriptPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/scripts/model_pscredentialexecutionparameter.go b/resource-manager/vmware/2023-03-01/scripts/model_pscredentialexecutionparameter.go index 49c25319088..fe9129991c1 100644 --- a/resource-manager/vmware/2023-03-01/scripts/model_pscredentialexecutionparameter.go +++ b/resource-manager/vmware/2023-03-01/scripts/model_pscredentialexecutionparameter.go @@ -15,7 +15,16 @@ type PSCredentialExecutionParameter struct { Username *string `json:"username,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s PSCredentialExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = PSCredentialExecutionParameter{} @@ -29,9 +38,10 @@ func (s PSCredentialExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PSCredentialExecutionParameter: %+v", err) } + decoded["type"] = "Credential" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionparameter.go b/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionparameter.go index 90cd5975e65..28b82ea12c6 100644 --- a/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionparameter.go +++ b/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionparameter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScriptExecutionParameter interface { + ScriptExecutionParameter() BaseScriptExecutionParameterImpl } -// RawScriptExecutionParameterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScriptExecutionParameter = BaseScriptExecutionParameterImpl{} + +type BaseScriptExecutionParameterImpl struct { + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s BaseScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s +} + +var _ ScriptExecutionParameter = RawScriptExecutionParameterImpl{} + +// RawScriptExecutionParameterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScriptExecutionParameterImpl struct { - Type string - Values map[string]interface{} + scriptExecutionParameter BaseScriptExecutionParameterImpl + Type string + Values map[string]interface{} +} + +func (s RawScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s.scriptExecutionParameter } -func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { +func UnmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecut return out, nil } - out := RawScriptExecutionParameterImpl{ - Type: value, - Values: temp, + var parent BaseScriptExecutionParameterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScriptExecutionParameterImpl: %+v", err) } - return out, nil + + return RawScriptExecutionParameterImpl{ + scriptExecutionParameter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionproperties.go b/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionproperties.go index 7ddaa854d3e..e137e14db30 100644 --- a/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionproperties.go +++ b/resource-manager/vmware/2023-03-01/scripts/model_scriptexecutionproperties.go @@ -101,7 +101,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'HiddenParameters' for 'ScriptExecutionProperties': %+v", i, err) } @@ -118,7 +118,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Parameters' for 'ScriptExecutionProperties': %+v", i, err) } diff --git a/resource-manager/vmware/2023-03-01/scripts/model_scriptsecurestringexecutionparameter.go b/resource-manager/vmware/2023-03-01/scripts/model_scriptsecurestringexecutionparameter.go index e79ed46e990..5f60caf08d8 100644 --- a/resource-manager/vmware/2023-03-01/scripts/model_scriptsecurestringexecutionparameter.go +++ b/resource-manager/vmware/2023-03-01/scripts/model_scriptsecurestringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptSecureStringExecutionParameter struct { SecureValue *string `json:"secureValue,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptSecureStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptSecureStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptSecureStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptSecureStringExecutionParameter: %+v", err) } + decoded["type"] = "SecureValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/scripts/model_scriptstringexecutionparameter.go b/resource-manager/vmware/2023-03-01/scripts/model_scriptstringexecutionparameter.go index cee89771541..f2bd1e9dd01 100644 --- a/resource-manager/vmware/2023-03-01/scripts/model_scriptstringexecutionparameter.go +++ b/resource-manager/vmware/2023-03-01/scripts/model_scriptstringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptStringExecutionParameter struct { Value *string `json:"value,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptStringExecutionParameter: %+v", err) } + decoded["type"] = "Value" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/scripts/version.go b/resource-manager/vmware/2023-03-01/scripts/version.go index 82f6f6e7ded..70cceb37685 100644 --- a/resource-manager/vmware/2023-03-01/scripts/version.go +++ b/resource-manager/vmware/2023-03-01/scripts/version.go @@ -1,12 +1,10 @@ package scripts -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scripts/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scripts/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/README.md b/resource-manager/vmware/2023-03-01/virtualmachines/README.md index 7a887d128f2..8fd057888f9 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/README.md +++ b/resource-manager/vmware/2023-03-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/client.go b/resource-manager/vmware/2023-03-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/client.go +++ b/resource-manager/vmware/2023-03-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/id_cluster.go b/resource-manager/vmware/2023-03-01/virtualmachines/id_cluster.go index 4cf29916510..4bdec5f3a03 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/virtualmachines/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/id_virtualmachine.go b/resource-manager/vmware/2023-03-01/virtualmachines/id_virtualmachine.go index b0fe35cad57..cfa14a3ac61 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/vmware/2023-03-01/virtualmachines/id_virtualmachine.go @@ -46,7 +46,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/method_get.go b/resource-manager/vmware/2023-03-01/virtualmachines/method_get.go index 05c63620238..b3c70a159d8 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/method_get.go +++ b/resource-manager/vmware/2023-03-01/virtualmachines/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId) (re var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/virtualmachines/version.go b/resource-manager/vmware/2023-03-01/virtualmachines/version.go index 0c70d647ac6..0a1b876ca37 100644 --- a/resource-manager/vmware/2023-03-01/virtualmachines/version.go +++ b/resource-manager/vmware/2023-03-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/README.md b/resource-manager/vmware/2023-03-01/workloadnetworks/README.md index fb17a40976c..fbebce84d79 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/README.md +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/workloadnetworks` Documentation -The `workloadnetworks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `workloadnetworks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/client.go b/resource-manager/vmware/2023-03-01/workloadnetworks/client.go index 53d7aea2f37..ac5d4da4073 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/client.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/client.go @@ -15,7 +15,7 @@ type WorkloadNetworksClient struct { } func NewWorkloadNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworksClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_defaultvirtualmachine.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_defaultvirtualmachine.go index 6df42b64ea8..4cad783e6cc 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_defaultvirtualmachine.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_defaultvirtualmachine.go @@ -44,7 +44,7 @@ func ParseDefaultVirtualMachineID(input string) (*DefaultVirtualMachineId, error } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultVirtualMachineIDInsensitively(input string) (*DefaultVirtualMac } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dhcpconfiguration.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dhcpconfiguration.go index f67e766e601..bd1219d4c38 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dhcpconfiguration.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dhcpconfiguration.go @@ -44,7 +44,7 @@ func ParseDhcpConfigurationID(input string) (*DhcpConfigurationId, error) { } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDhcpConfigurationIDInsensitively(input string) (*DhcpConfigurationId, } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnsservice.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnsservice.go index feaab34563a..603e73d42b8 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnsservice.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnsservice.go @@ -44,7 +44,7 @@ func ParseDnsServiceID(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsServiceIDInsensitively(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnszone.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnszone.go index d2e4474663b..824007ab016 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnszone.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_dnszone.go @@ -44,7 +44,7 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_gateway.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_gateway.go index b7cbf3f2826..a78fc2a15a1 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_gateway.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_portmirroringprofile.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_portmirroringprofile.go index 96bd3500d8f..c1d13be496f 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_portmirroringprofile.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_portmirroringprofile.go @@ -44,7 +44,7 @@ func ParsePortMirroringProfileID(input string) (*PortMirroringProfileId, error) } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortMirroringProfileIDInsensitively(input string) (*PortMirroringProfi } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_privatecloud.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_privatecloud.go index 7da3d9aab95..b120b7f87e2 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_privatecloud.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_publicip.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_publicip.go index f17f54bd120..11e964ab8b9 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_publicip.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_publicip.go @@ -44,7 +44,7 @@ func ParsePublicIPID(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicIPIDInsensitively(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_segment.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_segment.go index 2550e56b98e..f17d758e62d 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_segment.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_segment.go @@ -44,7 +44,7 @@ func ParseSegmentID(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSegmentIDInsensitively(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/id_vmgroup.go b/resource-manager/vmware/2023-03-01/workloadnetworks/id_vmgroup.go index ab62d168572..482b80e8186 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/id_vmgroup.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/id_vmgroup.go @@ -44,7 +44,7 @@ func ParseVMGroupID(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVMGroupIDInsensitively(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_get.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_get.go index 4a64ba9193f..1ff369f60db 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_get.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_get.go @@ -46,7 +46,6 @@ func (c WorkloadNetworksClient) Get(ctx context.Context, id PrivateCloudId) (res var model Resource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdhcp.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdhcp.go index 78bb2a4d18a..5ac374a0b9f 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdhcp.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdhcp.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDhcp(ctx context.Context, id DhcpConfiguratio var model WorkloadNetworkDhcp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnsservice.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnsservice.go index de0801057d7..ad42e6ea11d 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnsservice.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnsservice.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDnsService(ctx context.Context, id DnsService var model WorkloadNetworkDnsService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnszone.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnszone.go index d649ffe650e..4875f34adb0 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnszone.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getdnszone.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetDnsZone(ctx context.Context, id DnsZoneId) (r var model WorkloadNetworkDnsZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getgateway.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getgateway.go index 4afc8831e8b..e2f992631d2 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getgateway.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getgateway.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetGateway(ctx context.Context, id GatewayId) (r var model WorkloadNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getportmirroring.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getportmirroring.go index 2fd7d5de4c4..4134c545e92 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getportmirroring.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getportmirroring.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetPortMirroring(ctx context.Context, id PortMir var model WorkloadNetworkPortMirroring result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getpublicip.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getpublicip.go index fb28dc5041f..64bafd88893 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getpublicip.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getpublicip.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetPublicIP(ctx context.Context, id PublicIPId) var model WorkloadNetworkPublicIP result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getsegment.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getsegment.go index eba7e41adfa..094e0e1d78d 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getsegment.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getsegment.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetSegment(ctx context.Context, id SegmentId) (r var model WorkloadNetworkSegment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvirtualmachine.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvirtualmachine.go index 25bd901f1c5..9c158060f2a 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvirtualmachine.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvirtualmachine.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetVirtualMachine(ctx context.Context, id Defaul var model WorkloadNetworkVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvmgroup.go b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvmgroup.go index 7a1d8d645ff..8e4b4de7a16 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvmgroup.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/method_getvmgroup.go @@ -45,7 +45,6 @@ func (c WorkloadNetworksClient) GetVMGroup(ctx context.Context, id VMGroupId) (r var model WorkloadNetworkVMGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcp.go b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcp.go index 40a95862e4d..19897f277a6 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcp.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcp.go @@ -34,7 +34,7 @@ func (s *WorkloadNetworkDhcp) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadNetworkDhcpEntityImplementation(v) + impl, err := UnmarshalWorkloadNetworkDhcpEntityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadNetworkDhcp': %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpentity.go b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpentity.go index a0f66ff60f7..1f3e98356fe 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpentity.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpentity.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadNetworkDhcpEntity interface { + WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl } -// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadNetworkDhcpEntity = BaseWorkloadNetworkDhcpEntityImpl{} + +type BaseWorkloadNetworkDhcpEntityImpl struct { + DhcpType DhcpTypeEnum `json:"dhcpType"` + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` + Revision *int64 `json:"revision,omitempty"` + Segments *[]string `json:"segments,omitempty"` +} + +func (s BaseWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s +} + +var _ WorkloadNetworkDhcpEntity = RawWorkloadNetworkDhcpEntityImpl{} + +// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadNetworkDhcpEntityImpl struct { - Type string - Values map[string]interface{} + workloadNetworkDhcpEntity BaseWorkloadNetworkDhcpEntityImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s.workloadNetworkDhcpEntity } -func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { +func UnmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNet return out, nil } - out := RawWorkloadNetworkDhcpEntityImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadNetworkDhcpEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadNetworkDhcpEntityImpl: %+v", err) } - return out, nil + + return RawWorkloadNetworkDhcpEntityImpl{ + workloadNetworkDhcpEntity: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcprelay.go b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcprelay.go index 41530820829..9597a0aad80 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcprelay.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcprelay.go @@ -14,12 +14,24 @@ type WorkloadNetworkDhcpRelay struct { ServerAddresses *[]string `json:"serverAddresses,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpRelay) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpRelay{} func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpRelay: %+v", err) } + decoded["dhcpType"] = "RELAY" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpserver.go b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpserver.go index 721ad81a03b..0df0cee1b23 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpserver.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/model_workloadnetworkdhcpserver.go @@ -15,12 +15,24 @@ type WorkloadNetworkDhcpServer struct { ServerAddress *string `json:"serverAddress,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpServer) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpServer{} func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpServer: %+v", err) } + decoded["dhcpType"] = "SERVER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-03-01/workloadnetworks/version.go b/resource-manager/vmware/2023-03-01/workloadnetworks/version.go index 8e996ca0537..f9a04e0c9ee 100644 --- a/resource-manager/vmware/2023-03-01/workloadnetworks/version.go +++ b/resource-manager/vmware/2023-03-01/workloadnetworks/version.go @@ -1,12 +1,10 @@ package workloadnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworks/2023-03-01" } diff --git a/resource-manager/vmware/2023-03-01/zone/README.md b/resource-manager/vmware/2023-03-01/zone/README.md index 671f85cb9ed..411d7f4e099 100644 --- a/resource-manager/vmware/2023-03-01/zone/README.md +++ b/resource-manager/vmware/2023-03-01/zone/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/zone` Documentation -The `zone` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-03-01`). +The `zone` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-03-01/zone/client.go b/resource-manager/vmware/2023-03-01/zone/client.go index 2e73d611adc..27345e16e5b 100644 --- a/resource-manager/vmware/2023-03-01/zone/client.go +++ b/resource-manager/vmware/2023-03-01/zone/client.go @@ -15,7 +15,7 @@ type ZoneClient struct { } func NewZoneClientWithBaseURI(sdkApi sdkEnv.Api) (*ZoneClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "zone", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "zone", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ZoneClient: %+v", err) } diff --git a/resource-manager/vmware/2023-03-01/zone/id_cluster.go b/resource-manager/vmware/2023-03-01/zone/id_cluster.go index 188f791e623..ebfd86818ae 100644 --- a/resource-manager/vmware/2023-03-01/zone/id_cluster.go +++ b/resource-manager/vmware/2023-03-01/zone/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-03-01/zone/method_clusterslistzones.go b/resource-manager/vmware/2023-03-01/zone/method_clusterslistzones.go index 0d018ba13fa..5e9cd21cb71 100644 --- a/resource-manager/vmware/2023-03-01/zone/method_clusterslistzones.go +++ b/resource-manager/vmware/2023-03-01/zone/method_clusterslistzones.go @@ -46,7 +46,6 @@ func (c ZoneClient) ClustersListZones(ctx context.Context, id ClusterId) (result var model ClusterZoneList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-03-01/zone/version.go b/resource-manager/vmware/2023-03-01/zone/version.go index f3284ab07fc..821ee1f77cd 100644 --- a/resource-manager/vmware/2023-03-01/zone/version.go +++ b/resource-manager/vmware/2023-03-01/zone/version.go @@ -1,12 +1,10 @@ package zone -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/zone/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/zone/2023-03-01" } diff --git a/resource-manager/vmware/2023-09-01/addons/README.md b/resource-manager/vmware/2023-09-01/addons/README.md index b87c63352af..2aa403b3b88 100644 --- a/resource-manager/vmware/2023-09-01/addons/README.md +++ b/resource-manager/vmware/2023-09-01/addons/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/addons` Documentation -The `addons` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `addons` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/addons/client.go b/resource-manager/vmware/2023-09-01/addons/client.go index 6c115cae54f..d104ad543fa 100644 --- a/resource-manager/vmware/2023-09-01/addons/client.go +++ b/resource-manager/vmware/2023-09-01/addons/client.go @@ -15,7 +15,7 @@ type AddonsClient struct { } func NewAddonsClientWithBaseURI(sdkApi sdkEnv.Api) (*AddonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "addons", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "addons", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AddonsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/addons/id_addon.go b/resource-manager/vmware/2023-09-01/addons/id_addon.go index d677ac096b0..e910059ff68 100644 --- a/resource-manager/vmware/2023-09-01/addons/id_addon.go +++ b/resource-manager/vmware/2023-09-01/addons/id_addon.go @@ -44,7 +44,7 @@ func ParseAddonID(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAddonIDInsensitively(input string) (*AddonId, error) { } id := AddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/addons/id_privatecloud.go b/resource-manager/vmware/2023-09-01/addons/id_privatecloud.go index f798b48647c..38bac9a28c3 100644 --- a/resource-manager/vmware/2023-09-01/addons/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/addons/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/addons/method_get.go b/resource-manager/vmware/2023-09-01/addons/method_get.go index a9a36357935..f1aced6a637 100644 --- a/resource-manager/vmware/2023-09-01/addons/method_get.go +++ b/resource-manager/vmware/2023-09-01/addons/method_get.go @@ -45,7 +45,6 @@ func (c AddonsClient) Get(ctx context.Context, id AddonId) (result GetOperationR var model Addon result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/addons/model_addon.go b/resource-manager/vmware/2023-09-01/addons/model_addon.go index c750c3ba08c..919127174fb 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addon.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addon.go @@ -38,7 +38,7 @@ func (s *Addon) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalAddonPropertiesImplementation(v) + impl, err := UnmarshalAddonPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'Addon': %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/addons/model_addonarcproperties.go b/resource-manager/vmware/2023-09-01/addons/model_addonarcproperties.go index 3067d4ac170..b508ee63ea5 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addonarcproperties.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addonarcproperties.go @@ -14,9 +14,18 @@ type AddonArcProperties struct { VCenter *string `json:"vCenter,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonArcProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonArcProperties{} func (s AddonArcProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonArcProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonArcProperties: %+v", err) } + decoded["addonType"] = "Arc" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/addons/model_addonhcxproperties.go b/resource-manager/vmware/2023-09-01/addons/model_addonhcxproperties.go index a31858b1887..2baf17e5e87 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addonhcxproperties.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addonhcxproperties.go @@ -14,9 +14,18 @@ type AddonHcxProperties struct { Offer string `json:"offer"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonHcxProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonHcxProperties{} func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonHcxProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonHcxProperties: %+v", err) } + decoded["addonType"] = "HCX" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/addons/model_addonproperties.go b/resource-manager/vmware/2023-09-01/addons/model_addonproperties.go index cc9b498f212..734fe3fc139 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addonproperties.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addonproperties.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AddonProperties interface { + AddonProperties() BaseAddonPropertiesImpl } -// RawAddonPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ AddonProperties = BaseAddonPropertiesImpl{} + +type BaseAddonPropertiesImpl struct { + AddonType AddonType `json:"addonType"` + ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` +} + +func (s BaseAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s +} + +var _ AddonProperties = RawAddonPropertiesImpl{} + +// RawAddonPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawAddonPropertiesImpl struct { - Type string - Values map[string]interface{} + addonProperties BaseAddonPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawAddonPropertiesImpl) AddonProperties() BaseAddonPropertiesImpl { + return s.addonProperties } -func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { +func UnmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, error) { if input == nil { return nil, nil } @@ -68,10 +86,15 @@ func unmarshalAddonPropertiesImplementation(input []byte) (AddonProperties, erro return out, nil } - out := RawAddonPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseAddonPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseAddonPropertiesImpl: %+v", err) } - return out, nil + + return RawAddonPropertiesImpl{ + addonProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-09-01/addons/model_addonsrmproperties.go b/resource-manager/vmware/2023-09-01/addons/model_addonsrmproperties.go index 65f29909d3f..ba406dcc8cb 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addonsrmproperties.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addonsrmproperties.go @@ -14,9 +14,18 @@ type AddonSrmProperties struct { LicenseKey *string `json:"licenseKey,omitempty"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonSrmProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonSrmProperties{} func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonSrmProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonSrmProperties: %+v", err) } + decoded["addonType"] = "SRM" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/addons/model_addonvrproperties.go b/resource-manager/vmware/2023-09-01/addons/model_addonvrproperties.go index 2eb66a36285..89ea1d60e64 100644 --- a/resource-manager/vmware/2023-09-01/addons/model_addonvrproperties.go +++ b/resource-manager/vmware/2023-09-01/addons/model_addonvrproperties.go @@ -14,9 +14,18 @@ type AddonVrProperties struct { VrsCount int64 `json:"vrsCount"` // Fields inherited from AddonProperties + + AddonType AddonType `json:"addonType"` ProvisioningState *AddonProvisioningState `json:"provisioningState,omitempty"` } +func (s AddonVrProperties) AddonProperties() BaseAddonPropertiesImpl { + return BaseAddonPropertiesImpl{ + AddonType: s.AddonType, + ProvisioningState: s.ProvisioningState, + } +} + var _ json.Marshaler = AddonVrProperties{} func (s AddonVrProperties) MarshalJSON() ([]byte, error) { @@ -28,9 +37,10 @@ func (s AddonVrProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling AddonVrProperties: %+v", err) } + decoded["addonType"] = "VR" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/addons/version.go b/resource-manager/vmware/2023-09-01/addons/version.go index 52994075ac1..9dae7fd2ab7 100644 --- a/resource-manager/vmware/2023-09-01/addons/version.go +++ b/resource-manager/vmware/2023-09-01/addons/version.go @@ -1,12 +1,10 @@ package addons -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/addons/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/addons/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/authorizations/README.md b/resource-manager/vmware/2023-09-01/authorizations/README.md index 7ea5aa72d96..0affe0a10dd 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/README.md +++ b/resource-manager/vmware/2023-09-01/authorizations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/authorizations` Documentation -The `authorizations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `authorizations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/authorizations/client.go b/resource-manager/vmware/2023-09-01/authorizations/client.go index 3b013986c6d..8f5ed4980c3 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/client.go +++ b/resource-manager/vmware/2023-09-01/authorizations/client.go @@ -15,7 +15,7 @@ type AuthorizationsClient struct { } func NewAuthorizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "authorizations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "authorizations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AuthorizationsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/authorizations/id_authorization.go b/resource-manager/vmware/2023-09-01/authorizations/id_authorization.go index 75ef4f231db..3faa46b67aa 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/id_authorization.go +++ b/resource-manager/vmware/2023-09-01/authorizations/id_authorization.go @@ -44,7 +44,7 @@ func ParseAuthorizationID(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { } id := AuthorizationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/authorizations/id_privatecloud.go b/resource-manager/vmware/2023-09-01/authorizations/id_privatecloud.go index a3c777162b9..ff8bbde6d4d 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/authorizations/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/authorizations/method_get.go b/resource-manager/vmware/2023-09-01/authorizations/method_get.go index e87d153ae04..4bc9d8ca240 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/method_get.go +++ b/resource-manager/vmware/2023-09-01/authorizations/method_get.go @@ -45,7 +45,6 @@ func (c AuthorizationsClient) Get(ctx context.Context, id AuthorizationId) (resu var model ExpressRouteAuthorization result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/authorizations/version.go b/resource-manager/vmware/2023-09-01/authorizations/version.go index 0363dec754e..9698853ee16 100644 --- a/resource-manager/vmware/2023-09-01/authorizations/version.go +++ b/resource-manager/vmware/2023-09-01/authorizations/version.go @@ -1,12 +1,10 @@ package authorizations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/authorizations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/authorizations/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/README.md b/resource-manager/vmware/2023-09-01/cloudlinks/README.md index cebf04bd414..632a224f30a 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/README.md +++ b/resource-manager/vmware/2023-09-01/cloudlinks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/cloudlinks` Documentation -The `cloudlinks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `cloudlinks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/client.go b/resource-manager/vmware/2023-09-01/cloudlinks/client.go index e39385c28cb..b7bf5d6f417 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/client.go +++ b/resource-manager/vmware/2023-09-01/cloudlinks/client.go @@ -15,7 +15,7 @@ type CloudLinksClient struct { } func NewCloudLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*CloudLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "cloudlinks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "cloudlinks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CloudLinksClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/id_cloudlink.go b/resource-manager/vmware/2023-09-01/cloudlinks/id_cloudlink.go index 0e99632f979..5f0ce369dc0 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/id_cloudlink.go +++ b/resource-manager/vmware/2023-09-01/cloudlinks/id_cloudlink.go @@ -44,7 +44,7 @@ func ParseCloudLinkID(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCloudLinkIDInsensitively(input string) (*CloudLinkId, error) { } id := CloudLinkId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/id_privatecloud.go b/resource-manager/vmware/2023-09-01/cloudlinks/id_privatecloud.go index e6d18d81ff9..02c7175e8c9 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/cloudlinks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/method_get.go b/resource-manager/vmware/2023-09-01/cloudlinks/method_get.go index 335e9d0c2de..79d50f59a2b 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/method_get.go +++ b/resource-manager/vmware/2023-09-01/cloudlinks/method_get.go @@ -45,7 +45,6 @@ func (c CloudLinksClient) Get(ctx context.Context, id CloudLinkId) (result GetOp var model CloudLink result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/cloudlinks/version.go b/resource-manager/vmware/2023-09-01/cloudlinks/version.go index 1c16f0bcb5f..80b4eaa7f9f 100644 --- a/resource-manager/vmware/2023-09-01/cloudlinks/version.go +++ b/resource-manager/vmware/2023-09-01/cloudlinks/version.go @@ -1,12 +1,10 @@ package cloudlinks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudlinks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/cloudlinks/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/clusters/README.md b/resource-manager/vmware/2023-09-01/clusters/README.md index dff659396b5..21ea08ec848 100644 --- a/resource-manager/vmware/2023-09-01/clusters/README.md +++ b/resource-manager/vmware/2023-09-01/clusters/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/clusters` Documentation -The `clusters` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `clusters` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/clusters/client.go b/resource-manager/vmware/2023-09-01/clusters/client.go index e4ab7fd89ad..4ead092b486 100644 --- a/resource-manager/vmware/2023-09-01/clusters/client.go +++ b/resource-manager/vmware/2023-09-01/clusters/client.go @@ -15,7 +15,7 @@ type ClustersClient struct { } func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "clusters", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "clusters", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ClustersClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/clusters/id_cluster.go b/resource-manager/vmware/2023-09-01/clusters/id_cluster.go index e6090e86f8c..1b6178dbe70 100644 --- a/resource-manager/vmware/2023-09-01/clusters/id_cluster.go +++ b/resource-manager/vmware/2023-09-01/clusters/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/clusters/id_privatecloud.go b/resource-manager/vmware/2023-09-01/clusters/id_privatecloud.go index 3d7e9c19d02..1564735e072 100644 --- a/resource-manager/vmware/2023-09-01/clusters/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/clusters/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/clusters/method_get.go b/resource-manager/vmware/2023-09-01/clusters/method_get.go index 73c53aa936b..8265f74e863 100644 --- a/resource-manager/vmware/2023-09-01/clusters/method_get.go +++ b/resource-manager/vmware/2023-09-01/clusters/method_get.go @@ -45,7 +45,6 @@ func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperat var model Cluster result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/clusters/method_listzones.go b/resource-manager/vmware/2023-09-01/clusters/method_listzones.go index f8815d75fa3..69f4f4ec6f3 100644 --- a/resource-manager/vmware/2023-09-01/clusters/method_listzones.go +++ b/resource-manager/vmware/2023-09-01/clusters/method_listzones.go @@ -46,7 +46,6 @@ func (c ClustersClient) ListZones(ctx context.Context, id ClusterId) (result Lis var model ClusterZoneList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/clusters/version.go b/resource-manager/vmware/2023-09-01/clusters/version.go index bc08212836e..322b9e7b925 100644 --- a/resource-manager/vmware/2023-09-01/clusters/version.go +++ b/resource-manager/vmware/2023-09-01/clusters/version.go @@ -1,12 +1,10 @@ package clusters -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/clusters/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/clusters/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/datastores/README.md b/resource-manager/vmware/2023-09-01/datastores/README.md index 3afd9abd908..beffb5de0c7 100644 --- a/resource-manager/vmware/2023-09-01/datastores/README.md +++ b/resource-manager/vmware/2023-09-01/datastores/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/datastores` Documentation -The `datastores` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `datastores` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/datastores/client.go b/resource-manager/vmware/2023-09-01/datastores/client.go index 02d0d9669e0..bbd55bf513d 100644 --- a/resource-manager/vmware/2023-09-01/datastores/client.go +++ b/resource-manager/vmware/2023-09-01/datastores/client.go @@ -15,7 +15,7 @@ type DataStoresClient struct { } func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "datastores", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "datastores", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DataStoresClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/datastores/id_cluster.go b/resource-manager/vmware/2023-09-01/datastores/id_cluster.go index 147c507bd14..0c4054b1cf2 100644 --- a/resource-manager/vmware/2023-09-01/datastores/id_cluster.go +++ b/resource-manager/vmware/2023-09-01/datastores/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/datastores/id_datastore.go b/resource-manager/vmware/2023-09-01/datastores/id_datastore.go index c4986961643..6f081b3d1fe 100644 --- a/resource-manager/vmware/2023-09-01/datastores/id_datastore.go +++ b/resource-manager/vmware/2023-09-01/datastores/id_datastore.go @@ -46,7 +46,7 @@ func ParseDataStoreID(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error) { } id := DataStoreId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/datastores/method_get.go b/resource-manager/vmware/2023-09-01/datastores/method_get.go index 299db22f775..dec57f085e7 100644 --- a/resource-manager/vmware/2023-09-01/datastores/method_get.go +++ b/resource-manager/vmware/2023-09-01/datastores/method_get.go @@ -45,7 +45,6 @@ func (c DataStoresClient) Get(ctx context.Context, id DataStoreId) (result GetOp var model Datastore result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/datastores/version.go b/resource-manager/vmware/2023-09-01/datastores/version.go index 17404e3accf..02082a0f4c4 100644 --- a/resource-manager/vmware/2023-09-01/datastores/version.go +++ b/resource-manager/vmware/2023-09-01/datastores/version.go @@ -1,12 +1,10 @@ package datastores -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/datastores/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/datastores/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/README.md b/resource-manager/vmware/2023-09-01/globalreachconnections/README.md index dd9cf440820..3ecf09f0165 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/README.md +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/globalreachconnections` Documentation -The `globalreachconnections` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `globalreachconnections` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/client.go b/resource-manager/vmware/2023-09-01/globalreachconnections/client.go index a8a16b0e7fb..425e0d66528 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/client.go +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/client.go @@ -15,7 +15,7 @@ type GlobalReachConnectionsClient struct { } func NewGlobalReachConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalReachConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "globalreachconnections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "globalreachconnections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalReachConnectionsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/id_globalreachconnection.go b/resource-manager/vmware/2023-09-01/globalreachconnections/id_globalreachconnection.go index 07b31044b01..bf7812a9856 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/id_globalreachconnection.go +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/id_globalreachconnection.go @@ -44,7 +44,7 @@ func ParseGlobalReachConnectionID(input string) (*GlobalReachConnectionId, error } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGlobalReachConnectionIDInsensitively(input string) (*GlobalReachConnec } id := GlobalReachConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/id_privatecloud.go b/resource-manager/vmware/2023-09-01/globalreachconnections/id_privatecloud.go index 052977121d7..2a51e7765a5 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/method_get.go b/resource-manager/vmware/2023-09-01/globalreachconnections/method_get.go index 5c2581a3794..eb2c4519d12 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/method_get.go +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/method_get.go @@ -45,7 +45,6 @@ func (c GlobalReachConnectionsClient) Get(ctx context.Context, id GlobalReachCon var model GlobalReachConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/globalreachconnections/version.go b/resource-manager/vmware/2023-09-01/globalreachconnections/version.go index d9af6d91beb..4a9c8d88c07 100644 --- a/resource-manager/vmware/2023-09-01/globalreachconnections/version.go +++ b/resource-manager/vmware/2023-09-01/globalreachconnections/version.go @@ -1,12 +1,10 @@ package globalreachconnections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/globalreachconnections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/globalreachconnections/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/README.md b/resource-manager/vmware/2023-09-01/hcxenterprisesites/README.md index e7023df4d75..628a976a482 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/README.md +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/hcxenterprisesites` Documentation -The `hcxenterprisesites` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `hcxenterprisesites` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/client.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/client.go index d710a7ca347..c765176b8d3 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/client.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/client.go @@ -15,7 +15,7 @@ type HcxEnterpriseSitesClient struct { } func NewHcxEnterpriseSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HcxEnterpriseSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hcxenterprisesites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "hcxenterprisesites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating HcxEnterpriseSitesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_hcxenterprisesite.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_hcxenterprisesite.go index f00cae82d5a..a8b62beb9c4 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_hcxenterprisesite.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_hcxenterprisesite.go @@ -44,7 +44,7 @@ func ParseHcxEnterpriseSiteID(input string) (*HcxEnterpriseSiteId, error) { } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHcxEnterpriseSiteIDInsensitively(input string) (*HcxEnterpriseSiteId, } id := HcxEnterpriseSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_privatecloud.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_privatecloud.go index e4fb064beb9..96919ac7c07 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_createorupdate.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_createorupdate.go index eea78ab7268..a10de033534 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_createorupdate.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_createorupdate.go @@ -50,7 +50,6 @@ func (c HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, id HcxEnte var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_get.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_get.go index df7bb8f9596..4e4bfd70efa 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_get.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/method_get.go @@ -45,7 +45,6 @@ func (c HcxEnterpriseSitesClient) Get(ctx context.Context, id HcxEnterpriseSiteI var model HcxEnterpriseSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/hcxenterprisesites/version.go b/resource-manager/vmware/2023-09-01/hcxenterprisesites/version.go index 2832745997b..dd412dec066 100644 --- a/resource-manager/vmware/2023-09-01/hcxenterprisesites/version.go +++ b/resource-manager/vmware/2023-09-01/hcxenterprisesites/version.go @@ -1,12 +1,10 @@ package hcxenterprisesites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hcxenterprisesites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/hcxenterprisesites/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/iscsipaths/README.md b/resource-manager/vmware/2023-09-01/iscsipaths/README.md index 1c36f60e238..0d0d6f05fc7 100644 --- a/resource-manager/vmware/2023-09-01/iscsipaths/README.md +++ b/resource-manager/vmware/2023-09-01/iscsipaths/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/iscsipaths` Documentation -The `iscsipaths` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `iscsipaths` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/iscsipaths/client.go b/resource-manager/vmware/2023-09-01/iscsipaths/client.go index ebcba960552..ed065ef525d 100644 --- a/resource-manager/vmware/2023-09-01/iscsipaths/client.go +++ b/resource-manager/vmware/2023-09-01/iscsipaths/client.go @@ -15,7 +15,7 @@ type IscsiPathsClient struct { } func NewIscsiPathsClientWithBaseURI(sdkApi sdkEnv.Api) (*IscsiPathsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "iscsipaths", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "iscsipaths", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating IscsiPathsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/iscsipaths/id_privatecloud.go b/resource-manager/vmware/2023-09-01/iscsipaths/id_privatecloud.go index 1475ab30b9a..480afe2f44d 100644 --- a/resource-manager/vmware/2023-09-01/iscsipaths/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/iscsipaths/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/iscsipaths/method_get.go b/resource-manager/vmware/2023-09-01/iscsipaths/method_get.go index 24268da30ac..6f4314c8158 100644 --- a/resource-manager/vmware/2023-09-01/iscsipaths/method_get.go +++ b/resource-manager/vmware/2023-09-01/iscsipaths/method_get.go @@ -46,7 +46,6 @@ func (c IscsiPathsClient) Get(ctx context.Context, id PrivateCloudId) (result Ge var model IscsiPath result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/iscsipaths/version.go b/resource-manager/vmware/2023-09-01/iscsipaths/version.go index 56baa4d4ba6..732233282d4 100644 --- a/resource-manager/vmware/2023-09-01/iscsipaths/version.go +++ b/resource-manager/vmware/2023-09-01/iscsipaths/version.go @@ -1,12 +1,10 @@ package iscsipaths -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/iscsipaths/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/iscsipaths/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/locations/README.md b/resource-manager/vmware/2023-09-01/locations/README.md index 0dd7972a36e..c207a09958b 100644 --- a/resource-manager/vmware/2023-09-01/locations/README.md +++ b/resource-manager/vmware/2023-09-01/locations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/locations` Documentation -The `locations` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `locations` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/locations/client.go b/resource-manager/vmware/2023-09-01/locations/client.go index a9a14613b89..57102dca10e 100644 --- a/resource-manager/vmware/2023-09-01/locations/client.go +++ b/resource-manager/vmware/2023-09-01/locations/client.go @@ -15,7 +15,7 @@ type LocationsClient struct { } func NewLocationsClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "locations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "locations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating LocationsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/locations/id_location.go b/resource-manager/vmware/2023-09-01/locations/id_location.go index c08afd589d2..6a83cff80fc 100644 --- a/resource-manager/vmware/2023-09-01/locations/id_location.go +++ b/resource-manager/vmware/2023-09-01/locations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/locations/method_checkquotaavailability.go b/resource-manager/vmware/2023-09-01/locations/method_checkquotaavailability.go index 9bbb8b9d5ba..6f12d1ff069 100644 --- a/resource-manager/vmware/2023-09-01/locations/method_checkquotaavailability.go +++ b/resource-manager/vmware/2023-09-01/locations/method_checkquotaavailability.go @@ -46,7 +46,6 @@ func (c LocationsClient) CheckQuotaAvailability(ctx context.Context, id Location var model Quota result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/locations/method_checktrialavailability.go b/resource-manager/vmware/2023-09-01/locations/method_checktrialavailability.go index d92e12141b9..272a34a6b64 100644 --- a/resource-manager/vmware/2023-09-01/locations/method_checktrialavailability.go +++ b/resource-manager/vmware/2023-09-01/locations/method_checktrialavailability.go @@ -50,7 +50,6 @@ func (c LocationsClient) CheckTrialAvailability(ctx context.Context, id Location var model Trial result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/locations/version.go b/resource-manager/vmware/2023-09-01/locations/version.go index ec5c02ce4cc..4f58dde778e 100644 --- a/resource-manager/vmware/2023-09-01/locations/version.go +++ b/resource-manager/vmware/2023-09-01/locations/version.go @@ -1,12 +1,10 @@ package locations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/locations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/locations/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/README.md b/resource-manager/vmware/2023-09-01/placementpolicies/README.md index 08ff617b4d4..7e7fd085e13 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/README.md +++ b/resource-manager/vmware/2023-09-01/placementpolicies/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/placementpolicies` Documentation -The `placementpolicies` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `placementpolicies` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/client.go b/resource-manager/vmware/2023-09-01/placementpolicies/client.go index d2826398ee4..e0f20f1e124 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/client.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/client.go @@ -15,7 +15,7 @@ type PlacementPoliciesClient struct { } func NewPlacementPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*PlacementPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "placementpolicies", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "placementpolicies", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PlacementPoliciesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/id_cluster.go b/resource-manager/vmware/2023-09-01/placementpolicies/id_cluster.go index 3c0f057192d..ec243be999e 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/id_cluster.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/id_placementpolicy.go b/resource-manager/vmware/2023-09-01/placementpolicies/id_placementpolicy.go index b5fdf601f13..9d59cac38bf 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/id_placementpolicy.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/id_placementpolicy.go @@ -46,7 +46,7 @@ func ParsePlacementPolicyID(input string) (*PlacementPolicyId, error) { } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParsePlacementPolicyIDInsensitively(input string) (*PlacementPolicyId, erro } id := PlacementPolicyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/method_get.go b/resource-manager/vmware/2023-09-01/placementpolicies/method_get.go index c12796352fb..62e0654504d 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/method_get.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/method_get.go @@ -45,7 +45,6 @@ func (c PlacementPoliciesClient) Get(ctx context.Context, id PlacementPolicyId) var model PlacementPolicy result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicy.go b/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicy.go index 621b4310f41..d987faf87e0 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicy.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicy.go @@ -38,7 +38,7 @@ func (s *PlacementPolicy) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalPlacementPolicyPropertiesImplementation(v) + impl, err := UnmarshalPlacementPolicyPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'PlacementPolicy': %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicyproperties.go b/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicyproperties.go index 24caae385b0..b749b6965cd 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicyproperties.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/model_placementpolicyproperties.go @@ -10,18 +10,38 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type PlacementPolicyProperties interface { + PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl } -// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ PlacementPolicyProperties = BasePlacementPolicyPropertiesImpl{} + +type BasePlacementPolicyPropertiesImpl struct { + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` + State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s BasePlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s +} + +var _ PlacementPolicyProperties = RawPlacementPolicyPropertiesImpl{} + +// RawPlacementPolicyPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawPlacementPolicyPropertiesImpl struct { - Type string - Values map[string]interface{} + placementPolicyProperties BasePlacementPolicyPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawPlacementPolicyPropertiesImpl) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return s.placementPolicyProperties } -func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { +func UnmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPolicyProperties, error) { if input == nil { return nil, nil } @@ -52,10 +72,15 @@ func unmarshalPlacementPolicyPropertiesImplementation(input []byte) (PlacementPo return out, nil } - out := RawPlacementPolicyPropertiesImpl{ - Type: value, - Values: temp, + var parent BasePlacementPolicyPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BasePlacementPolicyPropertiesImpl: %+v", err) } - return out, nil + + return RawPlacementPolicyPropertiesImpl{ + placementPolicyProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/model_vmhostplacementpolicyproperties.go b/resource-manager/vmware/2023-09-01/placementpolicies/model_vmhostplacementpolicyproperties.go index 8d639d51812..0dcff67bdb2 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/model_vmhostplacementpolicyproperties.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/model_vmhostplacementpolicyproperties.go @@ -18,9 +18,20 @@ type VMHostPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMHostPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMHostPlacementPolicyProperties{} @@ -34,9 +45,10 @@ func (s VMHostPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMHostPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmHost" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/model_vmvmplacementpolicyproperties.go b/resource-manager/vmware/2023-09-01/placementpolicies/model_vmvmplacementpolicyproperties.go index 6dfa270ce79..a0978a0be18 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/model_vmvmplacementpolicyproperties.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/model_vmvmplacementpolicyproperties.go @@ -15,9 +15,20 @@ type VMVMPlacementPolicyProperties struct { VMMembers []string `json:"vmMembers"` // Fields inherited from PlacementPolicyProperties + DisplayName *string `json:"displayName,omitempty"` ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"` State *PlacementPolicyState `json:"state,omitempty"` + Type PlacementPolicyType `json:"type"` +} + +func (s VMVMPlacementPolicyProperties) PlacementPolicyProperties() BasePlacementPolicyPropertiesImpl { + return BasePlacementPolicyPropertiesImpl{ + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + State: s.State, + Type: s.Type, + } } var _ json.Marshaler = VMVMPlacementPolicyProperties{} @@ -31,9 +42,10 @@ func (s VMVMPlacementPolicyProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling VMVMPlacementPolicyProperties: %+v", err) } + decoded["type"] = "VmVm" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/placementpolicies/version.go b/resource-manager/vmware/2023-09-01/placementpolicies/version.go index eeec1f762e2..7cc4fec2d30 100644 --- a/resource-manager/vmware/2023-09-01/placementpolicies/version.go +++ b/resource-manager/vmware/2023-09-01/placementpolicies/version.go @@ -1,12 +1,10 @@ package placementpolicies -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/placementpolicies/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/placementpolicies/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/privateclouds/README.md b/resource-manager/vmware/2023-09-01/privateclouds/README.md index 93ddd4f23dd..49c7cc61daf 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/README.md +++ b/resource-manager/vmware/2023-09-01/privateclouds/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/privateclouds` Documentation -The `privateclouds` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `privateclouds` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/privateclouds/client.go b/resource-manager/vmware/2023-09-01/privateclouds/client.go index bb7f3721d68..2b558abf0f0 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/client.go +++ b/resource-manager/vmware/2023-09-01/privateclouds/client.go @@ -15,7 +15,7 @@ type PrivateCloudsClient struct { } func NewPrivateCloudsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateCloudsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "privateclouds", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "privateclouds", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating PrivateCloudsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/privateclouds/id_privatecloud.go b/resource-manager/vmware/2023-09-01/privateclouds/id_privatecloud.go index d9efed3220d..020de5e6b67 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/privateclouds/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/privateclouds/method_get.go b/resource-manager/vmware/2023-09-01/privateclouds/method_get.go index 7bfc93ae86b..32e6f21c120 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/method_get.go +++ b/resource-manager/vmware/2023-09-01/privateclouds/method_get.go @@ -45,7 +45,6 @@ func (c PrivateCloudsClient) Get(ctx context.Context, id PrivateCloudId) (result var model PrivateCloud result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/privateclouds/method_listadmincredentials.go b/resource-manager/vmware/2023-09-01/privateclouds/method_listadmincredentials.go index 7c7a8adb980..64073981caa 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/method_listadmincredentials.go +++ b/resource-manager/vmware/2023-09-01/privateclouds/method_listadmincredentials.go @@ -46,7 +46,6 @@ func (c PrivateCloudsClient) ListAdminCredentials(ctx context.Context, id Privat var model AdminCredentials result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/privateclouds/version.go b/resource-manager/vmware/2023-09-01/privateclouds/version.go index dcf8750612f..eb328b5e16c 100644 --- a/resource-manager/vmware/2023-09-01/privateclouds/version.go +++ b/resource-manager/vmware/2023-09-01/privateclouds/version.go @@ -1,12 +1,10 @@ package privateclouds -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateclouds/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/privateclouds/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/README.md b/resource-manager/vmware/2023-09-01/scriptcmdlets/README.md index 8847267e83f..c4a4b62be39 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/README.md +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/scriptcmdlets` Documentation -The `scriptcmdlets` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `scriptcmdlets` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/client.go b/resource-manager/vmware/2023-09-01/scriptcmdlets/client.go index 6bcbfd4101a..64d40201346 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/client.go +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/client.go @@ -15,7 +15,7 @@ type ScriptCmdletsClient struct { } func NewScriptCmdletsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptCmdletsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scriptcmdlets", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scriptcmdlets", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptCmdletsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptcmdlet.go b/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptcmdlet.go index fd17c88fb11..b04850577ad 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptcmdlet.go +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptcmdlet.go @@ -46,7 +46,7 @@ func ParseScriptCmdletID(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseScriptCmdletIDInsensitively(input string) (*ScriptCmdletId, error) { } id := ScriptCmdletId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptpackage.go b/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptpackage.go index be47874252e..0e33fec3590 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptpackage.go +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/id_scriptpackage.go @@ -44,7 +44,7 @@ func ParseScriptPackageID(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptPackageIDInsensitively(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/method_get.go b/resource-manager/vmware/2023-09-01/scriptcmdlets/method_get.go index 83ff5b0b8f2..13031d879be 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/method_get.go +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/method_get.go @@ -45,7 +45,6 @@ func (c ScriptCmdletsClient) Get(ctx context.Context, id ScriptCmdletId) (result var model ScriptCmdlet result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/scriptcmdlets/version.go b/resource-manager/vmware/2023-09-01/scriptcmdlets/version.go index ad52adbae80..c91ca9d76f5 100644 --- a/resource-manager/vmware/2023-09-01/scriptcmdlets/version.go +++ b/resource-manager/vmware/2023-09-01/scriptcmdlets/version.go @@ -1,12 +1,10 @@ package scriptcmdlets -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scriptcmdlets/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scriptcmdlets/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/README.md b/resource-manager/vmware/2023-09-01/scriptexecutions/README.md index eab1f6293d7..bc34ac8d986 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/README.md +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/scriptexecutions` Documentation -The `scriptexecutions` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `scriptexecutions` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/client.go b/resource-manager/vmware/2023-09-01/scriptexecutions/client.go index a59638c77bc..583c6bfab1b 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/client.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/client.go @@ -15,7 +15,7 @@ type ScriptExecutionsClient struct { } func NewScriptExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptExecutionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scriptexecutions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scriptexecutions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptExecutionsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/id_privatecloud.go b/resource-manager/vmware/2023-09-01/scriptexecutions/id_privatecloud.go index 300f67d64a4..d54cbfea1f0 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/id_scriptexecution.go b/resource-manager/vmware/2023-09-01/scriptexecutions/id_scriptexecution.go index 5ba51b225b4..db351c0349e 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/id_scriptexecution.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/id_scriptexecution.go @@ -44,7 +44,7 @@ func ParseScriptExecutionID(input string) (*ScriptExecutionId, error) { } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptExecutionIDInsensitively(input string) (*ScriptExecutionId, erro } id := ScriptExecutionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/method_get.go b/resource-manager/vmware/2023-09-01/scriptexecutions/method_get.go index 02689c73873..55b33ac605e 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/method_get.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/method_get.go @@ -45,7 +45,6 @@ func (c ScriptExecutionsClient) Get(ctx context.Context, id ScriptExecutionId) ( var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/method_getexecutionlogs.go b/resource-manager/vmware/2023-09-01/scriptexecutions/method_getexecutionlogs.go index b0c8612c0f2..40793544129 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/method_getexecutionlogs.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/method_getexecutionlogs.go @@ -50,7 +50,6 @@ func (c ScriptExecutionsClient) GetExecutionLogs(ctx context.Context, id ScriptE var model ScriptExecution result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/model_pscredentialexecutionparameter.go b/resource-manager/vmware/2023-09-01/scriptexecutions/model_pscredentialexecutionparameter.go index 8c6af6185a9..c7c810e3a2f 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/model_pscredentialexecutionparameter.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/model_pscredentialexecutionparameter.go @@ -15,7 +15,16 @@ type PSCredentialExecutionParameter struct { Username *string `json:"username,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s PSCredentialExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = PSCredentialExecutionParameter{} @@ -29,9 +38,10 @@ func (s PSCredentialExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PSCredentialExecutionParameter: %+v", err) } + decoded["type"] = "Credential" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionparameter.go b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionparameter.go index b16bd7cca5f..4199bd05fe1 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionparameter.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionparameter.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ScriptExecutionParameter interface { + ScriptExecutionParameter() BaseScriptExecutionParameterImpl } -// RawScriptExecutionParameterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ScriptExecutionParameter = BaseScriptExecutionParameterImpl{} + +type BaseScriptExecutionParameterImpl struct { + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s BaseScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s +} + +var _ ScriptExecutionParameter = RawScriptExecutionParameterImpl{} + +// RawScriptExecutionParameterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawScriptExecutionParameterImpl struct { - Type string - Values map[string]interface{} + scriptExecutionParameter BaseScriptExecutionParameterImpl + Type string + Values map[string]interface{} +} + +func (s RawScriptExecutionParameterImpl) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return s.scriptExecutionParameter } -func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { +func UnmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecutionParameter, error) { if input == nil { return nil, nil } @@ -60,10 +78,15 @@ func unmarshalScriptExecutionParameterImplementation(input []byte) (ScriptExecut return out, nil } - out := RawScriptExecutionParameterImpl{ - Type: value, - Values: temp, + var parent BaseScriptExecutionParameterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseScriptExecutionParameterImpl: %+v", err) } - return out, nil + + return RawScriptExecutionParameterImpl{ + scriptExecutionParameter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionproperties.go b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionproperties.go index 65101a393a0..327f695d70b 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionproperties.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptexecutionproperties.go @@ -101,7 +101,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'HiddenParameters' for 'ScriptExecutionProperties': %+v", i, err) } @@ -118,7 +118,7 @@ func (s *ScriptExecutionProperties) UnmarshalJSON(bytes []byte) error { output := make([]ScriptExecutionParameter, 0) for i, val := range listTemp { - impl, err := unmarshalScriptExecutionParameterImplementation(val) + impl, err := UnmarshalScriptExecutionParameterImplementation(val) if err != nil { return fmt.Errorf("unmarshaling index %d field 'Parameters' for 'ScriptExecutionProperties': %+v", i, err) } diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptsecurestringexecutionparameter.go b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptsecurestringexecutionparameter.go index ff28512c8e4..480fc31cb54 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptsecurestringexecutionparameter.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptsecurestringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptSecureStringExecutionParameter struct { SecureValue *string `json:"secureValue,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptSecureStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptSecureStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptSecureStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptSecureStringExecutionParameter: %+v", err) } + decoded["type"] = "SecureValue" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptstringexecutionparameter.go b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptstringexecutionparameter.go index 9bcefdbccc7..8aabddffaf9 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptstringexecutionparameter.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/model_scriptstringexecutionparameter.go @@ -14,7 +14,16 @@ type ScriptStringExecutionParameter struct { Value *string `json:"value,omitempty"` // Fields inherited from ScriptExecutionParameter - Name string `json:"name"` + + Name string `json:"name"` + Type ScriptExecutionParameterType `json:"type"` +} + +func (s ScriptStringExecutionParameter) ScriptExecutionParameter() BaseScriptExecutionParameterImpl { + return BaseScriptExecutionParameterImpl{ + Name: s.Name, + Type: s.Type, + } } var _ json.Marshaler = ScriptStringExecutionParameter{} @@ -28,9 +37,10 @@ func (s ScriptStringExecutionParameter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ScriptStringExecutionParameter: %+v", err) } + decoded["type"] = "Value" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/scriptexecutions/version.go b/resource-manager/vmware/2023-09-01/scriptexecutions/version.go index efe1be3e1ef..23677f3e5b3 100644 --- a/resource-manager/vmware/2023-09-01/scriptexecutions/version.go +++ b/resource-manager/vmware/2023-09-01/scriptexecutions/version.go @@ -1,12 +1,10 @@ package scriptexecutions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scriptexecutions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scriptexecutions/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/README.md b/resource-manager/vmware/2023-09-01/scriptpackages/README.md index 06ca33dfdba..62c21a499d3 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/README.md +++ b/resource-manager/vmware/2023-09-01/scriptpackages/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/scriptpackages` Documentation -The `scriptpackages` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `scriptpackages` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/client.go b/resource-manager/vmware/2023-09-01/scriptpackages/client.go index a861d940c4d..09cf71817d2 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/client.go +++ b/resource-manager/vmware/2023-09-01/scriptpackages/client.go @@ -15,7 +15,7 @@ type ScriptPackagesClient struct { } func NewScriptPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptPackagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "scriptpackages", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "scriptpackages", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ScriptPackagesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/id_privatecloud.go b/resource-manager/vmware/2023-09-01/scriptpackages/id_privatecloud.go index fa854d28e79..0a04b9274c2 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/scriptpackages/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/id_scriptpackage.go b/resource-manager/vmware/2023-09-01/scriptpackages/id_scriptpackage.go index 86ed6a333bc..aa53a9ec8a3 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/id_scriptpackage.go +++ b/resource-manager/vmware/2023-09-01/scriptpackages/id_scriptpackage.go @@ -44,7 +44,7 @@ func ParseScriptPackageID(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseScriptPackageIDInsensitively(input string) (*ScriptPackageId, error) { } id := ScriptPackageId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/method_get.go b/resource-manager/vmware/2023-09-01/scriptpackages/method_get.go index 6f76634fa29..5e2af0619bc 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/method_get.go +++ b/resource-manager/vmware/2023-09-01/scriptpackages/method_get.go @@ -45,7 +45,6 @@ func (c ScriptPackagesClient) Get(ctx context.Context, id ScriptPackageId) (resu var model ScriptPackage result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/scriptpackages/version.go b/resource-manager/vmware/2023-09-01/scriptpackages/version.go index 98f7da9bfbf..0608d482722 100644 --- a/resource-manager/vmware/2023-09-01/scriptpackages/version.go +++ b/resource-manager/vmware/2023-09-01/scriptpackages/version.go @@ -1,12 +1,10 @@ package scriptpackages -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scriptpackages/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/scriptpackages/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/README.md b/resource-manager/vmware/2023-09-01/virtualmachines/README.md index 56e5ed08dfc..03821c4719c 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/README.md +++ b/resource-manager/vmware/2023-09-01/virtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/virtualmachines` Documentation -The `virtualmachines` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `virtualmachines` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/client.go b/resource-manager/vmware/2023-09-01/virtualmachines/client.go index 29f57e611e8..51127106436 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/client.go +++ b/resource-manager/vmware/2023-09-01/virtualmachines/client.go @@ -15,7 +15,7 @@ type VirtualMachinesClient struct { } func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "virtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "virtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VirtualMachinesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/id_cluster.go b/resource-manager/vmware/2023-09-01/virtualmachines/id_cluster.go index 4cf29916510..4bdec5f3a03 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/id_cluster.go +++ b/resource-manager/vmware/2023-09-01/virtualmachines/id_cluster.go @@ -44,7 +44,7 @@ func ParseClusterID(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseClusterIDInsensitively(input string) (*ClusterId, error) { } id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/id_virtualmachine.go b/resource-manager/vmware/2023-09-01/virtualmachines/id_virtualmachine.go index b0fe35cad57..cfa14a3ac61 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/id_virtualmachine.go +++ b/resource-manager/vmware/2023-09-01/virtualmachines/id_virtualmachine.go @@ -46,7 +46,7 @@ func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) } id := VirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/method_get.go b/resource-manager/vmware/2023-09-01/virtualmachines/method_get.go index 05c63620238..b3c70a159d8 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/method_get.go +++ b/resource-manager/vmware/2023-09-01/virtualmachines/method_get.go @@ -45,7 +45,6 @@ func (c VirtualMachinesClient) Get(ctx context.Context, id VirtualMachineId) (re var model VirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/virtualmachines/version.go b/resource-manager/vmware/2023-09-01/virtualmachines/version.go index 92b522ad8a6..60865753974 100644 --- a/resource-manager/vmware/2023-09-01/virtualmachines/version.go +++ b/resource-manager/vmware/2023-09-01/virtualmachines/version.go @@ -1,12 +1,10 @@ package virtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/virtualmachines/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/vmwares/README.md b/resource-manager/vmware/2023-09-01/vmwares/README.md index 1531f4e37b6..51f01ac56f6 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/README.md +++ b/resource-manager/vmware/2023-09-01/vmwares/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/vmwares` Documentation -The `vmwares` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `vmwares` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/vmwares/client.go b/resource-manager/vmware/2023-09-01/vmwares/client.go index 0f304c40bd5..ae56cce7094 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/client.go +++ b/resource-manager/vmware/2023-09-01/vmwares/client.go @@ -15,7 +15,7 @@ type VMwaresClient struct { } func NewVMwaresClientWithBaseURI(sdkApi sdkEnv.Api) (*VMwaresClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "vmwares", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "vmwares", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VMwaresClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_dhcpconfiguration.go b/resource-manager/vmware/2023-09-01/vmwares/id_dhcpconfiguration.go index 5adccc598da..efbb6692e0b 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_dhcpconfiguration.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_dhcpconfiguration.go @@ -44,7 +44,7 @@ func ParseDhcpConfigurationID(input string) (*DhcpConfigurationId, error) { } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDhcpConfigurationIDInsensitively(input string) (*DhcpConfigurationId, } id := DhcpConfigurationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_dnsservice.go b/resource-manager/vmware/2023-09-01/vmwares/id_dnsservice.go index a01959dd002..07be91ec7ec 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_dnsservice.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_dnsservice.go @@ -44,7 +44,7 @@ func ParseDnsServiceID(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsServiceIDInsensitively(input string) (*DnsServiceId, error) { } id := DnsServiceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_dnszone.go b/resource-manager/vmware/2023-09-01/vmwares/id_dnszone.go index e0bd17007f7..889bafcfb77 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_dnszone.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_dnszone.go @@ -44,7 +44,7 @@ func ParseDnsZoneID(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error) { } id := DnsZoneId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_portmirroringprofile.go b/resource-manager/vmware/2023-09-01/vmwares/id_portmirroringprofile.go index bbe3a696f34..e93c104e4b1 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_portmirroringprofile.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_portmirroringprofile.go @@ -44,7 +44,7 @@ func ParsePortMirroringProfileID(input string) (*PortMirroringProfileId, error) } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePortMirroringProfileIDInsensitively(input string) (*PortMirroringProfi } id := PortMirroringProfileId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_privatecloud.go b/resource-manager/vmware/2023-09-01/vmwares/id_privatecloud.go index 32076a13b9c..7a5bb82f0f1 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_publicip.go b/resource-manager/vmware/2023-09-01/vmwares/id_publicip.go index bcc9b2c3b8c..809f95a7863 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_publicip.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_publicip.go @@ -44,7 +44,7 @@ func ParsePublicIPID(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicIPIDInsensitively(input string) (*PublicIPId, error) { } id := PublicIPId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/id_vmgroup.go b/resource-manager/vmware/2023-09-01/vmwares/id_vmgroup.go index a0344417471..a554cbc8360 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/id_vmgroup.go +++ b/resource-manager/vmware/2023-09-01/vmwares/id_vmgroup.go @@ -44,7 +44,7 @@ func ParseVMGroupID(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVMGroupIDInsensitively(input string) (*VMGroupId, error) { } id := VMGroupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdhcp.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdhcp.go index 3a9bc6685e2..548abb29130 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdhcp.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdhcp.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetDhcp(ctx context.Context, id DhcpConfi var model WorkloadNetworkDhcp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnsservice.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnsservice.go index c0f61754541..d663886d125 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnsservice.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnsservice.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetDnsService(ctx context.Context, id Dns var model WorkloadNetworkDnsService result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnszone.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnszone.go index 6220bc481ed..c1ae1a121cb 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnszone.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetdnszone.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetDnsZone(ctx context.Context, id DnsZon var model WorkloadNetworkDnsZone result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetportmirroring.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetportmirroring.go index de268d41c88..6c339c20ad6 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetportmirroring.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetportmirroring.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetPortMirroring(ctx context.Context, id var model WorkloadNetworkPortMirroring result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetpublicip.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetpublicip.go index 6e233500ab8..f2c05783b58 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetpublicip.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetpublicip.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetPublicIP(ctx context.Context, id Publi var model WorkloadNetworkPublicIP result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetvmgroup.go b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetvmgroup.go index ae0a6269307..5f6715a27d5 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetvmgroup.go +++ b/resource-manager/vmware/2023-09-01/vmwares/method_workloadnetworksgetvmgroup.go @@ -45,7 +45,6 @@ func (c VMwaresClient) WorkloadNetworksGetVMGroup(ctx context.Context, id VMGrou var model WorkloadNetworkVMGroup result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcp.go b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcp.go index 4ecb6bd2c89..121c8b547c6 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcp.go +++ b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcp.go @@ -38,7 +38,7 @@ func (s *WorkloadNetworkDhcp) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["properties"]; ok { - impl, err := unmarshalWorkloadNetworkDhcpEntityImplementation(v) + impl, err := UnmarshalWorkloadNetworkDhcpEntityImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Properties' for 'WorkloadNetworkDhcp': %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpentity.go b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpentity.go index 78648ec486e..27c831ac154 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpentity.go +++ b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpentity.go @@ -10,18 +10,39 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type WorkloadNetworkDhcpEntity interface { + WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl } -// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ WorkloadNetworkDhcpEntity = BaseWorkloadNetworkDhcpEntityImpl{} + +type BaseWorkloadNetworkDhcpEntityImpl struct { + DhcpType DhcpTypeEnum `json:"dhcpType"` + DisplayName *string `json:"displayName,omitempty"` + ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` + Revision *int64 `json:"revision,omitempty"` + Segments *[]string `json:"segments,omitempty"` +} + +func (s BaseWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s +} + +var _ WorkloadNetworkDhcpEntity = RawWorkloadNetworkDhcpEntityImpl{} + +// RawWorkloadNetworkDhcpEntityImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawWorkloadNetworkDhcpEntityImpl struct { - Type string - Values map[string]interface{} + workloadNetworkDhcpEntity BaseWorkloadNetworkDhcpEntityImpl + Type string + Values map[string]interface{} +} + +func (s RawWorkloadNetworkDhcpEntityImpl) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return s.workloadNetworkDhcpEntity } -func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { +func UnmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNetworkDhcpEntity, error) { if input == nil { return nil, nil } @@ -52,10 +73,15 @@ func unmarshalWorkloadNetworkDhcpEntityImplementation(input []byte) (WorkloadNet return out, nil } - out := RawWorkloadNetworkDhcpEntityImpl{ - Type: value, - Values: temp, + var parent BaseWorkloadNetworkDhcpEntityImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseWorkloadNetworkDhcpEntityImpl: %+v", err) } - return out, nil + + return RawWorkloadNetworkDhcpEntityImpl{ + workloadNetworkDhcpEntity: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcprelay.go b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcprelay.go index 8542277a65b..e0ca5f2d172 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcprelay.go +++ b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcprelay.go @@ -14,12 +14,24 @@ type WorkloadNetworkDhcpRelay struct { ServerAddresses *[]string `json:"serverAddresses,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpRelay) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpRelay{} func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { @@ -31,9 +43,10 @@ func (s WorkloadNetworkDhcpRelay) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpRelay: %+v", err) } + decoded["dhcpType"] = "RELAY" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpserver.go b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpserver.go index b4c70907d08..39c3a4dd2c5 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpserver.go +++ b/resource-manager/vmware/2023-09-01/vmwares/model_workloadnetworkdhcpserver.go @@ -15,12 +15,24 @@ type WorkloadNetworkDhcpServer struct { ServerAddress *string `json:"serverAddress,omitempty"` // Fields inherited from WorkloadNetworkDhcpEntity + + DhcpType DhcpTypeEnum `json:"dhcpType"` DisplayName *string `json:"displayName,omitempty"` ProvisioningState *WorkloadNetworkDhcpProvisioningState `json:"provisioningState,omitempty"` Revision *int64 `json:"revision,omitempty"` Segments *[]string `json:"segments,omitempty"` } +func (s WorkloadNetworkDhcpServer) WorkloadNetworkDhcpEntity() BaseWorkloadNetworkDhcpEntityImpl { + return BaseWorkloadNetworkDhcpEntityImpl{ + DhcpType: s.DhcpType, + DisplayName: s.DisplayName, + ProvisioningState: s.ProvisioningState, + Revision: s.Revision, + Segments: s.Segments, + } +} + var _ json.Marshaler = WorkloadNetworkDhcpServer{} func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { @@ -32,9 +44,10 @@ func (s WorkloadNetworkDhcpServer) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WorkloadNetworkDhcpServer: %+v", err) } + decoded["dhcpType"] = "SERVER" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/vmware/2023-09-01/vmwares/version.go b/resource-manager/vmware/2023-09-01/vmwares/version.go index 256f8f04f3c..1fea24d8207 100644 --- a/resource-manager/vmware/2023-09-01/vmwares/version.go +++ b/resource-manager/vmware/2023-09-01/vmwares/version.go @@ -1,12 +1,10 @@ package vmwares -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmwares/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/vmwares/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/README.md b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/README.md index d841a09dea6..97861456a9b 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/README.md +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/workloadnetworkgateways` Documentation -The `workloadnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `workloadnetworkgateways` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/client.go b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/client.go index 616cacae5b6..68d3c221e56 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/client.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/client.go @@ -15,7 +15,7 @@ type WorkloadNetworkGatewaysClient struct { } func NewWorkloadNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworkgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworkgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworkGatewaysClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_gateway.go b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_gateway.go index c0c4501bed1..1bf426c50e6 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_gateway.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_gateway.go @@ -44,7 +44,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_privatecloud.go b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_privatecloud.go index ddac3833d2a..a3fdfed8a07 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/method_workloadnetworksgetgateway.go b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/method_workloadnetworksgetgateway.go index 80ea42877c7..9c4afe8fee2 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/method_workloadnetworksgetgateway.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/method_workloadnetworksgetgateway.go @@ -45,7 +45,6 @@ func (c WorkloadNetworkGatewaysClient) WorkloadNetworksGetGateway(ctx context.Co var model WorkloadNetworkGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/version.go b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/version.go index 0ecdd3dfa08..f2f67e34786 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkgateways/version.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkgateways/version.go @@ -1,12 +1,10 @@ package workloadnetworkgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworkgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworkgateways/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworks/README.md b/resource-manager/vmware/2023-09-01/workloadnetworks/README.md index 38256d2c29f..c5e767182ab 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworks/README.md +++ b/resource-manager/vmware/2023-09-01/workloadnetworks/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/workloadnetworks` Documentation -The `workloadnetworks` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `workloadnetworks` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/workloadnetworks/client.go b/resource-manager/vmware/2023-09-01/workloadnetworks/client.go index 53d7aea2f37..ac5d4da4073 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworks/client.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworks/client.go @@ -15,7 +15,7 @@ type WorkloadNetworksClient struct { } func NewWorkloadNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworks", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworks", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworksClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworks/id_privatecloud.go b/resource-manager/vmware/2023-09-01/workloadnetworks/id_privatecloud.go index 7da3d9aab95..b120b7f87e2 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworks/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworks/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworks/method_get.go b/resource-manager/vmware/2023-09-01/workloadnetworks/method_get.go index 3cd256952b4..7b33b6c340a 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworks/method_get.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworks/method_get.go @@ -46,7 +46,6 @@ func (c WorkloadNetworksClient) Get(ctx context.Context, id PrivateCloudId) (res var model WorkloadNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworks/version.go b/resource-manager/vmware/2023-09-01/workloadnetworks/version.go index 9650c4f8724..24451937743 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworks/version.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworks/version.go @@ -1,12 +1,10 @@ package workloadnetworks -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworks/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworks/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/README.md b/resource-manager/vmware/2023-09-01/workloadnetworksegments/README.md index af77dd96f45..0a84e639231 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/README.md +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/workloadnetworksegments` Documentation -The `workloadnetworksegments` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `workloadnetworksegments` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/client.go b/resource-manager/vmware/2023-09-01/workloadnetworksegments/client.go index f3666d4d434..18cd6cc63b7 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/client.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/client.go @@ -15,7 +15,7 @@ type WorkloadNetworkSegmentsClient struct { } func NewWorkloadNetworkSegmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworkSegmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworksegments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworksegments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworkSegmentsClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_privatecloud.go b/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_privatecloud.go index f895f1316dc..0cf3d23b493 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_segment.go b/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_segment.go index 3ecc3d84a40..340631e0708 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_segment.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/id_segment.go @@ -44,7 +44,7 @@ func ParseSegmentID(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSegmentIDInsensitively(input string) (*SegmentId, error) { } id := SegmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/method_workloadnetworksgetsegment.go b/resource-manager/vmware/2023-09-01/workloadnetworksegments/method_workloadnetworksgetsegment.go index b0b623f2844..899d7d7e6d2 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/method_workloadnetworksgetsegment.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/method_workloadnetworksgetsegment.go @@ -45,7 +45,6 @@ func (c WorkloadNetworkSegmentsClient) WorkloadNetworksGetSegment(ctx context.Co var model WorkloadNetworkSegment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworksegments/version.go b/resource-manager/vmware/2023-09-01/workloadnetworksegments/version.go index ab23b7ce9ae..2f8b5e1e840 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworksegments/version.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworksegments/version.go @@ -1,12 +1,10 @@ package workloadnetworksegments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworksegments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworksegments/2023-09-01" } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/README.md b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/README.md index d24872f7021..9acee34ead0 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/README.md +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines` Documentation -The `workloadnetworkvirtualmachines` SDK allows for interaction with the Azure Resource Manager Service `vmware` (API Version `2023-09-01`). +The `workloadnetworkvirtualmachines` SDK allows for interaction with Azure Resource Manager `vmware` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/client.go b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/client.go index d728a9971cf..e87fd17b824 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/client.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/client.go @@ -15,7 +15,7 @@ type WorkloadNetworkVirtualMachinesClient struct { } func NewWorkloadNetworkVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkloadNetworkVirtualMachinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workloadnetworkvirtualmachines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workloadnetworkvirtualmachines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkloadNetworkVirtualMachinesClient: %+v", err) } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_defaultvirtualmachine.go b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_defaultvirtualmachine.go index d6a771aa51a..26698e1dcbe 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_defaultvirtualmachine.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_defaultvirtualmachine.go @@ -44,7 +44,7 @@ func ParseDefaultVirtualMachineID(input string) (*DefaultVirtualMachineId, error } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultVirtualMachineIDInsensitively(input string) (*DefaultVirtualMac } id := DefaultVirtualMachineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_privatecloud.go b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_privatecloud.go index a1087904139..baa44e1883e 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_privatecloud.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/id_privatecloud.go @@ -42,7 +42,7 @@ func ParsePrivateCloudID(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error) { } id := PrivateCloudId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/method_workloadnetworksgetvirtualmachine.go b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/method_workloadnetworksgetvirtualmachine.go index 7c8d5174f52..4d35fbd6dd1 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/method_workloadnetworksgetvirtualmachine.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/method_workloadnetworksgetvirtualmachine.go @@ -45,7 +45,6 @@ func (c WorkloadNetworkVirtualMachinesClient) WorkloadNetworksGetVirtualMachine( var model WorkloadNetworkVirtualMachine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/version.go b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/version.go index 8064cfa4297..21a9c7f2b0b 100644 --- a/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/version.go +++ b/resource-manager/vmware/2023-09-01/workloadnetworkvirtualmachines/version.go @@ -1,12 +1,10 @@ package workloadnetworkvirtualmachines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workloadnetworkvirtualmachines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workloadnetworkvirtualmachines/2023-09-01" } diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/README.md b/resource-manager/voiceservices/2023-04-03/communicationsgateways/README.md index a292423d584..45b48d9f5a0 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/README.md +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/communicationsgateways` Documentation -The `communicationsgateways` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-04-03`). +The `communicationsgateways` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-04-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/client.go b/resource-manager/voiceservices/2023-04-03/communicationsgateways/client.go index 2d5c84ae73d..f1353ea7349 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/client.go +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/client.go @@ -15,7 +15,7 @@ type CommunicationsGatewaysClient struct { } func NewCommunicationsGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunicationsGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communicationsgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communicationsgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunicationsGatewaysClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go b/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go index 3979f1c2122..961dd4ae44e 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/id_communicationsgateway.go @@ -42,7 +42,7 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_get.go b/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_get.go index 40640115d27..ddaf36b0df5 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_get.go +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_get.go @@ -45,7 +45,6 @@ func (c CommunicationsGatewaysClient) Get(ctx context.Context, id Communications var model CommunicationsGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_update.go b/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_update.go index 06c8072fcda..353287d9cb2 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_update.go +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/method_update.go @@ -49,7 +49,6 @@ func (c CommunicationsGatewaysClient) Update(ctx context.Context, id Communicati var model CommunicationsGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-04-03/communicationsgateways/version.go b/resource-manager/voiceservices/2023-04-03/communicationsgateways/version.go index 5c1daef11a4..1579b2d0f81 100644 --- a/resource-manager/voiceservices/2023-04-03/communicationsgateways/version.go +++ b/resource-manager/voiceservices/2023-04-03/communicationsgateways/version.go @@ -1,12 +1,10 @@ package communicationsgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communicationsgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communicationsgateways/2023-04-03" } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/README.md b/resource-manager/voiceservices/2023-04-03/testlines/README.md index 0ba277a99b2..df3a14becce 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/README.md +++ b/resource-manager/voiceservices/2023-04-03/testlines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/testlines` Documentation -The `testlines` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-04-03`). +The `testlines` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-04-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-04-03/testlines/client.go b/resource-manager/voiceservices/2023-04-03/testlines/client.go index 5fa3aafb49a..21f12c985c4 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/client.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/client.go @@ -15,7 +15,7 @@ type TestLinesClient struct { } func NewTestLinesClientWithBaseURI(sdkApi sdkEnv.Api) (*TestLinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testlines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testlines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestLinesClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go b/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go index 731d1804df6..eb8a972422c 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/id_communicationsgateway.go @@ -42,7 +42,7 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go b/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go index 50e8a440a59..4a194b9373b 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/id_testline.go @@ -44,7 +44,7 @@ func ParseTestLineID(input string) (*TestLineId, error) { } id := TestLineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTestLineIDInsensitively(input string) (*TestLineId, error) { } id := TestLineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/method_get.go b/resource-manager/voiceservices/2023-04-03/testlines/method_get.go index 9309c173701..ba21bff3b30 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/method_get.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/method_get.go @@ -45,7 +45,6 @@ func (c TestLinesClient) Get(ctx context.Context, id TestLineId) (result GetOper var model TestLine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/method_update.go b/resource-manager/voiceservices/2023-04-03/testlines/method_update.go index 564e548f96c..1c88d489bf8 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/method_update.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/method_update.go @@ -49,7 +49,6 @@ func (c TestLinesClient) Update(ctx context.Context, id TestLineId, input TestLi var model TestLine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-04-03/testlines/version.go b/resource-manager/voiceservices/2023-04-03/testlines/version.go index 788f4e12143..48c69cb7606 100644 --- a/resource-manager/voiceservices/2023-04-03/testlines/version.go +++ b/resource-manager/voiceservices/2023-04-03/testlines/version.go @@ -1,12 +1,10 @@ package testlines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testlines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testlines/2023-04-03" } diff --git a/resource-manager/voiceservices/2023-04-03/voiceservices/README.md b/resource-manager/voiceservices/2023-04-03/voiceservices/README.md index b706b542926..dfd961f3e9b 100644 --- a/resource-manager/voiceservices/2023-04-03/voiceservices/README.md +++ b/resource-manager/voiceservices/2023-04-03/voiceservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-04-03/voiceservices` Documentation -The `voiceservices` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-04-03`). +The `voiceservices` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-04-03`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-04-03/voiceservices/client.go b/resource-manager/voiceservices/2023-04-03/voiceservices/client.go index b208d66a723..f4b6ba6dac0 100644 --- a/resource-manager/voiceservices/2023-04-03/voiceservices/client.go +++ b/resource-manager/voiceservices/2023-04-03/voiceservices/client.go @@ -15,7 +15,7 @@ type VoiceservicesClient struct { } func NewVoiceservicesClientWithBaseURI(sdkApi sdkEnv.Api) (*VoiceservicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "voiceservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "voiceservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VoiceservicesClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-04-03/voiceservices/id_location.go b/resource-manager/voiceservices/2023-04-03/voiceservices/id_location.go index c4feec7564d..6883556c6ec 100644 --- a/resource-manager/voiceservices/2023-04-03/voiceservices/id_location.go +++ b/resource-manager/voiceservices/2023-04-03/voiceservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-04-03/voiceservices/method_nameavailabilitychecklocal.go b/resource-manager/voiceservices/2023-04-03/voiceservices/method_nameavailabilitychecklocal.go index c90842f9b3f..84ace5e5a7e 100644 --- a/resource-manager/voiceservices/2023-04-03/voiceservices/method_nameavailabilitychecklocal.go +++ b/resource-manager/voiceservices/2023-04-03/voiceservices/method_nameavailabilitychecklocal.go @@ -50,7 +50,6 @@ func (c VoiceservicesClient) NameAvailabilityCheckLocal(ctx context.Context, id var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-04-03/voiceservices/version.go b/resource-manager/voiceservices/2023-04-03/voiceservices/version.go index 5b1735f6df7..35b1fabf1d3 100644 --- a/resource-manager/voiceservices/2023-04-03/voiceservices/version.go +++ b/resource-manager/voiceservices/2023-04-03/voiceservices/version.go @@ -1,12 +1,10 @@ package voiceservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-03" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/voiceservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/voiceservices/2023-04-03" } diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/README.md b/resource-manager/voiceservices/2023-09-01/communicationsgateways/README.md index 8ad9311ba31..a4e295c8475 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/README.md +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-09-01/communicationsgateways` Documentation -The `communicationsgateways` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-09-01`). +The `communicationsgateways` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/client.go b/resource-manager/voiceservices/2023-09-01/communicationsgateways/client.go index 2d5c84ae73d..f1353ea7349 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/client.go +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/client.go @@ -15,7 +15,7 @@ type CommunicationsGatewaysClient struct { } func NewCommunicationsGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*CommunicationsGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "communicationsgateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "communicationsgateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CommunicationsGatewaysClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/id_communicationsgateway.go b/resource-manager/voiceservices/2023-09-01/communicationsgateways/id_communicationsgateway.go index 3979f1c2122..961dd4ae44e 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/id_communicationsgateway.go +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/id_communicationsgateway.go @@ -42,7 +42,7 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_get.go b/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_get.go index 40640115d27..ddaf36b0df5 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_get.go +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_get.go @@ -45,7 +45,6 @@ func (c CommunicationsGatewaysClient) Get(ctx context.Context, id Communications var model CommunicationsGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_update.go b/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_update.go index 06c8072fcda..353287d9cb2 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_update.go +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/method_update.go @@ -49,7 +49,6 @@ func (c CommunicationsGatewaysClient) Update(ctx context.Context, id Communicati var model CommunicationsGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-09-01/communicationsgateways/version.go b/resource-manager/voiceservices/2023-09-01/communicationsgateways/version.go index 35c7aca74da..5cf3b9041c6 100644 --- a/resource-manager/voiceservices/2023-09-01/communicationsgateways/version.go +++ b/resource-manager/voiceservices/2023-09-01/communicationsgateways/version.go @@ -1,12 +1,10 @@ package communicationsgateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/communicationsgateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/communicationsgateways/2023-09-01" } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/README.md b/resource-manager/voiceservices/2023-09-01/testlines/README.md index f381e665d15..d43c078295f 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/README.md +++ b/resource-manager/voiceservices/2023-09-01/testlines/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-09-01/testlines` Documentation -The `testlines` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-09-01`). +The `testlines` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-09-01/testlines/client.go b/resource-manager/voiceservices/2023-09-01/testlines/client.go index 5fa3aafb49a..21f12c985c4 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/client.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/client.go @@ -15,7 +15,7 @@ type TestLinesClient struct { } func NewTestLinesClientWithBaseURI(sdkApi sdkEnv.Api) (*TestLinesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "testlines", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "testlines", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TestLinesClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/id_communicationsgateway.go b/resource-manager/voiceservices/2023-09-01/testlines/id_communicationsgateway.go index 731d1804df6..eb8a972422c 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/id_communicationsgateway.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/id_communicationsgateway.go @@ -42,7 +42,7 @@ func ParseCommunicationsGatewayID(input string) (*CommunicationsGatewayId, error } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCommunicationsGatewayIDInsensitively(input string) (*CommunicationsGat } id := CommunicationsGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/id_testline.go b/resource-manager/voiceservices/2023-09-01/testlines/id_testline.go index 50e8a440a59..4a194b9373b 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/id_testline.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/id_testline.go @@ -44,7 +44,7 @@ func ParseTestLineID(input string) (*TestLineId, error) { } id := TestLineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTestLineIDInsensitively(input string) (*TestLineId, error) { } id := TestLineId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/method_get.go b/resource-manager/voiceservices/2023-09-01/testlines/method_get.go index 9309c173701..ba21bff3b30 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/method_get.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/method_get.go @@ -45,7 +45,6 @@ func (c TestLinesClient) Get(ctx context.Context, id TestLineId) (result GetOper var model TestLine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/method_update.go b/resource-manager/voiceservices/2023-09-01/testlines/method_update.go index 564e548f96c..1c88d489bf8 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/method_update.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/method_update.go @@ -49,7 +49,6 @@ func (c TestLinesClient) Update(ctx context.Context, id TestLineId, input TestLi var model TestLine result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-09-01/testlines/version.go b/resource-manager/voiceservices/2023-09-01/testlines/version.go index 30292f78104..791ec73f5c1 100644 --- a/resource-manager/voiceservices/2023-09-01/testlines/version.go +++ b/resource-manager/voiceservices/2023-09-01/testlines/version.go @@ -1,12 +1,10 @@ package testlines -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/testlines/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/testlines/2023-09-01" } diff --git a/resource-manager/voiceservices/2023-09-01/voiceservices/README.md b/resource-manager/voiceservices/2023-09-01/voiceservices/README.md index 25546e37f29..f673f2a735d 100644 --- a/resource-manager/voiceservices/2023-09-01/voiceservices/README.md +++ b/resource-manager/voiceservices/2023-09-01/voiceservices/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/voiceservices/2023-09-01/voiceservices` Documentation -The `voiceservices` SDK allows for interaction with the Azure Resource Manager Service `voiceservices` (API Version `2023-09-01`). +The `voiceservices` SDK allows for interaction with Azure Resource Manager `voiceservices` (API Version `2023-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/voiceservices/2023-09-01/voiceservices/client.go b/resource-manager/voiceservices/2023-09-01/voiceservices/client.go index b208d66a723..f4b6ba6dac0 100644 --- a/resource-manager/voiceservices/2023-09-01/voiceservices/client.go +++ b/resource-manager/voiceservices/2023-09-01/voiceservices/client.go @@ -15,7 +15,7 @@ type VoiceservicesClient struct { } func NewVoiceservicesClientWithBaseURI(sdkApi sdkEnv.Api) (*VoiceservicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "voiceservices", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "voiceservices", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating VoiceservicesClient: %+v", err) } diff --git a/resource-manager/voiceservices/2023-09-01/voiceservices/id_location.go b/resource-manager/voiceservices/2023-09-01/voiceservices/id_location.go index c4feec7564d..6883556c6ec 100644 --- a/resource-manager/voiceservices/2023-09-01/voiceservices/id_location.go +++ b/resource-manager/voiceservices/2023-09-01/voiceservices/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/voiceservices/2023-09-01/voiceservices/method_nameavailabilitychecklocal.go b/resource-manager/voiceservices/2023-09-01/voiceservices/method_nameavailabilitychecklocal.go index c90842f9b3f..84ace5e5a7e 100644 --- a/resource-manager/voiceservices/2023-09-01/voiceservices/method_nameavailabilitychecklocal.go +++ b/resource-manager/voiceservices/2023-09-01/voiceservices/method_nameavailabilitychecklocal.go @@ -50,7 +50,6 @@ func (c VoiceservicesClient) NameAvailabilityCheckLocal(ctx context.Context, id var model CheckNameAvailabilityResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/voiceservices/2023-09-01/voiceservices/version.go b/resource-manager/voiceservices/2023-09-01/voiceservices/version.go index 082ce71625a..1ace8217d9a 100644 --- a/resource-manager/voiceservices/2023-09-01/voiceservices/version.go +++ b/resource-manager/voiceservices/2023-09-01/voiceservices/version.go @@ -1,12 +1,10 @@ package voiceservices -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/voiceservices/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/voiceservices/2023-09-01" } diff --git a/resource-manager/web/2016-06-01/connectiongateways/README.md b/resource-manager/web/2016-06-01/connectiongateways/README.md index 09a1b0f21ae..e77402109f4 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/README.md +++ b/resource-manager/web/2016-06-01/connectiongateways/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connectiongateways` Documentation -The `connectiongateways` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2016-06-01`). +The `connectiongateways` SDK allows for interaction with Azure Resource Manager `web` (API Version `2016-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2016-06-01/connectiongateways/client.go b/resource-manager/web/2016-06-01/connectiongateways/client.go index cad6fb0484a..63b4ce84fd9 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/client.go +++ b/resource-manager/web/2016-06-01/connectiongateways/client.go @@ -15,7 +15,7 @@ type ConnectionGatewaysClient struct { } func NewConnectionGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connectiongateways", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connectiongateways", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionGatewaysClient: %+v", err) } diff --git a/resource-manager/web/2016-06-01/connectiongateways/id_connectiongateway.go b/resource-manager/web/2016-06-01/connectiongateways/id_connectiongateway.go index fb6862138f0..45767e263e4 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/id_connectiongateway.go +++ b/resource-manager/web/2016-06-01/connectiongateways/id_connectiongateway.go @@ -42,7 +42,7 @@ func ParseConnectionGatewayID(input string) (*ConnectionGatewayId, error) { } id := ConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionGatewayIDInsensitively(input string) (*ConnectionGatewayId, } id := ConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/connectiongateways/id_connectiongatewayinstallation.go b/resource-manager/web/2016-06-01/connectiongateways/id_connectiongatewayinstallation.go index 04497c85333..875da50fed0 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/id_connectiongatewayinstallation.go +++ b/resource-manager/web/2016-06-01/connectiongateways/id_connectiongatewayinstallation.go @@ -42,7 +42,7 @@ func ParseConnectionGatewayInstallationID(input string) (*ConnectionGatewayInsta } id := ConnectionGatewayInstallationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionGatewayInstallationIDInsensitively(input string) (*Connectio } id := ConnectionGatewayInstallationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/connectiongateways/id_location.go b/resource-manager/web/2016-06-01/connectiongateways/id_location.go index 37563cb3f4a..2775f1157d1 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/id_location.go +++ b/resource-manager/web/2016-06-01/connectiongateways/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationsget.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationsget.go index 204f865a84d..f2cd2942d96 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationsget.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationsget.go @@ -45,7 +45,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewayInstallationsGet(ctx context. var model ConnectionGatewayInstallationDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationslist.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationslist.go index efa023ec61a..71118f112ed 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationslist.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayinstallationslist.go @@ -46,7 +46,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewayInstallationsList(ctx context var model ConnectionGatewayInstallationDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayscreateorupdate.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayscreateorupdate.go index 31c52a9b112..9806d433b7b 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayscreateorupdate.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayscreateorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewaysCreateOrUpdate(ctx context.C var model ConnectionGatewayDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysget.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysget.go index 006c0949b44..9b05b338653 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysget.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysget.go @@ -45,7 +45,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewaysGet(ctx context.Context, id var model ConnectionGatewayDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslist.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslist.go index ad0f6f8b870..6f564be6513 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslist.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslist.go @@ -47,7 +47,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewaysList(ctx context.Context, id var model ConnectionGatewayDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslistbyresourcegroup.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslistbyresourcegroup.go index 617ffafc1fa..785a4ff8487 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslistbyresourcegroup.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewayslistbyresourcegroup.go @@ -47,7 +47,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewaysListByResourceGroup(ctx cont var model ConnectionGatewayDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysupdate.go b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysupdate.go index 329bafa4bbb..4f465f7043b 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysupdate.go +++ b/resource-manager/web/2016-06-01/connectiongateways/method_connectiongatewaysupdate.go @@ -49,7 +49,6 @@ func (c ConnectionGatewaysClient) ConnectionGatewaysUpdate(ctx context.Context, var model ConnectionGatewayDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connectiongateways/version.go b/resource-manager/web/2016-06-01/connectiongateways/version.go index 8f4607512c3..50d9d4de4e0 100644 --- a/resource-manager/web/2016-06-01/connectiongateways/version.go +++ b/resource-manager/web/2016-06-01/connectiongateways/version.go @@ -1,12 +1,10 @@ package connectiongateways -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectiongateways/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connectiongateways/2016-06-01" } diff --git a/resource-manager/web/2016-06-01/connections/README.md b/resource-manager/web/2016-06-01/connections/README.md index e1d2c54076c..6cc29758d06 100644 --- a/resource-manager/web/2016-06-01/connections/README.md +++ b/resource-manager/web/2016-06-01/connections/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections` Documentation -The `connections` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2016-06-01`). +The `connections` SDK allows for interaction with Azure Resource Manager `web` (API Version `2016-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2016-06-01/connections/client.go b/resource-manager/web/2016-06-01/connections/client.go index bbee9fcb333..87b37dfaf09 100644 --- a/resource-manager/web/2016-06-01/connections/client.go +++ b/resource-manager/web/2016-06-01/connections/client.go @@ -15,7 +15,7 @@ type ConnectionsClient struct { } func NewConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connections", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "connections", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ConnectionsClient: %+v", err) } diff --git a/resource-manager/web/2016-06-01/connections/id_connection.go b/resource-manager/web/2016-06-01/connections/id_connection.go index a51bfbeb75f..5766e8710d9 100644 --- a/resource-manager/web/2016-06-01/connections/id_connection.go +++ b/resource-manager/web/2016-06-01/connections/id_connection.go @@ -42,7 +42,7 @@ func ParseConnectionID(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { } id := ConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/connections/method_confirmconsentcode.go b/resource-manager/web/2016-06-01/connections/method_confirmconsentcode.go index 3e27876a6aa..dc6f2b8faaa 100644 --- a/resource-manager/web/2016-06-01/connections/method_confirmconsentcode.go +++ b/resource-manager/web/2016-06-01/connections/method_confirmconsentcode.go @@ -50,7 +50,6 @@ func (c ConnectionsClient) ConfirmConsentCode(ctx context.Context, id Connection var model ConfirmConsentCodeDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/method_createorupdate.go b/resource-manager/web/2016-06-01/connections/method_createorupdate.go index 7f5c404205a..5e2eba3772c 100644 --- a/resource-manager/web/2016-06-01/connections/method_createorupdate.go +++ b/resource-manager/web/2016-06-01/connections/method_createorupdate.go @@ -50,7 +50,6 @@ func (c ConnectionsClient) CreateOrUpdate(ctx context.Context, id ConnectionId, var model ApiConnectionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/method_get.go b/resource-manager/web/2016-06-01/connections/method_get.go index eb729e85f90..c8792449c03 100644 --- a/resource-manager/web/2016-06-01/connections/method_get.go +++ b/resource-manager/web/2016-06-01/connections/method_get.go @@ -45,7 +45,6 @@ func (c ConnectionsClient) Get(ctx context.Context, id ConnectionId) (result Get var model ApiConnectionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/method_list.go b/resource-manager/web/2016-06-01/connections/method_list.go index 97c5f6b54cb..9ffc5523cac 100644 --- a/resource-manager/web/2016-06-01/connections/method_list.go +++ b/resource-manager/web/2016-06-01/connections/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c ConnectionsClient) List(ctx context.Context, id commonids.ResourceGroupI var model ApiConnectionDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/method_listconsentlinks.go b/resource-manager/web/2016-06-01/connections/method_listconsentlinks.go index e9ca4dd4e9b..e0f746d1d11 100644 --- a/resource-manager/web/2016-06-01/connections/method_listconsentlinks.go +++ b/resource-manager/web/2016-06-01/connections/method_listconsentlinks.go @@ -50,7 +50,6 @@ func (c ConnectionsClient) ListConsentLinks(ctx context.Context, id ConnectionId var model ConsentLinkCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/method_update.go b/resource-manager/web/2016-06-01/connections/method_update.go index 52ebb84983b..491cf785127 100644 --- a/resource-manager/web/2016-06-01/connections/method_update.go +++ b/resource-manager/web/2016-06-01/connections/method_update.go @@ -49,7 +49,6 @@ func (c ConnectionsClient) Update(ctx context.Context, id ConnectionId, input Ap var model ApiConnectionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/connections/version.go b/resource-manager/web/2016-06-01/connections/version.go index dc9f5850fc3..653db53e855 100644 --- a/resource-manager/web/2016-06-01/connections/version.go +++ b/resource-manager/web/2016-06-01/connections/version.go @@ -1,12 +1,10 @@ package connections -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connections/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/connections/2016-06-01" } diff --git a/resource-manager/web/2016-06-01/customapis/README.md b/resource-manager/web/2016-06-01/customapis/README.md index d04eeb25cb9..dbd54ddf998 100644 --- a/resource-manager/web/2016-06-01/customapis/README.md +++ b/resource-manager/web/2016-06-01/customapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/customapis` Documentation -The `customapis` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2016-06-01`). +The `customapis` SDK allows for interaction with Azure Resource Manager `web` (API Version `2016-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2016-06-01/customapis/client.go b/resource-manager/web/2016-06-01/customapis/client.go index 79cd490e18f..506e9991fc2 100644 --- a/resource-manager/web/2016-06-01/customapis/client.go +++ b/resource-manager/web/2016-06-01/customapis/client.go @@ -15,7 +15,7 @@ type CustomAPIsClient struct { } func NewCustomAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "customapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "customapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CustomAPIsClient: %+v", err) } diff --git a/resource-manager/web/2016-06-01/customapis/id_customapi.go b/resource-manager/web/2016-06-01/customapis/id_customapi.go index 0a4d2be615a..0480b5cc064 100644 --- a/resource-manager/web/2016-06-01/customapis/id_customapi.go +++ b/resource-manager/web/2016-06-01/customapis/id_customapi.go @@ -42,7 +42,7 @@ func ParseCustomApiID(input string) (*CustomApiId, error) { } id := CustomApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCustomApiIDInsensitively(input string) (*CustomApiId, error) { } id := CustomApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/customapis/id_location.go b/resource-manager/web/2016-06-01/customapis/id_location.go index b36b4c77cd6..c0d10be86da 100644 --- a/resource-manager/web/2016-06-01/customapis/id_location.go +++ b/resource-manager/web/2016-06-01/customapis/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/customapis/method_createorupdate.go b/resource-manager/web/2016-06-01/customapis/method_createorupdate.go index 5e74fe2837f..49e968331fb 100644 --- a/resource-manager/web/2016-06-01/customapis/method_createorupdate.go +++ b/resource-manager/web/2016-06-01/customapis/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CustomAPIsClient) CreateOrUpdate(ctx context.Context, id CustomApiId, in var model CustomApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_extractapidefinitionfromwsdl.go b/resource-manager/web/2016-06-01/customapis/method_extractapidefinitionfromwsdl.go index f76e6b95e1b..78eb9c783be 100644 --- a/resource-manager/web/2016-06-01/customapis/method_extractapidefinitionfromwsdl.go +++ b/resource-manager/web/2016-06-01/customapis/method_extractapidefinitionfromwsdl.go @@ -50,7 +50,6 @@ func (c CustomAPIsClient) ExtractApiDefinitionFromWsdl(ctx context.Context, id L var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_get.go b/resource-manager/web/2016-06-01/customapis/method_get.go index 8e7debd1bce..36943b22e57 100644 --- a/resource-manager/web/2016-06-01/customapis/method_get.go +++ b/resource-manager/web/2016-06-01/customapis/method_get.go @@ -45,7 +45,6 @@ func (c CustomAPIsClient) Get(ctx context.Context, id CustomApiId) (result GetOp var model CustomApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_list.go b/resource-manager/web/2016-06-01/customapis/method_list.go index 4eb1988f163..26d6cd76a3d 100644 --- a/resource-manager/web/2016-06-01/customapis/method_list.go +++ b/resource-manager/web/2016-06-01/customapis/method_list.go @@ -36,6 +36,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CustomAPIsClient) List(ctx context.Context, id commonids.SubscriptionId, var model CustomApiDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_listbyresourcegroup.go b/resource-manager/web/2016-06-01/customapis/method_listbyresourcegroup.go index 7e5efd7e31e..cc0f4086862 100644 --- a/resource-manager/web/2016-06-01/customapis/method_listbyresourcegroup.go +++ b/resource-manager/web/2016-06-01/customapis/method_listbyresourcegroup.go @@ -36,6 +36,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -79,7 +80,6 @@ func (c CustomAPIsClient) ListByResourceGroup(ctx context.Context, id commonids. var model CustomApiDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_listwsdlinterfaces.go b/resource-manager/web/2016-06-01/customapis/method_listwsdlinterfaces.go index 92144a05a40..d14c6467a71 100644 --- a/resource-manager/web/2016-06-01/customapis/method_listwsdlinterfaces.go +++ b/resource-manager/web/2016-06-01/customapis/method_listwsdlinterfaces.go @@ -50,7 +50,6 @@ func (c CustomAPIsClient) ListWsdlInterfaces(ctx context.Context, id LocationId, var model WsdlServiceCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/method_update.go b/resource-manager/web/2016-06-01/customapis/method_update.go index b173afd293d..465649b3c27 100644 --- a/resource-manager/web/2016-06-01/customapis/method_update.go +++ b/resource-manager/web/2016-06-01/customapis/method_update.go @@ -49,7 +49,6 @@ func (c CustomAPIsClient) Update(ctx context.Context, id CustomApiId, input Cust var model CustomApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/customapis/version.go b/resource-manager/web/2016-06-01/customapis/version.go index 11a5a05fa8e..37e588d345a 100644 --- a/resource-manager/web/2016-06-01/customapis/version.go +++ b/resource-manager/web/2016-06-01/customapis/version.go @@ -1,12 +1,10 @@ package customapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/customapis/2016-06-01" } diff --git a/resource-manager/web/2016-06-01/managedapis/README.md b/resource-manager/web/2016-06-01/managedapis/README.md index d28522cdc96..6979c014a64 100644 --- a/resource-manager/web/2016-06-01/managedapis/README.md +++ b/resource-manager/web/2016-06-01/managedapis/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis` Documentation -The `managedapis` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2016-06-01`). +The `managedapis` SDK allows for interaction with Azure Resource Manager `web` (API Version `2016-06-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2016-06-01/managedapis/client.go b/resource-manager/web/2016-06-01/managedapis/client.go index 2270d1b613c..7a27abbc894 100644 --- a/resource-manager/web/2016-06-01/managedapis/client.go +++ b/resource-manager/web/2016-06-01/managedapis/client.go @@ -15,7 +15,7 @@ type ManagedAPIsClient struct { } func NewManagedAPIsClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedAPIsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "managedapis", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "managedapis", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ManagedAPIsClient: %+v", err) } diff --git a/resource-manager/web/2016-06-01/managedapis/id_location.go b/resource-manager/web/2016-06-01/managedapis/id_location.go index 0377645861f..6ac11b29557 100644 --- a/resource-manager/web/2016-06-01/managedapis/id_location.go +++ b/resource-manager/web/2016-06-01/managedapis/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/managedapis/id_managedapi.go b/resource-manager/web/2016-06-01/managedapis/id_managedapi.go index d5acc99f4f8..3cefabb7307 100644 --- a/resource-manager/web/2016-06-01/managedapis/id_managedapi.go +++ b/resource-manager/web/2016-06-01/managedapis/id_managedapi.go @@ -42,7 +42,7 @@ func ParseManagedApiID(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseManagedApiIDInsensitively(input string) (*ManagedApiId, error) { } id := ManagedApiId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2016-06-01/managedapis/method_get.go b/resource-manager/web/2016-06-01/managedapis/method_get.go index 41230da50fd..654a0c4c357 100644 --- a/resource-manager/web/2016-06-01/managedapis/method_get.go +++ b/resource-manager/web/2016-06-01/managedapis/method_get.go @@ -45,7 +45,6 @@ func (c ManagedAPIsClient) Get(ctx context.Context, id ManagedApiId) (result Get var model ManagedApiDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/managedapis/method_list.go b/resource-manager/web/2016-06-01/managedapis/method_list.go index 2d52b820093..07d6555e812 100644 --- a/resource-manager/web/2016-06-01/managedapis/method_list.go +++ b/resource-manager/web/2016-06-01/managedapis/method_list.go @@ -46,7 +46,6 @@ func (c ManagedAPIsClient) List(ctx context.Context, id LocationId) (result List var model ManagedApiDefinitionCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2016-06-01/managedapis/version.go b/resource-manager/web/2016-06-01/managedapis/version.go index ef8a838ad43..3be5c19f5de 100644 --- a/resource-manager/web/2016-06-01/managedapis/version.go +++ b/resource-manager/web/2016-06-01/managedapis/version.go @@ -1,12 +1,10 @@ package managedapis -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2016-06-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/managedapis/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/managedapis/2016-06-01" } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/README.md b/resource-manager/web/2022-09-01/appservicecertificateorders/README.md index e019b7eeb65..3aaa21cb021 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/README.md +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/appservicecertificateorders` Documentation -The `appservicecertificateorders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `appservicecertificateorders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/client.go b/resource-manager/web/2022-09-01/appservicecertificateorders/client.go index 06d6b4e2962..a4c0860883e 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/client.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/client.go @@ -15,7 +15,7 @@ type AppServiceCertificateOrdersClient struct { } func NewAppServiceCertificateOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceCertificateOrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appservicecertificateorders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appservicecertificateorders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceCertificateOrdersClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificate.go b/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificate.go index e1678574f38..1cfbd9818b8 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificate.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificateorder.go b/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificateorder.go index 7f0356716b2..40a1673c4a0 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificateorder.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_get.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_get.go index b4df83fdd65..452a170346a 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_get.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_get.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) Get(ctx context.Context, id Certifica var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_getcertificate.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_getcertificate.go index 45675824b49..0418d289349 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_getcertificate.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_getcertificate.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) GetCertificate(ctx context.Context, i var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateactions.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateactions.go index 306f696af31..51a8af70e7f 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateactions.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateactions.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateActions(ctx contex var model []CertificateOrderAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateemailhistory.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateemailhistory.go index 7fc5e4324d7..84feccdb804 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateemailhistory.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievecertificateemailhistory.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistory(ctx c var model []CertificateEmail result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievesiteseal.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievesiteseal.go index d84e5f86511..160d1b5010b 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievesiteseal.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_retrievesiteseal.go @@ -50,7 +50,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, var model SiteSeal result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_update.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_update.go index 999e03e24ae..cebc44fbccc 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_update.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_update.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) Update(ctx context.Context, id Certif var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/method_updatecertificate.go b/resource-manager/web/2022-09-01/appservicecertificateorders/method_updatecertificate.go index b94998c44aa..8ebfd637ea5 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/method_updatecertificate.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/method_updatecertificate.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) UpdateCertificate(ctx context.Context var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appservicecertificateorders/version.go b/resource-manager/web/2022-09-01/appservicecertificateorders/version.go index 4f3d02c4f28..43d13e5e8d9 100644 --- a/resource-manager/web/2022-09-01/appservicecertificateorders/version.go +++ b/resource-manager/web/2022-09-01/appservicecertificateorders/version.go @@ -1,12 +1,10 @@ package appservicecertificateorders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appservicecertificateorders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appservicecertificateorders/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/README.md b/resource-manager/web/2022-09-01/appserviceenvironments/README.md index cebd72fafff..b7778583438 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/README.md +++ b/resource-manager/web/2022-09-01/appserviceenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/appserviceenvironments` Documentation -The `appserviceenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `appserviceenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/client.go b/resource-manager/web/2022-09-01/appserviceenvironments/client.go index b9c0ff155f6..706ca7d556d 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/client.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/client.go @@ -15,7 +15,7 @@ type AppServiceEnvironmentsClient struct { } func NewAppServiceEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/id_defaultinstance.go b/resource-manager/web/2022-09-01/appserviceenvironments/id_defaultinstance.go index 5636848009c..5d4e58b6ec5 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/id_defaultinstance.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/id_defaultinstance.go @@ -44,7 +44,7 @@ func ParseDefaultInstanceID(input string) (*DefaultInstanceId, error) { } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultInstanceIDInsensitively(input string) (*DefaultInstanceId, erro } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go b/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go index feeb735318a..a57a42cd9c7 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDiagnosticID(input string) (*HostingEnvironmentDiagn } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDiagnosticIDInsensitively(input string) (*HostingEnv } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go b/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go index bbba42867e3..d470b108670 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionID(input string) (*HostingE } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionIDInsensitively(input strin } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpool.go b/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpool.go index 463fca27669..5245cac292e 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpool.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpool.go @@ -44,7 +44,7 @@ func ParseWorkerPoolID(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerPoolIDInsensitively(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpoolinstance.go b/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpoolinstance.go index 0bf747795a2..02141e0cf14 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpoolinstance.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/id_workerpoolinstance.go @@ -46,7 +46,7 @@ func ParseWorkerPoolInstanceID(input string) (*WorkerPoolInstanceId, error) { } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkerPoolInstanceIDInsensitively(input string) (*WorkerPoolInstanceId } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_delete.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_delete.go index 55cf71e5108..f8fb37d265b 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_delete.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go index 911c456e29b..c5871258555 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go @@ -48,7 +48,6 @@ func (c AppServiceEnvironmentsClient) DeleteAseCustomDnsSuffixConfiguration(ctx var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_get.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_get.go index 2e5e2bb0d14..19b2bdb044f 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_get.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_get.go @@ -46,7 +46,6 @@ func (c AppServiceEnvironmentsClient) Get(ctx context.Context, id commonids.AppS var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go index 9be53936c71..01f38db8a6e 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseCustomDnsSuffixConfiguration(ctx con var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getasev3networkingconfiguration.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getasev3networkingconfiguration.go index 1ca5a50286f..3815d5e3c5e 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getasev3networkingconfiguration.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getasev3networkingconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseV3NetworkingConfiguration(ctx contex var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getdiagnosticsitem.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getdiagnosticsitem.go index b6d0e47a783..681cc63213c 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getdiagnosticsitem.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getdiagnosticsitem.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetDiagnosticsItem(ctx context.Context, id var model HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getmultirolepool.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getmultirolepool.go index 8823968375d..7cbd25047b9 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getmultirolepool.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getmultirolepool.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetMultiRolePool(ctx context.Context, id c var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivateendpointconnection.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivateendpointconnection.go index 6bf182be11e..714c1276f69 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateEndpointConnection(ctx context.C var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivatelinkresources.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivatelinkresources.go index e0c2f0c4365..ecd193a3901 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivatelinkresources.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateLinkResources(ctx context.Contex var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getvipinfo.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getvipinfo.go index a0f52038b9c..ef0c4a7c970 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getvipinfo.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getvipinfo.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetVipInfo(ctx context.Context, id commoni var model AddressResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_getworkerpool.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_getworkerpool.go index bd617d301a8..f18c4334f8a 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_getworkerpool.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_getworkerpool.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetWorkerPool(ctx context.Context, id Work var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_listdiagnostics.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_listdiagnostics.go index 050adc5112e..0b07c6c4a90 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_listdiagnostics.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_listdiagnostics.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListDiagnostics(ctx context.Context, id co var model []HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_listoperations.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_listoperations.go index 49fef987d75..cc96adc214e 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_listoperations.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_listoperations.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListOperations(ctx context.Context, id com var model []Operation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_listusages.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_listusages.go index c12dab87aa4..2fdba17a92e 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_listusages.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_listwebapps.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_listwebapps.go index 6adb4062cbe..2c63e81b80b 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_listwebapps.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_listwebapps.go @@ -40,6 +40,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_update.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_update.go index c3afa9e6f0d..eeba2343384 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_update.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_update.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) Update(ctx context.Context, id commonids.A var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go index 376d25fe92b..84b44271ed7 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseCustomDnsSuffixConfiguration(ctx var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasenetworkingconfiguration.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasenetworkingconfiguration.go index 0661a11d23d..d215f8021fa 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasenetworkingconfiguration.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateasenetworkingconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseNetworkingConfiguration(ctx conte var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_updatemultirolepool.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_updatemultirolepool.go index d71d810e1d4..22ee8b00991 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_updatemultirolepool.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_updatemultirolepool.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) UpdateMultiRolePool(ctx context.Context, i var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateworkerpool.go b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateworkerpool.go index 85733a6f536..42b61ccc4f7 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/method_updateworkerpool.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/method_updateworkerpool.go @@ -50,7 +50,6 @@ func (c AppServiceEnvironmentsClient) UpdateWorkerPool(ctx context.Context, id W var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceenvironments/version.go b/resource-manager/web/2022-09-01/appserviceenvironments/version.go index 35839bfc8b1..1089d2b21b3 100644 --- a/resource-manager/web/2022-09-01/appserviceenvironments/version.go +++ b/resource-manager/web/2022-09-01/appserviceenvironments/version.go @@ -1,12 +1,10 @@ package appserviceenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceenvironments/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/appserviceplans/README.md b/resource-manager/web/2022-09-01/appserviceplans/README.md index a0c21e1edaa..9195cc0d3db 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/README.md +++ b/resource-manager/web/2022-09-01/appserviceplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/appserviceplans` Documentation -The `appserviceplans` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `appserviceplans` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/appserviceplans/client.go b/resource-manager/web/2022-09-01/appserviceplans/client.go index 8fe56fbaa27..9afc7d23899 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/client.go +++ b/resource-manager/web/2022-09-01/appserviceplans/client.go @@ -15,7 +15,7 @@ type AppServicePlansClient struct { } func NewAppServicePlansClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServicePlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServicePlansClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/appserviceplans/id_hybridconnectionnamespacerelay.go b/resource-manager/web/2022-09-01/appserviceplans/id_hybridconnectionnamespacerelay.go index 2b32c834b81..58ea2b5a799 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/id_hybridconnectionnamespacerelay.go +++ b/resource-manager/web/2022-09-01/appserviceplans/id_hybridconnectionnamespacerelay.go @@ -46,7 +46,7 @@ func ParseHybridConnectionNamespaceRelayID(input string) (*HybridConnectionNames } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridConnectionNamespaceRelayIDInsensitively(input string) (*HybridCo } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceplans/id_route.go b/resource-manager/web/2022-09-01/appserviceplans/id_route.go index ad716f02546..359ff342f03 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/id_route.go +++ b/resource-manager/web/2022-09-01/appserviceplans/id_route.go @@ -46,7 +46,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go b/resource-manager/web/2022-09-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go index 17ab90193a3..b87f1cefc87 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go +++ b/resource-manager/web/2022-09-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseServerFarmVirtualNetworkConnectionID(input string) (*ServerFarmVirtual } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerFarmVirtualNetworkConnectionIDInsensitively(input string) (*Serv } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceplans/id_virtualnetworkconnectiongateway.go b/resource-manager/web/2022-09-01/appserviceplans/id_virtualnetworkconnectiongateway.go index fd8f8a5724d..795627bdf7f 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/id_virtualnetworkconnectiongateway.go +++ b/resource-manager/web/2022-09-01/appserviceplans/id_virtualnetworkconnectiongateway.go @@ -46,7 +46,7 @@ func ParseVirtualNetworkConnectionGatewayID(input string) (*VirtualNetworkConnec } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Virtual } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceplans/id_worker.go b/resource-manager/web/2022-09-01/appserviceplans/id_worker.go index 284032cb1f8..a66c95a7219 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/id_worker.go +++ b/resource-manager/web/2022-09-01/appserviceplans/id_worker.go @@ -44,7 +44,7 @@ func ParseWorkerID(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerIDInsensitively(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_createorupdatevnetroute.go b/resource-manager/web/2022-09-01/appserviceplans/method_createorupdatevnetroute.go index c61bc8980f7..a25c348ca80 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_createorupdatevnetroute.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_createorupdatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) CreateOrUpdateVnetRoute(ctx context.Context, id R var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_get.go b/resource-manager/web/2022-09-01/appserviceplans/method_get.go index a4d52b636e6..e8c9fc7e49c 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_get.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_get.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) Get(ctx context.Context, id commonids.AppServiceP var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnection.go b/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnection.go index 61c582b536d..76d08712a13 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnection.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetHybridConnection(ctx context.Context, id Hybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnectionplanlimit.go b/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnectionplanlimit.go index b6099bdcb7f..5fdd323b80c 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnectionplanlimit.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_gethybridconnectionplanlimit.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetHybridConnectionPlanLimit(ctx context.Context, var model HybridConnectionLimits result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_getrouteforvnet.go b/resource-manager/web/2022-09-01/appserviceplans/method_getrouteforvnet.go index 338777c766d..43c608e9890 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_getrouteforvnet.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_getrouteforvnet.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetRouteForVnet(ctx context.Context, id RouteId) var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_getserverfarmskus.go b/resource-manager/web/2022-09-01/appserviceplans/method_getserverfarmskus.go index 227a69198de..bbd1499852a 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_getserverfarmskus.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_getserverfarmskus.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetServerFarmSkus(ctx context.Context, id commoni var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_getvnetfromserverfarm.go b/resource-manager/web/2022-09-01/appserviceplans/method_getvnetfromserverfarm.go index 3190297402b..650f8a3926f 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_getvnetfromserverfarm.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_getvnetfromserverfarm.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetFromServerFarm(ctx context.Context, id Ser var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_getvnetgateway.go b/resource-manager/web/2022-09-01/appserviceplans/method_getvnetgateway.go index ce36c736228..f1892454285 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_getvnetgateway.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_getvnetgateway.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetGateway(ctx context.Context, id VirtualNet var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_list.go b/resource-manager/web/2022-09-01/appserviceplans/method_list.go index 6825b73b994..6487ac4dcb4 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_list.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listcapabilities.go b/resource-manager/web/2022-09-01/appserviceplans/method_listcapabilities.go index 5720548c003..2c65ef4aae9 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listcapabilities.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listcapabilities.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListCapabilities(ctx context.Context, id commonid var model []Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listhybridconnectionkeys.go b/resource-manager/web/2022-09-01/appserviceplans/method_listhybridconnectionkeys.go index 874cdd76c26..78f4e16f7b6 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listhybridconnectionkeys.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listhybridconnectionkeys.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListHybridConnectionKeys(ctx context.Context, id var model HybridConnectionKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listroutesforvnet.go b/resource-manager/web/2022-09-01/appserviceplans/method_listroutesforvnet.go index 84c82c62f54..cea1ee3b594 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listroutesforvnet.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listroutesforvnet.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListRoutesForVnet(ctx context.Context, id ServerF var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listusages.go b/resource-manager/web/2022-09-01/appserviceplans/method_listusages.go index ba526d56a55..11927a25518 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listusages.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listvnets.go b/resource-manager/web/2022-09-01/appserviceplans/method_listvnets.go index 39863133e91..1779fca1033 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listvnets.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listvnets.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListVnets(ctx context.Context, id commonids.AppSe var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_listwebapps.go b/resource-manager/web/2022-09-01/appserviceplans/method_listwebapps.go index facb051bd72..112b9dd14f8 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_listwebapps.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_listwebapps.go @@ -41,6 +41,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_restartwebapps.go b/resource-manager/web/2022-09-01/appserviceplans/method_restartwebapps.go index 0eb829e73f3..e6b604d940c 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_restartwebapps.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_restartwebapps.go @@ -34,6 +34,7 @@ func (o RestartWebAppsOperationOptions) ToHeaders() *client.Headers { func (o RestartWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_update.go b/resource-manager/web/2022-09-01/appserviceplans/method_update.go index 8c369f53a74..cc2bebbb8cc 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_update.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_update.go @@ -51,7 +51,6 @@ func (c AppServicePlansClient) Update(ctx context.Context, id commonids.AppServi var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetgateway.go b/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetgateway.go index a0861673f2a..084885def91 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetgateway.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetgateway.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetGateway(ctx context.Context, id Virtual var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetroute.go b/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetroute.go index 38d2438c46c..0d8db289b93 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetroute.go +++ b/resource-manager/web/2022-09-01/appserviceplans/method_updatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetRoute(ctx context.Context, id RouteId, var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/appserviceplans/version.go b/resource-manager/web/2022-09-01/appserviceplans/version.go index 80ce0a29e5a..9433859e8e5 100644 --- a/resource-manager/web/2022-09-01/appserviceplans/version.go +++ b/resource-manager/web/2022-09-01/appserviceplans/version.go @@ -1,12 +1,10 @@ package appserviceplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceplans/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/README.md b/resource-manager/web/2022-09-01/certificateordersdiagnostics/README.md index 6c90aed91ba..80f18c2732d 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/README.md +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/certificateordersdiagnostics` Documentation -The `certificateordersdiagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `certificateordersdiagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/client.go b/resource-manager/web/2022-09-01/certificateordersdiagnostics/client.go index b050da126b5..710732b4d7f 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/client.go +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/client.go @@ -15,7 +15,7 @@ type CertificateOrdersDiagnosticsClient struct { } func NewCertificateOrdersDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateOrdersDiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateOrdersDiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_certificateorder.go b/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_certificateorder.go index 050fa6199a7..6ebb64e3662 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_certificateorder.go +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_detector.go b/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_detector.go index fe633a846ad..63c20115494 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_detector.go +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go b/resource-manager/web/2022-09-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go index 234f65f33a3..15ff71d98cd 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToHeaders func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetecto var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/certificateordersdiagnostics/version.go b/resource-manager/web/2022-09-01/certificateordersdiagnostics/version.go index f5fd268203e..8e9f1534f09 100644 --- a/resource-manager/web/2022-09-01/certificateordersdiagnostics/version.go +++ b/resource-manager/web/2022-09-01/certificateordersdiagnostics/version.go @@ -1,12 +1,10 @@ package certificateordersdiagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateordersdiagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateordersdiagnostics/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/certificates/README.md b/resource-manager/web/2022-09-01/certificates/README.md index 3571ca3e573..3c9a09874e8 100644 --- a/resource-manager/web/2022-09-01/certificates/README.md +++ b/resource-manager/web/2022-09-01/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `certificates` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/certificates/client.go b/resource-manager/web/2022-09-01/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/web/2022-09-01/certificates/client.go +++ b/resource-manager/web/2022-09-01/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/certificates/id_certificate.go b/resource-manager/web/2022-09-01/certificates/id_certificate.go index 24c9696e478..09346b12fa4 100644 --- a/resource-manager/web/2022-09-01/certificates/id_certificate.go +++ b/resource-manager/web/2022-09-01/certificates/id_certificate.go @@ -42,7 +42,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/certificates/method_createorupdate.go b/resource-manager/web/2022-09-01/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/web/2022-09-01/certificates/method_createorupdate.go +++ b/resource-manager/web/2022-09-01/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/certificates/method_get.go b/resource-manager/web/2022-09-01/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/web/2022-09-01/certificates/method_get.go +++ b/resource-manager/web/2022-09-01/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/certificates/method_list.go b/resource-manager/web/2022-09-01/certificates/method_list.go index aaa547d06bb..b9bba8df177 100644 --- a/resource-manager/web/2022-09-01/certificates/method_list.go +++ b/resource-manager/web/2022-09-01/certificates/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/certificates/method_update.go b/resource-manager/web/2022-09-01/certificates/method_update.go index 038cd440dd0..e0cf13140fe 100644 --- a/resource-manager/web/2022-09-01/certificates/method_update.go +++ b/resource-manager/web/2022-09-01/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/certificates/version.go b/resource-manager/web/2022-09-01/certificates/version.go index e601c648742..66bdc24f215 100644 --- a/resource-manager/web/2022-09-01/certificates/version.go +++ b/resource-manager/web/2022-09-01/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/containerapps/README.md b/resource-manager/web/2022-09-01/containerapps/README.md index 2b878e5521c..7b368a7dcf0 100644 --- a/resource-manager/web/2022-09-01/containerapps/README.md +++ b/resource-manager/web/2022-09-01/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/containerapps/client.go b/resource-manager/web/2022-09-01/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/web/2022-09-01/containerapps/client.go +++ b/resource-manager/web/2022-09-01/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/containerapps/id_containerapp.go b/resource-manager/web/2022-09-01/containerapps/id_containerapp.go index c7991c1dbc4..2fe43c431b6 100644 --- a/resource-manager/web/2022-09-01/containerapps/id_containerapp.go +++ b/resource-manager/web/2022-09-01/containerapps/id_containerapp.go @@ -40,7 +40,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/containerapps/id_providercontainerapp.go b/resource-manager/web/2022-09-01/containerapps/id_providercontainerapp.go index 6493d543e2b..ead4cf96efc 100644 --- a/resource-manager/web/2022-09-01/containerapps/id_providercontainerapp.go +++ b/resource-manager/web/2022-09-01/containerapps/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/containerapps/method_get.go b/resource-manager/web/2022-09-01/containerapps/method_get.go index def3a75c5e8..66c664a40cb 100644 --- a/resource-manager/web/2022-09-01/containerapps/method_get.go +++ b/resource-manager/web/2022-09-01/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ProviderContainerAppId) var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/containerapps/method_listsecrets.go b/resource-manager/web/2022-09-01/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/web/2022-09-01/containerapps/method_listsecrets.go +++ b/resource-manager/web/2022-09-01/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/containerapps/version.go b/resource-manager/web/2022-09-01/containerapps/version.go index 9f947fd602e..2c0d941043f 100644 --- a/resource-manager/web/2022-09-01/containerapps/version.go +++ b/resource-manager/web/2022-09-01/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/README.md b/resource-manager/web/2022-09-01/containerappsrevisions/README.md index b5221c5b18c..c4c89b0e6ac 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/README.md +++ b/resource-manager/web/2022-09-01/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/client.go b/resource-manager/web/2022-09-01/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/client.go +++ b/resource-manager/web/2022-09-01/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/id_providercontainerapp.go b/resource-manager/web/2022-09-01/containerappsrevisions/id_providercontainerapp.go index f9d222c17f9..ebdc450ab3b 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/id_providercontainerapp.go +++ b/resource-manager/web/2022-09-01/containerappsrevisions/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/id_revision.go b/resource-manager/web/2022-09-01/containerappsrevisions/id_revision.go index 9c531d6051b..4279a4f1e42 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/id_revision.go +++ b/resource-manager/web/2022-09-01/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/method_getrevision.go b/resource-manager/web/2022-09-01/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/method_getrevision.go +++ b/resource-manager/web/2022-09-01/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/containerappsrevisions/version.go b/resource-manager/web/2022-09-01/containerappsrevisions/version.go index eff9fe508d0..257151cc458 100644 --- a/resource-manager/web/2022-09-01/containerappsrevisions/version.go +++ b/resource-manager/web/2022-09-01/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/deletedwebapps/README.md b/resource-manager/web/2022-09-01/deletedwebapps/README.md index 427674fabe9..95071ba2ca0 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/README.md +++ b/resource-manager/web/2022-09-01/deletedwebapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/deletedwebapps` Documentation -The `deletedwebapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `deletedwebapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/deletedwebapps/client.go b/resource-manager/web/2022-09-01/deletedwebapps/client.go index 7627ffe88fa..75d69e08194 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/client.go +++ b/resource-manager/web/2022-09-01/deletedwebapps/client.go @@ -15,7 +15,7 @@ type DeletedWebAppsClient struct { } func NewDeletedWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedwebapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedwebapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWebAppsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/deletedwebapps/id_locationdeletedsite.go b/resource-manager/web/2022-09-01/deletedwebapps/id_locationdeletedsite.go index 38e9300d296..ed6298d0960 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/id_locationdeletedsite.go +++ b/resource-manager/web/2022-09-01/deletedwebapps/id_locationdeletedsite.go @@ -42,7 +42,7 @@ func ParseLocationDeletedSiteID(input string) (*LocationDeletedSiteId, error) { } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationDeletedSiteIDInsensitively(input string) (*LocationDeletedSite } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/deletedwebapps/id_providerlocation.go b/resource-manager/web/2022-09-01/deletedwebapps/id_providerlocation.go index 34206ea2e60..b9d33204fbf 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/id_providerlocation.go +++ b/resource-manager/web/2022-09-01/deletedwebapps/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/deletedwebapps/method_getdeletedwebappbylocation.go b/resource-manager/web/2022-09-01/deletedwebapps/method_getdeletedwebappbylocation.go index c3b5013c659..c60231dbc7b 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/method_getdeletedwebappbylocation.go +++ b/resource-manager/web/2022-09-01/deletedwebapps/method_getdeletedwebappbylocation.go @@ -45,7 +45,6 @@ func (c DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, id var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/deletedwebapps/version.go b/resource-manager/web/2022-09-01/deletedwebapps/version.go index 08ac10bfbc5..5a7a5295a71 100644 --- a/resource-manager/web/2022-09-01/deletedwebapps/version.go +++ b/resource-manager/web/2022-09-01/deletedwebapps/version.go @@ -1,12 +1,10 @@ package deletedwebapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedwebapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedwebapps/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/diagnostics/README.md b/resource-manager/web/2022-09-01/diagnostics/README.md index 221f433ba28..c0cb96a0b8b 100644 --- a/resource-manager/web/2022-09-01/diagnostics/README.md +++ b/resource-manager/web/2022-09-01/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/diagnostics/client.go b/resource-manager/web/2022-09-01/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/web/2022-09-01/diagnostics/client.go +++ b/resource-manager/web/2022-09-01/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_analysis.go b/resource-manager/web/2022-09-01/diagnostics/id_analysis.go index cf164a66cd5..d622f811794 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_analysis.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_analysis.go @@ -46,7 +46,7 @@ func ParseAnalysisID(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAnalysisIDInsensitively(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_detector.go b/resource-manager/web/2022-09-01/diagnostics/id_detector.go index 89042fab54f..5b71ac68e51 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_detector.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_diagnostic.go b/resource-manager/web/2022-09-01/diagnostics/id_diagnostic.go index 156adb806c7..d5938a967a3 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_diagnostic.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_diagnosticanalysis.go b/resource-manager/web/2022-09-01/diagnostics/id_diagnosticanalysis.go index 28ed452f661..7626a3e53c8 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_diagnosticanalysis.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_diagnosticanalysis.go @@ -48,7 +48,7 @@ func ParseDiagnosticAnalysisID(input string) (*DiagnosticAnalysisId, error) { } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDiagnosticAnalysisIDInsensitively(input string) (*DiagnosticAnalysisId } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_diagnosticdetector.go b/resource-manager/web/2022-09-01/diagnostics/id_diagnosticdetector.go index a6d345670d9..6b2d8cebcab 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_diagnosticdetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_diagnosticdetector.go @@ -46,7 +46,7 @@ func ParseDiagnosticDetectorID(input string) (*DiagnosticDetectorId, error) { } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiagnosticDetectorIDInsensitively(input string) (*DiagnosticDetectorId } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_hostingenvironmentdetector.go b/resource-manager/web/2022-09-01/diagnostics/id_hostingenvironmentdetector.go index 7bf33585a6a..fa6d503548e 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_hostingenvironmentdetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_hostingenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDetectorID(input string) (*HostingEnvironmentDetecto } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDetectorIDInsensitively(input string) (*HostingEnvir } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_slot.go b/resource-manager/web/2022-09-01/diagnostics/id_slot.go index 3a3f6dcbfba..7d54200ef3f 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_slot.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_slotdetector.go b/resource-manager/web/2022-09-01/diagnostics/id_slotdetector.go index bc38b43b06a..b06d1afa980 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_slotdetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_slotdetector.go @@ -46,7 +46,7 @@ func ParseSlotDetectorID(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDetectorIDInsensitively(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnostic.go b/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnostic.go index 3dc67da36a9..92f3e285e81 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnostic.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnostic.go @@ -46,7 +46,7 @@ func ParseSlotDiagnosticID(input string) (*SlotDiagnosticId, error) { } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDiagnosticIDInsensitively(input string) (*SlotDiagnosticId, error) } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnosticdetector.go b/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnosticdetector.go index 73d9c680c8f..7662d90c174 100644 --- a/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnosticdetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/id_slotdiagnosticdetector.go @@ -48,7 +48,7 @@ func ParseSlotDiagnosticDetectorID(input string) (*SlotDiagnosticDetectorId, err } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotDiagnosticDetectorIDInsensitively(input string) (*SlotDiagnosticDe } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysis.go b/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysis.go index 39c10eb722f..d9114e45262 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysis.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysis.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, id AnalysisI var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysisslot.go b/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysisslot.go index cdfb303e3a3..fb43cf7b571 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysisslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_executesiteanalysisslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, id Diagn var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_executesitedetector.go b/resource-manager/web/2022-09-01/diagnostics/method_executesitedetector.go index bd22012f0bf..95fdc0e086d 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_executesitedetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_executesitedetector.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, id Diagnosti var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_executesitedetectorslot.go b/resource-manager/web/2022-09-01/diagnostics/method_executesitedetectorslot.go index 7b7c52ca9ac..a4058304682 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_executesitedetectorslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_executesitedetectorslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, id SlotD var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_gethostingenvironmentdetectorresponse.go b/resource-manager/web/2022-09-01/diagnostics/method_gethostingenvironmentdetectorresponse.go index c0f8da53660..146dae82a1c 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_gethostingenvironmentdetectorresponse.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_gethostingenvironmentdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToHeaders() *clie func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Con var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysis.go b/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysis.go index 9f71be3deb5..b730bee1e40 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysis.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysis.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysis(ctx context.Context, id AnalysisId) ( var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysisslot.go b/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysisslot.go index 045dd22a086..14ca76fb852 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysisslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsiteanalysisslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, id Diagnosti var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetector.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetector.go index bd8a5d0fd1b..e90a21838ca 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetector.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetector(ctx context.Context, id DiagnosticDet var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponse.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponse.go index 92cb6f72ab9..91a987796f7 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponse.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponse.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseOperationOptions) ToHeaders() *client.Headers { func (o GetSiteDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, id Detec var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponseslot.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponseslot.go index 2cdbdd632a1..84580774fc2 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponseslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorresponseslot.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseSlotOperationOptions) ToHeaders() *client.Headers func (o GetSiteDetectorResponseSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, id S var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorslot.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorslot.go index 53ae2cc819c..3f2a72744f1 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitedetectorslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, id SlotDiagn var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategory.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategory.go index 450eb557042..1ddb7a72135 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategory.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategory.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, id Dia var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategoryslot.go b/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategoryslot.go index fb8ac9e2176..c6572ee2994 100644 --- a/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategoryslot.go +++ b/resource-manager/web/2022-09-01/diagnostics/method_getsitediagnosticcategoryslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, id var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/diagnostics/version.go b/resource-manager/web/2022-09-01/diagnostics/version.go index 57fb51a5dca..0c14f9f2831 100644 --- a/resource-manager/web/2022-09-01/diagnostics/version.go +++ b/resource-manager/web/2022-09-01/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/domains/README.md b/resource-manager/web/2022-09-01/domains/README.md index 87e8ea11e84..230d2aabdb4 100644 --- a/resource-manager/web/2022-09-01/domains/README.md +++ b/resource-manager/web/2022-09-01/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `domains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/domains/client.go b/resource-manager/web/2022-09-01/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/web/2022-09-01/domains/client.go +++ b/resource-manager/web/2022-09-01/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/domains/id_domain.go b/resource-manager/web/2022-09-01/domains/id_domain.go index a3841009671..91ab01bc78f 100644 --- a/resource-manager/web/2022-09-01/domains/id_domain.go +++ b/resource-manager/web/2022-09-01/domains/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/domains/id_domainownershipidentifier.go b/resource-manager/web/2022-09-01/domains/id_domainownershipidentifier.go index a4600242107..30c6e04e6fa 100644 --- a/resource-manager/web/2022-09-01/domains/id_domainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/domains/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/domains/method_checkavailability.go b/resource-manager/web/2022-09-01/domains/method_checkavailability.go index 2e69c2d6caa..1ebced69f7f 100644 --- a/resource-manager/web/2022-09-01/domains/method_checkavailability.go +++ b/resource-manager/web/2022-09-01/domains/method_checkavailability.go @@ -51,7 +51,6 @@ func (c DomainsClient) CheckAvailability(ctx context.Context, id commonids.Subsc var model DomainAvailabilityCheckResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_createorupdateownershipidentifier.go b/resource-manager/web/2022-09-01/domains/method_createorupdateownershipidentifier.go index 65cf4646521..7a48ce2a59c 100644 --- a/resource-manager/web/2022-09-01/domains/method_createorupdateownershipidentifier.go +++ b/resource-manager/web/2022-09-01/domains/method_createorupdateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, id var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_delete.go b/resource-manager/web/2022-09-01/domains/method_delete.go index 1e544b1f599..6d7df4dfe6c 100644 --- a/resource-manager/web/2022-09-01/domains/method_delete.go +++ b/resource-manager/web/2022-09-01/domains/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/domains/method_get.go b/resource-manager/web/2022-09-01/domains/method_get.go index b35fd82d944..20619dde9a0 100644 --- a/resource-manager/web/2022-09-01/domains/method_get.go +++ b/resource-manager/web/2022-09-01/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_getcontrolcenterssorequest.go b/resource-manager/web/2022-09-01/domains/method_getcontrolcenterssorequest.go index 7bcdf455156..97001bc7198 100644 --- a/resource-manager/web/2022-09-01/domains/method_getcontrolcenterssorequest.go +++ b/resource-manager/web/2022-09-01/domains/method_getcontrolcenterssorequest.go @@ -47,7 +47,6 @@ func (c DomainsClient) GetControlCenterSsoRequest(ctx context.Context, id common var model DomainControlCenterSsoRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_getownershipidentifier.go b/resource-manager/web/2022-09-01/domains/method_getownershipidentifier.go index d38f9734728..b40df756137 100644 --- a/resource-manager/web/2022-09-01/domains/method_getownershipidentifier.go +++ b/resource-manager/web/2022-09-01/domains/method_getownershipidentifier.go @@ -45,7 +45,6 @@ func (c DomainsClient) GetOwnershipIdentifier(ctx context.Context, id DomainOwne var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_transferout.go b/resource-manager/web/2022-09-01/domains/method_transferout.go index e45926e87d5..463bfd22489 100644 --- a/resource-manager/web/2022-09-01/domains/method_transferout.go +++ b/resource-manager/web/2022-09-01/domains/method_transferout.go @@ -46,7 +46,6 @@ func (c DomainsClient) TransferOut(ctx context.Context, id DomainId) (result Tra var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_update.go b/resource-manager/web/2022-09-01/domains/method_update.go index f5705bd286a..08ef3fbeef2 100644 --- a/resource-manager/web/2022-09-01/domains/method_update.go +++ b/resource-manager/web/2022-09-01/domains/method_update.go @@ -50,7 +50,6 @@ func (c DomainsClient) Update(ctx context.Context, id DomainId, input DomainPatc var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/method_updateownershipidentifier.go b/resource-manager/web/2022-09-01/domains/method_updateownershipidentifier.go index 3c23bdeecfc..0ac28164a96 100644 --- a/resource-manager/web/2022-09-01/domains/method_updateownershipidentifier.go +++ b/resource-manager/web/2022-09-01/domains/method_updateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, id DomainO var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/domains/version.go b/resource-manager/web/2022-09-01/domains/version.go index dd12081b981..2c17023d271 100644 --- a/resource-manager/web/2022-09-01/domains/version.go +++ b/resource-manager/web/2022-09-01/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/global/README.md b/resource-manager/web/2022-09-01/global/README.md index d8ed11a384f..ea169457597 100644 --- a/resource-manager/web/2022-09-01/global/README.md +++ b/resource-manager/web/2022-09-01/global/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/global` Documentation -The `global` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `global` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/global/client.go b/resource-manager/web/2022-09-01/global/client.go index 5fbdd990766..d760ea36811 100644 --- a/resource-manager/web/2022-09-01/global/client.go +++ b/resource-manager/web/2022-09-01/global/client.go @@ -15,7 +15,7 @@ type GlobalClient struct { } func NewGlobalClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "global", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "global", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/global/id_deletedsite.go b/resource-manager/web/2022-09-01/global/id_deletedsite.go index d227d82af96..2ac42554ae0 100644 --- a/resource-manager/web/2022-09-01/global/id_deletedsite.go +++ b/resource-manager/web/2022-09-01/global/id_deletedsite.go @@ -40,7 +40,7 @@ func ParseDeletedSiteID(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDeletedSiteIDInsensitively(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/global/method_getdeletedwebapp.go b/resource-manager/web/2022-09-01/global/method_getdeletedwebapp.go index 52e449413d5..9daa1017f5c 100644 --- a/resource-manager/web/2022-09-01/global/method_getdeletedwebapp.go +++ b/resource-manager/web/2022-09-01/global/method_getdeletedwebapp.go @@ -45,7 +45,6 @@ func (c GlobalClient) GetDeletedWebApp(ctx context.Context, id DeletedSiteId) (r var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/global/method_getdeletedwebappsnapshots.go b/resource-manager/web/2022-09-01/global/method_getdeletedwebappsnapshots.go index 4b84e9cb927..e18e9e44a71 100644 --- a/resource-manager/web/2022-09-01/global/method_getdeletedwebappsnapshots.go +++ b/resource-manager/web/2022-09-01/global/method_getdeletedwebappsnapshots.go @@ -46,7 +46,6 @@ func (c GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, id DeletedS var model []Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/global/version.go b/resource-manager/web/2022-09-01/global/version.go index 4169bad1b14..00a67e6aae1 100644 --- a/resource-manager/web/2022-09-01/global/version.go +++ b/resource-manager/web/2022-09-01/global/version.go @@ -1,12 +1,10 @@ package global -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/global/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/global/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/kubeenvironments/README.md b/resource-manager/web/2022-09-01/kubeenvironments/README.md index 1b6b2b14791..77641700297 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/README.md +++ b/resource-manager/web/2022-09-01/kubeenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/kubeenvironments` Documentation -The `kubeenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `kubeenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/kubeenvironments/client.go b/resource-manager/web/2022-09-01/kubeenvironments/client.go index a2db5e1aad1..7bcf8670016 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/client.go +++ b/resource-manager/web/2022-09-01/kubeenvironments/client.go @@ -15,7 +15,7 @@ type KubeEnvironmentsClient struct { } func NewKubeEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*KubeEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "kubeenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "kubeenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KubeEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/kubeenvironments/id_kubeenvironment.go b/resource-manager/web/2022-09-01/kubeenvironments/id_kubeenvironment.go index 020e8fa0f30..ec1ed742c59 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/id_kubeenvironment.go +++ b/resource-manager/web/2022-09-01/kubeenvironments/id_kubeenvironment.go @@ -42,7 +42,7 @@ func ParseKubeEnvironmentID(input string) (*KubeEnvironmentId, error) { } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseKubeEnvironmentIDInsensitively(input string) (*KubeEnvironmentId, erro } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/kubeenvironments/method_get.go b/resource-manager/web/2022-09-01/kubeenvironments/method_get.go index 9c19f1d0522..4dde6e8cfea 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/method_get.go +++ b/resource-manager/web/2022-09-01/kubeenvironments/method_get.go @@ -45,7 +45,6 @@ func (c KubeEnvironmentsClient) Get(ctx context.Context, id KubeEnvironmentId) ( var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/kubeenvironments/method_update.go b/resource-manager/web/2022-09-01/kubeenvironments/method_update.go index 5af2a9f0da9..7192afd41a4 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/method_update.go +++ b/resource-manager/web/2022-09-01/kubeenvironments/method_update.go @@ -50,7 +50,6 @@ func (c KubeEnvironmentsClient) Update(ctx context.Context, id KubeEnvironmentId var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/kubeenvironments/version.go b/resource-manager/web/2022-09-01/kubeenvironments/version.go index 84bca2f9c32..985c3b45966 100644 --- a/resource-manager/web/2022-09-01/kubeenvironments/version.go +++ b/resource-manager/web/2022-09-01/kubeenvironments/version.go @@ -1,12 +1,10 @@ package kubeenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/kubeenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/kubeenvironments/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/provider/README.md b/resource-manager/web/2022-09-01/provider/README.md index a3c1cfb044f..7db2e062943 100644 --- a/resource-manager/web/2022-09-01/provider/README.md +++ b/resource-manager/web/2022-09-01/provider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/provider` Documentation -The `provider` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `provider` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/provider/client.go b/resource-manager/web/2022-09-01/provider/client.go index 2128fec9d6f..b982cfdab87 100644 --- a/resource-manager/web/2022-09-01/provider/client.go +++ b/resource-manager/web/2022-09-01/provider/client.go @@ -15,7 +15,7 @@ type ProviderClient struct { } func NewProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/provider/id_location.go b/resource-manager/web/2022-09-01/provider/id_location.go index e746f1b1c9e..d6d3b18d669 100644 --- a/resource-manager/web/2022-09-01/provider/id_location.go +++ b/resource-manager/web/2022-09-01/provider/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/provider/method_getavailablestacks.go b/resource-manager/web/2022-09-01/provider/method_getavailablestacks.go index d38e1131c18..1572e58bd2a 100644 --- a/resource-manager/web/2022-09-01/provider/method_getavailablestacks.go +++ b/resource-manager/web/2022-09-01/provider/method_getavailablestacks.go @@ -39,6 +39,7 @@ func (o GetAvailableStacksOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/method_getavailablestacksonprem.go b/resource-manager/web/2022-09-01/provider/method_getavailablestacksonprem.go index 88344e48bbe..20773813e76 100644 --- a/resource-manager/web/2022-09-01/provider/method_getavailablestacksonprem.go +++ b/resource-manager/web/2022-09-01/provider/method_getavailablestacksonprem.go @@ -40,6 +40,7 @@ func (o GetAvailableStacksOnPremOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOnPremOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/method_getfunctionappstacks.go b/resource-manager/web/2022-09-01/provider/method_getfunctionappstacks.go index e7d7af6faee..a1846c17cd1 100644 --- a/resource-manager/web/2022-09-01/provider/method_getfunctionappstacks.go +++ b/resource-manager/web/2022-09-01/provider/method_getfunctionappstacks.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetFunctionAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/method_getfunctionappstacksforlocation.go b/resource-manager/web/2022-09-01/provider/method_getfunctionappstacksforlocation.go index d172b71e511..684a0b14882 100644 --- a/resource-manager/web/2022-09-01/provider/method_getfunctionappstacksforlocation.go +++ b/resource-manager/web/2022-09-01/provider/method_getfunctionappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksForLocationOperationOptions) ToHeaders() *client.Hea func (o GetFunctionAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/method_getwebappstacks.go b/resource-manager/web/2022-09-01/provider/method_getwebappstacks.go index 94ed33af10c..3223aecd71b 100644 --- a/resource-manager/web/2022-09-01/provider/method_getwebappstacks.go +++ b/resource-manager/web/2022-09-01/provider/method_getwebappstacks.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetWebAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/method_getwebappstacksforlocation.go b/resource-manager/web/2022-09-01/provider/method_getwebappstacksforlocation.go index 1b7970c0294..2dad249e986 100644 --- a/resource-manager/web/2022-09-01/provider/method_getwebappstacksforlocation.go +++ b/resource-manager/web/2022-09-01/provider/method_getwebappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksForLocationOperationOptions) ToHeaders() *client.Headers func (o GetWebAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/provider/version.go b/resource-manager/web/2022-09-01/provider/version.go index 9cbc462b17e..e46d36495b5 100644 --- a/resource-manager/web/2022-09-01/provider/version.go +++ b/resource-manager/web/2022-09-01/provider/version.go @@ -1,12 +1,10 @@ package provider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provider/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/recommendations/README.md b/resource-manager/web/2022-09-01/recommendations/README.md index a4be627d9f8..5454f5d832e 100644 --- a/resource-manager/web/2022-09-01/recommendations/README.md +++ b/resource-manager/web/2022-09-01/recommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/recommendations` Documentation -The `recommendations` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `recommendations` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/recommendations/client.go b/resource-manager/web/2022-09-01/recommendations/client.go index c0ae3be9b1d..5c0b92661cf 100644 --- a/resource-manager/web/2022-09-01/recommendations/client.go +++ b/resource-manager/web/2022-09-01/recommendations/client.go @@ -15,7 +15,7 @@ type RecommendationsClient struct { } func NewRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecommendationsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/recommendations/id_hostingenvironmentrecommendation.go b/resource-manager/web/2022-09-01/recommendations/id_hostingenvironmentrecommendation.go index 67ff49432d9..1d3055e1119 100644 --- a/resource-manager/web/2022-09-01/recommendations/id_hostingenvironmentrecommendation.go +++ b/resource-manager/web/2022-09-01/recommendations/id_hostingenvironmentrecommendation.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentRecommendationID(input string) (*HostingEnvironmentR } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentRecommendationIDInsensitively(input string) (*Hostin } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/recommendations/id_recommendation.go b/resource-manager/web/2022-09-01/recommendations/id_recommendation.go index a1f8446174f..ab139efdcda 100644 --- a/resource-manager/web/2022-09-01/recommendations/id_recommendation.go +++ b/resource-manager/web/2022-09-01/recommendations/id_recommendation.go @@ -40,7 +40,7 @@ func ParseRecommendationID(input string) (*RecommendationId, error) { } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRecommendationIDInsensitively(input string) (*RecommendationId, error) } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/recommendations/id_siterecommendation.go b/resource-manager/web/2022-09-01/recommendations/id_siterecommendation.go index cada8a9b36f..faeec83da4d 100644 --- a/resource-manager/web/2022-09-01/recommendations/id_siterecommendation.go +++ b/resource-manager/web/2022-09-01/recommendations/id_siterecommendation.go @@ -44,7 +44,7 @@ func ParseSiteRecommendationID(input string) (*SiteRecommendationId, error) { } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteRecommendationIDInsensitively(input string) (*SiteRecommendationId } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/recommendations/method_disableallforhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_disableallforhostingenvironment.go index 3099cf85524..3f1378ddbbc 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_disableallforhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_disableallforhostingenvironment.go @@ -34,6 +34,7 @@ func (o DisableAllForHostingEnvironmentOperationOptions) ToHeaders() *client.Hea func (o DisableAllForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_disablerecommendationforhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_disablerecommendationforhostingenvironment.go index 64a8ac5160d..452a1d24ac9 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_disablerecommendationforhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_disablerecommendationforhostingenvironment.go @@ -33,6 +33,7 @@ func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToHeaders() func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbyhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbyhostingenvironment.go index 2509533cd78..0086ec07d1d 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbyhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbyhostingenvironment.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToHeaders() *client. func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Co var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbywebapp.go b/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbywebapp.go index 8e4e22b5b79..9d34652f182 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbywebapp.go +++ b/resource-manager/web/2022-09-01/recommendations/method_getruledetailsbywebapp.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByWebAppOperationOptions) ToHeaders() *client.Headers { func (o GetRuleDetailsByWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, id Si var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/recommendations/method_list.go b/resource-manager/web/2022-09-01/recommendations/method_list.go index f45d890f65b..784389aa71e 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_list.go +++ b/resource-manager/web/2022-09-01/recommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_listhistoryforhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_listhistoryforhostingenvironment.go index a66dab954fa..6b92d0e2bb0 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_listhistoryforhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_listhistoryforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListHistoryForHostingEnvironmentOperationOptions) ToHeaders() *client.He func (o ListHistoryForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_listhistoryforwebapp.go b/resource-manager/web/2022-09-01/recommendations/method_listhistoryforwebapp.go index 54a97058272..9fe581ed380 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_listhistoryforwebapp.go +++ b/resource-manager/web/2022-09-01/recommendations/method_listhistoryforwebapp.go @@ -41,6 +41,7 @@ func (o ListHistoryForWebAppOperationOptions) ToHeaders() *client.Headers { func (o ListHistoryForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforhostingenvironment.go index d7c819654b5..3d8956760e1 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToHeaders() * func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforwebapp.go b/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforwebapp.go index 45f19bdafd5..f417cf7c61a 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforwebapp.go +++ b/resource-manager/web/2022-09-01/recommendations/method_listrecommendedrulesforwebapp.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForWebAppOperationOptions) ToHeaders() *client.Heade func (o ListRecommendedRulesForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/method_resetallfiltersforhostingenvironment.go b/resource-manager/web/2022-09-01/recommendations/method_resetallfiltersforhostingenvironment.go index 23fe068d9bf..c6d9e982291 100644 --- a/resource-manager/web/2022-09-01/recommendations/method_resetallfiltersforhostingenvironment.go +++ b/resource-manager/web/2022-09-01/recommendations/method_resetallfiltersforhostingenvironment.go @@ -34,6 +34,7 @@ func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToHeaders() *clien func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/recommendations/version.go b/resource-manager/web/2022-09-01/recommendations/version.go index 41bf85f896e..18730b1c082 100644 --- a/resource-manager/web/2022-09-01/recommendations/version.go +++ b/resource-manager/web/2022-09-01/recommendations/version.go @@ -1,12 +1,10 @@ package recommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recommendations/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/README.md b/resource-manager/web/2022-09-01/resourcehealthmetadata/README.md index 4e9a2f8f52c..0594ec15189 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/README.md +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/resourcehealthmetadata` Documentation -The `resourcehealthmetadata` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `resourcehealthmetadata` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/client.go b/resource-manager/web/2022-09-01/resourcehealthmetadata/client.go index a0e8b63b709..8d0b22d4c33 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/client.go +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/client.go @@ -15,7 +15,7 @@ type ResourceHealthMetadataClient struct { } func NewResourceHealthMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceHealthMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceHealthMetadataClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/id_slot.go b/resource-manager/web/2022-09-01/resourcehealthmetadata/id_slot.go index 0bfa176043e..988c831a683 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/id_slot.go +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysite.go b/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysite.go index 58587d1e4b3..0b5f4205ef8 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysite.go +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysite.go @@ -47,7 +47,6 @@ func (c ResourceHealthMetadataClient) GetBySite(ctx context.Context, id commonid var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysiteslot.go b/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysiteslot.go index 23f5d6260a5..24365f1341a 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysiteslot.go +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/method_getbysiteslot.go @@ -46,7 +46,6 @@ func (c ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, id Slot var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourcehealthmetadata/version.go b/resource-manager/web/2022-09-01/resourcehealthmetadata/version.go index 9d39cb4abe8..4abf2f9a557 100644 --- a/resource-manager/web/2022-09-01/resourcehealthmetadata/version.go +++ b/resource-manager/web/2022-09-01/resourcehealthmetadata/version.go @@ -1,12 +1,10 @@ package resourcehealthmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcehealthmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcehealthmetadata/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/resourceproviders/README.md b/resource-manager/web/2022-09-01/resourceproviders/README.md index 52d2cbdeedc..cca17e53a42 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/README.md +++ b/resource-manager/web/2022-09-01/resourceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/resourceproviders` Documentation -The `resourceproviders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `resourceproviders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/resourceproviders/client.go b/resource-manager/web/2022-09-01/resourceproviders/client.go index 0f91da37d8c..f5374bb3bc3 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/client.go +++ b/resource-manager/web/2022-09-01/resourceproviders/client.go @@ -15,7 +15,7 @@ type ResourceProvidersClient struct { } func NewResourceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceProvidersClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/resourceproviders/id_sourcecontrol.go b/resource-manager/web/2022-09-01/resourceproviders/id_sourcecontrol.go index f59308a6f73..6bb16534a47 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/id_sourcecontrol.go +++ b/resource-manager/web/2022-09-01/resourceproviders/id_sourcecontrol.go @@ -38,7 +38,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_checknameavailability.go b/resource-manager/web/2022-09-01/resourceproviders/method_checknameavailability.go index 1b0dd0b6a4f..8d708561b66 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_checknameavailability.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) CheckNameAvailability(ctx context.Context, id c var model ResourceNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_getpublishinguser.go b/resource-manager/web/2022-09-01/resourceproviders/method_getpublishinguser.go index 558a74efdd0..e0529900390 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_getpublishinguser.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_getpublishinguser.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetPublishingUser(ctx context.Context) (result var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_getsourcecontrol.go b/resource-manager/web/2022-09-01/resourceproviders/method_getsourcecontrol.go index 2035eb827a6..2684d63d83c 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_getsourcecontrol.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_getsourcecontrol.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetSourceControl(ctx context.Context, id Source var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_getsubscriptiondeploymentlocations.go b/resource-manager/web/2022-09-01/resourceproviders/method_getsubscriptiondeploymentlocations.go index 54881368bcb..3564d1ecad9 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_getsubscriptiondeploymentlocations.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_getsubscriptiondeploymentlocations.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) GetSubscriptionDeploymentLocations(ctx context. var model DeploymentLocations result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_listbillingmeters.go b/resource-manager/web/2022-09-01/resourceproviders/method_listbillingmeters.go index 684c35df7f1..97f4b003c15 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_listbillingmeters.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_listbillingmeters.go @@ -41,6 +41,7 @@ func (o ListBillingMetersOperationOptions) ToHeaders() *client.Headers { func (o ListBillingMetersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_listcustomhostnamesites.go b/resource-manager/web/2022-09-01/resourceproviders/method_listcustomhostnamesites.go index 62c87e04bf1..f3f451bdaf0 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_listcustomhostnamesites.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_listcustomhostnamesites.go @@ -40,6 +40,7 @@ func (o ListCustomHostNameSitesOperationOptions) ToHeaders() *client.Headers { func (o ListCustomHostNameSitesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_listgeoregions.go b/resource-manager/web/2022-09-01/resourceproviders/method_listgeoregions.go index ee39002c7a8..e1022e689b7 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_listgeoregions.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_listgeoregions.go @@ -43,6 +43,7 @@ func (o ListGeoRegionsOperationOptions) ToHeaders() *client.Headers { func (o ListGeoRegionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_listskus.go b/resource-manager/web/2022-09-01/resourceproviders/method_listskus.go index 494e7016169..cffe2769c1b 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_listskus.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_listskus.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) ListSkus(ctx context.Context, id commonids.Subs var model SkuInfos result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_updatepublishinguser.go b/resource-manager/web/2022-09-01/resourceproviders/method_updatepublishinguser.go index 58d177a7f00..e994b006317 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_updatepublishinguser.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_updatepublishinguser.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdatePublishingUser(ctx context.Context, input var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_updatesourcecontrol.go b/resource-manager/web/2022-09-01/resourceproviders/method_updatesourcecontrol.go index fba65489698..1d9f45f198e 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_updatesourcecontrol.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_updatesourcecontrol.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdateSourceControl(ctx context.Context, id Sou var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_validate.go b/resource-manager/web/2022-09-01/resourceproviders/method_validate.go index 055e2a0b590..4db5e1bb83c 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_validate.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_validate.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) Validate(ctx context.Context, id commonids.Reso var model ValidateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/method_verifyhostingenvironmentvnet.go b/resource-manager/web/2022-09-01/resourceproviders/method_verifyhostingenvironmentvnet.go index f2d83339160..733f7cd2e65 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/method_verifyhostingenvironmentvnet.go +++ b/resource-manager/web/2022-09-01/resourceproviders/method_verifyhostingenvironmentvnet.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) VerifyHostingEnvironmentVnet(ctx context.Contex var model VnetValidationFailureDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/resourceproviders/version.go b/resource-manager/web/2022-09-01/resourceproviders/version.go index 956ebf81136..12d62f1fd67 100644 --- a/resource-manager/web/2022-09-01/resourceproviders/version.go +++ b/resource-manager/web/2022-09-01/resourceproviders/version.go @@ -1,12 +1,10 @@ package resourceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceproviders/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/staticsites/README.md b/resource-manager/web/2022-09-01/staticsites/README.md index 965366d948a..dc1d1125f7c 100644 --- a/resource-manager/web/2022-09-01/staticsites/README.md +++ b/resource-manager/web/2022-09-01/staticsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/staticsites` Documentation -The `staticsites` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `staticsites` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/staticsites/client.go b/resource-manager/web/2022-09-01/staticsites/client.go index d725455a2d7..1843789810a 100644 --- a/resource-manager/web/2022-09-01/staticsites/client.go +++ b/resource-manager/web/2022-09-01/staticsites/client.go @@ -15,7 +15,7 @@ type StaticSitesClient struct { } func NewStaticSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticSitesClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/staticsites/id_authprovider.go b/resource-manager/web/2022-09-01/staticsites/id_authprovider.go index 750184e2aa7..226f3b5c52a 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_authprovider.go +++ b/resource-manager/web/2022-09-01/staticsites/id_authprovider.go @@ -44,7 +44,7 @@ func ParseAuthProviderID(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthProviderIDInsensitively(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_build.go b/resource-manager/web/2022-09-01/staticsites/id_build.go index 1e21fb5cf2b..1a27dd31601 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_build.go +++ b/resource-manager/web/2022-09-01/staticsites/id_build.go @@ -44,7 +44,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_builddatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/id_builddatabaseconnection.go index 0ed1b728e32..3b7ab746afe 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_builddatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/id_builddatabaseconnection.go @@ -46,7 +46,7 @@ func ParseBuildDatabaseConnectionID(input string) (*BuildDatabaseConnectionId, e } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildDatabaseConnectionIDInsensitively(input string) (*BuildDatabaseCo } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_buildlinkedbackend.go b/resource-manager/web/2022-09-01/staticsites/id_buildlinkedbackend.go index d6cf5a07976..5a46e9ddfbb 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_buildlinkedbackend.go +++ b/resource-manager/web/2022-09-01/staticsites/id_buildlinkedbackend.go @@ -46,7 +46,7 @@ func ParseBuildLinkedBackendID(input string) (*BuildLinkedBackendId, error) { } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildLinkedBackendIDInsensitively(input string) (*BuildLinkedBackendId } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_builduserprovidedfunctionapp.go b/resource-manager/web/2022-09-01/staticsites/id_builduserprovidedfunctionapp.go index 3b8c90ea51f..c635b356bea 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_builduserprovidedfunctionapp.go +++ b/resource-manager/web/2022-09-01/staticsites/id_builduserprovidedfunctionapp.go @@ -46,7 +46,7 @@ func ParseBuildUserProvidedFunctionAppID(input string) (*BuildUserProvidedFuncti } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildUserProvidedFunctionAppIDInsensitively(input string) (*BuildUserP } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_customdomain.go b/resource-manager/web/2022-09-01/staticsites/id_customdomain.go index 8b71f5f6a29..36338190c89 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_customdomain.go +++ b/resource-manager/web/2022-09-01/staticsites/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_databaseconnection.go b/resource-manager/web/2022-09-01/staticsites/id_databaseconnection.go index 9369f53f8e5..9758866cc0e 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_databaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/id_databaseconnection.go @@ -44,7 +44,7 @@ func ParseDatabaseConnectionID(input string) (*DatabaseConnectionId, error) { } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseConnectionIDInsensitively(input string) (*DatabaseConnectionId } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_linkedbackend.go b/resource-manager/web/2022-09-01/staticsites/id_linkedbackend.go index 718f2b0e7f1..11af3b43597 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_linkedbackend.go +++ b/resource-manager/web/2022-09-01/staticsites/id_linkedbackend.go @@ -44,7 +44,7 @@ func ParseLinkedBackendID(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedBackendIDInsensitively(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_providerlocation.go b/resource-manager/web/2022-09-01/staticsites/id_providerlocation.go index ee9a3aa0549..414ef53820f 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_providerlocation.go +++ b/resource-manager/web/2022-09-01/staticsites/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_staticsite.go b/resource-manager/web/2022-09-01/staticsites/id_staticsite.go index 1c7bb88ff3c..56186355289 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_staticsite.go +++ b/resource-manager/web/2022-09-01/staticsites/id_staticsite.go @@ -42,7 +42,7 @@ func ParseStaticSiteID(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStaticSiteIDInsensitively(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_staticsiteprivateendpointconnection.go b/resource-manager/web/2022-09-01/staticsites/id_staticsiteprivateendpointconnection.go index 34f63677af6..f4c717142de 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_staticsiteprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/id_staticsiteprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseStaticSitePrivateEndpointConnectionID(input string) (*StaticSitePrivat } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStaticSitePrivateEndpointConnectionIDInsensitively(input string) (*Sta } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_user.go b/resource-manager/web/2022-09-01/staticsites/id_user.go index a53ca4c5a29..40aa164640e 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_user.go +++ b/resource-manager/web/2022-09-01/staticsites/id_user.go @@ -46,7 +46,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/id_userprovidedfunctionapp.go b/resource-manager/web/2022-09-01/staticsites/id_userprovidedfunctionapp.go index fb801e139a9..c86f8f50b8c 100644 --- a/resource-manager/web/2022-09-01/staticsites/id_userprovidedfunctionapp.go +++ b/resource-manager/web/2022-09-01/staticsites/id_userprovidedfunctionapp.go @@ -44,7 +44,7 @@ func ParseUserProvidedFunctionAppID(input string) (*UserProvidedFunctionAppId, e } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserProvidedFunctionAppIDInsensitively(input string) (*UserProvidedFun } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatebasicauth.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatebasicauth.go index 34051d7923f..e320de5ee8d 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatebasicauth.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatebasicauth.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, id Stati var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatebuilddatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatebuilddatabaseconnection.go index 9fa486417cb..577ea3e3a33 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatebuilddatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatedatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatedatabaseconnection.go index 718dd346c56..4e9d93d0c60 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatedatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsiteappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsiteappsettings.go index 19e3b9c2d9d..7664955e4a5 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsiteappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsiteappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildappsettings.go index bcded5df29e..ea9eccbeb1d 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context. var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go index 4a99a9e6b1d..6ccea1d9510 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go index b4181e79c23..8bc2ba7c3e0 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_createuserrolesinvitationlink.go b/resource-manager/web/2022-09-01/staticsites/method_createuserrolesinvitationlink.go index 2c3ce3709a2..62bf2337cca 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_createuserrolesinvitationlink.go +++ b/resource-manager/web/2022-09-01/staticsites/method_createuserrolesinvitationlink.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, id var model StaticSiteUserInvitationResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getbasicauth.go b/resource-manager/web/2022-09-01/staticsites/method_getbasicauth.go index 93aca3f09be..860b9bdbfd2 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getbasicauth.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getbasicauth.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBasicAuth(ctx context.Context, id StaticSiteId) (r var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnection.go index 64d51db24b6..6d90dfd9ae3 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, id Bu var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go index 39323af4c15..c035b26d729 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnection.go index 118dabea250..ad1f59b58d4 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetDatabaseConnection(ctx context.Context, id Databas var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionwithdetails.go b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionwithdetails.go index 7ff319615bd..349897ee72d 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionwithdetails.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getdatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackend.go b/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackend.go index b572c2a2856..553c375e975 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackend.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackend.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackend(ctx context.Context, id LinkedBacken var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackendforbuild.go b/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackendforbuild.go index 9bc02ed8de7..5761fa2c83b 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackendforbuild.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getlinkedbackendforbuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, id Buil var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getprivateendpointconnection.go b/resource-manager/web/2022-09-01/staticsites/method_getprivateendpointconnection.go index 7342343fa2a..0d198e2c428 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getprivatelinkresources.go b/resource-manager/web/2022-09-01/staticsites/method_getprivatelinkresources.go index d9590943395..0234f35567a 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getprivatelinkresources.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getprivatelinkresources.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetPrivateLinkResources(ctx context.Context, id Stati var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getstaticsite.go b/resource-manager/web/2022-09-01/staticsites/method_getstaticsite.go index 6096f2cb35e..f1a5134adf8 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getstaticsite.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSite(ctx context.Context, id StaticSiteId) ( var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getstaticsitebuild.go b/resource-manager/web/2022-09-01/staticsites/method_getstaticsitebuild.go index 0794f8c9a40..980e9844cd4 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getstaticsitebuild.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteBuild(ctx context.Context, id BuildId) ( var model StaticSiteBuildARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getstaticsitecustomdomain.go b/resource-manager/web/2022-09-01/staticsites/method_getstaticsitecustomdomain.go index 482be40cd04..4f067b9c862 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getstaticsitecustomdomain.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getstaticsitecustomdomain.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, id Cus var model StaticSiteCustomDomainOverviewARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go b/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go index 8b09371d9c2..0407b757d73 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.C var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go b/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go index 9419b0ecc93..6c737d6cde7 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go +++ b/resource-manager/web/2022-09-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx cont var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteappsettings.go index 5ecb3eee84b..af3f94e29fc 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, id Sta var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildappsettings.go index deb7ce043ec..b23b85384c4 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, i var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildfunctionappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildfunctionappsettings.go index 14b452b8d2a..220b09e2518 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitebuildfunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Co var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteconfiguredroles.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteconfiguredroles.go index 1a015925a7f..ad252bdfded 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteconfiguredroles.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsiteconfiguredroles.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, id var model StringList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitefunctionappsettings.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitefunctionappsettings.go index 32f56586d7e..9c4a10a187f 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitefunctionappsettings.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitefunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitesecrets.go b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitesecrets.go index cc35a7c0654..f9ed5192106 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_liststaticsitesecrets.go +++ b/resource-manager/web/2022-09-01/staticsites/method_liststaticsitesecrets.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, id StaticS var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_previewworkflow.go b/resource-manager/web/2022-09-01/staticsites/method_previewworkflow.go index f867a88a25e..2a34e3a3c41 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_previewworkflow.go +++ b/resource-manager/web/2022-09-01/staticsites/method_previewworkflow.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) PreviewWorkflow(ctx context.Context, id ProviderLocat var model StaticSitesWorkflowPreview result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go b/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go index 5cfabf447f9..c210993e945 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go +++ b/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToHeaders func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go b/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go index 32f030cb1b3..2d4f13d5c79 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go +++ b/resource-manager/web/2022-09-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToHe func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/staticsites/method_unlinkbackend.go b/resource-manager/web/2022-09-01/staticsites/method_unlinkbackend.go index 897c1be7925..27575e98684 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_unlinkbackend.go +++ b/resource-manager/web/2022-09-01/staticsites/method_unlinkbackend.go @@ -33,6 +33,7 @@ func (o UnlinkBackendOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/staticsites/method_unlinkbackendfrombuild.go b/resource-manager/web/2022-09-01/staticsites/method_unlinkbackendfrombuild.go index 7e356363af4..f6055b15e30 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_unlinkbackendfrombuild.go +++ b/resource-manager/web/2022-09-01/staticsites/method_unlinkbackendfrombuild.go @@ -33,6 +33,7 @@ func (o UnlinkBackendFromBuildOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendFromBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/staticsites/method_updatebuilddatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_updatebuilddatabaseconnection.go index c9611ae5cb3..2c78c742cf3 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_updatebuilddatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_updatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, id var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_updatedatabaseconnection.go b/resource-manager/web/2022-09-01/staticsites/method_updatedatabaseconnection.go index 6e37673f34d..c2bab9a13a3 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_updatedatabaseconnection.go +++ b/resource-manager/web/2022-09-01/staticsites/method_updatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, id Data var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_updatestaticsite.go b/resource-manager/web/2022-09-01/staticsites/method_updatestaticsite.go index 2db8a28235a..c1706e09ddb 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_updatestaticsite.go +++ b/resource-manager/web/2022-09-01/staticsites/method_updatestaticsite.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) UpdateStaticSite(ctx context.Context, id StaticSiteId var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/method_updatestaticsiteuser.go b/resource-manager/web/2022-09-01/staticsites/method_updatestaticsiteuser.go index ddcb14fbcc6..7741cafbf21 100644 --- a/resource-manager/web/2022-09-01/staticsites/method_updatestaticsiteuser.go +++ b/resource-manager/web/2022-09-01/staticsites/method_updatestaticsiteuser.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, id UserId, var model StaticSiteUserARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/staticsites/version.go b/resource-manager/web/2022-09-01/staticsites/version.go index fae63ebc0c1..346a611d4ee 100644 --- a/resource-manager/web/2022-09-01/staticsites/version.go +++ b/resource-manager/web/2022-09-01/staticsites/version.go @@ -1,12 +1,10 @@ package staticsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticsites/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/topleveldomains/README.md b/resource-manager/web/2022-09-01/topleveldomains/README.md index 33443716d20..3501f71dc85 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/README.md +++ b/resource-manager/web/2022-09-01/topleveldomains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/topleveldomains` Documentation -The `topleveldomains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `topleveldomains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/topleveldomains/client.go b/resource-manager/web/2022-09-01/topleveldomains/client.go index f688cee500e..73312d38791 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/client.go +++ b/resource-manager/web/2022-09-01/topleveldomains/client.go @@ -15,7 +15,7 @@ type TopLevelDomainsClient struct { } func NewTopLevelDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopLevelDomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topleveldomains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topleveldomains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopLevelDomainsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/topleveldomains/id_topleveldomain.go b/resource-manager/web/2022-09-01/topleveldomains/id_topleveldomain.go index acfeab4dadd..6f6ab16698b 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/id_topleveldomain.go +++ b/resource-manager/web/2022-09-01/topleveldomains/id_topleveldomain.go @@ -40,7 +40,7 @@ func ParseTopLevelDomainID(input string) (*TopLevelDomainId, error) { } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTopLevelDomainIDInsensitively(input string) (*TopLevelDomainId, error) } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/topleveldomains/method_get.go b/resource-manager/web/2022-09-01/topleveldomains/method_get.go index f8281b382bd..b9320d14b1f 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/method_get.go +++ b/resource-manager/web/2022-09-01/topleveldomains/method_get.go @@ -45,7 +45,6 @@ func (c TopLevelDomainsClient) Get(ctx context.Context, id TopLevelDomainId) (re var model TopLevelDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/topleveldomains/version.go b/resource-manager/web/2022-09-01/topleveldomains/version.go index 8b6042a1d4d..3f6d77ce116 100644 --- a/resource-manager/web/2022-09-01/topleveldomains/version.go +++ b/resource-manager/web/2022-09-01/topleveldomains/version.go @@ -1,12 +1,10 @@ package topleveldomains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topleveldomains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topleveldomains/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/webapps/README.md b/resource-manager/web/2022-09-01/webapps/README.md index d3edc7e37c5..5b215546f18 100644 --- a/resource-manager/web/2022-09-01/webapps/README.md +++ b/resource-manager/web/2022-09-01/webapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/webapps` Documentation -The `webapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `webapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/webapps/client.go b/resource-manager/web/2022-09-01/webapps/client.go index 5b73caa6cf9..cfd22cd9b25 100644 --- a/resource-manager/web/2022-09-01/webapps/client.go +++ b/resource-manager/web/2022-09-01/webapps/client.go @@ -15,7 +15,7 @@ type WebAppsClient struct { } func NewWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebAppsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/webapps/id_appsetting.go b/resource-manager/web/2022-09-01/webapps/id_appsetting.go index f79067efc7a..6570aa7135e 100644 --- a/resource-manager/web/2022-09-01/webapps/id_appsetting.go +++ b/resource-manager/web/2022-09-01/webapps/id_appsetting.go @@ -44,7 +44,7 @@ func ParseAppSettingID(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppSettingIDInsensitively(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_backup.go b/resource-manager/web/2022-09-01/webapps/id_backup.go index c93bb6ba405..8f56fe8e86e 100644 --- a/resource-manager/web/2022-09-01/webapps/id_backup.go +++ b/resource-manager/web/2022-09-01/webapps/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_configreferenceappsetting.go b/resource-manager/web/2022-09-01/webapps/id_configreferenceappsetting.go index 68ac42d6ea7..9dccf717dc5 100644 --- a/resource-manager/web/2022-09-01/webapps/id_configreferenceappsetting.go +++ b/resource-manager/web/2022-09-01/webapps/id_configreferenceappsetting.go @@ -46,7 +46,7 @@ func ParseConfigReferenceAppSettingID(input string) (*ConfigReferenceAppSettingI } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceAppSettingIDInsensitively(input string) (*ConfigReferen } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_configreferenceconnectionstring.go b/resource-manager/web/2022-09-01/webapps/id_configreferenceconnectionstring.go index 73f0b28fde9..aea5296e526 100644 --- a/resource-manager/web/2022-09-01/webapps/id_configreferenceconnectionstring.go +++ b/resource-manager/web/2022-09-01/webapps/id_configreferenceconnectionstring.go @@ -46,7 +46,7 @@ func ParseConfigReferenceConnectionStringID(input string) (*ConfigReferenceConne } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceConnectionStringIDInsensitively(input string) (*ConfigR } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_connectionstring.go b/resource-manager/web/2022-09-01/webapps/id_connectionstring.go index 9e8a7bdf65a..f1204be3c86 100644 --- a/resource-manager/web/2022-09-01/webapps/id_connectionstring.go +++ b/resource-manager/web/2022-09-01/webapps/id_connectionstring.go @@ -44,7 +44,7 @@ func ParseConnectionStringID(input string) (*ConnectionStringId, error) { } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionStringIDInsensitively(input string) (*ConnectionStringId, er } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_continuouswebjob.go b/resource-manager/web/2022-09-01/webapps/id_continuouswebjob.go index bd064699944..da1f781d51c 100644 --- a/resource-manager/web/2022-09-01/webapps/id_continuouswebjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_continuouswebjob.go @@ -44,7 +44,7 @@ func ParseContinuousWebJobID(input string) (*ContinuousWebJobId, error) { } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContinuousWebJobIDInsensitively(input string) (*ContinuousWebJobId, er } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_default.go b/resource-manager/web/2022-09-01/webapps/id_default.go index c191cc07347..ebbf559eca2 100644 --- a/resource-manager/web/2022-09-01/webapps/id_default.go +++ b/resource-manager/web/2022-09-01/webapps/id_default.go @@ -46,7 +46,7 @@ func ParseDefaultID(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDefaultIDInsensitively(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_deployment.go b/resource-manager/web/2022-09-01/webapps/id_deployment.go index a9c9751643f..29e705e77b3 100644 --- a/resource-manager/web/2022-09-01/webapps/id_deployment.go +++ b/resource-manager/web/2022-09-01/webapps/id_deployment.go @@ -44,7 +44,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_domainownershipidentifier.go b/resource-manager/web/2022-09-01/webapps/id_domainownershipidentifier.go index 45cb4c5271d..91bcb81f8ed 100644 --- a/resource-manager/web/2022-09-01/webapps/id_domainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/webapps/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_function.go b/resource-manager/web/2022-09-01/webapps/id_function.go index 4b864194a47..0582f2765c2 100644 --- a/resource-manager/web/2022-09-01/webapps/id_function.go +++ b/resource-manager/web/2022-09-01/webapps/id_function.go @@ -44,7 +44,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_functionkey.go b/resource-manager/web/2022-09-01/webapps/id_functionkey.go index 0e8c227341e..e5073a1ee1e 100644 --- a/resource-manager/web/2022-09-01/webapps/id_functionkey.go +++ b/resource-manager/web/2022-09-01/webapps/id_functionkey.go @@ -48,7 +48,7 @@ func ParseFunctionKeyID(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseFunctionKeyIDInsensitively(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_gateway.go b/resource-manager/web/2022-09-01/webapps/id_gateway.go index ca31ece2066..d8ce5ae92ac 100644 --- a/resource-manager/web/2022-09-01/webapps/id_gateway.go +++ b/resource-manager/web/2022-09-01/webapps/id_gateway.go @@ -46,7 +46,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_history.go b/resource-manager/web/2022-09-01/webapps/id_history.go index 27f2d61eb6e..23ea7bea0d7 100644 --- a/resource-manager/web/2022-09-01/webapps/id_history.go +++ b/resource-manager/web/2022-09-01/webapps/id_history.go @@ -46,7 +46,7 @@ func ParseHistoryID(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHistoryIDInsensitively(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_hostdefault.go b/resource-manager/web/2022-09-01/webapps/id_hostdefault.go index 5278463ffbf..92bbf2f8abc 100644 --- a/resource-manager/web/2022-09-01/webapps/id_hostdefault.go +++ b/resource-manager/web/2022-09-01/webapps/id_hostdefault.go @@ -48,7 +48,7 @@ func ParseHostDefaultID(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseHostDefaultIDInsensitively(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_hostnamebinding.go b/resource-manager/web/2022-09-01/webapps/id_hostnamebinding.go index dd781b22a7b..a4b717ec937 100644 --- a/resource-manager/web/2022-09-01/webapps/id_hostnamebinding.go +++ b/resource-manager/web/2022-09-01/webapps/id_hostnamebinding.go @@ -44,7 +44,7 @@ func ParseHostNameBindingID(input string) (*HostNameBindingId, error) { } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostNameBindingIDInsensitively(input string) (*HostNameBindingId, erro } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_hybridconnection.go b/resource-manager/web/2022-09-01/webapps/id_hybridconnection.go index 01b9c8a8590..327a6eeaeee 100644 --- a/resource-manager/web/2022-09-01/webapps/id_hybridconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_hybridconnection.go @@ -44,7 +44,7 @@ func ParseHybridConnectionID(input string) (*HybridConnectionId, error) { } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, er } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_instance.go b/resource-manager/web/2022-09-01/webapps/id_instance.go index f32fdae320a..4d51a7de35f 100644 --- a/resource-manager/web/2022-09-01/webapps/id_instance.go +++ b/resource-manager/web/2022-09-01/webapps/id_instance.go @@ -44,7 +44,7 @@ func ParseInstanceID(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_instanceprocess.go b/resource-manager/web/2022-09-01/webapps/id_instanceprocess.go index e5913d50a18..e3dd2b9ec98 100644 --- a/resource-manager/web/2022-09-01/webapps/id_instanceprocess.go +++ b/resource-manager/web/2022-09-01/webapps/id_instanceprocess.go @@ -46,7 +46,7 @@ func ParseInstanceProcessID(input string) (*InstanceProcessId, error) { } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseInstanceProcessIDInsensitively(input string) (*InstanceProcessId, erro } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_instanceprocessmodule.go b/resource-manager/web/2022-09-01/webapps/id_instanceprocessmodule.go index d905ee1acd0..5db7365c1f7 100644 --- a/resource-manager/web/2022-09-01/webapps/id_instanceprocessmodule.go +++ b/resource-manager/web/2022-09-01/webapps/id_instanceprocessmodule.go @@ -48,7 +48,7 @@ func ParseInstanceProcessModuleID(input string) (*InstanceProcessModuleId, error } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseInstanceProcessModuleIDInsensitively(input string) (*InstanceProcessMo } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_key.go b/resource-manager/web/2022-09-01/webapps/id_key.go index cbdd8974ed7..10827d52737 100644 --- a/resource-manager/web/2022-09-01/webapps/id_key.go +++ b/resource-manager/web/2022-09-01/webapps/id_key.go @@ -46,7 +46,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_module.go b/resource-manager/web/2022-09-01/webapps/id_module.go index fa4c8e1c74c..d8020f716b7 100644 --- a/resource-manager/web/2022-09-01/webapps/id_module.go +++ b/resource-manager/web/2022-09-01/webapps/id_module.go @@ -46,7 +46,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_networkfeature.go b/resource-manager/web/2022-09-01/webapps/id_networkfeature.go index 392453252e2..280955814b0 100644 --- a/resource-manager/web/2022-09-01/webapps/id_networkfeature.go +++ b/resource-manager/web/2022-09-01/webapps/id_networkfeature.go @@ -44,7 +44,7 @@ func ParseNetworkFeatureID(input string) (*NetworkFeatureId, error) { } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkFeatureIDInsensitively(input string) (*NetworkFeatureId, error) } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_networktrace.go b/resource-manager/web/2022-09-01/webapps/id_networktrace.go index 28b0b24703c..ea534f344cf 100644 --- a/resource-manager/web/2022-09-01/webapps/id_networktrace.go +++ b/resource-manager/web/2022-09-01/webapps/id_networktrace.go @@ -44,7 +44,7 @@ func ParseNetworkTraceID(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkTraceIDInsensitively(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_premieraddon.go b/resource-manager/web/2022-09-01/webapps/id_premieraddon.go index dfee9125f05..59d273ad195 100644 --- a/resource-manager/web/2022-09-01/webapps/id_premieraddon.go +++ b/resource-manager/web/2022-09-01/webapps/id_premieraddon.go @@ -44,7 +44,7 @@ func ParsePremierAddonID(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePremierAddonIDInsensitively(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_privateendpointconnection.go b/resource-manager/web/2022-09-01/webapps/id_privateendpointconnection.go index 30ff5bd5111..5679ccc111e 100644 --- a/resource-manager/web/2022-09-01/webapps/id_privateendpointconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_process.go b/resource-manager/web/2022-09-01/webapps/id_process.go index f50f0ce9a31..aa68d26d279 100644 --- a/resource-manager/web/2022-09-01/webapps/id_process.go +++ b/resource-manager/web/2022-09-01/webapps/id_process.go @@ -44,7 +44,7 @@ func ParseProcessID(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProcessIDInsensitively(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_processmodule.go b/resource-manager/web/2022-09-01/webapps/id_processmodule.go index d82b0bb7c2a..93cb8fe4496 100644 --- a/resource-manager/web/2022-09-01/webapps/id_processmodule.go +++ b/resource-manager/web/2022-09-01/webapps/id_processmodule.go @@ -48,7 +48,7 @@ func ParseProcessModuleID(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProcessModuleIDInsensitively(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_publiccertificate.go b/resource-manager/web/2022-09-01/webapps/id_publiccertificate.go index 73c217f6800..66edd7f2d3d 100644 --- a/resource-manager/web/2022-09-01/webapps/id_publiccertificate.go +++ b/resource-manager/web/2022-09-01/webapps/id_publiccertificate.go @@ -44,7 +44,7 @@ func ParsePublicCertificateID(input string) (*PublicCertificateId, error) { } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicCertificateIDInsensitively(input string) (*PublicCertificateId, } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_relay.go b/resource-manager/web/2022-09-01/webapps/id_relay.go index 52a8e92c8f5..2b3d9907b79 100644 --- a/resource-manager/web/2022-09-01/webapps/id_relay.go +++ b/resource-manager/web/2022-09-01/webapps/id_relay.go @@ -46,7 +46,7 @@ func ParseRelayID(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelayIDInsensitively(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_siteextension.go b/resource-manager/web/2022-09-01/webapps/id_siteextension.go index 769e3f2466e..96a3ca4de74 100644 --- a/resource-manager/web/2022-09-01/webapps/id_siteextension.go +++ b/resource-manager/web/2022-09-01/webapps/id_siteextension.go @@ -44,7 +44,7 @@ func ParseSiteExtensionID(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteExtensionIDInsensitively(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_sitenetworktrace.go b/resource-manager/web/2022-09-01/webapps/id_sitenetworktrace.go index 69b7e658c0c..1cdefda2edb 100644 --- a/resource-manager/web/2022-09-01/webapps/id_sitenetworktrace.go +++ b/resource-manager/web/2022-09-01/webapps/id_sitenetworktrace.go @@ -44,7 +44,7 @@ func ParseSiteNetworkTraceID(input string) (*SiteNetworkTraceId, error) { } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteNetworkTraceIDInsensitively(input string) (*SiteNetworkTraceId, er } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_siteslotnetworktrace.go b/resource-manager/web/2022-09-01/webapps/id_siteslotnetworktrace.go index 0ce16071841..ccebe930003 100644 --- a/resource-manager/web/2022-09-01/webapps/id_siteslotnetworktrace.go +++ b/resource-manager/web/2022-09-01/webapps/id_siteslotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSiteSlotNetworkTraceID(input string) (*SiteSlotNetworkTraceId, error) } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSiteSlotNetworkTraceIDInsensitively(input string) (*SiteSlotNetworkTra } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slot.go b/resource-manager/web/2022-09-01/webapps/id_slot.go index 37093c01152..904e83746a2 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slot.go +++ b/resource-manager/web/2022-09-01/webapps/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotbackup.go b/resource-manager/web/2022-09-01/webapps/id_slotbackup.go index 7e922478028..3e0321cb7b1 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotbackup.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotbackup.go @@ -46,7 +46,7 @@ func ParseSlotBackupID(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotBackupIDInsensitively(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotcontinuouswebjob.go b/resource-manager/web/2022-09-01/webapps/id_slotcontinuouswebjob.go index 4c005d225dd..7b853f0fd87 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotcontinuouswebjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotcontinuouswebjob.go @@ -46,7 +46,7 @@ func ParseSlotContinuousWebJobID(input string) (*SlotContinuousWebJobId, error) } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotContinuousWebJobIDInsensitively(input string) (*SlotContinuousWebJ } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotdeployment.go b/resource-manager/web/2022-09-01/webapps/id_slotdeployment.go index c98c86d914f..b9b1f22fcb8 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotdeployment.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotdeployment.go @@ -46,7 +46,7 @@ func ParseSlotDeploymentID(input string) (*SlotDeploymentId, error) { } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDeploymentIDInsensitively(input string) (*SlotDeploymentId, error) } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotdomainownershipidentifier.go b/resource-manager/web/2022-09-01/webapps/id_slotdomainownershipidentifier.go index d8889a92f84..4cb30290217 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotdomainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotdomainownershipidentifier.go @@ -46,7 +46,7 @@ func ParseSlotDomainOwnershipIdentifierID(input string) (*SlotDomainOwnershipIde } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDomainOwnershipIdentifierIDInsensitively(input string) (*SlotDomai } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotfunction.go b/resource-manager/web/2022-09-01/webapps/id_slotfunction.go index 5578c099117..b39b0b6a41e 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotfunction.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotfunction.go @@ -46,7 +46,7 @@ func ParseSlotFunctionID(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotFunctionIDInsensitively(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slothostnamebinding.go b/resource-manager/web/2022-09-01/webapps/id_slothostnamebinding.go index 5e5e069e779..d67f8c26989 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slothostnamebinding.go +++ b/resource-manager/web/2022-09-01/webapps/id_slothostnamebinding.go @@ -46,7 +46,7 @@ func ParseSlotHostNameBindingID(input string) (*SlotHostNameBindingId, error) { } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHostNameBindingIDInsensitively(input string) (*SlotHostNameBinding } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slothybridconnection.go b/resource-manager/web/2022-09-01/webapps/id_slothybridconnection.go index c59108e4984..9b39556db89 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slothybridconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_slothybridconnection.go @@ -46,7 +46,7 @@ func ParseSlotHybridConnectionID(input string) (*SlotHybridConnectionId, error) } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHybridConnectionIDInsensitively(input string) (*SlotHybridConnecti } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slothybridconnectionnamespacerelay.go b/resource-manager/web/2022-09-01/webapps/id_slothybridconnectionnamespacerelay.go index a990de1a626..b1dc3be246b 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slothybridconnectionnamespacerelay.go +++ b/resource-manager/web/2022-09-01/webapps/id_slothybridconnectionnamespacerelay.go @@ -48,7 +48,7 @@ func ParseSlotHybridConnectionNamespaceRelayID(input string) (*SlotHybridConnect } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotHybridConnectionNamespaceRelayIDInsensitively(input string) (*Slot } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotinstance.go b/resource-manager/web/2022-09-01/webapps/id_slotinstance.go index 982475e3199..f1216d28421 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotinstance.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotinstance.go @@ -46,7 +46,7 @@ func ParseSlotInstanceID(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotInstanceIDInsensitively(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocess.go b/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocess.go index bec31e27acc..88b8a031f84 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocess.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocess.go @@ -48,7 +48,7 @@ func ParseSlotInstanceProcessID(input string) (*SlotInstanceProcessId, error) { } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotInstanceProcessIDInsensitively(input string) (*SlotInstanceProcess } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocessmodule.go b/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocessmodule.go index f1d5cdb11e7..b9eee6e21eb 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocessmodule.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotinstanceprocessmodule.go @@ -50,7 +50,7 @@ func ParseSlotInstanceProcessModuleID(input string) (*SlotInstanceProcessModuleI } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseSlotInstanceProcessModuleIDInsensitively(input string) (*SlotInstanceP } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotnetworkfeature.go b/resource-manager/web/2022-09-01/webapps/id_slotnetworkfeature.go index 9a2a2655b20..dfad1a5284a 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotnetworkfeature.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotnetworkfeature.go @@ -46,7 +46,7 @@ func ParseSlotNetworkFeatureID(input string) (*SlotNetworkFeatureId, error) { } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkFeatureIDInsensitively(input string) (*SlotNetworkFeatureId } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotnetworktrace.go b/resource-manager/web/2022-09-01/webapps/id_slotnetworktrace.go index f0baafea877..62d655b9a89 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotnetworktrace.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSlotNetworkTraceID(input string) (*SlotNetworkTraceId, error) { } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkTraceIDInsensitively(input string) (*SlotNetworkTraceId, er } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotpremieraddon.go b/resource-manager/web/2022-09-01/webapps/id_slotpremieraddon.go index 363aac4042d..f745f77c9ad 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotpremieraddon.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotpremieraddon.go @@ -46,7 +46,7 @@ func ParseSlotPremierAddonID(input string) (*SlotPremierAddonId, error) { } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPremierAddonIDInsensitively(input string) (*SlotPremierAddonId, er } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotprivateendpointconnection.go b/resource-manager/web/2022-09-01/webapps/id_slotprivateendpointconnection.go index 06c33c64213..286e37ae7e1 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotprivateendpointconnection.go @@ -46,7 +46,7 @@ func ParseSlotPrivateEndpointConnectionID(input string) (*SlotPrivateEndpointCon } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPrivateEndpointConnectionIDInsensitively(input string) (*SlotPriva } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotprocess.go b/resource-manager/web/2022-09-01/webapps/id_slotprocess.go index 85065bd680f..7419d4ae937 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotprocess.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotprocess.go @@ -46,7 +46,7 @@ func ParseSlotProcessID(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotProcessIDInsensitively(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotpubliccertificate.go b/resource-manager/web/2022-09-01/webapps/id_slotpubliccertificate.go index 9cc7df5ef0f..0acaac78d6d 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotpubliccertificate.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotpubliccertificate.go @@ -46,7 +46,7 @@ func ParseSlotPublicCertificateID(input string) (*SlotPublicCertificateId, error } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPublicCertificateIDInsensitively(input string) (*SlotPublicCertifi } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotsiteextension.go b/resource-manager/web/2022-09-01/webapps/id_slotsiteextension.go index 24d7fa27fec..877dd5c40f8 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotsiteextension.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotsiteextension.go @@ -46,7 +46,7 @@ func ParseSlotSiteExtensionID(input string) (*SlotSiteExtensionId, error) { } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotSiteExtensionIDInsensitively(input string) (*SlotSiteExtensionId, } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slottriggeredwebjob.go b/resource-manager/web/2022-09-01/webapps/id_slottriggeredwebjob.go index 8fcdb7a3629..27a76ce5f56 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slottriggeredwebjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_slottriggeredwebjob.go @@ -46,7 +46,7 @@ func ParseSlotTriggeredWebJobID(input string) (*SlotTriggeredWebJobId, error) { } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotTriggeredWebJobIDInsensitively(input string) (*SlotTriggeredWebJob } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnection.go b/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnection.go index a5612467edd..86175e99aca 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnection.go @@ -46,7 +46,7 @@ func ParseSlotVirtualNetworkConnectionID(input string) (*SlotVirtualNetworkConne } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotVirtualNetworkConnectionIDInsensitively(input string) (*SlotVirtua } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnectiongateway.go b/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnectiongateway.go index c730133f642..4888ace938b 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnectiongateway.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotvirtualnetworkconnectiongateway.go @@ -48,7 +48,7 @@ func ParseSlotVirtualNetworkConnectionGatewayID(input string) (*SlotVirtualNetwo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Slo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotwebjob.go b/resource-manager/web/2022-09-01/webapps/id_slotwebjob.go index 2d33ce09820..6c144dae3e9 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotwebjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotwebjob.go @@ -46,7 +46,7 @@ func ParseSlotWebJobID(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWebJobIDInsensitively(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_slotworkflow.go b/resource-manager/web/2022-09-01/webapps/id_slotworkflow.go index cc9df4ec42e..6be59d05f47 100644 --- a/resource-manager/web/2022-09-01/webapps/id_slotworkflow.go +++ b/resource-manager/web/2022-09-01/webapps/id_slotworkflow.go @@ -46,7 +46,7 @@ func ParseSlotWorkflowID(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWorkflowIDInsensitively(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_snapshot.go b/resource-manager/web/2022-09-01/webapps/id_snapshot.go index acd841b4273..26564e21d79 100644 --- a/resource-manager/web/2022-09-01/webapps/id_snapshot.go +++ b/resource-manager/web/2022-09-01/webapps/id_snapshot.go @@ -44,7 +44,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_triggeredwebjob.go b/resource-manager/web/2022-09-01/webapps/id_triggeredwebjob.go index 7d689de870f..43ad4bf8382 100644 --- a/resource-manager/web/2022-09-01/webapps/id_triggeredwebjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_triggeredwebjob.go @@ -44,7 +44,7 @@ func ParseTriggeredWebJobID(input string) (*TriggeredWebJobId, error) { } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggeredWebJobIDInsensitively(input string) (*TriggeredWebJobId, erro } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_triggeredwebjobhistory.go b/resource-manager/web/2022-09-01/webapps/id_triggeredwebjobhistory.go index cf7cd111d53..7af6650a4c7 100644 --- a/resource-manager/web/2022-09-01/webapps/id_triggeredwebjobhistory.go +++ b/resource-manager/web/2022-09-01/webapps/id_triggeredwebjobhistory.go @@ -48,7 +48,7 @@ func ParseTriggeredWebJobHistoryID(input string) (*TriggeredWebJobHistoryId, err } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggeredWebJobHistoryIDInsensitively(input string) (*TriggeredWebJobH } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_virtualnetworkconnection.go b/resource-manager/web/2022-09-01/webapps/id_virtualnetworkconnection.go index 7ac96780e13..254f04902dd 100644 --- a/resource-manager/web/2022-09-01/webapps/id_virtualnetworkconnection.go +++ b/resource-manager/web/2022-09-01/webapps/id_virtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkConnectionID(input string) (*VirtualNetworkConnectionId, } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkConnectionIDInsensitively(input string) (*VirtualNetwork } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_webjob.go b/resource-manager/web/2022-09-01/webapps/id_webjob.go index 1f27a30a1ec..33070b5e399 100644 --- a/resource-manager/web/2022-09-01/webapps/id_webjob.go +++ b/resource-manager/web/2022-09-01/webapps/id_webjob.go @@ -44,7 +44,7 @@ func ParseWebJobID(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebJobIDInsensitively(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_websnapshot.go b/resource-manager/web/2022-09-01/webapps/id_websnapshot.go index 705a6fbcaf9..df92a0940d6 100644 --- a/resource-manager/web/2022-09-01/webapps/id_websnapshot.go +++ b/resource-manager/web/2022-09-01/webapps/id_websnapshot.go @@ -46,7 +46,7 @@ func ParseWebSnapshotID(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWebSnapshotIDInsensitively(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/id_workflow.go b/resource-manager/web/2022-09-01/webapps/id_workflow.go index 4519773f55f..cfc67507afa 100644 --- a/resource-manager/web/2022-09-01/webapps/id_workflow.go +++ b/resource-manager/web/2022-09-01/webapps/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/webapps/method_addpremieraddon.go b/resource-manager/web/2022-09-01/webapps/method_addpremieraddon.go index 7faf7f7e01c..cfb57af1bf6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_addpremieraddon.go +++ b/resource-manager/web/2022-09-01/webapps/method_addpremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOn(ctx context.Context, id PremierAddonId, i var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_addpremieraddonslot.go b/resource-manager/web/2022-09-01/webapps/method_addpremieraddonslot.go index 5a4fa5470e0..aeafde304bb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_addpremieraddonslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_addpremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostname.go b/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostname.go index b5b486f1e77..11970d2903f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostname.go +++ b/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostname.go @@ -35,6 +35,7 @@ func (o AnalyzeCustomHostnameOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c WebAppsClient) AnalyzeCustomHostname(ctx context.Context, id commonids.A var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostnameslot.go b/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostnameslot.go index 4c608ff0d59..b2430c9f9ba 100644 --- a/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostnameslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_analyzecustomhostnameslot.go @@ -34,6 +34,7 @@ func (o AnalyzeCustomHostnameSlotOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, id SlotId, var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_backup.go b/resource-manager/web/2022-09-01/webapps/method_backup.go index e8c66757e12..c1c49689e19 100644 --- a/resource-manager/web/2022-09-01/webapps/method_backup.go +++ b/resource-manager/web/2022-09-01/webapps/method_backup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Backup(ctx context.Context, id commonids.AppServiceId, in var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_backupslot.go b/resource-manager/web/2022-09-01/webapps/method_backupslot.go index 81ab5d55571..bb5f136eda5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_backupslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_backupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) BackupSlot(ctx context.Context, id SlotId, input BackupRe var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createdeployment.go b/resource-manager/web/2022-09-01/webapps/method_createdeployment.go index 2be253afc7e..942b704fb67 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createdeployment.go +++ b/resource-manager/web/2022-09-01/webapps/method_createdeployment.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeployment(ctx context.Context, id DeploymentId, in var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createdeploymentslot.go b/resource-manager/web/2022-09-01/webapps/method_createdeploymentslot.go index 6cf4e309a20..69c846f798e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createdeploymentslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createdeploymentslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeploymentSlot(ctx context.Context, id SlotDeployme var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createonedeployoperation.go b/resource-manager/web/2022-09-01/webapps/method_createonedeployoperation.go index 38e5c6a38a1..d313d5b7340 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createonedeployoperation.go +++ b/resource-manager/web/2022-09-01/webapps/method_createonedeployoperation.go @@ -47,7 +47,6 @@ func (c WebAppsClient) CreateOneDeployOperation(ctx context.Context, id commonid var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdateconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_createorupdateconfiguration.go index 0949625e755..85500fcf708 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdateconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, id commo var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdateconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdateconfigurationslot.go index 6d8c147b26c..b41a356aa13 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdateconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, id S var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifier.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifier.go index 42d7d52d965..54114dd7cb9 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Conte var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifierslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifierslot.go index 1147ef7573e..001554898ac 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifierslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.C var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecret.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecret.go index 2ed0a2ab525..92497573560 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecret.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, id KeyI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecretslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecretslot.go index 16ba00bde18..0540fca8947 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecretslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatefunctionsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, id var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebinding.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebinding.go index b239472ab87..3a47a4207d0 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebinding.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebinding.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, id Hos var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebindingslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebindingslot.go index ad9378dfe37..f0746cde4e6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebindingslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostnamebindingslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, id var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecret.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecret.go index 191c579b5d8..1b3b65509c9 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecret.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, id DefaultI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecretslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecretslot.go index f3badff4dfe..f9bbc6bef55 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecretslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehostsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, id Host var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnection.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnection.go index 74629a106ec..5c7b767edf5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, id Re var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnectionslot.go index c08c5ecf83b..480ee3d1593 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificate.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificate.go index b25986d572e..b9aaaedb0d2 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificate.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificate.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, id P var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificateslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificateslot.go index ec82a67e3a3..b53ffdea524 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificateslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatepubliccertificateslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnection.go b/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnection.go index 0e475ea9495..8cd02d31bd7 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnectionslot.go index df30da026a8..ade59122646 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Cont var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go index d2c9fca2d78..fcc6949b431 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go index 7ababeb64de..d5f3050db94 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnection.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnection.go index c98acf2757f..2b041462b62 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, id Virt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongateway.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongateway.go index f7c2605a07d..0f1c95c3f39 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongateway.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongatewayslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongatewayslot.go index a4040491cd6..d09166ca8e2 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Conte var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectionslot.go index 060b5673b5a..ca68e315257 100644 --- a/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_createorupdatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, id var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_delete.go b/resource-manager/web/2022-09-01/webapps/method_delete.go index 491e0c6eca1..9849348f6db 100644 --- a/resource-manager/web/2022-09-01/webapps/method_delete.go +++ b/resource-manager/web/2022-09-01/webapps/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_deleteslot.go b/resource-manager/web/2022-09-01/webapps/method_deleteslot.go index c2d4db43a52..67b4c2dcc06 100644 --- a/resource-manager/web/2022-09-01/webapps/method_deleteslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_deleteslot.go @@ -34,6 +34,7 @@ func (o DeleteSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrol.go b/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrol.go index 7416e19fd09..dd5b73ad1b4 100644 --- a/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrol.go +++ b/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrol.go @@ -34,6 +34,7 @@ func (o DeleteSourceControlOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrolslot.go b/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrolslot.go index 571dfbab3ab..45220bcdbd1 100644 --- a/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrolslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_deletesourcecontrolslot.go @@ -33,6 +33,7 @@ func (o DeleteSourceControlSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_discoverbackup.go b/resource-manager/web/2022-09-01/webapps/method_discoverbackup.go index a1d107c462f..85b417c4364 100644 --- a/resource-manager/web/2022-09-01/webapps/method_discoverbackup.go +++ b/resource-manager/web/2022-09-01/webapps/method_discoverbackup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) DiscoverBackup(ctx context.Context, id commonids.AppServi var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_discoverbackupslot.go b/resource-manager/web/2022-09-01/webapps/method_discoverbackupslot.go index 15773ae16b5..bc2c9a593cb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_discoverbackupslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_discoverbackupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) DiscoverBackupSlot(ctx context.Context, id SlotId, input var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_get.go b/resource-manager/web/2022-09-01/webapps/method_get.go index 23962fb39aa..31066458715 100644 --- a/resource-manager/web/2022-09-01/webapps/method_get.go +++ b/resource-manager/web/2022-09-01/webapps/method_get.go @@ -46,7 +46,6 @@ func (c WebAppsClient) Get(ctx context.Context, id commonids.AppServiceId) (resu var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreference.go b/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreference.go index 29c9f5b97a8..f27fab51318 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreference.go +++ b/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, id Ap var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreferenceslot.go b/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreferenceslot.go index 4dd14572ebb..99870c87c7b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreferenceslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getappsettingkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, i var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettings.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettings.go index dab06c29867..5deb735be93 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettings(ctx context.Context, id commonids.AppServ var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsslot.go index 1a60695f628..8e803724937 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsSlot(ctx context.Context, id SlotId) (resu var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2.go index fb5709f7073..a0504e9fd96 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2(ctx context.Context, id commonids.AppSe var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2slot.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2slot.go index aa047a0dfd3..1709a5010c1 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2slot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2slot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, id SlotId) (re var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecrets.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecrets.go index 01bf74554cf..124903a090d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecrets.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecrets.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, id c var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecretsslot.go b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecretsslot.go index 77753e1df7a..a969211442f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecretsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getauthsettingsv2withoutsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getbackupconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_getbackupconfiguration.go index 2f529b24e69..89906332ea3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getbackupconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_getbackupconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetBackupConfiguration(ctx context.Context, id commonids. var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getbackupconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_getbackupconfigurationslot.go index 865164a69ac..7be87a5817a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getbackupconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getbackupconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, id SlotId var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getbackupstatus.go b/resource-manager/web/2022-09-01/webapps/method_getbackupstatus.go index 24a6bb275d0..ab296926328 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getbackupstatus.go +++ b/resource-manager/web/2022-09-01/webapps/method_getbackupstatus.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatus(ctx context.Context, id BackupId) (result var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getbackupstatusslot.go b/resource-manager/web/2022-09-01/webapps/method_getbackupstatusslot.go index a56211ca854..0e862af25fb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getbackupstatusslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getbackupstatusslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatusSlot(ctx context.Context, id SlotBackupId) var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_getconfiguration.go index 7651c296acf..1d73ea645f6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_getconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetConfiguration(ctx context.Context, id commonids.AppSer var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_getconfigurationslot.go index 9b190aed52b..89546b08eb1 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetConfigurationSlot(ctx context.Context, id SlotId) (res var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshot.go b/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshot.go index 0b163fa0d01..016b9fcd3bf 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshot(ctx context.Context, id Snapshot var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshotslot.go b/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshotslot.go index 0923d5bafca..80d0457f72f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshotslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getconfigurationsnapshotslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, id WebS var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszip.go b/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszip.go index 2f8ced54505..b0790356147 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszip.go +++ b/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszip.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetContainerLogsZip(ctx context.Context, id commonids.App var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszipslot.go b/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszipslot.go index 7fa0bf62727..080f4f9691c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszipslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getcontainerlogszipslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, id SlotId) ( var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjob.go b/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjob.go index 9070b5b9190..9f5a071f437 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjob.go +++ b/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJob(ctx context.Context, id ContinuousWeb var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjobslot.go b/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjobslot.go index 647b7a57557..8d4e01c6c04 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjobslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getcontinuouswebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, id SlotConti var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdeployment.go b/resource-manager/web/2022-09-01/webapps/method_getdeployment.go index 02efcfee65f..0355511e44e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdeployment.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdeployment.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeployment(ctx context.Context, id DeploymentId) (resu var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdeploymentslot.go b/resource-manager/web/2022-09-01/webapps/method_getdeploymentslot.go index f382ca1b97a..4ab616abcec 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdeploymentslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdeploymentslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeploymentSlot(ctx context.Context, id SlotDeploymentI var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfiguration.go index 2995cd9178b..0612d0c160c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, id co var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfigurationslot.go index ea9587ae477..aef303209ac 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdiagnosticlogsconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, i var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifier.go b/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifier.go index 6b9014ae5b1..44658be8e1a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifier.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, id Doma var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifierslot.go b/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifierslot.go index 5b5d7404532..a2e91d0b828 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifierslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getdomainownershipidentifierslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, id var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getftpallowed.go b/resource-manager/web/2022-09-01/webapps/method_getftpallowed.go index cb3b41f0b65..3fb4b79a51b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getftpallowed.go +++ b/resource-manager/web/2022-09-01/webapps/method_getftpallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFtpAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getftpallowedslot.go b/resource-manager/web/2022-09-01/webapps/method_getftpallowedslot.go index 67419725f8e..2b3a8004dfc 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getftpallowedslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getftpallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFtpAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getfunction.go b/resource-manager/web/2022-09-01/webapps/method_getfunction.go index 91ccc8cdb31..c119bf71fa2 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getfunction.go +++ b/resource-manager/web/2022-09-01/webapps/method_getfunction.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetFunction(ctx context.Context, id FunctionId) (result G var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintoken.go b/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintoken.go index 319970db3c1..cef965d4ee4 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintoken.go +++ b/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintoken.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFunctionsAdminToken(ctx context.Context, id commonids. var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintokenslot.go b/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintokenslot.go index 71cbb37de0d..cf37de92f47 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintokenslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getfunctionsadmintokenslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, id SlotId var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gethostnamebinding.go b/resource-manager/web/2022-09-01/webapps/method_gethostnamebinding.go index 1f8ada5414d..023c7f1797c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gethostnamebinding.go +++ b/resource-manager/web/2022-09-01/webapps/method_gethostnamebinding.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBinding(ctx context.Context, id HostNameBindin var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gethostnamebindingslot.go b/resource-manager/web/2022-09-01/webapps/method_gethostnamebindingslot.go index acd9260e326..d96ab86f748 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gethostnamebindingslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_gethostnamebindingslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBindingSlot(ctx context.Context, id SlotHostNa var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gethybridconnection.go b/resource-manager/web/2022-09-01/webapps/method_gethybridconnection.go index 6824a6a3881..f018d1b6ec8 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gethybridconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnection(ctx context.Context, id RelayId) (res var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gethybridconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_gethybridconnectionslot.go index a73bc3e506e..e36e2d5b984 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gethybridconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_gethybridconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnectionSlot(ctx context.Context, id SlotHybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstancefunctionslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstancefunctionslot.go index ac388ddbe1e..6e95d906f08 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstancefunctionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstancefunctionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, id SlotFunct var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceinfo.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceinfo.go index ccab5c5b65b..0d535788c59 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceinfo.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceinfo.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfo(ctx context.Context, id InstanceId) (resu var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceinfoslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceinfoslot.go index eca65b26f1d..7ac3ffaf1c8 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceinfoslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceinfoslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfoSlot(ctx context.Context, id SlotInstanceI var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylog.go b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylog.go index 54d4380e6c3..5f0ecd4b9d3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylog.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, id InstanceId var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylogslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylogslot.go index 3e41c70cf7e..4aa95f5cdc1 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylogslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, id SlotIn var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatus.go b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatus.go index 3516dc8c1f0..9b0781e0511 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatus.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatus.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, id Instanc var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatusslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatusslot.go index 12bfe3d0fcf..08c034a5c4b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatusslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstancemsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, id Slo var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocess.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocess.go index 7d686bc51f8..32dd68b49cb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocess.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcess(ctx context.Context, id InstanceProces var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdump.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdump.go index 97c4de7e3d5..b3c0570e944 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdump.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDump(ctx context.Context, id InstancePr var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdumpslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdumpslot.go index e32d3e6a2a8..f8e66cc080a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdumpslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, id SlotIn var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmodule.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmodule.go index b529a1ca714..f936b7fea0e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmodule.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModule(ctx context.Context, id Instance var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmoduleslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmoduleslot.go index 0e1009c3dce..f68ff944498 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmoduleslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, id Slot var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessslot.go index fc66e9a0fac..a799b1317f0 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessSlot(ctx context.Context, id SlotInstan var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getinstanceworkflowslot.go b/resource-manager/web/2022-09-01/webapps/method_getinstanceworkflowslot.go index 3edbdf23848..8ef0c8f31c8 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getinstanceworkflowslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getinstanceworkflowslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, id SlotWorkf var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatus.go b/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatus.go index 9186da2ddf1..f05e2dd6aea 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatus.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMigrateMySqlStatus(ctx context.Context, id commonids.A var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatusslot.go b/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatusslot.go index 1916a1c2f04..973c158cbbf 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatusslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmigratemysqlstatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMigrateMySqlStatusSlot(ctx context.Context, id SlotId) var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmsdeploylog.go b/resource-manager/web/2022-09-01/webapps/method_getmsdeploylog.go index 1fec3d2b551..e284c016eea 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmsdeploylog.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmsdeploylog.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployLog(ctx context.Context, id commonids.AppServi var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmsdeploylogslot.go b/resource-manager/web/2022-09-01/webapps/method_getmsdeploylogslot.go index a7148235787..2f843d00946 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmsdeploylogslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployLogSlot(ctx context.Context, id SlotId) (resul var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatus.go b/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatus.go index 79957b82c58..2b61aa427cd 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatus.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployStatus(ctx context.Context, id commonids.AppSe var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatusslot.go b/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatusslot.go index 33ee57e263f..d644965e7fa 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatusslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getmsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, id SlotId) (re var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getnetworktraces.go b/resource-manager/web/2022-09-01/webapps/method_getnetworktraces.go index 05a761a58cf..c7baf1f6f32 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getnetworktraces.go +++ b/resource-manager/web/2022-09-01/webapps/method_getnetworktraces.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTraces(ctx context.Context, id NetworkTraceId) var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslot.go b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslot.go index fac98d3e21a..be577fd2382 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlot(ctx context.Context, id SlotNetworkT var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslotv2.go b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslotv2.go index f4cfa7b0265..6adf1088332 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslotv2.go +++ b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesslotv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, id SiteSlotNe var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesv2.go b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesv2.go index 075b0ec98e0..a647b7df7d6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getnetworktracesv2.go +++ b/resource-manager/web/2022-09-01/webapps/method_getnetworktracesv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesV2(ctx context.Context, id SiteNetworkTra var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getonedeploystatus.go b/resource-manager/web/2022-09-01/webapps/method_getonedeploystatus.go index 0192ff89661..861f9c0d26d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getonedeploystatus.go +++ b/resource-manager/web/2022-09-01/webapps/method_getonedeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetOneDeployStatus(ctx context.Context, id commonids.AppS var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getpremieraddon.go b/resource-manager/web/2022-09-01/webapps/method_getpremieraddon.go index 3a5194b7b4b..cab1e802f61 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getpremieraddon.go +++ b/resource-manager/web/2022-09-01/webapps/method_getpremieraddon.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOn(ctx context.Context, id PremierAddonId) ( var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getpremieraddonslot.go b/resource-manager/web/2022-09-01/webapps/method_getpremieraddonslot.go index 56055107545..b18d56f259b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getpremieraddonslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getpremieraddonslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivateaccess.go b/resource-manager/web/2022-09-01/webapps/method_getprivateaccess.go index dce43e8e8df..a475aa2c107 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivateaccess.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivateaccess.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateAccess(ctx context.Context, id commonids.AppSer var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivateaccessslot.go b/resource-manager/web/2022-09-01/webapps/method_getprivateaccessslot.go index bfb25e1f581..5ca04dcfd35 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivateaccessslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivateaccessslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateAccessSlot(ctx context.Context, id SlotId) (res var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnection.go b/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnection.go index 26c7871fbbf..078deb2c24a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, id Priv var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnectionslot.go index 9c25a41677f..dc1da065c8f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivateendpointconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresources.go b/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresources.go index 667be0c0c72..7a0922f7157 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresources.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateLinkResources(ctx context.Context, id commonids var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresourcesslot.go b/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresourcesslot.go index d2b79716d14..3dc2ee16463 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresourcesslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprivatelinkresourcesslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, id SlotI var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocess.go b/resource-manager/web/2022-09-01/webapps/method_getprocess.go index 42442c0b292..f53ec86fa97 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocess.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcess(ctx context.Context, id ProcessId) (result Get var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocessdump.go b/resource-manager/web/2022-09-01/webapps/method_getprocessdump.go index e4ed77f79f6..4aa575213d9 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocessdump.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDump(ctx context.Context, id ProcessId) (result var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocessdumpslot.go b/resource-manager/web/2022-09-01/webapps/method_getprocessdumpslot.go index c46e7a62c3d..b904b54a53d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocessdumpslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDumpSlot(ctx context.Context, id SlotProcessId) var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocessmodule.go b/resource-manager/web/2022-09-01/webapps/method_getprocessmodule.go index b69821fe4ba..84621827e5b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocessmodule.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModule(ctx context.Context, id ModuleId) (resul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocessmoduleslot.go b/resource-manager/web/2022-09-01/webapps/method_getprocessmoduleslot.go index 6e1e3d05fc7..eb70f4f6077 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocessmoduleslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModuleSlot(ctx context.Context, id ProcessModul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getprocessslot.go b/resource-manager/web/2022-09-01/webapps/method_getprocessslot.go index 6d688c86119..125ebe5550c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getprocessslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessSlot(ctx context.Context, id SlotProcessId) (re var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getpubliccertificate.go b/resource-manager/web/2022-09-01/webapps/method_getpubliccertificate.go index 294c7a1c1cd..d2b18926090 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getpubliccertificate.go +++ b/resource-manager/web/2022-09-01/webapps/method_getpubliccertificate.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificate(ctx context.Context, id PublicCertif var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getpubliccertificateslot.go b/resource-manager/web/2022-09-01/webapps/method_getpubliccertificateslot.go index 20a409afcce..81a159edd9f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getpubliccertificateslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getpubliccertificateslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificateSlot(ctx context.Context, id SlotPubl var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnection.go b/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnection.go index e709d3033c4..279bcaac0fc 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnection(ctx context.Context, id HybridC var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnectionslot.go index 5cf0fc7ce2e..8260c31d4d5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getrelayserviceconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, id Slo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getscmallowed.go b/resource-manager/web/2022-09-01/webapps/method_getscmallowed.go index 588b11ec267..9b0418a2f0f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getscmallowed.go +++ b/resource-manager/web/2022-09-01/webapps/method_getscmallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetScmAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getscmallowedslot.go b/resource-manager/web/2022-09-01/webapps/method_getscmallowedslot.go index 3dd063f8aca..53a7a3a2331 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getscmallowedslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getscmallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetScmAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreference.go b/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreference.go index 547724012d7..aff9e649a27 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreference.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Cont var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go b/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go index ae2b9b61258..9cd169fbf00 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context. var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsiteextension.go b/resource-manager/web/2022-09-01/webapps/method_getsiteextension.go index e4a475e766d..0a6945f3b7d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsiteextension.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsiteextension.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtension(ctx context.Context, id SiteExtensionId) var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsiteextensionslot.go b/resource-manager/web/2022-09-01/webapps/method_getsiteextensionslot.go index 1bae54da3e3..e54acbb50ef 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsiteextensionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsiteextensionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtensionSlot(ctx context.Context, id SlotSiteExte var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflag.go b/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflag.go index 7f2d3f3ddd0..63dbaae3ef5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflag.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflag.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, id commonids. var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflagslot.go b/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflagslot.go index 170b11be7bc..4476bb15496 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflagslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsitephperrorlogflagslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, id SlotId var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getslot.go b/resource-manager/web/2022-09-01/webapps/method_getslot.go index fd2c98b535c..96f47332251 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSlot(ctx context.Context, id SlotId) (result GetSlotOp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsourcecontrol.go b/resource-manager/web/2022-09-01/webapps/method_getsourcecontrol.go index 7679f9feaf0..8f1380fc15a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsourcecontrol.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsourcecontrol.go @@ -49,7 +49,6 @@ func (c WebAppsClient) GetSourceControl(ctx context.Context, id commonids.AppSer var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getsourcecontrolslot.go b/resource-manager/web/2022-09-01/webapps/method_getsourcecontrolslot.go index d06bb3ad906..59f28a81eeb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getsourcecontrolslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getsourcecontrolslot.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetSourceControlSlot(ctx context.Context, id SlotId) (res var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnection.go b/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnection.go index 1914aa45261..8d24a59f9ff 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnection.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, id var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnectionslot.go index 8f25ed183cf..c94d3312298 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getswiftvirtualnetworkconnectionslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjob.go b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjob.go index fa85150bc22..f408fb21bb1 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjob.go +++ b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJob(ctx context.Context, id TriggeredWebJo var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistory.go b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistory.go index 25d867bd171..d8dac67561f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistory.go +++ b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistory.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, id History var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistoryslot.go b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistoryslot.go index da1075c7ef8..db0ae2aa46c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistoryslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobhistoryslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, id Tri var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobslot.go b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobslot.go index df601d6b8e0..9d5fdbad976 100644 --- a/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_gettriggeredwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, id SlotTrigge var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getvnetconnection.go b/resource-manager/web/2022-09-01/webapps/method_getvnetconnection.go index 8cbb17041d9..4568fe01196 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getvnetconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_getvnetconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnection(ctx context.Context, id VirtualNetworkC var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongateway.go b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongateway.go index d7147b08b2f..71c79ea8c65 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongateway.go +++ b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongateway.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGateway(ctx context.Context, id GatewayI var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongatewayslot.go b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongatewayslot.go index e3f7ab94a05..7abcca7f5ab 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongatewayslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectiongatewayslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, id Slot var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectionslot.go index 225b53b1c19..d212cb00170 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getvnetconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getvnetconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionSlot(ctx context.Context, id SlotVirtual var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getwebjob.go b/resource-manager/web/2022-09-01/webapps/method_getwebjob.go index 1544e50a120..283a114229d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getwebjob.go +++ b/resource-manager/web/2022-09-01/webapps/method_getwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJob(ctx context.Context, id WebJobId) (result GetWe var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getwebjobslot.go b/resource-manager/web/2022-09-01/webapps/method_getwebjobslot.go index 12438b92757..e1b57da034c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getwebjobslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJobSlot(ctx context.Context, id SlotWebJobId) (resu var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogs.go b/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogs.go index a78a69fc9be..b663861a930 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogs.go +++ b/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogs.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, id commonids var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogsslot.go b/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogsslot.go index 6ab570eb78f..6446530d54e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_getwebsitecontainerlogsslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, id SlotI var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_getworkflow.go b/resource-manager/web/2022-09-01/webapps/method_getworkflow.go index 6bc23af103f..5588ed7e61d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_getworkflow.go +++ b/resource-manager/web/2022-09-01/webapps/method_getworkflow.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWorkflow(ctx context.Context, id WorkflowId) (result G var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_iscloneable.go b/resource-manager/web/2022-09-01/webapps/method_iscloneable.go index 1dc89371c3b..0603d8f018e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_iscloneable.go +++ b/resource-manager/web/2022-09-01/webapps/method_iscloneable.go @@ -47,7 +47,6 @@ func (c WebAppsClient) IsCloneable(ctx context.Context, id commonids.AppServiceI var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_iscloneableslot.go b/resource-manager/web/2022-09-01/webapps/method_iscloneableslot.go index c28faba968a..e971d3c63e4 100644 --- a/resource-manager/web/2022-09-01/webapps/method_iscloneableslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_iscloneableslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) IsCloneableSlot(ctx context.Context, id SlotId) (result I var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listapplicationsettings.go b/resource-manager/web/2022-09-01/webapps/method_listapplicationsettings.go index 2fe6d0b596f..ce70c9042fa 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listapplicationsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_listapplicationsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListApplicationSettings(ctx context.Context, id commonids var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listapplicationsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_listapplicationsettingsslot.go index afbe704c229..7eefeaa0feb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listapplicationsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listapplicationsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, id SlotI var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccounts.go b/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccounts.go index 022ded5e7f4..bc513083273 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccounts.go +++ b/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccounts.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListAzureStorageAccounts(ctx context.Context, id commonid var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccountsslot.go b/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccountsslot.go index 1ae48f64d6f..c5a1cd2c3ab 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccountsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listazurestorageaccountsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, id Slot var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecrets.go b/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecrets.go index 3334a5ea20b..31d9021a61b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecrets.go +++ b/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecrets.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecrets(ctx context.Context, id BackupId, var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecretsslot.go b/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecretsslot.go index 36a85d16ed5..ddc128b594c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecretsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listbackupstatussecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, id SlotB var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listbyresourcegroup.go b/resource-manager/web/2022-09-01/webapps/method_listbyresourcegroup.go index 3f9b2569d77..0453dace48d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listbyresourcegroup.go +++ b/resource-manager/web/2022-09-01/webapps/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_listconnectionstrings.go b/resource-manager/web/2022-09-01/webapps/method_listconnectionstrings.go index dedfccfc4dc..64554b4fd90 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listconnectionstrings.go +++ b/resource-manager/web/2022-09-01/webapps/method_listconnectionstrings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListConnectionStrings(ctx context.Context, id commonids.A var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listconnectionstringsslot.go b/resource-manager/web/2022-09-01/webapps/method_listconnectionstringsslot.go index 3498220d398..4f5c82268e8 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listconnectionstringsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listconnectionstringsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListConnectionStringsSlot(ctx context.Context, id SlotId) var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listdeploymentlog.go b/resource-manager/web/2022-09-01/webapps/method_listdeploymentlog.go index 35f887d50ed..c08913fb632 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listdeploymentlog.go +++ b/resource-manager/web/2022-09-01/webapps/method_listdeploymentlog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLog(ctx context.Context, id DeploymentId) ( var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listdeploymentlogslot.go b/resource-manager/web/2022-09-01/webapps/method_listdeploymentlogslot.go index 570627468c5..ac50302c638 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listdeploymentlogslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listdeploymentlogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLogSlot(ctx context.Context, id SlotDeploym var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listfunctionkeys.go b/resource-manager/web/2022-09-01/webapps/method_listfunctionkeys.go index 7bd6682f1cc..8408b4dae45 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listfunctionkeys.go +++ b/resource-manager/web/2022-09-01/webapps/method_listfunctionkeys.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeys(ctx context.Context, id FunctionId) (res var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listfunctionkeysslot.go b/resource-manager/web/2022-09-01/webapps/method_listfunctionkeysslot.go index 77aae0aaf70..08a6e0172a6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listfunctionkeysslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listfunctionkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeysSlot(ctx context.Context, id SlotFunction var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listfunctionsecrets.go b/resource-manager/web/2022-09-01/webapps/method_listfunctionsecrets.go index 3f26b8322db..45eb50cf982 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listfunctionsecrets.go +++ b/resource-manager/web/2022-09-01/webapps/method_listfunctionsecrets.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecrets(ctx context.Context, id FunctionId) ( var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listfunctionsecretsslot.go b/resource-manager/web/2022-09-01/webapps/method_listfunctionsecretsslot.go index a8354756f45..15de188c3d5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listfunctionsecretsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listfunctionsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, id SlotFunct var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listhostkeys.go b/resource-manager/web/2022-09-01/webapps/method_listhostkeys.go index 64dcbd8bfb6..fabdace3a5d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listhostkeys.go +++ b/resource-manager/web/2022-09-01/webapps/method_listhostkeys.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHostKeys(ctx context.Context, id commonids.AppService var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listhostkeysslot.go b/resource-manager/web/2022-09-01/webapps/method_listhostkeysslot.go index af23867eada..750e7a12832 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listhostkeysslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listhostkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHostKeysSlot(ctx context.Context, id SlotId) (result var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listhybridconnections.go b/resource-manager/web/2022-09-01/webapps/method_listhybridconnections.go index 08364fcb2af..0aea9bb9d04 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listhybridconnections.go +++ b/resource-manager/web/2022-09-01/webapps/method_listhybridconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHybridConnections(ctx context.Context, id commonids.A var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listhybridconnectionsslot.go b/resource-manager/web/2022-09-01/webapps/method_listhybridconnectionsslot.go index 7508c1275e5..d6ec6a8ec2b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listhybridconnectionsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listhybridconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, id SlotId) var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listmetadata.go b/resource-manager/web/2022-09-01/webapps/method_listmetadata.go index ecb2e7ae7da..8998ba62c0d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listmetadata.go +++ b/resource-manager/web/2022-09-01/webapps/method_listmetadata.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListMetadata(ctx context.Context, id commonids.AppService var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listmetadataslot.go b/resource-manager/web/2022-09-01/webapps/method_listmetadataslot.go index f392f8f6086..b2dcfca269d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listmetadataslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listmetadataslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListMetadataSlot(ctx context.Context, id SlotId) (result var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listnetworkfeatures.go b/resource-manager/web/2022-09-01/webapps/method_listnetworkfeatures.go index 5cd439a53af..fde1a7c3d73 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listnetworkfeatures.go +++ b/resource-manager/web/2022-09-01/webapps/method_listnetworkfeatures.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeatures(ctx context.Context, id NetworkFeatur var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listnetworkfeaturesslot.go b/resource-manager/web/2022-09-01/webapps/method_listnetworkfeaturesslot.go index 41badd13da9..c91b5baede0 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listnetworkfeaturesslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listnetworkfeaturesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, id SlotNetwo var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listperfmoncounters.go b/resource-manager/web/2022-09-01/webapps/method_listperfmoncounters.go index 3e795219b6f..ab98305afda 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listperfmoncounters.go +++ b/resource-manager/web/2022-09-01/webapps/method_listperfmoncounters.go @@ -40,6 +40,7 @@ func (o ListPerfMonCountersOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_listperfmoncountersslot.go b/resource-manager/web/2022-09-01/webapps/method_listperfmoncountersslot.go index 3a2754f799e..b82ebb85e22 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listperfmoncountersslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listperfmoncountersslot.go @@ -39,6 +39,7 @@ func (o ListPerfMonCountersSlotOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_listpremieraddons.go b/resource-manager/web/2022-09-01/webapps/method_listpremieraddons.go index 0215cabcf57..b11bf4233c3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listpremieraddons.go +++ b/resource-manager/web/2022-09-01/webapps/method_listpremieraddons.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListPremierAddOns(ctx context.Context, id commonids.AppSe var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listpremieraddonsslot.go b/resource-manager/web/2022-09-01/webapps/method_listpremieraddonsslot.go index 044b2912f5a..73dbf683ae9 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listpremieraddonsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listpremieraddonsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, id SlotId) (re var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecrets.go b/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecrets.go index 7da7da0b23c..07b6308ca62 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecrets.go +++ b/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecrets.go @@ -51,7 +51,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecrets(ctx context.Context, var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go b/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go index 2a4701423fd..7f32d269123 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecretsSlot(ctx context.Conte var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnections.go b/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnections.go index d7e18cd89e8..de929a519e3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnections.go +++ b/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListRelayServiceConnections(ctx context.Context, id commo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnectionsslot.go b/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnectionsslot.go index 1f4ad19a8c9..56b6752c72f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnectionsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listrelayserviceconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, id S var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listsitepushsettings.go b/resource-manager/web/2022-09-01/webapps/method_listsitepushsettings.go index c62e23599bc..99b7cd099b7 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsitepushsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsitepushsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSitePushSettings(ctx context.Context, id commonids.Ap var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listsitepushsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_listsitepushsettingsslot.go index c68fba350a3..38b18425808 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsitepushsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsitepushsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, id SlotId) var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listslotconfigurationnames.go b/resource-manager/web/2022-09-01/webapps/method_listslotconfigurationnames.go index 06953e01e3f..ccfa9dc0e21 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listslotconfigurationnames.go +++ b/resource-manager/web/2022-09-01/webapps/method_listslotconfigurationnames.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSlotConfigurationNames(ctx context.Context, id common var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggers.go b/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggers.go index e92a5874991..3ba753d99a5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggers.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggers.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, id commonid var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggersslot.go b/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggersslot.go index e00d4fd2f39..87112ea8e9a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggersslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listsyncfunctiontriggersslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, id Slot var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listusages.go b/resource-manager/web/2022-09-01/webapps/method_listusages.go index 6a245dab93f..09825b54c80 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listusages.go +++ b/resource-manager/web/2022-09-01/webapps/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_listusagesslot.go b/resource-manager/web/2022-09-01/webapps/method_listusagesslot.go index cbcbac0a262..0f5459ebad6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listusagesslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listusagesslot.go @@ -39,6 +39,7 @@ func (o ListUsagesSlotOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_listvnetconnections.go b/resource-manager/web/2022-09-01/webapps/method_listvnetconnections.go index 72289ddc25f..9257086d2e2 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listvnetconnections.go +++ b/resource-manager/web/2022-09-01/webapps/method_listvnetconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListVnetConnections(ctx context.Context, id commonids.App var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listvnetconnectionsslot.go b/resource-manager/web/2022-09-01/webapps/method_listvnetconnectionsslot.go index 8018d954faf..942cd6b0476 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listvnetconnectionsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listvnetconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, id SlotId) ( var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnections.go b/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnections.go index 05c1769e6c4..4c7d04686ac 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnections.go +++ b/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListWorkflowsConnections(ctx context.Context, id commonid var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnectionsslot.go b/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnectionsslot.go index b1319800e9b..b85e7a72003 100644 --- a/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnectionsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_listworkflowsconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, id Slot var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_migratestorage.go b/resource-manager/web/2022-09-01/webapps/method_migratestorage.go index f59a0b4a276..1fb58c4f795 100644 --- a/resource-manager/web/2022-09-01/webapps/method_migratestorage.go +++ b/resource-manager/web/2022-09-01/webapps/method_migratestorage.go @@ -38,6 +38,7 @@ func (o MigrateStorageOperationOptions) ToHeaders() *client.Headers { func (o MigrateStorageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnet.go b/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnet.go index 63ec49104fc..419ea335744 100644 --- a/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnet.go +++ b/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnet.go @@ -51,7 +51,6 @@ func (c WebAppsClient) PutPrivateAccessVnet(ctx context.Context, id commonids.Ap var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnetslot.go b/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnetslot.go index 465f0eb8449..a2031d0024b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnetslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_putprivateaccessvnetslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, id SlotId, var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_restart.go b/resource-manager/web/2022-09-01/webapps/method_restart.go index 4634c74caa7..47d9224417a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_restart.go +++ b/resource-manager/web/2022-09-01/webapps/method_restart.go @@ -35,6 +35,7 @@ func (o RestartOperationOptions) ToHeaders() *client.Headers { func (o RestartOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_restartslot.go b/resource-manager/web/2022-09-01/webapps/method_restartslot.go index 28902482a9c..ca81876358d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_restartslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_restartslot.go @@ -34,6 +34,7 @@ func (o RestartSlotOperationOptions) ToHeaders() *client.Headers { func (o RestartSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_startnetworktrace.go b/resource-manager/web/2022-09-01/webapps/method_startnetworktrace.go index fa037fe2276..de35cae8c37 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startnetworktrace.go +++ b/resource-manager/web/2022-09-01/webapps/method_startnetworktrace.go @@ -40,6 +40,7 @@ func (o StartNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_startnetworktraceslot.go b/resource-manager/web/2022-09-01/webapps/method_startnetworktraceslot.go index 8390b0d5feb..f4ecbb2878c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startnetworktraceslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_startnetworktraceslot.go @@ -39,6 +39,7 @@ func (o StartNetworkTraceSlotOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktrace.go b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktrace.go index 8ca69360afe..c4aceaac67a 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktrace.go +++ b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktrace.go @@ -37,6 +37,7 @@ func (o StartWebSiteNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartWebSiteNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, id commonid var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperation.go b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperation.go index 9fd9a12487f..c2f83e72964 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperation.go +++ b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperation.go @@ -40,6 +40,7 @@ func (o StartWebSiteNetworkTraceOperationOperationOptions) ToHeaders() *client.H func (o StartWebSiteNetworkTraceOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperationslot.go b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperationslot.go index 73249d3a29a..ceb485a4310 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceoperationslot.go @@ -39,6 +39,7 @@ func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToHeaders() *clie func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceslot.go b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceslot.go index 697b0f20648..488181959e2 100644 --- a/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_startwebsitenetworktraceslot.go @@ -36,6 +36,7 @@ func (o StartWebSiteNetworkTraceSlotOperationOptions) ToHeaders() *client.Header func (o StartWebSiteNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, id Slot var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_update.go b/resource-manager/web/2022-09-01/webapps/method_update.go index ed1ba13fa40..ce51465dd90 100644 --- a/resource-manager/web/2022-09-01/webapps/method_update.go +++ b/resource-manager/web/2022-09-01/webapps/method_update.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Update(ctx context.Context, id commonids.AppServiceId, in var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettings.go b/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettings.go index f60ab8838c9..a6abe2e7f9f 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateApplicationSettings(ctx context.Context, id commoni var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettingsslot.go index b0382487cf8..dabaad9a1bb 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateapplicationsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, id Slo var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateauthsettings.go b/resource-manager/web/2022-09-01/webapps/method_updateauthsettings.go index ff363074bef..c4721b446e6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateauthsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateauthsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettings(ctx context.Context, id commonids.AppS var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsslot.go index 434d233bfd4..efd12302a3c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, id SlotId, in var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2.go b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2.go index d4fce76e8de..630b45422db 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, id commonids.Ap var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2slot.go b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2slot.go index e6ea9a8b1ee..6e054358fe5 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2slot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateauthsettingsv2slot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, id SlotId, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccounts.go b/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccounts.go index a3ae2d6b3c9..bbda87f586c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccounts.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccounts.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, id common var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccountsslot.go b/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccountsslot.go index 16e730b1e99..de67b3d4cff 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccountsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateazurestorageaccountsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, id Sl var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatebackupconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_updatebackupconfiguration.go index b8bf6ec24e8..eadd42c46b4 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatebackupconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatebackupconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateBackupConfiguration(ctx context.Context, id commoni var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatebackupconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_updatebackupconfigurationslot.go index 74c8ef4b5e2..6cc6c0db6dd 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatebackupconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatebackupconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, id Slo var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateconfiguration.go b/resource-manager/web/2022-09-01/webapps/method_updateconfiguration.go index ace56a0e15a..540effb8493 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateconfiguration.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConfiguration(ctx context.Context, id commonids.App var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateconfigurationslot.go b/resource-manager/web/2022-09-01/webapps/method_updateconfigurationslot.go index 6909e91308f..2b8a3c837d6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateconfigurationslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConfigurationSlot(ctx context.Context, id SlotId, i var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateconnectionstrings.go b/resource-manager/web/2022-09-01/webapps/method_updateconnectionstrings.go index 7d97ab27e33..e2583e323f7 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateconnectionstrings.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateconnectionstrings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConnectionStrings(ctx context.Context, id commonids var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateconnectionstringsslot.go b/resource-manager/web/2022-09-01/webapps/method_updateconnectionstringsslot.go index 197d01fa963..02c8aab1742 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateconnectionstringsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateconnectionstringsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, id SlotI var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfig.go b/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfig.go index 8885b9ada96..3fd9dd8089b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfig.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfig.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, id common var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfigslot.go b/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfigslot.go index 7e46415c0a9..76e26082497 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfigslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatediagnosticlogsconfigslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, id Sl var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifier.go b/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifier.go index e2f684a8ec6..e9926b92e04 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifier.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, id D var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifierslot.go b/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifierslot.go index 118cec095ff..8bfd226892c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifierslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateftpallowed.go b/resource-manager/web/2022-09-01/webapps/method_updateftpallowed.go index d8b2976c309..fb80df44e08 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateftpallowed.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateftpallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateFtpAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateftpallowedslot.go b/resource-manager/web/2022-09-01/webapps/method_updateftpallowedslot.go index 5e3125acabb..8600093e952 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateftpallowedslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateftpallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatehybridconnection.go b/resource-manager/web/2022-09-01/webapps/method_updatehybridconnection.go index 3641ff27936..14d186263b3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatehybridconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnection(ctx context.Context, id RelayId, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatehybridconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_updatehybridconnectionslot.go index 51cc1d0206d..8136fefe9af 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatehybridconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, id SlotHy var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatemetadata.go b/resource-manager/web/2022-09-01/webapps/method_updatemetadata.go index e5e463a2656..55294309b86 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatemetadata.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatemetadata.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateMetadata(ctx context.Context, id commonids.AppServi var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatemetadataslot.go b/resource-manager/web/2022-09-01/webapps/method_updatemetadataslot.go index 7f24c677cda..99995876e7c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatemetadataslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatemetadataslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateMetadataSlot(ctx context.Context, id SlotId, input var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatepremieraddon.go b/resource-manager/web/2022-09-01/webapps/method_updatepremieraddon.go index 283da43f6b9..dcd3c9b2a8b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatepremieraddon.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatepremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOn(ctx context.Context, id PremierAddonId var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatepremieraddonslot.go b/resource-manager/web/2022-09-01/webapps/method_updatepremieraddonslot.go index a37e30d7c27..e1c27a4d55e 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatepremieraddonslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatepremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, id SlotPremie var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnection.go b/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnection.go index 3c8dfb4108d..cd611e9ec20 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, id Hybr var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnectionslot.go index fca0b74fb39..c24d82100f8 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, id var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatescmallowed.go b/resource-manager/web/2022-09-01/webapps/method_updatescmallowed.go index 0be20463210..120d3629001 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatescmallowed.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatescmallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateScmAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatescmallowedslot.go b/resource-manager/web/2022-09-01/webapps/method_updatescmallowedslot.go index f124b6f3526..a3243abfa63 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatescmallowedslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatescmallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettings.go b/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettings.go index 20b493aae8c..668665c05d4 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettings.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSitePushSettings(ctx context.Context, id commonids. var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettingsslot.go b/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettingsslot.go index 774c0e26cbd..09988246b8c 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettingsslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatesitepushsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, id SlotId var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateslot.go b/resource-manager/web/2022-09-01/webapps/method_updateslot.go index d7a0e90cd61..82afe00eea3 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSlot(ctx context.Context, id SlotId, input SitePatc var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateslotconfigurationnames.go b/resource-manager/web/2022-09-01/webapps/method_updateslotconfigurationnames.go index f4f5b05b966..8eb1665dd4d 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateslotconfigurationnames.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateslotconfigurationnames.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, id comm var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrol.go b/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrol.go index 792bf5a462b..a9b4d29999b 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrol.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrol.go @@ -53,7 +53,6 @@ func (c WebAppsClient) UpdateSourceControl(ctx context.Context, id commonids.App var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrolslot.go b/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrolslot.go index 5d25563b5d0..27063f72815 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrolslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatesourcecontrolslot.go @@ -52,7 +52,6 @@ func (c WebAppsClient) UpdateSourceControlSlot(ctx context.Context, id SlotId, i var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go index b54e54b619e..1ed44d1b945 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context. var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go index 48bbaa559c8..86d0e38f499 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx cont var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnection.go b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnection.go index 987cb8fbff7..d24ddba2035 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnection.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnection(ctx context.Context, id VirtualNetwo var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongateway.go b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongateway.go index dd57888f81e..710e26ab2d6 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongateway.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, id Gatew var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongatewayslot.go b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongatewayslot.go index 1be5209f364..e292d9dd430 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, id S var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectionslot.go b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectionslot.go index c076ea62f81..1ce4e92a640 100644 --- a/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectionslot.go +++ b/resource-manager/web/2022-09-01/webapps/method_updatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, id SlotVirt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/webapps/version.go b/resource-manager/web/2022-09-01/webapps/version.go index 961c3ffc729..ed11824c0d9 100644 --- a/resource-manager/web/2022-09-01/webapps/version.go +++ b/resource-manager/web/2022-09-01/webapps/version.go @@ -1,12 +1,10 @@ package webapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapps/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/README.md b/resource-manager/web/2022-09-01/workflowrunactions/README.md index de8f8ffabca..5d30d88b737 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/README.md +++ b/resource-manager/web/2022-09-01/workflowrunactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflowrunactions` Documentation -The `workflowrunactions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflowrunactions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflowrunactions/client.go b/resource-manager/web/2022-09-01/workflowrunactions/client.go index 75492551c09..463cc06a5f9 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/client.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/client.go @@ -15,7 +15,7 @@ type WorkflowRunActionsClient struct { } func NewWorkflowRunActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowrunactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowrunactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunActionsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/id_action.go b/resource-manager/web/2022-09-01/workflowrunactions/id_action.go index e8b0fe5a8c1..d6e5590e6b7 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/id_action.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/id_action.go @@ -48,7 +48,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/id_repetition.go b/resource-manager/web/2022-09-01/workflowrunactions/id_repetition.go index e546f29fa0c..f822c62b0b6 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/id_repetition.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/id_repetition.go @@ -50,7 +50,7 @@ func ParseRepetitionID(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/id_requesthistory.go b/resource-manager/web/2022-09-01/workflowrunactions/id_requesthistory.go index 2425ea99f3c..0240038e5ce 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/id_requesthistory.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/id_requesthistory.go @@ -52,7 +52,7 @@ func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/id_run.go b/resource-manager/web/2022-09-01/workflowrunactions/id_run.go index 3d1f8970278..5e64d944ef3 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/id_run.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/id_scoperepetition.go b/resource-manager/web/2022-09-01/workflowrunactions/id_scoperepetition.go index effb962622b..0d47f7e4f39 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/id_scoperepetition.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/id_scoperepetition.go @@ -50,7 +50,7 @@ func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, erro } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_coperepetitionsget.go b/resource-manager/web/2022-09-01/workflowrunactions/method_coperepetitionsget.go index f767e43bd99..f860d0462b4 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_coperepetitionsget.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_coperepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) CopeRepetitionsGet(ctx context.Context, id Sco var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_get.go b/resource-manager/web/2022-09-01/workflowrunactions/method_get.go index 83af4ca8829..c86b02f4ca2 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_get.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) Get(ctx context.Context, id ActionId) (result var model WorkflowRunAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_list.go b/resource-manager/web/2022-09-01/workflowrunactions/method_list.go index 532e550d8d0..084239bb128 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_list.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsget.go b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsget.go index ecac4315b0f..eb39d17169e 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsget.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsGet(ctx context.Co var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go index 41bb4f82cb2..67800134834 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesGe var model RequestHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowrunactions/version.go b/resource-manager/web/2022-09-01/workflowrunactions/version.go index 26b37d5c9b0..445a9210a6b 100644 --- a/resource-manager/web/2022-09-01/workflowrunactions/version.go +++ b/resource-manager/web/2022-09-01/workflowrunactions/version.go @@ -1,12 +1,10 @@ package workflowrunactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowrunactions/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflowruns/README.md b/resource-manager/web/2022-09-01/workflowruns/README.md index 6c62696f701..92c6b1c966a 100644 --- a/resource-manager/web/2022-09-01/workflowruns/README.md +++ b/resource-manager/web/2022-09-01/workflowruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflowruns` Documentation -The `workflowruns` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflowruns` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflowruns/client.go b/resource-manager/web/2022-09-01/workflowruns/client.go index e41dae0872b..73a34bf9d60 100644 --- a/resource-manager/web/2022-09-01/workflowruns/client.go +++ b/resource-manager/web/2022-09-01/workflowruns/client.go @@ -15,7 +15,7 @@ type WorkflowRunsClient struct { } func NewWorkflowRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflowruns/id_managementworkflow.go b/resource-manager/web/2022-09-01/workflowruns/id_managementworkflow.go index 7750de61f4e..edf5bdfdcfa 100644 --- a/resource-manager/web/2022-09-01/workflowruns/id_managementworkflow.go +++ b/resource-manager/web/2022-09-01/workflowruns/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowruns/id_run.go b/resource-manager/web/2022-09-01/workflowruns/id_run.go index 9117bf15feb..8de1b9a52f1 100644 --- a/resource-manager/web/2022-09-01/workflowruns/id_run.go +++ b/resource-manager/web/2022-09-01/workflowruns/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowruns/method_get.go b/resource-manager/web/2022-09-01/workflowruns/method_get.go index 6ee3078a7f7..17d61b2a5b1 100644 --- a/resource-manager/web/2022-09-01/workflowruns/method_get.go +++ b/resource-manager/web/2022-09-01/workflowruns/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunsClient) Get(ctx context.Context, id RunId) (result GetOperat var model WorkflowRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowruns/method_list.go b/resource-manager/web/2022-09-01/workflowruns/method_list.go index b2188f33e6d..01f6d279698 100644 --- a/resource-manager/web/2022-09-01/workflowruns/method_list.go +++ b/resource-manager/web/2022-09-01/workflowruns/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/workflowruns/version.go b/resource-manager/web/2022-09-01/workflowruns/version.go index 5cd8fd44ac6..e0b8dbfe4fe 100644 --- a/resource-manager/web/2022-09-01/workflowruns/version.go +++ b/resource-manager/web/2022-09-01/workflowruns/version.go @@ -1,12 +1,10 @@ package workflowruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowruns/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflows/README.md b/resource-manager/web/2022-09-01/workflows/README.md index 27f6239dd9e..ea264c44619 100644 --- a/resource-manager/web/2022-09-01/workflows/README.md +++ b/resource-manager/web/2022-09-01/workflows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflows` Documentation -The `workflows` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflows` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflows/client.go b/resource-manager/web/2022-09-01/workflows/client.go index e036e0f1d48..46648dbfe97 100644 --- a/resource-manager/web/2022-09-01/workflows/client.go +++ b/resource-manager/web/2022-09-01/workflows/client.go @@ -15,7 +15,7 @@ type WorkflowsClient struct { } func NewWorkflowsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflows/id_managementworkflow.go b/resource-manager/web/2022-09-01/workflows/id_managementworkflow.go index bded96b67f7..edfe867dd0a 100644 --- a/resource-manager/web/2022-09-01/workflows/id_managementworkflow.go +++ b/resource-manager/web/2022-09-01/workflows/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflows/version.go b/resource-manager/web/2022-09-01/workflows/version.go index 2c4b4c5a055..035f60b2c98 100644 --- a/resource-manager/web/2022-09-01/workflows/version.go +++ b/resource-manager/web/2022-09-01/workflows/version.go @@ -1,12 +1,10 @@ package workflows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflows/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/README.md b/resource-manager/web/2022-09-01/workflowtriggerhistories/README.md index ee64f1386b2..22132f211e9 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/README.md +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflowtriggerhistories` Documentation -The `workflowtriggerhistories` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflowtriggerhistories` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/client.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/client.go index fc4b05de0ba..e1a3815134e 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/client.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/client.go @@ -15,7 +15,7 @@ type WorkflowTriggerHistoriesClient struct { } func NewWorkflowTriggerHistoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggerHistoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggerHistoriesClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/id_trigger.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/id_trigger.go index 66c61b8d260..70d9c879379 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/id_trigger.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/id_triggerhistory.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/id_triggerhistory.go index f69ef638db4..6875b7ef985 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/id_triggerhistory.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/id_triggerhistory.go @@ -48,7 +48,7 @@ func ParseTriggerHistoryID(input string) (*TriggerHistoryId, error) { } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerHistoryIDInsensitively(input string) (*TriggerHistoryId, error) } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/method_get.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/method_get.go index 321b09eec4f..25ba7f1b42f 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/method_get.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggerHistoriesClient) Get(ctx context.Context, id TriggerHisto var model WorkflowTriggerHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/method_list.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/method_list.go index 9737ffdb68c..fa03f7faa25 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/method_list.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/workflowtriggerhistories/version.go b/resource-manager/web/2022-09-01/workflowtriggerhistories/version.go index d0408aacc1f..24b9b78d06d 100644 --- a/resource-manager/web/2022-09-01/workflowtriggerhistories/version.go +++ b/resource-manager/web/2022-09-01/workflowtriggerhistories/version.go @@ -1,12 +1,10 @@ package workflowtriggerhistories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggerhistories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggerhistories/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/README.md b/resource-manager/web/2022-09-01/workflowtriggers/README.md index 9e2e8eb4df6..0402e4d3a3e 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/README.md +++ b/resource-manager/web/2022-09-01/workflowtriggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflowtriggers` Documentation -The `workflowtriggers` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflowtriggers` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflowtriggers/client.go b/resource-manager/web/2022-09-01/workflowtriggers/client.go index 4788e395649..06e7b704ecf 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/client.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/client.go @@ -15,7 +15,7 @@ type WorkflowTriggersClient struct { } func NewWorkflowTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggersClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/id_managementworkflow.go b/resource-manager/web/2022-09-01/workflowtriggers/id_managementworkflow.go index 6c04d3a8fa8..84b6b3b2a1b 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/id_managementworkflow.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/id_trigger.go b/resource-manager/web/2022-09-01/workflowtriggers/id_trigger.go index aacc113189c..759041672ee 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/id_trigger.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/method_get.go b/resource-manager/web/2022-09-01/workflowtriggers/method_get.go index 6ff7e339030..d1bcd504fe2 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/method_get.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggersClient) Get(ctx context.Context, id TriggerId) (result G var model WorkflowTrigger result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/method_getschemajson.go b/resource-manager/web/2022-09-01/workflowtriggers/method_getschemajson.go index 286934bd0ea..c26d831b302 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/method_getschemajson.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/method_getschemajson.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) GetSchemaJson(ctx context.Context, id TriggerId) var model JsonSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/method_list.go b/resource-manager/web/2022-09-01/workflowtriggers/method_list.go index 0f1c596b80c..e311d6393de 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/method_list.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/method_listcallbackurl.go b/resource-manager/web/2022-09-01/workflowtriggers/method_listcallbackurl.go index 5f6d581c207..7e44f7f9763 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/method_listcallbackurl.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/method_listcallbackurl.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) ListCallbackUrl(ctx context.Context, id TriggerI var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowtriggers/version.go b/resource-manager/web/2022-09-01/workflowtriggers/version.go index 2737cc5c111..addc741c657 100644 --- a/resource-manager/web/2022-09-01/workflowtriggers/version.go +++ b/resource-manager/web/2022-09-01/workflowtriggers/version.go @@ -1,12 +1,10 @@ package workflowtriggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggers/2022-09-01" } diff --git a/resource-manager/web/2022-09-01/workflowversions/README.md b/resource-manager/web/2022-09-01/workflowversions/README.md index 18872b27257..1efa77c20d2 100644 --- a/resource-manager/web/2022-09-01/workflowversions/README.md +++ b/resource-manager/web/2022-09-01/workflowversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/workflowversions` Documentation -The `workflowversions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2022-09-01`). +The `workflowversions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2022-09-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2022-09-01/workflowversions/client.go b/resource-manager/web/2022-09-01/workflowversions/client.go index 8a0b4fbb7be..b569325e0f3 100644 --- a/resource-manager/web/2022-09-01/workflowversions/client.go +++ b/resource-manager/web/2022-09-01/workflowversions/client.go @@ -15,7 +15,7 @@ type WorkflowVersionsClient struct { } func NewWorkflowVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowVersionsClient: %+v", err) } diff --git a/resource-manager/web/2022-09-01/workflowversions/id_managementworkflow.go b/resource-manager/web/2022-09-01/workflowversions/id_managementworkflow.go index 2c77e05839a..509e0f12494 100644 --- a/resource-manager/web/2022-09-01/workflowversions/id_managementworkflow.go +++ b/resource-manager/web/2022-09-01/workflowversions/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowversions/id_version.go b/resource-manager/web/2022-09-01/workflowversions/id_version.go index c08f6c0a48d..bbebe47b158 100644 --- a/resource-manager/web/2022-09-01/workflowversions/id_version.go +++ b/resource-manager/web/2022-09-01/workflowversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2022-09-01/workflowversions/method_get.go b/resource-manager/web/2022-09-01/workflowversions/method_get.go index f0742aafdc1..f2ae2ecca09 100644 --- a/resource-manager/web/2022-09-01/workflowversions/method_get.go +++ b/resource-manager/web/2022-09-01/workflowversions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowVersionsClient) Get(ctx context.Context, id VersionId) (result G var model WorkflowVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2022-09-01/workflowversions/method_list.go b/resource-manager/web/2022-09-01/workflowversions/method_list.go index a70d4657650..05d795dfb2d 100644 --- a/resource-manager/web/2022-09-01/workflowversions/method_list.go +++ b/resource-manager/web/2022-09-01/workflowversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2022-09-01/workflowversions/version.go b/resource-manager/web/2022-09-01/workflowversions/version.go index 6543578cf54..e813a074d4e 100644 --- a/resource-manager/web/2022-09-01/workflowversions/version.go +++ b/resource-manager/web/2022-09-01/workflowversions/version.go @@ -1,12 +1,10 @@ package workflowversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2022-09-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowversions/2022-09-01" } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/README.md b/resource-manager/web/2023-01-01/appservicecertificateorders/README.md index cc613a5b9a7..4cc58e53000 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/README.md +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appservicecertificateorders` Documentation -The `appservicecertificateorders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `appservicecertificateorders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/client.go b/resource-manager/web/2023-01-01/appservicecertificateorders/client.go index 06d6b4e2962..a4c0860883e 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/client.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/client.go @@ -15,7 +15,7 @@ type AppServiceCertificateOrdersClient struct { } func NewAppServiceCertificateOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceCertificateOrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appservicecertificateorders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appservicecertificateorders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceCertificateOrdersClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificate.go b/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificate.go index e1678574f38..1cfbd9818b8 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificate.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificateorder.go b/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificateorder.go index 7f0356716b2..40a1673c4a0 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificateorder.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_get.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_get.go index b4df83fdd65..452a170346a 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_get.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_get.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) Get(ctx context.Context, id Certifica var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_getcertificate.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_getcertificate.go index 45675824b49..0418d289349 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_getcertificate.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_getcertificate.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) GetCertificate(ctx context.Context, i var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateactions.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateactions.go index 306f696af31..51a8af70e7f 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateactions.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateactions.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateActions(ctx contex var model []CertificateOrderAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateemailhistory.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateemailhistory.go index 7fc5e4324d7..84feccdb804 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateemailhistory.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievecertificateemailhistory.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistory(ctx c var model []CertificateEmail result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievesiteseal.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievesiteseal.go index d84e5f86511..160d1b5010b 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievesiteseal.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_retrievesiteseal.go @@ -50,7 +50,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, var model SiteSeal result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_update.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_update.go index 999e03e24ae..cebc44fbccc 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_update.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_update.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) Update(ctx context.Context, id Certif var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/method_updatecertificate.go b/resource-manager/web/2023-01-01/appservicecertificateorders/method_updatecertificate.go index b94998c44aa..8ebfd637ea5 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/method_updatecertificate.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/method_updatecertificate.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) UpdateCertificate(ctx context.Context var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appservicecertificateorders/version.go b/resource-manager/web/2023-01-01/appservicecertificateorders/version.go index d6c5f65bfbb..0454eafcdba 100644 --- a/resource-manager/web/2023-01-01/appservicecertificateorders/version.go +++ b/resource-manager/web/2023-01-01/appservicecertificateorders/version.go @@ -1,12 +1,10 @@ package appservicecertificateorders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appservicecertificateorders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appservicecertificateorders/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/README.md b/resource-manager/web/2023-01-01/appserviceenvironments/README.md index cbd1d06c395..689613cf62c 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/README.md +++ b/resource-manager/web/2023-01-01/appserviceenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceenvironments` Documentation -The `appserviceenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `appserviceenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/client.go b/resource-manager/web/2023-01-01/appserviceenvironments/client.go index b9c0ff155f6..706ca7d556d 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/client.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/client.go @@ -15,7 +15,7 @@ type AppServiceEnvironmentsClient struct { } func NewAppServiceEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/id_defaultinstance.go b/resource-manager/web/2023-01-01/appserviceenvironments/id_defaultinstance.go index 5636848009c..5d4e58b6ec5 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/id_defaultinstance.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/id_defaultinstance.go @@ -44,7 +44,7 @@ func ParseDefaultInstanceID(input string) (*DefaultInstanceId, error) { } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultInstanceIDInsensitively(input string) (*DefaultInstanceId, erro } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go b/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go index feeb735318a..a57a42cd9c7 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDiagnosticID(input string) (*HostingEnvironmentDiagn } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDiagnosticIDInsensitively(input string) (*HostingEnv } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go b/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go index bbba42867e3..d470b108670 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionID(input string) (*HostingE } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionIDInsensitively(input strin } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpool.go b/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpool.go index 463fca27669..5245cac292e 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpool.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpool.go @@ -44,7 +44,7 @@ func ParseWorkerPoolID(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerPoolIDInsensitively(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpoolinstance.go b/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpoolinstance.go index 0bf747795a2..02141e0cf14 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpoolinstance.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/id_workerpoolinstance.go @@ -46,7 +46,7 @@ func ParseWorkerPoolInstanceID(input string) (*WorkerPoolInstanceId, error) { } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkerPoolInstanceIDInsensitively(input string) (*WorkerPoolInstanceId } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_delete.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_delete.go index 55cf71e5108..f8fb37d265b 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_delete.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go index 911c456e29b..c5871258555 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go @@ -48,7 +48,6 @@ func (c AppServiceEnvironmentsClient) DeleteAseCustomDnsSuffixConfiguration(ctx var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_get.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_get.go index 2e5e2bb0d14..19b2bdb044f 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_get.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_get.go @@ -46,7 +46,6 @@ func (c AppServiceEnvironmentsClient) Get(ctx context.Context, id commonids.AppS var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go index 9be53936c71..01f38db8a6e 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseCustomDnsSuffixConfiguration(ctx con var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getasev3networkingconfiguration.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getasev3networkingconfiguration.go index 1ca5a50286f..3815d5e3c5e 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getasev3networkingconfiguration.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getasev3networkingconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseV3NetworkingConfiguration(ctx contex var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getdiagnosticsitem.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getdiagnosticsitem.go index b6d0e47a783..681cc63213c 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getdiagnosticsitem.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getdiagnosticsitem.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetDiagnosticsItem(ctx context.Context, id var model HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getmultirolepool.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getmultirolepool.go index 8823968375d..7cbd25047b9 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getmultirolepool.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getmultirolepool.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetMultiRolePool(ctx context.Context, id c var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivateendpointconnection.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivateendpointconnection.go index 6bf182be11e..714c1276f69 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateEndpointConnection(ctx context.C var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivatelinkresources.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivatelinkresources.go index e0c2f0c4365..ecd193a3901 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateLinkResources(ctx context.Contex var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getvipinfo.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getvipinfo.go index a0f52038b9c..ef0c4a7c970 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getvipinfo.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getvipinfo.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetVipInfo(ctx context.Context, id commoni var model AddressResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_getworkerpool.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_getworkerpool.go index bd617d301a8..f18c4334f8a 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_getworkerpool.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_getworkerpool.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetWorkerPool(ctx context.Context, id Work var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_listdiagnostics.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_listdiagnostics.go index 050adc5112e..0b07c6c4a90 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_listdiagnostics.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_listdiagnostics.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListDiagnostics(ctx context.Context, id co var model []HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_listoperations.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_listoperations.go index 49fef987d75..cc96adc214e 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_listoperations.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_listoperations.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListOperations(ctx context.Context, id com var model []Operation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_listusages.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_listusages.go index c12dab87aa4..2fdba17a92e 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_listusages.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_listwebapps.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_listwebapps.go index 6adb4062cbe..2c63e81b80b 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_listwebapps.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_listwebapps.go @@ -40,6 +40,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_update.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_update.go index c3afa9e6f0d..eeba2343384 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_update.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_update.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) Update(ctx context.Context, id commonids.A var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go index 376d25fe92b..84b44271ed7 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseCustomDnsSuffixConfiguration(ctx var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasenetworkingconfiguration.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasenetworkingconfiguration.go index 0661a11d23d..d215f8021fa 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasenetworkingconfiguration.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateasenetworkingconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseNetworkingConfiguration(ctx conte var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_updatemultirolepool.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_updatemultirolepool.go index d71d810e1d4..22ee8b00991 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_updatemultirolepool.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_updatemultirolepool.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) UpdateMultiRolePool(ctx context.Context, i var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateworkerpool.go b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateworkerpool.go index 85733a6f536..42b61ccc4f7 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/method_updateworkerpool.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/method_updateworkerpool.go @@ -50,7 +50,6 @@ func (c AppServiceEnvironmentsClient) UpdateWorkerPool(ctx context.Context, id W var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceenvironments/version.go b/resource-manager/web/2023-01-01/appserviceenvironments/version.go index be106e9b08a..60d6292638d 100644 --- a/resource-manager/web/2023-01-01/appserviceenvironments/version.go +++ b/resource-manager/web/2023-01-01/appserviceenvironments/version.go @@ -1,12 +1,10 @@ package appserviceenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceenvironments/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/appserviceplans/README.md b/resource-manager/web/2023-01-01/appserviceplans/README.md index e632551bf3d..274e940a4b5 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/README.md +++ b/resource-manager/web/2023-01-01/appserviceplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/appserviceplans` Documentation -The `appserviceplans` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `appserviceplans` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/appserviceplans/client.go b/resource-manager/web/2023-01-01/appserviceplans/client.go index 8fe56fbaa27..9afc7d23899 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/client.go +++ b/resource-manager/web/2023-01-01/appserviceplans/client.go @@ -15,7 +15,7 @@ type AppServicePlansClient struct { } func NewAppServicePlansClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServicePlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServicePlansClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go b/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go index 2b32c834b81..58ea2b5a799 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go +++ b/resource-manager/web/2023-01-01/appserviceplans/id_hybridconnectionnamespacerelay.go @@ -46,7 +46,7 @@ func ParseHybridConnectionNamespaceRelayID(input string) (*HybridConnectionNames } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridConnectionNamespaceRelayIDInsensitively(input string) (*HybridCo } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceplans/id_route.go b/resource-manager/web/2023-01-01/appserviceplans/id_route.go index ad716f02546..359ff342f03 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/id_route.go +++ b/resource-manager/web/2023-01-01/appserviceplans/id_route.go @@ -46,7 +46,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go b/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go index 17ab90193a3..b87f1cefc87 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go +++ b/resource-manager/web/2023-01-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseServerFarmVirtualNetworkConnectionID(input string) (*ServerFarmVirtual } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerFarmVirtualNetworkConnectionIDInsensitively(input string) (*Serv } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go b/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go index fd8f8a5724d..795627bdf7f 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go +++ b/resource-manager/web/2023-01-01/appserviceplans/id_virtualnetworkconnectiongateway.go @@ -46,7 +46,7 @@ func ParseVirtualNetworkConnectionGatewayID(input string) (*VirtualNetworkConnec } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Virtual } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceplans/id_worker.go b/resource-manager/web/2023-01-01/appserviceplans/id_worker.go index 284032cb1f8..a66c95a7219 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/id_worker.go +++ b/resource-manager/web/2023-01-01/appserviceplans/id_worker.go @@ -44,7 +44,7 @@ func ParseWorkerID(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerIDInsensitively(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go b/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go index c61bc8980f7..a25c348ca80 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_createorupdatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) CreateOrUpdateVnetRoute(ctx context.Context, id R var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_get.go b/resource-manager/web/2023-01-01/appserviceplans/method_get.go index a4d52b636e6..e8c9fc7e49c 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_get.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_get.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) Get(ctx context.Context, id commonids.AppServiceP var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go b/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go index 61c582b536d..76d08712a13 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetHybridConnection(ctx context.Context, id Hybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go b/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go index b6099bdcb7f..5fdd323b80c 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_gethybridconnectionplanlimit.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetHybridConnectionPlanLimit(ctx context.Context, var model HybridConnectionLimits result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go b/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go index 338777c766d..43c608e9890 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_getrouteforvnet.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetRouteForVnet(ctx context.Context, id RouteId) var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go b/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go index 227a69198de..bbd1499852a 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_getserverfarmskus.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetServerFarmSkus(ctx context.Context, id commoni var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go b/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go index 3190297402b..650f8a3926f 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_getvnetfromserverfarm.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetFromServerFarm(ctx context.Context, id Ser var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go b/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go index ce36c736228..f1892454285 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_getvnetgateway.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetGateway(ctx context.Context, id VirtualNet var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_list.go b/resource-manager/web/2023-01-01/appserviceplans/method_list.go index 6825b73b994..6487ac4dcb4 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_list.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go b/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go index 5720548c003..2c65ef4aae9 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listcapabilities.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListCapabilities(ctx context.Context, id commonid var model []Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go b/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go index 874cdd76c26..78f4e16f7b6 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listhybridconnectionkeys.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListHybridConnectionKeys(ctx context.Context, id var model HybridConnectionKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go b/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go index 84c82c62f54..cea1ee3b594 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listroutesforvnet.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListRoutesForVnet(ctx context.Context, id ServerF var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go b/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go index ba526d56a55..11927a25518 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go b/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go index 39863133e91..1779fca1033 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listvnets.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListVnets(ctx context.Context, id commonids.AppSe var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go b/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go index facb051bd72..112b9dd14f8 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_listwebapps.go @@ -41,6 +41,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go b/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go index 0eb829e73f3..e6b604d940c 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_restartwebapps.go @@ -34,6 +34,7 @@ func (o RestartWebAppsOperationOptions) ToHeaders() *client.Headers { func (o RestartWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_update.go b/resource-manager/web/2023-01-01/appserviceplans/method_update.go index 8c369f53a74..cc2bebbb8cc 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_update.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_update.go @@ -51,7 +51,6 @@ func (c AppServicePlansClient) Update(ctx context.Context, id commonids.AppServi var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go b/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go index a0861673f2a..084885def91 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetgateway.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetGateway(ctx context.Context, id Virtual var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go b/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go index 38d2438c46c..0d8db289b93 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go +++ b/resource-manager/web/2023-01-01/appserviceplans/method_updatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetRoute(ctx context.Context, id RouteId, var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/appserviceplans/version.go b/resource-manager/web/2023-01-01/appserviceplans/version.go index e1772968a90..984a4eb8ea5 100644 --- a/resource-manager/web/2023-01-01/appserviceplans/version.go +++ b/resource-manager/web/2023-01-01/appserviceplans/version.go @@ -1,12 +1,10 @@ package appserviceplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceplans/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/README.md b/resource-manager/web/2023-01-01/certificateordersdiagnostics/README.md index eb530592ba4..f35ed806061 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/README.md +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/certificateordersdiagnostics` Documentation -The `certificateordersdiagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `certificateordersdiagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/client.go b/resource-manager/web/2023-01-01/certificateordersdiagnostics/client.go index b050da126b5..710732b4d7f 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/client.go +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/client.go @@ -15,7 +15,7 @@ type CertificateOrdersDiagnosticsClient struct { } func NewCertificateOrdersDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateOrdersDiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateOrdersDiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_certificateorder.go b/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_certificateorder.go index 050fa6199a7..6ebb64e3662 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_certificateorder.go +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_detector.go b/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_detector.go index fe633a846ad..63c20115494 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_detector.go +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go b/resource-manager/web/2023-01-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go index 234f65f33a3..15ff71d98cd 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToHeaders func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetecto var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/certificateordersdiagnostics/version.go b/resource-manager/web/2023-01-01/certificateordersdiagnostics/version.go index 528c38e3010..4974091184f 100644 --- a/resource-manager/web/2023-01-01/certificateordersdiagnostics/version.go +++ b/resource-manager/web/2023-01-01/certificateordersdiagnostics/version.go @@ -1,12 +1,10 @@ package certificateordersdiagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateordersdiagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateordersdiagnostics/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/certificates/README.md b/resource-manager/web/2023-01-01/certificates/README.md index 3ce11a430a6..1f127bd8a13 100644 --- a/resource-manager/web/2023-01-01/certificates/README.md +++ b/resource-manager/web/2023-01-01/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `certificates` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/certificates/client.go b/resource-manager/web/2023-01-01/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/web/2023-01-01/certificates/client.go +++ b/resource-manager/web/2023-01-01/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/certificates/id_certificate.go b/resource-manager/web/2023-01-01/certificates/id_certificate.go index 24c9696e478..09346b12fa4 100644 --- a/resource-manager/web/2023-01-01/certificates/id_certificate.go +++ b/resource-manager/web/2023-01-01/certificates/id_certificate.go @@ -42,7 +42,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/certificates/method_createorupdate.go b/resource-manager/web/2023-01-01/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/web/2023-01-01/certificates/method_createorupdate.go +++ b/resource-manager/web/2023-01-01/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/certificates/method_get.go b/resource-manager/web/2023-01-01/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/web/2023-01-01/certificates/method_get.go +++ b/resource-manager/web/2023-01-01/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/certificates/method_list.go b/resource-manager/web/2023-01-01/certificates/method_list.go index aaa547d06bb..b9bba8df177 100644 --- a/resource-manager/web/2023-01-01/certificates/method_list.go +++ b/resource-manager/web/2023-01-01/certificates/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/certificates/method_update.go b/resource-manager/web/2023-01-01/certificates/method_update.go index 038cd440dd0..e0cf13140fe 100644 --- a/resource-manager/web/2023-01-01/certificates/method_update.go +++ b/resource-manager/web/2023-01-01/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/certificates/version.go b/resource-manager/web/2023-01-01/certificates/version.go index 486d63425ba..8e6e0a08104 100644 --- a/resource-manager/web/2023-01-01/certificates/version.go +++ b/resource-manager/web/2023-01-01/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/containerapps/README.md b/resource-manager/web/2023-01-01/containerapps/README.md index 9631c79ded1..2a0be28573a 100644 --- a/resource-manager/web/2023-01-01/containerapps/README.md +++ b/resource-manager/web/2023-01-01/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/containerapps/client.go b/resource-manager/web/2023-01-01/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/web/2023-01-01/containerapps/client.go +++ b/resource-manager/web/2023-01-01/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/containerapps/id_containerapp.go b/resource-manager/web/2023-01-01/containerapps/id_containerapp.go index c7991c1dbc4..2fe43c431b6 100644 --- a/resource-manager/web/2023-01-01/containerapps/id_containerapp.go +++ b/resource-manager/web/2023-01-01/containerapps/id_containerapp.go @@ -40,7 +40,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/containerapps/id_providercontainerapp.go b/resource-manager/web/2023-01-01/containerapps/id_providercontainerapp.go index 6493d543e2b..ead4cf96efc 100644 --- a/resource-manager/web/2023-01-01/containerapps/id_providercontainerapp.go +++ b/resource-manager/web/2023-01-01/containerapps/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/containerapps/method_get.go b/resource-manager/web/2023-01-01/containerapps/method_get.go index def3a75c5e8..66c664a40cb 100644 --- a/resource-manager/web/2023-01-01/containerapps/method_get.go +++ b/resource-manager/web/2023-01-01/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ProviderContainerAppId) var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/containerapps/method_listsecrets.go b/resource-manager/web/2023-01-01/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/web/2023-01-01/containerapps/method_listsecrets.go +++ b/resource-manager/web/2023-01-01/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/containerapps/version.go b/resource-manager/web/2023-01-01/containerapps/version.go index 02c6440c952..0b9d47241e9 100644 --- a/resource-manager/web/2023-01-01/containerapps/version.go +++ b/resource-manager/web/2023-01-01/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/README.md b/resource-manager/web/2023-01-01/containerappsrevisions/README.md index 9fd67751cff..402180f8af1 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/README.md +++ b/resource-manager/web/2023-01-01/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/client.go b/resource-manager/web/2023-01-01/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/client.go +++ b/resource-manager/web/2023-01-01/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/id_providercontainerapp.go b/resource-manager/web/2023-01-01/containerappsrevisions/id_providercontainerapp.go index f9d222c17f9..ebdc450ab3b 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/id_providercontainerapp.go +++ b/resource-manager/web/2023-01-01/containerappsrevisions/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/id_revision.go b/resource-manager/web/2023-01-01/containerappsrevisions/id_revision.go index 9c531d6051b..4279a4f1e42 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/id_revision.go +++ b/resource-manager/web/2023-01-01/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/method_getrevision.go b/resource-manager/web/2023-01-01/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/method_getrevision.go +++ b/resource-manager/web/2023-01-01/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/containerappsrevisions/version.go b/resource-manager/web/2023-01-01/containerappsrevisions/version.go index f17638369bc..488e4992c67 100644 --- a/resource-manager/web/2023-01-01/containerappsrevisions/version.go +++ b/resource-manager/web/2023-01-01/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/deletedwebapps/README.md b/resource-manager/web/2023-01-01/deletedwebapps/README.md index f0640244c8c..5cd4f994e2d 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/README.md +++ b/resource-manager/web/2023-01-01/deletedwebapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/deletedwebapps` Documentation -The `deletedwebapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `deletedwebapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/deletedwebapps/client.go b/resource-manager/web/2023-01-01/deletedwebapps/client.go index 7627ffe88fa..75d69e08194 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/client.go +++ b/resource-manager/web/2023-01-01/deletedwebapps/client.go @@ -15,7 +15,7 @@ type DeletedWebAppsClient struct { } func NewDeletedWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedwebapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedwebapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWebAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/deletedwebapps/id_locationdeletedsite.go b/resource-manager/web/2023-01-01/deletedwebapps/id_locationdeletedsite.go index 38e9300d296..ed6298d0960 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/id_locationdeletedsite.go +++ b/resource-manager/web/2023-01-01/deletedwebapps/id_locationdeletedsite.go @@ -42,7 +42,7 @@ func ParseLocationDeletedSiteID(input string) (*LocationDeletedSiteId, error) { } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationDeletedSiteIDInsensitively(input string) (*LocationDeletedSite } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/deletedwebapps/id_providerlocation.go b/resource-manager/web/2023-01-01/deletedwebapps/id_providerlocation.go index 34206ea2e60..b9d33204fbf 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/id_providerlocation.go +++ b/resource-manager/web/2023-01-01/deletedwebapps/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/deletedwebapps/method_getdeletedwebappbylocation.go b/resource-manager/web/2023-01-01/deletedwebapps/method_getdeletedwebappbylocation.go index c3b5013c659..c60231dbc7b 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/method_getdeletedwebappbylocation.go +++ b/resource-manager/web/2023-01-01/deletedwebapps/method_getdeletedwebappbylocation.go @@ -45,7 +45,6 @@ func (c DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, id var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/deletedwebapps/version.go b/resource-manager/web/2023-01-01/deletedwebapps/version.go index 1cd677fe22f..8f333d9d10e 100644 --- a/resource-manager/web/2023-01-01/deletedwebapps/version.go +++ b/resource-manager/web/2023-01-01/deletedwebapps/version.go @@ -1,12 +1,10 @@ package deletedwebapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedwebapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedwebapps/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/diagnostics/README.md b/resource-manager/web/2023-01-01/diagnostics/README.md index 3bfb2ae53da..8e87644eadf 100644 --- a/resource-manager/web/2023-01-01/diagnostics/README.md +++ b/resource-manager/web/2023-01-01/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/diagnostics/client.go b/resource-manager/web/2023-01-01/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/web/2023-01-01/diagnostics/client.go +++ b/resource-manager/web/2023-01-01/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_analysis.go b/resource-manager/web/2023-01-01/diagnostics/id_analysis.go index cf164a66cd5..d622f811794 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_analysis.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_analysis.go @@ -46,7 +46,7 @@ func ParseAnalysisID(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAnalysisIDInsensitively(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_detector.go b/resource-manager/web/2023-01-01/diagnostics/id_detector.go index 89042fab54f..5b71ac68e51 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_detector.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_diagnostic.go b/resource-manager/web/2023-01-01/diagnostics/id_diagnostic.go index 156adb806c7..d5938a967a3 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_diagnostic.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_diagnosticanalysis.go b/resource-manager/web/2023-01-01/diagnostics/id_diagnosticanalysis.go index 28ed452f661..7626a3e53c8 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_diagnosticanalysis.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_diagnosticanalysis.go @@ -48,7 +48,7 @@ func ParseDiagnosticAnalysisID(input string) (*DiagnosticAnalysisId, error) { } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDiagnosticAnalysisIDInsensitively(input string) (*DiagnosticAnalysisId } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_diagnosticdetector.go b/resource-manager/web/2023-01-01/diagnostics/id_diagnosticdetector.go index a6d345670d9..6b2d8cebcab 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_diagnosticdetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_diagnosticdetector.go @@ -46,7 +46,7 @@ func ParseDiagnosticDetectorID(input string) (*DiagnosticDetectorId, error) { } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiagnosticDetectorIDInsensitively(input string) (*DiagnosticDetectorId } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_hostingenvironmentdetector.go b/resource-manager/web/2023-01-01/diagnostics/id_hostingenvironmentdetector.go index 7bf33585a6a..fa6d503548e 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_hostingenvironmentdetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_hostingenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDetectorID(input string) (*HostingEnvironmentDetecto } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDetectorIDInsensitively(input string) (*HostingEnvir } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_slot.go b/resource-manager/web/2023-01-01/diagnostics/id_slot.go index 3a3f6dcbfba..7d54200ef3f 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_slot.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_slotdetector.go b/resource-manager/web/2023-01-01/diagnostics/id_slotdetector.go index bc38b43b06a..b06d1afa980 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_slotdetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_slotdetector.go @@ -46,7 +46,7 @@ func ParseSlotDetectorID(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDetectorIDInsensitively(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnostic.go b/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnostic.go index 3dc67da36a9..92f3e285e81 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnostic.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnostic.go @@ -46,7 +46,7 @@ func ParseSlotDiagnosticID(input string) (*SlotDiagnosticId, error) { } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDiagnosticIDInsensitively(input string) (*SlotDiagnosticId, error) } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnosticdetector.go b/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnosticdetector.go index 73d9c680c8f..7662d90c174 100644 --- a/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnosticdetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/id_slotdiagnosticdetector.go @@ -48,7 +48,7 @@ func ParseSlotDiagnosticDetectorID(input string) (*SlotDiagnosticDetectorId, err } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotDiagnosticDetectorIDInsensitively(input string) (*SlotDiagnosticDe } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysis.go b/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysis.go index 39c10eb722f..d9114e45262 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysis.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysis.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, id AnalysisI var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysisslot.go b/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysisslot.go index cdfb303e3a3..fb43cf7b571 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysisslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_executesiteanalysisslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, id Diagn var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_executesitedetector.go b/resource-manager/web/2023-01-01/diagnostics/method_executesitedetector.go index bd22012f0bf..95fdc0e086d 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_executesitedetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_executesitedetector.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, id Diagnosti var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_executesitedetectorslot.go b/resource-manager/web/2023-01-01/diagnostics/method_executesitedetectorslot.go index 7b7c52ca9ac..a4058304682 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_executesitedetectorslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_executesitedetectorslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, id SlotD var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_gethostingenvironmentdetectorresponse.go b/resource-manager/web/2023-01-01/diagnostics/method_gethostingenvironmentdetectorresponse.go index c0f8da53660..146dae82a1c 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_gethostingenvironmentdetectorresponse.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_gethostingenvironmentdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToHeaders() *clie func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Con var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysis.go b/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysis.go index 9f71be3deb5..b730bee1e40 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysis.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysis.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysis(ctx context.Context, id AnalysisId) ( var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysisslot.go b/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysisslot.go index 045dd22a086..14ca76fb852 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysisslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsiteanalysisslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, id Diagnosti var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetector.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetector.go index bd8a5d0fd1b..e90a21838ca 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetector.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetector(ctx context.Context, id DiagnosticDet var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponse.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponse.go index 92cb6f72ab9..91a987796f7 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponse.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponse.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseOperationOptions) ToHeaders() *client.Headers { func (o GetSiteDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, id Detec var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponseslot.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponseslot.go index 2cdbdd632a1..84580774fc2 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponseslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorresponseslot.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseSlotOperationOptions) ToHeaders() *client.Headers func (o GetSiteDetectorResponseSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, id S var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorslot.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorslot.go index 53ae2cc819c..3f2a72744f1 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitedetectorslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, id SlotDiagn var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategory.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategory.go index 450eb557042..1ddb7a72135 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategory.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategory.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, id Dia var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategoryslot.go b/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategoryslot.go index fb8ac9e2176..c6572ee2994 100644 --- a/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategoryslot.go +++ b/resource-manager/web/2023-01-01/diagnostics/method_getsitediagnosticcategoryslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, id var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/diagnostics/version.go b/resource-manager/web/2023-01-01/diagnostics/version.go index 92d98e237f0..fc2c42b4518 100644 --- a/resource-manager/web/2023-01-01/diagnostics/version.go +++ b/resource-manager/web/2023-01-01/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/domains/README.md b/resource-manager/web/2023-01-01/domains/README.md index 13917affbe8..edb37f5bef2 100644 --- a/resource-manager/web/2023-01-01/domains/README.md +++ b/resource-manager/web/2023-01-01/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `domains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/domains/client.go b/resource-manager/web/2023-01-01/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/web/2023-01-01/domains/client.go +++ b/resource-manager/web/2023-01-01/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/domains/id_domain.go b/resource-manager/web/2023-01-01/domains/id_domain.go index a3841009671..91ab01bc78f 100644 --- a/resource-manager/web/2023-01-01/domains/id_domain.go +++ b/resource-manager/web/2023-01-01/domains/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/domains/id_domainownershipidentifier.go b/resource-manager/web/2023-01-01/domains/id_domainownershipidentifier.go index a4600242107..30c6e04e6fa 100644 --- a/resource-manager/web/2023-01-01/domains/id_domainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/domains/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/domains/method_checkavailability.go b/resource-manager/web/2023-01-01/domains/method_checkavailability.go index 2e69c2d6caa..1ebced69f7f 100644 --- a/resource-manager/web/2023-01-01/domains/method_checkavailability.go +++ b/resource-manager/web/2023-01-01/domains/method_checkavailability.go @@ -51,7 +51,6 @@ func (c DomainsClient) CheckAvailability(ctx context.Context, id commonids.Subsc var model DomainAvailabilityCheckResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_createorupdateownershipidentifier.go b/resource-manager/web/2023-01-01/domains/method_createorupdateownershipidentifier.go index 65cf4646521..7a48ce2a59c 100644 --- a/resource-manager/web/2023-01-01/domains/method_createorupdateownershipidentifier.go +++ b/resource-manager/web/2023-01-01/domains/method_createorupdateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, id var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_delete.go b/resource-manager/web/2023-01-01/domains/method_delete.go index 1e544b1f599..6d7df4dfe6c 100644 --- a/resource-manager/web/2023-01-01/domains/method_delete.go +++ b/resource-manager/web/2023-01-01/domains/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/domains/method_get.go b/resource-manager/web/2023-01-01/domains/method_get.go index b35fd82d944..20619dde9a0 100644 --- a/resource-manager/web/2023-01-01/domains/method_get.go +++ b/resource-manager/web/2023-01-01/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_getcontrolcenterssorequest.go b/resource-manager/web/2023-01-01/domains/method_getcontrolcenterssorequest.go index 7bcdf455156..97001bc7198 100644 --- a/resource-manager/web/2023-01-01/domains/method_getcontrolcenterssorequest.go +++ b/resource-manager/web/2023-01-01/domains/method_getcontrolcenterssorequest.go @@ -47,7 +47,6 @@ func (c DomainsClient) GetControlCenterSsoRequest(ctx context.Context, id common var model DomainControlCenterSsoRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_getownershipidentifier.go b/resource-manager/web/2023-01-01/domains/method_getownershipidentifier.go index d38f9734728..b40df756137 100644 --- a/resource-manager/web/2023-01-01/domains/method_getownershipidentifier.go +++ b/resource-manager/web/2023-01-01/domains/method_getownershipidentifier.go @@ -45,7 +45,6 @@ func (c DomainsClient) GetOwnershipIdentifier(ctx context.Context, id DomainOwne var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_transferout.go b/resource-manager/web/2023-01-01/domains/method_transferout.go index e45926e87d5..463bfd22489 100644 --- a/resource-manager/web/2023-01-01/domains/method_transferout.go +++ b/resource-manager/web/2023-01-01/domains/method_transferout.go @@ -46,7 +46,6 @@ func (c DomainsClient) TransferOut(ctx context.Context, id DomainId) (result Tra var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_update.go b/resource-manager/web/2023-01-01/domains/method_update.go index f5705bd286a..08ef3fbeef2 100644 --- a/resource-manager/web/2023-01-01/domains/method_update.go +++ b/resource-manager/web/2023-01-01/domains/method_update.go @@ -50,7 +50,6 @@ func (c DomainsClient) Update(ctx context.Context, id DomainId, input DomainPatc var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/method_updateownershipidentifier.go b/resource-manager/web/2023-01-01/domains/method_updateownershipidentifier.go index 3c23bdeecfc..0ac28164a96 100644 --- a/resource-manager/web/2023-01-01/domains/method_updateownershipidentifier.go +++ b/resource-manager/web/2023-01-01/domains/method_updateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, id DomainO var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/domains/version.go b/resource-manager/web/2023-01-01/domains/version.go index c675f99017b..af1f301b4c6 100644 --- a/resource-manager/web/2023-01-01/domains/version.go +++ b/resource-manager/web/2023-01-01/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/global/README.md b/resource-manager/web/2023-01-01/global/README.md index 36a936a183e..1a29cc32d19 100644 --- a/resource-manager/web/2023-01-01/global/README.md +++ b/resource-manager/web/2023-01-01/global/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/global` Documentation -The `global` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `global` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/global/client.go b/resource-manager/web/2023-01-01/global/client.go index 5fbdd990766..d760ea36811 100644 --- a/resource-manager/web/2023-01-01/global/client.go +++ b/resource-manager/web/2023-01-01/global/client.go @@ -15,7 +15,7 @@ type GlobalClient struct { } func NewGlobalClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "global", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "global", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/global/id_deletedsite.go b/resource-manager/web/2023-01-01/global/id_deletedsite.go index d227d82af96..2ac42554ae0 100644 --- a/resource-manager/web/2023-01-01/global/id_deletedsite.go +++ b/resource-manager/web/2023-01-01/global/id_deletedsite.go @@ -40,7 +40,7 @@ func ParseDeletedSiteID(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDeletedSiteIDInsensitively(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/global/method_getdeletedwebapp.go b/resource-manager/web/2023-01-01/global/method_getdeletedwebapp.go index 52e449413d5..9daa1017f5c 100644 --- a/resource-manager/web/2023-01-01/global/method_getdeletedwebapp.go +++ b/resource-manager/web/2023-01-01/global/method_getdeletedwebapp.go @@ -45,7 +45,6 @@ func (c GlobalClient) GetDeletedWebApp(ctx context.Context, id DeletedSiteId) (r var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/global/method_getdeletedwebappsnapshots.go b/resource-manager/web/2023-01-01/global/method_getdeletedwebappsnapshots.go index 4b84e9cb927..e18e9e44a71 100644 --- a/resource-manager/web/2023-01-01/global/method_getdeletedwebappsnapshots.go +++ b/resource-manager/web/2023-01-01/global/method_getdeletedwebappsnapshots.go @@ -46,7 +46,6 @@ func (c GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, id DeletedS var model []Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/global/version.go b/resource-manager/web/2023-01-01/global/version.go index 7f052e7a9dc..50e3bae0b44 100644 --- a/resource-manager/web/2023-01-01/global/version.go +++ b/resource-manager/web/2023-01-01/global/version.go @@ -1,12 +1,10 @@ package global -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/global/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/global/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/kubeenvironments/README.md b/resource-manager/web/2023-01-01/kubeenvironments/README.md index 53dc584c0f6..8f1ee1e3f92 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/README.md +++ b/resource-manager/web/2023-01-01/kubeenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/kubeenvironments` Documentation -The `kubeenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `kubeenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/kubeenvironments/client.go b/resource-manager/web/2023-01-01/kubeenvironments/client.go index a2db5e1aad1..7bcf8670016 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/client.go +++ b/resource-manager/web/2023-01-01/kubeenvironments/client.go @@ -15,7 +15,7 @@ type KubeEnvironmentsClient struct { } func NewKubeEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*KubeEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "kubeenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "kubeenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KubeEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/kubeenvironments/id_kubeenvironment.go b/resource-manager/web/2023-01-01/kubeenvironments/id_kubeenvironment.go index 020e8fa0f30..ec1ed742c59 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/id_kubeenvironment.go +++ b/resource-manager/web/2023-01-01/kubeenvironments/id_kubeenvironment.go @@ -42,7 +42,7 @@ func ParseKubeEnvironmentID(input string) (*KubeEnvironmentId, error) { } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseKubeEnvironmentIDInsensitively(input string) (*KubeEnvironmentId, erro } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/kubeenvironments/method_get.go b/resource-manager/web/2023-01-01/kubeenvironments/method_get.go index 9c19f1d0522..4dde6e8cfea 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/method_get.go +++ b/resource-manager/web/2023-01-01/kubeenvironments/method_get.go @@ -45,7 +45,6 @@ func (c KubeEnvironmentsClient) Get(ctx context.Context, id KubeEnvironmentId) ( var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/kubeenvironments/method_update.go b/resource-manager/web/2023-01-01/kubeenvironments/method_update.go index 5af2a9f0da9..7192afd41a4 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/method_update.go +++ b/resource-manager/web/2023-01-01/kubeenvironments/method_update.go @@ -50,7 +50,6 @@ func (c KubeEnvironmentsClient) Update(ctx context.Context, id KubeEnvironmentId var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/kubeenvironments/version.go b/resource-manager/web/2023-01-01/kubeenvironments/version.go index 637160ebe81..97330d26924 100644 --- a/resource-manager/web/2023-01-01/kubeenvironments/version.go +++ b/resource-manager/web/2023-01-01/kubeenvironments/version.go @@ -1,12 +1,10 @@ package kubeenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/kubeenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/kubeenvironments/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/provider/README.md b/resource-manager/web/2023-01-01/provider/README.md index 46fd901ad93..2be33eac923 100644 --- a/resource-manager/web/2023-01-01/provider/README.md +++ b/resource-manager/web/2023-01-01/provider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/provider` Documentation -The `provider` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `provider` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/provider/client.go b/resource-manager/web/2023-01-01/provider/client.go index 2128fec9d6f..b982cfdab87 100644 --- a/resource-manager/web/2023-01-01/provider/client.go +++ b/resource-manager/web/2023-01-01/provider/client.go @@ -15,7 +15,7 @@ type ProviderClient struct { } func NewProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/provider/id_location.go b/resource-manager/web/2023-01-01/provider/id_location.go index e746f1b1c9e..d6d3b18d669 100644 --- a/resource-manager/web/2023-01-01/provider/id_location.go +++ b/resource-manager/web/2023-01-01/provider/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/provider/method_getavailablestacks.go b/resource-manager/web/2023-01-01/provider/method_getavailablestacks.go index d38e1131c18..1572e58bd2a 100644 --- a/resource-manager/web/2023-01-01/provider/method_getavailablestacks.go +++ b/resource-manager/web/2023-01-01/provider/method_getavailablestacks.go @@ -39,6 +39,7 @@ func (o GetAvailableStacksOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/method_getavailablestacksonprem.go b/resource-manager/web/2023-01-01/provider/method_getavailablestacksonprem.go index 88344e48bbe..20773813e76 100644 --- a/resource-manager/web/2023-01-01/provider/method_getavailablestacksonprem.go +++ b/resource-manager/web/2023-01-01/provider/method_getavailablestacksonprem.go @@ -40,6 +40,7 @@ func (o GetAvailableStacksOnPremOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOnPremOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/method_getfunctionappstacks.go b/resource-manager/web/2023-01-01/provider/method_getfunctionappstacks.go index e7d7af6faee..a1846c17cd1 100644 --- a/resource-manager/web/2023-01-01/provider/method_getfunctionappstacks.go +++ b/resource-manager/web/2023-01-01/provider/method_getfunctionappstacks.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetFunctionAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/method_getfunctionappstacksforlocation.go b/resource-manager/web/2023-01-01/provider/method_getfunctionappstacksforlocation.go index d172b71e511..684a0b14882 100644 --- a/resource-manager/web/2023-01-01/provider/method_getfunctionappstacksforlocation.go +++ b/resource-manager/web/2023-01-01/provider/method_getfunctionappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksForLocationOperationOptions) ToHeaders() *client.Hea func (o GetFunctionAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/method_getwebappstacks.go b/resource-manager/web/2023-01-01/provider/method_getwebappstacks.go index 94ed33af10c..3223aecd71b 100644 --- a/resource-manager/web/2023-01-01/provider/method_getwebappstacks.go +++ b/resource-manager/web/2023-01-01/provider/method_getwebappstacks.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetWebAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/method_getwebappstacksforlocation.go b/resource-manager/web/2023-01-01/provider/method_getwebappstacksforlocation.go index 1b7970c0294..2dad249e986 100644 --- a/resource-manager/web/2023-01-01/provider/method_getwebappstacksforlocation.go +++ b/resource-manager/web/2023-01-01/provider/method_getwebappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksForLocationOperationOptions) ToHeaders() *client.Headers func (o GetWebAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/provider/version.go b/resource-manager/web/2023-01-01/provider/version.go index cae1173d714..cc7faa457d3 100644 --- a/resource-manager/web/2023-01-01/provider/version.go +++ b/resource-manager/web/2023-01-01/provider/version.go @@ -1,12 +1,10 @@ package provider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provider/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/recommendations/README.md b/resource-manager/web/2023-01-01/recommendations/README.md index 85d72302dab..4e3ea173634 100644 --- a/resource-manager/web/2023-01-01/recommendations/README.md +++ b/resource-manager/web/2023-01-01/recommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/recommendations` Documentation -The `recommendations` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `recommendations` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/recommendations/client.go b/resource-manager/web/2023-01-01/recommendations/client.go index c0ae3be9b1d..5c0b92661cf 100644 --- a/resource-manager/web/2023-01-01/recommendations/client.go +++ b/resource-manager/web/2023-01-01/recommendations/client.go @@ -15,7 +15,7 @@ type RecommendationsClient struct { } func NewRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecommendationsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/recommendations/id_hostingenvironmentrecommendation.go b/resource-manager/web/2023-01-01/recommendations/id_hostingenvironmentrecommendation.go index 67ff49432d9..1d3055e1119 100644 --- a/resource-manager/web/2023-01-01/recommendations/id_hostingenvironmentrecommendation.go +++ b/resource-manager/web/2023-01-01/recommendations/id_hostingenvironmentrecommendation.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentRecommendationID(input string) (*HostingEnvironmentR } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentRecommendationIDInsensitively(input string) (*Hostin } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/recommendations/id_recommendation.go b/resource-manager/web/2023-01-01/recommendations/id_recommendation.go index a1f8446174f..ab139efdcda 100644 --- a/resource-manager/web/2023-01-01/recommendations/id_recommendation.go +++ b/resource-manager/web/2023-01-01/recommendations/id_recommendation.go @@ -40,7 +40,7 @@ func ParseRecommendationID(input string) (*RecommendationId, error) { } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRecommendationIDInsensitively(input string) (*RecommendationId, error) } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/recommendations/id_siterecommendation.go b/resource-manager/web/2023-01-01/recommendations/id_siterecommendation.go index cada8a9b36f..faeec83da4d 100644 --- a/resource-manager/web/2023-01-01/recommendations/id_siterecommendation.go +++ b/resource-manager/web/2023-01-01/recommendations/id_siterecommendation.go @@ -44,7 +44,7 @@ func ParseSiteRecommendationID(input string) (*SiteRecommendationId, error) { } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteRecommendationIDInsensitively(input string) (*SiteRecommendationId } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/recommendations/method_disableallforhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_disableallforhostingenvironment.go index 3099cf85524..3f1378ddbbc 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_disableallforhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_disableallforhostingenvironment.go @@ -34,6 +34,7 @@ func (o DisableAllForHostingEnvironmentOperationOptions) ToHeaders() *client.Hea func (o DisableAllForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_disablerecommendationforhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_disablerecommendationforhostingenvironment.go index 64a8ac5160d..452a1d24ac9 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_disablerecommendationforhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_disablerecommendationforhostingenvironment.go @@ -33,6 +33,7 @@ func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToHeaders() func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbyhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbyhostingenvironment.go index 2509533cd78..0086ec07d1d 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbyhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbyhostingenvironment.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToHeaders() *client. func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Co var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbywebapp.go b/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbywebapp.go index 8e4e22b5b79..9d34652f182 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbywebapp.go +++ b/resource-manager/web/2023-01-01/recommendations/method_getruledetailsbywebapp.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByWebAppOperationOptions) ToHeaders() *client.Headers { func (o GetRuleDetailsByWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, id Si var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/recommendations/method_list.go b/resource-manager/web/2023-01-01/recommendations/method_list.go index f45d890f65b..784389aa71e 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_list.go +++ b/resource-manager/web/2023-01-01/recommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_listhistoryforhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_listhistoryforhostingenvironment.go index a66dab954fa..6b92d0e2bb0 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_listhistoryforhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_listhistoryforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListHistoryForHostingEnvironmentOperationOptions) ToHeaders() *client.He func (o ListHistoryForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_listhistoryforwebapp.go b/resource-manager/web/2023-01-01/recommendations/method_listhistoryforwebapp.go index 54a97058272..9fe581ed380 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_listhistoryforwebapp.go +++ b/resource-manager/web/2023-01-01/recommendations/method_listhistoryforwebapp.go @@ -41,6 +41,7 @@ func (o ListHistoryForWebAppOperationOptions) ToHeaders() *client.Headers { func (o ListHistoryForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforhostingenvironment.go index d7c819654b5..3d8956760e1 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToHeaders() * func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforwebapp.go b/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforwebapp.go index 45f19bdafd5..f417cf7c61a 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforwebapp.go +++ b/resource-manager/web/2023-01-01/recommendations/method_listrecommendedrulesforwebapp.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForWebAppOperationOptions) ToHeaders() *client.Heade func (o ListRecommendedRulesForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/method_resetallfiltersforhostingenvironment.go b/resource-manager/web/2023-01-01/recommendations/method_resetallfiltersforhostingenvironment.go index 23fe068d9bf..c6d9e982291 100644 --- a/resource-manager/web/2023-01-01/recommendations/method_resetallfiltersforhostingenvironment.go +++ b/resource-manager/web/2023-01-01/recommendations/method_resetallfiltersforhostingenvironment.go @@ -34,6 +34,7 @@ func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToHeaders() *clien func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/recommendations/version.go b/resource-manager/web/2023-01-01/recommendations/version.go index 5ce039712cd..eebefeed3ee 100644 --- a/resource-manager/web/2023-01-01/recommendations/version.go +++ b/resource-manager/web/2023-01-01/recommendations/version.go @@ -1,12 +1,10 @@ package recommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recommendations/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/README.md b/resource-manager/web/2023-01-01/resourcehealthmetadata/README.md index dfcfc30bdf1..e117ffabdeb 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/README.md +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourcehealthmetadata` Documentation -The `resourcehealthmetadata` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `resourcehealthmetadata` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/client.go b/resource-manager/web/2023-01-01/resourcehealthmetadata/client.go index a0e8b63b709..8d0b22d4c33 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/client.go +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/client.go @@ -15,7 +15,7 @@ type ResourceHealthMetadataClient struct { } func NewResourceHealthMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceHealthMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceHealthMetadataClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/id_slot.go b/resource-manager/web/2023-01-01/resourcehealthmetadata/id_slot.go index 0bfa176043e..988c831a683 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/id_slot.go +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysite.go b/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysite.go index 58587d1e4b3..0b5f4205ef8 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysite.go +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysite.go @@ -47,7 +47,6 @@ func (c ResourceHealthMetadataClient) GetBySite(ctx context.Context, id commonid var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysiteslot.go b/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysiteslot.go index 23f5d6260a5..24365f1341a 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysiteslot.go +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/method_getbysiteslot.go @@ -46,7 +46,6 @@ func (c ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, id Slot var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourcehealthmetadata/version.go b/resource-manager/web/2023-01-01/resourcehealthmetadata/version.go index 829a9c93a0e..d0f9163246f 100644 --- a/resource-manager/web/2023-01-01/resourcehealthmetadata/version.go +++ b/resource-manager/web/2023-01-01/resourcehealthmetadata/version.go @@ -1,12 +1,10 @@ package resourcehealthmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcehealthmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcehealthmetadata/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/resourceproviders/README.md b/resource-manager/web/2023-01-01/resourceproviders/README.md index 24eec0471d0..19c13e69938 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/README.md +++ b/resource-manager/web/2023-01-01/resourceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/resourceproviders` Documentation -The `resourceproviders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `resourceproviders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/resourceproviders/client.go b/resource-manager/web/2023-01-01/resourceproviders/client.go index 0f91da37d8c..f5374bb3bc3 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/client.go +++ b/resource-manager/web/2023-01-01/resourceproviders/client.go @@ -15,7 +15,7 @@ type ResourceProvidersClient struct { } func NewResourceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceProvidersClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/resourceproviders/id_providerlocation.go b/resource-manager/web/2023-01-01/resourceproviders/id_providerlocation.go index c73af0cec4a..9e0eebd55e0 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/id_providerlocation.go +++ b/resource-manager/web/2023-01-01/resourceproviders/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/resourceproviders/id_sourcecontrol.go b/resource-manager/web/2023-01-01/resourceproviders/id_sourcecontrol.go index f59308a6f73..6bb16534a47 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/id_sourcecontrol.go +++ b/resource-manager/web/2023-01-01/resourceproviders/id_sourcecontrol.go @@ -38,7 +38,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_checknameavailability.go b/resource-manager/web/2023-01-01/resourceproviders/method_checknameavailability.go index 1b0dd0b6a4f..8d708561b66 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_checknameavailability.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) CheckNameAvailability(ctx context.Context, id c var model ResourceNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_getpublishinguser.go b/resource-manager/web/2023-01-01/resourceproviders/method_getpublishinguser.go index 558a74efdd0..e0529900390 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_getpublishinguser.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_getpublishinguser.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetPublishingUser(ctx context.Context) (result var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_getsourcecontrol.go b/resource-manager/web/2023-01-01/resourceproviders/method_getsourcecontrol.go index 2035eb827a6..2684d63d83c 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_getsourcecontrol.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_getsourcecontrol.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetSourceControl(ctx context.Context, id Source var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_getsubscriptiondeploymentlocations.go b/resource-manager/web/2023-01-01/resourceproviders/method_getsubscriptiondeploymentlocations.go index 54881368bcb..3564d1ecad9 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_getsubscriptiondeploymentlocations.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_getsubscriptiondeploymentlocations.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) GetSubscriptionDeploymentLocations(ctx context. var model DeploymentLocations result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_listbillingmeters.go b/resource-manager/web/2023-01-01/resourceproviders/method_listbillingmeters.go index 684c35df7f1..97f4b003c15 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_listbillingmeters.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_listbillingmeters.go @@ -41,6 +41,7 @@ func (o ListBillingMetersOperationOptions) ToHeaders() *client.Headers { func (o ListBillingMetersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_listcustomhostnamesites.go b/resource-manager/web/2023-01-01/resourceproviders/method_listcustomhostnamesites.go index 62c87e04bf1..f3f451bdaf0 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_listcustomhostnamesites.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_listcustomhostnamesites.go @@ -40,6 +40,7 @@ func (o ListCustomHostNameSitesOperationOptions) ToHeaders() *client.Headers { func (o ListCustomHostNameSitesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_listgeoregions.go b/resource-manager/web/2023-01-01/resourceproviders/method_listgeoregions.go index ee39002c7a8..e1022e689b7 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_listgeoregions.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_listgeoregions.go @@ -43,6 +43,7 @@ func (o ListGeoRegionsOperationOptions) ToHeaders() *client.Headers { func (o ListGeoRegionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_listskus.go b/resource-manager/web/2023-01-01/resourceproviders/method_listskus.go index 494e7016169..cffe2769c1b 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_listskus.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_listskus.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) ListSkus(ctx context.Context, id commonids.Subs var model SkuInfos result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_updatepublishinguser.go b/resource-manager/web/2023-01-01/resourceproviders/method_updatepublishinguser.go index 58d177a7f00..e994b006317 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_updatepublishinguser.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_updatepublishinguser.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdatePublishingUser(ctx context.Context, input var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_updatesourcecontrol.go b/resource-manager/web/2023-01-01/resourceproviders/method_updatesourcecontrol.go index fba65489698..1d9f45f198e 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_updatesourcecontrol.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_updatesourcecontrol.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdateSourceControl(ctx context.Context, id Sou var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_validate.go b/resource-manager/web/2023-01-01/resourceproviders/method_validate.go index 055e2a0b590..4db5e1bb83c 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_validate.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_validate.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) Validate(ctx context.Context, id commonids.Reso var model ValidateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/method_verifyhostingenvironmentvnet.go b/resource-manager/web/2023-01-01/resourceproviders/method_verifyhostingenvironmentvnet.go index f2d83339160..733f7cd2e65 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/method_verifyhostingenvironmentvnet.go +++ b/resource-manager/web/2023-01-01/resourceproviders/method_verifyhostingenvironmentvnet.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) VerifyHostingEnvironmentVnet(ctx context.Contex var model VnetValidationFailureDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/resourceproviders/version.go b/resource-manager/web/2023-01-01/resourceproviders/version.go index 0659fd65e56..4efd01f775a 100644 --- a/resource-manager/web/2023-01-01/resourceproviders/version.go +++ b/resource-manager/web/2023-01-01/resourceproviders/version.go @@ -1,12 +1,10 @@ package resourceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceproviders/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/staticsites/README.md b/resource-manager/web/2023-01-01/staticsites/README.md index 5b573d21e91..df6925f2bd6 100644 --- a/resource-manager/web/2023-01-01/staticsites/README.md +++ b/resource-manager/web/2023-01-01/staticsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/staticsites` Documentation -The `staticsites` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `staticsites` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/staticsites/client.go b/resource-manager/web/2023-01-01/staticsites/client.go index d725455a2d7..1843789810a 100644 --- a/resource-manager/web/2023-01-01/staticsites/client.go +++ b/resource-manager/web/2023-01-01/staticsites/client.go @@ -15,7 +15,7 @@ type StaticSitesClient struct { } func NewStaticSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticSitesClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/staticsites/id_authprovider.go b/resource-manager/web/2023-01-01/staticsites/id_authprovider.go index 750184e2aa7..226f3b5c52a 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_authprovider.go +++ b/resource-manager/web/2023-01-01/staticsites/id_authprovider.go @@ -44,7 +44,7 @@ func ParseAuthProviderID(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthProviderIDInsensitively(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_build.go b/resource-manager/web/2023-01-01/staticsites/id_build.go index 1e21fb5cf2b..1a27dd31601 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_build.go +++ b/resource-manager/web/2023-01-01/staticsites/id_build.go @@ -44,7 +44,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_builddatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/id_builddatabaseconnection.go index 0ed1b728e32..3b7ab746afe 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_builddatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/id_builddatabaseconnection.go @@ -46,7 +46,7 @@ func ParseBuildDatabaseConnectionID(input string) (*BuildDatabaseConnectionId, e } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildDatabaseConnectionIDInsensitively(input string) (*BuildDatabaseCo } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_buildlinkedbackend.go b/resource-manager/web/2023-01-01/staticsites/id_buildlinkedbackend.go index d6cf5a07976..5a46e9ddfbb 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_buildlinkedbackend.go +++ b/resource-manager/web/2023-01-01/staticsites/id_buildlinkedbackend.go @@ -46,7 +46,7 @@ func ParseBuildLinkedBackendID(input string) (*BuildLinkedBackendId, error) { } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildLinkedBackendIDInsensitively(input string) (*BuildLinkedBackendId } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_builduserprovidedfunctionapp.go b/resource-manager/web/2023-01-01/staticsites/id_builduserprovidedfunctionapp.go index 3b8c90ea51f..c635b356bea 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_builduserprovidedfunctionapp.go +++ b/resource-manager/web/2023-01-01/staticsites/id_builduserprovidedfunctionapp.go @@ -46,7 +46,7 @@ func ParseBuildUserProvidedFunctionAppID(input string) (*BuildUserProvidedFuncti } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildUserProvidedFunctionAppIDInsensitively(input string) (*BuildUserP } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_customdomain.go b/resource-manager/web/2023-01-01/staticsites/id_customdomain.go index 8b71f5f6a29..36338190c89 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_customdomain.go +++ b/resource-manager/web/2023-01-01/staticsites/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_databaseconnection.go b/resource-manager/web/2023-01-01/staticsites/id_databaseconnection.go index 9369f53f8e5..9758866cc0e 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_databaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/id_databaseconnection.go @@ -44,7 +44,7 @@ func ParseDatabaseConnectionID(input string) (*DatabaseConnectionId, error) { } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseConnectionIDInsensitively(input string) (*DatabaseConnectionId } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_linkedbackend.go b/resource-manager/web/2023-01-01/staticsites/id_linkedbackend.go index 718f2b0e7f1..11af3b43597 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_linkedbackend.go +++ b/resource-manager/web/2023-01-01/staticsites/id_linkedbackend.go @@ -44,7 +44,7 @@ func ParseLinkedBackendID(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedBackendIDInsensitively(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_providerlocation.go b/resource-manager/web/2023-01-01/staticsites/id_providerlocation.go index ee9a3aa0549..414ef53820f 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_providerlocation.go +++ b/resource-manager/web/2023-01-01/staticsites/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_staticsite.go b/resource-manager/web/2023-01-01/staticsites/id_staticsite.go index 1c7bb88ff3c..56186355289 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_staticsite.go +++ b/resource-manager/web/2023-01-01/staticsites/id_staticsite.go @@ -42,7 +42,7 @@ func ParseStaticSiteID(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStaticSiteIDInsensitively(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_staticsiteprivateendpointconnection.go b/resource-manager/web/2023-01-01/staticsites/id_staticsiteprivateendpointconnection.go index 34f63677af6..f4c717142de 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_staticsiteprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/id_staticsiteprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseStaticSitePrivateEndpointConnectionID(input string) (*StaticSitePrivat } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStaticSitePrivateEndpointConnectionIDInsensitively(input string) (*Sta } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_user.go b/resource-manager/web/2023-01-01/staticsites/id_user.go index a53ca4c5a29..40aa164640e 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_user.go +++ b/resource-manager/web/2023-01-01/staticsites/id_user.go @@ -46,7 +46,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/id_userprovidedfunctionapp.go b/resource-manager/web/2023-01-01/staticsites/id_userprovidedfunctionapp.go index fb801e139a9..c86f8f50b8c 100644 --- a/resource-manager/web/2023-01-01/staticsites/id_userprovidedfunctionapp.go +++ b/resource-manager/web/2023-01-01/staticsites/id_userprovidedfunctionapp.go @@ -44,7 +44,7 @@ func ParseUserProvidedFunctionAppID(input string) (*UserProvidedFunctionAppId, e } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserProvidedFunctionAppIDInsensitively(input string) (*UserProvidedFun } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatebasicauth.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatebasicauth.go index 34051d7923f..e320de5ee8d 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatebasicauth.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatebasicauth.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, id Stati var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatebuilddatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatebuilddatabaseconnection.go index 9fa486417cb..577ea3e3a33 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatebuilddatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatedatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatedatabaseconnection.go index 718dd346c56..4e9d93d0c60 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatedatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsiteappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsiteappsettings.go index 19e3b9c2d9d..7664955e4a5 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsiteappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsiteappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildappsettings.go index bcded5df29e..ea9eccbeb1d 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context. var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go index 4a99a9e6b1d..6ccea1d9510 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go index b4181e79c23..8bc2ba7c3e0 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_createuserrolesinvitationlink.go b/resource-manager/web/2023-01-01/staticsites/method_createuserrolesinvitationlink.go index 2c3ce3709a2..62bf2337cca 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_createuserrolesinvitationlink.go +++ b/resource-manager/web/2023-01-01/staticsites/method_createuserrolesinvitationlink.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, id var model StaticSiteUserInvitationResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getbasicauth.go b/resource-manager/web/2023-01-01/staticsites/method_getbasicauth.go index 93aca3f09be..860b9bdbfd2 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getbasicauth.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getbasicauth.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBasicAuth(ctx context.Context, id StaticSiteId) (r var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnection.go index 64d51db24b6..6d90dfd9ae3 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, id Bu var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go index 39323af4c15..c035b26d729 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnection.go index 118dabea250..ad1f59b58d4 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetDatabaseConnection(ctx context.Context, id Databas var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionwithdetails.go b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionwithdetails.go index 7ff319615bd..349897ee72d 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionwithdetails.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getdatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackend.go b/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackend.go index b572c2a2856..553c375e975 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackend.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackend.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackend(ctx context.Context, id LinkedBacken var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackendforbuild.go b/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackendforbuild.go index 9bc02ed8de7..5761fa2c83b 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackendforbuild.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getlinkedbackendforbuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, id Buil var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getprivateendpointconnection.go b/resource-manager/web/2023-01-01/staticsites/method_getprivateendpointconnection.go index 7342343fa2a..0d198e2c428 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getprivatelinkresources.go b/resource-manager/web/2023-01-01/staticsites/method_getprivatelinkresources.go index d9590943395..0234f35567a 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getprivatelinkresources.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetPrivateLinkResources(ctx context.Context, id Stati var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getstaticsite.go b/resource-manager/web/2023-01-01/staticsites/method_getstaticsite.go index 6096f2cb35e..f1a5134adf8 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getstaticsite.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSite(ctx context.Context, id StaticSiteId) ( var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getstaticsitebuild.go b/resource-manager/web/2023-01-01/staticsites/method_getstaticsitebuild.go index 0794f8c9a40..980e9844cd4 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getstaticsitebuild.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteBuild(ctx context.Context, id BuildId) ( var model StaticSiteBuildARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getstaticsitecustomdomain.go b/resource-manager/web/2023-01-01/staticsites/method_getstaticsitecustomdomain.go index 482be40cd04..4f067b9c862 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getstaticsitecustomdomain.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getstaticsitecustomdomain.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, id Cus var model StaticSiteCustomDomainOverviewARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go b/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go index 8b09371d9c2..0407b757d73 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.C var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go b/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go index 9419b0ecc93..6c737d6cde7 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go +++ b/resource-manager/web/2023-01-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx cont var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteappsettings.go index 5ecb3eee84b..af3f94e29fc 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, id Sta var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildappsettings.go index deb7ce043ec..b23b85384c4 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, i var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildfunctionappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildfunctionappsettings.go index 14b452b8d2a..220b09e2518 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitebuildfunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Co var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteconfiguredroles.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteconfiguredroles.go index 1a015925a7f..ad252bdfded 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteconfiguredroles.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsiteconfiguredroles.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, id var model StringList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitefunctionappsettings.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitefunctionappsettings.go index 32f56586d7e..9c4a10a187f 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitefunctionappsettings.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitefunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitesecrets.go b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitesecrets.go index cc35a7c0654..f9ed5192106 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_liststaticsitesecrets.go +++ b/resource-manager/web/2023-01-01/staticsites/method_liststaticsitesecrets.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, id StaticS var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_previewworkflow.go b/resource-manager/web/2023-01-01/staticsites/method_previewworkflow.go index f867a88a25e..2a34e3a3c41 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_previewworkflow.go +++ b/resource-manager/web/2023-01-01/staticsites/method_previewworkflow.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) PreviewWorkflow(ctx context.Context, id ProviderLocat var model StaticSitesWorkflowPreview result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go b/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go index 5cfabf447f9..c210993e945 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go +++ b/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToHeaders func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go b/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go index 32f030cb1b3..2d4f13d5c79 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go +++ b/resource-manager/web/2023-01-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToHe func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/staticsites/method_unlinkbackend.go b/resource-manager/web/2023-01-01/staticsites/method_unlinkbackend.go index 897c1be7925..27575e98684 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_unlinkbackend.go +++ b/resource-manager/web/2023-01-01/staticsites/method_unlinkbackend.go @@ -33,6 +33,7 @@ func (o UnlinkBackendOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/staticsites/method_unlinkbackendfrombuild.go b/resource-manager/web/2023-01-01/staticsites/method_unlinkbackendfrombuild.go index 7e356363af4..f6055b15e30 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_unlinkbackendfrombuild.go +++ b/resource-manager/web/2023-01-01/staticsites/method_unlinkbackendfrombuild.go @@ -33,6 +33,7 @@ func (o UnlinkBackendFromBuildOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendFromBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/staticsites/method_updatebuilddatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_updatebuilddatabaseconnection.go index c9611ae5cb3..2c78c742cf3 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_updatebuilddatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_updatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, id var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_updatedatabaseconnection.go b/resource-manager/web/2023-01-01/staticsites/method_updatedatabaseconnection.go index 6e37673f34d..c2bab9a13a3 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_updatedatabaseconnection.go +++ b/resource-manager/web/2023-01-01/staticsites/method_updatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, id Data var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_updatestaticsite.go b/resource-manager/web/2023-01-01/staticsites/method_updatestaticsite.go index 2db8a28235a..c1706e09ddb 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_updatestaticsite.go +++ b/resource-manager/web/2023-01-01/staticsites/method_updatestaticsite.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) UpdateStaticSite(ctx context.Context, id StaticSiteId var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/method_updatestaticsiteuser.go b/resource-manager/web/2023-01-01/staticsites/method_updatestaticsiteuser.go index ddcb14fbcc6..7741cafbf21 100644 --- a/resource-manager/web/2023-01-01/staticsites/method_updatestaticsiteuser.go +++ b/resource-manager/web/2023-01-01/staticsites/method_updatestaticsiteuser.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, id UserId, var model StaticSiteUserARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/staticsites/version.go b/resource-manager/web/2023-01-01/staticsites/version.go index dbb89d0c49b..c1516aa9aa6 100644 --- a/resource-manager/web/2023-01-01/staticsites/version.go +++ b/resource-manager/web/2023-01-01/staticsites/version.go @@ -1,12 +1,10 @@ package staticsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticsites/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/topleveldomains/README.md b/resource-manager/web/2023-01-01/topleveldomains/README.md index 2bd24e877e6..c0f602ed676 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/README.md +++ b/resource-manager/web/2023-01-01/topleveldomains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/topleveldomains` Documentation -The `topleveldomains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `topleveldomains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/topleveldomains/client.go b/resource-manager/web/2023-01-01/topleveldomains/client.go index f688cee500e..73312d38791 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/client.go +++ b/resource-manager/web/2023-01-01/topleveldomains/client.go @@ -15,7 +15,7 @@ type TopLevelDomainsClient struct { } func NewTopLevelDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopLevelDomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topleveldomains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topleveldomains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopLevelDomainsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/topleveldomains/id_topleveldomain.go b/resource-manager/web/2023-01-01/topleveldomains/id_topleveldomain.go index acfeab4dadd..6f6ab16698b 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/id_topleveldomain.go +++ b/resource-manager/web/2023-01-01/topleveldomains/id_topleveldomain.go @@ -40,7 +40,7 @@ func ParseTopLevelDomainID(input string) (*TopLevelDomainId, error) { } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTopLevelDomainIDInsensitively(input string) (*TopLevelDomainId, error) } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/topleveldomains/method_get.go b/resource-manager/web/2023-01-01/topleveldomains/method_get.go index f8281b382bd..b9320d14b1f 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/method_get.go +++ b/resource-manager/web/2023-01-01/topleveldomains/method_get.go @@ -45,7 +45,6 @@ func (c TopLevelDomainsClient) Get(ctx context.Context, id TopLevelDomainId) (re var model TopLevelDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/topleveldomains/version.go b/resource-manager/web/2023-01-01/topleveldomains/version.go index 8bd7898e864..e1789a68a55 100644 --- a/resource-manager/web/2023-01-01/topleveldomains/version.go +++ b/resource-manager/web/2023-01-01/topleveldomains/version.go @@ -1,12 +1,10 @@ package topleveldomains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topleveldomains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topleveldomains/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/webapps/README.md b/resource-manager/web/2023-01-01/webapps/README.md index 27c35f23e5b..1f6695233fc 100644 --- a/resource-manager/web/2023-01-01/webapps/README.md +++ b/resource-manager/web/2023-01-01/webapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/webapps` Documentation -The `webapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `webapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/webapps/client.go b/resource-manager/web/2023-01-01/webapps/client.go index 5b73caa6cf9..cfd22cd9b25 100644 --- a/resource-manager/web/2023-01-01/webapps/client.go +++ b/resource-manager/web/2023-01-01/webapps/client.go @@ -15,7 +15,7 @@ type WebAppsClient struct { } func NewWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/webapps/id_appsetting.go b/resource-manager/web/2023-01-01/webapps/id_appsetting.go index f79067efc7a..6570aa7135e 100644 --- a/resource-manager/web/2023-01-01/webapps/id_appsetting.go +++ b/resource-manager/web/2023-01-01/webapps/id_appsetting.go @@ -44,7 +44,7 @@ func ParseAppSettingID(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppSettingIDInsensitively(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_backup.go b/resource-manager/web/2023-01-01/webapps/id_backup.go index c93bb6ba405..8f56fe8e86e 100644 --- a/resource-manager/web/2023-01-01/webapps/id_backup.go +++ b/resource-manager/web/2023-01-01/webapps/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go b/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go index 68ac42d6ea7..9dccf717dc5 100644 --- a/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go +++ b/resource-manager/web/2023-01-01/webapps/id_configreferenceappsetting.go @@ -46,7 +46,7 @@ func ParseConfigReferenceAppSettingID(input string) (*ConfigReferenceAppSettingI } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceAppSettingIDInsensitively(input string) (*ConfigReferen } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go b/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go index 73f0b28fde9..aea5296e526 100644 --- a/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go +++ b/resource-manager/web/2023-01-01/webapps/id_configreferenceconnectionstring.go @@ -46,7 +46,7 @@ func ParseConfigReferenceConnectionStringID(input string) (*ConfigReferenceConne } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceConnectionStringIDInsensitively(input string) (*ConfigR } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_connectionstring.go b/resource-manager/web/2023-01-01/webapps/id_connectionstring.go index 9e8a7bdf65a..f1204be3c86 100644 --- a/resource-manager/web/2023-01-01/webapps/id_connectionstring.go +++ b/resource-manager/web/2023-01-01/webapps/id_connectionstring.go @@ -44,7 +44,7 @@ func ParseConnectionStringID(input string) (*ConnectionStringId, error) { } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionStringIDInsensitively(input string) (*ConnectionStringId, er } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go b/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go index bd064699944..da1f781d51c 100644 --- a/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_continuouswebjob.go @@ -44,7 +44,7 @@ func ParseContinuousWebJobID(input string) (*ContinuousWebJobId, error) { } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContinuousWebJobIDInsensitively(input string) (*ContinuousWebJobId, er } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_default.go b/resource-manager/web/2023-01-01/webapps/id_default.go index c191cc07347..ebbf559eca2 100644 --- a/resource-manager/web/2023-01-01/webapps/id_default.go +++ b/resource-manager/web/2023-01-01/webapps/id_default.go @@ -46,7 +46,7 @@ func ParseDefaultID(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDefaultIDInsensitively(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_deployment.go b/resource-manager/web/2023-01-01/webapps/id_deployment.go index a9c9751643f..29e705e77b3 100644 --- a/resource-manager/web/2023-01-01/webapps/id_deployment.go +++ b/resource-manager/web/2023-01-01/webapps/id_deployment.go @@ -44,7 +44,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go b/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go index 45cb4c5271d..91bcb81f8ed 100644 --- a/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/webapps/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_function.go b/resource-manager/web/2023-01-01/webapps/id_function.go index 4b864194a47..0582f2765c2 100644 --- a/resource-manager/web/2023-01-01/webapps/id_function.go +++ b/resource-manager/web/2023-01-01/webapps/id_function.go @@ -44,7 +44,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_functionkey.go b/resource-manager/web/2023-01-01/webapps/id_functionkey.go index 0e8c227341e..e5073a1ee1e 100644 --- a/resource-manager/web/2023-01-01/webapps/id_functionkey.go +++ b/resource-manager/web/2023-01-01/webapps/id_functionkey.go @@ -48,7 +48,7 @@ func ParseFunctionKeyID(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseFunctionKeyIDInsensitively(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_gateway.go b/resource-manager/web/2023-01-01/webapps/id_gateway.go index ca31ece2066..d8ce5ae92ac 100644 --- a/resource-manager/web/2023-01-01/webapps/id_gateway.go +++ b/resource-manager/web/2023-01-01/webapps/id_gateway.go @@ -46,7 +46,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_history.go b/resource-manager/web/2023-01-01/webapps/id_history.go index 27f2d61eb6e..23ea7bea0d7 100644 --- a/resource-manager/web/2023-01-01/webapps/id_history.go +++ b/resource-manager/web/2023-01-01/webapps/id_history.go @@ -46,7 +46,7 @@ func ParseHistoryID(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHistoryIDInsensitively(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_hostdefault.go b/resource-manager/web/2023-01-01/webapps/id_hostdefault.go index 5278463ffbf..92bbf2f8abc 100644 --- a/resource-manager/web/2023-01-01/webapps/id_hostdefault.go +++ b/resource-manager/web/2023-01-01/webapps/id_hostdefault.go @@ -48,7 +48,7 @@ func ParseHostDefaultID(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseHostDefaultIDInsensitively(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go b/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go index dd781b22a7b..a4b717ec937 100644 --- a/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go +++ b/resource-manager/web/2023-01-01/webapps/id_hostnamebinding.go @@ -44,7 +44,7 @@ func ParseHostNameBindingID(input string) (*HostNameBindingId, error) { } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostNameBindingIDInsensitively(input string) (*HostNameBindingId, erro } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go b/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go index 01b9c8a8590..327a6eeaeee 100644 --- a/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_hybridconnection.go @@ -44,7 +44,7 @@ func ParseHybridConnectionID(input string) (*HybridConnectionId, error) { } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, er } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_instance.go b/resource-manager/web/2023-01-01/webapps/id_instance.go index f32fdae320a..4d51a7de35f 100644 --- a/resource-manager/web/2023-01-01/webapps/id_instance.go +++ b/resource-manager/web/2023-01-01/webapps/id_instance.go @@ -44,7 +44,7 @@ func ParseInstanceID(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go b/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go index e5913d50a18..e3dd2b9ec98 100644 --- a/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go +++ b/resource-manager/web/2023-01-01/webapps/id_instanceprocess.go @@ -46,7 +46,7 @@ func ParseInstanceProcessID(input string) (*InstanceProcessId, error) { } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseInstanceProcessIDInsensitively(input string) (*InstanceProcessId, erro } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go b/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go index d905ee1acd0..5db7365c1f7 100644 --- a/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go +++ b/resource-manager/web/2023-01-01/webapps/id_instanceprocessmodule.go @@ -48,7 +48,7 @@ func ParseInstanceProcessModuleID(input string) (*InstanceProcessModuleId, error } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseInstanceProcessModuleIDInsensitively(input string) (*InstanceProcessMo } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_key.go b/resource-manager/web/2023-01-01/webapps/id_key.go index cbdd8974ed7..10827d52737 100644 --- a/resource-manager/web/2023-01-01/webapps/id_key.go +++ b/resource-manager/web/2023-01-01/webapps/id_key.go @@ -46,7 +46,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_module.go b/resource-manager/web/2023-01-01/webapps/id_module.go index fa4c8e1c74c..d8020f716b7 100644 --- a/resource-manager/web/2023-01-01/webapps/id_module.go +++ b/resource-manager/web/2023-01-01/webapps/id_module.go @@ -46,7 +46,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_networkfeature.go b/resource-manager/web/2023-01-01/webapps/id_networkfeature.go index 392453252e2..280955814b0 100644 --- a/resource-manager/web/2023-01-01/webapps/id_networkfeature.go +++ b/resource-manager/web/2023-01-01/webapps/id_networkfeature.go @@ -44,7 +44,7 @@ func ParseNetworkFeatureID(input string) (*NetworkFeatureId, error) { } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkFeatureIDInsensitively(input string) (*NetworkFeatureId, error) } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_networktrace.go b/resource-manager/web/2023-01-01/webapps/id_networktrace.go index 28b0b24703c..ea534f344cf 100644 --- a/resource-manager/web/2023-01-01/webapps/id_networktrace.go +++ b/resource-manager/web/2023-01-01/webapps/id_networktrace.go @@ -44,7 +44,7 @@ func ParseNetworkTraceID(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkTraceIDInsensitively(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_premieraddon.go b/resource-manager/web/2023-01-01/webapps/id_premieraddon.go index dfee9125f05..59d273ad195 100644 --- a/resource-manager/web/2023-01-01/webapps/id_premieraddon.go +++ b/resource-manager/web/2023-01-01/webapps/id_premieraddon.go @@ -44,7 +44,7 @@ func ParsePremierAddonID(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePremierAddonIDInsensitively(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go b/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go index 30ff5bd5111..5679ccc111e 100644 --- a/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_process.go b/resource-manager/web/2023-01-01/webapps/id_process.go index f50f0ce9a31..aa68d26d279 100644 --- a/resource-manager/web/2023-01-01/webapps/id_process.go +++ b/resource-manager/web/2023-01-01/webapps/id_process.go @@ -44,7 +44,7 @@ func ParseProcessID(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProcessIDInsensitively(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_processmodule.go b/resource-manager/web/2023-01-01/webapps/id_processmodule.go index d82b0bb7c2a..93cb8fe4496 100644 --- a/resource-manager/web/2023-01-01/webapps/id_processmodule.go +++ b/resource-manager/web/2023-01-01/webapps/id_processmodule.go @@ -48,7 +48,7 @@ func ParseProcessModuleID(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProcessModuleIDInsensitively(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go b/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go index 73c217f6800..66edd7f2d3d 100644 --- a/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go +++ b/resource-manager/web/2023-01-01/webapps/id_publiccertificate.go @@ -44,7 +44,7 @@ func ParsePublicCertificateID(input string) (*PublicCertificateId, error) { } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicCertificateIDInsensitively(input string) (*PublicCertificateId, } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_relay.go b/resource-manager/web/2023-01-01/webapps/id_relay.go index 52a8e92c8f5..2b3d9907b79 100644 --- a/resource-manager/web/2023-01-01/webapps/id_relay.go +++ b/resource-manager/web/2023-01-01/webapps/id_relay.go @@ -46,7 +46,7 @@ func ParseRelayID(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelayIDInsensitively(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_siteextension.go b/resource-manager/web/2023-01-01/webapps/id_siteextension.go index 769e3f2466e..96a3ca4de74 100644 --- a/resource-manager/web/2023-01-01/webapps/id_siteextension.go +++ b/resource-manager/web/2023-01-01/webapps/id_siteextension.go @@ -44,7 +44,7 @@ func ParseSiteExtensionID(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteExtensionIDInsensitively(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go b/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go index 69b7e658c0c..1cdefda2edb 100644 --- a/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go +++ b/resource-manager/web/2023-01-01/webapps/id_sitenetworktrace.go @@ -44,7 +44,7 @@ func ParseSiteNetworkTraceID(input string) (*SiteNetworkTraceId, error) { } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteNetworkTraceIDInsensitively(input string) (*SiteNetworkTraceId, er } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go b/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go index 0ce16071841..ccebe930003 100644 --- a/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go +++ b/resource-manager/web/2023-01-01/webapps/id_siteslotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSiteSlotNetworkTraceID(input string) (*SiteSlotNetworkTraceId, error) } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSiteSlotNetworkTraceIDInsensitively(input string) (*SiteSlotNetworkTra } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slot.go b/resource-manager/web/2023-01-01/webapps/id_slot.go index 37093c01152..904e83746a2 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slot.go +++ b/resource-manager/web/2023-01-01/webapps/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotbackup.go b/resource-manager/web/2023-01-01/webapps/id_slotbackup.go index 7e922478028..3e0321cb7b1 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotbackup.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotbackup.go @@ -46,7 +46,7 @@ func ParseSlotBackupID(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotBackupIDInsensitively(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go b/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go index 4c005d225dd..7b853f0fd87 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotcontinuouswebjob.go @@ -46,7 +46,7 @@ func ParseSlotContinuousWebJobID(input string) (*SlotContinuousWebJobId, error) } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotContinuousWebJobIDInsensitively(input string) (*SlotContinuousWebJ } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go b/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go index c98c86d914f..b9b1f22fcb8 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotdeployment.go @@ -46,7 +46,7 @@ func ParseSlotDeploymentID(input string) (*SlotDeploymentId, error) { } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDeploymentIDInsensitively(input string) (*SlotDeploymentId, error) } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go b/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go index d8889a92f84..4cb30290217 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotdomainownershipidentifier.go @@ -46,7 +46,7 @@ func ParseSlotDomainOwnershipIdentifierID(input string) (*SlotDomainOwnershipIde } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDomainOwnershipIdentifierIDInsensitively(input string) (*SlotDomai } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotfunction.go b/resource-manager/web/2023-01-01/webapps/id_slotfunction.go index 5578c099117..b39b0b6a41e 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotfunction.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotfunction.go @@ -46,7 +46,7 @@ func ParseSlotFunctionID(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotFunctionIDInsensitively(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go b/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go index 5e5e069e779..d67f8c26989 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go +++ b/resource-manager/web/2023-01-01/webapps/id_slothostnamebinding.go @@ -46,7 +46,7 @@ func ParseSlotHostNameBindingID(input string) (*SlotHostNameBindingId, error) { } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHostNameBindingIDInsensitively(input string) (*SlotHostNameBinding } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go b/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go index c59108e4984..9b39556db89 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_slothybridconnection.go @@ -46,7 +46,7 @@ func ParseSlotHybridConnectionID(input string) (*SlotHybridConnectionId, error) } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHybridConnectionIDInsensitively(input string) (*SlotHybridConnecti } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go b/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go index a990de1a626..b1dc3be246b 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go +++ b/resource-manager/web/2023-01-01/webapps/id_slothybridconnectionnamespacerelay.go @@ -48,7 +48,7 @@ func ParseSlotHybridConnectionNamespaceRelayID(input string) (*SlotHybridConnect } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotHybridConnectionNamespaceRelayIDInsensitively(input string) (*Slot } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotinstance.go b/resource-manager/web/2023-01-01/webapps/id_slotinstance.go index 982475e3199..f1216d28421 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotinstance.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotinstance.go @@ -46,7 +46,7 @@ func ParseSlotInstanceID(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotInstanceIDInsensitively(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go b/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go index bec31e27acc..88b8a031f84 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocess.go @@ -48,7 +48,7 @@ func ParseSlotInstanceProcessID(input string) (*SlotInstanceProcessId, error) { } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotInstanceProcessIDInsensitively(input string) (*SlotInstanceProcess } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go b/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go index f1d5cdb11e7..b9eee6e21eb 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotinstanceprocessmodule.go @@ -50,7 +50,7 @@ func ParseSlotInstanceProcessModuleID(input string) (*SlotInstanceProcessModuleI } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseSlotInstanceProcessModuleIDInsensitively(input string) (*SlotInstanceP } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go b/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go index 9a2a2655b20..dfad1a5284a 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotnetworkfeature.go @@ -46,7 +46,7 @@ func ParseSlotNetworkFeatureID(input string) (*SlotNetworkFeatureId, error) { } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkFeatureIDInsensitively(input string) (*SlotNetworkFeatureId } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go b/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go index f0baafea877..62d655b9a89 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSlotNetworkTraceID(input string) (*SlotNetworkTraceId, error) { } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkTraceIDInsensitively(input string) (*SlotNetworkTraceId, er } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go b/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go index 363aac4042d..f745f77c9ad 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotpremieraddon.go @@ -46,7 +46,7 @@ func ParseSlotPremierAddonID(input string) (*SlotPremierAddonId, error) { } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPremierAddonIDInsensitively(input string) (*SlotPremierAddonId, er } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go b/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go index 06c33c64213..286e37ae7e1 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotprivateendpointconnection.go @@ -46,7 +46,7 @@ func ParseSlotPrivateEndpointConnectionID(input string) (*SlotPrivateEndpointCon } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPrivateEndpointConnectionIDInsensitively(input string) (*SlotPriva } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotprocess.go b/resource-manager/web/2023-01-01/webapps/id_slotprocess.go index 85065bd680f..7419d4ae937 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotprocess.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotprocess.go @@ -46,7 +46,7 @@ func ParseSlotProcessID(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotProcessIDInsensitively(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go b/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go index 9cc7df5ef0f..0acaac78d6d 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotpubliccertificate.go @@ -46,7 +46,7 @@ func ParseSlotPublicCertificateID(input string) (*SlotPublicCertificateId, error } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPublicCertificateIDInsensitively(input string) (*SlotPublicCertifi } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go b/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go index 24d7fa27fec..877dd5c40f8 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotsiteextension.go @@ -46,7 +46,7 @@ func ParseSlotSiteExtensionID(input string) (*SlotSiteExtensionId, error) { } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotSiteExtensionIDInsensitively(input string) (*SlotSiteExtensionId, } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go b/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go index 8fcdb7a3629..27a76ce5f56 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_slottriggeredwebjob.go @@ -46,7 +46,7 @@ func ParseSlotTriggeredWebJobID(input string) (*SlotTriggeredWebJobId, error) { } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotTriggeredWebJobIDInsensitively(input string) (*SlotTriggeredWebJob } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go b/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go index a5612467edd..86175e99aca 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnection.go @@ -46,7 +46,7 @@ func ParseSlotVirtualNetworkConnectionID(input string) (*SlotVirtualNetworkConne } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotVirtualNetworkConnectionIDInsensitively(input string) (*SlotVirtua } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go b/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go index c730133f642..4888ace938b 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotvirtualnetworkconnectiongateway.go @@ -48,7 +48,7 @@ func ParseSlotVirtualNetworkConnectionGatewayID(input string) (*SlotVirtualNetwo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Slo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go b/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go index 2d33ce09820..6c144dae3e9 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotwebjob.go @@ -46,7 +46,7 @@ func ParseSlotWebJobID(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWebJobIDInsensitively(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go b/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go index cc9df4ec42e..6be59d05f47 100644 --- a/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go +++ b/resource-manager/web/2023-01-01/webapps/id_slotworkflow.go @@ -46,7 +46,7 @@ func ParseSlotWorkflowID(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWorkflowIDInsensitively(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_snapshot.go b/resource-manager/web/2023-01-01/webapps/id_snapshot.go index acd841b4273..26564e21d79 100644 --- a/resource-manager/web/2023-01-01/webapps/id_snapshot.go +++ b/resource-manager/web/2023-01-01/webapps/id_snapshot.go @@ -44,7 +44,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go b/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go index 7d689de870f..43ad4bf8382 100644 --- a/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_triggeredwebjob.go @@ -44,7 +44,7 @@ func ParseTriggeredWebJobID(input string) (*TriggeredWebJobId, error) { } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggeredWebJobIDInsensitively(input string) (*TriggeredWebJobId, erro } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go b/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go index cf7cd111d53..7af6650a4c7 100644 --- a/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go +++ b/resource-manager/web/2023-01-01/webapps/id_triggeredwebjobhistory.go @@ -48,7 +48,7 @@ func ParseTriggeredWebJobHistoryID(input string) (*TriggeredWebJobHistoryId, err } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggeredWebJobHistoryIDInsensitively(input string) (*TriggeredWebJobH } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go b/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go index 7ac96780e13..254f04902dd 100644 --- a/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go +++ b/resource-manager/web/2023-01-01/webapps/id_virtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkConnectionID(input string) (*VirtualNetworkConnectionId, } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkConnectionIDInsensitively(input string) (*VirtualNetwork } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_webjob.go b/resource-manager/web/2023-01-01/webapps/id_webjob.go index 1f27a30a1ec..33070b5e399 100644 --- a/resource-manager/web/2023-01-01/webapps/id_webjob.go +++ b/resource-manager/web/2023-01-01/webapps/id_webjob.go @@ -44,7 +44,7 @@ func ParseWebJobID(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebJobIDInsensitively(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_websnapshot.go b/resource-manager/web/2023-01-01/webapps/id_websnapshot.go index 705a6fbcaf9..df92a0940d6 100644 --- a/resource-manager/web/2023-01-01/webapps/id_websnapshot.go +++ b/resource-manager/web/2023-01-01/webapps/id_websnapshot.go @@ -46,7 +46,7 @@ func ParseWebSnapshotID(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWebSnapshotIDInsensitively(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/id_workflow.go b/resource-manager/web/2023-01-01/webapps/id_workflow.go index 4519773f55f..cfc67507afa 100644 --- a/resource-manager/web/2023-01-01/webapps/id_workflow.go +++ b/resource-manager/web/2023-01-01/webapps/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go b/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go index 7faf7f7e01c..cfb57af1bf6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go +++ b/resource-manager/web/2023-01-01/webapps/method_addpremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOn(ctx context.Context, id PremierAddonId, i var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go b/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go index 5a4fa5470e0..aeafde304bb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_addpremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go b/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go index b5b486f1e77..11970d2903f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go +++ b/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostname.go @@ -35,6 +35,7 @@ func (o AnalyzeCustomHostnameOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c WebAppsClient) AnalyzeCustomHostname(ctx context.Context, id commonids.A var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go b/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go index 4c608ff0d59..b2430c9f9ba 100644 --- a/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_analyzecustomhostnameslot.go @@ -34,6 +34,7 @@ func (o AnalyzeCustomHostnameSlotOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, id SlotId, var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_backup.go b/resource-manager/web/2023-01-01/webapps/method_backup.go index e8c66757e12..c1c49689e19 100644 --- a/resource-manager/web/2023-01-01/webapps/method_backup.go +++ b/resource-manager/web/2023-01-01/webapps/method_backup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Backup(ctx context.Context, id commonids.AppServiceId, in var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_backupslot.go b/resource-manager/web/2023-01-01/webapps/method_backupslot.go index 81ab5d55571..bb5f136eda5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_backupslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_backupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) BackupSlot(ctx context.Context, id SlotId, input BackupRe var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createdeployment.go b/resource-manager/web/2023-01-01/webapps/method_createdeployment.go index 2be253afc7e..942b704fb67 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createdeployment.go +++ b/resource-manager/web/2023-01-01/webapps/method_createdeployment.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeployment(ctx context.Context, id DeploymentId, in var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go b/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go index 6cf4e309a20..69c846f798e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createdeploymentslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeploymentSlot(ctx context.Context, id SlotDeployme var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go b/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go index 38e5c6a38a1..d313d5b7340 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go +++ b/resource-manager/web/2023-01-01/webapps/method_createonedeployoperation.go @@ -47,7 +47,6 @@ func (c WebAppsClient) CreateOneDeployOperation(ctx context.Context, id commonid var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go index 0949625e755..85500fcf708 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, id commo var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go index 6d8c147b26c..b41a356aa13 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, id S var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go index 42d7d52d965..54114dd7cb9 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Conte var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go index 1147ef7573e..001554898ac 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.C var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go index 2ed0a2ab525..92497573560 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, id KeyI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go index 16ba00bde18..0540fca8947 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatefunctionsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, id var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go index b239472ab87..3a47a4207d0 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebinding.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, id Hos var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go index ad9378dfe37..f0746cde4e6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostnamebindingslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, id var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go index 191c579b5d8..1b3b65509c9 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, id DefaultI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go index f3badff4dfe..f9bbc6bef55 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehostsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, id Host var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go index 74629a106ec..5c7b767edf5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, id Re var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go index c08c5ecf83b..480ee3d1593 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go index b25986d572e..b9aaaedb0d2 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificate.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, id P var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go index ec82a67e3a3..b53ffdea524 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatepubliccertificateslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go b/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go index 0e475ea9495..8cd02d31bd7 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go index df30da026a8..ade59122646 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Cont var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go index d2c9fca2d78..fcc6949b431 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go index 7ababeb64de..d5f3050db94 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go index c98acf2757f..2b041462b62 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, id Virt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go index f7c2605a07d..0f1c95c3f39 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go index a4040491cd6..d09166ca8e2 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Conte var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go index 060b5673b5a..ca68e315257 100644 --- a/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_createorupdatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, id var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_delete.go b/resource-manager/web/2023-01-01/webapps/method_delete.go index 491e0c6eca1..9849348f6db 100644 --- a/resource-manager/web/2023-01-01/webapps/method_delete.go +++ b/resource-manager/web/2023-01-01/webapps/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_deleteslot.go b/resource-manager/web/2023-01-01/webapps/method_deleteslot.go index c2d4db43a52..67b4c2dcc06 100644 --- a/resource-manager/web/2023-01-01/webapps/method_deleteslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_deleteslot.go @@ -34,6 +34,7 @@ func (o DeleteSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go b/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go index 7416e19fd09..dd5b73ad1b4 100644 --- a/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go +++ b/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrol.go @@ -34,6 +34,7 @@ func (o DeleteSourceControlOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go b/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go index 571dfbab3ab..45220bcdbd1 100644 --- a/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_deletesourcecontrolslot.go @@ -33,6 +33,7 @@ func (o DeleteSourceControlSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go b/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go index a1d107c462f..85b417c4364 100644 --- a/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go +++ b/resource-manager/web/2023-01-01/webapps/method_discoverbackup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) DiscoverBackup(ctx context.Context, id commonids.AppServi var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go b/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go index 15773ae16b5..bc2c9a593cb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_discoverbackupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) DiscoverBackupSlot(ctx context.Context, id SlotId, input var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_get.go b/resource-manager/web/2023-01-01/webapps/method_get.go index 23962fb39aa..31066458715 100644 --- a/resource-manager/web/2023-01-01/webapps/method_get.go +++ b/resource-manager/web/2023-01-01/webapps/method_get.go @@ -46,7 +46,6 @@ func (c WebAppsClient) Get(ctx context.Context, id commonids.AppServiceId) (resu var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go b/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go index 29c9f5b97a8..f27fab51318 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go +++ b/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, id Ap var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go b/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go index 4dd14572ebb..99870c87c7b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getappsettingkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, i var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go index dab06c29867..5deb735be93 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettings(ctx context.Context, id commonids.AppServ var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go index 1a60695f628..8e803724937 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsSlot(ctx context.Context, id SlotId) (resu var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go index fb5709f7073..a0504e9fd96 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2(ctx context.Context, id commonids.AppSe var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go index aa047a0dfd3..1709a5010c1 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2slot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, id SlotId) (re var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go index 01bf74554cf..124903a090d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecrets.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, id c var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go index 77753e1df7a..a969211442f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getauthsettingsv2withoutsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go index 2f529b24e69..89906332ea3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_getbackupconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetBackupConfiguration(ctx context.Context, id commonids. var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go index 865164a69ac..7be87a5817a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getbackupconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, id SlotId var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go b/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go index 24a6bb275d0..ab296926328 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go +++ b/resource-manager/web/2023-01-01/webapps/method_getbackupstatus.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatus(ctx context.Context, id BackupId) (result var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go b/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go index a56211ca854..0e862af25fb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getbackupstatusslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatusSlot(ctx context.Context, id SlotBackupId) var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go index 7651c296acf..1d73ea645f6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_getconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetConfiguration(ctx context.Context, id commonids.AppSer var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go index 9b190aed52b..89546b08eb1 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetConfigurationSlot(ctx context.Context, id SlotId) (res var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go b/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go index 0b163fa0d01..016b9fcd3bf 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshot(ctx context.Context, id Snapshot var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go b/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go index 0923d5bafca..80d0457f72f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getconfigurationsnapshotslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, id WebS var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go b/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go index 2f8ced54505..b0790356147 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go +++ b/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszip.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetContainerLogsZip(ctx context.Context, id commonids.App var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go b/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go index 7fa0bf62727..080f4f9691c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getcontainerlogszipslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, id SlotId) ( var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go b/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go index 9070b5b9190..9f5a071f437 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go +++ b/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJob(ctx context.Context, id ContinuousWeb var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go b/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go index 647b7a57557..8d4e01c6c04 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getcontinuouswebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, id SlotConti var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdeployment.go b/resource-manager/web/2023-01-01/webapps/method_getdeployment.go index 02efcfee65f..0355511e44e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdeployment.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdeployment.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeployment(ctx context.Context, id DeploymentId) (resu var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go b/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go index f382ca1b97a..4ab616abcec 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdeploymentslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeploymentSlot(ctx context.Context, id SlotDeploymentI var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go index 2995cd9178b..0612d0c160c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, id co var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go index ea9587ae477..aef303209ac 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdiagnosticlogsconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, i var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go b/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go index 6b9014ae5b1..44658be8e1a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifier.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, id Doma var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go b/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go index 5b5d7404532..a2e91d0b828 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getdomainownershipidentifierslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, id var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go b/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go index cb3b41f0b65..3fb4b79a51b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go +++ b/resource-manager/web/2023-01-01/webapps/method_getftpallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFtpAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go b/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go index 67419725f8e..2b3a8004dfc 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getftpallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFtpAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getfunction.go b/resource-manager/web/2023-01-01/webapps/method_getfunction.go index 91ccc8cdb31..c119bf71fa2 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getfunction.go +++ b/resource-manager/web/2023-01-01/webapps/method_getfunction.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetFunction(ctx context.Context, id FunctionId) (result G var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go b/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go index 319970db3c1..cef965d4ee4 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go +++ b/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintoken.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFunctionsAdminToken(ctx context.Context, id commonids. var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go b/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go index 71cbb37de0d..cf37de92f47 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getfunctionsadmintokenslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, id SlotId var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go b/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go index 1f8ada5414d..023c7f1797c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go +++ b/resource-manager/web/2023-01-01/webapps/method_gethostnamebinding.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBinding(ctx context.Context, id HostNameBindin var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go b/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go index acd9260e326..d96ab86f748 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_gethostnamebindingslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBindingSlot(ctx context.Context, id SlotHostNa var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go b/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go index 6824a6a3881..f018d1b6ec8 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnection(ctx context.Context, id RelayId) (res var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go index a73bc3e506e..e36e2d5b984 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_gethybridconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnectionSlot(ctx context.Context, id SlotHybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go index ac388ddbe1e..6e95d906f08 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstancefunctionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, id SlotFunct var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go index ccab5c5b65b..0d535788c59 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceinfo.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfo(ctx context.Context, id InstanceId) (resu var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go index eca65b26f1d..7ac3ffaf1c8 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceinfoslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfoSlot(ctx context.Context, id SlotInstanceI var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go index 54d4380e6c3..5f0ecd4b9d3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, id InstanceId var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go index 3e41c70cf7e..4aa95f5cdc1 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, id SlotIn var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go index 3516dc8c1f0..9b0781e0511 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatus.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, id Instanc var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go index 12bfe3d0fcf..08c034a5c4b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstancemsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, id Slo var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go index 7d686bc51f8..32dd68b49cb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcess(ctx context.Context, id InstanceProces var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go index 97c4de7e3d5..b3c0570e944 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDump(ctx context.Context, id InstancePr var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go index e32d3e6a2a8..f8e66cc080a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, id SlotIn var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go index b529a1ca714..f936b7fea0e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModule(ctx context.Context, id Instance var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go index 0e1009c3dce..f68ff944498 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, id Slot var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go index fc66e9a0fac..a799b1317f0 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessSlot(ctx context.Context, id SlotInstan var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go b/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go index 3edbdf23848..8ef0c8f31c8 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getinstanceworkflowslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, id SlotWorkf var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go b/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go index 9186da2ddf1..f05e2dd6aea 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMigrateMySqlStatus(ctx context.Context, id commonids.A var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go b/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go index 1916a1c2f04..973c158cbbf 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmigratemysqlstatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMigrateMySqlStatusSlot(ctx context.Context, id SlotId) var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go b/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go index 1fec3d2b551..e284c016eea 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmsdeploylog.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployLog(ctx context.Context, id commonids.AppServi var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go b/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go index a7148235787..2f843d00946 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployLogSlot(ctx context.Context, id SlotId) (resul var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go b/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go index 79957b82c58..2b61aa427cd 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployStatus(ctx context.Context, id commonids.AppSe var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go b/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go index 33ee57e263f..d644965e7fa 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getmsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, id SlotId) (re var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go b/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go index 05a761a58cf..c7baf1f6f32 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go +++ b/resource-manager/web/2023-01-01/webapps/method_getnetworktraces.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTraces(ctx context.Context, id NetworkTraceId) var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go index fac98d3e21a..be577fd2382 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlot(ctx context.Context, id SlotNetworkT var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go index f4cfa7b0265..6adf1088332 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go +++ b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesslotv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, id SiteSlotNe var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go index 075b0ec98e0..a647b7df7d6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go +++ b/resource-manager/web/2023-01-01/webapps/method_getnetworktracesv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesV2(ctx context.Context, id SiteNetworkTra var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go b/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go index 0192ff89661..861f9c0d26d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go +++ b/resource-manager/web/2023-01-01/webapps/method_getonedeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetOneDeployStatus(ctx context.Context, id commonids.AppS var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go b/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go index 3a5194b7b4b..cab1e802f61 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go +++ b/resource-manager/web/2023-01-01/webapps/method_getpremieraddon.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOn(ctx context.Context, id PremierAddonId) ( var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go b/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go index 56055107545..b18d56f259b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getpremieraddonslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go b/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go index dce43e8e8df..a475aa2c107 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivateaccess.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateAccess(ctx context.Context, id commonids.AppSer var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go b/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go index bfb25e1f581..5ca04dcfd35 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivateaccessslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateAccessSlot(ctx context.Context, id SlotId) (res var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go b/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go index 26c7871fbbf..078deb2c24a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, id Priv var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go index 9c25a41677f..dc1da065c8f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivateendpointconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go b/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go index 667be0c0c72..7a0922f7157 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateLinkResources(ctx context.Context, id commonids var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go b/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go index d2b79716d14..3dc2ee16463 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprivatelinkresourcesslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, id SlotI var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocess.go b/resource-manager/web/2023-01-01/webapps/method_getprocess.go index 42442c0b292..f53ec86fa97 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocess.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcess(ctx context.Context, id ProcessId) (result Get var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go b/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go index e4ed77f79f6..4aa575213d9 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDump(ctx context.Context, id ProcessId) (result var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go b/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go index c46e7a62c3d..b904b54a53d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDumpSlot(ctx context.Context, id SlotProcessId) var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go b/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go index b69821fe4ba..84621827e5b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModule(ctx context.Context, id ModuleId) (resul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go b/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go index 6e1e3d05fc7..eb70f4f6077 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModuleSlot(ctx context.Context, id ProcessModul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go b/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go index 6d688c86119..125ebe5550c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessSlot(ctx context.Context, id SlotProcessId) (re var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go b/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go index 294c7a1c1cd..d2b18926090 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go +++ b/resource-manager/web/2023-01-01/webapps/method_getpubliccertificate.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificate(ctx context.Context, id PublicCertif var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go b/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go index 20a409afcce..81a159edd9f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getpubliccertificateslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificateSlot(ctx context.Context, id SlotPubl var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go b/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go index e709d3033c4..279bcaac0fc 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnection(ctx context.Context, id HybridC var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go index 5cf0fc7ce2e..8260c31d4d5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getrelayserviceconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, id Slo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go b/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go index 588b11ec267..9b0418a2f0f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go +++ b/resource-manager/web/2023-01-01/webapps/method_getscmallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetScmAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go b/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go index 3dd063f8aca..53a7a3a2331 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getscmallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetScmAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go b/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go index 547724012d7..aff9e649a27 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Cont var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go b/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go index ae2b9b61258..9cd169fbf00 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context. var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go b/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go index e4a475e766d..0a6945f3b7d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsiteextension.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtension(ctx context.Context, id SiteExtensionId) var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go b/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go index 1bae54da3e3..e54acbb50ef 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsiteextensionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtensionSlot(ctx context.Context, id SlotSiteExte var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go b/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go index 7f2d3f3ddd0..63dbaae3ef5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflag.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, id commonids. var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go b/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go index 170b11be7bc..4476bb15496 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsitephperrorlogflagslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, id SlotId var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getslot.go b/resource-manager/web/2023-01-01/webapps/method_getslot.go index fd2c98b535c..96f47332251 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSlot(ctx context.Context, id SlotId) (result GetSlotOp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go b/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go index 7679f9feaf0..8f1380fc15a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsourcecontrol.go @@ -49,7 +49,6 @@ func (c WebAppsClient) GetSourceControl(ctx context.Context, id commonids.AppSer var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go b/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go index d06bb3ad906..59f28a81eeb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getsourcecontrolslot.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetSourceControlSlot(ctx context.Context, id SlotId) (res var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go b/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go index 1914aa45261..8d24a59f9ff 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnection.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, id var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go index 8f25ed183cf..c94d3312298 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getswiftvirtualnetworkconnectionslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go index fa85150bc22..f408fb21bb1 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go +++ b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJob(ctx context.Context, id TriggeredWebJo var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go index 25d867bd171..d8dac67561f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go +++ b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistory.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, id History var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go index da1075c7ef8..db0ae2aa46c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobhistoryslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, id Tri var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go index df601d6b8e0..9d5fdbad976 100644 --- a/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_gettriggeredwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, id SlotTrigge var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go b/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go index 8cbb17041d9..4568fe01196 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_getvnetconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnection(ctx context.Context, id VirtualNetworkC var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go index d7147b08b2f..71c79ea8c65 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go +++ b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongateway.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGateway(ctx context.Context, id GatewayI var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go index e3f7ab94a05..7abcca7f5ab 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectiongatewayslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, id Slot var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go index 225b53b1c19..d212cb00170 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getvnetconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionSlot(ctx context.Context, id SlotVirtual var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getwebjob.go b/resource-manager/web/2023-01-01/webapps/method_getwebjob.go index 1544e50a120..283a114229d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getwebjob.go +++ b/resource-manager/web/2023-01-01/webapps/method_getwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJob(ctx context.Context, id WebJobId) (result GetWe var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go b/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go index 12438b92757..e1b57da034c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJobSlot(ctx context.Context, id SlotWebJobId) (resu var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go b/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go index a78a69fc9be..b663861a930 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go +++ b/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogs.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, id commonids var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go b/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go index 6ab570eb78f..6446530d54e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_getwebsitecontainerlogsslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, id SlotI var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_getworkflow.go b/resource-manager/web/2023-01-01/webapps/method_getworkflow.go index 6bc23af103f..5588ed7e61d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_getworkflow.go +++ b/resource-manager/web/2023-01-01/webapps/method_getworkflow.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWorkflow(ctx context.Context, id WorkflowId) (result G var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_iscloneable.go b/resource-manager/web/2023-01-01/webapps/method_iscloneable.go index 1dc89371c3b..0603d8f018e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_iscloneable.go +++ b/resource-manager/web/2023-01-01/webapps/method_iscloneable.go @@ -47,7 +47,6 @@ func (c WebAppsClient) IsCloneable(ctx context.Context, id commonids.AppServiceI var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go b/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go index c28faba968a..e971d3c63e4 100644 --- a/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_iscloneableslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) IsCloneableSlot(ctx context.Context, id SlotId) (result I var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go b/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go index 2fe6d0b596f..ce70c9042fa 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_listapplicationsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListApplicationSettings(ctx context.Context, id commonids var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go index afbe704c229..7eefeaa0feb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listapplicationsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, id SlotI var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go b/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go index 022ded5e7f4..bc513083273 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go +++ b/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccounts.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListAzureStorageAccounts(ctx context.Context, id commonid var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go b/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go index 1ae48f64d6f..c5a1cd2c3ab 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listazurestorageaccountsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, id Slot var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go b/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go index 3334a5ea20b..31d9021a61b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go +++ b/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecrets.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecrets(ctx context.Context, id BackupId, var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go b/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go index 36a85d16ed5..ddc128b594c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listbackupstatussecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, id SlotB var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go b/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go index 3f9b2569d77..0453dace48d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go +++ b/resource-manager/web/2023-01-01/webapps/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go b/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go index dedfccfc4dc..64554b4fd90 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go +++ b/resource-manager/web/2023-01-01/webapps/method_listconnectionstrings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListConnectionStrings(ctx context.Context, id commonids.A var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go b/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go index 3498220d398..4f5c82268e8 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listconnectionstringsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListConnectionStringsSlot(ctx context.Context, id SlotId) var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go b/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go index 35f887d50ed..c08913fb632 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go +++ b/resource-manager/web/2023-01-01/webapps/method_listdeploymentlog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLog(ctx context.Context, id DeploymentId) ( var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go b/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go index 570627468c5..ac50302c638 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listdeploymentlogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLogSlot(ctx context.Context, id SlotDeploym var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go b/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go index 7bd6682f1cc..8408b4dae45 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go +++ b/resource-manager/web/2023-01-01/webapps/method_listfunctionkeys.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeys(ctx context.Context, id FunctionId) (res var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go b/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go index 77aae0aaf70..08a6e0172a6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listfunctionkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeysSlot(ctx context.Context, id SlotFunction var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go b/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go index 3f26b8322db..45eb50cf982 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go +++ b/resource-manager/web/2023-01-01/webapps/method_listfunctionsecrets.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecrets(ctx context.Context, id FunctionId) ( var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go b/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go index a8354756f45..15de188c3d5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listfunctionsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, id SlotFunct var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go b/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go index 64dcbd8bfb6..fabdace3a5d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go +++ b/resource-manager/web/2023-01-01/webapps/method_listhostkeys.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHostKeys(ctx context.Context, id commonids.AppService var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go b/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go index af23867eada..750e7a12832 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listhostkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHostKeysSlot(ctx context.Context, id SlotId) (result var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go b/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go index 08364fcb2af..0aea9bb9d04 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go +++ b/resource-manager/web/2023-01-01/webapps/method_listhybridconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHybridConnections(ctx context.Context, id commonids.A var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go b/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go index 7508c1275e5..d6ec6a8ec2b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listhybridconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, id SlotId) var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listmetadata.go b/resource-manager/web/2023-01-01/webapps/method_listmetadata.go index ecb2e7ae7da..8998ba62c0d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listmetadata.go +++ b/resource-manager/web/2023-01-01/webapps/method_listmetadata.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListMetadata(ctx context.Context, id commonids.AppService var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go b/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go index f392f8f6086..b2dcfca269d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listmetadataslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListMetadataSlot(ctx context.Context, id SlotId) (result var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go b/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go index 5cd439a53af..fde1a7c3d73 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go +++ b/resource-manager/web/2023-01-01/webapps/method_listnetworkfeatures.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeatures(ctx context.Context, id NetworkFeatur var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go b/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go index 41badd13da9..c91b5baede0 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listnetworkfeaturesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, id SlotNetwo var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go b/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go index 3e795219b6f..ab98305afda 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go +++ b/resource-manager/web/2023-01-01/webapps/method_listperfmoncounters.go @@ -40,6 +40,7 @@ func (o ListPerfMonCountersOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go b/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go index 3a2754f799e..b82ebb85e22 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listperfmoncountersslot.go @@ -39,6 +39,7 @@ func (o ListPerfMonCountersSlotOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go b/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go index 0215cabcf57..b11bf4233c3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go +++ b/resource-manager/web/2023-01-01/webapps/method_listpremieraddons.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListPremierAddOns(ctx context.Context, id commonids.AppSe var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go b/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go index 044b2912f5a..73dbf683ae9 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listpremieraddonsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, id SlotId) (re var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go b/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go index 7da7da0b23c..07b6308ca62 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go +++ b/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecrets.go @@ -51,7 +51,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecrets(ctx context.Context, var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go b/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go index 2a4701423fd..7f32d269123 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecretsSlot(ctx context.Conte var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go b/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go index d7e18cd89e8..de929a519e3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go +++ b/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListRelayServiceConnections(ctx context.Context, id commo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go b/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go index 1f4ad19a8c9..56b6752c72f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listrelayserviceconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, id S var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go b/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go index c62e23599bc..99b7cd099b7 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsitepushsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSitePushSettings(ctx context.Context, id commonids.Ap var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go index c68fba350a3..38b18425808 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsitepushsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, id SlotId) var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go b/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go index 06953e01e3f..ccfa9dc0e21 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go +++ b/resource-manager/web/2023-01-01/webapps/method_listslotconfigurationnames.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSlotConfigurationNames(ctx context.Context, id common var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go b/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go index e92a5874991..3ba753d99a5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggers.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, id commonid var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go b/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go index e00d4fd2f39..87112ea8e9a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listsyncfunctiontriggersslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, id Slot var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listusages.go b/resource-manager/web/2023-01-01/webapps/method_listusages.go index 6a245dab93f..09825b54c80 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listusages.go +++ b/resource-manager/web/2023-01-01/webapps/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go b/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go index cbcbac0a262..0f5459ebad6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listusagesslot.go @@ -39,6 +39,7 @@ func (o ListUsagesSlotOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go b/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go index 72289ddc25f..9257086d2e2 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go +++ b/resource-manager/web/2023-01-01/webapps/method_listvnetconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListVnetConnections(ctx context.Context, id commonids.App var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go b/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go index 8018d954faf..942cd6b0476 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listvnetconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, id SlotId) ( var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go b/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go index 05c1769e6c4..4c7d04686ac 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go +++ b/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListWorkflowsConnections(ctx context.Context, id commonid var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go b/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go index b1319800e9b..b85e7a72003 100644 --- a/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_listworkflowsconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, id Slot var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_migratestorage.go b/resource-manager/web/2023-01-01/webapps/method_migratestorage.go index f59a0b4a276..1fb58c4f795 100644 --- a/resource-manager/web/2023-01-01/webapps/method_migratestorage.go +++ b/resource-manager/web/2023-01-01/webapps/method_migratestorage.go @@ -38,6 +38,7 @@ func (o MigrateStorageOperationOptions) ToHeaders() *client.Headers { func (o MigrateStorageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go b/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go index 63ec49104fc..419ea335744 100644 --- a/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go +++ b/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnet.go @@ -51,7 +51,6 @@ func (c WebAppsClient) PutPrivateAccessVnet(ctx context.Context, id commonids.Ap var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go b/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go index 465f0eb8449..a2031d0024b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_putprivateaccessvnetslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, id SlotId, var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_restart.go b/resource-manager/web/2023-01-01/webapps/method_restart.go index 4634c74caa7..47d9224417a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_restart.go +++ b/resource-manager/web/2023-01-01/webapps/method_restart.go @@ -35,6 +35,7 @@ func (o RestartOperationOptions) ToHeaders() *client.Headers { func (o RestartOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_restartslot.go b/resource-manager/web/2023-01-01/webapps/method_restartslot.go index 28902482a9c..ca81876358d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_restartslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_restartslot.go @@ -34,6 +34,7 @@ func (o RestartSlotOperationOptions) ToHeaders() *client.Headers { func (o RestartSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go b/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go index fa037fe2276..de35cae8c37 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go +++ b/resource-manager/web/2023-01-01/webapps/method_startnetworktrace.go @@ -40,6 +40,7 @@ func (o StartNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go b/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go index 8390b0d5feb..f4ecbb2878c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_startnetworktraceslot.go @@ -39,6 +39,7 @@ func (o StartNetworkTraceSlotOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go index 8ca69360afe..c4aceaac67a 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go +++ b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktrace.go @@ -37,6 +37,7 @@ func (o StartWebSiteNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartWebSiteNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, id commonid var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go index 9fd9a12487f..c2f83e72964 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go +++ b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperation.go @@ -40,6 +40,7 @@ func (o StartWebSiteNetworkTraceOperationOperationOptions) ToHeaders() *client.H func (o StartWebSiteNetworkTraceOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go index 73249d3a29a..ceb485a4310 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceoperationslot.go @@ -39,6 +39,7 @@ func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToHeaders() *clie func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go index 697b0f20648..488181959e2 100644 --- a/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_startwebsitenetworktraceslot.go @@ -36,6 +36,7 @@ func (o StartWebSiteNetworkTraceSlotOperationOptions) ToHeaders() *client.Header func (o StartWebSiteNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, id Slot var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_update.go b/resource-manager/web/2023-01-01/webapps/method_update.go index ed1ba13fa40..ce51465dd90 100644 --- a/resource-manager/web/2023-01-01/webapps/method_update.go +++ b/resource-manager/web/2023-01-01/webapps/method_update.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Update(ctx context.Context, id commonids.AppServiceId, in var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go b/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go index f60ab8838c9..a6abe2e7f9f 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateApplicationSettings(ctx context.Context, id commoni var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go index b0382487cf8..dabaad9a1bb 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateapplicationsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, id Slo var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go b/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go index ff363074bef..c4721b446e6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateauthsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettings(ctx context.Context, id commonids.AppS var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go index 434d233bfd4..efd12302a3c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, id SlotId, in var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go index d4fce76e8de..630b45422db 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, id commonids.Ap var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go index e6ea9a8b1ee..6e054358fe5 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateauthsettingsv2slot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, id SlotId, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go b/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go index a3ae2d6b3c9..bbda87f586c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccounts.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, id common var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go b/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go index 16e730b1e99..de67b3d4cff 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateazurestorageaccountsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, id Sl var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go index b8bf6ec24e8..eadd42c46b4 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatebackupconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateBackupConfiguration(ctx context.Context, id commoni var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go index 74c8ef4b5e2..6cc6c0db6dd 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatebackupconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, id Slo var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go b/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go index ace56a0e15a..540effb8493 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConfiguration(ctx context.Context, id commonids.App var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go b/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go index 6909e91308f..2b8a3c837d6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConfigurationSlot(ctx context.Context, id SlotId, i var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go b/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go index 7d97ab27e33..e2583e323f7 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateconnectionstrings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConnectionStrings(ctx context.Context, id commonids var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go b/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go index 197d01fa963..02c8aab1742 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateconnectionstringsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, id SlotI var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go b/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go index 8885b9ada96..3fd9dd8089b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfig.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, id common var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go b/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go index 7e46415c0a9..76e26082497 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatediagnosticlogsconfigslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, id Sl var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go b/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go index e2f684a8ec6..e9926b92e04 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, id D var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go b/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go index 118cec095ff..8bfd226892c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go b/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go index d8b2976c309..fb80df44e08 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateftpallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateFtpAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go b/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go index 5e3125acabb..8600093e952 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateftpallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go b/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go index 3641ff27936..14d186263b3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnection(ctx context.Context, id RelayId, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go index 51cc1d0206d..8136fefe9af 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, id SlotHy var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go b/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go index e5e463a2656..55294309b86 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatemetadata.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateMetadata(ctx context.Context, id commonids.AppServi var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go b/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go index 7f24c677cda..99995876e7c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatemetadataslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateMetadataSlot(ctx context.Context, id SlotId, input var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go b/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go index 283da43f6b9..dcd3c9b2a8b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatepremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOn(ctx context.Context, id PremierAddonId var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go b/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go index a37e30d7c27..e1c27a4d55e 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatepremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, id SlotPremie var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go b/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go index 3c8dfb4108d..cd611e9ec20 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, id Hybr var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go index fca0b74fb39..c24d82100f8 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, id var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go b/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go index 0be20463210..120d3629001 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatescmallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateScmAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go b/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go index f124b6f3526..a3243abfa63 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatescmallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go b/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go index 20b493aae8c..668665c05d4 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSitePushSettings(ctx context.Context, id commonids. var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go b/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go index 774c0e26cbd..09988246b8c 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatesitepushsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, id SlotId var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateslot.go b/resource-manager/web/2023-01-01/webapps/method_updateslot.go index d7a0e90cd61..82afe00eea3 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSlot(ctx context.Context, id SlotId, input SitePatc var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go b/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go index f4f5b05b966..8eb1665dd4d 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateslotconfigurationnames.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, id comm var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go b/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go index 792bf5a462b..a9b4d29999b 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrol.go @@ -53,7 +53,6 @@ func (c WebAppsClient) UpdateSourceControl(ctx context.Context, id commonids.App var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go b/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go index 5d25563b5d0..27063f72815 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatesourcecontrolslot.go @@ -52,7 +52,6 @@ func (c WebAppsClient) UpdateSourceControlSlot(ctx context.Context, id SlotId, i var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go index b54e54b619e..1ed44d1b945 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context. var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go index 48bbaa559c8..86d0e38f499 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx cont var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go index 987cb8fbff7..d24ddba2035 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnection(ctx context.Context, id VirtualNetwo var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go index dd57888f81e..710e26ab2d6 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, id Gatew var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go index 1be5209f364..e292d9dd430 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, id S var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go index c076ea62f81..1ce4e92a640 100644 --- a/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go +++ b/resource-manager/web/2023-01-01/webapps/method_updatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, id SlotVirt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/webapps/version.go b/resource-manager/web/2023-01-01/webapps/version.go index 71c919c2360..f0ae3f1751c 100644 --- a/resource-manager/web/2023-01-01/webapps/version.go +++ b/resource-manager/web/2023-01-01/webapps/version.go @@ -1,12 +1,10 @@ package webapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapps/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/README.md b/resource-manager/web/2023-01-01/workflowrunactions/README.md index 850ae2ba940..cb1ae2419db 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/README.md +++ b/resource-manager/web/2023-01-01/workflowrunactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflowrunactions` Documentation -The `workflowrunactions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflowrunactions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflowrunactions/client.go b/resource-manager/web/2023-01-01/workflowrunactions/client.go index 75492551c09..463cc06a5f9 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/client.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/client.go @@ -15,7 +15,7 @@ type WorkflowRunActionsClient struct { } func NewWorkflowRunActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowrunactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowrunactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunActionsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/id_action.go b/resource-manager/web/2023-01-01/workflowrunactions/id_action.go index e8b0fe5a8c1..d6e5590e6b7 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/id_action.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/id_action.go @@ -48,7 +48,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/id_repetition.go b/resource-manager/web/2023-01-01/workflowrunactions/id_repetition.go index e546f29fa0c..f822c62b0b6 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/id_repetition.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/id_repetition.go @@ -50,7 +50,7 @@ func ParseRepetitionID(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/id_requesthistory.go b/resource-manager/web/2023-01-01/workflowrunactions/id_requesthistory.go index 2425ea99f3c..0240038e5ce 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/id_requesthistory.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/id_requesthistory.go @@ -52,7 +52,7 @@ func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/id_run.go b/resource-manager/web/2023-01-01/workflowrunactions/id_run.go index 3d1f8970278..5e64d944ef3 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/id_run.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/id_scoperepetition.go b/resource-manager/web/2023-01-01/workflowrunactions/id_scoperepetition.go index effb962622b..0d47f7e4f39 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/id_scoperepetition.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/id_scoperepetition.go @@ -50,7 +50,7 @@ func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, erro } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_coperepetitionsget.go b/resource-manager/web/2023-01-01/workflowrunactions/method_coperepetitionsget.go index f767e43bd99..f860d0462b4 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_coperepetitionsget.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_coperepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) CopeRepetitionsGet(ctx context.Context, id Sco var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_get.go b/resource-manager/web/2023-01-01/workflowrunactions/method_get.go index 83af4ca8829..c86b02f4ca2 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_get.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) Get(ctx context.Context, id ActionId) (result var model WorkflowRunAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_list.go b/resource-manager/web/2023-01-01/workflowrunactions/method_list.go index 532e550d8d0..084239bb128 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_list.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsget.go b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsget.go index ecac4315b0f..eb39d17169e 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsget.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsGet(ctx context.Co var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go index 41bb4f82cb2..67800134834 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesGe var model RequestHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowrunactions/version.go b/resource-manager/web/2023-01-01/workflowrunactions/version.go index e876b986f41..5badd0f56c6 100644 --- a/resource-manager/web/2023-01-01/workflowrunactions/version.go +++ b/resource-manager/web/2023-01-01/workflowrunactions/version.go @@ -1,12 +1,10 @@ package workflowrunactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowrunactions/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflowruns/README.md b/resource-manager/web/2023-01-01/workflowruns/README.md index 8c1ba4aa1d2..3dc566e3e05 100644 --- a/resource-manager/web/2023-01-01/workflowruns/README.md +++ b/resource-manager/web/2023-01-01/workflowruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflowruns` Documentation -The `workflowruns` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflowruns` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflowruns/client.go b/resource-manager/web/2023-01-01/workflowruns/client.go index e41dae0872b..73a34bf9d60 100644 --- a/resource-manager/web/2023-01-01/workflowruns/client.go +++ b/resource-manager/web/2023-01-01/workflowruns/client.go @@ -15,7 +15,7 @@ type WorkflowRunsClient struct { } func NewWorkflowRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflowruns/id_managementworkflow.go b/resource-manager/web/2023-01-01/workflowruns/id_managementworkflow.go index 7750de61f4e..edf5bdfdcfa 100644 --- a/resource-manager/web/2023-01-01/workflowruns/id_managementworkflow.go +++ b/resource-manager/web/2023-01-01/workflowruns/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowruns/id_run.go b/resource-manager/web/2023-01-01/workflowruns/id_run.go index 9117bf15feb..8de1b9a52f1 100644 --- a/resource-manager/web/2023-01-01/workflowruns/id_run.go +++ b/resource-manager/web/2023-01-01/workflowruns/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowruns/method_get.go b/resource-manager/web/2023-01-01/workflowruns/method_get.go index 6ee3078a7f7..17d61b2a5b1 100644 --- a/resource-manager/web/2023-01-01/workflowruns/method_get.go +++ b/resource-manager/web/2023-01-01/workflowruns/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunsClient) Get(ctx context.Context, id RunId) (result GetOperat var model WorkflowRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowruns/method_list.go b/resource-manager/web/2023-01-01/workflowruns/method_list.go index b2188f33e6d..01f6d279698 100644 --- a/resource-manager/web/2023-01-01/workflowruns/method_list.go +++ b/resource-manager/web/2023-01-01/workflowruns/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/workflowruns/version.go b/resource-manager/web/2023-01-01/workflowruns/version.go index 7a08815efa6..6505e5a4f3f 100644 --- a/resource-manager/web/2023-01-01/workflowruns/version.go +++ b/resource-manager/web/2023-01-01/workflowruns/version.go @@ -1,12 +1,10 @@ package workflowruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowruns/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflows/README.md b/resource-manager/web/2023-01-01/workflows/README.md index 36a4caed9d1..9bfec828035 100644 --- a/resource-manager/web/2023-01-01/workflows/README.md +++ b/resource-manager/web/2023-01-01/workflows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflows` Documentation -The `workflows` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflows` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflows/client.go b/resource-manager/web/2023-01-01/workflows/client.go index e036e0f1d48..46648dbfe97 100644 --- a/resource-manager/web/2023-01-01/workflows/client.go +++ b/resource-manager/web/2023-01-01/workflows/client.go @@ -15,7 +15,7 @@ type WorkflowsClient struct { } func NewWorkflowsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflows/id_managementworkflow.go b/resource-manager/web/2023-01-01/workflows/id_managementworkflow.go index bded96b67f7..edfe867dd0a 100644 --- a/resource-manager/web/2023-01-01/workflows/id_managementworkflow.go +++ b/resource-manager/web/2023-01-01/workflows/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflows/version.go b/resource-manager/web/2023-01-01/workflows/version.go index d31687031e8..31b9f78bf1f 100644 --- a/resource-manager/web/2023-01-01/workflows/version.go +++ b/resource-manager/web/2023-01-01/workflows/version.go @@ -1,12 +1,10 @@ package workflows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflows/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/README.md b/resource-manager/web/2023-01-01/workflowtriggerhistories/README.md index 7623a6e3b9f..8f80465c1d6 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/README.md +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflowtriggerhistories` Documentation -The `workflowtriggerhistories` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflowtriggerhistories` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/client.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/client.go index fc4b05de0ba..e1a3815134e 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/client.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/client.go @@ -15,7 +15,7 @@ type WorkflowTriggerHistoriesClient struct { } func NewWorkflowTriggerHistoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggerHistoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggerHistoriesClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/id_trigger.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/id_trigger.go index 66c61b8d260..70d9c879379 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/id_trigger.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/id_triggerhistory.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/id_triggerhistory.go index f69ef638db4..6875b7ef985 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/id_triggerhistory.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/id_triggerhistory.go @@ -48,7 +48,7 @@ func ParseTriggerHistoryID(input string) (*TriggerHistoryId, error) { } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerHistoryIDInsensitively(input string) (*TriggerHistoryId, error) } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/method_get.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/method_get.go index 321b09eec4f..25ba7f1b42f 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/method_get.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggerHistoriesClient) Get(ctx context.Context, id TriggerHisto var model WorkflowTriggerHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/method_list.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/method_list.go index 9737ffdb68c..fa03f7faa25 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/method_list.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/workflowtriggerhistories/version.go b/resource-manager/web/2023-01-01/workflowtriggerhistories/version.go index 24ed8f8315a..656a134e465 100644 --- a/resource-manager/web/2023-01-01/workflowtriggerhistories/version.go +++ b/resource-manager/web/2023-01-01/workflowtriggerhistories/version.go @@ -1,12 +1,10 @@ package workflowtriggerhistories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggerhistories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggerhistories/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/README.md b/resource-manager/web/2023-01-01/workflowtriggers/README.md index 766a37db94d..3e30c4dc391 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/README.md +++ b/resource-manager/web/2023-01-01/workflowtriggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflowtriggers` Documentation -The `workflowtriggers` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflowtriggers` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflowtriggers/client.go b/resource-manager/web/2023-01-01/workflowtriggers/client.go index 4788e395649..06e7b704ecf 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/client.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/client.go @@ -15,7 +15,7 @@ type WorkflowTriggersClient struct { } func NewWorkflowTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggersClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/id_managementworkflow.go b/resource-manager/web/2023-01-01/workflowtriggers/id_managementworkflow.go index 6c04d3a8fa8..84b6b3b2a1b 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/id_managementworkflow.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/id_trigger.go b/resource-manager/web/2023-01-01/workflowtriggers/id_trigger.go index aacc113189c..759041672ee 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/id_trigger.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/method_get.go b/resource-manager/web/2023-01-01/workflowtriggers/method_get.go index 6ff7e339030..d1bcd504fe2 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/method_get.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggersClient) Get(ctx context.Context, id TriggerId) (result G var model WorkflowTrigger result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/method_getschemajson.go b/resource-manager/web/2023-01-01/workflowtriggers/method_getschemajson.go index 286934bd0ea..c26d831b302 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/method_getschemajson.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/method_getschemajson.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) GetSchemaJson(ctx context.Context, id TriggerId) var model JsonSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/method_list.go b/resource-manager/web/2023-01-01/workflowtriggers/method_list.go index 0f1c596b80c..e311d6393de 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/method_list.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/method_listcallbackurl.go b/resource-manager/web/2023-01-01/workflowtriggers/method_listcallbackurl.go index 5f6d581c207..7e44f7f9763 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/method_listcallbackurl.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/method_listcallbackurl.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) ListCallbackUrl(ctx context.Context, id TriggerI var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowtriggers/version.go b/resource-manager/web/2023-01-01/workflowtriggers/version.go index 536fb1999ef..f5f11cfefe8 100644 --- a/resource-manager/web/2023-01-01/workflowtriggers/version.go +++ b/resource-manager/web/2023-01-01/workflowtriggers/version.go @@ -1,12 +1,10 @@ package workflowtriggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggers/2023-01-01" } diff --git a/resource-manager/web/2023-01-01/workflowversions/README.md b/resource-manager/web/2023-01-01/workflowversions/README.md index 060b6553ddd..5d99e4c9b2a 100644 --- a/resource-manager/web/2023-01-01/workflowversions/README.md +++ b/resource-manager/web/2023-01-01/workflowversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-01-01/workflowversions` Documentation -The `workflowversions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-01-01`). +The `workflowversions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-01-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-01-01/workflowversions/client.go b/resource-manager/web/2023-01-01/workflowversions/client.go index 8a0b4fbb7be..b569325e0f3 100644 --- a/resource-manager/web/2023-01-01/workflowversions/client.go +++ b/resource-manager/web/2023-01-01/workflowversions/client.go @@ -15,7 +15,7 @@ type WorkflowVersionsClient struct { } func NewWorkflowVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowVersionsClient: %+v", err) } diff --git a/resource-manager/web/2023-01-01/workflowversions/id_managementworkflow.go b/resource-manager/web/2023-01-01/workflowversions/id_managementworkflow.go index 2c77e05839a..509e0f12494 100644 --- a/resource-manager/web/2023-01-01/workflowversions/id_managementworkflow.go +++ b/resource-manager/web/2023-01-01/workflowversions/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowversions/id_version.go b/resource-manager/web/2023-01-01/workflowversions/id_version.go index c08f6c0a48d..bbebe47b158 100644 --- a/resource-manager/web/2023-01-01/workflowversions/id_version.go +++ b/resource-manager/web/2023-01-01/workflowversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-01-01/workflowversions/method_get.go b/resource-manager/web/2023-01-01/workflowversions/method_get.go index f0742aafdc1..f2ae2ecca09 100644 --- a/resource-manager/web/2023-01-01/workflowversions/method_get.go +++ b/resource-manager/web/2023-01-01/workflowversions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowVersionsClient) Get(ctx context.Context, id VersionId) (result G var model WorkflowVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-01-01/workflowversions/method_list.go b/resource-manager/web/2023-01-01/workflowversions/method_list.go index a70d4657650..05d795dfb2d 100644 --- a/resource-manager/web/2023-01-01/workflowversions/method_list.go +++ b/resource-manager/web/2023-01-01/workflowversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-01-01/workflowversions/version.go b/resource-manager/web/2023-01-01/workflowversions/version.go index 696ff50d8cf..348f7dd76e3 100644 --- a/resource-manager/web/2023-01-01/workflowversions/version.go +++ b/resource-manager/web/2023-01-01/workflowversions/version.go @@ -1,12 +1,10 @@ package workflowversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-01-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowversions/2023-01-01" } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/README.md b/resource-manager/web/2023-12-01/appservicecertificateorders/README.md index 3853972067b..776c2992472 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/README.md +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appservicecertificateorders` Documentation -The `appservicecertificateorders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `appservicecertificateorders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/client.go b/resource-manager/web/2023-12-01/appservicecertificateorders/client.go index 06d6b4e2962..a4c0860883e 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/client.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/client.go @@ -15,7 +15,7 @@ type AppServiceCertificateOrdersClient struct { } func NewAppServiceCertificateOrdersClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceCertificateOrdersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appservicecertificateorders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appservicecertificateorders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceCertificateOrdersClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificate.go b/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificate.go index e1678574f38..1cfbd9818b8 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificate.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificate.go @@ -44,7 +44,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificateorder.go b/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificateorder.go index 7f0356716b2..40a1673c4a0 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificateorder.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_get.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_get.go index b4df83fdd65..452a170346a 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_get.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_get.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) Get(ctx context.Context, id Certifica var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_getcertificate.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_getcertificate.go index 45675824b49..0418d289349 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_getcertificate.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_getcertificate.go @@ -45,7 +45,6 @@ func (c AppServiceCertificateOrdersClient) GetCertificate(ctx context.Context, i var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateactions.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateactions.go index 306f696af31..51a8af70e7f 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateactions.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateactions.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateActions(ctx contex var model []CertificateOrderAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateemailhistory.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateemailhistory.go index 7fc5e4324d7..84feccdb804 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateemailhistory.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievecertificateemailhistory.go @@ -46,7 +46,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistory(ctx c var model []CertificateEmail result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievesiteseal.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievesiteseal.go index d84e5f86511..160d1b5010b 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievesiteseal.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_retrievesiteseal.go @@ -50,7 +50,6 @@ func (c AppServiceCertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, var model SiteSeal result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_update.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_update.go index 999e03e24ae..cebc44fbccc 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_update.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_update.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) Update(ctx context.Context, id Certif var model AppServiceCertificateOrder result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/method_updatecertificate.go b/resource-manager/web/2023-12-01/appservicecertificateorders/method_updatecertificate.go index b94998c44aa..8ebfd637ea5 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/method_updatecertificate.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/method_updatecertificate.go @@ -49,7 +49,6 @@ func (c AppServiceCertificateOrdersClient) UpdateCertificate(ctx context.Context var model AppServiceCertificateResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appservicecertificateorders/version.go b/resource-manager/web/2023-12-01/appservicecertificateorders/version.go index e17da3ea23a..5f031a717f6 100644 --- a/resource-manager/web/2023-12-01/appservicecertificateorders/version.go +++ b/resource-manager/web/2023-12-01/appservicecertificateorders/version.go @@ -1,12 +1,10 @@ package appservicecertificateorders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appservicecertificateorders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appservicecertificateorders/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/README.md b/resource-manager/web/2023-12-01/appserviceenvironments/README.md index d55dae3816f..2d354169f19 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/README.md +++ b/resource-manager/web/2023-12-01/appserviceenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceenvironments` Documentation -The `appserviceenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `appserviceenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/client.go b/resource-manager/web/2023-12-01/appserviceenvironments/client.go index b9c0ff155f6..706ca7d556d 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/client.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/client.go @@ -15,7 +15,7 @@ type AppServiceEnvironmentsClient struct { } func NewAppServiceEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServiceEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServiceEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/id_defaultinstance.go b/resource-manager/web/2023-12-01/appserviceenvironments/id_defaultinstance.go index 5636848009c..5d4e58b6ec5 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/id_defaultinstance.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/id_defaultinstance.go @@ -44,7 +44,7 @@ func ParseDefaultInstanceID(input string) (*DefaultInstanceId, error) { } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDefaultInstanceIDInsensitively(input string) (*DefaultInstanceId, erro } id := DefaultInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go b/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go index feeb735318a..a57a42cd9c7 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentdiagnostic.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDiagnosticID(input string) (*HostingEnvironmentDiagn } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDiagnosticIDInsensitively(input string) (*HostingEnv } id := HostingEnvironmentDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go b/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go index bbba42867e3..d470b108670 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/id_hostingenvironmentprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionID(input string) (*HostingE } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentPrivateEndpointConnectionIDInsensitively(input strin } id := HostingEnvironmentPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpool.go b/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpool.go index 463fca27669..5245cac292e 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpool.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpool.go @@ -44,7 +44,7 @@ func ParseWorkerPoolID(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerPoolIDInsensitively(input string) (*WorkerPoolId, error) { } id := WorkerPoolId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpoolinstance.go b/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpoolinstance.go index 0bf747795a2..02141e0cf14 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpoolinstance.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/id_workerpoolinstance.go @@ -46,7 +46,7 @@ func ParseWorkerPoolInstanceID(input string) (*WorkerPoolInstanceId, error) { } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWorkerPoolInstanceIDInsensitively(input string) (*WorkerPoolInstanceId } id := WorkerPoolInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_delete.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_delete.go index 55cf71e5108..f8fb37d265b 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_delete.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_delete.go @@ -37,6 +37,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go index 911c456e29b..c5871258555 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_deleteasecustomdnssuffixconfiguration.go @@ -48,7 +48,6 @@ func (c AppServiceEnvironmentsClient) DeleteAseCustomDnsSuffixConfiguration(ctx var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_get.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_get.go index 2e5e2bb0d14..19b2bdb044f 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_get.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_get.go @@ -46,7 +46,6 @@ func (c AppServiceEnvironmentsClient) Get(ctx context.Context, id commonids.AppS var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go index 9be53936c71..01f38db8a6e 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getasecustomdnssuffixconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseCustomDnsSuffixConfiguration(ctx con var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getasev3networkingconfiguration.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getasev3networkingconfiguration.go index 1ca5a50286f..3815d5e3c5e 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getasev3networkingconfiguration.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getasev3networkingconfiguration.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetAseV3NetworkingConfiguration(ctx contex var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getdiagnosticsitem.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getdiagnosticsitem.go index b6d0e47a783..681cc63213c 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getdiagnosticsitem.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getdiagnosticsitem.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetDiagnosticsItem(ctx context.Context, id var model HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getmultirolepool.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getmultirolepool.go index 8823968375d..7cbd25047b9 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getmultirolepool.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getmultirolepool.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetMultiRolePool(ctx context.Context, id c var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivateendpointconnection.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivateendpointconnection.go index 6bf182be11e..714c1276f69 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateEndpointConnection(ctx context.C var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivatelinkresources.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivatelinkresources.go index e0c2f0c4365..ecd193a3901 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetPrivateLinkResources(ctx context.Contex var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getvipinfo.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getvipinfo.go index a0f52038b9c..ef0c4a7c970 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getvipinfo.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getvipinfo.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) GetVipInfo(ctx context.Context, id commoni var model AddressResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_getworkerpool.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_getworkerpool.go index bd617d301a8..f18c4334f8a 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_getworkerpool.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_getworkerpool.go @@ -45,7 +45,6 @@ func (c AppServiceEnvironmentsClient) GetWorkerPool(ctx context.Context, id Work var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_listdiagnostics.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_listdiagnostics.go index 050adc5112e..0b07c6c4a90 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_listdiagnostics.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_listdiagnostics.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListDiagnostics(ctx context.Context, id co var model []HostingEnvironmentDiagnostics result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_listoperations.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_listoperations.go index 49fef987d75..cc96adc214e 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_listoperations.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_listoperations.go @@ -47,7 +47,6 @@ func (c AppServiceEnvironmentsClient) ListOperations(ctx context.Context, id com var model []Operation result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_listusages.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_listusages.go index c12dab87aa4..2fdba17a92e 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_listusages.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_listwebapps.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_listwebapps.go index 6adb4062cbe..2c63e81b80b 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_listwebapps.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_listwebapps.go @@ -40,6 +40,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_update.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_update.go index c3afa9e6f0d..eeba2343384 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_update.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_update.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) Update(ctx context.Context, id commonids.A var model AppServiceEnvironmentResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go index 376d25fe92b..84b44271ed7 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasecustomdnssuffixconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseCustomDnsSuffixConfiguration(ctx var model CustomDnsSuffixConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasenetworkingconfiguration.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasenetworkingconfiguration.go index 0661a11d23d..d215f8021fa 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasenetworkingconfiguration.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateasenetworkingconfiguration.go @@ -51,7 +51,6 @@ func (c AppServiceEnvironmentsClient) UpdateAseNetworkingConfiguration(ctx conte var model AseV3NetworkingConfiguration result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_updatemultirolepool.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_updatemultirolepool.go index d71d810e1d4..22ee8b00991 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_updatemultirolepool.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_updatemultirolepool.go @@ -52,7 +52,6 @@ func (c AppServiceEnvironmentsClient) UpdateMultiRolePool(ctx context.Context, i var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateworkerpool.go b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateworkerpool.go index 85733a6f536..42b61ccc4f7 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/method_updateworkerpool.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/method_updateworkerpool.go @@ -50,7 +50,6 @@ func (c AppServiceEnvironmentsClient) UpdateWorkerPool(ctx context.Context, id W var model WorkerPoolResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceenvironments/version.go b/resource-manager/web/2023-12-01/appserviceenvironments/version.go index 3ee7bc37614..de96a48fec8 100644 --- a/resource-manager/web/2023-12-01/appserviceenvironments/version.go +++ b/resource-manager/web/2023-12-01/appserviceenvironments/version.go @@ -1,12 +1,10 @@ package appserviceenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceenvironments/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/appserviceplans/README.md b/resource-manager/web/2023-12-01/appserviceplans/README.md index 1ca5f17dbf3..f5dcc13c83e 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/README.md +++ b/resource-manager/web/2023-12-01/appserviceplans/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/appserviceplans` Documentation -The `appserviceplans` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `appserviceplans` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/appserviceplans/client.go b/resource-manager/web/2023-12-01/appserviceplans/client.go index 8fe56fbaa27..9afc7d23899 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/client.go +++ b/resource-manager/web/2023-12-01/appserviceplans/client.go @@ -15,7 +15,7 @@ type AppServicePlansClient struct { } func NewAppServicePlansClientWithBaseURI(sdkApi sdkEnv.Api) (*AppServicePlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "appserviceplans", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "appserviceplans", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating AppServicePlansClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go b/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go index 2b32c834b81..58ea2b5a799 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go +++ b/resource-manager/web/2023-12-01/appserviceplans/id_hybridconnectionnamespacerelay.go @@ -46,7 +46,7 @@ func ParseHybridConnectionNamespaceRelayID(input string) (*HybridConnectionNames } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHybridConnectionNamespaceRelayIDInsensitively(input string) (*HybridCo } id := HybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceplans/id_route.go b/resource-manager/web/2023-12-01/appserviceplans/id_route.go index ad716f02546..359ff342f03 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/id_route.go +++ b/resource-manager/web/2023-12-01/appserviceplans/id_route.go @@ -46,7 +46,7 @@ func ParseRouteID(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRouteIDInsensitively(input string) (*RouteId, error) { } id := RouteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go b/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go index 17ab90193a3..b87f1cefc87 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go +++ b/resource-manager/web/2023-12-01/appserviceplans/id_serverfarmvirtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseServerFarmVirtualNetworkConnectionID(input string) (*ServerFarmVirtual } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseServerFarmVirtualNetworkConnectionIDInsensitively(input string) (*Serv } id := ServerFarmVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go b/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go index fd8f8a5724d..795627bdf7f 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go +++ b/resource-manager/web/2023-12-01/appserviceplans/id_virtualnetworkconnectiongateway.go @@ -46,7 +46,7 @@ func ParseVirtualNetworkConnectionGatewayID(input string) (*VirtualNetworkConnec } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Virtual } id := VirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceplans/id_worker.go b/resource-manager/web/2023-12-01/appserviceplans/id_worker.go index 284032cb1f8..a66c95a7219 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/id_worker.go +++ b/resource-manager/web/2023-12-01/appserviceplans/id_worker.go @@ -44,7 +44,7 @@ func ParseWorkerID(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkerIDInsensitively(input string) (*WorkerId, error) { } id := WorkerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go b/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go index c61bc8980f7..a25c348ca80 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_createorupdatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) CreateOrUpdateVnetRoute(ctx context.Context, id R var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_get.go b/resource-manager/web/2023-12-01/appserviceplans/method_get.go index a4d52b636e6..e8c9fc7e49c 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_get.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_get.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) Get(ctx context.Context, id commonids.AppServiceP var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go b/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go index 61c582b536d..76d08712a13 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetHybridConnection(ctx context.Context, id Hybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go b/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go index b6099bdcb7f..5fdd323b80c 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_gethybridconnectionplanlimit.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetHybridConnectionPlanLimit(ctx context.Context, var model HybridConnectionLimits result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go b/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go index 338777c766d..43c608e9890 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_getrouteforvnet.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetRouteForVnet(ctx context.Context, id RouteId) var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go b/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go index 227a69198de..bbd1499852a 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_getserverfarmskus.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) GetServerFarmSkus(ctx context.Context, id commoni var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go b/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go index 3190297402b..650f8a3926f 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_getvnetfromserverfarm.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetFromServerFarm(ctx context.Context, id Ser var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go b/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go index ce36c736228..f1892454285 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_getvnetgateway.go @@ -45,7 +45,6 @@ func (c AppServicePlansClient) GetVnetGateway(ctx context.Context, id VirtualNet var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_list.go b/resource-manager/web/2023-12-01/appserviceplans/method_list.go index 6825b73b994..6487ac4dcb4 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_list.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go b/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go index 5720548c003..2c65ef4aae9 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listcapabilities.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListCapabilities(ctx context.Context, id commonid var model []Capability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go b/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go index 874cdd76c26..78f4e16f7b6 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listhybridconnectionkeys.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListHybridConnectionKeys(ctx context.Context, id var model HybridConnectionKey result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go b/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go index 84c82c62f54..cea1ee3b594 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listroutesforvnet.go @@ -46,7 +46,6 @@ func (c AppServicePlansClient) ListRoutesForVnet(ctx context.Context, id ServerF var model []VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go b/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go index ba526d56a55..11927a25518 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go b/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go index 39863133e91..1779fca1033 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listvnets.go @@ -47,7 +47,6 @@ func (c AppServicePlansClient) ListVnets(ctx context.Context, id commonids.AppSe var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go b/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go index facb051bd72..112b9dd14f8 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_listwebapps.go @@ -41,6 +41,7 @@ func (o ListWebAppsOperationOptions) ToHeaders() *client.Headers { func (o ListWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go b/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go index 0eb829e73f3..e6b604d940c 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_restartwebapps.go @@ -34,6 +34,7 @@ func (o RestartWebAppsOperationOptions) ToHeaders() *client.Headers { func (o RestartWebAppsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_update.go b/resource-manager/web/2023-12-01/appserviceplans/method_update.go index 8c369f53a74..cc2bebbb8cc 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_update.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_update.go @@ -51,7 +51,6 @@ func (c AppServicePlansClient) Update(ctx context.Context, id commonids.AppServi var model AppServicePlan result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go b/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go index a0861673f2a..084885def91 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetgateway.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetGateway(ctx context.Context, id Virtual var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go b/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go index 38d2438c46c..0d8db289b93 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go +++ b/resource-manager/web/2023-12-01/appserviceplans/method_updatevnetroute.go @@ -49,7 +49,6 @@ func (c AppServicePlansClient) UpdateVnetRoute(ctx context.Context, id RouteId, var model VnetRoute result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/appserviceplans/version.go b/resource-manager/web/2023-12-01/appserviceplans/version.go index c624303ad0b..cffd97d317d 100644 --- a/resource-manager/web/2023-12-01/appserviceplans/version.go +++ b/resource-manager/web/2023-12-01/appserviceplans/version.go @@ -1,12 +1,10 @@ package appserviceplans -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/appserviceplans/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/appserviceplans/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/README.md b/resource-manager/web/2023-12-01/certificateordersdiagnostics/README.md index 44987cb20e5..04e0502e047 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/README.md +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/certificateordersdiagnostics` Documentation -The `certificateordersdiagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `certificateordersdiagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/client.go b/resource-manager/web/2023-12-01/certificateordersdiagnostics/client.go index b050da126b5..710732b4d7f 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/client.go +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/client.go @@ -15,7 +15,7 @@ type CertificateOrdersDiagnosticsClient struct { } func NewCertificateOrdersDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateOrdersDiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificateordersdiagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificateOrdersDiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_certificateorder.go b/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_certificateorder.go index 050fa6199a7..6ebb64e3662 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_certificateorder.go +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_certificateorder.go @@ -42,7 +42,7 @@ func ParseCertificateOrderID(input string) (*CertificateOrderId, error) { } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateOrderIDInsensitively(input string) (*CertificateOrderId, er } id := CertificateOrderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_detector.go b/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_detector.go index fe633a846ad..63c20115494 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_detector.go +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go b/resource-manager/web/2023-12-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go index 234f65f33a3..15ff71d98cd 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/method_getappservicecertificateorderdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToHeaders func (o GetAppServiceCertificateOrderDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetecto var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/certificateordersdiagnostics/version.go b/resource-manager/web/2023-12-01/certificateordersdiagnostics/version.go index 393ab2dfb9c..96840b496f8 100644 --- a/resource-manager/web/2023-12-01/certificateordersdiagnostics/version.go +++ b/resource-manager/web/2023-12-01/certificateordersdiagnostics/version.go @@ -1,12 +1,10 @@ package certificateordersdiagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificateordersdiagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificateordersdiagnostics/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/certificates/README.md b/resource-manager/web/2023-12-01/certificates/README.md index 13a439c3632..ca45ab53ce1 100644 --- a/resource-manager/web/2023-12-01/certificates/README.md +++ b/resource-manager/web/2023-12-01/certificates/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/certificates` Documentation -The `certificates` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `certificates` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/certificates/client.go b/resource-manager/web/2023-12-01/certificates/client.go index 7248daeda34..f045f1b9265 100644 --- a/resource-manager/web/2023-12-01/certificates/client.go +++ b/resource-manager/web/2023-12-01/certificates/client.go @@ -15,7 +15,7 @@ type CertificatesClient struct { } func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "certificates", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/certificates/id_certificate.go b/resource-manager/web/2023-12-01/certificates/id_certificate.go index 24c9696e478..09346b12fa4 100644 --- a/resource-manager/web/2023-12-01/certificates/id_certificate.go +++ b/resource-manager/web/2023-12-01/certificates/id_certificate.go @@ -42,7 +42,7 @@ func ParseCertificateID(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseCertificateIDInsensitively(input string) (*CertificateId, error) { } id := CertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/certificates/method_createorupdate.go b/resource-manager/web/2023-12-01/certificates/method_createorupdate.go index dd5b06bc250..ef3ac53ed39 100644 --- a/resource-manager/web/2023-12-01/certificates/method_createorupdate.go +++ b/resource-manager/web/2023-12-01/certificates/method_createorupdate.go @@ -49,7 +49,6 @@ func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/certificates/method_get.go b/resource-manager/web/2023-12-01/certificates/method_get.go index 339126ffd6a..50817117dad 100644 --- a/resource-manager/web/2023-12-01/certificates/method_get.go +++ b/resource-manager/web/2023-12-01/certificates/method_get.go @@ -45,7 +45,6 @@ func (c CertificatesClient) Get(ctx context.Context, id CertificateId) (result G var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/certificates/method_list.go b/resource-manager/web/2023-12-01/certificates/method_list.go index aaa547d06bb..b9bba8df177 100644 --- a/resource-manager/web/2023-12-01/certificates/method_list.go +++ b/resource-manager/web/2023-12-01/certificates/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/certificates/method_update.go b/resource-manager/web/2023-12-01/certificates/method_update.go index 038cd440dd0..e0cf13140fe 100644 --- a/resource-manager/web/2023-12-01/certificates/method_update.go +++ b/resource-manager/web/2023-12-01/certificates/method_update.go @@ -49,7 +49,6 @@ func (c CertificatesClient) Update(ctx context.Context, id CertificateId, input var model Certificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/certificates/version.go b/resource-manager/web/2023-12-01/certificates/version.go index 8e7abe38127..f30e59c6c06 100644 --- a/resource-manager/web/2023-12-01/certificates/version.go +++ b/resource-manager/web/2023-12-01/certificates/version.go @@ -1,12 +1,10 @@ package certificates -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/certificates/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/certificates/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/containerapps/README.md b/resource-manager/web/2023-12-01/containerapps/README.md index b302a1d2e09..8b4604d5ec2 100644 --- a/resource-manager/web/2023-12-01/containerapps/README.md +++ b/resource-manager/web/2023-12-01/containerapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/containerapps` Documentation -The `containerapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `containerapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/containerapps/client.go b/resource-manager/web/2023-12-01/containerapps/client.go index 65599ae354f..aed3cca9efb 100644 --- a/resource-manager/web/2023-12-01/containerapps/client.go +++ b/resource-manager/web/2023-12-01/containerapps/client.go @@ -15,7 +15,7 @@ type ContainerAppsClient struct { } func NewContainerAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/containerapps/id_containerapp.go b/resource-manager/web/2023-12-01/containerapps/id_containerapp.go index c7991c1dbc4..2fe43c431b6 100644 --- a/resource-manager/web/2023-12-01/containerapps/id_containerapp.go +++ b/resource-manager/web/2023-12-01/containerapps/id_containerapp.go @@ -40,7 +40,7 @@ func ParseContainerAppID(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseContainerAppIDInsensitively(input string) (*ContainerAppId, error) { } id := ContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/containerapps/id_providercontainerapp.go b/resource-manager/web/2023-12-01/containerapps/id_providercontainerapp.go index 6493d543e2b..ead4cf96efc 100644 --- a/resource-manager/web/2023-12-01/containerapps/id_providercontainerapp.go +++ b/resource-manager/web/2023-12-01/containerapps/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/containerapps/method_get.go b/resource-manager/web/2023-12-01/containerapps/method_get.go index def3a75c5e8..66c664a40cb 100644 --- a/resource-manager/web/2023-12-01/containerapps/method_get.go +++ b/resource-manager/web/2023-12-01/containerapps/method_get.go @@ -45,7 +45,6 @@ func (c ContainerAppsClient) Get(ctx context.Context, id ProviderContainerAppId) var model ContainerApp result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/containerapps/method_listsecrets.go b/resource-manager/web/2023-12-01/containerapps/method_listsecrets.go index 2981767594f..8c35814e73f 100644 --- a/resource-manager/web/2023-12-01/containerapps/method_listsecrets.go +++ b/resource-manager/web/2023-12-01/containerapps/method_listsecrets.go @@ -46,7 +46,6 @@ func (c ContainerAppsClient) ListSecrets(ctx context.Context, id ContainerAppId) var model SecretsCollection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/containerapps/version.go b/resource-manager/web/2023-12-01/containerapps/version.go index e090bd220b7..d9ebd5dd620 100644 --- a/resource-manager/web/2023-12-01/containerapps/version.go +++ b/resource-manager/web/2023-12-01/containerapps/version.go @@ -1,12 +1,10 @@ package containerapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerapps/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/README.md b/resource-manager/web/2023-12-01/containerappsrevisions/README.md index a00f524bfd6..a5ad33dd8d8 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/README.md +++ b/resource-manager/web/2023-12-01/containerappsrevisions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/containerappsrevisions` Documentation -The `containerappsrevisions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `containerappsrevisions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/client.go b/resource-manager/web/2023-12-01/containerappsrevisions/client.go index 6dd288e2fae..16764223cb1 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/client.go +++ b/resource-manager/web/2023-12-01/containerappsrevisions/client.go @@ -15,7 +15,7 @@ type ContainerAppsRevisionsClient struct { } func NewContainerAppsRevisionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ContainerAppsRevisionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "containerappsrevisions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "containerappsrevisions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ContainerAppsRevisionsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/id_providercontainerapp.go b/resource-manager/web/2023-12-01/containerappsrevisions/id_providercontainerapp.go index f9d222c17f9..ebdc450ab3b 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/id_providercontainerapp.go +++ b/resource-manager/web/2023-12-01/containerappsrevisions/id_providercontainerapp.go @@ -42,7 +42,7 @@ func ParseProviderContainerAppID(input string) (*ProviderContainerAppId, error) } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseProviderContainerAppIDInsensitively(input string) (*ProviderContainerA } id := ProviderContainerAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/id_revision.go b/resource-manager/web/2023-12-01/containerappsrevisions/id_revision.go index 9c531d6051b..4279a4f1e42 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/id_revision.go +++ b/resource-manager/web/2023-12-01/containerappsrevisions/id_revision.go @@ -44,7 +44,7 @@ func ParseRevisionID(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseRevisionIDInsensitively(input string) (*RevisionId, error) { } id := RevisionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/method_getrevision.go b/resource-manager/web/2023-12-01/containerappsrevisions/method_getrevision.go index f2d02c1605e..5f54d0c3df2 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/method_getrevision.go +++ b/resource-manager/web/2023-12-01/containerappsrevisions/method_getrevision.go @@ -45,7 +45,6 @@ func (c ContainerAppsRevisionsClient) GetRevision(ctx context.Context, id Revisi var model Revision result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/containerappsrevisions/version.go b/resource-manager/web/2023-12-01/containerappsrevisions/version.go index 47e5dc0261e..59d5c841dc2 100644 --- a/resource-manager/web/2023-12-01/containerappsrevisions/version.go +++ b/resource-manager/web/2023-12-01/containerappsrevisions/version.go @@ -1,12 +1,10 @@ package containerappsrevisions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/containerappsrevisions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/containerappsrevisions/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/deletedwebapps/README.md b/resource-manager/web/2023-12-01/deletedwebapps/README.md index f137c13bebf..90624219102 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/README.md +++ b/resource-manager/web/2023-12-01/deletedwebapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/deletedwebapps` Documentation -The `deletedwebapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `deletedwebapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/deletedwebapps/client.go b/resource-manager/web/2023-12-01/deletedwebapps/client.go index 7627ffe88fa..75d69e08194 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/client.go +++ b/resource-manager/web/2023-12-01/deletedwebapps/client.go @@ -15,7 +15,7 @@ type DeletedWebAppsClient struct { } func NewDeletedWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedWebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "deletedwebapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "deletedwebapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DeletedWebAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/deletedwebapps/id_locationdeletedsite.go b/resource-manager/web/2023-12-01/deletedwebapps/id_locationdeletedsite.go index 38e9300d296..ed6298d0960 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/id_locationdeletedsite.go +++ b/resource-manager/web/2023-12-01/deletedwebapps/id_locationdeletedsite.go @@ -42,7 +42,7 @@ func ParseLocationDeletedSiteID(input string) (*LocationDeletedSiteId, error) { } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseLocationDeletedSiteIDInsensitively(input string) (*LocationDeletedSite } id := LocationDeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/deletedwebapps/id_providerlocation.go b/resource-manager/web/2023-12-01/deletedwebapps/id_providerlocation.go index 34206ea2e60..b9d33204fbf 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/id_providerlocation.go +++ b/resource-manager/web/2023-12-01/deletedwebapps/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/deletedwebapps/method_getdeletedwebappbylocation.go b/resource-manager/web/2023-12-01/deletedwebapps/method_getdeletedwebappbylocation.go index c3b5013c659..c60231dbc7b 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/method_getdeletedwebappbylocation.go +++ b/resource-manager/web/2023-12-01/deletedwebapps/method_getdeletedwebappbylocation.go @@ -45,7 +45,6 @@ func (c DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, id var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/deletedwebapps/version.go b/resource-manager/web/2023-12-01/deletedwebapps/version.go index 9f2a179e82e..65d3f0faee1 100644 --- a/resource-manager/web/2023-12-01/deletedwebapps/version.go +++ b/resource-manager/web/2023-12-01/deletedwebapps/version.go @@ -1,12 +1,10 @@ package deletedwebapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/deletedwebapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/deletedwebapps/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/diagnostics/README.md b/resource-manager/web/2023-12-01/diagnostics/README.md index 23b4106633e..d411a920fb7 100644 --- a/resource-manager/web/2023-12-01/diagnostics/README.md +++ b/resource-manager/web/2023-12-01/diagnostics/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/diagnostics` Documentation -The `diagnostics` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `diagnostics` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/diagnostics/client.go b/resource-manager/web/2023-12-01/diagnostics/client.go index 134561e1c49..4b218f34ee2 100644 --- a/resource-manager/web/2023-12-01/diagnostics/client.go +++ b/resource-manager/web/2023-12-01/diagnostics/client.go @@ -15,7 +15,7 @@ type DiagnosticsClient struct { } func NewDiagnosticsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "diagnostics", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "diagnostics", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DiagnosticsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_analysis.go b/resource-manager/web/2023-12-01/diagnostics/id_analysis.go index cf164a66cd5..d622f811794 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_analysis.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_analysis.go @@ -46,7 +46,7 @@ func ParseAnalysisID(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseAnalysisIDInsensitively(input string) (*AnalysisId, error) { } id := AnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_detector.go b/resource-manager/web/2023-12-01/diagnostics/id_detector.go index 89042fab54f..5b71ac68e51 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_detector.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_detector.go @@ -44,7 +44,7 @@ func ParseDetectorID(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDetectorIDInsensitively(input string) (*DetectorId, error) { } id := DetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_diagnostic.go b/resource-manager/web/2023-12-01/diagnostics/id_diagnostic.go index 156adb806c7..d5938a967a3 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_diagnostic.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_diagnostic.go @@ -44,7 +44,7 @@ func ParseDiagnosticID(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error) { } id := DiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_diagnosticanalysis.go b/resource-manager/web/2023-12-01/diagnostics/id_diagnosticanalysis.go index 28ed452f661..7626a3e53c8 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_diagnosticanalysis.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_diagnosticanalysis.go @@ -48,7 +48,7 @@ func ParseDiagnosticAnalysisID(input string) (*DiagnosticAnalysisId, error) { } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseDiagnosticAnalysisIDInsensitively(input string) (*DiagnosticAnalysisId } id := DiagnosticAnalysisId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_diagnosticdetector.go b/resource-manager/web/2023-12-01/diagnostics/id_diagnosticdetector.go index a6d345670d9..6b2d8cebcab 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_diagnosticdetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_diagnosticdetector.go @@ -46,7 +46,7 @@ func ParseDiagnosticDetectorID(input string) (*DiagnosticDetectorId, error) { } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDiagnosticDetectorIDInsensitively(input string) (*DiagnosticDetectorId } id := DiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_hostingenvironmentdetector.go b/resource-manager/web/2023-12-01/diagnostics/id_hostingenvironmentdetector.go index 7bf33585a6a..fa6d503548e 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_hostingenvironmentdetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_hostingenvironmentdetector.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentDetectorID(input string) (*HostingEnvironmentDetecto } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentDetectorIDInsensitively(input string) (*HostingEnvir } id := HostingEnvironmentDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_slot.go b/resource-manager/web/2023-12-01/diagnostics/id_slot.go index 3a3f6dcbfba..7d54200ef3f 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_slot.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_slotdetector.go b/resource-manager/web/2023-12-01/diagnostics/id_slotdetector.go index bc38b43b06a..b06d1afa980 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_slotdetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_slotdetector.go @@ -46,7 +46,7 @@ func ParseSlotDetectorID(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDetectorIDInsensitively(input string) (*SlotDetectorId, error) { } id := SlotDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnostic.go b/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnostic.go index 3dc67da36a9..92f3e285e81 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnostic.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnostic.go @@ -46,7 +46,7 @@ func ParseSlotDiagnosticID(input string) (*SlotDiagnosticId, error) { } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDiagnosticIDInsensitively(input string) (*SlotDiagnosticId, error) } id := SlotDiagnosticId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnosticdetector.go b/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnosticdetector.go index 73d9c680c8f..7662d90c174 100644 --- a/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnosticdetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/id_slotdiagnosticdetector.go @@ -48,7 +48,7 @@ func ParseSlotDiagnosticDetectorID(input string) (*SlotDiagnosticDetectorId, err } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotDiagnosticDetectorIDInsensitively(input string) (*SlotDiagnosticDe } id := SlotDiagnosticDetectorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysis.go b/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysis.go index 39c10eb722f..d9114e45262 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysis.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysis.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, id AnalysisI var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysisslot.go b/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysisslot.go index cdfb303e3a3..fb43cf7b571 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysisslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_executesiteanalysisslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteAnalysisSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteAnalysisSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, id Diagn var model DiagnosticAnalysis result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_executesitedetector.go b/resource-manager/web/2023-12-01/diagnostics/method_executesitedetector.go index bd22012f0bf..95fdc0e086d 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_executesitedetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_executesitedetector.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, id Diagnosti var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_executesitedetectorslot.go b/resource-manager/web/2023-12-01/diagnostics/method_executesitedetectorslot.go index 7b7c52ca9ac..a4058304682 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_executesitedetectorslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_executesitedetectorslot.go @@ -36,6 +36,7 @@ func (o ExecuteSiteDetectorSlotOperationOptions) ToHeaders() *client.Headers { func (o ExecuteSiteDetectorSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, id SlotD var model DiagnosticDetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_gethostingenvironmentdetectorresponse.go b/resource-manager/web/2023-12-01/diagnostics/method_gethostingenvironmentdetectorresponse.go index c0f8da53660..146dae82a1c 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_gethostingenvironmentdetectorresponse.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_gethostingenvironmentdetectorresponse.go @@ -36,6 +36,7 @@ func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToHeaders() *clie func (o GetHostingEnvironmentDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Con var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysis.go b/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysis.go index 9f71be3deb5..b730bee1e40 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysis.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysis.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysis(ctx context.Context, id AnalysisId) ( var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysisslot.go b/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysisslot.go index 045dd22a086..14ca76fb852 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysisslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsiteanalysisslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, id Diagnosti var model AnalysisDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetector.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetector.go index bd8a5d0fd1b..e90a21838ca 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetector.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetector.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetector(ctx context.Context, id DiagnosticDet var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponse.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponse.go index 92cb6f72ab9..91a987796f7 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponse.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponse.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseOperationOptions) ToHeaders() *client.Headers { func (o GetSiteDetectorResponseOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, id Detec var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponseslot.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponseslot.go index 2cdbdd632a1..84580774fc2 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponseslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorresponseslot.go @@ -36,6 +36,7 @@ func (o GetSiteDetectorResponseSlotOperationOptions) ToHeaders() *client.Headers func (o GetSiteDetectorResponseSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, id S var model DetectorResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorslot.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorslot.go index 53ae2cc819c..3f2a72744f1 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitedetectorslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, id SlotDiagn var model DetectorDefinitionResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategory.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategory.go index 450eb557042..1ddb7a72135 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategory.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategory.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, id Dia var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategoryslot.go b/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategoryslot.go index fb8ac9e2176..c6572ee2994 100644 --- a/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategoryslot.go +++ b/resource-manager/web/2023-12-01/diagnostics/method_getsitediagnosticcategoryslot.go @@ -45,7 +45,6 @@ func (c DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, id var model DiagnosticCategory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/diagnostics/version.go b/resource-manager/web/2023-12-01/diagnostics/version.go index d89e29f2e65..90f210486e9 100644 --- a/resource-manager/web/2023-12-01/diagnostics/version.go +++ b/resource-manager/web/2023-12-01/diagnostics/version.go @@ -1,12 +1,10 @@ package diagnostics -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/diagnostics/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/diagnostics/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/domains/README.md b/resource-manager/web/2023-12-01/domains/README.md index c94acff3879..e8da1947eb1 100644 --- a/resource-manager/web/2023-12-01/domains/README.md +++ b/resource-manager/web/2023-12-01/domains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/domains` Documentation -The `domains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `domains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/domains/client.go b/resource-manager/web/2023-12-01/domains/client.go index 2ce822d248f..59ee394333f 100644 --- a/resource-manager/web/2023-12-01/domains/client.go +++ b/resource-manager/web/2023-12-01/domains/client.go @@ -15,7 +15,7 @@ type DomainsClient struct { } func NewDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "domains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "domains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating DomainsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/domains/id_domain.go b/resource-manager/web/2023-12-01/domains/id_domain.go index a3841009671..91ab01bc78f 100644 --- a/resource-manager/web/2023-12-01/domains/id_domain.go +++ b/resource-manager/web/2023-12-01/domains/id_domain.go @@ -42,7 +42,7 @@ func ParseDomainID(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseDomainIDInsensitively(input string) (*DomainId, error) { } id := DomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/domains/id_domainownershipidentifier.go b/resource-manager/web/2023-12-01/domains/id_domainownershipidentifier.go index a4600242107..30c6e04e6fa 100644 --- a/resource-manager/web/2023-12-01/domains/id_domainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/domains/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/domains/method_checkavailability.go b/resource-manager/web/2023-12-01/domains/method_checkavailability.go index 2e69c2d6caa..1ebced69f7f 100644 --- a/resource-manager/web/2023-12-01/domains/method_checkavailability.go +++ b/resource-manager/web/2023-12-01/domains/method_checkavailability.go @@ -51,7 +51,6 @@ func (c DomainsClient) CheckAvailability(ctx context.Context, id commonids.Subsc var model DomainAvailabilityCheckResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_createorupdateownershipidentifier.go b/resource-manager/web/2023-12-01/domains/method_createorupdateownershipidentifier.go index 65cf4646521..7a48ce2a59c 100644 --- a/resource-manager/web/2023-12-01/domains/method_createorupdateownershipidentifier.go +++ b/resource-manager/web/2023-12-01/domains/method_createorupdateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, id var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_delete.go b/resource-manager/web/2023-12-01/domains/method_delete.go index 1e544b1f599..6d7df4dfe6c 100644 --- a/resource-manager/web/2023-12-01/domains/method_delete.go +++ b/resource-manager/web/2023-12-01/domains/method_delete.go @@ -33,6 +33,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/domains/method_get.go b/resource-manager/web/2023-12-01/domains/method_get.go index b35fd82d944..20619dde9a0 100644 --- a/resource-manager/web/2023-12-01/domains/method_get.go +++ b/resource-manager/web/2023-12-01/domains/method_get.go @@ -45,7 +45,6 @@ func (c DomainsClient) Get(ctx context.Context, id DomainId) (result GetOperatio var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_getcontrolcenterssorequest.go b/resource-manager/web/2023-12-01/domains/method_getcontrolcenterssorequest.go index 7bcdf455156..97001bc7198 100644 --- a/resource-manager/web/2023-12-01/domains/method_getcontrolcenterssorequest.go +++ b/resource-manager/web/2023-12-01/domains/method_getcontrolcenterssorequest.go @@ -47,7 +47,6 @@ func (c DomainsClient) GetControlCenterSsoRequest(ctx context.Context, id common var model DomainControlCenterSsoRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_getownershipidentifier.go b/resource-manager/web/2023-12-01/domains/method_getownershipidentifier.go index d38f9734728..b40df756137 100644 --- a/resource-manager/web/2023-12-01/domains/method_getownershipidentifier.go +++ b/resource-manager/web/2023-12-01/domains/method_getownershipidentifier.go @@ -45,7 +45,6 @@ func (c DomainsClient) GetOwnershipIdentifier(ctx context.Context, id DomainOwne var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_transferout.go b/resource-manager/web/2023-12-01/domains/method_transferout.go index e45926e87d5..463bfd22489 100644 --- a/resource-manager/web/2023-12-01/domains/method_transferout.go +++ b/resource-manager/web/2023-12-01/domains/method_transferout.go @@ -46,7 +46,6 @@ func (c DomainsClient) TransferOut(ctx context.Context, id DomainId) (result Tra var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_update.go b/resource-manager/web/2023-12-01/domains/method_update.go index f5705bd286a..08ef3fbeef2 100644 --- a/resource-manager/web/2023-12-01/domains/method_update.go +++ b/resource-manager/web/2023-12-01/domains/method_update.go @@ -50,7 +50,6 @@ func (c DomainsClient) Update(ctx context.Context, id DomainId, input DomainPatc var model Domain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/method_updateownershipidentifier.go b/resource-manager/web/2023-12-01/domains/method_updateownershipidentifier.go index 3c23bdeecfc..0ac28164a96 100644 --- a/resource-manager/web/2023-12-01/domains/method_updateownershipidentifier.go +++ b/resource-manager/web/2023-12-01/domains/method_updateownershipidentifier.go @@ -49,7 +49,6 @@ func (c DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, id DomainO var model DomainOwnershipIdentifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/domains/version.go b/resource-manager/web/2023-12-01/domains/version.go index a8ce49cd186..4128f79b243 100644 --- a/resource-manager/web/2023-12-01/domains/version.go +++ b/resource-manager/web/2023-12-01/domains/version.go @@ -1,12 +1,10 @@ package domains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/domains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/domains/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/global/README.md b/resource-manager/web/2023-12-01/global/README.md index 80330d420f0..0867a39d825 100644 --- a/resource-manager/web/2023-12-01/global/README.md +++ b/resource-manager/web/2023-12-01/global/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/global` Documentation -The `global` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `global` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/global/client.go b/resource-manager/web/2023-12-01/global/client.go index 5fbdd990766..d760ea36811 100644 --- a/resource-manager/web/2023-12-01/global/client.go +++ b/resource-manager/web/2023-12-01/global/client.go @@ -15,7 +15,7 @@ type GlobalClient struct { } func NewGlobalClientWithBaseURI(sdkApi sdkEnv.Api) (*GlobalClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "global", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "global", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating GlobalClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/global/id_deletedsite.go b/resource-manager/web/2023-12-01/global/id_deletedsite.go index d227d82af96..2ac42554ae0 100644 --- a/resource-manager/web/2023-12-01/global/id_deletedsite.go +++ b/resource-manager/web/2023-12-01/global/id_deletedsite.go @@ -40,7 +40,7 @@ func ParseDeletedSiteID(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseDeletedSiteIDInsensitively(input string) (*DeletedSiteId, error) { } id := DeletedSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/global/method_getdeletedwebapp.go b/resource-manager/web/2023-12-01/global/method_getdeletedwebapp.go index 52e449413d5..9daa1017f5c 100644 --- a/resource-manager/web/2023-12-01/global/method_getdeletedwebapp.go +++ b/resource-manager/web/2023-12-01/global/method_getdeletedwebapp.go @@ -45,7 +45,6 @@ func (c GlobalClient) GetDeletedWebApp(ctx context.Context, id DeletedSiteId) (r var model DeletedSite result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/global/method_getdeletedwebappsnapshots.go b/resource-manager/web/2023-12-01/global/method_getdeletedwebappsnapshots.go index 4b84e9cb927..e18e9e44a71 100644 --- a/resource-manager/web/2023-12-01/global/method_getdeletedwebappsnapshots.go +++ b/resource-manager/web/2023-12-01/global/method_getdeletedwebappsnapshots.go @@ -46,7 +46,6 @@ func (c GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, id DeletedS var model []Snapshot result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/global/version.go b/resource-manager/web/2023-12-01/global/version.go index 492bc81141b..8d6834614ab 100644 --- a/resource-manager/web/2023-12-01/global/version.go +++ b/resource-manager/web/2023-12-01/global/version.go @@ -1,12 +1,10 @@ package global -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/global/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/global/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/kubeenvironments/README.md b/resource-manager/web/2023-12-01/kubeenvironments/README.md index e8009b47d84..976141188bb 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/README.md +++ b/resource-manager/web/2023-12-01/kubeenvironments/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/kubeenvironments` Documentation -The `kubeenvironments` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `kubeenvironments` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/kubeenvironments/client.go b/resource-manager/web/2023-12-01/kubeenvironments/client.go index a2db5e1aad1..7bcf8670016 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/client.go +++ b/resource-manager/web/2023-12-01/kubeenvironments/client.go @@ -15,7 +15,7 @@ type KubeEnvironmentsClient struct { } func NewKubeEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*KubeEnvironmentsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "kubeenvironments", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "kubeenvironments", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating KubeEnvironmentsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/kubeenvironments/id_kubeenvironment.go b/resource-manager/web/2023-12-01/kubeenvironments/id_kubeenvironment.go index 020e8fa0f30..ec1ed742c59 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/id_kubeenvironment.go +++ b/resource-manager/web/2023-12-01/kubeenvironments/id_kubeenvironment.go @@ -42,7 +42,7 @@ func ParseKubeEnvironmentID(input string) (*KubeEnvironmentId, error) { } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseKubeEnvironmentIDInsensitively(input string) (*KubeEnvironmentId, erro } id := KubeEnvironmentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/kubeenvironments/method_get.go b/resource-manager/web/2023-12-01/kubeenvironments/method_get.go index 9c19f1d0522..4dde6e8cfea 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/method_get.go +++ b/resource-manager/web/2023-12-01/kubeenvironments/method_get.go @@ -45,7 +45,6 @@ func (c KubeEnvironmentsClient) Get(ctx context.Context, id KubeEnvironmentId) ( var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/kubeenvironments/method_update.go b/resource-manager/web/2023-12-01/kubeenvironments/method_update.go index 5af2a9f0da9..7192afd41a4 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/method_update.go +++ b/resource-manager/web/2023-12-01/kubeenvironments/method_update.go @@ -50,7 +50,6 @@ func (c KubeEnvironmentsClient) Update(ctx context.Context, id KubeEnvironmentId var model KubeEnvironment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/kubeenvironments/version.go b/resource-manager/web/2023-12-01/kubeenvironments/version.go index 886052ef4b2..65e6931f169 100644 --- a/resource-manager/web/2023-12-01/kubeenvironments/version.go +++ b/resource-manager/web/2023-12-01/kubeenvironments/version.go @@ -1,12 +1,10 @@ package kubeenvironments -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/kubeenvironments/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/kubeenvironments/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/provider/README.md b/resource-manager/web/2023-12-01/provider/README.md index b59d05b5811..3a0b6270707 100644 --- a/resource-manager/web/2023-12-01/provider/README.md +++ b/resource-manager/web/2023-12-01/provider/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/provider` Documentation -The `provider` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `provider` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/provider/client.go b/resource-manager/web/2023-12-01/provider/client.go index 2128fec9d6f..b982cfdab87 100644 --- a/resource-manager/web/2023-12-01/provider/client.go +++ b/resource-manager/web/2023-12-01/provider/client.go @@ -15,7 +15,7 @@ type ProviderClient struct { } func NewProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "provider", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "provider", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/provider/id_location.go b/resource-manager/web/2023-12-01/provider/id_location.go index e746f1b1c9e..d6d3b18d669 100644 --- a/resource-manager/web/2023-12-01/provider/id_location.go +++ b/resource-manager/web/2023-12-01/provider/id_location.go @@ -38,7 +38,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/provider/method_getavailablestacks.go b/resource-manager/web/2023-12-01/provider/method_getavailablestacks.go index d38e1131c18..1572e58bd2a 100644 --- a/resource-manager/web/2023-12-01/provider/method_getavailablestacks.go +++ b/resource-manager/web/2023-12-01/provider/method_getavailablestacks.go @@ -39,6 +39,7 @@ func (o GetAvailableStacksOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/method_getavailablestacksonprem.go b/resource-manager/web/2023-12-01/provider/method_getavailablestacksonprem.go index 88344e48bbe..20773813e76 100644 --- a/resource-manager/web/2023-12-01/provider/method_getavailablestacksonprem.go +++ b/resource-manager/web/2023-12-01/provider/method_getavailablestacksonprem.go @@ -40,6 +40,7 @@ func (o GetAvailableStacksOnPremOperationOptions) ToHeaders() *client.Headers { func (o GetAvailableStacksOnPremOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/method_getfunctionappstacks.go b/resource-manager/web/2023-12-01/provider/method_getfunctionappstacks.go index e7d7af6faee..a1846c17cd1 100644 --- a/resource-manager/web/2023-12-01/provider/method_getfunctionappstacks.go +++ b/resource-manager/web/2023-12-01/provider/method_getfunctionappstacks.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetFunctionAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/method_getfunctionappstacksforlocation.go b/resource-manager/web/2023-12-01/provider/method_getfunctionappstacksforlocation.go index d172b71e511..684a0b14882 100644 --- a/resource-manager/web/2023-12-01/provider/method_getfunctionappstacksforlocation.go +++ b/resource-manager/web/2023-12-01/provider/method_getfunctionappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetFunctionAppStacksForLocationOperationOptions) ToHeaders() *client.Hea func (o GetFunctionAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/method_getwebappstacks.go b/resource-manager/web/2023-12-01/provider/method_getwebappstacks.go index 94ed33af10c..3223aecd71b 100644 --- a/resource-manager/web/2023-12-01/provider/method_getwebappstacks.go +++ b/resource-manager/web/2023-12-01/provider/method_getwebappstacks.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksOperationOptions) ToHeaders() *client.Headers { func (o GetWebAppStacksOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/method_getwebappstacksforlocation.go b/resource-manager/web/2023-12-01/provider/method_getwebappstacksforlocation.go index 1b7970c0294..2dad249e986 100644 --- a/resource-manager/web/2023-12-01/provider/method_getwebappstacksforlocation.go +++ b/resource-manager/web/2023-12-01/provider/method_getwebappstacksforlocation.go @@ -39,6 +39,7 @@ func (o GetWebAppStacksForLocationOperationOptions) ToHeaders() *client.Headers func (o GetWebAppStacksForLocationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/provider/version.go b/resource-manager/web/2023-12-01/provider/version.go index 29c0057d6c4..07bca8abcd3 100644 --- a/resource-manager/web/2023-12-01/provider/version.go +++ b/resource-manager/web/2023-12-01/provider/version.go @@ -1,12 +1,10 @@ package provider -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/provider/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/provider/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/recommendations/README.md b/resource-manager/web/2023-12-01/recommendations/README.md index 7d546593541..21fc4f67c49 100644 --- a/resource-manager/web/2023-12-01/recommendations/README.md +++ b/resource-manager/web/2023-12-01/recommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/recommendations` Documentation -The `recommendations` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `recommendations` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/recommendations/client.go b/resource-manager/web/2023-12-01/recommendations/client.go index c0ae3be9b1d..5c0b92661cf 100644 --- a/resource-manager/web/2023-12-01/recommendations/client.go +++ b/resource-manager/web/2023-12-01/recommendations/client.go @@ -15,7 +15,7 @@ type RecommendationsClient struct { } func NewRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "recommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "recommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating RecommendationsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/recommendations/id_hostingenvironmentrecommendation.go b/resource-manager/web/2023-12-01/recommendations/id_hostingenvironmentrecommendation.go index 67ff49432d9..1d3055e1119 100644 --- a/resource-manager/web/2023-12-01/recommendations/id_hostingenvironmentrecommendation.go +++ b/resource-manager/web/2023-12-01/recommendations/id_hostingenvironmentrecommendation.go @@ -44,7 +44,7 @@ func ParseHostingEnvironmentRecommendationID(input string) (*HostingEnvironmentR } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostingEnvironmentRecommendationIDInsensitively(input string) (*Hostin } id := HostingEnvironmentRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/recommendations/id_recommendation.go b/resource-manager/web/2023-12-01/recommendations/id_recommendation.go index a1f8446174f..ab139efdcda 100644 --- a/resource-manager/web/2023-12-01/recommendations/id_recommendation.go +++ b/resource-manager/web/2023-12-01/recommendations/id_recommendation.go @@ -40,7 +40,7 @@ func ParseRecommendationID(input string) (*RecommendationId, error) { } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseRecommendationIDInsensitively(input string) (*RecommendationId, error) } id := RecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/recommendations/id_siterecommendation.go b/resource-manager/web/2023-12-01/recommendations/id_siterecommendation.go index cada8a9b36f..faeec83da4d 100644 --- a/resource-manager/web/2023-12-01/recommendations/id_siterecommendation.go +++ b/resource-manager/web/2023-12-01/recommendations/id_siterecommendation.go @@ -44,7 +44,7 @@ func ParseSiteRecommendationID(input string) (*SiteRecommendationId, error) { } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteRecommendationIDInsensitively(input string) (*SiteRecommendationId } id := SiteRecommendationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/recommendations/method_disableallforhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_disableallforhostingenvironment.go index 3099cf85524..3f1378ddbbc 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_disableallforhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_disableallforhostingenvironment.go @@ -34,6 +34,7 @@ func (o DisableAllForHostingEnvironmentOperationOptions) ToHeaders() *client.Hea func (o DisableAllForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_disablerecommendationforhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_disablerecommendationforhostingenvironment.go index 64a8ac5160d..452a1d24ac9 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_disablerecommendationforhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_disablerecommendationforhostingenvironment.go @@ -33,6 +33,7 @@ func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToHeaders() func (o DisableRecommendationForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbyhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbyhostingenvironment.go index 2509533cd78..0086ec07d1d 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbyhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbyhostingenvironment.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToHeaders() *client. func (o GetRuleDetailsByHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Co var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbywebapp.go b/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbywebapp.go index 8e4e22b5b79..9d34652f182 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbywebapp.go +++ b/resource-manager/web/2023-12-01/recommendations/method_getruledetailsbywebapp.go @@ -35,6 +35,7 @@ func (o GetRuleDetailsByWebAppOperationOptions) ToHeaders() *client.Headers { func (o GetRuleDetailsByWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -78,7 +79,6 @@ func (c RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, id Si var model RecommendationRule result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/recommendations/method_list.go b/resource-manager/web/2023-12-01/recommendations/method_list.go index f45d890f65b..784389aa71e 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_list.go +++ b/resource-manager/web/2023-12-01/recommendations/method_list.go @@ -41,6 +41,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_listhistoryforhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_listhistoryforhostingenvironment.go index a66dab954fa..6b92d0e2bb0 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_listhistoryforhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_listhistoryforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListHistoryForHostingEnvironmentOperationOptions) ToHeaders() *client.He func (o ListHistoryForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_listhistoryforwebapp.go b/resource-manager/web/2023-12-01/recommendations/method_listhistoryforwebapp.go index 54a97058272..9fe581ed380 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_listhistoryforwebapp.go +++ b/resource-manager/web/2023-12-01/recommendations/method_listhistoryforwebapp.go @@ -41,6 +41,7 @@ func (o ListHistoryForWebAppOperationOptions) ToHeaders() *client.Headers { func (o ListHistoryForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforhostingenvironment.go index d7c819654b5..3d8956760e1 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforhostingenvironment.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToHeaders() * func (o ListRecommendedRulesForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforwebapp.go b/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforwebapp.go index 45f19bdafd5..f417cf7c61a 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforwebapp.go +++ b/resource-manager/web/2023-12-01/recommendations/method_listrecommendedrulesforwebapp.go @@ -41,6 +41,7 @@ func (o ListRecommendedRulesForWebAppOperationOptions) ToHeaders() *client.Heade func (o ListRecommendedRulesForWebAppOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/method_resetallfiltersforhostingenvironment.go b/resource-manager/web/2023-12-01/recommendations/method_resetallfiltersforhostingenvironment.go index 23fe068d9bf..c6d9e982291 100644 --- a/resource-manager/web/2023-12-01/recommendations/method_resetallfiltersforhostingenvironment.go +++ b/resource-manager/web/2023-12-01/recommendations/method_resetallfiltersforhostingenvironment.go @@ -34,6 +34,7 @@ func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToHeaders() *clien func (o ResetAllFiltersForHostingEnvironmentOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/recommendations/version.go b/resource-manager/web/2023-12-01/recommendations/version.go index b2d9624690a..3f3e58883de 100644 --- a/resource-manager/web/2023-12-01/recommendations/version.go +++ b/resource-manager/web/2023-12-01/recommendations/version.go @@ -1,12 +1,10 @@ package recommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/recommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/recommendations/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/README.md b/resource-manager/web/2023-12-01/resourcehealthmetadata/README.md index 84b4dc5d8c9..25e8f1015d4 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/README.md +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/resourcehealthmetadata` Documentation -The `resourcehealthmetadata` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `resourcehealthmetadata` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/client.go b/resource-manager/web/2023-12-01/resourcehealthmetadata/client.go index a0e8b63b709..8d0b22d4c33 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/client.go +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/client.go @@ -15,7 +15,7 @@ type ResourceHealthMetadataClient struct { } func NewResourceHealthMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceHealthMetadataClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourcehealthmetadata", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceHealthMetadataClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/id_slot.go b/resource-manager/web/2023-12-01/resourcehealthmetadata/id_slot.go index 0bfa176043e..988c831a683 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/id_slot.go +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysite.go b/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysite.go index 58587d1e4b3..0b5f4205ef8 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysite.go +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysite.go @@ -47,7 +47,6 @@ func (c ResourceHealthMetadataClient) GetBySite(ctx context.Context, id commonid var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysiteslot.go b/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysiteslot.go index 23f5d6260a5..24365f1341a 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysiteslot.go +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/method_getbysiteslot.go @@ -46,7 +46,6 @@ func (c ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, id Slot var model ResourceHealthMetadata result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourcehealthmetadata/version.go b/resource-manager/web/2023-12-01/resourcehealthmetadata/version.go index c0cfbb51471..40b88622a30 100644 --- a/resource-manager/web/2023-12-01/resourcehealthmetadata/version.go +++ b/resource-manager/web/2023-12-01/resourcehealthmetadata/version.go @@ -1,12 +1,10 @@ package resourcehealthmetadata -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourcehealthmetadata/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourcehealthmetadata/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/resourceproviders/README.md b/resource-manager/web/2023-12-01/resourceproviders/README.md index bca35b126d4..7f7c9fca45a 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/README.md +++ b/resource-manager/web/2023-12-01/resourceproviders/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/resourceproviders` Documentation -The `resourceproviders` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `resourceproviders` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/resourceproviders/client.go b/resource-manager/web/2023-12-01/resourceproviders/client.go index 0f91da37d8c..f5374bb3bc3 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/client.go +++ b/resource-manager/web/2023-12-01/resourceproviders/client.go @@ -15,7 +15,7 @@ type ResourceProvidersClient struct { } func NewResourceProvidersClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "resourceproviders", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "resourceproviders", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ResourceProvidersClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/resourceproviders/id_providerlocation.go b/resource-manager/web/2023-12-01/resourceproviders/id_providerlocation.go index c73af0cec4a..9e0eebd55e0 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/id_providerlocation.go +++ b/resource-manager/web/2023-12-01/resourceproviders/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/resourceproviders/id_sourcecontrol.go b/resource-manager/web/2023-12-01/resourceproviders/id_sourcecontrol.go index f59308a6f73..6bb16534a47 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/id_sourcecontrol.go +++ b/resource-manager/web/2023-12-01/resourceproviders/id_sourcecontrol.go @@ -38,7 +38,7 @@ func ParseSourceControlID(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -55,7 +55,7 @@ func ParseSourceControlIDInsensitively(input string) (*SourceControlId, error) { } id := SourceControlId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_checknameavailability.go b/resource-manager/web/2023-12-01/resourceproviders/method_checknameavailability.go index 1b0dd0b6a4f..8d708561b66 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_checknameavailability.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_checknameavailability.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) CheckNameAvailability(ctx context.Context, id c var model ResourceNameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_getpublishinguser.go b/resource-manager/web/2023-12-01/resourceproviders/method_getpublishinguser.go index 558a74efdd0..e0529900390 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_getpublishinguser.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_getpublishinguser.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetPublishingUser(ctx context.Context) (result var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_getsourcecontrol.go b/resource-manager/web/2023-12-01/resourceproviders/method_getsourcecontrol.go index 2035eb827a6..2684d63d83c 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_getsourcecontrol.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_getsourcecontrol.go @@ -45,7 +45,6 @@ func (c ResourceProvidersClient) GetSourceControl(ctx context.Context, id Source var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_getsubscriptiondeploymentlocations.go b/resource-manager/web/2023-12-01/resourceproviders/method_getsubscriptiondeploymentlocations.go index 54881368bcb..3564d1ecad9 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_getsubscriptiondeploymentlocations.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_getsubscriptiondeploymentlocations.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) GetSubscriptionDeploymentLocations(ctx context. var model DeploymentLocations result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_listbillingmeters.go b/resource-manager/web/2023-12-01/resourceproviders/method_listbillingmeters.go index 684c35df7f1..97f4b003c15 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_listbillingmeters.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_listbillingmeters.go @@ -41,6 +41,7 @@ func (o ListBillingMetersOperationOptions) ToHeaders() *client.Headers { func (o ListBillingMetersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_listcustomhostnamesites.go b/resource-manager/web/2023-12-01/resourceproviders/method_listcustomhostnamesites.go index 62c87e04bf1..f3f451bdaf0 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_listcustomhostnamesites.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_listcustomhostnamesites.go @@ -40,6 +40,7 @@ func (o ListCustomHostNameSitesOperationOptions) ToHeaders() *client.Headers { func (o ListCustomHostNameSitesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_listgeoregions.go b/resource-manager/web/2023-12-01/resourceproviders/method_listgeoregions.go index ee39002c7a8..e1022e689b7 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_listgeoregions.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_listgeoregions.go @@ -43,6 +43,7 @@ func (o ListGeoRegionsOperationOptions) ToHeaders() *client.Headers { func (o ListGeoRegionsOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_listskus.go b/resource-manager/web/2023-12-01/resourceproviders/method_listskus.go index 494e7016169..cffe2769c1b 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_listskus.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_listskus.go @@ -47,7 +47,6 @@ func (c ResourceProvidersClient) ListSkus(ctx context.Context, id commonids.Subs var model SkuInfos result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_updatepublishinguser.go b/resource-manager/web/2023-12-01/resourceproviders/method_updatepublishinguser.go index 58d177a7f00..e994b006317 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_updatepublishinguser.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_updatepublishinguser.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdatePublishingUser(ctx context.Context, input var model User result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_updatesourcecontrol.go b/resource-manager/web/2023-12-01/resourceproviders/method_updatesourcecontrol.go index fba65489698..1d9f45f198e 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_updatesourcecontrol.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_updatesourcecontrol.go @@ -49,7 +49,6 @@ func (c ResourceProvidersClient) UpdateSourceControl(ctx context.Context, id Sou var model SourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_validate.go b/resource-manager/web/2023-12-01/resourceproviders/method_validate.go index 055e2a0b590..4db5e1bb83c 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_validate.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_validate.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) Validate(ctx context.Context, id commonids.Reso var model ValidateResponse result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/method_verifyhostingenvironmentvnet.go b/resource-manager/web/2023-12-01/resourceproviders/method_verifyhostingenvironmentvnet.go index f2d83339160..733f7cd2e65 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/method_verifyhostingenvironmentvnet.go +++ b/resource-manager/web/2023-12-01/resourceproviders/method_verifyhostingenvironmentvnet.go @@ -51,7 +51,6 @@ func (c ResourceProvidersClient) VerifyHostingEnvironmentVnet(ctx context.Contex var model VnetValidationFailureDetails result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/resourceproviders/version.go b/resource-manager/web/2023-12-01/resourceproviders/version.go index 40dd9249d39..d787e8bac7e 100644 --- a/resource-manager/web/2023-12-01/resourceproviders/version.go +++ b/resource-manager/web/2023-12-01/resourceproviders/version.go @@ -1,12 +1,10 @@ package resourceproviders -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/resourceproviders/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/resourceproviders/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/staticsites/README.md b/resource-manager/web/2023-12-01/staticsites/README.md index 9a605698b79..378bcee3bac 100644 --- a/resource-manager/web/2023-12-01/staticsites/README.md +++ b/resource-manager/web/2023-12-01/staticsites/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/staticsites` Documentation -The `staticsites` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `staticsites` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/staticsites/client.go b/resource-manager/web/2023-12-01/staticsites/client.go index d725455a2d7..1843789810a 100644 --- a/resource-manager/web/2023-12-01/staticsites/client.go +++ b/resource-manager/web/2023-12-01/staticsites/client.go @@ -15,7 +15,7 @@ type StaticSitesClient struct { } func NewStaticSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*StaticSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "staticsites", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "staticsites", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating StaticSitesClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/staticsites/id_authprovider.go b/resource-manager/web/2023-12-01/staticsites/id_authprovider.go index 750184e2aa7..226f3b5c52a 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_authprovider.go +++ b/resource-manager/web/2023-12-01/staticsites/id_authprovider.go @@ -44,7 +44,7 @@ func ParseAuthProviderID(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAuthProviderIDInsensitively(input string) (*AuthProviderId, error) { } id := AuthProviderId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_build.go b/resource-manager/web/2023-12-01/staticsites/id_build.go index 1e21fb5cf2b..1a27dd31601 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_build.go +++ b/resource-manager/web/2023-12-01/staticsites/id_build.go @@ -44,7 +44,7 @@ func ParseBuildID(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBuildIDInsensitively(input string) (*BuildId, error) { } id := BuildId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_builddatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/id_builddatabaseconnection.go index 0ed1b728e32..3b7ab746afe 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_builddatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/id_builddatabaseconnection.go @@ -46,7 +46,7 @@ func ParseBuildDatabaseConnectionID(input string) (*BuildDatabaseConnectionId, e } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildDatabaseConnectionIDInsensitively(input string) (*BuildDatabaseCo } id := BuildDatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_buildlinkedbackend.go b/resource-manager/web/2023-12-01/staticsites/id_buildlinkedbackend.go index d6cf5a07976..5a46e9ddfbb 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_buildlinkedbackend.go +++ b/resource-manager/web/2023-12-01/staticsites/id_buildlinkedbackend.go @@ -46,7 +46,7 @@ func ParseBuildLinkedBackendID(input string) (*BuildLinkedBackendId, error) { } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildLinkedBackendIDInsensitively(input string) (*BuildLinkedBackendId } id := BuildLinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_builduserprovidedfunctionapp.go b/resource-manager/web/2023-12-01/staticsites/id_builduserprovidedfunctionapp.go index 3b8c90ea51f..c635b356bea 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_builduserprovidedfunctionapp.go +++ b/resource-manager/web/2023-12-01/staticsites/id_builduserprovidedfunctionapp.go @@ -46,7 +46,7 @@ func ParseBuildUserProvidedFunctionAppID(input string) (*BuildUserProvidedFuncti } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseBuildUserProvidedFunctionAppIDInsensitively(input string) (*BuildUserP } id := BuildUserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_customdomain.go b/resource-manager/web/2023-12-01/staticsites/id_customdomain.go index 8b71f5f6a29..36338190c89 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_customdomain.go +++ b/resource-manager/web/2023-12-01/staticsites/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_databaseconnection.go b/resource-manager/web/2023-12-01/staticsites/id_databaseconnection.go index 9369f53f8e5..9758866cc0e 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_databaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/id_databaseconnection.go @@ -44,7 +44,7 @@ func ParseDatabaseConnectionID(input string) (*DatabaseConnectionId, error) { } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseConnectionIDInsensitively(input string) (*DatabaseConnectionId } id := DatabaseConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_linkedbackend.go b/resource-manager/web/2023-12-01/staticsites/id_linkedbackend.go index 718f2b0e7f1..11af3b43597 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_linkedbackend.go +++ b/resource-manager/web/2023-12-01/staticsites/id_linkedbackend.go @@ -44,7 +44,7 @@ func ParseLinkedBackendID(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseLinkedBackendIDInsensitively(input string) (*LinkedBackendId, error) { } id := LinkedBackendId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_providerlocation.go b/resource-manager/web/2023-12-01/staticsites/id_providerlocation.go index ee9a3aa0549..414ef53820f 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_providerlocation.go +++ b/resource-manager/web/2023-12-01/staticsites/id_providerlocation.go @@ -40,7 +40,7 @@ func ParseProviderLocationID(input string) (*ProviderLocationId, error) { } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, er } id := ProviderLocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_staticsite.go b/resource-manager/web/2023-12-01/staticsites/id_staticsite.go index 1c7bb88ff3c..56186355289 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_staticsite.go +++ b/resource-manager/web/2023-12-01/staticsites/id_staticsite.go @@ -42,7 +42,7 @@ func ParseStaticSiteID(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseStaticSiteIDInsensitively(input string) (*StaticSiteId, error) { } id := StaticSiteId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_staticsiteprivateendpointconnection.go b/resource-manager/web/2023-12-01/staticsites/id_staticsiteprivateendpointconnection.go index 34f63677af6..f4c717142de 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_staticsiteprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/id_staticsiteprivateendpointconnection.go @@ -44,7 +44,7 @@ func ParseStaticSitePrivateEndpointConnectionID(input string) (*StaticSitePrivat } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseStaticSitePrivateEndpointConnectionIDInsensitively(input string) (*Sta } id := StaticSitePrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_user.go b/resource-manager/web/2023-12-01/staticsites/id_user.go index a53ca4c5a29..40aa164640e 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_user.go +++ b/resource-manager/web/2023-12-01/staticsites/id_user.go @@ -46,7 +46,7 @@ func ParseUserID(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseUserIDInsensitively(input string) (*UserId, error) { } id := UserId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/id_userprovidedfunctionapp.go b/resource-manager/web/2023-12-01/staticsites/id_userprovidedfunctionapp.go index fb801e139a9..c86f8f50b8c 100644 --- a/resource-manager/web/2023-12-01/staticsites/id_userprovidedfunctionapp.go +++ b/resource-manager/web/2023-12-01/staticsites/id_userprovidedfunctionapp.go @@ -44,7 +44,7 @@ func ParseUserProvidedFunctionAppID(input string) (*UserProvidedFunctionAppId, e } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseUserProvidedFunctionAppIDInsensitively(input string) (*UserProvidedFun } id := UserProvidedFunctionAppId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatebasicauth.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatebasicauth.go index 34051d7923f..e320de5ee8d 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatebasicauth.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatebasicauth.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, id Stati var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatebuilddatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatebuilddatabaseconnection.go index 9fa486417cb..577ea3e3a33 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatebuilddatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatedatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatedatabaseconnection.go index 718dd346c56..4e9d93d0c60 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatedatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsiteappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsiteappsettings.go index 19e3b9c2d9d..7664955e4a5 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsiteappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsiteappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildappsettings.go index bcded5df29e..ea9eccbeb1d 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context. var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go index 4a99a9e6b1d..6ccea1d9510 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitebuildfunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go index b4181e79c23..8bc2ba7c3e0 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createorupdatestaticsitefunctionappsettings.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx conte var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_createuserrolesinvitationlink.go b/resource-manager/web/2023-12-01/staticsites/method_createuserrolesinvitationlink.go index 2c3ce3709a2..62bf2337cca 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_createuserrolesinvitationlink.go +++ b/resource-manager/web/2023-12-01/staticsites/method_createuserrolesinvitationlink.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, id var model StaticSiteUserInvitationResponseResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getbasicauth.go b/resource-manager/web/2023-12-01/staticsites/method_getbasicauth.go index 93aca3f09be..860b9bdbfd2 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getbasicauth.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getbasicauth.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBasicAuth(ctx context.Context, id StaticSiteId) (r var model StaticSiteBasicAuthPropertiesARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnection.go index 64d51db24b6..6d90dfd9ae3 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, id Bu var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go b/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go index 39323af4c15..c035b26d729 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getbuilddatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Con var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnection.go index 118dabea250..ad1f59b58d4 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetDatabaseConnection(ctx context.Context, id Databas var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnectionwithdetails.go b/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnectionwithdetails.go index 7ff319615bd..349897ee72d 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnectionwithdetails.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getdatabaseconnectionwithdetails.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackend.go b/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackend.go index b572c2a2856..553c375e975 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackend.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackend.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackend(ctx context.Context, id LinkedBacken var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackendforbuild.go b/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackendforbuild.go index 9bc02ed8de7..5761fa2c83b 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackendforbuild.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getlinkedbackendforbuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, id Buil var model StaticSiteLinkedBackendARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getprivateendpointconnection.go b/resource-manager/web/2023-12-01/staticsites/method_getprivateendpointconnection.go index 7342343fa2a..0d198e2c428 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getprivatelinkresources.go b/resource-manager/web/2023-12-01/staticsites/method_getprivatelinkresources.go index d9590943395..0234f35567a 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getprivatelinkresources.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) GetPrivateLinkResources(ctx context.Context, id Stati var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getstaticsite.go b/resource-manager/web/2023-12-01/staticsites/method_getstaticsite.go index 6096f2cb35e..f1a5134adf8 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getstaticsite.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSite(ctx context.Context, id StaticSiteId) ( var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getstaticsitebuild.go b/resource-manager/web/2023-12-01/staticsites/method_getstaticsitebuild.go index 0794f8c9a40..980e9844cd4 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getstaticsitebuild.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteBuild(ctx context.Context, id BuildId) ( var model StaticSiteBuildARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getstaticsitecustomdomain.go b/resource-manager/web/2023-12-01/staticsites/method_getstaticsitecustomdomain.go index 482be40cd04..4f067b9c862 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getstaticsitecustomdomain.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getstaticsitecustomdomain.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, id Cus var model StaticSiteCustomDomainOverviewARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go b/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go index 8b09371d9c2..0407b757d73 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsite.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.C var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go b/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go index 9419b0ecc93..6c737d6cde7 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go +++ b/resource-manager/web/2023-12-01/staticsites/method_getuserprovidedfunctionappforstaticsitebuild.go @@ -45,7 +45,6 @@ func (c StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx cont var model StaticSiteUserProvidedFunctionAppARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteappsettings.go index 5ecb3eee84b..af3f94e29fc 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, id Sta var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildappsettings.go index deb7ce043ec..b23b85384c4 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, i var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildfunctionappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildfunctionappsettings.go index 14b452b8d2a..220b09e2518 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildfunctionappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitebuildfunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Co var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteconfiguredroles.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteconfiguredroles.go index 1a015925a7f..ad252bdfded 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteconfiguredroles.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsiteconfiguredroles.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, id var model StringList result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitefunctionappsettings.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitefunctionappsettings.go index 32f56586d7e..9c4a10a187f 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitefunctionappsettings.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitefunctionappsettings.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitesecrets.go b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitesecrets.go index cc35a7c0654..f9ed5192106 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_liststaticsitesecrets.go +++ b/resource-manager/web/2023-12-01/staticsites/method_liststaticsitesecrets.go @@ -46,7 +46,6 @@ func (c StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, id StaticS var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_previewworkflow.go b/resource-manager/web/2023-12-01/staticsites/method_previewworkflow.go index f867a88a25e..2a34e3a3c41 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_previewworkflow.go +++ b/resource-manager/web/2023-12-01/staticsites/method_previewworkflow.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) PreviewWorkflow(ctx context.Context, id ProviderLocat var model StaticSitesWorkflowPreview result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go b/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go index 5cfabf447f9..c210993e945 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go +++ b/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsite.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToHeaders func (o RegisterUserProvidedFunctionAppWithStaticSiteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go b/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go index 32f030cb1b3..2d4f13d5c79 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go +++ b/resource-manager/web/2023-12-01/staticsites/method_registeruserprovidedfunctionappwithstaticsitebuild.go @@ -37,6 +37,7 @@ func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToHe func (o RegisterUserProvidedFunctionAppWithStaticSiteBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/staticsites/method_unlinkbackend.go b/resource-manager/web/2023-12-01/staticsites/method_unlinkbackend.go index 897c1be7925..27575e98684 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_unlinkbackend.go +++ b/resource-manager/web/2023-12-01/staticsites/method_unlinkbackend.go @@ -33,6 +33,7 @@ func (o UnlinkBackendOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/staticsites/method_unlinkbackendfrombuild.go b/resource-manager/web/2023-12-01/staticsites/method_unlinkbackendfrombuild.go index 7e356363af4..f6055b15e30 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_unlinkbackendfrombuild.go +++ b/resource-manager/web/2023-12-01/staticsites/method_unlinkbackendfrombuild.go @@ -33,6 +33,7 @@ func (o UnlinkBackendFromBuildOperationOptions) ToHeaders() *client.Headers { func (o UnlinkBackendFromBuildOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/staticsites/method_updatebuilddatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_updatebuilddatabaseconnection.go index c9611ae5cb3..2c78c742cf3 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_updatebuilddatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_updatebuilddatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, id var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_updatedatabaseconnection.go b/resource-manager/web/2023-12-01/staticsites/method_updatedatabaseconnection.go index 6e37673f34d..c2bab9a13a3 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_updatedatabaseconnection.go +++ b/resource-manager/web/2023-12-01/staticsites/method_updatedatabaseconnection.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, id Data var model DatabaseConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_updatestaticsite.go b/resource-manager/web/2023-12-01/staticsites/method_updatestaticsite.go index 2db8a28235a..c1706e09ddb 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_updatestaticsite.go +++ b/resource-manager/web/2023-12-01/staticsites/method_updatestaticsite.go @@ -50,7 +50,6 @@ func (c StaticSitesClient) UpdateStaticSite(ctx context.Context, id StaticSiteId var model StaticSiteARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/method_updatestaticsiteuser.go b/resource-manager/web/2023-12-01/staticsites/method_updatestaticsiteuser.go index ddcb14fbcc6..7741cafbf21 100644 --- a/resource-manager/web/2023-12-01/staticsites/method_updatestaticsiteuser.go +++ b/resource-manager/web/2023-12-01/staticsites/method_updatestaticsiteuser.go @@ -49,7 +49,6 @@ func (c StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, id UserId, var model StaticSiteUserARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/staticsites/version.go b/resource-manager/web/2023-12-01/staticsites/version.go index 18154ade274..4b145630b5c 100644 --- a/resource-manager/web/2023-12-01/staticsites/version.go +++ b/resource-manager/web/2023-12-01/staticsites/version.go @@ -1,12 +1,10 @@ package staticsites -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticsites/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/staticsites/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/topleveldomains/README.md b/resource-manager/web/2023-12-01/topleveldomains/README.md index 513d7ddc42d..63441efe756 100644 --- a/resource-manager/web/2023-12-01/topleveldomains/README.md +++ b/resource-manager/web/2023-12-01/topleveldomains/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/topleveldomains` Documentation -The `topleveldomains` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `topleveldomains` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/topleveldomains/client.go b/resource-manager/web/2023-12-01/topleveldomains/client.go index f688cee500e..73312d38791 100644 --- a/resource-manager/web/2023-12-01/topleveldomains/client.go +++ b/resource-manager/web/2023-12-01/topleveldomains/client.go @@ -15,7 +15,7 @@ type TopLevelDomainsClient struct { } func NewTopLevelDomainsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopLevelDomainsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "topleveldomains", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "topleveldomains", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating TopLevelDomainsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/topleveldomains/id_topleveldomain.go b/resource-manager/web/2023-12-01/topleveldomains/id_topleveldomain.go index acfeab4dadd..6f6ab16698b 100644 --- a/resource-manager/web/2023-12-01/topleveldomains/id_topleveldomain.go +++ b/resource-manager/web/2023-12-01/topleveldomains/id_topleveldomain.go @@ -40,7 +40,7 @@ func ParseTopLevelDomainID(input string) (*TopLevelDomainId, error) { } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseTopLevelDomainIDInsensitively(input string) (*TopLevelDomainId, error) } id := TopLevelDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/topleveldomains/method_get.go b/resource-manager/web/2023-12-01/topleveldomains/method_get.go index f8281b382bd..b9320d14b1f 100644 --- a/resource-manager/web/2023-12-01/topleveldomains/method_get.go +++ b/resource-manager/web/2023-12-01/topleveldomains/method_get.go @@ -45,7 +45,6 @@ func (c TopLevelDomainsClient) Get(ctx context.Context, id TopLevelDomainId) (re var model TopLevelDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/topleveldomains/version.go b/resource-manager/web/2023-12-01/topleveldomains/version.go index 6213fcd72da..1c21a3fa108 100644 --- a/resource-manager/web/2023-12-01/topleveldomains/version.go +++ b/resource-manager/web/2023-12-01/topleveldomains/version.go @@ -1,12 +1,10 @@ package topleveldomains -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/topleveldomains/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/topleveldomains/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/webapps/README.md b/resource-manager/web/2023-12-01/webapps/README.md index b166355d1dd..229e1860b1b 100644 --- a/resource-manager/web/2023-12-01/webapps/README.md +++ b/resource-manager/web/2023-12-01/webapps/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/webapps` Documentation -The `webapps` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `webapps` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/webapps/client.go b/resource-manager/web/2023-12-01/webapps/client.go index 5b73caa6cf9..cfd22cd9b25 100644 --- a/resource-manager/web/2023-12-01/webapps/client.go +++ b/resource-manager/web/2023-12-01/webapps/client.go @@ -15,7 +15,7 @@ type WebAppsClient struct { } func NewWebAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*WebAppsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webapps", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webapps", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebAppsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/webapps/id_appsetting.go b/resource-manager/web/2023-12-01/webapps/id_appsetting.go index f79067efc7a..6570aa7135e 100644 --- a/resource-manager/web/2023-12-01/webapps/id_appsetting.go +++ b/resource-manager/web/2023-12-01/webapps/id_appsetting.go @@ -44,7 +44,7 @@ func ParseAppSettingID(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseAppSettingIDInsensitively(input string) (*AppSettingId, error) { } id := AppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_backup.go b/resource-manager/web/2023-12-01/webapps/id_backup.go index c93bb6ba405..8f56fe8e86e 100644 --- a/resource-manager/web/2023-12-01/webapps/id_backup.go +++ b/resource-manager/web/2023-12-01/webapps/id_backup.go @@ -44,7 +44,7 @@ func ParseBackupID(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseBackupIDInsensitively(input string) (*BackupId, error) { } id := BackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go b/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go index 68ac42d6ea7..9dccf717dc5 100644 --- a/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go +++ b/resource-manager/web/2023-12-01/webapps/id_configreferenceappsetting.go @@ -46,7 +46,7 @@ func ParseConfigReferenceAppSettingID(input string) (*ConfigReferenceAppSettingI } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceAppSettingIDInsensitively(input string) (*ConfigReferen } id := ConfigReferenceAppSettingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go b/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go index 73f0b28fde9..aea5296e526 100644 --- a/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go +++ b/resource-manager/web/2023-12-01/webapps/id_configreferenceconnectionstring.go @@ -46,7 +46,7 @@ func ParseConfigReferenceConnectionStringID(input string) (*ConfigReferenceConne } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseConfigReferenceConnectionStringIDInsensitively(input string) (*ConfigR } id := ConfigReferenceConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_connectionstring.go b/resource-manager/web/2023-12-01/webapps/id_connectionstring.go index 9e8a7bdf65a..f1204be3c86 100644 --- a/resource-manager/web/2023-12-01/webapps/id_connectionstring.go +++ b/resource-manager/web/2023-12-01/webapps/id_connectionstring.go @@ -44,7 +44,7 @@ func ParseConnectionStringID(input string) (*ConnectionStringId, error) { } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseConnectionStringIDInsensitively(input string) (*ConnectionStringId, er } id := ConnectionStringId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go b/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go index bd064699944..da1f781d51c 100644 --- a/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_continuouswebjob.go @@ -44,7 +44,7 @@ func ParseContinuousWebJobID(input string) (*ContinuousWebJobId, error) { } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseContinuousWebJobIDInsensitively(input string) (*ContinuousWebJobId, er } id := ContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_default.go b/resource-manager/web/2023-12-01/webapps/id_default.go index c191cc07347..ebbf559eca2 100644 --- a/resource-manager/web/2023-12-01/webapps/id_default.go +++ b/resource-manager/web/2023-12-01/webapps/id_default.go @@ -46,7 +46,7 @@ func ParseDefaultID(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseDefaultIDInsensitively(input string) (*DefaultId, error) { } id := DefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_deployment.go b/resource-manager/web/2023-12-01/webapps/id_deployment.go index a9c9751643f..29e705e77b3 100644 --- a/resource-manager/web/2023-12-01/webapps/id_deployment.go +++ b/resource-manager/web/2023-12-01/webapps/id_deployment.go @@ -44,7 +44,7 @@ func ParseDeploymentID(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error) { } id := DeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go b/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go index 45cb4c5271d..91bcb81f8ed 100644 --- a/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/webapps/id_domainownershipidentifier.go @@ -44,7 +44,7 @@ func ParseDomainOwnershipIdentifierID(input string) (*DomainOwnershipIdentifierI } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDomainOwnershipIdentifierIDInsensitively(input string) (*DomainOwnersh } id := DomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_function.go b/resource-manager/web/2023-12-01/webapps/id_function.go index 4b864194a47..0582f2765c2 100644 --- a/resource-manager/web/2023-12-01/webapps/id_function.go +++ b/resource-manager/web/2023-12-01/webapps/id_function.go @@ -44,7 +44,7 @@ func ParseFunctionID(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseFunctionIDInsensitively(input string) (*FunctionId, error) { } id := FunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_functionkey.go b/resource-manager/web/2023-12-01/webapps/id_functionkey.go index 0e8c227341e..e5073a1ee1e 100644 --- a/resource-manager/web/2023-12-01/webapps/id_functionkey.go +++ b/resource-manager/web/2023-12-01/webapps/id_functionkey.go @@ -48,7 +48,7 @@ func ParseFunctionKeyID(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseFunctionKeyIDInsensitively(input string) (*FunctionKeyId, error) { } id := FunctionKeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_gateway.go b/resource-manager/web/2023-12-01/webapps/id_gateway.go index ca31ece2066..d8ce5ae92ac 100644 --- a/resource-manager/web/2023-12-01/webapps/id_gateway.go +++ b/resource-manager/web/2023-12-01/webapps/id_gateway.go @@ -46,7 +46,7 @@ func ParseGatewayID(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseGatewayIDInsensitively(input string) (*GatewayId, error) { } id := GatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_history.go b/resource-manager/web/2023-12-01/webapps/id_history.go index 27f2d61eb6e..23ea7bea0d7 100644 --- a/resource-manager/web/2023-12-01/webapps/id_history.go +++ b/resource-manager/web/2023-12-01/webapps/id_history.go @@ -46,7 +46,7 @@ func ParseHistoryID(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseHistoryIDInsensitively(input string) (*HistoryId, error) { } id := HistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_hostdefault.go b/resource-manager/web/2023-12-01/webapps/id_hostdefault.go index 5278463ffbf..92bbf2f8abc 100644 --- a/resource-manager/web/2023-12-01/webapps/id_hostdefault.go +++ b/resource-manager/web/2023-12-01/webapps/id_hostdefault.go @@ -48,7 +48,7 @@ func ParseHostDefaultID(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseHostDefaultIDInsensitively(input string) (*HostDefaultId, error) { } id := HostDefaultId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go b/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go index dd781b22a7b..a4b717ec937 100644 --- a/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go +++ b/resource-manager/web/2023-12-01/webapps/id_hostnamebinding.go @@ -44,7 +44,7 @@ func ParseHostNameBindingID(input string) (*HostNameBindingId, error) { } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHostNameBindingIDInsensitively(input string) (*HostNameBindingId, erro } id := HostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go b/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go index 01b9c8a8590..327a6eeaeee 100644 --- a/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_hybridconnection.go @@ -44,7 +44,7 @@ func ParseHybridConnectionID(input string) (*HybridConnectionId, error) { } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, er } id := HybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_instance.go b/resource-manager/web/2023-12-01/webapps/id_instance.go index f32fdae320a..4d51a7de35f 100644 --- a/resource-manager/web/2023-12-01/webapps/id_instance.go +++ b/resource-manager/web/2023-12-01/webapps/id_instance.go @@ -44,7 +44,7 @@ func ParseInstanceID(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseInstanceIDInsensitively(input string) (*InstanceId, error) { } id := InstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go b/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go index e5913d50a18..e3dd2b9ec98 100644 --- a/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go +++ b/resource-manager/web/2023-12-01/webapps/id_instanceprocess.go @@ -46,7 +46,7 @@ func ParseInstanceProcessID(input string) (*InstanceProcessId, error) { } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseInstanceProcessIDInsensitively(input string) (*InstanceProcessId, erro } id := InstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go b/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go index d905ee1acd0..5db7365c1f7 100644 --- a/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go +++ b/resource-manager/web/2023-12-01/webapps/id_instanceprocessmodule.go @@ -48,7 +48,7 @@ func ParseInstanceProcessModuleID(input string) (*InstanceProcessModuleId, error } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseInstanceProcessModuleIDInsensitively(input string) (*InstanceProcessMo } id := InstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_key.go b/resource-manager/web/2023-12-01/webapps/id_key.go index cbdd8974ed7..10827d52737 100644 --- a/resource-manager/web/2023-12-01/webapps/id_key.go +++ b/resource-manager/web/2023-12-01/webapps/id_key.go @@ -46,7 +46,7 @@ func ParseKeyID(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseKeyIDInsensitively(input string) (*KeyId, error) { } id := KeyId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_module.go b/resource-manager/web/2023-12-01/webapps/id_module.go index fa4c8e1c74c..d8020f716b7 100644 --- a/resource-manager/web/2023-12-01/webapps/id_module.go +++ b/resource-manager/web/2023-12-01/webapps/id_module.go @@ -46,7 +46,7 @@ func ParseModuleID(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseModuleIDInsensitively(input string) (*ModuleId, error) { } id := ModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_networkfeature.go b/resource-manager/web/2023-12-01/webapps/id_networkfeature.go index 392453252e2..280955814b0 100644 --- a/resource-manager/web/2023-12-01/webapps/id_networkfeature.go +++ b/resource-manager/web/2023-12-01/webapps/id_networkfeature.go @@ -44,7 +44,7 @@ func ParseNetworkFeatureID(input string) (*NetworkFeatureId, error) { } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkFeatureIDInsensitively(input string) (*NetworkFeatureId, error) } id := NetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_networktrace.go b/resource-manager/web/2023-12-01/webapps/id_networktrace.go index 28b0b24703c..ea534f344cf 100644 --- a/resource-manager/web/2023-12-01/webapps/id_networktrace.go +++ b/resource-manager/web/2023-12-01/webapps/id_networktrace.go @@ -44,7 +44,7 @@ func ParseNetworkTraceID(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseNetworkTraceIDInsensitively(input string) (*NetworkTraceId, error) { } id := NetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_premieraddon.go b/resource-manager/web/2023-12-01/webapps/id_premieraddon.go index dfee9125f05..59d273ad195 100644 --- a/resource-manager/web/2023-12-01/webapps/id_premieraddon.go +++ b/resource-manager/web/2023-12-01/webapps/id_premieraddon.go @@ -44,7 +44,7 @@ func ParsePremierAddonID(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePremierAddonIDInsensitively(input string) (*PremierAddonId, error) { } id := PremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go b/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go index 30ff5bd5111..5679ccc111e 100644 --- a/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_process.go b/resource-manager/web/2023-12-01/webapps/id_process.go index f50f0ce9a31..aa68d26d279 100644 --- a/resource-manager/web/2023-12-01/webapps/id_process.go +++ b/resource-manager/web/2023-12-01/webapps/id_process.go @@ -44,7 +44,7 @@ func ParseProcessID(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProcessIDInsensitively(input string) (*ProcessId, error) { } id := ProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_processmodule.go b/resource-manager/web/2023-12-01/webapps/id_processmodule.go index d82b0bb7c2a..93cb8fe4496 100644 --- a/resource-manager/web/2023-12-01/webapps/id_processmodule.go +++ b/resource-manager/web/2023-12-01/webapps/id_processmodule.go @@ -48,7 +48,7 @@ func ParseProcessModuleID(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseProcessModuleIDInsensitively(input string) (*ProcessModuleId, error) { } id := ProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go b/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go index 73c217f6800..66edd7f2d3d 100644 --- a/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go +++ b/resource-manager/web/2023-12-01/webapps/id_publiccertificate.go @@ -44,7 +44,7 @@ func ParsePublicCertificateID(input string) (*PublicCertificateId, error) { } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePublicCertificateIDInsensitively(input string) (*PublicCertificateId, } id := PublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_relay.go b/resource-manager/web/2023-12-01/webapps/id_relay.go index 52a8e92c8f5..2b3d9907b79 100644 --- a/resource-manager/web/2023-12-01/webapps/id_relay.go +++ b/resource-manager/web/2023-12-01/webapps/id_relay.go @@ -46,7 +46,7 @@ func ParseRelayID(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRelayIDInsensitively(input string) (*RelayId, error) { } id := RelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go b/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go index 27ca4fa3c10..ce60a0a5674 100644 --- a/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go +++ b/resource-manager/web/2023-12-01/webapps/id_sitecontainer.go @@ -44,7 +44,7 @@ func ParseSitecontainerID(input string) (*SitecontainerId, error) { } id := SitecontainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSitecontainerIDInsensitively(input string) (*SitecontainerId, error) { } id := SitecontainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_siteextension.go b/resource-manager/web/2023-12-01/webapps/id_siteextension.go index 769e3f2466e..96a3ca4de74 100644 --- a/resource-manager/web/2023-12-01/webapps/id_siteextension.go +++ b/resource-manager/web/2023-12-01/webapps/id_siteextension.go @@ -44,7 +44,7 @@ func ParseSiteExtensionID(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteExtensionIDInsensitively(input string) (*SiteExtensionId, error) { } id := SiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go b/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go index 69b7e658c0c..1cdefda2edb 100644 --- a/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go +++ b/resource-manager/web/2023-12-01/webapps/id_sitenetworktrace.go @@ -44,7 +44,7 @@ func ParseSiteNetworkTraceID(input string) (*SiteNetworkTraceId, error) { } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSiteNetworkTraceIDInsensitively(input string) (*SiteNetworkTraceId, er } id := SiteNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go b/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go index 0ce16071841..ccebe930003 100644 --- a/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go +++ b/resource-manager/web/2023-12-01/webapps/id_siteslotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSiteSlotNetworkTraceID(input string) (*SiteSlotNetworkTraceId, error) } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSiteSlotNetworkTraceIDInsensitively(input string) (*SiteSlotNetworkTra } id := SiteSlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slot.go b/resource-manager/web/2023-12-01/webapps/id_slot.go index 37093c01152..904e83746a2 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slot.go +++ b/resource-manager/web/2023-12-01/webapps/id_slot.go @@ -44,7 +44,7 @@ func ParseSlotID(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSlotIDInsensitively(input string) (*SlotId, error) { } id := SlotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotbackup.go b/resource-manager/web/2023-12-01/webapps/id_slotbackup.go index 7e922478028..3e0321cb7b1 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotbackup.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotbackup.go @@ -46,7 +46,7 @@ func ParseSlotBackupID(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotBackupIDInsensitively(input string) (*SlotBackupId, error) { } id := SlotBackupId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go b/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go index 4c005d225dd..7b853f0fd87 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotcontinuouswebjob.go @@ -46,7 +46,7 @@ func ParseSlotContinuousWebJobID(input string) (*SlotContinuousWebJobId, error) } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotContinuousWebJobIDInsensitively(input string) (*SlotContinuousWebJ } id := SlotContinuousWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go b/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go index c98c86d914f..b9b1f22fcb8 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotdeployment.go @@ -46,7 +46,7 @@ func ParseSlotDeploymentID(input string) (*SlotDeploymentId, error) { } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDeploymentIDInsensitively(input string) (*SlotDeploymentId, error) } id := SlotDeploymentId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go b/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go index d8889a92f84..4cb30290217 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotdomainownershipidentifier.go @@ -46,7 +46,7 @@ func ParseSlotDomainOwnershipIdentifierID(input string) (*SlotDomainOwnershipIde } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotDomainOwnershipIdentifierIDInsensitively(input string) (*SlotDomai } id := SlotDomainOwnershipIdentifierId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotfunction.go b/resource-manager/web/2023-12-01/webapps/id_slotfunction.go index 5578c099117..b39b0b6a41e 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotfunction.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotfunction.go @@ -46,7 +46,7 @@ func ParseSlotFunctionID(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotFunctionIDInsensitively(input string) (*SlotFunctionId, error) { } id := SlotFunctionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go b/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go index 5e5e069e779..d67f8c26989 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go +++ b/resource-manager/web/2023-12-01/webapps/id_slothostnamebinding.go @@ -46,7 +46,7 @@ func ParseSlotHostNameBindingID(input string) (*SlotHostNameBindingId, error) { } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHostNameBindingIDInsensitively(input string) (*SlotHostNameBinding } id := SlotHostNameBindingId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go b/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go index c59108e4984..9b39556db89 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_slothybridconnection.go @@ -46,7 +46,7 @@ func ParseSlotHybridConnectionID(input string) (*SlotHybridConnectionId, error) } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotHybridConnectionIDInsensitively(input string) (*SlotHybridConnecti } id := SlotHybridConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go b/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go index a990de1a626..b1dc3be246b 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go +++ b/resource-manager/web/2023-12-01/webapps/id_slothybridconnectionnamespacerelay.go @@ -48,7 +48,7 @@ func ParseSlotHybridConnectionNamespaceRelayID(input string) (*SlotHybridConnect } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotHybridConnectionNamespaceRelayIDInsensitively(input string) (*Slot } id := SlotHybridConnectionNamespaceRelayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotinstance.go b/resource-manager/web/2023-12-01/webapps/id_slotinstance.go index 982475e3199..f1216d28421 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotinstance.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotinstance.go @@ -46,7 +46,7 @@ func ParseSlotInstanceID(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotInstanceIDInsensitively(input string) (*SlotInstanceId, error) { } id := SlotInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go b/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go index bec31e27acc..88b8a031f84 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocess.go @@ -48,7 +48,7 @@ func ParseSlotInstanceProcessID(input string) (*SlotInstanceProcessId, error) { } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotInstanceProcessIDInsensitively(input string) (*SlotInstanceProcess } id := SlotInstanceProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go b/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go index f1d5cdb11e7..b9eee6e21eb 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotinstanceprocessmodule.go @@ -50,7 +50,7 @@ func ParseSlotInstanceProcessModuleID(input string) (*SlotInstanceProcessModuleI } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseSlotInstanceProcessModuleIDInsensitively(input string) (*SlotInstanceP } id := SlotInstanceProcessModuleId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go b/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go index 9a2a2655b20..dfad1a5284a 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotnetworkfeature.go @@ -46,7 +46,7 @@ func ParseSlotNetworkFeatureID(input string) (*SlotNetworkFeatureId, error) { } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkFeatureIDInsensitively(input string) (*SlotNetworkFeatureId } id := SlotNetworkFeatureId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go b/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go index f0baafea877..62d655b9a89 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotnetworktrace.go @@ -46,7 +46,7 @@ func ParseSlotNetworkTraceID(input string) (*SlotNetworkTraceId, error) { } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotNetworkTraceIDInsensitively(input string) (*SlotNetworkTraceId, er } id := SlotNetworkTraceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go b/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go index 363aac4042d..f745f77c9ad 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotpremieraddon.go @@ -46,7 +46,7 @@ func ParseSlotPremierAddonID(input string) (*SlotPremierAddonId, error) { } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPremierAddonIDInsensitively(input string) (*SlotPremierAddonId, er } id := SlotPremierAddonId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go b/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go index 06c33c64213..286e37ae7e1 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotprivateendpointconnection.go @@ -46,7 +46,7 @@ func ParseSlotPrivateEndpointConnectionID(input string) (*SlotPrivateEndpointCon } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPrivateEndpointConnectionIDInsensitively(input string) (*SlotPriva } id := SlotPrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotprocess.go b/resource-manager/web/2023-12-01/webapps/id_slotprocess.go index 85065bd680f..7419d4ae937 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotprocess.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotprocess.go @@ -46,7 +46,7 @@ func ParseSlotProcessID(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotProcessIDInsensitively(input string) (*SlotProcessId, error) { } id := SlotProcessId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go b/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go index 9cc7df5ef0f..0acaac78d6d 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotpubliccertificate.go @@ -46,7 +46,7 @@ func ParseSlotPublicCertificateID(input string) (*SlotPublicCertificateId, error } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotPublicCertificateIDInsensitively(input string) (*SlotPublicCertifi } id := SlotPublicCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go b/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go index 8866f09575f..9904df7cbd4 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotsitecontainer.go @@ -46,7 +46,7 @@ func ParseSlotSitecontainerID(input string) (*SlotSitecontainerId, error) { } id := SlotSitecontainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotSitecontainerIDInsensitively(input string) (*SlotSitecontainerId, } id := SlotSitecontainerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go b/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go index 24d7fa27fec..877dd5c40f8 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotsiteextension.go @@ -46,7 +46,7 @@ func ParseSlotSiteExtensionID(input string) (*SlotSiteExtensionId, error) { } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotSiteExtensionIDInsensitively(input string) (*SlotSiteExtensionId, } id := SlotSiteExtensionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go b/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go index 8fcdb7a3629..27a76ce5f56 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_slottriggeredwebjob.go @@ -46,7 +46,7 @@ func ParseSlotTriggeredWebJobID(input string) (*SlotTriggeredWebJobId, error) { } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotTriggeredWebJobIDInsensitively(input string) (*SlotTriggeredWebJob } id := SlotTriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go b/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go index a5612467edd..86175e99aca 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnection.go @@ -46,7 +46,7 @@ func ParseSlotVirtualNetworkConnectionID(input string) (*SlotVirtualNetworkConne } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotVirtualNetworkConnectionIDInsensitively(input string) (*SlotVirtua } id := SlotVirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go b/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go index c730133f642..4888ace938b 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotvirtualnetworkconnectiongateway.go @@ -48,7 +48,7 @@ func ParseSlotVirtualNetworkConnectionGatewayID(input string) (*SlotVirtualNetwo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseSlotVirtualNetworkConnectionGatewayIDInsensitively(input string) (*Slo } id := SlotVirtualNetworkConnectionGatewayId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go b/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go index 2d33ce09820..6c144dae3e9 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotwebjob.go @@ -46,7 +46,7 @@ func ParseSlotWebJobID(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWebJobIDInsensitively(input string) (*SlotWebJobId, error) { } id := SlotWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go b/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go index cc9df4ec42e..6be59d05f47 100644 --- a/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go +++ b/resource-manager/web/2023-12-01/webapps/id_slotworkflow.go @@ -46,7 +46,7 @@ func ParseSlotWorkflowID(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseSlotWorkflowIDInsensitively(input string) (*SlotWorkflowId, error) { } id := SlotWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_snapshot.go b/resource-manager/web/2023-12-01/webapps/id_snapshot.go index acd841b4273..26564e21d79 100644 --- a/resource-manager/web/2023-12-01/webapps/id_snapshot.go +++ b/resource-manager/web/2023-12-01/webapps/id_snapshot.go @@ -44,7 +44,7 @@ func ParseSnapshotID(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSnapshotIDInsensitively(input string) (*SnapshotId, error) { } id := SnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go b/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go index 7d689de870f..43ad4bf8382 100644 --- a/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_triggeredwebjob.go @@ -44,7 +44,7 @@ func ParseTriggeredWebJobID(input string) (*TriggeredWebJobId, error) { } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseTriggeredWebJobIDInsensitively(input string) (*TriggeredWebJobId, erro } id := TriggeredWebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go b/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go index cf7cd111d53..7af6650a4c7 100644 --- a/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go +++ b/resource-manager/web/2023-12-01/webapps/id_triggeredwebjobhistory.go @@ -48,7 +48,7 @@ func ParseTriggeredWebJobHistoryID(input string) (*TriggeredWebJobHistoryId, err } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggeredWebJobHistoryIDInsensitively(input string) (*TriggeredWebJobH } id := TriggeredWebJobHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go b/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go index 7ac96780e13..254f04902dd 100644 --- a/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go +++ b/resource-manager/web/2023-12-01/webapps/id_virtualnetworkconnection.go @@ -44,7 +44,7 @@ func ParseVirtualNetworkConnectionID(input string) (*VirtualNetworkConnectionId, } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseVirtualNetworkConnectionIDInsensitively(input string) (*VirtualNetwork } id := VirtualNetworkConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_webjob.go b/resource-manager/web/2023-12-01/webapps/id_webjob.go index 1f27a30a1ec..33070b5e399 100644 --- a/resource-manager/web/2023-12-01/webapps/id_webjob.go +++ b/resource-manager/web/2023-12-01/webapps/id_webjob.go @@ -44,7 +44,7 @@ func ParseWebJobID(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWebJobIDInsensitively(input string) (*WebJobId, error) { } id := WebJobId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_websnapshot.go b/resource-manager/web/2023-12-01/webapps/id_websnapshot.go index 705a6fbcaf9..df92a0940d6 100644 --- a/resource-manager/web/2023-12-01/webapps/id_websnapshot.go +++ b/resource-manager/web/2023-12-01/webapps/id_websnapshot.go @@ -46,7 +46,7 @@ func ParseWebSnapshotID(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseWebSnapshotIDInsensitively(input string) (*WebSnapshotId, error) { } id := WebSnapshotId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/id_workflow.go b/resource-manager/web/2023-12-01/webapps/id_workflow.go index 4519773f55f..cfc67507afa 100644 --- a/resource-manager/web/2023-12-01/webapps/id_workflow.go +++ b/resource-manager/web/2023-12-01/webapps/id_workflow.go @@ -44,7 +44,7 @@ func ParseWorkflowID(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error) { } id := WorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go b/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go index 7faf7f7e01c..cfb57af1bf6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go +++ b/resource-manager/web/2023-12-01/webapps/method_addpremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOn(ctx context.Context, id PremierAddonId, i var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go b/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go index 5a4fa5470e0..aeafde304bb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_addpremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) AddPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go b/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go index b5b486f1e77..11970d2903f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go +++ b/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostname.go @@ -35,6 +35,7 @@ func (o AnalyzeCustomHostnameOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -75,7 +76,6 @@ func (c WebAppsClient) AnalyzeCustomHostname(ctx context.Context, id commonids.A var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go b/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go index 4c608ff0d59..b2430c9f9ba 100644 --- a/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_analyzecustomhostnameslot.go @@ -34,6 +34,7 @@ func (o AnalyzeCustomHostnameSlotOperationOptions) ToHeaders() *client.Headers { func (o AnalyzeCustomHostnameSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -74,7 +75,6 @@ func (c WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, id SlotId, var model CustomHostnameAnalysisResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_backup.go b/resource-manager/web/2023-12-01/webapps/method_backup.go index e8c66757e12..c1c49689e19 100644 --- a/resource-manager/web/2023-12-01/webapps/method_backup.go +++ b/resource-manager/web/2023-12-01/webapps/method_backup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Backup(ctx context.Context, id commonids.AppServiceId, in var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_backupslot.go b/resource-manager/web/2023-12-01/webapps/method_backupslot.go index 81ab5d55571..bb5f136eda5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_backupslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_backupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) BackupSlot(ctx context.Context, id SlotId, input BackupRe var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createdeployment.go b/resource-manager/web/2023-12-01/webapps/method_createdeployment.go index 2be253afc7e..942b704fb67 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createdeployment.go +++ b/resource-manager/web/2023-12-01/webapps/method_createdeployment.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeployment(ctx context.Context, id DeploymentId, in var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go b/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go index 6cf4e309a20..69c846f798e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createdeploymentslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateDeploymentSlot(ctx context.Context, id SlotDeployme var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go b/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go index 38e5c6a38a1..d313d5b7340 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go +++ b/resource-manager/web/2023-12-01/webapps/method_createonedeployoperation.go @@ -47,7 +47,6 @@ func (c WebAppsClient) CreateOneDeployOperation(ctx context.Context, id commonid var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go index 0949625e755..85500fcf708 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, id commo var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go index 6d8c147b26c..b41a356aa13 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, id S var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go index 42d7d52d965..54114dd7cb9 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Conte var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go index 1147ef7573e..001554898ac 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.C var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go index 2ed0a2ab525..92497573560 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, id KeyI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go index 16ba00bde18..0540fca8947 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatefunctionsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, id var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go index b239472ab87..3a47a4207d0 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebinding.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, id Hos var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go index ad9378dfe37..f0746cde4e6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostnamebindingslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, id var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go index 191c579b5d8..1b3b65509c9 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecret.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, id DefaultI var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go index f3badff4dfe..f9bbc6bef55 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehostsecretslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, id Host var model KeyInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go index 74629a106ec..5c7b767edf5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, id Re var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go index c08c5ecf83b..480ee3d1593 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go index b25986d572e..b9aaaedb0d2 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificate.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, id P var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go index ec82a67e3a3..b53ffdea524 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatepubliccertificateslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go b/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go index 0e475ea9495..8cd02d31bd7 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go index df30da026a8..ade59122646 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Cont var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go index 5d5cf5440eb..dfcf5fb0bf7 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainer.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateSiteContainer(ctx context.Context, id Sitec var model SiteContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go index 2c906d04f91..d122bbc52da 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatesitecontainerslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateSiteContainerSlot(ctx context.Context, id S var model SiteContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go index d2c9fca2d78..fcc6949b431 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go index 7ababeb64de..d5f3050db94 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go index c98acf2757f..2b041462b62 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, id Virt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go index f7c2605a07d..0f1c95c3f39 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go index a4040491cd6..d09166ca8e2 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Conte var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go index 060b5673b5a..ca68e315257 100644 --- a/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_createorupdatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, id var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_delete.go b/resource-manager/web/2023-12-01/webapps/method_delete.go index 491e0c6eca1..9849348f6db 100644 --- a/resource-manager/web/2023-12-01/webapps/method_delete.go +++ b/resource-manager/web/2023-12-01/webapps/method_delete.go @@ -35,6 +35,7 @@ func (o DeleteOperationOptions) ToHeaders() *client.Headers { func (o DeleteOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_deleteslot.go b/resource-manager/web/2023-12-01/webapps/method_deleteslot.go index c2d4db43a52..67b4c2dcc06 100644 --- a/resource-manager/web/2023-12-01/webapps/method_deleteslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_deleteslot.go @@ -34,6 +34,7 @@ func (o DeleteSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go b/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go index 7416e19fd09..dd5b73ad1b4 100644 --- a/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go +++ b/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrol.go @@ -34,6 +34,7 @@ func (o DeleteSourceControlOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go b/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go index 571dfbab3ab..45220bcdbd1 100644 --- a/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_deletesourcecontrolslot.go @@ -33,6 +33,7 @@ func (o DeleteSourceControlSlotOperationOptions) ToHeaders() *client.Headers { func (o DeleteSourceControlSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go b/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go index a1d107c462f..85b417c4364 100644 --- a/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go +++ b/resource-manager/web/2023-12-01/webapps/method_discoverbackup.go @@ -51,7 +51,6 @@ func (c WebAppsClient) DiscoverBackup(ctx context.Context, id commonids.AppServi var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go b/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go index 15773ae16b5..bc2c9a593cb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_discoverbackupslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) DiscoverBackupSlot(ctx context.Context, id SlotId, input var model RestoreRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_get.go b/resource-manager/web/2023-12-01/webapps/method_get.go index 23962fb39aa..31066458715 100644 --- a/resource-manager/web/2023-12-01/webapps/method_get.go +++ b/resource-manager/web/2023-12-01/webapps/method_get.go @@ -46,7 +46,6 @@ func (c WebAppsClient) Get(ctx context.Context, id commonids.AppServiceId) (resu var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go b/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go index 29c9f5b97a8..f27fab51318 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go +++ b/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, id Ap var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go b/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go index 4dd14572ebb..99870c87c7b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getappsettingkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, i var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go index dab06c29867..5deb735be93 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettings(ctx context.Context, id commonids.AppServ var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go index 1a60695f628..8e803724937 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsSlot(ctx context.Context, id SlotId) (resu var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go index fb5709f7073..a0504e9fd96 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2(ctx context.Context, id commonids.AppSe var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go index aa047a0dfd3..1709a5010c1 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2slot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, id SlotId) (re var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go index 01bf74554cf..124903a090d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecrets.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, id c var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go index 77753e1df7a..a969211442f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getauthsettingsv2withoutsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go index 2f529b24e69..89906332ea3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_getbackupconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetBackupConfiguration(ctx context.Context, id commonids. var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go index 865164a69ac..7be87a5817a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getbackupconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, id SlotId var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go b/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go index 24a6bb275d0..ab296926328 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go +++ b/resource-manager/web/2023-12-01/webapps/method_getbackupstatus.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatus(ctx context.Context, id BackupId) (result var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go b/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go index a56211ca854..0e862af25fb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getbackupstatusslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetBackupStatusSlot(ctx context.Context, id SlotBackupId) var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go index 7651c296acf..1d73ea645f6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_getconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetConfiguration(ctx context.Context, id commonids.AppSer var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go index 9b190aed52b..89546b08eb1 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetConfigurationSlot(ctx context.Context, id SlotId) (res var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go b/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go index 0b163fa0d01..016b9fcd3bf 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshot(ctx context.Context, id Snapshot var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go b/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go index 0923d5bafca..80d0457f72f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getconfigurationsnapshotslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, id WebS var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go b/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go index 2f8ced54505..b0790356147 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go +++ b/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszip.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetContainerLogsZip(ctx context.Context, id commonids.App var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go b/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go index 7fa0bf62727..080f4f9691c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getcontainerlogszipslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, id SlotId) ( var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go b/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go index 9070b5b9190..9f5a071f437 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go +++ b/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJob(ctx context.Context, id ContinuousWeb var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go b/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go index 647b7a57557..8d4e01c6c04 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getcontinuouswebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, id SlotConti var model ContinuousWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdeployment.go b/resource-manager/web/2023-12-01/webapps/method_getdeployment.go index 02efcfee65f..0355511e44e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdeployment.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdeployment.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeployment(ctx context.Context, id DeploymentId) (resu var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go b/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go index f382ca1b97a..4ab616abcec 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdeploymentslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDeploymentSlot(ctx context.Context, id SlotDeploymentI var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go index 2995cd9178b..0612d0c160c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfiguration.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, id co var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go index ea9587ae477..aef303209ac 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdiagnosticlogsconfigurationslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, i var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go b/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go index 6b9014ae5b1..44658be8e1a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifier.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, id Doma var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go b/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go index 5b5d7404532..a2e91d0b828 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getdomainownershipidentifierslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, id var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go b/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go index cb3b41f0b65..3fb4b79a51b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go +++ b/resource-manager/web/2023-12-01/webapps/method_getftpallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFtpAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go b/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go index 67419725f8e..2b3a8004dfc 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getftpallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFtpAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getfunction.go b/resource-manager/web/2023-12-01/webapps/method_getfunction.go index 91ccc8cdb31..c119bf71fa2 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getfunction.go +++ b/resource-manager/web/2023-12-01/webapps/method_getfunction.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetFunction(ctx context.Context, id FunctionId) (result G var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go b/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go index 319970db3c1..cef965d4ee4 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go +++ b/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintoken.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetFunctionsAdminToken(ctx context.Context, id commonids. var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go b/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go index 71cbb37de0d..cf37de92f47 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getfunctionsadmintokenslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, id SlotId var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go b/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go index 1f8ada5414d..023c7f1797c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go +++ b/resource-manager/web/2023-12-01/webapps/method_gethostnamebinding.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBinding(ctx context.Context, id HostNameBindin var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go b/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go index acd9260e326..d96ab86f748 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_gethostnamebindingslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHostNameBindingSlot(ctx context.Context, id SlotHostNa var model HostNameBinding result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go b/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go index 6824a6a3881..f018d1b6ec8 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_gethybridconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnection(ctx context.Context, id RelayId) (res var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go index a73bc3e506e..e36e2d5b984 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_gethybridconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetHybridConnectionSlot(ctx context.Context, id SlotHybri var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go index ac388ddbe1e..6e95d906f08 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstancefunctionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, id SlotFunct var model FunctionEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go index ccab5c5b65b..0d535788c59 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceinfo.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfo(ctx context.Context, id InstanceId) (resu var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go index eca65b26f1d..7ac3ffaf1c8 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceinfoslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceInfoSlot(ctx context.Context, id SlotInstanceI var model WebSiteInstanceStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go index 54d4380e6c3..5f0ecd4b9d3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, id InstanceId var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go index 3e41c70cf7e..4aa95f5cdc1 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, id SlotIn var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go index 3516dc8c1f0..9b0781e0511 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatus.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, id Instanc var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go index 12bfe3d0fcf..08c034a5c4b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstancemsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, id Slo var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go index 7d686bc51f8..32dd68b49cb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcess(ctx context.Context, id InstanceProces var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go index 97c4de7e3d5..b3c0570e944 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDump(ctx context.Context, id InstancePr var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go index e32d3e6a2a8..f8e66cc080a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, id SlotIn var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go index b529a1ca714..f936b7fea0e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModule(ctx context.Context, id Instance var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go index 0e1009c3dce..f68ff944498 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, id Slot var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go index fc66e9a0fac..a799b1317f0 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceProcessSlot(ctx context.Context, id SlotInstan var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go b/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go index 3edbdf23848..8ef0c8f31c8 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getinstanceworkflowslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, id SlotWorkf var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go b/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go index 9186da2ddf1..f05e2dd6aea 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMigrateMySqlStatus(ctx context.Context, id commonids.A var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go b/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go index 1916a1c2f04..973c158cbbf 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmigratemysqlstatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMigrateMySqlStatusSlot(ctx context.Context, id SlotId) var model MigrateMySqlStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go b/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go index 1fec3d2b551..e284c016eea 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmsdeploylog.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployLog(ctx context.Context, id commonids.AppServi var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go b/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go index a7148235787..2f843d00946 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmsdeploylogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployLogSlot(ctx context.Context, id SlotId) (resul var model MSDeployLog result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go b/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go index 79957b82c58..2b61aa427cd 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetMSDeployStatus(ctx context.Context, id commonids.AppSe var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go b/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go index 33ee57e263f..d644965e7fa 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getmsdeploystatusslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, id SlotId) (re var model MSDeployStatus result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go b/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go index 05a761a58cf..c7baf1f6f32 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go +++ b/resource-manager/web/2023-12-01/webapps/method_getnetworktraces.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTraces(ctx context.Context, id NetworkTraceId) var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go index fac98d3e21a..be577fd2382 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlot(ctx context.Context, id SlotNetworkT var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go index f4cfa7b0265..6adf1088332 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go +++ b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesslotv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, id SiteSlotNe var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go index 075b0ec98e0..a647b7df7d6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go +++ b/resource-manager/web/2023-12-01/webapps/method_getnetworktracesv2.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetNetworkTracesV2(ctx context.Context, id SiteNetworkTra var model []NetworkTrace result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go b/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go index 0192ff89661..861f9c0d26d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go +++ b/resource-manager/web/2023-12-01/webapps/method_getonedeploystatus.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetOneDeployStatus(ctx context.Context, id commonids.AppS var model interface{} result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go b/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go index 3a5194b7b4b..cab1e802f61 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go +++ b/resource-manager/web/2023-12-01/webapps/method_getpremieraddon.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOn(ctx context.Context, id PremierAddonId) ( var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go b/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go index 56055107545..b18d56f259b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getpremieraddonslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPremierAddOnSlot(ctx context.Context, id SlotPremierAd var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go b/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go index dce43e8e8df..a475aa2c107 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivateaccess.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateAccess(ctx context.Context, id commonids.AppSer var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go b/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go index bfb25e1f581..5ca04dcfd35 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivateaccessslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateAccessSlot(ctx context.Context, id SlotId) (res var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go b/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go index 26c7871fbbf..078deb2c24a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, id Priv var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go index 9c25a41677f..dc1da065c8f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivateendpointconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, id var model RemotePrivateEndpointConnectionARMResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go b/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go index 667be0c0c72..7a0922f7157 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresources.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetPrivateLinkResources(ctx context.Context, id commonids var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go b/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go index d2b79716d14..3dc2ee16463 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprivatelinkresourcesslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, id SlotI var model PrivateLinkResourcesWrapper result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocess.go b/resource-manager/web/2023-12-01/webapps/method_getprocess.go index 42442c0b292..f53ec86fa97 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocess.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocess.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcess(ctx context.Context, id ProcessId) (result Get var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go b/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go index e4ed77f79f6..4aa575213d9 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocessdump.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDump(ctx context.Context, id ProcessId) (result var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go b/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go index c46e7a62c3d..b904b54a53d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocessdumpslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetProcessDumpSlot(ctx context.Context, id SlotProcessId) var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go b/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go index b69821fe4ba..84621827e5b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocessmodule.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModule(ctx context.Context, id ModuleId) (resul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go b/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go index 6e1e3d05fc7..eb70f4f6077 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocessmoduleslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessModuleSlot(ctx context.Context, id ProcessModul var model ProcessModuleInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go b/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go index 6d688c86119..125ebe5550c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getprocessslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetProcessSlot(ctx context.Context, id SlotProcessId) (re var model ProcessInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go b/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go index 294c7a1c1cd..d2b18926090 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go +++ b/resource-manager/web/2023-12-01/webapps/method_getpubliccertificate.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificate(ctx context.Context, id PublicCertif var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go b/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go index 20a409afcce..81a159edd9f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getpubliccertificateslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetPublicCertificateSlot(ctx context.Context, id SlotPubl var model PublicCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go b/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go index e709d3033c4..279bcaac0fc 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnection(ctx context.Context, id HybridC var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go index 5cf0fc7ce2e..8260c31d4d5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getrelayserviceconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, id Slo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go b/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go index 588b11ec267..9b0418a2f0f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go +++ b/resource-manager/web/2023-12-01/webapps/method_getscmallowed.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetScmAllowed(ctx context.Context, id commonids.AppServic var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go b/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go index 3dd063f8aca..53a7a3a2331 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getscmallowedslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetScmAllowedSlot(ctx context.Context, id SlotId) (result var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go b/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go index 547724012d7..aff9e649a27 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreference.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Cont var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go b/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go index ae2b9b61258..9cd169fbf00 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsiteconnectionstringkeyvaultreferenceslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context. var model ApiKVReference result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go b/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go index 9c4d7d78224..bd1302d106f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsitecontainer.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteContainer(ctx context.Context, id SitecontainerId) var model SiteContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go b/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go index dc65c943da9..0f130308780 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsitecontainerslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteContainerSlot(ctx context.Context, id SlotSitecont var model SiteContainer result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go b/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go index e4a475e766d..0a6945f3b7d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsiteextension.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtension(ctx context.Context, id SiteExtensionId) var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go b/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go index 1bae54da3e3..e54acbb50ef 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsiteextensionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSiteExtensionSlot(ctx context.Context, id SlotSiteExte var model SiteExtensionInfo result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go b/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go index 7f2d3f3ddd0..63dbaae3ef5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflag.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, id commonids. var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go b/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go index 170b11be7bc..4476bb15496 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsitephperrorlogflagslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, id SlotId var model SitePhpErrorLogFlag result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getslot.go b/resource-manager/web/2023-12-01/webapps/method_getslot.go index fd2c98b535c..96f47332251 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetSlot(ctx context.Context, id SlotId) (result GetSlotOp var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go b/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go index 7679f9feaf0..8f1380fc15a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsourcecontrol.go @@ -49,7 +49,6 @@ func (c WebAppsClient) GetSourceControl(ctx context.Context, id commonids.AppSer var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go b/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go index d06bb3ad906..59f28a81eeb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getsourcecontrolslot.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetSourceControlSlot(ctx context.Context, id SlotId) (res var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go b/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go index 1914aa45261..8d24a59f9ff 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnection.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, id var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go index 8f25ed183cf..c94d3312298 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getswiftvirtualnetworkconnectionslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go index fa85150bc22..f408fb21bb1 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go +++ b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJob(ctx context.Context, id TriggeredWebJo var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go index 25d867bd171..d8dac67561f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go +++ b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistory.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, id History var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go index da1075c7ef8..db0ae2aa46c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobhistoryslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, id Tri var model TriggeredJobHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go index df601d6b8e0..9d5fdbad976 100644 --- a/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_gettriggeredwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, id SlotTrigge var model TriggeredWebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go b/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go index 8cbb17041d9..4568fe01196 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_getvnetconnection.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnection(ctx context.Context, id VirtualNetworkC var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go index d7147b08b2f..71c79ea8c65 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go +++ b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongateway.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGateway(ctx context.Context, id GatewayI var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go index e3f7ab94a05..7abcca7f5ab 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectiongatewayslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, id Slot var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go index 225b53b1c19..d212cb00170 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getvnetconnectionslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetVnetConnectionSlot(ctx context.Context, id SlotVirtual var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getwebjob.go b/resource-manager/web/2023-12-01/webapps/method_getwebjob.go index 1544e50a120..283a114229d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getwebjob.go +++ b/resource-manager/web/2023-12-01/webapps/method_getwebjob.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJob(ctx context.Context, id WebJobId) (result GetWe var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go b/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go index 12438b92757..e1b57da034c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getwebjobslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWebJobSlot(ctx context.Context, id SlotWebJobId) (resu var model WebJob result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go b/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go index a78a69fc9be..b663861a930 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go +++ b/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogs.go @@ -48,7 +48,6 @@ func (c WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, id commonids var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go b/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go index 6ab570eb78f..6446530d54e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_getwebsitecontainerlogsslot.go @@ -47,7 +47,6 @@ func (c WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, id SlotI var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_getworkflow.go b/resource-manager/web/2023-12-01/webapps/method_getworkflow.go index 6bc23af103f..5588ed7e61d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_getworkflow.go +++ b/resource-manager/web/2023-12-01/webapps/method_getworkflow.go @@ -45,7 +45,6 @@ func (c WebAppsClient) GetWorkflow(ctx context.Context, id WorkflowId) (result G var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_iscloneable.go b/resource-manager/web/2023-12-01/webapps/method_iscloneable.go index 1dc89371c3b..0603d8f018e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_iscloneable.go +++ b/resource-manager/web/2023-12-01/webapps/method_iscloneable.go @@ -47,7 +47,6 @@ func (c WebAppsClient) IsCloneable(ctx context.Context, id commonids.AppServiceI var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go b/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go index c28faba968a..e971d3c63e4 100644 --- a/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_iscloneableslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) IsCloneableSlot(ctx context.Context, id SlotId) (result I var model SiteCloneability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go b/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go index 2fe6d0b596f..ce70c9042fa 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_listapplicationsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListApplicationSettings(ctx context.Context, id commonids var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go index afbe704c229..7eefeaa0feb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listapplicationsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, id SlotI var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go b/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go index 022ded5e7f4..bc513083273 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go +++ b/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccounts.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListAzureStorageAccounts(ctx context.Context, id commonid var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go b/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go index 1ae48f64d6f..c5a1cd2c3ab 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listazurestorageaccountsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, id Slot var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go b/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go index 3334a5ea20b..31d9021a61b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go +++ b/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecrets.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecrets(ctx context.Context, id BackupId, var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go b/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go index 36a85d16ed5..ddc128b594c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listbackupstatussecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, id SlotB var model BackupItem result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go b/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go index 3f9b2569d77..0453dace48d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go +++ b/resource-manager/web/2023-12-01/webapps/method_listbyresourcegroup.go @@ -40,6 +40,7 @@ func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers { func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go b/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go index dedfccfc4dc..64554b4fd90 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go +++ b/resource-manager/web/2023-12-01/webapps/method_listconnectionstrings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListConnectionStrings(ctx context.Context, id commonids.A var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go b/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go index 3498220d398..4f5c82268e8 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listconnectionstringsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListConnectionStringsSlot(ctx context.Context, id SlotId) var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go b/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go index 35f887d50ed..c08913fb632 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go +++ b/resource-manager/web/2023-12-01/webapps/method_listdeploymentlog.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLog(ctx context.Context, id DeploymentId) ( var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go b/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go index 570627468c5..ac50302c638 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listdeploymentlogslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListDeploymentLogSlot(ctx context.Context, id SlotDeploym var model Deployment result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go b/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go index 7bd6682f1cc..8408b4dae45 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go +++ b/resource-manager/web/2023-12-01/webapps/method_listfunctionkeys.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeys(ctx context.Context, id FunctionId) (res var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go b/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go index 77aae0aaf70..08a6e0172a6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listfunctionkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionKeysSlot(ctx context.Context, id SlotFunction var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go b/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go index 3f26b8322db..45eb50cf982 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go +++ b/resource-manager/web/2023-12-01/webapps/method_listfunctionsecrets.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecrets(ctx context.Context, id FunctionId) ( var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go b/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go index a8354756f45..15de188c3d5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listfunctionsecretsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, id SlotFunct var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go b/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go index 64dcbd8bfb6..fabdace3a5d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go +++ b/resource-manager/web/2023-12-01/webapps/method_listhostkeys.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHostKeys(ctx context.Context, id commonids.AppService var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go b/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go index af23867eada..750e7a12832 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listhostkeysslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHostKeysSlot(ctx context.Context, id SlotId) (result var model HostKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go b/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go index 08364fcb2af..0aea9bb9d04 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go +++ b/resource-manager/web/2023-12-01/webapps/method_listhybridconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListHybridConnections(ctx context.Context, id commonids.A var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go b/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go index 7508c1275e5..d6ec6a8ec2b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listhybridconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, id SlotId) var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listmetadata.go b/resource-manager/web/2023-12-01/webapps/method_listmetadata.go index ecb2e7ae7da..8998ba62c0d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listmetadata.go +++ b/resource-manager/web/2023-12-01/webapps/method_listmetadata.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListMetadata(ctx context.Context, id commonids.AppService var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go b/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go index f392f8f6086..b2dcfca269d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listmetadataslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListMetadataSlot(ctx context.Context, id SlotId) (result var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go b/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go index 5cd439a53af..fde1a7c3d73 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go +++ b/resource-manager/web/2023-12-01/webapps/method_listnetworkfeatures.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeatures(ctx context.Context, id NetworkFeatur var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go b/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go index 41badd13da9..c91b5baede0 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listnetworkfeaturesslot.go @@ -45,7 +45,6 @@ func (c WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, id SlotNetwo var model NetworkFeatures result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go b/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go index 3e795219b6f..ab98305afda 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go +++ b/resource-manager/web/2023-12-01/webapps/method_listperfmoncounters.go @@ -40,6 +40,7 @@ func (o ListPerfMonCountersOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go b/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go index 3a2754f799e..b82ebb85e22 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listperfmoncountersslot.go @@ -39,6 +39,7 @@ func (o ListPerfMonCountersSlotOperationOptions) ToHeaders() *client.Headers { func (o ListPerfMonCountersSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go b/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go index 0215cabcf57..b11bf4233c3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go +++ b/resource-manager/web/2023-12-01/webapps/method_listpremieraddons.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListPremierAddOns(ctx context.Context, id commonids.AppSe var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go b/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go index 044b2912f5a..73dbf683ae9 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listpremieraddonsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, id SlotId) (re var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go b/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go index 7da7da0b23c..07b6308ca62 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go +++ b/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecrets.go @@ -51,7 +51,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecrets(ctx context.Context, var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go b/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go index 2a4701423fd..7f32d269123 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listpublishingprofilexmlwithsecretsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) ListPublishingProfileXmlWithSecretsSlot(ctx context.Conte var model []byte result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go b/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go index d7e18cd89e8..de929a519e3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go +++ b/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListRelayServiceConnections(ctx context.Context, id commo var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go b/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go index 1f4ad19a8c9..56b6752c72f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listrelayserviceconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, id S var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go b/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go index c62e23599bc..99b7cd099b7 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_listsitepushsettings.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSitePushSettings(ctx context.Context, id commonids.Ap var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go index c68fba350a3..38b18425808 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listsitepushsettingsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, id SlotId) var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go b/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go index 06953e01e3f..ccfa9dc0e21 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go +++ b/resource-manager/web/2023-12-01/webapps/method_listslotconfigurationnames.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSlotConfigurationNames(ctx context.Context, id common var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go b/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go index e92a5874991..3ba753d99a5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go +++ b/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggers.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, id commonid var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go b/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go index e00d4fd2f39..87112ea8e9a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listsyncfunctiontriggersslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, id Slot var model FunctionSecrets result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listusages.go b/resource-manager/web/2023-12-01/webapps/method_listusages.go index 6a245dab93f..09825b54c80 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listusages.go +++ b/resource-manager/web/2023-12-01/webapps/method_listusages.go @@ -40,6 +40,7 @@ func (o ListUsagesOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go b/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go index cbcbac0a262..0f5459ebad6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listusagesslot.go @@ -39,6 +39,7 @@ func (o ListUsagesSlotOperationOptions) ToHeaders() *client.Headers { func (o ListUsagesSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go b/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go index 72289ddc25f..9257086d2e2 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go +++ b/resource-manager/web/2023-12-01/webapps/method_listvnetconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListVnetConnections(ctx context.Context, id commonids.App var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go b/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go index 8018d954faf..942cd6b0476 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listvnetconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, id SlotId) ( var model []VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go b/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go index 05c1769e6c4..4c7d04686ac 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go +++ b/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnections.go @@ -47,7 +47,6 @@ func (c WebAppsClient) ListWorkflowsConnections(ctx context.Context, id commonid var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go b/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go index b1319800e9b..b85e7a72003 100644 --- a/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_listworkflowsconnectionsslot.go @@ -46,7 +46,6 @@ func (c WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, id Slot var model WorkflowEnvelope result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_migratestorage.go b/resource-manager/web/2023-12-01/webapps/method_migratestorage.go index f59a0b4a276..1fb58c4f795 100644 --- a/resource-manager/web/2023-12-01/webapps/method_migratestorage.go +++ b/resource-manager/web/2023-12-01/webapps/method_migratestorage.go @@ -38,6 +38,7 @@ func (o MigrateStorageOperationOptions) ToHeaders() *client.Headers { func (o MigrateStorageOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go b/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go index 63ec49104fc..419ea335744 100644 --- a/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go +++ b/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnet.go @@ -51,7 +51,6 @@ func (c WebAppsClient) PutPrivateAccessVnet(ctx context.Context, id commonids.Ap var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go b/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go index 465f0eb8449..a2031d0024b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_putprivateaccessvnetslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, id SlotId, var model PrivateAccess result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_restart.go b/resource-manager/web/2023-12-01/webapps/method_restart.go index 4634c74caa7..47d9224417a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_restart.go +++ b/resource-manager/web/2023-12-01/webapps/method_restart.go @@ -35,6 +35,7 @@ func (o RestartOperationOptions) ToHeaders() *client.Headers { func (o RestartOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_restartslot.go b/resource-manager/web/2023-12-01/webapps/method_restartslot.go index 28902482a9c..ca81876358d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_restartslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_restartslot.go @@ -34,6 +34,7 @@ func (o RestartSlotOperationOptions) ToHeaders() *client.Headers { func (o RestartSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go b/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go index fa037fe2276..de35cae8c37 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go +++ b/resource-manager/web/2023-12-01/webapps/method_startnetworktrace.go @@ -40,6 +40,7 @@ func (o StartNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go b/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go index 8390b0d5feb..f4ecbb2878c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_startnetworktraceslot.go @@ -39,6 +39,7 @@ func (o StartNetworkTraceSlotOperationOptions) ToHeaders() *client.Headers { func (o StartNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go index 8ca69360afe..c4aceaac67a 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go +++ b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktrace.go @@ -37,6 +37,7 @@ func (o StartWebSiteNetworkTraceOperationOptions) ToHeaders() *client.Headers { func (o StartWebSiteNetworkTraceOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -83,7 +84,6 @@ func (c WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, id commonid var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go index 9fd9a12487f..c2f83e72964 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go +++ b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperation.go @@ -40,6 +40,7 @@ func (o StartWebSiteNetworkTraceOperationOperationOptions) ToHeaders() *client.H func (o StartWebSiteNetworkTraceOperationOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go index 73249d3a29a..ceb485a4310 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceoperationslot.go @@ -39,6 +39,7 @@ func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToHeaders() *clie func (o StartWebSiteNetworkTraceOperationSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go index 697b0f20648..488181959e2 100644 --- a/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_startwebsitenetworktraceslot.go @@ -36,6 +36,7 @@ func (o StartWebSiteNetworkTraceSlotOperationOptions) ToHeaders() *client.Header func (o StartWebSiteNetworkTraceSlotOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } @@ -82,7 +83,6 @@ func (c WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, id Slot var model string result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_update.go b/resource-manager/web/2023-12-01/webapps/method_update.go index ed1ba13fa40..ce51465dd90 100644 --- a/resource-manager/web/2023-12-01/webapps/method_update.go +++ b/resource-manager/web/2023-12-01/webapps/method_update.go @@ -51,7 +51,6 @@ func (c WebAppsClient) Update(ctx context.Context, id commonids.AppServiceId, in var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go b/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go index f60ab8838c9..a6abe2e7f9f 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateApplicationSettings(ctx context.Context, id commoni var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go index b0382487cf8..dabaad9a1bb 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateapplicationsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, id Slo var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go b/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go index ff363074bef..c4721b446e6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateauthsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettings(ctx context.Context, id commonids.AppS var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go index 434d233bfd4..efd12302a3c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, id SlotId, in var model SiteAuthSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go index d4fce76e8de..630b45422db 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, id commonids.Ap var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go index e6ea9a8b1ee..6e054358fe5 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateauthsettingsv2slot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, id SlotId, var model SiteAuthSettingsV2 result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go b/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go index a3ae2d6b3c9..bbda87f586c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccounts.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, id common var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go b/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go index 16e730b1e99..de67b3d4cff 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateazurestorageaccountsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, id Sl var model AzureStoragePropertyDictionaryResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go index b8bf6ec24e8..eadd42c46b4 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatebackupconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateBackupConfiguration(ctx context.Context, id commoni var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go index 74c8ef4b5e2..6cc6c0db6dd 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatebackupconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, id Slo var model BackupRequest result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go b/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go index ace56a0e15a..540effb8493 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateconfiguration.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConfiguration(ctx context.Context, id commonids.App var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go b/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go index 6909e91308f..2b8a3c837d6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateconfigurationslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConfigurationSlot(ctx context.Context, id SlotId, i var model SiteConfigResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go b/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go index 7d97ab27e33..e2583e323f7 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateconnectionstrings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateConnectionStrings(ctx context.Context, id commonids var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go b/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go index 197d01fa963..02c8aab1742 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateconnectionstringsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, id SlotI var model ConnectionStringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go b/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go index 8885b9ada96..3fd9dd8089b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfig.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, id common var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go b/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go index 7e46415c0a9..76e26082497 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatediagnosticlogsconfigslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, id Sl var model SiteLogsConfig result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go b/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go index e2f684a8ec6..e9926b92e04 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifier.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, id D var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go b/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go index 118cec095ff..8bfd226892c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatedomainownershipidentifierslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, var model Identifier result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go b/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go index d8b2976c309..fb80df44e08 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateftpallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateFtpAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go b/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go index 5e3125acabb..8600093e952 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateftpallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go b/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go index 3641ff27936..14d186263b3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatehybridconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnection(ctx context.Context, id RelayId, i var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go index 51cc1d0206d..8136fefe9af 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatehybridconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, id SlotHy var model HybridConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go b/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go index e5e463a2656..55294309b86 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatemetadata.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateMetadata(ctx context.Context, id commonids.AppServi var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go b/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go index 7f24c677cda..99995876e7c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatemetadataslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateMetadataSlot(ctx context.Context, id SlotId, input var model StringDictionary result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go b/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go index 283da43f6b9..dcd3c9b2a8b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatepremieraddon.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOn(ctx context.Context, id PremierAddonId var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go b/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go index a37e30d7c27..e1c27a4d55e 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatepremieraddonslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, id SlotPremie var model PremierAddOn result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go b/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go index 3c8dfb4108d..cd611e9ec20 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, id Hybr var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go index fca0b74fb39..c24d82100f8 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updaterelayserviceconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, id var model RelayServiceConnectionEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go b/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go index 0be20463210..120d3629001 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatescmallowed.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateScmAllowed(ctx context.Context, id commonids.AppSer var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go b/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go index f124b6f3526..a3243abfa63 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatescmallowedslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, id SlotId, inpu var model CsmPublishingCredentialsPoliciesEntity result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go b/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go index 20b493aae8c..668665c05d4 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettings.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSitePushSettings(ctx context.Context, id commonids. var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go b/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go index 774c0e26cbd..09988246b8c 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatesitepushsettingsslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, id SlotId var model PushSettings result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateslot.go b/resource-manager/web/2023-12-01/webapps/method_updateslot.go index d7a0e90cd61..82afe00eea3 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSlot(ctx context.Context, id SlotId, input SitePatc var model Site result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go b/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go index f4f5b05b966..8eb1665dd4d 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateslotconfigurationnames.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, id comm var model SlotConfigNamesResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go b/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go index 792bf5a462b..a9b4d29999b 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrol.go @@ -53,7 +53,6 @@ func (c WebAppsClient) UpdateSourceControl(ctx context.Context, id commonids.App var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go b/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go index 5d25563b5d0..27063f72815 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatesourcecontrolslot.go @@ -52,7 +52,6 @@ func (c WebAppsClient) UpdateSourceControlSlot(ctx context.Context, id SlotId, i var model SiteSourceControl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go b/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go index b54e54b619e..1ed44d1b945 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheck.go @@ -51,7 +51,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context. var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go b/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go index 48bbaa559c8..86d0e38f499 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updateswiftvirtualnetworkconnectionwithcheckslot.go @@ -50,7 +50,6 @@ func (c WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx cont var model SwiftVirtualNetwork result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go index 987cb8fbff7..d24ddba2035 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnection.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnection(ctx context.Context, id VirtualNetwo var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go index dd57888f81e..710e26ab2d6 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongateway.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, id Gatew var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go index 1be5209f364..e292d9dd430 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectiongatewayslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, id S var model VnetGateway result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go index c076ea62f81..1ce4e92a640 100644 --- a/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go +++ b/resource-manager/web/2023-12-01/webapps/method_updatevnetconnectionslot.go @@ -49,7 +49,6 @@ func (c WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, id SlotVirt var model VnetInfoResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/webapps/version.go b/resource-manager/web/2023-12-01/webapps/version.go index 3cc70e92e92..488561f392b 100644 --- a/resource-manager/web/2023-12-01/webapps/version.go +++ b/resource-manager/web/2023-12-01/webapps/version.go @@ -1,12 +1,10 @@ package webapps -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapps/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webapps/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/README.md b/resource-manager/web/2023-12-01/workflowrunactions/README.md index 1caebc94567..306ce9b76c6 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/README.md +++ b/resource-manager/web/2023-12-01/workflowrunactions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflowrunactions` Documentation -The `workflowrunactions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflowrunactions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflowrunactions/client.go b/resource-manager/web/2023-12-01/workflowrunactions/client.go index 75492551c09..463cc06a5f9 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/client.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/client.go @@ -15,7 +15,7 @@ type WorkflowRunActionsClient struct { } func NewWorkflowRunActionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunActionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowrunactions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowrunactions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunActionsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/id_action.go b/resource-manager/web/2023-12-01/workflowrunactions/id_action.go index e8b0fe5a8c1..d6e5590e6b7 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/id_action.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/id_action.go @@ -48,7 +48,7 @@ func ParseActionID(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseActionIDInsensitively(input string) (*ActionId, error) { } id := ActionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/id_repetition.go b/resource-manager/web/2023-12-01/workflowrunactions/id_repetition.go index e546f29fa0c..f822c62b0b6 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/id_repetition.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/id_repetition.go @@ -50,7 +50,7 @@ func ParseRepetitionID(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseRepetitionIDInsensitively(input string) (*RepetitionId, error) { } id := RepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/id_requesthistory.go b/resource-manager/web/2023-12-01/workflowrunactions/id_requesthistory.go index 2425ea99f3c..0240038e5ce 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/id_requesthistory.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/id_requesthistory.go @@ -52,7 +52,7 @@ func ParseRequestHistoryID(input string) (*RequestHistoryId, error) { } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -69,7 +69,7 @@ func ParseRequestHistoryIDInsensitively(input string) (*RequestHistoryId, error) } id := RequestHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/id_run.go b/resource-manager/web/2023-12-01/workflowrunactions/id_run.go index 3d1f8970278..5e64d944ef3 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/id_run.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/id_scoperepetition.go b/resource-manager/web/2023-12-01/workflowrunactions/id_scoperepetition.go index effb962622b..0d47f7e4f39 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/id_scoperepetition.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/id_scoperepetition.go @@ -50,7 +50,7 @@ func ParseScopeRepetitionID(input string) (*ScopeRepetitionId, error) { } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -67,7 +67,7 @@ func ParseScopeRepetitionIDInsensitively(input string) (*ScopeRepetitionId, erro } id := ScopeRepetitionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/method_coperepetitionsget.go b/resource-manager/web/2023-12-01/workflowrunactions/method_coperepetitionsget.go index f767e43bd99..f860d0462b4 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/method_coperepetitionsget.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/method_coperepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) CopeRepetitionsGet(ctx context.Context, id Sco var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/method_get.go b/resource-manager/web/2023-12-01/workflowrunactions/method_get.go index 83af4ca8829..c86b02f4ca2 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/method_get.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) Get(ctx context.Context, id ActionId) (result var model WorkflowRunAction result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/method_list.go b/resource-manager/web/2023-12-01/workflowrunactions/method_list.go index 532e550d8d0..084239bb128 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/method_list.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsget.go b/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsget.go index ecac4315b0f..eb39d17169e 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsget.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsGet(ctx context.Co var model WorkflowRunActionRepetitionDefinition result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go b/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go index 41bb4f82cb2..67800134834 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/method_workflowrunactionrepetitionsrequesthistoriesget.go @@ -45,7 +45,6 @@ func (c WorkflowRunActionsClient) WorkflowRunActionRepetitionsRequestHistoriesGe var model RequestHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowrunactions/version.go b/resource-manager/web/2023-12-01/workflowrunactions/version.go index 1db8e4bcd98..4a2b1090103 100644 --- a/resource-manager/web/2023-12-01/workflowrunactions/version.go +++ b/resource-manager/web/2023-12-01/workflowrunactions/version.go @@ -1,12 +1,10 @@ package workflowrunactions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowrunactions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowrunactions/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflowruns/README.md b/resource-manager/web/2023-12-01/workflowruns/README.md index 51e39d7d757..592f664a3fb 100644 --- a/resource-manager/web/2023-12-01/workflowruns/README.md +++ b/resource-manager/web/2023-12-01/workflowruns/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflowruns` Documentation -The `workflowruns` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflowruns` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflowruns/client.go b/resource-manager/web/2023-12-01/workflowruns/client.go index e41dae0872b..73a34bf9d60 100644 --- a/resource-manager/web/2023-12-01/workflowruns/client.go +++ b/resource-manager/web/2023-12-01/workflowruns/client.go @@ -15,7 +15,7 @@ type WorkflowRunsClient struct { } func NewWorkflowRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowruns", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowruns", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowRunsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflowruns/id_managementworkflow.go b/resource-manager/web/2023-12-01/workflowruns/id_managementworkflow.go index 7750de61f4e..edf5bdfdcfa 100644 --- a/resource-manager/web/2023-12-01/workflowruns/id_managementworkflow.go +++ b/resource-manager/web/2023-12-01/workflowruns/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowruns/id_run.go b/resource-manager/web/2023-12-01/workflowruns/id_run.go index 9117bf15feb..8de1b9a52f1 100644 --- a/resource-manager/web/2023-12-01/workflowruns/id_run.go +++ b/resource-manager/web/2023-12-01/workflowruns/id_run.go @@ -46,7 +46,7 @@ func ParseRunID(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseRunIDInsensitively(input string) (*RunId, error) { } id := RunId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowruns/method_get.go b/resource-manager/web/2023-12-01/workflowruns/method_get.go index 6ee3078a7f7..17d61b2a5b1 100644 --- a/resource-manager/web/2023-12-01/workflowruns/method_get.go +++ b/resource-manager/web/2023-12-01/workflowruns/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowRunsClient) Get(ctx context.Context, id RunId) (result GetOperat var model WorkflowRun result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowruns/method_list.go b/resource-manager/web/2023-12-01/workflowruns/method_list.go index b2188f33e6d..01f6d279698 100644 --- a/resource-manager/web/2023-12-01/workflowruns/method_list.go +++ b/resource-manager/web/2023-12-01/workflowruns/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/workflowruns/version.go b/resource-manager/web/2023-12-01/workflowruns/version.go index 7c357eead3a..79c1879b9c5 100644 --- a/resource-manager/web/2023-12-01/workflowruns/version.go +++ b/resource-manager/web/2023-12-01/workflowruns/version.go @@ -1,12 +1,10 @@ package workflowruns -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowruns/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowruns/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflows/README.md b/resource-manager/web/2023-12-01/workflows/README.md index 19495f17f8b..2525f54228d 100644 --- a/resource-manager/web/2023-12-01/workflows/README.md +++ b/resource-manager/web/2023-12-01/workflows/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflows` Documentation -The `workflows` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflows` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflows/client.go b/resource-manager/web/2023-12-01/workflows/client.go index e036e0f1d48..46648dbfe97 100644 --- a/resource-manager/web/2023-12-01/workflows/client.go +++ b/resource-manager/web/2023-12-01/workflows/client.go @@ -15,7 +15,7 @@ type WorkflowsClient struct { } func NewWorkflowsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflows", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflows", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflows/id_managementworkflow.go b/resource-manager/web/2023-12-01/workflows/id_managementworkflow.go index bded96b67f7..edfe867dd0a 100644 --- a/resource-manager/web/2023-12-01/workflows/id_managementworkflow.go +++ b/resource-manager/web/2023-12-01/workflows/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflows/version.go b/resource-manager/web/2023-12-01/workflows/version.go index 1b7cfc80119..0517e8b6b5c 100644 --- a/resource-manager/web/2023-12-01/workflows/version.go +++ b/resource-manager/web/2023-12-01/workflows/version.go @@ -1,12 +1,10 @@ package workflows -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflows/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflows/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/README.md b/resource-manager/web/2023-12-01/workflowtriggerhistories/README.md index 5abec2718e9..48085edc5fa 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/README.md +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflowtriggerhistories` Documentation -The `workflowtriggerhistories` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflowtriggerhistories` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/client.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/client.go index fc4b05de0ba..e1a3815134e 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/client.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/client.go @@ -15,7 +15,7 @@ type WorkflowTriggerHistoriesClient struct { } func NewWorkflowTriggerHistoriesClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggerHistoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggerhistories", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggerHistoriesClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/id_trigger.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/id_trigger.go index 66c61b8d260..70d9c879379 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/id_trigger.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/id_triggerhistory.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/id_triggerhistory.go index f69ef638db4..6875b7ef985 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/id_triggerhistory.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/id_triggerhistory.go @@ -48,7 +48,7 @@ func ParseTriggerHistoryID(input string) (*TriggerHistoryId, error) { } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -65,7 +65,7 @@ func ParseTriggerHistoryIDInsensitively(input string) (*TriggerHistoryId, error) } id := TriggerHistoryId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/method_get.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/method_get.go index 321b09eec4f..25ba7f1b42f 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/method_get.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggerHistoriesClient) Get(ctx context.Context, id TriggerHisto var model WorkflowTriggerHistory result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/method_list.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/method_list.go index 9737ffdb68c..fa03f7faa25 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/method_list.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/workflowtriggerhistories/version.go b/resource-manager/web/2023-12-01/workflowtriggerhistories/version.go index 91bed02c969..e6ba29f8368 100644 --- a/resource-manager/web/2023-12-01/workflowtriggerhistories/version.go +++ b/resource-manager/web/2023-12-01/workflowtriggerhistories/version.go @@ -1,12 +1,10 @@ package workflowtriggerhistories -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggerhistories/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggerhistories/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/README.md b/resource-manager/web/2023-12-01/workflowtriggers/README.md index a91b58b3c36..21bc375cd6b 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/README.md +++ b/resource-manager/web/2023-12-01/workflowtriggers/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflowtriggers` Documentation -The `workflowtriggers` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflowtriggers` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflowtriggers/client.go b/resource-manager/web/2023-12-01/workflowtriggers/client.go index 4788e395649..06e7b704ecf 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/client.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/client.go @@ -15,7 +15,7 @@ type WorkflowTriggersClient struct { } func NewWorkflowTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowTriggersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowtriggers", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowtriggers", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowTriggersClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/id_managementworkflow.go b/resource-manager/web/2023-12-01/workflowtriggers/id_managementworkflow.go index 6c04d3a8fa8..84b6b3b2a1b 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/id_managementworkflow.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/id_trigger.go b/resource-manager/web/2023-12-01/workflowtriggers/id_trigger.go index aacc113189c..759041672ee 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/id_trigger.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/id_trigger.go @@ -46,7 +46,7 @@ func ParseTriggerID(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseTriggerIDInsensitively(input string) (*TriggerId, error) { } id := TriggerId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/method_get.go b/resource-manager/web/2023-12-01/workflowtriggers/method_get.go index 6ff7e339030..d1bcd504fe2 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/method_get.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowTriggersClient) Get(ctx context.Context, id TriggerId) (result G var model WorkflowTrigger result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/method_getschemajson.go b/resource-manager/web/2023-12-01/workflowtriggers/method_getschemajson.go index 286934bd0ea..c26d831b302 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/method_getschemajson.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/method_getschemajson.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) GetSchemaJson(ctx context.Context, id TriggerId) var model JsonSchema result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/method_list.go b/resource-manager/web/2023-12-01/workflowtriggers/method_list.go index 0f1c596b80c..e311d6393de 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/method_list.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/method_list.go @@ -40,6 +40,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/method_listcallbackurl.go b/resource-manager/web/2023-12-01/workflowtriggers/method_listcallbackurl.go index 5f6d581c207..7e44f7f9763 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/method_listcallbackurl.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/method_listcallbackurl.go @@ -46,7 +46,6 @@ func (c WorkflowTriggersClient) ListCallbackUrl(ctx context.Context, id TriggerI var model WorkflowTriggerCallbackUrl result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowtriggers/version.go b/resource-manager/web/2023-12-01/workflowtriggers/version.go index 0789cc30fdb..5f7e7d3c21d 100644 --- a/resource-manager/web/2023-12-01/workflowtriggers/version.go +++ b/resource-manager/web/2023-12-01/workflowtriggers/version.go @@ -1,12 +1,10 @@ package workflowtriggers -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowtriggers/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowtriggers/2023-12-01" } diff --git a/resource-manager/web/2023-12-01/workflowversions/README.md b/resource-manager/web/2023-12-01/workflowversions/README.md index 7a0d0c71022..1ff7fc9e2e3 100644 --- a/resource-manager/web/2023-12-01/workflowversions/README.md +++ b/resource-manager/web/2023-12-01/workflowversions/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/web/2023-12-01/workflowversions` Documentation -The `workflowversions` SDK allows for interaction with the Azure Resource Manager Service `web` (API Version `2023-12-01`). +The `workflowversions` SDK allows for interaction with Azure Resource Manager `web` (API Version `2023-12-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/web/2023-12-01/workflowversions/client.go b/resource-manager/web/2023-12-01/workflowversions/client.go index 8a0b4fbb7be..b569325e0f3 100644 --- a/resource-manager/web/2023-12-01/workflowversions/client.go +++ b/resource-manager/web/2023-12-01/workflowversions/client.go @@ -15,7 +15,7 @@ type WorkflowVersionsClient struct { } func NewWorkflowVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowVersionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "workflowversions", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "workflowversions", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WorkflowVersionsClient: %+v", err) } diff --git a/resource-manager/web/2023-12-01/workflowversions/id_managementworkflow.go b/resource-manager/web/2023-12-01/workflowversions/id_managementworkflow.go index 2c77e05839a..509e0f12494 100644 --- a/resource-manager/web/2023-12-01/workflowversions/id_managementworkflow.go +++ b/resource-manager/web/2023-12-01/workflowversions/id_managementworkflow.go @@ -44,7 +44,7 @@ func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error) { } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId } id := ManagementWorkflowId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowversions/id_version.go b/resource-manager/web/2023-12-01/workflowversions/id_version.go index c08f6c0a48d..bbebe47b158 100644 --- a/resource-manager/web/2023-12-01/workflowversions/id_version.go +++ b/resource-manager/web/2023-12-01/workflowversions/id_version.go @@ -46,7 +46,7 @@ func ParseVersionID(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseVersionIDInsensitively(input string) (*VersionId, error) { } id := VersionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/web/2023-12-01/workflowversions/method_get.go b/resource-manager/web/2023-12-01/workflowversions/method_get.go index f0742aafdc1..f2ae2ecca09 100644 --- a/resource-manager/web/2023-12-01/workflowversions/method_get.go +++ b/resource-manager/web/2023-12-01/workflowversions/method_get.go @@ -45,7 +45,6 @@ func (c WorkflowVersionsClient) Get(ctx context.Context, id VersionId) (result G var model WorkflowVersion result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/web/2023-12-01/workflowversions/method_list.go b/resource-manager/web/2023-12-01/workflowversions/method_list.go index a70d4657650..05d795dfb2d 100644 --- a/resource-manager/web/2023-12-01/workflowversions/method_list.go +++ b/resource-manager/web/2023-12-01/workflowversions/method_list.go @@ -39,6 +39,7 @@ func (o ListOperationOptions) ToHeaders() *client.Headers { func (o ListOperationOptions) ToOData() *odata.Query { out := odata.Query{} + return &out } diff --git a/resource-manager/web/2023-12-01/workflowversions/version.go b/resource-manager/web/2023-12-01/workflowversions/version.go index 415e8c62326..f7192977a2f 100644 --- a/resource-manager/web/2023-12-01/workflowversions/version.go +++ b/resource-manager/web/2023-12-01/workflowversions/version.go @@ -1,12 +1,10 @@ package workflowversions -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-12-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/workflowversions/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/workflowversions/2023-12-01" } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/README.md b/resource-manager/webpubsub/2023-02-01/webpubsub/README.md index 9b42f9fea68..e87a5bfaefb 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/README.md +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2023-02-01/webpubsub` Documentation -The `webpubsub` SDK allows for interaction with the Azure Resource Manager Service `webpubsub` (API Version `2023-02-01`). +The `webpubsub` SDK allows for interaction with Azure Resource Manager `webpubsub` (API Version `2023-02-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/client.go b/resource-manager/webpubsub/2023-02-01/webpubsub/client.go index aaf69b3d112..93bd05e2ce5 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/client.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/client.go @@ -15,7 +15,7 @@ type WebPubSubClient struct { } func NewWebPubSubClientWithBaseURI(sdkApi sdkEnv.Api) (*WebPubSubClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webpubsub", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webpubsub", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebPubSubClient: %+v", err) } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go index e24c9265f45..9a491330020 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_customcertificate.go @@ -44,7 +44,7 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go index 6cf8f6ed5e1..b5c072519d4 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go index d6fc6e18139..5b4a5d02d55 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_hub.go @@ -44,7 +44,7 @@ func ParseHubID(input string) (*HubId, error) { } id := HubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubIDInsensitively(input string) (*HubId, error) { } id := HubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go index 7486fb2e46c..2ae42c1ef1d 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go index 7516b436c7a..c01ffb3a9cd 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go index da0a3fe2cfa..1ec0ca332ef 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go b/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go index 44a3174132e..7abde8676dc 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/id_webpubsub.go @@ -42,7 +42,7 @@ func ParseWebPubSubID(input string) (*WebPubSubId, error) { } id := WebPubSubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWebPubSubIDInsensitively(input string) (*WebPubSubId, error) { } id := WebPubSubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_checknameavailability.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_checknameavailability.go index 89b7609aa6f..10447994550 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_checknameavailability.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c WebPubSubClient) CheckNameAvailability(ctx context.Context, id LocationI var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_customcertificatesget.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_customcertificatesget.go index 6307e5d3f88..ecf7a6d7473 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_customcertificatesget.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_customcertificatesget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) CustomCertificatesGet(ctx context.Context, id CustomCer var model CustomCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_customdomainsget.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_customdomainsget.go index 4416471ea19..dad7d390e4a 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_customdomainsget.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) CustomDomainsGet(ctx context.Context, id CustomDomainId var model CustomDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_get.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_get.go index 32c93820294..20323337180 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_get.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_get.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) Get(ctx context.Context, id WebPubSubId) (result GetOpe var model WebPubSubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_hubsget.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_hubsget.go index 75afae05de3..bff47ad302f 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_hubsget.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_hubsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) HubsGet(ctx context.Context, id HubId) (result HubsGetO var model WebPubSubHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_listkeys.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_listkeys.go index 1f9b5d99b1a..7382f539ee4 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_listkeys.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_listkeys.go @@ -46,7 +46,6 @@ func (c WebPubSubClient) ListKeys(ctx context.Context, id WebPubSubId) (result L var model WebPubSubKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsget.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsget.go index 5ef25c532d7..8c1a8afaf12 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsget.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) PrivateEndpointConnectionsGet(ctx context.Context, id P var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsupdate.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsupdate.go index e7ec8ee1fff..4942d664a15 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsupdate.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_privateendpointconnectionsupdate.go @@ -49,7 +49,6 @@ func (c WebPubSubClient) PrivateEndpointConnectionsUpdate(ctx context.Context, i var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/method_sharedprivatelinkresourcesget.go b/resource-manager/webpubsub/2023-02-01/webpubsub/method_sharedprivatelinkresourcesget.go index b48243eb18f..1b84b697a8e 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/method_sharedprivatelinkresourcesget.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/method_sharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) SharedPrivateLinkResourcesGet(ctx context.Context, id S var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventhubendpoint.go b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventhubendpoint.go index b4b3bfbb021..fc29b1eb2c4 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventhubendpoint.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventhubendpoint.go @@ -15,6 +15,14 @@ type EventHubEndpoint struct { FullyQualifiedNamespace string `json:"fullyQualifiedNamespace"` // Fields inherited from EventListenerEndpoint + + Type EventListenerEndpointDiscriminator `json:"type"` +} + +func (s EventHubEndpoint) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return BaseEventListenerEndpointImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubEndpoint{} @@ -28,9 +36,10 @@ func (s EventHubEndpoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEndpoint: %+v", err) } + decoded["type"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistener.go b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistener.go index 90cf91c8ab5..5e8aa2166ec 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistener.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistener.go @@ -23,7 +23,7 @@ func (s *EventListener) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["endpoint"]; ok { - impl, err := unmarshalEventListenerEndpointImplementation(v) + impl, err := UnmarshalEventListenerEndpointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Endpoint' for 'EventListener': %+v", err) } @@ -31,7 +31,7 @@ func (s *EventListener) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalEventListenerFilterImplementation(v) + impl, err := UnmarshalEventListenerFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'EventListener': %+v", err) } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerendpoint.go b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerendpoint.go index ce6a41e8688..9233f8649cb 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerendpoint.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerendpoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventListenerEndpoint interface { + EventListenerEndpoint() BaseEventListenerEndpointImpl } -// RawEventListenerEndpointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventListenerEndpoint = BaseEventListenerEndpointImpl{} + +type BaseEventListenerEndpointImpl struct { + Type EventListenerEndpointDiscriminator `json:"type"` +} + +func (s BaseEventListenerEndpointImpl) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return s +} + +var _ EventListenerEndpoint = RawEventListenerEndpointImpl{} + +// RawEventListenerEndpointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventListenerEndpointImpl struct { - Type string - Values map[string]interface{} + eventListenerEndpoint BaseEventListenerEndpointImpl + Type string + Values map[string]interface{} +} + +func (s RawEventListenerEndpointImpl) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return s.eventListenerEndpoint } -func unmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEndpoint, error) { +func UnmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEndpoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEn return out, nil } - out := RawEventListenerEndpointImpl{ - Type: value, - Values: temp, + var parent BaseEventListenerEndpointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventListenerEndpointImpl: %+v", err) } - return out, nil + + return RawEventListenerEndpointImpl{ + eventListenerEndpoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerfilter.go b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerfilter.go index 113e67a18be..c6489e27e28 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerfilter.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventlistenerfilter.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventListenerFilter interface { + EventListenerFilter() BaseEventListenerFilterImpl } -// RawEventListenerFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventListenerFilter = BaseEventListenerFilterImpl{} + +type BaseEventListenerFilterImpl struct { + Type EventListenerFilterDiscriminator `json:"type"` +} + +func (s BaseEventListenerFilterImpl) EventListenerFilter() BaseEventListenerFilterImpl { + return s +} + +var _ EventListenerFilter = RawEventListenerFilterImpl{} + +// RawEventListenerFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventListenerFilterImpl struct { - Type string - Values map[string]interface{} + eventListenerFilter BaseEventListenerFilterImpl + Type string + Values map[string]interface{} +} + +func (s RawEventListenerFilterImpl) EventListenerFilter() BaseEventListenerFilterImpl { + return s.eventListenerFilter } -func unmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilter, error) { +func UnmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilter, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilt return out, nil } - out := RawEventListenerFilterImpl{ - Type: value, - Values: temp, + var parent BaseEventListenerFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventListenerFilterImpl: %+v", err) } - return out, nil + + return RawEventListenerFilterImpl{ + eventListenerFilter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventnamefilter.go b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventnamefilter.go index 463f1dc90e6..1aaf0f3a719 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventnamefilter.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/model_eventnamefilter.go @@ -15,6 +15,14 @@ type EventNameFilter struct { UserEventPattern *string `json:"userEventPattern,omitempty"` // Fields inherited from EventListenerFilter + + Type EventListenerFilterDiscriminator `json:"type"` +} + +func (s EventNameFilter) EventListenerFilter() BaseEventListenerFilterImpl { + return BaseEventListenerFilterImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventNameFilter{} @@ -28,9 +36,10 @@ func (s EventNameFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventNameFilter: %+v", err) } + decoded["type"] = "EventName" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/webpubsub/2023-02-01/webpubsub/version.go b/resource-manager/webpubsub/2023-02-01/webpubsub/version.go index 1d23e8c8c4a..1aeee2fa6f4 100644 --- a/resource-manager/webpubsub/2023-02-01/webpubsub/version.go +++ b/resource-manager/webpubsub/2023-02-01/webpubsub/version.go @@ -1,12 +1,10 @@ package webpubsub -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-02-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webpubsub/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webpubsub/2023-02-01" } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/README.md b/resource-manager/webpubsub/2024-03-01/webpubsub/README.md index 56b81535bf7..e9d6b4870d0 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/README.md +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/webpubsub/2024-03-01/webpubsub` Documentation -The `webpubsub` SDK allows for interaction with the Azure Resource Manager Service `webpubsub` (API Version `2024-03-01`). +The `webpubsub` SDK allows for interaction with Azure Resource Manager `webpubsub` (API Version `2024-03-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/client.go b/resource-manager/webpubsub/2024-03-01/webpubsub/client.go index aaf69b3d112..93bd05e2ce5 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/client.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/client.go @@ -15,7 +15,7 @@ type WebPubSubClient struct { } func NewWebPubSubClientWithBaseURI(sdkApi sdkEnv.Api) (*WebPubSubClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "webpubsub", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "webpubsub", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating WebPubSubClient: %+v", err) } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_customcertificate.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_customcertificate.go index e24c9265f45..9a491330020 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_customcertificate.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_customcertificate.go @@ -44,7 +44,7 @@ func ParseCustomCertificateID(input string) (*CustomCertificateId, error) { } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomCertificateIDInsensitively(input string) (*CustomCertificateId, } id := CustomCertificateId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_customdomain.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_customdomain.go index 6cf8f6ed5e1..b5c072519d4 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_customdomain.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_customdomain.go @@ -44,7 +44,7 @@ func ParseCustomDomainID(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCustomDomainIDInsensitively(input string) (*CustomDomainId, error) { } id := CustomDomainId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_hub.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_hub.go index d6fc6e18139..5b4a5d02d55 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_hub.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_hub.go @@ -44,7 +44,7 @@ func ParseHubID(input string) (*HubId, error) { } id := HubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseHubIDInsensitively(input string) (*HubId, error) { } id := HubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_location.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_location.go index 7486fb2e46c..2ae42c1ef1d 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_location.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_privateendpointconnection.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_privateendpointconnection.go index 7516b436c7a..c01ffb3a9cd 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_privateendpointconnection.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_privateendpointconnection.go @@ -44,7 +44,7 @@ func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionI } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpoi } id := PrivateEndpointConnectionId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_replica.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_replica.go index 0dfe235e6a0..8322d85226d 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_replica.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_replica.go @@ -44,7 +44,7 @@ func ParseReplicaID(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseReplicaIDInsensitively(input string) (*ReplicaId, error) { } id := ReplicaId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_replicasharedprivatelinkresource.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_replicasharedprivatelinkresource.go index 90da19e9abd..c2f5de91fc9 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_replicasharedprivatelinkresource.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_replicasharedprivatelinkresource.go @@ -46,7 +46,7 @@ func ParseReplicaSharedPrivateLinkResourceID(input string) (*ReplicaSharedPrivat } id := ReplicaSharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -63,7 +63,7 @@ func ParseReplicaSharedPrivateLinkResourceIDInsensitively(input string) (*Replic } id := ReplicaSharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_sharedprivatelinkresource.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_sharedprivatelinkresource.go index da0a3fe2cfa..1ec0ca332ef 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_sharedprivatelinkresource.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_sharedprivatelinkresource.go @@ -44,7 +44,7 @@ func ParseSharedPrivateLinkResourceID(input string) (*SharedPrivateLinkResourceI } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseSharedPrivateLinkResourceIDInsensitively(input string) (*SharedPrivate } id := SharedPrivateLinkResourceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/id_webpubsub.go b/resource-manager/webpubsub/2024-03-01/webpubsub/id_webpubsub.go index 44a3174132e..7abde8676dc 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/id_webpubsub.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/id_webpubsub.go @@ -42,7 +42,7 @@ func ParseWebPubSubID(input string) (*WebPubSubId, error) { } id := WebPubSubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseWebPubSubIDInsensitively(input string) (*WebPubSubId, error) { } id := WebPubSubId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_checknameavailability.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_checknameavailability.go index 89b7609aa6f..10447994550 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_checknameavailability.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_checknameavailability.go @@ -50,7 +50,6 @@ func (c WebPubSubClient) CheckNameAvailability(ctx context.Context, id LocationI var model NameAvailability result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_customcertificatesget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_customcertificatesget.go index 6307e5d3f88..ecf7a6d7473 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_customcertificatesget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_customcertificatesget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) CustomCertificatesGet(ctx context.Context, id CustomCer var model CustomCertificate result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_customdomainsget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_customdomainsget.go index 4416471ea19..dad7d390e4a 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_customdomainsget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_customdomainsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) CustomDomainsGet(ctx context.Context, id CustomDomainId var model CustomDomain result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_get.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_get.go index 32c93820294..20323337180 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_get.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_get.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) Get(ctx context.Context, id WebPubSubId) (result GetOpe var model WebPubSubResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_hubsget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_hubsget.go index 75afae05de3..bff47ad302f 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_hubsget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_hubsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) HubsGet(ctx context.Context, id HubId) (result HubsGetO var model WebPubSubHub result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_listkeys.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_listkeys.go index 1f9b5d99b1a..7382f539ee4 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_listkeys.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_listkeys.go @@ -46,7 +46,6 @@ func (c WebPubSubClient) ListKeys(ctx context.Context, id WebPubSubId) (result L var model WebPubSubKeys result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsget.go index 5ef25c532d7..8c1a8afaf12 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) PrivateEndpointConnectionsGet(ctx context.Context, id P var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsupdate.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsupdate.go index e7ec8ee1fff..4942d664a15 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsupdate.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_privateendpointconnectionsupdate.go @@ -49,7 +49,6 @@ func (c WebPubSubClient) PrivateEndpointConnectionsUpdate(ctx context.Context, i var model PrivateEndpointConnection result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasget.go index 33c7f26d47e..6859a4edecf 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) ReplicasGet(ctx context.Context, id ReplicaId) (result var model Replica result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasharedprivatelinkresourcesget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasharedprivatelinkresourcesget.go index 2d12df1bbef..9040f0fbf50 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasharedprivatelinkresourcesget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_replicasharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) ReplicaSharedPrivateLinkResourcesGet(ctx context.Contex var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/method_sharedprivatelinkresourcesget.go b/resource-manager/webpubsub/2024-03-01/webpubsub/method_sharedprivatelinkresourcesget.go index b48243eb18f..1b84b697a8e 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/method_sharedprivatelinkresourcesget.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/method_sharedprivatelinkresourcesget.go @@ -45,7 +45,6 @@ func (c WebPubSubClient) SharedPrivateLinkResourcesGet(ctx context.Context, id S var model SharedPrivateLinkResource result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventhubendpoint.go b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventhubendpoint.go index b4b3bfbb021..fc29b1eb2c4 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventhubendpoint.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventhubendpoint.go @@ -15,6 +15,14 @@ type EventHubEndpoint struct { FullyQualifiedNamespace string `json:"fullyQualifiedNamespace"` // Fields inherited from EventListenerEndpoint + + Type EventListenerEndpointDiscriminator `json:"type"` +} + +func (s EventHubEndpoint) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return BaseEventListenerEndpointImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventHubEndpoint{} @@ -28,9 +36,10 @@ func (s EventHubEndpoint) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventHubEndpoint: %+v", err) } + decoded["type"] = "EventHub" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistener.go b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistener.go index 90cf91c8ab5..5e8aa2166ec 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistener.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistener.go @@ -23,7 +23,7 @@ func (s *EventListener) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["endpoint"]; ok { - impl, err := unmarshalEventListenerEndpointImplementation(v) + impl, err := UnmarshalEventListenerEndpointImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Endpoint' for 'EventListener': %+v", err) } @@ -31,7 +31,7 @@ func (s *EventListener) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["filter"]; ok { - impl, err := unmarshalEventListenerFilterImplementation(v) + impl, err := UnmarshalEventListenerFilterImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Filter' for 'EventListener': %+v", err) } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerendpoint.go b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerendpoint.go index ce6a41e8688..9233f8649cb 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerendpoint.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerendpoint.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventListenerEndpoint interface { + EventListenerEndpoint() BaseEventListenerEndpointImpl } -// RawEventListenerEndpointImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventListenerEndpoint = BaseEventListenerEndpointImpl{} + +type BaseEventListenerEndpointImpl struct { + Type EventListenerEndpointDiscriminator `json:"type"` +} + +func (s BaseEventListenerEndpointImpl) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return s +} + +var _ EventListenerEndpoint = RawEventListenerEndpointImpl{} + +// RawEventListenerEndpointImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventListenerEndpointImpl struct { - Type string - Values map[string]interface{} + eventListenerEndpoint BaseEventListenerEndpointImpl + Type string + Values map[string]interface{} +} + +func (s RawEventListenerEndpointImpl) EventListenerEndpoint() BaseEventListenerEndpointImpl { + return s.eventListenerEndpoint } -func unmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEndpoint, error) { +func UnmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEndpoint, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventListenerEndpointImplementation(input []byte) (EventListenerEn return out, nil } - out := RawEventListenerEndpointImpl{ - Type: value, - Values: temp, + var parent BaseEventListenerEndpointImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventListenerEndpointImpl: %+v", err) } - return out, nil + + return RawEventListenerEndpointImpl{ + eventListenerEndpoint: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerfilter.go b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerfilter.go index 113e67a18be..c6489e27e28 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerfilter.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventlistenerfilter.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type EventListenerFilter interface { + EventListenerFilter() BaseEventListenerFilterImpl } -// RawEventListenerFilterImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ EventListenerFilter = BaseEventListenerFilterImpl{} + +type BaseEventListenerFilterImpl struct { + Type EventListenerFilterDiscriminator `json:"type"` +} + +func (s BaseEventListenerFilterImpl) EventListenerFilter() BaseEventListenerFilterImpl { + return s +} + +var _ EventListenerFilter = RawEventListenerFilterImpl{} + +// RawEventListenerFilterImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawEventListenerFilterImpl struct { - Type string - Values map[string]interface{} + eventListenerFilter BaseEventListenerFilterImpl + Type string + Values map[string]interface{} +} + +func (s RawEventListenerFilterImpl) EventListenerFilter() BaseEventListenerFilterImpl { + return s.eventListenerFilter } -func unmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilter, error) { +func UnmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilter, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalEventListenerFilterImplementation(input []byte) (EventListenerFilt return out, nil } - out := RawEventListenerFilterImpl{ - Type: value, - Values: temp, + var parent BaseEventListenerFilterImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseEventListenerFilterImpl: %+v", err) } - return out, nil + + return RawEventListenerFilterImpl{ + eventListenerFilter: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventnamefilter.go b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventnamefilter.go index 463f1dc90e6..1aaf0f3a719 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventnamefilter.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/model_eventnamefilter.go @@ -15,6 +15,14 @@ type EventNameFilter struct { UserEventPattern *string `json:"userEventPattern,omitempty"` // Fields inherited from EventListenerFilter + + Type EventListenerFilterDiscriminator `json:"type"` +} + +func (s EventNameFilter) EventListenerFilter() BaseEventListenerFilterImpl { + return BaseEventListenerFilterImpl{ + Type: s.Type, + } } var _ json.Marshaler = EventNameFilter{} @@ -28,9 +36,10 @@ func (s EventNameFilter) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling EventNameFilter: %+v", err) } + decoded["type"] = "EventName" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/webpubsub/2024-03-01/webpubsub/version.go b/resource-manager/webpubsub/2024-03-01/webpubsub/version.go index 101d0ed7df1..fd06dc55467 100644 --- a/resource-manager/webpubsub/2024-03-01/webpubsub/version.go +++ b/resource-manager/webpubsub/2024-03-01/webpubsub/version.go @@ -1,12 +1,10 @@ package webpubsub -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2024-03-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webpubsub/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/webpubsub/2024-03-01" } diff --git a/resource-manager/workloads/2023-04-01/monitors/README.md b/resource-manager/workloads/2023-04-01/monitors/README.md index d9f988b29c4..e27c36e1919 100644 --- a/resource-manager/workloads/2023-04-01/monitors/README.md +++ b/resource-manager/workloads/2023-04-01/monitors/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/monitors` Documentation -The `monitors` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `monitors` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/monitors/client.go b/resource-manager/workloads/2023-04-01/monitors/client.go index 6a08c03de8b..da8f22135b8 100644 --- a/resource-manager/workloads/2023-04-01/monitors/client.go +++ b/resource-manager/workloads/2023-04-01/monitors/client.go @@ -15,7 +15,7 @@ type MonitorsClient struct { } func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "monitors", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "monitors", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating MonitorsClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/monitors/id_monitor.go b/resource-manager/workloads/2023-04-01/monitors/id_monitor.go index 735e017c9f0..2635dbe9c04 100644 --- a/resource-manager/workloads/2023-04-01/monitors/id_monitor.go +++ b/resource-manager/workloads/2023-04-01/monitors/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/monitors/method_get.go b/resource-manager/workloads/2023-04-01/monitors/method_get.go index fc8735c6032..cd1dac01b32 100644 --- a/resource-manager/workloads/2023-04-01/monitors/method_get.go +++ b/resource-manager/workloads/2023-04-01/monitors/method_get.go @@ -45,7 +45,6 @@ func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperat var model Monitor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/monitors/method_update.go b/resource-manager/workloads/2023-04-01/monitors/method_update.go index 024eae08ef5..b11c0b548ff 100644 --- a/resource-manager/workloads/2023-04-01/monitors/method_update.go +++ b/resource-manager/workloads/2023-04-01/monitors/method_update.go @@ -49,7 +49,6 @@ func (c MonitorsClient) Update(ctx context.Context, id MonitorId, input UpdateMo var model Monitor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/monitors/version.go b/resource-manager/workloads/2023-04-01/monitors/version.go index 56ae1ca607f..9191dfdcc70 100644 --- a/resource-manager/workloads/2023-04-01/monitors/version.go +++ b/resource-manager/workloads/2023-04-01/monitors/version.go @@ -1,12 +1,10 @@ package monitors -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/monitors/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/monitors/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/README.md b/resource-manager/workloads/2023-04-01/providerinstances/README.md index 727699db323..e15a1b0d8e3 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/README.md +++ b/resource-manager/workloads/2023-04-01/providerinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/providerinstances` Documentation -The `providerinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `providerinstances` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/providerinstances/client.go b/resource-manager/workloads/2023-04-01/providerinstances/client.go index 32b9237eace..11c3d6d28c2 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/client.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/client.go @@ -15,7 +15,7 @@ type ProviderInstancesClient struct { } func NewProviderInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ProviderInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "providerinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "providerinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating ProviderInstancesClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go b/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go index 4c6d47a605f..3044e31c71f 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go b/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go index ada4ef1fb20..3f54e021cd1 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/id_providerinstance.go @@ -44,7 +44,7 @@ func ParseProviderInstanceID(input string) (*ProviderInstanceId, error) { } id := ProviderInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseProviderInstanceIDInsensitively(input string) (*ProviderInstanceId, er } id := ProviderInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/method_get.go b/resource-manager/workloads/2023-04-01/providerinstances/method_get.go index a64a993f9d2..c51b402d054 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/method_get.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/method_get.go @@ -45,7 +45,6 @@ func (c ProviderInstancesClient) Get(ctx context.Context, id ProviderInstanceId) var model ProviderInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go index 0c65ab5d2d4..deefaa0b1f3 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_db2providerinstanceproperties.go @@ -22,6 +22,14 @@ type DB2ProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s DB2ProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = DB2ProviderInstanceProperties{} @@ -35,9 +43,10 @@ func (s DB2ProviderInstanceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DB2ProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "Db2" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go index 0478e8e2904..edd09b83948 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_hanadbproviderinstanceproperties.go @@ -24,6 +24,14 @@ type HanaDbProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s HanaDbProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = HanaDbProviderInstanceProperties{} @@ -37,9 +45,10 @@ func (s HanaDbProviderInstanceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling HanaDbProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "SapHana" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go index 3ef49af37ad..fc7f41c57b7 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_mssqlserverproviderinstanceproperties.go @@ -21,6 +21,14 @@ type MsSqlServerProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s MsSqlServerProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = MsSqlServerProviderInstanceProperties{} @@ -34,9 +42,10 @@ func (s MsSqlServerProviderInstanceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MsSqlServerProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "MsSqlServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go index 1facc5f662a..780a595bd5e 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_prometheushaclusterproviderinstanceproperties.go @@ -19,6 +19,14 @@ type PrometheusHaClusterProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s PrometheusHaClusterProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = PrometheusHaClusterProviderInstanceProperties{} @@ -32,9 +40,10 @@ func (s PrometheusHaClusterProviderInstanceProperties) MarshalJSON() ([]byte, er } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrometheusHaClusterProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "PrometheusHaCluster" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go index 8ee8c0b7ebf..e48c43db546 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_prometheusosproviderinstanceproperties.go @@ -17,6 +17,14 @@ type PrometheusOSProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s PrometheusOSProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = PrometheusOSProviderInstanceProperties{} @@ -30,9 +38,10 @@ func (s PrometheusOSProviderInstanceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling PrometheusOSProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "PrometheusOS" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go index 6c0320dcd9d..8f1fc6b1250 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_providerinstanceproperties.go @@ -32,7 +32,7 @@ func (s *ProviderInstanceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["providerSettings"]; ok { - impl, err := unmarshalProviderSpecificPropertiesImplementation(v) + impl, err := UnmarshalProviderSpecificPropertiesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'ProviderSettings' for 'ProviderInstanceProperties': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go index c436db81dad..a9519dd7a76 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_providerspecificproperties.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ProviderSpecificProperties interface { + ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl } -// RawProviderSpecificPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ProviderSpecificProperties = BaseProviderSpecificPropertiesImpl{} + +type BaseProviderSpecificPropertiesImpl struct { + ProviderType string `json:"providerType"` +} + +func (s BaseProviderSpecificPropertiesImpl) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return s +} + +var _ ProviderSpecificProperties = RawProviderSpecificPropertiesImpl{} + +// RawProviderSpecificPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawProviderSpecificPropertiesImpl struct { - Type string - Values map[string]interface{} + providerSpecificProperties BaseProviderSpecificPropertiesImpl + Type string + Values map[string]interface{} +} + +func (s RawProviderSpecificPropertiesImpl) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return s.providerSpecificProperties } -func unmarshalProviderSpecificPropertiesImplementation(input []byte) (ProviderSpecificProperties, error) { +func UnmarshalProviderSpecificPropertiesImplementation(input []byte) (ProviderSpecificProperties, error) { if input == nil { return nil, nil } @@ -84,10 +101,15 @@ func unmarshalProviderSpecificPropertiesImplementation(input []byte) (ProviderSp return out, nil } - out := RawProviderSpecificPropertiesImpl{ - Type: value, - Values: temp, + var parent BaseProviderSpecificPropertiesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseProviderSpecificPropertiesImpl: %+v", err) } - return out, nil + + return RawProviderSpecificPropertiesImpl{ + providerSpecificProperties: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go b/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go index bb26cfe13c7..9be5e7a94bb 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/model_sapnetweaverproviderinstanceproperties.go @@ -24,6 +24,14 @@ type SapNetWeaverProviderInstanceProperties struct { SslPreference *SslPreference `json:"sslPreference,omitempty"` // Fields inherited from ProviderSpecificProperties + + ProviderType string `json:"providerType"` +} + +func (s SapNetWeaverProviderInstanceProperties) ProviderSpecificProperties() BaseProviderSpecificPropertiesImpl { + return BaseProviderSpecificPropertiesImpl{ + ProviderType: s.ProviderType, + } } var _ json.Marshaler = SapNetWeaverProviderInstanceProperties{} @@ -37,9 +45,10 @@ func (s SapNetWeaverProviderInstanceProperties) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SapNetWeaverProviderInstanceProperties: %+v", err) } + decoded["providerType"] = "SapNetWeaver" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/providerinstances/version.go b/resource-manager/workloads/2023-04-01/providerinstances/version.go index cdfb18cc589..873ba71c474 100644 --- a/resource-manager/workloads/2023-04-01/providerinstances/version.go +++ b/resource-manager/workloads/2023-04-01/providerinstances/version.go @@ -1,12 +1,10 @@ package providerinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/providerinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/providerinstances/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md index 617b4c14d94..092853684ac 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapapplicationserverinstances` Documentation -The `sapapplicationserverinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapapplicationserverinstances` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go index e372453b8ba..db488a14e78 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/client.go @@ -15,7 +15,7 @@ type SAPApplicationServerInstancesClient struct { } func NewSAPApplicationServerInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPApplicationServerInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapapplicationserverinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapapplicationserverinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPApplicationServerInstancesClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go index 9788dcbeb39..9862ccea85e 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_applicationinstance.go @@ -44,7 +44,7 @@ func ParseApplicationInstanceID(input string) (*ApplicationInstanceId, error) { } id := ApplicationInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseApplicationInstanceIDInsensitively(input string) (*ApplicationInstance } id := ApplicationInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go index 6693e60ca0d..3ec1abe2dc7 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/id_sapvirtualinstance.go @@ -42,7 +42,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go index 206f642660d..85535b6b205 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/method_get.go @@ -45,7 +45,6 @@ func (c SAPApplicationServerInstancesClient) Get(ctx context.Context, id Applica var model SAPApplicationServerInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go index 09c849d2626..0ed7a47b205 100644 --- a/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go +++ b/resource-manager/workloads/2023-04-01/sapapplicationserverinstances/version.go @@ -1,12 +1,10 @@ package sapapplicationserverinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapapplicationserverinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapapplicationserverinstances/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md index f5a2d5119dc..09f7fad0b40 100644 --- a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md +++ b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails` Documentation -The `sapavailabilityzonedetails` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapavailabilityzonedetails` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go index f3e01b03d44..331c00dba8d 100644 --- a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go +++ b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/client.go @@ -15,7 +15,7 @@ type SAPAvailabilityZoneDetailsClient struct { } func NewSAPAvailabilityZoneDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPAvailabilityZoneDetailsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapavailabilityzonedetails", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapavailabilityzonedetails", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPAvailabilityZoneDetailsClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go index e8a0d73a9a8..cfc35db4164 100644 --- a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go +++ b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go index 0f7595f67fa..0f5364c7cf2 100644 --- a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go +++ b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/method_sapavailabilityzonedetails.go @@ -50,7 +50,6 @@ func (c SAPAvailabilityZoneDetailsClient) SAPAvailabilityZoneDetails(ctx context var model SAPAvailabilityZoneDetailsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go index 5250751b014..69da59bb0cb 100644 --- a/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go +++ b/resource-manager/workloads/2023-04-01/sapavailabilityzonedetails/version.go @@ -1,12 +1,10 @@ package sapavailabilityzonedetails -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapavailabilityzonedetails/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapavailabilityzonedetails/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md b/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md index e03f0063251..251c4ed745b 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapcentralinstances` Documentation -The `sapcentralinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapcentralinstances` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go b/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go index 82698cd1887..d8f275585f6 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/client.go @@ -15,7 +15,7 @@ type SAPCentralInstancesClient struct { } func NewSAPCentralInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPCentralInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapcentralinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapcentralinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPCentralInstancesClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go b/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go index 14fae40c9bb..0aba1445413 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/id_centralinstance.go @@ -44,7 +44,7 @@ func ParseCentralInstanceID(input string) (*CentralInstanceId, error) { } id := CentralInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseCentralInstanceIDInsensitively(input string) (*CentralInstanceId, erro } id := CentralInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go b/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go index 6b5a9cca6de..6a18f6ae7bb 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/id_sapvirtualinstance.go @@ -42,7 +42,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go b/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go index 51b2b250780..4e8892918f1 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/method_get.go @@ -45,7 +45,6 @@ func (c SAPCentralInstancesClient) Get(ctx context.Context, id CentralInstanceId var model SAPCentralServerInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go b/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go index 83ee8f7f4d6..6c48a0eee4f 100644 --- a/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go +++ b/resource-manager/workloads/2023-04-01/sapcentralinstances/version.go @@ -1,12 +1,10 @@ package sapcentralinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapcentralinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapcentralinstances/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md index 34301df0109..9e59616f369 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdatabaseinstances` Documentation -The `sapdatabaseinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapdatabaseinstances` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go index aa0ae88d4cc..7ef60c6a773 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/client.go @@ -15,7 +15,7 @@ type SAPDatabaseInstancesClient struct { } func NewSAPDatabaseInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPDatabaseInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapdatabaseinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapdatabaseinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPDatabaseInstancesClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go index 90b703d038e..0bafabe90a4 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_databaseinstance.go @@ -44,7 +44,7 @@ func ParseDatabaseInstanceID(input string) (*DatabaseInstanceId, error) { } id := DatabaseInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -61,7 +61,7 @@ func ParseDatabaseInstanceIDInsensitively(input string) (*DatabaseInstanceId, er } id := DatabaseInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go index cbd40fec6de..0e4124cb028 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/id_sapvirtualinstance.go @@ -42,7 +42,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go index f10920fbb71..1c4add58a17 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/method_get.go @@ -45,7 +45,6 @@ func (c SAPDatabaseInstancesClient) Get(ctx context.Context, id DatabaseInstance var model SAPDatabaseInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go index 32c59605984..c73fb813dad 100644 --- a/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go +++ b/resource-manager/workloads/2023-04-01/sapdatabaseinstances/version.go @@ -1,12 +1,10 @@ package sapdatabaseinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapdatabaseinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapdatabaseinstances/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md index 5e7ce81417b..9ae8bc346c7 100644 --- a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md +++ b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapdiskconfigurations` Documentation -The `sapdiskconfigurations` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapdiskconfigurations` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go index 4f1d5dc8243..f0089d8d494 100644 --- a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go +++ b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/client.go @@ -15,7 +15,7 @@ type SAPDiskConfigurationsClient struct { } func NewSAPDiskConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPDiskConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapdiskconfigurations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapdiskconfigurations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPDiskConfigurationsClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go index e690adba092..67640336011 100644 --- a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go +++ b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go index 85d25b1c623..8266364559d 100644 --- a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go +++ b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/method_sapdiskconfigurations.go @@ -50,7 +50,6 @@ func (c SAPDiskConfigurationsClient) SAPDiskConfigurations(ctx context.Context, var model SAPDiskConfigurationsResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go index 93987390c17..4ef133e6036 100644 --- a/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go +++ b/resource-manager/workloads/2023-04-01/sapdiskconfigurations/version.go @@ -1,12 +1,10 @@ package sapdiskconfigurations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapdiskconfigurations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapdiskconfigurations/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md b/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md index 4df82c80526..103fe88eda9 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplandscapemonitor` Documentation -The `saplandscapemonitor` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `saplandscapemonitor` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go index 36dc9043172..3ec9466c1f5 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/client.go @@ -15,7 +15,7 @@ type SapLandscapeMonitorClient struct { } func NewSapLandscapeMonitorClientWithBaseURI(sdkApi sdkEnv.Api) (*SapLandscapeMonitorClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "saplandscapemonitor", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "saplandscapemonitor", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SapLandscapeMonitorClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go index 2b38fac0046..27f465dc498 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/id_monitor.go @@ -42,7 +42,7 @@ func ParseMonitorID(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseMonitorIDInsensitively(input string) (*MonitorId, error) { } id := MonitorId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go index 40f00c0103b..72d44ef9308 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_create.go @@ -51,7 +51,6 @@ func (c SapLandscapeMonitorClient) Create(ctx context.Context, id MonitorId, inp var model SapLandscapeMonitor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go index 94e551c1abd..ddbb8034375 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_get.go @@ -46,7 +46,6 @@ func (c SapLandscapeMonitorClient) Get(ctx context.Context, id MonitorId) (resul var model SapLandscapeMonitor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go index bcb5e7387b3..93d5a8cc5b2 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/method_update.go @@ -50,7 +50,6 @@ func (c SapLandscapeMonitorClient) Update(ctx context.Context, id MonitorId, inp var model SapLandscapeMonitor result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go b/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go index d89a5f15a1d..b30ff2f2fbb 100644 --- a/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go +++ b/resource-manager/workloads/2023-04-01/saplandscapemonitor/version.go @@ -1,12 +1,10 @@ package saplandscapemonitor -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/saplandscapemonitor/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/saplandscapemonitor/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/README.md b/resource-manager/workloads/2023-04-01/saprecommendations/README.md index 74564d3cd54..50564922b11 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/README.md +++ b/resource-manager/workloads/2023-04-01/saprecommendations/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations` Documentation -The `saprecommendations` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `saprecommendations` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/client.go b/resource-manager/workloads/2023-04-01/saprecommendations/client.go index 8a1af72250f..5ae52c515dc 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/client.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/client.go @@ -15,7 +15,7 @@ type SAPRecommendationsClient struct { } func NewSAPRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPRecommendationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "saprecommendations", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "saprecommendations", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPRecommendationsClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go b/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go index 8c69fd83174..87a2bf26768 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go b/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go index e69cc36efa0..3b5d3eeef2a 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/method_sapsizingrecommendations.go @@ -16,7 +16,7 @@ import ( type SAPSizingRecommendationsOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *SAPSizingRecommendationResult + Model SAPSizingRecommendationResult } // SAPSizingRecommendations ... @@ -53,11 +53,11 @@ func (c SAPRecommendationsClient) SAPSizingRecommendations(ctx context.Context, if err = resp.Unmarshal(&respObj); err != nil { return } - model, err := unmarshalSAPSizingRecommendationResultImplementation(respObj) + model, err := UnmarshalSAPSizingRecommendationResultImplementation(respObj) if err != nil { return } - result.Model = &model + result.Model = model return } diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go b/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go index 9aefdce8c29..939d7c1bea6 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/model_sapsizingrecommendationresult.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SAPSizingRecommendationResult interface { + SAPSizingRecommendationResult() BaseSAPSizingRecommendationResultImpl } -// RawSAPSizingRecommendationResultImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SAPSizingRecommendationResult = BaseSAPSizingRecommendationResultImpl{} + +type BaseSAPSizingRecommendationResultImpl struct { + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s BaseSAPSizingRecommendationResultImpl) SAPSizingRecommendationResult() BaseSAPSizingRecommendationResultImpl { + return s +} + +var _ SAPSizingRecommendationResult = RawSAPSizingRecommendationResultImpl{} + +// RawSAPSizingRecommendationResultImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSAPSizingRecommendationResultImpl struct { - Type string - Values map[string]interface{} + sAPSizingRecommendationResult BaseSAPSizingRecommendationResultImpl + Type string + Values map[string]interface{} +} + +func (s RawSAPSizingRecommendationResultImpl) SAPSizingRecommendationResult() BaseSAPSizingRecommendationResultImpl { + return s.sAPSizingRecommendationResult } -func unmarshalSAPSizingRecommendationResultImplementation(input []byte) (SAPSizingRecommendationResult, error) { +func UnmarshalSAPSizingRecommendationResultImplementation(input []byte) (SAPSizingRecommendationResult, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalSAPSizingRecommendationResultImplementation(input []byte) (SAPSizi return out, nil } - out := RawSAPSizingRecommendationResultImpl{ - Type: value, - Values: temp, + var parent BaseSAPSizingRecommendationResultImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSAPSizingRecommendationResultImpl: %+v", err) } - return out, nil + + return RawSAPSizingRecommendationResultImpl{ + sAPSizingRecommendationResult: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go b/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go index c0b6380ad7a..587239a5009 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/model_singleserverrecommendationresult.go @@ -14,6 +14,14 @@ type SingleServerRecommendationResult struct { VMSku *string `json:"vmSku,omitempty"` // Fields inherited from SAPSizingRecommendationResult + + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s SingleServerRecommendationResult) SAPSizingRecommendationResult() BaseSAPSizingRecommendationResultImpl { + return BaseSAPSizingRecommendationResultImpl{ + DeploymentType: s.DeploymentType, + } } var _ json.Marshaler = SingleServerRecommendationResult{} @@ -27,9 +35,10 @@ func (s SingleServerRecommendationResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleServerRecommendationResult: %+v", err) } + decoded["deploymentType"] = "SingleServer" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go b/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go index 27360b7cc67..840b3d6d89d 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/model_threetierrecommendationresult.go @@ -19,6 +19,14 @@ type ThreeTierRecommendationResult struct { DbVMSku *string `json:"dbVmSku,omitempty"` // Fields inherited from SAPSizingRecommendationResult + + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s ThreeTierRecommendationResult) SAPSizingRecommendationResult() BaseSAPSizingRecommendationResultImpl { + return BaseSAPSizingRecommendationResultImpl{ + DeploymentType: s.DeploymentType, + } } var _ json.Marshaler = ThreeTierRecommendationResult{} @@ -32,9 +40,10 @@ func (s ThreeTierRecommendationResult) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreeTierRecommendationResult: %+v", err) } + decoded["deploymentType"] = "ThreeTier" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/saprecommendations/version.go b/resource-manager/workloads/2023-04-01/saprecommendations/version.go index b91a7baeb51..6abe682dd33 100644 --- a/resource-manager/workloads/2023-04-01/saprecommendations/version.go +++ b/resource-manager/workloads/2023-04-01/saprecommendations/version.go @@ -1,12 +1,10 @@ package saprecommendations -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/saprecommendations/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/saprecommendations/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md b/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md index ed1e39c2699..ac9a990e01e 100644 --- a/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md +++ b/resource-manager/workloads/2023-04-01/sapsupportedsku/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku` Documentation -The `sapsupportedsku` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapsupportedsku` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go b/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go index 8011ac22b2e..44d2b8e07ba 100644 --- a/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go +++ b/resource-manager/workloads/2023-04-01/sapsupportedsku/client.go @@ -15,7 +15,7 @@ type SAPSupportedSkuClient struct { } func NewSAPSupportedSkuClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPSupportedSkuClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapsupportedsku", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapsupportedsku", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPSupportedSkuClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go b/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go index 6e3073b1904..340705d19ac 100644 --- a/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go +++ b/resource-manager/workloads/2023-04-01/sapsupportedsku/id_location.go @@ -40,7 +40,7 @@ func ParseLocationID(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -57,7 +57,7 @@ func ParseLocationIDInsensitively(input string) (*LocationId, error) { } id := LocationId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go b/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go index 5be4b86862b..b23d62947b8 100644 --- a/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go +++ b/resource-manager/workloads/2023-04-01/sapsupportedsku/method_sapsupportedsku.go @@ -50,7 +50,6 @@ func (c SAPSupportedSkuClient) SAPSupportedSku(ctx context.Context, id LocationI var model SAPSupportedResourceSkusResult result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go b/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go index d1324c82032..3e71b2b0daa 100644 --- a/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go +++ b/resource-manager/workloads/2023-04-01/sapsupportedsku/version.go @@ -1,12 +1,10 @@ package sapsupportedsku -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapsupportedsku/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapsupportedsku/2023-04-01" } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md b/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md index 95668238825..919b35bc54e 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/README.md @@ -1,7 +1,7 @@ ## `github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances` Documentation -The `sapvirtualinstances` SDK allows for interaction with the Azure Resource Manager Service `workloads` (API Version `2023-04-01`). +The `sapvirtualinstances` SDK allows for interaction with Azure Resource Manager `workloads` (API Version `2023-04-01`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go index db3692232a2..e7297735c3f 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/client.go @@ -15,7 +15,7 @@ type SAPVirtualInstancesClient struct { } func NewSAPVirtualInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*SAPVirtualInstancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "sapvirtualinstances", defaultApiVersion) + client, err := resourcemanager.NewClient(sdkApi, "sapvirtualinstances", defaultApiVersion) if err != nil { return nil, fmt.Errorf("instantiating SAPVirtualInstancesClient: %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go index ba6e03ec5d7..1e97030ec2d 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/id_sapvirtualinstance.go @@ -42,7 +42,7 @@ func ParseSapVirtualInstanceID(input string) (*SapVirtualInstanceId, error) { } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } @@ -59,7 +59,7 @@ func ParseSapVirtualInstanceIDInsensitively(input string) (*SapVirtualInstanceId } id := SapVirtualInstanceId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go index f907040f3e4..a475bb7cdfb 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_get.go @@ -45,7 +45,6 @@ func (c SAPVirtualInstancesClient) Get(ctx context.Context, id SapVirtualInstanc var model SAPVirtualInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go index 73002adae59..7bdbe8ea62f 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/method_update.go @@ -49,7 +49,6 @@ func (c SAPVirtualInstancesClient) Update(ctx context.Context, id SapVirtualInst var model SAPVirtualInstance result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { return } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go index ea44f0fd7e3..f5ba7197c67 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_createandmountfileshareconfiguration.go @@ -15,6 +15,14 @@ type CreateAndMountFileShareConfiguration struct { StorageAccountName *string `json:"storageAccountName,omitempty"` // Fields inherited from FileShareConfiguration + + ConfigurationType ConfigurationType `json:"configurationType"` +} + +func (s CreateAndMountFileShareConfiguration) FileShareConfiguration() BaseFileShareConfigurationImpl { + return BaseFileShareConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = CreateAndMountFileShareConfiguration{} @@ -28,9 +36,10 @@ func (s CreateAndMountFileShareConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling CreateAndMountFileShareConfiguration: %+v", err) } + decoded["configurationType"] = "CreateAndMount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go index d85caa83fa1..22d2cf3539b 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentconfiguration.go @@ -16,6 +16,14 @@ type DeploymentConfiguration struct { SoftwareConfiguration SoftwareConfiguration `json:"softwareConfiguration"` // Fields inherited from SAPConfiguration + + ConfigurationType SAPConfigurationType `json:"configurationType"` +} + +func (s DeploymentConfiguration) SAPConfiguration() BaseSAPConfigurationImpl { + return BaseSAPConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = DeploymentConfiguration{} @@ -29,9 +37,10 @@ func (s DeploymentConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeploymentConfiguration: %+v", err) } + decoded["configurationType"] = "Deployment" encoded, err = json.Marshal(decoded) @@ -52,6 +61,7 @@ func (s *DeploymentConfiguration) UnmarshalJSON(bytes []byte) error { } s.AppLocation = decoded.AppLocation + s.ConfigurationType = decoded.ConfigurationType var temp map[string]json.RawMessage if err := json.Unmarshal(bytes, &temp); err != nil { @@ -59,7 +69,7 @@ func (s *DeploymentConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["infrastructureConfiguration"]; ok { - impl, err := unmarshalInfrastructureConfigurationImplementation(v) + impl, err := UnmarshalInfrastructureConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InfrastructureConfiguration' for 'DeploymentConfiguration': %+v", err) } @@ -67,7 +77,7 @@ func (s *DeploymentConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["softwareConfiguration"]; ok { - impl, err := unmarshalSoftwareConfigurationImplementation(v) + impl, err := UnmarshalSoftwareConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SoftwareConfiguration' for 'DeploymentConfiguration': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go index 883594a6761..24800ba4d64 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_deploymentwithosconfiguration.go @@ -17,6 +17,14 @@ type DeploymentWithOSConfiguration struct { SoftwareConfiguration SoftwareConfiguration `json:"softwareConfiguration"` // Fields inherited from SAPConfiguration + + ConfigurationType SAPConfigurationType `json:"configurationType"` +} + +func (s DeploymentWithOSConfiguration) SAPConfiguration() BaseSAPConfigurationImpl { + return BaseSAPConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = DeploymentWithOSConfiguration{} @@ -30,9 +38,10 @@ func (s DeploymentWithOSConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DeploymentWithOSConfiguration: %+v", err) } + decoded["configurationType"] = "DeploymentWithOSConfig" encoded, err = json.Marshal(decoded) @@ -53,6 +62,7 @@ func (s *DeploymentWithOSConfiguration) UnmarshalJSON(bytes []byte) error { } s.AppLocation = decoded.AppLocation + s.ConfigurationType = decoded.ConfigurationType s.OsSapConfiguration = decoded.OsSapConfiguration var temp map[string]json.RawMessage @@ -61,7 +71,7 @@ func (s *DeploymentWithOSConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["infrastructureConfiguration"]; ok { - impl, err := unmarshalInfrastructureConfigurationImplementation(v) + impl, err := UnmarshalInfrastructureConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'InfrastructureConfiguration' for 'DeploymentWithOSConfiguration': %+v", err) } @@ -69,7 +79,7 @@ func (s *DeploymentWithOSConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["softwareConfiguration"]; ok { - impl, err := unmarshalSoftwareConfigurationImplementation(v) + impl, err := UnmarshalSoftwareConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'SoftwareConfiguration' for 'DeploymentWithOSConfiguration': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go index a6c63c24ee4..05e6556d368 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_discoveryconfiguration.go @@ -16,6 +16,14 @@ type DiscoveryConfiguration struct { ManagedRgStorageAccountName *string `json:"managedRgStorageAccountName,omitempty"` // Fields inherited from SAPConfiguration + + ConfigurationType SAPConfigurationType `json:"configurationType"` +} + +func (s DiscoveryConfiguration) SAPConfiguration() BaseSAPConfigurationImpl { + return BaseSAPConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = DiscoveryConfiguration{} @@ -29,9 +37,10 @@ func (s DiscoveryConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling DiscoveryConfiguration: %+v", err) } + decoded["configurationType"] = "Discovery" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go index 6805c0db671..5e0b4faacb7 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_externalinstallationsoftwareconfiguration.go @@ -14,6 +14,14 @@ type ExternalInstallationSoftwareConfiguration struct { CentralServerVMId *string `json:"centralServerVmId,omitempty"` // Fields inherited from SoftwareConfiguration + + SoftwareInstallationType SAPSoftwareInstallationType `json:"softwareInstallationType"` +} + +func (s ExternalInstallationSoftwareConfiguration) SoftwareConfiguration() BaseSoftwareConfigurationImpl { + return BaseSoftwareConfigurationImpl{ + SoftwareInstallationType: s.SoftwareInstallationType, + } } var _ json.Marshaler = ExternalInstallationSoftwareConfiguration{} @@ -27,9 +35,10 @@ func (s ExternalInstallationSoftwareConfiguration) MarshalJSON() ([]byte, error) } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ExternalInstallationSoftwareConfiguration: %+v", err) } + decoded["softwareInstallationType"] = "External" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go index 115d03e06dd..bee9f90e4f0 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_fileshareconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type FileShareConfiguration interface { + FileShareConfiguration() BaseFileShareConfigurationImpl } -// RawFileShareConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ FileShareConfiguration = BaseFileShareConfigurationImpl{} + +type BaseFileShareConfigurationImpl struct { + ConfigurationType ConfigurationType `json:"configurationType"` +} + +func (s BaseFileShareConfigurationImpl) FileShareConfiguration() BaseFileShareConfigurationImpl { + return s +} + +var _ FileShareConfiguration = RawFileShareConfigurationImpl{} + +// RawFileShareConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawFileShareConfigurationImpl struct { - Type string - Values map[string]interface{} + fileShareConfiguration BaseFileShareConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawFileShareConfigurationImpl) FileShareConfiguration() BaseFileShareConfigurationImpl { + return s.fileShareConfiguration } -func unmarshalFileShareConfigurationImplementation(input []byte) (FileShareConfiguration, error) { +func UnmarshalFileShareConfigurationImplementation(input []byte) (FileShareConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalFileShareConfigurationImplementation(input []byte) (FileShareConfi return out, nil } - out := RawFileShareConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseFileShareConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseFileShareConfigurationImpl: %+v", err) } - return out, nil + + return RawFileShareConfigurationImpl{ + fileShareConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go index a0f9a0fee74..b1a50d7a269 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_infrastructureconfiguration.go @@ -10,18 +10,36 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type InfrastructureConfiguration interface { + InfrastructureConfiguration() BaseInfrastructureConfigurationImpl } -// RawInfrastructureConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ InfrastructureConfiguration = BaseInfrastructureConfigurationImpl{} + +type BaseInfrastructureConfigurationImpl struct { + AppResourceGroup string `json:"appResourceGroup"` + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s BaseInfrastructureConfigurationImpl) InfrastructureConfiguration() BaseInfrastructureConfigurationImpl { + return s +} + +var _ InfrastructureConfiguration = RawInfrastructureConfigurationImpl{} + +// RawInfrastructureConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawInfrastructureConfigurationImpl struct { - Type string - Values map[string]interface{} + infrastructureConfiguration BaseInfrastructureConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawInfrastructureConfigurationImpl) InfrastructureConfiguration() BaseInfrastructureConfigurationImpl { + return s.infrastructureConfiguration } -func unmarshalInfrastructureConfigurationImplementation(input []byte) (InfrastructureConfiguration, error) { +func UnmarshalInfrastructureConfigurationImplementation(input []byte) (InfrastructureConfiguration, error) { if input == nil { return nil, nil } @@ -52,10 +70,15 @@ func unmarshalInfrastructureConfigurationImplementation(input []byte) (Infrastru return out, nil } - out := RawInfrastructureConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseInfrastructureConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseInfrastructureConfigurationImpl: %+v", err) } - return out, nil + + return RawInfrastructureConfigurationImpl{ + infrastructureConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go index c41104d4a16..3e39988ded8 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_linuxconfiguration.go @@ -16,6 +16,14 @@ type LinuxConfiguration struct { SshKeyPair *SshKeyPair `json:"sshKeyPair,omitempty"` // Fields inherited from OSConfiguration + + OsType OSType `json:"osType"` +} + +func (s LinuxConfiguration) OSConfiguration() BaseOSConfigurationImpl { + return BaseOSConfigurationImpl{ + OsType: s.OsType, + } } var _ json.Marshaler = LinuxConfiguration{} @@ -29,9 +37,10 @@ func (s LinuxConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling LinuxConfiguration: %+v", err) } + decoded["osType"] = "Linux" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go index c47dae32d2c..d9f96ff22a7 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_mountfileshareconfiguration.go @@ -15,6 +15,14 @@ type MountFileShareConfiguration struct { PrivateEndpointId string `json:"privateEndpointId"` // Fields inherited from FileShareConfiguration + + ConfigurationType ConfigurationType `json:"configurationType"` +} + +func (s MountFileShareConfiguration) FileShareConfiguration() BaseFileShareConfigurationImpl { + return BaseFileShareConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = MountFileShareConfiguration{} @@ -28,9 +36,10 @@ func (s MountFileShareConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling MountFileShareConfiguration: %+v", err) } + decoded["configurationType"] = "Mount" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go index ac3111e872f..0af73b08df0 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OSConfiguration interface { + OSConfiguration() BaseOSConfigurationImpl } -// RawOSConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ OSConfiguration = BaseOSConfigurationImpl{} + +type BaseOSConfigurationImpl struct { + OsType OSType `json:"osType"` +} + +func (s BaseOSConfigurationImpl) OSConfiguration() BaseOSConfigurationImpl { + return s +} + +var _ OSConfiguration = RawOSConfigurationImpl{} + +// RawOSConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawOSConfigurationImpl struct { - Type string - Values map[string]interface{} + oSConfiguration BaseOSConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawOSConfigurationImpl) OSConfiguration() BaseOSConfigurationImpl { + return s.oSConfiguration } -func unmarshalOSConfigurationImplementation(input []byte) (OSConfiguration, error) { +func UnmarshalOSConfigurationImplementation(input []byte) (OSConfiguration, error) { if input == nil { return nil, nil } @@ -52,10 +69,15 @@ func unmarshalOSConfigurationImplementation(input []byte) (OSConfiguration, erro return out, nil } - out := RawOSConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseOSConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOSConfigurationImpl: %+v", err) } - return out, nil + + return RawOSConfigurationImpl{ + oSConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go index faf6dbd9303..0c3e1a4d3b1 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_osprofile.go @@ -32,7 +32,7 @@ func (s *OSProfile) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["osConfiguration"]; ok { - impl, err := unmarshalOSConfigurationImplementation(v) + impl, err := UnmarshalOSConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'OsConfiguration' for 'OSProfile': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go index 5cbf8ec6874..299318d4fe4 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SAPConfiguration interface { + SAPConfiguration() BaseSAPConfigurationImpl } -// RawSAPConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SAPConfiguration = BaseSAPConfigurationImpl{} + +type BaseSAPConfigurationImpl struct { + ConfigurationType SAPConfigurationType `json:"configurationType"` +} + +func (s BaseSAPConfigurationImpl) SAPConfiguration() BaseSAPConfigurationImpl { + return s +} + +var _ SAPConfiguration = RawSAPConfigurationImpl{} + +// RawSAPConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSAPConfigurationImpl struct { - Type string - Values map[string]interface{} + sAPConfiguration BaseSAPConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawSAPConfigurationImpl) SAPConfiguration() BaseSAPConfigurationImpl { + return s.sAPConfiguration } -func unmarshalSAPConfigurationImplementation(input []byte) (SAPConfiguration, error) { +func UnmarshalSAPConfigurationImplementation(input []byte) (SAPConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSAPConfigurationImplementation(input []byte) (SAPConfiguration, er return out, nil } - out := RawSAPConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseSAPConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSAPConfigurationImpl: %+v", err) } - return out, nil + + return RawSAPConfigurationImpl{ + sAPConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go index ba8a4310c7c..20516b1c968 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapinstallwithoutosconfigsoftwareconfiguration.go @@ -17,6 +17,14 @@ type SAPInstallWithoutOSConfigSoftwareConfiguration struct { SoftwareVersion string `json:"softwareVersion"` // Fields inherited from SoftwareConfiguration + + SoftwareInstallationType SAPSoftwareInstallationType `json:"softwareInstallationType"` +} + +func (s SAPInstallWithoutOSConfigSoftwareConfiguration) SoftwareConfiguration() BaseSoftwareConfigurationImpl { + return BaseSoftwareConfigurationImpl{ + SoftwareInstallationType: s.SoftwareInstallationType, + } } var _ json.Marshaler = SAPInstallWithoutOSConfigSoftwareConfiguration{} @@ -30,9 +38,10 @@ func (s SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON() ([]byte, e } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SAPInstallWithoutOSConfigSoftwareConfiguration: %+v", err) } + decoded["softwareInstallationType"] = "SAPInstallWithoutOSConfig" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go index 9df9160efa4..4d98e76f915 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_sapvirtualinstanceproperties.go @@ -44,7 +44,7 @@ func (s *SAPVirtualInstanceProperties) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["configuration"]; ok { - impl, err := unmarshalSAPConfigurationImplementation(v) + impl, err := UnmarshalSAPConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'Configuration' for 'SAPVirtualInstanceProperties': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go index 55d76f5ab59..134133ef7ec 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_serviceinitiatedsoftwareconfiguration.go @@ -19,6 +19,14 @@ type ServiceInitiatedSoftwareConfiguration struct { SshPrivateKey string `json:"sshPrivateKey"` // Fields inherited from SoftwareConfiguration + + SoftwareInstallationType SAPSoftwareInstallationType `json:"softwareInstallationType"` +} + +func (s ServiceInitiatedSoftwareConfiguration) SoftwareConfiguration() BaseSoftwareConfigurationImpl { + return BaseSoftwareConfigurationImpl{ + SoftwareInstallationType: s.SoftwareInstallationType, + } } var _ json.Marshaler = ServiceInitiatedSoftwareConfiguration{} @@ -32,9 +40,10 @@ func (s ServiceInitiatedSoftwareConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ServiceInitiatedSoftwareConfiguration: %+v", err) } + decoded["softwareInstallationType"] = "ServiceInitiated" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go index 441b04b1628..07b63ed42c7 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverconfiguration.go @@ -19,7 +19,16 @@ type SingleServerConfiguration struct { VirtualMachineConfiguration VirtualMachineConfiguration `json:"virtualMachineConfiguration"` // Fields inherited from InfrastructureConfiguration - AppResourceGroup string `json:"appResourceGroup"` + + AppResourceGroup string `json:"appResourceGroup"` + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s SingleServerConfiguration) InfrastructureConfiguration() BaseInfrastructureConfigurationImpl { + return BaseInfrastructureConfigurationImpl{ + AppResourceGroup: s.AppResourceGroup, + DeploymentType: s.DeploymentType, + } } var _ json.Marshaler = SingleServerConfiguration{} @@ -33,9 +42,10 @@ func (s SingleServerConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleServerConfiguration: %+v", err) } + decoded["deploymentType"] = "SingleServer" encoded, err = json.Marshal(decoded) @@ -58,6 +68,7 @@ func (s *SingleServerConfiguration) UnmarshalJSON(bytes []byte) error { s.AppResourceGroup = decoded.AppResourceGroup s.DatabaseType = decoded.DatabaseType s.DbDiskConfiguration = decoded.DbDiskConfiguration + s.DeploymentType = decoded.DeploymentType s.NetworkConfiguration = decoded.NetworkConfiguration s.SubnetId = decoded.SubnetId s.VirtualMachineConfiguration = decoded.VirtualMachineConfiguration @@ -68,7 +79,7 @@ func (s *SingleServerConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customResourceNames"]; ok { - impl, err := unmarshalSingleServerCustomResourceNamesImplementation(v) + impl, err := UnmarshalSingleServerCustomResourceNamesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomResourceNames' for 'SingleServerConfiguration': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go index 9b7b0814fe3..eef36d338ee 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleservercustomresourcenames.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SingleServerCustomResourceNames interface { + SingleServerCustomResourceNames() BaseSingleServerCustomResourceNamesImpl } -// RawSingleServerCustomResourceNamesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SingleServerCustomResourceNames = BaseSingleServerCustomResourceNamesImpl{} + +type BaseSingleServerCustomResourceNamesImpl struct { + NamingPatternType NamingPatternType `json:"namingPatternType"` +} + +func (s BaseSingleServerCustomResourceNamesImpl) SingleServerCustomResourceNames() BaseSingleServerCustomResourceNamesImpl { + return s +} + +var _ SingleServerCustomResourceNames = RawSingleServerCustomResourceNamesImpl{} + +// RawSingleServerCustomResourceNamesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSingleServerCustomResourceNamesImpl struct { - Type string - Values map[string]interface{} + singleServerCustomResourceNames BaseSingleServerCustomResourceNamesImpl + Type string + Values map[string]interface{} +} + +func (s RawSingleServerCustomResourceNamesImpl) SingleServerCustomResourceNames() BaseSingleServerCustomResourceNamesImpl { + return s.singleServerCustomResourceNames } -func unmarshalSingleServerCustomResourceNamesImplementation(input []byte) (SingleServerCustomResourceNames, error) { +func UnmarshalSingleServerCustomResourceNamesImplementation(input []byte) (SingleServerCustomResourceNames, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalSingleServerCustomResourceNamesImplementation(input []byte) (Singl return out, nil } - out := RawSingleServerCustomResourceNamesImpl{ - Type: value, - Values: temp, + var parent BaseSingleServerCustomResourceNamesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSingleServerCustomResourceNamesImpl: %+v", err) } - return out, nil + + return RawSingleServerCustomResourceNamesImpl{ + singleServerCustomResourceNames: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go index 72c2cfdf3e6..b33a1da3d75 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_singleserverfullresourcenames.go @@ -14,6 +14,14 @@ type SingleServerFullResourceNames struct { VirtualMachine *VirtualMachineResourceNames `json:"virtualMachine,omitempty"` // Fields inherited from SingleServerCustomResourceNames + + NamingPatternType NamingPatternType `json:"namingPatternType"` +} + +func (s SingleServerFullResourceNames) SingleServerCustomResourceNames() BaseSingleServerCustomResourceNamesImpl { + return BaseSingleServerCustomResourceNamesImpl{ + NamingPatternType: s.NamingPatternType, + } } var _ json.Marshaler = SingleServerFullResourceNames{} @@ -27,9 +35,10 @@ func (s SingleServerFullResourceNames) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SingleServerFullResourceNames: %+v", err) } + decoded["namingPatternType"] = "FullResourceName" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go index 764e4ad7471..19385189b9a 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_skipfileshareconfiguration.go @@ -13,6 +13,14 @@ var _ FileShareConfiguration = SkipFileShareConfiguration{} type SkipFileShareConfiguration struct { // Fields inherited from FileShareConfiguration + + ConfigurationType ConfigurationType `json:"configurationType"` +} + +func (s SkipFileShareConfiguration) FileShareConfiguration() BaseFileShareConfigurationImpl { + return BaseFileShareConfigurationImpl{ + ConfigurationType: s.ConfigurationType, + } } var _ json.Marshaler = SkipFileShareConfiguration{} @@ -26,9 +34,10 @@ func (s SkipFileShareConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling SkipFileShareConfiguration: %+v", err) } + decoded["configurationType"] = "Skip" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go index 50f3ddb99cb..1f838d7856f 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_softwareconfiguration.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type SoftwareConfiguration interface { + SoftwareConfiguration() BaseSoftwareConfigurationImpl } -// RawSoftwareConfigurationImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ SoftwareConfiguration = BaseSoftwareConfigurationImpl{} + +type BaseSoftwareConfigurationImpl struct { + SoftwareInstallationType SAPSoftwareInstallationType `json:"softwareInstallationType"` +} + +func (s BaseSoftwareConfigurationImpl) SoftwareConfiguration() BaseSoftwareConfigurationImpl { + return s +} + +var _ SoftwareConfiguration = RawSoftwareConfigurationImpl{} + +// RawSoftwareConfigurationImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawSoftwareConfigurationImpl struct { - Type string - Values map[string]interface{} + softwareConfiguration BaseSoftwareConfigurationImpl + Type string + Values map[string]interface{} +} + +func (s RawSoftwareConfigurationImpl) SoftwareConfiguration() BaseSoftwareConfigurationImpl { + return s.softwareConfiguration } -func unmarshalSoftwareConfigurationImplementation(input []byte) (SoftwareConfiguration, error) { +func UnmarshalSoftwareConfigurationImplementation(input []byte) (SoftwareConfiguration, error) { if input == nil { return nil, nil } @@ -60,10 +77,15 @@ func unmarshalSoftwareConfigurationImplementation(input []byte) (SoftwareConfigu return out, nil } - out := RawSoftwareConfigurationImpl{ - Type: value, - Values: temp, + var parent BaseSoftwareConfigurationImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseSoftwareConfigurationImpl: %+v", err) } - return out, nil + + return RawSoftwareConfigurationImpl{ + softwareConfiguration: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go index 2c688a25d7a..26620b0b1ff 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_storageconfiguration.go @@ -22,7 +22,7 @@ func (s *StorageConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["transportFileShareConfiguration"]; ok { - impl, err := unmarshalFileShareConfigurationImplementation(v) + impl, err := UnmarshalFileShareConfigurationImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'TransportFileShareConfiguration' for 'StorageConfiguration': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go index 6ae4e32a5c0..c2c81e833d1 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierconfiguration.go @@ -20,7 +20,16 @@ type ThreeTierConfiguration struct { StorageConfiguration *StorageConfiguration `json:"storageConfiguration,omitempty"` // Fields inherited from InfrastructureConfiguration - AppResourceGroup string `json:"appResourceGroup"` + + AppResourceGroup string `json:"appResourceGroup"` + DeploymentType SAPDeploymentType `json:"deploymentType"` +} + +func (s ThreeTierConfiguration) InfrastructureConfiguration() BaseInfrastructureConfigurationImpl { + return BaseInfrastructureConfigurationImpl{ + AppResourceGroup: s.AppResourceGroup, + DeploymentType: s.DeploymentType, + } } var _ json.Marshaler = ThreeTierConfiguration{} @@ -34,9 +43,10 @@ func (s ThreeTierConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreeTierConfiguration: %+v", err) } + decoded["deploymentType"] = "ThreeTier" encoded, err = json.Marshal(decoded) @@ -60,6 +70,7 @@ func (s *ThreeTierConfiguration) UnmarshalJSON(bytes []byte) error { s.ApplicationServer = decoded.ApplicationServer s.CentralServer = decoded.CentralServer s.DatabaseServer = decoded.DatabaseServer + s.DeploymentType = decoded.DeploymentType s.HighAvailabilityConfig = decoded.HighAvailabilityConfig s.NetworkConfiguration = decoded.NetworkConfiguration s.StorageConfiguration = decoded.StorageConfiguration @@ -70,7 +81,7 @@ func (s *ThreeTierConfiguration) UnmarshalJSON(bytes []byte) error { } if v, ok := temp["customResourceNames"]; ok { - impl, err := unmarshalThreeTierCustomResourceNamesImplementation(v) + impl, err := UnmarshalThreeTierCustomResourceNamesImplementation(v) if err != nil { return fmt.Errorf("unmarshaling field 'CustomResourceNames' for 'ThreeTierConfiguration': %+v", err) } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go index 55eebe79ef5..d6e8b5d4f63 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetiercustomresourcenames.go @@ -10,18 +10,35 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ThreeTierCustomResourceNames interface { + ThreeTierCustomResourceNames() BaseThreeTierCustomResourceNamesImpl } -// RawThreeTierCustomResourceNamesImpl is returned when the Discriminated Value -// doesn't match any of the defined types +var _ ThreeTierCustomResourceNames = BaseThreeTierCustomResourceNamesImpl{} + +type BaseThreeTierCustomResourceNamesImpl struct { + NamingPatternType NamingPatternType `json:"namingPatternType"` +} + +func (s BaseThreeTierCustomResourceNamesImpl) ThreeTierCustomResourceNames() BaseThreeTierCustomResourceNamesImpl { + return s +} + +var _ ThreeTierCustomResourceNames = RawThreeTierCustomResourceNamesImpl{} + +// RawThreeTierCustomResourceNamesImpl is returned when the Discriminated Value doesn't match any of the defined types // NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) // and is used only for Deserialization (e.g. this cannot be used as a Request Payload). type RawThreeTierCustomResourceNamesImpl struct { - Type string - Values map[string]interface{} + threeTierCustomResourceNames BaseThreeTierCustomResourceNamesImpl + Type string + Values map[string]interface{} +} + +func (s RawThreeTierCustomResourceNamesImpl) ThreeTierCustomResourceNames() BaseThreeTierCustomResourceNamesImpl { + return s.threeTierCustomResourceNames } -func unmarshalThreeTierCustomResourceNamesImplementation(input []byte) (ThreeTierCustomResourceNames, error) { +func UnmarshalThreeTierCustomResourceNamesImplementation(input []byte) (ThreeTierCustomResourceNames, error) { if input == nil { return nil, nil } @@ -44,10 +61,15 @@ func unmarshalThreeTierCustomResourceNamesImplementation(input []byte) (ThreeTie return out, nil } - out := RawThreeTierCustomResourceNamesImpl{ - Type: value, - Values: temp, + var parent BaseThreeTierCustomResourceNamesImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseThreeTierCustomResourceNamesImpl: %+v", err) } - return out, nil + + return RawThreeTierCustomResourceNamesImpl{ + threeTierCustomResourceNames: parent, + Type: value, + Values: temp, + }, nil } diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go index 2d5be5fede6..01be320e9ba 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_threetierfullresourcenames.go @@ -17,6 +17,14 @@ type ThreeTierFullResourceNames struct { SharedStorage *SharedStorageResourceNames `json:"sharedStorage,omitempty"` // Fields inherited from ThreeTierCustomResourceNames + + NamingPatternType NamingPatternType `json:"namingPatternType"` +} + +func (s ThreeTierFullResourceNames) ThreeTierCustomResourceNames() BaseThreeTierCustomResourceNamesImpl { + return BaseThreeTierCustomResourceNamesImpl{ + NamingPatternType: s.NamingPatternType, + } } var _ json.Marshaler = ThreeTierFullResourceNames{} @@ -30,9 +38,10 @@ func (s ThreeTierFullResourceNames) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling ThreeTierFullResourceNames: %+v", err) } + decoded["namingPatternType"] = "FullResourceName" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go index 138faef716a..81f41dff686 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/model_windowsconfiguration.go @@ -13,6 +13,14 @@ var _ OSConfiguration = WindowsConfiguration{} type WindowsConfiguration struct { // Fields inherited from OSConfiguration + + OsType OSType `json:"osType"` +} + +func (s WindowsConfiguration) OSConfiguration() BaseOSConfigurationImpl { + return BaseOSConfigurationImpl{ + OsType: s.OsType, + } } var _ json.Marshaler = WindowsConfiguration{} @@ -26,9 +34,10 @@ func (s WindowsConfiguration) MarshalJSON() ([]byte, error) { } var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { + if err = json.Unmarshal(encoded, &decoded); err != nil { return nil, fmt.Errorf("unmarshaling WindowsConfiguration: %+v", err) } + decoded["osType"] = "Windows" encoded, err = json.Marshal(decoded) diff --git a/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go b/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go index 7da86029fc4..80c7cbb9b2e 100644 --- a/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go +++ b/resource-manager/workloads/2023-04-01/sapvirtualinstances/version.go @@ -1,12 +1,10 @@ package sapvirtualinstances -import "fmt" - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. const defaultApiVersion = "2023-04-01" func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/sapvirtualinstances/%s", defaultApiVersion) + return "hashicorp/go-azure-sdk/sapvirtualinstances/2023-04-01" }